xorg-server-21.1.16/0000755000175000017500000000000014757411136007717 5xorg-server-21.1.16/composite/0000755000175000017500000000000014757411133011716 5xorg-server-21.1.16/composite/meson.build0000644000175000017500000000054514757411105014003 srcs_composite = [ 'compalloc.c', 'compext.c', 'compinit.c', 'compoverlay.c', 'compwindow.c', ] hdrs_composite = [ 'compositeext.h', ] libxserver_composite = static_library('libxserver_composite', srcs_composite, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_composite, install_dir: xorgsdkdir) endif xorg-server-21.1.16/composite/Makefile.am0000644000175000017500000000034714757411105013675 noinst_LTLIBRARIES = libcomposite.la AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = compositeext.h endif libcomposite_la_SOURCES = \ compalloc.c \ compext.c \ compint.h \ compinit.c \ compoverlay.c \ compwindow.c xorg-server-21.1.16/composite/compositeext.h0000644000175000017500000000367614757411105014545 /* * Copyright © 2009 NVIDIA Corporation * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 * AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _COMPOSITEEXT_H_ #define _COMPOSITEEXT_H_ #include "misc.h" #include "scrnintstr.h" extern _X_EXPORT Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, VisualID * vids, int nVisuals); extern _X_EXPORT Bool CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen, VisualID parentVisual, VisualID winVisual); extern _X_EXPORT Bool compIsAlternateVisual(ScreenPtr pScreen, XID visual); extern _X_EXPORT RESTYPE CompositeClientWindowType; #endif /* _COMPOSITEEXT_H_ */ xorg-server-21.1.16/composite/Makefile.in0000644000175000017500000006706414757411114013717 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = composite ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcomposite_la_LIBADD = am_libcomposite_la_OBJECTS = compalloc.lo compext.lo compinit.lo \ compoverlay.lo compwindow.lo libcomposite_la_OBJECTS = $(am_libcomposite_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/compalloc.Plo \ ./$(DEPDIR)/compext.Plo ./$(DEPDIR)/compinit.Plo \ ./$(DEPDIR)/compoverlay.Plo ./$(DEPDIR)/compwindow.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcomposite_la_SOURCES) DIST_SOURCES = $(libcomposite_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = compositeext.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcomposite.la AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = compositeext.h libcomposite_la_SOURCES = \ compalloc.c \ compext.c \ compint.h \ compinit.c \ compoverlay.c \ compwindow.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign composite/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign composite/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcomposite.la: $(libcomposite_la_OBJECTS) $(libcomposite_la_DEPENDENCIES) $(EXTRA_libcomposite_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcomposite_la_OBJECTS) $(libcomposite_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compalloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compinit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compoverlay.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compwindow.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/compalloc.Plo -rm -f ./$(DEPDIR)/compext.Plo -rm -f ./$(DEPDIR)/compinit.Plo -rm -f ./$(DEPDIR)/compoverlay.Plo -rm -f ./$(DEPDIR)/compwindow.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/compalloc.Plo -rm -f ./$(DEPDIR)/compext.Plo -rm -f ./$(DEPDIR)/compinit.Plo -rm -f ./$(DEPDIR)/compoverlay.Plo -rm -f ./$(DEPDIR)/compwindow.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/composite/compalloc.c0000644000175000017500000005142614757411105013762 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #include "compint.h" static Bool compScreenUpdate(ClientPtr pClient, void *closure) { ScreenPtr pScreen = closure; CompScreenPtr cs = GetCompScreen(pScreen); compCheckTree(pScreen); compPaintChildrenToWindow(pScreen->root); /* Next damage will restore the worker */ cs->pendingScreenUpdate = FALSE; return TRUE; } void compMarkAncestors(WindowPtr pWin) { pWin = pWin->parent; while (pWin) { if (pWin->damagedDescendants) return; pWin->damagedDescendants = TRUE; pWin = pWin->parent; } } static void compReportDamage(DamagePtr pDamage, RegionPtr pRegion, void *closure) { WindowPtr pWin = (WindowPtr) closure; ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); CompWindowPtr cw = GetCompWindow(pWin); if (!cs->pendingScreenUpdate) { QueueWorkProc(compScreenUpdate, serverClient, pScreen); cs->pendingScreenUpdate = TRUE; } cw->damaged = TRUE; compMarkAncestors(pWin); } static void compDestroyDamage(DamagePtr pDamage, void *closure) { WindowPtr pWin = (WindowPtr) closure; CompWindowPtr cw = GetCompWindow(pWin); cw->damage = 0; cw->damaged = 0; cw->damageRegistered = 0; } static Bool compMarkWindows(WindowPtr pWin, WindowPtr *ppLayerWin) { ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pLayerWin = pWin; if (!pWin->viewable) return FALSE; (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); (*pScreen->MarkWindow) (pLayerWin->parent); *ppLayerWin = pLayerWin; return TRUE; } static void compHandleMarkedWindows(WindowPtr pWin, WindowPtr pLayerWin) { ScreenPtr pScreen = pWin->drawable.pScreen; (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, VTOther); } /* * Redirect one window for one client */ int compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update) { CompWindowPtr cw = GetCompWindow(pWin); CompClientWindowPtr ccw; CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); WindowPtr pLayerWin; Bool anyMarked = FALSE; int status = Success; if (pWin == cs->pOverlayWin) { return Success; } if (!pWin->parent) return BadMatch; /* * Only one Manual update is allowed */ if (cw && update == CompositeRedirectManual) for (ccw = cw->clients; ccw; ccw = ccw->next) if (ccw->update == CompositeRedirectManual) return BadAccess; /* * Allocate per-client per-window structure * The client *could* allocate multiple, but while supported, * it is not expected to be common */ ccw = malloc(sizeof(CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID(pClient->index); ccw->update = update; /* * Now make sure there's a per-window structure to hang this from */ if (!cw) { cw = malloc(sizeof(CompWindowRec)); if (!cw) { free(ccw); return BadAlloc; } cw->damage = DamageCreate(compReportDamage, compDestroyDamage, DamageReportNonEmpty, FALSE, pWin->drawable.pScreen, pWin); if (!cw->damage) { free(ccw); free(cw); return BadAlloc; } anyMarked = compMarkWindows(pWin, &pLayerWin); RegionNull(&cw->borderClip); cw->update = CompositeRedirectAutomatic; cw->clients = 0; cw->oldx = COMP_ORIGIN_INVALID; cw->oldy = COMP_ORIGIN_INVALID; cw->damageRegistered = FALSE; cw->damaged = FALSE; cw->pOldPixmap = NullPixmap; dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, cw); } ccw->next = cw->clients; cw->clients = ccw; if (!AddResource(ccw->id, CompositeClientWindowType, pWin)) return BadAlloc; if (ccw->update == CompositeRedirectManual) { if (!anyMarked) anyMarked = compMarkWindows(pWin, &pLayerWin); if (cw->damageRegistered) { DamageUnregister(cw->damage); cw->damageRegistered = FALSE; } cw->update = CompositeRedirectManual; } else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered) { if (!anyMarked) anyMarked = compMarkWindows(pWin, &pLayerWin); } if (!compCheckRedirect(pWin)) { FreeResource(ccw->id, RT_NONE); status = BadAlloc; } if (anyMarked) compHandleMarkedWindows(pWin, pLayerWin); return status; } void compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap) { ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pParent = pWin->parent; if (pParent->drawable.depth == pWin->drawable.depth) { GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen); int bw = (int) pWin->borderWidth; int x = bw; int y = bw; int w = pWin->drawable.width; int h = pWin->drawable.height; if (pGC) { ChangeGCVal val; val.val = IncludeInferiors; ChangeGC(NullClient, pGC, GCSubwindowMode, &val); ValidateGC(&pWin->drawable, pGC); (*pGC->ops->CopyArea) (&pPixmap->drawable, &pWin->drawable, pGC, x, y, w, h, 0, 0); FreeScratchGC(pGC); } } } /* * Free one of the per-client per-window resources, clearing * redirect and the per-window pointer as appropriate */ void compFreeClientWindow(WindowPtr pWin, XID id) { ScreenPtr pScreen = pWin->drawable.pScreen; CompWindowPtr cw = GetCompWindow(pWin); CompClientWindowPtr ccw, *prev; Bool anyMarked = FALSE; WindowPtr pLayerWin; PixmapPtr pPixmap = NULL; if (!cw) return; for (prev = &cw->clients; (ccw = *prev); prev = &ccw->next) { if (ccw->id == id) { *prev = ccw->next; if (ccw->update == CompositeRedirectManual) cw->update = CompositeRedirectAutomatic; free(ccw); break; } } if (!cw->clients) { anyMarked = compMarkWindows(pWin, &pLayerWin); if (pWin->redirectDraw != RedirectDrawNone) { pPixmap = (*pScreen->GetWindowPixmap) (pWin); compSetParentPixmap(pWin); } if (cw->damage) DamageDestroy(cw->damage); RegionUninit(&cw->borderClip); dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL); free(cw); } else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) { anyMarked = compMarkWindows(pWin, &pLayerWin); DamageRegister(&pWin->drawable, cw->damage); cw->damageRegistered = TRUE; pWin->redirectDraw = RedirectDrawAutomatic; DamageDamageRegion(&pWin->drawable, &pWin->borderSize); } if (anyMarked) compHandleMarkedWindows(pWin, pLayerWin); if (pPixmap) { compRestoreWindow(pWin, pPixmap); (*pScreen->DestroyPixmap) (pPixmap); } } /* * This is easy, just free the appropriate resource. */ int compUnredirectWindow(ClientPtr pClient, WindowPtr pWin, int update) { CompWindowPtr cw = GetCompWindow(pWin); CompClientWindowPtr ccw; if (!cw) return BadValue; for (ccw = cw->clients; ccw; ccw = ccw->next) if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) { FreeResource(ccw->id, RT_NONE); return Success; } return BadValue; } /* * Redirect all subwindows for one client */ int compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) { CompSubwindowsPtr csw = GetCompSubwindows(pWin); CompClientWindowPtr ccw; WindowPtr pChild; /* * Only one Manual update is allowed */ if (csw && update == CompositeRedirectManual) for (ccw = csw->clients; ccw; ccw = ccw->next) if (ccw->update == CompositeRedirectManual) return BadAccess; /* * Allocate per-client per-window structure * The client *could* allocate multiple, but while supported, * it is not expected to be common */ ccw = malloc(sizeof(CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID(pClient->index); ccw->update = update; /* * Now make sure there's a per-window structure to hang this from */ if (!csw) { csw = malloc(sizeof(CompSubwindowsRec)); if (!csw) { free(ccw); return BadAlloc; } csw->update = CompositeRedirectAutomatic; csw->clients = 0; dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, csw); } /* * Redirect all existing windows */ for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) { int ret = compRedirectWindow(pClient, pChild, update); if (ret != Success) { for (pChild = pChild->nextSib; pChild; pChild = pChild->nextSib) (void) compUnredirectWindow(pClient, pChild, update); if (!csw->clients) { free(csw); dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, 0); } free(ccw); return ret; } } /* * Hook into subwindows list */ ccw->next = csw->clients; csw->clients = ccw; if (!AddResource(ccw->id, CompositeClientSubwindowsType, pWin)) return BadAlloc; if (ccw->update == CompositeRedirectManual) { csw->update = CompositeRedirectManual; /* * tell damage extension that damage events for this client are * critical output */ DamageExtSetCritical(pClient, TRUE); pWin->inhibitBGPaint = TRUE; } return Success; } /* * Free one of the per-client per-subwindows resources, * which frees one redirect per subwindow */ void compFreeClientSubwindows(WindowPtr pWin, XID id) { CompSubwindowsPtr csw = GetCompSubwindows(pWin); CompClientWindowPtr ccw, *prev; WindowPtr pChild; if (!csw) return; for (prev = &csw->clients; (ccw = *prev); prev = &ccw->next) { if (ccw->id == id) { ClientPtr pClient = clients[CLIENT_ID(id)]; *prev = ccw->next; if (ccw->update == CompositeRedirectManual) { /* * tell damage extension that damage events for this client are * critical output */ DamageExtSetCritical(pClient, FALSE); csw->update = CompositeRedirectAutomatic; pWin->inhibitBGPaint = FALSE; if (pWin->mapped) (*pWin->drawable.pScreen->ClearToBackground) (pWin, 0, 0, 0, 0, TRUE); } /* * Unredirect all existing subwindows */ for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) (void) compUnredirectWindow(pClient, pChild, ccw->update); free(ccw); break; } } /* * Check if all of the per-client records are gone */ if (!csw->clients) { dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, NULL); free(csw); } } /* * This is easy, just free the appropriate resource. */ int compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update) { CompSubwindowsPtr csw = GetCompSubwindows(pWin); CompClientWindowPtr ccw; if (!csw) return BadValue; for (ccw = csw->clients; ccw; ccw = ccw->next) if (ccw->update == update && CLIENT_ID(ccw->id) == pClient->index) { FreeResource(ccw->id, RT_NONE); return Success; } return BadValue; } /* * Add redirection information for one subwindow (during reparent) */ int compRedirectOneSubwindow(WindowPtr pParent, WindowPtr pWin) { CompSubwindowsPtr csw = GetCompSubwindows(pParent); CompClientWindowPtr ccw; if (!csw) return Success; for (ccw = csw->clients; ccw; ccw = ccw->next) { int ret = compRedirectWindow(clients[CLIENT_ID(ccw->id)], pWin, ccw->update); if (ret != Success) return ret; } return Success; } /* * Remove redirection information for one subwindow (during reparent) */ int compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin) { CompSubwindowsPtr csw = GetCompSubwindows(pParent); CompClientWindowPtr ccw; if (!csw) return Success; for (ccw = csw->clients; ccw; ccw = ccw->next) { int ret = compUnredirectWindow(clients[CLIENT_ID(ccw->id)], pWin, ccw->update); if (ret != Success) return ret; } return Success; } static PixmapPtr compNewPixmap(WindowPtr pWin, int x, int y, int w, int h) { ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pParent = pWin->parent; PixmapPtr pPixmap; pPixmap = (*pScreen->CreatePixmap) (pScreen, w, h, pWin->drawable.depth, CREATE_PIXMAP_USAGE_BACKING_PIXMAP); if (!pPixmap) return 0; pPixmap->screen_x = x; pPixmap->screen_y = y; if (pParent->drawable.depth == pWin->drawable.depth) { GCPtr pGC = GetScratchGC(pWin->drawable.depth, pScreen); if (pGC) { ChangeGCVal val; val.val = IncludeInferiors; ChangeGC(NullClient, pGC, GCSubwindowMode, &val); ValidateGC(&pPixmap->drawable, pGC); (*pGC->ops->CopyArea) (&pParent->drawable, &pPixmap->drawable, pGC, x - pParent->drawable.x, y - pParent->drawable.y, w, h, 0, 0); FreeScratchGC(pGC); } } else { PictFormatPtr pSrcFormat = PictureWindowFormat(pParent); PictFormatPtr pDstFormat = PictureWindowFormat(pWin); XID inferiors = IncludeInferiors; int error; PicturePtr pSrcPicture = CreatePicture(None, &pParent->drawable, pSrcFormat, CPSubwindowMode, &inferiors, serverClient, &error); PicturePtr pDstPicture = CreatePicture(None, &pPixmap->drawable, pDstFormat, 0, 0, serverClient, &error); if (pSrcPicture && pDstPicture) { CompositePicture(PictOpSrc, pSrcPicture, NULL, pDstPicture, x - pParent->drawable.x, y - pParent->drawable.y, 0, 0, 0, 0, w, h); } if (pSrcPicture) FreePicture(pSrcPicture, 0); if (pDstPicture) FreePicture(pDstPicture, 0); } return pPixmap; } Bool compAllocPixmap(WindowPtr pWin) { int bw = (int) pWin->borderWidth; int x = pWin->drawable.x - bw; int y = pWin->drawable.y - bw; int w = pWin->drawable.width + (bw << 1); int h = pWin->drawable.height + (bw << 1); PixmapPtr pPixmap = compNewPixmap(pWin, x, y, w, h); CompWindowPtr cw = GetCompWindow(pWin); Bool status; if (!pPixmap) { status = FALSE; goto out; } if (cw->update == CompositeRedirectAutomatic) pWin->redirectDraw = RedirectDrawAutomatic; else pWin->redirectDraw = RedirectDrawManual; compSetPixmap(pWin, pPixmap, bw); cw->oldx = COMP_ORIGIN_INVALID; cw->oldy = COMP_ORIGIN_INVALID; cw->damageRegistered = FALSE; if (cw->update == CompositeRedirectAutomatic) { DamageRegister(&pWin->drawable, cw->damage); cw->damageRegistered = TRUE; } status = TRUE; out: /* Make sure our borderClip is up to date */ RegionUninit(&cw->borderClip); RegionCopy(&cw->borderClip, &pWin->borderClip); cw->borderClipX = pWin->drawable.x; cw->borderClipY = pWin->drawable.y; return status; } void compSetParentPixmap(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; PixmapPtr pParentPixmap; CompWindowPtr cw = GetCompWindow(pWin); if (cw->damageRegistered) { DamageUnregister(cw->damage); cw->damageRegistered = FALSE; DamageEmpty(cw->damage); } /* * Move the parent-constrained border clip region back into * the window so that ValidateTree will handle the unmap * case correctly. Unmap adds the window borderClip to the * parent exposed area; regions beyond the parent cause crashes */ RegionCopy(&pWin->borderClip, &cw->borderClip); pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent); pWin->redirectDraw = RedirectDrawNone; compSetPixmap(pWin, pParentPixmap, pWin->borderWidth); } /* * Make sure the pixmap is the right size and offset. Allocate a new * pixmap to change size, adjust origin to change offset, leaving the * old pixmap in cw->pOldPixmap so bits can be recovered */ Bool compReallocPixmap(WindowPtr pWin, int draw_x, int draw_y, unsigned int w, unsigned int h, int bw) { ScreenPtr pScreen = pWin->drawable.pScreen; PixmapPtr pOld = (*pScreen->GetWindowPixmap) (pWin); PixmapPtr pNew; CompWindowPtr cw = GetCompWindow(pWin); int pix_x, pix_y; int pix_w, pix_h; assert(cw); assert(pWin->redirectDraw != RedirectDrawNone); cw->oldx = pOld->screen_x; cw->oldy = pOld->screen_y; pix_x = draw_x - bw; pix_y = draw_y - bw; pix_w = w + (bw << 1); pix_h = h + (bw << 1); if (pix_w != pOld->drawable.width || pix_h != pOld->drawable.height) { pNew = compNewPixmap(pWin, pix_x, pix_y, pix_w, pix_h); if (!pNew) return FALSE; cw->pOldPixmap = pOld; compSetPixmap(pWin, pNew, bw); } else { pNew = pOld; cw->pOldPixmap = 0; } pNew->screen_x = pix_x; pNew->screen_y = pix_y; return TRUE; } xorg-server-21.1.16/composite/compext.c0000644000175000017500000006464214757411105013474 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #include "compint.h" #include "xace.h" #include "protocol-versions.h" #include "extinit.h" static CARD8 CompositeReqCode; static DevPrivateKeyRec CompositeClientPrivateKeyRec; #define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec) RESTYPE CompositeClientWindowType; RESTYPE CompositeClientSubwindowsType; RESTYPE CompositeClientOverlayType; typedef struct _CompositeClient { int major_version; int minor_version; } CompositeClientRec, *CompositeClientPtr; #define GetCompositeClient(pClient) ((CompositeClientPtr) \ dixLookupPrivate(&(pClient)->devPrivates, CompositeClientPrivateKey)) static int FreeCompositeClientWindow(void *value, XID ccwid) { WindowPtr pWin = value; compFreeClientWindow(pWin, ccwid); return Success; } static int FreeCompositeClientSubwindows(void *value, XID ccwid) { WindowPtr pWin = value; compFreeClientSubwindows(pWin, ccwid); return Success; } static int FreeCompositeClientOverlay(void *value, XID ccwid) { CompOverlayClientPtr pOc = (CompOverlayClientPtr) value; compFreeOverlayClient(pOc); return Success; } static int ProcCompositeQueryVersion(ClientPtr client) { CompositeClientPtr pCompositeClient = GetCompositeClient(client); xCompositeQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; REQUEST(xCompositeQueryVersionReq); REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); if (stuff->majorVersion < SERVER_COMPOSITE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { rep.majorVersion = SERVER_COMPOSITE_MAJOR_VERSION; rep.minorVersion = SERVER_COMPOSITE_MINOR_VERSION; } pCompositeClient->major_version = rep.majorVersion; pCompositeClient->minor_version = rep.minorVersion; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xCompositeQueryVersionReply), &rep); return Success; } #define VERIFY_WINDOW(pWindow, wid, client, mode) \ do { \ int err; \ err = dixLookupResourceByType((void **) &pWindow, wid, \ RT_WINDOW, client, mode); \ if (err != Success) { \ client->errorValue = wid; \ return err; \ } \ } while (0) static int ProcCompositeRedirectWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xCompositeRedirectWindowReq); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); VERIFY_WINDOW(pWin, stuff->window, client, DixSetAttrAccess | DixManageAccess | DixBlendAccess); return compRedirectWindow(client, pWin, stuff->update); } static int ProcCompositeRedirectSubwindows(ClientPtr client) { WindowPtr pWin; REQUEST(xCompositeRedirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); VERIFY_WINDOW(pWin, stuff->window, client, DixSetAttrAccess | DixManageAccess | DixBlendAccess); return compRedirectSubwindows(client, pWin, stuff->update); } static int ProcCompositeUnredirectWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xCompositeUnredirectWindowReq); REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); VERIFY_WINDOW(pWin, stuff->window, client, DixSetAttrAccess | DixManageAccess | DixBlendAccess); return compUnredirectWindow(client, pWin, stuff->update); } static int ProcCompositeUnredirectSubwindows(ClientPtr client) { WindowPtr pWin; REQUEST(xCompositeUnredirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); VERIFY_WINDOW(pWin, stuff->window, client, DixSetAttrAccess | DixManageAccess | DixBlendAccess); return compUnredirectSubwindows(client, pWin, stuff->update); } static int ProcCompositeCreateRegionFromBorderClip(ClientPtr client) { WindowPtr pWin; CompWindowPtr cw; RegionPtr pBorderClip, pRegion; REQUEST(xCompositeCreateRegionFromBorderClipReq); REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); LEGAL_NEW_RESOURCE(stuff->region, client); cw = GetCompWindow(pWin); if (cw) pBorderClip = &cw->borderClip; else pBorderClip = &pWin->borderClip; pRegion = XFixesRegionCopy(pBorderClip); if (!pRegion) return BadAlloc; RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y); if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } static int ProcCompositeNameWindowPixmap(ClientPtr client) { WindowPtr pWin; CompWindowPtr cw; PixmapPtr pPixmap; ScreenPtr pScreen; int rc; REQUEST(xCompositeNameWindowPixmapReq); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); pScreen = pWin->drawable.pScreen; if (!pWin->viewable) return BadMatch; LEGAL_NEW_RESOURCE(stuff->pixmap, client); cw = GetCompWindow(pWin); if (!cw) return BadMatch; pPixmap = (*pScreen->GetWindowPixmap) (pWin); if (!pPixmap) return BadMatch; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP, pPixmap, RT_WINDOW, pWin, DixCreateAccess); if (rc != Success) return rc; ++pPixmap->refcnt; if (!AddResource(stuff->pixmap, RT_PIXMAP, (void *) pPixmap)) return BadAlloc; if (pScreen->NameWindowPixmap) { rc = pScreen->NameWindowPixmap(pWin, pPixmap, stuff->pixmap); if (rc != Success) { FreeResource(stuff->pixmap, RT_NONE); return rc; } } return Success; } static int ProcCompositeGetOverlayWindow(ClientPtr client) { REQUEST(xCompositeGetOverlayWindowReq); xCompositeGetOverlayWindowReply rep; WindowPtr pWin; ScreenPtr pScreen; CompScreenPtr cs; CompOverlayClientPtr pOc; int rc; REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); 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) 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; } rep = (xCompositeGetOverlayWindowReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .overlayWin = cs->pOverlayWin->drawable.id }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.overlayWin); } WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep); return Success; } static int ProcCompositeReleaseOverlayWindow(ClientPtr client) { REQUEST(xCompositeReleaseOverlayWindowReq); WindowPtr pWin; CompOverlayClientPtr pOc; REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); VERIFY_WINDOW(pWin, stuff->window, client, DixGetAttrAccess); /* * Has client queried a reference to the overlay window * on this screen? If not, generate an error. */ pOc = compFindOverlayClient(pWin->drawable.pScreen, client); if (pOc == NULL) return BadMatch; /* The delete function will free the client structure */ FreeResource(pOc->resource, RT_NONE); return Success; } static int (*ProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = { ProcCompositeQueryVersion, ProcCompositeRedirectWindow, ProcCompositeRedirectSubwindows, ProcCompositeUnredirectWindow, ProcCompositeUnredirectSubwindows, ProcCompositeCreateRegionFromBorderClip, ProcCompositeNameWindowPixmap, ProcCompositeGetOverlayWindow, ProcCompositeReleaseOverlayWindow,}; static int ProcCompositeDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < CompositeNumberRequests) return (*ProcCompositeVector[stuff->data]) (client); else return BadRequest; } static int _X_COLD SProcCompositeQueryVersion(ClientPtr client) { REQUEST(xCompositeQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeQueryVersionReq); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeRedirectWindow(ClientPtr client) { REQUEST(xCompositeRedirectWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeRedirectSubwindows(ClientPtr client) { REQUEST(xCompositeRedirectSubwindowsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeUnredirectWindow(ClientPtr client) { REQUEST(xCompositeUnredirectWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeUnredirectSubwindows(ClientPtr client) { REQUEST(xCompositeUnredirectSubwindowsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeCreateRegionFromBorderClip(ClientPtr client) { REQUEST(xCompositeCreateRegionFromBorderClipReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); swapl(&stuff->region); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeNameWindowPixmap(ClientPtr client) { REQUEST(xCompositeNameWindowPixmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); swapl(&stuff->window); swapl(&stuff->pixmap); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeGetOverlayWindow(ClientPtr client) { REQUEST(xCompositeGetOverlayWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int _X_COLD SProcCompositeReleaseOverlayWindow(ClientPtr client) { REQUEST(xCompositeReleaseOverlayWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); swapl(&stuff->window); return (*ProcCompositeVector[stuff->compositeReqType]) (client); } static int (*SProcCompositeVector[CompositeNumberRequests]) (ClientPtr) = { SProcCompositeQueryVersion, SProcCompositeRedirectWindow, SProcCompositeRedirectSubwindows, SProcCompositeUnredirectWindow, SProcCompositeUnredirectSubwindows, SProcCompositeCreateRegionFromBorderClip, SProcCompositeNameWindowPixmap, SProcCompositeGetOverlayWindow, SProcCompositeReleaseOverlayWindow, }; static int _X_COLD SProcCompositeDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < CompositeNumberRequests) return (*SProcCompositeVector[stuff->data]) (client); else return BadRequest; } /** @see GetDefaultBytes */ static SizeType coreGetWindowBytes; static void GetCompositeWindowBytes(void *value, XID id, ResourceSizePtr size) { WindowPtr window = value; /* call down */ coreGetWindowBytes(value, id, size); /* account for redirection */ if (window->redirectDraw != RedirectDrawNone) { SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); ResourceSizeRec pixmapSize = { 0, 0 }; ScreenPtr screen = window->drawable.pScreen; PixmapPtr pixmap = screen->GetWindowPixmap(window); pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } } void CompositeExtensionInit(void) { ExtensionEntry *extEntry; int s; /* Assume initialization is going to fail */ noCompositeExtension = TRUE; for (s = 0; s < screenInfo.numScreens; s++) { ScreenPtr pScreen = screenInfo.screens[s]; VisualPtr vis; /* Composite on 8bpp pseudocolor root windows appears to fail, so * just disable it on anything pseudocolor for safety. */ for (vis = pScreen->visuals; vis->vid != pScreen->rootVisual; vis++); if ((vis->class | DynamicClass) == PseudoColor) return; /* Ensure that Render is initialized, which is required for automatic * compositing. */ if (GetPictureScreenIfSet(pScreen) == NULL) return; } CompositeClientWindowType = CreateNewResourceType (FreeCompositeClientWindow, "CompositeClientWindow"); if (!CompositeClientWindowType) return; coreGetWindowBytes = GetResourceTypeSizeFunc(RT_WINDOW); SetResourceTypeSizeFunc(RT_WINDOW, GetCompositeWindowBytes); CompositeClientSubwindowsType = CreateNewResourceType (FreeCompositeClientSubwindows, "CompositeClientSubwindows"); if (!CompositeClientSubwindowsType) return; CompositeClientOverlayType = CreateNewResourceType (FreeCompositeClientOverlay, "CompositeClientOverlay"); if (!CompositeClientOverlayType) return; if (!dixRegisterPrivateKey(&CompositeClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(CompositeClientRec))) return; for (s = 0; s < screenInfo.numScreens; s++) if (!compScreenInit(screenInfo.screens[s])) return; extEntry = AddExtension(COMPOSITE_NAME, 0, 0, ProcCompositeDispatch, SProcCompositeDispatch, NULL, StandardMinorOpcode); if (!extEntry) return; CompositeReqCode = (CARD8) extEntry->base; /* Initialization succeeded */ noCompositeExtension = FALSE; } #ifdef PANORAMIX #include "panoramiXsrv.h" int (*PanoramiXSaveCompositeVector[CompositeNumberRequests]) (ClientPtr); static int PanoramiXCompositeRedirectWindow(ClientPtr client) { PanoramiXRes *win; int rc = 0, j; REQUEST(xCompositeRedirectWindowReq); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); if (rc != Success) break; } return rc; } static int PanoramiXCompositeRedirectSubwindows(ClientPtr client) { PanoramiXRes *win; int rc = 0, j; REQUEST(xCompositeRedirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); if (rc != Success) break; } return rc; } static int PanoramiXCompositeUnredirectWindow(ClientPtr client) { PanoramiXRes *win; int rc = 0, j; REQUEST(xCompositeUnredirectWindowReq); REQUEST_SIZE_MATCH(xCompositeUnredirectWindowReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); if (rc != Success) break; } return rc; } static int PanoramiXCompositeUnredirectSubwindows(ClientPtr client) { PanoramiXRes *win; int rc = 0, j; REQUEST(xCompositeUnredirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeUnredirectSubwindowsReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; rc = (*PanoramiXSaveCompositeVector[stuff->compositeReqType]) (client); if (rc != Success) break; } return rc; } static int PanoramiXCompositeNameWindowPixmap(ClientPtr client) { WindowPtr pWin; CompWindowPtr cw; PixmapPtr pPixmap; int rc; PanoramiXRes *win, *newPix; int i; REQUEST(xCompositeNameWindowPixmapReq); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } LEGAL_NEW_RESOURCE(stuff->pixmap, client); if (!(newPix = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; newPix->u.pix.shared = FALSE; panoramix_setup_ids(newPix, client, stuff->pixmap); FOR_NSCREENS(i) { rc = dixLookupResourceByType((void **) &pWin, win->info[i].id, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; free(newPix); return rc; } if (!pWin->viewable) { free(newPix); return BadMatch; } cw = GetCompWindow(pWin); if (!cw) { free(newPix); return BadMatch; } pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); if (!pPixmap) { free(newPix); return BadMatch; } if (!AddResource(newPix->info[i].id, RT_PIXMAP, (void *) pPixmap)) return BadAlloc; ++pPixmap->refcnt; } if (!AddResource(stuff->pixmap, XRT_PIXMAP, (void *) newPix)) return BadAlloc; return Success; } static int PanoramiXCompositeGetOverlayWindow(ClientPtr client) { REQUEST(xCompositeGetOverlayWindowReq); xCompositeGetOverlayWindowReply rep; WindowPtr pWin; ScreenPtr pScreen; CompScreenPtr cs; CompOverlayClientPtr pOc; int rc; PanoramiXRes *win, *overlayWin = NULL; int i; REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } cs = GetCompScreen(screenInfo.screens[0]); if (!cs->pOverlayWin) { if (!(overlayWin = malloc(sizeof(PanoramiXRes)))) return BadAlloc; overlayWin->type = XRT_WINDOW; overlayWin->u.win.root = FALSE; } FOR_NSCREENS_BACKWARD(i) { rc = dixLookupResourceByType((void **) &pWin, win->info[i].id, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; free(overlayWin); return rc; } 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) { free(overlayWin); return BadAlloc; } /* * Make sure the overlay window exists */ cs = GetCompScreen(pScreen); if (cs->pOverlayWin == NULL) if (!compCreateOverlayWindow(pScreen)) { FreeResource(pOc->resource, RT_NONE); free(overlayWin); 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); free(overlayWin); return rc; } } if (overlayWin) { FOR_NSCREENS(i) { cs = GetCompScreen(screenInfo.screens[i]); overlayWin->info[i].id = cs->pOverlayWin->drawable.id; } AddResource(overlayWin->info[0].id, XRT_WINDOW, overlayWin); } cs = GetCompScreen(screenInfo.screens[0]); rep = (xCompositeGetOverlayWindowReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .overlayWin = cs->pOverlayWin->drawable.id }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.overlayWin); } WriteToClient(client, sz_xCompositeGetOverlayWindowReply, &rep); return Success; } static int PanoramiXCompositeReleaseOverlayWindow(ClientPtr client) { REQUEST(xCompositeReleaseOverlayWindowReq); WindowPtr pWin; CompOverlayClientPtr pOc; PanoramiXRes *win; int i, rc; REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); if ((rc = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } FOR_NSCREENS_BACKWARD(i) { if ((rc = dixLookupResourceByType((void **) &pWin, win->info[i].id, XRT_WINDOW, client, DixUnknownAccess))) { client->errorValue = stuff->window; return rc; } /* * Has client queried a reference to the overlay window * on this screen? If not, generate an error. */ pOc = compFindOverlayClient(pWin->drawable.pScreen, client); if (pOc == NULL) return BadMatch; /* The delete function will free the client structure */ FreeResource(pOc->resource, RT_NONE); } return Success; } void PanoramiXCompositeInit(void) { int i; for (i = 0; i < CompositeNumberRequests; i++) PanoramiXSaveCompositeVector[i] = ProcCompositeVector[i]; /* * Stuff in Xinerama aware request processing hooks */ ProcCompositeVector[X_CompositeRedirectWindow] = PanoramiXCompositeRedirectWindow; ProcCompositeVector[X_CompositeRedirectSubwindows] = PanoramiXCompositeRedirectSubwindows; ProcCompositeVector[X_CompositeUnredirectWindow] = PanoramiXCompositeUnredirectWindow; ProcCompositeVector[X_CompositeUnredirectSubwindows] = PanoramiXCompositeUnredirectSubwindows; ProcCompositeVector[X_CompositeNameWindowPixmap] = PanoramiXCompositeNameWindowPixmap; ProcCompositeVector[X_CompositeGetOverlayWindow] = PanoramiXCompositeGetOverlayWindow; ProcCompositeVector[X_CompositeReleaseOverlayWindow] = PanoramiXCompositeReleaseOverlayWindow; } void PanoramiXCompositeReset(void) { int i; for (i = 0; i < CompositeNumberRequests; i++) ProcCompositeVector[i] = PanoramiXSaveCompositeVector[i]; } #endif xorg-server-21.1.16/composite/compint.h0000644000175000017500000002144114757411105013461 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #ifndef _COMPINT_H_ #define _COMPINT_H_ #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "input.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "dixevents.h" #include "globals.h" #include "picturestr.h" #include "extnsionst.h" #include "privates.h" #include "mi.h" #include "damage.h" #include "damageextint.h" #include "xfixes.h" #include #include "compositeext.h" #include /* * enable this for debugging #define COMPOSITE_DEBUG */ typedef struct _CompClientWindow { struct _CompClientWindow *next; XID id; int update; } CompClientWindowRec, *CompClientWindowPtr; typedef struct _CompWindow { RegionRec borderClip; DamagePtr damage; /* for automatic update mode */ Bool damageRegistered; Bool damaged; int update; CompClientWindowPtr clients; int oldx; int oldy; PixmapPtr pOldPixmap; int borderClipX, borderClipY; } CompWindowRec, *CompWindowPtr; #define COMP_ORIGIN_INVALID 0x80000000 typedef struct _CompSubwindows { int update; CompClientWindowPtr clients; } CompSubwindowsRec, *CompSubwindowsPtr; #ifndef COMP_INCLUDE_RGB24_VISUAL #define COMP_INCLUDE_RGB24_VISUAL 0 #endif typedef struct _CompOverlayClientRec *CompOverlayClientPtr; typedef struct _CompOverlayClientRec { CompOverlayClientPtr pNext; ClientPtr pClient; ScreenPtr pScreen; XID resource; } CompOverlayClientRec; typedef struct _CompImplicitRedirectException { XID parentVisual; XID winVisual; } CompImplicitRedirectException; typedef struct _CompScreen { PositionWindowProcPtr PositionWindow; CopyWindowProcPtr CopyWindow; CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; ClipNotifyProcPtr ClipNotify; /* * Called from ConfigureWindow, these * three track changes to the offscreen storage * geometry */ ConfigNotifyProcPtr ConfigNotify; MoveWindowProcPtr MoveWindow; ResizeWindowProcPtr ResizeWindow; ChangeBorderWidthProcPtr ChangeBorderWidth; /* * Reparenting has an effect on Subwindows redirect */ ReparentWindowProcPtr ReparentWindow; /* * Colormaps for new visuals better not get installed */ InstallColormapProcPtr InstallColormap; /* * Fake backing store via automatic redirection */ ChangeWindowAttributesProcPtr ChangeWindowAttributes; Bool pendingScreenUpdate; CloseScreenProcPtr CloseScreen; int numAlternateVisuals; VisualID *alternateVisuals; int numImplicitRedirectExceptions; CompImplicitRedirectException *implicitRedirectExceptions; WindowPtr pOverlayWin; Window overlayWid; CompOverlayClientPtr pOverlayClients; SourceValidateProcPtr SourceValidate; } CompScreenRec, *CompScreenPtr; extern DevPrivateKeyRec CompScreenPrivateKeyRec; #define CompScreenPrivateKey (&CompScreenPrivateKeyRec) extern DevPrivateKeyRec CompWindowPrivateKeyRec; #define CompWindowPrivateKey (&CompWindowPrivateKeyRec) extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec; #define CompSubwindowsPrivateKey (&CompSubwindowsPrivateKeyRec) #define GetCompScreen(s) ((CompScreenPtr) \ dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey)) #define GetCompWindow(w) ((CompWindowPtr) \ dixLookupPrivate(&(w)->devPrivates, CompWindowPrivateKey)) #define GetCompSubwindows(w) ((CompSubwindowsPtr) \ dixLookupPrivate(&(w)->devPrivates, CompSubwindowsPrivateKey)) extern RESTYPE CompositeClientSubwindowsType; extern RESTYPE CompositeClientOverlayType; /* * compalloc.c */ Bool compRedirectWindow(ClientPtr pClient, WindowPtr pWin, int update); void compFreeClientWindow(WindowPtr pWin, XID id); int compUnredirectWindow(ClientPtr pClient, WindowPtr pWin, int update); int compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update); void compFreeClientSubwindows(WindowPtr pWin, XID id); int compUnredirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update); int compRedirectOneSubwindow(WindowPtr pParent, WindowPtr pWin); int compUnredirectOneSubwindow(WindowPtr pParent, WindowPtr pWin); Bool compAllocPixmap(WindowPtr pWin); void compSetParentPixmap(WindowPtr pWin); void compRestoreWindow(WindowPtr pWin, PixmapPtr pPixmap); Bool compReallocPixmap(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, int bw); void compMarkAncestors(WindowPtr pWin); /* * compinit.c */ 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 */ #ifdef COMPOSITE_DEBUG void compCheckTree(ScreenPtr pScreen); #else #define compCheckTree(s) #endif void compSetPixmap(WindowPtr pWin, PixmapPtr pPixmap, int bw); Bool compCheckRedirect(WindowPtr pWin); Bool compPositionWindow(WindowPtr pWin, int x, int y); Bool compRealizeWindow(WindowPtr pWin); Bool compUnrealizeWindow(WindowPtr pWin); void compClipNotify(WindowPtr pWin, int dx, int dy); void compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind); void compResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); void compChangeBorderWidth(WindowPtr pWin, unsigned int border_width); void compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); Bool compCreateWindow(WindowPtr pWin); Bool compDestroyWindow(WindowPtr pWin); void compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion); RegionPtr compGetRedirectBorderClip(WindowPtr pWin); void compCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); void compPaintChildrenToWindow(WindowPtr pWin); WindowPtr CompositeRealChildHead(WindowPtr pWin); int DeleteWindowNoInputDevices(void *value, XID wid); int compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw, WindowPtr pSib); void PanoramiXCompositeInit(void); void PanoramiXCompositeReset(void); #endif /* _COMPINT_H_ */ xorg-server-21.1.16/composite/compinit.c0000644000175000017500000003235214757411105013630 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #include "compint.h" #include "compositeext.h" DevPrivateKeyRec CompScreenPrivateKeyRec; DevPrivateKeyRec CompWindowPrivateKeyRec; DevPrivateKeyRec CompSubwindowsPrivateKeyRec; static Bool compCloseScreen(ScreenPtr pScreen) { CompScreenPtr cs = GetCompScreen(pScreen); Bool ret; free(cs->alternateVisuals); pScreen->CloseScreen = cs->CloseScreen; pScreen->InstallColormap = cs->InstallColormap; pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; pScreen->ReparentWindow = cs->ReparentWindow; pScreen->ConfigNotify = cs->ConfigNotify; pScreen->MoveWindow = cs->MoveWindow; pScreen->ResizeWindow = cs->ResizeWindow; pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; pScreen->ClipNotify = cs->ClipNotify; pScreen->UnrealizeWindow = cs->UnrealizeWindow; pScreen->RealizeWindow = cs->RealizeWindow; pScreen->DestroyWindow = cs->DestroyWindow; pScreen->CreateWindow = cs->CreateWindow; pScreen->CopyWindow = cs->CopyWindow; pScreen->PositionWindow = cs->PositionWindow; pScreen->SourceValidate = cs->SourceValidate; free(cs); dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); ret = (*pScreen->CloseScreen) (pScreen); return ret; } static void compInstallColormap(ColormapPtr pColormap) { VisualPtr pVisual = pColormap->pVisual; ScreenPtr pScreen = pColormap->pScreen; CompScreenPtr cs = GetCompScreen(pScreen); int a; for (a = 0; a < cs->numAlternateVisuals; a++) if (pVisual->vid == cs->alternateVisuals[a]) return; pScreen->InstallColormap = cs->InstallColormap; (*pScreen->InstallColormap) (pColormap); cs->InstallColormap = pScreen->InstallColormap; pScreen->InstallColormap = compInstallColormap; } static void compCheckBackingStore(WindowPtr pWin) { if (pWin->backingStore != NotUseful) { compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); } else { compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); } } /* Fake backing store via automatic redirection */ static Bool compChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret; pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; ret = pScreen->ChangeWindowAttributes(pWin, mask); if (ret && (mask & CWBackingStore) && pScreen->backingStoreSupport != NotUseful) compCheckBackingStore(pWin); pScreen->ChangeWindowAttributes = compChangeWindowAttributes; return ret; } static void compSourceValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; CompScreenPtr cs = GetCompScreen(pScreen); pScreen->SourceValidate = cs->SourceValidate; if (pDrawable->type == DRAWABLE_WINDOW && subWindowMode == IncludeInferiors) compPaintChildrenToWindow((WindowPtr) pDrawable); (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode); cs->SourceValidate = pScreen->SourceValidate; pScreen->SourceValidate = compSourceValidate; } /* * Add alternate visuals -- always expose an ARGB32 and RGB24 visual */ static DepthPtr compFindVisuallessDepth(ScreenPtr pScreen, int d) { int i; for (i = 0; i < pScreen->numDepths; i++) { DepthPtr depth = &pScreen->allowedDepths[i]; if (depth->depth == d) { /* * Make sure it doesn't have visuals already */ if (depth->numVids) return 0; /* * looks fine */ return depth; } } /* * If there isn't one, then it's gonna be hard to have * an associated visual */ return 0; } /* * Add a list of visual IDs to the list of visuals to implicitly redirect. */ static Bool compRegisterAlternateVisuals(CompScreenPtr cs, VisualID * vids, int nVisuals) { VisualID *p; p = reallocarray(cs->alternateVisuals, cs->numAlternateVisuals + nVisuals, sizeof(VisualID)); if (p == NULL) return FALSE; memcpy(&p[cs->numAlternateVisuals], vids, sizeof(VisualID) * nVisuals); cs->alternateVisuals = p; cs->numAlternateVisuals += nVisuals; return TRUE; } Bool CompositeRegisterAlternateVisuals(ScreenPtr pScreen, VisualID * vids, int nVisuals) { CompScreenPtr cs = GetCompScreen(pScreen); return compRegisterAlternateVisuals(cs, vids, nVisuals); } Bool CompositeRegisterImplicitRedirectionException(ScreenPtr pScreen, VisualID parentVisual, VisualID winVisual) { CompScreenPtr cs = GetCompScreen(pScreen); CompImplicitRedirectException *p; p = reallocarray(cs->implicitRedirectExceptions, cs->numImplicitRedirectExceptions + 1, sizeof(p[0])); if (p == NULL) return FALSE; p[cs->numImplicitRedirectExceptions].parentVisual = parentVisual; p[cs->numImplicitRedirectExceptions].winVisual = winVisual; cs->implicitRedirectExceptions = p; cs->numImplicitRedirectExceptions++; return TRUE; } typedef struct _alternateVisual { int depth; CARD32 format; } CompAlternateVisual; static CompAlternateVisual altVisuals[] = { #if COMP_INCLUDE_RGB24_VISUAL {24, PICT_r8g8b8}, #endif {32, PICT_a8r8g8b8}, }; static Bool compAddAlternateVisual(ScreenPtr pScreen, CompScreenPtr cs, CompAlternateVisual * alt) { VisualPtr visual; DepthPtr depth; PictFormatPtr pPictFormat; unsigned long alphaMask; /* * The ARGB32 visual is always available. Other alternate depth visuals * are only provided if their depth is less than the root window depth. * There's no deep reason for this. */ if (alt->depth >= pScreen->rootDepth && alt->depth != 32) return FALSE; depth = compFindVisuallessDepth(pScreen, alt->depth); if (!depth) /* alt->depth doesn't exist or already has alternate visuals. */ return TRUE; pPictFormat = PictureMatchFormat(pScreen, alt->depth, alt->format); if (!pPictFormat) return FALSE; if (ResizeVisualArray(pScreen, 1, depth) == FALSE) { return FALSE; } visual = pScreen->visuals + (pScreen->numVisuals - 1); /* the new one */ /* Initialize the visual */ visual->bitsPerRGBValue = 8; if (PICT_FORMAT_TYPE(alt->format) == PICT_TYPE_COLOR) { visual->class = PseudoColor; visual->nplanes = PICT_FORMAT_BPP(alt->format); visual->ColormapEntries = 1 << visual->nplanes; } else { DirectFormatRec *direct = &pPictFormat->direct; visual->class = TrueColor; visual->redMask = ((unsigned long) direct->redMask) << direct->red; visual->greenMask = ((unsigned long) direct->greenMask) << direct->green; visual->blueMask = ((unsigned long) direct->blueMask) << direct->blue; alphaMask = ((unsigned long) direct->alphaMask) << direct->alpha; visual->offsetRed = direct->red; visual->offsetGreen = direct->green; visual->offsetBlue = direct->blue; /* * Include A bits in this (unlike GLX which includes only RGB) * This lets DIX compute suitable masks for colormap allocations */ visual->nplanes = Ones(visual->redMask | visual->greenMask | visual->blueMask | alphaMask); /* find widest component */ visual->ColormapEntries = (1 << max(Ones(visual->redMask), max(Ones(visual->greenMask), Ones(visual->blueMask)))); } /* remember the visual ID to detect auto-update windows */ compRegisterAlternateVisuals(cs, &visual->vid, 1); return TRUE; } static Bool compAddAlternateVisuals(ScreenPtr pScreen, CompScreenPtr cs) { int alt, ret = 0; for (alt = 0; alt < ARRAY_SIZE(altVisuals); alt++) ret |= compAddAlternateVisual(pScreen, cs, altVisuals + alt); return ! !ret; } Bool compScreenInit(ScreenPtr pScreen) { CompScreenPtr cs; if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (GetCompScreen(pScreen)) return TRUE; cs = (CompScreenPtr) malloc(sizeof(CompScreenRec)); if (!cs) return FALSE; cs->overlayWid = FakeClientID(0); cs->pOverlayWin = NULL; cs->pOverlayClients = NULL; cs->pendingScreenUpdate = FALSE; cs->numAlternateVisuals = 0; cs->alternateVisuals = NULL; cs->numImplicitRedirectExceptions = 0; cs->implicitRedirectExceptions = NULL; if (!compAddAlternateVisuals(pScreen, cs)) { free(cs); return FALSE; } if (!disableBackingStore) pScreen->backingStoreSupport = WhenMapped; cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; cs->CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = compCopyWindow; cs->CreateWindow = pScreen->CreateWindow; pScreen->CreateWindow = compCreateWindow; cs->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = compDestroyWindow; cs->RealizeWindow = pScreen->RealizeWindow; pScreen->RealizeWindow = compRealizeWindow; cs->UnrealizeWindow = pScreen->UnrealizeWindow; pScreen->UnrealizeWindow = compUnrealizeWindow; cs->ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = compClipNotify; cs->ConfigNotify = pScreen->ConfigNotify; pScreen->ConfigNotify = compConfigNotify; cs->MoveWindow = pScreen->MoveWindow; pScreen->MoveWindow = compMoveWindow; cs->ResizeWindow = pScreen->ResizeWindow; pScreen->ResizeWindow = compResizeWindow; cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; pScreen->ChangeBorderWidth = compChangeBorderWidth; cs->ReparentWindow = pScreen->ReparentWindow; pScreen->ReparentWindow = compReparentWindow; cs->InstallColormap = pScreen->InstallColormap; pScreen->InstallColormap = compInstallColormap; cs->ChangeWindowAttributes = pScreen->ChangeWindowAttributes; pScreen->ChangeWindowAttributes = compChangeWindowAttributes; cs->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = compCloseScreen; cs->SourceValidate = pScreen->SourceValidate; pScreen->SourceValidate = compSourceValidate; dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, cs); RegisterRealChildHeadProc(CompositeRealChildHead); return TRUE; } xorg-server-21.1.16/composite/compoverlay.c0000644000175000017500000001255714757411105014353 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #include "compint.h" #include "xace.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #endif /* * 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; free(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) malloc(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, (void *) pOc)) return NULL; return pOc; } /* * Create the overlay window and map it */ Bool compCreateOverlayWindow(ScreenPtr pScreen) { CompScreenPtr cs = GetCompScreen(pScreen); WindowPtr pRoot = pScreen->root; WindowPtr pWin; XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */ int result; int w = pScreen->width; int h = pScreen->height; int x = 0, y = 0; #ifdef PANORAMIX if (!noPanoramiXExtension) { x = -pScreen->x; y = -pScreen->y; w = PanoramiXPixWidth; h = PanoramiXPixHeight; } #endif pWin = cs->pOverlayWin = CreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0, InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0], pRoot->drawable.depth, serverClient, pScreen->rootVisual, &result); if (pWin == NULL) return FALSE; if (!AddResource(pWin->drawable.id, RT_WINDOW, (void *) 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); } xorg-server-21.1.16/composite/compwindow.c0000644000175000017500000006134214757411105014175 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * 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 #endif #include "compint.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #endif #ifdef COMPOSITE_DEBUG static int compCheckWindow(WindowPtr pWin, void *data) { ScreenPtr pScreen = pWin->drawable.pScreen; 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); assert(pWinPixmap == pScreenPixmap); } else if (pWin->redirectDraw != RedirectDrawNone) { assert(pWinPixmap != pParentPixmap); assert(pWinPixmap != pScreenPixmap); } else { assert(pWinPixmap == pParentPixmap); } assert(0 < pWinPixmap->refcnt) assert(pWinPixmap->refcnt < 3); assert(0 < pScreenPixmap->refcnt); assert(pScreenPixmap->refcnt < 3); if (pParentPixmap) { assert(0 <= pParentPixmap->refcnt); assert(pParentPixmap->refcnt < 3); } return WT_WALKCHILDREN; } void compCheckTree(ScreenPtr pScreen) { WalkTree(pScreen, compCheckWindow, 0); } #endif typedef struct _compPixmapVisit { WindowPtr pWindow; PixmapPtr pPixmap; int bw; } CompPixmapVisitRec, *CompPixmapVisitPtr; static Bool compRepaintBorder(ClientPtr pClient, void *closure) { WindowPtr pWindow; int rc = dixLookupWindow(&pWindow, (XID) (intptr_t) closure, pClient, DixWriteAccess); if (rc == Success) { RegionRec exposed; RegionNull(&exposed); RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize); pWindow->drawable.pScreen->PaintWindow(pWindow, &exposed, PW_BORDER); RegionUninit(&exposed); } return TRUE; } static int compSetPixmapVisitWindow(WindowPtr pWindow, void *data) { CompPixmapVisitPtr pVisit = (CompPixmapVisitPtr) data; ScreenPtr pScreen = pWindow->drawable.pScreen; if (pWindow != pVisit->pWindow && pWindow->redirectDraw != RedirectDrawNone) return WT_DONTWALKCHILDREN; (*pScreen->SetWindowPixmap) (pWindow, pVisit->pPixmap); /* * Recompute winSize and borderSize. This is duplicate effort * when resizing pixmaps, but necessary when changing redirection. * Might be nice to fix this. */ SetWinSize(pWindow); SetBorderSize(pWindow); if (pVisit->bw) QueueWorkProc(compRepaintBorder, serverClient, (void *) (intptr_t) pWindow->drawable.id); return WT_WALKCHILDREN; } void compSetPixmap(WindowPtr pWindow, PixmapPtr pPixmap, int bw) { CompPixmapVisitRec visitRec; visitRec.pWindow = pWindow; visitRec.pPixmap = pPixmap; visitRec.bw = bw; TraverseTree(pWindow, compSetPixmapVisitWindow, (void *) &visitRec); compCheckTree(pWindow->drawable.pScreen); } Bool compCheckRedirect(WindowPtr pWin) { CompWindowPtr cw = GetCompWindow(pWin); CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen); Bool should; should = pWin->realized && (pWin->drawable.class != InputOnly) && (cw != NULL) && (pWin->parent != NULL); /* Never redirect the overlay window */ if (cs->pOverlayWin != NULL) { if (pWin == cs->pOverlayWin) { should = FALSE; } } if (should != (pWin->redirectDraw != RedirectDrawNone)) { if (should) return compAllocPixmap(pWin); else { ScreenPtr pScreen = pWin->drawable.pScreen; PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); compSetParentPixmap(pWin); compRestoreWindow(pWin, pPixmap); (*pScreen->DestroyPixmap) (pPixmap); } } else if (should) { if (cw->update == CompositeRedirectAutomatic) pWin->redirectDraw = RedirectDrawAutomatic; else pWin->redirectDraw = RedirectDrawManual; } return TRUE; } static int updateOverlayWindow(ScreenPtr pScreen) { CompScreenPtr cs; WindowPtr pWin; /* overlay window */ XID vlist[2]; int w = pScreen->width; int h = pScreen->height; #ifdef PANORAMIX if (!noPanoramiXExtension) { w = PanoramiXPixWidth; h = PanoramiXPixHeight; } #endif cs = GetCompScreen(pScreen); if ((pWin = cs->pOverlayWin) != NULL) { if ((pWin->drawable.width == w) && (pWin->drawable.height == h)) return Success; /* Let's resize the overlay window. */ vlist[0] = w; vlist[1] = h; return ConfigureWindow(pWin, CWWidth | CWHeight, vlist, wClient(pWin)); } /* Let's be on the safe side and not assume an overlay window is always allocated. */ return Success; } Bool compPositionWindow(WindowPtr pWin, int x, int y) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret = TRUE; pScreen->PositionWindow = cs->PositionWindow; /* * "Shouldn't need this as all possible places should be wrapped * compCheckRedirect (pWin); */ #ifdef COMPOSITE_DEBUG if ((pWin->redirectDraw != RedirectDrawNone) != (pWin->viewable && (GetCompWindow(pWin) != NULL))) OsAbort(); #endif if (pWin->redirectDraw != RedirectDrawNone) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); int bw = wBorderWidth(pWin); int nx = pWin->drawable.x - bw; int ny = pWin->drawable.y - bw; if (pPixmap->screen_x != nx || pPixmap->screen_y != ny) { pPixmap->screen_x = nx; pPixmap->screen_y = ny; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; } } if (!(*pScreen->PositionWindow) (pWin, x, y)) ret = FALSE; cs->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = compPositionWindow; compCheckTree(pWin->drawable.pScreen); if (updateOverlayWindow(pScreen) != Success) ret = FALSE; return ret; } Bool compRealizeWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret = TRUE; pScreen->RealizeWindow = cs->RealizeWindow; compCheckRedirect(pWin); if (!(*pScreen->RealizeWindow) (pWin)) ret = FALSE; cs->RealizeWindow = pScreen->RealizeWindow; pScreen->RealizeWindow = compRealizeWindow; compCheckTree(pWin->drawable.pScreen); return ret; } Bool compUnrealizeWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret = TRUE; pScreen->UnrealizeWindow = cs->UnrealizeWindow; compCheckRedirect(pWin); if (!(*pScreen->UnrealizeWindow) (pWin)) ret = FALSE; cs->UnrealizeWindow = pScreen->UnrealizeWindow; pScreen->UnrealizeWindow = compUnrealizeWindow; compCheckTree(pWin->drawable.pScreen); return ret; } /* * Called after the borderClip for the window has settled down * We use this to make sure our extra borderClip has the right origin */ void 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 || cw->borderClipY != pWin->drawable.y) { RegionTranslate(&cw->borderClip, pWin->drawable.x - cw->borderClipX, pWin->drawable.y - cw->borderClipY); cw->borderClipX = pWin->drawable.x; cw->borderClipY = pWin->drawable.y; } } if (cs->ClipNotify) { pScreen->ClipNotify = cs->ClipNotify; (*pScreen->ClipNotify) (pWin, dx, dy); cs->ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = compClipNotify; } } Bool compIsAlternateVisual(ScreenPtr pScreen, XID visual) { CompScreenPtr cs = GetCompScreen(pScreen); int i; for (i = 0; cs && i < cs->numAlternateVisuals; i++) if (cs->alternateVisuals[i] == visual) return TRUE; return FALSE; } static Bool compIsImplicitRedirectException(ScreenPtr pScreen, XID parentVisual, XID winVisual) { CompScreenPtr cs = GetCompScreen(pScreen); int i; for (i = 0; i < cs->numImplicitRedirectExceptions; i++) if (cs->implicitRedirectExceptions[i].parentVisual == parentVisual && cs->implicitRedirectExceptions[i].winVisual == winVisual) return TRUE; return FALSE; } static Bool compImplicitRedirect(WindowPtr pWin, WindowPtr pParent) { if (pParent) { ScreenPtr pScreen = pWin->drawable.pScreen; XID winVisual = wVisual(pWin); XID parentVisual = wVisual(pParent); if (compIsImplicitRedirectException(pScreen, parentVisual, winVisual)) return FALSE; if (winVisual != parentVisual && (compIsAlternateVisual(pScreen, winVisual) || compIsAlternateVisual(pScreen, parentVisual))) return TRUE; } return FALSE; } static void compFreeOldPixmap(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; if (pWin->redirectDraw != RedirectDrawNone) { CompWindowPtr cw = GetCompWindow(pWin); if (cw->pOldPixmap) { (*pScreen->DestroyPixmap) (cw->pOldPixmap); cw->pOldPixmap = NullPixmap; } } } void compMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); pScreen->MoveWindow = cs->MoveWindow; (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); cs->MoveWindow = pScreen->MoveWindow; pScreen->MoveWindow = compMoveWindow; compFreeOldPixmap(pWin); compCheckTree(pScreen); } void compResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); pScreen->ResizeWindow = cs->ResizeWindow; (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); cs->ResizeWindow = pScreen->ResizeWindow; pScreen->ResizeWindow = compResizeWindow; compFreeOldPixmap(pWin); compCheckTree(pWin->drawable.pScreen); } void compChangeBorderWidth(WindowPtr pWin, unsigned int bw) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; (*pScreen->ChangeBorderWidth) (pWin, bw); cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; pScreen->ChangeBorderWidth = compChangeBorderWidth; compFreeOldPixmap(pWin); compCheckTree(pWin->drawable.pScreen); } void compReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); CompWindowPtr cw; pScreen->ReparentWindow = cs->ReparentWindow; /* * Remove any implicit redirect due to synthesized visual */ if (compImplicitRedirect(pWin, pPriorParent)) compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); /* * Handle subwindows redirection */ compUnredirectOneSubwindow(pPriorParent, pWin); compRedirectOneSubwindow(pWin->parent, pWin); /* * Add any implicit redirect due to synthesized visual */ 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 */ if (pWin->parent && pWin->redirectDraw == RedirectDrawNone) compSetPixmap(pWin, (*pScreen->GetWindowPixmap) (pWin->parent), pWin->borderWidth); /* * Call down to next function */ if (pScreen->ReparentWindow) (*pScreen->ReparentWindow) (pWin, pPriorParent); cs->ReparentWindow = pScreen->ReparentWindow; pScreen->ReparentWindow = compReparentWindow; cw = GetCompWindow(pWin); if (pWin->damagedDescendants || (cw && cw->damaged)) compMarkAncestors(pWin); compCheckTree(pWin->drawable.pScreen); } void compCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); int dx = 0, dy = 0; if (pWin->redirectDraw != RedirectDrawNone) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); CompWindowPtr cw = GetCompWindow(pWin); assert(cw->oldx != COMP_ORIGIN_INVALID); assert(cw->oldy != COMP_ORIGIN_INVALID); if (cw->pOldPixmap) { /* * Ok, the old bits are available in pOldPixmap and * need to be copied to pNewPixmap. */ RegionRec rgnDst; GCPtr pGC; dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; RegionTranslate(prgnSrc, -dx, -dy); RegionNull(&rgnDst); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); RegionTranslate(&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); if (pGC) { BoxPtr pBox = RegionRects(&rgnDst); int nBox = RegionNumRects(&rgnDst); ValidateGC(&pPixmap->drawable, pGC); while (nBox--) { (void) (*pGC->ops->CopyArea) (&cw->pOldPixmap->drawable, &pPixmap->drawable, pGC, pBox->x1 + dx, pBox->y1 + dy, pBox->x2 - pBox->x1, pBox->y2 - pBox->y1, pBox->x1, pBox->y1); pBox++; } FreeScratchGC(pGC); } RegionUninit(&rgnDst); return; } dx = pPixmap->screen_x - cw->oldx; dy = pPixmap->screen_y - cw->oldy; ptOldOrg.x += dx; ptOldOrg.y += dy; } pScreen->CopyWindow = cs->CopyWindow; if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { if (dx || dy) RegionTranslate(prgnSrc, dx, dy); (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); if (dx || dy) RegionTranslate(prgnSrc, -dx, -dy); } else { ptOldOrg.x -= dx; ptOldOrg.y -= dy; RegionTranslate(prgnSrc, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); DamageDamageRegion(&pWin->drawable, prgnSrc); } cs->CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = compCopyWindow; compCheckTree(pWin->drawable.pScreen); } Bool compCreateWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret; pScreen->CreateWindow = cs->CreateWindow; ret = (*pScreen->CreateWindow) (pWin); if (pWin->parent && ret) { CompSubwindowsPtr csw = GetCompSubwindows(pWin->parent); CompClientWindowPtr ccw; PixmapPtr parent_pixmap = (*pScreen->GetWindowPixmap)(pWin->parent); PixmapPtr window_pixmap = (*pScreen->GetWindowPixmap)(pWin); if (window_pixmap != parent_pixmap) (*pScreen->SetWindowPixmap) (pWin, parent_pixmap); if (csw) for (ccw = csw->clients; ccw; ccw = ccw->next) compRedirectWindow(clients[CLIENT_ID(ccw->id)], pWin, ccw->update); if (compImplicitRedirect(pWin, pWin->parent)) compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); } cs->CreateWindow = pScreen->CreateWindow; pScreen->CreateWindow = compCreateWindow; compCheckTree(pWin->drawable.pScreen); return ret; } Bool compDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); CompWindowPtr cw; CompSubwindowsPtr csw; Bool ret; pScreen->DestroyWindow = cs->DestroyWindow; while ((cw = GetCompWindow(pWin))) FreeResource(cw->clients->id, RT_NONE); while ((csw = GetCompSubwindows(pWin))) FreeResource(csw->clients->id, RT_NONE); if (pWin->redirectDraw != RedirectDrawNone) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); compSetParentPixmap(pWin); (*pScreen->DestroyPixmap) (pPixmap); } ret = (*pScreen->DestroyWindow) (pWin); cs->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = compDestroyWindow; /* Did we just destroy the overlay window? */ if (pWin == cs->pOverlayWin) cs->pOverlayWin = NULL; /* compCheckTree (pWin->drawable.pScreen); can't check -- tree isn't good*/ return ret; } void compSetRedirectBorderClip(WindowPtr pWin, RegionPtr pRegion) { CompWindowPtr cw = GetCompWindow(pWin); RegionRec damage; RegionNull(&damage); /* * Align old border clip with new border clip */ RegionTranslate(&cw->borderClip, pWin->drawable.x - cw->borderClipX, pWin->drawable.y - cw->borderClipY); /* * Compute newly visible portion of window for repaint */ RegionSubtract(&damage, pRegion, &cw->borderClip); /* * Report that as damaged so it will be redrawn */ DamageDamageRegion(&pWin->drawable, &damage); RegionUninit(&damage); /* * Save the new border clip region */ RegionCopy(&cw->borderClip, pRegion); cw->borderClipX = pWin->drawable.x; cw->borderClipY = pWin->drawable.y; } RegionPtr compGetRedirectBorderClip(WindowPtr pWin) { CompWindowPtr cw = GetCompWindow(pWin); return &cw->borderClip; } static void compWindowUpdateAutomatic(WindowPtr pWin) { CompWindowPtr cw = GetCompWindow(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pParent = pWin->parent; PixmapPtr pSrcPixmap = (*pScreen->GetWindowPixmap) (pWin); PictFormatPtr pSrcFormat = PictureWindowFormat(pWin); PictFormatPtr pDstFormat = PictureWindowFormat(pWin->parent); int error; RegionPtr pRegion = DamageRegion(cw->damage); PicturePtr pSrcPicture = CreatePicture(0, &pSrcPixmap->drawable, pSrcFormat, 0, 0, serverClient, &error); XID subwindowMode = IncludeInferiors; PicturePtr pDstPicture = CreatePicture(0, &pParent->drawable, pDstFormat, CPSubwindowMode, &subwindowMode, serverClient, &error); /* * First move the region from window to screen coordinates */ RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y); /* * Clip against the "real" border clip */ RegionIntersect(pRegion, pRegion, &cw->borderClip); /* * Now translate from screen to dest coordinates */ RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y); /* * Clip the picture */ SetPictureClipRegion(pDstPicture, 0, 0, pRegion); /* * And paint */ CompositePicture(PictOpSrc, pSrcPicture, 0, pDstPicture, 0, 0, /* src_x, src_y */ 0, 0, /* msk_x, msk_y */ pSrcPixmap->screen_x - pParent->drawable.x, pSrcPixmap->screen_y - pParent->drawable.y, pSrcPixmap->drawable.width, pSrcPixmap->drawable.height); FreePicture(pSrcPicture, 0); FreePicture(pDstPicture, 0); /* * Empty the damage region. This has the nice effect of * rendering the translations above harmless */ DamageEmpty(cw->damage); } static void compPaintWindowToParent(WindowPtr pWin) { compPaintChildrenToWindow(pWin); if (pWin->redirectDraw != RedirectDrawNone) { CompWindowPtr cw = GetCompWindow(pWin); if (cw->damaged) { compWindowUpdateAutomatic(pWin); cw->damaged = FALSE; } } } void compPaintChildrenToWindow(WindowPtr pWin) { WindowPtr pChild; if (!pWin->damagedDescendants) return; for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) compPaintWindowToParent(pChild); pWin->damagedDescendants = FALSE; } WindowPtr CompositeRealChildHead(WindowPtr pWin) { WindowPtr pChild, pChildBefore; CompScreenPtr cs; if (!pWin->parent && (screenIsSaved == SCREEN_SAVER_ON) && (HasSaverWindow(pWin->drawable.pScreen))) { /* First child is the screen saver; see if next child is the overlay */ pChildBefore = pWin->firstChild; pChild = pChildBefore->nextSib; } else { pChildBefore = NullWindow; pChild = pWin->firstChild; } if (!pChild) { return NullWindow; } cs = GetCompScreen(pWin->drawable.pScreen); if (pChild == cs->pOverlayWin) { return pChild; } else { return pChildBefore; } } int compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw, WindowPtr pSib) { ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen(pScreen); Bool ret = 0; WindowPtr pParent = pWin->parent; int draw_x, draw_y; Bool alloc_ret; if (cs->ConfigNotify) { pScreen->ConfigNotify = cs->ConfigNotify; ret = (*pScreen->ConfigNotify) (pWin, x, y, w, h, bw, pSib); cs->ConfigNotify = pScreen->ConfigNotify; pScreen->ConfigNotify = compConfigNotify; if (ret) return ret; } if (pWin->redirectDraw == RedirectDrawNone) return Success; compCheckTree(pScreen); draw_x = pParent->drawable.x + x + bw; draw_y = pParent->drawable.y + y + bw; alloc_ret = compReallocPixmap(pWin, draw_x, draw_y, w, h, bw); if (alloc_ret == FALSE) return BadAlloc; return Success; } xorg-server-21.1.16/config/0000755000175000017500000000000014757411134011162 5xorg-server-21.1.16/config/meson.build0000644000175000017500000000120214757411105013235 srcs_config = [ 'config.c', ] config_dep = [common_dep] if build_dbus srcs_config += 'dbus-core.c' config_dep += dbus_dep endif if build_hal srcs_config += 'hal.c' config_dep += hal_dep endif if build_udev srcs_config += 'udev.c' config_dep += udev_dep endif if host_machine.system() == 'openbsd' srcs_config += 'wscons.c' endif if build_xorg install_data('10-quirks.conf', install_dir: join_paths(get_option('datadir'), 'X11/xorg.conf.d')) endif libxserver_config = static_library('libxserver_config', srcs_config, include_directories: inc, dependencies: config_dep, ) xorg-server-21.1.16/config/Makefile.am0000644000175000017500000000135714757411105013142 AM_CFLAGS = $(DIX_CFLAGS) noinst_LTLIBRARIES = libconfig.la libconfig_la_SOURCES = config.c config-backends.h libconfig_la_LIBADD = if NEED_DBUS AM_CFLAGS += $(DBUS_CFLAGS) libconfig_la_SOURCES += dbus-core.c libconfig_la_LIBADD += $(DBUS_LIBS) endif if CONFIG_UDEV AM_CFLAGS += $(UDEV_CFLAGS) libconfig_la_SOURCES += udev.c libconfig_la_LIBADD += $(UDEV_LIBS) if XORG xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) xorgconfd_DATA = 10-quirks.conf endif else if CONFIG_HAL AM_CFLAGS += $(HAL_CFLAGS) libconfig_la_SOURCES += hal.c libconfig_la_LIBADD += $(HAL_LIBS) else if CONFIG_WSCONS libconfig_la_SOURCES += wscons.c endif # CONFIG_WSCONS endif # !CONFIG_HAL endif # !CONFIG_UDEV EXTRA_DIST = x11-input.fdi fdi2iclass.py 10-quirks.conf xorg-server-21.1.16/config/Makefile.in0000644000175000017500000007162714757411114013162 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @NEED_DBUS_TRUE@am__append_1 = $(DBUS_CFLAGS) @NEED_DBUS_TRUE@am__append_2 = dbus-core.c @NEED_DBUS_TRUE@am__append_3 = $(DBUS_LIBS) @CONFIG_UDEV_TRUE@am__append_4 = $(UDEV_CFLAGS) @CONFIG_UDEV_TRUE@am__append_5 = udev.c @CONFIG_UDEV_TRUE@am__append_6 = $(UDEV_LIBS) @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_7 = $(HAL_CFLAGS) @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_8 = hal.c @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__append_9 = $(HAL_LIBS) @CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__append_10 = wscons.c subdir = config ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @NEED_DBUS_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @CONFIG_UDEV_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__DEPENDENCIES_4 = \ @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@ $(am__DEPENDENCIES_1) libconfig_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) am__libconfig_la_SOURCES_DIST = config.c config-backends.h dbus-core.c \ udev.c hal.c wscons.c @NEED_DBUS_TRUE@am__objects_1 = dbus-core.lo @CONFIG_UDEV_TRUE@am__objects_2 = udev.lo @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@am__objects_3 = hal.lo @CONFIG_HAL_FALSE@@CONFIG_UDEV_FALSE@@CONFIG_WSCONS_TRUE@am__objects_4 = wscons.lo am_libconfig_la_OBJECTS = config.lo $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) libconfig_la_OBJECTS = $(am_libconfig_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/config.Plo ./$(DEPDIR)/dbus-core.Plo \ ./$(DEPDIR)/hal.Plo ./$(DEPDIR)/udev.Plo \ ./$(DEPDIR)/wscons.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libconfig_la_SOURCES) DIST_SOURCES = $(am__libconfig_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(xorgconfddir)" DATA = $(xorgconfd_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(DIX_CFLAGS) $(am__append_1) $(am__append_4) \ $(am__append_7) noinst_LTLIBRARIES = libconfig.la libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \ $(am__append_5) $(am__append_8) $(am__append_10) libconfig_la_LIBADD = $(am__append_3) $(am__append_6) $(am__append_9) @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfddir = $(datadir)/X11/$(XF86CONFIGDIR) @CONFIG_UDEV_TRUE@@XORG_TRUE@xorgconfd_DATA = 10-quirks.conf EXTRA_DIST = x11-input.fdi fdi2iclass.py 10-quirks.conf all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign config/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libconfig.la: $(libconfig_la_OBJECTS) $(libconfig_la_DEPENDENCIES) $(EXTRA_libconfig_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libconfig_la_OBJECTS) $(libconfig_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbus-core.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hal.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wscons.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-xorgconfdDATA: $(xorgconfd_DATA) @$(NORMAL_INSTALL) @list='$(xorgconfd_DATA)'; test -n "$(xorgconfddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(xorgconfddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(xorgconfddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xorgconfddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(xorgconfddir)" || exit $$?; \ done uninstall-xorgconfdDATA: @$(NORMAL_UNINSTALL) @list='$(xorgconfd_DATA)'; test -n "$(xorgconfddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(xorgconfddir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(xorgconfddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/config.Plo -rm -f ./$(DEPDIR)/dbus-core.Plo -rm -f ./$(DEPDIR)/hal.Plo -rm -f ./$(DEPDIR)/udev.Plo -rm -f ./$(DEPDIR)/wscons.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-xorgconfdDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/config.Plo -rm -f ./$(DEPDIR)/dbus-core.Plo -rm -f ./$(DEPDIR)/hal.Plo -rm -f ./$(DEPDIR)/udev.Plo -rm -f ./$(DEPDIR)/wscons.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-xorgconfdDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-xorgconfdDATA installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-xorgconfdDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/config/config.c0000644000175000017500000001010114757411105012502 /* * Copyright © 2006-2007 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "os.h" #include "inputstr.h" #include "hotplug.h" #include "config-backends.h" #include "systemd-logind.h" void config_pre_init(void) { #ifdef CONFIG_UDEV if (!config_udev_pre_init()) ErrorF("[config] failed to pre-init udev\n"); #endif } void config_init(void) { #ifdef CONFIG_UDEV if (!config_udev_init()) ErrorF("[config] failed to initialise udev\n"); #elif defined(CONFIG_HAL) if (!config_hal_init()) ErrorF("[config] failed to initialise HAL\n"); #elif defined(CONFIG_WSCONS) if (!config_wscons_init()) ErrorF("[config] failed to initialise wscons\n"); #endif } void config_fini(void) { #if defined(CONFIG_UDEV) config_udev_fini(); #elif defined(CONFIG_HAL) config_hal_fini(); #elif defined(CONFIG_WSCONS) config_wscons_fini(); #endif } void config_odev_probe(config_odev_probe_proc_ptr probe_callback) { #if defined(CONFIG_UDEV_KMS) config_udev_odev_probe(probe_callback); #endif } static void remove_device(const char *backend, DeviceIntPtr dev) { /* this only gets called for devices that have already been added */ LogMessage(X_INFO, "config/%s: removing device %s\n", backend, dev->name); /* Call PIE here so we don't try to dereference a device that's * already been removed. */ input_lock(); ProcessInputEvents(); DeleteInputDeviceRequest(dev); input_unlock(); } void remove_devices(const char *backend, const char *config_info) { DeviceIntPtr dev, next; for (dev = inputInfo.devices; dev; dev = next) { next = dev->next; if (dev->config_info && strcmp(dev->config_info, config_info) == 0) remove_device(backend, dev); } for (dev = inputInfo.off_devices; dev; dev = next) { next = dev->next; if (dev->config_info && strcmp(dev->config_info, config_info) == 0) remove_device(backend, dev); } RemoveInputDeviceTraces(config_info); } BOOL device_is_duplicate(const char *config_info) { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) return TRUE; } for (dev = inputInfo.off_devices; dev; dev = dev->next) { if (dev->config_info && (strcmp(dev->config_info, config_info) == 0)) return TRUE; } return FALSE; } struct OdevAttributes * config_odev_allocate_attributes(void) { struct OdevAttributes *attribs = xnfcalloc(1, sizeof (struct OdevAttributes)); attribs->fd = -1; return attribs; } void config_odev_free_attributes(struct OdevAttributes *attribs) { if (attribs->fd != -1) systemd_logind_release_fd(attribs->major, attribs->minor, attribs->fd); free(attribs->path); free(attribs->syspath); free(attribs->busid); free(attribs->driver); free(attribs); } xorg-server-21.1.16/config/config-backends.h0000644000175000017500000000336214757411105014272 /* * Copyright © 2006-2007 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "input.h" #include "list.h" void remove_devices(const char *backend, const char *config_info); BOOL device_is_duplicate(const char *config_info); #ifdef CONFIG_UDEV int config_udev_pre_init(void); int config_udev_init(void); void config_udev_fini(void); void config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback); #elif defined(CONFIG_HAL) int config_hal_init(void); void config_hal_fini(void); #elif defined(CONFIG_WSCONS) int config_wscons_init(void); void config_wscons_fini(void); #endif xorg-server-21.1.16/config/dbus-core.c0000644000175000017500000001517014757411105013133 /* * Copyright © 2006-2007 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "dix.h" #include "os.h" #include "dbus-core.h" /* How often to attempt reconnecting when we get booted off the bus. */ #define RECONNECT_DELAY (10 * 1000) /* in ms */ struct dbus_core_info { int fd; DBusConnection *connection; OsTimerPtr timer; struct dbus_core_hook *hooks; }; static struct dbus_core_info bus_info = { .fd = -1 }; static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, void *arg); static void socket_handler(int fd, int ready, void *data) { struct dbus_core_info *info = data; if (info->connection) { do { dbus_connection_read_write_dispatch(info->connection, 0); } while (info->connection && dbus_connection_get_is_connected(info->connection) && dbus_connection_get_dispatch_status(info->connection) == DBUS_DISPATCH_DATA_REMAINS); } } /** * Disconnect (if we haven't already been forcefully disconnected), clean up * after ourselves, and call all registered disconnect hooks. */ static void teardown(void) { struct dbus_core_hook *hook; if (bus_info.timer) { TimerFree(bus_info.timer); bus_info.timer = NULL; } /* We should really have pre-disconnect hooks and run them here, for * completeness. But then it gets awkward, given that you can't * guarantee that they'll be called ... */ if (bus_info.connection) dbus_connection_unref(bus_info.connection); if (bus_info.fd != -1) RemoveNotifyFd(bus_info.fd); bus_info.fd = -1; bus_info.connection = NULL; for (hook = bus_info.hooks; hook; hook = hook->next) { if (hook->disconnect) hook->disconnect(hook->data); } } /** * This is a filter, which only handles the disconnected signal, which * doesn't go to the normal message handling function. This takes * precedence over the message handling function, so have have to be * careful to ignore anything we don't want to deal with here. */ static DBusHandlerResult message_filter(DBusConnection * connection, DBusMessage * message, void *data) { /* If we get disconnected, then take everything down, and attempt to * reconnect immediately (assuming it's just a restart). The * connection isn't valid at this point, so throw it out immediately. */ if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, "Disconnected")) { DebugF("[dbus-core] disconnected from bus\n"); bus_info.connection = NULL; teardown(); if (bus_info.timer) TimerFree(bus_info.timer); bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); return DBUS_HANDLER_RESULT_HANDLED; } return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } /** * Attempt to connect to the system bus, and set a filter to deal with * disconnection (see message_filter above). * * @return 1 on success, 0 on failure. */ static int connect_to_bus(void) { DBusError error; struct dbus_core_hook *hook; dbus_error_init(&error); bus_info.connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); if (!bus_info.connection || dbus_error_is_set(&error)) { LogMessage(X_ERROR, "dbus-core: error connecting to system bus: %s (%s)\n", error.name, error.message); goto err_begin; } /* Thankyou. Really, thankyou. */ dbus_connection_set_exit_on_disconnect(bus_info.connection, FALSE); if (!dbus_connection_get_unix_fd(bus_info.connection, &bus_info.fd)) { ErrorF("[dbus-core] couldn't get fd for system bus\n"); goto err_unref; } if (!dbus_connection_add_filter(bus_info.connection, message_filter, &bus_info, NULL)) { ErrorF("[dbus-core] couldn't add filter: %s (%s)\n", error.name, error.message); goto err_fd; } dbus_error_free(&error); SetNotifyFd(bus_info.fd, socket_handler, X_NOTIFY_READ, &bus_info); for (hook = bus_info.hooks; hook; hook = hook->next) { if (hook->connect) hook->connect(bus_info.connection, hook->data); } return 1; err_fd: bus_info.fd = -1; err_unref: dbus_connection_unref(bus_info.connection); bus_info.connection = NULL; err_begin: dbus_error_free(&error); return 0; } static CARD32 reconnect_timer(OsTimerPtr timer, CARD32 time, void *arg) { if (connect_to_bus()) { TimerFree(bus_info.timer); bus_info.timer = NULL; return 0; } else { return RECONNECT_DELAY; } } int dbus_core_add_hook(struct dbus_core_hook *hook) { struct dbus_core_hook **prev; for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next); hook->next = NULL; *prev = hook; /* If we're already connected, call the connect hook. */ if (bus_info.connection) hook->connect(bus_info.connection, hook->data); return 1; } void dbus_core_remove_hook(struct dbus_core_hook *hook) { struct dbus_core_hook **prev; for (prev = &bus_info.hooks; *prev; prev = &(*prev)->next) { if (*prev == hook) { *prev = hook->next; break; } } } int dbus_core_init(void) { memset(&bus_info, 0, sizeof(bus_info)); bus_info.fd = -1; bus_info.hooks = NULL; if (!connect_to_bus()) bus_info.timer = TimerSet(NULL, 0, 1, reconnect_timer, NULL); return 1; } void dbus_core_fini(void) { teardown(); } xorg-server-21.1.16/config/udev.c0000644000175000017500000004541414757411105012217 /* * Copyright © 2009 Julien Cristau * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Julien Cristau */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "input.h" #include "inputstr.h" #include "hotplug.h" #include "config-backends.h" #include "os.h" #include "globals.h" #include "systemd-logind.h" #ifdef HAVE_SYS_SYSMACROS_H #include #endif #define UDEV_XKB_PROP_KEY "xkb" #define LOG_PROPERTY(path, prop, val) \ LogMessageVerb(X_INFO, 10, \ "config/udev: getting property %s on %s " \ "returned \"%s\"\n", \ (prop), (path), (val) ? (val) : "(null)") #define LOG_SYSATTR(path, attr, val) \ LogMessageVerb(X_INFO, 10, \ "config/udev: getting attribute %s on %s " \ "returned \"%s\"\n", \ (attr), (path), (val) ? (val) : "(null)") static struct udev_monitor *udev_monitor; #ifdef CONFIG_UDEV_KMS static void config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath, int major, int minor, config_odev_probe_proc_ptr probe_callback); #endif static char itoa_buf[16]; static const char *itoa(int i) { snprintf(itoa_buf, sizeof(itoa_buf), "%d", i); return itoa_buf; } static Bool check_seat(struct udev_device *udev_device) { const char *dev_seat; dev_seat = udev_device_get_property_value(udev_device, "ID_SEAT"); if (!dev_seat) dev_seat = "seat0"; if (SeatId && strcmp(dev_seat, SeatId)) return FALSE; if (!SeatId && strcmp(dev_seat, "seat0")) return FALSE; return TRUE; } static void device_added(struct udev_device *udev_device) { const char *path, *name = NULL; char *config_info = NULL; const char *syspath; const char *tags_prop; const char *key, *value, *tmp; #ifdef CONFIG_UDEV_KMS const char *subsys = NULL; #endif InputOption *input_options; InputAttributes attrs = { }; DeviceIntPtr dev = NULL; struct udev_list_entry *set, *entry; struct udev_device *parent; int rc; dev_t devnum; path = udev_device_get_devnode(udev_device); syspath = udev_device_get_syspath(udev_device); if (!path || !syspath) return; if (!check_seat(udev_device)) return; devnum = udev_device_get_devnum(udev_device); #ifdef CONFIG_UDEV_KMS subsys = udev_device_get_subsystem(udev_device); if (subsys && !strcmp(subsys, "drm")) { const char *sysname = udev_device_get_sysname(udev_device); if (strncmp(sysname, "card", 4) != 0) return; /* Check for devices already added through xf86platformProbe() */ if (xf86_find_platform_device_by_devnum(major(devnum), minor(devnum))) return; LogMessage(X_INFO, "config/udev: Adding drm device (%s)\n", path); config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum), minor(devnum), NewGPUDeviceRequest); return; } #endif value = udev_device_get_property_value(udev_device, "ID_INPUT"); if (!value || !strcmp(value, "0")) { LogMessageVerb(X_INFO, 10, "config/udev: ignoring device %s without " "property ID_INPUT set\n", path); return; } input_options = input_option_new(NULL, "_source", "server/udev"); if (!input_options) return; parent = udev_device_get_parent(udev_device); if (parent) { const char *ppath = udev_device_get_devnode(parent); const char *product = udev_device_get_property_value(parent, "PRODUCT"); const char *pnp_id = udev_device_get_sysattr_value(parent, "id"); unsigned int usb_vendor, usb_model; name = udev_device_get_sysattr_value(parent, "name"); LOG_SYSATTR(ppath, "name", name); if (!name) { name = udev_device_get_property_value(parent, "NAME"); LOG_PROPERTY(ppath, "NAME", name); } /* construct USB ID in lowercase hex - "0000:ffff" */ if (product && sscanf(product, "%*x/%4x/%4x/%*x", &usb_vendor, &usb_model) == 2) { char *usb_id; if (asprintf(&usb_id, "%04x:%04x", usb_vendor, usb_model) == -1) usb_id = NULL; else LOG_PROPERTY(ppath, "PRODUCT", product); attrs.usb_id = usb_id; } while (!pnp_id && (parent = udev_device_get_parent(parent))) { pnp_id = udev_device_get_sysattr_value(parent, "id"); if (!pnp_id) continue; attrs.pnp_id = strdup(pnp_id); ppath = udev_device_get_devnode(parent); LOG_SYSATTR(ppath, "id", pnp_id); } } if (!name) name = "(unnamed)"; else attrs.product = strdup(name); input_options = input_option_new(input_options, "name", name); input_options = input_option_new(input_options, "path", path); input_options = input_option_new(input_options, "device", path); input_options = input_option_new(input_options, "major", itoa(major(devnum))); input_options = input_option_new(input_options, "minor", itoa(minor(devnum))); if (path) attrs.device = strdup(path); tags_prop = udev_device_get_property_value(udev_device, "ID_INPUT.tags"); LOG_PROPERTY(path, "ID_INPUT.tags", tags_prop); attrs.tags = xstrtokenize(tags_prop, ","); if (asprintf(&config_info, "udev:%s", syspath) == -1) { config_info = NULL; goto unwind; } if (device_is_duplicate(config_info)) { LogMessage(X_WARNING, "config/udev: device %s already added. " "Ignoring.\n", name); goto unwind; } set = udev_device_get_properties_list_entry(udev_device); udev_list_entry_foreach(entry, set) { key = udev_list_entry_get_name(entry); if (!key) continue; value = udev_list_entry_get_value(entry); if (!strncasecmp(key, UDEV_XKB_PROP_KEY, sizeof(UDEV_XKB_PROP_KEY) - 1)) { LOG_PROPERTY(path, key, value); tmp = key + sizeof(UDEV_XKB_PROP_KEY) - 1; if (!strcasecmp(tmp, "rules")) input_options = input_option_new(input_options, "xkb_rules", value); else if (!strcasecmp(tmp, "layout")) input_options = input_option_new(input_options, "xkb_layout", value); else if (!strcasecmp(tmp, "variant")) input_options = input_option_new(input_options, "xkb_variant", value); else if (!strcasecmp(tmp, "model")) input_options = input_option_new(input_options, "xkb_model", value); else if (!strcasecmp(tmp, "options")) input_options = input_option_new(input_options, "xkb_options", value); } else if (!strcmp(key, "ID_VENDOR")) { LOG_PROPERTY(path, key, value); attrs.vendor = strdup(value); } else if (!strncmp(key, "ID_INPUT_", 9)) { const struct pfmap { const char *property; unsigned int flag; } map[] = { { "ID_INPUT_KEY", ATTR_KEY }, { "ID_INPUT_KEYBOARD", ATTR_KEYBOARD }, { "ID_INPUT_MOUSE", ATTR_POINTER }, { "ID_INPUT_JOYSTICK", ATTR_JOYSTICK }, { "ID_INPUT_TABLET", ATTR_TABLET }, { "ID_INPUT_TABLET_PAD", ATTR_TABLET_PAD }, { "ID_INPUT_TOUCHPAD", ATTR_TOUCHPAD }, { "ID_INPUT_TOUCHSCREEN", ATTR_TOUCHSCREEN }, { NULL, 0 }, }; /* Anything but the literal string "0" is considered a * boolean true. The empty string isn't a thing with udev * properties anyway */ if (value && strcmp(value, "0")) { const struct pfmap *m = map; while (m->property != NULL) { if (!strcmp(m->property, key)) { LOG_PROPERTY(path, key, value); attrs.flags |= m->flag; } m++; } } } } input_options = input_option_new(input_options, "config_info", config_info); /* Default setting needed for non-seat0 seats */ if (ServerIsNotSeat0()) input_options = input_option_new(input_options, "GrabDevice", "on"); LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n", name, path); rc = NewInputDeviceRequest(input_options, &attrs, &dev); if (rc != Success) goto unwind; unwind: free(config_info); input_option_free_list(&input_options); free(attrs.usb_id); free(attrs.pnp_id); free(attrs.product); free(attrs.device); free(attrs.vendor); if (attrs.tags) { char **tag = attrs.tags; while (*tag) { free(*tag); tag++; } free(attrs.tags); } return; } static void device_removed(struct udev_device *device) { char *value; const char *syspath = udev_device_get_syspath(device); #ifdef CONFIG_UDEV_KMS const char *subsys = udev_device_get_subsystem(device); if (subsys && !strcmp(subsys, "drm")) { const char *sysname = udev_device_get_sysname(device); const char *path = udev_device_get_devnode(device); dev_t devnum = udev_device_get_devnum(device); if ((strncmp(sysname,"card", 4) != 0) || (path == NULL)) return; LogMessage(X_INFO, "config/udev: removing GPU device %s %s\n", syspath, path); config_udev_odev_setup_attribs(device, path, syspath, major(devnum), minor(devnum), DeleteGPUDeviceRequest); /* Retry vtenter after a drm node removal */ systemd_logind_vtenter(); return; } #endif if (asprintf(&value, "udev:%s", syspath) == -1) return; remove_devices("udev", value); free(value); } static void socket_handler(int fd, int ready, void *data) { struct udev_device *udev_device; const char *action; input_lock(); udev_device = udev_monitor_receive_device(udev_monitor); if (!udev_device) { input_unlock(); return; } action = udev_device_get_action(udev_device); if (action) { if (!strcmp(action, "add")) { device_removed(udev_device); device_added(udev_device); } else if (!strcmp(action, "change")) { /* ignore change for the drm devices */ const char *subsys = udev_device_get_subsystem(udev_device); if (subsys && strcmp(subsys, "drm")) { device_removed(udev_device); device_added(udev_device); } } else if (!strcmp(action, "remove")) device_removed(udev_device); } udev_device_unref(udev_device); input_unlock(); } int config_udev_pre_init(void) { struct udev *udev; udev = udev_new(); if (!udev) return 0; udev_monitor = udev_monitor_new_from_netlink(udev, "udev"); if (!udev_monitor) return 0; udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "input", NULL); /* For Wacom serial devices */ udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "tty", NULL); #ifdef CONFIG_UDEV_KMS /* For output GPU devices */ udev_monitor_filter_add_match_subsystem_devtype(udev_monitor, "drm", NULL); #endif #ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG if (ServerIsNotSeat0()) udev_monitor_filter_add_match_tag(udev_monitor, SeatId); #endif if (udev_monitor_enable_receiving(udev_monitor)) { ErrorF("config/udev: failed to bind the udev monitor\n"); return 0; } return 1; } int config_udev_init(void) { struct udev *udev; struct udev_enumerate *enumerate; struct udev_list_entry *devices, *device; udev = udev_monitor_get_udev(udev_monitor); enumerate = udev_enumerate_new(udev); if (!enumerate) return 0; udev_enumerate_add_match_subsystem(enumerate, "input"); udev_enumerate_add_match_subsystem(enumerate, "tty"); #ifdef CONFIG_UDEV_KMS udev_enumerate_add_match_subsystem(enumerate, "drm"); #endif #ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG if (ServerIsNotSeat0()) udev_enumerate_add_match_tag(enumerate, SeatId); #endif udev_enumerate_scan_devices(enumerate); devices = udev_enumerate_get_list_entry(enumerate); udev_list_entry_foreach(device, devices) { const char *syspath = udev_list_entry_get_name(device); struct udev_device *udev_device = udev_device_new_from_syspath(udev, syspath); /* Device might be gone by the time we try to open it */ if (!udev_device) continue; device_added(udev_device); udev_device_unref(udev_device); } udev_enumerate_unref(enumerate); SetNotifyFd(udev_monitor_get_fd(udev_monitor), socket_handler, X_NOTIFY_READ, NULL); return 1; } void config_udev_fini(void) { struct udev *udev; if (!udev_monitor) return; udev = udev_monitor_get_udev(udev_monitor); RemoveNotifyFd(udev_monitor_get_fd(udev_monitor)); udev_monitor_unref(udev_monitor); udev_monitor = NULL; udev_unref(udev); } #ifdef CONFIG_UDEV_KMS /* Find the last occurrence of the needle in haystack */ static char *strrstr(const char *haystack, const char *needle) { char *prev, *last, *tmp; prev = strstr(haystack, needle); if (!prev) return NULL; last = prev; tmp = prev + 1; while (tmp) { last = strstr(tmp, needle); if (!last) return prev; else { prev = last; tmp = prev + 1; } } return last; } /* For certain devices udev does not create ID_PATH entry (which is presumably a bug * in udev). We work around that by implementing a minimal ID_PATH calculator * ourselves along the same logic that udev uses. This works only for the case of * a PCI device being directly connected to a PCI bus, but it will cover most end * users with e.g. a new laptop which only has beta hardware driver support. * See https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 */ static char* config_udev_get_fallback_bus_id(struct udev_device *udev_device) { const char *sysname; char *busid; udev_device = udev_device_get_parent(udev_device); if (udev_device == NULL) return NULL; if (strcmp(udev_device_get_subsystem(udev_device), "pci") != 0) return NULL; sysname = udev_device_get_sysname(udev_device); busid = XNFalloc(strlen(sysname) + 5); busid[0] = '\0'; strcat(busid, "pci:"); strcat(busid, sysname); return busid; } static void config_udev_odev_setup_attribs(struct udev_device *udev_device, const char *path, const char *syspath, int major, int minor, config_odev_probe_proc_ptr probe_callback) { struct OdevAttributes *attribs = config_odev_allocate_attributes(); const char *value, *str; attribs->path = XNFstrdup(path); attribs->syspath = XNFstrdup(syspath); attribs->major = major; attribs->minor = minor; value = udev_device_get_property_value(udev_device, "ID_PATH"); if (value && (str = strrstr(value, "pci-"))) { value = str; if ((str = strstr(value, "usb-"))) value = str; attribs->busid = XNFstrdup(value); attribs->busid[3] = ':'; } if (!value) attribs->busid = config_udev_get_fallback_bus_id(udev_device); /* ownership of attribs is passed to probe layer */ probe_callback(attribs); } void config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback) { struct udev *udev; struct udev_enumerate *enumerate; struct udev_list_entry *devices, *device; udev = udev_monitor_get_udev(udev_monitor); enumerate = udev_enumerate_new(udev); if (!enumerate) return; udev_enumerate_add_match_subsystem(enumerate, "drm"); udev_enumerate_add_match_sysname(enumerate, "card[0-9]*"); #ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG if (ServerIsNotSeat0()) udev_enumerate_add_match_tag(enumerate, SeatId); #endif udev_enumerate_scan_devices(enumerate); devices = udev_enumerate_get_list_entry(enumerate); udev_list_entry_foreach(device, devices) { const char *syspath = udev_list_entry_get_name(device); struct udev_device *udev_device = udev_device_new_from_syspath(udev, syspath); const char *path = udev_device_get_devnode(udev_device); const char *sysname = udev_device_get_sysname(udev_device); dev_t devnum = udev_device_get_devnum(udev_device); const char *subsys = udev_device_get_subsystem(udev_device); if (!path || !syspath || !subsys) goto no_probe; else if (strcmp(subsys, "drm") != 0) goto no_probe; else if (strncmp(sysname, "card", 4) != 0) goto no_probe; else if (!check_seat(udev_device)) goto no_probe; config_udev_odev_setup_attribs(udev_device, path, syspath, major(devnum), minor(devnum), probe_callback); no_probe: udev_device_unref(udev_device); } udev_enumerate_unref(enumerate); return; } #endif xorg-server-21.1.16/config/hal.c0000644000175000017500000005406314757411105012020 /* * Copyright © 2007 Daniel Stone * Copyright © 2007 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include "dbus-core.h" #include "input.h" #include "inputstr.h" #include "hotplug.h" #include "config-backends.h" #include "os.h" #define LIBHAL_PROP_KEY "input.x11_options." #define LIBHAL_XKB_PROP_KEY "input.xkb." struct config_hal_info { DBusConnection *system_bus; LibHalContext *hal_ctx; }; /* Used for special handling of xkb options. */ struct xkb_options { char *layout; char *model; char *rules; char *variant; char *options; }; static void device_removed(LibHalContext * ctx, const char *udi) { char *value; if (asprintf(&value, "hal:%s", udi) == -1) return; remove_devices("hal", value); free(value); } static char * get_prop_string(LibHalContext * hal_ctx, const char *udi, const char *name) { char *prop, *ret; prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop ? prop : "(null)"); if (prop) { ret = strdup(prop); libhal_free_string(prop); } else { return NULL; } return ret; } static char * get_prop_string_array(LibHalContext * hal_ctx, const char *udi, const char *prop) { char **props, *ret, *str; int i, len = 0; props = libhal_device_get_property_strlist(hal_ctx, udi, prop, NULL); if (props) { for (i = 0; props[i]; i++) len += strlen(props[i]); ret = calloc(sizeof(char), len + i); /* i - 1 commas, 1 NULL */ if (!ret) { libhal_free_string_array(props); return NULL; } str = ret; for (i = 0; props[i]; i++) { strcpy(str, props[i]); str += strlen(props[i]); *str++ = ','; } *(str - 1) = '\0'; libhal_free_string_array(props); } else { return NULL; } return ret; } static void device_added(LibHalContext * hal_ctx, const char *udi) { char *path = NULL, *driver = NULL, *name = NULL, *config_info = NULL; char *hal_tags, *parent; InputOption *input_options = NULL; InputAttributes attrs = { 0 }; DeviceIntPtr dev = NULL; DBusError error; struct xkb_options xkb_opts = { 0 }; int rc; LibHalPropertySet *set = NULL; LibHalPropertySetIterator set_iter; char *psi_key = NULL, *tmp_val; dbus_error_init(&error); driver = get_prop_string(hal_ctx, udi, "input.x11_driver"); if (!driver) { /* verbose, don't tell the user unless they _want_ to see it */ LogMessageVerb(X_INFO, 7, "config/hal: no driver specified for device %s\n", udi); goto unwind; } path = get_prop_string(hal_ctx, udi, "input.device"); if (!path) { LogMessage(X_WARNING, "config/hal: no driver or path specified for %s\n", udi); goto unwind; } attrs.device = strdup(path); name = get_prop_string(hal_ctx, udi, "info.product"); if (!name) name = strdup("(unnamed)"); else attrs.product = strdup(name); attrs.vendor = get_prop_string(hal_ctx, udi, "info.vendor"); hal_tags = get_prop_string(hal_ctx, udi, "input.tags"); attrs.tags = xstrtokenize(hal_tags, ","); free(hal_tags); if (libhal_device_query_capability(hal_ctx, udi, "input.keys", NULL)) attrs.flags |= ATTR_KEY | ATTR_KEYBOARD; if (libhal_device_query_capability(hal_ctx, udi, "input.mouse", NULL)) attrs.flags |= ATTR_POINTER; if (libhal_device_query_capability(hal_ctx, udi, "input.joystick", NULL)) attrs.flags |= ATTR_JOYSTICK; if (libhal_device_query_capability(hal_ctx, udi, "input.tablet", NULL)) attrs.flags |= ATTR_TABLET; if (libhal_device_query_capability(hal_ctx, udi, "input.tablet_pad", NULL)) attrs.flags |= ATTR_TABLET_PAD; if (libhal_device_query_capability(hal_ctx, udi, "input.touchpad", NULL)) attrs.flags |= ATTR_TOUCHPAD; if (libhal_device_query_capability(hal_ctx, udi, "input.touchscreen", NULL)) attrs.flags |= ATTR_TOUCHSCREEN; parent = get_prop_string(hal_ctx, udi, "info.parent"); if (parent) { int usb_vendor, usb_product; char *old_parent; /* construct USB ID in lowercase - "0000:ffff" */ usb_vendor = libhal_device_get_property_int(hal_ctx, parent, "usb.vendor_id", NULL); LogMessageVerb(X_INFO, 10, "config/hal: getting usb.vendor_id on %s " "returned %04x\n", parent, usb_vendor); usb_product = libhal_device_get_property_int(hal_ctx, parent, "usb.product_id", NULL); LogMessageVerb(X_INFO, 10, "config/hal: getting usb.product_id on %s " "returned %04x\n", parent, usb_product); if (usb_vendor && usb_product) if (asprintf(&attrs.usb_id, "%04x:%04x", usb_vendor, usb_product) == -1) attrs.usb_id = NULL; attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id"); old_parent = parent; while (!attrs.pnp_id && (parent = get_prop_string(hal_ctx, parent, "info.parent"))) { attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id"); free(old_parent); old_parent = parent; } free(old_parent); } input_options = input_option_new(NULL, "_source", "server/hal"); if (!input_options) { LogMessage(X_ERROR, "config/hal: couldn't allocate first key/value pair\n"); goto unwind; } /* most drivers use device.. not path. evdev uses both however, but the * path version isn't documented apparently. support both for now. */ input_options = input_option_new(input_options, "path", path); input_options = input_option_new(input_options, "device", path); input_options = input_option_new(input_options, "driver", driver); input_options = input_option_new(input_options, "name", name); if (asprintf(&config_info, "hal:%s", udi) == -1) { config_info = NULL; LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); goto unwind; } /* Check for duplicate devices */ if (device_is_duplicate(config_info)) { LogMessage(X_WARNING, "config/hal: device %s already added. Ignoring.\n", name); goto unwind; } /* ok, grab options from hal.. iterate through all properties * and lets see if any of them are options that we can add */ set = libhal_device_get_all_properties(hal_ctx, udi, &error); if (!set) { LogMessage(X_ERROR, "config/hal: couldn't get property list for %s: %s (%s)\n", udi, error.name, error.message); goto unwind; } libhal_psi_init(&set_iter, set); while (libhal_psi_has_more(&set_iter)) { /* we are looking for supported keys.. extract and add to options */ psi_key = libhal_psi_get_key(&set_iter); if (psi_key) { /* normal options first (input.x11_options.) */ if (!strncasecmp (psi_key, LIBHAL_PROP_KEY, sizeof(LIBHAL_PROP_KEY) - 1)) { char *tmp; /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val) { /* xkb needs special handling. HAL specs include * input.xkb.xyz options, but the x11-input.fdi specifies * input.x11_options.Xkbxyz options. By default, we use * the former, unless the specific X11 ones are specified. * Since we can't predict the order in which the keys * arrive, we need to store them. */ if ((tmp = strcasestr(psi_key, "xkb")) && strlen(tmp) >= 4) { if (!strcasecmp(&tmp[3], "layout")) { free(xkb_opts.layout); xkb_opts.layout = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "model")) { free(xkb_opts.model); xkb_opts.model = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "rules")) { free(xkb_opts.rules); xkb_opts.rules = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "variant")) { free(xkb_opts.variant); xkb_opts.variant = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "options")) { free(xkb_opts.options); xkb_opts.options = strdup(tmp_val); } } else { /* all others */ input_options = input_option_new(input_options, psi_key + sizeof(LIBHAL_PROP_KEY) - 1, tmp_val); free(tmp_val); } } else { /* server 1.4 had xkb_options as strlist. */ if ((tmp = strcasestr(psi_key, "xkb")) && (strlen(tmp) >= 4) && (!strcasecmp(&tmp[3], "options")) && (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key))) { free(xkb_opts.options); xkb_opts.options = strdup(tmp_val); } } } else if (!strncasecmp (psi_key, LIBHAL_XKB_PROP_KEY, sizeof(LIBHAL_XKB_PROP_KEY) - 1)) { char *tmp; /* only support strings for all values */ tmp_val = get_prop_string(hal_ctx, udi, psi_key); if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) { tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; if (!strcasecmp(tmp, "layout")) { if (!xkb_opts.layout) xkb_opts.layout = strdup(tmp_val); } else if (!strcasecmp(tmp, "rules")) { if (!xkb_opts.rules) xkb_opts.rules = strdup(tmp_val); } else if (!strcasecmp(tmp, "variant")) { if (!xkb_opts.variant) xkb_opts.variant = strdup(tmp_val); } else if (!strcasecmp(tmp, "model")) { if (!xkb_opts.model) xkb_opts.model = strdup(tmp_val); } else if (!strcasecmp(tmp, "options")) { if (!xkb_opts.options) xkb_opts.options = strdup(tmp_val); } free(tmp_val); } else { /* server 1.4 had xkb options as strlist */ tmp_val = get_prop_string_array(hal_ctx, udi, psi_key); if (tmp_val && strlen(psi_key) >= sizeof(LIBHAL_XKB_PROP_KEY)) { tmp = &psi_key[sizeof(LIBHAL_XKB_PROP_KEY) - 1]; if (!strcasecmp(tmp, ".options") && (!xkb_opts.options)) xkb_opts.options = strdup(tmp_val); } free(tmp_val); } } } /* psi_key doesn't need to be freed */ libhal_psi_next(&set_iter); } /* Now add xkb options */ if (xkb_opts.layout) input_options = input_option_new(input_options, "xkb_layout", xkb_opts.layout); if (xkb_opts.rules) input_options = input_option_new(input_options, "xkb_rules", xkb_opts.rules); if (xkb_opts.variant) input_options = input_option_new(input_options, "xkb_variant", xkb_opts.variant); if (xkb_opts.model) input_options = input_option_new(input_options, "xkb_model", xkb_opts.model); if (xkb_opts.options) input_options = input_option_new(input_options, "xkb_options", xkb_opts.options); input_options = input_option_new(input_options, "config_info", config_info); /* this isn't an error, but how else do you output something that the user can see? */ LogMessage(X_INFO, "config/hal: Adding input device %s\n", name); if ((rc = NewInputDeviceRequest(input_options, &attrs, &dev)) != Success) { LogMessage(X_ERROR, "config/hal: NewInputDeviceRequest failed (%d)\n", rc); dev = NULL; goto unwind; } unwind: if (set) libhal_free_property_set(set); free(path); free(driver); free(name); free(config_info); input_option_free_list(&input_options); free(attrs.product); free(attrs.vendor); free(attrs.device); free(attrs.pnp_id); free(attrs.usb_id); if (attrs.tags) { char **tag = attrs.tags; while (*tag) { free(*tag); tag++; } free(attrs.tags); } free(xkb_opts.layout); free(xkb_opts.rules); free(xkb_opts.model); free(xkb_opts.variant); free(xkb_opts.options); dbus_error_free(&error); return; } static void disconnect_hook(void *data) { DBusError error; struct config_hal_info *info = data; if (info->hal_ctx) { if (dbus_connection_get_is_connected(info->system_bus)) { dbus_error_init(&error); if (!libhal_ctx_shutdown(info->hal_ctx, &error)) LogMessage(X_WARNING, "config/hal: disconnect_hook couldn't shut down context: %s (%s)\n", error.name, error.message); dbus_error_free(&error); } libhal_ctx_free(info->hal_ctx); } info->hal_ctx = NULL; info->system_bus = NULL; } static BOOL connect_and_register(DBusConnection * connection, struct config_hal_info *info) { DBusError error; char **devices; int num_devices, i; if (info->hal_ctx) return TRUE; /* already registered, pretend we did something */ info->system_bus = connection; dbus_error_init(&error); info->hal_ctx = libhal_ctx_new(); if (!info->hal_ctx) { LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n"); goto out_err; } if (!libhal_ctx_set_dbus_connection(info->hal_ctx, info->system_bus)) { LogMessage(X_ERROR, "config/hal: couldn't associate HAL context with bus\n"); goto out_err; } if (!libhal_ctx_init(info->hal_ctx, &error)) { LogMessage(X_ERROR, "config/hal: couldn't initialise context: %s (%s)\n", error.name ? error.name : "unknown error", error.message ? error.message : "null"); goto out_err; } if (!libhal_device_property_watch_all(info->hal_ctx, &error)) { LogMessage(X_ERROR, "config/hal: couldn't watch all properties: %s (%s)\n", error.name ? error.name : "unknown error", error.message ? error.message : "null"); goto out_ctx; } libhal_ctx_set_device_added(info->hal_ctx, device_added); libhal_ctx_set_device_removed(info->hal_ctx, device_removed); devices = libhal_find_device_by_capability(info->hal_ctx, "input", &num_devices, &error); /* FIXME: Get default devices if error is set. */ if (dbus_error_is_set(&error)) { LogMessage(X_ERROR, "config/hal: couldn't find input device: %s (%s)\n", error.name ? error.name : "unknown error", error.message ? error.message : "null"); goto out_ctx; } for (i = 0; i < num_devices; i++) device_added(info->hal_ctx, devices[i]); libhal_free_string_array(devices); dbus_error_free(&error); return TRUE; out_ctx: dbus_error_free(&error); if (!libhal_ctx_shutdown(info->hal_ctx, &error)) { LogMessage(X_WARNING, "config/hal: couldn't shut down context: %s (%s)\n", error.name ? error.name : "unknown error", error.message ? error.message : "null"); dbus_error_free(&error); } out_err: dbus_error_free(&error); if (info->hal_ctx) { libhal_ctx_free(info->hal_ctx); } info->hal_ctx = NULL; info->system_bus = NULL; return FALSE; } /** * Handle NewOwnerChanged signals to deal with HAL startup at X server runtime. * * NewOwnerChanged is send once when HAL shuts down, and once again when it * comes back up. Message has three arguments, first is the name * (org.freedesktop.Hal), the second one is the old owner, third one is new * owner. */ static DBusHandlerResult ownerchanged_handler(DBusConnection * connection, DBusMessage * message, void *data) { int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; if (dbus_message_is_signal(message, "org.freedesktop.DBus", "NameOwnerChanged")) { DBusError error; char *name, *old_owner, *new_owner; dbus_error_init(&error); dbus_message_get_args(message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &old_owner, DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID); if (dbus_error_is_set(&error)) { ErrorF ("[config/hal] failed to get NameOwnerChanged args: %s (%s)\n", error.name, error.message); } else if (name && strcmp(name, "org.freedesktop.Hal") == 0) { if (!old_owner || !strlen(old_owner)) { DebugF("[config/hal] HAL startup detected.\n"); if (connect_and_register (connection, (struct config_hal_info *) data)) dbus_connection_unregister_object_path(connection, "/org/freedesktop/DBus"); else ErrorF("[config/hal] Failed to connect to HAL bus.\n"); } ret = DBUS_HANDLER_RESULT_HANDLED; } dbus_error_free(&error); } return ret; } /** * Register a handler for the NameOwnerChanged signal. */ static BOOL listen_for_startup(DBusConnection * connection, void *data) { DBusObjectPathVTable vtable = {.message_function = ownerchanged_handler, }; DBusError error; const char MATCH_RULE[] = "sender='org.freedesktop.DBus'," "interface='org.freedesktop.DBus'," "type='signal'," "path='/org/freedesktop/DBus'," "member='NameOwnerChanged'"; int rc = FALSE; dbus_error_init(&error); dbus_bus_add_match(connection, MATCH_RULE, &error); if (!dbus_error_is_set(&error)) { if (dbus_connection_register_object_path(connection, "/org/freedesktop/DBus", &vtable, data)) rc = TRUE; else ErrorF("[config/hal] cannot register object path.\n"); } else { ErrorF("[config/hal] couldn't add match rule: %s (%s)\n", error.name, error.message); ErrorF("[config/hal] cannot detect a HAL startup.\n"); } dbus_error_free(&error); return rc; } static void connect_hook(DBusConnection * connection, void *data) { struct config_hal_info *info = data; if (listen_for_startup(connection, data) && connect_and_register(connection, info)) dbus_connection_unregister_object_path(connection, "/org/freedesktop/DBus"); return; } static struct config_hal_info hal_info; static struct dbus_core_hook hook = { .connect = connect_hook, .disconnect = disconnect_hook, .data = &hal_info, }; int config_hal_init(void) { memset(&hal_info, 0, sizeof(hal_info)); hal_info.system_bus = NULL; hal_info.hal_ctx = NULL; if (!dbus_core_add_hook(&hook)) { LogMessage(X_ERROR, "config/hal: failed to add D-Bus hook\n"); return 0; } /* verbose message */ LogMessageVerb(X_INFO, 7, "config/hal: initialized\n"); return 1; } void config_hal_fini(void) { dbus_core_remove_hook(&hook); } xorg-server-21.1.16/config/wscons.c0000644000175000017500000001762714757411105012575 /* * Copyright (c) 2011 Matthieu Herrb * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include "input.h" #include "inputstr.h" #include "os.h" #include "config-backends.h" #define WSCONS_KBD_DEVICE "/dev/wskbd" #define WSCONS_MOUSE_PREFIX "/dev/wsmouse" #define KB_OVRENC \ { KB_UK, "gb" }, \ { KB_SV, "se" }, \ { KB_SG, "ch" }, \ { KB_SF, "ch" }, \ { KB_LA, "latam" }, \ { KB_CF, "ca" } struct nameint { int val; char *name; } kbdenc[] = { KB_OVRENC, KB_ENCTAB, {0} }; struct nameint kbdvar[] = { {KB_NODEAD | KB_SG, "de_nodeadkeys"}, {KB_NODEAD | KB_SF, "fr_nodeadkeys"}, {KB_SF, "fr"}, {KB_DVORAK | KB_CF, "fr-dvorak"}, {KB_DVORAK | KB_FR, "bepo"}, {KB_DVORAK, "dvorak"}, {KB_CF, "fr-legacy"}, {KB_NODEAD, "nodeadkeys"}, {0} }; struct nameint kbdopt[] = { {KB_SWAPCTRLCAPS, "ctrl:swapcaps"}, {0} }; struct nameint kbdmodel[] = { {WSKBD_TYPE_ZAURUS, "zaurus"}, {0} }; static void wscons_add_keyboard(void) { InputAttributes attrs = { }; DeviceIntPtr dev = NULL; InputOption *input_options = NULL; char *config_info = NULL; int fd, i, rc; unsigned int type; kbd_t wsenc = 0; /* Find keyboard configuration */ fd = open(WSCONS_KBD_DEVICE, O_RDWR | O_NONBLOCK | O_EXCL); if (fd == -1) { LogMessage(X_ERROR, "wskbd: open %s: %s\n", WSCONS_KBD_DEVICE, strerror(errno)); return; } if (ioctl(fd, WSKBDIO_GETENCODING, &wsenc) == -1) { LogMessage(X_WARNING, "wskbd: ioctl(WSKBDIO_GETENCODING) " "failed: %s\n", strerror(errno)); close(fd); return; } if (ioctl(fd, WSKBDIO_GTYPE, &type) == -1) { LogMessage(X_WARNING, "wskbd: ioctl(WSKBDIO_GTYPE) " "failed: %s\n", strerror(errno)); close(fd); return; } close(fd); input_options = input_option_new(input_options, "_source", "server/wscons"); if (input_options == NULL) return; LogMessage(X_INFO, "config/wscons: checking input device %s\n", WSCONS_KBD_DEVICE); input_options = input_option_new(input_options, "name", WSCONS_KBD_DEVICE); input_options = input_option_new(input_options, "driver", "kbd"); config_info = Xprintf("wscons:%s", WSCONS_KBD_DEVICE); if (!config_info) goto unwind; if (KB_ENCODING(wsenc) == KB_USER) { /* Ignore wscons "user" layout */ LogMessageVerb(X_INFO, 3, "wskbd: ignoring \"user\" layout\n"); goto kbd_config_done; } for (i = 0; kbdenc[i].val; i++) if (KB_ENCODING(wsenc) == kbdenc[i].val) { LogMessageVerb(X_INFO, 3, "wskbd: using layout %s\n", kbdenc[i].name); input_options = input_option_new(input_options, "xkb_layout", kbdenc[i].name); break; } for (i = 0; kbdvar[i].val; i++) if (wsenc == kbdvar[i].val || KB_VARIANT(wsenc) == kbdvar[i].val) { LogMessageVerb(X_INFO, 3, "wskbd: using variant %s\n", kbdvar[i].name); input_options = input_option_new(input_options, "xkb_variant", kbdvar[i].name); break; } for (i = 0; kbdopt[i].val; i++) if (KB_VARIANT(wsenc) == kbdopt[i].val) { LogMessageVerb(X_INFO, 3, "wskbd: using option %s\n", kbdopt[i].name); input_options = input_option_new(input_options, "xkb_options", kbdopt[i].name); break; } for (i = 0; kbdmodel[i].val; i++) if (type == kbdmodel[i].val) { LogMessageVerb(X_INFO, 3, "wskbd: using model %s\n", kbdmodel[i].name); input_options = input_option_new(input_options, "xkb_model", kbdmodel[i].name); break; } kbd_config_done: attrs.flags |= ATTR_KEY | ATTR_KEYBOARD; rc = NewInputDeviceRequest(input_options, &attrs, &dev); if (rc != Success) goto unwind; for (; dev; dev = dev->next) { free(dev->config_info); dev->config_info = strdup(config_info); } unwind: input_option_free_list(&input_options); } static void wscons_add_pointer(const char *path, const char *driver, int flags) { InputAttributes attrs = { }; DeviceIntPtr dev = NULL; InputOption *input_options = NULL; char *config_info = NULL; int rc; config_info = Xprintf("wscons:%s", path); if (!config_info) return; input_options = input_option_new(input_options, "_source", "server/wscons"); if (input_options == NULL) return; input_options = input_option_new(input_options, "name", strdup(path)); input_options = input_option_new(input_options, "driver", strdup(driver)); input_options = input_option_new(input_options, "device", strdup(path)); LogMessage(X_INFO, "config/wscons: checking input device %s\n", path); attrs.flags |= flags; rc = NewInputDeviceRequest(input_options, &attrs, &dev); if (rc != Success) goto unwind; for (; dev; dev = dev->next) { free(dev->config_info); dev->config_info = strdup(config_info); } unwind: input_option_free_list(&input_options); } static void wscons_add_pointers(void) { char devname[256]; int fd, i, wsmouse_type; /* Check pointing devices */ for (i = 0; i < 4; i++) { snprintf(devname, sizeof(devname), "%s%d", WSCONS_MOUSE_PREFIX, i); LogMessageVerb(X_INFO, 10, "wsmouse: checking %s\n", devname); fd = open_device(devnamem O_RDWR | O_NONBLOCK | O_EXCL); if (fd == -1) { LogMessageVerb(X_WARNING, 10, "%s: %s\n", devname, strerror(errno)); continue; } if (ioctl(fd, WSMOUSEIO_GTYPE, &wsmouse_type) != 0) { LogMessageVerb(X_WARNING, 10, "%s: WSMOUSEIO_GTYPE failed\n", devname); close(fd); continue; } close(fd); switch (wsmouse_type) { case WSMOUSE_TYPE_SYNAPTICS: wscons_add_pointer(devname, "synaptics", ATTR_TOUCHPAD); break; case WSMOUSE_TYPE_TPANEL: wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN); break; default: break; } } /* Add a default entry catching all other mux elements as "mouse" */ wscons_add_pointer(WSCONS_MOUSE_PREFIX, "mouse", ATTR_POINTER); } int config_wscons_init(void) { wscons_add_keyboard(); wscons_add_pointers(); return 1; } void config_wscons_fini(void) { /* Not much to do ? */ } xorg-server-21.1.16/config/x11-input.fdi0000644000175000017500000000712014757411105013332 mouse evdev usbms VUID base kbd pc105 evdev evdev usbkbm VUID us xorg-server-21.1.16/config/fdi2iclass.py0000755000175000017500000001550514757411105013506 #!/usr/bin/python # # Convert xorg keys from hal FDIs files to xorg.conf InputClass sections. # Modified from Martin Pitt's original fdi2mpi.py script: # http://cgit.freedesktop.org/media-player-info/tree/tools/fdi2mpi.py # # (C) 2010 Dan Nicholson # (C) 2009 Canonical Ltd. # Author: Dan Nicholson # Author: Martin Pitt # # 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, and to permit persons to whom the Software is # fur- nished to do so, subject to the following conditions: # # 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, # FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL # THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- # NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. import sys, xml.dom.minidom # dict converting tags to Match* entries match_table = { 'info.product': 'MatchProduct', 'input.product': 'MatchProduct', 'info.vendor': 'MatchVendor', 'input.vendor': 'MatchVendor', 'info.device': 'MatchDevicePath', 'linux.device_file': 'MatchDevicePath', '/org/freedesktop/Hal/devices/computer:system.kernel.name': 'MatchOS', '@info.parent:pnp.id': 'MatchPnPID', } # dict converting info.capabilities list to Match* entries cap_match_table = { 'input.keys': 'MatchIsKeyboard', 'input.keyboard': 'MatchIsKeyboard', 'input.keypad': 'MatchIsKeyboard', 'input.mouse': 'MatchIsPointer', 'input.joystick': 'MatchIsJoystick', 'input.tablet': 'MatchIsTablet', 'input.touchpad': 'MatchIsTouchpad', 'input.touchscreen': 'MatchIsTouchscreen', } def device_glob(path): '''Convert a contains device path to a glob entry''' if path[0] != '/': path = '*' + path return path + '*' def parse_match(node): '''Parse a tag to a tuple with InputClass values''' match = None value = None booltype = False # see what type of key we have if node.attributes.has_key('key'): key = node.attributes['key'].nodeValue if key in match_table: match = match_table[key] elif key == 'info.capabilities': booltype = True # bail out now if it's unrecognized if not match and not booltype: return (match, value) if node.attributes.has_key('string'): value = node.attributes['string'].nodeValue elif node.attributes.has_key('contains'): value = node.attributes['contains'].nodeValue if match == 'MatchDevicePath': value = device_glob(value) elif booltype and value in cap_match_table: match = cap_match_table[value] value = 'yes' elif node.attributes.has_key('string_outof'): value = node.attributes['string_outof'].nodeValue.replace(';','|') elif node.attributes.has_key('contains_outof'): all_values = node.attributes['contains_outof'].nodeValue.split(';') for v in all_values: if match == 'MatchDevicePath': v = device_glob(v) elif match == 'MatchPnPID' and len(v) < 7: v += '*' if value: value += '|' + v else: value = v return (match, value) def parse_options(node): '''Parse the x11_* options and return InputClass entries''' driver = '' ignore = False options = [] for n in node.childNodes: if n.nodeType != xml.dom.minidom.Node.ELEMENT_NODE: continue tag = n.tagName key = n.attributes['key'].nodeValue value = '' if n.hasChildNodes(): content_node = n.childNodes[0] assert content_node.nodeType == xml.dom.Node.TEXT_NODE value = content_node.nodeValue if tag == 'match': continue assert tag in ('addset', 'merge', 'append', 'remove') if tag == 'remove' and key == 'input.x11_driver': ignore = True elif key == 'input.x11_driver': driver = value elif key.startswith('input.x11_options.'): option = key.split('.', 2)[2] options.append((option, value)) return (driver, ignore, options) def is_match_node(node): '''Check if a node is a element''' return node.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \ node.tagName == 'match' def parse_all_matches(node): '''Parse a x11 match tag and any parents that don't supply their own options''' matches = [] while True: (key, value) = parse_match(node) if key and value: matches.append((key, value)) # walk up to a parent match node node = node.parentNode if node == None or not is_match_node(node): break # leave if there other options at this level children = set([n.tagName for n in node.childNodes if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE]) if children & set(['addset', 'merge', 'append']): break return matches # stupid counter to give "unique" rule names num_sections = 1 def print_section(matches, driver, ignore, options): '''Print a valid InputClass section to stdout''' global num_sections print 'Section "InputClass"' print '\tIdentifier "Converted Class %d"' % num_sections num_sections += 1 for m, v in matches: print '\t%s "%s"' % (m, v) if driver: print '\tDriver "%s"' % driver if ignore: print '\tOption "Ignore" "yes"' for o, v in options: print '\tOption "%s" "%s"' % (o, v) print 'EndSection' def parse_fdi(fdi): '''Parse x11 matches from fdi''' # find all leaf nodes num = 0 for match_node in fdi.getElementsByTagName('match'): children = set([n.tagName for n in match_node.childNodes if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE]) # see if there are any options at this level (driver, ignore, options) = parse_options(match_node) if not driver and not ignore and not options: continue matches = parse_all_matches(match_node) if num > 0: print print_section(matches, driver, ignore, options) num += 1 for f in sys.argv[1:]: parse_fdi(xml.dom.minidom.parse(f)) xorg-server-21.1.16/config/10-quirks.conf0000644000175000017500000000317314757411105013507 # Collection of quirks and blacklist/whitelists for specific devices. # Accelerometer device, posts data through ABS_X/ABS_Y, making X unusable # http://bugs.freedesktop.org/show_bug.cgi?id=22442 Section "InputClass" Identifier "ThinkPad HDAPS accelerometer blacklist" MatchProduct "ThinkPad HDAPS accelerometer data" Option "Ignore" "on" EndSection # https://bugzilla.redhat.com/show_bug.cgi?id=523914 # Mouse does not move in PV Xen guest # Explicitly tell evdev to not ignore the absolute axes. Section "InputClass" Identifier "Xen Virtual Pointer axis blacklist" MatchProduct "Xen Virtual Pointer" Option "IgnoreAbsoluteAxes" "off" Option "IgnoreRelativeAxes" "off" EndSection # https://bugs.freedesktop.org/show_bug.cgi?id=55867 # Bug 55867 - Doesn't know how to tag XI_TRACKBALL Section "InputClass" Identifier "Tag trackballs as XI_TRACKBALL" MatchProduct "trackball" MatchDriver "evdev" Option "TypeName" "TRACKBALL" EndSection # https://bugs.freedesktop.org/show_bug.cgi?id=62831 # Bug 62831 - Mionix Naos 5000 mouse detected incorrectly Section "InputClass" Identifier "Tag Mionix Naos 5000 mouse XI_MOUSE" MatchProduct "La-VIEW Technology Naos 5000 Mouse" MatchDriver "evdev" Option "TypeName" "MOUSE" EndSection # https://bugzilla.redhat.com/show_bug.cgi?id=2152414 # Xorg server does not correctly select the DCP for the display without # a quirk on Apple Silicon Section "OutputClass" Identifier "appledrm" MatchDriver "apple" Driver "modesetting" Option "PrimaryGPU" "true" EndSection xorg-server-21.1.16/damageext/0000755000175000017500000000000014757411133011653 5xorg-server-21.1.16/damageext/meson.build0000644000175000017500000000025514757411105013736 srcs_damageext = [ 'damageext.c', ] libxserver_damageext = static_library('libxserver_damageext', srcs_damageext, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/damageext/Makefile.am0000644000175000017500000000017614757411105013632 noinst_LTLIBRARIES = libdamageext.la AM_CFLAGS = $(DIX_CFLAGS) libdamageext_la_SOURCES = \ damageext.c \ damageextint.h xorg-server-21.1.16/damageext/Makefile.in0000644000175000017500000006067714757411114013657 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = damageext ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdamageext_la_LIBADD = am_libdamageext_la_OBJECTS = damageext.lo libdamageext_la_OBJECTS = $(am_libdamageext_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/damageext.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdamageext_la_SOURCES) DIST_SOURCES = $(libdamageext_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdamageext.la AM_CFLAGS = $(DIX_CFLAGS) libdamageext_la_SOURCES = \ damageext.c \ damageextint.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign damageext/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign damageext/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdamageext.la: $(libdamageext_la_OBJECTS) $(libdamageext_la_DEPENDENCIES) $(EXTRA_libdamageext_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdamageext_la_OBJECTS) $(libdamageext_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/damageext.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/damageext.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/damageext.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/damageext/damageext.c0000644000175000017500000005160014757411105013677 /* * Copyright © 2002 Keith Packard * Copyright 2013 Red Hat, Inc. * * 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 #endif #include "damageextint.h" #include "damagestr.h" #include "protocol-versions.h" #include "extinit.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" typedef struct { DamageExtPtr ext; DamagePtr damage[MAXSCREENS]; } PanoramiXDamageRes; static RESTYPE XRT_DAMAGE; static int (*PanoramiXSaveDamageCreate) (ClientPtr); #endif static unsigned char DamageReqCode; static int DamageEventBase; static RESTYPE DamageExtType; static DevPrivateKeyRec DamageClientPrivateKeyRec; #define DamageClientPrivateKey (&DamageClientPrivateKeyRec) static void DamageNoteCritical(ClientPtr pClient) { DamageClientPtr pDamageClient = GetDamageClient(pClient); /* Composite extension marks clients with manual Subwindows as critical */ if (pDamageClient->critical > 0) { SetCriticalOutputPending(); pClient->smart_priority = SMART_MAX_PRIORITY; } } static void damageGetGeometry(DrawablePtr draw, int *x, int *y, int *w, int *h) { #ifdef PANORAMIX if (!noPanoramiXExtension && draw->type == DRAWABLE_WINDOW) { WindowPtr win = (WindowPtr)draw; if (!win->parent) { *x = screenInfo.x; *y = screenInfo.y; *w = screenInfo.width; *h = screenInfo.height; return; } } #endif *x = draw->x; *y = draw->y; *w = draw->width; *h = draw->height; } static void DamageExtNotify(DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) { ClientPtr pClient = pDamageExt->pClient; DrawablePtr pDrawable = pDamageExt->pDrawable; xDamageNotifyEvent ev; int i, x, y, w, h; damageGetGeometry(pDrawable, &x, &y, &w, &h); UpdateCurrentTimeIf(); ev = (xDamageNotifyEvent) { .type = DamageEventBase + XDamageNotify, .level = pDamageExt->level, .drawable = pDamageExt->drawable, .damage = pDamageExt->id, .timestamp = currentTime.milliseconds, .geometry.x = x, .geometry.y = y, .geometry.width = w, .geometry.height = h }; if (pBoxes) { for (i = 0; i < nBoxes; i++) { ev.level = pDamageExt->level; if (i < nBoxes - 1) ev.level |= DamageNotifyMore; ev.area.x = pBoxes[i].x1; ev.area.y = pBoxes[i].y1; ev.area.width = pBoxes[i].x2 - pBoxes[i].x1; ev.area.height = pBoxes[i].y2 - pBoxes[i].y1; WriteEventsToClient(pClient, 1, (xEvent *) &ev); } } else { ev.area.x = 0; ev.area.y = 0; ev.area.width = w; ev.area.height = h; WriteEventsToClient(pClient, 1, (xEvent *) &ev); } DamageNoteCritical(pClient); } static void DamageExtReport(DamagePtr pDamage, RegionPtr pRegion, void *closure) { DamageExtPtr pDamageExt = closure; switch (pDamageExt->level) { case DamageReportRawRegion: case DamageReportDeltaRegion: DamageExtNotify(pDamageExt, RegionRects(pRegion), RegionNumRects(pRegion)); break; case DamageReportBoundingBox: DamageExtNotify(pDamageExt, RegionExtents(pRegion), 1); break; case DamageReportNonEmpty: DamageExtNotify(pDamageExt, NullBox, 0); break; case DamageReportNone: break; } } static void DamageExtDestroy(DamagePtr pDamage, void *closure) { DamageExtPtr pDamageExt = closure; pDamageExt->pDamage = 0; if (pDamageExt->id) FreeResource(pDamageExt->id, RT_NONE); } void DamageExtSetCritical(ClientPtr pClient, Bool critical) { DamageClientPtr pDamageClient = GetDamageClient(pClient); if (pDamageClient) pDamageClient->critical += critical ? 1 : -1; } static int ProcDamageQueryVersion(ClientPtr client) { DamageClientPtr pDamageClient = GetDamageClient(client); xDamageQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; REQUEST(xDamageQueryVersionReq); REQUEST_SIZE_MATCH(xDamageQueryVersionReq); if (stuff->majorVersion < SERVER_DAMAGE_MAJOR_VERSION) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { rep.majorVersion = SERVER_DAMAGE_MAJOR_VERSION; if (stuff->majorVersion == SERVER_DAMAGE_MAJOR_VERSION && stuff->minorVersion < SERVER_DAMAGE_MINOR_VERSION) rep.minorVersion = stuff->minorVersion; else rep.minorVersion = SERVER_DAMAGE_MINOR_VERSION; } pDamageClient->major_version = rep.majorVersion; pDamageClient->minor_version = rep.minorVersion; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xDamageQueryVersionReply), &rep); return Success; } static void DamageExtRegister(DrawablePtr pDrawable, DamagePtr pDamage, Bool report) { DamageSetReportAfterOp(pDamage, TRUE); DamageRegister(pDrawable, pDamage); if (report) { RegionPtr pRegion = &((WindowPtr) pDrawable)->borderClip; RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); DamageReportDamage(pDamage, pRegion); RegionTranslate(pRegion, pDrawable->x, pDrawable->y); } } static DamageExtPtr DamageExtCreate(DrawablePtr pDrawable, DamageReportLevel level, ClientPtr client, XID id, XID drawable) { DamageExtPtr pDamageExt = malloc(sizeof(DamageExtRec)); if (!pDamageExt) return NULL; pDamageExt->id = id; pDamageExt->drawable = drawable; pDamageExt->pDrawable = pDrawable; pDamageExt->level = level; pDamageExt->pClient = client; pDamageExt->pDamage = DamageCreate(DamageExtReport, DamageExtDestroy, level, FALSE, pDrawable->pScreen, pDamageExt); if (!pDamageExt->pDamage) { free(pDamageExt); return NULL; } if (!AddResource(id, DamageExtType, (void *) pDamageExt)) return NULL; DamageExtRegister(pDrawable, pDamageExt->pDamage, pDrawable->type == DRAWABLE_WINDOW); return pDamageExt; } static DamageExtPtr doDamageCreate(ClientPtr client, int *rc) { DrawablePtr pDrawable; DamageExtPtr pDamageExt; DamageReportLevel level; REQUEST(xDamageCreateReq); *rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixGetAttrAccess | DixReadAccess); if (*rc != Success) return NULL; switch (stuff->level) { case XDamageReportRawRectangles: level = DamageReportRawRegion; break; case XDamageReportDeltaRectangles: level = DamageReportDeltaRegion; break; case XDamageReportBoundingBox: level = DamageReportBoundingBox; break; case XDamageReportNonEmpty: level = DamageReportNonEmpty; break; default: client->errorValue = stuff->level; *rc = BadValue; return NULL; } pDamageExt = DamageExtCreate(pDrawable, level, client, stuff->damage, stuff->drawable); if (!pDamageExt) *rc = BadAlloc; return pDamageExt; } static int ProcDamageCreate(ClientPtr client) { int rc; REQUEST(xDamageCreateReq); REQUEST_SIZE_MATCH(xDamageCreateReq); LEGAL_NEW_RESOURCE(stuff->damage, client); doDamageCreate(client, &rc); return rc; } static int ProcDamageDestroy(ClientPtr client) { REQUEST(xDamageDestroyReq); DamageExtPtr pDamageExt; REQUEST_SIZE_MATCH(xDamageDestroyReq); VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); FreeResource(stuff->damage, RT_NONE); return Success; } #ifdef PANORAMIX static RegionPtr DamageExtSubtractWindowClip(DamageExtPtr pDamageExt) { WindowPtr win = (WindowPtr)pDamageExt->pDrawable; PanoramiXRes *res = NULL; RegionPtr ret; int i; if (!win->parent) return &PanoramiXScreenRegion; dixLookupResourceByType((void **)&res, win->drawable.id, XRT_WINDOW, serverClient, DixReadAccess); if (!res) return NULL; ret = RegionCreate(NULL, 0); if (!ret) return NULL; FOR_NSCREENS_FORWARD(i) { ScreenPtr screen; if (Success != dixLookupWindow(&win, res->info[i].id, serverClient, DixReadAccess)) goto out; screen = win->drawable.pScreen; RegionTranslate(ret, -screen->x, -screen->y); if (!RegionUnion(ret, ret, &win->borderClip)) goto out; RegionTranslate(ret, screen->x, screen->y); } return ret; out: RegionDestroy(ret); return NULL; } static void DamageExtFreeWindowClip(RegionPtr reg) { if (reg != &PanoramiXScreenRegion) RegionDestroy(reg); } #endif /* * DamageSubtract intersects with borderClip, so we must reconstruct the * protocol's perspective of same... */ static Bool DamageExtSubtract(DamageExtPtr pDamageExt, const RegionPtr pRegion) { DamagePtr pDamage = pDamageExt->pDamage; #ifdef PANORAMIX if (!noPanoramiXExtension) { RegionPtr damage = DamageRegion(pDamage); RegionSubtract(damage, damage, pRegion); if (pDamageExt->pDrawable->type == DRAWABLE_WINDOW) { DrawablePtr pDraw = pDamageExt->pDrawable; RegionPtr clip = DamageExtSubtractWindowClip(pDamageExt); if (clip) { RegionTranslate(clip, -pDraw->x, -pDraw->y); RegionIntersect(damage, damage, clip); RegionTranslate(clip, pDraw->x, pDraw->y); DamageExtFreeWindowClip(clip); } } return RegionNotEmpty(damage); } #endif return DamageSubtract(pDamage, pRegion); } static int ProcDamageSubtract(ClientPtr client) { REQUEST(xDamageSubtractReq); DamageExtPtr pDamageExt; RegionPtr pRepair; RegionPtr pParts; REQUEST_SIZE_MATCH(xDamageSubtractReq); VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess); VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess); if (pDamageExt->level != DamageReportRawRegion) { DamagePtr pDamage = pDamageExt->pDamage; if (pRepair) { if (pParts) RegionIntersect(pParts, DamageRegion(pDamage), pRepair); if (DamageExtSubtract(pDamageExt, pRepair)) DamageExtReport(pDamage, DamageRegion(pDamage), (void *) pDamageExt); } else { if (pParts) RegionCopy(pParts, DamageRegion(pDamage)); DamageEmpty(pDamage); } } return Success; } static int ProcDamageAdd(ClientPtr client) { REQUEST(xDamageAddReq); DrawablePtr pDrawable; RegionPtr pRegion; int rc; REQUEST_SIZE_MATCH(xDamageAddReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixWriteAccess); if (rc != Success) return rc; /* The region is relative to the drawable origin, so translate it out to * screen coordinates like damage expects. */ RegionTranslate(pRegion, pDrawable->x, pDrawable->y); DamageDamageRegion(pDrawable, pRegion); RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); return Success; } /* Major version controls available requests */ static const int version_requests[] = { X_DamageQueryVersion, /* before client sends QueryVersion */ X_DamageAdd, /* Version 1 */ }; static int (*ProcDamageVector[XDamageNumberRequests]) (ClientPtr) = { /*************** Version 1 ******************/ ProcDamageQueryVersion, ProcDamageCreate, ProcDamageDestroy, ProcDamageSubtract, /*************** Version 1.1 ****************/ ProcDamageAdd, }; static int ProcDamageDispatch(ClientPtr client) { REQUEST(xDamageReq); DamageClientPtr pDamageClient = GetDamageClient(client); if (pDamageClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->damageReqType > version_requests[pDamageClient->major_version]) return BadRequest; return (*ProcDamageVector[stuff->damageReqType]) (client); } static int _X_COLD SProcDamageQueryVersion(ClientPtr client) { REQUEST(xDamageQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDamageQueryVersionReq); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*ProcDamageVector[stuff->damageReqType]) (client); } static int _X_COLD SProcDamageCreate(ClientPtr client) { REQUEST(xDamageCreateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDamageCreateReq); swapl(&stuff->damage); swapl(&stuff->drawable); return (*ProcDamageVector[stuff->damageReqType]) (client); } static int _X_COLD SProcDamageDestroy(ClientPtr client) { REQUEST(xDamageDestroyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDamageDestroyReq); swapl(&stuff->damage); return (*ProcDamageVector[stuff->damageReqType]) (client); } static int _X_COLD SProcDamageSubtract(ClientPtr client) { REQUEST(xDamageSubtractReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDamageSubtractReq); swapl(&stuff->damage); swapl(&stuff->repair); swapl(&stuff->parts); return (*ProcDamageVector[stuff->damageReqType]) (client); } static int _X_COLD SProcDamageAdd(ClientPtr client) { REQUEST(xDamageAddReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDamageSubtractReq); swapl(&stuff->drawable); swapl(&stuff->region); return (*ProcDamageVector[stuff->damageReqType]) (client); } static int (*SProcDamageVector[XDamageNumberRequests]) (ClientPtr) = { /*************** Version 1 ******************/ SProcDamageQueryVersion, SProcDamageCreate, SProcDamageDestroy, SProcDamageSubtract, /*************** Version 1.1 ****************/ SProcDamageAdd, }; static int _X_COLD SProcDamageDispatch(ClientPtr client) { REQUEST(xDamageReq); DamageClientPtr pDamageClient = GetDamageClient(client); if (pDamageClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->damageReqType > version_requests[pDamageClient->major_version]) return BadRequest; return (*SProcDamageVector[stuff->damageReqType]) (client); } static int FreeDamageExt(void *value, XID did) { DamageExtPtr pDamageExt = (DamageExtPtr) value; /* * Get rid of the resource table entry hanging from the window id */ pDamageExt->id = 0; if (pDamageExt->pDamage) { DamageDestroy(pDamageExt->pDamage); } free(pDamageExt); return Success; } static void _X_COLD SDamageNotifyEvent(xDamageNotifyEvent * from, xDamageNotifyEvent * to) { to->type = from->type; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->drawable, to->drawable); cpswapl(from->damage, to->damage); cpswaps(from->area.x, to->area.x); cpswaps(from->area.y, to->area.y); cpswaps(from->area.width, to->area.width); cpswaps(from->area.height, to->area.height); cpswaps(from->geometry.x, to->geometry.x); cpswaps(from->geometry.y, to->geometry.y); cpswaps(from->geometry.width, to->geometry.width); cpswaps(from->geometry.height, to->geometry.height); } #ifdef PANORAMIX static void PanoramiXDamageReport(DamagePtr pDamage, RegionPtr pRegion, void *closure) { PanoramiXDamageRes *res = closure; DamageExtPtr pDamageExt = res->ext; WindowPtr pWin = (WindowPtr)pDamage->pDrawable; ScreenPtr pScreen = pDamage->pScreen; /* happens on unmap? sigh xinerama */ if (RegionNil(pRegion)) return; /* translate root windows if necessary */ if (!pWin->parent) RegionTranslate(pRegion, pScreen->x, pScreen->y); /* add our damage to the protocol view */ DamageReportDamage(pDamageExt->pDamage, pRegion); /* empty our view */ DamageEmpty(pDamage); } static void PanoramiXDamageExtDestroy(DamagePtr pDamage, void *closure) { PanoramiXDamageRes *damage = closure; damage->damage[pDamage->pScreen->myNum] = NULL; } static int PanoramiXDamageCreate(ClientPtr client) { PanoramiXDamageRes *damage; PanoramiXRes *draw; int i, rc; REQUEST(xDamageCreateReq); REQUEST_SIZE_MATCH(xDamageCreateReq); LEGAL_NEW_RESOURCE(stuff->damage, client); rc = dixLookupResourceByClass((void **)&draw, stuff->drawable, XRC_DRAWABLE, client, DixGetAttrAccess | DixReadAccess); if (rc != Success) return rc; if (!(damage = calloc(1, sizeof(PanoramiXDamageRes)))) return BadAlloc; if (!AddResource(stuff->damage, XRT_DAMAGE, damage)) return BadAlloc; damage->ext = doDamageCreate(client, &rc); if (rc == Success && draw->type == XRT_WINDOW) { FOR_NSCREENS_FORWARD(i) { DrawablePtr pDrawable; DamagePtr pDamage = DamageCreate(PanoramiXDamageReport, PanoramiXDamageExtDestroy, DamageReportRawRegion, FALSE, screenInfo.screens[i], damage); if (!pDamage) { rc = BadAlloc; } else { damage->damage[i] = pDamage; rc = dixLookupDrawable(&pDrawable, draw->info[i].id, client, M_WINDOW, DixGetAttrAccess | DixReadAccess); } if (rc != Success) break; DamageExtRegister(pDrawable, pDamage, i != 0); } } if (rc != Success) FreeResource(stuff->damage, RT_NONE); return rc; } static int PanoramiXDamageDelete(void *res, XID id) { int i; PanoramiXDamageRes *damage = res; FOR_NSCREENS_BACKWARD(i) { if (damage->damage[i]) { DamageDestroy(damage->damage[i]); damage->damage[i] = NULL; } } free(damage); return 1; } void PanoramiXDamageInit(void) { XRT_DAMAGE = CreateNewResourceType(PanoramiXDamageDelete, "XineramaDamage"); if (!XRT_DAMAGE) FatalError("Couldn't Xineramify Damage extension\n"); PanoramiXSaveDamageCreate = ProcDamageVector[X_DamageCreate]; ProcDamageVector[X_DamageCreate] = PanoramiXDamageCreate; } void PanoramiXDamageReset(void) { ProcDamageVector[X_DamageCreate] = PanoramiXSaveDamageCreate; } #endif /* PANORAMIX */ void DamageExtensionInit(void) { ExtensionEntry *extEntry; int s; for (s = 0; s < screenInfo.numScreens; s++) DamageSetup(screenInfo.screens[s]); DamageExtType = CreateNewResourceType(FreeDamageExt, "DamageExt"); if (!DamageExtType) return; if (!dixRegisterPrivateKey (&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(DamageClientRec))) return; if ((extEntry = AddExtension(DAMAGE_NAME, XDamageNumberEvents, XDamageNumberErrors, ProcDamageDispatch, SProcDamageDispatch, NULL, StandardMinorOpcode)) != 0) { DamageReqCode = (unsigned char) extEntry->base; DamageEventBase = extEntry->eventBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; SetResourceTypeErrorValue(DamageExtType, extEntry->errorBase + BadDamage); #ifdef PANORAMIX if (XRT_DAMAGE) SetResourceTypeErrorValue(XRT_DAMAGE, extEntry->errorBase + BadDamage); #endif } } xorg-server-21.1.16/damageext/damageextint.h0000644000175000017500000000457014757411105014423 /* * Copyright © 2002 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 #endif #ifndef _DAMAGEEXTINT_H_ #define _DAMAGEEXTINT_H_ #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include #include "windowstr.h" #include "selection.h" #include "scrnintstr.h" #include "damage.h" #include "xfixes.h" typedef struct _DamageClient { CARD32 major_version; CARD32 minor_version; int critical; } DamageClientRec, *DamageClientPtr; #define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey)) typedef struct _DamageExt { DamagePtr pDamage; DrawablePtr pDrawable; DamageReportLevel level; ClientPtr pClient; XID id; XID drawable; } DamageExtRec, *DamageExtPtr; #define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ int rc = dixLookupResourceByType((void **)&(pDamageExt), rid, \ DamageExtType, client, mode); \ if (rc != Success) \ return rc; \ } void DamageExtSetCritical(ClientPtr pClient, Bool critical); void PanoramiXDamageInit(void); void PanoramiXDamageReset(void); #endif /* _DAMAGEEXTINT_H_ */ xorg-server-21.1.16/dbe/0000755000175000017500000000000014757411133010446 5xorg-server-21.1.16/dbe/meson.build0000644000175000017500000000040414757411105012525 srcs_dbe = [ 'dbe.c', 'midbe.c', ] hdrs_dbe = [ 'dbestruct.h', ] libxserver_dbe = static_library('libxserver_dbe', srcs_dbe, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_dbe, install_dir: xorgsdkdir) endif xorg-server-21.1.16/dbe/Makefile.am0000644000175000017500000000025414757411105012422 noinst_LTLIBRARIES = libdbe.la AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = dbestruct.h endif libdbe_la_SOURCES = \ dbe.c \ midbe.c \ midbe.h xorg-server-21.1.16/dbe/dbestruct.h0000644000175000017500000001622114757411105012537 /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard * Company 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 Hewlett-Packard Company. * * Header file for DIX-related DBE * *****************************************************************************/ #ifndef DBE_STRUCT_H #define DBE_STRUCT_H /* INCLUDES */ #define NEED_DBE_PROTOCOL #include #include "windowstr.h" #include "privates.h" typedef struct { VisualID visual; /* one visual ID that supports double-buffering */ int depth; /* depth of visual in bits */ int perflevel; /* performance level of visual */ } XdbeVisualInfo; typedef struct { int count; /* number of items in visual_depth */ XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */ } XdbeScreenVisualInfo; /* DEFINES */ #define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, dbeScreenPrivKey)) #define DBE_SCREEN_PRIV_FROM_DRAWABLE(pDrawable) \ DBE_SCREEN_PRIV((pDrawable)->pScreen) #define DBE_SCREEN_PRIV_FROM_WINDOW_PRIV(pDbeWindowPriv) \ DBE_SCREEN_PRIV((pDbeWindowPriv)->pWindow->drawable.pScreen) #define DBE_SCREEN_PRIV_FROM_WINDOW(pWindow) \ DBE_SCREEN_PRIV((pWindow)->drawable.pScreen) #define DBE_SCREEN_PRIV_FROM_PIXMAP(pPixmap) \ DBE_SCREEN_PRIV((pPixmap)->drawable.pScreen) #define DBE_SCREEN_PRIV_FROM_GC(pGC)\ DBE_SCREEN_PRIV((pGC)->pScreen) #define DBE_WINDOW_PRIV(pWin) ((DbeWindowPrivPtr) \ dixLookupPrivate(&(pWin)->devPrivates, dbeWindowPrivKey)) /* Initial size of the buffer ID array in the window priv. */ #define DBE_INIT_MAX_IDS 2 /* Reallocation increment for the buffer ID array. */ #define DBE_INCR_MAX_IDS 4 /* Marker for free elements in the buffer ID array. */ #define DBE_FREE_ID_ELEMENT 0 /* TYPEDEFS */ /* Record used to pass swap information between DIX and DDX swapping * procedures. */ typedef struct _DbeSwapInfoRec { WindowPtr pWindow; unsigned char swapAction; } DbeSwapInfoRec, *DbeSwapInfoPtr; /* ****************************************************************************** ** Per-window data ****************************************************************************** */ typedef struct _DbeWindowPrivRec { /* A pointer to the window with which the DBE window private (buffer) is * associated. */ WindowPtr pWindow; /* Last known swap action for this buffer. Legal values for this field * are XdbeUndefined, XdbeBackground, XdbeUntouched, and XdbeCopied. */ unsigned char swapAction; /* Last known buffer size. */ unsigned short width, height; /* Coordinates used for static gravity when the window is positioned. */ short x, y; /* Number of XIDs associated with this buffer. */ int nBufferIDs; /* Capacity of the current buffer ID array, IDs. */ int maxAvailableIDs; /* Pointer to the array of buffer IDs. This initially points to initIDs. * When the static limit of the initIDs array is reached, the array is * reallocated and this pointer is set to the new array instead of initIDs. */ XID *IDs; /* Initial array of buffer IDs. We are defining the XID array within the * window priv to optimize for data locality. In most cases, only one * buffer will be associated with a window. Having the array declared * here can prevent us from accessing the data in another memory page, * possibly resulting in a page swap and loss of performance. Initially we * will use this array to store buffer IDs. For situations where we have * more IDs than can fit in this static array, we will allocate a larger * array to use, possibly suffering a performance loss. */ XID initIDs[DBE_INIT_MAX_IDS]; /* Pointer to a drawable that contains the contents of the back buffer. */ PixmapPtr pBackBuffer; /* Pointer to a drawable that contains the contents of the front buffer. * This pointer is only used for the XdbeUntouched swap action. For that * swap action, we need to copy the front buffer (window) contents into * this drawable, copy the contents of current back buffer drawable (the * back buffer) into the window, swap the front and back drawable pointers, * and then swap the drawable/resource associations in the resource * database. */ PixmapPtr pFrontBuffer; /* Device-specific private information. */ PrivateRec *devPrivates; } DbeWindowPrivRec, *DbeWindowPrivPtr; /* ****************************************************************************** ** Per-screen data ****************************************************************************** */ typedef struct _DbeScreenPrivRec { /* Wrapped functions * It is the responsibility of the DDX layer to wrap PositionWindow(). * DbeExtensionInit wraps DestroyWindow(). */ PositionWindowProcPtr PositionWindow; DestroyWindowProcPtr DestroyWindow; /* Per-screen DIX routines */ Bool (*SetupBackgroundPainter) (WindowPtr /*pWin */ , GCPtr /*pGC */ ); /* Per-screen DDX routines */ Bool (*GetVisualInfo) (ScreenPtr /*pScreen */ , XdbeScreenVisualInfo * /*pVisInfo */ ); int (*AllocBackBufferName) (WindowPtr /*pWin */ , XID /*bufId */ , int /*swapAction */ ); int (*SwapBuffers) (ClientPtr /*client */ , int * /*pNumWindows */ , DbeSwapInfoPtr /*swapInfo */ ); void (*WinPrivDelete) (DbeWindowPrivPtr /*pDbeWindowPriv */ , XID /*bufId */ ); } DbeScreenPrivRec, *DbeScreenPrivPtr; #endif /* DBE_STRUCT_H */ xorg-server-21.1.16/dbe/Makefile.in0000644000175000017500000006540414757411114012443 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = dbe ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdbe_la_LIBADD = am_libdbe_la_OBJECTS = dbe.lo midbe.lo libdbe_la_OBJECTS = $(am_libdbe_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dbe.Plo ./$(DEPDIR)/midbe.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdbe_la_SOURCES) DIST_SOURCES = $(libdbe_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = dbestruct.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdbe.la AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = dbestruct.h libdbe_la_SOURCES = \ dbe.c \ midbe.c \ midbe.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dbe/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dbe/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdbe.la: $(libdbe_la_OBJECTS) $(libdbe_la_DEPENDENCIES) $(EXTRA_libdbe_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdbe_la_OBJECTS) $(libdbe_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dbe.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midbe.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dbe.Plo -rm -f ./$(DEPDIR)/midbe.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dbe.Plo -rm -f ./$(DEPDIR)/midbe.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/dbe/dbe.c0000644000175000017500000013304414757411105011270 /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard * Company 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 Hewlett-Packard Company. * * DIX DBE code * *****************************************************************************/ /* INCLUDES */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include "scrnintstr.h" #include "extnsionst.h" #include "extinit.h" #include "gcstruct.h" #include "dixstruct.h" #define NEED_DBE_PROTOCOL #include "dbestruct.h" #include "midbe.h" #include "xace.h" /* GLOBALS */ /* These are globals for use by DDX */ DevPrivateKeyRec dbeScreenPrivKeyRec; DevPrivateKeyRec dbeWindowPrivKeyRec; /* These are globals for use by DDX */ RESTYPE dbeDrawableResType; RESTYPE dbeWindowPrivResType; /* Used to generate DBE's BadBuffer error. */ static int dbeErrorBase; /****************************************************************************** * * DBE DIX Procedure: DbeStubScreen * * Description: * * This is function stubs the function pointers in the given DBE screen * private and increments the number of stubbed screens. * *****************************************************************************/ static void DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) { /* Stub DIX. */ pDbeScreenPriv->SetupBackgroundPainter = NULL; /* Do not unwrap PositionWindow nor DestroyWindow. If the DDX * initialization function failed, we assume that it did not wrap * PositionWindow. Also, DestroyWindow is only wrapped if the DDX * initialization function succeeded. */ /* Stub DDX. */ pDbeScreenPriv->GetVisualInfo = NULL; pDbeScreenPriv->AllocBackBufferName = NULL; pDbeScreenPriv->SwapBuffers = NULL; pDbeScreenPriv->WinPrivDelete = NULL; (*nStubbedScreens)++; } /* DbeStubScreen() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetVersion * * Description: * * This function is for processing a DbeGetVersion request. * This request returns the major and minor version numbers of this * extension. * * Return Values: * * Success * *****************************************************************************/ static int ProcDbeGetVersion(ClientPtr client) { /* REQUEST(xDbeGetVersionReq); */ xDbeGetVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = DBE_MAJOR_VERSION, .minorVersion = DBE_MINOR_VERSION }; REQUEST_SIZE_MATCH(xDbeGetVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xDbeGetVersionReply), &rep); return Success; } /* ProcDbeGetVersion() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeAllocateBackBufferName * * Description: * * This function is for processing a DbeAllocateBackBufferName request. * This request allocates a drawable ID used to refer to the back buffer * of a window. * * Return Values: * * BadAlloc - server can not allocate resources * BadIDChoice - id is out of range for client; id is already in use * BadMatch - window is not an InputOutput window; * visual of window is not on list returned by * DBEGetVisualInfo; * BadValue - invalid swap action is specified * BadWindow - window is not a valid window * Success * *****************************************************************************/ static int ProcDbeAllocateBackBufferName(ClientPtr client) { REQUEST(xDbeAllocateBackBufferNameReq); WindowPtr pWin; DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv; XdbeScreenVisualInfo scrVisInfo; register int i; Bool visualMatched = FALSE; xDbeSwapAction swapAction; VisualID visual; int status; int add_index; REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); /* The window must be valid. */ status = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (status != Success) return status; /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) { return BadMatch; } /* The swap action must be valid. */ swapAction = stuff->swapAction; /* use local var for performance. */ if ((swapAction != XdbeUndefined) && (swapAction != XdbeBackground) && (swapAction != XdbeUntouched) && (swapAction != XdbeCopied)) { return BadValue; } /* The id must be in range and not already in use. */ LEGAL_NEW_RESOURCE(stuff->buffer, client); /* The visual of the window must be in the list returned by * GetVisualInfo. */ pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); if (!pDbeScreenPriv->GetVisualInfo) return BadMatch; /* screen doesn't support double buffering */ if (!(*pDbeScreenPriv->GetVisualInfo) (pWin->drawable.pScreen, &scrVisInfo)) { /* GetVisualInfo() failed to allocate visual info data. */ return BadAlloc; } /* See if the window's visual is on the list. */ visual = wVisual(pWin); for (i = 0; (i < scrVisInfo.count) && !visualMatched; i++) { if (scrVisInfo.visinfo[i].visual == visual) { visualMatched = TRUE; } } /* Free what was allocated by the GetVisualInfo() call above. */ free(scrVisInfo.visinfo); if (!visualMatched) { return BadMatch; } if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) == NULL) { /* There is no buffer associated with the window. * Allocate a window priv. */ pDbeWindowPriv = calloc(1, sizeof(DbeWindowPrivRec)); if (!pDbeWindowPriv) return BadAlloc; /* Fill out window priv information. */ pDbeWindowPriv->pWindow = pWin; pDbeWindowPriv->width = pWin->drawable.width; pDbeWindowPriv->height = pWin->drawable.height; pDbeWindowPriv->x = pWin->drawable.x; pDbeWindowPriv->y = pWin->drawable.y; pDbeWindowPriv->nBufferIDs = 0; /* Set the buffer ID array pointer to the initial (static) array). */ pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; /* Initialize the buffer ID list. */ pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; pDbeWindowPriv->IDs[0] = stuff->buffer; add_index = 0; for (i = 0; i < DBE_INIT_MAX_IDS; i++) { pDbeWindowPriv->IDs[i] = DBE_FREE_ID_ELEMENT; } /* Actually connect the window priv to the window. */ dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, pDbeWindowPriv); } /* if -- There is no buffer associated with the window. */ else { /* A buffer is already associated with the window. * Add the new buffer ID to the array, reallocating the array memory * if necessary. */ /* Determine if there is a free element in the ID array. */ for (i = 0; i < pDbeWindowPriv->maxAvailableIDs; i++) { if (pDbeWindowPriv->IDs[i] == DBE_FREE_ID_ELEMENT) { /* There is still room in the ID array. */ break; } } if (i == pDbeWindowPriv->maxAvailableIDs) { /* No more room in the ID array -- reallocate another array. */ XID *pIDs; /* Setup an array pointer for the realloc operation below. */ if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) { /* We will malloc a new array. */ pIDs = NULL; } else { /* We will realloc a new array. */ pIDs = pDbeWindowPriv->IDs; } /* malloc/realloc a new array and initialize all elements to 0. */ pDbeWindowPriv->IDs = reallocarray(pIDs, pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS, sizeof(XID)); if (!pDbeWindowPriv->IDs) { return BadAlloc; } memset(&pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs], 0, (pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS - pDbeWindowPriv->nBufferIDs) * sizeof(XID)); if (pDbeWindowPriv->maxAvailableIDs == DBE_INIT_MAX_IDS) { /* We just went from using the initial (static) array to a * newly allocated array. Copy the IDs from the initial array * to the new array. */ memcpy(pDbeWindowPriv->IDs, pDbeWindowPriv->initIDs, DBE_INIT_MAX_IDS * sizeof(XID)); } pDbeWindowPriv->maxAvailableIDs += DBE_INCR_MAX_IDS; } add_index = i; } /* else -- A buffer is already associated with the window. */ /* Call the DDX routine to allocate the back buffer. */ status = (*pDbeScreenPriv->AllocBackBufferName) (pWin, stuff->buffer, stuff->swapAction); if (status == Success) { pDbeWindowPriv->IDs[add_index] = stuff->buffer; if (!AddResource(stuff->buffer, dbeWindowPrivResType, (void *) pDbeWindowPriv)) { pDbeWindowPriv->IDs[add_index] = DBE_FREE_ID_ELEMENT; if (pDbeWindowPriv->nBufferIDs == 0) { status = BadAlloc; goto out_free; } } } else { /* The DDX buffer allocation routine failed for the first buffer of * this window. */ if (pDbeWindowPriv->nBufferIDs == 0) { goto out_free; } } /* Increment the number of buffers (XIDs) associated with this window. */ pDbeWindowPriv->nBufferIDs++; /* Set swap action on all calls. */ pDbeWindowPriv->swapAction = stuff->swapAction; return status; out_free: dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, NULL); free(pDbeWindowPriv); return status; } /* ProcDbeAllocateBackBufferName() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeDeallocateBackBufferName * * Description: * * This function is for processing a DbeDeallocateBackBufferName request. * This request frees a drawable ID that was obtained by a * DbeAllocateBackBufferName request. * * Return Values: * * BadBuffer - buffer to deallocate is not associated with a window * Success * *****************************************************************************/ static int ProcDbeDeallocateBackBufferName(ClientPtr client) { REQUEST(xDbeDeallocateBackBufferNameReq); DbeWindowPrivPtr pDbeWindowPriv; int rc, i; void *val; REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); /* Buffer name must be valid */ rc = dixLookupResourceByType((void **) &pDbeWindowPriv, stuff->buffer, dbeWindowPrivResType, client, DixDestroyAccess); if (rc != Success) return rc; rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, client, DixDestroyAccess); if (rc != Success) return rc; /* Make sure that the id is valid for the window. * This is paranoid code since we already looked up the ID by type * above. */ for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) { /* Loop through the ID list to find the ID. */ if (pDbeWindowPriv->IDs[i] == stuff->buffer) { break; } } if (i == pDbeWindowPriv->nBufferIDs) { /* We did not find the ID in the ID list. */ client->errorValue = stuff->buffer; return dbeErrorBase + DbeBadBuffer; } FreeResource(stuff->buffer, RT_NONE); return Success; } /* ProcDbeDeallocateBackBufferName() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeSwapBuffers * * Description: * * This function is for processing a DbeSwapBuffers request. * This request swaps the buffers for all windows listed, applying the * appropriate swap action for each window. * * Return Values: * * BadAlloc - local allocation failed; this return value is not defined * by the protocol * BadMatch - a window in request is not double-buffered; a window in * request is listed more than once * BadValue - invalid swap action is specified; no swap action is * specified * BadWindow - a window in request is not valid * Success * *****************************************************************************/ static int ProcDbeSwapBuffers(ClientPtr client) { REQUEST(xDbeSwapBuffersReq); WindowPtr pWin; DbeScreenPrivPtr pDbeScreenPriv; DbeSwapInfoPtr swapInfo; xDbeSwapInfo *dbeSwapInfo; int error; unsigned int i, j; unsigned int nStuff; int nStuff_i; /* DDX API requires int for nStuff */ REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); nStuff = stuff->n; /* use local variable for performance. */ if (nStuff == 0) { REQUEST_SIZE_MATCH(xDbeSwapBuffersReq); return Success; } if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec)) return BadAlloc; REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, nStuff * sizeof(xDbeSwapInfo)); /* Get to the swap info appended to the end of the request. */ dbeSwapInfo = (xDbeSwapInfo *) &stuff[1]; /* Allocate array to record swap information. */ swapInfo = xallocarray(nStuff, sizeof(DbeSwapInfoRec)); if (swapInfo == NULL) { return BadAlloc; } for (i = 0; i < nStuff; i++) { /* Check all windows to swap. */ /* Each window must be a valid window - BadWindow. */ error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, DixWriteAccess); if (error != Success) { free(swapInfo); return error; } /* Each window must be double-buffered - BadMatch. */ if (DBE_WINDOW_PRIV(pWin) == NULL) { free(swapInfo); return BadMatch; } /* Each window must only be specified once - BadMatch. */ for (j = i + 1; j < nStuff; j++) { if (dbeSwapInfo[i].window == dbeSwapInfo[j].window) { free(swapInfo); return BadMatch; } } /* Each swap action must be valid - BadValue. */ if ((dbeSwapInfo[i].swapAction != XdbeUndefined) && (dbeSwapInfo[i].swapAction != XdbeBackground) && (dbeSwapInfo[i].swapAction != XdbeUntouched) && (dbeSwapInfo[i].swapAction != XdbeCopied)) { free(swapInfo); return BadValue; } /* Everything checks out OK. Fill in the swap info array. */ swapInfo[i].pWindow = pWin; swapInfo[i].swapAction = dbeSwapInfo[i].swapAction; } /* for (i = 0; i < nStuff; i++) */ /* Call the DDX routine to perform the swap(s). The DDX routine should * scan the swap list (swap info), swap any buffers that it knows how to * handle, delete them from the list, and update nStuff to indicate how * many windows it did not handle. * * This scheme allows a range of sophistication in the DDX SwapBuffers() * implementation. Naive implementations could just swap the first buffer * in the list, move the last buffer to the front, decrement nStuff, and * return. The next level of sophistication could be to scan the whole * list for windows on the same screen. Up another level, the DDX routine * could deal with cross-screen synchronization. */ nStuff_i = nStuff; while (nStuff_i > 0) { pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(swapInfo[0].pWindow); error = (*pDbeScreenPriv->SwapBuffers) (client, &nStuff_i, swapInfo); if (error != Success) { free(swapInfo); return error; } } free(swapInfo); return Success; } /* ProcDbeSwapBuffers() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetVisualInfo * * Description: * * This function is for processing a ProcDbeGetVisualInfo request. * This request returns information about which visuals support * double buffering. * * Return Values: * * BadDrawable - value in screen specifiers is not a valid drawable * Success * *****************************************************************************/ static int ProcDbeGetVisualInfo(ClientPtr client) { REQUEST(xDbeGetVisualInfoReq); DbeScreenPrivPtr pDbeScreenPriv; xDbeGetVisualInfoReply rep; Drawable *drawables; DrawablePtr *pDrawables = NULL; register int i, j, rc; register int count; /* number of visual infos in reply */ register int length; /* length of reply */ ScreenPtr pScreen; XdbeScreenVisualInfo *pScrVisInfo; REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); if (stuff->n > UINT32_MAX / sizeof(CARD32)) return BadLength; REQUEST_FIXED_SIZE(xDbeGetVisualInfoReq, stuff->n * sizeof(CARD32)); if (stuff->n > UINT32_MAX / sizeof(DrawablePtr)) return BadAlloc; /* Make sure any specified drawables are valid. */ if (stuff->n != 0) { if (!(pDrawables = xallocarray(stuff->n, sizeof(DrawablePtr)))) { return BadAlloc; } drawables = (Drawable *) &stuff[1]; for (i = 0; i < stuff->n; i++) { rc = dixLookupDrawable(pDrawables + i, drawables[i], client, 0, DixGetAttrAccess); if (rc != Success) { free(pDrawables); return rc; } } } count = (stuff->n == 0) ? screenInfo.numScreens : stuff->n; if (!(pScrVisInfo = calloc(count, sizeof(XdbeScreenVisualInfo)))) { free(pDrawables); return BadAlloc; } length = 0; for (i = 0; i < count; i++) { pScreen = (stuff->n == 0) ? screenInfo.screens[i] : pDrawables[i]->pScreen; pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); if (rc != Success) goto freeScrVisInfo; if (!(*pDbeScreenPriv->GetVisualInfo) (pScreen, &pScrVisInfo[i])) { /* We failed to alloc pScrVisInfo[i].visinfo. */ rc = BadAlloc; /* Free visinfos that we allocated for previous screen infos. */ goto freeScrVisInfo; } /* Account for n, number of xDbeVisInfo items in list. */ length += sizeof(CARD32); /* Account for n xDbeVisInfo items */ length += pScrVisInfo[i].count * sizeof(xDbeVisInfo); } rep = (xDbeGetVisualInfoReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(length), .m = count }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.m); } /* Send off reply. */ WriteToClient(client, sizeof(xDbeGetVisualInfoReply), &rep); for (i = 0; i < count; i++) { CARD32 data32; /* For each screen in the reply, send off the visual info */ /* Send off number of visuals. */ data32 = (CARD32) pScrVisInfo[i].count; if (client->swapped) { swapl(&data32); } WriteToClient(client, sizeof(CARD32), &data32); /* Now send off visual info items. */ for (j = 0; j < pScrVisInfo[i].count; j++) { xDbeVisInfo visInfo; /* Copy the data in the client data structure to a protocol * data structure. We will send data to the client from the * protocol data structure. */ visInfo.visualID = (CARD32) pScrVisInfo[i].visinfo[j].visual; visInfo.depth = (CARD8) pScrVisInfo[i].visinfo[j].depth; visInfo.perfLevel = (CARD8) pScrVisInfo[i].visinfo[j].perflevel; if (client->swapped) { swapl(&visInfo.visualID); /* We do not need to swap depth and perfLevel since they are * already 1 byte quantities. */ } /* Write visualID(32), depth(8), perfLevel(8), and pad(16). */ WriteToClient(client, 2 * sizeof(CARD32), &visInfo.visualID); } } rc = Success; freeScrVisInfo: /* Clean up memory. */ for (i = 0; i < count; i++) { free(pScrVisInfo[i].visinfo); } free(pScrVisInfo); free(pDrawables); return rc; } /* ProcDbeGetVisualInfo() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeGetbackBufferAttributes * * Description: * * This function is for processing a ProcDbeGetbackBufferAttributes * request. This request returns information about a back buffer. * * Return Values: * * Success * *****************************************************************************/ static int ProcDbeGetBackBufferAttributes(ClientPtr client) { REQUEST(xDbeGetBackBufferAttributesReq); xDbeGetBackBufferAttributesReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DbeWindowPrivPtr pDbeWindowPriv; int rc; REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); rc = dixLookupResourceByType((void **) &pDbeWindowPriv, stuff->buffer, dbeWindowPrivResType, client, DixGetAttrAccess); if (rc == Success) { rep.attributes = pDbeWindowPriv->pWindow->drawable.id; } else { rep.attributes = None; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.attributes); } WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), &rep); return Success; } /* ProcDbeGetbackBufferAttributes() */ /****************************************************************************** * * DBE DIX Procedure: ProcDbeDispatch * * Description: * * This function dispatches DBE requests. * *****************************************************************************/ static int ProcDbeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_DbeGetVersion: return (ProcDbeGetVersion(client)); case X_DbeAllocateBackBufferName: return (ProcDbeAllocateBackBufferName(client)); case X_DbeDeallocateBackBufferName: return (ProcDbeDeallocateBackBufferName(client)); case X_DbeSwapBuffers: return (ProcDbeSwapBuffers(client)); case X_DbeBeginIdiom: return Success; case X_DbeEndIdiom: return Success; case X_DbeGetVisualInfo: return (ProcDbeGetVisualInfo(client)); case X_DbeGetBackBufferAttributes: return (ProcDbeGetBackBufferAttributes(client)); default: return BadRequest; } } /* ProcDbeDispatch() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeGetVersion * * Description: * * This function is for processing a DbeGetVersion request on a swapped * server. This request returns the major and minor version numbers of * this extension. * * Return Values: * * Success * *****************************************************************************/ static int _X_COLD SProcDbeGetVersion(ClientPtr client) { REQUEST(xDbeGetVersionReq); swaps(&stuff->length); return (ProcDbeGetVersion(client)); } /* SProcDbeGetVersion() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeAllocateBackBufferName * * Description: * * This function is for processing a DbeAllocateBackBufferName request on * a swapped server. This request allocates a drawable ID used to refer * to the back buffer of a window. * * Return Values: * * BadAlloc - server can not allocate resources * BadIDChoice - id is out of range for client; id is already in use * BadMatch - window is not an InputOutput window; * visual of window is not on list returned by * DBEGetVisualInfo; * BadValue - invalid swap action is specified * BadWindow - window is not a valid window * Success * *****************************************************************************/ static int _X_COLD SProcDbeAllocateBackBufferName(ClientPtr client) { REQUEST(xDbeAllocateBackBufferNameReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); swapl(&stuff->window); swapl(&stuff->buffer); /* stuff->swapAction is a byte. We do not need to swap this field. */ return (ProcDbeAllocateBackBufferName(client)); } /* SProcDbeAllocateBackBufferName() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeDeallocateBackBufferName * * Description: * * This function is for processing a DbeDeallocateBackBufferName request * on a swapped server. This request frees a drawable ID that was * obtained by a DbeAllocateBackBufferName request. * * Return Values: * * BadBuffer - buffer to deallocate is not associated with a window * Success * *****************************************************************************/ static int _X_COLD SProcDbeDeallocateBackBufferName(ClientPtr client) { REQUEST(xDbeDeallocateBackBufferNameReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDbeDeallocateBackBufferNameReq); swapl(&stuff->buffer); return (ProcDbeDeallocateBackBufferName(client)); } /* SProcDbeDeallocateBackBufferName() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeSwapBuffers * * Description: * * This function is for processing a DbeSwapBuffers request on a swapped * server. This request swaps the buffers for all windows listed, * applying the appropriate swap action for each window. * * Return Values: * * BadMatch - a window in request is not double-buffered; a window in * request is listed more than once; all windows in request do * not have the same root * BadValue - invalid swap action is specified * BadWindow - a window in request is not valid * Success * *****************************************************************************/ static int _X_COLD SProcDbeSwapBuffers(ClientPtr client) { REQUEST(xDbeSwapBuffersReq); unsigned int i; xDbeSwapInfo *pSwapInfo; swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xDbeSwapBuffersReq); swapl(&stuff->n); if (stuff->n > UINT32_MAX / sizeof(DbeSwapInfoRec)) return BadLength; REQUEST_FIXED_SIZE(xDbeSwapBuffersReq, stuff->n * sizeof(xDbeSwapInfo)); if (stuff->n != 0) { pSwapInfo = (xDbeSwapInfo *) stuff + 1; /* The swap info following the fix part of this request is a window(32) * followed by a 1 byte swap action and then 3 pad bytes. We only need * to swap the window information. */ for (i = 0; i < stuff->n; i++) { swapl(&pSwapInfo->window); } } return (ProcDbeSwapBuffers(client)); } /* SProcDbeSwapBuffers() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeGetVisualInfo * * Description: * * This function is for processing a ProcDbeGetVisualInfo request on a * swapped server. This request returns information about which visuals * support double buffering. * * Return Values: * * BadDrawable - value in screen specifiers is not a valid drawable * Success * *****************************************************************************/ static int _X_COLD SProcDbeGetVisualInfo(ClientPtr client) { REQUEST(xDbeGetVisualInfoReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xDbeGetVisualInfoReq); swapl(&stuff->n); SwapRestL(stuff); return (ProcDbeGetVisualInfo(client)); } /* SProcDbeGetVisualInfo() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeGetbackBufferAttributes * * Description: * * This function is for processing a ProcDbeGetbackBufferAttributes * request on a swapped server. This request returns information about a * back buffer. * * Return Values: * * Success * *****************************************************************************/ static int _X_COLD SProcDbeGetBackBufferAttributes(ClientPtr client) { REQUEST(xDbeGetBackBufferAttributesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); swapl(&stuff->buffer); return (ProcDbeGetBackBufferAttributes(client)); } /* SProcDbeGetBackBufferAttributes() */ /****************************************************************************** * * DBE DIX Procedure: SProcDbeDispatch * * Description: * * This function dispatches DBE requests on a swapped server. * *****************************************************************************/ static int _X_COLD SProcDbeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_DbeGetVersion: return (SProcDbeGetVersion(client)); case X_DbeAllocateBackBufferName: return (SProcDbeAllocateBackBufferName(client)); case X_DbeDeallocateBackBufferName: return (SProcDbeDeallocateBackBufferName(client)); case X_DbeSwapBuffers: return (SProcDbeSwapBuffers(client)); case X_DbeBeginIdiom: return Success; case X_DbeEndIdiom: return Success; case X_DbeGetVisualInfo: return (SProcDbeGetVisualInfo(client)); case X_DbeGetBackBufferAttributes: return (SProcDbeGetBackBufferAttributes(client)); default: return BadRequest; } } /* SProcDbeDispatch() */ /****************************************************************************** * * DBE DIX Procedure: DbeSetupBackgroundPainter * * Description: * * This function sets up pGC to clear pixmaps. * * Return Values: * * TRUE - setup was successful * FALSE - the window's background state is NONE * *****************************************************************************/ static Bool DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) { ChangeGCVal gcvalues[4]; int ts_x_origin, ts_y_origin; PixUnion background; int backgroundState; Mask gcmask; /* First take care of any ParentRelative stuff by altering the * tile/stipple origin to match the coordinates of the upper-left * corner of the first ancestor without a ParentRelative background. * This coordinate is, of course, negative. */ ts_x_origin = ts_y_origin = 0; while (pWin->backgroundState == ParentRelative) { ts_x_origin -= pWin->origin.x; ts_y_origin -= pWin->origin.y; pWin = pWin->parent; } backgroundState = pWin->backgroundState; background = pWin->background; switch (backgroundState) { case BackgroundPixel: gcvalues[0].val = background.pixel; gcvalues[1].val = FillSolid; gcmask = GCForeground | GCFillStyle; break; case BackgroundPixmap: gcvalues[0].val = FillTiled; gcvalues[1].ptr = background.pixmap; gcvalues[2].val = ts_x_origin; gcvalues[3].val = ts_y_origin; gcmask = GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; break; default: /* pWin->backgroundState == None */ return FALSE; } return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0; } /* DbeSetupBackgroundPainter() */ /****************************************************************************** * * DBE DIX Procedure: DbeDrawableDelete * * Description: * * This is the resource delete function for dbeDrawableResType. * It is registered when the drawable resource type is created in * DbeExtensionInit(). * * To make resource deletion simple, we do not do anything in this function * and leave all resource deletion to DbeWindowPrivDelete(), which will * eventually be called or already has been called. Deletion functions are * not guaranteed to be called in any particular order. * *****************************************************************************/ static int DbeDrawableDelete(void *pDrawable, XID id) { return Success; } /* DbeDrawableDelete() */ /****************************************************************************** * * DBE DIX Procedure: DbeWindowPrivDelete * * Description: * * This is the resource delete function for dbeWindowPrivResType. * It is registered when the drawable resource type is created in * DbeExtensionInit(). * *****************************************************************************/ static int DbeWindowPrivDelete(void *pDbeWinPriv, XID id) { DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv = (DbeWindowPrivPtr) pDbeWinPriv; int i; /* ************************************************************************** ** Remove the buffer ID from the ID array. ************************************************************************** */ /* Find the ID in the ID array. */ i = 0; while ((i < pDbeWindowPriv->nBufferIDs) && (pDbeWindowPriv->IDs[i] != id)) { i++; } if (i == pDbeWindowPriv->nBufferIDs) { /* We did not find the ID in the array. We should never get here. */ return BadValue; } /* Remove the ID from the array. */ if (i < (pDbeWindowPriv->nBufferIDs - 1)) { /* Compress the buffer ID array, overwriting the ID in the process. */ memmove(&pDbeWindowPriv->IDs[i], &pDbeWindowPriv->IDs[i + 1], (pDbeWindowPriv->nBufferIDs - i - 1) * sizeof(XID)); } else { /* We are removing the last ID in the array, in which case, the * assignment below is all that we need to do. */ } pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs - 1] = DBE_FREE_ID_ELEMENT; pDbeWindowPriv->nBufferIDs--; /* If an extended array was allocated, then check to see if the remaining * buffer IDs will fit in the static array. */ if ((pDbeWindowPriv->maxAvailableIDs > DBE_INIT_MAX_IDS) && (pDbeWindowPriv->nBufferIDs == DBE_INIT_MAX_IDS)) { /* Copy the IDs back into the static array. */ memcpy(pDbeWindowPriv->initIDs, pDbeWindowPriv->IDs, DBE_INIT_MAX_IDS * sizeof(XID)); /* Free the extended array; use the static array. */ free(pDbeWindowPriv->IDs); pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; } /* ************************************************************************** ** Perform DDX level tasks. ************************************************************************** */ pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW_PRIV((DbeWindowPrivPtr) pDbeWindowPriv); (*pDbeScreenPriv->WinPrivDelete) ((DbeWindowPrivPtr) pDbeWindowPriv, id); /* ************************************************************************** ** Perform miscellaneous tasks if this is the last buffer associated ** with the window. ************************************************************************** */ if (pDbeWindowPriv->nBufferIDs == 0) { /* Reset the DBE window priv pointer. */ dixSetPrivate(&pDbeWindowPriv->pWindow->devPrivates, dbeWindowPrivKey, NULL); /* We are done with the window priv. */ free(pDbeWindowPriv); } return Success; } /* DbeWindowPrivDelete() */ /****************************************************************************** * * DBE DIX Procedure: DbeResetProc * * Description: * * This routine is called at the end of every server generation. * It deallocates any memory reserved for the extension and performs any * other tasks related to shutting down the extension. * *****************************************************************************/ static void DbeResetProc(ExtensionEntry * extEntry) { int i; ScreenPtr pScreen; DbeScreenPrivPtr pDbeScreenPriv; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); if (pDbeScreenPriv) { /* Unwrap DestroyWindow, which was wrapped in DbeExtensionInit(). */ pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; free(pDbeScreenPriv); } } } /* DbeResetProc() */ /****************************************************************************** * * DBE DIX Procedure: DbeDestroyWindow * * Description: * * This is the wrapper for pScreen->DestroyWindow. * This function frees buffer resources for a window before it is * destroyed. * *****************************************************************************/ static Bool DbeDestroyWindow(WindowPtr pWin) { DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv; ScreenPtr pScreen; Bool ret; /* ************************************************************************** ** 1. Unwrap the member routine. ************************************************************************** */ pScreen = pWin->drawable.pScreen; pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); pScreen->DestroyWindow = pDbeScreenPriv->DestroyWindow; /* ************************************************************************** ** 2. Do any work necessary before the member routine is called. ** ** Call the window priv delete function for all buffer IDs associated ** with this window. ************************************************************************** */ if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { while (pDbeWindowPriv) { /* *DbeWinPrivDelete() will free the window private and set it to * NULL if there are no more buffer IDs associated with this * window. */ FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); } } /* ************************************************************************** ** 3. Call the member routine, saving its result if necessary. ************************************************************************** */ ret = (*pScreen->DestroyWindow) (pWin); /* ************************************************************************** ** 4. Rewrap the member routine, restoring the wrapper value first in case ** the wrapper (or something that it wrapped) change this value. ************************************************************************** */ pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DbeDestroyWindow; /* ************************************************************************** ** 5. Do any work necessary after the member routine has been called. ** ** In this case we do not need to do anything. ************************************************************************** */ return ret; } /* DbeDestroyWindow() */ /****************************************************************************** * * DBE DIX Procedure: DbeExtensionInit * * Description: * * Called from InitExtensions in main() * *****************************************************************************/ void DbeExtensionInit(void) { ExtensionEntry *extEntry; register int i, j; ScreenPtr pScreen = NULL; DbeScreenPrivPtr pDbeScreenPriv; int nStubbedScreens = 0; Bool ddxInitSuccess; #ifdef PANORAMIX if (!noPanoramiXExtension) return; #endif /* Create the resource types. */ dbeDrawableResType = CreateNewResourceType(DbeDrawableDelete, "dbeDrawable"); if (!dbeDrawableResType) return; dbeDrawableResType |= RC_DRAWABLE; dbeWindowPrivResType = CreateNewResourceType(DbeWindowPrivDelete, "dbeWindow"); if (!dbeWindowPrivResType) return; if (!dixRegisterPrivateKey(&dbeScreenPrivKeyRec, PRIVATE_SCREEN, 0)) return; if (!dixRegisterPrivateKey(&dbeWindowPrivKeyRec, PRIVATE_WINDOW, 0)) return; for (i = 0; i < screenInfo.numScreens; i++) { /* For each screen, set up DBE screen privates and init DIX and DDX * interface. */ pScreen = screenInfo.screens[i]; if (!(pDbeScreenPriv = malloc(sizeof(DbeScreenPrivRec)))) { /* If we can not alloc a window or screen private, * then free any privates that we already alloc'ed and return */ for (j = 0; j < i; j++) { free(dixLookupPrivate(&screenInfo.screens[j]->devPrivates, dbeScreenPrivKey)); dixSetPrivate(&screenInfo.screens[j]->devPrivates, dbeScreenPrivKey, NULL); } return; } dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, pDbeScreenPriv); { /* We don't have DDX support for DBE anymore */ #ifndef DISABLE_MI_DBE_BY_DEFAULT /* Setup DIX. */ pDbeScreenPriv->SetupBackgroundPainter = DbeSetupBackgroundPainter; /* Setup DDX. */ ddxInitSuccess = miDbeInit(pScreen, pDbeScreenPriv); /* DDX DBE initialization may have the side affect of * reallocating pDbeScreenPriv, so we need to update it. */ pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); if (ddxInitSuccess) { /* Wrap DestroyWindow. The DDX initialization function * already wrapped PositionWindow for us. */ pDbeScreenPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DbeDestroyWindow; } else { /* DDX initialization failed. Stub the screen. */ DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); } #else DbeStubScreen(pDbeScreenPriv, &nStubbedScreens); #endif } } /* for (i = 0; i < screenInfo.numScreens; i++) */ if (nStubbedScreens == screenInfo.numScreens) { /* All screens stubbed. Clean up and return. */ for (i = 0; i < screenInfo.numScreens; i++) { free(dixLookupPrivate(&screenInfo.screens[i]->devPrivates, dbeScreenPrivKey)); dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, NULL); } return; } /* Now add the extension. */ extEntry = AddExtension(DBE_PROTOCOL_NAME, DbeNumberEvents, DbeNumberErrors, ProcDbeDispatch, SProcDbeDispatch, DbeResetProc, StandardMinorOpcode); dbeErrorBase = extEntry->errorBase; SetResourceTypeErrorValue(dbeWindowPrivResType, dbeErrorBase + DbeBadBuffer); SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer); } /* DbeExtensionInit() */ xorg-server-21.1.16/dbe/midbe.c0000644000175000017500000005537214757411105011625 /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard * Company 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 Hewlett-Packard Company. * * Machine-independent DBE code * *****************************************************************************/ /* INCLUDES */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" #include "dbestruct.h" #include "regionstr.h" #include "gcstruct.h" #include "inputstr.h" #include "midbe.h" #include "xace.h" #include /****************************************************************************** * * DBE MI Procedure: miDbeGetVisualInfo * * Description: * * This is the MI function for the DbeGetVisualInfo request. This function * is called through pDbeScreenPriv->GetVisualInfo. This function is also * called for the DbeAllocateBackBufferName request at the extension level; * it is called by ProcDbeAllocateBackBufferName() in dbe.c. * * If memory allocation fails or we can not get the visual info, this * function returns FALSE. Otherwise, it returns TRUE for success. * *****************************************************************************/ static Bool miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo * pScrVisInfo) { register int i, j, k; register int count; DepthPtr pDepth; XdbeVisualInfo *visInfo; /* Determine number of visuals for this screen. */ for (i = 0, count = 0; i < pScreen->numDepths; i++) { count += pScreen->allowedDepths[i].numVids; } /* Allocate an array of XdbeVisualInfo items. */ if (!(visInfo = xallocarray(count, sizeof(XdbeVisualInfo)))) { return FALSE; /* memory alloc failure */ } for (i = 0, k = 0; i < pScreen->numDepths; i++) { /* For each depth of this screen, get visual information. */ pDepth = &pScreen->allowedDepths[i]; for (j = 0; j < pDepth->numVids; j++) { /* For each visual for this depth of this screen, get visual ID * and visual depth. Since this is MI code, we will always return * the same performance level for all visuals (0). A higher * performance level value indicates higher performance. */ visInfo[k].visual = pDepth->vids[j]; visInfo[k].depth = pDepth->depth; visInfo[k].perflevel = 0; k++; } } /* Record the number of visuals and point visual_depth to * the array of visual info. */ pScrVisInfo->count = count; pScrVisInfo->visinfo = visInfo; return TRUE; /* success */ } /* miDbeGetVisualInfo() */ /****************************************************************************** * * DBE MI Procedure: miAllocBackBufferName * * Description: * * This is the MI function for the DbeAllocateBackBufferName request. * *****************************************************************************/ static int miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) { ScreenPtr pScreen; DbeWindowPrivPtr pDbeWindowPriv; DbeScreenPrivPtr pDbeScreenPriv; GCPtr pGC; xRectangle clearRect; int rc; pScreen = pWin->drawable.pScreen; pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); if (pDbeWindowPriv->nBufferIDs == 0) { /* There is no buffer associated with the window. * We have to create the window priv priv. Remember, the window * priv was created at the DIX level, so all we need to do is * create the priv priv and attach it to the priv. */ pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); /* Get a front pixmap. */ if (!(pDbeWindowPriv->pFrontBuffer = (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width, pDbeWindowPriv->height, pWin->drawable.depth, 0))) { return BadAlloc; } /* Get a back pixmap. */ if (!(pDbeWindowPriv->pBackBuffer = (*pScreen->CreatePixmap) (pScreen, pDbeWindowPriv->width, pDbeWindowPriv->height, pWin->drawable.depth, 0))) { (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); return BadAlloc; } /* Security creation/labeling check. */ rc = XaceHook(XACE_RESOURCE_ACCESS, serverClient, bufId, dbeDrawableResType, pDbeWindowPriv->pBackBuffer, RT_WINDOW, pWin, DixCreateAccess); /* Make the back pixmap a DBE drawable resource. */ if (rc != Success || !AddResource(bufId, dbeDrawableResType, pDbeWindowPriv->pBackBuffer)) { /* free the buffer and the drawable resource */ FreeResource(bufId, RT_NONE); return (rc == Success) ? BadAlloc : rc; } /* Clear the back buffer. */ pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC); clearRect.x = clearRect.y = 0; clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width; clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height; (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv-> pBackBuffer, pGC, 1, &clearRect); } FreeScratchGC(pGC); } /* if no buffer associated with the window */ else { /* A buffer is already associated with the window. * Place the new buffer ID information at the head of the ID list. */ /* Associate the new ID with an existing pixmap. */ if (!AddResource(bufId, dbeDrawableResType, (void *) pDbeWindowPriv->pBackBuffer)) { return BadAlloc; } } return Success; } /* miDbeAllocBackBufferName() */ /****************************************************************************** * * DBE MI Procedure: miDbeAliasBuffers * * Description: * * This function associates all XIDs of a buffer with the back pixmap * stored in the window priv. * *****************************************************************************/ static void miDbeAliasBuffers(DbeWindowPrivPtr pDbeWindowPriv) { int i; for (i = 0; i < pDbeWindowPriv->nBufferIDs; i++) { ChangeResourceValue(pDbeWindowPriv->IDs[i], dbeDrawableResType, (void *) pDbeWindowPriv->pBackBuffer); } } /* miDbeAliasBuffers() */ /****************************************************************************** * * DBE MI Procedure: miDbeSwapBuffers * * Description: * * This is the MI function for the DbeSwapBuffers request. * *****************************************************************************/ static int miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) { DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv; GCPtr pGC; WindowPtr pWin; PixmapPtr pTmpBuffer; xRectangle clearRect; pWin = swapInfo[0].pWindow; pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); /* ********************************************************************** ** Setup before swap. ********************************************************************** */ switch (swapInfo[0].swapAction) { case XdbeUndefined: break; case XdbeBackground: break; case XdbeUntouched: ValidateGC((DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pDbeWindowPriv->pFrontBuffer, pGC, 0, 0, pWin->drawable.width, pWin->drawable.height, 0, 0); break; case XdbeCopied: break; } /* ********************************************************************** ** Swap. ********************************************************************** */ ValidateGC((DrawablePtr) pWin, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer, (DrawablePtr) pWin, pGC, 0, 0, pWin->drawable.width, pWin->drawable.height, 0, 0); /* ********************************************************************** ** Tasks after swap. ********************************************************************** */ switch (swapInfo[0].swapAction) { case XdbeUndefined: break; case XdbeBackground: if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { ValidateGC((DrawablePtr) pDbeWindowPriv->pBackBuffer, pGC); clearRect.x = 0; clearRect.y = 0; clearRect.width = pDbeWindowPriv->pBackBuffer->drawable.width; clearRect.height = pDbeWindowPriv->pBackBuffer->drawable.height; (*pGC->ops->PolyFillRect) ((DrawablePtr) pDbeWindowPriv-> pBackBuffer, pGC, 1, &clearRect); } break; case XdbeUntouched: /* Swap pixmap pointers. */ pTmpBuffer = pDbeWindowPriv->pBackBuffer; pDbeWindowPriv->pBackBuffer = pDbeWindowPriv->pFrontBuffer; pDbeWindowPriv->pFrontBuffer = pTmpBuffer; miDbeAliasBuffers(pDbeWindowPriv); break; case XdbeCopied: break; } /* Remove the swapped window from the swap information array and decrement * pNumWindows to indicate to the DIX level how many windows were actually * swapped. */ if (*pNumWindows > 1) { /* We were told to swap more than one window, but we only swapped the * first one. Remove the first window in the list by moving the last * window to the beginning. */ swapInfo[0].pWindow = swapInfo[*pNumWindows - 1].pWindow; swapInfo[0].swapAction = swapInfo[*pNumWindows - 1].swapAction; /* Clear the last window information just to be safe. */ swapInfo[*pNumWindows - 1].pWindow = (WindowPtr) NULL; swapInfo[*pNumWindows - 1].swapAction = 0; } else { /* Clear the window information just to be safe. */ swapInfo[0].pWindow = (WindowPtr) NULL; swapInfo[0].swapAction = 0; } (*pNumWindows)--; FreeScratchGC(pGC); return Success; } /* miSwapBuffers() */ /****************************************************************************** * * DBE MI Procedure: miDbeWinPrivDelete * * Description: * * This is the MI function for deleting the dbeWindowPrivResType resource. * This function is invoked indirectly by calling FreeResource() to free * the resources associated with a DBE buffer ID. There are 5 ways that * miDbeWinPrivDelete() can be called by FreeResource(). They are: * * - A DBE window is destroyed, in which case the DbeDestroyWindow() * wrapper is invoked. The wrapper calls FreeResource() for all DBE * buffer IDs. * * - miDbeAllocBackBufferName() calls FreeResource() to clean up resources * after a buffer allocation failure. * * - The PositionWindow wrapper, miDbePositionWindow(), calls * FreeResource() when it fails to create buffers of the new size. * FreeResource() is called for all DBE buffer IDs. * * - FreeClientResources() calls FreeResource() when a client dies or the * the server resets. * * When FreeResource() is called for a DBE buffer ID, the delete function * for the only other type of DBE resource, dbeDrawableResType, is also * invoked. This delete function (DbeDrawableDelete) is a NOOP to make * resource deletion easier. It is not guaranteed which delete function is * called first. Hence, we will let miDbeWinPrivDelete() free all DBE * resources. * * This function deletes/frees the following stuff associated with * the window private: * * - the ID node in the ID list representing the passed in ID. * * In addition, pDbeWindowPriv->nBufferIDs is decremented. * * If this function is called for the last/only buffer ID for a window, * these are additionally deleted/freed: * * - the front and back pixmaps * - the window priv itself * *****************************************************************************/ static void miDbeWinPrivDelete(DbeWindowPrivPtr pDbeWindowPriv, XID bufId) { if (pDbeWindowPriv->nBufferIDs != 0) { /* We still have at least one more buffer ID associated with this * window. */ return; } /* We have no more buffer IDs associated with this window. We need to * free some stuff. */ /* Destroy the front and back pixmaps. */ if (pDbeWindowPriv->pFrontBuffer) { (*pDbeWindowPriv->pWindow->drawable.pScreen-> DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); } if (pDbeWindowPriv->pBackBuffer) { (*pDbeWindowPriv->pWindow->drawable.pScreen-> DestroyPixmap) (pDbeWindowPriv->pBackBuffer); } } /* miDbeWinPrivDelete() */ /****************************************************************************** * * DBE MI Procedure: miDbePositionWindow * * Description: * * This function was cloned from miMbxPositionWindow() in mimultibuf.c. * This function resizes the buffer when the window is resized. * *****************************************************************************/ static Bool miDbePositionWindow(WindowPtr pWin, int x, int y) { ScreenPtr pScreen; DbeScreenPrivPtr pDbeScreenPriv; DbeWindowPrivPtr pDbeWindowPriv; int width, height; int dx, dy, dw, dh; int sourcex, sourcey; int destx, desty; int savewidth, saveheight; PixmapPtr pFrontBuffer; PixmapPtr pBackBuffer; Bool clear; GCPtr pGC; xRectangle clearRect; Bool ret; /* ************************************************************************** ** 1. Unwrap the member routine. ************************************************************************** */ pScreen = pWin->drawable.pScreen; pDbeScreenPriv = DBE_SCREEN_PRIV(pScreen); pScreen->PositionWindow = pDbeScreenPriv->PositionWindow; /* ************************************************************************** ** 2. Do any work necessary before the member routine is called. ** ** In this case we do not need to do anything. ************************************************************************** */ /* ************************************************************************** ** 3. Call the member routine, saving its result if necessary. ************************************************************************** */ ret = (*pScreen->PositionWindow) (pWin, x, y); /* ************************************************************************** ** 4. Rewrap the member routine, restoring the wrapper value first in case ** the wrapper (or something that it wrapped) change this value. ************************************************************************** */ pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = miDbePositionWindow; /* ************************************************************************** ** 5. Do any work necessary after the member routine has been called. ************************************************************************** */ if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { return ret; } if (pDbeWindowPriv->width == pWin->drawable.width && pDbeWindowPriv->height == pWin->drawable.height) { return ret; } width = pWin->drawable.width; height = pWin->drawable.height; dx = pWin->drawable.x - pDbeWindowPriv->x; dy = pWin->drawable.y - pDbeWindowPriv->y; dw = width - pDbeWindowPriv->width; dh = height - pDbeWindowPriv->height; GravityTranslate(0, 0, -dx, -dy, dw, dh, pWin->bitGravity, &destx, &desty); clear = ((pDbeWindowPriv->width < (unsigned short) width) || (pDbeWindowPriv->height < (unsigned short) height) || (pWin->bitGravity == ForgetGravity)); sourcex = 0; sourcey = 0; savewidth = pDbeWindowPriv->width; saveheight = pDbeWindowPriv->height; /* Clip rectangle to source and destination. */ if (destx < 0) { savewidth += destx; sourcex -= destx; destx = 0; } if (destx + savewidth > width) { savewidth = width - destx; } if (desty < 0) { saveheight += desty; sourcey -= desty; desty = 0; } if (desty + saveheight > height) { saveheight = height - desty; } pDbeWindowPriv->width = width; pDbeWindowPriv->height = height; pDbeWindowPriv->x = pWin->drawable.x; pDbeWindowPriv->y = pWin->drawable.y; pGC = GetScratchGC(pWin->drawable.depth, pScreen); if (clear) { if ((*pDbeScreenPriv->SetupBackgroundPainter) (pWin, pGC)) { clearRect.x = 0; clearRect.y = 0; clearRect.width = width; clearRect.height = height; } else { clear = FALSE; } } /* Create DBE buffer pixmaps equal to size of resized window. */ pFrontBuffer = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth, 0); pBackBuffer = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth, 0); if (!pFrontBuffer || !pBackBuffer) { /* We failed at creating 1 or 2 of the pixmaps. */ if (pFrontBuffer) { (*pScreen->DestroyPixmap) (pFrontBuffer); } if (pBackBuffer) { (*pScreen->DestroyPixmap) (pBackBuffer); } /* Destroy all buffers for this window. */ while (pDbeWindowPriv) { /* DbeWindowPrivDelete() will free the window private if there no * more buffer IDs associated with this window. */ FreeResource(pDbeWindowPriv->IDs[0], RT_NONE); pDbeWindowPriv = DBE_WINDOW_PRIV(pWin); } FreeScratchGC(pGC); return FALSE; } else { /* Clear out the new DBE buffer pixmaps. */ /* I suppose this could avoid quite a bit of work if * it computed the minimal area required. */ ValidateGC(&pFrontBuffer->drawable, pGC); if (clear) { (*pGC->ops->PolyFillRect) ((DrawablePtr) pFrontBuffer, pGC, 1, &clearRect); } /* Copy the contents of the old front pixmap to the new one. */ if (pWin->bitGravity != ForgetGravity) { (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pFrontBuffer, (DrawablePtr) pFrontBuffer, pGC, sourcex, sourcey, savewidth, saveheight, destx, desty); } ValidateGC(&pBackBuffer->drawable, pGC); if (clear) { (*pGC->ops->PolyFillRect) ((DrawablePtr) pBackBuffer, pGC, 1, &clearRect); } /* Copy the contents of the old back pixmap to the new one. */ if (pWin->bitGravity != ForgetGravity) { (*pGC->ops->CopyArea) ((DrawablePtr) pDbeWindowPriv->pBackBuffer, (DrawablePtr) pBackBuffer, pGC, sourcex, sourcey, savewidth, saveheight, destx, desty); } /* Destroy the old pixmaps, and point the DBE window priv to the new * pixmaps. */ (*pScreen->DestroyPixmap) (pDbeWindowPriv->pFrontBuffer); (*pScreen->DestroyPixmap) (pDbeWindowPriv->pBackBuffer); pDbeWindowPriv->pFrontBuffer = pFrontBuffer; pDbeWindowPriv->pBackBuffer = pBackBuffer; /* Make sure all XID are associated with the new back pixmap. */ miDbeAliasBuffers(pDbeWindowPriv); FreeScratchGC(pGC); } return ret; } /* miDbePositionWindow() */ /****************************************************************************** * * DBE MI Procedure: miDbeInit * * Description: * * This is the MI initialization function called by DbeExtensionInit(). * *****************************************************************************/ Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) { /* Wrap functions. */ pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; pScreen->PositionWindow = miDbePositionWindow; /* Initialize the per-screen DBE function pointers. */ pDbeScreenPriv->GetVisualInfo = miDbeGetVisualInfo; pDbeScreenPriv->AllocBackBufferName = miDbeAllocBackBufferName; pDbeScreenPriv->SwapBuffers = miDbeSwapBuffers; pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete; return TRUE; } /* miDbeInit() */ xorg-server-21.1.16/dbe/midbe.h0000644000175000017500000000412214757411105011615 /****************************************************************************** * Copyright (c) 1994, 1995 Hewlett-Packard Company * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard * Company 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 Hewlett-Packard Company. * * Header file for users of machine-independent DBE code * *****************************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef MIDBE_H #define MIDBE_H #include "privates.h" /* EXTERNS */ extern Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv); extern DevPrivateKeyRec dbeScreenPrivKeyRec; #define dbeScreenPrivKey (&dbeScreenPrivKeyRec) extern DevPrivateKeyRec dbeWindowPrivKeyRec; #define dbeWindowPrivKey (&dbeWindowPrivKeyRec) extern RESTYPE dbeDrawableResType; extern RESTYPE dbeWindowPrivResType; #endif /* MIDBE_H */ xorg-server-21.1.16/dix/0000755000175000017500000000000014757411133010500 5xorg-server-21.1.16/dix/meson.build0000644000175000017500000000231614757411105012563 srcs_dix = [ 'atom.c', 'colormap.c', 'cursor.c', 'devices.c', 'dispatch.c', 'dixfonts.c', 'main.c', 'dixutils.c', 'enterleave.c', 'events.c', 'eventconvert.c', 'extension.c', 'gc.c', 'gestures.c', 'getevents.c', 'globals.c', 'glyphcurs.c', 'grabs.c', 'initatoms.c', 'inpututils.c', 'pixmap.c', 'privates.c', 'property.c', 'ptrveloc.c', 'region.c', 'registry.c', 'resource.c', 'selection.c', 'swaprep.c', 'swapreq.c', 'tables.c', 'touch.c', 'window.c', ] dtrace_src = [] if with_dtrace dtrace_object = generator(dtrace, output: '@BASENAME@.o', arguments: ['-G', '-s', '@INPUT@', '-o', '@OUTPUT@'] ) dtrace_src += dtrace_object.process(dtrace_tmpl) endif dtrace_dep = declare_dependency(sources: [dtrace_src, dtrace_hdr]) libxserver_dix = static_library('libxserver_dix', srcs_dix, include_directories: inc, dependencies: [ dtrace_dep, common_dep, ] ) libxserver_main = static_library('libxserver_main', 'stubmain.c', include_directories: inc, dependencies: common_dep, ) install_data( 'protocol.txt', install_dir: serverconfigdir, ) xorg-server-21.1.16/dix/Makefile.am0000644000175000017500000000223114757411105012451 noinst_LTLIBRARIES = libdix.la libmain.la AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(DIX_CFLAGS) libmain_la_SOURCES = \ stubmain.c libdix_la_SOURCES = \ atom.c \ colormap.c \ cursor.c \ devices.c \ dispatch.c \ dispatch.h \ dixfonts.c \ main.c \ dixutils.c \ enterleave.c \ enterleave.h \ events.c \ eventconvert.c \ extension.c \ gc.c \ getevents.c \ gestures.c \ globals.c \ glyphcurs.c \ grabs.c \ initatoms.c \ inpututils.c \ pixmap.c \ privates.c \ property.c \ ptrveloc.c \ region.c \ registry.c \ resource.c \ selection.c \ swaprep.c \ swapreq.c \ tables.c \ touch.c \ window.c EXTRA_DIST = buildatoms BuiltInAtoms # Install list of protocol names miscconfigdir = $(SERVER_MISC_CONFIG_PATH) dist_miscconfig_DATA = protocol.txt if SPECIAL_DTRACE_OBJECTS # Generate dtrace object code for probes in libdix dtrace-dix.o: $(top_srcdir)/include/Xserver.d libdix.la $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) noinst_PROGRAMS = dix.O dix_O_SOURCES = dix.O: dtrace-dix.o libdix.la $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) endif xorg-server-21.1.16/dix/protocol.txt0000644000175000017500000006214314757411105013027 # Registry of protocol names used by X Server # This will eventually be replaced by server-side XCB # # Format is Xnnn : # R=Request, V=Event, E=Error # # This is a security-sensitive file, please set permissions as appropriate. # R000 Apple-DRI:QueryVersion R001 Apple-DRI:QueryDirectRenderingCapable R002 Apple-DRI:CreateSurface R003 Apple-DRI:DestroySurface R004 Apple-DRI:AuthConnection V000 Apple-DRI:ObsoleteEvent1 V001 Apple-DRI:ObsoleteEvent2 V002 Apple-DRI:ObsoleteEvent3 V003 Apple-DRI:SurfaceNotify E000 Apple-DRI:ClientNotLocal E001 Apple-DRI:OperationNotSupported R000 Apple-WM:QueryVersion R001 Apple-WM:FrameGetRect R002 Apple-WM:FrameHitTest R003 Apple-WM:FrameDraw R004 Apple-WM:DisableUpdate R005 Apple-WM:ReenableUpdate R006 Apple-WM:SelectInput R007 Apple-WM:SetWindowMenuCheck R008 Apple-WM:SetFrontProcess R009 Apple-WM:SetWindowLevel R010 Apple-WM:SetCanQuit R011 Apple-WM:SetWindowMenu V000 Apple-WM:ControllerNotify V001 Apple-WM:ActivationNotify V002 Apple-WM:PasteboardNotify E000 Apple-WM:ClientNotLocal E001 Apple-WM:OperationNotSupported R000 BIG-REQUESTS:Enable R000 Composite:CompositeQueryVersion R001 Composite:CompositeRedirectWindow R002 Composite:CompositeRedirectSubwindows R003 Composite:CompositeUnredirectWindow R004 Composite:CompositeUnredirectSubwindows R005 Composite:CompositeCreateRegionFromBorderClip R006 Composite:CompositeNameWindowPixmap R007 Composite:CompositeGetOverlayWindow R008 Composite:CompositeReleaseOverlayWindow R000 DAMAGE:QueryVersion R001 DAMAGE:Create R002 DAMAGE:Destroy R003 DAMAGE:Subtract R004 DAMAGE:Add V000 DAMAGE:Notify E000 DAMAGE:BadDamage R000 DMX:DMXQueryVersion R001 DMX:DMXGetScreenCount R002 DMX:DMXGetScreenInfoDEPRECATED R003 DMX:DMXGetWindowAttributes R004 DMX:DMXGetInputCount R005 DMX:DMXGetInputAttributes R006 DMX:DMXForceWindowCreationDEPRECATED R007 DMX:DMXReconfigureScreenDEPRECATED R008 DMX:DMXSync R009 DMX:DMXForceWindowCreation R010 DMX:DMXGetScreenAttributes R011 DMX:DMXChangeScreensAttributes R012 DMX:DMXAddScreen R013 DMX:DMXRemoveScreen R014 DMX:DMXGetDesktopAttributes R015 DMX:DMXChangeDesktopAttributes R016 DMX:DMXAddInput R017 DMX:DMXRemoveInput R000 DOUBLE-BUFFER:GetVersion R001 DOUBLE-BUFFER:AllocateBackBufferName R002 DOUBLE-BUFFER:DeallocateBackBufferName R003 DOUBLE-BUFFER:SwapBuffers R004 DOUBLE-BUFFER:BeginIdiom R005 DOUBLE-BUFFER:EndIdiom R006 DOUBLE-BUFFER:GetVisualInfo R007 DOUBLE-BUFFER:GetBackBufferAttributes E000 DOUBLE-BUFFER:BadBuffer R000 DPMS:GetVersion R001 DPMS:Capable R002 DPMS:GetTimeouts R003 DPMS:SetTimeouts R004 DPMS:Enable R005 DPMS:Disable R006 DPMS:ForceLevel R007 DPMS:Info R000 DRI2:QueryVersion R001 DRI2:Connect R002 DRI2:Authenticate R003 DRI2:CreateDrawable R004 DRI2:DestroyDrawable R005 DRI2:GetBuffers R006 DRI2:CopyRegion R007 DRI2:GetBuffersWithFormat R008 DRI2:SwapBuffers R009 DRI2:GetMSC R010 DRI2:WaitMSC R011 DRI2:WaitSBC R012 DRI2:SwapInterval V000 DRI2:BufferSwapComplete V001 DRI2:InvalidateBuffers R000 DRI3:QueryVersion R001 DRI3:Open R002 DRI3:PixmapFromBuffer R003 DRI3:BufferFromPixmap R004 DRI3:FenceFromFD R005 DRI3:FDFromFence R000 Extended-Visual-Information:QueryVersion R001 Extended-Visual-Information:GetVisualInfo R000 FontCache:QueryVersion R001 FontCache:GetCacheSettings R002 FontCache:ChangeCacheSettings R003 FontCache:GetCacheStatistics E000 FontCache:BadProtocol E001 FontCache:CannotAllocMemory R001 GLX: R002 GLX:Large R003 GLX:CreateContext R004 GLX:DestroyContext R005 GLX:MakeCurrent R006 GLX:IsDirect R007 GLX:QueryVersion R008 GLX:WaitGL R009 GLX:WaitX R010 GLX:CopyContext R011 GLX:SwapBuffers R012 GLX:UseXFont R013 GLX:CreateGLXPixmap R014 GLX:GetVisualConfigs R015 GLX:DestroyGLXPixmap R016 GLX:VendorPrivate R017 GLX:VendorPrivateWithReply R018 GLX:QueryExtensionsString R019 GLX:QueryServerString R020 GLX:ClientInfo R021 GLX:GetFBConfigs R022 GLX:CreatePixmap R023 GLX:DestroyPixmap R024 GLX:CreateNewContext R025 GLX:QueryContext R026 GLX:MakeContextCurrent R027 GLX:CreatePbuffer R028 GLX:DestroyPbuffer R029 GLX:GetDrawableAttributes R030 GLX:ChangeDrawableAttributes R031 GLX:CreateWindow R032 GLX:DeleteWindow R033 GLX:SetClientInfoARB R034 GLX:CreateContextAttribsARB R035 GLX:SetClientInfo2ARB R101 GLX:NewList R102 GLX:EndList R103 GLX:DeleteLists R104 GLX:GenLists R105 GLX:FeedbackBuffer R106 GLX:SelectBuffer R107 GLX:Mode R108 GLX:Finish R109 GLX:PixelStoref R110 GLX:PixelStorei R111 GLX:ReadPixels R112 GLX:GetBooleanv R113 GLX:GetClipPlane R114 GLX:GetDoublev R115 GLX:GetError R116 GLX:GetFloatv R117 GLX:GetIntegerv R118 GLX:GetLightfv R119 GLX:GetLightiv R120 GLX:GetMapdv R121 GLX:GetMapfv R122 GLX:GetMapiv R123 GLX:GetMaterialfv R124 GLX:GetMaterialiv R125 GLX:GetPixelfv R126 GLX:GetPixelMapuiv R127 GLX:GetPixelMapusv R128 GLX:GetPolygonStipple R129 GLX:GetString R130 GLX:GetTexEnvfv R131 GLX:GetTexEnviv R132 GLX:GetTexGendv R133 GLX:GetTexGenfv R134 GLX:GetTexGeniv R135 GLX:GetTexImage R136 GLX:GetTexParameterfv R137 GLX:GetTexParameteriv R138 GLX:GetTexLevelParameterfv R139 GLX:GetTexLevelParameteriv R140 GLX:IsEnabled R141 GLX:IsList R142 GLX:Flush R143 GLX:AreTexturesResident R144 GLX:DeleteTextures R145 GLX:GenTextures R146 GLX:IsTexture R147 GLX:GetColorTable R148 GLX:GetColorTableParameterfv R149 GLX:GetColorTableParameterfv R150 GLX:GetConvolutionFilter R151 GLX:GetConvolutionParameterfv R152 GLX:GetConvolutionParameteriv R153 GLX:GetSeparableFilter R154 GLX:GetHistogram R155 GLX:GetHistogramParameterfv R156 GLX:GetHistogramParameteriv R157 GLX:GetMinmax R158 GLX:GetMinmaxParameterfv R159 GLX:GetMinmaxParameteriv R160 GLX:GetCompressedTexImage V000 GLX:PbufferClobber V001 GLX:BufferSwapComplete E000 GLX:BadContext E001 GLX:BadContextState E002 GLX:BadDrawable E003 GLX:BadPixmap E004 GLX:BadContextTag E005 GLX:BadCurrentWindow E006 GLX:BadRenderRequest E007 GLX:BadLargeRequest E008 GLX:UnsupportedPrivateRequest E009 GLX:BadFBConfig E010 GLX:BadPbuffer E011 GLX:BadCurrentDrawable E012 GLX:BadWindow R000 MIT-SCREEN-SAVER:QueryVersion R001 MIT-SCREEN-SAVER:QueryInfo R002 MIT-SCREEN-SAVER:SelectInput R003 MIT-SCREEN-SAVER:SetAttributes R004 MIT-SCREEN-SAVER:UnsetAttributes R005 MIT-SCREEN-SAVER:Suspend V000 MIT-SCREEN-SAVER:Notify R000 MIT-SHM:QueryVersion R001 MIT-SHM:Attach R002 MIT-SHM:Detach R003 MIT-SHM:PutImage R004 MIT-SHM:GetImage R005 MIT-SHM:CreatePixmap R006 MIT-SHM:AttachFd R007 MIT-SHM:CreateSegment V000 MIT-SHM:Completion E000 MIT-SHM:BadShmSeg R000 MIT-SUNDRY-NONSTANDARD:SetBugMode R001 MIT-SUNDRY-NONSTANDARD:GetBugMode R000 Present:QueryVersion R001 Present:Pixmap R002 Present:NotifyMSC R003 Present:SelectInput R004 Present:QueryCapabilities R000 RANDR:QueryVersion R001 RANDR:OldGetScreenInfo R002 RANDR:SetScreenConfig R003 RANDR:OldScreenChangeSelectInput R004 RANDR:SelectInput R005 RANDR:GetScreenInfo R006 RANDR:GetScreenSizeRange R007 RANDR:SetScreenSize R008 RANDR:GetScreenResources R009 RANDR:GetOutputInfo R010 RANDR:ListOutputProperties R011 RANDR:QueryOutputProperty R012 RANDR:ConfigureOutputProperty R013 RANDR:ChangeOutputProperty R014 RANDR:DeleteOutputProperty R015 RANDR:GetOutputProperty R016 RANDR:CreateMode R017 RANDR:DestroyMode R018 RANDR:AddOutputMode R019 RANDR:DeleteOutputMode R020 RANDR:GetCrtcInfo R021 RANDR:SetCrtcConfig R022 RANDR:GetCrtcGammaSize R023 RANDR:GetCrtcGamma R024 RANDR:SetCrtcGamma R025 RANDR:GetScreenResourcesCurrent R026 RANDR:SetCrtcTransform R027 RANDR:GetCrtcTransform R028 RANDR:GetPanning R029 RANDR:SetPanning R030 RANDR:SetOutputPrimary R031 RANDR:GetOutputPrimary R032 RANDR:RRGetProviders R033 RANDR:RRGetProviderInfo R034 RANDR:RRSetProviderOffloadSink R035 RANDR:RRSetProviderOutputSource R036 RANDR:RRListProviderProperties R037 RANDR:RRQueryProviderProperty R038 RANDR:RRConfigureProviderProperty R039 RANDR:RRChangeProviderProperty R040 RANDR:RRDeleteProviderProperty R041 RANDR:RRGetProviderProperty R042 RANDR:GetMonitors R043 RANDR:SetMonitor R044 RANDR:DeleteMonitor V000 RANDR:ScreenChangeNotify V001 RANDR:Notify E000 RANDR:BadRROutput E001 RANDR:BadRRCrtc E002 RANDR:BadRRMode E003 RANDR:BadRRProvider R000 RECORD:QueryVersion R001 RECORD:CreateContext R002 RECORD:RegisterClients R003 RECORD:UnregisterClients R004 RECORD:GetContext R005 RECORD:EnableContext R006 RECORD:DisableContext R007 RECORD:FreeContext E000 RECORD:BadContext R000 RENDER:QueryVersion R001 RENDER:QueryPictFormats R002 RENDER:QueryPictIndexValues R003 RENDER:QueryDithers R004 RENDER:CreatePicture R005 RENDER:ChangePicture R006 RENDER:SetPictureClipRectangles R007 RENDER:FreePicture R008 RENDER:Composite R009 RENDER:Scale R010 RENDER:Trapezoids R011 RENDER:Triangles R012 RENDER:TriStrip R013 RENDER:TriFan R014 RENDER:ColorTrapezoids R015 RENDER:ColorTriangles R016 RENDER:Transform R017 RENDER:CreateGlyphSet R018 RENDER:ReferenceGlyphSet R019 RENDER:FreeGlyphSet R020 RENDER:AddGlyphs R021 RENDER:AddGlyphsFromPicture R022 RENDER:FreeGlyphs R023 RENDER:CompositeGlyphs8 R024 RENDER:CompositeGlyphs16 R025 RENDER:CompositeGlyphs32 R026 RENDER:FillRectangles R027 RENDER:CreateCursor R028 RENDER:SetPictureTransform R029 RENDER:QueryFilters R030 RENDER:SetPictureFilter R031 RENDER:CreateAnimCursor R032 RENDER:AddTraps R033 RENDER:CreateSolidFill R034 RENDER:CreateLinearGradient R035 RENDER:CreateRadialGradient R036 RENDER:CreateConicalGradient E000 RENDER:BadPictFormat E001 RENDER:BadPicture E002 RENDER:BadPictOp E003 RENDER:BadGlyphSet E004 RENDER:BadGlyph R000 SECURITY:QueryVersion R001 SECURITY:GenerateAuthorization R002 SECURITY:RevokeAuthorization V000 SECURITY:AuthorizationRevoked E000 SECURITY:BadAuthorization E001 SECURITY:BadAuthorizationProtocol R000 SELinux:SELinuxQueryVersion R001 SELinux:SELinuxSetDeviceCreateContext R002 SELinux:SELinuxGetDeviceCreateContext R003 SELinux:SELinuxSetDeviceContext R004 SELinux:SELinuxGetDeviceContext R005 SELinux:SELinuxSetWindowCreateContext R006 SELinux:SELinuxGetWindowCreateContext R007 SELinux:SELinuxGetWindowContext R008 SELinux:SELinuxSetPropertyCreateContext R009 SELinux:SELinuxGetPropertyCreateContext R010 SELinux:SELinuxSetPropertyUseContext R011 SELinux:SELinuxGetPropertyUseContext R012 SELinux:SELinuxGetPropertyContext R013 SELinux:SELinuxGetPropertyDataContext R014 SELinux:SELinuxListProperties R015 SELinux:SELinuxSetSelectionCreateContext R016 SELinux:SELinuxGetSelectionCreateContext R017 SELinux:SELinuxSetSelectionUseContext R018 SELinux:SELinuxGetSelectionUseContext R019 SELinux:SELinuxGetSelectionContext R020 SELinux:SELinuxGetSelectionDataContext R021 SELinux:SELinuxListSelections R022 SELinux:SELinuxGetClientContext R000 SHAPE:QueryVersion R001 SHAPE:Rectangles R002 SHAPE:Mask R003 SHAPE:Combine R004 SHAPE:Offset R005 SHAPE:QueryExtents R006 SHAPE:SelectInput R007 SHAPE:InputSelected R008 SHAPE:GetRectangles V000 SHAPE:Notify R000 SYNC:Initialize R001 SYNC:ListSystemCounters R002 SYNC:CreateCounter R003 SYNC:SetCounter R004 SYNC:ChangeCounter R005 SYNC:QueryCounter R006 SYNC:DestroyCounter R007 SYNC:Await R008 SYNC:CreateAlarm R009 SYNC:ChangeAlarm R010 SYNC:QueryAlarm R011 SYNC:DestroyAlarm R012 SYNC:SetPriority R013 SYNC:GetPriority V000 SYNC:CounterNotify V001 SYNC:AlarmNotify E000 SYNC:BadCounter E001 SYNC:BadAlarm R000 TOG-CUP:QueryVersion R001 TOG-CUP:GetReservedColormapEntries R002 TOG-CUP:StoreColors R000 Windows-WM:QueryVersion R001 Windows-WM:FrameGetRect R002 Windows-WM:FrameDraw R003 Windows-WM:FrameSetTitle R004 Windows-WM:DisableUpdate R005 Windows-WM:ReenableUpdate R006 Windows-WM:SelectInput R007 Windows-WM:SetFrontProcess V000 Windows-WM:ControllerNotify V001 Windows-WM:ActivationNotify E000 Windows-WM:ClientNotLocal E001 Windows-WM:OperationNotSupported R000 X-Resource:QueryVersion R001 X-Resource:QueryClients R002 X-Resource:QueryClientResources R003 X-Resource:QueryClientPixmapBytes R001 X11:CreateWindow R002 X11:ChangeWindowAttributes R003 X11:GetWindowAttributes R004 X11:DestroyWindow R005 X11:DestroySubwindows R006 X11:ChangeSaveSet R007 X11:ReparentWindow R008 X11:MapWindow R009 X11:MapSubwindows R010 X11:UnmapWindow R011 X11:UnmapSubwindows R012 X11:ConfigureWindow R013 X11:CirculateWindow R014 X11:GetGeometry R015 X11:QueryTree R016 X11:InternAtom R017 X11:GetAtomName R018 X11:ChangeProperty R019 X11:DeleteProperty R020 X11:GetProperty R021 X11:ListProperties R022 X11:SetSelectionOwner R023 X11:GetSelectionOwner R024 X11:ConvertSelection R025 X11:SendEvent R026 X11:GrabPointer R027 X11:UngrabPointer R028 X11:GrabButton R029 X11:UngrabButton R030 X11:ChangeActivePointerGrab R031 X11:GrabKeyboard R032 X11:UngrabKeyboard R033 X11:GrabKey R034 X11:UngrabKey R035 X11:AllowEvents R036 X11:GrabServer R037 X11:UngrabServer R038 X11:QueryPointer R039 X11:GetMotionEvents R040 X11:TranslateCoords R041 X11:WarpPointer R042 X11:SetInputFocus R043 X11:GetInputFocus R044 X11:QueryKeymap R045 X11:OpenFont R046 X11:CloseFont R047 X11:QueryFont R048 X11:QueryTextExtents R049 X11:ListFonts R050 X11:ListFontsWithInfo R051 X11:SetFontPath R052 X11:GetFontPath R053 X11:CreatePixmap R054 X11:FreePixmap R055 X11:CreateGC R056 X11:ChangeGC R057 X11:CopyGC R058 X11:SetDashes R059 X11:SetClipRectangles R060 X11:FreeGC R061 X11:ClearArea R062 X11:CopyArea R063 X11:CopyPlane R064 X11:PolyPoint R065 X11:PolyLine R066 X11:PolySegment R067 X11:PolyRectangle R068 X11:PolyArc R069 X11:FillPoly R070 X11:PolyFillRectangle R071 X11:PolyFillArc R072 X11:PutImage R073 X11:GetImage R074 X11:PolyText8 R075 X11:PolyText16 R076 X11:ImageText8 R077 X11:ImageText16 R078 X11:CreateColormap R079 X11:FreeColormap R080 X11:CopyColormapAndFree R081 X11:InstallColormap R082 X11:UninstallColormap R083 X11:ListInstalledColormaps R084 X11:AllocColor R085 X11:AllocNamedColor R086 X11:AllocColorCells R087 X11:AllocColorPlanes R088 X11:FreeColors R089 X11:StoreColors R090 X11:StoreNamedColor R091 X11:QueryColors R092 X11:LookupColor R093 X11:CreateCursor R094 X11:CreateGlyphCursor R095 X11:FreeCursor R096 X11:RecolorCursor R097 X11:QueryBestSize R098 X11:QueryExtension R099 X11:ListExtensions R100 X11:ChangeKeyboardMapping R101 X11:GetKeyboardMapping R102 X11:ChangeKeyboardControl R103 X11:GetKeyboardControl R104 X11:Bell R105 X11:ChangePointerControl R106 X11:GetPointerControl R107 X11:SetScreenSaver R108 X11:GetScreenSaver R109 X11:ChangeHosts R110 X11:ListHosts R111 X11:SetAccessControl R112 X11:SetCloseDownMode R113 X11:KillClient R114 X11:RotateProperties R115 X11:ForceScreenSaver R116 X11:SetPointerMapping R117 X11:GetPointerMapping R118 X11:SetModifierMapping R119 X11:GetModifierMapping R127 X11:NoOperation V000 X11:X_Error V001 X11:X_Reply V002 X11:KeyPress V003 X11:KeyRelease V004 X11:ButtonPress V005 X11:ButtonRelease V006 X11:MotionNotify V007 X11:EnterNotify V008 X11:LeaveNotify V009 X11:FocusIn V010 X11:FocusOut V011 X11:KeymapNotify V012 X11:Expose V013 X11:GraphicsExpose V014 X11:NoExpose V015 X11:VisibilityNotify V016 X11:CreateNotify V017 X11:DestroyNotify V018 X11:UnmapNotify V019 X11:MapNotify V020 X11:MapRequest V021 X11:ReparentNotify V022 X11:ConfigureNotify V023 X11:ConfigureRequest V024 X11:GravityNotify V025 X11:ResizeRequest V026 X11:CirculateNotify V027 X11:CirculateRequest V028 X11:PropertyNotify V029 X11:SelectionClear V030 X11:SelectionRequest V031 X11:SelectionNotify V032 X11:ColormapNotify V033 X11:ClientMessage V034 X11:MappingNotify V035 X11:GenericEvent E000 X11:Success E001 X11:BadRequest E002 X11:BadValue E003 X11:BadWindow E004 X11:BadPixmap E005 X11:BadAtom E006 X11:BadCursor E007 X11:BadFont E008 X11:BadMatch E009 X11:BadDrawable E010 X11:BadAccess E011 X11:BadAlloc E012 X11:BadColor E013 X11:BadGC E014 X11:BadIDChoice E015 X11:BadName E016 X11:BadLength E017 X11:BadImplementation R000 XC-APPGROUP:QueryVersion R001 XC-APPGROUP:Create R002 XC-APPGROUP:Destroy R003 XC-APPGROUP:GetAttr R004 XC-APPGROUP:Query R005 XC-APPGROUP:CreateAssoc R006 XC-APPGROUP:DestroyAssoc E000 XC-APPGROUP:BadAppGroup R000 XC-MISC:GetVersion R001 XC-MISC:GetXIDRange R002 XC-MISC:GetXIDList R000 XFIXES:QueryVersion R001 XFIXES:ChangeSaveSet R002 XFIXES:SelectSelectionInput R003 XFIXES:SelectCursorInput R004 XFIXES:GetCursorImage R005 XFIXES:CreateRegion R006 XFIXES:CreateRegionFromBitmap R007 XFIXES:CreateRegionFromWindow R008 XFIXES:CreateRegionFromGC R009 XFIXES:CreateRegionFromPicture R010 XFIXES:DestroyRegion R011 XFIXES:SetRegion R012 XFIXES:CopyRegion R013 XFIXES:UnionRegion R014 XFIXES:IntersectRegion R015 XFIXES:SubtractRegion R016 XFIXES:InvertRegion R017 XFIXES:TranslateRegion R018 XFIXES:RegionExtents R019 XFIXES:FetchRegion R020 XFIXES:SetGCClipRegion R021 XFIXES:SetWindowShapeRegion R022 XFIXES:SetPictureClipRegion R023 XFIXES:SetCursorName R024 XFIXES:GetCursorName R025 XFIXES:GetCursorImageAndName R026 XFIXES:ChangeCursor R027 XFIXES:ChangeCursorByName R028 XFIXES:ExpandRegion R029 XFIXES:HideCursor R030 XFIXES:ShowCursor V000 XFIXES:SelectionNotify V001 XFIXES:CursorNotify E000 XFIXES:BadRegion R000 XFree86-Bigfont:QueryVersion R001 XFree86-Bigfont:QueryFont R000 XFree86-DGA:QueryVersion R001 XFree86-DGA:GetVideoLL R002 XFree86-DGA:DirectVideo R003 XFree86-DGA:GetViewPortSize R004 XFree86-DGA:SetViewPort R005 XFree86-DGA:GetVidPage R006 XFree86-DGA:SetVidPage R007 XFree86-DGA:InstallColormap R008 XFree86-DGA:QueryDirectVideo R009 XFree86-DGA:ViewPortChanged R010 XFree86-DGA:Obsolete1 R011 XFree86-DGA:Obsolete2 R012 XFree86-DGA:QueryModes R013 XFree86-DGA:SetMode R014 XFree86-DGA:SetViewport R015 XFree86-DGA:InstallColormap R016 XFree86-DGA:SelectInput R017 XFree86-DGA:FillRectangle R018 XFree86-DGA:CopyArea R019 XFree86-DGA:CopyTransparentArea R020 XFree86-DGA:GetViewportStatus R021 XFree86-DGA:Sync R022 XFree86-DGA:OpenFramebuffer R023 XFree86-DGA:CloseFramebuffer R024 XFree86-DGA:SetClientVersion R025 XFree86-DGA:ChangePixmapMode R026 XFree86-DGA:CreateColormap E000 XFree86-DGA:ClientNotLocal E001 XFree86-DGA:NoDirectVideoMode E002 XFree86-DGA:ScreenNotActive E003 XFree86-DGA:DirectNotActivated E004 XFree86-DGA:OperationNotSupported R000 XFree86-DRI:QueryVersion R001 XFree86-DRI:QueryDirectRenderingCapable R002 XFree86-DRI:OpenConnection R003 XFree86-DRI:CloseConnection R004 XFree86-DRI:GetClientDriverName R005 XFree86-DRI:CreateContext R006 XFree86-DRI:DestroyContext R007 XFree86-DRI:CreateDrawable R008 XFree86-DRI:DestroyDrawable R009 XFree86-DRI:GetDrawableInfo R010 XFree86-DRI:GetDeviceInfo R011 XFree86-DRI:AuthConnection R012 XFree86-DRI:OpenFullScreen R013 XFree86-DRI:CloseFullScreen E000 XFree86-DRI:ClientNotLocal E001 XFree86-DRI:OperationNotSupported R000 XFree86-Misc:QueryVersion R001 XFree86-Misc:GetSaver R002 XFree86-Misc:SetSaver R003 XFree86-Misc:GetMouseSettings R004 XFree86-Misc:GetKbdSettings R005 XFree86-Misc:SetMouseSettings R006 XFree86-Misc:SetKbdSettings R007 XFree86-Misc:SetGrabKeysState R008 XFree86-Misc:SetClientVersion R009 XFree86-Misc:GetFilePaths R010 XFree86-Misc:PassMessage E000 XFree86-Misc:BadMouseProtocol E001 XFree86-Misc:BadMouseBaudRate E002 XFree86-Misc:BadMouseFlags E003 XFree86-Misc:BadMouseCombo E004 XFree86-Misc:BadKbdType E005 XFree86-Misc:ModInDevDisabled E006 XFree86-Misc:ModInDevClientNotLocal E007 XFree86-Misc:NoModule R000 XFree86-VidModeExtension:QueryVersion R001 XFree86-VidModeExtension:GetModeLine R002 XFree86-VidModeExtension:ModModeLine R003 XFree86-VidModeExtension:SwitchMode R004 XFree86-VidModeExtension:GetMonitor R005 XFree86-VidModeExtension:LockModeSwitch R006 XFree86-VidModeExtension:GetAllModeLines R007 XFree86-VidModeExtension:AddModeLine R008 XFree86-VidModeExtension:DeleteModeLine R009 XFree86-VidModeExtension:ValidateModeLine R010 XFree86-VidModeExtension:SwitchToMode R011 XFree86-VidModeExtension:GetViewPort R012 XFree86-VidModeExtension:SetViewPort R013 XFree86-VidModeExtension:GetDotClocks R014 XFree86-VidModeExtension:SetClientVersion R015 XFree86-VidModeExtension:SetGamma R016 XFree86-VidModeExtension:GetGamma R017 XFree86-VidModeExtension:GetGammaRamp R018 XFree86-VidModeExtension:SetGammaRamp R019 XFree86-VidModeExtension:GetGammaRampSize R020 XFree86-VidModeExtension:GetPermissions V000 XFree86-VidModeExtension:Notify E000 XFree86-VidModeExtension:BadClock E001 XFree86-VidModeExtension:BadHTimings E002 XFree86-VidModeExtension:BadVTimings E003 XFree86-VidModeExtension:ModeUnsuitable E004 XFree86-VidModeExtension:ExtensionDisabled E005 XFree86-VidModeExtension:ClientNotLocal E006 XFree86-VidModeExtension:ZoomLocked R000 XINERAMA:QueryVersion R001 XINERAMA:GetState R002 XINERAMA:GetScreenCount R003 XINERAMA:GetScreenSize R004 XINERAMA:IsActive R005 XINERAMA:QueryScreens R001 XInputExtension:GetExtensionVersion R002 XInputExtension:ListInputDevices R003 XInputExtension:OpenDevice R004 XInputExtension:CloseDevice R005 XInputExtension:SetDeviceMode R006 XInputExtension:SelectExtensionEvent R007 XInputExtension:GetSelectedExtensionEvents R008 XInputExtension:ChangeDeviceDontPropagateList R009 XInputExtension:GetDeviceDontPropagageList R010 XInputExtension:GetDeviceMotionEvents R011 XInputExtension:ChangeKeyboardDevice R012 XInputExtension:ChangePointerDevice R013 XInputExtension:GrabDevice R014 XInputExtension:UngrabDevice R015 XInputExtension:GrabDeviceKey R016 XInputExtension:UngrabDeviceKey R017 XInputExtension:GrabDeviceButton R018 XInputExtension:UngrabDeviceButton R019 XInputExtension:AllowDeviceEvents R020 XInputExtension:GetDeviceFocus R021 XInputExtension:SetDeviceFocus R022 XInputExtension:GetFeedbackControl R023 XInputExtension:ChangeFeedbackControl R024 XInputExtension:GetDeviceKeyMapping R025 XInputExtension:ChangeDeviceKeyMapping R026 XInputExtension:GetDeviceModifierMapping R027 XInputExtension:SetDeviceModifierMapping R028 XInputExtension:GetDeviceButtonMapping R029 XInputExtension:SetDeviceButtonMapping R030 XInputExtension:QueryDeviceState R031 XInputExtension:SendExtensionEvent R032 XInputExtension:DeviceBell R033 XInputExtension:SetDeviceValuators R034 XInputExtension:GetDeviceControl R035 XInputExtension:ChangeDeviceControl R036 XInputExtension:ListDeviceProperties R037 XInputExtension:ChangeDeviceProperty R038 XInputExtension:DeleteDeviceProperty R039 XInputExtension:GetDeviceProperty R040 XInputExtension:QueryPointer R041 XInputExtension:WarpPointer R042 XInputExtension:ChangeCursor R043 XInputExtension:ChangeHierarchy R044 XInputExtension:SetClientPointer R045 XInputExtension:GetClientPointer R046 XInputExtension:SelectEvents R047 XInputExtension:QueryVersion R048 XInputExtension:QueryDevice R049 XInputExtension:SetFocus R050 XInputExtension:GetFocus R051 XInputExtension:GrabDevice R052 XInputExtension:UngrabDevice R053 XInputExtension:AllowEvents R054 XInputExtension:PassiveGrabDevice R055 XInputExtension:PassiveUngrabDevice R056 XInputExtension:ListProperties R057 XInputExtension:ChangeProperty R058 XInputExtension:DeleteProperty R059 XInputExtension:GetProperty R060 XInputExtension:GetSelectedEvents V000 XInputExtension:DeviceValuator V001 XInputExtension:DeviceKeyPress V002 XInputExtension:DeviceKeyRelease V003 XInputExtension:DeviceButtonPress V004 XInputExtension:DeviceButtonRelease V005 XInputExtension:DeviceMotionNotify V006 XInputExtension:DeviceFocusIn V007 XInputExtension:DeviceFocusOut V008 XInputExtension:ProximityIn V009 XInputExtension:ProximityOut V010 XInputExtension:DeviceStateNotify V011 XInputExtension:DeviceMappingNotify V012 XInputExtension:ChangeDeviceNotify V013 XInputExtension:DeviceKeystateNotify V014 XInputExtension:DeviceButtonstateNotify V015 XInputExtension:DevicePresenceNotify V016 XInputExtension:DevicePropertyNotify E000 XInputExtension:BadDevice E001 XInputExtension:BadEvent E002 XInputExtension:BadMode E003 XInputExtension:DeviceBusy E004 XInputExtension:BadClass R000 XKEYBOARD:UseExtension R001 XKEYBOARD:SelectEvents R002 XKEYBOARD:Obsolete R003 XKEYBOARD:Bell R004 XKEYBOARD:GetState R005 XKEYBOARD:LatchLockState R006 XKEYBOARD:GetControls R007 XKEYBOARD:SetControls R008 XKEYBOARD:GetMap R009 XKEYBOARD:SetMap R010 XKEYBOARD:GetCompatMap R011 XKEYBOARD:SetCompatMap R012 XKEYBOARD:GetIndicatorState R013 XKEYBOARD:GetIndicatorMap R014 XKEYBOARD:SetIndicatorMap R015 XKEYBOARD:GetNamedIndicator R016 XKEYBOARD:SetNamedIndicator R017 XKEYBOARD:GetNames R018 XKEYBOARD:SetNames R019 XKEYBOARD:GetGeometry R020 XKEYBOARD:SetGeometry R021 XKEYBOARD:PerClientFlags R022 XKEYBOARD:ListComponents R023 XKEYBOARD:GetKbdByName R024 XKEYBOARD:GetDeviceInfo R025 XKEYBOARD:SetDeviceInfo R101 XKEYBOARD:SetDebuggingFlags V000 XKEYBOARD:EventCode E000 XKEYBOARD:BadKeyboard R000 XTEST:GetVersion R001 XTEST:CompareCursor R002 XTEST:FakeInput R003 XTEST:GrabControl R000 XVideo:QueryExtension R001 XVideo:QueryAdaptors R002 XVideo:QueryEncodings R003 XVideo:GrabPort R004 XVideo:UngrabPort R005 XVideo:PutVideo R006 XVideo:PutStill R007 XVideo:GetVideo R008 XVideo:GetStill R009 XVideo:StopVideo R010 XVideo:SelectVideoNotify R011 XVideo:SelectPortNotify R012 XVideo:QueryBestSize R013 XVideo:SetPortAttribute R014 XVideo:GetPortAttribute R015 XVideo:QueryPortAttributes R016 XVideo:ListImageFormats R017 XVideo:QueryImageAttributes R018 XVideo:PutImage R019 XVideo:ShmPutImage V000 XVideo:VideoNotify V001 XVideo:PortNotify E000 XVideo:BadPort E001 XVideo:BadEncoding E002 XVideo:BadControl R000 XVideo-MotionCompensation:QueryVersion R001 XVideo-MotionCompensation:ListSurfaceTypes R002 XVideo-MotionCompensation:CreateContext R003 XVideo-MotionCompensation:DestroyContext R004 XVideo-MotionCompensation:CreateSurface R005 XVideo-MotionCompensation:DestroySurface R006 XVideo-MotionCompensation:CreateSubpicture R007 XVideo-MotionCompensation:DestroySubpicture R008 XVideo-MotionCompensation:ListSubpictureTypes R009 XVideo-MotionCompensation:GetDRInfo E000 XVideo-MotionCompensation:BadContext E001 XVideo-MotionCompensation:BadSurface E002 XVideo-MotionCompensation:BadSubpicture xorg-server-21.1.16/dix/Makefile.in0000644000175000017500000010623714757411114012475 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @SPECIAL_DTRACE_OBJECTS_TRUE@noinst_PROGRAMS = dix.O$(EXEEXT) subdir = dix ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_miscconfig_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) LTLIBRARIES = $(noinst_LTLIBRARIES) libdix_la_LIBADD = am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo devices.lo \ dispatch.lo dixfonts.lo main.lo dixutils.lo enterleave.lo \ events.lo eventconvert.lo extension.lo gc.lo getevents.lo \ gestures.lo globals.lo glyphcurs.lo grabs.lo initatoms.lo \ inpututils.lo pixmap.lo privates.lo property.lo ptrveloc.lo \ region.lo registry.lo resource.lo selection.lo swaprep.lo \ swapreq.lo tables.lo touch.lo window.lo libdix_la_OBJECTS = $(am_libdix_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libmain_la_LIBADD = am_libmain_la_OBJECTS = stubmain.lo libmain_la_OBJECTS = $(am_libmain_la_OBJECTS) am_dix_O_OBJECTS = dix_O_OBJECTS = $(am_dix_O_OBJECTS) dix_O_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/atom.Plo ./$(DEPDIR)/colormap.Plo \ ./$(DEPDIR)/cursor.Plo ./$(DEPDIR)/devices.Plo \ ./$(DEPDIR)/dispatch.Plo ./$(DEPDIR)/dixfonts.Plo \ ./$(DEPDIR)/dixutils.Plo ./$(DEPDIR)/enterleave.Plo \ ./$(DEPDIR)/eventconvert.Plo ./$(DEPDIR)/events.Plo \ ./$(DEPDIR)/extension.Plo ./$(DEPDIR)/gc.Plo \ ./$(DEPDIR)/gestures.Plo ./$(DEPDIR)/getevents.Plo \ ./$(DEPDIR)/globals.Plo ./$(DEPDIR)/glyphcurs.Plo \ ./$(DEPDIR)/grabs.Plo ./$(DEPDIR)/initatoms.Plo \ ./$(DEPDIR)/inpututils.Plo ./$(DEPDIR)/main.Plo \ ./$(DEPDIR)/pixmap.Plo ./$(DEPDIR)/privates.Plo \ ./$(DEPDIR)/property.Plo ./$(DEPDIR)/ptrveloc.Plo \ ./$(DEPDIR)/region.Plo ./$(DEPDIR)/registry.Plo \ ./$(DEPDIR)/resource.Plo ./$(DEPDIR)/selection.Plo \ ./$(DEPDIR)/stubmain.Plo ./$(DEPDIR)/swaprep.Plo \ ./$(DEPDIR)/swapreq.Plo ./$(DEPDIR)/tables.Plo \ ./$(DEPDIR)/touch.Plo ./$(DEPDIR)/window.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) $(dix_O_SOURCES) DIST_SOURCES = $(libdix_la_SOURCES) $(libmain_la_SOURCES) \ $(dix_O_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(miscconfigdir)" DATA = $(dist_miscconfig_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdix.la libmain.la AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = $(DIX_CFLAGS) libmain_la_SOURCES = \ stubmain.c libdix_la_SOURCES = \ atom.c \ colormap.c \ cursor.c \ devices.c \ dispatch.c \ dispatch.h \ dixfonts.c \ main.c \ dixutils.c \ enterleave.c \ enterleave.h \ events.c \ eventconvert.c \ extension.c \ gc.c \ getevents.c \ gestures.c \ globals.c \ glyphcurs.c \ grabs.c \ initatoms.c \ inpututils.c \ pixmap.c \ privates.c \ property.c \ ptrveloc.c \ region.c \ registry.c \ resource.c \ selection.c \ swaprep.c \ swapreq.c \ tables.c \ touch.c \ window.c EXTRA_DIST = buildatoms BuiltInAtoms # Install list of protocol names miscconfigdir = $(SERVER_MISC_CONFIG_PATH) dist_miscconfig_DATA = protocol.txt @SPECIAL_DTRACE_OBJECTS_TRUE@dix_O_SOURCES = all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dix/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dix/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdix.la: $(libdix_la_OBJECTS) $(libdix_la_DEPENDENCIES) $(EXTRA_libdix_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdix_la_OBJECTS) $(libdix_la_LIBADD) $(LIBS) libmain.la: $(libmain_la_OBJECTS) $(libmain_la_DEPENDENCIES) $(EXTRA_libmain_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmain_la_OBJECTS) $(libmain_la_LIBADD) $(LIBS) @SPECIAL_DTRACE_OBJECTS_FALSE@dix.O$(EXEEXT): $(dix_O_OBJECTS) $(dix_O_DEPENDENCIES) $(EXTRA_dix_O_DEPENDENCIES) @SPECIAL_DTRACE_OBJECTS_FALSE@ @rm -f dix.O$(EXEEXT) @SPECIAL_DTRACE_OBJECTS_FALSE@ $(AM_V_CCLD)$(LINK) $(dix_O_OBJECTS) $(dix_O_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atom.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colormap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devices.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixfonts.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dixutils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enterleave.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventconvert.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/events.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gestures.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getevents.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyphcurs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/initatoms.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpututils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pixmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privates.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/property.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrveloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selection.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubmain.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swaprep.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swapreq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tables.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/touch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_miscconfigDATA: $(dist_miscconfig_DATA) @$(NORMAL_INSTALL) @list='$(dist_miscconfig_DATA)'; test -n "$(miscconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(miscconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(miscconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(miscconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(miscconfigdir)" || exit $$?; \ done uninstall-dist_miscconfigDATA: @$(NORMAL_UNINSTALL) @list='$(dist_miscconfig_DATA)'; test -n "$(miscconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(miscconfigdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(miscconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/atom.Plo -rm -f ./$(DEPDIR)/colormap.Plo -rm -f ./$(DEPDIR)/cursor.Plo -rm -f ./$(DEPDIR)/devices.Plo -rm -f ./$(DEPDIR)/dispatch.Plo -rm -f ./$(DEPDIR)/dixfonts.Plo -rm -f ./$(DEPDIR)/dixutils.Plo -rm -f ./$(DEPDIR)/enterleave.Plo -rm -f ./$(DEPDIR)/eventconvert.Plo -rm -f ./$(DEPDIR)/events.Plo -rm -f ./$(DEPDIR)/extension.Plo -rm -f ./$(DEPDIR)/gc.Plo -rm -f ./$(DEPDIR)/gestures.Plo -rm -f ./$(DEPDIR)/getevents.Plo -rm -f ./$(DEPDIR)/globals.Plo -rm -f ./$(DEPDIR)/glyphcurs.Plo -rm -f ./$(DEPDIR)/grabs.Plo -rm -f ./$(DEPDIR)/initatoms.Plo -rm -f ./$(DEPDIR)/inpututils.Plo -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/pixmap.Plo -rm -f ./$(DEPDIR)/privates.Plo -rm -f ./$(DEPDIR)/property.Plo -rm -f ./$(DEPDIR)/ptrveloc.Plo -rm -f ./$(DEPDIR)/region.Plo -rm -f ./$(DEPDIR)/registry.Plo -rm -f ./$(DEPDIR)/resource.Plo -rm -f ./$(DEPDIR)/selection.Plo -rm -f ./$(DEPDIR)/stubmain.Plo -rm -f ./$(DEPDIR)/swaprep.Plo -rm -f ./$(DEPDIR)/swapreq.Plo -rm -f ./$(DEPDIR)/tables.Plo -rm -f ./$(DEPDIR)/touch.Plo -rm -f ./$(DEPDIR)/window.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_miscconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/atom.Plo -rm -f ./$(DEPDIR)/colormap.Plo -rm -f ./$(DEPDIR)/cursor.Plo -rm -f ./$(DEPDIR)/devices.Plo -rm -f ./$(DEPDIR)/dispatch.Plo -rm -f ./$(DEPDIR)/dixfonts.Plo -rm -f ./$(DEPDIR)/dixutils.Plo -rm -f ./$(DEPDIR)/enterleave.Plo -rm -f ./$(DEPDIR)/eventconvert.Plo -rm -f ./$(DEPDIR)/events.Plo -rm -f ./$(DEPDIR)/extension.Plo -rm -f ./$(DEPDIR)/gc.Plo -rm -f ./$(DEPDIR)/gestures.Plo -rm -f ./$(DEPDIR)/getevents.Plo -rm -f ./$(DEPDIR)/globals.Plo -rm -f ./$(DEPDIR)/glyphcurs.Plo -rm -f ./$(DEPDIR)/grabs.Plo -rm -f ./$(DEPDIR)/initatoms.Plo -rm -f ./$(DEPDIR)/inpututils.Plo -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/pixmap.Plo -rm -f ./$(DEPDIR)/privates.Plo -rm -f ./$(DEPDIR)/property.Plo -rm -f ./$(DEPDIR)/ptrveloc.Plo -rm -f ./$(DEPDIR)/region.Plo -rm -f ./$(DEPDIR)/registry.Plo -rm -f ./$(DEPDIR)/resource.Plo -rm -f ./$(DEPDIR)/selection.Plo -rm -f ./$(DEPDIR)/stubmain.Plo -rm -f ./$(DEPDIR)/swaprep.Plo -rm -f ./$(DEPDIR)/swapreq.Plo -rm -f ./$(DEPDIR)/tables.Plo -rm -f ./$(DEPDIR)/touch.Plo -rm -f ./$(DEPDIR)/window.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_miscconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_miscconfigDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-dist_miscconfigDATA .PRECIOUS: Makefile # Generate dtrace object code for probes in libdix @SPECIAL_DTRACE_OBJECTS_TRUE@dtrace-dix.o: $(top_srcdir)/include/Xserver.d libdix.la @SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) @SPECIAL_DTRACE_OBJECTS_TRUE@dix.O: dtrace-dix.o libdix.la @SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)ld -r -o $@ $(am_libdix_la_OBJECTS:%.lo=.libs/%.o) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/dix/atom.c0000644000175000017500000001337514757411105011534 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include "misc.h" #include "resource.h" #include "dix.h" #define InitialTableSize 256 typedef struct _Node { struct _Node *left, *right; Atom a; unsigned int fingerPrint; const char *string; } NodeRec, *NodePtr; static Atom lastAtom = None; static NodePtr atomRoot = NULL; static unsigned long tableLength; static NodePtr *nodeTable; Atom MakeAtom(const char *string, unsigned len, Bool makeit) { NodePtr *np; unsigned i; int comp; unsigned int fp = 0; np = &atomRoot; for (i = 0; i < (len + 1) / 2; i++) { fp = fp * 27 + string[i]; fp = fp * 27 + string[len - 1 - i]; } while (*np != NULL) { if (fp < (*np)->fingerPrint) np = &((*np)->left); else if (fp > (*np)->fingerPrint) np = &((*np)->right); else { /* now start testing the strings */ comp = strncmp(string, (*np)->string, (int) len); if ((comp < 0) || ((comp == 0) && (len < strlen((*np)->string)))) np = &((*np)->left); else if (comp > 0) np = &((*np)->right); else return (*np)->a; } } if (makeit) { NodePtr nd; nd = malloc(sizeof(NodeRec)); if (!nd) return BAD_RESOURCE; if (lastAtom < XA_LAST_PREDEFINED) { nd->string = string; } else { nd->string = strndup(string, len); if (!nd->string) { free(nd); return BAD_RESOURCE; } } if ((lastAtom + 1) >= tableLength) { NodePtr *table; table = reallocarray(nodeTable, tableLength, 2 * sizeof(NodePtr)); if (!table) { if (nd->string != string) { /* nd->string has been strdup'ed */ free((char *) nd->string); } free(nd); return BAD_RESOURCE; } tableLength <<= 1; nodeTable = table; } *np = nd; nd->left = nd->right = NULL; nd->fingerPrint = fp; nd->a = ++lastAtom; nodeTable[lastAtom] = nd; return nd->a; } else return None; } Bool ValidAtom(Atom atom) { return (atom != None) && (atom <= lastAtom); } const char * NameForAtom(Atom atom) { NodePtr node; if (atom > lastAtom) return 0; if ((node = nodeTable[atom]) == NULL) return 0; return node->string; } void AtomError(void) { FatalError("initializing atoms"); } static void FreeAtom(NodePtr patom) { if (patom->left) FreeAtom(patom->left); if (patom->right) FreeAtom(patom->right); if (patom->a > XA_LAST_PREDEFINED) { /* * All strings above XA_LAST_PREDEFINED are strdup'ed, so it's safe to * cast here */ free((char *) patom->string); } free(patom); } void FreeAllAtoms(void) { if (atomRoot == NULL) return; FreeAtom(atomRoot); atomRoot = NULL; free(nodeTable); nodeTable = NULL; lastAtom = None; } void InitAtoms(void) { FreeAllAtoms(); tableLength = InitialTableSize; nodeTable = xallocarray(InitialTableSize, sizeof(NodePtr)); if (!nodeTable) AtomError(); nodeTable[None] = NULL; MakePredeclaredAtoms(); if (lastAtom != XA_LAST_PREDEFINED) AtomError(); } xorg-server-21.1.16/dix/colormap.c0000644000175000017500000024657414757411105012421 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "misc.h" #include "dix.h" #include "dixstruct.h" #include "colormapst.h" #include "os.h" #include "scrnintstr.h" #include "resource.h" #include "windowstr.h" #include "privates.h" #include "xace.h" typedef int (*ColorCompareProcPtr) (EntryPtr /*pent */ , xrgb * /*prgb */ ); static Pixel FindBestPixel(EntryPtr /*pentFirst */ , int /*size */ , xrgb * /*prgb */ , int /*channel */ ); static int AllComp(EntryPtr /*pent */ , xrgb * /*prgb */ ); static int RedComp(EntryPtr /*pent */ , xrgb * /*prgb */ ); static int GreenComp(EntryPtr /*pent */ , xrgb * /*prgb */ ); static int BlueComp(EntryPtr /*pent */ , xrgb * /*prgb */ ); static void FreePixels(ColormapPtr /*pmap */ , int /*client */ ); static void CopyFree(int /*channel */ , int /*client */ , ColormapPtr /*pmapSrc */ , ColormapPtr /*pmapDst */ ); static void FreeCell(ColormapPtr /*pmap */ , Pixel /*i */ , int /*channel */ ); static void UpdateColors(ColormapPtr /*pmap */ ); static int AllocDirect(int /*client */ , ColormapPtr /*pmap */ , int /*c */ , int /*r */ , int /*g */ , int /*b */ , Bool /*contig */ , Pixel * /*pixels */ , Pixel * /*prmask */ , Pixel * /*pgmask */ , Pixel * /*pbmask */ ); static int AllocPseudo(int /*client */ , ColormapPtr /*pmap */ , int /*c */ , int /*r */ , Bool /*contig */ , Pixel * /*pixels */ , Pixel * /*pmask */ , Pixel ** /*pppixFirst */ ); static Bool AllocCP(ColormapPtr /*pmap */ , EntryPtr /*pentFirst */ , int /*count */ , int /*planes */ , Bool /*contig */ , Pixel * /*pixels */ , Pixel * /*pMask */ ); static Bool AllocShared(ColormapPtr /*pmap */ , Pixel * /*ppix */ , int /*c */ , int /*r */ , int /*g */ , int /*b */ , Pixel /*rmask */ , Pixel /*gmask */ , Pixel /*bmask */ , Pixel * /*ppixFirst */ ); static int FreeCo(ColormapPtr /*pmap */ , int /*client */ , int /*color */ , int /*npixIn */ , Pixel * /*ppixIn */ , Pixel /*mask */ ); static int TellNoMap(WindowPtr /*pwin */ , Colormap * /*pmid */ ); static void FindColorInRootCmap(ColormapPtr /* pmap */ , EntryPtr /* pentFirst */ , int /* size */ , xrgb * /* prgb */ , Pixel * /* pPixel */ , int /* channel */ , ColorCompareProcPtr /* comp */ ); #define NUMRED(vis) ((vis->redMask >> vis->offsetRed) + 1) #define NUMGREEN(vis) ((vis->greenMask >> vis->offsetGreen) + 1) #define NUMBLUE(vis) ((vis->blueMask >> vis->offsetBlue) + 1) #if COMPOSITE #define ALPHAMASK(vis) ((vis)->nplanes < 32 ? 0 : \ (CARD32) ~((vis)->redMask|(vis)->greenMask|(vis)->blueMask)) #else #define ALPHAMASK(vis) 0 #endif #define RGBMASK(vis) (vis->redMask | vis->greenMask | vis->blueMask | ALPHAMASK(vis)) /* GetNextBitsOrBreak(bits, mask, base) -- * (Suggestion: First read the macro, then read this explanation. * * Either generate the next value to OR in to a pixel or break out of this * while loop * * This macro is used when we're trying to generate all 2^n combinations of * bits in mask. What we're doing here is counting in binary, except that * the bits we use to count may not be contiguous. This macro will be * called 2^n times, returning a different value in bits each time. Then * it will cause us to break out of a surrounding loop. (It will always be * called from within a while loop.) * On call: mask is the value we want to find all the combinations for * base has 1 bit set where the least significant bit of mask is set * * For example,if mask is 01010, base should be 0010 and we count like this: * 00010 (see this isn't so hard), * then we add base to bits and get 0100. (bits & ~mask) is (0100 & 0100) so * we add that to bits getting (0100 + 0100) = * 01000 for our next value. * then we add 0010 to get * 01010 and we're done (easy as 1, 2, 3) */ #define GetNextBitsOrBreak(bits, mask, base) \ if((bits) == (mask)) \ break; \ (bits) += (base); \ while((bits) & ~(mask)) \ (bits) += ((bits) & ~(mask)); /* ID of server as client */ #define SERVER_ID 0 typedef struct _colorResource { Colormap mid; int client; } colorResource; /* Invariants: * refcnt == 0 means entry is empty * refcnt > 0 means entry is useable by many clients, so it can't be changed * refcnt == AllocPrivate means entry owned by one client only * fShared should only be set if refcnt == AllocPrivate, and only in red map */ /** * Create and initialize the color map * * \param mid resource to use for this colormap * \param alloc 1 iff all entries are allocated writable */ int CreateColormap(Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, ColormapPtr *ppcmap, int alloc, int client) { int class, size; unsigned long sizebytes; ColormapPtr pmap; EntryPtr pent; int i; Pixel *ppix, **pptr; class = pVisual->class; if (!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID)) return BadMatch; size = pVisual->ColormapEntries; sizebytes = (size * sizeof(Entry)) + (LimitClients * sizeof(Pixel *)) + (LimitClients * sizeof(int)); if ((class | DynamicClass) == DirectColor) sizebytes *= 3; sizebytes += sizeof(ColormapRec); if (mid == pScreen->defColormap) { pmap = malloc(sizebytes); if (!pmap) return BadAlloc; if (!dixAllocatePrivates(&pmap->devPrivates, PRIVATE_COLORMAP)) { free(pmap); return BadAlloc; } } else { pmap = _dixAllocateObjectWithPrivates(sizebytes, sizebytes, offsetof(ColormapRec, devPrivates), PRIVATE_COLORMAP); if (!pmap) return BadAlloc; } pmap->red = (EntryPtr) ((char *) pmap + sizeof(ColormapRec)); sizebytes = size * sizeof(Entry); pmap->clientPixelsRed = (Pixel **) ((char *) pmap->red + sizebytes); pmap->numPixelsRed = (int *) ((char *) pmap->clientPixelsRed + (LimitClients * sizeof(Pixel *))); pmap->mid = mid; pmap->flags = 0; /* start out with all flags clear */ if (mid == pScreen->defColormap) pmap->flags |= IsDefault; pmap->pScreen = pScreen; pmap->pVisual = pVisual; pmap->class = class; if ((class | DynamicClass) == DirectColor) size = NUMRED(pVisual); pmap->freeRed = size; memset((char *) pmap->red, 0, (int) sizebytes); memset((char *) pmap->numPixelsRed, 0, LimitClients * sizeof(int)); for (pptr = &pmap->clientPixelsRed[LimitClients]; --pptr >= pmap->clientPixelsRed;) *pptr = (Pixel *) NULL; if (alloc == AllocAll) { if (class & DynamicClass) pmap->flags |= AllAllocated; for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--) pent->refcnt = AllocPrivate; pmap->freeRed = 0; ppix = xallocarray(size, sizeof(Pixel)); if (!ppix) { free(pmap); return BadAlloc; } pmap->clientPixelsRed[client] = ppix; for (i = 0; i < size; i++) ppix[i] = i; pmap->numPixelsRed[client] = size; } if ((class | DynamicClass) == DirectColor) { pmap->freeGreen = NUMGREEN(pVisual); pmap->green = (EntryPtr) ((char *) pmap->numPixelsRed + (LimitClients * sizeof(int))); pmap->clientPixelsGreen = (Pixel **) ((char *) pmap->green + sizebytes); pmap->numPixelsGreen = (int *) ((char *) pmap->clientPixelsGreen + (LimitClients * sizeof(Pixel *))); pmap->freeBlue = NUMBLUE(pVisual); pmap->blue = (EntryPtr) ((char *) pmap->numPixelsGreen + (LimitClients * sizeof(int))); pmap->clientPixelsBlue = (Pixel **) ((char *) pmap->blue + sizebytes); pmap->numPixelsBlue = (int *) ((char *) pmap->clientPixelsBlue + (LimitClients * sizeof(Pixel *))); memset((char *) pmap->green, 0, (int) sizebytes); memset((char *) pmap->blue, 0, (int) sizebytes); memmove((char *) pmap->clientPixelsGreen, (char *) pmap->clientPixelsRed, LimitClients * sizeof(Pixel *)); memmove((char *) pmap->clientPixelsBlue, (char *) pmap->clientPixelsRed, LimitClients * sizeof(Pixel *)); memset((char *) pmap->numPixelsGreen, 0, LimitClients * sizeof(int)); memset((char *) pmap->numPixelsBlue, 0, LimitClients * sizeof(int)); /* If every cell is allocated, mark its refcnt */ if (alloc == AllocAll) { size = pmap->freeGreen; for (pent = &pmap->green[size - 1]; pent >= pmap->green; pent--) pent->refcnt = AllocPrivate; pmap->freeGreen = 0; ppix = xallocarray(size, sizeof(Pixel)); if (!ppix) { free(pmap->clientPixelsRed[client]); free(pmap); return BadAlloc; } pmap->clientPixelsGreen[client] = ppix; for (i = 0; i < size; i++) ppix[i] = i; pmap->numPixelsGreen[client] = size; size = pmap->freeBlue; for (pent = &pmap->blue[size - 1]; pent >= pmap->blue; pent--) pent->refcnt = AllocPrivate; pmap->freeBlue = 0; ppix = xallocarray(size, sizeof(Pixel)); if (!ppix) { free(pmap->clientPixelsGreen[client]); free(pmap->clientPixelsRed[client]); free(pmap); return BadAlloc; } pmap->clientPixelsBlue[client] = ppix; for (i = 0; i < size; i++) ppix[i] = i; pmap->numPixelsBlue[client] = size; } } pmap->flags |= BeingCreated; if (!AddResource(mid, RT_COLORMAP, (void *) pmap)) return BadAlloc; /* * Security creation/labeling check */ i = XaceHook(XACE_RESOURCE_ACCESS, clients[client], mid, RT_COLORMAP, pmap, RT_NONE, NULL, DixCreateAccess); if (i != Success) { FreeResource(mid, RT_NONE); return i; } /* If the device wants a chance to initialize the colormap in any way, * this is it. In specific, if this is a Static colormap, this is the * time to fill in the colormap's values */ if (!(*pScreen->CreateColormap) (pmap)) { FreeResource(mid, RT_NONE); return BadAlloc; } pmap->flags &= ~BeingCreated; *ppcmap = pmap; return Success; } /** * * \param value must conform to DeleteType */ int FreeColormap(void *value, XID mid) { int i; EntryPtr pent; ColormapPtr pmap = (ColormapPtr) value; if (CLIENT_ID(mid) != SERVER_ID) { (*pmap->pScreen->UninstallColormap) (pmap); WalkTree(pmap->pScreen, (VisitWindowProcPtr) TellNoMap, (void *) &mid); } /* This is the device's chance to undo anything it needs to, especially * to free any storage it allocated */ (*pmap->pScreen->DestroyColormap) (pmap); if (pmap->clientPixelsRed) { for (i = 0; i < LimitClients; i++) free(pmap->clientPixelsRed[i]); } if ((pmap->class == PseudoColor) || (pmap->class == GrayScale)) { for (pent = &pmap->red[pmap->pVisual->ColormapEntries - 1]; pent >= pmap->red; pent--) { if (pent->fShared) { if (--pent->co.shco.red->refcnt == 0) free(pent->co.shco.red); if (--pent->co.shco.green->refcnt == 0) free(pent->co.shco.green); if (--pent->co.shco.blue->refcnt == 0) free(pent->co.shco.blue); } } } if ((pmap->class | DynamicClass) == DirectColor) { for (i = 0; i < LimitClients; i++) { free(pmap->clientPixelsGreen[i]); free(pmap->clientPixelsBlue[i]); } } if (pmap->flags & IsDefault) { dixFreePrivates(pmap->devPrivates, PRIVATE_COLORMAP); free(pmap); } else dixFreeObjectWithPrivates(pmap, PRIVATE_COLORMAP); return Success; } /* Tell window that pmid has disappeared */ static int TellNoMap(WindowPtr pwin, Colormap * pmid) { if (wColormap(pwin) == *pmid) { /* This should be call to DeliverEvent */ xEvent xE = { .u.colormap.window = pwin->drawable.id, .u.colormap.colormap = None, .u.colormap.new = TRUE, .u.colormap.state = ColormapUninstalled }; xE.u.u.type = ColormapNotify; #ifdef PANORAMIX if (noPanoramiXExtension || !pwin->drawable.pScreen->myNum) #endif DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); if (pwin->optional) { pwin->optional->colormap = None; CheckWindowOptionalNeed(pwin); } } return WT_WALKCHILDREN; } /* Tell window that pmid got uninstalled */ int TellLostMap(WindowPtr pwin, void *value) { Colormap *pmid = (Colormap *) value; #ifdef PANORAMIX if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum) return WT_STOPWALKING; #endif if (wColormap(pwin) == *pmid) { /* This should be call to DeliverEvent */ xEvent xE = { .u.colormap.window = pwin->drawable.id, .u.colormap.colormap = *pmid, .u.colormap.new = FALSE, .u.colormap.state = ColormapUninstalled }; xE.u.u.type = ColormapNotify; DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); } return WT_WALKCHILDREN; } /* Tell window that pmid got installed */ int TellGainedMap(WindowPtr pwin, void *value) { Colormap *pmid = (Colormap *) value; #ifdef PANORAMIX if (!noPanoramiXExtension && pwin->drawable.pScreen->myNum) return WT_STOPWALKING; #endif if (wColormap(pwin) == *pmid) { /* This should be call to DeliverEvent */ xEvent xE = { .u.colormap.window = pwin->drawable.id, .u.colormap.colormap = *pmid, .u.colormap.new = FALSE, .u.colormap.state = ColormapInstalled }; xE.u.u.type = ColormapNotify; DeliverEvents(pwin, &xE, 1, (WindowPtr) NULL); } return WT_WALKCHILDREN; } int CopyColormapAndFree(Colormap mid, ColormapPtr pSrc, int client) { ColormapPtr pmap = (ColormapPtr) NULL; int result, alloc, size; Colormap midSrc; ScreenPtr pScreen; VisualPtr pVisual; pScreen = pSrc->pScreen; pVisual = pSrc->pVisual; midSrc = pSrc->mid; alloc = ((pSrc->flags & AllAllocated) && CLIENT_ID(midSrc) == client) ? AllocAll : AllocNone; size = pVisual->ColormapEntries; /* If the create returns non-0, it failed */ result = CreateColormap(mid, pScreen, pVisual, &pmap, alloc, client); if (result != Success) return result; if (alloc == AllocAll) { memmove((char *) pmap->red, (char *) pSrc->red, size * sizeof(Entry)); if ((pmap->class | DynamicClass) == DirectColor) { memmove((char *) pmap->green, (char *) pSrc->green, size * sizeof(Entry)); memmove((char *) pmap->blue, (char *) pSrc->blue, size * sizeof(Entry)); } pSrc->flags &= ~AllAllocated; FreePixels(pSrc, client); UpdateColors(pmap); return Success; } CopyFree(REDMAP, client, pSrc, pmap); if ((pmap->class | DynamicClass) == DirectColor) { CopyFree(GREENMAP, client, pSrc, pmap); CopyFree(BLUEMAP, client, pSrc, pmap); } if (pmap->class & DynamicClass) UpdateColors(pmap); /* XXX should worry about removing any RT_CMAPENTRY resource */ return Success; } /* Helper routine for freeing large numbers of cells from a map */ static void CopyFree(int channel, int client, ColormapPtr pmapSrc, ColormapPtr pmapDst) { int z, npix; EntryPtr pentSrcFirst, pentDstFirst; EntryPtr pentSrc, pentDst; Pixel *ppix; int nalloc; switch (channel) { default: /* so compiler can see that everything gets initialized */ case REDMAP: ppix = (pmapSrc->clientPixelsRed)[client]; npix = (pmapSrc->numPixelsRed)[client]; pentSrcFirst = pmapSrc->red; pentDstFirst = pmapDst->red; break; case GREENMAP: ppix = (pmapSrc->clientPixelsGreen)[client]; npix = (pmapSrc->numPixelsGreen)[client]; pentSrcFirst = pmapSrc->green; pentDstFirst = pmapDst->green; break; case BLUEMAP: ppix = (pmapSrc->clientPixelsBlue)[client]; npix = (pmapSrc->numPixelsBlue)[client]; pentSrcFirst = pmapSrc->blue; pentDstFirst = pmapDst->blue; break; } nalloc = 0; if (pmapSrc->class & DynamicClass) { for (z = npix; --z >= 0; ppix++) { /* Copy entries */ pentSrc = pentSrcFirst + *ppix; pentDst = pentDstFirst + *ppix; if (pentDst->refcnt > 0) { pentDst->refcnt++; } else { *pentDst = *pentSrc; nalloc++; if (pentSrc->refcnt > 0) pentDst->refcnt = 1; else pentSrc->fShared = FALSE; } FreeCell(pmapSrc, *ppix, channel); } } /* Note that FreeCell has already fixed pmapSrc->free{Color} */ switch (channel) { case REDMAP: pmapDst->freeRed -= nalloc; (pmapDst->clientPixelsRed)[client] = (pmapSrc->clientPixelsRed)[client]; (pmapSrc->clientPixelsRed)[client] = (Pixel *) NULL; (pmapDst->numPixelsRed)[client] = (pmapSrc->numPixelsRed)[client]; (pmapSrc->numPixelsRed)[client] = 0; break; case GREENMAP: pmapDst->freeGreen -= nalloc; (pmapDst->clientPixelsGreen)[client] = (pmapSrc->clientPixelsGreen)[client]; (pmapSrc->clientPixelsGreen)[client] = (Pixel *) NULL; (pmapDst->numPixelsGreen)[client] = (pmapSrc->numPixelsGreen)[client]; (pmapSrc->numPixelsGreen)[client] = 0; break; case BLUEMAP: pmapDst->freeBlue -= nalloc; pmapDst->clientPixelsBlue[client] = pmapSrc->clientPixelsBlue[client]; pmapSrc->clientPixelsBlue[client] = (Pixel *) NULL; pmapDst->numPixelsBlue[client] = pmapSrc->numPixelsBlue[client]; pmapSrc->numPixelsBlue[client] = 0; break; } } /* Free the ith entry in a color map. Must handle freeing of * colors allocated through AllocColorPlanes */ static void FreeCell(ColormapPtr pmap, Pixel i, int channel) { EntryPtr pent; int *pCount; switch (channel) { default: /* so compiler can see that everything gets initialized */ case PSEUDOMAP: case REDMAP: pent = (EntryPtr) &pmap->red[i]; pCount = &pmap->freeRed; break; case GREENMAP: pent = (EntryPtr) &pmap->green[i]; pCount = &pmap->freeGreen; break; case BLUEMAP: pent = (EntryPtr) &pmap->blue[i]; pCount = &pmap->freeBlue; break; } /* If it's not privately allocated and it's not time to free it, just * decrement the count */ if (pent->refcnt > 1) pent->refcnt--; else { /* If the color type is shared, find the sharedcolor. If decremented * refcnt is 0, free the shared cell. */ if (pent->fShared) { if (--pent->co.shco.red->refcnt == 0) free(pent->co.shco.red); if (--pent->co.shco.green->refcnt == 0) free(pent->co.shco.green); if (--pent->co.shco.blue->refcnt == 0) free(pent->co.shco.blue); pent->fShared = FALSE; } pent->refcnt = 0; *pCount += 1; } } static void UpdateColors(ColormapPtr pmap) { xColorItem *defs; xColorItem *pdef; EntryPtr pent; VisualPtr pVisual; int i, n, size; pVisual = pmap->pVisual; size = pVisual->ColormapEntries; defs = xallocarray(size, sizeof(xColorItem)); if (!defs) return; n = 0; pdef = defs; if (pmap->class == DirectColor) { for (i = 0; i < size; i++) { if (!pmap->red[i].refcnt && !pmap->green[i].refcnt && !pmap->blue[i].refcnt) continue; pdef->pixel = ((Pixel) i << pVisual->offsetRed) | ((Pixel) i << pVisual->offsetGreen) | ((Pixel) i << pVisual->offsetBlue); pdef->red = pmap->red[i].co.local.red; pdef->green = pmap->green[i].co.local.green; pdef->blue = pmap->blue[i].co.local.blue; pdef->flags = DoRed | DoGreen | DoBlue; pdef++; n++; } } else { for (i = 0, pent = pmap->red; i < size; i++, pent++) { if (!pent->refcnt) continue; pdef->pixel = i; if (pent->fShared) { pdef->red = pent->co.shco.red->color; pdef->green = pent->co.shco.green->color; pdef->blue = pent->co.shco.blue->color; } else { pdef->red = pent->co.local.red; pdef->green = pent->co.local.green; pdef->blue = pent->co.local.blue; } pdef->flags = DoRed | DoGreen | DoBlue; pdef++; n++; } } if (n) (*pmap->pScreen->StoreColors) (pmap, n, defs); free(defs); } /* Tries to find a color in pmap that exactly matches the one requested in prgb * if it can't it allocates one. * Starts looking at pentFirst + *pPixel, so if you want a specific pixel, * load *pPixel with that value, otherwise set it to 0 */ static int FindColor(ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb * prgb, Pixel * pPixel, int channel, int client, ColorCompareProcPtr comp) { EntryPtr pent; Bool foundFree; Pixel pixel, Free = 0; int npix, count, *nump = NULL; Pixel **pixp = NULL, *ppix; xColorItem def; foundFree = FALSE; if ((pixel = *pPixel) >= size) pixel = 0; /* see if there is a match, and also look for a free entry */ for (pent = pentFirst + pixel, count = size; --count >= 0;) { if (pent->refcnt > 0) { if ((*comp) (pent, prgb)) { if (client >= 0) pent->refcnt++; *pPixel = pixel; switch (channel) { case REDMAP: *pPixel <<= pmap->pVisual->offsetRed; case PSEUDOMAP: break; case GREENMAP: *pPixel <<= pmap->pVisual->offsetGreen; break; case BLUEMAP: *pPixel <<= pmap->pVisual->offsetBlue; break; } goto gotit; } } else if (!foundFree && pent->refcnt == 0) { Free = pixel; foundFree = TRUE; /* If we're initializing the colormap, then we are looking for * the first free cell we can find, not to minimize the number * of entries we use. So don't look any further. */ if (pmap->flags & BeingCreated) break; } pixel++; if (pixel >= size) { pent = pentFirst; pixel = 0; } else pent++; } /* If we got here, we didn't find a match. If we also didn't find * a free entry, we're out of luck. Otherwise, we'll usurp a free * entry and fill it in */ if (!foundFree) return BadAlloc; pent = pentFirst + Free; pent->fShared = FALSE; pent->refcnt = (client >= 0) ? 1 : AllocTemporary; switch (channel) { case PSEUDOMAP: pent->co.local.red = prgb->red; pent->co.local.green = prgb->green; pent->co.local.blue = prgb->blue; def.red = prgb->red; def.green = prgb->green; def.blue = prgb->blue; def.flags = (DoRed | DoGreen | DoBlue); if (client >= 0) pmap->freeRed--; def.pixel = Free; break; case REDMAP: pent->co.local.red = prgb->red; def.red = prgb->red; def.green = pmap->green[0].co.local.green; def.blue = pmap->blue[0].co.local.blue; def.flags = DoRed; if (client >= 0) pmap->freeRed--; def.pixel = Free << pmap->pVisual->offsetRed; break; case GREENMAP: pent->co.local.green = prgb->green; def.red = pmap->red[0].co.local.red; def.green = prgb->green; def.blue = pmap->blue[0].co.local.blue; def.flags = DoGreen; if (client >= 0) pmap->freeGreen--; def.pixel = Free << pmap->pVisual->offsetGreen; break; case BLUEMAP: pent->co.local.blue = prgb->blue; def.red = pmap->red[0].co.local.red; def.green = pmap->green[0].co.local.green; def.blue = prgb->blue; def.flags = DoBlue; if (client >= 0) pmap->freeBlue--; def.pixel = Free << pmap->pVisual->offsetBlue; break; } (*pmap->pScreen->StoreColors) (pmap, 1, &def); pixel = Free; *pPixel = def.pixel; gotit: if (pmap->flags & BeingCreated || client == -1) return Success; /* Now remember the pixel, for freeing later */ switch (channel) { case PSEUDOMAP: case REDMAP: nump = pmap->numPixelsRed; pixp = pmap->clientPixelsRed; break; case GREENMAP: nump = pmap->numPixelsGreen; pixp = pmap->clientPixelsGreen; break; case BLUEMAP: nump = pmap->numPixelsBlue; pixp = pmap->clientPixelsBlue; break; } npix = nump[client]; ppix = reallocarray(pixp[client], npix + 1, sizeof(Pixel)); if (!ppix) { pent->refcnt--; if (!pent->fShared) switch (channel) { case PSEUDOMAP: case REDMAP: pmap->freeRed++; break; case GREENMAP: pmap->freeGreen++; break; case BLUEMAP: pmap->freeBlue++; break; } return BadAlloc; } ppix[npix] = pixel; pixp[client] = ppix; nump[client]++; return Success; } /* Get a read-only color from a ColorMap (probably slow for large maps) * Returns by changing the value in pred, pgreen, pblue and pPix */ int AllocColor(ColormapPtr pmap, unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, Pixel * pPix, int client) { Pixel pixR, pixG, pixB; int entries; xrgb rgb; int class; VisualPtr pVisual; int npix; Pixel *ppix; pVisual = pmap->pVisual; (*pmap->pScreen->ResolveColor) (pred, pgreen, pblue, pVisual); rgb.red = *pred; rgb.green = *pgreen; rgb.blue = *pblue; class = pmap->class; entries = pVisual->ColormapEntries; /* If the colormap is being created, then we want to be able to change * the colormap, even if it's a static type. Otherwise, we'd never be * able to initialize static colormaps */ if (pmap->flags & BeingCreated) class |= DynamicClass; /* If this is one of the static storage classes, and we're not initializing * it, the best we can do is to find the closest color entry to the * requested one and return that. */ switch (class) { case StaticColor: case StaticGray: /* Look up all three components in the same pmap */ *pPix = pixR = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); *pred = pmap->red[pixR].co.local.red; *pgreen = pmap->red[pixR].co.local.green; *pblue = pmap->red[pixR].co.local.blue; npix = pmap->numPixelsRed[client]; ppix = reallocarray(pmap->clientPixelsRed[client], npix + 1, sizeof(Pixel)); if (!ppix) return BadAlloc; ppix[npix] = pixR; pmap->clientPixelsRed[client] = ppix; pmap->numPixelsRed[client]++; break; case TrueColor: /* Look up each component in its own map, then OR them together */ pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); *pPix = (pixR << pVisual->offsetRed) | (pixG << pVisual->offsetGreen) | (pixB << pVisual->offsetBlue) | ALPHAMASK(pVisual); *pred = pmap->red[pixR].co.local.red; *pgreen = pmap->green[pixG].co.local.green; *pblue = pmap->blue[pixB].co.local.blue; npix = pmap->numPixelsRed[client]; ppix = reallocarray(pmap->clientPixelsRed[client], npix + 1, sizeof(Pixel)); if (!ppix) return BadAlloc; ppix[npix] = pixR; pmap->clientPixelsRed[client] = ppix; npix = pmap->numPixelsGreen[client]; ppix = reallocarray(pmap->clientPixelsGreen[client], npix + 1, sizeof(Pixel)); if (!ppix) return BadAlloc; ppix[npix] = pixG; pmap->clientPixelsGreen[client] = ppix; npix = pmap->numPixelsBlue[client]; ppix = reallocarray(pmap->clientPixelsBlue[client], npix + 1, sizeof(Pixel)); if (!ppix) return BadAlloc; ppix[npix] = pixB; pmap->clientPixelsBlue[client] = ppix; pmap->numPixelsRed[client]++; pmap->numPixelsGreen[client]++; pmap->numPixelsBlue[client]++; break; case GrayScale: case PseudoColor: if (pmap->mid != pmap->pScreen->defColormap && pmap->pVisual->vid == pmap->pScreen->rootVisual) { ColormapPtr prootmap; dixLookupResourceByType((void **) &prootmap, pmap->pScreen->defColormap, RT_COLORMAP, clients[client], DixReadAccess); if (pmap->class == prootmap->class) FindColorInRootCmap(prootmap, prootmap->red, entries, &rgb, pPix, PSEUDOMAP, AllComp); } if (FindColor(pmap, pmap->red, entries, &rgb, pPix, PSEUDOMAP, client, AllComp) != Success) return BadAlloc; break; case DirectColor: if (pmap->mid != pmap->pScreen->defColormap && pmap->pVisual->vid == pmap->pScreen->rootVisual) { ColormapPtr prootmap; dixLookupResourceByType((void **) &prootmap, pmap->pScreen->defColormap, RT_COLORMAP, clients[client], DixReadAccess); if (pmap->class == prootmap->class) { pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; FindColorInRootCmap(prootmap, prootmap->red, entries, &rgb, &pixR, REDMAP, RedComp); pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; FindColorInRootCmap(prootmap, prootmap->green, entries, &rgb, &pixG, GREENMAP, GreenComp); pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; FindColorInRootCmap(prootmap, prootmap->blue, entries, &rgb, &pixB, BLUEMAP, BlueComp); *pPix = pixR | pixG | pixB; } } pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, client, RedComp) != Success) return BadAlloc; pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, GREENMAP, client, GreenComp) != Success) { (void) FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel) 0); return BadAlloc; } pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, client, BlueComp) != Success) { (void) FreeCo(pmap, client, GREENMAP, 1, &pixG, (Pixel) 0); (void) FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel) 0); return BadAlloc; } *pPix = pixR | pixG | pixB | ALPHAMASK(pVisual); break; } /* if this is the client's first pixel in this colormap, tell the * resource manager that the client has pixels in this colormap which * should be freed when the client dies */ if ((pmap->numPixelsRed[client] == 1) && (CLIENT_ID(pmap->mid) != client) && !(pmap->flags & BeingCreated)) { colorResource *pcr; pcr = malloc(sizeof(colorResource)); if (!pcr) { (void) FreeColors(pmap, client, 1, pPix, (Pixel) 0); return BadAlloc; } pcr->mid = pmap->mid; pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr)) return BadAlloc; } return Success; } /* * FakeAllocColor -- fake an AllocColor request by * returning a free pixel if available, otherwise returning * the closest matching pixel. This is used by the mi * software sprite code to recolor cursors. A nice side-effect * is that this routine will never return failure. */ void FakeAllocColor(ColormapPtr pmap, xColorItem * item) { Pixel pixR, pixG, pixB; Pixel temp; int entries; xrgb rgb; int class; VisualPtr pVisual; pVisual = pmap->pVisual; rgb.red = item->red; rgb.green = item->green; rgb.blue = item->blue; (*pmap->pScreen->ResolveColor) (&rgb.red, &rgb.green, &rgb.blue, pVisual); class = pmap->class; entries = pVisual->ColormapEntries; switch (class) { case GrayScale: case PseudoColor: temp = 0; item->pixel = 0; if (FindColor(pmap, pmap->red, entries, &rgb, &temp, PSEUDOMAP, -1, AllComp) == Success) { item->pixel = temp; break; } /* fall through ... */ case StaticColor: case StaticGray: item->pixel = FindBestPixel(pmap->red, entries, &rgb, PSEUDOMAP); break; case DirectColor: /* Look up each component in its own map, then OR them together */ pixR = (item->pixel & pVisual->redMask) >> pVisual->offsetRed; pixG = (item->pixel & pVisual->greenMask) >> pVisual->offsetGreen; pixB = (item->pixel & pVisual->blueMask) >> pVisual->offsetBlue; if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, -1, RedComp) != Success) pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP) << pVisual->offsetRed; if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, GREENMAP, -1, GreenComp) != Success) pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP) << pVisual->offsetGreen; if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, -1, BlueComp) != Success) pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP) << pVisual->offsetBlue; item->pixel = pixR | pixG | pixB; break; case TrueColor: /* Look up each component in its own map, then OR them together */ pixR = FindBestPixel(pmap->red, NUMRED(pVisual), &rgb, REDMAP); pixG = FindBestPixel(pmap->green, NUMGREEN(pVisual), &rgb, GREENMAP); pixB = FindBestPixel(pmap->blue, NUMBLUE(pVisual), &rgb, BLUEMAP); item->pixel = (pixR << pVisual->offsetRed) | (pixG << pVisual->offsetGreen) | (pixB << pVisual->offsetBlue); break; } } /* free a pixel value obtained from FakeAllocColor */ void FakeFreeColor(ColormapPtr pmap, Pixel pixel) { VisualPtr pVisual; Pixel pixR, pixG, pixB; switch (pmap->class) { case GrayScale: case PseudoColor: if (pmap->red[pixel].refcnt == AllocTemporary) pmap->red[pixel].refcnt = 0; break; case DirectColor: pVisual = pmap->pVisual; pixR = (pixel & pVisual->redMask) >> pVisual->offsetRed; pixG = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; pixB = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; if (pmap->red[pixR].refcnt == AllocTemporary) pmap->red[pixR].refcnt = 0; if (pmap->green[pixG].refcnt == AllocTemporary) pmap->green[pixG].refcnt = 0; if (pmap->blue[pixB].refcnt == AllocTemporary) pmap->blue[pixB].refcnt = 0; break; } } typedef unsigned short BigNumUpper; typedef unsigned long BigNumLower; #define BIGNUMLOWERBITS 24 #define BIGNUMUPPERBITS 16 #define BIGNUMLOWER (1 << BIGNUMLOWERBITS) #define BIGNUMUPPER (1 << BIGNUMUPPERBITS) #define UPPERPART(i) ((i) >> BIGNUMLOWERBITS) #define LOWERPART(i) ((i) & (BIGNUMLOWER - 1)) typedef struct _bignum { BigNumUpper upper; BigNumLower lower; } BigNumRec, *BigNumPtr; #define BigNumGreater(x,y) (((x)->upper > (y)->upper) ||\ ((x)->upper == (y)->upper && (x)->lower > (y)->lower)) #define UnsignedToBigNum(u,r) (((r)->upper = UPPERPART(u)), \ ((r)->lower = LOWERPART(u))) #define MaxBigNum(r) (((r)->upper = BIGNUMUPPER-1), \ ((r)->lower = BIGNUMLOWER-1)) static void BigNumAdd(BigNumPtr x, BigNumPtr y, BigNumPtr r) { BigNumLower lower, carry = 0; lower = x->lower + y->lower; if (lower >= BIGNUMLOWER) { lower -= BIGNUMLOWER; carry = 1; } r->lower = lower; r->upper = x->upper + y->upper + carry; } static Pixel FindBestPixel(EntryPtr pentFirst, int size, xrgb * prgb, int channel) { EntryPtr pent; Pixel pixel, final; long dr, dg, db; unsigned long sq; BigNumRec minval, sum, temp; final = 0; MaxBigNum(&minval); /* look for the minimal difference */ for (pent = pentFirst, pixel = 0; pixel < size; pent++, pixel++) { dr = dg = db = 0; switch (channel) { case PSEUDOMAP: dg = (long) pent->co.local.green - prgb->green; db = (long) pent->co.local.blue - prgb->blue; /* fallthrough */ case REDMAP: dr = (long) pent->co.local.red - prgb->red; break; case GREENMAP: dg = (long) pent->co.local.green - prgb->green; break; case BLUEMAP: db = (long) pent->co.local.blue - prgb->blue; break; } sq = dr * dr; UnsignedToBigNum(sq, &sum); sq = dg * dg; UnsignedToBigNum(sq, &temp); BigNumAdd(&sum, &temp, &sum); sq = db * db; UnsignedToBigNum(sq, &temp); BigNumAdd(&sum, &temp, &sum); if (BigNumGreater(&minval, &sum)) { final = pixel; minval = sum; } } return final; } static void FindColorInRootCmap(ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb * prgb, Pixel * pPixel, int channel, ColorCompareProcPtr comp) { EntryPtr pent; Pixel pixel; int count; if ((pixel = *pPixel) >= size) pixel = 0; for (pent = pentFirst + pixel, count = size; --count >= 0; pent++, pixel++) { if (pent->refcnt > 0 && (*comp) (pent, prgb)) { switch (channel) { case REDMAP: pixel <<= pmap->pVisual->offsetRed; break; case GREENMAP: pixel <<= pmap->pVisual->offsetGreen; break; case BLUEMAP: pixel <<= pmap->pVisual->offsetBlue; break; default: /* PSEUDOMAP */ break; } *pPixel = pixel; } } } /* Comparison functions -- passed to FindColor to determine if an * entry is already the color we're looking for or not */ static int AllComp(EntryPtr pent, xrgb * prgb) { if ((pent->co.local.red == prgb->red) && (pent->co.local.green == prgb->green) && (pent->co.local.blue == prgb->blue)) return 1; return 0; } static int RedComp(EntryPtr pent, xrgb * prgb) { if (pent->co.local.red == prgb->red) return 1; return 0; } static int GreenComp(EntryPtr pent, xrgb * prgb) { if (pent->co.local.green == prgb->green) return 1; return 0; } static int BlueComp(EntryPtr pent, xrgb * prgb) { if (pent->co.local.blue == prgb->blue) return 1; return 0; } /* Read the color value of a cell */ int QueryColors(ColormapPtr pmap, int count, Pixel * ppixIn, xrgb * prgbList, ClientPtr client) { Pixel *ppix, pixel; xrgb *prgb; VisualPtr pVisual; EntryPtr pent; Pixel i; int errVal = Success; pVisual = pmap->pVisual; if ((pmap->class | DynamicClass) == DirectColor) { int numred, numgreen, numblue; Pixel rgbbad; numred = NUMRED(pVisual); numgreen = NUMGREEN(pVisual); numblue = NUMBLUE(pVisual); rgbbad = ~RGBMASK(pVisual); for (ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) { pixel = *ppix; if (pixel & rgbbad) { client->errorValue = pixel; errVal = BadValue; continue; } i = (pixel & pVisual->redMask) >> pVisual->offsetRed; if (i >= numred) { client->errorValue = pixel; errVal = BadValue; continue; } prgb->red = pmap->red[i].co.local.red; i = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; if (i >= numgreen) { client->errorValue = pixel; errVal = BadValue; continue; } prgb->green = pmap->green[i].co.local.green; i = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; if (i >= numblue) { client->errorValue = pixel; errVal = BadValue; continue; } prgb->blue = pmap->blue[i].co.local.blue; } } else { for (ppix = ppixIn, prgb = prgbList; --count >= 0; ppix++, prgb++) { pixel = *ppix; if (pixel >= pVisual->ColormapEntries) { client->errorValue = pixel; errVal = BadValue; } else { pent = (EntryPtr) &pmap->red[pixel]; if (pent->fShared) { prgb->red = pent->co.shco.red->color; prgb->green = pent->co.shco.green->color; prgb->blue = pent->co.shco.blue->color; } else { prgb->red = pent->co.local.red; prgb->green = pent->co.local.green; prgb->blue = pent->co.local.blue; } } } } return errVal; } static void FreePixels(ColormapPtr pmap, int client) { Pixel *ppix, *ppixStart; int n; int class; class = pmap->class; ppixStart = pmap->clientPixelsRed[client]; if (class & DynamicClass) { n = pmap->numPixelsRed[client]; for (ppix = ppixStart; --n >= 0;) { FreeCell(pmap, *ppix, REDMAP); ppix++; } } free(ppixStart); pmap->clientPixelsRed[client] = (Pixel *) NULL; pmap->numPixelsRed[client] = 0; if ((class | DynamicClass) == DirectColor) { ppixStart = pmap->clientPixelsGreen[client]; if (class & DynamicClass) for (ppix = ppixStart, n = pmap->numPixelsGreen[client]; --n >= 0;) FreeCell(pmap, *ppix++, GREENMAP); free(ppixStart); pmap->clientPixelsGreen[client] = (Pixel *) NULL; pmap->numPixelsGreen[client] = 0; ppixStart = pmap->clientPixelsBlue[client]; if (class & DynamicClass) for (ppix = ppixStart, n = pmap->numPixelsBlue[client]; --n >= 0;) FreeCell(pmap, *ppix++, BLUEMAP); free(ppixStart); pmap->clientPixelsBlue[client] = (Pixel *) NULL; pmap->numPixelsBlue[client] = 0; } } /** * Frees all of a client's colors and cells. * * \param value must conform to DeleteType * \unused fakeid */ int FreeClientPixels(void *value, XID fakeid) { void *pmap; colorResource *pcr = value; int rc; rc = dixLookupResourceByType(&pmap, pcr->mid, RT_COLORMAP, serverClient, DixRemoveAccess); if (rc == Success) FreePixels((ColormapPtr) pmap, pcr->client); free(pcr); return Success; } int AllocColorCells(int client, ColormapPtr pmap, int colors, int planes, Bool contig, Pixel * ppix, Pixel * masks) { Pixel rmask, gmask, bmask, *ppixFirst, r, g, b; int n, class; int ok; int oldcount; colorResource *pcr = (colorResource *) NULL; class = pmap->class; if (!(class & DynamicClass)) return BadAlloc; /* Shouldn't try on this type */ oldcount = pmap->numPixelsRed[client]; if (pmap->class == DirectColor) oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { pcr = malloc(sizeof(colorResource)); if (!pcr) return BadAlloc; } if (pmap->class == DirectColor) { ok = AllocDirect(client, pmap, colors, planes, planes, planes, contig, ppix, &rmask, &gmask, &bmask); if (ok == Success) { for (r = g = b = 1, n = planes; --n >= 0; r += r, g += g, b += b) { while (!(rmask & r)) r += r; while (!(gmask & g)) g += g; while (!(bmask & b)) b += b; *masks++ = r | g | b; } } } else { ok = AllocPseudo(client, pmap, colors, planes, contig, ppix, &rmask, &ppixFirst); if (ok == Success) { for (r = 1, n = planes; --n >= 0; r += r) { while (!(rmask & r)) r += r; *masks++ = r; } } } /* if this is the client's first pixels in this colormap, tell the * resource manager that the client has pixels in this colormap which * should be freed when the client dies */ if ((ok == Success) && pcr) { pcr->mid = pmap->mid; pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr)) ok = BadAlloc; } else free(pcr); return ok; } int AllocColorPlanes(int client, ColormapPtr pmap, int colors, int r, int g, int b, Bool contig, Pixel * pixels, Pixel * prmask, Pixel * pgmask, Pixel * pbmask) { int ok; Pixel mask, *ppixFirst; Pixel shift; int i; int class; int oldcount; colorResource *pcr = (colorResource *) NULL; class = pmap->class; if (!(class & DynamicClass)) return BadAlloc; /* Shouldn't try on this type */ oldcount = pmap->numPixelsRed[client]; if (class == DirectColor) oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { pcr = malloc(sizeof(colorResource)); if (!pcr) return BadAlloc; } if (class == DirectColor) { ok = AllocDirect(client, pmap, colors, r, g, b, contig, pixels, prmask, pgmask, pbmask); } else { /* Allocate the proper pixels */ /* XXX This is sort of bad, because of contig is set, we force all * r + g + b bits to be contiguous. Should only force contiguity * per mask */ ok = AllocPseudo(client, pmap, colors, r + g + b, contig, pixels, &mask, &ppixFirst); if (ok == Success) { /* now split that mask into three */ *prmask = *pgmask = *pbmask = 0; shift = 1; for (i = r; --i >= 0; shift += shift) { while (!(mask & shift)) shift += shift; *prmask |= shift; } for (i = g; --i >= 0; shift += shift) { while (!(mask & shift)) shift += shift; *pgmask |= shift; } for (i = b; --i >= 0; shift += shift) { while (!(mask & shift)) shift += shift; *pbmask |= shift; } /* set up the shared color cells */ if (!AllocShared(pmap, pixels, colors, r, g, b, *prmask, *pgmask, *pbmask, ppixFirst)) { (void) FreeColors(pmap, client, colors, pixels, mask); ok = BadAlloc; } } } /* if this is the client's first pixels in this colormap, tell the * resource manager that the client has pixels in this colormap which * should be freed when the client dies */ if ((ok == Success) && pcr) { pcr->mid = pmap->mid; pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (void *) pcr)) ok = BadAlloc; } else free(pcr); return ok; } static int AllocDirect(int client, ColormapPtr pmap, int c, int r, int g, int b, Bool contig, Pixel * pixels, Pixel * prmask, Pixel * pgmask, Pixel * pbmask) { Pixel *ppixRed, *ppixGreen, *ppixBlue; Pixel *ppix, *pDst, *p; int npix, npixR, npixG, npixB; Bool okR, okG, okB; Pixel *rpix = 0, *gpix = 0, *bpix = 0; npixR = c << r; npixG = c << g; npixB = c << b; if ((r >= 32) || (g >= 32) || (b >= 32) || (npixR > pmap->freeRed) || (npixR < c) || (npixG > pmap->freeGreen) || (npixG < c) || (npixB > pmap->freeBlue) || (npixB < c)) return BadAlloc; /* start out with empty pixels */ for (p = pixels; p < pixels + c; p++) *p = 0; ppixRed = xallocarray(npixR, sizeof(Pixel)); ppixGreen = xallocarray(npixG, sizeof(Pixel)); ppixBlue = xallocarray(npixB, sizeof(Pixel)); if (!ppixRed || !ppixGreen || !ppixBlue) { free(ppixBlue); free(ppixGreen); free(ppixRed); return BadAlloc; } okR = AllocCP(pmap, pmap->red, c, r, contig, ppixRed, prmask); okG = AllocCP(pmap, pmap->green, c, g, contig, ppixGreen, pgmask); okB = AllocCP(pmap, pmap->blue, c, b, contig, ppixBlue, pbmask); if (okR && okG && okB) { rpix = reallocarray(pmap->clientPixelsRed[client], pmap->numPixelsRed[client] + (c << r), sizeof(Pixel)); if (rpix) pmap->clientPixelsRed[client] = rpix; gpix = reallocarray(pmap->clientPixelsGreen[client], pmap->numPixelsGreen[client] + (c << g), sizeof(Pixel)); if (gpix) pmap->clientPixelsGreen[client] = gpix; bpix = reallocarray(pmap->clientPixelsBlue[client], pmap->numPixelsBlue[client] + (c << b), sizeof(Pixel)); if (bpix) pmap->clientPixelsBlue[client] = bpix; } if (!okR || !okG || !okB || !rpix || !gpix || !bpix) { if (okR) for (ppix = ppixRed, npix = npixR; --npix >= 0; ppix++) pmap->red[*ppix].refcnt = 0; if (okG) for (ppix = ppixGreen, npix = npixG; --npix >= 0; ppix++) pmap->green[*ppix].refcnt = 0; if (okB) for (ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) pmap->blue[*ppix].refcnt = 0; free(ppixBlue); free(ppixGreen); free(ppixRed); return BadAlloc; } *prmask <<= pmap->pVisual->offsetRed; *pgmask <<= pmap->pVisual->offsetGreen; *pbmask <<= pmap->pVisual->offsetBlue; ppix = rpix + pmap->numPixelsRed[client]; for (pDst = pixels, p = ppixRed; p < ppixRed + npixR; p++) { *ppix++ = *p; if (p < ppixRed + c) *pDst++ |= *p << pmap->pVisual->offsetRed; } pmap->numPixelsRed[client] += npixR; pmap->freeRed -= npixR; ppix = gpix + pmap->numPixelsGreen[client]; for (pDst = pixels, p = ppixGreen; p < ppixGreen + npixG; p++) { *ppix++ = *p; if (p < ppixGreen + c) *pDst++ |= *p << pmap->pVisual->offsetGreen; } pmap->numPixelsGreen[client] += npixG; pmap->freeGreen -= npixG; ppix = bpix + pmap->numPixelsBlue[client]; for (pDst = pixels, p = ppixBlue; p < ppixBlue + npixB; p++) { *ppix++ = *p; if (p < ppixBlue + c) *pDst++ |= *p << pmap->pVisual->offsetBlue; } pmap->numPixelsBlue[client] += npixB; pmap->freeBlue -= npixB; for (pDst = pixels; pDst < pixels + c; pDst++) *pDst |= ALPHAMASK(pmap->pVisual); free(ppixBlue); free(ppixGreen); free(ppixRed); return Success; } static int AllocPseudo(int client, ColormapPtr pmap, int c, int r, Bool contig, Pixel * pixels, Pixel * pmask, Pixel ** pppixFirst) { Pixel *ppix, *p, *pDst, *ppixTemp; int npix; Bool ok; npix = c << r; if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) return BadAlloc; if (!(ppixTemp = xallocarray(npix, sizeof(Pixel)))) return BadAlloc; ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); if (ok) { /* all the allocated pixels are added to the client pixel list, * but only the unique ones are returned to the client */ ppix = reallocarray(pmap->clientPixelsRed[client], pmap->numPixelsRed[client] + npix, sizeof(Pixel)); if (!ppix) { for (p = ppixTemp; p < ppixTemp + npix; p++) pmap->red[*p].refcnt = 0; free(ppixTemp); return BadAlloc; } pmap->clientPixelsRed[client] = ppix; ppix += pmap->numPixelsRed[client]; *pppixFirst = ppix; pDst = pixels; for (p = ppixTemp; p < ppixTemp + npix; p++) { *ppix++ = *p; if (p < ppixTemp + c) *pDst++ = *p; } pmap->numPixelsRed[client] += npix; pmap->freeRed -= npix; } free(ppixTemp); return ok ? Success : BadAlloc; } /* Allocates count << planes pixels from colormap pmap for client. If * contig, then the plane mask is made of consecutive bits. Returns * all count << pixels in the array pixels. The first count of those * pixels are the unique pixels. *pMask has the mask to Or with the * unique pixels to get the rest of them. * * Returns True iff all pixels could be allocated * All cells allocated will have refcnt set to AllocPrivate and shared to FALSE * (see AllocShared for why we care) */ static Bool AllocCP(ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, Bool contig, Pixel * pixels, Pixel * pMask) { EntryPtr ent; Pixel pixel, base, entries, maxp, save; int dplanes, found; Pixel *ppix; Pixel mask; Pixel finalmask; dplanes = pmap->pVisual->nplanes; /* Easy case. Allocate pixels only */ if (planes == 0) { /* allocate writable entries */ ppix = pixels; ent = pentFirst; pixel = 0; while (--count >= 0) { /* Just find count unallocated cells */ while (ent->refcnt) { ent++; pixel++; } ent->refcnt = AllocPrivate; *ppix++ = pixel; ent->fShared = FALSE; } *pMask = 0; return TRUE; } else if (planes > dplanes) { return FALSE; } /* General case count pixels * 2 ^ planes cells to be allocated */ /* make room for new pixels */ ent = pentFirst; /* first try for contiguous planes, since it's fastest */ for (mask = (((Pixel) 1) << planes) - 1, base = 1, dplanes -= (planes - 1); --dplanes >= 0; mask += mask, base += base) { ppix = pixels; found = 0; pixel = 0; entries = pmap->pVisual->ColormapEntries - mask; while (pixel < entries) { save = pixel; maxp = pixel + mask + base; /* check if all are free */ while (pixel != maxp && ent[pixel].refcnt == 0) pixel += base; if (pixel == maxp) { /* this one works */ *ppix++ = save; found++; if (found == count) { /* found enough, allocate them all */ while (--count >= 0) { pixel = pixels[count]; maxp = pixel + mask; while (1) { ent[pixel].refcnt = AllocPrivate; ent[pixel].fShared = FALSE; if (pixel == maxp) break; pixel += base; *ppix++ = pixel; } } *pMask = mask; return TRUE; } } pixel = save + 1; if (pixel & mask) pixel += mask; } } dplanes = pmap->pVisual->nplanes; if (contig || planes == 1 || dplanes < 3) return FALSE; /* this will be very slow for large maps, need a better algorithm */ /* we can generate the smallest and largest numbers that fits in dplanes bits and contain exactly planes bits set as follows. First, we need to check that it is possible to generate such a mask at all. (Non-contiguous masks need one more bit than contiguous masks). Then the smallest such mask consists of the rightmost planes-1 bits set, then a zero, then a one in position planes + 1. The formula is (3 << (planes-1)) -1 The largest such masks consists of the leftmost planes-1 bits set, then a zero, then a one bit in position dplanes-planes-1. If dplanes is smaller than 32 (the number of bits in a word) then the formula is: (1<>> */ finalmask = (((((Pixel) 1) << (planes - 1)) - 1) << (dplanes - planes + 1)) + (((Pixel) 1) << (dplanes - planes - 1)); for (mask = (((Pixel) 3) << (planes - 1)) - 1; mask <= finalmask; mask++) { /* next 3 magic statements count number of ones (HAKMEM #169) */ pixel = (mask >> 1) & 033333333333; pixel = mask - pixel - ((pixel >> 1) & 033333333333); if ((((pixel + (pixel >> 3)) & 030707070707) % 077) != planes) continue; ppix = pixels; found = 0; entries = pmap->pVisual->ColormapEntries - mask; base = lowbit(mask); for (pixel = 0; pixel < entries; pixel++) { if (pixel & mask) continue; maxp = 0; /* check if all are free */ while (ent[pixel + maxp].refcnt == 0) { GetNextBitsOrBreak(maxp, mask, base); } if ((maxp < mask) || (ent[pixel + mask].refcnt != 0)) continue; /* this one works */ *ppix++ = pixel; found++; if (found < count) continue; /* found enough, allocate them all */ while (--count >= 0) { pixel = (pixels)[count]; maxp = 0; while (1) { ent[pixel + maxp].refcnt = AllocPrivate; ent[pixel + maxp].fShared = FALSE; GetNextBitsOrBreak(maxp, mask, base); *ppix++ = pixel + maxp; } } *pMask = mask; return TRUE; } } return FALSE; } /** * * \param ppixFirst First of the client's new pixels */ static Bool AllocShared(ColormapPtr pmap, Pixel * ppix, int c, int r, int g, int b, Pixel rmask, Pixel gmask, Pixel bmask, Pixel * ppixFirst) { Pixel *pptr, *cptr; int npix, z, npixClientNew, npixShared; Pixel basemask, base, bits, common; SHAREDCOLOR *pshared, **ppshared, **psharedList; npixClientNew = c << (r + g + b); npixShared = (c << r) + (c << g) + (c << b); psharedList = xallocarray(npixShared, sizeof(SHAREDCOLOR *)); if (!psharedList) return FALSE; ppshared = psharedList; for (z = npixShared; --z >= 0;) { if (!(ppshared[z] = malloc(sizeof(SHAREDCOLOR)))) { for (z++; z < npixShared; z++) free(ppshared[z]); free(psharedList); return FALSE; } } for (pptr = ppix, npix = c; --npix >= 0; pptr++) { basemask = ~(gmask | bmask); common = *pptr & basemask; if (rmask) { bits = 0; base = lowbit(rmask); while (1) { pshared = *ppshared++; pshared->refcnt = 1 << (g + b); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == (common | bits)) { pmap->red[*cptr].fShared = TRUE; pmap->red[*cptr].co.shco.red = pshared; } } GetNextBitsOrBreak(bits, rmask, base); } } else { pshared = *ppshared++; pshared->refcnt = 1 << (g + b); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == common) { pmap->red[*cptr].fShared = TRUE; pmap->red[*cptr].co.shco.red = pshared; } } } basemask = ~(rmask | bmask); common = *pptr & basemask; if (gmask) { bits = 0; base = lowbit(gmask); while (1) { pshared = *ppshared++; pshared->refcnt = 1 << (r + b); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == (common | bits)) { pmap->red[*cptr].co.shco.green = pshared; } } GetNextBitsOrBreak(bits, gmask, base); } } else { pshared = *ppshared++; pshared->refcnt = 1 << (g + b); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == common) { pmap->red[*cptr].co.shco.green = pshared; } } } basemask = ~(rmask | gmask); common = *pptr & basemask; if (bmask) { bits = 0; base = lowbit(bmask); while (1) { pshared = *ppshared++; pshared->refcnt = 1 << (r + g); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == (common | bits)) { pmap->red[*cptr].co.shco.blue = pshared; } } GetNextBitsOrBreak(bits, bmask, base); } } else { pshared = *ppshared++; pshared->refcnt = 1 << (g + b); for (cptr = ppixFirst, z = npixClientNew; --z >= 0; cptr++) { if ((*cptr & basemask) == common) { pmap->red[*cptr].co.shco.blue = pshared; } } } } free(psharedList); return TRUE; } /** FreeColors * Free colors and/or cells (probably slow for large numbers) */ int FreeColors(ColormapPtr pmap, int client, int count, Pixel * pixels, Pixel mask) { int rval, result, class; Pixel rmask; class = pmap->class; if (pmap->flags & AllAllocated) return BadAccess; if ((class | DynamicClass) == DirectColor) { rmask = mask & RGBMASK(pmap->pVisual); result = FreeCo(pmap, client, REDMAP, count, pixels, mask & pmap->pVisual->redMask); /* If any of the three calls fails, we must report that, if more * than one fails, it's ok that we report the last one */ rval = FreeCo(pmap, client, GREENMAP, count, pixels, mask & pmap->pVisual->greenMask); if (rval != Success) result = rval; rval = FreeCo(pmap, client, BLUEMAP, count, pixels, mask & pmap->pVisual->blueMask); if (rval != Success) result = rval; } else { rmask = mask & ((((Pixel) 1) << pmap->pVisual->nplanes) - 1); result = FreeCo(pmap, client, PSEUDOMAP, count, pixels, rmask); } if ((mask != rmask) && count) { clients[client]->errorValue = *pixels | mask; result = BadValue; } /* XXX should worry about removing any RT_CMAPENTRY resource */ return result; } /** * Helper for FreeColors -- frees all combinations of *newpixels and mask bits * which the client has allocated in channel colormap cells of pmap. * doesn't change newpixels if it doesn't need to * * \param pmap which colormap head * \param color which sub-map, eg, RED, BLUE, PSEUDO * \param npixIn number of pixels passed in * \param ppixIn number of base pixels * \param mask mask client gave us */ static int FreeCo(ColormapPtr pmap, int client, int color, int npixIn, Pixel * ppixIn, Pixel mask) { Pixel *ppixClient, pixTest; int npixClient, npixNew, npix; Pixel bits, base, cmask, rgbbad; Pixel *pptr, *cptr; int n, zapped; int errVal = Success; int offset, numents; if (npixIn == 0) return errVal; bits = 0; zapped = 0; base = lowbit(mask); switch (color) { case REDMAP: cmask = pmap->pVisual->redMask; rgbbad = ~RGBMASK(pmap->pVisual); offset = pmap->pVisual->offsetRed; numents = (cmask >> offset) + 1; ppixClient = pmap->clientPixelsRed[client]; npixClient = pmap->numPixelsRed[client]; break; case GREENMAP: cmask = pmap->pVisual->greenMask; rgbbad = ~RGBMASK(pmap->pVisual); offset = pmap->pVisual->offsetGreen; numents = (cmask >> offset) + 1; ppixClient = pmap->clientPixelsGreen[client]; npixClient = pmap->numPixelsGreen[client]; break; case BLUEMAP: cmask = pmap->pVisual->blueMask; rgbbad = ~RGBMASK(pmap->pVisual); offset = pmap->pVisual->offsetBlue; numents = (cmask >> offset) + 1; ppixClient = pmap->clientPixelsBlue[client]; npixClient = pmap->numPixelsBlue[client]; break; default: /* so compiler can see that everything gets initialized */ case PSEUDOMAP: cmask = ~((Pixel) 0); rgbbad = 0; offset = 0; numents = pmap->pVisual->ColormapEntries; ppixClient = pmap->clientPixelsRed[client]; npixClient = pmap->numPixelsRed[client]; break; } /* zap all pixels which match */ while (1) { /* go through pixel list */ for (pptr = ppixIn, n = npixIn; --n >= 0; pptr++) { pixTest = ((*pptr | bits) & cmask) >> offset; if ((pixTest >= numents) || (*pptr & rgbbad)) { clients[client]->errorValue = *pptr | bits; errVal = BadValue; continue; } /* find match in client list */ for (cptr = ppixClient, npix = npixClient; --npix >= 0 && *cptr != pixTest; cptr++); if (npix >= 0) { if (pmap->class & DynamicClass) { FreeCell(pmap, pixTest, color); } *cptr = ~((Pixel) 0); zapped++; } else errVal = BadAccess; } /* generate next bits value */ GetNextBitsOrBreak(bits, mask, base); } /* delete freed pixels from client pixel list */ if (zapped) { npixNew = npixClient - zapped; if (npixNew) { /* Since the list can only get smaller, we can do a copy in * place and then realloc to a smaller size */ pptr = cptr = ppixClient; /* If we have all the new pixels, we don't have to examine the * rest of the old ones */ for (npix = 0; npix < npixNew; cptr++) { if (*cptr != ~((Pixel) 0)) { *pptr++ = *cptr; npix++; } } pptr = reallocarray(ppixClient, npixNew, sizeof(Pixel)); if (pptr) ppixClient = pptr; npixClient = npixNew; } else { npixClient = 0; free(ppixClient); ppixClient = (Pixel *) NULL; } switch (color) { case PSEUDOMAP: case REDMAP: pmap->clientPixelsRed[client] = ppixClient; pmap->numPixelsRed[client] = npixClient; break; case GREENMAP: pmap->clientPixelsGreen[client] = ppixClient; pmap->numPixelsGreen[client] = npixClient; break; case BLUEMAP: pmap->clientPixelsBlue[client] = ppixClient; pmap->numPixelsBlue[client] = npixClient; break; } } return errVal; } /* Redefine color values */ int StoreColors(ColormapPtr pmap, int count, xColorItem * defs, ClientPtr client) { Pixel pix; xColorItem *pdef; EntryPtr pent, pentT, pentLast; VisualPtr pVisual; SHAREDCOLOR *pred, *pgreen, *pblue; int n, ChgRed, ChgGreen, ChgBlue, idef; int class, errVal = Success; int ok; class = pmap->class; if (!(class & DynamicClass) && !(pmap->flags & BeingCreated)) { return BadAccess; } pVisual = pmap->pVisual; idef = 0; if ((class | DynamicClass) == DirectColor) { int numred, numgreen, numblue; Pixel rgbbad; numred = NUMRED(pVisual); numgreen = NUMGREEN(pVisual); numblue = NUMBLUE(pVisual); rgbbad = ~RGBMASK(pVisual); for (pdef = defs, n = 0; n < count; pdef++, n++) { ok = TRUE; (*pmap->pScreen->ResolveColor) (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); if (pdef->pixel & rgbbad) { errVal = BadValue; client->errorValue = pdef->pixel; continue; } pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed; if (pix >= numred) { errVal = BadValue; ok = FALSE; } else if (pmap->red[pix].refcnt != AllocPrivate) { errVal = BadAccess; ok = FALSE; } else if (pdef->flags & DoRed) { pmap->red[pix].co.local.red = pdef->red; } else { pdef->red = pmap->red[pix].co.local.red; } pix = (pdef->pixel & pVisual->greenMask) >> pVisual->offsetGreen; if (pix >= numgreen) { errVal = BadValue; ok = FALSE; } else if (pmap->green[pix].refcnt != AllocPrivate) { errVal = BadAccess; ok = FALSE; } else if (pdef->flags & DoGreen) { pmap->green[pix].co.local.green = pdef->green; } else { pdef->green = pmap->green[pix].co.local.green; } pix = (pdef->pixel & pVisual->blueMask) >> pVisual->offsetBlue; if (pix >= numblue) { errVal = BadValue; ok = FALSE; } else if (pmap->blue[pix].refcnt != AllocPrivate) { errVal = BadAccess; ok = FALSE; } else if (pdef->flags & DoBlue) { pmap->blue[pix].co.local.blue = pdef->blue; } else { pdef->blue = pmap->blue[pix].co.local.blue; } /* If this is an o.k. entry, then it gets added to the list * to be sent to the hardware. If not, skip it. Once we've * skipped one, we have to copy all the others. */ if (ok) { if (idef != n) defs[idef] = defs[n]; idef++; } else client->errorValue = pdef->pixel; } } else { for (pdef = defs, n = 0; n < count; pdef++, n++) { ok = TRUE; if (pdef->pixel >= pVisual->ColormapEntries) { client->errorValue = pdef->pixel; errVal = BadValue; ok = FALSE; } else if (pmap->red[pdef->pixel].refcnt != AllocPrivate) { errVal = BadAccess; ok = FALSE; } /* If this is an o.k. entry, then it gets added to the list * to be sent to the hardware. If not, skip it. Once we've * skipped one, we have to copy all the others. */ if (ok) { if (idef != n) defs[idef] = defs[n]; idef++; } else continue; (*pmap->pScreen->ResolveColor) (&pdef->red, &pdef->green, &pdef->blue, pmap->pVisual); pent = &pmap->red[pdef->pixel]; if (pdef->flags & DoRed) { if (pent->fShared) { pent->co.shco.red->color = pdef->red; if (pent->co.shco.red->refcnt > 1) ok = FALSE; } else pent->co.local.red = pdef->red; } else { if (pent->fShared) pdef->red = pent->co.shco.red->color; else pdef->red = pent->co.local.red; } if (pdef->flags & DoGreen) { if (pent->fShared) { pent->co.shco.green->color = pdef->green; if (pent->co.shco.green->refcnt > 1) ok = FALSE; } else pent->co.local.green = pdef->green; } else { if (pent->fShared) pdef->green = pent->co.shco.green->color; else pdef->green = pent->co.local.green; } if (pdef->flags & DoBlue) { if (pent->fShared) { pent->co.shco.blue->color = pdef->blue; if (pent->co.shco.blue->refcnt > 1) ok = FALSE; } else pent->co.local.blue = pdef->blue; } else { if (pent->fShared) pdef->blue = pent->co.shco.blue->color; else pdef->blue = pent->co.local.blue; } if (!ok) { /* have to run through the colormap and change anybody who * shares this value */ pred = pent->co.shco.red; pgreen = pent->co.shco.green; pblue = pent->co.shco.blue; ChgRed = pdef->flags & DoRed; ChgGreen = pdef->flags & DoGreen; ChgBlue = pdef->flags & DoBlue; pentLast = pmap->red + pVisual->ColormapEntries; for (pentT = pmap->red; pentT < pentLast; pentT++) { if (pentT->fShared && (pentT != pent)) { xColorItem defChg; /* There are, alas, devices in this world too dumb * to read their own hardware colormaps. Sick, but * true. So we're going to be really nice and load * the xColorItem with the proper value for all the * fields. We will only set the flags for those * fields that actually change. Smart devices can * arrange to change only those fields. Dumb devices * can rest assured that we have provided for them, * and can change all three fields */ defChg.flags = 0; if (ChgRed && pentT->co.shco.red == pred) { defChg.flags |= DoRed; } if (ChgGreen && pentT->co.shco.green == pgreen) { defChg.flags |= DoGreen; } if (ChgBlue && pentT->co.shco.blue == pblue) { defChg.flags |= DoBlue; } if (defChg.flags != 0) { defChg.pixel = pentT - pmap->red; defChg.red = pentT->co.shco.red->color; defChg.green = pentT->co.shco.green->color; defChg.blue = pentT->co.shco.blue->color; (*pmap->pScreen->StoreColors) (pmap, 1, &defChg); } } } } } } /* Note that we use idef, the count of acceptable entries, and not * count, the count of proposed entries */ if (idef != 0) (*pmap->pScreen->StoreColors) (pmap, idef, defs); return errVal; } int IsMapInstalled(Colormap map, WindowPtr pWin) { Colormap *pmaps; int imap, nummaps, found; pmaps = xallocarray(pWin->drawable.pScreen->maxInstalledCmaps, sizeof(Colormap)); if (!pmaps) return FALSE; nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) (pWin->drawable.pScreen, pmaps); found = FALSE; for (imap = 0; imap < nummaps; imap++) { if (pmaps[imap] == map) { found = TRUE; break; } } free(pmaps); return found; } struct colormap_lookup_data { ScreenPtr pScreen; VisualPtr visuals; }; static void _colormap_find_resource(void *value, XID id, void *cdata) { struct colormap_lookup_data *cmap_data = cdata; VisualPtr visuals = cmap_data->visuals; ScreenPtr pScreen = cmap_data->pScreen; ColormapPtr cmap = value; int j; if (pScreen != cmap->pScreen) return; j = cmap->pVisual - pScreen->visuals; cmap->pVisual = &visuals[j]; } /* something has realloced the visuals, instead of breaking ABI fix it up here - glx and composite did this wrong */ Bool ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, DepthPtr depth) { struct colormap_lookup_data cdata; int numVisuals; VisualPtr visuals; XID *vids, vid; int first_new_vid, first_new_visual, i; first_new_vid = depth->numVids; first_new_visual = pScreen->numVisuals; vids = reallocarray(depth->vids, depth->numVids + new_visual_count, sizeof(XID)); if (!vids) return FALSE; /* its realloced now no going back if we fail the next one */ depth->vids = vids; numVisuals = pScreen->numVisuals + new_visual_count; visuals = reallocarray(pScreen->visuals, numVisuals, sizeof(VisualRec)); if (!visuals) { return FALSE; } cdata.visuals = visuals; cdata.pScreen = pScreen; FindClientResourcesByType(serverClient, RT_COLORMAP, _colormap_find_resource, &cdata); pScreen->visuals = visuals; for (i = 0; i < new_visual_count; i++) { vid = FakeClientID(0); pScreen->visuals[first_new_visual + i].vid = vid; vids[first_new_vid + i] = vid; } depth->numVids += new_visual_count; pScreen->numVisuals += new_visual_count; return TRUE; } xorg-server-21.1.16/dix/cursor.c0000644000175000017500000003625514757411105012113 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" #include "cursorstr.h" #include "dixfontstr.h" #include "opaque.h" #include "inputstr.h" #include "xace.h" typedef struct _GlyphShare { FontPtr font; unsigned short sourceChar; unsigned short maskChar; CursorBitsPtr bits; struct _GlyphShare *next; } GlyphShare, *GlyphSharePtr; static GlyphSharePtr sharedGlyphs = (GlyphSharePtr) NULL; DevScreenPrivateKeyRec cursorScreenDevPriv; static CARD32 cursorSerial; static void FreeCursorBits(CursorBitsPtr bits) { if (--bits->refcnt > 0) return; free(bits->source); free(bits->mask); free(bits->argb); dixFiniPrivates(bits, PRIVATE_CURSOR_BITS); if (bits->refcnt == 0) { GlyphSharePtr *prev, this; for (prev = &sharedGlyphs; (this = *prev) && (this->bits != bits); prev = &this->next); if (this) { *prev = this->next; CloseFont(this->font, (Font) 0); free(this); } free(bits); } } /** * To be called indirectly by DeleteResource; must use exactly two args. * * \param value must conform to DeleteType */ int FreeCursor(void *value, XID cid) { int nscr; CursorPtr pCurs = (CursorPtr) value; ScreenPtr pscr; DeviceIntPtr pDev = NULL; /* unused anyway */ UnrefCursor(pCurs); if (CursorRefCount(pCurs) != 0) return Success; BUG_WARN(CursorRefCount(pCurs) < 0); for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; (void) (*pscr->UnrealizeCursor) (pDev, pscr, pCurs); } FreeCursorBits(pCurs->bits); dixFiniPrivates(pCurs, PRIVATE_CURSOR); free(pCurs); return Success; } CursorPtr RefCursor(CursorPtr cursor) { if (cursor) cursor->refcnt++; return cursor; } CursorPtr UnrefCursor(CursorPtr cursor) { if (cursor) cursor->refcnt--; return cursor; } int CursorRefCount(const CursorPtr cursor) { return cursor ? cursor->refcnt : 0; } /* * We check for empty cursors so that we won't have to display them */ static void CheckForEmptyMask(CursorBitsPtr bits) { unsigned char *msk = bits->mask; int n = BitmapBytePad(bits->width) * bits->height; bits->emptyMask = FALSE; while (n--) if (*(msk++) != 0) return; if (bits->argb) { CARD32 *argb = bits->argb; n = bits->width * bits->height; while (n--) if (*argb++ & 0xff000000) return; } bits->emptyMask = TRUE; } /** * realize the cursor for every screen. Do not change the refcnt, this will be * changed when ChangeToCursor actually changes the sprite. * * @return Success if all cursors realize on all screens, BadAlloc if realize * failed for a device on a given screen. */ static int RealizeCursorAllScreens(CursorPtr pCurs) { DeviceIntPtr pDev; ScreenPtr pscr; int nscr; for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { if (!(*pscr->RealizeCursor) (pDev, pscr, pCurs)) { /* Realize failed for device pDev on screen pscr. * We have to assume that for all devices before, realize * worked. We need to rollback all devices so far on the * current screen and then all devices on previous * screens. */ DeviceIntPtr pDevIt = inputInfo.devices; /*dev iterator */ while (pDevIt && pDevIt != pDev) { if (DevHasCursor(pDevIt)) (*pscr->UnrealizeCursor) (pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } while (--nscr >= 0) { pscr = screenInfo.screens[nscr]; /* now unrealize all devices on previous screens */ pDevIt = inputInfo.devices; while (pDevIt) { if (DevHasCursor(pDevIt)) (*pscr->UnrealizeCursor) (pDevIt, pscr, pCurs); pDevIt = pDevIt->next; } (*pscr->UnrealizeCursor) (pDev, pscr, pCurs); } return BadAlloc; } } } } return Success; } /** * does nothing about the resource table, just creates the data structure. * does not copy the src and mask bits * * \param psrcbits server-defined padding * \param pmaskbits server-defined padding * \param argb no padding */ int AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, CARD32 *argb, CursorMetricPtr cm, unsigned foreRed, unsigned foreGreen, unsigned foreBlue, unsigned backRed, unsigned backGreen, unsigned backBlue, CursorPtr *ppCurs, ClientPtr client, XID cid) { CursorBitsPtr bits; CursorPtr pCurs; int rc; *ppCurs = NULL; pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); if (!pCurs) return BadAlloc; bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS) bits->source = psrcbits; bits->mask = pmaskbits; bits->argb = argb; bits->width = cm->width; bits->height = cm->height; bits->xhot = cm->xhot; bits->yhot = cm->yhot; pCurs->refcnt = 1; bits->refcnt = -1; CheckForEmptyMask(bits); pCurs->bits = bits; pCurs->serialNumber = ++cursorSerial; pCurs->name = None; pCurs->foreRed = foreRed; pCurs->foreGreen = foreGreen; pCurs->foreBlue = foreBlue; pCurs->backRed = backRed; pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; pCurs->id = cid; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, pCurs, RT_NONE, NULL, DixCreateAccess); if (rc != Success) goto error; rc = RealizeCursorAllScreens(pCurs); if (rc != Success) goto error; *ppCurs = pCurs; if (argb) { size_t i, size = bits->width * bits->height; for (i = 0; i < size; i++) { if ((argb[i] & 0xff000000) == 0 && (argb[i] & 0xffffff) != 0) { /* ARGB data doesn't seem pre-multiplied, fix it */ for (i = 0; i < size; i++) { CARD32 a, ar, ag, ab; a = argb[i] >> 24; ar = a * ((argb[i] >> 16) & 0xff) / 0xff; ag = a * ((argb[i] >> 8) & 0xff) / 0xff; ab = a * (argb[i] & 0xff) / 0xff; argb[i] = a << 24 | ar << 16 | ag << 8 | ab; } break; } } } return Success; error: FreeCursorBits(bits); dixFiniPrivates(pCurs, PRIVATE_CURSOR); free(pCurs); return rc; } int AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, unsigned foreRed, unsigned foreGreen, unsigned foreBlue, unsigned backRed, unsigned backGreen, unsigned backBlue, CursorPtr *ppCurs, ClientPtr client, XID cid) { FontPtr sourcefont, maskfont; unsigned char *srcbits; unsigned char *mskbits; CursorMetricRec cm; int rc; CursorBitsPtr bits; CursorPtr pCurs; GlyphSharePtr pShare; rc = dixLookupResourceByType((void **) &sourcefont, source, RT_FONT, client, DixUseAccess); if (rc != Success) { client->errorValue = source; return rc; } rc = dixLookupResourceByType((void **) &maskfont, mask, RT_FONT, client, DixUseAccess); if (rc != Success && mask != None) { client->errorValue = mask; return rc; } if (sourcefont != maskfont) pShare = (GlyphSharePtr) NULL; else { for (pShare = sharedGlyphs; pShare && ((pShare->font != sourcefont) || (pShare->sourceChar != sourceChar) || (pShare->maskChar != maskChar)); pShare = pShare->next); } if (pShare) { pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE, 1); if (!pCurs) return BadAlloc; dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); bits = pShare->bits; bits->refcnt++; } else { if (!CursorMetricsFromGlyph(sourcefont, sourceChar, &cm)) { client->errorValue = sourceChar; return BadValue; } if (!maskfont) { long n; unsigned char *mskptr; n = BitmapBytePad(cm.width) * (long) cm.height; mskptr = mskbits = malloc(n); if (!mskptr) return BadAlloc; while (--n >= 0) *mskptr++ = ~0; } else { if (!CursorMetricsFromGlyph(maskfont, maskChar, &cm)) { client->errorValue = maskChar; return BadValue; } if ((rc = ServerBitsFromGlyph(maskfont, maskChar, &cm, &mskbits))) return rc; } if ((rc = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits))) { free(mskbits); return rc; } if (sourcefont != maskfont) { pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); if (pCurs) bits = (CursorBitsPtr) ((char *) pCurs + CURSOR_REC_SIZE); else bits = (CursorBitsPtr) NULL; } else { pCurs = (CursorPtr) calloc(CURSOR_REC_SIZE, 1); if (pCurs) bits = (CursorBitsPtr) calloc(CURSOR_BITS_SIZE, 1); else bits = (CursorBitsPtr) NULL; } if (!bits) { free(pCurs); free(mskbits); free(srcbits); return BadAlloc; } dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS); bits->source = srcbits; bits->mask = mskbits; bits->argb = 0; bits->width = cm.width; bits->height = cm.height; bits->xhot = cm.xhot; bits->yhot = cm.yhot; if (sourcefont != maskfont) bits->refcnt = -1; else { bits->refcnt = 1; pShare = malloc(sizeof(GlyphShare)); if (!pShare) { FreeCursorBits(bits); return BadAlloc; } pShare->font = sourcefont; sourcefont->refcnt++; pShare->sourceChar = sourceChar; pShare->maskChar = maskChar; pShare->bits = bits; pShare->next = sharedGlyphs; sharedGlyphs = pShare; } } CheckForEmptyMask(bits); pCurs->bits = bits; pCurs->refcnt = 1; pCurs->serialNumber = ++cursorSerial; pCurs->name = None; pCurs->foreRed = foreRed; pCurs->foreGreen = foreGreen; pCurs->foreBlue = foreBlue; pCurs->backRed = backRed; pCurs->backGreen = backGreen; pCurs->backBlue = backBlue; pCurs->id = cid; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, pCurs, RT_NONE, NULL, DixCreateAccess); if (rc != Success) goto error; rc = RealizeCursorAllScreens(pCurs); if (rc != Success) goto error; *ppCurs = pCurs; return Success; error: FreeCursorBits(bits); dixFiniPrivates(pCurs, PRIVATE_CURSOR); free(pCurs); return rc; } /** CreateRootCursor * * look up the name of a font * open the font * add the font to the resource table * make a cursor from the glyphs * add the cursor to the resource table *************************************************************/ CursorPtr CreateRootCursor(char *unused1, unsigned int unused2) { CursorPtr curs; FontPtr cursorfont; int err; XID fontID; const char defaultCursorFont[] = "cursor"; fontID = FakeClientID(0); err = OpenFont(serverClient, fontID, FontLoadAll | FontOpenSync, (unsigned) strlen(defaultCursorFont), defaultCursorFont); if (err != Success) return NullCursor; err = dixLookupResourceByType((void **) &cursorfont, fontID, RT_FONT, serverClient, DixReadAccess); if (err != Success) return NullCursor; if (AllocGlyphCursor(fontID, 0, fontID, 1, 0, 0, 0, ~0, ~0, ~0, &curs, serverClient, (XID) 0) != Success) return NullCursor; if (!AddResource(FakeClientID(0), RT_CURSOR, (void *) curs)) return NullCursor; return curs; } xorg-server-21.1.16/dix/devices.c0000644000175000017500000024444314757411105012220 /************************************************************ 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "resource.h" #include #include #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" #include "cursorstr.h" #include "dixstruct.h" #include "ptrveloc.h" #include "xkbsrv.h" #include "privates.h" #include "xace.h" #include "mi.h" #include "dispatch.h" #include "swaprep.h" #include "dixevents.h" #include "mipointer.h" #include "eventstr.h" #include "dixgrabs.h" #include #include #include #include #include #include "exglobals.h" #include "exevents.h" #include "xiquerydevice.h" /* for SizeDeviceClasses */ #include "xiproperty.h" #include "enterleave.h" /* for EnterWindow() */ #include "xserver-properties.h" #include "xichangehierarchy.h" /* For XISendDeviceHierarchyEvent */ #include "syncsrv.h" /** @file * This file handles input device-related stuff. */ static void RecalculateMasterButtons(DeviceIntPtr slave); static void DeviceSetTransform(DeviceIntPtr dev, float *transform_data) { struct pixman_f_transform scale; struct pixman_f_transform transform; double sx, sy; int x, y; /** * calculate combined transformation matrix: * * M = InvScale * Transform * Scale * * So we can later transform points using M * p * * Where: * Scale scales coordinates into 0..1 range * Transform is the user supplied (affine) transform * InvScale scales coordinates back up into their native range */ sx = dev->valuator->axes[0].max_value - dev->valuator->axes[0].min_value + 1; sy = dev->valuator->axes[1].max_value - dev->valuator->axes[1].min_value + 1; /* invscale */ pixman_f_transform_init_scale(&scale, sx, sy); scale.m[0][2] = dev->valuator->axes[0].min_value; scale.m[1][2] = dev->valuator->axes[1].min_value; /* transform */ for (y = 0; y < 3; y++) for (x = 0; x < 3; x++) transform.m[y][x] = *transform_data++; pixman_f_transform_multiply(&dev->scale_and_transform, &scale, &transform); /* scale */ pixman_f_transform_init_scale(&scale, 1.0 / sx, 1.0 / sy); scale.m[0][2] = -dev->valuator->axes[0].min_value / sx; scale.m[1][2] = -dev->valuator->axes[1].min_value / sy; pixman_f_transform_multiply(&dev->scale_and_transform, &dev->scale_and_transform, &scale); /* remove translation component for relative movements */ dev->relative_transform = transform; dev->relative_transform.m[0][2] = 0; dev->relative_transform.m[1][2] = 0; } /** * DIX property handler. */ static int DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly) { if (property == XIGetKnownProperty(XI_PROP_ENABLED)) { if (prop->format != 8 || prop->type != XA_INTEGER || prop->size != 1) return BadValue; /* Don't allow disabling of VCP/VCK or XTest devices */ if ((dev == inputInfo.pointer || dev == inputInfo.keyboard || IsXTestDevice(dev, NULL)) &&!(*(CARD8 *) prop->data)) return BadAccess; if (!checkonly) { if ((*((CARD8 *) prop->data)) && !dev->enabled) EnableDevice(dev, TRUE); else if (!(*((CARD8 *) prop->data)) && dev->enabled) DisableDevice(dev, TRUE); } } else if (property == XIGetKnownProperty(XI_PROP_TRANSFORM)) { float *f = (float *) prop->data; int i; if (prop->format != 32 || prop->size != 9 || prop->type != XIGetKnownProperty(XATOM_FLOAT)) return BadValue; for (i = 0; i < 9; i++) if (!isfinite(f[i])) return BadValue; if (!dev->valuator) return BadMatch; if (!checkonly) DeviceSetTransform(dev, f); } return Success; } /* Pair the keyboard to the pointer device. Keyboard events will follow the * pointer sprite. Only applicable for master devices. */ static int PairDevices(DeviceIntPtr ptr, DeviceIntPtr kbd) { if (!ptr) return BadDevice; /* Don't allow pairing for slave devices */ if (!IsMaster(ptr) || !IsMaster(kbd)) return BadDevice; if (ptr->spriteInfo->paired) return BadDevice; if (kbd->spriteInfo->spriteOwner) { free(kbd->spriteInfo->sprite); kbd->spriteInfo->sprite = NULL; kbd->spriteInfo->spriteOwner = FALSE; } kbd->spriteInfo->sprite = ptr->spriteInfo->sprite; kbd->spriteInfo->paired = ptr; ptr->spriteInfo->paired = kbd; return Success; } /** * Find and return the next unpaired MD pointer device. */ static DeviceIntPtr NextFreePointerDevice(void) { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) if (IsMaster(dev) && dev->spriteInfo->spriteOwner && !dev->spriteInfo->paired) return dev; return NULL; } /** * Create a new input device and init it to sane values. The device is added * to the server's off_devices list. * * @param deviceProc Callback for device control function (switch dev on/off). * @return The newly created device. */ DeviceIntPtr AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) { DeviceIntPtr dev, *prev; /* not a typo */ DeviceIntPtr devtmp; int devid; char devind[MAXDEVICES]; BOOL enabled; float transform[9]; /* Find next available id, 0 and 1 are reserved */ memset(devind, 0, sizeof(char) * MAXDEVICES); for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next) devind[devtmp->id]++; for (devid = 2; devid < MAXDEVICES && devind[devid]; devid++); if (devid >= MAXDEVICES) return (DeviceIntPtr) NULL; dev = calloc(1, sizeof(DeviceIntRec) + sizeof(SpriteInfoRec)); if (!dev) return (DeviceIntPtr) NULL; if (!dixAllocatePrivates(&dev->devPrivates, PRIVATE_DEVICE)) { free(dev); return NULL; } dev->last.scroll = NULL; dev->last.touches = NULL; dev->id = devid; dev->public.processInputProc = ProcessOtherEvent; dev->public.realInputProc = ProcessOtherEvent; dev->public.enqueueInputProc = EnqueueEvent; dev->deviceProc = deviceProc; dev->startup = autoStart; /* device grab defaults */ UpdateCurrentTimeIf(); dev->deviceGrab.grabTime = currentTime; dev->deviceGrab.ActivateGrab = ActivateKeyboardGrab; dev->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; dev->deviceGrab.sync.event = calloc(1, sizeof(InternalEvent)); XkbSetExtension(dev, ProcessKeyboardEvent); dev->coreEvents = TRUE; /* sprite defaults */ dev->spriteInfo = (SpriteInfoPtr) &dev[1]; /* security creation/labeling check */ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE); free(dev); return NULL; } inputInfo.numDevices++; for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next); *prev = dev; dev->next = NULL; enabled = FALSE; XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), XA_INTEGER, 8, PropModeReplace, 1, &enabled, FALSE); XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_ENABLED), FALSE); /* unity matrix */ memset(transform, 0, sizeof(transform)); transform[0] = transform[4] = transform[8] = 1.0f; dev->relative_transform.m[0][0] = 1.0; dev->relative_transform.m[1][1] = 1.0; dev->relative_transform.m[2][2] = 1.0; dev->scale_and_transform = dev->relative_transform; XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, 9, transform, FALSE); XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), FALSE); XIRegisterPropertyHandler(dev, DeviceSetProperty, NULL, NULL); return dev; } void SendDevicePresenceEvent(int deviceid, int type) { DeviceIntRec dummyDev = { .id = XIAllDevices }; devicePresenceNotify ev; UpdateCurrentTimeIf(); ev.type = DevicePresenceNotify; ev.time = currentTime.milliseconds; ev.devchange = type; ev.deviceid = deviceid; SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, (xEvent *) &ev, 1); } /** * Enable the device through the driver, add the device to the device list. * Switch device ON through the driver and push it onto the global device * list. Initialize the DIX sprite or pair the device. All clients are * notified about the device being enabled. * * A master pointer device needs to be enabled before a master keyboard * device. * * @param The device to be enabled. * @param sendevent True if an XI2 event should be sent. * @return TRUE on success or FALSE otherwise. */ Bool EnableDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr *prev; int ret; DeviceIntPtr other; BOOL enabled; int flags[MAXDEVICES] = { 0 }; for (prev = &inputInfo.off_devices; *prev && (*prev != dev); prev = &(*prev)->next); if (!dev->spriteInfo->sprite) { if (IsMaster(dev)) { /* Sprites appear on first root window, so we can hardcode it */ if (dev->spriteInfo->spriteOwner) { InitializeSprite(dev, screenInfo.screens[0]->root); /* mode doesn't matter */ EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor); } else { other = NextFreePointerDevice(); BUG_RETURN_VAL_MSG(other == NULL, FALSE, "[dix] cannot find pointer to pair with.\n"); PairDevices(other, dev); } } else { if (dev->coreEvents) other = (IsPointerDevice(dev)) ? inputInfo.pointer: inputInfo.keyboard; else other = NULL; /* auto-float non-core devices */ AttachDevice(NULL, dev, other); } } input_lock(); if ((*prev != dev) || !dev->inited || ((ret = (*dev->deviceProc) (dev, DEVICE_ON)) != Success)) { ErrorF("[dix] couldn't enable device %d\n", dev->id); input_unlock(); return FALSE; } dev->enabled = TRUE; *prev = dev->next; for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next); *prev = dev; dev->next = NULL; input_unlock(); enabled = TRUE; XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); SendDevicePresenceEvent(dev->id, DeviceEnabled); if (sendevent) { flags[dev->id] |= XIDeviceEnabled; XISendDeviceHierarchyEvent(flags); } if (!IsMaster(dev) && !IsFloating(dev)) XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); RecalculateMasterButtons(dev); /* initialise an idle timer for this device*/ dev->idle_counter = SyncInitDeviceIdleTime(dev); return TRUE; } /** * Switch a device off through the driver and push it onto the off_devices * list. A device will not send events while disabled. All clients are * notified about the device being disabled. * * Master keyboard devices have to be disabled before master pointer devices * otherwise things turn bad. * * @param sendevent True if an XI2 event should be sent. * @return TRUE on success or FALSE otherwise. */ Bool DisableDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr *prev, other; BOOL enabled; BOOL dev_in_devices_list = FALSE; int flags[MAXDEVICES] = { 0 }; if (!dev->enabled) return TRUE; for (other = inputInfo.devices; other; other = other->next) { if (other == dev) { dev_in_devices_list = TRUE; break; } } if (!dev_in_devices_list) return FALSE; TouchEndPhysicallyActiveTouches(dev); GestureEndActiveGestures(dev); ReleaseButtonsAndKeys(dev); SyncRemoveDeviceIdleTime(dev->idle_counter); dev->idle_counter = NULL; /* float attached devices */ if (IsMaster(dev)) { for (other = inputInfo.devices; other; other = other->next) { if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) { AttachDevice(NULL, other, NULL); flags[other->id] |= XISlaveDetached; } } for (other = inputInfo.off_devices; other; other = other->next) { if (!IsMaster(other) && GetMaster(other, MASTER_ATTACHED) == dev) { AttachDevice(NULL, other, NULL); flags[other->id] |= XISlaveDetached; } } } else { for (other = inputInfo.devices; other; other = other->next) { if (IsMaster(other) && other->lastSlave == dev) other->lastSlave = NULL; } } if (IsMaster(dev) && dev->spriteInfo->sprite) { for (other = inputInfo.devices; other; other = other->next) if (other->spriteInfo->paired == dev && !other->spriteInfo->spriteOwner) DisableDevice(other, sendevent); } if (dev->spriteInfo->paired) dev->spriteInfo->paired = NULL; input_lock(); (void) (*dev->deviceProc) (dev, DEVICE_OFF); dev->enabled = FALSE; /* now that the device is disabled, we can reset the event reader's * last.slave */ for (other = inputInfo.devices; other; other = other->next) { if (other->last.slave == dev) other->last.slave = NULL; } input_unlock(); FreeSprite(dev); LeaveWindow(dev); SetFocusOut(dev); for (prev = &inputInfo.devices; *prev && (*prev != dev); prev = &(*prev)->next); *prev = dev->next; dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; enabled = FALSE; XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_ENABLED), XA_INTEGER, 8, PropModeReplace, 1, &enabled, TRUE); SendDevicePresenceEvent(dev->id, DeviceDisabled); if (sendevent) { flags[dev->id] = XIDeviceDisabled; XISendDeviceHierarchyEvent(flags); } RecalculateMasterButtons(dev); dev->master = NULL; return TRUE; } void DisableAllDevices(void) { DeviceIntPtr dev, tmp; /* Disable slave devices first, excluding XTest devices */ nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { if (!IsXTestDevice(dev, NULL) && !IsMaster(dev)) DisableDevice(dev, FALSE); } /* Disable XTest devices */ nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { if (!IsMaster(dev)) DisableDevice(dev, FALSE); } /* master keyboards need to be disabled first */ nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { if (dev->enabled && IsMaster(dev) && IsKeyboardDevice(dev)) DisableDevice(dev, FALSE); } nt_list_for_each_entry_safe(dev, tmp, inputInfo.devices, next) { if (dev->enabled) DisableDevice(dev, FALSE); } } /** * Initialise a new device through the driver and tell all clients about the * new device. * * Must be called before EnableDevice. * The device will NOT send events until it is enabled! * * @param sendevent True if an XI2 event should be sent. * @return Success or an error code on failure. */ int ActivateDevice(DeviceIntPtr dev, BOOL sendevent) { int ret = Success; ScreenPtr pScreen = screenInfo.screens[0]; if (!dev || !dev->deviceProc) return BadImplementation; input_lock(); ret = (*dev->deviceProc) (dev, DEVICE_INIT); input_unlock(); dev->inited = (ret == Success); if (!dev->inited) return ret; /* Initialize memory for sprites. */ if (IsMaster(dev) && dev->spriteInfo->spriteOwner) if (!pScreen->DeviceCursorInitialize(dev, pScreen)) ret = BadAlloc; SendDevicePresenceEvent(dev->id, DeviceAdded); if (sendevent) { int flags[MAXDEVICES] = { 0 }; flags[dev->id] = XISlaveAdded; XISendDeviceHierarchyEvent(flags); } return ret; } /** * Ring the bell. * The actual task of ringing the bell is the job of the DDX. */ static void CoreKeyboardBell(int volume, DeviceIntPtr pDev, void *arg, int something) { KeybdCtrl *ctrl = arg; DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration); } static void CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl * ctrl) { return; } /** * Device control function for the Virtual Core Keyboard. */ int CoreKeyboardProc(DeviceIntPtr pDev, int what) { switch (what) { case DEVICE_INIT: if (!InitKeyboardDeviceStruct(pDev, NULL, CoreKeyboardBell, CoreKeyboardCtl)) { ErrorF("Keyboard initialization failed. This could be a missing " "or incorrect setup of xkeyboard-config.\n"); return BadValue; } return Success; case DEVICE_ON: case DEVICE_OFF: return Success; case DEVICE_CLOSE: return Success; } return BadMatch; } /** * Device control function for the Virtual Core Pointer. */ int CorePointerProc(DeviceIntPtr pDev, int what) { #define NBUTTONS 10 #define NAXES 2 BYTE map[NBUTTONS + 1]; int i = 0; Atom btn_labels[NBUTTONS] = { 0 }; Atom axes_labels[NAXES] = { 0 }; ScreenPtr scr = screenInfo.screens[0]; switch (what) { case DEVICE_INIT: for (i = 1; i <= NBUTTONS; i++) map[i] = i; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); /* don't know about the rest */ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); if (!InitPointerDeviceStruct ((DevicePtr) pDev, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr) NoopDDA, GetMotionHistorySize(), NAXES, axes_labels)) { ErrorF("Could not initialize device '%s'. Out of memory.\n", pDev->name); return BadAlloc; /* IPDS only fails on allocs */ } /* axisVal is per-screen, last.valuators is desktop-wide */ pDev->valuator->axisVal[0] = scr->width / 2; pDev->last.valuators[0] = pDev->valuator->axisVal[0] + scr->x; pDev->valuator->axisVal[1] = scr->height / 2; pDev->last.valuators[1] = pDev->valuator->axisVal[1] + scr->y; break; case DEVICE_CLOSE: break; default: break; } return Success; #undef NBUTTONS #undef NAXES } /** * Initialise the two core devices, VCP and VCK (see events.c). * Both devices are not tied to physical devices, but guarantee that there is * always a keyboard and a pointer present and keep the protocol semantics. * * Note that the server MUST have two core devices at all times, even if there * is no physical device connected. */ void InitCoreDevices(void) { int result; result = AllocDevicePair(serverClient, "Virtual core", &inputInfo.pointer, &inputInfo.keyboard, CorePointerProc, CoreKeyboardProc, TRUE); if (result != Success) { FatalError("Failed to allocate virtual core devices: %d", result); } result = ActivateDevice(inputInfo.pointer, TRUE); if (result != Success) { FatalError("Failed to activate virtual core pointer: %d", result); } result = ActivateDevice(inputInfo.keyboard, TRUE); if (result != Success) { FatalError("Failed to activate virtual core keyboard: %d", result); } if (!EnableDevice(inputInfo.pointer, TRUE)) { FatalError("Failed to enable virtual core pointer."); } if (!EnableDevice(inputInfo.keyboard, TRUE)) { FatalError("Failed to enable virtual core keyboard."); } InitXTestDevices(); } /** * Activate all switched-off devices and then enable all those devices. * * Will return an error if no core keyboard or core pointer is present. * In theory this should never happen if you call InitCoreDevices() first. * * InitAndStartDevices needs to be called AFTER the windows are initialized. * Devices will start sending events after InitAndStartDevices() has * completed. * * @return Success or error code on failure. */ int InitAndStartDevices(void) { DeviceIntPtr dev, next; for (dev = inputInfo.off_devices; dev; dev = dev->next) { DebugF("(dix) initialising device %d\n", dev->id); if (!dev->inited) ActivateDevice(dev, TRUE); } /* enable real devices */ for (dev = inputInfo.off_devices; dev; dev = next) { DebugF("(dix) enabling device %d\n", dev->id); next = dev->next; if (dev->inited && dev->startup) EnableDevice(dev, TRUE); } return Success; } /** * Free the given device class and reset the pointer to NULL. */ static void FreeDeviceClass(int type, void **class) { if (!(*class)) return; switch (type) { case KeyClass: { KeyClassPtr *k = (KeyClassPtr *) class; if ((*k)->xkbInfo) { XkbFreeInfo((*k)->xkbInfo); (*k)->xkbInfo = NULL; } free((*k)); break; } case ButtonClass: { ButtonClassPtr *b = (ButtonClassPtr *) class; free((*b)->xkb_acts); free((*b)); break; } case ValuatorClass: { ValuatorClassPtr *v = (ValuatorClassPtr *) class; free((*v)->motion); free((*v)); break; } case XITouchClass: { TouchClassPtr *t = (TouchClassPtr *) class; int i; for (i = 0; i < (*t)->num_touches; i++) { free((*t)->touches[i].sprite.spriteTrace); free((*t)->touches[i].listeners); free((*t)->touches[i].valuators); } free((*t)->touches); free((*t)); break; } case FocusClass: { FocusClassPtr *f = (FocusClassPtr *) class; free((*f)->trace); free((*f)); break; } case ProximityClass: { ProximityClassPtr *p = (ProximityClassPtr *) class; free((*p)); break; } } *class = NULL; } static void FreeFeedbackClass(int type, void **class) { if (!(*class)) return; switch (type) { case KbdFeedbackClass: { KbdFeedbackPtr *kbdfeed = (KbdFeedbackPtr *) class; KbdFeedbackPtr k, knext; for (k = (*kbdfeed); k; k = knext) { knext = k->next; if (k->xkb_sli) XkbFreeSrvLedInfo(k->xkb_sli); free(k); } break; } case PtrFeedbackClass: { PtrFeedbackPtr *ptrfeed = (PtrFeedbackPtr *) class; PtrFeedbackPtr p, pnext; for (p = (*ptrfeed); p; p = pnext) { pnext = p->next; free(p); } break; } case IntegerFeedbackClass: { IntegerFeedbackPtr *intfeed = (IntegerFeedbackPtr *) class; IntegerFeedbackPtr i, inext; for (i = (*intfeed); i; i = inext) { inext = i->next; free(i); } break; } case StringFeedbackClass: { StringFeedbackPtr *stringfeed = (StringFeedbackPtr *) class; StringFeedbackPtr s, snext; for (s = (*stringfeed); s; s = snext) { snext = s->next; free(s->ctrl.symbols_supported); free(s->ctrl.symbols_displayed); free(s); } break; } case BellFeedbackClass: { BellFeedbackPtr *bell = (BellFeedbackPtr *) class; BellFeedbackPtr b, bnext; for (b = (*bell); b; b = bnext) { bnext = b->next; free(b); } break; } case LedFeedbackClass: { LedFeedbackPtr *leds = (LedFeedbackPtr *) class; LedFeedbackPtr l, lnext; for (l = (*leds); l; l = lnext) { lnext = l->next; if (l->xkb_sli) XkbFreeSrvLedInfo(l->xkb_sli); free(l); } break; } } *class = NULL; } static void FreeAllDeviceClasses(ClassesPtr classes) { if (!classes) return; FreeDeviceClass(KeyClass, (void *) &classes->key); FreeDeviceClass(ValuatorClass, (void *) &classes->valuator); FreeDeviceClass(XITouchClass, (void *) &classes->touch); FreeDeviceClass(ButtonClass, (void *) &classes->button); FreeDeviceClass(FocusClass, (void *) &classes->focus); FreeDeviceClass(ProximityClass, (void *) &classes->proximity); FreeFeedbackClass(KbdFeedbackClass, (void *) &classes->kbdfeed); FreeFeedbackClass(PtrFeedbackClass, (void *) &classes->ptrfeed); FreeFeedbackClass(IntegerFeedbackClass, (void *) &classes->intfeed); FreeFeedbackClass(StringFeedbackClass, (void *) &classes->stringfeed); FreeFeedbackClass(BellFeedbackClass, (void *) &classes->bell); FreeFeedbackClass(LedFeedbackClass, (void *) &classes->leds); } static void FreePendingFrozenDeviceEvents(DeviceIntPtr dev) { QdEventPtr qe, tmp; if (!dev->deviceGrab.sync.frozen) return; /* Dequeue any frozen pending events */ xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) { if (qe->device == dev) { xorg_list_del(&qe->next); free(qe); } } } /** * Close down a device and free all resources. * Once closed down, the driver will probably not expect you that you'll ever * enable it again and free associated structs. If you want the device to just * be disabled, DisableDevice(). * Don't call this function directly, use RemoveDevice() instead. * * Called with input lock held. */ static void CloseDevice(DeviceIntPtr dev) { ScreenPtr screen = screenInfo.screens[0]; ClassesPtr classes; int j; if (!dev) return; XIDeleteAllDeviceProperties(dev); if (dev->inited) (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); FreeSprite(dev); if (IsMaster(dev)) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ if (dev->valuator && dev->valuator->accelScheme.AccelCleanupProc) dev->valuator->accelScheme.AccelCleanupProc(dev); while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr) dev, dev->xkb_interest->resource); free(dev->name); classes = (ClassesPtr) &dev->key; FreeAllDeviceClasses(classes); if (IsMaster(dev)) { classes = dev->unused_classes; FreeAllDeviceClasses(classes); free(classes); } /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { if (clients[j] && clients[j]->clientPtr == dev) { clients[j]->clientPtr = NULL; clients[j]->clientPtr = PickPointer(clients[j]); } } if (dev->deviceGrab.grab) FreeGrab(dev->deviceGrab.grab); free(dev->deviceGrab.sync.event); free(dev->config_info); /* Allocated in xf86ActivateDevice. */ free(dev->last.scroll); for (j = 0; j < dev->last.num_touches; j++) free(dev->last.touches[j].valuators); free(dev->last.touches); dev->config_info = NULL; FreePendingFrozenDeviceEvents(dev); dixFreePrivates(dev->devPrivates, PRIVATE_DEVICE); free(dev); } /** * Shut down all devices of one list and free all resources. */ static void CloseDeviceList(DeviceIntPtr *listHead) { /* Used to mark devices that we tried to free */ Bool freedIds[MAXDEVICES]; DeviceIntPtr dev; int i; if (listHead == NULL) return; for (i = 0; i < MAXDEVICES; i++) freedIds[i] = FALSE; dev = *listHead; while (dev != NULL) { freedIds[dev->id] = TRUE; DeleteInputDeviceRequest(dev); dev = *listHead; while (dev != NULL && freedIds[dev->id]) dev = dev->next; } } /** * Shut down all devices, free all resources, etc. * Only useful if you're shutting down the server! */ void CloseDownDevices(void) { DeviceIntPtr dev; input_lock(); /* Float all SDs before closing them. Note that at this point resources * (e.g. cursors) have been freed already, so we can't just call * AttachDevice(NULL, dev, NULL). Instead, we have to forcibly set master * to NULL and pretend nothing happened. */ for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) dev->master = NULL; } for (dev = inputInfo.off_devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) dev->master = NULL; } CloseDeviceList(&inputInfo.devices); CloseDeviceList(&inputInfo.off_devices); CloseDevice(inputInfo.pointer); CloseDevice(inputInfo.keyboard); inputInfo.devices = NULL; inputInfo.off_devices = NULL; inputInfo.keyboard = NULL; inputInfo.pointer = NULL; XkbDeleteRulesDflts(); XkbDeleteRulesUsed(); input_unlock(); } /** * Signal all devices that we're in the process of aborting. * This function is called from a signal handler. */ void AbortDevices(void) { DeviceIntPtr dev; /* Do not call input_lock as we don't know what * state the input thread might be in, and that could * cause a dead-lock. */ nt_list_for_each_entry(dev, inputInfo.devices, next) { if (!IsMaster(dev)) (*dev->deviceProc) (dev, DEVICE_ABORT); } nt_list_for_each_entry(dev, inputInfo.off_devices, next) { if (!IsMaster(dev)) (*dev->deviceProc) (dev, DEVICE_ABORT); } } /** * Remove the cursor sprite for all devices. This needs to be done before any * resources are freed or any device is deleted. */ void UndisplayDevices(void) { DeviceIntPtr dev; ScreenPtr screen = screenInfo.screens[0]; for (dev = inputInfo.devices; dev; dev = dev->next) screen->DisplayCursor(dev, screen, NullCursor); } /** * Remove a device from the device list, closes it and thus frees all * resources. * Removes both enabled and disabled devices and notifies all devices about * the removal of the device. * * No PresenceNotify is sent for device that the client never saw. This can * happen if a malloc fails during the addition of master devices. If * dev->init is FALSE it means the client never received a DeviceAdded event, * so let's not send a DeviceRemoved event either. * * @param sendevent True if an XI2 event should be sent. */ int RemoveDevice(DeviceIntPtr dev, BOOL sendevent) { DeviceIntPtr prev, tmp, next; int ret = BadMatch; ScreenPtr screen = screenInfo.screens[0]; int deviceid; int initialized; int flags[MAXDEVICES] = { 0 }; DebugF("(dix) removing device %d\n", dev->id); if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) return BadImplementation; initialized = dev->inited; deviceid = dev->id; if (initialized) { if (DevHasCursor(dev)) screen->DisplayCursor(dev, screen, NullCursor); DisableDevice(dev, sendevent); flags[dev->id] = XIDeviceDisabled; } input_lock(); prev = NULL; for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; if (tmp == dev) { if (prev == NULL) inputInfo.devices = next; else prev->next = next; flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; CloseDevice(tmp); ret = Success; break; } } prev = NULL; for (tmp = inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; if (tmp == dev) { flags[tmp->id] = IsMaster(tmp) ? XIMasterRemoved : XISlaveRemoved; CloseDevice(tmp); if (prev == NULL) inputInfo.off_devices = next; else prev->next = next; ret = Success; break; } } input_unlock(); if (ret == Success && initialized) { inputInfo.numDevices--; SendDevicePresenceEvent(deviceid, DeviceRemoved); if (sendevent) XISendDeviceHierarchyEvent(flags); } return ret; } int NumMotionEvents(void) { /* only called to fill data in initial connection reply. * VCP is ok here, it is the only fixed device we have. */ return inputInfo.pointer->valuator->numMotionEvents; } int dixLookupDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode) { DeviceIntPtr dev; int rc; *pDev = NULL; for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->id == id) goto found; } for (dev = inputInfo.off_devices; dev; dev = dev->next) { if (dev->id == id) goto found; } return BadDevice; found: rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc == Success) *pDev = dev; return rc; } void QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode) { if (inputInfo.keyboard) { *minCode = inputInfo.keyboard->key->xkbInfo->desc->min_key_code; *maxCode = inputInfo.keyboard->key->xkbInfo->desc->max_key_code; } } Bool InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels, CARD8 *map) { ButtonClassPtr butc; int i; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->button != NULL, FALSE); BUG_RETURN_VAL(numButtons >= MAX_BUTTONS, FALSE); butc = calloc(1, sizeof(ButtonClassRec)); if (!butc) return FALSE; butc->numButtons = numButtons; butc->sourceid = dev->id; for (i = 1; i <= numButtons; i++) butc->map[i] = map[i]; for (i = numButtons + 1; i < MAP_LENGTH; i++) butc->map[i] = i; memcpy(butc->labels, labels, numButtons * sizeof(Atom)); dev->button = butc; return TRUE; } /** * Allocate a valuator class and set up the pointers for the axis values * appropriately. * * @param src If non-NULL, the memory is reallocated from src. If NULL, the * memory is calloc'd. * @parma numAxes Number of axes to allocate. * @return The allocated valuator struct. */ ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src, int numAxes) { ValuatorClassPtr v; /* force alignment with double */ union align_u { ValuatorClassRec valc; double d; } *align; int size; size = sizeof(union align_u) + numAxes * (sizeof(double) + sizeof(AxisInfo)); align = (union align_u *) realloc(src, size); if (!align) return NULL; if (!src) memset(align, 0, size); v = &align->valc; v->numAxes = numAxes; v->axisVal = (double *) (align + 1); v->axes = (AxisInfoPtr) (v->axisVal + numAxes); return v; } Bool InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, int numMotionEvents, int mode) { int i; ValuatorClassPtr valc; BUG_RETURN_VAL(dev == NULL, FALSE); if (numAxes > MAX_VALUATORS) { LogMessage(X_WARNING, "Device '%s' has %d axes, only using first %d.\n", dev->name, numAxes, MAX_VALUATORS); numAxes = MAX_VALUATORS; } valc = AllocValuatorClass(NULL, numAxes); if (!valc) return FALSE; dev->last.scroll = valuator_mask_new(numAxes); if (!dev->last.scroll) { free(valc); return FALSE; } valc->sourceid = dev->id; valc->motion = NULL; valc->first_motion = 0; valc->last_motion = 0; valc->h_scroll_axis = -1; valc->v_scroll_axis = -1; valc->numMotionEvents = numMotionEvents; valc->motionHintWindow = NullWindow; if ((mode & OutOfProximity) && !dev->proximity) InitProximityClassDeviceStruct(dev); dev->valuator = valc; AllocateMotionHistory(dev); for (i = 0; i < numAxes; i++) { InitValuatorAxisStruct(dev, i, labels[i], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, mode); valc->axisVal[i] = 0; } dev->last.numValuators = numAxes; if (IsMaster(dev) || /* do not accelerate master or xtest devices */ IsXTestDevice(dev, NULL)) InitPointerAccelerationScheme(dev, PtrAccelNoOp); else InitPointerAccelerationScheme(dev, PtrAccelDefault); return TRUE; } /* global list of acceleration schemes */ ValuatorAccelerationRec pointerAccelerationScheme[] = { {PtrAccelNoOp, NULL, NULL, NULL, NULL}, {PtrAccelPredictable, acceleratePointerPredictable, NULL, InitPredictableAccelerationScheme, AccelerationDefaultCleanup}, {PtrAccelLightweight, acceleratePointerLightweight, NULL, NULL, NULL}, {-1, NULL, NULL, NULL, NULL} /* terminator */ }; /** * install an acceleration scheme. returns TRUE on success, and should not * change anything if unsuccessful. */ Bool InitPointerAccelerationScheme(DeviceIntPtr dev, int scheme) { int x, i = -1; ValuatorClassPtr val; val = dev->valuator; if (!val) return FALSE; if (IsMaster(dev) && scheme != PtrAccelNoOp) return FALSE; for (x = 0; pointerAccelerationScheme[x].number >= 0; x++) { if (pointerAccelerationScheme[x].number == scheme) { i = x; break; } } if (-1 == i) return FALSE; if (val->accelScheme.AccelCleanupProc) val->accelScheme.AccelCleanupProc(dev); if (pointerAccelerationScheme[i].AccelInitProc) { if (!pointerAccelerationScheme[i].AccelInitProc(dev, &pointerAccelerationScheme[i])) { return FALSE; } } else { val->accelScheme = pointerAccelerationScheme[i]; } return TRUE; } Bool InitFocusClassDeviceStruct(DeviceIntPtr dev) { FocusClassPtr focc; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->focus != NULL, FALSE); focc = malloc(sizeof(FocusClassRec)); if (!focc) return FALSE; UpdateCurrentTimeIf(); focc->win = PointerRootWin; focc->revert = None; focc->time = currentTime; focc->trace = (WindowPtr *) NULL; focc->traceSize = 0; focc->traceGood = 0; focc->sourceid = dev->id; dev->focus = focc; return TRUE; } Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) { PtrFeedbackPtr feedc; BUG_RETURN_VAL(dev == NULL, FALSE); feedc = malloc(sizeof(PtrFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl = defaultPointerControl; feedc->ctrl.id = 0; if ((feedc->next = dev->ptrfeed)) feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1; dev->ptrfeed = feedc; (*controlProc) (dev, &feedc->ctrl); return TRUE; } static LedCtrl defaultLedControl = { DEFAULT_LEDS, DEFAULT_LEDS_MASK, 0 }; static BellCtrl defaultBellControl = { DEFAULT_BELL, DEFAULT_BELL_PITCH, DEFAULT_BELL_DURATION, 0 }; static IntegerCtrl defaultIntegerControl = { DEFAULT_INT_RESOLUTION, DEFAULT_INT_MIN_VALUE, DEFAULT_INT_MAX_VALUE, DEFAULT_INT_DISPLAYED, 0 }; Bool InitStringFeedbackClassDeviceStruct(DeviceIntPtr dev, StringCtrlProcPtr controlProc, int max_symbols, int num_symbols_supported, KeySym * symbols) { int i; StringFeedbackPtr feedc; BUG_RETURN_VAL(dev == NULL, FALSE); feedc = malloc(sizeof(StringFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl.num_symbols_supported = num_symbols_supported; feedc->ctrl.num_symbols_displayed = 0; feedc->ctrl.max_symbols = max_symbols; feedc->ctrl.symbols_supported = xallocarray(num_symbols_supported, sizeof(KeySym)); feedc->ctrl.symbols_displayed = xallocarray(max_symbols, sizeof(KeySym)); if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) { free(feedc->ctrl.symbols_supported); free(feedc->ctrl.symbols_displayed); free(feedc); return FALSE; } for (i = 0; i < num_symbols_supported; i++) *(feedc->ctrl.symbols_supported + i) = *symbols++; for (i = 0; i < max_symbols; i++) *(feedc->ctrl.symbols_displayed + i) = (KeySym) 0; feedc->ctrl.id = 0; if ((feedc->next = dev->stringfeed)) feedc->ctrl.id = dev->stringfeed->ctrl.id + 1; dev->stringfeed = feedc; (*controlProc) (dev, &feedc->ctrl); return TRUE; } Bool InitBellFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc, BellCtrlProcPtr controlProc) { BellFeedbackPtr feedc; BUG_RETURN_VAL(dev == NULL, FALSE); feedc = malloc(sizeof(BellFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->BellProc = bellProc; feedc->ctrl = defaultBellControl; feedc->ctrl.id = 0; if ((feedc->next = dev->bell)) feedc->ctrl.id = dev->bell->ctrl.id + 1; dev->bell = feedc; (*controlProc) (dev, &feedc->ctrl); return TRUE; } Bool InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc) { LedFeedbackPtr feedc; BUG_RETURN_VAL(dev == NULL, FALSE); feedc = malloc(sizeof(LedFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl = defaultLedControl; feedc->ctrl.id = 0; if ((feedc->next = dev->leds)) feedc->ctrl.id = dev->leds->ctrl.id + 1; feedc->xkb_sli = NULL; dev->leds = feedc; (*controlProc) (dev, &feedc->ctrl); return TRUE; } Bool InitIntegerFeedbackClassDeviceStruct(DeviceIntPtr dev, IntegerCtrlProcPtr controlProc) { IntegerFeedbackPtr feedc; BUG_RETURN_VAL(dev == NULL, FALSE); feedc = malloc(sizeof(IntegerFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl = defaultIntegerControl; feedc->ctrl.id = 0; if ((feedc->next = dev->intfeed)) feedc->ctrl.id = dev->intfeed->ctrl.id + 1; dev->intfeed = feedc; (*controlProc) (dev, &feedc->ctrl); return TRUE; } Bool InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, Atom *btn_labels, PtrCtrlProcPtr controlProc, int numMotionEvents, int numAxes, Atom *axes_labels) { DeviceIntPtr dev = (DeviceIntPtr) device; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->button != NULL, FALSE); BUG_RETURN_VAL(dev->valuator != NULL, FALSE); BUG_RETURN_VAL(dev->ptrfeed != NULL, FALSE); return (InitButtonClassDeviceStruct(dev, numButtons, btn_labels, map) && InitValuatorClassDeviceStruct(dev, numAxes, axes_labels, numMotionEvents, Relative) && InitPtrFeedbackClassDeviceStruct(dev, controlProc)); } /** * Sets up multitouch capabilities on @device. * * @max_touches The maximum number of simultaneous touches, or 0 for unlimited. * @mode The mode of the touch device (XIDirectTouch or XIDependentTouch). * @num_axes The number of touch valuator axes. */ Bool InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches, unsigned int mode, unsigned int num_axes) { TouchClassPtr touch; int i; BUG_RETURN_VAL(device == NULL, FALSE); BUG_RETURN_VAL(device->touch != NULL, FALSE); BUG_RETURN_VAL(device->valuator == NULL, FALSE); /* Check the mode is valid, and at least X and Y axes. */ BUG_RETURN_VAL(mode != XIDirectTouch && mode != XIDependentTouch, FALSE); BUG_RETURN_VAL(num_axes < 2, FALSE); if (num_axes > MAX_VALUATORS) { LogMessage(X_WARNING, "Device '%s' has %d touch axes, only using first %d.\n", device->name, num_axes, MAX_VALUATORS); num_axes = MAX_VALUATORS; } touch = calloc(1, sizeof(*touch)); if (!touch) return FALSE; touch->max_touches = max_touches; if (max_touches == 0) max_touches = 5; /* arbitrary number plucked out of the air */ touch->touches = calloc(max_touches, sizeof(*touch->touches)); if (!touch->touches) goto err; touch->num_touches = max_touches; for (i = 0; i < max_touches; i++) TouchInitTouchPoint(touch, device->valuator, i); touch->mode = mode; touch->sourceid = device->id; device->touch = touch; device->last.touches = calloc(max_touches, sizeof(*device->last.touches)); device->last.num_touches = touch->num_touches; for (i = 0; i < touch->num_touches; i++) TouchInitDDXTouchPoint(device, &device->last.touches[i]); return TRUE; err: for (i = 0; i < touch->num_touches; i++) TouchFreeTouchPoint(device, i); free(touch->touches); free(touch); return FALSE; } /** * Sets up gesture capabilities on @device. * * @max_touches The maximum number of simultaneous touches, or 0 for unlimited. */ Bool InitGestureClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches) { GestureClassPtr g; BUG_RETURN_VAL(device == NULL, FALSE); BUG_RETURN_VAL(device->gesture != NULL, FALSE); g = calloc(1, sizeof(*g)); if (!g) return FALSE; g->sourceid = device->id; g->max_touches = max_touches; GestureInitGestureInfo(&g->gesture); device->gesture = g; return TRUE; } /* * Check if the given buffer contains elements between low (inclusive) and * high (inclusive) only. * * @return TRUE if the device map is invalid, FALSE otherwise. */ Bool BadDeviceMap(BYTE * buff, int length, unsigned low, unsigned high, XID *errval) { int i; for (i = 0; i < length; i++) if (buff[i]) { /* only check non-zero elements */ if ((low > buff[i]) || (high < buff[i])) { *errval = buff[i]; return TRUE; } } return FALSE; } int ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; int rc; REQUEST(xSetModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); if (client->req_len != ((stuff->numKeyPerModifier << 1) + bytes_to_int32(sizeof(xSetModifierMappingReq)))) return BadLength; rep = (xSetModifierMappingReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; rc = change_modmap(client, PickKeyboard(client), (KeyCode *) &stuff[1], stuff->numKeyPerModifier); if (rc == MappingFailed || rc == -1) return BadValue; if (rc != MappingSuccess && rc != MappingFailed && rc != MappingBusy) return rc; rep.success = rc; WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); return Success; } int ProcGetModifierMapping(ClientPtr client) { xGetModifierMappingReply rep; int max_keys_per_mod = 0; KeyCode *modkeymap = NULL; REQUEST_SIZE_MATCH(xReq); generate_modkeymap(client, PickKeyboard(client), &modkeymap, &max_keys_per_mod); rep = (xGetModifierMappingReply) { .type = X_Reply, .numKeyPerModifier = max_keys_per_mod, .sequenceNumber = client->sequence, /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ .length = max_keys_per_mod << 1 }; WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); WriteToClient(client, max_keys_per_mod * 8, modkeymap); free(modkeymap); return Success; } int ProcChangeKeyboardMapping(ClientPtr client) { REQUEST(xChangeKeyboardMappingReq); unsigned len; KeySymsRec keysyms; DeviceIntPtr pDev, tmp; int rc; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); len = client->req_len - bytes_to_int32(sizeof(xChangeKeyboardMappingReq)); if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) return BadLength; pDev = PickKeyboard(client); if ((stuff->firstKeyCode < pDev->key->xkbInfo->desc->min_key_code) || (stuff->firstKeyCode > pDev->key->xkbInfo->desc->max_key_code)) { client->errorValue = stuff->firstKeyCode; return BadValue; } if (((unsigned) (stuff->firstKeyCode + stuff->keyCodes - 1) > pDev->key->xkbInfo->desc->max_key_code) || (stuff->keySymsPerKeyCode == 0)) { client->errorValue = stuff->keySymsPerKeyCode; return BadValue; } keysyms.minKeyCode = stuff->firstKeyCode; keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; keysyms.mapWidth = stuff->keySymsPerKeyCode; keysyms.map = (KeySym *) &stuff[1]; rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) return rc; XkbApplyMappingChange(pDev, &keysyms, stuff->firstKeyCode, stuff->keyCodes, NULL, client); for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { if (IsMaster(tmp) || GetMaster(tmp, MASTER_KEYBOARD) != pDev) continue; if (!tmp->key) continue; rc = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (rc != Success) continue; XkbApplyMappingChange(tmp, &keysyms, stuff->firstKeyCode, stuff->keyCodes, NULL, client); } return Success; } int ProcSetPointerMapping(ClientPtr client) { BYTE *map; int ret; int i, j; DeviceIntPtr ptr = PickPointer(client); xSetPointerMappingReply rep; REQUEST(xSetPointerMappingReq); REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); if (client->req_len != bytes_to_int32(sizeof(xSetPointerMappingReq) + stuff->nElts)) return BadLength; rep = (xSetPointerMappingReply) { .type = X_Reply, .success = MappingSuccess, .sequenceNumber = client->sequence, .length = 0 }; map = (BYTE *) &stuff[1]; /* So we're bounded here by the number of core buttons. This check * probably wants disabling through XFixes. */ /* MPX: With ClientPointer, we can return the right number of buttons. * Let's just hope nobody changed ClientPointer between GetPointerMapping * and SetPointerMapping */ if (stuff->nElts != ptr->button->numButtons) { client->errorValue = stuff->nElts; return BadValue; } /* Core protocol specs don't allow for duplicate mappings; this check * almost certainly wants disabling through XFixes too. */ for (i = 0; i < stuff->nElts; i++) { for (j = i + 1; j < stuff->nElts; j++) { if (map[i] && map[i] == map[j]) { client->errorValue = map[i]; return BadValue; } } } ret = ApplyPointerMapping(ptr, map, stuff->nElts, client); if (ret == MappingBusy) rep.success = ret; else if (ret == -1) return BadValue; else if (ret != Success) return ret; WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); return Success; } int ProcGetKeyboardMapping(ClientPtr client) { xGetKeyboardMappingReply rep; DeviceIntPtr kbd = PickKeyboard(client); XkbDescPtr xkb; KeySymsPtr syms; int rc; REQUEST(xGetKeyboardMappingReq); REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetAttrAccess); if (rc != Success) return rc; xkb = kbd->key->xkbInfo->desc; if ((stuff->firstKeyCode < xkb->min_key_code) || (stuff->firstKeyCode > xkb->max_key_code)) { client->errorValue = stuff->firstKeyCode; return BadValue; } if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { client->errorValue = stuff->count; return BadValue; } syms = XkbGetCoreMap(kbd); if (!syms) return BadAlloc; rep = (xGetKeyboardMappingReply) { .type = X_Reply, .keySymsPerKeyCode = syms->mapWidth, .sequenceNumber = client->sequence, /* length is a count of 4 byte quantities and KeySyms are 4 bytes */ .length = syms->mapWidth * stuff->count }; WriteReplyToClient(client, sizeof(xGetKeyboardMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; WriteSwappedDataToClient(client, syms->mapWidth * stuff->count * sizeof(KeySym), &syms->map[syms->mapWidth * (stuff->firstKeyCode - syms->minKeyCode)]); free(syms->map); free(syms); return Success; } int ProcGetPointerMapping(ClientPtr client) { xGetPointerMappingReply rep; /* Apps may get different values each time they call GetPointerMapping as * the ClientPointer could change. */ DeviceIntPtr ptr = PickPointer(client); ButtonClassPtr butc = ptr->button; int nElts; int rc; REQUEST_SIZE_MATCH(xReq); rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, DixGetAttrAccess); if (rc != Success) return rc; nElts = (butc) ? butc->numButtons : 0; rep = (xGetPointerMappingReply) { .type = X_Reply, .nElts = nElts, .sequenceNumber = client->sequence, .length = ((unsigned) nElts + (4 - 1)) / 4 }; WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep); if (butc) WriteToClient(client, nElts, &butc->map[1]); return Success; } void NoteLedState(DeviceIntPtr keybd, int led, Bool on) { KeybdCtrl *ctrl = &keybd->kbdfeed->ctrl; if (on) ctrl->leds |= ((Leds) 1 << (led - 1)); else ctrl->leds &= ~((Leds) 1 << (led - 1)); } int Ones(unsigned long mask) { /* HACKMEM 169 */ unsigned long y; y = (mask >> 1) & 033333333333; y = mask - y - ((y >> 1) & 033333333333); return (((y + (y >> 3)) & 030707070707) % 077); } static int DoChangeKeyboardControl(ClientPtr client, DeviceIntPtr keybd, XID *vlist, BITS32 vmask) { #define DO_ALL (-1) KeybdCtrl ctrl; int t; int led = DO_ALL; int key = DO_ALL; BITS32 index2; int mask = vmask, i; XkbEventCauseRec cause; ctrl = keybd->kbdfeed->ctrl; while (vmask) { index2 = (BITS32) lowbit(vmask); vmask &= ~index2; switch (index2) { case KBKeyClickPercent: t = (INT8) *vlist; vlist++; if (t == -1) { t = defaultKeyboardControl.click; } else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } ctrl.click = t; break; case KBBellPercent: t = (INT8) *vlist; vlist++; if (t == -1) { t = defaultKeyboardControl.bell; } else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } ctrl.bell = t; break; case KBBellPitch: t = (INT16) *vlist; vlist++; if (t == -1) { t = defaultKeyboardControl.bell_pitch; } else if (t < 0) { client->errorValue = t; return BadValue; } ctrl.bell_pitch = t; break; case KBBellDuration: t = (INT16) *vlist; vlist++; if (t == -1) t = defaultKeyboardControl.bell_duration; else if (t < 0) { client->errorValue = t; return BadValue; } ctrl.bell_duration = t; break; case KBLed: led = (CARD8) *vlist; vlist++; if (led < 1 || led > 32) { client->errorValue = led; return BadValue; } if (!(mask & KBLedMode)) return BadMatch; break; case KBLedMode: t = (CARD8) *vlist; vlist++; if (t == LedModeOff) { if (led == DO_ALL) ctrl.leds = 0x0; else ctrl.leds &= ~(((Leds) (1)) << (led - 1)); } else if (t == LedModeOn) { if (led == DO_ALL) ctrl.leds = ~0L; else ctrl.leds |= (((Leds) (1)) << (led - 1)); } else { client->errorValue = t; return BadValue; } XkbSetCauseCoreReq(&cause, X_ChangeKeyboardControl, client); XkbSetIndicators(keybd, ((led == DO_ALL) ? ~0L : (1L << (led - 1))), ctrl.leds, &cause); ctrl.leds = keybd->kbdfeed->ctrl.leds; break; case KBKey: key = (KeyCode) *vlist; vlist++; if ((KeyCode) key < keybd->key->xkbInfo->desc->min_key_code || (KeyCode) key > keybd->key->xkbInfo->desc->max_key_code) { client->errorValue = key; return BadValue; } if (!(mask & KBAutoRepeatMode)) return BadMatch; break; case KBAutoRepeatMode: i = (key >> 3); mask = (1 << (key & 7)); t = (CARD8) *vlist; vlist++; if (key != DO_ALL) XkbDisableComputedAutoRepeats(keybd, key); if (t == AutoRepeatModeOff) { if (key == DO_ALL) ctrl.autoRepeat = FALSE; else ctrl.autoRepeats[i] &= ~mask; } else if (t == AutoRepeatModeOn) { if (key == DO_ALL) ctrl.autoRepeat = TRUE; else ctrl.autoRepeats[i] |= mask; } else if (t == AutoRepeatModeDefault) { if (key == DO_ALL) ctrl.autoRepeat = defaultKeyboardControl.autoRepeat; else ctrl.autoRepeats[i] = (ctrl.autoRepeats[i] & ~mask) | (defaultKeyboardControl.autoRepeats[i] & mask); } else { client->errorValue = t; return BadValue; } break; default: client->errorValue = mask; return BadValue; } } keybd->kbdfeed->ctrl = ctrl; /* The XKB RepeatKeys control and core protocol global autorepeat */ /* value are linked */ XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); return Success; #undef DO_ALL } /** * Changes kbd control on the ClientPointer and all attached SDs. */ int ProcChangeKeyboardControl(ClientPtr client) { XID *vlist; BITS32 vmask; int ret = Success, error = Success; DeviceIntPtr pDev = NULL, keyboard; REQUEST(xChangeKeyboardControlReq); REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); vmask = stuff->mask; vlist = (XID *) &stuff[1]; if (client->req_len != (sizeof(xChangeKeyboardControlReq) >> 2) + Ones(vmask)) return BadLength; keyboard = PickKeyboard(client); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev == keyboard || (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = XaceHook(XACE_DEVICE_ACCESS, client, pDev, DixManageAccess); if (ret != Success) return ret; } } for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev == keyboard || (!IsMaster(pDev) && GetMaster(pDev, MASTER_KEYBOARD) == keyboard)) && pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); if (ret != Success) error = ret; } } return error; } int ProcGetKeyboardControl(ClientPtr client) { int rc, i; DeviceIntPtr kbd = PickKeyboard(client); KeybdCtrl *ctrl = &kbd->kbdfeed->ctrl; xGetKeyboardControlReply rep; REQUEST_SIZE_MATCH(xReq); rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetAttrAccess); if (rc != Success) return rc; rep = (xGetKeyboardControlReply) { .type = X_Reply, .globalAutoRepeat = ctrl->autoRepeat, .sequenceNumber = client->sequence, .length = 5, .ledMask = ctrl->leds, .keyClickPercent = ctrl->click, .bellPercent = ctrl->bell, .bellPitch = ctrl->bell_pitch, .bellDuration = ctrl->bell_duration }; for (i = 0; i < 32; i++) rep.map[i] = ctrl->autoRepeats[i]; WriteReplyToClient(client, sizeof(xGetKeyboardControlReply), &rep); return Success; } int ProcBell(ClientPtr client) { DeviceIntPtr dev, keybd = PickKeyboard(client); int base = keybd->kbdfeed->ctrl.bell; int newpercent; int rc; REQUEST(xBellReq); REQUEST_SIZE_MATCH(xBellReq); if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = stuff->percent; return BadValue; } newpercent = (base * stuff->percent) / 100; if (stuff->percent < 0) newpercent = base + newpercent; else newpercent = base - newpercent + stuff->percent; for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == keybd || (!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) && ((dev->kbdfeed && dev->kbdfeed->BellProc) || dev->xkb_interest)) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess); if (rc != Success) return rc; XkbHandleBell(FALSE, FALSE, dev, newpercent, &dev->kbdfeed->ctrl, 0, None, NULL, client); } } return Success; } int ProcChangePointerControl(ClientPtr client) { DeviceIntPtr dev, mouse = PickPointer(client); PtrCtrl ctrl; /* might get BadValue part way through */ int rc; REQUEST(xChangePointerControlReq); REQUEST_SIZE_MATCH(xChangePointerControlReq); /* If the device has no PtrFeedbackPtr, the xserver has a bug */ BUG_RETURN_VAL (!mouse->ptrfeed, BadImplementation); ctrl = mouse->ptrfeed->ctrl; if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { client->errorValue = stuff->doAccel; return BadValue; } if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) { client->errorValue = stuff->doThresh; return BadValue; } if (stuff->doAccel) { if (stuff->accelNum == -1) { ctrl.num = defaultPointerControl.num; } else if (stuff->accelNum < 0) { client->errorValue = stuff->accelNum; return BadValue; } else { ctrl.num = stuff->accelNum; } if (stuff->accelDenum == -1) { ctrl.den = defaultPointerControl.den; } else if (stuff->accelDenum <= 0) { client->errorValue = stuff->accelDenum; return BadValue; } else { ctrl.den = stuff->accelDenum; } } if (stuff->doThresh) { if (stuff->threshold == -1) { ctrl.threshold = defaultPointerControl.threshold; } else if (stuff->threshold < 0) { client->errorValue = stuff->threshold; return BadValue; } else { ctrl.threshold = stuff->threshold; } } for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == mouse || (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && dev->ptrfeed) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) return rc; } } for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == mouse || (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) == mouse)) && dev->ptrfeed) { dev->ptrfeed->ctrl = ctrl; } } return Success; } int ProcGetPointerControl(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); PtrCtrl *ctrl; xGetPointerControlReply rep; int rc; if (ptr->ptrfeed) ctrl = &ptr->ptrfeed->ctrl; else ctrl = &defaultPointerControl; REQUEST_SIZE_MATCH(xReq); rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, DixGetAttrAccess); if (rc != Success) return rc; rep = (xGetPointerControlReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .accelNumerator = ctrl->num, .accelDenominator = ctrl->den, .threshold = ctrl->threshold }; WriteReplyToClient(client, sizeof(xGenericReply), &rep); return Success; } void MaybeStopHint(DeviceIntPtr dev, ClientPtr client) { GrabPtr grab = dev->deviceGrab.grab; if ((grab && SameClient(grab, client) && ((grab->eventMask & PointerMotionHintMask) || (grab->ownerEvents && (EventMaskForClient(dev->valuator->motionHintWindow, client) & PointerMotionHintMask)))) || (!grab && (EventMaskForClient(dev->valuator->motionHintWindow, client) & PointerMotionHintMask))) dev->valuator->motionHintWindow = NullWindow; } int ProcGetMotionEvents(ClientPtr client) { WindowPtr pWin; xTimecoord *coords = (xTimecoord *) NULL; xGetMotionEventsReply rep; int i, count, xmin, xmax, ymin, ymax, rc; unsigned long nEvents; DeviceIntPtr mouse = PickPointer(client); TimeStamp start, stop; REQUEST(xGetMotionEventsReq); REQUEST_SIZE_MATCH(xGetMotionEventsReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); if (rc != Success) return rc; UpdateCurrentTimeIf(); if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep = (xGetMotionEventsReply) { .type = X_Reply, .sequenceNumber = client->sequence }; nEvents = 0; start = ClientTimeToServerTime(stuff->start); stop = ClientTimeToServerTime(stuff->stop); if ((CompareTimeStamps(start, stop) != LATER) && (CompareTimeStamps(start, currentTime) != LATER) && mouse->valuator->numMotionEvents) { if (CompareTimeStamps(stop, currentTime) == LATER) stop = currentTime; count = GetMotionHistory(mouse, &coords, start.milliseconds, stop.milliseconds, pWin->drawable.pScreen, TRUE); xmin = pWin->drawable.x - wBorderWidth(pWin); xmax = pWin->drawable.x + (int) pWin->drawable.width + wBorderWidth(pWin); ymin = pWin->drawable.y - wBorderWidth(pWin); ymax = pWin->drawable.y + (int) pWin->drawable.height + wBorderWidth(pWin); for (i = 0; i < count; i++) if ((xmin <= coords[i].x) && (coords[i].x < xmax) && (ymin <= coords[i].y) && (coords[i].y < ymax)) { coords[nEvents].time = coords[i].time; coords[nEvents].x = coords[i].x - pWin->drawable.x; coords[nEvents].y = coords[i].y - pWin->drawable.y; nEvents++; } } rep.length = nEvents * bytes_to_int32(sizeof(xTimecoord)); rep.nEvents = nEvents; WriteReplyToClient(client, sizeof(xGetMotionEventsReply), &rep); if (nEvents) { client->pSwapReplyFunc = (ReplySwapPtr) SwapTimeCoordWrite; WriteSwappedDataToClient(client, nEvents * sizeof(xTimecoord), (char *) coords); } free(coords); return Success; } int ProcQueryKeymap(ClientPtr client) { xQueryKeymapReply rep; int rc, i; DeviceIntPtr keybd = PickKeyboard(client); CARD8 *down = keybd->key->down; REQUEST_SIZE_MATCH(xReq); rep = (xQueryKeymapReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 2 }; rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess); /* If rc is Success, we're allowed to copy out the keymap. * If it's BadAccess, we leave it empty & lie to the client. */ if (rc == Success) { for (i = 0; i < 32; i++) rep.map[i] = down[i]; } else if (rc != BadAccess) return rc; WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); return Success; } /** * Recalculate the number of buttons for the master device. The number of * buttons on the master device is equal to the number of buttons on the * slave device with the highest number of buttons. */ static void RecalculateMasterButtons(DeviceIntPtr slave) { DeviceIntPtr dev, master; int maxbuttons = 0; if (!slave->button || IsMaster(slave)) return; master = GetMaster(slave, MASTER_POINTER); if (!master) return; for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsMaster(dev) || GetMaster(dev, MASTER_ATTACHED) != master || !dev->button) continue; maxbuttons = max(maxbuttons, dev->button->numButtons); } if (master->button && master->button->numButtons != maxbuttons) { int i; int last_num_buttons = master->button->numButtons; DeviceChangedEvent event = { .header = ET_Internal, .type = ET_DeviceChanged, .time = GetTimeInMillis(), .deviceid = master->id, .flags = DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE, .buttons.num_buttons = maxbuttons }; master->button->numButtons = maxbuttons; if (last_num_buttons < maxbuttons) { master->button->xkb_acts = xnfreallocarray(master->button->xkb_acts, maxbuttons, sizeof(XkbAction)); memset(&master->button->xkb_acts[last_num_buttons], 0, (maxbuttons - last_num_buttons) * sizeof(XkbAction)); } memcpy(&event.buttons.names, master->button->labels, maxbuttons * sizeof(Atom)); if (master->valuator) { event.num_valuators = master->valuator->numAxes; for (i = 0; i < event.num_valuators; i++) { event.valuators[i].min = master->valuator->axes[i].min_value; event.valuators[i].max = master->valuator->axes[i].max_value; event.valuators[i].resolution = master->valuator->axes[i].resolution; event.valuators[i].mode = master->valuator->axes[i].mode; event.valuators[i].name = master->valuator->axes[i].label; } } if (master->key) { event.keys.min_keycode = master->key->xkbInfo->desc->min_key_code; event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code; } XISendDeviceChangedEvent(master, &event); } } /** * Generate release events for all keys/button currently down on this * device. */ void ReleaseButtonsAndKeys(DeviceIntPtr dev) { InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); ButtonClassPtr b = dev->button; KeyClassPtr k = dev->key; int i, j, nevents; if (!eventlist) /* no release events for you */ return; /* Release all buttons */ for (i = 0; b && i < b->numButtons; i++) { if (BitIsOn(b->down, i)) { nevents = GetPointerEvents(eventlist, dev, ButtonRelease, i, 0, NULL); for (j = 0; j < nevents; j++) mieqProcessDeviceEvent(dev, &eventlist[j], NULL); } } /* Release all keys */ for (i = 0; k && i < MAP_LENGTH; i++) { if (BitIsOn(k->down, i)) { nevents = GetKeyboardEvents(eventlist, dev, KeyRelease, i); for (j = 0; j < nevents; j++) mieqProcessDeviceEvent(dev, &eventlist[j], NULL); } } FreeEventList(eventlist, GetMaximumEventsNum()); } /** * Attach device 'dev' to device 'master'. * Client is set to the client that issued the request, or NULL if it comes * from some internal automatic pairing. * * Master may be NULL to set the device floating. * * We don't allow multi-layer hierarchies right now. You can't attach a slave * to another slave. */ int AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { ScreenPtr screen; if (!dev || IsMaster(dev)) return BadDevice; if (master && !IsMaster(master)) /* can't attach to slaves */ return BadDevice; /* set from floating to floating? */ if (IsFloating(dev) && !master && dev->enabled) return Success; /* free the existing sprite. */ if (IsFloating(dev) && dev->spriteInfo->paired == dev) { screen = miPointerGetScreen(dev); screen->DeviceCursorCleanup(dev, screen); free(dev->spriteInfo->sprite); } dev->master = master; /* If device is set to floating, we need to create a sprite for it, * otherwise things go bad. However, we don't want to render the cursor, * so we reset spriteOwner. * Sprite has to be forced to NULL first, otherwise InitializeSprite won't * alloc new memory but overwrite the previous one. */ if (!master) { WindowPtr currentRoot; if (dev->spriteInfo->sprite) currentRoot = GetCurrentRootWindow(dev); else /* new device auto-set to floating */ currentRoot = screenInfo.screens[0]->root; /* we need to init a fake sprite */ screen = currentRoot->drawable.pScreen; screen->DeviceCursorInitialize(dev, screen); dev->spriteInfo->sprite = NULL; InitializeSprite(dev, currentRoot); dev->spriteInfo->spriteOwner = FALSE; dev->spriteInfo->paired = dev; } else { DeviceIntPtr keyboard = GetMaster(dev, MASTER_KEYBOARD); dev->spriteInfo->sprite = master->spriteInfo->sprite; dev->spriteInfo->paired = master; dev->spriteInfo->spriteOwner = FALSE; if (keyboard) XkbPushLockedStateToSlaves(keyboard, 0, 0); RecalculateMasterButtons(master); } /* XXX: in theory, the MD should change back to its old, original * classes when the last SD is detached. Thanks to the XTEST devices, * we'll always have an SD attached until the MD is removed. * So let's not worry about that. */ return Success; } /** * Return the device paired with the given device or NULL. * Returns the device paired with the parent master if the given device is a * slave device. */ DeviceIntPtr GetPairedDevice(DeviceIntPtr dev) { if (!IsMaster(dev) && !IsFloating(dev)) dev = GetMaster(dev, MASTER_ATTACHED); return (dev && dev->spriteInfo) ? dev->spriteInfo->paired: NULL; } /** * Returns the requested master for this device. * The return values are: * - MASTER_ATTACHED: the master for this device or NULL for a floating * slave. * - MASTER_KEYBOARD: the master keyboard for this device or NULL for a * floating slave * - MASTER_POINTER: the master pointer for this device or NULL for a * floating slave * - POINTER_OR_FLOAT: the master pointer for this device or the device for * a floating slave * - KEYBOARD_OR_FLOAT: the master keyboard for this device or the device for * a floating slave * * @param which ::MASTER_KEYBOARD or ::MASTER_POINTER, ::MASTER_ATTACHED, * ::POINTER_OR_FLOAT or ::KEYBOARD_OR_FLOAT. * @return The requested master device */ DeviceIntPtr GetMaster(DeviceIntPtr dev, int which) { DeviceIntPtr master; if (IsMaster(dev)) master = dev; else { master = dev->master; if (!master && (which == POINTER_OR_FLOAT || which == KEYBOARD_OR_FLOAT)) return dev; } if (master && which != MASTER_ATTACHED) { if (which == MASTER_KEYBOARD || which == KEYBOARD_OR_FLOAT) { if (master->type != MASTER_KEYBOARD) master = GetPairedDevice(master); } else { if (master->type != MASTER_POINTER) master = GetPairedDevice(master); } } return master; } /** * Create a new device pair (== one pointer, one keyboard device). * Only allocates the devices, you will need to call ActivateDevice() and * EnableDevice() manually. * Either a master or a slave device can be created depending on * the value for master. */ int AllocDevicePair(ClientPtr client, const char *name, DeviceIntPtr *ptr, DeviceIntPtr *keybd, DeviceProc ptr_proc, DeviceProc keybd_proc, Bool master) { DeviceIntPtr pointer; DeviceIntPtr keyboard; char *dev_name; *ptr = *keybd = NULL; XkbInitPrivates(); pointer = AddInputDevice(client, ptr_proc, TRUE); if (!pointer) return BadAlloc; if (asprintf(&dev_name, "%s pointer", name) == -1) { RemoveDevice(pointer, FALSE); return BadAlloc; } pointer->name = dev_name; pointer->public.processInputProc = ProcessOtherEvent; pointer->public.realInputProc = ProcessOtherEvent; XkbSetExtension(pointer, ProcessPointerEvent); pointer->deviceGrab.ActivateGrab = ActivatePointerGrab; pointer->deviceGrab.DeactivateGrab = DeactivatePointerGrab; pointer->coreEvents = TRUE; pointer->spriteInfo->spriteOwner = TRUE; pointer->lastSlave = NULL; pointer->last.slave = NULL; pointer->type = (master) ? MASTER_POINTER : SLAVE; keyboard = AddInputDevice(client, keybd_proc, TRUE); if (!keyboard) { RemoveDevice(pointer, FALSE); return BadAlloc; } if (asprintf(&dev_name, "%s keyboard", name) == -1) { RemoveDevice(keyboard, FALSE); RemoveDevice(pointer, FALSE); return BadAlloc; } keyboard->name = dev_name; keyboard->public.processInputProc = ProcessOtherEvent; keyboard->public.realInputProc = ProcessOtherEvent; XkbSetExtension(keyboard, ProcessKeyboardEvent); keyboard->deviceGrab.ActivateGrab = ActivateKeyboardGrab; keyboard->deviceGrab.DeactivateGrab = DeactivateKeyboardGrab; keyboard->coreEvents = TRUE; keyboard->spriteInfo->spriteOwner = FALSE; keyboard->lastSlave = NULL; keyboard->last.slave = NULL; keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE; /* The ClassesRec stores the device classes currently not used. */ if (IsMaster(pointer)) { pointer->unused_classes = calloc(1, sizeof(ClassesRec)); keyboard->unused_classes = calloc(1, sizeof(ClassesRec)); } *ptr = pointer; *keybd = keyboard; return Success; } /** * Return Relative or Absolute for the device. */ int valuator_get_mode(DeviceIntPtr dev, int axis) { return (dev->valuator->axes[axis].mode & DeviceMode); } /** * Set the given mode for the axis. If axis is VALUATOR_MODE_ALL_AXES, then * set the mode for all axes. */ void valuator_set_mode(DeviceIntPtr dev, int axis, int mode) { if (axis != VALUATOR_MODE_ALL_AXES) dev->valuator->axes[axis].mode = mode; else { int i; for (i = 0; i < dev->valuator->numAxes; i++) dev->valuator->axes[i].mode = mode; } } void DeliverDeviceClassesChangedEvent(int sourceid, Time time) { DeviceIntPtr dev; int num_events = 0; InternalEvent dcce; dixLookupDevice(&dev, sourceid, serverClient, DixWriteAccess); if (!dev) return; /* UpdateFromMaster generates at most one event */ UpdateFromMaster(&dcce, dev, DEVCHANGE_POINTER_EVENT, &num_events); BUG_WARN(num_events > 1); if (num_events) { dcce.any.time = time; /* FIXME: This doesn't do anything */ dev->public.processInputProc(&dcce, dev); } } xorg-server-21.1.16/dix/dispatch.c0000644000175000017500000035610214757411105012371 /************************************************************ Copyright 1987, 1989, 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, 1989 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. ********************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ /* XSERVER_DTRACE additions: * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #include #endif #ifdef PANORAMIX_DEBUG #include int ProcInitialConnection(); #endif #include "windowstr.h" #include #include #include "dixfontstr.h" #include "gcstruct.h" #include "selection.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "opaque.h" #include "input.h" #include "servermd.h" #include "extnsionst.h" #include "dixfont.h" #include "dispatch.h" #include "swaprep.h" #include "swapreq.h" #include "privates.h" #include "xace.h" #include "inputstr.h" #include "xkbsrv.h" #include "client.h" #include "xfixesint.h" #ifdef XSERVER_DTRACE #include "registry.h" #include "probes.h" #endif #define mskcnt ((MAXCLIENTS + 31) / 32) #define BITMASK(i) (1U << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) #define MASKWORD(buf, i) buf[MASKIDX(i)] #define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) #define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) xConnSetupPrefix connSetupPrefix; PaddingInfo PixmapWidthPaddingInfo[33]; static ClientPtr grabClient; static ClientPtr currentClient; /* Client for the request currently being dispatched */ #define GrabNone 0 #define GrabActive 1 static int grabState = GrabNone; static long grabWaiters[mskcnt]; CallbackListPtr ServerGrabCallback = NULL; HWEventQueuePtr checkForInput[2]; int connBlockScreenStart; static void KillAllClients(void); static int nextFreeClientID; /* always MIN free client ID */ static int nClients; /* number of authorized clients */ CallbackListPtr ClientStateCallback; OsTimerPtr dispatchExceptionTimer; /* dispatchException & isItTimeToYield must be declared volatile since they * are modified by signal handlers - otherwise optimizer may assume it doesn't * need to actually check value in memory when used and may miss changes from * signal handlers. */ volatile char dispatchException = 0; volatile char isItTimeToYield; #define SAME_SCREENS(a, b) (\ (a.pScreen == b.pScreen)) ClientPtr GetCurrentClient(void) { if (in_input_thread()) { static Bool warned; if (!warned) { ErrorF("[dix] Error GetCurrentClient called from input-thread\n"); warned = TRUE; } return NULL; } return currentClient; } void SetInputCheck(HWEventQueuePtr c0, HWEventQueuePtr c1) { checkForInput[0] = c0; checkForInput[1] = c1; } void UpdateCurrentTime(void) { TimeStamp systime; /* To avoid time running backwards, we must call GetTimeInMillis before * calling ProcessInputEvents. */ systime.months = currentTime.months; systime.milliseconds = GetTimeInMillis(); if (systime.milliseconds < currentTime.milliseconds) systime.months++; if (InputCheckPending()) ProcessInputEvents(); if (CompareTimeStamps(systime, currentTime) == LATER) currentTime = systime; } /* Like UpdateCurrentTime, but can't call ProcessInputEvents */ void UpdateCurrentTimeIf(void) { TimeStamp systime; systime.months = currentTime.months; systime.milliseconds = GetTimeInMillis(); if (systime.milliseconds < currentTime.milliseconds) systime.months++; if (CompareTimeStamps(systime, currentTime) == LATER) currentTime = systime; } #undef SMART_DEBUG /* in milliseconds */ #define SMART_SCHEDULE_DEFAULT_INTERVAL 5 #define SMART_SCHEDULE_MAX_SLICE 15 #ifdef HAVE_SETITIMER Bool SmartScheduleSignalEnable = TRUE; #endif long SmartScheduleSlice = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleInterval = SMART_SCHEDULE_DEFAULT_INTERVAL; long SmartScheduleMaxSlice = SMART_SCHEDULE_MAX_SLICE; long SmartScheduleTime; int SmartScheduleLatencyLimited = 0; static ClientPtr SmartLastClient; static int SmartLastIndex[SMART_MAX_PRIORITY - SMART_MIN_PRIORITY + 1]; #ifdef SMART_DEBUG long SmartLastPrint; #endif void Dispatch(void); static struct xorg_list ready_clients; static struct xorg_list saved_ready_clients; struct xorg_list output_pending_clients; static void init_client_ready(void) { xorg_list_init(&ready_clients); xorg_list_init(&saved_ready_clients); xorg_list_init(&output_pending_clients); } Bool clients_are_ready(void) { return !xorg_list_is_empty(&ready_clients); } /* Client has requests queued or data on the network */ void mark_client_ready(ClientPtr client) { if (xorg_list_is_empty(&client->ready)) xorg_list_append(&client->ready, &ready_clients); } /* * Client has requests queued or data on the network, but awaits a * server grab release */ void mark_client_saved_ready(ClientPtr client) { if (xorg_list_is_empty(&client->ready)) xorg_list_append(&client->ready, &saved_ready_clients); } /* Client has no requests queued and no data on network */ void mark_client_not_ready(ClientPtr client) { xorg_list_del(&client->ready); } static void mark_client_grab(ClientPtr grab) { ClientPtr client, tmp; xorg_list_for_each_entry_safe(client, tmp, &ready_clients, ready) { if (client != grab) { xorg_list_del(&client->ready); xorg_list_append(&client->ready, &saved_ready_clients); } } } static void mark_client_ungrab(void) { ClientPtr client, tmp; xorg_list_for_each_entry_safe(client, tmp, &saved_ready_clients, ready) { xorg_list_del(&client->ready); xorg_list_append(&client->ready, &ready_clients); } } static ClientPtr SmartScheduleClient(void) { ClientPtr pClient, best = NULL; int bestRobin, robin; long now = SmartScheduleTime; long idle; int nready = 0; bestRobin = 0; idle = 2 * SmartScheduleSlice; xorg_list_for_each_entry(pClient, &ready_clients, ready) { nready++; /* Praise clients which haven't run in a while */ if ((now - pClient->smart_stop_tick) >= idle) { if (pClient->smart_priority < 0) pClient->smart_priority++; } /* check priority to select best client */ robin = (pClient->index - SmartLastIndex[pClient->smart_priority - SMART_MIN_PRIORITY]) & 0xff; /* pick the best client */ if (!best || pClient->priority > best->priority || (pClient->priority == best->priority && (pClient->smart_priority > best->smart_priority || (pClient->smart_priority == best->smart_priority && robin > bestRobin)))) { best = pClient; bestRobin = robin; } #ifdef SMART_DEBUG if ((now - SmartLastPrint) >= 5000) fprintf(stderr, " %2d: %3d", pClient->index, pClient->smart_priority); #endif } #ifdef SMART_DEBUG if ((now - SmartLastPrint) >= 5000) { fprintf(stderr, " use %2d\n", best->index); SmartLastPrint = now; } #endif SmartLastIndex[best->smart_priority - SMART_MIN_PRIORITY] = best->index; /* * Set current client pointer */ if (SmartLastClient != best) { best->smart_start_tick = now; SmartLastClient = best; } /* * Adjust slice */ if (nready == 1 && SmartScheduleLatencyLimited == 0) { /* * If it's been a long time since another client * has run, bump the slice up to get maximal * performance from a single client */ if ((now - best->smart_start_tick) > 1000 && SmartScheduleSlice < SmartScheduleMaxSlice) { SmartScheduleSlice += SmartScheduleInterval; } } else { SmartScheduleSlice = SmartScheduleInterval; } return best; } static CARD32 DispatchExceptionCallback(OsTimerPtr timer, CARD32 time, void *arg) { dispatchException |= dispatchExceptionAtReset; /* Don't re-arm the timer */ return 0; } static void CancelDispatchExceptionTimer(void) { TimerFree(dispatchExceptionTimer); dispatchExceptionTimer = NULL; } static void SetDispatchExceptionTimer(void) { /* The timer delay is only for terminate, not reset */ if (!(dispatchExceptionAtReset & DE_TERMINATE)) { dispatchException |= dispatchExceptionAtReset; return; } CancelDispatchExceptionTimer(); if (terminateDelay == 0) dispatchException |= dispatchExceptionAtReset; else dispatchExceptionTimer = TimerSet(dispatchExceptionTimer, 0, terminateDelay * 1000 /* msec */, &DispatchExceptionCallback, NULL); } static Bool ShouldDisconnectRemainingClients(void) { int i; for (i = 1; i < currentMaxClients; i++) { if (clients[i]) { if (!XFixesShouldDisconnectClient(clients[i])) return FALSE; } } /* All remaining clients can be safely ignored */ return TRUE; } void EnableLimitedSchedulingLatency(void) { ++SmartScheduleLatencyLimited; SmartScheduleSlice = SmartScheduleInterval; } void DisableLimitedSchedulingLatency(void) { --SmartScheduleLatencyLimited; /* protect against bugs */ if (SmartScheduleLatencyLimited < 0) SmartScheduleLatencyLimited = 0; } void Dispatch(void) { int result; ClientPtr client; long start_tick; nextFreeClientID = 1; nClients = 0; SmartScheduleSlice = SmartScheduleInterval; init_client_ready(); while (!dispatchException) { if (InputCheckPending()) { ProcessInputEvents(); FlushIfCriticalOutputPending(); } if (!WaitForSomething(clients_are_ready())) continue; /***************** * Handle events in round robin fashion, doing input between * each round *****************/ if (!dispatchException && clients_are_ready()) { client = SmartScheduleClient(); isItTimeToYield = FALSE; start_tick = SmartScheduleTime; while (!isItTimeToYield) { if (InputCheckPending()) ProcessInputEvents(); FlushIfCriticalOutputPending(); if ((SmartScheduleTime - start_tick) >= SmartScheduleSlice) { /* Penalize clients which consume ticks */ if (client->smart_priority > SMART_MIN_PRIORITY) client->smart_priority--; break; } /* now, finally, deal with client requests */ result = ReadRequestFromClient(client); if (result <= 0) { if (result < 0) CloseDownClient(client); break; } client->sequence++; client->majorOp = ((xReq *) client->requestBuffer)->reqType; client->minorOp = 0; if (client->majorOp >= EXTENSION_BASE) { ExtensionEntry *ext = GetExtensionEntry(client->majorOp); if (ext) client->minorOp = ext->MinorOpcode(client); } #ifdef XSERVER_DTRACE if (XSERVER_REQUEST_START_ENABLED()) XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp, ((xReq *) client->requestBuffer)->length, client->index, client->requestBuffer); #endif if (result > (maxBigRequestSize << 2)) result = BadLength; else { result = XaceHookDispatch(client, client->majorOp); if (result == Success) { currentClient = client; result = (*client->requestVector[client->majorOp]) (client); currentClient = NULL; } } if (!SmartScheduleSignalEnable) SmartScheduleTime = GetTimeInMillis(); #ifdef XSERVER_DTRACE if (XSERVER_REQUEST_DONE_ENABLED()) XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp, client->sequence, client->index, result); #endif if (client->noClientException != Success) { CloseDownClient(client); break; } else if (result != Success) { SendErrorToClient(client, client->majorOp, client->minorOp, client->errorValue, result); break; } } FlushAllOutput(); if (client == SmartLastClient) client->smart_stop_tick = SmartScheduleTime; } dispatchException &= ~DE_PRIORITYCHANGE; } #if defined(DDXBEFORERESET) ddxBeforeReset(); #endif KillAllClients(); dispatchException &= ~DE_RESET; SmartScheduleLatencyLimited = 0; ResetOsBuffers(); } static int VendorRelease = VENDOR_RELEASE; void SetVendorRelease(int release) { VendorRelease = release; } Bool CreateConnectionBlock(void) { xConnSetup setup; xWindowRoot root; xDepth depth; xVisualType visual; xPixmapFormat format; unsigned long vid; int i, j, k, lenofblock, sizesofar = 0; char *pBuf; const char VendorString[] = VENDOR_NAME; memset(&setup, 0, sizeof(xConnSetup)); /* Leave off the ridBase and ridMask, these must be sent with connection */ setup.release = VendorRelease; /* * per-server image and bitmap parameters are defined in Xmd.h */ setup.imageByteOrder = screenInfo.imageByteOrder; setup.bitmapScanlineUnit = screenInfo.bitmapScanlineUnit; setup.bitmapScanlinePad = screenInfo.bitmapScanlinePad; setup.bitmapBitOrder = screenInfo.bitmapBitOrder; setup.motionBufferSize = NumMotionEvents(); setup.numRoots = screenInfo.numScreens; setup.nbytesVendor = strlen(VendorString); setup.numFormats = screenInfo.numPixmapFormats; setup.maxRequestSize = MAX_REQUEST_SIZE; QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); lenofblock = sizeof(xConnSetup) + pad_to_int32(setup.nbytesVendor) + (setup.numFormats * sizeof(xPixmapFormat)) + (setup.numRoots * sizeof(xWindowRoot)); ConnectionInfo = malloc(lenofblock); if (!ConnectionInfo) return FALSE; memmove(ConnectionInfo, (char *) &setup, sizeof(xConnSetup)); sizesofar = sizeof(xConnSetup); pBuf = ConnectionInfo + sizeof(xConnSetup); memmove(pBuf, VendorString, (int) setup.nbytesVendor); sizesofar += setup.nbytesVendor; pBuf += setup.nbytesVendor; i = padding_for_int32(setup.nbytesVendor); sizesofar += i; while (--i >= 0) *pBuf++ = 0; memset(&format, 0, sizeof(xPixmapFormat)); for (i = 0; i < screenInfo.numPixmapFormats; i++) { format.depth = screenInfo.formats[i].depth; format.bitsPerPixel = screenInfo.formats[i].bitsPerPixel; format.scanLinePad = screenInfo.formats[i].scanlinePad; memmove(pBuf, (char *) &format, sizeof(xPixmapFormat)); pBuf += sizeof(xPixmapFormat); sizesofar += sizeof(xPixmapFormat); } connBlockScreenStart = sizesofar; memset(&depth, 0, sizeof(xDepth)); memset(&visual, 0, sizeof(xVisualType)); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen; DepthPtr pDepth; VisualPtr pVisual; pScreen = screenInfo.screens[i]; root.windowId = pScreen->root->drawable.id; root.defaultColormap = pScreen->defColormap; root.whitePixel = pScreen->whitePixel; root.blackPixel = pScreen->blackPixel; root.currentInputMask = 0; /* filled in when sent */ root.pixWidth = pScreen->width; root.pixHeight = pScreen->height; root.mmWidth = pScreen->mmWidth; root.mmHeight = pScreen->mmHeight; root.minInstalledMaps = pScreen->minInstalledCmaps; root.maxInstalledMaps = pScreen->maxInstalledCmaps; root.rootVisualID = pScreen->rootVisual; root.backingStore = pScreen->backingStoreSupport; root.saveUnders = FALSE; root.rootDepth = pScreen->rootDepth; root.nDepths = pScreen->numDepths; memmove(pBuf, (char *) &root, sizeof(xWindowRoot)); sizesofar += sizeof(xWindowRoot); pBuf += sizeof(xWindowRoot); pDepth = pScreen->allowedDepths; for (j = 0; j < pScreen->numDepths; j++, pDepth++) { lenofblock += sizeof(xDepth) + (pDepth->numVids * sizeof(xVisualType)); pBuf = (char *) realloc(ConnectionInfo, lenofblock); if (!pBuf) { free(ConnectionInfo); return FALSE; } ConnectionInfo = pBuf; pBuf += sizesofar; depth.depth = pDepth->depth; depth.nVisuals = pDepth->numVids; memmove(pBuf, (char *) &depth, sizeof(xDepth)); pBuf += sizeof(xDepth); sizesofar += sizeof(xDepth); for (k = 0; k < pDepth->numVids; k++) { vid = pDepth->vids[k]; for (pVisual = pScreen->visuals; pVisual->vid != vid; pVisual++); visual.visualID = vid; visual.class = pVisual->class; visual.bitsPerRGB = pVisual->bitsPerRGBValue; visual.colormapEntries = pVisual->ColormapEntries; visual.redMask = pVisual->redMask; visual.greenMask = pVisual->greenMask; visual.blueMask = pVisual->blueMask; memmove(pBuf, (char *) &visual, sizeof(xVisualType)); pBuf += sizeof(xVisualType); sizesofar += sizeof(xVisualType); } } } connSetupPrefix.success = xTrue; connSetupPrefix.length = lenofblock / 4; connSetupPrefix.majorVersion = X_PROTOCOL; connSetupPrefix.minorVersion = X_PROTOCOL_REVISION; return TRUE; } int ProcBadRequest(ClientPtr client) { return BadRequest; } int ProcCreateWindow(ClientPtr client) { WindowPtr pParent, pWin; REQUEST(xCreateWindowReq); int len, rc; REQUEST_AT_LEAST_SIZE(xCreateWindowReq); LEGAL_NEW_RESOURCE(stuff->wid, client); rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); if (Ones(stuff->mask) != len) return BadLength; if (!stuff->width || !stuff->height) { client->errorValue = 0; return BadValue; } pWin = CreateWindow(stuff->wid, pParent, stuff->x, stuff->y, stuff->width, stuff->height, stuff->borderWidth, stuff->class, stuff->mask, (XID *) &stuff[1], (int) stuff->depth, client, stuff->visual, &rc); if (pWin) { Mask mask = pWin->eventMask; pWin->eventMask = 0; /* subterfuge in case AddResource fails */ if (!AddResource(stuff->wid, RT_WINDOW, (void *) pWin)) return BadAlloc; pWin->eventMask = mask; } return rc; } int ProcChangeWindowAttributes(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); int len, rc; Mask access_mode = 0; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); access_mode |= (stuff->valueMask & CWEventMask) ? DixReceiveAccess : 0; access_mode |= (stuff->valueMask & ~CWEventMask) ? DixSetAttrAccess : 0; rc = dixLookupWindow(&pWin, stuff->window, client, access_mode); if (rc != Success) return rc; len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); if (len != Ones(stuff->valueMask)) return BadLength; return ChangeWindowAttributes(pWin, stuff->valueMask, (XID *) &stuff[1], client); } int ProcGetWindowAttributes(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); xGetWindowAttributesReply wa; int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; memset(&wa, 0, sizeof(xGetWindowAttributesReply)); GetWindowAttributes(pWin, client, &wa); WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); return Success; } int ProcDestroyWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); if (rc != Success) return rc; if (pWin->parent) { rc = dixLookupWindow(&pWin, pWin->parent->drawable.id, client, DixRemoveAccess); if (rc != Success) return rc; FreeResource(stuff->id, RT_NONE); } return Success; } int ProcDestroySubwindows(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixRemoveAccess); if (rc != Success) return rc; DestroySubwindows(pWin, client); return Success; } int ProcChangeSaveSet(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeSaveSetReq); int rc; REQUEST_SIZE_MATCH(xChangeSaveSetReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) return BadMatch; if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); client->errorValue = stuff->mode; return BadValue; } int ProcReparentWindow(ClientPtr client) { WindowPtr pWin, pParent; REQUEST(xReparentWindowReq); int rc; REQUEST_SIZE_MATCH(xReparentWindowReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; if (!SAME_SCREENS(pWin->drawable, pParent->drawable)) return BadMatch; if ((pWin->backgroundState == ParentRelative) && (pParent->drawable.depth != pWin->drawable.depth)) return BadMatch; if ((pWin->drawable.class != InputOnly) && (pParent->drawable.class == InputOnly)) return BadMatch; return ReparentWindow(pWin, pParent, (short) stuff->x, (short) stuff->y, client); } int ProcMapWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixShowAccess); if (rc != Success) return rc; MapWindow(pWin, client); /* update cache to say it is mapped */ return Success; } int ProcMapSubwindows(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; MapSubwindows(pWin, client); /* update cache to say it is mapped */ return Success; } int ProcUnmapWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixHideAccess); if (rc != Success) return rc; UnmapWindow(pWin, FALSE); /* update cache to say it is mapped */ return Success; } int ProcUnmapSubwindows(ClientPtr client) { WindowPtr pWin; REQUEST(xResourceReq); int rc; REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; UnmapSubwindows(pWin); return Success; } int ProcConfigureWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xConfigureWindowReq); int len, rc; REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess | DixSetAttrAccess); if (rc != Success) return rc; len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); if (Ones((Mask) stuff->mask) != len) return BadLength; return ConfigureWindow(pWin, (Mask) stuff->mask, (XID *) &stuff[1], client); } int ProcCirculateWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xCirculateWindowReq); int rc; REQUEST_SIZE_MATCH(xCirculateWindowReq); if ((stuff->direction != RaiseLowest) && (stuff->direction != LowerHighest)) { client->errorValue = stuff->direction; return BadValue; } rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (rc != Success) return rc; CirculateWindow(pWin, (int) stuff->direction, client); return Success; } static int GetGeometry(ClientPtr client, xGetGeometryReply * rep) { DrawablePtr pDraw; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; rep->type = X_Reply; rep->length = 0; rep->sequenceNumber = client->sequence; rep->root = pDraw->pScreen->root->drawable.id; rep->depth = pDraw->depth; rep->width = pDraw->width; rep->height = pDraw->height; if (WindowDrawable(pDraw->type)) { WindowPtr pWin = (WindowPtr) pDraw; rep->x = pWin->origin.x - wBorderWidth(pWin); rep->y = pWin->origin.y - wBorderWidth(pWin); rep->borderWidth = pWin->borderWidth; } else { /* DRAWABLE_PIXMAP */ rep->x = rep->y = rep->borderWidth = 0; } return Success; } int ProcGetGeometry(ClientPtr client) { xGetGeometryReply rep = { .type = X_Reply }; int status; if ((status = GetGeometry(client, &rep)) != Success) return status; WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); return Success; } int ProcQueryTree(ClientPtr client) { xQueryTreeReply reply; int rc, numChildren = 0; WindowPtr pChild, pWin, pHead; Window *childIDs = (Window *) NULL; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixListAccess); if (rc != Success) return rc; reply = (xQueryTreeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .root = pWin->drawable.pScreen->root->drawable.id, .parent = (pWin->parent) ? pWin->parent->drawable.id : (Window) None }; pHead = RealChildHead(pWin); for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) numChildren++; if (numChildren) { int curChild = 0; childIDs = xallocarray(numChildren, sizeof(Window)); if (!childIDs) return BadAlloc; for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) childIDs[curChild++] = pChild->drawable.id; } reply.nChildren = numChildren; reply.length = bytes_to_int32(numChildren * sizeof(Window)); WriteReplyToClient(client, sizeof(xQueryTreeReply), &reply); if (numChildren) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs); free(childIDs); } return Success; } int ProcInternAtom(ClientPtr client) { Atom atom; char *tchar; REQUEST(xInternAtomReq); REQUEST_FIXED_SIZE(xInternAtomReq, stuff->nbytes); if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse)) { client->errorValue = stuff->onlyIfExists; return BadValue; } tchar = (char *) &stuff[1]; atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists); if (atom != BAD_RESOURCE) { xInternAtomReply reply = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .atom = atom }; WriteReplyToClient(client, sizeof(xInternAtomReply), &reply); return Success; } else return BadAlloc; } int ProcGetAtomName(ClientPtr client) { const char *str; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); if ((str = NameForAtom(stuff->id))) { int len = strlen(str); xGetAtomNameReply reply = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(len), .nameLength = len }; WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); WriteToClient(client, len, str); return Success; } else { client->errorValue = stuff->id; return BadAtom; } } int ProcGrabServer(ClientPtr client) { int rc; REQUEST_SIZE_MATCH(xReq); if (grabState != GrabNone && client != grabClient) { ResetCurrentRequest(client); client->sequence--; BITSET(grabWaiters, client->index); IgnoreClient(client); return Success; } rc = OnlyListenToOneClient(client); if (rc != Success) return rc; grabState = GrabActive; grabClient = client; mark_client_grab(client); if (ServerGrabCallback) { ServerGrabInfoRec grabinfo; grabinfo.client = client; grabinfo.grabstate = SERVER_GRABBED; CallCallbacks(&ServerGrabCallback, (void *) &grabinfo); } return Success; } static void UngrabServer(ClientPtr client) { int i; grabState = GrabNone; ListenToAllClients(); mark_client_ungrab(); for (i = mskcnt; --i >= 0 && !grabWaiters[i];); if (i >= 0) { i <<= 5; while (!GETBIT(grabWaiters, i)) i++; BITCLEAR(grabWaiters, i); AttendClient(clients[i]); } if (ServerGrabCallback) { ServerGrabInfoRec grabinfo; grabinfo.client = client; grabinfo.grabstate = SERVER_UNGRABBED; CallCallbacks(&ServerGrabCallback, (void *) &grabinfo); } } int ProcUngrabServer(ClientPtr client) { REQUEST_SIZE_MATCH(xReq); UngrabServer(client); return Success; } int ProcTranslateCoords(ClientPtr client) { REQUEST(xTranslateCoordsReq); WindowPtr pWin, pDst; xTranslateCoordsReply rep; int rc; REQUEST_SIZE_MATCH(xTranslateCoordsReq); rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixGetAttrAccess); if (rc != Success) return rc; rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xTranslateCoordsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; if (!SAME_SCREENS(pWin->drawable, pDst->drawable)) { rep.sameScreen = xFalse; rep.child = None; rep.dstX = rep.dstY = 0; } else { INT16 x, y; rep.sameScreen = xTrue; rep.child = None; /* computing absolute coordinates -- adjust to destination later */ x = pWin->drawable.x + stuff->srcX; y = pWin->drawable.y + stuff->srcY; pWin = pDst->firstChild; while (pWin) { BoxRec box; if ((pWin->mapped) && (x >= pWin->drawable.x - wBorderWidth(pWin)) && (x < pWin->drawable.x + (int) pWin->drawable.width + wBorderWidth(pWin)) && (y >= pWin->drawable.y - wBorderWidth(pWin)) && (y < pWin->drawable.y + (int) pWin->drawable.height + wBorderWidth(pWin)) /* When a window is shaped, a further check * is made to see if the point is inside * borderSize */ && (!wBoundingShape(pWin) || RegionContainsPoint(&pWin->borderSize, x, y, &box)) && (!wInputShape(pWin) || RegionContainsPoint(wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) ) { rep.child = pWin->drawable.id; pWin = (WindowPtr) NULL; } else pWin = pWin->nextSib; } /* adjust to destination coordinates */ rep.dstX = x - pDst->drawable.x; rep.dstY = y - pDst->drawable.y; } WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); return Success; } int ProcOpenFont(ClientPtr client) { int err; REQUEST(xOpenFontReq); REQUEST_FIXED_SIZE(xOpenFontReq, stuff->nbytes); client->errorValue = stuff->fid; LEGAL_NEW_RESOURCE(stuff->fid, client); err = OpenFont(client, stuff->fid, (Mask) 0, stuff->nbytes, (char *) &stuff[1]); if (err == Success) { return Success; } else return err; } int ProcCloseFont(ClientPtr client) { FontPtr pFont; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pFont, stuff->id, RT_FONT, client, DixDestroyAccess); if (rc == Success) { FreeResource(stuff->id, RT_NONE); return Success; } else { client->errorValue = stuff->id; return rc; } } int ProcQueryFont(ClientPtr client) { xQueryFontReply *reply; FontPtr pFont; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; { xCharInfo *pmax = FONTINKMAX(pFont); xCharInfo *pmin = FONTINKMIN(pFont); int nprotoxcistructs; int rlength; nprotoxcistructs = (pmax->rightSideBearing == pmin->rightSideBearing && pmax->leftSideBearing == pmin->leftSideBearing && pmax->descent == pmin->descent && pmax->ascent == pmin->ascent && pmax->characterWidth == pmin->characterWidth) ? 0 : N2dChars(pFont); rlength = sizeof(xQueryFontReply) + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + nprotoxcistructs * sizeof(xCharInfo); reply = calloc(1, rlength); if (!reply) { return BadAlloc; } reply->type = X_Reply; reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->sequenceNumber = client->sequence; QueryFont(pFont, reply, nprotoxcistructs); WriteReplyToClient(client, rlength, reply); free(reply); return Success; } } int ProcQueryTextExtents(ClientPtr client) { xQueryTextExtentsReply reply; FontPtr pFont; ExtentInfoRec info; unsigned long length; int rc; REQUEST(xQueryTextExtentsReq); REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess); if (rc != Success) return rc; length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq)); length = length << 1; if (stuff->oddLength) { if (length == 0) return BadLength; length--; } if (!xfont2_query_text_extents(pFont, length, (unsigned char *) &stuff[1], &info)) return BadAlloc; reply = (xQueryTextExtentsReply) { .type = X_Reply, .drawDirection = info.drawDirection, .sequenceNumber = client->sequence, .length = 0, .fontAscent = info.fontAscent, .fontDescent = info.fontDescent, .overallAscent = info.overallAscent, .overallDescent = info.overallDescent, .overallWidth = info.overallWidth, .overallLeft = info.overallLeft, .overallRight = info.overallRight }; WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply); return Success; } int ProcListFonts(ClientPtr client) { REQUEST(xListFontsReq); REQUEST_FIXED_SIZE(xListFontsReq, stuff->nbytes); return ListFonts(client, (unsigned char *) &stuff[1], stuff->nbytes, stuff->maxNames); } int ProcListFontsWithInfo(ClientPtr client) { REQUEST(xListFontsWithInfoReq); REQUEST_FIXED_SIZE(xListFontsWithInfoReq, stuff->nbytes); return StartListFontsWithInfo(client, stuff->nbytes, (unsigned char *) &stuff[1], stuff->maxNames); } /** * * \param value must conform to DeleteType */ int dixDestroyPixmap(void *value, XID pid) { PixmapPtr pPixmap = (PixmapPtr) value; return (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); } int ProcCreatePixmap(ClientPtr client) { PixmapPtr pMap; DrawablePtr pDraw; REQUEST(xCreatePixmapReq); DepthPtr pDepth; int i, rc; REQUEST_SIZE_MATCH(xCreatePixmapReq); client->errorValue = stuff->pid; LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; if (!stuff->width || !stuff->height) { client->errorValue = 0; return BadValue; } if (stuff->width > 32767 || stuff->height > 32767) { /* It is allowed to try and allocate a pixmap which is larger than * 32767 in either dimension. However, all of the framebuffer code * is buggy and does not reliably draw to such big pixmaps, basically * because the Region data structure operates with signed shorts * for the rectangles in it. * * Furthermore, several places in the X server computes the * size in bytes of the pixmap and tries to store it in an * integer. This integer can overflow and cause the allocated size * to be much smaller. * * So, such big pixmaps are rejected here with a BadAlloc */ return BadAlloc; } if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) if (pDepth->depth == stuff->depth) goto CreatePmap; client->errorValue = stuff->depth; return BadValue; } CreatePmap: pMap = (PixmapPtr) (*pDraw->pScreen->CreatePixmap) (pDraw->pScreen, stuff->width, stuff->height, stuff->depth, 0); if (pMap) { pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { (*pDraw->pScreen->DestroyPixmap) (pMap); return rc; } if (AddResource(stuff->pid, RT_PIXMAP, (void *) pMap)) return Success; } return BadAlloc; } int ProcFreePixmap(ClientPtr client) { PixmapPtr pMap; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pMap, stuff->id, RT_PIXMAP, client, DixDestroyAccess); if (rc == Success) { FreeResource(stuff->id, RT_NONE); return Success; } else { client->errorValue = stuff->id; return rc; } } int ProcCreateGC(ClientPtr client) { int error, rc; GC *pGC; DrawablePtr pDraw; unsigned len; REQUEST(xCreateGCReq); REQUEST_AT_LEAST_SIZE(xCreateGCReq); client->errorValue = stuff->gc; LEGAL_NEW_RESOURCE(stuff->gc, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixGetAttrAccess); if (rc != Success) return rc; len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); if (len != Ones(stuff->mask)) return BadLength; pGC = (GC *) CreateGC(pDraw, stuff->mask, (XID *) &stuff[1], &error, stuff->gc, client); if (error != Success) return error; if (!AddResource(stuff->gc, RT_GC, (void *) pGC)) return BadAlloc; return Success; } int ProcChangeGC(ClientPtr client) { GC *pGC; int result; unsigned len; REQUEST(xChangeGCReq); REQUEST_AT_LEAST_SIZE(xChangeGCReq); result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); if (len != Ones(stuff->mask)) return BadLength; return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]); } int ProcCopyGC(ClientPtr client) { GC *dstGC; GC *pGC; int result; REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); result = dixLookupGC(&pGC, stuff->srcGC, client, DixGetAttrAccess); if (result != Success) return result; result = dixLookupGC(&dstGC, stuff->dstGC, client, DixSetAttrAccess); if (result != Success) return result; if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) return BadMatch; if (stuff->mask & ~GCAllBits) { client->errorValue = stuff->mask; return BadValue; } return CopyGC(pGC, dstGC, stuff->mask); } int ProcSetDashes(ClientPtr client) { GC *pGC; int result; REQUEST(xSetDashesReq); REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); if (stuff->nDashes == 0) { client->errorValue = 0; return BadValue; } result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; /* If there's an error, either there's no sensible errorValue, * or there was a dash segment of 0. */ client->errorValue = 0; return SetDashes(pGC, stuff->dashOffset, stuff->nDashes, (unsigned char *) &stuff[1]); } int ProcSetClipRectangles(ClientPtr client) { int nr, result; GC *pGC; REQUEST(xSetClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) { client->errorValue = stuff->ordering; return BadValue; } result = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (result != Success) return result; nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); if (nr & 4) return BadLength; nr >>= 3; return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin, nr, (xRectangle *) &stuff[1], (int) stuff->ordering); } int ProcFreeGC(ClientPtr client) { GC *pGC; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->id, RT_NONE); return Success; } int ProcClearToBackground(ClientPtr client) { REQUEST(xClearAreaReq); WindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xClearAreaReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); if (rc != Success) return rc; if (pWin->drawable.class == InputOnly) { client->errorValue = stuff->window; return BadMatch; } if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) { client->errorValue = stuff->exposures; return BadValue; } (*pWin->drawable.pScreen->ClearToBackground) (pWin, stuff->x, stuff->y, stuff->width, stuff->height, (Bool) stuff->exposures); return Success; } /* send GraphicsExpose events, or a NoExpose event, based on the region */ void SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable, int major, int minor) { if (pRgn && !RegionNil(pRgn)) { xEvent *pEvent; xEvent *pe; BoxPtr pBox; int i; int numRects; numRects = RegionNumRects(pRgn); pBox = RegionRects(pRgn); if (!(pEvent = calloc(numRects, sizeof(xEvent)))) return; pe = pEvent; for (i = 1; i <= numRects; i++, pe++, pBox++) { pe->u.u.type = GraphicsExpose; pe->u.graphicsExposure.drawable = drawable; pe->u.graphicsExposure.x = pBox->x1; pe->u.graphicsExposure.y = pBox->y1; pe->u.graphicsExposure.width = pBox->x2 - pBox->x1; pe->u.graphicsExposure.height = pBox->y2 - pBox->y1; pe->u.graphicsExposure.count = numRects - i; pe->u.graphicsExposure.majorEvent = major; pe->u.graphicsExposure.minorEvent = minor; } /* GraphicsExpose is a "critical event", which TryClientEvents * handles specially. */ TryClientEvents(client, NULL, pEvent, numRects, (Mask) 0, NoEventMask, NullGrab); free(pEvent); } else { xEvent event = { .u.noExposure.drawable = drawable, .u.noExposure.majorEvent = major, .u.noExposure.minorEvent = minor }; event.u.u.type = NoExpose; WriteEventsToClient(client, 1, &event); } } int ProcCopyArea(ClientPtr client) { DrawablePtr pDst; DrawablePtr pSrc; GC *pGC; REQUEST(xCopyAreaReq); RegionPtr pRgn; int rc; REQUEST_SIZE_MATCH(xCopyAreaReq); VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, DixReadAccess); if (rc != Success) return rc; if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; return BadMatch; } } else pSrc = pDst; pRgn = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY); if (pGC->graphicsExposures) { SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0); if (pRgn) RegionDestroy(pRgn); } return Success; } int ProcCopyPlane(ClientPtr client) { DrawablePtr psrcDraw, pdstDraw; GC *pGC; REQUEST(xCopyPlaneReq); RegionPtr pRgn; int rc; REQUEST_SIZE_MATCH(xCopyPlaneReq); VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; return BadMatch; } } else psrcDraw = pdstDraw; /* Check to see if stuff->bitPlane has exactly ONE good bit set */ if (stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { client->errorValue = stuff->bitPlane; return BadValue; } pRgn = (*pGC->ops->CopyPlane) (psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY, stuff->bitPlane); if (pGC->graphicsExposures) { SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); if (pRgn) RegionDestroy(pRgn); } return Success; } int ProcPolyPoint(ClientPtr client) { int npoint; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyPointReq); REQUEST_AT_LEAST_SIZE(xPolyPointReq); if ((stuff->coordMode != CoordModeOrigin) && (stuff->coordMode != CoordModePrevious)) { client->errorValue = stuff->coordMode; return BadValue; } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); if (npoint) (*pGC->ops->PolyPoint) (pDraw, pGC, stuff->coordMode, npoint, (xPoint *) &stuff[1]); return Success; } int ProcPolyLine(ClientPtr client) { int npoint; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyLineReq); REQUEST_AT_LEAST_SIZE(xPolyLineReq); if ((stuff->coordMode != CoordModeOrigin) && (stuff->coordMode != CoordModePrevious)) { client->errorValue = stuff->coordMode; return BadValue; } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); if (npoint > 1) (*pGC->ops->Polylines) (pDraw, pGC, stuff->coordMode, npoint, (DDXPointPtr) &stuff[1]); return Success; } int ProcPolySegment(ClientPtr client) { int nsegs; GC *pGC; DrawablePtr pDraw; REQUEST(xPolySegmentReq); REQUEST_AT_LEAST_SIZE(xPolySegmentReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); if (nsegs & 4) return BadLength; nsegs >>= 3; if (nsegs) (*pGC->ops->PolySegment) (pDraw, pGC, nsegs, (xSegment *) &stuff[1]); return Success; } int ProcPolyRectangle(ClientPtr client) { int nrects; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); if (nrects & 4) return BadLength; nrects >>= 3; if (nrects) (*pGC->ops->PolyRectangle) (pDraw, pGC, nrects, (xRectangle *) &stuff[1]); return Success; } int ProcPolyArc(ClientPtr client) { int narcs; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyArcReq); REQUEST_AT_LEAST_SIZE(xPolyArcReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyArcReq); if (narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs) (*pGC->ops->PolyArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); return Success; } int ProcFillPoly(ClientPtr client) { int things; GC *pGC; DrawablePtr pDraw; REQUEST(xFillPolyReq); REQUEST_AT_LEAST_SIZE(xFillPolyReq); if ((stuff->shape != Complex) && (stuff->shape != Nonconvex) && (stuff->shape != Convex)) { client->errorValue = stuff->shape; return BadValue; } if ((stuff->coordMode != CoordModeOrigin) && (stuff->coordMode != CoordModePrevious)) { client->errorValue = stuff->coordMode; return BadValue; } VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); things = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); if (things) (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, stuff->coordMode, things, (DDXPointPtr) &stuff[1]); return Success; } int ProcPolyFillRectangle(ClientPtr client) { int things; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyFillRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); if (things & 4) return BadLength; things >>= 3; if (things) (*pGC->ops->PolyFillRect) (pDraw, pGC, things, (xRectangle *) &stuff[1]); return Success; } int ProcPolyFillArc(ClientPtr client) { int narcs; GC *pGC; DrawablePtr pDraw; REQUEST(xPolyFillArcReq); REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); if (narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs) (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); return Success; } #ifdef MATCH_CLIENT_ENDIAN int ServerOrder(void) { int whichbyte = 1; if (*((char *) &whichbyte)) return LSBFirst; return MSBFirst; } #define ClientOrder(client) ((client)->swapped ? !ServerOrder() : ServerOrder()) void ReformatImage(char *base, int nbytes, int bpp, int order) { switch (bpp) { case 1: /* yuck */ if (BITMAP_BIT_ORDER != order) BitOrderInvert((unsigned char *) base, nbytes); #if IMAGE_BYTE_ORDER != BITMAP_BIT_ORDER && BITMAP_SCANLINE_UNIT != 8 ReformatImage(base, nbytes, BITMAP_SCANLINE_UNIT, order); #endif break; case 4: break; /* yuck */ case 8: break; case 16: if (IMAGE_BYTE_ORDER != order) TwoByteSwap((unsigned char *) base, nbytes); break; case 32: if (IMAGE_BYTE_ORDER != order) FourByteSwap((unsigned char *) base, nbytes); break; } } #else #define ReformatImage(b,n,bpp,o) #endif /* 64-bit server notes: the protocol restricts padding of images to * 8-, 16-, or 32-bits. We would like to have 64-bits for the server * to use internally. Removes need for internal alignment checking. * All of the PutImage functions could be changed individually, but * as currently written, they call other routines which require things * to be 64-bit padded on scanlines, so we changed things here. * If an image would be padded differently for 64- versus 32-, then * copy each scanline to a 64-bit padded scanline. * Also, we need to make sure that the image is aligned on a 64-bit * boundary, even if the scanlines are padded to our satisfaction. */ int ProcPutImage(ClientPtr client) { GC *pGC; DrawablePtr pDraw; long length; /* length of scanline server padded */ long lengthProto; /* length of scanline protocol padded */ char *tmpImage; REQUEST(xPutImageReq); REQUEST_AT_LEAST_SIZE(xPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); if (stuff->format == XYBitmap) { if ((stuff->depth != 1) || (stuff->leftPad >= (unsigned int) screenInfo.bitmapScanlinePad)) return BadMatch; length = BitmapBytePad(stuff->width + stuff->leftPad); } else if (stuff->format == XYPixmap) { if ((pDraw->depth != stuff->depth) || (stuff->leftPad >= (unsigned int) screenInfo.bitmapScanlinePad)) return BadMatch; length = BitmapBytePad(stuff->width + stuff->leftPad); length *= stuff->depth; } else if (stuff->format == ZPixmap) { if ((pDraw->depth != stuff->depth) || (stuff->leftPad != 0)) return BadMatch; length = PixmapBytePad(stuff->width, stuff->depth); } else { client->errorValue = stuff->format; return BadValue; } tmpImage = (char *) &stuff[1]; lengthProto = length; if (stuff->height != 0 && lengthProto >= (INT32_MAX / stuff->height)) return BadLength; if ((bytes_to_int32(lengthProto * stuff->height) + bytes_to_int32(sizeof(xPutImageReq))) != client->req_len) return BadLength; ReformatImage(tmpImage, lengthProto * stuff->height, stuff->format == ZPixmap ? BitsPerPixel(stuff->depth) : 1, ClientOrder(client)); (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, stuff->width, stuff->height, stuff->leftPad, stuff->format, tmpImage); return Success; } static int DoGetImage(ClientPtr client, int format, Drawable drawable, int x, int y, int width, int height, Mask planemask) { DrawablePtr pDraw, pBoundingDraw; int nlines, linesPerBuf, rc; int linesDone; /* coordinates relative to the bounding drawable */ int relx, rely; long widthBytesLine, length; Mask plane = 0; char *pBuf; xGetImageReply xgi; RegionPtr pVisibleRegion = NULL; if ((format != XYPixmap) && (format != ZPixmap)) { client->errorValue = format; return BadValue; } rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess); if (rc != Success) return rc; memset(&xgi, 0, sizeof(xGetImageReply)); relx = x; rely = y; if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDraw; /* "If the drawable is a window, the window must be viewable ... or a * BadMatch error results" */ if (!pWin->viewable) return BadMatch; /* If the drawable is a window, the rectangle must be contained within * its bounds (including the border). */ if (x < -wBorderWidth(pWin) || x + width > wBorderWidth(pWin) + (int) pDraw->width || y < -wBorderWidth(pWin) || y + height > wBorderWidth(pWin) + (int) pDraw->height) return BadMatch; relx += pDraw->x; rely += pDraw->y; if (pDraw->pScreen->GetWindowPixmap) { PixmapPtr pPix = (*pDraw->pScreen->GetWindowPixmap) (pWin); pBoundingDraw = &pPix->drawable; #ifdef COMPOSITE relx -= pPix->screen_x; rely -= pPix->screen_y; #endif } else { pBoundingDraw = (DrawablePtr) pDraw->pScreen->root; } xgi.visual = wVisual(pWin); } else { pBoundingDraw = pDraw; xgi.visual = None; } /* "If the drawable is a pixmap, the given rectangle must be wholly * contained within the pixmap, or a BadMatch error results. If the * drawable is a window [...] it must be the case that if there were no * inferiors or overlapping windows, the specified rectangle of the window * would be fully visible on the screen and wholly contained within the * outside edges of the window, or a BadMatch error results." * * We relax the window case slightly to mean that the rectangle must exist * within the bounds of the window's backing pixmap. In particular, this * means that a GetImage request may succeed or fail with BadMatch depending * on whether any of its ancestor windows are redirected. */ if (relx < 0 || relx + width > (int) pBoundingDraw->width || rely < 0 || rely + height > (int) pBoundingDraw->height) return BadMatch; xgi.type = X_Reply; xgi.sequenceNumber = client->sequence; xgi.depth = pDraw->depth; if (format == ZPixmap) { widthBytesLine = PixmapBytePad(width, pDraw->depth); length = widthBytesLine * height; } else { widthBytesLine = BitmapBytePad(width); plane = ((Mask) 1) << (pDraw->depth - 1); /* only planes asked for */ length = widthBytesLine * height * Ones(planemask & (plane | (plane - 1))); } xgi.length = length; xgi.length = bytes_to_int32(xgi.length); if (widthBytesLine == 0 || height == 0) linesPerBuf = 0; else if (widthBytesLine >= IMAGE_BUFSIZE) linesPerBuf = 1; else { linesPerBuf = IMAGE_BUFSIZE / widthBytesLine; if (linesPerBuf > height) linesPerBuf = height; } length = linesPerBuf * widthBytesLine; if (linesPerBuf < height) { /* we have to make sure intermediate buffers don't need padding */ while ((linesPerBuf > 1) && (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1))) { linesPerBuf--; length -= widthBytesLine; } while (length & ((1L << LOG2_BYTES_PER_SCANLINE_PAD) - 1)) { linesPerBuf++; length += widthBytesLine; } } if (!(pBuf = calloc(1, length))) return BadAlloc; WriteReplyToClient(client, sizeof(xGetImageReply), &xgi); if (pDraw->type == DRAWABLE_WINDOW) { pVisibleRegion = &((WindowPtr) pDraw)->borderClip; pDraw->pScreen->SourceValidate(pDraw, x, y, width, height, IncludeInferiors); } if (linesPerBuf == 0) { /* nothing to do */ } else if (format == ZPixmap) { linesDone = 0; while (height - linesDone > 0) { nlines = min(linesPerBuf, height - linesDone); (*pDraw->pScreen->GetImage) (pDraw, x, y + linesDone, width, nlines, format, planemask, (void *) pBuf); if (pVisibleRegion) XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y + linesDone, width, nlines, format, pBuf); /* Note that this is NOT a call to WriteSwappedDataToClient, as we do NOT byte swap */ ReformatImage(pBuf, (int) (nlines * widthBytesLine), BitsPerPixel(pDraw->depth), ClientOrder(client)); WriteToClient(client, (int) (nlines * widthBytesLine), pBuf); linesDone += nlines; } } else { /* XYPixmap */ for (; plane; plane >>= 1) { if (planemask & plane) { linesDone = 0; while (height - linesDone > 0) { nlines = min(linesPerBuf, height - linesDone); (*pDraw->pScreen->GetImage) (pDraw, x, y + linesDone, width, nlines, format, plane, (void *) pBuf); if (pVisibleRegion) XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y + linesDone, width, nlines, format, pBuf); /* Note: NOT a call to WriteSwappedDataToClient, as we do NOT byte swap */ ReformatImage(pBuf, (int) (nlines * widthBytesLine), 1, ClientOrder(client)); WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); linesDone += nlines; } } } } free(pBuf); return Success; } int ProcGetImage(ClientPtr client) { REQUEST(xGetImageReq); REQUEST_SIZE_MATCH(xGetImageReq); return DoGetImage(client, stuff->format, stuff->drawable, stuff->x, stuff->y, (int) stuff->width, (int) stuff->height, stuff->planeMask); } int ProcPolyText(ClientPtr client) { int err; REQUEST(xPolyTextReq); DrawablePtr pDraw; GC *pGC; REQUEST_AT_LEAST_SIZE(xPolyTextReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = PolyText(client, pDraw, pGC, (unsigned char *) &stuff[1], ((unsigned char *) stuff) + (client->req_len << 2), stuff->x, stuff->y, stuff->reqType, stuff->drawable); if (err == Success) { return Success; } else return err; } int ProcImageText8(ClientPtr client) { int err; DrawablePtr pDraw; GC *pGC; REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = ImageText(client, pDraw, pGC, stuff->nChars, (unsigned char *) &stuff[1], stuff->x, stuff->y, stuff->reqType, stuff->drawable); if (err == Success) { return Success; } else return err; } int ProcImageText16(ClientPtr client) { int err; DrawablePtr pDraw; GC *pGC; REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); err = ImageText(client, pDraw, pGC, stuff->nChars, (unsigned char *) &stuff[1], stuff->x, stuff->y, stuff->reqType, stuff->drawable); if (err == Success) { return Success; } else return err; } int ProcCreateColormap(ClientPtr client) { VisualPtr pVisual; ColormapPtr pmap; Colormap mid; WindowPtr pWin; ScreenPtr pScreen; REQUEST(xCreateColormapReq); int i, result; REQUEST_SIZE_MATCH(xCreateColormapReq); if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll)) { client->errorValue = stuff->alloc; return BadValue; } mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); result = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (result != Success) return result; pScreen = pWin->drawable.pScreen; for (i = 0, pVisual = pScreen->visuals; i < pScreen->numVisuals; i++, pVisual++) { if (pVisual->vid != stuff->visual) continue; return CreateColormap(mid, pScreen, pVisual, &pmap, (int) stuff->alloc, client->index); } client->errorValue = stuff->visual; return BadMatch; } int ProcFreeColormap(ClientPtr client) { ColormapPtr pmap; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pmap, stuff->id, RT_COLORMAP, client, DixDestroyAccess); if (rc == Success) { /* Freeing a default colormap is a no-op */ if (!(pmap->flags & IsDefault)) FreeResource(stuff->id, RT_NONE); return Success; } else { client->errorValue = stuff->id; return rc; } } int ProcCopyColormapAndFree(ClientPtr client) { Colormap mid; ColormapPtr pSrcMap; REQUEST(xCopyColormapAndFreeReq); int rc; REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); rc = dixLookupResourceByType((void **) &pSrcMap, stuff->srcCmap, RT_COLORMAP, client, DixReadAccess | DixRemoveAccess); if (rc == Success) return CopyColormapAndFree(mid, pSrcMap, client->index); client->errorValue = stuff->srcCmap; return rc; } int ProcInstallColormap(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP, client, DixInstallAccess); if (rc != Success) goto out; rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); if (rc != Success) { if (rc == BadValue) rc = BadColor; goto out; } (*(pcmp->pScreen->InstallColormap)) (pcmp); return Success; out: client->errorValue = stuff->id; return rc; } int ProcUninstallColormap(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP, client, DixUninstallAccess); if (rc != Success) goto out; rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); if (rc != Success) { if (rc == BadValue) rc = BadColor; goto out; } if (pcmp->mid != pcmp->pScreen->defColormap) (*(pcmp->pScreen->UninstallColormap)) (pcmp); return Success; out: client->errorValue = stuff->id; return rc; } int ProcListInstalledColormaps(ClientPtr client) { xListInstalledColormapsReply *preply; int nummaps, rc; WindowPtr pWin; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, DixGetAttrAccess); if (rc != Success) return rc; preply = malloc(sizeof(xListInstalledColormapsReply) + pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); if (!preply) return BadAlloc; preply->type = X_Reply; preply->sequenceNumber = client->sequence; nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) (pWin->drawable.pScreen, (Colormap *) &preply[1]); preply->nColormaps = nummaps; preply->length = nummaps; WriteReplyToClient(client, sizeof(xListInstalledColormapsReply), preply); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); free(preply); return Success; } int ProcAllocColor(ClientPtr client) { ColormapPtr pmap; int rc; REQUEST(xAllocColorReq); REQUEST_SIZE_MATCH(xAllocColorReq); rc = dixLookupResourceByType((void **) &pmap, stuff->cmap, RT_COLORMAP, client, DixAddAccess); if (rc == Success) { xAllocColorReply acr = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .red = stuff->red, .green = stuff->green, .blue = stuff->blue, .pixel = 0 }; if ((rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, &acr.pixel, client->index))) return rc; #ifdef PANORAMIX if (noPanoramiXExtension || !pmap->pScreen->myNum) #endif WriteReplyToClient(client, sizeof(xAllocColorReply), &acr); return Success; } else { client->errorValue = stuff->cmap; return rc; } } int ProcAllocNamedColor(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xAllocNamedColorReq); REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixAddAccess); if (rc == Success) { xAllocNamedColorReply ancr = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; if (OsLookupColor (pcmp->pScreen->myNum, (char *) &stuff[1], stuff->nbytes, &ancr.exactRed, &ancr.exactGreen, &ancr.exactBlue)) { ancr.screenRed = ancr.exactRed; ancr.screenGreen = ancr.exactGreen; ancr.screenBlue = ancr.exactBlue; ancr.pixel = 0; if ((rc = AllocColor(pcmp, &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue, &ancr.pixel, client->index))) return rc; #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif WriteReplyToClient(client, sizeof(xAllocNamedColorReply), &ancr); return Success; } else return BadName; } else { client->errorValue = stuff->cmap; return rc; } } int ProcAllocColorCells(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xAllocColorCellsReq); REQUEST_SIZE_MATCH(xAllocColorCellsReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixAddAccess); if (rc == Success) { int npixels, nmasks; long length; Pixel *ppixels, *pmasks; npixels = stuff->colors; if (!npixels) { client->errorValue = npixels; return BadValue; } if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { client->errorValue = stuff->contiguous; return BadValue; } nmasks = stuff->planes; length = ((long) npixels + (long) nmasks) * sizeof(Pixel); ppixels = malloc(length); if (!ppixels) return BadAlloc; pmasks = ppixels + npixels; if ((rc = AllocColorCells(client->index, pcmp, npixels, nmasks, (Bool) stuff->contiguous, ppixels, pmasks))) { free(ppixels); return rc; } #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif { xAllocColorCellsReply accr = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(length), .nPixels = npixels, .nMasks = nmasks }; WriteReplyToClient(client, sizeof(xAllocColorCellsReply), &accr); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, length, ppixels); } free(ppixels); return Success; } else { client->errorValue = stuff->cmap; return rc; } } int ProcAllocColorPlanes(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xAllocColorPlanesReq); REQUEST_SIZE_MATCH(xAllocColorPlanesReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixAddAccess); if (rc == Success) { xAllocColorPlanesReply acpr; int npixels; long length; Pixel *ppixels; npixels = stuff->colors; if (!npixels) { client->errorValue = npixels; return BadValue; } if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { client->errorValue = stuff->contiguous; return BadValue; } acpr = (xAllocColorPlanesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .nPixels = npixels }; length = (long) npixels *sizeof(Pixel); ppixels = malloc(length); if (!ppixels) return BadAlloc; if ((rc = AllocColorPlanes(client->index, pcmp, npixels, (int) stuff->red, (int) stuff->green, (int) stuff->blue, (Bool) stuff->contiguous, ppixels, &acpr.redMask, &acpr.greenMask, &acpr.blueMask))) { free(ppixels); return rc; } acpr.length = bytes_to_int32(length); #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif { WriteReplyToClient(client, sizeof(xAllocColorPlanesReply), &acpr); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, length, ppixels); } free(ppixels); return Success; } else { client->errorValue = stuff->cmap; return rc; } } int ProcFreeColors(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xFreeColorsReq); REQUEST_AT_LEAST_SIZE(xFreeColorsReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixRemoveAccess); if (rc == Success) { int count; if (pcmp->flags & AllAllocated) return BadAccess; count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq)); return FreeColors(pcmp, client->index, count, (Pixel *) &stuff[1], (Pixel) stuff->planeMask); } else { client->errorValue = stuff->cmap; return rc; } } int ProcStoreColors(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xStoreColorsReq); REQUEST_AT_LEAST_SIZE(xStoreColorsReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixWriteAccess); if (rc == Success) { int count; count = (client->req_len << 2) - sizeof(xStoreColorsReq); if (count % sizeof(xColorItem)) return BadLength; count /= sizeof(xColorItem); return StoreColors(pcmp, count, (xColorItem *) &stuff[1], client); } else { client->errorValue = stuff->cmap; return rc; } } int ProcStoreNamedColor(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xStoreNamedColorReq); REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixWriteAccess); if (rc == Success) { xColorItem def; if (OsLookupColor(pcmp->pScreen->myNum, (char *) &stuff[1], stuff->nbytes, &def.red, &def.green, &def.blue)) { def.flags = stuff->flags; def.pixel = stuff->pixel; return StoreColors(pcmp, 1, &def, client); } return BadName; } else { client->errorValue = stuff->cmap; return rc; } } int ProcQueryColors(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xQueryColorsReq); REQUEST_AT_LEAST_SIZE(xQueryColorsReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixReadAccess); if (rc == Success) { int count; xrgb *prgbs; xQueryColorsReply qcr; count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq)); prgbs = calloc(count, sizeof(xrgb)); if (!prgbs && count) return BadAlloc; if ((rc = QueryColors(pcmp, count, (Pixel *) &stuff[1], prgbs, client))) { free(prgbs); return rc; } qcr = (xQueryColorsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(count * sizeof(xrgb)), .nColors = count }; WriteReplyToClient(client, sizeof(xQueryColorsReply), &qcr); if (count) { client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend; WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs); } free(prgbs); return Success; } else { client->errorValue = stuff->cmap; return rc; } } int ProcLookupColor(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xLookupColorReq); REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, RT_COLORMAP, client, DixReadAccess); if (rc == Success) { CARD16 exactRed, exactGreen, exactBlue; if (OsLookupColor (pcmp->pScreen->myNum, (char *) &stuff[1], stuff->nbytes, &exactRed, &exactGreen, &exactBlue)) { xLookupColorReply lcr = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .exactRed = exactRed, .exactGreen = exactGreen, .exactBlue = exactBlue, .screenRed = exactRed, .screenGreen = exactGreen, .screenBlue = exactBlue }; (*pcmp->pScreen->ResolveColor) (&lcr.screenRed, &lcr.screenGreen, &lcr.screenBlue, pcmp->pVisual); WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr); return Success; } return BadName; } else { client->errorValue = stuff->cmap; return rc; } } int ProcCreateCursor(ClientPtr client) { CursorPtr pCursor; PixmapPtr src; PixmapPtr msk; unsigned char *srcbits; unsigned char *mskbits; unsigned short width, height; long n; CursorMetricRec cm; int rc; REQUEST(xCreateCursorReq); REQUEST_SIZE_MATCH(xCreateCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); rc = dixLookupResourceByType((void **) &src, stuff->source, RT_PIXMAP, client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->source; return rc; } if (src->drawable.depth != 1) return (BadMatch); /* Find and validate cursor mask pixmap, if one is provided */ if (stuff->mask != None) { rc = dixLookupResourceByType((void **) &msk, stuff->mask, RT_PIXMAP, client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->mask; return rc; } if (src->drawable.width != msk->drawable.width || src->drawable.height != msk->drawable.height || src->drawable.depth != 1 || msk->drawable.depth != 1) return BadMatch; } else msk = NULL; width = src->drawable.width; height = src->drawable.height; if (stuff->x > width || stuff->y > height) return BadMatch; srcbits = calloc(BitmapBytePad(width), height); if (!srcbits) return BadAlloc; n = BitmapBytePad(width) * height; mskbits = malloc(n); if (!mskbits) { free(srcbits); return BadAlloc; } (*src->drawable.pScreen->GetImage) ((DrawablePtr) src, 0, 0, width, height, XYPixmap, 1, (void *) srcbits); if (msk == (PixmapPtr) NULL) { unsigned char *bits = mskbits; while (--n >= 0) *bits++ = ~0; } else { /* zeroing the (pad) bits helps some ddx cursor handling */ memset((char *) mskbits, 0, n); (*msk->drawable.pScreen->GetImage) ((DrawablePtr) msk, 0, 0, width, height, XYPixmap, 1, (void *) mskbits); } cm.width = width; cm.height = height; cm.xhot = stuff->x; cm.yhot = stuff->y; rc = AllocARGBCursor(srcbits, mskbits, NULL, &cm, stuff->foreRed, stuff->foreGreen, stuff->foreBlue, stuff->backRed, stuff->backGreen, stuff->backBlue, &pCursor, client, stuff->cid); if (rc != Success) goto bail; if (!AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) { rc = BadAlloc; goto bail; } return Success; bail: free(srcbits); free(mskbits); return rc; } int ProcCreateGlyphCursor(ClientPtr client) { CursorPtr pCursor; int res; REQUEST(xCreateGlyphCursorReq); REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); res = AllocGlyphCursor(stuff->source, stuff->sourceChar, stuff->mask, stuff->maskChar, stuff->foreRed, stuff->foreGreen, stuff->foreBlue, stuff->backRed, stuff->backGreen, stuff->backBlue, &pCursor, client, stuff->cid); if (res != Success) return res; if (AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) return Success; return BadAlloc; } int ProcFreeCursor(ClientPtr client) { CursorPtr pCursor; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupResourceByType((void **) &pCursor, stuff->id, RT_CURSOR, client, DixDestroyAccess); if (rc == Success) { if (pCursor == rootCursor) { client->errorValue = stuff->id; return BadCursor; } FreeResource(stuff->id, RT_NONE); return Success; } else { client->errorValue = stuff->id; return rc; } } int ProcQueryBestSize(ClientPtr client) { xQueryBestSizeReply reply; DrawablePtr pDraw; ScreenPtr pScreen; int rc; REQUEST(xQueryBestSizeReq); REQUEST_SIZE_MATCH(xQueryBestSizeReq); if ((stuff->class != CursorShape) && (stuff->class != TileShape) && (stuff->class != StippleShape)) { client->errorValue = stuff->class; return BadValue; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) return BadMatch; pScreen = pDraw->pScreen; rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); if (rc != Success) return rc; (*pScreen->QueryBestSize) (stuff->class, &stuff->width, &stuff->height, pScreen); reply = (xQueryBestSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .width = stuff->width, .height = stuff->height }; WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply); return Success; } int ProcSetScreenSaver(ClientPtr client) { int rc, i, blankingOption, exposureOption; REQUEST(xSetScreenSaverReq); REQUEST_SIZE_MATCH(xSetScreenSaverReq); for (i = 0; i < screenInfo.numScreens; i++) { rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], DixSetAttrAccess); if (rc != Success) return rc; } blankingOption = stuff->preferBlank; if ((blankingOption != DontPreferBlanking) && (blankingOption != PreferBlanking) && (blankingOption != DefaultBlanking)) { client->errorValue = blankingOption; return BadValue; } exposureOption = stuff->allowExpose; if ((exposureOption != DontAllowExposures) && (exposureOption != AllowExposures) && (exposureOption != DefaultExposures)) { client->errorValue = exposureOption; return BadValue; } if (stuff->timeout < -1) { client->errorValue = stuff->timeout; return BadValue; } if (stuff->interval < -1) { client->errorValue = stuff->interval; return BadValue; } if (blankingOption == DefaultBlanking) ScreenSaverBlanking = defaultScreenSaverBlanking; else ScreenSaverBlanking = blankingOption; if (exposureOption == DefaultExposures) ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; else ScreenSaverAllowExposures = exposureOption; if (stuff->timeout >= 0) ScreenSaverTime = stuff->timeout * MILLI_PER_SECOND; else ScreenSaverTime = defaultScreenSaverTime; if (stuff->interval >= 0) ScreenSaverInterval = stuff->interval * MILLI_PER_SECOND; else ScreenSaverInterval = defaultScreenSaverInterval; SetScreenSaverTimer(); return Success; } int ProcGetScreenSaver(ClientPtr client) { xGetScreenSaverReply rep; int rc, i; REQUEST_SIZE_MATCH(xReq); for (i = 0; i < screenInfo.numScreens; i++) { rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], DixGetAttrAccess); if (rc != Success) return rc; } rep = (xGetScreenSaverReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .timeout = ScreenSaverTime / MILLI_PER_SECOND, .interval = ScreenSaverInterval / MILLI_PER_SECOND, .preferBlanking = ScreenSaverBlanking, .allowExposures = ScreenSaverAllowExposures }; WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep); return Success; } int ProcChangeHosts(ClientPtr client) { REQUEST(xChangeHostsReq); REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength); if (stuff->mode == HostInsert) return AddHost(client, (int) stuff->hostFamily, stuff->hostLength, (void *) &stuff[1]); if (stuff->mode == HostDelete) return RemoveHost(client, (int) stuff->hostFamily, stuff->hostLength, (void *) &stuff[1]); client->errorValue = stuff->mode; return BadValue; } int ProcListHosts(ClientPtr client) { xListHostsReply reply; int len, nHosts, result; BOOL enabled; void *pdata; /* REQUEST(xListHostsReq); */ REQUEST_SIZE_MATCH(xListHostsReq); /* untrusted clients can't list hosts */ result = XaceHook(XACE_SERVER_ACCESS, client, DixReadAccess); if (result != Success) return result; result = GetHosts(&pdata, &nHosts, &len, &enabled); if (result != Success) return result; reply = (xListHostsReply) { .type = X_Reply, .enabled = enabled, .sequenceNumber = client->sequence, .length = bytes_to_int32(len), .nHosts = nHosts }; WriteReplyToClient(client, sizeof(xListHostsReply), &reply); if (nHosts) { client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend; WriteSwappedDataToClient(client, len, pdata); } free(pdata); return Success; } int ProcChangeAccessControl(ClientPtr client) { REQUEST(xSetAccessControlReq); REQUEST_SIZE_MATCH(xSetAccessControlReq); if ((stuff->mode != EnableAccess) && (stuff->mode != DisableAccess)) { client->errorValue = stuff->mode; return BadValue; } return ChangeAccessControl(client, stuff->mode == EnableAccess); } /********************* * CloseDownRetainedResources * * Find all clients that are gone and have terminated in RetainTemporary * and destroy their resources. *********************/ static void CloseDownRetainedResources(void) { int i; ClientPtr client; for (i = 1; i < currentMaxClients; i++) { client = clients[i]; if (client && (client->closeDownMode == RetainTemporary) && (client->clientGone)) CloseDownClient(client); } } int ProcKillClient(ClientPtr client) { REQUEST(xResourceReq); ClientPtr killclient; int rc; REQUEST_SIZE_MATCH(xResourceReq); if (stuff->id == AllTemporary) { CloseDownRetainedResources(); return Success; } rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); if (rc == Success) { CloseDownClient(killclient); if (client == killclient) { /* force yield and return Success, so that Dispatch() * doesn't try to touch client */ isItTimeToYield = TRUE; } return Success; } else return rc; } int ProcSetFontPath(ClientPtr client) { unsigned char *ptr; unsigned long nbytes, total; long nfonts; int n; REQUEST(xSetFontPathReq); REQUEST_AT_LEAST_SIZE(xSetFontPathReq); nbytes = (client->req_len << 2) - sizeof(xSetFontPathReq); total = nbytes; ptr = (unsigned char *) &stuff[1]; nfonts = stuff->nFonts; while (--nfonts >= 0) { if ((total == 0) || (total < (n = (*ptr + 1)))) return BadLength; total -= n; ptr += n; } if (total >= 4) return BadLength; return SetFontPath(client, stuff->nFonts, (unsigned char *) &stuff[1]); } int ProcGetFontPath(ClientPtr client) { xGetFontPathReply reply; int rc, stringLens, numpaths; unsigned char *bufferStart; /* REQUEST (xReq); */ REQUEST_SIZE_MATCH(xReq); rc = GetFontPath(client, &numpaths, &stringLens, &bufferStart); if (rc != Success) return rc; reply = (xGetFontPathReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(stringLens + numpaths), .nPaths = numpaths }; WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); if (stringLens || numpaths) WriteToClient(client, stringLens + numpaths, bufferStart); return Success; } int ProcChangeCloseDownMode(ClientPtr client) { int rc; REQUEST(xSetCloseDownModeReq); REQUEST_SIZE_MATCH(xSetCloseDownModeReq); rc = XaceHook(XACE_CLIENT_ACCESS, client, client, DixManageAccess); if (rc != Success) return rc; if ((stuff->mode == AllTemporary) || (stuff->mode == RetainPermanent) || (stuff->mode == RetainTemporary)) { client->closeDownMode = stuff->mode; return Success; } else { client->errorValue = stuff->mode; return BadValue; } } int ProcForceScreenSaver(ClientPtr client) { int rc; REQUEST(xForceScreenSaverReq); REQUEST_SIZE_MATCH(xForceScreenSaverReq); if ((stuff->mode != ScreenSaverReset) && (stuff->mode != ScreenSaverActive)) { client->errorValue = stuff->mode; return BadValue; } rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int) stuff->mode); if (rc != Success) return rc; return Success; } int ProcNoOperation(ClientPtr client) { REQUEST_AT_LEAST_SIZE(xReq); /* noop -- don't do anything */ return Success; } /********************** * CloseDownClient * * Client can either mark his resources destroy or retain. If retained and * then killed again, the client is really destroyed. *********************/ char dispatchExceptionAtReset = DE_RESET; int terminateDelay = 0; void CloseDownClient(ClientPtr client) { Bool really_close_down = client->clientGone || client->closeDownMode == DestroyAll; if (!client->clientGone) { /* ungrab server if grabbing client dies */ if (grabState != GrabNone && grabClient == client) { UngrabServer(client); } BITCLEAR(grabWaiters, client->index); DeleteClientFromAnySelections(client); ReleaseActiveGrabs(client); DeleteClientFontStuff(client); if (!really_close_down) { /* This frees resources that should never be retained * no matter what the close down mode is. Actually we * could do this unconditionally, but it's probably * better not to traverse all the client's resources * twice (once here, once a few lines down in * FreeClientResources) in the common case of * really_close_down == TRUE. */ FreeClientNeverRetainResources(client); client->clientState = ClientStateRetained; if (ClientStateCallback) { NewClientInfoRec clientinfo; clientinfo.client = client; clientinfo.prefix = (xConnSetupPrefix *) NULL; clientinfo.setup = (xConnSetup *) NULL; CallCallbacks((&ClientStateCallback), (void *) &clientinfo); } } client->clientGone = TRUE; /* so events aren't sent to client */ if (ClientIsAsleep(client)) ClientSignal(client); ProcessWorkQueueZombies(); CloseDownConnection(client); output_pending_clear(client); mark_client_not_ready(client); /* If the client made it to the Running stage, nClients has * been incremented on its behalf, so we need to decrement it * now. If it hasn't gotten to Running, nClients has *not* * been incremented, so *don't* decrement it. */ if (client->clientState != ClientStateInitial) { --nClients; } } if (really_close_down) { if (client->clientState == ClientStateRunning && nClients == 0) SetDispatchExceptionTimer(); client->clientState = ClientStateGone; if (ClientStateCallback) { NewClientInfoRec clientinfo; clientinfo.client = client; clientinfo.prefix = (xConnSetupPrefix *) NULL; clientinfo.setup = (xConnSetup *) NULL; CallCallbacks((&ClientStateCallback), (void *) &clientinfo); } TouchListenerGone(client->clientAsMask); GestureListenerGone(client->clientAsMask); FreeClientResources(client); /* Disable client ID tracking. This must be done after * ClientStateCallback. */ ReleaseClientIds(client); #ifdef XSERVER_DTRACE XSERVER_CLIENT_DISCONNECT(client->index); #endif if (client->index < nextFreeClientID) nextFreeClientID = client->index; clients[client->index] = NullClient; SmartLastClient = NullClient; dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); while (!clients[currentMaxClients - 1]) currentMaxClients--; } if (ShouldDisconnectRemainingClients()) SetDispatchExceptionTimer(); } static void KillAllClients(void) { int i; for (i = 1; i < currentMaxClients; i++) if (clients[i]) { /* Make sure Retained clients are released. */ clients[i]->closeDownMode = DestroyAll; CloseDownClient(clients[i]); } } void InitClient(ClientPtr client, int i, void *ospriv) { client->index = i; xorg_list_init(&client->ready); xorg_list_init(&client->output_pending); client->clientAsMask = ((Mask) i) << CLIENTOFFSET; client->closeDownMode = i ? DestroyAll : RetainPermanent; client->requestVector = InitialVector; client->osPrivate = ospriv; QueryMinMaxKeyCodes(&client->minKC, &client->maxKC); client->smart_start_tick = SmartScheduleTime; client->smart_stop_tick = SmartScheduleTime; client->clientIds = NULL; } /************************ * int NextAvailableClient(ospriv) * * OS dependent portion can't assign client id's because of CloseDownModes. * Returns NULL if there are no free clients. *************************/ ClientPtr NextAvailableClient(void *ospriv) { int i; ClientPtr client; xReq data; i = nextFreeClientID; if (i == LimitClients) return (ClientPtr) NULL; clients[i] = client = dixAllocateObjectWithPrivates(ClientRec, PRIVATE_CLIENT); if (!client) return (ClientPtr) NULL; InitClient(client, i, ospriv); if (!InitClientResources(client)) { dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); return (ClientPtr) NULL; } data.reqType = 1; data.length = bytes_to_int32(sz_xReq + sz_xConnClientPrefix); if (!InsertFakeRequest(client, (char *) &data, sz_xReq)) { FreeClientResources(client); dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); return (ClientPtr) NULL; } if (i == currentMaxClients) currentMaxClients++; while ((nextFreeClientID < LimitClients) && clients[nextFreeClientID]) nextFreeClientID++; /* Enable client ID tracking. This must be done before * ClientStateCallback. */ ReserveClientIds(client); if (ClientStateCallback) { NewClientInfoRec clientinfo; clientinfo.client = client; clientinfo.prefix = (xConnSetupPrefix *) NULL; clientinfo.setup = (xConnSetup *) NULL; CallCallbacks((&ClientStateCallback), (void *) &clientinfo); } return client; } int ProcInitialConnection(ClientPtr client) { REQUEST(xReq); xConnClientPrefix *prefix; int whichbyte = 1; char order; prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq); order = prefix->byteOrder; if (order != 'l' && order != 'B' && order != 'r' && order != 'R') return client->noClientException = -1; if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { client->swapped = TRUE; SwapConnClientPrefix(prefix); } stuff->reqType = 2; stuff->length += bytes_to_int32(prefix->nbytesAuthProto) + bytes_to_int32(prefix->nbytesAuthString); if (client->swapped) { swaps(&stuff->length); } if (order == 'r' || order == 'R') { client->local = FALSE; } ResetCurrentRequest(client); return Success; } static int SendConnSetup(ClientPtr client, const char *reason) { xWindowRoot *root; int i; int numScreens; char *lConnectionInfo; xConnSetupPrefix *lconnSetupPrefix; if (reason) { xConnSetupPrefix csp; csp.success = xFalse; csp.lengthReason = strlen(reason); csp.length = bytes_to_int32(csp.lengthReason); csp.majorVersion = X_PROTOCOL; csp.minorVersion = X_PROTOCOL_REVISION; if (client->swapped) WriteSConnSetupPrefix(client, &csp); else WriteToClient(client, sz_xConnSetupPrefix, &csp); WriteToClient(client, (int) csp.lengthReason, reason); return client->noClientException = -1; } numScreens = screenInfo.numScreens; lConnectionInfo = ConnectionInfo; lconnSetupPrefix = &connSetupPrefix; /* We're about to start speaking X protocol back to the client by * sending the connection setup info. This means the authorization * step is complete, and we can count the client as an * authorized one. */ nClients++; client->requestVector = client->swapped ? SwappedProcVector : ProcVector; client->sequence = 0; ((xConnSetup *) lConnectionInfo)->ridBase = client->clientAsMask; ((xConnSetup *) lConnectionInfo)->ridMask = RESOURCE_ID_MASK; #ifdef MATCH_CLIENT_ENDIAN ((xConnSetup *) lConnectionInfo)->imageByteOrder = ClientOrder(client); ((xConnSetup *) lConnectionInfo)->bitmapBitOrder = ClientOrder(client); #endif /* fill in the "currentInputMask" */ root = (xWindowRoot *) (lConnectionInfo + connBlockScreenStart); #ifdef PANORAMIX if (noPanoramiXExtension) numScreens = screenInfo.numScreens; else numScreens = ((xConnSetup *) ConnectionInfo)->numRoots; #endif for (i = 0; i < numScreens; i++) { unsigned int j; xDepth *pDepth; WindowPtr pRoot = screenInfo.screens[i]->root; root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot); pDepth = (xDepth *) (root + 1); for (j = 0; j < root->nDepths; j++) { pDepth = (xDepth *) (((char *) (pDepth + 1)) + pDepth->nVisuals * sizeof(xVisualType)); } root = (xWindowRoot *) pDepth; } if (client->swapped) { WriteSConnSetupPrefix(client, lconnSetupPrefix); WriteSConnectionInfo(client, (unsigned long) (lconnSetupPrefix->length << 2), lConnectionInfo); } else { WriteToClient(client, sizeof(xConnSetupPrefix), lconnSetupPrefix); WriteToClient(client, (int) (lconnSetupPrefix->length << 2), lConnectionInfo); } client->clientState = ClientStateRunning; if (ClientStateCallback) { NewClientInfoRec clientinfo; clientinfo.client = client; clientinfo.prefix = lconnSetupPrefix; clientinfo.setup = (xConnSetup *) lConnectionInfo; CallCallbacks((&ClientStateCallback), (void *) &clientinfo); } CancelDispatchExceptionTimer(); return Success; } int ProcEstablishConnection(ClientPtr client) { const char *reason; char *auth_proto, *auth_string; xConnClientPrefix *prefix; REQUEST(xReq); prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq); auth_proto = (char *) prefix + sz_xConnClientPrefix; auth_string = auth_proto + pad_to_int32(prefix->nbytesAuthProto); if (client->swapped && !AllowByteSwappedClients) { reason = "Prohibited client endianess, see the Xserver man page "; } else if ((client->req_len << 2) != sz_xReq + sz_xConnClientPrefix + pad_to_int32(prefix->nbytesAuthProto) + pad_to_int32(prefix->nbytesAuthString)) reason = "Bad length"; else if ((prefix->majorVersion != X_PROTOCOL) || (prefix->minorVersion != X_PROTOCOL_REVISION)) reason = "Protocol version mismatch"; else reason = ClientAuthorized(client, (unsigned short) prefix->nbytesAuthProto, auth_proto, (unsigned short) prefix->nbytesAuthString, auth_string); return (SendConnSetup(client, reason)); } void SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, XID resId, int errorCode) { xError rep = { .type = X_Error, .errorCode = errorCode, .resourceID = resId, .minorCode = minorCode, .majorCode = majorCode }; WriteEventsToClient(client, 1, (xEvent *) &rep); } void MarkClientException(ClientPtr client) { client->noClientException = -1; } /* * This array encodes the answer to the question "what is the log base 2 * of the number of pixels that fit in a scanline pad unit?" * Note that ~0 is an invalid entry (mostly for the benefit of the reader). */ static int answer[6][4] = { /* pad pad pad pad */ /* 8 16 32 64 */ {3, 4, 5, 6}, /* 1 bit per pixel */ {1, 2, 3, 4}, /* 4 bits per pixel */ {0, 1, 2, 3}, /* 8 bits per pixel */ {~0, 0, 1, 2}, /* 16 bits per pixel */ {~0, ~0, 0, 1}, /* 24 bits per pixel */ {~0, ~0, 0, 1} /* 32 bits per pixel */ }; /* * This array gives the answer to the question "what is the first index for * the answer array above given the number of bits per pixel?" * Note that ~0 is an invalid entry (mostly for the benefit of the reader). */ static int indexForBitsPerPixel[33] = { ~0, 0, ~0, ~0, /* 1 bit per pixel */ 1, ~0, ~0, ~0, /* 4 bits per pixel */ 2, ~0, ~0, ~0, /* 8 bits per pixel */ ~0, ~0, ~0, ~0, 3, ~0, ~0, ~0, /* 16 bits per pixel */ ~0, ~0, ~0, ~0, 4, ~0, ~0, ~0, /* 24 bits per pixel */ ~0, ~0, ~0, ~0, 5 /* 32 bits per pixel */ }; /* * This array gives the bytesperPixel value for cases where the number * of bits per pixel is a multiple of 8 but not a power of 2. */ static int answerBytesPerPixel[33] = { ~0, 0, ~0, ~0, /* 1 bit per pixel */ 0, ~0, ~0, ~0, /* 4 bits per pixel */ 0, ~0, ~0, ~0, /* 8 bits per pixel */ ~0, ~0, ~0, ~0, 0, ~0, ~0, ~0, /* 16 bits per pixel */ ~0, ~0, ~0, ~0, 3, ~0, ~0, ~0, /* 24 bits per pixel */ ~0, ~0, ~0, ~0, 0 /* 32 bits per pixel */ }; /* * This array gives the answer to the question "what is the second index for * the answer array above given the number of bits per scanline pad unit?" * Note that ~0 is an invalid entry (mostly for the benefit of the reader). */ static int indexForScanlinePad[65] = { ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 0, ~0, ~0, ~0, /* 8 bits per scanline pad unit */ ~0, ~0, ~0, ~0, 1, ~0, ~0, ~0, /* 16 bits per scanline pad unit */ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 2, ~0, ~0, ~0, /* 32 bits per scanline pad unit */ ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, ~0, 3 /* 64 bits per scanline pad unit */ }; /* grow the array of screenRecs if necessary. call the device-supplied initialization procedure with its screen number, a pointer to its ScreenRec, argc, and argv. return the number of successfully installed screens. */ static int init_screen(ScreenPtr pScreen, int i, Bool gpu) { int scanlinepad, format, depth, bitsPerPixel, j, k; dixInitScreenSpecificPrivates(pScreen); if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) { return -1; } pScreen->myNum = i; if (gpu) { pScreen->myNum += GPU_SCREEN_OFFSET; pScreen->isGPU = TRUE; } pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */ pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; xorg_list_init(&pScreen->pixmap_dirty_list); xorg_list_init(&pScreen->secondary_list); /* * This loop gets run once for every Screen that gets added, * but that's ok. If the ddx layer initializes the formats * one at a time calling AddScreen() after each, then each * iteration will make it a little more accurate. Worst case * we do this loop N * numPixmapFormats where N is # of screens. * Anyway, this must be called after InitOutput and before the * screen init routine is called. */ for (format = 0; format < screenInfo.numPixmapFormats; format++) { depth = screenInfo.formats[format].depth; bitsPerPixel = screenInfo.formats[format].bitsPerPixel; scanlinepad = screenInfo.formats[format].scanlinePad; j = indexForBitsPerPixel[bitsPerPixel]; k = indexForScanlinePad[scanlinepad]; PixmapWidthPaddingInfo[depth].padPixelsLog2 = answer[j][k]; PixmapWidthPaddingInfo[depth].padRoundUp = (scanlinepad / bitsPerPixel) - 1; j = indexForBitsPerPixel[8]; /* bits per byte */ PixmapWidthPaddingInfo[depth].padBytesLog2 = answer[j][k]; PixmapWidthPaddingInfo[depth].bitsPerPixel = bitsPerPixel; if (answerBytesPerPixel[bitsPerPixel]) { PixmapWidthPaddingInfo[depth].notPower2 = 1; PixmapWidthPaddingInfo[depth].bytesPerPixel = answerBytesPerPixel[bitsPerPixel]; } else { PixmapWidthPaddingInfo[depth].notPower2 = 0; } } return 0; } int AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , int /*argc */ , char ** /*argv */ ), int argc, char **argv) { int i; ScreenPtr pScreen; Bool ret; i = screenInfo.numScreens; if (i == MAXSCREENS) return -1; pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec)); if (!pScreen) return -1; ret = init_screen(pScreen, i, FALSE); if (ret != 0) { free(pScreen); return ret; } /* This is where screen specific stuff gets initialized. Load the screen structure, call the hardware, whatever. This is also where the default colormap should be allocated and also pixel values for blackPixel, whitePixel, and the cursor Note that InitScreen is NOT allowed to modify argc, argv, or any of the strings pointed to by argv. They may be passed to multiple screens. */ screenInfo.screens[i] = pScreen; screenInfo.numScreens++; if (!(*pfnInit) (pScreen, argc, argv)) { dixFreeScreenSpecificPrivates(pScreen); dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); free(pScreen); screenInfo.numScreens--; return -1; } update_desktop_dimensions(); dixRegisterScreenPrivateKey(&cursorScreenDevPriv, pScreen, PRIVATE_CURSOR, 0); return i; } int AddGPUScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , int /*argc */ , char ** /*argv */ ), int argc, char **argv) { int i; ScreenPtr pScreen; Bool ret; i = screenInfo.numGPUScreens; if (i == MAXGPUSCREENS) return -1; pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec)); if (!pScreen) return -1; ret = init_screen(pScreen, i, TRUE); if (ret != 0) { free(pScreen); return ret; } /* This is where screen specific stuff gets initialized. Load the screen structure, call the hardware, whatever. This is also where the default colormap should be allocated and also pixel values for blackPixel, whitePixel, and the cursor Note that InitScreen is NOT allowed to modify argc, argv, or any of the strings pointed to by argv. They may be passed to multiple screens. */ screenInfo.gpuscreens[i] = pScreen; screenInfo.numGPUScreens++; if (!(*pfnInit) (pScreen, argc, argv)) { dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); free(pScreen); screenInfo.numGPUScreens--; return -1; } update_desktop_dimensions(); /* * We cannot register the Screen PRIVATE_CURSOR key if cursors are already * created, because dix/privates.c does not have relocation code for * PRIVATE_CURSOR. Once this is fixed the if() can be removed and we can * register the Screen PRIVATE_CURSOR key unconditionally. */ if (!dixPrivatesCreated(PRIVATE_CURSOR)) dixRegisterScreenPrivateKey(&cursorScreenDevPriv, pScreen, PRIVATE_CURSOR, 0); return i; } void RemoveGPUScreen(ScreenPtr pScreen) { int idx, j; if (!pScreen->isGPU) return; idx = pScreen->myNum - GPU_SCREEN_OFFSET; for (j = idx; j < screenInfo.numGPUScreens - 1; j++) { screenInfo.gpuscreens[j] = screenInfo.gpuscreens[j + 1]; screenInfo.gpuscreens[j]->myNum = j + GPU_SCREEN_OFFSET; } screenInfo.numGPUScreens--; /* this gets freed later in the resource list, but without * the screen existing it causes crashes - so remove it here */ if (pScreen->defColormap) FreeResource(pScreen->defColormap, RT_COLORMAP); free(pScreen); } void AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr new) { assert(new->isGPU); assert(!new->current_primary); xorg_list_add(&new->secondary_head, &pScreen->secondary_list); new->current_primary = pScreen; } void DetachUnboundGPU(ScreenPtr secondary) { assert(secondary->isGPU); assert(!secondary->is_output_secondary); assert(!secondary->is_offload_secondary); xorg_list_del(&secondary->secondary_head); secondary->current_primary = NULL; } void AttachOutputGPU(ScreenPtr pScreen, ScreenPtr new) { assert(new->isGPU); assert(!new->is_output_secondary); assert(new->current_primary == pScreen); new->is_output_secondary = TRUE; new->current_primary->output_secondarys++; } void DetachOutputGPU(ScreenPtr secondary) { assert(secondary->isGPU); assert(secondary->is_output_secondary); secondary->current_primary->output_secondarys--; secondary->is_output_secondary = FALSE; } void AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr new) { assert(new->isGPU); assert(!new->is_offload_secondary); assert(new->current_primary == pScreen); new->is_offload_secondary = TRUE; } void DetachOffloadGPU(ScreenPtr secondary) { assert(secondary->isGPU); assert(secondary->is_offload_secondary); secondary->is_offload_secondary = FALSE; } xorg-server-21.1.16/dix/dispatch.h0000644000175000017500000001467714757411105012406 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ /* * This prototypes the dispatch.c module (except for functions declared in * global headers), plus related dispatch procedures from devices.c, events.c, * extension.c, property.c. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef DISPATCH_H #define DISPATCH_H 1 int ProcAllocColor(ClientPtr /* client */ ); int ProcAllocColorCells(ClientPtr /* client */ ); int ProcAllocColorPlanes(ClientPtr /* client */ ); int ProcAllocNamedColor(ClientPtr /* client */ ); int ProcBell(ClientPtr /* client */ ); int ProcChangeAccessControl(ClientPtr /* client */ ); int ProcChangeCloseDownMode(ClientPtr /* client */ ); int ProcChangeGC(ClientPtr /* client */ ); int ProcChangeHosts(ClientPtr /* client */ ); int ProcChangeKeyboardControl(ClientPtr /* client */ ); int ProcChangeKeyboardMapping(ClientPtr /* client */ ); int ProcChangePointerControl(ClientPtr /* client */ ); int ProcChangeProperty(ClientPtr /* client */ ); int ProcChangeSaveSet(ClientPtr /* client */ ); int ProcChangeWindowAttributes(ClientPtr /* client */ ); int ProcCirculateWindow(ClientPtr /* client */ ); int ProcClearToBackground(ClientPtr /* client */ ); int ProcCloseFont(ClientPtr /* client */ ); int ProcConfigureWindow(ClientPtr /* client */ ); int ProcConvertSelection(ClientPtr /* client */ ); int ProcCopyArea(ClientPtr /* client */ ); int ProcCopyColormapAndFree(ClientPtr /* client */ ); int ProcCopyGC(ClientPtr /* client */ ); int ProcCopyPlane(ClientPtr /* client */ ); int ProcCreateColormap(ClientPtr /* client */ ); int ProcCreateCursor(ClientPtr /* client */ ); int ProcCreateGC(ClientPtr /* client */ ); int ProcCreateGlyphCursor(ClientPtr /* client */ ); int ProcCreatePixmap(ClientPtr /* client */ ); int ProcCreateWindow(ClientPtr /* client */ ); int ProcDeleteProperty(ClientPtr /* client */ ); int ProcDestroySubwindows(ClientPtr /* client */ ); int ProcDestroyWindow(ClientPtr /* client */ ); int ProcEstablishConnection(ClientPtr /* client */ ); int ProcFillPoly(ClientPtr /* client */ ); int ProcForceScreenSaver(ClientPtr /* client */ ); int ProcFreeColormap(ClientPtr /* client */ ); int ProcFreeColors(ClientPtr /* client */ ); int ProcFreeCursor(ClientPtr /* client */ ); int ProcFreeGC(ClientPtr /* client */ ); int ProcFreePixmap(ClientPtr /* client */ ); int ProcGetAtomName(ClientPtr /* client */ ); int ProcGetFontPath(ClientPtr /* client */ ); int ProcGetGeometry(ClientPtr /* client */ ); int ProcGetImage(ClientPtr /* client */ ); int ProcGetKeyboardControl(ClientPtr /* client */ ); int ProcGetKeyboardMapping(ClientPtr /* client */ ); int ProcGetModifierMapping(ClientPtr /* client */ ); int ProcGetMotionEvents(ClientPtr /* client */ ); int ProcGetPointerControl(ClientPtr /* client */ ); int ProcGetPointerMapping(ClientPtr /* client */ ); int ProcGetProperty(ClientPtr /* client */ ); int ProcGetScreenSaver(ClientPtr /* client */ ); int ProcGetSelectionOwner(ClientPtr /* client */ ); int ProcGetWindowAttributes(ClientPtr /* client */ ); int ProcGrabServer(ClientPtr /* client */ ); int ProcImageText16(ClientPtr /* client */ ); int ProcImageText8(ClientPtr /* client */ ); int ProcInitialConnection(ClientPtr /* client */ ); int ProcInstallColormap(ClientPtr /* client */ ); int ProcInternAtom(ClientPtr /* client */ ); int ProcKillClient(ClientPtr /* client */ ); int ProcListExtensions(ClientPtr /* client */ ); int ProcListFonts(ClientPtr /* client */ ); int ProcListFontsWithInfo(ClientPtr /* client */ ); int ProcListHosts(ClientPtr /* client */ ); int ProcListInstalledColormaps(ClientPtr /* client */ ); int ProcListProperties(ClientPtr /* client */ ); int ProcLookupColor(ClientPtr /* client */ ); int ProcMapSubwindows(ClientPtr /* client */ ); int ProcMapWindow(ClientPtr /* client */ ); int ProcNoOperation(ClientPtr /* client */ ); int ProcOpenFont(ClientPtr /* client */ ); int ProcPolyArc(ClientPtr /* client */ ); int ProcPolyFillArc(ClientPtr /* client */ ); int ProcPolyFillRectangle(ClientPtr /* client */ ); int ProcPolyLine(ClientPtr /* client */ ); int ProcPolyPoint(ClientPtr /* client */ ); int ProcPolyRectangle(ClientPtr /* client */ ); int ProcPolySegment(ClientPtr /* client */ ); int ProcPolyText(ClientPtr /* client */ ); int ProcPutImage(ClientPtr /* client */ ); int ProcQueryBestSize(ClientPtr /* client */ ); int ProcQueryColors(ClientPtr /* client */ ); int ProcQueryExtension(ClientPtr /* client */ ); int ProcQueryFont(ClientPtr /* client */ ); int ProcQueryKeymap(ClientPtr /* client */ ); int ProcQueryTextExtents(ClientPtr /* client */ ); int ProcQueryTree(ClientPtr /* client */ ); int ProcReparentWindow(ClientPtr /* client */ ); int ProcRotateProperties(ClientPtr /* client */ ); int ProcSetClipRectangles(ClientPtr /* client */ ); int ProcSetDashes(ClientPtr /* client */ ); int ProcSetFontPath(ClientPtr /* client */ ); int ProcSetModifierMapping(ClientPtr /* client */ ); int ProcSetPointerMapping(ClientPtr /* client */ ); int ProcSetScreenSaver(ClientPtr /* client */ ); int ProcSetSelectionOwner(ClientPtr /* client */ ); int ProcStoreColors(ClientPtr /* client */ ); int ProcStoreNamedColor(ClientPtr /* client */ ); int ProcTranslateCoords(ClientPtr /* client */ ); int ProcUngrabServer(ClientPtr /* client */ ); int ProcUninstallColormap(ClientPtr /* client */ ); int ProcUnmapSubwindows(ClientPtr /* client */ ); int ProcUnmapWindow(ClientPtr /* client */ ); #endif /* DISPATCH_H */ xorg-server-21.1.16/dix/dixfonts.c0000644000175000017500000017713114757411105012433 /************************************************************************ 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. ************************************************************************/ /* The panoramix components contained the following notice */ /* 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" #include "cursorstr.h" #include "misc.h" #include "opaque.h" #include "dixfontstr.h" #include "closestr.h" #include "dixfont.h" #include "xace.h" #include #ifdef XF86BIGFONT #include "xf86bigfontsrv.h" #endif extern void *fosNaturalParams; extern FontPtr defaultFont; static FontPathElementPtr *font_path_elements = (FontPathElementPtr *) 0; static int num_fpes = 0; static xfont2_fpe_funcs_rec const **fpe_functions; static int num_fpe_types = 0; static unsigned char *font_path_string; static int num_slept_fpes = 0; static int size_slept_fpes = 0; static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0; static xfont2_pattern_cache_ptr patternCache; static int FontToXError(int err) { switch (err) { case Successful: return Success; case AllocError: return BadAlloc; case BadFontName: return BadName; case BadFontPath: case BadFontFormat: /* is there something better? */ case BadCharRange: return BadValue; default: return err; } } static int LoadGlyphs(ClientPtr client, FontPtr pfont, unsigned nchars, int item_size, unsigned char *data) { if (fpe_functions[pfont->fpe->type]->load_glyphs) return (*fpe_functions[pfont->fpe->type]->load_glyphs) (client, pfont, 0, nchars, item_size, data); else return Successful; } void GetGlyphs(FontPtr font, unsigned long count, unsigned char *chars, FontEncoding fontEncoding, unsigned long *glyphcount, /* RETURN */ CharInfoPtr *glyphs) /* RETURN */ { (*font->get_glyphs) (font, count, chars, fontEncoding, glyphcount, glyphs); } /* * adding RT_FONT prevents conflict with default cursor font */ Bool SetDefaultFont(const char *defaultfontname) { int err; FontPtr pf; XID fid; fid = FakeClientID(0); err = OpenFont(serverClient, fid, FontLoadAll | FontOpenSync, (unsigned) strlen(defaultfontname), defaultfontname); if (err != Success) return FALSE; err = dixLookupResourceByType((void **) &pf, fid, RT_FONT, serverClient, DixReadAccess); if (err != Success) return FALSE; defaultFont = pf; return TRUE; } /* * note that the font wakeup queue is not refcounted. this is because * an fpe needs to be added when it's inited, and removed when it's finally * freed, in order to handle any data that isn't requested, like FS events. * * since the only thing that should call these routines is the renderer's * init_fpe() and free_fpe(), there shouldn't be any problem in using * freed data. */ static void QueueFontWakeup(FontPathElementPtr fpe) { int i; FontPathElementPtr *new; for (i = 0; i < num_slept_fpes; i++) { if (slept_fpes[i] == fpe) { return; } } if (num_slept_fpes == size_slept_fpes) { new = reallocarray(slept_fpes, size_slept_fpes + 4, sizeof(FontPathElementPtr)); if (!new) return; slept_fpes = new; size_slept_fpes += 4; } slept_fpes[num_slept_fpes] = fpe; num_slept_fpes++; } static void RemoveFontWakeup(FontPathElementPtr fpe) { int i, j; for (i = 0; i < num_slept_fpes; i++) { if (slept_fpes[i] == fpe) { for (j = i; j < num_slept_fpes; j++) { slept_fpes[j] = slept_fpes[j + 1]; } num_slept_fpes--; return; } } } static void FontWakeup(void *data, int count) { int i; FontPathElementPtr fpe; if (count < 0) return; /* wake up any fpe's that may be waiting for information */ for (i = 0; i < num_slept_fpes; i++) { fpe = slept_fpes[i]; (void) (*fpe_functions[fpe->type]->wakeup_fpe) (fpe); } } /* XXX -- these two funcs may want to be broken into macros */ static void UseFPE(FontPathElementPtr fpe) { fpe->refcount++; } static void FreeFPE(FontPathElementPtr fpe) { fpe->refcount--; if (fpe->refcount == 0) { (*fpe_functions[fpe->type]->free_fpe) (fpe); free((void *) fpe->name); free(fpe); } } static Bool doOpenFont(ClientPtr client, OFclosurePtr c) { FontPtr pfont = NullFont; FontPathElementPtr fpe = NULL; ScreenPtr pScr; int err = Successful; int i; char *alias, *newname; int newlen; int aliascount = 20; /* * Decide at runtime what FontFormat to use. */ Mask FontFormat = ((screenInfo.imageByteOrder == LSBFirst) ? BitmapFormatByteOrderLSB : BitmapFormatByteOrderMSB) | ((screenInfo.bitmapBitOrder == LSBFirst) ? BitmapFormatBitOrderLSB : BitmapFormatBitOrderMSB) | BitmapFormatImageRectMin | #if GLYPHPADBYTES == 1 BitmapFormatScanlinePad8 | #endif #if GLYPHPADBYTES == 2 BitmapFormatScanlinePad16 | #endif #if GLYPHPADBYTES == 4 BitmapFormatScanlinePad32 | #endif #if GLYPHPADBYTES == 8 BitmapFormatScanlinePad64 | #endif BitmapFormatScanlineUnit8; if (client->clientGone) { if (c->current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current_fpe]; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); } err = Successful; goto bail; } while (c->current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current_fpe]; err = (*fpe_functions[fpe->type]->open_font) ((void *) client, fpe, c->flags, c->fontname, c->fnamelen, FontFormat, BitmapFormatMaskByte | BitmapFormatMaskBit | BitmapFormatMaskImageRectangle | BitmapFormatMaskScanLinePad | BitmapFormatMaskScanLineUnit, c->fontid, &pfont, &alias, c->non_cachable_font && c->non_cachable_font->fpe == fpe ? c->non_cachable_font : (FontPtr) 0); if (err == FontNameAlias && alias) { newlen = strlen(alias); newname = (char *) realloc((char *) c->fontname, newlen); if (!newname) { err = AllocError; break; } memmove(newname, alias, newlen); c->fontname = newname; c->fnamelen = newlen; c->current_fpe = 0; if (--aliascount <= 0) { /* We've tried resolving this alias 20 times, we're * probably stuck in an infinite loop of aliases pointing * to each other - time to take emergency exit! */ err = BadImplementation; break; } continue; } if (err == BadFontName) { c->current_fpe++; continue; } if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doOpenFont, c); return TRUE; } break; } if (err != Successful) goto bail; if (!pfont) { err = BadFontName; goto bail; } /* check values for firstCol, lastCol, firstRow, and lastRow */ if (pfont->info.firstCol > pfont->info.lastCol || pfont->info.firstRow > pfont->info.lastRow || pfont->info.lastCol - pfont->info.firstCol > 255) { err = AllocError; goto bail; } if (!pfont->fpe) pfont->fpe = fpe; pfont->refcnt++; if (pfont->refcnt == 1) { UseFPE(pfont->fpe); for (i = 0; i < screenInfo.numScreens; i++) { pScr = screenInfo.screens[i]; if (pScr->RealizeFont) { if (!(*pScr->RealizeFont) (pScr, pfont)) { CloseFont(pfont, (Font) 0); err = AllocError; goto bail; } } } } if (!AddResource(c->fontid, RT_FONT, (void *) pfont)) { err = AllocError; goto bail; } if (patternCache && pfont != c->non_cachable_font) xfont2_cache_font_pattern(patternCache, c->origFontName, c->origFontNameLen, pfont); bail: if (err != Successful && c->client != serverClient) { SendErrorToClient(c->client, X_OpenFont, 0, c->fontid, FontToXError(err)); } ClientWakeup(c->client); for (i = 0; i < c->num_fpes; i++) { FreeFPE(c->fpe_list[i]); } free(c->fpe_list); free((void *) c->fontname); free(c); return TRUE; } int OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, const char *pfontname) { OFclosurePtr c; int i; FontPtr cached = (FontPtr) 0; if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) return BadName; if (patternCache) { /* ** Check name cache. If we find a cached version of this font that ** is cachable, immediately satisfy the request with it. If we find ** a cached version of this font that is non-cachable, we do not ** satisfy the request with it. Instead, we pass the FontPtr to the ** FPE's open_font code (the fontfile FPE in turn passes the ** information to the rasterizer; the fserve FPE ignores it). ** ** Presumably, the font is marked non-cachable because the FPE has ** put some licensing restrictions on it. If the FPE, using ** whatever logic it relies on, determines that it is willing to ** share this existing font with the client, then it has the option ** to return the FontPtr we passed it as the newly-opened font. ** This allows the FPE to exercise its licensing logic without ** having to create another instance of a font that already exists. */ cached = xfont2_find_cached_font_pattern(patternCache, pfontname, lenfname); if (cached && cached->info.cachable) { if (!AddResource(fid, RT_FONT, (void *) cached)) return BadAlloc; cached->refcnt++; return Success; } } c = malloc(sizeof(OFclosureRec)); if (!c) return BadAlloc; c->fontname = malloc(lenfname); c->origFontName = pfontname; c->origFontNameLen = lenfname; if (!c->fontname) { free(c); return BadAlloc; } /* * copy the current FPE list, so that if it gets changed by another client * while we're blocking, the request still appears atomic */ c->fpe_list = xallocarray(num_fpes, sizeof(FontPathElementPtr)); if (!c->fpe_list) { free((void *) c->fontname); free(c); return BadAlloc; } memmove(c->fontname, pfontname, lenfname); for (i = 0; i < num_fpes; i++) { c->fpe_list[i] = font_path_elements[i]; UseFPE(c->fpe_list[i]); } c->client = client; c->fontid = fid; c->current_fpe = 0; c->num_fpes = num_fpes; c->fnamelen = lenfname; c->flags = flags; c->non_cachable_font = cached; (void) doOpenFont(client, c); return Success; } /** * Decrement font's ref count, and free storage if ref count equals zero * * \param value must conform to DeleteType */ int CloseFont(void *value, XID fid) { int nscr; ScreenPtr pscr; FontPathElementPtr fpe; FontPtr pfont = (FontPtr) value; if (pfont == NullFont) return Success; if (--pfont->refcnt == 0) { if (patternCache) xfont2_remove_cached_font_pattern(patternCache, pfont); /* * since the last reference is gone, ask each screen to free any * storage it may have allocated locally for it. */ for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; if (pscr->UnrealizeFont) (*pscr->UnrealizeFont) (pscr, pfont); } if (pfont == defaultFont) defaultFont = NULL; #ifdef XF86BIGFONT XF86BigfontFreeFontShm(pfont); #endif fpe = pfont->fpe; (*fpe_functions[fpe->type]->close_font) (fpe, pfont); FreeFPE(fpe); } return Success; } /***====================================================================***/ /** * Sets up pReply as the correct QueryFontReply for pFont with the first * nProtoCCIStructs char infos. * * \param pReply caller must allocate this storage */ void QueryFont(FontPtr pFont, xQueryFontReply * pReply, int nProtoCCIStructs) { FontPropPtr pFP; int r, c, i; xFontProp *prFP; xCharInfo *prCI; xCharInfo *charInfos[256]; unsigned char chars[512]; int ninfos; unsigned long ncols; unsigned long count; /* pr->length set in dispatch */ pReply->minCharOrByte2 = pFont->info.firstCol; pReply->defaultChar = pFont->info.defaultCh; pReply->maxCharOrByte2 = pFont->info.lastCol; pReply->drawDirection = pFont->info.drawDirection; pReply->allCharsExist = pFont->info.allExist; pReply->minByte1 = pFont->info.firstRow; pReply->maxByte1 = pFont->info.lastRow; pReply->fontAscent = pFont->info.fontAscent; pReply->fontDescent = pFont->info.fontDescent; pReply->minBounds = pFont->info.ink_minbounds; pReply->maxBounds = pFont->info.ink_maxbounds; pReply->nFontProps = pFont->info.nprops; pReply->nCharInfos = nProtoCCIStructs; for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) (&pReply[1]); i < pFont->info.nprops; i++, pFP++, prFP++) { prFP->name = pFP->name; prFP->value = pFP->value; } ninfos = 0; ncols = (unsigned long) (pFont->info.lastCol - pFont->info.firstCol + 1); prCI = (xCharInfo *) (prFP); for (r = pFont->info.firstRow; ninfos < nProtoCCIStructs && r <= (int) pFont->info.lastRow; r++) { i = 0; for (c = pFont->info.firstCol; c <= (int) pFont->info.lastCol; c++) { chars[i++] = r; chars[i++] = c; } (*pFont->get_metrics) (pFont, ncols, chars, TwoD16Bit, &count, charInfos); i = 0; for (i = 0; i < (int) count && ninfos < nProtoCCIStructs; i++) { *prCI = *charInfos[i]; prCI++; ninfos++; } } return; } static Bool doListFontsAndAliases(ClientPtr client, LFclosurePtr c) { FontPathElementPtr fpe; int err = Successful; FontNamesPtr names = NULL; char *name, *resolved = NULL; int namelen, resolvedlen; int nnames; int stringLens; int i; xListFontsReply reply; char *bufptr; char *bufferStart; int aliascount = 0; if (client->clientGone) { if (c->current.current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current.current_fpe]; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); } err = Successful; goto bail; } if (!c->current.patlen) goto finish; while (c->current.current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current.current_fpe]; err = Successful; if (!fpe_functions[fpe->type]->start_list_fonts_and_aliases) { /* This FPE doesn't support/require list_fonts_and_aliases */ err = (*fpe_functions[fpe->type]->list_fonts) ((void *) c->client, fpe, c->current.pattern, c->current.patlen, c->current.max_names - c->names->nnames, c->names); if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doListFontsAndAliases, c); return TRUE; } err = BadFontName; } else { /* Start of list_fonts_and_aliases functionality. Modeled after list_fonts_with_info in that it resolves aliases, except that the information collected from FPEs is just names, not font info. Each list_next_font_or_alias() returns either a name into name/namelen or an alias into name/namelen and its target name into resolved/resolvedlen. The code at this level then resolves the alias by polling the FPEs. */ if (!c->current.list_started) { err = (*fpe_functions[fpe->type]->start_list_fonts_and_aliases) ((void *) c->client, fpe, c->current.pattern, c->current.patlen, c->current.max_names - c->names->nnames, &c->current.private); if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doListFontsAndAliases, c); return TRUE; } if (err == Successful) c->current.list_started = TRUE; } if (err == Successful) { char *tmpname; name = 0; err = (*fpe_functions[fpe->type]->list_next_font_or_alias) ((void *) c->client, fpe, &name, &namelen, &tmpname, &resolvedlen, c->current.private); if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doListFontsAndAliases, c); return TRUE; } if (err == FontNameAlias) { free(resolved); resolved = malloc(resolvedlen + 1); if (resolved) memmove(resolved, tmpname, resolvedlen + 1); } } if (err == Successful) { if (c->haveSaved) { if (c->savedName) (void) xfont2_add_font_names_name(c->names, c->savedName, c->savedNameLen); } else (void) xfont2_add_font_names_name(c->names, name, namelen); } /* * When we get an alias back, save our state and reset back to * the start of the FPE looking for the specified name. As * soon as a real font is found for the alias, pop back to the * old state */ else if (err == FontNameAlias) { char tmp_pattern[XLFDMAXFONTNAMELEN]; /* * when an alias recurses, we need to give * the last FPE a chance to clean up; so we call * it again, and assume that the error returned * is BadFontName, indicating the alias resolution * is complete. */ memmove(tmp_pattern, resolved, resolvedlen); if (c->haveSaved) { char *tmpname; int tmpnamelen; tmpname = 0; (void) (*fpe_functions[fpe->type]->list_next_font_or_alias) ((void *) c->client, fpe, &tmpname, &tmpnamelen, &tmpname, &tmpnamelen, c->current.private); if (--aliascount <= 0) { err = BadFontName; goto ContBadFontName; } } else { c->saved = c->current; c->haveSaved = TRUE; free(c->savedName); c->savedName = malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); c->savedNameLen = namelen; aliascount = 20; } memmove(c->current.pattern, tmp_pattern, resolvedlen); c->current.patlen = resolvedlen; c->current.max_names = c->names->nnames + 1; c->current.current_fpe = -1; c->current.private = 0; err = BadFontName; } } /* * At the end of this FPE, step to the next. If we've finished * processing an alias, pop state back. If we've collected enough * font names, quit. */ if (err == BadFontName) { ContBadFontName:; c->current.list_started = FALSE; c->current.current_fpe++; err = Successful; if (c->haveSaved) { if (c->names->nnames == c->current.max_names || c->current.current_fpe == c->num_fpes) { c->haveSaved = FALSE; c->current = c->saved; /* Give the saved namelist a chance to clean itself up */ continue; } } if (c->names->nnames == c->current.max_names) break; } } /* * send the reply */ if (err != Successful) { SendErrorToClient(client, X_ListFonts, 0, 0, FontToXError(err)); goto bail; } finish: names = c->names; nnames = names->nnames; client = c->client; stringLens = 0; for (i = 0; i < nnames; i++) stringLens += (names->length[i] <= 255) ? names->length[i] : 0; reply = (xListFontsReply) { .type = X_Reply, .length = bytes_to_int32(stringLens + nnames), .nFonts = nnames, .sequenceNumber = client->sequence }; bufptr = bufferStart = malloc(reply.length << 2); if (!bufptr && reply.length) { SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); goto bail; } /* * since WriteToClient long word aligns things, copy to temp buffer and * write all at once */ for (i = 0; i < nnames; i++) { if (names->length[i] > 255) reply.nFonts--; else { *bufptr++ = names->length[i]; memmove(bufptr, names->names[i], names->length[i]); bufptr += names->length[i]; } } nnames = reply.nFonts; reply.length = bytes_to_int32(stringLens + nnames); client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); WriteToClient(client, stringLens + nnames, bufferStart); free(bufferStart); bail: ClientWakeup(client); for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); free(c->fpe_list); free(c->savedName); xfont2_free_font_names(names); free(c); free(resolved); return TRUE; } int ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, unsigned max_names) { int i; LFclosurePtr c; /* * The right error to return here would be BadName, however the * specification does not allow for a Name error on this request. * Perhaps a better solution would be to return a nil list, i.e. * a list containing zero fontnames. */ if (length > XLFDMAXFONTNAMELEN) return BadAlloc; i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); if (i != Success) return i; if (!(c = malloc(sizeof *c))) return BadAlloc; c->fpe_list = xallocarray(num_fpes, sizeof(FontPathElementPtr)); if (!c->fpe_list) { free(c); return BadAlloc; } c->names = xfont2_make_font_names_record(max_names < 100 ? max_names : 100); if (!c->names) { free(c->fpe_list); free(c); return BadAlloc; } memmove(c->current.pattern, pattern, length); for (i = 0; i < num_fpes; i++) { c->fpe_list[i] = font_path_elements[i]; UseFPE(c->fpe_list[i]); } c->client = client; c->num_fpes = num_fpes; c->current.patlen = length; c->current.current_fpe = 0; c->current.max_names = max_names; c->current.list_started = FALSE; c->current.private = 0; c->haveSaved = FALSE; c->savedName = 0; doListFontsAndAliases(client, c); return Success; } static int doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) { FontPathElementPtr fpe; int err = Successful; char *name; int namelen; int numFonts; FontInfoRec fontInfo, *pFontInfo; xListFontsWithInfoReply *reply; int length; xFontProp *pFP; int i; int aliascount = 0; xListFontsWithInfoReply finalReply; if (client->clientGone) { if (c->current.current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current.current_fpe]; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); } err = Successful; goto bail; } client->pSwapReplyFunc = ReplySwapVector[X_ListFontsWithInfo]; if (!c->current.patlen) goto finish; while (c->current.current_fpe < c->num_fpes) { fpe = c->fpe_list[c->current.current_fpe]; err = Successful; if (!c->current.list_started) { err = (*fpe_functions[fpe->type]->start_list_fonts_with_info) (client, fpe, c->current.pattern, c->current.patlen, c->current.max_names, &c->current.private); if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doListFontsWithInfo, c); return TRUE; } if (err == Successful) c->current.list_started = TRUE; } if (err == Successful) { name = 0; pFontInfo = &fontInfo; err = (*fpe_functions[fpe->type]->list_next_font_with_info) (client, fpe, &name, &namelen, &pFontInfo, &numFonts, c->current.private); if (err == Suspended) { if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr) doListFontsWithInfo, c); return TRUE; } } /* * When we get an alias back, save our state and reset back to the * start of the FPE looking for the specified name. As soon as a real * font is found for the alias, pop back to the old state */ if (err == FontNameAlias) { /* * when an alias recurses, we need to give * the last FPE a chance to clean up; so we call * it again, and assume that the error returned * is BadFontName, indicating the alias resolution * is complete. */ if (c->haveSaved) { char *tmpname; int tmpnamelen; FontInfoPtr tmpFontInfo; tmpname = 0; tmpFontInfo = &fontInfo; (void) (*fpe_functions[fpe->type]->list_next_font_with_info) (client, fpe, &tmpname, &tmpnamelen, &tmpFontInfo, &numFonts, c->current.private); if (--aliascount <= 0) { err = BadFontName; goto ContBadFontName; } } else { c->saved = c->current; c->haveSaved = TRUE; c->savedNumFonts = numFonts; free(c->savedName); c->savedName = malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); aliascount = 20; } memmove(c->current.pattern, name, namelen); c->current.patlen = namelen; c->current.max_names = 1; c->current.current_fpe = 0; c->current.private = 0; c->current.list_started = FALSE; } /* * At the end of this FPE, step to the next. If we've finished * processing an alias, pop state back. If we've sent enough font * names, quit. Always wait for BadFontName to let the FPE * have a chance to clean up. */ else if (err == BadFontName) { ContBadFontName:; c->current.list_started = FALSE; c->current.current_fpe++; err = Successful; if (c->haveSaved) { if (c->current.max_names == 0 || c->current.current_fpe == c->num_fpes) { c->haveSaved = FALSE; c->saved.max_names -= (1 - c->current.max_names); c->current = c->saved; } } else if (c->current.max_names == 0) break; } else if (err == Successful) { length = sizeof(*reply) + pFontInfo->nprops * sizeof(xFontProp); reply = c->reply; if (c->length < length) { reply = (xListFontsWithInfoReply *) realloc(c->reply, length); if (!reply) { err = AllocError; break; } memset((char *) reply + c->length, 0, length - c->length); c->reply = reply; c->length = length; } if (c->haveSaved) { numFonts = c->savedNumFonts; name = c->savedName; namelen = strlen(name); } reply->type = X_Reply; reply->length = bytes_to_int32(sizeof *reply - sizeof(xGenericReply) + pFontInfo->nprops * sizeof(xFontProp) + namelen); reply->sequenceNumber = client->sequence; reply->nameLength = namelen; reply->minBounds = pFontInfo->ink_minbounds; reply->maxBounds = pFontInfo->ink_maxbounds; reply->minCharOrByte2 = pFontInfo->firstCol; reply->maxCharOrByte2 = pFontInfo->lastCol; reply->defaultChar = pFontInfo->defaultCh; reply->nFontProps = pFontInfo->nprops; reply->drawDirection = pFontInfo->drawDirection; reply->minByte1 = pFontInfo->firstRow; reply->maxByte1 = pFontInfo->lastRow; reply->allCharsExist = pFontInfo->allExist; reply->fontAscent = pFontInfo->fontAscent; reply->fontDescent = pFontInfo->fontDescent; reply->nReplies = numFonts; pFP = (xFontProp *) (reply + 1); for (i = 0; i < pFontInfo->nprops; i++) { pFP->name = pFontInfo->props[i].name; pFP->value = pFontInfo->props[i].value; pFP++; } WriteSwappedDataToClient(client, length, reply); WriteToClient(client, namelen, name); if (pFontInfo == &fontInfo) { free(fontInfo.props); free(fontInfo.isStringProp); } --c->current.max_names; } } finish: length = sizeof(xListFontsWithInfoReply); finalReply = (xListFontsWithInfoReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(sizeof(xListFontsWithInfoReply) - sizeof(xGenericReply)) }; WriteSwappedDataToClient(client, length, &finalReply); bail: ClientWakeup(client); for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); free(c->reply); free(c->fpe_list); free(c->savedName); free(c); return TRUE; } int StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, int max_names) { int i; LFWIclosurePtr c; /* * The right error to return here would be BadName, however the * specification does not allow for a Name error on this request. * Perhaps a better solution would be to return a nil list, i.e. * a list containing zero fontnames. */ if (length > XLFDMAXFONTNAMELEN) return BadAlloc; i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); if (i != Success) return i; if (!(c = malloc(sizeof *c))) goto badAlloc; c->fpe_list = xallocarray(num_fpes, sizeof(FontPathElementPtr)); if (!c->fpe_list) { free(c); goto badAlloc; } memmove(c->current.pattern, pattern, length); for (i = 0; i < num_fpes; i++) { c->fpe_list[i] = font_path_elements[i]; UseFPE(c->fpe_list[i]); } c->client = client; c->num_fpes = num_fpes; c->reply = 0; c->length = 0; c->current.patlen = length; c->current.current_fpe = 0; c->current.max_names = max_names; c->current.list_started = FALSE; c->current.private = 0; c->savedNumFonts = 0; c->haveSaved = FALSE; c->savedName = 0; doListFontsWithInfo(client, c); return Success; badAlloc: return BadAlloc; } #define TextEltHeader 2 #define FontShiftSize 5 static ChangeGCVal clearGC[] = { {.ptr = NullPixmap} }; #define clearGCmask (GCClipMask) static int doPolyText(ClientPtr client, PTclosurePtr c) { FontPtr pFont = c->pGC->font, oldpFont; int err = Success, lgerr; /* err is in X error, not font error, space */ enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT; FontPathElementPtr fpe; GC *origGC = NULL; int itemSize = c->reqType == X_PolyText8 ? 1 : 2; if (client->clientGone) { fpe = c->pGC->font->fpe; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); if (ClientIsAsleep(client)) { /* Client has died, but we cannot bail out right now. We need to clean up after the work we did when going to sleep. Setting the drawable pointer to 0 makes this happen without any attempts to render or perform other unnecessary activities. */ c->pDraw = (DrawablePtr) 0; } else { err = Success; goto bail; } } /* Make sure our drawable hasn't disappeared while we slept. */ if (ClientIsAsleep(client) && c->pDraw) { DrawablePtr pDraw; dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); if (c->pDraw != pDraw) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client and avoid further rendering while we clean up after ourself. */ fpe = c->pGC->font->fpe; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); c->pDraw = (DrawablePtr) 0; } } client_state = ClientIsAsleep(client) ? SLEEPING : NEVER_SLEPT; while (c->endReq - c->pElt > TextEltHeader) { if (*c->pElt == FontChange) { Font fid; if (c->endReq - c->pElt < FontShiftSize) { err = BadLength; goto bail; } oldpFont = pFont; fid = ((Font) *(c->pElt + 4)) /* big-endian */ |((Font) *(c->pElt + 3)) << 8 | ((Font) *(c->pElt + 2)) << 16 | ((Font) *(c->pElt + 1)) << 24; err = dixLookupResourceByType((void **) &pFont, fid, RT_FONT, client, DixUseAccess); if (err != Success) { /* restore pFont for step 4 (described below) */ pFont = oldpFont; /* If we're in START_SLEEP mode, the following step shortens the request... in the unlikely event that the fid somehow becomes valid before we come through again to actually execute the polytext, which would then mess up our refcounting scheme badly. */ c->err = err; c->endReq = c->pElt; goto bail; } /* Step 3 (described below) on our new font */ if (client_state == START_SLEEP) pFont->refcnt++; else { if (pFont != c->pGC->font && c->pDraw) { ChangeGCVal val; val.ptr = pFont; ChangeGC(NullClient, c->pGC, GCFont, &val); ValidateGC(c->pDraw, c->pGC); } /* Undo the refcnt++ we performed when going to sleep */ if (client_state == SLEEPING) (void) CloseFont(c->pGC->font, (Font) 0); } c->pElt += FontShiftSize; } else { /* print a string */ unsigned char *pNextElt; pNextElt = c->pElt + TextEltHeader + (*c->pElt) * itemSize; if (pNextElt > c->endReq) { err = BadLength; goto bail; } if (client_state == START_SLEEP) { c->pElt = pNextElt; continue; } if (c->pDraw) { lgerr = LoadGlyphs(client, c->pGC->font, *c->pElt, itemSize, c->pElt + TextEltHeader); } else lgerr = Successful; if (lgerr == Suspended) { if (!ClientIsAsleep(client)) { int len; GC *pGC; PTclosurePtr new_closure; /* We're putting the client to sleep. We need to do a few things to ensure successful and atomic-appearing execution of the remainder of the request. First, copy the remainder of the request into a safe malloc'd area. Second, create a scratch GC to use for the remainder of the request. Third, mark all fonts referenced in the remainder of the request to prevent their deallocation. Fourth, make the original GC look like the request has completed... set its font to the final font value from this request. These GC manipulations are for the unlikely (but possible) event that some other client is using the GC. Steps 3 and 4 are performed by running this procedure through the remainder of the request in a special no-render mode indicated by client_state = START_SLEEP. */ /* Step 1 */ /* Allocate a malloc'd closure structure to replace the local one we were passed */ new_closure = malloc(sizeof(PTclosureRec)); if (!new_closure) { err = BadAlloc; goto bail; } *new_closure = *c; len = new_closure->endReq - new_closure->pElt; new_closure->data = malloc(len); if (!new_closure->data) { free(new_closure); err = BadAlloc; goto bail; } memmove(new_closure->data, new_closure->pElt, len); new_closure->pElt = new_closure->data; new_closure->endReq = new_closure->pElt + len; /* Step 2 */ pGC = GetScratchGC(new_closure->pGC->depth, new_closure->pGC->pScreen); if (!pGC) { free(new_closure->data); free(new_closure); err = BadAlloc; goto bail; } if ((err = CopyGC(new_closure->pGC, pGC, GCFunction | GCPlaneMask | GCForeground | GCBackground | GCFillStyle | GCTile | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin | GCFont | GCSubwindowMode | GCClipXOrigin | GCClipYOrigin | GCClipMask)) != Success) { FreeScratchGC(pGC); free(new_closure->data); free(new_closure); err = BadAlloc; goto bail; } c = new_closure; origGC = c->pGC; c->pGC = pGC; ValidateGC(c->pDraw, c->pGC); ClientSleep(client, (ClientSleepProcPtr) doPolyText, c); /* Set up to perform steps 3 and 4 */ client_state = START_SLEEP; continue; /* on to steps 3 and 4 */ } return TRUE; } else if (lgerr != Successful) { err = FontToXError(lgerr); goto bail; } if (c->pDraw) { c->xorg += *((INT8 *) (c->pElt + 1)); /* must be signed */ if (c->reqType == X_PolyText8) c->xorg = (*c->pGC->ops->PolyText8) (c->pDraw, c->pGC, c->xorg, c->yorg, *c->pElt, (char *) (c->pElt + TextEltHeader)); else c->xorg = (*c->pGC->ops->PolyText16) (c->pDraw, c->pGC, c->xorg, c->yorg, *c->pElt, (unsigned short *) (c-> pElt + TextEltHeader)); } c->pElt = pNextElt; } } bail: if (client_state == START_SLEEP) { /* Step 4 */ if (pFont != origGC->font) { ChangeGCVal val; val.ptr = pFont; ChangeGC(NullClient, origGC, GCFont, &val); ValidateGC(c->pDraw, origGC); } /* restore pElt pointer for execution of remainder of the request */ c->pElt = c->data; return TRUE; } if (c->err != Success) err = c->err; if (err != Success && c->client != serverClient) { #ifdef PANORAMIX if (noPanoramiXExtension || !c->pGC->pScreen->myNum) #endif SendErrorToClient(c->client, c->reqType, 0, 0, err); } if (ClientIsAsleep(client)) { ClientWakeup(c->client); ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font) 0); c->pGC->font = NullFont; FreeScratchGC(c->pGC); free(c->data); free(c); } return TRUE; } int PolyText(ClientPtr client, DrawablePtr pDraw, GC * pGC, unsigned char *pElt, unsigned char *endReq, int xorg, int yorg, int reqType, XID did) { PTclosureRec local_closure = { .client = client, .pDraw = pDraw, .pGC = pGC, .pElt = pElt, .endReq = endReq, .xorg = xorg, .yorg = yorg, .reqType = reqType, .did = did, .err = Success }; (void) doPolyText(client, &local_closure); return Success; } #undef TextEltHeader #undef FontShiftSize static int doImageText(ClientPtr client, ITclosurePtr c) { int err = Success, lgerr; /* err is in X error, not font error, space */ FontPathElementPtr fpe; int itemSize = c->reqType == X_ImageText8 ? 1 : 2; if (client->clientGone) { fpe = c->pGC->font->fpe; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); err = Success; goto bail; } /* Make sure our drawable hasn't disappeared while we slept. */ if (ClientIsAsleep(client) && c->pDraw) { DrawablePtr pDraw; dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); if (c->pDraw != pDraw) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client. */ fpe = c->pGC->font->fpe; (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); err = Success; goto bail; } } lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, itemSize, c->data); if (lgerr == Suspended) { if (!ClientIsAsleep(client)) { GC *pGC; unsigned char *data; ITclosurePtr new_closure; ITclosurePtr old_closure; /* We're putting the client to sleep. We need to save some state. Similar problem to that handled in doPolyText, but much simpler because the request structure is much simpler. */ new_closure = malloc(sizeof(ITclosureRec)); if (!new_closure) { err = BadAlloc; goto bail; } old_closure = c; *new_closure = *c; c = new_closure; data = xallocarray(c->nChars, itemSize); if (!data) { free(c); c = old_closure; err = BadAlloc; goto bail; } memmove(data, c->data, c->nChars * itemSize); c->data = data; pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); if (!pGC) { free(c->data); free(c); c = old_closure; err = BadAlloc; goto bail; } if ((err = CopyGC(c->pGC, pGC, GCFunction | GCPlaneMask | GCForeground | GCBackground | GCFillStyle | GCTile | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin | GCFont | GCSubwindowMode | GCClipXOrigin | GCClipYOrigin | GCClipMask)) != Success) { FreeScratchGC(pGC); free(c->data); free(c); c = old_closure; err = BadAlloc; goto bail; } c->pGC = pGC; ValidateGC(c->pDraw, c->pGC); ClientSleep(client, (ClientSleepProcPtr) doImageText, c); } return TRUE; } else if (lgerr != Successful) { err = FontToXError(lgerr); goto bail; } if (c->pDraw) { if (c->reqType == X_ImageText8) (*c->pGC->ops->ImageText8) (c->pDraw, c->pGC, c->xorg, c->yorg, c->nChars, (char *) c->data); else (*c->pGC->ops->ImageText16) (c->pDraw, c->pGC, c->xorg, c->yorg, c->nChars, (unsigned short *) c->data); } bail: if (err != Success && c->client != serverClient) { SendErrorToClient(c->client, c->reqType, 0, 0, err); } if (ClientIsAsleep(client)) { ClientWakeup(c->client); ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font) 0); c->pGC->font = NullFont; FreeScratchGC(c->pGC); free(c->data); free(c); } return TRUE; } int ImageText(ClientPtr client, DrawablePtr pDraw, GC * pGC, int nChars, unsigned char *data, int xorg, int yorg, int reqType, XID did) { ITclosureRec local_closure; local_closure.client = client; local_closure.pDraw = pDraw; local_closure.pGC = pGC; local_closure.nChars = nChars; local_closure.data = data; local_closure.xorg = xorg; local_closure.yorg = yorg; local_closure.reqType = reqType; local_closure.did = did; (void) doImageText(client, &local_closure); return Success; } /* does the necessary magic to figure out the fpe type */ static int DetermineFPEType(const char *pathname) { int i; for (i = 0; i < num_fpe_types; i++) { if ((*fpe_functions[i]->name_check) (pathname)) return i; } return -1; } static void FreeFontPath(FontPathElementPtr * list, int n, Bool force) { int i; for (i = 0; i < n; i++) { if (force) { /* Sanity check that all refcounts will be 0 by the time we get to the end of the list. */ int found = 1; /* the first reference is us */ int j; for (j = i + 1; j < n; j++) { if (list[j] == list[i]) found++; } if (list[i]->refcount != found) { list[i]->refcount = found; /* ensure it will get freed */ } } FreeFPE(list[i]); } free(list); } static FontPathElementPtr find_existing_fpe(FontPathElementPtr * list, int num, unsigned char *name, int len) { FontPathElementPtr fpe; int i; for (i = 0; i < num; i++) { fpe = list[i]; if (fpe->name_length == len && memcmp(name, fpe->name, len) == 0) return fpe; } return (FontPathElementPtr) 0; } static int SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) { int i, err = 0; int valid_paths = 0; unsigned int len; unsigned char *cp = paths; FontPathElementPtr fpe = NULL, *fplist; fplist = xallocarray(npaths, sizeof(FontPathElementPtr)); if (!fplist) { *bad = 0; return BadAlloc; } for (i = 0; i < num_fpe_types; i++) { if (fpe_functions[i]->set_path_hook) (*fpe_functions[i]->set_path_hook) (); } for (i = 0; i < npaths; i++) { len = (unsigned int) (*cp++); if (len == 0) { if (persist) ErrorF ("[dix] Removing empty element from the valid list of fontpaths\n"); err = BadValue; } else { /* if it's already in our active list, just reset it */ /* * note that this can miss FPE's in limbo -- may be worth catching * them, though it'd muck up refcounting */ fpe = find_existing_fpe(font_path_elements, num_fpes, cp, len); if (fpe) { err = (*fpe_functions[fpe->type]->reset_fpe) (fpe); if (err == Successful) { UseFPE(fpe); /* since it'll be decref'd later when freed * from the old list */ } else fpe = 0; } /* if error or can't do it, act like it's a new one */ if (!fpe) { char *name; fpe = malloc(sizeof(FontPathElementRec)); if (!fpe) { err = BadAlloc; goto bail; } name = malloc(len + 1); if (!name) { free(fpe); err = BadAlloc; goto bail; } fpe->refcount = 1; strncpy(name, (char *) cp, (int) len); name[len] = '\0'; fpe->name = name; fpe->name_length = len; fpe->type = DetermineFPEType(fpe->name); if (fpe->type == -1) err = BadValue; else err = (*fpe_functions[fpe->type]->init_fpe) (fpe); if (err != Successful) { if (persist) { DebugF ("[dix] Could not init font path element %s, removing from list!\n", fpe->name); } free((void *) fpe->name); free(fpe); } } } if (err != Successful) { if (!persist) goto bail; } else { fplist[valid_paths++] = fpe; } cp += len; } FreeFontPath(font_path_elements, num_fpes, FALSE); font_path_elements = fplist; if (patternCache) xfont2_empty_font_pattern_cache(patternCache); num_fpes = valid_paths; return Success; bail: *bad = i; while (--valid_paths >= 0) FreeFPE(fplist[valid_paths]); free(fplist); return FontToXError(err); } int SetFontPath(ClientPtr client, int npaths, unsigned char *paths) { int err = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); if (err != Success) return err; if (npaths == 0) { if (SetDefaultFontPath(defaultFontPath) != Success) return BadValue; } else { int bad; err = SetFontPathElements(npaths, paths, &bad, FALSE); if (err != Success) client->errorValue = bad; } return err; } int SetDefaultFontPath(const char *path) { const char *start, *end; char *temp_path; unsigned char *cp, *pp, *nump, *newpath; int num = 1, len, err, size = 0, bad; /* ensure temp_path contains "built-ins" */ start = path; while (1) { start = strstr(start, "built-ins"); if (start == NULL) break; end = start + strlen("built-ins"); if ((start == path || start[-1] == ',') && (!*end || *end == ',')) break; start = end; } if (!start) { if (asprintf(&temp_path, "%s%sbuilt-ins", path, *path ? "," : "") == -1) temp_path = NULL; } else { temp_path = strdup(path); } if (!temp_path) return BadAlloc; /* get enough for string, plus values -- use up commas */ len = strlen(temp_path) + 1; nump = cp = newpath = malloc(len); if (!newpath) { free(temp_path); return BadAlloc; } pp = (unsigned char *) temp_path; cp++; while (*pp) { if (*pp == ',') { *nump = (unsigned char) size; nump = cp++; pp++; num++; size = 0; } else { *cp++ = *pp++; size++; } } *nump = (unsigned char) size; err = SetFontPathElements(num, newpath, &bad, TRUE); free(newpath); free(temp_path); return err; } int GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result) { int i; unsigned char *c; int len; FontPathElementPtr fpe; i = XaceHook(XACE_SERVER_ACCESS, client, DixGetAttrAccess); if (i != Success) return i; len = 0; for (i = 0; i < num_fpes; i++) { fpe = font_path_elements[i]; len += fpe->name_length + 1; } c = realloc(font_path_string, len); if (c == NULL) { free(font_path_string); font_path_string = NULL; return BadAlloc; } font_path_string = c; *length = 0; for (i = 0; i < num_fpes; i++) { fpe = font_path_elements[i]; *c = fpe->name_length; *length += *c++; memmove(c, fpe->name, fpe->name_length); c += fpe->name_length; } *count = num_fpes; *result = font_path_string; return Success; } void DeleteClientFontStuff(ClientPtr client) { int i; FontPathElementPtr fpe; for (i = 0; i < num_fpes; i++) { fpe = font_path_elements[i]; if (fpe_functions[fpe->type]->client_died) (*fpe_functions[fpe->type]->client_died) ((void *) client, fpe); } } static int register_fpe_funcs(const xfont2_fpe_funcs_rec *funcs) { xfont2_fpe_funcs_rec const **new; /* grow the list */ new = reallocarray(fpe_functions, num_fpe_types + 1, sizeof(xfont2_fpe_funcs_ptr)); if (!new) return -1; fpe_functions = new; fpe_functions[num_fpe_types] = funcs; return num_fpe_types++; } static unsigned long get_server_generation(void) { return serverGeneration; } static void * get_server_client(void) { return serverClient; } static int get_default_point_size(void) { return 120; } static FontResolutionPtr get_client_resolutions(int *num) { static struct _FontResolution res; ScreenPtr pScreen; pScreen = screenInfo.screens[0]; res.x_resolution = (pScreen->width * 25.4) / pScreen->mmWidth; /* * XXX - we'll want this as long as bitmap instances are prevalent so that we can match them from scalable fonts */ if (res.x_resolution < 88) res.x_resolution = 75; else res.x_resolution = 100; res.y_resolution = (pScreen->height * 25.4) / pScreen->mmHeight; if (res.y_resolution < 88) res.y_resolution = 75; else res.y_resolution = 100; res.point_size = 120; *num = 1; return &res; } void FreeFonts(void) { if (patternCache) { xfont2_free_font_pattern_cache(patternCache); patternCache = 0; } FreeFontPath(font_path_elements, num_fpes, TRUE); font_path_elements = 0; num_fpes = 0; free(fpe_functions); num_fpe_types = 0; fpe_functions = NULL; } /* convenience functions for FS interface */ static FontPtr find_old_font(XID id) { void *pFont; dixLookupResourceByType(&pFont, id, RT_NONE, serverClient, DixReadAccess); return (FontPtr) pFont; } static Font get_new_font_client_id(void) { return FakeClientID(0); } static int store_font_Client_font(FontPtr pfont, Font id) { return AddResource(id, RT_NONE, (void *) pfont); } static void delete_font_client_id(Font id) { FreeResource(id, RT_NONE); } static int _client_auth_generation(ClientPtr client) { return 0; } static int fs_handlers_installed = 0; static unsigned int last_server_gen; static void fs_block_handler(void *blockData, void *timeout) { FontBlockHandlerProcPtr block_handler = blockData; (*block_handler)(timeout); } struct fs_fd_entry { struct xorg_list entry; int fd; void *data; FontFdHandlerProcPtr handler; }; static void fs_fd_handler(int fd, int ready, void *data) { struct fs_fd_entry *entry = data; entry->handler(fd, entry->data); } static struct xorg_list fs_fd_list; static int add_fs_fd(int fd, FontFdHandlerProcPtr handler, void *data) { struct fs_fd_entry *entry = calloc(1, sizeof (struct fs_fd_entry)); if (!entry) return FALSE; entry->fd = fd; entry->data = data; entry->handler = handler; if (!SetNotifyFd(fd, fs_fd_handler, X_NOTIFY_READ, entry)) { free(entry); return FALSE; } xorg_list_add(&entry->entry, &fs_fd_list); return TRUE; } static void remove_fs_fd(int fd) { struct fs_fd_entry *entry, *temp; xorg_list_for_each_entry_safe(entry, temp, &fs_fd_list, entry) { if (entry->fd == fd) { xorg_list_del(&entry->entry); free(entry); break; } } RemoveNotifyFd(fd); } static void adjust_fs_wait_for_delay(void *wt, unsigned long newdelay) { AdjustWaitForDelay(wt, newdelay); } static int _init_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler) { /* if server has reset, make sure the b&w handlers are reinstalled */ if (last_server_gen < serverGeneration) { last_server_gen = serverGeneration; fs_handlers_installed = 0; } if (fs_handlers_installed == 0) { if (!RegisterBlockAndWakeupHandlers(fs_block_handler, FontWakeup, (void *) block_handler)) return AllocError; xorg_list_init(&fs_fd_list); fs_handlers_installed++; } QueueFontWakeup(fpe); return Successful; } static void _remove_fs_handlers(FontPathElementPtr fpe, FontBlockHandlerProcPtr block_handler, Bool all) { if (all) { /* remove the handlers if no one else is using them */ if (--fs_handlers_installed == 0) { RemoveBlockAndWakeupHandlers(fs_block_handler, FontWakeup, (void *) block_handler); } } RemoveFontWakeup(fpe); } static uint32_t wrap_time_in_millis(void) { return GetTimeInMillis(); } static const xfont2_client_funcs_rec xfont2_client_funcs = { .version = XFONT2_CLIENT_FUNCS_VERSION, .client_auth_generation = _client_auth_generation, .client_signal = ClientSignal, .delete_font_client_id = delete_font_client_id, .verrorf = VErrorF, .find_old_font = find_old_font, .get_client_resolutions = get_client_resolutions, .get_default_point_size = get_default_point_size, .get_new_font_client_id = get_new_font_client_id, .get_time_in_millis = wrap_time_in_millis, .init_fs_handlers = _init_fs_handlers, .register_fpe_funcs = register_fpe_funcs, .remove_fs_handlers = _remove_fs_handlers, .get_server_client = get_server_client, .set_font_authorizations = set_font_authorizations, .store_font_client_font = store_font_Client_font, .make_atom = MakeAtom, .valid_atom = ValidAtom, .name_for_atom = NameForAtom, .get_server_generation = get_server_generation, .add_fs_fd = add_fs_fd, .remove_fs_fd = remove_fs_fd, .adjust_fs_wait_for_delay = adjust_fs_wait_for_delay, }; xfont2_pattern_cache_ptr fontPatternCache; void InitFonts(void) { if (fontPatternCache) xfont2_free_font_pattern_cache(fontPatternCache); fontPatternCache = xfont2_make_font_pattern_cache(); xfont2_init(&xfont2_client_funcs); } xorg-server-21.1.16/dix/main.c0000644000175000017500000002751714757411105011523 /*********************************************************** 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. ******************************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #include #endif #include #include /* for unistd.h */ #include #include #include "scrnintstr.h" #include "misc.h" #include "os.h" #include "windowstr.h" #include "resource.h" #include "dixstruct.h" #include "gcstruct.h" #include "extension.h" #include "colormap.h" #include "colormapst.h" #include "cursorstr.h" #include "selection.h" #include #include #include #include "opaque.h" #include "servermd.h" #include "hotplug.h" #include "dixfont.h" #include "extnsionst.h" #include "privates.h" #include "registry.h" #include "client.h" #include "exevents.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #else #include "dixevents.h" /* InitEvents() */ #endif #ifdef DPMSExtension #include #include "dpmsproc.h" #endif extern void Dispatch(void); CallbackListPtr RootWindowFinalizeCallback = NULL; int dix_main(int argc, char *argv[], char *envp[]) { int i; HWEventQueueType alwaysCheckForInput[2]; display = "0"; InitRegions(); CheckUserParameters(argc, argv, envp); CheckUserAuthorization(); ProcessCommandLine(argc, argv); alwaysCheckForInput[0] = 0; alwaysCheckForInput[1] = 1; while (1) { serverGeneration++; ScreenSaverTime = defaultScreenSaverTime; ScreenSaverInterval = defaultScreenSaverInterval; ScreenSaverBlanking = defaultScreenSaverBlanking; ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; InitBlockAndWakeupHandlers(); /* Perform any operating system dependent initializations you'd like */ OsInit(); if (serverGeneration == 1) { CreateWellKnownSockets(); for (i = 1; i < LimitClients; i++) clients[i] = NullClient; serverClient = calloc(sizeof(ClientRec), 1); if (!serverClient) FatalError("couldn't create server client"); InitClient(serverClient, 0, (void *) NULL); } else ResetWellKnownSockets(); clients[0] = serverClient; currentMaxClients = 1; /* clear any existing selections */ InitSelections(); /* Initialize privates before first allocation */ dixResetPrivates(); /* 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"); if (!InitClientResources(serverClient)) /* for root resources */ FatalError("couldn't init server resources"); SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); screenInfo.numScreens = 0; InitAtoms(); InitEvents(); xfont2_init_glyph_caching(); dixResetRegistry(); InitFonts(); InitCallbackManager(); InitOutput(&screenInfo, argc, argv); if (screenInfo.numScreens < 1) FatalError("no screens found"); InitExtensions(argc, argv); for (i = 0; i < screenInfo.numGPUScreens; i++) { ScreenPtr pScreen = screenInfo.gpuscreens[i]; if (!CreateScratchPixmapsForScreen(pScreen)) FatalError("failed to create scratch pixmaps"); if (pScreen->CreateScreenResources && !(*pScreen->CreateScreenResources) (pScreen)) FatalError("failed to create screen resources"); } for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; if (!CreateScratchPixmapsForScreen(pScreen)) FatalError("failed to create scratch pixmaps"); if (pScreen->CreateScreenResources && !(*pScreen->CreateScreenResources) (pScreen)) FatalError("failed to create screen resources"); if (!CreateGCperDepth(i)) FatalError("failed to create scratch GCs"); if (!CreateDefaultStipple(i)) FatalError("failed to create default stipple"); if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); CallCallbacks(&RootWindowFinalizeCallback, pScreen); } if (SetDefaultFontPath(defaultFontPath) != Success) { ErrorF("[dix] failed to set default font path '%s'", defaultFontPath); } if (!SetDefaultFont("fixed")) { FatalError("could not open default font"); } if (!(rootCursor = CreateRootCursor(NULL, 0))) { FatalError("could not open default cursor font"); } rootCursor = RefCursor(rootCursor); #ifdef PANORAMIX /* * Consolidate window and colourmap information for each screen */ if (!noPanoramiXExtension) PanoramiXConsolidate(); #endif for (i = 0; i < screenInfo.numScreens; i++) InitRootWindow(screenInfo.screens[i]->root); InitCoreDevices(); InitInput(argc, argv); InitAndStartDevices(); ReserveClientIds(serverClient); dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); dixCloseRegistry(); #ifdef PANORAMIX if (!noPanoramiXExtension) { if (!PanoramiXCreateConnectionBlock()) { FatalError("could not create connection block info"); } } else #endif { if (!CreateConnectionBlock()) { FatalError("could not create connection block info"); } } NotifyParentProcess(); InputThreadInit(); Dispatch(); UnrefCursor(rootCursor); UndisplayDevices(); DisableAllDevices(); /* Now free up whatever must be freed */ if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); FreeScreenSaverTimer(); CloseDownExtensions(); #ifdef PANORAMIX { Bool remember_it = noPanoramiXExtension; noPanoramiXExtension = TRUE; FreeAllResources(); noPanoramiXExtension = remember_it; } #else FreeAllResources(); #endif CloseInput(); InputThreadFini(); for (i = 0; i < screenInfo.numScreens; i++) screenInfo.screens[i]->root = NullWindow; CloseDownDevices(); CloseDownEvents(); for (i = screenInfo.numGPUScreens - 1; i >= 0; i--) { ScreenPtr pScreen = screenInfo.gpuscreens[i]; FreeScratchPixmapsForScreen(pScreen); dixFreeScreenSpecificPrivates(pScreen); (*pScreen->CloseScreen) (pScreen); dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); free(pScreen); screenInfo.numGPUScreens = i; } for (i = screenInfo.numScreens - 1; i >= 0; i--) { FreeScratchPixmapsForScreen(screenInfo.screens[i]); FreeGCperDepth(i); FreeDefaultStipple(i); dixFreeScreenSpecificPrivates(screenInfo.screens[i]); (*screenInfo.screens[i]->CloseScreen) (screenInfo.screens[i]); dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN); free(screenInfo.screens[i]); screenInfo.numScreens = i; } ReleaseClientIds(serverClient); dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT); serverClient->devPrivates = NULL; dixFreeRegistry(); FreeFonts(); FreeAllAtoms(); FreeAuditTimer(); DeleteCallbackManager(); ClearWorkQueue(); if (dispatchException & DE_TERMINATE) { CloseWellKnownConnections(); } OsCleanup((dispatchException & DE_TERMINATE) != 0); if (dispatchException & DE_TERMINATE) { ddxGiveUp(EXIT_NO_ERROR); break; } free(ConnectionInfo); ConnectionInfo = NULL; } return 0; } xorg-server-21.1.16/dix/dixutils.c0000644000175000017500000006155614757411105012445 /*********************************************************** 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. ******************************************************************/ /* (c)Copyright 1988,1991 Adobe Systems Incorporated. All rights reserved. Permission to use, copy, modify, distribute, and sublicense this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notices appear in all copies and that both those copyright notices and this permission notice appear in supporting documentation and that the name of Adobe Systems Incorporated not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. No trademark license to use the Adobe trademarks is hereby granted. If the Adobe trademark "Display PostScript"(tm) is used to describe this software, its functionality or for any other purpose, such use shall be limited to a statement that this software works in conjunction with the Display PostScript system. Proper trademark attribution to reflect Adobe's ownership of the trademark shall be given whenever any such reference to the Display PostScript system is made. ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE. Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. Author: Adobe Systems Incorporated */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" #include "pixmapstr.h" #include "gcstruct.h" #include "scrnintstr.h" #define XK_LATIN1 #include #include "xace.h" /* * CompareTimeStamps returns -1, 0, or +1 depending on if the first * argument is less than, equal to or greater than the second argument. */ int CompareTimeStamps(TimeStamp a, TimeStamp b) { if (a.months < b.months) return EARLIER; if (a.months > b.months) return LATER; if (a.milliseconds < b.milliseconds) return EARLIER; if (a.milliseconds > b.milliseconds) return LATER; return SAMETIME; } /* * convert client times to server TimeStamps */ #define HALFMONTH ((unsigned long) 1<<31) TimeStamp ClientTimeToServerTime(CARD32 c) { TimeStamp ts; if (c == CurrentTime) return currentTime; ts.months = currentTime.months; ts.milliseconds = c; if (c > currentTime.milliseconds) { if (((unsigned long) c - currentTime.milliseconds) > HALFMONTH) ts.months -= 1; } else if (c < currentTime.milliseconds) { if (((unsigned long) currentTime.milliseconds - c) > HALFMONTH) ts.months += 1; } return ts; } /* * ISO Latin-1 case conversion routine * * this routine always null-terminates the result, so * beware of too-small buffers */ static unsigned char ISOLatin1ToLower(unsigned char source) { unsigned char dest; if ((source >= XK_A) && (source <= XK_Z)) dest = source + (XK_a - XK_A); else if ((source >= XK_Agrave) && (source <= XK_Odiaeresis)) dest = source + (XK_agrave - XK_Agrave); else if ((source >= XK_Ooblique) && (source <= XK_Thorn)) dest = source + (XK_oslash - XK_Ooblique); else dest = source; return dest; } int CompareISOLatin1Lowered(const unsigned char *s1, int s1len, const unsigned char *s2, int s2len) { unsigned char c1, c2; for (;;) { /* note -- compare against zero so that -1 ignores len */ c1 = s1len-- ? *s1++ : '\0'; c2 = s2len-- ? *s2++ : '\0'; if (!c1 || (c1 != c2 && (c1 = ISOLatin1ToLower(c1)) != (c2 = ISOLatin1ToLower(c2)))) break; } return (int) c1 - (int) c2; } /* * dixLookupWindow and dixLookupDrawable: * Look up the window/drawable taking into account the client doing the * lookup, the type of drawable desired, and the type of access desired. * Return Success with *pDraw set if the window/drawable exists and the client * is allowed access, else return an error code with *pDraw set to NULL. The * access mask values are defined in resource.h. The type mask values are * defined in pixmap.h, with zero equivalent to M_DRAWABLE. */ int dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, Mask type, Mask access) { DrawablePtr pTmp; int rc; *pDraw = NULL; rc = dixLookupResourceByClass((void **) &pTmp, id, RC_DRAWABLE, client, access); if (rc != Success) client->errorValue = id; if (rc == BadValue) return BadDrawable; if (rc != Success) return rc; if (!((1 << pTmp->type) & (type ? type : M_DRAWABLE))) return BadMatch; *pDraw = pTmp; return Success; } int dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) { int rc; rc = dixLookupDrawable((DrawablePtr *) pWin, id, client, M_WINDOW, access); /* dixLookupDrawable returns BadMatch iff id is a valid Drawable but is not a Window. Users of dixLookupWindow expect a BadWindow error in this case; they don't care that it's a valid non-Window XID */ if (rc == BadMatch) rc = BadWindow; /* Similarly, users of dixLookupWindow don't want BadDrawable. */ if (rc == BadDrawable) rc = BadWindow; return rc; } int dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) { return dixLookupResourceByType((void **) pGC, id, RT_GC, client, access); } int dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access) { int rc; GC *pGC; client->errorValue = id; /* EITHER font or gc */ rc = dixLookupResourceByType((void **) pFont, id, RT_FONT, client, access); if (rc != BadFont) return rc; rc = dixLookupResourceByType((void **) &pGC, id, RT_GC, client, access); if (rc == BadGC) return BadFont; if (rc == Success) *pFont = pGC->font; return rc; } int dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { void *pRes; int rc = BadValue, clientIndex = CLIENT_ID(rid); if (!clientIndex || !clients[clientIndex] || (rid & SERVER_BIT)) goto bad; rc = dixLookupResourceByClass(&pRes, rid, RC_ANY, client, DixGetAttrAccess); if (rc != Success) goto bad; rc = XaceHook(XACE_CLIENT_ACCESS, client, clients[clientIndex], access); if (rc != Success) goto bad; *pClient = clients[clientIndex]; return Success; bad: if (client) client->errorValue = rid; *pClient = NULL; return rc; } int AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, Bool toRoot, Bool map) { int numnow; SaveSetElt *pTmp = NULL; int j; numnow = client->numSaved; j = 0; if (numnow) { pTmp = client->saveSet; while ((j < numnow) && (SaveSetWindow(pTmp[j]) != (void *) pWin)) j++; } if (mode == SetModeInsert) { if (j < numnow) /* duplicate */ return Success; numnow++; pTmp = (SaveSetElt *) realloc(client->saveSet, sizeof(*pTmp) * numnow); if (!pTmp) return BadAlloc; client->saveSet = pTmp; client->numSaved = numnow; SaveSetAssignWindow(client->saveSet[numnow - 1], pWin); SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot); SaveSetAssignMap(client->saveSet[numnow - 1], map); return Success; } else if ((mode == SetModeDelete) && (j < numnow)) { while (j < numnow - 1) { pTmp[j] = pTmp[j + 1]; j++; } numnow--; if (numnow) { pTmp = (SaveSetElt *) realloc(client->saveSet, sizeof(*pTmp) * numnow); if (pTmp) client->saveSet = pTmp; } else { free(client->saveSet); client->saveSet = (SaveSetElt *) NULL; } client->numSaved = numnow; return Success; } return Success; } void DeleteWindowFromAnySaveSet(WindowPtr pWin) { int i; ClientPtr client; for (i = 0; i < currentMaxClients; i++) { client = clients[i]; if (client && client->numSaved) (void) AlterSaveSetForClient(client, pWin, SetModeDelete, FALSE, TRUE); } } /* No-op Don't Do Anything : sometimes we need to be able to call a procedure * that doesn't do anything. For example, on screen with only static * colormaps, if someone calls install colormap, it's easier to have a dummy * procedure to call than to check if there's a procedure */ void NoopDDA(void) { } typedef struct _BlockHandler { ServerBlockHandlerProcPtr BlockHandler; ServerWakeupHandlerProcPtr WakeupHandler; void *blockData; Bool deleted; } BlockHandlerRec, *BlockHandlerPtr; static BlockHandlerPtr handlers; static int numHandlers; static int sizeHandlers; static Bool inHandler; static Bool handlerDeleted; /** * * \param pTimeout DIX doesn't want to know how OS represents time * \param pReadMask nor how it represents the det of descriptors */ void BlockHandler(void *pTimeout) { int i, j; ++inHandler; for (i = 0; i < numHandlers; i++) if (!handlers[i].deleted) (*handlers[i].BlockHandler) (handlers[i].blockData, pTimeout); for (i = 0; i < screenInfo.numGPUScreens; i++) (*screenInfo.gpuscreens[i]->BlockHandler) (screenInfo.gpuscreens[i], pTimeout); for (i = 0; i < screenInfo.numScreens; i++) (*screenInfo.screens[i]->BlockHandler) (screenInfo.screens[i], pTimeout); if (handlerDeleted) { for (i = 0; i < numHandlers;) if (handlers[i].deleted) { for (j = i; j < numHandlers - 1; j++) handlers[j] = handlers[j + 1]; numHandlers--; } else i++; handlerDeleted = FALSE; } --inHandler; } /** * * \param result 32 bits of undefined result from the wait * \param pReadmask the resulting descriptor mask */ void WakeupHandler(int result) { int i, j; ++inHandler; for (i = 0; i < screenInfo.numScreens; i++) (*screenInfo.screens[i]->WakeupHandler) (screenInfo.screens[i], result); for (i = 0; i < screenInfo.numGPUScreens; i++) (*screenInfo.gpuscreens[i]->WakeupHandler) (screenInfo.gpuscreens[i], result); for (i = numHandlers - 1; i >= 0; i--) if (!handlers[i].deleted) (*handlers[i].WakeupHandler) (handlers[i].blockData, result); if (handlerDeleted) { for (i = 0; i < numHandlers;) if (handlers[i].deleted) { for (j = i; j < numHandlers - 1; j++) handlers[j] = handlers[j + 1]; numHandlers--; } else i++; handlerDeleted = FALSE; } --inHandler; } /** * Reentrant with BlockHandler and WakeupHandler, except wakeup won't * get called until next time */ Bool RegisterBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler, ServerWakeupHandlerProcPtr wakeupHandler, void *blockData) { BlockHandlerPtr new; if (numHandlers >= sizeHandlers) { new = (BlockHandlerPtr) realloc(handlers, (numHandlers + 1) * sizeof(BlockHandlerRec)); if (!new) return FALSE; handlers = new; sizeHandlers = numHandlers + 1; } handlers[numHandlers].BlockHandler = blockHandler; handlers[numHandlers].WakeupHandler = wakeupHandler; handlers[numHandlers].blockData = blockData; handlers[numHandlers].deleted = FALSE; numHandlers = numHandlers + 1; return TRUE; } void RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler, ServerWakeupHandlerProcPtr wakeupHandler, void *blockData) { int i; for (i = 0; i < numHandlers; i++) if (handlers[i].BlockHandler == blockHandler && handlers[i].WakeupHandler == wakeupHandler && handlers[i].blockData == blockData) { if (inHandler) { handlerDeleted = TRUE; handlers[i].deleted = TRUE; } else { for (; i < numHandlers - 1; i++) handlers[i] = handlers[i + 1]; numHandlers--; } break; } } void InitBlockAndWakeupHandlers(void) { free(handlers); handlers = (BlockHandlerPtr) 0; numHandlers = 0; sizeHandlers = 0; } /* * A general work queue. Perform some task before the server * sleeps for input. */ WorkQueuePtr workQueue; static WorkQueuePtr *workQueueLast = &workQueue; void ClearWorkQueue(void) { WorkQueuePtr q, *p; p = &workQueue; while ((q = *p)) { *p = q->next; free(q); } workQueueLast = p; } void ProcessWorkQueue(void) { WorkQueuePtr q, *p; p = &workQueue; /* * Scan the work queue once, calling each function. Those * which return TRUE are removed from the queue, otherwise * they will be called again. This must be reentrant with * QueueWorkProc. */ while ((q = *p)) { if ((*q->function) (q->client, q->closure)) { /* remove q from the list */ *p = q->next; /* don't fetch until after func called */ free(q); } else { p = &q->next; /* don't fetch until after func called */ } } workQueueLast = p; } void ProcessWorkQueueZombies(void) { WorkQueuePtr q, *p; p = &workQueue; while ((q = *p)) { if (q->client && q->client->clientGone) { (void) (*q->function) (q->client, q->closure); /* remove q from the list */ *p = q->next; /* don't fetch until after func called */ free(q); } else { p = &q->next; /* don't fetch until after func called */ } } workQueueLast = p; } Bool QueueWorkProc(Bool (*function) (ClientPtr pClient, void *closure), ClientPtr client, void *closure) { WorkQueuePtr q; q = malloc(sizeof *q); if (!q) return FALSE; q->function = function; q->client = client; q->closure = closure; q->next = NULL; *workQueueLast = q; workQueueLast = &q->next; return TRUE; } /* * Manage a queue of sleeping clients, awakening them * when requested, by using the OS functions IgnoreClient * and AttendClient. Note that this *ignores* the troubles * with request data interleaving itself with events, but * we'll leave that until a later time. */ typedef struct _SleepQueue { struct _SleepQueue *next; ClientPtr client; ClientSleepProcPtr function; void *closure; } SleepQueueRec, *SleepQueuePtr; static SleepQueuePtr sleepQueue = NULL; Bool ClientSleep(ClientPtr client, ClientSleepProcPtr function, void *closure) { SleepQueuePtr q; q = malloc(sizeof *q); if (!q) return FALSE; IgnoreClient(client); q->next = sleepQueue; q->client = client; q->function = function; q->closure = closure; sleepQueue = q; return TRUE; } Bool ClientSignal(ClientPtr client) { SleepQueuePtr q; for (q = sleepQueue; q; q = q->next) if (q->client == client) { return QueueWorkProc(q->function, q->client, q->closure); } return FALSE; } int ClientSignalAll(ClientPtr client, ClientSleepProcPtr function, void *closure) { SleepQueuePtr q; int count = 0; for (q = sleepQueue; q; q = q->next) { if (!(client == CLIENT_SIGNAL_ANY || q->client == client)) continue; if (!(function == CLIENT_SIGNAL_ANY || q->function == function)) continue; if (!(closure == CLIENT_SIGNAL_ANY || q->closure == closure)) continue; count += QueueWorkProc(q->function, q->client, q->closure); } return count; } void ClientWakeup(ClientPtr client) { SleepQueuePtr q, *prev; prev = &sleepQueue; while ((q = *prev)) { if (q->client == client) { *prev = q->next; free(q); AttendClient(client); break; } prev = &q->next; } } Bool ClientIsAsleep(ClientPtr client) { SleepQueuePtr q; for (q = sleepQueue; q; q = q->next) if (q->client == client) return TRUE; return FALSE; } /* * Generic Callback Manager */ /* ===== Private Procedures ===== */ static int numCallbackListsToCleanup = 0; static CallbackListPtr **listsToCleanup = NULL; static Bool _AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data) { CallbackPtr cbr; cbr = malloc(sizeof(CallbackRec)); if (!cbr) return FALSE; cbr->proc = callback; cbr->data = data; cbr->next = (*pcbl)->list; cbr->deleted = FALSE; (*pcbl)->list = cbr; return TRUE; } static Bool _DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data) { CallbackListPtr cbl = *pcbl; CallbackPtr cbr, pcbr; for (pcbr = NULL, cbr = cbl->list; cbr != NULL; pcbr = cbr, cbr = cbr->next) { if ((cbr->proc == callback) && (cbr->data == data)) break; } if (cbr != NULL) { if (cbl->inCallback) { ++(cbl->numDeleted); cbr->deleted = TRUE; } else { if (pcbr == NULL) cbl->list = cbr->next; else pcbr->next = cbr->next; free(cbr); } return TRUE; } return FALSE; } void _CallCallbacks(CallbackListPtr *pcbl, void *call_data) { CallbackListPtr cbl = *pcbl; CallbackPtr cbr, pcbr; ++(cbl->inCallback); for (cbr = cbl->list; cbr != NULL; cbr = cbr->next) { (*(cbr->proc)) (pcbl, cbr->data, call_data); } --(cbl->inCallback); if (cbl->inCallback) return; /* Was the entire list marked for deletion? */ if (cbl->deleted) { DeleteCallbackList(pcbl); return; } /* Were some individual callbacks on the list marked for deletion? * If so, do the deletions. */ if (cbl->numDeleted) { for (pcbr = NULL, cbr = cbl->list; (cbr != NULL) && cbl->numDeleted;) { if (cbr->deleted) { if (pcbr) { cbr = cbr->next; free(pcbr->next); pcbr->next = cbr; } else { cbr = cbr->next; free(cbl->list); cbl->list = cbr; } cbl->numDeleted--; } else { /* this one wasn't deleted */ pcbr = cbr; cbr = cbr->next; } } } } static void _DeleteCallbackList(CallbackListPtr *pcbl) { CallbackListPtr cbl = *pcbl; CallbackPtr cbr, nextcbr; int i; if (cbl->inCallback) { cbl->deleted = TRUE; return; } for (i = 0; i < numCallbackListsToCleanup; i++) { if (listsToCleanup[i] == pcbl) { listsToCleanup[i] = NULL; break; } } for (cbr = cbl->list; cbr != NULL; cbr = nextcbr) { nextcbr = cbr->next; free(cbr); } free(cbl); *pcbl = NULL; } static Bool CreateCallbackList(CallbackListPtr *pcbl) { CallbackListPtr cbl; int i; if (!pcbl) return FALSE; cbl = malloc(sizeof(CallbackListRec)); if (!cbl) return FALSE; cbl->inCallback = 0; cbl->deleted = FALSE; cbl->numDeleted = 0; cbl->list = NULL; *pcbl = cbl; for (i = 0; i < numCallbackListsToCleanup; i++) { if (!listsToCleanup[i]) { listsToCleanup[i] = pcbl; return TRUE; } } listsToCleanup = (CallbackListPtr **) xnfrealloc(listsToCleanup, sizeof(CallbackListPtr *) * (numCallbackListsToCleanup + 1)); listsToCleanup[numCallbackListsToCleanup] = pcbl; numCallbackListsToCleanup++; return TRUE; } /* ===== Public Procedures ===== */ Bool AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data) { if (!pcbl) return FALSE; if (!*pcbl) { /* list hasn't been created yet; go create it */ if (!CreateCallbackList(pcbl)) return FALSE; } return _AddCallback(pcbl, callback, data); } Bool DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data) { if (!pcbl || !*pcbl) return FALSE; return _DeleteCallback(pcbl, callback, data); } void DeleteCallbackList(CallbackListPtr *pcbl) { if (!pcbl || !*pcbl) return; _DeleteCallbackList(pcbl); } void DeleteCallbackManager(void) { int i; for (i = 0; i < numCallbackListsToCleanup; i++) { DeleteCallbackList(listsToCleanup[i]); } free(listsToCleanup); numCallbackListsToCleanup = 0; listsToCleanup = NULL; } void InitCallbackManager(void) { DeleteCallbackManager(); } /** * Coordinates the global GL context used by modules in the X Server * doing rendering with OpenGL. * * When setting a GL context (glXMakeCurrent() or eglMakeCurrent()), * there is an expensive implied glFlush() required by the GLX and EGL * APIs, so modules don't want to have to do it on every request. But * the individual modules using GL also don't know about each other, * so they have to coordinate who owns the current context. * * When you're about to do a MakeCurrent, you should set this variable * to your context's address, and you can skip MakeCurrent if it's * already set to yours. * * When you're about to do a DestroyContext, you should set this to * NULL if it's set to your context. * * When you're about to do an unbindContext on a DRI driver, you * should set this to NULL. Despite the unbindContext interface * sounding like it only unbinds the passed in context, it actually * unconditionally clears the dispatch table even if the given * context wasn't current. */ void *lastGLContext = NULL; xorg-server-21.1.16/dix/enterleave.c0000644000175000017500000014650314757411105012726 /* * Copyright © 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "exglobals.h" #include "enterleave.h" #include "eventconvert.h" #include "xkbsrv.h" #include "inpututils.h" /** * @file * This file describes the model for sending core enter/leave events and * focus in/out in the case of multiple pointers/keyboard foci. * * Since we can't send more than one Enter or Leave/Focus in or out event per * window to a core client without confusing it, this is a rather complicated * approach. * * For a full description of the enter/leave model from a window's * perspective, see * http://lists.freedesktop.org/archives/xorg/2008-August/037606.html * * For a full description of the focus in/out model from a window's * perspective, see * https://lists.freedesktop.org/archives/xorg/2008-December/041684.html * * Additional notes: * - The core protocol spec says that "In a LeaveNotify event, if a child of the * event window contains the initial position of the pointer, then the child * component is set to that child. Otherwise, it is None. For an EnterNotify * event, if a child of the event window contains the final pointer position, * then the child component is set to that child. Otherwise, it is None." * * By inference, this means that only NotifyVirtual or NotifyNonlinearVirtual * events may have a subwindow set to other than None. * * - NotifyPointer events may be sent if the focus changes from window A to * B. The assumption used in this model is that NotifyPointer events are only * sent for the pointer paired with the keyboard that is involved in the focus * events. For example, if F(W) changes because of keyboard 2, then * NotifyPointer events are only sent for pointer 2. */ static WindowPtr PointerWindows[MAXDEVICES]; static WindowPtr FocusWindows[MAXDEVICES]; /** * Return TRUE if 'win' has a pointer within its boundaries, excluding child * window. */ static BOOL HasPointer(DeviceIntPtr dev, WindowPtr win) { int i; /* FIXME: The enter/leave model does not cater for grabbed devices. For * now, a quickfix: if the device about to send an enter/leave event to * a window is grabbed, assume there is no pointer in that window. * Fixes fdo 27804. * There isn't enough beer in my fridge to fix this properly. */ if (dev->deviceGrab.grab) return FALSE; for (i = 0; i < MAXDEVICES; i++) if (PointerWindows[i] == win) return TRUE; return FALSE; } /** * Return TRUE if at least one keyboard focus is set to 'win' (excluding * descendants of win). */ static BOOL HasFocus(WindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) if (FocusWindows[i] == win) return TRUE; return FALSE; } /** * Return the window the device dev is currently on. */ static WindowPtr PointerWin(DeviceIntPtr dev) { return PointerWindows[dev->id]; } /** * Search for the first window below 'win' that has a pointer directly within * its boundaries (excluding boundaries of its own descendants). * * @return The child window that has the pointer within its boundaries or * NULL. */ static WindowPtr FirstPointerChild(WindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) { if (PointerWindows[i] && IsParent(win, PointerWindows[i])) return PointerWindows[i]; } return NULL; } /** * Search for the first window below 'win' that has a focus directly within * its boundaries (excluding boundaries of its own descendants). * * @return The child window that has the pointer within its boundaries or * NULL. */ static WindowPtr FirstFocusChild(WindowPtr win) { int i; for (i = 0; i < MAXDEVICES; i++) { if (FocusWindows[i] && FocusWindows[i] != PointerRootWin && IsParent(win, FocusWindows[i])) return FocusWindows[i]; } return NULL; } /** * Set the presence flag for dev to mark that it is now in 'win'. */ void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode) { PointerWindows[dev->id] = win; } /** * Unset the presence flag for dev to mark that it is not in 'win' anymore. */ void LeaveWindow(DeviceIntPtr dev) { PointerWindows[dev->id] = NULL; } /** * Set the presence flag for dev to mark that it is now in 'win'. */ void SetFocusIn(DeviceIntPtr dev, WindowPtr win) { FocusWindows[dev->id] = win; } /** * Unset the presence flag for dev to mark that it is not in 'win' anymore. */ void SetFocusOut(DeviceIntPtr dev) { FocusWindows[dev->id] = NULL; } /** * Return the common ancestor of 'a' and 'b' (if one exists). * @param a A window with the same ancestor as b. * @param b A window with the same ancestor as a. * @return The window that is the first ancestor of both 'a' and 'b', or the * NullWindow if they do not have a common ancestor. */ static WindowPtr CommonAncestor(WindowPtr a, WindowPtr b) { for (b = b->parent; b; b = b->parent) if (IsParent(b, a)) return b; return NullWindow; } /** * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running up the window hierarchy. This function * recurses. */ static void DeviceEnterNotifies(DeviceIntPtr dev, int sourceid, WindowPtr ancestor, WindowPtr child, int mode, int detail) { WindowPtr parent = child->parent; if (ancestor == parent) return; DeviceEnterNotifies(dev, sourceid, ancestor, parent, mode, detail); DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, detail, parent, child->drawable.id); } /** * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running down the window hierarchy. This function * recurses. */ static void CoreEnterNotifies(DeviceIntPtr dev, WindowPtr ancestor, WindowPtr child, int mode, int detail) { WindowPtr parent = child->parent; if (ancestor == parent) return; CoreEnterNotifies(dev, ancestor, parent, mode, detail); /* Case 3: A is above W, B is a descendant Classically: The move generates an EnterNotify on W with a detail of Virtual or NonlinearVirtual MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, so the event should be suppressed Case 3B: Otherwise, if there is at least one other pointer in a descendant P(W) stays on the same descendant, or changes to a different descendant. The event should be suppressed. Case 3C: Otherwise: P(W) moves from a window above W to a descendant. The subwindow field is set to the child containing the descendant. The detail may need to be changed from Virtual to NonlinearVirtual depending on the previous P(W). */ if (!HasPointer(dev, parent) && !FirstPointerChild(parent)) CoreEnterLeaveEvent(dev, EnterNotify, mode, detail, parent, child->drawable.id); } static void CoreLeaveNotifies(DeviceIntPtr dev, WindowPtr child, WindowPtr ancestor, int mode, int detail) { WindowPtr win; if (ancestor == child) return; for (win = child->parent; win != ancestor; win = win->parent) { /*Case 7: A is a descendant of W, B is above W Classically: A LeaveNotify is generated on W with a detail of Virtual or NonlinearVirtual. MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, the event should be suppressed. Case 3B: Otherwise, if there is at least one other pointer in a descendant P(W) stays on the same descendant, or changes to a different descendant. The event should be suppressed. Case 3C: Otherwise: P(W) changes from the descendant of W to a window above W. The detail may need to be changed from Virtual to NonlinearVirtual or vice-versa depending on the new P(W). */ /* If one window has a pointer or a child with a pointer, skip some * work and exit. */ if (HasPointer(dev, win) || FirstPointerChild(win)) return; CoreEnterLeaveEvent(dev, LeaveNotify, mode, detail, win, child->drawable.id); child = win; } } /** * Send leave notifies to all windows between 'child' and 'ancestor'. * Events are sent running up the hierarchy. */ static void DeviceLeaveNotifies(DeviceIntPtr dev, int sourceid, WindowPtr child, WindowPtr ancestor, int mode, int detail) { WindowPtr win; if (ancestor == child) return; for (win = child->parent; win != ancestor; win = win->parent) { DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, detail, win, child->drawable.id); child = win; } } /** * Pointer dev moves from A to B and A neither a descendant of B nor is * B a descendant of A. */ static void CoreEnterLeaveNonLinear(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { WindowPtr X = CommonAncestor(A, B); /* Case 4: A is W, B is above W Classically: The move generates a LeaveNotify on W with a detail of Ancestor or Nonlinear MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, the event should be suppressed Case 3B: Otherwise, if there is at least one other pointer in a descendant of W P(W) changes from W to a descendant of W. The subwindow field is set to the child containing the new P(W), the detail field is set to Inferior Case 3C: Otherwise: The pointer window moves from W to a window above W. The detail may need to be changed from Ancestor to Nonlinear or vice versa depending on the the new P(W) */ if (!HasPointer(dev, A)) { WindowPtr child = FirstPointerChild(A); if (child) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); else CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyNonlinear, A, None); } CoreLeaveNotifies(dev, A, X, mode, NotifyNonlinearVirtual); /* Case 9: A is a descendant of W, B is a descendant of W Classically: No events are generated on W MPX: The pointer window stays the same or moves to a different descendant of W. No events should be generated on W. Therefore, no event to X. */ CoreEnterNotifies(dev, X, B, mode, NotifyNonlinearVirtual); /* Case 2: A is above W, B=W Classically: The move generates an EnterNotify on W with a detail of Ancestor or Nonlinear MPX: Case 2A: There is at least one other pointer on W itself P(W) doesn't change, so the event should be suppressed Case 2B: Otherwise, if there is at least one other pointer in a descendant P(W) moves from a descendant to W. detail is changed to Inferior, subwindow is set to the child containing the previous P(W) Case 2C: Otherwise: P(W) changes from a window above W to W itself. The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous P(W). */ if (!HasPointer(dev, B)) { WindowPtr child = FirstPointerChild(B); if (child) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); else CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyNonlinear, B, None); } } /** * Pointer dev moves from A to B and A is a descendant of B. */ static void CoreEnterLeaveToAncestor(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { /* Case 4: A is W, B is above W Classically: The move generates a LeaveNotify on W with a detail of Ancestor or Nonlinear MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, the event should be suppressed Case 3B: Otherwise, if there is at least one other pointer in a descendant of W P(W) changes from W to a descendant of W. The subwindow field is set to the child containing the new P(W), the detail field is set to Inferior Case 3C: Otherwise: The pointer window moves from W to a window above W. The detail may need to be changed from Ancestor to Nonlinear or vice versa depending on the the new P(W) */ if (!HasPointer(dev, A)) { WindowPtr child = FirstPointerChild(A); if (child) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); else CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyAncestor, A, None); } CoreLeaveNotifies(dev, A, B, mode, NotifyVirtual); /* Case 8: A is a descendant of W, B is W Classically: A EnterNotify is generated on W with a detail of NotifyInferior MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, the event should be suppressed Case 3B: Otherwise: P(W) changes from a descendant to W itself. The subwindow field should be set to the child containing the old P(W) <<< WRONG */ if (!HasPointer(dev, B)) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); } /** * Pointer dev moves from A to B and B is a descendant of A. */ static void CoreEnterLeaveToDescendant(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { /* Case 6: A is W, B is a descendant of W Classically: A LeaveNotify is generated on W with a detail of NotifyInferior MPX: Case 3A: There is at least one other pointer on W itself P(W) doesn't change, the event should be suppressed Case 3B: Otherwise: P(W) changes from W to a descendant of W. The subwindow field is set to the child containing the new P(W) <<< THIS IS WRONG */ if (!HasPointer(dev, A)) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); CoreEnterNotifies(dev, A, B, mode, NotifyVirtual); /* Case 2: A is above W, B=W Classically: The move generates an EnterNotify on W with a detail of Ancestor or Nonlinear MPX: Case 2A: There is at least one other pointer on W itself P(W) doesn't change, so the event should be suppressed Case 2B: Otherwise, if there is at least one other pointer in a descendant P(W) moves from a descendant to W. detail is changed to Inferior, subwindow is set to the child containing the previous P(W) Case 2C: Otherwise: P(W) changes from a window above W to W itself. The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous P(W). */ if (!HasPointer(dev, B)) { WindowPtr child = FirstPointerChild(B); if (child) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); else CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyAncestor, B, None); } } static void CoreEnterLeaveEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) { if (!IsMaster(dev)) return; LeaveWindow(dev); if (IsParent(from, to)) CoreEnterLeaveToDescendant(dev, from, to, mode); else if (IsParent(to, from)) CoreEnterLeaveToAncestor(dev, from, to, mode); else CoreEnterLeaveNonLinear(dev, from, to, mode); EnterWindow(dev, to, mode); } static void DeviceEnterLeaveEvents(DeviceIntPtr dev, int sourceid, WindowPtr from, WindowPtr to, int mode) { if (IsParent(from, to)) { DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyInferior, from, None); DeviceEnterNotifies(dev, sourceid, from, to, mode, NotifyVirtual); DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyAncestor, to, None); } else if (IsParent(to, from)) { DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyAncestor, from, None); DeviceLeaveNotifies(dev, sourceid, from, to, mode, NotifyVirtual); DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyInferior, to, None); } else { /* neither from nor to is descendent of the other */ WindowPtr common = CommonAncestor(to, from); /* common == NullWindow ==> different screens */ DeviceEnterLeaveEvent(dev, sourceid, XI_Leave, mode, NotifyNonlinear, from, None); DeviceLeaveNotifies(dev, sourceid, from, common, mode, NotifyNonlinearVirtual); DeviceEnterNotifies(dev, sourceid, common, to, mode, NotifyNonlinearVirtual); DeviceEnterLeaveEvent(dev, sourceid, XI_Enter, mode, NotifyNonlinear, to, None); } } /** * Figure out if enter/leave events are necessary and send them to the * appropriate windows. * * @param fromWin Window the sprite moved out of. * @param toWin Window the sprite moved into. */ void DoEnterLeaveEvents(DeviceIntPtr pDev, int sourceid, WindowPtr fromWin, WindowPtr toWin, int mode) { if (!IsPointerDevice(pDev)) return; if (fromWin == toWin) return; if (mode != XINotifyPassiveGrab && mode != XINotifyPassiveUngrab) CoreEnterLeaveEvents(pDev, fromWin, toWin, mode); DeviceEnterLeaveEvents(pDev, sourceid, fromWin, toWin, mode); } static void FixDeviceValuator(DeviceIntPtr dev, deviceValuator * ev, ValuatorClassPtr v, int first) { int nval = v->numAxes - first; ev->type = DeviceValuator; ev->deviceid = dev->id; ev->num_valuators = nval < 6 ? nval : 6; ev->first_valuator = first; switch (ev->num_valuators) { case 6: ev->valuator5 = v->axisVal[first + 5]; /* fallthrough */ case 5: ev->valuator4 = v->axisVal[first + 4]; /* fallthrough */ case 4: ev->valuator3 = v->axisVal[first + 3]; /* fallthrough */ case 3: ev->valuator2 = v->axisVal[first + 2]; /* fallthrough */ case 2: ev->valuator1 = v->axisVal[first + 1]; /* fallthrough */ case 1: ev->valuator0 = v->axisVal[first]; break; } } static void FixDeviceStateNotify(DeviceIntPtr dev, deviceStateNotify * ev, KeyClassPtr k, ButtonClassPtr b, ValuatorClassPtr v, int first) { ev->type = DeviceStateNotify; ev->deviceid = dev->id; ev->time = currentTime.milliseconds; ev->classes_reported = 0; ev->num_keys = 0; ev->num_buttons = 0; ev->num_valuators = 0; if (b) { ev->classes_reported |= (1 << ButtonClass); ev->num_buttons = b->numButtons; memcpy((char *) ev->buttons, (char *) b->down, 4); } if (k) { ev->classes_reported |= (1 << KeyClass); ev->num_keys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code; memmove((char *) &ev->keys[0], (char *) k->down, 4); } if (v) { int nval = v->numAxes - first; ev->classes_reported |= (1 << ValuatorClass); ev->classes_reported |= valuator_get_mode(dev, 0) << ModeBitsShift; ev->num_valuators = nval < 3 ? nval : 3; switch (ev->num_valuators) { case 3: ev->valuator2 = v->axisVal[first + 2]; /* fallthrough */ case 2: ev->valuator1 = v->axisVal[first + 1]; /* fallthrough */ case 1: ev->valuator0 = v->axisVal[first]; break; } } } /** * The device state notify event is split across multiple 32-byte events. * The first one contains the first 32 button state bits, the first 32 * key state bits, and the first 3 valuator values. * * If a device has more than that, the server sends out: * - one deviceButtonStateNotify for buttons 32 and above * - one deviceKeyStateNotify for keys 32 and above * - one deviceValuator event per 6 valuators above valuator 4 * * All events but the last one have the deviceid binary ORed with MORE_EVENTS, */ static void DeliverStateNotifyEvent(DeviceIntPtr dev, WindowPtr win) { /* deviceStateNotify, deviceKeyStateNotify, deviceButtonStateNotify * and one deviceValuator for each 6 valuators */ deviceStateNotify sev[3 + (MAX_VALUATORS + 6)/6]; int evcount = 1; deviceStateNotify *ev = sev; KeyClassPtr k; ButtonClassPtr b; ValuatorClassPtr v; int nval = 0, nkeys = 0, nbuttons = 0, first = 0; if (!(wOtherInputMasks(win)) || !(wOtherInputMasks(win)->inputEvents[dev->id] & DeviceStateNotifyMask)) return; if ((b = dev->button) != NULL) { nbuttons = b->numButtons; if (nbuttons > 32) /* first 32 are encoded in deviceStateNotify */ evcount++; } if ((k = dev->key) != NULL) { nkeys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code; if (nkeys > 32) /* first 32 are encoded in deviceStateNotify */ evcount++; } if ((v = dev->valuator) != NULL) { nval = v->numAxes; /* first three are encoded in deviceStateNotify, then * it's 6 per deviceValuator event */ evcount += ((nval - 3) + 6)/6; } BUG_RETURN(evcount <= ARRAY_SIZE(sev)); FixDeviceStateNotify(dev, ev, k, b, v, first); if (b != NULL && nbuttons > 32) { deviceButtonStateNotify *bev = (deviceButtonStateNotify *) ++ev; (ev - 1)->deviceid |= MORE_EVENTS; bev->type = DeviceButtonStateNotify; bev->deviceid = dev->id; memcpy((char *) &bev->buttons[0], (char *) &b->down[4], DOWN_LENGTH - 4); } if (k != NULL && nkeys > 32) { deviceKeyStateNotify *kev = (deviceKeyStateNotify *) ++ev; (ev - 1)->deviceid |= MORE_EVENTS; kev->type = DeviceKeyStateNotify; kev->deviceid = dev->id; memmove((char *) &kev->keys[0], (char *) &k->down[4], 28); } first = 3; nval -= 3; while (nval > 0) { ev->deviceid |= MORE_EVENTS; FixDeviceValuator(dev, (deviceValuator *) ++ev, v, first); first += 6; nval -= 6; } DeliverEventsToWindow(dev, win, (xEvent *) sev, evcount, DeviceStateNotifyMask, NullGrab); } void DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { deviceFocus event; xXIFocusInEvent *xi2event; DeviceIntPtr mouse; int btlen, len, i; mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER); /* XI 2 event contains the logical button map - maps are CARD8 * so we need 256 bits for the possibly maximum mapping */ btlen = (mouse->button) ? bits_to_bytes(256) : 0; btlen = bytes_to_int32(btlen); len = sizeof(xXIFocusInEvent) + btlen * 4; xi2event = calloc(1, len); xi2event->type = GenericEvent; xi2event->extension = IReqCode; xi2event->evtype = type; xi2event->length = bytes_to_int32(len - sizeof(xEvent)); xi2event->buttons_len = btlen; xi2event->detail = detail; xi2event->time = currentTime.milliseconds; xi2event->deviceid = dev->id; xi2event->sourceid = dev->id; /* a device doesn't change focus by itself */ xi2event->mode = mode; xi2event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x); xi2event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y); for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) if (BitIsOn(mouse->button->down, i)) SetBit(&xi2event[1], mouse->button->map[i]); if (dev->key) { xi2event->mods.base_mods = dev->key->xkbInfo->state.base_mods; xi2event->mods.latched_mods = dev->key->xkbInfo->state.latched_mods; xi2event->mods.locked_mods = dev->key->xkbInfo->state.locked_mods; xi2event->mods.effective_mods = dev->key->xkbInfo->state.mods; xi2event->group.base_group = dev->key->xkbInfo->state.base_group; xi2event->group.latched_group = dev->key->xkbInfo->state.latched_group; xi2event->group.locked_group = dev->key->xkbInfo->state.locked_group; xi2event->group.effective_group = dev->key->xkbInfo->state.group; } FixUpEventFromWindow(dev->spriteInfo->sprite, (xEvent *) xi2event, pWin, None, FALSE); DeliverEventsToWindow(dev, pWin, (xEvent *) xi2event, 1, GetEventFilter(dev, (xEvent *) xi2event), NullGrab); free(xi2event); /* XI 1.x event */ event = (deviceFocus) { .deviceid = dev->id, .mode = mode, .type = (type == XI_FocusIn) ? DeviceFocusIn : DeviceFocusOut, .detail = detail, .window = pWin->drawable.id, .time = currentTime.milliseconds }; DeliverEventsToWindow(dev, pWin, (xEvent *) &event, 1, DeviceFocusChangeMask, NullGrab); if (event.type == DeviceFocusIn) DeliverStateNotifyEvent(dev, pWin); } /** * Send focus out events to all windows between 'child' and 'ancestor'. * Events are sent running up the hierarchy. */ static void DeviceFocusOutEvents(DeviceIntPtr dev, WindowPtr child, WindowPtr ancestor, int mode, int detail) { WindowPtr win; if (ancestor == child) return; for (win = child->parent; win != ancestor; win = win->parent) DeviceFocusEvent(dev, XI_FocusOut, mode, detail, win); } /** * Send enter notifies to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running up the window hierarchy. This function * recurses. */ static void DeviceFocusInEvents(DeviceIntPtr dev, WindowPtr ancestor, WindowPtr child, int mode, int detail) { WindowPtr parent = child->parent; if (ancestor == parent || !parent) return; DeviceFocusInEvents(dev, ancestor, parent, mode, detail); DeviceFocusEvent(dev, XI_FocusIn, mode, detail, parent); } /** * Send FocusIn events to all windows between 'ancestor' and 'child' (excluding * both). Events are sent running down the window hierarchy. This function * recurses. */ static void CoreFocusInEvents(DeviceIntPtr dev, WindowPtr ancestor, WindowPtr child, int mode, int detail) { WindowPtr parent = child->parent; if (ancestor == parent) return; CoreFocusInEvents(dev, ancestor, parent, mode, detail); /* Case 3: A is above W, B is a descendant Classically: The move generates an FocusIn on W with a detail of Virtual or NonlinearVirtual MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, so the event should be suppressed Case 3B: Otherwise, if there is at least one other focus in a descendant F(W) stays on the same descendant, or changes to a different descendant. The event should be suppressed. Case 3C: Otherwise: F(W) moves from a window above W to a descendant. The detail may need to be changed from Virtual to NonlinearVirtual depending on the previous F(W). */ if (!HasFocus(parent) && !FirstFocusChild(parent)) CoreFocusEvent(dev, FocusIn, mode, detail, parent); } static void CoreFocusOutEvents(DeviceIntPtr dev, WindowPtr child, WindowPtr ancestor, int mode, int detail) { WindowPtr win; if (ancestor == child) return; for (win = child->parent; win != ancestor; win = win->parent) { /*Case 7: A is a descendant of W, B is above W Classically: A FocusOut is generated on W with a detail of Virtual or NonlinearVirtual. MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, the event should be suppressed. Case 3B: Otherwise, if there is at least one other focus in a descendant F(W) stays on the same descendant, or changes to a different descendant. The event should be suppressed. Case 3C: Otherwise: F(W) changes from the descendant of W to a window above W. The detail may need to be changed from Virtual to NonlinearVirtual or vice-versa depending on the new P(W). */ /* If one window has a focus or a child with a focuspointer, skip some * work and exit. */ if (HasFocus(win) || FirstFocusChild(win)) return; CoreFocusEvent(dev, FocusOut, mode, detail, win); } } /** * Send FocusOut(NotifyPointer) events from the current pointer window (which * is a descendant of pwin_parent) up to (excluding) pwin_parent. * * NotifyPointer events are only sent for the device paired with dev. * * If the current pointer window is a descendant of 'exclude' or an ancestor of * 'exclude', no events are sent. If the current pointer IS 'exclude', events * are sent! */ static void CoreFocusOutNotifyPointerEvents(DeviceIntPtr dev, WindowPtr pwin_parent, WindowPtr exclude, int mode, int inclusive) { WindowPtr P, stopAt; P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); if (!P) return; if (!IsParent(pwin_parent, P)) if (!(pwin_parent == P && inclusive)) return; if (exclude != None && exclude != PointerRootWin && (IsParent(exclude, P) || IsParent(P, exclude))) return; stopAt = (inclusive) ? pwin_parent->parent : pwin_parent; for (; P && P != stopAt; P = P->parent) CoreFocusEvent(dev, FocusOut, mode, NotifyPointer, P); } /** * DO NOT CALL DIRECTLY. * Recursion helper for CoreFocusInNotifyPointerEvents. */ static void CoreFocusInRecurse(DeviceIntPtr dev, WindowPtr win, WindowPtr stopAt, int mode, int inclusive) { if ((!inclusive && win == stopAt) || !win) return; CoreFocusInRecurse(dev, win->parent, stopAt, mode, inclusive); CoreFocusEvent(dev, FocusIn, mode, NotifyPointer, win); } /** * Send FocusIn(NotifyPointer) events from pwin_parent down to * including the current pointer window (which is a descendant of pwin_parent). * * @param pwin The pointer window. * @param exclude If the pointer window is a child of 'exclude', no events are * sent. * @param inclusive If TRUE, pwin_parent will receive the event too. */ static void CoreFocusInNotifyPointerEvents(DeviceIntPtr dev, WindowPtr pwin_parent, WindowPtr exclude, int mode, int inclusive) { WindowPtr P; P = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); if (!P || P == exclude || (pwin_parent != P && !IsParent(pwin_parent, P))) return; if (exclude != None && (IsParent(exclude, P) || IsParent(P, exclude))) return; CoreFocusInRecurse(dev, P, pwin_parent, mode, inclusive); } /** * Focus of dev moves from A to B and A neither a descendant of B nor is * B a descendant of A. */ static void CoreFocusNonLinear(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { WindowPtr X = CommonAncestor(A, B); /* Case 4: A is W, B is above W Classically: The change generates a FocusOut on W with a detail of Ancestor or Nonlinear MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, the event should be suppressed Case 3B: Otherwise, if there is at least one other focus in a descendant of W F(W) changes from W to a descendant of W. The detail field is set to Inferior Case 3C: Otherwise: The focus window moves from W to a window above W. The detail may need to be changed from Ancestor to Nonlinear or vice versa depending on the the new F(W) */ if (!HasFocus(A)) { WindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is child or below */ CoreFocusOutNotifyPointerEvents(dev, A, child, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); } else { /* NotifyPointer P-A */ CoreFocusOutNotifyPointerEvents(dev, A, None, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyNonlinear, A); } } CoreFocusOutEvents(dev, A, X, mode, NotifyNonlinearVirtual); /* Case 9: A is a descendant of W, B is a descendant of W Classically: No events are generated on W MPX: The focus window stays the same or moves to a different descendant of W. No events should be generated on W. Therefore, no event to X. */ CoreFocusInEvents(dev, X, B, mode, NotifyNonlinearVirtual); /* Case 2: A is above W, B=W Classically: The move generates an EnterNotify on W with a detail of Ancestor or Nonlinear MPX: Case 2A: There is at least one other focus on W itself F(W) doesn't change, so the event should be suppressed Case 2B: Otherwise, if there is at least one other focus in a descendant F(W) moves from a descendant to W. detail is changed to Inferior. Case 2C: Otherwise: F(W) changes from a window above W to W itself. The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous F(W). */ if (!HasFocus(B)) { WindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); /* NotifyPointer B-P unless P is child or below. */ CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); } else { CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinear, B); /* NotifyPointer B-P unless P is child or below. */ CoreFocusInNotifyPointerEvents(dev, B, None, mode, FALSE); } } } /** * Focus of dev moves from A to B and A is a descendant of B. */ static void CoreFocusToAncestor(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { /* Case 4: A is W, B is above W Classically: The change generates a FocusOut on W with a detail of Ancestor or Nonlinear MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, the event should be suppressed Case 3B: Otherwise, if there is at least one other focus in a descendant of W F(W) changes from W to a descendant of W. The detail field is set to Inferior Case 3C: Otherwise: The focus window moves from W to a window above W. The detail may need to be changed from Ancestor to Nonlinear or vice versa depending on the the new F(W) */ if (!HasFocus(A)) { WindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is child or below */ CoreFocusOutNotifyPointerEvents(dev, A, child, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); } else CoreFocusEvent(dev, FocusOut, mode, NotifyAncestor, A); } CoreFocusOutEvents(dev, A, B, mode, NotifyVirtual); /* Case 8: A is a descendant of W, B is W Classically: A FocusOut is generated on W with a detail of NotifyInferior MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, the event should be suppressed Case 3B: Otherwise: F(W) changes from a descendant to W itself. */ if (!HasFocus(B)) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); /* NotifyPointer B-P unless P is A or below. */ CoreFocusInNotifyPointerEvents(dev, B, A, mode, FALSE); } } /** * Focus of dev moves from A to B and B is a descendant of A. */ static void CoreFocusToDescendant(DeviceIntPtr dev, WindowPtr A, WindowPtr B, int mode) { /* Case 6: A is W, B is a descendant of W Classically: A FocusOut is generated on W with a detail of NotifyInferior MPX: Case 3A: There is at least one other focus on W itself F(W) doesn't change, the event should be suppressed Case 3B: Otherwise: F(W) changes from W to a descendant of W. */ if (!HasFocus(A)) { /* NotifyPointer P-A unless P is B or below */ CoreFocusOutNotifyPointerEvents(dev, A, B, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); } CoreFocusInEvents(dev, A, B, mode, NotifyVirtual); /* Case 2: A is above W, B=W Classically: The move generates an FocusIn on W with a detail of Ancestor or Nonlinear MPX: Case 2A: There is at least one other focus on W itself F(W) doesn't change, so the event should be suppressed Case 2B: Otherwise, if there is at least one other focus in a descendant F(W) moves from a descendant to W. detail is changed to Inferior. Case 2C: Otherwise: F(W) changes from a window above W to W itself. The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous F(W). */ if (!HasFocus(B)) { WindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); /* NotifyPointer B-P unless P is child or below. */ CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); } else CoreFocusEvent(dev, FocusIn, mode, NotifyAncestor, B); } } static BOOL HasOtherPointer(WindowPtr win, DeviceIntPtr exclude) { int i; for (i = 0; i < MAXDEVICES; i++) if (i != exclude->id && PointerWindows[i] == win) return TRUE; return FALSE; } /** * Focus moves from PointerRoot to None or from None to PointerRoot. * Assumption: Neither A nor B are valid windows. */ static void CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, WindowPtr A, /* PointerRootWin or NoneWin */ WindowPtr B, /* NoneWin or PointerRootWin */ int mode) { WindowPtr root; int i; int nscreens = screenInfo.numScreens; #ifdef PANORAMIX if (!noPanoramiXExtension) nscreens = 1; #endif for (i = 0; i < nscreens; i++) { root = screenInfo.screens[i]->root; if (!HasOtherPointer(root, GetMaster(dev, POINTER_OR_FLOAT)) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and * the pointer paired with dev is below the current root window, * do a NotifyPointer run. */ if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) { WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); if (ptrwin && IsParent(root, ptrwin)) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root); CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root); if (B == PointerRootWin) CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); } } } /** * Focus moves from window A to PointerRoot or to None. * Assumption: A is a valid window and not PointerRoot or None. */ static void CoreFocusToPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, WindowPtr B, /* PointerRootWin or NoneWin */ int mode) { WindowPtr root; int i; int nscreens = screenInfo.numScreens; #ifdef PANORAMIX if (!noPanoramiXExtension) nscreens = 1; #endif if (!HasFocus(A)) { WindowPtr child = FirstFocusChild(A); if (child) { /* NotifyPointer P-A unless P is B or below */ CoreFocusOutNotifyPointerEvents(dev, A, B, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyInferior, A); } else { /* NotifyPointer P-A */ CoreFocusOutNotifyPointerEvents(dev, A, None, mode, FALSE); CoreFocusEvent(dev, FocusOut, mode, NotifyNonlinear, A); } } /* NullWindow means we include the root window */ CoreFocusOutEvents(dev, A, NullWindow, mode, NotifyNonlinearVirtual); for (i = 0; i < nscreens; i++) { root = screenInfo.screens[i]->root; if (!HasFocus(root) && !FirstFocusChild(root)) { CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root); if (B == PointerRootWin) CoreFocusInNotifyPointerEvents(dev, root, None, mode, TRUE); } } } /** * Focus moves from PointerRoot or None to a window B. * Assumption: B is a valid window and not PointerRoot or None. */ static void CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, WindowPtr A, /* PointerRootWin or NoneWin */ WindowPtr B, int mode) { WindowPtr root; int i; int nscreens = screenInfo.numScreens; #ifdef PANORAMIX if (!noPanoramiXExtension) nscreens = 1; #endif for (i = 0; i < nscreens; i++) { root = screenInfo.screens[i]->root; if (!HasFocus(root) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and * the pointer paired with dev is below the current root window, * do a NotifyPointer run. */ if (dev->focus && dev->focus->win == PointerRootWin && B != PointerRootWin) { WindowPtr ptrwin = PointerWin(GetMaster(dev, POINTER_OR_FLOAT)); if (ptrwin) CoreFocusOutNotifyPointerEvents(dev, root, None, mode, TRUE); } CoreFocusEvent(dev, FocusOut, mode, A ? NotifyPointerRoot : NotifyDetailNone, root); } } root = B; /* get B's root window */ while (root->parent) root = root->parent; if (B != root) { CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinearVirtual, root); CoreFocusInEvents(dev, root, B, mode, NotifyNonlinearVirtual); } if (!HasFocus(B)) { WindowPtr child = FirstFocusChild(B); if (child) { CoreFocusEvent(dev, FocusIn, mode, NotifyInferior, B); /* NotifyPointer B-P unless P is child or below. */ CoreFocusInNotifyPointerEvents(dev, B, child, mode, FALSE); } else { CoreFocusEvent(dev, FocusIn, mode, NotifyNonlinear, B); /* NotifyPointer B-P unless P is child or below. */ CoreFocusInNotifyPointerEvents(dev, B, None, mode, FALSE); } } } static void CoreFocusEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) { if (!IsMaster(dev)) return; SetFocusOut(dev); if (((to == NullWindow) || (to == PointerRootWin)) && ((from == NullWindow) || (from == PointerRootWin))) CoreFocusPointerRootNoneSwitch(dev, from, to, mode); else if ((to == NullWindow) || (to == PointerRootWin)) CoreFocusToPointerRootOrNone(dev, from, to, mode); else if ((from == NullWindow) || (from == PointerRootWin)) CoreFocusFromPointerRootOrNone(dev, from, to, mode); else if (IsParent(from, to)) CoreFocusToDescendant(dev, from, to, mode); else if (IsParent(to, from)) CoreFocusToAncestor(dev, from, to, mode); else CoreFocusNonLinear(dev, from, to, mode); SetFocusIn(dev, to); } static void DeviceFocusEvents(DeviceIntPtr dev, WindowPtr from, WindowPtr to, int mode) { int out, in; /* for holding details for to/from PointerRoot/None */ int i; int nscreens = screenInfo.numScreens; SpritePtr sprite = dev->spriteInfo->sprite; if (from == to) return; out = (from == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; in = (to == NoneWin) ? NotifyDetailNone : NotifyPointerRoot; /* wrong values if neither, but then not referenced */ #ifdef PANORAMIX if (!noPanoramiXExtension) nscreens = 1; #endif if ((to == NullWindow) || (to == PointerRootWin)) { if ((from == NullWindow) || (from == PointerRootWin)) { if (from == PointerRootWin) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyPointer, sprite->win); DeviceFocusOutEvents(dev, sprite->win, GetCurrentRootWindow(dev), mode, NotifyPointer); } /* Notify all the roots */ for (i = 0; i < nscreens; i++) DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root); } else { if (IsParent(from, sprite->win)) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyPointer, sprite->win); DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); } DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); /* next call catches the root too, if the screen changed */ DeviceFocusOutEvents(dev, from, NullWindow, mode, NotifyNonlinearVirtual); } /* Notify all the roots */ for (i = 0; i < nscreens; i++) DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); if (to == PointerRootWin) { DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), sprite->win, mode, NotifyPointer); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyPointer, sprite->win); } } else { if ((from == NullWindow) || (from == PointerRootWin)) { if (from == PointerRootWin) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyPointer, sprite->win); DeviceFocusOutEvents(dev, sprite->win, GetCurrentRootWindow(dev), mode, NotifyPointer); } for (i = 0; i < nscreens; i++) DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root); if (to->parent != NullWindow) DeviceFocusInEvents(dev, GetCurrentRootWindow(dev), to, mode, NotifyNonlinearVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); } else { if (IsParent(to, from)) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyAncestor, from); DeviceFocusOutEvents(dev, from, to, mode, NotifyVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyInferior, to); if ((IsParent(to, sprite->win)) && (sprite->win != from) && (!IsParent(from, sprite->win)) && (!IsParent(sprite->win, from))) DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); } else if (IsParent(from, to)) { if ((IsParent(from, sprite->win)) && (sprite->win != from) && (!IsParent(to, sprite->win)) && (!IsParent(sprite->win, to))) { DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyPointer, sprite->win); DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); } DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyInferior, from); DeviceFocusInEvents(dev, from, to, mode, NotifyVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyAncestor, to); } else { /* neither from or to is child of other */ WindowPtr common = CommonAncestor(to, from); /* common == NullWindow ==> different screens */ if (IsParent(from, sprite->win)) DeviceFocusOutEvents(dev, sprite->win, from, mode, NotifyPointer); DeviceFocusEvent(dev, XI_FocusOut, mode, NotifyNonlinear, from); if (from->parent != NullWindow) DeviceFocusOutEvents(dev, from, common, mode, NotifyNonlinearVirtual); if (to->parent != NullWindow) DeviceFocusInEvents(dev, common, to, mode, NotifyNonlinearVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); if (IsParent(to, sprite->win)) DeviceFocusInEvents(dev, to, sprite->win, mode, NotifyPointer); } } } } /** * Figure out if focus events are necessary and send them to the * appropriate windows. * * @param from Window the focus moved out of. * @param to Window the focus moved into. */ void DoFocusEvents(DeviceIntPtr pDev, WindowPtr from, WindowPtr to, int mode) { if (!IsKeyboardDevice(pDev)) return; if (from == to && mode != NotifyGrab && mode != NotifyUngrab) return; CoreFocusEvents(pDev, from, to, mode); DeviceFocusEvents(pDev, from, to, mode); } xorg-server-21.1.16/dix/enterleave.h0000644000175000017500000000522114757411105012722 /* * Copyright © 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef ENTERLEAVE_H #define ENTERLEAVE_H #include /* DoFocusEvents() */ extern void DoEnterLeaveEvents(DeviceIntPtr pDev, int sourceid, WindowPtr fromWin, WindowPtr toWin, int mode); extern void EnterLeaveEvent(DeviceIntPtr mouse, int type, int mode, int detail, WindowPtr pWin, Window child); extern void CoreEnterLeaveEvent(DeviceIntPtr mouse, int type, int mode, int detail, WindowPtr pWin, Window child); extern void DeviceEnterLeaveEvent(DeviceIntPtr mouse, int sourceid, int type, int mode, int detail, WindowPtr pWin, Window child); extern void DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail , WindowPtr pWin); extern void EnterWindow(DeviceIntPtr dev, WindowPtr win, int mode); extern void CoreFocusEvent(DeviceIntPtr kbd, int type, int mode, int detail, WindowPtr pWin); extern void SetFocusIn(DeviceIntPtr kbd, WindowPtr win); extern void SetFocusOut(DeviceIntPtr dev); #endif /* _ENTERLEAVE_H_ */ xorg-server-21.1.16/dix/events.c0000644000175000017500000061220714757411105012077 /************************************************************ 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. ********************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ /* * Copyright (c) 2003-2005, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** @file events.c * This file handles event delivery and a big part of the server-side protocol * handling (the parts for input devices). */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "resource.h" #include #include "windowstr.h" #include "inputstr.h" #include "inpututils.h" #include "scrnintstr.h" #include "cursorstr.h" #include "dixstruct.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include "globals.h" #include #include "xkbsrv.h" #include "xace.h" #include "probes.h" #include #include #include #include #include "exglobals.h" #include "exevents.h" #include "extnsionst.h" #include "dixevents.h" #include "dixgrabs.h" #include "dispatch.h" #include #include "geext.h" #include "geint.h" #include "eventstr.h" #include "enterleave.h" #include "eventconvert.h" #include "mi.h" /* Extension events type numbering starts at EXTENSION_EVENT_BASE. */ #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ #define StructureAndSubMask ( StructureNotifyMask | SubstructureNotifyMask ) #define AllButtonsMask ( \ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) #define MotionMask ( \ PointerMotionMask | Button1MotionMask | \ Button2MotionMask | Button3MotionMask | Button4MotionMask | \ Button5MotionMask | ButtonMotionMask ) #define PropagateMask ( \ KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | \ MotionMask ) #define PointerGrabMask ( \ ButtonPressMask | ButtonReleaseMask | \ EnterWindowMask | LeaveWindowMask | \ PointerMotionHintMask | KeymapStateMask | \ MotionMask ) #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) #define LastEventMask OwnerGrabButtonMask #define AllEventMasks (LastEventMask|(LastEventMask-1)) /* @return the core event type or 0 if the event is not a core event */ static inline int core_get_type(const xEvent *event) { int type = event->u.u.type; return ((type & EXTENSION_EVENT_BASE) || type == GenericEvent) ? 0 : type; } /* @return the XI2 event type or 0 if the event is not a XI2 event */ static inline int xi2_get_type(const xEvent *event) { const xGenericEvent *e = (const xGenericEvent *) event; return (e->type != GenericEvent || e->extension != IReqCode) ? 0 : e->evtype; } /** * Used to indicate a implicit passive grab created by a ButtonPress event. * See DeliverEventsToWindow(). */ #define ImplicitGrabMask (1 << 7) #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define XE_KBPTR (xE->u.keyButtonPointer) CallbackListPtr EventCallback; CallbackListPtr DeviceEventCallback; #define DNPMCOUNT 8 Mask DontPropagateMasks[DNPMCOUNT]; static int DontPropagateRefCnts[DNPMCOUNT]; static void CheckVirtualMotion(DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin); static void CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, Bool confineToScreen, ScreenPtr pScreen); static Bool IsWrongPointerBarrierClient(ClientPtr client, DeviceIntPtr dev, xEvent *event); /** Key repeat hack. Do not use but in TryClientEvents */ extern BOOL EventIsKeyRepeat(xEvent *event); /** * Main input device struct. * inputInfo.pointer * is the core pointer. Referred to as "virtual core pointer", "VCP", * "core pointer" or inputInfo.pointer. The VCP is the first master * pointer device and cannot be deleted. * * inputInfo.keyboard * is the core keyboard ("virtual core keyboard", "VCK", "core keyboard"). * See inputInfo.pointer. * * inputInfo.devices * linked list containing all devices including VCP and VCK. * * inputInfo.off_devices * Devices that have not been initialized and are thus turned off. * * inputInfo.numDevices * Total number of devices. * * inputInfo.all_devices * Virtual device used for XIAllDevices passive grabs. This device is * not part of the inputInfo.devices list and mostly unset except for * the deviceid. It exists because passivegrabs need a valid device * reference. * * inputInfo.all_master_devices * Virtual device used for XIAllMasterDevices passive grabs. This device * is not part of the inputInfo.devices list and mostly unset except for * the deviceid. It exists because passivegrabs need a valid device * reference. */ InputInfo inputInfo; EventSyncInfoRec syncEvents; static struct DeviceEventTime { Bool reset; TimeStamp time; } lastDeviceEventTime[MAXDEVICES]; /** * The root window the given device is currently on. */ #define RootWindow(sprite) sprite->spriteTrace[0] static xEvent *swapEvent = NULL; static int swapEventLen = 0; void NotImplemented(xEvent *from, xEvent *to) { FatalError("Not implemented"); } /** * Convert the given event type from an XI event to a core event. * @param[in] The XI 1.x event type. * @return The matching core event type or 0 if there is none. */ int XItoCoreType(int xitype) { int coretype = 0; if (xitype == DeviceMotionNotify) coretype = MotionNotify; else if (xitype == DeviceButtonPress) coretype = ButtonPress; else if (xitype == DeviceButtonRelease) coretype = ButtonRelease; else if (xitype == DeviceKeyPress) coretype = KeyPress; else if (xitype == DeviceKeyRelease) coretype = KeyRelease; return coretype; } /** * @return true if the device owns a cursor, false if device shares a cursor * sprite with another device. */ Bool DevHasCursor(DeviceIntPtr pDev) { return pDev->spriteInfo->spriteOwner; } /* * @return true if a device is a pointer, check is the same as used by XI to * fill the 'use' field. */ Bool IsPointerDevice(DeviceIntPtr dev) { return (dev->type == MASTER_POINTER) || (dev->valuator && dev->button) || (dev->valuator && !dev->key); } /* * @return true if a device is a keyboard, check is the same as used by XI to * fill the 'use' field. * * Some pointer devices have keys as well (e.g. multimedia keys). Try to not * count them as keyboard devices. */ Bool IsKeyboardDevice(DeviceIntPtr dev) { return (dev->type == MASTER_KEYBOARD) || ((dev->key && dev->kbdfeed) && !IsPointerDevice(dev)); } Bool IsMaster(DeviceIntPtr dev) { return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD; } Bool IsFloating(DeviceIntPtr dev) { return !IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL; } /** * Max event opcode. */ extern int lastEvent; #define CantBeFiltered NoEventMask /** * Event masks for each event type. * * One set of filters for each device, initialized by memcpy of * default_filter in InitEvents. * * Filters are used whether a given event may be delivered to a client, * usually in the form of if (window-event-mask & filter); then deliver event. * * One notable filter is for PointerMotion/DevicePointerMotion events. Each * time a button is pressed, the filter is modified to also contain the * matching ButtonXMotion mask. */ Mask event_filters[MAXDEVICES][MAXEVENTS]; static const Mask default_filter[MAXEVENTS] = { NoSuchEvent, /* 0 */ NoSuchEvent, /* 1 */ KeyPressMask, /* KeyPress */ KeyReleaseMask, /* KeyRelease */ ButtonPressMask, /* ButtonPress */ ButtonReleaseMask, /* ButtonRelease */ PointerMotionMask, /* MotionNotify (initial state) */ EnterWindowMask, /* EnterNotify */ LeaveWindowMask, /* LeaveNotify */ FocusChangeMask, /* FocusIn */ FocusChangeMask, /* FocusOut */ KeymapStateMask, /* KeymapNotify */ ExposureMask, /* Expose */ CantBeFiltered, /* GraphicsExpose */ CantBeFiltered, /* NoExpose */ VisibilityChangeMask, /* VisibilityNotify */ SubstructureNotifyMask, /* CreateNotify */ StructureAndSubMask, /* DestroyNotify */ StructureAndSubMask, /* UnmapNotify */ StructureAndSubMask, /* MapNotify */ SubstructureRedirectMask, /* MapRequest */ StructureAndSubMask, /* ReparentNotify */ StructureAndSubMask, /* ConfigureNotify */ SubstructureRedirectMask, /* ConfigureRequest */ StructureAndSubMask, /* GravityNotify */ ResizeRedirectMask, /* ResizeRequest */ StructureAndSubMask, /* CirculateNotify */ SubstructureRedirectMask, /* CirculateRequest */ PropertyChangeMask, /* PropertyNotify */ CantBeFiltered, /* SelectionClear */ CantBeFiltered, /* SelectionRequest */ CantBeFiltered, /* SelectionNotify */ ColormapChangeMask, /* ColormapNotify */ CantBeFiltered, /* ClientMessage */ CantBeFiltered /* MappingNotify */ }; /** * For the given event, return the matching event filter. This filter may then * be AND'ed with the selected event mask. * * For XI2 events, the returned filter is simply the byte containing the event * mask we're interested in. E.g. for a mask of (1 << 13), this would be * byte[1]. * * @param[in] dev The device the event belongs to, may be NULL. * @param[in] event The event to get the filter for. Only the type of the * event matters, or the extension + evtype for GenericEvents. * @return The filter mask for the given event. * * @see GetEventMask */ Mask GetEventFilter(DeviceIntPtr dev, xEvent *event) { int evtype = 0; if (event->u.u.type != GenericEvent) return event_get_filter_from_type(dev, event->u.u.type); else if ((evtype = xi2_get_type(event))) return event_get_filter_from_xi2type(evtype); ErrorF("[dix] Unknown event type %d. No filter\n", event->u.u.type); return 0; } /** * Return the single byte of the device's XI2 mask that contains the mask * for the event_type. */ int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type) { /* we just return the matching filter because that's the only use * for this mask anyway. */ if (xi2mask_isset(mask, dev, event_type)) return event_get_filter_from_xi2type(event_type); else return 0; } /** * @return TRUE if the mask is set for this event from this device on the * window, or FALSE otherwise. */ Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev) { OtherInputMasks *inputMasks = wOtherInputMasks(win); int evtype; if (!inputMasks || xi2_get_type(ev) == 0) return 0; evtype = ((xGenericEvent *) ev)->evtype; return xi2mask_isset(inputMasks->xi2mask, dev, evtype); } /** * When processing events we operate on InternalEvent pointers. They may actually refer to a * an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent * union. This works well in practice because we always look into event type before doing anything, * except in the case of copying the event. Any copying of InternalEvent should use this function * instead of doing *dst_event = *src_event whenever it's not clear whether source event actually * points to full InternalEvent instance. */ void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event) { memcpy(dst_event, src_event, src_event->any.length); } Mask GetEventMask(DeviceIntPtr dev, xEvent *event, InputClients * other) { int evtype; /* XI2 filters are only ever 8 bit, so let's return a 8 bit mask */ if ((evtype = xi2_get_type(event))) { return GetXI2MaskByte(other->xi2mask, dev, evtype); } else if (core_get_type(event) != 0) return other->mask[XIAllDevices]; else return other->mask[dev->id]; } static CARD8 criticalEvents[32] = { 0x7c, 0x30, 0x40 /* key, button, expose, and configure events */ }; static void SyntheticMotion(DeviceIntPtr dev, int x, int y) { int screenno = 0; #ifdef PANORAMIX if (!noPanoramiXExtension) screenno = dev->spriteInfo->sprite->screen->myNum; #endif PostSyntheticMotion(dev, x, y, screenno, (syncEvents.playingEvents) ? syncEvents.time. milliseconds : currentTime.milliseconds); } #ifdef PANORAMIX static void PostNewCursor(DeviceIntPtr pDev); static Bool XineramaSetCursorPosition(DeviceIntPtr pDev, int x, int y, Bool generateEvent) { ScreenPtr pScreen; int i; SpritePtr pSprite = pDev->spriteInfo->sprite; /* x,y are in Screen 0 coordinates. We need to decide what Screen to send the message too and what the coordinates relative to that screen are. */ pScreen = pSprite->screen; x += screenInfo.screens[0]->x; y += screenInfo.screens[0]->y; if (!point_on_screen(pScreen, x, y)) { FOR_NSCREENS(i) { if (i == pScreen->myNum) continue; if (point_on_screen(screenInfo.screens[i], x, y)) { pScreen = screenInfo.screens[i]; break; } } } pSprite->screen = pScreen; pSprite->hotPhys.x = x - screenInfo.screens[0]->x; pSprite->hotPhys.y = y - screenInfo.screens[0]->y; x -= pScreen->x; y -= pScreen->y; return (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); } static void XineramaConstrainCursor(DeviceIntPtr pDev) { SpritePtr pSprite = pDev->spriteInfo->sprite; ScreenPtr pScreen; BoxRec newBox; pScreen = pSprite->screen; newBox = pSprite->physLimits; /* Translate the constraining box to the screen the sprite is actually on */ newBox.x1 += screenInfo.screens[0]->x - pScreen->x; newBox.x2 += screenInfo.screens[0]->x - pScreen->x; newBox.y1 += screenInfo.screens[0]->y - pScreen->y; newBox.y2 += screenInfo.screens[0]->y - pScreen->y; (*pScreen->ConstrainCursor) (pDev, pScreen, &newBox); } static Bool XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; if (pWin == screenInfo.screens[0]->root) { int i; FOR_NSCREENS(i) pSprite->windows[i] = screenInfo.screens[i]->root; } else { PanoramiXRes *win; int rc, i; rc = dixLookupResourceByType((void **) &win, pWin->drawable.id, XRT_WINDOW, serverClient, DixReadAccess); if (rc != Success) return FALSE; FOR_NSCREENS(i) { rc = dixLookupWindow(pSprite->windows + i, win->info[i].id, serverClient, DixReadAccess); if (rc != Success) /* window is being unmapped */ return FALSE; } } return TRUE; } static void XineramaConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents) { SpritePtr pSprite = pDev->spriteInfo->sprite; int x, y, off_x, off_y, i; assert(!noPanoramiXExtension); if (!XineramaSetWindowPntrs(pDev, pWin)) return; i = PanoramiXNumScreens - 1; RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; while (i--) { x = off_x - screenInfo.screens[i]->x; y = off_y - screenInfo.screens[i]->y; if (x || y) RegionTranslate(&pSprite->Reg1, x, y); RegionUnion(&pSprite->Reg1, &pSprite->Reg1, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; } pSprite->hotLimits = *RegionExtents(&pSprite->Reg1); if (RegionNumRects(&pSprite->Reg1) > 1) pSprite->hotShape = &pSprite->Reg1; else pSprite->hotShape = NullRegion; pSprite->confined = FALSE; pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin; CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); } #endif /* PANORAMIX */ /** * Modifies the filter for the given protocol event type to the given masks. * * There's only two callers: UpdateDeviceState() and XI's SetMaskForExtEvent(). * The latter initialises masks for the matching XI events, it's a once-off * setting. * UDS however changes the mask for MotionNotify and DeviceMotionNotify each * time a button is pressed to include the matching ButtonXMotion mask in the * filter. * * @param[in] deviceid The device to modify the filter for. * @param[in] mask The new filter mask. * @param[in] event Protocol event type. */ void SetMaskForEvent(int deviceid, Mask mask, int event) { if (deviceid < 0 || deviceid >= MAXDEVICES) FatalError("SetMaskForEvent: bogus device id"); event_filters[deviceid][event] = mask; } void SetCriticalEvent(int event) { if (event >= MAXEVENTS) FatalError("SetCriticalEvent: bogus event number"); criticalEvents[event >> 3] |= 1 << (event & 7); } void ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) { BoxRec box; int x = *px, y = *py; int incx = 1, incy = 1; if (RegionContainsPoint(shape, x, y, &box)) return; box = *RegionExtents(shape); /* this is rather crude */ do { x += incx; if (x >= box.x2) { incx = -1; x = *px - 1; } else if (x < box.x1) { incx = 1; x = *px; y += incy; if (y >= box.y2) { incy = -1; y = *py - 1; } else if (y < box.y1) return; /* should never get here! */ } } while (!RegionContainsPoint(shape, x, y, &box)); *px = x; *py = y; } static void CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents, Bool confineToScreen, /* unused if PanoramiX on */ ScreenPtr pScreen) /* unused if PanoramiX on */ { HotSpot new; SpritePtr pSprite = pDev->spriteInfo->sprite; if (!cursor) return; new = pSprite->hotPhys; #ifdef PANORAMIX if (!noPanoramiXExtension) /* I don't care what the DDX has to say about it */ pSprite->physLimits = pSprite->hotLimits; else #endif { if (pScreen) new.pScreen = pScreen; else pScreen = new.pScreen; (*pScreen->CursorLimits) (pDev, pScreen, cursor, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = confineToScreen; (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); } /* constrain the pointer to those limits */ if (new.x < pSprite->physLimits.x1) new.x = pSprite->physLimits.x1; else if (new.x >= pSprite->physLimits.x2) new.x = pSprite->physLimits.x2 - 1; if (new.y < pSprite->physLimits.y1) new.y = pSprite->physLimits.y1; else if (new.y >= pSprite->physLimits.y2) new.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y); if (( #ifdef PANORAMIX noPanoramiXExtension && #endif (pScreen != pSprite->hotPhys.pScreen)) || (new.x != pSprite->hotPhys.x) || (new.y != pSprite->hotPhys.y)) { #ifdef PANORAMIX if (!noPanoramiXExtension) XineramaSetCursorPosition(pDev, new.x, new.y, generateEvents); else #endif { if (pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys = new; (*pScreen->SetCursorPosition) (pDev, pScreen, new.x, new.y, generateEvents); } if (!generateEvents) SyntheticMotion(pDev, new.x, new.y); } #ifdef PANORAMIX /* Tell DDX what the limits are */ if (!noPanoramiXExtension) XineramaConstrainCursor(pDev); #endif } static void CheckVirtualMotion(DeviceIntPtr pDev, QdEventPtr qe, WindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; RegionPtr reg = NULL; DeviceEvent *ev = NULL; if (qe) { ev = &qe->event->device_event; switch (ev->type) { case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: pSprite->hot.pScreen = qe->pScreen; pSprite->hot.x = ev->root_x; pSprite->hot.y = ev->root_y; pWin = pDev->deviceGrab.grab ? pDev->deviceGrab.grab-> confineTo : NullWindow; break; default: break; } } if (pWin) { BoxRec lims; #ifdef PANORAMIX if (!noPanoramiXExtension) { int x, y, off_x, off_y, i; if (!XineramaSetWindowPntrs(pDev, pWin)) return; i = PanoramiXNumScreens - 1; RegionCopy(&pSprite->Reg2, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; while (i--) { x = off_x - screenInfo.screens[i]->x; y = off_y - screenInfo.screens[i]->y; if (x || y) RegionTranslate(&pSprite->Reg2, x, y); RegionUnion(&pSprite->Reg2, &pSprite->Reg2, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; } } else #endif { if (pSprite->hot.pScreen != pWin->drawable.pScreen) { pSprite->hot.pScreen = pWin->drawable.pScreen; pSprite->hot.x = pSprite->hot.y = 0; } } lims = *RegionExtents(&pWin->borderSize); if (pSprite->hot.x < lims.x1) pSprite->hot.x = lims.x1; else if (pSprite->hot.x >= lims.x2) pSprite->hot.x = lims.x2 - 1; if (pSprite->hot.y < lims.y1) pSprite->hot.y = lims.y1; else if (pSprite->hot.y >= lims.y2) pSprite->hot.y = lims.y2 - 1; #ifdef PANORAMIX if (!noPanoramiXExtension) { if (RegionNumRects(&pSprite->Reg2) > 1) reg = &pSprite->Reg2; } else #endif { if (wBoundingShape(pWin)) reg = &pWin->borderSize; } if (reg) ConfineToShape(pDev, reg, &pSprite->hot.x, &pSprite->hot.y); if (qe && ev) { qe->pScreen = pSprite->hot.pScreen; ev->root_x = pSprite->hot.x; ev->root_y = pSprite->hot.y; } } #ifdef PANORAMIX if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */ #endif RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root; } static void ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen) { SpritePtr pSprite = pDev->spriteInfo->sprite; if (syncEvents.playingEvents) { CheckVirtualMotion(pDev, (QdEventPtr) NULL, pWin); SyntheticMotion(pDev, pSprite->hot.x, pSprite->hot.y); } else { ScreenPtr pScreen = pWin->drawable.pScreen; #ifdef PANORAMIX if (!noPanoramiXExtension) { XineramaConfineCursorToWindow(pDev, pWin, generateEvents); return; } #endif pSprite->hotLimits = *RegionExtents(&pWin->borderSize); pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; CheckPhysLimits(pDev, pSprite->current, generateEvents, confineToScreen, pWin->drawable.pScreen); if (*pScreen->CursorConfinedTo) (*pScreen->CursorConfinedTo) (pDev, pScreen, pWin); } } Bool PointerConfinedToScreen(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->confined; } /** * Update the sprite cursor to the given cursor. * * ChangeToCursor() will display the new cursor and free the old cursor (if * applicable). If the provided cursor is already the updated cursor, nothing * happens. */ static void ChangeToCursor(DeviceIntPtr pDev, CursorPtr cursor) { SpritePtr pSprite = pDev->spriteInfo->sprite; ScreenPtr pScreen; if (cursor != pSprite->current) { if ((pSprite->current->bits->xhot != cursor->bits->xhot) || (pSprite->current->bits->yhot != cursor->bits->yhot)) CheckPhysLimits(pDev, cursor, FALSE, pSprite->confined, (ScreenPtr) NULL); #ifdef PANORAMIX /* XXX: is this really necessary?? (whot) */ if (!noPanoramiXExtension) pScreen = pSprite->screen; else #endif pScreen = pSprite->hotPhys.pScreen; (*pScreen->DisplayCursor) (pDev, pScreen, cursor); FreeCursor(pSprite->current, (Cursor) 0); pSprite->current = RefCursor(cursor); } } /** * @returns true if b is a descendent of a */ Bool IsParent(WindowPtr a, WindowPtr b) { for (b = b->parent; b; b = b->parent) if (b == a) return TRUE; return FALSE; } /** * Update the cursor displayed on the screen. * * Called whenever a cursor may have changed shape or position. */ static void PostNewCursor(DeviceIntPtr pDev) { WindowPtr win; GrabPtr grab = pDev->deviceGrab.grab; SpritePtr pSprite = pDev->spriteInfo->sprite; CursorPtr pCursor; if (syncEvents.playingEvents) return; if (grab) { if (grab->cursor) { ChangeToCursor(pDev, grab->cursor); return; } if (IsParent(grab->window, pSprite->win)) win = pSprite->win; else win = grab->window; } else win = pSprite->win; for (; win; win = win->parent) { if (win->optional) { pCursor = WindowGetDeviceCursor(win, pDev); if (!pCursor && win->optional->cursor != NullCursor) pCursor = win->optional->cursor; if (pCursor) { ChangeToCursor(pDev, pCursor); return; } } } } /** * @param dev device which you want to know its current root window * @return root window where dev's sprite is located */ WindowPtr GetCurrentRootWindow(DeviceIntPtr dev) { return RootWindow(dev->spriteInfo->sprite); } /** * @return window underneath the cursor sprite. */ WindowPtr GetSpriteWindow(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->win; } /** * @return current sprite cursor. */ CursorPtr GetSpriteCursor(DeviceIntPtr pDev) { return pDev->spriteInfo->sprite->current; } /** * Set x/y current sprite position in screen coordinates. */ void GetSpritePosition(DeviceIntPtr pDev, int *px, int *py) { SpritePtr pSprite = pDev->spriteInfo->sprite; *px = pSprite->hotPhys.x; *py = pSprite->hotPhys.y; } #ifdef PANORAMIX int XineramaGetCursorScreen(DeviceIntPtr pDev) { if (!noPanoramiXExtension) { return pDev->spriteInfo->sprite->screen->myNum; } else { return 0; } } #endif /* PANORAMIX */ #define TIMESLOP (5 * 60 * 1000) /* 5 minutes */ static void MonthChangedOrBadTime(CARD32 *ms) { /* If the ddx/OS is careless about not processing timestamped events from * different sources in sorted order, then it's possible for time to go * backwards when it should not. Here we ensure a decent time. */ if ((currentTime.milliseconds - *ms) > TIMESLOP) currentTime.months++; else *ms = currentTime.milliseconds; } void NoticeTime(const DeviceIntPtr dev, TimeStamp time) { currentTime = time; lastDeviceEventTime[XIAllDevices].time = currentTime; lastDeviceEventTime[dev->id].time = currentTime; LastEventTimeToggleResetFlag(dev->id, TRUE); LastEventTimeToggleResetFlag(XIAllDevices, TRUE); } static void NoticeTimeMillis(const DeviceIntPtr dev, CARD32 *ms) { TimeStamp time; if (*ms < currentTime.milliseconds) MonthChangedOrBadTime(ms); time.months = currentTime.months; time.milliseconds = *ms; NoticeTime(dev, time); } void NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev) { if (!syncEvents.playingEvents) NoticeTimeMillis(dev, &ev->any.time); } TimeStamp LastEventTime(int deviceid) { return lastDeviceEventTime[deviceid].time; } Bool LastEventTimeWasReset(int deviceid) { return lastDeviceEventTime[deviceid].reset; } void LastEventTimeToggleResetFlag(int deviceid, Bool state) { lastDeviceEventTime[deviceid].reset = state; } void LastEventTimeToggleResetAll(Bool state) { DeviceIntPtr dev; nt_list_for_each_entry(dev, inputInfo.devices, next) { LastEventTimeToggleResetFlag(dev->id, FALSE); } LastEventTimeToggleResetFlag(XIAllDevices, FALSE); LastEventTimeToggleResetFlag(XIAllMasterDevices, FALSE); } /************************************************************************** * The following procedures deal with synchronous events * **************************************************************************/ /** * EnqueueEvent is a device's processInputProc if a device is frozen. * Instead of delivering the events to the client, the event is tacked onto a * linked list for later delivery. */ void EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) { QdEventPtr tail = NULL; QdEventPtr qe; SpritePtr pSprite = device->spriteInfo->sprite; int eventlen; DeviceEvent *event = &ev->device_event; if (!xorg_list_is_empty(&syncEvents.pending)) tail = xorg_list_last_entry(&syncEvents.pending, QdEventRec, next); NoticeTimeMillis(device, &ev->any.time); /* Fix for key repeating bug. */ if (device->key != NULL && device->key->xkbInfo != NULL && event->type == ET_KeyRelease) AccessXCancelRepeatKey(device->key->xkbInfo, event->detail.key); if (DeviceEventCallback) { DeviceEventInfoRec eventinfo; /* The RECORD spec says that the root window field of motion events * must be valid. At this point, it hasn't been filled in yet, so * we do it here. The long expression below is necessary to get * the current root window; the apparently reasonable alternative * GetCurrentRootWindow()->drawable.id doesn't give you the right * answer on the first motion event after a screen change because * the data that GetCurrentRootWindow relies on hasn't been * updated yet. */ if (ev->any.type == ET_Motion) ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; eventinfo.event = ev; eventinfo.device = device; CallCallbacks(&DeviceEventCallback, (void *) &eventinfo); } if (event->type == ET_Motion) { #ifdef PANORAMIX if (!noPanoramiXExtension) { event->root_x += pSprite->screen->x - screenInfo.screens[0]->x; event->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } #endif pSprite->hotPhys.x = event->root_x; pSprite->hotPhys.y = event->root_y; /* do motion compression, but not if from different devices */ if (tail && (tail->event->any.type == ET_Motion) && (tail->device == device) && (tail->pScreen == pSprite->hotPhys.pScreen)) { DeviceEvent *tailev = &tail->event->device_event; tailev->root_x = pSprite->hotPhys.x; tailev->root_y = pSprite->hotPhys.y; tailev->time = event->time; tail->months = currentTime.months; return; } } eventlen = sizeof(InternalEvent); qe = malloc(sizeof(QdEventRec) + eventlen); if (!qe) return; xorg_list_init(&qe->next); qe->device = device; qe->pScreen = pSprite->hotPhys.pScreen; qe->months = currentTime.months; qe->event = (InternalEvent *) (qe + 1); CopyPartialInternalEvent(qe->event, (InternalEvent *)event); xorg_list_append(&qe->next, &syncEvents.pending); } /** * Run through the list of events queued up in syncEvents. * For each event do: * If the device for this event is not frozen anymore, take it and process it * as usually. * After that, check if there's any devices in the list that are not frozen. * If there is none, we're done. If there is at least one device that is not * frozen, then re-run from the beginning of the event queue. */ void PlayReleasedEvents(void) { QdEventPtr tmp; QdEventPtr qe; DeviceIntPtr dev; DeviceIntPtr pDev; restart: xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) { if (!qe->device->deviceGrab.sync.frozen) { xorg_list_del(&qe->next); pDev = qe->device; if (qe->event->any.type == ET_Motion) CheckVirtualMotion(pDev, qe, NullWindow); syncEvents.time.months = qe->months; syncEvents.time.milliseconds = qe->event->any.time; #ifdef PANORAMIX /* Translate back to the sprite screen since processInputProc will translate from sprite screen to screen 0 upon reentry to the DIX layer */ if (!noPanoramiXExtension) { DeviceEvent *ev = &qe->event->device_event; switch (ev->type) { case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: ev->root_x += screenInfo.screens[0]->x - pDev->spriteInfo->sprite->screen->x; ev->root_y += screenInfo.screens[0]->y - pDev->spriteInfo->sprite->screen->y; break; default: break; } } #endif (*qe->device->public.processInputProc) (qe->event, qe->device); free(qe); for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next); if (!dev) break; /* Playing the event may have unfrozen another device. */ /* So to play it safe, restart at the head of the queue */ goto restart; } } } /** * Freeze or thaw the given devices. The device's processing proc is * switched to either the real processing proc (in case of thawing) or an * enqueuing processing proc (usually EnqueueEvent()). * * @param dev The device to freeze/thaw * @param frozen True to freeze or false to thaw. */ static void FreezeThaw(DeviceIntPtr dev, Bool frozen) { dev->deviceGrab.sync.frozen = frozen; if (frozen) dev->public.processInputProc = dev->public.enqueueInputProc; else dev->public.processInputProc = dev->public.realInputProc; } /** * Unfreeze devices and replay all events to the respective clients. * * ComputeFreezes takes the first event in the device's frozen event queue. It * runs up the sprite tree (spriteTrace) and searches for the window to replay * the events from. If it is found, it checks for passive grabs one down from * the window or delivers the events. */ static void ComputeFreezes(void) { DeviceIntPtr replayDev = syncEvents.replayDev; GrabPtr grab; DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) FreezeThaw(dev, dev->deviceGrab.sync.other || (dev->deviceGrab.sync.state >= FROZEN)); if (syncEvents.playingEvents || (!replayDev && xorg_list_is_empty(&syncEvents.pending))) return; syncEvents.playingEvents = TRUE; if (replayDev) { InternalEvent *event = replayDev->deviceGrab.sync.event; syncEvents.replayDev = (DeviceIntPtr) NULL; if (!CheckDeviceGrabs(replayDev, event, syncEvents.replayWin)) { if (IsTouchEvent(event)) { TouchPointInfoPtr ti = TouchFindByClientID(replayDev, event->device_event.touchid); BUG_WARN(!ti); TouchListenerAcceptReject(replayDev, ti, 0, XIRejectTouch); } else if (IsGestureEvent(event)) { GestureInfoPtr gi = GestureFindActiveByEventType(replayDev, event->any.type); if (gi) { GestureEmitGestureEndToOwner(replayDev, gi); GestureEndGesture(gi); } ProcessGestureEvent(event, replayDev); } else { WindowPtr w = XYToWindow(replayDev->spriteInfo->sprite, event->device_event.root_x, event->device_event.root_y); if (replayDev->focus && !IsPointerEvent(event)) DeliverFocusedEvent(replayDev, event, w); else DeliverDeviceEvents(w, event, NullGrab, NullWindow, replayDev); } } } for (dev = inputInfo.devices; dev; dev = dev->next) { if (!dev->deviceGrab.sync.frozen) { PlayReleasedEvents(); break; } } syncEvents.playingEvents = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { if (DevHasCursor(dev)) { /* the following may have been skipped during replay, so do it now */ if ((grab = dev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != dev->spriteInfo->sprite->hotPhys.pScreen) dev->spriteInfo->sprite->hotPhys.x = dev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(dev, grab->confineTo, TRUE, TRUE); } else ConfineCursorToWindow(dev, dev->spriteInfo->sprite->hotPhys.pScreen-> root, TRUE, FALSE); PostNewCursor(dev); } } } #ifdef RANDR void ScreenRestructured(ScreenPtr pScreen) { GrabPtr grab; DeviceIntPtr pDev; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (!IsFloating(pDev) && !DevHasCursor(pDev)) continue; /* GrabDevice doesn't have a confineTo field, so we don't need to * worry about it. */ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pDev->spriteInfo->sprite->hotPhys.pScreen) pDev->spriteInfo->sprite->hotPhys.x = pDev->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); } else ConfineCursorToWindow(pDev, pDev->spriteInfo->sprite->hotPhys.pScreen-> root, TRUE, FALSE); } } #endif static void CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) { GrabPtr grab = thisDev->deviceGrab.grab; DeviceIntPtr dev; if (thisMode == GrabModeSync) thisDev->deviceGrab.sync.state = FROZEN_NO_EVENT; else { /* free both if same client owns both */ thisDev->deviceGrab.sync.state = THAWED; if (thisDev->deviceGrab.sync.other && (CLIENT_BITS(thisDev->deviceGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) thisDev->deviceGrab.sync.other = NullGrab; } if (IsMaster(thisDev)) { dev = GetPairedDevice(thisDev); if (otherMode == GrabModeSync) dev->deviceGrab.sync.other = grab; else { /* free both if same client owns both */ if (dev->deviceGrab.sync.other && (CLIENT_BITS(dev->deviceGrab.sync.other->resource) == CLIENT_BITS(grab->resource))) dev->deviceGrab.sync.other = NullGrab; } } ComputeFreezes(); } /** * Save the device's master device id. This needs to be done * if a client directly grabs a slave device that is attached to a master. For * the duration of the grab, the device is detached, ungrabbing re-attaches it * though. * * We store the ID of the master device only in case the master disappears * while the device has a grab. */ static void DetachFromMaster(DeviceIntPtr dev) { if (IsFloating(dev)) return; dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id; AttachDevice(NULL, dev, NULL); } static void ReattachToOldMaster(DeviceIntPtr dev) { DeviceIntPtr master = NULL; if (IsMaster(dev)) return; dixLookupDevice(&master, dev->saved_master_id, serverClient, DixUseAccess); if (master) { AttachDevice(serverClient, dev, master); dev->saved_master_id = 0; } } /** * Update touch records when an explicit grab is activated. Any touches owned by * the grabbing client are updated so the listener state reflects the new grab. */ static void UpdateTouchesForGrab(DeviceIntPtr mouse) { int i; if (!mouse->touch || mouse->deviceGrab.fromPassiveGrab) return; for (i = 0; i < mouse->touch->num_touches; i++) { TouchPointInfoPtr ti = mouse->touch->touches + i; TouchListener *listener = &ti->listeners[0]; GrabPtr grab = mouse->deviceGrab.grab; if (ti->active && CLIENT_BITS(listener->listener) == grab->resource) { if (grab->grabtype == CORE || grab->grabtype == XI || !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) { /* Note that the grab will override any current listeners and if these listeners already received touch events then this is the place to send touch end event to complete the touch sequence. Unfortunately GTK3 menu widget implementation relies on not getting touch end event, so we can't fix the current behavior. */ listener->type = TOUCH_LISTENER_POINTER_GRAB; } else { listener->type = TOUCH_LISTENER_GRAB; } listener->listener = grab->resource; listener->level = grab->grabtype; listener->window = grab->window; listener->state = TOUCH_LISTENER_IS_OWNER; if (listener->grab) FreeGrab(listener->grab); listener->grab = AllocGrab(grab); } } } /** * Update gesture records when an explicit grab is activated. Any gestures owned * by the grabbing client are updated so the listener state reflects the new * grab. */ static void UpdateGesturesForGrab(DeviceIntPtr mouse) { if (!mouse->gesture || mouse->deviceGrab.fromPassiveGrab) return; GestureInfoPtr gi = &mouse->gesture->gesture; GestureListener *listener = &gi->listener; GrabPtr grab = mouse->deviceGrab.grab; if (gi->active && CLIENT_BITS(listener->listener) == grab->resource) { if (grab->grabtype == CORE || grab->grabtype == XI || !xi2mask_isset(grab->xi2mask, mouse, GetXI2Type(gi->type))) { if (listener->type == GESTURE_LISTENER_REGULAR) { /* if the listener already got any events relating to the gesture, we must send a gesture end because the grab overrides the previous listener and won't itself send any gesture events. */ GestureEmitGestureEndToOwner(mouse, gi); } listener->type = GESTURE_LISTENER_NONGESTURE_GRAB; } else { listener->type = GESTURE_LISTENER_GRAB; } listener->listener = grab->resource; listener->window = grab->window; if (listener->grab) FreeGrab(listener->grab); listener->grab = AllocGrab(grab); } } /** * Activate a pointer grab on the given device. A pointer grab will cause all * core pointer events of this device to be delivered to the grabbing client only. * No other device will send core events to the grab client while the grab is * on, but core events will be sent to other clients. * Can cause the cursor to change if a grab cursor is set. * * Note that parameter autoGrab may be (True & ImplicitGrabMask) if the grab * is an implicit grab caused by a ButtonPress event. * * @param mouse The device to grab. * @param grab The grab structure, needs to be setup. * @param autoGrab True if the grab was caused by a button down event and not * explicitly by a client. */ void ActivatePointerGrab(DeviceIntPtr mouse, GrabPtr grab, TimeStamp time, Bool autoGrab) { GrabInfoPtr grabinfo = &mouse->deviceGrab; GrabPtr oldgrab = grabinfo->grab; WindowPtr oldWin = (grabinfo->grab) ? grabinfo->grab->window : mouse->spriteInfo->sprite->win; Bool isPassive = autoGrab & ~ImplicitGrabMask; /* slave devices need to float for the duration of the grab. */ if (grab->grabtype == XI2 && !(autoGrab & ImplicitGrabMask) && !IsMaster(mouse)) DetachFromMaster(mouse); if (grab->confineTo) { if (grab->confineTo->drawable.pScreen != mouse->spriteInfo->sprite->hotPhys.pScreen) mouse->spriteInfo->sprite->hotPhys.x = mouse->spriteInfo->sprite->hotPhys.y = 0; ConfineCursorToWindow(mouse, grab->confineTo, FALSE, TRUE); } if (! (grabinfo->grab && oldWin == grabinfo->grab->window && oldWin == grab->window)) DoEnterLeaveEvents(mouse, mouse->id, oldWin, grab->window, NotifyGrab); mouse->valuator->motionHintWindow = NullWindow; if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; else grabinfo->grabTime = time; grabinfo->grab = AllocGrab(grab); grabinfo->fromPassiveGrab = isPassive; grabinfo->implicitGrab = autoGrab & ImplicitGrabMask; PostNewCursor(mouse); UpdateTouchesForGrab(mouse); UpdateGesturesForGrab(mouse); CheckGrabForSyncs(mouse, (Bool) grab->pointerMode, (Bool) grab->keyboardMode); if (oldgrab) FreeGrab(oldgrab); } /** * Delete grab on given device, update the sprite. * * Extension devices are set up for ActivateKeyboardGrab(). */ void DeactivatePointerGrab(DeviceIntPtr mouse) { GrabPtr grab = mouse->deviceGrab.grab; DeviceIntPtr dev; Bool wasPassive = mouse->deviceGrab.fromPassiveGrab; Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab && mouse->deviceGrab.implicitGrab); XID grab_resource = grab->resource; int i; /* If an explicit grab was deactivated, we must remove it from the head of * all the touches' listener lists. */ for (i = 0; !wasPassive && mouse->touch && i < mouse->touch->num_touches; i++) { TouchPointInfoPtr ti = mouse->touch->touches + i; if (ti->active && TouchResourceIsOwner(ti, grab_resource)) { int mode = XIRejectTouch; /* Rejecting will generate a TouchEnd, but we must not emulate a ButtonRelease here. So pretend the listener already has the end event */ if (grab->grabtype == CORE || grab->grabtype == XI || !xi2mask_isset(grab->xi2mask, mouse, XI_TouchBegin)) { mode = XIAcceptTouch; /* NOTE: we set the state here, but * ProcessTouchOwnershipEvent() will still call * TouchEmitTouchEnd for this listener. The other half of * this hack is in DeliverTouchEndEvent */ ti->listeners[0].state = TOUCH_LISTENER_HAS_END; } TouchListenerAcceptReject(mouse, ti, 0, mode); } } TouchRemovePointerGrab(mouse); mouse->valuator->motionHintWindow = NullWindow; mouse->deviceGrab.grab = NullGrab; mouse->deviceGrab.sync.state = NOT_GRABBED; mouse->deviceGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.sync.other == grab) dev->deviceGrab.sync.other = NullGrab; } /* in case of explicit gesture grab, send end event to the grab client */ if (!wasPassive && mouse->gesture) { GestureInfoPtr gi = &mouse->gesture->gesture; if (gi->active && GestureResourceIsOwner(gi, grab_resource)) { GestureEmitGestureEndToOwner(mouse, gi); GestureEndGesture(gi); } } DoEnterLeaveEvents(mouse, mouse->id, grab->window, mouse->spriteInfo->sprite->win, NotifyUngrab); if (grab->confineTo) ConfineCursorToWindow(mouse, GetCurrentRootWindow(mouse), FALSE, FALSE); PostNewCursor(mouse); if (!wasImplicit && grab->grabtype == XI2) ReattachToOldMaster(mouse); ComputeFreezes(); FreeGrab(grab); } /** * Activate a keyboard grab on the given device. * * Extension devices have ActivateKeyboardGrab() set as their grabbing proc. */ void ActivateKeyboardGrab(DeviceIntPtr keybd, GrabPtr grab, TimeStamp time, Bool passive) { GrabInfoPtr grabinfo = &keybd->deviceGrab; GrabPtr oldgrab = grabinfo->grab; WindowPtr oldWin; /* slave devices need to float for the duration of the grab. */ if (grab->grabtype == XI2 && keybd->enabled && !(passive & ImplicitGrabMask) && !IsMaster(keybd)) DetachFromMaster(keybd); if (!keybd->enabled) oldWin = NULL; else if (grabinfo->grab) oldWin = grabinfo->grab->window; else if (keybd->focus) oldWin = keybd->focus->win; else oldWin = keybd->spriteInfo->sprite->win; if (oldWin == FollowKeyboardWin) oldWin = keybd->focus->win; if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; if (oldWin && ! (grabinfo->grab && oldWin == grabinfo->grab->window && oldWin == grab->window)) DoFocusEvents(keybd, oldWin, grab->window, NotifyGrab); if (syncEvents.playingEvents) grabinfo->grabTime = syncEvents.time; else grabinfo->grabTime = time; grabinfo->grab = AllocGrab(grab); grabinfo->fromPassiveGrab = passive; grabinfo->implicitGrab = passive & ImplicitGrabMask; CheckGrabForSyncs(keybd, (Bool) grab->keyboardMode, (Bool) grab->pointerMode); if (oldgrab) FreeGrab(oldgrab); } /** * Delete keyboard grab for the given device. */ void DeactivateKeyboardGrab(DeviceIntPtr keybd) { GrabPtr grab = keybd->deviceGrab.grab; DeviceIntPtr dev; WindowPtr focusWin; Bool wasImplicit = (keybd->deviceGrab.fromPassiveGrab && keybd->deviceGrab.implicitGrab); if (keybd->valuator) keybd->valuator->motionHintWindow = NullWindow; keybd->deviceGrab.grab = NullGrab; keybd->deviceGrab.sync.state = NOT_GRABBED; keybd->deviceGrab.fromPassiveGrab = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.sync.other == grab) dev->deviceGrab.sync.other = NullGrab; } if (keybd->focus) focusWin = keybd->focus->win; else if (keybd->spriteInfo->sprite) focusWin = keybd->spriteInfo->sprite->win; else focusWin = NullWindow; if (focusWin == FollowKeyboardWin) focusWin = inputInfo.keyboard->focus->win; DoFocusEvents(keybd, grab->window, focusWin, NotifyUngrab); if (!wasImplicit && grab->grabtype == XI2) ReattachToOldMaster(keybd); ComputeFreezes(); FreeGrab(grab); } void AllowSome(ClientPtr client, TimeStamp time, DeviceIntPtr thisDev, int newState) { Bool thisGrabbed, otherGrabbed, othersFrozen, thisSynced; TimeStamp grabTime; DeviceIntPtr dev; GrabInfoPtr devgrabinfo, grabinfo = &thisDev->deviceGrab; thisGrabbed = grabinfo->grab && SameClient(grabinfo->grab, client); thisSynced = FALSE; otherGrabbed = FALSE; othersFrozen = FALSE; grabTime = grabinfo->grabTime; for (dev = inputInfo.devices; dev; dev = dev->next) { devgrabinfo = &dev->deviceGrab; if (dev == thisDev) continue; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) { if (!(thisGrabbed || otherGrabbed) || (CompareTimeStamps(devgrabinfo->grabTime, grabTime) == LATER)) grabTime = devgrabinfo->grabTime; otherGrabbed = TRUE; if (grabinfo->sync.other == devgrabinfo->grab) thisSynced = TRUE; if (devgrabinfo->sync.state >= FROZEN) othersFrozen = TRUE; } } if (!((thisGrabbed && grabinfo->sync.state >= FROZEN) || thisSynced)) return; if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, grabTime) == EARLIER)) return; switch (newState) { case THAWED: /* Async */ if (thisGrabbed) grabinfo->sync.state = THAWED; if (thisSynced) grabinfo->sync.other = NullGrab; ComputeFreezes(); break; case FREEZE_NEXT_EVENT: /* Sync */ if (thisGrabbed) { grabinfo->sync.state = FREEZE_NEXT_EVENT; if (thisSynced) grabinfo->sync.other = NullGrab; ComputeFreezes(); } break; case THAWED_BOTH: /* AsyncBoth */ if (othersFrozen) { for (dev = inputInfo.devices; dev; dev = dev->next) { devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } break; case FREEZE_BOTH_NEXT_EVENT: /* SyncBoth */ if (othersFrozen) { for (dev = inputInfo.devices; dev; dev = dev->next) { devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = FREEZE_BOTH_NEXT_EVENT; if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } break; case NOT_GRABBED: /* Replay */ if (thisGrabbed && grabinfo->sync.state == FROZEN_WITH_EVENT) { if (thisSynced) grabinfo->sync.other = NullGrab; syncEvents.replayDev = thisDev; syncEvents.replayWin = grabinfo->grab->window; (*grabinfo->DeactivateGrab) (thisDev); syncEvents.replayDev = (DeviceIntPtr) NULL; } break; case THAW_OTHERS: /* AsyncOthers */ if (othersFrozen) { for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev == thisDev) continue; devgrabinfo = &dev->deviceGrab; if (devgrabinfo->grab && SameClient(devgrabinfo->grab, client)) devgrabinfo->sync.state = THAWED; if (devgrabinfo->sync.other && SameClient(devgrabinfo->sync.other, client)) devgrabinfo->sync.other = NullGrab; } ComputeFreezes(); } break; } /* We've unfrozen the grab. If the grab was a touch grab, we're now the * owner and expected to accept/reject it. Reject == ReplayPointer which * we've handled in ComputeFreezes() (during DeactivateGrab) above, * anything else is accept. */ if (newState != NOT_GRABBED /* Replay */ && IsTouchEvent(grabinfo->sync.event)) { TouchAcceptAndEnd(thisDev, grabinfo->sync.event->device_event.touchid); } } /** * Server-side protocol handling for AllowEvents request. * * Release some events from a frozen device. */ int ProcAllowEvents(ClientPtr client) { TimeStamp time; DeviceIntPtr mouse = NULL; DeviceIntPtr keybd = NULL; REQUEST(xAllowEventsReq); REQUEST_SIZE_MATCH(xAllowEventsReq); UpdateCurrentTime(); time = ClientTimeToServerTime(stuff->time); mouse = PickPointer(client); keybd = PickKeyboard(client); switch (stuff->mode) { case ReplayPointer: AllowSome(client, time, mouse, NOT_GRABBED); break; case SyncPointer: AllowSome(client, time, mouse, FREEZE_NEXT_EVENT); break; case AsyncPointer: AllowSome(client, time, mouse, THAWED); break; case ReplayKeyboard: AllowSome(client, time, keybd, NOT_GRABBED); break; case SyncKeyboard: AllowSome(client, time, keybd, FREEZE_NEXT_EVENT); break; case AsyncKeyboard: AllowSome(client, time, keybd, THAWED); break; case SyncBoth: AllowSome(client, time, keybd, FREEZE_BOTH_NEXT_EVENT); break; case AsyncBoth: AllowSome(client, time, keybd, THAWED_BOTH); break; default: client->errorValue = stuff->mode; return BadValue; } return Success; } /** * Deactivate grabs from any device that has been grabbed by the client. */ void ReleaseActiveGrabs(ClientPtr client) { DeviceIntPtr dev; Bool done; /* XXX CloseDownClient should remove passive grabs before * releasing active grabs. */ do { done = TRUE; for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) { (*dev->deviceGrab.DeactivateGrab) (dev); done = FALSE; } } } while (!done); } /************************************************************************** * The following procedures deal with delivering events * **************************************************************************/ /** * Deliver the given events to the given client. * * More than one event may be delivered at a time. This is the case with * DeviceMotionNotifies which may be followed by DeviceValuator events. * * TryClientEvents() is the last station before actually writing the events to * the socket. Anything that is not filtered here, will get delivered to the * client. * An event is only delivered if * - mask and filter match up. * - no other client has a grab on the device that caused the event. * * * @param client The target client to deliver to. * @param dev The device the event came from. May be NULL. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param mask Event mask as set by the window. * @param filter Mask based on event type. * @param grab Possible grab on the device that caused the event. * * @return 1 if event was delivered, 0 if not or -1 if grab was not set by the * client. */ int TryClientEvents(ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, int count, Mask mask, Mask filter, GrabPtr grab) { int type; #ifdef DEBUG_EVENTS ErrorF("[dix] Event([%d, %d], mask=0x%lx), client=%d%s", pEvents->u.u.type, pEvents->u.u.detail, mask, client ? client->index : -1, (client && client->clientGone) ? " (gone)" : ""); #endif if (!client || client == serverClient || client->clientGone) { #ifdef DEBUG_EVENTS ErrorF(" not delivered to fake/dead client\n"); #endif return 0; } if (filter != CantBeFiltered && !(mask & filter)) { #ifdef DEBUG_EVENTS ErrorF(" filtered\n"); #endif return 0; } if (grab && !SameClient(grab, client)) { #ifdef DEBUG_EVENTS ErrorF(" not delivered due to grab\n"); #endif return -1; /* don't send, but notify caller */ } type = pEvents->u.u.type; if (type == MotionNotify) { if (mask & PointerMotionHintMask) { if (WID(dev->valuator->motionHintWindow) == pEvents->u.keyButtonPointer.event) { #ifdef DEBUG_EVENTS ErrorF("[dix] \n"); ErrorF("[dix] motionHintWindow == keyButtonPointer.event\n"); #endif return 1; /* don't send, but pretend we did */ } pEvents->u.u.detail = NotifyHint; } else { pEvents->u.u.detail = NotifyNormal; } } else if (type == DeviceMotionNotify) { if (MaybeSendDeviceMotionNotifyHint((deviceKeyButtonPointer *) pEvents, mask) != 0) return 1; } else if (type == KeyPress) { if (EventIsKeyRepeat(pEvents)) { if (!_XkbWantsDetectableAutoRepeat(client)) { xEvent release = *pEvents; release.u.u.type = KeyRelease; WriteEventsToClient(client, 1, &release); #ifdef DEBUG_EVENTS ErrorF(" (plus fake core release for repeat)"); #endif } else { #ifdef DEBUG_EVENTS ErrorF(" (detectable autorepeat for core)"); #endif } } } else if (type == DeviceKeyPress) { if (EventIsKeyRepeat(pEvents)) { if (!_XkbWantsDetectableAutoRepeat(client)) { deviceKeyButtonPointer release = *(deviceKeyButtonPointer *) pEvents; release.type = DeviceKeyRelease; #ifdef DEBUG_EVENTS ErrorF(" (plus fake xi1 release for repeat)"); #endif WriteEventsToClient(client, 1, (xEvent *) &release); } else { #ifdef DEBUG_EVENTS ErrorF(" (detectable autorepeat for core)"); #endif } } } if (BitIsOn(criticalEvents, type)) { if (client->smart_priority < SMART_MAX_PRIORITY) client->smart_priority++; SetCriticalOutputPending(); } WriteEventsToClient(client, count, pEvents); #ifdef DEBUG_EVENTS ErrorF("[dix] delivered\n"); #endif return 1; } static BOOL ActivateImplicitGrab(DeviceIntPtr dev, ClientPtr client, WindowPtr win, xEvent *event, Mask deliveryMask) { GrabPtr tempGrab; OtherInputMasks *inputMasks; CARD8 type = event->u.u.type; enum InputLevel grabtype; if (type == ButtonPress) grabtype = CORE; else if (type == DeviceButtonPress) grabtype = XI; else if ((type = xi2_get_type(event)) == XI_ButtonPress) grabtype = XI2; else return FALSE; tempGrab = AllocGrab(NULL); if (!tempGrab) return FALSE; tempGrab->next = NULL; tempGrab->device = dev; tempGrab->resource = client->clientAsMask; tempGrab->window = win; tempGrab->ownerEvents = (deliveryMask & OwnerGrabButtonMask) ? TRUE : FALSE; tempGrab->eventMask = deliveryMask; tempGrab->keyboardMode = GrabModeAsync; tempGrab->pointerMode = GrabModeAsync; tempGrab->confineTo = NullWindow; tempGrab->cursor = NullCursor; tempGrab->type = type; tempGrab->grabtype = grabtype; /* get the XI and XI2 device mask */ inputMasks = wOtherInputMasks(win); tempGrab->deviceMask = (inputMasks) ? inputMasks->inputEvents[dev->id] : 0; if (inputMasks) xi2mask_merge(tempGrab->xi2mask, inputMasks->xi2mask); (*dev->deviceGrab.ActivateGrab) (dev, tempGrab, currentTime, TRUE | ImplicitGrabMask); FreeGrab(tempGrab); return TRUE; } /** * Attempt event delivery to the client owning the window. */ static enum EventDeliveryState DeliverToWindowOwner(DeviceIntPtr dev, WindowPtr win, xEvent *events, int count, Mask filter, GrabPtr grab) { /* if nobody ever wants to see this event, skip some work */ if (filter != CantBeFiltered && !((wOtherEventMasks(win) | win->eventMask) & filter)) return EVENT_SKIP; if (IsInterferingGrab(wClient(win), dev, events)) return EVENT_SKIP; if (!XaceHook(XACE_RECEIVE_ACCESS, wClient(win), win, events, count)) { int attempt = TryClientEvents(wClient(win), dev, events, count, win->eventMask, filter, grab); if (attempt > 0) return EVENT_DELIVERED; if (attempt < 0) return EVENT_REJECTED; } return EVENT_NOT_DELIVERED; } /** * Get the list of clients that should be tried for event delivery on the * given window. * * @return 1 if the client list should be traversed, zero if the event * should be skipped. */ static Bool GetClientsForDelivery(DeviceIntPtr dev, WindowPtr win, xEvent *events, Mask filter, InputClients ** iclients) { int rc = 0; if (core_get_type(events) != 0) *iclients = (InputClients *) wOtherClients(win); else if (xi2_get_type(events) != 0) { OtherInputMasks *inputMasks = wOtherInputMasks(win); /* Has any client selected for the event? */ if (!WindowXI2MaskIsset(dev, win, events)) goto out; *iclients = inputMasks->inputClients; } else { OtherInputMasks *inputMasks = wOtherInputMasks(win); /* Has any client selected for the event? */ if (!inputMasks || !(inputMasks->inputEvents[dev->id] & filter)) goto out; *iclients = inputMasks->inputClients; } rc = 1; out: return rc; } /** * Try delivery on each client in inputclients, provided the event mask * accepts it and there is no interfering core grab.. */ static enum EventDeliveryState DeliverEventToInputClients(DeviceIntPtr dev, InputClients * inputclients, WindowPtr win, xEvent *events, int count, Mask filter, GrabPtr grab, ClientPtr *client_return, Mask *mask_return) { int attempt; enum EventDeliveryState rc = EVENT_NOT_DELIVERED; Bool have_device_button_grab_class_client = FALSE; for (; inputclients; inputclients = inputclients->next) { Mask mask; ClientPtr client = rClient(inputclients); if (IsInterferingGrab(client, dev, events)) continue; if (IsWrongPointerBarrierClient(client, dev, events)) continue; mask = GetEventMask(dev, events, inputclients); if (XaceHook(XACE_RECEIVE_ACCESS, client, win, events, count)) /* do nothing */ ; else if ((attempt = TryClientEvents(client, dev, events, count, mask, filter, grab))) { if (attempt > 0) { /* * The order of clients is arbitrary therefore if one * client belongs to DeviceButtonGrabClass make sure to * catch it. */ if (!have_device_button_grab_class_client) { rc = EVENT_DELIVERED; *client_return = client; *mask_return = mask; /* Success overrides non-success, so if we've been * successful on one client, return that */ if (mask & DeviceButtonGrabMask) have_device_button_grab_class_client = TRUE; } } else if (rc == EVENT_NOT_DELIVERED) rc = EVENT_REJECTED; } } return rc; } /** * Deliver events to clients registered on the window. * * @param client_return On successful delivery, set to the recipient. * @param mask_return On successful delivery, set to the recipient's event * mask for this event. */ static enum EventDeliveryState DeliverEventToWindowMask(DeviceIntPtr dev, WindowPtr win, xEvent *events, int count, Mask filter, GrabPtr grab, ClientPtr *client_return, Mask *mask_return) { InputClients *iclients; if (!GetClientsForDelivery(dev, win, events, filter, &iclients)) return EVENT_SKIP; return DeliverEventToInputClients(dev, iclients, win, events, count, filter, grab, client_return, mask_return); } /** * Deliver events to a window. At this point, we do not yet know if the event * actually needs to be delivered. May activate a grab if the event is a * button press. * * Core events are always delivered to the window owner. If the filter is * something other than CantBeFiltered, the event is also delivered to other * clients with the matching mask on the window. * * More than one event may be delivered at a time. This is the case with * DeviceMotionNotifies which may be followed by DeviceValuator events. * * @param pWin The window that would get the event. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param filter Mask based on event type. * @param grab Possible grab on the device that caused the event. * * @return a positive number if at least one successful delivery has been * made, 0 if no events were delivered, or a negative number if the event * has not been delivered _and_ rejected by at least one client. */ int DeliverEventsToWindow(DeviceIntPtr pDev, WindowPtr pWin, xEvent *pEvents, int count, Mask filter, GrabPtr grab) { int deliveries = 0, nondeliveries = 0; ClientPtr client = NullClient; Mask deliveryMask = 0; /* If a grab occurs due to a button press, then this mask is the mask of the grab. */ int type = pEvents->u.u.type; /* Deliver to window owner */ if ((filter == CantBeFiltered) || core_get_type(pEvents) != 0) { enum EventDeliveryState rc; rc = DeliverToWindowOwner(pDev, pWin, pEvents, count, filter, grab); switch (rc) { case EVENT_SKIP: return 0; case EVENT_REJECTED: nondeliveries--; break; case EVENT_DELIVERED: /* We delivered to the owner, with our event mask */ deliveries++; client = wClient(pWin); deliveryMask = pWin->eventMask; break; case EVENT_NOT_DELIVERED: break; } } /* CantBeFiltered means only window owner gets the event */ if (filter != CantBeFiltered) { enum EventDeliveryState rc; rc = DeliverEventToWindowMask(pDev, pWin, pEvents, count, filter, grab, &client, &deliveryMask); switch (rc) { case EVENT_SKIP: return 0; case EVENT_REJECTED: nondeliveries--; break; case EVENT_DELIVERED: deliveries++; break; case EVENT_NOT_DELIVERED: break; } } if (deliveries) { /* * Note that since core events are delivered first, an implicit grab may * be activated on a core grab, stopping the XI events. */ if (!grab && ActivateImplicitGrab(pDev, client, pWin, pEvents, deliveryMask)) /* grab activated */ ; else if (type == MotionNotify) pDev->valuator->motionHintWindow = pWin; else if (type == DeviceMotionNotify || type == DeviceButtonPress) CheckDeviceGrabAndHintWindow(pWin, type, (deviceKeyButtonPointer *) pEvents, grab, client, deliveryMask); return deliveries; } return nondeliveries; } /** * Filter out raw events for XI 2.0 and XI 2.1 clients. * * If there is a grab on the device, 2.0 clients only get raw events if they * have the grab. 2.1+ clients get raw events in all cases. * * @return TRUE if the event should be discarded, FALSE otherwise. */ static BOOL FilterRawEvents(const ClientPtr client, const GrabPtr grab, WindowPtr root) { XIClientPtr client_xi_version; int cmp; /* device not grabbed -> don't filter */ if (!grab) return FALSE; client_xi_version = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); cmp = version_compare(client_xi_version->major_version, client_xi_version->minor_version, 2, 0); /* XI 2.0: if device is grabbed, skip XI 2.1: if device is grabbed by us, skip, we've already delivered */ if (cmp == 0) return TRUE; return (grab->window != root) ? FALSE : SameClient(grab, client); } /** * Deliver a raw event to the grab owner (if any) and to all root windows. * * Raw event delivery differs between XI 2.0 and XI 2.1. * XI 2.0: events delivered to the grabbing client (if any) OR to all root * windows * XI 2.1: events delivered to all root windows, regardless of grabbing * state. */ void DeliverRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) { GrabPtr grab = device->deviceGrab.grab; xEvent *xi; int i, rc; int filter; rc = EventToXI2((InternalEvent *) ev, (xEvent **) &xi); if (rc != Success) { ErrorF("[Xi] %s: XI2 conversion failed in %s (%d)\n", __func__, device->name, rc); return; } if (grab) DeliverGrabbedEvent((InternalEvent *) ev, device, FALSE); filter = GetEventFilter(device, xi); for (i = 0; i < screenInfo.numScreens; i++) { WindowPtr root; InputClients *inputclients; root = screenInfo.screens[i]->root; if (!GetClientsForDelivery(device, root, xi, filter, &inputclients)) continue; for (; inputclients; inputclients = inputclients->next) { ClientPtr c; /* unused */ Mask m; /* unused */ InputClients ic = *inputclients; /* Because we run through the list manually, copy the actual * list, shorten the copy to only have one client and then pass * that down to DeliverEventToInputClients. This way we avoid * double events on XI 2.1 clients that have a grab on the * device. */ ic.next = NULL; if (!FilterRawEvents(rClient(&ic), grab, root)) DeliverEventToInputClients(device, &ic, root, xi, 1, filter, NULL, &c, &m); } } free(xi); } /* If the event goes to dontClient, don't send it and return 0. if send works, return 1 or if send didn't work, return 2. Only works for core events. */ #ifdef PANORAMIX static int XineramaTryClientEventsResult(ClientPtr client, GrabPtr grab, Mask mask, Mask filter) { if ((client) && (client != serverClient) && (!client->clientGone) && ((filter == CantBeFiltered) || (mask & filter))) { if (grab && !SameClient(grab, client)) return -1; else return 1; } return 0; } #endif /** * Try to deliver events to the interested parties. * * @param pWin The window that would get the event. * @param pEvents The events to be delivered. * @param count Number of elements in pEvents. * @param filter Mask based on event type. * @param dontClient Don't deliver to the dontClient. */ int MaybeDeliverEventsToClient(WindowPtr pWin, xEvent *pEvents, int count, Mask filter, ClientPtr dontClient) { OtherClients *other; if (pWin->eventMask & filter) { if (wClient(pWin) == dontClient) return 0; #ifdef PANORAMIX if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return XineramaTryClientEventsResult(wClient(pWin), NullGrab, pWin->eventMask, filter); #endif if (XaceHook(XACE_RECEIVE_ACCESS, wClient(pWin), pWin, pEvents, count)) return 1; /* don't send, but pretend we did */ return TryClientEvents(wClient(pWin), NULL, pEvents, count, pWin->eventMask, filter, NullGrab); } for (other = wOtherClients(pWin); other; other = other->next) { if (other->mask & filter) { if (SameClient(other, dontClient)) return 0; #ifdef PANORAMIX if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return XineramaTryClientEventsResult(rClient(other), NullGrab, other->mask, filter); #endif if (XaceHook(XACE_RECEIVE_ACCESS, rClient(other), pWin, pEvents, count)) return 1; /* don't send, but pretend we did */ return TryClientEvents(rClient(other), NULL, pEvents, count, other->mask, filter, NullGrab); } } return 2; } static Window FindChildForEvent(SpritePtr pSprite, WindowPtr event) { WindowPtr w = DeepestSpriteWin(pSprite); Window child = None; /* If the search ends up past the root should the child field be set to none or should the value in the argument be passed through. It probably doesn't matter since everyone calls this function with child == None anyway. */ while (w) { /* If the source window is same as event window, child should be none. Don't bother going all all the way back to the root. */ if (w == event) { child = None; break; } if (w->parent == event) { child = w->drawable.id; break; } w = w->parent; } return child; } static void FixUpXI2DeviceEventFromWindow(SpritePtr pSprite, int evtype, xXIDeviceEvent *event, WindowPtr pWin, Window child) { event->root = RootWindow(pSprite)->drawable.id; event->event = pWin->drawable.id; if (evtype == XI_TouchOwnership) { event->child = child; return; } if (pSprite->hot.pScreen == pWin->drawable.pScreen) { event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x); event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y); event->child = child; } else { event->event_x = 0; event->event_y = 0; event->child = None; } if (event->evtype == XI_Enter || event->evtype == XI_Leave || event->evtype == XI_FocusIn || event->evtype == XI_FocusOut) ((xXIEnterEvent *) event)->same_screen = (pSprite->hot.pScreen == pWin->drawable.pScreen); } static void FixUpXI2PinchEventFromWindow(SpritePtr pSprite, xXIGesturePinchEvent *event, WindowPtr pWin, Window child) { event->root = RootWindow(pSprite)->drawable.id; event->event = pWin->drawable.id; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x); event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y); event->child = child; } else { event->event_x = 0; event->event_y = 0; event->child = None; } } static void FixUpXI2SwipeEventFromWindow(SpritePtr pSprite, xXIGestureSwipeEvent *event, WindowPtr pWin, Window child) { event->root = RootWindow(pSprite)->drawable.id; event->event = pWin->drawable.id; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { event->event_x = event->root_x - double_to_fp1616(pWin->drawable.x); event->event_y = event->root_y - double_to_fp1616(pWin->drawable.y); event->child = child; } else { event->event_x = 0; event->event_y = 0; event->child = None; } } /** * Adjust event fields to comply with the window properties. * * @param xE Event to be modified in place * @param pWin The window to get the information from. * @param child Child window setting for event (if applicable) * @param calcChild If True, calculate the child window. */ void FixUpEventFromWindow(SpritePtr pSprite, xEvent *xE, WindowPtr pWin, Window child, Bool calcChild) { int evtype; if (calcChild) child = FindChildForEvent(pSprite, pWin); if ((evtype = xi2_get_type(xE))) { switch (evtype) { case XI_RawKeyPress: case XI_RawKeyRelease: case XI_RawButtonPress: case XI_RawButtonRelease: case XI_RawMotion: case XI_RawTouchBegin: case XI_RawTouchUpdate: case XI_RawTouchEnd: case XI_DeviceChanged: case XI_HierarchyChanged: case XI_PropertyEvent: case XI_BarrierHit: case XI_BarrierLeave: return; case XI_GesturePinchBegin: case XI_GesturePinchUpdate: case XI_GesturePinchEnd: FixUpXI2PinchEventFromWindow(pSprite, (xXIGesturePinchEvent*) xE, pWin, child); break; case XI_GestureSwipeBegin: case XI_GestureSwipeUpdate: case XI_GestureSwipeEnd: FixUpXI2SwipeEventFromWindow(pSprite, (xXIGestureSwipeEvent*) xE, pWin, child); break; default: FixUpXI2DeviceEventFromWindow(pSprite, evtype, (xXIDeviceEvent*) xE, pWin, child); break; } } else { XE_KBPTR.root = RootWindow(pSprite)->drawable.id; XE_KBPTR.event = pWin->drawable.id; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { XE_KBPTR.sameScreen = xTrue; XE_KBPTR.child = child; XE_KBPTR.eventX = XE_KBPTR.rootX - pWin->drawable.x; XE_KBPTR.eventY = XE_KBPTR.rootY - pWin->drawable.y; } else { XE_KBPTR.sameScreen = xFalse; XE_KBPTR.child = None; XE_KBPTR.eventX = 0; XE_KBPTR.eventY = 0; } } } /** * Check if a given event is deliverable at all on a given window. * * This function only checks if any client wants it, not for a specific * client. * * @param[in] dev The device this event is being sent for. * @param[in] evtype The event type of the event that is to be sent. * @param[in] win The current event window. * * @return Bitmask of ::EVENT_XI2_MASK, ::EVENT_XI1_MASK, ::EVENT_CORE_MASK, and * ::EVENT_DONT_PROPAGATE_MASK. */ int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win) { int rc = 0; int filter = 0; int type; OtherInputMasks *inputMasks = wOtherInputMasks(win); if ((type = GetXI2Type(evtype)) != 0) { if (inputMasks && xi2mask_isset(inputMasks->xi2mask, dev, type)) rc |= EVENT_XI2_MASK; } if ((type = GetXIType(evtype)) != 0) { filter = event_get_filter_from_type(dev, type); /* Check for XI mask */ if (inputMasks && (inputMasks->deliverableEvents[dev->id] & filter) && (inputMasks->inputEvents[dev->id] & filter)) rc |= EVENT_XI1_MASK; /* Check for XI DontPropagate mask */ if (inputMasks && (inputMasks->dontPropagateMask[dev->id] & filter)) rc |= EVENT_DONT_PROPAGATE_MASK; } if ((type = GetCoreType(evtype)) != 0) { filter = event_get_filter_from_type(dev, type); /* Check for core mask */ if ((win->deliverableEvents & filter) && ((wOtherEventMasks(win) | win->eventMask) & filter)) rc |= EVENT_CORE_MASK; /* Check for core DontPropagate mask */ if (filter & wDontPropagateMask(win)) rc |= EVENT_DONT_PROPAGATE_MASK; } return rc; } static int DeliverEvent(DeviceIntPtr dev, xEvent *xE, int count, WindowPtr win, Window child, GrabPtr grab) { SpritePtr pSprite = dev->spriteInfo->sprite; Mask filter; int deliveries = 0; if (XaceHook(XACE_SEND_ACCESS, NULL, dev, win, xE, count) == Success) { filter = GetEventFilter(dev, xE); FixUpEventFromWindow(pSprite, xE, win, child, FALSE); deliveries = DeliverEventsToWindow(dev, win, xE, count, filter, grab); } return deliveries; } static int DeliverOneEvent(InternalEvent *event, DeviceIntPtr dev, enum InputLevel level, WindowPtr win, Window child, GrabPtr grab) { xEvent *xE = NULL; int count = 0; int deliveries = 0; int rc; switch (level) { case XI2: rc = EventToXI2(event, &xE); count = 1; break; case XI: rc = EventToXI(event, &xE, &count); break; case CORE: rc = EventToCore(event, &xE, &count); break; default: rc = BadImplementation; break; } if (rc == Success) { deliveries = DeliverEvent(dev, xE, count, win, child, grab); free(xE); } else BUG_WARN_MSG(rc != BadMatch, "%s: conversion to level %d failed with rc %d\n", dev->name, level, rc); return deliveries; } /** * Deliver events caused by input devices. * * For events from a non-grabbed, non-focus device, DeliverDeviceEvents is * called directly from the processInputProc. * For grabbed devices, DeliverGrabbedEvent is called first, and _may_ call * DeliverDeviceEvents. * For focused events, DeliverFocusedEvent is called first, and _may_ call * DeliverDeviceEvents. * * @param pWin Window to deliver event to. * @param event The events to deliver, not yet in wire format. * @param grab Possible grab on a device. * @param stopAt Don't recurse up to the root window. * @param dev The device that is responsible for the event. * * @see DeliverGrabbedEvent * @see DeliverFocusedEvent */ int DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, WindowPtr stopAt, DeviceIntPtr dev) { Window child = None; int deliveries = 0; int mask; verify_internal_event(event); while (pWin) { if ((mask = EventIsDeliverable(dev, event->any.type, pWin))) { /* XI2 events first */ if (mask & EVENT_XI2_MASK) { deliveries = DeliverOneEvent(event, dev, XI2, pWin, child, grab); if (deliveries > 0) break; } /* XI events */ if (mask & EVENT_XI1_MASK) { deliveries = DeliverOneEvent(event, dev, XI, pWin, child, grab); if (deliveries > 0) break; } /* Core event */ if ((mask & EVENT_CORE_MASK) && IsMaster(dev) && dev->coreEvents) { deliveries = DeliverOneEvent(event, dev, CORE, pWin, child, grab); if (deliveries > 0) break; } } if ((deliveries < 0) || (pWin == stopAt) || (mask & EVENT_DONT_PROPAGATE_MASK)) { deliveries = 0; break; } child = pWin->drawable.id; pWin = pWin->parent; } return deliveries; } /** * Deliver event to a window and its immediate parent. Used for most window * events (CreateNotify, ConfigureNotify, etc.). Not useful for events that * propagate up the tree or extension events * * In case of a ReparentNotify event, the event will be delivered to the * otherParent as well. * * @param pWin Window to deliver events to. * @param xE Events to deliver. * @param count number of events in xE. * @param otherParent Used for ReparentNotify events. */ int DeliverEvents(WindowPtr pWin, xEvent *xE, int count, WindowPtr otherParent) { DeviceIntRec dummy; int deliveries; #ifdef PANORAMIX if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return count; #endif if (!count) return 0; dummy.id = XIAllDevices; switch (xE->u.u.type) { case DestroyNotify: case UnmapNotify: case MapNotify: case MapRequest: case ReparentNotify: case ConfigureNotify: case ConfigureRequest: case GravityNotify: case CirculateNotify: case CirculateRequest: xE->u.destroyNotify.event = pWin->drawable.id; break; } switch (xE->u.u.type) { case DestroyNotify: case UnmapNotify: case MapNotify: case ReparentNotify: case ConfigureNotify: case GravityNotify: case CirculateNotify: break; default: { Mask filter; filter = GetEventFilter(&dummy, xE); return DeliverEventsToWindow(&dummy, pWin, xE, count, filter, NullGrab); } } deliveries = DeliverEventsToWindow(&dummy, pWin, xE, count, StructureNotifyMask, NullGrab); if (pWin->parent) { xE->u.destroyNotify.event = pWin->parent->drawable.id; deliveries += DeliverEventsToWindow(&dummy, pWin->parent, xE, count, SubstructureNotifyMask, NullGrab); if (xE->u.u.type == ReparentNotify) { xE->u.destroyNotify.event = otherParent->drawable.id; deliveries += DeliverEventsToWindow(&dummy, otherParent, xE, count, SubstructureNotifyMask, NullGrab); } } return deliveries; } Bool PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; if (RegionContainsPoint(&pWin->borderSize, x, y, &box)) return TRUE; #ifdef PANORAMIX if (!noPanoramiXExtension && XineramaSetWindowPntrs(inputInfo.pointer, pWin)) { SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite; int i; FOR_NSCREENS_FORWARD_SKIP(i) { if (RegionContainsPoint(&pSprite->windows[i]->borderSize, x + screenInfo.screens[0]->x - screenInfo.screens[i]->x, y + screenInfo.screens[0]->y - screenInfo.screens[i]->y, &box)) return TRUE; } } #endif return FALSE; } /** * Traversed from the root window to the window at the position x/y. While * traversing, it sets up the traversal history in the spriteTrace array. * After completing, the spriteTrace history is set in the following way: * spriteTrace[0] ... root window * spriteTrace[1] ... top level window that encloses x/y * ... * spriteTrace[spriteTraceGood - 1] ... window at x/y * * @returns the window at the given coordinates. */ WindowPtr XYToWindow(SpritePtr pSprite, int x, int y) { ScreenPtr pScreen = RootWindow(pSprite)->drawable.pScreen; return (*pScreen->XYToWindow)(pScreen, pSprite, x, y); } /** * Ungrab a currently FocusIn grabbed device and grab the device on the * given window. If the win given is the NoneWin, the device is ungrabbed if * applicable and FALSE is returned. * * @returns TRUE if the device has been grabbed, or FALSE otherwise. */ BOOL ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) { BOOL rc = FALSE; InternalEvent event; if (dev->deviceGrab.grab) { if (!dev->deviceGrab.fromPassiveGrab || dev->deviceGrab.grab->type != XI_FocusIn || dev->deviceGrab.grab->window == win || IsParent(dev->deviceGrab.grab->window, win)) return FALSE; DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); (*dev->deviceGrab.DeactivateGrab) (dev); } if (win == NoneWin || win == PointerRootWin) return FALSE; event = (InternalEvent) { .device_event.header = ET_Internal, .device_event.type = ET_FocusIn, .device_event.length = sizeof(DeviceEvent), .device_event.time = GetTimeInMillis(), .device_event.deviceid = dev->id, .device_event.sourceid = dev->id, .device_event.detail.button = 0 }; rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL); if (rc) DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); return rc; } /** * Ungrab a currently Enter grabbed device and grab the device for the given * window. * * @returns TRUE if the device has been grabbed, or FALSE otherwise. */ static BOOL ActivateEnterGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win) { BOOL rc = FALSE; InternalEvent event; if (dev->deviceGrab.grab) { if (!dev->deviceGrab.fromPassiveGrab || dev->deviceGrab.grab->type != XI_Enter || dev->deviceGrab.grab->window == win || IsParent(dev->deviceGrab.grab->window, win)) return FALSE; DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveUngrab); (*dev->deviceGrab.DeactivateGrab) (dev); } event = (InternalEvent) { .device_event.header = ET_Internal, .device_event.type = ET_Enter, .device_event.length = sizeof(DeviceEvent), .device_event.time = GetTimeInMillis(), .device_event.deviceid = dev->id, .device_event.sourceid = dev->id, .device_event.detail.button = 0 }; rc = (CheckPassiveGrabsOnWindow(win, dev, &event, FALSE, TRUE) != NULL); if (rc) DoEnterLeaveEvents(dev, dev->id, old, win, XINotifyPassiveGrab); return rc; } /** * Update the sprite coordinates based on the event. Update the cursor * position, then update the event with the new coordinates that may have been * changed. If the window underneath the sprite has changed, change to new * cursor and send enter/leave events. * * CheckMotion() will not do anything and return FALSE if the event is not a * pointer event. * * @return TRUE if the sprite has moved or FALSE otherwise. */ Bool CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) { WindowPtr prevSpriteWin, newSpriteWin; SpritePtr pSprite = pDev->spriteInfo->sprite; verify_internal_event((InternalEvent *) ev); prevSpriteWin = pSprite->win; if (ev && !syncEvents.playingEvents) { /* GetPointerEvents() guarantees that pointer events have the correct rootX/Y set already. */ switch (ev->type) { case ET_ButtonPress: case ET_ButtonRelease: case ET_Motion: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: break; default: /* all other events return FALSE */ return FALSE; } #ifdef PANORAMIX if (!noPanoramiXExtension) { /* Motion events entering DIX get translated to Screen 0 coordinates. Replayed events have already been translated since they've entered DIX before */ ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x; ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } else #endif { if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) { pSprite->hot.pScreen = pSprite->hotPhys.pScreen; RootWindow(pDev->spriteInfo->sprite) = pSprite->hot.pScreen->root; } } pSprite->hot.x = ev->root_x; pSprite->hot.y = ev->root_y; if (pSprite->hot.x < pSprite->physLimits.x1) pSprite->hot.x = pSprite->physLimits.x1; else if (pSprite->hot.x >= pSprite->physLimits.x2) pSprite->hot.x = pSprite->physLimits.x2 - 1; if (pSprite->hot.y < pSprite->physLimits.y1) pSprite->hot.y = pSprite->physLimits.y1; else if (pSprite->hot.y >= pSprite->physLimits.y2) pSprite->hot.y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x, &pSprite->hot.y); pSprite->hotPhys = pSprite->hot; if ((pSprite->hotPhys.x != ev->root_x) || (pSprite->hotPhys.y != ev->root_y)) { #ifdef PANORAMIX if (!noPanoramiXExtension) { XineramaSetCursorPosition(pDev, pSprite->hotPhys.x, pSprite->hotPhys.y, FALSE); } else #endif { (*pSprite->hotPhys.pScreen->SetCursorPosition) (pDev, pSprite-> hotPhys.pScreen, pSprite-> hotPhys.x, pSprite-> hotPhys.y, FALSE); } } ev->root_x = pSprite->hot.x; ev->root_y = pSprite->hot.y; } newSpriteWin = XYToWindow(pSprite, pSprite->hot.x, pSprite->hot.y); if (newSpriteWin != prevSpriteWin) { int sourceid; if (!ev) { UpdateCurrentTimeIf(); sourceid = pDev->id; /* when from WindowsRestructured */ } else sourceid = ev->sourceid; if (prevSpriteWin != NullWindow) { if (!ActivateEnterGrab(pDev, prevSpriteWin, newSpriteWin)) DoEnterLeaveEvents(pDev, sourceid, prevSpriteWin, newSpriteWin, NotifyNormal); } /* set pSprite->win after ActivateEnterGrab, otherwise sprite window == grab_window and no enter/leave events are sent. */ pSprite->win = newSpriteWin; PostNewCursor(pDev); return FALSE; } return TRUE; } /** * Windows have restructured, we need to update the sprite position and the * sprite's cursor. */ void WindowsRestructured(void) { DeviceIntPtr pDev = inputInfo.devices; while (pDev) { if (IsMaster(pDev) || IsFloating(pDev)) CheckMotion(NULL, pDev); pDev = pDev->next; } } #ifdef PANORAMIX /* This was added to support reconfiguration under Xdmx. The problem is * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin * other than 0,0, the information in the private sprite structure must * be updated accordingly, or XYToWindow (and other routines) will not * compute correctly. */ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) { GrabPtr grab; DeviceIntPtr pDev; SpritePtr pSprite; if (noPanoramiXExtension) return; pDev = inputInfo.devices; while (pDev) { if (DevHasCursor(pDev)) { pSprite = pDev->spriteInfo->sprite; pSprite->hot.x -= xoff; pSprite->hot.y -= yoff; pSprite->hotPhys.x -= xoff; pSprite->hotPhys.y -= yoff; pSprite->hotLimits.x1 -= xoff; pSprite->hotLimits.y1 -= yoff; pSprite->hotLimits.x2 -= xoff; pSprite->hotLimits.y2 -= yoff; if (RegionNotEmpty(&pSprite->Reg1)) RegionTranslate(&pSprite->Reg1, xoff, yoff); if (RegionNotEmpty(&pSprite->Reg2)) RegionTranslate(&pSprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { if (grab->confineTo->drawable.pScreen != pSprite->hotPhys.pScreen) pSprite->hotPhys.x = pSprite->hotPhys.y = 0; ConfineCursorToWindow(pDev, grab->confineTo, TRUE, TRUE); } else ConfineCursorToWindow(pDev, pSprite->hotPhys.pScreen->root, TRUE, FALSE); } pDev = pDev->next; } } #endif /** * Initialize a sprite for the given device and set it to some sane values. If * the device already has a sprite alloc'd, don't realloc but just reset to * default values. * If a window is supplied, the sprite will be initialized with the window's * cursor and positioned in the center of the window's screen. The root window * is a good choice to pass in here. * * It's a good idea to call it only for pointer devices, unless you have a * really talented keyboard. * * @param pDev The device to initialize. * @param pWin The window where to generate the sprite in. * */ void InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { SpritePtr pSprite; ScreenPtr pScreen; CursorPtr pCursor; if (!pDev->spriteInfo->sprite) { DeviceIntPtr it; pDev->spriteInfo->sprite = (SpritePtr) calloc(1, sizeof(SpriteRec)); if (!pDev->spriteInfo->sprite) FatalError("InitializeSprite: failed to allocate sprite struct"); /* We may have paired another device with this device before our * device had a actual sprite. We need to check for this and reset the * sprite field for all paired devices. * * The VCK is always paired with the VCP before the VCP has a sprite. */ for (it = inputInfo.devices; it; it = it->next) { if (it->spriteInfo->paired == pDev) it->spriteInfo->sprite = pDev->spriteInfo->sprite; } if (inputInfo.keyboard->spriteInfo->paired == pDev) inputInfo.keyboard->spriteInfo->sprite = pDev->spriteInfo->sprite; } pSprite = pDev->spriteInfo->sprite; pDev->spriteInfo->spriteOwner = TRUE; pScreen = (pWin) ? pWin->drawable.pScreen : (ScreenPtr) NULL; pSprite->hot.pScreen = pScreen; pSprite->hotPhys.pScreen = pScreen; if (pScreen) { pSprite->hotPhys.x = pScreen->width / 2; pSprite->hotPhys.y = pScreen->height / 2; pSprite->hotLimits.x2 = pScreen->width; pSprite->hotLimits.y2 = pScreen->height; } pSprite->hot = pSprite->hotPhys; pSprite->win = pWin; if (pWin) { pCursor = wCursor(pWin); pSprite->spriteTrace = (WindowPtr *) calloc(1, 32 * sizeof(WindowPtr)); if (!pSprite->spriteTrace) FatalError("Failed to allocate spriteTrace"); pSprite->spriteTraceSize = 32; RootWindow(pDev->spriteInfo->sprite) = pWin; pSprite->spriteTraceGood = 1; pSprite->pEnqueueScreen = pScreen; pSprite->pDequeueScreen = pSprite->pEnqueueScreen; } else { pCursor = NullCursor; pSprite->spriteTrace = NULL; pSprite->spriteTraceSize = 0; pSprite->spriteTraceGood = 0; pSprite->pEnqueueScreen = screenInfo.screens[0]; pSprite->pDequeueScreen = pSprite->pEnqueueScreen; } pCursor = RefCursor(pCursor); if (pSprite->current) FreeCursor(pSprite->current, None); pSprite->current = pCursor; if (pScreen) { (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current); (*pScreen->CursorLimits) (pDev, pScreen, pSprite->current, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = FALSE; (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); (*pScreen->SetCursorPosition) (pDev, pScreen, pSprite->hot.x, pSprite->hot.y, FALSE); (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); } #ifdef PANORAMIX if (!noPanoramiXExtension) { pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; pSprite->physLimits = pSprite->hotLimits; pSprite->confineWin = NullWindow; pSprite->hotShape = NullRegion; pSprite->screen = pScreen; /* gotta UNINIT these someplace */ RegionNull(&pSprite->Reg1); RegionNull(&pSprite->Reg2); } #endif } void FreeSprite(DeviceIntPtr dev) { if (DevHasCursor(dev) && dev->spriteInfo->sprite) { if (dev->spriteInfo->sprite->current) FreeCursor(dev->spriteInfo->sprite->current, None); free(dev->spriteInfo->sprite->spriteTrace); free(dev->spriteInfo->sprite); } dev->spriteInfo->sprite = NULL; } /** * Update the mouse sprite info when the server switches from a pScreen to another. * Otherwise, the pScreen of the mouse sprite is never updated when we switch * from a pScreen to another. Never updating the pScreen of the mouse sprite * implies that windows that are in pScreen whose pScreen->myNum >0 will never * get pointer events. This is because in CheckMotion(), sprite.hotPhys.pScreen * always points to the first pScreen it has been set by * DefineInitialRootWindow(). * * Calling this function is useful for use cases where the server * has more than one pScreen. * This function is similar to DefineInitialRootWindow() but it does not * reset the mouse pointer position. * @param win must be the new pScreen we are switching to. */ void UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) { SpritePtr pSprite = NULL; WindowPtr win = NULL; CursorPtr pCursor; if (!pScreen) return; if (!pDev->spriteInfo->sprite) return; pSprite = pDev->spriteInfo->sprite; win = pScreen->root; pSprite->hotPhys.pScreen = pScreen; pSprite->hot = pSprite->hotPhys; pSprite->hotLimits.x2 = pScreen->width; pSprite->hotLimits.y2 = pScreen->height; pSprite->win = win; pCursor = RefCursor(wCursor(win)); if (pSprite->current) FreeCursor(pSprite->current, 0); pSprite->current = pCursor; pSprite->spriteTraceGood = 1; pSprite->spriteTrace[0] = win; (*pScreen->CursorLimits) (pDev, pScreen, pSprite->current, &pSprite->hotLimits, &pSprite->physLimits); pSprite->confined = FALSE; (*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits); (*pScreen->DisplayCursor) (pDev, pScreen, pSprite->current); #ifdef PANORAMIX if (!noPanoramiXExtension) { pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; pSprite->physLimits = pSprite->hotLimits; pSprite->screen = pScreen; } #endif } /* * This does not take any shortcuts, and even ignores its argument, since * it does not happen very often, and one has to walk up the tree since * this might be a newly instantiated cursor for an intermediate window * between the one the pointer is in and the one that the last cursor was * instantiated from. */ void WindowHasNewCursor(WindowPtr pWin) { DeviceIntPtr pDev; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) if (DevHasCursor(pDev)) PostNewCursor(pDev); } void NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) { DeviceIntPtr ptr; SpritePtr pSprite; ptr = IsFloating(pDev) ? pDev : GetXTestDevice(GetMaster(pDev, MASTER_POINTER)); pSprite = ptr->spriteInfo->sprite; pSprite->hotPhys.x = x; pSprite->hotPhys.y = y; #ifdef PANORAMIX if (!noPanoramiXExtension) { pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x; pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y; if (newScreen != pSprite->screen) { pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ if (pSprite->confineWin) XineramaConfineCursorToWindow(ptr, pSprite->confineWin, TRUE); else XineramaConfineCursorToWindow(ptr, screenInfo.screens[0]->root, TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if (!syncEvents.playingEvents) (*pSprite->screen->SetCursorPosition) (ptr, pSprite->screen, pSprite->hotPhys.x + screenInfo.screens[0]-> x - pSprite->screen->x, pSprite->hotPhys.y + screenInfo.screens[0]-> y - pSprite->screen->y, FALSE); } } else #endif if (newScreen != pSprite->hotPhys.pScreen) ConfineCursorToWindow(ptr, newScreen->root, TRUE, FALSE); } #ifdef PANORAMIX static Bool XineramaPointInWindowIsVisible(WindowPtr pWin, int x, int y) { BoxRec box; int i, xoff, yoff; if (!pWin->realized) return FALSE; if (RegionContainsPoint(&pWin->borderClip, x, y, &box)) return TRUE; if (!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE; xoff = x + screenInfo.screens[0]->x; yoff = y + screenInfo.screens[0]->y; FOR_NSCREENS_FORWARD_SKIP(i) { pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; x = xoff - screenInfo.screens[i]->x; y = yoff - screenInfo.screens[i]->y; if (RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || RegionContainsPoint(wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box))) return TRUE; } return FALSE; } static int XineramaWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y, rc; SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xWarpPointerReq); if (stuff->dstWid != None) { rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); if (rc != Success) return rc; } x = pSprite->hotPhys.x; y = pSprite->hotPhys.y; if (stuff->srcWid != None) { int winX, winY; XID winID = stuff->srcWid; WindowPtr source; rc = dixLookupWindow(&source, winID, client, DixReadAccess); if (rc != Success) return rc; winX = source->drawable.x; winY = source->drawable.y; if (source == screenInfo.screens[0]->root) { winX -= screenInfo.screens[0]->x; winY -= screenInfo.screens[0]->y; } if (x < winX + stuff->srcX || y < winY + stuff->srcY || (stuff->srcWidth != 0 && winX + stuff->srcX + (int) stuff->srcWidth < x) || (stuff->srcHeight != 0 && winY + stuff->srcY + (int) stuff->srcHeight < y) || !XineramaPointInWindowIsVisible(source, x, y)) return Success; } if (dest) { x = dest->drawable.x; y = dest->drawable.y; if (dest == screenInfo.screens[0]->root) { x -= screenInfo.screens[0]->x; y -= screenInfo.screens[0]->y; } } x += stuff->dstX; y += stuff->dstY; if (x < pSprite->physLimits.x1) x = pSprite->physLimits.x1; else if (x >= pSprite->physLimits.x2) x = pSprite->physLimits.x2 - 1; if (y < pSprite->physLimits.y1) y = pSprite->physLimits.y1; else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y); XineramaSetCursorPosition(PickPointer(client), x, y, TRUE); return Success; } #endif /** * Server-side protocol handling for WarpPointer request. * Warps the cursor position to the coordinates given in the request. */ int ProcWarpPointer(ClientPtr client) { WindowPtr dest = NULL; int x, y, rc; ScreenPtr newScreen; DeviceIntPtr dev, tmp; SpritePtr pSprite; REQUEST(xWarpPointerReq); REQUEST_SIZE_MATCH(xWarpPointerReq); dev = PickPointer(client); for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { if (GetMaster(tmp, MASTER_ATTACHED) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixWriteAccess); if (rc != Success) return rc; } } if (dev->lastSlave) dev = dev->lastSlave; pSprite = dev->spriteInfo->sprite; #ifdef PANORAMIX if (!noPanoramiXExtension) return XineramaWarpPointer(client); #endif if (stuff->dstWid != None) { rc = dixLookupWindow(&dest, stuff->dstWid, client, DixGetAttrAccess); if (rc != Success) return rc; } x = pSprite->hotPhys.x; y = pSprite->hotPhys.y; if (stuff->srcWid != None) { int winX, winY; XID winID = stuff->srcWid; WindowPtr source; rc = dixLookupWindow(&source, winID, client, DixGetAttrAccess); if (rc != Success) return rc; winX = source->drawable.x; winY = source->drawable.y; if (source->drawable.pScreen != pSprite->hotPhys.pScreen || x < winX + stuff->srcX || y < winY + stuff->srcY || (stuff->srcWidth != 0 && winX + stuff->srcX + (int) stuff->srcWidth < x) || (stuff->srcHeight != 0 && winY + stuff->srcY + (int) stuff->srcHeight < y) || (source->parent && !PointInWindowIsVisible(source, x, y))) return Success; } if (dest) { x = dest->drawable.x; y = dest->drawable.y; newScreen = dest->drawable.pScreen; } else newScreen = pSprite->hotPhys.pScreen; x += stuff->dstX; y += stuff->dstY; if (x < 0) x = 0; else if (x >= newScreen->width) x = newScreen->width - 1; if (y < 0) y = 0; else if (y >= newScreen->height) y = newScreen->height - 1; if (newScreen == pSprite->hotPhys.pScreen) { if (x < pSprite->physLimits.x1) x = pSprite->physLimits.x1; else if (x >= pSprite->physLimits.x2) x = pSprite->physLimits.x2 - 1; if (y < pSprite->physLimits.y1) y = pSprite->physLimits.y1; else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(dev, pSprite->hotShape, &x, &y); (*newScreen->SetCursorPosition) (dev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(dev)) { NewCurrentScreen(dev, newScreen, x, y); } if (*newScreen->CursorWarpedTo) (*newScreen->CursorWarpedTo) (dev, newScreen, client, dest, pSprite, x, y); return Success; } static Bool BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) { if (RegionNotEmpty(&pWin->borderSize)) return TRUE; #ifdef PANORAMIX if (!noPanoramiXExtension && XineramaSetWindowPntrs(pDev, pWin)) { int i; FOR_NSCREENS_FORWARD_SKIP(i) { if (RegionNotEmpty (&pDev->spriteInfo->sprite->windows[i]->borderSize)) return TRUE; } } #endif return FALSE; } /** * Activate the given passive grab. If the grab is activated successfully, the * event has been delivered to the client. * * @param device The device of the event to check. * @param grab The grab to check. * @param event The current device event. * @param real_event The original event, in case of touch emulation. The * real event is the one stored in the sync queue. * * @return Whether the grab has been activated. */ Bool ActivatePassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event, InternalEvent *real_event) { SpritePtr pSprite = device->spriteInfo->sprite; xEvent *xE = NULL; int count; int rc; /* The only consumers of corestate are Xi 1.x and core events, which * are guaranteed to come from DeviceEvents. */ if (grab->grabtype == XI || grab->grabtype == CORE) { DeviceIntPtr gdev; event->device_event.corestate &= 0x1f00; if (grab->grabtype == CORE) gdev = GetMaster(device, KEYBOARD_OR_FLOAT); else gdev = grab->modifierDevice; if (gdev && gdev->key && gdev->key->xkbInfo) event->device_event.corestate |= gdev->key->xkbInfo->state.grab_mods & (~0x1f00); } if (grab->grabtype == CORE) { rc = EventToCore(event, &xE, &count); if (rc != Success) { BUG_WARN_MSG(rc != BadMatch, "[dix] %s: core conversion failed" "(%d, %d).\n", device->name, event->any.type, rc); return FALSE; } } else if (grab->grabtype == XI2) { rc = EventToXI2(event, &xE); if (rc != Success) { if (rc != BadMatch) BUG_WARN_MSG(rc != BadMatch, "[dix] %s: XI2 conversion failed" "(%d, %d).\n", device->name, event->any.type, rc); return FALSE; } count = 1; } else { rc = EventToXI(event, &xE, &count); if (rc != Success) { if (rc != BadMatch) BUG_WARN_MSG(rc != BadMatch, "[dix] %s: XI conversion failed" "(%d, %d).\n", device->name, event->any.type, rc); return FALSE; } } ActivateGrabNoDelivery(device, grab, event, real_event); if (xE) { FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE); /* XXX: XACE? */ TryClientEvents(rClient(grab), device, xE, count, GetEventFilter(device, xE), GetEventFilter(device, xE), grab); } free(xE); return TRUE; } /** * Activates a grab without event delivery. * * @param device The device of the event to check. * @param grab The grab to check. * @param event The current device event. * @param real_event The original event, in case of touch emulation. The * real event is the one stored in the sync queue. */ void ActivateGrabNoDelivery(DeviceIntPtr dev, GrabPtr grab, InternalEvent *event, InternalEvent *real_event) { GrabInfoPtr grabinfo = &dev->deviceGrab; (*grabinfo->ActivateGrab) (dev, grab, ClientTimeToServerTime(event->any.time), TRUE); if (grabinfo->sync.state == FROZEN_NO_EVENT) grabinfo->sync.state = FROZEN_WITH_EVENT; CopyPartialInternalEvent(grabinfo->sync.event, real_event); } static BOOL CoreGrabInterferes(DeviceIntPtr device, GrabPtr grab) { DeviceIntPtr other; BOOL interfering = FALSE; for (other = inputInfo.devices; other; other = other->next) { GrabPtr othergrab = other->deviceGrab.grab; if (othergrab && othergrab->grabtype == CORE && SameClient(grab, rClient(othergrab)) && ((IsPointerDevice(grab->device) && IsPointerDevice(othergrab->device)) || (IsKeyboardDevice(grab->device) && IsKeyboardDevice(othergrab->device)))) { interfering = TRUE; break; } } return interfering; } enum MatchFlags { NO_MATCH = 0x0, CORE_MATCH = 0x1, XI_MATCH = 0x2, XI2_MATCH = 0x4, }; /** * Match the grab against the temporary grab on the given input level. * Modifies the temporary grab pointer. * * @param grab The grab to match against * @param tmp The temporary grab to use for matching * @param level The input level we want to match on * @param event_type Wire protocol event type * * @return The respective matched flag or 0 for no match */ static enum MatchFlags MatchForType(const GrabPtr grab, GrabPtr tmp, enum InputLevel level, int event_type) { enum MatchFlags match; BOOL ignore_device = FALSE; int grabtype; int evtype; switch (level) { case XI2: grabtype = XI2; evtype = GetXI2Type(event_type); BUG_WARN(!evtype); match = XI2_MATCH; break; case XI: grabtype = XI; evtype = GetXIType(event_type); match = XI_MATCH; break; case CORE: grabtype = CORE; evtype = GetCoreType(event_type); match = CORE_MATCH; ignore_device = TRUE; break; default: return NO_MATCH; } tmp->grabtype = grabtype; tmp->type = evtype; if (tmp->type && GrabMatchesSecond(tmp, grab, ignore_device)) return match; return NO_MATCH; } /** * Check an individual grab against an event to determine if a passive grab * should be activated. * * @param device The device of the event to check. * @param grab The grab to check. * @param event The current device event. * @param checkCore Check for core grabs too. * @param tempGrab A pre-allocated temporary grab record for matching. This * must have the window and device values filled in. * * @return Whether the grab matches the event. */ static Bool CheckPassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event, Bool checkCore, GrabPtr tempGrab) { DeviceIntPtr gdev; XkbSrvInfoPtr xkbi = NULL; enum MatchFlags match = 0; int emulated_type = 0; gdev = grab->modifierDevice; if (grab->grabtype == CORE) { gdev = GetMaster(device, KEYBOARD_OR_FLOAT); } else if (grab->grabtype == XI2) { /* if the device is an attached slave device, gdev must be the * attached master keyboard. Since the slave may have been * reattached after the grab, the modifier device may not be the * same. */ if (!IsMaster(grab->device) && !IsFloating(device)) gdev = GetMaster(device, MASTER_KEYBOARD); } if (gdev && gdev->key) xkbi = gdev->key->xkbInfo; tempGrab->modifierDevice = grab->modifierDevice; tempGrab->modifiersDetail.exact = xkbi ? xkbi->state.grab_mods : 0; /* Check for XI2 and XI grabs first */ match = MatchForType(grab, tempGrab, XI2, event->any.type); if (!match && IsTouchEvent(event) && (event->device_event.flags & TOUCH_POINTER_EMULATED)) { emulated_type = TouchGetPointerEventType(event); match = MatchForType(grab, tempGrab, XI2, emulated_type); } if (!match) match = MatchForType(grab, tempGrab, XI, event->any.type); if (!match && emulated_type) match = MatchForType(grab, tempGrab, XI, emulated_type); if (!match && checkCore) { match = MatchForType(grab, tempGrab, CORE, event->any.type); if (!match && emulated_type) match = MatchForType(grab, tempGrab, CORE, emulated_type); } if (!match || (grab->confineTo && (!grab->confineTo->realized || !BorderSizeNotEmpty(device, grab->confineTo)))) return FALSE; /* In some cases a passive core grab may exist, but the client * already has a core grab on some other device. In this case we * must not get the grab, otherwise we may never ungrab the * device. */ if (grab->grabtype == CORE) { /* A passive grab may have been created for a different device than it is assigned to at this point in time. Update the grab's device and modifier device to reflect the current state. Since XGrabDeviceButton requires to specify the modifierDevice explicitly, we don't override this choice. */ if (grab->type < GenericEvent) { grab->device = device; grab->modifierDevice = GetMaster(device, MASTER_KEYBOARD); } if (CoreGrabInterferes(device, grab)) return FALSE; } return TRUE; } /** * "CheckPassiveGrabsOnWindow" checks to see if the event passed in causes a * passive grab set on the window to be activated. * If activate is true and a passive grab is found, it will be activated, * and the event will be delivered to the client. * * @param pWin The window that may be subject to a passive grab. * @param device Device that caused the event. * @param event The current device event. * @param checkCore Check for core grabs too. * @param activate If a grab is found, activate it and deliver the event. */ GrabPtr CheckPassiveGrabsOnWindow(WindowPtr pWin, DeviceIntPtr device, InternalEvent *event, BOOL checkCore, BOOL activate) { GrabPtr grab = wPassiveGrabs(pWin); GrabPtr tempGrab; if (!grab) return NULL; tempGrab = AllocGrab(NULL); if (tempGrab == NULL) return NULL; /* Fill out the grab details, but leave the type for later before * comparing */ switch (event->any.type) { case ET_KeyPress: case ET_KeyRelease: tempGrab->detail.exact = event->device_event.detail.key; break; case ET_ButtonPress: case ET_ButtonRelease: case ET_TouchBegin: case ET_TouchEnd: tempGrab->detail.exact = event->device_event.detail.button; break; default: tempGrab->detail.exact = 0; break; } tempGrab->window = pWin; tempGrab->device = device; tempGrab->detail.pMask = NULL; tempGrab->modifiersDetail.pMask = NULL; tempGrab->next = NULL; for (; grab; grab = grab->next) { if (!CheckPassiveGrab(device, grab, event, checkCore, tempGrab)) continue; if (activate && !ActivatePassiveGrab(device, grab, event, event)) continue; break; } FreeGrab(tempGrab); return grab; } /** * CheckDeviceGrabs handles both keyboard and pointer events that may cause * a passive grab to be activated. * * If the event is a keyboard event, the ancestors of the focus window are * traced down and tried to see if they have any passive grabs to be * activated. If the focus window itself is reached and its descendants * contain the pointer, the ancestors of the window that the pointer is in * are then traced down starting at the focus window, otherwise no grabs are * activated. * If the event is a pointer event, the ancestors of the window that the * pointer is in are traced down starting at the root until CheckPassiveGrabs * causes a passive grab to activate or all the windows are * tried. PRH * * If a grab is activated, the event has been sent to the client already! * * The event we pass in must always be an XI event. From this, we then emulate * the core event and then check for grabs. * * @param device The device that caused the event. * @param xE The event to handle (Device{Button|Key}Press). * @param count Number of events in list. * @return TRUE if a grab has been activated or false otherwise. */ Bool CheckDeviceGrabs(DeviceIntPtr device, InternalEvent *ievent, WindowPtr ancestor) { int i; WindowPtr pWin = NULL; FocusClassPtr focus = IsPointerEvent(ievent) ? NULL : device->focus; BOOL sendCore = (IsMaster(device) && device->coreEvents); Bool ret = FALSE; DeviceEvent *event = &ievent->device_event; if (event->type != ET_ButtonPress && event->type != ET_KeyPress) return FALSE; if (event->type == ET_ButtonPress && (device->button->buttonsDown != 1)) return FALSE; if (device->deviceGrab.grab) return FALSE; i = 0; if (ancestor) { while (i < device->spriteInfo->sprite->spriteTraceGood) if (device->spriteInfo->sprite->spriteTrace[i++] == ancestor) break; if (i == device->spriteInfo->sprite->spriteTraceGood) goto out; } if (focus) { for (; i < focus->traceGood; i++) { pWin = focus->trace[i]; if (CheckPassiveGrabsOnWindow(pWin, device, ievent, sendCore, TRUE)) { ret = TRUE; goto out; } } if ((focus->win == NoneWin) || (i >= device->spriteInfo->sprite->spriteTraceGood) || (pWin && pWin != device->spriteInfo->sprite->spriteTrace[i - 1])) goto out; } for (; i < device->spriteInfo->sprite->spriteTraceGood; i++) { pWin = device->spriteInfo->sprite->spriteTrace[i]; if (CheckPassiveGrabsOnWindow(pWin, device, ievent, sendCore, TRUE)) { ret = TRUE; goto out; } } out: if (ret == TRUE && event->type == ET_KeyPress) device->deviceGrab.activatingKey = event->detail.key; return ret; } /** * Called for keyboard events to deliver event to whatever client owns the * focus. * * The event is delivered to the keyboard's focus window, the root window or * to the window owning the input focus. * * @param keybd The keyboard originating the event. * @param event The event, not yet in wire format. * @param window Window underneath the sprite. */ void DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) { DeviceIntPtr ptr; WindowPtr focus = keybd->focus->win; BOOL sendCore = (IsMaster(keybd) && keybd->coreEvents); xEvent *core = NULL, *xE = NULL, *xi2 = NULL; int count, rc; int deliveries = 0; if (focus == FollowKeyboardWin) focus = inputInfo.keyboard->focus->win; if (!focus) return; if (focus == PointerRootWin) { DeliverDeviceEvents(window, event, NullGrab, NullWindow, keybd); return; } if ((focus == window) || IsParent(focus, window)) { if (DeliverDeviceEvents(window, event, NullGrab, focus, keybd)) return; } /* just deliver it to the focus window */ ptr = GetMaster(keybd, POINTER_OR_FLOAT); rc = EventToXI2(event, &xi2); if (rc == Success) { /* XXX: XACE */ int filter = GetEventFilter(keybd, xi2); FixUpEventFromWindow(ptr->spriteInfo->sprite, xi2, focus, None, FALSE); deliveries = DeliverEventsToWindow(keybd, focus, xi2, 1, filter, NullGrab); if (deliveries > 0) goto unwind; } else if (rc != BadMatch) ErrorF ("[dix] %s: XI2 conversion failed in DFE (%d, %d). Skipping delivery.\n", keybd->name, event->any.type, rc); rc = EventToXI(event, &xE, &count); if (rc == Success && XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, xE, count) == Success) { FixUpEventFromWindow(ptr->spriteInfo->sprite, xE, focus, None, FALSE); deliveries = DeliverEventsToWindow(keybd, focus, xE, count, GetEventFilter(keybd, xE), NullGrab); if (deliveries > 0) goto unwind; } else if (rc != BadMatch) ErrorF ("[dix] %s: XI conversion failed in DFE (%d, %d). Skipping delivery.\n", keybd->name, event->any.type, rc); if (sendCore) { rc = EventToCore(event, &core, &count); if (rc == Success) { if (XaceHook(XACE_SEND_ACCESS, NULL, keybd, focus, core, count) == Success) { FixUpEventFromWindow(keybd->spriteInfo->sprite, core, focus, None, FALSE); deliveries = DeliverEventsToWindow(keybd, focus, core, count, GetEventFilter(keybd, core), NullGrab); } } else if (rc != BadMatch) ErrorF ("[dix] %s: core conversion failed DFE (%d, %d). Skipping delivery.\n", keybd->name, event->any.type, rc); } unwind: free(core); free(xE); free(xi2); return; } int DeliverOneGrabbedEvent(InternalEvent *event, DeviceIntPtr dev, enum InputLevel level) { SpritePtr pSprite = dev->spriteInfo->sprite; int rc; xEvent *xE = NULL; int count = 0; int deliveries = 0; Mask mask; GrabInfoPtr grabinfo = &dev->deviceGrab; GrabPtr grab = grabinfo->grab; Mask filter; if (grab->grabtype != level) return 0; switch (level) { case XI2: rc = EventToXI2(event, &xE); count = 1; if (rc == Success) { int evtype = xi2_get_type(xE); mask = GetXI2MaskByte(grab->xi2mask, dev, evtype); filter = GetEventFilter(dev, xE); } break; case XI: if (grabinfo->fromPassiveGrab && grabinfo->implicitGrab) mask = grab->deviceMask; else mask = grab->eventMask; rc = EventToXI(event, &xE, &count); if (rc == Success) filter = GetEventFilter(dev, xE); break; case CORE: rc = EventToCore(event, &xE, &count); mask = grab->eventMask; if (rc == Success) filter = GetEventFilter(dev, xE); break; default: BUG_WARN_MSG(1, "Invalid input level %d\n", level); return 0; } if (rc == Success) { FixUpEventFromWindow(pSprite, xE, grab->window, None, TRUE); if (XaceHook(XACE_SEND_ACCESS, 0, dev, grab->window, xE, count) || XaceHook(XACE_RECEIVE_ACCESS, rClient(grab), grab->window, xE, count)) deliveries = 1; /* don't send, but pretend we did */ else if (level != CORE || !IsInterferingGrab(rClient(grab), dev, xE)) { deliveries = TryClientEvents(rClient(grab), dev, xE, count, mask, filter, grab); } } else BUG_WARN_MSG(rc != BadMatch, "%s: conversion to mode %d failed on %d with %d\n", dev->name, level, event->any.type, rc); free(xE); return deliveries; } /** * Deliver an event from a device that is currently grabbed. Uses * DeliverDeviceEvents() for further delivery if a ownerEvents is set on the * grab. If not, TryClientEvents() is used. * * @param deactivateGrab True if the device's grab should be deactivated. * * @return The number of events delivered. */ int DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, Bool deactivateGrab) { GrabPtr grab; GrabInfoPtr grabinfo; int deliveries = 0; SpritePtr pSprite = thisDev->spriteInfo->sprite; BOOL sendCore = FALSE; grabinfo = &thisDev->deviceGrab; grab = grabinfo->grab; if (grab->ownerEvents) { WindowPtr focus; /* Hack: Some pointer device have a focus class. So we need to check * for the type of event, to see if we really want to deliver it to * the focus window. For pointer events, the answer is no. */ if (IsPointerEvent(event)) focus = PointerRootWin; else if (thisDev->focus) { focus = thisDev->focus->win; if (focus == FollowKeyboardWin) focus = inputInfo.keyboard->focus->win; } else focus = PointerRootWin; if (focus == PointerRootWin) deliveries = DeliverDeviceEvents(pSprite->win, event, grab, NullWindow, thisDev); else if (focus && (focus == pSprite->win || IsParent(focus, pSprite->win))) deliveries = DeliverDeviceEvents(pSprite->win, event, grab, focus, thisDev); else if (focus) deliveries = DeliverDeviceEvents(focus, event, grab, focus, thisDev); } if (!deliveries) { sendCore = (IsMaster(thisDev) && thisDev->coreEvents); /* try core event */ if ((sendCore && grab->grabtype == CORE) || grab->grabtype != CORE) deliveries = DeliverOneGrabbedEvent(event, thisDev, grab->grabtype); if (deliveries && (event->any.type == ET_Motion)) thisDev->valuator->motionHintWindow = grab->window; } if (deliveries && !deactivateGrab && (event->any.type == ET_KeyPress || event->any.type == ET_KeyRelease || event->any.type == ET_ButtonPress || event->any.type == ET_ButtonRelease)) { FreezeThisEventIfNeededForSyncGrab(thisDev, event); } return deliveries; } void FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, InternalEvent *event) { GrabInfoPtr grabinfo = &thisDev->deviceGrab; GrabPtr grab = grabinfo->grab; DeviceIntPtr dev; switch (grabinfo->sync.state) { case FREEZE_BOTH_NEXT_EVENT: dev = GetPairedDevice(thisDev); if (dev) { FreezeThaw(dev, TRUE); if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) && (CLIENT_BITS(grab->resource) == CLIENT_BITS(dev->deviceGrab.grab->resource))) dev->deviceGrab.sync.state = FROZEN_NO_EVENT; else dev->deviceGrab.sync.other = grab; } /* fall through */ case FREEZE_NEXT_EVENT: grabinfo->sync.state = FROZEN_WITH_EVENT; FreezeThaw(thisDev, TRUE); CopyPartialInternalEvent(grabinfo->sync.event, event); break; } } /* This function is used to set the key pressed or key released state - this is only used when the pressing of keys does not cause the device's processInputProc to be called, as in for example Mouse Keys. */ void FixKeyState(DeviceEvent *event, DeviceIntPtr keybd) { int key = event->detail.key; if (event->type == ET_KeyPress) { DebugF("FixKeyState: Key %d %s\n", key, ((event->type == ET_KeyPress) ? "down" : "up")); } if (event->type == ET_KeyPress) set_key_down(keybd, key, KEY_PROCESSED); else if (event->type == ET_KeyRelease) set_key_up(keybd, key, KEY_PROCESSED); else FatalError("Impossible keyboard event"); } #define AtMostOneClient \ (SubstructureRedirectMask | ResizeRedirectMask | ButtonPressMask) #define ManagerMask \ (SubstructureRedirectMask | ResizeRedirectMask) /** * Recalculate which events may be deliverable for the given window. * Recalculated mask is used for quicker determination which events may be * delivered to a window. * * The otherEventMasks on a WindowOptional is the combination of all event * masks set by all clients on the window. * deliverableEventMask is the combination of the eventMask and the * otherEventMask plus the events that may be propagated to the parent. * * Traverses to siblings and parents of the window. */ void RecalculateDeliverableEvents(WindowPtr pWin) { OtherClients *others; WindowPtr pChild; pChild = pWin; while (1) { if (pChild->optional) { pChild->optional->otherEventMasks = 0; for (others = wOtherClients(pChild); others; others = others->next) { pChild->optional->otherEventMasks |= others->mask; } } pChild->deliverableEvents = pChild->eventMask | wOtherEventMasks(pChild); if (pChild->parent) pChild->deliverableEvents |= (pChild->parent->deliverableEvents & ~wDontPropagateMask(pChild) & PropagateMask); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } } /** * * \param value must conform to DeleteType */ int OtherClientGone(void *value, XID id) { OtherClientsPtr other, prev; WindowPtr pWin = (WindowPtr) value; prev = 0; for (other = wOtherClients(pWin); other; other = other->next) { if (other->resource == id) { if (prev) prev->next = other->next; else { if (!(pWin->optional->otherClients = other->next)) CheckWindowOptionalNeed(pWin); } free(other); RecalculateDeliverableEvents(pWin); return Success; } prev = other; } FatalError("client not on event list"); } int EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) { Mask check; OtherClients *others; DeviceIntPtr dev; int rc; if (mask & ~AllEventMasks) { client->errorValue = mask; return BadValue; } check = (mask & ManagerMask); if (check) { rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, pWin, RT_NONE, NULL, DixManageAccess); if (rc != Success) return rc; } check = (mask & AtMostOneClient); if (check & (pWin->eventMask | wOtherEventMasks(pWin))) { /* It is illegal for two different clients to select on any of the events for AtMostOneClient. However, it is OK, for some client to continue selecting on one of those events. */ if ((wClient(pWin) != client) && (check & pWin->eventMask)) return BadAccess; for (others = wOtherClients(pWin); others; others = others->next) { if (!SameClient(others, client) && (check & others->mask)) return BadAccess; } } if (wClient(pWin) == client) { check = pWin->eventMask; pWin->eventMask = mask; } else { for (others = wOtherClients(pWin); others; others = others->next) { if (SameClient(others, client)) { check = others->mask; if (mask == 0) { FreeResource(others->resource, RT_NONE); return Success; } else others->mask = mask; goto maskSet; } } check = 0; if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; others = malloc(sizeof(OtherClients)); if (!others) return BadAlloc; others->mask = mask; others->resource = FakeClientID(client->index); others->next = pWin->optional->otherClients; pWin->optional->otherClients = others; if (!AddResource(others->resource, RT_OTHERCLIENT, (void *) pWin)) return BadAlloc; } maskSet: if ((mask & PointerMotionHintMask) && !(check & PointerMotionHintMask)) { for (dev = inputInfo.devices; dev; dev = dev->next) { if (dev->valuator && dev->valuator->motionHintWindow == pWin) dev->valuator->motionHintWindow = NullWindow; } } RecalculateDeliverableEvents(pWin); return Success; } int EventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, Bool *checkOptional) { int i, freed; if (mask & ~PropagateMask) { client->errorValue = mask; return BadValue; } if (pWin->dontPropagate) DontPropagateRefCnts[pWin->dontPropagate]--; if (!mask) i = 0; else { for (i = DNPMCOUNT, freed = 0; --i > 0;) { if (!DontPropagateRefCnts[i]) freed = i; else if (mask == DontPropagateMasks[i]) break; } if (!i && freed) { i = freed; DontPropagateMasks[i] = mask; } } if (i || !mask) { pWin->dontPropagate = i; if (i) DontPropagateRefCnts[i]++; if (pWin->optional) { pWin->optional->dontPropagateMask = mask; *checkOptional = TRUE; } } else { if (!pWin->optional && !MakeWindowOptional(pWin)) { if (pWin->dontPropagate) DontPropagateRefCnts[pWin->dontPropagate]++; return BadAlloc; } pWin->dontPropagate = 0; pWin->optional->dontPropagateMask = mask; } RecalculateDeliverableEvents(pWin); return Success; } /** * Assembles an EnterNotify or LeaveNotify and sends it event to the client. * Uses the paired keyboard to get some additional information. */ void CoreEnterLeaveEvent(DeviceIntPtr mouse, int type, int mode, int detail, WindowPtr pWin, Window child) { xEvent event = { .u.u.type = type, .u.u.detail = detail }; WindowPtr focus; DeviceIntPtr keybd; GrabPtr grab = mouse->deviceGrab.grab; Mask mask; keybd = GetMaster(mouse, KEYBOARD_OR_FLOAT); if ((pWin == mouse->valuator->motionHintWindow) && (detail != NotifyInferior)) mouse->valuator->motionHintWindow = NullWindow; if (grab) { mask = (pWin == grab->window) ? grab->eventMask : 0; if (grab->ownerEvents) mask |= EventMaskForClient(pWin, rClient(grab)); } else { mask = pWin->eventMask | wOtherEventMasks(pWin); } event.u.enterLeave.time = currentTime.milliseconds; event.u.enterLeave.rootX = mouse->spriteInfo->sprite->hot.x; event.u.enterLeave.rootY = mouse->spriteInfo->sprite->hot.y; /* Counts on the same initial structure of crossing & button events! */ FixUpEventFromWindow(mouse->spriteInfo->sprite, &event, pWin, None, FALSE); /* Enter/Leave events always set child */ event.u.enterLeave.child = child; event.u.enterLeave.flags = event.u.keyButtonPointer.sameScreen ? ELFlagSameScreen : 0; event.u.enterLeave.state = mouse->button ? (mouse->button->state & 0x1f00) : 0; if (keybd) event.u.enterLeave.state |= XkbGrabStateFromRec(&keybd->key->xkbInfo->state); event.u.enterLeave.mode = mode; focus = (keybd) ? keybd->focus->win : None; if ((focus != NoneWin) && ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin))) event.u.enterLeave.flags |= ELFlagFocus; if ((mask & GetEventFilter(mouse, &event))) { if (grab) TryClientEvents(rClient(grab), mouse, &event, 1, mask, GetEventFilter(mouse, &event), grab); else DeliverEventsToWindow(mouse, pWin, &event, 1, GetEventFilter(mouse, &event), NullGrab); } if ((type == EnterNotify) && (mask & KeymapStateMask)) { xKeymapEvent ke = { .type = KeymapNotify }; ClientPtr client = grab ? rClient(grab) : wClient(pWin); int rc; rc = XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess); if (rc == Success) memcpy((char *) &ke.map[0], (char *) &keybd->key->down[1], 31); if (grab) TryClientEvents(rClient(grab), keybd, (xEvent *) &ke, 1, mask, KeymapStateMask, grab); else DeliverEventsToWindow(mouse, pWin, (xEvent *) &ke, 1, KeymapStateMask, NullGrab); } } void DeviceEnterLeaveEvent(DeviceIntPtr mouse, int sourceid, int type, int mode, int detail, WindowPtr pWin, Window child) { GrabPtr grab = mouse->deviceGrab.grab; xXIEnterEvent *event; WindowPtr focus; int filter; int btlen, len, i; DeviceIntPtr kbd; if ((mode == XINotifyPassiveGrab && type == XI_Leave) || (mode == XINotifyPassiveUngrab && type == XI_Enter)) return; btlen = (mouse->button) ? bits_to_bytes(mouse->button->numButtons) : 0; btlen = bytes_to_int32(btlen); len = sizeof(xXIEnterEvent) + btlen * 4; event = calloc(1, len); event->type = GenericEvent; event->extension = IReqCode; event->evtype = type; event->length = (len - sizeof(xEvent)) / 4; event->buttons_len = btlen; event->detail = detail; event->time = currentTime.milliseconds; event->deviceid = mouse->id; event->sourceid = sourceid; event->mode = mode; event->root_x = double_to_fp1616(mouse->spriteInfo->sprite->hot.x); event->root_y = double_to_fp1616(mouse->spriteInfo->sprite->hot.y); for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) if (BitIsOn(mouse->button->down, i)) SetBit(&event[1], i); kbd = GetMaster(mouse, MASTER_KEYBOARD); if (kbd && kbd->key) { event->mods.base_mods = kbd->key->xkbInfo->state.base_mods; event->mods.latched_mods = kbd->key->xkbInfo->state.latched_mods; event->mods.locked_mods = kbd->key->xkbInfo->state.locked_mods; event->group.base_group = kbd->key->xkbInfo->state.base_group; event->group.latched_group = kbd->key->xkbInfo->state.latched_group; event->group.locked_group = kbd->key->xkbInfo->state.locked_group; } focus = (kbd) ? kbd->focus->win : None; if ((focus != NoneWin) && ((pWin == focus) || (focus == PointerRootWin) || IsParent(focus, pWin))) event->focus = TRUE; FixUpEventFromWindow(mouse->spriteInfo->sprite, (xEvent *) event, pWin, None, FALSE); filter = GetEventFilter(mouse, (xEvent *) event); if (grab && grab->grabtype == XI2) { Mask mask; mask = xi2mask_isset(grab->xi2mask, mouse, type); TryClientEvents(rClient(grab), mouse, (xEvent *) event, 1, mask, 1, grab); } else { if (!WindowXI2MaskIsset(mouse, pWin, (xEvent *) event)) goto out; DeliverEventsToWindow(mouse, pWin, (xEvent *) event, 1, filter, NullGrab); } out: free(event); } void CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) { xEvent event = { .u.u.type = type, .u.u.detail = detail }; event.u.focus.mode = mode; event.u.focus.window = pWin->drawable.id; DeliverEventsToWindow(dev, pWin, &event, 1, GetEventFilter(dev, &event), NullGrab); if ((type == FocusIn) && ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { xKeymapEvent ke = { .type = KeymapNotify }; ClientPtr client = wClient(pWin); int rc; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); if (rc == Success) memcpy((char *) &ke.map[0], (char *) &dev->key->down[1], 31); DeliverEventsToWindow(dev, pWin, (xEvent *) &ke, 1, KeymapStateMask, NullGrab); } } /** * Set the input focus to the given window. Subsequent keyboard events will be * delivered to the given window. * * Usually called from ProcSetInputFocus as result of a client request. If so, * the device is the inputInfo.keyboard. * If called from ProcXSetInputFocus as result of a client xinput request, the * device is set to the device specified by the client. * * @param client Client that requested input focus change. * @param dev Focus device. * @param focusID The window to obtain the focus. Can be PointerRoot or None. * @param revertTo Specifies where the focus reverts to when window becomes * unviewable. * @param ctime Specifies the time. * @param followOK True if pointer is allowed to follow the keyboard. */ int SetInputFocus(ClientPtr client, DeviceIntPtr dev, Window focusID, CARD8 revertTo, Time ctime, Bool followOK) { FocusClassPtr focus; WindowPtr focusWin; int mode, rc; TimeStamp time; DeviceIntPtr keybd; /* used for FollowKeyboard or FollowKeyboardWin */ UpdateCurrentTime(); if ((revertTo != RevertToParent) && (revertTo != RevertToPointerRoot) && (revertTo != RevertToNone) && ((revertTo != RevertToFollowKeyboard) || !followOK)) { client->errorValue = revertTo; return BadValue; } time = ClientTimeToServerTime(ctime); keybd = GetMaster(dev, KEYBOARD_OR_FLOAT); if ((focusID == None) || (focusID == PointerRoot)) focusWin = (WindowPtr) (long) focusID; else if ((focusID == FollowKeyboard) && followOK) { focusWin = keybd->focus->win; } else { rc = dixLookupWindow(&focusWin, focusID, client, DixSetAttrAccess); if (rc != Success) return rc; /* It is a match error to try to set the input focus to an unviewable window. */ if (!focusWin->realized) return BadMatch; } rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess); if (rc != Success) return Success; focus = dev->focus; if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, focus->time) == EARLIER)) return Success; mode = (dev->deviceGrab.grab) ? NotifyWhileGrabbed : NotifyNormal; if (focus->win == FollowKeyboardWin) { if (!ActivateFocusInGrab(dev, keybd->focus->win, focusWin)) DoFocusEvents(dev, keybd->focus->win, focusWin, mode); } else { if (!ActivateFocusInGrab(dev, focus->win, focusWin)) DoFocusEvents(dev, focus->win, focusWin, mode); } focus->time = time; focus->revert = revertTo; if (focusID == FollowKeyboard) focus->win = FollowKeyboardWin; else focus->win = focusWin; if ((focusWin == NoneWin) || (focusWin == PointerRootWin)) focus->traceGood = 0; else { int depth = 0; WindowPtr pWin; for (pWin = focusWin; pWin; pWin = pWin->parent) depth++; if (depth > focus->traceSize) { focus->traceSize = depth + 1; focus->trace = reallocarray(focus->trace, focus->traceSize, sizeof(WindowPtr)); } focus->traceGood = depth; for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) focus->trace[depth] = pWin; } return Success; } /** * Server-side protocol handling for SetInputFocus request. * * Sets the input focus for the virtual core keyboard. */ int ProcSetInputFocus(ClientPtr client) { DeviceIntPtr kbd = PickKeyboard(client); REQUEST(xSetInputFocusReq); REQUEST_SIZE_MATCH(xSetInputFocusReq); return SetInputFocus(client, kbd, stuff->focus, stuff->revertTo, stuff->time, FALSE); } /** * Server-side protocol handling for GetInputFocus request. * * Sends the current input focus for the client's keyboard back to the * client. */ int ProcGetInputFocus(ClientPtr client) { DeviceIntPtr kbd = PickKeyboard(client); xGetInputFocusReply rep; FocusClassPtr focus = kbd->focus; int rc; /* REQUEST(xReq); */ REQUEST_SIZE_MATCH(xReq); rc = XaceHook(XACE_DEVICE_ACCESS, client, kbd, DixGetFocusAccess); if (rc != Success) return rc; rep = (xGetInputFocusReply) { .type = X_Reply, .length = 0, .sequenceNumber = client->sequence, .revertTo = focus->revert }; if (focus->win == NoneWin) rep.focus = None; else if (focus->win == PointerRootWin) rep.focus = PointerRoot; else rep.focus = focus->win->drawable.id; WriteReplyToClient(client, sizeof(xGetInputFocusReply), &rep); return Success; } /** * Server-side protocol handling for GrabPointer request. * * Sets an active grab on the client's ClientPointer and returns success * status to client. */ int ProcGrabPointer(ClientPtr client) { xGrabPointerReply rep; DeviceIntPtr device = PickPointer(client); GrabPtr grab; GrabMask mask; WindowPtr confineTo; BYTE status; REQUEST(xGrabPointerReq); int rc; REQUEST_SIZE_MATCH(xGrabPointerReq); UpdateCurrentTime(); if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; } if (stuff->confineTo == None) confineTo = NullWindow; else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, DixSetAttrAccess); if (rc != Success) return rc; } grab = device->deviceGrab.grab; if (grab && grab->confineTo && !confineTo) ConfineCursorToWindow(device, GetCurrentRootWindow(device), FALSE, FALSE); mask.core = stuff->eventMask; rc = GrabDevice(client, device, stuff->pointerMode, stuff->keyboardMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, &mask, CORE, stuff->cursor, stuff->confineTo, &status); if (rc != Success) return rc; rep = (xGrabPointerReply) { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0 }; WriteReplyToClient(client, sizeof(xGrabPointerReply), &rep); return Success; } /** * Server-side protocol handling for ChangeActivePointerGrab request. * * Changes properties of the grab hold by the client. If the client does not * hold an active grab on the device, nothing happens. */ int ProcChangeActivePointerGrab(ClientPtr client) { DeviceIntPtr device; GrabPtr grab; CursorPtr newCursor, oldCursor; REQUEST(xChangeActivePointerGrabReq); TimeStamp time; REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; } if (stuff->cursor == None) newCursor = NullCursor; else { int rc = dixLookupResourceByType((void **) &newCursor, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) { client->errorValue = stuff->cursor; return rc; } } device = PickPointer(client); grab = device->deviceGrab.grab; if (!grab) return Success; if (!SameClient(grab, client)) return Success; UpdateCurrentTime(); time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, device->deviceGrab.grabTime) == EARLIER)) return Success; oldCursor = grab->cursor; grab->cursor = RefCursor(newCursor); PostNewCursor(device); if (oldCursor) FreeCursor(oldCursor, (Cursor) 0); grab->eventMask = stuff->eventMask; return Success; } /** * Server-side protocol handling for UngrabPointer request. * * Deletes a pointer grab on a device the client has grabbed. */ int ProcUngrabPointer(ClientPtr client) { DeviceIntPtr device = PickPointer(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); grab = device->deviceGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client)) (*device->deviceGrab.DeactivateGrab) (device); return Success; } /** * Sets a grab on the given device. * * Called from ProcGrabKeyboard to work on the client's keyboard. * Called from ProcXGrabDevice to work on the device specified by the client. * * The parameters this_mode and other_mode represent the keyboard_mode and * pointer_mode parameters of XGrabKeyboard(). * See man page for details on all the parameters * * @param client Client that owns the grab. * @param dev The device to grab. * @param this_mode GrabModeSync or GrabModeAsync * @param other_mode GrabModeSync or GrabModeAsync * @param status Return code to be returned to the caller. * * @returns Success or BadValue or BadAlloc. */ int GrabDevice(ClientPtr client, DeviceIntPtr dev, unsigned pointer_mode, unsigned keyboard_mode, Window grabWindow, unsigned ownerEvents, Time ctime, GrabMask *mask, int grabtype, Cursor curs, Window confineToWin, CARD8 *status) { WindowPtr pWin, confineTo; GrabPtr grab; TimeStamp time; Mask access_mode = DixGrabAccess; int rc; GrabInfoPtr grabInfo = &dev->deviceGrab; CursorPtr cursor; UpdateCurrentTime(); if ((keyboard_mode != GrabModeSync) && (keyboard_mode != GrabModeAsync)) { client->errorValue = keyboard_mode; return BadValue; } if ((pointer_mode != GrabModeSync) && (pointer_mode != GrabModeAsync)) { client->errorValue = pointer_mode; return BadValue; } if ((ownerEvents != xFalse) && (ownerEvents != xTrue)) { client->errorValue = ownerEvents; return BadValue; } rc = dixLookupWindow(&pWin, grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (confineToWin == None) confineTo = NullWindow; else { rc = dixLookupWindow(&confineTo, confineToWin, client, DixSetAttrAccess); if (rc != Success) return rc; } if (curs == None) cursor = NullCursor; else { rc = dixLookupResourceByType((void **) &cursor, curs, RT_CURSOR, client, DixUseAccess); if (rc != Success) { client->errorValue = curs; return rc; } access_mode |= DixForceAccess; } if (keyboard_mode == GrabModeSync || pointer_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; time = ClientTimeToServerTime(ctime); grab = grabInfo->grab; if (grab && grab->grabtype != grabtype) *status = AlreadyGrabbed; else if (grab && !SameClient(grab, client)) *status = AlreadyGrabbed; else if ((!pWin->realized) || (confineTo && !(confineTo->realized && BorderSizeNotEmpty(dev, confineTo)))) *status = GrabNotViewable; else if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, grabInfo->grabTime) == EARLIER)) *status = GrabInvalidTime; else if (grabInfo->sync.frozen && grabInfo->sync.other && !SameClient(grabInfo->sync.other, client)) *status = GrabFrozen; else { GrabPtr tempGrab; tempGrab = AllocGrab(NULL); if (tempGrab == NULL) return BadAlloc; tempGrab->next = NULL; tempGrab->window = pWin; tempGrab->resource = client->clientAsMask; tempGrab->ownerEvents = ownerEvents; tempGrab->keyboardMode = keyboard_mode; tempGrab->pointerMode = pointer_mode; if (grabtype == CORE) tempGrab->eventMask = mask->core; else if (grabtype == XI) tempGrab->eventMask = mask->xi; else xi2mask_merge(tempGrab->xi2mask, mask->xi2mask); tempGrab->device = dev; tempGrab->cursor = RefCursor(cursor); tempGrab->confineTo = confineTo; tempGrab->grabtype = grabtype; (*grabInfo->ActivateGrab) (dev, tempGrab, time, FALSE); *status = GrabSuccess; FreeGrab(tempGrab); } return Success; } /** * Server-side protocol handling for GrabKeyboard request. * * Grabs the client's keyboard and returns success status to client. */ int ProcGrabKeyboard(ClientPtr client) { xGrabKeyboardReply rep; BYTE status; REQUEST(xGrabKeyboardReq); int result; DeviceIntPtr keyboard = PickKeyboard(client); GrabMask mask; REQUEST_SIZE_MATCH(xGrabKeyboardReq); UpdateCurrentTime(); mask.core = KeyPressMask | KeyReleaseMask; result = GrabDevice(client, keyboard, stuff->pointerMode, stuff->keyboardMode, stuff->grabWindow, stuff->ownerEvents, stuff->time, &mask, CORE, None, None, &status); if (result != Success) return result; rep = (xGrabKeyboardReply) { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0 }; WriteReplyToClient(client, sizeof(xGrabKeyboardReply), &rep); return Success; } /** * Server-side protocol handling for UngrabKeyboard request. * * Deletes a possible grab on the client's keyboard. */ int ProcUngrabKeyboard(ClientPtr client) { DeviceIntPtr device = PickKeyboard(client); GrabPtr grab; TimeStamp time; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); UpdateCurrentTime(); grab = device->deviceGrab.grab; time = ClientTimeToServerTime(stuff->id); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, device->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client) && grab->grabtype == CORE) (*device->deviceGrab.DeactivateGrab) (device); return Success; } /** * Server-side protocol handling for QueryPointer request. * * Returns the current state and position of the client's ClientPointer to the * client. */ int ProcQueryPointer(ClientPtr client) { xQueryPointerReply rep; WindowPtr pWin, t; DeviceIntPtr mouse = PickPointer(client); DeviceIntPtr keyboard; SpritePtr pSprite; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_DEVICE_ACCESS, client, mouse, DixReadAccess); if (rc != Success && rc != BadAccess) return rc; keyboard = GetMaster(mouse, MASTER_KEYBOARD); pSprite = mouse->spriteInfo->sprite; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep = (xQueryPointerReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .mask = event_get_corestate(mouse, keyboard), .root = (GetCurrentRootWindow(mouse))->drawable.id, .rootX = pSprite->hot.x, .rootY = pSprite->hot.y, .child = None }; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { rep.sameScreen = xTrue; rep.winX = pSprite->hot.x - pWin->drawable.x; rep.winY = pSprite->hot.y - pWin->drawable.y; for (t = pSprite->win; t; t = t->parent) if (t->parent == pWin) { rep.child = t->drawable.id; break; } } else { rep.sameScreen = xFalse; rep.winX = 0; rep.winY = 0; } #ifdef PANORAMIX if (!noPanoramiXExtension) { rep.rootX += screenInfo.screens[0]->x; rep.rootY += screenInfo.screens[0]->y; if (stuff->id == rep.root) { rep.winX += screenInfo.screens[0]->x; rep.winY += screenInfo.screens[0]->y; } } #endif if (rc == BadAccess) { rep.mask = 0; rep.child = None; rep.rootX = 0; rep.rootY = 0; rep.winX = 0; rep.winY = 0; } WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep); return Success; } /** * Initializes the device list and the DIX sprite to sane values. Allocates * trace memory used for quick window traversal. */ void InitEvents(void) { int i; QdEventPtr qe, tmp; inputInfo.numDevices = 0; inputInfo.devices = (DeviceIntPtr) NULL; inputInfo.off_devices = (DeviceIntPtr) NULL; inputInfo.keyboard = (DeviceIntPtr) NULL; inputInfo.pointer = (DeviceIntPtr) NULL; for (i = 0; i < MAXDEVICES; i++) { DeviceIntRec dummy; memcpy(&event_filters[i], default_filter, sizeof(default_filter)); dummy.id = i; NoticeTime(&dummy, currentTime); LastEventTimeToggleResetFlag(i, FALSE); } syncEvents.replayDev = (DeviceIntPtr) NULL; syncEvents.replayWin = NullWindow; if (syncEvents.pending.next) xorg_list_for_each_entry_safe(qe, tmp, &syncEvents.pending, next) free(qe); xorg_list_init(&syncEvents.pending); syncEvents.playingEvents = FALSE; syncEvents.time.months = 0; syncEvents.time.milliseconds = 0; /* hardly matters */ currentTime.months = 0; currentTime.milliseconds = GetTimeInMillis(); for (i = 0; i < DNPMCOUNT; i++) { DontPropagateMasks[i] = 0; DontPropagateRefCnts[i] = 0; } InputEventList = InitEventList(GetMaximumEventsNum()); if (!InputEventList) FatalError("[dix] Failed to allocate input event list.\n"); } void CloseDownEvents(void) { FreeEventList(InputEventList, GetMaximumEventsNum()); InputEventList = NULL; } #define SEND_EVENT_BIT 0x80 /** * Server-side protocol handling for SendEvent request. * * Locates the window to send the event to and forwards the event. */ int ProcSendEvent(ClientPtr client) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ DeviceIntPtr dev = PickPointer(client); DeviceIntPtr keybd = GetMaster(dev, MASTER_KEYBOARD); SpritePtr pSprite = dev->spriteInfo->sprite; REQUEST(xSendEventReq); REQUEST_SIZE_MATCH(xSendEventReq); /* libXext and other extension libraries may set the bit indicating * that this event came from a SendEvent request so remove it * since otherwise the event type may fail the range checks * and cause an invalid BadValue error to be returned. * * This is safe to do since we later add the SendEvent bit (0x80) * back in once we send the event to the client */ stuff->event.u.u.type &= ~(SEND_EVENT_BIT); /* The client's event type must be a core event type or one defined by an extension. */ if (!((stuff->event.u.u.type > X_Reply && stuff->event.u.u.type < LASTEvent) || (stuff->event.u.u.type >= EXTENSION_EVENT_BASE && stuff->event.u.u.type < (unsigned) lastEvent))) { client->errorValue = stuff->event.u.u.type; return BadValue; } /* Generic events can have variable size, but SendEvent request holds exactly 32B of event data. */ if (stuff->event.u.u.type == GenericEvent) { client->errorValue = stuff->event.u.u.type; return BadValue; } if (stuff->event.u.u.type == ClientMessage && stuff->event.u.u.detail != 8 && stuff->event.u.u.detail != 16 && stuff->event.u.u.detail != 32) { client->errorValue = stuff->event.u.u.detail; return BadValue; } if (stuff->eventMask & ~AllEventMasks) { client->errorValue = stuff->eventMask; return BadValue; } if (stuff->destination == PointerWindow) pWin = pSprite->win; else if (stuff->destination == InputFocus) { WindowPtr inputFocus = (keybd) ? keybd->focus->win : NoneWin; if (inputFocus == NoneWin) return Success; /* If the input focus is PointerRootWin, send the event to where the pointer is if possible, then perhaps propagate up to root. */ if (inputFocus == PointerRootWin) inputFocus = GetCurrentRootWindow(dev); if (IsParent(inputFocus, pSprite->win)) { effectiveFocus = inputFocus; pWin = pSprite->win; } else effectiveFocus = pWin = inputFocus; } else dixLookupWindow(&pWin, stuff->destination, client, DixSendAccess); if (!pWin) return BadWindow; if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) { client->errorValue = stuff->propagate; return BadValue; } stuff->event.u.u.type |= SEND_EVENT_BIT; if (stuff->propagate) { for (; pWin; pWin = pWin->parent) { if (XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) return Success; if (DeliverEventsToWindow(dev, pWin, &stuff->event, 1, stuff->eventMask, NullGrab)) return Success; if (pWin == effectiveFocus) return Success; stuff->eventMask &= ~wDontPropagateMask(pWin); if (!stuff->eventMask) break; } } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, &stuff->event, 1)) DeliverEventsToWindow(dev, pWin, &stuff->event, 1, stuff->eventMask, NullGrab); return Success; } /** * Server-side protocol handling for UngrabKey request. * * Deletes a passive grab for the given key. Works on the * client's keyboard. */ int ProcUngrabKey(ClientPtr client) { REQUEST(xUngrabKeyReq); WindowPtr pWin; GrabPtr tempGrab; DeviceIntPtr keybd = PickKeyboard(client); int rc; REQUEST_SIZE_MATCH(xUngrabKeyReq); rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixGetAttrAccess); if (rc != Success) return rc; if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) { client->errorValue = stuff->key; return BadValue; } if ((stuff->modifiers != AnyModifier) && (stuff->modifiers & ~AllModifiersMask)) { client->errorValue = stuff->modifiers; return BadValue; } tempGrab = AllocGrab(NULL); if (!tempGrab) return BadAlloc; tempGrab->resource = client->clientAsMask; tempGrab->device = keybd; tempGrab->window = pWin; tempGrab->modifiersDetail.exact = stuff->modifiers; tempGrab->modifiersDetail.pMask = NULL; tempGrab->modifierDevice = keybd; tempGrab->type = KeyPress; tempGrab->grabtype = CORE; tempGrab->detail.exact = stuff->key; tempGrab->detail.pMask = NULL; tempGrab->next = NULL; if (!DeletePassiveGrabFromList(tempGrab)) rc = BadAlloc; FreeGrab(tempGrab); return rc; } /** * Server-side protocol handling for GrabKey request. * * Creates a grab for the client's keyboard and adds it to the list of passive * grabs. */ int ProcGrabKey(ClientPtr client) { WindowPtr pWin; REQUEST(xGrabKeyReq); GrabPtr grab; DeviceIntPtr keybd = PickKeyboard(client); int rc; GrabParameters param; GrabMask mask; REQUEST_SIZE_MATCH(xGrabKeyReq); param = (GrabParameters) { .grabtype = CORE, .ownerEvents = stuff->ownerEvents, .this_device_mode = stuff->keyboardMode, .other_devices_mode = stuff->pointerMode, .modifiers = stuff->modifiers }; rc = CheckGrabValues(client, ¶m); if (rc != Success) return rc; if (((stuff->key > keybd->key->xkbInfo->desc->max_key_code) || (stuff->key < keybd->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) { client->errorValue = stuff->key; return BadValue; } rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; mask.core = (KeyPressMask | KeyReleaseMask); grab = CreateGrab(client->index, keybd, keybd, pWin, CORE, &mask, ¶m, KeyPress, stuff->key, NullWindow, NullCursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } /** * Server-side protocol handling for GrabButton request. * * Creates a grab for the client's ClientPointer and adds it as a passive grab * to the list. */ int ProcGrabButton(ClientPtr client) { WindowPtr pWin, confineTo; REQUEST(xGrabButtonReq); CursorPtr cursor; GrabPtr grab; DeviceIntPtr ptr, modifierDevice; Mask access_mode = DixGrabAccess; GrabMask mask; GrabParameters param; int rc; REQUEST_SIZE_MATCH(xGrabButtonReq); UpdateCurrentTime(); if ((stuff->pointerMode != GrabModeSync) && (stuff->pointerMode != GrabModeAsync)) { client->errorValue = stuff->pointerMode; return BadValue; } if ((stuff->keyboardMode != GrabModeSync) && (stuff->keyboardMode != GrabModeAsync)) { client->errorValue = stuff->keyboardMode; return BadValue; } if ((stuff->modifiers != AnyModifier) && (stuff->modifiers & ~AllModifiersMask)) { client->errorValue = stuff->modifiers; return BadValue; } if ((stuff->ownerEvents != xFalse) && (stuff->ownerEvents != xTrue)) { client->errorValue = stuff->ownerEvents; return BadValue; } if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; } rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->confineTo == None) confineTo = NullWindow; else { rc = dixLookupWindow(&confineTo, stuff->confineTo, client, DixSetAttrAccess); if (rc != Success) return rc; } if (stuff->cursor == None) cursor = NullCursor; else { rc = dixLookupResourceByType((void **) &cursor, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) { client->errorValue = stuff->cursor; return rc; } access_mode |= DixForceAccess; } ptr = PickPointer(client); modifierDevice = GetMaster(ptr, MASTER_KEYBOARD); if (stuff->pointerMode == GrabModeSync || stuff->keyboardMode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, ptr, access_mode); if (rc != Success) return rc; param = (GrabParameters) { .grabtype = CORE, .ownerEvents = stuff->ownerEvents, .this_device_mode = stuff->keyboardMode, .other_devices_mode = stuff->pointerMode, .modifiers = stuff->modifiers }; mask.core = stuff->eventMask; grab = CreateGrab(client->index, ptr, modifierDevice, pWin, CORE, &mask, ¶m, ButtonPress, stuff->button, confineTo, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } /** * Server-side protocol handling for UngrabButton request. * * Deletes a passive grab on the client's ClientPointer from the list. */ int ProcUngrabButton(ClientPtr client) { REQUEST(xUngrabButtonReq); WindowPtr pWin; GrabPtr tempGrab; int rc; DeviceIntPtr ptr; REQUEST_SIZE_MATCH(xUngrabButtonReq); UpdateCurrentTime(); if ((stuff->modifiers != AnyModifier) && (stuff->modifiers & ~AllModifiersMask)) { client->errorValue = stuff->modifiers; return BadValue; } rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); if (rc != Success) return rc; ptr = PickPointer(client); tempGrab = AllocGrab(NULL); if (!tempGrab) return BadAlloc; tempGrab->resource = client->clientAsMask; tempGrab->device = ptr; tempGrab->window = pWin; tempGrab->modifiersDetail.exact = stuff->modifiers; tempGrab->modifiersDetail.pMask = NULL; tempGrab->modifierDevice = GetMaster(ptr, MASTER_KEYBOARD); tempGrab->type = ButtonPress; tempGrab->detail.exact = stuff->button; tempGrab->grabtype = CORE; tempGrab->detail.pMask = NULL; tempGrab->next = NULL; if (!DeletePassiveGrabFromList(tempGrab)) rc = BadAlloc; FreeGrab(tempGrab); return rc; } /** * Deactivate any grab that may be on the window, remove the focus. * Delete any XInput extension events from the window too. Does not change the * window mask. Use just before the window is deleted. * * If freeResources is set, passive grabs on the window are deleted. * * @param pWin The window to delete events from. * @param freeResources True if resources associated with the window should be * deleted. */ void DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources) { WindowPtr parent; DeviceIntPtr mouse = inputInfo.pointer; DeviceIntPtr keybd = inputInfo.keyboard; FocusClassPtr focus; OtherClientsPtr oc; GrabPtr passive; GrabPtr grab; /* Deactivate any grabs performed on this window, before making any input focus changes. */ grab = mouse->deviceGrab.grab; if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) (*mouse->deviceGrab.DeactivateGrab) (mouse); /* Deactivating a keyboard grab should cause focus events. */ grab = keybd->deviceGrab.grab; if (grab && (grab->window == pWin)) (*keybd->deviceGrab.DeactivateGrab) (keybd); /* And now the real devices */ for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { grab = mouse->deviceGrab.grab; if (grab && ((grab->window == pWin) || (grab->confineTo == pWin))) (*mouse->deviceGrab.DeactivateGrab) (mouse); } for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { if (IsKeyboardDevice(keybd)) { focus = keybd->focus; /* If the focus window is a root window (ie. has no parent) then don't delete the focus from it. */ if ((pWin == focus->win) && (pWin->parent != NullWindow)) { int focusEventMode = NotifyNormal; /* If a grab is in progress, then alter the mode of focus events. */ if (keybd->deviceGrab.grab) focusEventMode = NotifyWhileGrabbed; switch (focus->revert) { case RevertToNone: DoFocusEvents(keybd, pWin, NoneWin, focusEventMode); focus->win = NoneWin; focus->traceGood = 0; break; case RevertToParent: parent = pWin; do { parent = parent->parent; focus->traceGood--; } while (!parent->realized /* This would be a good protocol change -- windows being reparented during SaveSet processing would cause the focus to revert to the nearest enclosing window which will survive the death of the exiting client, instead of ending up reverting to a dying window and thence to None */ #ifdef NOTDEF || wClient(parent)->clientGone #endif ); if (!ActivateFocusInGrab(keybd, pWin, parent)) DoFocusEvents(keybd, pWin, parent, focusEventMode); focus->win = parent; focus->revert = RevertToNone; break; case RevertToPointerRoot: if (!ActivateFocusInGrab(keybd, pWin, PointerRootWin)) DoFocusEvents(keybd, pWin, PointerRootWin, focusEventMode); focus->win = PointerRootWin; focus->traceGood = 0; break; } } } if (IsPointerDevice(keybd)) { if (keybd->valuator->motionHintWindow == pWin) keybd->valuator->motionHintWindow = NullWindow; } } if (freeResources) { if (pWin->dontPropagate) DontPropagateRefCnts[pWin->dontPropagate]--; while ((oc = wOtherClients(pWin))) FreeResource(oc->resource, RT_NONE); while ((passive = wPassiveGrabs(pWin))) FreeResource(passive->resource, RT_NONE); } DeleteWindowFromAnyExtEvents(pWin, freeResources); } /** * Call this whenever some window at or below pWin has changed geometry. If * there is a grab on the window, the cursor will be re-confined into the * window. */ void CheckCursorConfinement(WindowPtr pWin) { GrabPtr grab; WindowPtr confineTo; DeviceIntPtr pDev; #ifdef PANORAMIX if (!noPanoramiXExtension && pWin->drawable.pScreen->myNum) return; #endif for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { grab = pDev->deviceGrab.grab; if (grab && (confineTo = grab->confineTo)) { if (!BorderSizeNotEmpty(pDev, confineTo)) (*pDev->deviceGrab.DeactivateGrab) (pDev); else if ((pWin == confineTo) || IsParent(pWin, confineTo)) ConfineCursorToWindow(pDev, confineTo, TRUE, TRUE); } } } } Mask EventMaskForClient(WindowPtr pWin, ClientPtr client) { OtherClientsPtr other; if (wClient(pWin) == client) return pWin->eventMask; for (other = wOtherClients(pWin); other; other = other->next) { if (SameClient(other, client)) return other->mask; } return 0; } /** * Server-side protocol handling for RecolorCursor request. */ int ProcRecolorCursor(ClientPtr client) { CursorPtr pCursor; int rc, nscr; ScreenPtr pscr; Bool displayed; SpritePtr pSprite = PickPointer(client)->spriteInfo->sprite; REQUEST(xRecolorCursorReq); REQUEST_SIZE_MATCH(xRecolorCursorReq); rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor, RT_CURSOR, client, DixWriteAccess); if (rc != Success) { client->errorValue = stuff->cursor; return rc; } pCursor->foreRed = stuff->foreRed; pCursor->foreGreen = stuff->foreGreen; pCursor->foreBlue = stuff->foreBlue; pCursor->backRed = stuff->backRed; pCursor->backGreen = stuff->backGreen; pCursor->backBlue = stuff->backBlue; for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; #ifdef PANORAMIX if (!noPanoramiXExtension) displayed = (pscr == pSprite->screen); else #endif displayed = (pscr == pSprite->hotPhys.pScreen); (*pscr->RecolorCursor) (PickPointer(client), pscr, pCursor, (pCursor == pSprite->current) && displayed); } return Success; } /** * Write the given events to a client, swapping the byte order if necessary. * To swap the byte ordering, a callback is called that has to be set up for * the given event type. * * In the case of DeviceMotionNotify trailed by DeviceValuators, the events * can be more than one. Usually it's just one event. * * Do not modify the event structure passed in. See comment below. * * @param pClient Client to send events to. * @param count Number of events. * @param events The event list. */ void WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) { #ifdef PANORAMIX xEvent eventCopy; #endif xEvent *eventTo, *eventFrom; int i, eventlength = sizeof(xEvent); if (!pClient || pClient == serverClient || pClient->clientGone) return; for (i = 0; i < count; i++) if ((events[i].u.u.type & 0x7f) != KeymapNotify) events[i].u.u.sequenceNumber = pClient->sequence; /* Let XKB rewrite the state, as it depends on client preferences. */ XkbFilterEvents(pClient, count, events); #ifdef PANORAMIX if (!noPanoramiXExtension && (screenInfo.screens[0]->x || screenInfo.screens[0]->y)) { switch (events->u.u.type) { case MotionNotify: case ButtonPress: case ButtonRelease: case KeyPress: case KeyRelease: case EnterNotify: case LeaveNotify: /* When multiple clients want the same event DeliverEventsToWindow passes the same event structure multiple times so we can't modify the one passed to us */ count = 1; /* should always be 1 */ memcpy(&eventCopy, events, sizeof(xEvent)); eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x; eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y; if (eventCopy.u.keyButtonPointer.event == eventCopy.u.keyButtonPointer.root) { eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x; eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y; } events = &eventCopy; break; default: break; } } #endif if (EventCallback) { EventInfoRec eventinfo; eventinfo.client = pClient; eventinfo.events = events; eventinfo.count = count; CallCallbacks(&EventCallback, (void *) &eventinfo); } #ifdef XSERVER_DTRACE if (XSERVER_SEND_EVENT_ENABLED()) { for (i = 0; i < count; i++) { XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]); } } #endif /* Just a safety check to make sure we only have one GenericEvent, it just * makes things easier for me right now. (whot) */ for (i = 1; i < count; i++) { if (events[i].u.u.type == GenericEvent) { ErrorF("[dix] TryClientEvents: Only one GenericEvent at a time.\n"); return; } } if (events->u.u.type == GenericEvent) { eventlength += ((xGenericEvent *) events)->length * 4; } if (pClient->swapped) { if (eventlength > swapEventLen) { swapEventLen = eventlength; swapEvent = realloc(swapEvent, swapEventLen); if (!swapEvent) { FatalError("WriteEventsToClient: Out of memory.\n"); return; } } for (i = 0; i < count; i++) { eventFrom = &events[i]; eventTo = swapEvent; /* Remember to strip off the leading bit of type in case this event was sent with "SendEvent." */ (*EventSwapVector[eventFrom->u.u.type & 0177]) (eventFrom, eventTo); WriteToClient(pClient, eventlength, eventTo); } } else { /* only one GenericEvent, remember? that means either count is 1 and * eventlength is arbitrary or eventlength is 32 and count doesn't * matter. And we're all set. Woohoo. */ WriteToClient(pClient, count * eventlength, events); } } /* * Set the client pointer for the given client. * * A client can have exactly one ClientPointer. Each time a * request/reply/event is processed and the choice of devices is ambiguous * (e.g. QueryPointer request), the server will pick the ClientPointer (see * PickPointer()). * If a keyboard is needed, the first keyboard paired with the CP is used. */ int SetClientPointer(ClientPtr client, DeviceIntPtr device) { int rc = XaceHook(XACE_DEVICE_ACCESS, client, device, DixUseAccess); if (rc != Success) return rc; if (!IsMaster(device)) { ErrorF("[dix] Need master device for ClientPointer. This is a bug.\n"); return BadDevice; } else if (!device->spriteInfo->spriteOwner) { ErrorF("[dix] Device %d does not have a sprite. " "Cannot be ClientPointer\n", device->id); return BadDevice; } client->clientPtr = device; return Success; } /* PickPointer will pick an appropriate pointer for the given client. * * An "appropriate device" is (in order of priority): * 1) A device the given client has a core grab on. * 2) A device set as ClientPointer for the given client. * 3) The first master device. */ DeviceIntPtr PickPointer(ClientPtr client) { DeviceIntPtr it = inputInfo.devices; /* First, check if the client currently has a grab on a device. Even * keyboards count. */ for (it = inputInfo.devices; it; it = it->next) { GrabPtr grab = it->deviceGrab.grab; if (grab && grab->grabtype == CORE && SameClient(grab, client)) { it = GetMaster(it, MASTER_POINTER); return it; /* Always return a core grabbed device */ } } if (!client->clientPtr) { it = inputInfo.devices; while (it) { if (IsMaster(it) && it->spriteInfo->spriteOwner) { client->clientPtr = it; break; } it = it->next; } } return client->clientPtr; } /* PickKeyboard will pick an appropriate keyboard for the given client by * searching the list of devices for the keyboard device that is paired with * the client's pointer. */ DeviceIntPtr PickKeyboard(ClientPtr client) { DeviceIntPtr ptr = PickPointer(client); DeviceIntPtr kbd = GetMaster(ptr, MASTER_KEYBOARD); if (!kbd) { ErrorF("[dix] ClientPointer not paired with a keyboard. This " "is a bug.\n"); } return kbd; } /* A client that has one or more core grabs does not get core events from * devices it does not have a grab on. Legacy applications behave bad * otherwise because they are not used to it and the events interfere. * Only applies for core events. * * Return true if a core event from the device would interfere and should not * be delivered. */ Bool IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent *event) { DeviceIntPtr it = inputInfo.devices; switch (event->u.u.type) { case KeyPress: case KeyRelease: case ButtonPress: case ButtonRelease: case MotionNotify: case EnterNotify: case LeaveNotify: break; default: return FALSE; } if (dev->deviceGrab.grab && SameClient(dev->deviceGrab.grab, client)) return FALSE; while (it) { if (it != dev) { if (it->deviceGrab.grab && SameClient(it->deviceGrab.grab, client) && !it->deviceGrab.fromPassiveGrab) { if ((IsPointerDevice(it) && IsPointerDevice(dev)) || (IsKeyboardDevice(it) && IsKeyboardDevice(dev))) return TRUE; } } it = it->next; } return FALSE; } /* PointerBarrier events are only delivered to the client that created that * barrier */ static Bool IsWrongPointerBarrierClient(ClientPtr client, DeviceIntPtr dev, xEvent *event) { xXIBarrierEvent *ev = (xXIBarrierEvent*)event; if (ev->type != GenericEvent || ev->extension != IReqCode) return FALSE; if (ev->evtype != XI_BarrierHit && ev->evtype != XI_BarrierLeave) return FALSE; return client->index != CLIENT_ID(ev->barrier); } xorg-server-21.1.16/dix/eventconvert.c0000644000175000017500000010026414757411105013310 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ /** * @file eventconvert.c * This file contains event conversion routines from InternalEvent to the * matching protocol events. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include "dix.h" #include "inputstr.h" #include "misc.h" #include "eventstr.h" #include "exevents.h" #include "exglobals.h" #include "eventconvert.h" #include "inpututils.h" #include "xiquerydevice.h" #include "xkbsrv.h" #include "inpututils.h" static int countValuators(DeviceEvent *ev, int *first); static int getValuatorEvents(DeviceEvent *ev, deviceValuator * xv); static int eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count); static int eventToDeviceChanged(DeviceChangedEvent *ev, xEvent **dcce); static int eventToDeviceEvent(DeviceEvent *ev, xEvent **xi); static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi); static int eventToBarrierEvent(BarrierEvent *ev, xEvent **xi); static int eventToTouchOwnershipEvent(TouchOwnershipEvent *ev, xEvent **xi); static int eventToGestureSwipeEvent(GestureEvent *ev, xEvent **xi); static int eventToGesturePinchEvent(GestureEvent *ev, xEvent **xi); /* Do not use, read comments below */ BOOL EventIsKeyRepeat(xEvent *event); /** * Hack to allow detectable autorepeat for core and XI1 events. * The sequence number is unused until we send to the client and can be * misused to store data. More or less, anyway. * * Do not use this. It may change any time without warning, eat your babies * and piss on your cat. */ static void EventSetKeyRepeatFlag(xEvent *event, BOOL on) { event->u.u.sequenceNumber = on; } /** * Check if the event was marked as a repeat event before. * NOTE: This is a nasty hack and should NOT be used by anyone else but * TryClientEvents. */ BOOL EventIsKeyRepeat(xEvent *event) { return ! !event->u.u.sequenceNumber; } /** * Convert the given event to the respective core event. * * Return values: * Success ... core contains the matching core event. * BadValue .. One or more values in the internal event are invalid. * BadMatch .. The event has no core equivalent. * * @param[in] event The event to convert into a core event. * @param[in] core The memory location to store the core event at. * @return Success or the matching error code. */ int EventToCore(InternalEvent *event, xEvent **core_out, int *count_out) { xEvent *core = NULL; int count = 0; int ret = BadImplementation; switch (event->any.type) { case ET_Motion: { DeviceEvent *e = &event->device_event; /* Don't create core motion event if neither x nor y are * present */ if (!BitIsOn(e->valuators.mask, 0) && !BitIsOn(e->valuators.mask, 1)) { ret = BadMatch; goto out; } } /* fallthrough */ case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: { DeviceEvent *e = &event->device_event; if (e->detail.key > 0xFF) { ret = BadMatch; goto out; } core = calloc(1, sizeof(*core)); if (!core) return BadAlloc; count = 1; core->u.u.type = e->type - ET_KeyPress + KeyPress; core->u.u.detail = e->detail.key & 0xFF; core->u.keyButtonPointer.time = e->time; core->u.keyButtonPointer.rootX = e->root_x; core->u.keyButtonPointer.rootY = e->root_y; core->u.keyButtonPointer.state = e->corestate; core->u.keyButtonPointer.root = e->root; EventSetKeyRepeatFlag(core, (e->type == ET_KeyPress && e->key_repeat)); ret = Success; } break; case ET_ProximityIn: case ET_ProximityOut: case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: case ET_RawTouchBegin: case ET_RawTouchUpdate: case ET_RawTouchEnd: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: case ET_TouchOwnership: case ET_BarrierHit: case ET_BarrierLeave: case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: ret = BadMatch; break; default: /* XXX: */ ErrorF("[dix] EventToCore: Not implemented yet \n"); ret = BadImplementation; } out: *core_out = core; *count_out = count; return ret; } /** * Convert the given event to the respective XI 1.x event and store it in * xi. xi is allocated on demand and must be freed by the caller. * count returns the number of events in xi. If count is 1, and the type of * xi is GenericEvent, then xi may be larger than 32 bytes. * * Return values: * Success ... core contains the matching core event. * BadValue .. One or more values in the internal event are invalid. * BadMatch .. The event has no XI equivalent. * * @param[in] ev The event to convert into an XI 1 event. * @param[out] xi Future memory location for the XI event. * @param[out] count Number of elements in xi. * * @return Success or the error code. */ int EventToXI(InternalEvent *ev, xEvent **xi, int *count) { switch (ev->any.type) { case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: return eventToKeyButtonPointer(&ev->device_event, xi, count); case ET_DeviceChanged: case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: case ET_RawTouchBegin: case ET_RawTouchUpdate: case ET_RawTouchEnd: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: case ET_TouchOwnership: case ET_BarrierHit: case ET_BarrierLeave: case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: *count = 0; *xi = NULL; return BadMatch; default: break; } ErrorF("[dix] EventToXI: Not implemented for %d \n", ev->any.type); return BadImplementation; } /** * Convert the given event to the respective XI 2.x event and store it in xi. * xi is allocated on demand and must be freed by the caller. * * Return values: * Success ... core contains the matching core event. * BadValue .. One or more values in the internal event are invalid. * BadMatch .. The event has no XI2 equivalent. * * @param[in] ev The event to convert into an XI2 event * @param[out] xi Future memory location for the XI2 event. * * @return Success or the error code. */ int EventToXI2(InternalEvent *ev, xEvent **xi) { switch (ev->any.type) { /* Enter/FocusIn are for grabs. We don't need an actual event, since * the real events delivered are triggered elsewhere */ case ET_Enter: case ET_FocusIn: *xi = NULL; return Success; case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: return eventToDeviceEvent(&ev->device_event, xi); case ET_TouchOwnership: return eventToTouchOwnershipEvent(&ev->touch_ownership_event, xi); case ET_ProximityIn: case ET_ProximityOut: *xi = NULL; return BadMatch; case ET_DeviceChanged: return eventToDeviceChanged(&ev->changed_event, xi); case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: case ET_RawTouchBegin: case ET_RawTouchUpdate: case ET_RawTouchEnd: return eventToRawEvent(&ev->raw_event, xi); case ET_BarrierHit: case ET_BarrierLeave: return eventToBarrierEvent(&ev->barrier_event, xi); case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: return eventToGesturePinchEvent(&ev->gesture_event, xi); case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: return eventToGestureSwipeEvent(&ev->gesture_event, xi); default: break; } ErrorF("[dix] EventToXI2: Not implemented for %d \n", ev->any.type); return BadImplementation; } static int eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count) { int num_events; int first; /* dummy */ deviceKeyButtonPointer *kbp; /* Sorry, XI 1.x protocol restrictions. */ if (ev->detail.button > 0xFF || ev->deviceid >= 0x80) { *count = 0; return Success; } num_events = (countValuators(ev, &first) + 5) / 6; /* valuator ev */ if (num_events <= 0) { switch (ev->type) { case ET_KeyPress: case ET_KeyRelease: case ET_ButtonPress: case ET_ButtonRelease: /* no axes is ok */ break; case ET_Motion: case ET_ProximityIn: case ET_ProximityOut: *count = 0; return BadMatch; default: *count = 0; return BadImplementation; } } num_events++; /* the actual event event */ *xi = calloc(num_events, sizeof(xEvent)); if (!(*xi)) { return BadAlloc; } kbp = (deviceKeyButtonPointer *) (*xi); kbp->detail = ev->detail.button; kbp->time = ev->time; kbp->root = ev->root; kbp->root_x = ev->root_x; kbp->root_y = ev->root_y; kbp->deviceid = ev->deviceid; kbp->state = ev->corestate; EventSetKeyRepeatFlag((xEvent *) kbp, (ev->type == ET_KeyPress && ev->key_repeat)); if (num_events > 1) kbp->deviceid |= MORE_EVENTS; switch (ev->type) { case ET_Motion: kbp->type = DeviceMotionNotify; break; case ET_ButtonPress: kbp->type = DeviceButtonPress; break; case ET_ButtonRelease: kbp->type = DeviceButtonRelease; break; case ET_KeyPress: kbp->type = DeviceKeyPress; break; case ET_KeyRelease: kbp->type = DeviceKeyRelease; break; case ET_ProximityIn: kbp->type = ProximityIn; break; case ET_ProximityOut: kbp->type = ProximityOut; break; default: break; } if (num_events > 1) { getValuatorEvents(ev, (deviceValuator *) (kbp + 1)); } *count = num_events; return Success; } /** * Set first to the first valuator in the event ev and return the number of * valuators from first to the last set valuator. */ static int countValuators(DeviceEvent *ev, int *first) { int first_valuator = -1, last_valuator = -1, num_valuators = 0; int i; for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++) { if (BitIsOn(ev->valuators.mask, i)) { if (first_valuator == -1) first_valuator = i; last_valuator = i; } } if (first_valuator != -1) { num_valuators = last_valuator - first_valuator + 1; *first = first_valuator; } return num_valuators; } static int getValuatorEvents(DeviceEvent *ev, deviceValuator * xv) { int i; int state = 0; int first_valuator, num_valuators; num_valuators = countValuators(ev, &first_valuator); if (num_valuators > 0) { DeviceIntPtr dev = NULL; dixLookupDevice(&dev, ev->deviceid, serverClient, DixUseAccess); /* State needs to be assembled BEFORE the device is updated. */ state = (dev && dev->key) ? XkbStateFieldFromRec(&dev->key->xkbInfo-> state) : 0; state |= (dev && dev->button) ? (dev->button->state) : 0; } for (i = 0; i < num_valuators; i += 6, xv++) { INT32 *valuators = &xv->valuator0; // Treat all 6 vals as an array int j; xv->type = DeviceValuator; xv->first_valuator = first_valuator + i; xv->num_valuators = ((num_valuators - i) > 6) ? 6 : (num_valuators - i); xv->deviceid = ev->deviceid; xv->device_state = state; /* Unset valuators in masked valuator events have the proper data values * in the case of an absolute axis in between two set valuators. */ for (j = 0; j < xv->num_valuators; j++) valuators[j] = ev->valuators.data[xv->first_valuator + j]; if (i + 6 < num_valuators) xv->deviceid |= MORE_EVENTS; } return (num_valuators + 5) / 6; } static int appendKeyInfo(DeviceChangedEvent *dce, xXIKeyInfo * info) { uint32_t *kc; int i; info->type = XIKeyClass; info->num_keycodes = dce->keys.max_keycode - dce->keys.min_keycode + 1; info->length = sizeof(xXIKeyInfo) / 4 + info->num_keycodes; info->sourceid = dce->sourceid; kc = (uint32_t *) &info[1]; for (i = 0; i < info->num_keycodes; i++) *kc++ = i + dce->keys.min_keycode; return info->length * 4; } static int appendButtonInfo(DeviceChangedEvent *dce, xXIButtonInfo * info) { unsigned char *bits; int mask_len; mask_len = bytes_to_int32(bits_to_bytes(dce->buttons.num_buttons)); info->type = XIButtonClass; info->num_buttons = dce->buttons.num_buttons; info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + info->num_buttons + mask_len; info->sourceid = dce->sourceid; bits = (unsigned char *) &info[1]; memset(bits, 0, mask_len * 4); /* FIXME: is_down? */ bits += mask_len * 4; memcpy(bits, dce->buttons.names, dce->buttons.num_buttons * sizeof(Atom)); return info->length * 4; } static int appendValuatorInfo(DeviceChangedEvent *dce, xXIValuatorInfo * info, int axisnumber) { info->type = XIValuatorClass; info->length = sizeof(xXIValuatorInfo) / 4; info->label = dce->valuators[axisnumber].name; info->min.integral = dce->valuators[axisnumber].min; info->min.frac = 0; info->max.integral = dce->valuators[axisnumber].max; info->max.frac = 0; info->value = double_to_fp3232(dce->valuators[axisnumber].value); info->resolution = dce->valuators[axisnumber].resolution; info->number = axisnumber; info->mode = dce->valuators[axisnumber].mode; info->sourceid = dce->sourceid; return info->length * 4; } static int appendScrollInfo(DeviceChangedEvent *dce, xXIScrollInfo * info, int axisnumber) { if (dce->valuators[axisnumber].scroll.type == SCROLL_TYPE_NONE) return 0; info->type = XIScrollClass; info->length = sizeof(xXIScrollInfo) / 4; info->number = axisnumber; switch (dce->valuators[axisnumber].scroll.type) { case SCROLL_TYPE_VERTICAL: info->scroll_type = XIScrollTypeVertical; break; case SCROLL_TYPE_HORIZONTAL: info->scroll_type = XIScrollTypeHorizontal; break; default: ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", dce->valuators[axisnumber].scroll.type); break; } info->increment = double_to_fp3232(dce->valuators[axisnumber].scroll.increment); info->sourceid = dce->sourceid; info->flags = 0; if (dce->valuators[axisnumber].scroll.flags & SCROLL_FLAG_DONT_EMULATE) info->flags |= XIScrollFlagNoEmulation; if (dce->valuators[axisnumber].scroll.flags & SCROLL_FLAG_PREFERRED) info->flags |= XIScrollFlagPreferred; return info->length * 4; } static int eventToDeviceChanged(DeviceChangedEvent *dce, xEvent **xi) { xXIDeviceChangedEvent *dcce; int len = sizeof(xXIDeviceChangedEvent); int nkeys; char *ptr; if (dce->buttons.num_buttons) { len += sizeof(xXIButtonInfo); len += dce->buttons.num_buttons * sizeof(Atom); /* button names */ len += pad_to_int32(bits_to_bytes(dce->buttons.num_buttons)); } if (dce->num_valuators) { int i; len += sizeof(xXIValuatorInfo) * dce->num_valuators; for (i = 0; i < dce->num_valuators; i++) if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) len += sizeof(xXIScrollInfo); } nkeys = (dce->keys.max_keycode > 0) ? dce->keys.max_keycode - dce->keys.min_keycode + 1 : 0; if (nkeys > 0) { len += sizeof(xXIKeyInfo); len += sizeof(CARD32) * nkeys; /* keycodes */ } dcce = calloc(1, len); if (!dcce) { ErrorF("[Xi] BadAlloc in SendDeviceChangedEvent.\n"); return BadAlloc; } dcce->type = GenericEvent; dcce->extension = IReqCode; dcce->evtype = XI_DeviceChanged; dcce->time = dce->time; dcce->deviceid = dce->deviceid; dcce->sourceid = dce->sourceid; dcce->reason = (dce->flags & DEVCHANGE_DEVICE_CHANGE) ? XIDeviceChange : XISlaveSwitch; dcce->num_classes = 0; dcce->length = bytes_to_int32(len - sizeof(xEvent)); ptr = (char *) &dcce[1]; if (dce->buttons.num_buttons) { dcce->num_classes++; ptr += appendButtonInfo(dce, (xXIButtonInfo *) ptr); } if (nkeys) { dcce->num_classes++; ptr += appendKeyInfo(dce, (xXIKeyInfo *) ptr); } if (dce->num_valuators) { int i; dcce->num_classes += dce->num_valuators; for (i = 0; i < dce->num_valuators; i++) ptr += appendValuatorInfo(dce, (xXIValuatorInfo *) ptr, i); for (i = 0; i < dce->num_valuators; i++) { if (dce->valuators[i].scroll.type != SCROLL_TYPE_NONE) { dcce->num_classes++; ptr += appendScrollInfo(dce, (xXIScrollInfo *) ptr, i); } } } *xi = (xEvent *) dcce; return Success; } static int count_bits(unsigned char *ptr, int len) { int bits = 0; unsigned int i; unsigned char x; for (i = 0; i < len; i++) { x = ptr[i]; while (x > 0) { bits += (x & 0x1); x >>= 1; } } return bits; } static int eventToDeviceEvent(DeviceEvent *ev, xEvent **xi) { int len = sizeof(xXIDeviceEvent); xXIDeviceEvent *xde; int i, btlen, vallen; char *ptr; FP3232 *axisval; /* FIXME: this should just send the buttons we have, not MAX_BUTTONs. Same * with MAX_VALUATORS below */ /* btlen is in 4 byte units */ btlen = bytes_to_int32(bits_to_bytes(MAX_BUTTONS)); len += btlen * 4; /* buttonmask len */ vallen = count_bits(ev->valuators.mask, ARRAY_SIZE(ev->valuators.mask)); len += vallen * 2 * sizeof(uint32_t); /* axisvalues */ vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); len += vallen * 4; /* valuators mask */ *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; xde = (xXIDeviceEvent *) * xi; xde->type = GenericEvent; xde->extension = IReqCode; xde->evtype = GetXI2Type(ev->type); xde->time = ev->time; xde->length = bytes_to_int32(len - sizeof(xEvent)); if (IsTouchEvent((InternalEvent *) ev)) xde->detail = ev->touchid; else xde->detail = ev->detail.button; xde->root = ev->root; xde->buttons_len = btlen; xde->valuators_len = vallen; xde->deviceid = ev->deviceid; xde->sourceid = ev->sourceid; xde->root_x = double_to_fp1616(ev->root_x + ev->root_x_frac); xde->root_y = double_to_fp1616(ev->root_y + ev->root_y_frac); if (IsTouchEvent((InternalEvent *)ev)) { if (ev->type == ET_TouchUpdate) xde->flags |= (ev->flags & TOUCH_PENDING_END) ? XITouchPendingEnd : 0; if (ev->flags & TOUCH_POINTER_EMULATED) xde->flags |= XITouchEmulatingPointer; } else { xde->flags = ev->flags; if (ev->key_repeat) xde->flags |= XIKeyRepeat; } xde->mods.base_mods = ev->mods.base; xde->mods.latched_mods = ev->mods.latched; xde->mods.locked_mods = ev->mods.locked; xde->mods.effective_mods = ev->mods.effective; xde->group.base_group = ev->group.base; xde->group.latched_group = ev->group.latched; xde->group.locked_group = ev->group.locked; xde->group.effective_group = ev->group.effective; ptr = (char *) &xde[1]; for (i = 0; i < sizeof(ev->buttons) * 8; i++) { if (BitIsOn(ev->buttons, i)) SetBit(ptr, i); } ptr += xde->buttons_len * 4; axisval = (FP3232 *) (ptr + xde->valuators_len * 4); for (i = 0; i < MAX_VALUATORS; i++) { if (BitIsOn(ev->valuators.mask, i)) { SetBit(ptr, i); *axisval = double_to_fp3232(ev->valuators.data[i]); axisval++; } } return Success; } static int eventToTouchOwnershipEvent(TouchOwnershipEvent *ev, xEvent **xi) { int len = sizeof(xXITouchOwnershipEvent); xXITouchOwnershipEvent *xtoe; *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; xtoe = (xXITouchOwnershipEvent *) * xi; xtoe->type = GenericEvent; xtoe->extension = IReqCode; xtoe->length = bytes_to_int32(len - sizeof(xEvent)); xtoe->evtype = GetXI2Type(ev->type); xtoe->deviceid = ev->deviceid; xtoe->time = ev->time; xtoe->sourceid = ev->sourceid; xtoe->touchid = ev->touchid; xtoe->flags = 0; /* we don't have wire flags for ownership yet */ return Success; } static int eventToRawEvent(RawDeviceEvent *ev, xEvent **xi) { xXIRawEvent *raw; int vallen, nvals; int i, len = sizeof(xXIRawEvent); char *ptr; FP3232 *axisval, *axisval_raw; nvals = count_bits(ev->valuators.mask, sizeof(ev->valuators.mask)); len += nvals * sizeof(FP3232) * 2; /* 8 byte per valuator, once raw, once processed */ vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); len += vallen * 4; /* valuators mask */ *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; raw = (xXIRawEvent *) * xi; raw->type = GenericEvent; raw->extension = IReqCode; raw->evtype = GetXI2Type(ev->type); raw->time = ev->time; raw->length = bytes_to_int32(len - sizeof(xEvent)); raw->detail = ev->detail.button; raw->deviceid = ev->deviceid; raw->sourceid = ev->sourceid; raw->valuators_len = vallen; raw->flags = ev->flags; ptr = (char *) &raw[1]; axisval = (FP3232 *) (ptr + raw->valuators_len * 4); axisval_raw = axisval + nvals; for (i = 0; i < MAX_VALUATORS; i++) { if (BitIsOn(ev->valuators.mask, i)) { SetBit(ptr, i); *axisval = double_to_fp3232(ev->valuators.data[i]); *axisval_raw = double_to_fp3232(ev->valuators.data_raw[i]); axisval++; axisval_raw++; } } return Success; } static int eventToBarrierEvent(BarrierEvent *ev, xEvent **xi) { xXIBarrierEvent *barrier; int len = sizeof(xXIBarrierEvent); *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; barrier = (xXIBarrierEvent*) *xi; barrier->type = GenericEvent; barrier->extension = IReqCode; barrier->evtype = GetXI2Type(ev->type); barrier->length = bytes_to_int32(len - sizeof(xEvent)); barrier->deviceid = ev->deviceid; barrier->sourceid = ev->sourceid; barrier->time = ev->time; barrier->event = ev->window; barrier->root = ev->root; barrier->dx = double_to_fp3232(ev->dx); barrier->dy = double_to_fp3232(ev->dy); barrier->dtime = ev->dt; barrier->flags = ev->flags; barrier->eventid = ev->event_id; barrier->barrier = ev->barrierid; barrier->root_x = double_to_fp1616(ev->root_x); barrier->root_y = double_to_fp1616(ev->root_y); return Success; } int eventToGesturePinchEvent(GestureEvent *ev, xEvent **xi) { int len = sizeof(xXIGesturePinchEvent); xXIGesturePinchEvent *xpe; *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; xpe = (xXIGesturePinchEvent *) * xi; xpe->type = GenericEvent; xpe->extension = IReqCode; xpe->evtype = GetXI2Type(ev->type); xpe->time = ev->time; xpe->length = bytes_to_int32(len - sizeof(xEvent)); xpe->detail = ev->num_touches; xpe->root = ev->root; xpe->deviceid = ev->deviceid; xpe->sourceid = ev->sourceid; xpe->root_x = double_to_fp1616(ev->root_x); xpe->root_y = double_to_fp1616(ev->root_y); xpe->flags |= (ev->flags & GESTURE_CANCELLED) ? XIGesturePinchEventCancelled : 0; xpe->delta_x = double_to_fp1616(ev->delta_x); xpe->delta_y = double_to_fp1616(ev->delta_y); xpe->delta_unaccel_x = double_to_fp1616(ev->delta_unaccel_x); xpe->delta_unaccel_y = double_to_fp1616(ev->delta_unaccel_y); xpe->scale = double_to_fp1616(ev->scale); xpe->delta_angle = double_to_fp1616(ev->delta_angle); xpe->mods.base_mods = ev->mods.base; xpe->mods.latched_mods = ev->mods.latched; xpe->mods.locked_mods = ev->mods.locked; xpe->mods.effective_mods = ev->mods.effective; xpe->group.base_group = ev->group.base; xpe->group.latched_group = ev->group.latched; xpe->group.locked_group = ev->group.locked; xpe->group.effective_group = ev->group.effective; return Success; } int eventToGestureSwipeEvent(GestureEvent *ev, xEvent **xi) { int len = sizeof(xXIGestureSwipeEvent); xXIGestureSwipeEvent *xde; *xi = calloc(1, len); if (*xi == NULL) return BadAlloc; xde = (xXIGestureSwipeEvent *) * xi; xde->type = GenericEvent; xde->extension = IReqCode; xde->evtype = GetXI2Type(ev->type); xde->time = ev->time; xde->length = bytes_to_int32(len - sizeof(xEvent)); xde->detail = ev->num_touches; xde->root = ev->root; xde->deviceid = ev->deviceid; xde->sourceid = ev->sourceid; xde->root_x = double_to_fp1616(ev->root_x); xde->root_y = double_to_fp1616(ev->root_y); xde->flags |= (ev->flags & GESTURE_CANCELLED) ? XIGestureSwipeEventCancelled : 0; xde->delta_x = double_to_fp1616(ev->delta_x); xde->delta_y = double_to_fp1616(ev->delta_y); xde->delta_unaccel_x = double_to_fp1616(ev->delta_unaccel_x); xde->delta_unaccel_y = double_to_fp1616(ev->delta_unaccel_y); xde->mods.base_mods = ev->mods.base; xde->mods.latched_mods = ev->mods.latched; xde->mods.locked_mods = ev->mods.locked; xde->mods.effective_mods = ev->mods.effective; xde->group.base_group = ev->group.base; xde->group.latched_group = ev->group.latched; xde->group.locked_group = ev->group.locked; xde->group.effective_group = ev->group.effective; return Success; } /** * Return the corresponding core type for the given event or 0 if no core * equivalent exists. */ int GetCoreType(enum EventType type) { int coretype = 0; switch (type) { case ET_Motion: coretype = MotionNotify; break; case ET_ButtonPress: coretype = ButtonPress; break; case ET_ButtonRelease: coretype = ButtonRelease; break; case ET_KeyPress: coretype = KeyPress; break; case ET_KeyRelease: coretype = KeyRelease; break; default: break; } return coretype; } /** * Return the corresponding XI 1.x type for the given event or 0 if no * equivalent exists. */ int GetXIType(enum EventType type) { int xitype = 0; switch (type) { case ET_Motion: xitype = DeviceMotionNotify; break; case ET_ButtonPress: xitype = DeviceButtonPress; break; case ET_ButtonRelease: xitype = DeviceButtonRelease; break; case ET_KeyPress: xitype = DeviceKeyPress; break; case ET_KeyRelease: xitype = DeviceKeyRelease; break; case ET_ProximityIn: xitype = ProximityIn; break; case ET_ProximityOut: xitype = ProximityOut; break; default: break; } return xitype; } /** * Return the corresponding XI 2.x type for the given event or 0 if no * equivalent exists. */ int GetXI2Type(enum EventType type) { int xi2type = 0; switch (type) { case ET_Motion: xi2type = XI_Motion; break; case ET_ButtonPress: xi2type = XI_ButtonPress; break; case ET_ButtonRelease: xi2type = XI_ButtonRelease; break; case ET_KeyPress: xi2type = XI_KeyPress; break; case ET_KeyRelease: xi2type = XI_KeyRelease; break; case ET_Enter: xi2type = XI_Enter; break; case ET_Leave: xi2type = XI_Leave; break; case ET_Hierarchy: xi2type = XI_HierarchyChanged; break; case ET_DeviceChanged: xi2type = XI_DeviceChanged; break; case ET_RawKeyPress: xi2type = XI_RawKeyPress; break; case ET_RawKeyRelease: xi2type = XI_RawKeyRelease; break; case ET_RawButtonPress: xi2type = XI_RawButtonPress; break; case ET_RawButtonRelease: xi2type = XI_RawButtonRelease; break; case ET_RawMotion: xi2type = XI_RawMotion; break; case ET_RawTouchBegin: xi2type = XI_RawTouchBegin; break; case ET_RawTouchUpdate: xi2type = XI_RawTouchUpdate; break; case ET_RawTouchEnd: xi2type = XI_RawTouchEnd; break; case ET_FocusIn: xi2type = XI_FocusIn; break; case ET_FocusOut: xi2type = XI_FocusOut; break; case ET_TouchBegin: xi2type = XI_TouchBegin; break; case ET_TouchEnd: xi2type = XI_TouchEnd; break; case ET_TouchUpdate: xi2type = XI_TouchUpdate; break; case ET_TouchOwnership: xi2type = XI_TouchOwnership; break; case ET_BarrierHit: xi2type = XI_BarrierHit; break; case ET_BarrierLeave: xi2type = XI_BarrierLeave; break; case ET_GesturePinchBegin: xi2type = XI_GesturePinchBegin; break; case ET_GesturePinchUpdate: xi2type = XI_GesturePinchUpdate; break; case ET_GesturePinchEnd: xi2type = XI_GesturePinchEnd; break; case ET_GestureSwipeBegin: xi2type = XI_GestureSwipeBegin; break; case ET_GestureSwipeUpdate: xi2type = XI_GestureSwipeUpdate; break; case ET_GestureSwipeEnd: xi2type = XI_GestureSwipeEnd; break; default: break; } return xi2type; } /** * Converts a gesture type to corresponding Gesture{Pinch,Swipe}Begin. * Returns 0 if the input type is not a gesture. */ enum EventType GestureTypeToBegin(enum EventType type) { switch (type) { case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: return ET_GesturePinchBegin; case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: return ET_GestureSwipeBegin; default: return 0; } } /** * Converts a gesture type to corresponding Gesture{Pinch,Swipe}End. * Returns 0 if the input type is not a gesture. */ enum EventType GestureTypeToEnd(enum EventType type) { switch (type) { case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: return ET_GesturePinchEnd; case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: return ET_GestureSwipeEnd; default: return 0; } } xorg-server-21.1.16/dix/extension.c0000644000175000017500000002136414757411105012605 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "gcstruct.h" #include "scrnintstr.h" #include "dispatch.h" #include "privates.h" #include "registry.h" #include "xace.h" #define LAST_ERROR 255 static ExtensionEntry **extensions = (ExtensionEntry **) NULL; int lastEvent = EXTENSION_EVENT_BASE; static int lastError = FirstExtensionError; static unsigned int NumExtensions = 0; ExtensionEntry * AddExtension(const char *name, int NumEvents, int NumErrors, int (*MainProc) (ClientPtr c1), int (*SwappedMainProc) (ClientPtr c2), void (*CloseDownProc) (ExtensionEntry * e), unsigned short (*MinorOpcodeProc) (ClientPtr c3)) { int i; ExtensionEntry *ext, **newexts; if (!MainProc || !SwappedMainProc || !MinorOpcodeProc) return ((ExtensionEntry *) NULL); if ((lastEvent + NumEvents > MAXEVENTS) || (unsigned) (lastError + NumErrors > LAST_ERROR)) { LogMessage(X_ERROR, "Not enabling extension %s: maximum number of " "events or errors exceeded.\n", name); return ((ExtensionEntry *) NULL); } ext = calloc(sizeof(ExtensionEntry), 1); if (!ext) return NULL; if (!dixAllocatePrivates(&ext->devPrivates, PRIVATE_EXTENSION)) { free(ext); return NULL; } ext->name = strdup(name); if (!ext->name) { dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); free(ext); return ((ExtensionEntry *) NULL); } i = NumExtensions; newexts = reallocarray(extensions, i + 1, sizeof(ExtensionEntry *)); if (!newexts) { free((void *) ext->name); dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); free(ext); return ((ExtensionEntry *) NULL); } NumExtensions++; extensions = newexts; extensions[i] = ext; ext->index = i; ext->base = i + EXTENSION_BASE; ext->CloseDown = CloseDownProc; ext->MinorOpcode = MinorOpcodeProc; ProcVector[i + EXTENSION_BASE] = MainProc; SwappedProcVector[i + EXTENSION_BASE] = SwappedMainProc; if (NumEvents) { ext->eventBase = lastEvent; ext->eventLast = lastEvent + NumEvents; lastEvent += NumEvents; } else { ext->eventBase = 0; ext->eventLast = 0; } if (NumErrors) { ext->errorBase = lastError; ext->errorLast = lastError + NumErrors; lastError += NumErrors; } else { ext->errorBase = 0; ext->errorLast = 0; } #ifdef X_REGISTRY_REQUEST RegisterExtensionNames(ext); #endif return ext; } static int FindExtension(const char *extname, int len) { int i; for (i = 0; i < NumExtensions; i++) { if ((strlen(extensions[i]->name) == len) && !strncmp(extname, extensions[i]->name, len)) break; } return ((i == NumExtensions) ? -1 : i); } /* * CheckExtension returns the extensions[] entry for the requested * extension name. Maybe this could just return a Bool instead? */ ExtensionEntry * CheckExtension(const char *extname) { int n; n = FindExtension(extname, strlen(extname)); if (n != -1) return extensions[n]; else return NULL; } /* * Added as part of Xace. */ ExtensionEntry * GetExtensionEntry(int major) { if (major < EXTENSION_BASE) return NULL; major -= EXTENSION_BASE; if (major >= NumExtensions) return NULL; return extensions[major]; } unsigned short StandardMinorOpcode(ClientPtr client) { return ((xReq *) client->requestBuffer)->data; } void CloseDownExtensions(void) { int i; for (i = NumExtensions - 1; i >= 0; i--) { if (extensions[i]->CloseDown) extensions[i]->CloseDown(extensions[i]); NumExtensions = i; free((void *) extensions[i]->name); dixFreePrivates(extensions[i]->devPrivates, PRIVATE_EXTENSION); free(extensions[i]); } free(extensions); extensions = (ExtensionEntry **) NULL; lastEvent = EXTENSION_EVENT_BASE; lastError = FirstExtensionError; } static Bool ExtensionAvailable(ClientPtr client, ExtensionEntry *ext) { if (XaceHook(XACE_EXT_ACCESS, client, ext) != Success) return FALSE; if (!ext->base) return FALSE; return TRUE; } int ProcQueryExtension(ClientPtr client) { xQueryExtensionReply reply; int i; REQUEST(xQueryExtensionReq); REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes); reply = (xQueryExtensionReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .major_opcode = 0 }; if (!NumExtensions) reply.present = xFalse; else { i = FindExtension((char *) &stuff[1], stuff->nbytes); if (i < 0 || !ExtensionAvailable(client, extensions[i])) reply.present = xFalse; else { reply.present = xTrue; reply.major_opcode = extensions[i]->base; reply.first_event = extensions[i]->eventBase; reply.first_error = extensions[i]->errorBase; } } WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply); return Success; } int ProcListExtensions(ClientPtr client) { xListExtensionsReply reply; char *bufptr, *buffer; int total_length = 0; REQUEST_SIZE_MATCH(xReq); reply = (xListExtensionsReply) { .type = X_Reply, .nExtensions = 0, .sequenceNumber = client->sequence, .length = 0 }; buffer = NULL; if (NumExtensions) { int i; for (i = 0; i < NumExtensions; i++) { /* call callbacks to find out whether to show extension */ if (!ExtensionAvailable(client, extensions[i])) continue; total_length += strlen(extensions[i]->name) + 1; reply.nExtensions += 1; } reply.length = bytes_to_int32(total_length); buffer = bufptr = malloc(total_length); if (!buffer) return BadAlloc; for (i = 0; i < NumExtensions; i++) { int len; if (!ExtensionAvailable(client, extensions[i])) continue; *bufptr++ = len = strlen(extensions[i]->name); memmove(bufptr, extensions[i]->name, len); bufptr += len; } } WriteReplyToClient(client, sizeof(xListExtensionsReply), &reply); if (reply.length) WriteToClient(client, total_length, buffer); free(buffer); return Success; } xorg-server-21.1.16/dix/gc.c0000644000175000017500000007566714757411105011201 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "resource.h" #include "gcstruct.h" #include "pixmapstr.h" #include "dixfontstr.h" #include "scrnintstr.h" #include "region.h" #include "dixstruct.h" #include "privates.h" #include "dix.h" #include "xace.h" #include extern FontPtr defaultFont; static Bool CreateDefaultTile(GCPtr pGC); static unsigned char DefaultDash[2] = { 4, 4 }; void ValidateGC(DrawablePtr pDraw, GC * pGC) { (*pGC->funcs->ValidateGC) (pGC, pGC->stateChanges, pDraw); pGC->stateChanges = 0; pGC->serialNumber = pDraw->serialNumber; } /* * ChangeGC/ChangeGCXIDs: * * The client performing the gc change must be passed so that access * checks can be performed on any tiles, stipples, or fonts that are * specified. ddxen can call this too; they should normally pass * NullClient for the client since any access checking should have * already been done at a higher level. * * If you have any XIDs, you must use ChangeGCXIDs: * * CARD32 v[2]; * v[0] = FillTiled; * v[1] = pid; * ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v); * * However, if you need to pass a pointer to a pixmap or font, you must * use ChangeGC: * * ChangeGCVal v[2]; * v[0].val = FillTiled; * v[1].ptr = pPixmap; * ChangeGC(client, pGC, GCFillStyle|GCTile, v); * * If you have neither XIDs nor pointers, you can use either function, * but ChangeGC will do less work. * * ChangeGCVal v[2]; * v[0].val = foreground; * v[1].val = background; * ChangeGC(client, pGC, GCForeground|GCBackground, v); */ #define NEXTVAL(_type, _var) { \ _var = (_type)(pUnion->val); pUnion++; \ } #define NEXT_PTR(_type, _var) { \ _var = (_type)pUnion->ptr; pUnion++; } int ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion) { BITS32 index2; int error = 0; PixmapPtr pPixmap; BITS32 maskQ; assert(pUnion); pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; maskQ = mask; /* save these for when we walk the GCque */ while (mask && !error) { index2 = (BITS32) lowbit(mask); mask &= ~index2; pGC->stateChanges |= index2; switch (index2) { case GCFunction: { CARD8 newalu; NEXTVAL(CARD8, newalu); if (newalu <= GXset) pGC->alu = newalu; else { if (client) client->errorValue = newalu; error = BadValue; } break; } case GCPlaneMask: NEXTVAL(unsigned long, pGC->planemask); break; case GCForeground: NEXTVAL(unsigned long, pGC->fgPixel); /* * this is for CreateGC */ if (!pGC->tileIsPixel && !pGC->tile.pixmap) { pGC->tileIsPixel = TRUE; pGC->tile.pixel = pGC->fgPixel; } break; case GCBackground: NEXTVAL(unsigned long, pGC->bgPixel); break; case GCLineWidth: /* ??? line width is a CARD16 */ NEXTVAL(CARD16, pGC->lineWidth); break; case GCLineStyle: { unsigned int newlinestyle; NEXTVAL(unsigned int, newlinestyle); if (newlinestyle <= LineDoubleDash) pGC->lineStyle = newlinestyle; else { if (client) client->errorValue = newlinestyle; error = BadValue; } break; } case GCCapStyle: { unsigned int newcapstyle; NEXTVAL(unsigned int, newcapstyle); if (newcapstyle <= CapProjecting) pGC->capStyle = newcapstyle; else { if (client) client->errorValue = newcapstyle; error = BadValue; } break; } case GCJoinStyle: { unsigned int newjoinstyle; NEXTVAL(unsigned int, newjoinstyle); if (newjoinstyle <= JoinBevel) pGC->joinStyle = newjoinstyle; else { if (client) client->errorValue = newjoinstyle; error = BadValue; } break; } case GCFillStyle: { unsigned int newfillstyle; NEXTVAL(unsigned int, newfillstyle); if (newfillstyle <= FillOpaqueStippled) pGC->fillStyle = newfillstyle; else { if (client) client->errorValue = newfillstyle; error = BadValue; } break; } case GCFillRule: { unsigned int newfillrule; NEXTVAL(unsigned int, newfillrule); if (newfillrule <= WindingRule) pGC->fillRule = newfillrule; else { if (client) client->errorValue = newfillrule; error = BadValue; } break; } case GCTile: NEXT_PTR(PixmapPtr, pPixmap); if ((pPixmap->drawable.depth != pGC->depth) || (pPixmap->drawable.pScreen != pGC->pScreen)) { error = BadMatch; } else { pPixmap->refcnt++; if (!pGC->tileIsPixel) (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); pGC->tileIsPixel = FALSE; pGC->tile.pixmap = pPixmap; } break; case GCStipple: NEXT_PTR(PixmapPtr, pPixmap); if (pPixmap && ((pPixmap->drawable.depth != 1) || (pPixmap->drawable.pScreen != pGC->pScreen))) { error = BadMatch; } else { if (pPixmap) pPixmap->refcnt++; if (pGC->stipple) (*pGC->pScreen->DestroyPixmap) (pGC->stipple); pGC->stipple = pPixmap; } break; case GCTileStipXOrigin: NEXTVAL(INT16, pGC->patOrg.x); break; case GCTileStipYOrigin: NEXTVAL(INT16, pGC->patOrg.y); break; case GCFont: { FontPtr pFont; NEXT_PTR(FontPtr, pFont); pFont->refcnt++; if (pGC->font) CloseFont(pGC->font, (Font) 0); pGC->font = pFont; break; } case GCSubwindowMode: { unsigned int newclipmode; NEXTVAL(unsigned int, newclipmode); if (newclipmode <= IncludeInferiors) pGC->subWindowMode = newclipmode; else { if (client) client->errorValue = newclipmode; error = BadValue; } break; } case GCGraphicsExposures: { unsigned int newge; NEXTVAL(unsigned int, newge); if (newge <= xTrue) pGC->graphicsExposures = newge; else { if (client) client->errorValue = newge; error = BadValue; } break; } case GCClipXOrigin: NEXTVAL(INT16, pGC->clipOrg.x); break; case GCClipYOrigin: NEXTVAL(INT16, pGC->clipOrg.y); break; case GCClipMask: NEXT_PTR(PixmapPtr, pPixmap); if (pPixmap) { if ((pPixmap->drawable.depth != 1) || (pPixmap->drawable.pScreen != pGC->pScreen)) { error = BadMatch; break; } pPixmap->refcnt++; } (*pGC->funcs->ChangeClip) (pGC, pPixmap ? CT_PIXMAP : CT_NONE, (void *) pPixmap, 0); break; case GCDashOffset: NEXTVAL(INT16, pGC->dashOffset); break; case GCDashList: { CARD8 newdash; NEXTVAL(CARD8, newdash); if (newdash == 4) { if (pGC->dash != DefaultDash) { free(pGC->dash); pGC->numInDashList = 2; pGC->dash = DefaultDash; } } else if (newdash != 0) { unsigned char *dash; dash = malloc(2 * sizeof(unsigned char)); if (dash) { if (pGC->dash != DefaultDash) free(pGC->dash); pGC->numInDashList = 2; pGC->dash = dash; dash[0] = newdash; dash[1] = newdash; } else error = BadAlloc; } else { if (client) client->errorValue = newdash; error = BadValue; } break; } case GCArcMode: { unsigned int newarcmode; NEXTVAL(unsigned int, newarcmode); if (newarcmode <= ArcPieSlice) pGC->arcMode = newarcmode; else { if (client) client->errorValue = newarcmode; error = BadValue; } break; } default: if (client) client->errorValue = maskQ; error = BadValue; break; } } /* end while mask && !error */ if (pGC->fillStyle == FillTiled && pGC->tileIsPixel) { if (!CreateDefaultTile(pGC)) { pGC->fillStyle = FillSolid; error = BadAlloc; } } (*pGC->funcs->ChangeGC) (pGC, maskQ); return error; } #undef NEXTVAL #undef NEXT_PTR static const struct { BITS32 mask; RESTYPE type; Mask access_mode; } xidfields[] = { {GCTile, RT_PIXMAP, DixReadAccess}, {GCStipple, RT_PIXMAP, DixReadAccess}, {GCFont, RT_FONT, DixUseAccess}, {GCClipMask, RT_PIXMAP, DixReadAccess}, }; int ChangeGCXIDs(ClientPtr client, GC * pGC, BITS32 mask, CARD32 *pC32) { ChangeGCVal vals[GCLastBit + 1]; int i; if (mask & ~GCAllBits) { client->errorValue = mask; return BadValue; } for (i = Ones(mask); i--;) vals[i].val = pC32[i]; for (i = 0; i < ARRAY_SIZE(xidfields); ++i) { int offset, rc; if (!(mask & xidfields[i].mask)) continue; offset = Ones(mask & (xidfields[i].mask - 1)); if (xidfields[i].mask == GCClipMask && vals[offset].val == None) { vals[offset].ptr = NullPixmap; continue; } rc = dixLookupResourceByType(&vals[offset].ptr, vals[offset].val, xidfields[i].type, client, xidfields[i].access_mode); if (rc != Success) { client->errorValue = vals[offset].val; return rc; } } return ChangeGC(client, pGC, mask, vals); } static GCPtr NewGCObject(ScreenPtr pScreen, int depth) { GCPtr pGC; pGC = dixAllocateScreenObjectWithPrivates(pScreen, GC, PRIVATE_GC); if (!pGC) { return (GCPtr) NULL; } pGC->pScreen = pScreen; pGC->depth = depth; pGC->alu = GXcopy; /* dst <- src */ pGC->planemask = ~0; pGC->serialNumber = 0; pGC->funcs = 0; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; pGC->lineStyle = LineSolid; pGC->capStyle = CapButt; pGC->joinStyle = JoinMiter; pGC->fillStyle = FillSolid; pGC->fillRule = EvenOddRule; pGC->arcMode = ArcPieSlice; pGC->tile.pixel = 0; pGC->tile.pixmap = NullPixmap; pGC->tileIsPixel = TRUE; pGC->patOrg.x = 0; pGC->patOrg.y = 0; pGC->subWindowMode = ClipByChildren; pGC->graphicsExposures = TRUE; pGC->clipOrg.x = 0; pGC->clipOrg.y = 0; pGC->clientClip = (void *) NULL; pGC->numInDashList = 2; pGC->dash = DefaultDash; pGC->dashOffset = 0; /* use the default font and stipple */ pGC->font = defaultFont; if (pGC->font) /* necessary, because open of default font could fail */ pGC->font->refcnt++; pGC->stipple = pGC->pScreen->defaultStipple; if (pGC->stipple) pGC->stipple->refcnt++; /* this is not a scratch GC */ pGC->scratch_inuse = FALSE; return pGC; } /* CreateGC(pDrawable, mask, pval, pStatus) creates a default GC for the given drawable, using mask to fill in any non-default values. Returns a pointer to the new GC on success, NULL otherwise. returns status of non-default fields in pStatus BUG: should check for failure to create default tile */ GCPtr CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, XID gcid, ClientPtr client) { GCPtr pGC; pGC = NewGCObject(pDrawable->pScreen, pDrawable->depth); if (!pGC) { *pStatus = BadAlloc; return (GCPtr) NULL; } pGC->serialNumber = GC_CHANGE_SERIAL_BIT; if (mask & GCForeground) { /* * magic special case -- ChangeGC checks for this condition * and snags the Foreground value to create a pseudo default-tile */ pGC->tileIsPixel = FALSE; } else { pGC->tileIsPixel = TRUE; } /* security creation/labeling check */ *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, pGC, RT_NONE, NULL, DixCreateAccess | DixSetAttrAccess); if (*pStatus != Success) goto out; pGC->stateChanges = GCAllBits; if (!(*pGC->pScreen->CreateGC) (pGC)) *pStatus = BadAlloc; else if (mask) *pStatus = ChangeGCXIDs(client, pGC, mask, pval); else *pStatus = Success; out: if (*pStatus != Success) { if (!pGC->tileIsPixel && !pGC->tile.pixmap) pGC->tileIsPixel = TRUE; /* undo special case */ FreeGC(pGC, (XID) 0); pGC = (GCPtr) NULL; } return pGC; } static Bool CreateDefaultTile(GCPtr pGC) { ChangeGCVal tmpval[3]; PixmapPtr pTile; GCPtr pgcScratch; xRectangle rect; CARD16 w, h; w = 1; h = 1; (*pGC->pScreen->QueryBestSize) (TileShape, &w, &h, pGC->pScreen); pTile = (PixmapPtr) (*pGC->pScreen->CreatePixmap) (pGC->pScreen, w, h, pGC->depth, 0); pgcScratch = GetScratchGC(pGC->depth, pGC->pScreen); if (!pTile || !pgcScratch) { if (pTile) (*pTile->drawable.pScreen->DestroyPixmap) (pTile); if (pgcScratch) FreeScratchGC(pgcScratch); return FALSE; } tmpval[0].val = GXcopy; tmpval[1].val = pGC->tile.pixel; tmpval[2].val = FillSolid; (void) ChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval); ValidateGC((DrawablePtr) pTile, pgcScratch); rect.x = 0; rect.y = 0; rect.width = w; rect.height = h; (*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pTile, pgcScratch, 1, &rect); /* Always remember to free the scratch graphics context after use. */ FreeScratchGC(pgcScratch); pGC->tileIsPixel = FALSE; pGC->tile.pixmap = pTile; return TRUE; } int CopyGC(GC * pgcSrc, GC * pgcDst, BITS32 mask) { BITS32 index2; BITS32 maskQ; int error = 0; if (pgcSrc == pgcDst) return Success; pgcDst->serialNumber |= GC_CHANGE_SERIAL_BIT; pgcDst->stateChanges |= mask; maskQ = mask; while (mask) { index2 = (BITS32) lowbit(mask); mask &= ~index2; switch (index2) { case GCFunction: pgcDst->alu = pgcSrc->alu; break; case GCPlaneMask: pgcDst->planemask = pgcSrc->planemask; break; case GCForeground: pgcDst->fgPixel = pgcSrc->fgPixel; break; case GCBackground: pgcDst->bgPixel = pgcSrc->bgPixel; break; case GCLineWidth: pgcDst->lineWidth = pgcSrc->lineWidth; break; case GCLineStyle: pgcDst->lineStyle = pgcSrc->lineStyle; break; case GCCapStyle: pgcDst->capStyle = pgcSrc->capStyle; break; case GCJoinStyle: pgcDst->joinStyle = pgcSrc->joinStyle; break; case GCFillStyle: pgcDst->fillStyle = pgcSrc->fillStyle; break; case GCFillRule: pgcDst->fillRule = pgcSrc->fillRule; break; case GCTile: { if (EqualPixUnion(pgcDst->tileIsPixel, pgcDst->tile, pgcSrc->tileIsPixel, pgcSrc->tile)) { break; } if (!pgcDst->tileIsPixel) (*pgcDst->pScreen->DestroyPixmap) (pgcDst->tile.pixmap); pgcDst->tileIsPixel = pgcSrc->tileIsPixel; pgcDst->tile = pgcSrc->tile; if (!pgcDst->tileIsPixel) pgcDst->tile.pixmap->refcnt++; break; } case GCStipple: { if (pgcDst->stipple == pgcSrc->stipple) break; if (pgcDst->stipple) (*pgcDst->pScreen->DestroyPixmap) (pgcDst->stipple); pgcDst->stipple = pgcSrc->stipple; if (pgcDst->stipple) pgcDst->stipple->refcnt++; break; } case GCTileStipXOrigin: pgcDst->patOrg.x = pgcSrc->patOrg.x; break; case GCTileStipYOrigin: pgcDst->patOrg.y = pgcSrc->patOrg.y; break; case GCFont: if (pgcDst->font == pgcSrc->font) break; if (pgcDst->font) CloseFont(pgcDst->font, (Font) 0); if ((pgcDst->font = pgcSrc->font) != NullFont) (pgcDst->font)->refcnt++; break; case GCSubwindowMode: pgcDst->subWindowMode = pgcSrc->subWindowMode; break; case GCGraphicsExposures: pgcDst->graphicsExposures = pgcSrc->graphicsExposures; break; case GCClipXOrigin: pgcDst->clipOrg.x = pgcSrc->clipOrg.x; break; case GCClipYOrigin: pgcDst->clipOrg.y = pgcSrc->clipOrg.y; break; case GCClipMask: (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); break; case GCDashOffset: pgcDst->dashOffset = pgcSrc->dashOffset; break; case GCDashList: if (pgcSrc->dash == DefaultDash) { if (pgcDst->dash != DefaultDash) { free(pgcDst->dash); pgcDst->numInDashList = pgcSrc->numInDashList; pgcDst->dash = pgcSrc->dash; } } else { unsigned char *dash; unsigned int i; dash = malloc(pgcSrc->numInDashList * sizeof(unsigned char)); if (dash) { if (pgcDst->dash != DefaultDash) free(pgcDst->dash); pgcDst->numInDashList = pgcSrc->numInDashList; pgcDst->dash = dash; for (i = 0; i < pgcSrc->numInDashList; i++) dash[i] = pgcSrc->dash[i]; } else error = BadAlloc; } break; case GCArcMode: pgcDst->arcMode = pgcSrc->arcMode; break; default: FatalError("CopyGC: Unhandled mask!\n"); } } if (pgcDst->fillStyle == FillTiled && pgcDst->tileIsPixel) { if (!CreateDefaultTile(pgcDst)) { pgcDst->fillStyle = FillSolid; error = BadAlloc; } } (*pgcDst->funcs->CopyGC) (pgcSrc, maskQ, pgcDst); return error; } /** * does the diX part of freeing the characteristics in the GC. * * \param value must conform to DeleteType */ int FreeGC(void *value, XID gid) { GCPtr pGC = (GCPtr) value; CloseFont(pGC->font, (Font) 0); (*pGC->funcs->DestroyClip) (pGC); if (!pGC->tileIsPixel) (*pGC->pScreen->DestroyPixmap) (pGC->tile.pixmap); if (pGC->stipple) (*pGC->pScreen->DestroyPixmap) (pGC->stipple); (*pGC->funcs->DestroyGC) (pGC); if (pGC->dash != DefaultDash) free(pGC->dash); dixFreeObjectWithPrivates(pGC, PRIVATE_GC); return Success; } /* CreateScratchGC(pScreen, depth) like CreateGC, but doesn't do the default tile or stipple, since we can't create them without already having a GC. any code using the tile or stipple has to set them explicitly anyway, since the state of the scratch gc is unknown. This is OK because ChangeGC() has to be able to deal with NULL tiles and stipples anyway (in case the CreateGC() call has provided a value for them -- we can't set the default tile until the client-supplied attributes are installed, since the fgPixel is what fills the default tile. (maybe this comment should go with CreateGC() or ChangeGC().) */ static GCPtr CreateScratchGC(ScreenPtr pScreen, unsigned depth) { GCPtr pGC; pGC = NewGCObject(pScreen, depth); if (!pGC) return (GCPtr) NULL; pGC->stateChanges = GCAllBits; if (!(*pScreen->CreateGC) (pGC)) { FreeGC(pGC, (XID) 0); pGC = (GCPtr) NULL; } else pGC->graphicsExposures = FALSE; return pGC; } void FreeGCperDepth(int screenNum) { int i; ScreenPtr pScreen; GCPtr *ppGC; pScreen = screenInfo.screens[screenNum]; ppGC = pScreen->GCperDepth; for (i = 0; i <= pScreen->numDepths; i++) { (void) FreeGC(ppGC[i], (XID) 0); ppGC[i] = NULL; } } Bool CreateGCperDepth(int screenNum) { int i; ScreenPtr pScreen; DepthPtr pDepth; GCPtr *ppGC; pScreen = screenInfo.screens[screenNum]; ppGC = pScreen->GCperDepth; /* do depth 1 separately because it's not included in list */ if (!(ppGC[0] = CreateScratchGC(pScreen, 1))) return FALSE; /* Make sure we don't overflow GCperDepth[] */ if (pScreen->numDepths > MAXFORMATS) return FALSE; pDepth = pScreen->allowedDepths; for (i = 0; i < pScreen->numDepths; i++, pDepth++) { if (!(ppGC[i + 1] = CreateScratchGC(pScreen, pDepth->depth))) { for (; i >= 0; i--) (void) FreeGC(ppGC[i], (XID) 0); return FALSE; } } return TRUE; } Bool CreateDefaultStipple(int screenNum) { ScreenPtr pScreen; ChangeGCVal tmpval[3]; xRectangle rect; CARD16 w, h; GCPtr pgcScratch; pScreen = screenInfo.screens[screenNum]; w = 16; h = 16; (*pScreen->QueryBestSize) (StippleShape, &w, &h, pScreen); if (!(pScreen->defaultStipple = pScreen->CreatePixmap(pScreen, w, h, 1, 0))) return FALSE; /* fill stipple with 1 */ tmpval[0].val = GXcopy; tmpval[1].val = 1; tmpval[2].val = FillSolid; pgcScratch = GetScratchGC(1, pScreen); if (!pgcScratch) { (*pScreen->DestroyPixmap) (pScreen->defaultStipple); return FALSE; } (void) ChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval); ValidateGC((DrawablePtr) pScreen->defaultStipple, pgcScratch); rect.x = 0; rect.y = 0; rect.width = w; rect.height = h; (*pgcScratch->ops->PolyFillRect) ((DrawablePtr) pScreen->defaultStipple, pgcScratch, 1, &rect); FreeScratchGC(pgcScratch); return TRUE; } void FreeDefaultStipple(int screenNum) { ScreenPtr pScreen = screenInfo.screens[screenNum]; (*pScreen->DestroyPixmap) (pScreen->defaultStipple); } int SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) { long i; unsigned char *p, *indash; BITS32 maskQ = 0; i = ndash; p = pdash; while (i--) { if (!*p++) { /* dash segment must be > 0 */ return BadValue; } } if (ndash & 1) p = malloc(2 * ndash * sizeof(unsigned char)); else p = malloc(ndash * sizeof(unsigned char)); if (!p) return BadAlloc; pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; if (offset != pGC->dashOffset) { pGC->dashOffset = offset; pGC->stateChanges |= GCDashOffset; maskQ |= GCDashOffset; } if (pGC->dash != DefaultDash) free(pGC->dash); pGC->numInDashList = ndash; pGC->dash = p; if (ndash & 1) { pGC->numInDashList += ndash; indash = pdash; i = ndash; while (i--) *p++ = *indash++; } while (ndash--) *p++ = *pdash++; pGC->stateChanges |= GCDashList; maskQ |= GCDashList; if (pGC->funcs->ChangeGC) (*pGC->funcs->ChangeGC) (pGC, maskQ); return Success; } int VerifyRectOrder(int nrects, xRectangle *prects, int ordering) { xRectangle *prectP, *prectN; int i; switch (ordering) { case Unsorted: return CT_UNSORTED; case YSorted: if (nrects > 1) { for (i = 1, prectP = prects, prectN = prects + 1; i < nrects; i++, prectP++, prectN++) if (prectN->y < prectP->y) return -1; } return CT_YSORTED; case YXSorted: if (nrects > 1) { for (i = 1, prectP = prects, prectN = prects + 1; i < nrects; i++, prectP++, prectN++) if ((prectN->y < prectP->y) || ((prectN->y == prectP->y) && (prectN->x < prectP->x))) return -1; } return CT_YXSORTED; case YXBanded: if (nrects > 1) { for (i = 1, prectP = prects, prectN = prects + 1; i < nrects; i++, prectP++, prectN++) if ((prectN->y != prectP->y && prectN->y < prectP->y + (int) prectP->height) || ((prectN->y == prectP->y) && (prectN->height != prectP->height || prectN->x < prectP->x + (int) prectP->width))) return -1; } return CT_YXBANDED; } return -1; } int SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, xRectangle *prects, int ordering) { int newct, size; xRectangle *prectsNew; newct = VerifyRectOrder(nrects, prects, ordering); if (newct < 0) return BadMatch; size = nrects * sizeof(xRectangle); prectsNew = malloc(size); if (!prectsNew && size) return BadAlloc; pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; pGC->clipOrg.x = xOrigin; pGC->stateChanges |= GCClipXOrigin; pGC->clipOrg.y = yOrigin; pGC->stateChanges |= GCClipYOrigin; if (size) memmove((char *) prectsNew, (char *) prects, size); (*pGC->funcs->ChangeClip) (pGC, newct, (void *) prectsNew, nrects); if (pGC->funcs->ChangeGC) (*pGC->funcs->ChangeGC) (pGC, GCClipXOrigin | GCClipYOrigin | GCClipMask); return Success; } /* sets reasonable defaults if we can get a pre-allocated one, use it and mark it as used. if we can't, create one out of whole cloth (The Velveteen GC -- if you use it often enough it will become real.) */ GCPtr GetScratchGC(unsigned depth, ScreenPtr pScreen) { int i; GCPtr pGC; for (i = 0; i <= pScreen->numDepths; i++) { pGC = pScreen->GCperDepth[i]; if (pGC && pGC->depth == depth && !pGC->scratch_inuse) { pGC->scratch_inuse = TRUE; pGC->alu = GXcopy; pGC->planemask = ~0; pGC->serialNumber = 0; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; pGC->lineStyle = LineSolid; pGC->capStyle = CapButt; pGC->joinStyle = JoinMiter; pGC->fillStyle = FillSolid; pGC->fillRule = EvenOddRule; pGC->arcMode = ArcChord; pGC->patOrg.x = 0; pGC->patOrg.y = 0; pGC->subWindowMode = ClipByChildren; pGC->graphicsExposures = FALSE; pGC->clipOrg.x = 0; pGC->clipOrg.y = 0; if (pGC->clientClip) (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0); pGC->stateChanges = GCAllBits; return pGC; } } /* if we make it this far, need to roll our own */ return CreateScratchGC(pScreen, depth); } /* if the gc to free is in the table of pre-existing ones, mark it as available. if not, free it for real */ void FreeScratchGC(GCPtr pGC) { if (pGC->scratch_inuse) pGC->scratch_inuse = FALSE; else FreeGC(pGC, (GContext) 0); } xorg-server-21.1.16/dix/getevents.c0000644000175000017500000021341614757411105012576 /* * Copyright © 2006 Nokia Corporation * Copyright © 2006-2007 Daniel Stone * Copyright © 2008 Red Hat, Inc. * Copyright © 2011 The Chromium Authors * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Daniel Stone * Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "misc.h" #include "resource.h" #include "inputstr.h" #include "scrnintstr.h" #include "cursorstr.h" #include "dixstruct.h" #include "globals.h" #include "dixevents.h" #include "mipointer.h" #include "eventstr.h" #include "eventconvert.h" #include "inpututils.h" #include "mi.h" #include "windowstr.h" #include #include "xkbsrv.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include #include #include #include #include "exglobals.h" #include "exevents.h" #include "extnsionst.h" #include "listdev.h" /* for sizing up DeviceClassesChangedEvent */ #include "probes.h" /* Number of motion history events to store. */ #define MOTION_HISTORY_SIZE 256 /** * InputEventList is the storage for input events generated by * QueuePointerEvents, QueueKeyboardEvents, and QueueProximityEvents. * This list is allocated on startup by the DIX. */ InternalEvent *InputEventList = NULL; /** * Pick some arbitrary size for Xi motion history. */ int GetMotionHistorySize(void) { return MOTION_HISTORY_SIZE; } void set_button_down(DeviceIntPtr pDev, int button, int type) { if (type == BUTTON_PROCESSED) SetBit(pDev->button->down, button); else SetBit(pDev->button->postdown, button); } void set_button_up(DeviceIntPtr pDev, int button, int type) { if (type == BUTTON_PROCESSED) ClearBit(pDev->button->down, button); else ClearBit(pDev->button->postdown, button); } Bool button_is_down(DeviceIntPtr pDev, int button, int type) { Bool ret = FALSE; if (type & BUTTON_PROCESSED) ret = ret || BitIsOn(pDev->button->down, button); if (type & BUTTON_POSTED) ret = ret || BitIsOn(pDev->button->postdown, button); return ret; } void set_key_down(DeviceIntPtr pDev, int key_code, int type) { if (type == KEY_PROCESSED) SetBit(pDev->key->down, key_code); else SetBit(pDev->key->postdown, key_code); } void set_key_up(DeviceIntPtr pDev, int key_code, int type) { if (type == KEY_PROCESSED) ClearBit(pDev->key->down, key_code); else ClearBit(pDev->key->postdown, key_code); } Bool key_is_down(DeviceIntPtr pDev, int key_code, int type) { Bool ret = FALSE; if (type & KEY_PROCESSED) ret = ret || BitIsOn(pDev->key->down, key_code); if (type & KEY_POSTED) ret = ret || BitIsOn(pDev->key->postdown, key_code); return ret; } static Bool key_autorepeats(DeviceIntPtr pDev, int key_code) { return ! !(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3] & (1 << (key_code & 7))); } static void init_touch_ownership(DeviceIntPtr dev, TouchOwnershipEvent *event, Time ms) { memset(event, 0, sizeof(TouchOwnershipEvent)); event->header = ET_Internal; event->type = ET_TouchOwnership; event->length = sizeof(TouchOwnershipEvent); event->time = ms; event->deviceid = dev->id; } static void init_raw(DeviceIntPtr dev, RawDeviceEvent *event, Time ms, int type, int detail) { memset(event, 0, sizeof(RawDeviceEvent)); event->header = ET_Internal; event->length = sizeof(RawDeviceEvent); switch (type) { case MotionNotify: event->type = ET_RawMotion; break; case ButtonPress: event->type = ET_RawButtonPress; break; case ButtonRelease: event->type = ET_RawButtonRelease; break; case KeyPress: event->type = ET_RawKeyPress; break; case KeyRelease: event->type = ET_RawKeyRelease; break; case XI_TouchBegin: event->type = ET_RawTouchBegin; break; case XI_TouchUpdate: event->type = ET_RawTouchUpdate; break; case XI_TouchEnd: event->type = ET_RawTouchEnd; break; } event->time = ms; event->deviceid = dev->id; event->sourceid = dev->id; event->detail.button = detail; } static void set_raw_valuators(RawDeviceEvent *event, ValuatorMask *mask, BOOL use_unaccel, double *data) { int i; use_unaccel = use_unaccel && valuator_mask_has_unaccelerated(mask); for (i = 0; i < valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) { double v; SetBit(event->valuators.mask, i); if (use_unaccel) v = valuator_mask_get_unaccelerated(mask, i); else v = valuator_mask_get_double(mask, i); data[i] = v; } } } static void set_valuators(DeviceIntPtr dev, DeviceEvent *event, ValuatorMask *mask) { int i; /* Set the data to the previous value for unset absolute axes. The values * may be used when sent as part of an XI 1.x valuator event. */ for (i = 0; i < valuator_mask_size(mask); i++) { if (valuator_mask_isset(mask, i)) { SetBit(event->valuators.mask, i); if (valuator_get_mode(dev, i) == Absolute) SetBit(event->valuators.mode, i); event->valuators.data[i] = valuator_mask_get_double(mask, i); } else event->valuators.data[i] = dev->valuator->axisVal[i]; } } void CreateClassesChangedEvent(InternalEvent *event, DeviceIntPtr master, DeviceIntPtr slave, int flags) { int i; DeviceChangedEvent *dce; CARD32 ms = GetTimeInMillis(); dce = &event->changed_event; memset(dce, 0, sizeof(DeviceChangedEvent)); dce->deviceid = slave->id; dce->masterid = master ? master->id : 0; dce->header = ET_Internal; dce->length = sizeof(DeviceChangedEvent); dce->type = ET_DeviceChanged; dce->time = ms; dce->flags = flags; dce->sourceid = slave->id; if (slave->button) { dce->buttons.num_buttons = slave->button->numButtons; for (i = 0; i < dce->buttons.num_buttons; i++) dce->buttons.names[i] = slave->button->labels[i]; } if (slave->valuator) { dce->num_valuators = slave->valuator->numAxes; for (i = 0; i < dce->num_valuators; i++) { dce->valuators[i].min = slave->valuator->axes[i].min_value; dce->valuators[i].max = slave->valuator->axes[i].max_value; dce->valuators[i].resolution = slave->valuator->axes[i].resolution; dce->valuators[i].mode = slave->valuator->axes[i].mode; dce->valuators[i].name = slave->valuator->axes[i].label; dce->valuators[i].scroll = slave->valuator->axes[i].scroll; dce->valuators[i].value = slave->valuator->axisVal[i]; } } if (slave->key) { dce->keys.min_keycode = slave->key->xkbInfo->desc->min_key_code; dce->keys.max_keycode = slave->key->xkbInfo->desc->max_key_code; } } /** * Rescale the coord between the two axis ranges. */ static double rescaleValuatorAxis(double coord, AxisInfoPtr from, AxisInfoPtr to, double defmin, double defmax) { double fmin = defmin, fmax = defmax; double tmin = defmin, tmax = defmax; if (from && from->min_value < from->max_value) { fmin = from->min_value; fmax = from->max_value + 1; } if (to && to->min_value < to->max_value) { tmin = to->min_value; tmax = to->max_value + 1; } if (fmin == tmin && fmax == tmax) return coord; if (fmax == fmin) /* avoid division by 0 */ return 0.0; return (coord - fmin) * (tmax - tmin) / (fmax - fmin) + tmin; } /** * Update all coordinates when changing to a different SD * to ensure that relative reporting will work as expected * without loss of precision. * * pDev->last.valuators will be in absolute device coordinates after this * function. */ static void updateSlaveDeviceCoords(DeviceIntPtr master, DeviceIntPtr pDev) { /* master->last.valuators[0]/[1] is in desktop-wide coords and the actual * position of the pointer */ pDev->last.valuators[0] = master->last.valuators[0]; pDev->last.valuators[1] = master->last.valuators[1]; if (!pDev->valuator) return; /* scale back to device coordinates */ if (pDev->valuator->numAxes > 0) { pDev->last.valuators[0] = rescaleValuatorAxis(pDev->last.valuators[0], NULL, pDev->valuator->axes + 0, screenInfo.x, screenInfo.width); } if (pDev->valuator->numAxes > 1) { pDev->last.valuators[1] = rescaleValuatorAxis(pDev->last.valuators[1], NULL, pDev->valuator->axes + 1, screenInfo.y, screenInfo.height); } /* other axes are left as-is */ } /** * Allocate the motion history buffer. */ void AllocateMotionHistory(DeviceIntPtr pDev) { int size; free(pDev->valuator->motion); if (pDev->valuator->numMotionEvents < 1) return; /* An MD must have a motion history size large enough to keep all * potential valuators, plus the respective range of the valuators. * 3 * INT32 for (min_val, max_val, curr_val)) */ if (IsMaster(pDev)) size = sizeof(INT32) * 3 * MAX_VALUATORS; else { ValuatorClassPtr v = pDev->valuator; int numAxes; /* XI1 doesn't understand mixed mode devices */ for (numAxes = 0; numAxes < v->numAxes; numAxes++) if (valuator_get_mode(pDev, numAxes) != valuator_get_mode(pDev, 0)) break; size = sizeof(INT32) * numAxes; } size += sizeof(Time); pDev->valuator->motion = calloc(pDev->valuator->numMotionEvents, size); pDev->valuator->first_motion = 0; pDev->valuator->last_motion = 0; if (!pDev->valuator->motion) ErrorF("[dix] %s: Failed to alloc motion history (%d bytes).\n", pDev->name, size * pDev->valuator->numMotionEvents); } /** * Dump the motion history between start and stop into the supplied buffer. * Only records the event for a given screen in theory, but in practice, we * sort of ignore this. * * If core is set, we only generate x/y, in INT16, scaled to screen coords. */ int GetMotionHistory(DeviceIntPtr pDev, xTimecoord ** buff, unsigned long start, unsigned long stop, ScreenPtr pScreen, BOOL core) { char *ibuff = NULL, *obuff; int i = 0, ret = 0; int j, coord; Time current; /* The size of a single motion event. */ int size; AxisInfo from, *to; /* for scaling */ INT32 *ocbuf, *icbuf; /* pointer to coordinates for copying */ INT16 *corebuf; AxisInfo core_axis = { 0 }; if (!pDev->valuator || !pDev->valuator->numMotionEvents) return 0; if (core && !pScreen) return 0; if (IsMaster(pDev)) size = (sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(Time); else size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); *buff = malloc(size * pDev->valuator->numMotionEvents); if (!(*buff)) return 0; obuff = (char *) *buff; for (i = pDev->valuator->first_motion; i != pDev->valuator->last_motion; i = (i + 1) % pDev->valuator->numMotionEvents) { /* We index the input buffer by which element we're accessing, which * is not monotonic, and the output buffer by how many events we've * written so far. */ ibuff = (char *) pDev->valuator->motion + (i * size); memcpy(¤t, ibuff, sizeof(Time)); if (current > stop) { return ret; } else if (current >= start) { if (core) { memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ icbuf = (INT32 *) (ibuff + sizeof(Time)); corebuf = (INT16 *) (obuff + sizeof(Time)); /* fetch x coordinate + range */ memcpy(&from.min_value, icbuf++, sizeof(INT32)); memcpy(&from.max_value, icbuf++, sizeof(INT32)); memcpy(&coord, icbuf++, sizeof(INT32)); /* scale to screen coords */ to = &core_axis; to->max_value = pScreen->width; coord = rescaleValuatorAxis(coord, &from, to, 0, pScreen->width); memcpy(corebuf, &coord, sizeof(INT16)); corebuf++; /* fetch y coordinate + range */ memcpy(&from.min_value, icbuf++, sizeof(INT32)); memcpy(&from.max_value, icbuf++, sizeof(INT32)); memcpy(&coord, icbuf++, sizeof(INT32)); to->max_value = pScreen->height; coord = rescaleValuatorAxis(coord, &from, to, 0, pScreen->height); memcpy(corebuf, &coord, sizeof(INT16)); } else if (IsMaster(pDev)) { memcpy(obuff, ibuff, sizeof(Time)); /* copy timestamp */ ocbuf = (INT32 *) (obuff + sizeof(Time)); icbuf = (INT32 *) (ibuff + sizeof(Time)); for (j = 0; j < MAX_VALUATORS; j++) { if (j >= pDev->valuator->numAxes) break; /* fetch min/max/coordinate */ memcpy(&from.min_value, icbuf++, sizeof(INT32)); memcpy(&from.max_value, icbuf++, sizeof(INT32)); memcpy(&coord, icbuf++, sizeof(INT32)); to = (j < pDev->valuator->numAxes) ? &pDev->valuator-> axes[j] : NULL; /* x/y scaled to screen if no range is present */ if (j == 0 && (from.max_value < from.min_value)) from.max_value = pScreen->width; else if (j == 1 && (from.max_value < from.min_value)) from.max_value = pScreen->height; /* scale from stored range into current range */ coord = rescaleValuatorAxis(coord, &from, to, 0, 0); memcpy(ocbuf, &coord, sizeof(INT32)); ocbuf++; } } else memcpy(obuff, ibuff, size); /* don't advance by size here. size may be different to the * actually written size if the MD has less valuators than MAX */ if (core) obuff += sizeof(INT32) + sizeof(Time); else obuff += (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); ret++; } } return ret; } /** * Update the motion history for a specific device, with the list of * valuators. * * Layout of the history buffer: * for SDs: [time] [val0] [val1] ... [valn] * for MDs: [time] [min_val0] [max_val0] [val0] [min_val1] ... [valn] * * For events that have some valuators unset: * min_val == max_val == val == 0. */ static void updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, ValuatorMask *mask, double *valuators) { char *buff = (char *) pDev->valuator->motion; ValuatorClassPtr v; int i; if (!pDev->valuator->numMotionEvents) return; v = pDev->valuator; if (IsMaster(pDev)) { buff += ((sizeof(INT32) * 3 * MAX_VALUATORS) + sizeof(CARD32)) * v->last_motion; memcpy(buff, &ms, sizeof(Time)); buff += sizeof(Time); memset(buff, 0, sizeof(INT32) * 3 * MAX_VALUATORS); for (i = 0; i < v->numAxes; i++) { int val; /* XI1 doesn't support mixed mode devices */ if (valuator_get_mode(pDev, i) != valuator_get_mode(pDev, 0)) break; if (valuator_mask_size(mask) <= i || !valuator_mask_isset(mask, i)) { buff += 3 * sizeof(INT32); continue; } memcpy(buff, &v->axes[i].min_value, sizeof(INT32)); buff += sizeof(INT32); memcpy(buff, &v->axes[i].max_value, sizeof(INT32)); buff += sizeof(INT32); val = valuators[i]; memcpy(buff, &val, sizeof(INT32)); buff += sizeof(INT32); } } else { buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * pDev->valuator->last_motion; memcpy(buff, &ms, sizeof(Time)); buff += sizeof(Time); memset(buff, 0, sizeof(INT32) * pDev->valuator->numAxes); for (i = 0; i < MAX_VALUATORS; i++) { int val; if (valuator_mask_size(mask) <= i || !valuator_mask_isset(mask, i)) { buff += sizeof(INT32); continue; } val = valuators[i]; memcpy(buff, &val, sizeof(INT32)); buff += sizeof(INT32); } } pDev->valuator->last_motion = (pDev->valuator->last_motion + 1) % pDev->valuator->numMotionEvents; /* If we're wrapping around, just keep the circular buffer going. */ if (pDev->valuator->first_motion == pDev->valuator->last_motion) pDev->valuator->first_motion = (pDev->valuator->first_motion + 1) % pDev->valuator->numMotionEvents; return; } /** * Returns the maximum number of events GetKeyboardEvents * and GetPointerEvents will ever return. * * This MUST be absolutely constant, from init until exit. */ int GetMaximumEventsNum(void) { /* One raw event * One device event * One possible device changed event * Lots of possible separate button scroll events (horiz + vert) * Lots of possible separate raw button scroll events (horiz + vert) */ return 100; } /** * Clip an axis to its bounds, which are declared in the call to * InitValuatorAxisClassStruct. */ static void clipAxis(DeviceIntPtr pDev, int axisNum, double *val) { AxisInfoPtr axis; if (axisNum >= pDev->valuator->numAxes) return; axis = pDev->valuator->axes + axisNum; /* If a value range is defined, clip. If not, do nothing */ if (axis->max_value <= axis->min_value) return; if (*val < axis->min_value) *val = axis->min_value; if (*val > axis->max_value) *val = axis->max_value; } /** * Clip every axis in the list of valuators to its bounds. */ static void clipValuators(DeviceIntPtr pDev, ValuatorMask *mask) { int i; for (i = 0; i < valuator_mask_size(mask); i++) if (valuator_mask_isset(mask, i)) { double val = valuator_mask_get_double(mask, i); clipAxis(pDev, i, &val); valuator_mask_set_double(mask, i, val); } } /** * Create the DCCE event (does not update the master's device state yet, this * is done in the event processing). * Pull in the coordinates from the MD if necessary. * * @param events Pointer to a pre-allocated event array. * @param dev The slave device that generated an event. * @param type Either DEVCHANGE_POINTER_EVENT and/or DEVCHANGE_KEYBOARD_EVENT * @param num_events The current number of events, returns the number of * events if a DCCE was generated. * @return The updated @events pointer. */ InternalEvent * UpdateFromMaster(InternalEvent *events, DeviceIntPtr dev, int type, int *num_events) { DeviceIntPtr master; master = GetMaster(dev, (type & DEVCHANGE_POINTER_EVENT) ? MASTER_POINTER : MASTER_KEYBOARD); if (master && master->last.slave != dev) { CreateClassesChangedEvent(events, master, dev, type | DEVCHANGE_SLAVE_SWITCH); if (IsPointerDevice(master)) { updateSlaveDeviceCoords(master, dev); master->last.numValuators = dev->last.numValuators; } master->last.slave = dev; (*num_events)++; events++; } return events; } /** * Move the device's pointer to the position given in the valuators. * * @param dev The device whose pointer is to be moved. * @param mask Valuator data for this event. */ static void clipAbsolute(DeviceIntPtr dev, ValuatorMask *mask) { int i; for (i = 0; i < valuator_mask_size(mask); i++) { double val; if (!valuator_mask_isset(mask, i)) continue; val = valuator_mask_get_double(mask, i); clipAxis(dev, i, &val); valuator_mask_set_double(mask, i, val); } } static void add_to_scroll_valuator(DeviceIntPtr dev, ValuatorMask *mask, int valuator, double value) { double v; if (!valuator_mask_fetch_double(mask, valuator, &v)) return; /* protect against scrolling overflow. INT_MAX for double, because * we'll eventually write this as 32.32 fixed point */ if ((value > 0 && v > INT_MAX - value) || (value < 0 && v < INT_MIN - value)) { v = 0; /* reset last.scroll to avoid a button storm */ valuator_mask_set_double(dev->last.scroll, valuator, 0); } else v += value; valuator_mask_set_double(mask, valuator, v); } static void scale_for_device_resolution(DeviceIntPtr dev, ValuatorMask *mask) { double y; ValuatorClassPtr v = dev->valuator; int xrange = v->axes[0].max_value - v->axes[0].min_value + 1; int yrange = v->axes[1].max_value - v->axes[1].min_value + 1; double screen_ratio = 1.0 * screenInfo.width/screenInfo.height; double device_ratio = 1.0 * xrange/yrange; double resolution_ratio = 1.0; double ratio; if (!valuator_mask_fetch_double(mask, 1, &y)) return; if (v->axes[0].resolution != 0 && v->axes[1].resolution != 0) resolution_ratio = 1.0 * v->axes[0].resolution/v->axes[1].resolution; ratio = device_ratio/resolution_ratio/screen_ratio; valuator_mask_set_double(mask, 1, y / ratio); } /** * Move the device's pointer by the values given in @valuators. * * @param dev The device whose pointer is to be moved. * @param[in,out] mask Valuator data for this event, modified in-place. */ static void moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask) { int i; Bool clip_xy = IsMaster(dev) || !IsFloating(dev); ValuatorClassPtr v = dev->valuator; /* for abs devices in relative mode, we've just scaled wrong, since we mapped the device's shape into the screen shape. Undo this. */ if ((flags & POINTER_ABSOLUTE) == 0 && v && v->numAxes > 1 && v->axes[0].min_value < v->axes[0].max_value && v->axes[1].min_value < v->axes[1].max_value) { scale_for_device_resolution(dev, mask); } /* calc other axes, clip, drop back into valuators */ for (i = 0; i < valuator_mask_size(mask); i++) { double val = dev->last.valuators[i]; if (!valuator_mask_isset(mask, i)) continue; add_to_scroll_valuator(dev, mask, i, val); /* x & y need to go over the limits to cross screens if the SD * isn't currently attached; otherwise, clip to screen bounds. */ if (valuator_get_mode(dev, i) == Absolute && ((i != 0 && i != 1) || clip_xy)) { val = valuator_mask_get_double(mask, i); clipAxis(dev, i, &val); valuator_mask_set_double(mask, i, val); } } } /** * Accelerate the data in valuators based on the device's acceleration scheme. * * @param dev The device which's pointer is to be moved. * @param valuators Valuator mask * @param ms Current time. */ static void accelPointer(DeviceIntPtr dev, ValuatorMask *valuators, CARD32 ms) { if (dev->valuator->accelScheme.AccelSchemeProc) dev->valuator->accelScheme.AccelSchemeProc(dev, valuators, ms); } /** * Scale from absolute screen coordinates to absolute coordinates in the * device's coordinate range. * * @param dev The device to scale for. * @param[in, out] mask The mask in desktop/screen coordinates, modified in place * to contain device coordinate range. * @param flags If POINTER_SCREEN is set, mask is in per-screen coordinates. * Otherwise, mask is in desktop coords. */ static void scale_from_screen(DeviceIntPtr dev, ValuatorMask *mask, int flags) { double scaled; ScreenPtr scr = miPointerGetScreen(dev); if (valuator_mask_isset(mask, 0)) { scaled = valuator_mask_get_double(mask, 0); if (flags & POINTER_SCREEN) scaled += scr->x; scaled = rescaleValuatorAxis(scaled, NULL, dev->valuator->axes + 0, screenInfo.x, screenInfo.width); valuator_mask_set_double(mask, 0, scaled); } if (valuator_mask_isset(mask, 1)) { scaled = valuator_mask_get_double(mask, 1); if (flags & POINTER_SCREEN) scaled += scr->y; scaled = rescaleValuatorAxis(scaled, NULL, dev->valuator->axes + 1, screenInfo.y, screenInfo.height); valuator_mask_set_double(mask, 1, scaled); } } /** * Scale from (absolute) device to screen coordinates here, * * The coordinates provided are always absolute. see fill_pointer_events for * information on coordinate systems. * * @param dev The device to be moved. * @param mask Mask of axis values for this event * @param[out] devx x desktop-wide coordinate in device coordinate system * @param[out] devy y desktop-wide coordinate in device coordinate system * @param[out] screenx x coordinate in desktop coordinate system * @param[out] screeny y coordinate in desktop coordinate system */ static ScreenPtr scale_to_desktop(DeviceIntPtr dev, ValuatorMask *mask, double *devx, double *devy, double *screenx, double *screeny) { ScreenPtr scr = miPointerGetScreen(dev); double x, y; BUG_WARN(dev->valuator && dev->valuator->numAxes < 2); if (!dev->valuator || dev->valuator->numAxes < 2) { /* if we have no axes, last.valuators must be in screen coords * anyway */ *devx = *screenx = dev->last.valuators[0]; *devy = *screeny = dev->last.valuators[1]; return scr; } if (valuator_mask_isset(mask, 0)) x = valuator_mask_get_double(mask, 0); else x = dev->last.valuators[0]; if (valuator_mask_isset(mask, 1)) y = valuator_mask_get_double(mask, 1); else y = dev->last.valuators[1]; /* scale x&y to desktop coordinates */ *screenx = rescaleValuatorAxis(x, dev->valuator->axes + 0, NULL, screenInfo.x, screenInfo.width); *screeny = rescaleValuatorAxis(y, dev->valuator->axes + 1, NULL, screenInfo.y, screenInfo.height); *devx = x; *devy = y; return scr; } /** * If we have HW cursors, this actually moves the visible sprite. If not, we * just do all the screen crossing, etc. * * We use the screen coordinates here, call miPointerSetPosition() and then * scale back into device coordinates (if needed). miPSP will change x/y if * the screen was crossed. * * The coordinates provided are always absolute. The parameter mode * specifies whether it was relative or absolute movement that landed us at * those coordinates. see fill_pointer_events for information on coordinate * systems. * * @param dev The device to be moved. * @param mode Movement mode (Absolute or Relative) * @param[out] mask Mask of axis values for this event, returns the * per-screen device coordinates after confinement * @param[in,out] devx x desktop-wide coordinate in device coordinate system * @param[in,out] devy y desktop-wide coordinate in device coordinate system * @param[in,out] screenx x coordinate in desktop coordinate system * @param[in,out] screeny y coordinate in desktop coordinate system * @param[out] nevents Number of barrier events added to events * @param[in,out] events List of events barrier events are added to */ static ScreenPtr positionSprite(DeviceIntPtr dev, int mode, ValuatorMask *mask, double *devx, double *devy, double *screenx, double *screeny, int *nevents, InternalEvent* events) { ScreenPtr scr = miPointerGetScreen(dev); double tmpx, tmpy; if (!dev->valuator || dev->valuator->numAxes < 2) return scr; tmpx = *screenx; tmpy = *screeny; /* miPointerSetPosition takes care of crossing screens for us, as well as * clipping to the current screen. Coordinates returned are in desktop * coord system */ scr = miPointerSetPosition(dev, mode, screenx, screeny, nevents, events); /* If we were constrained, rescale x/y from the screen coordinates so * the device valuators reflect the correct position. For screen * crossing this doesn't matter much, the coords would be 0 or max. */ if (tmpx != *screenx) *devx = rescaleValuatorAxis(*screenx, NULL, dev->valuator->axes + 0, screenInfo.x, screenInfo.width); if (tmpy != *screeny) *devy = rescaleValuatorAxis(*screeny, NULL, dev->valuator->axes + 1, screenInfo.y, screenInfo.height); /* Recalculate the per-screen device coordinates */ if (valuator_mask_isset(mask, 0)) { double x; x = rescaleValuatorAxis(*screenx - scr->x, NULL, dev->valuator->axes + 0, 0, scr->width); valuator_mask_set_double(mask, 0, x); } if (valuator_mask_isset(mask, 1)) { double y; y = rescaleValuatorAxis(*screeny - scr->y, NULL, dev->valuator->axes + 1, 0, scr->height); valuator_mask_set_double(mask, 1, y); } return scr; } /** * Update the motion history for the device and (if appropriate) for its * master device. * @param dev Slave device to update. * @param mask Bit mask of valid valuators to append to history. * @param num Total number of valuators to append to history. * @param ms Current time */ static void updateHistory(DeviceIntPtr dev, ValuatorMask *mask, CARD32 ms) { if (!dev->valuator) return; updateMotionHistory(dev, ms, mask, dev->last.valuators); if (!IsMaster(dev) && !IsFloating(dev)) { DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); updateMotionHistory(master, ms, mask, dev->last.valuators); } } static void queueEventList(DeviceIntPtr device, InternalEvent *events, int nevents) { int i; for (i = 0; i < nevents; i++) mieqEnqueue(device, &events[i]); } static void event_set_root_coordinates(DeviceEvent *event, double x, double y) { event->root_x = trunc(x); event->root_y = trunc(y); event->root_x_frac = x - trunc(x); event->root_y_frac = y - trunc(y); } /** * Generate internal events representing this keyboard event and enqueue * them on the event queue. * * This function is not reentrant. Disable signals before calling. * * @param device The device to generate the event for * @param type Event type, one of KeyPress or KeyRelease * @param keycode Key code of the pressed/released key * */ void QueueKeyboardEvents(DeviceIntPtr device, int type, int keycode) { int nevents; nevents = GetKeyboardEvents(InputEventList, device, type, keycode); queueEventList(device, InputEventList, nevents); } /** * Returns a set of InternalEvents for KeyPress/KeyRelease, optionally * also with valuator events. * * The DDX is responsible for allocating the event list in the first * place via InitEventList(), and for freeing it. * * @return the number of events written into events. */ int GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int key_code) { int num_events = 0; CARD32 ms = 0; DeviceEvent *event; RawDeviceEvent *raw; enum DeviceEventSource source_type = EVENT_SOURCE_NORMAL; #ifdef XSERVER_DTRACE if (XSERVER_INPUT_EVENT_ENABLED()) { XSERVER_INPUT_EVENT(pDev->id, type, key_code, 0, 0, NULL, NULL); } #endif if (type == EnterNotify) { source_type = EVENT_SOURCE_FOCUS; type = KeyPress; } else if (type == LeaveNotify) { source_type = EVENT_SOURCE_FOCUS; type = KeyRelease; } /* refuse events from disabled devices */ if (!pDev->enabled) return 0; if (!events || !pDev->key || !pDev->focus || !pDev->kbdfeed || (type != KeyPress && type != KeyRelease) || (key_code < 8 || key_code > 255)) return 0; num_events = 1; events = UpdateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events); /* Handle core repeating, via press/release/press/release. */ if (type == KeyPress && key_is_down(pDev, key_code, KEY_POSTED)) { /* If autorepeating is disabled either globally or just for that key, * or we have a modifier, don't generate a repeat event. */ if (!pDev->kbdfeed->ctrl.autoRepeat || !key_autorepeats(pDev, key_code) || pDev->key->xkbInfo->desc->map->modmap[key_code]) return 0; } ms = GetTimeInMillis(); if (source_type == EVENT_SOURCE_NORMAL) { raw = &events->raw_event; init_raw(pDev, raw, ms, type, key_code); events++; num_events++; } event = &events->device_event; init_device_event(event, pDev, ms, source_type); event->detail.key = key_code; if (type == KeyPress) { event->type = ET_KeyPress; set_key_down(pDev, key_code, KEY_POSTED); } else if (type == KeyRelease) { event->type = ET_KeyRelease; set_key_up(pDev, key_code, KEY_POSTED); } return num_events; } /** * Initialize an event array large enough for num_events arrays. * This event list is to be passed into GetPointerEvents() and * GetKeyboardEvents(). * * @param num_events Number of elements in list. */ InternalEvent * InitEventList(int num_events) { InternalEvent *events = calloc(num_events, sizeof(InternalEvent)); return events; } /** * Free an event list. * * @param list The list to be freed. * @param num_events Number of elements in list. */ void FreeEventList(InternalEvent *list, int num_events) { free(list); } /** * Transform vector x/y according to matrix m and drop the rounded coords * back into x/y. */ static void transform(struct pixman_f_transform *m, double *x, double *y) { struct pixman_f_vector p = {.v = {*x, *y, 1} }; pixman_f_transform_point(m, &p); *x = p.v[0]; *y = p.v[1]; } static void transformRelative(DeviceIntPtr dev, ValuatorMask *mask) { double x = 0, y = 0; valuator_mask_fetch_double(mask, 0, &x); valuator_mask_fetch_double(mask, 1, &y); transform(&dev->relative_transform, &x, &y); if (x) valuator_mask_set_double(mask, 0, x); else valuator_mask_unset(mask, 0); if (y) valuator_mask_set_double(mask, 1, y); else valuator_mask_unset(mask, 1); } /** * Apply the device's transformation matrix to the valuator mask and replace * the scaled values in mask. This transformation only applies to valuators * 0 and 1, others will be untouched. * * @param dev The device the valuators came from * @param[in,out] mask The valuator mask. */ static void transformAbsolute(DeviceIntPtr dev, ValuatorMask *mask) { double x, y, ox = 0.0, oy = 0.0; int has_x, has_y; has_x = valuator_mask_isset(mask, 0); has_y = valuator_mask_isset(mask, 1); if (!has_x && !has_y) return; if (!has_x || !has_y) { struct pixman_f_transform invert; /* undo transformation from last event */ ox = dev->last.valuators[0]; oy = dev->last.valuators[1]; pixman_f_transform_invert(&invert, &dev->scale_and_transform); transform(&invert, &ox, &oy); } if (has_x) ox = valuator_mask_get_double(mask, 0); if (has_y) oy = valuator_mask_get_double(mask, 1); x = ox; y = oy; transform(&dev->scale_and_transform, &x, &y); if (has_x || ox != x) valuator_mask_set_double(mask, 0, x); if (has_y || oy != y) valuator_mask_set_double(mask, 1, y); } static void storeLastValuators(DeviceIntPtr dev, ValuatorMask *mask, int xaxis, int yaxis, double devx, double devy) { int i; /* store desktop-wide in last.valuators */ if (valuator_mask_isset(mask, xaxis)) dev->last.valuators[0] = devx; if (valuator_mask_isset(mask, yaxis)) dev->last.valuators[1] = devy; for (i = 0; i < valuator_mask_size(mask); i++) { if (i == xaxis || i == yaxis) continue; if (valuator_mask_isset(mask, i)) dev->last.valuators[i] = valuator_mask_get_double(mask, i); } } /** * Generate internal events representing this pointer event and enqueue them * on the event queue. * * This function is not reentrant. Disable signals before calling. * * @param device The device to generate the event for * @param type Event type, one of ButtonPress, ButtonRelease, MotionNotify * @param buttons Button number of the buttons modified. Must be 0 for * MotionNotify * @param flags Event modification flags * @param mask Valuator mask for valuators present for this event. */ void QueuePointerEvents(DeviceIntPtr device, int type, int buttons, int flags, const ValuatorMask *mask) { int nevents; nevents = GetPointerEvents(InputEventList, device, type, buttons, flags, mask); queueEventList(device, InputEventList, nevents); } /** * Helper function for GetPointerEvents, which only generates motion and * raw motion events for the slave device: does not update the master device. * * Should not be called by anyone other than GetPointerEvents. * * We use several different coordinate systems and need to switch between * the three in fill_pointer_events, positionSprite and * miPointerSetPosition. "desktop" refers to the width/height of all * screenInfo.screens[n]->width/height added up. "screen" is ScreenRec, not * output. * * Coordinate systems: * - relative events have a mask_in in relative coordinates, mapped to * pixels. These events are mapped to the current position±delta. * - absolute events have a mask_in in absolute device coordinates in * device-specific range. This range is mapped to the desktop. * - POINTER_SCREEN absolute events (x86WarpCursor) are in screen-relative * screen coordinate range. * - rootx/rooty in events must be be relative to the current screen's * origin (screen coordinate system) * - XI2 valuators must be relative to the current screen's origin. On * the protocol the device min/max range maps to the current screen. * * For screen switching we need to get the desktop coordinates for each * event, then map that to the respective position on each screen and * position the cursor there. * The device's last.valuator[] stores the last position in desktop-wide * coordinates (in device range for slave devices, desktop range for master * devices). * * screen-relative device coordinates requires scaling: A device coordinate * x/y of range [n..m] that maps to positions Sx/Sy on Screen S must be * rescaled to match Sx/Sy for [n..m]. In the simplest example, x of (m/2-1) * is the last coordinate on the first screen and must be rescaled for the * event to be m. XI2 clients that do their own coordinate mapping would * otherwise interpret the position of the device elsewhere to the cursor. * However, this scaling leads to losses: * if we have two ScreenRecs we scale from e.g. [0..44704] (Wacom I4) to * [0..2048[. that gives us 2047.954 as desktop coord, or the per-screen * coordinate 1023.954. Scaling that back into the device coordinate range * gives us 44703. So off by one device unit. It's a bug, but we'll have to * live with it because with all this scaling, we just cannot win. * * @return the number of events written into events. */ static int fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons, CARD32 ms, int flags, const ValuatorMask *mask_in) { int num_events = 0; DeviceEvent *event; RawDeviceEvent *raw = NULL; double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */ int sx = 0, sy = 0; /* for POINTER_SCREEN */ ValuatorMask mask; ScreenPtr scr; int num_barrier_events = 0; switch (type) { case MotionNotify: if (!pDev->valuator) { ErrorF("[dix] motion events from device %d without valuators\n", pDev->id); return 0; } if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) return 0; break; case ButtonPress: case ButtonRelease: if (!pDev->button || !buttons) return 0; if (mask_in && valuator_mask_size(mask_in) > 0 && !pDev->valuator) { ErrorF ("[dix] button event with valuator from device %d without valuators\n", pDev->id); return 0; } break; default: return 0; } valuator_mask_copy(&mask, mask_in); if ((flags & POINTER_NORAW) == 0) { raw = &events->raw_event; events++; num_events++; init_raw(pDev, raw, ms, type, buttons); if (flags & POINTER_EMULATED) raw->flags = XIPointerEmulated; set_raw_valuators(raw, &mask, TRUE, raw->valuators.data_raw); } valuator_mask_drop_unaccelerated(&mask); /* valuators are in driver-native format (rel or abs) */ if (flags & POINTER_ABSOLUTE) { if (flags & (POINTER_SCREEN | POINTER_DESKTOP)) { /* valuators are in screen/desktop coords */ sx = valuator_mask_get(&mask, 0); sy = valuator_mask_get(&mask, 1); scale_from_screen(pDev, &mask, flags); } transformAbsolute(pDev, &mask); clipAbsolute(pDev, &mask); if ((flags & POINTER_NORAW) == 0 && raw) set_raw_valuators(raw, &mask, FALSE, raw->valuators.data); } else { transformRelative(pDev, &mask); if (flags & POINTER_ACCELERATE) accelPointer(pDev, &mask, ms); if ((flags & POINTER_NORAW) == 0 && raw) set_raw_valuators(raw, &mask, FALSE, raw->valuators.data); moveRelative(pDev, flags, &mask); } /* valuators are in device coordinate system in absolute coordinates */ scale_to_desktop(pDev, &mask, &devx, &devy, &screenx, &screeny); /* #53037 XWarpPointer's scaling back and forth between screen and device may leave us with rounding errors. End result is that the pointer doesn't end up on the pixel it should. Avoid this by forcing screenx/screeny back to what the input coordinates were. */ if (flags & POINTER_SCREEN) { scr = miPointerGetScreen(pDev); screenx = sx + scr->x; screeny = sy + scr->y; } scr = positionSprite(pDev, (flags & POINTER_ABSOLUTE) ? Absolute : Relative, &mask, &devx, &devy, &screenx, &screeny, &num_barrier_events, events); num_events += num_barrier_events; events += num_barrier_events; /* screenx, screeny are in desktop coordinates, mask is in device coordinates per-screen (the event data) devx/devy is in device coordinate desktop-wide */ updateHistory(pDev, &mask, ms); clipValuators(pDev, &mask); storeLastValuators(pDev, &mask, 0, 1, devx, devy); /* Update the MD's coordinates, which are always in desktop space. */ if (!IsMaster(pDev) && !IsFloating(pDev)) { DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); master->last.valuators[0] = screenx; master->last.valuators[1] = screeny; } if ((flags & POINTER_RAWONLY) == 0) { num_events++; event = &events->device_event; init_device_event(event, pDev, ms, EVENT_SOURCE_NORMAL); if (type == MotionNotify) { event->type = ET_Motion; event->detail.button = 0; } else { if (type == ButtonPress) { event->type = ET_ButtonPress; set_button_down(pDev, buttons, BUTTON_POSTED); } else if (type == ButtonRelease) { event->type = ET_ButtonRelease; set_button_up(pDev, buttons, BUTTON_POSTED); } event->detail.button = buttons; } /* root_x and root_y must be in per-screen coordinates */ event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y); if (flags & POINTER_EMULATED) event->flags = XIPointerEmulated; set_valuators(pDev, event, &mask); } return num_events; } /** * Generate events for each scroll axis that changed between before/after * for the device. * * @param events The pointer to the event list to fill the events * @param dev The device to generate the events for * @param type The real type of the event * @param axis The axis number to generate events for * @param mask State before this event in absolute coords * @param[in,out] last Last scroll state posted in absolute coords (modified * in-place) * @param ms Current time in ms * @param max_events Max number of events to be generated * @return The number of events generated */ static int emulate_scroll_button_events(InternalEvent *events, DeviceIntPtr dev, int type, int axis, const ValuatorMask *mask, ValuatorMask *last, CARD32 ms, int max_events) { AxisInfoPtr ax; double delta; double incr; int num_events = 0; double total; int b; int flags = 0; if (dev->valuator->axes[axis].scroll.type == SCROLL_TYPE_NONE) return 0; if (!valuator_mask_isset(mask, axis)) return 0; ax = &dev->valuator->axes[axis]; incr = ax->scroll.increment; BUG_WARN_MSG(incr == 0, "for device %s\n", dev->name); if (incr == 0) return 0; if (type != ButtonPress && type != ButtonRelease) flags |= POINTER_EMULATED; if (!valuator_mask_isset(last, axis)) valuator_mask_set_double(last, axis, 0); delta = valuator_mask_get_double(mask, axis) - valuator_mask_get_double(last, axis); total = delta; b = (ax->scroll.type == SCROLL_TYPE_VERTICAL) ? 5 : 7; if ((incr > 0 && delta < 0) || (incr < 0 && delta > 0)) b--; /* we're scrolling up or left → button 4 or 6 */ while (fabs(delta) >= fabs(incr)) { int nev_tmp; if (delta > 0) delta -= fabs(incr); else if (delta < 0) delta += fabs(incr); /* fill_pointer_events() generates four events: one normal and one raw * event for button press and button release. * We may get a bigger scroll delta than we can generate events * for. In that case, we keep decreasing delta, but skip events. */ if (num_events + 4 < max_events) { if (type != ButtonRelease) { nev_tmp = fill_pointer_events(events, dev, ButtonPress, b, ms, flags, NULL); events += nev_tmp; num_events += nev_tmp; } if (type != ButtonPress) { nev_tmp = fill_pointer_events(events, dev, ButtonRelease, b, ms, flags, NULL); events += nev_tmp; num_events += nev_tmp; } } } /* We emulated, update last.scroll */ if (total != delta) { total -= delta; valuator_mask_set_double(last, axis, valuator_mask_get_double(last, axis) + total); } return num_events; } /** * Generate a complete series of InternalEvents (filled into the EventList) * representing pointer motion, or button presses. If the device is a slave * device, also potentially generate a DeviceClassesChangedEvent to update * the master device. * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via InitEventList() and GetMaximumEventsNum(), and for freeing it. * * In the generated events rootX/Y will be in absolute screen coords and * the valuator information in the absolute or relative device coords. * * last.valuators[x] of the device is always in absolute device coords. * last.valuators[x] of the master device is in absolute screen coords. * * master->last.valuators[x] for x > 2 is undefined. */ int GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons, int flags, const ValuatorMask *mask_in) { CARD32 ms = GetTimeInMillis(); int num_events = 0, nev_tmp; ValuatorMask mask; ValuatorMask scroll; int i; int realtype = type; #ifdef XSERVER_DTRACE if (XSERVER_INPUT_EVENT_ENABLED()) { XSERVER_INPUT_EVENT(pDev->id, type, buttons, flags, mask_in ? mask_in->last_bit + 1 : 0, mask_in ? mask_in->mask : NULL, mask_in ? mask_in->valuators : NULL); } #endif BUG_RETURN_VAL(buttons >= MAX_BUTTONS, 0); /* refuse events from disabled devices */ if (!pDev->enabled) return 0; if (!miPointerGetScreen(pDev)) return 0; events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); valuator_mask_copy(&mask, mask_in); /* Turn a scroll button press into a smooth-scrolling event if * necessary. This only needs to cater for the XIScrollFlagPreferred * axis (if more than one scrolling axis is present) */ if (type == ButtonPress) { double adj; int axis; int h_scroll_axis = -1; int v_scroll_axis = -1; if (pDev->valuator) { h_scroll_axis = pDev->valuator->h_scroll_axis; v_scroll_axis = pDev->valuator->v_scroll_axis; } /* Up is negative on valuators, down positive */ switch (buttons) { case 4: adj = -1.0; axis = v_scroll_axis; break; case 5: adj = 1.0; axis = v_scroll_axis; break; case 6: adj = -1.0; axis = h_scroll_axis; break; case 7: adj = 1.0; axis = h_scroll_axis; break; default: adj = 0.0; axis = -1; break; } if (adj != 0.0 && axis != -1) { adj *= pDev->valuator->axes[axis].scroll.increment; if (!valuator_mask_isset(&mask, axis)) valuator_mask_set(&mask, axis, 0); add_to_scroll_valuator(pDev, &mask, axis, adj); type = MotionNotify; buttons = 0; flags |= POINTER_EMULATED; } } /* First fill out the original event set, with smooth-scrolling axes. */ nev_tmp = fill_pointer_events(events, pDev, type, buttons, ms, flags, &mask); events += nev_tmp; num_events += nev_tmp; valuator_mask_zero(&scroll); /* Now turn the smooth-scrolling axes back into emulated button presses * for legacy clients, based on the integer delta between before and now */ for (i = 0; i < valuator_mask_size(&mask); i++) { if ( !pDev->valuator || (i >= pDev->valuator->numAxes)) break; if (!valuator_mask_isset(&mask, i)) continue; valuator_mask_set_double(&scroll, i, pDev->last.valuators[i]); nev_tmp = emulate_scroll_button_events(events, pDev, realtype, i, &scroll, pDev->last.scroll, ms, GetMaximumEventsNum() - num_events); events += nev_tmp; num_events += nev_tmp; } return num_events; } /** * Generate internal events representing this proximity event and enqueue * them on the event queue. * * This function is not reentrant. Disable signals before calling. * * @param device The device to generate the event for * @param type Event type, one of ProximityIn or ProximityOut * @param keycode Key code of the pressed/released key * @param mask Valuator mask for valuators present for this event. * */ void QueueProximityEvents(DeviceIntPtr device, int type, const ValuatorMask *mask) { int nevents; nevents = GetProximityEvents(InputEventList, device, type, mask); queueEventList(device, InputEventList, nevents); } /** * Generate ProximityIn/ProximityOut InternalEvents, accompanied by * valuators. * * The DDX is responsible for allocating the events in the first place via * InitEventList(), and for freeing it. * * @return the number of events written into events. */ int GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const ValuatorMask *mask_in) { int num_events = 1, i; DeviceEvent *event; ValuatorMask mask; #ifdef XSERVER_DTRACE if (XSERVER_INPUT_EVENT_ENABLED()) { XSERVER_INPUT_EVENT(pDev->id, type, 0, 0, mask_in ? mask_in->last_bit + 1 : 0, mask_in ? mask_in->mask : NULL, mask_in ? mask_in->valuators : NULL); } #endif /* refuse events from disabled devices */ if (!pDev->enabled) return 0; /* Sanity checks. */ if ((type != ProximityIn && type != ProximityOut) || !mask_in) return 0; if (!pDev->valuator || !pDev->proximity) return 0; valuator_mask_copy(&mask, mask_in); /* ignore relative axes for proximity. */ for (i = 0; i < valuator_mask_size(&mask); i++) { if (valuator_mask_isset(&mask, i) && valuator_get_mode(pDev, i) == Relative) valuator_mask_unset(&mask, i); } /* FIXME: posting proximity events with relative valuators only results * in an empty event, EventToXI() will fail to convert → no event sent * to client. */ events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); event = &events->device_event; init_device_event(event, pDev, GetTimeInMillis(), EVENT_SOURCE_NORMAL); event->type = (type == ProximityIn) ? ET_ProximityIn : ET_ProximityOut; clipValuators(pDev, &mask); set_valuators(pDev, event, &mask); return num_events; } int GetTouchOwnershipEvents(InternalEvent *events, DeviceIntPtr pDev, TouchPointInfoPtr ti, uint8_t reason, XID resource, uint32_t flags) { TouchClassPtr t = pDev->touch; TouchOwnershipEvent *event; CARD32 ms = GetTimeInMillis(); if (!pDev->enabled || !t || !ti) return 0; event = &events->touch_ownership_event; init_touch_ownership(pDev, event, ms); event->touchid = ti->client_id; event->sourceid = ti->sourceid; event->resource = resource; event->flags = flags; event->reason = reason; return 1; } /** * Generate internal events representing this touch event and enqueue them * on the event queue. * * This function is not reentrant. Disable signals before calling. * * @param device The device to generate the event for * @param type Event type, one of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd * @param touchid Touch point ID * @param flags Event modification flags * @param mask Valuator mask for valuators present for this event. */ void QueueTouchEvents(DeviceIntPtr device, int type, uint32_t ddx_touchid, int flags, const ValuatorMask *mask) { int nevents; nevents = GetTouchEvents(InputEventList, device, ddx_touchid, type, flags, mask); queueEventList(device, InputEventList, nevents); } /** * Get events for a touch. Generates a TouchBegin event if end is not set and * the touch id is not active. Generates a TouchUpdate event if end is not set * and the touch id is active. Generates a TouchEnd event if end is set and the * touch id is active. * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. * * @param[out] events The list of events generated * @param dev The device to generate the events for * @param ddx_touchid The touch ID as assigned by the DDX * @param type XI_TouchBegin, XI_TouchUpdate or XI_TouchEnd * @param flags Event flags * @param mask_in Valuator information for this event */ int GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, uint16_t type, uint32_t flags, const ValuatorMask *mask_in) { ScreenPtr scr; TouchClassPtr t = dev->touch; ValuatorClassPtr v = dev->valuator; DeviceEvent *event; CARD32 ms = GetTimeInMillis(); ValuatorMask mask; double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ double devx = 0.0, devy = 0.0; /* desktop-wide in device coords */ int i; int num_events = 0; RawDeviceEvent *raw; DDXTouchPointInfoPtr ti; int need_rawevent = TRUE; Bool emulate_pointer = FALSE; int client_id = 0; #ifdef XSERVER_DTRACE if (XSERVER_INPUT_EVENT_ENABLED()) { XSERVER_INPUT_EVENT(dev->id, type, ddx_touchid, flags, mask_in ? mask_in->last_bit + 1 : 0, mask_in ? mask_in->mask : NULL, mask_in ? mask_in->valuators : NULL); } #endif if (!dev->enabled || !t || !v) return 0; /* Find and/or create the DDX touch info */ ti = TouchFindByDDXID(dev, ddx_touchid, (type == XI_TouchBegin)); if (!ti) { ErrorFSigSafe("[dix] %s: unable to %s touch point %u\n", dev->name, type == XI_TouchBegin ? "begin" : "find", ddx_touchid); return 0; } client_id = ti->client_id; emulate_pointer = ti->emulate_pointer; if (!IsMaster(dev)) events = UpdateFromMaster(events, dev, DEVCHANGE_POINTER_EVENT, &num_events); valuator_mask_copy(&mask, mask_in); if (need_rawevent) { raw = &events->raw_event; events++; num_events++; init_raw(dev, raw, ms, type, client_id); set_raw_valuators(raw, &mask, TRUE, raw->valuators.data_raw); } event = &events->device_event; num_events++; init_device_event(event, dev, ms, EVENT_SOURCE_NORMAL); switch (type) { case XI_TouchBegin: event->type = ET_TouchBegin; /* If we're starting a touch, we must have x & y coordinates. */ if (!mask_in || !valuator_mask_isset(mask_in, 0) || !valuator_mask_isset(mask_in, 1)) { ErrorFSigSafe("%s: Attempted to start touch without x/y " "(driver bug)\n", dev->name); return 0; } break; case XI_TouchUpdate: event->type = ET_TouchUpdate; if (!mask_in || valuator_mask_num_valuators(mask_in) <= 0) { ErrorFSigSafe("%s: TouchUpdate with no valuators? Driver bug\n", dev->name); } break; case XI_TouchEnd: event->type = ET_TouchEnd; /* We can end the DDX touch here, since we don't use the active * field below */ TouchEndDDXTouch(dev, ti); break; default: return 0; } /* Get our screen event coordinates (root_x/root_y/event_x/event_y): * these come from the touchpoint in Absolute mode, or the sprite in * Relative. */ if (t->mode == XIDirectTouch) { for (i = 0; i < max(valuator_mask_size(&mask), 2); i++) { double val; if (valuator_mask_fetch_double(&mask, i, &val)) valuator_mask_set_double(ti->valuators, i, val); /* If the device doesn't post new X and Y axis values, * use the last values posted. */ else if (i < 2 && valuator_mask_fetch_double(ti->valuators, i, &val)) valuator_mask_set_double(&mask, i, val); } transformAbsolute(dev, &mask); clipAbsolute(dev, &mask); } else { screenx = dev->spriteInfo->sprite->hotPhys.x; screeny = dev->spriteInfo->sprite->hotPhys.y; } if (need_rawevent) set_raw_valuators(raw, &mask, FALSE, raw->valuators.data); scr = dev->spriteInfo->sprite->hotPhys.pScreen; /* Indirect device touch coordinates are not used for cursor positioning. * They are merely informational, and are provided in device coordinates. * The device sprite is used for positioning instead, and it is already * scaled. */ if (t->mode == XIDirectTouch) scr = scale_to_desktop(dev, &mask, &devx, &devy, &screenx, &screeny); if (emulate_pointer) scr = positionSprite(dev, Absolute, &mask, &devx, &devy, &screenx, &screeny, NULL, NULL); /* see fill_pointer_events for coordinate systems */ if (emulate_pointer) updateHistory(dev, &mask, ms); clipValuators(dev, &mask); if (emulate_pointer) storeLastValuators(dev, &mask, 0, 1, devx, devy); /* Update the MD's coordinates, which are always in desktop space. */ if (emulate_pointer && !IsMaster(dev) && !IsFloating(dev)) { DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); master->last.valuators[0] = screenx; master->last.valuators[1] = screeny; } event->root = scr->root->drawable.id; event_set_root_coordinates(event, screenx - scr->x, screeny - scr->y); event->touchid = client_id; event->flags = flags; if (emulate_pointer) { event->flags |= TOUCH_POINTER_EMULATED; event->detail.button = 1; } set_valuators(dev, event, &mask); for (i = 0; i < v->numAxes; i++) { if (valuator_mask_isset(&mask, i)) v->axisVal[i] = valuator_mask_get(&mask, i); } return num_events; } void GetDixTouchEnd(InternalEvent *ievent, DeviceIntPtr dev, TouchPointInfoPtr ti, uint32_t flags) { ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen; DeviceEvent *event = &ievent->device_event; CARD32 ms = GetTimeInMillis(); BUG_WARN(!dev->enabled); init_device_event(event, dev, ms, EVENT_SOURCE_NORMAL); event->sourceid = ti->sourceid; event->type = ET_TouchEnd; event->root = scr->root->drawable.id; /* Get screen event coordinates from the sprite. Is this really the best * we can do? */ event_set_root_coordinates(event, dev->last.valuators[0] - scr->x, dev->last.valuators[1] - scr->y); event->touchid = ti->client_id; event->flags = flags; if (flags & TOUCH_POINTER_EMULATED) { event->flags |= TOUCH_POINTER_EMULATED; event->detail.button = 1; } } /** * Synthesize a single motion event for the core pointer. * * Used in cursor functions, e.g. when cursor confinement changes, and we need * to shift the pointer to get it inside the new bounds. */ void PostSyntheticMotion(DeviceIntPtr pDev, int x, int y, int screen, unsigned long time) { DeviceEvent ev; #ifdef PANORAMIX /* Translate back to the sprite screen since processInputProc will translate from sprite screen to screen 0 upon reentry to the DIX layer. */ if (!noPanoramiXExtension) { x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x; y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y; } #endif memset(&ev, 0, sizeof(DeviceEvent)); init_device_event(&ev, pDev, time, EVENT_SOURCE_NORMAL); ev.root_x = x; ev.root_y = y; ev.type = ET_Motion; ev.time = time; /* FIXME: MD/SD considerations? */ (*pDev->public.processInputProc) ((InternalEvent *) &ev, pDev); } void InitGestureEvent(InternalEvent *ievent, DeviceIntPtr dev, CARD32 ms, int type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle) { ScreenPtr scr = dev->spriteInfo->sprite->hotPhys.pScreen; GestureEvent *event = &ievent->gesture_event; double screenx = 0.0, screeny = 0.0; /* desktop coordinate system */ init_gesture_event(event, dev, ms); screenx = dev->spriteInfo->sprite->hotPhys.x; screeny = dev->spriteInfo->sprite->hotPhys.y; event->type = type; event->root = scr->root->drawable.id; event->root_x = screenx - scr->x; event->root_y = screeny - scr->y; event->num_touches = num_touches; event->flags = flags; event->delta_x = delta_x; event->delta_y = delta_y; event->delta_unaccel_x = delta_unaccel_x; event->delta_unaccel_y = delta_unaccel_y; event->scale = scale; event->delta_angle = delta_angle; } /** * Get events for a pinch or swipe gesture. * * events is not NULL-terminated; the return value is the number of events. * The DDX is responsible for allocating the event structure in the first * place via GetMaximumEventsNum(), and for freeing it. * * @param[out] events The list of events generated * @param dev The device to generate the events for * @param type XI_Gesture{Pinch,Swipe}{Begin,Update,End} * @prama num_touches The number of touches in the gesture * @param flags Event flags * @param delta_x,delta_y accelerated relative motion delta * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta * @param scale (valid only to pinch events) absolute scale of a pinch gesture * @param delta_angle (valid only to pinch events) the ange delta in degrees between the last and * the current pinch event. */ int GetGestureEvents(InternalEvent *events, DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle) { GestureClassPtr g = dev->gesture; CARD32 ms = GetTimeInMillis(); enum EventType evtype; int num_events = 0; uint32_t evflags = 0; if (!dev->enabled || !g) return 0; if (!IsMaster(dev)) events = UpdateFromMaster(events, dev, DEVCHANGE_POINTER_EVENT, &num_events); switch (type) { case XI_GesturePinchBegin: evtype = ET_GesturePinchBegin; break; case XI_GesturePinchUpdate: evtype = ET_GesturePinchUpdate; break; case XI_GesturePinchEnd: evtype = ET_GesturePinchEnd; if (flags & XIGesturePinchEventCancelled) evflags |= GESTURE_CANCELLED; break; case XI_GestureSwipeBegin: evtype = ET_GestureSwipeBegin; break; case XI_GestureSwipeUpdate: evtype = ET_GestureSwipeUpdate; break; case XI_GestureSwipeEnd: evtype = ET_GestureSwipeEnd; if (flags & XIGestureSwipeEventCancelled) evflags |= GESTURE_CANCELLED; break; default: return 0; } InitGestureEvent(events, dev, ms, evtype, num_touches, evflags, delta_x, delta_y, delta_unaccel_x, delta_unaccel_y, scale, delta_angle); num_events++; return num_events; } void QueueGesturePinchEvents(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle) { int nevents; nevents = GetGestureEvents(InputEventList, dev, type, num_touches, flags, delta_x, delta_y, delta_unaccel_x, delta_unaccel_y, scale, delta_angle); queueEventList(dev, InputEventList, nevents); } void QueueGestureSwipeEvents(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y) { int nevents; nevents = GetGestureEvents(InputEventList, dev, type, num_touches, flags, delta_x, delta_y, delta_unaccel_x, delta_unaccel_y, 0.0, 0.0); queueEventList(dev, InputEventList, nevents); } xorg-server-21.1.16/dix/gestures.c0000644000175000017500000002451414757411105012432 /* * Copyright © 2011 Collabra Ltd. * Copyright © 2011 Red Hat, Inc. * Copyright © 2020 Povilas Kanapickas * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include "scrnintstr.h" #include "dixgrabs.h" #include "eventstr.h" #include "exevents.h" #include "exglobals.h" #include "inpututils.h" #include "eventconvert.h" #include "windowstr.h" #include "mi.h" #define GESTURE_HISTORY_SIZE 100 Bool GestureInitGestureInfo(GestureInfoPtr gi) { memset(gi, 0, sizeof(*gi)); gi->sprite.spriteTrace = calloc(32, sizeof(*gi->sprite.spriteTrace)); if (!gi->sprite.spriteTrace) { return FALSE; } gi->sprite.spriteTraceSize = 32; gi->sprite.spriteTrace[0] = screenInfo.screens[0]->root; gi->sprite.hot.pScreen = screenInfo.screens[0]; gi->sprite.hotPhys.pScreen = screenInfo.screens[0]; return TRUE; } /** * Given an event type returns the associated gesture event info. */ GestureInfoPtr GestureFindActiveByEventType(DeviceIntPtr dev, int type) { GestureClassPtr g = dev->gesture; enum EventType type_to_expect = GestureTypeToBegin(type); if (!g || type_to_expect == 0 || !g->gesture.active || g->gesture.type != type_to_expect) { return NULL; } return &g->gesture; } /** * Sets up gesture info for a new gesture. Returns NULL on failure. */ GestureInfoPtr GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev) { GestureClassPtr g = dev->gesture; enum EventType gesture_type = GestureTypeToBegin(ev->any.type); /* Note that we ignore begin events when an existing gesture is active */ if (!g || gesture_type == 0 || g->gesture.active) return NULL; g->gesture.type = gesture_type; if (!GestureBuildSprite(dev, &g->gesture)) return NULL; g->gesture.active = TRUE; g->gesture.num_touches = ev->gesture_event.num_touches; g->gesture.sourceid = ev->gesture_event.sourceid; g->gesture.has_listener = FALSE; return &g->gesture; } /** * Releases a gesture: this must only be called after all events * related to that gesture have been sent and finalised. */ void GestureEndGesture(GestureInfoPtr gi) { if (gi->has_listener) { if (gi->listener.grab) { FreeGrab(gi->listener.grab); gi->listener.grab = NULL; } gi->listener.listener = 0; gi->has_listener = FALSE; } gi->active = FALSE; gi->num_touches = 0; gi->sprite.spriteTraceGood = 0; } /** * Ensure a window trace is present in gi->sprite, constructing one for * Gesture{Pinch,Swipe}Begin events. */ Bool GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi) { SpritePtr sprite = &gi->sprite; if (!sourcedev->spriteInfo->sprite) return FALSE; if (!CopySprite(sourcedev->spriteInfo->sprite, sprite)) return FALSE; if (sprite->spriteTraceGood <= 0) return FALSE; return TRUE; } /** * @returns TRUE if the specified grab or selection is the current owner of * the gesture sequence. */ Bool GestureResourceIsOwner(GestureInfoPtr gi, XID resource) { return (gi->listener.listener == resource); } void GestureAddListener(GestureInfoPtr gi, XID resource, int resource_type, enum GestureListenerType type, WindowPtr window, const GrabPtr grab) { GrabPtr g = NULL; BUG_RETURN(gi->has_listener); /* We need a copy of the grab, not the grab itself since that may be deleted by * a UngrabButton request and leaves us with a dangling pointer */ if (grab) g = AllocGrab(grab); gi->listener.listener = resource; gi->listener.resource_type = resource_type; gi->listener.type = type; gi->listener.window = window; gi->listener.grab = g; gi->has_listener = TRUE; } static void GestureAddGrabListener(DeviceIntPtr dev, GestureInfoPtr gi, GrabPtr grab) { enum GestureListenerType type; /* FIXME: owner_events */ if (grab->grabtype == XI2) { if (xi2mask_isset(grab->xi2mask, dev, XI_GesturePinchBegin) || xi2mask_isset(grab->xi2mask, dev, XI_GestureSwipeBegin)) { type = GESTURE_LISTENER_GRAB; } else type = GESTURE_LISTENER_NONGESTURE_GRAB; } else if (grab->grabtype == XI || grab->grabtype == CORE) { type = GESTURE_LISTENER_NONGESTURE_GRAB; } else { BUG_RETURN_MSG(1, "Unsupported grab type\n"); } /* grab listeners are always RT_NONE since we keep the grab pointer */ GestureAddListener(gi, grab->resource, RT_NONE, type, grab->window, grab); } /** * Add one listener if there is a grab on the given window. */ static void GestureAddPassiveGrabListener(DeviceIntPtr dev, GestureInfoPtr gi, WindowPtr win, InternalEvent *ev) { Bool activate = FALSE; Bool check_core = FALSE; GrabPtr grab = CheckPassiveGrabsOnWindow(win, dev, ev, check_core, activate); if (!grab) return; /* We'll deliver later in gesture-specific code */ ActivateGrabNoDelivery(dev, grab, ev, ev); GestureAddGrabListener(dev, gi, grab); } static void GestureAddRegularListener(DeviceIntPtr dev, GestureInfoPtr gi, WindowPtr win, InternalEvent *ev) { InputClients *iclients = NULL; OtherInputMasks *inputMasks = NULL; uint16_t evtype = GetXI2Type(ev->any.type); int mask; mask = EventIsDeliverable(dev, ev->any.type, win); if (!mask) return; inputMasks = wOtherInputMasks(win); if (mask & EVENT_XI2_MASK) { nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { if (!xi2mask_isset(iclients->xi2mask, dev, evtype)) continue; GestureAddListener(gi, iclients->resource, RT_INPUTCLIENT, GESTURE_LISTENER_REGULAR, win, NULL); return; } } } void GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev) { int i; SpritePtr sprite = &gi->sprite; WindowPtr win; /* Any current grab will consume all gesture events */ if (dev->deviceGrab.grab) { GestureAddGrabListener(dev, gi, dev->deviceGrab.grab); return; } /* Find passive grab that would be activated by this event, if any. If we're handling * ReplayDevice then the search starts from the descendant of the grab window, otherwise * the search starts at the root window. The search ends at deepest child window. */ i = 0; if (syncEvents.playingEvents) { while (i < dev->spriteInfo->sprite->spriteTraceGood) { if (dev->spriteInfo->sprite->spriteTrace[i++] == syncEvents.replayWin) break; } } for (; i < sprite->spriteTraceGood; i++) { win = sprite->spriteTrace[i]; GestureAddPassiveGrabListener(dev, gi, win, ev); if (gi->has_listener) return; } /* Find the first client with an applicable event selection, * going from deepest child window back up to the root window. */ for (i = sprite->spriteTraceGood - 1; i >= 0; i--) { win = sprite->spriteTrace[i]; GestureAddRegularListener(dev, gi, win, ev); if (gi->has_listener) return; } } /* As gesture grabs don't turn into active grabs with their own resources, we * need to walk all the gestures and remove this grab from listener */ void GestureListenerGone(XID resource) { GestureInfoPtr gi; DeviceIntPtr dev; InternalEvent *events = InitEventList(GetMaximumEventsNum()); if (!events) FatalError("GestureListenerGone: couldn't allocate events\n"); for (dev = inputInfo.devices; dev; dev = dev->next) { if (!dev->gesture) continue; gi = &dev->gesture->gesture; if (!gi->active) continue; if (CLIENT_BITS(gi->listener.listener) == resource) GestureEndGesture(gi); } FreeEventList(events, GetMaximumEventsNum()); } /** * End physically active gestures for a device. */ void GestureEndActiveGestures(DeviceIntPtr dev) { GestureClassPtr g = dev->gesture; InternalEvent *eventlist; if (!g) return; eventlist = InitEventList(GetMaximumEventsNum()); input_lock(); mieqProcessInputEvents(); if (g->gesture.active) { int j; int type = GetXI2Type(GestureTypeToEnd(g->gesture.type)); int nevents = GetGestureEvents(eventlist, dev, type, g->gesture.num_touches, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); for (j = 0; j < nevents; j++) mieqProcessDeviceEvent(dev, eventlist + j, NULL); } input_unlock(); FreeEventList(eventlist, GetMaximumEventsNum()); } /** * Generate and deliver a Gesture{Pinch,Swipe}End event to the owner. * * @param dev The device to deliver the event for. * @param gi The gesture record to deliver the event for. */ void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi) { InternalEvent event; /* We're not processing a gesture end for a frozen device */ if (dev->deviceGrab.sync.frozen) return; DeliverDeviceClassesChangedEvent(gi->sourceid, GetTimeInMillis()); InitGestureEvent(&event, dev, GetTimeInMillis(), GestureTypeToEnd(gi->type), 0, 0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); DeliverGestureEventToOwner(dev, gi, &event); } xorg-server-21.1.16/dix/globals.c0000644000175000017500000000772414757411105012220 /************************************************************ 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "windowstr.h" #include "scrnintstr.h" #include "input.h" #include "dixfont.h" #include "dixstruct.h" #include "os.h" ScreenInfo screenInfo; KeybdCtrl defaultKeyboardControl = { DEFAULT_KEYBOARD_CLICK, DEFAULT_BELL, DEFAULT_BELL_PITCH, DEFAULT_BELL_DURATION, DEFAULT_AUTOREPEAT, DEFAULT_AUTOREPEATS, DEFAULT_LEDS, 0 }; PtrCtrl defaultPointerControl = { DEFAULT_PTR_NUMERATOR, DEFAULT_PTR_DENOMINATOR, DEFAULT_PTR_THRESHOLD, 0 }; ClientPtr clients[MAXCLIENTS]; ClientPtr serverClient; int currentMaxClients; /* current size of clients array */ long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; unsigned long globalSerialNumber = 0; unsigned long serverGeneration = 0; /* these next four are initialized in main.c */ CARD32 ScreenSaverTime; CARD32 ScreenSaverInterval; int ScreenSaverBlanking; int ScreenSaverAllowExposures; /* default time of 10 minutes */ CARD32 defaultScreenSaverTime = (10 * (60 * 1000)); CARD32 defaultScreenSaverInterval = (10 * (60 * 1000)); int defaultScreenSaverBlanking = PreferBlanking; int defaultScreenSaverAllowExposures = AllowExposures; #ifdef SCREENSAVER Bool screenSaverSuspended = FALSE; #endif const char *defaultFontPath = COMPILEDDEFAULTFONTPATH; FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in every compilation of dix code */ CursorPtr rootCursor; Bool party_like_its_1989 = FALSE; Bool whiteRoot = FALSE; TimeStamp currentTime; int defaultColorVisualClass = -1; int monitorResolution = 0; const char *display; int displayfd = -1; Bool explicit_display = FALSE; char *ConnectionInfo; xorg-server-21.1.16/dix/glyphcurs.c0000644000175000017500000001423514757411105012610 /************************************************************************ 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. ************************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "misc.h" #include #include "dixfontstr.h" #include "scrnintstr.h" #include "gcstruct.h" #include "resource.h" #include "dix.h" #include "cursorstr.h" #include "opaque.h" #include "servermd.h" /* get the bits out of the font in a portable way. to avoid dealing with padding and such-like, we draw the glyph into a bitmap, then read the bits out with GetImage, which uses server-natural format. since all screens return the same bitmap format, we'll just use the first one we find. the character origin lines up with the hotspot in the cursor metrics. */ int ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned char **ppbits) { ScreenPtr pScreen; GCPtr pGC; xRectangle rect; PixmapPtr ppix; char *pbits; ChangeGCVal gcval[3]; unsigned char char2b[2]; /* turn glyph index into a protocol-format char2b */ char2b[0] = (unsigned char) (ch >> 8); char2b[1] = (unsigned char) (ch & 0xff); pScreen = screenInfo.screens[0]; pbits = calloc(BitmapBytePad(cm->width), cm->height); if (!pbits) return BadAlloc; ppix = (PixmapPtr) (*pScreen->CreatePixmap) (pScreen, cm->width, cm->height, 1, CREATE_PIXMAP_USAGE_SCRATCH); pGC = GetScratchGC(1, pScreen); if (!ppix || !pGC) { if (ppix) (*pScreen->DestroyPixmap) (ppix); if (pGC) FreeScratchGC(pGC); free(pbits); return BadAlloc; } rect.x = 0; rect.y = 0; rect.width = cm->width; rect.height = cm->height; /* fill the pixmap with 0 */ gcval[0].val = GXcopy; gcval[1].val = 0; gcval[2].ptr = (void *) pfont; ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval); ValidateGC((DrawablePtr) ppix, pGC); (*pGC->ops->PolyFillRect) ((DrawablePtr) ppix, pGC, 1, &rect); /* draw the glyph */ gcval[0].val = 1; ChangeGC(NullClient, pGC, GCForeground, gcval); ValidateGC((DrawablePtr) ppix, pGC); (*pGC->ops->PolyText16) ((DrawablePtr) ppix, pGC, cm->xhot, cm->yhot, 1, (unsigned short *) char2b); (*pScreen->GetImage) ((DrawablePtr) ppix, 0, 0, cm->width, cm->height, XYPixmap, 1, pbits); *ppbits = (unsigned char *) pbits; FreeScratchGC(pGC); (*pScreen->DestroyPixmap) (ppix); return Success; } Bool CursorMetricsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm) { CharInfoPtr pci; unsigned long nglyphs; CARD8 chs[2]; FontEncoding encoding; chs[0] = ch >> 8; chs[1] = ch; encoding = (FONTLASTROW(pfont) == 0) ? Linear16Bit : TwoD16Bit; if (encoding == Linear16Bit) { if (ch < pfont->info.firstCol || pfont->info.lastCol < ch) return FALSE; } else { if (chs[0] < pfont->info.firstRow || pfont->info.lastRow < chs[0]) return FALSE; if (chs[1] < pfont->info.firstCol || pfont->info.lastCol < chs[1]) return FALSE; } (*pfont->get_glyphs) (pfont, 1, chs, encoding, &nglyphs, &pci); if (nglyphs == 0) return FALSE; cm->width = pci->metrics.rightSideBearing - pci->metrics.leftSideBearing; cm->height = pci->metrics.descent + pci->metrics.ascent; if (pci->metrics.leftSideBearing > 0) { cm->width += pci->metrics.leftSideBearing; cm->xhot = 0; } else { cm->xhot = -pci->metrics.leftSideBearing; if (pci->metrics.rightSideBearing < 0) cm->width -= pci->metrics.rightSideBearing; } if (pci->metrics.ascent < 0) { cm->height -= pci->metrics.ascent; cm->yhot = 0; } else { cm->yhot = pci->metrics.ascent; if (pci->metrics.descent < 0) cm->height -= pci->metrics.descent; } return TRUE; } xorg-server-21.1.16/dix/grabs.c0000644000175000017500000005511514757411105011670 /* 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include #include #include "windowstr.h" #include "inputstr.h" #include "cursorstr.h" #include "dixgrabs.h" #include "xace.h" #include "exevents.h" #include "exglobals.h" #include "inpututils.h" #include "client.h" #define BITMASK(i) (((Mask)1) << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) #define MASKWORD(buf, i) buf[MASKIDX(i)] #define BITSET(buf, i) MASKWORD(buf, i) |= BITMASK(i) #define BITCLEAR(buf, i) MASKWORD(buf, i) &= ~BITMASK(i) #define GETBIT(buf, i) (MASKWORD(buf, i) & BITMASK(i)) void PrintDeviceGrabInfo(DeviceIntPtr dev) { ClientPtr client; LocalClientCredRec *lcc; int i, j; GrabInfoPtr devGrab = &dev->deviceGrab; GrabPtr grab = devGrab->grab; Bool clientIdPrinted = FALSE; ErrorF("Active grab 0x%lx (%s) on device '%s' (%d):\n", (unsigned long) grab->resource, (grab->grabtype == XI2) ? "xi2" : ((grab->grabtype == CORE) ? "core" : "xi1"), dev->name, dev->id); client = clients[CLIENT_ID(grab->resource)]; if (client) { pid_t clientpid = GetClientPid(client); const char *cmdname = GetClientCmdName(client); const char *cmdargs = GetClientCmdArgs(client); if ((clientpid > 0) && (cmdname != NULL)) { ErrorF(" client pid %ld %s %s\n", (long) clientpid, cmdname, cmdargs ? cmdargs : ""); clientIdPrinted = TRUE; } else if (GetLocalClientCreds(client, &lcc) != -1) { ErrorF(" client pid %ld uid %ld gid %ld\n", (lcc->fieldsSet & LCC_PID_SET) ? (long) lcc->pid : 0, (lcc->fieldsSet & LCC_UID_SET) ? (long) lcc->euid : 0, (lcc->fieldsSet & LCC_GID_SET) ? (long) lcc->egid : 0); FreeLocalClientCreds(lcc); clientIdPrinted = TRUE; } } if (!clientIdPrinted) { ErrorF(" (no client information available for client %d)\n", CLIENT_ID(grab->resource)); } /* XXX is this even correct? */ if (devGrab->sync.other) ErrorF(" grab ID 0x%lx from paired device\n", (unsigned long) devGrab->sync.other->resource); ErrorF(" at %ld (from %s grab)%s (device %s, state %d)\n", (unsigned long) devGrab->grabTime.milliseconds, devGrab->fromPassiveGrab ? "passive" : "active", devGrab->implicitGrab ? " (implicit)" : "", devGrab->sync.frozen ? "frozen" : "thawed", devGrab->sync.state); if (grab->grabtype == CORE) { ErrorF(" core event mask 0x%lx\n", (unsigned long) grab->eventMask); } else if (grab->grabtype == XI) { ErrorF(" xi1 event mask 0x%lx\n", devGrab->implicitGrab ? (unsigned long) grab->deviceMask : (unsigned long) grab->eventMask); } else if (grab->grabtype == XI2) { for (i = 0; i < xi2mask_num_masks(grab->xi2mask); i++) { const unsigned char *mask; int print; print = 0; for (j = 0; j < XI2MASKSIZE; j++) { mask = xi2mask_get_one_mask(grab->xi2mask, i); if (mask[j]) { print = 1; break; } } if (!print) continue; ErrorF(" xi2 event mask for device %d: 0x", dev->id); for (j = 0; j < xi2mask_mask_size(grab->xi2mask); j++) ErrorF("%x", mask[j]); ErrorF("\n"); } } if (devGrab->fromPassiveGrab) { ErrorF(" passive grab type %d, detail 0x%x, " "activating key %d\n", grab->type, grab->detail.exact, devGrab->activatingKey); } ErrorF(" owner-events %s, kb %d ptr %d, confine %lx, cursor 0x%lx\n", grab->ownerEvents ? "true" : "false", grab->keyboardMode, grab->pointerMode, grab->confineTo ? (unsigned long) grab->confineTo->drawable.id : 0, grab->cursor ? (unsigned long) grab->cursor->id : 0); } void UngrabAllDevices(Bool kill_client) { DeviceIntPtr dev; ClientPtr client; ErrorF("Ungrabbing all devices%s; grabs listed below:\n", kill_client ? " and killing their owners" : ""); for (dev = inputInfo.devices; dev; dev = dev->next) { if (!dev->deviceGrab.grab) continue; PrintDeviceGrabInfo(dev); client = clients[CLIENT_ID(dev->deviceGrab.grab->resource)]; if (!kill_client || !client || client->clientGone) dev->deviceGrab.DeactivateGrab(dev); if (kill_client) CloseDownClient(client); } ErrorF("End list of ungrabbed devices\n"); } GrabPtr AllocGrab(const GrabPtr src) { GrabPtr grab = calloc(1, sizeof(GrabRec)); if (grab) { grab->xi2mask = xi2mask_new(); if (!grab->xi2mask) { free(grab); grab = NULL; } else if (src && !CopyGrab(grab, src)) { free(grab->xi2mask); free(grab); grab = NULL; } } return grab; } GrabPtr CreateGrab(int client, DeviceIntPtr device, DeviceIntPtr modDevice, WindowPtr window, enum InputLevel grabtype, GrabMask *mask, GrabParameters *param, int type, KeyCode keybut, /* key or button */ WindowPtr confineTo, CursorPtr cursor) { GrabPtr grab; grab = AllocGrab(NULL); if (!grab) return (GrabPtr) NULL; grab->resource = FakeClientID(client); grab->device = device; grab->window = window; if (grabtype == CORE || grabtype == XI) grab->eventMask = mask->core; /* same for XI */ else grab->eventMask = 0; grab->deviceMask = 0; grab->ownerEvents = param->ownerEvents; grab->keyboardMode = param->this_device_mode; grab->pointerMode = param->other_devices_mode; grab->modifiersDetail.exact = param->modifiers; grab->modifiersDetail.pMask = NULL; grab->modifierDevice = modDevice; grab->type = type; grab->grabtype = grabtype; grab->detail.exact = keybut; grab->detail.pMask = NULL; grab->confineTo = confineTo; grab->cursor = RefCursor(cursor); grab->next = NULL; if (grabtype == XI2) xi2mask_merge(grab->xi2mask, mask->xi2mask); return grab; } void FreeGrab(GrabPtr pGrab) { BUG_RETURN(!pGrab); free(pGrab->modifiersDetail.pMask); free(pGrab->detail.pMask); if (pGrab->cursor) FreeCursor(pGrab->cursor, (Cursor) 0); xi2mask_free(&pGrab->xi2mask); free(pGrab); } Bool CopyGrab(GrabPtr dst, const GrabPtr src) { Mask *mdetails_mask = NULL; Mask *details_mask = NULL; XI2Mask *xi2mask; if (src->modifiersDetail.pMask) { int len = MasksPerDetailMask * sizeof(Mask); mdetails_mask = malloc(len); if (!mdetails_mask) return FALSE; memcpy(mdetails_mask, src->modifiersDetail.pMask, len); } if (src->detail.pMask) { int len = MasksPerDetailMask * sizeof(Mask); details_mask = malloc(len); if (!details_mask) { free(mdetails_mask); return FALSE; } memcpy(details_mask, src->detail.pMask, len); } if (!dst->xi2mask) { xi2mask = xi2mask_new(); if (!xi2mask) { free(mdetails_mask); free(details_mask); return FALSE; } } else { xi2mask = dst->xi2mask; xi2mask_zero(xi2mask, -1); } *dst = *src; dst->modifiersDetail.pMask = mdetails_mask; dst->detail.pMask = details_mask; dst->xi2mask = xi2mask; dst->cursor = RefCursor(src->cursor); xi2mask_merge(dst->xi2mask, src->xi2mask); return TRUE; } int DeletePassiveGrab(void *value, XID id) { GrabPtr g, prev; GrabPtr pGrab = (GrabPtr) value; /* it is OK if the grab isn't found */ prev = 0; for (g = (wPassiveGrabs(pGrab->window)); g; g = g->next) { if (pGrab == g) { if (prev) prev->next = g->next; else if (!(pGrab->window->optional->passiveGrabs = g->next)) CheckWindowOptionalNeed(pGrab->window); break; } prev = g; } FreeGrab(pGrab); return Success; } static Mask * DeleteDetailFromMask(Mask *pDetailMask, unsigned int detail) { Mask *mask; int i; mask = malloc(sizeof(Mask) * MasksPerDetailMask); if (mask) { if (pDetailMask) for (i = 0; i < MasksPerDetailMask; i++) mask[i] = pDetailMask[i]; else for (i = 0; i < MasksPerDetailMask; i++) mask[i] = ~0L; BITCLEAR(mask, detail); } return mask; } static Bool IsInGrabMask(DetailRec firstDetail, DetailRec secondDetail, unsigned int exception) { if (firstDetail.exact == exception) { if (firstDetail.pMask == NULL) return TRUE; /* (at present) never called with two non-null pMasks */ if (secondDetail.exact == exception) return FALSE; if (GETBIT(firstDetail.pMask, secondDetail.exact)) return TRUE; } return FALSE; } static Bool IdenticalExactDetails(unsigned int firstExact, unsigned int secondExact, unsigned int exception) { if ((firstExact == exception) || (secondExact == exception)) return FALSE; if (firstExact == secondExact) return TRUE; return FALSE; } static Bool DetailSupersedesSecond(DetailRec firstDetail, DetailRec secondDetail, unsigned int exception) { if (IsInGrabMask(firstDetail, secondDetail, exception)) return TRUE; if (IdenticalExactDetails(firstDetail.exact, secondDetail.exact, exception)) return TRUE; return FALSE; } static Bool GrabSupersedesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab) { unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; if (!DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, any_modifier)) return FALSE; if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, (unsigned int) AnyKey)) return TRUE; return FALSE; } /** * Compares two grabs and returns TRUE if the first grab matches the second * grab. * * A match is when * - the devices set for the grab are equal (this is optional). * - the event types for both grabs are equal. * - XXX * * @param ignoreDevice TRUE if the device settings on the grabs are to be * ignored. * @return TRUE if the grabs match or FALSE otherwise. */ Bool GrabMatchesSecond(GrabPtr pFirstGrab, GrabPtr pSecondGrab, Bool ignoreDevice) { unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; if (pFirstGrab->grabtype != pSecondGrab->grabtype) return FALSE; if (pFirstGrab->grabtype == XI2) { if (pFirstGrab->device == inputInfo.all_devices || pSecondGrab->device == inputInfo.all_devices) { /* do nothing */ } else if (pFirstGrab->device == inputInfo.all_master_devices) { if (pSecondGrab->device != inputInfo.all_master_devices && !IsMaster(pSecondGrab->device)) return FALSE; } else if (pSecondGrab->device == inputInfo.all_master_devices) { if (pFirstGrab->device != inputInfo.all_master_devices && !IsMaster(pFirstGrab->device)) return FALSE; } else if (pSecondGrab->device != pFirstGrab->device) return FALSE; } else if (!ignoreDevice && ((pFirstGrab->device != pSecondGrab->device) || (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice))) return FALSE; if (pFirstGrab->type != pSecondGrab->type) return FALSE; if (GrabSupersedesSecond(pFirstGrab, pSecondGrab) || GrabSupersedesSecond(pSecondGrab, pFirstGrab)) return TRUE; if (DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, (unsigned int) AnyKey) && DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, any_modifier)) return TRUE; if (DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, (unsigned int) AnyKey) && DetailSupersedesSecond(pSecondGrab->modifiersDetail, pFirstGrab->modifiersDetail, any_modifier)) return TRUE; return FALSE; } static Bool GrabsAreIdentical(GrabPtr pFirstGrab, GrabPtr pSecondGrab) { unsigned int any_modifier = (pFirstGrab->grabtype == XI2) ? (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; if (pFirstGrab->grabtype != pSecondGrab->grabtype) return FALSE; if (pFirstGrab->device != pSecondGrab->device || (pFirstGrab->modifierDevice != pSecondGrab->modifierDevice) || (pFirstGrab->type != pSecondGrab->type)) return FALSE; if (!(DetailSupersedesSecond(pFirstGrab->detail, pSecondGrab->detail, (unsigned int) AnyKey) && DetailSupersedesSecond(pSecondGrab->detail, pFirstGrab->detail, (unsigned int) AnyKey))) return FALSE; if (!(DetailSupersedesSecond(pFirstGrab->modifiersDetail, pSecondGrab->modifiersDetail, any_modifier) && DetailSupersedesSecond(pSecondGrab->modifiersDetail, pFirstGrab->modifiersDetail, any_modifier))) return FALSE; return TRUE; } /** * Prepend the new grab to the list of passive grabs on the window. * Any previously existing grab that matches the new grab will be removed. * Adding a new grab that would override another client's grab will result in * a BadAccess. * * @return Success or X error code on failure. */ int AddPassiveGrabToList(ClientPtr client, GrabPtr pGrab) { GrabPtr grab; Mask access_mode = DixGrabAccess; int rc; for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { if (GrabMatchesSecond(pGrab, grab, (pGrab->grabtype == CORE))) { if (CLIENT_BITS(pGrab->resource) != CLIENT_BITS(grab->resource)) { FreeGrab(pGrab); return BadAccess; } } } if (pGrab->keyboardMode == GrabModeSync || pGrab->pointerMode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, pGrab->device, access_mode); if (rc != Success) return rc; /* Remove all grabs that match the new one exactly */ for (grab = wPassiveGrabs(pGrab->window); grab; grab = grab->next) { if (GrabsAreIdentical(pGrab, grab)) { DeletePassiveGrabFromList(grab); break; } } if (!pGrab->window->optional && !MakeWindowOptional(pGrab->window)) { FreeGrab(pGrab); return BadAlloc; } pGrab->next = pGrab->window->optional->passiveGrabs; pGrab->window->optional->passiveGrabs = pGrab; if (AddResource(pGrab->resource, RT_PASSIVEGRAB, (void *) pGrab)) return Success; return BadAlloc; } /* the following is kinda complicated, because we need to be able to back out * if any allocation fails */ Bool DeletePassiveGrabFromList(GrabPtr pMinuendGrab) { GrabPtr grab; GrabPtr *deletes, *adds; Mask ***updates, **details; int i, ndels, nadds, nups; Bool ok; unsigned int any_modifier; unsigned int any_key; #define UPDATE(mask,exact) \ if (!(details[nups] = DeleteDetailFromMask(mask, exact))) \ ok = FALSE; \ else \ updates[nups++] = &(mask) i = 0; for (grab = wPassiveGrabs(pMinuendGrab->window); grab; grab = grab->next) i++; if (!i) return TRUE; deletes = xallocarray(i, sizeof(GrabPtr)); adds = xallocarray(i, sizeof(GrabPtr)); updates = xallocarray(i, sizeof(Mask **)); details = xallocarray(i, sizeof(Mask *)); if (!deletes || !adds || !updates || !details) { free(details); free(updates); free(adds); free(deletes); return FALSE; } any_modifier = (pMinuendGrab->grabtype == XI2) ? (unsigned int) XIAnyModifier : (unsigned int) AnyModifier; any_key = (pMinuendGrab->grabtype == XI2) ? (unsigned int) XIAnyKeycode : (unsigned int) AnyKey; ndels = nadds = nups = 0; ok = TRUE; for (grab = wPassiveGrabs(pMinuendGrab->window); grab && ok; grab = grab->next) { if ((CLIENT_BITS(grab->resource) != CLIENT_BITS(pMinuendGrab->resource)) || !GrabMatchesSecond(grab, pMinuendGrab, (grab->grabtype == CORE))) continue; if (GrabSupersedesSecond(pMinuendGrab, grab)) { deletes[ndels++] = grab; } else if ((grab->detail.exact == any_key) && (grab->modifiersDetail.exact != any_modifier)) { UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); } else if ((grab->modifiersDetail.exact == any_modifier) && (grab->detail.exact != any_key)) { UPDATE(grab->modifiersDetail.pMask, pMinuendGrab->modifiersDetail.exact); } else if ((pMinuendGrab->detail.exact != any_key) && (pMinuendGrab->modifiersDetail.exact != any_modifier)) { GrabPtr pNewGrab; GrabParameters param; UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); memset(¶m, 0, sizeof(param)); param.ownerEvents = grab->ownerEvents; param.this_device_mode = grab->keyboardMode; param.other_devices_mode = grab->pointerMode; param.modifiers = any_modifier; pNewGrab = CreateGrab(CLIENT_ID(grab->resource), grab->device, grab->modifierDevice, grab->window, grab->grabtype, (GrabMask *) &grab->eventMask, ¶m, (int) grab->type, pMinuendGrab->detail.exact, grab->confineTo, grab->cursor); if (!pNewGrab) ok = FALSE; else if (!(pNewGrab->modifiersDetail.pMask = DeleteDetailFromMask(grab->modifiersDetail.pMask, pMinuendGrab->modifiersDetail. exact)) || (!pNewGrab->window->optional && !MakeWindowOptional(pNewGrab->window))) { FreeGrab(pNewGrab); ok = FALSE; } else if (!AddResource(pNewGrab->resource, RT_PASSIVEGRAB, (void *) pNewGrab)) ok = FALSE; else adds[nadds++] = pNewGrab; } else if (pMinuendGrab->detail.exact == any_key) { UPDATE(grab->modifiersDetail.pMask, pMinuendGrab->modifiersDetail.exact); } else { UPDATE(grab->detail.pMask, pMinuendGrab->detail.exact); } } if (!ok) { for (i = 0; i < nadds; i++) FreeResource(adds[i]->resource, RT_NONE); for (i = 0; i < nups; i++) free(details[i]); } else { for (i = 0; i < ndels; i++) FreeResource(deletes[i]->resource, RT_NONE); for (i = 0; i < nadds; i++) { grab = adds[i]; grab->next = grab->window->optional->passiveGrabs; grab->window->optional->passiveGrabs = grab; } for (i = 0; i < nups; i++) { free(*updates[i]); *updates[i] = details[i]; } } free(details); free(updates); free(adds); free(deletes); return ok; #undef UPDATE } Bool GrabIsPointerGrab(GrabPtr grab) { return (grab->type == ButtonPress || grab->type == DeviceButtonPress || grab->type == XI_ButtonPress); } Bool GrabIsKeyboardGrab(GrabPtr grab) { return (grab->type == KeyPress || grab->type == DeviceKeyPress || grab->type == XI_KeyPress); } Bool GrabIsGestureGrab(GrabPtr grab) { return (grab->type == XI_GesturePinchBegin || grab->type == XI_GestureSwipeBegin); } xorg-server-21.1.16/dix/initatoms.c0000644000175000017500000001261214757411105012574 /* THIS IS A GENERATED FILE * * Do not change! Changing this file implies a protocol change! */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "dix.h" void MakePredeclaredAtoms(void) { if (MakeAtom("PRIMARY", 7, 1) != XA_PRIMARY) AtomError(); if (MakeAtom("SECONDARY", 9, 1) != XA_SECONDARY) AtomError(); if (MakeAtom("ARC", 3, 1) != XA_ARC) AtomError(); if (MakeAtom("ATOM", 4, 1) != XA_ATOM) AtomError(); if (MakeAtom("BITMAP", 6, 1) != XA_BITMAP) AtomError(); if (MakeAtom("CARDINAL", 8, 1) != XA_CARDINAL) AtomError(); if (MakeAtom("COLORMAP", 8, 1) != XA_COLORMAP) AtomError(); if (MakeAtom("CURSOR", 6, 1) != XA_CURSOR) AtomError(); if (MakeAtom("CUT_BUFFER0", 11, 1) != XA_CUT_BUFFER0) AtomError(); if (MakeAtom("CUT_BUFFER1", 11, 1) != XA_CUT_BUFFER1) AtomError(); if (MakeAtom("CUT_BUFFER2", 11, 1) != XA_CUT_BUFFER2) AtomError(); if (MakeAtom("CUT_BUFFER3", 11, 1) != XA_CUT_BUFFER3) AtomError(); if (MakeAtom("CUT_BUFFER4", 11, 1) != XA_CUT_BUFFER4) AtomError(); if (MakeAtom("CUT_BUFFER5", 11, 1) != XA_CUT_BUFFER5) AtomError(); if (MakeAtom("CUT_BUFFER6", 11, 1) != XA_CUT_BUFFER6) AtomError(); if (MakeAtom("CUT_BUFFER7", 11, 1) != XA_CUT_BUFFER7) AtomError(); if (MakeAtom("DRAWABLE", 8, 1) != XA_DRAWABLE) AtomError(); if (MakeAtom("FONT", 4, 1) != XA_FONT) AtomError(); if (MakeAtom("INTEGER", 7, 1) != XA_INTEGER) AtomError(); if (MakeAtom("PIXMAP", 6, 1) != XA_PIXMAP) AtomError(); if (MakeAtom("POINT", 5, 1) != XA_POINT) AtomError(); if (MakeAtom("RECTANGLE", 9, 1) != XA_RECTANGLE) AtomError(); if (MakeAtom("RESOURCE_MANAGER", 16, 1) != XA_RESOURCE_MANAGER) AtomError(); if (MakeAtom("RGB_COLOR_MAP", 13, 1) != XA_RGB_COLOR_MAP) AtomError(); if (MakeAtom("RGB_BEST_MAP", 12, 1) != XA_RGB_BEST_MAP) AtomError(); if (MakeAtom("RGB_BLUE_MAP", 12, 1) != XA_RGB_BLUE_MAP) AtomError(); if (MakeAtom("RGB_DEFAULT_MAP", 15, 1) != XA_RGB_DEFAULT_MAP) AtomError(); if (MakeAtom("RGB_GRAY_MAP", 12, 1) != XA_RGB_GRAY_MAP) AtomError(); if (MakeAtom("RGB_GREEN_MAP", 13, 1) != XA_RGB_GREEN_MAP) AtomError(); if (MakeAtom("RGB_RED_MAP", 11, 1) != XA_RGB_RED_MAP) AtomError(); if (MakeAtom("STRING", 6, 1) != XA_STRING) AtomError(); if (MakeAtom("VISUALID", 8, 1) != XA_VISUALID) AtomError(); if (MakeAtom("WINDOW", 6, 1) != XA_WINDOW) AtomError(); if (MakeAtom("WM_COMMAND", 10, 1) != XA_WM_COMMAND) AtomError(); if (MakeAtom("WM_HINTS", 8, 1) != XA_WM_HINTS) AtomError(); if (MakeAtom("WM_CLIENT_MACHINE", 17, 1) != XA_WM_CLIENT_MACHINE) AtomError(); if (MakeAtom("WM_ICON_NAME", 12, 1) != XA_WM_ICON_NAME) AtomError(); if (MakeAtom("WM_ICON_SIZE", 12, 1) != XA_WM_ICON_SIZE) AtomError(); if (MakeAtom("WM_NAME", 7, 1) != XA_WM_NAME) AtomError(); if (MakeAtom("WM_NORMAL_HINTS", 15, 1) != XA_WM_NORMAL_HINTS) AtomError(); if (MakeAtom("WM_SIZE_HINTS", 13, 1) != XA_WM_SIZE_HINTS) AtomError(); if (MakeAtom("WM_ZOOM_HINTS", 13, 1) != XA_WM_ZOOM_HINTS) AtomError(); if (MakeAtom("MIN_SPACE", 9, 1) != XA_MIN_SPACE) AtomError(); if (MakeAtom("NORM_SPACE", 10, 1) != XA_NORM_SPACE) AtomError(); if (MakeAtom("MAX_SPACE", 9, 1) != XA_MAX_SPACE) AtomError(); if (MakeAtom("END_SPACE", 9, 1) != XA_END_SPACE) AtomError(); if (MakeAtom("SUPERSCRIPT_X", 13, 1) != XA_SUPERSCRIPT_X) AtomError(); if (MakeAtom("SUPERSCRIPT_Y", 13, 1) != XA_SUPERSCRIPT_Y) AtomError(); if (MakeAtom("SUBSCRIPT_X", 11, 1) != XA_SUBSCRIPT_X) AtomError(); if (MakeAtom("SUBSCRIPT_Y", 11, 1) != XA_SUBSCRIPT_Y) AtomError(); if (MakeAtom("UNDERLINE_POSITION", 18, 1) != XA_UNDERLINE_POSITION) AtomError(); if (MakeAtom("UNDERLINE_THICKNESS", 19, 1) != XA_UNDERLINE_THICKNESS) AtomError(); if (MakeAtom("STRIKEOUT_ASCENT", 16, 1) != XA_STRIKEOUT_ASCENT) AtomError(); if (MakeAtom("STRIKEOUT_DESCENT", 17, 1) != XA_STRIKEOUT_DESCENT) AtomError(); if (MakeAtom("ITALIC_ANGLE", 12, 1) != XA_ITALIC_ANGLE) AtomError(); if (MakeAtom("X_HEIGHT", 8, 1) != XA_X_HEIGHT) AtomError(); if (MakeAtom("QUAD_WIDTH", 10, 1) != XA_QUAD_WIDTH) AtomError(); if (MakeAtom("WEIGHT", 6, 1) != XA_WEIGHT) AtomError(); if (MakeAtom("POINT_SIZE", 10, 1) != XA_POINT_SIZE) AtomError(); if (MakeAtom("RESOLUTION", 10, 1) != XA_RESOLUTION) AtomError(); if (MakeAtom("COPYRIGHT", 9, 1) != XA_COPYRIGHT) AtomError(); if (MakeAtom("NOTICE", 6, 1) != XA_NOTICE) AtomError(); if (MakeAtom("FONT_NAME", 9, 1) != XA_FONT_NAME) AtomError(); if (MakeAtom("FAMILY_NAME", 11, 1) != XA_FAMILY_NAME) AtomError(); if (MakeAtom("FULL_NAME", 9, 1) != XA_FULL_NAME) AtomError(); if (MakeAtom("CAP_HEIGHT", 10, 1) != XA_CAP_HEIGHT) AtomError(); if (MakeAtom("WM_CLASS", 8, 1) != XA_WM_CLASS) AtomError(); if (MakeAtom("WM_TRANSIENT_FOR", 16, 1) != XA_WM_TRANSIENT_FOR) AtomError(); } xorg-server-21.1.16/dix/inpututils.c0000644000175000017500000010042314757411105013003 /* * Copyright © 2008 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include "exevents.h" #include "exglobals.h" #include "misc.h" #include "input.h" #include "inputstr.h" #include "xace.h" #include "xkbsrv.h" #include "xkbstr.h" #include "inpututils.h" #include "eventstr.h" #include "scrnintstr.h" #include "optionstr.h" /* Check if a button map change is okay with the device. * Returns -1 for BadValue, as it collides with MappingBusy. */ static int check_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, CARD32 *errval_out, ClientPtr client) { int i, ret; if (!dev || !dev->button) { client->errorValue = (dev) ? dev->id : 0; return BadDevice; } ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (ret != Success) { client->errorValue = dev->id; return ret; } for (i = 0; i < len; i++) { if (dev->button->map[i + 1] != map[i] && button_is_down(dev, i + 1, BUTTON_PROCESSED)) return MappingBusy; } return Success; } static void do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) { int i; xEvent core_mn = { .u.u.type = MappingNotify }; deviceMappingNotify xi_mn; /* The map in ButtonClassRec refers to button numbers, whereas the * protocol is zero-indexed. Sigh. */ memcpy(&(dev->button->map[1]), map, len); core_mn.u.mappingNotify.request = MappingPointer; /* 0 is the server client. */ for (i = 1; i < currentMaxClients; i++) { /* Don't send irrelevant events to naïve clients. */ if (!clients[i] || clients[i]->clientState != ClientStateRunning) continue; if (!XIShouldNotify(clients[i], dev)) continue; WriteEventsToClient(clients[i], 1, &core_mn); } xi_mn = (deviceMappingNotify) { .type = DeviceMappingNotify, .request = MappingPointer, .deviceid = dev->id, .time = GetTimeInMillis() }; SendEventToAllWindows(dev, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1); } /* * Does what it says on the box, both for core and Xi. * * Faithfully reports any errors encountered while trying to apply the map * to the requested device, faithfully ignores any errors encountered while * trying to apply the map to its master/slaves. */ int ApplyPointerMapping(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) { int ret; /* If we can't perform the change on the requested device, bail out. */ ret = check_butmap_change(dev, map, len, &client->errorValue, client); if (ret != Success) return ret; do_butmap_change(dev, map, len, client); return Success; } /* Check if a modifier map change is okay with the device. Negative return * values mean BadValue, positive values mean Mapping{Busy,Failed}, 0 is * Success / MappingSuccess. */ static int check_modmap_change(ClientPtr client, DeviceIntPtr dev, KeyCode *modmap) { int ret, i; XkbDescPtr xkb; ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (ret != Success) return ret; if (!dev->key) return BadMatch; xkb = dev->key->xkbInfo->desc; for (i = 0; i < MAP_LENGTH; i++) { if (!modmap[i]) continue; /* Check that all the new modifiers fall within the advertised * keycode range. */ if (i < xkb->min_key_code || i > xkb->max_key_code) { client->errorValue = i; return -1; } /* None of the new modifiers may be down while we change the * map. */ if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { client->errorValue = i; return MappingBusy; } } /* None of the old modifiers may be down while we change the map, * either. */ for (i = xkb->min_key_code; i < xkb->max_key_code; i++) { if (!xkb->map->modmap[i]) continue; if (key_is_down(dev, i, KEY_POSTED | KEY_PROCESSED)) { client->errorValue = i; return MappingBusy; } } return Success; } static int check_modmap_change_slave(ClientPtr client, DeviceIntPtr master, DeviceIntPtr slave, CARD8 *modmap) { XkbDescPtr master_xkb, slave_xkb; int i, j; if (!slave->key || !master->key) return 0; master_xkb = master->key->xkbInfo->desc; slave_xkb = slave->key->xkbInfo->desc; /* Ignore devices with a clearly different keymap. */ if (slave_xkb->min_key_code != master_xkb->min_key_code || slave_xkb->max_key_code != master_xkb->max_key_code) return 0; for (i = 0; i < MAP_LENGTH; i++) { if (!modmap[i]) continue; /* If we have different symbols for any modifier on an * extended keyboard, ignore the whole remap request. */ for (j = 0; j < XkbKeyNumSyms(slave_xkb, i) && j < XkbKeyNumSyms(master_xkb, i); j++) if (XkbKeySymsPtr(slave_xkb, i)[j] != XkbKeySymsPtr(master_xkb, i)[j]) return 0; } if (check_modmap_change(client, slave, modmap) != Success) return 0; return 1; } /* Actually change the modifier map, and send notifications. Cannot fail. */ static void do_modmap_change(ClientPtr client, DeviceIntPtr dev, CARD8 *modmap) { XkbApplyMappingChange(dev, NULL, 0, 0, modmap, serverClient); } /* Rebuild modmap (key -> mod) from map (mod -> key). */ static int build_modmap_from_modkeymap(CARD8 *modmap, KeyCode *modkeymap, int max_keys_per_mod) { int i, len = max_keys_per_mod * 8; memset(modmap, 0, MAP_LENGTH); for (i = 0; i < len; i++) { if (!modkeymap[i]) continue; #if MAP_LENGTH < 256 if (modkeymap[i] >= MAP_LENGTH) return BadValue; #endif if (modmap[modkeymap[i]]) return BadValue; modmap[modkeymap[i]] = 1 << (i / max_keys_per_mod); } return Success; } int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, int max_keys_per_mod) { int ret; CARD8 modmap[MAP_LENGTH]; DeviceIntPtr tmp; ret = build_modmap_from_modkeymap(modmap, modkeymap, max_keys_per_mod); if (ret != Success) return ret; /* If we can't perform the change on the requested device, bail out. */ ret = check_modmap_change(client, dev, modmap); if (ret != Success) return ret; do_modmap_change(client, dev, modmap); /* Change any attached masters/slaves. */ if (IsMaster(dev)) { for (tmp = inputInfo.devices; tmp; tmp = tmp->next) { if (!IsMaster(tmp) && GetMaster(tmp, MASTER_KEYBOARD) == dev) if (check_modmap_change_slave(client, dev, tmp, modmap)) do_modmap_change(client, tmp, modmap); } } else if (!IsFloating(dev) && GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) { /* If this fails, expect the results to be weird. */ if (check_modmap_change(client, dev->master, modmap) == Success) do_modmap_change(client, dev->master, modmap); } return Success; } int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, KeyCode **modkeymap_out, int *max_keys_per_mod_out) { CARD8 keys_per_mod[8]; int max_keys_per_mod; KeyCode *modkeymap = NULL; int i, j, ret; ret = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); if (ret != Success) return ret; if (!dev->key) return BadMatch; /* Count the number of keys per modifier to determine how wide we * should make the map. */ max_keys_per_mod = 0; for (i = 0; i < 8; i++) keys_per_mod[i] = 0; for (i = 8; i < MAP_LENGTH; i++) { for (j = 0; j < 8; j++) { if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { if (++keys_per_mod[j] > max_keys_per_mod) max_keys_per_mod = keys_per_mod[j]; } } } if (max_keys_per_mod != 0) { modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode)); if (!modkeymap) return BadAlloc; for (i = 0; i < 8; i++) keys_per_mod[i] = 0; for (i = 8; i < MAP_LENGTH; i++) { for (j = 0; j < 8; j++) { if (dev->key->xkbInfo->desc->map->modmap[i] & (1 << j)) { modkeymap[(j * max_keys_per_mod) + keys_per_mod[j]] = i; keys_per_mod[j]++; } } } } *max_keys_per_mod_out = max_keys_per_mod; *modkeymap_out = modkeymap; return Success; } /** * Duplicate the InputAttributes in the most obvious way. * No special memory handling is used to give drivers the maximum * flexibility with the data. Drivers should be able to call realloc on the * product string if needed and perform similar operations. */ InputAttributes * DuplicateInputAttributes(InputAttributes * attrs) { InputAttributes *new_attr; int ntags = 0; char **tags, **new_tags; if (!attrs) return NULL; if (!(new_attr = calloc(1, sizeof(InputAttributes)))) goto unwind; if (attrs->product && !(new_attr->product = strdup(attrs->product))) goto unwind; if (attrs->vendor && !(new_attr->vendor = strdup(attrs->vendor))) goto unwind; if (attrs->device && !(new_attr->device = strdup(attrs->device))) goto unwind; if (attrs->pnp_id && !(new_attr->pnp_id = strdup(attrs->pnp_id))) goto unwind; if (attrs->usb_id && !(new_attr->usb_id = strdup(attrs->usb_id))) goto unwind; new_attr->flags = attrs->flags; if ((tags = attrs->tags)) { while (*tags++) ntags++; new_attr->tags = calloc(ntags + 1, sizeof(char *)); if (!new_attr->tags) goto unwind; tags = attrs->tags; new_tags = new_attr->tags; while (*tags) { *new_tags = strdup(*tags); if (!*new_tags) goto unwind; tags++; new_tags++; } } return new_attr; unwind: FreeInputAttributes(new_attr); return NULL; } void FreeInputAttributes(InputAttributes * attrs) { char **tags; if (!attrs) return; free(attrs->product); free(attrs->vendor); free(attrs->device); free(attrs->pnp_id); free(attrs->usb_id); if ((tags = attrs->tags)) while (*tags) free(*tags++); free(attrs->tags); free(attrs); } /** * Alloc a valuator mask large enough for num_valuators. */ ValuatorMask * valuator_mask_new(int num_valuators) { /* alloc a fixed size mask for now and ignore num_valuators. in the * flying-car future, when we can dynamically alloc the masks and are * not constrained by signals, we can start using num_valuators */ ValuatorMask *mask = calloc(1, sizeof(ValuatorMask)); if (mask == NULL) return NULL; mask->last_bit = -1; return mask; } void valuator_mask_free(ValuatorMask **mask) { free(*mask); *mask = NULL; } /** * Sets a range of valuators between first_valuator and num_valuators with * the data in the valuators array. All other values are set to 0. */ void valuator_mask_set_range(ValuatorMask *mask, int first_valuator, int num_valuators, const int *valuators) { int i; valuator_mask_zero(mask); for (i = first_valuator; i < min(first_valuator + num_valuators, MAX_VALUATORS); i++) valuator_mask_set(mask, i, valuators[i - first_valuator]); } /** * Reset mask to zero. */ void valuator_mask_zero(ValuatorMask *mask) { memset(mask, 0, sizeof(*mask)); mask->last_bit = -1; } /** * Returns the current size of the mask (i.e. the highest number of * valuators currently set + 1). */ int valuator_mask_size(const ValuatorMask *mask) { return mask->last_bit + 1; } /** * Returns the number of valuators set in the given mask. */ int valuator_mask_num_valuators(const ValuatorMask *mask) { return CountBits(mask->mask, min(mask->last_bit + 1, MAX_VALUATORS)); } /** * Return true if the valuator is set in the mask, or false otherwise. */ int valuator_mask_isset(const ValuatorMask *mask, int valuator) { return mask->last_bit >= valuator && BitIsOn(mask->mask, valuator); } static inline void _valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) { mask->last_bit = max(valuator, mask->last_bit); SetBit(mask->mask, valuator); mask->valuators[valuator] = data; } /** * Set the valuator to the given floating-point data. */ void valuator_mask_set_double(ValuatorMask *mask, int valuator, double data) { BUG_WARN_MSG(mask->has_unaccelerated, "Do not mix valuator types, zero mask first\n"); _valuator_mask_set_double(mask, valuator, data); } /** * Set the valuator to the given integer data. */ void valuator_mask_set(ValuatorMask *mask, int valuator, int data) { valuator_mask_set_double(mask, valuator, data); } /** * Return the requested valuator value as a double. If the mask bit is not * set for the given valuator, the returned value is undefined. */ double valuator_mask_get_double(const ValuatorMask *mask, int valuator) { return mask->valuators[valuator]; } /** * Return the requested valuator value as an integer, rounding towards zero. * If the mask bit is not set for the given valuator, the returned value is * undefined. */ int valuator_mask_get(const ValuatorMask *mask, int valuator) { return trunc(valuator_mask_get_double(mask, valuator)); } /** * Set value to the requested valuator. If the mask bit is set for this * valuator, value contains the requested valuator value and TRUE is * returned. * If the mask bit is not set for this valuator, value is unchanged and * FALSE is returned. */ Bool valuator_mask_fetch_double(const ValuatorMask *mask, int valuator, double *value) { if (valuator_mask_isset(mask, valuator)) { *value = valuator_mask_get_double(mask, valuator); return TRUE; } else return FALSE; } /** * Set value to the requested valuator. If the mask bit is set for this * valuator, value contains the requested valuator value and TRUE is * returned. * If the mask bit is not set for this valuator, value is unchanged and * FALSE is returned. */ Bool valuator_mask_fetch(const ValuatorMask *mask, int valuator, int *value) { if (valuator_mask_isset(mask, valuator)) { *value = valuator_mask_get(mask, valuator); return TRUE; } else return FALSE; } /** * Remove the valuator from the mask. */ void valuator_mask_unset(ValuatorMask *mask, int valuator) { if (mask->last_bit >= valuator) { int i, lastbit = -1; ClearBit(mask->mask, valuator); mask->valuators[valuator] = 0.0; mask->unaccelerated[valuator] = 0.0; for (i = 0; i <= mask->last_bit; i++) if (valuator_mask_isset(mask, i)) lastbit = max(lastbit, i); mask->last_bit = lastbit; if (mask->last_bit == -1) mask->has_unaccelerated = FALSE; } } void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src) { if (src) memcpy(dest, src, sizeof(*dest)); else valuator_mask_zero(dest); } Bool valuator_mask_has_unaccelerated(const ValuatorMask *mask) { return mask->has_unaccelerated; } void valuator_mask_drop_unaccelerated(ValuatorMask *mask) { memset(mask->unaccelerated, 0, sizeof(mask->unaccelerated)); mask->has_unaccelerated = FALSE; } void valuator_mask_set_absolute_unaccelerated(ValuatorMask *mask, int valuator, int absolute, double unaccel) { BUG_WARN_MSG(mask->last_bit != -1 && !mask->has_unaccelerated, "Do not mix valuator types, zero mask first\n"); _valuator_mask_set_double(mask, valuator, absolute); mask->has_unaccelerated = TRUE; mask->unaccelerated[valuator] = unaccel; } /** * Set both accelerated and unaccelerated value for this mask. */ void valuator_mask_set_unaccelerated(ValuatorMask *mask, int valuator, double accel, double unaccel) { BUG_WARN_MSG(mask->last_bit != -1 && !mask->has_unaccelerated, "Do not mix valuator types, zero mask first\n"); _valuator_mask_set_double(mask, valuator, accel); mask->has_unaccelerated = TRUE; mask->unaccelerated[valuator] = unaccel; } double valuator_mask_get_accelerated(const ValuatorMask *mask, int valuator) { return valuator_mask_get_double(mask, valuator); } double valuator_mask_get_unaccelerated(const ValuatorMask *mask, int valuator) { return mask->unaccelerated[valuator]; } Bool valuator_mask_fetch_unaccelerated(const ValuatorMask *mask, int valuator, double *accel, double *unaccel) { if (valuator_mask_isset(mask, valuator)) { if (accel) *accel = valuator_mask_get_accelerated(mask, valuator); if (unaccel) *unaccel = valuator_mask_get_unaccelerated(mask, valuator); return TRUE; } else return FALSE; } int CountBits(const uint8_t * mask, int len) { int i; int ret = 0; for (i = 0; i < len; i++) if (BitIsOn(mask, i)) ret++; return ret; } /** * Verifies sanity of the event. If the event is not an internal event, * memdumps the first 32 bytes of event to the log, a backtrace, then kill * the server. */ void verify_internal_event(const InternalEvent *ev) { if (ev && ev->any.header != ET_Internal) { int i; const unsigned char *data = (const unsigned char *) ev; ErrorF("dix: invalid event type %d\n", ev->any.header); for (i = 0; i < sizeof(xEvent); i++, data++) { ErrorF("%02hhx ", *data); if ((i % 8) == 7) ErrorF("\n"); } xorg_backtrace(); FatalError("Wrong event type %d. Aborting server\n", ev->any.header); } } /** * Initializes the given event to zero (or default values), for the given * device. */ void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms, enum DeviceEventSource source_type) { memset(event, 0, sizeof(DeviceEvent)); event->header = ET_Internal; event->length = sizeof(DeviceEvent); event->time = ms; event->deviceid = dev->id; event->sourceid = dev->id; event->source_type = source_type; } /** * Initializes the given gesture event to zero (or default values), * for the given device. */ void init_gesture_event(GestureEvent *event, DeviceIntPtr dev, Time ms) { memset(event, 0, sizeof(GestureEvent)); event->header = ET_Internal; event->length = sizeof(GestureEvent); event->time = ms; event->deviceid = dev->id; event->sourceid = dev->id; } int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd) { int corestate; /* core state needs to be assembled BEFORE the device is updated. */ corestate = (kbd && kbd->key) ? XkbStateFieldFromRec(&kbd->key->xkbInfo-> state) : 0; corestate |= (mouse && mouse->button) ? (mouse->button->state) : 0; corestate |= (mouse && mouse->touch) ? (mouse->touch->state) : 0; return corestate; } void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event) { int i; for (i = 0; mouse && mouse->button && i < mouse->button->numButtons; i++) if (BitIsOn(mouse->button->down, i)) SetBit(event->buttons, mouse->button->map[i]); if (mouse && mouse->touch && mouse->touch->buttonsDown > 0) SetBit(event->buttons, mouse->button->map[1]); if (kbd && kbd->key) { XkbStatePtr state; /* we need the state before the event happens */ if (event->type == ET_KeyPress || event->type == ET_KeyRelease) state = &kbd->key->xkbInfo->prev_state; else state = &kbd->key->xkbInfo->state; event->mods.base = state->base_mods; event->mods.latched = state->latched_mods; event->mods.locked = state->locked_mods; event->mods.effective = state->mods; event->group.base = state->base_group; event->group.latched = state->latched_group; event->group.locked = state->locked_group; event->group.effective = state->group; } } void event_set_state_gesture(DeviceIntPtr kbd, GestureEvent *event) { if (kbd && kbd->key) { XkbStatePtr state= &kbd->key->xkbInfo->state; event->mods.base = state->base_mods; event->mods.latched = state->latched_mods; event->mods.locked = state->locked_mods; event->mods.effective = state->mods; event->group.base = state->base_group; event->group.latched = state->latched_group; event->group.locked = state->locked_group; event->group.effective = state->group; } } /** * Return the event filter mask for the given device and the given core or * XI1 protocol type. */ Mask event_get_filter_from_type(DeviceIntPtr dev, int evtype) { return event_filters[dev ? dev->id : 0][evtype]; } /** * Return the event filter mask for the given device and the given core or * XI2 protocol type. */ Mask event_get_filter_from_xi2type(int evtype) { return (1 << (evtype % 8)); } Bool point_on_screen(ScreenPtr pScreen, int x, int y) { return x >= pScreen->x && x < pScreen->x + pScreen->width && y >= pScreen->y && y < pScreen->y + pScreen->height; } /** * Update desktop dimensions on the screenInfo struct. */ void update_desktop_dimensions(void) { int i; int x1 = INT_MAX, y1 = INT_MAX; /* top-left */ int x2 = INT_MIN, y2 = INT_MIN; /* bottom-right */ for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr screen = screenInfo.screens[i]; x1 = min(x1, screen->x); y1 = min(y1, screen->y); x2 = max(x2, screen->x + screen->width); y2 = max(y2, screen->y + screen->height); } screenInfo.x = x1; screenInfo.y = y1; screenInfo.width = x2 - x1; screenInfo.height = y2 - y1; } /* * Delete the element with the key from the list, freeing all memory * associated with the element.. */ static void input_option_free(InputOption *o) { free(o->opt_name); free(o->opt_val); free(o->opt_comment); free(o); } /* * Create a new InputOption with the key/value pair provided. * If a list is provided, the new options is added to the list and the list * is returned. * * If a new option is added to a list that already contains that option, the * previous option is overwritten. * * @param list The list to add to. * @param key Option key, will be copied. * @param value Option value, will be copied. * * @return If list is not NULL, the list with the new option added. If list * is NULL, a new option list with one element. On failure, NULL is * returned. */ InputOption * input_option_new(InputOption *list, const char *key, const char *value) { InputOption *opt = NULL; if (!key) return NULL; if (list) { nt_list_for_each_entry(opt, list, list.next) { if (strcmp(input_option_get_key(opt), key) == 0) { input_option_set_value(opt, value); return list; } } } opt = calloc(1, sizeof(InputOption)); if (!opt) return NULL; nt_list_init(opt, list.next); input_option_set_key(opt, key); input_option_set_value(opt, value); if (list) { nt_list_append(opt, list, InputOption, list.next); return list; } else return opt; } InputOption * input_option_free_element(InputOption *list, const char *key) { InputOption *element; nt_list_for_each_entry(element, list, list.next) { if (strcmp(input_option_get_key(element), key) == 0) { nt_list_del(element, list, InputOption, list.next); input_option_free(element); break; } } return list; } /** * Free the list pointed at by opt. */ void input_option_free_list(InputOption **opt) { InputOption *element, *tmp; nt_list_for_each_entry_safe(element, tmp, *opt, list.next) { nt_list_del(element, *opt, InputOption, list.next); input_option_free(element); } *opt = NULL; } /** * Find the InputOption with the given option name. * * @return The InputOption or NULL if not present. */ InputOption * input_option_find(InputOption *list, const char *key) { InputOption *element; nt_list_for_each_entry(element, list, list.next) { if (strcmp(input_option_get_key(element), key) == 0) return element; } return NULL; } const char * input_option_get_key(const InputOption *opt) { return opt->opt_name; } const char * input_option_get_value(const InputOption *opt) { return opt->opt_val; } void input_option_set_key(InputOption *opt, const char *key) { free(opt->opt_name); if (key) opt->opt_name = strdup(key); } void input_option_set_value(InputOption *opt, const char *value) { free(opt->opt_val); if (value) opt->opt_val = strdup(value); } /* FP1616/FP3232 conversion functions. * Fixed point types are encoded as signed integral and unsigned frac. So any * negative number -n.m is encoded as floor(n) + (1 - 0.m). */ double fp1616_to_double(FP1616 in) { return pixman_fixed_to_double(in); } double fp3232_to_double(FP3232 in) { double ret; ret = (double) in.integral; ret += (double) in.frac * (1.0 / (1ULL << 32)); /* Optimized: ldexp((double)in.frac, -32); */ return ret; } FP1616 double_to_fp1616(double in) { return pixman_double_to_fixed(in); } FP3232 double_to_fp3232(double in) { FP3232 ret; int32_t integral; double tmp; uint32_t frac_d; tmp = floor(in); integral = (int32_t) tmp; tmp = (in - integral) * (1ULL << 32); /* Optimized: ldexp(in - integral, 32) */ frac_d = (uint32_t) tmp; ret.integral = integral; ret.frac = frac_d; return ret; } /** * DO NOT USE THIS FUNCTION. It only exists for the test cases. Use * xi2mask_new() instead to get the standard sized masks. * * @param nmasks The number of masks (== number of devices) * @param size The size of the masks in bytes * @return The new mask or NULL on allocation error. */ XI2Mask * xi2mask_new_with_size(size_t nmasks, size_t size) { int i; int alloc_size; unsigned char *cursor; XI2Mask *mask; alloc_size = sizeof(struct _XI2Mask) + nmasks * sizeof(unsigned char *) + nmasks * size; mask = calloc(1, alloc_size); if (!mask) return NULL; mask->nmasks = nmasks; mask->mask_size = size; mask->masks = (unsigned char **)(mask + 1); cursor = (unsigned char *)(mask + 1) + nmasks * sizeof(unsigned char *); for (i = 0; i < nmasks; i++) { mask->masks[i] = cursor; cursor += size; } return mask; } /** * Create a new XI2 mask of the standard size, i.e. for all devices + fake * devices and for the highest supported XI2 event type. * * @return The new mask or NULL on allocation error. */ XI2Mask * xi2mask_new(void) { return xi2mask_new_with_size(EMASKSIZE, XI2MASKSIZE); } /** * Frees memory associated with mask and resets mask to NULL. */ void xi2mask_free(XI2Mask **mask) { if (!(*mask)) return; free((*mask)); *mask = NULL; } /** * Test if the bit for event type is set for this device only. * * @return TRUE if the bit is set, FALSE otherwise */ Bool xi2mask_isset_for_device(XI2Mask *mask, const DeviceIntPtr dev, int event_type) { BUG_WARN(dev->id < 0); BUG_WARN(dev->id >= mask->nmasks); BUG_WARN(bits_to_bytes(event_type + 1) > mask->mask_size); return BitIsOn(mask->masks[dev->id], event_type); } /** * Test if the bit for event type is set for this device, or the * XIAllDevices/XIAllMasterDevices (if applicable) is set. * * @return TRUE if the bit is set, FALSE otherwise */ Bool xi2mask_isset(XI2Mask *mask, const DeviceIntPtr dev, int event_type) { int set = 0; if (xi2mask_isset_for_device(mask, inputInfo.all_devices, event_type)) set = 1; else if (xi2mask_isset_for_device(mask, dev, event_type)) set = 1; else if (IsMaster(dev) && xi2mask_isset_for_device(mask, inputInfo.all_master_devices, event_type)) set = 1; return set; } /** * Set the mask bit for this event type for this device. */ void xi2mask_set(XI2Mask *mask, int deviceid, int event_type) { BUG_WARN(deviceid < 0); BUG_WARN(deviceid >= mask->nmasks); BUG_WARN(bits_to_bytes(event_type + 1) > mask->mask_size); SetBit(mask->masks[deviceid], event_type); } /** * Zero out the xi2mask, for the deviceid given. If the deviceid is < 0, all * masks are zeroed. */ void xi2mask_zero(XI2Mask *mask, int deviceid) { int i; BUG_WARN(deviceid > 0 && deviceid >= mask->nmasks); if (deviceid >= 0) memset(mask->masks[deviceid], 0, mask->mask_size); else for (i = 0; i < mask->nmasks; i++) memset(mask->masks[i], 0, mask->mask_size); } /** * Merge source into dest, i.e. dest |= source. * If the masks are of different size, only the overlapping section is merged. */ void xi2mask_merge(XI2Mask *dest, const XI2Mask *source) { int i, j; for (i = 0; i < min(dest->nmasks, source->nmasks); i++) for (j = 0; j < min(dest->mask_size, source->mask_size); j++) dest->masks[i][j] |= source->masks[i][j]; } /** * @return The number of masks in mask */ size_t xi2mask_num_masks(const XI2Mask *mask) { return mask->nmasks; } /** * @return The size of each mask in bytes */ size_t xi2mask_mask_size(const XI2Mask *mask) { return mask->mask_size; } /** * Set the mask for the given deviceid to the source mask. * If the mask given is larger than the target memory, only the overlapping * parts are copied. */ void xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid, const unsigned char *mask, size_t mask_size) { BUG_WARN(deviceid < 0); BUG_WARN(deviceid >= xi2mask->nmasks); memcpy(xi2mask->masks[deviceid], mask, min(xi2mask->mask_size, mask_size)); } /** * Get a reference to the XI2mask for this particular device. */ const unsigned char * xi2mask_get_one_mask(const XI2Mask *mask, int deviceid) { BUG_WARN(deviceid < 0); BUG_WARN(deviceid >= mask->nmasks); return mask->masks[deviceid]; } /** * Copies a sprite data from src to dst sprites. * * Returns FALSE on error. */ Bool CopySprite(SpritePtr src, SpritePtr dst) { WindowPtr *trace; if (src->spriteTraceGood > dst->spriteTraceSize) { trace = reallocarray(dst->spriteTrace, src->spriteTraceSize, sizeof(*trace)); if (!trace) { dst->spriteTraceGood = 0; return FALSE; } dst->spriteTrace = trace; dst->spriteTraceSize = src->spriteTraceGood; } memcpy(dst->spriteTrace, src->spriteTrace, src->spriteTraceGood * sizeof(*trace)); dst->spriteTraceGood = src->spriteTraceGood; return TRUE; } xorg-server-21.1.16/dix/pixmap.c0000644000175000017500000002762514757411105012075 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "scrnintstr.h" #include "mi.h" #include "misc.h" #include "os.h" #include "windowstr.h" #include "resource.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "X11/extensions/render.h" #include "picturestr.h" #include "randrstr.h" /* * Scratch pixmap management and device independent pixmap allocation * function. */ /* callable by ddx */ PixmapPtr GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { PixmapPtr pPixmap = pScreen->pScratchPixmap; if (pPixmap) pScreen->pScratchPixmap = NULL; else /* width and height of 0 means don't allocate any pixmap data */ pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); if (pPixmap) { if ((*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData)) return pPixmap; (*pScreen->DestroyPixmap) (pPixmap); } return NullPixmap; } /* callable by ddx */ void FreeScratchPixmapHeader(PixmapPtr pPixmap) { if (pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; pPixmap->devPrivate.ptr = NULL; /* lest ddx chases bad ptr */ if (pScreen->pScratchPixmap) (*pScreen->DestroyPixmap) (pPixmap); else pScreen->pScratchPixmap = pPixmap; } } Bool CreateScratchPixmapsForScreen(ScreenPtr pScreen) { unsigned int pixmap_size; pixmap_size = sizeof(PixmapRec) + dixScreenSpecificPrivatesSize(pScreen, PRIVATE_PIXMAP); pScreen->totalPixmapSize = BitmapBytePad(pixmap_size * 8); /* let it be created on first use */ pScreen->pScratchPixmap = NULL; return TRUE; } void FreeScratchPixmapsForScreen(ScreenPtr pScreen) { FreeScratchPixmapHeader(pScreen->pScratchPixmap); } /* callable by ddx */ PixmapPtr AllocatePixmap(ScreenPtr pScreen, int pixDataSize) { PixmapPtr pPixmap; assert(pScreen->totalPixmapSize > 0); if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize) return NullPixmap; pPixmap = calloc(1, pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; dixInitScreenPrivates(pScreen, pPixmap, pPixmap + 1, PRIVATE_PIXMAP); return pPixmap; } /* callable by ddx */ void FreePixmap(PixmapPtr pPixmap) { dixFiniPrivates(pPixmap, PRIVATE_PIXMAP); free(pPixmap); } void PixmapUnshareSecondaryPixmap(PixmapPtr secondary_pixmap) { int ihandle = -1; ScreenPtr pScreen = secondary_pixmap->drawable.pScreen; pScreen->SetSharedPixmapBacking(secondary_pixmap, ((void *)(long)ihandle)); } PixmapPtr PixmapShareToSecondary(PixmapPtr pixmap, ScreenPtr secondary) { PixmapPtr spix; int ret; void *handle; ScreenPtr primary = pixmap->drawable.pScreen; int depth = pixmap->drawable.depth; ret = primary->SharePixmapBacking(pixmap, secondary, &handle); if (ret == FALSE) return NULL; spix = secondary->CreatePixmap(secondary, 0, 0, depth, CREATE_PIXMAP_USAGE_SHARED); secondary->ModifyPixmapHeader(spix, pixmap->drawable.width, pixmap->drawable.height, depth, 0, pixmap->devKind, NULL); /* have the secondary pixmap take a reference on the primary pixmap later we destroy them both at the same time */ pixmap->refcnt++; spix->primary_pixmap = pixmap; ret = secondary->SetSharedPixmapBacking(spix, handle); if (ret == FALSE) { secondary->DestroyPixmap(spix); return NULL; } return spix; } static void PixmapDirtyDamageDestroy(DamagePtr damage, void *closure) { PixmapDirtyUpdatePtr dirty = closure; dirty->damage = NULL; } Bool PixmapStartDirtyTracking(DrawablePtr src, PixmapPtr secondary_dst, int x, int y, int dst_x, int dst_y, Rotation rotation) { ScreenPtr screen = src->pScreen; PixmapDirtyUpdatePtr dirty_update; RegionPtr damageregion; RegionRec dstregion; BoxRec box; dirty_update = calloc(1, sizeof(PixmapDirtyUpdateRec)); if (!dirty_update) return FALSE; dirty_update->src = src; dirty_update->secondary_dst = secondary_dst; dirty_update->x = x; dirty_update->y = y; dirty_update->dst_x = dst_x; dirty_update->dst_y = dst_y; dirty_update->rotation = rotation; dirty_update->damage = DamageCreate(NULL, PixmapDirtyDamageDestroy, DamageReportNone, TRUE, screen, dirty_update); if (rotation != RR_Rotate_0) { RRTransformCompute(x, y, secondary_dst->drawable.width, secondary_dst->drawable.height, rotation, NULL, &dirty_update->transform, &dirty_update->f_transform, &dirty_update->f_inverse); } if (!dirty_update->damage) { free(dirty_update); return FALSE; } /* Damage destination rectangle so that the destination pixmap contents * will get fully initialized */ box.x1 = dirty_update->x; box.y1 = dirty_update->y; if (dirty_update->rotation == RR_Rotate_90 || dirty_update->rotation == RR_Rotate_270) { box.x2 = dirty_update->x + secondary_dst->drawable.height; box.y2 = dirty_update->y + secondary_dst->drawable.width; } else { box.x2 = dirty_update->x + secondary_dst->drawable.width; box.y2 = dirty_update->y + secondary_dst->drawable.height; } RegionInit(&dstregion, &box, 1); damageregion = DamageRegion(dirty_update->damage); RegionUnion(damageregion, damageregion, &dstregion); RegionUninit(&dstregion); DamageRegister(src, dirty_update->damage); xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list); return TRUE; } Bool PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr secondary_dst) { ScreenPtr screen = src->pScreen; PixmapDirtyUpdatePtr ent, safe; xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) { if (ent->src == src && ent->secondary_dst == secondary_dst) { if (ent->damage) DamageDestroy(ent->damage); xorg_list_del(&ent->ent); free(ent); } } return TRUE; } static void PixmapDirtyCopyArea(PixmapPtr dst, PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) { DrawablePtr src = dirty->src; ScreenPtr pScreen = src->pScreen; int n; BoxPtr b; GCPtr pGC; n = RegionNumRects(dirty_region); b = RegionRects(dirty_region); pGC = GetScratchGC(src->depth, pScreen); if (pScreen->root) { ChangeGCVal subWindowMode; subWindowMode.val = IncludeInferiors; ChangeGC(NullClient, pGC, GCSubwindowMode, &subWindowMode); } ValidateGC(&dst->drawable, pGC); while (n--) { BoxRec dst_box; int w, h; dst_box = *b; w = dst_box.x2 - dst_box.x1; h = dst_box.y2 - dst_box.y1; pGC->ops->CopyArea(src, &dst->drawable, pGC, dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h, dirty->dst_x + dst_box.x1, dirty->dst_y + dst_box.y1); b++; } FreeScratchGC(pGC); } static void PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap, PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) { ScreenPtr pScreen = dirty->src->pScreen; PictFormatPtr format = PictureWindowFormat(pScreen->root); PicturePtr src, dst; XID include_inferiors = IncludeInferiors; int n = RegionNumRects(dirty_region); BoxPtr b = RegionRects(dirty_region); int error; src = CreatePicture(None, dirty->src, format, CPSubwindowMode, &include_inferiors, serverClient, &error); if (!src) return; dst = CreatePicture(None, &dst_pixmap->drawable, format, 0L, NULL, serverClient, &error); if (!dst) return; error = SetPictureTransform(src, &dirty->transform); if (error) return; while (n--) { BoxRec dst_box; dst_box = *b; dst_box.x1 += dirty->x; dst_box.x2 += dirty->x; dst_box.y1 += dirty->y; dst_box.y2 += dirty->y; pixman_f_transform_bounds(&dirty->f_inverse, &dst_box); CompositePicture(PictOpSrc, src, NULL, dst, dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1, dst_box.x2 - dst_box.x1, dst_box.y2 - dst_box.y1); b++; } FreePicture(src, None); FreePicture(dst, None); } /* * this function can possibly be improved and optimised, by clipping * instead of iterating * Drivers are free to implement their own version of this. */ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty) { ScreenPtr pScreen = dirty->src->pScreen; RegionPtr region = DamageRegion(dirty->damage); PixmapPtr dst; SourceValidateProcPtr SourceValidate; RegionRec pixregion; BoxRec box; dst = dirty->secondary_dst->primary_pixmap; if (!dst) dst = dirty->secondary_dst; box.x1 = 0; box.y1 = 0; if (dirty->rotation == RR_Rotate_90 || dirty->rotation == RR_Rotate_270) { box.x2 = dst->drawable.height; box.y2 = dst->drawable.width; } else { box.x2 = dst->drawable.width; box.y2 = dst->drawable.height; } RegionInit(&pixregion, &box, 1); /* * SourceValidate is used by the software cursor code * to pull the cursor off of the screen when reading * bits from the frame buffer. Bypassing this function * leaves the software cursor in place */ SourceValidate = pScreen->SourceValidate; pScreen->SourceValidate = miSourceValidate; RegionTranslate(&pixregion, dirty->x, dirty->y); RegionIntersect(&pixregion, &pixregion, region); if (RegionNil(&pixregion)) { RegionUninit(&pixregion); return FALSE; } RegionTranslate(&pixregion, -dirty->x, -dirty->y); if (!pScreen->root || dirty->rotation == RR_Rotate_0) PixmapDirtyCopyArea(dst, dirty, &pixregion); else PixmapDirtyCompositeRotate(dst, dirty, &pixregion); pScreen->SourceValidate = SourceValidate; return TRUE; } xorg-server-21.1.16/dix/privates.c0000644000175000017500000005474114757411105012433 /* Copyright 1993, 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 © 2010, Keith Packard * Copyright © 2010, Jamey Sharp * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include #include "windowstr.h" #include "resource.h" #include "privates.h" #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" #include "inputstr.h" #include "scrnintstr.h" #include "extnsionst.h" #include "inputstr.h" static DevPrivateSetRec global_keys[PRIVATE_LAST]; static const Bool xselinux_private[PRIVATE_LAST] = { [PRIVATE_SCREEN] = TRUE, [PRIVATE_CLIENT] = TRUE, [PRIVATE_WINDOW] = TRUE, [PRIVATE_PIXMAP] = TRUE, [PRIVATE_GC] = TRUE, [PRIVATE_CURSOR] = TRUE, [PRIVATE_COLORMAP] = TRUE, [PRIVATE_DEVICE] = TRUE, [PRIVATE_EXTENSION] = TRUE, [PRIVATE_SELECTION] = TRUE, [PRIVATE_PROPERTY] = TRUE, [PRIVATE_PICTURE] = TRUE, [PRIVATE_GLYPHSET] = TRUE, }; static const char *key_names[PRIVATE_LAST] = { /* XSELinux uses the same private keys for numerous objects */ [PRIVATE_XSELINUX] = "XSELINUX", /* Otherwise, you get a private in just the requested structure */ /* These can have objects created before all of the keys are registered */ [PRIVATE_SCREEN] = "SCREEN", [PRIVATE_EXTENSION] = "EXTENSION", [PRIVATE_COLORMAP] = "COLORMAP", [PRIVATE_DEVICE] = "DEVICE", /* These cannot have any objects before all relevant keys are registered */ [PRIVATE_CLIENT] = "CLIENT", [PRIVATE_PROPERTY] = "PROPERTY", [PRIVATE_SELECTION] = "SELECTION", [PRIVATE_WINDOW] = "WINDOW", [PRIVATE_PIXMAP] = "PIXMAP", [PRIVATE_GC] = "GC", [PRIVATE_CURSOR] = "CURSOR", [PRIVATE_CURSOR_BITS] = "CURSOR_BITS", /* extension privates */ [PRIVATE_GLYPH] = "GLYPH", [PRIVATE_GLYPHSET] = "GLYPHSET", [PRIVATE_PICTURE] = "PICTURE", [PRIVATE_SYNC_FENCE] = "SYNC_FENCE", }; static const Bool screen_specific_private[PRIVATE_LAST] = { [PRIVATE_SCREEN] = FALSE, [PRIVATE_CLIENT] = FALSE, [PRIVATE_WINDOW] = TRUE, [PRIVATE_PIXMAP] = TRUE, [PRIVATE_GC] = TRUE, [PRIVATE_CURSOR] = FALSE, [PRIVATE_COLORMAP] = FALSE, [PRIVATE_DEVICE] = FALSE, [PRIVATE_EXTENSION] = FALSE, [PRIVATE_SELECTION] = FALSE, [PRIVATE_PROPERTY] = FALSE, [PRIVATE_PICTURE] = TRUE, [PRIVATE_GLYPHSET] = FALSE, }; typedef Bool (*FixupFunc) (PrivatePtr *privates, int offset, unsigned bytes); typedef enum { FixupMove, FixupRealloc } FixupType; static Bool dixReallocPrivates(PrivatePtr *privates, int old_offset, unsigned bytes) { void *new_privates; new_privates = realloc(*privates, old_offset + bytes); if (!new_privates) return FALSE; memset((char *) new_privates + old_offset, '\0', bytes); *privates = new_privates; return TRUE; } static Bool dixMovePrivates(PrivatePtr *privates, int new_offset, unsigned bytes) { memmove((char *) *privates + bytes, *privates, new_offset - bytes); memset(*privates, '\0', bytes); return TRUE; } static Bool fixupOneScreen(ScreenPtr pScreen, FixupFunc fixup, unsigned bytes) { uintptr_t old; char *new; DevPrivateKey *keyp, key; DevPrivateType type; int size; old = (uintptr_t) pScreen->devPrivates; size = global_keys[PRIVATE_SCREEN].offset; if (!fixup (&pScreen->devPrivates, size, bytes)) return FALSE; /* Screen privates can contain screen-specific private keys * for other types. When they move, the linked list we use to * track them gets scrambled. Fix that by computing the change * in the location of each private adjusting our linked list * pointers to match */ new = (char *) pScreen->devPrivates; /* Moving means everyone shifts up in the privates by 'bytes' amount, * realloc means the base pointer moves */ if (fixup == dixMovePrivates) new += bytes; if ((uintptr_t) new != old) { for (type = PRIVATE_XSELINUX; type < PRIVATE_LAST; type++) /* Walk the privates list, being careful as the * pointers are scrambled before we patch them. */ for (keyp = &pScreen->screenSpecificPrivates[type].key; (key = *keyp) != NULL; keyp = &key->next) { /* Only mangle things if the private structure * is contained within the allocation. Privates * stored elsewhere will be left alone */ if (old <= (uintptr_t) key && (uintptr_t) key < old + size) { /* Compute new location of key (deriving from the new * allocation to avoid UB) */ key = (DevPrivateKey) (new + ((uintptr_t) key - old)); /* Patch the list */ *keyp = key; } } } return TRUE; } static Bool fixupScreens(FixupFunc fixup, unsigned bytes) { int s; for (s = 0; s < screenInfo.numScreens; s++) if (!fixupOneScreen (screenInfo.screens[s], fixup, bytes)) return FALSE; for (s = 0; s < screenInfo.numGPUScreens; s++) if (!fixupOneScreen (screenInfo.gpuscreens[s], fixup, bytes)) return FALSE; return TRUE; } static Bool fixupServerClient(FixupFunc fixup, unsigned bytes) { if (serverClient) return fixup(&serverClient->devPrivates, global_keys[PRIVATE_CLIENT].offset, bytes); return TRUE; } static Bool fixupExtensions(FixupFunc fixup, unsigned bytes) { unsigned char major; ExtensionEntry *extension; for (major = EXTENSION_BASE; (extension = GetExtensionEntry(major)); major++) if (!fixup (&extension->devPrivates, global_keys[PRIVATE_EXTENSION].offset, bytes)) return FALSE; return TRUE; } static Bool fixupDefaultColormaps(FixupFunc fixup, unsigned bytes) { int s; for (s = 0; s < screenInfo.numScreens; s++) { ColormapPtr cmap; dixLookupResourceByType((void **) &cmap, screenInfo.screens[s]->defColormap, RT_COLORMAP, serverClient, DixCreateAccess); if (cmap && !fixup(&cmap->devPrivates, screenInfo.screens[s]->screenSpecificPrivates[PRIVATE_COLORMAP].offset, bytes)) return FALSE; } return TRUE; } static Bool fixupDeviceList(DeviceIntPtr device, FixupFunc fixup, unsigned bytes) { while (device) { if (!fixup(&device->devPrivates, global_keys[PRIVATE_DEVICE].offset, bytes)) return FALSE; device = device->next; } return TRUE; } static Bool fixupDevices(FixupFunc fixup, unsigned bytes) { return (fixupDeviceList(inputInfo.devices, fixup, bytes) && fixupDeviceList(inputInfo.off_devices, fixup, bytes)); } static Bool (*const allocated_early[PRIVATE_LAST]) (FixupFunc, unsigned) = { [PRIVATE_SCREEN] = fixupScreens, [PRIVATE_CLIENT] = fixupServerClient, [PRIVATE_EXTENSION] = fixupExtensions, [PRIVATE_COLORMAP] = fixupDefaultColormaps, [PRIVATE_DEVICE] = fixupDevices, }; static void grow_private_set(DevPrivateSetPtr set, unsigned bytes) { DevPrivateKey k; for (k = set->key; k; k = k->next) k->offset += bytes; set->offset += bytes; } static void grow_screen_specific_set(DevPrivateType type, unsigned bytes) { int s; /* Update offsets for all screen-specific keys */ for (s = 0; s < screenInfo.numScreens; s++) { ScreenPtr pScreen = screenInfo.screens[s]; grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); } for (s = 0; s < screenInfo.numGPUScreens; s++) { ScreenPtr pScreen = screenInfo.gpuscreens[s]; grow_private_set(&pScreen->screenSpecificPrivates[type], bytes); } } /* * Register a private key. This takes the type of object the key will * be used with, which may be PRIVATE_ALL indicating that this key * will be used with all of the private objects. If 'size' is * non-zero, then the specified amount of space will be allocated in * the private storage. Otherwise, space for a single pointer will * be allocated which can be set with dixSetPrivate */ Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size) { DevPrivateType t; int offset; unsigned bytes; if (key->initialized) { assert(size == key->size); return TRUE; } /* Compute required space */ bytes = size; if (size == 0) bytes = sizeof(void *); /* align to pointer size */ bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); /* Update offsets for all affected keys */ if (type == PRIVATE_XSELINUX) { /* Resize if we can, or make sure nothing's allocated if we can't */ for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) if (xselinux_private[t]) { if (!allocated_early[t]) assert(!global_keys[t].created); else if (!allocated_early[t] (dixReallocPrivates, bytes)) return FALSE; } /* Move all existing keys up in the privates space to make * room for this new global key */ for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { if (xselinux_private[t]) { grow_private_set(&global_keys[t], bytes); grow_screen_specific_set(t, bytes); if (allocated_early[t]) allocated_early[t] (dixMovePrivates, bytes); } } offset = 0; } else { /* Resize if we can, or make sure nothing's allocated if we can't */ if (!allocated_early[type]) assert(!global_keys[type].created); else if (!allocated_early[type] (dixReallocPrivates, bytes)) return FALSE; offset = global_keys[type].offset; global_keys[type].offset += bytes; grow_screen_specific_set(type, bytes); } /* Setup this key */ key->offset = offset; key->size = size; key->initialized = TRUE; key->type = type; key->allocated = FALSE; key->next = global_keys[type].key; global_keys[type].key = key; return TRUE; } Bool dixRegisterScreenPrivateKey(DevScreenPrivateKey screenKey, ScreenPtr pScreen, DevPrivateType type, unsigned size) { DevPrivateKey key; if (!dixRegisterPrivateKey(&screenKey->screenKey, PRIVATE_SCREEN, 0)) return FALSE; key = dixGetPrivate(&pScreen->devPrivates, &screenKey->screenKey); if (key != NULL) { assert(key->size == size); assert(key->type == type); return TRUE; } key = calloc(sizeof(DevPrivateKeyRec), 1); if (!key) return FALSE; if (!dixRegisterPrivateKey(key, type, size)) { free(key); return FALSE; } key->allocated = TRUE; dixSetPrivate(&pScreen->devPrivates, &screenKey->screenKey, key); return TRUE; } DevPrivateKey _dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen) { return dixGetPrivate(&pScreen->devPrivates, &key->screenKey); } /* * Initialize privates by zeroing them */ void _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type) { assert (!screen_specific_private[type]); global_keys[type].created++; if (xselinux_private[type]) global_keys[PRIVATE_XSELINUX].created++; if (global_keys[type].offset == 0) addr = 0; *privates = addr; if (addr) memset(addr, '\0', global_keys[type].offset); } /* * Clean up privates */ void _dixFiniPrivates(PrivatePtr privates, DevPrivateType type) { global_keys[type].created--; if (xselinux_private[type]) global_keys[PRIVATE_XSELINUX].created--; } /* * Allocate new object with privates. * * This is expected to be invoked from the * dixAllocateObjectWithPrivates macro */ void * _dixAllocateObjectWithPrivates(unsigned baseSize, unsigned clear, unsigned offset, DevPrivateType type) { unsigned totalSize; void *object; PrivatePtr privates; PrivatePtr *devPrivates; assert(type > PRIVATE_SCREEN); assert(type < PRIVATE_LAST); assert(!screen_specific_private[type]); /* round up so that void * is aligned */ baseSize = (baseSize + sizeof(void *) - 1) & ~(sizeof(void *) - 1); totalSize = baseSize + global_keys[type].offset; object = malloc(totalSize); if (!object) return NULL; memset(object, '\0', clear); privates = (PrivatePtr) (((char *) object) + baseSize); devPrivates = (PrivatePtr *) ((char *) object + offset); _dixInitPrivates(devPrivates, privates, type); return object; } /* * Allocate privates separately from containing object. * Used for clients and screens. */ Bool dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type) { unsigned size; PrivatePtr p; assert(type > PRIVATE_XSELINUX); assert(type < PRIVATE_LAST); assert(!screen_specific_private[type]); size = global_keys[type].offset; if (!size) { p = NULL; } else { if (!(p = malloc(size))) return FALSE; } _dixInitPrivates(privates, p, type); ++global_keys[type].allocated; return TRUE; } /* * Free an object that has privates * * This is expected to be invoked from the * dixFreeObjectWithPrivates macro */ void _dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type) { _dixFiniPrivates(privates, type); free(object); } /* * Called to free screen or client privates */ void dixFreePrivates(PrivatePtr privates, DevPrivateType type) { _dixFiniPrivates(privates, type); --global_keys[type].allocated; free(privates); } /* * Return size of privates for the specified type */ extern _X_EXPORT int dixPrivatesSize(DevPrivateType type) { assert(type >= PRIVATE_SCREEN); assert(type < PRIVATE_LAST); assert (!screen_specific_private[type]); return global_keys[type].offset; } /* Table of devPrivates offsets */ static const int offsets[] = { -1, /* RT_NONE */ offsetof(WindowRec, devPrivates), /* RT_WINDOW */ offsetof(PixmapRec, devPrivates), /* RT_PIXMAP */ offsetof(GC, devPrivates), /* RT_GC */ -1, /* RT_FONT */ offsetof(CursorRec, devPrivates), /* RT_CURSOR */ offsetof(ColormapRec, devPrivates), /* RT_COLORMAP */ }; int dixLookupPrivateOffset(RESTYPE type) { /* * Special kludge for DBE which registers a new resource type that * points at pixmaps (thanks, DBE) */ if (type & RC_DRAWABLE) { if (type == RT_WINDOW) return offsets[RT_WINDOW & TypeMask]; else return offsets[RT_PIXMAP & TypeMask]; } type = type & TypeMask; if (type < ARRAY_SIZE(offsets)) return offsets[type]; return -1; } /* * Screen-specific privates */ extern _X_EXPORT Bool dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, DevPrivateType type, unsigned size) { int offset; unsigned bytes; if (!screen_specific_private[type]) FatalError("Attempt to allocate screen-specific private storage for type %s\n", key_names[type]); if (key->initialized) { assert(size == key->size); return TRUE; } /* Compute required space */ bytes = size; if (size == 0) bytes = sizeof(void *); /* align to void * size */ bytes = (bytes + sizeof(void *) - 1) & ~(sizeof(void *) - 1); assert (!allocated_early[type]); assert (!pScreen->screenSpecificPrivates[type].created); offset = pScreen->screenSpecificPrivates[type].offset; pScreen->screenSpecificPrivates[type].offset += bytes; /* Setup this key */ key->offset = offset; key->size = size; key->initialized = TRUE; key->type = type; key->allocated = FALSE; key->next = pScreen->screenSpecificPrivates[type].key; pScreen->screenSpecificPrivates[type].key = key; return TRUE; } /* Clean up screen-specific privates before CloseScreen */ void dixFreeScreenSpecificPrivates(ScreenPtr pScreen) { DevPrivateType t; for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { DevPrivateKey key; for (key = pScreen->screenSpecificPrivates[t].key; key; key = key->next) { key->initialized = FALSE; } } } /* Initialize screen-specific privates in AddScreen */ void dixInitScreenSpecificPrivates(ScreenPtr pScreen) { DevPrivateType t; for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) pScreen->screenSpecificPrivates[t].offset = global_keys[t].offset; } /* Initialize screen-specific privates in AddScreen */ void _dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevPrivateType type) { int privates_size; assert (screen_specific_private[type]); if (pScreen) { privates_size = pScreen->screenSpecificPrivates[type].offset; pScreen->screenSpecificPrivates[type].created++; } else privates_size = global_keys[type].offset; global_keys[type].created++; if (xselinux_private[type]) global_keys[PRIVATE_XSELINUX].created++; if (privates_size == 0) addr = 0; *privates = addr; if (addr) memset(addr, '\0', privates_size); } void * _dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen, unsigned baseSize, unsigned clear, unsigned offset, DevPrivateType type) { unsigned totalSize; void *object; PrivatePtr privates; PrivatePtr *devPrivates; int privates_size; assert(type > PRIVATE_SCREEN); assert(type < PRIVATE_LAST); assert (screen_specific_private[type]); if (pScreen) privates_size = pScreen->screenSpecificPrivates[type].offset; else privates_size = global_keys[type].offset; /* round up so that pointer is aligned */ baseSize = (baseSize + sizeof(void *) - 1) & ~(sizeof(void *) - 1); totalSize = baseSize + privates_size; object = malloc(totalSize); if (!object) return NULL; memset(object, '\0', clear); privates = (PrivatePtr) (((char *) object) + baseSize); devPrivates = (PrivatePtr *) ((char *) object + offset); _dixInitScreenPrivates(pScreen, devPrivates, privates, type); return object; } int dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type) { assert(type >= PRIVATE_SCREEN); assert(type < PRIVATE_LAST); if (screen_specific_private[type]) return pScreen->screenSpecificPrivates[type].offset; else return global_keys[type].offset; } void dixPrivateUsage(void) { int objects = 0; int bytes = 0; int alloc = 0; DevPrivateType t; for (t = PRIVATE_XSELINUX + 1; t < PRIVATE_LAST; t++) { if (global_keys[t].offset) { ErrorF ("%s: %d objects of %d bytes = %d total bytes %d private allocs\n", key_names[t], global_keys[t].created, global_keys[t].offset, global_keys[t].created * global_keys[t].offset, global_keys[t].allocated); bytes += global_keys[t].created * global_keys[t].offset; objects += global_keys[t].created; alloc += global_keys[t].allocated; } } ErrorF("TOTAL: %d objects, %d bytes, %d allocs\n", objects, bytes, alloc); } void dixResetPrivates(void) { DevPrivateType t; for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { DevPrivateKey key, next; for (key = global_keys[t].key; key; key = next) { next = key->next; key->offset = 0; key->initialized = FALSE; key->size = 0; key->type = 0; if (key->allocated) free(key); } if (global_keys[t].created) { ErrorF("%d %ss still allocated at reset\n", global_keys[t].created, key_names[t]); dixPrivateUsage(); } global_keys[t].key = NULL; global_keys[t].offset = 0; global_keys[t].created = 0; global_keys[t].allocated = 0; } } Bool dixPrivatesCreated(DevPrivateType type) { if (global_keys[type].created) return TRUE; else return FALSE; } xorg-server-21.1.16/dix/property.c0000644000175000017500000004701514757411105012456 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "windowstr.h" #include "propertyst.h" #include "dixstruct.h" #include "dispatch.h" #include "swaprep.h" #include "xace.h" /***************************************************************** * Property Stuff * * dixLookupProperty, dixChangeProperty, DeleteProperty * * Properties belong to windows. The list of properties should not be * traversed directly. Instead, use the three functions listed above. * *****************************************************************/ #ifdef notdef static void PrintPropertys(WindowPtr pWin) { PropertyPtr pProp; int j; pProp = pWin->userProps; while (pProp) { ErrorF("[dix] %x %x\n", pProp->propertyName, pProp->type); ErrorF("[dix] property format: %d\n", pProp->format); ErrorF("[dix] property data: \n"); for (j = 0; j < (pProp->format / 8) * pProp->size; j++) ErrorF("[dix] %c\n", pProp->data[j]); pProp = pProp->next; } } #endif int dixLookupProperty(PropertyPtr *result, WindowPtr pWin, Atom propertyName, ClientPtr client, Mask access_mode) { PropertyPtr pProp; int rc = BadMatch; client->errorValue = propertyName; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) if (pProp->propertyName == propertyName) break; if (pProp) rc = XaceHookPropertyAccess(client, pWin, &pProp, access_mode); *result = pProp; return rc; } CallbackListPtr PropertyStateCallback; static void deliverPropertyNotifyEvent(WindowPtr pWin, int state, PropertyPtr pProp) { xEvent event; PropertyStateRec rec = { .win = pWin, .prop = pProp, .state = state }; UpdateCurrentTimeIf(); event = (xEvent) { .u.property.window = pWin->drawable.id, .u.property.state = state, .u.property.atom = pProp->propertyName, .u.property.time = currentTime.milliseconds, }; event.u.u.type = PropertyNotify; CallCallbacks(&PropertyStateCallback, &rec); DeliverEvents(pWin, &event, 1, (WindowPtr) NULL); } int ProcRotateProperties(ClientPtr client) { int i, j, delta, rc; REQUEST(xRotatePropertiesReq); WindowPtr pWin; Atom *atoms; PropertyPtr *props; /* array of pointer */ PropertyPtr pProp, saved; REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); UpdateCurrentTime(); rc = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (rc != Success || stuff->nAtoms <= 0) return rc; atoms = (Atom *) &stuff[1]; props = xallocarray(stuff->nAtoms, sizeof(PropertyPtr)); saved = xallocarray(stuff->nAtoms, sizeof(PropertyRec)); if (!props || !saved) { rc = BadAlloc; goto out; } for (i = 0; i < stuff->nAtoms; i++) { if (!ValidAtom(atoms[i])) { rc = BadAtom; client->errorValue = atoms[i]; goto out; } for (j = i + 1; j < stuff->nAtoms; j++) if (atoms[j] == atoms[i]) { rc = BadMatch; goto out; } rc = dixLookupProperty(&pProp, pWin, atoms[i], client, DixReadAccess | DixWriteAccess); if (rc != Success) goto out; props[i] = pProp; saved[i] = *pProp; } delta = stuff->nPositions; /* If the rotation is a complete 360 degrees, then moving the properties around and generating PropertyNotify events should be skipped. */ if (abs(delta) % stuff->nAtoms) { while (delta < 0) /* faster if abs value is small */ delta += stuff->nAtoms; for (i = 0; i < stuff->nAtoms; i++) { j = (i + delta) % stuff->nAtoms; deliverPropertyNotifyEvent(pWin, PropertyNewValue, props[i]); /* Preserve name and devPrivates */ props[j]->type = saved[i].type; props[j]->format = saved[i].format; props[j]->size = saved[i].size; props[j]->data = saved[i].data; } } out: free(saved); free(props); return rc; } int ProcChangeProperty(ClientPtr client) { WindowPtr pWin; char format, mode; unsigned long len; int sizeInBytes, err; uint64_t totalSize; REQUEST(xChangePropertyReq); REQUEST_AT_LEAST_SIZE(xChangePropertyReq); UpdateCurrentTime(); format = stuff->format; mode = stuff->mode; if ((mode != PropModeReplace) && (mode != PropModeAppend) && (mode != PropModePrepend)) { client->errorValue = mode; return BadValue; } if ((format != 8) && (format != 16) && (format != 32)) { client->errorValue = format; return BadValue; } len = stuff->nUnits; if (len > bytes_to_int32(0xffffffff - sizeof(xChangePropertyReq))) return BadLength; sizeInBytes = format >> 3; totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); err = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (err != Success) return err; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if (!ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } err = dixChangeWindowProperty(client, pWin, stuff->property, stuff->type, (int) format, (int) mode, len, &stuff[1], TRUE); if (err != Success) return err; else return Success; } int dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, const void *value, Bool sendevent) { PropertyPtr pProp; PropertyRec savedProp; int sizeInBytes, totalSize, rc; unsigned char *data; Mask access_mode; sizeInBytes = format >> 3; totalSize = len * sizeInBytes; access_mode = (mode == PropModeReplace) ? DixWriteAccess : DixBlendAccess; /* first see if property already exists */ rc = dixLookupProperty(&pProp, pWin, property, pClient, access_mode); if (rc == BadMatch) { /* just add to list */ if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; pProp = dixAllocateObjectWithPrivates(PropertyRec, PRIVATE_PROPERTY); if (!pProp) return BadAlloc; data = malloc(totalSize); if (totalSize) { if (!data) { dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); return BadAlloc; } memcpy(data, value, totalSize); } pProp->propertyName = property; pProp->type = type; pProp->format = format; pProp->data = data; pProp->size = len; rc = XaceHookPropertyAccess(pClient, pWin, &pProp, DixCreateAccess | DixWriteAccess); if (rc != Success) { free(data); dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); pClient->errorValue = property; return rc; } pProp->next = pWin->optional->userProps; pWin->optional->userProps = pProp; } else if (rc == Success) { /* To append or prepend to a property the request format and type must match those of the already defined property. The existing format and type are irrelevant when using the mode "PropModeReplace" since they will be written over. */ if ((format != pProp->format) && (mode != PropModeReplace)) return BadMatch; if ((pProp->type != type) && (mode != PropModeReplace)) return BadMatch; /* save the old values for later */ savedProp = *pProp; if (mode == PropModeReplace) { data = malloc(totalSize); if (totalSize) { if (!data) return BadAlloc; memcpy(data, value, totalSize); } pProp->data = data; pProp->size = len; pProp->type = type; pProp->format = format; } else if (len == 0) { /* do nothing */ } else if (mode == PropModeAppend) { data = xallocarray(pProp->size + len, sizeInBytes); if (!data) return BadAlloc; memcpy(data, pProp->data, pProp->size * sizeInBytes); memcpy(data + pProp->size * sizeInBytes, value, totalSize); pProp->data = data; pProp->size += len; } else if (mode == PropModePrepend) { data = xallocarray(len + pProp->size, sizeInBytes); if (!data) return BadAlloc; memcpy(data + totalSize, pProp->data, pProp->size * sizeInBytes); memcpy(data, value, totalSize); pProp->data = data; pProp->size += len; } /* Allow security modules to check the new content */ access_mode |= DixPostAccess; rc = XaceHookPropertyAccess(pClient, pWin, &pProp, access_mode); if (rc == Success) { if (savedProp.data != pProp->data) free(savedProp.data); } else { if (savedProp.data != pProp->data) free(pProp->data); *pProp = savedProp; return rc; } } else return rc; if (sendevent) deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp); return Success; } int DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) { PropertyPtr pProp, prevProp; int rc; rc = dixLookupProperty(&pProp, pWin, propName, client, DixDestroyAccess); if (rc == BadMatch) return Success; /* Succeed if property does not exist */ if (rc == Success) { if (pWin->optional->userProps == pProp) { /* Takes care of head */ if (!(pWin->optional->userProps = pProp->next)) CheckWindowOptionalNeed(pWin); } else { /* Need to traverse to find the previous element */ prevProp = pWin->optional->userProps; while (prevProp->next != pProp) prevProp = prevProp->next; prevProp->next = pProp->next; } deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp); free(pProp->data); dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); } return rc; } void DeleteAllWindowProperties(WindowPtr pWin) { PropertyPtr pProp, pNextProp; pProp = wUserProps(pWin); while (pProp) { deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp); pNextProp = pProp->next; free(pProp->data); dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); pProp = pNextProp; } if (pWin->optional) pWin->optional->userProps = NULL; } static int NullPropertyReply(ClientPtr client, ATOM propertyType, int format) { xGetPropertyReply reply = { .type = X_Reply, .format = format, .sequenceNumber = client->sequence, .length = 0, .propertyType = propertyType, .bytesAfter = 0, .nItems = 0 }; WriteReplyToClient(client, sizeof(xGenericReply), &reply); return Success; } /***************** * GetProperty * If type Any is specified, returns the property from the specified * window regardless of its type. If a type is specified, returns the * property only if its type equals the specified type. * If delete is True and a property is returned, the property is also * deleted from the window and a PropertyNotify event is generated on the * window. *****************/ int ProcGetProperty(ClientPtr client) { PropertyPtr pProp, prevProp; unsigned long n, len, ind; int rc; WindowPtr pWin; xGetPropertyReply reply; Mask win_mode = DixGetPropAccess, prop_mode = DixReadAccess; REQUEST(xGetPropertyReq); REQUEST_SIZE_MATCH(xGetPropertyReq); if (stuff->delete) { UpdateCurrentTime(); win_mode |= DixSetPropAccess; prop_mode |= DixDestroyAccess; } rc = dixLookupWindow(&pWin, stuff->window, client, win_mode); if (rc != Success) return rc; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { client->errorValue = stuff->delete; return BadValue; } if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } rc = dixLookupProperty(&pProp, pWin, stuff->property, client, prop_mode); if (rc == BadMatch) return NullPropertyReply(client, None, 0); else if (rc != Success) return rc; /* If the request type and actual type don't match. Return the property information, but not the data. */ if (((stuff->type != pProp->type) && (stuff->type != AnyPropertyType)) ) { reply = (xGetPropertyReply) { .type = X_Reply, .sequenceNumber = client->sequence, .bytesAfter = pProp->size, .format = pProp->format, .length = 0, .nItems = 0, .propertyType = pProp->type }; WriteReplyToClient(client, sizeof(xGenericReply), &reply); return Success; } /* * Return type, format, value to client */ n = (pProp->format / 8) * pProp->size; /* size (bytes) of prop */ ind = stuff->longOffset << 2; /* If longOffset is invalid such that it causes "len" to be negative, it's a value error. */ if (n < ind) { client->errorValue = stuff->longOffset; return BadValue; } len = min(n - ind, 4 * stuff->longLength); reply = (xGetPropertyReply) { .type = X_Reply, .sequenceNumber = client->sequence, .bytesAfter = n - (ind + len), .format = pProp->format, .length = bytes_to_int32(len), .nItems = len / (pProp->format / 8), .propertyType = pProp->type }; if (stuff->delete && (reply.bytesAfter == 0)) deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp); WriteReplyToClient(client, sizeof(xGenericReply), &reply); if (len) { switch (reply.format) { case 32: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } WriteSwappedDataToClient(client, len, (char *) pProp->data + ind); } if (stuff->delete && (reply.bytesAfter == 0)) { /* Delete the Property */ if (pWin->optional->userProps == pProp) { /* Takes care of head */ if (!(pWin->optional->userProps = pProp->next)) CheckWindowOptionalNeed(pWin); } else { /* Need to traverse to find the previous element */ prevProp = pWin->optional->userProps; while (prevProp->next != pProp) prevProp = prevProp->next; prevProp->next = pProp->next; } free(pProp->data); dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); } return Success; } int ProcListProperties(ClientPtr client) { Atom *pAtoms = NULL, *temppAtoms; xListPropertiesReply xlpr; int rc, numProps = 0; WindowPtr pWin; PropertyPtr pProp, realProp; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess); if (rc != Success) return rc; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) numProps++; if (numProps) { pAtoms = xallocarray(numProps, sizeof(Atom)); if (!pAtoms) return BadAlloc; numProps = 0; temppAtoms = pAtoms; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) { realProp = pProp; rc = XaceHookPropertyAccess(client, pWin, &realProp, DixGetAttrAccess); if (rc == Success && realProp == pProp) { *temppAtoms++ = pProp->propertyName; numProps++; } } } xlpr = (xListPropertiesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(numProps * sizeof(Atom)), .nProperties = numProps }; WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); if (numProps) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); free(pAtoms); } return Success; } int ProcDeleteProperty(ClientPtr client) { WindowPtr pWin; REQUEST(xDeletePropertyReq); int result; REQUEST_SIZE_MATCH(xDeletePropertyReq); UpdateCurrentTime(); result = dixLookupWindow(&pWin, stuff->window, client, DixSetPropAccess); if (result != Success) return result; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } return DeleteProperty(client, pWin, stuff->property); } xorg-server-21.1.16/dix/ptrveloc.c0000644000175000017500000010636014757411105012427 /* * * Copyright © 2006-2009 Simon Thum simon dot thum at gmx dot de * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include /***************************************************************************** * Predictable pointer acceleration * * 2006-2009 by Simon Thum (simon [dot] thum [at] gmx de) * * Serves 3 complementary functions: * 1) provide a sophisticated ballistic velocity estimate to improve * the relation between velocity (of the device) and acceleration * 2) make arbitrary acceleration profiles possible * 3) decelerate by two means (constant and adaptive) if enabled * * Important concepts are the * * - Scheme * which selects the basic algorithm * (see devices.c/InitPointerAccelerationScheme) * - Profile * which returns an acceleration * for a given velocity * * The profile can be selected by the user at runtime. * The classic profile is intended to cleanly perform old-style * function selection (threshold =/!= 0) * ****************************************************************************/ /* fwds */ static double SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc); static PointerAccelerationProfileFunc GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); static BOOL InitializePredictableAccelerationProperties(DeviceIntPtr, DeviceVelocityPtr, PredictableAccelSchemePtr); static BOOL DeletePredictableAccelerationProperties(DeviceIntPtr, PredictableAccelSchemePtr); /*#define PTRACCEL_DEBUGGING*/ #ifdef PTRACCEL_DEBUGGING #define DebugAccelF(...) ErrorFSigSafe("dix/ptraccel: " __VA_ARGS__) #else #define DebugAccelF(...) /* */ #endif /******************************** * Init/Uninit *******************************/ /* some int which is not a profile number */ #define PROFILE_UNINITIALIZE (-100) /** * Init DeviceVelocity struct so it should match the average case */ void InitVelocityData(DeviceVelocityPtr vel) { memset(vel, 0, sizeof(DeviceVelocityRec)); vel->corr_mul = 10.0; /* dots per 10 millisecond should be usable */ vel->const_acceleration = 1.0; /* no acceleration/deceleration */ vel->reset_time = 300; vel->use_softening = 1; vel->min_acceleration = 1.0; /* don't decelerate */ vel->max_rel_diff = 0.2; vel->max_diff = 1.0; vel->initial_range = 2; vel->average_accel = TRUE; SetAccelerationProfile(vel, AccelProfileClassic); InitTrackers(vel, 16); } /** * Clean up DeviceVelocityRec */ void FreeVelocityData(DeviceVelocityPtr vel) { free(vel->tracker); SetAccelerationProfile(vel, PROFILE_UNINITIALIZE); } /** * Init predictable scheme */ Bool InitPredictableAccelerationScheme(DeviceIntPtr dev, ValuatorAccelerationPtr protoScheme) { DeviceVelocityPtr vel; ValuatorAccelerationRec scheme; PredictableAccelSchemePtr schemeData; scheme = *protoScheme; vel = calloc(1, sizeof(DeviceVelocityRec)); schemeData = calloc(1, sizeof(PredictableAccelSchemeRec)); if (!vel || !schemeData) { free(vel); free(schemeData); return FALSE; } InitVelocityData(vel); schemeData->vel = vel; scheme.accelData = schemeData; if (!InitializePredictableAccelerationProperties(dev, vel, schemeData)) { FreeVelocityData(vel); free(vel); free(schemeData); return FALSE; } /* all fine, assign scheme to device */ dev->valuator->accelScheme = scheme; return TRUE; } /** * Uninit scheme */ void AccelerationDefaultCleanup(DeviceIntPtr dev) { DeviceVelocityPtr vel = GetDevicePredictableAccelData(dev); if (vel) { /* the proper guarantee would be that we're not inside of * AccelSchemeProc(), but that seems impossible. Schemes don't get * switched often anyway. */ input_lock(); dev->valuator->accelScheme.AccelSchemeProc = NULL; FreeVelocityData(vel); free(vel); DeletePredictableAccelerationProperties(dev, (PredictableAccelSchemePtr) dev->valuator->accelScheme. accelData); free(dev->valuator->accelScheme.accelData); dev->valuator->accelScheme.accelData = NULL; input_unlock(); } } /************************* * Input property support ************************/ /** * choose profile */ static int AccelSetProfileProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, BOOL checkOnly) { DeviceVelocityPtr vel; int profile, *ptr = &profile; int rc; int nelem = 1; if (atom != XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER)) return Success; vel = GetDevicePredictableAccelData(dev); if (!vel) return BadValue; rc = XIPropToInt(val, &nelem, &ptr); if (checkOnly) { if (rc) return rc; if (GetAccelerationProfile(vel, profile) == NULL) return BadValue; } else SetAccelerationProfile(vel, profile); return Success; } static long AccelInitProfileProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) { int profile = vel->statistics.profile_number; Atom prop_profile_number = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); XIChangeDeviceProperty(dev, prop_profile_number, XA_INTEGER, 32, PropModeReplace, 1, &profile, FALSE); XISetDevicePropertyDeletable(dev, prop_profile_number, FALSE); return XIRegisterPropertyHandler(dev, AccelSetProfileProperty, NULL, NULL); } /** * constant deceleration */ static int AccelSetDecelProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, BOOL checkOnly) { DeviceVelocityPtr vel; float v, *ptr = &v; int rc; int nelem = 1; if (atom != XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION)) return Success; vel = GetDevicePredictableAccelData(dev); if (!vel) return BadValue; rc = XIPropToFloat(val, &nelem, &ptr); if (checkOnly) { if (rc) return rc; return (v > 0) ? Success : BadValue; } vel->const_acceleration = 1 / v; return Success; } static long AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) { float fval = 1.0 / vel->const_acceleration; Atom prop_const_decel = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); XIChangeDeviceProperty(dev, prop_const_decel, XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, 1, &fval, FALSE); XISetDevicePropertyDeletable(dev, prop_const_decel, FALSE); return XIRegisterPropertyHandler(dev, AccelSetDecelProperty, NULL, NULL); } /** * adaptive deceleration */ static int AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, BOOL checkOnly) { DeviceVelocityPtr veloc; float v, *ptr = &v; int rc; int nelem = 1; if (atom != XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION)) return Success; veloc = GetDevicePredictableAccelData(dev); if (!veloc) return BadValue; rc = XIPropToFloat(val, &nelem, &ptr); if (checkOnly) { if (rc) return rc; return (v >= 1.0f) ? Success : BadValue; } if (v >= 1.0f) veloc->min_acceleration = 1 / v; return Success; } static long AccelInitAdaptDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) { float fval = 1.0 / vel->min_acceleration; Atom prop_adapt_decel = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); XIChangeDeviceProperty(dev, prop_adapt_decel, XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, 1, &fval, FALSE); XISetDevicePropertyDeletable(dev, prop_adapt_decel, FALSE); return XIRegisterPropertyHandler(dev, AccelSetAdaptDecelProperty, NULL, NULL); } /** * velocity scaling */ static int AccelSetScaleProperty(DeviceIntPtr dev, Atom atom, XIPropertyValuePtr val, BOOL checkOnly) { DeviceVelocityPtr vel; float v, *ptr = &v; int rc; int nelem = 1; if (atom != XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING)) return Success; vel = GetDevicePredictableAccelData(dev); if (!vel) return BadValue; rc = XIPropToFloat(val, &nelem, &ptr); if (checkOnly) { if (rc) return rc; return (v > 0) ? Success : BadValue; } if (v > 0) vel->corr_mul = v; return Success; } static long AccelInitScaleProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) { float fval = vel->corr_mul; Atom prop_velo_scale = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); XIChangeDeviceProperty(dev, prop_velo_scale, XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, 1, &fval, FALSE); XISetDevicePropertyDeletable(dev, prop_velo_scale, FALSE); return XIRegisterPropertyHandler(dev, AccelSetScaleProperty, NULL, NULL); } static BOOL InitializePredictableAccelerationProperties(DeviceIntPtr dev, DeviceVelocityPtr vel, PredictableAccelSchemePtr schemeData) { int num_handlers = 4; if (!vel) return FALSE; schemeData->prop_handlers = calloc(num_handlers, sizeof(long)); if (!schemeData->prop_handlers) return FALSE; schemeData->num_prop_handlers = num_handlers; schemeData->prop_handlers[0] = AccelInitProfileProperty(dev, vel); schemeData->prop_handlers[1] = AccelInitDecelProperty(dev, vel); schemeData->prop_handlers[2] = AccelInitAdaptDecelProperty(dev, vel); schemeData->prop_handlers[3] = AccelInitScaleProperty(dev, vel); return TRUE; } BOOL DeletePredictableAccelerationProperties(DeviceIntPtr dev, PredictableAccelSchemePtr scheme) { DeviceVelocityPtr vel; Atom prop; int i; prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); XIDeleteDeviceProperty(dev, prop, FALSE); prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); XIDeleteDeviceProperty(dev, prop, FALSE); prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); XIDeleteDeviceProperty(dev, prop, FALSE); prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); XIDeleteDeviceProperty(dev, prop, FALSE); vel = GetDevicePredictableAccelData(dev); if (vel) { for (i = 0; i < scheme->num_prop_handlers; i++) if (scheme->prop_handlers[i]) XIUnregisterPropertyHandler(dev, scheme->prop_handlers[i]); } free(scheme->prop_handlers); scheme->prop_handlers = NULL; scheme->num_prop_handlers = 0; return TRUE; } /********************* * Tracking logic ********************/ void InitTrackers(DeviceVelocityPtr vel, int ntracker) { if (ntracker < 1) { ErrorF("invalid number of trackers\n"); return; } free(vel->tracker); vel->tracker = (MotionTrackerPtr) calloc(ntracker, sizeof(MotionTracker)); vel->num_tracker = ntracker; } enum directions { N = (1 << 0), NE = (1 << 1), E = (1 << 2), SE = (1 << 3), S = (1 << 4), SW = (1 << 5), W = (1 << 6), NW = (1 << 7), UNDEFINED = 0xFF }; /** * return a bit field of possible directions. * There's no reason against widening to more precise directions (<45 degrees), * should it not perform well. All this is needed for is sort out non-linear * motion, so precision isn't paramount. However, one should not flag direction * too narrow, since it would then cut the linear segment to zero size way too * often. * * @return A bitmask for N, NE, S, SE, etc. indicating the directions for * this movement. */ static int DoGetDirection(int dx, int dy) { int dir = 0; /* on insignificant mickeys, flag 135 degrees */ if (abs(dx) < 2 && abs(dy) < 2) { /* first check diagonal cases */ if (dx > 0 && dy > 0) dir = E | SE | S; else if (dx > 0 && dy < 0) dir = N | NE | E; else if (dx < 0 && dy < 0) dir = W | NW | N; else if (dx < 0 && dy > 0) dir = W | SW | S; /* check axis-aligned directions */ else if (dx > 0) dir = NE | E | SE; else if (dx < 0) dir = NW | W | SW; else if (dy > 0) dir = SE | S | SW; else if (dy < 0) dir = NE | N | NW; else dir = UNDEFINED; /* shouldn't happen */ } else { /* compute angle and set appropriate flags */ double r; int i1, i2; r = atan2(dy, dx); /* find direction. * * Add 360° to avoid r become negative since C has no well-defined * modulo for such cases. Then divide by 45° to get the octant * number, e.g. * 0 <= r <= 1 is [0-45]° * 1 <= r <= 2 is [45-90]° * etc. * But we add extra 90° to match up with our N, S, etc. defines up * there, rest stays the same. */ r = (r + (M_PI * 2.5)) / (M_PI / 4); /* this intends to flag 2 directions (45 degrees), * except on very well-aligned mickeys. */ i1 = (int) (r + 0.1) % 8; i2 = (int) (r + 0.9) % 8; if (i1 < 0 || i1 > 7 || i2 < 0 || i2 > 7) dir = UNDEFINED; /* shouldn't happen */ else dir = (1 << i1 | 1 << i2); } return dir; } #define DIRECTION_CACHE_RANGE 5 #define DIRECTION_CACHE_SIZE (DIRECTION_CACHE_RANGE*2+1) /* cache DoGetDirection(). * To avoid excessive use of direction calculation, cache the values for * [-5..5] for both x/y. Anything outside of that is calculated on the fly. * * @return A bitmask for N, NE, S, SE, etc. indicating the directions for * this movement. */ static int GetDirection(int dx, int dy) { static int cache[DIRECTION_CACHE_SIZE][DIRECTION_CACHE_SIZE]; int dir; if (abs(dx) <= DIRECTION_CACHE_RANGE && abs(dy) <= DIRECTION_CACHE_RANGE) { /* cacheable */ dir = cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy]; if (dir == 0) { dir = DoGetDirection(dx, dy); cache[DIRECTION_CACHE_RANGE + dx][DIRECTION_CACHE_RANGE + dy] = dir; } } else { /* non-cacheable */ dir = DoGetDirection(dx, dy); } return dir; } #undef DIRECTION_CACHE_RANGE #undef DIRECTION_CACHE_SIZE /* convert offset (age) to array index */ #define TRACKER_INDEX(s, d) (((s)->num_tracker + (s)->cur_tracker - (d)) % (s)->num_tracker) #define TRACKER(s, d) &(s)->tracker[TRACKER_INDEX(s,d)] /** * Add the delta motion to each tracker, then reset the latest tracker to * 0/0 and set it as the current one. */ static inline void FeedTrackers(DeviceVelocityPtr vel, double dx, double dy, int cur_t) { int n; for (n = 0; n < vel->num_tracker; n++) { vel->tracker[n].dx += dx; vel->tracker[n].dy += dy; } n = (vel->cur_tracker + 1) % vel->num_tracker; vel->tracker[n].dx = 0.0; vel->tracker[n].dy = 0.0; vel->tracker[n].time = cur_t; vel->tracker[n].dir = GetDirection(dx, dy); DebugAccelF("motion [dx: %f dy: %f dir:%d diff: %d]\n", dx, dy, vel->tracker[n].dir, cur_t - vel->tracker[vel->cur_tracker].time); vel->cur_tracker = n; } /** * calc velocity for given tracker, with * velocity scaling. * This assumes linear motion. */ static double CalcTracker(const MotionTracker * tracker, int cur_t) { double dist = sqrt(tracker->dx * tracker->dx + tracker->dy * tracker->dy); int dtime = cur_t - tracker->time; if (dtime > 0) return dist / dtime; else return 0; /* synonymous for NaN, since we're not C99 */ } /* find the most plausible velocity. That is, the most distant * (in time) tracker which isn't too old, the movement vector was * in the same octant, and where the velocity is within an * acceptable range to the initial velocity. * * @return The tracker's velocity or 0 if the above conditions are unmet */ static double QueryTrackers(DeviceVelocityPtr vel, int cur_t) { int offset, dir = UNDEFINED, used_offset = -1, age_ms; /* initial velocity: a low-offset, valid velocity */ double initial_velocity = 0, result = 0, velocity_diff; double velocity_factor = vel->corr_mul * vel->const_acceleration; /* premultiply */ /* loop from current to older data */ for (offset = 1; offset < vel->num_tracker; offset++) { MotionTracker *tracker = TRACKER(vel, offset); double tracker_velocity; age_ms = cur_t - tracker->time; /* bail out if data is too old and protect from overrun */ if (age_ms >= vel->reset_time || age_ms < 0) { DebugAccelF("query: tracker too old (reset after %d, age is %d)\n", vel->reset_time, age_ms); break; } /* * this heuristic avoids using the linear-motion velocity formula * in CalcTracker() on motion that isn't exactly linear. So to get * even more precision we could subdivide as a final step, so possible * non-linearities are accounted for. */ dir &= tracker->dir; if (dir == 0) { /* we've changed octant of movement (e.g. NE → NW) */ DebugAccelF("query: no longer linear\n"); /* instead of breaking it we might also inspect the partition after, * but actual improvement with this is probably rare. */ break; } tracker_velocity = CalcTracker(tracker, cur_t) * velocity_factor; if ((initial_velocity == 0 || offset <= vel->initial_range) && tracker_velocity != 0) { /* set initial velocity and result */ result = initial_velocity = tracker_velocity; used_offset = offset; } else if (initial_velocity != 0 && tracker_velocity != 0) { velocity_diff = fabs(initial_velocity - tracker_velocity); if (velocity_diff > vel->max_diff && velocity_diff / (initial_velocity + tracker_velocity) >= vel->max_rel_diff) { /* we're not in range, quit - it won't get better. */ DebugAccelF("query: tracker too different:" " old %2.2f initial %2.2f diff: %2.2f\n", tracker_velocity, initial_velocity, velocity_diff); break; } /* we're in range with the initial velocity, * so this result is likely better * (it contains more information). */ result = tracker_velocity; used_offset = offset; } } if (offset == vel->num_tracker) { DebugAccelF("query: last tracker in effect\n"); used_offset = vel->num_tracker - 1; } if (used_offset >= 0) { #ifdef PTRACCEL_DEBUGGING MotionTracker *tracker = TRACKER(vel, used_offset); DebugAccelF("result: offset %i [dx: %f dy: %f diff: %i]\n", used_offset, tracker->dx, tracker->dy, cur_t - tracker->time); #endif } return result; } #undef TRACKER_INDEX #undef TRACKER /** * Perform velocity approximation based on 2D 'mickeys' (mouse motion delta). * return true if non-visible state reset is suggested */ BOOL ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time) { double velocity; vel->last_velocity = vel->velocity; FeedTrackers(vel, dx, dy, time); velocity = QueryTrackers(vel, time); DebugAccelF("velocity is %f\n", velocity); vel->velocity = velocity; return velocity == 0; } /** * this flattens significant ( > 1) mickeys a little bit for more steady * constant-velocity response */ static inline double ApplySimpleSoftening(double prev_delta, double delta) { double result = delta; if (delta < -1.0 || delta > 1.0) { if (delta > prev_delta) result -= 0.5; else if (delta < prev_delta) result += 0.5; } return result; } /** * Soften the delta based on previous deltas stored in vel. * * @param[in,out] fdx Delta X, modified in-place. * @param[in,out] fdx Delta Y, modified in-place. */ static void ApplySoftening(DeviceVelocityPtr vel, double *fdx, double *fdy) { if (vel->use_softening) { *fdx = ApplySimpleSoftening(vel->last_dx, *fdx); *fdy = ApplySimpleSoftening(vel->last_dy, *fdy); } } static void ApplyConstantDeceleration(DeviceVelocityPtr vel, double *fdx, double *fdy) { *fdx *= vel->const_acceleration; *fdy *= vel->const_acceleration; } /* * compute the acceleration for given velocity and enforce min_acceleration */ double BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { double result; result = vel->Profile(dev, vel, velocity, threshold, acc); /* enforce min_acceleration */ if (result < vel->min_acceleration) result = vel->min_acceleration; return result; } /** * Compute acceleration. Takes into account averaging, nv-reset, etc. * If the velocity has changed, an average is taken of 6 velocity factors: * current velocity, last velocity and 4 times the average between the two. */ static double ComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, double threshold, double acc) { double result; if (vel->velocity <= 0) { DebugAccelF("profile skipped\n"); /* * If we have no idea about device velocity, don't pretend it. */ return 1; } if (vel->average_accel && vel->velocity != vel->last_velocity) { /* use simpson's rule to average acceleration between * current and previous velocity. * Though being the more natural choice, it causes a minor delay * in comparison, so it can be disabled. */ result = BasicComputeAcceleration(dev, vel, vel->velocity, threshold, acc); result += BasicComputeAcceleration(dev, vel, vel->last_velocity, threshold, acc); result += 4.0 * BasicComputeAcceleration(dev, vel, (vel->last_velocity + vel->velocity) / 2, threshold, acc); result /= 6.0; DebugAccelF("profile average [%.2f ... %.2f] is %.3f\n", vel->velocity, vel->last_velocity, result); } else { result = BasicComputeAcceleration(dev, vel, vel->velocity, threshold, acc); DebugAccelF("profile sample [%.2f] is %.3f\n", vel->velocity, result); } return result; } /***************************************** * Acceleration functions and profiles ****************************************/ /** * Polynomial function similar previous one, but with f(1) = 1 */ static double PolynomialAccelerationProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double ignored, double acc) { return pow(velocity, (acc - 1.0) * 0.5); } /** * returns acceleration for velocity. * This profile selects the two functions like the old scheme did */ static double ClassicProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { if (threshold > 0) { return SimpleSmoothProfile(dev, vel, velocity, threshold, acc); } else { return PolynomialAccelerationProfile(dev, vel, velocity, 0, acc); } } /** * Power profile * This has a completely smooth transition curve, i.e. no jumps in the * derivatives. * * This has the expense of overall response dependency on min-acceleration. * In effect, min_acceleration mimics const_acceleration in this profile. */ static double PowerProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { double vel_dist; acc = (acc - 1.0) * 0.1 + 1.0; /* without this, acc of 2 is unuseable */ if (velocity <= threshold) return vel->min_acceleration; vel_dist = velocity - threshold; return (pow(acc, vel_dist)) * vel->min_acceleration; } /** * just a smooth function in [0..1] -> [0..1] * - point symmetry at 0.5 * - f'(0) = f'(1) = 0 * - starts faster than a sinoid * - smoothness C1 (Cinf if you dare to ignore endpoints) */ static inline double CalcPenumbralGradient(double x) { x *= 2.0; x -= 1.0; return 0.5 + (x * sqrt(1.0 - x * x) + asin(x)) / M_PI; } /** * acceleration function similar to classic accelerated/unaccelerated, * but with smooth transition in between (and towards zero for adaptive dec.). */ static double SimpleSmoothProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { if (velocity < 1.0f) return CalcPenumbralGradient(0.5 + velocity * 0.5) * 2.0f - 1.0f; if (threshold < 1.0f) threshold = 1.0f; if (velocity <= threshold) return 1; velocity /= threshold; if (velocity >= acc) return acc; else return 1.0f + (CalcPenumbralGradient(velocity / acc) * (acc - 1.0f)); } /** * This profile uses the first half of the penumbral gradient as a start * and then scales linearly. */ static double SmoothLinearProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { double res, nv; if (acc > 1.0) acc -= 1.0; /*this is so acc = 1 is no acceleration */ else return 1.0; nv = (velocity - threshold) * acc * 0.5; if (nv < 0) { res = 0; } else if (nv < 2) { res = CalcPenumbralGradient(nv * 0.25) * 2.0; } else { nv -= 2.0; res = nv * 2.0 / M_PI /* steepness of gradient at 0.5 */ + 1.0; /* gradient crosses 2|1 */ } res += vel->min_acceleration; return res; } /** * From 0 to threshold, the response graduates smoothly from min_accel to * acceleration. Beyond threshold it is exactly the specified acceleration. */ static double SmoothLimitedProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { double res; if (velocity >= threshold || threshold == 0.0) return acc; velocity /= threshold; /* should be [0..1[ now */ res = CalcPenumbralGradient(velocity) * (acc - vel->min_acceleration); return vel->min_acceleration + res; } static double LinearProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { return acc * velocity; } static double NoProfile(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc) { return 1.0; } static PointerAccelerationProfileFunc GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num) { switch (profile_num) { case AccelProfileClassic: return ClassicProfile; case AccelProfileDeviceSpecific: return vel->deviceSpecificProfile; case AccelProfilePolynomial: return PolynomialAccelerationProfile; case AccelProfileSmoothLinear: return SmoothLinearProfile; case AccelProfileSimple: return SimpleSmoothProfile; case AccelProfilePower: return PowerProfile; case AccelProfileLinear: return LinearProfile; case AccelProfileSmoothLimited: return SmoothLimitedProfile; case AccelProfileNone: return NoProfile; default: return NULL; } } /** * Set the profile by number. * Intended to make profiles exchangeable at runtime. * If you created a profile, give it a number here and in the header to * make it selectable. In case some profile-specific init is needed, here * would be a good place, since FreeVelocityData() also calls this with * PROFILE_UNINITIALIZE. * * returns FALSE if profile number is unavailable, TRUE otherwise. */ int SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num) { PointerAccelerationProfileFunc profile; profile = GetAccelerationProfile(vel, profile_num); if (profile == NULL && profile_num != PROFILE_UNINITIALIZE) return FALSE; /* Here one could free old profile-private data */ free(vel->profile_private); vel->profile_private = NULL; /* Here one could init profile-private data */ vel->Profile = profile; vel->statistics.profile_number = profile_num; return TRUE; } /********************************************** * driver interaction **********************************************/ /** * device-specific profile * * The device-specific profile is intended as a hook for a driver * which may want to provide an own acceleration profile. * It should not rely on profile-private data, instead * it should do init/uninit in the driver (ie. with DEVICE_INIT and friends). * Users may override or choose it. */ void SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, PointerAccelerationProfileFunc profile) { if (vel) vel->deviceSpecificProfile = profile; } /** * Use this function to obtain a DeviceVelocityPtr for a device. Will return NULL if * the predictable acceleration scheme is not in effect. */ DeviceVelocityPtr GetDevicePredictableAccelData(DeviceIntPtr dev) { BUG_RETURN_VAL(!dev, NULL); if (dev->valuator && dev->valuator->accelScheme.AccelSchemeProc == acceleratePointerPredictable && dev->valuator->accelScheme.accelData != NULL) { return ((PredictableAccelSchemePtr) dev->valuator->accelScheme.accelData)->vel; } return NULL; } /******************************** * acceleration schemes *******************************/ /** * Modifies valuators in-place. * This version employs a velocity approximation algorithm to * enable fine-grained predictable acceleration profiles. */ void acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val, CARD32 evtime) { double dx = 0, dy = 0; DeviceVelocityPtr velocitydata = GetDevicePredictableAccelData(dev); Bool soften = TRUE; if (valuator_mask_num_valuators(val) == 0 || !velocitydata) return; if (velocitydata->statistics.profile_number == AccelProfileNone && velocitydata->const_acceleration == 1.0) { return; /*we're inactive anyway, so skip the whole thing. */ } if (valuator_mask_isset(val, 0)) { dx = valuator_mask_get_double(val, 0); } if (valuator_mask_isset(val, 1)) { dy = valuator_mask_get_double(val, 1); } if (dx != 0.0 || dy != 0.0) { /* reset non-visible state? */ if (ProcessVelocityData2D(velocitydata, dx, dy, evtime)) { soften = FALSE; } if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { double mult; /* invoke acceleration profile to determine acceleration */ mult = ComputeAcceleration(dev, velocitydata, dev->ptrfeed->ctrl.threshold, (double) dev->ptrfeed->ctrl.num / (double) dev->ptrfeed->ctrl.den); DebugAccelF("mult is %f\n", mult); if (mult != 1.0 || velocitydata->const_acceleration != 1.0) { if (mult > 1.0 && soften) ApplySoftening(velocitydata, &dx, &dy); ApplyConstantDeceleration(velocitydata, &dx, &dy); if (dx != 0.0) valuator_mask_set_double(val, 0, mult * dx); if (dy != 0.0) valuator_mask_set_double(val, 1, mult * dy); DebugAccelF("delta x:%.3f y:%.3f\n", mult * dx, mult * dy); } } } /* remember last motion delta (for softening/slow movement treatment) */ velocitydata->last_dx = dx; velocitydata->last_dy = dy; } /** * Originally a part of xf86PostMotionEvent; modifies valuators * in-place. Retained mostly for embedded scenarios. */ void acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val, CARD32 ignored) { double mult = 0.0, tmpf; double dx = 0.0, dy = 0.0; if (valuator_mask_isset(val, 0)) { dx = valuator_mask_get(val, 0); } if (valuator_mask_isset(val, 1)) { dy = valuator_mask_get(val, 1); } if (valuator_mask_num_valuators(val) == 0) return; if (dev->ptrfeed && dev->ptrfeed->ctrl.num) { /* modeled from xf86Events.c */ if (dev->ptrfeed->ctrl.threshold) { if ((fabs(dx) + fabs(dy)) >= dev->ptrfeed->ctrl.threshold) { if (dx != 0.0) { tmpf = (dx * (double) (dev->ptrfeed->ctrl.num)) / (double) (dev->ptrfeed->ctrl.den); valuator_mask_set_double(val, 0, tmpf); } if (dy != 0.0) { tmpf = (dy * (double) (dev->ptrfeed->ctrl.num)) / (double) (dev->ptrfeed->ctrl.den); valuator_mask_set_double(val, 1, tmpf); } } } else { mult = pow(dx * dx + dy * dy, ((double) (dev->ptrfeed->ctrl.num) / (double) (dev->ptrfeed->ctrl.den) - 1.0) / 2.0) / 2.0; if (dx != 0.0) valuator_mask_set_double(val, 0, mult * dx); if (dy != 0.0) valuator_mask_set_double(val, 1, mult * dy); } } } xorg-server-21.1.16/dix/region.c0000644000175000017500000013133114757411105012050 /*********************************************************** Copyright 1987, 1988, 1989, 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, 1988, 1989 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. ******************************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "regionstr.h" #include #include #include "gc.h" #include #undef assert #ifdef REGION_DEBUG #define assert(expr) { \ CARD32 *foo = NULL; \ if (!(expr)) { \ ErrorF("Assertion failed file %s, line %d: %s\n", \ __FILE__, __LINE__, #expr); \ *foo = 0xdeadbeef; /* to get a backtrace */ \ } \ } #else #define assert(expr) #endif #define good(reg) assert(RegionIsValid(reg)) /* * The functions in this file implement the Region abstraction used extensively * throughout the X11 sample server. A Region is simply a set of disjoint * (non-overlapping) rectangles, plus an "extent" rectangle which is the * smallest single rectangle that contains all the non-overlapping rectangles. * * A Region is implemented as a "y-x-banded" array of rectangles. This array * imposes two degrees of order. First, all rectangles are sorted by top side * y coordinate first (y1), and then by left side x coordinate (x1). * * Furthermore, the rectangles are grouped into "bands". Each rectangle in a * band has the same top y coordinate (y1), and each has the same bottom y * coordinate (y2). Thus all rectangles in a band differ only in their left * and right side (x1 and x2). Bands are implicit in the array of rectangles: * there is no separate list of band start pointers. * * The y-x band representation does not minimize rectangles. In particular, * if a rectangle vertically crosses a band (the rectangle has scanlines in * the y1 to y2 area spanned by the band), then the rectangle may be broken * down into two or more smaller rectangles stacked one atop the other. * * ----------- ----------- * | | | | band 0 * | | -------- ----------- -------- * | | | | in y-x banded | | | | band 1 * | | | | form is | | | | * ----------- | | ----------- -------- * | | | | band 2 * -------- -------- * * An added constraint on the rectangles is that they must cover as much * horizontal area as possible: no two rectangles within a band are allowed * to touch. * * Whenever possible, bands will be merged together to cover a greater vertical * distance (and thus reduce the number of rectangles). Two bands can be merged * only if the bottom of one touches the top of the other and they have * rectangles in the same places (of the same width, of course). * * Adam de Boor wrote most of the original region code. Joel McCormack * substantially modified or rewrote most of the core arithmetic routines, * and added RegionValidate in order to support several speed improvements * to miValidateTree. Bob Scheifler changed the representation to be more * compact when empty or a single rectangle, and did a bunch of gratuitous * reformatting. */ /* true iff two Boxes overlap */ #define EXTENTCHECK(r1,r2) \ (!( ((r1)->x2 <= (r2)->x1) || \ ((r1)->x1 >= (r2)->x2) || \ ((r1)->y2 <= (r2)->y1) || \ ((r1)->y1 >= (r2)->y2) ) ) /* true iff (x,y) is in Box */ #define INBOX(r,x,y) \ ( ((r)->x2 > x) && \ ((r)->x1 <= x) && \ ((r)->y2 > y) && \ ((r)->y1 <= y) ) /* true iff Box r1 contains Box r2 */ #define SUBSUMES(r1,r2) \ ( ((r1)->x1 <= (r2)->x1) && \ ((r1)->x2 >= (r2)->x2) && \ ((r1)->y1 <= (r2)->y1) && \ ((r1)->y2 >= (r2)->y2) ) #define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data) #define RECTALLOC_BAIL(pReg,n,bail) \ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ if (!RegionRectAlloc(pReg, n)) { goto bail; } #define RECTALLOC(pReg,n) \ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ if (!RegionRectAlloc(pReg, n)) { return FALSE; } #define ADDRECT(pNextRect,nx1,ny1,nx2,ny2) \ { \ pNextRect->x1 = nx1; \ pNextRect->y1 = ny1; \ pNextRect->x2 = nx2; \ pNextRect->y2 = ny2; \ pNextRect++; \ } #define NEWRECT(pReg,pNextRect,nx1,ny1,nx2,ny2) \ { \ if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\ { \ if (!RegionRectAlloc(pReg, 1)) \ return FALSE; \ pNextRect = RegionTop(pReg); \ } \ ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \ pReg->data->numRects++; \ assert(pReg->data->numRects<=pReg->data->size); \ } #define DOWNSIZE(reg,numRects) \ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ { \ size_t NewSize = RegionSizeof(numRects); \ RegDataPtr NewData = \ (NewSize > 0) ? realloc((reg)->data, NewSize) : NULL ; \ if (NewData) \ { \ NewData->size = (numRects); \ (reg)->data = NewData; \ } \ } BoxRec RegionEmptyBox = { 0, 0, 0, 0 }; RegDataRec RegionEmptyData = { 0, 0 }; RegDataRec RegionBrokenData = { 0, 0 }; static RegionRec RegionBrokenRegion = { {0, 0, 0, 0}, &RegionBrokenData }; void InitRegions(void) { pixman_region_set_static_pointers(&RegionEmptyBox, &RegionEmptyData, &RegionBrokenData); } /***************************************************************** * RegionCreate(rect, size) * This routine does a simple malloc to make a structure of * REGION of "size" number of rectangles. *****************************************************************/ RegionPtr RegionCreate(BoxPtr rect, int size) { RegionPtr pReg; pReg = (RegionPtr) malloc(sizeof(RegionRec)); if (!pReg) return &RegionBrokenRegion; RegionInit(pReg, rect, size); return pReg; } void RegionDestroy(RegionPtr pReg) { pixman_region_fini(pReg); if (pReg != &RegionBrokenRegion) free(pReg); } RegionPtr RegionDuplicate(RegionPtr pOld) { RegionPtr pNew; pNew = RegionCreate(&pOld->extents, 0); if (!pNew) return NULL; if (!RegionCopy(pNew, pOld)) { RegionDestroy(pNew); return NULL; } return pNew; } void RegionPrint(RegionPtr rgn) { int num, size; int i; BoxPtr rects; num = RegionNumRects(rgn); size = RegionSize(rgn); rects = RegionRects(rgn); ErrorF("[mi] num: %d size: %d\n", num, size); ErrorF("[mi] extents: %d %d %d %d\n", rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2); for (i = 0; i < num; i++) ErrorF("[mi] %d %d %d %d \n", rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); ErrorF("[mi] \n"); } #ifdef DEBUG Bool RegionIsValid(RegionPtr reg) { int i, numRects; if ((reg->extents.x1 > reg->extents.x2) || (reg->extents.y1 > reg->extents.y2)) return FALSE; numRects = RegionNumRects(reg); if (!numRects) return ((reg->extents.x1 == reg->extents.x2) && (reg->extents.y1 == reg->extents.y2) && (reg->data->size || (reg->data == &RegionEmptyData))); else if (numRects == 1) return !reg->data; else { BoxPtr pboxP, pboxN; BoxRec box; pboxP = RegionRects(reg); box = *pboxP; box.y2 = pboxP[numRects - 1].y2; pboxN = pboxP + 1; for (i = numRects; --i > 0; pboxP++, pboxN++) { if ((pboxN->x1 >= pboxN->x2) || (pboxN->y1 >= pboxN->y2)) return FALSE; if (pboxN->x1 < box.x1) box.x1 = pboxN->x1; if (pboxN->x2 > box.x2) box.x2 = pboxN->x2; if ((pboxN->y1 < pboxP->y1) || ((pboxN->y1 == pboxP->y1) && ((pboxN->x1 < pboxP->x2) || (pboxN->y2 != pboxP->y2)))) return FALSE; } return ((box.x1 == reg->extents.x1) && (box.x2 == reg->extents.x2) && (box.y1 == reg->extents.y1) && (box.y2 == reg->extents.y2)); } } #endif /* DEBUG */ Bool RegionBreak(RegionPtr pReg) { xfreeData(pReg); pReg->extents = RegionEmptyBox; pReg->data = &RegionBrokenData; return FALSE; } Bool RegionRectAlloc(RegionPtr pRgn, int n) { RegDataPtr data; size_t rgnSize; if (!pRgn->data) { n++; rgnSize = RegionSizeof(n); pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL; if (!pRgn->data) return RegionBreak(pRgn); pRgn->data->numRects = 1; *RegionBoxptr(pRgn) = pRgn->extents; } else if (!pRgn->data->size) { rgnSize = RegionSizeof(n); pRgn->data = (rgnSize > 0) ? malloc(rgnSize) : NULL; if (!pRgn->data) return RegionBreak(pRgn); pRgn->data->numRects = 0; } else { if (n == 1) { n = pRgn->data->numRects; if (n > 500) /* XXX pick numbers out of a hat */ n = 250; } n += pRgn->data->numRects; rgnSize = RegionSizeof(n); data = (rgnSize > 0) ? realloc(pRgn->data, rgnSize) : NULL; if (!data) return RegionBreak(pRgn); pRgn->data = data; } pRgn->data->size = n; return TRUE; } /*====================================================================== * Generic Region Operator *====================================================================*/ /*- *----------------------------------------------------------------------- * RegionCoalesce -- * Attempt to merge the boxes in the current band with those in the * previous one. We are guaranteed that the current band extends to * the end of the rects array. Used only by RegionOp. * * Results: * The new index for the previous band. * * Side Effects: * If coalescing takes place: * - rectangles in the previous band will have their y2 fields * altered. * - pReg->data->numRects will be decreased. * *----------------------------------------------------------------------- */ _X_INLINE static int RegionCoalesce(RegionPtr pReg, /* Region to coalesce */ int prevStart, /* Index of start of previous band */ int curStart) { /* Index of start of current band */ BoxPtr pPrevBox; /* Current box in previous band */ BoxPtr pCurBox; /* Current box in current band */ int numRects; /* Number rectangles in both bands */ int y2; /* Bottom of current band */ /* * Figure out how many rectangles are in the band. */ numRects = curStart - prevStart; assert(numRects == pReg->data->numRects - curStart); if (!numRects) return curStart; /* * The bands may only be coalesced if the bottom of the previous * matches the top scanline of the current. */ pPrevBox = RegionBox(pReg, prevStart); pCurBox = RegionBox(pReg, curStart); if (pPrevBox->y2 != pCurBox->y1) return curStart; /* * Make sure the bands have boxes in the same places. This * assumes that boxes have been added in such a way that they * cover the most area possible. I.e. two boxes in a band must * have some horizontal space between them. */ y2 = pCurBox->y2; do { if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) { return curStart; } pPrevBox++; pCurBox++; numRects--; } while (numRects); /* * The bands may be merged, so set the bottom y of each box * in the previous band to the bottom y of the current band. */ numRects = curStart - prevStart; pReg->data->numRects -= numRects; do { pPrevBox--; pPrevBox->y2 = y2; numRects--; } while (numRects); return prevStart; } /* Quicky macro to avoid trivial reject procedure calls to RegionCoalesce */ #define Coalesce(newReg, prevBand, curBand) \ if (curBand - prevBand == newReg->data->numRects - curBand) { \ prevBand = RegionCoalesce(newReg, prevBand, curBand); \ } else { \ prevBand = curBand; \ } /*- *----------------------------------------------------------------------- * RegionAppendNonO -- * Handle a non-overlapping band for the union and subtract operations. * Just adds the (top/bottom-clipped) rectangles into the region. * Doesn't have to check for subsumption or anything. * * Results: * None. * * Side Effects: * pReg->data->numRects is incremented and the rectangles overwritten * with the rectangles we're passed. * *----------------------------------------------------------------------- */ _X_INLINE static Bool RegionAppendNonO(RegionPtr pReg, BoxPtr r, BoxPtr rEnd, int y1, int y2) { BoxPtr pNextRect; int newRects; newRects = rEnd - r; assert(y1 < y2); assert(newRects != 0); /* Make sure we have enough space for all rectangles to be added */ RECTALLOC(pReg, newRects); pNextRect = RegionTop(pReg); pReg->data->numRects += newRects; do { assert(r->x1 < r->x2); ADDRECT(pNextRect, r->x1, y1, r->x2, y2); r++; } while (r != rEnd); return TRUE; } #define FindBand(r, rBandEnd, rEnd, ry1) \ { \ ry1 = r->y1; \ rBandEnd = r+1; \ while ((rBandEnd != rEnd) && (rBandEnd->y1 == ry1)) { \ rBandEnd++; \ } \ } #define AppendRegions(newReg, r, rEnd) \ { \ int newRects; \ if ((newRects = rEnd - r)) { \ RECTALLOC(newReg, newRects); \ memmove((char *)RegionTop(newReg),(char *)r, \ newRects * sizeof(BoxRec)); \ newReg->data->numRects += newRects; \ } \ } /*- *----------------------------------------------------------------------- * RegionOp -- * Apply an operation to two regions. Called by RegionUnion, RegionInverse, * RegionSubtract, RegionIntersect.... Both regions MUST have at least one * rectangle, and cannot be the same object. * * Results: * TRUE if successful. * * Side Effects: * The new region is overwritten. * pOverlap set to TRUE if overlapFunc ever returns TRUE. * * Notes: * The idea behind this function is to view the two regions as sets. * Together they cover a rectangle of area that this function divides * into horizontal bands where points are covered only by one region * or by both. For the first case, the nonOverlapFunc is called with * each the band and the band's upper and lower extents. For the * second, the overlapFunc is called to process the entire band. It * is responsible for clipping the rectangles in the band, though * this function provides the boundaries. * At the end of each band, the new region is coalesced, if possible, * to reduce the number of rectangles in the region. * *----------------------------------------------------------------------- */ typedef Bool (*OverlapProcPtr) (RegionPtr pReg, BoxPtr r1, BoxPtr r1End, BoxPtr r2, BoxPtr r2End, short y1, short y2, Bool *pOverlap); static Bool RegionOp(RegionPtr newReg, /* Place to store result */ RegionPtr reg1, /* First region in operation */ RegionPtr reg2, /* 2d region in operation */ OverlapProcPtr overlapFunc, /* Function to call for over- * lapping bands */ Bool appendNon1, /* Append non-overlapping bands */ /* in region 1 ? */ Bool appendNon2, /* Append non-overlapping bands */ /* in region 2 ? */ Bool *pOverlap) { BoxPtr r1; /* Pointer into first region */ BoxPtr r2; /* Pointer into 2d region */ BoxPtr r1End; /* End of 1st region */ BoxPtr r2End; /* End of 2d region */ short ybot; /* Bottom of intersection */ short ytop; /* Top of intersection */ RegDataPtr oldData; /* Old data for newReg */ int prevBand; /* Index of start of * previous band in newReg */ int curBand; /* Index of start of current * band in newReg */ BoxPtr r1BandEnd; /* End of current band in r1 */ BoxPtr r2BandEnd; /* End of current band in r2 */ short top; /* Top of non-overlapping band */ short bot; /* Bottom of non-overlapping band */ int r1y1; /* Temps for r1->y1 and r2->y1 */ int r2y1; int newSize; int numRects; /* * Break any region computed from a broken region */ if (RegionNar(reg1) || RegionNar(reg2)) return RegionBreak(newReg); /* * Initialization: * set r1, r2, r1End and r2End appropriately, save the rectangles * of the destination region until the end in case it's one of * the two source regions, then mark the "new" region empty, allocating * another array of rectangles for it to use. */ r1 = RegionRects(reg1); newSize = RegionNumRects(reg1); r1End = r1 + newSize; numRects = RegionNumRects(reg2); r2 = RegionRects(reg2); r2End = r2 + numRects; assert(r1 != r1End); assert(r2 != r2End); oldData = NULL; if (((newReg == reg1) && (newSize > 1)) || ((newReg == reg2) && (numRects > 1))) { oldData = newReg->data; newReg->data = &RegionEmptyData; } /* guess at new size */ if (numRects > newSize) newSize = numRects; newSize <<= 1; if (!newReg->data) newReg->data = &RegionEmptyData; else if (newReg->data->size) newReg->data->numRects = 0; if (newSize > newReg->data->size) if (!RegionRectAlloc(newReg, newSize)) return FALSE; /* * Initialize ybot. * In the upcoming loop, ybot and ytop serve different functions depending * on whether the band being handled is an overlapping or non-overlapping * band. * In the case of a non-overlapping band (only one of the regions * has points in the band), ybot is the bottom of the most recent * intersection and thus clips the top of the rectangles in that band. * ytop is the top of the next intersection between the two regions and * serves to clip the bottom of the rectangles in the current band. * For an overlapping band (where the two regions intersect), ytop clips * the top of the rectangles of both regions and ybot clips the bottoms. */ ybot = min(r1->y1, r2->y1); /* * prevBand serves to mark the start of the previous band so rectangles * can be coalesced into larger rectangles. qv. RegionCoalesce, above. * In the beginning, there is no previous band, so prevBand == curBand * (curBand is set later on, of course, but the first band will always * start at index 0). prevBand and curBand must be indices because of * the possible expansion, and resultant moving, of the new region's * array of rectangles. */ prevBand = 0; do { /* * This algorithm proceeds one source-band (as opposed to a * destination band, which is determined by where the two regions * intersect) at a time. r1BandEnd and r2BandEnd serve to mark the * rectangle after the last one in the current band for their * respective regions. */ assert(r1 != r1End); assert(r2 != r2End); FindBand(r1, r1BandEnd, r1End, r1y1); FindBand(r2, r2BandEnd, r2End, r2y1); /* * First handle the band that doesn't intersect, if any. * * Note that attention is restricted to one band in the * non-intersecting region at once, so if a region has n * bands between the current position and the next place it overlaps * the other, this entire loop will be passed through n times. */ if (r1y1 < r2y1) { if (appendNon1) { top = max(r1y1, ybot); bot = min(r1->y2, r2y1); if (top != bot) { curBand = newReg->data->numRects; RegionAppendNonO(newReg, r1, r1BandEnd, top, bot); Coalesce(newReg, prevBand, curBand); } } ytop = r2y1; } else if (r2y1 < r1y1) { if (appendNon2) { top = max(r2y1, ybot); bot = min(r2->y2, r1y1); if (top != bot) { curBand = newReg->data->numRects; RegionAppendNonO(newReg, r2, r2BandEnd, top, bot); Coalesce(newReg, prevBand, curBand); } } ytop = r1y1; } else { ytop = r1y1; } /* * Now see if we've hit an intersecting band. The two bands only * intersect if ybot > ytop */ ybot = min(r1->y2, r2->y2); if (ybot > ytop) { curBand = newReg->data->numRects; (*overlapFunc) (newReg, r1, r1BandEnd, r2, r2BandEnd, ytop, ybot, pOverlap); Coalesce(newReg, prevBand, curBand); } /* * If we've finished with a band (y2 == ybot) we skip forward * in the region to the next band. */ if (r1->y2 == ybot) r1 = r1BandEnd; if (r2->y2 == ybot) r2 = r2BandEnd; } while (r1 != r1End && r2 != r2End); /* * Deal with whichever region (if any) still has rectangles left. * * We only need to worry about banding and coalescing for the very first * band left. After that, we can just group all remaining boxes, * regardless of how many bands, into one final append to the list. */ if ((r1 != r1End) && appendNon1) { /* Do first nonOverlap1Func call, which may be able to coalesce */ FindBand(r1, r1BandEnd, r1End, r1y1); curBand = newReg->data->numRects; RegionAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2); Coalesce(newReg, prevBand, curBand); /* Just append the rest of the boxes */ AppendRegions(newReg, r1BandEnd, r1End); } else if ((r2 != r2End) && appendNon2) { /* Do first nonOverlap2Func call, which may be able to coalesce */ FindBand(r2, r2BandEnd, r2End, r2y1); curBand = newReg->data->numRects; RegionAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2); Coalesce(newReg, prevBand, curBand); /* Append rest of boxes */ AppendRegions(newReg, r2BandEnd, r2End); } free(oldData); if (!(numRects = newReg->data->numRects)) { xfreeData(newReg); newReg->data = &RegionEmptyData; } else if (numRects == 1) { newReg->extents = *RegionBoxptr(newReg); xfreeData(newReg); newReg->data = NULL; } else { DOWNSIZE(newReg, numRects); } return TRUE; } /*- *----------------------------------------------------------------------- * RegionSetExtents -- * Reset the extents of a region to what they should be. Called by * Subtract and Intersect as they can't figure it out along the * way or do so easily, as Union can. * * Results: * None. * * Side Effects: * The region's 'extents' structure is overwritten. * *----------------------------------------------------------------------- */ static void RegionSetExtents(RegionPtr pReg) { BoxPtr pBox, pBoxEnd; if (!pReg->data) return; if (!pReg->data->size) { pReg->extents.x2 = pReg->extents.x1; pReg->extents.y2 = pReg->extents.y1; return; } pBox = RegionBoxptr(pReg); pBoxEnd = RegionEnd(pReg); /* * Since pBox is the first rectangle in the region, it must have the * smallest y1 and since pBoxEnd is the last rectangle in the region, * it must have the largest y2, because of banding. Initialize x1 and * x2 from pBox and pBoxEnd, resp., as good things to initialize them * to... */ pReg->extents.x1 = pBox->x1; pReg->extents.y1 = pBox->y1; pReg->extents.x2 = pBoxEnd->x2; pReg->extents.y2 = pBoxEnd->y2; assert(pReg->extents.y1 < pReg->extents.y2); while (pBox <= pBoxEnd) { if (pBox->x1 < pReg->extents.x1) pReg->extents.x1 = pBox->x1; if (pBox->x2 > pReg->extents.x2) pReg->extents.x2 = pBox->x2; pBox++; }; assert(pReg->extents.x1 < pReg->extents.x2); } /*====================================================================== * Region Intersection *====================================================================*/ /*- *----------------------------------------------------------------------- * RegionIntersectO -- * Handle an overlapping band for RegionIntersect. * * Results: * TRUE if successful. * * Side Effects: * Rectangles may be added to the region. * *----------------------------------------------------------------------- */ /*ARGSUSED*/ #define MERGERECT(r) \ { \ if (r->x1 <= x2) { \ /* Merge with current rectangle */ \ if (r->x1 < x2) *pOverlap = TRUE; \ if (x2 < r->x2) x2 = r->x2; \ } else { \ /* Add current rectangle, start new one */ \ NEWRECT(pReg, pNextRect, x1, y1, x2, y2); \ x1 = r->x1; \ x2 = r->x2; \ } \ r++; \ } /*====================================================================== * Region Union *====================================================================*/ /*- *----------------------------------------------------------------------- * RegionUnionO -- * Handle an overlapping band for the union operation. Picks the * left-most rectangle each time and merges it into the region. * * Results: * TRUE if successful. * * Side Effects: * pReg is overwritten. * pOverlap is set to TRUE if any boxes overlap. * *----------------------------------------------------------------------- */ static Bool RegionUnionO(RegionPtr pReg, BoxPtr r1, BoxPtr r1End, BoxPtr r2, BoxPtr r2End, short y1, short y2, Bool *pOverlap) { BoxPtr pNextRect; int x1; /* left and right side of current union */ int x2; assert(y1 < y2); assert(r1 != r1End); assert(r2 != r2End); pNextRect = RegionTop(pReg); /* Start off current rectangle */ if (r1->x1 < r2->x1) { x1 = r1->x1; x2 = r1->x2; r1++; } else { x1 = r2->x1; x2 = r2->x2; r2++; } while (r1 != r1End && r2 != r2End) { if (r1->x1 < r2->x1) MERGERECT(r1) else MERGERECT(r2); } /* Finish off whoever (if any) is left */ if (r1 != r1End) { do { MERGERECT(r1); } while (r1 != r1End); } else if (r2 != r2End) { do { MERGERECT(r2); } while (r2 != r2End); } /* Add current rectangle */ NEWRECT(pReg, pNextRect, x1, y1, x2, y2); return TRUE; } /*====================================================================== * Batch Rectangle Union *====================================================================*/ /*- *----------------------------------------------------------------------- * RegionAppend -- * * "Append" the rgn rectangles onto the end of dstrgn, maintaining * knowledge of YX-banding when it's easy. Otherwise, dstrgn just * becomes a non-y-x-banded random collection of rectangles, and not * yet a true region. After a sequence of appends, the caller must * call RegionValidate to ensure that a valid region is constructed. * * Results: * TRUE if successful. * * Side Effects: * dstrgn is modified if rgn has rectangles. * */ Bool RegionAppend(RegionPtr dstrgn, RegionPtr rgn) { int numRects, dnumRects, size; BoxPtr new, old; Bool prepend; if (RegionNar(rgn)) return RegionBreak(dstrgn); if (!rgn->data && (dstrgn->data == &RegionEmptyData)) { dstrgn->extents = rgn->extents; dstrgn->data = NULL; return TRUE; } numRects = RegionNumRects(rgn); if (!numRects) return TRUE; prepend = FALSE; size = numRects; dnumRects = RegionNumRects(dstrgn); if (!dnumRects && (size < 200)) size = 200; /* XXX pick numbers out of a hat */ RECTALLOC(dstrgn, size); old = RegionRects(rgn); if (!dnumRects) dstrgn->extents = rgn->extents; else if (dstrgn->extents.x2 > dstrgn->extents.x1) { BoxPtr first, last; first = old; last = RegionBoxptr(dstrgn) + (dnumRects - 1); if ((first->y1 > last->y2) || ((first->y1 == last->y1) && (first->y2 == last->y2) && (first->x1 > last->x2))) { if (rgn->extents.x1 < dstrgn->extents.x1) dstrgn->extents.x1 = rgn->extents.x1; if (rgn->extents.x2 > dstrgn->extents.x2) dstrgn->extents.x2 = rgn->extents.x2; dstrgn->extents.y2 = rgn->extents.y2; } else { first = RegionBoxptr(dstrgn); last = old + (numRects - 1); if ((first->y1 > last->y2) || ((first->y1 == last->y1) && (first->y2 == last->y2) && (first->x1 > last->x2))) { prepend = TRUE; if (rgn->extents.x1 < dstrgn->extents.x1) dstrgn->extents.x1 = rgn->extents.x1; if (rgn->extents.x2 > dstrgn->extents.x2) dstrgn->extents.x2 = rgn->extents.x2; dstrgn->extents.y1 = rgn->extents.y1; } else dstrgn->extents.x2 = dstrgn->extents.x1; } } if (prepend) { new = RegionBox(dstrgn, numRects); if (dnumRects == 1) *new = *RegionBoxptr(dstrgn); else memmove((char *) new, (char *) RegionBoxptr(dstrgn), dnumRects * sizeof(BoxRec)); new = RegionBoxptr(dstrgn); } else new = RegionBoxptr(dstrgn) + dnumRects; if (numRects == 1) *new = *old; else memmove((char *) new, (char *) old, numRects * sizeof(BoxRec)); dstrgn->data->numRects += numRects; return TRUE; } #define ExchangeRects(a, b) \ { \ BoxRec t; \ t = rects[a]; \ rects[a] = rects[b]; \ rects[b] = t; \ } static void QuickSortRects(BoxRec rects[], int numRects) { int y1; int x1; int i, j; BoxPtr r; /* Always called with numRects > 1 */ do { if (numRects == 2) { if (rects[0].y1 > rects[1].y1 || (rects[0].y1 == rects[1].y1 && rects[0].x1 > rects[1].x1)) ExchangeRects(0, 1); return; } /* Choose partition element, stick in location 0 */ ExchangeRects(0, numRects >> 1); y1 = rects[0].y1; x1 = rects[0].x1; /* Partition array */ i = 0; j = numRects; do { r = &(rects[i]); do { r++; i++; } while (i != numRects && (r->y1 < y1 || (r->y1 == y1 && r->x1 < x1))); r = &(rects[j]); do { r--; j--; } while (y1 < r->y1 || (y1 == r->y1 && x1 < r->x1)); if (i < j) ExchangeRects(i, j); } while (i < j); /* Move partition element back to middle */ ExchangeRects(0, j); /* Recurse */ if (numRects - j - 1 > 1) QuickSortRects(&rects[j + 1], numRects - j - 1); numRects = j; } while (numRects > 1); } /*- *----------------------------------------------------------------------- * RegionValidate -- * * Take a ``region'' which is a non-y-x-banded random collection of * rectangles, and compute a nice region which is the union of all the * rectangles. * * Results: * TRUE if successful. * * Side Effects: * The passed-in ``region'' may be modified. * pOverlap set to TRUE if any rectangles overlapped, else FALSE; * * Strategy: * Step 1. Sort the rectangles into ascending order with primary key y1 * and secondary key x1. * * Step 2. Split the rectangles into the minimum number of proper y-x * banded regions. This may require horizontally merging * rectangles, and vertically coalescing bands. With any luck, * this step in an identity transformation (ala the Box widget), * or a coalescing into 1 box (ala Menus). * * Step 3. Merge the separate regions down to a single region by calling * Union. Maximize the work each Union call does by using * a binary merge. * *----------------------------------------------------------------------- */ Bool RegionValidate(RegionPtr badreg, Bool *pOverlap) { /* Descriptor for regions under construction in Step 2. */ typedef struct { RegionRec reg; int prevBand; int curBand; } RegionInfo; int numRects; /* Original numRects for badreg */ RegionInfo *ri; /* Array of current regions */ int numRI; /* Number of entries used in ri */ int sizeRI; /* Number of entries available in ri */ int i; /* Index into rects */ int j; /* Index into ri */ RegionInfo *rit; /* &ri[j] */ RegionPtr reg; /* ri[j].reg */ BoxPtr box; /* Current box in rects */ BoxPtr riBox; /* Last box in ri[j].reg */ RegionPtr hreg; /* ri[j_half].reg */ Bool ret = TRUE; *pOverlap = FALSE; if (!badreg->data) { good(badreg); return TRUE; } numRects = badreg->data->numRects; if (!numRects) { if (RegionNar(badreg)) return FALSE; good(badreg); return TRUE; } if (badreg->extents.x1 < badreg->extents.x2) { if ((numRects) == 1) { xfreeData(badreg); badreg->data = (RegDataPtr) NULL; } else { DOWNSIZE(badreg, numRects); } good(badreg); return TRUE; } /* Step 1: Sort the rects array into ascending (y1, x1) order */ QuickSortRects(RegionBoxptr(badreg), numRects); /* Step 2: Scatter the sorted array into the minimum number of regions */ /* Set up the first region to be the first rectangle in badreg */ /* Note that step 2 code will never overflow the ri[0].reg rects array */ ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo)); if (!ri) return RegionBreak(badreg); sizeRI = 4; numRI = 1; ri[0].prevBand = 0; ri[0].curBand = 0; ri[0].reg = *badreg; box = RegionBoxptr(&ri[0].reg); ri[0].reg.extents = *box; ri[0].reg.data->numRects = 1; /* Now scatter rectangles into the minimum set of valid regions. If the next rectangle to be added to a region would force an existing rectangle in the region to be split up in order to maintain y-x banding, just forget it. Try the next region. If it doesn't fit cleanly into any region, make a new one. */ for (i = numRects; --i > 0;) { box++; /* Look for a region to append box to */ for (j = numRI, rit = ri; --j >= 0; rit++) { reg = &rit->reg; riBox = RegionEnd(reg); if (box->y1 == riBox->y1 && box->y2 == riBox->y2) { /* box is in same band as riBox. Merge or append it */ if (box->x1 <= riBox->x2) { /* Merge it with riBox */ if (box->x1 < riBox->x2) *pOverlap = TRUE; if (box->x2 > riBox->x2) riBox->x2 = box->x2; } else { RECTALLOC_BAIL(reg, 1, bail); *RegionTop(reg) = *box; reg->data->numRects++; } goto NextRect; /* So sue me */ } else if (box->y1 >= riBox->y2) { /* Put box into new band */ if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2; if (reg->extents.x1 > box->x1) reg->extents.x1 = box->x1; Coalesce(reg, rit->prevBand, rit->curBand); rit->curBand = reg->data->numRects; RECTALLOC_BAIL(reg, 1, bail); *RegionTop(reg) = *box; reg->data->numRects++; goto NextRect; } /* Well, this region was inappropriate. Try the next one. */ } /* for j */ /* Uh-oh. No regions were appropriate. Create a new one. */ if (sizeRI == numRI) { /* Oops, allocate space for new region information */ sizeRI <<= 1; rit = (RegionInfo *) reallocarray(ri, sizeRI, sizeof(RegionInfo)); if (!rit) goto bail; ri = rit; rit = &ri[numRI]; } numRI++; rit->prevBand = 0; rit->curBand = 0; rit->reg.extents = *box; rit->reg.data = NULL; if (!RegionRectAlloc(&rit->reg, (i + numRI) / numRI)) /* MUST force allocation */ goto bail; NextRect:; } /* for i */ /* Make a final pass over each region in order to Coalesce and set extents.x2 and extents.y2 */ for (j = numRI, rit = ri; --j >= 0; rit++) { reg = &rit->reg; riBox = RegionEnd(reg); reg->extents.y2 = riBox->y2; if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2; Coalesce(reg, rit->prevBand, rit->curBand); if (reg->data->numRects == 1) { /* keep unions happy below */ xfreeData(reg); reg->data = NULL; } } /* Step 3: Union all regions into a single region */ while (numRI > 1) { int half = numRI / 2; for (j = numRI & 1; j < (half + (numRI & 1)); j++) { reg = &ri[j].reg; hreg = &ri[j + half].reg; if (!RegionOp(reg, reg, hreg, RegionUnionO, TRUE, TRUE, pOverlap)) ret = FALSE; if (hreg->extents.x1 < reg->extents.x1) reg->extents.x1 = hreg->extents.x1; if (hreg->extents.y1 < reg->extents.y1) reg->extents.y1 = hreg->extents.y1; if (hreg->extents.x2 > reg->extents.x2) reg->extents.x2 = hreg->extents.x2; if (hreg->extents.y2 > reg->extents.y2) reg->extents.y2 = hreg->extents.y2; xfreeData(hreg); } numRI -= half; } *badreg = ri[0].reg; free(ri); good(badreg); return ret; bail: for (i = 0; i < numRI; i++) xfreeData(&ri[i].reg); free(ri); return RegionBreak(badreg); } RegionPtr RegionFromRects(int nrects, xRectangle *prect, int ctype) { RegionPtr pRgn; size_t rgnSize; RegDataPtr pData; BoxPtr pBox; int i; int x1, y1, x2, y2; pRgn = RegionCreate(NullBox, 0); if (RegionNar(pRgn)) return pRgn; if (!nrects) return pRgn; if (nrects == 1) { x1 = prect->x; y1 = prect->y; if ((x2 = x1 + (int) prect->width) > MAXSHORT) x2 = MAXSHORT; if ((y2 = y1 + (int) prect->height) > MAXSHORT) y2 = MAXSHORT; if (x1 != x2 && y1 != y2) { pRgn->extents.x1 = x1; pRgn->extents.y1 = y1; pRgn->extents.x2 = x2; pRgn->extents.y2 = y2; pRgn->data = NULL; } return pRgn; } rgnSize = RegionSizeof(nrects); pData = (rgnSize > 0) ? malloc(rgnSize) : NULL; if (!pData) { RegionBreak(pRgn); return pRgn; } pBox = (BoxPtr) (pData + 1); for (i = nrects; --i >= 0; prect++) { x1 = prect->x; y1 = prect->y; if ((x2 = x1 + (int) prect->width) > MAXSHORT) x2 = MAXSHORT; if ((y2 = y1 + (int) prect->height) > MAXSHORT) y2 = MAXSHORT; if (x1 != x2 && y1 != y2) { pBox->x1 = x1; pBox->y1 = y1; pBox->x2 = x2; pBox->y2 = y2; pBox++; } } if (pBox != (BoxPtr) (pData + 1)) { pData->size = nrects; pData->numRects = pBox - (BoxPtr) (pData + 1); pRgn->data = pData; if (ctype != CT_YXBANDED) { Bool overlap; /* result ignored */ pRgn->extents.x1 = pRgn->extents.x2 = 0; RegionValidate(pRgn, &overlap); } else RegionSetExtents(pRgn); good(pRgn); } else { free(pData); } return pRgn; } xorg-server-21.1.16/dix/registry.c0000644000175000017500000002121314757411105012432 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include "resource.h" #include "registry.h" #define BASE_SIZE 16 #ifdef X_REGISTRY_REQUEST #define CORE "X11" #define FILENAME SERVER_MISC_CONFIG_PATH "/protocol.txt" #define PROT_COMMENT '#' #define PROT_REQUEST 'R' #define PROT_EVENT 'V' #define PROT_ERROR 'E' static FILE *fh; static char ***requests, **events, **errors; static unsigned nmajor, *nminor, nevent, nerror; #endif #ifdef X_REGISTRY_RESOURCE static const char **resources; static unsigned nresource; #endif #if defined(X_REGISTRY_RESOURCE) || defined(X_REGISTRY_REQUEST) /* * File parsing routines */ static int double_size(void *p, unsigned n, unsigned size) { char **ptr = (char **) p; unsigned s, f; if (n) { s = n * size; n *= 2 * size; f = n; } else { s = 0; n = f = BASE_SIZE * size; } *ptr = realloc(*ptr, n); if (!*ptr) { dixResetRegistry(); return FALSE; } memset(*ptr + s, 0, f - s); return TRUE; } #endif #ifdef X_REGISTRY_REQUEST /* * Request/event/error registry functions */ static void RegisterRequestName(unsigned major, unsigned minor, char *name) { while (major >= nmajor) { if (!double_size(&requests, nmajor, sizeof(char **))) return; if (!double_size(&nminor, nmajor, sizeof(unsigned))) return; nmajor = nmajor ? nmajor * 2 : BASE_SIZE; } while (minor >= nminor[major]) { if (!double_size(requests + major, nminor[major], sizeof(char *))) return; nminor[major] = nminor[major] ? nminor[major] * 2 : BASE_SIZE; } free(requests[major][minor]); requests[major][minor] = name; } static void RegisterEventName(unsigned event, char *name) { while (event >= nevent) { if (!double_size(&events, nevent, sizeof(char *))) return; nevent = nevent ? nevent * 2 : BASE_SIZE; } free(events[event]); events[event] = name; } static void RegisterErrorName(unsigned error, char *name) { while (error >= nerror) { if (!double_size(&errors, nerror, sizeof(char *))) return; nerror = nerror ? nerror * 2 : BASE_SIZE; } free(errors[error]); errors[error] = name; } void RegisterExtensionNames(ExtensionEntry * extEntry) { char buf[256], *lineobj, *ptr; unsigned offset; if (fh == NULL) return; rewind(fh); while (fgets(buf, sizeof(buf), fh)) { lineobj = NULL; ptr = strchr(buf, '\n'); if (ptr) *ptr = 0; /* Check for comments or empty lines */ switch (buf[0]) { case PROT_REQUEST: case PROT_EVENT: case PROT_ERROR: break; case PROT_COMMENT: case '\0': continue; default: goto invalid; } /* Check for space character in the fifth position */ ptr = strchr(buf, ' '); if (!ptr || ptr != buf + 4) goto invalid; /* Duplicate the string after the space */ lineobj = strdup(ptr + 1); if (!lineobj) continue; /* Check for a colon somewhere on the line */ ptr = strchr(buf, ':'); if (!ptr) goto invalid; /* Compare the part before colon with the target extension name */ *ptr = 0; if (strcmp(buf + 5, extEntry->name)) goto skip; /* Get the opcode for the request, event, or error */ offset = strtol(buf + 1, &ptr, 10); if (offset == 0 && ptr == buf + 1) goto invalid; /* Save the strdup result in the registry */ switch (buf[0]) { case PROT_REQUEST: if (extEntry->base) RegisterRequestName(extEntry->base, offset, lineobj); else RegisterRequestName(offset, 0, lineobj); continue; case PROT_EVENT: RegisterEventName(extEntry->eventBase + offset, lineobj); continue; case PROT_ERROR: RegisterErrorName(extEntry->errorBase + offset, lineobj); continue; } invalid: LogMessage(X_WARNING, "Invalid line in " FILENAME ", skipping\n"); skip: free(lineobj); } } const char * LookupRequestName(int major, int minor) { if (major >= nmajor) return XREGISTRY_UNKNOWN; if (minor >= nminor[major]) return XREGISTRY_UNKNOWN; return requests[major][minor] ? requests[major][minor] : XREGISTRY_UNKNOWN; } const char * LookupMajorName(int major) { if (major < 128) { const char *retval; if (major >= nmajor) return XREGISTRY_UNKNOWN; if (0 >= nminor[major]) return XREGISTRY_UNKNOWN; retval = requests[major][0]; return retval ? retval + sizeof(CORE) : XREGISTRY_UNKNOWN; } else { ExtensionEntry *extEntry = GetExtensionEntry(major); return extEntry ? extEntry->name : XREGISTRY_UNKNOWN; } } const char * LookupEventName(int event) { event &= 127; if (event >= nevent) return XREGISTRY_UNKNOWN; return events[event] ? events[event] : XREGISTRY_UNKNOWN; } const char * LookupErrorName(int error) { if (error >= nerror) return XREGISTRY_UNKNOWN; return errors[error] ? errors[error] : XREGISTRY_UNKNOWN; } #endif /* X_REGISTRY_REQUEST */ #ifdef X_REGISTRY_RESOURCE /* * Resource registry functions */ void RegisterResourceName(RESTYPE resource, const char *name) { resource &= TypeMask; while (resource >= nresource) { if (!double_size(&resources, nresource, sizeof(char *))) return; nresource = nresource ? nresource * 2 : BASE_SIZE; } resources[resource] = name; } const char * LookupResourceName(RESTYPE resource) { resource &= TypeMask; if (resource >= nresource) return XREGISTRY_UNKNOWN; return resources[resource] ? resources[resource] : XREGISTRY_UNKNOWN; } #endif /* X_REGISTRY_RESOURCE */ void dixFreeRegistry(void) { #ifdef X_REGISTRY_REQUEST /* Free all memory */ while (nmajor--) { while (nminor[nmajor]) free(requests[nmajor][--nminor[nmajor]]); free(requests[nmajor]); } free(requests); free(nminor); while (nevent--) free(events[nevent]); free(events); while (nerror--) free(errors[nerror]); free(errors); requests = NULL; nminor = NULL; events = NULL; errors = NULL; nmajor = nevent = nerror = 0; #endif #ifdef X_REGISTRY_RESOURCE free(resources); resources = NULL; nresource = 0; #endif } void dixCloseRegistry(void) { #ifdef X_REGISTRY_REQUEST if (fh) { fclose(fh); fh = NULL; } #endif } /* * Setup and teardown */ void dixResetRegistry(void) { #ifdef X_REGISTRY_REQUEST ExtensionEntry extEntry = { .name = CORE }; #endif dixFreeRegistry(); #ifdef X_REGISTRY_REQUEST /* Open the protocol file */ fh = fopen(FILENAME, "r"); if (!fh) LogMessage(X_WARNING, "Failed to open protocol names file " FILENAME "\n"); /* Add the core protocol */ RegisterExtensionNames(&extEntry); #endif #ifdef X_REGISTRY_RESOURCE /* Add built-in resources */ RegisterResourceName(RT_NONE, "NONE"); RegisterResourceName(RT_WINDOW, "WINDOW"); RegisterResourceName(RT_PIXMAP, "PIXMAP"); RegisterResourceName(RT_GC, "GC"); RegisterResourceName(RT_FONT, "FONT"); RegisterResourceName(RT_CURSOR, "CURSOR"); RegisterResourceName(RT_COLORMAP, "COLORMAP"); RegisterResourceName(RT_CMAPENTRY, "COLORMAP ENTRY"); RegisterResourceName(RT_OTHERCLIENT, "OTHER CLIENT"); RegisterResourceName(RT_PASSIVEGRAB, "PASSIVE GRAB"); #endif } xorg-server-21.1.16/dix/resource.c0000644000175000017500000011552214757411105012420 /************************************************************ 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. ********************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ /* XSERVER_DTRACE additions: * Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Routines to manage various kinds of resources: * * CreateNewResourceType, CreateNewResourceClass, InitClientResources, * FakeClientID, AddResource, FreeResource, FreeClientResources, * FreeAllResources, LookupIDByType, LookupIDByClass, GetXIDRange */ /* * A resource ID is a 32 bit quantity, the upper 2 bits of which are * off-limits for client-visible resources. The next 8 bits are * used as client ID, and the low 22 bits come from the client. * A resource ID is "hashed" by extracting and xoring subfields * (varying with the size of the hash table). * * It is sometimes necessary for the server to create an ID that looks * like it belongs to a client. This ID, however, must not be one * the client actually can create, or we have the potential for conflict. * The 31st bit of the ID is reserved for the server's use for this * purpose. By setting CLIENT_ID(id) to the client, the SERVER_BIT to * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a * resource "owned" by the client. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "os.h" #include "resource.h" #include "dixstruct.h" #include "opaque.h" #include "windowstr.h" #include "dixfont.h" #include "colormap.h" #include "inputstr.h" #include "dixevents.h" #include "dixgrabs.h" #include "cursor.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include "xace.h" #include #include "registry.h" #include "gcstruct.h" #ifdef XSERVER_DTRACE #include "probes.h" #define TypeNameString(t) LookupResourceName(t) #endif static void RebuildTable(int /*client */ ); #define SERVER_MINID 32 #define INITBUCKETS 64 #define INITHASHSIZE 6 #define MAXHASHSIZE 16 typedef struct _Resource { struct _Resource *next; XID id; RESTYPE type; void *value; } ResourceRec, *ResourcePtr; typedef struct _ClientResource { ResourcePtr *resources; int elements; int buckets; int hashsize; /* log(2)(buckets) */ XID fakeID; XID endFakeID; } ClientResourceRec; RESTYPE lastResourceType; static RESTYPE lastResourceClass; RESTYPE TypeMask; struct ResourceType { DeleteType deleteFunc; SizeType sizeFunc; FindTypeSubResources findSubResFunc; int errorValue; }; /** * Used by all resources that don't specify a function to calculate * resource size. Currently this is used for all resources with * insignificant memory usage. * * @see GetResourceTypeSizeFunc, SetResourceTypeSizeFunc * * @param[in] value Pointer to resource object. * * @param[in] id Resource ID for the object. * * @param[out] size Fill all fields to zero to indicate that size of * resource can't be determined. */ static void GetDefaultBytes(void *value, XID id, ResourceSizePtr size) { size->resourceSize = 0; size->pixmapRefSize = 0; size->refCnt = 1; } /** * Used by all resources that don't specify a function to iterate * through subresources. Currently this is used for all resources with * insignificant memory usage. * * @see FindSubResources, SetResourceTypeFindSubResFunc * * @param[in] value Pointer to resource object. * * @param[in] func Function to call for each subresource. * @param[out] cdata Pointer to opaque data. */ static void DefaultFindSubRes(void *value, FindAllRes func, void *cdata) { /* do nothing */ } /** * Calculate drawable size in bytes. Reference counting is not taken * into account. * * @param[in] drawable Pointer to a drawable. * * @return Estimate of total memory usage for the drawable. */ static unsigned long GetDrawableBytes(DrawablePtr drawable) { int bytes = 0; if (drawable) { int bytesPerPixel = drawable->bitsPerPixel >> 3; int numberOfPixels = drawable->width * drawable->height; bytes = numberOfPixels * bytesPerPixel; } return bytes; } /** * Calculate pixmap size in bytes. Reference counting is taken into * account. Any extra data attached by extensions and drivers is not * taken into account. The purpose of this function is to estimate * memory usage that can be attributed to single reference of the * pixmap. * * @param[in] value Pointer to a pixmap. * * @param[in] id Resource ID of pixmap. If the pixmap hasn't been * added as resource, just pass value->drawable.id. * * @param[out] size Estimate of memory usage attributed to a single * pixmap reference. */ static void GetPixmapBytes(void *value, XID id, ResourceSizePtr size) { PixmapPtr pixmap = value; size->resourceSize = 0; size->pixmapRefSize = 0; size->refCnt = pixmap->refcnt; if (pixmap && pixmap->refcnt) { DrawablePtr drawable = &pixmap->drawable; size->resourceSize = GetDrawableBytes(drawable); size->pixmapRefSize = size->resourceSize / pixmap->refcnt; } } /** * Calculate window size in bytes. The purpose of this function is to * estimate memory usage that can be attributed to all pixmap * references of the window. * * @param[in] value Pointer to a window. * * @param[in] id Resource ID of window. * * @param[out] size Estimate of memory usage attributed to a all * pixmap references of a window. */ static void GetWindowBytes(void *value, XID id, ResourceSizePtr size) { SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); ResourceSizeRec pixmapSize = { 0, 0, 0 }; WindowPtr window = value; /* Currently only pixmap bytes are reported to clients. */ size->resourceSize = 0; /* Calculate pixmap reference sizes. */ size->pixmapRefSize = 0; size->refCnt = 1; if (window->backgroundState == BackgroundPixmap) { PixmapPtr pixmap = window->background.pixmap; pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } if (window->border.pixmap && !window->borderIsPixel) { PixmapPtr pixmap = window->border.pixmap; pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } } /** * Iterate through subresources of a window. The purpose of this * function is to gather accurate information on what resources * a resource uses. * * @note Currently only sub-pixmaps are iterated * * @param[in] value Pointer to a window * * @param[in] func Function to call with each subresource * * @param[out] cdata Pointer to opaque data */ static void FindWindowSubRes(void *value, FindAllRes func, void *cdata) { WindowPtr window = value; /* Currently only pixmap subresources are reported to clients. */ if (window->backgroundState == BackgroundPixmap) { PixmapPtr pixmap = window->background.pixmap; func(window->background.pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); } if (window->border.pixmap && !window->borderIsPixel) { PixmapPtr pixmap = window->border.pixmap; func(window->background.pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); } } /** * Calculate graphics context size in bytes. The purpose of this * function is to estimate memory usage that can be attributed to all * pixmap references of the graphics context. * * @param[in] value Pointer to a graphics context. * * @param[in] id Resource ID of graphics context. * * @param[out] size Estimate of memory usage attributed to a all * pixmap references of a graphics context. */ static void GetGcBytes(void *value, XID id, ResourceSizePtr size) { SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); ResourceSizeRec pixmapSize = { 0, 0, 0 }; GCPtr gc = value; /* Currently only pixmap bytes are reported to clients. */ size->resourceSize = 0; /* Calculate pixmap reference sizes. */ size->pixmapRefSize = 0; size->refCnt = 1; if (gc->stipple) { PixmapPtr pixmap = gc->stipple; pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } if (gc->tile.pixmap && !gc->tileIsPixel) { PixmapPtr pixmap = gc->tile.pixmap; pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } } /** * Iterate through subresources of a graphics context. The purpose of * this function is to gather accurate information on what resources a * resource uses. * * @note Currently only sub-pixmaps are iterated * * @param[in] value Pointer to a window * * @param[in] func Function to call with each subresource * * @param[out] cdata Pointer to opaque data */ static void FindGCSubRes(void *value, FindAllRes func, void *cdata) { GCPtr gc = value; /* Currently only pixmap subresources are reported to clients. */ if (gc->stipple) { PixmapPtr pixmap = gc->stipple; func(pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); } if (gc->tile.pixmap && !gc->tileIsPixel) { PixmapPtr pixmap = gc->tile.pixmap; func(pixmap, pixmap->drawable.id, RT_PIXMAP, cdata); } } static struct ResourceType *resourceTypes; static const struct ResourceType predefTypes[] = { [RT_NONE & (RC_LASTPREDEF - 1)] = { .deleteFunc = (DeleteType) NoopDDA, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadValue, }, [RT_WINDOW & (RC_LASTPREDEF - 1)] = { .deleteFunc = DeleteWindow, .sizeFunc = GetWindowBytes, .findSubResFunc = FindWindowSubRes, .errorValue = BadWindow, }, [RT_PIXMAP & (RC_LASTPREDEF - 1)] = { .deleteFunc = dixDestroyPixmap, .sizeFunc = GetPixmapBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadPixmap, }, [RT_GC & (RC_LASTPREDEF - 1)] = { .deleteFunc = FreeGC, .sizeFunc = GetGcBytes, .findSubResFunc = FindGCSubRes, .errorValue = BadGC, }, [RT_FONT & (RC_LASTPREDEF - 1)] = { .deleteFunc = CloseFont, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadFont, }, [RT_CURSOR & (RC_LASTPREDEF - 1)] = { .deleteFunc = FreeCursor, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadCursor, }, [RT_COLORMAP & (RC_LASTPREDEF - 1)] = { .deleteFunc = FreeColormap, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadColor, }, [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = { .deleteFunc = FreeClientPixels, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadColor, }, [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = { .deleteFunc = OtherClientGone, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadValue, }, [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = { .deleteFunc = DeletePassiveGrab, .sizeFunc = GetDefaultBytes, .findSubResFunc = DefaultFindSubRes, .errorValue = BadValue, }, }; CallbackListPtr ResourceStateCallback; static _X_INLINE void CallResourceStateCallback(ResourceState state, ResourceRec * res) { if (ResourceStateCallback) { ResourceStateInfoRec rsi = { state, res->id, res->type, res->value }; CallCallbacks(&ResourceStateCallback, &rsi); } } RESTYPE CreateNewResourceType(DeleteType deleteFunc, const char *name) { RESTYPE next = lastResourceType + 1; struct ResourceType *types; if (next & lastResourceClass) return 0; types = reallocarray(resourceTypes, next + 1, sizeof(*resourceTypes)); if (!types) return 0; lastResourceType = next; resourceTypes = types; resourceTypes[next].deleteFunc = deleteFunc; resourceTypes[next].sizeFunc = GetDefaultBytes; resourceTypes[next].findSubResFunc = DefaultFindSubRes; resourceTypes[next].errorValue = BadValue; #if X_REGISTRY_RESOURCE /* Called even if name is NULL, to remove any previous entry */ RegisterResourceName(next, name); #endif return next; } /** * Get the function used to calculate resource size. Extensions and * drivers need to be able to determine the current size calculation * function if they want to wrap or override it. * * @param[in] type Resource type used in size calculations. * * @return Function to calculate the size of a single * resource. */ SizeType GetResourceTypeSizeFunc(RESTYPE type) { return resourceTypes[type & TypeMask].sizeFunc; } /** * Override the default function that calculates resource size. For * example, video driver knows better how to calculate pixmap memory * usage and can therefore wrap or override size calculation for * RT_PIXMAP. * * @param[in] type Resource type used in size calculations. * * @param[in] sizeFunc Function to calculate the size of a single * resource. */ void SetResourceTypeSizeFunc(RESTYPE type, SizeType sizeFunc) { resourceTypes[type & TypeMask].sizeFunc = sizeFunc; } /** * Provide a function for iterating the subresources of a resource. * This allows for example more accurate accounting of the (memory) * resources consumed by a resource. * * @see FindSubResources * * @param[in] type Resource type used in size calculations. * * @param[in] sizeFunc Function to calculate the size of a single * resource. */ void SetResourceTypeFindSubResFunc(RESTYPE type, FindTypeSubResources findFunc) { resourceTypes[type & TypeMask].findSubResFunc = findFunc; } void SetResourceTypeErrorValue(RESTYPE type, int errorValue) { resourceTypes[type & TypeMask].errorValue = errorValue; } RESTYPE CreateNewResourceClass(void) { RESTYPE next = lastResourceClass >> 1; if (next & lastResourceType) return 0; lastResourceClass = next; TypeMask = next - 1; return next; } static ClientResourceRec clientTable[MAXCLIENTS]; static unsigned int ilog2(int val) { int bits; if (val <= 0) return 0; for (bits = 0; val != 0; bits++) val >>= 1; return bits - 1; } /***************** * ResourceClientBits * Returns the client bit offset in the client + resources ID field *****************/ unsigned int ResourceClientBits(void) { static unsigned int cache_ilog2 = 0; static unsigned int cache_limit = 0; if (LimitClients != cache_limit) { cache_limit = LimitClients; cache_ilog2 = ilog2(LimitClients); } return cache_ilog2; } /***************** * InitClientResources * When a new client is created, call this to allocate space * in resource table *****************/ Bool InitClientResources(ClientPtr client) { int i, j; if (client == serverClient) { lastResourceType = RT_LASTPREDEF; lastResourceClass = RC_LASTPREDEF; TypeMask = RC_LASTPREDEF - 1; free(resourceTypes); resourceTypes = malloc(sizeof(predefTypes)); if (!resourceTypes) return FALSE; memcpy(resourceTypes, predefTypes, sizeof(predefTypes)); } clientTable[i = client->index].resources = malloc(INITBUCKETS * sizeof(ResourcePtr)); if (!clientTable[i].resources) return FALSE; clientTable[i].buckets = INITBUCKETS; clientTable[i].elements = 0; clientTable[i].hashsize = INITHASHSIZE; /* Many IDs allocated from the server client are visible to clients, * so we don't use the SERVER_BIT for them, but we have to start * past the magic value constants used in the protocol. For normal * clients, we can start from zero, with SERVER_BIT set. */ clientTable[i].fakeID = client->clientAsMask | (client->index ? SERVER_BIT : SERVER_MINID); clientTable[i].endFakeID = (clientTable[i].fakeID | RESOURCE_ID_MASK) + 1; for (j = 0; j < INITBUCKETS; j++) { clientTable[i].resources[j] = NULL; } return TRUE; } int HashResourceID(XID id, unsigned int numBits) { static XID mask; if (!mask) mask = RESOURCE_ID_MASK; id &= mask; if (numBits < 9) return (id ^ (id >> numBits) ^ (id >> (numBits<<1))) & ~((~0U) << numBits); return (id ^ (id >> numBits)) & ~((~0U) << numBits); } static XID AvailableID(int client, XID id, XID maxid, XID goodid) { ResourcePtr res; if ((goodid >= id) && (goodid <= maxid)) return goodid; for (; id <= maxid; id++) { res = clientTable[client].resources[HashResourceID(id, clientTable[client].hashsize)]; while (res && (res->id != id)) res = res->next; if (!res) return id; } return 0; } void GetXIDRange(int client, Bool server, XID *minp, XID *maxp) { XID id, maxid; ResourcePtr *resp; ResourcePtr res; int i; XID goodid; id = (Mask) client << CLIENTOFFSET; if (server) id |= client ? SERVER_BIT : SERVER_MINID; maxid = id | RESOURCE_ID_MASK; goodid = 0; for (resp = clientTable[client].resources, i = clientTable[client].buckets; --i >= 0;) { for (res = *resp++; res; res = res->next) { if ((res->id < id) || (res->id > maxid)) continue; if (((res->id - id) >= (maxid - res->id)) ? (goodid = AvailableID(client, id, res->id - 1, goodid)) : !(goodid = AvailableID(client, res->id + 1, maxid, goodid))) maxid = res->id - 1; else id = res->id + 1; } } if (id > maxid) id = maxid = 0; *minp = id; *maxp = maxid; } /** * GetXIDList is called by the XC-MISC extension's MiscGetXIDList function. * This function tries to find count unused XIDs for the given client. It * puts the IDs in the array pids and returns the number found, which should * almost always be the number requested. * * The circumstances that lead to a call to this function are very rare. * Xlib must run out of IDs while trying to generate a request that wants * multiple ID's, like the Multi-buffering CreateImageBuffers request. * * No rocket science in the implementation; just iterate over all * possible IDs for the given client and pick the first count IDs * that aren't in use. A more efficient algorithm could probably be * invented, but this will be used so rarely that this should suffice. */ unsigned int GetXIDList(ClientPtr pClient, unsigned count, XID *pids) { unsigned int found = 0; XID rc, id = pClient->clientAsMask; XID maxid; void *val; maxid = id | RESOURCE_ID_MASK; while ((found < count) && (id <= maxid)) { rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, DixGetAttrAccess); if (rc == BadValue) { pids[found++] = id; } id++; } return found; } /* * Return the next usable fake client ID. * * Normally this is just the next one in line, but if we've used the last * in the range, we need to find a new range of safe IDs to avoid * over-running another client. */ XID FakeClientID(int client) { XID id, maxid; id = clientTable[client].fakeID++; if (id != clientTable[client].endFakeID) return id; GetXIDRange(client, TRUE, &id, &maxid); if (!id) { if (!client) FatalError("FakeClientID: server internal ids exhausted\n"); MarkClientException(clients[client]); id = ((Mask) client << CLIENTOFFSET) | (SERVER_BIT * 3); maxid = id | RESOURCE_ID_MASK; } clientTable[client].fakeID = id + 1; clientTable[client].endFakeID = maxid + 1; return id; } Bool AddResource(XID id, RESTYPE type, void *value) { int client; ClientResourceRec *rrec; ResourcePtr res, *head; #ifdef XSERVER_DTRACE XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type)); #endif client = CLIENT_ID(id); rrec = &clientTable[client]; if (!rrec->buckets) { ErrorF("[dix] AddResource(%lx, %x, %lx), client=%d \n", (unsigned long) id, type, (unsigned long) value, client); FatalError("client not in use\n"); } if ((rrec->elements >= 4 * rrec->buckets) && (rrec->hashsize < MAXHASHSIZE)) RebuildTable(client); head = &rrec->resources[HashResourceID(id, clientTable[client].hashsize)]; res = malloc(sizeof(ResourceRec)); if (!res) { (*resourceTypes[type & TypeMask].deleteFunc) (value, id); return FALSE; } res->next = *head; res->id = id; res->type = type; res->value = value; *head = res; rrec->elements++; CallResourceStateCallback(ResourceStateAdding, res); return TRUE; } static void RebuildTable(int client) { int j; ResourcePtr res, next; ResourcePtr **tails, *resources; ResourcePtr **tptr, *rptr; /* * For now, preserve insertion order, since some ddx layers depend * on resources being free in the opposite order they are added. */ j = 2 * clientTable[client].buckets; tails = xallocarray(j, sizeof(ResourcePtr *)); if (!tails) return; resources = xallocarray(j, sizeof(ResourcePtr)); if (!resources) { free(tails); return; } for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) { *rptr = NULL; *tptr = rptr; } clientTable[client].hashsize++; for (j = clientTable[client].buckets, rptr = clientTable[client].resources; --j >= 0; rptr++) { for (res = *rptr; res; res = next) { next = res->next; res->next = NULL; tptr = &tails[HashResourceID(res->id, clientTable[client].hashsize)]; **tptr = res; *tptr = &res->next; } } free(tails); clientTable[client].buckets *= 2; free(clientTable[client].resources); clientTable[client].resources = resources; } static void doFreeResource(ResourcePtr res, Bool skip) { CallResourceStateCallback(ResourceStateFreeing, res); if (!skip) resourceTypes[res->type & TypeMask].deleteFunc(res->value, res->id); free(res); } void FreeResource(XID id, RESTYPE skipDeleteFuncType) { int cid; ResourcePtr res; ResourcePtr *prev, *head; int *eltptr; int elements; if (((cid = CLIENT_ID(id)) < LimitClients) && clientTable[cid].buckets) { head = &clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; eltptr = &clientTable[cid].elements; prev = head; while ((res = *prev)) { if (res->id == id) { RESTYPE rtype = res->type; #ifdef XSERVER_DTRACE XSERVER_RESOURCE_FREE(res->id, res->type, res->value, TypeNameString(res->type)); #endif *prev = res->next; elements = --*eltptr; doFreeResource(res, rtype == skipDeleteFuncType); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ } else prev = &res->next; } } } void FreeResourceByType(XID id, RESTYPE type, Bool skipFree) { int cid; ResourcePtr res; ResourcePtr *prev, *head; if (((cid = CLIENT_ID(id)) < LimitClients) && clientTable[cid].buckets) { head = &clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; prev = head; while ((res = *prev)) { if (res->id == id && res->type == type) { #ifdef XSERVER_DTRACE XSERVER_RESOURCE_FREE(res->id, res->type, res->value, TypeNameString(res->type)); #endif *prev = res->next; clientTable[cid].elements--; doFreeResource(res, skipFree); break; } else prev = &res->next; } } } /* * Change the value associated with a resource id. Caller * is responsible for "doing the right thing" with the old * data */ Bool ChangeResourceValue(XID id, RESTYPE rtype, void *value) { int cid; ResourcePtr res; if (((cid = CLIENT_ID(id)) < LimitClients) && clientTable[cid].buckets) { res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; for (; res; res = res->next) if ((res->id == id) && (res->type == rtype)) { res->value = value; return TRUE; } } return FALSE; } /* Note: if func adds or deletes resources, then func can get called * more than once for some resources. If func adds new resources, * func might or might not get called for them. func cannot both * add and delete an equal number of resources! */ void FindClientResourcesByType(ClientPtr client, RESTYPE type, FindResType func, void *cdata) { ResourcePtr *resources; ResourcePtr this, next; int i, elements; int *eltptr; if (!client) client = serverClient; resources = clientTable[client->index].resources; eltptr = &clientTable[client->index].elements; for (i = 0; i < clientTable[client->index].buckets; i++) { for (this = resources[i]; this; this = next) { next = this->next; if (!type || this->type == type) { elements = *eltptr; (*func) (this->value, this->id, cdata); if (*eltptr != elements) next = resources[i]; /* start over */ } } } } void FindSubResources(void *resource, RESTYPE type, FindAllRes func, void *cdata) { struct ResourceType rtype = resourceTypes[type & TypeMask]; rtype.findSubResFunc(resource, func, cdata); } void FindAllClientResources(ClientPtr client, FindAllRes func, void *cdata) { ResourcePtr *resources; ResourcePtr this, next; int i, elements; int *eltptr; if (!client) client = serverClient; resources = clientTable[client->index].resources; eltptr = &clientTable[client->index].elements; for (i = 0; i < clientTable[client->index].buckets; i++) { for (this = resources[i]; this; this = next) { next = this->next; elements = *eltptr; (*func) (this->value, this->id, this->type, cdata); if (*eltptr != elements) next = resources[i]; /* start over */ } } } void * LookupClientResourceComplex(ClientPtr client, RESTYPE type, FindComplexResType func, void *cdata) { ResourcePtr *resources; ResourcePtr this, next; void *value; int i; if (!client) client = serverClient; resources = clientTable[client->index].resources; for (i = 0; i < clientTable[client->index].buckets; i++) { for (this = resources[i]; this; this = next) { next = this->next; if (!type || this->type == type) { /* workaround func freeing the type as DRI1 does */ value = this->value; if ((*func) (value, this->id, cdata)) return value; } } } return NULL; } void FreeClientNeverRetainResources(ClientPtr client) { ResourcePtr *resources; ResourcePtr this; ResourcePtr *prev; int j, elements; int *eltptr; if (!client) return; resources = clientTable[client->index].resources; eltptr = &clientTable[client->index].elements; for (j = 0; j < clientTable[client->index].buckets; j++) { prev = &resources[j]; while ((this = *prev)) { RESTYPE rtype = this->type; if (rtype & RC_NEVERRETAIN) { #ifdef XSERVER_DTRACE XSERVER_RESOURCE_FREE(this->id, this->type, this->value, TypeNameString(this->type)); #endif *prev = this->next; clientTable[client->index].elements--; elements = *eltptr; doFreeResource(this, FALSE); if (*eltptr != elements) prev = &resources[j]; /* prev may no longer be valid */ } else prev = &this->next; } } } void FreeClientResources(ClientPtr client) { ResourcePtr *resources; ResourcePtr this; int j; /* This routine shouldn't be called with a null client, but just in case ... */ if (!client) return; HandleSaveSet(client); resources = clientTable[client->index].resources; for (j = 0; j < clientTable[client->index].buckets; j++) { /* It may seem silly to update the head of this resource list as we delete the members, since the entire list will be deleted any way, but there are some resource deletion functions "FreeClientPixels" for one which do a LookupID on another resource id (a Colormap id in this case), so the resource list must be kept valid up to the point that it is deleted, so every time we delete a resource, we must update the head, just like in FreeResource. I hope that this doesn't slow down mass deletion appreciably. PRH */ ResourcePtr *head; head = &resources[j]; for (this = *head; this; this = *head) { #ifdef XSERVER_DTRACE XSERVER_RESOURCE_FREE(this->id, this->type, this->value, TypeNameString(this->type)); #endif *head = this->next; clientTable[client->index].elements--; doFreeResource(this, FALSE); } } free(clientTable[client->index].resources); clientTable[client->index].resources = NULL; clientTable[client->index].buckets = 0; } void FreeAllResources(void) { int i; for (i = currentMaxClients; --i >= 0;) { if (clientTable[i].buckets) FreeClientResources(clients[i]); } } Bool LegalNewID(XID id, ClientPtr client) { void *val; int rc; #ifdef PANORAMIX XID minid, maxid; if (!noPanoramiXExtension) { minid = client->clientAsMask | (client->index ? SERVER_BIT : SERVER_MINID); maxid = (clientTable[client->index].fakeID | RESOURCE_ID_MASK) + 1; if ((id >= minid) && (id <= maxid)) return TRUE; } #endif /* PANORAMIX */ if (client->clientAsMask == (id & ~RESOURCE_ID_MASK)) { rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, DixGetAttrAccess); return rc == BadValue; } return FALSE; } int dixLookupResourceByType(void **result, XID id, RESTYPE rtype, ClientPtr client, Mask mode) { int cid = CLIENT_ID(id); ResourcePtr res = NULL; *result = NULL; if ((rtype & TypeMask) > lastResourceType) return BadImplementation; if ((cid < LimitClients) && clientTable[cid].buckets) { res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; for (; res; res = res->next) if (res->id == id && res->type == rtype) break; } if (client) { client->errorValue = id; } if (!res) return resourceTypes[rtype & TypeMask].errorValue; if (client) { cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, res->value, RT_NONE, NULL, mode); if (cid == BadValue) return resourceTypes[rtype & TypeMask].errorValue; if (cid != Success) return cid; } *result = res->value; return Success; } int dixLookupResourceByClass(void **result, XID id, RESTYPE rclass, ClientPtr client, Mask mode) { int cid = CLIENT_ID(id); ResourcePtr res = NULL; *result = NULL; if ((cid < LimitClients) && clientTable[cid].buckets) { res = clientTable[cid].resources[HashResourceID(id, clientTable[cid].hashsize)]; for (; res; res = res->next) if (res->id == id && (res->type & rclass)) break; } if (client) { client->errorValue = id; } if (!res) return BadValue; if (client) { cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, res->value, RT_NONE, NULL, mode); if (cid != Success) return cid; } *result = res->value; return Success; } xorg-server-21.1.16/dix/selection.c0000644000175000017500000002273414757411105012560 /************************************************************ Copyright 1987, 1989, 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, 1989 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "windowstr.h" #include "dixstruct.h" #include "dispatch.h" #include "selection.h" #include "xace.h" /***************************************************************** * Selection Stuff * * dixLookupSelection * * Selections are global to the server. The list of selections should * not be traversed directly. Instead, use the functions listed above. * *****************************************************************/ Selection *CurrentSelections; CallbackListPtr SelectionCallback; int dixLookupSelection(Selection ** result, Atom selectionName, ClientPtr client, Mask access_mode) { Selection *pSel; int rc = BadMatch; client->errorValue = selectionName; for (pSel = CurrentSelections; pSel; pSel = pSel->next) if (pSel->selection == selectionName) break; if (pSel) rc = XaceHookSelectionAccess(client, &pSel, access_mode); *result = pSel; return rc; } void InitSelections(void) { Selection *pSel, *pNextSel; pSel = CurrentSelections; while (pSel) { pNextSel = pSel->next; dixFreeObjectWithPrivates(pSel, PRIVATE_SELECTION); pSel = pNextSel; } CurrentSelections = NULL; } static _X_INLINE void CallSelectionCallback(Selection * pSel, ClientPtr client, SelectionCallbackKind kind) { SelectionInfoRec info = { pSel, client, kind }; CallCallbacks(&SelectionCallback, &info); } void DeleteWindowFromAnySelections(WindowPtr pWin) { Selection *pSel; for (pSel = CurrentSelections; pSel; pSel = pSel->next) if (pSel->pWin == pWin) { CallSelectionCallback(pSel, NULL, SelectionWindowDestroy); pSel->pWin = (WindowPtr) NULL; pSel->window = None; pSel->client = NullClient; } } void DeleteClientFromAnySelections(ClientPtr client) { Selection *pSel; for (pSel = CurrentSelections; pSel; pSel = pSel->next) if (pSel->client == client) { CallSelectionCallback(pSel, NULL, SelectionClientClose); pSel->pWin = (WindowPtr) NULL; pSel->window = None; pSel->client = NullClient; } } int ProcSetSelectionOwner(ClientPtr client) { WindowPtr pWin = NULL; TimeStamp time; Selection *pSel; int rc; REQUEST(xSetSelectionOwnerReq); REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); UpdateCurrentTime(); time = ClientTimeToServerTime(stuff->time); /* If the client's time stamp is in the future relative to the server's time stamp, do not set the selection, just return success. */ if (CompareTimeStamps(time, currentTime) == LATER) return Success; if (stuff->window != None) { rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; } if (!ValidAtom(stuff->selection)) { client->errorValue = stuff->selection; return BadAtom; } /* * First, see if the selection is already set... */ rc = dixLookupSelection(&pSel, stuff->selection, client, DixSetAttrAccess); if (rc == Success) { /* If the timestamp in client's request is in the past relative to the time stamp indicating the last time the owner of the selection was set, do not set the selection, just return success. */ if (CompareTimeStamps(time, pSel->lastTimeChanged) == EARLIER) return Success; if (pSel->client && (!pWin || (pSel->client != client))) { xEvent event = { .u.selectionClear.time = time.milliseconds, .u.selectionClear.window = pSel->window, .u.selectionClear.atom = pSel->selection }; event.u.u.type = SelectionClear; WriteEventsToClient(pSel->client, 1, &event); } } else if (rc == BadMatch) { /* * It doesn't exist, so add it... */ pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION); if (!pSel) return BadAlloc; pSel->selection = stuff->selection; /* security creation/labeling check */ rc = XaceHookSelectionAccess(client, &pSel, DixCreateAccess | DixSetAttrAccess); if (rc != Success) { free(pSel); return rc; } pSel->next = CurrentSelections; CurrentSelections = pSel; } else return rc; pSel->lastTimeChanged = time; pSel->window = stuff->window; pSel->pWin = pWin; pSel->client = (pWin ? client : NullClient); CallSelectionCallback(pSel, client, SelectionSetOwner); return Success; } int ProcGetSelectionOwner(ClientPtr client) { int rc; Selection *pSel; xGetSelectionOwnerReply reply; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); if (!ValidAtom(stuff->id)) { client->errorValue = stuff->id; return BadAtom; } reply = (xGetSelectionOwnerReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, }; rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess); if (rc == Success) reply.owner = pSel->window; else if (rc == BadMatch) reply.owner = None; else return rc; WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); return Success; } int ProcConvertSelection(ClientPtr client) { Bool paramsOkay; xEvent event; WindowPtr pWin; Selection *pSel; int rc; REQUEST(xConvertSelectionReq); REQUEST_SIZE_MATCH(xConvertSelectionReq); rc = dixLookupWindow(&pWin, stuff->requestor, client, DixSetAttrAccess); if (rc != Success) return rc; paramsOkay = ValidAtom(stuff->selection) && ValidAtom(stuff->target); paramsOkay &= (stuff->property == None) || ValidAtom(stuff->property); if (!paramsOkay) { client->errorValue = stuff->property; return BadAtom; } if (stuff->time == CurrentTime) UpdateCurrentTime(); rc = dixLookupSelection(&pSel, stuff->selection, client, DixReadAccess); memset(&event, 0, sizeof(xEvent)); if (rc != Success && rc != BadMatch) return rc; else if (rc == Success && pSel->window != None) { event.u.u.type = SelectionRequest; event.u.selectionRequest.owner = pSel->window; event.u.selectionRequest.time = stuff->time; event.u.selectionRequest.requestor = stuff->requestor; event.u.selectionRequest.selection = stuff->selection; event.u.selectionRequest.target = stuff->target; event.u.selectionRequest.property = stuff->property; if (pSel->client && pSel->client != serverClient && !pSel->client->clientGone) { WriteEventsToClient(pSel->client, 1, &event); return Success; } } event.u.u.type = SelectionNotify; event.u.selectionNotify.time = stuff->time; event.u.selectionNotify.requestor = stuff->requestor; event.u.selectionNotify.selection = stuff->selection; event.u.selectionNotify.target = stuff->target; event.u.selectionNotify.property = None; WriteEventsToClient(client, 1, &event); return Success; } xorg-server-21.1.16/dix/swaprep.c0000644000175000017500000010723714757411105012256 /************************************************************ 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "dixstruct.h" #include #include "scrnintstr.h" #include "swaprep.h" #include "globals.h" static void SwapFontInfo(xQueryFontReply * pr); static void SwapCharInfo(xCharInfo * pInfo); static void SwapFont(xQueryFontReply * pr, Bool hasGlyphs); /** * Thanks to Jack Palevich for testing and subsequently rewriting all this * * \param size size in bytes */ void _X_COLD Swap32Write(ClientPtr pClient, int size, CARD32 *pbuf) { int i; size >>= 2; for (i = 0; i < size; i++) /* brackets are mandatory here, because "swapl" macro expands to several statements */ { swapl(&pbuf[i]); } WriteToClient(pClient, size << 2, pbuf); } /** * * \param size size in bytes */ void _X_COLD CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) { int bufsize = size; CARD32 *pbufT; CARD32 *from, *to, *fromLast, *toLast; CARD32 tmpbuf[1]; /* Allocate as big a buffer as we can... */ while (!(pbufT = malloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) { pbufT = tmpbuf; break; } } /* convert lengths from # of bytes to # of longs */ size >>= 2; bufsize >>= 2; from = pbuf; fromLast = from + size; while (from < fromLast) { int nbytes; to = pbufT; toLast = to + min(bufsize, fromLast - from); nbytes = (toLast - to) << 2; while (to < toLast) { /* can't write "cpswapl(*from++, *to++)" because cpswapl is a macro that evaluates its args more than once */ cpswapl(*from, *to); from++; to++; } WriteToClient(pClient, nbytes, pbufT); } if (pbufT != tmpbuf) free(pbufT); } /** * * \param size size in bytes */ void _X_COLD CopySwap16Write(ClientPtr pClient, int size, short *pbuf) { int bufsize = size; short *pbufT; short *from, *to, *fromLast, *toLast; short tmpbuf[2]; /* Allocate as big a buffer as we can... */ while (!(pbufT = malloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) { pbufT = tmpbuf; break; } } /* convert lengths from # of bytes to # of shorts */ size >>= 1; bufsize >>= 1; from = pbuf; fromLast = from + size; while (from < fromLast) { int nbytes; to = pbufT; toLast = to + min(bufsize, fromLast - from); nbytes = (toLast - to) << 1; while (to < toLast) { /* can't write "cpswaps(*from++, *to++)" because cpswaps is a macro that evaluates its args more than once */ cpswaps(*from, *to); from++; to++; } WriteToClient(pClient, nbytes, pbufT); } if (pbufT != tmpbuf) free(pbufT); } /* Extra-small reply */ void _X_COLD SGenericReply(ClientPtr pClient, int size, xGenericReply * pRep) { swaps(&pRep->sequenceNumber); WriteToClient(pClient, size, pRep); } /* Extra-large reply */ void _X_COLD SGetWindowAttributesReply(ClientPtr pClient, int size, xGetWindowAttributesReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->visualID); swaps(&pRep->class); swapl(&pRep->backingBitPlanes); swapl(&pRep->backingPixel); swapl(&pRep->colormap); swapl(&pRep->allEventMasks); swapl(&pRep->yourEventMask); swaps(&pRep->doNotPropagateMask); WriteToClient(pClient, size, pRep); } void _X_COLD SGetGeometryReply(ClientPtr pClient, int size, xGetGeometryReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->root); swaps(&pRep->x); swaps(&pRep->y); swaps(&pRep->width); swaps(&pRep->height); swaps(&pRep->borderWidth); WriteToClient(pClient, size, pRep); } void _X_COLD SQueryTreeReply(ClientPtr pClient, int size, xQueryTreeReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->root); swapl(&pRep->parent); swaps(&pRep->nChildren); WriteToClient(pClient, size, pRep); } void _X_COLD SInternAtomReply(ClientPtr pClient, int size, xInternAtomReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->atom); WriteToClient(pClient, size, pRep); } void _X_COLD SGetAtomNameReply(ClientPtr pClient, int size, xGetAtomNameReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nameLength); WriteToClient(pClient, size, pRep); } void _X_COLD SGetPropertyReply(ClientPtr pClient, int size, xGetPropertyReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->propertyType); swapl(&pRep->bytesAfter); swapl(&pRep->nItems); WriteToClient(pClient, size, pRep); } void _X_COLD SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nProperties); WriteToClient(pClient, size, pRep); } void _X_COLD SGetSelectionOwnerReply(ClientPtr pClient, int size, xGetSelectionOwnerReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->owner); WriteToClient(pClient, size, pRep); } void _X_COLD SQueryPointerReply(ClientPtr pClient, int size, xQueryPointerReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->root); swapl(&pRep->child); swaps(&pRep->rootX); swaps(&pRep->rootY); swaps(&pRep->winX); swaps(&pRep->winY); swaps(&pRep->mask); WriteToClient(pClient, size, pRep); } static void _X_COLD SwapTimecoord(xTimecoord * pCoord) { swapl(&pCoord->time); swaps(&pCoord->x); swaps(&pCoord->y); } void _X_COLD SwapTimeCoordWrite(ClientPtr pClient, int size, xTimecoord * pRep) { int i, n; xTimecoord *pRepT; n = size / sizeof(xTimecoord); pRepT = pRep; for (i = 0; i < n; i++) { SwapTimecoord(pRepT); pRepT++; } WriteToClient(pClient, size, pRep); } void _X_COLD SGetMotionEventsReply(ClientPtr pClient, int size, xGetMotionEventsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->nEvents); WriteToClient(pClient, size, pRep); } void _X_COLD STranslateCoordsReply(ClientPtr pClient, int size, xTranslateCoordsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->child); swaps(&pRep->dstX); swaps(&pRep->dstY); WriteToClient(pClient, size, pRep); } void _X_COLD SGetInputFocusReply(ClientPtr pClient, int size, xGetInputFocusReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->focus); WriteToClient(pClient, size, pRep); } /* extra long reply */ void _X_COLD SQueryKeymapReply(ClientPtr pClient, int size, xQueryKeymapReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); WriteToClient(pClient, size, pRep); } static void _X_COLD SwapCharInfo(xCharInfo * pInfo) { swaps(&pInfo->leftSideBearing); swaps(&pInfo->rightSideBearing); swaps(&pInfo->characterWidth); swaps(&pInfo->ascent); swaps(&pInfo->descent); swaps(&pInfo->attributes); } static void _X_COLD SwapFontInfo(xQueryFontReply * pr) { swaps(&pr->minCharOrByte2); swaps(&pr->maxCharOrByte2); swaps(&pr->defaultChar); swaps(&pr->nFontProps); swaps(&pr->fontAscent); swaps(&pr->fontDescent); SwapCharInfo(&pr->minBounds); SwapCharInfo(&pr->maxBounds); swapl(&pr->nCharInfos); } static void _X_COLD SwapFont(xQueryFontReply * pr, Bool hasGlyphs) { unsigned i; xCharInfo *pxci; unsigned nchars, nprops; char *pby; swaps(&pr->sequenceNumber); swapl(&pr->length); nchars = pr->nCharInfos; nprops = pr->nFontProps; SwapFontInfo(pr); pby = (char *) &pr[1]; /* Font properties are an atom and either an int32 or a CARD32, so * they are always 2 4 byte values */ for (i = 0; i < nprops; i++) { swapl((int *) pby); pby += 4; swapl((int *) pby); pby += 4; } if (hasGlyphs) { pxci = (xCharInfo *) pby; for (i = 0; i < nchars; i++, pxci++) SwapCharInfo(pxci); } } void _X_COLD SQueryFontReply(ClientPtr pClient, int size, xQueryFontReply * pRep) { SwapFont(pRep, TRUE); WriteToClient(pClient, size, pRep); } void _X_COLD SQueryTextExtentsReply(ClientPtr pClient, int size, xQueryTextExtentsReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->fontAscent); swaps(&pRep->fontDescent); swaps(&pRep->overallAscent); swaps(&pRep->overallDescent); swapl(&pRep->overallWidth); swapl(&pRep->overallLeft); swapl(&pRep->overallRight); WriteToClient(pClient, size, pRep); } void _X_COLD SListFontsReply(ClientPtr pClient, int size, xListFontsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nFonts); WriteToClient(pClient, size, pRep); } void _X_COLD SListFontsWithInfoReply(ClientPtr pClient, int size, xListFontsWithInfoReply * pRep) { SwapFont((xQueryFontReply *) pRep, FALSE); WriteToClient(pClient, size, pRep); } void _X_COLD SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nPaths); WriteToClient(pClient, size, pRep); } void _X_COLD SGetImageReply(ClientPtr pClient, int size, xGetImageReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->visual); WriteToClient(pClient, size, pRep); /* Fortunately, image doesn't need swapping */ } void _X_COLD SListInstalledColormapsReply(ClientPtr pClient, int size, xListInstalledColormapsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nColormaps); WriteToClient(pClient, size, pRep); } void _X_COLD SAllocColorReply(ClientPtr pClient, int size, xAllocColorReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->red); swaps(&pRep->green); swaps(&pRep->blue); swapl(&pRep->pixel); WriteToClient(pClient, size, pRep); } void _X_COLD SAllocNamedColorReply(ClientPtr pClient, int size, xAllocNamedColorReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->pixel); swaps(&pRep->exactRed); swaps(&pRep->exactGreen); swaps(&pRep->exactBlue); swaps(&pRep->screenRed); swaps(&pRep->screenGreen); swaps(&pRep->screenBlue); WriteToClient(pClient, size, pRep); } void _X_COLD SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nPixels); swaps(&pRep->nMasks); WriteToClient(pClient, size, pRep); } void _X_COLD SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nPixels); swapl(&pRep->redMask); swapl(&pRep->greenMask); swapl(&pRep->blueMask); WriteToClient(pClient, size, pRep); } static void _X_COLD SwapRGB(xrgb * prgb) { swaps(&prgb->red); swaps(&prgb->green); swaps(&prgb->blue); } void _X_COLD SQColorsExtend(ClientPtr pClient, int size, xrgb * prgb) { int i, n; xrgb *prgbT; n = size / sizeof(xrgb); prgbT = prgb; for (i = 0; i < n; i++) { SwapRGB(prgbT); prgbT++; } WriteToClient(pClient, size, prgb); } void _X_COLD SQueryColorsReply(ClientPtr pClient, int size, xQueryColorsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nColors); WriteToClient(pClient, size, pRep); } void _X_COLD SLookupColorReply(ClientPtr pClient, int size, xLookupColorReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->exactRed); swaps(&pRep->exactGreen); swaps(&pRep->exactBlue); swaps(&pRep->screenRed); swaps(&pRep->screenGreen); swaps(&pRep->screenBlue); WriteToClient(pClient, size, pRep); } void _X_COLD SQueryBestSizeReply(ClientPtr pClient, int size, xQueryBestSizeReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->width); swaps(&pRep->height); WriteToClient(pClient, size, pRep); } void _X_COLD SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); WriteToClient(pClient, size, pRep); } void _X_COLD SGetKeyboardMappingReply(ClientPtr pClient, int size, xGetKeyboardMappingReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); WriteToClient(pClient, size, pRep); } void _X_COLD SGetPointerMappingReply(ClientPtr pClient, int size, xGetPointerMappingReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); WriteToClient(pClient, size, pRep); } void _X_COLD SGetModifierMappingReply(ClientPtr pClient, int size, xGetModifierMappingReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); WriteToClient(pClient, size, pRep); } void _X_COLD SGetKeyboardControlReply(ClientPtr pClient, int size, xGetKeyboardControlReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->ledMask); swaps(&pRep->bellPitch); swaps(&pRep->bellDuration); WriteToClient(pClient, size, pRep); } void _X_COLD SGetPointerControlReply(ClientPtr pClient, int size, xGetPointerControlReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->accelNumerator); swaps(&pRep->accelDenominator); swaps(&pRep->threshold); WriteToClient(pClient, size, pRep); } void _X_COLD SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply * pRep) { swaps(&pRep->sequenceNumber); swaps(&pRep->timeout); swaps(&pRep->interval); WriteToClient(pClient, size, pRep); } void _X_COLD SLHostsExtend(ClientPtr pClient, int size, char *buf) { char *bufT = buf; char *endbuf = buf + size; while (bufT < endbuf) { xHostEntry *host = (xHostEntry *) bufT; int len = host->length; swaps(&host->length); bufT += sizeof(xHostEntry) + pad_to_int32(len); } WriteToClient(pClient, size, buf); } void _X_COLD SListHostsReply(ClientPtr pClient, int size, xListHostsReply * pRep) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swaps(&pRep->nHosts); WriteToClient(pClient, size, pRep); } void _X_COLD SErrorEvent(xError * from, xError * to) { to->type = X_Error; to->errorCode = from->errorCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->resourceID, to->resourceID); cpswaps(from->minorCode, to->minorCode); to->majorCode = from->majorCode; } void _X_COLD SKeyButtonPtrEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.keyButtonPointer.time, to->u.keyButtonPointer.time); cpswapl(from->u.keyButtonPointer.root, to->u.keyButtonPointer.root); cpswapl(from->u.keyButtonPointer.event, to->u.keyButtonPointer.event); cpswapl(from->u.keyButtonPointer.child, to->u.keyButtonPointer.child); cpswaps(from->u.keyButtonPointer.rootX, to->u.keyButtonPointer.rootX); cpswaps(from->u.keyButtonPointer.rootY, to->u.keyButtonPointer.rootY); cpswaps(from->u.keyButtonPointer.eventX, to->u.keyButtonPointer.eventX); cpswaps(from->u.keyButtonPointer.eventY, to->u.keyButtonPointer.eventY); cpswaps(from->u.keyButtonPointer.state, to->u.keyButtonPointer.state); to->u.keyButtonPointer.sameScreen = from->u.keyButtonPointer.sameScreen; } void _X_COLD SEnterLeaveEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.enterLeave.time, to->u.enterLeave.time); cpswapl(from->u.enterLeave.root, to->u.enterLeave.root); cpswapl(from->u.enterLeave.event, to->u.enterLeave.event); cpswapl(from->u.enterLeave.child, to->u.enterLeave.child); cpswaps(from->u.enterLeave.rootX, to->u.enterLeave.rootX); cpswaps(from->u.enterLeave.rootY, to->u.enterLeave.rootY); cpswaps(from->u.enterLeave.eventX, to->u.enterLeave.eventX); cpswaps(from->u.enterLeave.eventY, to->u.enterLeave.eventY); cpswaps(from->u.enterLeave.state, to->u.enterLeave.state); to->u.enterLeave.mode = from->u.enterLeave.mode; to->u.enterLeave.flags = from->u.enterLeave.flags; } void _X_COLD SFocusEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.focus.window, to->u.focus.window); to->u.focus.mode = from->u.focus.mode; } void _X_COLD SExposeEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.expose.window, to->u.expose.window); cpswaps(from->u.expose.x, to->u.expose.x); cpswaps(from->u.expose.y, to->u.expose.y); cpswaps(from->u.expose.width, to->u.expose.width); cpswaps(from->u.expose.height, to->u.expose.height); cpswaps(from->u.expose.count, to->u.expose.count); } void _X_COLD SGraphicsExposureEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.graphicsExposure.drawable, to->u.graphicsExposure.drawable); cpswaps(from->u.graphicsExposure.x, to->u.graphicsExposure.x); cpswaps(from->u.graphicsExposure.y, to->u.graphicsExposure.y); cpswaps(from->u.graphicsExposure.width, to->u.graphicsExposure.width); cpswaps(from->u.graphicsExposure.height, to->u.graphicsExposure.height); cpswaps(from->u.graphicsExposure.minorEvent, to->u.graphicsExposure.minorEvent); cpswaps(from->u.graphicsExposure.count, to->u.graphicsExposure.count); to->u.graphicsExposure.majorEvent = from->u.graphicsExposure.majorEvent; } void _X_COLD SNoExposureEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.noExposure.drawable, to->u.noExposure.drawable); cpswaps(from->u.noExposure.minorEvent, to->u.noExposure.minorEvent); to->u.noExposure.majorEvent = from->u.noExposure.majorEvent; } void _X_COLD SVisibilityEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.visibility.window, to->u.visibility.window); to->u.visibility.state = from->u.visibility.state; } void _X_COLD SCreateNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.createNotify.window, to->u.createNotify.window); cpswapl(from->u.createNotify.parent, to->u.createNotify.parent); cpswaps(from->u.createNotify.x, to->u.createNotify.x); cpswaps(from->u.createNotify.y, to->u.createNotify.y); cpswaps(from->u.createNotify.width, to->u.createNotify.width); cpswaps(from->u.createNotify.height, to->u.createNotify.height); cpswaps(from->u.createNotify.borderWidth, to->u.createNotify.borderWidth); to->u.createNotify.override = from->u.createNotify.override; } void _X_COLD SDestroyNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.destroyNotify.event, to->u.destroyNotify.event); cpswapl(from->u.destroyNotify.window, to->u.destroyNotify.window); } void _X_COLD SUnmapNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.unmapNotify.event, to->u.unmapNotify.event); cpswapl(from->u.unmapNotify.window, to->u.unmapNotify.window); to->u.unmapNotify.fromConfigure = from->u.unmapNotify.fromConfigure; } void _X_COLD SMapNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.mapNotify.event, to->u.mapNotify.event); cpswapl(from->u.mapNotify.window, to->u.mapNotify.window); to->u.mapNotify.override = from->u.mapNotify.override; } void _X_COLD SMapRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.mapRequest.parent, to->u.mapRequest.parent); cpswapl(from->u.mapRequest.window, to->u.mapRequest.window); } void _X_COLD SReparentEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.reparent.event, to->u.reparent.event); cpswapl(from->u.reparent.window, to->u.reparent.window); cpswapl(from->u.reparent.parent, to->u.reparent.parent); cpswaps(from->u.reparent.x, to->u.reparent.x); cpswaps(from->u.reparent.y, to->u.reparent.y); to->u.reparent.override = from->u.reparent.override; } void _X_COLD SConfigureNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.configureNotify.event, to->u.configureNotify.event); cpswapl(from->u.configureNotify.window, to->u.configureNotify.window); cpswapl(from->u.configureNotify.aboveSibling, to->u.configureNotify.aboveSibling); cpswaps(from->u.configureNotify.x, to->u.configureNotify.x); cpswaps(from->u.configureNotify.y, to->u.configureNotify.y); cpswaps(from->u.configureNotify.width, to->u.configureNotify.width); cpswaps(from->u.configureNotify.height, to->u.configureNotify.height); cpswaps(from->u.configureNotify.borderWidth, to->u.configureNotify.borderWidth); to->u.configureNotify.override = from->u.configureNotify.override; } void _X_COLD SConfigureRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; /* actually stack-mode */ cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.configureRequest.parent, to->u.configureRequest.parent); cpswapl(from->u.configureRequest.window, to->u.configureRequest.window); cpswapl(from->u.configureRequest.sibling, to->u.configureRequest.sibling); cpswaps(from->u.configureRequest.x, to->u.configureRequest.x); cpswaps(from->u.configureRequest.y, to->u.configureRequest.y); cpswaps(from->u.configureRequest.width, to->u.configureRequest.width); cpswaps(from->u.configureRequest.height, to->u.configureRequest.height); cpswaps(from->u.configureRequest.borderWidth, to->u.configureRequest.borderWidth); cpswaps(from->u.configureRequest.valueMask, to->u.configureRequest.valueMask); } void _X_COLD SGravityEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.gravity.event, to->u.gravity.event); cpswapl(from->u.gravity.window, to->u.gravity.window); cpswaps(from->u.gravity.x, to->u.gravity.x); cpswaps(from->u.gravity.y, to->u.gravity.y); } void _X_COLD SResizeRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.resizeRequest.window, to->u.resizeRequest.window); cpswaps(from->u.resizeRequest.width, to->u.resizeRequest.width); cpswaps(from->u.resizeRequest.height, to->u.resizeRequest.height); } void _X_COLD SCirculateEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.circulate.event, to->u.circulate.event); cpswapl(from->u.circulate.window, to->u.circulate.window); cpswapl(from->u.circulate.parent, to->u.circulate.parent); to->u.circulate.place = from->u.circulate.place; } void _X_COLD SPropertyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.property.window, to->u.property.window); cpswapl(from->u.property.atom, to->u.property.atom); cpswapl(from->u.property.time, to->u.property.time); to->u.property.state = from->u.property.state; } void _X_COLD SSelectionClearEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.selectionClear.time, to->u.selectionClear.time); cpswapl(from->u.selectionClear.window, to->u.selectionClear.window); cpswapl(from->u.selectionClear.atom, to->u.selectionClear.atom); } void _X_COLD SSelectionRequestEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.selectionRequest.time, to->u.selectionRequest.time); cpswapl(from->u.selectionRequest.owner, to->u.selectionRequest.owner); cpswapl(from->u.selectionRequest.requestor, to->u.selectionRequest.requestor); cpswapl(from->u.selectionRequest.selection, to->u.selectionRequest.selection); cpswapl(from->u.selectionRequest.target, to->u.selectionRequest.target); cpswapl(from->u.selectionRequest.property, to->u.selectionRequest.property); } void _X_COLD SSelectionNotifyEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.selectionNotify.time, to->u.selectionNotify.time); cpswapl(from->u.selectionNotify.requestor, to->u.selectionNotify.requestor); cpswapl(from->u.selectionNotify.selection, to->u.selectionNotify.selection); cpswapl(from->u.selectionNotify.target, to->u.selectionNotify.target); cpswapl(from->u.selectionNotify.property, to->u.selectionNotify.property); } void _X_COLD SColormapEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.colormap.window, to->u.colormap.window); cpswapl(from->u.colormap.colormap, to->u.colormap.colormap); to->u.colormap.new = from->u.colormap.new; to->u.colormap.state = from->u.colormap.state; } void _X_COLD SMappingEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); to->u.mappingNotify.request = from->u.mappingNotify.request; to->u.mappingNotify.firstKeyCode = from->u.mappingNotify.firstKeyCode; to->u.mappingNotify.count = from->u.mappingNotify.count; } void _X_COLD SClientMessageEvent(xEvent *from, xEvent *to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; /* actually format */ cpswaps(from->u.u.sequenceNumber, to->u.u.sequenceNumber); cpswapl(from->u.clientMessage.window, to->u.clientMessage.window); cpswapl(from->u.clientMessage.u.l.type, to->u.clientMessage.u.l.type); switch (from->u.u.detail) { case 8: memmove(to->u.clientMessage.u.b.bytes, from->u.clientMessage.u.b.bytes, 20); break; case 16: cpswaps(from->u.clientMessage.u.s.shorts0, to->u.clientMessage.u.s.shorts0); cpswaps(from->u.clientMessage.u.s.shorts1, to->u.clientMessage.u.s.shorts1); cpswaps(from->u.clientMessage.u.s.shorts2, to->u.clientMessage.u.s.shorts2); cpswaps(from->u.clientMessage.u.s.shorts3, to->u.clientMessage.u.s.shorts3); cpswaps(from->u.clientMessage.u.s.shorts4, to->u.clientMessage.u.s.shorts4); cpswaps(from->u.clientMessage.u.s.shorts5, to->u.clientMessage.u.s.shorts5); cpswaps(from->u.clientMessage.u.s.shorts6, to->u.clientMessage.u.s.shorts6); cpswaps(from->u.clientMessage.u.s.shorts7, to->u.clientMessage.u.s.shorts7); cpswaps(from->u.clientMessage.u.s.shorts8, to->u.clientMessage.u.s.shorts8); cpswaps(from->u.clientMessage.u.s.shorts9, to->u.clientMessage.u.s.shorts9); break; case 32: cpswapl(from->u.clientMessage.u.l.longs0, to->u.clientMessage.u.l.longs0); cpswapl(from->u.clientMessage.u.l.longs1, to->u.clientMessage.u.l.longs1); cpswapl(from->u.clientMessage.u.l.longs2, to->u.clientMessage.u.l.longs2); cpswapl(from->u.clientMessage.u.l.longs3, to->u.clientMessage.u.l.longs3); cpswapl(from->u.clientMessage.u.l.longs4, to->u.clientMessage.u.l.longs4); break; } } void _X_COLD SKeymapNotifyEvent(xEvent *from, xEvent *to) { /* Keymap notify events are special; they have no sequence number field, and contain entirely 8-bit data */ *to = *from; } static void _X_COLD SwapConnSetup(xConnSetup * pConnSetup, xConnSetup * pConnSetupT) { cpswapl(pConnSetup->release, pConnSetupT->release); cpswapl(pConnSetup->ridBase, pConnSetupT->ridBase); cpswapl(pConnSetup->ridMask, pConnSetupT->ridMask); cpswapl(pConnSetup->motionBufferSize, pConnSetupT->motionBufferSize); cpswaps(pConnSetup->nbytesVendor, pConnSetupT->nbytesVendor); cpswaps(pConnSetup->maxRequestSize, pConnSetupT->maxRequestSize); pConnSetupT->minKeyCode = pConnSetup->minKeyCode; pConnSetupT->maxKeyCode = pConnSetup->maxKeyCode; pConnSetupT->numRoots = pConnSetup->numRoots; pConnSetupT->numFormats = pConnSetup->numFormats; pConnSetupT->imageByteOrder = pConnSetup->imageByteOrder; pConnSetupT->bitmapBitOrder = pConnSetup->bitmapBitOrder; pConnSetupT->bitmapScanlineUnit = pConnSetup->bitmapScanlineUnit; pConnSetupT->bitmapScanlinePad = pConnSetup->bitmapScanlinePad; } static void _X_COLD SwapWinRoot(xWindowRoot * pRoot, xWindowRoot * pRootT) { cpswapl(pRoot->windowId, pRootT->windowId); cpswapl(pRoot->defaultColormap, pRootT->defaultColormap); cpswapl(pRoot->whitePixel, pRootT->whitePixel); cpswapl(pRoot->blackPixel, pRootT->blackPixel); cpswapl(pRoot->currentInputMask, pRootT->currentInputMask); cpswaps(pRoot->pixWidth, pRootT->pixWidth); cpswaps(pRoot->pixHeight, pRootT->pixHeight); cpswaps(pRoot->mmWidth, pRootT->mmWidth); cpswaps(pRoot->mmHeight, pRootT->mmHeight); cpswaps(pRoot->minInstalledMaps, pRootT->minInstalledMaps); cpswaps(pRoot->maxInstalledMaps, pRootT->maxInstalledMaps); cpswapl(pRoot->rootVisualID, pRootT->rootVisualID); pRootT->backingStore = pRoot->backingStore; pRootT->saveUnders = pRoot->saveUnders; pRootT->rootDepth = pRoot->rootDepth; pRootT->nDepths = pRoot->nDepths; } static void _X_COLD SwapVisual(xVisualType * pVis, xVisualType * pVisT) { cpswapl(pVis->visualID, pVisT->visualID); pVisT->class = pVis->class; pVisT->bitsPerRGB = pVis->bitsPerRGB; cpswaps(pVis->colormapEntries, pVisT->colormapEntries); cpswapl(pVis->redMask, pVisT->redMask); cpswapl(pVis->greenMask, pVisT->greenMask); cpswapl(pVis->blueMask, pVisT->blueMask); } void _X_COLD SwapConnSetupInfo(char *pInfo, char *pInfoT) { int i, j, k; xConnSetup *pConnSetup = (xConnSetup *) pInfo; xDepth *depth; xWindowRoot *root; SwapConnSetup(pConnSetup, (xConnSetup *) pInfoT); pInfo += sizeof(xConnSetup); pInfoT += sizeof(xConnSetup); /* Copy the vendor string */ i = pad_to_int32(pConnSetup->nbytesVendor); memcpy(pInfoT, pInfo, i); pInfo += i; pInfoT += i; /* The Pixmap formats don't need to be swapped, just copied. */ i = sizeof(xPixmapFormat) * pConnSetup->numFormats; memcpy(pInfoT, pInfo, i); pInfo += i; pInfoT += i; for (i = 0; i < pConnSetup->numRoots; i++) { root = (xWindowRoot *) pInfo; SwapWinRoot(root, (xWindowRoot *) pInfoT); pInfo += sizeof(xWindowRoot); pInfoT += sizeof(xWindowRoot); for (j = 0; j < root->nDepths; j++) { depth = (xDepth *) pInfo; ((xDepth *) pInfoT)->depth = depth->depth; cpswaps(depth->nVisuals, ((xDepth *) pInfoT)->nVisuals); pInfo += sizeof(xDepth); pInfoT += sizeof(xDepth); for (k = 0; k < depth->nVisuals; k++) { SwapVisual((xVisualType *) pInfo, (xVisualType *) pInfoT); pInfo += sizeof(xVisualType); pInfoT += sizeof(xVisualType); } } } } void _X_COLD WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) { char *pInfoTBase; pInfoTBase = malloc(size); if (!pInfoTBase) { pClient->noClientException = -1; return; } SwapConnSetupInfo(pInfo, pInfoTBase); WriteToClient(pClient, (int) size, pInfoTBase); free(pInfoTBase); } void _X_COLD SwapConnSetupPrefix(xConnSetupPrefix * pcspFrom, xConnSetupPrefix * pcspTo) { pcspTo->success = pcspFrom->success; pcspTo->lengthReason = pcspFrom->lengthReason; cpswaps(pcspFrom->majorVersion, pcspTo->majorVersion); cpswaps(pcspFrom->minorVersion, pcspTo->minorVersion); cpswaps(pcspFrom->length, pcspTo->length); } void _X_COLD WriteSConnSetupPrefix(ClientPtr pClient, xConnSetupPrefix * pcsp) { xConnSetupPrefix cspT; SwapConnSetupPrefix(pcsp, &cspT); WriteToClient(pClient, sizeof(cspT), &cspT); } /* * Dummy entry for ReplySwapVector[] */ void _X_COLD ReplyNotSwappd(ClientPtr pClient, int size, void *pbuf) { FatalError("Not implemented"); } xorg-server-21.1.16/dix/swapreq.c0000644000175000017500000006217714757411105012262 /************************************************************ 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" /* for SendEvent */ #include "swapreq.h" /* Thanks to Jack Palevich for testing and subsequently rewriting all this */ /* Byte swap a list of longs */ void SwapLongs(CARD32 *list, unsigned long count) { while (count >= 8) { swapl(list + 0); swapl(list + 1); swapl(list + 2); swapl(list + 3); swapl(list + 4); swapl(list + 5); swapl(list + 6); swapl(list + 7); list += 8; count -= 8; } if (count != 0) { do { swapl(list); list++; } while (--count != 0); } } /* Byte swap a list of shorts */ void SwapShorts(short *list, unsigned long count) { while (count >= 16) { swaps(list + 0); swaps(list + 1); swaps(list + 2); swaps(list + 3); swaps(list + 4); swaps(list + 5); swaps(list + 6); swaps(list + 7); swaps(list + 8); swaps(list + 9); swaps(list + 10); swaps(list + 11); swaps(list + 12); swaps(list + 13); swaps(list + 14); swaps(list + 15); list += 16; count -= 16; } if (count != 0) { do { swaps(list); list++; } while (--count != 0); } } /* The following is used for all requests that have no fields to be swapped (except "length") */ int _X_COLD SProcSimpleReq(ClientPtr client) { REQUEST(xReq); swaps(&stuff->length); return (*ProcVector[stuff->reqType]) (client); } /* The following is used for all requests that have only a single 32-bit field to be swapped, coming right after the "length" field */ int _X_COLD SProcResourceReq(ClientPtr client) { REQUEST(xResourceReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xResourceReq); /* not EXACT */ swapl(&stuff->id); return (*ProcVector[stuff->reqType]) (client); } int _X_COLD SProcCreateWindow(ClientPtr client) { REQUEST(xCreateWindowReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xCreateWindowReq); swapl(&stuff->wid); swapl(&stuff->parent); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->borderWidth); swaps(&stuff->class); swapl(&stuff->visual); swapl(&stuff->mask); SwapRestL(stuff); return ((*ProcVector[X_CreateWindow]) (client)); } int _X_COLD SProcChangeWindowAttributes(ClientPtr client) { REQUEST(xChangeWindowAttributesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); swapl(&stuff->window); swapl(&stuff->valueMask); SwapRestL(stuff); return ((*ProcVector[X_ChangeWindowAttributes]) (client)); } int _X_COLD SProcReparentWindow(ClientPtr client) { REQUEST(xReparentWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xReparentWindowReq); swapl(&stuff->window); swapl(&stuff->parent); swaps(&stuff->x); swaps(&stuff->y); return ((*ProcVector[X_ReparentWindow]) (client)); } int _X_COLD SProcConfigureWindow(ClientPtr client) { REQUEST(xConfigureWindowReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); swapl(&stuff->window); swaps(&stuff->mask); SwapRestL(stuff); return ((*ProcVector[X_ConfigureWindow]) (client)); } int _X_COLD SProcInternAtom(ClientPtr client) { REQUEST(xInternAtomReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xInternAtomReq); swaps(&stuff->nbytes); return ((*ProcVector[X_InternAtom]) (client)); } int _X_COLD SProcChangeProperty(ClientPtr client) { REQUEST(xChangePropertyReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangePropertyReq); swapl(&stuff->window); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->nUnits); switch (stuff->format) { case 8: break; case 16: SwapRestS(stuff); break; case 32: SwapRestL(stuff); break; } return ((*ProcVector[X_ChangeProperty]) (client)); } int _X_COLD SProcDeleteProperty(ClientPtr client) { REQUEST(xDeletePropertyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDeletePropertyReq); swapl(&stuff->window); swapl(&stuff->property); return ((*ProcVector[X_DeleteProperty]) (client)); } int _X_COLD SProcGetProperty(ClientPtr client) { REQUEST(xGetPropertyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetPropertyReq); swapl(&stuff->window); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->longOffset); swapl(&stuff->longLength); return ((*ProcVector[X_GetProperty]) (client)); } int _X_COLD SProcSetSelectionOwner(ClientPtr client) { REQUEST(xSetSelectionOwnerReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); swapl(&stuff->window); swapl(&stuff->selection); swapl(&stuff->time); return ((*ProcVector[X_SetSelectionOwner]) (client)); } int _X_COLD SProcConvertSelection(ClientPtr client) { REQUEST(xConvertSelectionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xConvertSelectionReq); swapl(&stuff->requestor); swapl(&stuff->selection); swapl(&stuff->target); swapl(&stuff->property); swapl(&stuff->time); return ((*ProcVector[X_ConvertSelection]) (client)); } int _X_COLD SProcSendEvent(ClientPtr client) { xEvent eventT = { .u.u.type = 0 }; EventSwapPtr proc; REQUEST(xSendEventReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSendEventReq); swapl(&stuff->destination); swapl(&stuff->eventMask); /* Generic events can have variable size, but SendEvent request holds exactly 32B of event data. */ if (stuff->event.u.u.type == GenericEvent) { client->errorValue = stuff->event.u.u.type; return BadValue; } /* Swap event */ proc = EventSwapVector[stuff->event.u.u.type & 0177]; if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ return BadValue; (*proc) (&stuff->event, &eventT); stuff->event = eventT; return ((*ProcVector[X_SendEvent]) (client)); } int _X_COLD SProcGrabPointer(ClientPtr client) { REQUEST(xGrabPointerReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGrabPointerReq); swapl(&stuff->grabWindow); swaps(&stuff->eventMask); swapl(&stuff->confineTo); swapl(&stuff->cursor); swapl(&stuff->time); return ((*ProcVector[X_GrabPointer]) (client)); } int _X_COLD SProcGrabButton(ClientPtr client) { REQUEST(xGrabButtonReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGrabButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->eventMask); swapl(&stuff->confineTo); swapl(&stuff->cursor); swaps(&stuff->modifiers); return ((*ProcVector[X_GrabButton]) (client)); } int _X_COLD SProcUngrabButton(ClientPtr client) { REQUEST(xUngrabButtonReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); return ((*ProcVector[X_UngrabButton]) (client)); } int _X_COLD SProcChangeActivePointerGrab(ClientPtr client) { REQUEST(xChangeActivePointerGrabReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); swapl(&stuff->cursor); swapl(&stuff->time); swaps(&stuff->eventMask); return ((*ProcVector[X_ChangeActivePointerGrab]) (client)); } int _X_COLD SProcGrabKeyboard(ClientPtr client) { REQUEST(xGrabKeyboardReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGrabKeyboardReq); swapl(&stuff->grabWindow); swapl(&stuff->time); return ((*ProcVector[X_GrabKeyboard]) (client)); } int _X_COLD SProcGrabKey(ClientPtr client) { REQUEST(xGrabKeyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGrabKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); return ((*ProcVector[X_GrabKey]) (client)); } int _X_COLD SProcUngrabKey(ClientPtr client) { REQUEST(xUngrabKeyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); return ((*ProcVector[X_UngrabKey]) (client)); } int _X_COLD SProcGetMotionEvents(ClientPtr client) { REQUEST(xGetMotionEventsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetMotionEventsReq); swapl(&stuff->window); swapl(&stuff->start); swapl(&stuff->stop); return ((*ProcVector[X_GetMotionEvents]) (client)); } int _X_COLD SProcTranslateCoords(ClientPtr client) { REQUEST(xTranslateCoordsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xTranslateCoordsReq); swapl(&stuff->srcWid); swapl(&stuff->dstWid); swaps(&stuff->srcX); swaps(&stuff->srcY); return ((*ProcVector[X_TranslateCoords]) (client)); } int _X_COLD SProcWarpPointer(ClientPtr client) { REQUEST(xWarpPointerReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xWarpPointerReq); swapl(&stuff->srcWid); swapl(&stuff->dstWid); swaps(&stuff->srcX); swaps(&stuff->srcY); swaps(&stuff->srcWidth); swaps(&stuff->srcHeight); swaps(&stuff->dstX); swaps(&stuff->dstY); return ((*ProcVector[X_WarpPointer]) (client)); } int _X_COLD SProcSetInputFocus(ClientPtr client) { REQUEST(xSetInputFocusReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSetInputFocusReq); swapl(&stuff->focus); swapl(&stuff->time); return ((*ProcVector[X_SetInputFocus]) (client)); } int _X_COLD SProcOpenFont(ClientPtr client) { REQUEST(xOpenFontReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xOpenFontReq); swapl(&stuff->fid); swaps(&stuff->nbytes); return ((*ProcVector[X_OpenFont]) (client)); } int _X_COLD SProcListFonts(ClientPtr client) { REQUEST(xListFontsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xListFontsReq); swaps(&stuff->maxNames); swaps(&stuff->nbytes); return ((*ProcVector[X_ListFonts]) (client)); } int _X_COLD SProcListFontsWithInfo(ClientPtr client) { REQUEST(xListFontsWithInfoReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xListFontsWithInfoReq); swaps(&stuff->maxNames); swaps(&stuff->nbytes); return ((*ProcVector[X_ListFontsWithInfo]) (client)); } int _X_COLD SProcSetFontPath(ClientPtr client) { REQUEST(xSetFontPathReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSetFontPathReq); swaps(&stuff->nFonts); return ((*ProcVector[X_SetFontPath]) (client)); } int _X_COLD SProcCreatePixmap(ClientPtr client) { REQUEST(xCreatePixmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCreatePixmapReq); swapl(&stuff->pid); swapl(&stuff->drawable); swaps(&stuff->width); swaps(&stuff->height); return ((*ProcVector[X_CreatePixmap]) (client)); } int _X_COLD SProcCreateGC(ClientPtr client) { REQUEST(xCreateGCReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xCreateGCReq); swapl(&stuff->gc); swapl(&stuff->drawable); swapl(&stuff->mask); SwapRestL(stuff); return ((*ProcVector[X_CreateGC]) (client)); } int _X_COLD SProcChangeGC(ClientPtr client) { REQUEST(xChangeGCReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeGCReq); swapl(&stuff->gc); swapl(&stuff->mask); SwapRestL(stuff); return ((*ProcVector[X_ChangeGC]) (client)); } int _X_COLD SProcCopyGC(ClientPtr client) { REQUEST(xCopyGCReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCopyGCReq); swapl(&stuff->srcGC); swapl(&stuff->dstGC); swapl(&stuff->mask); return ((*ProcVector[X_CopyGC]) (client)); } int _X_COLD SProcSetDashes(ClientPtr client) { REQUEST(xSetDashesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSetDashesReq); swapl(&stuff->gc); swaps(&stuff->dashOffset); swaps(&stuff->nDashes); return ((*ProcVector[X_SetDashes]) (client)); } int _X_COLD SProcSetClipRectangles(ClientPtr client) { REQUEST(xSetClipRectanglesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); swapl(&stuff->gc); swaps(&stuff->xOrigin); swaps(&stuff->yOrigin); SwapRestS(stuff); return ((*ProcVector[X_SetClipRectangles]) (client)); } int _X_COLD SProcClearToBackground(ClientPtr client) { REQUEST(xClearAreaReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xClearAreaReq); swapl(&stuff->window); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); return ((*ProcVector[X_ClearArea]) (client)); } int _X_COLD SProcCopyArea(ClientPtr client) { REQUEST(xCopyAreaReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCopyAreaReq); swapl(&stuff->srcDrawable); swapl(&stuff->dstDrawable); swapl(&stuff->gc); swaps(&stuff->srcX); swaps(&stuff->srcY); swaps(&stuff->dstX); swaps(&stuff->dstY); swaps(&stuff->width); swaps(&stuff->height); return ((*ProcVector[X_CopyArea]) (client)); } int _X_COLD SProcCopyPlane(ClientPtr client) { REQUEST(xCopyPlaneReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCopyPlaneReq); swapl(&stuff->srcDrawable); swapl(&stuff->dstDrawable); swapl(&stuff->gc); swaps(&stuff->srcX); swaps(&stuff->srcY); swaps(&stuff->dstX); swaps(&stuff->dstY); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->bitPlane); return ((*ProcVector[X_CopyPlane]) (client)); } /* The following routine is used for all Poly drawing requests (except FillPoly, which uses a different request format) */ int _X_COLD SProcPoly(ClientPtr client) { REQUEST(xPolyPointReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xPolyPointReq); swapl(&stuff->drawable); swapl(&stuff->gc); SwapRestS(stuff); return ((*ProcVector[stuff->reqType]) (client)); } /* cannot use SProcPoly for this one, because xFillPolyReq is longer than xPolyPointReq, and we don't want to swap the difference as shorts! */ int _X_COLD SProcFillPoly(ClientPtr client) { REQUEST(xFillPolyReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xFillPolyReq); swapl(&stuff->drawable); swapl(&stuff->gc); SwapRestS(stuff); return ((*ProcVector[X_FillPoly]) (client)); } int _X_COLD SProcPutImage(ClientPtr client) { REQUEST(xPutImageReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xPutImageReq); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->dstX); swaps(&stuff->dstY); /* Image should already be swapped */ return ((*ProcVector[X_PutImage]) (client)); } int _X_COLD SProcGetImage(ClientPtr client) { REQUEST(xGetImageReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetImageReq); swapl(&stuff->drawable); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->planeMask); return ((*ProcVector[X_GetImage]) (client)); } /* ProcPolyText used for both PolyText8 and PolyText16 */ int _X_COLD SProcPolyText(ClientPtr client) { REQUEST(xPolyTextReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xPolyTextReq); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->x); swaps(&stuff->y); return ((*ProcVector[stuff->reqType]) (client)); } /* ProcImageText used for both ImageText8 and ImageText16 */ int _X_COLD SProcImageText(ClientPtr client) { REQUEST(xImageTextReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xImageTextReq); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->x); swaps(&stuff->y); return ((*ProcVector[stuff->reqType]) (client)); } int _X_COLD SProcCreateColormap(ClientPtr client) { REQUEST(xCreateColormapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCreateColormapReq); swapl(&stuff->mid); swapl(&stuff->window); swapl(&stuff->visual); return ((*ProcVector[X_CreateColormap]) (client)); } int _X_COLD SProcCopyColormapAndFree(ClientPtr client) { REQUEST(xCopyColormapAndFreeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); swapl(&stuff->mid); swapl(&stuff->srcCmap); return ((*ProcVector[X_CopyColormapAndFree]) (client)); } int _X_COLD SProcAllocColor(ClientPtr client) { REQUEST(xAllocColorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAllocColorReq); swapl(&stuff->cmap); swaps(&stuff->red); swaps(&stuff->green); swaps(&stuff->blue); return ((*ProcVector[X_AllocColor]) (client)); } int _X_COLD SProcAllocNamedColor(ClientPtr client) { REQUEST(xAllocNamedColorReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xAllocNamedColorReq); swapl(&stuff->cmap); swaps(&stuff->nbytes); return ((*ProcVector[X_AllocNamedColor]) (client)); } int _X_COLD SProcAllocColorCells(ClientPtr client) { REQUEST(xAllocColorCellsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAllocColorCellsReq); swapl(&stuff->cmap); swaps(&stuff->colors); swaps(&stuff->planes); return ((*ProcVector[X_AllocColorCells]) (client)); } int _X_COLD SProcAllocColorPlanes(ClientPtr client) { REQUEST(xAllocColorPlanesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAllocColorPlanesReq); swapl(&stuff->cmap); swaps(&stuff->colors); swaps(&stuff->red); swaps(&stuff->green); swaps(&stuff->blue); return ((*ProcVector[X_AllocColorPlanes]) (client)); } int _X_COLD SProcFreeColors(ClientPtr client) { REQUEST(xFreeColorsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xFreeColorsReq); swapl(&stuff->cmap); swapl(&stuff->planeMask); SwapRestL(stuff); return ((*ProcVector[X_FreeColors]) (client)); } void _X_COLD SwapColorItem(xColorItem * pItem) { swapl(&pItem->pixel); swaps(&pItem->red); swaps(&pItem->green); swaps(&pItem->blue); } int _X_COLD SProcStoreColors(ClientPtr client) { long count; xColorItem *pItem; REQUEST(xStoreColorsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xStoreColorsReq); swapl(&stuff->cmap); pItem = (xColorItem *) &stuff[1]; for (count = LengthRestB(stuff) / sizeof(xColorItem); --count >= 0;) SwapColorItem(pItem++); return ((*ProcVector[X_StoreColors]) (client)); } int _X_COLD SProcStoreNamedColor(ClientPtr client) { REQUEST(xStoreNamedColorReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xStoreNamedColorReq); swapl(&stuff->cmap); swapl(&stuff->pixel); swaps(&stuff->nbytes); return ((*ProcVector[X_StoreNamedColor]) (client)); } int _X_COLD SProcQueryColors(ClientPtr client) { REQUEST(xQueryColorsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xQueryColorsReq); swapl(&stuff->cmap); SwapRestL(stuff); return ((*ProcVector[X_QueryColors]) (client)); } int _X_COLD SProcLookupColor(ClientPtr client) { REQUEST(xLookupColorReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xLookupColorReq); swapl(&stuff->cmap); swaps(&stuff->nbytes); return ((*ProcVector[X_LookupColor]) (client)); } int _X_COLD SProcCreateCursor(ClientPtr client) { REQUEST(xCreateCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCreateCursorReq); swapl(&stuff->cid); swapl(&stuff->source); swapl(&stuff->mask); swaps(&stuff->foreRed); swaps(&stuff->foreGreen); swaps(&stuff->foreBlue); swaps(&stuff->backRed); swaps(&stuff->backGreen); swaps(&stuff->backBlue); swaps(&stuff->x); swaps(&stuff->y); return ((*ProcVector[X_CreateCursor]) (client)); } int _X_COLD SProcCreateGlyphCursor(ClientPtr client) { REQUEST(xCreateGlyphCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCreateGlyphCursorReq); swapl(&stuff->cid); swapl(&stuff->source); swapl(&stuff->mask); swaps(&stuff->sourceChar); swaps(&stuff->maskChar); swaps(&stuff->foreRed); swaps(&stuff->foreGreen); swaps(&stuff->foreBlue); swaps(&stuff->backRed); swaps(&stuff->backGreen); swaps(&stuff->backBlue); return ((*ProcVector[X_CreateGlyphCursor]) (client)); } int _X_COLD SProcRecolorCursor(ClientPtr client) { REQUEST(xRecolorCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecolorCursorReq); swapl(&stuff->cursor); swaps(&stuff->foreRed); swaps(&stuff->foreGreen); swaps(&stuff->foreBlue); swaps(&stuff->backRed); swaps(&stuff->backGreen); swaps(&stuff->backBlue); return ((*ProcVector[X_RecolorCursor]) (client)); } int _X_COLD SProcQueryBestSize(ClientPtr client) { REQUEST(xQueryBestSizeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xQueryBestSizeReq); swapl(&stuff->drawable); swaps(&stuff->width); swaps(&stuff->height); return ((*ProcVector[X_QueryBestSize]) (client)); } int _X_COLD SProcQueryExtension(ClientPtr client) { REQUEST(xQueryExtensionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xQueryExtensionReq); swaps(&stuff->nbytes); return ((*ProcVector[X_QueryExtension]) (client)); } int _X_COLD SProcChangeKeyboardMapping(ClientPtr client) { REQUEST(xChangeKeyboardMappingReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); SwapRestL(stuff); return ((*ProcVector[X_ChangeKeyboardMapping]) (client)); } int _X_COLD SProcChangeKeyboardControl(ClientPtr client) { REQUEST(xChangeKeyboardControlReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); swapl(&stuff->mask); SwapRestL(stuff); return ((*ProcVector[X_ChangeKeyboardControl]) (client)); } int _X_COLD SProcChangePointerControl(ClientPtr client) { REQUEST(xChangePointerControlReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xChangePointerControlReq); swaps(&stuff->accelNum); swaps(&stuff->accelDenum); swaps(&stuff->threshold); return ((*ProcVector[X_ChangePointerControl]) (client)); } int _X_COLD SProcSetScreenSaver(ClientPtr client) { REQUEST(xSetScreenSaverReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSetScreenSaverReq); swaps(&stuff->timeout); swaps(&stuff->interval); return ((*ProcVector[X_SetScreenSaver]) (client)); } int _X_COLD SProcChangeHosts(ClientPtr client) { REQUEST(xChangeHostsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeHostsReq); swaps(&stuff->hostLength); return ((*ProcVector[X_ChangeHosts]) (client)); } int _X_COLD SProcRotateProperties(ClientPtr client) { REQUEST(xRotatePropertiesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); swapl(&stuff->window); swaps(&stuff->nAtoms); swaps(&stuff->nPositions); SwapRestL(stuff); return ((*ProcVector[X_RotateProperties]) (client)); } int _X_COLD SProcNoOperation(ClientPtr client) { REQUEST(xReq); swaps(&stuff->length); return ((*ProcVector[X_NoOperation]) (client)); } void _X_COLD SwapConnClientPrefix(xConnClientPrefix * pCCP) { swaps(&pCCP->majorVersion); swaps(&pCCP->minorVersion); swaps(&pCCP->nbytesAuthProto); swaps(&pCCP->nbytesAuthString); } xorg-server-21.1.16/dix/tables.c0000644000175000017500000006501314757411105012042 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "windowstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "dixevents.h" #include "dispatch.h" #include "swaprep.h" #include "swapreq.h" int (*InitialVector[3]) (ClientPtr /* client */) = { 0, ProcInitialConnection, ProcEstablishConnection }; int (*ProcVector[256]) (ClientPtr /* client */) = { ProcBadRequest, ProcCreateWindow, ProcChangeWindowAttributes, ProcGetWindowAttributes, ProcDestroyWindow, ProcDestroySubwindows, /* 5 */ ProcChangeSaveSet, ProcReparentWindow, ProcMapWindow, ProcMapSubwindows, ProcUnmapWindow, /* 10 */ ProcUnmapSubwindows, ProcConfigureWindow, ProcCirculateWindow, ProcGetGeometry, ProcQueryTree, /* 15 */ ProcInternAtom, ProcGetAtomName, ProcChangeProperty, ProcDeleteProperty, ProcGetProperty, /* 20 */ ProcListProperties, ProcSetSelectionOwner, ProcGetSelectionOwner, ProcConvertSelection, ProcSendEvent, /* 25 */ ProcGrabPointer, ProcUngrabPointer, ProcGrabButton, ProcUngrabButton, ProcChangeActivePointerGrab, /* 30 */ ProcGrabKeyboard, ProcUngrabKeyboard, ProcGrabKey, ProcUngrabKey, ProcAllowEvents, /* 35 */ ProcGrabServer, ProcUngrabServer, ProcQueryPointer, ProcGetMotionEvents, ProcTranslateCoords, /* 40 */ ProcWarpPointer, ProcSetInputFocus, ProcGetInputFocus, ProcQueryKeymap, ProcOpenFont, /* 45 */ ProcCloseFont, ProcQueryFont, ProcQueryTextExtents, ProcListFonts, ProcListFontsWithInfo, /* 50 */ ProcSetFontPath, ProcGetFontPath, ProcCreatePixmap, ProcFreePixmap, ProcCreateGC, /* 55 */ ProcChangeGC, ProcCopyGC, ProcSetDashes, ProcSetClipRectangles, ProcFreeGC, /* 60 */ ProcClearToBackground, ProcCopyArea, ProcCopyPlane, ProcPolyPoint, ProcPolyLine, /* 65 */ ProcPolySegment, ProcPolyRectangle, ProcPolyArc, ProcFillPoly, ProcPolyFillRectangle, /* 70 */ ProcPolyFillArc, ProcPutImage, ProcGetImage, ProcPolyText, ProcPolyText, /* 75 */ ProcImageText8, ProcImageText16, ProcCreateColormap, ProcFreeColormap, ProcCopyColormapAndFree, /* 80 */ ProcInstallColormap, ProcUninstallColormap, ProcListInstalledColormaps, ProcAllocColor, ProcAllocNamedColor, /* 85 */ ProcAllocColorCells, ProcAllocColorPlanes, ProcFreeColors, ProcStoreColors, ProcStoreNamedColor, /* 90 */ ProcQueryColors, ProcLookupColor, ProcCreateCursor, ProcCreateGlyphCursor, ProcFreeCursor, /* 95 */ ProcRecolorCursor, ProcQueryBestSize, ProcQueryExtension, ProcListExtensions, ProcChangeKeyboardMapping, /* 100 */ ProcGetKeyboardMapping, ProcChangeKeyboardControl, ProcGetKeyboardControl, ProcBell, ProcChangePointerControl, /* 105 */ ProcGetPointerControl, ProcSetScreenSaver, ProcGetScreenSaver, ProcChangeHosts, ProcListHosts, /* 110 */ ProcChangeAccessControl, ProcChangeCloseDownMode, ProcKillClient, ProcRotateProperties, ProcForceScreenSaver, /* 115 */ ProcSetPointerMapping, ProcGetPointerMapping, ProcSetModifierMapping, ProcGetModifierMapping, ProcBadRequest, /* 120 */ ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */ ProcBadRequest, ProcNoOperation, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest }; int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcBadRequest, SProcCreateWindow, SProcChangeWindowAttributes, SProcResourceReq, /* GetWindowAttributes */ SProcResourceReq, /* DestroyWindow */ SProcResourceReq, /* 5 DestroySubwindows */ SProcResourceReq, /* SProcChangeSaveSet, */ SProcReparentWindow, SProcResourceReq, /* MapWindow */ SProcResourceReq, /* MapSubwindows */ SProcResourceReq, /* 10 UnmapWindow */ SProcResourceReq, /* UnmapSubwindows */ SProcConfigureWindow, SProcResourceReq, /* SProcCirculateWindow, */ SProcResourceReq, /* GetGeometry */ SProcResourceReq, /* 15 QueryTree */ SProcInternAtom, SProcResourceReq, /* SProcGetAtomName, */ SProcChangeProperty, SProcDeleteProperty, SProcGetProperty, /* 20 */ SProcResourceReq, /* SProcListProperties, */ SProcSetSelectionOwner, SProcResourceReq, /* SProcGetSelectionOwner, */ SProcConvertSelection, SProcSendEvent, /* 25 */ SProcGrabPointer, SProcResourceReq, /* SProcUngrabPointer, */ SProcGrabButton, SProcUngrabButton, SProcChangeActivePointerGrab, /* 30 */ SProcGrabKeyboard, SProcResourceReq, /* SProcUngrabKeyboard, */ SProcGrabKey, SProcUngrabKey, SProcResourceReq, /* 35 SProcAllowEvents, */ SProcSimpleReq, /* SProcGrabServer, */ SProcSimpleReq, /* SProcUngrabServer, */ SProcResourceReq, /* SProcQueryPointer, */ SProcGetMotionEvents, SProcTranslateCoords, /*40 */ SProcWarpPointer, SProcSetInputFocus, SProcSimpleReq, /* SProcGetInputFocus, */ SProcSimpleReq, /* QueryKeymap, */ SProcOpenFont, /* 45 */ SProcResourceReq, /* SProcCloseFont, */ SProcResourceReq, /* SProcQueryFont, */ SProcResourceReq, /* SProcQueryTextExtents, */ SProcListFonts, SProcListFontsWithInfo, /* 50 */ SProcSetFontPath, SProcSimpleReq, /* GetFontPath, */ SProcCreatePixmap, SProcResourceReq, /* SProcFreePixmap, */ SProcCreateGC, /* 55 */ SProcChangeGC, SProcCopyGC, SProcSetDashes, SProcSetClipRectangles, SProcResourceReq, /* 60 SProcFreeGC, */ SProcClearToBackground, SProcCopyArea, SProcCopyPlane, SProcPoly, /* PolyPoint, */ SProcPoly, /* 65 PolyLine */ SProcPoly, /* PolySegment, */ SProcPoly, /* PolyRectangle, */ SProcPoly, /* PolyArc, */ SProcFillPoly, SProcPoly, /* 70 PolyFillRectangle */ SProcPoly, /* PolyFillArc, */ SProcPutImage, SProcGetImage, SProcPolyText, SProcPolyText, /* 75 */ SProcImageText, SProcImageText, SProcCreateColormap, SProcResourceReq, /* SProcFreeColormap, */ SProcCopyColormapAndFree, /* 80 */ SProcResourceReq, /* SProcInstallColormap, */ SProcResourceReq, /* SProcUninstallColormap, */ SProcResourceReq, /* SProcListInstalledColormaps, */ SProcAllocColor, SProcAllocNamedColor, /* 85 */ SProcAllocColorCells, SProcAllocColorPlanes, SProcFreeColors, SProcStoreColors, SProcStoreNamedColor, /* 90 */ SProcQueryColors, SProcLookupColor, SProcCreateCursor, SProcCreateGlyphCursor, SProcResourceReq, /* 95 SProcFreeCursor, */ SProcRecolorCursor, SProcQueryBestSize, SProcQueryExtension, SProcSimpleReq, /* ListExtensions, */ SProcChangeKeyboardMapping, /* 100 */ SProcSimpleReq, /* GetKeyboardMapping, */ SProcChangeKeyboardControl, SProcSimpleReq, /* GetKeyboardControl, */ SProcSimpleReq, /* Bell, */ SProcChangePointerControl, /* 105 */ SProcSimpleReq, /* GetPointerControl, */ SProcSetScreenSaver, SProcSimpleReq, /* GetScreenSaver, */ SProcChangeHosts, SProcSimpleReq, /* 110 ListHosts, */ SProcSimpleReq, /* SProcChangeAccessControl, */ SProcSimpleReq, /* SProcChangeCloseDownMode, */ SProcResourceReq, /* SProcKillClient, */ SProcRotateProperties, SProcSimpleReq, /* 115 ForceScreenSaver */ SProcSimpleReq, /* SetPointerMapping, */ SProcSimpleReq, /* GetPointerMapping, */ SProcSimpleReq, /* SetModifierMapping, */ SProcSimpleReq, /* GetModifierMapping, */ ProcBadRequest, /* 120 */ ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, /* 125 */ ProcBadRequest, SProcNoOperation, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest, ProcBadRequest }; EventSwapPtr EventSwapVector[MAXEVENTS] = { (EventSwapPtr) SErrorEvent, NotImplemented, SKeyButtonPtrEvent, SKeyButtonPtrEvent, SKeyButtonPtrEvent, SKeyButtonPtrEvent, /* 5 */ SKeyButtonPtrEvent, SEnterLeaveEvent, SEnterLeaveEvent, SFocusEvent, SFocusEvent, /* 10 */ SKeymapNotifyEvent, SExposeEvent, SGraphicsExposureEvent, SNoExposureEvent, SVisibilityEvent, /* 15 */ SCreateNotifyEvent, SDestroyNotifyEvent, SUnmapNotifyEvent, SMapNotifyEvent, SMapRequestEvent, /* 20 */ SReparentEvent, SConfigureNotifyEvent, SConfigureRequestEvent, SGravityEvent, SResizeRequestEvent, /* 25 */ SCirculateEvent, SCirculateEvent, SPropertyEvent, SSelectionClearEvent, SSelectionRequestEvent, /* 30 */ SSelectionNotifyEvent, SColormapEvent, SClientMessageEvent, SMappingEvent, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented, NotImplemented }; ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetWindowAttributesReply, ReplyNotSwappd, ReplyNotSwappd, /* 5 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 10 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetGeometryReply, (ReplySwapPtr) SQueryTreeReply, /* 15 */ (ReplySwapPtr) SInternAtomReply, (ReplySwapPtr) SGetAtomNameReply, ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetPropertyReply, /* 20 */ (ReplySwapPtr) SListPropertiesReply, ReplyNotSwappd, (ReplySwapPtr) SGetSelectionOwnerReply, ReplyNotSwappd, ReplyNotSwappd, /* 25 */ (ReplySwapPtr) SGenericReply, /* SGrabPointerReply, */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 30 */ (ReplySwapPtr) SGenericReply, /* SGrabKeyboardReply, */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 35 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SQueryPointerReply, (ReplySwapPtr) SGetMotionEventsReply, (ReplySwapPtr) STranslateCoordsReply, /* 40 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetInputFocusReply, (ReplySwapPtr) SQueryKeymapReply, ReplyNotSwappd, /* 45 */ ReplyNotSwappd, (ReplySwapPtr) SQueryFontReply, (ReplySwapPtr) SQueryTextExtentsReply, (ReplySwapPtr) SListFontsReply, (ReplySwapPtr) SListFontsWithInfoReply, /* 50 */ ReplyNotSwappd, (ReplySwapPtr) SGetFontPathReply, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 55 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 60 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 65 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 70 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SGetImageReply, ReplyNotSwappd, ReplyNotSwappd, /* 75 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 80 */ ReplyNotSwappd, ReplyNotSwappd, (ReplySwapPtr) SListInstalledColormapsReply, (ReplySwapPtr) SAllocColorReply, (ReplySwapPtr) SAllocNamedColorReply, /* 85 */ (ReplySwapPtr) SAllocColorCellsReply, (ReplySwapPtr) SAllocColorPlanesReply, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 90 */ (ReplySwapPtr) SQueryColorsReply, (ReplySwapPtr) SLookupColorReply, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 95 */ ReplyNotSwappd, (ReplySwapPtr) SQueryBestSizeReply, (ReplySwapPtr) SGenericReply, /* SQueryExtensionReply, */ (ReplySwapPtr) SListExtensionsReply, ReplyNotSwappd, /* 100 */ (ReplySwapPtr) SGetKeyboardMappingReply, ReplyNotSwappd, (ReplySwapPtr) SGetKeyboardControlReply, ReplyNotSwappd, ReplyNotSwappd, /* 105 */ (ReplySwapPtr) SGetPointerControlReply, ReplyNotSwappd, (ReplySwapPtr) SGetScreenSaverReply, ReplyNotSwappd, (ReplySwapPtr) SListHostsReply, /* 110 */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 115 */ (ReplySwapPtr) SGenericReply, /* SetPointerMapping */ (ReplySwapPtr) SGetPointerMappingReply, (ReplySwapPtr) SGenericReply, /* SetModifierMapping */ (ReplySwapPtr) SGetModifierMappingReply, /* 119 */ ReplyNotSwappd, /* 120 */ ReplyNotSwappd, /* 121 */ ReplyNotSwappd, /* 122 */ ReplyNotSwappd, /* 123 */ ReplyNotSwappd, /* 124 */ ReplyNotSwappd, /* 125 */ ReplyNotSwappd, /* 126 */ ReplyNotSwappd, /* NoOperation */ ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd }; xorg-server-21.1.16/dix/touch.c0000644000175000017500000007515414757411105011721 /* * Copyright © 2011 Collabra Ltd. * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include "scrnintstr.h" #include "dixgrabs.h" #include "eventstr.h" #include "exevents.h" #include "exglobals.h" #include "inpututils.h" #include "eventconvert.h" #include "windowstr.h" #include "mi.h" #define TOUCH_HISTORY_SIZE 100 Bool touchEmulatePointer = TRUE; /** * Some documentation about touch points: * The driver submits touch events with its own (unique) touch point ID. * The driver may re-use those IDs, the DDX doesn't care. It just passes on * the data to the DIX. In the server, the driver's ID is referred to as the * DDX id anyway. * * On a TouchBegin, we create a DDXTouchPointInfo that contains the DDX id * and the client ID that this touchpoint will have. The client ID is the * one visible on the protocol. * * TouchUpdate and TouchEnd will only be processed if there is an active * touchpoint with the same DDX id. * * The DDXTouchPointInfo struct is stored dev->last.touches. When the event * being processed, it becomes a TouchPointInfo in dev->touch-touches which * contains amongst other things the sprite trace and delivery information. */ /** * Check which devices need a bigger touch event queue and grow their * last.touches by half its current size. * * @param client Always the serverClient * @param closure Always NULL * * @return Always True. If we fail to grow we probably will topple over soon * anyway and re-executing this won't help. */ static Bool TouchResizeQueue(DeviceIntPtr dev) { DDXTouchPointInfoPtr tmp; size_t size; /* Grow sufficiently so we don't need to do it often */ size = dev->last.num_touches + dev->last.num_touches / 2 + 1; tmp = reallocarray(dev->last.touches, size, sizeof(*dev->last.touches)); if (tmp) { int j; dev->last.touches = tmp; for (j = dev->last.num_touches; j < size; j++) TouchInitDDXTouchPoint(dev, &dev->last.touches[j]); dev->last.num_touches = size; return TRUE; } return FALSE; } /** * Given the DDX-facing ID (which is _not_ DeviceEvent::detail.touch), find the * associated DDXTouchPointInfoRec. * * @param dev The device to create the touch point for * @param ddx_id Touch id assigned by the driver/ddx * @param create Create the touchpoint if it cannot be found */ DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev, uint32_t ddx_id, Bool create) { DDXTouchPointInfoPtr ti; int i; if (!dev->touch) return NULL; for (i = 0; i < dev->last.num_touches; i++) { ti = &dev->last.touches[i]; if (ti->active && ti->ddx_id == ddx_id) return ti; } return create ? TouchBeginDDXTouch(dev, ddx_id) : NULL; } /** * Given a unique DDX ID for a touchpoint, create a touchpoint record and * return it. * * If no other touch points are active, mark new touchpoint for pointer * emulation. * * Returns NULL on failure (i.e. if another touch with that ID is already active, * allocation failure). */ DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id) { static int next_client_id = 1; int i; TouchClassPtr t = dev->touch; DDXTouchPointInfoPtr ti = NULL; Bool emulate_pointer; if (!t) return NULL; emulate_pointer = touchEmulatePointer && (t->mode == XIDirectTouch); /* Look for another active touchpoint with the same DDX ID. DDX * touchpoints must be unique. */ if (TouchFindByDDXID(dev, ddx_id, FALSE)) return NULL; for (;;) { for (i = 0; i < dev->last.num_touches; i++) { /* Only emulate pointer events on the first touch */ if (dev->last.touches[i].active) emulate_pointer = FALSE; else if (!ti) /* ti is now first non-active touch rec */ ti = &dev->last.touches[i]; if (!emulate_pointer && ti) break; } if (ti) break; if (!TouchResizeQueue(dev)) break; } if (ti) { int client_id; ti->active = TRUE; ti->ddx_id = ddx_id; client_id = next_client_id; next_client_id++; if (next_client_id == 0) next_client_id = 1; ti->client_id = client_id; ti->emulate_pointer = emulate_pointer; } return ti; } void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti) { TouchClassPtr t = dev->touch; if (!t) return; ti->active = FALSE; } void TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch) { memset(ddxtouch, 0, sizeof(*ddxtouch)); ddxtouch->valuators = valuator_mask_new(dev->valuator->numAxes); } Bool TouchInitTouchPoint(TouchClassPtr t, ValuatorClassPtr v, int index) { TouchPointInfoPtr ti; if (index >= t->num_touches) return FALSE; ti = &t->touches[index]; memset(ti, 0, sizeof(*ti)); ti->valuators = valuator_mask_new(v->numAxes); if (!ti->valuators) return FALSE; ti->sprite.spriteTrace = calloc(32, sizeof(*ti->sprite.spriteTrace)); if (!ti->sprite.spriteTrace) { valuator_mask_free(&ti->valuators); return FALSE; } ti->sprite.spriteTraceSize = 32; ti->sprite.spriteTrace[0] = screenInfo.screens[0]->root; ti->sprite.hot.pScreen = screenInfo.screens[0]; ti->sprite.hotPhys.pScreen = screenInfo.screens[0]; ti->client_id = -1; return TRUE; } void TouchFreeTouchPoint(DeviceIntPtr device, int index) { TouchPointInfoPtr ti; int i; if (!device->touch || index >= device->touch->num_touches) return; ti = &device->touch->touches[index]; if (ti->active) TouchEndTouch(device, ti); for (i = 0; i < ti->num_listeners; i++) TouchRemoveListener(ti, ti->listeners[0].listener); valuator_mask_free(&ti->valuators); free(ti->sprite.spriteTrace); ti->sprite.spriteTrace = NULL; free(ti->listeners); ti->listeners = NULL; free(ti->history); ti->history = NULL; ti->history_size = 0; ti->history_elements = 0; } /** * Given a client-facing ID (e.g. DeviceEvent::detail.touch), find the * associated TouchPointInfoRec. */ TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev, uint32_t client_id) { TouchClassPtr t = dev->touch; TouchPointInfoPtr ti; int i; if (!t) return NULL; for (i = 0; i < t->num_touches; i++) { ti = &t->touches[i]; if (ti->active && ti->client_id == client_id) return ti; } return NULL; } /** * Given a unique ID for a touchpoint, create a touchpoint record in the * server. * * Returns NULL on failure (i.e. if another touch with that ID is already active, * allocation failure). */ TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid, uint32_t touchid, Bool emulate_pointer) { int i; TouchClassPtr t = dev->touch; TouchPointInfoPtr ti; void *tmp; if (!t) return NULL; /* Look for another active touchpoint with the same client ID. It's * technically legitimate for a touchpoint to still exist with the same * ID but only once the 32 bits wrap over and you've used up 4 billion * touch ids without lifting that one finger off once. In which case * you deserve a medal or something, but not error handling code. */ if (TouchFindByClientID(dev, touchid)) return NULL; try_find_touch: for (i = 0; i < t->num_touches; i++) { ti = &t->touches[i]; if (!ti->active) { ti->active = TRUE; ti->client_id = touchid; ti->sourceid = sourceid; ti->emulate_pointer = emulate_pointer; return ti; } } /* If we get here, then we've run out of touches: enlarge dev->touch and * try again. */ tmp = reallocarray(t->touches, t->num_touches + 1, sizeof(*ti)); if (tmp) { t->touches = tmp; t->num_touches++; if (TouchInitTouchPoint(t, dev->valuator, t->num_touches - 1)) goto try_find_touch; } return NULL; } /** * Releases a touchpoint for use: this must only be called after all events * related to that touchpoint have been sent and finalised. Called from * ProcessTouchEvent and friends. Not by you. */ void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti) { int i; if (ti->emulate_pointer) { GrabPtr grab; if ((grab = dev->deviceGrab.grab)) { if (dev->deviceGrab.fromPassiveGrab && !dev->button->buttonsDown && !dev->touch->buttonsDown && GrabIsPointerGrab(grab)) (*dev->deviceGrab.DeactivateGrab) (dev); } } for (i = 0; i < ti->num_listeners; i++) TouchRemoveListener(ti, ti->listeners[0].listener); ti->active = FALSE; ti->pending_finish = FALSE; ti->sprite.spriteTraceGood = 0; free(ti->listeners); ti->listeners = NULL; ti->num_listeners = 0; ti->num_grabs = 0; ti->client_id = 0; TouchEventHistoryFree(ti); valuator_mask_zero(ti->valuators); } /** * Allocate the event history for this touch pointer. Calling this on a * touchpoint that already has an event history does nothing but counts as * as success. * * @return TRUE on success, FALSE on allocation errors */ Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti) { if (ti->history) return TRUE; ti->history = calloc(TOUCH_HISTORY_SIZE, sizeof(*ti->history)); ti->history_elements = 0; if (ti->history) ti->history_size = TOUCH_HISTORY_SIZE; return ti->history != NULL; } void TouchEventHistoryFree(TouchPointInfoPtr ti) { free(ti->history); ti->history = NULL; ti->history_size = 0; ti->history_elements = 0; } /** * Store the given event on the event history (if one exists) * A touch event history consists of one TouchBegin and several TouchUpdate * events (if applicable) but no TouchEnd event. * If more than one TouchBegin is pushed onto the stack, the push is * ignored, calling this function multiple times for the TouchBegin is * valid. */ void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev) { if (!ti->history) return; switch (ev->type) { case ET_TouchBegin: /* don't store the same touchbegin twice */ if (ti->history_elements > 0) return; break; case ET_TouchUpdate: break; case ET_TouchEnd: return; /* no TouchEnd events in the history */ default: return; } /* We only store real events in the history */ if (ev->flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING)) return; ti->history[ti->history_elements++] = *ev; /* FIXME: proper overflow fixes */ if (ti->history_elements > ti->history_size - 1) { ti->history_elements = ti->history_size - 1; DebugF("source device %d: history size %zu overflowing for touch %u\n", ti->sourceid, ti->history_size, ti->client_id); } } void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource) { int i; if (!ti->history) return; DeliverDeviceClassesChangedEvent(ti->sourceid, ti->history[0].time); for (i = 0; i < ti->history_elements; i++) { DeviceEvent *ev = &ti->history[i]; ev->flags |= TOUCH_REPLAYING; ev->resource = resource; /* FIXME: We're replaying ti->history which contains the TouchBegin + all TouchUpdates for ti. This needs to be passed on to the next listener. If that is a touch listener, everything is dandy. If the TouchBegin however triggers a sync passive grab, the TouchUpdate events must be sent to EnqueueEvent so the events end up in syncEvents.pending to be forwarded correctly in a subsequent ComputeFreeze(). However, if we just send them to EnqueueEvent the sync'ing device prevents handling of touch events for ownership listeners who want the events right here, right now. */ dev->public.processInputProc((InternalEvent*)ev, dev); } } Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite) { int i; TouchClassPtr t = dev->touch; SpritePtr srcsprite; /* All touches should have the same sprite trace, so find and reuse an * existing touch's sprite if possible, else use the device's sprite. */ for (i = 0; i < t->num_touches; i++) if (!t->touches[i].pending_finish && t->touches[i].sprite.spriteTraceGood > 0) break; if (i < t->num_touches) srcsprite = &t->touches[i].sprite; else if (dev->spriteInfo->sprite) srcsprite = dev->spriteInfo->sprite; else return FALSE; return CopySprite(srcsprite, sprite); } /** * Ensure a window trace is present in ti->sprite, constructing one for * TouchBegin events. */ Bool TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, InternalEvent *ev) { TouchClassPtr t = sourcedev->touch; SpritePtr sprite = &ti->sprite; if (t->mode == XIDirectTouch) { /* Focus immediately under the touchpoint in direct touch mode. * XXX: Do we need to handle crossing screens here? */ sprite->spriteTrace[0] = sourcedev->spriteInfo->sprite->hotPhys.pScreen->root; XYToWindow(sprite, ev->device_event.root_x, ev->device_event.root_y); } else if (!TouchBuildDependentSpriteTrace(sourcedev, sprite)) return FALSE; if (sprite->spriteTraceGood <= 0) return FALSE; /* Mark which grabs/event selections we're delivering to: max one grab per * window plus the bottom-most event selection, plus any active grab. */ ti->listeners = calloc(sprite->spriteTraceGood + 2, sizeof(*ti->listeners)); if (!ti->listeners) { sprite->spriteTraceGood = 0; return FALSE; } ti->num_listeners = 0; return TRUE; } /** * Copy the touch event into the pointer_event, switching the required * fields to make it a correct pointer event. * * @param event The original touch event * @param[in] motion_event The respective motion event * @param[in] button_event The respective button event (if any) * * @returns The number of converted events. * @retval 0 An error occurred * @retval 1 only the motion event is valid * @retval 2 motion and button event are valid */ int TouchConvertToPointerEvent(const InternalEvent *event, InternalEvent *motion_event, InternalEvent *button_event) { int ptrtype; int nevents = 0; BUG_RETURN_VAL(!event, 0); BUG_RETURN_VAL(!motion_event, 0); switch (event->any.type) { case ET_TouchUpdate: nevents = 1; break; case ET_TouchBegin: nevents = 2; /* motion + press */ ptrtype = ET_ButtonPress; break; case ET_TouchEnd: nevents = 2; /* motion + release */ ptrtype = ET_ButtonRelease; break; default: BUG_WARN_MSG(1, "Invalid event type %d\n", event->any.type); return 0; } BUG_WARN_MSG(!(event->device_event.flags & TOUCH_POINTER_EMULATED), "Non-emulating touch event\n"); motion_event->device_event = event->device_event; motion_event->any.type = ET_Motion; motion_event->device_event.detail.button = 0; motion_event->device_event.flags = XIPointerEmulated; if (nevents > 1) { BUG_RETURN_VAL(!button_event, 0); button_event->device_event = event->device_event; button_event->any.type = ptrtype; button_event->device_event.flags = XIPointerEmulated; /* detail is already correct */ } return nevents; } /** * Return the corresponding pointer emulation internal event type for the given * touch event or 0 if no such event type exists. */ int TouchGetPointerEventType(const InternalEvent *event) { int type = 0; switch (event->any.type) { case ET_TouchBegin: type = ET_ButtonPress; break; case ET_TouchUpdate: type = ET_Motion; break; case ET_TouchEnd: type = ET_ButtonRelease; break; default: break; } return type; } /** * @returns TRUE if the specified grab or selection is the current owner of * the touch sequence. */ Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource) { return (ti->listeners[0].listener == resource); } /** * Add the resource to this touch's listeners. */ void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type, enum InputLevel level, enum TouchListenerType type, enum TouchListenerState state, WindowPtr window, const GrabPtr grab) { GrabPtr g = NULL; /* We need a copy of the grab, not the grab itself since that may be * deleted by a UngrabButton request and leaves us with a dangling * pointer */ if (grab) g = AllocGrab(grab); ti->listeners[ti->num_listeners].listener = resource; ti->listeners[ti->num_listeners].resource_type = resource_type; ti->listeners[ti->num_listeners].level = level; ti->listeners[ti->num_listeners].state = state; ti->listeners[ti->num_listeners].type = type; ti->listeners[ti->num_listeners].window = window; ti->listeners[ti->num_listeners].grab = g; if (grab) ti->num_grabs++; ti->num_listeners++; } /** * Remove the resource from this touch's listeners. * * @return TRUE if the resource was removed, FALSE if the resource was not * in the list */ Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource) { int i; for (i = 0; i < ti->num_listeners; i++) { int j; TouchListener *listener = &ti->listeners[i]; if (listener->listener != resource) continue; if (listener->grab) { FreeGrab(listener->grab); listener->grab = NULL; ti->num_grabs--; } for (j = i; j < ti->num_listeners - 1; j++) ti->listeners[j] = ti->listeners[j + 1]; ti->num_listeners--; ti->listeners[ti->num_listeners].listener = 0; ti->listeners[ti->num_listeners].state = TOUCH_LISTENER_AWAITING_BEGIN; return TRUE; } return FALSE; } static void TouchAddGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, GrabPtr grab) { enum TouchListenerType type = TOUCH_LISTENER_GRAB; /* FIXME: owner_events */ if (grab->grabtype == XI2) { if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchOwnership)) TouchEventHistoryAllocate(ti); if (!xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin)) type = TOUCH_LISTENER_POINTER_GRAB; } else if (grab->grabtype == XI || grab->grabtype == CORE) { TouchEventHistoryAllocate(ti); type = TOUCH_LISTENER_POINTER_GRAB; } /* grab listeners are always RT_NONE since we keep the grab pointer */ TouchAddListener(ti, grab->resource, RT_NONE, grab->grabtype, type, TOUCH_LISTENER_AWAITING_BEGIN, grab->window, grab); } /** * Add one listener if there is a grab on the given window. */ static void TouchAddPassiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, WindowPtr win, InternalEvent *ev) { GrabPtr grab; Bool check_core = IsMaster(dev) && ti->emulate_pointer; /* FIXME: make CheckPassiveGrabsOnWindow only trigger on TouchBegin */ grab = CheckPassiveGrabsOnWindow(win, dev, ev, check_core, FALSE); if (!grab) return; TouchAddGrabListener(dev, ti, ev, grab); } static Bool TouchAddRegularListener(DeviceIntPtr dev, TouchPointInfoPtr ti, WindowPtr win, InternalEvent *ev) { InputClients *iclients = NULL; OtherInputMasks *inputMasks = NULL; uint16_t evtype = 0; /* may be event type or emulated event type */ enum TouchListenerType type = TOUCH_LISTENER_REGULAR; int mask; evtype = GetXI2Type(ev->any.type); mask = EventIsDeliverable(dev, ev->any.type, win); if (!mask && !ti->emulate_pointer) return FALSE; else if (!mask) { /* now try for pointer event */ mask = EventIsDeliverable(dev, TouchGetPointerEventType(ev), win); if (mask) { evtype = GetXI2Type(TouchGetPointerEventType(ev)); type = TOUCH_LISTENER_POINTER_REGULAR; } } if (!mask) return FALSE; inputMasks = wOtherInputMasks(win); if (mask & EVENT_XI2_MASK) { nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { if (!xi2mask_isset(iclients->xi2mask, dev, evtype)) continue; if (!xi2mask_isset(iclients->xi2mask, dev, XI_TouchOwnership)) TouchEventHistoryAllocate(ti); TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI2, type, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL); return TRUE; } } if (mask & EVENT_XI1_MASK) { int xitype = GetXIType(TouchGetPointerEventType(ev)); Mask xi_filter = event_get_filter_from_type(dev, xitype); nt_list_for_each_entry(iclients, inputMasks->inputClients, next) { if (!(iclients->mask[dev->id] & xi_filter)) continue; TouchEventHistoryAllocate(ti); TouchAddListener(ti, iclients->resource, RT_INPUTCLIENT, XI, TOUCH_LISTENER_POINTER_REGULAR, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL); return TRUE; } } if (mask & EVENT_CORE_MASK) { int coretype = GetCoreType(TouchGetPointerEventType(ev)); Mask core_filter = event_get_filter_from_type(dev, coretype); OtherClients *oclients; /* window owner */ if (IsMaster(dev) && (win->eventMask & core_filter)) { TouchEventHistoryAllocate(ti); TouchAddListener(ti, win->drawable.id, RT_WINDOW, CORE, TOUCH_LISTENER_POINTER_REGULAR, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL); return TRUE; } /* all others */ nt_list_for_each_entry(oclients, wOtherClients(win), next) { if (!(oclients->mask & core_filter)) continue; TouchEventHistoryAllocate(ti); TouchAddListener(ti, oclients->resource, RT_OTHERCLIENT, CORE, type, TOUCH_LISTENER_AWAITING_BEGIN, win, NULL); return TRUE; } } return FALSE; } static void TouchAddActiveGrabListener(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, GrabPtr grab) { if (!ti->emulate_pointer && (grab->grabtype == CORE || grab->grabtype == XI)) return; if (!ti->emulate_pointer && grab->grabtype == XI2 && !xi2mask_isset(grab->xi2mask, dev, XI_TouchBegin)) return; TouchAddGrabListener(dev, ti, ev, grab); } void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev) { int i; SpritePtr sprite = &ti->sprite; WindowPtr win; if (dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab) TouchAddActiveGrabListener(dev, ti, ev, dev->deviceGrab.grab); /* We set up an active touch listener for existing touches, but not any * passive grab or regular listeners. */ if (ev->any.type != ET_TouchBegin) return; /* First, find all grabbing clients from the root window down * to the deepest child window. */ for (i = 0; i < sprite->spriteTraceGood; i++) { win = sprite->spriteTrace[i]; TouchAddPassiveGrabListener(dev, ti, win, ev); } /* Find the first client with an applicable event selection, * going from deepest child window back up to the root window. */ for (i = sprite->spriteTraceGood - 1; i >= 0; i--) { Bool delivered; win = sprite->spriteTrace[i]; delivered = TouchAddRegularListener(dev, ti, win, ev); if (delivered) return; } } /** * Remove the touch pointer grab from the device. Called from * DeactivatePointerGrab() */ void TouchRemovePointerGrab(DeviceIntPtr dev) { TouchPointInfoPtr ti; GrabPtr grab; InternalEvent *ev; if (!dev->touch) return; grab = dev->deviceGrab.grab; if (!grab) return; ev = dev->deviceGrab.sync.event; if (!IsTouchEvent(ev)) return; ti = TouchFindByClientID(dev, ev->device_event.touchid); if (!ti) return; /* FIXME: missing a bit of code here... */ } /* As touch grabs don't turn into active grabs with their own resources, we * need to walk all the touches and remove this grab from any delivery * lists. */ void TouchListenerGone(XID resource) { TouchPointInfoPtr ti; DeviceIntPtr dev; InternalEvent *events = InitEventList(GetMaximumEventsNum()); int i, j, k, nev; if (!events) FatalError("TouchListenerGone: couldn't allocate events\n"); for (dev = inputInfo.devices; dev; dev = dev->next) { if (!dev->touch) continue; for (i = 0; i < dev->touch->num_touches; i++) { ti = &dev->touch->touches[i]; if (!ti->active) continue; for (j = 0; j < ti->num_listeners; j++) { if (CLIENT_BITS(ti->listeners[j].listener) != resource) continue; nev = GetTouchOwnershipEvents(events, dev, ti, XIRejectTouch, ti->listeners[j].listener, 0); for (k = 0; k < nev; k++) mieqProcessDeviceEvent(dev, events + k, NULL); break; } } } FreeEventList(events, GetMaximumEventsNum()); } int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener, int mode) { InternalEvent *events; int nev; int i; BUG_RETURN_VAL(listener < 0, BadMatch); BUG_RETURN_VAL(listener >= ti->num_listeners, BadMatch); if (listener > 0) { if (mode == XIRejectTouch) TouchRejected(dev, ti, ti->listeners[listener].listener, NULL); else ti->listeners[listener].state = TOUCH_LISTENER_EARLY_ACCEPT; return Success; } events = InitEventList(GetMaximumEventsNum()); BUG_RETURN_VAL_MSG(!events, BadAlloc, "Failed to allocate touch ownership events\n"); nev = GetTouchOwnershipEvents(events, dev, ti, mode, ti->listeners[0].listener, 0); BUG_WARN_MSG(nev == 0, "Failed to get touch ownership events\n"); for (i = 0; i < nev; i++) mieqProcessDeviceEvent(dev, events + i, NULL); FreeEventList(events, GetMaximumEventsNum()); return nev ? Success : BadMatch; } int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, uint32_t touchid, Window grab_window, XID *error) { TouchPointInfoPtr ti; int i; if (!dev->touch) { *error = dev->id; return BadDevice; } ti = TouchFindByClientID(dev, touchid); if (!ti) { *error = touchid; return BadValue; } for (i = 0; i < ti->num_listeners; i++) { if (CLIENT_ID(ti->listeners[i].listener) == client->index && ti->listeners[i].window->drawable.id == grab_window) break; } if (i == ti->num_listeners) return BadAccess; return TouchListenerAcceptReject(dev, ti, i, mode); } /** * End physically active touches for a device. */ void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev) { InternalEvent *eventlist = InitEventList(GetMaximumEventsNum()); int i; input_lock(); mieqProcessInputEvents(); for (i = 0; i < dev->last.num_touches; i++) { DDXTouchPointInfoPtr ddxti = dev->last.touches + i; if (ddxti->active) { int j; int nevents = GetTouchEvents(eventlist, dev, ddxti->ddx_id, XI_TouchEnd, 0, NULL); for (j = 0; j < nevents; j++) mieqProcessDeviceEvent(dev, eventlist + j, NULL); } } input_unlock(); FreeEventList(eventlist, GetMaximumEventsNum()); } /** * Generate and deliver a TouchEnd event. * * @param dev The device to deliver the event for. * @param ti The touch point record to deliver the event for. * @param flags Internal event flags. The called does not need to provide * TOUCH_CLIENT_ID and TOUCH_POINTER_EMULATED, this function will ensure * they are set appropriately. * @param resource The client resource to deliver to, or 0 for all clients. */ void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource) { InternalEvent event; /* We're not processing a touch end for a frozen device */ if (dev->deviceGrab.sync.frozen) return; flags |= TOUCH_CLIENT_ID; if (ti->emulate_pointer) flags |= TOUCH_POINTER_EMULATED; DeliverDeviceClassesChangedEvent(ti->sourceid, GetTimeInMillis()); GetDixTouchEnd(&event, dev, ti, flags); DeliverTouchEvents(dev, ti, &event, resource); if (ti->num_grabs == 0) UpdateDeviceState(dev, &event.device_event); } void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid) { TouchPointInfoPtr ti = TouchFindByClientID(dev, touchid); if (!ti) return; TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); if (ti->pending_finish) TouchEmitTouchEnd(dev, ti, 0, 0); if (ti->num_listeners <= 1) TouchEndTouch(dev, ti); } xorg-server-21.1.16/dix/window.c0000644000175000017500000034501514757411105012102 /* Copyright (c) 2006, Red Hat, Inc. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. 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. */ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "propertyst.h" #include "input.h" #include "inputstr.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "mivalidate.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include "dixevents.h" #include "globals.h" #include "mi.h" /* miPaintWindow */ #ifdef COMPOSITE #include "compint.h" #endif #include "selection.h" #include "inpututils.h" #include "privates.h" #include "xace.h" #include "exevents.h" #include /* must come after server includes */ /****** * Window stuff for server * * CreateRootWindow, CreateWindow, ChangeWindowAttributes, * GetWindowAttributes, DeleteWindow, DestroySubWindows, * HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows, * UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow, * ChangeWindowDeviceCursor ******/ Bool bgNoneRoot = FALSE; static unsigned char _back_lsb[4] = { 0x88, 0x22, 0x44, 0x11 }; static unsigned char _back_msb[4] = { 0x11, 0x44, 0x22, 0x88 }; static Bool WindowParentHasDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCurs); static Bool WindowSeekDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, DevCursNodePtr * pNode, DevCursNodePtr * pPrev); int screenIsSaved = SCREEN_SAVER_OFF; static Bool TileScreenSaver(ScreenPtr pScreen, int kind); #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ CWDontPropagate | CWOverrideRedirect | CWCursor ) #define BOXES_OVERLAP(b1, b2) \ (!( ((b1)->x2 <= (b2)->x1) || \ ( ((b1)->x1 >= (b2)->x2)) || \ ( ((b1)->y2 <= (b2)->y1)) || \ ( ((b1)->y1 >= (b2)->y2)) ) ) #define RedirectSend(pWin) \ ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureRedirectMask) #define SubSend(pWin) \ ((pWin->eventMask|wOtherEventMasks(pWin)) & SubstructureNotifyMask) #define StrSend(pWin) \ ((pWin->eventMask|wOtherEventMasks(pWin)) & StructureNotifyMask) #define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) #ifdef COMPOSITE static const char *overlay_win_name = ""; #endif static const char * get_window_name(WindowPtr pWin) { #define WINDOW_NAME_BUF_LEN 512 PropertyPtr prop; static char buf[WINDOW_NAME_BUF_LEN]; int len; #ifdef COMPOSITE CompScreenPtr comp_screen = GetCompScreen(pWin->drawable.pScreen); if (comp_screen && pWin == comp_screen->pOverlayWin) return overlay_win_name; #endif for (prop = wUserProps(pWin); prop; prop = prop->next) { if (prop->propertyName == XA_WM_NAME && prop->type == XA_STRING && prop->data) { len = min(prop->size, WINDOW_NAME_BUF_LEN - 1); memcpy(buf, prop->data, len); buf[len] = '\0'; return buf; } } return NULL; #undef WINDOW_NAME_BUF_LEN } static void log_window_info(WindowPtr pWin, int depth) { int i; const char *win_name, *visibility; BoxPtr rects; for (i = 0; i < (depth << 2); i++) ErrorF(" "); win_name = get_window_name(pWin); ErrorF("win 0x%.8x (%s), [%d, %d] to [%d, %d]", (unsigned) pWin->drawable.id, win_name ? win_name : "no name", pWin->drawable.x, pWin->drawable.y, pWin->drawable.x + pWin->drawable.width, pWin->drawable.y + pWin->drawable.height); if (pWin->overrideRedirect) ErrorF(" (override redirect)"); #ifdef COMPOSITE if (pWin->redirectDraw) ErrorF(" (%s compositing: pixmap %x)", (pWin->redirectDraw == RedirectDrawAutomatic) ? "automatic" : "manual", (unsigned) pWin->drawable.pScreen->GetWindowPixmap(pWin)->drawable.id); #endif switch (pWin->visibility) { case VisibilityUnobscured: visibility = "unobscured"; break; case VisibilityPartiallyObscured: visibility = "partially obscured"; break; case VisibilityFullyObscured: visibility = "fully obscured"; break; case VisibilityNotViewable: visibility = "unviewable"; break; } ErrorF(", %s", visibility); if (RegionNotEmpty(&pWin->clipList)) { ErrorF(", clip list:"); rects = RegionRects(&pWin->clipList); for (i = 0; i < RegionNumRects(&pWin->clipList); i++) ErrorF(" [(%d, %d) to (%d, %d)]", rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2); ErrorF("; extents [(%d, %d) to (%d, %d)]", pWin->clipList.extents.x1, pWin->clipList.extents.y1, pWin->clipList.extents.x2, pWin->clipList.extents.y2); } ErrorF("\n"); } static const char* grab_grabtype_to_text(GrabPtr pGrab) { switch (pGrab->grabtype) { case XI2: return "xi2"; case CORE: return "core"; default: return "xi1"; } } static const char* grab_type_to_text(GrabPtr pGrab) { switch (pGrab->type) { case ButtonPress: return "ButtonPress"; case KeyPress: return "KeyPress"; case XI_Enter: return "XI_Enter"; case XI_FocusIn: return "XI_FocusIn"; default: return "unknown?!"; } } static void log_grab_info(void *value, XID id, void *cdata) { int i, j; GrabPtr pGrab = (GrabPtr)value; ErrorF(" grab 0x%lx (%s), type '%s' on window 0x%lx\n", (unsigned long) pGrab->resource, grab_grabtype_to_text(pGrab), grab_type_to_text(pGrab), (unsigned long) pGrab->window->drawable.id); ErrorF(" detail %d (mask %lu), modifiersDetail %d (mask %lu)\n", pGrab->detail.exact, pGrab->detail.pMask ? (unsigned long) *(pGrab->detail.pMask) : 0, pGrab->modifiersDetail.exact, pGrab->modifiersDetail.pMask ? (unsigned long) *(pGrab->modifiersDetail.pMask) : (unsigned long) 0); ErrorF(" device '%s' (%d), modifierDevice '%s' (%d)\n", pGrab->device->name, pGrab->device->id, pGrab->modifierDevice->name, pGrab->modifierDevice->id); if (pGrab->grabtype == CORE) { ErrorF(" core event mask 0x%lx\n", (unsigned long) pGrab->eventMask); } else if (pGrab->grabtype == XI) { ErrorF(" xi1 event mask 0x%lx\n", (unsigned long) pGrab->eventMask); } else if (pGrab->grabtype == XI2) { for (i = 0; i < xi2mask_num_masks(pGrab->xi2mask); i++) { const unsigned char *mask; int print; print = 0; for (j = 0; j < XI2MASKSIZE; j++) { mask = xi2mask_get_one_mask(pGrab->xi2mask, i); if (mask[j]) { print = 1; break; } } if (!print) continue; ErrorF(" xi2 event mask 0x"); for (j = 0; j < xi2mask_mask_size(pGrab->xi2mask); j++) ErrorF("%x ", mask[j]); ErrorF("\n"); } } ErrorF(" owner-events %s, kb %d ptr %d, confine 0x%lx, cursor 0x%lx\n", pGrab->ownerEvents ? "true" : "false", pGrab->keyboardMode, pGrab->pointerMode, pGrab->confineTo ? (unsigned long) pGrab->confineTo->drawable.id : 0, pGrab->cursor ? (unsigned long) pGrab->cursor->id : 0); } void PrintPassiveGrabs(void) { int i; LocalClientCredRec *lcc; pid_t clientpid; const char *cmdname; const char *cmdargs; ErrorF("Printing all currently registered grabs\n"); for (i = 1; i < currentMaxClients; i++) { if (!clients[i] || clients[i]->clientState != ClientStateRunning) continue; clientpid = GetClientPid(clients[i]); cmdname = GetClientCmdName(clients[i]); cmdargs = GetClientCmdArgs(clients[i]); if ((clientpid > 0) && (cmdname != NULL)) { ErrorF(" Printing all registered grabs of client pid %ld %s %s\n", (long) clientpid, cmdname, cmdargs ? cmdargs : ""); } else { if (GetLocalClientCreds(clients[i], &lcc) == -1) { ErrorF(" GetLocalClientCreds() failed\n"); continue; } ErrorF(" Printing all registered grabs of client pid %ld uid %ld gid %ld\n", (lcc->fieldsSet & LCC_PID_SET) ? (long) lcc->pid : 0, (lcc->fieldsSet & LCC_UID_SET) ? (long) lcc->euid : 0, (lcc->fieldsSet & LCC_GID_SET) ? (long) lcc->egid : 0); FreeLocalClientCreds(lcc); } FindClientResourcesByType(clients[i], RT_PASSIVEGRAB, log_grab_info, NULL); } ErrorF("End list of registered passive grabs\n"); } void PrintWindowTree(void) { int scrnum, depth; ScreenPtr pScreen; WindowPtr pWin; for (scrnum = 0; scrnum < screenInfo.numScreens; scrnum++) { pScreen = screenInfo.screens[scrnum]; ErrorF("[dix] Dumping windows for screen %d (pixmap %x):\n", scrnum, (unsigned) pScreen->GetScreenPixmap(pScreen)->drawable.id); pWin = pScreen->root; depth = 1; while (pWin) { log_window_info(pWin, depth); if (pWin->firstChild) { pWin = pWin->firstChild; depth++; continue; } while (pWin && !pWin->nextSib) { pWin = pWin->parent; depth--; } if (!pWin) break; pWin = pWin->nextSib; } } } int TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, void *data) { int result; WindowPtr pChild; if (!(pChild = pWin)) return WT_NOMATCH; while (1) { result = (*func) (pChild, data); if (result == WT_STOPWALKING) return WT_STOPWALKING; if ((result == WT_WALKCHILDREN) && pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } return WT_NOMATCH; } /***** * WalkTree * Walk the window tree, for SCREEN, performing FUNC(pWin, data) on * each window. If FUNC returns WT_WALKCHILDREN, traverse the children, * if it returns WT_DONTWALKCHILDREN, don't. If it returns WT_STOPWALKING, * exit WalkTree. Does depth-first traverse. *****/ int WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void *data) { return (TraverseTree(pScreen->root, func, data)); } /* hack to force no backing store */ Bool disableBackingStore = FALSE; Bool enableBackingStore = FALSE; static void SetWindowToDefaults(WindowPtr pWin) { pWin->prevSib = NullWindow; pWin->firstChild = NullWindow; pWin->lastChild = NullWindow; pWin->valdata = NULL; pWin->optional = NULL; pWin->cursorIsNone = TRUE; pWin->backingStore = NotUseful; pWin->mapped = FALSE; /* off */ pWin->realized = FALSE; /* off */ pWin->viewable = FALSE; pWin->visibility = VisibilityNotViewable; pWin->overrideRedirect = FALSE; pWin->saveUnder = FALSE; pWin->bitGravity = ForgetGravity; pWin->winGravity = NorthWestGravity; pWin->eventMask = 0; pWin->deliverableEvents = 0; pWin->dontPropagate = 0; pWin->redirectDraw = RedirectDrawNone; pWin->forcedBG = FALSE; pWin->unhittable = FALSE; #ifdef COMPOSITE pWin->damagedDescendants = FALSE; #endif } static void MakeRootTile(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; GCPtr pGC; unsigned char back[128]; int len = BitmapBytePad(sizeof(long)); unsigned char *from, *to; int i, j; pWin->background.pixmap = (*pScreen->CreatePixmap) (pScreen, 4, 4, pScreen->rootDepth, 0); pWin->backgroundState = BackgroundPixmap; pGC = GetScratchGC(pScreen->rootDepth, pScreen); if (!pWin->background.pixmap || !pGC) FatalError("could not create root tile"); { ChangeGCVal attributes[2]; attributes[0].val = pScreen->whitePixel; attributes[1].val = pScreen->blackPixel; (void) ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes); } ValidateGC((DrawablePtr) pWin->background.pixmap, pGC); from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb; to = back; for (i = 4; i > 0; i--, from++) for (j = len; j > 0; j--) *to++ = *from; (*pGC->ops->PutImage) ((DrawablePtr) pWin->background.pixmap, pGC, 1, 0, 0, len, 4, 0, XYBitmap, (char *) back); FreeScratchGC(pGC); } /***** * CreateRootWindow * Makes a window at initialization time for specified screen *****/ Bool CreateRootWindow(ScreenPtr pScreen) { WindowPtr pWin; BoxRec box; PixmapFormatRec *format; pWin = dixAllocateScreenObjectWithPrivates(pScreen, WindowRec, PRIVATE_WINDOW); if (!pWin) return FALSE; pScreen->screensaver.pWindow = NULL; pScreen->screensaver.wid = FakeClientID(0); pScreen->screensaver.ExternalScreenSaver = NULL; screenIsSaved = SCREEN_SAVER_OFF; pScreen->root = pWin; pWin->drawable.pScreen = pScreen; pWin->drawable.type = DRAWABLE_WINDOW; pWin->drawable.depth = pScreen->rootDepth; for (format = screenInfo.formats; format->depth != pScreen->rootDepth; format++); pWin->drawable.bitsPerPixel = format->bitsPerPixel; pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; pWin->parent = NullWindow; SetWindowToDefaults(pWin); pWin->optional = malloc(sizeof(WindowOptRec)); if (!pWin->optional) return FALSE; pWin->optional->dontPropagateMask = 0; pWin->optional->otherEventMasks = 0; pWin->optional->otherClients = NULL; pWin->optional->passiveGrabs = NULL; pWin->optional->userProps = NULL; pWin->optional->backingBitPlanes = ~0L; pWin->optional->backingPixel = 0; pWin->optional->boundingShape = NULL; pWin->optional->clipShape = NULL; pWin->optional->inputShape = NULL; pWin->optional->inputMasks = NULL; pWin->optional->deviceCursors = NULL; pWin->optional->colormap = pScreen->defColormap; pWin->optional->visual = pScreen->rootVisual; pWin->nextSib = NullWindow; pWin->drawable.id = FakeClientID(0); pWin->origin.x = pWin->origin.y = 0; pWin->drawable.height = pScreen->height; pWin->drawable.width = pScreen->width; pWin->drawable.x = pWin->drawable.y = 0; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; RegionInit(&pWin->clipList, &box, 1); RegionInit(&pWin->winSize, &box, 1); RegionInit(&pWin->borderSize, &box, 1); RegionInit(&pWin->borderClip, &box, 1); pWin->drawable.class = InputOutput; pWin->optional->visual = pScreen->rootVisual; pWin->backgroundState = BackgroundPixel; pWin->background.pixel = pScreen->whitePixel; pWin->borderIsPixel = TRUE; pWin->border.pixel = pScreen->blackPixel; pWin->borderWidth = 0; /* security creation/labeling check */ if (XaceHook(XACE_RESOURCE_ACCESS, serverClient, pWin->drawable.id, RT_WINDOW, pWin, RT_NONE, NULL, DixCreateAccess)) return FALSE; if (!AddResource(pWin->drawable.id, RT_WINDOW, (void *) pWin)) return FALSE; if (disableBackingStore) pScreen->backingStoreSupport = NotUseful; if (enableBackingStore) pScreen->backingStoreSupport = WhenMapped; #ifdef COMPOSITE if (noCompositeExtension) pScreen->backingStoreSupport = NotUseful; #endif pScreen->saveUnderSupport = NotUseful; return TRUE; } void InitRootWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; int backFlag = CWBorderPixel | CWCursor | CWBackingStore; if (!(*pScreen->CreateWindow) (pWin)) return; /* XXX */ (*pScreen->PositionWindow) (pWin, 0, 0); pWin->cursorIsNone = FALSE; pWin->optional->cursor = RefCursor(rootCursor); if (party_like_its_1989) { MakeRootTile(pWin); backFlag |= CWBackPixmap; } else if (pScreen->canDoBGNoneRoot && bgNoneRoot) { pWin->backgroundState = XaceBackgroundNoneState(pWin); pWin->background.pixel = pScreen->whitePixel; backFlag |= CWBackPixmap; } else { pWin->backgroundState = BackgroundPixel; if (whiteRoot) pWin->background.pixel = pScreen->whitePixel; else pWin->background.pixel = pScreen->blackPixel; backFlag |= CWBackPixel; } pWin->backingStore = NotUseful; /* We SHOULD check for an error value here XXX */ (*pScreen->ChangeWindowAttributes) (pWin, backFlag); MapWindow(pWin, serverClient); } /* Set the region to the intersection of the rectangle and the * window's winSize. The window is typically the parent of the * window from which the region came. */ static void ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, int x, int y, int w, int h) { BoxRec box = *RegionExtents(&pWin->winSize); /* we do these calculations to avoid overflows */ if (x > box.x1) box.x1 = x; if (y > box.y1) box.y1 = y; x += w; if (x < box.x2) box.x2 = x; y += h; if (y < box.y2) box.y2 = y; if (box.x1 > box.x2) box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; RegionReset(Rgn, &box); RegionIntersect(Rgn, Rgn, &pWin->winSize); } static RealChildHeadProc realChildHeadProc = NULL; void RegisterRealChildHeadProc(RealChildHeadProc proc) { realChildHeadProc = proc; } WindowPtr RealChildHead(WindowPtr pWin) { if (realChildHeadProc) { return realChildHeadProc(pWin); } if (!pWin->parent && (screenIsSaved == SCREEN_SAVER_ON) && (HasSaverWindow(pWin->drawable.pScreen))) return pWin->firstChild; else return NullWindow; } /***** * CreateWindow * Makes a window in response to client request *****/ WindowPtr CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist, int depth, ClientPtr client, VisualID visual, int *error) { WindowPtr pWin; WindowPtr pHead; ScreenPtr pScreen; int idepth, ivisual; Bool fOK; DepthPtr pDepth; PixmapFormatRec *format; WindowOptPtr ancwopt; if (class == CopyFromParent) class = pParent->drawable.class; if ((class != InputOutput) && (class != InputOnly)) { *error = BadValue; client->errorValue = class; return NullWindow; } if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) { *error = BadMatch; return NullWindow; } if ((class == InputOnly) && ((bw != 0) || (depth != 0))) { *error = BadMatch; return NullWindow; } pScreen = pParent->drawable.pScreen; if ((class == InputOutput) && (depth == 0)) depth = pParent->drawable.depth; ancwopt = pParent->optional; if (!ancwopt) ancwopt = FindWindowWithOptional(pParent)->optional; if (visual == CopyFromParent) { visual = ancwopt->visual; } /* Find out if the depth and visual are acceptable for this Screen */ if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) { fOK = FALSE; for (idepth = 0; idepth < pScreen->numDepths; idepth++) { pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; if ((depth == pDepth->depth) || (depth == 0)) { for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) { if (visual == pDepth->vids[ivisual]) { fOK = TRUE; break; } } } } if (fOK == FALSE) { *error = BadMatch; return NullWindow; } } if (((vmask & (CWBorderPixmap | CWBorderPixel)) == 0) && (class != InputOnly) && (depth != pParent->drawable.depth)) { *error = BadMatch; return NullWindow; } if (((vmask & CWColormap) == 0) && (class != InputOnly) && ((visual != ancwopt->visual) || (ancwopt->colormap == None))) { *error = BadMatch; return NullWindow; } pWin = dixAllocateScreenObjectWithPrivates(pScreen, WindowRec, PRIVATE_WINDOW); if (!pWin) { *error = BadAlloc; return NullWindow; } pWin->drawable = pParent->drawable; pWin->drawable.depth = depth; if (depth == pParent->drawable.depth) pWin->drawable.bitsPerPixel = pParent->drawable.bitsPerPixel; else { for (format = screenInfo.formats; format->depth != depth; format++); pWin->drawable.bitsPerPixel = format->bitsPerPixel; } if (class == InputOnly) pWin->drawable.type = (short) UNDRAWABLE_WINDOW; pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; pWin->drawable.id = wid; pWin->drawable.class = class; pWin->parent = pParent; SetWindowToDefaults(pWin); if (visual != ancwopt->visual) { if (!MakeWindowOptional(pWin)) { dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); *error = BadAlloc; return NullWindow; } pWin->optional->visual = visual; pWin->optional->colormap = None; } pWin->borderWidth = bw; /* security creation/labeling check */ *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, pWin, RT_WINDOW, pWin->parent, DixCreateAccess | DixSetAttrAccess); if (*error != Success) { dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); return NullWindow; } pWin->backgroundState = XaceBackgroundNoneState(pWin); pWin->background.pixel = pScreen->whitePixel; pWin->borderIsPixel = pParent->borderIsPixel; pWin->border = pParent->border; if (pWin->borderIsPixel == FALSE) pWin->border.pixmap->refcnt++; pWin->origin.x = x + (int) bw; pWin->origin.y = y + (int) bw; pWin->drawable.width = w; pWin->drawable.height = h; pWin->drawable.x = pParent->drawable.x + x + (int) bw; pWin->drawable.y = pParent->drawable.y + y + (int) bw; /* set up clip list correctly for unobscured WindowPtr */ RegionNull(&pWin->clipList); RegionNull(&pWin->borderClip); RegionNull(&pWin->winSize); RegionNull(&pWin->borderSize); pHead = RealChildHead(pParent); if (pHead) { pWin->nextSib = pHead->nextSib; if (pHead->nextSib) pHead->nextSib->prevSib = pWin; else pParent->lastChild = pWin; pHead->nextSib = pWin; pWin->prevSib = pHead; } else { pWin->nextSib = pParent->firstChild; if (pParent->firstChild) pParent->firstChild->prevSib = pWin; else pParent->lastChild = pWin; pParent->firstChild = pWin; } SetWinSize(pWin); SetBorderSize(pWin); /* We SHOULD check for an error value here XXX */ if (!(*pScreen->CreateWindow) (pWin)) { *error = BadAlloc; DeleteWindow(pWin, None); return NullWindow; } /* We SHOULD check for an error value here XXX */ (*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y); if (!(vmask & CWEventMask)) RecalculateDeliverableEvents(pWin); if (vmask) *error = ChangeWindowAttributes(pWin, vmask, vlist, wClient(pWin)); else *error = Success; if (*error != Success) { DeleteWindow(pWin, None); return NullWindow; } if (SubSend(pParent)) { xEvent event = { .u.createNotify.window = wid, .u.createNotify.parent = pParent->drawable.id, .u.createNotify.x = x, .u.createNotify.y = y, .u.createNotify.width = w, .u.createNotify.height = h, .u.createNotify.borderWidth = bw, .u.createNotify.override = pWin->overrideRedirect }; event.u.u.type = CreateNotify; DeliverEvents(pParent, &event, 1, NullWindow); } return pWin; } static void DisposeWindowOptional(WindowPtr pWin) { if (!pWin->optional) return; /* * everything is peachy. Delete the optional record * and clean up */ if (pWin->optional->cursor) { FreeCursor(pWin->optional->cursor, (Cursor) 0); pWin->cursorIsNone = FALSE; } else pWin->cursorIsNone = TRUE; if (pWin->optional->deviceCursors) { DevCursorList pList; DevCursorList pPrev; pList = pWin->optional->deviceCursors; while (pList) { if (pList->cursor) FreeCursor(pList->cursor, (XID) 0); pPrev = pList; pList = pList->next; free(pPrev); } pWin->optional->deviceCursors = NULL; } free(pWin->optional); pWin->optional = NULL; } static void FreeWindowResources(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; DeleteWindowFromAnySaveSet(pWin); DeleteWindowFromAnySelections(pWin); DeleteWindowFromAnyEvents(pWin, TRUE); RegionUninit(&pWin->clipList); RegionUninit(&pWin->winSize); RegionUninit(&pWin->borderClip); RegionUninit(&pWin->borderSize); if (wBoundingShape(pWin)) RegionDestroy(wBoundingShape(pWin)); if (wClipShape(pWin)) RegionDestroy(wClipShape(pWin)); if (wInputShape(pWin)) RegionDestroy(wInputShape(pWin)); if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap) (pWin->border.pixmap); if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap) (pWin->background.pixmap); DeleteAllWindowProperties(pWin); /* We SHOULD check for an error value here XXX */ (*pScreen->DestroyWindow) (pWin); DisposeWindowOptional(pWin); } static void CrushTree(WindowPtr pWin) { WindowPtr pChild, pSib, pParent; UnrealizeWindowProcPtr UnrealizeWindow; if (!(pChild = pWin->firstChild)) return; UnrealizeWindow = pWin->drawable.pScreen->UnrealizeWindow; while (1) { if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (1) { pParent = pChild->parent; if (SubStrSend(pChild, pParent)) { xEvent event = { .u.u.type = DestroyNotify }; event.u.destroyNotify.window = pChild->drawable.id; DeliverEvents(pChild, &event, 1, NullWindow); } FreeResource(pChild->drawable.id, RT_WINDOW); pSib = pChild->nextSib; pChild->viewable = FALSE; if (pChild->realized) { pChild->realized = FALSE; (*UnrealizeWindow) (pChild); } FreeWindowResources(pChild); dixFreeObjectWithPrivates(pChild, PRIVATE_WINDOW); if ((pChild = pSib)) break; pChild = pParent; pChild->firstChild = NullWindow; pChild->lastChild = NullWindow; if (pChild == pWin) return; } } } /***** * DeleteWindow * Deletes child of window then window itself * If wid is None, don't send any events *****/ int DeleteWindow(void *value, XID wid) { WindowPtr pParent; WindowPtr pWin = (WindowPtr) value; UnmapWindow(pWin, FALSE); CrushTree(pWin); pParent = pWin->parent; if (wid && pParent && SubStrSend(pWin, pParent)) { xEvent event = { .u.u.type = DestroyNotify }; event.u.destroyNotify.window = pWin->drawable.id; DeliverEvents(pWin, &event, 1, NullWindow); } FreeWindowResources(pWin); if (pParent) { if (pParent->firstChild == pWin) pParent->firstChild = pWin->nextSib; if (pParent->lastChild == pWin) pParent->lastChild = pWin->prevSib; if (pWin->nextSib) pWin->nextSib->prevSib = pWin->prevSib; if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; } else pWin->drawable.pScreen->root = NULL; dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); return Success; } int DestroySubwindows(WindowPtr pWin, ClientPtr client) { /* XXX * The protocol is quite clear that each window should be * destroyed in turn, however, unmapping all of the first * eliminates most of the calls to ValidateTree. So, * this implementation is incorrect in that all of the * UnmapNotifies occur before all of the DestroyNotifies. * If you care, simply delete the call to UnmapSubwindows. */ UnmapSubwindows(pWin); while (pWin->lastChild) { int rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->lastChild->drawable.id, RT_WINDOW, pWin->lastChild, RT_NONE, NULL, DixDestroyAccess); if (rc != Success) return rc; FreeResource(pWin->lastChild->drawable.id, RT_NONE); } return Success; } static void SetRootWindowBackground(WindowPtr pWin, ScreenPtr pScreen, Mask *index2) { /* following the protocol: "Changing the background of a root window to * None or ParentRelative restores the default background pixmap" */ if (bgNoneRoot) { pWin->backgroundState = XaceBackgroundNoneState(pWin); pWin->background.pixel = pScreen->whitePixel; } else if (party_like_its_1989) MakeRootTile(pWin); else { pWin->backgroundState = BackgroundPixel; if (whiteRoot) pWin->background.pixel = pScreen->whitePixel; else pWin->background.pixel = pScreen->blackPixel; *index2 = CWBackPixel; } } /***** * ChangeWindowAttributes * * The value-mask specifies which attributes are to be changed; the * value-list contains one value for each one bit in the mask, from least * to most significant bit in the mask. *****/ int ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) { XID *pVlist; PixmapPtr pPixmap; Pixmap pixID; CursorPtr pCursor, pOldCursor; Cursor cursorID; WindowPtr pChild; Colormap cmap; ColormapPtr pCmap; xEvent xE; int error, rc; ScreenPtr pScreen; Mask index2, tmask, vmaskCopy = 0; unsigned int val; Bool checkOptional = FALSE, borderRelative = FALSE; if ((pWin->drawable.class == InputOnly) && (vmask & (~INPUTONLY_LEGAL_MASK))) return BadMatch; error = Success; pScreen = pWin->drawable.pScreen; pVlist = vlist; tmask = vmask; while (tmask) { index2 = (Mask) lowbit(tmask); tmask &= ~index2; switch (index2) { case CWBackPixmap: pixID = (Pixmap) * pVlist; pVlist++; if (pWin->backgroundState == ParentRelative) borderRelative = TRUE; if (pixID == None) { if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap) (pWin->background.pixmap); if (!pWin->parent) SetRootWindowBackground(pWin, pScreen, &index2); else { pWin->backgroundState = XaceBackgroundNoneState(pWin); pWin->background.pixel = pScreen->whitePixel; } } else if (pixID == ParentRelative) { if (pWin->parent && pWin->drawable.depth != pWin->parent->drawable.depth) { error = BadMatch; goto PatchUp; } if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap) (pWin->background.pixmap); if (!pWin->parent) SetRootWindowBackground(pWin, pScreen, &index2); else pWin->backgroundState = ParentRelative; borderRelative = TRUE; /* Note that the parent's backgroundTile's refcnt is NOT * incremented. */ } else { rc = dixLookupResourceByType((void **) &pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (rc == Success) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || (pPixmap->drawable.pScreen != pScreen)) { error = BadMatch; goto PatchUp; } if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap) (pWin->background.pixmap); pWin->backgroundState = BackgroundPixmap; pWin->background.pixmap = pPixmap; pPixmap->refcnt++; } else { error = rc; client->errorValue = pixID; goto PatchUp; } } break; case CWBackPixel: if (pWin->backgroundState == ParentRelative) borderRelative = TRUE; if (pWin->backgroundState == BackgroundPixmap) (*pScreen->DestroyPixmap) (pWin->background.pixmap); pWin->backgroundState = BackgroundPixel; pWin->background.pixel = (CARD32) *pVlist; /* background pixel overrides background pixmap, so don't let the ddx layer see both bits */ vmaskCopy &= ~CWBackPixmap; pVlist++; break; case CWBorderPixmap: pixID = (Pixmap) * pVlist; pVlist++; if (pixID == CopyFromParent) { if (!pWin->parent || (pWin->drawable.depth != pWin->parent->drawable.depth)) { error = BadMatch; goto PatchUp; } if (pWin->parent->borderIsPixel == TRUE) { if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap) (pWin->border.pixmap); pWin->border = pWin->parent->border; pWin->borderIsPixel = TRUE; index2 = CWBorderPixel; break; } else { pixID = pWin->parent->border.pixmap->drawable.id; } } rc = dixLookupResourceByType((void **) &pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (rc == Success) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || (pPixmap->drawable.pScreen != pScreen)) { error = BadMatch; goto PatchUp; } if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap) (pWin->border.pixmap); pWin->borderIsPixel = FALSE; pWin->border.pixmap = pPixmap; pPixmap->refcnt++; } else { error = rc; client->errorValue = pixID; goto PatchUp; } break; case CWBorderPixel: if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap) (pWin->border.pixmap); pWin->borderIsPixel = TRUE; pWin->border.pixel = (CARD32) *pVlist; /* border pixel overrides border pixmap, so don't let the ddx layer see both bits */ vmaskCopy &= ~CWBorderPixmap; pVlist++; break; case CWBitGravity: val = (CARD8) *pVlist; pVlist++; if (val > StaticGravity) { error = BadValue; client->errorValue = val; goto PatchUp; } pWin->bitGravity = val; break; case CWWinGravity: val = (CARD8) *pVlist; pVlist++; if (val > StaticGravity) { error = BadValue; client->errorValue = val; goto PatchUp; } pWin->winGravity = val; break; case CWBackingStore: val = (CARD8) *pVlist; pVlist++; if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) { error = BadValue; client->errorValue = val; goto PatchUp; } /* if we're not actually changing the window's state, hide * CWBackingStore from vmaskCopy so it doesn't get passed to * ->ChangeWindowAttributes below */ if (pWin->backingStore == val) continue; pWin->backingStore = val; break; case CWBackingPlanes: if (pWin->optional || ((CARD32) *pVlist != (CARD32) ~0L)) { if (!pWin->optional && !MakeWindowOptional(pWin)) { error = BadAlloc; goto PatchUp; } pWin->optional->backingBitPlanes = (CARD32) *pVlist; if ((CARD32) *pVlist == (CARD32) ~0L) checkOptional = TRUE; } pVlist++; break; case CWBackingPixel: if (pWin->optional || (CARD32) *pVlist) { if (!pWin->optional && !MakeWindowOptional(pWin)) { error = BadAlloc; goto PatchUp; } pWin->optional->backingPixel = (CARD32) *pVlist; if (!*pVlist) checkOptional = TRUE; } pVlist++; break; case CWSaveUnder: val = (BOOL) * pVlist; pVlist++; if ((val != xTrue) && (val != xFalse)) { error = BadValue; client->errorValue = val; goto PatchUp; } pWin->saveUnder = val; break; case CWEventMask: rc = EventSelectForWindow(pWin, client, (Mask) *pVlist); if (rc) { error = rc; goto PatchUp; } pVlist++; break; case CWDontPropagate: rc = EventSuppressForWindow(pWin, client, (Mask) *pVlist, &checkOptional); if (rc) { error = rc; goto PatchUp; } pVlist++; break; case CWOverrideRedirect: val = (BOOL) * pVlist; pVlist++; if ((val != xTrue) && (val != xFalse)) { error = BadValue; client->errorValue = val; goto PatchUp; } if (val == xTrue) { rc = XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, pWin, RT_NONE, NULL, DixGrabAccess); if (rc != Success) { error = rc; client->errorValue = pWin->drawable.id; goto PatchUp; } } pWin->overrideRedirect = val; break; case CWColormap: cmap = (Colormap) * pVlist; pVlist++; if (cmap == CopyFromParent) { if (pWin->parent && (!pWin->optional || pWin->optional->visual == wVisual(pWin->parent))) { cmap = wColormap(pWin->parent); } else cmap = None; } if (cmap == None) { error = BadMatch; goto PatchUp; } rc = dixLookupResourceByType((void **) &pCmap, cmap, RT_COLORMAP, client, DixUseAccess); if (rc != Success) { error = rc; client->errorValue = cmap; goto PatchUp; } if (pCmap->pVisual->vid != wVisual(pWin) || pCmap->pScreen != pScreen) { error = BadMatch; goto PatchUp; } if (cmap != wColormap(pWin)) { if (!pWin->optional) { if (!MakeWindowOptional(pWin)) { error = BadAlloc; goto PatchUp; } } else if (pWin->parent && cmap == wColormap(pWin->parent)) checkOptional = TRUE; /* * propagate the original colormap to any children * inheriting it */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (!pChild->optional && !MakeWindowOptional(pChild)) { error = BadAlloc; goto PatchUp; } } pWin->optional->colormap = cmap; /* * check on any children now matching the new colormap */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->optional->colormap == cmap) CheckWindowOptionalNeed(pChild); } xE = (xEvent) { .u.colormap.window = pWin->drawable.id, .u.colormap.colormap = cmap, .u.colormap.new = xTrue, .u.colormap.state = IsMapInstalled(cmap, pWin) }; xE.u.u.type = ColormapNotify; DeliverEvents(pWin, &xE, 1, NullWindow); } break; case CWCursor: cursorID = (Cursor) * pVlist; pVlist++; /* * install the new */ if (cursorID == None) { if (pWin == pWin->drawable.pScreen->root) pCursor = rootCursor; else pCursor = (CursorPtr) None; } else { rc = dixLookupResourceByType((void **) &pCursor, cursorID, RT_CURSOR, client, DixUseAccess); if (rc != Success) { error = rc; client->errorValue = cursorID; goto PatchUp; } } if (pCursor != wCursor(pWin)) { /* * patch up child windows so they don't lose cursors. */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (!pChild->optional && !pChild->cursorIsNone && !MakeWindowOptional(pChild)) { error = BadAlloc; goto PatchUp; } } pOldCursor = 0; if (pCursor == (CursorPtr) None) { pWin->cursorIsNone = TRUE; if (pWin->optional) { pOldCursor = pWin->optional->cursor; pWin->optional->cursor = (CursorPtr) None; checkOptional = TRUE; } } else { if (!pWin->optional) { if (!MakeWindowOptional(pWin)) { error = BadAlloc; goto PatchUp; } } else if (pWin->parent && pCursor == wCursor(pWin->parent)) checkOptional = TRUE; pOldCursor = pWin->optional->cursor; pWin->optional->cursor = RefCursor(pCursor); pWin->cursorIsNone = FALSE; /* * check on any children now matching the new cursor */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->optional && (pChild->optional->cursor == pCursor)) CheckWindowOptionalNeed(pChild); } } CursorVisible = TRUE; if (pWin->realized) WindowHasNewCursor(pWin); /* Can't free cursor until here - old cursor * is needed in WindowHasNewCursor */ if (pOldCursor) FreeCursor(pOldCursor, (Cursor) 0); } break; default: error = BadValue; client->errorValue = vmask; goto PatchUp; } vmaskCopy |= index2; } PatchUp: if (checkOptional) CheckWindowOptionalNeed(pWin); /* We SHOULD check for an error value here XXX */ (*pScreen->ChangeWindowAttributes) (pWin, vmaskCopy); /* If the border contents have changed, redraw the border. Note that this has to be done AFTER pScreen->ChangeWindowAttributes for the tile to be rotated, and the correct function selected. */ if (((vmaskCopy & (CWBorderPixel | CWBorderPixmap)) || borderRelative) && pWin->viewable && HasBorder(pWin)) { RegionRec exposed; RegionNull(&exposed); RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize); pWin->drawable.pScreen->PaintWindow(pWin, &exposed, PW_BORDER); RegionUninit(&exposed); } return error; } /***** * GetWindowAttributes * Notice that this is different than ChangeWindowAttributes *****/ void GetWindowAttributes(WindowPtr pWin, ClientPtr client, xGetWindowAttributesReply * wa) { wa->type = X_Reply; wa->bitGravity = pWin->bitGravity; wa->winGravity = pWin->winGravity; wa->backingStore = pWin->backingStore; wa->length = bytes_to_int32(sizeof(xGetWindowAttributesReply) - sizeof(xGenericReply)); wa->sequenceNumber = client->sequence; wa->backingBitPlanes = wBackingBitPlanes(pWin); wa->backingPixel = wBackingPixel(pWin); wa->saveUnder = (BOOL) pWin->saveUnder; wa->override = pWin->overrideRedirect; if (!pWin->mapped) wa->mapState = IsUnmapped; else if (pWin->realized) wa->mapState = IsViewable; else wa->mapState = IsUnviewable; wa->colormap = wColormap(pWin); wa->mapInstalled = (wa->colormap == None) ? xFalse : IsMapInstalled(wa->colormap, pWin); wa->yourEventMask = EventMaskForClient(pWin, client); wa->allEventMasks = pWin->eventMask | wOtherEventMasks(pWin); wa->doNotPropagateMask = wDontPropagateMask(pWin); wa->class = pWin->drawable.class; wa->visualID = wVisual(pWin); } WindowPtr MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) { WindowPtr pParent = pWin->parent; WindowPtr pFirstChange = pWin; /* highest window where list changes */ if (pWin->nextSib != pNextSib) { WindowPtr pOldNextSib = pWin->nextSib; if (!pNextSib) { /* move to bottom */ if (pParent->firstChild == pWin) pParent->firstChild = pWin->nextSib; /* if (pWin->nextSib) *//* is always True: pNextSib == NULL * and pWin->nextSib != pNextSib * therefore pWin->nextSib != NULL */ pFirstChange = pWin->nextSib; pWin->nextSib->prevSib = pWin->prevSib; if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; pParent->lastChild->nextSib = pWin; pWin->prevSib = pParent->lastChild; pWin->nextSib = NullWindow; pParent->lastChild = pWin; } else if (pParent->firstChild == pNextSib) { /* move to top */ pFirstChange = pWin; if (pParent->lastChild == pWin) pParent->lastChild = pWin->prevSib; if (pWin->nextSib) pWin->nextSib->prevSib = pWin->prevSib; if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; pWin->nextSib = pParent->firstChild; pWin->prevSib = NULL; pNextSib->prevSib = pWin; pParent->firstChild = pWin; } else { /* move in middle of list */ WindowPtr pOldNext = pWin->nextSib; pFirstChange = NullWindow; if (pParent->firstChild == pWin) pFirstChange = pParent->firstChild = pWin->nextSib; if (pParent->lastChild == pWin) { pFirstChange = pWin; pParent->lastChild = pWin->prevSib; } if (pWin->nextSib) pWin->nextSib->prevSib = pWin->prevSib; if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; pWin->nextSib = pNextSib; pWin->prevSib = pNextSib->prevSib; if (pNextSib->prevSib) pNextSib->prevSib->nextSib = pWin; pNextSib->prevSib = pWin; if (!pFirstChange) { /* do we know it yet? */ pFirstChange = pParent->firstChild; /* no, search from top */ while ((pFirstChange != pWin) && (pFirstChange != pOldNext)) pFirstChange = pFirstChange->nextSib; } } if (pWin->drawable.pScreen->RestackWindow) (*pWin->drawable.pScreen->RestackWindow) (pWin, pOldNextSib); } #ifdef ROOTLESS /* * In rootless mode we can't optimize away window restacks. * There may be non-X windows around, so even if the window * is in the correct position from X's point of view, * the underlying window system may want to reorder it. */ else if (pWin->drawable.pScreen->RestackWindow) (*pWin->drawable.pScreen->RestackWindow) (pWin, pWin->nextSib); #endif return pFirstChange; } void SetWinSize(WindowPtr pWin) { #ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; /* * Redirected clients get clip list equal to their * own geometry, not clipped to their parent */ box.x1 = pWin->drawable.x; box.y1 = pWin->drawable.y; box.x2 = pWin->drawable.x + pWin->drawable.width; box.y2 = pWin->drawable.y + pWin->drawable.height; RegionReset(&pWin->winSize, &box); } else #endif ClippedRegionFromBox(pWin->parent, &pWin->winSize, pWin->drawable.x, pWin->drawable.y, (int) pWin->drawable.width, (int) pWin->drawable.height); if (wBoundingShape(pWin) || wClipShape(pWin)) { RegionTranslate(&pWin->winSize, -pWin->drawable.x, -pWin->drawable.y); if (wBoundingShape(pWin)) RegionIntersect(&pWin->winSize, &pWin->winSize, wBoundingShape(pWin)); if (wClipShape(pWin)) RegionIntersect(&pWin->winSize, &pWin->winSize, wClipShape(pWin)); RegionTranslate(&pWin->winSize, pWin->drawable.x, pWin->drawable.y); } } void SetBorderSize(WindowPtr pWin) { int bw; if (HasBorder(pWin)) { bw = wBorderWidth(pWin); #ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { BoxRec box; /* * Redirected clients get clip list equal to their * own geometry, not clipped to their parent */ box.x1 = pWin->drawable.x - bw; box.y1 = pWin->drawable.y - bw; box.x2 = pWin->drawable.x + pWin->drawable.width + bw; box.y2 = pWin->drawable.y + pWin->drawable.height + bw; RegionReset(&pWin->borderSize, &box); } else #endif ClippedRegionFromBox(pWin->parent, &pWin->borderSize, pWin->drawable.x - bw, pWin->drawable.y - bw, (int) (pWin->drawable.width + (bw << 1)), (int) (pWin->drawable.height + (bw << 1))); if (wBoundingShape(pWin)) { RegionTranslate(&pWin->borderSize, -pWin->drawable.x, -pWin->drawable.y); RegionIntersect(&pWin->borderSize, &pWin->borderSize, wBoundingShape(pWin)); RegionTranslate(&pWin->borderSize, pWin->drawable.x, pWin->drawable.y); RegionUnion(&pWin->borderSize, &pWin->borderSize, &pWin->winSize); } } else { RegionCopy(&pWin->borderSize, &pWin->winSize); } } /** * * \param x,y new window position * \param oldx,oldy old window position * \param destx,desty position relative to gravity */ void GravityTranslate(int x, int y, int oldx, int oldy, int dw, int dh, unsigned gravity, int *destx, int *desty) { switch (gravity) { case NorthGravity: *destx = x + dw / 2; *desty = y; break; case NorthEastGravity: *destx = x + dw; *desty = y; break; case WestGravity: *destx = x; *desty = y + dh / 2; break; case CenterGravity: *destx = x + dw / 2; *desty = y + dh / 2; break; case EastGravity: *destx = x + dw; *desty = y + dh / 2; break; case SouthWestGravity: *destx = x; *desty = y + dh; break; case SouthGravity: *destx = x + dw / 2; *desty = y + dh; break; case SouthEastGravity: *destx = x + dw; *desty = y + dh; break; case StaticGravity: *destx = oldx; *desty = oldy; break; default: *destx = x; *desty = y; break; } } /* XXX need to retile border on each window with ParentRelative origin */ void ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh) { ScreenPtr pScreen; WindowPtr pSib, pChild; Bool resized = (dw || dh); pScreen = pWin->drawable.pScreen; for (pSib = pWin->firstChild; pSib; pSib = pSib->nextSib) { if (resized && (pSib->winGravity > NorthWestGravity)) { int cwsx, cwsy; cwsx = pSib->origin.x; cwsy = pSib->origin.y; GravityTranslate(cwsx, cwsy, cwsx - dx, cwsy - dy, dw, dh, pSib->winGravity, &cwsx, &cwsy); if (cwsx != pSib->origin.x || cwsy != pSib->origin.y) { xEvent event = { .u.gravity.window = pSib->drawable.id, .u.gravity.x = cwsx - wBorderWidth(pSib), .u.gravity.y = cwsy - wBorderWidth(pSib) }; event.u.u.type = GravityNotify; DeliverEvents(pSib, &event, 1, NullWindow); pSib->origin.x = cwsx; pSib->origin.y = cwsy; } } pSib->drawable.x = pWin->drawable.x + pSib->origin.x; pSib->drawable.y = pWin->drawable.y + pSib->origin.y; SetWinSize(pSib); SetBorderSize(pSib); (*pScreen->PositionWindow) (pSib, pSib->drawable.x, pSib->drawable.y); if ((pChild = pSib->firstChild)) { while (1) { pChild->drawable.x = pChild->parent->drawable.x + pChild->origin.x; pChild->drawable.y = pChild->parent->drawable.y + pChild->origin.y; SetWinSize(pChild); SetBorderSize(pChild); (*pScreen->PositionWindow) (pChild, pChild->drawable.x, pChild->drawable.y); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pChild != pSib)) pChild = pChild->parent; if (pChild == pSib) break; pChild = pChild->nextSib; } } } } #define GET_INT16(m, f) \ if (m & mask) \ { \ f = (INT16) *pVlist;\ pVlist++; \ } #define GET_CARD16(m, f) \ if (m & mask) \ { \ f = (CARD16) *pVlist;\ pVlist++;\ } #define GET_CARD8(m, f) \ if (m & mask) \ { \ f = (CARD8) *pVlist;\ pVlist++;\ } #define ChangeMask ((Mask)(CWX | CWY | CWWidth | CWHeight)) /* * IsSiblingAboveMe * returns Above if pSib above pMe in stack or Below otherwise */ static int IsSiblingAboveMe(WindowPtr pMe, WindowPtr pSib) { WindowPtr pWin; pWin = pMe->parent->firstChild; while (pWin) { if (pWin == pSib) return Above; else if (pWin == pMe) return Below; pWin = pWin->nextSib; } return Below; } static BoxPtr WindowExtents(WindowPtr pWin, BoxPtr pBox) { pBox->x1 = pWin->drawable.x - wBorderWidth(pWin); pBox->y1 = pWin->drawable.y - wBorderWidth(pWin); pBox->x2 = pWin->drawable.x + (int) pWin->drawable.width + wBorderWidth(pWin); pBox->y2 = pWin->drawable.y + (int) pWin->drawable.height + wBorderWidth(pWin); return pBox; } #define IS_SHAPED(pWin) (wBoundingShape (pWin) != NULL) static RegionPtr MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox) { RegionPtr pRgn = RegionCreate(pBox, 1); if (wBoundingShape(pWin)) { RegionTranslate(pRgn, -pWin->origin.x, -pWin->origin.y); RegionIntersect(pRgn, pRgn, wBoundingShape(pWin)); RegionTranslate(pRgn, pWin->origin.x, pWin->origin.y); } return pRgn; } static Bool ShapeOverlap(WindowPtr pWin, BoxPtr pWinBox, WindowPtr pSib, BoxPtr pSibBox) { RegionPtr pWinRgn, pSibRgn; Bool ret; if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib)) return TRUE; pWinRgn = MakeBoundingRegion(pWin, pWinBox); pSibRgn = MakeBoundingRegion(pSib, pSibBox); RegionIntersect(pWinRgn, pWinRgn, pSibRgn); ret = RegionNotEmpty(pWinRgn); RegionDestroy(pWinRgn); RegionDestroy(pSibRgn); return ret; } static Bool AnyWindowOverlapsMe(WindowPtr pWin, WindowPtr pHead, BoxPtr box) { WindowPtr pSib; BoxRec sboxrec; BoxPtr sbox; for (pSib = pWin->prevSib; pSib != pHead; pSib = pSib->prevSib) { if (pSib->mapped) { sbox = WindowExtents(pSib, &sboxrec); if (BOXES_OVERLAP(sbox, box) && ShapeOverlap(pWin, box, pSib, sbox)) return TRUE; } } return FALSE; } static Bool IOverlapAnyWindow(WindowPtr pWin, BoxPtr box) { WindowPtr pSib; BoxRec sboxrec; BoxPtr sbox; for (pSib = pWin->nextSib; pSib; pSib = pSib->nextSib) { if (pSib->mapped) { sbox = WindowExtents(pSib, &sboxrec); if (BOXES_OVERLAP(sbox, box) && ShapeOverlap(pWin, box, pSib, sbox)) return TRUE; } } return FALSE; } /* * WhereDoIGoInTheStack() * Given pWin and pSib and the relationshipe smode, return * the window that pWin should go ABOVE. * If a pSib is specified: * Above: pWin is placed just above pSib * Below: pWin is placed just below pSib * TopIf: if pSib occludes pWin, then pWin is placed * at the top of the stack * BottomIf: if pWin occludes pSib, then pWin is * placed at the bottom of the stack * Opposite: if pSib occludes pWin, then pWin is placed at the * top of the stack, else if pWin occludes pSib, then * pWin is placed at the bottom of the stack * * If pSib is NULL: * Above: pWin is placed at the top of the stack * Below: pWin is placed at the bottom of the stack * TopIf: if any sibling occludes pWin, then pWin is placed at * the top of the stack * BottomIf: if pWin occludes any sibline, then pWin is placed at * the bottom of the stack * Opposite: if any sibling occludes pWin, then pWin is placed at * the top of the stack, else if pWin occludes any * sibling, then pWin is placed at the bottom of the stack * */ static WindowPtr WhereDoIGoInTheStack(WindowPtr pWin, WindowPtr pSib, short x, short y, unsigned short w, unsigned short h, int smode) { BoxRec box; WindowPtr pHead, pFirst; if ((pWin == pWin->parent->firstChild) && (pWin == pWin->parent->lastChild)) return NULL; pHead = RealChildHead(pWin->parent); pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; box.x1 = x; box.y1 = y; box.x2 = x + (int) w; box.y2 = y + (int) h; switch (smode) { case Above: if (pSib) return pSib; else if (pWin == pFirst) return pWin->nextSib; else return pFirst; case Below: if (pSib) if (pSib->nextSib != pWin) return pSib->nextSib; else return pWin->nextSib; else return NullWindow; case TopIf: if ((!pWin->mapped || (pSib && !pSib->mapped))) return pWin->nextSib; else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Above) && (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) return pFirst; else return pWin->nextSib; } else if (AnyWindowOverlapsMe(pWin, pHead, &box)) return pFirst; else return pWin->nextSib; case BottomIf: if ((!pWin->mapped || (pSib && !pSib->mapped))) return pWin->nextSib; else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Below) && (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) return NullWindow; else return pWin->nextSib; } else if (IOverlapAnyWindow(pWin, &box)) return NullWindow; else return pWin->nextSib; case Opposite: if ((!pWin->mapped || (pSib && !pSib->mapped))) return pWin->nextSib; else if (pSib) { if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT) { if (IsSiblingAboveMe(pWin, pSib) == Above) return pFirst; else return NullWindow; } else return pWin->nextSib; } else if (AnyWindowOverlapsMe(pWin, pHead, &box)) { /* If I'm occluded, I can't possibly be the first child * if (pWin == pWin->parent->firstChild) * return pWin->nextSib; */ return pFirst; } else if (IOverlapAnyWindow(pWin, &box)) return NullWindow; else return pWin->nextSib; default: { /* should never happen; make something up. */ return pWin->nextSib; } } } static void ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind) { /* Note that pSib might be NULL */ Bool WasViewable = (Bool) pWin->viewable; Bool anyMarked; WindowPtr pFirstChange; WindowPtr pLayerWin; ScreenPtr pScreen = pWin->drawable.pScreen; /* if this is a root window, can't be restacked */ if (!pWin->parent) return; pFirstChange = MoveWindowInStack(pWin, pSib); if (WasViewable) { anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange, &pLayerWin); if (pLayerWin != pWin) pFirstChange = pLayerWin; if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind); (*pScreen->HandleExposures) (pLayerWin->parent); if (pWin->drawable.pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange, kind); } } if (pWin->realized) WindowsRestructured(); } /***** * ConfigureWindow *****/ int ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) { #define RESTACK_WIN 0 #define MOVE_WIN 1 #define RESIZE_WIN 2 #define REBORDER_WIN 3 WindowPtr pSib = NullWindow; WindowPtr pParent = pWin->parent; Window sibwid = 0; Mask index2, tmask; XID *pVlist; short x, y, beforeX, beforeY; unsigned short w = pWin->drawable.width, h = pWin->drawable.height, bw = pWin->borderWidth; int rc, action, smode = Above; if ((pWin->drawable.class == InputOnly) && (mask & CWBorderWidth)) return BadMatch; if ((mask & CWSibling) && !(mask & CWStackMode)) return BadMatch; pVlist = vlist; if (pParent) { x = pWin->drawable.x - pParent->drawable.x - (int) bw; y = pWin->drawable.y - pParent->drawable.y - (int) bw; } else { x = pWin->drawable.x; y = pWin->drawable.y; } beforeX = x; beforeY = y; action = RESTACK_WIN; if ((mask & (CWX | CWY)) && (!(mask & (CWHeight | CWWidth)))) { GET_INT16(CWX, x); GET_INT16(CWY, y); action = MOVE_WIN; } /* or should be resized */ else if (mask & (CWX | CWY | CWWidth | CWHeight)) { GET_INT16(CWX, x); GET_INT16(CWY, y); GET_CARD16(CWWidth, w); GET_CARD16(CWHeight, h); if (!w || !h) { client->errorValue = 0; return BadValue; } action = RESIZE_WIN; } tmask = mask & ~ChangeMask; while (tmask) { index2 = (Mask) lowbit(tmask); tmask &= ~index2; switch (index2) { case CWBorderWidth: GET_CARD16(CWBorderWidth, bw); break; case CWSibling: sibwid = (Window) *pVlist; pVlist++; rc = dixLookupWindow(&pSib, sibwid, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = sibwid; return rc; } if (pSib->parent != pParent) return BadMatch; if (pSib == pWin) return BadMatch; break; case CWStackMode: GET_CARD8(CWStackMode, smode); if ((smode != TopIf) && (smode != BottomIf) && (smode != Opposite) && (smode != Above) && (smode != Below)) { client->errorValue = smode; return BadValue; } break; default: client->errorValue = mask; return BadValue; } } /* root really can't be reconfigured, so just return */ if (!pParent) return Success; /* Figure out if the window should be moved. Doesn't make the changes to the window if event sent. */ if (mask & CWStackMode) pSib = WhereDoIGoInTheStack(pWin, pSib, pParent->drawable.x + x, pParent->drawable.y + y, w + (bw << 1), h + (bw << 1), smode); else pSib = pWin->nextSib; if ((!pWin->overrideRedirect) && (RedirectSend(pParent))) { xEvent event = { .u.configureRequest.window = pWin->drawable.id, .u.configureRequest.sibling = (mask & CWSibling) ? sibwid : None, .u.configureRequest.x = x, .u.configureRequest.y = y, .u.configureRequest.width = w, .u.configureRequest.height = h, .u.configureRequest.borderWidth = bw, .u.configureRequest.valueMask = mask, .u.configureRequest.parent = pParent->drawable.id }; event.u.u.type = ConfigureRequest; event.u.u.detail = (mask & CWStackMode) ? smode : Above; #ifdef PANORAMIX if (!noPanoramiXExtension && (!pParent || !pParent->parent)) { event.u.configureRequest.x += screenInfo.screens[0]->x; event.u.configureRequest.y += screenInfo.screens[0]->y; } #endif if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) return Success; } if (action == RESIZE_WIN) { Bool size_change = (w != pWin->drawable.width) || (h != pWin->drawable.height); if (size_change && ((pWin->eventMask | wOtherEventMasks(pWin)) & ResizeRedirectMask)) { xEvent eventT = { .u.resizeRequest.window = pWin->drawable.id, .u.resizeRequest.width = w, .u.resizeRequest.height = h }; eventT.u.u.type = ResizeRequest; if (MaybeDeliverEventsToClient(pWin, &eventT, 1, ResizeRedirectMask, client) == 1) { /* if event is delivered, leave the actual size alone. */ w = pWin->drawable.width; h = pWin->drawable.height; size_change = FALSE; } } if (!size_change) { if (mask & (CWX | CWY)) action = MOVE_WIN; else if (mask & (CWStackMode | CWBorderWidth)) action = RESTACK_WIN; else /* really nothing to do */ return (Success); } } if (action == RESIZE_WIN) /* we've already checked whether there's really a size change */ goto ActuallyDoSomething; if ((mask & CWX) && (x != beforeX)) goto ActuallyDoSomething; if ((mask & CWY) && (y != beforeY)) goto ActuallyDoSomething; if ((mask & CWBorderWidth) && (bw != wBorderWidth(pWin))) goto ActuallyDoSomething; if (mask & CWStackMode) { #ifndef ROOTLESS /* See above for why we always reorder in rootless mode. */ if (pWin->nextSib != pSib) #endif goto ActuallyDoSomething; } return Success; ActuallyDoSomething: if (pWin->drawable.pScreen->ConfigNotify) { int ret; ret = (*pWin->drawable.pScreen->ConfigNotify) (pWin, x, y, w, h, bw, pSib); if (ret) { client->errorValue = 0; return ret; } } if (SubStrSend(pWin, pParent)) { xEvent event = { .u.configureNotify.window = pWin->drawable.id, .u.configureNotify.aboveSibling = pSib ? pSib->drawable.id : None, .u.configureNotify.x = x, .u.configureNotify.y = y, .u.configureNotify.width = w, .u.configureNotify.height = h, .u.configureNotify.borderWidth = bw, .u.configureNotify.override = pWin->overrideRedirect }; event.u.u.type = ConfigureNotify; #ifdef PANORAMIX if (!noPanoramiXExtension && (!pParent || !pParent->parent)) { event.u.configureNotify.x += screenInfo.screens[0]->x; event.u.configureNotify.y += screenInfo.screens[0]->y; } #endif DeliverEvents(pWin, &event, 1, NullWindow); } if (mask & CWBorderWidth) { if (action == RESTACK_WIN) { action = MOVE_WIN; pWin->borderWidth = bw; } else if ((action == MOVE_WIN) && (beforeX + wBorderWidth(pWin) == x + (int) bw) && (beforeY + wBorderWidth(pWin) == y + (int) bw)) { action = REBORDER_WIN; (*pWin->drawable.pScreen->ChangeBorderWidth) (pWin, bw); } else pWin->borderWidth = bw; } if (action == MOVE_WIN) (*pWin->drawable.pScreen->MoveWindow) (pWin, x, y, pSib, (mask & CWBorderWidth) ? VTOther : VTMove); else if (action == RESIZE_WIN) (*pWin->drawable.pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); else if (mask & CWStackMode) ReflectStackChange(pWin, pSib, VTOther); if (action != RESTACK_WIN) CheckCursorConfinement(pWin); return Success; #undef RESTACK_WIN #undef MOVE_WIN #undef RESIZE_WIN #undef REBORDER_WIN } /****** * * CirculateWindow * For RaiseLowest, raises the lowest mapped child (if any) that is * obscured by another child to the top of the stack. For LowerHighest, * lowers the highest mapped child (if any) that is obscuring another * child to the bottom of the stack. Exposure processing is performed * ******/ int CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) { WindowPtr pWin, pHead, pFirst; xEvent event; BoxRec box; pHead = RealChildHead(pParent); pFirst = pHead ? pHead->nextSib : pParent->firstChild; if (direction == RaiseLowest) { for (pWin = pParent->lastChild; (pWin != pHead) && !(pWin->mapped && AnyWindowOverlapsMe(pWin, pHead, WindowExtents(pWin, &box))); pWin = pWin->prevSib); if (pWin == pHead) return Success; } else { for (pWin = pFirst; pWin && !(pWin->mapped && IOverlapAnyWindow(pWin, WindowExtents(pWin, &box))); pWin = pWin->nextSib); if (!pWin) return Success; } event = (xEvent) { .u.circulate.window = pWin->drawable.id, .u.circulate.parent = pParent->drawable.id, .u.circulate.event = pParent->drawable.id, .u.circulate.place = (direction == RaiseLowest) ? PlaceOnTop : PlaceOnBottom, }; if (RedirectSend(pParent)) { event.u.u.type = CirculateRequest; if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) return Success; } event.u.u.type = CirculateNotify; DeliverEvents(pWin, &event, 1, NullWindow); ReflectStackChange(pWin, (direction == RaiseLowest) ? pFirst : NullWindow, VTStack); return Success; } static int CompareWIDs(WindowPtr pWin, void *value) { /* must conform to VisitWindowProcPtr */ Window *wid = (Window *) value; if (pWin->drawable.id == *wid) return WT_STOPWALKING; else return WT_WALKCHILDREN; } /***** * ReparentWindow *****/ int ReparentWindow(WindowPtr pWin, WindowPtr pParent, int x, int y, ClientPtr client) { WindowPtr pPrev, pPriorParent; Bool WasMapped = (Bool) (pWin->mapped); xEvent event; int bw = wBorderWidth(pWin); ScreenPtr pScreen; pScreen = pWin->drawable.pScreen; if (TraverseTree(pWin, CompareWIDs, (void *) &pParent->drawable.id) == WT_STOPWALKING) return BadMatch; if (!MakeWindowOptional(pWin)) return BadAlloc; if (WasMapped) UnmapWindow(pWin, FALSE); event = (xEvent) { .u.reparent.window = pWin->drawable.id, .u.reparent.parent = pParent->drawable.id, .u.reparent.x = x, .u.reparent.y = y, .u.reparent.override = pWin->overrideRedirect }; event.u.u.type = ReparentNotify; #ifdef PANORAMIX if (!noPanoramiXExtension && !pParent->parent) { event.u.reparent.x += screenInfo.screens[0]->x; event.u.reparent.y += screenInfo.screens[0]->y; } #endif DeliverEvents(pWin, &event, 1, pParent); /* take out of sibling chain */ pPriorParent = pPrev = pWin->parent; if (pPrev->firstChild == pWin) pPrev->firstChild = pWin->nextSib; if (pPrev->lastChild == pWin) pPrev->lastChild = pWin->prevSib; if (pWin->nextSib) pWin->nextSib->prevSib = pWin->prevSib; if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; /* insert at beginning of pParent */ pWin->parent = pParent; pPrev = RealChildHead(pParent); if (pPrev) { pWin->nextSib = pPrev->nextSib; if (pPrev->nextSib) pPrev->nextSib->prevSib = pWin; else pParent->lastChild = pWin; pPrev->nextSib = pWin; pWin->prevSib = pPrev; } else { pWin->nextSib = pParent->firstChild; pWin->prevSib = NullWindow; if (pParent->firstChild) pParent->firstChild->prevSib = pWin; else pParent->lastChild = pWin; pParent->firstChild = pWin; } pWin->origin.x = x + bw; pWin->origin.y = y + bw; pWin->drawable.x = x + bw + pParent->drawable.x; pWin->drawable.y = y + bw + pParent->drawable.y; /* clip to parent */ SetWinSize(pWin); SetBorderSize(pWin); if (pScreen->ReparentWindow) (*pScreen->ReparentWindow) (pWin, pPriorParent); (*pScreen->PositionWindow) (pWin, pWin->drawable.x, pWin->drawable.y); ResizeChildrenWinSize(pWin, 0, 0, 0, 0); CheckWindowOptionalNeed(pWin); if (WasMapped) MapWindow(pWin, client); RecalculateDeliverableEvents(pWin); return Success; } static void RealizeTree(WindowPtr pWin) { WindowPtr pChild; RealizeWindowProcPtr Realize; Realize = pWin->drawable.pScreen->RealizeWindow; pChild = pWin; while (1) { if (pChild->mapped) { pChild->realized = TRUE; pChild->viewable = (pChild->drawable.class == InputOutput); (*Realize) (pChild); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) return; pChild = pChild->nextSib; } } static Bool MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client) { xEvent event = { .u.mapRequest.window = pWin->drawable.id, .u.mapRequest.parent = pParent->drawable.id }; event.u.u.type = MapRequest; return MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1; } static void DeliverMapNotify(WindowPtr pWin) { xEvent event = { .u.mapNotify.window = pWin->drawable.id, .u.mapNotify.override = pWin->overrideRedirect, }; event.u.u.type = MapNotify; DeliverEvents(pWin, &event, 1, NullWindow); } /***** * MapWindow * If some other client has selected SubStructureReDirect on the parent * and override-redirect is xFalse, then a MapRequest event is generated, * but the window remains unmapped. Otherwise, the window is mapped and a * MapNotify event is generated. *****/ int MapWindow(WindowPtr pWin, ClientPtr client) { ScreenPtr pScreen; WindowPtr pParent; WindowPtr pLayerWin; if (pWin->mapped) return Success; /* general check for permission to map window */ if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, pWin, RT_NONE, NULL, DixShowAccess) != Success) return Success; pScreen = pWin->drawable.pScreen; if ((pParent = pWin->parent)) { Bool anyMarked; if ((!pWin->overrideRedirect) && (RedirectSend(pParent))) if (MaybeDeliverMapRequest(pWin, pParent, client)) return Success; pWin->mapped = TRUE; if (SubStrSend(pWin, pParent)) DeliverMapNotify(pWin); if (!pParent->realized) return Success; RealizeTree(pWin); if (pWin->viewable) { anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, VTMap); } } WindowsRestructured(); } else { RegionRec temp; pWin->mapped = TRUE; pWin->realized = TRUE; /* for roots */ pWin->viewable = pWin->drawable.class == InputOutput; /* We SHOULD check for an error value here XXX */ (*pScreen->RealizeWindow) (pWin); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pWin, 0, 0); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (NullWindow, pWin, VTMap); RegionNull(&temp); RegionCopy(&temp, &pWin->clipList); (*pScreen->WindowExposures) (pWin, &temp); RegionUninit(&temp); } return Success; } /***** * MapSubwindows * Performs a MapWindow all unmapped children of the window, in top * to bottom stacking order. *****/ void MapSubwindows(WindowPtr pParent, ClientPtr client) { WindowPtr pWin; WindowPtr pFirstMapped = NullWindow; ScreenPtr pScreen; Mask parentRedirect; Mask parentNotify; Bool anyMarked; WindowPtr pLayerWin; pScreen = pParent->drawable.pScreen; parentRedirect = RedirectSend(pParent); parentNotify = SubSend(pParent); anyMarked = FALSE; for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib) { if (!pWin->mapped) { if (parentRedirect && !pWin->overrideRedirect) if (MaybeDeliverMapRequest(pWin, pParent, client)) continue; pWin->mapped = TRUE; if (parentNotify || StrSend(pWin)) DeliverMapNotify(pWin); if (!pFirstMapped) pFirstMapped = pWin; if (pParent->realized) { RealizeTree(pWin); if (pWin->viewable) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); } } } } if (pFirstMapped) { pLayerWin = (*pScreen->GetLayerWindow) (pParent); if (pLayerWin->parent != pParent) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pLayerWin, pLayerWin, NULL); pFirstMapped = pLayerWin; } if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, pFirstMapped, VTMap); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped, VTMap); } WindowsRestructured(); } } static void UnrealizeTree(WindowPtr pWin, Bool fromConfigure) { WindowPtr pChild; UnrealizeWindowProcPtr Unrealize; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; Unrealize = pWin->drawable.pScreen->UnrealizeWindow; MarkUnrealizedWindow = pWin->drawable.pScreen->MarkUnrealizedWindow; pChild = pWin; while (1) { if (pChild->realized) { pChild->realized = FALSE; pChild->visibility = VisibilityNotViewable; #ifdef PANORAMIX if (!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { PanoramiXRes *win; int rc = dixLookupResourceByType((void **) &win, pChild->drawable.id, XRT_WINDOW, serverClient, DixWriteAccess); if (rc == Success) win->u.win.visibility = VisibilityNotViewable; } #endif (*Unrealize) (pChild); DeleteWindowFromAnyEvents(pChild, FALSE); if (pChild->viewable) { pChild->viewable = FALSE; (*MarkUnrealizedWindow) (pChild, pWin, fromConfigure); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; } if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) return; pChild = pChild->nextSib; } } static void DeliverUnmapNotify(WindowPtr pWin, Bool fromConfigure) { xEvent event = { .u.unmapNotify.window = pWin->drawable.id, .u.unmapNotify.fromConfigure = fromConfigure }; event.u.u.type = UnmapNotify; DeliverEvents(pWin, &event, 1, NullWindow); } /***** * UnmapWindow * If the window is already unmapped, this request has no effect. * Otherwise, the window is unmapped and an UnMapNotify event is * generated. Cannot unmap a root window. *****/ int UnmapWindow(WindowPtr pWin, Bool fromConfigure) { WindowPtr pParent; Bool wasRealized = (Bool) pWin->realized; Bool wasViewable = (Bool) pWin->viewable; ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pLayerWin = pWin; if ((!pWin->mapped) || (!(pParent = pWin->parent))) return Success; if (SubStrSend(pWin, pParent)) DeliverUnmapNotify(pWin, fromConfigure); if (wasViewable && !fromConfigure) { pWin->valdata = UnmapValData; (*pScreen->MarkOverlappedWindows) (pWin, pWin->nextSib, &pLayerWin); (*pScreen->MarkWindow) (pLayerWin->parent); } pWin->mapped = FALSE; if (wasRealized) UnrealizeTree(pWin, fromConfigure); if (wasViewable && !fromConfigure) { (*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap); } if (wasRealized && !fromConfigure) { WindowsRestructured(); WindowGone(pWin); } return Success; } /***** * UnmapSubwindows * Performs an UnmapWindow request with the specified mode on all mapped * children of the window, in bottom to top stacking order. *****/ void UnmapSubwindows(WindowPtr pWin) { WindowPtr pChild, pHead; Bool wasRealized = (Bool) pWin->realized; Bool wasViewable = (Bool) pWin->viewable; Bool anyMarked = FALSE; Mask parentNotify; WindowPtr pLayerWin = NULL; ScreenPtr pScreen = pWin->drawable.pScreen; if (!pWin->firstChild) return; parentNotify = SubSend(pWin); pHead = RealChildHead(pWin); if (wasViewable) pLayerWin = (*pScreen->GetLayerWindow) (pWin); for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) { if (pChild->mapped) { if (parentNotify || StrSend(pChild)) DeliverUnmapNotify(pChild, xFalse); if (pChild->viewable) { pChild->valdata = UnmapValData; anyMarked = TRUE; } pChild->mapped = FALSE; if (pChild->realized) UnrealizeTree(pChild, FALSE); } } if (wasViewable && anyMarked) { if (pLayerWin->parent == pWin) (*pScreen->MarkWindow) (pWin); else { WindowPtr ptmp; (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); (*pScreen->MarkWindow) (pLayerWin->parent); /* Windows between pWin and pLayerWin may not have been marked */ ptmp = pWin; while (ptmp != pLayerWin->parent) { (*pScreen->MarkWindow) (ptmp); ptmp = ptmp->parent; } pHead = pWin->firstChild; } (*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap); } if (wasRealized) { WindowsRestructured(); WindowGone(pWin); } } void HandleSaveSet(ClientPtr client) { WindowPtr pParent, pWin; int j; for (j = 0; j < client->numSaved; j++) { pWin = SaveSetWindow(client->saveSet[j]); if (SaveSetToRoot(client->saveSet[j])) pParent = pWin->drawable.pScreen->root; else { pParent = pWin->parent; while (pParent && (wClient(pParent) == client)) pParent = pParent->parent; } if (pParent) { if (pParent != pWin->parent) { /* unmap first so that ReparentWindow doesn't remap */ if (!SaveSetShouldMap(client->saveSet[j])) UnmapWindow(pWin, FALSE); ReparentWindow(pWin, pParent, pWin->drawable.x - wBorderWidth(pWin) - pParent->drawable.x, pWin->drawable.y - wBorderWidth(pWin) - pParent->drawable.y, client); if (!pWin->realized && pWin->mapped) pWin->mapped = FALSE; } if (SaveSetShouldMap(client->saveSet[j])) MapWindow(pWin, client); } } free(client->saveSet); client->numSaved = 0; client->saveSet = NULL; } /** * * \param x,y in root */ Bool PointInWindowIsVisible(WindowPtr pWin, int x, int y) { BoxRec box; if (!pWin->realized) return FALSE; if (RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || RegionContainsPoint(wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box))) return TRUE; return FALSE; } RegionPtr NotClippedByChildren(WindowPtr pWin) { RegionPtr pReg = RegionCreate(NullBox, 1); if (pWin->parent || screenIsSaved != SCREEN_SAVER_ON || !HasSaverWindow(pWin->drawable.pScreen)) { RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize); } return pReg; } void SendVisibilityNotify(WindowPtr pWin) { xEvent event; unsigned int visibility = pWin->visibility; #ifdef PANORAMIX /* This is not quite correct yet, but it's close */ if (!noPanoramiXExtension) { PanoramiXRes *win; WindowPtr pWin2; int rc, i, Scrnum; Scrnum = pWin->drawable.pScreen->myNum; win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, Scrnum); if (!win || (win->u.win.visibility == visibility)) return; switch (visibility) { case VisibilityUnobscured: FOR_NSCREENS(i) { if (i == Scrnum) continue; rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, DixWriteAccess); if (rc == Success) { if (pWin2->visibility == VisibilityPartiallyObscured) return; if (!i) pWin = pWin2; } } break; case VisibilityPartiallyObscured: if (Scrnum) { rc = dixLookupWindow(&pWin2, win->info[0].id, serverClient, DixWriteAccess); if (rc == Success) pWin = pWin2; } break; case VisibilityFullyObscured: FOR_NSCREENS(i) { if (i == Scrnum) continue; rc = dixLookupWindow(&pWin2, win->info[i].id, serverClient, DixWriteAccess); if (rc == Success) { if (pWin2->visibility != VisibilityFullyObscured) return; if (!i) pWin = pWin2; } } break; } win->u.win.visibility = visibility; } #endif event = (xEvent) { .u.visibility.window = pWin->drawable.id, .u.visibility.state = visibility }; event.u.u.type = VisibilityNotify; DeliverEvents(pWin, &event, 1, NullWindow); } #define RANDOM_WIDTH 32 int dixSaveScreens(ClientPtr client, int on, int mode) { int rc, i, what, type; XID vlist[2]; if (on == SCREEN_SAVER_FORCER) { if (mode == ScreenSaverReset) what = SCREEN_SAVER_OFF; else what = SCREEN_SAVER_ON; type = what; } else { what = on; type = what; if (what == screenIsSaved) type = SCREEN_SAVER_CYCLE; } for (i = 0; i < screenInfo.numScreens; i++) { rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, screenInfo.screens[i], DixShowAccess | DixHideAccess); if (rc != Success) return rc; } for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; if (on == SCREEN_SAVER_FORCER) (*pScreen->SaveScreen) (pScreen, on); if (pScreen->screensaver.ExternalScreenSaver) { if ((*pScreen->screensaver.ExternalScreenSaver) (pScreen, type, on == SCREEN_SAVER_FORCER)) continue; } if (type == screenIsSaved) continue; switch (type) { case SCREEN_SAVER_OFF: if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { (*pScreen->SaveScreen) (pScreen, what); } else if (HasSaverWindow(pScreen)) { pScreen->screensaver.pWindow = NullWindow; FreeResource(pScreen->screensaver.wid, RT_NONE); } break; case SCREEN_SAVER_CYCLE: if (pScreen->screensaver.blanked == SCREEN_IS_TILED) { WindowPtr pWin = pScreen->screensaver.pWindow; /* make it look like screen saver is off, so that * NotClippedByChildren will compute a clip list * for the root window, so PaintWindow works */ screenIsSaved = SCREEN_SAVER_OFF; vlist[0] = -(rand() % RANDOM_WIDTH); vlist[1] = -(rand() % RANDOM_WIDTH); ConfigureWindow(pWin, CWX | CWY, vlist, client); screenIsSaved = SCREEN_SAVER_ON; } /* * Call the DDX saver in case it wants to do something * at cycle time */ else if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { (*pScreen->SaveScreen) (pScreen, type); } break; case SCREEN_SAVER_ON: if (ScreenSaverBlanking != DontPreferBlanking) { if ((*pScreen->SaveScreen) (pScreen, what)) { pScreen->screensaver.blanked = SCREEN_IS_BLANKED; continue; } if ((ScreenSaverAllowExposures != DontAllowExposures) && TileScreenSaver(pScreen, SCREEN_IS_BLACK)) { pScreen->screensaver.blanked = SCREEN_IS_BLACK; continue; } } if ((ScreenSaverAllowExposures != DontAllowExposures) && TileScreenSaver(pScreen, SCREEN_IS_TILED)) { pScreen->screensaver.blanked = SCREEN_IS_TILED; } else pScreen->screensaver.blanked = SCREEN_ISNT_SAVED; break; } } screenIsSaved = what; if (mode == ScreenSaverReset) { if (on == SCREEN_SAVER_FORCER) { DeviceIntPtr dev; UpdateCurrentTimeIf(); nt_list_for_each_entry(dev, inputInfo.devices, next) NoticeTime(dev, currentTime); } SetScreenSaverTimer(); } return Success; } int SaveScreens(int on, int mode) { return dixSaveScreens(serverClient, on, mode); } static Bool TileScreenSaver(ScreenPtr pScreen, int kind) { int j; int result; XID attributes[3]; Mask mask; WindowPtr pWin; CursorMetricRec cm; unsigned char *srcbits, *mskbits; CursorPtr cursor; XID cursorID = 0; int attri; mask = 0; attri = 0; switch (kind) { case SCREEN_IS_TILED: switch (pScreen->root->backgroundState) { case BackgroundPixel: attributes[attri++] = pScreen->root->background.pixel; mask |= CWBackPixel; break; case BackgroundPixmap: attributes[attri++] = None; mask |= CWBackPixmap; break; default: break; } break; case SCREEN_IS_BLACK: attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel; mask |= CWBackPixel; break; } mask |= CWOverrideRedirect; attributes[attri++] = xTrue; /* * create a blank cursor */ cm.width = 16; cm.height = 16; cm.xhot = 8; cm.yhot = 8; srcbits = malloc(BitmapBytePad(32) * 16); mskbits = malloc(BitmapBytePad(32) * 16); if (!srcbits || !mskbits) { free(srcbits); free(mskbits); cursor = 0; } else { for (j = 0; j < BitmapBytePad(32) * 16; j++) srcbits[j] = mskbits[j] = 0x0; result = AllocARGBCursor(srcbits, mskbits, NULL, &cm, 0, 0, 0, 0, 0, 0, &cursor, serverClient, (XID) 0); if (cursor) { cursorID = FakeClientID(0); if (AddResource(cursorID, RT_CURSOR, (void *) cursor)) { attributes[attri] = cursorID; mask |= CWCursor; } else cursor = 0; } else { free(srcbits); free(mskbits); } } pWin = pScreen->screensaver.pWindow = CreateWindow(pScreen->screensaver.wid, pScreen->root, -RANDOM_WIDTH, -RANDOM_WIDTH, (unsigned short) pScreen->width + RANDOM_WIDTH, (unsigned short) pScreen->height + RANDOM_WIDTH, 0, InputOutput, mask, attributes, 0, serverClient, wVisual(pScreen->root), &result); if (cursor) FreeResource(cursorID, RT_NONE); if (!pWin) return FALSE; if (!AddResource(pWin->drawable.id, RT_WINDOW, (void *) pScreen->screensaver.pWindow)) return FALSE; if (mask & CWBackPixmap) { MakeRootTile(pWin); (*pWin->drawable.pScreen->ChangeWindowAttributes) (pWin, CWBackPixmap); } MapWindow(pWin, serverClient); return TRUE; } /* * FindWindowWithOptional * * search ancestors of the given window for an entry containing * a WindowOpt structure. Assumptions: some parent will * contain the structure. */ WindowPtr FindWindowWithOptional(WindowPtr w) { do w = w->parent; while (!w->optional); return w; } /* * CheckWindowOptionalNeed * * check each optional entry in the given window to see if * the value is satisfied by the default rules. If so, * release the optional record */ void CheckWindowOptionalNeed(WindowPtr w) { WindowOptPtr optional; WindowOptPtr parentOptional; if (!w->parent || !w->optional) return; optional = w->optional; if (optional->dontPropagateMask != DontPropagateMasks[w->dontPropagate]) return; if (optional->otherEventMasks != 0) return; if (optional->otherClients != NULL) return; if (optional->passiveGrabs != NULL) return; if (optional->userProps != NULL) return; if (optional->backingBitPlanes != (CARD32)~0L) return; if (optional->backingPixel != 0) return; if (optional->boundingShape != NULL) return; if (optional->clipShape != NULL) return; if (optional->inputShape != NULL) return; if (optional->inputMasks != NULL) return; if (optional->deviceCursors != NULL) { DevCursNodePtr pNode = optional->deviceCursors; while (pNode) { if (pNode->cursor != None) return; pNode = pNode->next; } } parentOptional = FindWindowWithOptional(w)->optional; if (optional->visual != parentOptional->visual) return; if (optional->cursor != None && (optional->cursor != parentOptional->cursor || w->parent->cursorIsNone)) return; if (optional->colormap != parentOptional->colormap) return; DisposeWindowOptional(w); } /* * MakeWindowOptional * * create an optional record and initialize it with the default * values. */ Bool MakeWindowOptional(WindowPtr pWin) { WindowOptPtr optional; WindowOptPtr parentOptional; if (pWin->optional) return TRUE; optional = malloc(sizeof(WindowOptRec)); if (!optional) return FALSE; optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate]; optional->otherEventMasks = 0; optional->otherClients = NULL; optional->passiveGrabs = NULL; optional->userProps = NULL; optional->backingBitPlanes = ~0L; optional->backingPixel = 0; optional->boundingShape = NULL; optional->clipShape = NULL; optional->inputShape = NULL; optional->inputMasks = NULL; optional->deviceCursors = NULL; parentOptional = FindWindowWithOptional(pWin)->optional; optional->visual = parentOptional->visual; if (!pWin->cursorIsNone) { optional->cursor = RefCursor(parentOptional->cursor); } else { optional->cursor = None; } optional->colormap = parentOptional->colormap; pWin->optional = optional; return TRUE; } /* * Changes the cursor struct for the given device and the given window. * A cursor that does not have a device cursor set will use whatever the * standard cursor is for the window. If all devices have a cursor set, * changing the window cursor (e.g. using XDefineCursor()) will not have any * visible effect. Only when one of the device cursors is set to None again, * this device's cursor will display the changed standard cursor. * * CursorIsNone of the window struct is NOT modified if you set a device * cursor. * * Assumption: If there is a node for a device in the list, the device has a * cursor. If the cursor is set to None, it is inherited by the parent. */ int ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) { DevCursNodePtr pNode, pPrev; CursorPtr pOldCursor = NULL; ScreenPtr pScreen; WindowPtr pChild; if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; /* 1) Check if window has device cursor set * Yes: 1.1) swap cursor with given cursor if parent does not have same * cursor, free old cursor * 1.2) free old cursor, use parent cursor * No: 1.1) add node to beginning of list. * 1.2) add cursor to node if parent does not have same cursor * 1.3) use parent cursor if parent does not have same cursor * 2) Patch up children if child has a devcursor * 2.1) if child has cursor None, it inherited from parent, set to old * cursor * 2.2) if child has same cursor as new cursor, remove and set to None */ pScreen = pWin->drawable.pScreen; if (WindowSeekDeviceCursor(pWin, pDev, &pNode, &pPrev)) { /* has device cursor */ if (pNode->cursor == pCursor) return Success; pOldCursor = pNode->cursor; if (!pCursor) { /* remove from list */ if (pPrev) pPrev->next = pNode->next; else /* first item in list */ pWin->optional->deviceCursors = pNode->next; free(pNode); goto out; } } else { /* no device cursor yet */ DevCursNodePtr pNewNode; if (!pCursor) return Success; pNewNode = malloc(sizeof(DevCursNodeRec)); pNewNode->dev = pDev; pNewNode->next = pWin->optional->deviceCursors; pWin->optional->deviceCursors = pNewNode; pNode = pNewNode; } if (pCursor && WindowParentHasDeviceCursor(pWin, pDev, pCursor)) pNode->cursor = None; else { pNode->cursor = RefCursor(pCursor); } pNode = pPrev = NULL; /* fix up children */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (WindowSeekDeviceCursor(pChild, pDev, &pNode, &pPrev)) { if (pNode->cursor == None) { /* inherited from parent */ pNode->cursor = RefCursor(pOldCursor); } else if (pNode->cursor == pCursor) { pNode->cursor = None; FreeCursor(pCursor, (Cursor) 0); /* fix up refcnt */ } } } out: CursorVisible = TRUE; if (pWin->realized) WindowHasNewCursor(pWin); if (pOldCursor) FreeCursor(pOldCursor, (Cursor) 0); /* FIXME: We SHOULD check for an error value here XXX (comment taken from ChangeWindowAttributes) */ (*pScreen->ChangeWindowAttributes) (pWin, CWCursor); return Success; } /* Get device cursor for given device or None if none is set */ CursorPtr WindowGetDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev) { DevCursorList pList; if (!pWin->optional || !pWin->optional->deviceCursors) return NULL; pList = pWin->optional->deviceCursors; while (pList) { if (pList->dev == pDev) { if (pList->cursor == None) /* inherited from parent */ return WindowGetDeviceCursor(pWin->parent, pDev); else return pList->cursor; } pList = pList->next; } return NULL; } /* Searches for a DevCursorNode for the given window and device. If one is * found, return True and set pNode and pPrev to the node and to the node * before the node respectively. Otherwise return False. * If the device is the first in list, pPrev is set to NULL. */ static Bool WindowSeekDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, DevCursNodePtr * pNode, DevCursNodePtr * pPrev) { DevCursorList pList; if (!pWin->optional) return FALSE; pList = pWin->optional->deviceCursors; if (pList && pList->dev == pDev) { *pNode = pList; *pPrev = NULL; return TRUE; } while (pList) { if (pList->next) { if (pList->next->dev == pDev) { *pNode = pList->next; *pPrev = pList; return TRUE; } } pList = pList->next; } return FALSE; } /* Return True if a parent has the same device cursor set or False if * otherwise */ static Bool WindowParentHasDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor) { WindowPtr pParent; DevCursNodePtr pParentNode, pParentPrev; pParent = pWin->parent; while (pParent) { if (WindowSeekDeviceCursor(pParent, pDev, &pParentNode, &pParentPrev)) { /* if there is a node in the list, the win has a dev cursor */ if (!pParentNode->cursor) /* inherited. */ pParent = pParent->parent; else if (pParentNode->cursor == pCursor) /* inherit */ return TRUE; else /* different cursor */ return FALSE; } else /* parent does not have a device cursor for our device */ return FALSE; } return FALSE; } /* * SetRootClip -- * Enable or disable rendering to the screen by * setting the root clip list and revalidating * all of the windows */ void SetRootClip(ScreenPtr pScreen, int enable) { WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable; Bool anyMarked = FALSE; WindowPtr pLayerWin; BoxRec box; enum RootClipMode mode = enable; if (!pWin) return; WasViewable = (Bool) (pWin->viewable); if (WasViewable) { for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { (void) (*pScreen->MarkOverlappedWindows) (pChild, pChild, &pLayerWin); } (*pScreen->MarkWindow) (pWin); anyMarked = TRUE; if (pWin->valdata) { if (HasBorder(pWin)) { RegionPtr borderVisible; borderVisible = RegionCreate(NullBox, 1); RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } pWin->valdata->before.resized = TRUE; } } if (mode != ROOT_CLIP_NONE) { pWin->drawable.width = pScreen->width; pWin->drawable.height = pScreen->height; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; RegionInit(&pWin->winSize, &box, 1); RegionInit(&pWin->borderSize, &box, 1); /* * Use REGION_BREAK to avoid optimizations in ValidateTree * that assume the root borderClip can't change well, normally * it doesn't...) */ RegionBreak(&pWin->clipList); /* For INPUT_ONLY, empty the borderClip so no rendering will ever * be attempted to the screen pixmap (only redirected windows), * but we keep borderSize as full regardless. */ if (WasViewable && mode == ROOT_CLIP_FULL) RegionReset(&pWin->borderClip, &box); else RegionEmpty(&pWin->borderClip); } else { RegionEmpty(&pWin->borderClip); RegionBreak(&pWin->clipList); } ResizeChildrenWinSize(pWin, 0, 0, 0, 0); if (WasViewable) { if (pWin->firstChild) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild, pWin->firstChild, NULL); } else { (*pScreen->MarkWindow) (pWin); anyMarked = TRUE; } if (anyMarked) { (*pScreen->ValidateTree) (pWin, NullWindow, VTOther); (*pScreen->HandleExposures) (pWin); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pWin, NullWindow, VTOther); } } if (pWin->realized) WindowsRestructured(); FlushAllOutput(); } VisualPtr WindowGetVisual(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; VisualID vid = wVisual(pWin); int i; for (i = 0; i < pScreen->numVisuals; i++) if (pScreen->visuals[i].vid == vid) return &pScreen->visuals[i]; return 0; } xorg-server-21.1.16/dix/stubmain.c0000644000175000017500000000263314757411105012411 /*********************************************************** Copyright 2012 Jon TURNEY 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. ******************************************************************/ int dix_main(int argc, char *argv[], char *envp[]); /* A default implementation of main, which can be overridden by the DDX */ int main(int argc, char *argv[], char *envp[]) { return dix_main(argc, argv, envp); } xorg-server-21.1.16/dix/buildatoms0000644000175000017500000000232214757411105012504 #!/bin/sh hfile=../../../include/Xatom.h cfile=initatoms.c rm -f $hfile $cfile umask 222 awk ' BEGIN { hfile = "'$hfile'"; cfile = "'$cfile'"; hformat = "#define XA_%s ((Atom) %d)\n"; printf("#ifndef XATOM_H\n") > hfile; printf("#define XATOM_H 1\n\n") > hfile; printf("/* THIS IS A GENERATED FILE\n") > hfile; printf(" *\n") > hfile; printf(" * Do not change! Changing this file implies a protocol change!\n") > hfile; printf(" */\n\n") > hfile; printf("/* THIS IS A GENERATED FILE\n") > cfile; printf(" *\n") > cfile; printf(" * Do not change! Changing this file implies a protocol change!\n") > cfile; printf(" */\n\n") > cfile; printf("#include \"X.h\"\n") > cfile; printf("#include \"Xatom.h\"\n") > cfile; printf("#include \"misc.h\"\n") > cfile; printf("#include \"dix.h\"\n") > cfile; printf("void MakePredeclaredAtoms()\n") > cfile; printf("{\n") > cfile; } NF == 2 && $2 == "@" { printf(hformat, $1, ++atomno) > hfile ; printf(" if (MakeAtom(\"%s\", %d, 1) != XA_%s) AtomError();\n", $1, length($1), $1) > cfile ; } END { printf("\n") > hfile; printf(hformat, "LAST_PREDEFINED", atomno) > hfile ; printf("#endif /* XATOM_H */\n") > hfile; printf("}\n") > cfile ; } ' BuiltInAtoms exit 0 xorg-server-21.1.16/dix/BuiltInAtoms0000644000175000017500000002452314757411105012722 File: .../x11/server/dix/BuiltInAtoms This file is of a fixed format and is used to generate both the file include/XAtom.h and dix/initatoms.c. Neither of those files should be edited directly. Changing the atoms in this file, or even the order in which they occur, is equivalent to forcing a new (minor) version number on the server. Take care. The format of the file is that each built in atom starts in column 1 with no text, other than spaces and tabs, on that line other than a mandatory trailing "@" at the end of the line. For each atom (Foo) below the defines will be of the form #define XA_Foo and the string value of the atom will be "Foo". The comment lines in this file are not guaranteed to be accurate. To see the current truth, look at the Xlib documentation as well as the protocol spec. Atoms occur in five distinct name spaces within the protocol. Any particular atom may or may not have some client interpretation within each of the name spaces. For each of the built in atoms, the intended semantics and the space within which it is defined is indicated. Those name spaces are Property names Property types Selections Font properties Type of a ClientMessage event (none built into server) For the font properties mentioned here, see the spec for more information. -- Selections -- PRIMARY @ Selection. SECONDARY @ Selection. -- Property types and names -- ARC @ Property type: x, y: INT16 width, height: CARD16, angle1, angle2: INT16 ATOM @ Property type: atom: ATOM BITMAP @ Property type: bitmap: PIXMAP This is asserted to be of depth 1. CARDINAL @ Property type: card: CARD32 or CARD16 or CARD8 the datum size is dependent on the property format COLORMAP @ Property type: colormap: COLORMAP CURSOR @ Property type: cursor: CURSOR CUT_BUFFER0 @ CUT_BUFFER1 @ CUT_BUFFER2 @ CUT_BUFFER3 @ CUT_BUFFER4 @ CUT_BUFFER5 @ CUT_BUFFER6 @ CUT_BUFFER7 @ Property name: (type: STRING) Used to implement cut buffer ring, in particular Andrew uses this mechanism. Anyone else using this sort of IPC mechanism should use these properties. Data is normally fetched and stored out of CUT_BUFFER0; the RotateProperties request is used to rotate these buffers. DRAWABLE @ Property type: drawable: DRAWABLE FONT @ Property type: font: FONT INTEGER @ Property type: card: INT32 or INT16 or INT8 the datum size is dependent on the property format PIXMAP @ Property type: pixmap: PIXMAP POINT @ Property type: x, y: INT16 RECTANGLE @ Property type: x, y: INT16 width, height: CARD16 RESOURCE_MANAGER @ Property name: (type: STRING) Contents of the user's resource manager data base. RGB_COLOR_MAP @ Property type: colormap: COLORMAP red-max: CARD32 red-mult: CARD32 green-max: CARD32 green-mult: CARD32 blue-max: CARD32 blue-mult: CARD32 base-pixel: CARD32 The fields `red_max', `green_max', and `blue_max' give the maximum red, green, and blue values, respectively. Each color coefficient ranges from 0 to its max, inclusive. For example, a common colormap allocation is 3/3/2: 3 planes for red, 3 planes for green, and 2 planes for blue. Such a colormap would have red_max == 7, green_max = 7, and blue_max = 3. An alternate allocation that uses only 216 colors is red_max = 5, green_max = 5, and blue_max = 5. The fields `red_mult', `green_mult', and `blue_mult' give the scale factors used to compose a full pixel value. (See next paragraph.) For a 3/3/2 allocation red_mult might be 32, green_mult might be 4, and blue_mult might be 1. For a 6-colors-each allocation, red_mult might be 36, green_mult might be 6, and blue_mult might be 1. The field `base_pixel' gives the base pixel value used to compose a full pixel value. Normally base_pixel is obtained from a call to XAllocColorPlanes(). Given integer red, green, and blue coefficients in their appropriate ranges, one can compute a corresponding pixel value with the expression: r * red_mult + g * green_mult + b * blue_mult + base_pixel For gray-scale colormaps, only the colormap, red_max, red_mult, and base_pixel fields are defined; the other fields are ignored. To compute a gray-scale pixel value, use: gray * red_mult + base_pixel This is provided to allow applications to share color maps. RGB_BEST_MAP @ RGB_BLUE_MAP @ RGB_DEFAULT_MAP @ RGB_GRAY_MAP @ RGB_GREEN_MAP @ RGB_RED_MAP @ Property name: (type: RGB_COLOR_MAP) The needs of most applications can be met with five colormaps. Polite applications may need only a small RGB space, and can use a portion of the default color map. Applications doing high-quality RGB rendering will need an entire colormap, filled with as large an RGB space as possible, e.g. 332. For color separations, an application may need maximum device resolution for each of red, green, and blue, even if this requires three renderings with three colormaps. Each of the above five names would be used for sharing color maps. STRING @ Property type: sequence of Bytes VISUALID @ Property type: visual: VISUALID WINDOW @ Property type: window: WINDOW WM_COMMAND @ Property name: (type: STRING) Command line arguments used to invoke this application. The arguments are delimited by null characters (ASCII 0). WM_HINTS @ Property type: flags: CARD32 input: BOOL32 initial-state: CARD32 icon-pixmap: PIXMAP icon-window: WINDOW icon_mask: BITMAP icon-x, icon-y: INT32 flags contains the following bits 0x00000001 input hint 0x00000002 state hint 0x00000004 icon pixmap hint 0x00000008 icon window hint 0x00000010 icon position hint values for initial-state 0 unspecified -> application does not care and WM should pick one. 1 normal 2 zoomed 3 iconic 4 inactive -> application believes itself to be seldomly used. WM may wish to place it on an inactive menu. This type is potentially extensible. The order is critical; append to the end only. Property name: (type: WM_HINTS) Additional hints set by the client for use by the window manager. WM_CLIENT_MACHINE @ Property name: (type: STRING) used to communicate with the window manager. The host name of the machine the client is running on may be set here. WM_ICON_NAME @ Property name: (type: STRING) what the application would like the label to be for the iconic form of the window. WM_ICON_SIZE @ Property type: minWidth, min-height: CARD32 maxWidth, max-height: CARD32 widthInc, height-inc: CARD32 Property name: (type: ICON_SIZE) The window manager may set this property on the root window to specify the icon sizes it allows. WM_NAME @ Property name: (type: STRING) used to communicate with the window manager. This is what the application would like the label for the window. WM_NORMAL_HINTS @ Property name: (type: SIZE_HINTS) used to communicate with the window manager. This is size hints for a window in its "normal" state. WM_SIZE_HINTS @ Property type: flags: CARD32 x, y: INT32 width, height: CARD32 min-width, min-height: CARD32 max-width, max-height: CARD32 width-inc, height-inc: CARD32 min-aspect-x, min-aspect-y: CARD32 max-aspect-x, max-aspect-y: CARD32 flags contains the following bits 0x00000001 user specified x and y 0x00000002 user specified width and height 0x00000004 program specified position 0x00000008 program specified size 0x00000010 program specified minimum size 0x00000020 program specified maximum size 0x00000040 program specified resize increment 0x00000080 program specified aspect ratio This type is potentially extensible. The order is critical; append to the end only. WM_ZOOM_HINTS @ Property name: (type: SIZE_HINTS) used to communicate with the window manager. This is size hints for a window in its "zoomed" state. -- Font properties -- MIN_SPACE @ Font property: CARD32 NORM_SPACE @ Font property: CARD32 MAX_SPACE @ Font property: CARD32 END_SPACE @ Font property: CARD32 SUPERSCRIPT_X @ Font property: INT32 SUPERSCRIPT_Y @ Font property: INT32 SUBSCRIPT_X @ Font property: INT32 SUBSCRIPT_Y @ Font property: INT32 UNDERLINE_POSITION @ Font property: INT32 UNDERLINE_THICKNESS @ Font property: CARD32 STRIKEOUT_ASCENT @ Font property: INT32 STRIKEOUT_DESCENT @ Font property: INT32 ITALIC_ANGLE @ Font property: INT32 X_HEIGHT @ Font property: INT32 QUAD_WIDTH @ Font property: INT32 WEIGHT @ Font property: CARD32 POINT_SIZE @ Font property: CARD32 RESOLUTION @ Font property: CARD32 The following optional properties on fonts have values that are atoms. The atom print name is the useful information. COPYRIGHT @ of the font distribution NOTICE @ trademark/copyright of the character shapes FONT_NAME @ name of this particular instance of a font FAMILY_NAME @ name of the 'font family' to which it belongs FULL_NAME @ full text name of the font The following aren't in order but putting them at the end avoids encoding changes. CAP_HEIGHT @ Font property: CARD32 WM_CLASS @ Property name: (type: STRING) Used (possibly by some window managers; definitely by session managers) to look up resources in the resource data base on behalf of the client who set this property. There are 2 elements: {char *resource_name; char *resource_class;} delimited by a null character (ascii 0) WM_TRANSIENT_FOR @ Property name: (type: WINDOW) Used by transient top-level windows, such as dialog boxes, to point to their logical "parents". The window manager can then take down the dialog boxes when the "parent" gets iconified, for instance. xorg-server-21.1.16/doc/0000755000175000017500000000000014757411132010460 5xorg-server-21.1.16/doc/dtrace/0000755000175000017500000000000014757411132011722 5xorg-server-21.1.16/doc/dtrace/meson.build0000644000175000017500000000510314757411105014003 if build_docs basename = 'Xserver-DTrace' input_xml = basename + '.xml' custom_target( basename + '.html', output: basename + '.html', input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'), '--stringparam', 'target.database.document=' + join_paths(doc_sgml_path, 'X11/dbs/masterdb.html.xml'), '--stringparam', 'current.docid=' + basename, '-o', meson.current_build_dir(), 'xhtml-nochunks', '@INPUT0@'], build_by_default: true, install: true, install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'), ) if build_docs_pdf foreach format : ['ps', 'pdf'] output_fn = basename + '.' + format custom_target( output_fn, output: output_fn, input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'), '--stringparam', 'img.src.path=' + meson.current_build_dir(), '--stringparam', 'target.database.document=' + join_paths(doc_sgml_path, 'X11/dbs/masterdb.pdf.xml'), '--stringparam', 'current.docid=' + basename, '-o', meson.current_build_dir(), '--with-fop', format, '@INPUT0@'], build_by_default: true, install: true, install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'), ) endforeach endif foreach format_data : [['html', 'xorg-xhtml.xsl'], ['pdf', 'xorg-fo.xsl']] format = format_data[0] stylesheet = format_data[1] output_fn = basename + '.' + format + '.db' custom_target( output_fn, output: output_fn, input: [input_xml], command: [xsltproc] + docs_xslt_search_flags + [ '--stringparam', 'targets.filename', output_fn, '--stringparam', 'collect.xref.targets', 'only', '--stringparam', 'olink.base.uri', basename + '.' + format, '--nonet', '--output', join_paths(meson.current_build_dir(), output_fn), '--xinclude', join_paths(doc_stylesheet_srcdir, stylesheet), '@INPUT0@'], build_by_default: true, install: true, install_dir: join_paths(get_option('datadir'), 'doc/xorg-server'), ) endforeach endif xorg-server-21.1.16/doc/dtrace/Makefile.am0000644000175000017500000000053714757411105013703 if ENABLE_DOCS if XSERVER_DTRACE # Main DocBook/XML files (DOCTYPE book) docbook = Xserver-DTrace.xml # The location where the DocBook/XML files and their generated formats are installed shelfdir = $(docdir) # Generate DocBook/XML output formats with or without stylesheets include $(top_srcdir)/docbook.am endif XSERVER_DTRACE endif ENABLE_DOCS xorg-server-21.1.16/doc/dtrace/Xserver-DTrace.xml0000644000175000017500000006073214757411105015172 %defs; ]>
Xserver Provider for DTrace AlanCoopersmith Oracle Corporation Solaris Engineering X Server Version &xserver.version; 20052006200720102020 Oracle and/or its affiliates. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. Introduction This page provides details on a statically defined user application tracing provider for the DTrace facility in Solaris 10, MacOS X 10.5, and later releases. This provider instruments various points in the X server, to allow tracing what client applications are up to. DTrace probes may be used with SystemTap on GNU/Linux systems. The provider was integrated into the X.Org code base with Solaris 10 & OpenSolaris support for the Xserver 1.4 release, released in 2007 with X11R7.3. Support for DTrace on MacOS X was added in Xserver 1.7. These probes expose the request and reply structure of the X protocol between clients and the X server, so an understanding of that basic nature will aid in learning how to use these probes. Available probes Due to the way User-Defined DTrace probes work, arguments to these probes all bear undistinguished names of arg0, arg1, arg2, etc. These tables should help you determine what the real data is for each of the probe arguments. Probes and their arguments Probe name Description arg0 arg1 arg2 arg3 arg4 arg5 arg6 Request Probes request-start Called just before processing each client request. requestName requestCode requestLength clientId requestBuffer request-done Called just after processing each client request. requestName requestCode sequenceNumber clientId resultCode Event Probes send-event Called just before send each event to a client. clientId eventCode eventBuffer Client Connection Probes client-connect Called when a new connection is opened from a client clientId clientFD client-auth Called when client authenticates (normally just after connection opened) clientId clientAddr clientPid clientZoneId client-disconnect Called when a client connection is closed clientId Resource Allocation Probes resource-alloc Called when a new resource (pixmap, gc, colormap, etc.) is allocated resourceId resourceTypeId resourceValue resourceTypeName resource-free Called when a resource is freed resourceId resourceTypeId resourceValue resourceTypeName Input API probes input-event Called when an input event was submitted for processing deviceid eventtype button or keycode or touchid flags nvalues mask values
Data Available in Probe Arguments To access data in arguments of type string, you will need to use copyinstr(). To access data buffers referenced via uintptr_t's, you will need to use copyin(). Probe Arguments Argument name Type Description clientAddr string String representing address client connected from clientFD int X server's file descriptor for server side of each connection clientId int Unique integer identifier for each connection to the X server clientPid pid_t Process id of client, if connection is local (from getpeerucred()) clientZoneId zoneid_t Solaris: Zone id of client, if connection is local (from getpeerucred()) eventBuffer uintptr_t Pointer to buffer containing X event - decode using structures in <X11/Xproto.h> and similar headers for each extension eventCode uint8_t Event number of X event resourceId uint32_t X resource id (XID) resourceTypeId uint32_t Resource type id resourceTypeName string String representing X resource type ("PIXMAP", etc.) resourceValue uintptr_t Pointer to data for X resource resultCode int Integer code representing result status of request requestBuffer uintptr_t Pointer to buffer containing X request - decode using structures in <X11/Xproto.h> and similar headers for each extension requestCode uint8_t Request number of X request or Extension requestName string Name of X request or Extension requestLength uint16_t Length of X request sequenceNumber uint32_t Number of X request in in this connection deviceid int The device's numerical ID eventtype int Protocol event type button, keycode, touchid uint32_t The button number, keycode or touch ID flags uint32_t Miscellaneous event-specific server flags nvalues int8_t Number of bits in mask and number of elements in values mask uint8_t* Binary mask indicating which indices in values contain valid data values double* Valuator values. Values for indices for which the mask is not set are undefined
Examples Counting requests by request name This script simply increments a counter for each different request made, and when you exit the script (such as by hitting ControlC ) prints the counts. #!/usr/sbin/dtrace -s Xserver*:::request-start { @counts[copyinstr(arg0)] = count(); } The output from a short run may appear as: QueryPointer 1 CreatePixmap 2 FreePixmap 2 PutImage 2 ChangeGC 10 CopyArea 10 CreateGC 14 FreeGC 14 RENDER 28 SetClipRectangles 40 This can be rewritten slightly to cache the string containing the name of the request since it will be reused many times, instead of copying it over and over from the kernel: #!/usr/sbin/dtrace -s string Xrequest[uintptr_t]; Xserver*:::request-start /Xrequest[arg0] == ""/ { Xrequest[arg0] = copyinstr(arg0); } Xserver*:::request-start { @counts[Xrequest[arg0]] = count(); } Get average CPU time per request This script records the CPU time used between the probes at the start and end of each request and aggregates it per request type. #!/usr/sbin/dtrace -s Xserver*:::request-start { reqstart = vtimestamp; } Xserver*:::request-done { @times[copyinstr(arg0)] = avg(vtimestamp - reqstart); } The output from a sample run might look like: ChangeGC 889 MapWindow 907 SetClipRectangles 1319 PolyPoint 1413 PolySegment 1434 PolyRectangle 1828 FreeCursor 1895 FreeGC 1950 CreateGC 2244 FreePixmap 2246 GetInputFocus 2249 TranslateCoords 8508 QueryTree 8846 GetGeometry 9948 CreatePixmap 12111 AllowEvents 14090 GrabServer 14791 MIT-SCREEN-SAVER 16747 ConfigureWindow 22917 SetInputFocus 28521 PutImage 240841 Monitoring clients that connect and disconnect This script simply prints information about each client that connects or disconnects from the server while it is running. Since the provider is specified as Xserver$1 instead of Xserver* like previous examples, it won't monitor all Xserver processes running on the machine, but instead expects the process id of the X server to monitor to be specified as the argument to the script. #!/usr/sbin/dtrace -s Xserver$1:::client-connect { printf("** Client Connect: id %d\n", arg0); } Xserver$1:::client-auth { printf("** Client auth'ed: id %d => %s pid %d\n", arg0, copyinstr(arg1), arg2); } Xserver$1:::client-disconnect { printf("** Client Disconnect: id %d\n", arg0); } A sample run: # ./foo.d 5790 dtrace: script './foo.d' matched 4 probes CPU ID FUNCTION:NAME 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 65 2 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 64 0 15772 AuthAudit:client-auth ** Client auth'ed: id 64 => local host pid 2034 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 65 0 15772 AuthAudit:client-auth ** Client auth'ed: id 65 => local host pid 2034 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 Monitoring clients creating Pixmaps This script can be used to determine which clients are creating pixmaps in the X server, printing information about each client as it connects to help trace it back to the program on the other end of the X connection. #!/usr/sbin/dtrace -qs string Xrequest[uintptr_t]; string Xrestype[uintptr_t]; Xserver$1:::request-start /Xrequest[arg0] == ""/ { Xrequest[arg0] = copyinstr(arg0); } Xserver$1:::resource-alloc /arg3 != 0 && Xrestype[arg3] == ""/ { Xrestype[arg3] = copyinstr(arg3); } Xserver$1:::request-start /Xrequest[arg0] == "X_CreatePixmap"/ { printf("-> %s: client %d\n", Xrequest[arg0], arg3); } Xserver$1:::request-done /Xrequest[arg0] == "X_CreatePixmap"/ { printf("<- %s: client %d\n", Xrequest[arg0], arg3); } Xserver$1:::resource-alloc /Xrestype[arg3] == "PIXMAP"/ { printf("** Pixmap alloc: %08x\n", arg0); } Xserver$1:::resource-free /Xrestype[arg3] == "PIXMAP"/ { printf("** Pixmap free: %08x\n", arg0); } Xserver$1:::client-connect { printf("** Client Connect: id %d\n", arg0); } Xserver$1:::client-auth { printf("** Client auth'ed: id %d => %s pid %d\n", arg0, copyinstr(arg1), arg2); } Xserver$1:::client-disconnect { printf("** Client Disconnect: id %d\n", arg0); } Sample output from a run of this script: ** Client Connect: id 17 ** Client auth'ed: id 17 => local host pid 20273 -> X_CreatePixmap: client 17 ** Pixmap alloc: 02200009 <- X_CreatePixmap: client 17 -> X_CreatePixmap: client 15 ** Pixmap alloc: 01e00180 <- X_CreatePixmap: client 15 -> X_CreatePixmap: client 15 ** Pixmap alloc: 01e00181 <- X_CreatePixmap: client 15 -> X_CreatePixmap: client 14 ** Pixmap alloc: 01c004c8 <- X_CreatePixmap: client 14 ** Pixmap free: 02200009 ** Client Disconnect: id 17 ** Pixmap free: 01e00180 ** Pixmap free: 01e00181 Input API monitoring with SystemTap This script can be used to monitor events submitted by drivers to the server for enqueuing. Due to the integration of the input API probes, some server-enqueued events will show up too. # Compile+run with # stap -g xorg.stp /usr/bin/Xorg # function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{ int i; unsigned char *mask = (unsigned char*)THIS->mask_in; double *valuators = (double*)THIS->valuators_in; char str[128] = {0}; char *s = str; #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7))) s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators); for (i = 0; i < THIS->nvaluators; i++) { s += sprintf(s, " %d: ", i); if (BitIsSet(mask, i)) s += sprintf(s, "%d", (int)valuators[i]); } sprintf(THIS->__retvalue, "%s", str); %} probe process(@1).mark("input__event") { deviceid = $arg1 type = $arg2 detail = $arg3 flags = $arg4 nvaluators = $arg5 str = print_valuators(nvaluators, $arg6, $arg7) printf("Event: device %d type %d detail %d flags %#x %s\n", deviceid, type, detail, flags, str); } Sample output from a run of this script: Event: device 13 type 4 detail 1 flags 0x0 nval: 0 :: Event: device 13 type 6 detail 0 flags 0xa nval: 1 :: 0: 1 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -1 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 4 1: -3 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -3 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 3 1: -2 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 2 1: -2 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 Event: device 13 type 6 detail 0 flags 0xa nval: 2 :: 0: 1: -1 Event: device 13 type 5 detail 1 flags 0x0 nval: 0 ::
xorg-server-21.1.16/doc/dtrace/Makefile.in0000644000175000017500000007523514757411114013723 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Generate output formats for a single DocBook/XML with/without chapters # # Variables set by the calling Makefile: # shelfdir: the location where the docs/specs are installed. Typically $(docdir) # docbook: the main DocBook/XML file, no chapters, appendix or image files # chapters: all files pulled in by an XInclude statement and images. # # # This makefile is intended for Users Documentation and Functional Specifications. # Do not use for Developer Documentation which is not installed and does not require olink. # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 # for an explanation on documents classification. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_1 = $(docbook:.xml=.html) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_2 = $(docbook:.xml=.txt) @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@am__append_3 = $(docbook:.xml=.pdf) \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(docbook:.xml=.ps) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@am__append_4 = $(docbook:.xml=.html.db) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(docbook:.xml=.pdf.db) subdir = doc/dtrace ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_shelf_DATA_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_shelf_DATA_DIST = Xserver-DTrace.xml am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(shelfdir)" "$(DESTDIR)$(shelfdir)" DATA = $(dist_shelf_DATA) $(shelf_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/docbook.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Main DocBook/XML files (DOCTYPE book) @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@docbook = Xserver-DTrace.xml # The location where the DocBook/XML files and their generated formats are installed @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@shelfdir = $(docdir) # DocBook/XML generated output formats to be installed @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@shelf_DATA = $(am__append_1) \ @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_2) \ @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_3) \ @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@ $(am__append_4) # DocBook/XML file with chapters, appendix and images it includes @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@dist_shelf_DATA = $(docbook) $(chapters) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_SEARCHPATH_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --searchpath "$(abs_top_builddir)" @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_OLINK_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam current.docid="$(<:.xml=)" @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_HTML_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_SEARCHPATH_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_HTML_STYLESHEET_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_HTML_OLINK_FLAGS) @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_PDF_OLINK_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam current.docid="$(<:.xml=)" @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@XMLTO_FO_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_SEARCHPATH_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_FO_STYLESHEET_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_FO_IMAGEPATH_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(XMLTO_PDF_OLINK_FLAGS) # Generate documents cross-reference target databases @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_SEARCHPATH_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --path "$(XORG_SGML_PATH)/X11" \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --path "$(abs_top_builddir)" @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_OLINK_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam targets.filename "$@" \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam collect.xref.targets "only" \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --stringparam olink.base.uri "$(@:.db=)" @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_HTML_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_SEARCHPATH_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_OLINK_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --nonet --xinclude \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@XSLT_PDF_FLAGS = \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_SEARCHPATH_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(XSLT_OLINK_FLAGS) \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ --nonet --xinclude \ @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(STYLESHEET_SRCDIR)/xorg-fo.xsl @ENABLE_DOCS_TRUE@@XSERVER_DTRACE_TRUE@CLEANFILES = $(shelf_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/docbook.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/dtrace/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/dtrace/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/docbook.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_shelfDATA: $(dist_shelf_DATA) @$(NORMAL_INSTALL) @list='$(dist_shelf_DATA)'; test -n "$(shelfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(shelfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(shelfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(shelfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(shelfdir)" || exit $$?; \ done uninstall-dist_shelfDATA: @$(NORMAL_UNINSTALL) @list='$(dist_shelf_DATA)'; test -n "$(shelfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(shelfdir)'; $(am__uninstall_files_from_dir) install-shelfDATA: $(shelf_DATA) @$(NORMAL_INSTALL) @list='$(shelf_DATA)'; test -n "$(shelfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(shelfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(shelfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(shelfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(shelfdir)" || exit $$?; \ done uninstall-shelfDATA: @$(NORMAL_UNINSTALL) @list='$(shelf_DATA)'; test -n "$(shelfdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(shelfdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(shelfdir)" "$(DESTDIR)$(shelfdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_shelfDATA install-shelfDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_shelfDATA uninstall-shelfDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-dist_shelfDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-shelfDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-dist_shelfDATA uninstall-shelfDATA .PRECIOUS: Makefile @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.html: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.txt: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.pdf: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@%.ps: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@%.html.db: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@%.pdf.db: %.xml $(chapters) @ENABLE_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@@HAVE_XSLTPROC_TRUE@@XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< # Generate DocBook/XML output formats with or without stylesheets # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/doc/meson.build0000644000175000017500000000246214757411105012546 if build_docs_devel foreach basename : ['Xserver-spec', 'Xinput'] input_xml = basename + '.xml' custom_target( basename + '.html', output: basename + '.html', input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'), '-o', meson.current_build_dir(), 'xhtml-nochunks', '@INPUT0@'], build_by_default: true, install: false, ) if build_docs_pdf foreach format : ['ps', 'pdf'] output_fn = basename + '.' + format custom_target( output_fn, output: output_fn, input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'), '--stringparam', 'img.src.path=' + meson.current_build_dir(), '-o', meson.current_build_dir(), '--with-fop', format, '@INPUT0@'], build_by_default: true, install: false, ) endforeach endif endforeach endif subdir('dtrace') xorg-server-21.1.16/doc/Makefile.am0000644000175000017500000000047314757411105012440 SUBDIRS = dtrace if ENABLE_DEVEL_DOCS if HAVE_XMLTO # Main DocBook/XML files (DOCTYPE book) docbook = Xserver-spec.xml Xinput.xml # Generate DocBook/XML output formats with or without stylesheets include $(top_srcdir)/devbook.am endif HAVE_XMLTO endif ENABLE_DEVEL_DOCS EXTRA_DIST = smartsched filter-xmlto.sh xorg-server-21.1.16/doc/Xserver-spec.xml0000644000175000017500000065155014757411105013524 %xorg-defs; %defs; ]>
Definition of the Porting Layer for the X v11 Sample Server X Porting Layer SusanAngebranndt Digital Equipment Corporation RaymondDrewry Digital Equipment Corporation PhilipKarlton Digital Equipment Corporation ToddNewman Digital Equipment Corporation BobScheifler Massachusetts Institute of Technology KeithPackard MIT X Consortium DavidP.Wiggins X Consortium JimGettys X.org Foundation and Hewlett Packard The X.Org Foundation X Version 11, Release &fullrelvers; X Server Version &xserver.version; 1994X Consortium, Inc. 2004X.org Foundation, Inc. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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. LK201 and DEC are trademarks of Digital Equipment Corporation. Macintosh and Apple are trademarks of Apple Computer, Inc. PostScript is a trademark of Adobe Systems, Inc. Ethernet is a trademark of Xerox Corporation. X Window System is a trademark of the X.org Foundation, Inc. Cray is a trademark of Cray Research, Inc. &xserver.reldate; 1.0 27 Oct 2004 sa Initial Version 1.1 27 Oct 2004 bs Minor Revisions 2.0 27 Oct 2004 kp Revised for Release 4 and 5 3.0 27 Oct 2004 dpw Revised for Release 6 3.1 27 Oct 2004 jg Revised for Release 6.8.2 3.2 17 Dec 2006 efw DocBook conversion 3.3 17 Feb 2008 aj Revised for backing store changes 3.4 31 Mar 2008 efw Revised for devPrivates changes 3.5 July 2010 ac Revised for Xorg 1.9 devPrivates changes and 1.8 CreateNewResourceType changes 3.6 July 2012 kp Revised for X server 1.13 screen-specific devPrivates changes The following document explains the structure of the X Window System display server and the interfaces among the larger pieces. It is intended as a reference for programmers who are implementing an X Display Server on their workstation hardware. It is included with the X Window System source tape, along with the document "Strategies for Porting the X v11 Sample Server." The order in which you should read these documents is: Read the first section of the "Strategies for Porting" document (Overview of Porting Process). Skim over this document (the Definition document). Skim over the remainder of the Strategies document. Start planning and working, referring to the Strategies and Definition documents. You may also want to look at the following documents: "The X Window System" for an overview of X. "Xlib - C Language X Interface" for a view of what the client programmer sees. "X Window System Protocol" for a terse description of the byte stream protocol between the client and server. To understand this document and the accompanying source code, you should know the C language. You should be familiar with 2D graphics and windowing concepts such as clipping, bitmaps, fonts, etc. You should have a general knowledge of the X Window System. To implement the server code on your hardware, you need to know a lot about your hardware, its graphic display device(s), and (possibly) its networking and multitasking facilities. This document depends a lot on the source code, so you should have a listing of the code handy. Some source in the distribution is directly compilable on your machine. Some of it will require modification. Other parts may have to be completely written from scratch. The distribution also includes source for a sample implementation of a display server which runs on a very wide variety of color and monochrome displays on Linux and *BSD which you will find useful for implementing any type of X server. Note to the 2008 edition: at this time this document must be considered incomplete, though improved over the 2004 edition. In particular, the new Render extension is still lacking good documentation, and has become vital to high performance X implementations. Modern applications and desktop environments are now much more sensitive to good implementation of the Render extension than in most operations of the old X graphics model. The shadow frame buffer implementation is also very useful in many circumstances, and also needs documentation. We hope to rectify these shortcomings in our documentation in the future. Help would be greatly appreciated.
The X Window System The X Window System, or simply "X," is a windowing system that provides high-performance, high-level, device-independent graphics. X is a windowing system designed for bitmapped graphic displays. The display can have a simple, monochrome display or it can have a color display with up to 32 bits per pixel with a special graphics processor doing the work. (In this document, monochrome means a black and white display with one bit per pixel. Even though the usual meaning of monochrome is more general, this special case is so common that we decided to reserve the word for this purpose.) In practice, monochrome displays are now almost unheard of, with 4 bit gray scale displays being the low end. X is designed for a networking environment where users can run applications on machines other than their own workstations. Sometimes, the connection is over an Ethernet network with a protocol such as TCP/IP; but, any "reliable" byte stream is allowable. A high-bandwidth byte stream is preferable; RS-232 at 9600 baud would be slow without compression techniques. X by itself allows great freedom of design. For instance, it does not include any user interface standard. Its intent is to "provide mechanism, not policy." By making it general, it can be the foundation for a wide variety of interactive software. For a more detailed overview, see the document "The X Window System." For details on the byte stream protocol, see "X Window System protocol."
Overview of the Server The display server manages windows and simple graphics requests for the user on behalf of different client applications. The client applications can be running on any machine on the network. The server mainly does three things: Responds to protocol requests from existing clients (mostly graphic and text drawing commands) Sends device input (keystrokes and mouse actions) and other events to existing clients Maintains client connections The server code is organized into four major pieces: Device Independent (DIX) layer - code shared among all implementations Operating System (OS) layer - code that is different for each operating system but is shared among all graphic devices for this operating system Device Dependent (DDX) layer - code that is (potentially) different for each combination of operating system and graphic device Extension Interface - a standard way to add features to the X server The "porting layer" consists of the OS and DDX layers; these are actually parallel and neither one is on top of the other. The DIX layer is intended to be portable without change to target systems and is not detailed here, although several routines in DIX that are called by DDX are documented. Extensions incorporate new functionality into the server; and require additional functionality over a simple DDX. The following sections outline the functions of the layers. Section 3 briefly tells what you need to know about the DIX layer. The OS layer is explained in Section 4. Section 5 gives the theory of operation and procedural interface for the DDX layer. Section 6 describes the functions which exist for the extension writer.
DIX Layer The DIX layer is the machine and device independent part of X. The source should be common to all operating systems and devices. The port process should not include changes to this part, therefore internal interfaces to DIX modules are not discussed, except for public interfaces to the DDX and the OS layers. The functions described in this section are available for extension writers to use. In the process of getting your server to work, if you think that DIX must be modified for purposes other than bug fixes, you may be doing something wrong. Keep looking for a more compatible solution. When the next release of the X server code is available, you should be able to just drop in the new DIX code and compile it. If you change DIX, you will have to remember what changes you made and will have to change the new sources before you can update to the new version. The heart of the DIX code is a loop called the dispatch loop. Each time the processor goes around the loop, it sends off accumulated input events from the input devices to the clients, and it processes requests from the clients. This loop is the most organized way for the server to process the asynchronous requests that it needs to process. Most of these operations are performed by OS and DDX routines that you must supply.
Server Resource System X resources are C structs inside the server. Client applications create and manipulate these objects according to the rules of the X byte stream protocol. Client applications refer to resources with resource IDs, which are 32-bit integers that are sent over the network. Within the server, of course, they are just C structs, and we refer to them by pointers.
Pre-Defined Resource Types The DDX layer has several kinds of resources: Window Pixmap Screen Device Colormap Font Cursor Graphics Contexts The type names of the more important server structs usually end in "Rec," such as "DeviceRec;" the pointer types usually end in "Ptr," such as "DevicePtr." The structs and important defined constants are declared in .h files that have names that suggest the name of the object. For instance, there are two .h files for windows, window.h and windowstr.h. window.h defines only what needs to be defined in order to use windows without peeking inside of them; windowstr.h defines the structs with all of their components in great detail for those who need it. Three kinds of fields are in these structs: Attribute fields - struct fields that contain values like normal structs Pointers to procedures, or structures of procedures, that operate on the object A single private field or a devPrivates list (see ) used by your DDX code to store private data. DIX calls through the struct's procedure pointers to do its tasks. These procedures are set either directly or indirectly by DDX procedures. Most of the procedures described in the remainder of this document are accessed through one of these structs. For example, the procedure to create a pixmap is attached to a ScreenRec and might be called by using the expression
(* pScreen->CreatePixmap)(pScreen, width, height, depth).
All procedure pointers must be set to some routine unless noted otherwise; a null pointer will have unfortunate consequences. Procedure routines will be indicated in the documentation by this convention:
void pScreen->MyScreenRoutine(arg, arg, ...)
as opposed to a free routine, not in a data structure:
void MyFreeRoutine(arg, arg, ...)
The attribute fields are mostly set by DIX; DDX should not modify them unless noted otherwise.
Creating Resources and Resource Types These functions should also be called from your extensionInitProc to allocate all of the various resource classes and types required for the extension. Each time the server resets, these types must be reallocated as the old allocations will have been discarded. Resource types are integer values starting at 1. Get a resource type by calling
RESTYPE CreateNewResourceType(deleteFunc, char *name)
deleteFunc will be called to destroy all resources with this type. name will be used to identify this type of resource to clients using the X-Resource extension, to security extensions such as SELinux, and to tracing frameworks such as DTrace. [The name argument was added in xorg-server 1.8.]
Resource classes are masks starting at 1 << 31 which can be or'ed with any resource type to provide attributes for the type. To allocate a new class bit, call
RESTYPE CreateNewResourceClass()
There are two ways of looking up resources, by type or by class. Classes are non-exclusive subsets of the space of all resources, so you can lookup the union of multiple classes. (RC_ANY is the union of all classes). Note that the appropriate class bits must be or'ed into the value returned by CreateNewResourceType when calling resource lookup functions. If you need to create a ``private'' resource ID for internal use, you can call FakeClientID.
XID FakeClientID(client) int client;
This allocates from ID space reserved for the server.
To associate a resource value with an ID, use AddResource.
Bool AddResource(id, type, value) XID id; RESTYPE type; pointer value;
The type should be the full type of the resource, including any class bits. If AddResource fails to allocate memory to store the resource, it will call the deleteFunc for the type, and then return False.
To free a resource, use one of the following.
void FreeResource(id, skipDeleteFuncType) XID id; RESTYPE skipDeleteFuncType; void FreeResourceByType(id, type, skipFree) XID id; RESTYPE type; Bool skipFree;
FreeResource frees all resources matching the given id, regardless of type; the type's deleteFunc will be called on each matching resource, except that skipDeleteFuncType can be set to a single type for which the deleteFunc should not be called (otherwise pass RT_NONE). FreeResourceByType frees a specific resource matching a given id and type; if skipFree is true, then the deleteFunc is not called.
Looking Up Resources To look up a resource, use one of the following.
int dixLookupResourceByType( pointer *result, XID id, RESTYPE rtype, ClientPtr client, Mask access_mode); int dixLookupResourceByClass( pointer *result, XID id, RESTYPE rclass, ClientPtr client, Mask access_mode);
dixLookupResourceByType finds a resource with the given id and exact type. dixLookupResourceByClass finds a resource with the given id whose type is included in any one of the specified classes. The client and access_mode must be provided to allow security extensions to check if the client has the right privileges for the requested access. The bitmask values defined in the dixaccess.h header are or'ed together to define the requested access_mode.
Callback Manager To satisfy a growing number of requests for the introduction of ad hoc notification style hooks in the server, a generic callback manager was introduced in R6. A callback list object can be introduced for each new hook that is desired, and other modules in the server can register interest in the new callback list. The following functions support these operations. Before getting bogged down in the interface details, an typical usage example should establish the framework. Let's look at the ClientStateCallback in dix/dispatch.c. The purpose of this particular callback is to notify interested parties when a client's state (initial, running, gone) changes. The callback is "created" in this case by simply declaring a variable:
CallbackListPtr ClientStateCallback;
Whenever the client's state changes, the following code appears, which notifies all interested parties of the change:
if (ClientStateCallback) CallCallbacks(&ClientStateCallback, (pointer)client);
Interested parties subscribe to the ClientStateCallback list by saying:
AddCallback(&ClientStateCallback, func, data);
When CallCallbacks is invoked on the list, func will be called thusly:
(*func)(&ClientStateCallback, data, client)
Now for the details.
Bool AddCallback(pcbl, callback, subscriber_data) CallbackListPtr *pcbl; CallbackProcPtr callback; pointer subscriber_data;
Adds the (callback, subscriber_data) pair to the given callback list. Creates the callback list if it doesn't exist. Returns TRUE if successful.
Bool DeleteCallback(pcbl, callback, subscriber_data) CallbackListPtr *pcbl; CallbackProcPtr callback; pointer subscriber_data;
Removes the (callback, data) pair to the given callback list if present. Returns TRUE if (callback, data) was found.
void CallCallbacks(pcbl, call_data) CallbackListPtr *pcbl; pointer call_data;
For each callback currently registered on the given callback list, call it as follows:
(*callback)(pcbl, subscriber_data, call_data);
void DeleteCallbackList(pcbl) CallbackListPtr *pcbl;
Destroys the given callback list.
Extension Interfaces This function should be called from your extensionInitProc which should be called by InitExtensions.
ExtensionEntry *AddExtension(name, NumEvents,NumErrors, MainProc, SwappedMainProc, CloseDownProc, MinorOpcodeProc) const char *name; /*Null terminate string; case matters*/ int NumEvents; int NumErrors; int (* MainProc)(ClientPtr);/*Called if client matches server order*/ int (* SwappedMainProc)(ClientPtr);/*Called if client differs from server*/ void (* CloseDownProc)(ExtensionEntry *); unsigned short (*MinorOpcodeProc)(ClientPtr);
name is the name used by clients to refer to the extension. NumEvents is the number of event types used by the extension, NumErrors is the number of error codes needed by the extension. MainProc is called whenever a client accesses the major opcode assigned to the extension. SwappedMainProc is identical, except the client using the extension has reversed byte-sex. CloseDownProc is called at server reset time to deallocate any private storage used by the extension. MinorOpcodeProc is used by DIX to place the appropriate value into errors. The DIX routine StandardMinorOpcode can be used here which takes the minor opcode from the normal place in the request (i.e. just after the major opcode).
Macros and Other Helpers There are a number of macros in Xserver/include/dix.h which are useful to the extension writer. Ones of particular interest are: REQUEST, REQUEST_SIZE_MATCH, REQUEST_AT_LEAST_SIZE, REQUEST_FIXED_SIZE, LEGAL_NEW_RESOURCE, and VALIDATE_DRAWABLE_AND_GC. Useful byte swapping macros can be found in Xserver/include/dix.h: WriteReplyToClient and WriteSwappedDataToClient; and in Xserver/include/misc.h: bswap_64, bswap_32, bswap_16, LengthRestB, LengthRestS, LengthRestL, SwapRestS, SwapRestL, swapl, swaps, cpswapl, and cpswaps.
OS Layer This part of the source consists of a few routines that you have to rewrite for each operating system. These OS functions maintain the client connections and schedule work to be done for clients. They also provide an interface to font files, font name to file name translation, and low level memory management.
void OsInit()
OsInit initializes your OS code, performing whatever tasks need to be done. Frequently there is not much to be done. The sample server implementation is in Xserver/os/osinit.c.
Scheduling and Request Delivery The main dispatch loop in DIX creates the illusion of multitasking between different windows, while the server is itself but a single process. The dispatch loop breaks up the work for each client into small digestible parts. Some parts are requests from a client, such as individual graphic commands. Some parts are events delivered to the client, such as keystrokes from the user. The processing of events and requests for different clients can be interleaved with one another so true multitasking is not needed in the server. You must supply some of the pieces for proper scheduling between clients.
int WaitForSomething(pClientReady) int *pClientReady;
WaitForSomething is the scheduler procedure you must write that will suspend your server process until something needs to be done. This call should make the server suspend until one or more of the following occurs: There is an input event from the user or hardware (see SetInputCheck()) There are requests waiting from known clients, in which case you should return a count of clients stored in pClientReady A new client tries to connect, in which case you should create the client and then continue waiting Before WaitForSomething() computes the masks to pass to select, poll or similar operating system interface, it needs to see if there is anything to do on the work queue; if so, it must call a DIX routine called ProcessWorkQueue.
extern WorkQueuePtr workQueue; if (workQueue) ProcessWorkQueue ();
If WaitForSomething() decides it is about to do something that might block (in the sample server, before it calls select() or poll) it must call a DIX routine called BlockHandler().
void BlockHandler(void *pTimeout)
The types of the arguments are for agreement between the OS and DDX implementations, but the pTimeout is a pointer to the information determining how long the block is allowed to last.
In the sample server, pTimeout is a pointer. The DIX BlockHandler() iterates through the Screens, for each one calling its BlockHandler. A BlockHandler is declared thus:
void xxxBlockHandler(ScreenPtr pScreen, void *pTimeout)
The arguments are a pointer to the Screen, and the arguments to the DIX BlockHandler().
Immediately after WaitForSomething returns from the block, even if it didn't actually block, it must call the DIX routine WakeupHandler().
void WakeupHandler(int result)
Once again, the types are not specified by DIX. The result is the success indicator for the thing that (may have) blocked. In the sample server, result is the result from select() (or equivalent operating system function).
The DIX WakeupHandler() calls each Screen's WakeupHandler. A WakeupHandler is declared thus:
void xxxWakeupHandler(ScreenPtr pScreen, int result)
The arguments are the Screen, of the Screen, and the arguments to the DIX WakeupHandler().
In addition to the per-screen BlockHandlers, any module may register block and wakeup handlers (only together) using:
Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData) ServerBlockHandlerProcPtr blockHandler; ServerWakeupHandlerProcPtr wakeupHandler; pointer blockData;
A FALSE return code indicates that the registration failed for lack of memory. To remove a registered Block handler at other than server reset time (when they are all removed automatically), use:
RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData) ServerBlockHandlerProcPtr blockHandler; ServerWakeupHandlerProcPtr wakeupHandler; pointer blockData;
All three arguments must match the values passed to RegisterBlockAndWakeupHandlers.
These registered block handlers are called before the per-screen handlers:
void (*ServerBlockHandler) (void *blockData, void *pTimeout)
Sometimes block handlers need to adjust the time referenced by pTimeout, which on UNIX family systems is generally represented by a struct timeval consisting of seconds and microseconds in 32 bit values. As a convenience to reduce error prone struct timeval computations which require modulus arithmetic and correct overflow behavior in the face of millisecond wrapping through 32 bits,
void AdjustWaitForDelay(void *pTimeout, unsigned long newdelay)
has been provided.
Any wakeup handlers registered with RegisterBlockAndWakeupHandlers will be called after the Screen handlers:
void (*ServerWakeupHandler) (void *blockData, int result)
The WaitForSomething on the sample server also has a built in screen saver that darkens the screen if no input happens for a period of time. The sample server implementation is in Xserver/os/WaitFor.c. Note that WaitForSomething() may be called when you already have several outstanding things (events, requests, or new clients) queued up. For instance, your server may have just done a large graphics request, and it may have been a long time since WaitForSomething() was last called. If many clients have lots of requests queued up, DIX will only service some of them for a given client before going on to the next client (see isItTimeToYield, below). Therefore, WaitForSomething() will have to report that these same clients still have requests queued up the next time around. An implementation should return information on as many outstanding things as it can. For instance, if your implementation always checks for client data first and does not report any input events until there is no client data left, your mouse and keyboard might get locked out by an application that constantly barrages the server with graphics drawing requests. Therefore, as a general rule, input devices should always have priority over graphics devices. A list of indexes (client->index) for clients with data ready to be read or processed should be returned in pClientReady, and the count of indexes returned as the result value of the call. These are not clients that have full requests ready, but any clients who have any data ready to be read or processed. The DIX dispatcher will process requests from each client in turn by calling ReadRequestFromClient(), below. WaitForSomething() must create new clients as they are requested (by whatever mechanism at the transport level). A new client is created by calling the DIX routine:
ClientPtr NextAvailableClient(ospriv) pointer ospriv;
This routine returns NULL if a new client cannot be allocated (e.g. maximum number of clients reached). The ospriv argument will be stored into the OS private field (pClient->osPrivate), to store OS private information about the client. In the sample server, the osPrivate field contains the number of the socket for this client. See also "New Client Connections." NextAvailableClient() will call InsertFakeRequest(), so you must be prepared for this.
If there are outstanding input events, you should make sure that the two SetInputCheck() locations are unequal. The DIX dispatcher will call your implementation of ProcessInputEvents() until the SetInputCheck() locations are equal. The sample server contains an implementation of WaitForSomething(). The following two routines indicate to WaitForSomething() what devices should be waited for. fd is an OS dependent type; in the sample server it is an open file descriptor.
int AddEnabledDevice(fd) int fd; int RemoveEnabledDevice(fd) int fd;
These two routines are usually called by DDX from the initialize cases of the Input Procedures that are stored in the DeviceRec (the routine passed to AddInputDevice()). The sample server implementation of AddEnabledDevice and RemoveEnabledDevice are in Xserver/os/connection.c.
Timer Facilities Similarly, the X server or an extension may need to wait for some timeout. Early X releases implemented this functionality using block and wakeup handlers, but this has been rewritten to use a general timer facilty, and the internal screen saver facilities reimplemented to use Timers. These functions are TimerInit, TimerForce, TimerSet, TimerCheck, TimerCancel, and TimerFree, as defined in Xserver/include/os.h. A callback function will be called when the timer fires, along with the current time, and a user provided argument.
typedef struct _OsTimerRec *OsTimerPtr; typedef CARD32 (*OsTimerCallback)( OsTimerPtr /* timer */, CARD32 /* time */, pointer /* arg */); OsTimerPtr TimerSet( OsTimerPtr /* timer */, int /* flags */, CARD32 /* millis */, OsTimerCallback /* func */, pointer /* arg */);
TimerSet returns a pointer to a timer structure and sets a timer to the specified time with the specified argument. The flags can be TimerAbsolute and TimerForceOld. The TimerSetOld flag controls whether if the timer is reset and the timer is pending, the whether the callback function will get called. The TimerAbsolute flag sets the callback time to an absolute time in the future rather than a time relative to when TimerSet is called. TimerFree should be called to free the memory allocated for the timer entry.
void TimerInit(void) Bool TimerForce(OsTimerPtr /* pTimer */) void TimerCheck(void); void TimerCancel(OsTimerPtr /* pTimer */) void TimerFree(OsTimerPtr /* pTimer */)
TimerInit frees any existing timer entries. TimerForce forces a call to the timer's callback function and returns true if the timer entry existed, else it returns false and does not call the callback function. TimerCancel will cancel the specified timer. TimerFree calls TimerCancel and frees the specified timer. Calling TimerCheck will force the server to see if any timer callbacks should be called.
New Client Connections The process whereby a new client-server connection starts up is very dependent upon what your byte stream mechanism. This section describes byte stream initiation using examples from the TCP/IP implementation on the sample server. The first thing that happens is a client initiates a connection with the server. How a client knows to do this depends upon your network facilities and the Xlib implementation. In a typical scenario, a user named Fred on his X workstation is logged onto a Cray supercomputer running a command shell in an X window. Fred can type shell commands and have the Cray respond as though the X server were a dumb terminal. Fred types in a command to run an X client application that was linked with Xlib. Xlib looks at the shell environment variable DISPLAY, which has the value "fredsbittube:0.0." The host name of Fred's workstation is "fredsbittube," and the 0s are for multiple screens and multiple X server processes. (Precisely what happens on your system depends upon how X and Xlib are implemented.) The client application calls a TCP routine on the Cray to open a TCP connection for X to communicate with the network node "fredsbittube." The TCP software on the Cray does this by looking up the TCP address of "fredsbittube" and sending an open request to TCP port 6000 on fredsbittube. All X servers on TCP listen for new clients on port 6000 by default; this is known as a "well-known port" in IP terminology. The server receives this request from its port 6000 and checks where it came from to see if it is on the server's list of "trustworthy" hosts to talk to. Then, it opens another port for communications with the client. This is the byte stream that all X communications will go over. Actually, it is a bit more complicated than that. Each X server process running on the host machine is called a "display." Each display can have more than one screen that it manages. "corporatehydra:3.2" represents screen 2 on display 3 on the multi-screened network node corporatehydra. The open request would be sent on well-known port number 6003. Once the byte stream is set up, what goes on does not depend very much upon whether or not it is TCP. The client sends an xConnClientPrefix struct (see Xproto.h) that has the version numbers for the version of Xlib it is running, some byte-ordering information, and two character strings used for authorization. If the server does not like the authorization strings or the version numbers do not match within the rules, or if anything else is wrong, it sends a failure response with a reason string. If the information never comes, or comes much too slowly, the connection should be broken off. You must implement the connection timeout. The sample server implements this by keeping a timestamp for each still-connecting client and, each time just before it attempts to accept new connections, it closes any connection that are too old. The connection timeout can be set from the command line. You must implement whatever authorization schemes you want to support. The sample server on the distribution tape supports a simple authorization scheme. The only interface seen by DIX is:
char * ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) ClientPtr client; unsigned int proto_n; char *auth_proto; unsigned int string_n; char *auth_string;
DIX will only call this once per client, once it has read the full initial connection data from the client. If the connection should be accepted ClientAuthorized() should return NULL, and otherwise should return an error message string.
Accepting new connections happens internally to WaitForSomething(). WaitForSomething() must call the DIX routine NextAvailableClient() to create a client object. Processing of the initial connection data will be handled by DIX. Your OS layer must be able to map from a client to whatever information your OS code needs to communicate on the given byte stream to the client. DIX uses this ClientPtr to refer to the client from now on. The sample server uses the osPrivate field in the ClientPtr to store the file descriptor for the socket, the input and output buffers, and authorization information. To initialize the methods you choose to allow clients to connect to your server, main() calls the routine
void CreateWellKnownSockets()
This routine is called only once, and not called when the server is reset. To recreate any sockets during server resets, the following routine is called from the main loop:
void ResetWellKnownSockets()
Sample implementations of both of these routines are found in Xserver/os/connection.c.
For more details, see the section called "Connection Setup" in the X protocol specification.
Reading Data from Clients Requests from the client are read in as a byte stream by the OS layer. They may be in the form of several blocks of bytes delivered in sequence; requests may be broken up over block boundaries or there may be many requests per block. Each request carries with it length information. It is the responsibility of the following routine to break it up into request blocks.
int ReadRequestFromClient(who) ClientPtr who;
You must write the routine ReadRequestFromClient() to get one request from the byte stream belonging to client "who." You must swap the third and fourth bytes (the second 16-bit word) according to the byte-swap rules of the protocol to determine the length of the request. This length is measured in 32-bit words, not in bytes. Therefore, the theoretical maximum request is 256K. (However, the maximum length allowed is dependent upon the server's input buffer. This size is sent to the client upon connection. The maximum size is the constant MAX_REQUEST_SIZE in Xserver/include/os.h) The rest of the request you return is assumed NOT to be correctly swapped for internal use, because that is the responsibility of DIX. The 'who' argument is the ClientPtr returned from WaitForSomething. The return value indicating status should be set to the (positive) byte count if the read is successful, 0 if the read was blocked, or a negative error code if an error happened. You must then store a pointer to the bytes of the request in the client request buffer field; who->requestBuffer. This can simply be a pointer into your buffer; DIX may modify it in place but will not otherwise cause damage. Of course, the request must be contiguous; you must shuffle it around in your buffers if not. The sample server implementation is in Xserver/os/io.c.
Inserting Data for Clients DIX can insert data into the client stream, and can cause a "replay" of the current request.
Bool InsertFakeRequest(client, data, count) ClientPtr client; char *data; int count; int ResetCurrentRequest(client) ClientPtr client;
InsertFakeRequest() must insert the specified number of bytes of data into the head of the input buffer for the client. This may be a complete request, or it might be a partial request. For example, NextAvailableCient() will insert a partial request in order to read the initial connection data sent by the client. The routine returns FALSE if memory could not be allocated. ResetCurrentRequest() should "back up" the input buffer so that the currently executing request will be reexecuted. DIX may have altered some values (e.g. the overall request length), so you must recheck to see if you still have a complete request. ResetCurrentRequest() should always cause a yield (isItTimeToYield).
Sending Events, Errors And Replies To Clients
int WriteToClient(who, n, buf) ClientPtr who; int n; char *buf;
WriteToClient should write n bytes starting at buf to the ClientPtr "who". It returns the number of bytes written, but for simplicity, the number returned must be either the same value as the number requested, or -1, signaling an error. The sample server implementation is in Xserver/os/io.c.
void SendErrorToClient(client, majorCode, minorCode, resId, errorCode) ClientPtr client; unsigned int majorCode; unsigned int minorCode; XID resId; int errorCode;
SendErrorToClient can be used to send errors back to clients, although in most cases your request function should simply return the error code, having set client->errorValue to the appropriate error value to return to the client, and DIX will call this function with the correct opcodes for you.
void FlushAllOutput() void FlushIfCriticalOutputPending() void SetCriticalOutputPending()
These three routines may be implemented to support buffered or delayed writes to clients, but at the very least, the stubs must exist. FlushAllOutput() unconditionally flushes all output to clients; FlushIfCriticalOutputPending() flushes output only if SetCriticalOutputPending() has be called since the last time output was flushed. The sample server implementation is in Xserver/os/io.c and actually ignores requests to flush output on a per-client basis if it knows that there are requests in that client's input queue.
Font Support In the sample server, fonts are encoded in disk files or fetched from the font server. The two fonts required by the server, fixed and cursor are commonly compiled into the font library. For disk fonts, there is one file per font, with a file name like "fixed.pcf". Font server fonts are read over the network using the X Font Server Protocol. The disk directories containing disk fonts and the names of the font servers are listed together in the current "font path." In principle, you can put all your fonts in ROM or in RAM in your server. You can put them all in one library file on disk. You could generate them on the fly from stroke descriptions. By placing the appropriate code in the Font Library, you will automatically export fonts in that format both through the X server and the Font server. The code for processing fonts in different formats, as well as handling the metadata files for them on disk (such as fonts.dir) is located in the libXfont library, which is provided as a separately compiled module. These routines are shared between the X server and the Font server, so instead of this document specifying what you must implement, simply refer to the font library interface specification for the details. All of the interface code to the Font library is contained in dix/dixfonts.c
Memory Management Memory management is based on functions in the C runtime library, malloc(), realloc(), and free(), and you should simply call the C library functions directly. Consult a C runtime library reference manual for more details. Treat memory allocation carefully in your implementation. Memory leaks can be very hard to find and are frustrating to a user. An X server could be running for days or weeks without being reset, just like a regular terminal. If you leak a few dozen k per day, that will add up and will cause problems for users that leave their workstations on.
Client Scheduling The X server has the ability to schedule clients much like an operating system would, suspending and restarting them without regard for the state of their input buffers. This functionality allows the X server to suspend one client and continue processing requests from other clients while waiting for a long-term network activity (like loading a font) before continuing with the first client.
Bool isItTimeToYield;
isItTimeToYield is a global variable you can set if you want to tell DIX to end the client's "time slice" and start paying attention to the next client. After the current request is finished, DIX will move to the next client.
In the sample server, ReadRequestFromClient() sets isItTimeToYield after 10 requests packets in a row are read from the same client. This scheduling algorithm can have a serious effect upon performance when two clients are drawing into their windows simultaneously. If it allows one client to run until its request queue is empty by ignoring isItTimeToYield, the client's queue may in fact never empty and other clients will be blocked out. On the other hand, if it switches between different clients too quickly, performance may suffer due to too much switching between contexts. For example, if a graphics processor needs to be set up with drawing modes before drawing, and two different clients are drawing with different modes into two different windows, you may switch your graphics processor modes so often that performance is impacted. See the Strategies document for heuristics on setting isItTimeToYield. The following functions provide the ability to suspend request processing on a particular client, resuming it at some later time:
int IgnoreClient (who) ClientPtr who; int AttendClient (who) ClientPtr who;
Ignore client is responsible for pretending that the given client doesn't exist. WaitForSomething should not return this client as ready for reading and should not return if only this client is ready. AttendClient undoes whatever IgnoreClient did, setting it up for input again.
Three functions support "process control" for X clients:
Bool ClientSleep (client, function, closure) ClientPtr client; Bool (*function)(); pointer closure;
This suspends the current client (the calling routine is responsible for making its way back to Dispatch()). No more X requests will be processed for this client until ClientWakeup is called.
Bool ClientSignal (client) ClientPtr client;
This function causes a call to the (*function) parameter passed to ClientSleep to be queued on the work queue. This does not automatically "wakeup" the client, but the function called is free to do so by calling:
ClientWakeup (client) ClientPtr client;
This re-enables X request processing for the specified client.
Other OS Functions
void ErrorF(char *f, ...) void FatalError(char *f, ...)
You should write these three routines to provide for diagnostic output from the dix and ddx layers, although implementing them to produce no output will not affect the correctness of your server. ErrorF() and FatalError() take a printf() type of format specification in the first argument and an implementation-dependent number of arguments following that. Normally, the formats passed to ErrorF() and FatalError() should be terminated with a newline.
After printing the message arguments, FatalError() must be implemented such that the server will call ddxGiveUp(EXIT_ERR_ABORT) to give the ddx layer a chance to reset the hardware, and then terminate the server; it must not return. The sample server implementation for these routines is in Xserver/os/log.c along with other routines for logging messages.
DDX Layer This section describes the interface between DIX and DDX. While there may be an OS-dependent driver interface between DDX and the physical device, that interface is left to the DDX implementor and is not specified here. The DDX layer does most of its work through procedures that are pointed to by different structs. As previously described, the behavior of these resources is largely determined by these procedure pointers. Most of these routines are for graphic display on the screen or support functions thereof. The rest are for user input from input devices.
Input In this document "input" refers to input from the user, such as mouse, keyboard, and bar code readers. X input devices are of several types: keyboard, pointing device, and many others. The core server has support for extension devices as described by the X Input Extension document; the interfaces used by that extension are described elsewhere. The core devices are actually implemented as two collections of devices, the mouse is a ButtonDevice, a ValuatorDevice and a PtrFeedbackDevice while the keyboard is a KeyDevice, a FocusDevice and a KbdFeedbackDevice. Each part implements a portion of the functionality of the device. This abstraction is hidden from view for core devices by DIX. You, the DDX programmer, are responsible for some of the routines in this section. Others are DIX routines that you should call to do the things you need to do in these DDX routines. Pay attention to which is which.
Input Device Data Structures DIX keeps a global directory of devices in a central data structure called InputInfo. For each device there is a device structure called a DeviceRec. DIX can locate any DeviceRec through InputInfo. In addition, it has a special pointer to identify the main pointing device and a special pointer to identify the main keyboard. The DeviceRec (Xserver/include/input.h) is a device-independent structure that contains the state of an input device. A DevicePtr is simply a pointer to a DeviceRec. An xEvent describes an event the server reports to a client. Defined in Xproto.h, it is a huge struct of union of structs that have fields for all kinds of events. All of the variants overlap, so that the struct is actually very small in memory.
Processing Events The main DDX input interface is the following routine:
void ProcessInputEvents()
You must write this routine to deliver input events from the user. DIX calls it when input is pending (see next section), and possibly even when it is not. You should write it to get events from each device and deliver the events to DIX. To deliver the events to DIX, DDX should call the following routine:
void DevicePtr->processInputProc(pEvent, device, count) xEventPtr events; DeviceIntPtr device; int count;
This is the "input proc" for the device, a DIX procedure. DIX will fill in this procedure pointer to one of its own routines by the time ProcessInputEvents() is called the first time. Call this input proc routine as many times as needed to deliver as many events as should be delivered. DIX will buffer them up and send them out as needed. Count is set to the number of event records which make up one atomic device event and is always 1 for the core devices (see the X Input Extension for descriptions of devices which may use count > 1).
For example, your ProcessInputEvents() routine might check the mouse and the keyboard. If the keyboard had several keystrokes queued up, it could just call the keyboard's processInputProc as many times as needed to flush its internal queue. event is an xEvent struct you pass to the input proc. When the input proc returns, it is finished with the event rec, and you can fill in new values and call the input proc again with it. You should deliver the events in the same order that they were generated. For keyboard and pointing devices the xEvent variant should be keyButtonPointer. Fill in the following fields in the xEvent record: type - is one of the following: KeyPress, KeyRelease, ButtonPress, ButtonRelease, or MotionNotify detail - for KeyPress or KeyRelease fields, this should be the key number (not the ASCII code); otherwise unused time - is the time that the event happened (32-bits, in milliseconds, arbitrary origin) rootX - is the x coordinate of cursor rootY - is the y coordinate of cursor The rest of the fields are filled in by DIX. The time stamp is maintained by your code in the DDX layer, and it is your responsibility to stamp all events correctly. The x and y coordinates of the pointing device and the time must be filled in for all event types including keyboard events. The pointing device must report all button press and release events. In addition, it should report a MotionNotify event every time it gets called if the pointing device has moved since the last notify. Intermediate pointing device moves are stored in a special GetMotionEvents buffer, because most client programs are not interested in them. There are quite a collection of sample implementations of this routine, one for each supported device.
Telling DIX When Input is Pending In the server's dispatch loop, DIX checks to see if there is any device input pending whenever WaitForSomething() returns. If the check says that input is pending, DIX calls the DDX routine ProcessInputEvents(). This check for pending input must be very quick; a procedure call is too slow. The code that does the check is a hardwired IF statement in DIX code that simply compares the values pointed to by two pointers. If the values are different, then it assumes that input is pending and ProcessInputEvents() is called by DIX. You must pass pointers to DIX to tell it what values to compare. The following procedure is used to set these pointers:
void SetInputCheck(p1, p2) long *p1, *p2;
You should call it sometime during initialization to indicate to DIX the correct locations to check. You should pay special attention to the size of what they actually point to, because the locations are assumed to be longs.
These two pointers are initialized by DIX to point to arbitrary values that are different. In other words, if you forget to call this routine during initialization, the worst thing that will happen is that ProcessInputEvents will be called when there are no events to process. p1 and p2 might point at the head and tail of some shared memory queue. Another use would be to have one point at a constant 0, with the other pointing at some mask containing 1s for each input device that has something pending. The DDX layer of the sample server calls SetInputCheck() once when the server's private internal queue is initialized. It passes pointers to the queue's head and tail. See Xserver/mi/mieq.c.
int TimeSinceLastInputEvent()
DDX must time stamp all hardware input events. But DIX sometimes needs to know the time and the OS layer needs to know the time since the last hardware input event in order for the screen saver to work. TimeSinceLastInputEvent() returns the this time in milliseconds.
Controlling Input Devices You must write four routines to do various device-specific things with the keyboard and pointing device. They can have any name you wish because you pass the procedure pointers to DIX routines.
int pInternalDevice->valuator->GetMotionProc(pdevice, coords, start, stop, pScreen) DeviceIntPtr pdevice; xTimecoord * coords; unsigned long start; unsigned long stop; ScreenPtr pScreen;
You write this DDX routine to fill in coords with all the motion events that have times (32-bit count of milliseconds) between time start and time stop. It should return the number of motion events returned. If there is no motion events support, this routine should do nothing and return zero. The maximum number of coords to return is set in InitPointerDeviceStruct(), below.
When the user drags the pointing device, the cursor position theoretically sweeps through an infinite number of points. Normally, a client that is concerned with points other than the starting and ending points will receive a pointer-move event only as often as the server generates them. (Move events do not queue up; each new one replaces the last in the queue.) A server, if desired, can implement a scheme to save these intermediate events in a motion buffer. A client application, like a paint program, may then request that these events be delivered to it through the GetMotionProc routine.
void pInternalDevice->bell->BellProc(percent, pDevice, ctrl, unknown) int percent; DeviceIntPtr pDevice; pointer ctrl; int class;
You need to write this routine to ring the bell on the keyboard. loud is a number from 0 to 100, with 100 being the loudest. Class is either BellFeedbackClass or KbdFeedbackClass (from XI.h).
void pInternalDevice->somedevice->CtrlProc(device, ctrl) DevicePtr device; SomethingCtrl *ctrl;
You write two versions of this procedure, one for the keyboard and one for the pointing device. DIX calls it to inform DDX when a client has requested changes in the current settings for the particular device. For a keyboard, this might be the repeat threshold and rate. For a pointing device, this might be a scaling factor (coarse or fine) for position reporting. See input.h for the ctrl structures.
Input Initialization Input initialization is a bit complicated. It all starts with InitInput(), a routine that you write to call AddInputDevice() twice (once for pointing device and once for keyboard.) When you Add the devices, a routine you supply for each device gets called to initialize them. Your individual initialize routines must call InitKeyboardDeviceStruct() or InitPointerDeviceStruct(), depending upon which it is. In other words, you indicate twice that the keyboard is the keyboard and the pointer is the pointer.
void InitInput(argc, argv) int argc; char **argv;
InitInput is a DDX routine you must write to initialize the input subsystem in DDX. It must call AddInputDevice() for each device that might generate events.
DevicePtr AddInputDevice(deviceProc, autoStart) DeviceProc deviceProc; Bool autoStart;
AddInputDevice is a DIX routine you call to create a device object. deviceProc is a DDX routine that is called by DIX to do various operations. AutoStart should be TRUE for devices that need to be turned on at initialization time with a special call, as opposed to waiting for some client application to turn them on. This routine returns NULL if sufficient memory cannot be allocated to install the device.
Note also that except for the main keyboard and pointing device, an extension is needed to provide for a client interface to a device. The following DIX procedures return the specified DevicePtr. They may or may not be useful to DDX implementors.
DevicePtr LookupKeyboardDevice()
LookupKeyboardDevice returns pointer for current main keyboard device.
DevicePtr LookupPointerDevice()
LookupPointerDevice returns pointer for current main pointing device.
A DeviceProc (the kind passed to AddInputDevice()) in the following form:
Bool pInternalDevice->DeviceProc(device, action); DeviceIntPtr device; int action;
You must write a DeviceProc for each device. device points to the device record. action tells what action to take; it will be one of these defined constants (defined in input.h): DEVICE_INIT - At DEVICE_INIT time, the device should initialize itself by calling InitPointerDeviceStruct(), InitKeyboardDeviceStruct(), or a similar routine (see below) and "opening" the device if necessary. If you return a non-zero (i.e., != Success) value from the DEVICE_INIT call, that device will be considered unavailable. If either the main keyboard or main pointing device cannot be initialized, the DIX code will refuse to continue booting up. DEVICE_ON - If the DeviceProc is called with DEVICE_ON, then it is allowed to start putting events into the client stream by calling through the ProcessInputProc in the device. DEVICE_OFF - If the DeviceProc is called with DEVICE_OFF, no further events from that device should be given to the DIX layer. The device will appear to be dead to the user. DEVICE_CLOSE - At DEVICE_CLOSE (terminate or reset) time, the device should be totally closed down.
void InitPointerDeviceStruct(device, map, mapLength, GetMotionEvents, ControlProc, numMotionEvents) DevicePtr device; CARD8 *map; int mapLength; ValuatorMotionProcPtr ControlProc; PtrCtrlProcPtr GetMotionEvents; int numMotionEvents;
InitPointerDeviceStruct is a DIX routine you call at DEVICE_INIT time to declare some operating routines and data structures for a pointing device. map and mapLength are as described in the X Window System protocol specification. ControlProc and GetMotionEvents are DDX routines, see above.
numMotionEvents is for the motion-buffer-size for the GetMotionEvents request. A typical length for a motion buffer would be 100 events. A server that does not implement this capability should set numMotionEvents to zero.
void InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, Bell, ControlProc) DevicePtr device; KeySymsPtr pKeySyms; CARD8 *pModifiers; BellProcPtr Bell; KbdCtrlProcPtr ControlProc;
You call this DIX routine when a keyboard device is initialized and its device procedure is called with DEVICE_INIT. The formats of the keysyms and modifier maps are defined in Xserver/include/input.h. They describe the layout of keys on the keyboards, and the glyphs associated with them. ( See the next section for information on setting up the modifier map and the keysym map.) ControlProc and Bell are DDX routines, see above.
Keyboard Mapping and Keycodes When you send a keyboard event, you send a report that a given key has either been pressed or has been released. There must be a keycode for each key that identifies the key; the keycode-to-key mapping can be any mapping you desire, because you specify the mapping in a table you set up for DIX. However, you are restricted by the protocol specification to keycode values in the range 8 to 255 inclusive. The keycode mapping information that you set up consists of the following: A minimum and maximum keycode number An array of sets of keysyms for each key, that is of length maxkeycode - minkeycode + 1. Each element of this array is a list of codes for symbols that are on that key. There is no limit to the number of symbols that can be on a key. Once the map is set up, DIX keeps and maintains the client's changes to it. The X protocol defines standard names to indicate the symbol(s) printed on each keycap. (See X11/keysym.h)
Screens Different computer graphics displays have different capabilities. Some are simple monochrome frame buffers that are just lying there in memory, waiting to be written into. Others are color displays with many bits per pixel using some color lookup table. Still others have high-speed graphic processors that prefer to do all of the work themselves, including maintaining their own high-level, graphic data structures.
Screen Hardware Requirements The only requirement on screens is that you be able to both read and write locations in the frame buffer. All screens must have a depth of 32 or less (unless you use an X extension to allow a greater depth). All screens must fit into one of the classes listed in the section in this document on Visuals and Depths. X uses the pixel as its fundamental unit of distance on the screen. Therefore, most programs will measure everything in pixels. The sample server assumes square pixels. Serious WYSIWYG (what you see is what you get) applications for publishing and drawing programs will adjust for different screen resolutions automatically. Considerable work is involved in compensating for non-square pixels (a bit in the DDX code for the sample server but quite a bit in the client applications).
Data Structures X supports multiple screens that are connected to the same server. Therefore, all the per-screen information is bundled into one data structure of attributes and procedures, which is the ScreenRec (see Xserver/include/scrnintstr.h). The procedure entry points in a ScreenRec operate on regions, colormaps, cursors, and fonts, because these resources can differ in format from one screen to another. Windows are areas on the screen that can be drawn into by graphic routines. "Pixmaps" are off-screen graphic areas that can be drawn into. They are both considered drawables and are described in the section on Drawables. All graphic operations work on drawables, and operations are available to copy patches from one drawable to another. The pixel image data in all drawables is in a format that is private to DDX. In fact, each instance of a drawable is associated with a given screen. Presumably, the pixel image data for pixmaps is chosen to be conveniently understood by the hardware. All screens in a single server must be able to handle all pixmaps depths declared in the connection setup information. Pixmap images are transferred to the server in one of two ways: XYPixmap or ZPimap. XYPixmaps are a series of bitmaps, one for each bit plane of the image, using the bitmap padding rules from the connection setup. ZPixmaps are a series of bits, nibbles, bytes or words, one for each pixel, using the format rules (padding and so on) for the appropriate depth. All screens in a given server must agree on a set of pixmap image formats (PixmapFormat) to support (depth, number of bits per pixel, etc.). There is no color interpretation of bits in the pixmap. Pixmaps do not contain pixel values. The interpretation is made only when the bits are transferred onto the screen. The screenInfo structure (in scrnintstr.h) is a global data structure that has a pointer to an array of ScreenRecs, one for each screen on the server. (These constitute the one and only description of each screen in the server.) Each screen has an identifying index (0, 1, 2, ...). In addition, the screenInfo struct contains global server-wide details, such as the bit- and byte- order in all bit images, and the list of pixmap image formats that are supported. The X protocol insists that these must be the same for all screens on the server.
Output Initialization
InitOutput(pScreenInfo, argc, argv) ScreenInfo *pScreenInfo; int argc; char **argv;
Upon initialization, your DDX routine InitOutput() is called by DIX. It is passed a pointer to screenInfo to initialize. It is also passed the argc and argv from main() for your server for the command-line arguments. These arguments may indicate what or how many screen device(s) to use or in what way to use them. For instance, your server command line may allow a "-D" flag followed by the name of the screen device to use.
Your InitOutput() routine should initialize each screen you wish to use by calling AddScreen(), and then it should initialize the pixmap formats that you support by storing values directly into the screenInfo data structure. You should also set certain implementation-dependent numbers and procedures in your screenInfo, which determines the pixmap and scanline padding rules for all screens in the server.
int AddScreen(scrInitProc, argc, argv) Bool (*scrInitProc)(); int argc; char **argv;
You should call AddScreen(), a DIX procedure, in InitOutput() once for each screen to add it to the screenInfo database. The first argument is an initialization procedure for the screen that you supply. The second and third are the argc and argv from main(). It returns the screen number of the screen installed, or -1 if there is either insufficient memory to add the screen, or (*scrInitProc) returned FALSE.
The scrInitProc should be of the following form:
Bool scrInitProc(pScreen, argc, argv) ScreenPtr pScreen; int argc; char **argv;
pScreen is the pointer to the screen's new ScreenRec. argc and argv are as before. Your screen initialize procedure should return TRUE upon success or FALSE if the screen cannot be initialized (for instance, if the screen hardware does not exist on this machine).
This procedure must determine what actual device it is supposed to initialize. If you have a different procedure for each screen, then it is no problem. If you have the same procedure for multiple screens, it may have trouble figuring out which screen to initialize each time around, especially if InitOutput() does not initialize all of the screens. It is probably easiest to have one procedure for each screen. The initialization procedure should fill in all the screen procedures for that screen (windowing functions, region functions, etc.) and certain screen attributes for that screen.
Region Routines in the ScreenRec A region is a dynamically allocated data structure that describes an irregularly shaped piece of real estate in XY pixel space. You can think of it as a set of pixels on the screen to be operated upon with set operations such as AND and OR. A region is frequently implemented as a list of rectangles or bitmaps that enclose the selected pixels. Region operators control the "clipping policy," or the operations that work on regions. (The sample server uses YX-banded rectangles. Unless you have something already implemented for your graphics system, you should keep that implementation.) The procedure pointers to the region operators are located in the ScreenRec data structure. The definition of a region can be found in the file Xserver/include/regionstr.h. The region code is found in Xserver/mi/miregion.c. DDX implementations using other region formats will need to supply different versions of the region operators. Since the list of rectangles is unbounded in size, part of the region data structure is usually a large, dynamically allocated chunk of memory. As your region operators calculate logical combinations of regions, these blocks may need to be reallocated by your region software. For instance, in the sample server, a RegionRec has some header information and a pointer to a dynamically allocated rectangle list. Periodically, the rectangle list needs to be expanded with realloc(), whereupon the new pointer is remembered in the RegionRec. Most of the region operations come in two forms: a function pointer in the Screen structure, and a macro. The server can be compiled so that the macros make direct calls to the appropriate functions (instead of indirecting through a screen function pointer), or it can be compiled so that the macros are identical to the function pointer forms. Making direct calls is faster on many architectures.
RegionPtr pScreen->RegionCreate( rect, size) BoxPtr rect; int size; macro: RegionPtr RegionCreate(rect, size)
RegionCreate creates a region that describes ONE rectangle. The caller can avoid unnecessary reallocation and copying by declaring the probable maximum number of rectangles that this region will need to describe itself. Your region routines, though, cannot fail just because the region grows beyond this size. The caller of this routine can pass almost anything as the size; the value is merely a good guess as to the maximum size until it is proven wrong by subsequent use. Your region procedures are then on their own in estimating how big the region will get. Your implementation might ignore size, if applicable.
void pScreen->RegionInit (pRegion, rect, size) RegionPtr pRegion; BoxPtr rect; int size; macro: RegionInit(pRegion, rect, size)
Given an existing raw region structure (such as an local variable), this routine fills in the appropriate fields to make this region as usable as one returned from RegionCreate. This avoids the additional dynamic memory allocation overhead for the region structure itself.
Bool pScreen->RegionCopy(dstrgn, srcrgn) RegionPtr dstrgn, srcrgn; macro: Bool RegionCopy(dstrgn, srcrgn)
RegionCopy copies the description of one region, srcrgn, to another already-created region, dstrgn; returning TRUE if the copy succeeded, and FALSE otherwise.
void pScreen->RegionDestroy( pRegion) RegionPtr pRegion; macro: RegionDestroy(pRegion)
RegionDestroy destroys a region and frees all allocated memory.
void pScreen->RegionUninit (pRegion) RegionPtr pRegion; macro: RegionUninit(pRegion)
Frees everything except the region structure itself, useful when the region was originally passed to RegionInit instead of received from RegionCreate. When this call returns, pRegion must not be reused until it has been RegionInit'ed again.
Bool pScreen->Intersect(newReg, reg1, reg2) RegionPtr newReg, reg1, reg2; macro: Bool RegionIntersect(newReg, reg1, reg2) Bool pScreen->Union(newReg, reg1, reg2) RegionPtr newReg, reg1, reg2; macro: Bool RegionUnion(newReg, reg1, reg2) Bool pScreen->Subtract(newReg, regMinuend, regSubtrahend) RegionPtr newReg, regMinuend, regSubtrahend; macro: Bool RegionUnion(newReg, regMinuend, regSubtrahend) Bool pScreen->Inverse(newReg, pReg, pBox) RegionPtr newReg, pReg; BoxPtr pBox; macro: Bool RegionInverse(newReg, pReg, pBox)
The above four calls all do basic logical operations on regions. They set the new region (which already exists) to describe the logical intersection, union, set difference, or inverse of the region(s) that were passed in. Your routines must be able to handle a situation where the newReg is the same region as one of the other region arguments.
The subtract function removes the Subtrahend from the Minuend and puts the result in newReg. The inverse function returns a region that is the pBox minus the region passed in. (A true "inverse" would make a region that extends to infinity in all directions but has holes in the middle.) It is undefined for situations where the region extends beyond the box. Each routine must return the value TRUE for success.
void pScreen->RegionReset(pRegion, pBox) RegionPtr pRegion; BoxPtr pBox; macro: RegionReset(pRegion, pBox)
RegionReset sets the region to describe one rectangle and reallocates it to a size of one rectangle, if applicable.
void pScreen->TranslateRegion(pRegion, x, y) RegionPtr pRegion; int x, y; macro: RegionTranslate(pRegion, x, y)
TranslateRegion simply moves a region +x in the x direction and +y in the y direction.
int pScreen->RectIn(pRegion, pBox) RegionPtr pRegion; BoxPtr pBox; macro: int RegionContainsRect(pRegion, pBox)
RectIn returns one of the defined constants rgnIN, rgnOUT, or rgnPART, depending upon whether the box is entirely inside the region, entirely outside of the region, or partly in and partly out of the region. These constants are defined in Xserver/include/region.h.
Bool pScreen->PointInRegion(pRegion, x, y, pBox) RegionPtr pRegion; int x, y; BoxPtr pBox; macro: Bool RegionContainsPoint(pRegion, x, y, pBox)
PointInRegion returns true if the point x, y is in the region. In addition, it fills the rectangle pBox with coordinates of a rectangle that is entirely inside of pRegion and encloses the point. In the mi implementation, it is the largest such rectangle. (Due to the sample server implementation, this comes cheaply.)
This routine used by DIX when tracking the pointing device and deciding whether to report mouse events or change the cursor. For instance, DIX needs to change the cursor when it moves from one window to another. Due to overlapping windows, the shape to check may be irregular. A PointInRegion() call for every pointing device movement may be too expensive. The pBox is a kind of wake-up box; DIX need not call PointInRegion() again until the cursor wanders outside of the returned box.
Bool pScreen->RegionNotEmpty(pRegion) RegionPtr pRegion; macro: Bool RegionNotEmpty(pRegion)
RegionNotEmpty is a boolean function that returns true or false depending upon whether the region encloses any pixels.
void pScreen->RegionEmpty(pRegion) RegionPtr pRegion; macro: RegionEmpty(pRegion)
RegionEmpty sets the region to be empty.
BoxPtr pScreen->RegionExtents(pRegion) RegionPtr pRegion; macro: RegionExtents(pRegion)
RegionExtents returns a rectangle that is the smallest possible superset of the entire region. The caller will not modify this rectangle, so it can be the one in your region struct.
Bool pScreen->RegionAppend (pDstRgn, pRegion) RegionPtr pDstRgn; RegionPtr pRegion; macro: Bool RegionAppend(pDstRgn, pRegion) Bool pScreen->RegionValidate (pRegion, pOverlap) RegionPtr pRegion; Bool *pOverlap; macro: Bool RegionValidate(pRegion, pOverlap)
These functions provide an optimization for clip list generation and must be used in conjunction. The combined effect is to produce the union of a collection of regions, by using RegionAppend several times, and finally calling RegionValidate which takes the intermediate representation (which needn't be a valid region) and produces the desired union. pOverlap is set to TRUE if any of the original regions overlap; FALSE otherwise.
RegionPtr pScreen->BitmapToRegion (pPixmap) PixmapPtr pPixmap; macro: RegionPtr BitmapToRegion(pScreen, pPixmap)
Given a depth-1 pixmap, this routine must create a valid region which includes all the areas of the pixmap filled with 1's and excludes the areas filled with 0's. This routine returns NULL if out of memory.
RegionPtr pScreen->RectsToRegion (nrects, pRects, ordering) int nrects; xRectangle *pRects; int ordering; macro: RegionPtr RegionFromRects(nrects, pRects, ordering)
Given a client-supplied list of rectangles, produces a region which includes the union of all the rectangles. Ordering may be used as a hint which describes how the rectangles are sorted. As the hint is provided by a client, it must not be required to be correct, but the results when it is not correct are not defined (core dump is not an option here).
void pScreen->SendGraphicsExpose(client,pRegion,drawable,major,minor) ClientPtr client; RegionPtr pRegion; XID drawable; int major; int minor;
SendGraphicsExpose dispatches a list of GraphicsExposure events which span the region to the specified client. If the region is empty, or a NULL pointer, a NoExpose event is sent instead.
Cursor Routines for a Screen A cursor is the visual form tied to the pointing device. The default cursor is an "X" shape, but the cursor can have any shape. When a client creates a window, it declares what shape the cursor will be when it strays into that window on the screen. For each possible shape the cursor assumes, there is a CursorRec data structure. This data structure contains a pointer to a CursorBits data structure which contains a bitmap for the image of the cursor and a bitmap for a mask behind the cursor, in addition, the CursorRec data structure contains foreground and background colors for the cursor. The CursorBits data structure is shared among multiple CursorRec structures which use the same font and glyph to describe both source and mask. The cursor image is applied to the screen by applying the mask first, clearing 1 bits in its form to the background color, and then overwriting on the source image, in the foreground color. (One bits of the source image that fall on top of zero bits of the mask image are undefined.) This way, a cursor can have transparent parts, and opaque parts in two colors. X allows any cursor size, but some hardware cursor schemes allow a maximum of N pixels by M pixels. Therefore, you are allowed to transform the cursor to a smaller size, but be sure to include the hot-spot. CursorBits in Xserver/include/cursorstr.h is a device-independent structure containing a device-independent representation of the bits for the source and mask. (This is possible because the bitmap representation is the same for all screens.) When a cursor is created, it is "realized" for each screen. At realization time, each screen has the chance to convert the bits into some other representation that may be more convenient (for instance, putting the cursor into off-screen memory) and set up its device-private area in either the CursorRec data structure or CursorBits data structure as appropriate to possibly point to whatever data structures are needed. It is more memory-conservative to share realizations by using the CursorBits private field, but this makes the assumption that the realization is independent of the colors used (which is typically true). For instance, the following are the device private entries for a particular screen and cursor:
pCursor->devPriv[pScreen->myNum] pCursor->bits->devPriv[pScreen->myNum]
This is done because the change from one cursor shape to another must be fast and responsive; the cursor image should be able to flutter as fast as the user moves it across the screen.
You must implement the following routines for your hardware:
Bool pScreen->RealizeCursor( pScr, pCurs) ScreenPtr pScr; CursorPtr pCurs; Bool pScreen->UnrealizeCursor( pScr, pCurs) ScreenPtr pScr; CursorPtr pCurs;
RealizeCursor and UnrealizeCursor should realize (allocate and calculate all data needed) and unrealize (free the dynamically allocated data) a given cursor when DIX needs them. They are called whenever a device-independent cursor is created or destroyed. The source and mask bits pointed to by fields in pCurs are undefined for bits beyond the right edge of the cursor. This is so because the bits are in Bitmap format, which may have pad bits on the right edge. You should inhibit UnrealizeCursor() if the cursor is currently in use; this happens when the system is reset.
Bool pScreen->DisplayCursor( pScr, pCurs) ScreenPtr pScr; CursorPtr pCurs;
DisplayCursor should change the cursor on the given screen to the one passed in. It is called by DIX when the user moves the pointing device into a different window with a different cursor. The hotspot in the cursor should be aligned with the current cursor position.
void pScreen->RecolorCursor( pScr, pCurs, displayed) ScreenPtr pScr; CursorPtr pCurs; Bool displayed;
RecolorCursor notifies DDX that the colors in pCurs have changed and indicates whether this is the cursor currently being displayed. If it is, the cursor hardware state may have to be updated. Whether displayed or not, state created at RealizeCursor time may have to be updated. A generic version, miRecolorCursor, may be used that does an unrealize, a realize, and possibly a display (in micursor.c); however this constrains UnrealizeCursor and RealizeCursor to always return TRUE as no error indication is returned here.
void pScreen->ConstrainCursor( pScr, pBox) ScreenPtr pScr; BoxPtr pBox;
ConstrainCursor should cause the cursor to restrict its motion to the rectangle pBox. DIX code is capable of enforcing this constraint by forcefully moving the cursor if it strays out of the rectangle, but ConstrainCursor offers a way to send a hint to the driver or hardware if such support is available. This can prevent the cursor from wandering out of the box, then jumping back, as DIX forces it back.
void pScreen->PointerNonInterestBox( pScr, pBox) ScreenPtr pScr; BoxPtr pBox;
PointerNonInterestBox is DIX's way of telling the pointing device code not to report motion events while the cursor is inside a given rectangle on the given screen. It is optional and, if not implemented, it should do nothing. This routine is called only when the client has declared that it is not interested in motion events in a given window. The rectangle you get may be a subset of that window. It saves DIX code the time required to discard uninteresting mouse motion events. This is only a hint, which may speed performance. Nothing in DIX currently calls PointerNonInterestBox.
void pScreen->CursorLimits( pScr, pCurs, pHotBox, pTopLeftBox) ScreenPtr pScr; CursorPtr pCurs; BoxPtr pHotBox; BoxPtr pTopLeftBox; /* return value */
CursorLimits should calculate the box that the cursor hot spot is physically capable of moving within, as a function of the screen pScr, the device-independent cursor pCurs, and a box that DIX hypothetically would want the hot spot confined within, pHotBox. This routine is for informing DIX only; it alters no state within DDX.
Bool pScreen->SetCursorPosition( pScr, newx, newy, generateEvent) ScreenPtr pScr; int newx; int newy; Bool generateEvent;
SetCursorPosition should artificially move the cursor as though the user had jerked the pointing device very quickly. This is called in response to the WarpPointer request from the client, and at other times. If generateEvent is True, the device should decide whether or not to call ProcessInputEvents() and then it must call DevicePtr->processInputProc. Its effects are, of course, limited in value for absolute pointing devices such as a tablet.
void NewCurrentScreen(newScreen, x, y) ScreenPtr newScreen; int x,y;
If your ddx provides some mechanism for the user to magically move the pointer between multiple screens, you need to inform DIX when this occurs. You should call NewCurrentScreen to accomplish this, specifying the new screen and the new x and y coordinates of the pointer on that screen.
Visuals, Depths and Pixmap Formats for Screens The "depth" of a image is the number of bits that are used per pixel to display it. The "bits per pixel" of a pixmap image that is sent over the client byte stream is a number that is either 4, 8, 16, 24 or 32. It is the number of bits used per pixel in Z format. For instance, a pixmap image that has a depth of six is best sent in Z format as 8 bits per pixel. A "pixmap image format" or a "pixmap format" is a description of the format of a pixmap image as it is sent over the byte stream. For each depth available on a server, there is one and only one pixmap format. This pixmap image format gives the bits per pixel and the scanline padding unit. (For instance, are pixel rows padded to bytes, 16-bit words, or 32-bit words?) For each screen, you must decide upon what depth(s) it supports. You should only count the number of bits used for the actual image. Some displays store additional bits to indicate what window this pixel is in, how close this object is to a viewer, transparency, and other data; do not count these bits. A "display class" tells whether the display is monochrome or color, whether there is a lookup table, and how the lookup table works. A "visual" is a combination of depth, display class, and a description of how the pixel values result in a color on the screen. Each visual has a set of masks and offsets that are used to separate a pixel value into its red, green, and blue components and a count of the number of colormap entries. Some of these fields are only meaningful when the class dictates so. Each visual also has a screen ID telling which screen it is usable on. Note that the depth does not imply the number of map_entries; for instance, a display can have 8 bits per pixel but only 254 colormap entries for use by applications (the other two being reserved by hardware for the cursor). Each visual is identified by a 32-bit visual ID which the client uses to choose what visual is desired on a given window. Clients can be using more than one visual on the same screen at the same time. The class of a display describes how this translation takes place. There are three ways to do the translation. Pseudo - The pixel value, as a whole, is looked up in a table of length map_entries to determine the color to display. True - The pixel value is broken up into red, green, and blue fields, each of which are looked up in separate red, green, and blue lookup tables, each of length map_entries. Gray - The pixel value is looked up in a table of length map_entries to determine a gray level to display. In addition, the lookup table can be static (resulting colors are fixed for each pixel value) or dynamic (lookup entries are under control of the client program). This leads to a total of six classes: Static Gray - The pixel value (of however many bits) determines directly the level of gray that the pixel assumes. Gray Scale - The pixel value is fed through a lookup table to arrive at the level of gray to display for the given pixel. Static Color - The pixel value is fed through a fixed lookup table that yields the color to display for that pixel. PseudoColor - The whole pixel value is fed through a programmable lookup table that has one color (including red, green, and blue intensities) for each possible pixel value, and that color is displayed. True Color - Each pixel value consists of one or more bits that directly determine each primary color intensity after being fed through a fixed table. Direct Color - Each pixel value consists of one or more bits for each primary color. Each primary color value is individually looked up in a table for that primary color, yielding an intensity for that primary color. For each pixel, the red value is looked up in the red table, the green value in the green table, and the blue value in the blue table. Here are some examples: A simple monochrome 1 bit per pixel display is Static Gray. A display that has 2 bits per pixel for a choice between the colors of black, white, green and violet is Static Color. A display that has three bits per pixel, where each bit turns on or off one of the red, green or blue guns, is in the True Color class. If you take the last example and scramble the correspondence between pixel values and colors it becomes a Static Color display. A display has 8 bits per pixel. The 8 bits select one entry out of 256 entries in a lookup table, each entry consisting of 24 bits (8bits each for red, green, and blue). The display can show any 256 of 16 million colors on the screen at once. This is a pseudocolor display. The client application gets to fill the lookup table in this class of display. Imagine the same hardware from the last example. Your server software allows the user, on the command line that starts up the server program, to fill the lookup table to his liking once and for all. From then on, the server software would not change the lookup table until it exits. For instance, the default might be a lookup table with a reasonable sample of colors from throughout the color space. But the user could specify that the table be filled with 256 steps of gray scale because he knew ahead of time he would be manipulating a lot of black-and-white scanned photographs and not very many color things. Clients would be presented with this unchangeable lookup table. Although the hardware qualifies as a PseudoColor display, the facade presented to the X client is that this is a Static Color display. You have to decide what kind of display you have or want to pretend you have. When you initialize the screen(s), this class value must be set in the VisualRec data structure along with other display characteristics like the depth and other numbers. The allowable DepthRec's and VisualRec's are pointed to by fields in the ScreenRec. These are set up when InitOutput() is called; you should malloc() appropriate blocks or use static variables initialized to the correct values.
Colormaps for Screens A colormap is a device-independent mapping between pixel values and colors displayed on the screen. Different windows on the same screen can have different colormaps at the same time. At any given time, the most recently installed colormap(s) will be in use in the server so that its (their) windows' colors will be guaranteed to be correct. Other windows may be off-color. Although this may seem to be chaotic, in practice most clients use the default colormap for the screen. The default colormap for a screen is initialized when the screen is initialized. It always remains in existence and is not owned by any regular client. It is owned by client 0 (the server itself). Many clients will simply use this default colormap for their drawing. Depending upon the class of the screen, the entries in this colormap may be modifiable by client applications.
Colormap Routines You need to implement the following routines to handle the device-dependent aspects of color maps. You will end up placing pointers to these procedures in your ScreenRec data structure(s). The sample server implementations of many of these routines are in fbcmap.c.
Bool pScreen->CreateColormap(pColormap) ColormapPtr pColormap;
This routine is called by the DIX CreateColormap routine after it has allocated all the data for the new colormap and just before it returns to the dispatcher. It is the DDX layer's chance to initialize the colormap, particularly if it is a static map. See the following section for more details on initializing colormaps. The routine returns FALSE if creation failed, such as due to memory limitations. Notice that the colormap has a devPriv field from which you can hang any colormap specific storage you need. Since each colormap might need special information, we attached the field to the colormap and not the visual.
void pScreen->DestroyColormap(pColormap) ColormapPtr pColormap;
This routine is called by the DIX FreeColormap routine after it has uninstalled the colormap and notified all interested parties, and before it has freed any of the colormap storage. It is the DDX layer's chance to free any data it added to the colormap.
void pScreen->InstallColormap(pColormap) ColormapPtr pColormap;
InstallColormap should fill a lookup table on the screen with which the colormap is associated with the colors in pColormap. If there is only one hardware lookup table for the screen, then all colors on the screen may change simultaneously.
In the more general case of multiple hardware lookup tables, this may cause some other colormap to be uninstalled, meaning that windows that subscribed to the colormap that was uninstalled may end up being off-color. See the note, below, about uninstalling maps.
void pScreen->UninstallColormap(pColormap) ColormapPtr pColormap;
UninstallColormap should remove pColormap from screen pColormap->pScreen. Some other map, such as the default map if possible, should be installed in place of pColormap if applicable. If pColormap is the default map, do nothing. If any client has requested ColormapNotify events, the DDX layer must notify the client. (The routine WalkTree() is be used to find such windows. The DIX routines TellNoMap(), TellNewMap() and TellGainedMap() are provided to be used as the procedure parameter to WalkTree. These procedures are in Xserver/dix/colormap.c.)
int pScreen->ListInstalledColormaps(pScreen, pCmapList) ScreenPtr pScreen; XID *pCmapList;
ListInstalledColormaps fills the pCmapList in with the resource ids of the installed maps and returns a count of installed maps. pCmapList will point to an array of size MaxInstalledMaps that was allocated by the caller.
void pScreen->StoreColors (pmap, ndef, pdefs) ColormapPtr pmap; int ndef; xColorItem *pdefs;
StoreColors changes some of the entries in the colormap pmap. The number of entries to change are ndef, and pdefs points to the information describing what to change. Note that partial changes of entries in the colormap are allowed. Only the colors indicated in the flags field of each xColorItem need to be changed. However, all three color fields will be sent with the proper value for the benefit of screens that may not be able to set part of a colormap value. If the screen is a static class, this routine does nothing. The structure of colormap entries is nontrivial; see colormapst.h and the definition of xColorItem in Xproto.h for more details.
void pScreen->ResolveColor(pRed, pGreen, pBlue, pVisual) unsigned short *pRed, *pGreen, *pBlue; VisualPtr pVisual;
Given a requested color, ResolveColor returns the nearest color that this hardware is capable of displaying on this visual. In other words, this rounds off each value, in place, to the number of bits per primary color that your screen can use. Remember that each screen has one of these routines. The level of roundoff should be what you would expect from the value you put in the bits_per_rgb field of the pVisual.
Each value is an unsigned value ranging from 0 to 65535. The bits least likely to be used are the lowest ones. For example, if you had a pseudocolor display with any number of bits per pixel that had a lookup table supplying 6 bits for each color gun (a total of 256K different colors), you would round off each value to 6 bits. Please don't simply truncate these values to the upper 6 bits, scale the result so that the maximum value seen by the client will be 65535 for each primary. This makes color values more portable between different depth displays (a 6-bit truncated white will not look white on an 8-bit display).
Initializing a Colormap When a client requests a new colormap and when the server creates the default colormap, the procedure CreateColormap in the DIX layer is invoked. That procedure allocates memory for the colormap and related storage such as the lists of which client owns which pixels. It then sets a bit, BeingCreated, in the flags field of the ColormapRec and calls the DDX layer's CreateColormap routine. This is your chance to initialize the colormap. If the colormap is static, which you can tell by looking at the class field, you will want to fill in each color cell to match the hardwares notion of the color for that pixel. If the colormap is the default for the screen, which you can tell by looking at the IsDefault bit in the flags field, you should allocate BlackPixel and WhitePixel to match the values you set in the pScreen structure. (Of course, you picked those values to begin with.) You can also wait and use AllocColor() to allocate blackPixel and whitePixel after the default colormap has been created. If the default colormap is static and you initialized it in pScreen->CreateColormap, then use can use AllocColor afterwards to choose pixel values with the closest rgb values to those desired for blackPixel and whitePixel. If the default colormap is dynamic and uninitialized, then the rgb values you request will be obeyed, and AllocColor will again choose pixel values for you. These pixel values can then be stored into the screen. There are two ways to fill in the colormap. The simplest way is to use the DIX function AllocColor.
int AllocColor (pmap, pred, pgreen, pblue, pPix, client) ColormapPtr pmap; unsigned short *pred, *pgreen, *pblue; Pixel *pPix; int client;
This takes three pointers to 16 bit color values and a pointer to a suggested pixel value. The pixel value is either an index into one colormap or a combination of three indices depending on the type of pmap. If your colormap starts out empty, and you don't deliberately pick the same value twice, you will always get your suggested pixel. The truly nervous could check that the value returned in *pPix is the one AllocColor was called with. If you don't care which pixel is used, or would like them sequentially allocated from entry 0, set *pPix to 0. This will find the first free pixel and use that.
AllocColor will take care of all the bookkeeping and will call StoreColors to get the colormap rgb values initialized. The hardware colormap will be changed whenever this colormap is installed. If for some reason AllocColor doesn't do what you want, you can do your own bookkeeping and call StoreColors yourself. This is much more difficult and shouldn't be necessary for most devices.
Fonts for Screens A font is a set of bitmaps that depict the symbols in a character set. Each font is for only one typeface in a given size, in other words, just one bitmap for each character. Parallel fonts may be available in a variety of sizes and variations, including "bold" and "italic." X supports fonts for 8-bit and 16-bit character codes (for oriental languages that have more than 256 characters in the font). Glyphs are bitmaps for individual characters. The source comes with some useful font files in an ASCII, plain-text format that should be comprehensible on a wide variety of operating systems. The text format, referred to as BDF, is a slight extension of the current Adobe 2.1 Bitmap Distribution Format (Adobe Systems, Inc.). A short paper in PostScript format is included with the sample server that defines BDF. It includes helpful pictures, which is why it is done in PostScript and is not included in this document. Your implementation should include some sort of font compiler to read these files and generate binary files that are directly usable by your server implementation. The sample server comes with the source for a font compiler. It is important the font properties contained in the BDF files are preserved across any font compilation. In particular, copyright information cannot be casually tossed aside without legal ramifications. Other properties will be important to some sophisticated applications. All clients get font information from the server. Therefore, your server can support any fonts it wants to. It should probably support at least the fonts supplied with the X11 tape. In principle, you can convert fonts from other sources or dream up your own fonts for use on your server.
Portable Compiled Format A font compiler is supplied with the sample server. It has compile-time switches to convert the BDF files into a portable binary form, called Portable Compiled Format or PCF. This allows for an arbitrary data format inside the file, and by describing the details of the format in the header of the file, any PCF file can be read by any PCF reading client. By selecting the format which matches the required internal format for your renderer, the PCF reader can avoid reformatting the data each time it is read in. The font compiler should be quite portable. The fonts included with the tape are stored in fonts/bdf. The font compiler is found in fonts/tools/bdftopcf.
Font Realization Each screen configured into the server has an opportunity at font-load time to "realize" a font into some internal format if necessary. This happens every time the font is loaded into memory. A font (FontRec in Xserver/include/dixfontstr.h) is a device-independent structure containing a device-independent representation of the font. When a font is created, it is "realized" for each screen. At this point, the screen has the chance to convert the font into some other format. The DDX layer can also put information in the devPrivate storage.
Bool pScreen->RealizeFont(pScr, pFont) ScreenPtr pScr; FontPtr pFont; Bool pScreen->UnrealizeFont(pScr, pFont) ScreenPtr pScr; FontPtr pFont;
RealizeFont and UnrealizeFont should calculate and allocate these extra data structures and dispose of them when no longer needed. These are called in response to OpenFont and CloseFont requests from the client. The sample server implementation is in fbscreen.c (which does very little).
Other Screen Routines You must supply several other screen-specific routines for your X server implementation. Some of these are described in other sections: GetImage() is described in the Drawing Primitives section. GetSpans() is described in the Pixblit routine section. Several window and pixmap manipulation procedures are described in the Window section under Drawables. The CreateGC() routine is described under Graphics Contexts.
void pScreen->QueryBestSize(kind, pWidth, pHeight) int kind; unsigned short *pWidth, *pHeight; ScreenPtr pScreen;
QueryBestSize() returns the best sizes for cursors, tiles, and stipples in response to client requests. kind is one of the defined constants CursorShape, TileShape, or StippleShape (defined in X.h). For CursorShape, return the maximum width and height for cursors that you can handle. For TileShape and StippleShape, start with the suggested values in pWidth and pHeight and modify them in place to be optimal values that are greater than or equal to the suggested values. The sample server implementation is in Xserver/fb/fbscreen.c.
pScreen->SourceValidate(pDrawable, x, y, width, height) DrawablePtr pDrawable; int x, y, width, height; unsigned int subWindowMode;
SourceValidate should be called by any primitive that reads from pDrawable. If you know that you will never need SourceValidate, you can avoid this check. Currently, SourceValidate is used by the mi software cursor code to remove the cursor from the screen when the source rectangle overlaps the cursor position. x,y,width,height describe the source rectangle (source relative, that is) for the copy operation. subWindowMode comes from the GC or source Picture.
Bool pScreen->SaveScreen(pScreen, on) ScreenPtr pScreen; int on;
SaveScreen() is used for Screen Saver support (see WaitForSomething()). pScreen is the screen to save.
Bool pScreen->CloseScreen(pScreen) ScreenPtr pScreen;
When the server is reset, it calls this routine for each screen.
Bool pScreen->CreateScreenResources(pScreen) ScreenPtr pScreen;
If this routine is not NULL, it will be called once per screen per server initialization/reset after all modules have had a chance to request private space on all structures that support them (see below). You may create resources in this function instead of in the screen init function passed to AddScreen in order to guarantee that all pre-allocated space requests have been registered first. With the new devPrivates mechanism, this is not strictly necessary, however. This routine returns TRUE if successful.
Drawables A drawable is a descriptor of a surface that graphics are drawn into, either a window on the screen or a pixmap in memory. Each drawable has a type, class, ScreenPtr for the screen it is associated with, depth, position, size, and serial number. The type is one of the defined constants DRAWABLE_PIXMAP, DRAWABLE_WINDOW and UNDRAWABLE_WINDOW. (An undrawable window is used for window class InputOnly.) The serial number is guaranteed to be unique across drawables, and is used in determining the validity of the clipping information in a GC. The screen selects the set of procedures used to manipulate and draw into the drawable. Position is used (currently) only by windows; pixmaps must set these fields to 0,0 as this reduces the amount of conditional code executed throughout the mi code. Size indicates the actual client-specified size of the drawable. There are, in fact, no other fields that a window drawable and pixmap drawable have in common besides those mentioned here. Both PixmapRecs and WindowRecs are structs that start with a drawable and continue on with more fields. Pixmaps have a single pointer field named devPrivate which usually points to the pixmap data but could conceivably be used for anything that DDX wants. Both windows and pixmaps also have a devPrivates field which can be used for DDX specific data (see below). This is done because different graphics hardware has different requirements for management; if the graphics is always handled by a processor with an independent address space, there is no point having a pointer to the bit image itself. The definition of a drawable and a pixmap can be found in the file Xserver/include/pixmapstr.h. The definition of a window can be found in the file Xserver/include/windowstr.h.
Pixmaps A pixmap is a three-dimensional array of bits stored somewhere offscreen, rather than in the visible portion of the screen's display frame buffer. It can be used as a source or destination in graphics operations. There is no implied interpretation of the pixel values in a pixmap, because it has no associated visual or colormap. There is only a depth that indicates the number of significant bits per pixel. Also, there is no implied physical size for each pixel; all graphic units are in numbers of pixels. Therefore, a pixmap alone does not constitute a complete image; it represents only a rectangular array of pixel values. Note that the pixmap data structure is reference-counted. The server implementation is free to put the pixmap data anywhere it sees fit, according to its graphics hardware setup. Many implementations will simply have the data dynamically allocated in the server's address space. More sophisticated implementations may put the data in undisplayed framebuffer storage. In addition to dynamic devPrivates (see below), the pixmap data structure has two fields that are private to the device. Although you can use them for anything you want, they have intended purposes. devKind is intended to be a device specific indication of the pixmap location (host memory, off-screen, etc.). In the sample server, since all pixmaps are in memory, devKind stores the width of the pixmap in bitmap scanline units. devPrivate is usually a pointer to the bits in the pixmap. A bitmap is a pixmap that is one bit deep.
PixmapPtr pScreen->CreatePixmap(pScreen, width, height, depth) ScreenPtr pScreen; int width, height, depth;
This ScreenRec procedure must create a pixmap of the size requested. It must allocate a PixmapRec and fill in all of the fields. The reference count field must be set to 1. If width or height are zero, no space should be allocated for the pixmap data, and if the implementation is using the devPrivate field as a pointer to the pixmap data, it should be set to NULL. If successful, it returns a pointer to the new pixmap; if not, it returns NULL. See Xserver/fb/fbpixmap.c for the sample server implementation.
Bool pScreen->DestroyPixmap(pPixmap) PixmapPtr pPixmap;
This ScreenRec procedure must "destroy" a pixmap. It should decrement the reference count and, if zero, it must deallocate the PixmapRec and all attached devPrivate blocks. If successful, it returns TRUE. See Xserver/fb/fbpixmap.c for the sample server implementation.
Bool pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData) PixmapPtr pPixmap; int width; int height; int depth; int bitsPerPixel; int devKind; pointer pPixData;
This routine takes a pixmap header and initializes the fields of the PixmapRec to the parameters of the same name. pPixmap must have been created via pScreen->CreatePixmap with a zero width or height to avoid allocating space for the pixmap data. pPixData is assumed to be the pixmap data; it will be stored in an implementation-dependent place (usually pPixmap->devPrivate.ptr). This routine returns TRUE if successful. See Xserver/mi/miscrinit.c for the sample server implementation.
PixmapPtr GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, pPixData) ScreenPtr pScreen; int width; int height; int depth; int bitsPerPixel; int devKind; pointer pPixData; void FreeScratchPixmapHeader(pPixmap) PixmapPtr pPixmap;
DDX should use these two DIX routines when it has a buffer of raw image data that it wants to manipulate as a pixmap temporarily, usually so that some other part of the server can be leveraged to perform some operation on the data. The data should be passed in pPixData, and will be stored in an implementation-dependent place (usually pPixmap->devPrivate.ptr). The other fields go into the corresponding PixmapRec fields. If successful, GetScratchPixmapHeader returns a valid PixmapPtr which can be used anywhere the server expects a pixmap, else it returns NULL. The pixmap should be released when no longer needed (usually within the same function that allocated it) with FreeScratchPixmapHeader.
Windows A window is a visible, or potentially visible, rectangle on the screen. DIX windowing functions maintain an internal n-ary tree data structure, which represents the current relationships of the mapped windows. Windows that are contained in another window are children of that window and are clipped to the boundaries of the parent. The root window in the tree is the window for the entire screen. Sibling windows constitute a doubly-linked list; the parent window has a pointer to the head and tail of this list. Each child also has a pointer to its parent. The border of a window is drawn by a DDX procedure when DIX requests that it be drawn. The contents of the window is drawn by the client through requests to the server. Window painting is orchestrated through an expose event system. When a region is exposed, DIX generates an expose event, telling the client to repaint the window and passing the region that is the minimal area needed to be repainted. As a favor to clients, the server may retain the output to the hidden parts of windows in off-screen memory; this is called "backing store". When a part of such a window becomes exposed, it can quickly move pixels into place instead of triggering an expose event and waiting for a client on the other end of the network to respond. Even if the network response is insignificant, the time to intelligently paint a section of a window is usually more than the time to just copy already-painted sections. At best, the repainting involves blanking out the area to a background color, which will take about the same amount of time. In this way, backing store can dramatically increase the performance of window moves. On the other hand, backing store can be quite complex, because all graphics drawn to hidden areas must be intercepted and redirected to the off-screen window sections. Not only can this be complicated for the server programmer, but it can also impact window painting performance. The backing store implementation can choose, at any time, to forget pieces of backing that are written into, relying instead upon expose events to repaint for simplicity. In X, the decision to use the backing-store scheme is made by you, the server implementor. The sample server implements backing store "for free" by reusing the infrastructure for the Composite extension. As a side effect, it treats the WhenMapped and Always hints as equivalent. However, it will never forget pixel contents when the window is mapped. When a window operation is requested by the client, such as a window being created or moved, a new state is computed. During this transition, DIX informs DDX what rectangles in what windows are about to become obscured and what rectangles in what windows have become exposed. This provides a hook for the implementation of backing store. If DDX is unable to restore exposed regions, DIX generates expose events to the client. It is then the client's responsibility to paint the window parts that were exposed but not restored. If a window is resized, pixels sometimes need to be moved, depending upon the application. The client can request "Gravity" so that certain blocks of the window are moved as a result of a resize. For instance, if the window has controls or other items that always hang on the edge of the window, and that edge is moved as a result of the resize, then those pixels should be moved to avoid having the client repaint it. If the client needs to repaint it anyway, such an operation takes time, so it is desirable for the server to approximate the appearance of the window as best it can while waiting for the client to do it perfectly. Gravity is used for that, also. The window has several fields used in drawing operations: clipList - This region, in conjunction with the client clip region in the gc, is used to clip output. clipList has the window's children subtracted from it, in addition to pieces of sibling windows that overlap this window. To get the list with the children included (subwindow-mode is IncludeInferiors), the routine NotClippedByChildren(pWin) returns the unclipped region. borderClip is the region used by CopyWindow and includes the area of the window, its children, and the border, but with the overlapping areas of sibling children removed. Most of the other fields are for DIX use only.
Window Procedures in the ScreenRec You should implement all of the following procedures and store pointers to them in the screen record. The device-independent portion of the server "owns" the window tree. However, clever hardware might want to know the relationship of mapped windows. There are pointers to procedures in the ScreenRec data structure that are called to give the hardware a chance to update its internal state. These are helpers and hints to DDX only; they do not change the window tree, which is only changed by DIX.
Bool pScreen->CreateWindow(pWin) WindowPtr pWin;
This routine is a hook for when DIX creates a window. It should fill in the "Window Procedures in the WindowRec" below and also allocate the devPrivate block for it.
See Xserver/fb/fbwindow.c for the sample server implementation.
Bool pScreen->DestroyWindow(pWin); WindowPtr pWin;
This routine is a hook for when DIX destroys a window. It should deallocate the devPrivate block for it and any other blocks that need to be freed, besides doing other cleanup actions.
See Xserver/fb/fbwindow.c for the sample server implementation.
Bool pScreen->PositionWindow(pWin, x, y); WindowPtr pWin; int x, y;
This routine is a hook for when DIX moves or resizes a window. It should do whatever private operations need to be done when a window is moved or resized. For instance, if DDX keeps a pixmap tile used for drawing the background or border, and it keeps the tile rotated such that it is longword aligned to longword locations in the frame buffer, then you should rotate your tiles here. The actual graphics involved in moving the pixels on the screen and drawing the border are handled by CopyWindow(), below.
See Xserver/fb/fbwindow.c for the sample server implementation.
Bool pScreen->RealizeWindow(pWin); WindowPtr pWin; Bool pScreen->UnrealizeWindow(pWin); WindowPtr pWin;
These routines are hooks for when DIX maps (makes visible) and unmaps (makes invisible) a window. It should do whatever private operations need to be done when these happen, such as allocating or deallocating structures that are only needed for visible windows. RealizeWindow does NOT draw the window border, background or contents; UnrealizeWindow does NOT erase the window or generate exposure events for underlying windows; this is taken care of by DIX. DIX does, however, call PaintWindowBackground() and PaintWindowBorder() to perform some of these.
Bool pScreen->ChangeWindowAttributes(pWin, vmask) WindowPtr pWin; unsigned long vmask;
ChangeWindowAttributes is called whenever DIX changes window attributes, such as the size, front-to-back ordering, title, or anything of lesser severity that affects the window itself. The sample server implements this routine. It computes accelerators for quickly putting up background and border tiles. (See description of the set of routines stored in the WindowRec.)
int pScreen->ValidateTree(pParent, pChild, kind) WindowPtr pParent, pChild; VTKind kind;
ValidateTree calculates the clipping region for the parent window and all of its children. This routine must be provided. The sample server has a machine-independent version in Xserver/mi/mivaltree.c. This is a very difficult routine to replace.
void pScreen->PostValidateTree(pParent, pChild, kind) WindowPtr pParent, pChild; VTKind kind;
If this routine is not NULL, DIX calls it shortly after calling ValidateTree, passing it the same arguments. This is useful for managing multi-layered framebuffers. The sample server sets this to NULL.
void pScreen->WindowExposures(pWin, pRegion, pBSRegion) WindowPtr pWin; RegionPtr pRegion; RegionPtr pBSRegion;
The WindowExposures() routine paints the border and generates exposure events for the window. pRegion is an unoccluded region of the window, and pBSRegion is an occluded region that has backing store. Since exposure events include a rectangle describing what was exposed, this routine may have to send back a series of exposure events, one for each rectangle of the region. The count field in the expose event is a hint to the client as to the number of regions that are after this one. This routine must be provided. The sample server has a machine-independent version in Xserver/mi/miexpose.c.
void pScreen->ClipNotify (pWin, dx, dy) WindowPtr pWin; int dx, dy;
Whenever the cliplist for a window is changed, this function is called to perform whatever hardware manipulations might be necessary. When called, the clip list and border clip regions in the window are set to the new values. dx,dy are the distance that the window has been moved (if at all).
Window Painting Procedures In addition to the procedures listed above, there are two routines which manipulate the actual window image directly. In the sample server, mi implementations will work for most purposes and fb routines speed up situations, such as solid backgrounds/borders or tiles that are 8, 16 or 32 pixels square.
void pScreen->ClearToBackground(pWin, x, y, w, h, generateExposures); WindowPtr pWin; int x, y, w, h; Bool generateExposures;
This routine is called on a window in response to a ClearToBackground request from the client. This request has two different but related functions, depending upon generateExposures.
If generateExposures is true, the client is declaring that the given rectangle on the window is incorrectly painted and needs to be repainted. The sample server implementation calculates the exposure region and hands it to the DIX procedure HandleExposures(), which calls the WindowExposures() routine, below, for the window and all of its child windows. If generateExposures is false, the client is trying to simply erase part of the window to the background fill style. ClearToBackground should write the background color or tile to the rectangle in question (probably using PaintWindowBackground). If w or h is zero, it clears all the way to the right or lower edge of the window. The sample server implementation is in Xserver/mi/miwindow.c.
void pScreen->CopyWindow(pWin, oldpt, oldRegion); WindowPtr pWin; DDXPointRec oldpt; RegionPtr oldRegion;
CopyWindow is called when a window is moved, and graphically moves to pixels of a window on the screen. It should not change any other state within DDX (see PositionWindow(), above).
oldpt is the old location of the upper-left corner. oldRegion is the old region it is coming from. The new location and new region is stored in the WindowRec. oldRegion might modified in place by this routine (the sample implementation does this). CopyArea could be used, except that this operation has more complications. First of all, you do not want to copy a rectangle onto a rectangle. The original window may be obscured by other windows, and the new window location may be similarly obscured. Second, some hardware supports multiple windows with multiple depths, and your routine needs to take care of that. The pixels in oldRegion (with reference point oldpt) are copied to the window's new region (pWin->borderClip). pWin->borderClip is gotten directly from the window, rather than passing it as a parameter. The sample server implementation is in Xserver/fb/fbwindow.c.
Screen Operations for Multi-Layered Framebuffers The following screen functions are useful if you have a framebuffer with multiple sets of independent bit planes, e.g. overlays or underlays in addition to the "main" planes. If you have a simple single-layer framebuffer, you should probably use the mi versions of these routines in mi/miwindow.c. This can be easily accomplished by calling miScreenInit.
void pScreen->MarkWindow(pWin) WindowPtr pWin;
This formerly dix function MarkWindow has moved to ddx and is accessed via this screen function. This function should store something, usually a pointer to a device-dependent structure, in pWin->valdata so that ValidateTree has the information it needs to validate the window.
Bool pScreen->MarkOverlappedWindows(parent, firstChild, ppLayerWin) WindowPtr parent; WindowPtr firstChild; WindowPtr * ppLayerWin;
This formerly dix function MarkWindow has moved to ddx and is accessed via this screen function. In the process, it has grown another parameter: ppLayerWin, which is filled in with a pointer to the window at which save under marking and ValidateTree should begin. In the single-layered framebuffer case, pLayerWin == pWin.
Bool pScreen->ChangeSaveUnder(pLayerWin, firstChild) WindowPtr pLayerWin; WindowPtr firstChild;
The dix functions ChangeSaveUnder and CheckSaveUnder have moved to ddx and are accessed via this screen function. pLayerWin should be the window returned in the ppLayerWin parameter of MarkOverlappedWindows. The function may turn on backing store for windows that might be covered, and may partially turn off backing store for windows. It returns TRUE if PostChangeSaveUnder needs to be called to finish turning off backing store.
void pScreen->PostChangeSaveUnder(pLayerWin, firstChild) WindowPtr pLayerWin; WindowPtr firstChild;
The dix function DoChangeSaveUnder has moved to ddx and is accessed via this screen function. This function completes the job of turning off backing store that was started by ChangeSaveUnder.
void pScreen->MoveWindow(pWin, x, y, pSib, kind) WindowPtr pWin; int x; int y; WindowPtr pSib; VTKind kind;
The formerly dix function MoveWindow has moved to ddx and is accessed via this screen function. The new position of the window is given by x,y. kind is VTMove if the window is only moving, or VTOther if the border is also changing.
void pScreen->ResizeWindow(pWin, x, y, w, h, pSib) WindowPtr pWin; int x; int y; unsigned int w; unsigned int h; WindowPtr pSib;
The formerly dix function SlideAndSizeWindow has moved to ddx and is accessed via this screen function. The new position is given by x,y. The new size is given by w,h.
WindowPtr pScreen->GetLayerWindow(pWin) WindowPtr pWin
This is a new function which returns a child of the layer parent of pWin.
void pScreen->HandleExposures(pWin) WindowPtr pWin;
The formerly dix function HandleExposures has moved to ddx and is accessed via this screen function. This function is called after ValidateTree and uses the information contained in valdata to send exposures to windows.
void pScreen->ReparentWindow(pWin, pPriorParent) WindowPtr pWin; WindowPtr pPriorParent;
This function will be called when a window is reparented. At the time of the call, pWin will already be spliced into its new position in the window tree, and pPriorParent is its previous parent. This function can be NULL.
void pScreen->SetShape(pWin) WindowPtr pWin;
The formerly dix function SetShape has moved to ddx and is accessed via this screen function. The window's new shape will have already been stored in the window when this function is called.
void pScreen->ChangeBorderWidth(pWin, width) WindowPtr pWin; unsigned int width;
The formerly dix function ChangeBorderWidth has moved to ddx and is accessed via this screen function. The new border width is given by width.
void pScreen->MarkUnrealizedWindow(pChild, pWin, fromConfigure) WindowPtr pChild; WindowPtr pWin; Bool fromConfigure;
This function is called for windows that are being unrealized as part of an UnrealizeTree. pChild is the window being unrealized, pWin is an ancestor, and the fromConfigure value is simply propagated from UnrealizeTree.
Graphics Contexts and Validation This graphics context (GC) contains state variables such as foreground and background pixel value (color), the current line style and width, the current tile or stipple for pattern generation, the current font for text generation, and other similar attributes. In many graphics systems, the equivalent of the graphics context and the drawable are combined as one entity. The main distinction between the two kinds of status is that a drawable describes a writing surface and the writings that may have already been done on it, whereas a graphics context describes the drawing process. A drawable is like a chalkboard. A GC is like a piece of chalk. Unlike many similar systems, there is no "current pen location." Every graphic operation is accompanied by the coordinates where it is to happen. The GC also includes two vectors of procedure pointers, the first operate on the GC itself and are called GC funcs. The second, called GC ops, contains the functions that carry out the fundamental graphic operations such as drawing lines, polygons, arcs, text, and copying bitmaps. The DDX graphic software can, if it wants to be smart, change these two vectors of procedure pointers to take advantage of hardware/firmware in the server machine, which can do a better job under certain circumstances. To reduce the amount of memory consumed by each GC, it is wise to create a few "boilerplate" GC ops vectors which can be shared by every GC which matches the constraints for that set. Also, it is usually reasonable to have every GC created by a particular module to share a common set of GC funcs. Samples of this sort of sharing can be seen in fb/fbgc.c. The DDX software is notified any time the client (or DIX) uses a changed GC. For instance, if the hardware has special support for drawing fixed-width fonts, DDX can intercept changes to the current font in a GC just before drawing is done. It can plug into either a fixed-width procedure that makes the hardware draw characters, or a variable-width procedure that carefully lays out glyphs by hand in software, depending upon the new font that is selected. A definition of these structures can be found in the file Xserver/include/gcstruct.h. Also included in each GC is support for dynamic devPrivates, which the DDX can use for any purpose (see below). The DIX routines available for manipulating GCs are CreateGC, ChangeGC, ChangeGCXIDs, CopyGC, SetClipRects, SetDashes, and FreeGC.
GCPtr CreateGC(pDrawable, mask, pval, pStatus) DrawablePtr pDrawable; BITS32 mask; XID *pval; int *pStatus; int ChangeGC(client, pGC, mask, pUnion) ClientPtr client; GCPtr pGC; BITS32 mask; ChangeGCValPtr pUnion; int ChangeGCXIDs(client, pGC, mask, pC32) ClientPtr client; GCPtr pGC; BITS32 mask; CARD32 *pC32; int CopyGC(pgcSrc, pgcDst, mask) GCPtr pgcSrc; GCPtr pgcDst; BITS32 mask; int SetClipRects(pGC, xOrigin, yOrigin, nrects, prects, ordering) GCPtr pGC; int xOrigin, yOrigin; int nrects; xRectangle *prects; int ordering; SetDashes(pGC, offset, ndash, pdash) GCPtr pGC; unsigned offset; unsigned ndash; unsigned char *pdash; int FreeGC(pGC, gid) GCPtr pGC; GContext gid;
As a convenience, each Screen structure contains an array of GCs that are preallocated, one at each depth the screen supports. These are particularly useful in the mi code. Two DIX routines must be used to get these GCs:
GCPtr GetScratchGC(depth, pScreen) int depth; ScreenPtr pScreen; FreeScratchGC(pGC) GCPtr pGC;
Always use these two routines, don't try to extract the scratch GC yourself -- someone else might be using it, so a new one must be created on the fly.
If you need a GC for a very long time, say until the server is restarted, you should not take one from the pool used by GetScratchGC, but should get your own using CreateGC or CreateScratchGC. This leaves the ones in the pool free for routines that only need it for a little while and don't want to pay a heavy cost to get it.
GCPtr CreateScratchGC(pScreen, depth) ScreenPtr pScreen; int depth;
NULL is returned if the GC cannot be created. The GC returned can be freed with FreeScratchGC.
Details of Operation At screen initialization, a screen must supply a GC creation procedure. At GC creation, the screen must fill in GC funcs and GC ops vectors (Xserver/include/gcstruct.h). For any particular GC, the func vector must remain constant, while the op vector may vary. This invariant is to ensure that Wrappers work correctly. When a client request is processed that results in a change to the GC, the device-independent state of the GC is updated. This includes a record of the state that changed. Then the ChangeGC GC func is called. This is useful for graphics subsystems that are able to process state changes in parallel with the server CPU. DDX may opt not to take any action at GC-modify time. This is more efficient if multiple GC-modify requests occur between draws using a given GC. Validation occurs at the first draw operation that specifies the GC after that GC was modified. DIX calls then the ValidateGC GC func. DDX should then update its internal state. DDX internal state may be stored as one or more of the following: 1) device private block on the GC; 2) hardware state; 3) changes to the GC ops. The GC contains a serial number, which is loaded with a number fetched from the window that was drawn into the last time the GC was used. The serial number in the drawable is changed when the drawable's clipList or absCorner changes. Thus, by comparing the GC serial number with the drawable serial number, DIX can force a validate if the drawable has been changed since the last time it was used with this GC. In addition, the drawable serial number is always guaranteed to have the most significant bit set to 0. Thus, the DDX layer can set the most significant bit of the serial number to 1 in a GC to force a validate the next time the GC is used. DIX also uses this technique to indicate that a change has been made to the GC by way of a SetGC, a SetDashes or a SetClip request.
GC Handling Routines The ScreenRec data structure has a pointer for CreateGC().
Bool pScreen->CreateGC(pGC) GCPtr pGC;
This routine must fill in the fields of a dynamically allocated GC that is passed in. It does NOT allocate the GC record itself or fill in the defaults; DIX does that.
This must fill in both the GC funcs and ops; none of the drawing functions will be called before the GC has been validated, but the others (dealing with allocating of clip regions, changing and destroying the GC, etc.) might be. The GC funcs vector contains pointers to 7 routines and a devPrivate field:
pGC->funcs->ChangeGC(pGC, changes) GCPtr pGC; unsigned long changes;
This GC func is called immediately after a field in the GC is changed. changes is a bit mask indicating the changed fields of the GC in this request.
The ChangeGC routine is useful if you have a system where state-changes to the GC can be swallowed immediately by your graphics system, and a validate is not necessary.
pGC->funcs->ValidateGC(pGC, changes, pDraw) GCPtr pGC; unsigned long changes; DrawablePtr pDraw;
ValidateGC is called by DIX just before the GC will be used when one of many possible changes to the GC or the graphics system has happened. It can modify devPrivates data attached to the GC, change the op vector, or change hardware according to the values in the GC. It may not change the device-independent portion of the GC itself.
In almost all cases, your ValidateGC() procedure should take the regions that drawing needs to be clipped to and combine them into a composite clip region, which you keep a pointer to in the private part of the GC. In this way, your drawing primitive routines (and whatever is below them) can easily determine what to clip and where. You should combine the regions clientClip (the region that the client desires to clip output to) and the region returned by NotClippedByChildren(), in DIX. An example is in Xserver/fb/fbgc.c. Some kinds of extension software may cause this routine to be called more than originally intended; you should not rely on algorithms that will break under such circumstances. See the Strategies document for more information on creatively using this routine.
pGC->funcs->CopyGC(pGCSrc, mask, pGCDst) GCPtr pGCSrc; unsigned long mask; GCPtr pGCDst;
This routine is called by DIX when a GC is being copied to another GC. This is for situations where dynamically allocated chunks of memory are stored in the GC's dynamic devPrivates and need to be transferred to the destination GC.
pGC->funcs->DestroyGC(pGC) GCPtr pGC;
This routine is called before the GC is destroyed for the entity interested in this GC to clean up after itself. This routine is responsible for freeing any auxiliary storage allocated.
GC Clip Region Routines The GC clientClip field requires three procedures to manage it. These procedures are in the GC funcs vector. The underlying principle is that dix knows nothing about the internals of the clipping information, (except when it has come from the client), and so calls ddX whenever it needs to copy, set, or destroy such information. It could have been possible for dix not to allow ddX to touch the field in the GC, and require it to keep its own copy in devPriv, but since clip masks can be very large, this seems like a bad idea. Thus, the server allows ddX to do whatever it wants to the clientClip field of the GC, but requires it to do all manipulation itself.
void pGC->funcs->ChangeClip(pGC, type, pValue, nrects) GCPtr pGC; int type; char *pValue; int nrects;
This routine is called whenever the client changes the client clip region. The pGC points to the GC involved, the type tells what form the region has been sent in. If type is CT_NONE, then there is no client clip. If type is CT_UNSORTED, CT_YBANDED or CT_YXBANDED, then pValue pointer to a list of rectangles, nrects long. If type is CT_REGION, then pValue pointer to a RegionRec from the mi region code. If type is CT_PIXMAP pValue is a pointer to a pixmap. (The defines for CT_NONE, etc. are in Xserver/include/gc.h.) This routine is responsible for incrementing any necessary reference counts (e.g. for a pixmap clip mask) for the new clipmask and freeing anything that used to be in the GC's clipMask field. The lists of rectangles passed in can be freed with free(), the regions can be destroyed with the RegionDestroy field in the screen, and pixmaps can be destroyed by calling the screen's DestroyPixmap function. DIX and MI code expect what they pass in to this to be freed or otherwise inaccessible, and will never look inside what's been put in the GC. This is a good place to be wary of storage leaks.
In the sample server, this routine transforms either the bitmap or the rectangle list into a region, so that future routines will have a more predictable starting point to work from. (The validate routine must take this client clip region and merge it with other regions to arrive at a composite clip region before any drawing is done.)
void pGC->funcs->DestroyClip(pGC) GCPtr pGC;
This routine is called whenever the client clip region must be destroyed. The pGC points to the GC involved. This call should set the clipType field of the GC to CT_NONE. In the sample server, the pointer to the client clip region is set to NULL by this routine after destroying the region, so that other software (including ChangeClip() above) will recognize that there is no client clip region.
void pGC->funcs->CopyClip(pgcDst, pgcSrc) GCPtr pgcDst, pgcSrc;
This routine makes a copy of the clipMask and clipType from pgcSrc into pgcDst. It is responsible for destroying any previous clipMask in pgcDst. The clip mask in the source can be the same as the clip mask in the dst (clients do the strangest things), so care must be taken when destroying things. This call is required because dix does not know how to copy the clip mask from pgcSrc.
Drawing Primitives The X protocol (rules for the byte stream that goes between client and server) does all graphics using primitive operations, which are called Drawing Primitives. These include line drawing, area filling, arcs, and text drawing. Your implementation must supply 16 routines to perform these on your hardware. (The number 16 is arbitrary.) More specifically, 16 procedure pointers are in each GC op vector. At any given time, ALL of them MUST point to a valid procedure that attempts to do the operation assigned, although the procedure pointers may change and may point to different procedures to carry out the same operation. A simple server will leave them all pointing to the same 16 routines, while a more optimized implementation will switch each from one procedure to another, depending upon what is most optimal for the current GC and drawable. The sample server contains a considerable chunk of code called the mi (machine independent) routines, which serve as drawing primitive routines. Many server implementations will be able to use these as-is, because they work for arbitrary depths. They make no assumptions about the formats of pixmaps and frame buffers, since they call a set of routines known as the "Pixblit Routines" (see next section). They do assume that the way to draw is through these low-level routines that apply pixel values rows at a time. If your hardware or firmware gives more performance when things are done differently, you will want to take this fact into account and rewrite some or all of the drawing primitives to fit your needs.
GC Components This section describes the fields in the GC that affect each drawing primitive. The only primitive that is not affected is GetImage, which does not use a GC because its destination is a protocol-style bit image. Since each drawing primitive mirrors exactly the X protocol request of the same name, you should refer to the X protocol specification document for more details. ALL of these routines MUST CLIP to the appropriate regions in the drawable. Since there are many regions to clip to simultaneously, your ValidateGC routine should combine these into a unified clip region to which your drawing routines can quickly refer. This is exactly what the fb routines supplied with the sample server do. The mi implementation passes responsibility for clipping while drawing down to the Pixblit routines. Also, all of them must adhere to the current plane mask. The plane mask has one bit for every bit plane in the drawable; only planes with 1 bits in the mask are affected by any drawing operation. All functions except for ImageText calls must obey the alu function. This is usually Copy, but could be any of the allowable 16 raster-ops. All of the functions, except for CopyArea, might use the current foreground and background pixel values. Each pixel value is 32 bits. These correspond to foreground and background colors, but you have to run them through the colormap to find out what color the pixel values represent. Do not worry about the color, just apply the pixel value. The routines that draw lines (PolyLine, PolySegment, PolyRect, and PolyArc) use the line width, line style, cap style, and join style. Line width is in pixels. The line style specifies whether it is solid or dashed, and what kind of dash. The cap style specifies whether Rounded, Butt, etc. The join style specifies whether joins between joined lines are Miter, Round or Beveled. When lines cross as part of the same polyline, they are assumed to be drawn once. (See the X protocol specification for more details.) Zero-width lines are NOT meant to be really zero width; this is the client's way of telling you that you can optimize line drawing with little regard to the end caps and joins. They are called "thin" lines and are meant to be one pixel wide. These are frequently done in hardware or in a streamlined assembly language routine. Lines with widths greater than zero, though, must all be drawn with the same algorithm, because client software assumes that every jag on every line at an angle will come at the same place. Two lines that should have one pixel in the space between them (because of their distance apart and their widths) should have such a one-pixel line of space between them if drawn, regardless of angle. The solid area fill routines (FillPolygon, PolyFillRect, PolyFillArc) all use the fill rule, which specifies subtle interpretations of what points are inside and what are outside of a given polygon. The PolyFillArc routine also uses the arc mode, which specifies whether to fill pie segments or single-edge slices of an ellipse. The line drawing, area fill, and PolyText routines must all apply the correct "fill style." This can be either a solid foreground color, a transparent stipple, an opaque stipple, or a tile. Stipples are bitmaps where the 1 bits represent that the foreground color is written, and 0 bits represent that either the pixel is left alone (transparent) or that the background color is written (opaque). A tile is a pixmap of the full depth of the GC that is applied in its full glory to all areas. The stipple and tile patterns can be any rectangular size, although some implementations will be faster for certain sizes such as 8x8 or 32x32. The mi implementation passes this responsibility down to the Pixblit routines. See the X protocol document for full details. The description of the CreateGC request has a very good, detailed description of these attributes.
The Primitives The Drawing Primitives are as follows:
RegionPtr pGC->ops->CopyArea(src, dst, pGC, srcx, srcy, w, h, dstx, dsty) DrawablePtr dst, src; GCPtr pGC; int srcx, srcy, w, h, dstx, dsty;
CopyArea copies a rectangle of pixels from one drawable to another of the same depth. To effect scrolling, this must be able to copy from any drawable to itself, overlapped. No squeezing or stretching is done because the source and destination are the same size. However, everything is still clipped to the clip regions of the destination drawable.
If pGC->graphicsExposures is True, any portions of the destination which were not valid in the source (either occluded by covering windows, or outside the bounds of the drawable) should be collected together and returned as a region (if this resultant region is empty, NULL can be returned instead). Furthermore, the invalid bits of the source are not copied to the destination and (when the destination is a window) are filled with the background tile. The sample routine miHandleExposures generates the appropriate return value and fills the invalid area using pScreen->PaintWindowBackground. For instance, imagine a window that is partially obscured by other windows in front of it. As text is scrolled on your window, the pixels that are scrolled out from under obscuring windows will not be available on the screen to copy to the right places, and so an exposure event must be sent for the client to correctly repaint them. Of course, if you implement backing store, you could do this without resorting to exposure events. An example implementation is fbCopyArea() in Xserver/fb/fbcopy.c.
RegionPtr pGC->ops->CopyPlane(src, dst, pGC, srcx, srcy, w, h, dstx, dsty, plane) DrawablePtr dst, src; GCPtr pGC; int srcx, srcy, w, h, dstx, dsty; unsigned long plane;
CopyPlane must copy one plane of a rectangle from the source drawable onto the destination drawable. Because this routine only copies one bit out of each pixel, it can copy between drawables of different depths. This is the only way of copying between drawables of different depths, except for copying bitmaps to pixmaps and applying foreground and background colors to it. All other conditions of CopyArea apply to CopyPlane too.
An example implementation is fbCopyPlane() in Xserver/fb/fbcopy.c.
void pGC->ops->PolyPoint(dst, pGC, mode, n, pPoint) DrawablePtr dst; GCPtr pGC; int mode; int n; DDXPointPtr pPoint;
PolyPoint draws a set of one-pixel dots (foreground color) at the locations given in the array. mode is one of the defined constants Origin (absolute coordinates) or Previous (each coordinate is relative to the last). Note that this does not use the background color or any tiles or stipples.
Example implementations are fbPolyPoint() in Xserver/fb/fbpoint.c and miPolyPoint in Xserver/mi/mipolypnt.c.
void pGC->ops->Polylines(dst, pGC, mode, n, pPoint) DrawablePtr dst; GCPtr pGC; int mode; int n; DDXPointPtr pPoint;
Similar to PolyPoint, Polylines draws lines between the locations given in the array. Zero-width lines are NOT meant to be really zero width; this is the client's way of telling you that you can maximally optimize line drawing with little regard to the end caps and joins. mode is one of the defined constants Previous or Origin, depending upon whether the points are each relative to the last or are absolute.
Example implementations are miWideLine() and miWideDash() in mi/miwideline.c and miZeroLine() in mi/mizerline.c.
void pGC->ops->PolySegment(dst, pGC, n, pPoint) DrawablePtr dst; GCPtr pGC; int n; xSegment *pSegments;
PolySegments draws unconnected lines between pairs of points in the array; the array must be of even size; no interconnecting lines are drawn.
An example implementation is miPolySegment() in mipolyseg.c.
void pGC->ops->PolyRectangle(dst, pGC, n, pRect) DrawablePtr dst; GCPtr pGC; int n; xRectangle *pRect;
PolyRectangle draws outlines of rectangles for each rectangle in the array.
An example implementation is miPolyRectangle() in Xserver/mi/mipolyrect.c.
void pGC->ops->PolyArc(dst, pGC, n, pArc) DrawablePtr dst; GCPtr pGC; int n; xArc*pArc;
PolyArc draws connected conic arcs according to the descriptions in the array. See the protocol specification for more details.
Example implementations are miZeroPolyArc in Xserver/mi/mizerarc. and miPolyArc() in Xserver/mi/miarc.c.
void pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pPoint) DrawablePtr dst; GCPtr pGC; int shape; int mode; int count; DDXPointPtr pPoint;
FillPolygon fills a polygon specified by the points in the array with the appropriate fill style. If necessary, an extra border line is assumed between the starting and ending lines. The shape can be used as a hint to optimize filling; it indicates whether it is convex (all interior angles less than 180), nonconvex (some interior angles greater than 180 but border does not cross itself), or complex (border crosses itself). You can choose appropriate algorithms or hardware based upon mode. mode is one of the defined constants Previous or Origin, depending upon whether the points are each relative to the last or are absolute.
An example implementation is miFillPolygon() in Xserver/mi/mipoly.c.
void pGC->ops->PolyFillRect(dst, pGC, n, pRect) DrawablePtr dst; GCPtr pGC; int n; xRectangle *pRect;
PolyFillRect fills multiple rectangles.
Example implementations are fbPolyFillRect() in Xserver/fb/fbfillrect.c and miPolyFillRect() in Xserver/mi/mifillrct.c.
void pGC->ops->PolyFillArc(dst, pGC, n, pArc) DrawablePtr dst; GCPtr pGC; int n; xArc *pArc;
PolyFillArc fills a shape for each arc in the list that is bounded by the arc and one or two line segments with the current fill style.
An example implementation is miPolyFillArc() in Xserver/mi/mifillarc.c.
void pGC->ops->PutImage(dst, pGC, depth, x, y, w, h, leftPad, format, pBinImage) DrawablePtr dst; GCPtr pGC; int x, y, w, h; int format; char *pBinImage;
PutImage copies a pixmap image into the drawable. The pixmap image must be in X protocol format (either Bitmap, XYPixmap, or ZPixmap), and format tells the format. (See the X protocol specification for details on these formats). You must be able to accept all three formats, because the client gets to decide which format to send. Either the drawable and the pixmap image have the same depth, or the source pixmap image must be a Bitmap. If a Bitmap, the foreground and background colors will be applied to the destination.
An example implementation is fbPutImage() in Xserver/fb/fbimage.c.
void pScreen->GetImage(src, x, y, w, h, format, planeMask, pBinImage) DrawablePtr src; int x, y, w, h; unsigned int format; unsigned long planeMask; char *pBinImage;
GetImage copies the bits from the source drawable into the destination pointer. The bits are written into the buffer according to the server-defined pixmap padding rules. pBinImage is guaranteed to be big enough to hold all the bits that must be written.
This routine does not correspond exactly to the X protocol GetImage request, since DIX has to break the reply up into buffers of a size requested by the transport layer. If format is ZPixmap, the bits are written in the ZFormat for the depth of the drawable; if there is a 0 bit in the planeMask for a particular plane, all pixels must have the bit in that plane equal to 0. If format is XYPixmap, planemask is guaranteed to have a single bit set; the bits should be written in Bitmap format, which is the format for a single plane of an XYPixmap. An example implementation is miGetImage() in Xserver/mi/mibitblt.c.
void pGC->ops->ImageText8(pDraw, pGC, x, y, count, chars) DrawablePtr pDraw; GCPtr pGC; int x, y; int count; char *chars;
ImageText8 draws text. The text is drawn in the foreground color; the background color fills the remainder of the character rectangles. The coordinates specify the baseline and start of the text.
An example implementation is miImageText8() in Xserver/mi/mipolytext.c.
int pGC->ops->PolyText8(pDraw, pGC, x, y, count, chars) DrawablePtr pDraw; GCPtr pGC; int x, y; int count; char *chars;
PolyText8 works like ImageText8, except it draws with the current fill style for special effects such as shaded text. See the X protocol specification for more details.
An example implementation is miPolyText8() in Xserver/mi/mipolytext.c.
int pGC->ops->PolyText16(pDraw, pGC, x, y, count, chars) DrawablePtr pDraw; GCPtr pGC; int x, y; int count; unsigned short *chars; void pGC->ops->ImageText16(pDraw, pGC, x, y, count, chars) DrawablePtr pDraw; GCPtr pGC; int x, y; int count; unsigned short *chars;
These two routines are the same as the "8" versions, except that they are for 16-bit character codes (useful for oriental writing systems).
The primary difference is in the way the character information is looked up. The 8-bit and the 16-bit versions obviously have different kinds of character values to look up; the main goal of the lookup is to provide a pointer to the CharInfo structs for the characters to draw and to pass these pointers to the Glyph routines. Given a CharInfo struct, lower-level software can draw the glyph desired with little concern for other characteristics of the font. 16-bit character fonts have a row-and-column scheme, where the 2bytes of the character code constitute the row and column in a square matrix of CharInfo structs. Each font has row and column minimum and maximum values; the CharInfo structures form a two-dimensional matrix. Example implementations are miPolyText16() and miImageText16() in Xserver/mi/mipolytext.c. See the X protocol specification for more details on these graphic operations. There is a hook in the GC ops, called LineHelper, that used to be used in the sample implementation by the code for wide lines. It no longer servers any purpose in the sample servers, but still exists, #ifdef'ed by NEED_LINEHELPER, in case someone needs it.
Pixblit Procedures The Drawing Primitive functions must be defined for your server. One possible way to do this is to use the mi routines from the sample server. If you choose to use the mi routines (even part of them!) you must implement these Pixblit routines. These routines read and write pixel values and deal directly with the image data. The Pixblit routines for the sample server are part of the "fb" routines. As with the mi routines, the fb routines are portable but are not as portable as the mi routines. The fb subsystem is a depth-independent framebuffer core, capable of operating at any depth from 1 to 32, based on the depth of the window or pixmap it is currently operating on. In particular, this means it can support pixmaps of multiple depths on the same screen. It supplies both Pixblit routines and higher-level optimized implementations of the Drawing Primitive routines. It does make the assumption that the pixel data it touches is available in the server's address space. In other words, if you have a "normal" frame buffer type display, you can probably use the fb code, and the mi code. If you have a stranger hardware, you will have to supply your own Pixblit routines, but you can use the mi routines on top of them. If you have better ways of doing some of the Drawing Primitive functions, then you may want to supply some of your own Drawing Primitive routines. (Even people who write their own Drawing Primitives save at least some of the mi code for certain special cases that their hardware or library or fancy algorithm does not handle.) The client, DIX, and the machine-independent routines do not carry the final responsibility of clipping. They all depend upon the Pixblit routines to do their clipping for them. The rule is, if you touch the frame buffer, you clip. (The higher level routines may decide to clip at a high level, but this is only for increased performance and cannot substitute for bottom-level clipping. For instance, the mi routines, DIX, or the client may decide to check all character strings to be drawn and chop off all characters that would not be displayed. If so, it must retain the character on the edge that is partly displayed so that the Pixblit routines can clip off precisely at the right place.) To make this easier, all of the reasons to clip can be combined into one region in your ValidateGC procedure. You take this composite clip region with you into the Pixblit routines. (The sample server does this.) Also, FillSpans() has to apply tile and stipple patterns. The patterns are all aligned to the window origin so that when two people write patches that are contiguous, they will merge nicely. (Really, they are aligned to the patOrg point in the GC. This defaults to (0, 0) but can be set by the client to anything.) However, the mi routines can translate (relocate) the points from window-relative to screen-relative if desired. If you set the miTranslate field in the GC (set it in the CreateGC or ValidateGC routine), then the mi output routines will translate all coordinates. If it is false, then the coordinates will be passed window-relative. Screens with no hardware translation will probably set miTranslate to TRUE, so that geometry (e.g. polygons, rectangles) can be translated, rather than having the resulting list of scanlines translated; this is good because the list vertices in a drawing request will generally be much smaller than the list of scanlines it produces. Similarly, hardware that does translation can set miTranslate to FALSE, and avoid the extra addition per vertex, which can be (but is not always) important for getting the highest possible performance. (Contrast the behavior of GetSpans, which is not expected to be called as often, and so has different constraints.) The miTranslate field is settable in each GC, if , for example, you are mixing several kinds of destinations (offscreen pixmaps, main memory pixmaps, backing store, and windows), all of which have different requirements, on one screen. As with other drawing routines, there are fields in the GC to direct higher code to the correct routine to execute for each function. In this way, you can optimize for special cases, for example, drawing solids versus drawing stipples. The Pixblit routines are broken up into three sets. The Span routines simply fill in rows of pixels. The Glyph routines fill in character glyphs. The PushPixels routine is a three-input bitblt for more sophisticated image creation. It turns out that the Glyph and PushPixels routines actually have a machine-independent implementation that depends upon the Span routines. If you are really pressed for time, you can use these versions, although they are quite slow.
Span Routines For these routines, all graphic operations have been reduced to "spans." A span is a horizontal row of pixels. If you can design these routines which write into and read from rows of pixels at a time, you can use the mi routines. Each routine takes a destination drawable to draw into, a GC to use while drawing, the number of spans to do, and two pointers to arrays that indicate the list of starting points and the list of widths of spans.
void pGC->ops->FillSpans(dst, pGC, nSpans, pPoints, pWidths, sorted) DrawablePtr dst; GCPtr pGC; int nSpans; DDXPointPtr pPoints; int *pWidths; int sorted;
FillSpans should fill horizontal rows of pixels with the appropriate patterns, stipples, etc., based on the values in the GC. The starting points are in the array at pPoints; the widths are in pWidths. If sorted is true, the scan lines are in increasing y order, in which case you may be able to make assumptions and optimizations.
GC components: alu, clipOrg, clientClip, and fillStyle. GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg (for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple).
void pGC->ops->SetSpans(pDrawable, pGC, pSrc, ppt, pWidths, nSpans, sorted) DrawablePtr pDrawable; GCPtr pGC; char *pSrc; DDXPointPtr pPoints; int *pWidths; int nSpans; int sorted;
For each span, this routine should copy pWidths bits from pSrc to pDrawable at pPoints using the raster-op from the GC. If sorted is true, the scan lines are in increasing y order. The pixels in pSrc are padded according to the screen's padding rules. These can be used to support interesting extension libraries, for example, shaded primitives. It does not use the tile and stipple.
GC components: alu, clipOrg, and clientClip The above functions are expected to handle all modifiers in the current GC. Therefore, it is expedient to have different routines to quickly handle common special cases and reload the procedure pointers at validate time, as with the other output functions.
void pScreen->GetSpans(pDrawable, wMax, pPoints, pWidths, nSpans) DrawablePtr pDrawable; int wMax; DDXPointPtr pPoints; int *pWidths; int nSpans; char *pDst;
For each span, GetSpans gets bits from the drawable starting at pPoints and continuing for pWidths bits. Each scanline returned will be server-scanline padded. The routine can return NULL if memory cannot be allocated to hold the result.
GetSpans never translates -- for a window, the coordinates are already screen-relative. Consider the case of hardware that doesn't do translation: the mi code that calls ddX will translate each shape (rectangle, polygon,. etc.) before scan-converting it, which requires many fewer additions that having GetSpans translate each span does. Conversely, consider hardware that does translate: it can set its translation point to (0, 0) and get each span, and the only penalty is the small number of additions required to translate each shape being scan-converted by the calling code. Contrast the behavior of FillSpans and SetSpans (discussed above under miTranslate), which are expected to be used more often. Thus, the penalty to hardware that does hardware translation is negligible, and code that wants to call GetSpans() is greatly simplified, both for extensions and the machine-independent core implementation.
Glyph Routines The Glyph routines draw individual character glyphs for text drawing requests. You have a choice in implementing these routines. You can use the mi versions; they depend ultimately upon the span routines. Although text drawing will work, it will be very slow.
void pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) DrawablePtr pDrawable; GCPtr pGC; int x , y; unsigned int nglyph; CharInfoRec **ppci; /* array of character info */ pointer unused; /* unused since R5 */
GC components: alu, clipOrg, clientClip, font, and fillStyle.
GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg (for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple).
void pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) DrawablePtr pDrawable; GCPtr pGC; int x , y; unsigned int nglyph; CharInfoRec **ppci; /* array of character info */ pointer unused; /* unused since R5 */
GC components: clipOrg, clientClip, font, fgPixel, bgPixel
These routines must copy the glyphs defined by the bitmaps in pglyphBase and the font metrics in ppci to the DrawablePtr, pDrawable. The poly routine follows all fill, stipple, and tile rules. The image routine simply blasts the glyph onto the glyph's rectangle, in foreground and background colors. More precisely, the Image routine fills the character rectangle with the background color, and then the glyph is applied in the foreground color. The glyph can extend outside of the character rectangle. ImageGlyph() is used for terminal emulators and informal text purposes such as button labels. The exact specification for the Poly routine is that the glyph is painted with the current fill style. The character rectangle is irrelevant for this operation. PolyText, at a higher level, includes facilities for font changes within strings and such; it is to be used for WYSIWYG word processing and similar systems. Both of these routines must clip themselves to the overall clipping region. Example implementations in mi are miPolyGlyphBlt() and miImageGlyphBlt() in Xserver/mi/miglblt.c.
PushPixels routine The PushPixels routine writes the current fill style onto the drawable in a certain shape defined by a bitmap. PushPixels is equivalent to using a second stipple. You can thing of it as pushing the fillStyle through a stencil. PushPixels is not used by any of the mi rendering code, but is used by the mi software cursor code.
Suppose the stencil is: 00111100 and the stipple is: 10101010 PushPixels result: 00101000
You have a choice in implementing this routine. You can use the mi version which depends ultimately upon FillSpans(). Although it will work, it will be slow.
void pGC->ops->PushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg) GCPtr pGC; PixmapPtr pBitMap; DrawablePtr pDrawable; int dx, dy, xOrg, yOrg;
GC components: alu, clipOrg, clientClip, and fillStyle.
GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg (for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple). PushPixels applies the foreground color, tile, or stipple from the pGC through a stencil onto pDrawable. pBitMap points to a stencil (of which we use an area dx wide by dy high), which is oriented over the drawable at xOrg, yOrg. Where there is a 1 bit in the bitmap, the destination is set according to the current fill style. Where there is a 0 bit in the bitmap, the destination is left the way it is. This routine must clip to the overall clipping region. An Example implementation is miPushPixels() in Xserver/mi/mipushpxl.c.
Shutdown Procedures
void ddxGiveUp(enum ExitCode error)
Some hardware may require special work to be done before the server exits so that it is not left in an intermediate state. As explained in the OS layer, FatalError() will call ddxGiveUp() just before terminating the server. In addition, ddxGiveUp() will be called just before terminating the server on a "clean" death. What ddxGiveUp does is left unspecified, only that it must exist in the ddx layer. It is up to local implementors as to what they should accomplish before termination.
Command Line Procedures
int ddxProcessArgument(argc, argv, i) int argc; char *argv[]; int i; void ddxUseMsg()
You should write these routines to deal with device-dependent command line arguments. The routine ddxProcessArgument() is called with the command line, and the current index into argv; you should return zero if the argument is not a device-dependent one, and otherwise return a count of the number of elements of argv that are part of this one argument. For a typical option (e.g., "-realtime"), you should return the value one. This routine gets called before checks are made against device-independent arguments, so it is possible to peek at all arguments or to override device-independent argument processing. You can document the device-dependent arguments in ddxUseMsg(), which will be called from UseMsg() after printing out the device-independent arguments.
Wrappers and Privates Two new extensibility concepts have been developed for release 4, Wrappers and devPrivates. These replace the R3 GCInterest queues, which were not a general enough mechanism for many extensions and only provided hooks into a single data structure. devPrivates have been revised substantially for X.Org X server release 1.5, updated again for the 1.9 release and extended again for the 1.13 relealse.
devPrivates devPrivates provides a way to attach arbitrary private data to various server structures. Any structure which contains a devPrivates field of type PrivateRec supports this mechanism. Some structures allow allocating space for private data after some objects have been created, others require all space allocations be registered before any objects of that type are created. Xserver/include/privates.h lists which of these cases applies to each structure containing devPrivates. To request private space, use
Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size);
The first argument is a pointer to a DevPrivateKeyRec which will serve as the unique identifier for the private data. Typically this is the address of a static DevPrivateKeyRec in your code. The second argument is the class of objects for which this key will apply. The third argument is the size of the space being requested, or 0 to only allocate a pointer that the caller will manage. If space is requested, this space will be automatically freed when the object is destroyed. Note that a call to dixSetPrivate that changes the pointer value may cause the space to be unreachable by the caller, however it will still be automatically freed. The function returns TRUE unless memory allocation fails. If the function is called more than once on the same key, all calls must use the same value for size or the server will abort.
To request per-screen private space in an object, use
Bool dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen, DevPrivateType type, unsigned size);
The type and size arguments are the same as those to dixRegisterPrivateKey but this function ensures the given key exists on objects of the specified type with distinct storage for the given pScreen. The key is usable on ScreenPrivate variants that are otherwise equivalent to the following Private functions.
To request private space in objects created for a specific screen, use
Bool dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, DevPrivateType type, unsigned size);
The type and size arguments are the same as those to dixRegisterPrivateKey but this function ensures only that the given key exists on objects of the specified type that are allocated with reference to the specified pScreen. Using the key on objects allocated for other screens will result in incorrect results; there is no check made to ensure that the caller's screen matches the private's screen. The key is usable in any of the following functions. Screen-specific private storage is available only for Windows, GCs, Pixmaps and Pictures. Attempts to allocate screen-specific privates on other objects will result in a call to FatalError.
To attach a piece of private data to an object, use:
void dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val)
The first argument is the address of the devPrivates field in the target structure. This field is managed privately by the DIX layer and should not be directly modified. The second argument is a pointer to the DevPrivateKeyRec which you registered with dixRegisterPrivateKey or allocated with dixCreatePrivateKey. Only one piece of data with a given key can be attached to an object, and in most cases each key is specific to the type of object it was registered for. (An exception is the PRIVATE_XSELINUX class which applies to multiple object types.) The third argument is the value to store.
If private data with the given key is already associated with the object, dixSetPrivate will overwrite the old value with the new one. To look up a piece of private data, use one of:
pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) pointer *dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key)
The first argument is the address of the devPrivates field in the target structure. The second argument is the key to look up. If a non-zero size was given when the key was registered, or if private data with the given key is already associated with the object, then dixLookupPrivate will return the pointer value while dixLookupPrivateAddr will return the address of the pointer.
When implementing new server resource objects that support devPrivates, there are four steps to perform: Add a type value to the DevPrivateType enum in Xserver/include/privates.h, declare a field of type PrivateRec * in your structure; initialize this field to NULL when creating any objects; and when freeing any objects call the dixFreePrivates or dixFreeObjectWithPrivates function.
Wrappers Wrappers are not a body of code, nor an interface spec. They are, instead, a technique for hooking a new module into an existing calling sequence. There are limitations on other portions of the server implementation which make using wrappers possible; limits on when specific fields of data structures may be modified. They are intended as a replacement for GCInterest queues, which were not general enough to support existing modules; in particular software cursors needed more control over the activity. The general mechanism for using wrappers is:
privateWrapperFunction (object, ...) ObjectPtr object; { pre-wrapped-function-stuff ... object->functionVector = dixLookupPrivate(&object->devPrivates, privateKey); (*object->functionVector) (object, ...); /* * this next line is occasionally required by the rules governing * wrapper functions. Always using it will not cause problems. * Not using it when necessary can cause severe troubles. */ dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); object->functionVector = privateWrapperFunction; post-wrapped-function-stuff ... } privateInitialize (object) ObjectPtr object; { dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); object->functionVector = privateWrapperFunction; }
Thus the privateWrapperFunction provides hooks for performing work both before and after the wrapped function has been called; the process of resetting the functionVector is called "unwrapping" while the process of fetching the wrapped function and replacing it with the wrapping function is called "wrapping". It should be clear that GCInterest queues could be emulated using wrappers. In general, any function vectors contained in objects can be wrapped, but only vectors in GCs and Screens have been tested. Wrapping screen functions is quite easy; each vector is individually wrapped. Screen functions are not supposed to change after initialization, so rewrapping is technically not necessary, but causes no problems. Wrapping GC functions is a bit more complicated. GC's have two tables of function vectors, one hanging from gc->ops and the other from gc->funcs, which should be initially wrapped from a CreateGC wrapper. Wrappers should modify only table pointers, not the contents of the tables, as they may be shared by more than one GC (and, in the case of funcs, are probably shared by all gcs). Your func wrappers may change the GC funcs or ops pointers, and op wrappers may change the GC op pointers but not the funcs. Thus, the rule for GC wrappings is: wrap the funcs from CreateGC and, in each func wrapper, unwrap the ops and funcs, call down, and re-wrap. In each op wrapper, unwrap the ops, call down, and rewrap afterwards. Note that in re-wrapping you must save out the pointer you're replacing again. This way the chain will be maintained when wrappers adjust the funcs/ops tables they use.
Work Queue To queue work for execution when all clients are in a stable state (i.e. just before calling select() in WaitForSomething), call:
Bool QueueWorkProc(function,client,closure) Bool (*function)(); ClientPtr client; pointer closure;
When the server is about to suspend itself, the given function will be executed:
(*function) (client, closure)
Neither client nor closure are actually used inside the work queue routines.
Summary of Routines This is a summary of the routines discussed in this document. The procedure names are in alphabetical order. The Struct is the structure it is attached to; if blank, this procedure is not attached to a struct and must be named as shown. The sample server provides implementations in the following categories. Notice that many of the graphics routines have both mi and fb implementations. dix portable to all systems; do not attempt to rewrite (Xserver/dix) os routine provided in Xserver/os or Xserver/include/os.h ddx frame buffer dependent (examples in Xserver/fb) mi routine provided in Xserver/mi hd hardware dependent (examples in many Xserver/hw directories) none not implemented in sample implementation Server Routines (Page 1) Procedure Port Struct ALLOCATE_LOCALosAddCallbackdixAddEnabledDeviceosAddInputDevicedixAddScreendixAdjustWaitForDelayosBellhdDeviceChangeClipmiGC funcChangeGCGC funcChangeWindowAttributesddxScreenClearToBackgroundddxWindowClientAuthorizedosClientSignaldixClientSleepdixClientWakeupdixClipNotifyddxScreenCloseScreenhdConstrainCursorhdScreenCopyAreamiGC opCopyGCDestddxGC funcCopyGCSourcenoneGC funcCopyPlanemiGC opCopyWindowddxWindowCreateGCddxScreenCreateCallbackListdixCreatePixmapddxScreenCreateScreenResourcesddxScreenCreateWellKnowSocketsosCreateWindowddxScreenCursorLimitshdScreenDEALLOCATE_LOCALosDeleteCallbackdixDeleteCallbackListdixDestroyClipddxGC funcDestroyGCddxGC funcDestroyPixmapddxScreenDestroyWindowddxScreenDisplayCursorhdScreenErrorosErrorFosFatalErrorosFillPolygonmiGC opFillSpansddxGC opFlushAllOutputosFlushIfCriticalOutputPendingosFreeScratchPixmapHeaderdixGetImagemiScreenGetMotionEventshdDeviceGetScratchPixmapHeaderdixGetSpansddxScreenGetStaticColormapddxScreen
Server Routines (Page 2) Procedure Port Struct ImageGlyphBltmiGC opImageText16miGC opImageText8miGC opInitInputhdInitKeyboardDeviceStructdixInitOutputhdInitPointerDeviceStructdixInsertFakeRequestosInstallColormapddxScreenIntersectmiScreenInversemiScreenLineHelpermiGC opListInstalledColormapsddxScreenLookupKeyboardDevicedixLookupPointerDevicedixModifyPixmapHeadermiScreenNextAvailableClientdixOsInitosPaintWindowBackgroundmiWindowPaintWindowBordermiWindowPointerNonInterestBoxhdScreenPointInRegionmiScreenPolyArcmiGC opPolyFillArcmiGC opPolyFillRectmiGC opPolyGlyphBltmiGC opPolylinesmiGC opPolyPointmiGC opPolyRectanglemiGC opPolySegmentmiGC opPolyText16miGC opPolyText8miGC opPositionWindowddxScreenProcessInputEventshdPushPixelsmiGC opPutImagemiGC opQueryBestSizehdScreenReadRequestFromClientosRealizeCursorhdScreenRealizeFontddxScreenRealizeWindowddxScreenRecolorCursorhdScreenRectInmiScreenRegionCopymiScreenRegionCreatemiScreenRegionDestroymiScreenRegionEmptymiScreenRegionExtentsmiScreenRegionNotEmptymiScreenRegionResetmiScreenResolveColorddxScreen
Server Routines (Page 3) Procedure Port Struct RemoveEnabledDeviceosResetCurrentRequestosSaveScreenddxScreenSetCriticalOutputPendingosSetCursorPositionhdScreenSetInputCheckdixSetSpansddxGC opStoreColorsddxScreenSubtractmiScreenTimerCancelosTimerCheckosTimerForceosTimerFreeosTimerInitosTimerSetosTimeSinceLastInputEventhdTranslateRegionmiScreenUninstallColormapddxScreenUnionmiScreenUnrealizeCursorhdScreenUnrealizeFontddxScreenUnrealizeWindowddxScreenValidateGCddxGC funcValidateTreemiScreenWaitForSomethingosWindowExposuresmiWindowWriteToClientos
xorg-server-21.1.16/doc/Xinput.xml0000644000175000017500000013435514757411105012424 %defs; ]> X11 Input Extension Porting Document GeorgeSachs Hewlett-Packard X Server Version &xserver.version; 198919901991 Hewlett-Packard Company Permission to use, copy, modify, and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. Hewlett-Packard makes no representations about the suitability for any purpose of the information in this document. It is provided "as is" without express or implied warranty. This document is only a draft stan- dard of the X Consortium and is therefore subject to change. Copyright © 1989, 1990, 1991 X Consortium 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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 X Consortium 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 X Consortium. X Window System is a trademark of The Open Group. X11 Input Extension Porting Document This document is intended to aid the process of integrating the X11 Input Extension into an X server. Most of the functionality provided by the input extension is device- and implementation-independent, and should require no changes. The functionality is implemented by routines that typically reside in the server source tree directory extensions/server/xinput. This extension includes functions to enable and disable input extension devices, select input, grab and focus those devices, query and change key and button mappings, and others. The only input extension requirements for the device-dependent part of X are that the input devices be correctly initialized and input events from those devices be correctly generated. Device-dependent X is responsible for reading input data from the input device hardware and if necessary, reformatting it into X events. The process of initializing input extension devices is similar to that used for the core devices, and is described in the following sections. When multiple input devices are attached to X server, the choice of which devices to initially use as the core X pointer and keyboard is left implementation-dependent. It is also up to each implementation to decide whether all input devices will be opened by the server during its initialization and kept open for the life of the server. The alternative is to open only the X keyboard and X pointer during server initialization, and open other input devices only when requested by a client to do so. Either type of implementation is supported by the input extension. Input extension events generated by the X server use the same 32-byte xEvent wire event as do core input events. However, additional information must be sent for input extension devices, requiring that multiple xEvents be generated each time data is received from an input extension device. These xEvents are combined into a single client XEvent by the input extension library. A later section of this document describes the format and generation of input extension events. Initializing Extension Devices Extension input devices are initialized in the same manner as the core X input devices. Device-Independent X provides functions that can be called from DDX to initialize these devices. Which functions are called and when will vary by implementation, and will depend on whether the implementation opens all the input devices available to X when X is initialized, or waits until a client requests that a device be opened. In the simplest case, DDX will open all input devices as part of its initialization, when the InitInput routine is called. Summary of Calling Sequence Device-Independent X | Device-Dependent X -------------------- | ------------------- | InitInput --------------> | - do device-specific initialization | | - call AddInputDevice (deviceProc,AutoStart) AddInputDevice | - creates DeviceIntRec | - records deviceProc | - adds new device to | list of off_devices. | sets dev->startup=AutoStart| | - call one of: | - RegisterPointerDevice (X pointer) | - processInputProc = ProcessPointerEvents | - RegisterKeyboardDevice (X keyboard) | - processInputProc = ProcessKeyboardEvents | - RegisterOtherDevice (extension device) | - processInputProc = ProcessOtherEvents | | InitAndStartDevices -----> | - calls deviceProc with parameters | (DEVICE_INIT, AutoStart) sets dev->inited = return | value from deviceProc | | | - in deviceProc, do one of: | - call InitPointerDeviceStruct (X pointer) | - call InitKeyboardDeviceStruct (X keybd) | - init extension device by calling some of: | - InitKeyClassDeviceStruct | - InitButtonClassDeviceStruct | - InitValuatorClassDeviceStruct | - InitValuatorAxisStruct | - InitFocusClassDeviceStruct | - InitProximityClassDeviceStruct | - InitKbdFeedbackClassDeviceStruct | - InitPtrFeedbackClassDeviceStruct | - InitLedFeedbackClassDeviceStruct | - InitStringFeedbackClassDeviceStruct | - InitIntegerFeedbackClassDeviceStruct | - InitBellFeedbackClassDeviceStruct | - init device name and type by: | - calling MakeAtom with one of the | predefined names | - calling AssignTypeAndName | | for each device added | by AddInputDevice, | InitAndStartDevices | calls EnableDevice if | - EnableDevice calls deviceProc with dev->startup & | (DEVICE_ON, AutoStart) dev->inited | | If deviceProc returns | - core devices are now enabled, extension Success, EnableDevice | devices are now available to be accessed move the device from | through the input extension protocol inputInfo.off_devices | requests. to inputInfo.devices | Initialization Called From InitInput InitInput is the first DDX input entry point called during X server startup. This routine is responsible for device- and implementation- specific initialization, and for calling AddInputDevice to create and initialize the DeviceIntRec structure for each input device. AddInputDevice is passed the address of a procedure to be called by the DIX routine InitAndStartDevices when input devices are enabled. This procedure is expected to perform X initialization for the input device. If the device is to be used as the X pointer, DDX should then call RegisterPointerDevice, passing the DeviceIntRec pointer, to initialize the device as the X pointer. If the device is to be used as the X keyboard, DDX should instead call RegisterKeyboardDevice to initialize the device as the X keyboard. If the device is to be used as an extension device, DDX should instead call RegisterOtherDevice, passing the DeviceIntPtr returned by AddInputDevice. A sample InitInput implementation is shown below. InitInput(argc,argv) { int i, numdevs; DeviceIntPtr dev; LocalDevice localdevs[LOCAL_MAX_DEVS]; DeviceProc kbdproc, ptrproc, extproc; /************************************************************** * Open the appropriate input devices, determine which are * available, and choose an X pointer and X keyboard device * in some implementation-dependent manner. ***************************************************************/ open_input_devices (&numdevs, localdevs); /************************************************************** * Register the input devices with DIX. ***************************************************************/ for (i=0; i<numdevs; i++) { if (localdevs[i].use == IsXKeyboard) { dev = AddInputDevice (kbdproc, TRUE); RegisterKeyboardDevice (dev); } else if (localdevs[i].use == IsXPointer) { dev = AddInputDevice (ptrproc, TRUE); RegisterPointerDevice (dev); } else { dev = AddInputDevice (extproc, FALSE); RegisterOtherDevice (dev); } if (dev == NULL) FatalError ("Too many input devices."); dev->devicePrivate = (pointer) &localdevs[i]; } Initialization Called From InitAndStartDevices After InitInput has returned, InitAndStartDevices is the DIX routine that is called to enable input devices. It calls the device control routine that was passed to AddInputDevice, with a mode value of DEVICE_INIT. The action taken by the device control routine depends on how the device is to be used. If the device is to be the X pointer, the device control routine should call InitPointerDeviceStruct to initialize it. If the device is to be the X keyboard, the device control routine should call InitKeyboardDeviceStruct. Since input extension devices may support various combinations of keys, buttons, valuators, and feedbacks, each class of input that it supports must be initialized. Entry points are defined by DIX to initialize each of the supported classes of input, and are described in the following sections. A sample device control routine called from InitAndStartDevices is shown below. Bool extproc (dev, mode) DeviceIntPtr dev; int mode; { LocalDevice *localdev = (LocalDevice *) dev->devicePrivate; switch (mode) { case DEVICE_INIT: if (strcmp(localdev->name, XI_TABLET) == 0) { /**************************************************** * This device reports proximity, has buttons, * reports two axes of motion, and can be focused. * It also supports the same feedbacks as the X pointer * (acceleration and threshold can be set). ****************************************************/ InitButtonClassDeviceStruct (dev, button_count, button_map); InitValuatorClassDeviceStruct (dev, localdev->n_axes,); motionproc, MOTION_BUF_SIZE, Absolute); for (i=0; i<localdev->n_axes; i++) InitValuatorAxisStruct (dev, i, min_val, max_val, resolution); InitFocusClassDeviceStruct (dev); InitProximityClassDeviceStruct (dev); InitPtrFeedbackClassDeviceStruct (dev, p_controlproc); } else if (strcmp(localdev->name, XI_BUTTONBOX) == 0) { /**************************************************** * This device has keys and LEDs, and can be focused. ****************************************************/ InitKeyClassDeviceStruct (dev, syms, modmap); InitFocusClassDeviceStruct (dev); InitLedFeedbackClassDeviceStruct (dev, ledcontrol); } else if (strcmp(localdev->name, XI_KNOBBOX) == 0) { /**************************************************** * This device reports motion. * It can be focused. ****************************************************/ InitValuatorClassDeviceStruct (dev, localdev->n_axes,); motionproc, MOTION_BUF_SIZE, Absolute); for (i=0; i<localdev->n_axes; i++) InitValuatorAxisStruct (dev, i, min_val, max_val, resolution); InitFocusClassDeviceStruct (dev); } localdev->atom = MakeAtom(localdev->name, strlen(localdev->name), FALSE); AssignTypeAndName (dev, localdev->atom, localdev->name); break; case DEVICE_ON: AddEnabledDevice (localdev->file_ds); dev->on = TRUE; break; case DEVICE_OFF: dev->on = FALSE; RemoveEnabledDevice (localdev->file_ds); break; case DEVICE_CLOSE: break; } } The device control routine is called with a mode value of DEVICE_ON by the DIX routine EnableDevice, which is called from InitAndStartDevices. When called with this mode, it should call AddEnabledDevice to cause the server to begin checking for available input from this device. From InitAndStartDevices, EnableDevice is called for all devices that have the "inited" and "startup" fields in the DeviceIntRec set to TRUE. The "inited" field is set by InitAndStartDevices to the value returned by the deviceproc when called with a mode value of DEVICE_INIT. The "startup" field is set by AddInputDevice to value of the second parameter (autoStart). When the server is first initialized, it should only be checking for input from the core X keyboard and pointer. One way to accomplish this is to call AddInputDevice for the core X keyboard and pointer with an autoStart value equal to TRUE, while calling AddInputDevice for input extension devices with an autoStart value equal to FALSE. If this is done, EnableDevice will skip all input extension devices during server initialization. In this case, the OpenInputDevice routine should set the "startup" field to TRUE when called for input extension devices. This will cause ProcXOpenInputDevice to call EnableDevice for those devices when a client first does an XOpenDevice request. DIX Input Class Initialization Routines DIX routines are defined to initialize each of the defined input classes. The defined classes are: KeyClass - the device has keys. ButtonClass - the device has buttons. ValuatorClass - the device reports motion data or positional data. Proximitylass - the device reports proximity information. FocusClass - the device can be focused. FeedbackClass - the device supports some kind of feedback. DIX routines are provided to initialize the X pointer and keyboard, as in previous releases of X. During X initialization, InitPointerDeviceStruct is called to initialize the X pointer, and InitKeyboardDeviceStruct is called to initialize the X keyboard. There is no corresponding routine for extension input devices, since they do not all support the same classes of input. Instead, DDX is responsible for the initialization of the input classes supported by extension devices. A description of the routines provided by DIX to perform that initialization follows. InitKeyClassDeviceStruct This function is provided to allocate and initialize a KeyClassRec, and should be called for extension devices that have keys. It is passed a pointer to the device, and pointers to arrays of keysyms and modifiers reported by the device. It returns FALSE if the KeyClassRec could not be allocated, or if the maps for the keysyms and modifiers could not be allocated. Its parameters are: Bool InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers) DeviceIntPtr dev; KeySymsPtr pKeySyms; CARD8 pModifiers[]; The DIX entry point InitKeyboardDeviceStruct calls this routine for the core X keyboard. It must be called explicitly for extension devices that have keys. InitButtonClassDeviceStruct This function is provided to allocate and initialize a ButtonClassRec, and should be called for extension devices that have buttons. It is passed a pointer to the device, the number of buttons supported, and a map of the reported button codes. It returns FALSE if the ButtonClassRec could not be allocated. Its parameters are: Bool InitButtonClassDeviceStruct(dev, numButtons, map) register DeviceIntPtr dev; int numButtons; CARD8 *map; The DIX entry point InitPointerDeviceStruct calls this routine for the core X pointer. It must be called explicitly for extension devices that have buttons. InitValuatorClassDeviceStruct This function is provided to allocate and initialize a ValuatorClassRec, and should be called for extension devices that have valuators. It is passed the number of axes of motion reported by the device, the address of the motion history procedure for the device, the size of the motion history buffer, and the mode (Absolute or Relative) of the device. It returns FALSE if the ValuatorClassRec could not be allocated. Its parameters are: Bool InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, mode) DeviceIntPtr dev; int (*motionProc)(); int numAxes; int numMotionEvents; int mode; The DIX entry point InitPointerDeviceStruct calls this routine for the core X pointer. It must be called explicitly for extension devices that report motion. InitValuatorAxisStruct This function is provided to initialize an XAxisInfoRec, and should be called for core and extension devices that have valuators. The space for the XAxisInfoRec is allocated by the InitValuatorClassDeviceStruct function, but is not initialized. InitValuatorAxisStruct should be called once for each axis of motion reported by the device. Each invocation should be passed the axis number (starting with 0), the minimum value for that axis, the maximum value for that axis, and the resolution of the device in counts per meter. If the device reports relative motion, 0 should be reported as the minimum and maximum values. InitValuatorAxisStruct has the following parameters: InitValuatorAxisStruct(dev, axnum, minval, maxval, resolution) DeviceIntPtr dev; int axnum; int minval; int maxval; int resolution; This routine is not called by InitPointerDeviceStruct for the core X pointer. It must be called explicitly for core and extension devices that report motion. InitFocusClassDeviceStruct This function is provided to allocate and initialize a FocusClassRec, and should be called for extension devices that can be focused. It is passed a pointer to the device, and returns FALSE if the allocation fails. It has the following parameter: Bool InitFocusClassDeviceStruct(dev) DeviceIntPtr dev; The DIX entry point InitKeyboardDeviceStruct calls this routine for the core X keyboard. It must be called explicitly for extension devices that can be focused. Whether or not a particular device can be focused is left implementation-dependent. InitProximityClassDeviceStruct This function is provided to allocate and initialize a ProximityClassRec, and should be called for extension absolute pointing devices that report proximity. It is passed a pointer to the device, and returns FALSE if the allocation fails. It has the following parameter: Bool InitProximityClassDeviceStruct(dev) DeviceIntPtr dev; Initializing Feedbacks InitKbdFeedbackClassDeviceStruct This function is provided to allocate and initialize a KbdFeedbackClassRec, and may be called for extension devices that support some or all of the feedbacks that the core keyboard supports. It is passed a pointer to the device, a pointer to the procedure that sounds the bell, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc) DeviceIntPtr dev; void (*bellProc)(); void (*controlProc)(); The DIX entry point InitKeyboardDeviceStruct calls this routine for the core X keyboard. It must be called explicitly for extension devices that have the same feedbacks as a keyboard. Some feedbacks, such as LEDs and bell, can be supported either with a KbdFeedbackClass or with BellFeedbackClass and LedFeedbackClass feedbacks. InitPtrFeedbackClassDeviceStruct This function is provided to allocate and initialize a PtrFeedbackClassRec, and should be called for extension devices that allow the setting of acceleration and threshold. It is passed a pointer to the device, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitPtrFeedbackClassDeviceStruct(dev, controlProc) DeviceIntPtr dev; void (*controlProc)(); The DIX entry point InitPointerDeviceStruct calls this routine for the core X pointer. It must be called explicitly for extension devices that support the setting of acceleration and threshold. InitLedFeedbackClassDeviceStruct This function is provided to allocate and initialize a LedFeedbackClassRec, and should be called for extension devices that have LEDs. It is passed a pointer to the device, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitLedFeedbackClassDeviceStruct(dev, controlProc) DeviceIntPtr dev; void (*controlProc)(); Up to 32 LEDs per feedback can be supported, and a device may have multiple feedbacks of the same type. InitBellFeedbackClassDeviceStruct This function is provided to allocate and initialize a BellFeedbackClassRec, and should be called for extension devices that have a bell. It is passed a pointer to the device, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitBellFeedbackClassDeviceStruct(dev, bellProc, controlProc) DeviceIntPtr dev; void (*bellProc)(); void (*controlProc)(); InitStringFeedbackClassDeviceStruct This function is provided to allocate and initialize a StringFeedbackClassRec, and should be called for extension devices that have a display upon which a string can be displayed. It is passed a pointer to the device, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitStringFeedbackClassDeviceStruct(dev, controlProc, max_symbols, num_symbols_supported, symbols) DeviceIntPtr dev; void (*controlProc)(); int max_symbols; int num_symbols_supported; KeySym *symbols; InitIntegerFeedbackClassDeviceStruct This function is provided to allocate and initialize an IntegerFeedbackClassRec, and should be called for extension devices that have a display upon which an integer can be displayed. It is passed a pointer to the device, and a pointer to the device control procedure. It returns FALSE if the allocation fails, and has the following parameters: Bool InitIntegerFeedbackClassDeviceStruct(dev, controlProc) DeviceIntPtr dev; void (*controlProc)(); Initializing The Device Name And Type The device name and type can be initialized by calling AssignTypeAndName with the following parameters: void AssignTypeAndName(dev, type, name) DeviceIntPtr dev; Atom type; char *name; This will allocate space for the device name and copy the name that was passed. The device type can be obtained by calling MakeAtom with one of the names defined for input devices. MakeAtom has the following parameters: Atom MakeAtom(name, len, makeit) char *name; int len; Bool makeit; Since the atom was already made when the input extension was initialized, the value of makeit should be FALSE; Closing Extension Devices The DisableDevice entry point is provided by DIX to disable input devices. It calls the device control routine for the specified device with a mode value of DEVICE_OFF. The device control routine should call RemoveEnabledDevice to stop the server from checking for input from that device. DisableDevice is not called by any input extension routines. It can be called from the CloseInputDevice routine, which is called by ProcXCloseDevice when a client makes an XCloseDevice request. If DisableDevice is called, it should only be called when the last client using the extension device has terminated or called XCloseDevice. Implementation-Dependent Routines Several input extension protocol requests have implementation-dependent entry points. Default routines are defined for these entry points and contained in the source file extensions/server/xinput/xstubs.c. Some implementations may be able to use the default routines without change. The following sections describe each of these routines. AddOtherInputDevices AddOtherInputDevice is called from ProcXListInputDevices as a result of an XListInputDevices protocol request. It may be needed by implementations that do not open extension input devices until requested to do so by some client. These implementations may not initialize all devices when the X server starts up, because some of those devices may be in use. Since the XListInputDevices function only lists those devices that have been initialized, AddOtherInputDevices is called to give DDX a chance to initialize any previously unavailable input devices. A sample AddOtherInputDevices routine might look like the following: void AddOtherInputDevices () { DeviceIntPtr dev; int i; for (i=0; i<MAX_DEVICES; i++) { if (!local_dev[i].initialized && available(local_dev[i])) { dev = (DeviceIntPtr) AddInputDevice (local_dev[i].deviceProc, TRUE); dev->public.devicePrivate = local_dev[i]; RegisterOtherDevice (dev); dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); } } } The default AddOtherInputDevices routine in xstubs.c does nothing. If all input extension devices are initialized when the server starts up, it can be left as a null routine. OpenInputDevice Some X server implementations open all input devices when the server is initialized and never close them. Other implementations may open only the X pointer and keyboard devices during server initialization, and open other input devices only when some client makes an XOpenDevice request. This entry point is for the latter type of implementation. If the physical device is not already open, it can be done in this routine. In this case, the server must keep track of the fact that one or more clients have the device open, and physically close it when the last client that has it open makes an XCloseDevice request. The default implementation is to do nothing (assume all input devices are opened during X server initialization and kept open). CloseInputDevice Some implementations may close an input device when the last client using that device requests that it be closed, or terminates. CloseInputDevice is called from ProcXCloseDevice when a client makes an XCloseDevice protocol request. The default implementation is to do nothing (assume all input devices are opened during X server initialization and kept open). SetDeviceMode Some implementations support input devices that can report either absolute positional data or relative motion. The XSetDeviceMode protocol request is provided to allow DDX to change the current mode of such a device. The default implementation is to always return a BadMatch error. If the implementation does not support any input devices that are capable of reporting both relative motion and absolute position information, the default implementation may be left unchanged. SetDeviceValuators Some implementations support input devices that allow their valuators to be set to an initial value. The XSetDeviceValuators protocol request is provided to allow DDX to set the valuators of such a device. The default implementation is to always return a BadMatch error. If the implementation does not support any input devices that allow their valuators to be set, the default implementation may be left unchanged. ChangePointerDevice The XChangePointerDevice protocol request is provided to change which device is used as the X pointer. Some implementations may maintain information specific to the X pointer in the private data structure pointed to by the DeviceIntRec. ChangePointerDevice is called to allow such implementations to move that information to the new pointer device. The current location of the X cursor is an example of the type of information that might be affected. The DeviceIntRec structure that describes the X pointer device does not contain a FocusRec. If the device that has been made into the new X pointer was previously a device that could be focused, ProcXChangePointerDevice will free the FocusRec associated with that device. If the server implementation desires to allow clients to focus the old pointer device (which is now accessible through the input extension), it should call InitFocusClassDeviceStruct for the old pointer device. The XChangePointerDevice protocol request also allows the client to choose which axes of the new pointer device are used to move the X cursor in the X- and Y- directions. If the axes are different than the default ones, the server implementation should record that fact. If the server implementation supports input devices with valuators that are not allowed to be used as the X pointer, they should be screened out by this routine and a BadDevice error returned. The default implementation is to do nothing. ChangeKeyboardDevice The XChangeKeyboardDevice protocol request is provided to change which device is used as the X keyboard. Some implementations may maintain information specific to the X keyboard in the private data structure pointed to by the DeviceIntRec. ChangeKeyboardDevice is called to allow such implementations to move that information to the new keyboard device. The X keyboard device can be focused, and the DeviceIntRec that describes that device has a FocusRec. If the device that has been made into the new X keyboard did not previously have a FocusRec, ProcXChangeKeyboardDevice will allocate one for it. If the implementation does not want clients to be able to focus the old X keyboard (which has now become available as an input extension device) it should call DeleteFocusClassDeviceStruct to free the FocusRec. If the implementation supports input devices with keys that are not allowed to be used as the X keyboard, they should be checked for here, and a BadDevice error returned. The default implementation is to do nothing. Input Extension Events Events accessed through the input extension are analogous to the core input events, but have different event types. They are of types DeviceKeyPress, DeviceKeyRelease, DeviceButtonPress, DeviceButtonRelease, DeviceDeviceMotionNotify, DeviceProximityIn, DeviceProximityOut, and DeviceValuator. These event types are not constants. Instead, they are external integers defined by the input extension. Their actual values will depend on which extensions are supported by a server, and the order in which they are initialized. The data structures that describe these events are defined in the file extensions/include/XIproto.h. Other input extension constants needed by DDX are defined in the file extensions/include/XI.h. Some events defined by the input extension contain more information than can be contained in the 32-byte xEvent data structure. To send this information to clients, DDX must generate two or more 32-byte wire events. The following sections describe the contents of these events. Device Key Events DeviceKeyPresss events contain all the information that is contained in a core KeyPress event, and also the following additional information: deviceid - the identifier of the device that generated the event. device_state - the state of any modifiers on the device that generated the event. num_valuators - the number of valuators reported in this event. first_valuator - the first valuator reported in this event. valuator0 through valuator5 - the values of the valuators. In order to pass this information to the input extension library, two 32-byte wire events must be generated by DDX. The first has an event type of DeviceKeyPress, and the second has an event type of DeviceValuator. The following code fragment shows how the two wire events could be initialized: extern int DeviceKeyPress; DeviceIntPtr dev; xEvent xE[2]; CARD8 id, num_valuators; INT16 x, y, pointerx, pointery; Time timestamp; deviceKeyButtonPointer *xev = (deviceKeyButtonPointer *) xE; deviceValuator *xv; xev->type = DeviceKeyPress; /* defined by input extension */ xev->detail = keycode; /* key pressed on this device */ xev->time = timestamp; /* same as for core events */ xev->rootX = pointerx; /* x location of core pointer */ xev->rootY = pointery; /* y location of core pointer */ /******************************************************************/ /* */ /* The following field does not exist for core input events. */ /* It contains the device id for the device that generated the */ /* event, and also indicates whether more than one 32-byte wire */ /* event is being sent. */ /* */ /******************************************************************/ xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1 */ /******************************************************************/ /* Fields in the second 32-byte wire event: */ /******************************************************************/ xv = (deviceValuator *) ++xev; xv->type = DeviceValuator; /* event type of second event */ xv->deviceid = dev->id; /* id of this device */ xv->num_valuators = 0; /* no valuators being sent */ xv->device_state = 0; /* will be filled in by DIX */ Device Button Events DeviceButton events contain all the information that is contained in a core button event, and also the same additional information that a DeviceKey event contains. Device Motion Events DeviceMotion events contain all the information that is contained in a core motion event, and also additional valuator information. At least two wire events are required to contain this information. The following code fragment shows how the two wire events could be initialized: extern int DeviceMotionNotify; DeviceIntPtr dev; xEvent xE[2]; CARD8 id, num_valuators; INT16 x, y, pointerx, pointery; Time timestamp; deviceKeyButtonPointer *xev = (deviceKeyButtonPointer *) xE; deviceValuator *xv; xev->type = DeviceMotionNotify; /* defined by input extension */ xev->detail = keycode; /* key pressed on this device */ xev->time = timestamp; /* same as for core events */ xev->rootX = pointerx; /* x location of core pointer */ xev->rootY = pointery; /* y location of core pointer */ /******************************************************************/ /* */ /* The following field does not exist for core input events. */ /* It contains the device id for the device that generated the */ /* event, and also indicates whether more than one 32-byte wire */ /* event is being sent. */ /* */ /******************************************************************/ xev->deviceid = dev->id | MORE_EVENTS; /* sending more than 1 */ /******************************************************************/ /* Fields in the second 32-byte wire event: */ /******************************************************************/ xv = (deviceValuator *) ++xev; xv->type = DeviceValuator; /* event type of second event */ xv->deviceid = dev->id; /* id of this device */ xv->num_valuators = 2; /* 2 valuators being sent */ xv->first_valuator = 0; /* first valuator being sent */ xv->device_state = 0; /* will be filled in by DIX */ xv->valuator0 = x; /* first axis of this device */ xv->valuator1 = y; /* second axis of this device */ Up to six axes can be reported in the deviceValuator event. If the device is reporting more than 6 axes, additional pairs of DeviceMotionNotify and DeviceValuator events should be sent, with the first_valuator field set correctly. Device Proximity Events Some input devices that report absolute positional information, such as graphics tablets and touchscreens, may report proximity events. ProximityIn events are generated when a pointing device like a stylus, or in the case of a touchscreen, the user's finger, comes into close proximity with the surface of the input device. ProximityOut events are generated when the stylus or finger leaves the proximity of the input devices surface. Proximity events contain almost the same information as button events. The event type is ProximityIn or ProximityOut, and there is no detail information. xorg-server-21.1.16/doc/Makefile.in0000644000175000017500000007164714757411114012464 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Generate output formats for a single DocBook/XML with/without chapters # # Variables set by the calling Makefile: # noinst_DATA: developers docs are not installed # docbook: the main DocBook/XML file, no chapters, appendix or image files # chapters: all files pulled in by an XInclude statement and images. # # # This makefile is intended for Developers Documentation and is not installed. # Do not use for Users docs or Specs which need to be installed and require olink support # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 # for an explanation on documents classification. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(docbook:.xml=.html) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(docbook:.xml=.txt) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(docbook:.xml=.pdf) $(docbook:.xml=.ps) subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_noinst_DATA_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_noinst_DATA_DIST = Xserver-spec.xml Xinput.xml DATA = $(dist_noinst_DATA) $(noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/devbook.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = dtrace # Main DocBook/XML files (DOCTYPE book) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@docbook = Xserver-spec.xml Xinput.xml # Developers documnetation is not installed @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@noinst_DATA = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_1) \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_2) \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_3) # DocBook/XML file with chapters, appendix and images it includes @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@dist_noinst_DATA = $(docbook) $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@FILTER_XMLTO = $(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_HTML_FLAGS = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_FO_FLAGS = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --stringparam img.src.path=$(abs_builddir)/ \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@CLEANFILES = $(noinst_DATA) # Generate DocBook/XML output formats with or without stylesheets EXTRA_DIST = smartsched filter-xmlto.sh all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/devbook.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.html: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@%.txt: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.pdf: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.ps: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/doc/smartsched0000644000175000017500000001600514757411105012462 Client Scheduling in X Keith Packard SuSE 10/28/99 History: Since the original X server was written at Digital in 1987, the OS and DIX layers shared responsibility for scheduling the order to service client requests. The original design was simplistic; under the maximum first make it work, then make it work well, this was a good idea. Now that we have a bit more experience with X applications, it's time to rethink the design. The basic dispatch loop in DIX looks like: for (;;) { nready = WaitForSomething (...); while (nready--) { isItTimeToYield = FALSE; while (!isItTimeToYield) { if (!ReadRequestFromClient (...)) break; (execute request); } } } WaitForSomething looks like: for (;;) if (ANYSET (ClientsWithInput)) return popcount (ClientsWithInput); select (...) compute clientsReadable from select result; return popcount (clientsReadable) } ReadRequestFromClient looks like: if (!fullRequestQueued) { read (); if (!fullRequestQueued) { remove from ClientsWithInput; timesThisConnection = 0; return 0; } } if (twoFullRequestsQueued) add to ClientsWithInput; if (++timesThisConnection >= 10) { isItTimeToYield = TRUE; timesThisConnection = 0; } return 1; Here's what happens in this code: With a single client executing a stream of requests: A client sends a packet of requests to the server. WaitForSomething wakes up from select and returns that client to Dispatch Dispatch calls ReadRequestFromClient which reads a buffer (4K) full of requests from the client The server executes requests from this buffer until it emptys, in two stages -- 10 requests at a time are executed in the inner Dispatch loop, a buffer full of requests are executed because WaitForSomething immediately returns if any clients have complete requests pending in their input queues. When the buffer finally emptys, the next call to ReadRequest FromClient will return zero and Dispatch will go back to WaitForSomething; now that the client has no requests pending, WaitForSomething will block in select again. If the client is active, this select will immediately return that client as ready to read. With multiple clients sending streams of requests, the sequence of operations is similar, except that ReadRequestFromClient will set isItTimeToYield after each 10 requests executed causing the server to round-robin among the clients with available requests. It's important to realize here that any complete requests which have been read from clients will be executed before the server will use select again to discover input from other clients. A single busy client can easily monopolize the X server. So, the X server doesn't share well with clients which are more interactive in nature. The X server executes at most a buffer full of requests before again heading into select; ReadRequestFromClient causes the server to yield when the client request buffer doesn't contain a complete request. When that buffer is executed quickly, the server spends a lot of time in select discovering that the same client again has input ready. Thus the server also runs busy clients less efficiently than is would be possible. What to do. There are several things evident from the above discussion: 1 The server has a poor metric for deciding how much work it should do at one time on behalf of a particular client. 2 The server doesn't call select often enough to detect less aggressive clients in the face of busy clients, especially when those clients are executing slow requests. 3 The server calls select too often when executing fast requests. 4 Some priority scheme is needed to keep interactive clients responding to the user. And, there are some assumptions about how X applications work: 1 Each X request is executed relatively quickly; a request-granularity is good enough for interactive response almost all of the time. 2 X applications receiving mouse/keyboard events are likely to warrant additional attention from the X server. Instead of a request-count metric for work, a time-based metric should be used. The server should select a reasonable time slice for each client and execute requests for the entire timeslice before yielding to another client. Instead of returning immediately from WaitForSomething if clients have complete requests queued, the server should go through select each time and gather as many ready clients as possible. This involves polling instead of blocking and adding the ClientsWithInput to clientsReadable after the select returns. Instead of yielding when the request buffer is empty for a particular client, leave the yielding to the upper level scheduling and allow the server to try and read again from the socket. If the client is busy, another buffer full of requests will already be waiting to be delivered thus avoiding the call through select and the additional overhead in WaitForSomething. Finally, the dispatch loop should not simply execute requests from the first available client, instead each client should be prioritized with busy clients penalized and clients receiving user events praised. How it's done: Polling the current time of day from the OS is too expensive to be done at each request boundary, so instead an interval timer is set allowing the server to track time changes by counting invocations of the related signal handler. Instead of using the wall time for this purpose, the process CPU time is used instead. This serves two purposes -- first, it allows the server to consume no CPU cycles when idle, second it avoids conflicts with SIGALRM usage in other parts of the server code. It's not without problems though; other CPU intensive processes on the same machine can reduce interactive response time within the X server. The dispatch loop can now calculate an approximate time value using the number of signals received. The granularity of the timer sets the scheduling jitter, at 20ms it's only occasionally noticeable. The changes to WaitForSomething and ReadRequestFromClient are straightforward, adjusting when select is called and avoiding setting isItTimeToYield too often. The dispatch loop changes are more extensive, now instead of executing requests from all available clients, a single client is chosen after each call to WaitForSomething, requests are executed for that client and WaitForSomething is called again. Each client is assigned a priority, the dispatch loop chooses the client with the highest priority to execute. Priorities are updated in three ways: 1. Clients which consume their entire slice are penalized by having their priority reduced by one until they reach some minimum value. 2. Clients which have executed no requests for some time are praised by having their priority raised until they return to normal priority. 3. Clients which receive user input are praised by having their priority rased until they reach some maximal value, above normal priority. The effect of these changes is to both improve interactive application response and benchmark numbers at the same time. xorg-server-21.1.16/doc/filter-xmlto.sh0000755000175000017500000000125014757411105013363 #!/bin/sh # # Run the xmlto command, filtering its output to # reduce the amount of useless warnings in the build log. # # Exit with the status of the xmlto process, not the status of the # output filtering commands # # This is a bit twisty, but avoids any temp files by using pipes for # everything. It routes the command output through file # descriptor 4 while sending the (numeric) exit status through # standard output. # (((("$@" 2>&1; echo $? >&3) | grep -v overflows | grep -v 'Making' | grep -v 'hyphenation' | grep -v 'Font.*not found' | grep -v '/tmp/xml' | grep -v Rendered >&4) 3>&1) | (read status; exit $status)) 4>&1 xorg-server-21.1.16/dri3/0000755000175000017500000000000014757411134010556 5xorg-server-21.1.16/dri3/meson.build0000644000175000017500000000057114757411105012641 srcs_dri3 = [ 'dri3.c', 'dri3_request.c', 'dri3_screen.c', ] hdrs_dri3 = [ 'dri3.h', ] libxserver_dri3 = [] if build_dri3 libxserver_dri3 = static_library('libxserver_dri3', srcs_dri3, include_directories: inc, dependencies: [ common_dep, libdrm_dep ], ) endif if build_xorg install_data(hdrs_dri3, install_dir: xorgsdkdir) endif xorg-server-21.1.16/dri3/Makefile.am0000644000175000017500000000030114757411105012522 noinst_LTLIBRARIES = libdri3.la AM_CFLAGS = \ @DIX_CFLAGS@ \ @LIBDRM_CFLAGS@ libdri3_la_SOURCES = \ dri3.h \ dri3_priv.h \ dri3.c \ dri3_request.c \ dri3_screen.c sdk_HEADERS = dri3.h xorg-server-21.1.16/dri3/dri3.h0000644000175000017500000001150514757411105011510 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _DRI3_H_ #define _DRI3_H_ #ifdef DRI3 #include #include #define DRI3_SCREEN_INFO_VERSION 2 typedef int (*dri3_open_proc)(ScreenPtr screen, RRProviderPtr provider, int *fd); typedef int (*dri3_open_client_proc)(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd); typedef PixmapPtr (*dri3_pixmap_from_fd_proc) (ScreenPtr screen, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp); typedef PixmapPtr (*dri3_pixmap_from_fds_proc) (ScreenPtr screen, CARD8 num_fds, const int *fds, CARD16 width, CARD16 height, const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, CARD64 modifier); typedef int (*dri3_fd_from_pixmap_proc) (ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size); typedef int (*dri3_fds_from_pixmap_proc) (ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier); typedef int (*dri3_get_formats_proc) (ScreenPtr screen, CARD32 *num_formats, CARD32 **formats); typedef int (*dri3_get_modifiers_proc) (ScreenPtr screen, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers); typedef int (*dri3_get_drawable_modifiers_proc) (DrawablePtr draw, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers); typedef struct dri3_screen_info { uint32_t version; dri3_open_proc open; dri3_pixmap_from_fd_proc pixmap_from_fd; dri3_fd_from_pixmap_proc fd_from_pixmap; /* Version 1 */ dri3_open_client_proc open_client; /* Version 2 */ dri3_pixmap_from_fds_proc pixmap_from_fds; dri3_fds_from_pixmap_proc fds_from_pixmap; dri3_get_formats_proc get_formats; dri3_get_modifiers_proc get_modifiers; dri3_get_drawable_modifiers_proc get_drawable_modifiers; } dri3_screen_info_rec, *dri3_screen_info_ptr; extern _X_EXPORT Bool dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info); extern _X_EXPORT int dri3_send_open_reply(ClientPtr client, int fd); extern _X_EXPORT uint32_t drm_format_for_depth(uint32_t depth, uint32_t bpp); #endif #endif /* _DRI3_H_ */ xorg-server-21.1.16/dri3/Makefile.in0000644000175000017500000006577514757411114012565 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = dri3 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdri3_la_LIBADD = am_libdri3_la_OBJECTS = dri3.lo dri3_request.lo dri3_screen.lo libdri3_la_OBJECTS = $(am_libdri3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dri3.Plo \ ./$(DEPDIR)/dri3_request.Plo ./$(DEPDIR)/dri3_screen.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdri3_la_SOURCES) DIST_SOURCES = $(libdri3_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdri3.la AM_CFLAGS = \ @DIX_CFLAGS@ \ @LIBDRM_CFLAGS@ libdri3_la_SOURCES = \ dri3.h \ dri3_priv.h \ dri3.c \ dri3_request.c \ dri3_screen.c sdk_HEADERS = dri3.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign dri3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign dri3/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdri3.la: $(libdri3_la_OBJECTS) $(libdri3_la_DEPENDENCIES) $(EXTRA_libdri3_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdri3_la_OBJECTS) $(libdri3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3_request.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri3_screen.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dri3.Plo -rm -f ./$(DEPDIR)/dri3_request.Plo -rm -f ./$(DEPDIR)/dri3_screen.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dri3.Plo -rm -f ./$(DEPDIR)/dri3_request.Plo -rm -f ./$(DEPDIR)/dri3_screen.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/dri3/dri3_priv.h0000644000175000017500000000670514757411105012556 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _DRI3PRIV_H_ #define _DRI3PRIV_H_ #include "dix-config.h" #include #include "scrnintstr.h" #include "misc.h" #include "list.h" #include "windowstr.h" #include "dixstruct.h" #include #include "dri3.h" extern DevPrivateKeyRec dri3_screen_private_key; typedef struct dri3_dmabuf_format { uint32_t format; uint32_t num_modifiers; uint64_t *modifiers; } dri3_dmabuf_format_rec, *dri3_dmabuf_format_ptr; typedef struct dri3_screen_priv { CloseScreenProcPtr CloseScreen; ConfigNotifyProcPtr ConfigNotify; DestroyWindowProcPtr DestroyWindow; Bool formats_cached; CARD32 num_formats; dri3_dmabuf_format_ptr formats; const dri3_screen_info_rec *info; } dri3_screen_priv_rec, *dri3_screen_priv_ptr; #define wrap(priv,real,mem,func) {\ priv->mem = real->mem; \ real->mem = func; \ } #define unwrap(priv,real,mem) {\ real->mem = priv->mem; \ } static inline dri3_screen_priv_ptr dri3_screen_priv(ScreenPtr screen) { return (dri3_screen_priv_ptr)dixLookupPrivate(&(screen)->devPrivates, &dri3_screen_private_key); } int proc_dri3_dispatch(ClientPtr client); int sproc_dri3_dispatch(ClientPtr client); /* DDX interface */ int dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd); int dri3_pixmap_from_fds(PixmapPtr *ppixmap, ScreenPtr screen, CARD8 num_fds, const int *fds, CARD16 width, CARD16 height, const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, CARD64 modifier); int dri3_fd_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size); int dri3_fds_from_pixmap(PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier); int dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable, CARD8 depth, CARD8 bpp, CARD32 *num_drawable_modifiers, CARD64 **drawable_modifiers, CARD32 *num_screen_modifiers, CARD64 **screen_modifiers); #endif /* _DRI3PRIV_H_ */ xorg-server-21.1.16/dri3/dri3.c0000644000175000017500000000643214757411105011506 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "dri3_priv.h" #include static int dri3_request; DevPrivateKeyRec dri3_screen_private_key; static int dri3_screen_generation; static Bool dri3_close_screen(ScreenPtr screen) { dri3_screen_priv_ptr screen_priv = dri3_screen_priv(screen); unwrap(screen_priv, screen, CloseScreen); free(screen_priv); return (*screen->CloseScreen) (screen); } Bool dri3_screen_init(ScreenPtr screen, const dri3_screen_info_rec *info) { dri3_screen_generation = serverGeneration; if (!dixRegisterPrivateKey(&dri3_screen_private_key, PRIVATE_SCREEN, 0)) return FALSE; if (!dri3_screen_priv(screen)) { dri3_screen_priv_ptr screen_priv = calloc(1, sizeof (dri3_screen_priv_rec)); if (!screen_priv) return FALSE; wrap(screen_priv, screen, CloseScreen, dri3_close_screen); screen_priv->info = info; dixSetPrivate(&screen->devPrivates, &dri3_screen_private_key, screen_priv); } return TRUE; } void dri3_extension_init(void) { ExtensionEntry *extension; int i; /* If no screens support DRI3, there's no point offering the * extension at all */ if (dri3_screen_generation != serverGeneration) return; #ifdef PANORAMIX if (!noPanoramiXExtension) return; #endif extension = AddExtension(DRI3_NAME, DRI3NumberEvents, DRI3NumberErrors, proc_dri3_dispatch, sproc_dri3_dispatch, NULL, StandardMinorOpcode); if (!extension) goto bail; dri3_request = extension->base; for (i = 0; i < screenInfo.numScreens; i++) { if (!dri3_screen_init(screenInfo.screens[i], NULL)) goto bail; } return; bail: FatalError("Cannot initialize DRI3 extension"); } uint32_t drm_format_for_depth(uint32_t depth, uint32_t bpp) { switch (bpp) { case 16: return DRM_FORMAT_RGB565; case 24: return DRM_FORMAT_XRGB8888; case 30: return DRM_FORMAT_XRGB2101010; case 32: return DRM_FORMAT_ARGB8888; default: return 0; } } xorg-server-21.1.16/dri3/dri3_request.c0000644000175000017500000004731014757411105013256 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "dri3_priv.h" #include #include #include #include "../Xext/syncsdk.h" #include #include static Bool dri3_screen_can_one_point_two(ScreenPtr screen) { dri3_screen_priv_ptr dri3 = dri3_screen_priv(screen); if (dri3 && dri3->info && dri3->info->version >= 2 && dri3->info->pixmap_from_fds && dri3->info->fds_from_pixmap && dri3->info->get_formats && dri3->info->get_modifiers && dri3->info->get_drawable_modifiers) return TRUE; return FALSE; } static int proc_dri3_query_version(ClientPtr client) { REQUEST(xDRI3QueryVersionReq); xDRI3QueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_DRI3_MAJOR_VERSION, .minorVersion = SERVER_DRI3_MINOR_VERSION }; REQUEST_SIZE_MATCH(xDRI3QueryVersionReq); for (int i = 0; i < screenInfo.numScreens; i++) { if (!dri3_screen_can_one_point_two(screenInfo.screens[i])) { rep.minorVersion = 0; break; } } for (int i = 0; i < screenInfo.numGPUScreens; i++) { if (!dri3_screen_can_one_point_two(screenInfo.gpuscreens[i])) { rep.minorVersion = 0; break; } } /* From DRI3 proto: * * The client sends the highest supported version to the server * and the server sends the highest version it supports, but no * higher than the requested version. */ if (rep.majorVersion > stuff->majorVersion || (rep.majorVersion == stuff->majorVersion && rep.minorVersion > stuff->minorVersion)) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(rep), &rep); return Success; } int dri3_send_open_reply(ClientPtr client, int fd) { xDRI3OpenReply rep = { .type = X_Reply, .nfd = 1, .sequenceNumber = client->sequence, .length = 0, }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } if (WriteFdToClient(client, fd, TRUE) < 0) { close(fd); return BadAlloc; } WriteToClient(client, sizeof (rep), &rep); return Success; } static int proc_dri3_open(ClientPtr client) { REQUEST(xDRI3OpenReq); RRProviderPtr provider; DrawablePtr drawable; ScreenPtr screen; int fd; int status; REQUEST_SIZE_MATCH(xDRI3OpenReq); status = dixLookupDrawable(&drawable, stuff->drawable, client, 0, DixGetAttrAccess); if (status != Success) return status; if (stuff->provider == None) provider = NULL; else if (!RRProviderType) { return BadMatch; } else { VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); if (drawable->pScreen != provider->pScreen) return BadMatch; } screen = drawable->pScreen; status = dri3_open(client, screen, provider, &fd); if (status != Success) return status; if (client->ignoreCount == 0) return dri3_send_open_reply(client, fd); return Success; } static int proc_dri3_pixmap_from_buffer(ClientPtr client) { REQUEST(xDRI3PixmapFromBufferReq); int fd; DrawablePtr drawable; PixmapPtr pixmap; CARD32 stride, offset; int rc; SetReqFds(client, 1); REQUEST_SIZE_MATCH(xDRI3PixmapFromBufferReq); LEGAL_NEW_RESOURCE(stuff->pixmap, client); rc = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->drawable; return rc; } if (!stuff->width || !stuff->height) { client->errorValue = 0; return BadValue; } if (stuff->width > 32767 || stuff->height > 32767) return BadAlloc; if (stuff->depth != 1) { DepthPtr depth = drawable->pScreen->allowedDepths; int i; for (i = 0; i < drawable->pScreen->numDepths; i++, depth++) if (depth->depth == stuff->depth) break; if (i == drawable->pScreen->numDepths) { client->errorValue = stuff->depth; return BadValue; } } fd = ReadFdFromClient(client); if (fd < 0) return BadValue; offset = 0; stride = stuff->stride; rc = dri3_pixmap_from_fds(&pixmap, drawable->pScreen, 1, &fd, stuff->width, stuff->height, &stride, &offset, stuff->depth, stuff->bpp, DRM_FORMAT_MOD_INVALID); close (fd); if (rc != Success) return rc; pixmap->drawable.id = stuff->pixmap; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP, pixmap, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { (*drawable->pScreen->DestroyPixmap) (pixmap); return rc; } if (!AddResource(stuff->pixmap, RT_PIXMAP, (void *) pixmap)) return BadAlloc; return Success; } static int proc_dri3_buffer_from_pixmap(ClientPtr client) { REQUEST(xDRI3BufferFromPixmapReq); xDRI3BufferFromPixmapReply rep = { .type = X_Reply, .nfd = 1, .sequenceNumber = client->sequence, .length = 0, }; int rc; int fd; PixmapPtr pixmap; REQUEST_SIZE_MATCH(xDRI3BufferFromPixmapReq); rc = dixLookupResourceByType((void **) &pixmap, stuff->pixmap, RT_PIXMAP, client, DixWriteAccess); if (rc != Success) { client->errorValue = stuff->pixmap; return rc; } rep.width = pixmap->drawable.width; rep.height = pixmap->drawable.height; rep.depth = pixmap->drawable.depth; rep.bpp = pixmap->drawable.bitsPerPixel; fd = dri3_fd_from_pixmap(pixmap, &rep.stride, &rep.size); if (fd < 0) return BadPixmap; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.size); swaps(&rep.width); swaps(&rep.height); swaps(&rep.stride); } if (WriteFdToClient(client, fd, TRUE) < 0) { close(fd); return BadAlloc; } WriteToClient(client, sizeof(rep), &rep); return Success; } static int proc_dri3_fence_from_fd(ClientPtr client) { REQUEST(xDRI3FenceFromFDReq); DrawablePtr drawable; int fd; int status; SetReqFds(client, 1); REQUEST_SIZE_MATCH(xDRI3FenceFromFDReq); LEGAL_NEW_RESOURCE(stuff->fence, client); status = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (status != Success) return status; fd = ReadFdFromClient(client); if (fd < 0) return BadValue; status = SyncCreateFenceFromFD(client, drawable, stuff->fence, fd, stuff->initially_triggered); return status; } static int proc_dri3_fd_from_fence(ClientPtr client) { REQUEST(xDRI3FDFromFenceReq); xDRI3FDFromFenceReply rep = { .type = X_Reply, .nfd = 1, .sequenceNumber = client->sequence, .length = 0, }; DrawablePtr drawable; int fd; int status; SyncFence *fence; REQUEST_SIZE_MATCH(xDRI3FDFromFenceReq); status = dixLookupDrawable(&drawable, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (status != Success) return status; status = SyncVerifyFence(&fence, stuff->fence, client, DixWriteAccess); if (status != Success) return status; fd = SyncFDFromFence(client, drawable, fence); if (fd < 0) return BadMatch; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } if (WriteFdToClient(client, fd, FALSE) < 0) return BadAlloc; WriteToClient(client, sizeof(rep), &rep); return Success; } static int proc_dri3_get_supported_modifiers(ClientPtr client) { REQUEST(xDRI3GetSupportedModifiersReq); xDRI3GetSupportedModifiersReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, }; WindowPtr window; ScreenPtr pScreen; CARD64 *window_modifiers = NULL; CARD64 *screen_modifiers = NULL; CARD32 nwindowmodifiers = 0; CARD32 nscreenmodifiers = 0; int status; int i; REQUEST_SIZE_MATCH(xDRI3GetSupportedModifiersReq); status = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (status != Success) return status; pScreen = window->drawable.pScreen; dri3_get_supported_modifiers(pScreen, &window->drawable, stuff->depth, stuff->bpp, &nwindowmodifiers, &window_modifiers, &nscreenmodifiers, &screen_modifiers); rep.numWindowModifiers = nwindowmodifiers; rep.numScreenModifiers = nscreenmodifiers; rep.length = bytes_to_int32(rep.numWindowModifiers * sizeof(CARD64)) + bytes_to_int32(rep.numScreenModifiers * sizeof(CARD64)); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.numWindowModifiers); swapl(&rep.numScreenModifiers); for (i = 0; i < nwindowmodifiers; i++) swapll(&window_modifiers[i]); for (i = 0; i < nscreenmodifiers; i++) swapll(&screen_modifiers[i]); } WriteToClient(client, sizeof(rep), &rep); WriteToClient(client, nwindowmodifiers * sizeof(CARD64), window_modifiers); WriteToClient(client, nscreenmodifiers * sizeof(CARD64), screen_modifiers); free(window_modifiers); free(screen_modifiers); return Success; } static int proc_dri3_pixmap_from_buffers(ClientPtr client) { REQUEST(xDRI3PixmapFromBuffersReq); int fds[4]; CARD32 strides[4], offsets[4]; ScreenPtr screen; WindowPtr window; PixmapPtr pixmap; int rc; int i; SetReqFds(client, stuff->num_buffers); REQUEST_SIZE_MATCH(xDRI3PixmapFromBuffersReq); LEGAL_NEW_RESOURCE(stuff->pixmap, client); rc = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; return rc; } screen = window->drawable.pScreen; if (!stuff->width || !stuff->height || !stuff->bpp || !stuff->depth) { client->errorValue = 0; return BadValue; } if (stuff->width > 32767 || stuff->height > 32767) return BadAlloc; if (stuff->depth != 1) { DepthPtr depth = screen->allowedDepths; int j; for (j = 0; j < screen->numDepths; j++, depth++) if (depth->depth == stuff->depth) break; if (j == screen->numDepths) { client->errorValue = stuff->depth; return BadValue; } } if (!stuff->num_buffers || stuff->num_buffers > 4) { client->errorValue = stuff->num_buffers; return BadValue; } for (i = 0; i < stuff->num_buffers; i++) { fds[i] = ReadFdFromClient(client); if (fds[i] < 0) { while (--i >= 0) close(fds[i]); return BadValue; } } strides[0] = stuff->stride0; strides[1] = stuff->stride1; strides[2] = stuff->stride2; strides[3] = stuff->stride3; offsets[0] = stuff->offset0; offsets[1] = stuff->offset1; offsets[2] = stuff->offset2; offsets[3] = stuff->offset3; rc = dri3_pixmap_from_fds(&pixmap, screen, stuff->num_buffers, fds, stuff->width, stuff->height, strides, offsets, stuff->depth, stuff->bpp, stuff->modifier); for (i = 0; i < stuff->num_buffers; i++) close (fds[i]); if (rc != Success) return rc; pixmap->drawable.id = stuff->pixmap; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pixmap, RT_PIXMAP, pixmap, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { (*screen->DestroyPixmap) (pixmap); return rc; } if (!AddResource(stuff->pixmap, RT_PIXMAP, (void *) pixmap)) return BadAlloc; return Success; } static int proc_dri3_buffers_from_pixmap(ClientPtr client) { REQUEST(xDRI3BuffersFromPixmapReq); xDRI3BuffersFromPixmapReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, }; int rc; int fds[4]; int num_fds; uint32_t strides[4], offsets[4]; uint64_t modifier; int i; PixmapPtr pixmap; REQUEST_SIZE_MATCH(xDRI3BuffersFromPixmapReq); rc = dixLookupResourceByType((void **) &pixmap, stuff->pixmap, RT_PIXMAP, client, DixWriteAccess); if (rc != Success) { client->errorValue = stuff->pixmap; return rc; } num_fds = dri3_fds_from_pixmap(pixmap, fds, strides, offsets, &modifier); if (num_fds == 0) return BadPixmap; rep.nfd = num_fds; rep.length = bytes_to_int32(num_fds * 2 * sizeof(CARD32)); rep.width = pixmap->drawable.width; rep.height = pixmap->drawable.height; rep.depth = pixmap->drawable.depth; rep.bpp = pixmap->drawable.bitsPerPixel; rep.modifier = modifier; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.width); swaps(&rep.height); swapll(&rep.modifier); for (i = 0; i < num_fds; i++) { swapl(&strides[i]); swapl(&offsets[i]); } } for (i = 0; i < num_fds; i++) { if (WriteFdToClient(client, fds[i], TRUE) < 0) { while (i--) close(fds[i]); return BadAlloc; } } WriteToClient(client, sizeof(rep), &rep); WriteToClient(client, num_fds * sizeof(CARD32), strides); WriteToClient(client, num_fds * sizeof(CARD32), offsets); return Success; } int (*proc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = { proc_dri3_query_version, /* 0 */ proc_dri3_open, /* 1 */ proc_dri3_pixmap_from_buffer, /* 2 */ proc_dri3_buffer_from_pixmap, /* 3 */ proc_dri3_fence_from_fd, /* 4 */ proc_dri3_fd_from_fence, /* 5 */ proc_dri3_get_supported_modifiers, /* 6 */ proc_dri3_pixmap_from_buffers, /* 7 */ proc_dri3_buffers_from_pixmap, /* 8 */ }; int proc_dri3_dispatch(ClientPtr client) { REQUEST(xReq); if (!client->local) return BadMatch; if (stuff->data >= DRI3NumberRequests || !proc_dri3_vector[stuff->data]) return BadRequest; return (*proc_dri3_vector[stuff->data]) (client); } static int _X_COLD sproc_dri3_query_version(ClientPtr client) { REQUEST(xDRI3QueryVersionReq); REQUEST_SIZE_MATCH(xDRI3QueryVersionReq); swaps(&stuff->length); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_open(ClientPtr client) { REQUEST(xDRI3OpenReq); REQUEST_SIZE_MATCH(xDRI3OpenReq); swaps(&stuff->length); swapl(&stuff->drawable); swapl(&stuff->provider); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_pixmap_from_buffer(ClientPtr client) { REQUEST(xDRI3PixmapFromBufferReq); REQUEST_SIZE_MATCH(xDRI3PixmapFromBufferReq); swaps(&stuff->length); swapl(&stuff->pixmap); swapl(&stuff->drawable); swapl(&stuff->size); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->stride); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_buffer_from_pixmap(ClientPtr client) { REQUEST(xDRI3BufferFromPixmapReq); REQUEST_SIZE_MATCH(xDRI3BufferFromPixmapReq); swaps(&stuff->length); swapl(&stuff->pixmap); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_fence_from_fd(ClientPtr client) { REQUEST(xDRI3FenceFromFDReq); REQUEST_SIZE_MATCH(xDRI3FenceFromFDReq); swaps(&stuff->length); swapl(&stuff->drawable); swapl(&stuff->fence); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_fd_from_fence(ClientPtr client) { REQUEST(xDRI3FDFromFenceReq); REQUEST_SIZE_MATCH(xDRI3FDFromFenceReq); swaps(&stuff->length); swapl(&stuff->drawable); swapl(&stuff->fence); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_get_supported_modifiers(ClientPtr client) { REQUEST(xDRI3GetSupportedModifiersReq); REQUEST_SIZE_MATCH(xDRI3GetSupportedModifiersReq); swaps(&stuff->length); swapl(&stuff->window); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_pixmap_from_buffers(ClientPtr client) { REQUEST(xDRI3PixmapFromBuffersReq); REQUEST_SIZE_MATCH(xDRI3PixmapFromBuffersReq); swaps(&stuff->length); swapl(&stuff->pixmap); swapl(&stuff->window); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->stride0); swapl(&stuff->offset0); swapl(&stuff->stride1); swapl(&stuff->offset1); swapl(&stuff->stride2); swapl(&stuff->offset2); swapl(&stuff->stride3); swapl(&stuff->offset3); swapll(&stuff->modifier); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } static int _X_COLD sproc_dri3_buffers_from_pixmap(ClientPtr client) { REQUEST(xDRI3BuffersFromPixmapReq); REQUEST_SIZE_MATCH(xDRI3BuffersFromPixmapReq); swaps(&stuff->length); swapl(&stuff->pixmap); return (*proc_dri3_vector[stuff->dri3ReqType]) (client); } int (*sproc_dri3_vector[DRI3NumberRequests]) (ClientPtr) = { sproc_dri3_query_version, /* 0 */ sproc_dri3_open, /* 1 */ sproc_dri3_pixmap_from_buffer, /* 2 */ sproc_dri3_buffer_from_pixmap, /* 3 */ sproc_dri3_fence_from_fd, /* 4 */ sproc_dri3_fd_from_fence, /* 5 */ sproc_dri3_get_supported_modifiers, /* 6 */ sproc_dri3_pixmap_from_buffers, /* 7 */ sproc_dri3_buffers_from_pixmap, /* 8 */ }; int _X_COLD sproc_dri3_dispatch(ClientPtr client) { REQUEST(xReq); if (!client->local) return BadMatch; if (stuff->data >= DRI3NumberRequests || !sproc_dri3_vector[stuff->data]) return BadRequest; return (*sproc_dri3_vector[stuff->data]) (client); } xorg-server-21.1.16/dri3/dri3_screen.c0000644000175000017500000002324114757411105013042 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "dri3_priv.h" #include #include #include #include #include #include int dri3_open(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fd) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; if (info == NULL) return BadMatch; if (info->version >= 1 && info->open_client != NULL) return (*info->open_client) (client, screen, provider, fd); if (info->open != NULL) return (*info->open) (screen, provider, fd); return BadMatch; } int dri3_pixmap_from_fds(PixmapPtr *ppixmap, ScreenPtr screen, CARD8 num_fds, const int *fds, CARD16 width, CARD16 height, const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, CARD64 modifier) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; PixmapPtr pixmap; if (!info) return BadImplementation; if (info->version >= 2 && info->pixmap_from_fds != NULL) { pixmap = (*info->pixmap_from_fds) (screen, num_fds, fds, width, height, strides, offsets, depth, bpp, modifier); } else if (info->pixmap_from_fd != NULL && num_fds == 1) { pixmap = (*info->pixmap_from_fd) (screen, fds[0], width, height, strides[0], depth, bpp); } else { return BadImplementation; } if (!pixmap) return BadAlloc; *ppixmap = pixmap; return Success; } int dri3_fds_from_pixmap(PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier) { ScreenPtr screen = pixmap->drawable.pScreen; dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; if (!info) return 0; if (info->version >= 2 && info->fds_from_pixmap != NULL) { return (*info->fds_from_pixmap)(screen, pixmap, fds, strides, offsets, modifier); } else if (info->fd_from_pixmap != NULL) { CARD16 stride; CARD32 size; fds[0] = (*info->fd_from_pixmap)(screen, pixmap, &stride, &size); if (fds[0] < 0) return 0; strides[0] = stride; offsets[0] = 0; *modifier = DRM_FORMAT_MOD_INVALID; return 1; } else { return 0; } } int dri3_fd_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { ScreenPtr screen = pixmap->drawable.pScreen; dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; uint32_t strides[4]; uint32_t offsets[4]; uint64_t modifier; int fds[4]; int num_fds; if (!info) return -1; /* Preferentially use the old interface, allowing the implementation to * ensure the buffer is in a single-plane format which doesn't need * modifiers. */ if (info->fd_from_pixmap != NULL) return (*info->fd_from_pixmap)(screen, pixmap, stride, size); if (info->version < 2 || info->fds_from_pixmap == NULL) return -1; /* If using the new interface, make sure that it's a single plane starting * at 0 within the BO. We don't check the modifier, as the client may * have an auxiliary mechanism for determining the modifier itself. */ num_fds = info->fds_from_pixmap(screen, pixmap, fds, strides, offsets, &modifier); if (num_fds != 1 || offsets[0] != 0) { int i; for (i = 0; i < num_fds; i++) close(fds[i]); return -1; } *stride = strides[0]; *size = size[0]; return fds[0]; } static int cache_formats_and_modifiers(ScreenPtr screen) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; CARD32 num_formats; CARD32 *formats; uint32_t num_modifiers; uint64_t *modifiers; int i; if (ds->formats_cached) return Success; if (!info) return BadImplementation; if (info->version < 2 || !info->get_formats || !info->get_modifiers) { ds->formats = NULL; ds->num_formats = 0; ds->formats_cached = TRUE; return Success; } if (!info->get_formats(screen, &num_formats, &formats)) return BadAlloc; if (!num_formats) { ds->num_formats = 0; ds->formats_cached = TRUE; return Success; } ds->formats = calloc(num_formats, sizeof(dri3_dmabuf_format_rec)); if (!ds->formats) return BadAlloc; for (i = 0; i < num_formats; i++) { dri3_dmabuf_format_ptr iter = &ds->formats[i]; if (!info->get_modifiers(screen, formats[i], &num_modifiers, &modifiers)) continue; if (!num_modifiers) continue; iter->format = formats[i]; iter->num_modifiers = num_modifiers; iter->modifiers = modifiers; } ds->num_formats = i; ds->formats_cached = TRUE; return Success; } int dri3_get_supported_modifiers(ScreenPtr screen, DrawablePtr drawable, CARD8 depth, CARD8 bpp, CARD32 *num_intersect_modifiers, CARD64 **intersect_modifiers, CARD32 *num_screen_modifiers, CARD64 **screen_modifiers) { dri3_screen_priv_ptr ds = dri3_screen_priv(screen); const dri3_screen_info_rec *info = ds->info; int i, j; int ret; uint32_t num_drawable_mods; uint64_t *drawable_mods; CARD64 *intersect_mods = NULL; CARD64 *screen_mods = NULL; CARD32 format; dri3_dmabuf_format_ptr screen_format = NULL; ret = cache_formats_and_modifiers(screen); if (ret != Success) return ret; format = drm_format_for_depth(depth, bpp); if (format == 0) return BadValue; /* Find screen-global modifiers from cache */ for (i = 0; i < ds->num_formats; i++) { if (ds->formats[i].format == format) { screen_format = &ds->formats[i]; break; } } if (screen_format == NULL) return BadMatch; if (screen_format->num_modifiers == 0) { *num_screen_modifiers = 0; *num_intersect_modifiers = 0; return Success; } if (!info->get_drawable_modifiers || !info->get_drawable_modifiers(drawable, format, &num_drawable_mods, &drawable_mods)) { num_drawable_mods = 0; drawable_mods = NULL; } /* We're allocating slightly more memory than necessary but it reduces * the complexity of finding the intersection set. */ screen_mods = malloc(screen_format->num_modifiers * sizeof(CARD64)); if (!screen_mods) return BadAlloc; if (num_drawable_mods > 0) { intersect_mods = malloc(screen_format->num_modifiers * sizeof(CARD64)); if (!intersect_mods) { free(screen_mods); return BadAlloc; } } *num_screen_modifiers = 0; *num_intersect_modifiers = 0; for (i = 0; i < screen_format->num_modifiers; i++) { CARD64 modifier = screen_format->modifiers[i]; Bool intersect = FALSE; for (j = 0; j < num_drawable_mods; j++) { if (drawable_mods[j] == modifier) { intersect = TRUE; break; } } if (intersect) { intersect_mods[*num_intersect_modifiers] = modifier; *num_intersect_modifiers += 1; } else { screen_mods[*num_screen_modifiers] = modifier; *num_screen_modifiers += 1; } } assert(*num_intersect_modifiers + *num_screen_modifiers == screen_format->num_modifiers); *intersect_modifiers = intersect_mods; *screen_modifiers = screen_mods; free(drawable_mods); return Success; } xorg-server-21.1.16/exa/0000755000175000017500000000000014757411134010472 5xorg-server-21.1.16/exa/meson.build0000644000175000017500000000074514757411105012560 srcs_exa = [ 'exa.c', 'exa_classic.c', 'exa_migration_classic.c', 'exa_driver.c', 'exa_mixed.c', 'exa_migration_mixed.c', 'exa_accel.c', 'exa_glyphs.c', 'exa_offscreen.c', 'exa_render.c', 'exa_unaccel.c', ] libxserver_exa = static_library('libxserver_exa', srcs_exa, include_directories: inc, dependencies: common_dep, c_args: '-DHAVE_XORG_CONFIG_H' ) if build_xorg install_data('exa.h', install_dir: xorgsdkdir) endif xorg-server-21.1.16/exa/Makefile.am0000644000175000017500000000056414757411105012451 noinst_LTLIBRARIES = libexa.la if XORG sdk_HEADERS = exa.h endif AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) libexa_la_SOURCES = \ exa.c \ exa.h \ exa_classic.c \ exa_migration_classic.c \ exa_driver.c \ exa_mixed.c \ exa_migration_mixed.c \ exa_accel.c \ exa_glyphs.c \ exa_offscreen.c \ exa_render.c \ exa_priv.h \ exa_unaccel.c xorg-server-21.1.16/exa/exa.h0000644000175000017500000010043014757411105011334 /* * * Copyright (C) 2000 Keith Packard * 2004 Eric Anholt * 2005 Zack Rusin * * 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 copyright holders not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Copyright holders make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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. */ /** @file * This is the header containing the public API of EXA for exa drivers. */ #ifndef EXA_H #define EXA_H #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "gcstruct.h" #include "picturestr.h" #include "fb.h" #define EXA_VERSION_MAJOR 2 #define EXA_VERSION_MINOR 6 #define EXA_VERSION_RELEASE 0 typedef struct _ExaOffscreenArea ExaOffscreenArea; typedef void (*ExaOffscreenSaveProc) (ScreenPtr pScreen, ExaOffscreenArea * area); typedef enum _ExaOffscreenState { ExaOffscreenAvail, ExaOffscreenRemovable, ExaOffscreenLocked } ExaOffscreenState; struct _ExaOffscreenArea { int base_offset; /* allocation base */ int offset; /* aligned offset */ int size; /* total allocation size */ unsigned last_use; void *privData; ExaOffscreenSaveProc save; ExaOffscreenState state; ExaOffscreenArea *next; unsigned eviction_cost; ExaOffscreenArea *prev; /* Double-linked list for defragmentation */ int align; /* required alignment */ }; /** * The ExaDriver structure is allocated through exaDriverAlloc(), and then * fllled in by drivers. */ typedef struct _ExaDriver { /** * exa_major and exa_minor should be set by the driver to the version of * EXA which the driver was compiled for (or configures itself at runtime * to support). This allows EXA to extend the structure for new features * without breaking ABI for drivers compiled against older versions. */ int exa_major, exa_minor; /** * memoryBase is the address of the beginning of framebuffer memory. * The visible screen should be within memoryBase to memoryBase + * memorySize. */ CARD8 *memoryBase; /** * offScreenBase is the offset from memoryBase of the beginning of the area * to be managed by EXA's linear offscreen memory manager. * * In XFree86 DDX drivers, this is probably: * (pScrn->displayWidth * cpp * pScrn->virtualY) */ unsigned long offScreenBase; /** * memorySize is the length (in bytes) of framebuffer memory beginning * from memoryBase. * * The offscreen memory manager will manage the area beginning at * (memoryBase + offScreenBase), with a length of (memorySize - * offScreenBase) * * In XFree86 DDX drivers, this is probably (pScrn->videoRam * 1024) */ unsigned long memorySize; /** * pixmapOffsetAlign is the byte alignment necessary for pixmap offsets * within framebuffer. * * Hardware typically has a required alignment of offsets, which may or may * not be a power of two. EXA will ensure that pixmaps managed by the * offscreen memory manager meet this alignment requirement. */ int pixmapOffsetAlign; /** * pixmapPitchAlign is the byte alignment necessary for pixmap pitches * within the framebuffer. * * Hardware typically has a required alignment of pitches for acceleration. * For 3D hardware, Composite acceleration often requires that source and * mask pixmaps (textures) have a power-of-two pitch, which can be demanded * using EXA_OFFSCREEN_ALIGN_POT. These pitch requirements only apply to * pixmaps managed by the offscreen memory manager. Thus, it is up to the * driver to ensure that the visible screen has an appropriate pitch for * acceleration. */ int pixmapPitchAlign; /** * The flags field is bitfield of boolean values controlling EXA's behavior. * * The flags include EXA_OFFSCREEN_PIXMAPS, EXA_OFFSCREEN_ALIGN_POT, and * EXA_TWO_BITBLT_DIRECTIONS. */ int flags; /** @{ */ /** * maxX controls the X coordinate limitation for rendering from the card. * The driver should never receive a request for rendering beyond maxX * in the X direction from the origin of a pixmap. */ int maxX; /** * maxY controls the Y coordinate limitation for rendering from the card. * The driver should never receive a request for rendering beyond maxY * in the Y direction from the origin of a pixmap. */ int maxY; /** @} */ /* private */ ExaOffscreenArea *offScreenAreas; Bool needsSync; int lastMarker; /** @name Solid * @{ */ /** * PrepareSolid() sets up the driver for doing a solid fill. * @param pPixmap Destination pixmap * @param alu raster operation * @param planemask write mask for the fill * @param fg "foreground" color for the fill * * This call should set up the driver for doing a series of solid fills * through the Solid() call. The alu raster op is one of the GX* * graphics functions listed in X.h, and typically maps to a similar * single-byte "ROP" setting in all hardware. The planemask controls * which bits of the destination should be affected, and will only represent * the bits up to the depth of pPixmap. The fg is the pixel value of the * foreground color referred to in ROP descriptions. * * Note that many drivers will need to store some of the data in the driver * private record, for sending to the hardware with each drawing command. * * The PrepareSolid() call is required of all drivers, but it may fail for any * reason. Failure results in a fallback to software rendering. */ Bool (*PrepareSolid) (PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg); /** * Solid() performs a solid fill set up in the last PrepareSolid() call. * * @param pPixmap destination pixmap * @param x1 left coordinate * @param y1 top coordinate * @param x2 right coordinate * @param y2 bottom coordinate * * Performs the fill set up by the last PrepareSolid() call, covering the * area from (x1,y1) to (x2,y2) in pPixmap. Note that the coordinates are * in the coordinate space of the destination pixmap, so the driver will * need to set up the hardware's offset and pitch for the destination * coordinates according to the pixmap's offset and pitch within * framebuffer. This likely means using exaGetPixmapOffset() and * exaGetPixmapPitch(). * * This call is required if PrepareSolid() ever succeeds. */ void (*Solid) (PixmapPtr pPixmap, int x1, int y1, int x2, int y2); /** * DoneSolid() finishes a set of solid fills. * * @param pPixmap destination pixmap. * * The DoneSolid() call is called at the end of a series of consecutive * Solid() calls following a successful PrepareSolid(). This allows drivers * to finish up emitting drawing commands that were buffered, or clean up * state from PrepareSolid(). * * This call is required if PrepareSolid() ever succeeds. */ void (*DoneSolid) (PixmapPtr pPixmap); /** @} */ /** @name Copy * @{ */ /** * PrepareCopy() sets up the driver for doing a copy within video * memory. * * @param pSrcPixmap source pixmap * @param pDstPixmap destination pixmap * @param dx X copy direction * @param dy Y copy direction * @param alu raster operation * @param planemask write mask for the fill * * This call should set up the driver for doing a series of copies from the * the pSrcPixmap to the pDstPixmap. The dx flag will be positive if the * hardware should do the copy from the left to the right, and dy will be * positive if the copy should be done from the top to the bottom. This * is to deal with self-overlapping copies when pSrcPixmap == pDstPixmap. * If your hardware can only support blits that are (left to right, top to * bottom) or (right to left, bottom to top), then you should set * #EXA_TWO_BITBLT_DIRECTIONS, and EXA will break down Copy operations to * ones that meet those requirements. The alu raster op is one of the GX* * graphics functions listed in X.h, and typically maps to a similar * single-byte "ROP" setting in all hardware. The planemask controls which * bits of the destination should be affected, and will only represent the * bits up to the depth of pPixmap. * * Note that many drivers will need to store some of the data in the driver * private record, for sending to the hardware with each drawing command. * * The PrepareCopy() call is required of all drivers, but it may fail for any * reason. Failure results in a fallback to software rendering. */ Bool (*PrepareCopy) (PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int dx, int dy, int alu, Pixel planemask); /** * Copy() performs a copy set up in the last PrepareCopy call. * * @param pDstPixmap destination pixmap * @param srcX source X coordinate * @param srcY source Y coordinate * @param dstX destination X coordinate * @param dstY destination Y coordinate * @param width width of the rectangle to be copied * @param height height of the rectangle to be copied. * * Performs the copy set up by the last PrepareCopy() call, copying the * rectangle from (srcX, srcY) to (srcX + width, srcY + width) in the source * pixmap to the same-sized rectangle at (dstX, dstY) in the destination * pixmap. Those rectangles may overlap in memory, if * pSrcPixmap == pDstPixmap. Note that this call does not receive the * pSrcPixmap as an argument -- if it's needed in this function, it should * be stored in the driver private during PrepareCopy(). As with Solid(), * the coordinates are in the coordinate space of each pixmap, so the driver * will need to set up source and destination pitches and offsets from those * pixmaps, probably using exaGetPixmapOffset() and exaGetPixmapPitch(). * * This call is required if PrepareCopy ever succeeds. */ void (*Copy) (PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int width, int height); /** * DoneCopy() finishes a set of copies. * * @param pPixmap destination pixmap. * * The DoneCopy() call is called at the end of a series of consecutive * Copy() calls following a successful PrepareCopy(). This allows drivers * to finish up emitting drawing commands that were buffered, or clean up * state from PrepareCopy(). * * This call is required if PrepareCopy() ever succeeds. */ void (*DoneCopy) (PixmapPtr pDstPixmap); /** @} */ /** @name Composite * @{ */ /** * CheckComposite() checks to see if a composite operation could be * accelerated. * * @param op Render operation * @param pSrcPicture source Picture * @param pMaskPicture mask picture * @param pDstPicture destination Picture * * The CheckComposite() call checks if the driver could handle acceleration * of op with the given source, mask, and destination pictures. This allows * drivers to check source and destination formats, supported operations, * transformations, and component alpha state, and send operations it can't * support to software rendering early on. This avoids costly pixmap * migration to the wrong places when the driver can't accelerate * operations. Note that because migration hasn't happened, the driver * can't know during CheckComposite() what the offsets and pitches of the * pixmaps are going to be. * * See PrepareComposite() for more details on likely issues that drivers * will have in accelerating Composite operations. * * The CheckComposite() call is recommended if PrepareComposite() is * implemented, but is not required. */ Bool (*CheckComposite) (int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture); /** * PrepareComposite() sets up the driver for doing a Composite operation * described in the Render extension protocol spec. * * @param op Render operation * @param pSrcPicture source Picture * @param pMaskPicture mask picture * @param pDstPicture destination Picture * @param pSrc source pixmap * @param pMask mask pixmap * @param pDst destination pixmap * * This call should set up the driver for doing a series of Composite * operations, as described in the Render protocol spec, with the given * pSrcPicture, pMaskPicture, and pDstPicture. The pSrc, pMask, and * pDst are the pixmaps containing the pixel data, and should be used for * setting the offset and pitch used for the coordinate spaces for each of * the Pictures. * * Notes on interpreting Picture structures: * - The Picture structures will always have a valid pDrawable. * - The Picture structures will never have alphaMap set. * - The mask Picture (and therefore pMask) may be NULL, in which case the * operation is simply src OP dst instead of src IN mask OP dst, and * mask coordinates should be ignored. * - pMarkPicture may have componentAlpha set, which greatly changes * the behavior of the Composite operation. componentAlpha has no effect * when set on pSrcPicture or pDstPicture. * - The source and mask Pictures may have a transformation set * (Picture->transform != NULL), which means that the source coordinates * should be transformed by that transformation, resulting in scaling, * rotation, etc. The PictureTransformPoint() call can transform * coordinates for you. Transforms have no effect on Pictures when used * as a destination. * - The source and mask pictures may have a filter set. PictFilterNearest * and PictFilterBilinear are defined in the Render protocol, but others * may be encountered, and must be handled correctly (usually by * PrepareComposite failing, and falling back to software). Filters have * no effect on Pictures when used as a destination. * - The source and mask Pictures may have repeating set, which must be * respected. Many chipsets will be unable to support repeating on * pixmaps that have a width or height that is not a power of two. * * If your hardware can't support source pictures (textures) with * non-power-of-two pitches, you should set #EXA_OFFSCREEN_ALIGN_POT. * * Note that many drivers will need to store some of the data in the driver * private record, for sending to the hardware with each drawing command. * * The PrepareComposite() call is not required. However, it is highly * recommended for performance of antialiased font rendering and performance * of cairo applications. Failure results in a fallback to software * rendering. */ Bool (*PrepareComposite) (int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst); /** * Composite() performs a Composite operation set up in the last * PrepareComposite() call. * * @param pDstPixmap destination pixmap * @param srcX source X coordinate * @param srcY source Y coordinate * @param maskX source X coordinate * @param maskY source Y coordinate * @param dstX destination X coordinate * @param dstY destination Y coordinate * @param width destination rectangle width * @param height destination rectangle height * * Performs the Composite operation set up by the last PrepareComposite() * call, to the rectangle from (dstX, dstY) to (dstX + width, dstY + height) * in the destination Pixmap. Note that if a transformation was set on * the source or mask Pictures, the source rectangles may not be the same * size as the destination rectangles and filtering. Getting the coordinate * transformation right at the subpixel level can be tricky, and rendercheck * can test this for you. * * This call is required if PrepareComposite() ever succeeds. */ void (*Composite) (PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height); /** * DoneComposite() finishes a set of Composite operations. * * @param pPixmap destination pixmap. * * The DoneComposite() call is called at the end of a series of consecutive * Composite() calls following a successful PrepareComposite(). This allows * drivers to finish up emitting drawing commands that were buffered, or * clean up state from PrepareComposite(). * * This call is required if PrepareComposite() ever succeeds. */ void (*DoneComposite) (PixmapPtr pDst); /** @} */ /** * UploadToScreen() loads a rectangle of data from src into pDst. * * @param pDst destination pixmap * @param x destination X coordinate. * @param y destination Y coordinate * @param width width of the rectangle to be copied * @param height height of the rectangle to be copied * @param src pointer to the beginning of the source data * @param src_pitch pitch (in bytes) of the lines of source data. * * UploadToScreen() copies data in system memory beginning at src (with * pitch src_pitch) into the destination pixmap from (x, y) to * (x + width, y + height). This is typically done with hostdata uploads, * where the CPU sets up a blit command on the hardware with instructions * that the blit data will be fed through some sort of aperture on the card. * * If UploadToScreen() is performed asynchronously, it is up to the driver * to call exaMarkSync(). This is in contrast to most other acceleration * calls in EXA. * * UploadToScreen() can aid in pixmap migration, but is most important for * the performance of exaGlyphs() (antialiased font drawing) by allowing * pipelining of data uploads, avoiding a sync of the card after each glyph. * * @return TRUE if the driver successfully uploaded the data. FALSE * indicates that EXA should fall back to doing the upload in software. * * UploadToScreen() is not required, but is recommended if Composite * acceleration is supported. */ Bool (*UploadToScreen) (PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch); /** * UploadToScratch() is no longer used and will be removed next time the EXA * major version needs to be bumped. */ Bool (*UploadToScratch) (PixmapPtr pSrc, PixmapPtr pDst); /** * DownloadFromScreen() loads a rectangle of data from pSrc into dst * * @param pSrc source pixmap * @param x source X coordinate. * @param y source Y coordinate * @param width width of the rectangle to be copied * @param height height of the rectangle to be copied * @param dst pointer to the beginning of the destination data * @param dst_pitch pitch (in bytes) of the lines of destination data. * * DownloadFromScreen() copies data from offscreen memory in pSrc from * (x, y) to (x + width, y + height), to system memory starting at * dst (with pitch dst_pitch). This would usually be done * using scatter-gather DMA, supported by a DRM call, or by blitting to AGP * and then synchronously reading from AGP. Because the implementation * might be synchronous, EXA leaves it up to the driver to call * exaMarkSync() if DownloadFromScreen() was asynchronous. This is in * contrast to most other acceleration calls in EXA. * * DownloadFromScreen() can aid in the largest bottleneck in pixmap * migration, which is the read from framebuffer when evicting pixmaps from * framebuffer memory. Thus, it is highly recommended, even though * implementations are typically complicated. * * @return TRUE if the driver successfully downloaded the data. FALSE * indicates that EXA should fall back to doing the download in software. * * DownloadFromScreen() is not required, but is highly recommended. */ Bool (*DownloadFromScreen) (PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch); /** * MarkSync() requests that the driver mark a synchronization point, * returning an driver-defined integer marker which could be requested for * synchronization to later in WaitMarker(). This might be used in the * future to avoid waiting for full hardware stalls before accessing pixmap * data with the CPU, but is not important in the current incarnation of * EXA. * * Note that drivers should call exaMarkSync() when they have done some * acceleration, rather than their own MarkSync() handler, as otherwise EXA * will be unaware of the driver's acceleration and not sync to it during * fallbacks. * * MarkSync() is optional. */ int (*MarkSync) (ScreenPtr pScreen); /** * WaitMarker() waits for all rendering before the given marker to have * completed. If the driver does not implement MarkSync(), marker is * meaningless, and all rendering by the hardware should be completed before * WaitMarker() returns. * * Note that drivers should call exaWaitSync() to wait for all acceleration * to finish, as otherwise EXA will be unaware of the driver having * synchronized, resulting in excessive WaitMarker() calls. * * WaitMarker() is required of all drivers. */ void (*WaitMarker) (ScreenPtr pScreen, int marker); /** @{ */ /** * PrepareAccess() is called before CPU access to an offscreen pixmap. * * @param pPix the pixmap being accessed * @param index the index of the pixmap being accessed. * * PrepareAccess() will be called before CPU access to an offscreen pixmap. * This can be used to set up hardware surfaces for byteswapping or * untiling, or to adjust the pixmap's devPrivate.ptr for the purpose of * making CPU access use a different aperture. * * The index is one of #EXA_PREPARE_DEST, #EXA_PREPARE_SRC, * #EXA_PREPARE_MASK, #EXA_PREPARE_AUX_DEST, #EXA_PREPARE_AUX_SRC, or * #EXA_PREPARE_AUX_MASK. Since only up to #EXA_NUM_PREPARE_INDICES pixmaps * will have PrepareAccess() called on them per operation, drivers can have * a small, statically-allocated space to maintain state for PrepareAccess() * and FinishAccess() in. Note that PrepareAccess() is only called once per * pixmap and operation, regardless of whether the pixmap is used as a * destination and/or source, and the index may not reflect the usage. * * PrepareAccess() may fail. An example might be the case of hardware that * can set up 1 or 2 surfaces for CPU access, but not 3. If PrepareAccess() * fails, EXA will migrate the pixmap to system memory. * DownloadFromScreen() must be implemented and must not fail if a driver * wishes to fail in PrepareAccess(). PrepareAccess() must not fail when * pPix is the visible screen, because the visible screen can not be * migrated. * * @return TRUE if PrepareAccess() successfully prepared the pixmap for CPU * drawing. * @return FALSE if PrepareAccess() is unsuccessful and EXA should use * DownloadFromScreen() to migate the pixmap out. */ Bool (*PrepareAccess) (PixmapPtr pPix, int index); /** * FinishAccess() is called after CPU access to an offscreen pixmap. * * @param pPix the pixmap being accessed * @param index the index of the pixmap being accessed. * * FinishAccess() will be called after finishing CPU access of an offscreen * pixmap set up by PrepareAccess(). Note that the FinishAccess() will not be * called if PrepareAccess() failed and the pixmap was migrated out. */ void (*FinishAccess) (PixmapPtr pPix, int index); /** * PixmapIsOffscreen() is an optional driver replacement to * exaPixmapHasGpuCopy(). Set to NULL if you want the standard behaviour * of exaPixmapHasGpuCopy(). * * @param pPix the pixmap * @return TRUE if the given drawable is in framebuffer memory. * * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen * memory, meaning that acceleration could probably be done to it, and that it * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it * with the CPU. * * */ Bool (*PixmapIsOffscreen) (PixmapPtr pPix); /** @name PrepareAccess() and FinishAccess() indices * @{ */ /** * EXA_PREPARE_DEST is the index for a pixmap that may be drawn to or * read from. */ #define EXA_PREPARE_DEST 0 /** * EXA_PREPARE_SRC is the index for a pixmap that may be read from */ #define EXA_PREPARE_SRC 1 /** * EXA_PREPARE_SRC is the index for a second pixmap that may be read * from. */ #define EXA_PREPARE_MASK 2 /** * EXA_PREPARE_AUX* are additional indices for other purposes, e.g. * separate alpha maps with Composite operations. */ #define EXA_PREPARE_AUX_DEST 3 #define EXA_PREPARE_AUX_SRC 4 #define EXA_PREPARE_AUX_MASK 5 #define EXA_NUM_PREPARE_INDICES 6 /** @} */ /** * maxPitchPixels controls the pitch limitation for rendering from * the card. * The driver should never receive a request for rendering a pixmap * that has a pitch (in pixels) beyond maxPitchPixels. * * Setting this field is optional -- if your hardware doesn't have * a pitch limitation in pixels, don't set this. If neither this value * nor maxPitchBytes is set, then maxPitchPixels is set to maxX. * If set, it must not be smaller than maxX. * * @sa maxPitchBytes */ int maxPitchPixels; /** * maxPitchBytes controls the pitch limitation for rendering from * the card. * The driver should never receive a request for rendering a pixmap * that has a pitch (in bytes) beyond maxPitchBytes. * * Setting this field is optional -- if your hardware doesn't have * a pitch limitation in bytes, don't set this. * If set, it must not be smaller than maxX * 4. * There's no default value for maxPitchBytes. * * @sa maxPitchPixels */ int maxPitchBytes; /* Hooks to allow driver to its own pixmap memory management */ void *(*CreatePixmap) (ScreenPtr pScreen, int size, int align); void (*DestroyPixmap) (ScreenPtr pScreen, void *driverPriv); /** * Returning a pixmap with non-NULL devPrivate.ptr implies a pixmap which is * not offscreen, which will never be accelerated and Prepare/FinishAccess won't * be called. */ Bool (*ModifyPixmapHeader) (PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); /* hooks for drivers with tiling support: * driver MUST fill out new_fb_pitch with valid pitch of pixmap */ void *(*CreatePixmap2) (ScreenPtr pScreen, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_fb_pitch); /** @} */ Bool (*SharePixmapBacking)(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p); Bool (*SetSharedPixmapBacking)(PixmapPtr pPixmap, void *handle); } ExaDriverRec, *ExaDriverPtr; /** @name EXA driver flags * @{ */ /** * EXA_OFFSCREEN_PIXMAPS indicates to EXA that the driver can support * offscreen pixmaps. */ #define EXA_OFFSCREEN_PIXMAPS (1 << 0) /** * EXA_OFFSCREEN_ALIGN_POT indicates to EXA that the driver needs pixmaps * to have a power-of-two pitch. */ #define EXA_OFFSCREEN_ALIGN_POT (1 << 1) /** * EXA_TWO_BITBLT_DIRECTIONS indicates to EXA that the driver can only * support copies that are (left-to-right, top-to-bottom) or * (right-to-left, bottom-to-top). */ #define EXA_TWO_BITBLT_DIRECTIONS (1 << 2) /** * EXA_HANDLES_PIXMAPS indicates to EXA that the driver can handle * all pixmap addressing and migration. */ #define EXA_HANDLES_PIXMAPS (1 << 3) /** * EXA_SUPPORTS_PREPARE_AUX indicates to EXA that the driver can handle the * EXA_PREPARE_AUX* indices in the Prepare/FinishAccess hooks. If there are no * such hooks, this flag has no effect. */ #define EXA_SUPPORTS_PREPARE_AUX (1 << 4) /** * EXA_SUPPORTS_OFFSCREEN_OVERLAPS indicates to EXA that the driver Copy hooks * can handle the source and destination occupying overlapping offscreen memory * areas. This allows the offscreen memory defragmentation code to defragment * areas where the defragmented position overlaps the fragmented position. * * Typically this is supported by traditional 2D engines but not by 3D engines. */ #define EXA_SUPPORTS_OFFSCREEN_OVERLAPS (1 << 5) /** * EXA_MIXED_PIXMAPS will hide unacceleratable pixmaps from drivers and manage the * problem known software fallbacks like trapezoids. This only migrates pixmaps one way * into a driver pixmap and then pins it. */ #define EXA_MIXED_PIXMAPS (1 << 6) /** @} */ /* in exa.c */ extern _X_EXPORT ExaDriverPtr exaDriverAlloc(void); extern _X_EXPORT Bool exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo); extern _X_EXPORT void exaDriverFini(ScreenPtr pScreen); extern _X_EXPORT void exaMarkSync(ScreenPtr pScreen); extern _X_EXPORT void exaWaitSync(ScreenPtr pScreen); extern _X_EXPORT unsigned long exaGetPixmapOffset(PixmapPtr pPix); extern _X_EXPORT unsigned long exaGetPixmapPitch(PixmapPtr pPix); extern _X_EXPORT unsigned long exaGetPixmapSize(PixmapPtr pPix); extern _X_EXPORT void *exaGetPixmapDriverPrivate(PixmapPtr p); /* in exa_offscreen.c */ extern _X_EXPORT ExaOffscreenArea *exaOffscreenAlloc(ScreenPtr pScreen, int size, int align, Bool locked, ExaOffscreenSaveProc save, void *privData); extern _X_EXPORT ExaOffscreenArea *exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea * area); extern _X_EXPORT void ExaOffscreenMarkUsed(PixmapPtr pPixmap); extern _X_EXPORT void exaEnableDisableFBAccess(ScreenPtr pScreen, Bool enable); extern _X_EXPORT Bool exaDrawableIsOffscreen(DrawablePtr pDrawable); /* in exa.c */ extern _X_EXPORT void exaMoveInPixmap(PixmapPtr pPixmap); extern _X_EXPORT void exaMoveOutPixmap(PixmapPtr pPixmap); /* in exa_unaccel.c */ extern _X_EXPORT CARD32 exaGetPixmapFirstPixel(PixmapPtr pPixmap); /** * Returns TRUE if the given planemask covers all the significant bits in the * pixel values for pDrawable. */ #define EXA_PM_IS_SOLID(_pDrawable, _pm) \ (((_pm) & FbFullMask((_pDrawable)->depth)) == \ FbFullMask((_pDrawable)->depth)) #endif /* EXA_H */ xorg-server-21.1.16/exa/Makefile.in0000644000175000017500000007166014757411114012467 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = exa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libexa_la_LIBADD = am_libexa_la_OBJECTS = exa.lo exa_classic.lo exa_migration_classic.lo \ exa_driver.lo exa_mixed.lo exa_migration_mixed.lo exa_accel.lo \ exa_glyphs.lo exa_offscreen.lo exa_render.lo exa_unaccel.lo libexa_la_OBJECTS = $(am_libexa_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/exa.Plo ./$(DEPDIR)/exa_accel.Plo \ ./$(DEPDIR)/exa_classic.Plo ./$(DEPDIR)/exa_driver.Plo \ ./$(DEPDIR)/exa_glyphs.Plo \ ./$(DEPDIR)/exa_migration_classic.Plo \ ./$(DEPDIR)/exa_migration_mixed.Plo ./$(DEPDIR)/exa_mixed.Plo \ ./$(DEPDIR)/exa_offscreen.Plo ./$(DEPDIR)/exa_render.Plo \ ./$(DEPDIR)/exa_unaccel.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libexa_la_SOURCES) DIST_SOURCES = $(libexa_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = exa.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libexa.la @XORG_TRUE@sdk_HEADERS = exa.h AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) libexa_la_SOURCES = \ exa.c \ exa.h \ exa_classic.c \ exa_migration_classic.c \ exa_driver.c \ exa_mixed.c \ exa_migration_mixed.c \ exa_accel.c \ exa_glyphs.c \ exa_offscreen.c \ exa_render.c \ exa_priv.h \ exa_unaccel.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign exa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign exa/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libexa.la: $(libexa_la_OBJECTS) $(libexa_la_DEPENDENCIES) $(EXTRA_libexa_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libexa_la_OBJECTS) $(libexa_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_accel.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_classic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_driver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_glyphs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_classic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_migration_mixed.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_mixed.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_offscreen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_render.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exa_unaccel.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/exa.Plo -rm -f ./$(DEPDIR)/exa_accel.Plo -rm -f ./$(DEPDIR)/exa_classic.Plo -rm -f ./$(DEPDIR)/exa_driver.Plo -rm -f ./$(DEPDIR)/exa_glyphs.Plo -rm -f ./$(DEPDIR)/exa_migration_classic.Plo -rm -f ./$(DEPDIR)/exa_migration_mixed.Plo -rm -f ./$(DEPDIR)/exa_mixed.Plo -rm -f ./$(DEPDIR)/exa_offscreen.Plo -rm -f ./$(DEPDIR)/exa_render.Plo -rm -f ./$(DEPDIR)/exa_unaccel.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/exa.Plo -rm -f ./$(DEPDIR)/exa_accel.Plo -rm -f ./$(DEPDIR)/exa_classic.Plo -rm -f ./$(DEPDIR)/exa_driver.Plo -rm -f ./$(DEPDIR)/exa_glyphs.Plo -rm -f ./$(DEPDIR)/exa_migration_classic.Plo -rm -f ./$(DEPDIR)/exa_migration_mixed.Plo -rm -f ./$(DEPDIR)/exa_mixed.Plo -rm -f ./$(DEPDIR)/exa_offscreen.Plo -rm -f ./$(DEPDIR)/exa_render.Plo -rm -f ./$(DEPDIR)/exa_unaccel.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/exa/exa.c0000644000175000017500000010434014757411105011333 /* * Copyright © 2001 Keith Packard * * Partly based on code that is Copyright © The XFree86 Project Inc. * * 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. */ /** @file * This file covers the initialization and teardown of EXA, and has various * functions not responsible for performing rendering, pixmap migration, or * memory management. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" DevPrivateKeyRec exaScreenPrivateKeyRec; #ifdef MITSHM static ShmFuncs exaShmFuncs = { NULL, NULL }; #endif /** * exaGetPixmapOffset() returns the offset (in bytes) within the framebuffer of * the beginning of the given pixmap. * * Note that drivers are free to, and often do, munge this offset as necessary * for handing to the hardware -- for example, translating it into a different * aperture. This function may need to be extended in the future if we grow * support for having multiple card-accessible offscreen, such as an AGP memory * pool alongside the framebuffer pool. */ unsigned long exaGetPixmapOffset(PixmapPtr pPix) { ExaScreenPriv(pPix->drawable.pScreen); ExaPixmapPriv(pPix); return (CARD8 *) pExaPixmap->fb_ptr - pExaScr->info->memoryBase; } void * exaGetPixmapDriverPrivate(PixmapPtr pPix) { ExaPixmapPriv(pPix); return pExaPixmap->driverPriv; } /** * exaGetPixmapPitch() returns the pitch (in bytes) of the given pixmap. * * This is a helper to make driver code more obvious, due to the rather obscure * naming of the pitch field in the pixmap. */ unsigned long exaGetPixmapPitch(PixmapPtr pPix) { return pPix->devKind; } /** * exaGetPixmapSize() returns the size in bytes of the given pixmap in video * memory. Only valid when the pixmap is currently in framebuffer. */ unsigned long exaGetPixmapSize(PixmapPtr pPix) { ExaPixmapPrivPtr pExaPixmap; pExaPixmap = ExaGetPixmapPriv(pPix); if (pExaPixmap != NULL) return pExaPixmap->fb_size; return 0; } /** * exaGetDrawablePixmap() returns a backing pixmap for a given drawable. * * @param pDrawable the drawable being requested. * * This function returns the backing pixmap for a drawable, whether it is a * redirected window, unredirected window, or already a pixmap. Note that * coordinate translation is needed when drawing to the backing pixmap of a * redirected window, and the translation coordinates are provided by calling * exaGetOffscreenPixmap() on the drawable. */ PixmapPtr exaGetDrawablePixmap(DrawablePtr pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) return pDrawable->pScreen->GetWindowPixmap((WindowPtr) pDrawable); else return (PixmapPtr) pDrawable; } /** * Sets the offsets to add to coordinates to make them address the same bits in * the backing drawable. These coordinates are nonzero only for redirected * windows. */ void exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp) { #ifdef COMPOSITE if (pDrawable->type == DRAWABLE_WINDOW) { *xp = -pPixmap->screen_x; *yp = -pPixmap->screen_y; return; } #endif *xp = 0; *yp = 0; } /** * exaPixmapDirty() marks a pixmap as dirty, allowing for * optimizations in pixmap migration when no changes have occurred. */ void exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2) { BoxRec box; RegionRec region; box.x1 = max(x1, 0); box.y1 = max(y1, 0); box.x2 = min(x2, pPix->drawable.width); box.y2 = min(y2, pPix->drawable.height); if (box.x1 >= box.x2 || box.y1 >= box.y2) return; RegionInit(®ion, &box, 1); DamageDamageRegion(&pPix->drawable, ®ion); RegionUninit(®ion); } static int exaLog2(int val) { int bits; if (val <= 0) return 0; for (bits = 0; val != 0; bits++) val >>= 1; return bits - 1; } void exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp) { pExaPixmap->accel_blocked = 0; if (pExaScr->info->maxPitchPixels) { int max_pitch = pExaScr->info->maxPitchPixels * bits_to_bytes(bpp); if (pExaPixmap->fb_pitch > max_pitch) pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; } if (pExaScr->info->maxPitchBytes && pExaPixmap->fb_pitch > pExaScr->info->maxPitchBytes) pExaPixmap->accel_blocked |= EXA_RANGE_PITCH; if (w > pExaScr->info->maxX) pExaPixmap->accel_blocked |= EXA_RANGE_WIDTH; if (h > pExaScr->info->maxY) pExaPixmap->accel_blocked |= EXA_RANGE_HEIGHT; } void exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp) { if (pExaScr->info->flags & EXA_OFFSCREEN_ALIGN_POT && w != 1) pExaPixmap->fb_pitch = bits_to_bytes((1 << (exaLog2(w - 1) + 1)) * bpp); else pExaPixmap->fb_pitch = bits_to_bytes(w * bpp); pExaPixmap->fb_pitch = EXA_ALIGN(pExaPixmap->fb_pitch, pExaScr->info->pixmapPitchAlign); } /** * Returns TRUE if the pixmap is not movable. This is the case where it's a * pixmap which has no private (almost always bad) or it's a scratch pixmap created by * some X Server internal component (the score says it's pinned). */ Bool exaPixmapIsPinned(PixmapPtr pPix) { ExaPixmapPriv(pPix); if (pExaPixmap == NULL) EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsPinned was called on a non-exa pixmap.\n"), TRUE); return pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED; } /** * exaPixmapHasGpuCopy() is used to determine if a pixmap is in offscreen * memory, meaning that acceleration could probably be done to it, and that it * will need to be wrapped by PrepareAccess()/FinishAccess() when accessing it * with the CPU. * * Note that except for UploadToScreen()/DownloadFromScreen() (which explicitly * deal with moving pixmaps in and out of system memory), EXA will give drivers * pixmaps as arguments for which exaPixmapHasGpuCopy() is TRUE. * * @return TRUE if the given drawable is in framebuffer memory. */ Bool exaPixmapHasGpuCopy(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return FALSE; return (*pExaScr->pixmap_has_gpu_copy) (pPixmap); } /** * exaDrawableIsOffscreen() is a convenience wrapper for exaPixmapHasGpuCopy(). */ Bool exaDrawableIsOffscreen(DrawablePtr pDrawable) { return exaPixmapHasGpuCopy(exaGetDrawablePixmap(pDrawable)); } /** * Returns the pixmap which backs a drawable, and the offsets to add to * coordinates to make them address the same bits in the backing drawable. */ PixmapPtr exaGetOffscreenPixmap(DrawablePtr pDrawable, int *xp, int *yp) { PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); exaGetDrawableDeltas(pDrawable, pPixmap, xp, yp); if (exaPixmapHasGpuCopy(pPixmap)) return pPixmap; else return NULL; } /** * Returns TRUE if the pixmap GPU copy is being accessed. */ Bool ExaDoPrepareAccess(PixmapPtr pPixmap, int index) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); Bool has_gpu_copy, ret; int i; if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return FALSE; if (pExaPixmap == NULL) EXA_FatalErrorDebugWithRet(("EXA bug: ExaDoPrepareAccess was called on a non-exa pixmap.\n"), FALSE); /* Handle repeated / nested calls. */ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { if (pExaScr->access[i].pixmap == pPixmap) { pExaScr->access[i].count++; return pExaScr->access[i].retval; } } /* If slot for this index is taken, find an empty slot */ if (pExaScr->access[index].pixmap) { for (index = EXA_NUM_PREPARE_INDICES - 1; index >= 0; index--) if (!pExaScr->access[index].pixmap) break; } /* Access to this pixmap hasn't been prepared yet, so data pointer should be NULL. */ if (pPixmap->devPrivate.ptr != NULL) { EXA_FatalErrorDebug(("EXA bug: pPixmap->devPrivate.ptr was %p, but should have been NULL.\n", pPixmap->devPrivate.ptr)); } has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); if (has_gpu_copy && pExaPixmap->fb_ptr) { pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; ret = TRUE; } else { pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; ret = FALSE; } /* Store so we can handle repeated / nested calls. */ pExaScr->access[index].pixmap = pPixmap; pExaScr->access[index].count = 1; if (!has_gpu_copy) goto out; exaWaitSync(pScreen); if (pExaScr->info->PrepareAccess == NULL) goto out; if (index >= EXA_PREPARE_AUX_DEST && !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) FatalError("Unsupported AUX indices used on a pinned pixmap.\n"); exaMoveOutPixmap(pPixmap); ret = FALSE; goto out; } if (!(*pExaScr->info->PrepareAccess) (pPixmap, index)) { if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED && !(pExaScr->info->flags & EXA_MIXED_PIXMAPS)) FatalError("Driver failed PrepareAccess on a pinned pixmap.\n"); exaMoveOutPixmap(pPixmap); ret = FALSE; goto out; } ret = TRUE; out: pExaScr->access[index].retval = ret; return ret; } /** * exaPrepareAccess() is EXA's wrapper for the driver's PrepareAccess() handler. * * It deals with waiting for synchronization with the card, determining if * PrepareAccess() is necessary, and working around PrepareAccess() failure. */ void exaPrepareAccess(DrawablePtr pDrawable, int index) { PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaScreenPriv(pDrawable->pScreen); if (pExaScr->prepare_access_reg) pExaScr->prepare_access_reg(pPixmap, index, NULL); else (void) ExaDoPrepareAccess(pPixmap, index); } /** * exaFinishAccess() is EXA's wrapper for the driver's FinishAccess() handler. * * It deals with calling the driver's FinishAccess() only if necessary. */ void exaFinishAccess(DrawablePtr pDrawable, int index) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); int i; if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return; if (pExaPixmap == NULL) EXA_FatalErrorDebugWithRet(("EXA bug: exaFinishAccesss was called on a non-exa pixmap.\n"),); /* Handle repeated / nested calls. */ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { if (pExaScr->access[i].pixmap == pPixmap) { if (--pExaScr->access[i].count > 0) return; break; } } /* Catch unbalanced Prepare/FinishAccess calls. */ if (i == EXA_NUM_PREPARE_INDICES) EXA_FatalErrorDebugWithRet(("EXA bug: FinishAccess called without PrepareAccess for pixmap 0x%p.\n", pPixmap),); pExaScr->access[i].pixmap = NULL; /* We always hide the devPrivate.ptr. */ pPixmap->devPrivate.ptr = NULL; /* Only call FinishAccess if PrepareAccess was called and succeeded. */ if (!pExaScr->info->FinishAccess || !pExaScr->access[i].retval) return; if (i >= EXA_PREPARE_AUX_DEST && !(pExaScr->info->flags & EXA_SUPPORTS_PREPARE_AUX)) { ErrorF("EXA bug: Trying to call driver FinishAccess hook with " "unsupported index EXA_PREPARE_AUX*\n"); return; } (*pExaScr->info->FinishAccess) (pPixmap, i); } /** * Helper for things common to all schemes when a pixmap is destroyed */ void exaDestroyPixmap(PixmapPtr pPixmap) { ExaScreenPriv(pPixmap->drawable.pScreen); int i; /* Finish access if it was prepared (e.g. pixmap created during * software fallback) */ for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { if (pExaScr->access[i].pixmap == pPixmap) { exaFinishAccess(&pPixmap->drawable, i); pExaScr->access[i].pixmap = NULL; break; } } } /** * Here begins EXA's GC code. * Do not ever access the fb/mi layer directly. */ static void exaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); static void exaDestroyGC(GCPtr pGC); static void exaChangeGC(GCPtr pGC, unsigned long mask); static void exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); static void exaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); static void exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc); static void exaDestroyClip(GCPtr pGC); const GCFuncs exaGCFuncs = { exaValidateGC, exaChangeGC, exaCopyGC, exaDestroyGC, exaChangeClip, exaDestroyClip, exaCopyClip }; static void exaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { /* fbValidateGC will do direct access to pixmaps if the tiling has changed. * Do a few smart things so fbValidateGC can do its work. */ ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); ExaGCPriv(pGC); PixmapPtr pTile = NULL; /* Either of these conditions is enough to trigger access to a tile pixmap. * With pGC->tileIsPixel == 1, you run the risk of dereferencing an invalid * tile pixmap pointer. */ if (pGC->fillStyle == FillTiled || ((changes & GCTile) && !pGC->tileIsPixel)) { pTile = pGC->tile.pixmap; } if (pGC->stipple) exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); if (pTile) exaPrepareAccess(&pTile->drawable, EXA_PREPARE_SRC); /* Calls to Create/DestroyPixmap have to be identified as special. */ pExaScr->fallback_counter++; swap(pExaGC, pGC, funcs); (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); swap(pExaGC, pGC, funcs); pExaScr->fallback_counter--; if (pTile) exaFinishAccess(&pTile->drawable, EXA_PREPARE_SRC); if (pGC->stipple) exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); } /* Is exaPrepareAccessGC() needed? */ static void exaDestroyGC(GCPtr pGC) { ExaGCPriv(pGC); swap(pExaGC, pGC, funcs); (*pGC->funcs->DestroyGC) (pGC); swap(pExaGC, pGC, funcs); } static void exaChangeGC(GCPtr pGC, unsigned long mask) { ExaGCPriv(pGC); swap(pExaGC, pGC, funcs); (*pGC->funcs->ChangeGC) (pGC, mask); swap(pExaGC, pGC, funcs); } static void exaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { ExaGCPriv(pGCDst); swap(pExaGC, pGCDst, funcs); (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); swap(pExaGC, pGCDst, funcs); } static void exaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { ExaGCPriv(pGC); swap(pExaGC, pGC, funcs); (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); swap(pExaGC, pGC, funcs); } static void exaCopyClip(GCPtr pGCDst, GCPtr pGCSrc) { ExaGCPriv(pGCDst); swap(pExaGC, pGCDst, funcs); (*pGCDst->funcs->CopyClip) (pGCDst, pGCSrc); swap(pExaGC, pGCDst, funcs); } static void exaDestroyClip(GCPtr pGC) { ExaGCPriv(pGC); swap(pExaGC, pGC, funcs); (*pGC->funcs->DestroyClip) (pGC); swap(pExaGC, pGC, funcs); } /** * exaCreateGC makes a new GC and hooks up its funcs handler, so that * exaValidateGC() will get called. */ static int exaCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; ExaScreenPriv(pScreen); ExaGCPriv(pGC); Bool ret; swap(pExaScr, pScreen, CreateGC); if ((ret = (*pScreen->CreateGC) (pGC))) { wrap(pExaGC, pGC, funcs, &exaGCFuncs); wrap(pExaGC, pGC, ops, &exaOps); } swap(pExaScr, pScreen, CreateGC); return ret; } static Bool exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { Bool ret; ScreenPtr pScreen = pWin->drawable.pScreen; ExaScreenPriv(pScreen); if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); pExaScr->fallback_counter++; swap(pExaScr, pScreen, ChangeWindowAttributes); ret = pScreen->ChangeWindowAttributes(pWin, mask); swap(pExaScr, pScreen, ChangeWindowAttributes); pExaScr->fallback_counter--; if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); return ret; } static RegionPtr exaBitmapToRegion(PixmapPtr pPix) { RegionPtr ret; ScreenPtr pScreen = pPix->drawable.pScreen; ExaScreenPriv(pScreen); exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC); swap(pExaScr, pScreen, BitmapToRegion); ret = (*pScreen->BitmapToRegion) (pPix); swap(pExaScr, pScreen, BitmapToRegion); exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC); return ret; } static Bool exaCreateScreenResources(ScreenPtr pScreen) { ExaScreenPriv(pScreen); PixmapPtr pScreenPixmap; Bool b; swap(pExaScr, pScreen, CreateScreenResources); b = pScreen->CreateScreenResources(pScreen); swap(pExaScr, pScreen, CreateScreenResources); if (!b) return FALSE; pScreenPixmap = pScreen->GetScreenPixmap(pScreen); if (pScreenPixmap) { ExaPixmapPriv(pScreenPixmap); exaSetAccelBlock(pExaScr, pExaPixmap, pScreenPixmap->drawable.width, pScreenPixmap->drawable.height, pScreenPixmap->drawable.bitsPerPixel); } return TRUE; } static void ExaBlockHandler(ScreenPtr pScreen, void *pTimeout) { ExaScreenPriv(pScreen); /* Move any deferred results from a software fallback to the driver pixmap */ if (pExaScr->deferred_mixed_pixmap) exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap); unwrap(pExaScr, pScreen, BlockHandler); (*pScreen->BlockHandler) (pScreen, pTimeout); wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); /* The rest only applies to classic EXA */ if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) return; /* Try and keep the offscreen memory area tidy every now and then (at most * once per second) when the server has been idle for at least 100ms. */ if (pExaScr->numOffscreenAvailable > 1) { CARD32 now = GetTimeInMillis(); pExaScr->nextDefragment = now + max(100, (INT32) (pExaScr->lastDefragment + 1000 - now)); AdjustWaitForDelay(pTimeout, pExaScr->nextDefragment - now); } } static void ExaWakeupHandler(ScreenPtr pScreen, int result) { ExaScreenPriv(pScreen); unwrap(pExaScr, pScreen, WakeupHandler); (*pScreen->WakeupHandler) (pScreen, result); wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); if (result == 0 && pExaScr->numOffscreenAvailable > 1) { CARD32 now = GetTimeInMillis(); if ((int) (now - pExaScr->nextDefragment) > 0) { ExaOffscreenDefragment(pScreen); pExaScr->lastDefragment = now; } } } /** * exaCloseScreen() unwraps its wrapped screen functions and tears down EXA's * screen private, before calling down to the next CloseSccreen. */ static Bool exaCloseScreen(ScreenPtr pScreen) { ExaScreenPriv(pScreen); PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); if (ps->Glyphs == exaGlyphs) exaGlyphsFini(pScreen); if (pScreen->BlockHandler == ExaBlockHandler) unwrap(pExaScr, pScreen, BlockHandler); if (pScreen->WakeupHandler == ExaWakeupHandler) unwrap(pExaScr, pScreen, WakeupHandler); unwrap(pExaScr, pScreen, CreateGC); unwrap(pExaScr, pScreen, CloseScreen); unwrap(pExaScr, pScreen, GetImage); unwrap(pExaScr, pScreen, GetSpans); if (pExaScr->SavedCreatePixmap) unwrap(pExaScr, pScreen, CreatePixmap); if (pExaScr->SavedDestroyPixmap) unwrap(pExaScr, pScreen, DestroyPixmap); if (pExaScr->SavedModifyPixmapHeader) unwrap(pExaScr, pScreen, ModifyPixmapHeader); unwrap(pExaScr, pScreen, CopyWindow); unwrap(pExaScr, pScreen, ChangeWindowAttributes); unwrap(pExaScr, pScreen, BitmapToRegion); unwrap(pExaScr, pScreen, CreateScreenResources); if (pExaScr->SavedSharePixmapBacking) unwrap(pExaScr, pScreen, SharePixmapBacking); if (pExaScr->SavedSetSharedPixmapBacking) unwrap(pExaScr, pScreen, SetSharedPixmapBacking); unwrap(pExaScr, ps, Composite); if (pExaScr->SavedGlyphs) unwrap(pExaScr, ps, Glyphs); unwrap(pExaScr, ps, Trapezoids); unwrap(pExaScr, ps, Triangles); unwrap(pExaScr, ps, AddTraps); free(pExaScr); return (*pScreen->CloseScreen) (pScreen); } /** * This function allocates a driver structure for EXA drivers to fill in. By * having EXA allocate the structure, the driver structure can be extended * without breaking ABI between EXA and the drivers. The driver's * responsibility is to check beforehand that the EXA module has a matching * major number and sufficient minor. Drivers are responsible for freeing the * driver structure using free(). * * @return a newly allocated, zero-filled driver structure */ ExaDriverPtr exaDriverAlloc(void) { return calloc(1, sizeof(ExaDriverRec)); } /** * @param pScreen screen being initialized * @param pScreenInfo EXA driver record * * exaDriverInit sets up EXA given a driver record filled in by the driver. * pScreenInfo should have been allocated by exaDriverAlloc(). See the * comments in _ExaDriver for what must be filled in and what is optional. * * @return TRUE if EXA was successfully initialized. */ Bool exaDriverInit(ScreenPtr pScreen, ExaDriverPtr pScreenInfo) { ExaScreenPrivPtr pExaScr; PictureScreenPtr ps; if (!pScreenInfo) return FALSE; if (pScreenInfo->exa_major != EXA_VERSION_MAJOR || pScreenInfo->exa_minor > EXA_VERSION_MINOR) { LogMessage(X_ERROR, "EXA(%d): driver's EXA version requirements " "(%d.%d) are incompatible with EXA version (%d.%d)\n", pScreen->myNum, pScreenInfo->exa_major, pScreenInfo->exa_minor, EXA_VERSION_MAJOR, EXA_VERSION_MINOR); return FALSE; } if (!pScreenInfo->CreatePixmap && !pScreenInfo->CreatePixmap2) { if (!pScreenInfo->memoryBase) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memoryBase " "must be non-zero\n", pScreen->myNum); return FALSE; } if (!pScreenInfo->memorySize) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::memorySize must be " "non-zero\n", pScreen->myNum); return FALSE; } if (pScreenInfo->offScreenBase > pScreenInfo->memorySize) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::offScreenBase must " "be <= ExaDriverRec::memorySize\n", pScreen->myNum); return FALSE; } } if (!pScreenInfo->PrepareSolid) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareSolid must be " "non-NULL\n", pScreen->myNum); return FALSE; } if (!pScreenInfo->PrepareCopy) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::PrepareCopy must be " "non-NULL\n", pScreen->myNum); return FALSE; } if (!pScreenInfo->WaitMarker) { LogMessage(X_ERROR, "EXA(%d): ExaDriverRec::WaitMarker must be " "non-NULL\n", pScreen->myNum); return FALSE; } /* If the driver doesn't set any max pitch values, we'll just assume * that there's a limitation by pixels, and that it's the same as * maxX. * * We want maxPitchPixels or maxPitchBytes to be set so we can check * pixmaps against the max pitch in exaCreatePixmap() -- it matters * whether a pixmap is rejected because of its pitch or * because of its width. */ if (!pScreenInfo->maxPitchPixels && !pScreenInfo->maxPitchBytes) { pScreenInfo->maxPitchPixels = pScreenInfo->maxX; } ps = GetPictureScreenIfSet(pScreen); if (!dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) { LogMessage(X_WARNING, "EXA(%d): Failed to register screen private\n", pScreen->myNum); return FALSE; } pExaScr = calloc(sizeof(ExaScreenPrivRec), 1); if (!pExaScr) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n", pScreen->myNum); return FALSE; } pExaScr->info = pScreenInfo; dixSetPrivate(&pScreen->devPrivates, exaScreenPrivateKey, pExaScr); pExaScr->migration = ExaMigrationAlways; exaDDXDriverInit(pScreen); if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pExaScr->gcPrivateKeyRec, PRIVATE_GC, sizeof(ExaGCPrivRec))) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate GC private\n", pScreen->myNum); return FALSE; } /* * Replace various fb screen functions */ if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) || (pExaScr->info->flags & EXA_MIXED_PIXMAPS))) wrap(pExaScr, pScreen, BlockHandler, ExaBlockHandler); if ((pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) && !(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) wrap(pExaScr, pScreen, WakeupHandler, ExaWakeupHandler); wrap(pExaScr, pScreen, CreateGC, exaCreateGC); wrap(pExaScr, pScreen, CloseScreen, exaCloseScreen); wrap(pExaScr, pScreen, GetImage, exaGetImage); wrap(pExaScr, pScreen, GetSpans, ExaCheckGetSpans); wrap(pExaScr, pScreen, CopyWindow, exaCopyWindow); wrap(pExaScr, pScreen, ChangeWindowAttributes, exaChangeWindowAttributes); wrap(pExaScr, pScreen, BitmapToRegion, exaBitmapToRegion); wrap(pExaScr, pScreen, CreateScreenResources, exaCreateScreenResources); if (ps) { wrap(pExaScr, ps, Composite, exaComposite); if (pScreenInfo->PrepareComposite) { wrap(pExaScr, ps, Glyphs, exaGlyphs); } else { wrap(pExaScr, ps, Glyphs, ExaCheckGlyphs); } wrap(pExaScr, ps, Trapezoids, exaTrapezoids); wrap(pExaScr, ps, Triangles, exaTriangles); wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps); } #ifdef MITSHM /* * Don't allow shared pixmaps. */ ShmRegisterFuncs(pScreen, &exaShmFuncs); #endif /* * Hookup offscreen pixmaps */ if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pExaScr->pixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(ExaPixmapPrivRec))) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate pixmap private\n", pScreen->myNum); return FALSE; } if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) { if (pExaScr->info->flags & EXA_MIXED_PIXMAPS) { wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_mixed); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_mixed); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_mixed); wrap(pExaScr, pScreen, SharePixmapBacking, exaSharePixmapBacking_mixed); wrap(pExaScr, pScreen, SetSharedPixmapBacking, exaSetSharedPixmapBacking_mixed); pExaScr->do_migration = exaDoMigration_mixed; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_mixed; pExaScr->do_move_in_pixmap = exaMoveInPixmap_mixed; pExaScr->do_move_out_pixmap = NULL; pExaScr->prepare_access_reg = exaPrepareAccessReg_mixed; } else { wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_driver); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_driver); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_driver); pExaScr->do_migration = NULL; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_driver; pExaScr->do_move_in_pixmap = NULL; pExaScr->do_move_out_pixmap = NULL; pExaScr->prepare_access_reg = NULL; } } else { wrap(pExaScr, pScreen, CreatePixmap, exaCreatePixmap_classic); wrap(pExaScr, pScreen, DestroyPixmap, exaDestroyPixmap_classic); wrap(pExaScr, pScreen, ModifyPixmapHeader, exaModifyPixmapHeader_classic); pExaScr->do_migration = exaDoMigration_classic; pExaScr->pixmap_has_gpu_copy = exaPixmapHasGpuCopy_classic; pExaScr->do_move_in_pixmap = exaMoveInPixmap_classic; pExaScr->do_move_out_pixmap = exaMoveOutPixmap_classic; pExaScr->prepare_access_reg = exaPrepareAccessReg_classic; } if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %lu bytes\n", pScreen->myNum, pExaScr->info->memorySize - pExaScr->info->offScreenBase); } else { LogMessage(X_INFO, "EXA(%d): Driver allocated offscreen pixmaps\n", pScreen->myNum); } } else LogMessage(X_INFO, "EXA(%d): No offscreen pixmaps\n", pScreen->myNum); if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS)) { DBG_PIXMAP(("============== %ld < %ld\n", pExaScr->info->offScreenBase, pExaScr->info->memorySize)); if (pExaScr->info->offScreenBase < pExaScr->info->memorySize) { if (!exaOffscreenInit(pScreen)) { LogMessage(X_WARNING, "EXA(%d): Offscreen pixmap setup failed\n", pScreen->myNum); return FALSE; } } } if (ps->Glyphs == exaGlyphs) exaGlyphsInit(pScreen); LogMessage(X_INFO, "EXA(%d): Driver registered support for the following" " operations:\n", pScreen->myNum); assert(pScreenInfo->PrepareSolid != NULL); LogMessage(X_INFO, " Solid\n"); assert(pScreenInfo->PrepareCopy != NULL); LogMessage(X_INFO, " Copy\n"); if (pScreenInfo->PrepareComposite != NULL) { LogMessage(X_INFO, " Composite (RENDER acceleration)\n"); } if (pScreenInfo->UploadToScreen != NULL) { LogMessage(X_INFO, " UploadToScreen\n"); } if (pScreenInfo->DownloadFromScreen != NULL) { LogMessage(X_INFO, " DownloadFromScreen\n"); } return TRUE; } /** * exaDriverFini tears down EXA on a given screen. * * @param pScreen screen being torn down. */ void exaDriverFini(ScreenPtr pScreen) { /*right now does nothing */ } /** * exaMarkSync() should be called after any asynchronous drawing by the hardware. * * @param pScreen screen which drawing occurred on * * exaMarkSync() sets a flag to indicate that some asynchronous drawing has * happened and a WaitSync() will be necessary before relying on the contents of * offscreen memory from the CPU's perspective. It also calls an optional * driver MarkSync() callback, the return value of which may be used to do partial * synchronization with the hardware in the future. */ void exaMarkSync(ScreenPtr pScreen) { ExaScreenPriv(pScreen); pExaScr->info->needsSync = TRUE; if (pExaScr->info->MarkSync != NULL) { pExaScr->info->lastMarker = (*pExaScr->info->MarkSync) (pScreen); } } /** * exaWaitSync() ensures that all drawing has been completed. * * @param pScreen screen being synchronized. * * Calls down into the driver to ensure that all previous drawing has completed. * It should always be called before relying on the framebuffer contents * reflecting previous drawing, from a CPU perspective. */ void exaWaitSync(ScreenPtr pScreen) { ExaScreenPriv(pScreen); if (pExaScr->info->needsSync && !pExaScr->swappedOut) { (*pExaScr->info->WaitMarker) (pScreen, pExaScr->info->lastMarker); pExaScr->info->needsSync = FALSE; } } /** * Performs migration of the pixmaps according to the operation information * provided in pixmaps and can_accel and the migration scheme chosen in the * config file. */ void exaDoMigration(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) { ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; ExaScreenPriv(pScreen); if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return; if (pExaScr->do_migration) (*pExaScr->do_migration) (pixmaps, npixmaps, can_accel); } void exaMoveInPixmap(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return; if (pExaScr->do_move_in_pixmap) (*pExaScr->do_move_in_pixmap) (pPixmap); } void exaMoveOutPixmap(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); if (!(pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS)) return; if (pExaScr->do_move_out_pixmap) (*pExaScr->do_move_out_pixmap) (pPixmap); } xorg-server-21.1.16/exa/exa_classic.c0000644000175000017500000002005714757411105013036 /* * Copyright © 2009 Maarten Maathuis * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" /* This file holds the classic exa specific implementation. */ static _X_INLINE void * ExaGetPixmapAddress(PixmapPtr p) { ExaPixmapPriv(p); if (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr) return pExaPixmap->fb_ptr; else return pExaPixmap->sys_ptr; } /** * exaCreatePixmap() creates a new pixmap. * * If width and height are 0, this won't be a full-fledged pixmap and it will * get ModifyPixmapHeader() called on it later. So, we mark it as pinned, because * ModifyPixmapHeader() would break migration. These types of pixmaps are used * for scratch pixmaps, or to represent the visible screen. */ PixmapPtr exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) { PixmapPtr pPixmap; ExaPixmapPrivPtr pExaPixmap; BoxRec box; int bpp; ExaScreenPriv(pScreen); if (w > 32767 || h > 32767) return NullPixmap; swap(pExaScr, pScreen, CreatePixmap); pPixmap = pScreen->CreatePixmap(pScreen, w, h, depth, usage_hint); swap(pExaScr, pScreen, CreatePixmap); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); pExaPixmap->driverPriv = NULL; bpp = pPixmap->drawable.bitsPerPixel; pExaPixmap->driverPriv = NULL; /* Scratch pixmaps may have w/h equal to zero, and may not be * migrated. */ if (!w || !h) pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; else pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; pExaPixmap->sys_pitch = pPixmap->devKind; pPixmap->devPrivate.ptr = NULL; pExaPixmap->use_gpu_copy = FALSE; pExaPixmap->fb_ptr = NULL; exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); pExaPixmap->fb_size = pExaPixmap->fb_pitch * h; if (pExaPixmap->fb_pitch > 131071) { swap(pExaScr, pScreen, DestroyPixmap); pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return NULL; } /* Set up damage tracking */ pExaPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, pScreen, pPixmap); if (pExaPixmap->pDamage == NULL) { swap(pExaScr, pScreen, DestroyPixmap); pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return NULL; } DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); /* This ensures that pending damage reflects the current operation. */ /* This is used by exa to optimize migration. */ DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); pExaPixmap->area = NULL; /* We set the initial pixmap as completely valid for a simple reason. * Imagine a 1000x1000 pixmap, it has 1 million pixels, 250000 of which * could form single pixel rects as part of a region. Setting the complete region * as valid is a natural defragmentation of the region. */ box.x1 = 0; box.y1 = 0; box.x2 = w; box.y2 = h; RegionInit(&pExaPixmap->validSys, &box, 0); RegionInit(&pExaPixmap->validFB, &box, 0); exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); /* During a fallback we must prepare access. */ if (pExaScr->fallback_counter) exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); return pPixmap; } Bool exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret; if (!pPixmap) return FALSE; pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); if (pExaPixmap) { if (pPixData) pExaPixmap->sys_ptr = pPixData; if (devKind > 0) pExaPixmap->sys_pitch = devKind; /* Classic EXA: * - Framebuffer. * - Scratch pixmap with gpu memory. */ if (pExaScr->info->memoryBase && pPixData) { if ((CARD8 *) pPixData >= pExaScr->info->memoryBase && ((CARD8 *) pPixData - pExaScr->info->memoryBase) < pExaScr->info->memorySize) { pExaPixmap->fb_ptr = pPixData; pExaPixmap->fb_pitch = devKind; pExaPixmap->use_gpu_copy = TRUE; } } if (width > 0 && height > 0 && bitsPerPixel > 0) { exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); } /* Pixmaps subject to ModifyPixmapHeader will be pinned to system or * gpu memory, so there's no need to track damage. */ if (pExaPixmap->pDamage) { DamageDestroy(pExaPixmap->pDamage); pExaPixmap->pDamage = NULL; } } swap(pExaScr, pScreen, ModifyPixmapHeader); ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); swap(pExaScr, pScreen, ModifyPixmapHeader); /* Always NULL this, we don't want lingering pointers. */ pPixmap->devPrivate.ptr = NULL; return ret; } Bool exaDestroyPixmap_classic(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); Bool ret; if (pPixmap->refcnt == 1) { ExaPixmapPriv(pPixmap); exaDestroyPixmap(pPixmap); if (pExaPixmap->area) { DBG_PIXMAP(("-- 0x%p (0x%x) (%dx%d)\n", (void *) pPixmap->drawable.id, ExaGetPixmapPriv(pPixmap)->area->offset, pPixmap->drawable.width, pPixmap->drawable.height)); /* Free the offscreen area */ exaOffscreenFree(pPixmap->drawable.pScreen, pExaPixmap->area); pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devKind = pExaPixmap->sys_pitch; } RegionUninit(&pExaPixmap->validSys); RegionUninit(&pExaPixmap->validFB); } swap(pExaScr, pScreen, DestroyPixmap); ret = pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return ret; } Bool exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); Bool ret; if (pExaScr->info->PixmapIsOffscreen) { void *old_ptr = pPixmap->devPrivate.ptr; pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap); pPixmap->devPrivate.ptr = old_ptr; } else ret = (pExaPixmap->use_gpu_copy && pExaPixmap->fb_ptr); return ret; } xorg-server-21.1.16/exa/exa_migration_classic.c0000644000175000017500000005751614757411105015121 /* * Copyright © 2006 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * Michel Dänzer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" #if DEBUG_MIGRATE #define DBG_MIGRATE(a) ErrorF a #else #define DBG_MIGRATE(a) #endif /** * The fallback path for UTS/DFS failing is to just memcpy. exaCopyDirtyToSys * and exaCopyDirtyToFb both needed to do this loop. */ static void exaMemcpyBox(PixmapPtr pPixmap, BoxPtr pbox, CARD8 *src, int src_pitch, CARD8 *dst, int dst_pitch) { int i, cpp = pPixmap->drawable.bitsPerPixel / 8; int bytes = (pbox->x2 - pbox->x1) * cpp; src += pbox->y1 * src_pitch + pbox->x1 * cpp; dst += pbox->y1 * dst_pitch + pbox->x1 * cpp; for (i = pbox->y2 - pbox->y1; i; i--) { memcpy(dst, src, bytes); src += src_pitch; dst += dst_pitch; } } /** * Returns TRUE if the pixmap is dirty (has been modified in its current * location compared to the other), or lacks a private for tracking * dirtiness. */ static Bool exaPixmapIsDirty(PixmapPtr pPix) { ExaPixmapPriv(pPix); if (pExaPixmap == NULL) EXA_FatalErrorDebugWithRet(("EXA bug: exaPixmapIsDirty was called on a non-exa pixmap.\n"), TRUE); if (!pExaPixmap->pDamage) return FALSE; return RegionNotEmpty(DamageRegion(pExaPixmap->pDamage)) || !RegionEqual(&pExaPixmap->validSys, &pExaPixmap->validFB); } /** * Returns TRUE if the pixmap is either pinned in FB, or has a sufficient score * to be considered "should be in framebuffer". That's just anything that has * had more acceleration than fallbacks, or has no score yet. * * Only valid if using a migration scheme that tracks score. */ static Bool exaPixmapShouldBeInFB(PixmapPtr pPix) { ExaPixmapPriv(pPix); if (exaPixmapIsPinned(pPix)) return TRUE; return pExaPixmap->score >= 0; } /** * If the pixmap is currently dirty, this copies at least the dirty area from * FB to system or vice versa. Both areas must be allocated. */ static void exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, Bool (*transfer) (PixmapPtr pPix, int x, int y, int w, int h, char *sys, int sys_pitch), int fallback_index, void (*sync) (ScreenPtr pScreen)) { PixmapPtr pPixmap = migrate->pPix; ExaPixmapPriv(pPixmap); RegionPtr damage = DamageRegion(pExaPixmap->pDamage); RegionRec CopyReg; Bool save_use_gpu_copy; int save_pitch; BoxPtr pBox; int nbox; Bool access_prepared = FALSE; Bool need_sync = FALSE; /* Damaged bits are valid in current copy but invalid in other one */ if (pExaPixmap->use_gpu_copy) { RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); RegionSubtract(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); } else { RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); RegionSubtract(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); } RegionEmpty(damage); /* Copy bits valid in source but not in destination */ RegionNull(&CopyReg); RegionSubtract(&CopyReg, pValidSrc, pValidDst); if (migrate->as_dst) { ExaScreenPriv(pPixmap->drawable.pScreen); /* XXX: The pending damage region will be marked as damaged after the * operation, so it should serve as an upper bound for the region that * needs to be synchronized for the operation. Unfortunately, this * causes corruption in some cases, e.g. when starting compiz. See * https://bugs.freedesktop.org/show_bug.cgi?id=12916 . */ if (pExaScr->optimize_migration) { RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); #if DEBUG_MIGRATE if (RegionNil(pending_damage)) { static Bool firsttime = TRUE; if (firsttime) { ErrorF("%s: Pending damage region empty!\n", __func__); firsttime = FALSE; } } #endif /* Try to prevent destination valid region from growing too many * rects by filling it up to the extents of the union of the * destination valid region and the pending damage region. */ if (RegionNumRects(pValidDst) > 10) { BoxRec box; BoxPtr pValidExt, pDamageExt; RegionRec closure; pValidExt = RegionExtents(pValidDst); pDamageExt = RegionExtents(pending_damage); box.x1 = min(pValidExt->x1, pDamageExt->x1); box.y1 = min(pValidExt->y1, pDamageExt->y1); box.x2 = max(pValidExt->x2, pDamageExt->x2); box.y2 = max(pValidExt->y2, pDamageExt->y2); RegionInit(&closure, &box, 0); RegionIntersect(&CopyReg, &CopyReg, &closure); } else RegionIntersect(&CopyReg, &CopyReg, pending_damage); } /* The caller may provide a region to be subtracted from the calculated * dirty region. This is to avoid migration of bits that don't * contribute to the result of the operation. */ if (migrate->pReg) RegionSubtract(&CopyReg, &CopyReg, migrate->pReg); } else { /* The caller may restrict the region to be migrated for source pixmaps * to what's relevant for the operation. */ if (migrate->pReg) RegionIntersect(&CopyReg, &CopyReg, migrate->pReg); } pBox = RegionRects(&CopyReg); nbox = RegionNumRects(&CopyReg); save_use_gpu_copy = pExaPixmap->use_gpu_copy; save_pitch = pPixmap->devKind; pExaPixmap->use_gpu_copy = TRUE; pPixmap->devKind = pExaPixmap->fb_pitch; while (nbox--) { pBox->x1 = max(pBox->x1, 0); pBox->y1 = max(pBox->y1, 0); pBox->x2 = min(pBox->x2, pPixmap->drawable.width); pBox->y2 = min(pBox->y2, pPixmap->drawable.height); if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) continue; if (!transfer || !transfer(pPixmap, pBox->x1, pBox->y1, pBox->x2 - pBox->x1, pBox->y2 - pBox->y1, (char *) (pExaPixmap->sys_ptr + pBox->y1 * pExaPixmap->sys_pitch + pBox->x1 * pPixmap->drawable.bitsPerPixel / 8), pExaPixmap->sys_pitch)) { if (!access_prepared) { ExaDoPrepareAccess(pPixmap, fallback_index); access_prepared = TRUE; } if (fallback_index == EXA_PREPARE_DEST) { exaMemcpyBox(pPixmap, pBox, pExaPixmap->sys_ptr, pExaPixmap->sys_pitch, pPixmap->devPrivate.ptr, pPixmap->devKind); } else { exaMemcpyBox(pPixmap, pBox, pPixmap->devPrivate.ptr, pPixmap->devKind, pExaPixmap->sys_ptr, pExaPixmap->sys_pitch); } } else need_sync = TRUE; pBox++; } pExaPixmap->use_gpu_copy = save_use_gpu_copy; pPixmap->devKind = save_pitch; /* Try to prevent source valid region from growing too many rects by * removing parts of it which are also in the destination valid region. * Removing anything beyond that would lead to data loss. */ if (RegionNumRects(pValidSrc) > 20) RegionSubtract(pValidSrc, pValidSrc, pValidDst); /* The copied bits are now valid in destination */ RegionUnion(pValidDst, pValidDst, &CopyReg); RegionUninit(&CopyReg); if (access_prepared) exaFinishAccess(&pPixmap->drawable, fallback_index); else if (need_sync && sync) sync(pPixmap->drawable.pScreen); } /** * If the pixmap is currently dirty, this copies at least the dirty area from * the framebuffer memory copy to the system memory copy. Both areas must be * allocated. */ void exaCopyDirtyToSys(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ExaScreenPriv(pPixmap->drawable.pScreen); ExaPixmapPriv(pPixmap); exaCopyDirty(migrate, &pExaPixmap->validSys, &pExaPixmap->validFB, pExaScr->info->DownloadFromScreen, EXA_PREPARE_SRC, exaWaitSync); } /** * If the pixmap is currently dirty, this copies at least the dirty area from * the system memory copy to the framebuffer memory copy. Both areas must be * allocated. */ void exaCopyDirtyToFb(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ExaScreenPriv(pPixmap->drawable.pScreen); ExaPixmapPriv(pPixmap); exaCopyDirty(migrate, &pExaPixmap->validFB, &pExaPixmap->validSys, pExaScr->info->UploadToScreen, EXA_PREPARE_DEST, NULL); } /** * Allocates a framebuffer copy of the pixmap if necessary, and then copies * any necessary pixmap data into the framebuffer copy and points the pixmap at * it. * * Note that when first allocated, a pixmap will have FALSE dirty flag. * This is intentional because pixmap data starts out undefined. So if we move * it in due to the first operation against it being accelerated, it will have * undefined framebuffer contents that we didn't have to upload. If we do * moveouts (and moveins) after the first movein, then we will only have to copy * back and forth if the pixmap was written to after the last synchronization of * the two copies. Then, at exaPixmapSave (when the framebuffer copy goes away) * we mark the pixmap dirty, so that the next exaMoveInPixmap will actually move * all the data, since it's almost surely all valid now. */ static void exaDoMoveInPixmap(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); /* If we're VT-switched away, no touching card memory allowed. */ if (pExaScr->swappedOut) return; /* If we're not allowed to move, then fail. */ if (exaPixmapIsPinned(pPixmap)) return; /* Don't migrate in pixmaps which are less than 8bpp. This avoids a lot of * fragility in EXA, and <8bpp is probably not used enough any more to care * (at least, not in acceleratd paths). */ if (pPixmap->drawable.bitsPerPixel < 8) return; if (pExaPixmap->accel_blocked) return; if (pExaPixmap->area == NULL) { pExaPixmap->area = exaOffscreenAlloc(pScreen, pExaPixmap->fb_size, pExaScr->info->pixmapOffsetAlign, FALSE, exaPixmapSave, (void *) pPixmap); if (pExaPixmap->area == NULL) return; pExaPixmap->fb_ptr = (CARD8 *) pExaScr->info->memoryBase + pExaPixmap->area->offset; } exaCopyDirtyToFb(migrate); if (exaPixmapHasGpuCopy(pPixmap)) return; DBG_MIGRATE(("-> %p (0x%x) (%dx%d) (%c)\n", pPixmap, (ExaGetPixmapPriv(pPixmap)->area ? ExaGetPixmapPriv(pPixmap)->area->offset : 0), pPixmap->drawable.width, pPixmap->drawable.height, exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); pExaPixmap->use_gpu_copy = TRUE; pPixmap->devKind = pExaPixmap->fb_pitch; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; } void exaMoveInPixmap_classic(PixmapPtr pPixmap) { static ExaMigrationRec migrate = {.as_dst = FALSE,.as_src = TRUE, .pReg = NULL }; migrate.pPix = pPixmap; exaDoMoveInPixmap(&migrate); } /** * Switches the current active location of the pixmap to system memory, copying * updated data out if necessary. */ static void exaDoMoveOutPixmap(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ExaPixmapPriv(pPixmap); if (!pExaPixmap->area || exaPixmapIsPinned(pPixmap)) return; exaCopyDirtyToSys(migrate); if (exaPixmapHasGpuCopy(pPixmap)) { DBG_MIGRATE(("<- %p (%p) (%dx%d) (%c)\n", pPixmap, (void *) (ExaGetPixmapPriv(pPixmap)->area ? ExaGetPixmapPriv(pPixmap)->area->offset : 0), pPixmap->drawable.width, pPixmap->drawable.height, exaPixmapIsDirty(pPixmap) ? 'd' : 'c')); pExaPixmap->use_gpu_copy = FALSE; pPixmap->devKind = pExaPixmap->sys_pitch; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; } } void exaMoveOutPixmap_classic(PixmapPtr pPixmap) { static ExaMigrationRec migrate = {.as_dst = FALSE,.as_src = TRUE, .pReg = NULL }; migrate.pPix = pPixmap; exaDoMoveOutPixmap(&migrate); } /** * Copies out important pixmap data and removes references to framebuffer area. * Called when the memory manager decides it's time to kick the pixmap out of * framebuffer entirely. */ void exaPixmapSave(ScreenPtr pScreen, ExaOffscreenArea * area) { PixmapPtr pPixmap = area->privData; ExaPixmapPriv(pPixmap); exaMoveOutPixmap(pPixmap); pExaPixmap->fb_ptr = NULL; pExaPixmap->area = NULL; /* Mark all FB bits as invalid, so all valid system bits get copied to FB * next time */ RegionEmpty(&pExaPixmap->validFB); } /** * For the "greedy" migration scheme, pushes the pixmap toward being located in * framebuffer memory. */ static void exaMigrateTowardFb(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ExaPixmapPriv(pPixmap); if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) { DBG_MIGRATE(("UseScreen: not migrating pinned pixmap %p\n", (void *) pPixmap)); return; } DBG_MIGRATE(("UseScreen %p score %d\n", (void *) pPixmap, pExaPixmap->score)); if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) { exaDoMoveInPixmap(migrate); pExaPixmap->score = 0; } if (pExaPixmap->score < EXA_PIXMAP_SCORE_MAX) pExaPixmap->score++; if (pExaPixmap->score >= EXA_PIXMAP_SCORE_MOVE_IN && !exaPixmapHasGpuCopy(pPixmap)) { exaDoMoveInPixmap(migrate); } if (exaPixmapHasGpuCopy(pPixmap)) { exaCopyDirtyToFb(migrate); ExaOffscreenMarkUsed(pPixmap); } else exaCopyDirtyToSys(migrate); } /** * For the "greedy" migration scheme, pushes the pixmap toward being located in * system memory. */ static void exaMigrateTowardSys(ExaMigrationPtr migrate) { PixmapPtr pPixmap = migrate->pPix; ExaPixmapPriv(pPixmap); DBG_MIGRATE(("UseMem: %p score %d\n", (void *) pPixmap, pExaPixmap->score)); if (pExaPixmap->score == EXA_PIXMAP_SCORE_PINNED) return; if (pExaPixmap->score == EXA_PIXMAP_SCORE_INIT) pExaPixmap->score = 0; if (pExaPixmap->score > EXA_PIXMAP_SCORE_MIN) pExaPixmap->score--; if (pExaPixmap->score <= EXA_PIXMAP_SCORE_MOVE_OUT && pExaPixmap->area) exaDoMoveOutPixmap(migrate); if (exaPixmapHasGpuCopy(pPixmap)) { exaCopyDirtyToFb(migrate); ExaOffscreenMarkUsed(pPixmap); } else exaCopyDirtyToSys(migrate); } /** * If the pixmap has both a framebuffer and system memory copy, this function * asserts that both of them are the same. */ static Bool exaAssertNotDirty(PixmapPtr pPixmap) { ExaPixmapPriv(pPixmap); CARD8 *dst, *src; RegionRec ValidReg; int dst_pitch, src_pitch, cpp, y, nbox, save_pitch; BoxPtr pBox; Bool ret = TRUE, save_use_gpu_copy; if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL) return ret; RegionNull(&ValidReg); RegionIntersect(&ValidReg, &pExaPixmap->validFB, &pExaPixmap->validSys); nbox = RegionNumRects(&ValidReg); if (!nbox) goto out; pBox = RegionRects(&ValidReg); dst_pitch = pExaPixmap->sys_pitch; src_pitch = pExaPixmap->fb_pitch; cpp = pPixmap->drawable.bitsPerPixel / 8; save_use_gpu_copy = pExaPixmap->use_gpu_copy; save_pitch = pPixmap->devKind; pExaPixmap->use_gpu_copy = TRUE; pPixmap->devKind = pExaPixmap->fb_pitch; if (!ExaDoPrepareAccess(pPixmap, EXA_PREPARE_SRC)) goto skip; while (nbox--) { int rowbytes; pBox->x1 = max(pBox->x1, 0); pBox->y1 = max(pBox->y1, 0); pBox->x2 = min(pBox->x2, pPixmap->drawable.width); pBox->y2 = min(pBox->y2, pPixmap->drawable.height); if (pBox->x1 >= pBox->x2 || pBox->y1 >= pBox->y2) continue; rowbytes = (pBox->x2 - pBox->x1) * cpp; src = (CARD8 *) pPixmap->devPrivate.ptr + pBox->y1 * src_pitch + pBox->x1 * cpp; dst = pExaPixmap->sys_ptr + pBox->y1 * dst_pitch + pBox->x1 * cpp; for (y = pBox->y1; y < pBox->y2; y++, src += src_pitch, dst += dst_pitch) { if (memcmp(dst, src, rowbytes) != 0) { ret = FALSE; exaPixmapDirty(pPixmap, pBox->x1, pBox->y1, pBox->x2, pBox->y2); break; } } } skip: exaFinishAccess(&pPixmap->drawable, EXA_PREPARE_SRC); pExaPixmap->use_gpu_copy = save_use_gpu_copy; pPixmap->devKind = save_pitch; out: RegionUninit(&ValidReg); return ret; } /** * Performs migration of the pixmaps according to the operation information * provided in pixmaps and can_accel and the migration scheme chosen in the * config file. */ void exaDoMigration_classic(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) { ScreenPtr pScreen = pixmaps[0].pPix->drawable.pScreen; ExaScreenPriv(pScreen); int i, j; /* If this debugging flag is set, check each pixmap for whether it is marked * as clean, and if so, actually check if that's the case. This should help * catch issues with failing to mark a drawable as dirty. While it will * catch them late (after the operation happened), it at least explains what * went wrong, and instrumenting the code to find what operation happened * to the pixmap last shouldn't be hard. */ if (pExaScr->checkDirtyCorrectness) { for (i = 0; i < npixmaps; i++) { if (!exaPixmapIsDirty(pixmaps[i].pPix) && !exaAssertNotDirty(pixmaps[i].pPix)) ErrorF("%s: Pixmap %d dirty but not marked as such!\n", __func__, i); } } /* If anything is pinned in system memory, we won't be able to * accelerate. */ for (i = 0; i < npixmaps; i++) { if (exaPixmapIsPinned(pixmaps[i].pPix) && !exaPixmapHasGpuCopy(pixmaps[i].pPix)) { EXA_FALLBACK(("Pixmap %p (%dx%d) pinned in sys\n", pixmaps[i].pPix, pixmaps[i].pPix->drawable.width, pixmaps[i].pPix->drawable.height)); can_accel = FALSE; break; } } if (pExaScr->migration == ExaMigrationSmart) { /* If we've got something as a destination that we shouldn't cause to * become newly dirtied, take the unaccelerated route. */ for (i = 0; i < npixmaps; i++) { if (pixmaps[i].as_dst && !exaPixmapShouldBeInFB(pixmaps[i].pPix) && !exaPixmapIsDirty(pixmaps[i].pPix)) { for (i = 0; i < npixmaps; i++) { if (!exaPixmapIsDirty(pixmaps[i].pPix)) exaDoMoveOutPixmap(pixmaps + i); } return; } } /* If we aren't going to accelerate, then we migrate everybody toward * system memory, and kick out if it's free. */ if (!can_accel) { for (i = 0; i < npixmaps; i++) { exaMigrateTowardSys(pixmaps + i); if (!exaPixmapIsDirty(pixmaps[i].pPix)) exaDoMoveOutPixmap(pixmaps + i); } return; } /* Finally, the acceleration path. Move them all in. */ for (i = 0; i < npixmaps; i++) { exaMigrateTowardFb(pixmaps + i); exaDoMoveInPixmap(pixmaps + i); } } else if (pExaScr->migration == ExaMigrationGreedy) { /* If we can't accelerate, either because the driver can't or because one of * the pixmaps is pinned in system memory, then we migrate everybody toward * system memory. * * We also migrate toward system if all pixmaps involved are currently in * system memory -- this can mitigate thrashing when there are significantly * more pixmaps active than would fit in memory. * * If not, then we migrate toward FB so that hopefully acceleration can * happen. */ if (!can_accel) { for (i = 0; i < npixmaps; i++) exaMigrateTowardSys(pixmaps + i); return; } for (i = 0; i < npixmaps; i++) { if (exaPixmapHasGpuCopy(pixmaps[i].pPix)) { /* Found one in FB, so move all to FB. */ for (j = 0; j < npixmaps; j++) exaMigrateTowardFb(pixmaps + i); return; } } /* Nobody's in FB, so move all away from FB. */ for (i = 0; i < npixmaps; i++) exaMigrateTowardSys(pixmaps + i); } else if (pExaScr->migration == ExaMigrationAlways) { /* Always move the pixmaps out if we can't accelerate. If we can * accelerate, try to move them all in. If that fails, then move them * back out. */ if (!can_accel) { for (i = 0; i < npixmaps; i++) exaDoMoveOutPixmap(pixmaps + i); return; } /* Now, try to move them all into FB */ for (i = 0; i < npixmaps; i++) { exaDoMoveInPixmap(pixmaps + i); } /* If we couldn't fit everything in, abort */ for (i = 0; i < npixmaps; i++) { if (!exaPixmapHasGpuCopy(pixmaps[i].pPix)) { return; } } /* Yay, everything has a gpu copy, mark memory as used */ for (i = 0; i < npixmaps; i++) { ExaOffscreenMarkUsed(pixmaps[i].pPix); } } } void exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg) { ExaMigrationRec pixmaps[1]; if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; } else { pixmaps[0].as_dst = FALSE; pixmaps[0].as_src = TRUE; } pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = pReg; exaDoMigration(pixmaps, 1, FALSE); (void) ExaDoPrepareAccess(pPixmap, index); } xorg-server-21.1.16/exa/exa_driver.c0000644000175000017500000001540114757411105012705 /* * Copyright © 2009 Maarten Maathuis * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" /* This file holds the driver allocated pixmaps specific implementation. */ static _X_INLINE void * ExaGetPixmapAddress(PixmapPtr p) { ExaPixmapPriv(p); return pExaPixmap->sys_ptr; } /** * exaCreatePixmap() creates a new pixmap. * * Pixmaps are always marked as pinned, because exa has no control over them. */ PixmapPtr exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) { PixmapPtr pPixmap; ExaPixmapPrivPtr pExaPixmap; int bpp; size_t paddedWidth, datasize; ExaScreenPriv(pScreen); if (w > 32767 || h > 32767) return NullPixmap; swap(pExaScr, pScreen, CreatePixmap); pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); swap(pExaScr, pScreen, CreatePixmap); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); pExaPixmap->driverPriv = NULL; bpp = pPixmap->drawable.bitsPerPixel; /* Set this before driver hooks, to allow for driver pixmaps without gpu * memory to back it. These pixmaps have a valid pointer at all times. */ pPixmap->devPrivate.ptr = NULL; if (pExaScr->info->CreatePixmap2) { int new_pitch = 0; pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch); paddedWidth = pExaPixmap->fb_pitch = new_pitch; } else { paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); if (paddedWidth / 4 > 32767 || h > 32767) return NullPixmap; exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); if (paddedWidth < pExaPixmap->fb_pitch) paddedWidth = pExaPixmap->fb_pitch; datasize = h * paddedWidth; pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0); } if (!pExaPixmap->driverPriv) { swap(pExaScr, pScreen, DestroyPixmap); pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return NULL; } /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */ pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; pExaPixmap->fb_ptr = NULL; pExaPixmap->pDamage = NULL; pExaPixmap->sys_ptr = NULL; (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); pExaPixmap->area = NULL; exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); /* During a fallback we must prepare access. */ if (pExaScr->fallback_counter) exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); return pPixmap; } Bool exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret; if (!pPixmap) return FALSE; pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); if (pExaPixmap) { if (pPixData) pExaPixmap->sys_ptr = pPixData; if (devKind > 0) pExaPixmap->sys_pitch = devKind; if (width > 0 && height > 0 && bitsPerPixel > 0) { exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); } } if (pExaScr->info->ModifyPixmapHeader) { ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); /* For EXA_HANDLES_PIXMAPS, we set pPixData to NULL. * If pPixmap->devPrivate.ptr is non-NULL, then we've got a * !has_gpu_copy pixmap. We need to store the pointer, * because PrepareAccess won't be called. */ if (!pPixData && pPixmap->devPrivate.ptr && pPixmap->devKind) { pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; pExaPixmap->sys_pitch = pPixmap->devKind; } if (ret == TRUE) goto out; } swap(pExaScr, pScreen, ModifyPixmapHeader); ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); swap(pExaScr, pScreen, ModifyPixmapHeader); out: /* Always NULL this, we don't want lingering pointers. */ pPixmap->devPrivate.ptr = NULL; return ret; } Bool exaDestroyPixmap_driver(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); Bool ret; if (pPixmap->refcnt == 1) { ExaPixmapPriv(pPixmap); exaDestroyPixmap(pPixmap); if (pExaPixmap->driverPriv) pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); pExaPixmap->driverPriv = NULL; } swap(pExaScr, pScreen, DestroyPixmap); ret = pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return ret; } Bool exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); void *saved_ptr; Bool ret; saved_ptr = pPixmap->devPrivate.ptr; pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap); pPixmap->devPrivate.ptr = saved_ptr; return ret; } xorg-server-21.1.16/exa/exa_mixed.c0000644000175000017500000002301314757411105012516 /* * Copyright © 2009 Maarten Maathuis * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" /* This file holds the driver allocated pixmaps + better initial placement code. */ static _X_INLINE void * ExaGetPixmapAddress(PixmapPtr p) { ExaPixmapPriv(p); return pExaPixmap->sys_ptr; } /** * exaCreatePixmap() creates a new pixmap. */ PixmapPtr exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) { PixmapPtr pPixmap; ExaPixmapPrivPtr pExaPixmap; int bpp; size_t paddedWidth; ExaScreenPriv(pScreen); if (w > 32767 || h > 32767) return NullPixmap; swap(pExaScr, pScreen, CreatePixmap); pPixmap = pScreen->CreatePixmap(pScreen, 0, 0, depth, usage_hint); swap(pExaScr, pScreen, CreatePixmap); if (!pPixmap) return NULL; pExaPixmap = ExaGetPixmapPriv(pPixmap); pExaPixmap->driverPriv = NULL; bpp = pPixmap->drawable.bitsPerPixel; paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); if (paddedWidth / 4 > 32767 || h > 32767) return NullPixmap; /* We will allocate the system pixmap later if needed. */ pPixmap->devPrivate.ptr = NULL; pExaPixmap->sys_ptr = NULL; pExaPixmap->sys_pitch = paddedWidth; pExaPixmap->area = NULL; pExaPixmap->fb_ptr = NULL; pExaPixmap->pDamage = NULL; exaSetFbPitch(pExaScr, pExaPixmap, w, h, bpp); exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); /* A scratch pixmap will become a driver pixmap right away. */ if (!w || !h) { exaCreateDriverPixmap_mixed(pPixmap); pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); } else { pExaPixmap->use_gpu_copy = FALSE; if (w == 1 && h == 1) { pExaPixmap->sys_ptr = malloc(paddedWidth); /* Set up damage tracking */ pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL, DamageReportNonEmpty, TRUE, pPixmap->drawable.pScreen, pPixmap); if (pExaPixmap->pDamage) { DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); /* This ensures that pending damage reflects the current * operation. This is used by exa to optimize migration. */ DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); } } } /* During a fallback we must prepare access. */ if (pExaScr->fallback_counter) exaPrepareAccess(&pPixmap->drawable, EXA_PREPARE_AUX_DEST); return pPixmap; } Bool exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret, has_gpu_copy; if (!pPixmap) return FALSE; pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); if (pPixData) { if (pExaPixmap->driverPriv) { if (pExaPixmap->pDamage) { DamageDestroy(pExaPixmap->pDamage); pExaPixmap->pDamage = NULL; } pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); pExaPixmap->driverPriv = NULL; } pExaPixmap->use_gpu_copy = FALSE; pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; } has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); if (width <= 0) width = pPixmap->drawable.width; if (height <= 0) height = pPixmap->drawable.height; if (bitsPerPixel <= 0) { if (depth <= 0) bitsPerPixel = pPixmap->drawable.bitsPerPixel; else bitsPerPixel = BitsPerPixel(depth); } if (depth <= 0) depth = pPixmap->drawable.depth; if (width != pPixmap->drawable.width || height != pPixmap->drawable.height || depth != pPixmap->drawable.depth || bitsPerPixel != pPixmap->drawable.bitsPerPixel) { if (pExaPixmap->driverPriv) { if (devKind > 0) pExaPixmap->fb_pitch = devKind; else exaSetFbPitch(pExaScr, pExaPixmap, width, height, bitsPerPixel); exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); RegionEmpty(&pExaPixmap->validFB); } /* Need to re-create system copy if there's also a GPU copy */ if (has_gpu_copy) { if (pExaPixmap->sys_ptr) { free(pExaPixmap->sys_ptr); pExaPixmap->sys_ptr = NULL; DamageDestroy(pExaPixmap->pDamage); pExaPixmap->pDamage = NULL; RegionEmpty(&pExaPixmap->validSys); if (pExaScr->deferred_mixed_pixmap == pPixmap) pExaScr->deferred_mixed_pixmap = NULL; } pExaPixmap->sys_pitch = PixmapBytePad(width, depth); } } if (has_gpu_copy) { pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr; pPixmap->devKind = pExaPixmap->fb_pitch; } else { pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devKind = pExaPixmap->sys_pitch; } /* Only pass driver pixmaps to the driver. */ if (pExaScr->info->ModifyPixmapHeader && pExaPixmap->driverPriv) { ret = pExaScr->info->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); if (ret == TRUE) goto out; } swap(pExaScr, pScreen, ModifyPixmapHeader); ret = pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); swap(pExaScr, pScreen, ModifyPixmapHeader); out: if (has_gpu_copy) { pExaPixmap->fb_ptr = pPixmap->devPrivate.ptr; pExaPixmap->fb_pitch = pPixmap->devKind; } else { pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; pExaPixmap->sys_pitch = pPixmap->devKind; } /* Always NULL this, we don't want lingering pointers. */ pPixmap->devPrivate.ptr = NULL; return ret; } Bool exaDestroyPixmap_mixed(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); Bool ret; if (pPixmap->refcnt == 1) { ExaPixmapPriv(pPixmap); exaDestroyPixmap(pPixmap); if (pExaScr->deferred_mixed_pixmap == pPixmap) pExaScr->deferred_mixed_pixmap = NULL; if (pExaPixmap->driverPriv) pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); pExaPixmap->driverPriv = NULL; if (pExaPixmap->pDamage) { free(pExaPixmap->sys_ptr); pExaPixmap->sys_ptr = NULL; pExaPixmap->pDamage = NULL; } } swap(pExaScr, pScreen, DestroyPixmap); ret = pScreen->DestroyPixmap(pPixmap); swap(pExaScr, pScreen, DestroyPixmap); return ret; } Bool exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); void *saved_ptr; Bool ret; if (!pExaPixmap->driverPriv) return FALSE; saved_ptr = pPixmap->devPrivate.ptr; pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap); pPixmap->devPrivate.ptr = saved_ptr; return ret; } Bool exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); Bool ret = FALSE; exaMoveInPixmap(pPixmap); /* get the driver to give us a handle */ if (pExaScr->info->SharePixmapBacking) ret = pExaScr->info->SharePixmapBacking(pPixmap, secondary, handle_p); return ret; } Bool exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); Bool ret = FALSE; if (pExaScr->info->SetSharedPixmapBacking) ret = pExaScr->info->SetSharedPixmapBacking(pPixmap, handle); if (ret == TRUE) exaMoveInPixmap(pPixmap); return ret; } xorg-server-21.1.16/exa/exa_migration_mixed.c0000644000175000017500000002200714757411105014571 /* * Copyright © 2009 Maarten Maathuis * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "exa.h" void exaCreateDriverPixmap_mixed(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ExaScreenPriv(pScreen); ExaPixmapPriv(pPixmap); int w = pPixmap->drawable.width, h = pPixmap->drawable.height; int depth = pPixmap->drawable.depth, bpp = pPixmap->drawable.bitsPerPixel; int usage_hint = pPixmap->usage_hint; int paddedWidth = pExaPixmap->sys_pitch; /* Already done. */ if (pExaPixmap->driverPriv) return; if (exaPixmapIsPinned(pPixmap)) return; /* Can't accel 1/4 bpp. */ if (pExaPixmap->accel_blocked || bpp < 8) return; if (pExaScr->info->CreatePixmap2) { int new_pitch = 0; pExaPixmap->driverPriv = pExaScr->info->CreatePixmap2(pScreen, w, h, depth, usage_hint, bpp, &new_pitch); paddedWidth = pExaPixmap->fb_pitch = new_pitch; } else { if (paddedWidth < pExaPixmap->fb_pitch) paddedWidth = pExaPixmap->fb_pitch; pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, paddedWidth * h, 0); } if (!pExaPixmap->driverPriv) return; (*pScreen->ModifyPixmapHeader) (pPixmap, w, h, 0, 0, paddedWidth, NULL); } void exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel) { int i; /* If anything is pinned in system memory, we won't be able to * accelerate. */ for (i = 0; i < npixmaps; i++) { if (exaPixmapIsPinned(pixmaps[i].pPix) && !exaPixmapHasGpuCopy(pixmaps[i].pPix)) { can_accel = FALSE; break; } } /* We can do nothing. */ if (!can_accel) return; for (i = 0; i < npixmaps; i++) { PixmapPtr pPixmap = pixmaps[i].pPix; ExaPixmapPriv(pPixmap); if (!pExaPixmap->driverPriv) exaCreateDriverPixmap_mixed(pPixmap); if (pExaPixmap->pDamage && exaPixmapHasGpuCopy(pPixmap)) { ExaScreenPriv(pPixmap->drawable.pScreen); /* This pitch is needed for proper acceleration. For some reason * there are pixmaps without pDamage and a bad fb_pitch value. * So setting devKind when only exaPixmapHasGpuCopy() is true * causes corruption. Pixmaps without pDamage are not migrated * and should have a valid devKind at all times, so that's why this * isn't causing problems. Pixmaps have their gpu pitch set the * first time in the MPH call from exaCreateDriverPixmap_mixed(). */ pPixmap->devKind = pExaPixmap->fb_pitch; exaCopyDirtyToFb(pixmaps + i); if (pExaScr->deferred_mixed_pixmap == pPixmap && !pixmaps[i].as_dst && !pixmaps[i].pReg) pExaScr->deferred_mixed_pixmap = NULL; } pExaPixmap->use_gpu_copy = exaPixmapHasGpuCopy(pPixmap); } } void exaMoveInPixmap_mixed(PixmapPtr pPixmap) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = FALSE; pixmaps[0].as_src = TRUE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = NULL; exaDoMigration(pixmaps, 1, TRUE); } void exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure) { PixmapPtr pPixmap = closure; ExaPixmapPriv(pPixmap); /* Move back results of software rendering on system memory copy of mixed driver * pixmap (see exaPrepareAccessReg_mixed). * * Defer moving the destination back into the driver pixmap, to try and save * overhead on multiple subsequent software fallbacks. */ if (!pExaPixmap->use_gpu_copy && exaPixmapHasGpuCopy(pPixmap)) { ExaScreenPriv(pPixmap->drawable.pScreen); if (pExaScr->deferred_mixed_pixmap && pExaScr->deferred_mixed_pixmap != pPixmap) exaMoveInPixmap_mixed(pExaScr->deferred_mixed_pixmap); pExaScr->deferred_mixed_pixmap = pPixmap; } } /* With mixed pixmaps, if we fail to get direct access to the driver pixmap, we * use the DownloadFromScreen hook to retrieve contents to a copy in system * memory, perform software rendering on that and move back the results with the * UploadToScreen hook (see exaDamageReport_mixed). */ void exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg) { ExaPixmapPriv(pPixmap); Bool has_gpu_copy = exaPixmapHasGpuCopy(pPixmap); Bool success; success = ExaDoPrepareAccess(pPixmap, index); if (success && has_gpu_copy && pExaPixmap->pDamage) { /* You cannot do accelerated operations while a buffer is mapped. */ exaFinishAccess(&pPixmap->drawable, index); /* Update the gpu view of both deferred destination pixmaps and of * source pixmaps that were migrated with a bounding region. */ exaMoveInPixmap_mixed(pPixmap); success = ExaDoPrepareAccess(pPixmap, index); if (success) { /* We have a gpu pixmap that can be accessed, we don't need the cpu * copy anymore. Drivers that prefer DFS, should fail prepare * access. */ DamageDestroy(pExaPixmap->pDamage); pExaPixmap->pDamage = NULL; free(pExaPixmap->sys_ptr); pExaPixmap->sys_ptr = NULL; return; } } if (!success) { ExaMigrationRec pixmaps[1]; /* Do we need to allocate our system buffer? */ if (!pExaPixmap->sys_ptr) { pExaPixmap->sys_ptr = xallocarray(pExaPixmap->sys_pitch, pPixmap->drawable.height); if (!pExaPixmap->sys_ptr) FatalError("EXA: malloc failed for size %d bytes\n", pExaPixmap->sys_pitch * pPixmap->drawable.height); } if (index == EXA_PREPARE_DEST || index == EXA_PREPARE_AUX_DEST) { pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; } else { pixmaps[0].as_dst = FALSE; pixmaps[0].as_src = TRUE; } pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = pReg; if (!pExaPixmap->pDamage && (has_gpu_copy || !exaPixmapIsPinned(pPixmap))) { Bool as_dst = pixmaps[0].as_dst; /* Set up damage tracking */ pExaPixmap->pDamage = DamageCreate(exaDamageReport_mixed, NULL, DamageReportNonEmpty, TRUE, pPixmap->drawable.pScreen, pPixmap); if (pExaPixmap->pDamage) { DamageRegister(&pPixmap->drawable, pExaPixmap->pDamage); /* This ensures that pending damage reflects the current * operation. This is used by exa to optimize migration. */ DamageSetReportAfterOp(pExaPixmap->pDamage, TRUE); } if (has_gpu_copy) { exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, pPixmap->drawable.height); /* We don't know which region of the destination will be damaged, * have to assume all of it */ if (as_dst) { pixmaps[0].as_dst = FALSE; pixmaps[0].as_src = TRUE; pixmaps[0].pReg = NULL; } exaCopyDirtyToSys(pixmaps); } if (as_dst) exaPixmapDirty(pPixmap, 0, 0, pPixmap->drawable.width, pPixmap->drawable.height); } else if (has_gpu_copy) exaCopyDirtyToSys(pixmaps); pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devKind = pExaPixmap->sys_pitch; pExaPixmap->use_gpu_copy = FALSE; } } xorg-server-21.1.16/exa/exa_accel.c0000644000175000017500000012334114757411105012464 /* * Copyright © 2001 Keith Packard * * Partly based on code that is Copyright © The XFree86 Project Inc. * * 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. * * Authors: * Eric Anholt * Michel Dänzer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "exa_priv.h" #include #include "dixfontstr.h" #include "exa.h" static void exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, DDXPointPtr ppt, int *pwidth, int fSorted) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); RegionPtr pClip = fbGetCompositeClip(pGC); PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); BoxPtr pextent, pbox; int nbox; int extentX1, extentX2, extentY1, extentY2; int fullX1, fullX2, fullY1; int partX1, partX2; int off_x, off_y; if (pExaScr->fallback_counter || pExaScr->swappedOut || pGC->fillStyle != FillSolid || pExaPixmap->accel_blocked) { ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted); return; } if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = NULL; exaDoMigration(pixmaps, 1, TRUE); } if (!(pPixmap = exaGetOffscreenPixmap(pDrawable, &off_x, &off_y)) || !(*pExaScr->info->PrepareSolid) (pPixmap, pGC->alu, pGC->planemask, pGC->fgPixel)) { ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted); return; } pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; extentY2 = pextent->y2; while (n--) { fullX1 = ppt->x; fullY1 = ppt->y; fullX2 = fullX1 + (int) *pwidth; ppt++; pwidth++; if (fullY1 < extentY1 || extentY2 <= fullY1) continue; if (fullX1 < extentX1) fullX1 = extentX1; if (fullX2 > extentX2) fullX2 = extentX2; if (fullX1 >= fullX2) continue; nbox = RegionNumRects(pClip); if (nbox == 1) { (*pExaScr->info->Solid) (pPixmap, fullX1 + off_x, fullY1 + off_y, fullX2 + off_x, fullY1 + 1 + off_y); } else { pbox = RegionRects(pClip); while (nbox--) { if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) { partX1 = pbox->x1; if (partX1 < fullX1) partX1 = fullX1; partX2 = pbox->x2; if (partX2 > fullX2) partX2 = fullX2; if (partX2 > partX1) { (*pExaScr->info->Solid) (pPixmap, partX1 + off_x, fullY1 + off_y, partX2 + off_x, fullY1 + 1 + off_y); } } pbox++; } } } (*pExaScr->info->DoneSolid) (pPixmap); exaMarkSync(pScreen); } static Bool exaDoPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int format, char *bits, int src_stride) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPix); RegionPtr pClip; BoxPtr pbox; int nbox; int xoff, yoff; int bpp = pDrawable->bitsPerPixel; Bool ret = TRUE; if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || !pExaScr->info->UploadToScreen) return FALSE; /* If there's a system copy, we want to save the result there */ if (pExaPixmap->pDamage) return FALSE; /* Don't bother with under 8bpp, XYPixmaps. */ if (format != ZPixmap || bpp < 8) return FALSE; /* Only accelerate copies: no rop or planemask. */ if (!EXA_PM_IS_SOLID(pDrawable, pGC->planemask) || pGC->alu != GXcopy) return FALSE; if (pExaScr->swappedOut) return FALSE; if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPix; pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage); exaDoMigration(pixmaps, 1, TRUE); } pPix = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); if (!pPix) return FALSE; x += pDrawable->x; y += pDrawable->y; pClip = fbGetCompositeClip(pGC); for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { int x1 = x; int y1 = y; int x2 = x + w; int y2 = y + h; char *src; Bool ok; if (x1 < pbox->x1) x1 = pbox->x1; if (y1 < pbox->y1) y1 = pbox->y1; if (x2 > pbox->x2) x2 = pbox->x2; if (y2 > pbox->y2) y2 = pbox->y2; if (x1 >= x2 || y1 >= y2) continue; src = bits + (y1 - y) * src_stride + (x1 - x) * (bpp / 8); ok = pExaScr->info->UploadToScreen(pPix, x1 + xoff, y1 + yoff, x2 - x1, y2 - y1, src, src_stride); /* We have to fall back completely, and ignore what has already been completed. * Messing with the fb layer directly like we used to is completely unacceptable. */ if (!ok) { ret = FALSE; break; } } if (ret) exaMarkSync(pDrawable->pScreen); return ret; } static void exaPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { if (!exaDoPutImage(pDrawable, pGC, depth, x, y, w, h, format, bits, PixmapBytePad(w, pDrawable->depth))) ExaCheckPutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); } static Bool inline exaCopyNtoNTwoDir(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy) { ExaScreenPriv(pDstDrawable->pScreen); PixmapPtr pSrcPixmap, pDstPixmap; int src_off_x, src_off_y, dst_off_x, dst_off_y; int dirsetup; /* Need to get both pixmaps to call the driver routines */ pSrcPixmap = exaGetOffscreenPixmap(pSrcDrawable, &src_off_x, &src_off_y); pDstPixmap = exaGetOffscreenPixmap(pDstDrawable, &dst_off_x, &dst_off_y); if (!pSrcPixmap || !pDstPixmap) return FALSE; /* * Now the case of a chip that only supports xdir = ydir = 1 or * xdir = ydir = -1, but we have xdir != ydir. */ dirsetup = 0; /* No direction set up yet. */ for (; nbox; pbox++, nbox--) { if (dx >= 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { /* Do a xdir = ydir = -1 blit instead. */ if (dirsetup != -1) { if (dirsetup != 0) pExaScr->info->DoneCopy(pDstPixmap); dirsetup = -1; if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, -1, -1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) return FALSE; } (*pExaScr->info->Copy) (pDstPixmap, src_off_x + pbox->x1 + dx, src_off_y + pbox->y1 + dy, dst_off_x + pbox->x1, dst_off_y + pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); } else if (dx < 0 && (src_off_y + pbox->y1 + dy) != pbox->y1) { /* Do a xdir = ydir = 1 blit instead. */ if (dirsetup != 1) { if (dirsetup != 0) pExaScr->info->DoneCopy(pDstPixmap); dirsetup = 1; if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, 1, 1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) return FALSE; } (*pExaScr->info->Copy) (pDstPixmap, src_off_x + pbox->x1 + dx, src_off_y + pbox->y1 + dy, dst_off_x + pbox->x1, dst_off_y + pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); } else if (dx >= 0) { /* * xdir = 1, ydir = -1. * Perform line-by-line xdir = ydir = 1 blits, going up. */ int i; if (dirsetup != 1) { if (dirsetup != 0) pExaScr->info->DoneCopy(pDstPixmap); dirsetup = 1; if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, 1, 1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) return FALSE; } for (i = pbox->y2 - pbox->y1 - 1; i >= 0; i--) (*pExaScr->info->Copy) (pDstPixmap, src_off_x + pbox->x1 + dx, src_off_y + pbox->y1 + dy + i, dst_off_x + pbox->x1, dst_off_y + pbox->y1 + i, pbox->x2 - pbox->x1, 1); } else { /* * xdir = -1, ydir = 1. * Perform line-by-line xdir = ydir = -1 blits, going down. */ int i; if (dirsetup != -1) { if (dirsetup != 0) pExaScr->info->DoneCopy(pDstPixmap); dirsetup = -1; if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, -1, -1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) return FALSE; } for (i = 0; i < pbox->y2 - pbox->y1; i++) (*pExaScr->info->Copy) (pDstPixmap, src_off_x + pbox->x1 + dx, src_off_y + pbox->y1 + dy + i, dst_off_x + pbox->x1, dst_off_y + pbox->y1 + i, pbox->x2 - pbox->x1, 1); } } if (dirsetup != 0) pExaScr->info->DoneCopy(pDstPixmap); exaMarkSync(pDstDrawable->pScreen); return TRUE; } Bool exaHWCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown) { ExaScreenPriv(pDstDrawable->pScreen); PixmapPtr pSrcPixmap, pDstPixmap; ExaPixmapPrivPtr pSrcExaPixmap, pDstExaPixmap; int src_off_x, src_off_y; int dst_off_x, dst_off_y; RegionPtr srcregion = NULL, dstregion = NULL; xRectangle *rects; Bool ret = TRUE; /* avoid doing copy operations if no boxes */ if (nbox == 0) return TRUE; pSrcPixmap = exaGetDrawablePixmap(pSrcDrawable); pDstPixmap = exaGetDrawablePixmap(pDstDrawable); exaGetDrawableDeltas(pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); exaGetDrawableDeltas(pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); rects = xallocarray(nbox, sizeof(xRectangle)); if (rects) { int i; int ordering; for (i = 0; i < nbox; i++) { rects[i].x = pbox[i].x1 + dx + src_off_x; rects[i].y = pbox[i].y1 + dy + src_off_y; rects[i].width = pbox[i].x2 - pbox[i].x1; rects[i].height = pbox[i].y2 - pbox[i].y1; } /* This must match the RegionCopy() logic for reversing rect order */ if (nbox == 1 || (dx > 0 && dy > 0) || (pDstDrawable != pSrcDrawable && (pDstDrawable->type != DRAWABLE_WINDOW || pSrcDrawable->type != DRAWABLE_WINDOW))) ordering = CT_YXBANDED; else ordering = CT_UNSORTED; srcregion = RegionFromRects(nbox, rects, ordering); free(rects); if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClip != NULL)) { dstregion = RegionCreate(NullBox, 0); RegionCopy(dstregion, srcregion); RegionTranslate(dstregion, dst_off_x - dx - src_off_x, dst_off_y - dy - src_off_y); } } pSrcExaPixmap = ExaGetPixmapPriv(pSrcPixmap); pDstExaPixmap = ExaGetPixmapPriv(pDstPixmap); /* Check whether the accelerator can use this pixmap. * If the pitch of the pixmaps is out of range, there's nothing * we can do but fall back to software rendering. */ if (pSrcExaPixmap->accel_blocked & EXA_RANGE_PITCH || pDstExaPixmap->accel_blocked & EXA_RANGE_PITCH) goto fallback; /* If the width or the height of either of the pixmaps * is out of range, check whether the boxes are actually out of the * addressable range as well. If they aren't, we can still do * the copying in hardware. */ if (pSrcExaPixmap->accel_blocked || pDstExaPixmap->accel_blocked) { int i; for (i = 0; i < nbox; i++) { /* src */ if ((pbox[i].x2 + dx + src_off_x) >= pExaScr->info->maxX || (pbox[i].y2 + dy + src_off_y) >= pExaScr->info->maxY) goto fallback; /* dst */ if ((pbox[i].x2 + dst_off_x) >= pExaScr->info->maxX || (pbox[i].y2 + dst_off_y) >= pExaScr->info->maxY) goto fallback; } } if (pExaScr->do_migration) { ExaMigrationRec pixmaps[2]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pDstPixmap; pixmaps[0].pReg = dstregion; pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pSrcPixmap; pixmaps[1].pReg = srcregion; exaDoMigration(pixmaps, 2, TRUE); } /* Mixed directions must be handled specially if the card is lame */ if ((pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS) && reverse != upsidedown) { if (exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy)) goto out; goto fallback; } if (exaPixmapHasGpuCopy(pDstPixmap)) { /* Normal blitting. */ if (exaPixmapHasGpuCopy(pSrcPixmap)) { if (!(*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, reverse ? -1 : 1, upsidedown ? -1 : 1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) { goto fallback; } while (nbox--) { (*pExaScr->info->Copy) (pDstPixmap, pbox->x1 + dx + src_off_x, pbox->y1 + dy + src_off_y, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); pbox++; } (*pExaScr->info->DoneCopy) (pDstPixmap); exaMarkSync(pDstDrawable->pScreen); /* UTS: mainly for SHM PutImage's secondary path. * * Only taking this path for directly accessible pixmaps. */ } else if (!pDstExaPixmap->pDamage && pSrcExaPixmap->sys_ptr) { int bpp = pSrcDrawable->bitsPerPixel; int src_stride = exaGetPixmapPitch(pSrcPixmap); CARD8 *src = NULL; if (!pExaScr->info->UploadToScreen) goto fallback; if (pSrcDrawable->bitsPerPixel != pDstDrawable->bitsPerPixel) goto fallback; if (pSrcDrawable->bitsPerPixel < 8) goto fallback; if (pGC && !(pGC->alu == GXcopy && EXA_PM_IS_SOLID(pSrcDrawable, pGC->planemask))) goto fallback; while (nbox--) { src = pSrcExaPixmap->sys_ptr + (pbox->y1 + dy + src_off_y) * src_stride + (pbox->x1 + dx + src_off_x) * (bpp / 8); if (!pExaScr->info-> UploadToScreen(pDstPixmap, pbox->x1 + dst_off_x, pbox->y1 + dst_off_y, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, (char *) src, src_stride)) goto fallback; pbox++; } } else goto fallback; } else goto fallback; goto out; fallback: ret = FALSE; out: if (dstregion) { RegionUninit(dstregion); RegionDestroy(dstregion); } if (srcregion) { RegionUninit(srcregion); RegionDestroy(srcregion); } return ret; } void exaCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { ExaScreenPriv(pDstDrawable->pScreen); if (pExaScr->fallback_counter || (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW)) return; if (exaHWCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown)) return; /* This is a CopyWindow, it's cleaner to fallback at the original call. */ if (pExaScr->fallback_flags & EXA_ACCEL_COPYWINDOW) { pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; return; } /* fallback */ ExaCheckCopyNtoN(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } RegionPtr exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { ExaScreenPriv(pDstDrawable->pScreen); if (pExaScr->fallback_counter || pExaScr->swappedOut) { return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty); } return miDoCopy(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, exaCopyNtoN, 0, NULL); } static void exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { ExaScreenPriv(pDrawable->pScreen); int i; xRectangle *prect; /* If we can't reuse the current GC as is, don't bother accelerating the * points. */ if (pExaScr->fallback_counter || pGC->fillStyle != FillSolid) { ExaCheckPolyPoint(pDrawable, pGC, mode, npt, ppt); return; } prect = xallocarray(npt, sizeof(xRectangle)); for (i = 0; i < npt; i++) { prect[i].x = ppt[i].x; prect[i].y = ppt[i].y; if (i > 0 && mode == CoordModePrevious) { prect[i].x += prect[i - 1].x; prect[i].y += prect[i - 1].y; } prect[i].width = 1; prect[i].height = 1; } pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); free(prect); } /** * exaPolylines() checks if it can accelerate the lines as a group of * horizontal or vertical lines (rectangles), and uses existing rectangle fill * acceleration if so. */ static void exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { ExaScreenPriv(pDrawable->pScreen); xRectangle *prect; int x1, x2, y1, y2; int i; if (pExaScr->fallback_counter) { ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); return; } /* Don't try to do wide lines or non-solid fill style. */ if (pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || pGC->fillStyle != FillSolid) { ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); return; } prect = xallocarray(npt - 1, sizeof(xRectangle)); x1 = ppt[0].x; y1 = ppt[0].y; /* If we have any non-horizontal/vertical, fall back. */ for (i = 0; i < npt - 1; i++) { if (mode == CoordModePrevious) { x2 = x1 + ppt[i + 1].x; y2 = y1 + ppt[i + 1].y; } else { x2 = ppt[i + 1].x; y2 = ppt[i + 1].y; } if (x1 != x2 && y1 != y2) { free(prect); ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); return; } if (x1 < x2) { prect[i].x = x1; prect[i].width = x2 - x1 + 1; } else { prect[i].x = x2; prect[i].width = x1 - x2 + 1; } if (y1 < y2) { prect[i].y = y1; prect[i].height = y2 - y1 + 1; } else { prect[i].y = y2; prect[i].height = y1 - y2 + 1; } x1 = x2; y1 = y2; } pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); free(prect); } /** * exaPolySegment() checks if it can accelerate the lines as a group of * horizontal or vertical lines (rectangles), and uses existing rectangle fill * acceleration if so. */ static void exaPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSeg) { ExaScreenPriv(pDrawable->pScreen); xRectangle *prect; int i; /* Don't try to do wide lines or non-solid fill style. */ if (pExaScr->fallback_counter || pGC->lineWidth != 0 || pGC->lineStyle != LineSolid || pGC->fillStyle != FillSolid) { ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); return; } /* If we have any non-horizontal/vertical, fall back. */ for (i = 0; i < nseg; i++) { if (pSeg[i].x1 != pSeg[i].x2 && pSeg[i].y1 != pSeg[i].y2) { ExaCheckPolySegment(pDrawable, pGC, nseg, pSeg); return; } } prect = xallocarray((unsigned int)nseg, sizeof(xRectangle)); for (i = 0; i < nseg; i++) { if (pSeg[i].x1 < pSeg[i].x2) { prect[i].x = pSeg[i].x1; prect[i].width = pSeg[i].x2 - pSeg[i].x1 + 1; } else { prect[i].x = pSeg[i].x2; prect[i].width = pSeg[i].x1 - pSeg[i].x2 + 1; } if (pSeg[i].y1 < pSeg[i].y2) { prect[i].y = pSeg[i].y1; prect[i].height = pSeg[i].y2 - pSeg[i].y1 + 1; } else { prect[i].y = pSeg[i].y2; prect[i].height = pSeg[i].y1 - pSeg[i].y2 + 1; } /* don't paint last pixel */ if (pGC->capStyle == CapNotLast) { if (prect[i].width == 1) prect[i].height--; else prect[i].width--; } } pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); free(prect); } static Bool exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, CARD32 planemask, CARD32 alu, Bool hasClientClip); static void exaPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) { ExaScreenPriv(pDrawable->pScreen); RegionPtr pClip = fbGetCompositeClip(pGC); PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); register BoxPtr pbox; BoxPtr pextent; int extentX1, extentX2, extentY1, extentY2; int fullX1, fullX2, fullY1, fullY2; int partX1, partX2, partY1, partY2; int xoff, yoff; int xorg, yorg; int n; RegionPtr pReg = RegionFromRects(nrect, prect, CT_UNSORTED); /* Compute intersection of rects and clip region */ RegionTranslate(pReg, pDrawable->x, pDrawable->y); RegionIntersect(pReg, pClip, pReg); if (!RegionNumRects(pReg)) { goto out; } exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); if (pExaScr->fallback_counter || pExaScr->swappedOut || pExaPixmap->accel_blocked) { goto fallback; } /* For ROPs where overlaps don't matter, convert rectangles to region and * call exaFillRegion{Solid,Tiled}. */ if ((pGC->fillStyle == FillSolid || pGC->fillStyle == FillTiled) && (nrect == 1 || pGC->alu == GXcopy || pGC->alu == GXclear || pGC->alu == GXnoop || pGC->alu == GXcopyInverted || pGC->alu == GXset)) { if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) && exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ? pGC->fgPixel : pGC->tile.pixel, pGC->planemask, pGC->alu, pGC->clientClip != NULL)) || (pGC->fillStyle == FillTiled && !pGC->tileIsPixel && exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg, pGC->planemask, pGC->alu, pGC->clientClip != NULL))) { goto out; } } if (pGC->fillStyle != FillSolid && !(pGC->tileIsPixel && pGC->fillStyle == FillTiled)) { goto fallback; } if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = NULL; exaDoMigration(pixmaps, 1, TRUE); } if (!exaPixmapHasGpuCopy(pPixmap) || !(*pExaScr->info->PrepareSolid) (pPixmap, pGC->alu, pGC->planemask, pGC->fgPixel)) { fallback: ExaCheckPolyFillRect(pDrawable, pGC, nrect, prect); goto out; } xorg = pDrawable->x; yorg = pDrawable->y; pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; extentY2 = pextent->y2; while (nrect--) { fullX1 = prect->x + xorg; fullY1 = prect->y + yorg; fullX2 = fullX1 + (int) prect->width; fullY2 = fullY1 + (int) prect->height; prect++; if (fullX1 < extentX1) fullX1 = extentX1; if (fullY1 < extentY1) fullY1 = extentY1; if (fullX2 > extentX2) fullX2 = extentX2; if (fullY2 > extentY2) fullY2 = extentY2; if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) continue; n = RegionNumRects(pClip); if (n == 1) { (*pExaScr->info->Solid) (pPixmap, fullX1 + xoff, fullY1 + yoff, fullX2 + xoff, fullY2 + yoff); } else { pbox = RegionRects(pClip); /* * clip the rectangle to each box in the clip region * this is logically equivalent to calling Intersect(), * but rectangles may overlap each other here. */ while (n--) { partX1 = pbox->x1; if (partX1 < fullX1) partX1 = fullX1; partY1 = pbox->y1; if (partY1 < fullY1) partY1 = fullY1; partX2 = pbox->x2; if (partX2 > fullX2) partX2 = fullX2; partY2 = pbox->y2; if (partY2 > fullY2) partY2 = fullY2; pbox++; if (partX1 < partX2 && partY1 < partY2) { (*pExaScr->info->Solid) (pPixmap, partX1 + xoff, partY1 + yoff, partX2 + xoff, partY2 + yoff); } } } } (*pExaScr->info->DoneSolid) (pPixmap); exaMarkSync(pDrawable->pScreen); out: RegionUninit(pReg); RegionDestroy(pReg); } const GCOps exaOps = { exaFillSpans, ExaCheckSetSpans, exaPutImage, exaCopyArea, ExaCheckCopyPlane, exaPolyPoint, exaPolylines, exaPolySegment, miPolyRectangle, ExaCheckPolyArc, miFillPolygon, exaPolyFillRect, miPolyFillArc, miPolyText8, miPolyText16, miImageText8, miImageText16, ExaCheckImageGlyphBlt, ExaCheckPolyGlyphBlt, ExaCheckPushPixels, }; void exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { RegionRec rgnDst; int dx, dy; PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin); ExaScreenPriv(pWin->drawable.pScreen); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; RegionTranslate(prgnSrc, -dx, -dy); RegionInit(&rgnDst, NullBox, 0); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); #ifdef COMPOSITE if (pPixmap->screen_x || pPixmap->screen_y) RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); #endif if (pExaScr->fallback_counter) { pExaScr->fallback_flags |= EXA_FALLBACK_COPYWINDOW; goto fallback; } pExaScr->fallback_flags |= EXA_ACCEL_COPYWINDOW; miCopyRegion(&pPixmap->drawable, &pPixmap->drawable, NULL, &rgnDst, dx, dy, exaCopyNtoN, 0, NULL); pExaScr->fallback_flags &= ~EXA_ACCEL_COPYWINDOW; fallback: RegionUninit(&rgnDst); if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) { pExaScr->fallback_flags &= ~EXA_FALLBACK_COPYWINDOW; RegionTranslate(prgnSrc, dx, dy); ExaCheckCopyWindow(pWin, ptOldOrg, prgnSrc); } } static Bool exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, CARD32 planemask, CARD32 alu, Bool hasClientClip) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); int xoff, yoff; Bool ret = FALSE; exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); RegionTranslate(pRegion, xoff, yoff); if (pExaScr->fallback_counter || pExaPixmap->accel_blocked) goto out; if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid, alu, hasClientClip) ? NULL : pRegion; exaDoMigration(pixmaps, 1, TRUE); } if (exaPixmapHasGpuCopy(pPixmap) && (*pExaScr->info->PrepareSolid) (pPixmap, alu, planemask, pixel)) { int nbox; BoxPtr pBox; nbox = RegionNumRects(pRegion); pBox = RegionRects(pRegion); while (nbox--) { (*pExaScr->info->Solid) (pPixmap, pBox->x1, pBox->y1, pBox->x2, pBox->y2); pBox++; } (*pExaScr->info->DoneSolid) (pPixmap); exaMarkSync(pDrawable->pScreen); if (pExaPixmap->pDamage && pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP && pDrawable->width == 1 && pDrawable->height == 1 && pDrawable->bitsPerPixel != 24 && alu == GXcopy) { RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); switch (pDrawable->bitsPerPixel) { case 32: *(CARD32 *) pExaPixmap->sys_ptr = pixel; break; case 16: *(CARD16 *) pExaPixmap->sys_ptr = pixel; break; case 8: case 4: case 1: *(CARD8 *) pExaPixmap->sys_ptr = pixel; } RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, pRegion); RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, pRegion); RegionSubtract(pending_damage, pending_damage, pRegion); } ret = TRUE; } out: RegionTranslate(pRegion, -xoff, -yoff); return ret; } /* Try to do an accelerated tile of the pTile into pRegion of pDrawable. * Based on fbFillRegionTiled(), fbTile(). */ Bool exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, Bool hasClientClip) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPixmap; ExaPixmapPrivPtr pExaPixmap; ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile); int xoff, yoff; int tileWidth, tileHeight; int nbox = RegionNumRects(pRegion); BoxPtr pBox = RegionRects(pRegion); Bool ret = FALSE; int i; tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; /* If we're filling with a solid color, grab it out and go to * FillRegionSolid, saving numerous copies. */ if (tileWidth == 1 && tileHeight == 1) return exaFillRegionSolid(pDrawable, pRegion, exaGetPixmapFirstPixel(pTile), planemask, alu, hasClientClip); pPixmap = exaGetDrawablePixmap(pDrawable); pExaPixmap = ExaGetPixmapPriv(pPixmap); if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked) return FALSE; if (pExaScr->do_migration) { ExaMigrationRec pixmaps[2]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled, alu, hasClientClip) ? NULL : pRegion; pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pTile; pixmaps[1].pReg = NULL; exaDoMigration(pixmaps, 2, TRUE); } pPixmap = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); if (!pPixmap || !exaPixmapHasGpuCopy(pTile)) return FALSE; if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask)) { if (xoff || yoff) RegionTranslate(pRegion, xoff, yoff); for (i = 0; i < nbox; i++) { int height = pBox[i].y2 - pBox[i].y1; int dstY = pBox[i].y1; int tileY; if (alu == GXcopy) height = min(height, tileHeight); modulus(dstY - yoff - pDrawable->y - pPatOrg->y, tileHeight, tileY); while (height > 0) { int width = pBox[i].x2 - pBox[i].x1; int dstX = pBox[i].x1; int tileX; int h = tileHeight - tileY; if (alu == GXcopy) width = min(width, tileWidth); if (h > height) h = height; height -= h; modulus(dstX - xoff - pDrawable->x - pPatOrg->x, tileWidth, tileX); while (width > 0) { int w = tileWidth - tileX; if (w > width) w = width; width -= w; (*pExaScr->info->Copy) (pPixmap, tileX, tileY, dstX, dstY, w, h); dstX += w; tileX = 0; } dstY += h; tileY = 0; } } (*pExaScr->info->DoneCopy) (pPixmap); /* With GXcopy, we only need to do the basic algorithm up to the tile * size; then, we can just keep doubling the destination in each * direction until it fills the box. This way, the number of copy * operations is O(log(rx)) + O(log(ry)) instead of O(rx * ry), where * rx/ry is the ratio between box and tile width/height. This can make * a big difference if each driver copy incurs a significant constant * overhead. */ if (alu != GXcopy) ret = TRUE; else { Bool more_copy = FALSE; for (i = 0; i < nbox; i++) { int dstX = pBox[i].x1 + tileWidth; int dstY = pBox[i].y1 + tileHeight; if ((dstX < pBox[i].x2) || (dstY < pBox[i].y2)) { more_copy = TRUE; break; } } if (more_copy == FALSE) ret = TRUE; if (more_copy && (*pExaScr->info->PrepareCopy) (pPixmap, pPixmap, 1, 1, alu, planemask)) { for (i = 0; i < nbox; i++) { int dstX = pBox[i].x1 + tileWidth; int dstY = pBox[i].y1 + tileHeight; int width = min(pBox[i].x2 - dstX, tileWidth); int height = min(pBox[i].y2 - pBox[i].y1, tileHeight); while (dstX < pBox[i].x2) { (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1, dstX, pBox[i].y1, width, height); dstX += width; width = min(pBox[i].x2 - dstX, width * 2); } width = pBox[i].x2 - pBox[i].x1; height = min(pBox[i].y2 - dstY, tileHeight); while (dstY < pBox[i].y2) { (*pExaScr->info->Copy) (pPixmap, pBox[i].x1, pBox[i].y1, pBox[i].x1, dstY, width, height); dstY += height; height = min(pBox[i].y2 - dstY, height * 2); } } (*pExaScr->info->DoneCopy) (pPixmap); ret = TRUE; } } exaMarkSync(pDrawable->pScreen); if (xoff || yoff) RegionTranslate(pRegion, -xoff, -yoff); } return ret; } /** * Accelerates GetImage for solid ZPixmap downloads from framebuffer memory. * * This is probably the only case we actually care about. The rest fall through * to migration and fbGetImage, which hopefully will result in migration pushing * the pixmap out of framebuffer. */ void exaGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPix); int xoff, yoff; Bool ok; if (pExaScr->fallback_counter || pExaScr->swappedOut) goto fallback; /* If there's a system copy, we want to save the result there */ if (pExaPixmap->pDamage) goto fallback; pPix = exaGetOffscreenPixmap(pDrawable, &xoff, &yoff); if (pPix == NULL || pExaScr->info->DownloadFromScreen == NULL) goto fallback; /* Only cover the ZPixmap, solid copy case. */ if (format != ZPixmap || !EXA_PM_IS_SOLID(pDrawable, planeMask)) goto fallback; /* Only try to handle the 8bpp and up cases, since we don't want to think * about <8bpp. */ if (pDrawable->bitsPerPixel < 8) goto fallback; ok = pExaScr->info->DownloadFromScreen(pPix, pDrawable->x + x + xoff, pDrawable->y + y + yoff, w, h, d, PixmapBytePad(w, pDrawable->depth)); if (ok) { exaWaitSync(pDrawable->pScreen); return; } fallback: ExaCheckGetImage(pDrawable, x, y, w, h, format, planeMask, d); } xorg-server-21.1.16/exa/exa_glyphs.c0000644000175000017500000006446514757411105012736 /* * Copyright © 2008 Red Hat, Inc. * Partly based on code Copyright © 2000 SuSE, Inc. * * 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 Red Hat not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Red Hat makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * Red Hat DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Red Hat * 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. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Owen Taylor * Based on code by: Keith Packard */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "exa_priv.h" #include "mipict.h" #if DEBUG_GLYPH_CACHE #define DBG_GLYPH_CACHE(a) ErrorF a #else #define DBG_GLYPH_CACHE(a) #endif /* Width of the pixmaps we use for the caches; this should be less than * max texture size of the driver; this may need to actually come from * the driver. */ #define CACHE_PICTURE_WIDTH 1024 /* Maximum number of glyphs we buffer on the stack before flushing * rendering to the mask or destination surface. */ #define GLYPH_BUFFER_SIZE 256 typedef struct { PicturePtr mask; ExaCompositeRectRec rects[GLYPH_BUFFER_SIZE]; int count; } ExaGlyphBuffer, *ExaGlyphBufferPtr; typedef enum { ExaGlyphSuccess, /* Glyph added to render buffer */ ExaGlyphFail, /* out of memory, etc */ ExaGlyphNeedFlush, /* would evict a glyph already in the buffer */ } ExaGlyphCacheResult; void exaGlyphsInit(ScreenPtr pScreen) { ExaScreenPriv(pScreen); int i = 0; memset(pExaScr->glyphCaches, 0, sizeof(pExaScr->glyphCaches)); pExaScr->glyphCaches[i].format = PICT_a8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 16; i++; pExaScr->glyphCaches[i].format = PICT_a8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32; i++; pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 16; i++; pExaScr->glyphCaches[i].format = PICT_a8r8g8b8; pExaScr->glyphCaches[i].glyphWidth = pExaScr->glyphCaches[i].glyphHeight = 32; i++; assert(i == EXA_NUM_GLYPH_CACHES); for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { pExaScr->glyphCaches[i].columns = CACHE_PICTURE_WIDTH / pExaScr->glyphCaches[i].glyphWidth; pExaScr->glyphCaches[i].size = 256; pExaScr->glyphCaches[i].hashSize = 557; } } static void exaUnrealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) { ExaScreenPriv(pScreen); int i; for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; if (cache->format != format) continue; if (cache->picture) { FreePicture((void *) cache->picture, (XID) 0); cache->picture = NULL; } free(cache->hashEntries); cache->hashEntries = NULL; free(cache->glyphs); cache->glyphs = NULL; cache->glyphCount = 0; } } #define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) /* All caches for a single format share a single pixmap for glyph storage, * allowing mixing glyphs of different sizes without paying a penalty * for switching between mask pixmaps. (Note that for a size of font * right at the border between two sizes, we might be switching for almost * every glyph.) * * This function allocates the storage pixmap, and then fills in the * rest of the allocated structures for all caches with the given format. */ static Bool exaRealizeGlyphCaches(ScreenPtr pScreen, unsigned int format) { ExaScreenPriv(pScreen); int depth = PIXMAN_FORMAT_DEPTH(format); PictFormatPtr pPictFormat; PixmapPtr pPixmap; PicturePtr pPicture; CARD32 component_alpha; int height; int i; int error; pPictFormat = PictureMatchFormat(pScreen, depth, format); if (!pPictFormat) return FALSE; /* Compute the total vertical size needed for the format */ height = 0; for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; int rows; if (cache->format != format) continue; cache->yOffset = height; rows = (cache->size + cache->columns - 1) / cache->columns; height += rows * cache->glyphHeight; } /* Now allocate the pixmap and picture */ pPixmap = (*pScreen->CreatePixmap) (pScreen, CACHE_PICTURE_WIDTH, height, depth, 0); if (!pPixmap) return FALSE; component_alpha = NeedsComponent(pPictFormat->format); pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat, CPComponentAlpha, &component_alpha, serverClient, &error); (*pScreen->DestroyPixmap) (pPixmap); /* picture holds a refcount */ if (!pPicture) return FALSE; /* And store the picture in all the caches for the format */ for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; int j; if (cache->format != format) continue; cache->picture = pPicture; cache->picture->refcnt++; cache->hashEntries = xallocarray(cache->hashSize, sizeof(int)); cache->glyphs = xallocarray(cache->size, sizeof(ExaCachedGlyphRec)); cache->glyphCount = 0; if (!cache->hashEntries || !cache->glyphs) goto bail; for (j = 0; j < cache->hashSize; j++) cache->hashEntries[j] = -1; cache->evictionPosition = rand() % cache->size; } /* Each cache references the picture individually */ FreePicture((void *) pPicture, (XID) 0); return TRUE; bail: exaUnrealizeGlyphCaches(pScreen, format); return FALSE; } void exaGlyphsFini(ScreenPtr pScreen) { ExaScreenPriv(pScreen); int i; for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; if (cache->picture) exaUnrealizeGlyphCaches(pScreen, cache->format); } } static int exaGlyphCacheHashLookup(ExaGlyphCachePtr cache, GlyphPtr pGlyph) { int slot; slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize; while (TRUE) { /* hash table can never be full */ int entryPos = cache->hashEntries[slot]; if (entryPos == -1) return -1; if (memcmp (pGlyph->sha1, cache->glyphs[entryPos].sha1, sizeof(pGlyph->sha1)) == 0) { return entryPos; } slot--; if (slot < 0) slot = cache->hashSize - 1; } } static void exaGlyphCacheHashInsert(ExaGlyphCachePtr cache, GlyphPtr pGlyph, int pos) { int slot; memcpy(cache->glyphs[pos].sha1, pGlyph->sha1, sizeof(pGlyph->sha1)); slot = (*(CARD32 *) pGlyph->sha1) % cache->hashSize; while (TRUE) { /* hash table can never be full */ if (cache->hashEntries[slot] == -1) { cache->hashEntries[slot] = pos; return; } slot--; if (slot < 0) slot = cache->hashSize - 1; } } static void exaGlyphCacheHashRemove(ExaGlyphCachePtr cache, int pos) { int slot; int emptiedSlot = -1; slot = (*(CARD32 *) cache->glyphs[pos].sha1) % cache->hashSize; while (TRUE) { /* hash table can never be full */ int entryPos = cache->hashEntries[slot]; if (entryPos == -1) return; if (entryPos == pos) { cache->hashEntries[slot] = -1; emptiedSlot = slot; } else if (emptiedSlot != -1) { /* See if we can move this entry into the emptied slot, we can't * do that if if entry would have hashed between the current position * and the emptied slot. (taking wrapping into account). Bad positions * are: * * | XXXXXXXXXX | * i j * * |XXX XXXX| * j i * * i - slot, j - emptiedSlot * * (Knuth 6.4R) */ int entrySlot = (*(CARD32 *) cache->glyphs[entryPos].sha1) % cache->hashSize; if (!((entrySlot >= slot && entrySlot < emptiedSlot) || (emptiedSlot < slot && (entrySlot < emptiedSlot || entrySlot >= slot)))) { cache->hashEntries[emptiedSlot] = entryPos; cache->hashEntries[slot] = -1; emptiedSlot = slot; } } slot--; if (slot < 0) slot = cache->hashSize - 1; } } #define CACHE_X(pos) (((pos) % cache->columns) * cache->glyphWidth) #define CACHE_Y(pos) (cache->yOffset + ((pos) / cache->columns) * cache->glyphHeight) /* The most efficient thing to way to upload the glyph to the screen * is to use the UploadToScreen() driver hook; this allows us to * pipeline glyph uploads and to avoid creating gpu backed pixmaps for * glyphs that we'll never use again. * * If we can't do it with UploadToScreen (because the glyph has a gpu copy, * etc), we fall back to CompositePicture. * * We need to damage the cache pixmap manually in either case because the damage * layer unwrapped the picture screen before calling exaGlyphs. */ static void exaGlyphCacheUploadGlyph(ScreenPtr pScreen, ExaGlyphCachePtr cache, int x, int y, GlyphPtr pGlyph) { ExaScreenPriv(pScreen); PicturePtr pGlyphPicture = GetGlyphPicture(pGlyph, pScreen); PixmapPtr pGlyphPixmap = (PixmapPtr) pGlyphPicture->pDrawable; ExaPixmapPriv(pGlyphPixmap); PixmapPtr pCachePixmap = (PixmapPtr) cache->picture->pDrawable; if (!pExaScr->info->UploadToScreen || pExaScr->swappedOut || pExaPixmap->accel_blocked) goto composite; /* If the glyph pixmap is already uploaded, no point in doing * things this way */ if (exaPixmapHasGpuCopy(pGlyphPixmap)) goto composite; /* UploadToScreen only works if bpp match */ if (pGlyphPixmap->drawable.bitsPerPixel != pCachePixmap->drawable.bitsPerPixel) goto composite; if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; /* cache pixmap must have a gpu copy. */ pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pCachePixmap; pixmaps[0].pReg = NULL; exaDoMigration(pixmaps, 1, TRUE); } if (!exaPixmapHasGpuCopy(pCachePixmap)) goto composite; /* x,y are in pixmap coordinates, no need for cache{X,Y}off */ if (pExaScr->info->UploadToScreen(pCachePixmap, x, y, pGlyph->info.width, pGlyph->info.height, (char *) pExaPixmap->sys_ptr, pExaPixmap->sys_pitch)) goto damage; composite: CompositePicture(PictOpSrc, pGlyphPicture, None, cache->picture, 0, 0, 0, 0, x, y, pGlyph->info.width, pGlyph->info.height); damage: /* The cache pixmap isn't a window, so no need to offset coordinates. */ exaPixmapDirty(pCachePixmap, x, y, x + cache->glyphWidth, y + cache->glyphHeight); } static ExaGlyphCacheResult exaGlyphCacheBufferGlyph(ScreenPtr pScreen, ExaGlyphCachePtr cache, ExaGlyphBufferPtr buffer, GlyphPtr pGlyph, PicturePtr pSrc, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst) { ExaCompositeRectPtr rect; int pos; int x, y; if (buffer->mask && buffer->mask != cache->picture) return ExaGlyphNeedFlush; if (!cache->picture) { if (!exaRealizeGlyphCaches(pScreen, cache->format)) return ExaGlyphFail; } DBG_GLYPH_CACHE(("(%d,%d,%s): buffering glyph %lx\n", cache->glyphWidth, cache->glyphHeight, cache->format == PICT_a8 ? "A" : "ARGB", (long) *(CARD32 *) pGlyph->sha1)); pos = exaGlyphCacheHashLookup(cache, pGlyph); if (pos != -1) { DBG_GLYPH_CACHE((" found existing glyph at %d\n", pos)); x = CACHE_X(pos); y = CACHE_Y(pos); } else { if (cache->glyphCount < cache->size) { /* Space remaining; we fill from the start */ pos = cache->glyphCount; x = CACHE_X(pos); y = CACHE_Y(pos); cache->glyphCount++; DBG_GLYPH_CACHE((" storing glyph in free space at %d\n", pos)); exaGlyphCacheHashInsert(cache, pGlyph, pos); } else { /* Need to evict an entry. We have to see if any glyphs * already in the output buffer were at this position in * the cache */ pos = cache->evictionPosition; x = CACHE_X(pos); y = CACHE_Y(pos); DBG_GLYPH_CACHE((" evicting glyph at %d\n", pos)); if (buffer->count) { int i; for (i = 0; i < buffer->count; i++) { if (pSrc ? (buffer->rects[i].xMask == x && buffer->rects[i].yMask == y) : (buffer->rects[i].xSrc == x && buffer->rects[i].ySrc == y)) { DBG_GLYPH_CACHE((" must flush buffer\n")); return ExaGlyphNeedFlush; } } } /* OK, we're all set, swap in the new glyph */ exaGlyphCacheHashRemove(cache, pos); exaGlyphCacheHashInsert(cache, pGlyph, pos); /* And pick a new eviction position */ cache->evictionPosition = rand() % cache->size; } exaGlyphCacheUploadGlyph(pScreen, cache, x, y, pGlyph); } buffer->mask = cache->picture; rect = &buffer->rects[buffer->count]; if (pSrc) { rect->xSrc = xSrc; rect->ySrc = ySrc; rect->xMask = x; rect->yMask = y; } else { rect->xSrc = x; rect->ySrc = y; rect->xMask = 0; rect->yMask = 0; } rect->pDst = pDst; rect->xDst = xDst; rect->yDst = yDst; rect->width = pGlyph->info.width; rect->height = pGlyph->info.height; buffer->count++; return ExaGlyphSuccess; } #undef CACHE_X #undef CACHE_Y static ExaGlyphCacheResult exaBufferGlyph(ScreenPtr pScreen, ExaGlyphBufferPtr buffer, GlyphPtr pGlyph, PicturePtr pSrc, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst) { ExaScreenPriv(pScreen); unsigned int format = (GetGlyphPicture(pGlyph, pScreen))->format; int width = pGlyph->info.width; int height = pGlyph->info.height; ExaCompositeRectPtr rect; PicturePtr mask; int i; if (buffer->count == GLYPH_BUFFER_SIZE) return ExaGlyphNeedFlush; if (PICT_FORMAT_BPP(format) == 1) format = PICT_a8; for (i = 0; i < EXA_NUM_GLYPH_CACHES; i++) { ExaGlyphCachePtr cache = &pExaScr->glyphCaches[i]; if (format == cache->format && width <= cache->glyphWidth && height <= cache->glyphHeight) { ExaGlyphCacheResult result = exaGlyphCacheBufferGlyph(pScreen, &pExaScr-> glyphCaches [i], buffer, pGlyph, pSrc, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst); switch (result) { case ExaGlyphFail: break; case ExaGlyphSuccess: case ExaGlyphNeedFlush: return result; } } } /* Couldn't find the glyph in the cache, use the glyph picture directly */ mask = GetGlyphPicture(pGlyph, pScreen); if (buffer->mask && buffer->mask != mask) return ExaGlyphNeedFlush; buffer->mask = mask; rect = &buffer->rects[buffer->count]; rect->xSrc = xSrc; rect->ySrc = ySrc; rect->xMask = xMask; rect->yMask = yMask; rect->xDst = xDst; rect->yDst = yDst; rect->width = width; rect->height = height; buffer->count++; return ExaGlyphSuccess; } static void exaGlyphsToMask(PicturePtr pMask, ExaGlyphBufferPtr buffer) { exaCompositeRects(PictOpAdd, buffer->mask, NULL, pMask, buffer->count, buffer->rects); buffer->count = 0; buffer->mask = NULL; } static void exaGlyphsToDst(CARD8 op, PicturePtr pSrc, PicturePtr pDst, ExaGlyphBufferPtr buffer) { exaCompositeRects(op, pSrc, buffer->mask, pDst, buffer->count, buffer->rects); buffer->count = 0; buffer->mask = NULL; } /* Cut and paste from render/glyph.c - probably should export it instead */ static void GlyphExtents(int nlist, GlyphListPtr list, GlyphPtr * glyphs, BoxPtr extents) { int x1, x2, y1, y2; int n; GlyphPtr glyph; int x, y; x = 0; y = 0; extents->x1 = MAXSHORT; extents->x2 = MINSHORT; extents->y1 = MAXSHORT; extents->y2 = MINSHORT; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; list++; while (n--) { glyph = *glyphs++; x1 = x - glyph->info.x; if (x1 < MINSHORT) x1 = MINSHORT; y1 = y - glyph->info.y; if (y1 < MINSHORT) y1 = MINSHORT; x2 = x1 + glyph->info.width; if (x2 > MAXSHORT) x2 = MAXSHORT; y2 = y1 + glyph->info.height; if (y2 > MAXSHORT) y2 = MAXSHORT; if (x1 < extents->x1) extents->x1 = x1; if (x2 > extents->x2) extents->x2 = x2; if (y1 < extents->y1) extents->y1 = y1; if (y2 > extents->y2) extents->y2 = y2; x += glyph->info.xOff; y += glyph->info.yOff; } } } void exaGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { PixmapPtr pMaskPixmap = 0; PicturePtr pMask = NULL; ScreenPtr pScreen = pDst->pDrawable->pScreen; int width = 0, height = 0; int x, y; int first_xOff = list->xOff, first_yOff = list->yOff; int n; GlyphPtr glyph; int error; BoxRec extents = { 0, 0, 0, 0 }; CARD32 component_alpha; ExaGlyphBuffer buffer; if (maskFormat) { ExaScreenPriv(pScreen); GCPtr pGC; xRectangle rect; GlyphExtents(nlist, list, glyphs, &extents); if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1) return; width = extents.x2 - extents.x1; height = extents.y2 - extents.y1; if (maskFormat->depth == 1) { PictFormatPtr a8Format = PictureMatchFormat(pScreen, 8, PICT_a8); if (a8Format) maskFormat = a8Format; } pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, maskFormat->depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pMaskPixmap) return; component_alpha = NeedsComponent(maskFormat->format); pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, CPComponentAlpha, &component_alpha, serverClient, &error); if (!pMask || (!component_alpha && pExaScr->info->CheckComposite && !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, NULL, pMask))) { PictFormatPtr argbFormat; (*pScreen->DestroyPixmap) (pMaskPixmap); if (!pMask) return; /* The driver can't seem to composite to a8, let's try argb (but * without component-alpha) */ FreePicture((void *) pMask, (XID) 0); argbFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); if (argbFormat) maskFormat = argbFormat; pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, maskFormat->depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pMaskPixmap) return; pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, 0, 0, serverClient, &error); if (!pMask) { (*pScreen->DestroyPixmap) (pMaskPixmap); return; } } pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); ValidateGC(&pMaskPixmap->drawable, pGC); rect.x = 0; rect.y = 0; rect.width = width; rect.height = height; (*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect); FreeScratchGC(pGC); x = -extents.x1; y = -extents.y1; } else { x = 0; y = 0; } buffer.count = 0; buffer.mask = NULL; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; while (n--) { glyph = *glyphs++; if (glyph->info.width > 0 && glyph->info.height > 0) { /* pGlyph->info.{x,y} compensate for empty space in the glyph. */ if (maskFormat) { if (exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, 0, 0, 0, 0, x - glyph->info.x, y - glyph->info.y) == ExaGlyphNeedFlush) { exaGlyphsToMask(pMask, &buffer); exaBufferGlyph(pScreen, &buffer, glyph, NULL, pMask, 0, 0, 0, 0, x - glyph->info.x, y - glyph->info.y); } } else { if (exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, xSrc + (x - glyph->info.x) - first_xOff, ySrc + (y - glyph->info.y) - first_yOff, 0, 0, x - glyph->info.x, y - glyph->info.y) == ExaGlyphNeedFlush) { exaGlyphsToDst(op, pSrc, pDst, &buffer); exaBufferGlyph(pScreen, &buffer, glyph, pSrc, pDst, xSrc + (x - glyph->info.x) - first_xOff, ySrc + (y - glyph->info.y) - first_yOff, 0, 0, x - glyph->info.x, y - glyph->info.y); } } } x += glyph->info.xOff; y += glyph->info.yOff; } list++; } if (buffer.count) { if (maskFormat) exaGlyphsToMask(pMask, &buffer); else exaGlyphsToDst(op, pSrc, pDst, &buffer); } if (maskFormat) { x = extents.x1; y = extents.y1; CompositePicture(op, pSrc, pMask, pDst, xSrc + x - first_xOff, ySrc + y - first_yOff, 0, 0, x, y, width, height); FreePicture((void *) pMask, (XID) 0); (*pScreen->DestroyPixmap) (pMaskPixmap); } } xorg-server-21.1.16/exa/exa_offscreen.c0000644000175000017500000005027414757411105013373 /* * Copyright © 2003 Anders Carlsson * * 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 Anders Carlsson not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Anders Carlsson makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL ANDERS CARLSSON 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. */ /** @file * This allocator allocates blocks of memory by maintaining a list of areas. * When allocating, the contiguous block of areas with the minimum eviction * cost is found and evicted in order to make room for the new allocation. */ #include "exa_priv.h" #include #include #include #if DEBUG_OFFSCREEN #define DBG_OFFSCREEN(a) ErrorF a #else #define DBG_OFFSCREEN(a) #endif #if DEBUG_OFFSCREEN static void ExaOffscreenValidate(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenArea *prev = 0, *area; assert(pExaScr->info->offScreenAreas->base_offset == pExaScr->info->offScreenBase); for (area = pExaScr->info->offScreenAreas; area; area = area->next) { assert(area->offset >= area->base_offset); assert(area->offset < (area->base_offset + area->size)); if (prev) assert(prev->base_offset + prev->size == area->base_offset); prev = area; } assert(prev->base_offset + prev->size == pExaScr->info->memorySize); } #else #define ExaOffscreenValidate(s) #endif static ExaOffscreenArea * ExaOffscreenKickOut(ScreenPtr pScreen, ExaOffscreenArea * area) { if (area->save) (*area->save) (pScreen, area); return exaOffscreenFree(pScreen, area); } static void exaUpdateEvictionCost(ExaOffscreenArea * area, unsigned offScreenCounter) { unsigned age; if (area->state == ExaOffscreenAvail) return; age = offScreenCounter - area->last_use; /* This is unlikely to happen, but could result in a division by zero... */ if (age > (UINT_MAX / 2)) { age = UINT_MAX / 2; area->last_use = offScreenCounter - age; } area->eviction_cost = area->size / age; } static ExaOffscreenArea * exaFindAreaToEvict(ExaScreenPrivPtr pExaScr, int size, int align) { ExaOffscreenArea *begin, *end, *best; unsigned cost, best_cost; int avail, real_size; best_cost = UINT_MAX; begin = end = pExaScr->info->offScreenAreas; avail = 0; cost = 0; best = 0; while (end != NULL) { restart: while (begin != NULL && begin->state == ExaOffscreenLocked) begin = end = begin->next; if (begin == NULL) break; /* adjust size needed to account for alignment loss for this area */ real_size = size + (begin->base_offset + begin->size - size) % align; while (avail < real_size && end != NULL) { if (end->state == ExaOffscreenLocked) { /* Can't more room here, restart after this locked area */ avail = 0; cost = 0; begin = end; goto restart; } avail += end->size; exaUpdateEvictionCost(end, pExaScr->offScreenCounter); cost += end->eviction_cost; end = end->next; } /* Check the cost, update best */ if (avail >= real_size && cost < best_cost) { best = begin; best_cost = cost; } avail -= begin->size; cost -= begin->eviction_cost; begin = begin->next; } return best; } /** * exaOffscreenAlloc allocates offscreen memory * * @param pScreen current screen * @param size size in bytes of the allocation * @param align byte alignment requirement for the offset of the allocated area * @param locked whether the allocated area is locked and can't be kicked out * @param save callback for when the area is evicted from memory * @param privdata private data for the save callback. * * Allocates offscreen memory from the device associated with pScreen. size * and align determine where and how large the allocated area is, and locked * will mark whether it should be held in card memory. privdata may be any * pointer for the save callback when the area is removed. * * Note that locked areas do get evicted on VT switch unless the driver * requested version 2.1 or newer behavior. In that case, the save callback is * still called. */ ExaOffscreenArea * exaOffscreenAlloc(ScreenPtr pScreen, int size, int align, Bool locked, ExaOffscreenSaveProc save, void *privData) { ExaOffscreenArea *area; ExaScreenPriv(pScreen); int real_size = 0, largest_avail = 0; #if DEBUG_OFFSCREEN static int number = 0; ErrorF("================= ============ allocating a new pixmap %d\n", ++number); #endif ExaOffscreenValidate(pScreen); if (!align) align = 1; if (!size) { DBG_OFFSCREEN(("Alloc 0x%x -> EMPTY\n", size)); return NULL; } /* throw out requests that cannot fit */ if (size > (pExaScr->info->memorySize - pExaScr->info->offScreenBase)) { DBG_OFFSCREEN(("Alloc 0x%x vs (0x%lx) -> TOBIG\n", size, pExaScr->info->memorySize - pExaScr->info->offScreenBase)); return NULL; } /* Try to find a free space that'll fit. */ for (area = pExaScr->info->offScreenAreas; area; area = area->next) { /* skip allocated areas */ if (area->state != ExaOffscreenAvail) continue; /* adjust size to match alignment requirement */ real_size = size + (area->base_offset + area->size - size) % align; /* does it fit? */ if (real_size <= area->size) break; if (area->size > largest_avail) largest_avail = area->size; } if (!area) { area = exaFindAreaToEvict(pExaScr, size, align); if (!area) { DBG_OFFSCREEN(("Alloc 0x%x -> NOSPACE\n", size)); /* Could not allocate memory */ ExaOffscreenValidate(pScreen); return NULL; } /* adjust size needed to account for alignment loss for this area */ real_size = size + (area->base_offset + area->size - size) % align; /* * Kick out first area if in use */ if (area->state != ExaOffscreenAvail) area = ExaOffscreenKickOut(pScreen, area); /* * Now get the system to merge the other needed areas together */ while (area->size < real_size) { assert(area->next); assert(area->next->state == ExaOffscreenRemovable); (void) ExaOffscreenKickOut(pScreen, area->next); } } /* save extra space in new area */ if (real_size < area->size) { ExaOffscreenArea *new_area = malloc(sizeof(ExaOffscreenArea)); if (!new_area) return NULL; new_area->base_offset = area->base_offset; new_area->offset = new_area->base_offset; new_area->align = 0; new_area->size = area->size - real_size; new_area->state = ExaOffscreenAvail; new_area->save = NULL; new_area->last_use = 0; new_area->eviction_cost = 0; new_area->next = area; new_area->prev = area->prev; if (area->prev->next) area->prev->next = new_area; else pExaScr->info->offScreenAreas = new_area; area->prev = new_area; area->base_offset = new_area->base_offset + new_area->size; area->size = real_size; } else pExaScr->numOffscreenAvailable--; /* * Mark this area as in use */ if (locked) area->state = ExaOffscreenLocked; else area->state = ExaOffscreenRemovable; area->privData = privData; area->save = save; area->last_use = pExaScr->offScreenCounter++; area->offset = (area->base_offset + align - 1); area->offset -= area->offset % align; area->align = align; ExaOffscreenValidate(pScreen); DBG_OFFSCREEN(("Alloc 0x%x -> 0x%x (0x%x)\n", size, area->base_offset, area->offset)); return area; } /** * Ejects all offscreen areas, and uninitializes the offscreen memory manager. */ void ExaOffscreenSwapOut(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenValidate(pScreen); /* loop until a single free area spans the space */ for (;;) { ExaOffscreenArea *area = pExaScr->info->offScreenAreas; if (!area) break; if (area->state == ExaOffscreenAvail) { area = area->next; if (!area) break; } assert(area->state != ExaOffscreenAvail); (void) ExaOffscreenKickOut(pScreen, area); ExaOffscreenValidate(pScreen); } ExaOffscreenValidate(pScreen); ExaOffscreenFini(pScreen); } /** Ejects all pixmaps managed by EXA. */ static void ExaOffscreenEjectPixmaps(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenValidate(pScreen); /* loop until a single free area spans the space */ for (;;) { ExaOffscreenArea *area; for (area = pExaScr->info->offScreenAreas; area != NULL; area = area->next) { if (area->state == ExaOffscreenRemovable && area->save == exaPixmapSave) { (void) ExaOffscreenKickOut(pScreen, area); ExaOffscreenValidate(pScreen); break; } } if (area == NULL) break; } ExaOffscreenValidate(pScreen); } void ExaOffscreenSwapIn(ScreenPtr pScreen) { exaOffscreenInit(pScreen); } /** * Prepares EXA for disabling of FB access, or restoring it. * * In version 2.1, the disabling results in pixmaps being ejected, while other * allocations remain. With this plus the prevention of migration while * swappedOut is set, EXA by itself should not cause any access of the * framebuffer to occur while swapped out. Any remaining issues are the * responsibility of the driver. * * Prior to version 2.1, all allocations, including locked ones, are ejected * when access is disabled, and the allocator is torn down while swappedOut * is set. This is more drastic, and caused implementation difficulties for * many drivers that could otherwise handle the lack of FB access while * swapped out. */ void exaEnableDisableFBAccess(ScreenPtr pScreen, Bool enable) { ExaScreenPriv(pScreen); if (pExaScr->info->flags & EXA_HANDLES_PIXMAPS) return; if (!enable && pExaScr->disableFbCount++ == 0) { if (pExaScr->info->exa_minor < 1) ExaOffscreenSwapOut(pScreen); else ExaOffscreenEjectPixmaps(pScreen); pExaScr->swappedOut = TRUE; } if (enable && --pExaScr->disableFbCount == 0) { if (pExaScr->info->exa_minor < 1) ExaOffscreenSwapIn(pScreen); pExaScr->swappedOut = FALSE; } } /* merge the next free area into this one */ static void ExaOffscreenMerge(ExaScreenPrivPtr pExaScr, ExaOffscreenArea * area) { ExaOffscreenArea *next = area->next; /* account for space */ area->size += next->size; /* frob pointer */ area->next = next->next; if (area->next) area->next->prev = area; else pExaScr->info->offScreenAreas->prev = area; free(next); pExaScr->numOffscreenAvailable--; } /** * exaOffscreenFree frees an allocation. * * @param pScreen current screen * @param area offscreen area to free * * exaOffscreenFree frees an allocation created by exaOffscreenAlloc. Note that * the save callback of the area is not called, and it is up to the driver to * do any cleanup necessary as a result. * * @return pointer to the newly freed area. This behavior should not be relied * on. */ ExaOffscreenArea * exaOffscreenFree(ScreenPtr pScreen, ExaOffscreenArea * area) { ExaScreenPriv(pScreen); ExaOffscreenArea *next = area->next; ExaOffscreenArea *prev; DBG_OFFSCREEN(("Free 0x%x -> 0x%x (0x%x)\n", area->size, area->base_offset, area->offset)); ExaOffscreenValidate(pScreen); area->state = ExaOffscreenAvail; area->save = NULL; area->last_use = 0; area->eviction_cost = 0; /* * Find previous area */ if (area == pExaScr->info->offScreenAreas) prev = NULL; else prev = area->prev; pExaScr->numOffscreenAvailable++; /* link with next area if free */ if (next && next->state == ExaOffscreenAvail) ExaOffscreenMerge(pExaScr, area); /* link with prev area if free */ if (prev && prev->state == ExaOffscreenAvail) { area = prev; ExaOffscreenMerge(pExaScr, area); } ExaOffscreenValidate(pScreen); DBG_OFFSCREEN(("\tdone freeing\n")); return area; } void ExaOffscreenMarkUsed(PixmapPtr pPixmap) { ExaPixmapPriv(pPixmap); ExaScreenPriv(pPixmap->drawable.pScreen); if (!pExaPixmap || !pExaPixmap->area) return; pExaPixmap->area->last_use = pExaScr->offScreenCounter++; } /** * Defragment offscreen memory by compacting allocated areas at the end of it, * leaving the total amount of memory available as a single area at the * beginning (when there are no pinned allocations). */ _X_HIDDEN ExaOffscreenArea * ExaOffscreenDefragment(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenArea *area, *largest_available = NULL; int largest_size = 0; PixmapPtr pDstPix; ExaPixmapPrivPtr pExaDstPix; pDstPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, 0, 0); if (!pDstPix) return NULL; pExaDstPix = ExaGetPixmapPriv(pDstPix); pExaDstPix->use_gpu_copy = TRUE; for (area = pExaScr->info->offScreenAreas->prev; area != pExaScr->info->offScreenAreas;) { ExaOffscreenArea *prev = area->prev; PixmapPtr pSrcPix; ExaPixmapPrivPtr pExaSrcPix; Bool save_use_gpu_copy; int save_pitch; if (area->state != ExaOffscreenAvail || prev->state == ExaOffscreenLocked || (prev->state == ExaOffscreenRemovable && prev->save != exaPixmapSave)) { area = prev; continue; } if (prev->state == ExaOffscreenAvail) { if (area == largest_available) { largest_available = prev; largest_size += prev->size; } area = prev; ExaOffscreenMerge(pExaScr, area); continue; } if (area->size > largest_size) { largest_available = area; largest_size = area->size; } pSrcPix = prev->privData; pExaSrcPix = ExaGetPixmapPriv(pSrcPix); pExaDstPix->fb_ptr = pExaScr->info->memoryBase + area->base_offset + area->size - prev->size + prev->base_offset - prev->offset; pExaDstPix->fb_ptr -= (unsigned long) pExaDstPix->fb_ptr % prev->align; if (pExaDstPix->fb_ptr <= pExaSrcPix->fb_ptr) { area = prev; continue; } if (!(pExaScr->info->flags & EXA_SUPPORTS_OFFSCREEN_OVERLAPS) && (pExaSrcPix->fb_ptr + prev->size) > pExaDstPix->fb_ptr) { area = prev; continue; } save_use_gpu_copy = pExaSrcPix->use_gpu_copy; save_pitch = pSrcPix->devKind; pExaSrcPix->use_gpu_copy = TRUE; pSrcPix->devKind = pExaSrcPix->fb_pitch; pDstPix->drawable.width = pSrcPix->drawable.width; pDstPix->devKind = pSrcPix->devKind; pDstPix->drawable.height = pSrcPix->drawable.height; pDstPix->drawable.depth = pSrcPix->drawable.depth; pDstPix->drawable.bitsPerPixel = pSrcPix->drawable.bitsPerPixel; if (!pExaScr->info->PrepareCopy(pSrcPix, pDstPix, -1, -1, GXcopy, ~0)) { pExaSrcPix->use_gpu_copy = save_use_gpu_copy; pSrcPix->devKind = save_pitch; area = prev; continue; } pExaScr->info->Copy(pDstPix, 0, 0, 0, 0, pDstPix->drawable.width, pDstPix->drawable.height); pExaScr->info->DoneCopy(pDstPix); exaMarkSync(pScreen); DBG_OFFSCREEN(("Before swap: prev=0x%08x-0x%08x-0x%08x area=0x%08x-0x%08x-0x%08x\n", prev->base_offset, prev->offset, prev->base_offset + prev->size, area->base_offset, area->offset, area->base_offset + area->size)); /* Calculate swapped area offsets and sizes */ area->base_offset = prev->base_offset; area->offset = area->base_offset; prev->offset += pExaDstPix->fb_ptr - pExaSrcPix->fb_ptr; assert(prev->offset >= pExaScr->info->offScreenBase); assert(prev->offset < pExaScr->info->memorySize); prev->base_offset = prev->offset; if (area->next) prev->size = area->next->base_offset - prev->base_offset; else prev->size = pExaScr->info->memorySize - prev->base_offset; area->size = prev->base_offset - area->base_offset; DBG_OFFSCREEN(("After swap: area=0x%08x-0x%08x-0x%08x prev=0x%08x-0x%08x-0x%08x\n", area->base_offset, area->offset, area->base_offset + area->size, prev->base_offset, prev->offset, prev->base_offset + prev->size)); /* Swap areas in list */ if (area->next) area->next->prev = prev; else pExaScr->info->offScreenAreas->prev = prev; if (prev->prev->next) prev->prev->next = area; else pExaScr->info->offScreenAreas = area; prev->next = area->next; area->next = prev; area->prev = prev->prev; prev->prev = area; if (!area->prev->next) pExaScr->info->offScreenAreas = area; #if DEBUG_OFFSCREEN if (prev->prev == prev || prev->next == prev) ErrorF("Whoops, prev points to itself!\n"); if (area->prev == area || area->next == area) ErrorF("Whoops, area points to itself!\n"); #endif pExaSrcPix->fb_ptr = pExaDstPix->fb_ptr; pExaSrcPix->use_gpu_copy = save_use_gpu_copy; pSrcPix->devKind = save_pitch; } pDstPix->drawable.width = 0; pDstPix->drawable.height = 0; pDstPix->drawable.depth = 0; pDstPix->drawable.bitsPerPixel = 0; (*pScreen->DestroyPixmap) (pDstPix); if (area->state == ExaOffscreenAvail && area->size > largest_size) return area; return largest_available; } /** * exaOffscreenInit initializes the offscreen memory manager. * * @param pScreen current screen * * exaOffscreenInit is called by exaDriverInit to set up the memory manager for * the screen, if any offscreen memory is available. */ Bool exaOffscreenInit(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenArea *area; /* Allocate a big free area */ area = malloc(sizeof(ExaOffscreenArea)); if (!area) return FALSE; area->state = ExaOffscreenAvail; area->base_offset = pExaScr->info->offScreenBase; area->offset = area->base_offset; area->align = 0; area->size = pExaScr->info->memorySize - area->base_offset; area->save = NULL; area->next = NULL; area->prev = area; area->last_use = 0; area->eviction_cost = 0; /* Add it to the free areas */ pExaScr->info->offScreenAreas = area; pExaScr->offScreenCounter = 1; pExaScr->numOffscreenAvailable = 1; ExaOffscreenValidate(pScreen); return TRUE; } void ExaOffscreenFini(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ExaOffscreenArea *area; /* just free all of the area records */ while ((area = pExaScr->info->offScreenAreas)) { pExaScr->info->offScreenAreas = area->next; free(area); } } xorg-server-21.1.16/exa/exa_render.c0000644000175000017500000011663514757411105012704 /* * Copyright © 2001 Keith Packard * * Partly based on code that is Copyright © The XFree86 Project Inc. * * 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 #endif #include #include "exa_priv.h" #include "mipict.h" #if DEBUG_TRACE_FALL static void exaCompositeFallbackPictDesc(PicturePtr pict, char *string, int n) { char format[20]; char size[20]; char loc; int temp; if (!pict) { snprintf(string, n, "None"); return; } switch (pict->format) { case PICT_a8r8g8b8: snprintf(format, 20, "ARGB8888"); break; case PICT_x8r8g8b8: snprintf(format, 20, "XRGB8888"); break; case PICT_b8g8r8a8: snprintf(format, 20, "BGRA8888"); break; case PICT_b8g8r8x8: snprintf(format, 20, "BGRX8888"); break; case PICT_r5g6b5: snprintf(format, 20, "RGB565 "); break; case PICT_x1r5g5b5: snprintf(format, 20, "RGB555 "); break; case PICT_a8: snprintf(format, 20, "A8 "); break; case PICT_a1: snprintf(format, 20, "A1 "); break; default: snprintf(format, 20, "0x%x", (int) pict->format); break; } if (pict->pDrawable) { loc = exaGetOffscreenPixmap(pict->pDrawable, &temp, &temp) ? 's' : 'm'; snprintf(size, 20, "%dx%d%s", pict->pDrawable->width, pict->pDrawable->height, pict->repeat ? " R" : ""); } else { loc = '-'; snprintf(size, 20, "%s", pict->repeat ? " R" : ""); } snprintf(string, n, "%p:%c fmt %s (%s)", pict->pDrawable, loc, format, size); } static void exaPrintCompositeFallback(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst) { char sop[20]; char srcdesc[40], maskdesc[40], dstdesc[40]; switch (op) { case PictOpSrc: snprintf(sop, sizeof(sop), "Src"); break; case PictOpOver: snprintf(sop, sizeof(sop), "Over"); break; default: snprintf(sop, sizeof(sop), "0x%x", (int) op); break; } exaCompositeFallbackPictDesc(pSrc, srcdesc, 40); exaCompositeFallbackPictDesc(pMask, maskdesc, 40); exaCompositeFallbackPictDesc(pDst, dstdesc, 40); ErrorF("Composite fallback: op %s, \n" " src %s, \n" " mask %s, \n" " dst %s, \n", sop, srcdesc, maskdesc, dstdesc); } #endif /* DEBUG_TRACE_FALL */ Bool exaOpReadsDestination(CARD8 op) { /* FALSE (does not read destination) is the list of ops in the protocol * document with "0" in the "Fb" column and no "Ab" in the "Fa" column. * That's just Clear and Src. ReduceCompositeOp() will already have * converted con/disjoint clear/src to Clear or Src. */ switch (op) { case PictOpClear: case PictOpSrc: return FALSE; default: return TRUE; } } static Bool exaGetPixelFromRGBA(CARD32 *pixel, CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, PictFormatPtr pFormat) { int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; *pixel = 0; if (!PICT_FORMAT_COLOR(pFormat->format) && PICT_FORMAT_TYPE(pFormat->format) != PICT_TYPE_A) return FALSE; rbits = PICT_FORMAT_R(pFormat->format); gbits = PICT_FORMAT_G(pFormat->format); bbits = PICT_FORMAT_B(pFormat->format); abits = PICT_FORMAT_A(pFormat->format); rshift = pFormat->direct.red; gshift = pFormat->direct.green; bshift = pFormat->direct.blue; ashift = pFormat->direct.alpha; *pixel |= (blue >> (16 - bbits)) << bshift; *pixel |= (red >> (16 - rbits)) << rshift; *pixel |= (green >> (16 - gbits)) << gshift; *pixel |= (alpha >> (16 - abits)) << ashift; return TRUE; } static Bool exaGetRGBAFromPixel(CARD32 pixel, CARD16 *red, CARD16 *green, CARD16 *blue, CARD16 *alpha, PictFormatPtr pFormat, PictFormatShort format) { int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; if (!PICT_FORMAT_COLOR(format) && PICT_FORMAT_TYPE(format) != PICT_TYPE_A) return FALSE; rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); bbits = PICT_FORMAT_B(format); abits = PICT_FORMAT_A(format); if (pFormat) { rshift = pFormat->direct.red; gshift = pFormat->direct.green; bshift = pFormat->direct.blue; ashift = pFormat->direct.alpha; } else if (format == PICT_a8r8g8b8) { rshift = 16; gshift = 8; bshift = 0; ashift = 24; } else FatalError("EXA bug: exaGetRGBAFromPixel() doesn't match " "createSourcePicture()\n"); if (rbits) { *red = ((pixel >> rshift) & ((1 << rbits) - 1)) << (16 - rbits); while (rbits < 16) { *red |= *red >> rbits; rbits <<= 1; } *green = ((pixel >> gshift) & ((1 << gbits) - 1)) << (16 - gbits); while (gbits < 16) { *green |= *green >> gbits; gbits <<= 1; } *blue = ((pixel >> bshift) & ((1 << bbits) - 1)) << (16 - bbits); while (bbits < 16) { *blue |= *blue >> bbits; bbits <<= 1; } } else { *red = 0x0000; *green = 0x0000; *blue = 0x0000; } if (abits) { *alpha = ((pixel >> ashift) & ((1 << abits) - 1)) << (16 - abits); while (abits < 16) { *alpha |= *alpha >> abits; abits <<= 1; } } else *alpha = 0xffff; return TRUE; } static int exaTryDriverSolidFill(PicturePtr pSrc, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ExaScreenPriv(pDst->pDrawable->pScreen); RegionRec region; BoxPtr pbox; int nbox; int dst_off_x, dst_off_y; PixmapPtr pSrcPix, pDstPix; ExaPixmapPrivPtr pDstExaPix; CARD32 pixel; CARD16 red, green, blue, alpha; pDstPix = exaGetDrawablePixmap(pDst->pDrawable); pDstExaPix = ExaGetPixmapPriv(pDstPix); /* Check whether the accelerator can use the destination pixmap. */ if (pDstExaPix->accel_blocked) { return -1; } xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; if (pSrc->pDrawable) { xSrc += pSrc->pDrawable->x; ySrc += pSrc->pDrawable->y; } if (!miComputeCompositeRegion(®ion, pSrc, NULL, pDst, xSrc, ySrc, 0, 0, xDst, yDst, width, height)) return 1; exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); RegionTranslate(®ion, dst_off_x, dst_off_y); if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); pixel = exaGetPixmapFirstPixel(pSrcPix); } else miRenderColorToPixel(PictureMatchFormat(pDst->pDrawable->pScreen, 32, pSrc->format), &pSrc->pSourcePict->solidFill.fullcolor, &pixel); if (!exaGetRGBAFromPixel(pixel, &red, &green, &blue, &alpha, pSrc->pFormat, pSrc->format) || !exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, pDst->pFormat)) { RegionUninit(®ion); return -1; } if (pExaScr->do_migration) { ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pDstPix; pixmaps[0].pReg = ®ion; exaDoMigration(pixmaps, 1, TRUE); } if (!exaPixmapHasGpuCopy(pDstPix)) { RegionUninit(®ion); return 0; } if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { RegionUninit(®ion); return -1; } nbox = RegionNumRects(®ion); pbox = RegionRects(®ion); while (nbox--) { (*pExaScr->info->Solid) (pDstPix, pbox->x1, pbox->y1, pbox->x2, pbox->y2); pbox++; } (*pExaScr->info->DoneSolid) (pDstPix); exaMarkSync(pDst->pDrawable->pScreen); RegionUninit(®ion); return 1; } static int exaTryDriverCompositeRects(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects) { ExaScreenPriv(pDst->pDrawable->pScreen); int src_off_x = 0, src_off_y = 0, mask_off_x = 0, mask_off_y = 0; int dst_off_x, dst_off_y; PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix; ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix; if (!pExaScr->info->PrepareComposite) return -1; if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); pSrcExaPix = ExaGetPixmapPriv(pSrcPix); } if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); pMaskExaPix = ExaGetPixmapPriv(pMaskPix); } pDstPix = exaGetDrawablePixmap(pDst->pDrawable); pDstExaPix = ExaGetPixmapPriv(pDstPix); /* Check whether the accelerator can use these pixmaps. * FIXME: If it cannot, use temporary pixmaps so that the drawing * happens within limits. */ if (pDstExaPix->accel_blocked || (pSrcExaPix && pSrcExaPix->accel_blocked) || (pMaskExaPix && pMaskExaPix->accel_blocked)) { return -1; } if (pExaScr->info->CheckComposite && !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) { return -1; } if (pExaScr->do_migration) { ExaMigrationRec pixmaps[3]; int i = 0; pixmaps[i].as_dst = TRUE; pixmaps[i].as_src = exaOpReadsDestination(op); pixmaps[i].pPix = pDstPix; pixmaps[i].pReg = NULL; i++; if (pSrcPix) { pixmaps[i].as_dst = FALSE; pixmaps[i].as_src = TRUE; pixmaps[i].pPix = pSrcPix; pixmaps[i].pReg = NULL; i++; } if (pMaskPix) { pixmaps[i].as_dst = FALSE; pixmaps[i].as_src = TRUE; pixmaps[i].pPix = pMaskPix; pixmaps[i].pReg = NULL; i++; } exaDoMigration(pixmaps, i, TRUE); } pDstPix = exaGetOffscreenPixmap(pDst->pDrawable, &dst_off_x, &dst_off_y); if (!pDstPix) return 0; if (pSrcPix) { pSrcPix = exaGetOffscreenPixmap(pSrc->pDrawable, &src_off_x, &src_off_y); if (!pSrcPix) return 0; } if (pMaskPix) { pMaskPix = exaGetOffscreenPixmap(pMask->pDrawable, &mask_off_x, &mask_off_y); if (!pMaskPix) return 0; } if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, pMaskPix, pDstPix)) return -1; while (nrect--) { INT16 xDst = rects->xDst + pDst->pDrawable->x; INT16 yDst = rects->yDst + pDst->pDrawable->y; INT16 xMask = rects->xMask; INT16 yMask = rects->yMask; INT16 xSrc = rects->xSrc; INT16 ySrc = rects->ySrc; RegionRec region; BoxPtr pbox; int nbox; if (pMaskPix) { xMask += pMask->pDrawable->x; yMask += pMask->pDrawable->y; } if (pSrcPix) { xSrc += pSrc->pDrawable->x; ySrc += pSrc->pDrawable->y; } if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, rects->width, rects->height)) goto next_rect; RegionTranslate(®ion, dst_off_x, dst_off_y); nbox = RegionNumRects(®ion); pbox = RegionRects(®ion); xMask = xMask + mask_off_x - xDst - dst_off_x; yMask = yMask + mask_off_y - yDst - dst_off_y; xSrc = xSrc + src_off_x - xDst - dst_off_x; ySrc = ySrc + src_off_y - yDst - dst_off_y; while (nbox--) { (*pExaScr->info->Composite) (pDstPix, pbox->x1 + xSrc, pbox->y1 + ySrc, pbox->x1 + xMask, pbox->y1 + yMask, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); pbox++; } next_rect: RegionUninit(®ion); rects++; } (*pExaScr->info->DoneComposite) (pDstPix); exaMarkSync(pDst->pDrawable->pScreen); return 1; } /** * Copy a number of rectangles from source to destination in a single * operation. This is specialized for glyph rendering: we don't have the * special-case fallbacks found in exaComposite() - if the driver can support * it, we use the driver functionality, otherwise we fall back straight to * software. */ void exaCompositeRects(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects) { ExaScreenPriv(pDst->pDrawable->pScreen); int n; ExaCompositeRectPtr r; int ret; /* If we get a mask, that means we're rendering to the exaGlyphs * destination directly, so the damage layer takes care of this. */ if (!pMask) { RegionRec region; int x1 = MAXSHORT; int y1 = MAXSHORT; int x2 = MINSHORT; int y2 = MINSHORT; BoxRec box; /* We have to manage the damage ourselves, since CompositeRects isn't * something in the screen that can be managed by the damage extension, * and EXA depends on damage to track what needs to be migrated between * the gpu and the cpu. */ /* Compute the overall extents of the composited region - we're making * the assumption here that we are compositing a bunch of glyphs that * cluster closely together and damaging each glyph individually would * be a loss compared to damaging the bounding box. */ n = nrect; r = rects; while (n--) { int rect_x2 = r->xDst + r->width; int rect_y2 = r->yDst + r->height; if (r->xDst < x1) x1 = r->xDst; if (r->yDst < y1) y1 = r->yDst; if (rect_x2 > x2) x2 = rect_x2; if (rect_y2 > y2) y2 = rect_y2; r++; } if (x2 <= x1 || y2 <= y1) return; box.x1 = x1; box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT; box.y1 = y1; box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT; /* The pixmap migration code relies on pendingDamage indicating * the bounds of the current rendering, so we need to force * the actual damage into that region before we do anything, and * (see use of DamagePendingRegion in exaCopyDirty) */ RegionInit(®ion, &box, 1); DamageRegionAppend(pDst->pDrawable, ®ion); RegionUninit(®ion); } /************************************************************/ ValidatePicture(pSrc); if (pMask) ValidatePicture(pMask); ValidatePicture(pDst); ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, rects); if (ret != 1) { if (ret == -1 && op == PictOpOver && pMask && pMask->componentAlpha && (!pExaScr->info->CheckComposite || ((*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, pDst) && (*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, pMask, pDst)))) { ret = exaTryDriverCompositeRects(PictOpOutReverse, pSrc, pMask, pDst, nrect, rects); if (ret == 1) { op = PictOpAdd; ret = exaTryDriverCompositeRects(op, pSrc, pMask, pDst, nrect, rects); } } if (ret != 1) { n = nrect; r = rects; while (n--) { ExaCheckComposite(op, pSrc, pMask, pDst, r->xSrc, r->ySrc, r->xMask, r->yMask, r->xDst, r->yDst, r->width, r->height); r++; } } } /************************************************************/ if (!pMask) { /* Now we have to flush the damage out from pendingDamage => damage * Calling DamageRegionProcessPending has that effect. */ DamageRegionProcessPending(pDst->pDrawable); } } static int exaTryDriverComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ExaScreenPriv(pDst->pDrawable->pScreen); RegionRec region; BoxPtr pbox; int nbox; int src_off_x, src_off_y, mask_off_x = 0, mask_off_y = 0, dst_off_x, dst_off_y; PixmapPtr pSrcPix = NULL, pMaskPix = NULL, pDstPix; ExaPixmapPrivPtr pSrcExaPix = NULL, pMaskExaPix = NULL, pDstExaPix; if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); pSrcExaPix = ExaGetPixmapPriv(pSrcPix); } pDstPix = exaGetDrawablePixmap(pDst->pDrawable); pDstExaPix = ExaGetPixmapPriv(pDstPix); if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); pMaskExaPix = ExaGetPixmapPriv(pMaskPix); } /* Check whether the accelerator can use these pixmaps. * FIXME: If it cannot, use temporary pixmaps so that the drawing * happens within limits. */ if (pDstExaPix->accel_blocked || (pSrcExaPix && pSrcExaPix->accel_blocked) || (pMaskExaPix && (pMaskExaPix->accel_blocked))) { return -1; } xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; if (pMaskPix) { xMask += pMask->pDrawable->x; yMask += pMask->pDrawable->y; } if (pSrcPix) { xSrc += pSrc->pDrawable->x; ySrc += pSrc->pDrawable->y; } if (pExaScr->info->CheckComposite && !(*pExaScr->info->CheckComposite) (op, pSrc, pMask, pDst)) { return -1; } if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) return 1; exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); RegionTranslate(®ion, dst_off_x, dst_off_y); if (pExaScr->do_migration) { ExaMigrationRec pixmaps[3]; int i = 0; pixmaps[i].as_dst = TRUE; pixmaps[i].as_src = exaOpReadsDestination(op); pixmaps[i].pPix = pDstPix; pixmaps[i].pReg = pixmaps[0].as_src ? NULL : ®ion; i++; if (pSrcPix) { pixmaps[i].as_dst = FALSE; pixmaps[i].as_src = TRUE; pixmaps[i].pPix = pSrcPix; pixmaps[i].pReg = NULL; i++; } if (pMaskPix) { pixmaps[i].as_dst = FALSE; pixmaps[i].as_src = TRUE; pixmaps[i].pPix = pMaskPix; pixmaps[i].pReg = NULL; i++; } exaDoMigration(pixmaps, i, TRUE); } if (pSrcPix) { pSrcPix = exaGetOffscreenPixmap(pSrc->pDrawable, &src_off_x, &src_off_y); if (!pSrcPix) { RegionUninit(®ion); return 0; } } if (pMaskPix) { pMaskPix = exaGetOffscreenPixmap(pMask->pDrawable, &mask_off_x, &mask_off_y); if (!pMaskPix) { RegionUninit(®ion); return 0; } } if (!exaPixmapHasGpuCopy(pDstPix)) { RegionUninit(®ion); return 0; } if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, pMaskPix, pDstPix)) { RegionUninit(®ion); return -1; } nbox = RegionNumRects(®ion); pbox = RegionRects(®ion); xMask = xMask + mask_off_x - xDst - dst_off_x; yMask = yMask + mask_off_y - yDst - dst_off_y; xSrc = xSrc + src_off_x - xDst - dst_off_x; ySrc = ySrc + src_off_y - yDst - dst_off_y; while (nbox--) { (*pExaScr->info->Composite) (pDstPix, pbox->x1 + xSrc, pbox->y1 + ySrc, pbox->x1 + xMask, pbox->y1 + yMask, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); pbox++; } (*pExaScr->info->DoneComposite) (pDstPix); exaMarkSync(pDst->pDrawable->pScreen); RegionUninit(®ion); return 1; } /** * exaTryMagicTwoPassCompositeHelper implements PictOpOver using two passes of * simpler operations PictOpOutReverse and PictOpAdd. Mainly used for component * alpha and limited 1-tmu cards. * * From http://anholt.livejournal.com/32058.html: * * The trouble is that component-alpha rendering requires two different sources * for blending: one for the source value to the blender, which is the * per-channel multiplication of source and mask, and one for the source alpha * for multiplying with the destination channels, which is the multiplication * of the source channels by the mask alpha. So the equation for Over is: * * dst.A = src.A * mask.A + (1 - (src.A * mask.A)) * dst.A * dst.R = src.R * mask.R + (1 - (src.A * mask.R)) * dst.R * dst.G = src.G * mask.G + (1 - (src.A * mask.G)) * dst.G * dst.B = src.B * mask.B + (1 - (src.A * mask.B)) * dst.B * * But we can do some simpler operations, right? How about PictOpOutReverse, * which has a source factor of 0 and dest factor of (1 - source alpha). We * can get the source alpha value (srca.X = src.A * mask.X) out of the texture * blenders pretty easily. So we can do a component-alpha OutReverse, which * gets us: * * dst.A = 0 + (1 - (src.A * mask.A)) * dst.A * dst.R = 0 + (1 - (src.A * mask.R)) * dst.R * dst.G = 0 + (1 - (src.A * mask.G)) * dst.G * dst.B = 0 + (1 - (src.A * mask.B)) * dst.B * * OK. And if an op doesn't use the source alpha value for the destination * factor, then we can do the channel multiplication in the texture blenders * to get the source value, and ignore the source alpha that we wouldn't use. * We've supported this in the Radeon driver for a long time. An example would * be PictOpAdd, which does: * * dst.A = src.A * mask.A + dst.A * dst.R = src.R * mask.R + dst.R * dst.G = src.G * mask.G + dst.G * dst.B = src.B * mask.B + dst.B * * Hey, this looks good! If we do a PictOpOutReverse and then a PictOpAdd right * after it, we get: * * dst.A = src.A * mask.A + ((1 - (src.A * mask.A)) * dst.A) * dst.R = src.R * mask.R + ((1 - (src.A * mask.R)) * dst.R) * dst.G = src.G * mask.G + ((1 - (src.A * mask.G)) * dst.G) * dst.B = src.B * mask.B + ((1 - (src.A * mask.B)) * dst.B) */ static int exaTryMagicTwoPassCompositeHelper(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ExaScreenPriv(pDst->pDrawable->pScreen); assert(op == PictOpOver); if (pExaScr->info->CheckComposite && (!(*pExaScr->info->CheckComposite) (PictOpOutReverse, pSrc, pMask, pDst) || !(*pExaScr->info->CheckComposite) (PictOpAdd, pSrc, pMask, pDst))) { return -1; } /* Now, we think we should be able to accelerate this operation. First, * composite the destination to be the destination times the source alpha * factors. */ exaComposite(PictOpOutReverse, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); /* Then, add in the source value times the destination alpha factors (1.0). */ exaComposite(PictOpAdd, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); return 1; } void exaComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ExaScreenPriv(pDst->pDrawable->pScreen); int ret = -1; Bool saveSrcRepeat = pSrc->repeat; Bool saveMaskRepeat = pMask ? pMask->repeat : 0; RegionRec region; if (pExaScr->swappedOut) goto fallback; /* Remove repeat in source if useless */ if (pSrc->pDrawable && pSrc->repeat && !pSrc->transform && xSrc >= 0 && (xSrc + width) <= pSrc->pDrawable->width && ySrc >= 0 && (ySrc + height) <= pSrc->pDrawable->height) pSrc->repeat = 0; if (!pMask && !pSrc->alphaMap && !pDst->alphaMap && (op == PictOpSrc || (op == PictOpOver && !PICT_FORMAT_A(pSrc->format)))) { if (pSrc->pDrawable ? (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && pSrc->repeat) : (pSrc->pSourcePict->type == SourcePictTypeSolidFill)) { ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height); if (ret == 1) goto done; } else if (pSrc->pDrawable && !pSrc->transform && ((op == PictOpSrc && (pSrc->format == pDst->format || (PICT_FORMAT_COLOR(pDst->format) && PICT_FORMAT_COLOR(pSrc->format) && pDst->format == PICT_FORMAT(PICT_FORMAT_BPP(pSrc->format), PICT_FORMAT_TYPE(pSrc->format), 0, PICT_FORMAT_R(pSrc->format), PICT_FORMAT_G(pSrc->format), PICT_FORMAT_B(pSrc->format))))) || (op == PictOpOver && pSrc->format == pDst->format && !PICT_FORMAT_A(pSrc->format)))) { if (!pSrc->repeat && xSrc >= 0 && ySrc >= 0 && (xSrc + width <= pSrc->pDrawable->width) && (ySrc + height <= pSrc->pDrawable->height)) { Bool suc; xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; xSrc += pSrc->pDrawable->x; ySrc += pSrc->pDrawable->y; if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) goto done; suc = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL, RegionRects(®ion), RegionNumRects(®ion), xSrc - xDst, ySrc - yDst, FALSE, FALSE); RegionUninit(®ion); /* Reset values to their original values. */ xDst -= pDst->pDrawable->x; yDst -= pDst->pDrawable->y; xSrc -= pSrc->pDrawable->x; ySrc -= pSrc->pDrawable->y; if (!suc) goto fallback; goto done; } if (pSrc->repeat && pSrc->repeatType == RepeatNormal && pSrc->pDrawable->type == DRAWABLE_PIXMAP) { DDXPointRec patOrg; /* Let's see if the driver can do the repeat in one go */ if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && !pDst->alphaMap) { ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; } /* Now see if we can use exaFillRegionTiled() */ xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; xSrc += pSrc->pDrawable->x; ySrc += pSrc->pDrawable->y; if (!miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) goto done; /* pattern origin is the point in the destination drawable * corresponding to (0,0) in the source */ patOrg.x = xDst - xSrc; patOrg.y = yDst - ySrc; ret = exaFillRegionTiled(pDst->pDrawable, ®ion, (PixmapPtr) pSrc->pDrawable, &patOrg, FB_ALLONES, GXcopy, CT_NONE); RegionUninit(®ion); if (ret) goto done; /* Let's be correct and restore the variables to their original state. */ xDst -= pDst->pDrawable->x; yDst -= pDst->pDrawable->y; xSrc -= pSrc->pDrawable->x; ySrc -= pSrc->pDrawable->y; } } } /* Remove repeat in mask if useless */ if (pMask && pMask->pDrawable && pMask->repeat && !pMask->transform && xMask >= 0 && (xMask + width) <= pMask->pDrawable->width && yMask >= 0 && (yMask + height) <= pMask->pDrawable->height) pMask->repeat = 0; if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { Bool isSrcSolid; ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; /* For generic masks and solid src pictures, mach64 can do Over in two * passes, similar to the component-alpha case. */ isSrcSolid = pSrc->pDrawable ? (pSrc->pDrawable->width == 1 && pSrc->pDrawable->height == 1 && pSrc->repeat) : (pSrc->pSourcePict->type == SourcePictTypeSolidFill); /* If we couldn't do the Composite in a single pass, and it was a * component-alpha Over, see if we can do it in two passes with * an OutReverse and then an Add. */ if (ret == -1 && op == PictOpOver && pMask && (pMask->componentAlpha || isSrcSolid)) { ret = exaTryMagicTwoPassCompositeHelper(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; } } fallback: #if DEBUG_TRACE_FALL exaPrintCompositeFallback(op, pSrc, pMask, pDst); #endif ExaCheckComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); done: pSrc->repeat = saveSrcRepeat; if (pMask) pMask->repeat = saveMaskRepeat; } /** * Same as miCreateAlphaPicture, except it uses ExaCheckPolyFillRect instead * of PolyFillRect to initialize the pixmap after creating it, to prevent * the pixmap from being migrated. * * See the comments about exaTrapezoids and exaTriangles. */ static PicturePtr exaCreateAlphaPicture(ScreenPtr pScreen, PicturePtr pDst, PictFormatPtr pPictFormat, CARD16 width, CARD16 height) { PixmapPtr pPixmap; PicturePtr pPicture; GCPtr pGC; int error; xRectangle rect; if (width > 32767 || height > 32767) return 0; if (!pPictFormat) { if (pDst->polyEdge == PolyEdgeSharp) pPictFormat = PictureMatchFormat(pScreen, 1, PICT_a1); else pPictFormat = PictureMatchFormat(pScreen, 8, PICT_a8); if (!pPictFormat) return 0; } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pPictFormat->depth, 0); if (!pPixmap) return 0; pGC = GetScratchGC(pPixmap->drawable.depth, pScreen); if (!pGC) { (*pScreen->DestroyPixmap) (pPixmap); return 0; } ValidateGC(&pPixmap->drawable, pGC); rect.x = 0; rect.y = 0; rect.width = width; rect.height = height; ExaCheckPolyFillRect(&pPixmap->drawable, pGC, 1, &rect); exaPixmapDirty(pPixmap, 0, 0, width, height); FreeScratchGC(pGC); pPicture = CreatePicture(0, &pPixmap->drawable, pPictFormat, 0, 0, serverClient, &error); (*pScreen->DestroyPixmap) (pPixmap); return pPicture; } /** * exaTrapezoids is essentially a copy of miTrapezoids that uses * exaCreateAlphaPicture instead of miCreateAlphaPicture. * * The problem with miCreateAlphaPicture is that it calls PolyFillRect * to initialize the contents after creating the pixmap, which * causes the pixmap to be moved in for acceleration. The subsequent * call to RasterizeTrapezoid won't be accelerated however, which * forces the pixmap to be moved out again. * * exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect * to initialize the contents. */ void exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); BoxRec bounds; if (maskFormat) { PicturePtr pPicture; INT16 xDst, yDst; INT16 xRel, yRel; miTrapezoidBounds(ntrap, traps, &bounds); if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) return; xDst = traps[0].left.p1.x >> 16; yDst = traps[0].left.p1.y >> 16; pPicture = exaCreateAlphaPicture(pScreen, pDst, maskFormat, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); if (!pPicture) return; exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); for (; ntrap; ntrap--, traps++) if (xTrapezoidValid(traps)) (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); xRel = bounds.x1 + xSrc - xDst; yRel = bounds.y1 + ySrc - yDst; CompositePicture(op, pSrc, pPicture, pDst, xRel, yRel, 0, 0, bounds.x1, bounds.y1, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); FreePicture(pPicture, 0); } else { if (pDst->polyEdge == PolyEdgeSharp) maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); else maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); for (; ntrap; ntrap--, traps++) exaTrapezoids(op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, traps); } } /** * exaTriangles is essentially a copy of miTriangles that uses * exaCreateAlphaPicture instead of miCreateAlphaPicture. * * The problem with miCreateAlphaPicture is that it calls PolyFillRect * to initialize the contents after creating the pixmap, which * causes the pixmap to be moved in for acceleration. The subsequent * call to AddTriangles won't be accelerated however, which forces the pixmap * to be moved out again. * * exaCreateAlphaPicture avoids this roundtrip by using ExaCheckPolyFillRect * to initialize the contents. */ void exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); BoxRec bounds; if (maskFormat) { PicturePtr pPicture; INT16 xDst, yDst; INT16 xRel, yRel; miTriangleBounds(ntri, tris, &bounds); if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) return; xDst = tris[0].p1.x >> 16; yDst = tris[0].p1.y >> 16; pPicture = exaCreateAlphaPicture(pScreen, pDst, maskFormat, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); if (!pPicture) return; exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris); exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); xRel = bounds.x1 + xSrc - xDst; yRel = bounds.y1 + ySrc - yDst; CompositePicture(op, pSrc, pPicture, pDst, xRel, yRel, 0, 0, bounds.x1, bounds.y1, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); FreePicture(pPicture, 0); } else { if (pDst->polyEdge == PolyEdgeSharp) maskFormat = PictureMatchFormat(pScreen, 1, PICT_a1); else maskFormat = PictureMatchFormat(pScreen, 8, PICT_a8); for (; ntri; ntri--, tris++) exaTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, 1, tris); } } xorg-server-21.1.16/exa/exa_priv.h0000644000175000017500000005002414757411105012377 /* * * Copyright (C) 2000 Keith Packard, member of The XFree86 Project, Inc. * 2005 Zack Rusin, Trolltech * * 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. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef EXAPRIV_H #define EXAPRIV_H #ifdef HAVE_DIX_CONFIG_H #include #endif #include "exa.h" #include #include #ifdef MITSHM #include "shmint.h" #endif #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "servermd.h" #include "colormapst.h" #include "gcstruct.h" #include "input.h" #include "mipointer.h" #include "mi.h" #include "dix.h" #include "fb.h" #include "fboverlay.h" #include "fbpict.h" #include "glyphstr.h" #include "damage.h" #define DEBUG_TRACE_FALL 0 #define DEBUG_MIGRATE 0 #define DEBUG_PIXMAP 0 #define DEBUG_OFFSCREEN 0 #define DEBUG_GLYPH_CACHE 0 #if DEBUG_TRACE_FALL #define EXA_FALLBACK(x) \ do { \ ErrorF("EXA fallback at %s: ", __FUNCTION__); \ ErrorF x; \ } while (0) char exaDrawableLocation(DrawablePtr pDrawable); #else #define EXA_FALLBACK(x) #endif #if DEBUG_PIXMAP #define DBG_PIXMAP(a) ErrorF a #else #define DBG_PIXMAP(a) #endif #ifndef EXA_MAX_FB #define EXA_MAX_FB FB_OVERLAY_MAX #endif #ifdef DEBUG #define EXA_FatalErrorDebug(x) FatalError x #define EXA_FatalErrorDebugWithRet(x, ret) FatalError x #else #define EXA_FatalErrorDebug(x) ErrorF x #define EXA_FatalErrorDebugWithRet(x, ret) \ do { \ ErrorF x; \ return ret; \ } while (0) #endif /** * This is the list of migration heuristics supported by EXA. See * exaDoMigration() for what their implementations do. */ enum ExaMigrationHeuristic { ExaMigrationGreedy, ExaMigrationAlways, ExaMigrationSmart }; typedef struct { unsigned char sha1[20]; } ExaCachedGlyphRec, *ExaCachedGlyphPtr; typedef struct { /* The identity of the cache, statically configured at initialization */ unsigned int format; int glyphWidth; int glyphHeight; int size; /* Size of cache; eventually this should be dynamically determined */ /* Hash table mapping from glyph sha1 to position in the glyph; we use * open addressing with a hash table size determined based on size and large * enough so that we always have a good amount of free space, so we can * use linear probing. (Linear probing is preferable to double hashing * here because it allows us to easily remove entries.) */ int *hashEntries; int hashSize; ExaCachedGlyphPtr glyphs; int glyphCount; /* Current number of glyphs */ PicturePtr picture; /* Where the glyphs of the cache are stored */ int yOffset; /* y location within the picture where the cache starts */ int columns; /* Number of columns the glyphs are laid out in */ int evictionPosition; /* Next random position to evict a glyph */ } ExaGlyphCacheRec, *ExaGlyphCachePtr; #define EXA_NUM_GLYPH_CACHES 4 #define EXA_FALLBACK_COPYWINDOW (1 << 0) #define EXA_ACCEL_COPYWINDOW (1 << 1) typedef struct _ExaMigrationRec { Bool as_dst; Bool as_src; PixmapPtr pPix; RegionPtr pReg; } ExaMigrationRec, *ExaMigrationPtr; typedef void (*EnableDisableFBAccessProcPtr) (ScreenPtr, Bool); typedef struct { ExaDriverPtr info; ScreenBlockHandlerProcPtr SavedBlockHandler; ScreenWakeupHandlerProcPtr SavedWakeupHandler; CreateGCProcPtr SavedCreateGC; CloseScreenProcPtr SavedCloseScreen; GetImageProcPtr SavedGetImage; GetSpansProcPtr SavedGetSpans; CreatePixmapProcPtr SavedCreatePixmap; DestroyPixmapProcPtr SavedDestroyPixmap; CopyWindowProcPtr SavedCopyWindow; ChangeWindowAttributesProcPtr SavedChangeWindowAttributes; BitmapToRegionProcPtr SavedBitmapToRegion; CreateScreenResourcesProcPtr SavedCreateScreenResources; ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader; SharePixmapBackingProcPtr SavedSharePixmapBacking; SetSharedPixmapBackingProcPtr SavedSetSharedPixmapBacking; SourceValidateProcPtr SavedSourceValidate; CompositeProcPtr SavedComposite; TrianglesProcPtr SavedTriangles; GlyphsProcPtr SavedGlyphs; TrapezoidsProcPtr SavedTrapezoids; AddTrapsProcPtr SavedAddTraps; void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap); void (*do_move_in_pixmap) (PixmapPtr pPixmap); void (*do_move_out_pixmap) (PixmapPtr pPixmap); void (*prepare_access_reg) (PixmapPtr pPixmap, int index, RegionPtr pReg); Bool swappedOut; enum ExaMigrationHeuristic migration; Bool checkDirtyCorrectness; unsigned disableFbCount; Bool optimize_migration; unsigned offScreenCounter; unsigned numOffscreenAvailable; CARD32 lastDefragment; CARD32 nextDefragment; PixmapPtr deferred_mixed_pixmap; /* Reference counting for accessed pixmaps */ struct { PixmapPtr pixmap; int count; Bool retval; } access[EXA_NUM_PREPARE_INDICES]; /* Holds information on fallbacks that cannot be relayed otherwise. */ unsigned int fallback_flags; unsigned int fallback_counter; ExaGlyphCacheRec glyphCaches[EXA_NUM_GLYPH_CACHES]; /** * Regions affected by fallback composite source / mask operations. */ RegionRec srcReg; RegionRec maskReg; PixmapPtr srcPix; PixmapPtr maskPix; DevPrivateKeyRec pixmapPrivateKeyRec; DevPrivateKeyRec gcPrivateKeyRec; } ExaScreenPrivRec, *ExaScreenPrivPtr; extern DevPrivateKeyRec exaScreenPrivateKeyRec; #define exaScreenPrivateKey (&exaScreenPrivateKeyRec) #define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixGetPrivate(&(s)->devPrivates, exaScreenPrivateKey)) #define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) #define ExaGetGCPriv(gc) ((ExaGCPrivPtr)dixGetPrivateAddr(&(gc)->devPrivates, &ExaGetScreenPriv(gc->pScreen)->gcPrivateKeyRec)) #define ExaGCPriv(gc) ExaGCPrivPtr pExaGC = ExaGetGCPriv(gc) /* * Some macros to deal with function wrapping. */ #define wrap(priv, real, mem, func) {\ priv->Saved##mem = real->mem; \ real->mem = func; \ } #define unwrap(priv, real, mem) {\ real->mem = priv->Saved##mem; \ } #ifdef HAVE_TYPEOF #define swap(priv, real, mem) {\ typeof(real->mem) tmp = priv->Saved##mem; \ priv->Saved##mem = real->mem; \ real->mem = tmp; \ } #else #define swap(priv, real, mem) {\ const void *tmp = priv->Saved##mem; \ priv->Saved##mem = real->mem; \ real->mem = tmp; \ } #endif #define EXA_PRE_FALLBACK(_screen_) \ ExaScreenPriv(_screen_); \ pExaScr->fallback_counter++; #define EXA_POST_FALLBACK(_screen_) \ pExaScr->fallback_counter--; #define EXA_PRE_FALLBACK_GC(_gc_) \ ExaScreenPriv(_gc_->pScreen); \ ExaGCPriv(_gc_); \ pExaScr->fallback_counter++; \ swap(pExaGC, _gc_, ops); #define EXA_POST_FALLBACK_GC(_gc_) \ pExaScr->fallback_counter--; \ swap(pExaGC, _gc_, ops); /** Align an offset to an arbitrary alignment */ #define EXA_ALIGN(offset, align) (((offset) + (align) - 1) - \ (((offset) + (align) - 1) % (align))) /** Align an offset to a power-of-two alignment */ #define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) #define EXA_PIXMAP_SCORE_MOVE_IN 10 #define EXA_PIXMAP_SCORE_MAX 20 #define EXA_PIXMAP_SCORE_MOVE_OUT -10 #define EXA_PIXMAP_SCORE_MIN -20 #define EXA_PIXMAP_SCORE_PINNED 1000 #define EXA_PIXMAP_SCORE_INIT 1001 #define ExaGetPixmapPriv(p) ((ExaPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &ExaGetScreenPriv((p)->drawable.pScreen)->pixmapPrivateKeyRec)) #define ExaPixmapPriv(p) ExaPixmapPrivPtr pExaPixmap = ExaGetPixmapPriv(p) #define EXA_RANGE_PITCH (1 << 0) #define EXA_RANGE_WIDTH (1 << 1) #define EXA_RANGE_HEIGHT (1 << 2) typedef struct { ExaOffscreenArea *area; int score; /**< score for the move-in vs move-out heuristic */ Bool use_gpu_copy; CARD8 *sys_ptr; /**< pointer to pixmap data in system memory */ int sys_pitch; /**< pitch of pixmap in system memory */ CARD8 *fb_ptr; /**< pointer to pixmap data in framebuffer memory */ int fb_pitch; /**< pitch of pixmap in framebuffer memory */ unsigned int fb_size; /**< size of pixmap in framebuffer memory */ /** * Holds information about whether this pixmap can be used for * acceleration (== 0) or not (> 0). * * Contains a OR'ed combination of the following values: * EXA_RANGE_PITCH - set if the pixmap's pitch is out of range * EXA_RANGE_WIDTH - set if the pixmap's width is out of range * EXA_RANGE_HEIGHT - set if the pixmap's height is out of range */ unsigned int accel_blocked; /** * The damage record contains the areas of the pixmap's current location * (framebuffer or system) that have been damaged compared to the other * location. */ DamagePtr pDamage; /** * The valid regions mark the valid bits (at least, as they're derived from * damage, which may be overreported) of a pixmap's system and FB copies. */ RegionRec validSys, validFB; /** * Driver private storage per EXA pixmap */ void *driverPriv; } ExaPixmapPrivRec, *ExaPixmapPrivPtr; typedef struct { /* GC values from the layer below. */ const GCOps *Savedops; const GCFuncs *Savedfuncs; } ExaGCPrivRec, *ExaGCPrivPtr; typedef struct { PicturePtr pDst; INT16 xSrc; INT16 ySrc; INT16 xMask; INT16 yMask; INT16 xDst; INT16 yDst; INT16 width; INT16 height; } ExaCompositeRectRec, *ExaCompositeRectPtr; /** * exaDDXDriverInit must be implemented by the DDX using EXA, and is the place * to set EXA options or hook in screen functions to handle using EXA as the AA. */ void exaDDXDriverInit(ScreenPtr pScreen); /* exa_unaccel.c */ void exaPrepareAccessGC(GCPtr pGC); void exaFinishAccessGC(GCPtr pGC); void ExaCheckFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nspans, DDXPointPtr ppt, int *pwidth, int fSorted); void ExaCheckSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); void ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits); void ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); RegionPtr ExaCheckCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty); RegionPtr ExaCheckCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane); void ExaCheckPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit); void ExaCheckPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); void ExaCheckPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nsegInit, xSegment * pSegInit); void ExaCheckPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * pArcs); void ExaCheckPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect); void ExaCheckImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); void ExaCheckPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); void ExaCheckPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y); void ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); void ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d); void ExaCheckGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); void ExaCheckAddTraps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap * traps); /* exa_accel.c */ static _X_INLINE Bool exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask, unsigned int fillStyle, unsigned char alu, Bool clientClip) { return ((alu != GXcopy && alu != GXclear && alu != GXset && alu != GXcopyInverted) || fillStyle == FillStippled || clientClip != FALSE || !EXA_PM_IS_SOLID(pDrawable, planemask)); } void exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); Bool exaFillRegionTiled(DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, Bool clientClip); void exaGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d); RegionPtr exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); Bool exaHWCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown); void exaCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern const GCOps exaOps; void ExaCheckComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void ExaCheckGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); /* exa_offscreen.c */ void ExaOffscreenSwapOut(ScreenPtr pScreen); void ExaOffscreenSwapIn(ScreenPtr pScreen); ExaOffscreenArea *ExaOffscreenDefragment(ScreenPtr pScreen); Bool exaOffscreenInit(ScreenPtr pScreen); void ExaOffscreenFini(ScreenPtr pScreen); /* exa.c */ Bool ExaDoPrepareAccess(PixmapPtr pPixmap, int index); void exaPrepareAccess(DrawablePtr pDrawable, int index); void exaFinishAccess(DrawablePtr pDrawable, int index); void exaDestroyPixmap(PixmapPtr pPixmap); void exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2); void exaGetDrawableDeltas(DrawablePtr pDrawable, PixmapPtr pPixmap, int *xp, int *yp); Bool exaPixmapHasGpuCopy(PixmapPtr p); PixmapPtr exaGetOffscreenPixmap(DrawablePtr pDrawable, int *xp, int *yp); PixmapPtr exaGetDrawablePixmap(DrawablePtr pDrawable); void exaSetFbPitch(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp); void exaSetAccelBlock(ExaScreenPrivPtr pExaScr, ExaPixmapPrivPtr pExaPixmap, int w, int h, int bpp); void exaDoMigration(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); Bool exaPixmapIsPinned(PixmapPtr pPix); extern const GCFuncs exaGCFuncs; /* exa_classic.c */ PixmapPtr exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint); Bool exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); Bool exaDestroyPixmap_classic(PixmapPtr pPixmap); Bool exaPixmapHasGpuCopy_classic(PixmapPtr pPixmap); /* exa_driver.c */ PixmapPtr exaCreatePixmap_driver(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint); Bool exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); Bool exaDestroyPixmap_driver(PixmapPtr pPixmap); Bool exaPixmapHasGpuCopy_driver(PixmapPtr pPixmap); /* exa_mixed.c */ PixmapPtr exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint); Bool exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); Bool exaDestroyPixmap_mixed(PixmapPtr pPixmap); Bool exaPixmapHasGpuCopy_mixed(PixmapPtr pPixmap); /* exa_migration_mixed.c */ void exaCreateDriverPixmap_mixed(PixmapPtr pPixmap); void exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); void exaMoveInPixmap_mixed(PixmapPtr pPixmap); void exaDamageReport_mixed(DamagePtr pDamage, RegionPtr pRegion, void *closure); void exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg); Bool exaSetSharedPixmapBacking_mixed(PixmapPtr pPixmap, void *handle); Bool exaSharePixmapBacking_mixed(PixmapPtr pPixmap, ScreenPtr secondary, void **handle_p); /* exa_render.c */ Bool exaOpReadsDestination(CARD8 op); void exaComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void exaCompositeRects(CARD8 op, PicturePtr Src, PicturePtr pMask, PicturePtr pDst, int nrect, ExaCompositeRectPtr rects); void exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps); void exaTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris); /* exa_glyph.c */ void exaGlyphsInit(ScreenPtr pScreen); void exaGlyphsFini(ScreenPtr pScreen); void exaGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); /* exa_migration_classic.c */ void exaCopyDirtyToSys(ExaMigrationPtr migrate); void exaCopyDirtyToFb(ExaMigrationPtr migrate); void exaDoMigration_classic(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); void exaPixmapSave(ScreenPtr pScreen, ExaOffscreenArea * area); void exaMoveOutPixmap_classic(PixmapPtr pPixmap); void exaMoveInPixmap_classic(PixmapPtr pPixmap); void exaPrepareAccessReg_classic(PixmapPtr pPixmap, int index, RegionPtr pReg); #endif /* EXAPRIV_H */ xorg-server-21.1.16/exa/exa_unaccel.c0000644000175000017500000006105614757411105013033 /* * * Copyright © 1999 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. */ #include "exa_priv.h" #include "mipict.h" /* * These functions wrap the low-level fb rendering functions and * synchronize framebuffer/accelerated drawing by stalling until * the accelerator is idle */ /** * Calls exaPrepareAccess with EXA_PREPARE_SRC for the tile, if that is the * current fill style. * * Solid doesn't use an extra pixmap source, and Stippled/OpaqueStippled are * 1bpp and never in fb, so we don't worry about them. * We should worry about them for completeness sake and going forward. */ void exaPrepareAccessGC(GCPtr pGC) { if (pGC->stipple) exaPrepareAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); if (pGC->fillStyle == FillTiled) exaPrepareAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); } /** * Finishes access to the tile in the GC, if used. */ void exaFinishAccessGC(GCPtr pGC) { if (pGC->fillStyle == FillTiled) exaFinishAccess(&pGC->tile.pixmap->drawable, EXA_PREPARE_SRC); if (pGC->stipple) exaFinishAccess(&pGC->stipple->drawable, EXA_PREPARE_MASK); } #if DEBUG_TRACE_FALL char exaDrawableLocation(DrawablePtr pDrawable) { return exaDrawableIsOffscreen(pDrawable) ? 's' : 'm'; } #endif /* DEBUG_TRACE_FALL */ void ExaCheckFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nspans, DDXPointPtr ppt, int *pwidth, int fSorted) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->FillSpans(pDrawable, pGC, nspans, ppt, pwidth, fSorted); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *psrc, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); pGC->ops->SetSpans(pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); ExaPixmapPriv(pPixmap); EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); if (!pExaScr->prepare_access_reg || !pExaPixmap->pDamage || exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClip != NULL)) exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); else pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, DamagePendingRegion(pExaPixmap->pDamage)); pGC->ops->PutImage(pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckCopyNtoN(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { RegionRec reg; int xoff, yoff; EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); if (pExaScr->prepare_access_reg && RegionInitBoxes(®, pbox, nbox)) { PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc); exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); RegionTranslate(®, xoff + dx, yoff + dy); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, ®); RegionUninit(®); } else exaPrepareAccess(pSrc, EXA_PREPARE_SRC); if (pExaScr->prepare_access_reg && !exaGCReadsDestination(pDst, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClip != NULL) && RegionInitBoxes(®, pbox, nbox)) { PixmapPtr pPixmap = exaGetDrawablePixmap(pDst); exaGetDrawableDeltas(pDst, pPixmap, &xoff, &yoff); RegionTranslate(®, xoff, yoff); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, ®); RegionUninit(®); } else exaPrepareAccess(pDst, EXA_PREPARE_DEST); /* This will eventually call fbCopyNtoN, with some calculation overhead. */ while (nbox--) { pGC->ops->CopyArea(pSrc, pDst, pGC, pbox->x1 - pSrc->x + dx, pbox->y1 - pSrc->y + dy, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1, pbox->x1 - pDst->x, pbox->y1 - pDst->y); pbox++; } exaFinishAccess(pSrc, EXA_PREPARE_SRC); exaFinishAccess(pDst, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } static void ExaFallbackPrepareReg(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height, int index, Bool checkReads) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); if (pExaScr->prepare_access_reg && !(checkReads && exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClip != NULL))) { BoxRec box; RegionRec reg; int xoff, yoff; PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable); exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); box.x1 = pDrawable->x + x + xoff; box.y1 = pDrawable->y + y + yoff; box.x2 = box.x1 + width; box.y2 = box.y1 + height; RegionInit(®, &box, 1); pExaScr->prepare_access_reg(pPixmap, index, ®); RegionUninit(®); } else exaPrepareAccess(pDrawable, index); } RegionPtr ExaCheckCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty) { RegionPtr ret; EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); ExaFallbackPrepareReg(pSrc, pGC, srcx, srcy, w, h, EXA_PREPARE_SRC, FALSE); ExaFallbackPrepareReg(pDst, pGC, dstx, dsty, w, h, EXA_PREPARE_DEST, TRUE); ret = pGC->ops->CopyArea(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty); exaFinishAccess(pSrc, EXA_PREPARE_SRC); exaFinishAccess(pDst, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); return ret; } RegionPtr ExaCheckCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { RegionPtr ret; EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, exaDrawableLocation(pSrc), exaDrawableLocation(pDst))); ExaFallbackPrepareReg(pSrc, pGC, srcx, srcy, w, h, EXA_PREPARE_SRC, FALSE); ExaFallbackPrepareReg(pDst, pGC, dstx, dsty, w, h, EXA_PREPARE_DEST, TRUE); ret = pGC->ops->CopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); exaFinishAccess(pSrc, EXA_PREPARE_SRC); exaFinishAccess(pDst, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); return ret; } void ExaCheckPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); pGC->ops->PolyPoint(pDrawable, pGC, mode, npt, pptInit); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->lineWidth, mode, npt)); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->Polylines(pDrawable, pGC, mode, npt, ppt); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nsegInit, xSegment * pSegInit) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->lineWidth, nsegInit)); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->PolySegment(pDrawable, pGC, nsegInit, pSegInit); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * pArcs) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->PolyArc(pDrawable, pGC, narcs, pArcs); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->PolyFillRect(pDrawable, pGC, nrect, prect); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable, exaDrawableLocation(pDrawable), pGC->fillStyle, pGC->alu)); exaPrepareAccess(pDrawable, EXA_PREPARE_DEST); exaPrepareAccessGC(pGC); pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); exaFinishAccessGC(pGC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y) { EXA_PRE_FALLBACK_GC(pGC); EXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable, exaDrawableLocation(&pBitmap->drawable), exaDrawableLocation(pDrawable))); ExaFallbackPrepareReg(pDrawable, pGC, x, y, w, h, EXA_PREPARE_DEST, TRUE); ExaFallbackPrepareReg(&pBitmap->drawable, pGC, 0, 0, w, h, EXA_PREPARE_SRC, FALSE); exaPrepareAccessGC(pGC); pGC->ops->PushPixels(pGC, pBitmap, pDrawable, w, h, x, y); exaFinishAccessGC(pGC); exaFinishAccess(&pBitmap->drawable, EXA_PREPARE_SRC); exaFinishAccess(pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK_GC(pGC); } void ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { DrawablePtr pDrawable = &pWin->drawable; ScreenPtr pScreen = pDrawable->pScreen; EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("from %p\n", pWin)); /* Only need the source bits, the destination region will be overwritten */ if (pExaScr->prepare_access_reg) { PixmapPtr pPixmap = pScreen->GetWindowPixmap(pWin); int xoff, yoff; exaGetDrawableDeltas(&pWin->drawable, pPixmap, &xoff, &yoff); RegionTranslate(prgnSrc, xoff, yoff); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, prgnSrc); RegionTranslate(prgnSrc, -xoff, -yoff); } else exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); swap(pExaScr, pScreen, CopyWindow); pScreen->CopyWindow(pWin, ptOldOrg, prgnSrc); swap(pExaScr, pScreen, CopyWindow); exaFinishAccess(pDrawable, EXA_PREPARE_SRC); EXA_POST_FALLBACK(pScreen); } void ExaCheckGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d) { ScreenPtr pScreen = pDrawable->pScreen; EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); ExaFallbackPrepareReg(pDrawable, NULL, x, y, w, h, EXA_PREPARE_SRC, FALSE); swap(pExaScr, pScreen, GetImage); pScreen->GetImage(pDrawable, x, y, w, h, format, planeMask, d); swap(pExaScr, pScreen, GetImage); exaFinishAccess(pDrawable, EXA_PREPARE_SRC); EXA_POST_FALLBACK(pScreen); } void ExaCheckGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart) { ScreenPtr pScreen = pDrawable->pScreen; EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("from %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); swap(pExaScr, pScreen, GetSpans); pScreen->GetSpans(pDrawable, wMax, ppt, pwidth, nspans, pdstStart); swap(pExaScr, pScreen, GetSpans); exaFinishAccess(pDrawable, EXA_PREPARE_SRC); EXA_POST_FALLBACK(pScreen); } static void ExaSrcValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; ExaScreenPriv(pScreen); PixmapPtr pPix = exaGetDrawablePixmap(pDrawable); BoxRec box; RegionRec reg; RegionPtr dst; int xoff, yoff; if (pExaScr->srcPix == pPix) dst = &pExaScr->srcReg; else if (pExaScr->maskPix == pPix) dst = &pExaScr->maskReg; else return; exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff); box.x1 = x + xoff; box.y1 = y + yoff; box.x2 = box.x1 + width; box.y2 = box.y1 + height; RegionInit(®, &box, 1); RegionUnion(dst, dst, ®); RegionUninit(®); swap(pExaScr, pScreen, SourceValidate); pScreen->SourceValidate(pDrawable, x, y, width, height, subWindowMode); swap(pExaScr, pScreen, SourceValidate); } static Bool ExaPrepareCompositeReg(ScreenPtr pScreen, CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { RegionRec region; RegionPtr dstReg = NULL; RegionPtr srcReg = NULL; RegionPtr maskReg = NULL; PixmapPtr pSrcPix = NULL; PixmapPtr pMaskPix = NULL; PixmapPtr pDstPix; ExaScreenPriv(pScreen); Bool ret; RegionNull(®ion); if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); RegionNull(&pExaScr->srcReg); srcReg = &pExaScr->srcReg; pExaScr->srcPix = pSrcPix; if (pSrc != pDst) RegionTranslate(pSrc->pCompositeClip, -pSrc->pDrawable->x, -pSrc->pDrawable->y); } else pExaScr->srcPix = NULL; if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); RegionNull(&pExaScr->maskReg); maskReg = &pExaScr->maskReg; pExaScr->maskPix = pMaskPix; if (pMask != pDst && pMask != pSrc) RegionTranslate(pMask->pCompositeClip, -pMask->pDrawable->x, -pMask->pDrawable->y); } else pExaScr->maskPix = NULL; RegionTranslate(pDst->pCompositeClip, -pDst->pDrawable->x, -pDst->pDrawable->y); pExaScr->SavedSourceValidate = ExaSrcValidate; swap(pExaScr, pScreen, SourceValidate); ret = miComputeCompositeRegion(®ion, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); swap(pExaScr, pScreen, SourceValidate); RegionTranslate(pDst->pCompositeClip, pDst->pDrawable->x, pDst->pDrawable->y); if (pSrc->pDrawable && pSrc != pDst) RegionTranslate(pSrc->pCompositeClip, pSrc->pDrawable->x, pSrc->pDrawable->y); if (pMask && pMask->pDrawable && pMask != pDst && pMask != pSrc) RegionTranslate(pMask->pCompositeClip, pMask->pDrawable->x, pMask->pDrawable->y); if (!ret) { if (srcReg) RegionUninit(srcReg); if (maskReg) RegionUninit(maskReg); return FALSE; } /** * Don't limit alphamaps readbacks for now until we've figured out how that * should be done. */ if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) pExaScr-> prepare_access_reg(exaGetDrawablePixmap(pSrc->alphaMap->pDrawable), EXA_PREPARE_AUX_SRC, NULL); if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) pExaScr-> prepare_access_reg(exaGetDrawablePixmap(pMask->alphaMap->pDrawable), EXA_PREPARE_AUX_MASK, NULL); if (pSrcPix) pExaScr->prepare_access_reg(pSrcPix, EXA_PREPARE_SRC, srcReg); if (pMaskPix) pExaScr->prepare_access_reg(pMaskPix, EXA_PREPARE_MASK, maskReg); if (srcReg) RegionUninit(srcReg); if (maskReg) RegionUninit(maskReg); pDstPix = exaGetDrawablePixmap(pDst->pDrawable); if (!exaOpReadsDestination(op)) { int xoff; int yoff; exaGetDrawableDeltas(pDst->pDrawable, pDstPix, &xoff, &yoff); RegionTranslate(®ion, pDst->pDrawable->x + xoff, pDst->pDrawable->y + yoff); dstReg = ®ion; } if (pDst->alphaMap && pDst->alphaMap->pDrawable) pExaScr-> prepare_access_reg(exaGetDrawablePixmap(pDst->alphaMap->pDrawable), EXA_PREPARE_AUX_DEST, dstReg); pExaScr->prepare_access_reg(pDstPix, EXA_PREPARE_DEST, dstReg); RegionUninit(®ion); return TRUE; } void ExaCheckComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); EXA_PRE_FALLBACK(pScreen); if (pExaScr->prepare_access_reg) { if (!ExaPrepareCompositeReg(pScreen, op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height)) goto out_no_clip; } else { /* We need to prepare access to any separate alpha maps first, * in case the driver doesn't support EXA_PREPARE_AUX*, * in which case EXA_PREPARE_SRC may be used for moving them out. */ if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) exaPrepareAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) exaPrepareAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); if (pDst->alphaMap && pDst->alphaMap->pDrawable) exaPrepareAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); exaPrepareAccess(pDst->pDrawable, EXA_PREPARE_DEST); EXA_FALLBACK(("from picts %p/%p to pict %p\n", pSrc, pMask, pDst)); if (pSrc->pDrawable != NULL) exaPrepareAccess(pSrc->pDrawable, EXA_PREPARE_SRC); if (pMask && pMask->pDrawable != NULL) exaPrepareAccess(pMask->pDrawable, EXA_PREPARE_MASK); } swap(pExaScr, ps, Composite); ps->Composite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); swap(pExaScr, ps, Composite); if (pMask && pMask->pDrawable != NULL) exaFinishAccess(pMask->pDrawable, EXA_PREPARE_MASK); if (pSrc->pDrawable != NULL) exaFinishAccess(pSrc->pDrawable, EXA_PREPARE_SRC); exaFinishAccess(pDst->pDrawable, EXA_PREPARE_DEST); if (pDst->alphaMap && pDst->alphaMap->pDrawable) exaFinishAccess(pDst->alphaMap->pDrawable, EXA_PREPARE_AUX_DEST); if (pSrc->alphaMap && pSrc->alphaMap->pDrawable) exaFinishAccess(pSrc->alphaMap->pDrawable, EXA_PREPARE_AUX_SRC); if (pMask && pMask->alphaMap && pMask->alphaMap->pDrawable) exaFinishAccess(pMask->alphaMap->pDrawable, EXA_PREPARE_AUX_MASK); out_no_clip: EXA_POST_FALLBACK(pScreen); } /** * Avoid migration ping-pong when using a mask. */ void ExaCheckGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { ScreenPtr pScreen = pDst->pDrawable->pScreen; EXA_PRE_FALLBACK(pScreen); miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); EXA_POST_FALLBACK(pScreen); } void ExaCheckAddTraps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("to pict %p (%c)\n", pPicture, exaDrawableLocation(pPicture->pDrawable))); exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); swap(pExaScr, ps, AddTraps); ps->AddTraps(pPicture, x_off, y_off, ntrap, traps); swap(pExaScr, ps, AddTraps); exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK(pScreen); } /** * Gets the 0,0 pixel of a pixmap. Used for doing solid fills of tiled pixmaps * that happen to be 1x1. Pixmap must be at least 8bpp. */ CARD32 exaGetPixmapFirstPixel(PixmapPtr pPixmap) { switch (pPixmap->drawable.bitsPerPixel) { case 32: { CARD32 pixel; pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, ZPixmap, ~0, (char *) &pixel); return pixel; } case 16: { CARD16 pixel; pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, ZPixmap, ~0, (char *) &pixel); return pixel; } case 8: case 4: case 1: { CARD8 pixel; pPixmap->drawable.pScreen->GetImage(&pPixmap->drawable, 0, 0, 1, 1, ZPixmap, ~0, (char *) &pixel); return pixel; } default: FatalError("%s called for invalid bpp %d\n", __func__, pPixmap->drawable.bitsPerPixel); } } xorg-server-21.1.16/fb/0000755000175000017500000000000014757411133010303 5xorg-server-21.1.16/fb/meson.build0000644000175000017500000000155414757411105012371 srcs_fb = [ 'fballpriv.c', 'fbarc.c', 'fbbits.c', 'fbblt.c', 'fbbltone.c', 'fbcmap_mi.c', 'fbcopy.c', 'fbfill.c', 'fbfillrect.c', 'fbfillsp.c', 'fbgc.c', 'fbgetsp.c', 'fbglyph.c', 'fbimage.c', 'fbline.c', 'fboverlay.c', 'fbpict.c', 'fbpixmap.c', 'fbpoint.c', 'fbpush.c', 'fbscreen.c', 'fbseg.c', 'fbsetsp.c', 'fbsolid.c', 'fbtrap.c', 'fbutil.c', 'fbwindow.c', ] hdrs_fb = [ 'fb.h', 'fboverlay.h', 'fbpict.h', 'fbrop.h', 'wfbrename.h' ] libxserver_fb = static_library('libxserver_fb', srcs_fb, include_directories: inc, dependencies: common_dep, pic: true, ) wfb_args = '-DFB_ACCESS_WRAPPER' libxserver_wfb = static_library('libxserver_wfb', srcs_fb, c_args: wfb_args, include_directories: inc, dependencies: common_dep, pic: true, build_by_default: false, ) if build_xorg install_data(hdrs_fb, install_dir: xorgsdkdir) endif xorg-server-21.1.16/fb/Makefile.am0000644000175000017500000000140414757411105012255 noinst_LTLIBRARIES = libfb.la libwfb.la AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h endif libfb_la_CFLAGS = $(AM_CFLAGS) libfb_la_LIBADD = $(PIXMAN_LIBS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libwfb_la_LIBADD = $(PIXMAN_LIBS) libfb_la_SOURCES = \ fb.h \ fballpriv.c \ fbarc.c \ fbbits.c \ fbbits.h \ fbblt.c \ fbbltone.c \ fbcmap_mi.c \ fbcopy.c \ fbfill.c \ fbfillrect.c \ fbfillsp.c \ fbgc.c \ fbgetsp.c \ fbglyph.c \ fbimage.c \ fbline.c \ fboverlay.c \ fboverlay.h \ fbpict.c \ fbpict.h \ fbpixmap.c \ fbpoint.c \ fbpush.c \ fbrop.h \ fbscreen.c \ fbseg.c \ fbsetsp.c \ fbsolid.c \ fbtrap.c \ fbutil.c \ fbwindow.c libwfb_la_SOURCES = $(libfb_la_SOURCES) xorg-server-21.1.16/fb/fb.h0000644000175000017500000007566514757411105011005 /* * * Copyright © 1998 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. */ #ifndef _FB_H_ #define _FB_H_ #include #include #include "scrnintstr.h" #include "pixmap.h" #include "pixmapstr.h" #include "region.h" #include "gcstruct.h" #include "colormap.h" #include "miscstruct.h" #include "servermd.h" #include "windowstr.h" #include "privates.h" #include "mi.h" #include "migc.h" #include "picturestr.h" #ifdef FB_ACCESS_WRAPPER #include "wfbrename.h" #define FBPREFIX(x) wfb##x #define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr)))) #define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr)))) #define MEMCPY_WRAPPED(dst, src, size) do { \ size_t _i; \ CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \ for(_i = 0; _i < size; _i++) { \ WRITE(_dst +_i, READ(_src + _i)); \ } \ } while(0) #define MEMSET_WRAPPED(dst, val, size) do { \ size_t _i; \ CARD8 *_dst = (CARD8*)(dst); \ for(_i = 0; _i < size; _i++) { \ WRITE(_dst +_i, (val)); \ } \ } while(0) #else #define FBPREFIX(x) fb##x #define WRITE(ptr, val) (*(ptr) = (val)) #define READ(ptr) (*(ptr)) #define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size)) #define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size)) #endif /* * This single define controls the basic size of data manipulated * by this software; it must be log2(sizeof (FbBits) * 8) */ #ifndef FB_SHIFT #define FB_SHIFT LOG2_BITMAP_PAD #endif #define FB_UNIT (1 << FB_SHIFT) #define FB_MASK (FB_UNIT - 1) #define FB_ALLONES ((FbBits) -1) #if GLYPHPADBYTES != 4 #error "GLYPHPADBYTES must be 4" #endif #define FB_STIP_SHIFT LOG2_BITMAP_PAD #define FB_STIP_UNIT (1 << FB_STIP_SHIFT) #define FB_STIP_MASK (FB_STIP_UNIT - 1) #define FB_STIP_ALLONES ((FbStip) -1) #define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0) #define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0) #define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT))) #define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT))) #define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1)) #if FB_SHIFT == 5 typedef CARD32 FbBits; #else #error "Unsupported FB_SHIFT" #endif #if LOG2_BITMAP_PAD == FB_SHIFT typedef FbBits FbStip; #endif typedef int FbStride; #ifdef FB_DEBUG extern _X_EXPORT void fbValidateDrawable(DrawablePtr d); extern _X_EXPORT void fbInitializeDrawable(DrawablePtr d); extern _X_EXPORT void fbSetBits(FbStip * bits, int stride, FbStip data); #define FB_HEAD_BITS (FbStip) (0xbaadf00d) #define FB_TAIL_BITS (FbStip) (0xbaddf0ad) #else #define fbValidateDrawable(d) #define fdInitializeDrawable(d) #endif #include "fbrop.h" #if BITMAP_BIT_ORDER == LSBFirst #define FbScrLeft(x,n) ((x) >> (n)) #define FbScrRight(x,n) ((x) << (n)) /* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */ #define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1)) #define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n))) #define FbPatternOffsetBits 0 #else #define FbScrLeft(x,n) ((x) << (n)) #define FbScrRight(x,n) ((x) >> (n)) /* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */ #define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n))) #define FbStipMoveLsb(x,s,n) (x) #define FbPatternOffsetBits (sizeof (FbBits) - 1) #endif #include "micoord.h" #define FbStipLeft(x,n) FbScrLeft(x,n) #define FbStipRight(x,n) FbScrRight(x,n) #define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0) #define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0) #define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0) #define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0) #define FbLeftMask(x) ( ((x) & FB_MASK) ? \ FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0) #define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \ FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0) #define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \ FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0) #define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \ FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0) #define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \ FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK)) #define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \ FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK)) #define FbMaskBits(x,w,l,n,r) { \ n = (w); \ r = FbRightMask((x)+n); \ l = FbLeftMask(x); \ if (l) { \ n -= FB_UNIT - ((x) & FB_MASK); \ if (n < 0) { \ n = 0; \ l &= r; \ r = 0; \ } \ } \ n >>= FB_SHIFT; \ } #define FbByteMaskInvalid 0x10 #define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1))) #define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o))) #define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3)) #define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \ FbSelectPart(xor,off,t))) #ifndef FbSelectPart #define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t) #endif #define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \ n = (w); \ lb = 0; \ rb = 0; \ r = FbRightMask((x)+n); \ if (r) { \ /* compute right byte length */ \ if ((copy) && (((x) + n) & 7) == 0) { \ rb = (((x) + n) & FB_MASK) >> 3; \ } else { \ rb = FbByteMaskInvalid; \ } \ } \ l = FbLeftMask(x); \ if (l) { \ /* compute left byte length */ \ if ((copy) && ((x) & 7) == 0) { \ lb = ((x) & FB_MASK) >> 3; \ } else { \ lb = FbByteMaskInvalid; \ } \ /* subtract out the portion painted by leftMask */ \ n -= FB_UNIT - ((x) & FB_MASK); \ if (n < 0) { \ if (lb != FbByteMaskInvalid) { \ if (rb == FbByteMaskInvalid) { \ lb = FbByteMaskInvalid; \ } else if (rb) { \ lb |= (rb - lb) << (FB_SHIFT - 3); \ rb = 0; \ } \ } \ n = 0; \ l &= r; \ r = 0; \ }\ } \ n >>= FB_SHIFT; \ } #define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \ switch (lb) { \ case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ break; \ case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ break; \ case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \ FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \ break; \ case sizeof (FbBits) - 3: \ FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \ case sizeof (FbBits) - 2: \ FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \ break; \ case sizeof (FbBits) - 1: \ FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \ break; \ default: \ WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \ break; \ } \ } #define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \ switch (rb) { \ case 1: \ FbStorePart(dst,0,CARD8,xor); \ break; \ case 2: \ FbStorePart(dst,0,CARD16,xor); \ break; \ case 3: \ FbStorePart(dst,0,CARD16,xor); \ FbStorePart(dst,2,CARD8,xor); \ break; \ default: \ WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \ } \ } #define FbMaskStip(x,w,l,n,r) { \ n = (w); \ r = FbRightStipMask((x)+n); \ l = FbLeftStipMask(x); \ if (l) { \ n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \ if (n < 0) { \ n = 0; \ l &= r; \ r = 0; \ } \ } \ n >>= FB_STIP_SHIFT; \ } /* * These macros are used to transparently stipple * in copy mode; the expected usage is with 'n' constant * so all of the conditional parts collapse into a minimal * sequence of partial word writes * * 'n' is the bytemask of which bytes to store, 'a' is the address * of the FbBits base unit, 'o' is the offset within that unit * * The term "lane" comes from the hardware term "byte-lane" which */ #define FbLaneCase1(n,a,o) \ if ((n) == 0x01) { \ WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), fgxor); \ } #define FbLaneCase2(n,a,o) \ if ((n) == 0x03) { \ WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), fgxor); \ } else { \ FbLaneCase1((n)&1,a,o) \ FbLaneCase1((n)>>1,a,(o)+1) \ } #define FbLaneCase4(n,a,o) \ if ((n) == 0x0f) { \ WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), fgxor); \ } else { \ FbLaneCase2((n)&3,a,o) \ FbLaneCase2((n)>>2,a,(o)+2) \ } #define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0) /* Macros for dealing with dashing */ #define FbDashDeclare \ unsigned char *__dash, *__firstDash, *__lastDash #define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \ (even) = TRUE; \ __firstDash = (pGC)->dash; \ __lastDash = __firstDash + (pGC)->numInDashList; \ (dashOffset) %= (pPriv)->dashLength; \ \ __dash = __firstDash; \ while ((dashOffset) >= ((dashlen) = *__dash)) \ { \ (dashOffset) -= (dashlen); \ (even) = 1-(even); \ if (++__dash == __lastDash) \ __dash = __firstDash; \ } \ (dashlen) -= (dashOffset); \ } #define FbDashNext(dashlen) { \ if (++__dash == __lastDash) \ __dash = __firstDash; \ (dashlen) = *__dash; \ } /* as numInDashList is always even, this case can skip a test */ #define FbDashNextEven(dashlen) { \ (dashlen) = *++__dash; \ } #define FbDashNextOdd(dashlen) FbDashNext(dashlen) #define FbDashStep(dashlen,even) { \ if (!--(dashlen)) { \ FbDashNext(dashlen); \ (even) = 1-(even); \ } \ } extern _X_EXPORT const GCOps fbGCOps; extern _X_EXPORT const GCFuncs fbGCFuncs; /* Framebuffer access wrapper */ typedef FbBits(*ReadMemoryProcPtr) (const void *src, int size); typedef void (*WriteMemoryProcPtr) (void *dst, FbBits value, int size); typedef void (*SetupWrapProcPtr) (ReadMemoryProcPtr * pRead, WriteMemoryProcPtr * pWrite, DrawablePtr pDraw); typedef void (*FinishWrapProcPtr) (DrawablePtr pDraw); #ifdef FB_ACCESS_WRAPPER #define fbPrepareAccess(pDraw) \ fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \ &wfbReadMemory, \ &wfbWriteMemory, \ (pDraw)) #define fbFinishAccess(pDraw) \ fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw) #else #define fbPrepareAccess(pPix) #define fbFinishAccess(pDraw) #endif extern _X_EXPORT DevPrivateKey fbGetScreenPrivateKey(void); /* private field of a screen */ typedef struct { #ifdef FB_ACCESS_WRAPPER SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */ FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */ #endif DevPrivateKeyRec gcPrivateKeyRec; DevPrivateKeyRec winPrivateKeyRec; } FbScreenPrivRec, *FbScreenPrivPtr; #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) /* private field of GC */ typedef struct { FbBits and, xor; /* reduced rop values */ FbBits bgand, bgxor; /* for stipples */ FbBits fg, bg, pm; /* expanded and filled */ unsigned int dashLength; /* total of all dash elements */ } FbGCPrivRec, *FbGCPrivPtr; #define fbGetGCPrivateKey(pGC) (&fbGetScreenPrivate((pGC)->pScreen)->gcPrivateKeyRec) #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey(pGC))) #define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) #define fbGetExpose(pGC) ((pGC)->fExpose) #define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) #define fbGetWinPrivateKey(pWin) (&fbGetScreenPrivate(((DrawablePtr) (pWin))->pScreen)->winPrivateKeyRec) #define fbGetWindowPixmap(pWin) ((PixmapPtr)\ dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey(pWin))) #define __fbPixDrawableX(pPix) ((pPix)->drawable.x) #define __fbPixDrawableY(pPix) ((pPix)->drawable.y) #ifdef COMPOSITE #define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x) #define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y) #else #define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix)) #define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix)) #endif #define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix)) #define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix)) #define fbGetDrawablePixmap(pDrawable, pixmap, xoff, yoff) { \ if ((pDrawable)->type != DRAWABLE_PIXMAP) { \ (pixmap) = fbGetWindowPixmap(pDrawable); \ (xoff) = __fbPixOffXWin(pixmap); \ (yoff) = __fbPixOffYWin(pixmap); \ } else { \ (pixmap) = (PixmapPtr) (pDrawable); \ (xoff) = __fbPixOffXPix(pixmap); \ (yoff) = __fbPixOffYPix(pixmap); \ } \ fbPrepareAccess(pDrawable); \ } #define fbGetPixmapBitsData(pixmap, pointer, stride, bpp) { \ (pointer) = (FbBits *) (pixmap)->devPrivate.ptr; \ (stride) = ((int) (pixmap)->devKind) / sizeof (FbBits); (void)(stride); \ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \ } #define fbGetPixmapStipData(pixmap, pointer, stride, bpp) { \ (pointer) = (FbStip *) (pixmap)->devPrivate.ptr; \ (stride) = ((int) (pixmap)->devKind) / sizeof (FbStip); (void)(stride); \ (bpp) = (pixmap)->drawable.bitsPerPixel; (void)(bpp); \ } #define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \ fbGetPixmapBitsData(_pPix, pointer, stride, bpp); \ } #define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \ PixmapPtr _pPix; \ fbGetDrawablePixmap(pDrawable, _pPix, xoff, yoff); \ fbGetPixmapStipData(_pPix, pointer, stride, bpp); \ } /* * XFree86 empties the root BorderClip when the VT is inactive, * here's a macro which uses that to disable GetImage and GetSpans */ #define fbWindowEnabled(pWin) \ RegionNotEmpty(&(pWin)->borderClip) #define fbDrawableEnabled(pDrawable) \ ((pDrawable)->type == DRAWABLE_PIXMAP ? \ TRUE : fbWindowEnabled((WindowPtr) pDrawable)) #define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0) /* * Accelerated tiles are power of 2 width <= FB_UNIT */ #define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w)) /* * fballpriv.c */ extern _X_EXPORT Bool fbAllocatePrivates(ScreenPtr pScreen); /* * fbarc.c */ extern _X_EXPORT void fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs); /* * fbbits.c */ extern _X_EXPORT void fbBresSolid8(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbBresDash8(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbDots8(FbBits * dst, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * pts, int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); extern _X_EXPORT void fbArc8(FbBits * dst, FbStride dstStride, int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); extern _X_EXPORT void fbGlyph8(FbBits * dstLine, FbStride dstStride, int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); extern _X_EXPORT void fbPolyline8(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); extern _X_EXPORT void fbPolySegment8(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); extern _X_EXPORT void fbBresSolid16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbBresDash16(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbDots16(FbBits * dst, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * pts, int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); extern _X_EXPORT void fbArc16(FbBits * dst, FbStride dstStride, int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); extern _X_EXPORT void fbGlyph16(FbBits * dstLine, FbStride dstStride, int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); extern _X_EXPORT void fbPolyline16(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); extern _X_EXPORT void fbPolySegment16(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); extern _X_EXPORT void fbBresSolid32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbBresDash32(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbDots32(FbBits * dst, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * pts, int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); extern _X_EXPORT void fbArc32(FbBits * dst, FbStride dstStride, int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); extern _X_EXPORT void fbGlyph32(FbBits * dstLine, FbStride dstStride, int dstBpp, FbStip * stipple, FbBits fg, int height, int shift); extern _X_EXPORT void fbPolyline32(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig); extern _X_EXPORT void fbPolySegment32(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); /* * fbblt.c */ extern _X_EXPORT void fbBlt(FbBits * src, FbStride srcStride, int srcX, FbBits * dst, FbStride dstStride, int dstX, int width, int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown); extern _X_EXPORT void fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */ int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */ int dstX, int width, int height, int alu, FbBits pm, int bpp); /* * fbbltone.c */ extern _X_EXPORT void fbBltOne(FbStip * src, FbStride srcStride, int srcX, FbBits * dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbBits fgand, FbBits fbxor, FbBits bgand, FbBits bgxor); extern _X_EXPORT void fbBltPlane(FbBits * src, FbStride srcStride, int srcX, int srcBpp, FbStip * dst, FbStride dstStride, int dstX, int width, int height, FbStip fgand, FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask); /* * fbcmap_mi.c */ extern _X_EXPORT int fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps); extern _X_EXPORT void fbInstallColormap(ColormapPtr pmap); extern _X_EXPORT void fbUninstallColormap(ColormapPtr pmap); extern _X_EXPORT void fbResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual); extern _X_EXPORT Bool fbInitializeColormap(ColormapPtr pmap); extern _X_EXPORT int fbExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs, xColorItem * outdefs); extern _X_EXPORT Bool fbCreateDefColormap(ScreenPtr pScreen); extern _X_EXPORT void fbClearVisualTypes(void); extern _X_EXPORT Bool fbSetVisualTypes(int depth, int visuals, int bitsPerRGB); extern _X_EXPORT Bool fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, Pixel redMask, Pixel greenMask, Pixel blueMask); extern _X_EXPORT Bool fbInitVisuals(VisualPtr * visualp, DepthPtr * depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB); /* * fbcopy.c */ extern _X_EXPORT void fbCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern _X_EXPORT void fbCopy1toN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern _X_EXPORT void fbCopyNto1(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern _X_EXPORT RegionPtr fbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut); extern _X_EXPORT RegionPtr fbCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut, unsigned long bitplane); /* * fbfill.c */ extern _X_EXPORT void fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height); extern _X_EXPORT void fbSolidBoxClipped(DrawablePtr pDrawable, RegionPtr pClip, int xa, int ya, int xb, int yb, FbBits and, FbBits xor); /* * fbfillrect.c */ extern _X_EXPORT void fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectInit, xRectangle *prectInit); #define fbPolyFillArc miPolyFillArc #define fbFillPolygon miFillPolygon /* * fbfillsp.c */ extern _X_EXPORT void fbFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted); /* * fbgc.c */ extern _X_EXPORT Bool fbCreateGC(GCPtr pGC); extern _X_EXPORT void fbPadPixmap(PixmapPtr pPixmap); extern _X_EXPORT void fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); /* * fbgetsp.c */ extern _X_EXPORT void fbGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart); /* * fbglyph.c */ extern _X_EXPORT void fbPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); extern _X_EXPORT void fbImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); /* * fbimage.c */ extern _X_EXPORT void fbPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage); extern _X_EXPORT void fbPutZImage(DrawablePtr pDrawable, RegionPtr pClip, int alu, FbBits pm, int x, int y, int width, int height, FbStip * src, FbStride srcStride); extern _X_EXPORT void fbPutXYImage(DrawablePtr pDrawable, RegionPtr pClip, FbBits fg, FbBits bg, FbBits pm, int alu, Bool opaque, int x, int y, int width, int height, FbStip * src, FbStride srcStride, int srcX); extern _X_EXPORT void fbGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d); /* * fbline.c */ extern _X_EXPORT void fbPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); extern _X_EXPORT void fbFixCoordModePrevious(int npt, DDXPointPtr ppt); extern _X_EXPORT void fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); #define fbPolyRectangle miPolyRectangle /* * fbpict.c */ extern _X_EXPORT Bool fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); extern _X_EXPORT void fbDestroyGlyphCache(void); /* * fbpixmap.c */ extern _X_EXPORT PixmapPtr fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint); extern _X_EXPORT Bool fbDestroyPixmap(PixmapPtr pPixmap); extern _X_EXPORT RegionPtr fbPixmapToRegion(PixmapPtr pPix); /* * fbpoint.c */ extern _X_EXPORT void fbPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, xPoint * pptInit); /* * fbpush.c */ extern _X_EXPORT void fbPushImage(DrawablePtr pDrawable, GCPtr pGC, FbStip * src, FbStride srcStride, int srcX, int x, int y, int width, int height); extern _X_EXPORT void fbPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg); /* * fbscreen.c */ extern _X_EXPORT Bool fbCloseScreen(ScreenPtr pScreen); extern _X_EXPORT Bool fbRealizeFont(ScreenPtr pScreen, FontPtr pFont); extern _X_EXPORT Bool fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); extern _X_EXPORT void fbQueryBestSize(int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen); extern _X_EXPORT PixmapPtr _fbGetWindowPixmap(WindowPtr pWindow); extern _X_EXPORT void _fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap); extern _X_EXPORT Bool fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */ int xsize, /* in pixels */ int ysize, int dpix, /* dots per inch */ int dpiy, int width, /* pixel width of frame buffer */ int bpp); /* bits per pixel of frame buffer */ #ifdef FB_ACCESS_WRAPPER extern _X_EXPORT Bool wfbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); extern _X_EXPORT Bool wfbScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap); #endif extern _X_EXPORT Bool fbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp); extern _X_EXPORT Bool fbScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp); /* * fbseg.c */ typedef void FbBres(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x, int y, int e, int e1, int e3, int len); extern _X_EXPORT void fbSegment(DrawablePtr pDrawable, GCPtr pGC, int xa, int ya, int xb, int yb, Bool drawLast, int *dashOffset); /* * fbsetsp.c */ extern _X_EXPORT void fbSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); /* * fbsolid.c */ extern _X_EXPORT void fbSolid(FbBits * dst, FbStride dstStride, int dstX, int bpp, int width, int height, FbBits and, FbBits xor); /* * fbutil.c */ extern _X_EXPORT FbBits fbReplicatePixel(Pixel p, int bpp); #ifdef FB_ACCESS_WRAPPER extern _X_EXPORT ReadMemoryProcPtr wfbReadMemory; extern _X_EXPORT WriteMemoryProcPtr wfbWriteMemory; #endif /* * fbwindow.c */ extern _X_EXPORT Bool fbCreateWindow(WindowPtr pWin); extern _X_EXPORT Bool fbDestroyWindow(WindowPtr pWin); extern _X_EXPORT Bool fbRealizeWindow(WindowPtr pWindow); extern _X_EXPORT Bool fbPositionWindow(WindowPtr pWin, int x, int y); extern _X_EXPORT Bool fbUnrealizeWindow(WindowPtr pWindow); extern _X_EXPORT void fbCopyWindowProc(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern _X_EXPORT void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern _X_EXPORT Bool fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask); extern _X_EXPORT void fbFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, FbBits and, FbBits xor); extern _X_EXPORT pixman_image_t *image_from_pict(PicturePtr pict, Bool has_clip, int *xoff, int *yoff); extern _X_EXPORT void free_pixman_pict(PicturePtr, pixman_image_t *); #endif /* _FB_H_ */ xorg-server-21.1.16/fb/fbrop.h0000644000175000017500000001055614757411105011512 /* * Copyright © 1998 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. */ #ifndef _FBROP_H_ #define _FBROP_H_ typedef struct _mergeRopBits { FbBits ca1, cx1, ca2, cx2; } FbMergeRopRec, *FbMergeRopPtr; extern _X_EXPORT const FbMergeRopRec FbMergeRopBits[16]; #define FbDeclareMergeRop() FbBits _ca1, _cx1, _ca2, _cx2; #define FbDeclarePrebuiltMergeRop() FbBits _cca, _ccx; #define FbInitializeMergeRop(alu,pm) {\ const FbMergeRopRec *_bits; \ _bits = &FbMergeRopBits[alu]; \ _ca1 = _bits->ca1 & pm; \ _cx1 = _bits->cx1 | ~pm; \ _ca2 = _bits->ca2 & pm; \ _cx2 = _bits->cx2 & pm; \ } #define FbDestInvarientRop(alu,pm) ((pm) == FB_ALLONES && \ (((alu) >> 1 & 5) == ((alu) & 5))) #define FbDestInvarientMergeRop() (_ca1 == 0 && _cx1 == 0) /* AND has higher precedence than XOR */ #define FbDoMergeRop(src, dst) \ (((dst) & (((src) & _ca1) ^ _cx1)) ^ (((src) & _ca2) ^ _cx2)) #define FbDoDestInvarientMergeRop(src) (((src) & _ca2) ^ _cx2) #define FbDoMaskMergeRop(src, dst, mask) \ (((dst) & ((((src) & _ca1) ^ _cx1) | ~(mask))) ^ ((((src) & _ca2) ^ _cx2) & (mask))) #define FbDoLeftMaskByteMergeRop(dst, src, lb, l) { \ FbBits __xor = ((src) & _ca2) ^ _cx2; \ FbDoLeftMaskByteRRop(dst,lb,l,((src) & _ca1) ^ _cx1,__xor); \ } #define FbDoRightMaskByteMergeRop(dst, src, rb, r) { \ FbBits __xor = ((src) & _ca2) ^ _cx2; \ FbDoRightMaskByteRRop(dst,rb,r,((src) & _ca1) ^ _cx1,__xor); \ } #define FbDoRRop(dst, and, xor) (((dst) & (and)) ^ (xor)) #define FbDoMaskRRop(dst, and, xor, mask) \ (((dst) & ((and) | ~(mask))) ^ (xor & mask)) /* * Take a single bit (0 or 1) and generate a full mask */ #define fbFillFromBit(b,t) (~((t) ((b) & 1)-1)) #define fbXorT(rop,fg,pm,t) ((((fg) & fbFillFromBit((rop) >> 1,t)) | \ (~(fg) & fbFillFromBit((rop) >> 3,t))) & (pm)) #define fbAndT(rop,fg,pm,t) ((((fg) & fbFillFromBit (rop ^ (rop>>1),t)) | \ (~(fg) & fbFillFromBit((rop>>2) ^ (rop>>3),t))) | \ ~(pm)) #define fbXor(rop,fg,pm) fbXorT(rop,fg,pm,FbBits) #define fbAnd(rop,fg,pm) fbAndT(rop,fg,pm,FbBits) #define fbXorStip(rop,fg,pm) fbXorT(rop,fg,pm,FbStip) #define fbAndStip(rop,fg,pm) fbAndT(rop,fg,pm,FbStip) /* * Stippling operations; */ #define FbStippleRRop(dst, b, fa, fx, ba, bx) \ (FbDoRRop(dst, fa, fx) & b) | (FbDoRRop(dst, ba, bx) & ~b) #define FbStippleRRopMask(dst, b, fa, fx, ba, bx, m) \ (FbDoMaskRRop(dst, fa, fx, m) & (b)) | (FbDoMaskRRop(dst, ba, bx, m) & ~(b)) #define FbDoLeftMaskByteStippleRRop(dst, b, fa, fx, ba, bx, lb, l) { \ FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ FbDoLeftMaskByteRRop(dst, lb, l, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ } #define FbDoRightMaskByteStippleRRop(dst, b, fa, fx, ba, bx, rb, r) { \ FbBits __xor = ((fx) & (b)) | ((bx) & ~(b)); \ FbDoRightMaskByteRRop(dst, rb, r, ((fa) & (b)) | ((ba) & ~(b)), __xor); \ } #define FbOpaqueStipple(b, fg, bg) (((fg) & (b)) | ((bg) & ~(b))) /* * Compute rop for using tile code for 1-bit dest stipples; modifies * existing rop to flip depending on pixel values */ #define FbStipple1RopPick(alu,b) (((alu) >> (2 - (((b) & 1) << 1))) & 3) #define FbOpaqueStipple1Rop(alu,fg,bg) (FbStipple1RopPick(alu,fg) | \ (FbStipple1RopPick(alu,bg) << 2)) #define FbStipple1Rop(alu,fg) (FbStipple1RopPick(alu,fg) | 4) #endif xorg-server-21.1.16/fb/fboverlay.h0000644000175000017500000000672314757411105012374 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _FBOVERLAY_H_ #define _FBOVERLAY_H_ #include "privates.h" extern _X_EXPORT DevPrivateKey fbOverlayGetScreenPrivateKey(void); #ifndef FB_OVERLAY_MAX #define FB_OVERLAY_MAX 2 #endif typedef void (*fbOverlayPaintKeyProc) (DrawablePtr, RegionPtr, CARD32, int); typedef struct _fbOverlayLayer { union { struct { void *pbits; int width; int depth; } init; struct { PixmapPtr pixmap; RegionRec region; } run; } u; CARD32 key; /* special pixel value */ } FbOverlayLayer; typedef struct _fbOverlayScrPriv { int nlayers; fbOverlayPaintKeyProc PaintKey; miCopyProc CopyWindow; FbOverlayLayer layer[FB_OVERLAY_MAX]; } FbOverlayScrPrivRec, *FbOverlayScrPrivPtr; #define fbOverlayGetScrPriv(s) \ dixLookupPrivate(&(s)->devPrivates, fbOverlayGetScreenPrivateKey()) extern _X_EXPORT Bool fbOverlayCreateWindow(WindowPtr pWin); extern _X_EXPORT Bool fbOverlayCloseScreen(ScreenPtr pScreen); extern _X_EXPORT int fbOverlayWindowLayer(WindowPtr pWin); extern _X_EXPORT Bool fbOverlayCreateScreenResources(ScreenPtr pScreen); extern _X_EXPORT void fbOverlayPaintKey(DrawablePtr pDrawable, RegionPtr pRegion, CARD32 pixel, int layer); extern _X_EXPORT void fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn); extern _X_EXPORT void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern _X_EXPORT void fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool fbOverlaySetupScreen(ScreenPtr pScreen, void *pbits1, void *pbits2, int xsize, int ysize, int dpix, int dpiy, int width1, int width2, int bpp1, int bpp2); extern _X_EXPORT Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, void *pbits1, void *pbits2, int xsize, int ysize, int dpix, int dpiy, int width1, int width2, int bpp1, int bpp2, int depth1, int depth2); #endif /* _FBOVERLAY_H_ */ xorg-server-21.1.16/fb/wfbrename.h0000644000175000017500000001136514757411105012347 #define fbAddTraps wfbAddTraps #define fbAddTriangles wfbAddTriangles #define fbAllocatePrivates wfbAllocatePrivates #define fbArc16 wfbArc16 #define fbArc32 wfbArc32 #define fbArc8 wfbArc8 #define fbBlt wfbBlt #define fbBltOne wfbBltOne #define fbBltPlane wfbBltPlane #define fbBltStip wfbBltStip #define fbBres wfbBres #define fbBresDash wfbBresDash #define fbBresDash16 wfbBresDash16 #define fbBresDash32 wfbBresDash32 #define fbBresDash8 wfbBresDash8 #define fbBresFill wfbBresFill #define fbBresFillDash wfbBresFillDash #define fbBresSolid wfbBresSolid #define fbBresSolid16 wfbBresSolid16 #define fbBresSolid32 wfbBresSolid32 #define fbBresSolid8 wfbBresSolid8 #define fbChangeWindowAttributes wfbChangeWindowAttributes #define fbClearVisualTypes wfbClearVisualTypes #define fbCloseScreen wfbCloseScreen #define fbComposite wfbComposite #define fbCopy1toN wfbCopy1toN #define fbCopyArea wfbCopyArea #define fbCopyNto1 wfbCopyNto1 #define fbCopyNtoN wfbCopyNtoN #define fbCopyPlane wfbCopyPlane #define fbCopyRegion wfbCopyRegion #define fbCopyWindow wfbCopyWindow #define fbCopyWindowProc wfbCopyWindowProc #define fbCreateDefColormap wfbCreateDefColormap #define fbCreateGC wfbCreateGC #define fbCreatePixmap wfbCreatePixmap #define fbCreateWindow wfbCreateWindow #define fbDestroyGlyphCache wfbDestroyGlyphCache #define fbDestroyPixmap wfbDestroyPixmap #define fbDestroyWindow wfbDestroyWindow #define fbDoCopy wfbDoCopy #define fbDots wfbDots #define fbDots16 wfbDots16 #define fbDots32 wfbDots32 #define fbDots8 wfbDots8 #define fbExpandDirectColors wfbExpandDirectColors #define fbFill wfbFill #define fbFillRegionSolid wfbFillRegionSolid #define fbFillSpans wfbFillSpans #define fbFixCoordModePrevious wfbFixCoordModePrevious #define fbGCFuncs wfbGCFuncs #define fbGCOps wfbGCOps #define fbGeneration wfbGeneration #define fbGetImage wfbGetImage #define fbGetScreenPrivateKey wfbGetScreenPrivateKey #define fbGetSpans wfbGetSpans #define _fbGetWindowPixmap _wfbGetWindowPixmap #define fbGlyph16 wfbGlyph16 #define fbGlyph32 wfbGlyph32 #define fbGlyph8 wfbGlyph8 #define fbGlyphs wfbGlyphs #define fbImageGlyphBlt wfbImageGlyphBlt #define fbIn wfbIn #define fbInitializeColormap wfbInitializeColormap #define fbInitVisuals wfbInitVisuals #define fbListInstalledColormaps wfbListInstalledColormaps #define FbMergeRopBits wFbMergeRopBits #define fbOver wfbOver #define fbOverlayCloseScreen wfbOverlayCloseScreen #define fbOverlayCopyWindow wfbOverlayCopyWindow #define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources #define fbOverlayCreateWindow wfbOverlayCreateWindow #define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit #define fbOverlayGeneration wfbOverlayGeneration #define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey #define fbOverlayPaintKey wfbOverlayPaintKey #define fbOverlaySetupScreen wfbOverlaySetupScreen #define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion #define fbOverlayWindowExposures wfbOverlayWindowExposures #define fbOverlayWindowLayer wfbOverlayWindowLayer #define fbPadPixmap wfbPadPixmap #define fbPictureInit wfbPictureInit #define fbPixmapToRegion wfbPixmapToRegion #define fbPolyArc wfbPolyArc #define fbPolyFillRect wfbPolyFillRect #define fbPolyGlyphBlt wfbPolyGlyphBlt #define fbPolyLine wfbPolyLine #define fbPolyline16 wfbPolyline16 #define fbPolyline32 wfbPolyline32 #define fbPolyline8 wfbPolyline8 #define fbPolyPoint wfbPolyPoint #define fbPolySegment wfbPolySegment #define fbPolySegment16 wfbPolySegment16 #define fbPolySegment32 wfbPolySegment32 #define fbPolySegment8 wfbPolySegment8 #define fbPositionWindow wfbPositionWindow #define fbPushFill wfbPushFill #define fbPushImage wfbPushImage #define fbPushPattern wfbPushPattern #define fbPushPixels wfbPushPixels #define fbPutImage wfbPutImage #define fbPutXYImage wfbPutXYImage #define fbPutZImage wfbPutZImage #define fbQueryBestSize wfbQueryBestSize #define fbRasterizeTrapezoid wfbRasterizeTrapezoid #define fbRealizeFont wfbRealizeFont #define fbReplicatePixel wfbReplicatePixel #define fbResolveColor wfbResolveColor #define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec #define fbSegment wfbSegment #define fbSelectBres wfbSelectBres #define fbSetSpans wfbSetSpans #define fbSetupScreen wfbSetupScreen #define fbSetVisualTypes wfbSetVisualTypes #define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks #define _fbSetWindowPixmap _wfbSetWindowPixmap #define fbSolid wfbSolid #define fbSolidBoxClipped wfbSolidBoxClipped #define fbTrapezoids wfbTrapezoids #define fbTriangles wfbTriangles #define fbUninstallColormap wfbUninstallColormap #define fbUnrealizeWindow wfbUnrealizeWindow #define fbUnrealizeFont wfbUnrealizeFont #define fbValidateGC wfbValidateGC #define fbWinPrivateKeyRec wfbWinPrivateKeyRec #define free_pixman_pict wfb_free_pixman_pict #define image_from_pict wfb_image_from_pict xorg-server-21.1.16/fb/fbpict.h0000644000175000017500000000507414757411105011650 /* * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #ifndef _FBPICT_H_ #define _FBPICT_H_ /* fbpict.c */ extern _X_EXPORT void fbComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); /* fbtrap.c */ extern _X_EXPORT void fbAddTraps(PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap * traps); extern _X_EXPORT void fbRasterizeTrapezoid(PicturePtr alpha, xTrapezoid * trap, int x_off, int y_off); extern _X_EXPORT void fbAddTriangles(PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntri, xTriangle * tris); extern _X_EXPORT void fbTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps); extern _X_EXPORT void fbTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris); extern _X_EXPORT void fbGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr *glyphs); #endif /* _FBPICT_H_ */ xorg-server-21.1.16/fb/Makefile.in0000644000175000017500000027406414757411114012304 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = fb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libfb_la_OBJECTS = libfb_la-fballpriv.lo libfb_la-fbarc.lo \ libfb_la-fbbits.lo libfb_la-fbblt.lo libfb_la-fbbltone.lo \ libfb_la-fbcmap_mi.lo libfb_la-fbcopy.lo libfb_la-fbfill.lo \ libfb_la-fbfillrect.lo libfb_la-fbfillsp.lo libfb_la-fbgc.lo \ libfb_la-fbgetsp.lo libfb_la-fbglyph.lo libfb_la-fbimage.lo \ libfb_la-fbline.lo libfb_la-fboverlay.lo libfb_la-fbpict.lo \ libfb_la-fbpixmap.lo libfb_la-fbpoint.lo libfb_la-fbpush.lo \ libfb_la-fbscreen.lo libfb_la-fbseg.lo libfb_la-fbsetsp.lo \ libfb_la-fbsolid.lo libfb_la-fbtrap.lo libfb_la-fbutil.lo \ libfb_la-fbwindow.lo libfb_la_OBJECTS = $(am_libfb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfb_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libwfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libwfb_la-fballpriv.lo libwfb_la-fbarc.lo \ libwfb_la-fbbits.lo libwfb_la-fbblt.lo libwfb_la-fbbltone.lo \ libwfb_la-fbcmap_mi.lo libwfb_la-fbcopy.lo libwfb_la-fbfill.lo \ libwfb_la-fbfillrect.lo libwfb_la-fbfillsp.lo \ libwfb_la-fbgc.lo libwfb_la-fbgetsp.lo libwfb_la-fbglyph.lo \ libwfb_la-fbimage.lo libwfb_la-fbline.lo \ libwfb_la-fboverlay.lo libwfb_la-fbpict.lo \ libwfb_la-fbpixmap.lo libwfb_la-fbpoint.lo libwfb_la-fbpush.lo \ libwfb_la-fbscreen.lo libwfb_la-fbseg.lo libwfb_la-fbsetsp.lo \ libwfb_la-fbsolid.lo libwfb_la-fbtrap.lo libwfb_la-fbutil.lo \ libwfb_la-fbwindow.lo am_libwfb_la_OBJECTS = $(am__objects_1) libwfb_la_OBJECTS = $(am_libwfb_la_OBJECTS) libwfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libwfb_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libfb_la-fballpriv.Plo \ ./$(DEPDIR)/libfb_la-fbarc.Plo ./$(DEPDIR)/libfb_la-fbbits.Plo \ ./$(DEPDIR)/libfb_la-fbblt.Plo \ ./$(DEPDIR)/libfb_la-fbbltone.Plo \ ./$(DEPDIR)/libfb_la-fbcmap_mi.Plo \ ./$(DEPDIR)/libfb_la-fbcopy.Plo \ ./$(DEPDIR)/libfb_la-fbfill.Plo \ ./$(DEPDIR)/libfb_la-fbfillrect.Plo \ ./$(DEPDIR)/libfb_la-fbfillsp.Plo \ ./$(DEPDIR)/libfb_la-fbgc.Plo ./$(DEPDIR)/libfb_la-fbgetsp.Plo \ ./$(DEPDIR)/libfb_la-fbglyph.Plo \ ./$(DEPDIR)/libfb_la-fbimage.Plo \ ./$(DEPDIR)/libfb_la-fbline.Plo \ ./$(DEPDIR)/libfb_la-fboverlay.Plo \ ./$(DEPDIR)/libfb_la-fbpict.Plo \ ./$(DEPDIR)/libfb_la-fbpixmap.Plo \ ./$(DEPDIR)/libfb_la-fbpoint.Plo \ ./$(DEPDIR)/libfb_la-fbpush.Plo \ ./$(DEPDIR)/libfb_la-fbscreen.Plo \ ./$(DEPDIR)/libfb_la-fbseg.Plo \ ./$(DEPDIR)/libfb_la-fbsetsp.Plo \ ./$(DEPDIR)/libfb_la-fbsolid.Plo \ ./$(DEPDIR)/libfb_la-fbtrap.Plo \ ./$(DEPDIR)/libfb_la-fbutil.Plo \ ./$(DEPDIR)/libfb_la-fbwindow.Plo \ ./$(DEPDIR)/libwfb_la-fballpriv.Plo \ ./$(DEPDIR)/libwfb_la-fbarc.Plo \ ./$(DEPDIR)/libwfb_la-fbbits.Plo \ ./$(DEPDIR)/libwfb_la-fbblt.Plo \ ./$(DEPDIR)/libwfb_la-fbbltone.Plo \ ./$(DEPDIR)/libwfb_la-fbcmap_mi.Plo \ ./$(DEPDIR)/libwfb_la-fbcopy.Plo \ ./$(DEPDIR)/libwfb_la-fbfill.Plo \ ./$(DEPDIR)/libwfb_la-fbfillrect.Plo \ ./$(DEPDIR)/libwfb_la-fbfillsp.Plo \ ./$(DEPDIR)/libwfb_la-fbgc.Plo \ ./$(DEPDIR)/libwfb_la-fbgetsp.Plo \ ./$(DEPDIR)/libwfb_la-fbglyph.Plo \ ./$(DEPDIR)/libwfb_la-fbimage.Plo \ ./$(DEPDIR)/libwfb_la-fbline.Plo \ ./$(DEPDIR)/libwfb_la-fboverlay.Plo \ ./$(DEPDIR)/libwfb_la-fbpict.Plo \ ./$(DEPDIR)/libwfb_la-fbpixmap.Plo \ ./$(DEPDIR)/libwfb_la-fbpoint.Plo \ ./$(DEPDIR)/libwfb_la-fbpush.Plo \ ./$(DEPDIR)/libwfb_la-fbscreen.Plo \ ./$(DEPDIR)/libwfb_la-fbseg.Plo \ ./$(DEPDIR)/libwfb_la-fbsetsp.Plo \ ./$(DEPDIR)/libwfb_la-fbsolid.Plo \ ./$(DEPDIR)/libwfb_la-fbtrap.Plo \ ./$(DEPDIR)/libwfb_la-fbutil.Plo \ ./$(DEPDIR)/libwfb_la-fbwindow.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) DIST_SOURCES = $(libfb_la_SOURCES) $(libwfb_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libfb.la libwfb.la AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h libfb_la_CFLAGS = $(AM_CFLAGS) libfb_la_LIBADD = $(PIXMAN_LIBS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libwfb_la_LIBADD = $(PIXMAN_LIBS) libfb_la_SOURCES = \ fb.h \ fballpriv.c \ fbarc.c \ fbbits.c \ fbbits.h \ fbblt.c \ fbbltone.c \ fbcmap_mi.c \ fbcopy.c \ fbfill.c \ fbfillrect.c \ fbfillsp.c \ fbgc.c \ fbgetsp.c \ fbglyph.c \ fbimage.c \ fbline.c \ fboverlay.c \ fboverlay.h \ fbpict.c \ fbpict.h \ fbpixmap.c \ fbpoint.c \ fbpush.c \ fbrop.h \ fbscreen.c \ fbseg.c \ fbsetsp.c \ fbsolid.c \ fbtrap.c \ fbutil.c \ fbwindow.c libwfb_la_SOURCES = $(libfb_la_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign fb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign fb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfb.la: $(libfb_la_OBJECTS) $(libfb_la_DEPENDENCIES) $(EXTRA_libfb_la_DEPENDENCIES) $(AM_V_CCLD)$(libfb_la_LINK) $(libfb_la_OBJECTS) $(libfb_la_LIBADD) $(LIBS) libwfb.la: $(libwfb_la_OBJECTS) $(libwfb_la_DEPENDENCIES) $(EXTRA_libwfb_la_DEPENDENCIES) $(AM_V_CCLD)$(libwfb_la_LINK) $(libwfb_la_OBJECTS) $(libwfb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fballpriv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbits.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbblt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbbltone.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbcmap_mi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbcopy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfill.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillrect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbfillsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbgetsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbglyph.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbimage.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbline.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fboverlay.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpict.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpixmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpoint.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbpush.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbscreen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbseg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsetsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbsolid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbtrap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbwindow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fballpriv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbits.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbblt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbbltone.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbcmap_mi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbcopy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfill.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillrect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbfillsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbgetsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbglyph.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbimage.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbline.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fboverlay.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpict.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpixmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpoint.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbpush.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbscreen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbseg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsetsp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbsolid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbtrap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbutil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbwindow.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libfb_la-fballpriv.lo: fballpriv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libfb_la-fballpriv.Tpo -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fballpriv.Tpo $(DEPDIR)/libfb_la-fballpriv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fballpriv.c' object='libfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c libfb_la-fbarc.lo: fbarc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbarc.Tpo -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbarc.Tpo $(DEPDIR)/libfb_la-fbarc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbarc.c' object='libfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c libfb_la-fbbits.lo: fbbits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbits.Tpo -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbbits.Tpo $(DEPDIR)/libfb_la-fbbits.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbits.c' object='libfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c libfb_la-fbblt.lo: fbblt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbblt.Tpo -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbblt.Tpo $(DEPDIR)/libfb_la-fbblt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbblt.c' object='libfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c libfb_la-fbbltone.lo: fbbltone.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbbltone.Tpo -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbbltone.Tpo $(DEPDIR)/libfb_la-fbbltone.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbltone.c' object='libfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c libfb_la-fbcmap_mi.lo: fbcmap_mi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbcmap_mi.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbcmap_mi.Tpo -c -o libfb_la-fbcmap_mi.lo `test -f 'fbcmap_mi.c' || echo '$(srcdir)/'`fbcmap_mi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbcmap_mi.Tpo $(DEPDIR)/libfb_la-fbcmap_mi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcmap_mi.c' object='libfb_la-fbcmap_mi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbcmap_mi.lo `test -f 'fbcmap_mi.c' || echo '$(srcdir)/'`fbcmap_mi.c libfb_la-fbcopy.lo: fbcopy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbcopy.Tpo -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbcopy.Tpo $(DEPDIR)/libfb_la-fbcopy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcopy.c' object='libfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c libfb_la-fbfill.lo: fbfill.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfill.Tpo -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfill.Tpo $(DEPDIR)/libfb_la-fbfill.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfill.c' object='libfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c libfb_la-fbfillrect.lo: fbfillrect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillrect.Tpo -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfillrect.Tpo $(DEPDIR)/libfb_la-fbfillrect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillrect.c' object='libfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c libfb_la-fbfillsp.lo: fbfillsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbfillsp.Tpo -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbfillsp.Tpo $(DEPDIR)/libfb_la-fbfillsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillsp.c' object='libfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c libfb_la-fbgc.lo: fbgc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgc.Tpo -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbgc.Tpo $(DEPDIR)/libfb_la-fbgc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgc.c' object='libfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c libfb_la-fbgetsp.lo: fbgetsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbgetsp.Tpo -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbgetsp.Tpo $(DEPDIR)/libfb_la-fbgetsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgetsp.c' object='libfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c libfb_la-fbglyph.lo: fbglyph.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbglyph.Tpo -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbglyph.Tpo $(DEPDIR)/libfb_la-fbglyph.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbglyph.c' object='libfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c libfb_la-fbimage.lo: fbimage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbimage.Tpo -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbimage.Tpo $(DEPDIR)/libfb_la-fbimage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbimage.c' object='libfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c libfb_la-fbline.lo: fbline.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbline.Tpo -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbline.Tpo $(DEPDIR)/libfb_la-fbline.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbline.c' object='libfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c libfb_la-fboverlay.lo: fboverlay.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libfb_la-fboverlay.Tpo -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fboverlay.Tpo $(DEPDIR)/libfb_la-fboverlay.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fboverlay.c' object='libfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c libfb_la-fbpict.lo: fbpict.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpict.Tpo -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpict.Tpo $(DEPDIR)/libfb_la-fbpict.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpict.c' object='libfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c libfb_la-fbpixmap.lo: fbpixmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpixmap.Tpo -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpixmap.Tpo $(DEPDIR)/libfb_la-fbpixmap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpixmap.c' object='libfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c libfb_la-fbpoint.lo: fbpoint.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpoint.Tpo -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpoint.Tpo $(DEPDIR)/libfb_la-fbpoint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpoint.c' object='libfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c libfb_la-fbpush.lo: fbpush.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbpush.Tpo -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbpush.Tpo $(DEPDIR)/libfb_la-fbpush.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpush.c' object='libfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c libfb_la-fbscreen.lo: fbscreen.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbscreen.Tpo -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbscreen.Tpo $(DEPDIR)/libfb_la-fbscreen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbscreen.c' object='libfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c libfb_la-fbseg.lo: fbseg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbseg.Tpo -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbseg.Tpo $(DEPDIR)/libfb_la-fbseg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbseg.c' object='libfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c libfb_la-fbsetsp.lo: fbsetsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsetsp.Tpo -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbsetsp.Tpo $(DEPDIR)/libfb_la-fbsetsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsetsp.c' object='libfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c libfb_la-fbsolid.lo: fbsolid.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbsolid.Tpo -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbsolid.Tpo $(DEPDIR)/libfb_la-fbsolid.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsolid.c' object='libfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c libfb_la-fbtrap.lo: fbtrap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbtrap.Tpo -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbtrap.Tpo $(DEPDIR)/libfb_la-fbtrap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtrap.c' object='libfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c libfb_la-fbutil.lo: fbutil.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbutil.Tpo -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbutil.Tpo $(DEPDIR)/libfb_la-fbutil.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbutil.c' object='libfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c libfb_la-fbwindow.lo: fbwindow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbwindow.Tpo -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbwindow.Tpo $(DEPDIR)/libfb_la-fbwindow.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbwindow.c' object='libfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfb_la_CFLAGS) $(CFLAGS) -c -o libfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c libwfb_la-fballpriv.lo: fballpriv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fballpriv.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fballpriv.Tpo -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fballpriv.Tpo $(DEPDIR)/libwfb_la-fballpriv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fballpriv.c' object='libwfb_la-fballpriv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fballpriv.lo `test -f 'fballpriv.c' || echo '$(srcdir)/'`fballpriv.c libwfb_la-fbarc.lo: fbarc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbarc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbarc.Tpo -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbarc.Tpo $(DEPDIR)/libwfb_la-fbarc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbarc.c' object='libwfb_la-fbarc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbarc.lo `test -f 'fbarc.c' || echo '$(srcdir)/'`fbarc.c libwfb_la-fbbits.lo: fbbits.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbits.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbits.Tpo -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbbits.Tpo $(DEPDIR)/libwfb_la-fbbits.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbits.c' object='libwfb_la-fbbits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbits.lo `test -f 'fbbits.c' || echo '$(srcdir)/'`fbbits.c libwfb_la-fbblt.lo: fbblt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbblt.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbblt.Tpo -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbblt.Tpo $(DEPDIR)/libwfb_la-fbblt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbblt.c' object='libwfb_la-fbblt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbblt.lo `test -f 'fbblt.c' || echo '$(srcdir)/'`fbblt.c libwfb_la-fbbltone.lo: fbbltone.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbbltone.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbbltone.Tpo -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbbltone.Tpo $(DEPDIR)/libwfb_la-fbbltone.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbbltone.c' object='libwfb_la-fbbltone.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbbltone.lo `test -f 'fbbltone.c' || echo '$(srcdir)/'`fbbltone.c libwfb_la-fbcmap_mi.lo: fbcmap_mi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbcmap_mi.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbcmap_mi.Tpo -c -o libwfb_la-fbcmap_mi.lo `test -f 'fbcmap_mi.c' || echo '$(srcdir)/'`fbcmap_mi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbcmap_mi.Tpo $(DEPDIR)/libwfb_la-fbcmap_mi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcmap_mi.c' object='libwfb_la-fbcmap_mi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbcmap_mi.lo `test -f 'fbcmap_mi.c' || echo '$(srcdir)/'`fbcmap_mi.c libwfb_la-fbcopy.lo: fbcopy.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbcopy.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbcopy.Tpo -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbcopy.Tpo $(DEPDIR)/libwfb_la-fbcopy.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbcopy.c' object='libwfb_la-fbcopy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbcopy.lo `test -f 'fbcopy.c' || echo '$(srcdir)/'`fbcopy.c libwfb_la-fbfill.lo: fbfill.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfill.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfill.Tpo -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfill.Tpo $(DEPDIR)/libwfb_la-fbfill.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfill.c' object='libwfb_la-fbfill.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfill.lo `test -f 'fbfill.c' || echo '$(srcdir)/'`fbfill.c libwfb_la-fbfillrect.lo: fbfillrect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillrect.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillrect.Tpo -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfillrect.Tpo $(DEPDIR)/libwfb_la-fbfillrect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillrect.c' object='libwfb_la-fbfillrect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillrect.lo `test -f 'fbfillrect.c' || echo '$(srcdir)/'`fbfillrect.c libwfb_la-fbfillsp.lo: fbfillsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbfillsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbfillsp.Tpo -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbfillsp.Tpo $(DEPDIR)/libwfb_la-fbfillsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbfillsp.c' object='libwfb_la-fbfillsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbfillsp.lo `test -f 'fbfillsp.c' || echo '$(srcdir)/'`fbfillsp.c libwfb_la-fbgc.lo: fbgc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgc.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgc.Tpo -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbgc.Tpo $(DEPDIR)/libwfb_la-fbgc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgc.c' object='libwfb_la-fbgc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgc.lo `test -f 'fbgc.c' || echo '$(srcdir)/'`fbgc.c libwfb_la-fbgetsp.lo: fbgetsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbgetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbgetsp.Tpo -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbgetsp.Tpo $(DEPDIR)/libwfb_la-fbgetsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbgetsp.c' object='libwfb_la-fbgetsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbgetsp.lo `test -f 'fbgetsp.c' || echo '$(srcdir)/'`fbgetsp.c libwfb_la-fbglyph.lo: fbglyph.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbglyph.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbglyph.Tpo -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbglyph.Tpo $(DEPDIR)/libwfb_la-fbglyph.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbglyph.c' object='libwfb_la-fbglyph.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbglyph.lo `test -f 'fbglyph.c' || echo '$(srcdir)/'`fbglyph.c libwfb_la-fbimage.lo: fbimage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbimage.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbimage.Tpo -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbimage.Tpo $(DEPDIR)/libwfb_la-fbimage.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbimage.c' object='libwfb_la-fbimage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbimage.lo `test -f 'fbimage.c' || echo '$(srcdir)/'`fbimage.c libwfb_la-fbline.lo: fbline.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbline.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbline.Tpo -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbline.Tpo $(DEPDIR)/libwfb_la-fbline.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbline.c' object='libwfb_la-fbline.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbline.lo `test -f 'fbline.c' || echo '$(srcdir)/'`fbline.c libwfb_la-fboverlay.lo: fboverlay.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fboverlay.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fboverlay.Tpo -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fboverlay.Tpo $(DEPDIR)/libwfb_la-fboverlay.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fboverlay.c' object='libwfb_la-fboverlay.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fboverlay.lo `test -f 'fboverlay.c' || echo '$(srcdir)/'`fboverlay.c libwfb_la-fbpict.lo: fbpict.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpict.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpict.Tpo -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpict.Tpo $(DEPDIR)/libwfb_la-fbpict.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpict.c' object='libwfb_la-fbpict.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpict.lo `test -f 'fbpict.c' || echo '$(srcdir)/'`fbpict.c libwfb_la-fbpixmap.lo: fbpixmap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpixmap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpixmap.Tpo -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpixmap.Tpo $(DEPDIR)/libwfb_la-fbpixmap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpixmap.c' object='libwfb_la-fbpixmap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpixmap.lo `test -f 'fbpixmap.c' || echo '$(srcdir)/'`fbpixmap.c libwfb_la-fbpoint.lo: fbpoint.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpoint.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpoint.Tpo -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpoint.Tpo $(DEPDIR)/libwfb_la-fbpoint.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpoint.c' object='libwfb_la-fbpoint.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpoint.lo `test -f 'fbpoint.c' || echo '$(srcdir)/'`fbpoint.c libwfb_la-fbpush.lo: fbpush.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbpush.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbpush.Tpo -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbpush.Tpo $(DEPDIR)/libwfb_la-fbpush.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbpush.c' object='libwfb_la-fbpush.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbpush.lo `test -f 'fbpush.c' || echo '$(srcdir)/'`fbpush.c libwfb_la-fbscreen.lo: fbscreen.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbscreen.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbscreen.Tpo -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbscreen.Tpo $(DEPDIR)/libwfb_la-fbscreen.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbscreen.c' object='libwfb_la-fbscreen.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbscreen.lo `test -f 'fbscreen.c' || echo '$(srcdir)/'`fbscreen.c libwfb_la-fbseg.lo: fbseg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbseg.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbseg.Tpo -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbseg.Tpo $(DEPDIR)/libwfb_la-fbseg.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbseg.c' object='libwfb_la-fbseg.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbseg.lo `test -f 'fbseg.c' || echo '$(srcdir)/'`fbseg.c libwfb_la-fbsetsp.lo: fbsetsp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsetsp.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsetsp.Tpo -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbsetsp.Tpo $(DEPDIR)/libwfb_la-fbsetsp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsetsp.c' object='libwfb_la-fbsetsp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsetsp.lo `test -f 'fbsetsp.c' || echo '$(srcdir)/'`fbsetsp.c libwfb_la-fbsolid.lo: fbsolid.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbsolid.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbsolid.Tpo -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbsolid.Tpo $(DEPDIR)/libwfb_la-fbsolid.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbsolid.c' object='libwfb_la-fbsolid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbsolid.lo `test -f 'fbsolid.c' || echo '$(srcdir)/'`fbsolid.c libwfb_la-fbtrap.lo: fbtrap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbtrap.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbtrap.Tpo -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbtrap.Tpo $(DEPDIR)/libwfb_la-fbtrap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbtrap.c' object='libwfb_la-fbtrap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbtrap.lo `test -f 'fbtrap.c' || echo '$(srcdir)/'`fbtrap.c libwfb_la-fbutil.lo: fbutil.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbutil.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbutil.Tpo -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbutil.Tpo $(DEPDIR)/libwfb_la-fbutil.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbutil.c' object='libwfb_la-fbutil.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbutil.lo `test -f 'fbutil.c' || echo '$(srcdir)/'`fbutil.c libwfb_la-fbwindow.lo: fbwindow.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbwindow.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbwindow.Tpo -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbwindow.Tpo $(DEPDIR)/libwfb_la-fbwindow.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbwindow.c' object='libwfb_la-fbwindow.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbwindow.lo `test -f 'fbwindow.c' || echo '$(srcdir)/'`fbwindow.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libfb_la-fballpriv.Plo -rm -f ./$(DEPDIR)/libfb_la-fbarc.Plo -rm -f ./$(DEPDIR)/libfb_la-fbbits.Plo -rm -f ./$(DEPDIR)/libfb_la-fbblt.Plo -rm -f ./$(DEPDIR)/libfb_la-fbbltone.Plo -rm -f ./$(DEPDIR)/libfb_la-fbcmap_mi.Plo -rm -f ./$(DEPDIR)/libfb_la-fbcopy.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfill.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfillrect.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfillsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbgc.Plo -rm -f ./$(DEPDIR)/libfb_la-fbgetsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbglyph.Plo -rm -f ./$(DEPDIR)/libfb_la-fbimage.Plo -rm -f ./$(DEPDIR)/libfb_la-fbline.Plo -rm -f ./$(DEPDIR)/libfb_la-fboverlay.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpict.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpixmap.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpoint.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpush.Plo -rm -f ./$(DEPDIR)/libfb_la-fbscreen.Plo -rm -f ./$(DEPDIR)/libfb_la-fbseg.Plo -rm -f ./$(DEPDIR)/libfb_la-fbsetsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbsolid.Plo -rm -f ./$(DEPDIR)/libfb_la-fbtrap.Plo -rm -f ./$(DEPDIR)/libfb_la-fbutil.Plo -rm -f ./$(DEPDIR)/libfb_la-fbwindow.Plo -rm -f ./$(DEPDIR)/libwfb_la-fballpriv.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbarc.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbbits.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbblt.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbbltone.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbcmap_mi.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbcopy.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfill.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfillrect.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfillsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbgc.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbgetsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbglyph.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbimage.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbline.Plo -rm -f ./$(DEPDIR)/libwfb_la-fboverlay.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpict.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpixmap.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpoint.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpush.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbscreen.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbseg.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbsetsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbsolid.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbtrap.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbutil.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbwindow.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libfb_la-fballpriv.Plo -rm -f ./$(DEPDIR)/libfb_la-fbarc.Plo -rm -f ./$(DEPDIR)/libfb_la-fbbits.Plo -rm -f ./$(DEPDIR)/libfb_la-fbblt.Plo -rm -f ./$(DEPDIR)/libfb_la-fbbltone.Plo -rm -f ./$(DEPDIR)/libfb_la-fbcmap_mi.Plo -rm -f ./$(DEPDIR)/libfb_la-fbcopy.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfill.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfillrect.Plo -rm -f ./$(DEPDIR)/libfb_la-fbfillsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbgc.Plo -rm -f ./$(DEPDIR)/libfb_la-fbgetsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbglyph.Plo -rm -f ./$(DEPDIR)/libfb_la-fbimage.Plo -rm -f ./$(DEPDIR)/libfb_la-fbline.Plo -rm -f ./$(DEPDIR)/libfb_la-fboverlay.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpict.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpixmap.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpoint.Plo -rm -f ./$(DEPDIR)/libfb_la-fbpush.Plo -rm -f ./$(DEPDIR)/libfb_la-fbscreen.Plo -rm -f ./$(DEPDIR)/libfb_la-fbseg.Plo -rm -f ./$(DEPDIR)/libfb_la-fbsetsp.Plo -rm -f ./$(DEPDIR)/libfb_la-fbsolid.Plo -rm -f ./$(DEPDIR)/libfb_la-fbtrap.Plo -rm -f ./$(DEPDIR)/libfb_la-fbutil.Plo -rm -f ./$(DEPDIR)/libfb_la-fbwindow.Plo -rm -f ./$(DEPDIR)/libwfb_la-fballpriv.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbarc.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbbits.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbblt.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbbltone.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbcmap_mi.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbcopy.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfill.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfillrect.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbfillsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbgc.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbgetsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbglyph.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbimage.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbline.Plo -rm -f ./$(DEPDIR)/libwfb_la-fboverlay.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpict.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpixmap.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpoint.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbpush.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbscreen.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbseg.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbsetsp.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbsolid.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbtrap.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbutil.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbwindow.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/fb/fballpriv.c0000644000175000017500000000372414757411105012355 /* * Copyright © 1998 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 #endif #include "fb.h" static DevPrivateKeyRec fbScreenPrivateKeyRec; DevPrivateKey fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; } Bool fbAllocatePrivates(ScreenPtr pScreen) { FbScreenPrivPtr pScrPriv; if (!dixRegisterPrivateKey (&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof(FbScreenPrivRec))) return FALSE; pScrPriv = fbGetScreenPrivate(pScreen); if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->gcPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec))) return FALSE; if (!dixRegisterScreenSpecificPrivateKey (pScreen, &pScrPriv->winPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; return TRUE; } #ifdef FB_ACCESS_WRAPPER ReadMemoryProcPtr wfbReadMemory; WriteMemoryProcPtr wfbWriteMemory; #endif xorg-server-21.1.16/fb/fbarc.c0000644000175000017500000001167614757411105011456 /* * Copyright © 1998 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 #endif #include "fb.h" #include "mizerarc.h" #include typedef void (*FbArc) (FbBits * dst, FbStride dstStride, int dstBpp, xArc * arc, int dx, int dy, FbBits and, FbBits xor); void fbPolyArc(DrawablePtr pDrawable, GCPtr pGC, int narcs, xArc * parcs) { FbArc arc; if (pGC->lineWidth == 0) { arc = 0; if (pGC->lineStyle == LineSolid && pGC->fillStyle == FillSolid) { switch (pDrawable->bitsPerPixel) { case 8: arc = fbArc8; break; case 16: arc = fbArc16; break; case 32: arc = fbArc32; break; } } if (arc) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; BoxRec box; int x2, y2; RegionPtr cclip; #ifdef FB_ACCESS_WRAPPER int wrapped = 1; #endif cclip = fbGetCompositeClip(pGC); fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (narcs--) { if (miCanZeroArc(parcs)) { box.x1 = parcs->x + pDrawable->x; box.y1 = parcs->y + pDrawable->y; /* * Because box.x2 and box.y2 get truncated to 16 bits, and the * RECT_IN_REGION test treats the resulting number as a signed * integer, the RECT_IN_REGION test alone can go the wrong way. * This can result in a server crash because the rendering * routines in this file deal directly with cpu addresses * of pixels to be stored, and do not clip or otherwise check * that all such addresses are within their respective pixmaps. * So we only allow the RECT_IN_REGION test to be used for * values that can be expressed correctly in a signed short. */ x2 = box.x1 + (int) parcs->width + 1; box.x2 = x2; y2 = box.y1 + (int) parcs->height + 1; box.y2 = y2; if ((x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && (RegionContainsRect(cclip, &box) == rgnIN)) { #ifdef FB_ACCESS_WRAPPER if (!wrapped) { fbPrepareAccess(pDrawable); wrapped = 1; } #endif (*arc) (dst, dstStride, dstBpp, parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, pPriv->and, pPriv->xor); } else { #ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess(pDrawable); wrapped = 0; } #endif miZeroPolyArc(pDrawable, pGC, 1, parcs); } } else { #ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess(pDrawable); wrapped = 0; } #endif miPolyArc(pDrawable, pGC, 1, parcs); } parcs++; } #ifdef FB_ACCESS_WRAPPER if (wrapped) { fbFinishAccess(pDrawable); wrapped = 0; } #endif } else miZeroPolyArc(pDrawable, pGC, narcs, parcs); } else miPolyArc(pDrawable, pGC, narcs, parcs); } xorg-server-21.1.16/fb/fbbits.c0000644000175000017500000000507414757411105011645 /* * Copyright © 1998 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 #endif #include "fb.h" #include "miline.h" #include "mizerarc.h" #undef BRESSOLID #undef BRESDASH #undef DOTS #undef ARC #undef GLYPH #undef BITS #undef BITS2 #undef BITS4 #define BRESSOLID fbBresSolid8 #define BRESDASH fbBresDash8 #define DOTS fbDots8 #define ARC fbArc8 #define GLYPH fbGlyph8 #define POLYLINE fbPolyline8 #define POLYSEGMENT fbPolySegment8 #define BITS BYTE #define BITS2 CARD16 #define BITS4 CARD32 #include "fbbits.h" #undef BRESSOLID #undef BRESDASH #undef DOTS #undef ARC #undef GLYPH #undef POLYLINE #undef POLYSEGMENT #undef BITS #undef BITS2 #undef BITS4 #define BRESSOLID fbBresSolid16 #define BRESDASH fbBresDash16 #define DOTS fbDots16 #define ARC fbArc16 #define GLYPH fbGlyph16 #define POLYLINE fbPolyline16 #define POLYSEGMENT fbPolySegment16 #define BITS CARD16 #define BITS2 CARD32 #include "fbbits.h" #undef BRESSOLID #undef BRESDASH #undef DOTS #undef ARC #undef GLYPH #undef POLYLINE #undef POLYSEGMENT #undef BITS #undef BITS2 #define BRESSOLID fbBresSolid32 #define BRESDASH fbBresDash32 #define DOTS fbDots32 #define ARC fbArc32 #define GLYPH fbGlyph32 #define POLYLINE fbPolyline32 #define POLYSEGMENT fbPolySegment32 #define BITS CARD32 #include "fbbits.h" #undef BRESSOLID #undef BRESDASH #undef DOTS #undef ARC #undef GLYPH #undef POLYLINE #undef POLYSEGMENT #undef BITS xorg-server-21.1.16/fb/fbbits.h0000644000175000017500000006051014757411105011646 /* * Copyright © 1998 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. */ /* * This file defines functions for drawing some primitives using * underlying datatypes instead of masks */ #define isClipped(c,ul,lr) (((c) | ((c) - (ul)) | ((lr) - (c))) & 0x80008000) #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef BITSSTORE #define STORE(b,x) BITSSTORE(b,x) #else #define STORE(b,x) WRITE((b), (x)) #endif #ifdef BITSRROP #define RROP(b,a,x) BITSRROP(b,a,x) #else #define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x))) #endif #ifdef BITSUNIT #define UNIT BITSUNIT #define USE_SOLID #else #define UNIT BITS #endif /* * Define the following before including this file: * * BRESSOLID name of function for drawing a solid segment * BRESDASH name of function for drawing a dashed segment * DOTS name of function for drawing dots * ARC name of function for drawing a solid arc * BITS type of underlying unit */ #ifdef BRESSOLID void BRESSOLID(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); UNIT *bits; FbStride bitsStride; FbStride majorStep, minorStep; BITS xor = (BITS) pPriv->xor; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff); bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); if (signdy < 0) bitsStride = -bitsStride; if (axis == X_AXIS) { majorStep = signdx; minorStep = bitsStride; } else { majorStep = bitsStride; minorStep = signdx; } while (len--) { STORE(bits, xor); bits += majorStep; e += e1; if (e >= 0) { bits += minorStep; e += e3; } } fbFinishAccess(pDrawable); } #endif #ifdef BRESDASH void BRESDASH(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); UNIT *bits; FbStride bitsStride; FbStride majorStep, minorStep; BITS xorfg, xorbg; FbDashDeclare; int dashlen; Bool even; Bool doOdd; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); doOdd = pGC->lineStyle == LineDoubleDash; xorfg = (BITS) pPriv->xor; xorbg = (BITS) pPriv->bgxor; FbDashInit(pGC, pPriv, dashOffset, dashlen, even); bits = ((UNIT *) (dst + ((y1 + dstYoff) * dstStride))) + (x1 + dstXoff); bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); if (signdy < 0) bitsStride = -bitsStride; if (axis == X_AXIS) { majorStep = signdx; minorStep = bitsStride; } else { majorStep = bitsStride; minorStep = signdx; } if (dashlen >= len) dashlen = len; if (doOdd) { if (!even) goto doubleOdd; for (;;) { len -= dashlen; while (dashlen--) { STORE(bits, xorfg); bits += majorStep; if ((e += e1) >= 0) { e += e3; bits += minorStep; } } if (!len) break; FbDashNextEven(dashlen); if (dashlen >= len) dashlen = len; doubleOdd: len -= dashlen; while (dashlen--) { STORE(bits, xorbg); bits += majorStep; if ((e += e1) >= 0) { e += e3; bits += minorStep; } } if (!len) break; FbDashNextOdd(dashlen); if (dashlen >= len) dashlen = len; } } else { if (!even) goto onOffOdd; for (;;) { len -= dashlen; while (dashlen--) { STORE(bits, xorfg); bits += majorStep; if ((e += e1) >= 0) { e += e3; bits += minorStep; } } if (!len) break; FbDashNextEven(dashlen); if (dashlen >= len) dashlen = len; onOffOdd: len -= dashlen; while (dashlen--) { bits += majorStep; if ((e += e1) >= 0) { e += e3; bits += minorStep; } } if (!len) break; FbDashNextOdd(dashlen); if (dashlen >= len) dashlen = len; } } fbFinishAccess(pDrawable); } #endif #ifdef DOTS void DOTS(FbBits * dst, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * ptsOrig, int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor) { INT32 *pts = (INT32 *) ptsOrig; UNIT *bits = (UNIT *) dst; UNIT *point; BITS bxor = (BITS) xor; BITS band = (BITS) and; FbStride bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); INT32 ul, lr; INT32 pt; ul = coordToInt(pBox->x1 - xorg, pBox->y1 - yorg); lr = coordToInt(pBox->x2 - xorg - 1, pBox->y2 - yorg - 1); bits += bitsStride * (yorg + yoff) + (xorg + xoff); if (and == 0) { while (npt--) { pt = *pts++; if (!isClipped(pt, ul, lr)) { point = bits + intToY(pt) * bitsStride + intToX(pt); STORE(point, bxor); } } } else { while (npt--) { pt = *pts++; if (!isClipped(pt, ul, lr)) { point = bits + intToY(pt) * bitsStride + intToX(pt); RROP(point, band, bxor); } } } } #endif #ifdef ARC #define ARCCOPY(d) STORE(d,xorBits) #define ARCRROP(d) RROP(d,andBits,xorBits) void ARC(FbBits * dst, FbStride dstStride, int dstBpp, xArc * arc, int drawX, int drawY, FbBits and, FbBits xor) { UNIT *bits; FbStride bitsStride; miZeroArcRec info; Bool do360; int x; UNIT *yorgp, *yorgop; BITS andBits, xorBits; int yoffset, dyoffset; int y, a, b, d, mask; int k1, k3, dx, dy; bits = (UNIT *) dst; bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); andBits = (BITS) and; xorBits = (BITS) xor; do360 = miZeroArcSetup(arc, &info, TRUE); yorgp = bits + ((info.yorg + drawY) * bitsStride); yorgop = bits + ((info.yorgo + drawY) * bitsStride); info.xorg = (info.xorg + drawX); info.xorgo = (info.xorgo + drawX); MIARCSETUP(); yoffset = y ? bitsStride : 0; dyoffset = 0; mask = info.initialMask; if (!(arc->width & 1)) { if (andBits == 0) { if (mask & 2) ARCCOPY(yorgp + info.xorgo); if (mask & 8) ARCCOPY(yorgop + info.xorgo); } else { if (mask & 2) ARCRROP(yorgp + info.xorgo); if (mask & 8) ARCRROP(yorgop + info.xorgo); } } if (!info.end.x || !info.end.y) { mask = info.end.mask; info.end = info.altend; } if (do360 && (arc->width == arc->height) && !(arc->width & 1)) { int xoffset = bitsStride; UNIT *yorghb = yorgp + (info.h * bitsStride) + info.xorg; UNIT *yorgohb = yorghb - info.h; yorgp += info.xorg; yorgop += info.xorg; yorghb += info.h; while (1) { if (andBits == 0) { ARCCOPY(yorgp + yoffset + x); ARCCOPY(yorgp + yoffset - x); ARCCOPY(yorgop - yoffset - x); ARCCOPY(yorgop - yoffset + x); } else { ARCRROP(yorgp + yoffset + x); ARCRROP(yorgp + yoffset - x); ARCRROP(yorgop - yoffset - x); ARCRROP(yorgop - yoffset + x); } if (a < 0) break; if (andBits == 0) { ARCCOPY(yorghb - xoffset - y); ARCCOPY(yorgohb - xoffset + y); ARCCOPY(yorgohb + xoffset + y); ARCCOPY(yorghb + xoffset - y); } else { ARCRROP(yorghb - xoffset - y); ARCRROP(yorgohb - xoffset + y); ARCRROP(yorgohb + xoffset + y); ARCRROP(yorghb + xoffset - y); } xoffset += bitsStride; MIARCCIRCLESTEP(yoffset += bitsStride; ); } yorgp -= info.xorg; yorgop -= info.xorg; x = info.w; yoffset = info.h * bitsStride; } else if (do360) { while (y < info.h || x < info.w) { MIARCOCTANTSHIFT(dyoffset = bitsStride; ); if (andBits == 0) { ARCCOPY(yorgp + yoffset + info.xorg + x); ARCCOPY(yorgp + yoffset + info.xorgo - x); ARCCOPY(yorgop - yoffset + info.xorgo - x); ARCCOPY(yorgop - yoffset + info.xorg + x); } else { ARCRROP(yorgp + yoffset + info.xorg + x); ARCRROP(yorgp + yoffset + info.xorgo - x); ARCRROP(yorgop - yoffset + info.xorgo - x); ARCRROP(yorgop - yoffset + info.xorg + x); } MIARCSTEP(yoffset += dyoffset; , yoffset += bitsStride; ); } } else { while (y < info.h || x < info.w) { MIARCOCTANTSHIFT(dyoffset = bitsStride; ); if ((x == info.start.x) || (y == info.start.y)) { mask = info.start.mask; info.start = info.altstart; } if (andBits == 0) { if (mask & 1) ARCCOPY(yorgp + yoffset + info.xorg + x); if (mask & 2) ARCCOPY(yorgp + yoffset + info.xorgo - x); if (mask & 4) ARCCOPY(yorgop - yoffset + info.xorgo - x); if (mask & 8) ARCCOPY(yorgop - yoffset + info.xorg + x); } else { if (mask & 1) ARCRROP(yorgp + yoffset + info.xorg + x); if (mask & 2) ARCRROP(yorgp + yoffset + info.xorgo - x); if (mask & 4) ARCRROP(yorgop - yoffset + info.xorgo - x); if (mask & 8) ARCRROP(yorgop - yoffset + info.xorg + x); } if ((x == info.end.x) || (y == info.end.y)) { mask = info.end.mask; info.end = info.altend; } MIARCSTEP(yoffset += dyoffset; , yoffset += bitsStride; ); } } if ((x == info.start.x) || (y == info.start.y)) mask = info.start.mask; if (andBits == 0) { if (mask & 1) ARCCOPY(yorgp + yoffset + info.xorg + x); if (mask & 4) ARCCOPY(yorgop - yoffset + info.xorgo - x); if (arc->height & 1) { if (mask & 2) ARCCOPY(yorgp + yoffset + info.xorgo - x); if (mask & 8) ARCCOPY(yorgop - yoffset + info.xorg + x); } } else { if (mask & 1) ARCRROP(yorgp + yoffset + info.xorg + x); if (mask & 4) ARCRROP(yorgop - yoffset + info.xorgo - x); if (arc->height & 1) { if (mask & 2) ARCRROP(yorgp + yoffset + info.xorgo - x); if (mask & 8) ARCRROP(yorgop - yoffset + info.xorg + x); } } } #undef ARCCOPY #undef ARCRROP #endif #ifdef GLYPH #if BITMAP_BIT_ORDER == LSBFirst #define WRITE_ADDR1(n) (n) #define WRITE_ADDR2(n) (n) #define WRITE_ADDR4(n) (n) #else #define WRITE_ADDR1(n) ((n) ^ 3) #define WRITE_ADDR2(n) ((n) ^ 2) #define WRITE_ADDR4(n) ((n)) #endif #define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg)) #ifdef BITS2 #define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg)) #else #define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg)) #endif #ifdef BITS4 #define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg)) #else #define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg)) #endif void GLYPH(FbBits * dstBits, FbStride dstStride, int dstBpp, FbStip * stipple, FbBits fg, int x, int height) { int lshift; FbStip bits; BITS *dstLine; BITS *dst; int n; int shift; dstLine = (BITS *) dstBits; dstLine += x & ~3; dstStride *= (sizeof(FbBits) / sizeof(BITS)); shift = x & 3; lshift = 4 - shift; while (height--) { bits = *stipple++; dst = (BITS *) dstLine; n = lshift; while (bits) { switch (FbStipMoveLsb(FbLeftStipBits(bits, n), 4, n)) { case 0: break; case 1: WRITE1(dst, 0, fg); break; case 2: WRITE1(dst, 1, fg); break; case 3: WRITE2(dst, 0, fg); break; case 4: WRITE1(dst, 2, fg); break; case 5: WRITE1(dst, 0, fg); WRITE1(dst, 2, fg); break; case 6: WRITE1(dst, 1, fg); WRITE1(dst, 2, fg); break; case 7: WRITE2(dst, 0, fg); WRITE1(dst, 2, fg); break; case 8: WRITE1(dst, 3, fg); break; case 9: WRITE1(dst, 0, fg); WRITE1(dst, 3, fg); break; case 10: WRITE1(dst, 1, fg); WRITE1(dst, 3, fg); break; case 11: WRITE2(dst, 0, fg); WRITE1(dst, 3, fg); break; case 12: WRITE2(dst, 2, fg); break; case 13: WRITE1(dst, 0, fg); WRITE2(dst, 2, fg); break; case 14: WRITE1(dst, 1, fg); WRITE2(dst, 2, fg); break; case 15: WRITE4(dst, 0, fg); break; } bits = FbStipLeft(bits, n); n = 4; dst += 4; } dstLine += dstStride; } } #undef WRITE_ADDR1 #undef WRITE_ADDR2 #undef WRITE_ADDR4 #undef WRITE1 #undef WRITE2 #undef WRITE4 #endif #ifdef POLYLINE void POLYLINE(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ptsOrig) { INT32 *pts = (INT32 *) ptsOrig; int xoff = pDrawable->x; int yoff = pDrawable->y; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); BoxPtr pBox = RegionExtents(fbGetCompositeClip(pGC)); FbBits *dst; int dstStride; int dstBpp; int dstXoff, dstYoff; UNIT *bits, *bitsBase; FbStride bitsStride; BITS xor = fbGetGCPrivate(pGC)->xor; BITS and = fbGetGCPrivate(pGC)->and; int dashoffset = 0; INT32 ul, lr; INT32 pt1, pt2; int e, e1, e3, len; int stepmajor, stepminor; int octant; if (mode == CoordModePrevious) fbFixCoordModePrevious(npt, ptsOrig); fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff); ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); pt1 = *pts++; npt--; pt2 = *pts++; npt--; for (;;) { if (isClipped(pt1, ul, lr) | isClipped(pt2, ul, lr)) { fbSegment(pDrawable, pGC, intToX(pt1) + xoff, intToY(pt1) + yoff, intToX(pt2) + xoff, intToY(pt2) + yoff, npt == 0 && pGC->capStyle != CapNotLast, &dashoffset); if (!npt) { fbFinishAccess(pDrawable); return; } pt1 = pt2; pt2 = *pts++; npt--; } else { bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1); for (;;) { CalcLineDeltas(intToX(pt1), intToY(pt1), intToX(pt2), intToY(pt2), len, e1, stepmajor, stepminor, 1, bitsStride, octant); if (len < e1) { e3 = len; len = e1; e1 = e3; e3 = stepminor; stepminor = stepmajor; stepmajor = e3; SetYMajorOctant(octant); } e = -len; e1 <<= 1; e3 = e << 1; FIXUP_ERROR(e, octant, bias); if (and == 0) { while (len--) { STORE(bits, xor); bits += stepmajor; e += e1; if (e >= 0) { bits += stepminor; e += e3; } } } else { while (len--) { RROP(bits, and, xor); bits += stepmajor; e += e1; if (e >= 0) { bits += stepminor; e += e3; } } } if (!npt) { if (pGC->capStyle != CapNotLast && pt2 != *((INT32 *) ptsOrig)) { RROP(bits, and, xor); } fbFinishAccess(pDrawable); return; } pt1 = pt2; pt2 = *pts++; --npt; if (isClipped(pt2, ul, lr)) break; } } } fbFinishAccess(pDrawable); } #endif #ifdef POLYSEGMENT void POLYSEGMENT(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg) { INT32 *pts = (INT32 *) pseg; int xoff = pDrawable->x; int yoff = pDrawable->y; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); BoxPtr pBox = RegionExtents(fbGetCompositeClip(pGC)); FbBits *dst; int dstStride; int dstBpp; int dstXoff, dstYoff; UNIT *bits, *bitsBase; FbStride bitsStride; FbBits xorBits = fbGetGCPrivate(pGC)->xor; FbBits andBits = fbGetGCPrivate(pGC)->and; BITS xor = xorBits; BITS and = andBits; int dashoffset = 0; INT32 ul, lr; INT32 pt1, pt2; int e, e1, e3, len; int stepmajor, stepminor; int octant; Bool capNotLast; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); bitsStride = dstStride * (sizeof(FbBits) / sizeof(UNIT)); bitsBase = ((UNIT *) dst) + (yoff + dstYoff) * bitsStride + (xoff + dstXoff); ul = coordToInt(pBox->x1 - xoff, pBox->y1 - yoff); lr = coordToInt(pBox->x2 - xoff - 1, pBox->y2 - yoff - 1); capNotLast = pGC->capStyle == CapNotLast; while (nseg--) { pt1 = *pts++; pt2 = *pts++; if (isClipped(pt1, ul, lr) | isClipped(pt2, ul, lr)) { fbSegment(pDrawable, pGC, intToX(pt1) + xoff, intToY(pt1) + yoff, intToX(pt2) + xoff, intToY(pt2) + yoff, !capNotLast, &dashoffset); } else { CalcLineDeltas(intToX(pt1), intToY(pt1), intToX(pt2), intToY(pt2), len, e1, stepmajor, stepminor, 1, bitsStride, octant); if (e1 == 0 && len > 3) { int x1, x2; FbBits *dstLine; int dstX, width; FbBits startmask, endmask; int nmiddle; if (stepmajor < 0) { x1 = intToX(pt2); x2 = intToX(pt1) + 1; if (capNotLast) x1++; } else { x1 = intToX(pt1); x2 = intToX(pt2); if (!capNotLast) x2++; } dstX = (x1 + xoff + dstXoff) * (sizeof(UNIT) * 8); width = (x2 - x1) * (sizeof(UNIT) * 8); dstLine = dst + (intToY(pt1) + yoff + dstYoff) * dstStride; dstLine += dstX >> FB_SHIFT; dstX &= FB_MASK; FbMaskBits(dstX, width, startmask, nmiddle, endmask); if (startmask) { WRITE(dstLine, FbDoMaskRRop(READ(dstLine), andBits, xorBits, startmask)); dstLine++; } if (!andBits) while (nmiddle--) WRITE(dstLine++, xorBits); else while (nmiddle--) { WRITE(dstLine, FbDoRRop(READ(dstLine), andBits, xorBits)); dstLine++; } if (endmask) WRITE(dstLine, FbDoMaskRRop(READ(dstLine), andBits, xorBits, endmask)); } else { bits = bitsBase + intToY(pt1) * bitsStride + intToX(pt1); if (len < e1) { e3 = len; len = e1; e1 = e3; e3 = stepminor; stepminor = stepmajor; stepmajor = e3; SetYMajorOctant(octant); } e = -len; e1 <<= 1; e3 = e << 1; FIXUP_ERROR(e, octant, bias); if (!capNotLast) len++; if (and == 0) { while (len--) { STORE(bits, xor); bits += stepmajor; e += e1; if (e >= 0) { bits += stepminor; e += e3; } } } else { while (len--) { RROP(bits, and, xor); bits += stepmajor; e += e1; if (e >= 0) { bits += stepminor; e += e3; } } } } } } fbFinishAccess(pDrawable); } #endif #undef STORE #undef RROP #undef UNIT #undef USE_SOLID #undef isClipped xorg-server-21.1.16/fb/fbblt.c0000644000175000017500000002514314757411105011464 /* * Copyright © 1998 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 #endif #include #include "fb.h" #define InitializeShifts(sx,dx,ls,rs) { \ if (sx != dx) { \ if (sx > dx) { \ ls = sx - dx; \ rs = FB_UNIT - ls; \ } else { \ rs = dx - sx; \ ls = FB_UNIT - rs; \ } \ } \ } void fbBlt(FbBits * srcLine, FbStride srcStride, int srcX, FbBits * dstLine, FbStride dstStride, int dstX, int width, int height, int alu, FbBits pm, int bpp, Bool reverse, Bool upsidedown) { FbBits *src, *dst; int leftShift, rightShift; FbBits startmask, endmask; FbBits bits, bits1; int n, nmiddle; Bool destInvarient; int startbyte, endbyte; FbDeclareMergeRop(); if (alu == GXcopy && pm == FB_ALLONES && !(srcX & 7) && !(dstX & 7) && !(width & 7)) { CARD8 *src_byte = (CARD8 *) srcLine + (srcX >> 3); CARD8 *dst_byte = (CARD8 *) dstLine + (dstX >> 3); FbStride src_byte_stride = srcStride << (FB_SHIFT - 3); FbStride dst_byte_stride = dstStride << (FB_SHIFT - 3); int width_byte = (width >> 3); /* Make sure there's no overlap; we can't use memcpy in that * case as it's not well defined, so fall through to the * general code */ if (src_byte + width_byte <= dst_byte || dst_byte + width_byte <= src_byte) { int i; if (!upsidedown) for (i = 0; i < height; i++) MEMCPY_WRAPPED(dst_byte + i * dst_byte_stride, src_byte + i * src_byte_stride, width_byte); else for (i = height - 1; i >= 0; i--) MEMCPY_WRAPPED(dst_byte + i * dst_byte_stride, src_byte + i * src_byte_stride, width_byte); return; } } FbInitializeMergeRop(alu, pm); destInvarient = FbDestInvarientMergeRop(); if (upsidedown) { srcLine += (height - 1) * (srcStride); dstLine += (height - 1) * (dstStride); srcStride = -srcStride; dstStride = -dstStride; } FbMaskBitsBytes(dstX, width, destInvarient, startmask, startbyte, nmiddle, endmask, endbyte); if (reverse) { srcLine += ((srcX + width - 1) >> FB_SHIFT) + 1; dstLine += ((dstX + width - 1) >> FB_SHIFT) + 1; srcX = (srcX + width - 1) & FB_MASK; dstX = (dstX + width - 1) & FB_MASK; } else { srcLine += srcX >> FB_SHIFT; dstLine += dstX >> FB_SHIFT; srcX &= FB_MASK; dstX &= FB_MASK; } if (srcX == dstX) { while (height--) { src = srcLine; srcLine += srcStride; dst = dstLine; dstLine += dstStride; if (reverse) { if (endmask) { bits = READ(--src); --dst; FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } n = nmiddle; if (destInvarient) { while (n--) WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src))); } else { while (n--) { bits = READ(--src); --dst; WRITE(dst, FbDoMergeRop(bits, READ(dst))); } } if (startmask) { bits = READ(--src); --dst; FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); } } else { if (startmask) { bits = READ(src++); FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); dst++; } n = nmiddle; if (destInvarient) { #if 0 /* * This provides some speedup on screen->screen blts * over the PCI bus, usually about 10%. But fb * isn't usually used for this operation... */ if (_ca2 + 1 == 0 && _cx2 == 0) { FbBits t1, t2, t3, t4; while (n >= 4) { t1 = *src++; t2 = *src++; t3 = *src++; t4 = *src++; *dst++ = t1; *dst++ = t2; *dst++ = t3; *dst++ = t4; n -= 4; } } #endif while (n--) WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++))); } else { while (n--) { bits = READ(src++); WRITE(dst, FbDoMergeRop(bits, READ(dst))); dst++; } } if (endmask) { bits = READ(src); FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } } } } else { if (srcX > dstX) { leftShift = srcX - dstX; rightShift = FB_UNIT - leftShift; } else { rightShift = dstX - srcX; leftShift = FB_UNIT - rightShift; } while (height--) { src = srcLine; srcLine += srcStride; dst = dstLine; dstLine += dstStride; bits1 = 0; if (reverse) { if (srcX < dstX) bits1 = READ(--src); if (endmask) { bits = FbScrRight(bits1, rightShift); if (FbScrRight(endmask, leftShift)) { bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } n = nmiddle; if (destInvarient) { while (n--) { bits = FbScrRight(bits1, rightShift); bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); --dst; WRITE(dst, FbDoDestInvarientMergeRop(bits)); } } else { while (n--) { bits = FbScrRight(bits1, rightShift); bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); --dst; WRITE(dst, FbDoMergeRop(bits, READ(dst))); } } if (startmask) { bits = FbScrRight(bits1, rightShift); if (FbScrRight(startmask, leftShift)) { bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); } } else { if (srcX > dstX) bits1 = READ(src++); if (startmask) { bits = FbScrLeft(bits1, leftShift); if (FbScrLeft(startmask, rightShift)) { bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); } FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); dst++; } n = nmiddle; if (destInvarient) { while (n--) { bits = FbScrLeft(bits1, leftShift); bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); WRITE(dst, FbDoDestInvarientMergeRop(bits)); dst++; } } else { while (n--) { bits = FbScrLeft(bits1, leftShift); bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); WRITE(dst, FbDoMergeRop(bits, READ(dst))); dst++; } } if (endmask) { bits = FbScrLeft(bits1, leftShift); if (FbScrLeft(endmask, rightShift)) { bits1 = READ(src); bits |= FbScrRight(bits1, rightShift); } FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } } } } } void fbBltStip(FbStip * src, FbStride srcStride, /* in FbStip units, not FbBits units */ int srcX, FbStip * dst, FbStride dstStride, /* in FbStip units, not FbBits units */ int dstX, int width, int height, int alu, FbBits pm, int bpp) { fbBlt((FbBits *) src, FbStipStrideToBitsStride(srcStride), srcX, (FbBits *) dst, FbStipStrideToBitsStride(dstStride), dstX, width, height, alu, pm, bpp, FALSE, FALSE); } xorg-server-21.1.16/fb/fbbltone.c0000644000175000017500000003520114757411105012162 /* * Copyright © 1998 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 #endif #include "fb.h" /* * Stipple masks are independent of bit/byte order as long * as bitorder == byteorder. FB doesn't handle the case * where these differ */ #define BitsMask(x,w) ((FB_ALLONES << ((x) & FB_MASK)) & \ (FB_ALLONES >> ((FB_UNIT - ((x) + (w))) & FB_MASK))) #define Mask(x,w) BitsMask((x)*(w),(w)) #define SelMask(b,n,w) ((((b) >> n) & 1) * Mask(n,w)) #define C1(b,w) \ (SelMask(b,0,w)) #define C2(b,w) \ (SelMask(b,0,w) | \ SelMask(b,1,w)) #define C4(b,w) \ (SelMask(b,0,w) | \ SelMask(b,1,w) | \ SelMask(b,2,w) | \ SelMask(b,3,w)) #define C8(b,w) \ (SelMask(b,0,w) | \ SelMask(b,1,w) | \ SelMask(b,2,w) | \ SelMask(b,3,w) | \ SelMask(b,4,w) | \ SelMask(b,5,w) | \ SelMask(b,6,w) | \ SelMask(b,7,w)) static const FbBits fbStipple8Bits[256] = { C8(0, 4), C8(1, 4), C8(2, 4), C8(3, 4), C8(4, 4), C8(5, 4), C8(6, 4), C8(7, 4), C8(8, 4), C8(9, 4), C8(10, 4), C8(11, 4), C8(12, 4), C8(13, 4), C8(14, 4), C8(15, 4), C8(16, 4), C8(17, 4), C8(18, 4), C8(19, 4), C8(20, 4), C8(21, 4), C8(22, 4), C8(23, 4), C8(24, 4), C8(25, 4), C8(26, 4), C8(27, 4), C8(28, 4), C8(29, 4), C8(30, 4), C8(31, 4), C8(32, 4), C8(33, 4), C8(34, 4), C8(35, 4), C8(36, 4), C8(37, 4), C8(38, 4), C8(39, 4), C8(40, 4), C8(41, 4), C8(42, 4), C8(43, 4), C8(44, 4), C8(45, 4), C8(46, 4), C8(47, 4), C8(48, 4), C8(49, 4), C8(50, 4), C8(51, 4), C8(52, 4), C8(53, 4), C8(54, 4), C8(55, 4), C8(56, 4), C8(57, 4), C8(58, 4), C8(59, 4), C8(60, 4), C8(61, 4), C8(62, 4), C8(63, 4), C8(64, 4), C8(65, 4), C8(66, 4), C8(67, 4), C8(68, 4), C8(69, 4), C8(70, 4), C8(71, 4), C8(72, 4), C8(73, 4), C8(74, 4), C8(75, 4), C8(76, 4), C8(77, 4), C8(78, 4), C8(79, 4), C8(80, 4), C8(81, 4), C8(82, 4), C8(83, 4), C8(84, 4), C8(85, 4), C8(86, 4), C8(87, 4), C8(88, 4), C8(89, 4), C8(90, 4), C8(91, 4), C8(92, 4), C8(93, 4), C8(94, 4), C8(95, 4), C8(96, 4), C8(97, 4), C8(98, 4), C8(99, 4), C8(100, 4), C8(101, 4), C8(102, 4), C8(103, 4), C8(104, 4), C8(105, 4), C8(106, 4), C8(107, 4), C8(108, 4), C8(109, 4), C8(110, 4), C8(111, 4), C8(112, 4), C8(113, 4), C8(114, 4), C8(115, 4), C8(116, 4), C8(117, 4), C8(118, 4), C8(119, 4), C8(120, 4), C8(121, 4), C8(122, 4), C8(123, 4), C8(124, 4), C8(125, 4), C8(126, 4), C8(127, 4), C8(128, 4), C8(129, 4), C8(130, 4), C8(131, 4), C8(132, 4), C8(133, 4), C8(134, 4), C8(135, 4), C8(136, 4), C8(137, 4), C8(138, 4), C8(139, 4), C8(140, 4), C8(141, 4), C8(142, 4), C8(143, 4), C8(144, 4), C8(145, 4), C8(146, 4), C8(147, 4), C8(148, 4), C8(149, 4), C8(150, 4), C8(151, 4), C8(152, 4), C8(153, 4), C8(154, 4), C8(155, 4), C8(156, 4), C8(157, 4), C8(158, 4), C8(159, 4), C8(160, 4), C8(161, 4), C8(162, 4), C8(163, 4), C8(164, 4), C8(165, 4), C8(166, 4), C8(167, 4), C8(168, 4), C8(169, 4), C8(170, 4), C8(171, 4), C8(172, 4), C8(173, 4), C8(174, 4), C8(175, 4), C8(176, 4), C8(177, 4), C8(178, 4), C8(179, 4), C8(180, 4), C8(181, 4), C8(182, 4), C8(183, 4), C8(184, 4), C8(185, 4), C8(186, 4), C8(187, 4), C8(188, 4), C8(189, 4), C8(190, 4), C8(191, 4), C8(192, 4), C8(193, 4), C8(194, 4), C8(195, 4), C8(196, 4), C8(197, 4), C8(198, 4), C8(199, 4), C8(200, 4), C8(201, 4), C8(202, 4), C8(203, 4), C8(204, 4), C8(205, 4), C8(206, 4), C8(207, 4), C8(208, 4), C8(209, 4), C8(210, 4), C8(211, 4), C8(212, 4), C8(213, 4), C8(214, 4), C8(215, 4), C8(216, 4), C8(217, 4), C8(218, 4), C8(219, 4), C8(220, 4), C8(221, 4), C8(222, 4), C8(223, 4), C8(224, 4), C8(225, 4), C8(226, 4), C8(227, 4), C8(228, 4), C8(229, 4), C8(230, 4), C8(231, 4), C8(232, 4), C8(233, 4), C8(234, 4), C8(235, 4), C8(236, 4), C8(237, 4), C8(238, 4), C8(239, 4), C8(240, 4), C8(241, 4), C8(242, 4), C8(243, 4), C8(244, 4), C8(245, 4), C8(246, 4), C8(247, 4), C8(248, 4), C8(249, 4), C8(250, 4), C8(251, 4), C8(252, 4), C8(253, 4), C8(254, 4), C8(255, 4), }; static const FbBits fbStipple4Bits[16] = { C4(0, 8), C4(1, 8), C4(2, 8), C4(3, 8), C4(4, 8), C4(5, 8), C4(6, 8), C4(7, 8), C4(8, 8), C4(9, 8), C4(10, 8), C4(11, 8), C4(12, 8), C4(13, 8), C4(14, 8), C4(15, 8), }; static const FbBits fbStipple2Bits[4] = { C2(0, 16), C2(1, 16), C2(2, 16), C2(3, 16), }; static const FbBits fbStipple1Bits[2] = { C1(0, 32), C1(1, 32), }; #ifdef __clang__ /* shift overflow is intentional */ #pragma clang diagnostic ignored "-Wshift-overflow" #endif /* * Example: srcX = 13 dstX = 8 (FB unit 32 dstBpp 8) * * **** **** **** **** **** **** **** **** * ^ * ******** ******** ******** ******** * ^ * leftShift = 12 * rightShift = 20 * * Example: srcX = 0 dstX = 8 (FB unit 32 dstBpp 8) * * **** **** **** **** **** **** **** **** * ^ * ******** ******** ******** ******** * ^ * * leftShift = 24 * rightShift = 8 */ #define LoadBits {\ if (leftShift) { \ bitsRight = (src < srcEnd ? READ(src++) : 0); \ bits = (FbStipLeft (bitsLeft, leftShift) | \ FbStipRight(bitsRight, rightShift)); \ bitsLeft = bitsRight; \ } else \ bits = (src < srcEnd ? READ(src++) : 0); \ } void fbBltOne(FbStip * src, FbStride srcStride, /* FbStip units per scanline */ int srcX, /* bit position of source */ FbBits * dst, FbStride dstStride, /* FbBits units per scanline */ int dstX, /* bit position of dest */ int dstBpp, /* bits per destination unit */ int width, /* width in bits of destination */ int height, /* height in scanlines */ FbBits fgand, /* rrop values */ FbBits fgxor, FbBits bgand, FbBits bgxor) { const FbBits *fbBits; FbBits *srcEnd; int pixelsPerDst; /* dst pixels per FbBits */ int unitsPerSrc; /* src patterns per FbStip */ int leftShift, rightShift; /* align source with dest */ FbBits startmask, endmask; /* dest scanline masks */ FbStip bits = 0, bitsLeft, bitsRight; /* source bits */ FbStip left; FbBits mask; int nDst; /* dest longwords (w.o. end) */ int w; int n, nmiddle; int dstS; /* stipple-relative dst X coordinate */ Bool copy; /* accelerate dest-invariant */ Bool transparent; /* accelerate 0 nop */ int srcinc; /* source units consumed */ Bool endNeedsLoad = FALSE; /* need load for endmask */ int startbyte, endbyte; /* * Do not read past the end of the buffer! */ srcEnd = src + height * srcStride; /* * Number of destination units in FbBits == number of stipple pixels * used each time */ pixelsPerDst = FB_UNIT / dstBpp; /* * Number of source stipple patterns in FbStip */ unitsPerSrc = FB_STIP_UNIT / pixelsPerDst; copy = FALSE; transparent = FALSE; if (bgand == 0 && fgand == 0) copy = TRUE; else if (bgand == FB_ALLONES && bgxor == 0) transparent = TRUE; /* * Adjust source and dest to nearest FbBits boundary */ src += srcX >> FB_STIP_SHIFT; dst += dstX >> FB_SHIFT; srcX &= FB_STIP_MASK; dstX &= FB_MASK; FbMaskBitsBytes(dstX, width, copy, startmask, startbyte, nmiddle, endmask, endbyte); /* * Compute effective dest alignment requirement for * source -- must align source to dest unit boundary */ dstS = dstX / dstBpp; /* * Compute shift constants for effective alignment */ if (srcX >= dstS) { leftShift = srcX - dstS; rightShift = FB_STIP_UNIT - leftShift; } else { rightShift = dstS - srcX; leftShift = FB_STIP_UNIT - rightShift; } /* * Get pointer to stipple mask array for this depth */ fbBits = 0; /* unused */ switch (pixelsPerDst) { case 8: fbBits = fbStipple8Bits; break; case 4: fbBits = fbStipple4Bits; break; case 2: fbBits = fbStipple2Bits; break; case 1: fbBits = fbStipple1Bits; break; default: return; } /* * Compute total number of destination words written, but * don't count endmask */ nDst = nmiddle; if (startmask) nDst++; dstStride -= nDst; /* * Compute total number of source words consumed */ srcinc = (nDst + unitsPerSrc - 1) / unitsPerSrc; if (srcX > dstS) srcinc++; if (endmask) { endNeedsLoad = nDst % unitsPerSrc == 0; if (endNeedsLoad) srcinc++; } srcStride -= srcinc; /* * Copy rectangle */ while (height--) { w = nDst; /* total units across scanline */ n = unitsPerSrc; /* units avail in single stipple */ if (n > w) n = w; bitsLeft = 0; if (srcX > dstS) bitsLeft = READ(src++); if (n) { /* * Load first set of stipple bits */ LoadBits; /* * Consume stipple bits for startmask */ if (startmask) { mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; if (mask || !transparent) FbDoLeftMaskByteStippleRRop(dst, mask, fgand, fgxor, bgand, bgxor, startbyte, startmask); bits = FbStipLeft(bits, pixelsPerDst); dst++; n--; w--; } /* * Consume stipple bits across scanline */ for (;;) { w -= n; if (copy) { while (n--) { mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; WRITE(dst, FbOpaqueStipple(mask, fgxor, bgxor)); dst++; bits = FbStipLeft(bits, pixelsPerDst); } } else { while (n--) { left = FbLeftStipBits(bits, pixelsPerDst); if (left || !transparent) { mask = fbBits[left]; WRITE(dst, FbStippleRRop(READ(dst), mask, fgand, fgxor, bgand, bgxor)); } dst++; bits = FbStipLeft(bits, pixelsPerDst); } } if (!w) break; /* * Load another set and reset number of available units */ LoadBits; n = unitsPerSrc; if (n > w) n = w; } } /* * Consume stipple bits for endmask */ if (endmask) { if (endNeedsLoad) { LoadBits; } mask = fbBits[FbLeftStipBits(bits, pixelsPerDst)]; if (mask || !transparent) FbDoRightMaskByteStippleRRop(dst, mask, fgand, fgxor, bgand, bgxor, endbyte, endmask); } dst += dstStride; src += srcStride; } } /* * Not very efficient, but simple -- copy a single plane * from an N bit image to a 1 bit image */ void fbBltPlane(FbBits * src, FbStride srcStride, int srcX, int srcBpp, FbStip * dst, FbStride dstStride, int dstX, int width, int height, FbStip fgand, FbStip fgxor, FbStip bgand, FbStip bgxor, Pixel planeMask) { FbBits *s; FbBits pm; FbBits srcMask; FbBits srcMaskFirst; FbBits srcMask0 = 0; FbBits srcBits; FbStip dstBits; FbStip *d; FbStip dstMask; FbStip dstMaskFirst; FbStip dstUnion; int w; int wt; if (!width) return; src += srcX >> FB_SHIFT; srcX &= FB_MASK; dst += dstX >> FB_STIP_SHIFT; dstX &= FB_STIP_MASK; w = width / srcBpp; pm = fbReplicatePixel(planeMask, srcBpp); srcMaskFirst = pm & FbBitsMask(srcX, srcBpp); srcMask0 = pm & FbBitsMask(0, srcBpp); dstMaskFirst = FbStipMask(dstX, 1); while (height--) { d = dst; dst += dstStride; s = src; src += srcStride; srcMask = srcMaskFirst; srcBits = READ(s++); dstMask = dstMaskFirst; dstUnion = 0; dstBits = 0; wt = w; while (wt--) { if (!srcMask) { srcBits = READ(s++); srcMask = srcMask0; } if (!dstMask) { WRITE(d, FbStippleRRopMask(READ(d), dstBits, fgand, fgxor, bgand, bgxor, dstUnion)); d++; dstMask = FbStipMask(0, 1); dstUnion = 0; dstBits = 0; } if (srcBits & srcMask) dstBits |= dstMask; dstUnion |= dstMask; if (srcBpp == FB_UNIT) srcMask = 0; else srcMask = FbScrRight(srcMask, srcBpp); dstMask = FbStipRight(dstMask, 1); } if (dstUnion) WRITE(d, FbStippleRRopMask(READ(d), dstBits, fgand, fgxor, bgand, bgxor, dstUnion)); } } xorg-server-21.1.16/fb/fbcmap_mi.c0000644000175000017500000000637714757411105012320 /* * Copyright (c) 1987, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * This version of fbcmap.c is implemented in terms of mi functions. * These functions used to be in fbcmap.c and depended upon the symbol * XFree86Server being defined. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "fb.h" #include "micmap.h" int fbListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps) { return miListInstalledColormaps(pScreen, pmaps); } void fbInstallColormap(ColormapPtr pmap) { miInstallColormap(pmap); } void fbUninstallColormap(ColormapPtr pmap) { miUninstallColormap(pmap); } void fbResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual) { miResolveColor(pred, pgreen, pblue, pVisual); } Bool fbInitializeColormap(ColormapPtr pmap) { return miInitializeColormap(pmap); } int fbExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs, xColorItem * outdefs) { return miExpandDirectColors(pmap, ndef, indefs, outdefs); } Bool fbCreateDefColormap(ScreenPtr pScreen) { return miCreateDefColormap(pScreen); } void fbClearVisualTypes(void) { miClearVisualTypes(); } Bool fbSetVisualTypes(int depth, int visuals, int bitsPerRGB) { return miSetVisualTypes(depth, visuals, bitsPerRGB, -1); } Bool fbSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, Pixel redMask, Pixel greenMask, Pixel blueMask) { return miSetVisualTypesAndMasks(depth, visuals, bitsPerRGB, -1, redMask, greenMask, blueMask); } /* * Given a list of formats for a screen, create a list * of visuals and depths for the screen which correspond to * the set which can be used with this version of fb. */ Bool fbInitVisuals(VisualPtr * visualp, DepthPtr * depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB) { return miInitVisuals(visualp, depthp, nvisualp, ndepthp, rootDepthp, defaultVisp, sizes, bitsPerRGB, -1); } xorg-server-21.1.16/fb/fbcopy.c0000644000175000017500000002241414757411105011653 /* * Copyright © 1998 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 #endif #include #include "fb.h" void fbCopyNtoN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { CARD8 alu = pGC ? pGC->alu : GXcopy; FbBits pm = pGC ? fbGetGCPrivate(pGC)->pm : FB_ALLONES; FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { #ifndef FB_ACCESS_WRAPPER /* pixman_blt() doesn't support accessors yet */ if (pm == FB_ALLONES && alu == GXcopy && !reverse && !upsidedown) { if (!pixman_blt ((uint32_t *) src, (uint32_t *) dst, srcStride, dstStride, srcBpp, dstBpp, (pbox->x1 + dx + srcXoff), (pbox->y1 + dy + srcYoff), (pbox->x1 + dstXoff), (pbox->y1 + dstYoff), (pbox->x2 - pbox->x1), (pbox->y2 - pbox->y1))) goto fallback; else goto next; } fallback: #endif fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, (pbox->x1 + dx + srcXoff) * srcBpp, dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), alu, pm, dstBpp, reverse, upsidedown); #ifndef FB_ACCESS_WRAPPER next: #endif pbox++; } fbFinishAccess(pDstDrawable); fbFinishAccess(pSrcDrawable); } void fbCopy1toN(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { if (dstBpp == 1) { fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, (pbox->x1 + dx + srcXoff) * srcBpp, dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), FbOpaqueStipple1Rop(pGC->alu, pGC->fgPixel, pGC->bgPixel), pPriv->pm, dstBpp, reverse, upsidedown); } else { fbBltOne((FbStip *) (src + (pbox->y1 + dy + srcYoff) * srcStride), srcStride * (FB_UNIT / FB_STIP_UNIT), (pbox->x1 + dx + srcXoff), dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); } pbox++; } fbFinishAccess(pDstDrawable); fbFinishAccess(pSrcDrawable); } void fbCopyNto1(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); while (nbox--) { if (pDstDrawable->bitsPerPixel == 1) { FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbStip *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetStipDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbBltPlane(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, (pbox->x1 + dx + srcXoff) * srcBpp, srcBpp, dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * srcBpp, (pbox->y2 - pbox->y1), (FbStip) pPriv->and, (FbStip) pPriv->xor, (FbStip) pPriv->bgand, (FbStip) pPriv->bgxor, bitplane); fbFinishAccess(pDstDrawable); fbFinishAccess(pSrcDrawable); } else { FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbStip *tmp; FbStride tmpStride; int width, height; width = pbox->x2 - pbox->x1; height = pbox->y2 - pbox->y1; tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT); tmp = xallocarray(tmpStride * height, sizeof(FbStip)); if (!tmp) return; fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); fbBltPlane(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, (pbox->x1 + dx + srcXoff) * srcBpp, srcBpp, tmp, tmpStride, 0, width * srcBpp, height, fbAndStip(GXcopy, FB_ALLONES, FB_ALLONES), fbXorStip(GXcopy, FB_ALLONES, FB_ALLONES), fbAndStip(GXcopy, 0, FB_ALLONES), fbXorStip(GXcopy, 0, FB_ALLONES), bitplane); fbBltOne(tmp, tmpStride, 0, dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); free(tmp); fbFinishAccess(pDstDrawable); fbFinishAccess(pSrcDrawable); } pbox++; } } RegionPtr fbCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut) { return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopyNtoN, 0, 0); } RegionPtr fbCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut, unsigned long bitplane) { if (pSrcDrawable->bitsPerPixel > 1) return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopyNto1, (Pixel) bitplane, 0); else if (bitplane & 1) return miDoCopy(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, fbCopy1toN, (Pixel) bitplane, 0); else return miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut); } xorg-server-21.1.16/fb/fbfill.c0000644000175000017500000002115014757411105011623 /* * Copyright © 1998 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 #endif #include "fb.h" static void fbTile(FbBits * dst, FbStride dstStride, int dstX, int width, int height, FbBits * tile, FbStride tileStride, int tileWidth, int tileHeight, int alu, FbBits pm, int bpp, int xRot, int yRot) { int tileX, tileY; int widthTmp; int h, w; int x, y; modulus(-yRot, tileHeight, tileY); y = 0; while (height) { h = tileHeight - tileY; if (h > height) h = height; height -= h; widthTmp = width; x = dstX; modulus(dstX - xRot, tileWidth, tileX); while (widthTmp) { w = tileWidth - tileX; if (w > widthTmp) w = widthTmp; widthTmp -= w; fbBlt(tile + tileY * tileStride, tileStride, tileX, dst + y * dstStride, dstStride, x, w, h, alu, pm, bpp, FALSE, FALSE); x += w; tileX = 0; } y += h; tileY = 0; } } static void fbStipple(FbBits * dst, FbStride dstStride, int dstX, int dstBpp, int width, int height, FbStip * stip, FbStride stipStride, int stipWidth, int stipHeight, FbBits fgand, FbBits fgxor, FbBits bgand, FbBits bgxor, int xRot, int yRot) { int stipX, stipY, sx; int widthTmp; int h, w; int x, y; modulus(-yRot, stipHeight, stipY); modulus(dstX / dstBpp - xRot, stipWidth, stipX); y = 0; while (height) { h = stipHeight - stipY; if (h > height) h = height; height -= h; widthTmp = width; x = dstX; sx = stipX; while (widthTmp) { w = (stipWidth - sx) * dstBpp; if (w > widthTmp) w = widthTmp; widthTmp -= w; fbBltOne(stip + stipY * stipStride, stipStride, sx, dst + y * dstStride, dstStride, x, dstBpp, w, h, fgand, fgxor, bgand, bgxor); x += w; sx = 0; } y += h; stipY = 0; } } void fbFill(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int width, int height) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); switch (pGC->fillStyle) { case FillSolid: #ifndef FB_ACCESS_WRAPPER if (pPriv->and || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, x + dstXoff, y + dstYoff, width, height, pPriv->xor)) #endif fbSolid(dst + (y + dstYoff) * dstStride, dstStride, (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, pPriv->and, pPriv->xor); break; case FillStippled: case FillOpaqueStippled:{ PixmapPtr pStip = pGC->stipple; int stipWidth = pStip->drawable.width; int stipHeight = pStip->drawable.height; if (dstBpp == 1) { int alu; FbBits *stip; FbStride stipStride; int stipBpp; _X_UNUSED int stipXoff, stipYoff; if (pGC->fillStyle == FillStippled) alu = FbStipple1Rop(pGC->alu, pGC->fgPixel); else alu = FbOpaqueStipple1Rop(pGC->alu, pGC->fgPixel, pGC->bgPixel); fbGetDrawable(&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); fbTile(dst + (y + dstYoff) * dstStride, dstStride, x + dstXoff, width, height, stip, stipStride, stipWidth, stipHeight, alu, pPriv->pm, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff), pGC->patOrg.y + pDrawable->y - y); fbFinishAccess(&pStip->drawable); } else { FbStip *stip; FbStride stipStride; int stipBpp; _X_UNUSED int stipXoff, stipYoff; FbBits fgand, fgxor, bgand, bgxor; fgand = pPriv->and; fgxor = pPriv->xor; if (pGC->fillStyle == FillStippled) { bgand = fbAnd(GXnoop, (FbBits) 0, FB_ALLONES); bgxor = fbXor(GXnoop, (FbBits) 0, FB_ALLONES); } else { bgand = pPriv->bgand; bgxor = pPriv->bgxor; } fbGetStipDrawable(&pStip->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); fbStipple(dst + (y + dstYoff) * dstStride, dstStride, (x + dstXoff) * dstBpp, dstBpp, width * dstBpp, height, stip, stipStride, stipWidth, stipHeight, fgand, fgxor, bgand, bgxor, pGC->patOrg.x + pDrawable->x + dstXoff, pGC->patOrg.y + pDrawable->y - y); fbFinishAccess(&pStip->drawable); } break; } case FillTiled:{ PixmapPtr pTile = pGC->tile.pixmap; FbBits *tile; FbStride tileStride; int tileBpp; int tileWidth; int tileHeight; _X_UNUSED int tileXoff, tileYoff; fbGetDrawable(&pTile->drawable, tile, tileStride, tileBpp, tileXoff, tileYoff); tileWidth = pTile->drawable.width; tileHeight = pTile->drawable.height; fbTile(dst + (y + dstYoff) * dstStride, dstStride, (x + dstXoff) * dstBpp, width * dstBpp, height, tile, tileStride, tileWidth * tileBpp, tileHeight, pGC->alu, pPriv->pm, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, pGC->patOrg.y + pDrawable->y - y); fbFinishAccess(&pTile->drawable); break; } } fbValidateDrawable(pDrawable); fbFinishAccess(pDrawable); } void fbSolidBoxClipped(DrawablePtr pDrawable, RegionPtr pClip, int x1, int y1, int x2, int y2, FbBits and, FbBits xor) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; BoxPtr pbox; int nbox; int partX1, partX2, partY1, partY2; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { partX1 = pbox->x1; if (partX1 < x1) partX1 = x1; partX2 = pbox->x2; if (partX2 > x2) partX2 = x2; if (partX2 <= partX1) continue; partY1 = pbox->y1; if (partY1 < y1) partY1 = y1; partY2 = pbox->y2; if (partY2 > y2) partY2 = y2; if (partY2 <= partY1) continue; #ifndef FB_ACCESS_WRAPPER if (and || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, partX1 + dstXoff, partY1 + dstYoff, (partX2 - partX1), (partY2 - partY1), xor)) #endif fbSolid(dst + (partY1 + dstYoff) * dstStride, dstStride, (partX1 + dstXoff) * dstBpp, dstBpp, (partX2 - partX1) * dstBpp, (partY2 - partY1), and, xor); } fbFinishAccess(pDrawable); } xorg-server-21.1.16/fb/fbfillrect.c0000644000175000017500000000647414757411105012515 /* * Copyright © 1998 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 #endif #include "fb.h" void fbPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrect, xRectangle *prect) { RegionPtr pClip = fbGetCompositeClip(pGC); register BoxPtr pbox; BoxPtr pextent; int extentX1, extentX2, extentY1, extentY2; int fullX1, fullX2, fullY1, fullY2; int partX1, partX2, partY1, partY2; int xorg, yorg; int n; xorg = pDrawable->x; yorg = pDrawable->y; pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; extentY2 = pextent->y2; while (nrect--) { fullX1 = prect->x + xorg; fullY1 = prect->y + yorg; fullX2 = fullX1 + (int) prect->width; fullY2 = fullY1 + (int) prect->height; prect++; if (fullX1 < extentX1) fullX1 = extentX1; if (fullY1 < extentY1) fullY1 = extentY1; if (fullX2 > extentX2) fullX2 = extentX2; if (fullY2 > extentY2) fullY2 = extentY2; if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) continue; n = RegionNumRects(pClip); if (n == 1) { fbFill(pDrawable, pGC, fullX1, fullY1, fullX2 - fullX1, fullY2 - fullY1); } else { pbox = RegionRects(pClip); /* * clip the rectangle to each box in the clip region * this is logically equivalent to calling Intersect() */ while (n--) { partX1 = pbox->x1; if (partX1 < fullX1) partX1 = fullX1; partY1 = pbox->y1; if (partY1 < fullY1) partY1 = fullY1; partX2 = pbox->x2; if (partX2 > fullX2) partX2 = fullX2; partY2 = pbox->y2; if (partY2 > fullY2) partY2 = fullY2; pbox++; if (partX1 < partX2 && partY1 < partY2) fbFill(pDrawable, pGC, partX1, partY1, partX2 - partX1, partY2 - partY1); } } } } xorg-server-21.1.16/fb/fbfillsp.c0000644000175000017500000000547314757411105012200 /* * Copyright © 1998 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 #endif #include "fb.h" void fbFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, DDXPointPtr ppt, int *pwidth, int fSorted) { RegionPtr pClip = fbGetCompositeClip(pGC); BoxPtr pextent, pbox; int nbox; int extentX1, extentX2, extentY1, extentY2; int fullX1, fullX2, fullY1; int partX1, partX2; pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; extentY2 = pextent->y2; while (n--) { fullX1 = ppt->x; fullY1 = ppt->y; fullX2 = fullX1 + (int) *pwidth; ppt++; pwidth++; if (fullY1 < extentY1 || extentY2 <= fullY1) continue; if (fullX1 < extentX1) fullX1 = extentX1; if (fullX2 > extentX2) fullX2 = extentX2; if (fullX1 >= fullX2) continue; nbox = RegionNumRects(pClip); if (nbox == 1) { fbFill(pDrawable, pGC, fullX1, fullY1, fullX2 - fullX1, 1); } else { pbox = RegionRects(pClip); while (nbox--) { if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) { partX1 = pbox->x1; if (partX1 < fullX1) partX1 = fullX1; partX2 = pbox->x2; if (partX2 > fullX2) partX2 = fullX2; if (partX2 > partX1) { fbFill(pDrawable, pGC, partX1, fullY1, partX2 - partX1, 1); } } pbox++; } } } } xorg-server-21.1.16/fb/fbgc.c0000644000175000017500000001162314757411105011272 /* * Copyright © 1998 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 #endif #include #include "fb.h" const GCFuncs fbGCFuncs = { fbValidateGC, miChangeGC, miCopyGC, miDestroyGC, miChangeClip, miDestroyClip, miCopyClip, }; const GCOps fbGCOps = { fbFillSpans, fbSetSpans, fbPutImage, fbCopyArea, fbCopyPlane, fbPolyPoint, fbPolyLine, fbPolySegment, fbPolyRectangle, fbPolyArc, miFillPolygon, fbPolyFillRect, fbPolyFillArc, miPolyText8, miPolyText16, miImageText8, miImageText16, fbImageGlyphBlt, fbPolyGlyphBlt, fbPushPixels }; Bool fbCreateGC(GCPtr pGC) { pGC->ops = (GCOps *) &fbGCOps; pGC->funcs = (GCFuncs *) &fbGCFuncs; /* fb wants to translate before scan conversion */ pGC->miTranslate = 1; pGC->fExpose = 1; return TRUE; } /* * Pad pixmap to FB_UNIT bits wide */ void fbPadPixmap(PixmapPtr pPixmap) { int width; FbBits *bits; FbBits b; FbBits mask; int height; int w; int stride; int bpp; _X_UNUSED int xOff, yOff; fbGetDrawable(&pPixmap->drawable, bits, stride, bpp, xOff, yOff); width = pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel; height = pPixmap->drawable.height; mask = FbBitsMask(0, width); while (height--) { b = READ(bits) & mask; w = width; while (w < FB_UNIT) { b = b | FbScrRight(b, w); w <<= 1; } WRITE(bits, b); bits += stride; } fbFinishAccess(&pPixmap->drawable); } void fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbBits mask; /* * if the client clip is different or moved OR the subwindowMode has * changed OR the window's clip has changed since the last validation * we need to recompute the composite clip */ if ((changes & (GCClipXOrigin | GCClipYOrigin | GCClipMask | GCSubwindowMode)) || (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS)) ) { miComputeCompositeClip(pGC, pDrawable); } if (changes & GCTile) { if (!pGC->tileIsPixel && FbEvenTile(pGC->tile.pixmap->drawable.width * pDrawable->bitsPerPixel)) fbPadPixmap(pGC->tile.pixmap); } if (changes & GCStipple) { if (pGC->stipple) { if (pGC->stipple->drawable.width * pDrawable->bitsPerPixel < FB_UNIT) fbPadPixmap(pGC->stipple); } } /* * Recompute reduced rop values */ if (changes & (GCForeground | GCBackground | GCPlaneMask | GCFunction)) { int s; FbBits depthMask; mask = FbFullMask(pDrawable->bitsPerPixel); depthMask = FbFullMask(pDrawable->depth); pPriv->fg = pGC->fgPixel & mask; pPriv->bg = pGC->bgPixel & mask; if ((pGC->planemask & depthMask) == depthMask) pPriv->pm = mask; else pPriv->pm = pGC->planemask & mask; s = pDrawable->bitsPerPixel; while (s < FB_UNIT) { pPriv->fg |= pPriv->fg << s; pPriv->bg |= pPriv->bg << s; pPriv->pm |= pPriv->pm << s; s <<= 1; } pPriv->and = fbAnd(pGC->alu, pPriv->fg, pPriv->pm); pPriv->xor = fbXor(pGC->alu, pPriv->fg, pPriv->pm); pPriv->bgand = fbAnd(pGC->alu, pPriv->bg, pPriv->pm); pPriv->bgxor = fbXor(pGC->alu, pPriv->bg, pPriv->pm); } if (changes & GCDashList) { unsigned short n = pGC->numInDashList; unsigned char *dash = pGC->dash; unsigned int dashLength = 0; while (n--) dashLength += (unsigned int) *dash++; pPriv->dashLength = dashLength; } } xorg-server-21.1.16/fb/fbgetsp.c0000644000175000017500000000433114757411105012021 /* * Copyright © 1998 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 #endif #include "fb.h" void fbGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pchardstStart) { FbBits *src, *dst; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; int xoff; /* * XFree86 DDX empties the root borderClip when the VT is * switched away; this checks for that case */ if (!fbDrawableEnabled(pDrawable)) return; fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); while (nspans--) { xoff = (int) (((long) pchardstStart) & (FB_MASK >> 3)); dst = (FbBits *) (pchardstStart - xoff); xoff <<= 3; fbBlt(src + (ppt->y + srcYoff) * srcStride, srcStride, (ppt->x + srcXoff) * srcBpp, dst, 1, xoff, *pwidth * srcBpp, 1, GXcopy, FB_ALLONES, srcBpp, FALSE, FALSE); pchardstStart += PixmapBytePad(*pwidth, pDrawable->depth); ppt++; pwidth++; } fbFinishAccess(pDrawable); } xorg-server-21.1.16/fb/fbglyph.c0000644000175000017500000001637414757411105012034 /* * * Copyright © 1998 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 #endif #include "fb.h" #include #include "dixfontstr.h" static Bool fbGlyphIn(RegionPtr pRegion, int x, int y, int width, int height) { BoxRec box; BoxPtr pExtents = RegionExtents(pRegion); /* * Check extents by hand to avoid 16 bit overflows */ if (x < (int) pExtents->x1) return FALSE; if ((int) pExtents->x2 < x + width) return FALSE; if (y < (int) pExtents->y1) return FALSE; if ((int) pExtents->y2 < y + height) return FALSE; box.x1 = x; box.x2 = x + width; box.y1 = y; box.y2 = y + height; return RegionContainsRect(pRegion, &box) == rgnIN; } void fbPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); CharInfoPtr pci; unsigned char *pglyph; /* pointer bits in glyph */ int gx, gy; int gWidth, gHeight; /* width and height of glyph */ FbStride gStride; /* stride of glyph */ void (*glyph) (FbBits *, FbStride, int, FbStip *, FbBits, int, int); FbBits *dst = 0; FbStride dstStride = 0; int dstBpp = 0; int dstXoff = 0, dstYoff = 0; glyph = 0; if (pGC->fillStyle == FillSolid && pPriv->and == 0) { dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; case 32: glyph = fbGlyph32; break; } } x += pDrawable->x; y += pDrawable->y; while (nglyph--) { pci = *ppci++; pglyph = FONTGLYPHBITS(pglyphBase, pci); gWidth = GLYPHWIDTHPIXELS(pci); gHeight = GLYPHHEIGHTPIXELS(pci); if (gWidth && gHeight) { gx = x + pci->metrics.leftSideBearing; gy = y - pci->metrics.ascent; if (glyph && gWidth <= sizeof(FbStip) * 8 && fbGlyphIn(fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, (FbStip *) pglyph, pPriv->xor, gx + dstXoff, gHeight); fbFinishAccess(pDrawable); } else { gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof(FbStip); fbPushImage(pDrawable, pGC, (FbStip *) pglyph, gStride, 0, gx, gy, gWidth, gHeight); } } x += pci->metrics.characterWidth; } } void fbImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppciInit, void *pglyphBase) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); CharInfoPtr *ppci; CharInfoPtr pci; unsigned char *pglyph; /* pointer bits in glyph */ int gWidth, gHeight; /* width and height of glyph */ FbStride gStride; /* stride of glyph */ Bool opaque; int n; int gx, gy; void (*glyph) (FbBits *, FbStride, int, FbStip *, FbBits, int, int); FbBits *dst = 0; FbStride dstStride = 0; int dstBpp = 0; int dstXoff = 0, dstYoff = 0; glyph = 0; if (pPriv->and == 0) { dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; case 32: glyph = fbGlyph32; break; } } x += pDrawable->x; y += pDrawable->y; if (TERMINALFONT(pGC->font) && !glyph) { opaque = TRUE; } else { int xBack, widthBack; int yBack, heightBack; ppci = ppciInit; n = nglyph; widthBack = 0; while (n--) widthBack += (*ppci++)->metrics.characterWidth; xBack = x; if (widthBack < 0) { xBack += widthBack; widthBack = -widthBack; } yBack = y - FONTASCENT(pGC->font); heightBack = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); fbSolidBoxClipped(pDrawable, fbGetCompositeClip(pGC), xBack, yBack, xBack + widthBack, yBack + heightBack, fbAnd(GXcopy, pPriv->bg, pPriv->pm), fbXor(GXcopy, pPriv->bg, pPriv->pm)); opaque = FALSE; } ppci = ppciInit; while (nglyph--) { pci = *ppci++; pglyph = FONTGLYPHBITS(pglyphBase, pci); gWidth = GLYPHWIDTHPIXELS(pci); gHeight = GLYPHHEIGHTPIXELS(pci); if (gWidth && gHeight) { gx = x + pci->metrics.leftSideBearing; gy = y - pci->metrics.ascent; if (glyph && gWidth <= sizeof(FbStip) * 8 && fbGlyphIn(fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, (FbStip *) pglyph, pPriv->fg, gx + dstXoff, gHeight); fbFinishAccess(pDrawable); } else { gStride = GLYPHWIDTHBYTESPADDED(pci) / sizeof(FbStip); fbPutXYImage(pDrawable, fbGetCompositeClip(pGC), pPriv->fg, pPriv->bg, pPriv->pm, GXcopy, opaque, gx, gy, gWidth, gHeight, (FbStip *) pglyph, gStride, 0); } } x += pci->metrics.characterWidth; } } xorg-server-21.1.16/fb/fbimage.c0000644000175000017500000002003214757411105011755 /* * Copyright © 1998 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 #endif #include #include "fb.h" void fbPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); unsigned long i; FbStride srcStride; FbStip *src = (FbStip *) pImage; x += pDrawable->x; y += pDrawable->y; switch (format) { case XYBitmap: srcStride = BitmapBytePad(w + leftPad) / sizeof(FbStip); fbPutXYImage(pDrawable, fbGetCompositeClip(pGC), pPriv->fg, pPriv->bg, pPriv->pm, pGC->alu, TRUE, x, y, w, h, src, srcStride, leftPad); break; case XYPixmap: srcStride = BitmapBytePad(w + leftPad) / sizeof(FbStip); for (i = (unsigned long) 1 << (pDrawable->depth - 1); i; i >>= 1) { if (i & pGC->planemask) { fbPutXYImage(pDrawable, fbGetCompositeClip(pGC), FB_ALLONES, 0, fbReplicatePixel(i, pDrawable->bitsPerPixel), pGC->alu, TRUE, x, y, w, h, src, srcStride, leftPad); } src += srcStride * h; } break; case ZPixmap: srcStride = PixmapBytePad(w, pDrawable->depth) / sizeof(FbStip); fbPutZImage(pDrawable, fbGetCompositeClip(pGC), pGC->alu, pPriv->pm, x, y, w, h, src, srcStride); } } void fbPutZImage(DrawablePtr pDrawable, RegionPtr pClip, int alu, FbBits pm, int x, int y, int width, int height, FbStip * src, FbStride srcStride) { FbStip *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; int nbox; BoxPtr pbox; int x1, y1, x2, y2; fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { x1 = x; y1 = y; x2 = x + width; y2 = y + height; if (x1 < pbox->x1) x1 = pbox->x1; if (y1 < pbox->y1) y1 = pbox->y1; if (x2 > pbox->x2) x2 = pbox->x2; if (y2 > pbox->y2) y2 = pbox->y2; if (x1 >= x2 || y1 >= y2) continue; fbBltStip(src + (y1 - y) * srcStride, srcStride, (x1 - x) * dstBpp, dst + (y1 + dstYoff) * dstStride, dstStride, (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, (y2 - y1), alu, pm, dstBpp); } fbFinishAccess(pDrawable); } void fbPutXYImage(DrawablePtr pDrawable, RegionPtr pClip, FbBits fg, FbBits bg, FbBits pm, int alu, Bool opaque, int x, int y, int width, int height, FbStip * src, FbStride srcStride, int srcX) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; int nbox; BoxPtr pbox; int x1, y1, x2, y2; FbBits fgand = 0, fgxor = 0, bgand = 0, bgxor = 0; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); if (dstBpp == 1) { if (opaque) alu = FbOpaqueStipple1Rop(alu, fg, bg); else alu = FbStipple1Rop(alu, fg); } else { fgand = fbAnd(alu, fg, pm); fgxor = fbXor(alu, fg, pm); if (opaque) { bgand = fbAnd(alu, bg, pm); bgxor = fbXor(alu, bg, pm); } else { bgand = fbAnd(GXnoop, (FbBits) 0, FB_ALLONES); bgxor = fbXor(GXnoop, (FbBits) 0, FB_ALLONES); } } for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { x1 = x; y1 = y; x2 = x + width; y2 = y + height; if (x1 < pbox->x1) x1 = pbox->x1; if (y1 < pbox->y1) y1 = pbox->y1; if (x2 > pbox->x2) x2 = pbox->x2; if (y2 > pbox->y2) y2 = pbox->y2; if (x1 >= x2 || y1 >= y2) continue; if (dstBpp == 1) { fbBltStip(src + (y1 - y) * srcStride, srcStride, (x1 - x) + srcX, (FbStip *) (dst + (y1 + dstYoff) * dstStride), FbBitsStrideToStipStride(dstStride), (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, (y2 - y1), alu, pm, dstBpp); } else { fbBltOne(src + (y1 - y) * srcStride, srcStride, (x1 - x) + srcX, dst + (y1 + dstYoff) * dstStride, dstStride, (x1 + dstXoff) * dstBpp, dstBpp, (x2 - x1) * dstBpp, (y2 - y1), fgand, fgxor, bgand, bgxor); } } fbFinishAccess(pDrawable); } void fbGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d) { FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbStip *dst; FbStride dstStride; /* * XFree86 DDX empties the root borderClip when the VT is * switched away; this checks for that case */ if (!fbDrawableEnabled(pDrawable)) return; fbGetDrawable(pDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); x += pDrawable->x; y += pDrawable->y; dst = (FbStip *) d; if (format == ZPixmap || srcBpp == 1) { FbBits pm; pm = fbReplicatePixel(planeMask, srcBpp); dstStride = PixmapBytePad(w, pDrawable->depth); dstStride /= sizeof(FbStip); fbBltStip((FbStip *) (src + (y + srcYoff) * srcStride), FbBitsStrideToStipStride(srcStride), (x + srcXoff) * srcBpp, dst, dstStride, 0, w * srcBpp, h, GXcopy, FB_ALLONES, srcBpp); if (pm != FB_ALLONES) { for (int i = 0; i < dstStride * h; i++) dst[i] &= pm; } } else { dstStride = BitmapBytePad(w) / sizeof(FbStip); fbBltPlane(src + (y + srcYoff) * srcStride, srcStride, (x + srcXoff) * srcBpp, srcBpp, dst, dstStride, 0, w * srcBpp, h, fbAndStip(GXcopy, FB_STIP_ALLONES, FB_STIP_ALLONES), fbXorStip(GXcopy, FB_STIP_ALLONES, FB_STIP_ALLONES), fbAndStip(GXcopy, 0, FB_STIP_ALLONES), fbXorStip(GXcopy, 0, FB_STIP_ALLONES), planeMask); } fbFinishAccess(pDrawable); } xorg-server-21.1.16/fb/fbline.c0000644000175000017500000001013714757411105011627 /* * Copyright © 1998 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 #endif #include "fb.h" static void fbZeroLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { int x1, y1, x2, y2; int x, y; int dashOffset; x = pDrawable->x; y = pDrawable->y; x1 = ppt->x; y1 = ppt->y; dashOffset = pGC->dashOffset; while (--npt) { ++ppt; x2 = ppt->x; y2 = ppt->y; if (mode == CoordModePrevious) { x2 += x1; y2 += y1; } fbSegment(pDrawable, pGC, x1 + x, y1 + y, x2 + x, y2 + y, npt == 1 && pGC->capStyle != CapNotLast, &dashOffset); x1 = x2; y1 = y2; } } static void fbZeroSegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pSegs) { int dashOffset; int x, y; Bool drawLast = pGC->capStyle != CapNotLast; x = pDrawable->x; y = pDrawable->y; while (nseg--) { dashOffset = pGC->dashOffset; fbSegment(pDrawable, pGC, pSegs->x1 + x, pSegs->y1 + y, pSegs->x2 + x, pSegs->y2 + y, drawLast, &dashOffset); pSegs++; } } void fbFixCoordModePrevious(int npt, DDXPointPtr ppt) { int x, y; x = ppt->x; y = ppt->y; npt--; while (npt--) { ppt++; x = (ppt->x += x); y = (ppt->y += y); } } void fbPolyLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { void (*line) (DrawablePtr, GCPtr, int mode, int npt, DDXPointPtr ppt); if (pGC->lineWidth == 0) { line = fbZeroLine; if (pGC->fillStyle == FillSolid && pGC->lineStyle == LineSolid && RegionNumRects(fbGetCompositeClip(pGC)) == 1) { switch (pDrawable->bitsPerPixel) { case 8: line = fbPolyline8; break; case 16: line = fbPolyline16; break; case 32: line = fbPolyline32; break; } } } else { if (pGC->lineStyle != LineSolid) line = miWideDash; else line = miWideLine; } (*line) (pDrawable, pGC, mode, npt, ppt); } void fbPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg) { void (*seg) (DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment * pseg); if (pGC->lineWidth == 0) { seg = fbZeroSegment; if (pGC->fillStyle == FillSolid && pGC->lineStyle == LineSolid && RegionNumRects(fbGetCompositeClip(pGC)) == 1) { switch (pDrawable->bitsPerPixel) { case 8: seg = fbPolySegment8; break; case 16: seg = fbPolySegment16; break; case 32: seg = fbPolySegment32; break; } } } else { seg = miPolySegment; } (*seg) (pDrawable, pGC, nseg, pseg); } xorg-server-21.1.16/fb/fboverlay.c0000644000175000017500000002417414757411105012367 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "fb.h" #include "fboverlay.h" #include "shmint.h" static DevPrivateKeyRec fbOverlayScreenPrivateKeyRec; #define fbOverlayScreenPrivateKey (&fbOverlayScreenPrivateKeyRec) DevPrivateKey fbOverlayGetScreenPrivateKey(void) { return fbOverlayScreenPrivateKey; } /* * Replace this if you want something supporting * multiple overlays with the same depth */ Bool fbOverlayCreateWindow(WindowPtr pWin) { FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); int i; PixmapPtr pPixmap; if (pWin->drawable.class != InputOutput) return TRUE; for (i = 0; i < pScrPriv->nlayers; i++) { pPixmap = pScrPriv->layer[i].u.run.pixmap; if (pWin->drawable.depth == pPixmap->drawable.depth) { dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), pPixmap); /* * Make sure layer keys are written correctly by * having non-root layers set to full while the * root layer is set to empty. This will cause * all of the layers to get painted when the root * is mapped */ if (!pWin->parent) { RegionEmpty(&pScrPriv->layer[i].u.run.region); } return TRUE; } } return FALSE; } Bool fbOverlayCloseScreen(ScreenPtr pScreen) { FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); int i; for (i = 0; i < pScrPriv->nlayers; i++) { (*pScreen->DestroyPixmap) (pScrPriv->layer[i].u.run.pixmap); RegionUninit(&pScrPriv->layer[i].u.run.region); } return TRUE; } /* * Return layer containing this window */ int fbOverlayWindowLayer(WindowPtr pWin) { FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); int i; for (i = 0; i < pScrPriv->nlayers; i++) if (dixLookupPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin)) == (void *) pScrPriv->layer[i].u.run.pixmap) return i; return 0; } Bool fbOverlayCreateScreenResources(ScreenPtr pScreen) { int i; FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); PixmapPtr pPixmap; void *pbits; int width; int depth; BoxRec box; if (!miCreateScreenResources(pScreen)) return FALSE; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; for (i = 0; i < pScrPriv->nlayers; i++) { pbits = pScrPriv->layer[i].u.init.pbits; width = pScrPriv->layer[i].u.init.width; depth = pScrPriv->layer[i].u.init.depth; pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, depth, 0); if (!pPixmap) return FALSE; if (!(*pScreen->ModifyPixmapHeader) (pPixmap, pScreen->width, pScreen->height, depth, BitsPerPixel(depth), PixmapBytePad(width, depth), pbits)) return FALSE; pScrPriv->layer[i].u.run.pixmap = pPixmap; RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0); } pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap; return TRUE; } void fbOverlayPaintKey(DrawablePtr pDrawable, RegionPtr pRegion, CARD32 pixel, int layer) { fbFillRegionSolid(pDrawable, pRegion, 0, fbReplicatePixel(pixel, pDrawable->bitsPerPixel)); } /* * Track visible region for each layer */ void fbOverlayUpdateLayerRegion(ScreenPtr pScreen, int layer, RegionPtr prgn) { FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); int i; RegionRec rgnNew; if (!prgn || !RegionNotEmpty(prgn)) return; for (i = 0; i < pScrPriv->nlayers; i++) { if (i == layer) { /* add new piece to this fb */ RegionUnion(&pScrPriv->layer[i].u.run.region, &pScrPriv->layer[i].u.run.region, prgn); } else if (RegionNotEmpty(&pScrPriv->layer[i].u.run.region)) { /* paint new piece with chroma key */ RegionNull(&rgnNew); RegionIntersect(&rgnNew, prgn, &pScrPriv->layer[i].u.run.region); (*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable, &rgnNew, pScrPriv->layer[i].key, i); RegionUninit(&rgnNew); /* remove piece from other fbs */ RegionSubtract(&pScrPriv->layer[i].u.run.region, &pScrPriv->layer[i].u.run.region, prgn); } } } /* * Copy only areas in each layer containing real bits */ void fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); RegionRec rgnDst; int dx, dy; int i; RegionRec layerRgn[FB_OVERLAY_MAX]; PixmapPtr pPixmap; dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; /* * Clip to existing bits */ RegionTranslate(prgnSrc, -dx, -dy); RegionNull(&rgnDst); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); RegionTranslate(&rgnDst, dx, dy); /* * Compute the portion of each fb affected by this copy */ for (i = 0; i < pScrPriv->nlayers; i++) { RegionNull(&layerRgn[i]); RegionIntersect(&layerRgn[i], &rgnDst, &pScrPriv->layer[i].u.run.region); if (RegionNotEmpty(&layerRgn[i])) { RegionTranslate(&layerRgn[i], -dx, -dy); pPixmap = pScrPriv->layer[i].u.run.pixmap; miCopyRegion(&pPixmap->drawable, &pPixmap->drawable, 0, &layerRgn[i], dx, dy, pScrPriv->CopyWindow, 0, (void *) (long) i); } } /* * Update regions */ for (i = 0; i < pScrPriv->nlayers; i++) { if (RegionNotEmpty(&layerRgn[i])) fbOverlayUpdateLayerRegion(pScreen, i, &layerRgn[i]); RegionUninit(&layerRgn[i]); } RegionUninit(&rgnDst); } void fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { fbOverlayUpdateLayerRegion(pWin->drawable.pScreen, fbOverlayWindowLayer(pWin), prgn); miWindowExposures(pWin, prgn); } Bool fbOverlaySetupScreen(ScreenPtr pScreen, void *pbits1, void *pbits2, int xsize, int ysize, int dpix, int dpiy, int width1, int width2, int bpp1, int bpp2) { return fbSetupScreen(pScreen, pbits1, xsize, ysize, dpix, dpiy, width1, bpp1); } Bool fbOverlayFinishScreenInit(ScreenPtr pScreen, void *pbits1, void *pbits2, int xsize, int ysize, int dpix, int dpiy, int width1, int width2, int bpp1, int bpp2, int depth1, int depth2) { VisualPtr visuals; DepthPtr depths; int nvisuals; int ndepths; VisualID defaultVisual; FbOverlayScrPrivPtr pScrPriv; if (!dixRegisterPrivateKey (&fbOverlayScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (bpp1 == 24 || bpp2 == 24) return FALSE; pScrPriv = malloc(sizeof(FbOverlayScrPrivRec)); if (!pScrPriv) return FALSE; if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &depth1, &defaultVisual, ((unsigned long) 1 << (bpp1 - 1)) | ((unsigned long) 1 << (bpp2 - 1)), 8)) { free(pScrPriv); return FALSE; } if (!miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0, depth1, ndepths, depths, defaultVisual, nvisuals, visuals)) { free(pScrPriv); return FALSE; } /* MI thinks there's no frame buffer */ #ifdef MITSHM ShmRegisterFbFuncs(pScreen); #endif pScreen->minInstalledCmaps = 1; pScreen->maxInstalledCmaps = 2; pScrPriv->nlayers = 2; pScrPriv->PaintKey = fbOverlayPaintKey; pScrPriv->CopyWindow = fbCopyWindowProc; pScrPriv->layer[0].u.init.pbits = pbits1; pScrPriv->layer[0].u.init.width = width1; pScrPriv->layer[0].u.init.depth = depth1; pScrPriv->layer[1].u.init.pbits = pbits2; pScrPriv->layer[1].u.init.width = width2; pScrPriv->layer[1].u.init.depth = depth2; dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv); /* overwrite miCloseScreen with our own */ pScreen->CloseScreen = fbOverlayCloseScreen; pScreen->CreateScreenResources = fbOverlayCreateScreenResources; pScreen->CreateWindow = fbOverlayCreateWindow; pScreen->WindowExposures = fbOverlayWindowExposures; pScreen->CopyWindow = fbOverlayCopyWindow; return TRUE; } xorg-server-21.1.16/fb/fbpict.c0000644000175000017500000003414214757411105011641 /* * * Copyright © 2000 SuSE, Inc. * Copyright © 2007 Red Hat, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "fb.h" #include "picturestr.h" #include "mipict.h" #include "fbpict.h" void fbComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { pixman_image_t *src, *mask, *dest; int src_xoff, src_yoff; int msk_xoff, msk_yoff; int dst_xoff, dst_yoff; miCompositeSourceValidate(pSrc); if (pMask) miCompositeSourceValidate(pMask); src = image_from_pict(pSrc, FALSE, &src_xoff, &src_yoff); mask = image_from_pict(pMask, FALSE, &msk_xoff, &msk_yoff); dest = image_from_pict(pDst, TRUE, &dst_xoff, &dst_yoff); if (src && dest && !(pMask && !mask)) { pixman_image_composite(op, src, mask, dest, xSrc + src_xoff, ySrc + src_yoff, xMask + msk_xoff, yMask + msk_yoff, xDst + dst_xoff, yDst + dst_yoff, width, height); } free_pixman_pict(pSrc, src); free_pixman_pict(pMask, mask); free_pixman_pict(pDst, dest); } static pixman_glyph_cache_t *glyphCache; void fbDestroyGlyphCache(void) { if (glyphCache) { pixman_glyph_cache_destroy (glyphCache); glyphCache = NULL; } } static void fbUnrealizeGlyph(ScreenPtr pScreen, GlyphPtr pGlyph) { if (glyphCache) pixman_glyph_cache_remove (glyphCache, pGlyph, NULL); } void fbGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr *glyphs) { #define N_STACK_GLYPHS 512 ScreenPtr pScreen = pDst->pDrawable->pScreen; pixman_glyph_t stack_glyphs[N_STACK_GLYPHS]; pixman_glyph_t *pglyphs = stack_glyphs; pixman_image_t *srcImage, *dstImage; int srcXoff, srcYoff, dstXoff, dstYoff; GlyphPtr glyph; int n_glyphs; int x, y; int i, n; int xDst = list->xOff, yDst = list->yOff; miCompositeSourceValidate(pSrc); n_glyphs = 0; for (i = 0; i < nlist; ++i) n_glyphs += list[i].len; if (!glyphCache) glyphCache = pixman_glyph_cache_create(); pixman_glyph_cache_freeze (glyphCache); if (n_glyphs > N_STACK_GLYPHS) { if (!(pglyphs = xallocarray(n_glyphs, sizeof(pixman_glyph_t)))) goto out; } i = 0; x = y = 0; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; while (n--) { const void *g; glyph = *glyphs++; if (!(g = pixman_glyph_cache_lookup (glyphCache, glyph, NULL))) { pixman_image_t *glyphImage; PicturePtr pPicture; int xoff, yoff; pPicture = GetGlyphPicture(glyph, pScreen); if (!pPicture) { n_glyphs--; goto next; } if (!(glyphImage = image_from_pict(pPicture, FALSE, &xoff, &yoff))) goto out; g = pixman_glyph_cache_insert(glyphCache, glyph, NULL, glyph->info.x, glyph->info.y, glyphImage); free_pixman_pict(pPicture, glyphImage); if (!g) goto out; } pglyphs[i].x = x; pglyphs[i].y = y; pglyphs[i].glyph = g; i++; next: x += glyph->info.xOff; y += glyph->info.yOff; } list++; } if (!(srcImage = image_from_pict(pSrc, FALSE, &srcXoff, &srcYoff))) goto out; if (!(dstImage = image_from_pict(pDst, TRUE, &dstXoff, &dstYoff))) goto out_free_src; if (maskFormat) { pixman_format_code_t format; pixman_box32_t extents; format = maskFormat->format | (maskFormat->depth << 24); pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents); pixman_composite_glyphs(op, srcImage, dstImage, format, xSrc + srcXoff + extents.x1 - xDst, ySrc + srcYoff + extents.y1 - yDst, extents.x1, extents.y1, extents.x1 + dstXoff, extents.y1 + dstYoff, extents.x2 - extents.x1, extents.y2 - extents.y1, glyphCache, n_glyphs, pglyphs); } else { pixman_composite_glyphs_no_mask(op, srcImage, dstImage, xSrc + srcXoff - xDst, ySrc + srcYoff - yDst, dstXoff, dstYoff, glyphCache, n_glyphs, pglyphs); } free_pixman_pict(pDst, dstImage); out_free_src: free_pixman_pict(pSrc, srcImage); out: pixman_glyph_cache_thaw(glyphCache); if (pglyphs != stack_glyphs) free(pglyphs); } static pixman_image_t * create_solid_fill_image(PicturePtr pict) { PictSolidFill *solid = &pict->pSourcePict->solidFill; /* pixman_color_t and xRenderColor have the same layout */ pixman_color_t *color = (pixman_color_t *)&solid->fullcolor; return pixman_image_create_solid_fill(color); } static pixman_image_t * create_linear_gradient_image(PictGradient * gradient) { PictLinearGradient *linear = (PictLinearGradient *) gradient; pixman_point_fixed_t p1; pixman_point_fixed_t p2; p1.x = linear->p1.x; p1.y = linear->p1.y; p2.x = linear->p2.x; p2.y = linear->p2.y; return pixman_image_create_linear_gradient(&p1, &p2, (pixman_gradient_stop_t *) gradient->stops, gradient->nstops); } static pixman_image_t * create_radial_gradient_image(PictGradient * gradient) { PictRadialGradient *radial = (PictRadialGradient *) gradient; pixman_point_fixed_t c1; pixman_point_fixed_t c2; c1.x = radial->c1.x; c1.y = radial->c1.y; c2.x = radial->c2.x; c2.y = radial->c2.y; return pixman_image_create_radial_gradient(&c1, &c2, radial->c1.radius, radial->c2.radius, (pixman_gradient_stop_t *) gradient->stops, gradient->nstops); } static pixman_image_t * create_conical_gradient_image(PictGradient * gradient) { PictConicalGradient *conical = (PictConicalGradient *) gradient; pixman_point_fixed_t center; center.x = conical->center.x; center.y = conical->center.y; return pixman_image_create_conical_gradient(¢er, conical->angle, (pixman_gradient_stop_t *) gradient->stops, gradient->nstops); } static pixman_image_t * create_bits_picture(PicturePtr pict, Bool has_clip, int *xoff, int *yoff) { PixmapPtr pixmap; FbBits *bits; FbStride stride; int bpp; pixman_image_t *image; fbGetDrawablePixmap(pict->pDrawable, pixmap, *xoff, *yoff); fbGetPixmapBitsData(pixmap, bits, stride, bpp); image = pixman_image_create_bits((pixman_format_code_t) pict->format, pixmap->drawable.width, pixmap->drawable.height, (uint32_t *) bits, stride * sizeof(FbStride)); if (!image) return NULL; #ifdef FB_ACCESS_WRAPPER pixman_image_set_accessors(image, (pixman_read_memory_func_t) wfbReadMemory, (pixman_write_memory_func_t) wfbWriteMemory); #endif /* pCompositeClip is undefined for source pictures, so * only set the clip region for pictures with drawables */ if (has_clip) { if (pict->clientClip) pixman_image_set_has_client_clip(image, TRUE); if (*xoff || *yoff) pixman_region_translate(pict->pCompositeClip, *xoff, *yoff); pixman_image_set_clip_region(image, pict->pCompositeClip); if (*xoff || *yoff) pixman_region_translate(pict->pCompositeClip, -*xoff, -*yoff); } /* Indexed table */ if (pict->pFormat->index.devPrivate) pixman_image_set_indexed(image, pict->pFormat->index.devPrivate); /* Add in drawable origin to position within the image */ *xoff += pict->pDrawable->x; *yoff += pict->pDrawable->y; return image; } static pixman_image_t *image_from_pict_internal(PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map); static void image_destroy(pixman_image_t *image, void *data) { fbFinishAccess((DrawablePtr)data); } static void set_image_properties(pixman_image_t * image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map) { pixman_repeat_t repeat; pixman_filter_t filter; if (pict->transform) { /* For source images, adjust the transform to account * for the drawable offset within the pixman image, * then set the offset to 0 as it will be used * to compute positions within the transformed image. */ if (!has_clip) { struct pixman_transform adjusted; adjusted = *pict->transform; pixman_transform_translate(&adjusted, NULL, pixman_int_to_fixed(*xoff), pixman_int_to_fixed(*yoff)); pixman_image_set_transform(image, &adjusted); *xoff = 0; *yoff = 0; } else pixman_image_set_transform(image, pict->transform); } switch (pict->repeatType) { default: case RepeatNone: repeat = PIXMAN_REPEAT_NONE; break; case RepeatPad: repeat = PIXMAN_REPEAT_PAD; break; case RepeatNormal: repeat = PIXMAN_REPEAT_NORMAL; break; case RepeatReflect: repeat = PIXMAN_REPEAT_REFLECT; break; } pixman_image_set_repeat(image, repeat); /* Fetch alpha map unless 'pict' is being used * as the alpha map for this operation */ if (pict->alphaMap && !is_alpha_map) { int alpha_xoff, alpha_yoff; pixman_image_t *alpha_map = image_from_pict_internal(pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff, TRUE); pixman_image_set_alpha_map(image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y); free_pixman_pict(pict->alphaMap, alpha_map); } pixman_image_set_component_alpha(image, pict->componentAlpha); switch (pict->filter) { default: case PictFilterNearest: case PictFilterFast: filter = PIXMAN_FILTER_NEAREST; break; case PictFilterBilinear: case PictFilterGood: filter = PIXMAN_FILTER_BILINEAR; break; case PictFilterConvolution: filter = PIXMAN_FILTER_CONVOLUTION; break; } if (pict->pDrawable) pixman_image_set_destroy_function(image, &image_destroy, pict->pDrawable); pixman_image_set_filter(image, filter, (pixman_fixed_t *) pict->filter_params, pict->filter_nparams); pixman_image_set_source_clipping(image, TRUE); } static pixman_image_t * image_from_pict_internal(PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map) { pixman_image_t *image = NULL; if (!pict) return NULL; if (pict->pDrawable) { image = create_bits_picture(pict, has_clip, xoff, yoff); } else if (pict->pSourcePict) { SourcePict *sp = pict->pSourcePict; if (sp->type == SourcePictTypeSolidFill) { image = create_solid_fill_image(pict); } else { PictGradient *gradient = &pict->pSourcePict->gradient; if (sp->type == SourcePictTypeLinear) image = create_linear_gradient_image(gradient); else if (sp->type == SourcePictTypeRadial) image = create_radial_gradient_image(gradient); else if (sp->type == SourcePictTypeConical) image = create_conical_gradient_image(gradient); } *xoff = *yoff = 0; } if (image) set_image_properties(image, pict, has_clip, xoff, yoff, is_alpha_map); return image; } pixman_image_t * image_from_pict(PicturePtr pict, Bool has_clip, int *xoff, int *yoff) { return image_from_pict_internal(pict, has_clip, xoff, yoff, FALSE); } void free_pixman_pict(PicturePtr pict, pixman_image_t * image) { if (image) pixman_image_unref(image); } Bool fbPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; if (!miPictureInit(pScreen, formats, nformats)) return FALSE; ps = GetPictureScreen(pScreen); ps->Composite = fbComposite; ps->Glyphs = fbGlyphs; ps->UnrealizeGlyph = fbUnrealizeGlyph; ps->CompositeRects = miCompositeRects; ps->RasterizeTrapezoid = fbRasterizeTrapezoid; ps->Trapezoids = fbTrapezoids; ps->AddTraps = fbAddTraps; ps->AddTriangles = fbAddTriangles; ps->Triangles = fbTriangles; return TRUE; } xorg-server-21.1.16/fb/fbpixmap.c0000644000175000017500000002536614757411105012210 /* * Copyright © 1998 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 #endif #include #include "fb.h" PixmapPtr fbCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint) { PixmapPtr pPixmap; size_t datasize; size_t paddedWidth; int adjust; int base; int bpp = BitsPerPixel(depth); paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); if (paddedWidth / 4 > 32767 || height > 32767) return NullPixmap; datasize = height * paddedWidth; base = pScreen->totalPixmapSize; adjust = 0; if (base & 7) adjust = 8 - (base & 7); datasize += adjust; #ifdef FB_DEBUG datasize += 2 * paddedWidth; #endif pPixmap = AllocatePixmap(pScreen, datasize); if (!pPixmap) return NullPixmap; pPixmap->drawable.type = DRAWABLE_PIXMAP; pPixmap->drawable.class = 0; pPixmap->drawable.pScreen = pScreen; pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = bpp; pPixmap->drawable.id = 0; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap + base + adjust); pPixmap->primary_pixmap = NULL; #ifdef FB_DEBUG pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth); fbInitializeDrawable(&pPixmap->drawable); #endif #ifdef COMPOSITE pPixmap->screen_x = 0; pPixmap->screen_y = 0; #endif pPixmap->usage_hint = usage_hint; return pPixmap; } Bool fbDestroyPixmap(PixmapPtr pPixmap) { if (--pPixmap->refcnt) return TRUE; FreePixmap(pPixmap); return TRUE; } #define ADDRECT(reg,r,fr,rx1,ry1,rx2,ry2) \ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ (!((reg)->data->numRects && \ ((r-1)->y1 == (ry1)) && \ ((r-1)->y2 == (ry2)) && \ ((r-1)->x1 <= (rx1)) && \ ((r-1)->x2 >= (rx2))))) \ { \ if ((reg)->data->numRects == (reg)->data->size) \ { \ RegionRectAlloc(reg, 1); \ fr = RegionBoxptr(reg); \ r = fr + (reg)->data->numRects; \ } \ r->x1 = (rx1); \ r->y1 = (ry1); \ r->x2 = (rx2); \ r->y2 = (ry2); \ (reg)->data->numRects++; \ if(r->x1 < (reg)->extents.x1) \ (reg)->extents.x1 = r->x1; \ if(r->x2 > (reg)->extents.x2) \ (reg)->extents.x2 = r->x2; \ r++; \ } /* Convert bitmap clip mask into clipping region. * First, goes through each line and makes boxes by noting the transitions * from 0 to 1 and 1 to 0. * Then it coalesces the current line with the previous if they have boxes * at the same X coordinates. */ RegionPtr fbPixmapToRegion(PixmapPtr pPix) { register RegionPtr pReg; FbBits *pw, w; register int ib; int width, h, base, rx1 = 0, crects; FbBits *pwLineEnd; int irectPrevStart, irectLineStart; register BoxPtr prectO, prectN; BoxPtr FirstRect, rects, prectLineStart; Bool fInBox, fSame; register FbBits mask0 = FB_ALLONES & ~FbScrRight(FB_ALLONES, 1); FbBits *pwLine; int nWidth; pReg = RegionCreate(NULL, 1); if (!pReg) return NullRegion; FirstRect = RegionBoxptr(pReg); rects = FirstRect; fbPrepareAccess(&pPix->drawable); pwLine = (FbBits *) pPix->devPrivate.ptr; nWidth = pPix->devKind >> (FB_SHIFT - 3); width = pPix->drawable.width; pReg->extents.x1 = width - 1; pReg->extents.x2 = 0; irectPrevStart = -1; for (h = 0; h < pPix->drawable.height; h++) { pw = pwLine; pwLine += nWidth; irectLineStart = rects - FirstRect; /* If the Screen left most bit of the word is set, we're starting in * a box */ if (READ(pw) & mask0) { fInBox = TRUE; rx1 = 0; } else fInBox = FALSE; /* Process all words which are fully in the pixmap */ pwLineEnd = pw + (width >> FB_SHIFT); for (base = 0; pw < pwLineEnd; base += FB_UNIT) { w = READ(pw++); if (fInBox) { if (!~w) continue; } else { if (!w) continue; } for (ib = 0; ib < FB_UNIT; ib++) { /* If the Screen left most bit of the word is set, we're * starting a box */ if (w & mask0) { if (!fInBox) { rx1 = base + ib; /* start new box */ fInBox = TRUE; } } else { if (fInBox) { /* end box */ ADDRECT(pReg, rects, FirstRect, rx1, h, base + ib, h + 1); fInBox = FALSE; } } /* Shift the word VISUALLY left one. */ w = FbScrLeft(w, 1); } } if (width & FB_MASK) { /* Process final partial word on line */ w = READ(pw++); for (ib = 0; ib < (width & FB_MASK); ib++) { /* If the Screen left most bit of the word is set, we're * starting a box */ if (w & mask0) { if (!fInBox) { rx1 = base + ib; /* start new box */ fInBox = TRUE; } } else { if (fInBox) { /* end box */ ADDRECT(pReg, rects, FirstRect, rx1, h, base + ib, h + 1); fInBox = FALSE; } } /* Shift the word VISUALLY left one. */ w = FbScrLeft(w, 1); } } /* If scanline ended with last bit set, end the box */ if (fInBox) { ADDRECT(pReg, rects, FirstRect, rx1, h, base + (width & FB_MASK), h + 1); } /* if all rectangles on this line have the same x-coords as * those on the previous line, then add 1 to all the previous y2s and * throw away all the rectangles from this line */ fSame = FALSE; if (irectPrevStart != -1) { crects = irectLineStart - irectPrevStart; if (crects == ((rects - FirstRect) - irectLineStart)) { prectO = FirstRect + irectPrevStart; prectN = prectLineStart = FirstRect + irectLineStart; fSame = TRUE; while (prectO < prectLineStart) { if ((prectO->x1 != prectN->x1) || (prectO->x2 != prectN->x2)) { fSame = FALSE; break; } prectO++; prectN++; } if (fSame) { prectO = FirstRect + irectPrevStart; while (prectO < prectLineStart) { prectO->y2 += 1; prectO++; } rects -= crects; pReg->data->numRects -= crects; } } } if (!fSame) irectPrevStart = irectLineStart; } if (!pReg->data->numRects) pReg->extents.x1 = pReg->extents.x2 = 0; else { pReg->extents.y1 = RegionBoxptr(pReg)->y1; pReg->extents.y2 = RegionEnd(pReg)->y2; if (pReg->data->numRects == 1) { free(pReg->data); pReg->data = (RegDataPtr) NULL; } } fbFinishAccess(&pPix->drawable); #ifdef DEBUG if (!RegionIsValid(pReg)) FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); #endif return pReg; } #ifdef FB_DEBUG #ifndef WIN32 #include #else #include #endif static Bool fbValidateBits(FbStip * bits, int stride, FbStip data) { while (stride--) { if (*bits != data) { #ifdef WIN32 NCD_DEBUG((DEBUG_FAILURE, "fdValidateBits failed at 0x%x (is 0x%x want 0x%x)", bits, *bits, data)); #else fprintf(stderr, "fbValidateBits failed\n"); #endif return FALSE; } bits++; } } void fbValidateDrawable(DrawablePtr pDrawable) { FbStip *bits, *first, *last; int stride, bpp; int xoff, yoff; int height; Bool failed; if (pDrawable->type != DRAWABLE_PIXMAP) pDrawable = (DrawablePtr) fbGetWindowPixmap(pDrawable); fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); first = bits - stride; last = bits + stride * pDrawable->height; if (!fbValidateBits(first, stride, FB_HEAD_BITS) || !fbValidateBits(last, stride, FB_TAIL_BITS)) fbInitializeDrawable(pDrawable); fbFinishAccess(pDrawable); } void fbSetBits(FbStip * bits, int stride, FbStip data) { while (stride--) *bits++ = data; } void fbInitializeDrawable(DrawablePtr pDrawable) { FbStip *bits, *first, *last; int stride, bpp; int xoff, yoff; fbGetStipDrawable(pDrawable, bits, stride, bpp, xoff, yoff); first = bits - stride; last = bits + stride * pDrawable->height; fbSetBits(first, stride, FB_HEAD_BITS); fbSetBits(last, stride, FB_TAIL_BITS); fbFinishAccess(pDrawable); } #endif /* FB_DEBUG */ xorg-server-21.1.16/fb/fbpoint.c0000644000175000017500000000721514757411105012034 /* * Copyright © 1998 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 #endif #include "fb.h" typedef void (*FbDots) (FbBits * dst, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * pts, int npt, int xorg, int yorg, int xoff, int yoff, FbBits and, FbBits xor); static void fbDots(FbBits * dstOrig, FbStride dstStride, int dstBpp, BoxPtr pBox, xPoint * pts, int npt, int xorg, int yorg, int xoff, int yoff, FbBits andOrig, FbBits xorOrig) { FbStip *dst = (FbStip *) dstOrig; int x1, y1, x2, y2; int x, y; FbStip *d; FbStip and = andOrig; FbStip xor = xorOrig; dstStride = FbBitsStrideToStipStride(dstStride); x1 = pBox->x1; y1 = pBox->y1; x2 = pBox->x2; y2 = pBox->y2; while (npt--) { x = pts->x + xorg; y = pts->y + yorg; pts++; if (x1 <= x && x < x2 && y1 <= y && y < y2) { FbStip mask; x = (x + xoff) * dstBpp; d = dst + ((y + yoff) * dstStride) + (x >> FB_STIP_SHIFT); x &= FB_STIP_MASK; mask = FbStipMask(x, dstBpp); WRITE(d, FbDoMaskRRop(READ(d), and, xor, mask)); } } } void fbPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int nptInit, xPoint * pptInit) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); RegionPtr pClip = fbGetCompositeClip(pGC); FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbDots dots; FbBits and, xor; xPoint *ppt; int npt; BoxPtr pBox; int nBox; /* make pointlist origin relative */ ppt = pptInit; npt = nptInit; if (mode == CoordModePrevious) { npt--; while (npt--) { ppt++; ppt->x += (ppt - 1)->x; ppt->y += (ppt - 1)->y; } } fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); and = pPriv->and; xor = pPriv->xor; dots = fbDots; switch (dstBpp) { case 8: dots = fbDots8; break; case 16: dots = fbDots16; break; case 32: dots = fbDots32; break; } for (nBox = RegionNumRects(pClip), pBox = RegionRects(pClip); nBox--; pBox++) (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor); fbFinishAccess(pDrawable); } xorg-server-21.1.16/fb/fbpush.c0000644000175000017500000001316514757411105011663 /* * Copyright © 1998 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 #endif #include "fb.h" static void fbPushPattern(DrawablePtr pDrawable, GCPtr pGC, FbStip * src, FbStride srcStride, int srcX, int x, int y, int width, int height) { FbStip *s, bitsMask, bitsMask0, bits; int xspan; int w; int lenspan; src += srcX >> FB_STIP_SHIFT; srcX &= FB_STIP_MASK; bitsMask0 = FbStipMask(srcX, 1); while (height--) { bitsMask = bitsMask0; w = width; s = src; src += srcStride; bits = READ(s++); xspan = x; while (w) { if (bits & bitsMask) { lenspan = 0; do { lenspan++; if (lenspan == w) break; bitsMask = FbStipRight(bitsMask, 1); if (!bitsMask) { bits = READ(s++); bitsMask = FbBitsMask(0, 1); } } while (bits & bitsMask); fbFill(pDrawable, pGC, xspan, y, lenspan, 1); xspan += lenspan; w -= lenspan; } else { do { w--; xspan++; if (!w) break; bitsMask = FbStipRight(bitsMask, 1); if (!bitsMask) { bits = READ(s++); bitsMask = FbBitsMask(0, 1); } } while (!(bits & bitsMask)); } } y++; } } static void fbPushFill(DrawablePtr pDrawable, GCPtr pGC, FbStip * src, FbStride srcStride, int srcX, int x, int y, int width, int height) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); if (pGC->fillStyle == FillSolid) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; int dstX; int dstWidth; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); dst = dst + (y + dstYoff) * dstStride; dstX = (x + dstXoff) * dstBpp; dstWidth = width * dstBpp; if (dstBpp == 1) { fbBltStip(src, srcStride, srcX, (FbStip *) dst, FbBitsStrideToStipStride(dstStride), dstX, dstWidth, height, FbStipple1Rop(pGC->alu, pGC->fgPixel), pPriv->pm, dstBpp); } else { fbBltOne(src, srcStride, srcX, dst, dstStride, dstX, dstBpp, dstWidth, height, pPriv->and, pPriv->xor, fbAnd(GXnoop, (FbBits) 0, FB_ALLONES), fbXor(GXnoop, (FbBits) 0, FB_ALLONES)); } fbFinishAccess(pDrawable); } else { fbPushPattern(pDrawable, pGC, src, srcStride, srcX, x, y, width, height); } } void fbPushImage(DrawablePtr pDrawable, GCPtr pGC, FbStip * src, FbStride srcStride, int srcX, int x, int y, int width, int height) { RegionPtr pClip = fbGetCompositeClip(pGC); int nbox; BoxPtr pbox; int x1, y1, x2, y2; for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { x1 = x; y1 = y; x2 = x + width; y2 = y + height; if (x1 < pbox->x1) x1 = pbox->x1; if (y1 < pbox->y1) y1 = pbox->y1; if (x2 > pbox->x2) x2 = pbox->x2; if (y2 > pbox->y2) y2 = pbox->y2; if (x1 >= x2 || y1 >= y2) continue; fbPushFill(pDrawable, pGC, src + (y1 - y) * srcStride, srcStride, srcX + (x1 - x), x1, y1, x2 - x1, y2 - y1); } } void fbPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) { FbStip *stip; FbStride stipStride; int stipBpp; _X_UNUSED int stipXoff, stipYoff; fbGetStipDrawable(&pBitmap->drawable, stip, stipStride, stipBpp, stipXoff, stipYoff); fbPushImage(pDrawable, pGC, stip, stipStride, 0, xOrg, yOrg, dx, dy); } xorg-server-21.1.16/fb/fbscreen.c0000644000175000017500000001541314757411105012161 /* * Copyright © 1998 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 #endif #include "fb.h" Bool fbCloseScreen(ScreenPtr pScreen) { int d; DepthPtr depths = pScreen->allowedDepths; fbDestroyGlyphCache(); for (d = 0; d < pScreen->numDepths; d++) free(depths[d].vids); free(depths); free(pScreen->visuals); if (pScreen->devPrivate) FreePixmap((PixmapPtr)pScreen->devPrivate); return TRUE; } Bool fbRealizeFont(ScreenPtr pScreen, FontPtr pFont) { return TRUE; } Bool fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) { return TRUE; } void fbQueryBestSize(int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen) { unsigned short w; switch (class) { case CursorShape: if (*width > pScreen->width) *width = pScreen->width; if (*height > pScreen->height) *height = pScreen->height; break; case TileShape: case StippleShape: w = *width; if ((w & (w - 1)) && w < FB_UNIT) { for (w = 1; w < *width; w <<= 1); *width = w; } } } PixmapPtr _fbGetWindowPixmap(WindowPtr pWindow) { return fbGetWindowPixmap(pWindow); } void _fbSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap) { dixSetPrivate(&pWindow->devPrivates, fbGetWinPrivateKey(pWindow), pPixmap); } Bool fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */ int xsize, /* in pixels */ int ysize, int dpix, /* dots per inch */ int dpiy, int width, /* pixel width of frame buffer */ int bpp) { /* bits per pixel for screen */ if (!fbAllocatePrivates(pScreen)) return FALSE; pScreen->defColormap = FakeClientID(0); /* let CreateDefColormap do whatever it wants for pixels */ pScreen->blackPixel = pScreen->whitePixel = (Pixel) 0; pScreen->QueryBestSize = fbQueryBestSize; /* SaveScreen */ pScreen->GetImage = fbGetImage; pScreen->GetSpans = fbGetSpans; pScreen->CreateWindow = fbCreateWindow; pScreen->DestroyWindow = fbDestroyWindow; pScreen->PositionWindow = fbPositionWindow; pScreen->ChangeWindowAttributes = fbChangeWindowAttributes; pScreen->RealizeWindow = fbRealizeWindow; pScreen->UnrealizeWindow = fbUnrealizeWindow; pScreen->CopyWindow = fbCopyWindow; pScreen->CreatePixmap = fbCreatePixmap; pScreen->DestroyPixmap = fbDestroyPixmap; pScreen->RealizeFont = fbRealizeFont; pScreen->UnrealizeFont = fbUnrealizeFont; pScreen->CreateGC = fbCreateGC; pScreen->CreateColormap = fbInitializeColormap; pScreen->DestroyColormap = (void (*)(ColormapPtr)) NoopDDA; pScreen->InstallColormap = fbInstallColormap; pScreen->UninstallColormap = fbUninstallColormap; pScreen->ListInstalledColormaps = fbListInstalledColormaps; pScreen->StoreColors = (void (*)(ColormapPtr, int, xColorItem *)) NoopDDA; pScreen->ResolveColor = fbResolveColor; pScreen->BitmapToRegion = fbPixmapToRegion; pScreen->GetWindowPixmap = _fbGetWindowPixmap; pScreen->SetWindowPixmap = _fbSetWindowPixmap; return TRUE; } #ifdef FB_ACCESS_WRAPPER Bool wfbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap) #else Bool fbFinishScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp) #endif { VisualPtr visuals; DepthPtr depths; int nvisuals; int ndepths; int rootdepth; VisualID defaultVisual; #ifdef FB_DEBUG int stride; ysize -= 2; stride = (width * bpp) / 8; fbSetBits((FbStip *) pbits, stride / sizeof(FbStip), FB_HEAD_BITS); pbits = (void *) ((char *) pbits + stride); fbSetBits((FbStip *) ((char *) pbits + stride * ysize), stride / sizeof(FbStip), FB_TAIL_BITS); #endif /* fb requires power-of-two bpp */ if (Ones(bpp) != 1) return FALSE; #ifdef FB_ACCESS_WRAPPER fbGetScreenPrivate(pScreen)->setupWrap = setupWrap; fbGetScreenPrivate(pScreen)->finishWrap = finishWrap; #endif rootdepth = 0; if (!fbInitVisuals(&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual, ((unsigned long) 1 << (bpp - 1)), 8)) return FALSE; if (!miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, rootdepth, ndepths, depths, defaultVisual, nvisuals, visuals)) return FALSE; /* overwrite miCloseScreen with our own */ pScreen->CloseScreen = fbCloseScreen; return TRUE; } /* dts * (inch/dot) * (25.4 mm / inch) = mm */ #ifdef FB_ACCESS_WRAPPER Bool wfbScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp, SetupWrapProcPtr setupWrap, FinishWrapProcPtr finishWrap) { if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) return FALSE; if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp, setupWrap, finishWrap)) return FALSE; return TRUE; } #else Bool fbScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int bpp) { if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) return FALSE; if (!fbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) return FALSE; return TRUE; } #endif xorg-server-21.1.16/fb/fbseg.c0000644000175000017500000003113014757411105011452 /* * Copyright © 1998 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 #endif #include #include "fb.h" #include "miline.h" #define fbBresShiftMask(mask,dir,bpp) ((bpp == FB_STIP_UNIT) ? 0 : \ ((dir < 0) ? FbStipLeft(mask,bpp) : \ FbStipRight(mask,bpp))) static void fbBresSolid(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { FbStip *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbStip and = (FbStip) pPriv->and; FbStip xor = (FbStip) pPriv->xor; FbStip mask, mask0; FbStip bits; fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); dst += ((y1 + dstYoff) * dstStride); x1 = (x1 + dstXoff) * dstBpp; dst += x1 >> FB_STIP_SHIFT; x1 &= FB_STIP_MASK; mask0 = FbStipMask(0, dstBpp); mask = FbStipRight(mask0, x1); if (signdx < 0) mask0 = FbStipRight(mask0, FB_STIP_UNIT - dstBpp); if (signdy < 0) dstStride = -dstStride; if (axis == X_AXIS) { bits = 0; while (len--) { bits |= mask; mask = fbBresShiftMask(mask, signdx, dstBpp); if (!mask) { WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits)); bits = 0; dst += signdx; mask = mask0; } e += e1; if (e >= 0) { if (bits) { WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); bits = 0; } dst += dstStride; e += e3; } } if (bits) WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, bits)); } else { while (len--) { WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask)); dst += dstStride; e += e1; if (e >= 0) { e += e3; mask = fbBresShiftMask(mask, signdx, dstBpp); if (!mask) { dst += signdx; mask = mask0; } } } } fbFinishAccess(pDrawable); } static void fbBresDash(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { FbStip *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbStip and = (FbStip) pPriv->and; FbStip xor = (FbStip) pPriv->xor; FbStip bgand = (FbStip) pPriv->bgand; FbStip bgxor = (FbStip) pPriv->bgxor; FbStip mask, mask0; FbDashDeclare; int dashlen; Bool even; Bool doOdd; fbGetStipDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); doOdd = pGC->lineStyle == LineDoubleDash; FbDashInit(pGC, pPriv, dashOffset, dashlen, even); dst += ((y1 + dstYoff) * dstStride); x1 = (x1 + dstXoff) * dstBpp; dst += x1 >> FB_STIP_SHIFT; x1 &= FB_STIP_MASK; mask0 = FbStipMask(0, dstBpp); mask = FbStipRight(mask0, x1); if (signdx < 0) mask0 = FbStipRight(mask0, FB_STIP_UNIT - dstBpp); if (signdy < 0) dstStride = -dstStride; while (len--) { if (even) WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, mask)); else if (doOdd) WRITE(dst, FbDoMaskRRop(READ(dst), bgand, bgxor, mask)); if (axis == X_AXIS) { mask = fbBresShiftMask(mask, signdx, dstBpp); if (!mask) { dst += signdx; mask = mask0; } e += e1; if (e >= 0) { dst += dstStride; e += e3; } } else { dst += dstStride; e += e1; if (e >= 0) { e += e3; mask = fbBresShiftMask(mask, signdx, dstBpp); if (!mask) { dst += signdx; mask = mask0; } } } FbDashStep(dashlen, even); } fbFinishAccess(pDrawable); } static void fbBresFill(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { while (len--) { fbFill(pDrawable, pGC, x1, y1, 1, 1); if (axis == X_AXIS) { x1 += signdx; e += e1; if (e >= 0) { e += e3; y1 += signdy; } } else { y1 += signdy; e += e1; if (e >= 0) { e += e3; x1 += signdx; } } } } static void fbSetFg(DrawablePtr pDrawable, GCPtr pGC, Pixel fg) { if (fg != pGC->fgPixel) { ChangeGCVal val; val.val = fg; ChangeGC(NullClient, pGC, GCForeground, &val); ValidateGC(pDrawable, pGC); } } static void fbBresFillDash(DrawablePtr pDrawable, GCPtr pGC, int dashOffset, int signdx, int signdy, int axis, int x1, int y1, int e, int e1, int e3, int len) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); FbDashDeclare; int dashlen; Bool even; Bool doOdd; Bool doBg; Pixel fg, bg; fg = pGC->fgPixel; bg = pGC->bgPixel; /* whether to fill the odd dashes */ doOdd = pGC->lineStyle == LineDoubleDash; /* whether to switch fg to bg when filling odd dashes */ doBg = doOdd && (pGC->fillStyle == FillSolid || pGC->fillStyle == FillStippled); /* compute current dash position */ FbDashInit(pGC, pPriv, dashOffset, dashlen, even); while (len--) { if (even || doOdd) { if (doBg) { if (even) fbSetFg(pDrawable, pGC, fg); else fbSetFg(pDrawable, pGC, bg); } fbFill(pDrawable, pGC, x1, y1, 1, 1); } if (axis == X_AXIS) { x1 += signdx; e += e1; if (e >= 0) { e += e3; y1 += signdy; } } else { y1 += signdy; e += e1; if (e >= 0) { e += e3; x1 += signdx; } } FbDashStep(dashlen, even); } if (doBg) fbSetFg(pDrawable, pGC, fg); } /* * For drivers that want to bail drawing some lines, this * function takes care of selecting the appropriate rasterizer * based on the contents of the specified GC. */ static FbBres * fbSelectBres(DrawablePtr pDrawable, GCPtr pGC) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); int dstBpp = pDrawable->bitsPerPixel; FbBres *bres; if (pGC->lineStyle == LineSolid) { bres = fbBresFill; if (pGC->fillStyle == FillSolid) { bres = fbBresSolid; if (pPriv->and == 0) { switch (dstBpp) { case 8: bres = fbBresSolid8; break; case 16: bres = fbBresSolid16; break; case 32: bres = fbBresSolid32; break; } } } } else { bres = fbBresFillDash; if (pGC->fillStyle == FillSolid) { bres = fbBresDash; if (pPriv->and == 0 && (pGC->lineStyle == LineOnOffDash || pPriv->bgand == 0)) { switch (dstBpp) { case 8: bres = fbBresDash8; break; case 16: bres = fbBresDash16; break; case 32: bres = fbBresDash32; break; } } } } return bres; } void fbSegment(DrawablePtr pDrawable, GCPtr pGC, int x1, int y1, int x2, int y2, Bool drawLast, int *dashOffset) { FbBres *bres; RegionPtr pClip = fbGetCompositeClip(pGC); BoxPtr pBox; int nBox; int adx; /* abs values of dx and dy */ int ady; int signdx; /* sign of dx and dy */ int signdy; int e, e1, e2, e3; /* bresenham error and increments */ int len; /* length of segment */ int axis; /* major axis */ int octant; int dashoff; int doff; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); unsigned int oc1; /* outcode of point 1 */ unsigned int oc2; /* outcode of point 2 */ nBox = RegionNumRects(pClip); pBox = RegionRects(pClip); bres = fbSelectBres(pDrawable, pGC); CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant); if (adx > ady) { axis = X_AXIS; e1 = ady << 1; e2 = e1 - (adx << 1); e = e1 - adx; len = adx; } else { axis = Y_AXIS; e1 = adx << 1; e2 = e1 - (ady << 1); e = e1 - ady; SetYMajorOctant(octant); len = ady; } FIXUP_ERROR(e, octant, bias); /* * Adjust error terms to compare against zero */ e3 = e2 - e1; e = e - e1; /* we have bresenham parameters and two points. all we have to do now is clip and draw. */ if (drawLast) len++; dashoff = *dashOffset; *dashOffset = dashoff + len; while (nBox--) { oc1 = 0; oc2 = 0; OUTCODES(oc1, x1, y1, pBox); OUTCODES(oc2, x2, y2, pBox); if ((oc1 | oc2) == 0) { (*bres) (pDrawable, pGC, dashoff, signdx, signdy, axis, x1, y1, e, e1, e3, len); break; } else if (oc1 & oc2) { pBox++; } else { int new_x1 = x1, new_y1 = y1, new_x2 = x2, new_y2 = y2; int clip1 = 0, clip2 = 0; int clipdx, clipdy; int err; if (miZeroClipLine(pBox->x1, pBox->y1, pBox->x2 - 1, pBox->y2 - 1, &new_x1, &new_y1, &new_x2, &new_y2, adx, ady, &clip1, &clip2, octant, bias, oc1, oc2) == -1) { pBox++; continue; } if (axis == X_AXIS) len = abs(new_x2 - new_x1); else len = abs(new_y2 - new_y1); if (clip2 != 0 || drawLast) len++; if (len) { /* unwind bresenham error term to first point */ doff = dashoff; err = e; if (clip1) { clipdx = abs(new_x1 - x1); clipdy = abs(new_y1 - y1); if (axis == X_AXIS) { doff += clipdx; err += e3 * clipdy + e1 * clipdx; } else { doff += clipdy; err += e3 * clipdx + e1 * clipdy; } } (*bres) (pDrawable, pGC, doff, signdx, signdy, axis, new_x1, new_y1, err, e1, e3, len); } pBox++; } } /* while (nBox--) */ } xorg-server-21.1.16/fb/fbsetsp.c0000644000175000017500000000543314757411105012041 /* * Copyright © 1998 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 #endif #include "fb.h" void fbSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *src, DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) { FbGCPrivPtr pPriv = fbGetGCPrivate(pGC); RegionPtr pClip = fbGetCompositeClip(pGC); FbBits *dst, *d, *s; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; BoxPtr pbox; int n; int xoff; int x1, x2; fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nspans--) { d = dst + (ppt->y + dstYoff) * dstStride; xoff = (int) (((long) src) & (FB_MASK >> 3)); s = (FbBits *) (src - xoff); xoff <<= 3; n = RegionNumRects(pClip); pbox = RegionRects(pClip); while (n--) { if (pbox->y1 > ppt->y) break; if (pbox->y2 > ppt->y) { x1 = ppt->x; x2 = x1 + *pwidth; if (pbox->x1 > x1) x1 = pbox->x1; if (pbox->x2 < x2) x2 = pbox->x2; if (x1 < x2) fbBlt((FbBits *) s, 0, (x1 - ppt->x) * dstBpp + xoff, d, dstStride, (x1 + dstXoff) * dstBpp, (x2 - x1) * dstBpp, 1, pGC->alu, pPriv->pm, dstBpp, FALSE, FALSE); } } src += PixmapBytePad(*pwidth, pDrawable->depth); ppt++; pwidth++; } fbValidateDrawable(pDrawable); fbFinishAccess(pDrawable); } xorg-server-21.1.16/fb/fbsolid.c0000644000175000017500000000425114757411105012012 /* * Copyright © 1998 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. */ #define FbSelectPart(xor,o,t) xor #ifdef HAVE_DIX_CONFIG_H #include #endif #include "fb.h" void fbSolid(FbBits * dst, FbStride dstStride, int dstX, int bpp, int width, int height, FbBits and, FbBits xor) { FbBits startmask, endmask; int n, nmiddle; int startbyte, endbyte; dst += dstX >> FB_SHIFT; dstX &= FB_MASK; FbMaskBitsBytes(dstX, width, and == 0, startmask, startbyte, nmiddle, endmask, endbyte); if (startmask) dstStride--; dstStride -= nmiddle; while (height--) { if (startmask) { FbDoLeftMaskByteRRop(dst, startbyte, startmask, and, xor); dst++; } n = nmiddle; if (!and) while (n--) WRITE(dst++, xor); else while (n--) { WRITE(dst, FbDoRRop(READ(dst), and, xor)); dst++; } if (endmask) FbDoRightMaskByteRRop(dst, endbyte, endmask, and, xor); dst += dstStride; } } xorg-server-21.1.16/fb/fbtrap.c0000644000175000017500000001312714757411105011650 /* * Copyright © 2004 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 #endif #include "fb.h" #include "picturestr.h" #include "mipict.h" #include "fbpict.h" #include "damage.h" void fbAddTraps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) { pixman_image_t *image; int dst_xoff, dst_yoff; if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) return; pixman_add_traps(image, x_off + dst_xoff, y_off + dst_yoff, ntrap, (pixman_trap_t *) traps); free_pixman_pict(pPicture, image); } void fbRasterizeTrapezoid(PicturePtr pPicture, xTrapezoid * trap, int x_off, int y_off) { pixman_image_t *image; int dst_xoff, dst_yoff; if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) return; pixman_rasterize_trapezoid(image, (pixman_trapezoid_t *) trap, x_off + dst_xoff, y_off + dst_yoff); free_pixman_pict(pPicture, image); } void fbAddTriangles(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntri, xTriangle * tris) { pixman_image_t *image; int dst_xoff, dst_yoff; if (!(image = image_from_pict(pPicture, FALSE, &dst_xoff, &dst_yoff))) return; pixman_add_triangles(image, dst_xoff + x_off, dst_yoff + y_off, ntri, (pixman_triangle_t *) tris); free_pixman_pict(pPicture, image); } typedef void (*CompositeShapesFunc) (pixman_op_t op, pixman_image_t * src, pixman_image_t * dst, pixman_format_code_t mask_format, int x_src, int y_src, int x_dst, int y_dst, int n_shapes, const uint8_t * shapes); static void fbShapes(CompositeShapesFunc composite, pixman_op_t op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, int16_t xSrc, int16_t ySrc, int nshapes, int shape_size, const uint8_t * shapes) { pixman_image_t *src, *dst; int src_xoff, src_yoff; int dst_xoff, dst_yoff; miCompositeSourceValidate(pSrc); src = image_from_pict(pSrc, FALSE, &src_xoff, &src_yoff); dst = image_from_pict(pDst, TRUE, &dst_xoff, &dst_yoff); if (src && dst) { pixman_format_code_t format; DamageRegionAppend(pDst->pDrawable, pDst->pCompositeClip); if (!maskFormat) { int i; if (pDst->polyEdge == PolyEdgeSharp) format = PIXMAN_a1; else format = PIXMAN_a8; for (i = 0; i < nshapes; ++i) { composite(op, src, dst, format, xSrc + src_xoff, ySrc + src_yoff, dst_xoff, dst_yoff, 1, shapes + i * shape_size); } } else { switch (PICT_FORMAT_A(maskFormat->format)) { case 1: format = PIXMAN_a1; break; case 4: format = PIXMAN_a4; break; default: case 8: format = PIXMAN_a8; break; } composite(op, src, dst, format, xSrc + src_xoff, ySrc + src_yoff, dst_xoff, dst_yoff, nshapes, shapes); } DamageRegionProcessPending(pDst->pDrawable); } free_pixman_pict(pSrc, src); free_pixman_pict(pDst, dst); } void fbTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps) { xSrc -= (traps[0].left.p1.x >> 16); ySrc -= (traps[0].left.p1.y >> 16); fbShapes((CompositeShapesFunc) pixman_composite_trapezoids, op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, sizeof(xTrapezoid), (const uint8_t *) traps); } void fbTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris) { xSrc -= (tris[0].p1.x >> 16); ySrc -= (tris[0].p1.y >> 16); fbShapes((CompositeShapesFunc) pixman_composite_triangles, op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, sizeof(xTriangle), (const uint8_t *) tris); } xorg-server-21.1.16/fb/fbutil.c0000644000175000017500000000521614757411105011657 /* * Copyright © 1998 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 #endif #include "fb.h" FbBits fbReplicatePixel(Pixel p, int bpp) { FbBits b = p; b &= FbFullMask(bpp); while (bpp < FB_UNIT) { b |= b << bpp; bpp <<= 1; } return b; } #define O 0 #define I FB_ALLONES const FbMergeRopRec FbMergeRopBits[16] = { {O, O, O, O}, /* clear 0x0 0 */ {I, O, O, O}, /* and 0x1 src AND dst */ {I, O, I, O}, /* andReverse 0x2 src AND NOT dst */ {O, O, I, O}, /* copy 0x3 src */ {I, I, O, O}, /* andInverted 0x4 NOT src AND dst */ {O, I, O, O}, /* noop 0x5 dst */ {O, I, I, O}, /* xor 0x6 src XOR dst */ {I, I, I, O}, /* or 0x7 src OR dst */ {I, I, I, I}, /* nor 0x8 NOT src AND NOT dst */ {O, I, I, I}, /* equiv 0x9 NOT src XOR dst */ {O, I, O, I}, /* invert 0xa NOT dst */ {I, I, O, I}, /* orReverse 0xb src OR NOT dst */ {O, O, I, I}, /* copyInverted 0xc NOT src */ {I, O, I, I}, /* orInverted 0xd NOT src OR dst */ {I, O, O, I}, /* nand 0xe NOT src OR NOT dst */ {O, O, O, I}, /* set 0xf 1 */ }; xorg-server-21.1.16/fb/fbwindow.c0000644000175000017500000001242214757411105012206 /* * Copyright © 1998 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 #endif #include #include "fb.h" Bool fbCreateWindow(WindowPtr pWin) { dixSetPrivate(&pWin->devPrivates, fbGetWinPrivateKey(pWin), fbGetScreenPixmap(pWin->drawable.pScreen)); return TRUE; } Bool fbDestroyWindow(WindowPtr pWin) { return TRUE; } Bool fbRealizeWindow(WindowPtr pWindow) { return TRUE; } Bool fbPositionWindow(WindowPtr pWin, int x, int y) { return TRUE; } Bool fbUnrealizeWindow(WindowPtr pWindow) { return TRUE; } void fbCopyWindowProc(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pbox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { FbBits *src; FbStride srcStride; int srcBpp; int srcXoff, srcYoff; FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; fbGetDrawable(pSrcDrawable, src, srcStride, srcBpp, srcXoff, srcYoff); fbGetDrawable(pDstDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (nbox--) { fbBlt(src + (pbox->y1 + dy + srcYoff) * srcStride, srcStride, (pbox->x1 + dx + srcXoff) * srcBpp, dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, (pbox->x2 - pbox->x1) * dstBpp, (pbox->y2 - pbox->y1), GXcopy, FB_ALLONES, dstBpp, reverse, upsidedown); pbox++; } fbFinishAccess(pDstDrawable); fbFinishAccess(pSrcDrawable); } void fbCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { RegionRec rgnDst; int dx, dy; PixmapPtr pPixmap = fbGetWindowPixmap(pWin); DrawablePtr pDrawable = &pPixmap->drawable; dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; RegionTranslate(prgnSrc, -dx, -dy); RegionNull(&rgnDst); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); #ifdef COMPOSITE if (pPixmap->screen_x || pPixmap->screen_y) RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); #endif miCopyRegion(pDrawable, pDrawable, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); } static void fbFixupWindowPixmap(DrawablePtr pDrawable, PixmapPtr *ppPixmap) { PixmapPtr pPixmap = *ppPixmap; if (FbEvenTile(pPixmap->drawable.width * pPixmap->drawable.bitsPerPixel)) fbPadPixmap(pPixmap); } Bool fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { if (mask & CWBackPixmap) { if (pWin->backgroundState == BackgroundPixmap) fbFixupWindowPixmap(&pWin->drawable, &pWin->background.pixmap); } if (mask & CWBorderPixmap) { if (pWin->borderIsPixel == FALSE) fbFixupWindowPixmap(&pWin->drawable, &pWin->border.pixmap); } return TRUE; } void fbFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, FbBits and, FbBits xor) { FbBits *dst; FbStride dstStride; int dstBpp; int dstXoff, dstYoff; int n = RegionNumRects(pRegion); BoxPtr pbox = RegionRects(pRegion); #ifndef FB_ACCESS_WRAPPER int try_mmx = 0; if (!and) try_mmx = 1; #endif fbGetDrawable(pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); while (n--) { #ifndef FB_ACCESS_WRAPPER if (!try_mmx || !pixman_fill((uint32_t *) dst, dstStride, dstBpp, pbox->x1 + dstXoff, pbox->y1 + dstYoff, (pbox->x2 - pbox->x1), (pbox->y2 - pbox->y1), xor)) { #endif fbSolid(dst + (pbox->y1 + dstYoff) * dstStride, dstStride, (pbox->x1 + dstXoff) * dstBpp, dstBpp, (pbox->x2 - pbox->x1) * dstBpp, pbox->y2 - pbox->y1, and, xor); #ifndef FB_ACCESS_WRAPPER } #endif fbValidateDrawable(pDrawable); pbox++; } fbFinishAccess(pDrawable); } xorg-server-21.1.16/glamor/0000755000175000017500000000000014757411135011177 5xorg-server-21.1.16/glamor/meson.build0000644000175000017500000000232614757411105013261 srcs_glamor = [ 'glamor.c', 'glamor_copy.c', 'glamor_core.c', 'glamor_dash.c', 'glamor_font.c', 'glamor_glx.c', 'glamor_composite_glyphs.c', 'glamor_image.c', 'glamor_lines.c', 'glamor_segs.c', 'glamor_render.c', 'glamor_gradient.c', 'glamor_prepare.c', 'glamor_program.c', 'glamor_rects.c', 'glamor_spans.c', 'glamor_text.c', 'glamor_transfer.c', 'glamor_transform.c', 'glamor_trapezoid.c', 'glamor_triangles.c', 'glamor_addtraps.c', 'glamor_glyphblt.c', 'glamor_points.c', 'glamor_pixmap.c', 'glamor_largepixmap.c', 'glamor_picture.c', 'glamor_vbo.c', 'glamor_window.c', 'glamor_fbo.c', 'glamor_compositerects.c', 'glamor_utils.c', 'glamor_sync.c', ] if build_xv srcs_glamor += 'glamor_xv.c' endif epoxy_dep = dependency('epoxy') glamor = static_library('glamor', srcs_glamor, include_directories: inc, dependencies: [ common_dep, epoxy_dep, ], ) glamor_egl_stubs = static_library('glamor_egl_stubs', 'glamor_egl_stubs.c', include_directories: inc, dependencies: common_dep, ) if build_xorg install_data('glamor.h', install_dir: xorgsdkdir) endif xorg-server-21.1.16/glamor/Makefile.am0000644000175000017500000000220014757411105013142 noinst_LTLIBRARIES = libglamor.la libglamor_egl_stubs.la libglamor_la_LIBADD = $(GLAMOR_LIBS) AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(GLAMOR_CFLAGS) libglamor_la_SOURCES = \ glamor.c \ glamor_context.h \ glamor_copy.c \ glamor_core.c \ glamor_dash.c \ glamor_debug.h \ glamor_font.c \ glamor_font.h \ glamor_glx.c \ glamor_composite_glyphs.c \ glamor_image.c \ glamor_lines.c \ glamor_segs.c \ glamor_render.c \ glamor_gradient.c \ glamor_prepare.c \ glamor_prepare.h \ glamor_program.c \ glamor_program.h \ glamor_rects.c \ glamor_spans.c \ glamor_text.c \ glamor_transfer.c \ glamor_transfer.h \ glamor_transform.c \ glamor_transform.h \ glamor_trapezoid.c \ glamor_triangles.c\ glamor_addtraps.c\ glamor_glyphblt.c\ glamor_points.c\ glamor_priv.h\ glamor_pixmap.c\ glamor_largepixmap.c\ glamor_picture.c\ glamor_vbo.c \ glamor_window.c\ glamor_fbo.c\ glamor_compositerects.c\ glamor_utils.c\ glamor_utils.h\ glamor_sync.c \ glamor.h if XV libglamor_la_SOURCES += \ glamor_xv.c endif libglamor_egl_stubs_la_SOURCES = \ glamor_egl_stubs.c \ glamor_egl_ext.h \ glamor_egl.h sdk_HEADERS = glamor.h xorg-server-21.1.16/glamor/glamor.h0000644000175000017500000004171114757411105012552 /* * Copyright © 2008 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * Zhigang Gong * */ #ifndef GLAMOR_H #define GLAMOR_H #include #include #include #include #include #include #ifdef GLAMOR_FOR_XORG #include #endif struct glamor_context; struct gbm_bo; struct gbm_device; /* * glamor_pixmap_type : glamor pixmap's type. * @MEMORY: pixmap is in memory. * @TEXTURE_DRM: pixmap is in a texture created from a DRM buffer. * @SEPARATE_TEXTURE: The texture is created from a DRM buffer, but * the format is incompatible, so this type of pixmap * will never fallback to DDX layer. * @DRM_ONLY: pixmap is in a external DRM buffer. * @TEXTURE_ONLY: pixmap is in an internal texture. */ typedef enum glamor_pixmap_type { GLAMOR_MEMORY = 0, /* Newly calloc()ed pixmaps are memory. */ GLAMOR_TEXTURE_DRM, GLAMOR_DRM_ONLY, GLAMOR_TEXTURE_ONLY, } glamor_pixmap_type_t; typedef Bool (*GetDrawableModifiersFuncPtr) (DrawablePtr draw, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers); #define GLAMOR_EGL_EXTERNAL_BUFFER 3 #define GLAMOR_USE_EGL_SCREEN (1 << 0) #define GLAMOR_NO_DRI3 (1 << 1) #define GLAMOR_VALID_FLAGS (GLAMOR_USE_EGL_SCREEN \ | GLAMOR_NO_DRI3) /* until we need geometry shaders GL3.1 should suffice. */ #define GLAMOR_GL_CORE_VER_MAJOR 3 #define GLAMOR_GL_CORE_VER_MINOR 1 /* @glamor_init: Initialize glamor internal data structure. * * @screen: Current screen pointer. * @flags: Please refer the flags description above. * * @GLAMOR_USE_EGL_SCREEN: * If you are using EGL layer, then please set this bit * on, otherwise, clear it. * * @GLAMOR_NO_DRI3 * Disable the built-in DRI3 support * * This function initializes necessary internal data structure * for glamor. And before calling into this function, the OpenGL * environment should be ready. Should be called before any real * glamor rendering or texture allocation functions. And should * be called after the DDX's screen initialization or at the last * step of the DDX's screen initialization. */ extern _X_EXPORT Bool glamor_init(ScreenPtr screen, unsigned int flags); extern _X_EXPORT void glamor_fini(ScreenPtr screen); /* This function is used to free the glamor private screen's * resources. If the DDX driver is not set GLAMOR_USE_SCREEN, * then, DDX need to call this function at proper stage, if * it is the xorg DDX driver,then it should be called at free * screen stage not the close screen stage. The reason is after * call to this function, the xorg DDX may need to destroy the * screen pixmap which must be a glamor pixmap and requires * the internal data structure still exist at that time. * Otherwise, the glamor internal structure will not be freed.*/ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen); extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap); extern _X_EXPORT Bool glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex); extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type); extern _X_EXPORT void glamor_clear_pixmap(PixmapPtr pixmap); extern _X_EXPORT void glamor_block_handler(ScreenPtr screen); extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, unsigned int usage); extern _X_EXPORT Bool glamor_destroy_pixmap(PixmapPtr pixmap); #define GLAMOR_CREATE_PIXMAP_CPU 0x100 #define GLAMOR_CREATE_PIXMAP_FIXUP 0x101 #define GLAMOR_CREATE_FBO_NO_FBO 0x103 #define GLAMOR_CREATE_NO_LARGE 0x105 #define GLAMOR_CREATE_PIXMAP_NO_TEXTURE 0x106 #define GLAMOR_CREATE_FORMAT_CBCR 0x107 /* @glamor_egl_exchange_buffers: Exchange the underlying buffers(KHR image,fbo). * * @front: front pixmap. * @back: back pixmap. * * Used by the DRI2 page flip. This function will exchange the KHR images and * fbos of the two pixmaps. * */ extern _X_EXPORT void glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back); extern _X_EXPORT void glamor_pixmap_exchange_fbos(PixmapPtr front, PixmapPtr back); /* The DDX is not supposed to call these four functions */ extern _X_EXPORT void glamor_enable_dri3(ScreenPtr screen); extern _X_EXPORT int glamor_egl_fds_from_pixmap(ScreenPtr, PixmapPtr, int *, uint32_t *, uint32_t *, uint64_t *); extern _X_EXPORT int glamor_egl_fd_name_from_pixmap(ScreenPtr, PixmapPtr, CARD16 *, CARD32 *); extern _X_EXPORT struct gbm_device *glamor_egl_get_gbm_device(ScreenPtr screen); extern _X_EXPORT int glamor_egl_fd_from_pixmap(ScreenPtr, PixmapPtr, CARD16 *, CARD32 *); /* @glamor_supports_pixmap_import_export: Returns whether * glamor_fds_from_pixmap(), glamor_name_from_pixmap(), and * glamor_pixmap_from_fds() are supported. * * @screen: Current screen pointer. * * To have DRI3 support enabled, glamor and glamor_egl need to be * initialized. glamor also has to be compiled with gbm support. * * The EGL layer needs to have the following extensions working: * * .EGL_KHR_surfaceless_context * */ extern _X_EXPORT Bool glamor_supports_pixmap_import_export(ScreenPtr screen); /* @glamor_fds_from_pixmap: Get a dma-buf fd from a pixmap. * * @screen: Current screen pointer. * @pixmap: The pixmap from which we want the fd. * @fds, @strides, @offsets: Pointers to fill info of each plane. * @modifier: Pointer to fill the modifier of the buffer. * * the pixmap and the buffer associated by the fds will share the same * content. The caller is responsible to close the returned file descriptors. * Returns the number of planes, -1 on error. * */ extern _X_EXPORT int glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier); /* @glamor_fd_from_pixmap: Get a dma-buf fd from a pixmap. * * @screen: Current screen pointer. * @pixmap: The pixmap from which we want the fd. * @stride, @size: Pointers to fill the stride and size of the * buffer associated to the fd. * * the pixmap and the buffer associated by the fd will share the same * content. * Returns the fd on success, -1 on error. * */ extern _X_EXPORT int glamor_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size); /* @glamor_shareable_fd_from_pixmap: Get a dma-buf fd suitable for sharing * with other GPUs from a pixmap. * * @screen: Current screen pointer. * @pixmap: The pixmap from which we want the fd. * @stride, @size: Pointers to fill the stride and size of the * buffer associated to the fd. * * The returned fd will point to a buffer which is suitable for sharing * across GPUs (not using GPU specific tiling). * The pixmap and the buffer associated by the fd will share the same * content. * The pixmap's stride may be modified by this function. * Returns the fd on success, -1 on error. * */ extern _X_EXPORT int glamor_shareable_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size); /** * @glamor_name_from_pixmap: Gets a gem name from a pixmap. * * @pixmap: The pixmap from which we want the gem name. * * the pixmap and the buffer associated by the gem name will share the * same content. This function can be used by the DDX to support DRI2, * and needs the same set of buffer export GL extensions as DRI3 * support. * * Returns the name on success, -1 on error. * */ extern _X_EXPORT int glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size); /* @glamor_gbm_bo_from_pixmap: Get a GBM bo from a pixmap. * * @screen: Current screen pointer. * @pixmap: The pixmap from which we want the fd. * @stride, @size: Pointers to fill the stride and size of the * buffer associated to the fd. * * the pixmap and the buffer represented by the gbm_bo will share the same * content. * * Returns the gbm_bo on success, NULL on error. * */ extern _X_EXPORT struct gbm_bo *glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap); /* @glamor_pixmap_from_fds: Creates a pixmap to wrap a dma-buf fds. * * @screen: Current screen pointer. * @num_fds: Number of fds to import * @fds: The dma-buf fds to import. * @width: The width of the buffers. * @height: The height of the buffers. * @stride: The stride of the buffers. * @depth: The depth of the buffers. * @bpp: The bpp of the buffers. * @modifier: The modifier of the buffers. * * Returns a valid pixmap if the import succeeded, else NULL. * */ extern _X_EXPORT PixmapPtr glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds, CARD16 width, CARD16 height, const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, uint64_t modifier); /* @glamor_pixmap_from_fd: Creates a pixmap to wrap a dma-buf fd. * * @screen: Current screen pointer. * @fd: The dma-buf fd to import. * @width: The width of the buffer. * @height: The height of the buffer. * @stride: The stride of the buffer. * @depth: The depth of the buffer. * @bpp: The bpp of the buffer. * * Returns a valid pixmap if the import succeeded, else NULL. * */ extern _X_EXPORT PixmapPtr glamor_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp); /* @glamor_back_pixmap_from_fd: Backs an existing pixmap with a dma-buf fd. * * @pixmap: Pixmap to change backing for * @fd: The dma-buf fd to import. * @width: The width of the buffer. * @height: The height of the buffer. * @stride: The stride of the buffer. * @depth: The depth of the buffer. * @bpp: The number of bpp of the buffer. * * Returns TRUE if successful, FALSE on failure. * */ extern _X_EXPORT Bool glamor_back_pixmap_from_fd(PixmapPtr pixmap, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp); extern _X_EXPORT Bool glamor_get_formats(ScreenPtr screen, CARD32 *num_formats, CARD32 **formats); extern _X_EXPORT Bool glamor_get_modifiers(ScreenPtr screen, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers); extern _X_EXPORT Bool glamor_get_drawable_modifiers(DrawablePtr draw, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers); extern _X_EXPORT void glamor_set_drawable_modifiers_func(ScreenPtr screen, GetDrawableModifiersFuncPtr func); #ifdef GLAMOR_FOR_XORG #define GLAMOR_EGL_MODULE_NAME "glamoregl" /* @glamor_egl_init: Initialize EGL environment. * * @scrn: Current screen info pointer. * @fd: Current drm fd. * * This function creates and initializes EGL contexts. * Should be called from DDX's preInit function. * Return TRUE if success, otherwise return FALSE. * */ extern _X_EXPORT Bool glamor_egl_init(ScrnInfoPtr scrn, int fd); extern _X_EXPORT Bool glamor_egl_init_textured_pixmap(ScreenPtr screen); /* @glamor_egl_create_textured_screen: Create textured screen pixmap. * * @screen: screen pointer to be processed. * @handle: screen pixmap's BO handle. * @stride: screen pixmap's stride in bytes. * * This function is similar with the create_textured_pixmap. As the * screen pixmap is a special, we handle it separately in this function. */ extern _X_EXPORT Bool glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride); /* Obsolete entrypoint, temporarily left here for API compatibility * for xf86-video-ati. */ #define glamor_egl_create_textured_screen_ext(a, b, c, d) \ glamor_egl_create_textured_screen(a, b, c) /* * @glamor_egl_create_textured_pixmap: Try to create a textured pixmap from * a BO handle. * * @pixmap: The pixmap need to be processed. * @handle: The BO's handle attached to this pixmap at DDX layer. * @stride: Stride in bytes for this pixmap. * * This function try to create a texture from the handle and attach * the texture to the pixmap , thus glamor can render to this pixmap * as well. Return true if successful, otherwise return FALSE. */ extern _X_EXPORT Bool glamor_egl_create_textured_pixmap(PixmapPtr pixmap, int handle, int stride); /* * @glamor_egl_create_textured_pixmap_from_bo: Try to create a textured pixmap * from a gbm_bo. * * @pixmap: The pixmap need to be processed. * @bo: a pointer on a gbm_bo structure attached to this pixmap at DDX layer. * * This function is similar to glamor_egl_create_textured_pixmap. */ extern _X_EXPORT Bool glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap, struct gbm_bo *bo, Bool used_modifiers); extern _X_EXPORT const char *glamor_egl_get_driver_name(ScreenPtr screen); #endif extern _X_EXPORT void glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx); extern _X_EXPORT int glamor_create_gc(GCPtr gc); extern _X_EXPORT void glamor_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable); extern _X_EXPORT void glamor_destroy_gc(GCPtr gc); #define HAS_GLAMOR_DESTROY_GC 1 extern Bool _X_EXPORT glamor_change_window_attributes(WindowPtr pWin, unsigned long mask); extern void _X_EXPORT glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_region); extern _X_EXPORT void glamor_finish(ScreenPtr screen); #define HAS_GLAMOR_TEXT 1 #ifdef GLAMOR_FOR_XORG extern _X_EXPORT XF86VideoAdaptorPtr glamor_xv_init(ScreenPtr pScreen, int num_texture_ports); #endif #endif /* GLAMOR_H */ xorg-server-21.1.16/glamor/Makefile.in0000644000175000017500000011047614757411115013173 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XV_TRUE@am__append_1 = \ @XV_TRUE@ glamor_xv.c subdir = glamor ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libglamor_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libglamor_la_SOURCES_DIST = glamor.c glamor_context.h \ glamor_copy.c glamor_core.c glamor_dash.c glamor_debug.h \ glamor_font.c glamor_font.h glamor_glx.c \ glamor_composite_glyphs.c glamor_image.c glamor_lines.c \ glamor_segs.c glamor_render.c glamor_gradient.c \ glamor_prepare.c glamor_prepare.h glamor_program.c \ glamor_program.h glamor_rects.c glamor_spans.c glamor_text.c \ glamor_transfer.c glamor_transfer.h glamor_transform.c \ glamor_transform.h glamor_trapezoid.c glamor_triangles.c \ glamor_addtraps.c glamor_glyphblt.c glamor_points.c \ glamor_priv.h glamor_pixmap.c glamor_largepixmap.c \ glamor_picture.c glamor_vbo.c glamor_window.c glamor_fbo.c \ glamor_compositerects.c glamor_utils.c glamor_utils.h \ glamor_sync.c glamor.h glamor_xv.c @XV_TRUE@am__objects_1 = glamor_xv.lo am_libglamor_la_OBJECTS = glamor.lo glamor_copy.lo glamor_core.lo \ glamor_dash.lo glamor_font.lo glamor_glx.lo \ glamor_composite_glyphs.lo glamor_image.lo glamor_lines.lo \ glamor_segs.lo glamor_render.lo glamor_gradient.lo \ glamor_prepare.lo glamor_program.lo glamor_rects.lo \ glamor_spans.lo glamor_text.lo glamor_transfer.lo \ glamor_transform.lo glamor_trapezoid.lo glamor_triangles.lo \ glamor_addtraps.lo glamor_glyphblt.lo glamor_points.lo \ glamor_pixmap.lo glamor_largepixmap.lo glamor_picture.lo \ glamor_vbo.lo glamor_window.lo glamor_fbo.lo \ glamor_compositerects.lo glamor_utils.lo glamor_sync.lo \ $(am__objects_1) libglamor_la_OBJECTS = $(am_libglamor_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libglamor_egl_stubs_la_LIBADD = am_libglamor_egl_stubs_la_OBJECTS = glamor_egl_stubs.lo libglamor_egl_stubs_la_OBJECTS = $(am_libglamor_egl_stubs_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/glamor.Plo \ ./$(DEPDIR)/glamor_addtraps.Plo \ ./$(DEPDIR)/glamor_composite_glyphs.Plo \ ./$(DEPDIR)/glamor_compositerects.Plo \ ./$(DEPDIR)/glamor_copy.Plo ./$(DEPDIR)/glamor_core.Plo \ ./$(DEPDIR)/glamor_dash.Plo ./$(DEPDIR)/glamor_egl_stubs.Plo \ ./$(DEPDIR)/glamor_fbo.Plo ./$(DEPDIR)/glamor_font.Plo \ ./$(DEPDIR)/glamor_glx.Plo ./$(DEPDIR)/glamor_glyphblt.Plo \ ./$(DEPDIR)/glamor_gradient.Plo ./$(DEPDIR)/glamor_image.Plo \ ./$(DEPDIR)/glamor_largepixmap.Plo \ ./$(DEPDIR)/glamor_lines.Plo ./$(DEPDIR)/glamor_picture.Plo \ ./$(DEPDIR)/glamor_pixmap.Plo ./$(DEPDIR)/glamor_points.Plo \ ./$(DEPDIR)/glamor_prepare.Plo ./$(DEPDIR)/glamor_program.Plo \ ./$(DEPDIR)/glamor_rects.Plo ./$(DEPDIR)/glamor_render.Plo \ ./$(DEPDIR)/glamor_segs.Plo ./$(DEPDIR)/glamor_spans.Plo \ ./$(DEPDIR)/glamor_sync.Plo ./$(DEPDIR)/glamor_text.Plo \ ./$(DEPDIR)/glamor_transfer.Plo \ ./$(DEPDIR)/glamor_transform.Plo \ ./$(DEPDIR)/glamor_trapezoid.Plo \ ./$(DEPDIR)/glamor_triangles.Plo ./$(DEPDIR)/glamor_utils.Plo \ ./$(DEPDIR)/glamor_vbo.Plo ./$(DEPDIR)/glamor_window.Plo \ ./$(DEPDIR)/glamor_xv.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libglamor_la_SOURCES) $(libglamor_egl_stubs_la_SOURCES) DIST_SOURCES = $(am__libglamor_la_SOURCES_DIST) \ $(libglamor_egl_stubs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libglamor.la libglamor_egl_stubs.la libglamor_la_LIBADD = $(GLAMOR_LIBS) AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(GLAMOR_CFLAGS) libglamor_la_SOURCES = glamor.c glamor_context.h glamor_copy.c \ glamor_core.c glamor_dash.c glamor_debug.h glamor_font.c \ glamor_font.h glamor_glx.c glamor_composite_glyphs.c \ glamor_image.c glamor_lines.c glamor_segs.c glamor_render.c \ glamor_gradient.c glamor_prepare.c glamor_prepare.h \ glamor_program.c glamor_program.h glamor_rects.c \ glamor_spans.c glamor_text.c glamor_transfer.c \ glamor_transfer.h glamor_transform.c glamor_transform.h \ glamor_trapezoid.c glamor_triangles.c glamor_addtraps.c \ glamor_glyphblt.c glamor_points.c glamor_priv.h \ glamor_pixmap.c glamor_largepixmap.c glamor_picture.c \ glamor_vbo.c glamor_window.c glamor_fbo.c \ glamor_compositerects.c glamor_utils.c glamor_utils.h \ glamor_sync.c glamor.h $(am__append_1) libglamor_egl_stubs_la_SOURCES = \ glamor_egl_stubs.c \ glamor_egl_ext.h \ glamor_egl.h sdk_HEADERS = glamor.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glamor/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign glamor/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libglamor.la: $(libglamor_la_OBJECTS) $(libglamor_la_DEPENDENCIES) $(EXTRA_libglamor_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libglamor_la_OBJECTS) $(libglamor_la_LIBADD) $(LIBS) libglamor_egl_stubs.la: $(libglamor_egl_stubs_la_OBJECTS) $(libglamor_egl_stubs_la_DEPENDENCIES) $(EXTRA_libglamor_egl_stubs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libglamor_egl_stubs_la_OBJECTS) $(libglamor_egl_stubs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_addtraps.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_composite_glyphs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_compositerects.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_copy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_core.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_dash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_egl_stubs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_fbo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_font.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_glx.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_glyphblt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_gradient.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_image.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_largepixmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_lines.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_picture.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_pixmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_points.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_prepare.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_program.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_rects.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_render.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_segs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_spans.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_sync.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_text.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_transfer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_transform.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_trapezoid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_triangles.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_utils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_vbo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_window.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_xv.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/glamor.Plo -rm -f ./$(DEPDIR)/glamor_addtraps.Plo -rm -f ./$(DEPDIR)/glamor_composite_glyphs.Plo -rm -f ./$(DEPDIR)/glamor_compositerects.Plo -rm -f ./$(DEPDIR)/glamor_copy.Plo -rm -f ./$(DEPDIR)/glamor_core.Plo -rm -f ./$(DEPDIR)/glamor_dash.Plo -rm -f ./$(DEPDIR)/glamor_egl_stubs.Plo -rm -f ./$(DEPDIR)/glamor_fbo.Plo -rm -f ./$(DEPDIR)/glamor_font.Plo -rm -f ./$(DEPDIR)/glamor_glx.Plo -rm -f ./$(DEPDIR)/glamor_glyphblt.Plo -rm -f ./$(DEPDIR)/glamor_gradient.Plo -rm -f ./$(DEPDIR)/glamor_image.Plo -rm -f ./$(DEPDIR)/glamor_largepixmap.Plo -rm -f ./$(DEPDIR)/glamor_lines.Plo -rm -f ./$(DEPDIR)/glamor_picture.Plo -rm -f ./$(DEPDIR)/glamor_pixmap.Plo -rm -f ./$(DEPDIR)/glamor_points.Plo -rm -f ./$(DEPDIR)/glamor_prepare.Plo -rm -f ./$(DEPDIR)/glamor_program.Plo -rm -f ./$(DEPDIR)/glamor_rects.Plo -rm -f ./$(DEPDIR)/glamor_render.Plo -rm -f ./$(DEPDIR)/glamor_segs.Plo -rm -f ./$(DEPDIR)/glamor_spans.Plo -rm -f ./$(DEPDIR)/glamor_sync.Plo -rm -f ./$(DEPDIR)/glamor_text.Plo -rm -f ./$(DEPDIR)/glamor_transfer.Plo -rm -f ./$(DEPDIR)/glamor_transform.Plo -rm -f ./$(DEPDIR)/glamor_trapezoid.Plo -rm -f ./$(DEPDIR)/glamor_triangles.Plo -rm -f ./$(DEPDIR)/glamor_utils.Plo -rm -f ./$(DEPDIR)/glamor_vbo.Plo -rm -f ./$(DEPDIR)/glamor_window.Plo -rm -f ./$(DEPDIR)/glamor_xv.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/glamor.Plo -rm -f ./$(DEPDIR)/glamor_addtraps.Plo -rm -f ./$(DEPDIR)/glamor_composite_glyphs.Plo -rm -f ./$(DEPDIR)/glamor_compositerects.Plo -rm -f ./$(DEPDIR)/glamor_copy.Plo -rm -f ./$(DEPDIR)/glamor_core.Plo -rm -f ./$(DEPDIR)/glamor_dash.Plo -rm -f ./$(DEPDIR)/glamor_egl_stubs.Plo -rm -f ./$(DEPDIR)/glamor_fbo.Plo -rm -f ./$(DEPDIR)/glamor_font.Plo -rm -f ./$(DEPDIR)/glamor_glx.Plo -rm -f ./$(DEPDIR)/glamor_glyphblt.Plo -rm -f ./$(DEPDIR)/glamor_gradient.Plo -rm -f ./$(DEPDIR)/glamor_image.Plo -rm -f ./$(DEPDIR)/glamor_largepixmap.Plo -rm -f ./$(DEPDIR)/glamor_lines.Plo -rm -f ./$(DEPDIR)/glamor_picture.Plo -rm -f ./$(DEPDIR)/glamor_pixmap.Plo -rm -f ./$(DEPDIR)/glamor_points.Plo -rm -f ./$(DEPDIR)/glamor_prepare.Plo -rm -f ./$(DEPDIR)/glamor_program.Plo -rm -f ./$(DEPDIR)/glamor_rects.Plo -rm -f ./$(DEPDIR)/glamor_render.Plo -rm -f ./$(DEPDIR)/glamor_segs.Plo -rm -f ./$(DEPDIR)/glamor_spans.Plo -rm -f ./$(DEPDIR)/glamor_sync.Plo -rm -f ./$(DEPDIR)/glamor_text.Plo -rm -f ./$(DEPDIR)/glamor_transfer.Plo -rm -f ./$(DEPDIR)/glamor_transform.Plo -rm -f ./$(DEPDIR)/glamor_trapezoid.Plo -rm -f ./$(DEPDIR)/glamor_triangles.Plo -rm -f ./$(DEPDIR)/glamor_utils.Plo -rm -f ./$(DEPDIR)/glamor_vbo.Plo -rm -f ./$(DEPDIR)/glamor_window.Plo -rm -f ./$(DEPDIR)/glamor_xv.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/glamor/glamor.c0000644000175000017500000011274714757411105012555 /* * Copyright © 2008,2011 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * Zhigang Gong * Chad Versace */ /** @file glamor.c * This file covers the initialization and teardown of glamor, and has various * functions not responsible for performing rendering. */ #include #include #include "glamor_priv.h" #include "mipict.h" DevPrivateKeyRec glamor_screen_private_key; DevPrivateKeyRec glamor_pixmap_private_key; DevPrivateKeyRec glamor_gc_private_key; glamor_screen_private * glamor_get_screen_private(ScreenPtr screen) { return (glamor_screen_private *) dixLookupPrivate(&screen->devPrivates, &glamor_screen_private_key); } void glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv) { dixSetPrivate(&screen->devPrivates, &glamor_screen_private_key, priv); } /** * glamor_get_drawable_pixmap() returns a backing pixmap for a given drawable. * * @param drawable the drawable being requested. * * This function returns the backing pixmap for a drawable, whether it is a * redirected window, unredirected window, or already a pixmap. Note that * coordinate translation is needed when drawing to the backing pixmap of a * redirected window, and the translation coordinates are provided by calling * exaGetOffscreenPixmap() on the drawable. */ PixmapPtr glamor_get_drawable_pixmap(DrawablePtr drawable) { if (drawable->type == DRAWABLE_WINDOW) return drawable->pScreen->GetWindowPixmap((WindowPtr) drawable); else return (PixmapPtr) drawable; } static void glamor_init_pixmap_private_small(PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv) { pixmap_priv->box.x1 = 0; pixmap_priv->box.x2 = pixmap->drawable.width; pixmap_priv->box.y1 = 0; pixmap_priv->box.y2 = pixmap->drawable.height; pixmap_priv->block_w = pixmap->drawable.width; pixmap_priv->block_h = pixmap->drawable.height; pixmap_priv->block_hcnt = 1; pixmap_priv->block_wcnt = 1; pixmap_priv->box_array = &pixmap_priv->box; pixmap_priv->fbo_array = &pixmap_priv->fbo; } _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type) { glamor_pixmap_private *pixmap_priv; pixmap_priv = glamor_get_pixmap_private(pixmap); pixmap_priv->type = type; glamor_init_pixmap_private_small(pixmap, pixmap_priv); } _X_EXPORT Bool glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_pixmap_private *pixmap_priv; glamor_screen_private *glamor_priv; glamor_pixmap_fbo *fbo; glamor_priv = glamor_get_screen_private(screen); pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->fbo) { fbo = glamor_pixmap_detach_fbo(pixmap_priv); glamor_destroy_fbo(glamor_priv, fbo); } fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap, pixmap->drawable.width, pixmap->drawable.height, tex, 0); if (fbo == NULL) { ErrorF("XXX fail to create fbo.\n"); return FALSE; } glamor_pixmap_attach_fbo(pixmap, fbo); return TRUE; } _X_EXPORT void glamor_clear_pixmap(PixmapPtr pixmap) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv; glamor_pixmap_private *pixmap_priv; const struct glamor_format *pixmap_format; glamor_priv = glamor_get_screen_private(screen); pixmap_priv = glamor_get_pixmap_private(pixmap); pixmap_format = glamor_format_for_pixmap(pixmap); assert(pixmap_priv->fbo != NULL); glamor_pixmap_clear_fbo(glamor_priv, pixmap_priv->fbo, pixmap_format); } uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); if (!pixmap_priv) return 0; if (!pixmap_priv->fbo) return 0; if (pixmap_priv->type != GLAMOR_TEXTURE_ONLY) return 0; return pixmap_priv->fbo->tex; } void glamor_bind_texture(glamor_screen_private *glamor_priv, GLenum texture, glamor_pixmap_fbo *fbo, Bool destination_red) { glActiveTexture(texture); glBindTexture(GL_TEXTURE_2D, fbo->tex); /* If we're pulling data from a GL_RED texture, then whether we * want to make it an A,0,0,0 result or a 0,0,0,R result depends * on whether the destination is also a GL_RED texture. * * For GL_RED destinations, we need to leave the bits in the R * channel. For all other destinations, we need to clear out the R * channel so that it returns zero for R, G and B. * * Note that we're leaving the SWIZZLE_A value alone; for GL_RED * destinations, that means we'll actually be returning R,0,0,R, * but it doesn't matter as the bits in the alpha channel aren't * going anywhere. */ /* Is the operand a GL_RED fbo? */ if (fbo->is_red) { /* If destination is also GL_RED, then preserve the bits in * the R channel */ if (destination_red) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_RED); else glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_ZERO); } } PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, unsigned int usage) { PixmapPtr pixmap; glamor_pixmap_private *pixmap_priv; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_fbo *fbo = NULL; int pitch; if (w > 32767 || h > 32767) return NullPixmap; if ((usage == GLAMOR_CREATE_PIXMAP_CPU || (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE && w <= glamor_priv->glyph_max_dim && h <= glamor_priv->glyph_max_dim) || (w == 0 && h == 0) || !glamor_priv->formats[depth].rendering_supported)) return fbCreatePixmap(screen, w, h, depth, usage); else pixmap = fbCreatePixmap(screen, 0, 0, depth, usage); pixmap_priv = glamor_get_pixmap_private(pixmap); pixmap_priv->is_cbcr = (usage == GLAMOR_CREATE_FORMAT_CBCR); pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3; screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL); pixmap_priv->type = GLAMOR_TEXTURE_ONLY; if (usage == GLAMOR_CREATE_PIXMAP_NO_TEXTURE) { glamor_init_pixmap_private_small(pixmap, pixmap_priv); return pixmap; } else if (usage == GLAMOR_CREATE_NO_LARGE || glamor_check_fbo_size(glamor_priv, w, h)) { glamor_init_pixmap_private_small(pixmap, pixmap_priv); fbo = glamor_create_fbo(glamor_priv, pixmap, w, h, usage); } else { int tile_size = glamor_priv->max_fbo_size; DEBUGF("Create LARGE pixmap %p width %d height %d, tile size %d\n", pixmap, w, h, tile_size); fbo = glamor_create_fbo_array(glamor_priv, pixmap, usage, tile_size, tile_size, pixmap_priv); } if (fbo == NULL) { fbDestroyPixmap(pixmap); return fbCreatePixmap(screen, w, h, depth, usage); } glamor_pixmap_attach_fbo(pixmap, fbo); return pixmap; } Bool glamor_destroy_pixmap(PixmapPtr pixmap) { if (pixmap->refcnt == 1) { glamor_pixmap_destroy_fbo(pixmap); } return fbDestroyPixmap(pixmap); } void glamor_block_handler(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glFlush(); } static void _glamor_block_handler(ScreenPtr screen, void *timeout) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glFlush(); screen->BlockHandler = glamor_priv->saved_procs.block_handler; screen->BlockHandler(screen, timeout); glamor_priv->saved_procs.block_handler = screen->BlockHandler; screen->BlockHandler = _glamor_block_handler; } static void glamor_set_debug_level(int *debug_level) { char *debug_level_string; debug_level_string = getenv("GLAMOR_DEBUG"); if (debug_level_string && sscanf(debug_level_string, "%d", debug_level) == 1) return; *debug_level = 0; } int glamor_debug_level; void glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv, unsigned count) { unsigned i; /* For a single quad, don't bother with an index buffer. */ if (count == 1) goto fallback; if (glamor_priv->ib_size < count) { /* Basic GLES2 doesn't have any way to map buffer objects for * writing, but it's long past time for drivers to have * MapBufferRange. */ if (!glamor_priv->has_map_buffer_range) goto fallback; /* Lazy create the buffer name, and only bind it once since * none of the glamor code binds it to anything else. */ if (!glamor_priv->ib) { glGenBuffers(1, &glamor_priv->ib); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ib); } /* For now, only support GL_UNSIGNED_SHORTs. */ if (count > ((1 << 16) - 1) / 4) { goto fallback; } else { uint16_t *data; size_t size = count * 6 * sizeof(GLushort); glBufferData(GL_ELEMENT_ARRAY_BUFFER, size, NULL, GL_STATIC_DRAW); data = glMapBufferRange(GL_ELEMENT_ARRAY_BUFFER, 0, size, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT); for (i = 0; i < count; i++) { data[i * 6 + 0] = i * 4 + 0; data[i * 6 + 1] = i * 4 + 1; data[i * 6 + 2] = i * 4 + 2; data[i * 6 + 3] = i * 4 + 0; data[i * 6 + 4] = i * 4 + 2; data[i * 6 + 5] = i * 4 + 3; } glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER); glamor_priv->ib_size = count; glamor_priv->ib_type = GL_UNSIGNED_SHORT; } } glDrawElements(GL_TRIANGLES, count * 6, glamor_priv->ib_type, NULL); return; fallback: for (i = 0; i < count; i++) glDrawArrays(GL_TRIANGLE_FAN, i * 4, 4); } static Bool glamor_check_instruction_count(int gl_version) { GLint max_native_alu_instructions; /* Avoid using glamor if the reported instructions limit is too low, * as this would cause glamor to fallback on sw due to large shaders * which ends up being unbearably slow. */ if (gl_version < 30) { if (!epoxy_has_gl_extension("GL_ARB_fragment_program")) { ErrorF("GL_ARB_fragment_program required\n"); return FALSE; } glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, &max_native_alu_instructions); if (max_native_alu_instructions < GLAMOR_MIN_ALU_INSTRUCTIONS) { LogMessage(X_WARNING, "glamor requires at least %d instructions (%d reported)\n", GLAMOR_MIN_ALU_INSTRUCTIONS, max_native_alu_instructions); return FALSE; } } return TRUE; } static void GLAPIENTRY glamor_debug_output_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const void *userParam) { ScreenPtr screen = (void *)userParam; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); if (glamor_priv->suppress_gl_out_of_memory_logging && source == GL_DEBUG_SOURCE_API && type == GL_DEBUG_TYPE_ERROR) { return; } LogMessageVerb(X_ERROR, 0, "glamor%d: GL error: %*s\n", screen->myNum, length, message); xorg_backtrace(); } /** * Configures GL_ARB_debug_output to give us immediate callbacks when * GL errors occur, so that we can log them. */ static void glamor_setup_debug_output(ScreenPtr screen) { if (!epoxy_has_gl_extension("GL_KHR_debug") && !epoxy_has_gl_extension("GL_ARB_debug_output")) return; glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); /* Disable debugging messages other than GL API errors */ glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DONT_CARE, 0, NULL, GL_FALSE); glDebugMessageControl(GL_DEBUG_SOURCE_API, GL_DEBUG_TYPE_ERROR, GL_DONT_CARE, 0, NULL, GL_TRUE); glDebugMessageCallback(glamor_debug_output_callback, screen); /* If KHR_debug is present, all debug output is disabled by * default on non-debug contexts. */ if (epoxy_has_gl_extension("GL_KHR_debug")) glEnable(GL_DEBUG_OUTPUT); } const struct glamor_format * glamor_format_for_pixmap(PixmapPtr pixmap) { ScreenPtr pScreen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->is_cbcr) return &glamor_priv->cbcr_format; else return &glamor_priv->formats[pixmap->drawable.depth]; } static void glamor_add_format(ScreenPtr screen, int depth, CARD32 render_format, GLenum internalformat, GLenum format, GLenum type, Bool rendering_supported) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); struct glamor_format *f = &glamor_priv->formats[depth]; /* If we're trying to run on GLES, make sure that we get the read * formats that we're expecting, since glamor_transfer relies on * them matching to get data back out. To avoid this limitation, we * would need to have a more general glReadPixels() path in * glamor_transfer that re-encoded the bits to the pixel format that * we intended after. * * Note that we can't just create a pixmap because we're in * screeninit. */ if (rendering_supported && glamor_priv->is_gles) { unsigned fbo, tex; int read_format, read_type; GLenum status; glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, internalformat, 1, 1, 0, format, type, NULL); glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0); status = glCheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { ErrorF("glamor: Test fbo for depth %d incomplete. " "Falling back to software.\n", depth); glDeleteTextures(1, &tex); glDeleteFramebuffers(1, &fbo); return; } glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &read_format); glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &read_type); glDeleteTextures(1, &tex); glDeleteFramebuffers(1, &fbo); if (format != read_format || type != read_type) { ErrorF("glamor: Implementation returned 0x%x/0x%x read format/type " "for depth %d, expected 0x%x/0x%x. " "Falling back to software.\n", read_format, read_type, depth, format, type); return; } } f->depth = depth; f->render_format = render_format; f->internalformat = internalformat; f->format = format; f->type = type; f->rendering_supported = rendering_supported; } /* Set up the GL format/types that glamor will use for the various depths * * X11's pixel data doesn't have channels, but to store our data in GL * we have to pick some sort of format to move X11 pixel data in and * out with in glamor_transfer.c. For X11 core operations, other than * GL logic ops (non-GXcopy GC ops) what the driver chooses internally * doesn't matter as long as it doesn't drop any bits (we expect them * to generally expand, if anything). For Render, we can expect * clients to tend to render with PictFormats matching our channel * layouts here since ultimately X11 pixels tend to end up on the * screen. The render implementation will fall back to fb if the * channels don't match. * * Note that these formats don't affect what glamor_egl.c or * Xwayland's EGL layer choose for surfaces exposed through DRI or * scanout. For now, those layers need to match what we're choosing * here, or channels will end up swizzled around. Similarly, the * driver's visual masks also need to match what we're doing here. */ static void glamor_setup_formats(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); /* Prefer r8 textures since they're required by GLES3 and core, * only falling back to a8 if we can't do them. */ if (glamor_priv->is_gles || epoxy_has_gl_extension("GL_ARB_texture_rg")) { glamor_add_format(screen, 1, PICT_a1, GL_R8, GL_RED, GL_UNSIGNED_BYTE, FALSE); glamor_add_format(screen, 8, PICT_a8, GL_R8, GL_RED, GL_UNSIGNED_BYTE, TRUE); } else { glamor_add_format(screen, 1, PICT_a1, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, FALSE); glamor_add_format(screen, 8, PICT_a8, GL_ALPHA, GL_ALPHA, GL_UNSIGNED_BYTE, TRUE); } if (glamor_priv->is_gles) { /* For 15bpp, GLES supports format/type RGBA/5551, rather than * bgra/1555_rev. GL_EXT_bgra lets the impl say the color * read format/type is bgra/1555 even if we had to create it * with rgba/5551, with Mesa does. That means we can't use * the same format/type for TexSubImage and readpixels. * * Instead, just store 16 bits using the trusted 565 path, and * disable render accel for now. */ glamor_add_format(screen, 15, PICT_x1r5g5b5, GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, TRUE); } else { glamor_add_format(screen, 15, PICT_x1r5g5b5, GL_RGBA, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, TRUE); } glamor_add_format(screen, 16, PICT_r5g6b5, GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5, TRUE); if (glamor_priv->is_gles) { assert(X_BYTE_ORDER == X_LITTLE_ENDIAN); glamor_add_format(screen, 24, PICT_x8r8g8b8, GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); glamor_add_format(screen, 32, PICT_a8r8g8b8, GL_BGRA, GL_BGRA, GL_UNSIGNED_BYTE, TRUE); } else { glamor_add_format(screen, 24, PICT_x8r8g8b8, GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); glamor_add_format(screen, 32, PICT_a8r8g8b8, GL_RGBA, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, TRUE); } if (glamor_priv->is_gles) { glamor_add_format(screen, 30, PICT_x2b10g10r10, GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, TRUE); } else { glamor_add_format(screen, 30, PICT_x2r10g10b10, GL_RGB10_A2, GL_BGRA, GL_UNSIGNED_INT_2_10_10_10_REV, TRUE); } glamor_priv->cbcr_format.depth = 16; glamor_priv->cbcr_format.internalformat = GL_RG8; glamor_priv->cbcr_format.format = GL_RG; glamor_priv->cbcr_format.type = GL_UNSIGNED_BYTE; glamor_priv->cbcr_format.rendering_supported = TRUE; } /** Set up glamor for an already-configured GL context. */ Bool glamor_init(ScreenPtr screen, unsigned int flags) { glamor_screen_private *glamor_priv; int gl_version; int glsl_major, glsl_minor; int max_viewport_size[2]; const char *shading_version_string; int shading_version_offset; PictureScreenPtr ps = GetPictureScreenIfSet(screen); if (flags & ~GLAMOR_VALID_FLAGS) { ErrorF("glamor_init: Invalid flags %x\n", flags); return FALSE; } glamor_priv = calloc(1, sizeof(*glamor_priv)); if (glamor_priv == NULL) return FALSE; glamor_priv->flags = flags; if (!dixRegisterPrivateKey(&glamor_screen_private_key, PRIVATE_SCREEN, 0)) { LogMessage(X_WARNING, "glamor%d: Failed to allocate screen private\n", screen->myNum); goto free_glamor_private; } glamor_set_screen_private(screen, glamor_priv); if (!dixRegisterPrivateKey(&glamor_pixmap_private_key, PRIVATE_PIXMAP, sizeof(struct glamor_pixmap_private))) { LogMessage(X_WARNING, "glamor%d: Failed to allocate pixmap private\n", screen->myNum); goto free_glamor_private; } if (!dixRegisterPrivateKey(&glamor_gc_private_key, PRIVATE_GC, sizeof (glamor_gc_private))) { LogMessage(X_WARNING, "glamor%d: Failed to allocate gc private\n", screen->myNum); goto free_glamor_private; } glamor_priv->saved_procs.close_screen = screen->CloseScreen; screen->CloseScreen = glamor_close_screen; glamor_priv->saved_procs.destroy_pixmap = screen->DestroyPixmap; screen->DestroyPixmap = glamor_destroy_pixmap; /* If we are using egl screen, call egl screen init to * register correct close screen function. */ if (flags & GLAMOR_USE_EGL_SCREEN) { glamor_egl_screen_init(screen, &glamor_priv->ctx); } else { if (!glamor_glx_screen_init(&glamor_priv->ctx)) goto fail; } glamor_make_current(glamor_priv); if (!epoxy_is_desktop_gl()) glamor_priv->is_gles = TRUE; gl_version = epoxy_gl_version(); /* assume a core profile if we are GL 3.1 and don't have ARB_compatibility */ glamor_priv->is_core_profile = gl_version >= 31 && !epoxy_has_gl_extension("GL_ARB_compatibility"); shading_version_string = (char *) glGetString(GL_SHADING_LANGUAGE_VERSION); if (!shading_version_string) { LogMessage(X_WARNING, "glamor%d: Failed to get GLSL version\n", screen->myNum); goto fail; } shading_version_offset = 0; if (strncmp("OpenGL ES GLSL ES ", shading_version_string, 18) == 0) shading_version_offset = 18; if (sscanf(shading_version_string + shading_version_offset, "%i.%i", &glsl_major, &glsl_minor) != 2) { LogMessage(X_WARNING, "glamor%d: Failed to parse GLSL version string %s\n", screen->myNum, shading_version_string); goto fail; } glamor_priv->glsl_version = glsl_major * 100 + glsl_minor; if (glamor_priv->is_gles) { /* Force us back to the base version of our programs on an ES * context, anyway. Basically glamor only uses desktop 1.20 * or 1.30 currently. 1.30's new features are also present in * ES 3.0, but our glamor_program.c constructions use a lot of * compatibility features (to reduce the diff between 1.20 and * 1.30 programs). */ glamor_priv->glsl_version = 120; } /* We'd like to require GL_ARB_map_buffer_range or * GL_OES_map_buffer_range, since it offers more information to * the driver than plain old glMapBuffer() or glBufferSubData(). * It's been supported on Mesa on the desktop since 2009 and on * GLES2 since October 2012. It's supported on Apple's iOS * drivers for SGX535 and A7, but apparently not on most Android * devices (the OES extension spec wasn't released until June * 2012). * * 82% of 0 A.D. players (desktop GL) submitting hardware reports * have support for it, with most of the ones lacking it being on * Windows with Intel 4-series (G45) graphics or older. */ if (!glamor_priv->is_gles) { if (gl_version < 21) { ErrorF("Require OpenGL version 2.1 or later.\n"); goto fail; } if (!glamor_priv->is_core_profile && !epoxy_has_gl_extension("GL_ARB_texture_border_clamp")) { ErrorF("GL_ARB_texture_border_clamp required\n"); goto fail; } if (!glamor_check_instruction_count(gl_version)) goto fail; /* Glamor rendering assumes that platforms with GLSL 130+ * have instanced arrays, but this is not always the case. * etnaviv offers GLSL 140 with OpenGL 2.1. */ if (glamor_glsl_has_ints(glamor_priv) && !epoxy_has_gl_extension("GL_ARB_instanced_arrays")) glamor_priv->glsl_version = 120; } else { if (gl_version < 20) { ErrorF("Require Open GLES2.0 or later.\n"); goto fail; } if (!epoxy_has_gl_extension("GL_EXT_texture_format_BGRA8888")) { ErrorF("GL_EXT_texture_format_BGRA8888 required\n"); goto fail; } if (!epoxy_has_gl_extension("GL_OES_texture_border_clamp")) { ErrorF("GL_OES_texture_border_clamp required\n"); goto fail; } } if (!epoxy_has_gl_extension("GL_ARB_vertex_array_object") && !epoxy_has_gl_extension("GL_OES_vertex_array_object")) { ErrorF("GL_{ARB,OES}_vertex_array_object required\n"); goto fail; } if (!glamor_priv->is_gles && glamor_priv->glsl_version == 120 && epoxy_has_gl_extension("GL_ARB_instanced_arrays")) glamor_priv->use_gpu_shader4 = epoxy_has_gl_extension("GL_EXT_gpu_shader4"); glamor_priv->has_rw_pbo = FALSE; if (!glamor_priv->is_gles) glamor_priv->has_rw_pbo = TRUE; glamor_priv->has_khr_debug = epoxy_has_gl_extension("GL_KHR_debug"); glamor_priv->has_pack_invert = epoxy_has_gl_extension("GL_MESA_pack_invert"); glamor_priv->has_fbo_blit = epoxy_has_gl_extension("GL_EXT_framebuffer_blit"); glamor_priv->has_map_buffer_range = epoxy_has_gl_extension("GL_ARB_map_buffer_range") || epoxy_has_gl_extension("GL_EXT_map_buffer_range"); glamor_priv->has_buffer_storage = epoxy_has_gl_extension("GL_ARB_buffer_storage"); glamor_priv->has_mesa_tile_raster_order = epoxy_has_gl_extension("GL_MESA_tile_raster_order"); glamor_priv->has_nv_texture_barrier = epoxy_has_gl_extension("GL_NV_texture_barrier"); glamor_priv->has_unpack_subimage = !glamor_priv->is_gles || epoxy_gl_version() >= 30 || epoxy_has_gl_extension("GL_EXT_unpack_subimage"); glamor_priv->has_pack_subimage = !glamor_priv->is_gles || epoxy_gl_version() >= 30 || epoxy_has_gl_extension("GL_NV_pack_subimage"); glamor_priv->has_dual_blend = glamor_glsl_has_ints(glamor_priv) && epoxy_has_gl_extension("GL_ARB_blend_func_extended"); glamor_priv->has_clear_texture = epoxy_gl_version() >= 44 || epoxy_has_gl_extension("GL_ARB_clear_texture"); glamor_priv->can_copyplane = (gl_version >= 30); glamor_setup_debug_output(screen); glamor_priv->use_quads = !glamor_priv->is_gles && !glamor_priv->is_core_profile; /* Driver-specific hack: Avoid using GL_QUADS on VC4, where * they'll be emulated more expensively than we can with our * cached IB. */ if (strstr((char *)glGetString(GL_VENDOR), "Broadcom") && (strstr((char *)glGetString(GL_RENDERER), "VC4") || strstr((char *)glGetString(GL_RENDERER), "V3D"))) glamor_priv->use_quads = FALSE; glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size); glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glamor_priv->max_fbo_size); glGetIntegerv(GL_MAX_VIEWPORT_DIMS, max_viewport_size); glamor_priv->max_fbo_size = MIN(glamor_priv->max_fbo_size, max_viewport_size[0]); glamor_priv->max_fbo_size = MIN(glamor_priv->max_fbo_size, max_viewport_size[1]); #ifdef MAX_FBO_SIZE glamor_priv->max_fbo_size = MAX_FBO_SIZE; #endif glamor_priv->has_texture_swizzle = (epoxy_has_gl_extension("GL_ARB_texture_swizzle") || (glamor_priv->is_gles && gl_version >= 30)); glamor_setup_formats(screen); glamor_set_debug_level(&glamor_debug_level); if (!glamor_font_init(screen)) goto fail; glamor_priv->saved_procs.block_handler = screen->BlockHandler; screen->BlockHandler = _glamor_block_handler; if (!glamor_composite_glyphs_init(screen)) { ErrorF("Failed to initialize composite masks\n"); goto fail; } glamor_priv->saved_procs.create_gc = screen->CreateGC; screen->CreateGC = glamor_create_gc; glamor_priv->saved_procs.create_pixmap = screen->CreatePixmap; screen->CreatePixmap = glamor_create_pixmap; glamor_priv->saved_procs.get_spans = screen->GetSpans; screen->GetSpans = glamor_get_spans; glamor_priv->saved_procs.get_image = screen->GetImage; screen->GetImage = glamor_get_image; glamor_priv->saved_procs.change_window_attributes = screen->ChangeWindowAttributes; screen->ChangeWindowAttributes = glamor_change_window_attributes; glamor_priv->saved_procs.copy_window = screen->CopyWindow; screen->CopyWindow = glamor_copy_window; glamor_priv->saved_procs.bitmap_to_region = screen->BitmapToRegion; screen->BitmapToRegion = glamor_bitmap_to_region; glamor_priv->saved_procs.composite = ps->Composite; ps->Composite = glamor_composite; glamor_priv->saved_procs.trapezoids = ps->Trapezoids; ps->Trapezoids = glamor_trapezoids; glamor_priv->saved_procs.triangles = ps->Triangles; ps->Triangles = glamor_triangles; glamor_priv->saved_procs.addtraps = ps->AddTraps; ps->AddTraps = glamor_add_traps; glamor_priv->saved_procs.composite_rects = ps->CompositeRects; ps->CompositeRects = glamor_composite_rectangles; glamor_priv->saved_procs.glyphs = ps->Glyphs; ps->Glyphs = glamor_composite_glyphs; glamor_init_vbo(screen); glamor_init_gradient_shader(screen); glamor_pixmap_init(screen); glamor_sync_init(screen); glamor_priv->screen = screen; return TRUE; fail: /* Restore default CloseScreen and DestroyPixmap handlers */ screen->CloseScreen = glamor_priv->saved_procs.close_screen; screen->DestroyPixmap = glamor_priv->saved_procs.destroy_pixmap; free_glamor_private: free(glamor_priv); glamor_set_screen_private(screen, NULL); return FALSE; } static void glamor_release_screen_priv(ScreenPtr screen) { glamor_screen_private *glamor_priv; glamor_priv = glamor_get_screen_private(screen); glamor_fini_vbo(screen); glamor_pixmap_fini(screen); free(glamor_priv); glamor_set_screen_private(screen, NULL); } Bool glamor_close_screen(ScreenPtr screen) { glamor_screen_private *glamor_priv; PixmapPtr screen_pixmap; PictureScreenPtr ps = GetPictureScreenIfSet(screen); glamor_priv = glamor_get_screen_private(screen); glamor_sync_close(screen); glamor_composite_glyphs_fini(screen); screen->CloseScreen = glamor_priv->saved_procs.close_screen; screen->CreateGC = glamor_priv->saved_procs.create_gc; screen->CreatePixmap = glamor_priv->saved_procs.create_pixmap; screen->DestroyPixmap = glamor_priv->saved_procs.destroy_pixmap; screen->GetSpans = glamor_priv->saved_procs.get_spans; screen->ChangeWindowAttributes = glamor_priv->saved_procs.change_window_attributes; screen->CopyWindow = glamor_priv->saved_procs.copy_window; screen->BitmapToRegion = glamor_priv->saved_procs.bitmap_to_region; screen->BlockHandler = glamor_priv->saved_procs.block_handler; ps->Composite = glamor_priv->saved_procs.composite; ps->Trapezoids = glamor_priv->saved_procs.trapezoids; ps->Triangles = glamor_priv->saved_procs.triangles; ps->CompositeRects = glamor_priv->saved_procs.composite_rects; ps->Glyphs = glamor_priv->saved_procs.glyphs; screen_pixmap = screen->GetScreenPixmap(screen); glamor_pixmap_destroy_fbo(screen_pixmap); glamor_release_screen_priv(screen); return screen->CloseScreen(screen); } void glamor_fini(ScreenPtr screen) { /* Do nothing currently. */ } void glamor_enable_dri3(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_priv->dri3_enabled = TRUE; } Bool glamor_supports_pixmap_import_export(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); return glamor_priv->dri3_enabled; } _X_EXPORT void glamor_set_drawable_modifiers_func(ScreenPtr screen, GetDrawableModifiersFuncPtr func) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_priv->get_drawable_modifiers = func; } _X_EXPORT Bool glamor_get_drawable_modifiers(DrawablePtr draw, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers) { struct glamor_screen_private *glamor_priv = glamor_get_screen_private(draw->pScreen); if (glamor_priv->get_drawable_modifiers) { return glamor_priv->get_drawable_modifiers(draw, format, num_modifiers, modifiers); } *num_modifiers = 0; *modifiers = NULL; return TRUE; } static int _glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, CARD32 *size, uint64_t *modifier) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); glamor_screen_private *glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen); if (!glamor_priv->dri3_enabled) return 0; switch (pixmap_priv->type) { case GLAMOR_TEXTURE_DRM: case GLAMOR_TEXTURE_ONLY: if (!glamor_pixmap_ensure_fbo(pixmap, 0)) return 0; if (modifier) { return glamor_egl_fds_from_pixmap(screen, pixmap, fds, strides, offsets, modifier); } else { CARD16 stride; fds[0] = glamor_egl_fd_from_pixmap(screen, pixmap, &stride, size); strides[0] = stride; return fds[0] >= 0; } default: break; } return 0; } _X_EXPORT int glamor_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier) { return _glamor_fds_from_pixmap(screen, pixmap, fds, strides, offsets, NULL, modifier); } _X_EXPORT int glamor_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { int fd; int ret; uint32_t stride32; ret = _glamor_fds_from_pixmap(screen, pixmap, &fd, &stride32, NULL, size, NULL); if (ret != 1) return -1; *stride = stride32; return fd; } _X_EXPORT int glamor_shareable_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { unsigned orig_usage_hint = pixmap->usage_hint; int ret; /* * The actual difference between a shareable and non-shareable buffer * is decided 4 call levels deep in glamor_make_pixmap_exportable() * based on pixmap->usage_hint == CREATE_PIXMAP_USAGE_SHARED * 2 of those calls are also exported API, so we cannot just add a flag. */ pixmap->usage_hint = CREATE_PIXMAP_USAGE_SHARED; ret = glamor_fd_from_pixmap(screen, pixmap, stride, size); pixmap->usage_hint = orig_usage_hint; return ret; } int glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); switch (pixmap_priv->type) { case GLAMOR_TEXTURE_DRM: case GLAMOR_TEXTURE_ONLY: if (!glamor_pixmap_ensure_fbo(pixmap, 0)) return -1; return glamor_egl_fd_name_from_pixmap(pixmap->drawable.pScreen, pixmap, stride, size); default: break; } return -1; } void glamor_finish(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glFinish(); } xorg-server-21.1.16/glamor/glamor_context.h0000644000175000017500000000352514757411105014317 /* * Copyright © 2013 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file glamor_context.h * * This is the struct of state required for context switching in * glamor. It has to use types that don't require including either * server headers or Xlib headers, since it will be included by both * the server and the GLX (xlib) code. */ struct glamor_context { /** Either an EGLDisplay or an Xlib Display */ void *display; /** Either a GLXContext or an EGLContext. */ void *ctx; /** The EGLSurface we should MakeCurrent to */ void *drawable; /** The GLXDrawable we should MakeCurrent to */ uint32_t drawable_xid; void (*make_current)(struct glamor_context *glamor_ctx); }; Bool glamor_glx_screen_init(struct glamor_context *glamor_ctx); xorg-server-21.1.16/glamor/glamor_copy.c0000644000175000017500000006331214757411105013600 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transfer.h" #include "glamor_prepare.h" #include "glamor_transform.h" struct copy_args { PixmapPtr src_pixmap; glamor_pixmap_fbo *src; uint32_t bitplane; int dx, dy; }; static Bool use_copyarea(PixmapPtr dst, GCPtr gc, glamor_program *prog, void *arg) { struct copy_args *args = arg; glamor_pixmap_fbo *src = args->src; glamor_bind_texture(glamor_get_screen_private(dst->drawable.pScreen), GL_TEXTURE0, src, TRUE); glUniform2f(prog->fill_offset_uniform, args->dx, args->dy); glUniform2f(prog->fill_size_inv_uniform, 1.0f/src->width, 1.0f/src->height); return TRUE; } static const glamor_facet glamor_facet_copyarea = { "copy_area", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (GLAMOR_POS(gl_Position, primitive.xy) " fill_pos = (fill_offset + primitive.xy) * fill_size_inv;\n"), .fs_exec = " gl_FragColor = texture2D(sampler, fill_pos);\n", .locations = glamor_program_location_fillsamp | glamor_program_location_fillpos, .use = use_copyarea, }; /* * Configure the copy plane program for the current operation */ static Bool use_copyplane(PixmapPtr dst, GCPtr gc, glamor_program *prog, void *arg) { struct copy_args *args = arg; glamor_pixmap_fbo *src = args->src; glamor_bind_texture(glamor_get_screen_private(dst->drawable.pScreen), GL_TEXTURE0, src, TRUE); glUniform2f(prog->fill_offset_uniform, args->dx, args->dy); glUniform2f(prog->fill_size_inv_uniform, 1.0f/src->width, 1.0f/src->height); glamor_set_color(dst, gc->fgPixel, prog->fg_uniform); glamor_set_color(dst, gc->bgPixel, prog->bg_uniform); /* XXX handle 2 10 10 10 and 1555 formats; presumably the pixmap private knows this? */ switch (args->src_pixmap->drawable.depth) { case 30: glUniform4ui(prog->bitplane_uniform, (args->bitplane >> 20) & 0x3ff, (args->bitplane >> 10) & 0x3ff, (args->bitplane ) & 0x3ff, 0); glUniform4f(prog->bitmul_uniform, 0x3ff, 0x3ff, 0x3ff, 0); break; case 24: glUniform4ui(prog->bitplane_uniform, (args->bitplane >> 16) & 0xff, (args->bitplane >> 8) & 0xff, (args->bitplane ) & 0xff, 0); glUniform4f(prog->bitmul_uniform, 0xff, 0xff, 0xff, 0); break; case 32: glUniform4ui(prog->bitplane_uniform, (args->bitplane >> 16) & 0xff, (args->bitplane >> 8) & 0xff, (args->bitplane ) & 0xff, (args->bitplane >> 24) & 0xff); glUniform4f(prog->bitmul_uniform, 0xff, 0xff, 0xff, 0xff); break; case 16: glUniform4ui(prog->bitplane_uniform, (args->bitplane >> 11) & 0x1f, (args->bitplane >> 5) & 0x3f, (args->bitplane ) & 0x1f, 0); glUniform4f(prog->bitmul_uniform, 0x1f, 0x3f, 0x1f, 0); break; case 15: glUniform4ui(prog->bitplane_uniform, (args->bitplane >> 10) & 0x1f, (args->bitplane >> 5) & 0x1f, (args->bitplane ) & 0x1f, 0); glUniform4f(prog->bitmul_uniform, 0x1f, 0x1f, 0x1f, 0); break; case 8: glUniform4ui(prog->bitplane_uniform, 0, 0, 0, args->bitplane); glUniform4f(prog->bitmul_uniform, 0, 0, 0, 0xff); break; case 1: glUniform4ui(prog->bitplane_uniform, 0, 0, 0, args->bitplane); glUniform4f(prog->bitmul_uniform, 0, 0, 0, 0xff); break; } return TRUE; } static const glamor_facet glamor_facet_copyplane = { "copy_plane", .version = 130, .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (GLAMOR_POS(gl_Position, (primitive.xy)) " fill_pos = (fill_offset + primitive.xy) * fill_size_inv;\n"), .fs_exec = (" uvec4 bits = uvec4(round(texture2D(sampler, fill_pos) * bitmul));\n" " if ((bits & bitplane) != uvec4(0,0,0,0))\n" " gl_FragColor = fg;\n" " else\n" " gl_FragColor = bg;\n"), .locations = glamor_program_location_fillsamp|glamor_program_location_fillpos|glamor_program_location_fg|glamor_program_location_bg|glamor_program_location_bitplane, .use = use_copyplane, }; /* * When all else fails, pull the bits out of the GPU and do the * operation with fb */ static void glamor_copy_bail(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { if (glamor_prepare_access(dst, GLAMOR_ACCESS_RW) && glamor_prepare_access(src, GLAMOR_ACCESS_RO)) { if (bitplane) { if (src->bitsPerPixel > 1) fbCopyNto1(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); else fbCopy1toN(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } else { fbCopyNtoN(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } } glamor_finish_access(dst); glamor_finish_access(src); } /** * Implements CopyPlane and CopyArea from the CPU to the GPU by using * the source as a texture and painting that into the destination. * * This requires that source and dest are different textures, or that * (if the copy area doesn't overlap), GL_NV_texture_barrier is used * to ensure that the caches are flushed at the right times. */ static Bool glamor_copy_cpu_fbo(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { ScreenPtr screen = dst->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(dst); int dst_xoff, dst_yoff; if (gc && gc->alu != GXcopy) goto bail; if (gc && !glamor_pm_is_solid(gc->depth, gc->planemask)) goto bail; glamor_make_current(glamor_priv); if (!glamor_prepare_access(src, GLAMOR_ACCESS_RO)) goto bail; glamor_get_drawable_deltas(dst, dst_pixmap, &dst_xoff, &dst_yoff); if (bitplane) { FbBits *tmp_bits; FbStride tmp_stride; int tmp_bpp; int tmp_xoff, tmp_yoff; PixmapPtr tmp_pix = fbCreatePixmap(screen, dst_pixmap->drawable.width, dst_pixmap->drawable.height, dst->depth, 0); if (!tmp_pix) { glamor_finish_access(src); goto bail; } tmp_pix->drawable.x = dst_xoff; tmp_pix->drawable.y = dst_yoff; fbGetDrawable(&tmp_pix->drawable, tmp_bits, tmp_stride, tmp_bpp, tmp_xoff, tmp_yoff); if (src->bitsPerPixel > 1) fbCopyNto1(src, &tmp_pix->drawable, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); else fbCopy1toN(src, &tmp_pix->drawable, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); glamor_upload_boxes(dst_pixmap, box, nbox, tmp_xoff, tmp_yoff, dst_xoff, dst_yoff, (uint8_t *) tmp_bits, tmp_stride * sizeof(FbBits)); fbDestroyPixmap(tmp_pix); } else { FbBits *src_bits; FbStride src_stride; int src_bpp; int src_xoff, src_yoff; fbGetDrawable(src, src_bits, src_stride, src_bpp, src_xoff, src_yoff); glamor_upload_boxes(dst_pixmap, box, nbox, src_xoff + dx, src_yoff + dy, dst_xoff, dst_yoff, (uint8_t *) src_bits, src_stride * sizeof (FbBits)); } glamor_finish_access(src); return TRUE; bail: return FALSE; } /** * Implements CopyArea from the GPU to the CPU using glReadPixels from the * source FBO. */ static Bool glamor_copy_fbo_cpu(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { ScreenPtr screen = dst->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr src_pixmap = glamor_get_drawable_pixmap(src); FbBits *dst_bits; FbStride dst_stride; int dst_bpp; int src_xoff, src_yoff; int dst_xoff, dst_yoff; if (gc && gc->alu != GXcopy) goto bail; if (gc && !glamor_pm_is_solid(gc->depth, gc->planemask)) goto bail; glamor_make_current(glamor_priv); if (!glamor_prepare_access(dst, GLAMOR_ACCESS_RW)) goto bail; glamor_get_drawable_deltas(src, src_pixmap, &src_xoff, &src_yoff); fbGetDrawable(dst, dst_bits, dst_stride, dst_bpp, dst_xoff, dst_yoff); glamor_download_boxes(src_pixmap, box, nbox, src_xoff + dx, src_yoff + dy, dst_xoff, dst_yoff, (uint8_t *) dst_bits, dst_stride * sizeof (FbBits)); glamor_finish_access(dst); return TRUE; bail: return FALSE; } /* Include the enums here for the moment, to keep from needing to bump epoxy. */ #ifndef GL_TILE_RASTER_ORDER_FIXED_MESA #define GL_TILE_RASTER_ORDER_FIXED_MESA 0x8BB8 #define GL_TILE_RASTER_ORDER_INCREASING_X_MESA 0x8BB9 #define GL_TILE_RASTER_ORDER_INCREASING_Y_MESA 0x8BBA #endif /* * Copy from GPU to GPU by using the source * as a texture and painting that into the destination */ static Bool glamor_copy_fbo_fbo_draw(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { ScreenPtr screen = dst->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr src_pixmap = glamor_get_drawable_pixmap(src); PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(dst); glamor_pixmap_private *src_priv = glamor_get_pixmap_private(src_pixmap); glamor_pixmap_private *dst_priv = glamor_get_pixmap_private(dst_pixmap); int src_box_index, dst_box_index; int dst_off_x, dst_off_y; int src_off_x, src_off_y; GLshort *v; char *vbo_offset; struct copy_args args; glamor_program *prog; const glamor_facet *copy_facet; int n; Bool ret = FALSE; BoxRec bounds = glamor_no_rendering_bounds(); glamor_make_current(glamor_priv); if (gc && !glamor_set_planemask(gc->depth, gc->planemask)) goto bail_ctx; if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy)) goto bail_ctx; if (bitplane && !glamor_priv->can_copyplane) goto bail_ctx; if (bitplane) { prog = &glamor_priv->copy_plane_prog; copy_facet = &glamor_facet_copyplane; } else { prog = &glamor_priv->copy_area_prog; copy_facet = &glamor_facet_copyarea; } if (prog->failed) goto bail_ctx; if (!prog->prog) { if (!glamor_build_program(screen, prog, copy_facet, NULL, NULL, NULL)) goto bail_ctx; } args.src_pixmap = src_pixmap; args.bitplane = bitplane; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(dst->pScreen, nbox * 8 * sizeof (int16_t), &vbo_offset); if (src_pixmap == dst_pixmap && glamor_priv->has_mesa_tile_raster_order) { glEnable(GL_TILE_RASTER_ORDER_FIXED_MESA); if (dx >= 0) glEnable(GL_TILE_RASTER_ORDER_INCREASING_X_MESA); else glDisable(GL_TILE_RASTER_ORDER_INCREASING_X_MESA); if (dy >= 0) glEnable(GL_TILE_RASTER_ORDER_INCREASING_Y_MESA); else glDisable(GL_TILE_RASTER_ORDER_INCREASING_Y_MESA); } glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 2 * sizeof (GLshort), vbo_offset); if (nbox < 100) { bounds = glamor_start_rendering_bounds(); for (int i = 0; i < nbox; i++) glamor_bounds_union_box(&bounds, &box[i]); } for (n = 0; n < nbox; n++) { v[0] = box->x1; v[1] = box->y1; v[2] = box->x1; v[3] = box->y2; v[4] = box->x2; v[5] = box->y2; v[6] = box->x2; v[7] = box->y1; v += 8; box++; } glamor_put_vbo_space(screen); glamor_get_drawable_deltas(src, src_pixmap, &src_off_x, &src_off_y); glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(src_priv, src_box_index) { BoxPtr src_box = glamor_pixmap_box_at(src_priv, src_box_index); args.dx = dx + src_off_x - src_box->x1; args.dy = dy + src_off_y - src_box->y1; args.src = glamor_pixmap_fbo_at(src_priv, src_box_index); if (!glamor_use_program(dst_pixmap, gc, prog, &args)) goto bail_ctx; glamor_pixmap_loop(dst_priv, dst_box_index) { BoxRec scissor = { .x1 = max(-args.dx, bounds.x1), .y1 = max(-args.dy, bounds.y1), .x2 = min(-args.dx + src_box->x2 - src_box->x1, bounds.x2), .y2 = min(-args.dy + src_box->y2 - src_box->y1, bounds.y2), }; if (scissor.x1 >= scissor.x2 || scissor.y1 >= scissor.y2) continue; if (!glamor_set_destination_drawable(dst, dst_box_index, FALSE, FALSE, prog->matrix_uniform, &dst_off_x, &dst_off_y)) goto bail_ctx; glScissor(scissor.x1 + dst_off_x, scissor.y1 + dst_off_y, scissor.x2 - scissor.x1, scissor.y2 - scissor.y1); glamor_glDrawArrays_GL_QUADS(glamor_priv, nbox); } } ret = TRUE; bail_ctx: if (src_pixmap == dst_pixmap && glamor_priv->has_mesa_tile_raster_order) { glDisable(GL_TILE_RASTER_ORDER_FIXED_MESA); } glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } /** * Copies from the GPU to the GPU using a temporary pixmap in between, * to correctly handle overlapping copies. */ static Bool glamor_copy_fbo_fbo_temp(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { ScreenPtr screen = dst->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr tmp_pixmap; BoxRec bounds; int n; BoxPtr tmp_box; if (nbox == 0) return TRUE; /* Sanity check state to avoid getting halfway through and bailing * at the last second. Might be nice to have checks that didn't * involve setting state. */ glamor_make_current(glamor_priv); if (gc && !glamor_set_planemask(gc->depth, gc->planemask)) goto bail_ctx; if (!glamor_set_alu(screen, gc ? gc->alu : GXcopy)) goto bail_ctx; /* Find the size of the area to copy */ bounds = box[0]; for (n = 1; n < nbox; n++) { bounds.x1 = min(bounds.x1, box[n].x1); bounds.x2 = max(bounds.x2, box[n].x2); bounds.y1 = min(bounds.y1, box[n].y1); bounds.y2 = max(bounds.y2, box[n].y2); } /* Allocate a suitable temporary pixmap */ tmp_pixmap = glamor_create_pixmap(screen, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1, src->depth, 0); if (!tmp_pixmap) goto bail; tmp_box = calloc(nbox, sizeof (BoxRec)); if (!tmp_box) goto bail_pixmap; /* Convert destination boxes into tmp pixmap boxes */ for (n = 0; n < nbox; n++) { tmp_box[n].x1 = box[n].x1 - bounds.x1; tmp_box[n].x2 = box[n].x2 - bounds.x1; tmp_box[n].y1 = box[n].y1 - bounds.y1; tmp_box[n].y2 = box[n].y2 - bounds.y1; } if (!glamor_copy_fbo_fbo_draw(src, &tmp_pixmap->drawable, NULL, tmp_box, nbox, dx + bounds.x1, dy + bounds.y1, FALSE, FALSE, 0, NULL)) goto bail_box; if (!glamor_copy_fbo_fbo_draw(&tmp_pixmap->drawable, dst, gc, box, nbox, -bounds.x1, -bounds.y1, FALSE, FALSE, bitplane, closure)) goto bail_box; free(tmp_box); glamor_destroy_pixmap(tmp_pixmap); return TRUE; bail_box: free(tmp_box); bail_pixmap: glamor_destroy_pixmap(tmp_pixmap); bail: return FALSE; bail_ctx: return FALSE; } /** * Returns TRUE if the copy has to be implemented with * glamor_copy_fbo_fbo_temp() instead of glamor_copy_fbo_fbo(). * * If the src and dst are in the same pixmap, then glamor_copy_fbo_fbo()'s * sampling would give undefined results (since the same texture would be * bound as an FBO destination and as a texture source). However, if we * have GL_NV_texture_barrier, we can take advantage of the exception it * added: * * "- If a texel has been written, then in order to safely read the result * a texel fetch must be in a subsequent Draw separated by the command * * void TextureBarrierNV(void); * * TextureBarrierNV() will guarantee that writes have completed and caches * have been invalidated before subsequent Draws are executed." */ static Bool glamor_copy_needs_temp(DrawablePtr src, DrawablePtr dst, BoxPtr box, int nbox, int dx, int dy) { PixmapPtr src_pixmap = glamor_get_drawable_pixmap(src); PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(dst); ScreenPtr screen = dst->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); int n; int dst_off_x, dst_off_y; int src_off_x, src_off_y; BoxRec bounds; if (src_pixmap != dst_pixmap) return FALSE; if (nbox == 0) return FALSE; if (!glamor_priv->has_nv_texture_barrier) return TRUE; if (!glamor_priv->has_mesa_tile_raster_order) { glamor_get_drawable_deltas(src, src_pixmap, &src_off_x, &src_off_y); glamor_get_drawable_deltas(dst, dst_pixmap, &dst_off_x, &dst_off_y); bounds = box[0]; for (n = 1; n < nbox; n++) { bounds.x1 = min(bounds.x1, box[n].x1); bounds.y1 = min(bounds.y1, box[n].y1); bounds.x2 = max(bounds.x2, box[n].x2); bounds.y2 = max(bounds.y2, box[n].y2); } /* Check to see if the pixmap-relative boxes overlap in both X and Y, * in which case we can't rely on NV_texture_barrier and must * make a temporary copy * * dst.x1 < src.x2 && * src.x1 < dst.x2 && * * dst.y1 < src.y2 && * src.y1 < dst.y2 */ if (bounds.x1 + dst_off_x < bounds.x2 + dx + src_off_x && bounds.x1 + dx + src_off_x < bounds.x2 + dst_off_x && bounds.y1 + dst_off_y < bounds.y2 + dy + src_off_y && bounds.y1 + dy + src_off_y < bounds.y2 + dst_off_y) { return TRUE; } } glTextureBarrierNV(); return FALSE; } static Bool glamor_copy_gl(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { PixmapPtr src_pixmap = glamor_get_drawable_pixmap(src); PixmapPtr dst_pixmap = glamor_get_drawable_pixmap(dst); glamor_pixmap_private *src_priv = glamor_get_pixmap_private(src_pixmap); glamor_pixmap_private *dst_priv = glamor_get_pixmap_private(dst_pixmap); if (GLAMOR_PIXMAP_PRIV_HAS_FBO(dst_priv)) { if (GLAMOR_PIXMAP_PRIV_HAS_FBO(src_priv)) { if (glamor_copy_needs_temp(src, dst, box, nbox, dx, dy)) return glamor_copy_fbo_fbo_temp(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); else return glamor_copy_fbo_fbo_draw(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } return glamor_copy_cpu_fbo(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } else if (GLAMOR_PIXMAP_PRIV_HAS_FBO(src_priv) && dst_priv->type != GLAMOR_DRM_ONLY && bitplane == 0) { return glamor_copy_fbo_cpu(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } return FALSE; } void glamor_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure) { if (nbox == 0) return; if (glamor_copy_gl(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure)) return; glamor_copy_bail(src, dst, gc, box, nbox, dx, dy, reverse, upsidedown, bitplane, closure); } RegionPtr glamor_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc, int srcx, int srcy, int width, int height, int dstx, int dsty) { return miDoCopy(src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, 0, NULL); } RegionPtr glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitplane) { if ((bitplane & FbFullMask(src->depth)) == 0) return miHandleExposures(src, dst, gc, srcx, srcy, width, height, dstx, dsty); return miDoCopy(src, dst, gc, srcx, srcy, width, height, dstx, dsty, glamor_copy, bitplane, NULL); } void glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_region) { PixmapPtr pixmap = glamor_get_drawable_pixmap(&window->drawable); DrawablePtr drawable = &pixmap->drawable; RegionRec dst_region; int dx, dy; dx = old_origin.x - window->drawable.x; dy = old_origin.y - window->drawable.y; RegionTranslate(src_region, -dx, -dy); RegionNull(&dst_region); RegionIntersect(&dst_region, &window->borderClip, src_region); #ifdef COMPOSITE if (pixmap->screen_x || pixmap->screen_y) RegionTranslate(&dst_region, -pixmap->screen_x, -pixmap->screen_y); #endif miCopyRegion(drawable, drawable, 0, &dst_region, dx, dy, glamor_copy, 0, 0); RegionUninit(&dst_region); } xorg-server-21.1.16/glamor/glamor_core.c0000644000175000017500000002111714757411105013553 /* * Copyright © 2001 Keith Packard * Copyright © 2008 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ /** @file glamor_core.c * * This file covers core X rendering in glamor. */ #include #include "glamor_priv.h" Bool glamor_get_drawable_location(const DrawablePtr drawable) { PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) return 'm'; else return 'f'; } GLint glamor_compile_glsl_prog(GLenum type, const char *source) { GLint ok; GLint prog; prog = glCreateShader(type); glShaderSource(prog, 1, (const GLchar **) &source, NULL); glCompileShader(prog); glGetShaderiv(prog, GL_COMPILE_STATUS, &ok); if (!ok) { GLchar *info; GLint size; glGetShaderiv(prog, GL_INFO_LOG_LENGTH, &size); info = malloc(size); if (info) { glGetShaderInfoLog(prog, size, NULL, info); ErrorF("Failed to compile %s: %s\n", type == GL_FRAGMENT_SHADER ? "FS" : "VS", info); ErrorF("Program source:\n%s", source); free(info); } else ErrorF("Failed to get shader compilation info.\n"); FatalError("GLSL compile failure\n"); } return prog; } void glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...) { GLint ok; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); if (glamor_priv->has_khr_debug) { char *label; va_list va; va_start(va, format); XNFvasprintf(&label, format, va); glObjectLabel(GL_PROGRAM, prog, -1, label); free(label); va_end(va); } glLinkProgram(prog); glGetProgramiv(prog, GL_LINK_STATUS, &ok); if (!ok) { GLchar *info; GLint size; glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size); info = malloc(size); glGetProgramInfoLog(prog, size, NULL, info); ErrorF("Failed to link: %s\n", info); FatalError("GLSL link failure\n"); } } static GCOps glamor_gc_ops = { .FillSpans = glamor_fill_spans, .SetSpans = glamor_set_spans, .PutImage = glamor_put_image, .CopyArea = glamor_copy_area, .CopyPlane = glamor_copy_plane, .PolyPoint = glamor_poly_point, .Polylines = glamor_poly_lines, .PolySegment = glamor_poly_segment, .PolyRectangle = miPolyRectangle, .PolyArc = miPolyArc, .FillPolygon = miFillPolygon, .PolyFillRect = glamor_poly_fill_rect, .PolyFillArc = miPolyFillArc, .PolyText8 = glamor_poly_text8, .PolyText16 = glamor_poly_text16, .ImageText8 = glamor_image_text8, .ImageText16 = glamor_image_text16, .ImageGlyphBlt = miImageGlyphBlt, .PolyGlyphBlt = glamor_poly_glyph_blt, .PushPixels = glamor_push_pixels, }; /* * When the stipple is changed or drawn to, invalidate any * cached copy */ static void glamor_invalidate_stipple(GCPtr gc) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); if (gc_priv->stipple) { if (gc_priv->stipple_damage) DamageUnregister(gc_priv->stipple_damage); glamor_destroy_pixmap(gc_priv->stipple); gc_priv->stipple = NULL; } } static void glamor_stipple_damage_report(DamagePtr damage, RegionPtr region, void *closure) { GCPtr gc = closure; glamor_invalidate_stipple(gc); } static void glamor_stipple_damage_destroy(DamagePtr damage, void *closure) { GCPtr gc = closure; glamor_gc_private *gc_priv = glamor_get_gc_private(gc); gc_priv->stipple_damage = NULL; glamor_invalidate_stipple(gc); } void glamor_track_stipple(GCPtr gc) { if (gc->stipple) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); if (!gc_priv->stipple_damage) gc_priv->stipple_damage = DamageCreate(glamor_stipple_damage_report, glamor_stipple_damage_destroy, DamageReportNonEmpty, TRUE, gc->pScreen, gc); if (gc_priv->stipple_damage) DamageRegister(&gc->stipple->drawable, gc_priv->stipple_damage); } } /** * uxa_validate_gc() sets the ops to glamor's implementations, which may be * accelerated or may sync the card and fall back to fb. */ void glamor_validate_gc(GCPtr gc, unsigned long changes, DrawablePtr drawable) { /* fbValidateGC will do direct access to pixmaps if the tiling has changed. * Preempt fbValidateGC by doing its work and masking the change out, so * that we can do the Prepare/finish_access. */ if (changes & GCTile) { if (!gc->tileIsPixel) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(gc->tile.pixmap); if ((!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) && FbEvenTile(gc->tile.pixmap->drawable.width * drawable->bitsPerPixel)) { glamor_fallback ("GC %p tile changed %p.\n", gc, gc->tile.pixmap); if (glamor_prepare_access (&gc->tile.pixmap->drawable, GLAMOR_ACCESS_RW)) { fbPadPixmap(gc->tile.pixmap); glamor_finish_access(&gc->tile.pixmap->drawable); } } } /* Mask out the GCTile change notification, now that we've done FB's * job for it. */ changes &= ~GCTile; } if (changes & GCStipple) glamor_invalidate_stipple(gc); if (changes & GCStipple && gc->stipple) { /* We can't inline stipple handling like we do for GCTile because * it sets fbgc privates. */ if (glamor_prepare_access(&gc->stipple->drawable, GLAMOR_ACCESS_RW)) { fbValidateGC(gc, changes, drawable); glamor_finish_access(&gc->stipple->drawable); } } else { fbValidateGC(gc, changes, drawable); } if (changes & GCDashList) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); if (gc_priv->dash) { glamor_destroy_pixmap(gc_priv->dash); gc_priv->dash = NULL; } } gc->ops = &glamor_gc_ops; } void glamor_destroy_gc(GCPtr gc) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); if (gc_priv->dash) { glamor_destroy_pixmap(gc_priv->dash); gc_priv->dash = NULL; } glamor_invalidate_stipple(gc); if (gc_priv->stipple_damage) DamageDestroy(gc_priv->stipple_damage); miDestroyGC(gc); } static GCFuncs glamor_gc_funcs = { glamor_validate_gc, miChangeGC, miCopyGC, glamor_destroy_gc, miChangeClip, miDestroyClip, miCopyClip }; /** * exaCreateGC makes a new GC and hooks up its funcs handler, so that * exaValidateGC() will get called. */ int glamor_create_gc(GCPtr gc) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); gc_priv->dash = NULL; gc_priv->stipple = NULL; if (!fbCreateGC(gc)) return FALSE; gc->funcs = &glamor_gc_funcs; return TRUE; } RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap) { RegionPtr ret; glamor_fallback("pixmap %p \n", pixmap); if (!glamor_prepare_access(&pixmap->drawable, GLAMOR_ACCESS_RO)) return NULL; ret = fbPixmapToRegion(pixmap); glamor_finish_access(&pixmap->drawable); return ret; } xorg-server-21.1.16/glamor/glamor_dash.c0000644000175000017500000002507514757411105013551 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_program.h" #include "glamor_transform.h" #include "glamor_transfer.h" #include "glamor_prepare.h" static const char dash_vs_vars[] = "attribute vec3 primitive;\n" "varying float dash_offset;\n"; static const char dash_vs_exec[] = " dash_offset = primitive.z / dash_length;\n" " vec2 pos = vec2(0,0);\n" GLAMOR_POS(gl_Position, primitive.xy); static const char dash_fs_vars[] = "varying float dash_offset;\n"; static const char on_off_fs_exec[] = " float pattern = texture2D(dash, vec2(dash_offset, 0.5)).w;\n" " if (pattern == 0.0)\n" " discard;\n"; /* XXX deal with stippled double dashed lines once we have stippling support */ static const char double_fs_exec[] = " float pattern = texture2D(dash, vec2(dash_offset, 0.5)).w;\n" " if (pattern == 0.0)\n" " gl_FragColor = bg;\n" " else\n" " gl_FragColor = fg;\n"; static const glamor_facet glamor_facet_on_off_dash_lines = { .version = 130, .name = "poly_lines_on_off_dash", .vs_vars = dash_vs_vars, .vs_exec = dash_vs_exec, .fs_vars = dash_fs_vars, .fs_exec = on_off_fs_exec, .locations = glamor_program_location_dash, }; static const glamor_facet glamor_facet_double_dash_lines = { .version = 130, .name = "poly_lines_double_dash", .vs_vars = dash_vs_vars, .vs_exec = dash_vs_exec, .fs_vars = dash_fs_vars, .fs_exec = double_fs_exec, .locations = (glamor_program_location_dash| glamor_program_location_fg| glamor_program_location_bg), }; static PixmapPtr glamor_get_dash_pixmap(GCPtr gc) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); ScreenPtr screen = gc->pScreen; PixmapPtr pixmap; int offset; int d; uint32_t pixel; GCPtr scratch_gc; if (gc_priv->dash) return gc_priv->dash; offset = 0; for (d = 0; d < gc->numInDashList; d++) offset += gc->dash[d]; pixmap = glamor_create_pixmap(screen, offset, 1, 8, 0); if (!pixmap) goto bail; scratch_gc = GetScratchGC(8, screen); if (!scratch_gc) goto bail_pixmap; pixel = 0xffffffff; offset = 0; for (d = 0; d < gc->numInDashList; d++) { xRectangle rect; ChangeGCVal changes; changes.val = pixel; (void) ChangeGC(NullClient, scratch_gc, GCForeground, &changes); ValidateGC(&pixmap->drawable, scratch_gc); rect.x = offset; rect.y = 0; rect.width = gc->dash[d]; rect.height = 1; scratch_gc->ops->PolyFillRect (&pixmap->drawable, scratch_gc, 1, &rect); offset += gc->dash[d]; pixel = ~pixel; } FreeScratchGC(scratch_gc); gc_priv->dash = pixmap; return pixmap; bail_pixmap: glamor_destroy_pixmap(pixmap); bail: return NULL; } static glamor_program * glamor_dash_setup(DrawablePtr drawable, GCPtr gc) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); PixmapPtr dash_pixmap; glamor_pixmap_private *dash_priv; glamor_program *prog; if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; if (gc->lineWidth != 0) goto bail; dash_pixmap = glamor_get_dash_pixmap(gc); dash_priv = glamor_get_pixmap_private(dash_pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dash_priv)) goto bail; glamor_make_current(glamor_priv); switch (gc->lineStyle) { case LineOnOffDash: prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->on_off_dash_line_progs, &glamor_facet_on_off_dash_lines); if (!prog) goto bail; break; case LineDoubleDash: if (gc->fillStyle != FillSolid) goto bail; prog = &glamor_priv->double_dash_line_prog; if (!prog->prog) { if (!glamor_build_program(screen, prog, &glamor_facet_double_dash_lines, NULL, NULL, NULL)) goto bail; } if (!glamor_use_program(pixmap, gc, prog, NULL)) goto bail; glamor_set_color(pixmap, gc->fgPixel, prog->fg_uniform); glamor_set_color(pixmap, gc->bgPixel, prog->bg_uniform); break; default: goto bail; } /* Set the dash pattern as texture 1 */ glamor_bind_texture(glamor_priv, GL_TEXTURE1, dash_priv->fbo, FALSE); glUniform1i(prog->dash_uniform, 1); glUniform1f(prog->dash_length_uniform, dash_pixmap->drawable.width); return prog; bail: return NULL; } static void glamor_dash_loop(DrawablePtr drawable, GCPtr gc, glamor_program *prog, int n, GLenum mode) { PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); int box_index; int off_x, off_y; glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); glamor_set_destination_drawable(drawable, box_index, TRUE, TRUE, prog->matrix_uniform, &off_x, &off_y); while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; glDrawArrays(mode, 0, n); } } glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); } static int glamor_line_length(short x1, short y1, short x2, short y2) { return max(abs(x2 - x1), abs(y2 - y1)); } Bool glamor_poly_lines_dash_gl(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { ScreenPtr screen = drawable->pScreen; glamor_program *prog; short *v; char *vbo_offset; int add_last; int dash_pos; int prev_x, prev_y; int i; if (n < 2) return TRUE; if (!(prog = glamor_dash_setup(drawable, gc))) return FALSE; add_last = 0; if (gc->capStyle != CapNotLast) add_last = 1; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, (n + add_last) * 3 * sizeof (short), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 3, GL_SHORT, GL_FALSE, 3 * sizeof (short), vbo_offset); dash_pos = gc->dashOffset; prev_x = prev_y = 0; for (i = 0; i < n; i++) { int this_x = points[i].x; int this_y = points[i].y; if (i) { if (mode == CoordModePrevious) { this_x += prev_x; this_y += prev_y; } dash_pos += glamor_line_length(prev_x, prev_y, this_x, this_y); } v[0] = prev_x = this_x; v[1] = prev_y = this_y; v[2] = dash_pos; v += 3; } if (add_last) { v[0] = prev_x + 1; v[1] = prev_y; v[2] = dash_pos + 1; } glamor_put_vbo_space(screen); glamor_dash_loop(drawable, gc, prog, n + add_last, GL_LINE_STRIP); return TRUE; } static short * glamor_add_segment(short *v, short x1, short y1, short x2, short y2, int dash_start, int dash_end) { v[0] = x1; v[1] = y1; v[2] = dash_start; v[3] = x2; v[4] = y2; v[5] = dash_end; return v + 6; } Bool glamor_poly_segment_dash_gl(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs) { ScreenPtr screen = drawable->pScreen; glamor_program *prog; short *v; char *vbo_offset; int dash_start = gc->dashOffset; int add_last; int i; if (!(prog = glamor_dash_setup(drawable, gc))) return FALSE; add_last = 0; if (gc->capStyle != CapNotLast) add_last = 1; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, (nseg< * */ #ifndef __GLAMOR_DEBUG_H__ #define __GLAMOR_DEBUG_H__ #define GLAMOR_DEBUG_NONE 0 #define GLAMOR_DEBUG_UNIMPL 0 #define GLAMOR_DEBUG_FALLBACK 1 #define GLAMOR_DEBUG_TEXTURE_DOWNLOAD 2 #define GLAMOR_DEBUG_TEXTURE_DYNAMIC_UPLOAD 3 extern void AbortServer(void) _X_NORETURN; #define GLAMOR_PANIC(_format_, ...) \ do { \ LogMessageVerb(X_NONE, 0, "Glamor Fatal Error" \ " at %32s line %d: " _format_ "\n", \ __FUNCTION__, __LINE__, \ ##__VA_ARGS__ ); \ exit(1); \ } while(0) #define __debug_output_message(_format_, _prefix_, ...) \ LogMessageVerb(X_NONE, 0, \ "%32s:\t" _format_ , \ /*_prefix_,*/ \ __FUNCTION__, \ ##__VA_ARGS__) #define glamor_debug_output(_level_, _format_,...) \ do { \ if (glamor_debug_level >= _level_) \ __debug_output_message(_format_, \ "Glamor debug", \ ##__VA_ARGS__); \ } while(0) #define glamor_fallback(_format_,...) \ do { \ if (glamor_debug_level >= GLAMOR_DEBUG_FALLBACK) \ __debug_output_message(_format_, \ "Glamor fallback", \ ##__VA_ARGS__);} while(0) #define DEBUGF(str, ...) do {} while(0) //#define DEBUGF(str, ...) ErrorF(str, ##__VA_ARGS__) #define DEBUGRegionPrint(x) do {} while (0) //#define DEBUGRegionPrint RegionPrint #endif xorg-server-21.1.16/glamor/glamor_font.c0000644000175000017500000001713114757411105013572 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_font.h" #include static int glamor_font_generation; static int glamor_font_private_index; static int glamor_font_screen_count; glamor_font_t * glamor_font_get(ScreenPtr screen, FontPtr font) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_font_t *privates; glamor_font_t *glamor_font; int overall_width, overall_height; int num_rows; int num_cols; int glyph_width_pixels; int glyph_width_bytes; int glyph_height; int row, col; unsigned char c[2]; CharInfoPtr glyph; unsigned long count; char *bits; if (!glamor_glsl_has_ints(glamor_priv)) return NULL; privates = FontGetPrivate(font, glamor_font_private_index); if (!privates) { privates = calloc(glamor_font_screen_count, sizeof (glamor_font_t)); if (!privates) return NULL; xfont2_font_set_private(font, glamor_font_private_index, privates); } glamor_font = &privates[screen->myNum]; if (glamor_font->realized) return glamor_font; /* Figure out how many glyphs are in the font */ num_cols = font->info.lastCol - font->info.firstCol + 1; num_rows = font->info.lastRow - font->info.firstRow + 1; /* Figure out the size of each glyph */ glyph_width_pixels = font->info.maxbounds.rightSideBearing - font->info.minbounds.leftSideBearing; glyph_height = font->info.maxbounds.ascent + font->info.maxbounds.descent; glyph_width_bytes = (glyph_width_pixels + 7) >> 3; glamor_font->glyph_width_pixels = glyph_width_pixels; glamor_font->glyph_width_bytes = glyph_width_bytes; glamor_font->glyph_height = glyph_height; /* * Layout the font two blocks of columns wide. * This avoids a problem with some fonts that are too high to fit. */ glamor_font->row_width = glyph_width_bytes * num_cols; if (num_rows > 1) { overall_width = glamor_font->row_width * 2; overall_height = glyph_height * ((num_rows + 1) / 2); } else { overall_width = glamor_font->row_width; overall_height = glyph_height; } if (overall_width > glamor_priv->max_fbo_size || overall_height > glamor_priv->max_fbo_size) { /* fallback if we don't fit inside a texture */ return NULL; } bits = malloc(overall_width * overall_height); if (!bits) return NULL; /* Check whether the font has a default character */ c[0] = font->info.lastRow + 1; c[1] = font->info.lastCol + 1; (*font->get_glyphs)(font, 1, c, TwoD16Bit, &count, &glyph); glamor_font->default_char = count ? glyph : NULL; glamor_font->default_row = font->info.defaultCh >> 8; glamor_font->default_col = font->info.defaultCh; glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glGenTextures(1, &glamor_font->texture_id); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, glamor_font->texture_id); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); /* Paint all of the glyphs */ for (row = 0; row < num_rows; row++) { for (col = 0; col < num_cols; col++) { c[0] = row + font->info.firstRow; c[1] = col + font->info.firstCol; (*font->get_glyphs)(font, 1, c, TwoD16Bit, &count, &glyph); if (count) { char *dst; char *src = glyph->bits; unsigned y; dst = bits; /* get offset of start of first row */ dst += (row / 2) * glyph_height * overall_width; /* add offset into second row */ dst += (row & 1) ? glamor_font->row_width : 0; dst += col * glyph_width_bytes; for (y = 0; y < GLYPHHEIGHTPIXELS(glyph); y++) { memcpy(dst, src, GLYPHWIDTHBYTES(glyph)); dst += overall_width; src += GLYPHWIDTHBYTESPADDED(glyph); } } } } glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glamor_priv->suppress_gl_out_of_memory_logging = true; glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height, 0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, bits); glamor_priv->suppress_gl_out_of_memory_logging = false; if (glGetError() == GL_OUT_OF_MEMORY) return NULL; free(bits); glamor_font->realized = TRUE; return glamor_font; } static Bool glamor_realize_font(ScreenPtr screen, FontPtr font) { return TRUE; } static Bool glamor_unrealize_font(ScreenPtr screen, FontPtr font) { glamor_screen_private *glamor_priv; glamor_font_t *privates = FontGetPrivate(font, glamor_font_private_index); glamor_font_t *glamor_font; int s; if (!privates) return TRUE; glamor_font = &privates[screen->myNum]; if (!glamor_font->realized) return TRUE; /* Unrealize the font, freeing the allocated texture */ glamor_font->realized = FALSE; glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glDeleteTextures(1, &glamor_font->texture_id); /* Check to see if all of the screens are done with this font * and free the private when that happens */ for (s = 0; s < glamor_font_screen_count; s++) if (privates[s].realized) return TRUE; free(privates); xfont2_font_set_private(font, glamor_font_private_index, NULL); return TRUE; } Bool glamor_font_init(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); if (!glamor_glsl_has_ints(glamor_priv)) return TRUE; if (glamor_font_generation != serverGeneration) { glamor_font_private_index = xfont2_allocate_font_private_index(); if (glamor_font_private_index == -1) return FALSE; glamor_font_screen_count = 0; glamor_font_generation = serverGeneration; } if (screen->myNum >= glamor_font_screen_count) glamor_font_screen_count = screen->myNum + 1; screen->RealizeFont = glamor_realize_font; screen->UnrealizeFont = glamor_unrealize_font; return TRUE; } xorg-server-21.1.16/glamor/glamor_font.h0000644000175000017500000000330614757411105013576 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLAMOR_FONT_H_ #define _GLAMOR_FONT_H_ typedef struct { Bool realized; CharInfoPtr default_char; CARD8 default_row; CARD8 default_col; GLuint texture_id; GLuint row_width; CARD16 glyph_width_bytes; CARD16 glyph_width_pixels; CARD16 glyph_height; } glamor_font_t; glamor_font_t * glamor_font_get(ScreenPtr screen, FontPtr font); Bool glamor_font_init(ScreenPtr screen); void glamor_fini_glyph_shader(ScreenPtr screen); #endif /* _GLAMOR_FONT_H_ */ xorg-server-21.1.16/glamor/glamor_glx.c0000644000175000017500000000444614757411105013423 /* * Copyright © 2013 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #include #include "glamor_context.h" /** * @file glamor_glx.c * * GLX context management for glamor. * * This has to be kept separate from the server sources because of * Xlib's conflicting definition of CARD32 and similar typedefs. */ static void glamor_glx_make_current(struct glamor_context *glamor_ctx) { /* There's only a single global dispatch table in Mesa. EGL, GLX, * and AIGLX's direct dispatch table manipulation don't talk to * each other. We need to set the context to NULL first to avoid * GLX's no-op context change fast path when switching back to * GLX. */ glXMakeCurrent(glamor_ctx->display, None, None); glXMakeCurrent(glamor_ctx->display, glamor_ctx->drawable_xid, glamor_ctx->ctx); } Bool glamor_glx_screen_init(struct glamor_context *glamor_ctx) { glamor_ctx->ctx = glXGetCurrentContext(); if (!glamor_ctx->ctx) return False; glamor_ctx->display = glXGetCurrentDisplay(); if (!glamor_ctx->display) return False; glamor_ctx->drawable_xid = glXGetCurrentDrawable(); glamor_ctx->make_current = glamor_glx_make_current; return True; } xorg-server-21.1.16/glamor/glamor_composite_glyphs.c0000644000175000017500000005070314757411105016216 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include #include "Xprintf.h" #include "glamor_priv.h" #include "glamor_transform.h" #include "glamor_transfer.h" #include #define DEFAULT_ATLAS_DIM 1024 static DevPrivateKeyRec glamor_glyph_private_key; struct glamor_glyph_private { int16_t x; int16_t y; uint32_t serial; }; struct glamor_glyph_atlas { PixmapPtr atlas; PictFormatPtr format; int x, y; int row_height; int nglyph; uint32_t serial; }; static inline struct glamor_glyph_private *glamor_get_glyph_private(PixmapPtr pixmap) { return dixLookupPrivate(&pixmap->devPrivates, &glamor_glyph_private_key); } static inline void glamor_copy_glyph(PixmapPtr glyph_pixmap, DrawablePtr atlas_draw, int16_t x, int16_t y) { DrawablePtr glyph_draw = &glyph_pixmap->drawable; BoxRec box = { .x1 = 0, .y1 = 0, .x2 = glyph_draw->width, .y2 = glyph_draw->height, }; PixmapPtr upload_pixmap = glyph_pixmap; if (glyph_pixmap->drawable.bitsPerPixel != atlas_draw->bitsPerPixel) { /* If we're dealing with 1-bit glyphs, we copy them to a * temporary 8-bit pixmap and upload them from there, since * that's what GL can handle. */ ScreenPtr screen = atlas_draw->pScreen; GCPtr scratch_gc; ChangeGCVal changes[2]; upload_pixmap = glamor_create_pixmap(screen, glyph_draw->width, glyph_draw->height, atlas_draw->depth, GLAMOR_CREATE_PIXMAP_CPU); if (!upload_pixmap) return; scratch_gc = GetScratchGC(upload_pixmap->drawable.depth, screen); if (!scratch_gc) { glamor_destroy_pixmap(upload_pixmap); return; } changes[0].val = 0xff; changes[1].val = 0x00; if (ChangeGC(NullClient, scratch_gc, GCForeground|GCBackground, changes) != Success) { glamor_destroy_pixmap(upload_pixmap); FreeScratchGC(scratch_gc); return; } ValidateGC(&upload_pixmap->drawable, scratch_gc); (*scratch_gc->ops->CopyPlane)(glyph_draw, &upload_pixmap->drawable, scratch_gc, 0, 0, glyph_draw->width, glyph_draw->height, 0, 0, 0x1); } glamor_upload_boxes((PixmapPtr) atlas_draw, &box, 1, 0, 0, x, y, upload_pixmap->devPrivate.ptr, upload_pixmap->devKind); if (upload_pixmap != glyph_pixmap) glamor_destroy_pixmap(upload_pixmap); } static Bool glamor_glyph_atlas_init(ScreenPtr screen, struct glamor_glyph_atlas *atlas) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PictFormatPtr format = atlas->format; atlas->atlas = glamor_create_pixmap(screen, glamor_priv->glyph_atlas_dim, glamor_priv->glyph_atlas_dim, format->depth, GLAMOR_CREATE_FBO_NO_FBO); if (!glamor_pixmap_has_fbo(atlas->atlas)) { glamor_destroy_pixmap(atlas->atlas); atlas->atlas = NULL; } atlas->x = 0; atlas->y = 0; atlas->row_height = 0; atlas->serial++; atlas->nglyph = 0; return TRUE; } static Bool glamor_glyph_can_add(struct glamor_glyph_atlas *atlas, int dim, DrawablePtr glyph_draw) { /* Step down */ if (atlas->x + glyph_draw->width > dim) { atlas->x = 0; atlas->y += atlas->row_height; atlas->row_height = 0; } /* Check for overfull */ if (atlas->y + glyph_draw->height > dim) return FALSE; return TRUE; } static Bool glamor_glyph_add(struct glamor_glyph_atlas *atlas, DrawablePtr glyph_draw) { PixmapPtr glyph_pixmap = (PixmapPtr) glyph_draw; struct glamor_glyph_private *glyph_priv = glamor_get_glyph_private(glyph_pixmap); glamor_copy_glyph(glyph_pixmap, &atlas->atlas->drawable, atlas->x, atlas->y); glyph_priv->x = atlas->x; glyph_priv->y = atlas->y; glyph_priv->serial = atlas->serial; atlas->x += glyph_draw->width; if (atlas->row_height < glyph_draw->height) atlas->row_height = glyph_draw->height; atlas->nglyph++; return TRUE; } static const glamor_facet glamor_facet_composite_glyphs_130 = { .name = "composite_glyphs", .version = 130, .vs_vars = ("attribute vec4 primitive;\n" "attribute vec2 source;\n" "varying vec2 glyph_pos;\n"), .vs_exec = (" vec2 pos = primitive.zw * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n" GLAMOR_POS(gl_Position, (primitive.xy + pos)) " glyph_pos = (source + pos) * ATLAS_DIM_INV;\n"), .fs_vars = ("varying vec2 glyph_pos;\n" "out vec4 color0;\n" "out vec4 color1;\n"), .fs_exec = (" vec4 mask = texture2D(atlas, glyph_pos);\n"), .source_name = "source", .locations = glamor_program_location_atlas, }; static const glamor_facet glamor_facet_composite_glyphs_120 = { .name = "composite_glyphs", .vs_vars = ("attribute vec2 primitive;\n" "attribute vec2 source;\n" "varying vec2 glyph_pos;\n"), .vs_exec = (" vec2 pos = vec2(0,0);\n" GLAMOR_POS(gl_Position, primitive.xy) " glyph_pos = source.xy * ATLAS_DIM_INV;\n"), .fs_vars = ("varying vec2 glyph_pos;\n"), .fs_exec = (" vec4 mask = texture2D(atlas, glyph_pos);\n"), .source_name = "source", .locations = glamor_program_location_atlas, }; static Bool glamor_glyphs_init_facet(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); return asprintf(&glamor_priv->glyph_defines, "#define ATLAS_DIM_INV %20.18f\n", 1.0/glamor_priv->glyph_atlas_dim) > 0; } static void glamor_glyphs_fini_facet(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); free(glamor_priv->glyph_defines); } static void glamor_glyphs_flush(CARD8 op, PicturePtr src, PicturePtr dst, glamor_program *prog, struct glamor_glyph_atlas *atlas, int nglyph) { DrawablePtr drawable = dst->pDrawable; glamor_screen_private *glamor_priv = glamor_get_screen_private(drawable->pScreen); PixmapPtr atlas_pixmap = atlas->atlas; glamor_pixmap_private *atlas_priv = glamor_get_pixmap_private(atlas_pixmap); glamor_pixmap_fbo *atlas_fbo = glamor_pixmap_fbo_at(atlas_priv, 0); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); int box_index; int off_x, off_y; glamor_put_vbo_space(drawable->pScreen); glEnable(GL_SCISSOR_TEST); glamor_bind_texture(glamor_priv, GL_TEXTURE1, atlas_fbo, FALSE); for (;;) { if (!glamor_use_program_render(prog, op, src, dst)) break; glUniform1i(prog->atlas_uniform, 1); glamor_pixmap_loop(pixmap_priv, box_index) { BoxPtr box = RegionRects(dst->pCompositeClip); int nbox = RegionNumRects(dst->pCompositeClip); glamor_set_destination_drawable(drawable, box_index, TRUE, FALSE, prog->matrix_uniform, &off_x, &off_y); /* Run over the clip list, drawing the glyphs * in each box */ while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; if (glamor_glsl_has_ints(glamor_priv)) glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, nglyph); else glamor_glDrawArrays_GL_QUADS(glamor_priv, nglyph); } } if (prog->alpha != glamor_program_alpha_ca_first) break; prog++; } glDisable(GL_SCISSOR_TEST); if (glamor_glsl_has_ints(glamor_priv)) { glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0); } glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisable(GL_BLEND); } static GLshort * glamor_glyph_start(ScreenPtr screen, int count) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); GLshort *v; char *vbo_offset; /* Set up the vertex buffers for the font and destination */ if (glamor_glsl_has_ints(glamor_priv)) { v = glamor_get_vbo_space(screen, count * (6 * sizeof (GLshort)), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1); glVertexAttribPointer(GLAMOR_VERTEX_POS, 4, GL_SHORT, GL_FALSE, 6 * sizeof (GLshort), vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 1); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_SHORT, GL_FALSE, 6 * sizeof (GLshort), vbo_offset + 4 * sizeof (GLshort)); } else { v = glamor_get_vbo_space(screen, count * (16 * sizeof (GLshort)), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 4 * sizeof (GLshort), vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_SHORT, GL_FALSE, 4 * sizeof (GLshort), vbo_offset + 2 * sizeof (GLshort)); } return v; } static inline struct glamor_glyph_atlas * glamor_atlas_for_glyph(glamor_screen_private *glamor_priv, DrawablePtr drawable) { if (drawable->depth == 32) return glamor_priv->glyph_atlas_argb; else return glamor_priv->glyph_atlas_a; } void glamor_composite_glyphs(CARD8 op, PicturePtr src, PicturePtr dst, PictFormatPtr glyph_format, INT16 x_src, INT16 y_src, int nlist, GlyphListPtr list, GlyphPtr *glyphs) { int glyphs_queued; GLshort *v = NULL; DrawablePtr drawable = dst->pDrawable; ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_program *prog = NULL; glamor_program_render *glyphs_program = &glamor_priv->glyphs_program; struct glamor_glyph_atlas *glyph_atlas = NULL; int x = 0, y = 0; int n; int glyph_atlas_dim = glamor_priv->glyph_atlas_dim; int glyph_max_dim = glamor_priv->glyph_max_dim; int nglyph = 0; int screen_num = screen->myNum; for (n = 0; n < nlist; n++) nglyph += list[n].len; glamor_make_current(glamor_priv); glyphs_queued = 0; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; list++; while (n--) { GlyphPtr glyph = *glyphs++; /* Glyph not empty? */ if (glyph->info.width && glyph->info.height) { PicturePtr glyph_pict = GlyphPicture(glyph)[screen_num]; DrawablePtr glyph_draw = glyph_pict->pDrawable; /* Need to draw with slow path? */ if (_X_UNLIKELY(glyph_draw->width > glyph_max_dim || glyph_draw->height > glyph_max_dim || !glamor_pixmap_is_memory((PixmapPtr)glyph_draw))) { if (glyphs_queued) { glamor_glyphs_flush(op, src, dst, prog, glyph_atlas, glyphs_queued); glyphs_queued = 0; } bail_one: glamor_composite(op, src, glyph_pict, dst, x_src + (x - glyph->info.x), (y - glyph->info.y), 0, 0, x - glyph->info.x, y - glyph->info.y, glyph_draw->width, glyph_draw->height); } else { struct glamor_glyph_private *glyph_priv = glamor_get_glyph_private((PixmapPtr)(glyph_draw)); struct glamor_glyph_atlas *next_atlas = glamor_atlas_for_glyph(glamor_priv, glyph_draw); /* Switching source glyph format? */ if (_X_UNLIKELY(next_atlas != glyph_atlas)) { if (glyphs_queued) { glamor_glyphs_flush(op, src, dst, prog, glyph_atlas, glyphs_queued); glyphs_queued = 0; } glyph_atlas = next_atlas; } /* Glyph not cached in current atlas? */ if (_X_UNLIKELY(glyph_priv->serial != glyph_atlas->serial)) { if (!glamor_glyph_can_add(glyph_atlas, glyph_atlas_dim, glyph_draw)) { if (glyphs_queued) { glamor_glyphs_flush(op, src, dst, prog, glyph_atlas, glyphs_queued); glyphs_queued = 0; } if (glyph_atlas->atlas) { (*screen->DestroyPixmap)(glyph_atlas->atlas); glyph_atlas->atlas = NULL; } } if (!glyph_atlas->atlas) { glamor_glyph_atlas_init(screen, glyph_atlas); if (!glyph_atlas->atlas) goto bail_one; } glamor_glyph_add(glyph_atlas, glyph_draw); } /* First glyph in the current atlas? */ if (_X_UNLIKELY(glyphs_queued == 0)) { if (glamor_glsl_has_ints(glamor_priv)) prog = glamor_setup_program_render(op, src, glyph_pict, dst, glyphs_program, &glamor_facet_composite_glyphs_130, glamor_priv->glyph_defines); else prog = glamor_setup_program_render(op, src, glyph_pict, dst, glyphs_program, &glamor_facet_composite_glyphs_120, glamor_priv->glyph_defines); if (!prog) goto bail_one; v = glamor_glyph_start(screen, nglyph); } /* Add the glyph */ glyphs_queued++; if (_X_LIKELY(glamor_glsl_has_ints(glamor_priv))) { v[0] = x - glyph->info.x; v[1] = y - glyph->info.y; v[2] = glyph_draw->width; v[3] = glyph_draw->height; v[4] = glyph_priv->x; v[5] = glyph_priv->y; v += 6; } else { v[0] = x - glyph->info.x; v[1] = y - glyph->info.y; v[2] = glyph_priv->x; v[3] = glyph_priv->y; v += 4; v[0] = x - glyph->info.x + glyph_draw->width; v[1] = y - glyph->info.y; v[2] = glyph_priv->x + glyph_draw->width; v[3] = glyph_priv->y; v += 4; v[0] = x - glyph->info.x + glyph_draw->width; v[1] = y - glyph->info.y + glyph_draw->height; v[2] = glyph_priv->x + glyph_draw->width; v[3] = glyph_priv->y + glyph_draw->height; v += 4; v[0] = x - glyph->info.x; v[1] = y - glyph->info.y + glyph_draw->height; v[2] = glyph_priv->x; v[3] = glyph_priv->y + glyph_draw->height; v += 4; } } } x += glyph->info.xOff; y += glyph->info.yOff; nglyph--; } } if (glyphs_queued) glamor_glyphs_flush(op, src, dst, prog, glyph_atlas, glyphs_queued); return; } static struct glamor_glyph_atlas * glamor_alloc_glyph_atlas(ScreenPtr screen, int depth, CARD32 f) { PictFormatPtr format; struct glamor_glyph_atlas *glyph_atlas; format = PictureMatchFormat(screen, depth, f); if (!format) return NULL; glyph_atlas = calloc (1, sizeof (struct glamor_glyph_atlas)); if (!glyph_atlas) return NULL; glyph_atlas->format = format; glyph_atlas->serial = 1; return glyph_atlas; } Bool glamor_composite_glyphs_init(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); if (!dixRegisterPrivateKey(&glamor_glyph_private_key, PRIVATE_PIXMAP, sizeof (struct glamor_glyph_private))) return FALSE; /* Make glyph atlases of a reasonable size, but no larger than the maximum * supported by the hardware */ glamor_priv->glyph_atlas_dim = MIN(DEFAULT_ATLAS_DIM, glamor_priv->max_fbo_size); /* Don't stick huge glyphs in the atlases */ glamor_priv->glyph_max_dim = glamor_priv->glyph_atlas_dim / 8; glamor_priv->glyph_atlas_a = glamor_alloc_glyph_atlas(screen, 8, PICT_a8); if (!glamor_priv->glyph_atlas_a) return FALSE; glamor_priv->glyph_atlas_argb = glamor_alloc_glyph_atlas(screen, 32, PICT_a8r8g8b8); if (!glamor_priv->glyph_atlas_argb) { free (glamor_priv->glyph_atlas_a); return FALSE; } if (!glamor_glyphs_init_facet(screen)) return FALSE; return TRUE; } static void glamor_free_glyph_atlas(struct glamor_glyph_atlas *atlas) { if (!atlas) return; if (atlas->atlas) (*atlas->atlas->drawable.pScreen->DestroyPixmap)(atlas->atlas); free (atlas); } void glamor_composite_glyphs_fini(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_glyphs_fini_facet(screen); glamor_free_glyph_atlas(glamor_priv->glyph_atlas_a); glamor_free_glyph_atlas(glamor_priv->glyph_atlas_argb); } xorg-server-21.1.16/glamor/glamor_image.c0000644000175000017500000001252514757411105013710 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transfer.h" #include "glamor_transform.h" /* * PutImage. Only does ZPixmap right now as other formats are quite a bit harder */ static Bool glamor_put_image_gl(DrawablePtr drawable, GCPtr gc, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; uint32_t byte_stride = PixmapBytePad(w, drawable->depth); RegionRec region; BoxRec box; int off_x, off_y; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) return FALSE; if (gc->alu != GXcopy) goto bail; if (!glamor_pm_is_solid(gc->depth, gc->planemask)) goto bail; if (format == XYPixmap && drawable->depth == 1 && leftPad == 0) format = ZPixmap; if (format != ZPixmap) goto bail; x += drawable->x; y += drawable->y; box.x1 = x; box.y1 = y; box.x2 = box.x1 + w; box.y2 = box.y1 + h; RegionInit(®ion, &box, 1); RegionIntersect(®ion, ®ion, gc->pCompositeClip); glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); if (off_x || off_y) { x += off_x; y += off_y; RegionTranslate(®ion, off_x, off_y); } glamor_make_current(glamor_priv); glamor_upload_region(pixmap, ®ion, x, y, (uint8_t *) bits, byte_stride); RegionUninit(®ion); return TRUE; bail: return FALSE; } static void glamor_put_image_bail(DrawablePtr drawable, GCPtr gc, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { if (glamor_prepare_access_box(drawable, GLAMOR_ACCESS_RW, x, y, w, h)) fbPutImage(drawable, gc, depth, x, y, w, h, leftPad, format, bits); glamor_finish_access(drawable); } void glamor_put_image(DrawablePtr drawable, GCPtr gc, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits) { if (glamor_put_image_gl(drawable, gc, depth, x, y, w, h, leftPad, format, bits)) return; glamor_put_image_bail(drawable, gc, depth, x, y, w, h, leftPad, format, bits); } static Bool glamor_get_image_gl(DrawablePtr drawable, int x, int y, int w, int h, unsigned int format, unsigned long plane_mask, char *d) { PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; uint32_t byte_stride = PixmapBytePad(w, drawable->depth); BoxRec box; int off_x, off_y; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; if (format != ZPixmap) goto bail; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); box.x1 = x; box.x2 = x + w; box.y1 = y; box.y2 = y + h; glamor_download_boxes(pixmap, &box, 1, drawable->x + off_x, drawable->y + off_y, -x, -y, (uint8_t *) d, byte_stride); if (!glamor_pm_is_solid(drawable->depth, plane_mask)) { FbStip pm = fbReplicatePixel(plane_mask, drawable->bitsPerPixel); FbStip *dst = (void *)d; uint32_t dstStride = byte_stride / sizeof(FbStip); for (int i = 0; i < dstStride * h; i++) dst[i] &= pm; } return TRUE; bail: return FALSE; } static void glamor_get_image_bail(DrawablePtr drawable, int x, int y, int w, int h, unsigned int format, unsigned long plane_mask, char *d) { if (glamor_prepare_access_box(drawable, GLAMOR_ACCESS_RO, x, y, w, h)) fbGetImage(drawable, x, y, w, h, format, plane_mask, d); glamor_finish_access(drawable); } void glamor_get_image(DrawablePtr drawable, int x, int y, int w, int h, unsigned int format, unsigned long plane_mask, char *d) { if (glamor_get_image_gl(drawable, x, y, w, h, format, plane_mask, d)) return; glamor_get_image_bail(drawable, x, y, w, h, format, plane_mask, d); } xorg-server-21.1.16/glamor/glamor_lines.c0000644000175000017500000001234014757411105013733 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_program.h" #include "glamor_transform.h" #include "glamor_prepare.h" static const glamor_facet glamor_facet_poly_lines = { .name = "poly_lines", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0.0,0.0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; static Bool glamor_poly_lines_solid_gl(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; glamor_program *prog; int off_x, off_y; DDXPointPtr v; char *vbo_offset; int box_index; int add_last; Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; add_last = 0; if (gc->capStyle != CapNotLast) add_last = 1; if (n < 2) return TRUE; glamor_make_current(glamor_priv); prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_line_program, &glamor_facet_poly_lines); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, (n + add_last) * sizeof (DDXPointRec), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, sizeof (DDXPointRec), vbo_offset); if (mode == CoordModePrevious) { int i; DDXPointRec here = { 0, 0 }; for (i = 0; i < n; i++) { here.x += points[i].x; here.y += points[i].y; v[i] = here; } } else { memcpy(v, points, n * sizeof (DDXPointRec)); } if (add_last) { v[n].x = v[n-1].x + 1; v[n].y = v[n-1].y; } glamor_put_vbo_space(screen); glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); if (!glamor_set_destination_drawable(drawable, box_index, TRUE, TRUE, prog->matrix_uniform, &off_x, &off_y)) goto bail; while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; glDrawArrays(GL_LINE_STRIP, 0, n + add_last); } } ret = TRUE; bail: glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } static Bool glamor_poly_lines_gl(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { if (gc->lineWidth != 0) return FALSE; switch (gc->lineStyle) { case LineSolid: return glamor_poly_lines_solid_gl(drawable, gc, mode, n, points); case LineOnOffDash: return glamor_poly_lines_dash_gl(drawable, gc, mode, n, points); case LineDoubleDash: if (gc->fillStyle == FillTiled) return glamor_poly_lines_solid_gl(drawable, gc, mode, n, points); else return glamor_poly_lines_dash_gl(drawable, gc, mode, n, points); default: return FALSE; } } static void glamor_poly_lines_bail(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { glamor_fallback("to %p (%c)\n", drawable, glamor_get_drawable_location(drawable)); miPolylines(drawable, gc, mode, n, points); } void glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { if (glamor_poly_lines_gl(drawable, gc, mode, n, points)) return; glamor_poly_lines_bail(drawable, gc, mode, n, points); } xorg-server-21.1.16/glamor/glamor_segs.c0000644000175000017500000001261414757411105013566 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_program.h" #include "glamor_transform.h" #include "glamor_prepare.h" static const glamor_facet glamor_facet_poly_segment = { .name = "poly_segment", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0.0,0.0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; static Bool glamor_poly_segment_solid_gl(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; glamor_program *prog; int off_x, off_y; xSegment *v; char *vbo_offset; int box_index; int add_last; Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; add_last = 0; if (gc->capStyle != CapNotLast) add_last = 1; glamor_make_current(glamor_priv); prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_segment_program, &glamor_facet_poly_segment); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, (nseg << add_last) * sizeof (xSegment), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, sizeof(DDXPointRec), vbo_offset); if (add_last) { int i, j; for (i = 0, j=0; i < nseg; i++) { v[j++] = segs[i]; v[j].x1 = segs[i].x2; v[j].y1 = segs[i].y2; v[j].x2 = segs[i].x2+1; v[j].y2 = segs[i].y2; j++; } } else memcpy(v, segs, nseg * sizeof (xSegment)); glamor_put_vbo_space(screen); glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); if (!glamor_set_destination_drawable(drawable, box_index, TRUE, TRUE, prog->matrix_uniform, &off_x, &off_y)) goto bail; while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; glDrawArrays(GL_LINES, 0, nseg << (1 + add_last)); } } ret = TRUE; glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); bail: return ret; } static Bool glamor_poly_segment_gl(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs) { if (gc->lineWidth != 0) return FALSE; switch (gc->lineStyle) { case LineSolid: return glamor_poly_segment_solid_gl(drawable, gc, nseg, segs); case LineOnOffDash: return glamor_poly_segment_dash_gl(drawable, gc, nseg, segs); case LineDoubleDash: if (gc->fillStyle == FillTiled) return glamor_poly_segment_solid_gl(drawable, gc, nseg, segs); else return glamor_poly_segment_dash_gl(drawable, gc, nseg, segs); default: return FALSE; } } static void glamor_poly_segment_bail(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs) { glamor_fallback("to %p (%c)\n", drawable, glamor_get_drawable_location(drawable)); if (gc->lineWidth == 0) { if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) && glamor_prepare_access_gc(gc)) { fbPolySegment(drawable, gc, nseg, segs); } glamor_finish_access_gc(gc); glamor_finish_access(drawable); } else miPolySegment(drawable, gc, nseg, segs); } void glamor_poly_segment(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs) { if (glamor_poly_segment_gl(drawable, gc, nseg, segs)) return; glamor_poly_segment_bail(drawable, gc, nseg, segs); } xorg-server-21.1.16/glamor/glamor_render.c0000644000175000017500000017663314757411105014120 /* * Copyright © 2009 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * Zhigang Gong * Junyan He * */ /** @file glamor_render.c * * Render acceleration implementation */ #include "glamor_priv.h" #include "mipict.h" #include "fbpict.h" #if 0 //#define DEBUGF(str, ...) do {} while(0) #define DEBUGF(str, ...) ErrorF(str, ##__VA_ARGS__) //#define DEBUGRegionPrint(x) do {} while (0) #define DEBUGRegionPrint RegionPrint #endif static struct blendinfo composite_op_info[] = { [PictOpClear] = {0, 0, GL_ZERO, GL_ZERO}, [PictOpSrc] = {0, 0, GL_ONE, GL_ZERO}, [PictOpDst] = {0, 0, GL_ZERO, GL_ONE}, [PictOpOver] = {0, 1, GL_ONE, GL_ONE_MINUS_SRC_ALPHA}, [PictOpOverReverse] = {1, 0, GL_ONE_MINUS_DST_ALPHA, GL_ONE}, [PictOpIn] = {1, 0, GL_DST_ALPHA, GL_ZERO}, [PictOpInReverse] = {0, 1, GL_ZERO, GL_SRC_ALPHA}, [PictOpOut] = {1, 0, GL_ONE_MINUS_DST_ALPHA, GL_ZERO}, [PictOpOutReverse] = {0, 1, GL_ZERO, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAtop] = {1, 1, GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAtopReverse] = {1, 1, GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA}, [PictOpXor] = {1, 1, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAdd] = {0, 0, GL_ONE, GL_ONE}, }; #define RepeatFix 10 static GLuint glamor_create_composite_fs(struct shader_key *key) { const char *repeat_define = "#define RepeatNone 0\n" "#define RepeatNormal 1\n" "#define RepeatPad 2\n" "#define RepeatReflect 3\n" "#define RepeatFix 10\n" "uniform int source_repeat_mode;\n" "uniform int mask_repeat_mode;\n"; const char *relocate_texture = "vec2 rel_tex_coord(vec2 texture, vec4 wh, int repeat) \n" "{\n" " vec2 rel_tex; \n" " rel_tex = texture * wh.xy; \n" " if (repeat == RepeatFix + RepeatNone)\n" " return rel_tex; \n" " else if (repeat == RepeatFix + RepeatNormal) \n" " rel_tex = floor(rel_tex) + (fract(rel_tex) / wh.xy); \n" " else if (repeat == RepeatFix + RepeatPad) { \n" " if (rel_tex.x >= 1.0) \n" " rel_tex.x = 1.0 - wh.z * wh.x / 2.; \n" " else if (rel_tex.x < 0.0) \n" " rel_tex.x = 0.0; \n" " if (rel_tex.y >= 1.0) \n" " rel_tex.y = 1.0 - wh.w * wh.y / 2.; \n" " else if (rel_tex.y < 0.0) \n" " rel_tex.y = 0.0; \n" " rel_tex = rel_tex / wh.xy; \n" " } else if (repeat == RepeatFix + RepeatReflect) {\n" " if ((1.0 - mod(abs(floor(rel_tex.x)), 2.0)) < 0.001)\n" " rel_tex.x = 2.0 - (1.0 - fract(rel_tex.x)) / wh.x;\n" " else \n" " rel_tex.x = fract(rel_tex.x) / wh.x;\n" " if ((1.0 - mod(abs(floor(rel_tex.y)), 2.0)) < 0.001)\n" " rel_tex.y = 2.0 - (1.0 - fract(rel_tex.y)) / wh.y;\n" " else \n" " rel_tex.y = fract(rel_tex.y) / wh.y;\n" " } \n" " return rel_tex; \n" "}\n"; /* The texture and the pixmap size is not match eaxctly, so can't sample it directly. * rel_sampler will recalculate the texture coords.*/ const char *rel_sampler = " vec4 rel_sampler_rgba(sampler2D tex_image, vec2 tex, vec4 wh, int repeat)\n" "{\n" " if (repeat >= RepeatFix) {\n" " tex = rel_tex_coord(tex, wh, repeat);\n" " if (repeat == RepeatFix + RepeatNone) {\n" " if (tex.x < 0.0 || tex.x >= 1.0 || \n" " tex.y < 0.0 || tex.y >= 1.0)\n" " return vec4(0.0, 0.0, 0.0, 0.0);\n" " tex = (fract(tex) / wh.xy);\n" " }\n" " }\n" " return texture2D(tex_image, tex);\n" "}\n" " vec4 rel_sampler_rgbx(sampler2D tex_image, vec2 tex, vec4 wh, int repeat)\n" "{\n" " if (repeat >= RepeatFix) {\n" " tex = rel_tex_coord(tex, wh, repeat);\n" " if (repeat == RepeatFix + RepeatNone) {\n" " if (tex.x < 0.0 || tex.x >= 1.0 || \n" " tex.y < 0.0 || tex.y >= 1.0)\n" " return vec4(0.0, 0.0, 0.0, 0.0);\n" " tex = (fract(tex) / wh.xy);\n" " }\n" " }\n" " return vec4(texture2D(tex_image, tex).rgb, 1.0);\n" "}\n"; const char *source_solid_fetch = "uniform vec4 source;\n" "vec4 get_source()\n" "{\n" " return source;\n" "}\n"; const char *source_alpha_pixmap_fetch = "varying vec2 source_texture;\n" "uniform sampler2D source_sampler;\n" "uniform vec4 source_wh;" "vec4 get_source()\n" "{\n" " return rel_sampler_rgba(source_sampler, source_texture,\n" " source_wh, source_repeat_mode);\n" "}\n"; const char *source_pixmap_fetch = "varying vec2 source_texture;\n" "uniform sampler2D source_sampler;\n" "uniform vec4 source_wh;\n" "vec4 get_source()\n" "{\n" " return rel_sampler_rgbx(source_sampler, source_texture,\n" " source_wh, source_repeat_mode);\n" "}\n"; const char *mask_none = "vec4 get_mask()\n" "{\n" " return vec4(0.0, 0.0, 0.0, 1.0);\n" "}\n"; const char *mask_solid_fetch = "uniform vec4 mask;\n" "vec4 get_mask()\n" "{\n" " return mask;\n" "}\n"; const char *mask_alpha_pixmap_fetch = "varying vec2 mask_texture;\n" "uniform sampler2D mask_sampler;\n" "uniform vec4 mask_wh;\n" "vec4 get_mask()\n" "{\n" " return rel_sampler_rgba(mask_sampler, mask_texture,\n" " mask_wh, mask_repeat_mode);\n" "}\n"; const char *mask_pixmap_fetch = "varying vec2 mask_texture;\n" "uniform sampler2D mask_sampler;\n" "uniform vec4 mask_wh;\n" "vec4 get_mask()\n" "{\n" " return rel_sampler_rgbx(mask_sampler, mask_texture,\n" " mask_wh, mask_repeat_mode);\n" "}\n"; const char *dest_swizzle_default = "vec4 dest_swizzle(vec4 color)\n" "{" " return color;" "}"; const char *dest_swizzle_alpha_to_red = "vec4 dest_swizzle(vec4 color)\n" "{" " float undef;\n" " return vec4(color.a, undef, undef, undef);" "}"; const char *in_normal = "void main()\n" "{\n" " gl_FragColor = dest_swizzle(get_source() * get_mask().a);\n" "}\n"; const char *in_ca_source = "void main()\n" "{\n" " gl_FragColor = dest_swizzle(get_source() * get_mask());\n" "}\n"; const char *in_ca_alpha = "void main()\n" "{\n" " gl_FragColor = dest_swizzle(get_source().a * get_mask());\n" "}\n"; const char *in_ca_dual_blend = "out vec4 color0;\n" "out vec4 color1;\n" "void main()\n" "{\n" " color0 = dest_swizzle(get_source() * get_mask());\n" " color1 = dest_swizzle(get_source().a * get_mask());\n" "}\n"; const char *header_ca_dual_blend = "#version 130\n"; char *source; const char *source_fetch; const char *mask_fetch = ""; const char *in; const char *header; const char *header_norm = ""; const char *dest_swizzle; GLuint prog; switch (key->source) { case SHADER_SOURCE_SOLID: source_fetch = source_solid_fetch; break; case SHADER_SOURCE_TEXTURE_ALPHA: source_fetch = source_alpha_pixmap_fetch; break; case SHADER_SOURCE_TEXTURE: source_fetch = source_pixmap_fetch; break; default: FatalError("Bad composite shader source"); } switch (key->mask) { case SHADER_MASK_NONE: mask_fetch = mask_none; break; case SHADER_MASK_SOLID: mask_fetch = mask_solid_fetch; break; case SHADER_MASK_TEXTURE_ALPHA: mask_fetch = mask_alpha_pixmap_fetch; break; case SHADER_MASK_TEXTURE: mask_fetch = mask_pixmap_fetch; break; default: FatalError("Bad composite shader mask"); } /* If we're storing to an a8 texture but our texture format is * GL_RED because of a core context, then we need to make sure to * put the alpha into the red channel. */ switch (key->dest_swizzle) { case SHADER_DEST_SWIZZLE_DEFAULT: dest_swizzle = dest_swizzle_default; break; case SHADER_DEST_SWIZZLE_ALPHA_TO_RED: dest_swizzle = dest_swizzle_alpha_to_red; break; default: FatalError("Bad composite shader dest swizzle"); } header = header_norm; switch (key->in) { case glamor_program_alpha_normal: in = in_normal; break; case glamor_program_alpha_ca_first: in = in_ca_source; break; case glamor_program_alpha_ca_second: in = in_ca_alpha; break; case glamor_program_alpha_dual_blend: in = in_ca_dual_blend; header = header_ca_dual_blend; break; default: FatalError("Bad composite IN type"); } XNFasprintf(&source, "%s" GLAMOR_DEFAULT_PRECISION "%s%s%s%s%s%s%s", header, repeat_define, relocate_texture, rel_sampler, source_fetch, mask_fetch, dest_swizzle, in); prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, source); free(source); return prog; } static GLuint glamor_create_composite_vs(struct shader_key *key) { const char *main_opening = "attribute vec4 v_position;\n" "attribute vec4 v_texcoord0;\n" "attribute vec4 v_texcoord1;\n" "varying vec2 source_texture;\n" "varying vec2 mask_texture;\n" "void main()\n" "{\n" " gl_Position = v_position;\n"; const char *source_coords = " source_texture = v_texcoord0.xy;\n"; const char *mask_coords = " mask_texture = v_texcoord1.xy;\n"; const char *main_closing = "}\n"; const char *source_coords_setup = ""; const char *mask_coords_setup = ""; char *source; GLuint prog; if (key->source != SHADER_SOURCE_SOLID) source_coords_setup = source_coords; if (key->mask != SHADER_MASK_NONE && key->mask != SHADER_MASK_SOLID) mask_coords_setup = mask_coords; XNFasprintf(&source, "%s%s%s%s", main_opening, source_coords_setup, mask_coords_setup, main_closing); prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, source); free(source); return prog; } static void glamor_create_composite_shader(ScreenPtr screen, struct shader_key *key, glamor_composite_shader *shader) { GLuint vs, fs, prog; GLint source_sampler_uniform_location, mask_sampler_uniform_location; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); vs = glamor_create_composite_vs(key); if (vs == 0) return; fs = glamor_create_composite_fs(key); if (fs == 0) return; prog = glCreateProgram(); glAttachShader(prog, vs); glAttachShader(prog, fs); glBindAttribLocation(prog, GLAMOR_VERTEX_POS, "v_position"); glBindAttribLocation(prog, GLAMOR_VERTEX_SOURCE, "v_texcoord0"); glBindAttribLocation(prog, GLAMOR_VERTEX_MASK, "v_texcoord1"); if (key->in == glamor_program_alpha_dual_blend) { glBindFragDataLocationIndexed(prog, 0, 0, "color0"); glBindFragDataLocationIndexed(prog, 0, 1, "color1"); } glamor_link_glsl_prog(screen, prog, "composite"); shader->prog = prog; glUseProgram(prog); if (key->source == SHADER_SOURCE_SOLID) { shader->source_uniform_location = glGetUniformLocation(prog, "source"); } else { source_sampler_uniform_location = glGetUniformLocation(prog, "source_sampler"); glUniform1i(source_sampler_uniform_location, 0); shader->source_wh = glGetUniformLocation(prog, "source_wh"); shader->source_repeat_mode = glGetUniformLocation(prog, "source_repeat_mode"); } if (key->mask != SHADER_MASK_NONE) { if (key->mask == SHADER_MASK_SOLID) { shader->mask_uniform_location = glGetUniformLocation(prog, "mask"); } else { mask_sampler_uniform_location = glGetUniformLocation(prog, "mask_sampler"); glUniform1i(mask_sampler_uniform_location, 1); shader->mask_wh = glGetUniformLocation(prog, "mask_wh"); shader->mask_repeat_mode = glGetUniformLocation(prog, "mask_repeat_mode"); } } } static glamor_composite_shader * glamor_lookup_composite_shader(ScreenPtr screen, struct shader_key *key) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_composite_shader *shader; shader = &glamor_priv->composite_shader[key->source][key->mask][key->in][key->dest_swizzle]; if (shader->prog == 0) glamor_create_composite_shader(screen, key, shader); return shader; } static GLenum glamor_translate_blend_alpha_to_red(GLenum blend) { switch (blend) { case GL_SRC_ALPHA: return GL_SRC_COLOR; case GL_DST_ALPHA: return GL_DST_COLOR; case GL_ONE_MINUS_SRC_ALPHA: return GL_ONE_MINUS_SRC_COLOR; case GL_ONE_MINUS_DST_ALPHA: return GL_ONE_MINUS_DST_COLOR; default: return blend; } } static Bool glamor_set_composite_op(ScreenPtr screen, CARD8 op, struct blendinfo *op_info_result, PicturePtr dest, PicturePtr mask, enum ca_state ca_state, struct shader_key *key) { GLenum source_blend, dest_blend; struct blendinfo *op_info; if (op >= ARRAY_SIZE(composite_op_info)) { glamor_fallback("unsupported render op %d \n", op); return GL_FALSE; } op_info = &composite_op_info[op]; source_blend = op_info->source_blend; dest_blend = op_info->dest_blend; /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ if (PICT_FORMAT_A(dest->format) == 0 && op_info->dest_alpha) { if (source_blend == GL_DST_ALPHA) source_blend = GL_ONE; else if (source_blend == GL_ONE_MINUS_DST_ALPHA) source_blend = GL_ZERO; } /* Set up the source alpha value for blending in component alpha mode. */ if (ca_state == CA_DUAL_BLEND) { switch (dest_blend) { case GL_SRC_ALPHA: dest_blend = GL_SRC1_COLOR; break; case GL_ONE_MINUS_SRC_ALPHA: dest_blend = GL_ONE_MINUS_SRC1_COLOR; break; } } else if (mask && mask->componentAlpha && PICT_FORMAT_RGB(mask->format) != 0 && op_info->source_alpha) { switch (dest_blend) { case GL_SRC_ALPHA: dest_blend = GL_SRC_COLOR; break; case GL_ONE_MINUS_SRC_ALPHA: dest_blend = GL_ONE_MINUS_SRC_COLOR; break; } } /* If we're outputting our alpha to the red channel, then any * reads of alpha for blending need to come from the red channel. */ if (key->dest_swizzle == SHADER_DEST_SWIZZLE_ALPHA_TO_RED) { source_blend = glamor_translate_blend_alpha_to_red(source_blend); dest_blend = glamor_translate_blend_alpha_to_red(dest_blend); } op_info_result->source_blend = source_blend; op_info_result->dest_blend = dest_blend; op_info_result->source_alpha = op_info->source_alpha; op_info_result->dest_alpha = op_info->dest_alpha; return TRUE; } static void glamor_set_composite_texture(glamor_screen_private *glamor_priv, int unit, PicturePtr picture, PixmapPtr pixmap, GLuint wh_location, GLuint repeat_location, glamor_pixmap_private *dest_priv) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); glamor_pixmap_fbo *fbo = pixmap_priv->fbo; float wh[4]; int repeat_type; glamor_make_current(glamor_priv); /* The red channel swizzling doesn't depend on whether we're using * 'fbo' as source or mask as we must have the same answer in case * the same fbo is being used for both. That means the mask * channel will sometimes get red bits in the R channel, and * sometimes get zero bits in the R channel, which is harmless. */ glamor_bind_texture(glamor_priv, GL_TEXTURE0 + unit, fbo, dest_priv->fbo->is_red); repeat_type = picture->repeatType; switch (picture->repeatType) { case RepeatNone: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); break; case RepeatNormal: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); break; case RepeatPad: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); break; case RepeatReflect: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_MIRRORED_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_MIRRORED_REPEAT); break; } switch (picture->filter) { default: case PictFilterFast: case PictFilterNearest: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); break; case PictFilterGood: case PictFilterBest: case PictFilterBilinear: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); break; } /* Handle RepeatNone in the shader when the source is missing the * alpha channel, as GL will return an alpha for 1 if the texture * is RGB (no alpha), which we use for 16bpp textures. */ if (glamor_pixmap_priv_is_large(pixmap_priv) || (!PICT_FORMAT_A(picture->format) && repeat_type == RepeatNone && picture->transform)) { glamor_pixmap_fbo_fix_wh_ratio(wh, pixmap, pixmap_priv); glUniform4fv(wh_location, 1, wh); repeat_type += RepeatFix; } glUniform1i(repeat_location, repeat_type); } static void glamor_set_composite_solid(float *color, GLint uniform_location) { glUniform4fv(uniform_location, 1, color); } static char glamor_get_picture_location(PicturePtr picture) { if (picture == NULL) return ' '; if (picture->pDrawable == NULL) { switch (picture->pSourcePict->type) { case SourcePictTypeSolidFill: return 'c'; case SourcePictTypeLinear: return 'l'; case SourcePictTypeRadial: return 'r'; default: return '?'; } } return glamor_get_drawable_location(picture->pDrawable); } static void * glamor_setup_composite_vbo(ScreenPtr screen, int n_verts) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); int vert_size; char *vbo_offset; float *vb; glamor_priv->render_nr_quads = 0; glamor_priv->vb_stride = 2 * sizeof(float); if (glamor_priv->has_source_coords) glamor_priv->vb_stride += 2 * sizeof(float); if (glamor_priv->has_mask_coords) glamor_priv->vb_stride += 2 * sizeof(float); vert_size = n_verts * glamor_priv->vb_stride; glamor_make_current(glamor_priv); vb = glamor_get_vbo_space(screen, vert_size, &vbo_offset); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT, GL_FALSE, glamor_priv->vb_stride, vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); if (glamor_priv->has_source_coords) { glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_FLOAT, GL_FALSE, glamor_priv->vb_stride, vbo_offset + 2 * sizeof(float)); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); } if (glamor_priv->has_mask_coords) { glVertexAttribPointer(GLAMOR_VERTEX_MASK, 2, GL_FLOAT, GL_FALSE, glamor_priv->vb_stride, vbo_offset + (glamor_priv->has_source_coords ? 4 : 2) * sizeof(float)); glEnableVertexAttribArray(GLAMOR_VERTEX_MASK); } return vb; } static void glamor_flush_composite_rects(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); if (!glamor_priv->render_nr_quads) return; glamor_glDrawArrays_GL_QUADS(glamor_priv, glamor_priv->render_nr_quads); } static const int pict_format_combine_tab[][3] = { {PICT_TYPE_ARGB, PICT_TYPE_A, PICT_TYPE_ARGB}, {PICT_TYPE_ABGR, PICT_TYPE_A, PICT_TYPE_ABGR}, }; static Bool combine_pict_format(PictFormatShort * des, const PictFormatShort src, const PictFormatShort mask, glamor_program_alpha in_ca) { PictFormatShort new_vis; int src_type, mask_type, src_bpp; int i; if (src == mask) { *des = src; return TRUE; } src_bpp = PICT_FORMAT_BPP(src); assert(src_bpp == PICT_FORMAT_BPP(mask)); new_vis = PICT_FORMAT_VIS(src) | PICT_FORMAT_VIS(mask); switch (in_ca) { case glamor_program_alpha_normal: src_type = PICT_FORMAT_TYPE(src); mask_type = PICT_TYPE_A; break; case glamor_program_alpha_ca_first: src_type = PICT_FORMAT_TYPE(src); mask_type = PICT_FORMAT_TYPE(mask); break; case glamor_program_alpha_ca_second: src_type = PICT_TYPE_A; mask_type = PICT_FORMAT_TYPE(mask); break; case glamor_program_alpha_dual_blend: src_type = PICT_FORMAT_TYPE(src); mask_type = PICT_FORMAT_TYPE(mask); break; default: return FALSE; } if (src_type == mask_type) { *des = PICT_VISFORMAT(src_bpp, src_type, new_vis); return TRUE; } for (i = 0; i < ARRAY_SIZE(pict_format_combine_tab); i++) { if ((src_type == pict_format_combine_tab[i][0] && mask_type == pict_format_combine_tab[i][1]) || (src_type == pict_format_combine_tab[i][1] && mask_type == pict_format_combine_tab[i][0])) { *des = PICT_VISFORMAT(src_bpp, pict_format_combine_tab[i] [2], new_vis); return TRUE; } } return FALSE; } static void glamor_set_normalize_tcoords_generic(PixmapPtr pixmap, glamor_pixmap_private *priv, int repeat_type, float *matrix, float xscale, float yscale, int x1, int y1, int x2, int y2, float *texcoords, int stride) { if (!matrix && repeat_type == RepeatNone) glamor_set_normalize_tcoords_ext(priv, xscale, yscale, x1, y1, x2, y2, texcoords, stride); else if (matrix && repeat_type == RepeatNone) glamor_set_transformed_normalize_tcoords_ext(priv, matrix, xscale, yscale, x1, y1, x2, y2, texcoords, stride); else if (!matrix && repeat_type != RepeatNone) glamor_set_repeat_normalize_tcoords_ext(pixmap, priv, repeat_type, xscale, yscale, x1, y1, x2, y2, texcoords, stride); else if (matrix && repeat_type != RepeatNone) glamor_set_repeat_transformed_normalize_tcoords_ext(pixmap, priv, repeat_type, matrix, xscale, yscale, x1, y1, x2, y2, texcoords, stride); } /** * Returns whether the general composite path supports this picture * format for a pixmap that is permanently stored in an FBO (as * opposed to the dynamic upload path). * * We could support many more formats by using GL_ARB_texture_view to * parse the same bits as different formats. For now, we only support * tweaking whether we sample the alpha bits, or just force them to 1. */ static Bool glamor_render_format_is_supported(PicturePtr picture) { PictFormatShort storage_format; glamor_screen_private *glamor_priv; struct glamor_format *f; /* Source-only pictures should always work */ if (!picture->pDrawable) return TRUE; glamor_priv = glamor_get_screen_private(picture->pDrawable->pScreen); f = &glamor_priv->formats[picture->pDrawable->depth]; if (!f->rendering_supported) return FALSE; storage_format = f->render_format; switch (picture->format) { case PICT_a2r10g10b10: return storage_format == PICT_x2r10g10b10; case PICT_a8r8g8b8: case PICT_x8r8g8b8: return storage_format == PICT_a8r8g8b8 || storage_format == PICT_x8r8g8b8; case PICT_a1r5g5b5: return storage_format == PICT_x1r5g5b5; default: return picture->format == storage_format; } } static Bool glamor_composite_choose_shader(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, glamor_pixmap_private *source_pixmap_priv, glamor_pixmap_private *mask_pixmap_priv, glamor_pixmap_private *dest_pixmap_priv, struct shader_key *s_key, glamor_composite_shader ** shader, struct blendinfo *op_info, PictFormatShort *psaved_source_format, enum ca_state ca_state) { ScreenPtr screen = dest->pDrawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); Bool source_needs_upload = FALSE; Bool mask_needs_upload = FALSE; PictFormatShort saved_source_format = 0; struct shader_key key; GLfloat source_solid_color[4]; GLfloat mask_solid_color[4]; Bool ret = FALSE; if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(dest_pixmap_priv)) { glamor_fallback("dest has no fbo.\n"); goto fail; } if (!glamor_render_format_is_supported(dest)) { glamor_fallback("Unsupported dest picture format.\n"); goto fail; } memset(&key, 0, sizeof(key)); if (!source) { key.source = SHADER_SOURCE_SOLID; source_solid_color[0] = 0.0; source_solid_color[1] = 0.0; source_solid_color[2] = 0.0; source_solid_color[3] = 0.0; } else if (!source->pDrawable) { SourcePictPtr sp = source->pSourcePict; if (sp->type == SourcePictTypeSolidFill) { key.source = SHADER_SOURCE_SOLID; glamor_get_rgba_from_color(&sp->solidFill.fullcolor, source_solid_color); } else goto fail; } else { if (PICT_FORMAT_A(source->format)) key.source = SHADER_SOURCE_TEXTURE_ALPHA; else key.source = SHADER_SOURCE_TEXTURE; } if (mask) { if (!mask->pDrawable) { SourcePictPtr sp = mask->pSourcePict; if (sp->type == SourcePictTypeSolidFill) { key.mask = SHADER_MASK_SOLID; glamor_get_rgba_from_color(&sp->solidFill.fullcolor, mask_solid_color); } else goto fail; } else { if (PICT_FORMAT_A(mask->format)) key.mask = SHADER_MASK_TEXTURE_ALPHA; else key.mask = SHADER_MASK_TEXTURE; } if (!mask->componentAlpha) { key.in = glamor_program_alpha_normal; } else { if (op == PictOpClear) key.mask = SHADER_MASK_NONE; else if (glamor_priv->has_dual_blend) key.in = glamor_program_alpha_dual_blend; else if (op == PictOpSrc || op == PictOpAdd || op == PictOpIn || op == PictOpOut || op == PictOpOverReverse) key.in = glamor_program_alpha_ca_second; else if (op == PictOpOutReverse || op == PictOpInReverse) { key.in = glamor_program_alpha_ca_first; } else { glamor_fallback("Unsupported component alpha op: %d\n", op); goto fail; } } } else { key.mask = SHADER_MASK_NONE; } if (dest_pixmap->drawable.bitsPerPixel <= 8 && glamor_priv->formats[8].format == GL_RED) { key.dest_swizzle = SHADER_DEST_SWIZZLE_ALPHA_TO_RED; } else { key.dest_swizzle = SHADER_DEST_SWIZZLE_DEFAULT; } if (source && source->alphaMap) { glamor_fallback("source alphaMap\n"); goto fail; } if (mask && mask->alphaMap) { glamor_fallback("mask alphaMap\n"); goto fail; } if (key.source == SHADER_SOURCE_TEXTURE || key.source == SHADER_SOURCE_TEXTURE_ALPHA) { if (source_pixmap == dest_pixmap) { /* XXX source and the dest share the same texture. * Does it need special handle? */ glamor_fallback("source == dest\n"); } if (source_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) { source_needs_upload = TRUE; } } if (key.mask == SHADER_MASK_TEXTURE || key.mask == SHADER_MASK_TEXTURE_ALPHA) { if (mask_pixmap == dest_pixmap) { glamor_fallback("mask == dest\n"); goto fail; } if (mask_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED) { mask_needs_upload = TRUE; } } if (source_needs_upload && mask_needs_upload && source_pixmap == mask_pixmap) { if (source->format != mask->format) { saved_source_format = source->format; if (!combine_pict_format(&source->format, source->format, mask->format, key.in)) { glamor_fallback("combine source %x mask %x failed.\n", source->format, mask->format); goto fail; } /* XXX * By default, glamor_upload_picture_to_texture will wire alpha to 1 * if one picture doesn't have alpha. So we don't do that again in * rendering function. But here is a special case, as source and * mask share the same texture but may have different formats. For * example, source doesn't have alpha, but mask has alpha. Then the * texture will have the alpha value for the mask. And will not wire * to 1 for the source. In this case, we have to use different shader * to wire the source's alpha to 1. * * But this may cause a potential problem if the source's repeat mode * is REPEAT_NONE, and if the source is smaller than the dest, then * for the region not covered by the source may be painted incorrectly. * because we wire the alpha to 1. * **/ if (!PICT_FORMAT_A(saved_source_format) && PICT_FORMAT_A(mask->format)) key.source = SHADER_SOURCE_TEXTURE; if (!PICT_FORMAT_A(mask->format) && PICT_FORMAT_A(saved_source_format)) key.mask = SHADER_MASK_TEXTURE; } if (!glamor_upload_picture_to_texture(source)) { glamor_fallback("Failed to upload source texture.\n"); goto fail; } mask_needs_upload = FALSE; } else { if (source_needs_upload) { if (!glamor_upload_picture_to_texture(source)) { glamor_fallback("Failed to upload source texture.\n"); goto fail; } } else { if (source && !glamor_render_format_is_supported(source)) { glamor_fallback("Unsupported source picture format.\n"); goto fail; } } if (mask_needs_upload) { if (!glamor_upload_picture_to_texture(mask)) { glamor_fallback("Failed to upload mask texture.\n"); goto fail; } } else if (mask) { if (!glamor_render_format_is_supported(mask)) { glamor_fallback("Unsupported mask picture format.\n"); goto fail; } } } /* If the source and mask are two differently-formatted views of * the same pixmap bits, and the pixmap was already uploaded (so * the dynamic code above doesn't apply), then fall back to * software. We should use texture views to fix this properly. */ if (source_pixmap && source_pixmap == mask_pixmap && source->format != mask->format) { goto fail; } if (!glamor_set_composite_op(screen, op, op_info, dest, mask, ca_state, &key)) { goto fail; } *shader = glamor_lookup_composite_shader(screen, &key); if ((*shader)->prog == 0) { glamor_fallback("no shader program for this render acccel mode\n"); goto fail; } if (key.source == SHADER_SOURCE_SOLID) memcpy(&(*shader)->source_solid_color[0], source_solid_color, 4 * sizeof(float)); else { (*shader)->source_pixmap = source_pixmap; (*shader)->source = source; } if (key.mask == SHADER_MASK_SOLID) memcpy(&(*shader)->mask_solid_color[0], mask_solid_color, 4 * sizeof(float)); else { (*shader)->mask_pixmap = mask_pixmap; (*shader)->mask = mask; } ret = TRUE; memcpy(s_key, &key, sizeof(key)); *psaved_source_format = saved_source_format; goto done; fail: if (saved_source_format) source->format = saved_source_format; done: return ret; } static void glamor_composite_set_shader_blend(glamor_screen_private *glamor_priv, glamor_pixmap_private *dest_priv, struct shader_key *key, glamor_composite_shader *shader, struct blendinfo *op_info) { glamor_make_current(glamor_priv); glUseProgram(shader->prog); if (key->source == SHADER_SOURCE_SOLID) { glamor_set_composite_solid(shader->source_solid_color, shader->source_uniform_location); } else { glamor_set_composite_texture(glamor_priv, 0, shader->source, shader->source_pixmap, shader->source_wh, shader->source_repeat_mode, dest_priv); } if (key->mask != SHADER_MASK_NONE) { if (key->mask == SHADER_MASK_SOLID) { glamor_set_composite_solid(shader->mask_solid_color, shader->mask_uniform_location); } else { glamor_set_composite_texture(glamor_priv, 1, shader->mask, shader->mask_pixmap, shader->mask_wh, shader->mask_repeat_mode, dest_priv); } } if (!glamor_priv->is_gles) glDisable(GL_COLOR_LOGIC_OP); if (op_info->source_blend == GL_ONE && op_info->dest_blend == GL_ZERO) { glDisable(GL_BLEND); } else { glEnable(GL_BLEND); glBlendFunc(op_info->source_blend, op_info->dest_blend); } } static Bool glamor_composite_with_shader(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, glamor_pixmap_private *source_pixmap_priv, glamor_pixmap_private *mask_pixmap_priv, glamor_pixmap_private *dest_pixmap_priv, int nrect, glamor_composite_rect_t *rects, enum ca_state ca_state) { ScreenPtr screen = dest->pDrawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); GLfloat dst_xscale, dst_yscale; GLfloat mask_xscale = 1, mask_yscale = 1, src_xscale = 1, src_yscale = 1; struct shader_key key, key_ca; int dest_x_off, dest_y_off; int source_x_off, source_y_off; int mask_x_off, mask_y_off; PictFormatShort saved_source_format = 0; float src_matrix[9], mask_matrix[9]; float *psrc_matrix = NULL, *pmask_matrix = NULL; int nrect_max; Bool ret = FALSE; glamor_composite_shader *shader = NULL, *shader_ca = NULL; struct blendinfo op_info, op_info_ca; if (!glamor_composite_choose_shader(op, source, mask, dest, source_pixmap, mask_pixmap, dest_pixmap, source_pixmap_priv, mask_pixmap_priv, dest_pixmap_priv, &key, &shader, &op_info, &saved_source_format, ca_state)) { glamor_fallback("glamor_composite_choose_shader failed\n"); goto fail; } if (ca_state == CA_TWO_PASS) { if (!glamor_composite_choose_shader(PictOpAdd, source, mask, dest, source_pixmap, mask_pixmap, dest_pixmap, source_pixmap_priv, mask_pixmap_priv, dest_pixmap_priv, &key_ca, &shader_ca, &op_info_ca, &saved_source_format, ca_state)) { glamor_fallback("glamor_composite_choose_shader failed\n"); goto fail; } } glamor_make_current(glamor_priv); glamor_set_destination_pixmap_priv_nc(glamor_priv, dest_pixmap, dest_pixmap_priv); glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key, shader, &op_info); glamor_set_alu(screen, GXcopy); glamor_priv->has_source_coords = key.source != SHADER_SOURCE_SOLID; glamor_priv->has_mask_coords = (key.mask != SHADER_MASK_NONE && key.mask != SHADER_MASK_SOLID); dest_pixmap = glamor_get_drawable_pixmap(dest->pDrawable); dest_pixmap_priv = glamor_get_pixmap_private(dest_pixmap); glamor_get_drawable_deltas(dest->pDrawable, dest_pixmap, &dest_x_off, &dest_y_off); pixmap_priv_get_dest_scale(dest_pixmap, dest_pixmap_priv, &dst_xscale, &dst_yscale); if (glamor_priv->has_source_coords) { glamor_get_drawable_deltas(source->pDrawable, source_pixmap, &source_x_off, &source_y_off); pixmap_priv_get_scale(source_pixmap_priv, &src_xscale, &src_yscale); if (source->transform) { psrc_matrix = src_matrix; glamor_picture_get_matrixf(source, psrc_matrix); } } if (glamor_priv->has_mask_coords) { glamor_get_drawable_deltas(mask->pDrawable, mask_pixmap, &mask_x_off, &mask_y_off); pixmap_priv_get_scale(mask_pixmap_priv, &mask_xscale, &mask_yscale); if (mask->transform) { pmask_matrix = mask_matrix; glamor_picture_get_matrixf(mask, pmask_matrix); } } nrect_max = MIN(nrect, GLAMOR_COMPOSITE_VBO_VERT_CNT / 4); if (nrect < 100) { BoxRec bounds = glamor_start_rendering_bounds(); for (int i = 0; i < nrect; i++) { BoxRec box = { .x1 = rects[i].x_dst, .y1 = rects[i].y_dst, .x2 = rects[i].x_dst + rects[i].width, .y2 = rects[i].y_dst + rects[i].height, }; glamor_bounds_union_box(&bounds, &box); } if (bounds.x1 >= bounds.x2 || bounds.y1 >= bounds.y2) goto disable_va; glEnable(GL_SCISSOR_TEST); glScissor(bounds.x1 + dest_x_off, bounds.y1 + dest_y_off, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); } while (nrect) { int mrect, rect_processed; int vb_stride; float *vertices; mrect = nrect > nrect_max ? nrect_max : nrect; vertices = glamor_setup_composite_vbo(screen, mrect * 4); rect_processed = mrect; vb_stride = glamor_priv->vb_stride / sizeof(float); while (mrect--) { INT16 x_source; INT16 y_source; INT16 x_mask; INT16 y_mask; INT16 x_dest; INT16 y_dest; CARD16 width; CARD16 height; x_dest = rects->x_dst + dest_x_off; y_dest = rects->y_dst + dest_y_off; x_source = rects->x_src + source_x_off; y_source = rects->y_src + source_y_off; x_mask = rects->x_mask + mask_x_off; y_mask = rects->y_mask + mask_y_off; width = rects->width; height = rects->height; DEBUGF ("dest(%d,%d) source(%d %d) mask (%d %d), width %d height %d \n", x_dest, y_dest, x_source, y_source, x_mask, y_mask, width, height); glamor_set_normalize_vcoords_ext(dest_pixmap_priv, dst_xscale, dst_yscale, x_dest, y_dest, x_dest + width, y_dest + height, vertices, vb_stride); vertices += 2; if (key.source != SHADER_SOURCE_SOLID) { glamor_set_normalize_tcoords_generic(source_pixmap, source_pixmap_priv, source->repeatType, psrc_matrix, src_xscale, src_yscale, x_source, y_source, x_source + width, y_source + height, vertices, vb_stride); vertices += 2; } if (key.mask != SHADER_MASK_NONE && key.mask != SHADER_MASK_SOLID) { glamor_set_normalize_tcoords_generic(mask_pixmap, mask_pixmap_priv, mask->repeatType, pmask_matrix, mask_xscale, mask_yscale, x_mask, y_mask, x_mask + width, y_mask + height, vertices, vb_stride); vertices += 2; } glamor_priv->render_nr_quads++; rects++; /* We've incremented by one of our 4 verts, now do the other 3. */ vertices += 3 * vb_stride; } glamor_put_vbo_space(screen); glamor_flush_composite_rects(screen); nrect -= rect_processed; if (ca_state == CA_TWO_PASS) { glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key_ca, shader_ca, &op_info_ca); glamor_flush_composite_rects(screen); if (nrect) glamor_composite_set_shader_blend(glamor_priv, dest_pixmap_priv, &key, shader, &op_info); } } glDisable(GL_SCISSOR_TEST); disable_va: glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glDisableVertexAttribArray(GLAMOR_VERTEX_MASK); glDisable(GL_BLEND); DEBUGF("finish rendering.\n"); if (saved_source_format) source->format = saved_source_format; ret = TRUE; fail: if (mask_pixmap && glamor_pixmap_is_memory(mask_pixmap)) glamor_pixmap_destroy_fbo(mask_pixmap); if (source_pixmap && glamor_pixmap_is_memory(source_pixmap)) glamor_pixmap_destroy_fbo(source_pixmap); return ret; } static PicturePtr glamor_convert_gradient_picture(ScreenPtr screen, PicturePtr source, int x_source, int y_source, int width, int height) { PixmapPtr pixmap; PicturePtr dst = NULL; int error; PictFormatPtr pFormat; PictFormatShort format; if (source->pDrawable) { pFormat = source->pFormat; format = pFormat->format; } else { format = PICT_a8r8g8b8; pFormat = PictureMatchFormat(screen, 32, format); } if (!source->pDrawable) { if (source->pSourcePict->type == SourcePictTypeLinear) { dst = glamor_generate_linear_gradient_picture(screen, source, x_source, y_source, width, height, format); } else if (source->pSourcePict->type == SourcePictTypeRadial) { dst = glamor_generate_radial_gradient_picture(screen, source, x_source, y_source, width, height, format); } if (dst) { return dst; } } pixmap = glamor_create_pixmap(screen, width, height, PIXMAN_FORMAT_DEPTH(format), GLAMOR_CREATE_PIXMAP_CPU); if (!pixmap) return NULL; dst = CreatePicture(0, &pixmap->drawable, pFormat, 0, 0, serverClient, &error); glamor_destroy_pixmap(pixmap); if (!dst) return NULL; ValidatePicture(dst); fbComposite(PictOpSrc, source, NULL, dst, x_source, y_source, 0, 0, 0, 0, width, height); return dst; } Bool glamor_composite_clipped_region(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, RegionPtr region, int x_source, int y_source, int x_mask, int y_mask, int x_dest, int y_dest) { glamor_pixmap_private *source_pixmap_priv = glamor_get_pixmap_private(source_pixmap); glamor_pixmap_private *mask_pixmap_priv = glamor_get_pixmap_private(mask_pixmap); glamor_pixmap_private *dest_pixmap_priv = glamor_get_pixmap_private(dest_pixmap); glamor_screen_private *glamor_priv = glamor_get_screen_private(dest_pixmap->drawable.pScreen); ScreenPtr screen = dest->pDrawable->pScreen; PicturePtr temp_src = source, temp_mask = mask; PixmapPtr temp_src_pixmap = source_pixmap; PixmapPtr temp_mask_pixmap = mask_pixmap; glamor_pixmap_private *temp_src_priv = source_pixmap_priv; glamor_pixmap_private *temp_mask_priv = mask_pixmap_priv; int x_temp_src, y_temp_src, x_temp_mask, y_temp_mask; BoxPtr extent; glamor_composite_rect_t rect[10]; glamor_composite_rect_t *prect = rect; int prect_size = ARRAY_SIZE(rect); int ok = FALSE; int i; int width; int height; BoxPtr box; int nbox; enum ca_state ca_state = CA_NONE; extent = RegionExtents(region); box = RegionRects(region); nbox = RegionNumRects(region); width = extent->x2 - extent->x1; height = extent->y2 - extent->y1; x_temp_src = x_source; y_temp_src = y_source; x_temp_mask = x_mask; y_temp_mask = y_mask; DEBUGF("clipped (%d %d) (%d %d) (%d %d) width %d height %d \n", x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height); /* Is the composite operation equivalent to a copy? */ if (source && !mask && !source->alphaMap && !dest->alphaMap && source->pDrawable && !source->transform /* CopyArea is only defined with matching depths. */ && dest->pDrawable->depth == source->pDrawable->depth && ((op == PictOpSrc && (source->format == dest->format || (PICT_FORMAT_COLOR(dest->format) && PICT_FORMAT_COLOR(source->format) && dest->format == PICT_FORMAT(PICT_FORMAT_BPP(source->format), PICT_FORMAT_TYPE(source->format), 0, PICT_FORMAT_R(source->format), PICT_FORMAT_G(source->format), PICT_FORMAT_B(source->format))))) || (op == PictOpOver && source->format == dest->format && !PICT_FORMAT_A(source->format))) && x_source >= 0 && y_source >= 0 && (x_source + width) <= source->pDrawable->width && (y_source + height) <= source->pDrawable->height) { x_source += source->pDrawable->x; y_source += source->pDrawable->y; x_dest += dest->pDrawable->x; y_dest += dest->pDrawable->y; glamor_copy(source->pDrawable, dest->pDrawable, NULL, box, nbox, x_source - x_dest, y_source - y_dest, FALSE, FALSE, 0, NULL); ok = TRUE; goto out; } /* XXX is it possible source mask have non-zero drawable.x/y? */ if (source && ((!source->pDrawable && (source->pSourcePict->type != SourcePictTypeSolidFill)) || (source->pDrawable && !GLAMOR_PIXMAP_PRIV_HAS_FBO(source_pixmap_priv) && (source_pixmap->drawable.width != width || source_pixmap->drawable.height != height)))) { temp_src = glamor_convert_gradient_picture(screen, source, extent->x1 + x_source - x_dest - dest->pDrawable->x, extent->y1 + y_source - y_dest - dest->pDrawable->y, width, height); if (!temp_src) { temp_src = source; goto out; } temp_src_pixmap = (PixmapPtr) (temp_src->pDrawable); temp_src_priv = glamor_get_pixmap_private(temp_src_pixmap); x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x; y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y; } if (mask && ((!mask->pDrawable && (mask->pSourcePict->type != SourcePictTypeSolidFill)) || (mask->pDrawable && !GLAMOR_PIXMAP_PRIV_HAS_FBO(mask_pixmap_priv) && (mask_pixmap->drawable.width != width || mask_pixmap->drawable.height != height)))) { /* XXX if mask->pDrawable is the same as source->pDrawable, we have an opportunity * to do reduce one conversion. */ temp_mask = glamor_convert_gradient_picture(screen, mask, extent->x1 + x_mask - x_dest - dest->pDrawable->x, extent->y1 + y_mask - y_dest - dest->pDrawable->y, width, height); if (!temp_mask) { temp_mask = mask; goto out; } temp_mask_pixmap = (PixmapPtr) (temp_mask->pDrawable); temp_mask_priv = glamor_get_pixmap_private(temp_mask_pixmap); x_temp_mask = -extent->x1 + x_dest + dest->pDrawable->x; y_temp_mask = -extent->y1 + y_dest + dest->pDrawable->y; } if (mask && mask->componentAlpha) { if (glamor_priv->has_dual_blend) { ca_state = CA_DUAL_BLEND; } else { if (op == PictOpOver) { if (glamor_pixmap_is_memory(mask_pixmap)) { glamor_fallback("two pass not supported on memory pximaps\n"); goto out; } ca_state = CA_TWO_PASS; op = PictOpOutReverse; } } } if (temp_src_pixmap == dest_pixmap) { glamor_fallback("source and dest pixmaps are the same\n"); goto out; } if (temp_mask_pixmap == dest_pixmap) { glamor_fallback("mask and dest pixmaps are the same\n"); goto out; } x_dest += dest->pDrawable->x; y_dest += dest->pDrawable->y; if (temp_src && temp_src->pDrawable) { x_temp_src += temp_src->pDrawable->x; y_temp_src += temp_src->pDrawable->y; } if (temp_mask && temp_mask->pDrawable) { x_temp_mask += temp_mask->pDrawable->x; y_temp_mask += temp_mask->pDrawable->y; } if (nbox > ARRAY_SIZE(rect)) { prect = calloc(nbox, sizeof(*prect)); if (prect) prect_size = nbox; else { prect = rect; prect_size = ARRAY_SIZE(rect); } } while (nbox) { int box_cnt; box_cnt = nbox > prect_size ? prect_size : nbox; for (i = 0; i < box_cnt; i++) { prect[i].x_src = box[i].x1 + x_temp_src - x_dest; prect[i].y_src = box[i].y1 + y_temp_src - y_dest; prect[i].x_mask = box[i].x1 + x_temp_mask - x_dest; prect[i].y_mask = box[i].y1 + y_temp_mask - y_dest; prect[i].x_dst = box[i].x1; prect[i].y_dst = box[i].y1; prect[i].width = box[i].x2 - box[i].x1; prect[i].height = box[i].y2 - box[i].y1; DEBUGF("dest %d %d \n", prect[i].x_dst, prect[i].y_dst); } ok = glamor_composite_with_shader(op, temp_src, temp_mask, dest, temp_src_pixmap, temp_mask_pixmap, dest_pixmap, temp_src_priv, temp_mask_priv, dest_pixmap_priv, box_cnt, prect, ca_state); if (!ok) break; nbox -= box_cnt; box += box_cnt; } if (prect != rect) free(prect); out: if (temp_src != source) FreePicture(temp_src, 0); if (temp_mask != mask) FreePicture(temp_mask, 0); return ok; } void glamor_composite(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, INT16 x_source, INT16 y_source, INT16 x_mask, INT16 y_mask, INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height) { ScreenPtr screen = dest->pDrawable->pScreen; PixmapPtr dest_pixmap = glamor_get_drawable_pixmap(dest->pDrawable); PixmapPtr source_pixmap = NULL, mask_pixmap = NULL; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); RegionRec region; BoxPtr extent; int nbox, ok = FALSE; int force_clip = 0; if (source->pDrawable) { source_pixmap = glamor_get_drawable_pixmap(source->pDrawable); if (glamor_pixmap_drm_only(source_pixmap)) goto fail; } if (mask && mask->pDrawable) { mask_pixmap = glamor_get_drawable_pixmap(mask->pDrawable); if (glamor_pixmap_drm_only(mask_pixmap)) goto fail; } DEBUGF ("source pixmap %p (%d %d) mask(%d %d) dest(%d %d) width %d height %d \n", source_pixmap, x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height); if (!glamor_pixmap_has_fbo(dest_pixmap)) goto fail; if (op >= ARRAY_SIZE(composite_op_info)) { glamor_fallback("Unsupported composite op %x\n", op); goto fail; } if (mask && mask->componentAlpha && !glamor_priv->has_dual_blend) { if (op == PictOpAtop || op == PictOpAtopReverse || op == PictOpXor || op >= PictOpSaturate) { glamor_fallback("glamor_composite(): component alpha op %x\n", op); goto fail; } } if ((source && source->filter >= PictFilterConvolution) || (mask && mask->filter >= PictFilterConvolution)) { glamor_fallback("glamor_composite(): unsupported filter\n"); goto fail; } if (!miComputeCompositeRegion(®ion, source, mask, dest, x_source + (source_pixmap ? source->pDrawable->x : 0), y_source + (source_pixmap ? source->pDrawable->y : 0), x_mask + (mask_pixmap ? mask->pDrawable->x : 0), y_mask + (mask_pixmap ? mask->pDrawable->y : 0), x_dest + dest->pDrawable->x, y_dest + dest->pDrawable->y, width, height)) { return; } nbox = REGION_NUM_RECTS(®ion); DEBUGF("first clipped when compositing.\n"); DEBUGRegionPrint(®ion); extent = RegionExtents(®ion); if (nbox == 0) return; /* If destination is not a large pixmap, but the region is larger * than texture size limitation, and source or mask is memory pixmap, * then there may be need to load a large memory pixmap to a * texture, and this is not permitted. Then we force to clip the * destination and make sure latter will not upload a large memory * pixmap. */ if (!glamor_check_fbo_size(glamor_priv, extent->x2 - extent->x1, extent->y2 - extent->y1) && glamor_pixmap_is_large(dest_pixmap) && ((source_pixmap && (glamor_pixmap_is_memory(source_pixmap) || source->repeatType == RepeatPad)) || (mask_pixmap && (glamor_pixmap_is_memory(mask_pixmap) || mask->repeatType == RepeatPad)) || (!source_pixmap && (source->pSourcePict->type != SourcePictTypeSolidFill)) || (!mask_pixmap && mask && mask->pSourcePict->type != SourcePictTypeSolidFill))) force_clip = 1; if (force_clip || glamor_pixmap_is_large(dest_pixmap) || (source_pixmap && glamor_pixmap_is_large(source_pixmap)) || (mask_pixmap && glamor_pixmap_is_large(mask_pixmap))) ok = glamor_composite_largepixmap_region(op, source, mask, dest, source_pixmap, mask_pixmap, dest_pixmap, ®ion, force_clip, x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height); else ok = glamor_composite_clipped_region(op, source, mask, dest, source_pixmap, mask_pixmap, dest_pixmap, ®ion, x_source, y_source, x_mask, y_mask, x_dest, y_dest); REGION_UNINIT(dest->pDrawable->pScreen, ®ion); if (ok) return; fail: glamor_fallback ("from picts %p:%p %dx%d / %p:%p %d x %d (%c,%c) to pict %p:%p %dx%d (%c)\n", source, source->pDrawable, source->pDrawable ? source->pDrawable->width : 0, source->pDrawable ? source->pDrawable->height : 0, mask, (!mask) ? NULL : mask->pDrawable, (!mask || !mask->pDrawable) ? 0 : mask->pDrawable->width, (!mask || !mask->pDrawable) ? 0 : mask->pDrawable->height, glamor_get_picture_location(source), glamor_get_picture_location(mask), dest, dest->pDrawable, dest->pDrawable->width, dest->pDrawable->height, glamor_get_picture_location(dest)); if (glamor_prepare_access_picture_box(dest, GLAMOR_ACCESS_RW, x_dest, y_dest, width, height) && glamor_prepare_access_picture_box(source, GLAMOR_ACCESS_RO, x_source, y_source, width, height) && glamor_prepare_access_picture_box(mask, GLAMOR_ACCESS_RO, x_mask, y_mask, width, height)) { fbComposite(op, source, mask, dest, x_source, y_source, x_mask, y_mask, x_dest, y_dest, width, height); } glamor_finish_access_picture(mask); glamor_finish_access_picture(source); glamor_finish_access_picture(dest); } xorg-server-21.1.16/glamor/glamor_gradient.c0000644000175000017500000015511314757411105014424 /* * Copyright © 2009 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Junyan He * */ /** @file glamor_gradient.c * * Gradient acceleration implementation */ #include "glamor_priv.h" #define LINEAR_SMALL_STOPS (6 + 2) #define LINEAR_LARGE_STOPS (16 + 2) #define RADIAL_SMALL_STOPS (6 + 2) #define RADIAL_LARGE_STOPS (16 + 2) static char * _glamor_create_getcolor_fs_source(ScreenPtr screen, int stops_count, int use_array) { char *gradient_fs = NULL; #define gradient_fs_getcolor\ GLAMOR_DEFAULT_PRECISION\ "uniform int n_stop;\n"\ "uniform float stops[%d];\n"\ "uniform vec4 stop_colors[%d];\n"\ "vec4 get_color(float stop_len)\n"\ "{\n"\ " int i = 0;\n"\ " vec4 stop_color_before;\n"\ " vec4 gradient_color;\n"\ " float stop_delta;\n"\ " float percentage; \n"\ " \n"\ " if(stop_len < stops[0])\n"\ " return vec4(0.0, 0.0, 0.0, 0.0); \n"\ " for(i = 1; i < n_stop; i++) {\n"\ " if(stop_len < stops[i])\n"\ " break; \n"\ " }\n"\ " if(i == n_stop)\n"\ " return vec4(0.0, 0.0, 0.0, 0.0); \n"\ " \n"\ " stop_color_before = stop_colors[i-1];\n"\ " stop_delta = stops[i] - stops[i-1];\n"\ " if(stop_delta > 2.0)\n"\ " percentage = 0.0;\n" /*For comply with pixman, walker->stepper overflow.*/\ " else if(stop_delta < 0.000001)\n"\ " percentage = 0.0;\n"\ " else \n"\ " percentage = (stop_len - stops[i-1])/stop_delta;\n"\ " \n"\ " gradient_color = stop_color_before;\n"\ " if(percentage != 0.0)\n"\ " gradient_color += (stop_colors[i] - gradient_color)*percentage;\n"\ " return vec4(gradient_color.rgb * gradient_color.a, gradient_color.a);\n"\ "}\n" /* Because the array access for shader is very slow, the performance is very low if use array. So use global uniform to replace for it if the number of n_stops is small. */ const char *gradient_fs_getcolor_no_array = GLAMOR_DEFAULT_PRECISION "uniform int n_stop;\n" "uniform float stop0;\n" "uniform float stop1;\n" "uniform float stop2;\n" "uniform float stop3;\n" "uniform float stop4;\n" "uniform float stop5;\n" "uniform float stop6;\n" "uniform float stop7;\n" "uniform vec4 stop_color0;\n" "uniform vec4 stop_color1;\n" "uniform vec4 stop_color2;\n" "uniform vec4 stop_color3;\n" "uniform vec4 stop_color4;\n" "uniform vec4 stop_color5;\n" "uniform vec4 stop_color6;\n" "uniform vec4 stop_color7;\n" "\n" "vec4 get_color(float stop_len)\n" "{\n" " vec4 stop_color_before;\n" " vec4 stop_color_after;\n" " vec4 gradient_color;\n" " float stop_before;\n" " float stop_delta;\n" " float percentage; \n" " \n" " if((stop_len < stop0) && (n_stop >= 1)) {\n" " stop_color_before = vec4(0.0, 0.0, 0.0, 0.0);\n" " stop_delta = 0.0;\n" " } else if((stop_len < stop1) && (n_stop >= 2)) {\n" " stop_color_before = stop_color0;\n" " stop_color_after = stop_color1;\n" " stop_before = stop0;\n" " stop_delta = stop1 - stop0;\n" " } else if((stop_len < stop2) && (n_stop >= 3)) {\n" " stop_color_before = stop_color1;\n" " stop_color_after = stop_color2;\n" " stop_before = stop1;\n" " stop_delta = stop2 - stop1;\n" " } else if((stop_len < stop3) && (n_stop >= 4)){\n" " stop_color_before = stop_color2;\n" " stop_color_after = stop_color3;\n" " stop_before = stop2;\n" " stop_delta = stop3 - stop2;\n" " } else if((stop_len < stop4) && (n_stop >= 5)){\n" " stop_color_before = stop_color3;\n" " stop_color_after = stop_color4;\n" " stop_before = stop3;\n" " stop_delta = stop4 - stop3;\n" " } else if((stop_len < stop5) && (n_stop >= 6)){\n" " stop_color_before = stop_color4;\n" " stop_color_after = stop_color5;\n" " stop_before = stop4;\n" " stop_delta = stop5 - stop4;\n" " } else if((stop_len < stop6) && (n_stop >= 7)){\n" " stop_color_before = stop_color5;\n" " stop_color_after = stop_color6;\n" " stop_before = stop5;\n" " stop_delta = stop6 - stop5;\n" " } else if((stop_len < stop7) && (n_stop >= 8)){\n" " stop_color_before = stop_color6;\n" " stop_color_after = stop_color7;\n" " stop_before = stop6;\n" " stop_delta = stop7 - stop6;\n" " } else {\n" " stop_color_before = vec4(0.0, 0.0, 0.0, 0.0);\n" " stop_delta = 0.0;\n" " }\n" " if(stop_delta > 2.0)\n" " percentage = 0.0;\n" //For comply with pixman, walker->stepper overflow. " else if(stop_delta < 0.000001)\n" " percentage = 0.0;\n" " else\n" " percentage = (stop_len - stop_before)/stop_delta;\n" " \n" " gradient_color = stop_color_before;\n" " if(percentage != 0.0)\n" " gradient_color += (stop_color_after - gradient_color)*percentage;\n" " return vec4(gradient_color.rgb * gradient_color.a, gradient_color.a);\n" "}\n"; if (use_array) { XNFasprintf(&gradient_fs, gradient_fs_getcolor, stops_count, stops_count); return gradient_fs; } else { return XNFstrdup(gradient_fs_getcolor_no_array); } } static void _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count, int dyn_gen) { glamor_screen_private *glamor_priv; int index; GLint gradient_prog = 0; char *gradient_fs = NULL; GLint fs_prog, vs_prog; const char *gradient_vs = GLAMOR_DEFAULT_PRECISION "attribute vec4 v_position;\n" "attribute vec4 v_texcoord;\n" "varying vec2 source_texture;\n" "\n" "void main()\n" "{\n" " gl_Position = v_position;\n" " source_texture = v_texcoord.xy;\n" "}\n"; /* * Refer to pixman radial gradient. * * The problem is given the two circles of c1 and c2 with the radius of r1 and * r1, we need to calculate the t, which is used to do interpolate with stops, * using the fomula: * length((1-t)*c1 + t*c2 - p) = (1-t)*r1 + t*r2 * expand the fomula with xy coond, get the following: * sqrt(sqr((1-t)*c1.x + t*c2.x - p.x) + sqr((1-t)*c1.y + t*c2.y - p.y)) * = (1-t)r1 + t*r2 * <====> At*t- 2Bt + C = 0 * where A = sqr(c2.x - c1.x) + sqr(c2.y - c1.y) - sqr(r2 -r1) * B = (p.x - c1.x)*(c2.x - c1.x) + (p.y - c1.y)*(c2.y - c1.y) + r1*(r2 -r1) * C = sqr(p.x - c1.x) + sqr(p.y - c1.y) - r1*r1 * * solve the fomula and we get the result of * t = (B + sqrt(B*B - A*C)) / A or * t = (B - sqrt(B*B - A*C)) / A (quadratic equation have two solutions) * * The solution we are going to prefer is the bigger one, unless the * radius associated to it is negative (or it falls outside the valid t range) */ #define gradient_radial_fs_template\ GLAMOR_DEFAULT_PRECISION\ "uniform mat3 transform_mat;\n"\ "uniform int repeat_type;\n"\ "uniform float A_value;\n"\ "uniform vec2 c1;\n"\ "uniform float r1;\n"\ "uniform vec2 c2;\n"\ "uniform float r2;\n"\ "varying vec2 source_texture;\n"\ "\n"\ "vec4 get_color(float stop_len);\n"\ "\n"\ "int t_invalid;\n"\ "\n"\ "float get_stop_len()\n"\ "{\n"\ " float t = 0.0;\n"\ " float sqrt_value;\n"\ " t_invalid = 0;\n"\ " \n"\ " vec3 tmp = vec3(source_texture.x, source_texture.y, 1.0);\n"\ " vec3 source_texture_trans = transform_mat * tmp;\n"\ " source_texture_trans.xy = source_texture_trans.xy/source_texture_trans.z;\n"\ " float B_value = (source_texture_trans.x - c1.x) * (c2.x - c1.x)\n"\ " + (source_texture_trans.y - c1.y) * (c2.y - c1.y)\n"\ " + r1 * (r2 - r1);\n"\ " float C_value = (source_texture_trans.x - c1.x) * (source_texture_trans.x - c1.x)\n"\ " + (source_texture_trans.y - c1.y) * (source_texture_trans.y - c1.y)\n"\ " - r1*r1;\n"\ " if(abs(A_value) < 0.00001) {\n"\ " if(B_value == 0.0) {\n"\ " t_invalid = 1;\n"\ " return t;\n"\ " }\n"\ " t = 0.5 * C_value / B_value;"\ " } else {\n"\ " sqrt_value = B_value * B_value - A_value * C_value;\n"\ " if(sqrt_value < 0.0) {\n"\ " t_invalid = 1;\n"\ " return t;\n"\ " }\n"\ " sqrt_value = sqrt(sqrt_value);\n"\ " t = (B_value + sqrt_value) / A_value;\n"\ " }\n"\ " if(repeat_type == %d) {\n" /* RepeatNone case. */\ " if((t <= 0.0) || (t > 1.0))\n"\ /* try another if first one invalid*/\ " t = (B_value - sqrt_value) / A_value;\n"\ " \n"\ " if((t <= 0.0) || (t > 1.0)) {\n" /*still invalid, return.*/\ " t_invalid = 1;\n"\ " return t;\n"\ " }\n"\ " } else {\n"\ " if(t * (r2 - r1) <= -1.0 * r1)\n"\ /* try another if first one invalid*/\ " t = (B_value - sqrt_value) / A_value;\n"\ " \n"\ " if(t * (r2 -r1) <= -1.0 * r1) {\n" /*still invalid, return.*/\ " t_invalid = 1;\n"\ " return t;\n"\ " }\n"\ " }\n"\ " \n"\ " if(repeat_type == %d){\n" /* repeat normal*/\ " t = fract(t);\n"\ " }\n"\ " \n"\ " if(repeat_type == %d) {\n" /* repeat reflect*/\ " t = abs(fract(t * 0.5 + 0.5) * 2.0 - 1.0);\n"\ " }\n"\ " \n"\ " return t;\n"\ "}\n"\ "\n"\ "void main()\n"\ "{\n"\ " float stop_len = get_stop_len();\n"\ " if(t_invalid == 1) {\n"\ " gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n"\ " } else {\n"\ " gl_FragColor = get_color(stop_len);\n"\ " }\n"\ "}\n"\ "\n"\ "%s\n" /* fs_getcolor_source */ char *fs_getcolor_source; glamor_priv = glamor_get_screen_private(screen); if ((glamor_priv->radial_max_nstops >= stops_count) && (dyn_gen)) { /* Very Good, not to generate again. */ return; } glamor_make_current(glamor_priv); if (dyn_gen && glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2]) { glDeleteProgram(glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2]); glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2] = 0; } gradient_prog = glCreateProgram(); vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, gradient_vs); fs_getcolor_source = _glamor_create_getcolor_fs_source(screen, stops_count, (stops_count > 0)); XNFasprintf(&gradient_fs, gradient_radial_fs_template, PIXMAN_REPEAT_NONE, PIXMAN_REPEAT_NORMAL, PIXMAN_REPEAT_REFLECT, fs_getcolor_source); fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, gradient_fs); free(gradient_fs); free(fs_getcolor_source); glAttachShader(gradient_prog, vs_prog); glAttachShader(gradient_prog, fs_prog); glDeleteShader(vs_prog); glDeleteShader(fs_prog); glBindAttribLocation(gradient_prog, GLAMOR_VERTEX_POS, "v_position"); glBindAttribLocation(gradient_prog, GLAMOR_VERTEX_SOURCE, "v_texcoord"); glamor_link_glsl_prog(screen, gradient_prog, "radial gradient"); if (dyn_gen) { index = 2; glamor_priv->radial_max_nstops = stops_count; } else if (stops_count) { index = 1; } else { index = 0; } glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][index] = gradient_prog; } static void _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count, int dyn_gen) { glamor_screen_private *glamor_priv; int index = 0; GLint gradient_prog = 0; char *gradient_fs = NULL; GLint fs_prog, vs_prog; const char *gradient_vs = GLAMOR_DEFAULT_PRECISION "attribute vec4 v_position;\n" "attribute vec4 v_texcoord;\n" "varying vec2 source_texture;\n" "\n" "void main()\n" "{\n" " gl_Position = v_position;\n" " source_texture = v_texcoord.xy;\n" "}\n"; /* * | * |\ * | \ * | \ * | \ * |\ \ * | \ \ * cos_val = |\ p1d \ / * sqrt(1/(slope*slope+1.0)) ------>\ \ \ / * | \ \ \ * | \ \ / \ * | \ *Pt1\ * *p1 | \ \ *P * \ | / \ \ / * \ | / \ \ / * \ | pd \ * \ | \ / \ * p2* | \ / \ / * slope = (p2.y - p1.y) / | / p2d / * (p2.x - p1.x) | / \ / * | / \ / * | / / * | / / * | / *Pt2 * | / * | / * | / * | / * | / * -------+--------------------------------- * O| * | * | * * step 1: compute the distance of p, pt1 and pt2 in the slope direction. * Calculate the distance on Y axis first and multiply cos_val to * get the value on slope direction(pd, p1d and p2d represent the * distance of p, pt1, and pt2 respectively). * * step 2: calculate the percentage of (pd - p1d)/(p2d - p1d). * If (pd - p1d) > (p2d - p1d) or < 0, then sub or add (p2d - p1d) * to make it in the range of [0, (p2d - p1d)]. * * step 3: compare the percentage to every stop and find the stpos just * before and after it. Use the interpolation fomula to compute RGBA. */ #define gradient_fs_template \ GLAMOR_DEFAULT_PRECISION\ "uniform mat3 transform_mat;\n"\ "uniform int repeat_type;\n"\ "uniform int hor_ver;\n"\ "uniform float pt_slope;\n"\ "uniform float cos_val;\n"\ "uniform float p1_distance;\n"\ "uniform float pt_distance;\n"\ "varying vec2 source_texture;\n"\ "\n"\ "vec4 get_color(float stop_len);\n"\ "\n"\ "float get_stop_len()\n"\ "{\n"\ " vec3 tmp = vec3(source_texture.x, source_texture.y, 1.0);\n"\ " float distance;\n"\ " float _p1_distance;\n"\ " float _pt_distance;\n"\ " float y_dist;\n"\ " vec3 source_texture_trans = transform_mat * tmp;\n"\ " \n"\ " if(hor_ver == 0) { \n" /*Normal case.*/\ " y_dist = source_texture_trans.y - source_texture_trans.x*pt_slope;\n"\ " distance = y_dist * cos_val;\n"\ " _p1_distance = p1_distance * source_texture_trans.z;\n"\ " _pt_distance = pt_distance * source_texture_trans.z;\n"\ " \n"\ " } else if (hor_ver == 1) {\n"/*horizontal case.*/\ " distance = source_texture_trans.x;\n"\ " _p1_distance = p1_distance * source_texture_trans.z;\n"\ " _pt_distance = pt_distance * source_texture_trans.z;\n"\ " } \n"\ " \n"\ " distance = (distance - _p1_distance) / _pt_distance;\n"\ " \n"\ " if(repeat_type == %d){\n" /* repeat normal*/\ " distance = fract(distance);\n"\ " }\n"\ " \n"\ " if(repeat_type == %d) {\n" /* repeat reflect*/\ " distance = abs(fract(distance * 0.5 + 0.5) * 2.0 - 1.0);\n"\ " }\n"\ " \n"\ " return distance;\n"\ "}\n"\ "\n"\ "void main()\n"\ "{\n"\ " float stop_len = get_stop_len();\n"\ " gl_FragColor = get_color(stop_len);\n"\ "}\n"\ "\n"\ "%s" /* fs_getcolor_source */ char *fs_getcolor_source; glamor_priv = glamor_get_screen_private(screen); if ((glamor_priv->linear_max_nstops >= stops_count) && (dyn_gen)) { /* Very Good, not to generate again. */ return; } glamor_make_current(glamor_priv); if (dyn_gen && glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2]) { glDeleteProgram(glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2]); glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2] = 0; } gradient_prog = glCreateProgram(); vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, gradient_vs); fs_getcolor_source = _glamor_create_getcolor_fs_source(screen, stops_count, stops_count > 0); XNFasprintf(&gradient_fs, gradient_fs_template, PIXMAN_REPEAT_NORMAL, PIXMAN_REPEAT_REFLECT, fs_getcolor_source); fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, gradient_fs); free(gradient_fs); free(fs_getcolor_source); glAttachShader(gradient_prog, vs_prog); glAttachShader(gradient_prog, fs_prog); glDeleteShader(vs_prog); glDeleteShader(fs_prog); glBindAttribLocation(gradient_prog, GLAMOR_VERTEX_POS, "v_position"); glBindAttribLocation(gradient_prog, GLAMOR_VERTEX_SOURCE, "v_texcoord"); glamor_link_glsl_prog(screen, gradient_prog, "linear gradient"); if (dyn_gen) { index = 2; glamor_priv->linear_max_nstops = stops_count; } else if (stops_count) { index = 1; } else { index = 0; } glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][index] = gradient_prog; } void glamor_init_gradient_shader(ScreenPtr screen) { glamor_screen_private *glamor_priv; int i; glamor_priv = glamor_get_screen_private(screen); for (i = 0; i < 3; i++) { glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][i] = 0; glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][i] = 0; } glamor_priv->linear_max_nstops = 0; glamor_priv->radial_max_nstops = 0; _glamor_create_linear_gradient_program(screen, 0, 0); _glamor_create_linear_gradient_program(screen, LINEAR_LARGE_STOPS, 0); _glamor_create_radial_gradient_program(screen, 0, 0); _glamor_create_radial_gradient_program(screen, RADIAL_LARGE_STOPS, 0); } static void _glamor_gradient_convert_trans_matrix(PictTransform *from, float to[3][3], int width, int height, int normalize) { /* * Because in the shader program, we normalize all the pixel cood to [0, 1], * so with the transform matrix, the correct logic should be: * v_s = A*T*v * v_s: point vector in shader after normalized. * A: The transition matrix from width X height --> 1.0 X 1.0 * T: The transform matrix. * v: point vector in width X height space. * * result is OK if we use this fomula. But for every point in width X height space, * we can just use their normalized point vector in shader, namely we can just * use the result of A*v in shader. So we have no chance to insert T in A*v. * We can just convert v_s = A*T*v to v_s = A*T*inv(A)*A*v, where inv(A) is the * inverse matrix of A. Now, v_s = (A*T*inv(A)) * (A*v) * So, to get the correct v_s, we need to cacula1 the matrix: (A*T*inv(A)), and * we name this matrix T_s. * * Firstly, because A is for the scale conversion, we find * -- -- * |1/w 0 0 | * A = | 0 1/h 0 | * | 0 0 1.0| * -- -- * so T_s = A*T*inv(a) and result * * -- -- * | t11 h*t12/w t13/w| * T_s = | w*t21/h t22 t23/h| * | w*t31 h*t32 t33 | * -- -- */ to[0][0] = (float) pixman_fixed_to_double(from->matrix[0][0]); to[0][1] = (float) pixman_fixed_to_double(from->matrix[0][1]) * (normalize ? (((float) height) / ((float) width)) : 1.0); to[0][2] = (float) pixman_fixed_to_double(from->matrix[0][2]) / (normalize ? ((float) width) : 1.0); to[1][0] = (float) pixman_fixed_to_double(from->matrix[1][0]) * (normalize ? (((float) width) / ((float) height)) : 1.0); to[1][1] = (float) pixman_fixed_to_double(from->matrix[1][1]); to[1][2] = (float) pixman_fixed_to_double(from->matrix[1][2]) / (normalize ? ((float) height) : 1.0); to[2][0] = (float) pixman_fixed_to_double(from->matrix[2][0]) * (normalize ? ((float) width) : 1.0); to[2][1] = (float) pixman_fixed_to_double(from->matrix[2][1]) * (normalize ? ((float) height) : 1.0); to[2][2] = (float) pixman_fixed_to_double(from->matrix[2][2]); DEBUGF("the transform matrix is:\n%f\t%f\t%f\n%f\t%f\t%f\n%f\t%f\t%f\n", to[0][0], to[0][1], to[0][2], to[1][0], to[1][1], to[1][2], to[2][0], to[2][1], to[2][2]); } static int _glamor_gradient_set_pixmap_destination(ScreenPtr screen, glamor_screen_private *glamor_priv, PicturePtr dst_picture, GLfloat *xscale, GLfloat *yscale, int x_source, int y_source, int tex_normalize) { glamor_pixmap_private *pixmap_priv; PixmapPtr pixmap = NULL; GLfloat *v; char *vbo_offset; pixmap = glamor_get_drawable_pixmap(dst_picture->pDrawable); pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) { /* should always have here. */ return 0; } glamor_set_destination_pixmap_priv_nc(glamor_priv, pixmap, pixmap_priv); pixmap_priv_get_dest_scale(pixmap, pixmap_priv, xscale, yscale); DEBUGF("xscale = %f, yscale = %f," " x_source = %d, y_source = %d, width = %d, height = %d\n", *xscale, *yscale, x_source, y_source, dst_picture->pDrawable->width, dst_picture->pDrawable->height); v = glamor_get_vbo_space(screen, 16 * sizeof(GLfloat), &vbo_offset); glamor_set_normalize_vcoords_tri_strip(*xscale, *yscale, 0, 0, (INT16) (dst_picture->pDrawable-> width), (INT16) (dst_picture->pDrawable-> height), v); if (tex_normalize) { glamor_set_normalize_tcoords_tri_stripe(*xscale, *yscale, x_source, y_source, (INT16) (dst_picture-> pDrawable->width + x_source), (INT16) (dst_picture-> pDrawable->height + y_source), &v[8]); } else { glamor_set_tcoords_tri_strip(x_source, y_source, (INT16) (dst_picture->pDrawable->width) + x_source, (INT16) (dst_picture->pDrawable->height) + y_source, &v[8]); } DEBUGF("vertices --> leftup : %f X %f, rightup: %f X %f," "rightbottom: %f X %f, leftbottom : %f X %f\n", v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]); DEBUGF("tex_vertices --> leftup : %f X %f, rightup: %f X %f," "rightbottom: %f X %f, leftbottom : %f X %f\n", v[8], v[9], v[10], v[11], v[12], v[13], v[14], v[15]); glamor_make_current(glamor_priv); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT, GL_FALSE, 0, vbo_offset); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_FLOAT, GL_FALSE, 0, vbo_offset + 8 * sizeof(GLfloat)); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glamor_put_vbo_space(screen); return 1; } static int _glamor_gradient_set_stops(PicturePtr src_picture, PictGradient *pgradient, GLfloat *stop_colors, GLfloat *n_stops) { int i; int count = 1; for (i = 0; i < pgradient->nstops; i++) { stop_colors[count * 4] = pixman_fixed_to_double(pgradient->stops[i].color.red); stop_colors[count * 4 + 1] = pixman_fixed_to_double(pgradient->stops[i].color.green); stop_colors[count * 4 + 2] = pixman_fixed_to_double(pgradient->stops[i].color.blue); stop_colors[count * 4 + 3] = pixman_fixed_to_double(pgradient->stops[i].color.alpha); n_stops[count] = (GLfloat) pixman_fixed_to_double(pgradient->stops[i].x); count++; } /* for the end stop. */ count++; switch (src_picture->repeatType) { #define REPEAT_FILL_STOPS(m, n) \ stop_colors[(m)*4 + 0] = stop_colors[(n)*4 + 0]; \ stop_colors[(m)*4 + 1] = stop_colors[(n)*4 + 1]; \ stop_colors[(m)*4 + 2] = stop_colors[(n)*4 + 2]; \ stop_colors[(m)*4 + 3] = stop_colors[(n)*4 + 3]; default: case PIXMAN_REPEAT_NONE: stop_colors[0] = 0.0; //R stop_colors[1] = 0.0; //G stop_colors[2] = 0.0; //B stop_colors[3] = 0.0; //Alpha n_stops[0] = n_stops[1]; stop_colors[0 + (count - 1) * 4] = 0.0; //R stop_colors[1 + (count - 1) * 4] = 0.0; //G stop_colors[2 + (count - 1) * 4] = 0.0; //B stop_colors[3 + (count - 1) * 4] = 0.0; //Alpha n_stops[count - 1] = n_stops[count - 2]; break; case PIXMAN_REPEAT_NORMAL: REPEAT_FILL_STOPS(0, count - 2); n_stops[0] = n_stops[count - 2] - 1.0; REPEAT_FILL_STOPS(count - 1, 1); n_stops[count - 1] = n_stops[1] + 1.0; break; case PIXMAN_REPEAT_REFLECT: REPEAT_FILL_STOPS(0, 1); n_stops[0] = -n_stops[1]; REPEAT_FILL_STOPS(count - 1, count - 2); n_stops[count - 1] = 1.0 + 1.0 - n_stops[count - 2]; break; case PIXMAN_REPEAT_PAD: REPEAT_FILL_STOPS(0, 1); n_stops[0] = -(float) INT_MAX; REPEAT_FILL_STOPS(count - 1, count - 2); n_stops[count - 1] = (float) INT_MAX; break; #undef REPEAT_FILL_STOPS } for (i = 0; i < count; i++) { DEBUGF("n_stops[%d] = %f, color = r:%f g:%f b:%f a:%f\n", i, n_stops[i], stop_colors[i * 4], stop_colors[i * 4 + 1], stop_colors[i * 4 + 2], stop_colors[i * 4 + 3]); } return count; } PicturePtr glamor_generate_radial_gradient_picture(ScreenPtr screen, PicturePtr src_picture, int x_source, int y_source, int width, int height, PictFormatShort format) { glamor_screen_private *glamor_priv; PicturePtr dst_picture = NULL; PixmapPtr pixmap = NULL; GLint gradient_prog = 0; int error; int stops_count = 0; int count = 0; GLfloat *stop_colors = NULL; GLfloat *n_stops = NULL; GLfloat xscale, yscale; float transform_mat[3][3]; static const float identity_mat[3][3] = { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0} }; GLfloat stop_colors_st[RADIAL_SMALL_STOPS * 4]; GLfloat n_stops_st[RADIAL_SMALL_STOPS]; GLfloat A_value; GLfloat cxy[4]; float c1x, c1y, c2x, c2y, r1, r2; GLint transform_mat_uniform_location = 0; GLint repeat_type_uniform_location = 0; GLint n_stop_uniform_location = 0; GLint stops_uniform_location = 0; GLint stop_colors_uniform_location = 0; GLint stop0_uniform_location = 0; GLint stop1_uniform_location = 0; GLint stop2_uniform_location = 0; GLint stop3_uniform_location = 0; GLint stop4_uniform_location = 0; GLint stop5_uniform_location = 0; GLint stop6_uniform_location = 0; GLint stop7_uniform_location = 0; GLint stop_color0_uniform_location = 0; GLint stop_color1_uniform_location = 0; GLint stop_color2_uniform_location = 0; GLint stop_color3_uniform_location = 0; GLint stop_color4_uniform_location = 0; GLint stop_color5_uniform_location = 0; GLint stop_color6_uniform_location = 0; GLint stop_color7_uniform_location = 0; GLint A_value_uniform_location = 0; GLint c1_uniform_location = 0; GLint r1_uniform_location = 0; GLint c2_uniform_location = 0; GLint r2_uniform_location = 0; glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); /* Create a pixmap with VBO. */ pixmap = glamor_create_pixmap(screen, width, height, PIXMAN_FORMAT_DEPTH(format), 0); if (!pixmap) goto GRADIENT_FAIL; dst_picture = CreatePicture(0, &pixmap->drawable, PictureMatchFormat(screen, PIXMAN_FORMAT_DEPTH(format), format), 0, 0, serverClient, &error); /* Release the reference, picture will hold the last one. */ glamor_destroy_pixmap(pixmap); if (!dst_picture) goto GRADIENT_FAIL; ValidatePicture(dst_picture); stops_count = src_picture->pSourcePict->radial.nstops + 2; /* Because the max value of nstops is unknown, so create a program when nstops > LINEAR_LARGE_STOPS. */ if (stops_count <= RADIAL_SMALL_STOPS) { gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][0]; } else if (stops_count <= RADIAL_LARGE_STOPS) { gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][1]; } else { _glamor_create_radial_gradient_program(screen, src_picture->pSourcePict->linear. nstops + 2, 1); gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_RADIAL][2]; } /* Bind all the uniform vars . */ transform_mat_uniform_location = glGetUniformLocation(gradient_prog, "transform_mat"); repeat_type_uniform_location = glGetUniformLocation(gradient_prog, "repeat_type"); n_stop_uniform_location = glGetUniformLocation(gradient_prog, "n_stop"); A_value_uniform_location = glGetUniformLocation(gradient_prog, "A_value"); c1_uniform_location = glGetUniformLocation(gradient_prog, "c1"); r1_uniform_location = glGetUniformLocation(gradient_prog, "r1"); c2_uniform_location = glGetUniformLocation(gradient_prog, "c2"); r2_uniform_location = glGetUniformLocation(gradient_prog, "r2"); if (src_picture->pSourcePict->radial.nstops + 2 <= RADIAL_SMALL_STOPS) { stop0_uniform_location = glGetUniformLocation(gradient_prog, "stop0"); stop1_uniform_location = glGetUniformLocation(gradient_prog, "stop1"); stop2_uniform_location = glGetUniformLocation(gradient_prog, "stop2"); stop3_uniform_location = glGetUniformLocation(gradient_prog, "stop3"); stop4_uniform_location = glGetUniformLocation(gradient_prog, "stop4"); stop5_uniform_location = glGetUniformLocation(gradient_prog, "stop5"); stop6_uniform_location = glGetUniformLocation(gradient_prog, "stop6"); stop7_uniform_location = glGetUniformLocation(gradient_prog, "stop7"); stop_color0_uniform_location = glGetUniformLocation(gradient_prog, "stop_color0"); stop_color1_uniform_location = glGetUniformLocation(gradient_prog, "stop_color1"); stop_color2_uniform_location = glGetUniformLocation(gradient_prog, "stop_color2"); stop_color3_uniform_location = glGetUniformLocation(gradient_prog, "stop_color3"); stop_color4_uniform_location = glGetUniformLocation(gradient_prog, "stop_color4"); stop_color5_uniform_location = glGetUniformLocation(gradient_prog, "stop_color5"); stop_color6_uniform_location = glGetUniformLocation(gradient_prog, "stop_color6"); stop_color7_uniform_location = glGetUniformLocation(gradient_prog, "stop_color7"); } else { stops_uniform_location = glGetUniformLocation(gradient_prog, "stops"); stop_colors_uniform_location = glGetUniformLocation(gradient_prog, "stop_colors"); } glUseProgram(gradient_prog); glUniform1i(repeat_type_uniform_location, src_picture->repeatType); if (src_picture->transform) { _glamor_gradient_convert_trans_matrix(src_picture->transform, transform_mat, width, height, 0); glUniformMatrix3fv(transform_mat_uniform_location, 1, 1, &transform_mat[0][0]); } else { glUniformMatrix3fv(transform_mat_uniform_location, 1, 1, &identity_mat[0][0]); } if (!_glamor_gradient_set_pixmap_destination (screen, glamor_priv, dst_picture, &xscale, &yscale, x_source, y_source, 0)) goto GRADIENT_FAIL; glamor_set_alu(screen, GXcopy); /* Set all the stops and colors to shader. */ if (stops_count > RADIAL_SMALL_STOPS) { stop_colors = xallocarray(stops_count, 4 * sizeof(float)); if (stop_colors == NULL) { ErrorF("Failed to allocate stop_colors memory.\n"); goto GRADIENT_FAIL; } n_stops = xallocarray(stops_count, sizeof(float)); if (n_stops == NULL) { ErrorF("Failed to allocate n_stops memory.\n"); goto GRADIENT_FAIL; } } else { stop_colors = stop_colors_st; n_stops = n_stops_st; } count = _glamor_gradient_set_stops(src_picture, &src_picture->pSourcePict->gradient, stop_colors, n_stops); if (src_picture->pSourcePict->linear.nstops + 2 <= RADIAL_SMALL_STOPS) { int j = 0; glUniform4f(stop_color0_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color1_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color2_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color3_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color4_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color5_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color6_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color7_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j = 0; glUniform1f(stop0_uniform_location, n_stops[j++]); glUniform1f(stop1_uniform_location, n_stops[j++]); glUniform1f(stop2_uniform_location, n_stops[j++]); glUniform1f(stop3_uniform_location, n_stops[j++]); glUniform1f(stop4_uniform_location, n_stops[j++]); glUniform1f(stop5_uniform_location, n_stops[j++]); glUniform1f(stop6_uniform_location, n_stops[j++]); glUniform1f(stop7_uniform_location, n_stops[j++]); glUniform1i(n_stop_uniform_location, count); } else { glUniform4fv(stop_colors_uniform_location, count, stop_colors); glUniform1fv(stops_uniform_location, count, n_stops); glUniform1i(n_stop_uniform_location, count); } c1x = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c1.x); c1y = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c1.y); c2x = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c2.x); c2y = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c2.y); r1 = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c1. radius); r2 = (float) pixman_fixed_to_double(src_picture->pSourcePict->radial.c2. radius); glamor_set_circle_centre(width, height, c1x, c1y, cxy); glUniform2fv(c1_uniform_location, 1, cxy); glUniform1f(r1_uniform_location, r1); glamor_set_circle_centre(width, height, c2x, c2y, cxy); glUniform2fv(c2_uniform_location, 1, cxy); glUniform1f(r2_uniform_location, r2); A_value = (c2x - c1x) * (c2x - c1x) + (c2y - c1y) * (c2y - c1y) - (r2 - r1) * (r2 - r1); glUniform1f(A_value_uniform_location, A_value); DEBUGF("C1:(%f, %f) R1:%f\nC2:(%f, %f) R2:%f\nA = %f\n", c1x, c1y, r1, c2x, c2y, r2, A_value); /* Now rendering. */ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); /* Do the clear logic. */ if (stops_count > RADIAL_SMALL_STOPS) { free(n_stops); free(stop_colors); } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); return dst_picture; GRADIENT_FAIL: if (dst_picture) { FreePicture(dst_picture, 0); } if (stops_count > RADIAL_SMALL_STOPS) { if (n_stops) free(n_stops); if (stop_colors) free(stop_colors); } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); return NULL; } PicturePtr glamor_generate_linear_gradient_picture(ScreenPtr screen, PicturePtr src_picture, int x_source, int y_source, int width, int height, PictFormatShort format) { glamor_screen_private *glamor_priv; PicturePtr dst_picture = NULL; PixmapPtr pixmap = NULL; GLint gradient_prog = 0; int error; float pt_distance; float p1_distance; GLfloat cos_val; int stops_count = 0; GLfloat *stop_colors = NULL; GLfloat *n_stops = NULL; int count = 0; float slope; GLfloat xscale, yscale; GLfloat pt1[2], pt2[2]; float transform_mat[3][3]; static const float identity_mat[3][3] = { {1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.0, 1.0} }; GLfloat stop_colors_st[LINEAR_SMALL_STOPS * 4]; GLfloat n_stops_st[LINEAR_SMALL_STOPS]; GLint transform_mat_uniform_location = 0; GLint n_stop_uniform_location = 0; GLint stops_uniform_location = 0; GLint stop0_uniform_location = 0; GLint stop1_uniform_location = 0; GLint stop2_uniform_location = 0; GLint stop3_uniform_location = 0; GLint stop4_uniform_location = 0; GLint stop5_uniform_location = 0; GLint stop6_uniform_location = 0; GLint stop7_uniform_location = 0; GLint stop_colors_uniform_location = 0; GLint stop_color0_uniform_location = 0; GLint stop_color1_uniform_location = 0; GLint stop_color2_uniform_location = 0; GLint stop_color3_uniform_location = 0; GLint stop_color4_uniform_location = 0; GLint stop_color5_uniform_location = 0; GLint stop_color6_uniform_location = 0; GLint stop_color7_uniform_location = 0; GLint pt_slope_uniform_location = 0; GLint repeat_type_uniform_location = 0; GLint hor_ver_uniform_location = 0; GLint cos_val_uniform_location = 0; GLint p1_distance_uniform_location = 0; GLint pt_distance_uniform_location = 0; glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); /* Create a pixmap with VBO. */ pixmap = glamor_create_pixmap(screen, width, height, PIXMAN_FORMAT_DEPTH(format), 0); if (!pixmap) goto GRADIENT_FAIL; dst_picture = CreatePicture(0, &pixmap->drawable, PictureMatchFormat(screen, PIXMAN_FORMAT_DEPTH(format), format), 0, 0, serverClient, &error); /* Release the reference, picture will hold the last one. */ glamor_destroy_pixmap(pixmap); if (!dst_picture) goto GRADIENT_FAIL; ValidatePicture(dst_picture); stops_count = src_picture->pSourcePict->linear.nstops + 2; /* Because the max value of nstops is unknown, so create a program when nstops > LINEAR_LARGE_STOPS. */ if (stops_count <= LINEAR_SMALL_STOPS) { gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][0]; } else if (stops_count <= LINEAR_LARGE_STOPS) { gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][1]; } else { _glamor_create_linear_gradient_program(screen, src_picture->pSourcePict->linear. nstops + 2, 1); gradient_prog = glamor_priv->gradient_prog[SHADER_GRADIENT_LINEAR][2]; } /* Bind all the uniform vars . */ n_stop_uniform_location = glGetUniformLocation(gradient_prog, "n_stop"); pt_slope_uniform_location = glGetUniformLocation(gradient_prog, "pt_slope"); repeat_type_uniform_location = glGetUniformLocation(gradient_prog, "repeat_type"); hor_ver_uniform_location = glGetUniformLocation(gradient_prog, "hor_ver"); transform_mat_uniform_location = glGetUniformLocation(gradient_prog, "transform_mat"); cos_val_uniform_location = glGetUniformLocation(gradient_prog, "cos_val"); p1_distance_uniform_location = glGetUniformLocation(gradient_prog, "p1_distance"); pt_distance_uniform_location = glGetUniformLocation(gradient_prog, "pt_distance"); if (src_picture->pSourcePict->linear.nstops + 2 <= LINEAR_SMALL_STOPS) { stop0_uniform_location = glGetUniformLocation(gradient_prog, "stop0"); stop1_uniform_location = glGetUniformLocation(gradient_prog, "stop1"); stop2_uniform_location = glGetUniformLocation(gradient_prog, "stop2"); stop3_uniform_location = glGetUniformLocation(gradient_prog, "stop3"); stop4_uniform_location = glGetUniformLocation(gradient_prog, "stop4"); stop5_uniform_location = glGetUniformLocation(gradient_prog, "stop5"); stop6_uniform_location = glGetUniformLocation(gradient_prog, "stop6"); stop7_uniform_location = glGetUniformLocation(gradient_prog, "stop7"); stop_color0_uniform_location = glGetUniformLocation(gradient_prog, "stop_color0"); stop_color1_uniform_location = glGetUniformLocation(gradient_prog, "stop_color1"); stop_color2_uniform_location = glGetUniformLocation(gradient_prog, "stop_color2"); stop_color3_uniform_location = glGetUniformLocation(gradient_prog, "stop_color3"); stop_color4_uniform_location = glGetUniformLocation(gradient_prog, "stop_color4"); stop_color5_uniform_location = glGetUniformLocation(gradient_prog, "stop_color5"); stop_color6_uniform_location = glGetUniformLocation(gradient_prog, "stop_color6"); stop_color7_uniform_location = glGetUniformLocation(gradient_prog, "stop_color7"); } else { stops_uniform_location = glGetUniformLocation(gradient_prog, "stops"); stop_colors_uniform_location = glGetUniformLocation(gradient_prog, "stop_colors"); } glUseProgram(gradient_prog); glUniform1i(repeat_type_uniform_location, src_picture->repeatType); /* set the transform matrix. */ if (src_picture->transform) { _glamor_gradient_convert_trans_matrix(src_picture->transform, transform_mat, width, height, 1); glUniformMatrix3fv(transform_mat_uniform_location, 1, 1, &transform_mat[0][0]); } else { glUniformMatrix3fv(transform_mat_uniform_location, 1, 1, &identity_mat[0][0]); } if (!_glamor_gradient_set_pixmap_destination (screen, glamor_priv, dst_picture, &xscale, &yscale, x_source, y_source, 1)) goto GRADIENT_FAIL; glamor_set_alu(screen, GXcopy); /* Normalize the PTs. */ glamor_set_normalize_pt(xscale, yscale, pixman_fixed_to_double(src_picture->pSourcePict-> linear.p1.x), pixman_fixed_to_double(src_picture->pSourcePict-> linear.p1.y), pt1); DEBUGF("pt1:(%f, %f) ---> (%f %f)\n", pixman_fixed_to_double(src_picture->pSourcePict->linear.p1.x), pixman_fixed_to_double(src_picture->pSourcePict->linear.p1.y), pt1[0], pt1[1]); glamor_set_normalize_pt(xscale, yscale, pixman_fixed_to_double(src_picture->pSourcePict-> linear.p2.x), pixman_fixed_to_double(src_picture->pSourcePict-> linear.p2.y), pt2); DEBUGF("pt2:(%f, %f) ---> (%f %f)\n", pixman_fixed_to_double(src_picture->pSourcePict->linear.p2.x), pixman_fixed_to_double(src_picture->pSourcePict->linear.p2.y), pt2[0], pt2[1]); /* Set all the stops and colors to shader. */ if (stops_count > LINEAR_SMALL_STOPS) { stop_colors = xallocarray(stops_count, 4 * sizeof(float)); if (stop_colors == NULL) { ErrorF("Failed to allocate stop_colors memory.\n"); goto GRADIENT_FAIL; } n_stops = xallocarray(stops_count, sizeof(float)); if (n_stops == NULL) { ErrorF("Failed to allocate n_stops memory.\n"); goto GRADIENT_FAIL; } } else { stop_colors = stop_colors_st; n_stops = n_stops_st; } count = _glamor_gradient_set_stops(src_picture, &src_picture->pSourcePict->gradient, stop_colors, n_stops); if (src_picture->pSourcePict->linear.nstops + 2 <= LINEAR_SMALL_STOPS) { int j = 0; glUniform4f(stop_color0_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color1_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color2_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color3_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color4_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color5_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color6_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j++; glUniform4f(stop_color7_uniform_location, stop_colors[4 * j + 0], stop_colors[4 * j + 1], stop_colors[4 * j + 2], stop_colors[4 * j + 3]); j = 0; glUniform1f(stop0_uniform_location, n_stops[j++]); glUniform1f(stop1_uniform_location, n_stops[j++]); glUniform1f(stop2_uniform_location, n_stops[j++]); glUniform1f(stop3_uniform_location, n_stops[j++]); glUniform1f(stop4_uniform_location, n_stops[j++]); glUniform1f(stop5_uniform_location, n_stops[j++]); glUniform1f(stop6_uniform_location, n_stops[j++]); glUniform1f(stop7_uniform_location, n_stops[j++]); glUniform1i(n_stop_uniform_location, count); } else { glUniform4fv(stop_colors_uniform_location, count, stop_colors); glUniform1fv(stops_uniform_location, count, n_stops); glUniform1i(n_stop_uniform_location, count); } if (src_picture->pSourcePict->linear.p2.y == src_picture->pSourcePict->linear.p1.y) { // The horizontal case. glUniform1i(hor_ver_uniform_location, 1); DEBUGF("p1.y: %f, p2.y: %f, enter the horizontal case\n", pt1[1], pt2[1]); p1_distance = pt1[0]; pt_distance = (pt2[0] - p1_distance); glUniform1f(p1_distance_uniform_location, p1_distance); glUniform1f(pt_distance_uniform_location, pt_distance); } else { /* The slope need to compute here. In shader, the viewport set will change the original slope and the slope which is vertical to it will not be correct. */ slope = -(float) (src_picture->pSourcePict->linear.p2.x - src_picture->pSourcePict->linear.p1.x) / (float) (src_picture->pSourcePict->linear.p2.y - src_picture->pSourcePict->linear.p1.y); slope = slope * yscale / xscale; glUniform1f(pt_slope_uniform_location, slope); glUniform1i(hor_ver_uniform_location, 0); cos_val = sqrt(1.0 / (slope * slope + 1.0)); glUniform1f(cos_val_uniform_location, cos_val); p1_distance = (pt1[1] - pt1[0] * slope) * cos_val; pt_distance = (pt2[1] - pt2[0] * slope) * cos_val - p1_distance; glUniform1f(p1_distance_uniform_location, p1_distance); glUniform1f(pt_distance_uniform_location, pt_distance); } /* Now rendering. */ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); /* Do the clear logic. */ if (stops_count > LINEAR_SMALL_STOPS) { free(n_stops); free(stop_colors); } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); return dst_picture; GRADIENT_FAIL: if (dst_picture) { FreePicture(dst_picture, 0); } if (stops_count > LINEAR_SMALL_STOPS) { if (n_stops) free(n_stops); if (stop_colors) free(stop_colors); } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); return NULL; } xorg-server-21.1.16/glamor/glamor_prepare.c0000644000175000017500000002256714757411105014273 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_prepare.h" #include "glamor_transfer.h" /* * Make a pixmap ready to draw with fb by * creating a PBO large enough for the whole object * and downloading all of the FBOs into it. */ static Bool glamor_prep_pixmap_box(PixmapPtr pixmap, glamor_access_t access, BoxPtr box) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); int gl_access, gl_usage; RegionRec region; if (priv->type == GLAMOR_DRM_ONLY) return FALSE; if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) return TRUE; glamor_make_current(glamor_priv); RegionInit(®ion, box, 1); /* See if it's already mapped */ if (pixmap->devPrivate.ptr) { /* * Someone else has mapped this pixmap; * we'll assume that it's directly mapped * by a lower level driver */ if (!priv->prepared) return TRUE; /* In X, multiple Drawables can be stored in the same Pixmap (such as * each individual window in a non-composited screen pixmap, or the * reparented window contents inside the window-manager-decorated window * pixmap on a composited screen). * * As a result, when doing a series of mappings for a fallback, we may * need to add more boxes to the set of data we've downloaded, as we go. */ RegionSubtract(®ion, ®ion, &priv->prepare_region); if (!RegionNotEmpty(®ion)) return TRUE; if (access == GLAMOR_ACCESS_RW) FatalError("attempt to remap buffer as writable"); if (priv->pbo) { glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo); glUnmapBuffer(GL_PIXEL_PACK_BUFFER); pixmap->devPrivate.ptr = NULL; } } else { RegionInit(&priv->prepare_region, box, 1); if (glamor_priv->has_rw_pbo) { if (priv->pbo == 0) glGenBuffers(1, &priv->pbo); gl_usage = GL_STREAM_READ; glamor_priv->suppress_gl_out_of_memory_logging = true; glBindBuffer(GL_PIXEL_PACK_BUFFER, priv->pbo); glBufferData(GL_PIXEL_PACK_BUFFER, pixmap->devKind * pixmap->drawable.height, NULL, gl_usage); glamor_priv->suppress_gl_out_of_memory_logging = false; if (glGetError() == GL_OUT_OF_MEMORY) { if (!glamor_priv->logged_any_pbo_allocation_failure) { LogMessageVerb(X_WARNING, 0, "glamor: Failed to allocate %d " "bytes PBO due to GL_OUT_OF_MEMORY.\n", pixmap->devKind * pixmap->drawable.height); glamor_priv->logged_any_pbo_allocation_failure = true; } glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); glDeleteBuffers(1, &priv->pbo); priv->pbo = 0; } } if (!priv->pbo) { pixmap->devPrivate.ptr = xallocarray(pixmap->devKind, pixmap->drawable.height); if (!pixmap->devPrivate.ptr) return FALSE; } priv->map_access = access; } glamor_download_boxes(pixmap, RegionRects(®ion), RegionNumRects(®ion), 0, 0, 0, 0, pixmap->devPrivate.ptr, pixmap->devKind); RegionUninit(®ion); if (priv->pbo) { if (priv->map_access == GLAMOR_ACCESS_RW) gl_access = GL_READ_WRITE; else gl_access = GL_READ_ONLY; pixmap->devPrivate.ptr = glMapBuffer(GL_PIXEL_PACK_BUFFER, gl_access); glBindBuffer(GL_PIXEL_PACK_BUFFER, 0); } priv->prepared = TRUE; return TRUE; } /* * When we're done with the drawable, unmap the PBO, reupload * if we were writing to it and then unbind it to release the memory */ static void glamor_fini_pixmap(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) return; if (!priv->prepared) return; if (priv->pbo) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, priv->pbo); glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER); pixmap->devPrivate.ptr = NULL; } if (priv->map_access == GLAMOR_ACCESS_RW) { glamor_upload_boxes(pixmap, RegionRects(&priv->prepare_region), RegionNumRects(&priv->prepare_region), 0, 0, 0, 0, pixmap->devPrivate.ptr, pixmap->devKind); } RegionUninit(&priv->prepare_region); if (priv->pbo) { glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); glDeleteBuffers(1, &priv->pbo); priv->pbo = 0; } else { free(pixmap->devPrivate.ptr); pixmap->devPrivate.ptr = NULL; } priv->prepared = FALSE; } Bool glamor_prepare_access(DrawablePtr drawable, glamor_access_t access) { PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); BoxRec box; int off_x, off_y; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); box.x1 = drawable->x + off_x; box.x2 = box.x1 + drawable->width; box.y1 = drawable->y + off_y; box.y2 = box.y1 + drawable->height; return glamor_prep_pixmap_box(pixmap, access, &box); } Bool glamor_prepare_access_box(DrawablePtr drawable, glamor_access_t access, int x, int y, int w, int h) { PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); BoxRec box; int off_x, off_y; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); box.x1 = drawable->x + x + off_x; box.x2 = box.x1 + w; box.y1 = drawable->y + y + off_y; box.y2 = box.y1 + h; return glamor_prep_pixmap_box(pixmap, access, &box); } void glamor_finish_access(DrawablePtr drawable) { glamor_fini_pixmap(glamor_get_drawable_pixmap(drawable)); } /* * Make a picture ready to use with fb. */ Bool glamor_prepare_access_picture(PicturePtr picture, glamor_access_t access) { if (!picture || !picture->pDrawable) return TRUE; return glamor_prepare_access(picture->pDrawable, access); } Bool glamor_prepare_access_picture_box(PicturePtr picture, glamor_access_t access, int x, int y, int w, int h) { if (!picture || !picture->pDrawable) return TRUE; /* If a transform is set, we don't know what the bounds is on the * source, so just prepare the whole pixmap. XXX: We could * potentially work out where in the source would be sampled based * on the transform, and we don't need do do this for destination * pixmaps at all. */ if (picture->transform) { return glamor_prepare_access_box(picture->pDrawable, access, 0, 0, picture->pDrawable->width, picture->pDrawable->height); } else { return glamor_prepare_access_box(picture->pDrawable, access, x, y, w, h); } } void glamor_finish_access_picture(PicturePtr picture) { if (!picture || !picture->pDrawable) return; glamor_finish_access(picture->pDrawable); } /* * Make a GC ready to use with fb. This just * means making sure the appropriate fill pixmap is * in CPU memory again */ Bool glamor_prepare_access_gc(GCPtr gc) { switch (gc->fillStyle) { case FillTiled: return glamor_prepare_access(&gc->tile.pixmap->drawable, GLAMOR_ACCESS_RO); case FillStippled: case FillOpaqueStippled: return glamor_prepare_access(&gc->stipple->drawable, GLAMOR_ACCESS_RO); } return TRUE; } /* * Free any temporary CPU pixmaps for the GC */ void glamor_finish_access_gc(GCPtr gc) { switch (gc->fillStyle) { case FillTiled: glamor_finish_access(&gc->tile.pixmap->drawable); break; case FillStippled: case FillOpaqueStippled: glamor_finish_access(&gc->stipple->drawable); break; } } xorg-server-21.1.16/glamor/glamor_prepare.h0000644000175000017500000000354414757411105014272 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLAMOR_PREPARE_H_ #define _GLAMOR_PREPARE_H_ Bool glamor_prepare_access(DrawablePtr drawable, glamor_access_t access); Bool glamor_prepare_access_box(DrawablePtr drawable, glamor_access_t access, int x, int y, int w, int h); void glamor_finish_access(DrawablePtr drawable); Bool glamor_prepare_access_picture(PicturePtr picture, glamor_access_t access); Bool glamor_prepare_access_picture_box(PicturePtr picture, glamor_access_t access, int x, int y, int w, int h); void glamor_finish_access_picture(PicturePtr picture); Bool glamor_prepare_access_gc(GCPtr gc); void glamor_finish_access_gc(GCPtr gc); #endif /* _GLAMOR_PREPARE_H_ */ xorg-server-21.1.16/glamor/glamor_program.c0000644000175000017500000005556314757411105014306 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transform.h" #include "glamor_program.h" static Bool use_solid(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { return glamor_set_solid(pixmap, gc, TRUE, prog->fg_uniform); } const glamor_facet glamor_fill_solid = { .name = "solid", .fs_exec = " gl_FragColor = fg;\n", .locations = glamor_program_location_fg, .use = use_solid, }; static Bool use_tile(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { return glamor_set_tiled(pixmap, gc, prog->fill_offset_uniform, prog->fill_size_inv_uniform); } static const glamor_facet glamor_fill_tile = { .name = "tile", .vs_exec = " fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;\n", .fs_exec = " gl_FragColor = texture2D(sampler, fill_pos);\n", .locations = glamor_program_location_fillsamp | glamor_program_location_fillpos, .use = use_tile, }; static Bool use_stipple(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { return glamor_set_stippled(pixmap, gc, prog->fg_uniform, prog->fill_offset_uniform, prog->fill_size_inv_uniform); } static const glamor_facet glamor_fill_stipple = { .name = "stipple", .vs_exec = " fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;\n", .fs_exec = (" float a = texture2D(sampler, fill_pos).w;\n" " if (a == 0.0)\n" " discard;\n" " gl_FragColor = fg;\n"), .locations = glamor_program_location_fg | glamor_program_location_fillsamp | glamor_program_location_fillpos, .use = use_stipple, }; static Bool use_opaque_stipple(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { if (!use_stipple(pixmap, gc, prog, arg)) return FALSE; glamor_set_color(pixmap, gc->bgPixel, prog->bg_uniform); return TRUE; } static const glamor_facet glamor_fill_opaque_stipple = { .name = "opaque_stipple", .vs_exec = " fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;\n", .fs_exec = (" float a = texture2D(sampler, fill_pos).w;\n" " if (a == 0.0)\n" " gl_FragColor = bg;\n" " else\n" " gl_FragColor = fg;\n"), .locations = glamor_program_location_fg | glamor_program_location_bg | glamor_program_location_fillsamp | glamor_program_location_fillpos, .use = use_opaque_stipple }; static const glamor_facet *glamor_facet_fill[4] = { &glamor_fill_solid, &glamor_fill_tile, &glamor_fill_stipple, &glamor_fill_opaque_stipple, }; typedef struct { glamor_program_location location; const char *vs_vars; const char *fs_vars; } glamor_location_var; static glamor_location_var location_vars[] = { { .location = glamor_program_location_fg, .fs_vars = "uniform vec4 fg;\n" }, { .location = glamor_program_location_bg, .fs_vars = "uniform vec4 bg;\n" }, { .location = glamor_program_location_fillsamp, .fs_vars = "uniform sampler2D sampler;\n" }, { .location = glamor_program_location_fillpos, .vs_vars = ("uniform vec2 fill_offset;\n" "uniform vec2 fill_size_inv;\n" "varying vec2 fill_pos;\n"), .fs_vars = ("varying vec2 fill_pos;\n") }, { .location = glamor_program_location_font, .fs_vars = "uniform usampler2D font;\n", }, { .location = glamor_program_location_bitplane, .fs_vars = ("uniform uvec4 bitplane;\n" "uniform vec4 bitmul;\n"), }, { .location = glamor_program_location_dash, .vs_vars = "uniform float dash_length;\n", .fs_vars = "uniform sampler2D dash;\n", }, { .location = glamor_program_location_atlas, .fs_vars = "uniform sampler2D atlas;\n", }, }; static char * add_var(char *cur, const char *add) { char *new; if (!add) return cur; new = realloc(cur, strlen(cur) + strlen(add) + 1); if (!new) { free(cur); return NULL; } strcat(new, add); return new; } static char * vs_location_vars(glamor_program_location locations) { int l; char *vars = strdup(""); for (l = 0; vars && l < ARRAY_SIZE(location_vars); l++) if (locations & location_vars[l].location) vars = add_var(vars, location_vars[l].vs_vars); return vars; } static char * fs_location_vars(glamor_program_location locations) { int l; char *vars = strdup(""); for (l = 0; vars && l < ARRAY_SIZE(location_vars); l++) if (locations & location_vars[l].location) vars = add_var(vars, location_vars[l].fs_vars); return vars; } static const char vs_template[] = "%s" /* version */ "%s" /* exts */ "%s" /* defines */ "%s" /* prim vs_vars */ "%s" /* fill vs_vars */ "%s" /* location vs_vars */ GLAMOR_DECLARE_MATRIX "void main() {\n" "%s" /* prim vs_exec, outputs 'pos' and gl_Position */ "%s" /* fill vs_exec */ "}\n"; static const char fs_template[] = "%s" /* version */ "%s" /* exts */ GLAMOR_DEFAULT_PRECISION "%s" /* defines */ "%s" /* prim fs_vars */ "%s" /* fill fs_vars */ "%s" /* location fs_vars */ "void main() {\n" "%s" /* prim fs_exec */ "%s" /* fill fs_exec */ "%s" /* combine */ "}\n"; static const char * str(const char *s) { if (!s) return ""; return s; } static const glamor_facet facet_null_fill = { .name = "" }; #define DBG 0 static GLint glamor_get_uniform(glamor_program *prog, glamor_program_location location, const char *name) { GLint uniform; if (location && (prog->locations & location) == 0) return -2; uniform = glGetUniformLocation(prog->prog, name); #if DBG ErrorF("%s uniform %d\n", name, uniform); #endif return uniform; } Bool glamor_build_program(ScreenPtr screen, glamor_program *prog, const glamor_facet *prim, const glamor_facet *fill, const char *combine, const char *defines) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_program_location locations = prim->locations; glamor_program_flag flags = prim->flags; int version = prim->version; char *version_string = NULL; char *fs_vars = NULL; char *vs_vars = NULL; char *vs_prog_string = NULL; char *fs_prog_string = NULL; GLint fs_prog, vs_prog; Bool gpu_shader4 = FALSE; if (!fill) fill = &facet_null_fill; locations |= fill->locations; flags |= fill->flags; version = MAX(version, fill->version); if (version > glamor_priv->glsl_version) { if (version == 130 && !glamor_priv->use_gpu_shader4) goto fail; else { version = 120; gpu_shader4 = TRUE; } } vs_vars = vs_location_vars(locations); fs_vars = fs_location_vars(locations); if (!vs_vars) goto fail; if (!fs_vars) goto fail; if (version) { if (asprintf(&version_string, "#version %d\n", version) < 0) version_string = NULL; if (!version_string) goto fail; } if (asprintf(&vs_prog_string, vs_template, str(version_string), gpu_shader4 ? "#extension GL_EXT_gpu_shader4 : require\n" : "", str(defines), str(prim->vs_vars), str(fill->vs_vars), vs_vars, str(prim->vs_exec), str(fill->vs_exec)) < 0) vs_prog_string = NULL; if (asprintf(&fs_prog_string, fs_template, str(version_string), gpu_shader4 ? "#extension GL_EXT_gpu_shader4 : require\n#define texelFetch texelFetch2D\n#define uint unsigned int\n" : "", str(defines), str(prim->fs_vars), str(fill->fs_vars), fs_vars, str(prim->fs_exec), str(fill->fs_exec), str(combine)) < 0) fs_prog_string = NULL; if (!vs_prog_string || !fs_prog_string) goto fail; prog->prog = glCreateProgram(); #if DBG ErrorF("\n\tProgram %d for %s %s\n\tVertex shader:\n\n\t================\n%s\n\n\tFragment Shader:\n\n%s\t================\n", prog->prog, prim->name, fill->name, vs_prog_string, fs_prog_string); #endif prog->flags = flags; prog->locations = locations; prog->prim_use = prim->use; prog->prim_use_render = prim->use_render; prog->fill_use = fill->use; prog->fill_use_render = fill->use_render; vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, vs_prog_string); fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, fs_prog_string); glAttachShader(prog->prog, vs_prog); glDeleteShader(vs_prog); glAttachShader(prog->prog, fs_prog); glDeleteShader(fs_prog); glBindAttribLocation(prog->prog, GLAMOR_VERTEX_POS, "primitive"); if (prim->source_name) { #if DBG ErrorF("Bind GLAMOR_VERTEX_SOURCE to %s\n", prim->source_name); #endif glBindAttribLocation(prog->prog, GLAMOR_VERTEX_SOURCE, prim->source_name); } if (prog->alpha == glamor_program_alpha_dual_blend) { glBindFragDataLocationIndexed(prog->prog, 0, 0, "color0"); glBindFragDataLocationIndexed(prog->prog, 0, 1, "color1"); } glamor_link_glsl_prog(screen, prog->prog, "%s_%s", prim->name, fill->name); prog->matrix_uniform = glamor_get_uniform(prog, glamor_program_location_none, "v_matrix"); prog->fg_uniform = glamor_get_uniform(prog, glamor_program_location_fg, "fg"); prog->bg_uniform = glamor_get_uniform(prog, glamor_program_location_bg, "bg"); prog->fill_offset_uniform = glamor_get_uniform(prog, glamor_program_location_fillpos, "fill_offset"); prog->fill_size_inv_uniform = glamor_get_uniform(prog, glamor_program_location_fillpos, "fill_size_inv"); prog->font_uniform = glamor_get_uniform(prog, glamor_program_location_font, "font"); prog->bitplane_uniform = glamor_get_uniform(prog, glamor_program_location_bitplane, "bitplane"); prog->bitmul_uniform = glamor_get_uniform(prog, glamor_program_location_bitplane, "bitmul"); prog->dash_uniform = glamor_get_uniform(prog, glamor_program_location_dash, "dash"); prog->dash_length_uniform = glamor_get_uniform(prog, glamor_program_location_dash, "dash_length"); prog->atlas_uniform = glamor_get_uniform(prog, glamor_program_location_atlas, "atlas"); free(version_string); free(vs_prog_string); free(fs_prog_string); free(fs_vars); free(vs_vars); return TRUE; fail: prog->failed = 1; if (prog->prog) { glDeleteProgram(prog->prog); prog->prog = 0; } free(vs_prog_string); free(fs_prog_string); free(version_string); free(fs_vars); free(vs_vars); return FALSE; } Bool glamor_use_program(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { glUseProgram(prog->prog); if (prog->prim_use && !prog->prim_use(pixmap, gc, prog, arg)) return FALSE; if (prog->fill_use && !prog->fill_use(pixmap, gc, prog, arg)) return FALSE; return TRUE; } glamor_program * glamor_use_program_fill(PixmapPtr pixmap, GCPtr gc, glamor_program_fill *program_fill, const glamor_facet *prim) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_program *prog = &program_fill->progs[gc->fillStyle]; int fill_style = gc->fillStyle; const glamor_facet *fill; if (prog->failed) return FALSE; if (!prog->prog) { fill = glamor_facet_fill[fill_style]; if (!fill) return NULL; if (!glamor_build_program(screen, prog, prim, fill, NULL, NULL)) return NULL; } if (!glamor_use_program(pixmap, gc, prog, NULL)) return NULL; return prog; } static struct blendinfo composite_op_info[] = { [PictOpClear] = {0, 0, GL_ZERO, GL_ZERO}, [PictOpSrc] = {0, 0, GL_ONE, GL_ZERO}, [PictOpDst] = {0, 0, GL_ZERO, GL_ONE}, [PictOpOver] = {0, 1, GL_ONE, GL_ONE_MINUS_SRC_ALPHA}, [PictOpOverReverse] = {1, 0, GL_ONE_MINUS_DST_ALPHA, GL_ONE}, [PictOpIn] = {1, 0, GL_DST_ALPHA, GL_ZERO}, [PictOpInReverse] = {0, 1, GL_ZERO, GL_SRC_ALPHA}, [PictOpOut] = {1, 0, GL_ONE_MINUS_DST_ALPHA, GL_ZERO}, [PictOpOutReverse] = {0, 1, GL_ZERO, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAtop] = {1, 1, GL_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAtopReverse] = {1, 1, GL_ONE_MINUS_DST_ALPHA, GL_SRC_ALPHA}, [PictOpXor] = {1, 1, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_SRC_ALPHA}, [PictOpAdd] = {0, 0, GL_ONE, GL_ONE}, }; static void glamor_set_blend(CARD8 op, glamor_program_alpha alpha, PicturePtr dst) { glamor_screen_private *glamor_priv = glamor_get_screen_private(dst->pDrawable->pScreen); GLenum src_blend, dst_blend; struct blendinfo *op_info; switch (alpha) { case glamor_program_alpha_ca_first: op = PictOpOutReverse; break; case glamor_program_alpha_ca_second: op = PictOpAdd; break; default: break; } if (!glamor_priv->is_gles) glDisable(GL_COLOR_LOGIC_OP); if (op == PictOpSrc) return; op_info = &composite_op_info[op]; src_blend = op_info->source_blend; dst_blend = op_info->dest_blend; /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ if (PICT_FORMAT_A(dst->format) == 0 && op_info->dest_alpha) { if (src_blend == GL_DST_ALPHA) src_blend = GL_ONE; else if (src_blend == GL_ONE_MINUS_DST_ALPHA) src_blend = GL_ZERO; } /* Set up the source alpha value for blending in component alpha mode. */ if (alpha == glamor_program_alpha_dual_blend) { switch (dst_blend) { case GL_SRC_ALPHA: dst_blend = GL_SRC1_COLOR; break; case GL_ONE_MINUS_SRC_ALPHA: dst_blend = GL_ONE_MINUS_SRC1_COLOR; break; } } else if (alpha != glamor_program_alpha_normal) { switch (dst_blend) { case GL_SRC_ALPHA: dst_blend = GL_SRC_COLOR; break; case GL_ONE_MINUS_SRC_ALPHA: dst_blend = GL_ONE_MINUS_SRC_COLOR; break; } } glEnable(GL_BLEND); glBlendFunc(src_blend, dst_blend); } static Bool use_source_solid(CARD8 op, PicturePtr src, PicturePtr dst, glamor_program *prog) { PictSolidFill *solid = &src->pSourcePict->solidFill; float color[4]; glamor_get_rgba_from_color(&solid->fullcolor, color); glamor_set_blend(op, prog->alpha, dst); glUniform4fv(prog->fg_uniform, 1, color); return TRUE; } static const glamor_facet glamor_source_solid = { .name = "render_solid", .fs_exec = " vec4 source = fg;\n", .locations = glamor_program_location_fg, .use_render = use_source_solid, }; static Bool use_source_picture(CARD8 op, PicturePtr src, PicturePtr dst, glamor_program *prog) { glamor_set_blend(op, prog->alpha, dst); return glamor_set_texture((PixmapPtr) src->pDrawable, glamor_picture_red_is_alpha(dst), 0, 0, prog->fill_offset_uniform, prog->fill_size_inv_uniform); } static const glamor_facet glamor_source_picture = { .name = "render_picture", .vs_exec = " fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;\n", .fs_exec = " vec4 source = texture2D(sampler, fill_pos);\n", .locations = glamor_program_location_fillsamp | glamor_program_location_fillpos, .use_render = use_source_picture, }; static Bool use_source_1x1_picture(CARD8 op, PicturePtr src, PicturePtr dst, glamor_program *prog) { glamor_set_blend(op, prog->alpha, dst); return glamor_set_texture_pixmap((PixmapPtr) src->pDrawable, glamor_picture_red_is_alpha(dst)); } static const glamor_facet glamor_source_1x1_picture = { .name = "render_picture", .fs_exec = " vec4 source = texture2D(sampler, vec2(0.5));\n", .locations = glamor_program_location_fillsamp, .use_render = use_source_1x1_picture, }; static const glamor_facet *glamor_facet_source[glamor_program_source_count] = { [glamor_program_source_solid] = &glamor_source_solid, [glamor_program_source_picture] = &glamor_source_picture, [glamor_program_source_1x1_picture] = &glamor_source_1x1_picture, }; static const char *glamor_combine[] = { [glamor_program_alpha_normal] = " gl_FragColor = source * mask.a;\n", [glamor_program_alpha_ca_first] = " gl_FragColor = source.a * mask;\n", [glamor_program_alpha_ca_second] = " gl_FragColor = source * mask;\n", [glamor_program_alpha_dual_blend] = " color0 = source * mask;\n" " color1 = source.a * mask;\n" }; static Bool glamor_setup_one_program_render(ScreenPtr screen, glamor_program *prog, glamor_program_source source_type, glamor_program_alpha alpha, const glamor_facet *prim, const char *defines) { if (prog->failed) return FALSE; if (!prog->prog) { const glamor_facet *fill = glamor_facet_source[source_type]; if (!fill) return FALSE; prog->alpha = alpha; if (!glamor_build_program(screen, prog, prim, fill, glamor_combine[alpha], defines)) return FALSE; } return TRUE; } glamor_program * glamor_setup_program_render(CARD8 op, PicturePtr src, PicturePtr mask, PicturePtr dst, glamor_program_render *program_render, const glamor_facet *prim, const char *defines) { ScreenPtr screen = dst->pDrawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_program_alpha alpha; glamor_program_source source_type; glamor_program *prog; if (op > ARRAY_SIZE(composite_op_info)) return NULL; if (glamor_is_component_alpha(mask)) { if (glamor_priv->has_dual_blend) { alpha = glamor_program_alpha_dual_blend; } else { /* This only works for PictOpOver */ if (op != PictOpOver) return NULL; alpha = glamor_program_alpha_ca_first; } } else alpha = glamor_program_alpha_normal; if (src->pDrawable) { /* Can't do transforms, alphamaps or sourcing from non-pixmaps yet */ if (src->transform || src->alphaMap || src->pDrawable->type != DRAWABLE_PIXMAP) return NULL; if (src->pDrawable->width == 1 && src->pDrawable->height == 1 && src->repeat) source_type = glamor_program_source_1x1_picture; else source_type = glamor_program_source_picture; } else { SourcePictPtr sp = src->pSourcePict; if (!sp) return NULL; switch (sp->type) { case SourcePictTypeSolidFill: source_type = glamor_program_source_solid; break; default: return NULL; } } prog = &program_render->progs[source_type][alpha]; if (!glamor_setup_one_program_render(screen, prog, source_type, alpha, prim, defines)) return NULL; if (alpha == glamor_program_alpha_ca_first) { /* Make sure we can also build the second program before * deciding to use this path. */ if (!glamor_setup_one_program_render(screen, &program_render->progs[source_type][glamor_program_alpha_ca_second], source_type, glamor_program_alpha_ca_second, prim, defines)) return NULL; } return prog; } Bool glamor_use_program_render(glamor_program *prog, CARD8 op, PicturePtr src, PicturePtr dst) { glUseProgram(prog->prog); if (prog->prim_use_render && !prog->prim_use_render(op, src, dst, prog)) return FALSE; if (prog->fill_use_render && !prog->fill_use_render(op, src, dst, prog)) return FALSE; return TRUE; } xorg-server-21.1.16/glamor/glamor_program.h0000644000175000017500000001327014757411105014300 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLAMOR_PROGRAM_H_ #define _GLAMOR_PROGRAM_H_ typedef enum { glamor_program_location_none = 0, glamor_program_location_fg = 1, glamor_program_location_bg = 2, glamor_program_location_fillsamp = 4, glamor_program_location_fillpos = 8, glamor_program_location_font = 16, glamor_program_location_bitplane = 32, glamor_program_location_dash = 64, glamor_program_location_atlas = 128, } glamor_program_location; typedef enum { glamor_program_flag_none = 0, } glamor_program_flag; typedef enum { glamor_program_alpha_normal, glamor_program_alpha_ca_first, glamor_program_alpha_ca_second, glamor_program_alpha_dual_blend, glamor_program_alpha_count } glamor_program_alpha; typedef struct _glamor_program glamor_program; typedef Bool (*glamor_use) (PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg); typedef Bool (*glamor_use_render) (CARD8 op, PicturePtr src, PicturePtr dst, glamor_program *prog); typedef struct { const char *name; const int version; char *vs_defines; char *fs_defines; const char *vs_vars; const char *vs_exec; const char *fs_vars; const char *fs_exec; const glamor_program_location locations; const glamor_program_flag flags; const char *source_name; glamor_use use; glamor_use_render use_render; } glamor_facet; struct _glamor_program { GLint prog; GLint failed; GLint matrix_uniform; GLint fg_uniform; GLint bg_uniform; GLint fill_size_inv_uniform; GLint fill_offset_uniform; GLint font_uniform; GLint bitplane_uniform; GLint bitmul_uniform; GLint dash_uniform; GLint dash_length_uniform; GLint atlas_uniform; glamor_program_location locations; glamor_program_flag flags; glamor_use prim_use; glamor_use fill_use; glamor_program_alpha alpha; glamor_use_render prim_use_render; glamor_use_render fill_use_render; }; typedef struct { glamor_program progs[4]; } glamor_program_fill; extern const glamor_facet glamor_fill_solid; Bool glamor_build_program(ScreenPtr screen, glamor_program *prog, const glamor_facet *prim, const glamor_facet *fill, const char *combine, const char *defines); Bool glamor_use_program(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg); glamor_program * glamor_use_program_fill(PixmapPtr pixmap, GCPtr gc, glamor_program_fill *program_fill, const glamor_facet *prim); typedef enum { glamor_program_source_solid, glamor_program_source_picture, glamor_program_source_1x1_picture, glamor_program_source_count, } glamor_program_source; typedef struct { glamor_program progs[glamor_program_source_count][glamor_program_alpha_count]; } glamor_program_render; static inline Bool glamor_is_component_alpha(PicturePtr mask) { if (mask && mask->componentAlpha && PICT_FORMAT_RGB(mask->format)) return TRUE; return FALSE; } glamor_program * glamor_setup_program_render(CARD8 op, PicturePtr src, PicturePtr mask, PicturePtr dst, glamor_program_render *program_render, const glamor_facet *prim, const char *defines); Bool glamor_use_program_render(glamor_program *prog, CARD8 op, PicturePtr src, PicturePtr dst); #endif /* _GLAMOR_PROGRAM_H_ */ xorg-server-21.1.16/glamor/glamor_rects.c0000644000175000017500000001574314757411105013753 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_program.h" #include "glamor_transform.h" static const glamor_facet glamor_facet_polyfillrect_130 = { .name = "poly_fill_rect", .version = 130, .source_name = "size", .vs_vars = "attribute vec2 primitive;\n" "attribute vec2 size;\n", .vs_exec = (" vec2 pos = size * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n" GLAMOR_POS(gl_Position, (primitive.xy + pos))), }; static const glamor_facet glamor_facet_polyfillrect_120 = { .name = "poly_fill_rect", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0,0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; static Bool glamor_poly_fill_rect_gl(DrawablePtr drawable, GCPtr gc, int nrect, xRectangle *prect) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; glamor_program *prog; int off_x, off_y; GLshort *v; char *vbo_offset; int box_index; Bool ret = FALSE; BoxRec bounds = glamor_no_rendering_bounds(); pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); if (nrect < 100) { bounds = glamor_start_rendering_bounds(); for (int i = 0; i < nrect; i++) glamor_bounds_union_rect(&bounds, &prect[i]); } if (glamor_glsl_has_ints(glamor_priv)) { prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_fill_rect_program, &glamor_facet_polyfillrect_130); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, nrect * sizeof (xRectangle), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 4 * sizeof (short), vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 1); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_UNSIGNED_SHORT, GL_FALSE, 4 * sizeof (short), vbo_offset + 2 * sizeof (short)); memcpy(v, prect, nrect * sizeof (xRectangle)); glamor_put_vbo_space(screen); } else { int n; prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_fill_rect_program, &glamor_facet_polyfillrect_120); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, nrect * 8 * sizeof (short), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 2 * sizeof (short), vbo_offset); for (n = 0; n < nrect; n++) { v[0] = prect->x; v[1] = prect->y; v[2] = prect->x; v[3] = prect->y + prect->height; v[4] = prect->x + prect->width; v[5] = prect->y + prect->height; v[6] = prect->x + prect->width; v[7] = prect->y; prect++; v += 8; } glamor_put_vbo_space(screen); } glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); if (!glamor_set_destination_drawable(drawable, box_index, TRUE, FALSE, prog->matrix_uniform, &off_x, &off_y)) goto bail; while (nbox--) { BoxRec scissor = { .x1 = max(box->x1, bounds.x1 + drawable->x), .y1 = max(box->y1, bounds.y1 + drawable->y), .x2 = min(box->x2, bounds.x2 + drawable->x), .y2 = min(box->y2, bounds.y2 + drawable->y), }; box++; if (scissor.x1 >= scissor.x2 || scissor.y1 >= scissor.y2) continue; glScissor(scissor.x1 + off_x, scissor.y1 + off_y, scissor.x2 - scissor.x1, scissor.y2 - scissor.y1); if (glamor_glsl_has_ints(glamor_priv)) glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, nrect); else { glamor_glDrawArrays_GL_QUADS(glamor_priv, nrect); } } } ret = TRUE; bail: glDisable(GL_SCISSOR_TEST); if (glamor_glsl_has_ints(glamor_priv)) { glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0); } glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } static void glamor_poly_fill_rect_bail(DrawablePtr drawable, GCPtr gc, int nrect, xRectangle *prect) { glamor_fallback("to %p (%c)\n", drawable, glamor_get_drawable_location(drawable)); if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) && glamor_prepare_access_gc(gc)) { fbPolyFillRect(drawable, gc, nrect, prect); } glamor_finish_access_gc(gc); glamor_finish_access(drawable); } void glamor_poly_fill_rect(DrawablePtr drawable, GCPtr gc, int nrect, xRectangle *prect) { if (glamor_poly_fill_rect_gl(drawable, gc, nrect, prect)) return; glamor_poly_fill_rect_bail(drawable, gc, nrect, prect); } xorg-server-21.1.16/glamor/glamor_spans.c0000644000175000017500000003002514757411105013745 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transform.h" #include "glamor_transfer.h" glamor_program fill_spans_progs[4]; static const glamor_facet glamor_facet_fillspans_130 = { .name = "fill_spans", .version = 130, .vs_vars = "attribute vec3 primitive;\n", .vs_exec = (" vec2 pos = vec2(primitive.z,1) * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n" GLAMOR_POS(gl_Position, (primitive.xy + pos))), }; static const glamor_facet glamor_facet_fillspans_120 = { .name = "fill_spans", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0,0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; static Bool glamor_fill_spans_gl(DrawablePtr drawable, GCPtr gc, int n, DDXPointPtr points, int *widths, int sorted) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; glamor_program *prog; int off_x, off_y; GLshort *v; char *vbo_offset; int c; int box_index; Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); if (glamor_glsl_has_ints(glamor_priv)) { prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->fill_spans_program, &glamor_facet_fillspans_130); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, n * (4 * sizeof (GLshort)), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1); glVertexAttribPointer(GLAMOR_VERTEX_POS, 3, GL_SHORT, GL_FALSE, 4 * sizeof (GLshort), vbo_offset); for (c = 0; c < n; c++) { v[0] = points->x; v[1] = points->y; v[2] = *widths++; points++; v += 4; } glamor_put_vbo_space(screen); } else { prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->fill_spans_program, &glamor_facet_fillspans_120); if (!prog) goto bail; /* Set up the vertex buffers for the points */ v = glamor_get_vbo_space(drawable->pScreen, n * 8 * sizeof (short), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 2 * sizeof (short), vbo_offset); for (c = 0; c < n; c++) { v[0] = points->x; v[1] = points->y; v[2] = points->x; v[3] = points->y + 1; v[4] = points->x + *widths; v[5] = points->y + 1; v[6] = points->x + *widths; v[7] = points->y; widths++; points++; v += 8; } glamor_put_vbo_space(screen); } glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); if (!glamor_set_destination_drawable(drawable, box_index, FALSE, FALSE, prog->matrix_uniform, &off_x, &off_y)) goto bail; while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; if (glamor_glsl_has_ints(glamor_priv)) glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, n); else { glamor_glDrawArrays_GL_QUADS(glamor_priv, n); } } } ret = TRUE; bail: glDisable(GL_SCISSOR_TEST); if (glamor_glsl_has_ints(glamor_priv)) glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } static void glamor_fill_spans_bail(DrawablePtr drawable, GCPtr gc, int n, DDXPointPtr points, int *widths, int sorted) { if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) && glamor_prepare_access_gc(gc)) { fbFillSpans(drawable, gc, n, points, widths, sorted); } glamor_finish_access_gc(gc); glamor_finish_access(drawable); } void glamor_fill_spans(DrawablePtr drawable, GCPtr gc, int n, DDXPointPtr points, int *widths, int sorted) { if (glamor_fill_spans_gl(drawable, gc, n, points, widths, sorted)) return; glamor_fill_spans_bail(drawable, gc, n, points, widths, sorted); } static Bool glamor_get_spans_gl(DrawablePtr drawable, int wmax, DDXPointPtr points, int *widths, int count, char *dst) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; int box_index; int n; char *d; int off_x, off_y; const struct glamor_format *f = glamor_format_for_pixmap(pixmap); pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); glamor_make_current(glamor_priv); glamor_pixmap_loop(pixmap_priv, box_index) { BoxPtr box = glamor_pixmap_box_at(pixmap_priv, box_index); glamor_pixmap_fbo *fbo = glamor_pixmap_fbo_at(pixmap_priv, box_index); glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb); glPixelStorei(GL_PACK_ALIGNMENT, 4); d = dst; for (n = 0; n < count; n++) { int x1 = points[n].x + off_x; int y = points[n].y + off_y; int w = widths[n]; int x2 = x1 + w; char *l; l = d; d += PixmapBytePad(w, drawable->depth); /* clip */ if (x1 < box->x1) { l += (box->x1 - x1) * (drawable->bitsPerPixel >> 3); x1 = box->x1; } if (x2 > box->x2) x2 = box->x2; if (x1 >= x2) continue; if (y < box->y1) continue; if (y >= box->y2) continue; glReadPixels(x1 - box->x1, y - box->y1, x2 - x1, 1, f->format, f->type, l); } } return TRUE; bail: return FALSE; } static void glamor_get_spans_bail(DrawablePtr drawable, int wmax, DDXPointPtr points, int *widths, int count, char *dst) { if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RO)) fbGetSpans(drawable, wmax, points, widths, count, dst); glamor_finish_access(drawable); } void glamor_get_spans(DrawablePtr drawable, int wmax, DDXPointPtr points, int *widths, int count, char *dst) { if (glamor_get_spans_gl(drawable, wmax, points, widths, count, dst)) return; glamor_get_spans_bail(drawable, wmax, points, widths, count, dst); } static Bool glamor_set_spans_gl(DrawablePtr drawable, GCPtr gc, char *src, DDXPointPtr points, int *widths, int numPoints, int sorted) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; const struct glamor_format *f = glamor_format_for_pixmap(pixmap); int box_index; int n; char *s; int off_x, off_y; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; if (gc->alu != GXcopy) goto bail; if (!glamor_pm_is_solid(gc->depth, gc->planemask)) goto bail; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); glamor_make_current(glamor_priv); glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glamor_pixmap_loop(pixmap_priv, box_index) { BoxPtr box = glamor_pixmap_box_at(pixmap_priv, box_index); glamor_pixmap_fbo *fbo = glamor_pixmap_fbo_at(pixmap_priv, box_index); glamor_bind_texture(glamor_priv, GL_TEXTURE0, fbo, TRUE); s = src; for (n = 0; n < numPoints; n++) { BoxPtr clip_box = RegionRects(gc->pCompositeClip); int nclip_box = RegionNumRects(gc->pCompositeClip); int w = widths[n]; int y = points[n].y; int x = points[n].x; while (nclip_box--) { int x1 = x; int x2 = x + w; int y1 = y; char *l = s; /* clip to composite clip */ if (x1 < clip_box->x1) { l += (clip_box->x1 - x1) * (drawable->bitsPerPixel >> 3); x1 = clip_box->x1; } if (x2 > clip_box->x2) x2 = clip_box->x2; if (y < clip_box->y1) continue; if (y >= clip_box->y2) continue; /* adjust to pixmap coordinates */ x1 += off_x; x2 += off_x; y1 += off_y; if (x1 < box->x1) { l += (box->x1 - x1) * (drawable->bitsPerPixel >> 3); x1 = box->x1; } if (x2 > box->x2) x2 = box->x2; if (x1 >= x2) continue; if (y1 < box->y1) continue; if (y1 >= box->y2) continue; glTexSubImage2D(GL_TEXTURE_2D, 0, x1 - box->x1, y1 - box->y1, x2 - x1, 1, f->format, f->type, l); } s += PixmapBytePad(w, drawable->depth); } } return TRUE; bail: return FALSE; } static void glamor_set_spans_bail(DrawablePtr drawable, GCPtr gc, char *src, DDXPointPtr points, int *widths, int numPoints, int sorted) { if (glamor_prepare_access(drawable, GLAMOR_ACCESS_RW) && glamor_prepare_access_gc(gc)) fbSetSpans(drawable, gc, src, points, widths, numPoints, sorted); glamor_finish_access_gc(gc); glamor_finish_access(drawable); } void glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src, DDXPointPtr points, int *widths, int numPoints, int sorted) { if (glamor_set_spans_gl(drawable, gc, src, points, widths, numPoints, sorted)) return; glamor_set_spans_bail(drawable, gc, src, points, widths, numPoints, sorted); } xorg-server-21.1.16/glamor/glamor_text.c0000644000175000017500000003764114757411105013620 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include #include "glamor_transform.h" /* * Fill in the array of charinfo pointers for the provided characters. For * missing characters, place a NULL in the array so that the charinfo array * aligns exactly with chars */ static void glamor_get_glyphs(FontPtr font, glamor_font_t *glamor_font, int count, char *chars, Bool sixteen, CharInfoPtr *charinfo) { unsigned long nglyphs; FontEncoding encoding; int char_step; int c; if (sixteen) { char_step = 2; if (FONTLASTROW(font) == 0) encoding = Linear16Bit; else encoding = TwoD16Bit; } else { char_step = 1; encoding = Linear8Bit; } /* If the font has a default character, then we shouldn't have to * worry about missing glyphs, so just get the whole string all at * once. Otherwise, we have to fetch chars one at a time to notice * missing ones. */ if (glamor_font->default_char) { GetGlyphs(font, (unsigned long) count, (unsigned char *) chars, encoding, &nglyphs, charinfo); /* Make sure it worked. There's a bug in libXfont through * version 1.4.7 which would cause it to fail when the font is * a 2D font without a first row, and the application sends a * 1-d request. In this case, libXfont would return zero * glyphs, even when the font had a default character. * * It's easy enough for us to work around that bug here by * simply checking the returned nglyphs and falling through to * the one-at-a-time code below. Not doing this check would * result in uninitialized memory accesses in the rendering code. */ if (nglyphs == count) return; } for (c = 0; c < count; c++) { GetGlyphs(font, 1, (unsigned char *) chars, encoding, &nglyphs, &charinfo[c]); if (!nglyphs) charinfo[c] = NULL; chars += char_step; } } /* * Construct quads for the provided list of characters and draw them */ static int glamor_text(DrawablePtr drawable, GCPtr gc, glamor_font_t *glamor_font, glamor_program *prog, int x, int y, int count, char *s_chars, CharInfoPtr *charinfo, Bool sixteen) { unsigned char *chars = (unsigned char *) s_chars; FontPtr font = gc->font; int off_x, off_y; int c; int nglyph; GLshort *v; char *vbo_offset; CharInfoPtr ci; int firstRow = font->info.firstRow; int firstCol = font->info.firstCol; int glyph_spacing_x = glamor_font->glyph_width_bytes * 8; int glyph_spacing_y = glamor_font->glyph_height; int box_index; PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); /* Set the font as texture 1 */ glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, glamor_font->texture_id); glUniform1i(prog->font_uniform, 1); /* Set up the vertex buffers for the font and destination */ v = glamor_get_vbo_space(drawable->pScreen, count * (6 * sizeof (GLshort)), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 1); glVertexAttribPointer(GLAMOR_VERTEX_POS, 4, GL_SHORT, GL_FALSE, 6 * sizeof (GLshort), vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 1); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_SHORT, GL_FALSE, 6 * sizeof (GLshort), vbo_offset + 4 * sizeof (GLshort)); /* Set the vertex coordinates */ nglyph = 0; for (c = 0; c < count; c++) { if ((ci = *charinfo++)) { int x1 = x + ci->metrics.leftSideBearing; int y1 = y - ci->metrics.ascent; int width = GLYPHWIDTHPIXELS(ci); int height = GLYPHHEIGHTPIXELS(ci); int tx, ty = 0; int row = 0, col; int second_row = 0; x += ci->metrics.characterWidth; if (sixteen) { if (ci == glamor_font->default_char) { row = glamor_font->default_row; col = glamor_font->default_col; } else { row = chars[0]; col = chars[1]; } if (FONTLASTROW(font) != 0) { ty = ((row - firstRow) / 2) * glyph_spacing_y; second_row = (row - firstRow) & 1; } else col += row << 8; } else { if (ci == glamor_font->default_char) col = glamor_font->default_col; else col = chars[0]; } tx = (col - firstCol) * glyph_spacing_x; /* adjust for second row layout */ tx += second_row * glamor_font->row_width * 8; v[ 0] = x1; v[ 1] = y1; v[ 2] = width; v[ 3] = height; v[ 4] = tx; v[ 5] = ty; v += 6; nglyph++; } chars += 1 + sixteen; } glamor_put_vbo_space(drawable->pScreen); if (nglyph != 0) { glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { BoxPtr box = RegionRects(gc->pCompositeClip); int nbox = RegionNumRects(gc->pCompositeClip); glamor_set_destination_drawable(drawable, box_index, TRUE, FALSE, prog->matrix_uniform, &off_x, &off_y); /* Run over the clip list, drawing the glyphs * in each box */ while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; glDrawArraysInstanced(GL_TRIANGLE_STRIP, 0, 4, nglyph); } } glDisable(GL_SCISSOR_TEST); } glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return x; } static const char vs_vars_text[] = "attribute vec4 primitive;\n" "attribute vec2 source;\n" "varying vec2 glyph_pos;\n"; static const char vs_exec_text[] = " vec2 pos = primitive.zw * vec2(gl_VertexID&1, (gl_VertexID&2)>>1);\n" GLAMOR_POS(gl_Position, (primitive.xy + pos)) " glyph_pos = source + pos;\n"; static const char fs_vars_text[] = "varying vec2 glyph_pos;\n"; static const char fs_exec_text[] = " ivec2 itile_texture = ivec2(glyph_pos);\n" #if BITMAP_BIT_ORDER == MSBFirst " uint x = uint(7) - uint(itile_texture.x & 7);\n" #else " uint x = uint(itile_texture.x & 7);\n" #endif " itile_texture.x >>= 3;\n" " uint texel = texelFetch(font, itile_texture, 0).x;\n" " uint bit = (texel >> x) & uint(1);\n" " if (bit == uint(0))\n" " discard;\n"; static const char fs_exec_te[] = " ivec2 itile_texture = ivec2(glyph_pos);\n" #if BITMAP_BIT_ORDER == MSBFirst " uint x = uint(7) - uint(itile_texture.x & 7);\n" #else " uint x = uint(itile_texture.x & 7);\n" #endif " itile_texture.x >>= 3;\n" " uint texel = texelFetch(font, itile_texture, 0).x;\n" " uint bit = (texel >> x) & uint(1);\n" " if (bit == uint(0))\n" " gl_FragColor = bg;\n" " else\n" " gl_FragColor = fg;\n"; static const glamor_facet glamor_facet_poly_text = { .name = "poly_text", .version = 130, .vs_vars = vs_vars_text, .vs_exec = vs_exec_text, .fs_vars = fs_vars_text, .fs_exec = fs_exec_text, .source_name = "source", .locations = glamor_program_location_font, }; static Bool glamor_poly_text(DrawablePtr drawable, GCPtr gc, int x, int y, int count, char *chars, Bool sixteen, int *final_pos) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_program *prog; glamor_pixmap_private *pixmap_priv; glamor_font_t *glamor_font; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ glamor_font = glamor_font_get(drawable->pScreen, gc->font); if (!glamor_font) goto bail; glamor_get_glyphs(gc->font, glamor_font, count, chars, sixteen, charinfo); pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_text_progs, &glamor_facet_poly_text); if (!prog) goto bail; x = glamor_text(drawable, gc, glamor_font, prog, x, y, count, chars, charinfo, sixteen); *final_pos = x; return TRUE; bail: return FALSE; } int glamor_poly_text8(DrawablePtr drawable, GCPtr gc, int x, int y, int count, char *chars) { int final_pos; if (glamor_poly_text(drawable, gc, x, y, count, chars, FALSE, &final_pos)) return final_pos; return miPolyText8(drawable, gc, x, y, count, chars); } int glamor_poly_text16(DrawablePtr drawable, GCPtr gc, int x, int y, int count, unsigned short *chars) { int final_pos; if (glamor_poly_text(drawable, gc, x, y, count, (char *) chars, TRUE, &final_pos)) return final_pos; return miPolyText16(drawable, gc, x, y, count, chars); } /* * Draw image text, which is always solid in copy mode and has the * background cleared while painting the text. For fonts which have * their bitmap metrics exactly equal to the area to clear, we can use * the accelerated version which paints both fg and bg at the same * time. Otherwise, clear the whole area and then paint the glyphs on * top */ static const glamor_facet glamor_facet_image_text = { .name = "image_text", .version = 130, .vs_vars = vs_vars_text, .vs_exec = vs_exec_text, .fs_vars = fs_vars_text, .fs_exec = fs_exec_text, .source_name = "source", .locations = glamor_program_location_font, }; static Bool use_image_solid(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { return glamor_set_solid(pixmap, gc, FALSE, prog->fg_uniform); } static const glamor_facet glamor_facet_image_fill = { .name = "solid", .fs_exec = " gl_FragColor = fg;\n", .locations = glamor_program_location_fg, .use = use_image_solid, }; static Bool glamor_te_text_use(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg) { if (!glamor_set_solid(pixmap, gc, FALSE, prog->fg_uniform)) return FALSE; glamor_set_color(pixmap, gc->bgPixel, prog->bg_uniform); return TRUE; } static const glamor_facet glamor_facet_te_text = { .name = "te_text", .version = 130, .vs_vars = vs_vars_text, .vs_exec = vs_exec_text, .fs_vars = fs_vars_text, .fs_exec = fs_exec_te, .locations = glamor_program_location_fg | glamor_program_location_bg | glamor_program_location_font, .source_name = "source", .use = glamor_te_text_use, }; static Bool glamor_image_text(DrawablePtr drawable, GCPtr gc, int x, int y, int count, char *chars, Bool sixteen) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_program *prog; glamor_pixmap_private *pixmap_priv; glamor_font_t *glamor_font; const glamor_facet *prim_facet; const glamor_facet *fill_facet; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) return FALSE; glamor_font = glamor_font_get(drawable->pScreen, gc->font); if (!glamor_font) return FALSE; glamor_get_glyphs(gc->font, glamor_font, count, chars, sixteen, charinfo); glamor_make_current(glamor_priv); if (TERMINALFONT(gc->font)) prog = &glamor_priv->te_text_prog; else prog = &glamor_priv->image_text_prog; if (prog->failed) goto bail; if (!prog->prog) { if (TERMINALFONT(gc->font)) { prim_facet = &glamor_facet_te_text; fill_facet = NULL; } else { prim_facet = &glamor_facet_image_text; fill_facet = &glamor_facet_image_fill; } if (!glamor_build_program(screen, prog, prim_facet, fill_facet, NULL, NULL)) goto bail; } if (!TERMINALFONT(gc->font)) { int width = 0; int c; RegionRec region; BoxRec box; int off_x, off_y; /* Check planemask before drawing background to * bail early if it's not OK */ if (!glamor_set_planemask(gc->depth, gc->planemask)) goto bail; for (c = 0; c < count; c++) if (charinfo[c]) width += charinfo[c]->metrics.characterWidth; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); if (width >= 0) { box.x1 = drawable->x + x; box.x2 = drawable->x + x + width; } else { box.x1 = drawable->x + x + width; box.x2 = drawable->x + x; } box.y1 = drawable->y + y - gc->font->info.fontAscent; box.y2 = drawable->y + y + gc->font->info.fontDescent; RegionInit(®ion, &box, 1); RegionIntersect(®ion, ®ion, gc->pCompositeClip); RegionTranslate(®ion, off_x, off_y); glamor_solid_boxes(pixmap, RegionRects(®ion), RegionNumRects(®ion), gc->bgPixel); RegionUninit(®ion); } if (!glamor_use_program(pixmap, gc, prog, NULL)) goto bail; (void) glamor_text(drawable, gc, glamor_font, prog, x, y, count, chars, charinfo, sixteen); return TRUE; bail: return FALSE; } void glamor_image_text8(DrawablePtr drawable, GCPtr gc, int x, int y, int count, char *chars) { if (!glamor_image_text(drawable, gc, x, y, count, chars, FALSE)) miImageText8(drawable, gc, x, y, count, chars); } void glamor_image_text16(DrawablePtr drawable, GCPtr gc, int x, int y, int count, unsigned short *chars) { if (!glamor_image_text(drawable, gc, x, y, count, (char *) chars, TRUE)) miImageText16(drawable, gc, x, y, count, chars); } xorg-server-21.1.16/glamor/glamor_transfer.c0000644000175000017500000001706014757411105014451 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transfer.h" /* * Write a region of bits into a pixmap */ void glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox, int dx_src, int dy_src, int dx_dst, int dy_dst, uint8_t *bits, uint32_t byte_stride) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); int box_index; int bytes_per_pixel = pixmap->drawable.bitsPerPixel >> 3; const struct glamor_format *f = glamor_format_for_pixmap(pixmap); glamor_make_current(glamor_priv); glPixelStorei(GL_UNPACK_ALIGNMENT, 4); if (glamor_priv->has_unpack_subimage) glPixelStorei(GL_UNPACK_ROW_LENGTH, byte_stride / bytes_per_pixel); glamor_pixmap_loop(priv, box_index) { BoxPtr box = glamor_pixmap_box_at(priv, box_index); glamor_pixmap_fbo *fbo = glamor_pixmap_fbo_at(priv, box_index); BoxPtr boxes = in_boxes; int nbox = in_nbox; glamor_bind_texture(glamor_priv, GL_TEXTURE0, fbo, TRUE); while (nbox--) { /* compute drawable coordinates */ int x1 = MAX(boxes->x1 + dx_dst, box->x1); int x2 = MIN(boxes->x2 + dx_dst, box->x2); int y1 = MAX(boxes->y1 + dy_dst, box->y1); int y2 = MIN(boxes->y2 + dy_dst, box->y2); size_t ofs = (y1 - dy_dst + dy_src) * byte_stride; ofs += (x1 - dx_dst + dx_src) * bytes_per_pixel; boxes++; if (x2 <= x1 || y2 <= y1) continue; if (glamor_priv->has_unpack_subimage || x2 - x1 == byte_stride / bytes_per_pixel) { glTexSubImage2D(GL_TEXTURE_2D, 0, x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, f->format, f->type, bits + ofs); } else { for (; y1 < y2; y1++, ofs += byte_stride) glTexSubImage2D(GL_TEXTURE_2D, 0, x1 - box->x1, y1 - box->y1, x2 - x1, 1, f->format, f->type, bits + ofs); } } } if (glamor_priv->has_unpack_subimage) glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); } /* * Upload a region of data */ void glamor_upload_region(PixmapPtr pixmap, RegionPtr region, int region_x, int region_y, uint8_t *bits, uint32_t byte_stride) { glamor_upload_boxes(pixmap, RegionRects(region), RegionNumRects(region), -region_x, -region_y, 0, 0, bits, byte_stride); } /* * Take the data in the pixmap and stuff it back into the FBO */ void glamor_upload_pixmap(PixmapPtr pixmap) { BoxRec box; box.x1 = 0; box.x2 = pixmap->drawable.width; box.y1 = 0; box.y2 = pixmap->drawable.height; glamor_upload_boxes(pixmap, &box, 1, 0, 0, 0, 0, pixmap->devPrivate.ptr, pixmap->devKind); } /* * Read stuff from the pixmap FBOs and write to memory */ void glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox, int dx_src, int dy_src, int dx_dst, int dy_dst, uint8_t *bits, uint32_t byte_stride) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); int box_index; int bytes_per_pixel = pixmap->drawable.bitsPerPixel >> 3; const struct glamor_format *f = glamor_format_for_pixmap(pixmap); glamor_make_current(glamor_priv); glPixelStorei(GL_PACK_ALIGNMENT, 4); if (glamor_priv->has_pack_subimage) glPixelStorei(GL_PACK_ROW_LENGTH, byte_stride / bytes_per_pixel); glamor_pixmap_loop(priv, box_index) { BoxPtr box = glamor_pixmap_box_at(priv, box_index); glamor_pixmap_fbo *fbo = glamor_pixmap_fbo_at(priv, box_index); BoxPtr boxes = in_boxes; int nbox = in_nbox; /* This should not be called on GLAMOR_FBO_NO_FBO-allocated pixmaps. */ assert(fbo->fb); glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb); while (nbox--) { /* compute drawable coordinates */ int x1 = MAX(boxes->x1 + dx_src, box->x1); int x2 = MIN(boxes->x2 + dx_src, box->x2); int y1 = MAX(boxes->y1 + dy_src, box->y1); int y2 = MIN(boxes->y2 + dy_src, box->y2); size_t ofs = (y1 - dy_src + dy_dst) * byte_stride; ofs += (x1 - dx_src + dx_dst) * bytes_per_pixel; boxes++; if (x2 <= x1 || y2 <= y1) continue; if (glamor_priv->has_pack_subimage || x2 - x1 == byte_stride / bytes_per_pixel) { glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, y2 - y1, f->format, f->type, bits + ofs); } else { for (; y1 < y2; y1++, ofs += byte_stride) glReadPixels(x1 - box->x1, y1 - box->y1, x2 - x1, 1, f->format, f->type, bits + ofs); } } } if (glamor_priv->has_pack_subimage) glPixelStorei(GL_PACK_ROW_LENGTH, 0); } /* * Read data from the pixmap FBO */ void glamor_download_rect(PixmapPtr pixmap, int x, int y, int w, int h, uint8_t *bits) { BoxRec box; box.x1 = x; box.x2 = x + w; box.y1 = y; box.y2 = y + h; glamor_download_boxes(pixmap, &box, 1, 0, 0, -x, -y, bits, PixmapBytePad(w, pixmap->drawable.depth)); } /* * Pull the data from the FBO down to the pixmap */ void glamor_download_pixmap(PixmapPtr pixmap) { BoxRec box; box.x1 = 0; box.x2 = pixmap->drawable.width; box.y1 = 0; box.y2 = pixmap->drawable.height; glamor_download_boxes(pixmap, &box, 1, 0, 0, 0, 0, pixmap->devPrivate.ptr, pixmap->devKind); } xorg-server-21.1.16/glamor/glamor_transfer.h0000644000175000017500000000404314757411105014453 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLAMOR_TRANSFER_H_ #define _GLAMOR_TRANSFER_H_ void glamor_upload_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox, int dx_src, int dy_src, int dx_dst, int dy_dst, uint8_t *bits, uint32_t byte_stride); void glamor_upload_region(PixmapPtr pixmap, RegionPtr region, int region_x, int region_y, uint8_t *bits, uint32_t byte_stride); void glamor_upload_pixmap(PixmapPtr pixmap); void glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox, int dx_src, int dy_src, int dx_dst, int dy_dst, uint8_t *bits, uint32_t byte_stride); void glamor_download_rect(PixmapPtr pixmap, int x, int y, int w, int h, uint8_t *bits); void glamor_download_pixmap(PixmapPtr pixmap); #endif /* _GLAMOR_TRANSFER_H_ */ xorg-server-21.1.16/glamor/glamor_transform.c0000644000175000017500000002271214757411105014640 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "glamor_transform.h" /* * Set up rendering to target the specified drawable, computing an * appropriate transform for the vertex shader to convert * drawable-relative coordinates into pixmap-relative coordinates. If * requested, the offset from pixmap origin coordinates back to window * system coordinates will be returned in *p_off_x, *p_off_y so that * clipping computations can be adjusted as appropriate */ Bool glamor_set_destination_drawable(DrawablePtr drawable, int box_index, Bool do_drawable_translate, Bool center_offset, GLint matrix_uniform_location, int *p_off_x, int *p_off_y) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); int off_x, off_y; BoxPtr box = glamor_pixmap_box_at(pixmap_priv, box_index); int w = box->x2 - box->x1; int h = box->y2 - box->y1; float scale_x = 2.0f / (float) w; float scale_y = 2.0f / (float) h; float center_adjust = 0.0f; glamor_pixmap_fbo *pixmap_fbo; pixmap_fbo = glamor_pixmap_fbo_at(pixmap_priv, box_index); if (!pixmap_fbo) return FALSE; glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y); off_x -= box->x1; off_y -= box->y1; if (p_off_x) { *p_off_x = off_x; *p_off_y = off_y; } /* A tricky computation to find the right value for the two linear functions * that transform rendering coordinates to pixmap coordinates * * pixmap_x = render_x + drawable->x + off_x * pixmap_y = render_y + drawable->y + off_y * * gl_x = pixmap_x * 2 / width - 1 * gl_y = pixmap_y * 2 / height - 1 * * gl_x = (render_x + drawable->x + off_x) * 2 / width - 1 * * gl_x = (render_x) * 2 / width + (drawable->x + off_x) * 2 / width - 1 */ if (do_drawable_translate) { off_x += drawable->x; off_y += drawable->y; } /* * To get GL_POINTS drawn in the right spot, we need to adjust the * coordinates by 1/2 a pixel. */ if (center_offset) center_adjust = 0.5f; glUniform4f(matrix_uniform_location, scale_x, (off_x + center_adjust) * scale_x - 1.0f, scale_y, (off_y + center_adjust) * scale_y - 1.0f); glamor_set_destination_pixmap_fbo(glamor_priv, pixmap_fbo, 0, 0, w, h); return TRUE; } /* * Set up for solid rendering to the specified pixmap using alu, fg and planemask * from the specified GC. Load the target color into the specified uniform */ void glamor_set_color_depth(ScreenPtr pScreen, int depth, CARD32 pixel, GLint uniform) { glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen); float color[4]; glamor_get_rgba_from_pixel(pixel, &color[0], &color[1], &color[2], &color[3], glamor_priv->formats[depth].render_format); if ((depth <= 8) && glamor_priv->formats[8].format == GL_RED) color[0] = color[3]; glUniform4fv(uniform, 1, color); } Bool glamor_set_solid(PixmapPtr pixmap, GCPtr gc, Bool use_alu, GLint uniform) { CARD32 pixel; int alu = use_alu ? gc->alu : GXcopy; if (!glamor_set_planemask(gc->depth, gc->planemask)) return FALSE; pixel = gc->fgPixel; if (!glamor_set_alu(pixmap->drawable.pScreen, alu)) { switch (gc->alu) { case GXclear: pixel = 0; break; case GXcopyInverted: pixel = ~pixel; break; case GXset: pixel = ~0 & gc->planemask; break; default: return FALSE; } } glamor_set_color(pixmap, pixel, uniform); return TRUE; } Bool glamor_set_texture_pixmap(PixmapPtr texture, Bool destination_red) { glamor_pixmap_private *texture_priv; texture_priv = glamor_get_pixmap_private(texture); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(texture_priv)) return FALSE; if (glamor_pixmap_priv_is_large(texture_priv)) return FALSE; glamor_bind_texture(glamor_get_screen_private(texture->drawable.pScreen), GL_TEXTURE0, texture_priv->fbo, destination_red); /* we're not setting the sampler uniform here as we always use * GL_TEXTURE0, and the default value for uniforms is zero. So, * save a bit of CPU time by taking advantage of that. */ return TRUE; } Bool glamor_set_texture(PixmapPtr texture, Bool destination_red, int off_x, int off_y, GLint offset_uniform, GLint size_inv_uniform) { if (!glamor_set_texture_pixmap(texture, destination_red)) return FALSE; glUniform2f(offset_uniform, off_x, off_y); glUniform2f(size_inv_uniform, 1.0f/texture->drawable.width, 1.0f/texture->drawable.height); return TRUE; } Bool glamor_set_tiled(PixmapPtr pixmap, GCPtr gc, GLint offset_uniform, GLint size_inv_uniform) { if (!glamor_set_alu(pixmap->drawable.pScreen, gc->alu)) return FALSE; if (!glamor_set_planemask(gc->depth, gc->planemask)) return FALSE; return glamor_set_texture(gc->tile.pixmap, TRUE, -gc->patOrg.x, -gc->patOrg.y, offset_uniform, size_inv_uniform); } static PixmapPtr glamor_get_stipple_pixmap(GCPtr gc) { glamor_gc_private *gc_priv = glamor_get_gc_private(gc); ScreenPtr screen = gc->pScreen; PixmapPtr bitmap; PixmapPtr pixmap; GCPtr scratch_gc; ChangeGCVal changes[2]; if (gc_priv->stipple) return gc_priv->stipple; bitmap = gc->stipple; if (!bitmap) goto bail; pixmap = glamor_create_pixmap(screen, bitmap->drawable.width, bitmap->drawable.height, 8, GLAMOR_CREATE_NO_LARGE); if (!pixmap) goto bail; scratch_gc = GetScratchGC(8, screen); if (!scratch_gc) goto bail_pixmap; changes[0].val = 0xff; changes[1].val = 0x00; if (ChangeGC(NullClient, scratch_gc, GCForeground|GCBackground, changes) != Success) goto bail_gc; ValidateGC(&pixmap->drawable, scratch_gc); (*scratch_gc->ops->CopyPlane)(&bitmap->drawable, &pixmap->drawable, scratch_gc, 0, 0, bitmap->drawable.width, bitmap->drawable.height, 0, 0, 0x1); FreeScratchGC(scratch_gc); gc_priv->stipple = pixmap; glamor_track_stipple(gc); return pixmap; bail_gc: FreeScratchGC(scratch_gc); bail_pixmap: glamor_destroy_pixmap(pixmap); bail: return NULL; } Bool glamor_set_stippled(PixmapPtr pixmap, GCPtr gc, GLint fg_uniform, GLint offset_uniform, GLint size_uniform) { PixmapPtr stipple; stipple = glamor_get_stipple_pixmap(gc); if (!stipple) return FALSE; if (!glamor_set_solid(pixmap, gc, TRUE, fg_uniform)) return FALSE; return glamor_set_texture(stipple, FALSE, -gc->patOrg.x, -gc->patOrg.y, offset_uniform, size_uniform); } xorg-server-21.1.16/glamor/glamor_transform.h0000644000175000017500000000736214757411105014651 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLAMOR_TRANSFORM_H_ #define _GLAMOR_TRANSFORM_H_ Bool glamor_set_destination_drawable(DrawablePtr drawable, int box_index, Bool do_drawable_translate, Bool center_offset, GLint matrix_uniform_location, int *p_off_x, int *p_off_y); void glamor_set_color_depth(ScreenPtr pScreen, int depth, CARD32 pixel, GLint uniform); static inline void glamor_set_color(PixmapPtr pixmap, CARD32 pixel, GLint uniform) { glamor_set_color_depth(pixmap->drawable.pScreen, pixmap->drawable.depth, pixel, uniform); } Bool glamor_set_texture_pixmap(PixmapPtr texture, Bool destination_red); Bool glamor_set_texture(PixmapPtr texture, Bool destination_red, int off_x, int off_y, GLint offset_uniform, GLint size_uniform); Bool glamor_set_solid(PixmapPtr pixmap, GCPtr gc, Bool use_alu, GLint uniform); Bool glamor_set_tiled(PixmapPtr pixmap, GCPtr gc, GLint offset_uniform, GLint size_uniform); Bool glamor_set_stippled(PixmapPtr pixmap, GCPtr gc, GLint fg_uniform, GLint offset_uniform, GLint size_uniform); /* * Vertex shader bits that transform X coordinates to pixmap * coordinates using the matrix computed above */ #define GLAMOR_DECLARE_MATRIX "uniform vec4 v_matrix;\n" #define GLAMOR_X_POS(x) #x " *v_matrix.x + v_matrix.y" #define GLAMOR_Y_POS(y) #y " *v_matrix.z + v_matrix.w" #if 0 #define GLAMOR_POS(dst,src) \ " " #dst ".x = " #src ".x * v_matrix.x + v_matrix.y;\n" \ " " #dst ".y = " #src ".y * v_matrix.z + v_matrix.w;\n" \ " " #dst ".z = 0.0;\n" \ " " #dst ".w = 1.0;\n" #endif #define GLAMOR_POS(dst,src) \ " " #dst ".xy = " #src ".xy * v_matrix.xz + v_matrix.yw;\n" \ " " #dst ".zw = vec2(0.0,1.0);\n" #endif /* _GLAMOR_TRANSFORM_H_ */ xorg-server-21.1.16/glamor/glamor_trapezoid.c0000644000175000017500000001175514757411105014633 /* * Copyright © 2009 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Junyan He * */ /** @file glamor_trapezoid.c * * Trapezoid acceleration implementation */ #include "glamor_priv.h" #include "mipict.h" #include "fbpict.h" /** * Creates an appropriate picture for temp mask use. */ static PicturePtr glamor_create_mask_picture(ScreenPtr screen, PicturePtr dst, PictFormatPtr pict_format, CARD16 width, CARD16 height) { PixmapPtr pixmap; PicturePtr picture; int error; if (!pict_format) { if (dst->polyEdge == PolyEdgeSharp) pict_format = PictureMatchFormat(screen, 1, PICT_a1); else pict_format = PictureMatchFormat(screen, 8, PICT_a8); if (!pict_format) return 0; } pixmap = glamor_create_pixmap(screen, 0, 0, pict_format->depth, GLAMOR_CREATE_PIXMAP_CPU); if (!pixmap) return 0; picture = CreatePicture(0, &pixmap->drawable, pict_format, 0, 0, serverClient, &error); glamor_destroy_pixmap(pixmap); return picture; } /** * glamor_trapezoids will generate trapezoid mask accumulating in * system memory. */ void glamor_trapezoids(CARD8 op, PicturePtr src, PicturePtr dst, PictFormatPtr mask_format, INT16 x_src, INT16 y_src, int ntrap, xTrapezoid *traps) { ScreenPtr screen = dst->pDrawable->pScreen; BoxRec bounds; PicturePtr picture; INT16 x_dst, y_dst; INT16 x_rel, y_rel; int width, height, stride; PixmapPtr pixmap; pixman_image_t *image = NULL; /* If a mask format wasn't provided, we get to choose, but behavior should * be as if there was no temporary mask the traps were accumulated into. */ if (!mask_format) { if (dst->polyEdge == PolyEdgeSharp) mask_format = PictureMatchFormat(screen, 1, PICT_a1); else mask_format = PictureMatchFormat(screen, 8, PICT_a8); for (; ntrap; ntrap--, traps++) glamor_trapezoids(op, src, dst, mask_format, x_src, y_src, 1, traps); return; } miTrapezoidBounds(ntrap, traps, &bounds); if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) return; x_dst = traps[0].left.p1.x >> 16; y_dst = traps[0].left.p1.y >> 16; width = bounds.x2 - bounds.x1; height = bounds.y2 - bounds.y1; stride = PixmapBytePad(width, mask_format->depth); picture = glamor_create_mask_picture(screen, dst, mask_format, width, height); if (!picture) return; image = pixman_image_create_bits(picture->format, width, height, NULL, stride); if (!image) { FreePicture(picture, 0); return; } for (; ntrap; ntrap--, traps++) pixman_rasterize_trapezoid(image, (pixman_trapezoid_t *) traps, -bounds.x1, -bounds.y1); pixmap = glamor_get_drawable_pixmap(picture->pDrawable); screen->ModifyPixmapHeader(pixmap, width, height, mask_format->depth, BitsPerPixel(mask_format->depth), PixmapBytePad(width, mask_format->depth), pixman_image_get_data(image)); x_rel = bounds.x1 + x_src - x_dst; y_rel = bounds.y1 + y_src - y_dst; CompositePicture(op, src, picture, dst, x_rel, y_rel, 0, 0, bounds.x1, bounds.y1, bounds.x2 - bounds.x1, bounds.y2 - bounds.y1); if (image) pixman_image_unref(image); FreePicture(picture, 0); } xorg-server-21.1.16/glamor/glamor_triangles.c0000644000175000017500000000337314757411105014617 /* * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #include "glamor_priv.h" void glamor_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris) { if (glamor_prepare_access_picture(pDst, GLAMOR_ACCESS_RW) && glamor_prepare_access_picture(pSrc, GLAMOR_ACCESS_RO)) { fbTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntris, tris); } glamor_finish_access_picture(pSrc); glamor_finish_access_picture(pDst); } xorg-server-21.1.16/glamor/glamor_addtraps.c0000644000175000017500000000306514757411105014427 /* * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #include "glamor_priv.h" void glamor_add_traps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap *traps) { if (glamor_prepare_access_picture(pPicture, GLAMOR_ACCESS_RW)) { fbAddTraps(pPicture, x_off, y_off, ntrap, traps); } glamor_finish_access_picture(pPicture); } xorg-server-21.1.16/glamor/glamor_glyphblt.c0000644000175000017500000002102514757411105014446 /* * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #include "glamor_priv.h" #include #include "glamor_transform.h" static const glamor_facet glamor_facet_poly_glyph_blt = { .name = "poly_glyph_blt", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0,0);\n" GLAMOR_POS(gl_Position, primitive)), }; static Bool glamor_poly_glyph_blt_gl(DrawablePtr drawable, GCPtr gc, int start_x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyph_base) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; glamor_program *prog; RegionPtr clip = gc->pCompositeClip; int box_index; Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_glyph_blt_progs, &glamor_facet_poly_glyph_blt); if (!prog) goto bail; glEnableVertexAttribArray(GLAMOR_VERTEX_POS); start_x += drawable->x; y += drawable->y; glamor_pixmap_loop(pixmap_priv, box_index) { int x; int n; int num_points, max_points; INT16 *points = NULL; int off_x, off_y; char *vbo_offset; if (!glamor_set_destination_drawable(drawable, box_index, FALSE, TRUE, prog->matrix_uniform, &off_x, &off_y)) goto bail; max_points = 500; num_points = 0; x = start_x; for (n = 0; n < nglyph; n++) { CharInfoPtr charinfo = ppci[n]; int w = GLYPHWIDTHPIXELS(charinfo); int h = GLYPHHEIGHTPIXELS(charinfo); uint8_t *glyphbits = FONTGLYPHBITS(NULL, charinfo); if (w && h) { int glyph_x = x + charinfo->metrics.leftSideBearing; int glyph_y = y - charinfo->metrics.ascent; int glyph_stride = GLYPHWIDTHBYTESPADDED(charinfo); int xx, yy; for (yy = 0; yy < h; yy++) { uint8_t *glyph = glyphbits; for (xx = 0; xx < w; glyph += ((xx&7) == 7), xx++) { int pt_x_i = glyph_x + xx; int pt_y_i = glyph_y + yy; #if BITMAP_BIT_ORDER == MSBFirst if (!(*glyph & (128 >> (xx & 7)))) #else if (!(*glyph & (1 << (xx & 7)))) #endif continue; if (!RegionContainsPoint(clip, pt_x_i, pt_y_i, NULL)) continue; if (!num_points) { points = glamor_get_vbo_space(screen, max_points * (2 * sizeof (INT16)), &vbo_offset); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 0, vbo_offset); } *points++ = pt_x_i; *points++ = pt_y_i; num_points++; if (num_points == max_points) { glamor_put_vbo_space(screen); glDrawArrays(GL_POINTS, 0, num_points); num_points = 0; } } glyphbits += glyph_stride; } } x += charinfo->metrics.characterWidth; } if (num_points) { glamor_put_vbo_space(screen); glDrawArrays(GL_POINTS, 0, num_points); } } ret = TRUE; bail: glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } void glamor_poly_glyph_blt(DrawablePtr drawable, GCPtr gc, int start_x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyph_base) { if (glamor_poly_glyph_blt_gl(drawable, gc, start_x, y, nglyph, ppci, pglyph_base)) return; miPolyGlyphBlt(drawable, gc, start_x, y, nglyph, ppci, pglyph_base); } static Bool glamor_push_pixels_gl(GCPtr gc, PixmapPtr bitmap, DrawablePtr drawable, int w, int h, int x, int y) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_pixmap_private *pixmap_priv; uint8_t *bitmap_data = bitmap->devPrivate.ptr; int bitmap_stride = bitmap->devKind; glamor_program *prog; RegionPtr clip = gc->pCompositeClip; int box_index; int yy, xx; int num_points; INT16 *points = NULL; char *vbo_offset; Bool ret = FALSE; if (w * h > MAXINT / (2 * sizeof(float))) goto bail; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); prog = glamor_use_program_fill(pixmap, gc, &glamor_priv->poly_glyph_blt_progs, &glamor_facet_poly_glyph_blt); if (!prog) goto bail; glEnableVertexAttribArray(GLAMOR_VERTEX_POS); points = glamor_get_vbo_space(screen, w * h * sizeof(INT16) * 2, &vbo_offset); num_points = 0; /* Note that because fb sets miTranslate in the GC, our incoming X * and Y are in screen coordinate space (same for spans, but not * other operations). */ for (yy = 0; yy < h; yy++) { uint8_t *bitmap_row = bitmap_data + yy * bitmap_stride; for (xx = 0; xx < w; xx++) { #if BITMAP_BIT_ORDER == MSBFirst if (bitmap_row[xx / 8] & (128 >> xx % 8) && #else if (bitmap_row[xx / 8] & (1 << xx % 8) && #endif RegionContainsPoint(clip, x + xx, y + yy, NULL)) { *points++ = x + xx; *points++ = y + yy; num_points++; } } } glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 0, vbo_offset); glamor_put_vbo_space(screen); glamor_pixmap_loop(pixmap_priv, box_index) { if (!glamor_set_destination_drawable(drawable, box_index, FALSE, TRUE, prog->matrix_uniform, NULL, NULL)) goto bail; glDrawArrays(GL_POINTS, 0, num_points); } ret = TRUE; bail: glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } void glamor_push_pixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y) { if (glamor_push_pixels_gl(pGC, pBitmap, pDrawable, w, h, x, y)) return; miPushPixels(pGC, pBitmap, pDrawable, w, h, x, y); } xorg-server-21.1.16/glamor/glamor_points.c0000644000175000017500000000776114757411105014150 /* * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #include "glamor_priv.h" #include "glamor_transform.h" static const glamor_facet glamor_facet_point = { .name = "poly_point", .vs_vars = "attribute vec2 primitive;\n", .vs_exec = GLAMOR_POS(gl_Position, primitive), }; static Bool glamor_poly_point_gl(DrawablePtr drawable, GCPtr gc, int mode, int npt, DDXPointPtr ppt) { ScreenPtr screen = drawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable); glamor_program *prog = &glamor_priv->point_prog; glamor_pixmap_private *pixmap_priv; int off_x, off_y; GLshort *vbo_ppt; char *vbo_offset; int box_index; Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) goto bail; glamor_make_current(glamor_priv); if (prog->failed) goto bail; if (!prog->prog) { if (!glamor_build_program(screen, prog, &glamor_facet_point, &glamor_fill_solid, NULL, NULL)) goto bail; } if (!glamor_use_program(pixmap, gc, prog, NULL)) goto bail; vbo_ppt = glamor_get_vbo_space(screen, npt * (2 * sizeof (INT16)), &vbo_offset); glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 0, vbo_offset); if (mode == CoordModePrevious) { int n = npt; INT16 x = 0, y = 0; while (n--) { vbo_ppt[0] = (x += ppt->x); vbo_ppt[1] = (y += ppt->y); vbo_ppt += 2; ppt++; } } else memcpy(vbo_ppt, ppt, npt * (2 * sizeof (INT16))); glamor_put_vbo_space(screen); glEnable(GL_SCISSOR_TEST); glamor_pixmap_loop(pixmap_priv, box_index) { int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); if (!glamor_set_destination_drawable(drawable, box_index, TRUE, TRUE, prog->matrix_uniform, &off_x, &off_y)) goto bail; while (nbox--) { glScissor(box->x1 + off_x, box->y1 + off_y, box->x2 - box->x1, box->y2 - box->y1); box++; glDrawArrays(GL_POINTS, 0, npt); } } ret = TRUE; bail: glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); return ret; } void glamor_poly_point(DrawablePtr drawable, GCPtr gc, int mode, int npt, DDXPointPtr ppt) { if (glamor_poly_point_gl(drawable, gc, mode, npt, ppt)) return; miPolyPoint(drawable, gc, mode, npt, ppt); } xorg-server-21.1.16/glamor/glamor_priv.h0000644000175000017500000007115514757411105013617 /* * Copyright © 2008 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ #ifndef GLAMOR_PRIV_H #define GLAMOR_PRIV_H #include "dix-config.h" #include "glamor.h" #include "xvdix.h" #if XSYNC #include "misyncshm.h" #include "misyncstr.h" #endif #include #ifdef GLAMOR_HAS_GBM #define MESA_EGL_NO_X11_HEADERS #define EGL_NO_X11 #include #endif #define GLAMOR_DEFAULT_PRECISION \ "#ifdef GL_ES\n" \ "precision mediump float;\n" \ "#endif\n" #include "glyphstr.h" #include "glamor_debug.h" #include "glamor_context.h" #include "glamor_program.h" #include struct glamor_pixmap_private; typedef struct glamor_composite_shader { GLuint prog; GLint dest_to_dest_uniform_location; GLint dest_to_source_uniform_location; GLint dest_to_mask_uniform_location; GLint source_uniform_location; GLint mask_uniform_location; GLint source_wh; GLint mask_wh; GLint source_repeat_mode; GLint mask_repeat_mode; union { float source_solid_color[4]; struct { PixmapPtr source_pixmap; PicturePtr source; }; }; union { float mask_solid_color[4]; struct { PixmapPtr mask_pixmap; PicturePtr mask; }; }; } glamor_composite_shader; enum ca_state { CA_NONE, CA_TWO_PASS, CA_DUAL_BLEND, }; enum shader_source { SHADER_SOURCE_SOLID, SHADER_SOURCE_TEXTURE, SHADER_SOURCE_TEXTURE_ALPHA, SHADER_SOURCE_COUNT, }; enum shader_mask { SHADER_MASK_NONE, SHADER_MASK_SOLID, SHADER_MASK_TEXTURE, SHADER_MASK_TEXTURE_ALPHA, SHADER_MASK_COUNT, }; enum shader_dest_swizzle { SHADER_DEST_SWIZZLE_DEFAULT, SHADER_DEST_SWIZZLE_ALPHA_TO_RED, SHADER_DEST_SWIZZLE_COUNT, }; struct shader_key { enum shader_source source; enum shader_mask mask; glamor_program_alpha in; enum shader_dest_swizzle dest_swizzle; }; struct blendinfo { Bool dest_alpha; Bool source_alpha; GLenum source_blend; GLenum dest_blend; }; typedef struct { INT16 x_src; INT16 y_src; INT16 x_mask; INT16 y_mask; INT16 x_dst; INT16 y_dst; INT16 width; INT16 height; } glamor_composite_rect_t; enum glamor_vertex_type { GLAMOR_VERTEX_POS, GLAMOR_VERTEX_SOURCE, GLAMOR_VERTEX_MASK }; enum gradient_shader { SHADER_GRADIENT_LINEAR, SHADER_GRADIENT_RADIAL, SHADER_GRADIENT_CONICAL, SHADER_GRADIENT_COUNT, }; struct glamor_screen_private; struct glamor_pixmap_private; #define GLAMOR_COMPOSITE_VBO_VERT_CNT (64*1024) struct glamor_format { /** X Server's "depth" value */ int depth; /** GL internalformat for creating textures of this type */ GLenum internalformat; /** GL format transferring pixels in/out of textures of this type. */ GLenum format; /** GL type transferring pixels in/out of textures of this type. */ GLenum type; /* Render PICT_* matching GL's channel layout for pixels * transferred using format/type. */ CARD32 render_format; /** * Whether rendering is supported in GL at all (i.e. without pixel data conversion * just before upload) */ Bool rendering_supported; }; struct glamor_saved_procs { CloseScreenProcPtr close_screen; CreateGCProcPtr create_gc; CreatePixmapProcPtr create_pixmap; DestroyPixmapProcPtr destroy_pixmap; GetSpansProcPtr get_spans; GetImageProcPtr get_image; CompositeProcPtr composite; CompositeRectsProcPtr composite_rects; TrapezoidsProcPtr trapezoids; GlyphsProcPtr glyphs; ChangeWindowAttributesProcPtr change_window_attributes; CopyWindowProcPtr copy_window; BitmapToRegionProcPtr bitmap_to_region; TrianglesProcPtr triangles; AddTrapsProcPtr addtraps; #if XSYNC SyncScreenFuncsRec sync_screen_funcs; #endif ScreenBlockHandlerProcPtr block_handler; }; typedef struct glamor_screen_private { Bool is_gles; int glsl_version; Bool has_pack_invert; Bool has_fbo_blit; Bool has_map_buffer_range; Bool has_buffer_storage; Bool has_khr_debug; Bool has_mesa_tile_raster_order; Bool has_nv_texture_barrier; Bool has_pack_subimage; Bool has_unpack_subimage; Bool has_rw_pbo; Bool use_quads; Bool has_dual_blend; Bool has_clear_texture; Bool has_texture_swizzle; Bool is_core_profile; Bool can_copyplane; Bool use_gpu_shader4; int max_fbo_size; /** * Stores information about supported formats. Note, that this list contains all * supported pixel formats, including these that are not supported on GL side * directly, but are converted to another format instead. */ struct glamor_format formats[33]; struct glamor_format cbcr_format; /* glamor point shader */ glamor_program point_prog; /* glamor spans shaders */ glamor_program_fill fill_spans_program; /* glamor rect shaders */ glamor_program_fill poly_fill_rect_program; /* glamor glyphblt shaders */ glamor_program_fill poly_glyph_blt_progs; /* glamor text shaders */ glamor_program_fill poly_text_progs; glamor_program te_text_prog; glamor_program image_text_prog; /* glamor copy shaders */ glamor_program copy_area_prog; glamor_program copy_plane_prog; /* glamor line shader */ glamor_program_fill poly_line_program; /* glamor segment shaders */ glamor_program_fill poly_segment_program; /* glamor dash line shader */ glamor_program_fill on_off_dash_line_progs; glamor_program double_dash_line_prog; /* glamor composite_glyphs shaders */ glamor_program_render glyphs_program; struct glamor_glyph_atlas *glyph_atlas_a; struct glamor_glyph_atlas *glyph_atlas_argb; int glyph_atlas_dim; int glyph_max_dim; char *glyph_defines; /** Vertex buffer for all GPU rendering. */ GLuint vao; GLuint vbo; /** Next offset within the VBO that glamor_get_vbo_space() will use. */ int vbo_offset; int vbo_size; Bool vbo_mapped; /** * Pointer to glamor_get_vbo_space()'s current VBO mapping. * * Note that this is not necessarily equal to the pointer returned * by glamor_get_vbo_space(), so it can't be used in place of that. */ char *vb; int vb_stride; /** Cached index buffer for translating GL_QUADS to triangles. */ GLuint ib; /** Index buffer type: GL_UNSIGNED_SHORT or GL_UNSIGNED_INT */ GLenum ib_type; /** Number of quads the index buffer has indices for. */ unsigned ib_size; Bool has_source_coords, has_mask_coords; int render_nr_quads; glamor_composite_shader composite_shader[SHADER_SOURCE_COUNT] [SHADER_MASK_COUNT] [glamor_program_alpha_count] [SHADER_DEST_SWIZZLE_COUNT]; /* glamor gradient, 0 for small nstops, 1 for large nstops and 2 for dynamic generate. */ GLint gradient_prog[SHADER_GRADIENT_COUNT][3]; int linear_max_nstops; int radial_max_nstops; struct glamor_saved_procs saved_procs; GetDrawableModifiersFuncPtr get_drawable_modifiers; int flags; ScreenPtr screen; int dri3_enabled; Bool suppress_gl_out_of_memory_logging; Bool logged_any_fbo_allocation_failure; Bool logged_any_pbo_allocation_failure; /* xv */ glamor_program xv_prog; struct glamor_context ctx; } glamor_screen_private; typedef enum glamor_access { GLAMOR_ACCESS_RO, GLAMOR_ACCESS_RW, } glamor_access_t; enum glamor_fbo_state { /** There is no storage attached to the pixmap. */ GLAMOR_FBO_UNATTACHED, /** * The pixmap has FBO storage attached, but devPrivate.ptr doesn't * point at anything. */ GLAMOR_FBO_NORMAL, }; typedef struct glamor_pixmap_fbo { GLuint tex; /**< GL texture name */ GLuint fb; /**< GL FBO name */ int width; /**< width in pixels */ int height; /**< height in pixels */ Bool is_red; } glamor_pixmap_fbo; typedef struct glamor_pixmap_clipped_regions { int block_idx; RegionPtr region; } glamor_pixmap_clipped_regions; typedef struct glamor_pixmap_private { glamor_pixmap_type_t type; enum glamor_fbo_state gl_fbo; /** * If devPrivate.ptr is non-NULL (meaning we're within * glamor_prepare_access), determies whether we should re-upload * that data on glamor_finish_access(). */ glamor_access_t map_access; glamor_pixmap_fbo *fbo; /** current fbo's coords in the whole pixmap. */ BoxRec box; GLuint pbo; RegionRec prepare_region; Bool prepared; #ifdef GLAMOR_HAS_GBM EGLImageKHR image; Bool used_modifiers; #endif /** block width of this large pixmap. */ int block_w; /** block height of this large pixmap. */ int block_h; /** block_wcnt: block count in one block row. */ int block_wcnt; /** block_hcnt: block count in one block column. */ int block_hcnt; /** * The list of boxes for the bounds of the FBOs making up the * pixmap. * * For a 2048x2048 pixmap with GL FBO size limits of 1024x1024: * * ****************** * * fbo0 * fbo1 * * * * * * ****************** * * fbo2 * fbo3 * * * * * * ****************** * * box[0] = {0,0,1024,1024} * box[1] = {1024,0,2048,2048} * ... */ BoxPtr box_array; /** * Array of fbo structs containing the actual GL texture/fbo * names. */ glamor_pixmap_fbo **fbo_array; Bool is_cbcr; } glamor_pixmap_private; extern DevPrivateKeyRec glamor_pixmap_private_key; static inline glamor_pixmap_private * glamor_get_pixmap_private(PixmapPtr pixmap) { if (pixmap == NULL) return NULL; return dixLookupPrivate(&pixmap->devPrivates, &glamor_pixmap_private_key); } /* * Returns TRUE if pixmap has no image object */ static inline Bool glamor_pixmap_drm_only(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); return priv->type == GLAMOR_DRM_ONLY; } /* * Returns TRUE if pixmap is plain memory (not a GL object at all) */ static inline Bool glamor_pixmap_is_memory(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); return priv->type == GLAMOR_MEMORY; } /* * Returns TRUE if pixmap requires multiple textures to hold it */ static inline Bool glamor_pixmap_priv_is_large(glamor_pixmap_private *priv) { return priv->block_wcnt > 1 || priv->block_hcnt > 1; } static inline Bool glamor_pixmap_priv_is_small(glamor_pixmap_private *priv) { return priv->block_wcnt <= 1 && priv->block_hcnt <= 1; } static inline Bool glamor_pixmap_is_large(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); return glamor_pixmap_priv_is_large(priv); } /* * Returns TRUE if pixmap has an FBO */ static inline Bool glamor_pixmap_has_fbo(PixmapPtr pixmap) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); return priv->gl_fbo == GLAMOR_FBO_NORMAL; } static inline void glamor_set_pixmap_fbo_current(glamor_pixmap_private *priv, int idx) { if (glamor_pixmap_priv_is_large(priv)) { priv->fbo = priv->fbo_array[idx]; priv->box = priv->box_array[idx]; } } static inline glamor_pixmap_fbo * glamor_pixmap_fbo_at(glamor_pixmap_private *priv, int box) { assert(box < priv->block_wcnt * priv->block_hcnt); return priv->fbo_array[box]; } static inline BoxPtr glamor_pixmap_box_at(glamor_pixmap_private *priv, int box) { assert(box < priv->block_wcnt * priv->block_hcnt); return &priv->box_array[box]; } static inline int glamor_pixmap_wcnt(glamor_pixmap_private *priv) { return priv->block_wcnt; } static inline int glamor_pixmap_hcnt(glamor_pixmap_private *priv) { return priv->block_hcnt; } #define glamor_pixmap_loop(priv, box_index) \ for (box_index = 0; box_index < glamor_pixmap_hcnt(priv) * \ glamor_pixmap_wcnt(priv); box_index++) \ /* GC private structure. Currently holds only any computed dash pixmap */ typedef struct { PixmapPtr dash; PixmapPtr stipple; DamagePtr stipple_damage; } glamor_gc_private; extern DevPrivateKeyRec glamor_gc_private_key; extern DevPrivateKeyRec glamor_screen_private_key; extern glamor_screen_private * glamor_get_screen_private(ScreenPtr screen); extern void glamor_set_screen_private(ScreenPtr screen, glamor_screen_private *priv); static inline glamor_gc_private * glamor_get_gc_private(GCPtr gc) { return dixLookupPrivate(&gc->devPrivates, &glamor_gc_private_key); } /** * Returns TRUE if the given planemask covers all the significant bits in the * pixel values for pDrawable. */ static inline Bool glamor_pm_is_solid(int depth, unsigned long planemask) { return (planemask & FbFullMask(depth)) == FbFullMask(depth); } extern int glamor_debug_level; /* glamor.c */ PixmapPtr glamor_get_drawable_pixmap(DrawablePtr drawable); glamor_pixmap_fbo *glamor_pixmap_detach_fbo(glamor_pixmap_private * pixmap_priv); void glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo); glamor_pixmap_fbo *glamor_create_fbo_from_tex(glamor_screen_private * glamor_priv, PixmapPtr pixmap, int w, int h, GLint tex, int flag); glamor_pixmap_fbo *glamor_create_fbo(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int w, int h, int flag); void glamor_destroy_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo); void glamor_pixmap_destroy_fbo(PixmapPtr pixmap); Bool glamor_pixmap_fbo_fixup(ScreenPtr screen, PixmapPtr pixmap); void glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo, const struct glamor_format *pixmap_format); const struct glamor_format *glamor_format_for_pixmap(PixmapPtr pixmap); /* Return whether 'picture' is alpha-only */ static inline Bool glamor_picture_is_alpha(PicturePtr picture) { return picture->format == PICT_a1 || picture->format == PICT_a8; } /* Return whether 'picture' is storing alpha bits in the red channel */ static inline Bool glamor_picture_red_is_alpha(PicturePtr picture) { /* True when the picture is alpha only and the screen is using GL_RED for alpha pictures */ return glamor_picture_is_alpha(picture) && glamor_get_screen_private(picture->pDrawable->pScreen)->formats[8].format == GL_RED; } void glamor_bind_texture(glamor_screen_private *glamor_priv, GLenum texture, glamor_pixmap_fbo *fbo, Bool destination_red); glamor_pixmap_fbo *glamor_create_fbo_array(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int flag, int block_w, int block_h, glamor_pixmap_private *); void glamor_gldrawarrays_quads_using_indices(glamor_screen_private *glamor_priv, unsigned count); /* glamor_core.c */ Bool glamor_get_drawable_location(const DrawablePtr drawable); void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap, int *x, int *y); GLint glamor_compile_glsl_prog(GLenum type, const char *source); void glamor_link_glsl_prog(ScreenPtr screen, GLint prog, const char *format, ...) _X_ATTRIBUTE_PRINTF(3,4); void glamor_get_color_4f_from_pixel(PixmapPtr pixmap, unsigned long fg_pixel, GLfloat *color); int glamor_set_destination_pixmap(PixmapPtr pixmap); int glamor_set_destination_pixmap_priv(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv); void glamor_set_destination_pixmap_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *, int, int, int, int); /* nc means no check. caller must ensure this pixmap has valid fbo. * usually use the GLAMOR_PIXMAP_PRIV_HAS_FBO firstly. * */ void glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv); Bool glamor_set_alu(ScreenPtr screen, unsigned char alu); Bool glamor_set_planemask(int depth, unsigned long planemask); RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap); void glamor_track_stipple(GCPtr gc); /* glamor_render.c */ Bool glamor_composite_clipped_region(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, RegionPtr region, int x_source, int y_source, int x_mask, int y_mask, int x_dest, int y_dest); void glamor_composite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); void glamor_composite_rects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, xRectangle *rects); /* glamor_trapezoid.c */ void glamor_trapezoids(CARD8 op, PicturePtr src, PicturePtr dst, PictFormatPtr mask_format, INT16 x_src, INT16 y_src, int ntrap, xTrapezoid *traps); /* glamor_gradient.c */ void glamor_init_gradient_shader(ScreenPtr screen); PicturePtr glamor_generate_linear_gradient_picture(ScreenPtr screen, PicturePtr src_picture, int x_source, int y_source, int width, int height, PictFormatShort format); PicturePtr glamor_generate_radial_gradient_picture(ScreenPtr screen, PicturePtr src_picture, int x_source, int y_source, int width, int height, PictFormatShort format); /* glamor_triangles.c */ void glamor_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntris, xTriangle * tris); /* glamor_pixmap.c */ void glamor_pixmap_init(ScreenPtr screen); void glamor_pixmap_fini(ScreenPtr screen); /* glamor_vbo.c */ void glamor_init_vbo(ScreenPtr screen); void glamor_fini_vbo(ScreenPtr screen); void * glamor_get_vbo_space(ScreenPtr screen, unsigned size, char **vbo_offset); void glamor_put_vbo_space(ScreenPtr screen); /** * According to the flag, * if the flag is GLAMOR_CREATE_FBO_NO_FBO then just ensure * the fbo has a valid texture. Otherwise, it will ensure * the fbo has valid texture and attach to a valid fb. * If the fbo already has a valid glfbo then do nothing. */ Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, int flag); glamor_pixmap_clipped_regions * glamor_compute_clipped_regions(PixmapPtr pixmap, RegionPtr region, int *clipped_nbox, int repeat_type, int reverse, int upsidedown); glamor_pixmap_clipped_regions * glamor_compute_clipped_regions_ext(PixmapPtr pixmap, RegionPtr region, int *n_region, int inner_block_w, int inner_block_h, int reverse, int upsidedown); Bool glamor_composite_largepixmap_region(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, RegionPtr region, Bool force_clip, INT16 x_source, INT16 y_source, INT16 x_mask, INT16 y_mask, INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height); /** * Upload a picture to gl texture. Similar to the * glamor_upload_pixmap_to_texture. Used in rendering. **/ Bool glamor_upload_picture_to_texture(PicturePtr picture); void glamor_add_traps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap *traps); /* glamor_text.c */ int glamor_poly_text8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars); int glamor_poly_text16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars); void glamor_image_text8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars); void glamor_image_text16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars); /* glamor_spans.c */ void glamor_fill_spans(DrawablePtr drawable, GCPtr gc, int n, DDXPointPtr points, int *widths, int sorted); void glamor_get_spans(DrawablePtr drawable, int wmax, DDXPointPtr points, int *widths, int count, char *dst); void glamor_set_spans(DrawablePtr drawable, GCPtr gc, char *src, DDXPointPtr points, int *widths, int numPoints, int sorted); /* glamor_rects.c */ void glamor_poly_fill_rect(DrawablePtr drawable, GCPtr gc, int nrect, xRectangle *prect); /* glamor_image.c */ void glamor_put_image(DrawablePtr drawable, GCPtr gc, int depth, int x, int y, int w, int h, int leftPad, int format, char *bits); void glamor_get_image(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *d); /* glamor_dash.c */ Bool glamor_poly_lines_dash_gl(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points); Bool glamor_poly_segment_dash_gl(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs); /* glamor_lines.c */ void glamor_poly_lines(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points); /* glamor_segs.c */ void glamor_poly_segment(DrawablePtr drawable, GCPtr gc, int nseg, xSegment *segs); /* glamor_copy.c */ void glamor_copy(DrawablePtr src, DrawablePtr dst, GCPtr gc, BoxPtr box, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); RegionPtr glamor_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc, int srcx, int srcy, int width, int height, int dstx, int dsty); RegionPtr glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitplane); /* glamor_glyphblt.c */ void glamor_image_glyph_blt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase); void glamor_poly_glyph_blt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase); void glamor_push_pixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int w, int h, int x, int y); void glamor_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt); void glamor_composite_rectangles(CARD8 op, PicturePtr dst, xRenderColor *color, int num_rects, xRectangle *rects); /* glamor_composite_glyphs.c */ Bool glamor_composite_glyphs_init(ScreenPtr pScreen); void glamor_composite_glyphs_fini(ScreenPtr pScreen); void glamor_composite_glyphs(CARD8 op, PicturePtr src, PicturePtr dst, PictFormatPtr mask_format, INT16 x_src, INT16 y_src, int nlist, GlyphListPtr list, GlyphPtr *glyphs); /* glamor_sync.c */ Bool glamor_sync_init(ScreenPtr screen); void glamor_sync_close(ScreenPtr screen); /* glamor_util.c */ void glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height, unsigned long fg_pixel); void glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, unsigned long fg_pixel); /* glamor_xv */ typedef struct { uint32_t transform_index; uint32_t gamma; /* gamma value x 1000 */ int brightness; int saturation; int hue; int contrast; DrawablePtr pDraw; PixmapPtr pPixmap; uint32_t src_pitch; uint8_t *src_addr; int src_w, src_h, dst_w, dst_h; int src_x, src_y, drw_x, drw_y; int w, h; RegionRec clip; PixmapPtr src_pix[3]; /* y, u, v for planar */ int src_pix_w, src_pix_h; } glamor_port_private; extern XvAttributeRec glamor_xv_attributes[]; extern int glamor_xv_num_attributes; extern XvImageRec glamor_xv_images[]; extern int glamor_xv_num_images; void glamor_xv_init_port(glamor_port_private *port_priv); void glamor_xv_stop_video(glamor_port_private *port_priv); int glamor_xv_set_port_attribute(glamor_port_private *port_priv, Atom attribute, INT32 value); int glamor_xv_get_port_attribute(glamor_port_private *port_priv, Atom attribute, INT32 *value); int glamor_xv_query_image_attributes(int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets); int glamor_xv_put_image(glamor_port_private *port_priv, DrawablePtr pDrawable, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes); void glamor_xv_core_init(ScreenPtr screen); void glamor_xv_render(glamor_port_private *port_priv, int id); #include "glamor_utils.h" #if 0 #define MAX_FBO_SIZE 32 /* For test purpose only. */ #endif #include "glamor_font.h" #define GLAMOR_MIN_ALU_INSTRUCTIONS 128 /* Minimum required number of native ALU instructions */ #endif /* GLAMOR_PRIV_H */ xorg-server-21.1.16/glamor/glamor_pixmap.c0000644000175000017500000001171714757411105014126 /* * Copyright © 2001 Keith Packard * Copyright © 2008 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * Zhigang Gong * */ #include #include "glamor_priv.h" /** * Sets the offsets to add to coordinates to make them address the same bits in * the backing drawable. These coordinates are nonzero only for redirected * windows. */ void glamor_get_drawable_deltas(DrawablePtr drawable, PixmapPtr pixmap, int *x, int *y) { #ifdef COMPOSITE if (drawable->type == DRAWABLE_WINDOW) { *x = -pixmap->screen_x; *y = -pixmap->screen_y; return; } #endif *x = 0; *y = 0; } void glamor_pixmap_init(ScreenPtr screen) { } void glamor_pixmap_fini(ScreenPtr screen) { } void glamor_set_destination_pixmap_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo, int x0, int y0, int width, int height) { glamor_make_current(glamor_priv); glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb); glViewport(x0, y0, width, height); } void glamor_set_destination_pixmap_priv_nc(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv) { int w, h; PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, pixmap_priv, w, h); glamor_set_destination_pixmap_fbo(glamor_priv, pixmap_priv->fbo, 0, 0, w, h); } int glamor_set_destination_pixmap_priv(glamor_screen_private *glamor_priv, PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv) { if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) return -1; glamor_set_destination_pixmap_priv_nc(glamor_priv, pixmap, pixmap_priv); return 0; } int glamor_set_destination_pixmap(PixmapPtr pixmap) { int err; glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); err = glamor_set_destination_pixmap_priv(glamor_priv, pixmap, pixmap_priv); return err; } Bool glamor_set_planemask(int depth, unsigned long planemask) { if (glamor_pm_is_solid(depth, planemask)) { return GL_TRUE; } glamor_fallback("unsupported planemask %lx\n", planemask); return GL_FALSE; } Bool glamor_set_alu(ScreenPtr screen, unsigned char alu) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); if (glamor_priv->is_gles) { if (alu != GXcopy) return FALSE; else return TRUE; } if (alu == GXcopy) { glDisable(GL_COLOR_LOGIC_OP); return TRUE; } glEnable(GL_COLOR_LOGIC_OP); switch (alu) { case GXclear: glLogicOp(GL_CLEAR); break; case GXand: glLogicOp(GL_AND); break; case GXandReverse: glLogicOp(GL_AND_REVERSE); break; case GXandInverted: glLogicOp(GL_AND_INVERTED); break; case GXnoop: glLogicOp(GL_NOOP); break; case GXxor: glLogicOp(GL_XOR); break; case GXor: glLogicOp(GL_OR); break; case GXnor: glLogicOp(GL_NOR); break; case GXequiv: glLogicOp(GL_EQUIV); break; case GXinvert: glLogicOp(GL_INVERT); break; case GXorReverse: glLogicOp(GL_OR_REVERSE); break; case GXcopyInverted: glLogicOp(GL_COPY_INVERTED); break; case GXorInverted: glLogicOp(GL_OR_INVERTED); break; case GXnand: glLogicOp(GL_NAND); break; case GXset: glLogicOp(GL_SET); break; default: glamor_fallback("unsupported alu %x\n", alu); return FALSE; } return TRUE; } xorg-server-21.1.16/glamor/glamor_largepixmap.c0000644000175000017500000017023314757411105015140 #include #include /* For INT16_MAX */ #include "glamor_priv.h" static void glamor_get_transform_extent_from_box(struct pixman_box32 *box, struct pixman_transform *transform); static inline glamor_pixmap_private * __glamor_large(glamor_pixmap_private *pixmap_priv) { assert(glamor_pixmap_priv_is_large(pixmap_priv)); return pixmap_priv; } /** * Clip the boxes regards to each pixmap's block array. * * Should translate the region to relative coords to the pixmap, * start at (0,0). */ #if 0 //#define DEBUGF(str, ...) do {} while(0) #define DEBUGF(str, ...) ErrorF(str, ##__VA_ARGS__) //#define DEBUGRegionPrint(x) do {} while (0) #define DEBUGRegionPrint RegionPrint #endif static glamor_pixmap_clipped_regions * __glamor_compute_clipped_regions(int block_w, int block_h, int block_stride, int x, int y, int w, int h, RegionPtr region, int *n_region, int reverse, int upsidedown) { glamor_pixmap_clipped_regions *clipped_regions; BoxPtr extent; int start_x, start_y, end_x, end_y; int start_block_x, start_block_y; int end_block_x, end_block_y; int loop_start_block_x, loop_start_block_y; int loop_end_block_x, loop_end_block_y; int loop_block_stride; int i, j, delta_i, delta_j; RegionRec temp_region; RegionPtr current_region; int block_idx; int k = 0; int temp_block_idx; extent = RegionExtents(region); start_x = MAX(x, extent->x1); start_y = MAX(y, extent->y1); end_x = MIN(x + w, extent->x2); end_y = MIN(y + h, extent->y2); DEBUGF("start compute clipped regions:\n"); DEBUGF("block w %d h %d x %d y %d w %d h %d, block_stride %d \n", block_w, block_h, x, y, w, h, block_stride); DEBUGRegionPrint(region); DEBUGF("start_x %d start_y %d end_x %d end_y %d \n", start_x, start_y, end_x, end_y); if (start_x >= end_x || start_y >= end_y) { *n_region = 0; return NULL; } start_block_x = (start_x - x) / block_w; start_block_y = (start_y - y) / block_h; end_block_x = (end_x - x) / block_w; end_block_y = (end_y - y) / block_h; clipped_regions = calloc((end_block_x - start_block_x + 1) * (end_block_y - start_block_y + 1), sizeof(*clipped_regions)); DEBUGF("startx %d starty %d endx %d endy %d \n", start_x, start_y, end_x, end_y); DEBUGF("start_block_x %d end_block_x %d \n", start_block_x, end_block_x); DEBUGF("start_block_y %d end_block_y %d \n", start_block_y, end_block_y); if (!reverse) { loop_start_block_x = start_block_x; loop_end_block_x = end_block_x + 1; delta_i = 1; } else { loop_start_block_x = end_block_x; loop_end_block_x = start_block_x - 1; delta_i = -1; } if (!upsidedown) { loop_start_block_y = start_block_y; loop_end_block_y = end_block_y + 1; delta_j = 1; } else { loop_start_block_y = end_block_y; loop_end_block_y = start_block_y - 1; delta_j = -1; } loop_block_stride = delta_j * block_stride; block_idx = (loop_start_block_y - delta_j) * block_stride; for (j = loop_start_block_y; j != loop_end_block_y; j += delta_j) { block_idx += loop_block_stride; temp_block_idx = block_idx + loop_start_block_x; for (i = loop_start_block_x; i != loop_end_block_x; i += delta_i, temp_block_idx += delta_i) { BoxRec temp_box; temp_box.x1 = x + i * block_w; temp_box.y1 = y + j * block_h; temp_box.x2 = MIN(temp_box.x1 + block_w, end_x); temp_box.y2 = MIN(temp_box.y1 + block_h, end_y); RegionInitBoxes(&temp_region, &temp_box, 1); DEBUGF("block idx %d \n", temp_block_idx); DEBUGRegionPrint(&temp_region); current_region = RegionCreate(NULL, 4); RegionIntersect(current_region, &temp_region, region); DEBUGF("i %d j %d region: \n", i, j); DEBUGRegionPrint(current_region); if (RegionNumRects(current_region)) { clipped_regions[k].region = current_region; clipped_regions[k].block_idx = temp_block_idx; k++; } else RegionDestroy(current_region); RegionUninit(&temp_region); } } *n_region = k; return clipped_regions; } /** * Do a two round clipping, * first is to clip the region regard to current pixmap's * block array. Then for each clipped region, do a inner * block clipping. This is to make sure the final result * will be shapped by inner_block_w and inner_block_h, and * the final region also will not cross the pixmap's block * boundary. * * This is mainly used by transformation support when do * compositing. */ glamor_pixmap_clipped_regions * glamor_compute_clipped_regions_ext(PixmapPtr pixmap, RegionPtr region, int *n_region, int inner_block_w, int inner_block_h, int reverse, int upsidedown) { glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); glamor_pixmap_clipped_regions *clipped_regions, *inner_regions, *result_regions; int i, j, x, y, k, inner_n_regions; int width, height; BoxPtr box_array; BoxRec small_box; int block_w, block_h; DEBUGF("ext called \n"); if (glamor_pixmap_priv_is_small(pixmap_priv)) { clipped_regions = calloc(1, sizeof(*clipped_regions)); if (clipped_regions == NULL) { *n_region = 0; return NULL; } clipped_regions[0].region = RegionCreate(NULL, 1); clipped_regions[0].block_idx = 0; RegionCopy(clipped_regions[0].region, region); *n_region = 1; block_w = pixmap->drawable.width; block_h = pixmap->drawable.height; box_array = &small_box; small_box.x1 = small_box.y1 = 0; small_box.x2 = block_w; small_box.y2 = block_h; } else { glamor_pixmap_private *priv = __glamor_large(pixmap_priv); clipped_regions = __glamor_compute_clipped_regions(priv->block_w, priv->block_h, priv->block_wcnt, 0, 0, pixmap->drawable.width, pixmap->drawable.height, region, n_region, reverse, upsidedown); if (clipped_regions == NULL) { *n_region = 0; return NULL; } block_w = priv->block_w; block_h = priv->block_h; box_array = priv->box_array; } if (inner_block_w >= block_w && inner_block_h >= block_h) return clipped_regions; result_regions = calloc(*n_region * ((block_w + inner_block_w - 1) / inner_block_w) * ((block_h + inner_block_h - 1) / inner_block_h), sizeof(*result_regions)); k = 0; for (i = 0; i < *n_region; i++) { x = box_array[clipped_regions[i].block_idx].x1; y = box_array[clipped_regions[i].block_idx].y1; width = box_array[clipped_regions[i].block_idx].x2 - x; height = box_array[clipped_regions[i].block_idx].y2 - y; inner_regions = __glamor_compute_clipped_regions(inner_block_w, inner_block_h, 0, x, y, width, height, clipped_regions[i]. region, &inner_n_regions, reverse, upsidedown); for (j = 0; j < inner_n_regions; j++) { result_regions[k].region = inner_regions[j].region; result_regions[k].block_idx = clipped_regions[i].block_idx; k++; } free(inner_regions); } *n_region = k; free(clipped_regions); return result_regions; } /* * * For the repeat pad mode, we can simply convert the region and * let the out-of-box region can cover the needed edge of the source/mask * Then apply a normal clip we can get what we want. */ static RegionPtr _glamor_convert_pad_region(RegionPtr region, int w, int h) { RegionPtr pad_region; int nrect; BoxPtr box; int overlap; nrect = RegionNumRects(region); box = RegionRects(region); pad_region = RegionCreate(NULL, 4); if (pad_region == NULL) return NULL; while (nrect--) { BoxRec pad_box; RegionRec temp_region; pad_box = *box; if (pad_box.x1 < 0 && pad_box.x2 <= 0) pad_box.x2 = 1; else if (pad_box.x1 >= w && pad_box.x2 > w) pad_box.x1 = w - 1; if (pad_box.y1 < 0 && pad_box.y2 <= 0) pad_box.y2 = 1; else if (pad_box.y1 >= h && pad_box.y2 > h) pad_box.y1 = h - 1; RegionInitBoxes(&temp_region, &pad_box, 1); RegionAppend(pad_region, &temp_region); RegionUninit(&temp_region); box++; } RegionValidate(pad_region, &overlap); return pad_region; } /* * For one type of large pixmap, its one direction is not exceed the * size limitation, and in another word, on one direction it has only * one block. * * This case of reflect repeating, we can optimize it and avoid repeat * clip on that direction. We can just enlarge the repeat box and can * cover all the dest region on that direction. But latter, we need to * fixup the clipped result to get a correct coords for the subsequent * processing. This function is to do the coords correction. * * */ static void _glamor_largepixmap_reflect_fixup(short *xy1, short *xy2, int wh) { int odd1, odd2; int c1, c2; if (*xy2 - *xy1 > wh) { *xy1 = 0; *xy2 = wh; return; } modulus(*xy1, wh, c1); odd1 = ((*xy1 - c1) / wh) & 0x1; modulus(*xy2, wh, c2); odd2 = ((*xy2 - c2) / wh) & 0x1; if (odd1 && odd2) { *xy1 = wh - c2; *xy2 = wh - c1; } else if (odd1 && !odd2) { *xy1 = 0; *xy2 = MAX(c2, wh - c1); } else if (!odd1 && odd2) { *xy2 = wh; *xy1 = MIN(c1, wh - c2); } else { *xy1 = c1; *xy2 = c2; } } /** * Clip the boxes regards to each pixmap's block array. * * Should translate the region to relative coords to the pixmap, * start at (0,0). * * @is_transform: if it is set, it has a transform matrix. * */ static glamor_pixmap_clipped_regions * _glamor_compute_clipped_regions(PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv, RegionPtr region, int *n_region, int repeat_type, int is_transform, int reverse, int upsidedown) { glamor_pixmap_clipped_regions *clipped_regions; BoxPtr extent; int i, j; RegionPtr current_region; int pixmap_width, pixmap_height; int m; BoxRec repeat_box; RegionRec repeat_region; int right_shift = 0; int down_shift = 0; int x_center_shift = 0, y_center_shift = 0; glamor_pixmap_private *priv; DEBUGRegionPrint(region); if (glamor_pixmap_priv_is_small(pixmap_priv)) { clipped_regions = calloc(1, sizeof(*clipped_regions)); clipped_regions[0].region = RegionCreate(NULL, 1); clipped_regions[0].block_idx = 0; RegionCopy(clipped_regions[0].region, region); *n_region = 1; return clipped_regions; } priv = __glamor_large(pixmap_priv); pixmap_width = pixmap->drawable.width; pixmap_height = pixmap->drawable.height; if (repeat_type == 0 || repeat_type == RepeatPad) { RegionPtr saved_region = NULL; if (repeat_type == RepeatPad) { saved_region = region; region = _glamor_convert_pad_region(saved_region, pixmap_width, pixmap_height); if (region == NULL) { *n_region = 0; return NULL; } } clipped_regions = __glamor_compute_clipped_regions(priv->block_w, priv->block_h, priv->block_wcnt, 0, 0, pixmap->drawable.width, pixmap->drawable.height, region, n_region, reverse, upsidedown); if (saved_region) RegionDestroy(region); return clipped_regions; } extent = RegionExtents(region); x_center_shift = extent->x1 / pixmap_width; if (x_center_shift < 0) x_center_shift--; if (abs(x_center_shift) & 1) x_center_shift++; y_center_shift = extent->y1 / pixmap_height; if (y_center_shift < 0) y_center_shift--; if (abs(y_center_shift) & 1) y_center_shift++; if (extent->x1 < 0) right_shift = ((-extent->x1 + pixmap_width - 1) / pixmap_width); if (extent->y1 < 0) down_shift = ((-extent->y1 + pixmap_height - 1) / pixmap_height); if (right_shift != 0 || down_shift != 0) { if (repeat_type == RepeatReflect) { right_shift = (right_shift + 1) & ~1; down_shift = (down_shift + 1) & ~1; } RegionTranslate(region, right_shift * pixmap_width, down_shift * pixmap_height); } extent = RegionExtents(region); /* Tile a large pixmap to another large pixmap. * We can't use the target large pixmap as the * loop variable, instead we need to loop for all * the blocks in the tile pixmap. * * simulate repeat each single block to cover the * target's blocks. Two special case: * a block_wcnt == 1 or block_hcnt ==1, then we * only need to loop one direction as the other * direction is fully included in the first block. * * For the other cases, just need to start * from a proper shiftx/shifty, and then increase * y by tile_height each time to walk trhough the * target block and then walk trhough the target * at x direction by increate tile_width each time. * * This way, we can consolidate all the sub blocks * of the target boxes into one tile source's block. * * */ m = 0; clipped_regions = calloc(priv->block_wcnt * priv->block_hcnt, sizeof(*clipped_regions)); if (clipped_regions == NULL) { *n_region = 0; return NULL; } if (right_shift != 0 || down_shift != 0) { DEBUGF("region to be repeated shifted \n"); DEBUGRegionPrint(region); } DEBUGF("repeat pixmap width %d height %d \n", pixmap_width, pixmap_height); DEBUGF("extent x1 %d y1 %d x2 %d y2 %d \n", extent->x1, extent->y1, extent->x2, extent->y2); for (j = 0; j < priv->block_hcnt; j++) { for (i = 0; i < priv->block_wcnt; i++) { int dx = pixmap_width; int dy = pixmap_height; int idx; int shift_x; int shift_y; int saved_y1, saved_y2; int x_idx = 0, y_idx = 0, saved_y_idx = 0; RegionRec temp_region; BoxRec reflect_repeat_box; BoxPtr valid_repeat_box; shift_x = (extent->x1 / pixmap_width) * pixmap_width; shift_y = (extent->y1 / pixmap_height) * pixmap_height; idx = j * priv->block_wcnt + i; if (repeat_type == RepeatReflect) { x_idx = (extent->x1 / pixmap_width); y_idx = (extent->y1 / pixmap_height); } /* Construct a rect to clip the target region. */ repeat_box.x1 = shift_x + priv->box_array[idx].x1; repeat_box.y1 = shift_y + priv->box_array[idx].y1; if (priv->block_wcnt == 1) { repeat_box.x2 = extent->x2; dx = extent->x2 - repeat_box.x1; } else repeat_box.x2 = shift_x + priv->box_array[idx].x2; if (priv->block_hcnt == 1) { repeat_box.y2 = extent->y2; dy = extent->y2 - repeat_box.y1; } else repeat_box.y2 = shift_y + priv->box_array[idx].y2; current_region = RegionCreate(NULL, 4); RegionInit(&temp_region, NULL, 4); DEBUGF("init repeat box %d %d %d %d \n", repeat_box.x1, repeat_box.y1, repeat_box.x2, repeat_box.y2); if (repeat_type == RepeatNormal) { saved_y1 = repeat_box.y1; saved_y2 = repeat_box.y2; for (; repeat_box.x1 < extent->x2; repeat_box.x1 += dx, repeat_box.x2 += dx) { repeat_box.y1 = saved_y1; repeat_box.y2 = saved_y2; for (repeat_box.y1 = saved_y1, repeat_box.y2 = saved_y2; repeat_box.y1 < extent->y2; repeat_box.y1 += dy, repeat_box.y2 += dy) { RegionInitBoxes(&repeat_region, &repeat_box, 1); DEBUGF("Start to clip repeat region: \n"); DEBUGRegionPrint(&repeat_region); RegionIntersect(&temp_region, &repeat_region, region); DEBUGF("clip result:\n"); DEBUGRegionPrint(&temp_region); RegionAppend(current_region, &temp_region); RegionUninit(&repeat_region); } } } else if (repeat_type == RepeatReflect) { saved_y1 = repeat_box.y1; saved_y2 = repeat_box.y2; saved_y_idx = y_idx; for (;; repeat_box.x1 += dx, repeat_box.x2 += dx) { repeat_box.y1 = saved_y1; repeat_box.y2 = saved_y2; y_idx = saved_y_idx; reflect_repeat_box.x1 = (x_idx & 1) ? ((2 * x_idx + 1) * dx - repeat_box.x2) : repeat_box.x1; reflect_repeat_box.x2 = (x_idx & 1) ? ((2 * x_idx + 1) * dx - repeat_box.x1) : repeat_box.x2; valid_repeat_box = &reflect_repeat_box; if (valid_repeat_box->x1 >= extent->x2) break; for (repeat_box.y1 = saved_y1, repeat_box.y2 = saved_y2;; repeat_box.y1 += dy, repeat_box.y2 += dy) { DEBUGF("x_idx %d y_idx %d dx %d dy %d\n", x_idx, y_idx, dx, dy); DEBUGF("repeat box %d %d %d %d \n", repeat_box.x1, repeat_box.y1, repeat_box.x2, repeat_box.y2); if (priv->block_hcnt > 1) { reflect_repeat_box.y1 = (y_idx & 1) ? ((2 * y_idx + 1) * dy - repeat_box.y2) : repeat_box.y1; reflect_repeat_box.y2 = (y_idx & 1) ? ((2 * y_idx + 1) * dy - repeat_box.y1) : repeat_box.y2; } else { reflect_repeat_box.y1 = repeat_box.y1; reflect_repeat_box.y2 = repeat_box.y2; } DEBUGF("valid_repeat_box x1 %d y1 %d \n", valid_repeat_box->x1, valid_repeat_box->y1); if (valid_repeat_box->y1 >= extent->y2) break; RegionInitBoxes(&repeat_region, valid_repeat_box, 1); DEBUGF("start to clip repeat[reflect] region: \n"); DEBUGRegionPrint(&repeat_region); RegionIntersect(&temp_region, &repeat_region, region); DEBUGF("result:\n"); DEBUGRegionPrint(&temp_region); if (is_transform && RegionNumRects(&temp_region)) { BoxRec temp_box; BoxPtr temp_extent; temp_extent = RegionExtents(&temp_region); if (priv->block_wcnt > 1) { if (x_idx & 1) { temp_box.x1 = ((2 * x_idx + 1) * dx - temp_extent->x2); temp_box.x2 = ((2 * x_idx + 1) * dx - temp_extent->x1); } else { temp_box.x1 = temp_extent->x1; temp_box.x2 = temp_extent->x2; } modulus(temp_box.x1, pixmap_width, temp_box.x1); modulus(temp_box.x2, pixmap_width, temp_box.x2); if (temp_box.x2 == 0) temp_box.x2 = pixmap_width; } else { temp_box.x1 = temp_extent->x1; temp_box.x2 = temp_extent->x2; _glamor_largepixmap_reflect_fixup(&temp_box.x1, &temp_box.x2, pixmap_width); } if (priv->block_hcnt > 1) { if (y_idx & 1) { temp_box.y1 = ((2 * y_idx + 1) * dy - temp_extent->y2); temp_box.y2 = ((2 * y_idx + 1) * dy - temp_extent->y1); } else { temp_box.y1 = temp_extent->y1; temp_box.y2 = temp_extent->y2; } modulus(temp_box.y1, pixmap_height, temp_box.y1); modulus(temp_box.y2, pixmap_height, temp_box.y2); if (temp_box.y2 == 0) temp_box.y2 = pixmap_height; } else { temp_box.y1 = temp_extent->y1; temp_box.y2 = temp_extent->y2; _glamor_largepixmap_reflect_fixup(&temp_box.y1, &temp_box.y2, pixmap_height); } RegionInitBoxes(&temp_region, &temp_box, 1); RegionTranslate(&temp_region, x_center_shift * pixmap_width, y_center_shift * pixmap_height); DEBUGF("for transform result:\n"); DEBUGRegionPrint(&temp_region); } RegionAppend(current_region, &temp_region); RegionUninit(&repeat_region); y_idx++; } x_idx++; } } DEBUGF("dx %d dy %d \n", dx, dy); if (RegionNumRects(current_region)) { if ((right_shift != 0 || down_shift != 0) && !(is_transform && repeat_type == RepeatReflect)) RegionTranslate(current_region, -right_shift * pixmap_width, -down_shift * pixmap_height); clipped_regions[m].region = current_region; clipped_regions[m].block_idx = idx; m++; } else RegionDestroy(current_region); RegionUninit(&temp_region); } } if (right_shift != 0 || down_shift != 0) RegionTranslate(region, -right_shift * pixmap_width, -down_shift * pixmap_height); *n_region = m; return clipped_regions; } glamor_pixmap_clipped_regions * glamor_compute_clipped_regions(PixmapPtr pixmap, RegionPtr region, int *n_region, int repeat_type, int reverse, int upsidedown) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); return _glamor_compute_clipped_regions(pixmap, priv, region, n_region, repeat_type, 0, reverse, upsidedown); } /* XXX overflow still exist. maybe we need to change to use region32. * by default. Or just use region32 for repeat cases? **/ static glamor_pixmap_clipped_regions * glamor_compute_transform_clipped_regions(PixmapPtr pixmap, struct pixman_transform *transform, RegionPtr region, int *n_region, int dx, int dy, int repeat_type, int reverse, int upsidedown) { glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); BoxPtr temp_extent; struct pixman_box32 temp_box; struct pixman_box16 short_box; RegionPtr temp_region; glamor_pixmap_clipped_regions *ret; temp_region = RegionCreate(NULL, 4); temp_extent = RegionExtents(region); DEBUGF("dest region \n"); DEBUGRegionPrint(region); /* dx/dy may exceed MAX SHORT. we have to use * a box32 to represent it.*/ temp_box.x1 = temp_extent->x1 + dx; temp_box.x2 = temp_extent->x2 + dx; temp_box.y1 = temp_extent->y1 + dy; temp_box.y2 = temp_extent->y2 + dy; DEBUGF("source box %d %d %d %d \n", temp_box.x1, temp_box.y1, temp_box.x2, temp_box.y2); if (transform) glamor_get_transform_extent_from_box(&temp_box, transform); if (repeat_type == RepeatNone) { if (temp_box.x1 < 0) temp_box.x1 = 0; if (temp_box.y1 < 0) temp_box.y1 = 0; temp_box.x2 = MIN(temp_box.x2, pixmap->drawable.width); temp_box.y2 = MIN(temp_box.y2, pixmap->drawable.height); } /* Now copy back the box32 to a box16 box, avoiding overflow. */ short_box.x1 = MIN(temp_box.x1, INT16_MAX); short_box.y1 = MIN(temp_box.y1, INT16_MAX); short_box.x2 = MIN(temp_box.x2, INT16_MAX); short_box.y2 = MIN(temp_box.y2, INT16_MAX); RegionInitBoxes(temp_region, &short_box, 1); DEBUGF("copy to temp source region \n"); DEBUGRegionPrint(temp_region); ret = _glamor_compute_clipped_regions(pixmap, priv, temp_region, n_region, repeat_type, 1, reverse, upsidedown); DEBUGF("n_regions = %d \n", *n_region); RegionDestroy(temp_region); return ret; } /* * As transform and repeatpad mode. * We may get a clipped result which in multiple regions. * It's not easy to do a 2nd round clipping just as we do * without transform/repeatPad. As it's not easy to reverse * the 2nd round clipping result with a transform/repeatPad mode, * or even impossible for some transformation. * * So we have to merge the fragmental region into one region * if the clipped result cross the region boundary. */ static void glamor_merge_clipped_regions(PixmapPtr pixmap, glamor_pixmap_private *pixmap_priv, int repeat_type, glamor_pixmap_clipped_regions *clipped_regions, int *n_regions, int *need_clean_fbo) { BoxRec temp_box, copy_box; RegionPtr temp_region; glamor_pixmap_private *temp_priv; PixmapPtr temp_pixmap; int overlap; int i; int pixmap_width, pixmap_height; glamor_pixmap_private *priv; priv = __glamor_large(pixmap_priv); pixmap_width = pixmap->drawable.width; pixmap_height =pixmap->drawable.height; temp_region = RegionCreate(NULL, 4); for (i = 0; i < *n_regions; i++) { DEBUGF("Region %d:\n", i); DEBUGRegionPrint(clipped_regions[i].region); RegionAppend(temp_region, clipped_regions[i].region); } RegionValidate(temp_region, &overlap); DEBUGF("temp region: \n"); DEBUGRegionPrint(temp_region); temp_box = *RegionExtents(temp_region); DEBUGF("need copy region: \n"); DEBUGF("%d %d %d %d \n", temp_box.x1, temp_box.y1, temp_box.x2, temp_box.y2); temp_pixmap = glamor_create_pixmap(pixmap->drawable.pScreen, temp_box.x2 - temp_box.x1, temp_box.y2 - temp_box.y1, pixmap->drawable.depth, GLAMOR_CREATE_PIXMAP_FIXUP); if (temp_pixmap == NULL) { assert(0); return; } temp_priv = glamor_get_pixmap_private(temp_pixmap); assert(glamor_pixmap_priv_is_small(temp_priv)); priv->box = temp_box; if (temp_box.x1 >= 0 && temp_box.x2 <= pixmap_width && temp_box.y1 >= 0 && temp_box.y2 <= pixmap_height) { int dx, dy; copy_box.x1 = 0; copy_box.y1 = 0; copy_box.x2 = temp_box.x2 - temp_box.x1; copy_box.y2 = temp_box.y2 - temp_box.y1; dx = temp_box.x1; dy = temp_box.y1; glamor_copy(&pixmap->drawable, &temp_pixmap->drawable, NULL, ©_box, 1, dx, dy, 0, 0, 0, NULL); // glamor_solid(temp_pixmap, 0, 0, temp_pixmap->drawable.width, // temp_pixmap->drawable.height, GXcopy, 0xffffffff, 0xff00); } else { for (i = 0; i < *n_regions; i++) { BoxPtr box; int nbox; box = REGION_RECTS(clipped_regions[i].region); nbox = REGION_NUM_RECTS(clipped_regions[i].region); while (nbox--) { int dx, dy, c, d; DEBUGF("box x1 %d y1 %d x2 %d y2 %d \n", box->x1, box->y1, box->x2, box->y2); modulus(box->x1, pixmap_width, c); dx = c - (box->x1 - temp_box.x1); copy_box.x1 = box->x1 - temp_box.x1; copy_box.x2 = box->x2 - temp_box.x1; modulus(box->y1, pixmap_height, d); dy = d - (box->y1 - temp_box.y1); copy_box.y1 = box->y1 - temp_box.y1; copy_box.y2 = box->y2 - temp_box.y1; DEBUGF("copying box %d %d %d %d, dx %d dy %d\n", copy_box.x1, copy_box.y1, copy_box.x2, copy_box.y2, dx, dy); glamor_copy(&pixmap->drawable, &temp_pixmap->drawable, NULL, ©_box, 1, dx, dy, 0, 0, 0, NULL); box++; } } //glamor_solid(temp_pixmap, 0, 0, temp_pixmap->drawable.width, // temp_pixmap->drawable.height, GXcopy, 0xffffffff, 0xff); } /* The first region will be released at caller side. */ for (i = 1; i < *n_regions; i++) RegionDestroy(clipped_regions[i].region); RegionDestroy(temp_region); priv->box = temp_box; priv->fbo = glamor_pixmap_detach_fbo(temp_priv); DEBUGF("priv box x1 %d y1 %d x2 %d y2 %d \n", priv->box.x1, priv->box.y1, priv->box.x2, priv->box.y2); glamor_destroy_pixmap(temp_pixmap); *need_clean_fbo = 1; *n_regions = 1; } /** * Given an expected transformed block width and block height, * * This function calculate a new block width and height which * guarantee the transform result will not exceed the given * block width and height. * * For large block width and height (> 2048), we choose a * smaller new width and height and to reduce the cross region * boundary and can avoid some overhead. * **/ static Bool glamor_get_transform_block_size(struct pixman_transform *transform, int block_w, int block_h, int *transformed_block_w, int *transformed_block_h) { double a, b, c, d, e, f, g, h; double scale; int width, height; a = pixman_fixed_to_double(transform->matrix[0][0]); b = pixman_fixed_to_double(transform->matrix[0][1]); c = pixman_fixed_to_double(transform->matrix[1][0]); d = pixman_fixed_to_double(transform->matrix[1][1]); scale = pixman_fixed_to_double(transform->matrix[2][2]); if (block_w > 2048) { /* For large block size, we shrink it to smaller box, * thus latter we may get less cross boundary regions and * thus can avoid some extra copy. * **/ width = block_w / 4; height = block_h / 4; } else { width = block_w - 2; height = block_h - 2; } e = a + b; f = c + d; g = a - b; h = c - d; e = MIN(block_w, floor(width * scale) / MAX(fabs(e), fabs(g))); f = MIN(block_h, floor(height * scale) / MAX(fabs(f), fabs(h))); *transformed_block_w = MIN(e, f) - 1; *transformed_block_h = *transformed_block_w; if (*transformed_block_w <= 0 || *transformed_block_h <= 0) return FALSE; DEBUGF("original block_w/h %d %d, fixed %d %d \n", block_w, block_h, *transformed_block_w, *transformed_block_h); return TRUE; } #define VECTOR_FROM_POINT(p, x, y) do {\ p.v[0] = x; \ p.v[1] = y; \ p.v[2] = 1.0; } while (0) static void glamor_get_transform_extent_from_box(struct pixman_box32 *box, struct pixman_transform *transform) { struct pixman_f_vector p0, p1, p2, p3; float min_x, min_y, max_x, max_y; struct pixman_f_transform ftransform; VECTOR_FROM_POINT(p0, box->x1, box->y1); VECTOR_FROM_POINT(p1, box->x2, box->y1); VECTOR_FROM_POINT(p2, box->x2, box->y2); VECTOR_FROM_POINT(p3, box->x1, box->y2); pixman_f_transform_from_pixman_transform(&ftransform, transform); pixman_f_transform_point(&ftransform, &p0); pixman_f_transform_point(&ftransform, &p1); pixman_f_transform_point(&ftransform, &p2); pixman_f_transform_point(&ftransform, &p3); min_x = MIN(p0.v[0], p1.v[0]); min_x = MIN(min_x, p2.v[0]); min_x = MIN(min_x, p3.v[0]); min_y = MIN(p0.v[1], p1.v[1]); min_y = MIN(min_y, p2.v[1]); min_y = MIN(min_y, p3.v[1]); max_x = MAX(p0.v[0], p1.v[0]); max_x = MAX(max_x, p2.v[0]); max_x = MAX(max_x, p3.v[0]); max_y = MAX(p0.v[1], p1.v[1]); max_y = MAX(max_y, p2.v[1]); max_y = MAX(max_y, p3.v[1]); box->x1 = floor(min_x) - 1; box->y1 = floor(min_y) - 1; box->x2 = ceil(max_x) + 1; box->y2 = ceil(max_y) + 1; } static void _glamor_process_transformed_clipped_region(PixmapPtr pixmap, glamor_pixmap_private *priv, int repeat_type, glamor_pixmap_clipped_regions * clipped_regions, int *n_regions, int *need_clean_fbo) { int shift_x, shift_y; if (*n_regions != 1) { /* Merge all source regions into one region. */ glamor_merge_clipped_regions(pixmap, priv, repeat_type, clipped_regions, n_regions, need_clean_fbo); } else { glamor_set_pixmap_fbo_current(priv, clipped_regions[0].block_idx); if (repeat_type == RepeatReflect || repeat_type == RepeatNormal) { /* The required source areas are in one region, * we need to shift the corresponding box's coords to proper position, * thus we can calculate the relative coords correctly.*/ BoxPtr temp_box; int rem; temp_box = RegionExtents(clipped_regions[0].region); modulus(temp_box->x1, pixmap->drawable.width, rem); shift_x = (temp_box->x1 - rem) / pixmap->drawable.width; modulus(temp_box->y1, pixmap->drawable.height, rem); shift_y = (temp_box->y1 - rem) / pixmap->drawable.height; if (shift_x != 0) { __glamor_large(priv)->box.x1 += shift_x * pixmap->drawable.width; __glamor_large(priv)->box.x2 += shift_x * pixmap->drawable.width; } if (shift_y != 0) { __glamor_large(priv)->box.y1 += shift_y * pixmap->drawable.height; __glamor_large(priv)->box.y2 += shift_y * pixmap->drawable.height; } } } } Bool glamor_composite_largepixmap_region(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, PixmapPtr source_pixmap, PixmapPtr mask_pixmap, PixmapPtr dest_pixmap, RegionPtr region, Bool force_clip, INT16 x_source, INT16 y_source, INT16 x_mask, INT16 y_mask, INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height) { ScreenPtr screen = dest_pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *source_pixmap_priv = glamor_get_pixmap_private(source_pixmap); glamor_pixmap_private *mask_pixmap_priv = glamor_get_pixmap_private(mask_pixmap); glamor_pixmap_private *dest_pixmap_priv = glamor_get_pixmap_private(dest_pixmap); glamor_pixmap_clipped_regions *clipped_dest_regions; glamor_pixmap_clipped_regions *clipped_source_regions; glamor_pixmap_clipped_regions *clipped_mask_regions; int n_dest_regions; int n_mask_regions; int n_source_regions; int i, j, k; int need_clean_source_fbo = 0; int need_clean_mask_fbo = 0; int is_normal_source_fbo = 0; int is_normal_mask_fbo = 0; int fixed_block_width, fixed_block_height; int dest_block_width, dest_block_height; int null_source, null_mask; glamor_pixmap_private *need_free_source_pixmap_priv = NULL; glamor_pixmap_private *need_free_mask_pixmap_priv = NULL; int source_repeat_type = 0, mask_repeat_type = 0; int ok = TRUE; if (source_pixmap == dest_pixmap) { glamor_fallback("source and dest pixmaps are the same\n"); return FALSE; } if (mask_pixmap == dest_pixmap) { glamor_fallback("mask and dest pixmaps are the same\n"); return FALSE; } if (source->repeat) source_repeat_type = source->repeatType; else source_repeat_type = RepeatNone; if (mask && mask->repeat) mask_repeat_type = mask->repeatType; else mask_repeat_type = RepeatNone; if (glamor_pixmap_priv_is_large(dest_pixmap_priv)) { dest_block_width = __glamor_large(dest_pixmap_priv)->block_w; dest_block_height = __glamor_large(dest_pixmap_priv)->block_h; } else { dest_block_width = dest_pixmap->drawable.width; dest_block_height = dest_pixmap->drawable.height; } fixed_block_width = dest_block_width; fixed_block_height = dest_block_height; /* If we got an totally out-of-box region for a source or mask * region without repeat, we need to set it as null_source and * give it a solid color (0,0,0,0). */ null_source = 0; null_mask = 0; RegionTranslate(region, -dest->pDrawable->x, -dest->pDrawable->y); /* need to transform the dest region to the correct sourcei/mask region. * it's a little complex, as one single edge of the * target region may be transformed to cross a block boundary of the * source or mask. Then it's impossible to handle it as usual way. * We may have to split the original dest region to smaller region, and * make sure each region's transformed region can fit into one texture, * and then continue this loop again, and each time when a transformed region * cross the bound, we need to copy it to a single pixmap and do the composition * with the new pixmap. If the transformed region doesn't cross a source/mask's * boundary then we don't need to copy. * */ if (source_pixmap_priv && source->transform && glamor_pixmap_priv_is_large(source_pixmap_priv)) { int source_transformed_block_width, source_transformed_block_height; if (!glamor_get_transform_block_size(source->transform, __glamor_large(source_pixmap_priv)->block_w, __glamor_large(source_pixmap_priv)->block_h, &source_transformed_block_width, &source_transformed_block_height)) { DEBUGF("source block size less than 1, fallback.\n"); RegionTranslate(region, dest->pDrawable->x, dest->pDrawable->y); return FALSE; } fixed_block_width = min(fixed_block_width, source_transformed_block_width); fixed_block_height = min(fixed_block_height, source_transformed_block_height); DEBUGF("new source block size %d x %d \n", fixed_block_width, fixed_block_height); } if (mask_pixmap_priv && mask->transform && glamor_pixmap_priv_is_large(mask_pixmap_priv)) { int mask_transformed_block_width, mask_transformed_block_height; if (!glamor_get_transform_block_size(mask->transform, __glamor_large(mask_pixmap_priv)->block_w, __glamor_large(mask_pixmap_priv)->block_h, &mask_transformed_block_width, &mask_transformed_block_height)) { DEBUGF("mask block size less than 1, fallback.\n"); RegionTranslate(region, dest->pDrawable->x, dest->pDrawable->y); return FALSE; } fixed_block_width = min(fixed_block_width, mask_transformed_block_width); fixed_block_height = min(fixed_block_height, mask_transformed_block_height); DEBUGF("new mask block size %d x %d \n", fixed_block_width, fixed_block_height); } /*compute the correct block width and height whose transformed source/mask *region can fit into one texture.*/ if (force_clip || fixed_block_width < dest_block_width || fixed_block_height < dest_block_height) clipped_dest_regions = glamor_compute_clipped_regions_ext(dest_pixmap, region, &n_dest_regions, fixed_block_width, fixed_block_height, 0, 0); else clipped_dest_regions = glamor_compute_clipped_regions(dest_pixmap, region, &n_dest_regions, 0, 0, 0); DEBUGF("dest clipped result %d region: \n", n_dest_regions); if (source_pixmap_priv && (source_pixmap_priv == dest_pixmap_priv || source_pixmap_priv == mask_pixmap_priv) && glamor_pixmap_priv_is_large(source_pixmap_priv)) { /* XXX self-copy... */ need_free_source_pixmap_priv = source_pixmap_priv; source_pixmap_priv = malloc(sizeof(*source_pixmap_priv)); *source_pixmap_priv = *need_free_source_pixmap_priv; need_free_source_pixmap_priv = source_pixmap_priv; } assert(mask_pixmap_priv != dest_pixmap_priv); for (i = 0; i < n_dest_regions; i++) { DEBUGF("dest region %d idx %d\n", i, clipped_dest_regions[i].block_idx); DEBUGRegionPrint(clipped_dest_regions[i].region); glamor_set_pixmap_fbo_current(dest_pixmap_priv, clipped_dest_regions[i].block_idx); if (source_pixmap_priv && glamor_pixmap_priv_is_large(source_pixmap_priv)) { if (!source->transform && source_repeat_type != RepeatPad) { RegionTranslate(clipped_dest_regions[i].region, x_source - x_dest, y_source - y_dest); clipped_source_regions = glamor_compute_clipped_regions(source_pixmap, clipped_dest_regions[i]. region, &n_source_regions, source_repeat_type, 0, 0); is_normal_source_fbo = 1; } else { clipped_source_regions = glamor_compute_transform_clipped_regions(source_pixmap, source->transform, clipped_dest_regions [i].region, &n_source_regions, x_source - x_dest, y_source - y_dest, source_repeat_type, 0, 0); is_normal_source_fbo = 0; if (n_source_regions == 0) { /* Pad the out-of-box region to (0,0,0,0). */ null_source = 1; n_source_regions = 1; } else _glamor_process_transformed_clipped_region (source_pixmap, source_pixmap_priv, source_repeat_type, clipped_source_regions, &n_source_regions, &need_clean_source_fbo); } DEBUGF("source clipped result %d region: \n", n_source_regions); for (j = 0; j < n_source_regions; j++) { if (is_normal_source_fbo) glamor_set_pixmap_fbo_current(source_pixmap_priv, clipped_source_regions[j].block_idx); if (mask_pixmap_priv && glamor_pixmap_priv_is_large(mask_pixmap_priv)) { if (is_normal_mask_fbo && is_normal_source_fbo) { /* both mask and source are normal fbo box without transform or repeatpad. * The region is clipped against source and then we clip it against mask here.*/ DEBUGF("source region %d idx %d\n", j, clipped_source_regions[j].block_idx); DEBUGRegionPrint(clipped_source_regions[j].region); RegionTranslate(clipped_source_regions[j].region, -x_source + x_mask, -y_source + y_mask); clipped_mask_regions = glamor_compute_clipped_regions(mask_pixmap, clipped_source_regions [j].region, &n_mask_regions, mask_repeat_type, 0, 0); is_normal_mask_fbo = 1; } else if (is_normal_mask_fbo && !is_normal_source_fbo) { assert(n_source_regions == 1); /* The source fbo is not a normal fbo box, it has transform or repeatpad. * the valid clip region should be the clip dest region rather than the * clip source region.*/ RegionTranslate(clipped_dest_regions[i].region, -x_dest + x_mask, -y_dest + y_mask); clipped_mask_regions = glamor_compute_clipped_regions(mask_pixmap, clipped_dest_regions [i].region, &n_mask_regions, mask_repeat_type, 0, 0); is_normal_mask_fbo = 1; } else { /* This mask region has transform or repeatpad, we need clip it against the previous * valid region rather than the mask region. */ if (!is_normal_source_fbo) clipped_mask_regions = glamor_compute_transform_clipped_regions (mask_pixmap, mask->transform, clipped_dest_regions[i].region, &n_mask_regions, x_mask - x_dest, y_mask - y_dest, mask_repeat_type, 0, 0); else clipped_mask_regions = glamor_compute_transform_clipped_regions (mask_pixmap, mask->transform, clipped_source_regions[j].region, &n_mask_regions, x_mask - x_source, y_mask - y_source, mask_repeat_type, 0, 0); is_normal_mask_fbo = 0; if (n_mask_regions == 0) { /* Pad the out-of-box region to (0,0,0,0). */ null_mask = 1; n_mask_regions = 1; } else _glamor_process_transformed_clipped_region (mask_pixmap, mask_pixmap_priv, mask_repeat_type, clipped_mask_regions, &n_mask_regions, &need_clean_mask_fbo); } DEBUGF("mask clipped result %d region: \n", n_mask_regions); #define COMPOSITE_REGION(region) do { \ if (!glamor_composite_clipped_region(op, \ null_source ? NULL : source, \ null_mask ? NULL : mask, dest, \ null_source ? NULL : source_pixmap, \ null_mask ? NULL : mask_pixmap, \ dest_pixmap, region, \ x_source, y_source, x_mask, y_mask, \ x_dest, y_dest)) { \ assert(0); \ } \ } while(0) for (k = 0; k < n_mask_regions; k++) { DEBUGF("mask region %d idx %d\n", k, clipped_mask_regions[k].block_idx); DEBUGRegionPrint(clipped_mask_regions[k].region); if (is_normal_mask_fbo) { glamor_set_pixmap_fbo_current(mask_pixmap_priv, clipped_mask_regions[k]. block_idx); DEBUGF("mask fbo off %d %d \n", __glamor_large(mask_pixmap_priv)->box.x1, __glamor_large(mask_pixmap_priv)->box.y1); DEBUGF("start composite mask hasn't transform.\n"); RegionTranslate(clipped_mask_regions[k].region, x_dest - x_mask + dest->pDrawable->x, y_dest - y_mask + dest->pDrawable->y); COMPOSITE_REGION(clipped_mask_regions[k].region); } else if (!is_normal_mask_fbo && !is_normal_source_fbo) { DEBUGF ("start composite both mask and source have transform.\n"); RegionTranslate(clipped_dest_regions[i].region, dest->pDrawable->x, dest->pDrawable->y); COMPOSITE_REGION(clipped_dest_regions[i].region); } else { DEBUGF ("start composite only mask has transform.\n"); RegionTranslate(clipped_source_regions[j].region, x_dest - x_source + dest->pDrawable->x, y_dest - y_source + dest->pDrawable->y); COMPOSITE_REGION(clipped_source_regions[j].region); } RegionDestroy(clipped_mask_regions[k].region); } free(clipped_mask_regions); if (null_mask) null_mask = 0; if (need_clean_mask_fbo) { assert(is_normal_mask_fbo == 0); glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->fbo); mask_pixmap_priv->fbo = NULL; need_clean_mask_fbo = 0; } } else { if (is_normal_source_fbo) { RegionTranslate(clipped_source_regions[j].region, -x_source + x_dest + dest->pDrawable->x, -y_source + y_dest + dest->pDrawable->y); COMPOSITE_REGION(clipped_source_regions[j].region); } else { /* Source has transform or repeatPad. dest regions is the right * region to do the composite. */ RegionTranslate(clipped_dest_regions[i].region, dest->pDrawable->x, dest->pDrawable->y); COMPOSITE_REGION(clipped_dest_regions[i].region); } } if (clipped_source_regions && clipped_source_regions[j].region) RegionDestroy(clipped_source_regions[j].region); } free(clipped_source_regions); if (null_source) null_source = 0; if (need_clean_source_fbo) { assert(is_normal_source_fbo == 0); glamor_destroy_fbo(glamor_priv, source_pixmap_priv->fbo); source_pixmap_priv->fbo = NULL; need_clean_source_fbo = 0; } } else { if (mask_pixmap_priv && glamor_pixmap_priv_is_large(mask_pixmap_priv)) { if (!mask->transform && mask_repeat_type != RepeatPad) { RegionTranslate(clipped_dest_regions[i].region, x_mask - x_dest, y_mask - y_dest); clipped_mask_regions = glamor_compute_clipped_regions(mask_pixmap, clipped_dest_regions[i]. region, &n_mask_regions, mask_repeat_type, 0, 0); is_normal_mask_fbo = 1; } else { clipped_mask_regions = glamor_compute_transform_clipped_regions (mask_pixmap, mask->transform, clipped_dest_regions[i].region, &n_mask_regions, x_mask - x_dest, y_mask - y_dest, mask_repeat_type, 0, 0); is_normal_mask_fbo = 0; if (n_mask_regions == 0) { /* Pad the out-of-box region to (0,0,0,0). */ null_mask = 1; n_mask_regions = 1; } else _glamor_process_transformed_clipped_region (mask_pixmap, mask_pixmap_priv, mask_repeat_type, clipped_mask_regions, &n_mask_regions, &need_clean_mask_fbo); } for (k = 0; k < n_mask_regions; k++) { DEBUGF("mask region %d idx %d\n", k, clipped_mask_regions[k].block_idx); DEBUGRegionPrint(clipped_mask_regions[k].region); if (is_normal_mask_fbo) { glamor_set_pixmap_fbo_current(mask_pixmap_priv, clipped_mask_regions[k]. block_idx); RegionTranslate(clipped_mask_regions[k].region, x_dest - x_mask + dest->pDrawable->x, y_dest - y_mask + dest->pDrawable->y); COMPOSITE_REGION(clipped_mask_regions[k].region); } else { RegionTranslate(clipped_dest_regions[i].region, dest->pDrawable->x, dest->pDrawable->y); COMPOSITE_REGION(clipped_dest_regions[i].region); } RegionDestroy(clipped_mask_regions[k].region); } free(clipped_mask_regions); if (null_mask) null_mask = 0; if (need_clean_mask_fbo) { glamor_destroy_fbo(glamor_priv, mask_pixmap_priv->fbo); mask_pixmap_priv->fbo = NULL; need_clean_mask_fbo = 0; } } else { RegionTranslate(clipped_dest_regions[i].region, dest->pDrawable->x, dest->pDrawable->y); COMPOSITE_REGION(clipped_dest_regions[i].region); } } RegionDestroy(clipped_dest_regions[i].region); } free(clipped_dest_regions); free(need_free_source_pixmap_priv); free(need_free_mask_pixmap_priv); ok = TRUE; return ok; } xorg-server-21.1.16/glamor/glamor_picture.c0000644000175000017500000002663214757411105014305 /* * Copyright © 2016 Broadcom * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file glamor_picture.c * * Implements temporary uploads of GL_MEMORY Pixmaps to a texture that * is swizzled appropriately for a given Render picture format. * laid * * * This is important because GTK likes to use SHM Pixmaps for Render * blending operations, and we don't want a blend operation to fall * back to software (readback is more expensive than the upload we do * here, and you'd have to re-upload the fallback output anyway). */ #include #include "glamor_priv.h" #include "mipict.h" static void byte_swap_swizzle(GLenum *swizzle) { GLenum temp; temp = swizzle[0]; swizzle[0] = swizzle[3]; swizzle[3] = temp; temp = swizzle[1]; swizzle[1] = swizzle[2]; swizzle[2] = temp; } /** * Returns the GL format and type for uploading our bits to a given PictFormat. * * We may need to tell the caller to translate the bits to another * format, as in PICT_a1 (which GL doesn't support). We may also need * to tell the GL to swizzle the texture on sampling, because GLES3 * doesn't support the GL_UNSIGNED_INT_8_8_8_8{,_REV} types, so we * don't have enough channel reordering options at upload time without * it. */ static Bool glamor_get_tex_format_type_from_pictformat(ScreenPtr pScreen, PictFormatShort format, PictFormatShort *temp_format, GLenum *tex_format, GLenum *tex_type, GLenum *swizzle) { glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen); Bool is_little_endian = IMAGE_BYTE_ORDER == LSBFirst; *temp_format = format; swizzle[0] = GL_RED; swizzle[1] = GL_GREEN; swizzle[2] = GL_BLUE; swizzle[3] = GL_ALPHA; switch (format) { case PICT_a1: *tex_format = glamor_priv->formats[1].format; *tex_type = GL_UNSIGNED_BYTE; *temp_format = PICT_a8; break; case PICT_b8g8r8x8: case PICT_b8g8r8a8: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_8_8_8_8; } else { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_BYTE; swizzle[0] = GL_GREEN; swizzle[1] = GL_BLUE; swizzle[2] = GL_ALPHA; swizzle[3] = GL_RED; if (!is_little_endian) byte_swap_swizzle(swizzle); } break; case PICT_x8r8g8b8: case PICT_a8r8g8b8: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; } else { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_BYTE; if (!is_little_endian) byte_swap_swizzle(swizzle); break; } break; case PICT_x8b8g8r8: case PICT_a8b8g8r8: *tex_format = GL_RGBA; if (!glamor_priv->is_gles) { *tex_type = GL_UNSIGNED_INT_8_8_8_8_REV; } else { *tex_format = GL_RGBA; *tex_type = GL_UNSIGNED_BYTE; if (!is_little_endian) byte_swap_swizzle(swizzle); } break; case PICT_x2r10g10b10: case PICT_a2r10g10b10: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_INT_2_10_10_10_REV; } else { return FALSE; } break; case PICT_x2b10g10r10: case PICT_a2b10g10r10: if (!glamor_priv->is_gles) { *tex_format = GL_RGBA; *tex_type = GL_UNSIGNED_INT_2_10_10_10_REV; } else { return FALSE; } break; case PICT_r5g6b5: *tex_format = GL_RGB; *tex_type = GL_UNSIGNED_SHORT_5_6_5; break; case PICT_b5g6r5: *tex_format = GL_RGB; if (!glamor_priv->is_gles) { *tex_type = GL_UNSIGNED_SHORT_5_6_5_REV; } else { *tex_type = GL_UNSIGNED_SHORT_5_6_5; swizzle[0] = GL_BLUE; swizzle[2] = GL_RED; } break; case PICT_x1b5g5r5: case PICT_a1b5g5r5: *tex_format = GL_RGBA; if (!glamor_priv->is_gles) { *tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; } else { return FALSE; } break; case PICT_x1r5g5b5: case PICT_a1r5g5b5: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_SHORT_1_5_5_5_REV; } else { return FALSE; } break; case PICT_a8: *tex_format = glamor_priv->formats[8].format; *tex_type = GL_UNSIGNED_BYTE; break; case PICT_x4r4g4b4: case PICT_a4r4g4b4: if (!glamor_priv->is_gles) { *tex_format = GL_BGRA; *tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV; } else { /* XXX */ *tex_format = GL_RGBA; *tex_type = GL_UNSIGNED_SHORT_4_4_4_4; } break; case PICT_x4b4g4r4: case PICT_a4b4g4r4: if (!glamor_priv->is_gles) { *tex_format = GL_RGBA; *tex_type = GL_UNSIGNED_SHORT_4_4_4_4_REV; } else { /* XXX */ *tex_format = GL_RGBA; *tex_type = GL_UNSIGNED_SHORT_4_4_4_4; } break; default: return FALSE; } if (!PICT_FORMAT_A(format)) swizzle[3] = GL_ONE; return TRUE; } /** * Takes a set of source bits with a given format and returns an * in-memory pixman image of those bits in a destination format. */ static pixman_image_t * glamor_get_converted_image(PictFormatShort dst_format, PictFormatShort src_format, void *src_bits, int src_stride, int w, int h) { pixman_image_t *dst_image; pixman_image_t *src_image; dst_image = pixman_image_create_bits(dst_format, w, h, NULL, 0); if (dst_image == NULL) { return NULL; } src_image = pixman_image_create_bits(src_format, w, h, src_bits, src_stride); if (src_image == NULL) { pixman_image_unref(dst_image); return NULL; } pixman_image_composite(PictOpSrc, src_image, NULL, dst_image, 0, 0, 0, 0, 0, 0, w, h); pixman_image_unref(src_image); return dst_image; } /** * Uploads a picture based on a GLAMOR_MEMORY pixmap to a texture in a * temporary FBO. */ Bool glamor_upload_picture_to_texture(PicturePtr picture) { PixmapPtr pixmap = glamor_get_drawable_pixmap(picture->pDrawable); ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); PictFormatShort converted_format; void *bits = pixmap->devPrivate.ptr; int stride = pixmap->devKind; GLenum format, type; GLenum swizzle[4]; GLenum iformat; Bool ret = TRUE; Bool needs_swizzle; pixman_image_t *converted_image = NULL; const struct glamor_format *f = glamor_format_for_pixmap(pixmap); assert(glamor_pixmap_is_memory(pixmap)); assert(!pixmap_priv->fbo); glamor_make_current(glamor_priv); /* No handling of large pixmap pictures here (would need to make * an FBO array and split the uploads across it). */ if (!glamor_check_fbo_size(glamor_priv, pixmap->drawable.width, pixmap->drawable.height)) { return FALSE; } if (!glamor_get_tex_format_type_from_pictformat(screen, picture->format, &converted_format, &format, &type, swizzle)) { glamor_fallback("Unknown pixmap depth %d.\n", pixmap->drawable.depth); return FALSE; } needs_swizzle = (swizzle[0] != GL_RED || swizzle[1] != GL_GREEN || swizzle[2] != GL_BLUE || swizzle[3] != GL_ALPHA); if (!glamor_priv->has_texture_swizzle && needs_swizzle) { glamor_fallback("Couldn't upload temporary picture due to missing " "GL_ARB_texture_swizzle.\n"); return FALSE; } if (converted_format != picture->format) { converted_image = glamor_get_converted_image(converted_format, picture->format, bits, stride, pixmap->drawable.width, pixmap->drawable.height); if (!converted_image) return FALSE; bits = pixman_image_get_data(converted_image); stride = pixman_image_get_stride(converted_image); } if (!glamor_priv->is_gles) iformat = f->internalformat; else iformat = format; if (!glamor_pixmap_ensure_fbo(pixmap, GLAMOR_CREATE_FBO_NO_FBO)) { ret = FALSE; goto fail; } glPixelStorei(GL_UNPACK_ALIGNMENT, 4); glamor_priv->suppress_gl_out_of_memory_logging = true; /* We can't use glamor_pixmap_loop() because GLAMOR_MEMORY pixmaps * don't have initialized boxes. */ glBindTexture(GL_TEXTURE_2D, pixmap_priv->fbo->tex); glTexImage2D(GL_TEXTURE_2D, 0, iformat, pixmap->drawable.width, pixmap->drawable.height, 0, format, type, bits); if (needs_swizzle) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, swizzle[0]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_G, swizzle[1]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, swizzle[2]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, swizzle[3]); } glamor_priv->suppress_gl_out_of_memory_logging = false; if (glGetError() == GL_OUT_OF_MEMORY) { ret = FALSE; } fail: if (converted_image) pixman_image_unref(converted_image); return ret; } xorg-server-21.1.16/glamor/glamor_vbo.c0000644000175000017500000001600314757411105013407 /* * Copyright © 2014 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file glamor_vbo.c * * Helpers for managing streamed vertex buffers used in glamor. */ #include "glamor_priv.h" /** Default size of the VBO, in bytes. * * If a single request is larger than this size, we'll resize the VBO * and return an appropriate mapping, but we'll resize back down after * that to avoid hogging that memory forever. We don't anticipate * normal usage actually requiring larger VBO sizes. */ #define GLAMOR_VBO_SIZE (512 * 1024) /** * Returns a pointer to @size bytes of VBO storage, which should be * accessed by the GL using vbo_offset within the VBO. */ void * glamor_get_vbo_space(ScreenPtr screen, unsigned size, char **vbo_offset) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); void *data; glamor_make_current(glamor_priv); glBindBuffer(GL_ARRAY_BUFFER, glamor_priv->vbo); if (glamor_priv->has_buffer_storage) { if (glamor_priv->vbo_size < glamor_priv->vbo_offset + size) { if (glamor_priv->vbo_size) glUnmapBuffer(GL_ARRAY_BUFFER); if (size > glamor_priv->vbo_size) { glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size); /* We aren't allowed to resize glBufferStorage() * buffers, so we need to gen a new one. */ glDeleteBuffers(1, &glamor_priv->vbo); glGenBuffers(1, &glamor_priv->vbo); glBindBuffer(GL_ARRAY_BUFFER, glamor_priv->vbo); assert(glGetError() == GL_NO_ERROR); glBufferStorage(GL_ARRAY_BUFFER, glamor_priv->vbo_size, NULL, GL_MAP_WRITE_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); if (glGetError() != GL_NO_ERROR) { /* If the driver failed our coherent mapping, fall * back to the ARB_mbr path. */ glamor_priv->has_buffer_storage = false; glamor_priv->vbo_size = 0; return glamor_get_vbo_space(screen, size, vbo_offset); } } glamor_priv->vbo_offset = 0; glamor_priv->vb = glMapBufferRange(GL_ARRAY_BUFFER, 0, glamor_priv->vbo_size, GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT | GL_MAP_PERSISTENT_BIT | GL_MAP_COHERENT_BIT); } *vbo_offset = (void *)(uintptr_t)glamor_priv->vbo_offset; data = glamor_priv->vb + glamor_priv->vbo_offset; glamor_priv->vbo_offset += size; } else if (glamor_priv->has_map_buffer_range) { /* Avoid GL errors on GL 4.5 / ES 3.0 with mapping size == 0, * which callers may sometimes pass us (for example, if * clipping leads to zero rectangles left). Prior to that * version, Mesa would sometimes throw errors on unmapping a * zero-size mapping. */ if (size == 0) return NULL; if (glamor_priv->vbo_size < glamor_priv->vbo_offset + size) { glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size); glamor_priv->vbo_offset = 0; glBufferData(GL_ARRAY_BUFFER, glamor_priv->vbo_size, NULL, GL_STREAM_DRAW); } data = glMapBufferRange(GL_ARRAY_BUFFER, glamor_priv->vbo_offset, size, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT | GL_MAP_INVALIDATE_RANGE_BIT); *vbo_offset = (char *)(uintptr_t)glamor_priv->vbo_offset; glamor_priv->vbo_offset += size; glamor_priv->vbo_mapped = TRUE; } else { /* Return a pointer to the statically allocated non-VBO * memory. We'll upload it through glBufferData() later. */ if (glamor_priv->vbo_size < size) { glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size); free(glamor_priv->vb); glamor_priv->vb = xnfalloc(glamor_priv->vbo_size); } *vbo_offset = NULL; /* We point to the start of glamor_priv->vb every time, and * the vbo_offset determines the size of the glBufferData(). */ glamor_priv->vbo_offset = size; data = glamor_priv->vb; } return data; } void glamor_put_vbo_space(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); if (glamor_priv->has_buffer_storage) { /* If we're in the ARB_buffer_storage path, we have a * persistent mapping, so we can leave it around until we * reach the end of the buffer. */ } else if (glamor_priv->has_map_buffer_range) { if (glamor_priv->vbo_mapped) { glUnmapBuffer(GL_ARRAY_BUFFER); glamor_priv->vbo_mapped = FALSE; } } else { glBufferData(GL_ARRAY_BUFFER, glamor_priv->vbo_offset, glamor_priv->vb, GL_DYNAMIC_DRAW); } glBindBuffer(GL_ARRAY_BUFFER, 0); } void glamor_init_vbo(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glGenBuffers(1, &glamor_priv->vbo); glGenVertexArrays(1, &glamor_priv->vao); glBindVertexArray(glamor_priv->vao); } void glamor_fini_vbo(ScreenPtr screen) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glDeleteVertexArrays(1, &glamor_priv->vao); glamor_priv->vao = 0; if (!glamor_priv->has_map_buffer_range) free(glamor_priv->vb); } xorg-server-21.1.16/glamor/glamor_window.c0000644000175000017500000000463514757411105014140 /* * Copyright © 2008 Intel Corporation * Copyright © 1998 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. */ #include "glamor_priv.h" /** @file glamor_window.c * * Screen Change Window Attribute implementation. */ static void glamor_fixup_window_pixmap(DrawablePtr pDrawable, PixmapPtr *ppPixmap) { PixmapPtr pPixmap = *ppPixmap; glamor_pixmap_private *pixmap_priv; if (pPixmap->drawable.bitsPerPixel != pDrawable->bitsPerPixel) { pixmap_priv = glamor_get_pixmap_private(pPixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) { glamor_fallback("pixmap %p has no fbo\n", pPixmap); goto fail; } glamor_debug_output(GLAMOR_DEBUG_UNIMPL, "To be implemented.\n"); } return; fail: GLAMOR_PANIC (" We can't fall back to fbFixupWindowPixmap, as the fb24_32ReformatTile" " is broken for glamor. \n"); } Bool glamor_change_window_attributes(WindowPtr pWin, unsigned long mask) { if (mask & CWBackPixmap) { if (pWin->backgroundState == BackgroundPixmap) glamor_fixup_window_pixmap(&pWin->drawable, &pWin->background.pixmap); } if (mask & CWBorderPixmap) { if (pWin->borderIsPixel == FALSE) glamor_fixup_window_pixmap(&pWin->drawable, &pWin->border.pixmap); } return TRUE; } xorg-server-21.1.16/glamor/glamor_fbo.c0000644000175000017500000002617514757411105013402 /* * Copyright © 2009 Intel Corporation * Copyright © 1998 Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #include #include "glamor_priv.h" void glamor_destroy_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo) { glamor_make_current(glamor_priv); if (fbo->fb) glDeleteFramebuffers(1, &fbo->fb); if (fbo->tex) glDeleteTextures(1, &fbo->tex); free(fbo); } static int glamor_pixmap_ensure_fb(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo) { int status, err = 0; glamor_make_current(glamor_priv); if (fbo->fb == 0) glGenFramebuffers(1, &fbo->fb); assert(fbo->tex != 0); glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fbo->tex, 0); status = glCheckFramebufferStatus(GL_FRAMEBUFFER); if (status != GL_FRAMEBUFFER_COMPLETE) { const char *str; switch (status) { case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: str = "incomplete attachment"; break; case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: str = "incomplete/missing attachment"; break; case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER: str = "incomplete draw buffer"; break; case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER: str = "incomplete read buffer"; break; case GL_FRAMEBUFFER_UNSUPPORTED: str = "unsupported"; break; case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: str = "incomplete multiple"; break; default: str = "unknown error"; break; } glamor_fallback("glamor: Failed to create fbo, %s\n", str); err = -1; } return err; } glamor_pixmap_fbo * glamor_create_fbo_from_tex(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int w, int h, GLint tex, int flag) { const struct glamor_format *f = glamor_format_for_pixmap(pixmap); glamor_pixmap_fbo *fbo; fbo = calloc(1, sizeof(*fbo)); if (fbo == NULL) return NULL; fbo->tex = tex; fbo->width = w; fbo->height = h; fbo->is_red = f->format == GL_RED; if (flag != GLAMOR_CREATE_FBO_NO_FBO) { if (glamor_pixmap_ensure_fb(glamor_priv, fbo) != 0) { glamor_destroy_fbo(glamor_priv, fbo); fbo = NULL; } } return fbo; } static int _glamor_create_tex(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int w, int h) { const struct glamor_format *f = glamor_format_for_pixmap(pixmap); unsigned int tex; glamor_make_current(glamor_priv); glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); if (f->format == GL_RED) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_A, GL_RED); glamor_priv->suppress_gl_out_of_memory_logging = true; glTexImage2D(GL_TEXTURE_2D, 0, f->internalformat, w, h, 0, f->format, f->type, NULL); glamor_priv->suppress_gl_out_of_memory_logging = false; if (glGetError() == GL_OUT_OF_MEMORY) { if (!glamor_priv->logged_any_fbo_allocation_failure) { LogMessageVerb(X_WARNING, 0, "glamor: Failed to allocate %dx%d " "FBO due to GL_OUT_OF_MEMORY.\n", w, h); LogMessageVerb(X_WARNING, 0, "glamor: Expect reduced performance.\n"); glamor_priv->logged_any_fbo_allocation_failure = true; } glDeleteTextures(1, &tex); return 0; } return tex; } glamor_pixmap_fbo * glamor_create_fbo(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int w, int h, int flag) { GLint tex = _glamor_create_tex(glamor_priv, pixmap, w, h); if (!tex) /* Texture creation failed due to GL_OUT_OF_MEMORY */ return NULL; return glamor_create_fbo_from_tex(glamor_priv, pixmap, w, h, tex, flag); } /** * Create storage for the w * h region, using FBOs of the GL's maximum * supported size. */ glamor_pixmap_fbo * glamor_create_fbo_array(glamor_screen_private *glamor_priv, PixmapPtr pixmap, int flag, int block_w, int block_h, glamor_pixmap_private *priv) { int w = pixmap->drawable.width; int h = pixmap->drawable.height; int block_wcnt; int block_hcnt; glamor_pixmap_fbo **fbo_array; BoxPtr box_array; int i, j; priv->block_w = block_w; priv->block_h = block_h; block_wcnt = (w + block_w - 1) / block_w; block_hcnt = (h + block_h - 1) / block_h; box_array = calloc(block_wcnt * block_hcnt, sizeof(box_array[0])); if (box_array == NULL) return NULL; fbo_array = calloc(block_wcnt * block_hcnt, sizeof(glamor_pixmap_fbo *)); if (fbo_array == NULL) { free(box_array); return FALSE; } for (i = 0; i < block_hcnt; i++) { int block_y1, block_y2; int fbo_w, fbo_h; block_y1 = i * block_h; block_y2 = (block_y1 + block_h) > h ? h : (block_y1 + block_h); fbo_h = block_y2 - block_y1; for (j = 0; j < block_wcnt; j++) { box_array[i * block_wcnt + j].x1 = j * block_w; box_array[i * block_wcnt + j].y1 = block_y1; box_array[i * block_wcnt + j].x2 = (j + 1) * block_w > w ? w : (j + 1) * block_w; box_array[i * block_wcnt + j].y2 = block_y2; fbo_w = box_array[i * block_wcnt + j].x2 - box_array[i * block_wcnt + j].x1; fbo_array[i * block_wcnt + j] = glamor_create_fbo(glamor_priv, pixmap, fbo_w, fbo_h, GLAMOR_CREATE_PIXMAP_FIXUP); if (fbo_array[i * block_wcnt + j] == NULL) goto cleanup; } } priv->box = box_array[0]; priv->box_array = box_array; priv->fbo_array = fbo_array; priv->block_wcnt = block_wcnt; priv->block_hcnt = block_hcnt; return fbo_array[0]; cleanup: for (i = 0; i < block_wcnt * block_hcnt; i++) if (fbo_array[i]) glamor_destroy_fbo(glamor_priv, fbo_array[i]); free(box_array); free(fbo_array); return NULL; } void glamor_pixmap_clear_fbo(glamor_screen_private *glamor_priv, glamor_pixmap_fbo *fbo, const struct glamor_format *pixmap_format) { glamor_make_current(glamor_priv); assert(fbo->fb != 0 && fbo->tex != 0); if (glamor_priv->has_clear_texture) { glClearTexImage(fbo->tex, 0, pixmap_format->format, pixmap_format->type, NULL); } else { glamor_set_destination_pixmap_fbo(glamor_priv, fbo, 0, 0, fbo->width, fbo->height); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); } } glamor_pixmap_fbo * glamor_pixmap_detach_fbo(glamor_pixmap_private *pixmap_priv) { glamor_pixmap_fbo *fbo; if (pixmap_priv == NULL) return NULL; fbo = pixmap_priv->fbo; if (fbo == NULL) return NULL; pixmap_priv->fbo = NULL; return fbo; } /* The pixmap must not be attached to another fbo. */ void glamor_pixmap_attach_fbo(PixmapPtr pixmap, glamor_pixmap_fbo *fbo) { glamor_pixmap_private *pixmap_priv; pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->fbo) return; pixmap_priv->fbo = fbo; switch (pixmap_priv->type) { case GLAMOR_TEXTURE_ONLY: case GLAMOR_TEXTURE_DRM: pixmap_priv->gl_fbo = GLAMOR_FBO_NORMAL; pixmap->devPrivate.ptr = NULL; default: break; } } void glamor_pixmap_destroy_fbo(PixmapPtr pixmap) { ScreenPtr screen = pixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_pixmap_private *priv = glamor_get_pixmap_private(pixmap); glamor_pixmap_fbo *fbo; if (glamor_pixmap_priv_is_large(priv)) { int i; for (i = 0; i < priv->block_wcnt * priv->block_hcnt; i++) glamor_destroy_fbo(glamor_priv, priv->fbo_array[i]); free(priv->fbo_array); priv->fbo_array = NULL; } else { fbo = glamor_pixmap_detach_fbo(priv); if (fbo) glamor_destroy_fbo(glamor_priv, fbo); } } Bool glamor_pixmap_ensure_fbo(PixmapPtr pixmap, int flag) { glamor_screen_private *glamor_priv; glamor_pixmap_private *pixmap_priv; glamor_pixmap_fbo *fbo; glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen); pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->fbo == NULL) { fbo = glamor_create_fbo(glamor_priv, pixmap, pixmap->drawable.width, pixmap->drawable.height, flag); if (fbo == NULL) return FALSE; glamor_pixmap_attach_fbo(pixmap, fbo); } else { /* We do have a fbo, but it may lack of fb or tex. */ if (!pixmap_priv->fbo->tex) pixmap_priv->fbo->tex = _glamor_create_tex(glamor_priv, pixmap, pixmap->drawable.width, pixmap->drawable.height); if (flag != GLAMOR_CREATE_FBO_NO_FBO && pixmap_priv->fbo->fb == 0) if (glamor_pixmap_ensure_fb(glamor_priv, pixmap_priv->fbo) != 0) return FALSE; } return TRUE; } _X_EXPORT void glamor_pixmap_exchange_fbos(PixmapPtr front, PixmapPtr back) { glamor_pixmap_private *front_priv, *back_priv; glamor_pixmap_fbo *temp_fbo; front_priv = glamor_get_pixmap_private(front); back_priv = glamor_get_pixmap_private(back); temp_fbo = front_priv->fbo; front_priv->fbo = back_priv->fbo; back_priv->fbo = temp_fbo; } xorg-server-21.1.16/glamor/glamor_compositerects.c0000644000175000017500000002073114757411105015667 /* * Copyright © 2009 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * * original author is Chris Wilson at sna. * */ #include "glamor_priv.h" #include "mipict.h" #include "damage.h" /** @file glamor_compositerects. * * compositeRects acceleration implementation */ static int16_t bound(int16_t a, uint16_t b) { int v = (int) a + (int) b; if (v > MAXSHORT) return MAXSHORT; return v; } static Bool _pixman_region_init_clipped_rectangles(pixman_region16_t * region, unsigned int num_rects, xRectangle *rects, int tx, int ty, BoxPtr extents) { pixman_box16_t stack_boxes[64], *boxes = stack_boxes; pixman_bool_t ret; unsigned int i, j; if (num_rects > ARRAY_SIZE(stack_boxes)) { boxes = xallocarray(num_rects, sizeof(pixman_box16_t)); if (boxes == NULL) return FALSE; } for (i = j = 0; i < num_rects; i++) { boxes[j].x1 = rects[i].x + tx; if (boxes[j].x1 < extents->x1) boxes[j].x1 = extents->x1; boxes[j].y1 = rects[i].y + ty; if (boxes[j].y1 < extents->y1) boxes[j].y1 = extents->y1; boxes[j].x2 = bound(rects[i].x + tx, rects[i].width); if (boxes[j].x2 > extents->x2) boxes[j].x2 = extents->x2; boxes[j].y2 = bound(rects[i].y + ty, rects[i].height); if (boxes[j].y2 > extents->y2) boxes[j].y2 = extents->y2; if (boxes[j].x2 > boxes[j].x1 && boxes[j].y2 > boxes[j].y1) j++; } ret = FALSE; if (j) ret = pixman_region_init_rects(region, boxes, j); if (boxes != stack_boxes) free(boxes); DEBUGF("%s: nrects=%d, region=(%d, %d), (%d, %d) x %d\n", __FUNCTION__, num_rects, region->extents.x1, region->extents.y1, region->extents.x2, region->extents.y2, j); return ret; } void glamor_composite_rectangles(CARD8 op, PicturePtr dst, xRenderColor * color, int num_rects, xRectangle *rects) { PixmapPtr pixmap; struct glamor_pixmap_private *priv; pixman_region16_t region; pixman_box16_t *boxes; int num_boxes; PicturePtr source = NULL; Bool need_free_region = FALSE; DEBUGF("%s(op=%d, %08x x %d [(%d, %d)x(%d, %d) ...])\n", __FUNCTION__, op, (color->alpha >> 8 << 24) | (color->red >> 8 << 16) | (color->green >> 8 << 8) | (color->blue >> 8 << 0), num_rects, rects[0].x, rects[0].y, rects[0].width, rects[0].height); if (!num_rects) return; if (RegionNil(dst->pCompositeClip)) { DEBUGF("%s: empty clip, skipping\n", __FUNCTION__); return; } if ((color->red | color->green | color->blue | color->alpha) <= 0x00ff) { switch (op) { case PictOpOver: case PictOpOutReverse: case PictOpAdd: return; case PictOpInReverse: case PictOpSrc: op = PictOpClear; break; case PictOpAtopReverse: op = PictOpOut; break; case PictOpXor: op = PictOpOverReverse; break; } } if (color->alpha <= 0x00ff) { switch (op) { case PictOpOver: case PictOpOutReverse: return; case PictOpInReverse: op = PictOpClear; break; case PictOpAtopReverse: op = PictOpOut; break; case PictOpXor: op = PictOpOverReverse; break; } } else if (color->alpha >= 0xff00) { switch (op) { case PictOpOver: op = PictOpSrc; break; case PictOpInReverse: return; case PictOpOutReverse: op = PictOpClear; break; case PictOpAtopReverse: op = PictOpOverReverse; break; case PictOpXor: op = PictOpOut; break; } } DEBUGF("%s: converted to op %d\n", __FUNCTION__, op); if (!_pixman_region_init_clipped_rectangles(®ion, num_rects, rects, dst->pDrawable->x, dst->pDrawable->y, &dst->pCompositeClip->extents)) { DEBUGF("%s: allocation failed for region\n", __FUNCTION__); return; } pixmap = glamor_get_drawable_pixmap(dst->pDrawable); priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) goto fallback; if (dst->alphaMap) { DEBUGF("%s: fallback, dst has an alpha-map\n", __FUNCTION__); goto fallback; } need_free_region = TRUE; DEBUGF("%s: drawable extents (%d, %d),(%d, %d) x %d\n", __FUNCTION__, RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2, RegionNumRects(®ion)); if (dst->pCompositeClip->data && (!pixman_region_intersect(®ion, ®ion, dst->pCompositeClip) || RegionNil(®ion))) { DEBUGF("%s: zero-intersection between rectangles and clip\n", __FUNCTION__); pixman_region_fini(®ion); return; } DEBUGF("%s: clipped extents (%d, %d),(%d, %d) x %d\n", __FUNCTION__, RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2, RegionNumRects(®ion)); boxes = pixman_region_rectangles(®ion, &num_boxes); if (op == PictOpSrc || op == PictOpClear) { CARD32 pixel; int dst_x, dst_y; glamor_get_drawable_deltas(dst->pDrawable, pixmap, &dst_x, &dst_y); pixman_region_translate(®ion, dst_x, dst_y); DEBUGF("%s: pixmap +(%d, %d) extents (%d, %d),(%d, %d)\n", __FUNCTION__, dst_x, dst_y, RegionExtents(®ion)->x1, RegionExtents(®ion)->y1, RegionExtents(®ion)->x2, RegionExtents(®ion)->y2); if (op == PictOpClear) pixel = 0; else miRenderColorToPixel(dst->pFormat, color, &pixel); glamor_solid_boxes(pixmap, boxes, num_boxes, pixel); goto done; } else { if (_X_LIKELY(glamor_pixmap_priv_is_small(priv))) { int error; source = CreateSolidPicture(0, color, &error); if (!source) goto done; if (glamor_composite_clipped_region(op, source, NULL, dst, NULL, NULL, pixmap, ®ion, 0, 0, 0, 0, 0, 0)) goto done; } } fallback: miCompositeRects(op, dst, color, num_rects, rects); done: /* XXX xserver-1.8: CompositeRects is not tracked by Damage, so we must * manually append the damaged regions ourselves. */ DamageRegionAppend(&pixmap->drawable, ®ion); DamageRegionProcessPending(&pixmap->drawable); if (need_free_region) pixman_region_fini(®ion); if (source) FreePicture(source, 0); return; } xorg-server-21.1.16/glamor/glamor_utils.c0000644000175000017500000000505414757411105013765 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" void glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, unsigned long fg_pixel) { DrawablePtr drawable = &pixmap->drawable; GCPtr gc; xRectangle *rect; int n; rect = xallocarray(nbox, sizeof(xRectangle)); if (!rect) return; for (n = 0; n < nbox; n++) { rect[n].x = box[n].x1; rect[n].y = box[n].y1; rect[n].width = box[n].x2 - box[n].x1; rect[n].height = box[n].y2 - box[n].y1; } gc = GetScratchGC(drawable->depth, drawable->pScreen); if (gc) { ChangeGCVal vals[1]; vals[0].val = fg_pixel; ChangeGC(NullClient, gc, GCForeground, vals); ValidateGC(drawable, gc); gc->ops->PolyFillRect(drawable, gc, nbox, rect); FreeScratchGC(gc); } free(rect); } void glamor_solid(PixmapPtr pixmap, int x, int y, int width, int height, unsigned long fg_pixel) { DrawablePtr drawable = &pixmap->drawable; GCPtr gc; ChangeGCVal vals[1]; xRectangle rect; vals[0].val = fg_pixel; gc = GetScratchGC(drawable->depth, drawable->pScreen); if (!gc) return; ChangeGC(NullClient, gc, GCForeground, vals); ValidateGC(drawable, gc); rect.x = x; rect.y = y; rect.width = width; rect.height = height; gc->ops->PolyFillRect(drawable, gc, 1, &rect); FreeScratchGC(gc); } xorg-server-21.1.16/glamor/glamor_utils.h0000644000175000017500000006020314757411105013767 /* * Copyright © 2009 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Zhigang Gong * */ #ifndef GLAMOR_PRIV_H #error This file can only be included by glamor_priv.h #endif #ifndef __GLAMOR_UTILS_H__ #define __GLAMOR_UTILS_H__ #include "glamor_prepare.h" #include "mipict.h" #define v_from_x_coord_x(_xscale_, _x_) ( 2 * (_x_) * (_xscale_) - 1.0) #define v_from_x_coord_y(_yscale_, _y_) (2 * (_y_) * (_yscale_) - 1.0) #define t_from_x_coord_x(_xscale_, _x_) ((_x_) * (_xscale_)) #define t_from_x_coord_y(_yscale_, _y_) ((_y_) * (_yscale_)) #define pixmap_priv_get_dest_scale(pixmap, _pixmap_priv_, _pxscale_, _pyscale_) \ do { \ int _w_,_h_; \ PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, _pixmap_priv_, _w_, _h_); \ *(_pxscale_) = 1.0 / _w_; \ *(_pyscale_) = 1.0 / _h_; \ } while(0) #define pixmap_priv_get_scale(_pixmap_priv_, _pxscale_, _pyscale_) \ do { \ *(_pxscale_) = 1.0 / (_pixmap_priv_)->fbo->width; \ *(_pyscale_) = 1.0 / (_pixmap_priv_)->fbo->height; \ } while(0) #define PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, priv, w, h) \ do { \ if (_X_UNLIKELY(glamor_pixmap_priv_is_large(priv))) { \ w = priv->box.x2 - priv->box.x1; \ h = priv->box.y2 - priv->box.y1; \ } else { \ w = (pixmap)->drawable.width; \ h = (pixmap)->drawable.height; \ } \ } while(0) #define glamor_pixmap_fbo_fix_wh_ratio(wh, pixmap, priv) \ do { \ int actual_w, actual_h; \ PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, priv, actual_w, actual_h); \ wh[0] = (float)priv->fbo->width / actual_w; \ wh[1] = (float)priv->fbo->height / actual_h; \ wh[2] = 1.0 / priv->fbo->width; \ wh[3] = 1.0 / priv->fbo->height; \ } while(0) #define pixmap_priv_get_fbo_off(_priv_, _xoff_, _yoff_) \ do { \ if (_X_UNLIKELY(_priv_ && glamor_pixmap_priv_is_large(_priv_))) { \ *(_xoff_) = - (_priv_)->box.x1; \ *(_yoff_) = - (_priv_)->box.y1; \ } else { \ *(_xoff_) = 0; \ *(_yoff_) = 0; \ } \ } while(0) #define xFixedToFloat(_val_) ((float)xFixedToInt(_val_) \ + ((float)xFixedFrac(_val_) / 65536.0)) #define glamor_picture_get_matrixf(_picture_, _matrix_) \ do { \ int _i_; \ if ((_picture_)->transform) \ { \ for(_i_ = 0; _i_ < 3; _i_++) \ { \ (_matrix_)[_i_ * 3 + 0] = \ xFixedToFloat((_picture_)->transform->matrix[_i_][0]); \ (_matrix_)[_i_ * 3 + 1] = \ xFixedToFloat((_picture_)->transform->matrix[_i_][1]); \ (_matrix_)[_i_ * 3 + 2] = \ xFixedToFloat((_picture_)->transform->matrix[_i_][2]); \ } \ } \ } while(0) #define fmod(x, w) (x - w * floor((float)x/w)) #define fmodulus(x, w, c) do {c = fmod(x, w); \ c = c >= 0 ? c : c + w;} \ while(0) /* @x: is current coord * @x2: is the right/bottom edge * @w: is current width or height * @odd: is output value, 0 means we are in an even region, 1 means we are in a * odd region. * @c: is output value, equal to x mod w. */ #define fodd_repeat_mod(x, x2, w, odd, c) \ do { \ float shift; \ fmodulus((x), w, c); \ shift = fabs((x) - (c)); \ shift = floor(fabs(round(shift)) / w); \ odd = (int)shift & 1; \ if (odd && (((x2 % w) == 0) && \ round(fabs(x)) == x2)) \ odd = 0; \ } while(0) /* @txy: output value, is the corrected coords. * @xy: input coords to be fixed up. * @cd: xy mod wh, is a input value. * @wh: current width or height. * @bxy1,bxy2: current box edge's x1/x2 or y1/y2 * * case 1: * ---------- * | * | * | | * ---------- * tx = (c - x1) mod w * * case 2: * --------- * * | | * | | * --------- * tx = - (c - (x1 mod w)) * * case 3: * * ---------- * | | * * | | * ---------- * tx = ((x2 mod x) - c) + (x2 - x1) **/ #define __glamor_repeat_reflect_fixup(txy, xy, \ cd, wh, bxy1, bxy2) \ do { \ cd = wh - cd; \ if ( xy >= bxy1 && xy < bxy2) { \ cd = cd - bxy1; \ fmodulus(cd, wh, txy); \ } else if (xy < bxy1) { \ float bxy1_mod; \ fmodulus(bxy1, wh, bxy1_mod); \ txy = -(cd - bxy1_mod); \ } \ else if (xy >= bxy2) { \ float bxy2_mod; \ fmodulus(bxy2, wh, bxy2_mod); \ if (bxy2_mod == 0) \ bxy2_mod = wh; \ txy = (bxy2_mod - cd) + bxy2 - bxy1; \ } else {assert(0); txy = 0;} \ } while(0) #define _glamor_repeat_reflect_fixup(txy, xy, cd, odd, \ wh, bxy1, bxy2) \ do { \ if (odd) { \ __glamor_repeat_reflect_fixup(txy, xy, \ cd, wh, bxy1, bxy2); \ } else \ txy = xy - bxy1; \ } while(0) #define _glamor_get_reflect_transform_coords(pixmap, priv, repeat_type, \ tx1, ty1, \ _x1_, _y1_) \ do { \ int odd_x, odd_y; \ float c, d; \ fodd_repeat_mod(_x1_,priv->box.x2, \ (pixmap)->drawable.width, \ odd_x, c); \ fodd_repeat_mod(_y1_, priv->box.y2, \ (pixmap)->drawable.height, \ odd_y, d); \ DEBUGF("c %f d %f oddx %d oddy %d \n", \ c, d, odd_x, odd_y); \ DEBUGF("x2 %d x1 %d fbo->width %d \n", priv->box.x2, \ priv->box.x1, priv->fbo->width); \ DEBUGF("y2 %d y1 %d fbo->height %d \n", priv->box.y2, \ priv->box.y1, priv->fbo->height); \ _glamor_repeat_reflect_fixup(tx1, _x1_, c, odd_x, \ (pixmap)->drawable.width, \ priv->box.x1, priv->box.x2); \ _glamor_repeat_reflect_fixup(ty1, _y1_, d, odd_y, \ (pixmap)->drawable.height, \ priv->box.y1, priv->box.y2); \ } while(0) #define _glamor_get_repeat_coords(pixmap, priv, repeat_type, tx1, \ ty1, tx2, ty2, \ _x1_, _y1_, _x2_, \ _y2_, c, d, odd_x, odd_y) \ do { \ if (repeat_type == RepeatReflect) { \ DEBUGF("x1 y1 %d %d\n", \ _x1_, _y1_ ); \ DEBUGF("width %d box.x1 %d \n", \ (pixmap)->drawable.width, \ priv->box.x1); \ if (odd_x) { \ c = (pixmap)->drawable.width \ - c; \ tx1 = c - priv->box.x1; \ tx2 = tx1 - ((_x2_) - (_x1_)); \ } else { \ tx1 = c - priv->box.x1; \ tx2 = tx1 + ((_x2_) - (_x1_)); \ } \ if (odd_y){ \ d = (pixmap)->drawable.height\ - d; \ ty1 = d - priv->box.y1; \ ty2 = ty1 - ((_y2_) - (_y1_)); \ } else { \ ty1 = d - priv->box.y1; \ ty2 = ty1 + ((_y2_) - (_y1_)); \ } \ } else { /* RepeatNormal*/ \ tx1 = (c - priv->box.x1); \ ty1 = (d - priv->box.y1); \ tx2 = tx1 + ((_x2_) - (_x1_)); \ ty2 = ty1 + ((_y2_) - (_y1_)); \ } \ } while(0) /* _x1_ ... _y2_ may has fractional. */ #define glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, tx1, \ ty1, _x1_, _y1_) \ do { \ DEBUGF("width %d box.x1 %d x2 %d y1 %d y2 %d\n", \ (pixmap)->drawable.width, \ priv->box.x1, priv->box.x2, priv->box.y1, \ priv->box.y2); \ DEBUGF("x1 %f y1 %f \n", _x1_, _y1_); \ if (repeat_type != RepeatReflect) { \ tx1 = _x1_ - priv->box.x1; \ ty1 = _y1_ - priv->box.y1; \ } else \ _glamor_get_reflect_transform_coords(pixmap, priv, repeat_type, \ tx1, ty1, \ _x1_, _y1_); \ DEBUGF("tx1 %f ty1 %f \n", tx1, ty1); \ } while(0) /* _x1_ ... _y2_ must be integer. */ #define glamor_get_repeat_coords(pixmap, priv, repeat_type, tx1, \ ty1, tx2, ty2, _x1_, _y1_, _x2_, \ _y2_) \ do { \ int c, d; \ int odd_x = 0, odd_y = 0; \ DEBUGF("width %d box.x1 %d x2 %d y1 %d y2 %d\n", \ (pixmap)->drawable.width, \ priv->box.x1, priv->box.x2, \ priv->box.y1, priv->box.y2); \ modulus((_x1_), (pixmap)->drawable.width, c); \ modulus((_y1_), (pixmap)->drawable.height, d); \ DEBUGF("c %d d %d \n", c, d); \ if (repeat_type == RepeatReflect) { \ odd_x = abs((_x1_ - c) \ / ((pixmap)->drawable.width)) & 1; \ odd_y = abs((_y1_ - d) \ / ((pixmap)->drawable.height)) & 1; \ } \ _glamor_get_repeat_coords(pixmap, priv, repeat_type, tx1, ty1, tx2, ty2, \ _x1_, _y1_, _x2_, _y2_, c, d, \ odd_x, odd_y); \ } while(0) #define glamor_transform_point(matrix, tx, ty, x, y) \ do { \ int _i_; \ float _result_[4]; \ for (_i_ = 0; _i_ < 3; _i_++) { \ _result_[_i_] = (matrix)[_i_ * 3] * (x) + (matrix)[_i_ * 3 + 1] * (y) \ + (matrix)[_i_ * 3 + 2]; \ } \ tx = _result_[0] / _result_[2]; \ ty = _result_[1] / _result_[2]; \ } while(0) #define _glamor_set_normalize_tpoint(xscale, yscale, _tx_, _ty_, \ texcoord) \ do { \ (texcoord)[0] = t_from_x_coord_x(xscale, _tx_); \ (texcoord)[1] = t_from_x_coord_y(yscale, _ty_); \ DEBUGF("normalized point tx %f ty %f \n", (texcoord)[0], \ (texcoord)[1]); \ } while(0) #define glamor_set_transformed_point(priv, matrix, xscale, \ yscale, texcoord, \ x, y) \ do { \ float tx, ty; \ int fbo_x_off, fbo_y_off; \ pixmap_priv_get_fbo_off(priv, &fbo_x_off, &fbo_y_off); \ glamor_transform_point(matrix, tx, ty, x, y); \ DEBUGF("tx %f ty %f fbooff %d %d \n", \ tx, ty, fbo_x_off, fbo_y_off); \ \ tx += fbo_x_off; \ ty += fbo_y_off; \ (texcoord)[0] = t_from_x_coord_x(xscale, tx); \ (texcoord)[1] = t_from_x_coord_y(yscale, ty); \ DEBUGF("normalized tx %f ty %f \n", (texcoord)[0], (texcoord)[1]); \ } while(0) #define glamor_set_transformed_normalize_tcoords_ext( priv, \ matrix, \ xscale, \ yscale, \ tx1, ty1, tx2, ty2, \ texcoords, \ stride) \ do { \ glamor_set_transformed_point(priv, matrix, xscale, yscale, \ texcoords, tx1, ty1); \ glamor_set_transformed_point(priv, matrix, xscale, yscale, \ texcoords + 1 * stride, tx2, ty1); \ glamor_set_transformed_point(priv, matrix, xscale, yscale, \ texcoords + 2 * stride, tx2, ty2); \ glamor_set_transformed_point(priv, matrix, xscale, yscale, \ texcoords + 3 * stride, tx1, ty2); \ } while (0) #define glamor_set_repeat_transformed_normalize_tcoords_ext(pixmap, priv, \ repeat_type, \ matrix, \ xscale, \ yscale, \ _x1_, _y1_, \ _x2_, _y2_, \ texcoords, \ stride) \ do { \ if (_X_LIKELY(glamor_pixmap_priv_is_small(priv))) { \ glamor_set_transformed_normalize_tcoords_ext(priv, matrix, xscale, \ yscale, _x1_, _y1_, \ _x2_, _y2_, \ texcoords, stride); \ } else { \ float tx1, ty1, tx2, ty2, tx3, ty3, tx4, ty4; \ float ttx1, tty1, ttx2, tty2, ttx3, tty3, ttx4, tty4; \ DEBUGF("original coords %d %d %d %d\n", _x1_, _y1_, _x2_, _y2_); \ glamor_transform_point(matrix, tx1, ty1, _x1_, _y1_); \ glamor_transform_point(matrix, tx2, ty2, _x2_, _y1_); \ glamor_transform_point(matrix, tx3, ty3, _x2_, _y2_); \ glamor_transform_point(matrix, tx4, ty4, _x1_, _y2_); \ DEBUGF("transformed %f %f %f %f %f %f %f %f\n", \ tx1, ty1, tx2, ty2, tx3, ty3, tx4, ty4); \ glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx1, tty1, \ tx1, ty1); \ glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx2, tty2, \ tx2, ty2); \ glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx3, tty3, \ tx3, ty3); \ glamor_get_repeat_transform_coords(pixmap, priv, repeat_type, \ ttx4, tty4, \ tx4, ty4); \ DEBUGF("repeat transformed %f %f %f %f %f %f %f %f\n", ttx1, tty1, \ ttx2, tty2, ttx3, tty3, ttx4, tty4); \ _glamor_set_normalize_tpoint(xscale, yscale, ttx1, tty1, \ texcoords); \ _glamor_set_normalize_tpoint(xscale, yscale, ttx2, tty2, \ texcoords + 1 * stride); \ _glamor_set_normalize_tpoint(xscale, yscale, ttx3, tty3, \ texcoords + 2 * stride); \ _glamor_set_normalize_tpoint(xscale, yscale, ttx4, tty4, \ texcoords + 3 * stride); \ } \ } while (0) #define glamor_set_repeat_transformed_normalize_tcoords( pixmap, \ priv, \ repeat_type, \ matrix, \ xscale, \ yscale, \ _x1_, _y1_, \ _x2_, _y2_, \ texcoords) \ do { \ glamor_set_repeat_transformed_normalize_tcoords_ext( pixmap, \ priv, \ repeat_type, \ matrix, \ xscale, \ yscale, \ _x1_, _y1_, \ _x2_, _y2_, \ texcoords, \ 2); \ } while (0) #define _glamor_set_normalize_tcoords(xscale, yscale, tx1, \ ty1, tx2, ty2, \ vertices, stride) \ do { \ /* vertices may be write-only, so we use following \ * temporary variable. */ \ float _t0_, _t1_, _t2_, _t5_; \ (vertices)[0] = _t0_ = t_from_x_coord_x(xscale, tx1); \ (vertices)[1 * stride] = _t2_ = t_from_x_coord_x(xscale, tx2); \ (vertices)[2 * stride] = _t2_; \ (vertices)[3 * stride] = _t0_; \ (vertices)[1] = _t1_ = t_from_x_coord_y(yscale, ty1); \ (vertices)[2 * stride + 1] = _t5_ = t_from_x_coord_y(yscale, ty2); \ (vertices)[1 * stride + 1] = _t1_; \ (vertices)[3 * stride + 1] = _t5_; \ } while(0) #define glamor_set_normalize_tcoords_ext(priv, xscale, yscale, \ x1, y1, x2, y2, \ vertices, stride) \ do { \ if (_X_UNLIKELY(glamor_pixmap_priv_is_large(priv))) { \ float tx1, tx2, ty1, ty2; \ int fbo_x_off, fbo_y_off; \ pixmap_priv_get_fbo_off(priv, &fbo_x_off, &fbo_y_off); \ tx1 = x1 + fbo_x_off; \ tx2 = x2 + fbo_x_off; \ ty1 = y1 + fbo_y_off; \ ty2 = y2 + fbo_y_off; \ _glamor_set_normalize_tcoords(xscale, yscale, tx1, ty1, \ tx2, ty2, vertices, \ stride); \ } else \ _glamor_set_normalize_tcoords(xscale, yscale, x1, y1, \ x2, y2, vertices, stride); \ } while(0) #define glamor_set_repeat_normalize_tcoords_ext(pixmap, priv, repeat_type, \ xscale, yscale, \ _x1_, _y1_, _x2_, _y2_, \ vertices, stride) \ do { \ if (_X_UNLIKELY(glamor_pixmap_priv_is_large(priv))) { \ float tx1, tx2, ty1, ty2; \ if (repeat_type == RepeatPad) { \ tx1 = _x1_ - priv->box.x1; \ ty1 = _y1_ - priv->box.y1; \ tx2 = tx1 + ((_x2_) - (_x1_)); \ ty2 = ty1 + ((_y2_) - (_y1_)); \ } else { \ glamor_get_repeat_coords(pixmap, priv, repeat_type, \ tx1, ty1, tx2, ty2, \ _x1_, _y1_, _x2_, _y2_); \ } \ _glamor_set_normalize_tcoords(xscale, yscale, tx1, ty1, \ tx2, ty2, vertices, \ stride); \ } else \ _glamor_set_normalize_tcoords(xscale, yscale, _x1_, _y1_, \ _x2_, _y2_, vertices, \ stride); \ } while(0) #define glamor_set_normalize_tcoords_tri_stripe(xscale, yscale, \ x1, y1, x2, y2, \ vertices) \ do { \ (vertices)[0] = t_from_x_coord_x(xscale, x1); \ (vertices)[2] = t_from_x_coord_x(xscale, x2); \ (vertices)[6] = (vertices)[2]; \ (vertices)[4] = (vertices)[0]; \ (vertices)[1] = t_from_x_coord_y(yscale, y1); \ (vertices)[7] = t_from_x_coord_y(yscale, y2); \ (vertices)[3] = (vertices)[1]; \ (vertices)[5] = (vertices)[7]; \ } while(0) #define glamor_set_tcoords_tri_strip(x1, y1, x2, y2, vertices) \ do { \ (vertices)[0] = (x1); \ (vertices)[2] = (x2); \ (vertices)[6] = (vertices)[2]; \ (vertices)[4] = (vertices)[0]; \ (vertices)[1] = (y1); \ (vertices)[7] = (y2); \ (vertices)[3] = (vertices)[1]; \ (vertices)[5] = (vertices)[7]; \ } while(0) #define glamor_set_normalize_vcoords_ext(priv, xscale, yscale, \ x1, y1, x2, y2, \ vertices, stride) \ do { \ int fbo_x_off, fbo_y_off; \ /* vertices may be write-only, so we use following \ * temporary variable. */ \ float _t0_, _t1_, _t2_, _t5_; \ pixmap_priv_get_fbo_off(priv, &fbo_x_off, &fbo_y_off); \ (vertices)[0] = _t0_ = v_from_x_coord_x(xscale, x1 + fbo_x_off); \ (vertices)[1 * stride] = _t2_ = v_from_x_coord_x(xscale, \ x2 + fbo_x_off); \ (vertices)[2 * stride] = _t2_; \ (vertices)[3 * stride] = _t0_; \ (vertices)[1] = _t1_ = v_from_x_coord_y(yscale, y1 + fbo_y_off); \ (vertices)[2 * stride + 1] = _t5_ = \ v_from_x_coord_y(yscale, y2 + fbo_y_off); \ (vertices)[1 * stride + 1] = _t1_; \ (vertices)[3 * stride + 1] = _t5_; \ } while(0) #define glamor_set_normalize_vcoords_tri_strip(xscale, yscale, \ x1, y1, x2, y2, \ vertices) \ do { \ (vertices)[0] = v_from_x_coord_x(xscale, x1); \ (vertices)[2] = v_from_x_coord_x(xscale, x2); \ (vertices)[6] = (vertices)[2]; \ (vertices)[4] = (vertices)[0]; \ (vertices)[1] = v_from_x_coord_y(yscale, y1); \ (vertices)[7] = v_from_x_coord_y(yscale, y2); \ (vertices)[3] = (vertices)[1]; \ (vertices)[5] = (vertices)[7]; \ } while(0) #define glamor_set_normalize_pt(xscale, yscale, x, y, \ pt) \ do { \ (pt)[0] = t_from_x_coord_x(xscale, x); \ (pt)[1] = t_from_x_coord_y(yscale, y); \ } while(0) #define glamor_set_circle_centre(width, height, x, y, \ c) \ do { \ (c)[0] = (float)x; \ (c)[1] = (float)y; \ } while(0) #define ALIGN(i,m) (((i) + (m) - 1) & ~((m) - 1)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define glamor_check_fbo_size(_glamor_,_w_, _h_) ((_w_) > 0 && (_h_) > 0 \ && (_w_) <= _glamor_->max_fbo_size \ && (_h_) <= _glamor_->max_fbo_size) #define GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv) (pixmap_priv->gl_fbo == GLAMOR_FBO_NORMAL) #define REVERT_NONE 0 #define REVERT_NORMAL 1 #define REVERT_UPLOADING_A1 3 #define SWAP_UPLOADING 2 #define SWAP_NONE_UPLOADING 3 /* borrowed from uxa */ static inline Bool glamor_get_rgba_from_pixel(CARD32 pixel, float *red, float *green, float *blue, float *alpha, CARD32 format) { int rbits, bbits, gbits, abits; int rshift, bshift, gshift, ashift; rbits = PICT_FORMAT_R(format); gbits = PICT_FORMAT_G(format); bbits = PICT_FORMAT_B(format); abits = PICT_FORMAT_A(format); if (PICT_FORMAT_TYPE(format) == PICT_TYPE_A) { rshift = gshift = bshift = ashift = 0; } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ARGB) { bshift = 0; gshift = bbits; rshift = gshift + gbits; ashift = rshift + rbits; } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_ABGR) { rshift = 0; gshift = rbits; bshift = gshift + gbits; ashift = bshift + bbits; } else if (PICT_FORMAT_TYPE(format) == PICT_TYPE_BGRA) { ashift = 0; rshift = abits; if (abits == 0) rshift = PICT_FORMAT_BPP(format) - (rbits + gbits + bbits); gshift = rshift + rbits; bshift = gshift + gbits; } else { return FALSE; } #define COLOR_INT_TO_FLOAT(_fc_, _p_, _s_, _bits_) \ *_fc_ = (((_p_) >> (_s_)) & (( 1 << (_bits_)) - 1)) \ / (float)((1<<(_bits_)) - 1) if (rbits) COLOR_INT_TO_FLOAT(red, pixel, rshift, rbits); else *red = 0; if (gbits) COLOR_INT_TO_FLOAT(green, pixel, gshift, gbits); else *green = 0; if (bbits) COLOR_INT_TO_FLOAT(blue, pixel, bshift, bbits); else *blue = 0; if (abits) COLOR_INT_TO_FLOAT(alpha, pixel, ashift, abits); else *alpha = 1; return TRUE; } static inline void glamor_get_rgba_from_color(const xRenderColor *color, float rgba[4]) { rgba[0] = color->red / (float)UINT16_MAX; rgba[1] = color->green / (float)UINT16_MAX; rgba[2] = color->blue / (float)UINT16_MAX; rgba[3] = color->alpha / (float)UINT16_MAX; } inline static Bool glamor_is_large_pixmap(PixmapPtr pixmap) { glamor_pixmap_private *priv; priv = glamor_get_pixmap_private(pixmap); return (glamor_pixmap_priv_is_large(priv)); } static inline void glamor_make_current(glamor_screen_private *glamor_priv) { if (lastGLContext != glamor_priv->ctx.ctx) { lastGLContext = glamor_priv->ctx.ctx; glamor_priv->ctx.make_current(&glamor_priv->ctx); } } static inline BoxRec glamor_no_rendering_bounds(void) { BoxRec bounds = { .x1 = 0, .y1 = 0, .x2 = MAXSHORT, .y2 = MAXSHORT, }; return bounds; } static inline BoxRec glamor_start_rendering_bounds(void) { BoxRec bounds = { .x1 = MAXSHORT, .y1 = MAXSHORT, .x2 = 0, .y2 = 0, }; return bounds; } static inline void glamor_bounds_union_rect(BoxPtr bounds, xRectangle *rect) { bounds->x1 = min(bounds->x1, rect->x); bounds->y1 = min(bounds->y1, rect->y); bounds->x2 = min(SHRT_MAX, max(bounds->x2, rect->x + rect->width)); bounds->y2 = min(SHRT_MAX, max(bounds->y2, rect->y + rect->height)); } static inline void glamor_bounds_union_box(BoxPtr bounds, BoxPtr box) { bounds->x1 = min(bounds->x1, box->x1); bounds->y1 = min(bounds->y1, box->y1); bounds->x2 = max(bounds->x2, box->x2); bounds->y2 = max(bounds->y2, box->y2); } /** * Helper function for implementing draws with GL_QUADS on GLES2, * where we don't have them. */ static inline void glamor_glDrawArrays_GL_QUADS(glamor_screen_private *glamor_priv, unsigned count) { if (glamor_priv->use_quads) { glDrawArrays(GL_QUADS, 0, count * 4); } else { glamor_gldrawarrays_quads_using_indices(glamor_priv, count); } } static inline Bool glamor_glsl_has_ints(glamor_screen_private *glamor_priv) { return glamor_priv->glsl_version >= 130 || glamor_priv->use_gpu_shader4; } #endif xorg-server-21.1.16/glamor/glamor_sync.c0000644000175000017500000001003314757411105013572 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "glamor_priv.h" #include "misyncshm.h" #include "misyncstr.h" #if XSYNC /* * This whole file exists to wrap a sync fence trigger operation so * that we can flush GL to provide serialization between the server * and the shm fence client */ static DevPrivateKeyRec glamor_sync_fence_key; struct glamor_sync_fence { SyncFenceSetTriggeredFunc set_triggered; }; static inline struct glamor_sync_fence * glamor_get_sync_fence(SyncFence *fence) { return (struct glamor_sync_fence *) dixLookupPrivate(&fence->devPrivates, &glamor_sync_fence_key); } static void glamor_sync_fence_set_triggered (SyncFence *fence) { ScreenPtr screen = fence->pScreen; glamor_screen_private *glamor = glamor_get_screen_private(screen); struct glamor_sync_fence *glamor_fence = glamor_get_sync_fence(fence); /* Flush pending rendering operations */ glamor_make_current(glamor); glFlush(); fence->funcs.SetTriggered = glamor_fence->set_triggered; fence->funcs.SetTriggered(fence); glamor_fence->set_triggered = fence->funcs.SetTriggered; fence->funcs.SetTriggered = glamor_sync_fence_set_triggered; } static void glamor_sync_create_fence(ScreenPtr screen, SyncFence *fence, Bool initially_triggered) { glamor_screen_private *glamor = glamor_get_screen_private(screen); SyncScreenFuncsPtr screen_funcs = miSyncGetScreenFuncs(screen); struct glamor_sync_fence *glamor_fence = glamor_get_sync_fence(fence); screen_funcs->CreateFence = glamor->saved_procs.sync_screen_funcs.CreateFence; screen_funcs->CreateFence(screen, fence, initially_triggered); glamor->saved_procs.sync_screen_funcs.CreateFence = screen_funcs->CreateFence; screen_funcs->CreateFence = glamor_sync_create_fence; glamor_fence->set_triggered = fence->funcs.SetTriggered; fence->funcs.SetTriggered = glamor_sync_fence_set_triggered; } #endif Bool glamor_sync_init(ScreenPtr screen) { #if XSYNC glamor_screen_private *glamor = glamor_get_screen_private(screen); SyncScreenFuncsPtr screen_funcs; if (!dixPrivateKeyRegistered(&glamor_sync_fence_key)) { if (!dixRegisterPrivateKey(&glamor_sync_fence_key, PRIVATE_SYNC_FENCE, sizeof (struct glamor_sync_fence))) return FALSE; } #ifdef HAVE_XSHMFENCE if (!miSyncShmScreenInit(screen)) return FALSE; #else if (!miSyncSetup(screen)) return FALSE; #endif screen_funcs = miSyncGetScreenFuncs(screen); glamor->saved_procs.sync_screen_funcs.CreateFence = screen_funcs->CreateFence; screen_funcs->CreateFence = glamor_sync_create_fence; #endif return TRUE; } void glamor_sync_close(ScreenPtr screen) { #if XSYNC glamor_screen_private *glamor = glamor_get_screen_private(screen); SyncScreenFuncsPtr screen_funcs = miSyncGetScreenFuncs(screen); if (screen_funcs) screen_funcs->CreateFence = glamor->saved_procs.sync_screen_funcs.CreateFence; #endif } xorg-server-21.1.16/glamor/glamor_xv.c0000644000175000017500000005401114757411105013257 /* * Copyright © 2013 Red Hat * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * * some code is derived from the xf86-video-ati radeon driver, mainly * the calculations. */ /** @file glamor_xv.c * * Xv acceleration implementation */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glamor_priv.h" #include "glamor_transform.h" #include "glamor_transfer.h" #include #include /* Reference color space transform data */ typedef struct tagREF_TRANSFORM { float RefLuma; float RefRCb; float RefRCr; float RefGCb; float RefGCr; float RefBCb; float RefBCr; } REF_TRANSFORM; #define RTFSaturation(a) (1.0 + ((a)*1.0)/1000.0) #define RTFBrightness(a) (((a)*1.0)/2000.0) #define RTFIntensity(a) (((a)*1.0)/2000.0) #define RTFContrast(a) (1.0 + ((a)*1.0)/1000.0) #define RTFHue(a) (((a)*3.1416)/1000.0) static const glamor_facet glamor_facet_xv_planar_2 = { .name = "xv_planar_2", .version = 120, .source_name = "v_texcoord0", .vs_vars = ("attribute vec2 position;\n" "attribute vec2 v_texcoord0;\n" "varying vec2 tcs;\n"), .vs_exec = (GLAMOR_POS(gl_Position, position) " tcs = v_texcoord0;\n"), .fs_vars = ("uniform sampler2D y_sampler;\n" "uniform sampler2D u_sampler;\n" "uniform vec4 offsetyco;\n" "uniform vec4 ucogamma;\n" "uniform vec4 vco;\n" "varying vec2 tcs;\n"), .fs_exec = ( " float sample;\n" " vec2 sample_uv;\n" " vec4 temp1;\n" " sample = texture2D(y_sampler, tcs).w;\n" " temp1.xyz = offsetyco.www * vec3(sample) + offsetyco.xyz;\n" " sample_uv = texture2D(u_sampler, tcs).xy;\n" " temp1.xyz = ucogamma.xyz * vec3(sample_uv.x) + temp1.xyz;\n" " temp1.xyz = clamp(vco.xyz * vec3(sample_uv.y) + temp1.xyz, 0.0, 1.0);\n" " temp1.w = 1.0;\n" " gl_FragColor = temp1;\n" ), }; static const glamor_facet glamor_facet_xv_planar_3 = { .name = "xv_planar_3", .version = 120, .source_name = "v_texcoord0", .vs_vars = ("attribute vec2 position;\n" "attribute vec2 v_texcoord0;\n" "varying vec2 tcs;\n"), .vs_exec = (GLAMOR_POS(gl_Position, position) " tcs = v_texcoord0;\n"), .fs_vars = ("uniform sampler2D y_sampler;\n" "uniform sampler2D u_sampler;\n" "uniform sampler2D v_sampler;\n" "uniform vec4 offsetyco;\n" "uniform vec4 ucogamma;\n" "uniform vec4 vco;\n" "varying vec2 tcs;\n"), .fs_exec = ( " float sample;\n" " vec4 temp1;\n" " sample = texture2D(y_sampler, tcs).w;\n" " temp1.xyz = offsetyco.www * vec3(sample) + offsetyco.xyz;\n" " sample = texture2D(u_sampler, tcs).w;\n" " temp1.xyz = ucogamma.xyz * vec3(sample) + temp1.xyz;\n" " sample = texture2D(v_sampler, tcs).w;\n" " temp1.xyz = clamp(vco.xyz * vec3(sample) + temp1.xyz, 0.0, 1.0);\n" " temp1.w = 1.0;\n" " gl_FragColor = temp1;\n" ), }; #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) XvAttributeRec glamor_xv_attributes[] = { {XvSettable | XvGettable, -1000, 1000, (char *)"XV_BRIGHTNESS"}, {XvSettable | XvGettable, -1000, 1000, (char *)"XV_CONTRAST"}, {XvSettable | XvGettable, -1000, 1000, (char *)"XV_SATURATION"}, {XvSettable | XvGettable, -1000, 1000, (char *)"XV_HUE"}, {XvSettable | XvGettable, 0, 1, (char *)"XV_COLORSPACE"}, {0, 0, 0, NULL} }; int glamor_xv_num_attributes = ARRAY_SIZE(glamor_xv_attributes) - 1; Atom glamorBrightness, glamorContrast, glamorSaturation, glamorHue, glamorColorspace, glamorGamma; XvImageRec glamor_xv_images[] = { XVIMAGE_YV12, XVIMAGE_I420, XVIMAGE_NV12 }; int glamor_xv_num_images = ARRAY_SIZE(glamor_xv_images); static void glamor_init_xv_shader(ScreenPtr screen, int id) { glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); GLint sampler_loc; const glamor_facet *glamor_facet_xv_planar = NULL; switch (id) { case FOURCC_YV12: case FOURCC_I420: glamor_facet_xv_planar = &glamor_facet_xv_planar_3; break; case FOURCC_NV12: glamor_facet_xv_planar = &glamor_facet_xv_planar_2; break; default: break; } glamor_build_program(screen, &glamor_priv->xv_prog, glamor_facet_xv_planar, NULL, NULL, NULL); glUseProgram(glamor_priv->xv_prog.prog); sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "y_sampler"); glUniform1i(sampler_loc, 0); sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "u_sampler"); glUniform1i(sampler_loc, 1); switch (id) { case FOURCC_YV12: case FOURCC_I420: sampler_loc = glGetUniformLocation(glamor_priv->xv_prog.prog, "v_sampler"); glUniform1i(sampler_loc, 2); break; case FOURCC_NV12: break; default: break; } } #define ClipValue(v,min,max) ((v) < (min) ? (min) : (v) > (max) ? (max) : (v)) void glamor_xv_stop_video(glamor_port_private *port_priv) { } static void glamor_xv_free_port_data(glamor_port_private *port_priv) { int i; for (i = 0; i < 3; i++) { if (port_priv->src_pix[i]) { glamor_destroy_pixmap(port_priv->src_pix[i]); port_priv->src_pix[i] = NULL; } } RegionUninit(&port_priv->clip); RegionNull(&port_priv->clip); } int glamor_xv_set_port_attribute(glamor_port_private *port_priv, Atom attribute, INT32 value) { if (attribute == glamorBrightness) port_priv->brightness = ClipValue(value, -1000, 1000); else if (attribute == glamorHue) port_priv->hue = ClipValue(value, -1000, 1000); else if (attribute == glamorContrast) port_priv->contrast = ClipValue(value, -1000, 1000); else if (attribute == glamorSaturation) port_priv->saturation = ClipValue(value, -1000, 1000); else if (attribute == glamorGamma) port_priv->gamma = ClipValue(value, 100, 10000); else if (attribute == glamorColorspace) port_priv->transform_index = ClipValue(value, 0, 1); else return BadMatch; return Success; } int glamor_xv_get_port_attribute(glamor_port_private *port_priv, Atom attribute, INT32 *value) { if (attribute == glamorBrightness) *value = port_priv->brightness; else if (attribute == glamorHue) *value = port_priv->hue; else if (attribute == glamorContrast) *value = port_priv->contrast; else if (attribute == glamorSaturation) *value = port_priv->saturation; else if (attribute == glamorGamma) *value = port_priv->gamma; else if (attribute == glamorColorspace) *value = port_priv->transform_index; else return BadMatch; return Success; } int glamor_xv_query_image_attributes(int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets) { int size = 0, tmp; if (offsets) offsets[0] = 0; switch (id) { case FOURCC_YV12: case FOURCC_I420: *w = ALIGN(*w, 2); *h = ALIGN(*h, 2); size = ALIGN(*w, 4); if (pitches) pitches[0] = size; size *= *h; if (offsets) offsets[1] = size; tmp = ALIGN(*w >> 1, 4); if (pitches) pitches[1] = pitches[2] = tmp; tmp *= (*h >> 1); size += tmp; if (offsets) offsets[2] = size; size += tmp; break; case FOURCC_NV12: *w = ALIGN(*w, 2); *h = ALIGN(*h, 2); size = ALIGN(*w, 4); if (pitches) pitches[0] = size; size *= *h; if (offsets) offsets[1] = offsets[2] = size; tmp = ALIGN(*w, 4); if (pitches) pitches[1] = pitches[2] = tmp; tmp *= (*h >> 1); size += tmp; break; } return size; } /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces note the difference to the parameters used in overlay are due to 10bit vs. float calcs */ static REF_TRANSFORM trans[2] = { {1.1643, 0.0, 1.5960, -0.3918, -0.8129, 2.0172, 0.0}, /* BT.601 */ {1.1643, 0.0, 1.7927, -0.2132, -0.5329, 2.1124, 0.0} /* BT.709 */ }; void glamor_xv_render(glamor_port_private *port_priv, int id) { ScreenPtr screen = port_priv->pPixmap->drawable.pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); PixmapPtr pixmap = port_priv->pPixmap; glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); glamor_pixmap_private *src_pixmap_priv[3]; BoxPtr box = REGION_RECTS(&port_priv->clip); int nBox = REGION_NUM_RECTS(&port_priv->clip); GLfloat src_xscale[3], src_yscale[3]; int i; const float Loff = -0.0627; const float Coff = -0.502; float uvcosf, uvsinf; float yco; float uco[3], vco[3], off[3]; float bright, cont, gamma; int ref = port_priv->transform_index; GLint uloc; GLfloat *v; char *vbo_offset; int dst_box_index; if (!glamor_priv->xv_prog.prog) glamor_init_xv_shader(screen, id); cont = RTFContrast(port_priv->contrast); bright = RTFBrightness(port_priv->brightness); gamma = (float) port_priv->gamma / 1000.0; uvcosf = RTFSaturation(port_priv->saturation) * cos(RTFHue(port_priv->hue)); uvsinf = RTFSaturation(port_priv->saturation) * sin(RTFHue(port_priv->hue)); /* overlay video also does pre-gamma contrast/sat adjust, should we? */ yco = trans[ref].RefLuma * cont; uco[0] = -trans[ref].RefRCr * uvsinf; uco[1] = trans[ref].RefGCb * uvcosf - trans[ref].RefGCr * uvsinf; uco[2] = trans[ref].RefBCb * uvcosf; vco[0] = trans[ref].RefRCr * uvcosf; vco[1] = trans[ref].RefGCb * uvsinf + trans[ref].RefGCr * uvcosf; vco[2] = trans[ref].RefBCb * uvsinf; off[0] = Loff * yco + Coff * (uco[0] + vco[0]) + bright; off[1] = Loff * yco + Coff * (uco[1] + vco[1]) + bright; off[2] = Loff * yco + Coff * (uco[2] + vco[2]) + bright; gamma = 1.0; glamor_set_alu(screen, GXcopy); for (i = 0; i < 3; i++) { if (port_priv->src_pix[i]) { src_pixmap_priv[i] = glamor_get_pixmap_private(port_priv->src_pix[i]); pixmap_priv_get_scale(src_pixmap_priv[i], &src_xscale[i], &src_yscale[i]); } else { src_pixmap_priv[i] = NULL; } } glamor_make_current(glamor_priv); glUseProgram(glamor_priv->xv_prog.prog); uloc = glGetUniformLocation(glamor_priv->xv_prog.prog, "offsetyco"); glUniform4f(uloc, off[0], off[1], off[2], yco); uloc = glGetUniformLocation(glamor_priv->xv_prog.prog, "ucogamma"); glUniform4f(uloc, uco[0], uco[1], uco[2], gamma); uloc = glGetUniformLocation(glamor_priv->xv_prog.prog, "vco"); glUniform4f(uloc, vco[0], vco[1], vco[2], 0); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[0]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[1]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); switch (id) { case FOURCC_YV12: case FOURCC_I420: glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, src_pixmap_priv[2]->fbo->tex); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); break; case FOURCC_NV12: break; default: break; } glEnableVertexAttribArray(GLAMOR_VERTEX_POS); glEnableVertexAttribArray(GLAMOR_VERTEX_SOURCE); glEnable(GL_SCISSOR_TEST); v = glamor_get_vbo_space(screen, 3 * 4 * sizeof(GLfloat), &vbo_offset); /* Set up a single primitive covering the area being drawn. We'll * clip it to port_priv->clip using GL scissors instead of just * emitting a GL_QUAD per box, because this way we hopefully avoid * diagonal tearing between the two triangles used to rasterize a * GL_QUAD. */ i = 0; v[i++] = port_priv->drw_x; v[i++] = port_priv->drw_y; v[i++] = port_priv->drw_x + port_priv->dst_w * 2; v[i++] = port_priv->drw_y; v[i++] = port_priv->drw_x; v[i++] = port_priv->drw_y + port_priv->dst_h * 2; v[i++] = t_from_x_coord_x(src_xscale[0], port_priv->src_x); v[i++] = t_from_x_coord_y(src_yscale[0], port_priv->src_y); v[i++] = t_from_x_coord_x(src_xscale[0], port_priv->src_x + port_priv->src_w * 2); v[i++] = t_from_x_coord_y(src_yscale[0], port_priv->src_y); v[i++] = t_from_x_coord_x(src_xscale[0], port_priv->src_x); v[i++] = t_from_x_coord_y(src_yscale[0], port_priv->src_y + port_priv->src_h * 2); glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), vbo_offset); glVertexAttribPointer(GLAMOR_VERTEX_SOURCE, 2, GL_FLOAT, GL_FALSE, 2 * sizeof(float), vbo_offset + 6 * sizeof(GLfloat)); glamor_put_vbo_space(screen); /* Now draw our big triangle, clipped to each of the clip boxes. */ glamor_pixmap_loop(pixmap_priv, dst_box_index) { int dst_off_x, dst_off_y; glamor_set_destination_drawable(port_priv->pDraw, dst_box_index, FALSE, FALSE, glamor_priv->xv_prog.matrix_uniform, &dst_off_x, &dst_off_y); for (i = 0; i < nBox; i++) { int dstx, dsty, dstw, dsth; dstx = box[i].x1 + dst_off_x; dsty = box[i].y1 + dst_off_y; dstw = box[i].x2 - box[i].x1; dsth = box[i].y2 - box[i].y1; glScissor(dstx, dsty, dstw, dsth); glDrawArrays(GL_TRIANGLE_FAN, 0, 3); } } glDisable(GL_SCISSOR_TEST); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE); DamageDamageRegion(port_priv->pDraw, &port_priv->clip); glamor_xv_free_port_data(port_priv); } int glamor_xv_put_image(glamor_port_private *port_priv, DrawablePtr pDrawable, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes) { ScreenPtr pScreen = pDrawable->pScreen; glamor_screen_private *glamor_priv = glamor_get_screen_private(pScreen); int srcPitch, srcPitch2; int top, nlines; int s2offset, s3offset, tmp; BoxRec full_box, half_box; s2offset = s3offset = srcPitch2 = 0; if (!port_priv->src_pix[0] || (width != port_priv->src_pix_w || height != port_priv->src_pix_h) || (port_priv->src_pix[2] && id == FOURCC_NV12) || (!port_priv->src_pix[2] && id != FOURCC_NV12)) { int i; if (glamor_priv->xv_prog.prog) { glDeleteProgram(glamor_priv->xv_prog.prog); glamor_priv->xv_prog.prog = 0; } for (i = 0; i < 3; i++) if (port_priv->src_pix[i]) glamor_destroy_pixmap(port_priv->src_pix[i]); port_priv->src_pix[0] = glamor_create_pixmap(pScreen, width, height, 8, GLAMOR_CREATE_FBO_NO_FBO); switch (id) { case FOURCC_YV12: case FOURCC_I420: port_priv->src_pix[1] = glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8, GLAMOR_CREATE_FBO_NO_FBO); port_priv->src_pix[2] = glamor_create_pixmap(pScreen, width >> 1, height >> 1, 8, GLAMOR_CREATE_FBO_NO_FBO); if (!port_priv->src_pix[2]) return BadAlloc; break; case FOURCC_NV12: port_priv->src_pix[1] = glamor_create_pixmap(pScreen, width >> 1, height >> 1, 16, GLAMOR_CREATE_FBO_NO_FBO | GLAMOR_CREATE_FORMAT_CBCR); port_priv->src_pix[2] = NULL; break; default: return BadMatch; } port_priv->src_pix_w = width; port_priv->src_pix_h = height; if (!port_priv->src_pix[0] || !port_priv->src_pix[1]) return BadAlloc; } top = (src_y) & ~1; nlines = (src_y + src_h) - top; switch (id) { case FOURCC_YV12: case FOURCC_I420: srcPitch = ALIGN(width, 4); srcPitch2 = ALIGN(width >> 1, 4); s2offset = srcPitch * height; s3offset = s2offset + (srcPitch2 * ((height + 1) >> 1)); s2offset += ((top >> 1) * srcPitch2); s3offset += ((top >> 1) * srcPitch2); if (id == FOURCC_YV12) { tmp = s2offset; s2offset = s3offset; s3offset = tmp; } full_box.x1 = 0; full_box.y1 = 0; full_box.x2 = width; full_box.y2 = nlines; half_box.x1 = 0; half_box.y1 = 0; half_box.x2 = width >> 1; half_box.y2 = (nlines + 1) >> 1; glamor_upload_boxes(port_priv->src_pix[0], &full_box, 1, 0, 0, 0, 0, buf + (top * srcPitch), srcPitch); glamor_upload_boxes(port_priv->src_pix[1], &half_box, 1, 0, 0, 0, 0, buf + s2offset, srcPitch2); glamor_upload_boxes(port_priv->src_pix[2], &half_box, 1, 0, 0, 0, 0, buf + s3offset, srcPitch2); break; case FOURCC_NV12: srcPitch = ALIGN(width, 4); s2offset = srcPitch * height; s2offset += ((top >> 1) * srcPitch); full_box.x1 = 0; full_box.y1 = 0; full_box.x2 = width; full_box.y2 = nlines; half_box.x1 = 0; half_box.y1 = 0; half_box.x2 = width; half_box.y2 = (nlines + 1) >> 1; glamor_upload_boxes(port_priv->src_pix[0], &full_box, 1, 0, 0, 0, 0, buf + (top * srcPitch), srcPitch); glamor_upload_boxes(port_priv->src_pix[1], &half_box, 1, 0, 0, 0, 0, buf + s2offset, srcPitch); break; default: return BadMatch; } if (pDrawable->type == DRAWABLE_WINDOW) port_priv->pPixmap = pScreen->GetWindowPixmap((WindowPtr) pDrawable); else port_priv->pPixmap = (PixmapPtr) pDrawable; RegionCopy(&port_priv->clip, clipBoxes); port_priv->src_x = src_x; port_priv->src_y = src_y - top; port_priv->src_w = src_w; port_priv->src_h = src_h; port_priv->dst_w = drw_w; port_priv->dst_h = drw_h; port_priv->drw_x = drw_x; port_priv->drw_y = drw_y; port_priv->w = width; port_priv->h = height; port_priv->pDraw = pDrawable; glamor_xv_render(port_priv, id); return Success; } void glamor_xv_init_port(glamor_port_private *port_priv) { port_priv->brightness = 0; port_priv->contrast = 0; port_priv->saturation = 0; port_priv->hue = 0; port_priv->gamma = 1000; port_priv->transform_index = 0; REGION_NULL(pScreen, &port_priv->clip); } void glamor_xv_core_init(ScreenPtr screen) { glamorBrightness = MAKE_ATOM("XV_BRIGHTNESS"); glamorContrast = MAKE_ATOM("XV_CONTRAST"); glamorSaturation = MAKE_ATOM("XV_SATURATION"); glamorHue = MAKE_ATOM("XV_HUE"); glamorGamma = MAKE_ATOM("XV_GAMMA"); glamorColorspace = MAKE_ATOM("XV_COLORSPACE"); } xorg-server-21.1.16/glamor/glamor_egl_stubs.c0000644000175000017500000000360614757411105014615 /* * Copyright © 2013 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** @file glamor_egl_stubs.c * * Stubbed out glamor_egl.c functions for servers other than Xorg. */ #include "dix-config.h" #include "glamor.h" void glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx) { } int glamor_egl_fd_name_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { return -1; } int glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *offsets, uint32_t *strides, uint64_t *modifier) { return 0; } int glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { return -1; } xorg-server-21.1.16/glamor/glamor_egl_ext.h0000644000175000017500000000600614757411105014257 /* * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS * 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. */ /* Extensions used by Glamor, copied from Mesa's eglmesaext.h, */ #ifndef GLAMOR_EGL_EXT_H #define GLAMOR_EGL_EXT_H /* Define needed tokens from EGL_EXT_image_dma_buf_import extension * here to avoid having to add ifdefs everywhere.*/ #ifndef EGL_EXT_image_dma_buf_import #define EGL_LINUX_DMA_BUF_EXT 0x3270 #define EGL_LINUX_DRM_FOURCC_EXT 0x3271 #define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 #define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 #define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 #define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 #define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 #define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 #define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 #define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 #define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A #endif /* Define tokens from EGL_EXT_image_dma_buf_import_modifiers */ #ifndef EGL_EXT_image_dma_buf_import_modifiers #define EGL_EXT_image_dma_buf_import_modifiers 1 #define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 #define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 #define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 #define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 #define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 #define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 #define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 #define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 #define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 #define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 #define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats); typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers); #endif #endif /* GLAMOR_EGL_EXT_H */ xorg-server-21.1.16/glamor/glamor_egl.h0000644000175000017500000000620414757411105013377 /* * Copyright © 2016 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Adam Jackson */ #ifndef GLAMOR_EGL_H #define GLAMOR_EGL_H #define MESA_EGL_NO_X11_HEADERS #define EGL_NO_X11 #include #include #include /* * Create an EGLDisplay from a native display type. This is a little quirky * for a few reasons. * * 1: GetPlatformDisplayEXT and GetPlatformDisplay are the API you want to * use, but have different function signatures in the third argument; this * happens not to matter for us, at the moment, but it means epoxy won't alias * them together. * * 2: epoxy 1.3 and earlier don't understand EGL client extensions, which * means you can't call "eglGetPlatformDisplayEXT" directly, as the resolver * will crash. * * 3: You can't tell whether you have EGL 1.5 at this point, because * eglQueryString(EGL_VERSION) is a property of the display, which we don't * have yet. So you have to query for extensions no matter what. Fortunately * epoxy_has_egl_extension _does_ let you query for client extensions, so * we don't have to write our own extension string parsing. * * 4. There is no EGL_KHR_platform_base to complement the EXT one, thus one * needs to know EGL 1.5 is supported in order to use the eglGetPlatformDisplay * function pointer. * We can workaround this (circular dependency) by probing for the EGL 1.5 * platform extensions (EGL_KHR_platform_gbm and friends) yet it doesn't seem * like mesa will be able to adverise these (even though it can do EGL 1.5). */ static inline EGLDisplay glamor_egl_get_display(EGLint type, void *native) { /* In practise any EGL 1.5 implementation would support the EXT extension */ if (epoxy_has_egl_extension(NULL, "EGL_EXT_platform_base")) { PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplayEXT = (void *) eglGetProcAddress("eglGetPlatformDisplayEXT"); if (getPlatformDisplayEXT) return getPlatformDisplayEXT(type, native, NULL); } /* Welp, everything is awful. */ return eglGetDisplay(native); } #endif xorg-server-21.1.16/glamor/glamor_egl.c0000644000175000017500000010205114757411105013367 /* * Copyright © 2010 Intel Corporation. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including * the next paragraph) 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 AUTHORS OR COPYRIGHT * HOLDERS 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. * * Authors: * Zhigang Gong * */ #include "dix-config.h" #define GLAMOR_FOR_XORG #include #include #include #include #include #include #include #define EGL_DISPLAY_NO_X_MESA #include #include #include "glamor_egl.h" #include "glamor.h" #include "glamor_priv.h" #include "dri3.h" struct glamor_egl_screen_private { EGLDisplay display; EGLContext context; char *device_path; CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; int fd; struct gbm_device *gbm; int dmabuf_capable; CloseScreenProcPtr saved_close_screen; DestroyPixmapProcPtr saved_destroy_pixmap; xf86FreeScreenProc *saved_free_screen; }; int xf86GlamorEGLPrivateIndex = -1; static struct glamor_egl_screen_private * glamor_egl_get_screen_private(ScrnInfoPtr scrn) { return (struct glamor_egl_screen_private *) scrn->privates[xf86GlamorEGLPrivateIndex].ptr; } static void glamor_egl_make_current(struct glamor_context *glamor_ctx) { /* There's only a single global dispatch table in Mesa. EGL, GLX, * and AIGLX's direct dispatch table manipulation don't talk to * each other. We need to set the context to NULL first to avoid * EGL's no-op context change fast path when switching back to * EGL. */ eglMakeCurrent(glamor_ctx->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); if (!eglMakeCurrent(glamor_ctx->display, EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_ctx->ctx)) { FatalError("Failed to make EGL context current\n"); } } static int glamor_get_flink_name(int fd, int handle, int *name) { struct drm_gem_flink flink; flink.handle = handle; if (ioctl(fd, DRM_IOCTL_GEM_FLINK, &flink) < 0) { /* * Assume non-GEM kernels have names identical to the handle */ if (errno == ENODEV) { *name = handle; return TRUE; } else { return FALSE; } } *name = flink.name; return TRUE; } static Bool glamor_create_texture_from_image(ScreenPtr screen, EGLImageKHR image, GLuint * texture) { struct glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); glamor_make_current(glamor_priv); glGenTextures(1, texture); glBindTexture(GL_TEXTURE_2D, *texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image); glBindTexture(GL_TEXTURE_2D, 0); return TRUE; } struct gbm_device * glamor_egl_get_gbm_device(ScreenPtr screen) { struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); return glamor_egl->gbm; } Bool glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); PixmapPtr screen_pixmap; screen_pixmap = screen->GetScreenPixmap(screen); if (!glamor_egl_create_textured_pixmap(screen_pixmap, handle, stride)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create textured screen."); return FALSE; } return TRUE; } static void glamor_egl_set_pixmap_image(PixmapPtr pixmap, EGLImageKHR image, Bool used_modifiers) { struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); EGLImageKHR old; old = pixmap_priv->image; if (old) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); eglDestroyImageKHR(glamor_egl->display, old); } pixmap_priv->image = image; pixmap_priv->used_modifiers = used_modifiers; } Bool glamor_egl_create_textured_pixmap(PixmapPtr pixmap, int handle, int stride) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); int ret, fd; /* GBM doesn't have an import path from handles, so we make a * dma-buf fd from it and then go through that. */ ret = drmPrimeHandleToFD(glamor_egl->fd, handle, O_CLOEXEC, &fd); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make prime FD for handle: %d\n", errno); return FALSE; } if (!glamor_back_pixmap_from_fd(pixmap, fd, pixmap->drawable.width, pixmap->drawable.height, stride, pixmap->drawable.depth, pixmap->drawable.bitsPerPixel)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make import prime FD as pixmap: %d\n", errno); close(fd); return FALSE; } close(fd); return TRUE; } Bool glamor_egl_create_textured_pixmap_from_gbm_bo(PixmapPtr pixmap, struct gbm_bo *bo, Bool used_modifiers) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); struct glamor_egl_screen_private *glamor_egl; EGLImageKHR image; GLuint texture; Bool ret = FALSE; glamor_egl = glamor_egl_get_screen_private(scrn); glamor_make_current(glamor_priv); image = eglCreateImageKHR(glamor_egl->display, EGL_NO_CONTEXT, EGL_NATIVE_PIXMAP_KHR, bo, NULL); if (image == EGL_NO_IMAGE_KHR) { glamor_set_pixmap_type(pixmap, GLAMOR_DRM_ONLY); goto done; } glamor_create_texture_from_image(screen, image, &texture); glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM); glamor_set_pixmap_texture(pixmap, texture); glamor_egl_set_pixmap_image(pixmap, image, used_modifiers); ret = TRUE; done: return ret; } static void glamor_get_name_from_bo(int gbm_fd, struct gbm_bo *bo, int *name) { union gbm_bo_handle handle; handle = gbm_bo_get_handle(bo); if (!glamor_get_flink_name(gbm_fd, handle.u32, name)) *name = -1; } static Bool glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); unsigned width = pixmap->drawable.width; unsigned height = pixmap->drawable.height; uint32_t format; struct gbm_bo *bo = NULL; Bool used_modifiers = FALSE; PixmapPtr exported; GCPtr scratch_gc; if (pixmap_priv->image && (modifiers_ok || !pixmap_priv->used_modifiers)) return TRUE; switch (pixmap->drawable.depth) { case 30: format = GBM_FORMAT_ARGB2101010; break; case 32: case 24: format = GBM_FORMAT_ARGB8888; break; case 16: format = GBM_FORMAT_RGB565; break; case 15: format = GBM_FORMAT_ARGB1555; break; case 8: format = GBM_FORMAT_R8; break; default: xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make %d depth, %dbpp pixmap exportable\n", pixmap->drawable.depth, pixmap->drawable.bitsPerPixel); return FALSE; } #ifdef GBM_BO_WITH_MODIFIERS if (modifiers_ok && glamor_egl->dmabuf_capable) { uint32_t num_modifiers; uint64_t *modifiers = NULL; glamor_get_modifiers(screen, format, &num_modifiers, &modifiers); bo = gbm_bo_create_with_modifiers(glamor_egl->gbm, width, height, format, modifiers, num_modifiers); if (bo) used_modifiers = TRUE; free(modifiers); } #endif if (!bo) { bo = gbm_bo_create(glamor_egl->gbm, width, height, format, #ifdef GLAMOR_HAS_GBM_LINEAR (pixmap->usage_hint == CREATE_PIXMAP_USAGE_SHARED ? GBM_BO_USE_LINEAR : 0) | #endif GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT); } if (!bo) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make %dx%dx%dbpp GBM bo\n", width, height, pixmap->drawable.bitsPerPixel); return FALSE; } exported = screen->CreatePixmap(screen, 0, 0, pixmap->drawable.depth, 0); screen->ModifyPixmapHeader(exported, width, height, 0, 0, gbm_bo_get_stride(bo), NULL); if (!glamor_egl_create_textured_pixmap_from_gbm_bo(exported, bo, used_modifiers)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make %dx%dx%dbpp pixmap from GBM bo\n", width, height, pixmap->drawable.bitsPerPixel); screen->DestroyPixmap(exported); gbm_bo_destroy(bo); return FALSE; } gbm_bo_destroy(bo); scratch_gc = GetScratchGC(pixmap->drawable.depth, screen); ValidateGC(&pixmap->drawable, scratch_gc); scratch_gc->ops->CopyArea(&pixmap->drawable, &exported->drawable, scratch_gc, 0, 0, width, height, 0, 0); FreeScratchGC(scratch_gc); /* Now, swap the tex/gbm/EGLImage/etc. of the exported pixmap into * the original pixmap struct. */ glamor_egl_exchange_buffers(pixmap, exported); /* Swap the devKind into the original pixmap, reflecting the bo's stride */ screen->ModifyPixmapHeader(pixmap, 0, 0, 0, 0, exported->devKind, NULL); screen->DestroyPixmap(exported); return TRUE; } static struct gbm_bo * glamor_gbm_bo_from_pixmap_internal(ScreenPtr screen, PixmapPtr pixmap) { struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); if (!pixmap_priv->image) return NULL; return gbm_bo_import(glamor_egl->gbm, GBM_BO_IMPORT_EGL_IMAGE, pixmap_priv->image, 0); } struct gbm_bo * glamor_gbm_bo_from_pixmap(ScreenPtr screen, PixmapPtr pixmap) { if (!glamor_make_pixmap_exportable(pixmap, TRUE)) return NULL; return glamor_gbm_bo_from_pixmap_internal(screen, pixmap); } int glamor_egl_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds, uint32_t *strides, uint32_t *offsets, uint64_t *modifier) { #ifdef GLAMOR_HAS_GBM struct gbm_bo *bo; int num_fds; #ifdef GBM_BO_WITH_MODIFIERS int i; #endif if (!glamor_make_pixmap_exportable(pixmap, TRUE)) return 0; bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) return 0; #ifdef GBM_BO_WITH_MODIFIERS num_fds = gbm_bo_get_plane_count(bo); for (i = 0; i < num_fds; i++) { fds[i] = gbm_bo_get_fd(bo); strides[i] = gbm_bo_get_stride_for_plane(bo, i); offsets[i] = gbm_bo_get_offset(bo, i); } *modifier = gbm_bo_get_modifier(bo); #else num_fds = 1; fds[0] = gbm_bo_get_fd(bo); strides[0] = gbm_bo_get_stride(bo); offsets[0] = 0; *modifier = DRM_FORMAT_MOD_INVALID; #endif gbm_bo_destroy(bo); return num_fds; #else return 0; #endif } _X_EXPORT int glamor_egl_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { #ifdef GLAMOR_HAS_GBM struct gbm_bo *bo; int fd; if (!glamor_make_pixmap_exportable(pixmap, FALSE)) return -1; bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) return -1; fd = gbm_bo_get_fd(bo); *stride = gbm_bo_get_stride(bo); *size = *stride * gbm_bo_get_height(bo); gbm_bo_destroy(bo); return fd; #else return -1; #endif } int glamor_egl_fd_name_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, CARD16 *stride, CARD32 *size) { struct glamor_egl_screen_private *glamor_egl; struct gbm_bo *bo; int fd = -1; glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); if (!glamor_make_pixmap_exportable(pixmap, FALSE)) goto failure; bo = glamor_gbm_bo_from_pixmap_internal(screen, pixmap); if (!bo) goto failure; pixmap->devKind = gbm_bo_get_stride(bo); glamor_get_name_from_bo(glamor_egl->fd, bo, &fd); *stride = pixmap->devKind; *size = pixmap->devKind * gbm_bo_get_height(bo); gbm_bo_destroy(bo); failure: return fd; } _X_EXPORT Bool glamor_back_pixmap_from_fd(PixmapPtr pixmap, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl; struct gbm_bo *bo; struct gbm_import_fd_data import_data = { 0 }; Bool ret; glamor_egl = glamor_egl_get_screen_private(scrn); if (bpp != 32 || !(depth == 24 || depth == 32 || depth == 30) || width == 0 || height == 0) return FALSE; import_data.fd = fd; import_data.width = width; import_data.height = height; import_data.stride = stride; if (depth == 30) import_data.format = GBM_FORMAT_ARGB2101010; else import_data.format = GBM_FORMAT_ARGB8888; bo = gbm_bo_import(glamor_egl->gbm, GBM_BO_IMPORT_FD, &import_data, 0); if (!bo) return FALSE; screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, stride, NULL); ret = glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo, FALSE); gbm_bo_destroy(bo); return ret; } static uint32_t gbm_format_for_depth(CARD8 depth) { switch (depth) { case 16: return GBM_FORMAT_RGB565; case 24: return GBM_FORMAT_XRGB8888; case 30: return GBM_FORMAT_ARGB2101010; default: ErrorF("unexpected depth: %d\n", depth); case 32: return GBM_FORMAT_ARGB8888; } } _X_EXPORT PixmapPtr glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds, CARD16 width, CARD16 height, const CARD32 *strides, const CARD32 *offsets, CARD8 depth, CARD8 bpp, uint64_t modifier) { PixmapPtr pixmap; struct glamor_egl_screen_private *glamor_egl; Bool ret = FALSE; int i; glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); pixmap = screen->CreatePixmap(screen, 0, 0, depth, 0); #ifdef GBM_BO_WITH_MODIFIERS if (glamor_egl->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) { struct gbm_import_fd_modifier_data import_data = { 0 }; struct gbm_bo *bo; import_data.width = width; import_data.height = height; import_data.num_fds = num_fds; import_data.modifier = modifier; for (i = 0; i < num_fds; i++) { import_data.fds[i] = fds[i]; import_data.strides[i] = strides[i]; import_data.offsets[i] = offsets[i]; } import_data.format = gbm_format_for_depth(depth); bo = gbm_bo_import(glamor_egl->gbm, GBM_BO_IMPORT_FD_MODIFIER, &import_data, 0); if (bo) { screen->ModifyPixmapHeader(pixmap, width, height, 0, 0, strides[0], NULL); ret = glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo, TRUE); gbm_bo_destroy(bo); } } else #endif { if (num_fds == 1) { ret = glamor_back_pixmap_from_fd(pixmap, fds[0], width, height, strides[0], depth, bpp); } } if (ret == FALSE) { screen->DestroyPixmap(pixmap); return NULL; } return pixmap; } _X_EXPORT PixmapPtr glamor_pixmap_from_fd(ScreenPtr screen, int fd, CARD16 width, CARD16 height, CARD16 stride, CARD8 depth, CARD8 bpp) { PixmapPtr pixmap; Bool ret; pixmap = screen->CreatePixmap(screen, 0, 0, depth, 0); ret = glamor_back_pixmap_from_fd(pixmap, fd, width, height, stride, depth, bpp); if (ret == FALSE) { screen->DestroyPixmap(pixmap); return NULL; } return pixmap; } _X_EXPORT Bool glamor_get_formats(ScreenPtr screen, CARD32 *num_formats, CARD32 **formats) { #ifdef GLAMOR_HAS_EGL_QUERY_DMABUF struct glamor_egl_screen_private *glamor_egl; EGLint num; /* Explicitly zero the count as the caller may ignore the return value */ *num_formats = 0; glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); if (!glamor_egl->dmabuf_capable) return TRUE; if (!eglQueryDmaBufFormatsEXT(glamor_egl->display, 0, NULL, &num)) return FALSE; if (num == 0) return TRUE; *formats = calloc(num, sizeof(CARD32)); if (*formats == NULL) return FALSE; if (!eglQueryDmaBufFormatsEXT(glamor_egl->display, num, (EGLint *) *formats, &num)) { free(*formats); return FALSE; } *num_formats = num; return TRUE; #else *num_formats = 0; return TRUE; #endif } _X_EXPORT Bool glamor_get_modifiers(ScreenPtr screen, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers) { #ifdef GLAMOR_HAS_EGL_QUERY_DMABUF struct glamor_egl_screen_private *glamor_egl; EGLint num; /* Explicitly zero the count as the caller may ignore the return value */ *num_modifiers = 0; glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); if (!glamor_egl->dmabuf_capable) return FALSE; if (!eglQueryDmaBufModifiersEXT(glamor_egl->display, format, 0, NULL, NULL, &num)) return FALSE; if (num == 0) return TRUE; *modifiers = calloc(num, sizeof(uint64_t)); if (*modifiers == NULL) return FALSE; if (!eglQueryDmaBufModifiersEXT(glamor_egl->display, format, num, (EGLuint64KHR *) *modifiers, NULL, &num)) { free(*modifiers); return FALSE; } *num_modifiers = num; return TRUE; #else *num_modifiers = 0; return TRUE; #endif } _X_EXPORT const char * glamor_egl_get_driver_name(ScreenPtr screen) { #ifdef GLAMOR_HAS_EGL_QUERY_DRIVER struct glamor_egl_screen_private *glamor_egl; glamor_egl = glamor_egl_get_screen_private(xf86ScreenToScrn(screen)); if (epoxy_has_egl_extension(glamor_egl->display, "EGL_MESA_query_driver")) return eglGetDisplayDriverName(glamor_egl->display); #endif return NULL; } static Bool glamor_egl_destroy_pixmap(PixmapPtr pixmap) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); Bool ret; if (pixmap->refcnt == 1) { struct glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap); if (pixmap_priv->image) eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image); } screen->DestroyPixmap = glamor_egl->saved_destroy_pixmap; ret = screen->DestroyPixmap(pixmap); glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap; screen->DestroyPixmap = glamor_egl_destroy_pixmap; return ret; } _X_EXPORT void glamor_egl_exchange_buffers(PixmapPtr front, PixmapPtr back) { EGLImageKHR temp_img; Bool temp_mod; struct glamor_pixmap_private *front_priv = glamor_get_pixmap_private(front); struct glamor_pixmap_private *back_priv = glamor_get_pixmap_private(back); glamor_pixmap_exchange_fbos(front, back); temp_img = back_priv->image; temp_mod = back_priv->used_modifiers; back_priv->image = front_priv->image; back_priv->used_modifiers = front_priv->used_modifiers; front_priv->image = temp_img; front_priv->used_modifiers = temp_mod; glamor_set_pixmap_type(front, GLAMOR_TEXTURE_DRM); glamor_set_pixmap_type(back, GLAMOR_TEXTURE_DRM); } static Bool glamor_egl_close_screen(ScreenPtr screen) { ScrnInfoPtr scrn; struct glamor_egl_screen_private *glamor_egl; struct glamor_pixmap_private *pixmap_priv; PixmapPtr screen_pixmap; scrn = xf86ScreenToScrn(screen); glamor_egl = glamor_egl_get_screen_private(scrn); screen_pixmap = screen->GetScreenPixmap(screen); pixmap_priv = glamor_get_pixmap_private(screen_pixmap); eglDestroyImageKHR(glamor_egl->display, pixmap_priv->image); pixmap_priv->image = NULL; screen->CloseScreen = glamor_egl->saved_close_screen; return screen->CloseScreen(screen); } #ifdef DRI3 static int glamor_dri3_open_client(ClientPtr client, ScreenPtr screen, RRProviderPtr provider, int *fdp) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); int fd; drm_magic_t magic; fd = open(glamor_egl->device_path, O_RDWR|O_CLOEXEC); if (fd < 0) return BadAlloc; /* Before FD passing in the X protocol with DRI3 (and increased * security of rendering with per-process address spaces on the * GPU), the kernel had to come up with a way to have the server * decide which clients got to access the GPU, which was done by * each client getting a unique (magic) number from the kernel, * passing it to the server, and the server then telling the * kernel which clients were authenticated for using the device. * * Now that we have FD passing, the server can just set up the * authentication on its own and hand the prepared FD off to the * client. */ if (drmGetMagic(fd, &magic) < 0) { if (errno == EACCES) { /* Assume that we're on a render node, and the fd is * already as authenticated as it should be. */ *fdp = fd; return Success; } else { close(fd); return BadMatch; } } if (drmAuthMagic(glamor_egl->fd, magic) < 0) { close(fd); return BadMatch; } *fdp = fd; return Success; } static const dri3_screen_info_rec glamor_dri3_info = { .version = 2, .open_client = glamor_dri3_open_client, .pixmap_from_fds = glamor_pixmap_from_fds, .fd_from_pixmap = glamor_egl_fd_from_pixmap, .fds_from_pixmap = glamor_egl_fds_from_pixmap, .get_formats = glamor_get_formats, .get_modifiers = glamor_get_modifiers, .get_drawable_modifiers = glamor_get_drawable_modifiers, }; #endif /* DRI3 */ void glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct glamor_egl_screen_private *glamor_egl = glamor_egl_get_screen_private(scrn); #ifdef DRI3 glamor_screen_private *glamor_priv = glamor_get_screen_private(screen); #endif glamor_egl->saved_close_screen = screen->CloseScreen; screen->CloseScreen = glamor_egl_close_screen; glamor_egl->saved_destroy_pixmap = screen->DestroyPixmap; screen->DestroyPixmap = glamor_egl_destroy_pixmap; glamor_ctx->ctx = glamor_egl->context; glamor_ctx->display = glamor_egl->display; glamor_ctx->make_current = glamor_egl_make_current; #ifdef DRI3 /* Tell the core that we have the interfaces for import/export * of pixmaps. */ glamor_enable_dri3(screen); /* If the driver wants to do its own auth dance (e.g. Xwayland * on pre-3.15 kernels that don't have render nodes and thus * has the wayland compositor as a master), then it needs us * to stay out of the way and let it init DRI3 on its own. */ if (!(glamor_priv->flags & GLAMOR_NO_DRI3)) { /* To do DRI3 device FD generation, we need to open a new fd * to the same device we were handed in originally. */ glamor_egl->device_path = drmGetDeviceNameFromFd2(glamor_egl->fd); if (!dri3_screen_init(screen, &glamor_dri3_info)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to initialize DRI3.\n"); } } #endif } static void glamor_egl_cleanup(struct glamor_egl_screen_private *glamor_egl) { if (glamor_egl->display != EGL_NO_DISPLAY) { eglMakeCurrent(glamor_egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); /* * Force the next glamor_make_current call to update the context * (on hot unplug another GPU may still be using glamor) */ lastGLContext = NULL; eglTerminate(glamor_egl->display); } if (glamor_egl->gbm) gbm_device_destroy(glamor_egl->gbm); free(glamor_egl->device_path); free(glamor_egl); } static void glamor_egl_free_screen(ScrnInfoPtr scrn) { struct glamor_egl_screen_private *glamor_egl; glamor_egl = glamor_egl_get_screen_private(scrn); if (glamor_egl != NULL) { scrn->FreeScreen = glamor_egl->saved_free_screen; glamor_egl_cleanup(glamor_egl); scrn->FreeScreen(scrn); } } Bool glamor_egl_init(ScrnInfoPtr scrn, int fd) { struct glamor_egl_screen_private *glamor_egl; const GLubyte *renderer; EGLConfig egl_config; int n; glamor_egl = calloc(sizeof(*glamor_egl), 1); if (glamor_egl == NULL) return FALSE; if (xf86GlamorEGLPrivateIndex == -1) xf86GlamorEGLPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); scrn->privates[xf86GlamorEGLPrivateIndex].ptr = glamor_egl; glamor_egl->fd = fd; glamor_egl->gbm = gbm_create_device(glamor_egl->fd); if (glamor_egl->gbm == NULL) { ErrorF("couldn't get display device\n"); goto error; } glamor_egl->display = glamor_egl_get_display(EGL_PLATFORM_GBM_MESA, glamor_egl->gbm); if (!glamor_egl->display) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglGetDisplay() failed\n"); goto error; } if (!eglInitialize(glamor_egl->display, NULL, NULL)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglInitialize() failed\n"); glamor_egl->display = EGL_NO_DISPLAY; goto error; } #define GLAMOR_CHECK_EGL_EXTENSION(EXT) \ if (!epoxy_has_egl_extension(glamor_egl->display, "EGL_" #EXT)) { \ ErrorF("EGL_" #EXT " required.\n"); \ goto error; \ } #define GLAMOR_CHECK_EGL_EXTENSIONS(EXT1, EXT2) \ if (!epoxy_has_egl_extension(glamor_egl->display, "EGL_" #EXT1) && \ !epoxy_has_egl_extension(glamor_egl->display, "EGL_" #EXT2)) { \ ErrorF("EGL_" #EXT1 " or EGL_" #EXT2 " required.\n"); \ goto error; \ } GLAMOR_CHECK_EGL_EXTENSION(KHR_surfaceless_context); if (eglBindAPI(EGL_OPENGL_API)) { static const EGLint config_attribs_core[] = { EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR, EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR, EGL_CONTEXT_MAJOR_VERSION_KHR, GLAMOR_GL_CORE_VER_MAJOR, EGL_CONTEXT_MINOR_VERSION_KHR, GLAMOR_GL_CORE_VER_MINOR, EGL_NONE }; static const EGLint config_attribs[] = { EGL_NONE }; glamor_egl->context = eglCreateContext(glamor_egl->display, NULL, EGL_NO_CONTEXT, config_attribs_core); if (glamor_egl->context == EGL_NO_CONTEXT) glamor_egl->context = eglCreateContext(glamor_egl->display, NULL, EGL_NO_CONTEXT, config_attribs); } if (glamor_egl->context != EGL_NO_CONTEXT) { if (!eglMakeCurrent(glamor_egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_egl->context)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make GL context current\n"); goto error; } if (epoxy_gl_version() < 21) { xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor: Ignoring GL < 2.1, falling back to GLES.\n"); eglDestroyContext(glamor_egl->display, glamor_egl->context); glamor_egl->context = EGL_NO_CONTEXT; } } if (glamor_egl->context == EGL_NO_CONTEXT) { static const EGLint config_attribs[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE }; if (!eglBindAPI(EGL_OPENGL_ES_API)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor: Failed to bind either GL or GLES APIs.\n"); goto error; } if (!eglChooseConfig(glamor_egl->display, NULL, &egl_config, 1, &n)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor: No acceptable EGL configs found\n"); goto error; } glamor_egl->context = eglCreateContext(glamor_egl->display, egl_config, EGL_NO_CONTEXT, config_attribs); if (glamor_egl->context == EGL_NO_CONTEXT) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor: Failed to create GL or GLES2 contexts\n"); goto error; } if (!eglMakeCurrent(glamor_egl->display, EGL_NO_SURFACE, EGL_NO_SURFACE, glamor_egl->context)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to make GLES2 context current\n"); goto error; } } renderer = glGetString(GL_RENDERER); if (!renderer) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glGetString() returned NULL, your GL is broken\n"); goto error; } if (strstr((const char *)renderer, "llvmpipe")) { if (scrn->confScreen->num_gpu_devices) xf86DrvMsg(scrn->scrnIndex, X_INFO, "Allowing glamor on llvmpipe for PRIME\n"); else { xf86DrvMsg(scrn->scrnIndex, X_INFO, "Refusing to try glamor on llvmpipe\n"); goto error; } } /* * Force the next glamor_make_current call to set the right context * (in case of multiple GPUs using glamor) */ lastGLContext = NULL; if (!epoxy_has_gl_extension("GL_OES_EGL_image")) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor acceleration requires GL_OES_EGL_image\n"); goto error; } xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor X acceleration enabled on %s\n", renderer); #ifdef GBM_BO_WITH_MODIFIERS if (epoxy_has_egl_extension(glamor_egl->display, "EGL_EXT_image_dma_buf_import") && epoxy_has_egl_extension(glamor_egl->display, "EGL_EXT_image_dma_buf_import_modifiers")) { if (xf86Info.debug != NULL) glamor_egl->dmabuf_capable = !!strstr(xf86Info.debug, "dmabuf_capable"); else glamor_egl->dmabuf_capable = FALSE; } #endif glamor_egl->saved_free_screen = scrn->FreeScreen; scrn->FreeScreen = glamor_egl_free_screen; return TRUE; error: glamor_egl_cleanup(glamor_egl); return FALSE; } /** Stub to retain compatibility with pre-server-1.16 ABI. */ Bool glamor_egl_init_textured_pixmap(ScreenPtr screen) { return TRUE; } xorg-server-21.1.16/glamor/glamor_eglmodule.c0000644000175000017500000000374114757411105014603 /* * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. * * Authors: * Zhigang Gong */ #include "dix-config.h" #include #define GLAMOR_FOR_XORG #include #include "glamor.h" static XF86ModuleVersionInfo VersRec = { GLAMOR_EGL_MODULE_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 0, 1, /* version */ ABI_CLASS_ANSIC, /* Only need the ansic layer */ ABI_ANSIC_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} /* signature, to be patched into the file by a tool */ }; _X_EXPORT XF86ModuleData glamoreglModuleData = { &VersRec, NULL, NULL }; xorg-server-21.1.16/glx/0000755000175000017500000000000014757411133010506 5xorg-server-21.1.16/glx/meson.build0000644000175000017500000000340314757411105012567 srcs_glx = [ 'indirect_dispatch.c', 'indirect_dispatch_swap.c', 'indirect_reqsize.c', 'indirect_size_get.c', 'indirect_table.c', 'clientinfo.c', 'createcontext.c', 'extension_string.c', 'indirect_util.c', 'indirect_program.c', 'indirect_texture_compression.c', 'glxcmds.c', 'glxcmdsswap.c', 'glxext.c', 'glxdriswrast.c', 'glxdricommon.c', 'glxscreens.c', 'render2.c', 'render2swap.c', 'renderpix.c', 'renderpixswap.c', 'rensize.c', 'single2.c', 'single2swap.c', 'singlepix.c', 'singlepixswap.c', 'singlesize.c', 'swap_interval.c', 'xfont.c', ] libxserver_glx = [] if build_glx libxserver_glx = static_library('libxserver_glx', srcs_glx, include_directories: inc, dependencies: [ common_dep, dl_dep, dri_dep, dependency('glproto', version: '>= 1.4.17'), dependency('gl', version: '>= 1.2'), ], c_args: [ glx_align64, # XXX: generated code includes an unused function '-Wno-unused-function', ] ) endif srcs_glxdri2 = [] if build_dri2 or build_dri3 srcs_glxdri2 = files('glxdri2.c') endif srcs_vnd = [ 'vndcmds.c', 'vndext.c', 'vndservermapping.c', 'vndservervendor.c', ] hdrs_vnd = [ 'vndserver.h', ] libglxvnd = [] if build_glx libglxvnd = static_library('libglxvnd', srcs_vnd, include_directories: inc, dependencies: [ common_dep, dl_dep, dependency('glproto', version: '>= 1.4.17'), dependency('gl', version: '>= 1.2'), ], ) if build_xorg install_data(hdrs_vnd, install_dir : xorgsdkdir) endif endif xorg-server-21.1.16/glx/Makefile.am0000644000175000017500000000370314757411105012464 if DRI2 GLXDRI_LIBRARY = libglxdri.la endif noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) libglxvnd.la AM_CFLAGS = \ @DIX_CFLAGS@ \ @GL_CFLAGS@ \ @XLIB_CFLAGS@ \ @LIBDRM_CFLAGS@ \ @GLX_DEFINES@ \ @GLX_ARCH_DEFINES@ sdk_HEADERS = vndserver.h AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi \ -I$(top_srcdir)/present indirect_sources = \ indirect_dispatch.c \ indirect_dispatch.h \ indirect_dispatch_swap.c \ indirect_reqsize.c \ indirect_reqsize.h \ indirect_size.h \ indirect_size_get.c \ indirect_size_get.h \ indirect_table.c libglxdri_la_SOURCES = if DRI2 libglxdri_la_SOURCES += glxdri2.c endif libglxdri_la_LIBADD = $(DLOPEN_LIBS) libglx_la_SOURCES = \ $(indirect_sources) \ clientinfo.c \ createcontext.c \ extension_string.c \ extension_string.h \ indirect_util.c \ indirect_util.h \ indirect_program.c \ indirect_table.h \ indirect_texture_compression.c \ glxbyteorder.h \ glxcmds.c \ glxcmdsswap.c \ glxcontext.h \ glxdrawable.h \ glxext.c \ glxext.h \ glxdriswrast.c \ glxdricommon.c \ glxdricommon.h \ glxscreens.c \ glxscreens.h \ glxserver.h \ glxutil.h \ render2.c \ render2swap.c \ renderpix.c \ renderpixswap.c \ rensize.c \ single2.c \ single2swap.c \ singlepix.c \ singlepixswap.c \ singlesize.c \ singlesize.h \ swap_interval.c \ unpack.h \ xfont.c libglx_la_LIBADD = $(DLOPEN_LIBS) $(top_builddir)/Xext/libhashtable.la libglxvnd_la_SOURCES = \ vndcmds.c \ vndext.c \ vndservermapping.c \ vndservervendor.h \ vndservervendor.c libglxvnd_la_LIBADD = $(top_builddir)/Xext/libhashtable.la EXTRA_DIST = vnd_dispatch_stubs.c xorg-server-21.1.16/glx/vndserver.h0000644000175000017500000000774714757411105012633 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #ifndef VNDSERVER_H #define VNDSERVER_H #include #include "glxvndabi.h" #define GLXContextID CARD32 #define GLXDrawable CARD32 #if defined(__cplusplus) extern "C" { #endif typedef struct GlxScreenPrivRec { GlxServerVendor *vendor; } GlxScreenPriv; typedef struct GlxContextTagInfoRec { GLXContextTag tag; ClientPtr client; GlxServerVendor *vendor; void *data; GLXContextID context; GLXDrawable drawable; GLXDrawable readdrawable; } GlxContextTagInfo; typedef struct GlxClientPrivRec { GlxContextTagInfo *contextTags; unsigned int contextTagCount; /** * The vendor handles for each screen. */ GlxServerVendor **vendors; } GlxClientPriv; extern int GlxErrorBase; extern RESTYPE idResource; extern ExtensionEntry *GlxExtensionEntry; Bool GlxDispatchInit(void); void GlxDispatchReset(void); /** * Handles a request from the client. * * This function will look up the correct handler function and forward the * request to it. */ int GlxDispatchRequest(ClientPtr client); /** * Looks up the GlxClientPriv struct for a client. If we don't have a * GlxClientPriv struct yet, then allocate one. */ GlxClientPriv *GlxGetClientData(ClientPtr client); /** * Frees any data that's specific to a client. This should be called when a * client disconnects. */ void GlxFreeClientData(ClientPtr client); Bool GlxAddXIDMap(XID id, GlxServerVendor *vendor); GlxServerVendor * GlxGetXIDMap(XID id); void GlxRemoveXIDMap(XID id); /** * Records the client that sent the current request. This is needed in * GlxGetXIDMap to know which client's (screen -> vendor) mapping to use for a * regular X window. */ void GlxSetRequestClient(ClientPtr client); GlxContextTagInfo *GlxAllocContextTag(ClientPtr client, GlxServerVendor *vendor); GlxContextTagInfo *GlxLookupContextTag(ClientPtr client, GLXContextTag tag); void GlxFreeContextTag(GlxContextTagInfo *tagInfo); Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor); Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor); GlxScreenPriv *GlxGetScreen(ScreenPtr pScreen); GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen); static inline CARD32 GlxCheckSwap(ClientPtr client, CARD32 value) { if (client->swapped) { value = ((value & 0XFF000000) >> 24) | ((value & 0X00FF0000) >> 8) | ((value & 0X0000FF00) << 8) | ((value & 0X000000FF) << 24); } return value; } #if defined(__cplusplus) } #endif _X_EXPORT const GlxServerExports *glvndGetExports(void); #endif // VNDSERVER_H xorg-server-21.1.16/glx/Makefile.in0000644000175000017500000011062114757411115012474 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @DRI2_TRUE@am__append_1 = glxdri2.c subdir = glx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libglx_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(top_builddir)/Xext/libhashtable.la am__objects_1 = indirect_dispatch.lo indirect_dispatch_swap.lo \ indirect_reqsize.lo indirect_size_get.lo indirect_table.lo am_libglx_la_OBJECTS = $(am__objects_1) clientinfo.lo createcontext.lo \ extension_string.lo indirect_util.lo indirect_program.lo \ indirect_texture_compression.lo glxcmds.lo glxcmdsswap.lo \ glxext.lo glxdriswrast.lo glxdricommon.lo glxscreens.lo \ render2.lo render2swap.lo renderpix.lo renderpixswap.lo \ rensize.lo single2.lo single2swap.lo singlepix.lo \ singlepixswap.lo singlesize.lo swap_interval.lo xfont.lo libglx_la_OBJECTS = $(am_libglx_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libglxdri_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libglxdri_la_SOURCES_DIST = glxdri2.c @DRI2_TRUE@am__objects_2 = glxdri2.lo am_libglxdri_la_OBJECTS = $(am__objects_2) libglxdri_la_OBJECTS = $(am_libglxdri_la_OBJECTS) @DRI2_TRUE@am_libglxdri_la_rpath = libglxvnd_la_DEPENDENCIES = $(top_builddir)/Xext/libhashtable.la am_libglxvnd_la_OBJECTS = vndcmds.lo vndext.lo vndservermapping.lo \ vndservervendor.lo libglxvnd_la_OBJECTS = $(am_libglxvnd_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/clientinfo.Plo \ ./$(DEPDIR)/createcontext.Plo ./$(DEPDIR)/extension_string.Plo \ ./$(DEPDIR)/glxcmds.Plo ./$(DEPDIR)/glxcmdsswap.Plo \ ./$(DEPDIR)/glxdri2.Plo ./$(DEPDIR)/glxdricommon.Plo \ ./$(DEPDIR)/glxdriswrast.Plo ./$(DEPDIR)/glxext.Plo \ ./$(DEPDIR)/glxscreens.Plo ./$(DEPDIR)/indirect_dispatch.Plo \ ./$(DEPDIR)/indirect_dispatch_swap.Plo \ ./$(DEPDIR)/indirect_program.Plo \ ./$(DEPDIR)/indirect_reqsize.Plo \ ./$(DEPDIR)/indirect_size_get.Plo \ ./$(DEPDIR)/indirect_table.Plo \ ./$(DEPDIR)/indirect_texture_compression.Plo \ ./$(DEPDIR)/indirect_util.Plo ./$(DEPDIR)/render2.Plo \ ./$(DEPDIR)/render2swap.Plo ./$(DEPDIR)/renderpix.Plo \ ./$(DEPDIR)/renderpixswap.Plo ./$(DEPDIR)/rensize.Plo \ ./$(DEPDIR)/single2.Plo ./$(DEPDIR)/single2swap.Plo \ ./$(DEPDIR)/singlepix.Plo ./$(DEPDIR)/singlepixswap.Plo \ ./$(DEPDIR)/singlesize.Plo ./$(DEPDIR)/swap_interval.Plo \ ./$(DEPDIR)/vndcmds.Plo ./$(DEPDIR)/vndext.Plo \ ./$(DEPDIR)/vndservermapping.Plo \ ./$(DEPDIR)/vndservervendor.Plo ./$(DEPDIR)/xfont.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libglx_la_SOURCES) $(libglxdri_la_SOURCES) \ $(libglxvnd_la_SOURCES) DIST_SOURCES = $(libglx_la_SOURCES) $(am__libglxdri_la_SOURCES_DIST) \ $(libglxvnd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @DRI2_TRUE@GLXDRI_LIBRARY = libglxdri.la noinst_LTLIBRARIES = libglx.la $(GLXDRI_LIBRARY) libglxvnd.la AM_CFLAGS = \ @DIX_CFLAGS@ \ @GL_CFLAGS@ \ @XLIB_CFLAGS@ \ @LIBDRM_CFLAGS@ \ @GLX_DEFINES@ \ @GLX_ARCH_DEFINES@ sdk_HEADERS = vndserver.h AM_CPPFLAGS = \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/dri \ -I$(top_srcdir)/hw/xfree86/dri2 \ -I$(top_srcdir)/mi \ -I$(top_srcdir)/present indirect_sources = \ indirect_dispatch.c \ indirect_dispatch.h \ indirect_dispatch_swap.c \ indirect_reqsize.c \ indirect_reqsize.h \ indirect_size.h \ indirect_size_get.c \ indirect_size_get.h \ indirect_table.c libglxdri_la_SOURCES = $(am__append_1) libglxdri_la_LIBADD = $(DLOPEN_LIBS) libglx_la_SOURCES = \ $(indirect_sources) \ clientinfo.c \ createcontext.c \ extension_string.c \ extension_string.h \ indirect_util.c \ indirect_util.h \ indirect_program.c \ indirect_table.h \ indirect_texture_compression.c \ glxbyteorder.h \ glxcmds.c \ glxcmdsswap.c \ glxcontext.h \ glxdrawable.h \ glxext.c \ glxext.h \ glxdriswrast.c \ glxdricommon.c \ glxdricommon.h \ glxscreens.c \ glxscreens.h \ glxserver.h \ glxutil.h \ render2.c \ render2swap.c \ renderpix.c \ renderpixswap.c \ rensize.c \ single2.c \ single2swap.c \ singlepix.c \ singlepixswap.c \ singlesize.c \ singlesize.h \ swap_interval.c \ unpack.h \ xfont.c libglx_la_LIBADD = $(DLOPEN_LIBS) $(top_builddir)/Xext/libhashtable.la libglxvnd_la_SOURCES = \ vndcmds.c \ vndext.c \ vndservermapping.c \ vndservervendor.h \ vndservervendor.c libglxvnd_la_LIBADD = $(top_builddir)/Xext/libhashtable.la EXTRA_DIST = vnd_dispatch_stubs.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign glx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign glx/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) $(EXTRA_libglx_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS) libglxdri.la: $(libglxdri_la_OBJECTS) $(libglxdri_la_DEPENDENCIES) $(EXTRA_libglxdri_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libglxdri_la_rpath) $(libglxdri_la_OBJECTS) $(libglxdri_la_LIBADD) $(LIBS) libglxvnd.la: $(libglxvnd_la_OBJECTS) $(libglxvnd_la_DEPENDENCIES) $(EXTRA_libglxvnd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libglxvnd_la_OBJECTS) $(libglxvnd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clientinfo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/createcontext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extension_string.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmds.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxcmdsswap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdri2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdricommon.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxdriswrast.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxscreens.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_dispatch_swap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_program.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_reqsize.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_size_get.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_table.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_texture_compression.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect_util.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render2swap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpix.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/renderpixswap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rensize.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/single2swap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepix.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlepixswap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/singlesize.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swap_interval.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vndcmds.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vndext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vndservermapping.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vndservervendor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfont.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/clientinfo.Plo -rm -f ./$(DEPDIR)/createcontext.Plo -rm -f ./$(DEPDIR)/extension_string.Plo -rm -f ./$(DEPDIR)/glxcmds.Plo -rm -f ./$(DEPDIR)/glxcmdsswap.Plo -rm -f ./$(DEPDIR)/glxdri2.Plo -rm -f ./$(DEPDIR)/glxdricommon.Plo -rm -f ./$(DEPDIR)/glxdriswrast.Plo -rm -f ./$(DEPDIR)/glxext.Plo -rm -f ./$(DEPDIR)/glxscreens.Plo -rm -f ./$(DEPDIR)/indirect_dispatch.Plo -rm -f ./$(DEPDIR)/indirect_dispatch_swap.Plo -rm -f ./$(DEPDIR)/indirect_program.Plo -rm -f ./$(DEPDIR)/indirect_reqsize.Plo -rm -f ./$(DEPDIR)/indirect_size_get.Plo -rm -f ./$(DEPDIR)/indirect_table.Plo -rm -f ./$(DEPDIR)/indirect_texture_compression.Plo -rm -f ./$(DEPDIR)/indirect_util.Plo -rm -f ./$(DEPDIR)/render2.Plo -rm -f ./$(DEPDIR)/render2swap.Plo -rm -f ./$(DEPDIR)/renderpix.Plo -rm -f ./$(DEPDIR)/renderpixswap.Plo -rm -f ./$(DEPDIR)/rensize.Plo -rm -f ./$(DEPDIR)/single2.Plo -rm -f ./$(DEPDIR)/single2swap.Plo -rm -f ./$(DEPDIR)/singlepix.Plo -rm -f ./$(DEPDIR)/singlepixswap.Plo -rm -f ./$(DEPDIR)/singlesize.Plo -rm -f ./$(DEPDIR)/swap_interval.Plo -rm -f ./$(DEPDIR)/vndcmds.Plo -rm -f ./$(DEPDIR)/vndext.Plo -rm -f ./$(DEPDIR)/vndservermapping.Plo -rm -f ./$(DEPDIR)/vndservervendor.Plo -rm -f ./$(DEPDIR)/xfont.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/clientinfo.Plo -rm -f ./$(DEPDIR)/createcontext.Plo -rm -f ./$(DEPDIR)/extension_string.Plo -rm -f ./$(DEPDIR)/glxcmds.Plo -rm -f ./$(DEPDIR)/glxcmdsswap.Plo -rm -f ./$(DEPDIR)/glxdri2.Plo -rm -f ./$(DEPDIR)/glxdricommon.Plo -rm -f ./$(DEPDIR)/glxdriswrast.Plo -rm -f ./$(DEPDIR)/glxext.Plo -rm -f ./$(DEPDIR)/glxscreens.Plo -rm -f ./$(DEPDIR)/indirect_dispatch.Plo -rm -f ./$(DEPDIR)/indirect_dispatch_swap.Plo -rm -f ./$(DEPDIR)/indirect_program.Plo -rm -f ./$(DEPDIR)/indirect_reqsize.Plo -rm -f ./$(DEPDIR)/indirect_size_get.Plo -rm -f ./$(DEPDIR)/indirect_table.Plo -rm -f ./$(DEPDIR)/indirect_texture_compression.Plo -rm -f ./$(DEPDIR)/indirect_util.Plo -rm -f ./$(DEPDIR)/render2.Plo -rm -f ./$(DEPDIR)/render2swap.Plo -rm -f ./$(DEPDIR)/renderpix.Plo -rm -f ./$(DEPDIR)/renderpixswap.Plo -rm -f ./$(DEPDIR)/rensize.Plo -rm -f ./$(DEPDIR)/single2.Plo -rm -f ./$(DEPDIR)/single2swap.Plo -rm -f ./$(DEPDIR)/singlepix.Plo -rm -f ./$(DEPDIR)/singlepixswap.Plo -rm -f ./$(DEPDIR)/singlesize.Plo -rm -f ./$(DEPDIR)/swap_interval.Plo -rm -f ./$(DEPDIR)/vndcmds.Plo -rm -f ./$(DEPDIR)/vndext.Plo -rm -f ./$(DEPDIR)/vndservermapping.Plo -rm -f ./$(DEPDIR)/vndservervendor.Plo -rm -f ./$(DEPDIR)/xfont.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/glx/indirect_dispatch.c0000644000175000017500000040146614757411105014264 /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #include #include "glxserver.h" #include "indirect_size.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" #include "glxbyteorder.h" #include "indirect_util.h" #include "singlesize.h" #define __GLX_PAD(x) (((x) + 3) & ~3) typedef struct { __GLX_PIXEL_3D_HDR; } __GLXpixel3DHeader; extern GLboolean __glXErrorOccured(void); extern void __glXClearErrorOccured(void); static const unsigned dummy_answer[2] = { 0, 0 }; int __glXDisp_NewList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glNewList(*(GLuint *) (pc + 0), *(GLenum *) (pc + 4)); error = Success; } return error; } int __glXDisp_EndList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glEndList(); error = Success; } return error; } void __glXDisp_CallList(GLbyte * pc) { glCallList(*(GLuint *) (pc + 0)); } void __glXDisp_CallLists(GLbyte * pc) { const GLsizei n = *(GLsizei *) (pc + 0); const GLenum type = *(GLenum *) (pc + 4); const GLvoid *lists = (const GLvoid *) (pc + 8); lists = (const GLvoid *) (pc + 8); glCallLists(n, type, lists); } int __glXDisp_DeleteLists(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glDeleteLists(*(GLuint *) (pc + 0), *(GLsizei *) (pc + 4)); error = Success; } return error; } int __glXDisp_GenLists(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLuint retval; retval = glGenLists(*(GLsizei *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_ListBase(GLbyte * pc) { glListBase(*(GLuint *) (pc + 0)); } void __glXDisp_Begin(GLbyte * pc) { glBegin(*(GLenum *) (pc + 0)); } void __glXDisp_Bitmap(GLbyte * pc) { const GLubyte *const bitmap = (const GLubyte *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glBitmap(*(GLsizei *) (pc + 20), *(GLsizei *) (pc + 24), *(GLfloat *) (pc + 28), *(GLfloat *) (pc + 32), *(GLfloat *) (pc + 36), *(GLfloat *) (pc + 40), bitmap); } void __glXDisp_Color3bv(GLbyte * pc) { glColor3bv((const GLbyte *) (pc + 0)); } void __glXDisp_Color3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glColor3dv((const GLdouble *) (pc + 0)); } void __glXDisp_Color3fv(GLbyte * pc) { glColor3fv((const GLfloat *) (pc + 0)); } void __glXDisp_Color3iv(GLbyte * pc) { glColor3iv((const GLint *) (pc + 0)); } void __glXDisp_Color3sv(GLbyte * pc) { glColor3sv((const GLshort *) (pc + 0)); } void __glXDisp_Color3ubv(GLbyte * pc) { glColor3ubv((const GLubyte *) (pc + 0)); } void __glXDisp_Color3uiv(GLbyte * pc) { glColor3uiv((const GLuint *) (pc + 0)); } void __glXDisp_Color3usv(GLbyte * pc) { glColor3usv((const GLushort *) (pc + 0)); } void __glXDisp_Color4bv(GLbyte * pc) { glColor4bv((const GLbyte *) (pc + 0)); } void __glXDisp_Color4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glColor4dv((const GLdouble *) (pc + 0)); } void __glXDisp_Color4fv(GLbyte * pc) { glColor4fv((const GLfloat *) (pc + 0)); } void __glXDisp_Color4iv(GLbyte * pc) { glColor4iv((const GLint *) (pc + 0)); } void __glXDisp_Color4sv(GLbyte * pc) { glColor4sv((const GLshort *) (pc + 0)); } void __glXDisp_Color4ubv(GLbyte * pc) { glColor4ubv((const GLubyte *) (pc + 0)); } void __glXDisp_Color4uiv(GLbyte * pc) { glColor4uiv((const GLuint *) (pc + 0)); } void __glXDisp_Color4usv(GLbyte * pc) { glColor4usv((const GLushort *) (pc + 0)); } void __glXDisp_EdgeFlagv(GLbyte * pc) { glEdgeFlagv((const GLboolean *) (pc + 0)); } void __glXDisp_End(GLbyte * pc) { glEnd(); } void __glXDisp_Indexdv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glIndexdv((const GLdouble *) (pc + 0)); } void __glXDisp_Indexfv(GLbyte * pc) { glIndexfv((const GLfloat *) (pc + 0)); } void __glXDisp_Indexiv(GLbyte * pc) { glIndexiv((const GLint *) (pc + 0)); } void __glXDisp_Indexsv(GLbyte * pc) { glIndexsv((const GLshort *) (pc + 0)); } void __glXDisp_Normal3bv(GLbyte * pc) { glNormal3bv((const GLbyte *) (pc + 0)); } void __glXDisp_Normal3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glNormal3dv((const GLdouble *) (pc + 0)); } void __glXDisp_Normal3fv(GLbyte * pc) { glNormal3fv((const GLfloat *) (pc + 0)); } void __glXDisp_Normal3iv(GLbyte * pc) { glNormal3iv((const GLint *) (pc + 0)); } void __glXDisp_Normal3sv(GLbyte * pc) { glNormal3sv((const GLshort *) (pc + 0)); } void __glXDisp_RasterPos2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glRasterPos2dv((const GLdouble *) (pc + 0)); } void __glXDisp_RasterPos2fv(GLbyte * pc) { glRasterPos2fv((const GLfloat *) (pc + 0)); } void __glXDisp_RasterPos2iv(GLbyte * pc) { glRasterPos2iv((const GLint *) (pc + 0)); } void __glXDisp_RasterPos2sv(GLbyte * pc) { glRasterPos2sv((const GLshort *) (pc + 0)); } void __glXDisp_RasterPos3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glRasterPos3dv((const GLdouble *) (pc + 0)); } void __glXDisp_RasterPos3fv(GLbyte * pc) { glRasterPos3fv((const GLfloat *) (pc + 0)); } void __glXDisp_RasterPos3iv(GLbyte * pc) { glRasterPos3iv((const GLint *) (pc + 0)); } void __glXDisp_RasterPos3sv(GLbyte * pc) { glRasterPos3sv((const GLshort *) (pc + 0)); } void __glXDisp_RasterPos4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRasterPos4dv((const GLdouble *) (pc + 0)); } void __glXDisp_RasterPos4fv(GLbyte * pc) { glRasterPos4fv((const GLfloat *) (pc + 0)); } void __glXDisp_RasterPos4iv(GLbyte * pc) { glRasterPos4iv((const GLint *) (pc + 0)); } void __glXDisp_RasterPos4sv(GLbyte * pc) { glRasterPos4sv((const GLshort *) (pc + 0)); } void __glXDisp_Rectdv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRectdv((const GLdouble *) (pc + 0), (const GLdouble *) (pc + 16)); } void __glXDisp_Rectfv(GLbyte * pc) { glRectfv((const GLfloat *) (pc + 0), (const GLfloat *) (pc + 8)); } void __glXDisp_Rectiv(GLbyte * pc) { glRectiv((const GLint *) (pc + 0), (const GLint *) (pc + 8)); } void __glXDisp_Rectsv(GLbyte * pc) { glRectsv((const GLshort *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_TexCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glTexCoord1dv((const GLdouble *) (pc + 0)); } void __glXDisp_TexCoord1fv(GLbyte * pc) { glTexCoord1fv((const GLfloat *) (pc + 0)); } void __glXDisp_TexCoord1iv(GLbyte * pc) { glTexCoord1iv((const GLint *) (pc + 0)); } void __glXDisp_TexCoord1sv(GLbyte * pc) { glTexCoord1sv((const GLshort *) (pc + 0)); } void __glXDisp_TexCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glTexCoord2dv((const GLdouble *) (pc + 0)); } void __glXDisp_TexCoord2fv(GLbyte * pc) { glTexCoord2fv((const GLfloat *) (pc + 0)); } void __glXDisp_TexCoord2iv(GLbyte * pc) { glTexCoord2iv((const GLint *) (pc + 0)); } void __glXDisp_TexCoord2sv(GLbyte * pc) { glTexCoord2sv((const GLshort *) (pc + 0)); } void __glXDisp_TexCoord3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glTexCoord3dv((const GLdouble *) (pc + 0)); } void __glXDisp_TexCoord3fv(GLbyte * pc) { glTexCoord3fv((const GLfloat *) (pc + 0)); } void __glXDisp_TexCoord3iv(GLbyte * pc) { glTexCoord3iv((const GLint *) (pc + 0)); } void __glXDisp_TexCoord3sv(GLbyte * pc) { glTexCoord3sv((const GLshort *) (pc + 0)); } void __glXDisp_TexCoord4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glTexCoord4dv((const GLdouble *) (pc + 0)); } void __glXDisp_TexCoord4fv(GLbyte * pc) { glTexCoord4fv((const GLfloat *) (pc + 0)); } void __glXDisp_TexCoord4iv(GLbyte * pc) { glTexCoord4iv((const GLint *) (pc + 0)); } void __glXDisp_TexCoord4sv(GLbyte * pc) { glTexCoord4sv((const GLshort *) (pc + 0)); } void __glXDisp_Vertex2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glVertex2dv((const GLdouble *) (pc + 0)); } void __glXDisp_Vertex2fv(GLbyte * pc) { glVertex2fv((const GLfloat *) (pc + 0)); } void __glXDisp_Vertex2iv(GLbyte * pc) { glVertex2iv((const GLint *) (pc + 0)); } void __glXDisp_Vertex2sv(GLbyte * pc) { glVertex2sv((const GLshort *) (pc + 0)); } void __glXDisp_Vertex3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glVertex3dv((const GLdouble *) (pc + 0)); } void __glXDisp_Vertex3fv(GLbyte * pc) { glVertex3fv((const GLfloat *) (pc + 0)); } void __glXDisp_Vertex3iv(GLbyte * pc) { glVertex3iv((const GLint *) (pc + 0)); } void __glXDisp_Vertex3sv(GLbyte * pc) { glVertex3sv((const GLshort *) (pc + 0)); } void __glXDisp_Vertex4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glVertex4dv((const GLdouble *) (pc + 0)); } void __glXDisp_Vertex4fv(GLbyte * pc) { glVertex4fv((const GLfloat *) (pc + 0)); } void __glXDisp_Vertex4iv(GLbyte * pc) { glVertex4iv((const GLint *) (pc + 0)); } void __glXDisp_Vertex4sv(GLbyte * pc) { glVertex4sv((const GLshort *) (pc + 0)); } void __glXDisp_ClipPlane(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif glClipPlane(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0)); } void __glXDisp_ColorMaterial(GLbyte * pc) { glColorMaterial(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_CullFace(GLbyte * pc) { glCullFace(*(GLenum *) (pc + 0)); } void __glXDisp_Fogf(GLbyte * pc) { glFogf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_Fogfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 0); const GLfloat *params; params = (const GLfloat *) (pc + 4); glFogfv(pname, params); } void __glXDisp_Fogi(GLbyte * pc) { glFogi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); } void __glXDisp_Fogiv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 0); const GLint *params; params = (const GLint *) (pc + 4); glFogiv(pname, params); } void __glXDisp_FrontFace(GLbyte * pc) { glFrontFace(*(GLenum *) (pc + 0)); } void __glXDisp_Hint(GLbyte * pc) { glHint(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_Lightf(GLbyte * pc) { glLightf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_Lightfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glLightfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_Lighti(GLbyte * pc) { glLighti(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_Lightiv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glLightiv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_LightModelf(GLbyte * pc) { glLightModelf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_LightModelfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 0); const GLfloat *params; params = (const GLfloat *) (pc + 4); glLightModelfv(pname, params); } void __glXDisp_LightModeli(GLbyte * pc) { glLightModeli(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); } void __glXDisp_LightModeliv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 0); const GLint *params; params = (const GLint *) (pc + 4); glLightModeliv(pname, params); } void __glXDisp_LineStipple(GLbyte * pc) { glLineStipple(*(GLint *) (pc + 0), *(GLushort *) (pc + 4)); } void __glXDisp_LineWidth(GLbyte * pc) { glLineWidth(*(GLfloat *) (pc + 0)); } void __glXDisp_Materialf(GLbyte * pc) { glMaterialf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_Materialfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glMaterialfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_Materiali(GLbyte * pc) { glMateriali(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_Materialiv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glMaterialiv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_PointSize(GLbyte * pc) { glPointSize(*(GLfloat *) (pc + 0)); } void __glXDisp_PolygonMode(GLbyte * pc) { glPolygonMode(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_PolygonStipple(GLbyte * pc) { const GLubyte *const mask = (const GLubyte *) ((pc + 20)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glPolygonStipple(mask); } void __glXDisp_Scissor(GLbyte * pc) { glScissor(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); } void __glXDisp_ShadeModel(GLbyte * pc) { glShadeModel(*(GLenum *) (pc + 0)); } void __glXDisp_TexParameterf(GLbyte * pc) { glTexParameterf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_TexParameterfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glTexParameterfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexParameteri(GLbyte * pc) { glTexParameteri(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_TexParameteriv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glTexParameteriv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexImage1D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexImage1D(*(GLenum *) (pc + 20), *(GLint *) (pc + 24), *(GLint *) (pc + 28), *(GLsizei *) (pc + 32), *(GLint *) (pc + 40), *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); } void __glXDisp_TexImage2D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexImage2D(*(GLenum *) (pc + 20), *(GLint *) (pc + 24), *(GLint *) (pc + 28), *(GLsizei *) (pc + 32), *(GLsizei *) (pc + 36), *(GLint *) (pc + 40), *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); } void __glXDisp_TexEnvf(GLbyte * pc) { glTexEnvf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_TexEnvfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glTexEnvfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexEnvi(GLbyte * pc) { glTexEnvi(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_TexEnviv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glTexEnviv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexGend(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glTexGend(*(GLenum *) (pc + 8), *(GLenum *) (pc + 12), *(GLdouble *) (pc + 0)); } void __glXDisp_TexGendv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLdouble *params; #ifdef __GLX_ALIGN64 const GLuint compsize = __glTexGendv_size(pname); const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif params = (const GLdouble *) (pc + 8); glTexGendv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexGenf(GLbyte * pc) { glTexGenf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_TexGenfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glTexGenfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_TexGeni(GLbyte * pc) { glTexGeni(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_TexGeniv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glTexGeniv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_InitNames(GLbyte * pc) { glInitNames(); } void __glXDisp_LoadName(GLbyte * pc) { glLoadName(*(GLuint *) (pc + 0)); } void __glXDisp_PassThrough(GLbyte * pc) { glPassThrough(*(GLfloat *) (pc + 0)); } void __glXDisp_PopName(GLbyte * pc) { glPopName(); } void __glXDisp_PushName(GLbyte * pc) { glPushName(*(GLuint *) (pc + 0)); } void __glXDisp_DrawBuffer(GLbyte * pc) { glDrawBuffer(*(GLenum *) (pc + 0)); } void __glXDisp_Clear(GLbyte * pc) { glClear(*(GLbitfield *) (pc + 0)); } void __glXDisp_ClearAccum(GLbyte * pc) { glClearAccum(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12)); } void __glXDisp_ClearIndex(GLbyte * pc) { glClearIndex(*(GLfloat *) (pc + 0)); } void __glXDisp_ClearColor(GLbyte * pc) { glClearColor(*(GLclampf *) (pc + 0), *(GLclampf *) (pc + 4), *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12)); } void __glXDisp_ClearStencil(GLbyte * pc) { glClearStencil(*(GLint *) (pc + 0)); } void __glXDisp_ClearDepth(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glClearDepth(*(GLclampd *) (pc + 0)); } void __glXDisp_StencilMask(GLbyte * pc) { glStencilMask(*(GLuint *) (pc + 0)); } void __glXDisp_ColorMask(GLbyte * pc) { glColorMask(*(GLboolean *) (pc + 0), *(GLboolean *) (pc + 1), *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3)); } void __glXDisp_DepthMask(GLbyte * pc) { glDepthMask(*(GLboolean *) (pc + 0)); } void __glXDisp_IndexMask(GLbyte * pc) { glIndexMask(*(GLuint *) (pc + 0)); } void __glXDisp_Accum(GLbyte * pc) { glAccum(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_Disable(GLbyte * pc) { glDisable(*(GLenum *) (pc + 0)); } void __glXDisp_Enable(GLbyte * pc) { glEnable(*(GLenum *) (pc + 0)); } void __glXDisp_PopAttrib(GLbyte * pc) { glPopAttrib(); } void __glXDisp_PushAttrib(GLbyte * pc) { glPushAttrib(*(GLbitfield *) (pc + 0)); } void __glXDisp_MapGrid1d(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif glMapGrid1d(*(GLint *) (pc + 16), *(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8)); } void __glXDisp_MapGrid1f(GLbyte * pc) { glMapGrid1f(*(GLint *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_MapGrid2d(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif glMapGrid2d(*(GLint *) (pc + 32), *(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLint *) (pc + 36), *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24)); } void __glXDisp_MapGrid2f(GLbyte * pc) { glMapGrid2f(*(GLint *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8), *(GLint *) (pc + 12), *(GLfloat *) (pc + 16), *(GLfloat *) (pc + 20)); } void __glXDisp_EvalCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glEvalCoord1dv((const GLdouble *) (pc + 0)); } void __glXDisp_EvalCoord1fv(GLbyte * pc) { glEvalCoord1fv((const GLfloat *) (pc + 0)); } void __glXDisp_EvalCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glEvalCoord2dv((const GLdouble *) (pc + 0)); } void __glXDisp_EvalCoord2fv(GLbyte * pc) { glEvalCoord2fv((const GLfloat *) (pc + 0)); } void __glXDisp_EvalMesh1(GLbyte * pc) { glEvalMesh1(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_EvalPoint1(GLbyte * pc) { glEvalPoint1(*(GLint *) (pc + 0)); } void __glXDisp_EvalMesh2(GLbyte * pc) { glEvalMesh2(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16)); } void __glXDisp_EvalPoint2(GLbyte * pc) { glEvalPoint2(*(GLint *) (pc + 0), *(GLint *) (pc + 4)); } void __glXDisp_AlphaFunc(GLbyte * pc) { glAlphaFunc(*(GLenum *) (pc + 0), *(GLclampf *) (pc + 4)); } void __glXDisp_BlendFunc(GLbyte * pc) { glBlendFunc(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_LogicOp(GLbyte * pc) { glLogicOp(*(GLenum *) (pc + 0)); } void __glXDisp_StencilFunc(GLbyte * pc) { glStencilFunc(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLuint *) (pc + 8)); } void __glXDisp_StencilOp(GLbyte * pc) { glStencilOp(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8)); } void __glXDisp_DepthFunc(GLbyte * pc) { glDepthFunc(*(GLenum *) (pc + 0)); } void __glXDisp_PixelZoom(GLbyte * pc) { glPixelZoom(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_PixelTransferf(GLbyte * pc) { glPixelTransferf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_PixelTransferi(GLbyte * pc) { glPixelTransferi(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); } int __glXDisp_PixelStoref(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glPixelStoref(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); error = Success; } return error; } int __glXDisp_PixelStorei(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glPixelStorei(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); error = Success; } return error; } void __glXDisp_PixelMapfv(GLbyte * pc) { const GLsizei mapsize = *(GLsizei *) (pc + 4); glPixelMapfv(*(GLenum *) (pc + 0), mapsize, (const GLfloat *) (pc + 8)); } void __glXDisp_PixelMapuiv(GLbyte * pc) { const GLsizei mapsize = *(GLsizei *) (pc + 4); glPixelMapuiv(*(GLenum *) (pc + 0), mapsize, (const GLuint *) (pc + 8)); } void __glXDisp_PixelMapusv(GLbyte * pc) { const GLsizei mapsize = *(GLsizei *) (pc + 4); glPixelMapusv(*(GLenum *) (pc + 0), mapsize, (const GLushort *) (pc + 8)); } void __glXDisp_ReadBuffer(GLbyte * pc) { glReadBuffer(*(GLenum *) (pc + 0)); } void __glXDisp_CopyPixels(GLbyte * pc) { glCopyPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16)); } void __glXDisp_DrawPixels(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 36)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glDrawPixels(*(GLsizei *) (pc + 20), *(GLsizei *) (pc + 24), *(GLenum *) (pc + 28), *(GLenum *) (pc + 32), pixels); } int __glXDisp_GetBooleanv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 0); const GLuint compsize = __glGetBooleanv_size(pname); GLboolean answerBuffer[200]; GLboolean *params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetBooleanv(pname, params); __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetClipPlane(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLdouble equation[4]; glGetClipPlane(*(GLenum *) (pc + 0), equation); __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_GetDoublev(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 0); const GLuint compsize = __glGetDoublev_size(pname); GLdouble answerBuffer[200]; GLdouble *params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetDoublev(pname, params); __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetError(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLenum retval; retval = glGetError(); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDisp_GetFloatv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 0); const GLuint compsize = __glGetFloatv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetFloatv(pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetIntegerv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 0); const GLuint compsize = __glGetIntegerv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetIntegerv(pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetLightfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetLightfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetLightfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetLightiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetLightiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetLightiv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMapdv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = *(GLenum *) (pc + 0); const GLenum query = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMapdv_size(target, query); GLdouble answerBuffer[200]; GLdouble *v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapdv(target, query, v); __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMapfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = *(GLenum *) (pc + 0); const GLenum query = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMapfv_size(target, query); GLfloat answerBuffer[200]; GLfloat *v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapfv(target, query, v); __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMapiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = *(GLenum *) (pc + 0); const GLenum query = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMapiv_size(target, query); GLint answerBuffer[200]; GLint *v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapiv(target, query, v); __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMaterialfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMaterialfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMaterialfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMaterialiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMaterialiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMaterialiv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = *(GLenum *) (pc + 0); const GLuint compsize = __glGetPixelMapfv_size(map); GLfloat answerBuffer[200]; GLfloat *values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapfv(map, values); __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = *(GLenum *) (pc + 0); const GLuint compsize = __glGetPixelMapuiv_size(map); GLuint answerBuffer[200]; GLuint *values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapuiv(map, values); __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = *(GLenum *) (pc + 0); const GLuint compsize = __glGetPixelMapusv_size(map); GLushort answerBuffer[200]; GLushort *values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapusv(map, values); __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexEnvfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexEnvfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexEnviv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexEnviv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexEnviv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexGendv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexGendv_size(pname); GLdouble answerBuffer[200]; GLdouble *params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGendv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexGenfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexGenfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGenfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexGeniv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexGeniv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGeniv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetTexParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 8); const GLuint compsize = __glGetTexLevelParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexLevelParameterfv(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 8); const GLuint compsize = __glGetTexLevelParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexLevelParameteriv(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_IsEnabled(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsEnabled(*(GLenum *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDisp_IsList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsList(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_DepthRange(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glDepthRange(*(GLclampd *) (pc + 0), *(GLclampd *) (pc + 8)); } void __glXDisp_Frustum(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 48); pc -= 4; } #endif glFrustum(*(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24), *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40)); } void __glXDisp_LoadIdentity(GLbyte * pc) { glLoadIdentity(); } void __glXDisp_LoadMatrixf(GLbyte * pc) { glLoadMatrixf((const GLfloat *) (pc + 0)); } void __glXDisp_LoadMatrixd(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 128); pc -= 4; } #endif glLoadMatrixd((const GLdouble *) (pc + 0)); } void __glXDisp_MatrixMode(GLbyte * pc) { glMatrixMode(*(GLenum *) (pc + 0)); } void __glXDisp_MultMatrixf(GLbyte * pc) { glMultMatrixf((const GLfloat *) (pc + 0)); } void __glXDisp_MultMatrixd(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 128); pc -= 4; } #endif glMultMatrixd((const GLdouble *) (pc + 0)); } void __glXDisp_Ortho(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 48); pc -= 4; } #endif glOrtho(*(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24), *(GLdouble *) (pc + 32), *(GLdouble *) (pc + 40)); } void __glXDisp_PopMatrix(GLbyte * pc) { glPopMatrix(); } void __glXDisp_PushMatrix(GLbyte * pc) { glPushMatrix(); } void __glXDisp_Rotated(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRotated(*(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16), *(GLdouble *) (pc + 24)); } void __glXDisp_Rotatef(GLbyte * pc) { glRotatef(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8), *(GLfloat *) (pc + 12)); } void __glXDisp_Scaled(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glScaled(*(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16)); } void __glXDisp_Scalef(GLbyte * pc) { glScalef(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_Translated(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glTranslated(*(GLdouble *) (pc + 0), *(GLdouble *) (pc + 8), *(GLdouble *) (pc + 16)); } void __glXDisp_Translatef(GLbyte * pc) { glTranslatef(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_Viewport(GLbyte * pc) { glViewport(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); } void __glXDisp_BindTexture(GLbyte * pc) { glBindTexture(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); } void __glXDisp_Indexubv(GLbyte * pc) { glIndexubv((const GLubyte *) (pc + 0)); } void __glXDisp_PolygonOffset(GLbyte * pc) { glPolygonOffset(*(GLfloat *) (pc + 0), *(GLfloat *) (pc + 4)); } int __glXDisp_AreTexturesResident(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLboolean retval; GLboolean answerBuffer[200]; GLboolean *residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); if (residences == NULL) return BadAlloc; retval = glAreTexturesResident(n, (const GLuint *) (pc + 4), residences); __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); error = Success; } return error; } int __glXDisp_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLboolean retval; GLboolean answerBuffer[200]; GLboolean *residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); if (residences == NULL) return BadAlloc; retval = glAreTexturesResident(n, (const GLuint *) (pc + 4), residences); __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); error = Success; } return error; } void __glXDisp_CopyTexImage1D(GLbyte * pc) { glCopyTexImage1D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLsizei *) (pc + 20), *(GLint *) (pc + 24)); } void __glXDisp_CopyTexImage2D(GLbyte * pc) { glCopyTexImage2D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLsizei *) (pc + 20), *(GLsizei *) (pc + 24), *(GLint *) (pc + 28)); } void __glXDisp_CopyTexSubImage1D(GLbyte * pc) { glCopyTexSubImage1D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLsizei *) (pc + 20)); } void __glXDisp_CopyTexSubImage2D(GLbyte * pc) { glCopyTexSubImage2D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLint *) (pc + 20), *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28)); } int __glXDisp_DeleteTextures(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); glDeleteTextures(n, (const GLuint *) (pc + 4)); error = Success; } return error; } int __glXDisp_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); glDeleteTextures(n, (const GLuint *) (pc + 4)); error = Success; } return error; } int __glXDisp_GenTextures(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (textures == NULL) return BadAlloc; glGenTextures(n, textures); __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (textures == NULL) return BadAlloc; glGenTextures(n, textures); __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_IsTexture(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsTexture(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDisp_IsTextureEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsTexture(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_PrioritizeTextures(GLbyte * pc) { const GLsizei n = *(GLsizei *) (pc + 0); glPrioritizeTextures(n, (const GLuint *) (pc + 4), (const GLclampf *) (pc + 4)); } void __glXDisp_TexSubImage1D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexSubImage1D(*(GLenum *) (pc + 20), *(GLint *) (pc + 24), *(GLint *) (pc + 28), *(GLsizei *) (pc + 36), *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); } void __glXDisp_TexSubImage2D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexSubImage2D(*(GLenum *) (pc + 20), *(GLint *) (pc + 24), *(GLint *) (pc + 28), *(GLint *) (pc + 32), *(GLsizei *) (pc + 36), *(GLsizei *) (pc + 40), *(GLenum *) (pc + 44), *(GLenum *) (pc + 48), pixels); } void __glXDisp_BlendColor(GLbyte * pc) { glBlendColor(*(GLclampf *) (pc + 0), *(GLclampf *) (pc + 4), *(GLclampf *) (pc + 8), *(GLclampf *) (pc + 12)); } void __glXDisp_BlendEquation(GLbyte * pc) { glBlendEquation(*(GLenum *) (pc + 0)); } void __glXDisp_ColorTable(GLbyte * pc) { const GLvoid *const table = (const GLvoid *) ((pc + 40)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glColorTable(*(GLenum *) (pc + 20), *(GLenum *) (pc + 24), *(GLsizei *) (pc + 28), *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), table); } void __glXDisp_ColorTableParameterfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_ColorTableParameteriv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_CopyColorTable(GLbyte * pc) { glCopyColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); } int __glXDisp_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetColorTableParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetColorTableParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetColorTableParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetColorTableParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } void __glXDisp_ColorSubTable(GLbyte * pc) { const GLvoid *const data = (const GLvoid *) ((pc + 40)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glColorSubTable(*(GLenum *) (pc + 20), *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28), *(GLenum *) (pc + 32), *(GLenum *) (pc + 36), data); } void __glXDisp_CopyColorSubTable(GLbyte * pc) { glCopyColorSubTable(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); } void __glXDisp_ConvolutionFilter1D(GLbyte * pc) { const GLvoid *const image = (const GLvoid *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glConvolutionFilter1D(*(GLenum *) (pc + 20), *(GLenum *) (pc + 24), *(GLsizei *) (pc + 28), *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image); } void __glXDisp_ConvolutionFilter2D(GLbyte * pc) { const GLvoid *const image = (const GLvoid *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glConvolutionFilter2D(*(GLenum *) (pc + 20), *(GLenum *) (pc + 24), *(GLsizei *) (pc + 28), *(GLsizei *) (pc + 32), *(GLenum *) (pc + 36), *(GLenum *) (pc + 40), image); } void __glXDisp_ConvolutionParameterf(GLbyte * pc) { glConvolutionParameterf(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLfloat *) (pc + 8)); } void __glXDisp_ConvolutionParameterfv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLfloat *params; params = (const GLfloat *) (pc + 8); glConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_ConvolutionParameteri(GLbyte * pc) { glConvolutionParameteri(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8)); } void __glXDisp_ConvolutionParameteriv(GLbyte * pc) { const GLenum pname = *(GLenum *) (pc + 4); const GLint *params; params = (const GLint *) (pc + 8); glConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); } void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc) { glCopyConvolutionFilter1D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLsizei *) (pc + 16)); } void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc) { glCopyConvolutionFilter2D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20)); } int __glXDisp_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetConvolutionParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetConvolutionParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetConvolutionParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetConvolutionParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetHistogramParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetHistogramParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetHistogramParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetHistogramParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMinmaxParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMinmaxParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameterfv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMinmaxParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetMinmaxParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameteriv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } void __glXDisp_Histogram(GLbyte * pc) { glHistogram(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4), *(GLenum *) (pc + 8), *(GLboolean *) (pc + 12)); } void __glXDisp_Minmax(GLbyte * pc) { glMinmax(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLboolean *) (pc + 8)); } void __glXDisp_ResetHistogram(GLbyte * pc) { glResetHistogram(*(GLenum *) (pc + 0)); } void __glXDisp_ResetMinmax(GLbyte * pc) { glResetMinmax(*(GLenum *) (pc + 0)); } void __glXDisp_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *) (pc + 76); const GLvoid *const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexImage3D(*(GLenum *) (pc + 36), *(GLint *) (pc + 40), *(GLint *) (pc + 44), *(GLsizei *) (pc + 48), *(GLsizei *) (pc + 52), *(GLsizei *) (pc + 56), *(GLint *) (pc + 64), *(GLenum *) (pc + 68), *(GLenum *) (pc + 72), pixels); } void __glXDisp_TexSubImage3D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 88)); __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment); glTexSubImage3D(*(GLenum *) (pc + 36), *(GLint *) (pc + 40), *(GLint *) (pc + 44), *(GLint *) (pc + 48), *(GLint *) (pc + 52), *(GLsizei *) (pc + 60), *(GLsizei *) (pc + 64), *(GLsizei *) (pc + 68), *(GLenum *) (pc + 76), *(GLenum *) (pc + 80), pixels); } void __glXDisp_CopyTexSubImage3D(GLbyte * pc) { glCopyTexSubImage3D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLint *) (pc + 20), *(GLint *) (pc + 24), *(GLsizei *) (pc + 28), *(GLsizei *) (pc + 32)); } void __glXDisp_ActiveTexture(GLbyte * pc) { glActiveTextureARB(*(GLenum *) (pc + 0)); } void __glXDisp_MultiTexCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif glMultiTexCoord1dvARB(*(GLenum *) (pc + 8), (const GLdouble *) (pc + 0)); } void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc) { glMultiTexCoord1fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_MultiTexCoord1iv(GLbyte * pc) { glMultiTexCoord1ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_MultiTexCoord1sv(GLbyte * pc) { glMultiTexCoord1svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_MultiTexCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif glMultiTexCoord2dvARB(*(GLenum *) (pc + 16), (const GLdouble *) (pc + 0)); } void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc) { glMultiTexCoord2fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_MultiTexCoord2iv(GLbyte * pc) { glMultiTexCoord2ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_MultiTexCoord2sv(GLbyte * pc) { glMultiTexCoord2svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_MultiTexCoord3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif glMultiTexCoord3dvARB(*(GLenum *) (pc + 24), (const GLdouble *) (pc + 0)); } void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc) { glMultiTexCoord3fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_MultiTexCoord3iv(GLbyte * pc) { glMultiTexCoord3ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_MultiTexCoord3sv(GLbyte * pc) { glMultiTexCoord3svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_MultiTexCoord4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif glMultiTexCoord4dvARB(*(GLenum *) (pc + 32), (const GLdouble *) (pc + 0)); } void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc) { glMultiTexCoord4fvARB(*(GLenum *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_MultiTexCoord4iv(GLbyte * pc) { glMultiTexCoord4ivARB(*(GLenum *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_MultiTexCoord4sv(GLbyte * pc) { glMultiTexCoord4svARB(*(GLenum *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_CompressedTexImage1D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D = __glGetProcAddress("glCompressedTexImage1D"); const GLsizei imageSize = *(GLsizei *) (pc + 20); CompressedTexImage1D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12), *(GLint *) (pc + 16), imageSize, (const GLvoid *) (pc + 24)); } void __glXDisp_CompressedTexImage2D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D = __glGetProcAddress("glCompressedTexImage2D"); const GLsizei imageSize = *(GLsizei *) (pc + 24); CompressedTexImage2D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12), *(GLsizei *) (pc + 16), *(GLint *) (pc + 20), imageSize, (const GLvoid *) (pc + 28)); } void __glXDisp_CompressedTexImage3D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D = __glGetProcAddress("glCompressedTexImage3D"); const GLsizei imageSize = *(GLsizei *) (pc + 28); CompressedTexImage3D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12), *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20), *(GLint *) (pc + 24), imageSize, (const GLvoid *) (pc + 32)); } void __glXDisp_CompressedTexSubImage1D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D = __glGetProcAddress("glCompressedTexSubImage1D"); const GLsizei imageSize = *(GLsizei *) (pc + 20); CompressedTexSubImage1D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16), imageSize, (const GLvoid *) (pc + 24)); } void __glXDisp_CompressedTexSubImage2D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D = __glGetProcAddress("glCompressedTexSubImage2D"); const GLsizei imageSize = *(GLsizei *) (pc + 28); CompressedTexSubImage2D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLsizei *) (pc + 16), *(GLsizei *) (pc + 20), *(GLenum *) (pc + 24), imageSize, (const GLvoid *) (pc + 32)); } void __glXDisp_CompressedTexSubImage3D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D = __glGetProcAddress("glCompressedTexSubImage3D"); const GLsizei imageSize = *(GLsizei *) (pc + 36); CompressedTexSubImage3D(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLsizei *) (pc + 20), *(GLsizei *) (pc + 24), *(GLsizei *) (pc + 28), *(GLenum *) (pc + 32), imageSize, (const GLvoid *) (pc + 40)); } void __glXDisp_SampleCoverage(GLbyte * pc) { PFNGLSAMPLECOVERAGEPROC SampleCoverage = __glGetProcAddress("glSampleCoverage"); SampleCoverage(*(GLclampf *) (pc + 0), *(GLboolean *) (pc + 4)); } void __glXDisp_BlendFuncSeparate(GLbyte * pc) { PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate = __glGetProcAddress("glBlendFuncSeparate"); BlendFuncSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), *(GLenum *) (pc + 12)); } void __glXDisp_FogCoorddv(GLbyte * pc) { PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif FogCoorddv((const GLdouble *) (pc + 0)); } void __glXDisp_PointParameterf(GLbyte * pc) { PFNGLPOINTPARAMETERFPROC PointParameterf = __glGetProcAddress("glPointParameterf"); PointParameterf(*(GLenum *) (pc + 0), *(GLfloat *) (pc + 4)); } void __glXDisp_PointParameterfv(GLbyte * pc) { PFNGLPOINTPARAMETERFVPROC PointParameterfv = __glGetProcAddress("glPointParameterfv"); const GLenum pname = *(GLenum *) (pc + 0); const GLfloat *params; params = (const GLfloat *) (pc + 4); PointParameterfv(pname, params); } void __glXDisp_PointParameteri(GLbyte * pc) { PFNGLPOINTPARAMETERIPROC PointParameteri = __glGetProcAddress("glPointParameteri"); PointParameteri(*(GLenum *) (pc + 0), *(GLint *) (pc + 4)); } void __glXDisp_PointParameteriv(GLbyte * pc) { PFNGLPOINTPARAMETERIVPROC PointParameteriv = __glGetProcAddress("glPointParameteriv"); const GLenum pname = *(GLenum *) (pc + 0); const GLint *params; params = (const GLint *) (pc + 4); PointParameteriv(pname, params); } void __glXDisp_SecondaryColor3bv(GLbyte * pc) { PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv = __glGetProcAddress("glSecondaryColor3bv"); SecondaryColor3bv((const GLbyte *) (pc + 0)); } void __glXDisp_SecondaryColor3dv(GLbyte * pc) { PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv = __glGetProcAddress("glSecondaryColor3dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif SecondaryColor3dv((const GLdouble *) (pc + 0)); } void __glXDisp_SecondaryColor3iv(GLbyte * pc) { PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv = __glGetProcAddress("glSecondaryColor3iv"); SecondaryColor3iv((const GLint *) (pc + 0)); } void __glXDisp_SecondaryColor3sv(GLbyte * pc) { PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv = __glGetProcAddress("glSecondaryColor3sv"); SecondaryColor3sv((const GLshort *) (pc + 0)); } void __glXDisp_SecondaryColor3ubv(GLbyte * pc) { PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv = __glGetProcAddress("glSecondaryColor3ubv"); SecondaryColor3ubv((const GLubyte *) (pc + 0)); } void __glXDisp_SecondaryColor3uiv(GLbyte * pc) { PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv = __glGetProcAddress("glSecondaryColor3uiv"); SecondaryColor3uiv((const GLuint *) (pc + 0)); } void __glXDisp_SecondaryColor3usv(GLbyte * pc) { PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv = __glGetProcAddress("glSecondaryColor3usv"); SecondaryColor3usv((const GLushort *) (pc + 0)); } void __glXDisp_WindowPos3fv(GLbyte * pc) { PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv"); WindowPos3fv((const GLfloat *) (pc + 0)); } void __glXDisp_BeginQuery(GLbyte * pc) { PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery"); BeginQuery(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); } int __glXDisp_DeleteQueries(__GLXclientState * cl, GLbyte * pc) { PFNGLDELETEQUERIESPROC DeleteQueries = __glGetProcAddress("glDeleteQueries"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); DeleteQueries(n, (const GLuint *) (pc + 4)); error = Success; } return error; } void __glXDisp_EndQuery(GLbyte * pc) { PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery"); EndQuery(*(GLenum *) (pc + 0)); } int __glXDisp_GenQueries(__GLXclientState * cl, GLbyte * pc) { PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (ids == NULL) return BadAlloc; GenQueries(n, ids); __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv = __glGetProcAddress("glGetQueryObjectiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetQueryObjectiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryObjectiv(*(GLuint *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv = __glGetProcAddress("glGetQueryObjectuiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetQueryObjectuiv_size(pname); GLuint answerBuffer[200]; GLuint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryObjectuiv(*(GLuint *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetQueryiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetQueryiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryiv(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_IsQuery(__GLXclientState * cl, GLbyte * pc) { PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsQuery(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_BlendEquationSeparate(GLbyte * pc) { PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate = __glGetProcAddress("glBlendEquationSeparate"); BlendEquationSeparate(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_DrawBuffers(GLbyte * pc) { PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers"); const GLsizei n = *(GLsizei *) (pc + 0); DrawBuffers(n, (const GLenum *) (pc + 4)); } void __glXDisp_VertexAttrib1dv(GLbyte * pc) { PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv = __glGetProcAddress("glVertexAttrib1dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif VertexAttrib1dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib1sv(GLbyte * pc) { PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv = __glGetProcAddress("glVertexAttrib1sv"); VertexAttrib1sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib2dv(GLbyte * pc) { PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv = __glGetProcAddress("glVertexAttrib2dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif VertexAttrib2dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib2sv(GLbyte * pc) { PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv = __glGetProcAddress("glVertexAttrib2sv"); VertexAttrib2sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib3dv(GLbyte * pc) { PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv = __glGetProcAddress("glVertexAttrib3dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif VertexAttrib3dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib3sv(GLbyte * pc) { PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv = __glGetProcAddress("glVertexAttrib3sv"); VertexAttrib3sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib4Nbv(GLbyte * pc) { PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv = __glGetProcAddress("glVertexAttrib4Nbv"); VertexAttrib4Nbv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4)); } void __glXDisp_VertexAttrib4Niv(GLbyte * pc) { PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv = __glGetProcAddress("glVertexAttrib4Niv"); VertexAttrib4Niv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_VertexAttrib4Nsv(GLbyte * pc) { PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv = __glGetProcAddress("glVertexAttrib4Nsv"); VertexAttrib4Nsv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib4Nubv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv = __glGetProcAddress("glVertexAttrib4Nubv"); VertexAttrib4Nubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); } void __glXDisp_VertexAttrib4Nuiv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv = __glGetProcAddress("glVertexAttrib4Nuiv"); VertexAttrib4Nuiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4)); } void __glXDisp_VertexAttrib4Nusv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv = __glGetProcAddress("glVertexAttrib4Nusv"); VertexAttrib4Nusv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4)); } void __glXDisp_VertexAttrib4bv(GLbyte * pc) { PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv = __glGetProcAddress("glVertexAttrib4bv"); VertexAttrib4bv(*(GLuint *) (pc + 0), (const GLbyte *) (pc + 4)); } void __glXDisp_VertexAttrib4dv(GLbyte * pc) { PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv = __glGetProcAddress("glVertexAttrib4dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif VertexAttrib4dv(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib4iv(GLbyte * pc) { PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv = __glGetProcAddress("glVertexAttrib4iv"); VertexAttrib4iv(*(GLuint *) (pc + 0), (const GLint *) (pc + 4)); } void __glXDisp_VertexAttrib4sv(GLbyte * pc) { PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv = __glGetProcAddress("glVertexAttrib4sv"); VertexAttrib4sv(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib4ubv(GLbyte * pc) { PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv = __glGetProcAddress("glVertexAttrib4ubv"); VertexAttrib4ubv(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); } void __glXDisp_VertexAttrib4uiv(GLbyte * pc) { PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv = __glGetProcAddress("glVertexAttrib4uiv"); VertexAttrib4uiv(*(GLuint *) (pc + 0), (const GLuint *) (pc + 4)); } void __glXDisp_VertexAttrib4usv(GLbyte * pc) { PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv = __glGetProcAddress("glVertexAttrib4usv"); VertexAttrib4usv(*(GLuint *) (pc + 0), (const GLushort *) (pc + 4)); } void __glXDisp_ClampColor(GLbyte * pc) { PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor"); ClampColor(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4)); } void __glXDisp_BindProgramARB(GLbyte * pc) { PFNGLBINDPROGRAMARBPROC BindProgramARB = __glGetProcAddress("glBindProgramARB"); BindProgramARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); } int __glXDisp_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc) { PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB = __glGetProcAddress("glDeleteProgramsARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); DeleteProgramsARB(n, (const GLuint *) (pc + 4)); error = Success; } return error; } int __glXDisp_GenProgramsARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGENPROGRAMSARBPROC GenProgramsARB = __glGetProcAddress("glGenProgramsARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (programs == NULL) return BadAlloc; GenProgramsARB(n, programs); __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB = __glGetProcAddress("glGetProgramEnvParameterdvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLdouble params[4]; GetProgramEnvParameterdvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), params); __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB = __glGetProcAddress("glGetProgramEnvParameterfvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLfloat params[4]; GetProgramEnvParameterfvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), params); __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB = __glGetProcAddress("glGetProgramLocalParameterdvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLdouble params[4]; GetProgramLocalParameterdvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), params); __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB = __glGetProcAddress("glGetProgramLocalParameterfvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLfloat params[4]; GetProgramLocalParameterfvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), params); __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetProgramivARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMIVARBPROC GetProgramivARB = __glGetProcAddress("glGetProgramivARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = *(GLenum *) (pc + 4); const GLuint compsize = __glGetProgramivARB_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetProgramivARB(*(GLenum *) (pc + 0), pname, params); __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_IsProgramARB(__GLXclientState * cl, GLbyte * pc) { PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsProgramARB(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) { PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB = __glGetProcAddress("glProgramEnvParameter4dvARB"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif ProgramEnvParameter4dvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), (const GLdouble *) (pc + 8)); } void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) { PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB = __glGetProcAddress("glProgramEnvParameter4fvARB"); ProgramEnvParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), (const GLfloat *) (pc + 8)); } void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) { PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB = __glGetProcAddress("glProgramLocalParameter4dvARB"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif ProgramLocalParameter4dvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), (const GLdouble *) (pc + 8)); } void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) { PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB = __glGetProcAddress("glProgramLocalParameter4fvARB"); ProgramLocalParameter4fvARB(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4), (const GLfloat *) (pc + 8)); } void __glXDisp_ProgramStringARB(GLbyte * pc) { PFNGLPROGRAMSTRINGARBPROC ProgramStringARB = __glGetProcAddress("glProgramStringARB"); const GLsizei len = *(GLsizei *) (pc + 8); ProgramStringARB(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), len, (const GLvoid *) (pc + 12)); } void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB = __glGetProcAddress("glVertexAttrib1fvARB"); VertexAttrib1fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB = __glGetProcAddress("glVertexAttrib2fvARB"); VertexAttrib2fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB = __glGetProcAddress("glVertexAttrib3fvARB"); VertexAttrib3fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB = __glGetProcAddress("glVertexAttrib4fvARB"); VertexAttrib4fvARB(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_BindFramebuffer(GLbyte * pc) { PFNGLBINDFRAMEBUFFERPROC BindFramebuffer = __glGetProcAddress("glBindFramebuffer"); BindFramebuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); } void __glXDisp_BindRenderbuffer(GLbyte * pc) { PFNGLBINDRENDERBUFFERPROC BindRenderbuffer = __glGetProcAddress("glBindRenderbuffer"); BindRenderbuffer(*(GLenum *) (pc + 0), *(GLuint *) (pc + 4)); } void __glXDisp_BlitFramebuffer(GLbyte * pc) { PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer = __glGetProcAddress("glBlitFramebuffer"); BlitFramebuffer(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16), *(GLint *) (pc + 20), *(GLint *) (pc + 24), *(GLint *) (pc + 28), *(GLbitfield *) (pc + 32), *(GLenum *) (pc + 36)); } int __glXDisp_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc) { PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus = __glGetProcAddress("glCheckFramebufferStatus"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLenum retval; retval = CheckFramebufferStatus(*(GLenum *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_DeleteFramebuffers(GLbyte * pc) { PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers = __glGetProcAddress("glDeleteFramebuffers"); const GLsizei n = *(GLsizei *) (pc + 0); DeleteFramebuffers(n, (const GLuint *) (pc + 4)); } void __glXDisp_DeleteRenderbuffers(GLbyte * pc) { PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers = __glGetProcAddress("glDeleteRenderbuffers"); const GLsizei n = *(GLsizei *) (pc + 0); DeleteRenderbuffers(n, (const GLuint *) (pc + 4)); } void __glXDisp_FramebufferRenderbuffer(GLbyte * pc) { PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer = __glGetProcAddress("glFramebufferRenderbuffer"); FramebufferRenderbuffer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), *(GLuint *) (pc + 12)); } void __glXDisp_FramebufferTexture1D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D = __glGetProcAddress("glFramebufferTexture1D"); FramebufferTexture1D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), *(GLint *) (pc + 16)); } void __glXDisp_FramebufferTexture2D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D = __glGetProcAddress("glFramebufferTexture2D"); FramebufferTexture2D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), *(GLint *) (pc + 16)); } void __glXDisp_FramebufferTexture3D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D = __glGetProcAddress("glFramebufferTexture3D"); FramebufferTexture3D(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), *(GLuint *) (pc + 12), *(GLint *) (pc + 16), *(GLint *) (pc + 20)); } void __glXDisp_FramebufferTextureLayer(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer = __glGetProcAddress("glFramebufferTextureLayer"); FramebufferTextureLayer(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLuint *) (pc + 8), *(GLint *) (pc + 12), *(GLint *) (pc + 16)); } int __glXDisp_GenFramebuffers(__GLXclientState * cl, GLbyte * pc) { PFNGLGENFRAMEBUFFERSPROC GenFramebuffers = __glGetProcAddress("glGenFramebuffers"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (framebuffers == NULL) return BadAlloc; GenFramebuffers(n, framebuffers); __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDisp_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc) { PFNGLGENRENDERBUFFERSPROC GenRenderbuffers = __glGetProcAddress("glGenRenderbuffers"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = *(GLsizei *) (pc + 0); GLuint answerBuffer[200]; GLuint *renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (renderbuffers == NULL) return BadAlloc; GenRenderbuffers(n, renderbuffers); __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0); error = Success; } return error; } void __glXDisp_GenerateMipmap(GLbyte * pc) { PFNGLGENERATEMIPMAPPROC GenerateMipmap = __glGetProcAddress("glGenerateMipmap"); GenerateMipmap(*(GLenum *) (pc + 0)); } int __glXDisp_GetFramebufferAttachmentParameteriv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv = __glGetProcAddress("glGetFramebufferAttachmentParameteriv"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLint params[1]; GetFramebufferAttachmentParameteriv(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), params); __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv = __glGetProcAddress("glGetRenderbufferParameteriv"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLint params[1]; GetRenderbufferParameteriv(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), params); __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDisp_IsFramebuffer(__GLXclientState * cl, GLbyte * pc) { PFNGLISFRAMEBUFFERPROC IsFramebuffer = __glGetProcAddress("glIsFramebuffer"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsFramebuffer(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDisp_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc) { PFNGLISRENDERBUFFERPROC IsRenderbuffer = __glGetProcAddress("glIsRenderbuffer"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsRenderbuffer(*(GLuint *) (pc + 0)); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDisp_RenderbufferStorage(GLbyte * pc) { PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage = __glGetProcAddress("glRenderbufferStorage"); RenderbufferStorage(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12)); } void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc) { PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample = __glGetProcAddress("glRenderbufferStorageMultisample"); RenderbufferStorageMultisample(*(GLenum *) (pc + 0), *(GLsizei *) (pc + 4), *(GLenum *) (pc + 8), *(GLsizei *) (pc + 12), *(GLsizei *) (pc + 16)); } void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc) { PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT = __glGetProcAddress("glSecondaryColor3fvEXT"); SecondaryColor3fvEXT((const GLfloat *) (pc + 0)); } void __glXDisp_FogCoordfvEXT(GLbyte * pc) { PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT = __glGetProcAddress("glFogCoordfvEXT"); FogCoordfvEXT((const GLfloat *) (pc + 0)); } void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV = __glGetProcAddress("glVertexAttrib1dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif VertexAttrib1dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV = __glGetProcAddress("glVertexAttrib1fvNV"); VertexAttrib1fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib1svNV(GLbyte * pc) { PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV = __glGetProcAddress("glVertexAttrib1svNV"); VertexAttrib1svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV = __glGetProcAddress("glVertexAttrib2dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif VertexAttrib2dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV = __glGetProcAddress("glVertexAttrib2fvNV"); VertexAttrib2fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib2svNV(GLbyte * pc) { PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV = __glGetProcAddress("glVertexAttrib2svNV"); VertexAttrib2svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV = __glGetProcAddress("glVertexAttrib3dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif VertexAttrib3dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV = __glGetProcAddress("glVertexAttrib3fvNV"); VertexAttrib3fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib3svNV(GLbyte * pc) { PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV = __glGetProcAddress("glVertexAttrib3svNV"); VertexAttrib3svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV = __glGetProcAddress("glVertexAttrib4dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif VertexAttrib4dvNV(*(GLuint *) (pc + 0), (const GLdouble *) (pc + 4)); } void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV = __glGetProcAddress("glVertexAttrib4fvNV"); VertexAttrib4fvNV(*(GLuint *) (pc + 0), (const GLfloat *) (pc + 4)); } void __glXDisp_VertexAttrib4svNV(GLbyte * pc) { PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV = __glGetProcAddress("glVertexAttrib4svNV"); VertexAttrib4svNV(*(GLuint *) (pc + 0), (const GLshort *) (pc + 4)); } void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV = __glGetProcAddress("glVertexAttrib4ubvNV"); VertexAttrib4ubvNV(*(GLuint *) (pc + 0), (const GLubyte *) (pc + 4)); } void __glXDisp_VertexAttribs1dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV = __glGetProcAddress("glVertexAttribs1dvNV"); const GLsizei n = *(GLsizei *) (pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs1dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); } void __glXDisp_VertexAttribs1fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV = __glGetProcAddress("glVertexAttribs1fvNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs1fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); } void __glXDisp_VertexAttribs1svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV = __glGetProcAddress("glVertexAttribs1svNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs1svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); } void __glXDisp_VertexAttribs2dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV = __glGetProcAddress("glVertexAttribs2dvNV"); const GLsizei n = *(GLsizei *) (pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs2dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); } void __glXDisp_VertexAttribs2fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV = __glGetProcAddress("glVertexAttribs2fvNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs2fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); } void __glXDisp_VertexAttribs2svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV = __glGetProcAddress("glVertexAttribs2svNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs2svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); } void __glXDisp_VertexAttribs3dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV = __glGetProcAddress("glVertexAttribs3dvNV"); const GLsizei n = *(GLsizei *) (pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs3dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); } void __glXDisp_VertexAttribs3fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV = __glGetProcAddress("glVertexAttribs3fvNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs3fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); } void __glXDisp_VertexAttribs3svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV = __glGetProcAddress("glVertexAttribs3svNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs3svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); } void __glXDisp_VertexAttribs4dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV = __glGetProcAddress("glVertexAttribs4dvNV"); const GLsizei n = *(GLsizei *) (pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs4dvNV(*(GLuint *) (pc + 0), n, (const GLdouble *) (pc + 8)); } void __glXDisp_VertexAttribs4fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV = __glGetProcAddress("glVertexAttribs4fvNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs4fvNV(*(GLuint *) (pc + 0), n, (const GLfloat *) (pc + 8)); } void __glXDisp_VertexAttribs4svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV = __glGetProcAddress("glVertexAttribs4svNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs4svNV(*(GLuint *) (pc + 0), n, (const GLshort *) (pc + 8)); } void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV = __glGetProcAddress("glVertexAttribs4ubvNV"); const GLsizei n = *(GLsizei *) (pc + 4); VertexAttribs4ubvNV(*(GLuint *) (pc + 0), n, (const GLubyte *) (pc + 8)); } void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) { PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT = __glGetProcAddress("glActiveStencilFaceEXT"); ActiveStencilFaceEXT(*(GLenum *) (pc + 0)); } xorg-server-21.1.16/glx/indirect_dispatch.h0000644000175000017500000025422014757411105014263 /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #if !defined( _INDIRECT_DISPATCH_H_ ) #define _INDIRECT_DISPATCH_H_ #include struct __GLXclientStateRec; extern _X_HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc); extern _X_HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Histogram(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Histogram(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord1dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1dv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Color3uiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_FramebufferTexture1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FramebufferTexture1D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Indexubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib1sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3ubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LightModeliv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Normal3bv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexGeniv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RenderbufferStorage(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RenderbufferStorage(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenQueries(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenQueries(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BlendColor(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CompressedTexImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Scalef(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Scalef(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Normal3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PassThrough(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Viewport(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Viewport(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_DepthRange(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetQueryiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetQueryiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CompressedTexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3uiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3uiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4Nbv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nbv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_DeleteRenderbuffers(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DeleteRenderbuffers(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib4usv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4usv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PointSize(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PointSize(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PopName(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PopName(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4Nusv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nusv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ClampColor(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClampColor(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_LineStipple(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexEnvi(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Scaled(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Scaled(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CallLists(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CallLists(GLbyte * pc); extern _X_HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Rotated(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rotated(GLbyte * pc); extern _X_HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CompressedTexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexParameterf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexParameteri(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_DrawPixels(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Scissor(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Scissor(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Fogf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Fogf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4usv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Fogi(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Fogi(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3usv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord2iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2iv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Color3bv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ColorTable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Accum(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Accum(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ClearStencil(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ClearIndex(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PushMatrix(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BindFramebuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BindFramebuffer(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BlendFuncSeparate(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlendFuncSeparate(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Normal3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_End(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_End(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateContextAttribsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateContextAttribsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BindTexture(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib2sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexGenfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_DrawBuffers(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DrawBuffers(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BlendEquation(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Indexdv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PushName(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PushName(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib1dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1dv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_IsRenderbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsRenderbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_DepthMask(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_StencilOp(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc); extern _X_HIDDEN void __glXDisp_FramebufferTextureLayer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FramebufferTextureLayer(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Ortho(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Ortho(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4bv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetCompressedTexImage(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetCompressedTexImage(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_LogicOp(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RenderbufferStorageMultisample(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ActiveTexture(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ActiveTexture(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3bv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3bv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4ubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_DepthFunc(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_BlendFunc(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc); extern _X_HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_CompressedTexImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexImage2D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Color4uiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord1sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PushAttrib(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Indexiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PointParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PointParameterfv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Frustum(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Frustum(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexEnvf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenProgramsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenProgramsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ClearAccum(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc); extern _X_HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_FramebufferTexture3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FramebufferTexture3D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Lightfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetFramebufferAttachmentParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ClearDepth(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Lightiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_IsQuery(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsQuery(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Rectdv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Materialiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PolygonMode(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4Niv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Niv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexGeni(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexGenf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexGend(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGend(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Color4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PixelZoom(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_BeginQuery(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BeginQuery(GLbyte * pc); extern _X_HIDDEN int __glXDisp_SetClientInfo2ARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_SetClientInfo2ARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_MultiTexCoord3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3iv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc); extern _X_HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_FrontFace(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc); extern _X_HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Normal3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Lightf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Lightf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MatrixMode(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Lighti(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Lighti(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenFramebuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenFramebuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_IsFramebuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsFramebuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BlendEquationSeparate(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlendEquationSeparate(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CompressedTexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ClearColor(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc); extern _X_HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3ubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3ubv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PointParameteri(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PointParameteri(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PointParameterf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PointParameterf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexEnviv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4iv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_FramebufferTexture2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FramebufferTexture2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Bitmap(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_CheckFramebufferStatus(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CheckFramebufferStatus(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BindProgramARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BindProgramARB(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetQueryObjectuiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetQueryObjectuiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Map1d(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Map1d(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Map1f(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Map1f(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexImage2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc); extern _X_HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Fogiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EndQuery(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EndQuery(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Clear(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Clear(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LightModeli(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ListBase(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ListBase(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_CallList(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CallList(GLbyte * pc); extern _X_HIDDEN void __glXDisp_GenerateMipmap(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_GenerateMipmap(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Rectiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord1iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord1iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetQueryObjectiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetQueryObjectiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_SetClientInfoARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_SetClientInfoARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CompressedTexSubImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CompressedTexSubImage3D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LineWidth(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexGendv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_WindowPos3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_WindowPos3fv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DeleteProgramsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DeleteProgramsARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ShadeModel(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Materialfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc); extern _X_HIDDEN void __glXDisp_DrawArrays(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SampleCoverage(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SampleCoverage(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color3iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4ubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4ubv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_PointParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PointParameteriv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Rotatef(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_BindRenderbuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BindRenderbuffer(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PopMatrix(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc); extern _X_HIDDEN void __glXDisp_DeleteFramebuffers(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_DeleteFramebuffers(GLbyte * pc); extern _X_HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_FramebufferRenderbuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FramebufferRenderbuffer(GLbyte * pc); extern _X_HIDDEN int __glXDisp_IsProgramARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsProgramARB(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib4uiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4uiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4Nsv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nsv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Map2d(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Map2d(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Map2f(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Map2f(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4bv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4bv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Materialf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Materialf(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Materiali(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Materiali(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Indexsv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LightModelfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Translated(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Translated(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Translatef(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Translatef(GLbyte * pc); extern _X_HIDDEN void __glXDisp_StencilMask(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc); extern _X_HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_LoadName(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LoadName(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CullFace(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CullFace(GLbyte * pc); extern _X_HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_StencilFunc(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyPixels(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Rectsv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib4Nubv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nubv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_ClipPlane(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3usv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3usv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord3dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3dv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Indexfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc); extern _X_HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDisp_BlitFramebuffer(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_BlitFramebuffer(GLbyte * pc); extern _X_HIDDEN void __glXDisp_IndexMask(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_FogCoorddv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_FogCoorddv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_PopAttrib(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Fogfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_InitNames(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_InitNames(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Normal3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Minmax(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Minmax(GLbyte * pc); extern _X_HIDDEN int __glXDisp_DeleteQueries(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_DeleteQueries(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Hint(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Hint(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Color4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc); extern _X_HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Begin(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Begin(GLbyte * pc); extern _X_HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Rectfv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_LightModelf(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_Disable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Disable(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc); extern _X_HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_ColorMask(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc); extern _X_HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Enable(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Enable(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GetRenderbufferParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetRenderbufferParameteriv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc); extern _X_HIDDEN int __glXDisp_GenRenderbuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GenRenderbuffers(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *); extern _X_HIDDEN void __glXDisp_VertexAttrib4Nuiv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_SecondaryColor3sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_SecondaryColor3sv(GLbyte * pc); extern _X_HIDDEN void __glXDisp_MultiTexCoord2sv(GLbyte * pc); extern _X_HIDDEN void __glXDispSwap_MultiTexCoord2sv(GLbyte * pc); #endif /* !defined( _INDIRECT_DISPATCH_H_ ) */ xorg-server-21.1.16/glx/indirect_dispatch_swap.c0000644000175000017500000047564214757411105015325 /* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #include #include "glxserver.h" #include "indirect_size.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" #include "glxbyteorder.h" #include "indirect_util.h" #include "singlesize.h" #define __GLX_PAD(x) (((x) + 3) & ~3) typedef struct { __GLX_PIXEL_3D_HDR; } __GLXpixel3DHeader; extern GLboolean __glXErrorOccured(void); extern void __glXClearErrorOccured(void); static const unsigned dummy_answer[2] = { 0, 0 }; static GLsizei bswap_CARD32(const void *src) { union { uint32_t dst; GLsizei ret; } x; x.dst = bswap_32(*(uint32_t *) src); return x.ret; } static GLshort bswap_CARD16(const void *src) { union { uint16_t dst; GLshort ret; } x; x.dst = bswap_16(*(uint16_t *) src); return x.ret; } static GLenum bswap_ENUM(const void *src) { union { uint32_t dst; GLenum ret; } x; x.dst = bswap_32(*(uint32_t *) src); return x.ret; } static GLdouble bswap_FLOAT64(const void *src) { union { uint64_t dst; GLdouble ret; } x; x.dst = bswap_64(*(uint64_t *) src); return x.ret; } static GLfloat bswap_FLOAT32(const void *src) { union { uint32_t dst; GLfloat ret; } x; x.dst = bswap_32(*(uint32_t *) src); return x.ret; } static void * bswap_16_array(uint16_t * src, unsigned count) { unsigned i; for (i = 0; i < count; i++) { uint16_t temp = bswap_16(src[i]); src[i] = temp; } return src; } static void * bswap_32_array(uint32_t * src, unsigned count) { unsigned i; for (i = 0; i < count; i++) { uint32_t temp = bswap_32(src[i]); src[i] = temp; } return src; } static void * bswap_64_array(uint64_t * src, unsigned count) { unsigned i; for (i = 0; i < count; i++) { uint64_t temp = bswap_64(src[i]); src[i] = temp; } return src; } int __glXDispSwap_NewList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glNewList((GLuint) bswap_CARD32(pc + 0), (GLenum) bswap_ENUM(pc + 4)); error = Success; } return error; } int __glXDispSwap_EndList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glEndList(); error = Success; } return error; } void __glXDispSwap_CallList(GLbyte * pc) { glCallList((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_CallLists(GLbyte * pc) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); const GLenum type = (GLenum) bswap_ENUM(pc + 4); const GLvoid *lists; switch (type) { case GL_BYTE: case GL_UNSIGNED_BYTE: case GL_2_BYTES: case GL_3_BYTES: case GL_4_BYTES: lists = (const GLvoid *) (pc + 8); break; case GL_SHORT: case GL_UNSIGNED_SHORT: lists = (const GLvoid *) bswap_16_array((uint16_t *) (pc + 8), n); break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: lists = (const GLvoid *) bswap_32_array((uint32_t *) (pc + 8), n); break; default: return; } glCallLists(n, type, lists); } int __glXDispSwap_DeleteLists(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glDeleteLists((GLuint) bswap_CARD32(pc + 0), (GLsizei) bswap_CARD32(pc + 4)); error = Success; } return error; } int __glXDispSwap_GenLists(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLuint retval; retval = glGenLists((GLsizei) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_ListBase(GLbyte * pc) { glListBase((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_Begin(GLbyte * pc) { glBegin((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_Bitmap(GLbyte * pc) { const GLubyte *const bitmap = (const GLubyte *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glBitmap((GLsizei) bswap_CARD32(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLfloat) bswap_FLOAT32(pc + 28), (GLfloat) bswap_FLOAT32(pc + 32), (GLfloat) bswap_FLOAT32(pc + 36), (GLfloat) bswap_FLOAT32(pc + 40), bitmap); } void __glXDispSwap_Color3bv(GLbyte * pc) { glColor3bv((const GLbyte *) (pc + 0)); } void __glXDispSwap_Color3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glColor3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_Color3fv(GLbyte * pc) { glColor3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Color3iv(GLbyte * pc) { glColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Color3sv(GLbyte * pc) { glColor3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_Color3ubv(GLbyte * pc) { glColor3ubv((const GLubyte *) (pc + 0)); } void __glXDispSwap_Color3uiv(GLbyte * pc) { glColor3uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Color3usv(GLbyte * pc) { glColor3usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_Color4bv(GLbyte * pc) { glColor4bv((const GLbyte *) (pc + 0)); } void __glXDispSwap_Color4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glColor4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_Color4fv(GLbyte * pc) { glColor4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_Color4iv(GLbyte * pc) { glColor4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_Color4sv(GLbyte * pc) { glColor4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); } void __glXDispSwap_Color4ubv(GLbyte * pc) { glColor4ubv((const GLubyte *) (pc + 0)); } void __glXDispSwap_Color4uiv(GLbyte * pc) { glColor4uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_Color4usv(GLbyte * pc) { glColor4usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 4)); } void __glXDispSwap_EdgeFlagv(GLbyte * pc) { glEdgeFlagv((const GLboolean *) (pc + 0)); } void __glXDispSwap_End(GLbyte * pc) { glEnd(); } void __glXDispSwap_Indexdv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glIndexdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); } void __glXDispSwap_Indexfv(GLbyte * pc) { glIndexfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_Indexiv(GLbyte * pc) { glIndexiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_Indexsv(GLbyte * pc) { glIndexsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1)); } void __glXDispSwap_Normal3bv(GLbyte * pc) { glNormal3bv((const GLbyte *) (pc + 0)); } void __glXDispSwap_Normal3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glNormal3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_Normal3fv(GLbyte * pc) { glNormal3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Normal3iv(GLbyte * pc) { glNormal3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Normal3sv(GLbyte * pc) { glNormal3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_RasterPos2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glRasterPos2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); } void __glXDispSwap_RasterPos2fv(GLbyte * pc) { glRasterPos2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_RasterPos2iv(GLbyte * pc) { glRasterPos2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_RasterPos2sv(GLbyte * pc) { glRasterPos2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); } void __glXDispSwap_RasterPos3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glRasterPos3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_RasterPos3fv(GLbyte * pc) { glRasterPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_RasterPos3iv(GLbyte * pc) { glRasterPos3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_RasterPos3sv(GLbyte * pc) { glRasterPos3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_RasterPos4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRasterPos4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_RasterPos4fv(GLbyte * pc) { glRasterPos4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_RasterPos4iv(GLbyte * pc) { glRasterPos4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_RasterPos4sv(GLbyte * pc) { glRasterPos4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); } void __glXDispSwap_Rectdv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRectdv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 16), 2)); } void __glXDispSwap_Rectfv(GLbyte * pc) { glRectfv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 2)); } void __glXDispSwap_Rectiv(GLbyte * pc) { glRectiv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2), (const GLint *) bswap_32_array((uint32_t *) (pc + 8), 2)); } void __glXDispSwap_Rectsv(GLbyte * pc) { glRectsv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); } void __glXDispSwap_TexCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glTexCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); } void __glXDispSwap_TexCoord1fv(GLbyte * pc) { glTexCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_TexCoord1iv(GLbyte * pc) { glTexCoord1iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_TexCoord1sv(GLbyte * pc) { glTexCoord1sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 1)); } void __glXDispSwap_TexCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glTexCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); } void __glXDispSwap_TexCoord2fv(GLbyte * pc) { glTexCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_TexCoord2iv(GLbyte * pc) { glTexCoord2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_TexCoord2sv(GLbyte * pc) { glTexCoord2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); } void __glXDispSwap_TexCoord3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glTexCoord3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_TexCoord3fv(GLbyte * pc) { glTexCoord3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_TexCoord3iv(GLbyte * pc) { glTexCoord3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_TexCoord3sv(GLbyte * pc) { glTexCoord3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_TexCoord4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glTexCoord4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_TexCoord4fv(GLbyte * pc) { glTexCoord4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_TexCoord4iv(GLbyte * pc) { glTexCoord4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_TexCoord4sv(GLbyte * pc) { glTexCoord4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); } void __glXDispSwap_Vertex2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glVertex2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); } void __glXDispSwap_Vertex2fv(GLbyte * pc) { glVertex2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_Vertex2iv(GLbyte * pc) { glVertex2iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_Vertex2sv(GLbyte * pc) { glVertex2sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 2)); } void __glXDispSwap_Vertex3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glVertex3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_Vertex3fv(GLbyte * pc) { glVertex3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Vertex3iv(GLbyte * pc) { glVertex3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_Vertex3sv(GLbyte * pc) { glVertex3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_Vertex4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glVertex4dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_Vertex4fv(GLbyte * pc) { glVertex4fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_Vertex4iv(GLbyte * pc) { glVertex4iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 4)); } void __glXDispSwap_Vertex4sv(GLbyte * pc) { glVertex4sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 4)); } void __glXDispSwap_ClipPlane(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif glClipPlane((GLenum) bswap_ENUM(pc + 32), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_ColorMaterial(GLbyte * pc) { glColorMaterial((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_CullFace(GLbyte * pc) { glCullFace((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_Fogf(GLbyte * pc) { glFogf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_Fogfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), __glFogfv_size(pname)); glFogfv(pname, params); } void __glXDispSwap_Fogi(GLbyte * pc) { glFogi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); } void __glXDispSwap_Fogiv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 4), __glFogiv_size(pname)); glFogiv(pname, params); } void __glXDispSwap_FrontFace(GLbyte * pc) { glFrontFace((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_Hint(GLbyte * pc) { glHint((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_Lightf(GLbyte * pc) { glLightf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_Lightfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glLightfv_size(pname)); glLightfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_Lighti(GLbyte * pc) { glLighti((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_Lightiv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glLightiv_size(pname)); glLightiv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_LightModelf(GLbyte * pc) { glLightModelf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_LightModelfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), __glLightModelfv_size(pname)); glLightModelfv(pname, params); } void __glXDispSwap_LightModeli(GLbyte * pc) { glLightModeli((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); } void __glXDispSwap_LightModeliv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 4), __glLightModeliv_size(pname)); glLightModeliv(pname, params); } void __glXDispSwap_LineStipple(GLbyte * pc) { glLineStipple((GLint) bswap_CARD32(pc + 0), (GLushort) bswap_CARD16(pc + 4)); } void __glXDispSwap_LineWidth(GLbyte * pc) { glLineWidth((GLfloat) bswap_FLOAT32(pc + 0)); } void __glXDispSwap_Materialf(GLbyte * pc) { glMaterialf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_Materialfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glMaterialfv_size(pname)); glMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_Materiali(GLbyte * pc) { glMateriali((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_Materialiv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glMaterialiv_size(pname)); glMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_PointSize(GLbyte * pc) { glPointSize((GLfloat) bswap_FLOAT32(pc + 0)); } void __glXDispSwap_PolygonMode(GLbyte * pc) { glPolygonMode((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_PolygonStipple(GLbyte * pc) { const GLubyte *const mask = (const GLubyte *) ((pc + 20)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glPolygonStipple(mask); } void __glXDispSwap_Scissor(GLbyte * pc) { glScissor((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12)); } void __glXDispSwap_ShadeModel(GLbyte * pc) { glShadeModel((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_TexParameterf(GLbyte * pc) { glTexParameterf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_TexParameterfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glTexParameterfv_size(pname)); glTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexParameteri(GLbyte * pc) { glTexParameteri((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_TexParameteriv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glTexParameteriv_size(pname)); glTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexImage1D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexImage1D((GLenum) bswap_ENUM(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28), (GLsizei) bswap_CARD32(pc + 32), (GLint) bswap_CARD32(pc + 40), (GLenum) bswap_ENUM(pc + 44), (GLenum) bswap_ENUM(pc + 48), pixels); } void __glXDispSwap_TexImage2D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 52)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexImage2D((GLenum) bswap_ENUM(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28), (GLsizei) bswap_CARD32(pc + 32), (GLsizei) bswap_CARD32(pc + 36), (GLint) bswap_CARD32(pc + 40), (GLenum) bswap_ENUM(pc + 44), (GLenum) bswap_ENUM(pc + 48), pixels); } void __glXDispSwap_TexEnvf(GLbyte * pc) { glTexEnvf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_TexEnvfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glTexEnvfv_size(pname)); glTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexEnvi(GLbyte * pc) { glTexEnvi((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_TexEnviv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glTexEnviv_size(pname)); glTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexGend(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glTexGend((GLenum) bswap_ENUM(pc + 8), (GLenum) bswap_ENUM(pc + 12), (GLdouble) bswap_FLOAT64(pc + 0)); } void __glXDispSwap_TexGendv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLdouble *params; #ifdef __GLX_ALIGN64 const GLuint compsize = __glTexGendv_size(pname); const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif params = (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), __glTexGendv_size(pname)); glTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexGenf(GLbyte * pc) { glTexGenf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_TexGenfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glTexGenfv_size(pname)); glTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_TexGeni(GLbyte * pc) { glTexGeni((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_TexGeniv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glTexGeniv_size(pname)); glTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_InitNames(GLbyte * pc) { glInitNames(); } void __glXDispSwap_LoadName(GLbyte * pc) { glLoadName((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_PassThrough(GLbyte * pc) { glPassThrough((GLfloat) bswap_FLOAT32(pc + 0)); } void __glXDispSwap_PopName(GLbyte * pc) { glPopName(); } void __glXDispSwap_PushName(GLbyte * pc) { glPushName((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_DrawBuffer(GLbyte * pc) { glDrawBuffer((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_Clear(GLbyte * pc) { glClear((GLbitfield) bswap_CARD32(pc + 0)); } void __glXDispSwap_ClearAccum(GLbyte * pc) { glClearAccum((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8), (GLfloat) bswap_FLOAT32(pc + 12)); } void __glXDispSwap_ClearIndex(GLbyte * pc) { glClearIndex((GLfloat) bswap_FLOAT32(pc + 0)); } void __glXDispSwap_ClearColor(GLbyte * pc) { glClearColor((GLclampf) bswap_FLOAT32(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4), (GLclampf) bswap_FLOAT32(pc + 8), (GLclampf) bswap_FLOAT32(pc + 12)); } void __glXDispSwap_ClearStencil(GLbyte * pc) { glClearStencil((GLint) bswap_CARD32(pc + 0)); } void __glXDispSwap_ClearDepth(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glClearDepth((GLclampd) bswap_FLOAT64(pc + 0)); } void __glXDispSwap_StencilMask(GLbyte * pc) { glStencilMask((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_ColorMask(GLbyte * pc) { glColorMask(*(GLboolean *) (pc + 0), *(GLboolean *) (pc + 1), *(GLboolean *) (pc + 2), *(GLboolean *) (pc + 3)); } void __glXDispSwap_DepthMask(GLbyte * pc) { glDepthMask(*(GLboolean *) (pc + 0)); } void __glXDispSwap_IndexMask(GLbyte * pc) { glIndexMask((GLuint) bswap_CARD32(pc + 0)); } void __glXDispSwap_Accum(GLbyte * pc) { glAccum((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_Disable(GLbyte * pc) { glDisable((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_Enable(GLbyte * pc) { glEnable((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_PopAttrib(GLbyte * pc) { glPopAttrib(); } void __glXDispSwap_PushAttrib(GLbyte * pc) { glPushAttrib((GLbitfield) bswap_CARD32(pc + 0)); } void __glXDispSwap_MapGrid1d(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif glMapGrid1d((GLint) bswap_CARD32(pc + 16), (GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8)); } void __glXDispSwap_MapGrid1f(GLbyte * pc) { glMapGrid1f((GLint) bswap_CARD32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_MapGrid2d(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif glMapGrid2d((GLint) bswap_CARD32(pc + 32), (GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLint) bswap_CARD32(pc + 36), (GLdouble) bswap_FLOAT64(pc + 16), (GLdouble) bswap_FLOAT64(pc + 24)); } void __glXDispSwap_MapGrid2f(GLbyte * pc) { glMapGrid2f((GLint) bswap_CARD32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLfloat) bswap_FLOAT32(pc + 16), (GLfloat) bswap_FLOAT32(pc + 20)); } void __glXDispSwap_EvalCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif glEvalCoord1dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); } void __glXDispSwap_EvalCoord1fv(GLbyte * pc) { glEvalCoord1fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_EvalCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glEvalCoord2dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); } void __glXDispSwap_EvalCoord2fv(GLbyte * pc) { glEvalCoord2fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 2)); } void __glXDispSwap_EvalMesh1(GLbyte * pc) { glEvalMesh1((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_EvalPoint1(GLbyte * pc) { glEvalPoint1((GLint) bswap_CARD32(pc + 0)); } void __glXDispSwap_EvalMesh2(GLbyte * pc) { glEvalMesh2((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16)); } void __glXDispSwap_EvalPoint2(GLbyte * pc) { glEvalPoint2((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4)); } void __glXDispSwap_AlphaFunc(GLbyte * pc) { glAlphaFunc((GLenum) bswap_ENUM(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_BlendFunc(GLbyte * pc) { glBlendFunc((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_LogicOp(GLbyte * pc) { glLogicOp((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_StencilFunc(GLbyte * pc) { glStencilFunc((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLuint) bswap_CARD32(pc + 8)); } void __glXDispSwap_StencilOp(GLbyte * pc) { glStencilOp((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8)); } void __glXDispSwap_DepthFunc(GLbyte * pc) { glDepthFunc((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_PixelZoom(GLbyte * pc) { glPixelZoom((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_PixelTransferf(GLbyte * pc) { glPixelTransferf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_PixelTransferi(GLbyte * pc) { glPixelTransferi((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); } int __glXDispSwap_PixelStoref(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glPixelStoref((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); error = Success; } return error; } int __glXDispSwap_PixelStorei(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { glPixelStorei((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); error = Success; } return error; } void __glXDispSwap_PixelMapfv(GLbyte * pc) { const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); glPixelMapfv((GLenum) bswap_ENUM(pc + 0), mapsize, (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_PixelMapuiv(GLbyte * pc) { const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); glPixelMapuiv((GLenum) bswap_ENUM(pc + 0), mapsize, (const GLuint *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_PixelMapusv(GLbyte * pc) { const GLsizei mapsize = (GLsizei) bswap_CARD32(pc + 4); glPixelMapusv((GLenum) bswap_ENUM(pc + 0), mapsize, (const GLushort *) bswap_16_array((uint16_t *) (pc + 8), 0)); } void __glXDispSwap_ReadBuffer(GLbyte * pc) { glReadBuffer((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_CopyPixels(GLbyte * pc) { glCopyPixels((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLenum) bswap_ENUM(pc + 16)); } void __glXDispSwap_DrawPixels(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 36)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glDrawPixels((GLsizei) bswap_CARD32(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLenum) bswap_ENUM(pc + 28), (GLenum) bswap_ENUM(pc + 32), pixels); } int __glXDispSwap_GetBooleanv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetBooleanv_size(pname); GLboolean answerBuffer[200]; GLboolean *params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetBooleanv(pname, params); __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetClipPlane(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLdouble equation[4]; glGetClipPlane((GLenum) bswap_ENUM(pc + 0), equation); (void) bswap_64_array((uint64_t *) equation, 4); __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_GetDoublev(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetDoublev_size(pname); GLdouble answerBuffer[200]; GLdouble *params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetDoublev(pname, params); (void) bswap_64_array((uint64_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetError(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLenum retval; retval = glGetError(); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDispSwap_GetFloatv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetFloatv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetFloatv(pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetIntegerv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetIntegerv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetIntegerv(pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetLightfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetLightfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetLightfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetLightiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetLightiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetLightiv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMapdv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = (GLenum) bswap_ENUM(pc + 0); const GLenum query = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMapdv_size(target, query); GLdouble answerBuffer[200]; GLdouble *v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapdv(target, query, v); (void) bswap_64_array((uint64_t *) v, compsize); __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMapfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = (GLenum) bswap_ENUM(pc + 0); const GLenum query = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMapfv_size(target, query); GLfloat answerBuffer[200]; GLfloat *v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapfv(target, query, v); (void) bswap_32_array((uint32_t *) v, compsize); __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMapiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = (GLenum) bswap_ENUM(pc + 0); const GLenum query = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMapiv_size(target, query); GLint answerBuffer[200]; GLint *v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (v == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMapiv(target, query, v); (void) bswap_32_array((uint32_t *) v, compsize); __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMaterialfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMaterialfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMaterialfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMaterialiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMaterialiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMaterialiv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetPixelMapfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetPixelMapfv_size(map); GLfloat answerBuffer[200]; GLfloat *values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapfv(map, values); (void) bswap_32_array((uint32_t *) values, compsize); __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetPixelMapuiv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetPixelMapuiv_size(map); GLuint answerBuffer[200]; GLuint *values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapuiv(map, values); (void) bswap_32_array((uint32_t *) values, compsize); __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetPixelMapusv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum map = (GLenum) bswap_ENUM(pc + 0); const GLuint compsize = __glGetPixelMapusv_size(map); GLushort answerBuffer[200]; GLushort *values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2); if (values == NULL) return BadAlloc; __glXClearErrorOccured(); glGetPixelMapusv(map, values); (void) bswap_16_array((uint16_t *) values, compsize); __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexEnvfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexEnvfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexEnvfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexEnviv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexEnviv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexEnviv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexGendv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexGendv_size(pname); GLdouble answerBuffer[200]; GLdouble *params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGendv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_64_array((uint64_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexGenfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexGenfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGenfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexGeniv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexGeniv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexGeniv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetTexParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexLevelParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 8); const GLuint compsize = __glGetTexLevelParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexLevelParameterfv((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetTexLevelParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 8); const GLuint compsize = __glGetTexLevelParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetTexLevelParameteriv((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_IsEnabled(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsEnabled((GLenum) bswap_ENUM(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDispSwap_IsList(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsList((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_DepthRange(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 16); pc -= 4; } #endif glDepthRange((GLclampd) bswap_FLOAT64(pc + 0), (GLclampd) bswap_FLOAT64(pc + 8)); } void __glXDispSwap_Frustum(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 48); pc -= 4; } #endif glFrustum((GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLdouble) bswap_FLOAT64(pc + 16), (GLdouble) bswap_FLOAT64(pc + 24), (GLdouble) bswap_FLOAT64(pc + 32), (GLdouble) bswap_FLOAT64(pc + 40)); } void __glXDispSwap_LoadIdentity(GLbyte * pc) { glLoadIdentity(); } void __glXDispSwap_LoadMatrixf(GLbyte * pc) { glLoadMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16)); } void __glXDispSwap_LoadMatrixd(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 128); pc -= 4; } #endif glLoadMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16)); } void __glXDispSwap_MatrixMode(GLbyte * pc) { glMatrixMode((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_MultMatrixf(GLbyte * pc) { glMultMatrixf((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 16)); } void __glXDispSwap_MultMatrixd(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 128); pc -= 4; } #endif glMultMatrixd((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 16)); } void __glXDispSwap_Ortho(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 48); pc -= 4; } #endif glOrtho((GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLdouble) bswap_FLOAT64(pc + 16), (GLdouble) bswap_FLOAT64(pc + 24), (GLdouble) bswap_FLOAT64(pc + 32), (GLdouble) bswap_FLOAT64(pc + 40)); } void __glXDispSwap_PopMatrix(GLbyte * pc) { glPopMatrix(); } void __glXDispSwap_PushMatrix(GLbyte * pc) { glPushMatrix(); } void __glXDispSwap_Rotated(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 32); pc -= 4; } #endif glRotated((GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLdouble) bswap_FLOAT64(pc + 16), (GLdouble) bswap_FLOAT64(pc + 24)); } void __glXDispSwap_Rotatef(GLbyte * pc) { glRotatef((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8), (GLfloat) bswap_FLOAT32(pc + 12)); } void __glXDispSwap_Scaled(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glScaled((GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLdouble) bswap_FLOAT64(pc + 16)); } void __glXDispSwap_Scalef(GLbyte * pc) { glScalef((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_Translated(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif glTranslated((GLdouble) bswap_FLOAT64(pc + 0), (GLdouble) bswap_FLOAT64(pc + 8), (GLdouble) bswap_FLOAT64(pc + 16)); } void __glXDispSwap_Translatef(GLbyte * pc) { glTranslatef((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_Viewport(GLbyte * pc) { glViewport((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12)); } void __glXDispSwap_BindTexture(GLbyte * pc) { glBindTexture((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); } void __glXDispSwap_Indexubv(GLbyte * pc) { glIndexubv((const GLubyte *) (pc + 0)); } void __glXDispSwap_PolygonOffset(GLbyte * pc) { glPolygonOffset((GLfloat) bswap_FLOAT32(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } int __glXDispSwap_AreTexturesResident(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLboolean retval; GLboolean answerBuffer[200]; GLboolean *residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); if (residences == NULL) return BadAlloc; retval = glAreTexturesResident(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0), residences); __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); error = Success; } return error; } int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLboolean retval; GLboolean answerBuffer[200]; GLboolean *residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); if (residences == NULL) return BadAlloc; retval = glAreTexturesResident(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0), residences); __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); error = Success; } return error; } void __glXDispSwap_CopyTexImage1D(GLbyte * pc) { glCopyTexImage1D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20), (GLint) bswap_CARD32(pc + 24)); } void __glXDispSwap_CopyTexImage2D(GLbyte * pc) { glCopyTexImage2D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28)); } void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc) { glCopyTexSubImage1D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20)); } void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) { glCopyTexSubImage2D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLint) bswap_CARD32(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLsizei) bswap_CARD32(pc + 28)); } int __glXDispSwap_DeleteTextures(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); glDeleteTextures(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); error = Success; } return error; } int __glXDispSwap_DeleteTexturesEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); glDeleteTextures(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); error = Success; } return error; } int __glXDispSwap_GenTextures(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (textures == NULL) return BadAlloc; glGenTextures(n, textures); (void) bswap_32_array((uint32_t *) textures, n); __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_GenTexturesEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (textures == NULL) return BadAlloc; glGenTextures(n, textures); (void) bswap_32_array((uint32_t *) textures, n); __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_IsTexture(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsTexture((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDispSwap_IsTextureEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = glIsTexture((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_PrioritizeTextures(GLbyte * pc) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); glPrioritizeTextures(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0), (const GLclampf *) bswap_32_array((uint32_t *) (pc + 4), 0)); } void __glXDispSwap_TexSubImage1D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexSubImage1D((GLenum) bswap_ENUM(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28), (GLsizei) bswap_CARD32(pc + 36), (GLenum) bswap_ENUM(pc + 44), (GLenum) bswap_ENUM(pc + 48), pixels); } void __glXDispSwap_TexSubImage2D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 56)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexSubImage2D((GLenum) bswap_ENUM(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28), (GLint) bswap_CARD32(pc + 32), (GLsizei) bswap_CARD32(pc + 36), (GLsizei) bswap_CARD32(pc + 40), (GLenum) bswap_ENUM(pc + 44), (GLenum) bswap_ENUM(pc + 48), pixels); } void __glXDispSwap_BlendColor(GLbyte * pc) { glBlendColor((GLclampf) bswap_FLOAT32(pc + 0), (GLclampf) bswap_FLOAT32(pc + 4), (GLclampf) bswap_FLOAT32(pc + 8), (GLclampf) bswap_FLOAT32(pc + 12)); } void __glXDispSwap_BlendEquation(GLbyte * pc) { glBlendEquation((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_ColorTable(GLbyte * pc) { const GLvoid *const table = (const GLvoid *) ((pc + 40)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glColorTable((GLenum) bswap_ENUM(pc + 20), (GLenum) bswap_ENUM(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLenum) bswap_ENUM(pc + 32), (GLenum) bswap_ENUM(pc + 36), table); } void __glXDispSwap_ColorTableParameterfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname)); glColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_ColorTableParameteriv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname)); glColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_CopyColorTable(GLbyte * pc) { glCopyColorTable((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16)); } int __glXDispSwap_GetColorTableParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetColorTableParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetColorTableParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetColorTableParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetColorTableParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetColorTableParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetColorTableParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } void __glXDispSwap_ColorSubTable(GLbyte * pc) { const GLvoid *const data = (const GLvoid *) ((pc + 40)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glColorSubTable((GLenum) bswap_ENUM(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLenum) bswap_ENUM(pc + 32), (GLenum) bswap_ENUM(pc + 36), data); } void __glXDispSwap_CopyColorSubTable(GLbyte * pc) { glCopyColorSubTable((GLenum) bswap_ENUM(pc + 0), (GLsizei) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16)); } void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc) { const GLvoid *const image = (const GLvoid *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glConvolutionFilter1D((GLenum) bswap_ENUM(pc + 20), (GLenum) bswap_ENUM(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLenum) bswap_ENUM(pc + 36), (GLenum) bswap_ENUM(pc + 40), image); } void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc) { const GLvoid *const image = (const GLvoid *) ((pc + 44)); __GLXpixelHeader *const hdr = (__GLXpixelHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glConvolutionFilter2D((GLenum) bswap_ENUM(pc + 20), (GLenum) bswap_ENUM(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLsizei) bswap_CARD32(pc + 32), (GLenum) bswap_ENUM(pc + 36), (GLenum) bswap_ENUM(pc + 40), image); } void __glXDispSwap_ConvolutionParameterf(GLbyte * pc) { glConvolutionParameterf((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLfloat) bswap_FLOAT32(pc + 8)); } void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), __glConvolutionParameterfv_size (pname)); glConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_ConvolutionParameteri(GLbyte * pc) { glConvolutionParameteri((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8)); } void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname)); glConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); } void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc) { glCopyConvolutionFilter1D((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16)); } void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc) { glCopyConvolutionFilter2D((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20)); } int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetConvolutionParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetConvolutionParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetConvolutionParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetConvolutionParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetConvolutionParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetHistogramParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetHistogramParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetHistogramParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetHistogramParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetHistogramParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetHistogramParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetHistogramParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMinmaxParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMinmaxParameterfv_size(pname); GLfloat answerBuffer[200]; GLfloat *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameterfv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState * cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMinmaxParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetMinmaxParameteriv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); glGetMinmaxParameteriv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } void __glXDispSwap_Histogram(GLbyte * pc) { glHistogram((GLenum) bswap_ENUM(pc + 0), (GLsizei) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), *(GLboolean *) (pc + 12)); } void __glXDispSwap_Minmax(GLbyte * pc) { glMinmax((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), *(GLboolean *) (pc + 8)); } void __glXDispSwap_ResetHistogram(GLbyte * pc) { glResetHistogram((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_ResetMinmax(GLbyte * pc) { glResetMinmax((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_TexImage3D(GLbyte * pc) { const CARD32 ptr_is_null = *(CARD32 *) (pc + 76); const GLvoid *const pixels = (const GLvoid *) ((ptr_is_null != 0) ? NULL : (pc + 80)); __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32(&hdr->imageHeight)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32(&hdr->skipImages)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexImage3D((GLenum) bswap_ENUM(pc + 36), (GLint) bswap_CARD32(pc + 40), (GLint) bswap_CARD32(pc + 44), (GLsizei) bswap_CARD32(pc + 48), (GLsizei) bswap_CARD32(pc + 52), (GLsizei) bswap_CARD32(pc + 56), (GLint) bswap_CARD32(pc + 64), (GLenum) bswap_ENUM(pc + 68), (GLenum) bswap_ENUM(pc + 72), pixels); } void __glXDispSwap_TexSubImage3D(GLbyte * pc) { const GLvoid *const pixels = (const GLvoid *) ((pc + 88)); __GLXpixel3DHeader *const hdr = (__GLXpixel3DHeader *) (pc); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32(&hdr->rowLength)); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32(&hdr->imageHeight)); glPixelStorei(GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32(&hdr->skipRows)); glPixelStorei(GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32(&hdr->skipImages)); glPixelStorei(GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32(&hdr->skipPixels)); glPixelStorei(GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32(&hdr->alignment)); glTexSubImage3D((GLenum) bswap_ENUM(pc + 36), (GLint) bswap_CARD32(pc + 40), (GLint) bswap_CARD32(pc + 44), (GLint) bswap_CARD32(pc + 48), (GLint) bswap_CARD32(pc + 52), (GLsizei) bswap_CARD32(pc + 60), (GLsizei) bswap_CARD32(pc + 64), (GLsizei) bswap_CARD32(pc + 68), (GLenum) bswap_ENUM(pc + 76), (GLenum) bswap_ENUM(pc + 80), pixels); } void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc) { glCopyTexSubImage3D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLint) bswap_CARD32(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLsizei) bswap_CARD32(pc + 32)); } void __glXDispSwap_ActiveTexture(GLbyte * pc) { glActiveTextureARB((GLenum) bswap_ENUM(pc + 0)); } void __glXDispSwap_MultiTexCoord1dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif glMultiTexCoord1dvARB((GLenum) bswap_ENUM(pc + 8), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); } void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc) { glMultiTexCoord1fvARB((GLenum) bswap_ENUM(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 1)); } void __glXDispSwap_MultiTexCoord1iv(GLbyte * pc) { glMultiTexCoord1ivARB((GLenum) bswap_ENUM(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 1)); } void __glXDispSwap_MultiTexCoord1sv(GLbyte * pc) { glMultiTexCoord1svARB((GLenum) bswap_ENUM(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1)); } void __glXDispSwap_MultiTexCoord2dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif glMultiTexCoord2dvARB((GLenum) bswap_ENUM(pc + 16), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 2)); } void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc) { glMultiTexCoord2fvARB((GLenum) bswap_ENUM(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 2)); } void __glXDispSwap_MultiTexCoord2iv(GLbyte * pc) { glMultiTexCoord2ivARB((GLenum) bswap_ENUM(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 2)); } void __glXDispSwap_MultiTexCoord2sv(GLbyte * pc) { glMultiTexCoord2svARB((GLenum) bswap_ENUM(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); } void __glXDispSwap_MultiTexCoord3dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif glMultiTexCoord3dvARB((GLenum) bswap_ENUM(pc + 24), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc) { glMultiTexCoord3fvARB((GLenum) bswap_ENUM(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 3)); } void __glXDispSwap_MultiTexCoord3iv(GLbyte * pc) { glMultiTexCoord3ivARB((GLenum) bswap_ENUM(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 3)); } void __glXDispSwap_MultiTexCoord3sv(GLbyte * pc) { glMultiTexCoord3svARB((GLenum) bswap_ENUM(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3)); } void __glXDispSwap_MultiTexCoord4dv(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif glMultiTexCoord4dvARB((GLenum) bswap_ENUM(pc + 32), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 4)); } void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc) { glMultiTexCoord4fvARB((GLenum) bswap_ENUM(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_MultiTexCoord4iv(GLbyte * pc) { glMultiTexCoord4ivARB((GLenum) bswap_ENUM(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_MultiTexCoord4sv(GLbyte * pc) { glMultiTexCoord4svARB((GLenum) bswap_ENUM(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_CompressedTexImage1D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE1DPROC CompressedTexImage1D = __glGetProcAddress("glCompressedTexImage1D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20); CompressedTexImage1D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), imageSize, (const GLvoid *) (pc + 24)); } void __glXDispSwap_CompressedTexImage2D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE2DPROC CompressedTexImage2D = __glGetProcAddress("glCompressedTexImage2D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 24); CompressedTexImage2D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16), (GLint) bswap_CARD32(pc + 20), imageSize, (const GLvoid *) (pc + 28)); } void __glXDispSwap_CompressedTexImage3D(GLbyte * pc) { PFNGLCOMPRESSEDTEXIMAGE3DPROC CompressedTexImage3D = __glGetProcAddress("glCompressedTexImage3D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28); CompressedTexImage3D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20), (GLint) bswap_CARD32(pc + 24), imageSize, (const GLvoid *) (pc + 32)); } void __glXDispSwap_CompressedTexSubImage1D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC CompressedTexSubImage1D = __glGetProcAddress("glCompressedTexSubImage1D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 20); CompressedTexSubImage1D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLenum) bswap_ENUM(pc + 16), imageSize, (const GLvoid *) (pc + 24)); } void __glXDispSwap_CompressedTexSubImage2D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC CompressedTexSubImage2D = __glGetProcAddress("glCompressedTexSubImage2D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 28); CompressedTexSubImage2D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20), (GLenum) bswap_ENUM(pc + 24), imageSize, (const GLvoid *) (pc + 32)); } void __glXDispSwap_CompressedTexSubImage3D(GLbyte * pc) { PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC CompressedTexSubImage3D = __glGetProcAddress("glCompressedTexSubImage3D"); const GLsizei imageSize = (GLsizei) bswap_CARD32(pc + 36); CompressedTexSubImage3D((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLsizei) bswap_CARD32(pc + 20), (GLsizei) bswap_CARD32(pc + 24), (GLsizei) bswap_CARD32(pc + 28), (GLenum) bswap_ENUM(pc + 32), imageSize, (const GLvoid *) (pc + 40)); } void __glXDispSwap_SampleCoverage(GLbyte * pc) { PFNGLSAMPLECOVERAGEPROC SampleCoverage = __glGetProcAddress("glSampleCoverage"); SampleCoverage((GLclampf) bswap_FLOAT32(pc + 0), *(GLboolean *) (pc + 4)); } void __glXDispSwap_BlendFuncSeparate(GLbyte * pc) { PFNGLBLENDFUNCSEPARATEPROC BlendFuncSeparate = __glGetProcAddress("glBlendFuncSeparate"); BlendFuncSeparate((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLenum) bswap_ENUM(pc + 12)); } void __glXDispSwap_FogCoorddv(GLbyte * pc) { PFNGLFOGCOORDDVPROC FogCoorddv = __glGetProcAddress("glFogCoorddv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 8); pc -= 4; } #endif FogCoorddv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 1)); } void __glXDispSwap_PointParameterf(GLbyte * pc) { PFNGLPOINTPARAMETERFPROC PointParameterf = __glGetProcAddress("glPointParameterf"); PointParameterf((GLenum) bswap_ENUM(pc + 0), (GLfloat) bswap_FLOAT32(pc + 4)); } void __glXDispSwap_PointParameterfv(GLbyte * pc) { PFNGLPOINTPARAMETERFVPROC PointParameterfv = __glGetProcAddress("glPointParameterfv"); const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLfloat *params; params = (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), __glPointParameterfv_size(pname)); PointParameterfv(pname, params); } void __glXDispSwap_PointParameteri(GLbyte * pc) { PFNGLPOINTPARAMETERIPROC PointParameteri = __glGetProcAddress("glPointParameteri"); PointParameteri((GLenum) bswap_ENUM(pc + 0), (GLint) bswap_CARD32(pc + 4)); } void __glXDispSwap_PointParameteriv(GLbyte * pc) { PFNGLPOINTPARAMETERIVPROC PointParameteriv = __glGetProcAddress("glPointParameteriv"); const GLenum pname = (GLenum) bswap_ENUM(pc + 0); const GLint *params; params = (const GLint *) bswap_32_array((uint32_t *) (pc + 4), __glPointParameteriv_size(pname)); PointParameteriv(pname, params); } void __glXDispSwap_SecondaryColor3bv(GLbyte * pc) { PFNGLSECONDARYCOLOR3BVPROC SecondaryColor3bv = __glGetProcAddress("glSecondaryColor3bv"); SecondaryColor3bv((const GLbyte *) (pc + 0)); } void __glXDispSwap_SecondaryColor3dv(GLbyte * pc) { PFNGLSECONDARYCOLOR3DVPROC SecondaryColor3dv = __glGetProcAddress("glSecondaryColor3dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 24); pc -= 4; } #endif SecondaryColor3dv((const GLdouble *) bswap_64_array((uint64_t *) (pc + 0), 3)); } void __glXDispSwap_SecondaryColor3iv(GLbyte * pc) { PFNGLSECONDARYCOLOR3IVPROC SecondaryColor3iv = __glGetProcAddress("glSecondaryColor3iv"); SecondaryColor3iv((const GLint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_SecondaryColor3sv(GLbyte * pc) { PFNGLSECONDARYCOLOR3SVPROC SecondaryColor3sv = __glGetProcAddress("glSecondaryColor3sv"); SecondaryColor3sv((const GLshort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_SecondaryColor3ubv(GLbyte * pc) { PFNGLSECONDARYCOLOR3UBVPROC SecondaryColor3ubv = __glGetProcAddress("glSecondaryColor3ubv"); SecondaryColor3ubv((const GLubyte *) (pc + 0)); } void __glXDispSwap_SecondaryColor3uiv(GLbyte * pc) { PFNGLSECONDARYCOLOR3UIVPROC SecondaryColor3uiv = __glGetProcAddress("glSecondaryColor3uiv"); SecondaryColor3uiv((const GLuint *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_SecondaryColor3usv(GLbyte * pc) { PFNGLSECONDARYCOLOR3USVPROC SecondaryColor3usv = __glGetProcAddress("glSecondaryColor3usv"); SecondaryColor3usv((const GLushort *) bswap_16_array((uint16_t *) (pc + 0), 3)); } void __glXDispSwap_WindowPos3fv(GLbyte * pc) { PFNGLWINDOWPOS3FVPROC WindowPos3fv = __glGetProcAddress("glWindowPos3fv"); WindowPos3fv((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_BeginQuery(GLbyte * pc) { PFNGLBEGINQUERYPROC BeginQuery = __glGetProcAddress("glBeginQuery"); BeginQuery((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); } int __glXDispSwap_DeleteQueries(__GLXclientState * cl, GLbyte * pc) { PFNGLDELETEQUERIESPROC DeleteQueries = __glGetProcAddress("glDeleteQueries"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); DeleteQueries(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); error = Success; } return error; } void __glXDispSwap_EndQuery(GLbyte * pc) { PFNGLENDQUERYPROC EndQuery = __glGetProcAddress("glEndQuery"); EndQuery((GLenum) bswap_ENUM(pc + 0)); } int __glXDispSwap_GenQueries(__GLXclientState * cl, GLbyte * pc) { PFNGLGENQUERIESPROC GenQueries = __glGetProcAddress("glGenQueries"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (ids == NULL) return BadAlloc; GenQueries(n, ids); (void) bswap_32_array((uint32_t *) ids, n); __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_GetQueryObjectiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYOBJECTIVPROC GetQueryObjectiv = __glGetProcAddress("glGetQueryObjectiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetQueryObjectiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryObjectiv((GLuint) bswap_CARD32(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetQueryObjectuiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYOBJECTUIVPROC GetQueryObjectuiv = __glGetProcAddress("glGetQueryObjectuiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetQueryObjectuiv_size(pname); GLuint answerBuffer[200]; GLuint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryObjectuiv((GLuint) bswap_CARD32(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetQueryiv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETQUERYIVPROC GetQueryiv = __glGetProcAddress("glGetQueryiv"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetQueryiv_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetQueryiv((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_IsQuery(__GLXclientState * cl, GLbyte * pc) { PFNGLISQUERYPROC IsQuery = __glGetProcAddress("glIsQuery"); xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsQuery((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_BlendEquationSeparate(GLbyte * pc) { PFNGLBLENDEQUATIONSEPARATEPROC BlendEquationSeparate = __glGetProcAddress("glBlendEquationSeparate"); BlendEquationSeparate((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_DrawBuffers(GLbyte * pc) { PFNGLDRAWBUFFERSPROC DrawBuffers = __glGetProcAddress("glDrawBuffers"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); DrawBuffers(n, (const GLenum *) bswap_32_array((uint32_t *) (pc + 4), 0)); } void __glXDispSwap_VertexAttrib1dv(GLbyte * pc) { PFNGLVERTEXATTRIB1DVPROC VertexAttrib1dv = __glGetProcAddress("glVertexAttrib1dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif VertexAttrib1dv((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib1sv(GLbyte * pc) { PFNGLVERTEXATTRIB1SVPROC VertexAttrib1sv = __glGetProcAddress("glVertexAttrib1sv"); VertexAttrib1sv((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib2dv(GLbyte * pc) { PFNGLVERTEXATTRIB2DVPROC VertexAttrib2dv = __glGetProcAddress("glVertexAttrib2dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif VertexAttrib2dv((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib2sv(GLbyte * pc) { PFNGLVERTEXATTRIB2SVPROC VertexAttrib2sv = __glGetProcAddress("glVertexAttrib2sv"); VertexAttrib2sv((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib3dv(GLbyte * pc) { PFNGLVERTEXATTRIB3DVPROC VertexAttrib3dv = __glGetProcAddress("glVertexAttrib3dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif VertexAttrib3dv((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib3sv(GLbyte * pc) { PFNGLVERTEXATTRIB3SVPROC VertexAttrib3sv = __glGetProcAddress("glVertexAttrib3sv"); VertexAttrib3sv((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib4Nbv(GLbyte * pc) { PFNGLVERTEXATTRIB4NBVPROC VertexAttrib4Nbv = __glGetProcAddress("glVertexAttrib4Nbv"); VertexAttrib4Nbv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4)); } void __glXDispSwap_VertexAttrib4Niv(GLbyte * pc) { PFNGLVERTEXATTRIB4NIVPROC VertexAttrib4Niv = __glGetProcAddress("glVertexAttrib4Niv"); VertexAttrib4Niv((GLuint) bswap_CARD32(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4Nsv(GLbyte * pc) { PFNGLVERTEXATTRIB4NSVPROC VertexAttrib4Nsv = __glGetProcAddress("glVertexAttrib4Nsv"); VertexAttrib4Nsv((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4Nubv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUBVPROC VertexAttrib4Nubv = __glGetProcAddress("glVertexAttrib4Nubv"); VertexAttrib4Nubv((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4)); } void __glXDispSwap_VertexAttrib4Nuiv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUIVPROC VertexAttrib4Nuiv = __glGetProcAddress("glVertexAttrib4Nuiv"); VertexAttrib4Nuiv((GLuint) bswap_CARD32(pc + 0), (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4Nusv(GLbyte * pc) { PFNGLVERTEXATTRIB4NUSVPROC VertexAttrib4Nusv = __glGetProcAddress("glVertexAttrib4Nusv"); VertexAttrib4Nusv((GLuint) bswap_CARD32(pc + 0), (const GLushort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4bv(GLbyte * pc) { PFNGLVERTEXATTRIB4BVPROC VertexAttrib4bv = __glGetProcAddress("glVertexAttrib4bv"); VertexAttrib4bv((GLuint) bswap_CARD32(pc + 0), (const GLbyte *) (pc + 4)); } void __glXDispSwap_VertexAttrib4dv(GLbyte * pc) { PFNGLVERTEXATTRIB4DVPROC VertexAttrib4dv = __glGetProcAddress("glVertexAttrib4dv"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif VertexAttrib4dv((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4iv(GLbyte * pc) { PFNGLVERTEXATTRIB4IVPROC VertexAttrib4iv = __glGetProcAddress("glVertexAttrib4iv"); VertexAttrib4iv((GLuint) bswap_CARD32(pc + 0), (const GLint *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4sv(GLbyte * pc) { PFNGLVERTEXATTRIB4SVPROC VertexAttrib4sv = __glGetProcAddress("glVertexAttrib4sv"); VertexAttrib4sv((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4ubv(GLbyte * pc) { PFNGLVERTEXATTRIB4UBVPROC VertexAttrib4ubv = __glGetProcAddress("glVertexAttrib4ubv"); VertexAttrib4ubv((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4)); } void __glXDispSwap_VertexAttrib4uiv(GLbyte * pc) { PFNGLVERTEXATTRIB4UIVPROC VertexAttrib4uiv = __glGetProcAddress("glVertexAttrib4uiv"); VertexAttrib4uiv((GLuint) bswap_CARD32(pc + 0), (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4usv(GLbyte * pc) { PFNGLVERTEXATTRIB4USVPROC VertexAttrib4usv = __glGetProcAddress("glVertexAttrib4usv"); VertexAttrib4usv((GLuint) bswap_CARD32(pc + 0), (const GLushort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_ClampColor(GLbyte * pc) { PFNGLCLAMPCOLORPROC ClampColor = __glGetProcAddress("glClampColor"); ClampColor((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4)); } void __glXDispSwap_BindProgramARB(GLbyte * pc) { PFNGLBINDPROGRAMARBPROC BindProgramARB = __glGetProcAddress("glBindProgramARB"); BindProgramARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); } int __glXDispSwap_DeleteProgramsARB(__GLXclientState * cl, GLbyte * pc) { PFNGLDELETEPROGRAMSARBPROC DeleteProgramsARB = __glGetProcAddress("glDeleteProgramsARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); DeleteProgramsARB(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); error = Success; } return error; } int __glXDispSwap_GenProgramsARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGENPROGRAMSARBPROC GenProgramsARB = __glGetProcAddress("glGenProgramsARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (programs == NULL) return BadAlloc; GenProgramsARB(n, programs); (void) bswap_32_array((uint32_t *) programs, n); __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMENVPARAMETERDVARBPROC GetProgramEnvParameterdvARB = __glGetProcAddress("glGetProgramEnvParameterdvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLdouble params[4]; GetProgramEnvParameterdvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), params); (void) bswap_64_array((uint64_t *) params, 4); __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMENVPARAMETERFVARBPROC GetProgramEnvParameterfvARB = __glGetProcAddress("glGetProgramEnvParameterfvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLfloat params[4]; GetProgramEnvParameterfvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), params); (void) bswap_32_array((uint32_t *) params, 4); __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMLOCALPARAMETERDVARBPROC GetProgramLocalParameterdvARB = __glGetProcAddress("glGetProgramLocalParameterdvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLdouble params[4]; GetProgramLocalParameterdvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), params); (void) bswap_64_array((uint64_t *) params, 4); __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMLOCALPARAMETERFVARBPROC GetProgramLocalParameterfvARB = __glGetProcAddress("glGetProgramLocalParameterfvARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLfloat params[4]; GetProgramLocalParameterfvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), params); (void) bswap_32_array((uint32_t *) params, 4); __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetProgramivARB(__GLXclientState * cl, GLbyte * pc) { PFNGLGETPROGRAMIVARBPROC GetProgramivARB = __glGetProcAddress("glGetProgramivARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLenum pname = (GLenum) bswap_ENUM(pc + 4); const GLuint compsize = __glGetProgramivARB_size(pname); GLint answerBuffer[200]; GLint *params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); GetProgramivARB((GLenum) bswap_ENUM(pc + 0), pname, params); (void) bswap_32_array((uint32_t *) params, compsize); __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_IsProgramARB(__GLXclientState * cl, GLbyte * pc) { PFNGLISPROGRAMARBPROC IsProgramARB = __glGetProcAddress("glIsProgramARB"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsProgramARB((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) { PFNGLPROGRAMENVPARAMETER4DVARBPROC ProgramEnvParameter4dvARB = __glGetProcAddress("glProgramEnvParameter4dvARB"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif ProgramEnvParameter4dvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 4)); } void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) { PFNGLPROGRAMENVPARAMETER4FVARBPROC ProgramEnvParameter4fvARB = __glGetProcAddress("glProgramEnvParameter4fvARB"); ProgramEnvParameter4fvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 4)); } void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) { PFNGLPROGRAMLOCALPARAMETER4DVARBPROC ProgramLocalParameter4dvARB = __glGetProcAddress("glProgramLocalParameter4dvARB"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 40); pc -= 4; } #endif ProgramLocalParameter4dvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 4)); } void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) { PFNGLPROGRAMLOCALPARAMETER4FVARBPROC ProgramLocalParameter4fvARB = __glGetProcAddress("glProgramLocalParameter4fvARB"); ProgramLocalParameter4fvARB((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 4)); } void __glXDispSwap_ProgramStringARB(GLbyte * pc) { PFNGLPROGRAMSTRINGARBPROC ProgramStringARB = __glGetProcAddress("glProgramStringARB"); const GLsizei len = (GLsizei) bswap_CARD32(pc + 8); ProgramStringARB((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), len, (const GLvoid *) (pc + 12)); } void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB1FVARBPROC VertexAttrib1fvARB = __glGetProcAddress("glVertexAttrib1fvARB"); VertexAttrib1fvARB((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB2FVARBPROC VertexAttrib2fvARB = __glGetProcAddress("glVertexAttrib2fvARB"); VertexAttrib2fvARB((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB3FVARBPROC VertexAttrib3fvARB = __glGetProcAddress("glVertexAttrib3fvARB"); VertexAttrib3fvARB((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) { PFNGLVERTEXATTRIB4FVARBPROC VertexAttrib4fvARB = __glGetProcAddress("glVertexAttrib4fvARB"); VertexAttrib4fvARB((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_BindFramebuffer(GLbyte * pc) { PFNGLBINDFRAMEBUFFERPROC BindFramebuffer = __glGetProcAddress("glBindFramebuffer"); BindFramebuffer((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); } void __glXDispSwap_BindRenderbuffer(GLbyte * pc) { PFNGLBINDRENDERBUFFERPROC BindRenderbuffer = __glGetProcAddress("glBindRenderbuffer"); BindRenderbuffer((GLenum) bswap_ENUM(pc + 0), (GLuint) bswap_CARD32(pc + 4)); } void __glXDispSwap_BlitFramebuffer(GLbyte * pc) { PFNGLBLITFRAMEBUFFERPROC BlitFramebuffer = __glGetProcAddress("glBlitFramebuffer"); BlitFramebuffer((GLint) bswap_CARD32(pc + 0), (GLint) bswap_CARD32(pc + 4), (GLint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLint) bswap_CARD32(pc + 20), (GLint) bswap_CARD32(pc + 24), (GLint) bswap_CARD32(pc + 28), (GLbitfield) bswap_CARD32(pc + 32), (GLenum) bswap_ENUM(pc + 36)); } int __glXDispSwap_CheckFramebufferStatus(__GLXclientState * cl, GLbyte * pc) { PFNGLCHECKFRAMEBUFFERSTATUSPROC CheckFramebufferStatus = __glGetProcAddress("glCheckFramebufferStatus"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLenum retval; retval = CheckFramebufferStatus((GLenum) bswap_ENUM(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_DeleteFramebuffers(GLbyte * pc) { PFNGLDELETEFRAMEBUFFERSPROC DeleteFramebuffers = __glGetProcAddress("glDeleteFramebuffers"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); DeleteFramebuffers(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); } void __glXDispSwap_DeleteRenderbuffers(GLbyte * pc) { PFNGLDELETERENDERBUFFERSPROC DeleteRenderbuffers = __glGetProcAddress("glDeleteRenderbuffers"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); DeleteRenderbuffers(n, (const GLuint *) bswap_32_array((uint32_t *) (pc + 4), 0)); } void __glXDispSwap_FramebufferRenderbuffer(GLbyte * pc) { PFNGLFRAMEBUFFERRENDERBUFFERPROC FramebufferRenderbuffer = __glGetProcAddress("glFramebufferRenderbuffer"); FramebufferRenderbuffer((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLuint) bswap_CARD32(pc + 12)); } void __glXDispSwap_FramebufferTexture1D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE1DPROC FramebufferTexture1D = __glGetProcAddress("glFramebufferTexture1D"); FramebufferTexture1D((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLuint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16)); } void __glXDispSwap_FramebufferTexture2D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE2DPROC FramebufferTexture2D = __glGetProcAddress("glFramebufferTexture2D"); FramebufferTexture2D((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLuint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16)); } void __glXDispSwap_FramebufferTexture3D(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURE3DPROC FramebufferTexture3D = __glGetProcAddress("glFramebufferTexture3D"); FramebufferTexture3D((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLuint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16), (GLint) bswap_CARD32(pc + 20)); } void __glXDispSwap_FramebufferTextureLayer(GLbyte * pc) { PFNGLFRAMEBUFFERTEXTURELAYERPROC FramebufferTextureLayer = __glGetProcAddress("glFramebufferTextureLayer"); FramebufferTextureLayer((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLuint) bswap_CARD32(pc + 8), (GLint) bswap_CARD32(pc + 12), (GLint) bswap_CARD32(pc + 16)); } int __glXDispSwap_GenFramebuffers(__GLXclientState * cl, GLbyte * pc) { PFNGLGENFRAMEBUFFERSPROC GenFramebuffers = __glGetProcAddress("glGenFramebuffers"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (framebuffers == NULL) return BadAlloc; GenFramebuffers(n, framebuffers); (void) bswap_32_array((uint32_t *) framebuffers, n); __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); error = Success; } return error; } int __glXDispSwap_GenRenderbuffers(__GLXclientState * cl, GLbyte * pc) { PFNGLGENRENDERBUFFERSPROC GenRenderbuffers = __glGetProcAddress("glGenRenderbuffers"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { const GLsizei n = (GLsizei) bswap_CARD32(pc + 0); GLuint answerBuffer[200]; GLuint *renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); if (renderbuffers == NULL) return BadAlloc; GenRenderbuffers(n, renderbuffers); (void) bswap_32_array((uint32_t *) renderbuffers, n); __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0); error = Success; } return error; } void __glXDispSwap_GenerateMipmap(GLbyte * pc) { PFNGLGENERATEMIPMAPPROC GenerateMipmap = __glGetProcAddress("glGenerateMipmap"); GenerateMipmap((GLenum) bswap_ENUM(pc + 0)); } int __glXDispSwap_GetFramebufferAttachmentParameteriv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC GetFramebufferAttachmentParameteriv = __glGetProcAddress("glGetFramebufferAttachmentParameteriv"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLint params[1]; GetFramebufferAttachmentParameteriv((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLenum) bswap_ENUM(pc + 8), params); (void) bswap_32_array((uint32_t *) params, 1); __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_GetRenderbufferParameteriv(__GLXclientState * cl, GLbyte * pc) { PFNGLGETRENDERBUFFERPARAMETERIVPROC GetRenderbufferParameteriv = __glGetProcAddress("glGetRenderbufferParameteriv"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLint params[1]; GetRenderbufferParameteriv((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), params); (void) bswap_32_array((uint32_t *) params, 1); __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); error = Success; } return error; } int __glXDispSwap_IsFramebuffer(__GLXclientState * cl, GLbyte * pc) { PFNGLISFRAMEBUFFERPROC IsFramebuffer = __glGetProcAddress("glIsFramebuffer"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsFramebuffer((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } int __glXDispSwap_IsRenderbuffer(__GLXclientState * cl, GLbyte * pc) { PFNGLISRENDERBUFFERPROC IsRenderbuffer = __glGetProcAddress("glIsRenderbuffer"); xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_CARD32(&req->contextTag), &error); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLboolean retval; retval = IsRenderbuffer((GLuint) bswap_CARD32(pc + 0)); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; } return error; } void __glXDispSwap_RenderbufferStorage(GLbyte * pc) { PFNGLRENDERBUFFERSTORAGEPROC RenderbufferStorage = __glGetProcAddress("glRenderbufferStorage"); RenderbufferStorage((GLenum) bswap_ENUM(pc + 0), (GLenum) bswap_ENUM(pc + 4), (GLsizei) bswap_CARD32(pc + 8), (GLsizei) bswap_CARD32(pc + 12)); } void __glXDispSwap_RenderbufferStorageMultisample(GLbyte * pc) { PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC RenderbufferStorageMultisample = __glGetProcAddress("glRenderbufferStorageMultisample"); RenderbufferStorageMultisample((GLenum) bswap_ENUM(pc + 0), (GLsizei) bswap_CARD32(pc + 4), (GLenum) bswap_ENUM(pc + 8), (GLsizei) bswap_CARD32(pc + 12), (GLsizei) bswap_CARD32(pc + 16)); } void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc) { PFNGLSECONDARYCOLOR3FVEXTPROC SecondaryColor3fvEXT = __glGetProcAddress("glSecondaryColor3fvEXT"); SecondaryColor3fvEXT((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 3)); } void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) { PFNGLFOGCOORDFVEXTPROC FogCoordfvEXT = __glGetProcAddress("glFogCoordfvEXT"); FogCoordfvEXT((const GLfloat *) bswap_32_array((uint32_t *) (pc + 0), 1)); } void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB1DVNVPROC VertexAttrib1dvNV = __glGetProcAddress("glVertexAttrib1dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 12); pc -= 4; } #endif VertexAttrib1dvNV((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB1FVNVPROC VertexAttrib1fvNV = __glGetProcAddress("glVertexAttrib1fvNV"); VertexAttrib1fvNV((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) { PFNGLVERTEXATTRIB1SVNVPROC VertexAttrib1svNV = __glGetProcAddress("glVertexAttrib1svNV"); VertexAttrib1svNV((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 1)); } void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB2DVNVPROC VertexAttrib2dvNV = __glGetProcAddress("glVertexAttrib2dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 20); pc -= 4; } #endif VertexAttrib2dvNV((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB2FVNVPROC VertexAttrib2fvNV = __glGetProcAddress("glVertexAttrib2fvNV"); VertexAttrib2fvNV((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) { PFNGLVERTEXATTRIB2SVNVPROC VertexAttrib2svNV = __glGetProcAddress("glVertexAttrib2svNV"); VertexAttrib2svNV((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 2)); } void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB3DVNVPROC VertexAttrib3dvNV = __glGetProcAddress("glVertexAttrib3dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 28); pc -= 4; } #endif VertexAttrib3dvNV((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB3FVNVPROC VertexAttrib3fvNV = __glGetProcAddress("glVertexAttrib3fvNV"); VertexAttrib3fvNV((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) { PFNGLVERTEXATTRIB3SVNVPROC VertexAttrib3svNV = __glGetProcAddress("glVertexAttrib3svNV"); VertexAttrib3svNV((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 3)); } void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4DVNVPROC VertexAttrib4dvNV = __glGetProcAddress("glVertexAttrib4dvNV"); #ifdef __GLX_ALIGN64 if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, 36); pc -= 4; } #endif VertexAttrib4dvNV((GLuint) bswap_CARD32(pc + 0), (const GLdouble *) bswap_64_array((uint64_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4FVNVPROC VertexAttrib4fvNV = __glGetProcAddress("glVertexAttrib4fvNV"); VertexAttrib4fvNV((GLuint) bswap_CARD32(pc + 0), (const GLfloat *) bswap_32_array((uint32_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) { PFNGLVERTEXATTRIB4SVNVPROC VertexAttrib4svNV = __glGetProcAddress("glVertexAttrib4svNV"); VertexAttrib4svNV((GLuint) bswap_CARD32(pc + 0), (const GLshort *) bswap_16_array((uint16_t *) (pc + 4), 4)); } void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) { PFNGLVERTEXATTRIB4UBVNVPROC VertexAttrib4ubvNV = __glGetProcAddress("glVertexAttrib4ubvNV"); VertexAttrib4ubvNV((GLuint) bswap_CARD32(pc + 0), (const GLubyte *) (pc + 4)); } void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1DVNVPROC VertexAttribs1dvNV = __glGetProcAddress("glVertexAttribs1dvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs1dvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1FVNVPROC VertexAttribs1fvNV = __glGetProcAddress("glVertexAttribs1fvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs1fvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS1SVNVPROC VertexAttribs1svNV = __glGetProcAddress("glVertexAttribs1svNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs1svNV((GLuint) bswap_CARD32(pc + 0), n, (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2DVNVPROC VertexAttribs2dvNV = __glGetProcAddress("glVertexAttribs2dvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs2dvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2FVNVPROC VertexAttribs2fvNV = __glGetProcAddress("glVertexAttribs2fvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs2fvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS2SVNVPROC VertexAttribs2svNV = __glGetProcAddress("glVertexAttribs2svNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs2svNV((GLuint) bswap_CARD32(pc + 0), n, (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3DVNVPROC VertexAttribs3dvNV = __glGetProcAddress("glVertexAttribs3dvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs3dvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3FVNVPROC VertexAttribs3fvNV = __glGetProcAddress("glVertexAttribs3fvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs3fvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS3SVNVPROC VertexAttribs3svNV = __glGetProcAddress("glVertexAttribs3svNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs3svNV((GLuint) bswap_CARD32(pc + 0), n, (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4DVNVPROC VertexAttribs4dvNV = __glGetProcAddress("glVertexAttribs4dvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); #ifdef __GLX_ALIGN64 const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4; if ((unsigned long) (pc) & 7) { (void) memmove(pc - 4, pc, cmdlen); pc -= 4; } #endif VertexAttribs4dvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLdouble *) bswap_64_array((uint64_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4FVNVPROC VertexAttribs4fvNV = __glGetProcAddress("glVertexAttribs4fvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs4fvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLfloat *) bswap_32_array((uint32_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4SVNVPROC VertexAttribs4svNV = __glGetProcAddress("glVertexAttribs4svNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs4svNV((GLuint) bswap_CARD32(pc + 0), n, (const GLshort *) bswap_16_array((uint16_t *) (pc + 8), 0)); } void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc) { PFNGLVERTEXATTRIBS4UBVNVPROC VertexAttribs4ubvNV = __glGetProcAddress("glVertexAttribs4ubvNV"); const GLsizei n = (GLsizei) bswap_CARD32(pc + 4); VertexAttribs4ubvNV((GLuint) bswap_CARD32(pc + 0), n, (const GLubyte *) (pc + 8)); } void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) { PFNGLACTIVESTENCILFACEEXTPROC ActiveStencilFaceEXT = __glGetProcAddress("glActiveStencilFaceEXT"); ActiveStencilFaceEXT((GLenum) bswap_ENUM(pc + 0)); } xorg-server-21.1.16/glx/indirect_reqsize.c0000644000175000017500000005212414757411105014140 /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #include #include "glxserver.h" #include "glxbyteorder.h" #include "indirect_size.h" #include "indirect_reqsize.h" #if defined(__CYGWIN__) || defined(__MINGW32__) #undef HAVE_ALIAS #endif #ifdef HAVE_ALIAS #define ALIAS2(from,to) \ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \ __attribute__ ((alias( # to ))); #define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize ) #else #define ALIAS(from,to) \ GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap, int reqlen ) \ { return __glX ## to ## ReqSize( pc, swap, reqlen ); } #endif int __glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 0); GLenum type = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { n = bswap_32(n); type = bswap_32(type); } compsize = __glCallLists_size(type); return safe_pad(safe_mul(compsize, n)); } int __glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLsizei width = *(GLsizei *) (pc + 20); GLsizei height = *(GLsizei *) (pc + 24); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); width = bswap_32(width); height = bswap_32(height); } return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 0); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glFogfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glLightfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 0); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glLightModelfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glMaterialfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); } return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glTexParameterfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 32); GLenum format = *(GLenum *) (pc + 44); GLenum type = *(GLenum *) (pc + 48); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, 1, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 32); GLsizei height = *(GLsizei *) (pc + 36); GLenum format = *(GLenum *) (pc + 44); GLenum type = *(GLenum *) (pc + 48); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); height = bswap_32(height); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, height, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glTexEnvfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glTexGendv_size(pname); return safe_pad(safe_mul(compsize, 8)); } int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glTexGenfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei mapsize = *(GLsizei *) (pc + 4); if (swap) { mapsize = bswap_32(mapsize); } return safe_pad(safe_mul(mapsize, 4)); } int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei mapsize = *(GLsizei *) (pc + 4); if (swap) { mapsize = bswap_32(mapsize); } return safe_pad(safe_mul(mapsize, 2)); } int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLsizei width = *(GLsizei *) (pc + 20); GLsizei height = *(GLsizei *) (pc + 24); GLenum format = *(GLenum *) (pc + 28); GLenum type = *(GLenum *) (pc + 32); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); width = bswap_32(width); height = bswap_32(height); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, 0, width, height, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 0); if (swap) { n = bswap_32(n); } return safe_pad(safe_add(safe_mul(n, 4), safe_mul(n, 4))); } int __glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 36); GLenum format = *(GLenum *) (pc + 44); GLenum type = *(GLenum *) (pc + 48); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, 1, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 36); GLsizei height = *(GLsizei *) (pc + 40); GLenum format = *(GLenum *) (pc + 44); GLenum type = *(GLenum *) (pc + 48); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); height = bswap_32(height); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, height, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 28); GLenum format = *(GLenum *) (pc + 32); GLenum type = *(GLenum *) (pc + 36); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, 1, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glColorTableParameterfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei count = *(GLsizei *) (pc + 28); GLenum format = *(GLenum *) (pc + 32); GLenum type = *(GLenum *) (pc + 36); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); count = bswap_32(count); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, count, 1, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 28); GLenum format = *(GLenum *) (pc + 36); GLenum type = *(GLenum *) (pc + 40); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, 1, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = 0; GLint skip_images = 0; GLint skip_rows = *(GLint *) (pc + 8); GLint alignment = *(GLint *) (pc + 16); GLenum target = *(GLenum *) (pc + 20); GLsizei width = *(GLsizei *) (pc + 28); GLsizei height = *(GLsizei *) (pc + 32); GLenum format = *(GLenum *) (pc + 36); GLenum type = *(GLenum *) (pc + 40); if (swap) { row_length = bswap_32(row_length); skip_rows = bswap_32(skip_rows); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); height = bswap_32(height); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, height, 1, image_height, row_length, skip_images, skip_rows, alignment); } int __glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 4); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glConvolutionParameterfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = *(GLint *) (pc + 8); GLint skip_rows = *(GLint *) (pc + 16); GLint skip_images = *(GLint *) (pc + 20); GLint alignment = *(GLint *) (pc + 32); GLenum target = *(GLenum *) (pc + 36); GLsizei width = *(GLsizei *) (pc + 48); GLsizei height = *(GLsizei *) (pc + 52); GLsizei depth = *(GLsizei *) (pc + 56); GLenum format = *(GLenum *) (pc + 68); GLenum type = *(GLenum *) (pc + 72); if (swap) { row_length = bswap_32(row_length); image_height = bswap_32(image_height); skip_rows = bswap_32(skip_rows); skip_images = bswap_32(skip_images); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); height = bswap_32(height); depth = bswap_32(depth); format = bswap_32(format); type = bswap_32(type); } if (*(CARD32 *) (pc + 76)) return 0; return __glXImageSize(format, type, target, width, height, depth, image_height, row_length, skip_images, skip_rows, alignment); } int __glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLint row_length = *(GLint *) (pc + 4); GLint image_height = *(GLint *) (pc + 8); GLint skip_rows = *(GLint *) (pc + 16); GLint skip_images = *(GLint *) (pc + 20); GLint alignment = *(GLint *) (pc + 32); GLenum target = *(GLenum *) (pc + 36); GLsizei width = *(GLsizei *) (pc + 60); GLsizei height = *(GLsizei *) (pc + 64); GLsizei depth = *(GLsizei *) (pc + 68); GLenum format = *(GLenum *) (pc + 76); GLenum type = *(GLenum *) (pc + 80); if (swap) { row_length = bswap_32(row_length); image_height = bswap_32(image_height); skip_rows = bswap_32(skip_rows); skip_images = bswap_32(skip_images); alignment = bswap_32(alignment); target = bswap_32(target); width = bswap_32(width); height = bswap_32(height); depth = bswap_32(depth); format = bswap_32(format); type = bswap_32(type); } return __glXImageSize(format, type, target, width, height, depth, image_height, row_length, skip_images, skip_rows, alignment); } int __glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei imageSize = *(GLsizei *) (pc + 20); if (swap) { imageSize = bswap_32(imageSize); } return safe_pad(imageSize); } int __glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei imageSize = *(GLsizei *) (pc + 24); if (swap) { imageSize = bswap_32(imageSize); } return safe_pad(imageSize); } int __glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei imageSize = *(GLsizei *) (pc + 28); if (swap) { imageSize = bswap_32(imageSize); } return safe_pad(imageSize); } int __glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei imageSize = *(GLsizei *) (pc + 36); if (swap) { imageSize = bswap_32(imageSize); } return safe_pad(imageSize); } int __glXPointParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum pname = *(GLenum *) (pc + 0); GLsizei compsize; if (swap) { pname = bswap_32(pname); } compsize = __glPointParameterfv_size(pname); return safe_pad(safe_mul(compsize, 4)); } int __glXDrawBuffersReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 0); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 4)); } int __glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei len = *(GLsizei *) (pc + 8); if (swap) { len = bswap_32(len); } return safe_pad(len); } int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 8)); } int __glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 16)); } int __glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 24)); } int __glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 12)); } int __glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 6)); } int __glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLsizei n = *(GLsizei *) (pc + 4); if (swap) { n = bswap_32(n); } return safe_pad(safe_mul(n, 32)); } ALIAS(Fogiv, Fogfv) ALIAS(Lightiv, Lightfv) ALIAS(LightModeliv, LightModelfv) ALIAS(Materialiv, Materialfv) ALIAS(TexParameteriv, TexParameterfv) ALIAS(TexEnviv, TexEnvfv) ALIAS(TexGeniv, TexGenfv) ALIAS(PixelMapuiv, PixelMapfv) ALIAS(ColorTableParameteriv, ColorTableParameterfv) ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) ALIAS(CompressedTexSubImage1D, CompressedTexImage1D) ALIAS(CompressedTexSubImage2D, CompressedTexImage3D) ALIAS(PointParameteriv, PointParameterfv) ALIAS(DeleteFramebuffers, DrawBuffers) ALIAS(DeleteRenderbuffers, DrawBuffers) ALIAS(VertexAttribs1fvNV, PixelMapfv) ALIAS(VertexAttribs1svNV, PixelMapusv) ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV) ALIAS(VertexAttribs2svNV, PixelMapfv) ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV) ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV) ALIAS(VertexAttribs4ubvNV, PixelMapfv) xorg-server-21.1.16/glx/indirect_reqsize.h0000644000175000017500000003040714757411105014145 /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #if !defined( _INDIRECT_REQSIZE_H_ ) #define _INDIRECT_REQSIZE_H_ #include #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) #define PURE __attribute__((pure)) #else #define PURE #endif extern PURE _X_HIDDEN int __glXCallListsReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXBitmapReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXFogfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXFogivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXLightfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXLightivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXLightModelfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXLightModelivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMaterialfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMaterialivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPolygonStippleReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexParameterivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexEnvfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexEnvivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexGendvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexGenfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexGenivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPixelMapfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPixelMapuivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPixelMapusvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXDrawPixelsReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXColorTableReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXColorTableParameterivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXColorSubTableReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexSubImage1DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexSubImage2DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXCompressedTexSubImage3DReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPointParameterfvReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXPointParameterivReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXDrawBuffersReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXProgramStringARBReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXDeleteFramebuffersReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXDeleteRenderbuffersReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte * pc, Bool swap, int reqlen); extern PURE _X_HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte * pc, Bool swap, int reqlen); #undef PURE #endif /* !defined( _INDIRECT_REQSIZE_H_ ) */ xorg-server-21.1.16/glx/indirect_size.h0000644000175000017500000000716614757411105013443 /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2004 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #if !defined( _INDIRECT_SIZE_H_ ) #define _INDIRECT_SIZE_H_ /** * \file * Prototypes for functions used to determine the number of data elements in * various GLX protocol messages. * * \author Ian Romanick */ #include #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) #define PURE __attribute__((pure)) #else #define PURE #endif #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) #define FASTCALL __attribute__((fastcall)) #else #define FASTCALL #endif extern _X_INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glFogiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glLightiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glLightModeliv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMaterialiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexEnviv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexGenfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glTexGeniv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMap1f_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glMap2f_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glColorTableParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glConvolutionParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glPointParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glPointParameteriv_size(GLenum); #undef PURE #undef FASTCALL #endif /* !defined( _INDIRECT_SIZE_H_ ) */ xorg-server-21.1.16/glx/indirect_size_get.c0000644000175000017500000010717114757411105014272 /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2004 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #include #include #include "indirect_size_get.h" #include "glxserver.h" #include "indirect_util.h" #include "indirect_size.h" #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) #define PURE __attribute__((pure)) #else #define PURE #endif #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) #define FASTCALL __attribute__((fastcall)) #else #define FASTCALL #endif #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(GLX_USE_APPLEGL) #undef HAVE_ALIAS #endif #ifdef HAVE_ALIAS #define ALIAS2(from,to) \ _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ __attribute__ ((alias( # to ))); #define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size ) #else #define ALIAS(from,to) \ _X_INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \ { return __gl ## to ## _size( e ); } #endif _X_INTERNAL PURE FASTCALL GLint __glCallLists_size(GLenum e) { switch (e) { case GL_BYTE: case GL_UNSIGNED_BYTE: return 1; case GL_SHORT: case GL_UNSIGNED_SHORT: case GL_2_BYTES: case GL_HALF_FLOAT: return 2; case GL_3_BYTES: return 3; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: case GL_4_BYTES: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glFogfv_size(GLenum e) { switch (e) { case GL_FOG_INDEX: case GL_FOG_DENSITY: case GL_FOG_START: case GL_FOG_END: case GL_FOG_MODE: case GL_FOG_OFFSET_VALUE_SGIX: case GL_FOG_DISTANCE_MODE_NV: return 1; case GL_FOG_COLOR: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glLightfv_size(GLenum e) { switch (e) { case GL_SPOT_EXPONENT: case GL_SPOT_CUTOFF: case GL_CONSTANT_ATTENUATION: case GL_LINEAR_ATTENUATION: case GL_QUADRATIC_ATTENUATION: return 1; case GL_SPOT_DIRECTION: return 3; case GL_AMBIENT: case GL_DIFFUSE: case GL_SPECULAR: case GL_POSITION: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glLightModelfv_size(GLenum e) { switch (e) { case GL_LIGHT_MODEL_LOCAL_VIEWER: case GL_LIGHT_MODEL_TWO_SIDE: case GL_LIGHT_MODEL_COLOR_CONTROL: /* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ return 1; case GL_LIGHT_MODEL_AMBIENT: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glMaterialfv_size(GLenum e) { switch (e) { case GL_SHININESS: return 1; case GL_COLOR_INDEXES: return 3; case GL_AMBIENT: case GL_DIFFUSE: case GL_SPECULAR: case GL_EMISSION: case GL_AMBIENT_AND_DIFFUSE: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glTexParameterfv_size(GLenum e) { switch (e) { case GL_TEXTURE_MAG_FILTER: case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: case GL_TEXTURE_PRIORITY: case GL_TEXTURE_WRAP_R: case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: /* case GL_SHADOW_AMBIENT_SGIX:*/ case GL_TEXTURE_MIN_LOD: case GL_TEXTURE_MAX_LOD: case GL_TEXTURE_BASE_LEVEL: case GL_TEXTURE_MAX_LEVEL: case GL_TEXTURE_CLIPMAP_FRAME_SGIX: case GL_TEXTURE_LOD_BIAS_S_SGIX: case GL_TEXTURE_LOD_BIAS_T_SGIX: case GL_TEXTURE_LOD_BIAS_R_SGIX: case GL_GENERATE_MIPMAP: /* case GL_GENERATE_MIPMAP_SGIS:*/ case GL_TEXTURE_COMPARE_SGIX: case GL_TEXTURE_COMPARE_OPERATOR_SGIX: case GL_TEXTURE_MAX_CLAMP_S_SGIX: case GL_TEXTURE_MAX_CLAMP_T_SGIX: case GL_TEXTURE_MAX_CLAMP_R_SGIX: case GL_TEXTURE_MAX_ANISOTROPY_EXT: case GL_TEXTURE_LOD_BIAS: /* case GL_TEXTURE_LOD_BIAS_EXT:*/ case GL_TEXTURE_STORAGE_HINT_APPLE: case GL_STORAGE_PRIVATE_APPLE: case GL_STORAGE_CACHED_APPLE: case GL_STORAGE_SHARED_APPLE: case GL_DEPTH_TEXTURE_MODE: /* case GL_DEPTH_TEXTURE_MODE_ARB:*/ case GL_TEXTURE_COMPARE_MODE: /* case GL_TEXTURE_COMPARE_MODE_ARB:*/ case GL_TEXTURE_COMPARE_FUNC: /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: return 1; case GL_TEXTURE_CLIPMAP_CENTER_SGIX: case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: return 2; case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: return 3; case GL_TEXTURE_BORDER_COLOR: case GL_POST_TEXTURE_FILTER_BIAS_SGIX: case GL_POST_TEXTURE_FILTER_SCALE_SGIX: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glTexEnvfv_size(GLenum e) { switch (e) { case GL_ALPHA_SCALE: case GL_TEXTURE_ENV_MODE: case GL_TEXTURE_LOD_BIAS: case GL_COMBINE_RGB: case GL_COMBINE_ALPHA: case GL_RGB_SCALE: case GL_SOURCE0_RGB: case GL_SOURCE1_RGB: case GL_SOURCE2_RGB: case GL_SOURCE3_RGB_NV: case GL_SOURCE0_ALPHA: case GL_SOURCE1_ALPHA: case GL_SOURCE2_ALPHA: case GL_SOURCE3_ALPHA_NV: case GL_OPERAND0_RGB: case GL_OPERAND1_RGB: case GL_OPERAND2_RGB: case GL_OPERAND3_RGB_NV: case GL_OPERAND0_ALPHA: case GL_OPERAND1_ALPHA: case GL_OPERAND2_ALPHA: case GL_OPERAND3_ALPHA_NV: case GL_BUMP_TARGET_ATI: case GL_COORD_REPLACE_ARB: /* case GL_COORD_REPLACE_NV:*/ return 1; case GL_TEXTURE_ENV_COLOR: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glTexGendv_size(GLenum e) { switch (e) { case GL_TEXTURE_GEN_MODE: return 1; case GL_OBJECT_PLANE: case GL_EYE_PLANE: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glMap1d_size(GLenum e) { switch (e) { case GL_MAP1_INDEX: case GL_MAP1_TEXTURE_COORD_1: return 1; case GL_MAP1_TEXTURE_COORD_2: return 2; case GL_MAP1_NORMAL: case GL_MAP1_TEXTURE_COORD_3: case GL_MAP1_VERTEX_3: return 3; case GL_MAP1_COLOR_4: case GL_MAP1_TEXTURE_COORD_4: case GL_MAP1_VERTEX_4: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glMap2d_size(GLenum e) { switch (e) { case GL_MAP2_INDEX: case GL_MAP2_TEXTURE_COORD_1: return 1; case GL_MAP2_TEXTURE_COORD_2: return 2; case GL_MAP2_NORMAL: case GL_MAP2_TEXTURE_COORD_3: case GL_MAP2_VERTEX_3: return 3; case GL_MAP2_COLOR_4: case GL_MAP2_TEXTURE_COORD_4: case GL_MAP2_VERTEX_4: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum e) { switch (e) { case GL_CURRENT_INDEX: case GL_CURRENT_RASTER_INDEX: case GL_CURRENT_RASTER_POSITION_VALID: case GL_CURRENT_RASTER_DISTANCE: case GL_POINT_SMOOTH: case GL_POINT_SIZE: case GL_SMOOTH_POINT_SIZE_GRANULARITY: case GL_LINE_SMOOTH: case GL_LINE_WIDTH: case GL_LINE_WIDTH_GRANULARITY: case GL_LINE_STIPPLE: case GL_LINE_STIPPLE_PATTERN: case GL_LINE_STIPPLE_REPEAT: case GL_LIST_MODE: case GL_MAX_LIST_NESTING: case GL_LIST_BASE: case GL_LIST_INDEX: case GL_POLYGON_SMOOTH: case GL_POLYGON_STIPPLE: case GL_EDGE_FLAG: case GL_CULL_FACE: case GL_CULL_FACE_MODE: case GL_FRONT_FACE: case GL_LIGHTING: case GL_LIGHT_MODEL_LOCAL_VIEWER: case GL_LIGHT_MODEL_TWO_SIDE: case GL_SHADE_MODEL: case GL_COLOR_MATERIAL_FACE: case GL_COLOR_MATERIAL_PARAMETER: case GL_COLOR_MATERIAL: case GL_FOG: case GL_FOG_INDEX: case GL_FOG_DENSITY: case GL_FOG_START: case GL_FOG_END: case GL_FOG_MODE: case GL_DEPTH_TEST: case GL_DEPTH_WRITEMASK: case GL_DEPTH_CLEAR_VALUE: case GL_DEPTH_FUNC: case GL_STENCIL_TEST: case GL_STENCIL_CLEAR_VALUE: case GL_STENCIL_FUNC: case GL_STENCIL_VALUE_MASK: case GL_STENCIL_FAIL: case GL_STENCIL_PASS_DEPTH_FAIL: case GL_STENCIL_PASS_DEPTH_PASS: case GL_STENCIL_REF: case GL_STENCIL_WRITEMASK: case GL_MATRIX_MODE: case GL_NORMALIZE: case GL_MODELVIEW_STACK_DEPTH: case GL_PROJECTION_STACK_DEPTH: case GL_TEXTURE_STACK_DEPTH: case GL_ATTRIB_STACK_DEPTH: case GL_CLIENT_ATTRIB_STACK_DEPTH: case GL_ALPHA_TEST: case GL_ALPHA_TEST_FUNC: case GL_ALPHA_TEST_REF: case GL_DITHER: case GL_BLEND_DST: case GL_BLEND_SRC: case GL_BLEND: case GL_LOGIC_OP_MODE: case GL_LOGIC_OP: case GL_AUX_BUFFERS: case GL_DRAW_BUFFER: case GL_READ_BUFFER: case GL_SCISSOR_TEST: case GL_INDEX_CLEAR_VALUE: case GL_INDEX_WRITEMASK: case GL_INDEX_MODE: case GL_RGBA_MODE: case GL_DOUBLEBUFFER: case GL_STEREO: case GL_RENDER_MODE: case GL_PERSPECTIVE_CORRECTION_HINT: case GL_POINT_SMOOTH_HINT: case GL_LINE_SMOOTH_HINT: case GL_POLYGON_SMOOTH_HINT: case GL_FOG_HINT: case GL_TEXTURE_GEN_S: case GL_TEXTURE_GEN_T: case GL_TEXTURE_GEN_R: case GL_TEXTURE_GEN_Q: case GL_PIXEL_MAP_I_TO_I: case GL_PIXEL_MAP_I_TO_I_SIZE: case GL_PIXEL_MAP_S_TO_S_SIZE: case GL_PIXEL_MAP_I_TO_R_SIZE: case GL_PIXEL_MAP_I_TO_G_SIZE: case GL_PIXEL_MAP_I_TO_B_SIZE: case GL_PIXEL_MAP_I_TO_A_SIZE: case GL_PIXEL_MAP_R_TO_R_SIZE: case GL_PIXEL_MAP_G_TO_G_SIZE: case GL_PIXEL_MAP_B_TO_B_SIZE: case GL_PIXEL_MAP_A_TO_A_SIZE: case GL_UNPACK_SWAP_BYTES: case GL_UNPACK_LSB_FIRST: case GL_UNPACK_ROW_LENGTH: case GL_UNPACK_SKIP_ROWS: case GL_UNPACK_SKIP_PIXELS: case GL_UNPACK_ALIGNMENT: case GL_PACK_SWAP_BYTES: case GL_PACK_LSB_FIRST: case GL_PACK_ROW_LENGTH: case GL_PACK_SKIP_ROWS: case GL_PACK_SKIP_PIXELS: case GL_PACK_ALIGNMENT: case GL_MAP_COLOR: case GL_MAP_STENCIL: case GL_INDEX_SHIFT: case GL_INDEX_OFFSET: case GL_RED_SCALE: case GL_RED_BIAS: case GL_ZOOM_X: case GL_ZOOM_Y: case GL_GREEN_SCALE: case GL_GREEN_BIAS: case GL_BLUE_SCALE: case GL_BLUE_BIAS: case GL_ALPHA_SCALE: case GL_ALPHA_BIAS: case GL_DEPTH_SCALE: case GL_DEPTH_BIAS: case GL_MAX_EVAL_ORDER: case GL_MAX_LIGHTS: case GL_MAX_CLIP_PLANES: case GL_MAX_TEXTURE_SIZE: case GL_MAX_PIXEL_MAP_TABLE: case GL_MAX_ATTRIB_STACK_DEPTH: case GL_MAX_MODELVIEW_STACK_DEPTH: case GL_MAX_NAME_STACK_DEPTH: case GL_MAX_PROJECTION_STACK_DEPTH: case GL_MAX_TEXTURE_STACK_DEPTH: case GL_MAX_CLIENT_ATTRIB_STACK_DEPTH: case GL_SUBPIXEL_BITS: case GL_INDEX_BITS: case GL_RED_BITS: case GL_GREEN_BITS: case GL_BLUE_BITS: case GL_ALPHA_BITS: case GL_DEPTH_BITS: case GL_STENCIL_BITS: case GL_ACCUM_RED_BITS: case GL_ACCUM_GREEN_BITS: case GL_ACCUM_BLUE_BITS: case GL_ACCUM_ALPHA_BITS: case GL_NAME_STACK_DEPTH: case GL_AUTO_NORMAL: case GL_MAP1_COLOR_4: case GL_MAP1_INDEX: case GL_MAP1_NORMAL: case GL_MAP1_TEXTURE_COORD_1: case GL_MAP1_TEXTURE_COORD_2: case GL_MAP1_TEXTURE_COORD_3: case GL_MAP1_TEXTURE_COORD_4: case GL_MAP1_VERTEX_3: case GL_MAP1_VERTEX_4: case GL_MAP2_COLOR_4: case GL_MAP2_INDEX: case GL_MAP2_NORMAL: case GL_MAP2_TEXTURE_COORD_1: case GL_MAP2_TEXTURE_COORD_2: case GL_MAP2_TEXTURE_COORD_3: case GL_MAP2_TEXTURE_COORD_4: case GL_MAP2_VERTEX_3: case GL_MAP2_VERTEX_4: case GL_MAP1_GRID_SEGMENTS: case GL_TEXTURE_1D: case GL_TEXTURE_2D: case GL_POLYGON_OFFSET_UNITS: case GL_CLIP_PLANE0: case GL_CLIP_PLANE1: case GL_CLIP_PLANE2: case GL_CLIP_PLANE3: case GL_CLIP_PLANE4: case GL_CLIP_PLANE5: case GL_LIGHT0: case GL_LIGHT1: case GL_LIGHT2: case GL_LIGHT3: case GL_LIGHT4: case GL_LIGHT5: case GL_LIGHT6: case GL_LIGHT7: case GL_BLEND_EQUATION: /* case GL_BLEND_EQUATION_EXT:*/ case GL_CONVOLUTION_1D: case GL_CONVOLUTION_2D: case GL_SEPARABLE_2D: case GL_MAX_CONVOLUTION_WIDTH: /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ case GL_MAX_CONVOLUTION_HEIGHT: /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ case GL_POST_CONVOLUTION_RED_SCALE: /* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ case GL_POST_CONVOLUTION_GREEN_SCALE: /* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ case GL_POST_CONVOLUTION_BLUE_SCALE: /* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ case GL_POST_CONVOLUTION_ALPHA_SCALE: /* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ case GL_POST_CONVOLUTION_RED_BIAS: /* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ case GL_POST_CONVOLUTION_GREEN_BIAS: /* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ case GL_POST_CONVOLUTION_BLUE_BIAS: /* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ case GL_POST_CONVOLUTION_ALPHA_BIAS: /* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ case GL_HISTOGRAM: case GL_MINMAX: case GL_POLYGON_OFFSET_FACTOR: case GL_RESCALE_NORMAL: /* case GL_RESCALE_NORMAL_EXT:*/ case GL_TEXTURE_BINDING_1D: case GL_TEXTURE_BINDING_2D: case GL_TEXTURE_BINDING_3D: case GL_PACK_SKIP_IMAGES: case GL_PACK_IMAGE_HEIGHT: case GL_UNPACK_SKIP_IMAGES: case GL_UNPACK_IMAGE_HEIGHT: case GL_TEXTURE_3D: case GL_MAX_3D_TEXTURE_SIZE: case GL_VERTEX_ARRAY: case GL_NORMAL_ARRAY: case GL_COLOR_ARRAY: case GL_INDEX_ARRAY: case GL_TEXTURE_COORD_ARRAY: case GL_EDGE_FLAG_ARRAY: case GL_VERTEX_ARRAY_SIZE: case GL_VERTEX_ARRAY_TYPE: case GL_VERTEX_ARRAY_STRIDE: case GL_NORMAL_ARRAY_TYPE: case GL_NORMAL_ARRAY_STRIDE: case GL_COLOR_ARRAY_SIZE: case GL_COLOR_ARRAY_TYPE: case GL_COLOR_ARRAY_STRIDE: case GL_INDEX_ARRAY_TYPE: case GL_INDEX_ARRAY_STRIDE: case GL_TEXTURE_COORD_ARRAY_SIZE: case GL_TEXTURE_COORD_ARRAY_TYPE: case GL_TEXTURE_COORD_ARRAY_STRIDE: case GL_EDGE_FLAG_ARRAY_STRIDE: case GL_MULTISAMPLE: /* case GL_MULTISAMPLE_ARB:*/ case GL_SAMPLE_ALPHA_TO_COVERAGE: /* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ case GL_SAMPLE_ALPHA_TO_ONE: /* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ case GL_SAMPLE_COVERAGE: /* case GL_SAMPLE_COVERAGE_ARB:*/ case GL_SAMPLE_BUFFERS: /* case GL_SAMPLE_BUFFERS_ARB:*/ case GL_SAMPLES: /* case GL_SAMPLES_ARB:*/ case GL_SAMPLE_COVERAGE_VALUE: /* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ case GL_SAMPLE_COVERAGE_INVERT: /* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ case GL_COLOR_MATRIX_STACK_DEPTH: case GL_MAX_COLOR_MATRIX_STACK_DEPTH: case GL_POST_COLOR_MATRIX_RED_SCALE: case GL_POST_COLOR_MATRIX_GREEN_SCALE: case GL_POST_COLOR_MATRIX_BLUE_SCALE: case GL_POST_COLOR_MATRIX_ALPHA_SCALE: case GL_POST_COLOR_MATRIX_RED_BIAS: case GL_POST_COLOR_MATRIX_GREEN_BIAS: case GL_POST_COLOR_MATRIX_BLUE_BIAS: case GL_POST_COLOR_MATRIX_ALPHA_BIAS: case GL_BLEND_DST_RGB: case GL_BLEND_SRC_RGB: case GL_BLEND_DST_ALPHA: case GL_BLEND_SRC_ALPHA: case GL_COLOR_TABLE: case GL_POST_CONVOLUTION_COLOR_TABLE: case GL_POST_COLOR_MATRIX_COLOR_TABLE: case GL_MAX_ELEMENTS_VERTICES: case GL_MAX_ELEMENTS_INDICES: case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: case GL_POINT_SIZE_MIN: case GL_POINT_SIZE_MAX: case GL_POINT_FADE_THRESHOLD_SIZE: case GL_OCCLUSION_TEST_HP: case GL_OCCLUSION_TEST_RESULT_HP: case GL_LIGHT_MODEL_COLOR_CONTROL: case GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB: case GL_RESET_NOTIFICATION_STRATEGY_ARB: case GL_CURRENT_FOG_COORD: case GL_FOG_COORDINATE_ARRAY_TYPE: case GL_FOG_COORDINATE_ARRAY_STRIDE: case GL_FOG_COORD_ARRAY: case GL_COLOR_SUM_ARB: case GL_SECONDARY_COLOR_ARRAY_SIZE: case GL_SECONDARY_COLOR_ARRAY_TYPE: case GL_SECONDARY_COLOR_ARRAY_STRIDE: case GL_SECONDARY_COLOR_ARRAY: case GL_ACTIVE_TEXTURE: /* case GL_ACTIVE_TEXTURE_ARB:*/ case GL_CLIENT_ACTIVE_TEXTURE: /* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ case GL_MAX_TEXTURE_UNITS: /* case GL_MAX_TEXTURE_UNITS_ARB:*/ case GL_MAX_RENDERBUFFER_SIZE: /* case GL_MAX_RENDERBUFFER_SIZE_EXT:*/ case GL_TEXTURE_COMPRESSION_HINT: /* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ case GL_TEXTURE_RECTANGLE_ARB: /* case GL_TEXTURE_RECTANGLE_NV:*/ case GL_TEXTURE_BINDING_RECTANGLE_ARB: /* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: /* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ case GL_MAX_TEXTURE_LOD_BIAS: case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: case GL_MAX_SHININESS_NV: case GL_MAX_SPOT_EXPONENT_NV: case GL_TEXTURE_CUBE_MAP: /* case GL_TEXTURE_CUBE_MAP_ARB:*/ case GL_TEXTURE_BINDING_CUBE_MAP: /* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ case GL_MAX_CUBE_MAP_TEXTURE_SIZE: /* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ case GL_MULTISAMPLE_FILTER_HINT_NV: case GL_FOG_DISTANCE_MODE_NV: case GL_VERTEX_PROGRAM_ARB: case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: case GL_MAX_PROGRAM_MATRICES_ARB: case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: case GL_PROGRAM_ERROR_POSITION_ARB: case GL_DEPTH_CLAMP: /* case GL_DEPTH_CLAMP_NV:*/ case GL_NUM_COMPRESSED_TEXTURE_FORMATS: /* case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:*/ case GL_MAX_VERTEX_UNITS_ARB: case GL_ACTIVE_VERTEX_UNITS_ARB: case GL_WEIGHT_SUM_UNITY_ARB: case GL_VERTEX_BLEND_ARB: case GL_CURRENT_WEIGHT_ARB: case GL_WEIGHT_ARRAY_TYPE_ARB: case GL_WEIGHT_ARRAY_STRIDE_ARB: case GL_WEIGHT_ARRAY_SIZE_ARB: case GL_WEIGHT_ARRAY_ARB: case GL_PACK_INVERT_MESA: case GL_STENCIL_BACK_FUNC_ATI: case GL_STENCIL_BACK_FAIL_ATI: case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI: case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI: case GL_FRAGMENT_PROGRAM_ARB: case GL_MAX_DRAW_BUFFERS_ARB: /* case GL_MAX_DRAW_BUFFERS_ATI:*/ case GL_DRAW_BUFFER0_ARB: /* case GL_DRAW_BUFFER0_ATI:*/ case GL_DRAW_BUFFER1_ARB: /* case GL_DRAW_BUFFER1_ATI:*/ case GL_DRAW_BUFFER2_ARB: /* case GL_DRAW_BUFFER2_ATI:*/ case GL_DRAW_BUFFER3_ARB: /* case GL_DRAW_BUFFER3_ATI:*/ case GL_DRAW_BUFFER4_ARB: /* case GL_DRAW_BUFFER4_ATI:*/ case GL_DRAW_BUFFER5_ARB: /* case GL_DRAW_BUFFER5_ATI:*/ case GL_DRAW_BUFFER6_ARB: /* case GL_DRAW_BUFFER6_ATI:*/ case GL_DRAW_BUFFER7_ARB: /* case GL_DRAW_BUFFER7_ATI:*/ case GL_DRAW_BUFFER8_ARB: /* case GL_DRAW_BUFFER8_ATI:*/ case GL_DRAW_BUFFER9_ARB: /* case GL_DRAW_BUFFER9_ATI:*/ case GL_DRAW_BUFFER10_ARB: /* case GL_DRAW_BUFFER10_ATI:*/ case GL_DRAW_BUFFER11_ARB: /* case GL_DRAW_BUFFER11_ATI:*/ case GL_DRAW_BUFFER12_ARB: /* case GL_DRAW_BUFFER12_ATI:*/ case GL_DRAW_BUFFER13_ARB: /* case GL_DRAW_BUFFER13_ATI:*/ case GL_DRAW_BUFFER14_ARB: /* case GL_DRAW_BUFFER14_ATI:*/ case GL_DRAW_BUFFER15_ARB: /* case GL_DRAW_BUFFER15_ATI:*/ case GL_BLEND_EQUATION_ALPHA_EXT: case GL_MATRIX_PALETTE_ARB: case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: case GL_MAX_PALETTE_MATRICES_ARB: case GL_CURRENT_PALETTE_MATRIX_ARB: case GL_MATRIX_INDEX_ARRAY_ARB: case GL_CURRENT_MATRIX_INDEX_ARB: case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: case GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT: case GL_TEXTURE_CUBE_MAP_SEAMLESS: case GL_POINT_SPRITE_ARB: /* case GL_POINT_SPRITE_NV:*/ case GL_POINT_SPRITE_R_MODE_NV: case GL_MAX_VERTEX_ATTRIBS_ARB: case GL_MAX_TEXTURE_COORDS_ARB: case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: case GL_DEPTH_BOUNDS_TEST_EXT: case GL_ARRAY_BUFFER_BINDING_ARB: case GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB: case GL_VERTEX_ARRAY_BUFFER_BINDING_ARB: case GL_NORMAL_ARRAY_BUFFER_BINDING_ARB: case GL_COLOR_ARRAY_BUFFER_BINDING_ARB: case GL_INDEX_ARRAY_BUFFER_BINDING_ARB: case GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB: case GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB: case GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB: case GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB: case GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB: case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT: case GL_STENCIL_TEST_TWO_SIDE_EXT: case GL_ACTIVE_STENCIL_FACE_EXT: case GL_SAMPLER_BINDING: case GL_TEXTURE_BINDING_1D_ARRAY_EXT: case GL_TEXTURE_BINDING_2D_ARRAY_EXT: case GL_FRAMEBUFFER_BINDING: /* case GL_DRAW_FRAMEBUFFER_BINDING_EXT:*/ case GL_RENDERBUFFER_BINDING: /* case GL_RENDERBUFFER_BINDING_EXT:*/ case GL_READ_FRAMEBUFFER_BINDING: /* case GL_READ_FRAMEBUFFER_BINDING_EXT:*/ case GL_MAX_COLOR_ATTACHMENTS: /* case GL_MAX_COLOR_ATTACHMENTS_EXT:*/ case GL_MAX_SAMPLES: /* case GL_MAX_SAMPLES_EXT:*/ case GL_MAX_SERVER_WAIT_TIMEOUT: case GL_MAX_DEBUG_MESSAGE_LENGTH_ARB: case GL_MAX_DEBUG_LOGGED_MESSAGES_ARB: case GL_DEBUG_LOGGED_MESSAGES_ARB: case GL_RASTER_POSITION_UNCLIPPED_IBM: return 1; case GL_SMOOTH_POINT_SIZE_RANGE: case GL_LINE_WIDTH_RANGE: case GL_POLYGON_MODE: case GL_DEPTH_RANGE: case GL_MAX_VIEWPORT_DIMS: case GL_MAP1_GRID_DOMAIN: case GL_MAP2_GRID_SEGMENTS: case GL_ALIASED_POINT_SIZE_RANGE: case GL_ALIASED_LINE_WIDTH_RANGE: case GL_DEPTH_BOUNDS_EXT: return 2; case GL_CURRENT_NORMAL: case GL_POINT_DISTANCE_ATTENUATION: return 3; case GL_CURRENT_COLOR: case GL_CURRENT_TEXTURE_COORDS: case GL_CURRENT_RASTER_COLOR: case GL_CURRENT_RASTER_TEXTURE_COORDS: case GL_CURRENT_RASTER_POSITION: case GL_LIGHT_MODEL_AMBIENT: case GL_FOG_COLOR: case GL_ACCUM_CLEAR_VALUE: case GL_VIEWPORT: case GL_SCISSOR_BOX: case GL_COLOR_CLEAR_VALUE: case GL_COLOR_WRITEMASK: case GL_MAP2_GRID_DOMAIN: case GL_BLEND_COLOR: /* case GL_BLEND_COLOR_EXT:*/ case GL_CURRENT_SECONDARY_COLOR: return 4; case GL_MODELVIEW_MATRIX: case GL_PROJECTION_MATRIX: case GL_TEXTURE_MATRIX: case GL_MODELVIEW0_ARB: case GL_COLOR_MATRIX: case GL_MODELVIEW1_ARB: case GL_CURRENT_MATRIX_ARB: case GL_MODELVIEW2_ARB: case GL_MODELVIEW3_ARB: case GL_MODELVIEW4_ARB: case GL_MODELVIEW5_ARB: case GL_MODELVIEW6_ARB: case GL_MODELVIEW7_ARB: case GL_MODELVIEW8_ARB: case GL_MODELVIEW9_ARB: case GL_MODELVIEW10_ARB: case GL_MODELVIEW11_ARB: case GL_MODELVIEW12_ARB: case GL_MODELVIEW13_ARB: case GL_MODELVIEW14_ARB: case GL_MODELVIEW15_ARB: case GL_MODELVIEW16_ARB: case GL_MODELVIEW17_ARB: case GL_MODELVIEW18_ARB: case GL_MODELVIEW19_ARB: case GL_MODELVIEW20_ARB: case GL_MODELVIEW21_ARB: case GL_MODELVIEW22_ARB: case GL_MODELVIEW23_ARB: case GL_MODELVIEW24_ARB: case GL_MODELVIEW25_ARB: case GL_MODELVIEW26_ARB: case GL_MODELVIEW27_ARB: case GL_MODELVIEW28_ARB: case GL_MODELVIEW29_ARB: case GL_MODELVIEW30_ARB: case GL_MODELVIEW31_ARB: case GL_TRANSPOSE_CURRENT_MATRIX_ARB: return 16; case GL_FOG_COORDINATE_SOURCE: case GL_COMPRESSED_TEXTURE_FORMATS: case GL_RGBA_INTEGER_MODE_EXT: return __glGetBooleanv_variable_size(e); default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum e) { switch (e) { case GL_TEXTURE_MAG_FILTER: case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_WRAP_S: case GL_TEXTURE_WRAP_T: case GL_TEXTURE_PRIORITY: case GL_TEXTURE_RESIDENT: case GL_TEXTURE_WRAP_R: case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: /* case GL_SHADOW_AMBIENT_SGIX:*/ case GL_TEXTURE_MIN_LOD: case GL_TEXTURE_MAX_LOD: case GL_TEXTURE_BASE_LEVEL: case GL_TEXTURE_MAX_LEVEL: case GL_TEXTURE_CLIPMAP_FRAME_SGIX: case GL_TEXTURE_LOD_BIAS_S_SGIX: case GL_TEXTURE_LOD_BIAS_T_SGIX: case GL_TEXTURE_LOD_BIAS_R_SGIX: case GL_GENERATE_MIPMAP: /* case GL_GENERATE_MIPMAP_SGIS:*/ case GL_TEXTURE_COMPARE_SGIX: case GL_TEXTURE_COMPARE_OPERATOR_SGIX: case GL_TEXTURE_MAX_CLAMP_S_SGIX: case GL_TEXTURE_MAX_CLAMP_T_SGIX: case GL_TEXTURE_MAX_CLAMP_R_SGIX: case GL_TEXTURE_MAX_ANISOTROPY_EXT: case GL_TEXTURE_LOD_BIAS: /* case GL_TEXTURE_LOD_BIAS_EXT:*/ case GL_TEXTURE_RANGE_LENGTH_APPLE: case GL_TEXTURE_STORAGE_HINT_APPLE: case GL_DEPTH_TEXTURE_MODE: /* case GL_DEPTH_TEXTURE_MODE_ARB:*/ case GL_TEXTURE_COMPARE_MODE: /* case GL_TEXTURE_COMPARE_MODE_ARB:*/ case GL_TEXTURE_COMPARE_FUNC: /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: return 1; case GL_TEXTURE_CLIPMAP_CENTER_SGIX: case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: return 2; case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: return 3; case GL_TEXTURE_BORDER_COLOR: case GL_POST_TEXTURE_FILTER_BIAS_SGIX: case GL_POST_TEXTURE_FILTER_SCALE_SGIX: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum e) { switch (e) { case GL_TEXTURE_WIDTH: case GL_TEXTURE_HEIGHT: case GL_TEXTURE_COMPONENTS: case GL_TEXTURE_BORDER: case GL_TEXTURE_RED_SIZE: /* case GL_TEXTURE_RED_SIZE_EXT:*/ case GL_TEXTURE_GREEN_SIZE: /* case GL_TEXTURE_GREEN_SIZE_EXT:*/ case GL_TEXTURE_BLUE_SIZE: /* case GL_TEXTURE_BLUE_SIZE_EXT:*/ case GL_TEXTURE_ALPHA_SIZE: /* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ case GL_TEXTURE_LUMINANCE_SIZE: /* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ case GL_TEXTURE_INTENSITY_SIZE: /* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ case GL_TEXTURE_DEPTH: case GL_TEXTURE_INDEX_SIZE_EXT: case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: /* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ case GL_TEXTURE_COMPRESSED: /* case GL_TEXTURE_COMPRESSED_ARB:*/ case GL_TEXTURE_DEPTH_SIZE: /* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ case GL_TEXTURE_STENCIL_SIZE: /* case GL_TEXTURE_STENCIL_SIZE_EXT:*/ return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetPointerv_size(GLenum e) { switch (e) { case GL_DEBUG_CALLBACK_FUNCTION_ARB: case GL_DEBUG_CALLBACK_USER_PARAM_ARB: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glColorTableParameterfv_size(GLenum e) { switch (e) { case GL_COLOR_TABLE_SCALE: case GL_COLOR_TABLE_BIAS: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum e) { switch (e) { case GL_COLOR_TABLE_FORMAT: /* case GL_COLOR_TABLE_FORMAT_EXT:*/ case GL_COLOR_TABLE_WIDTH: /* case GL_COLOR_TABLE_WIDTH_EXT:*/ case GL_COLOR_TABLE_RED_SIZE: /* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ case GL_COLOR_TABLE_GREEN_SIZE: /* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ case GL_COLOR_TABLE_BLUE_SIZE: /* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ case GL_COLOR_TABLE_ALPHA_SIZE: /* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ case GL_COLOR_TABLE_LUMINANCE_SIZE: /* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ case GL_COLOR_TABLE_INTENSITY_SIZE: /* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ return 1; case GL_COLOR_TABLE_SCALE: case GL_COLOR_TABLE_BIAS: return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glConvolutionParameterfv_size(GLenum e) { switch (e) { case GL_CONVOLUTION_BORDER_MODE: /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ return 1; case GL_CONVOLUTION_FILTER_SCALE: /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ case GL_CONVOLUTION_FILTER_BIAS: /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ case GL_CONVOLUTION_BORDER_COLOR: /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum e) { switch (e) { case GL_CONVOLUTION_BORDER_MODE: /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ case GL_CONVOLUTION_FORMAT: /* case GL_CONVOLUTION_FORMAT_EXT:*/ case GL_CONVOLUTION_WIDTH: /* case GL_CONVOLUTION_WIDTH_EXT:*/ case GL_CONVOLUTION_HEIGHT: /* case GL_CONVOLUTION_HEIGHT_EXT:*/ case GL_MAX_CONVOLUTION_WIDTH: /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ case GL_MAX_CONVOLUTION_HEIGHT: /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ return 1; case GL_CONVOLUTION_FILTER_SCALE: /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ case GL_CONVOLUTION_FILTER_BIAS: /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ case GL_CONVOLUTION_BORDER_COLOR: /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ return 4; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum e) { switch (e) { case GL_HISTOGRAM_WIDTH: case GL_HISTOGRAM_FORMAT: case GL_HISTOGRAM_RED_SIZE: case GL_HISTOGRAM_GREEN_SIZE: case GL_HISTOGRAM_BLUE_SIZE: case GL_HISTOGRAM_ALPHA_SIZE: case GL_HISTOGRAM_LUMINANCE_SIZE: case GL_HISTOGRAM_SINK: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum e) { switch (e) { case GL_MINMAX_FORMAT: case GL_MINMAX_SINK: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glPointParameterfv_size(GLenum e) { switch (e) { case GL_POINT_SIZE_MIN: /* case GL_POINT_SIZE_MIN_ARB:*/ /* case GL_POINT_SIZE_MIN_SGIS:*/ case GL_POINT_SIZE_MAX: /* case GL_POINT_SIZE_MAX_ARB:*/ /* case GL_POINT_SIZE_MAX_SGIS:*/ case GL_POINT_FADE_THRESHOLD_SIZE: /* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ /* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ case GL_POINT_SPRITE_R_MODE_NV: case GL_POINT_SPRITE_COORD_ORIGIN: return 1; case GL_POINT_DISTANCE_ATTENUATION: /* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ /* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ return 3; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectiv_size(GLenum e) { switch (e) { case GL_QUERY_RESULT_ARB: case GL_QUERY_RESULT_AVAILABLE_ARB: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetQueryiv_size(GLenum e) { switch (e) { case GL_QUERY_COUNTER_BITS_ARB: case GL_CURRENT_QUERY_ARB: case GL_ANY_SAMPLES_PASSED: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum e) { switch (e) { case GL_PROGRAM_LENGTH_ARB: case GL_PROGRAM_BINDING_ARB: case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: case GL_PROGRAM_TEX_INDIRECTIONS_ARB: case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: case GL_PROGRAM_FORMAT_ARB: case GL_PROGRAM_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: case GL_PROGRAM_TEMPORARIES_ARB: case GL_MAX_PROGRAM_TEMPORARIES_ARB: case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: case GL_PROGRAM_PARAMETERS_ARB: case GL_MAX_PROGRAM_PARAMETERS_ARB: case GL_PROGRAM_NATIVE_PARAMETERS_ARB: case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: case GL_PROGRAM_ATTRIBS_ARB: case GL_MAX_PROGRAM_ATTRIBS_ARB: case GL_PROGRAM_NATIVE_ATTRIBS_ARB: case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: case GL_PROGRAM_ADDRESS_REGISTERS_ARB: case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: case GL_MAX_PROGRAM_CALL_DEPTH_NV: case GL_MAX_PROGRAM_IF_DEPTH_NV: case GL_MAX_PROGRAM_LOOP_DEPTH_NV: case GL_MAX_PROGRAM_LOOP_COUNT_NV: return 1; default: return 0; } } _X_INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameteriv_size(GLenum e) { switch (e) { case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: case GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: /* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT:*/ case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: /* case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT:*/ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: /* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT:*/ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: /* case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT:*/ case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: return 1; default: return 0; } } ALIAS(Fogiv, Fogfv) ALIAS(Lightiv, Lightfv) ALIAS(LightModeliv, LightModelfv) ALIAS(Materialiv, Materialfv) ALIAS(TexParameteriv, TexParameterfv) ALIAS(TexEnviv, TexEnvfv) ALIAS(TexGenfv, TexGendv) ALIAS(TexGeniv, TexGendv) ALIAS(Map1f, Map1d) ALIAS(Map2f, Map2d) ALIAS(GetDoublev, GetBooleanv) ALIAS(GetFloatv, GetBooleanv) ALIAS(GetIntegerv, GetBooleanv) ALIAS(GetLightfv, Lightfv) ALIAS(GetLightiv, Lightfv) ALIAS(GetMaterialfv, Materialfv) ALIAS(GetMaterialiv, Materialfv) ALIAS(GetTexEnvfv, TexEnvfv) ALIAS(GetTexEnviv, TexEnvfv) ALIAS(GetTexGendv, TexGendv) ALIAS(GetTexGenfv, TexGendv) ALIAS(GetTexGeniv, TexGendv) ALIAS(GetTexParameteriv, GetTexParameterfv) ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) ALIAS(ColorTableParameteriv, ColorTableParameterfv) ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) ALIAS(PointParameteriv, PointParameterfv) ALIAS(GetQueryObjectuiv, GetQueryObjectiv) #undef PURE #undef FASTCALL xorg-server-21.1.16/glx/indirect_size_get.h0000644000175000017500000001023614757411105014272 /* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2004 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #if !defined( _INDIRECT_SIZE_GET_H_ ) #define _INDIRECT_SIZE_GET_H_ /** * \file * Prototypes for functions used to determine the number of data elements in * various GLX protocol messages. * * \author Ian Romanick */ #include #if defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) #define PURE __attribute__((pure)) #else #define PURE #endif #if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__) #define FASTCALL __attribute__((fastcall)) #else #define FASTCALL #endif extern _X_INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetPointerv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryObjectuiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetQueryiv_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum); extern _X_INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameteriv_size(GLenum); #undef PURE #undef FASTCALL #endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */ xorg-server-21.1.16/glx/indirect_table.c0000644000175000017500000022454314757411105013553 /* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ /* * (C) Copyright IBM Corporation 2005, 2006 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #include #include "glxserver.h" #include "glxext.h" #include "indirect_dispatch.h" #include "indirect_reqsize.h" #include "indirect_table.h" /*****************************************************************/ /* tree depth = 3 */ static const int_fast16_t Single_dispatch_tree[24] = { /* [0] -> opcode range [0, 256], node depth 1 */ 2, 5, 13, 16, EMPTY_LEAF, /* [5] -> opcode range [0, 64], node depth 2 */ 2, LEAF(0), LEAF(16), 10, EMPTY_LEAF, /* [10] -> opcode range [32, 48], node depth 3 */ 1, LEAF(32), EMPTY_LEAF, /* [13] -> opcode range [64, 128], node depth 2 */ 1, EMPTY_LEAF, LEAF(40), /* [16] -> opcode range [128, 192], node depth 2 */ 2, LEAF(72), LEAF(88), 21, EMPTY_LEAF, /* [21] -> opcode range [160, 176], node depth 3 */ 1, LEAF(104), EMPTY_LEAF, }; static const void *Single_function_table[112][2] = { /* [ 0] = 0 */ {NULL, NULL}, /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, /* [ 33] = 33 */ {__glXDisp_SetClientInfoARB, __glXDispSwap_SetClientInfoARB}, /* [ 34] = 34 */ {__glXDisp_CreateContextAttribsARB, __glXDispSwap_CreateContextAttribsARB}, /* [ 35] = 35 */ {__glXDisp_SetClientInfo2ARB, __glXDispSwap_SetClientInfo2ARB}, /* [ 36] = 36 */ {NULL, NULL}, /* [ 37] = 37 */ {NULL, NULL}, /* [ 38] = 38 */ {NULL, NULL}, /* [ 39] = 39 */ {NULL, NULL}, /* [ 40] = 96 */ {NULL, NULL}, /* [ 41] = 97 */ {NULL, NULL}, /* [ 42] = 98 */ {NULL, NULL}, /* [ 43] = 99 */ {NULL, NULL}, /* [ 44] = 100 */ {NULL, NULL}, /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImage, __glXDispSwap_GetCompressedTexImage}, /* [ 105] = 161 */ {__glXDisp_DeleteQueries, __glXDispSwap_DeleteQueries}, /* [ 106] = 162 */ {__glXDisp_GenQueries, __glXDispSwap_GenQueries}, /* [ 107] = 163 */ {__glXDisp_IsQuery, __glXDispSwap_IsQuery}, /* [ 108] = 164 */ {__glXDisp_GetQueryiv, __glXDispSwap_GetQueryiv}, /* [ 109] = 165 */ {__glXDisp_GetQueryObjectiv, __glXDispSwap_GetQueryObjectiv}, /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuiv, __glXDispSwap_GetQueryObjectuiv}, /* [ 111] = 167 */ {NULL, NULL}, }; const struct __glXDispatchInfo Single_dispatch_info = { 8, Single_dispatch_tree, Single_function_table, NULL, NULL }; /*****************************************************************/ /* tree depth = 8 */ static const int_fast16_t Render_dispatch_tree[92] = { /* [0] -> opcode range [0, 8192], node depth 1 */ 2, 5, 31, 54, EMPTY_LEAF, /* [5] -> opcode range [0, 2048], node depth 2 */ 1, 8, EMPTY_LEAF, /* [8] -> opcode range [0, 1024], node depth 3 */ 1, 11, EMPTY_LEAF, /* [11] -> opcode range [0, 512], node depth 4 */ 1, 14, EMPTY_LEAF, /* [14] -> opcode range [0, 256], node depth 5 */ 4, LEAF(0), LEAF(16), LEAF(32), LEAF(48), LEAF(64), LEAF(80), LEAF(96), LEAF(112), LEAF(128), LEAF(144), LEAF(160), LEAF(176), LEAF(192), LEAF(208), LEAF(224), EMPTY_LEAF, /* [31] -> opcode range [2048, 4096], node depth 2 */ 1, 34, EMPTY_LEAF, /* [34] -> opcode range [2048, 3072], node depth 3 */ 1, 37, EMPTY_LEAF, /* [37] -> opcode range [2048, 2560], node depth 4 */ 1, 40, EMPTY_LEAF, /* [40] -> opcode range [2048, 2304], node depth 5 */ 1, 43, EMPTY_LEAF, /* [43] -> opcode range [2048, 2176], node depth 6 */ 1, 46, EMPTY_LEAF, /* [46] -> opcode range [2048, 2112], node depth 7 */ 1, 49, EMPTY_LEAF, /* [49] -> opcode range [2048, 2080], node depth 8 */ 2, LEAF(240), LEAF(248), LEAF(256), EMPTY_LEAF, /* [54] -> opcode range [4096, 6144], node depth 2 */ 1, 57, EMPTY_LEAF, /* [57] -> opcode range [4096, 5120], node depth 3 */ 1, 60, EMPTY_LEAF, /* [60] -> opcode range [4096, 4608], node depth 4 */ 1, 63, EMPTY_LEAF, /* [63] -> opcode range [4096, 4352], node depth 5 */ 4, LEAF(264), LEAF(280), 80, EMPTY_LEAF, EMPTY_LEAF, LEAF(296), LEAF(312), LEAF(328), LEAF(344), EMPTY_LEAF, 83, 86, EMPTY_LEAF, 89, LEAF(360), EMPTY_LEAF, /* [80] -> opcode range [4128, 4144], node depth 6 */ 1, LEAF(376), EMPTY_LEAF, /* [83] -> opcode range [4256, 4272], node depth 6 */ 1, EMPTY_LEAF, LEAF(384), /* [86] -> opcode range [4272, 4288], node depth 6 */ 1, LEAF(392), EMPTY_LEAF, /* [89] -> opcode range [4304, 4320], node depth 6 */ 1, EMPTY_LEAF, LEAF(400), }; static const void *Render_function_table[408][2] = { /* [ 0] = 0 */ {NULL, NULL}, /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, /* [ 140] = 140 */ {NULL, NULL}, /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, /* [ 197] = 197 */ {__glXDisp_ActiveTexture, __glXDispSwap_ActiveTexture}, /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dv, __glXDispSwap_MultiTexCoord1dv}, /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1iv, __glXDispSwap_MultiTexCoord1iv}, /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1sv, __glXDispSwap_MultiTexCoord1sv}, /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dv, __glXDispSwap_MultiTexCoord2dv}, /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2iv, __glXDispSwap_MultiTexCoord2iv}, /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2sv, __glXDispSwap_MultiTexCoord2sv}, /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dv, __glXDispSwap_MultiTexCoord3dv}, /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3iv, __glXDispSwap_MultiTexCoord3iv}, /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3sv, __glXDispSwap_MultiTexCoord3sv}, /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dv, __glXDispSwap_MultiTexCoord4dv}, /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4iv, __glXDispSwap_MultiTexCoord4iv}, /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4sv, __glXDispSwap_MultiTexCoord4sv}, /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1D, __glXDispSwap_CompressedTexImage1D}, /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2D, __glXDispSwap_CompressedTexImage2D}, /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3D, __glXDispSwap_CompressedTexImage3D}, /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1D, __glXDispSwap_CompressedTexSubImage1D}, /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2D, __glXDispSwap_CompressedTexSubImage2D}, /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3D, __glXDispSwap_CompressedTexSubImage3D}, /* [ 220] = 220 */ {NULL, NULL}, /* [ 221] = 221 */ {NULL, NULL}, /* [ 222] = 222 */ {NULL, NULL}, /* [ 223] = 223 */ {NULL, NULL}, /* [ 224] = 224 */ {NULL, NULL}, /* [ 225] = 225 */ {NULL, NULL}, /* [ 226] = 226 */ {NULL, NULL}, /* [ 227] = 227 */ {NULL, NULL}, /* [ 228] = 228 */ {NULL, NULL}, /* [ 229] = 229 */ {__glXDisp_SampleCoverage, __glXDispSwap_SampleCoverage}, /* [ 230] = 230 */ {__glXDisp_WindowPos3fv, __glXDispSwap_WindowPos3fv}, /* [ 231] = 231 */ {__glXDisp_BeginQuery, __glXDispSwap_BeginQuery}, /* [ 232] = 232 */ {__glXDisp_EndQuery, __glXDispSwap_EndQuery}, /* [ 233] = 233 */ {__glXDisp_DrawBuffers, __glXDispSwap_DrawBuffers}, /* [ 234] = 234 */ {__glXDisp_ClampColor, __glXDispSwap_ClampColor}, /* [ 235] = 235 */ {NULL, NULL}, /* [ 236] = 236 */ {NULL, NULL}, /* [ 237] = 237 */ {__glXDisp_FramebufferTextureLayer, __glXDispSwap_FramebufferTextureLayer}, /* [ 238] = 238 */ {NULL, NULL}, /* [ 239] = 239 */ {NULL, NULL}, /* [ 240] = 2048 */ {NULL, NULL}, /* [ 241] = 2049 */ {NULL, NULL}, /* [ 242] = 2050 */ {NULL, NULL}, /* [ 243] = 2051 */ {NULL, NULL}, /* [ 244] = 2052 */ {NULL, NULL}, /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, /* [ 249] = 2057 */ {NULL, NULL}, /* [ 250] = 2058 */ {NULL, NULL}, /* [ 251] = 2059 */ {NULL, NULL}, /* [ 252] = 2060 */ {NULL, NULL}, /* [ 253] = 2061 */ {NULL, NULL}, /* [ 254] = 2062 */ {NULL, NULL}, /* [ 255] = 2063 */ {NULL, NULL}, /* [ 256] = 2064 */ {NULL, NULL}, /* [ 257] = 2065 */ {__glXDisp_PointParameterf, __glXDispSwap_PointParameterf}, /* [ 258] = 2066 */ {__glXDisp_PointParameterfv, __glXDispSwap_PointParameterfv}, /* [ 259] = 2067 */ {NULL, NULL}, /* [ 260] = 2068 */ {NULL, NULL}, /* [ 261] = 2069 */ {NULL, NULL}, /* [ 262] = 2070 */ {NULL, NULL}, /* [ 263] = 2071 */ {NULL, NULL}, /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, /* [ 266] = 4098 */ {NULL, NULL}, /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, /* [ 284] = 4116 */ {NULL, NULL}, /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, /* [ 293] = 4125 */ {__glXDisp_FogCoorddv, __glXDispSwap_FogCoorddv}, /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bv, __glXDispSwap_SecondaryColor3bv}, /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3sv, __glXDispSwap_SecondaryColor3sv}, /* [ 296] = 4176 */ {NULL, NULL}, /* [ 297] = 4177 */ {NULL, NULL}, /* [ 298] = 4178 */ {NULL, NULL}, /* [ 299] = 4179 */ {NULL, NULL}, /* [ 300] = 4180 */ {__glXDisp_BindProgramARB, __glXDispSwap_BindProgramARB}, /* [ 301] = 4181 */ {NULL, NULL}, /* [ 302] = 4182 */ {NULL, NULL}, /* [ 303] = 4183 */ {NULL, NULL}, /* [ 304] = 4184 */ {__glXDisp_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB}, /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, /* [ 306] = 4186 */ {NULL, NULL}, /* [ 307] = 4187 */ {NULL, NULL}, /* [ 308] = 4188 */ {NULL, NULL}, /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1sv, __glXDispSwap_VertexAttrib1sv}, /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2sv, __glXDispSwap_VertexAttrib2sv}, /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3sv, __glXDispSwap_VertexAttrib3sv}, /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4sv, __glXDispSwap_VertexAttrib4sv}, /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dv, __glXDispSwap_VertexAttrib1dv}, /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dv, __glXDispSwap_VertexAttrib2dv}, /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dv, __glXDispSwap_VertexAttrib3dv}, /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dv, __glXDispSwap_VertexAttrib4dv}, /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4Nubv, __glXDispSwap_VertexAttrib4Nubv}, /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, /* [ 338] = 4218 */ {NULL, NULL}, /* [ 339] = 4219 */ {NULL, NULL}, /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, /* [ 341] = 4221 */ {__glXDisp_PointParameteri, __glXDispSwap_PointParameteri}, /* [ 342] = 4222 */ {__glXDisp_PointParameteriv, __glXDispSwap_PointParameteriv}, /* [ 343] = 4223 */ {NULL, NULL}, /* [ 344] = 4224 */ {NULL, NULL}, /* [ 345] = 4225 */ {NULL, NULL}, /* [ 346] = 4226 */ {NULL, NULL}, /* [ 347] = 4227 */ {NULL, NULL}, /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparate, __glXDispSwap_BlendEquationSeparate}, /* [ 349] = 4229 */ {NULL, NULL}, /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bv, __glXDispSwap_VertexAttrib4bv}, /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4iv, __glXDispSwap_VertexAttrib4iv}, /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubv, __glXDispSwap_VertexAttrib4ubv}, /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usv, __glXDispSwap_VertexAttrib4usv}, /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uiv, __glXDispSwap_VertexAttrib4uiv}, /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4Nbv, __glXDispSwap_VertexAttrib4Nbv}, /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4Nsv, __glXDispSwap_VertexAttrib4Nsv}, /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4Niv, __glXDispSwap_VertexAttrib4Niv}, /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4Nusv, __glXDispSwap_VertexAttrib4Nusv}, /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4Nuiv, __glXDispSwap_VertexAttrib4Nuiv}, /* [ 360] = 4320 */ {__glXDisp_DeleteFramebuffers, __glXDispSwap_DeleteFramebuffers}, /* [ 361] = 4321 */ {__glXDisp_FramebufferTexture1D, __glXDispSwap_FramebufferTexture1D}, /* [ 362] = 4322 */ {__glXDisp_FramebufferTexture2D, __glXDispSwap_FramebufferTexture2D}, /* [ 363] = 4323 */ {__glXDisp_FramebufferTexture3D, __glXDispSwap_FramebufferTexture3D}, /* [ 364] = 4324 */ {__glXDisp_FramebufferRenderbuffer, __glXDispSwap_FramebufferRenderbuffer}, /* [ 365] = 4325 */ {__glXDisp_GenerateMipmap, __glXDispSwap_GenerateMipmap}, /* [ 366] = 4326 */ {NULL, NULL}, /* [ 367] = 4327 */ {NULL, NULL}, /* [ 368] = 4328 */ {NULL, NULL}, /* [ 369] = 4329 */ {NULL, NULL}, /* [ 370] = 4330 */ {__glXDisp_BlitFramebuffer, __glXDispSwap_BlitFramebuffer}, /* [ 371] = 4331 */ {__glXDisp_RenderbufferStorageMultisample, __glXDispSwap_RenderbufferStorageMultisample}, /* [ 372] = 4332 */ {NULL, NULL}, /* [ 373] = 4333 */ {NULL, NULL}, /* [ 374] = 4334 */ {NULL, NULL}, /* [ 375] = 4335 */ {NULL, NULL}, /* [ 376] = 4128 */ {__glXDisp_SecondaryColor3iv, __glXDispSwap_SecondaryColor3iv}, /* [ 377] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, /* [ 378] = 4130 */ {__glXDisp_SecondaryColor3dv, __glXDispSwap_SecondaryColor3dv}, /* [ 379] = 4131 */ {__glXDisp_SecondaryColor3ubv, __glXDispSwap_SecondaryColor3ubv}, /* [ 380] = 4132 */ {__glXDisp_SecondaryColor3usv, __glXDispSwap_SecondaryColor3usv}, /* [ 381] = 4133 */ {__glXDisp_SecondaryColor3uiv, __glXDispSwap_SecondaryColor3uiv}, /* [ 382] = 4134 */ {__glXDisp_BlendFuncSeparate, __glXDispSwap_BlendFuncSeparate}, /* [ 383] = 4135 */ {NULL, NULL}, /* [ 384] = 4264 */ {NULL, NULL}, /* [ 385] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, /* [ 386] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, /* [ 387] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, /* [ 388] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, /* [ 389] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, /* [ 390] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, /* [ 391] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, /* [ 392] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, /* [ 393] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, /* [ 394] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, /* [ 395] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, /* [ 396] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, /* [ 397] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, /* [ 398] = 4278 */ {NULL, NULL}, /* [ 399] = 4279 */ {NULL, NULL}, /* [ 400] = 4312 */ {NULL, NULL}, /* [ 401] = 4313 */ {NULL, NULL}, /* [ 402] = 4314 */ {NULL, NULL}, /* [ 403] = 4315 */ {NULL, NULL}, /* [ 404] = 4316 */ {__glXDisp_BindRenderbuffer, __glXDispSwap_BindRenderbuffer}, /* [ 405] = 4317 */ {__glXDisp_DeleteRenderbuffers, __glXDispSwap_DeleteRenderbuffers}, /* [ 406] = 4318 */ {__glXDisp_RenderbufferStorage, __glXDispSwap_RenderbufferStorage}, /* [ 407] = 4319 */ {__glXDisp_BindFramebuffer, __glXDispSwap_BindFramebuffer}, }; static const int_fast16_t Render_size_table[408][2] = { /* [ 0] = 0 */ {0, ~0}, /* [ 1] = 1 */ {8, ~0}, /* [ 2] = 2 */ {12, 0}, /* [ 3] = 3 */ {8, ~0}, /* [ 4] = 4 */ {8, ~0}, /* [ 5] = 5 */ {48, 1}, /* [ 6] = 6 */ {8, ~0}, /* [ 7] = 7 */ {28, ~0}, /* [ 8] = 8 */ {16, ~0}, /* [ 9] = 9 */ {16, ~0}, /* [ 10] = 10 */ {12, ~0}, /* [ 11] = 11 */ {8, ~0}, /* [ 12] = 12 */ {16, ~0}, /* [ 13] = 13 */ {12, ~0}, /* [ 14] = 14 */ {8, ~0}, /* [ 15] = 15 */ {36, ~0}, /* [ 16] = 16 */ {20, ~0}, /* [ 17] = 17 */ {20, ~0}, /* [ 18] = 18 */ {12, ~0}, /* [ 19] = 19 */ {8, ~0}, /* [ 20] = 20 */ {20, ~0}, /* [ 21] = 21 */ {12, ~0}, /* [ 22] = 22 */ {8, ~0}, /* [ 23] = 23 */ {4, ~0}, /* [ 24] = 24 */ {12, ~0}, /* [ 25] = 25 */ {8, ~0}, /* [ 26] = 26 */ {8, ~0}, /* [ 27] = 27 */ {8, ~0}, /* [ 28] = 28 */ {8, ~0}, /* [ 29] = 29 */ {28, ~0}, /* [ 30] = 30 */ {16, ~0}, /* [ 31] = 31 */ {16, ~0}, /* [ 32] = 32 */ {12, ~0}, /* [ 33] = 33 */ {20, ~0}, /* [ 34] = 34 */ {12, ~0}, /* [ 35] = 35 */ {12, ~0}, /* [ 36] = 36 */ {8, ~0}, /* [ 37] = 37 */ {28, ~0}, /* [ 38] = 38 */ {16, ~0}, /* [ 39] = 39 */ {16, ~0}, /* [ 40] = 40 */ {12, ~0}, /* [ 41] = 41 */ {36, ~0}, /* [ 42] = 42 */ {20, ~0}, /* [ 43] = 43 */ {20, ~0}, /* [ 44] = 44 */ {12, ~0}, /* [ 45] = 45 */ {36, ~0}, /* [ 46] = 46 */ {20, ~0}, /* [ 47] = 47 */ {20, ~0}, /* [ 48] = 48 */ {12, ~0}, /* [ 49] = 49 */ {12, ~0}, /* [ 50] = 50 */ {8, ~0}, /* [ 51] = 51 */ {8, ~0}, /* [ 52] = 52 */ {8, ~0}, /* [ 53] = 53 */ {20, ~0}, /* [ 54] = 54 */ {12, ~0}, /* [ 55] = 55 */ {12, ~0}, /* [ 56] = 56 */ {8, ~0}, /* [ 57] = 57 */ {28, ~0}, /* [ 58] = 58 */ {16, ~0}, /* [ 59] = 59 */ {16, ~0}, /* [ 60] = 60 */ {12, ~0}, /* [ 61] = 61 */ {36, ~0}, /* [ 62] = 62 */ {20, ~0}, /* [ 63] = 63 */ {20, ~0}, /* [ 64] = 64 */ {12, ~0}, /* [ 65] = 65 */ {20, ~0}, /* [ 66] = 66 */ {12, ~0}, /* [ 67] = 67 */ {12, ~0}, /* [ 68] = 68 */ {8, ~0}, /* [ 69] = 69 */ {28, ~0}, /* [ 70] = 70 */ {16, ~0}, /* [ 71] = 71 */ {16, ~0}, /* [ 72] = 72 */ {12, ~0}, /* [ 73] = 73 */ {36, ~0}, /* [ 74] = 74 */ {20, ~0}, /* [ 75] = 75 */ {20, ~0}, /* [ 76] = 76 */ {12, ~0}, /* [ 77] = 77 */ {40, ~0}, /* [ 78] = 78 */ {12, ~0}, /* [ 79] = 79 */ {8, ~0}, /* [ 80] = 80 */ {12, ~0}, /* [ 81] = 81 */ {8, 2}, /* [ 82] = 82 */ {12, ~0}, /* [ 83] = 83 */ {8, 3}, /* [ 84] = 84 */ {8, ~0}, /* [ 85] = 85 */ {12, ~0}, /* [ 86] = 86 */ {16, ~0}, /* [ 87] = 87 */ {12, 4}, /* [ 88] = 88 */ {16, ~0}, /* [ 89] = 89 */ {12, 5}, /* [ 90] = 90 */ {12, ~0}, /* [ 91] = 91 */ {8, 6}, /* [ 92] = 92 */ {12, ~0}, /* [ 93] = 93 */ {8, 7}, /* [ 94] = 94 */ {12, ~0}, /* [ 95] = 95 */ {8, ~0}, /* [ 96] = 96 */ {16, ~0}, /* [ 97] = 97 */ {12, 8}, /* [ 98] = 98 */ {16, ~0}, /* [ 99] = 99 */ {12, 9}, /* [100] = 100 */ {8, ~0}, /* [101] = 101 */ {12, ~0}, /* [102] = 102 */ {24, 10}, /* [103] = 103 */ {20, ~0}, /* [104] = 104 */ {8, ~0}, /* [105] = 105 */ {16, ~0}, /* [106] = 106 */ {12, 11}, /* [107] = 107 */ {16, ~0}, /* [108] = 108 */ {12, 12}, /* [109] = 109 */ {56, 13}, /* [110] = 110 */ {56, 14}, /* [111] = 111 */ {16, ~0}, /* [112] = 112 */ {12, 15}, /* [113] = 113 */ {16, ~0}, /* [114] = 114 */ {12, 16}, /* [115] = 115 */ {20, ~0}, /* [116] = 116 */ {12, 17}, /* [117] = 117 */ {16, ~0}, /* [118] = 118 */ {12, 18}, /* [119] = 119 */ {16, ~0}, /* [120] = 120 */ {12, 19}, /* [121] = 121 */ {4, ~0}, /* [122] = 122 */ {8, ~0}, /* [123] = 123 */ {8, ~0}, /* [124] = 124 */ {4, ~0}, /* [125] = 125 */ {8, ~0}, /* [126] = 126 */ {8, ~0}, /* [127] = 127 */ {8, ~0}, /* [128] = 128 */ {20, ~0}, /* [129] = 129 */ {8, ~0}, /* [130] = 130 */ {20, ~0}, /* [131] = 131 */ {8, ~0}, /* [132] = 132 */ {12, ~0}, /* [133] = 133 */ {8, ~0}, /* [134] = 134 */ {8, ~0}, /* [135] = 135 */ {8, ~0}, /* [136] = 136 */ {8, ~0}, /* [137] = 137 */ {12, ~0}, /* [138] = 138 */ {8, ~0}, /* [139] = 139 */ {8, ~0}, /* [140] = 140 */ {0, ~0}, /* [141] = 141 */ {4, ~0}, /* [142] = 142 */ {8, ~0}, /* [143] = 143 */ {28, 20}, /* [144] = 144 */ {20, 21}, /* [145] = 145 */ {48, 22}, /* [146] = 146 */ {32, 23}, /* [147] = 147 */ {24, ~0}, /* [148] = 148 */ {16, ~0}, /* [149] = 149 */ {44, ~0}, /* [150] = 150 */ {28, ~0}, /* [151] = 151 */ {12, ~0}, /* [152] = 152 */ {8, ~0}, /* [153] = 153 */ {20, ~0}, /* [154] = 154 */ {12, ~0}, /* [155] = 155 */ {16, ~0}, /* [156] = 156 */ {8, ~0}, /* [157] = 157 */ {24, ~0}, /* [158] = 158 */ {12, ~0}, /* [159] = 159 */ {12, ~0}, /* [160] = 160 */ {12, ~0}, /* [161] = 161 */ {8, ~0}, /* [162] = 162 */ {16, ~0}, /* [163] = 163 */ {16, ~0}, /* [164] = 164 */ {8, ~0}, /* [165] = 165 */ {12, ~0}, /* [166] = 166 */ {12, ~0}, /* [167] = 167 */ {12, ~0}, /* [168] = 168 */ {12, 24}, /* [169] = 169 */ {12, 25}, /* [170] = 170 */ {12, 26}, /* [171] = 171 */ {8, ~0}, /* [172] = 172 */ {24, ~0}, /* [173] = 173 */ {40, 27}, /* [174] = 174 */ {20, ~0}, /* [175] = 175 */ {52, ~0}, /* [176] = 176 */ {4, ~0}, /* [177] = 177 */ {68, ~0}, /* [178] = 178 */ {132, ~0}, /* [179] = 179 */ {8, ~0}, /* [180] = 180 */ {68, ~0}, /* [181] = 181 */ {132, ~0}, /* [182] = 182 */ {52, ~0}, /* [183] = 183 */ {4, ~0}, /* [184] = 184 */ {4, ~0}, /* [185] = 185 */ {36, ~0}, /* [186] = 186 */ {20, ~0}, /* [187] = 187 */ {28, ~0}, /* [188] = 188 */ {16, ~0}, /* [189] = 189 */ {28, ~0}, /* [190] = 190 */ {16, ~0}, /* [191] = 191 */ {20, ~0}, /* [192] = 192 */ {12, ~0}, /* [193] = 193 */ {16, 28}, /* [194] = 194 */ {8, ~0}, /* [195] = 195 */ {44, 29}, /* [196] = 196 */ {24, ~0}, /* [197] = 197 */ {8, ~0}, /* [198] = 198 */ {16, ~0}, /* [199] = 199 */ {12, ~0}, /* [200] = 200 */ {12, ~0}, /* [201] = 201 */ {12, ~0}, /* [202] = 202 */ {24, ~0}, /* [203] = 203 */ {16, ~0}, /* [204] = 204 */ {16, ~0}, /* [205] = 205 */ {12, ~0}, /* [206] = 206 */ {32, ~0}, /* [207] = 207 */ {20, ~0}, /* [208] = 208 */ {20, ~0}, /* [209] = 209 */ {16, ~0}, /* [210] = 210 */ {40, ~0}, /* [211] = 211 */ {24, ~0}, /* [212] = 212 */ {24, ~0}, /* [213] = 213 */ {16, ~0}, /* [214] = 214 */ {28, 30}, /* [215] = 215 */ {32, 31}, /* [216] = 216 */ {36, 32}, /* [217] = 217 */ {28, 33}, /* [218] = 218 */ {36, 34}, /* [219] = 219 */ {44, 35}, /* [220] = 220 */ {0, ~0}, /* [221] = 221 */ {0, ~0}, /* [222] = 222 */ {0, ~0}, /* [223] = 223 */ {0, ~0}, /* [224] = 224 */ {0, ~0}, /* [225] = 225 */ {0, ~0}, /* [226] = 226 */ {0, ~0}, /* [227] = 227 */ {0, ~0}, /* [228] = 228 */ {0, ~0}, /* [229] = 229 */ {12, ~0}, /* [230] = 230 */ {16, ~0}, /* [231] = 231 */ {12, ~0}, /* [232] = 232 */ {8, ~0}, /* [233] = 233 */ {8, 36}, /* [234] = 234 */ {12, ~0}, /* [235] = 235 */ {0, ~0}, /* [236] = 236 */ {0, ~0}, /* [237] = 237 */ {24, ~0}, /* [238] = 238 */ {0, ~0}, /* [239] = 239 */ {0, ~0}, /* [240] = 2048 */ {0, ~0}, /* [241] = 2049 */ {0, ~0}, /* [242] = 2050 */ {0, ~0}, /* [243] = 2051 */ {0, ~0}, /* [244] = 2052 */ {0, ~0}, /* [245] = 2053 */ {44, 37}, /* [246] = 2054 */ {12, 38}, /* [247] = 2055 */ {12, 39}, /* [248] = 2056 */ {24, ~0}, /* [249] = 2057 */ {0, ~0}, /* [250] = 2058 */ {0, ~0}, /* [251] = 2059 */ {0, ~0}, /* [252] = 2060 */ {0, ~0}, /* [253] = 2061 */ {0, ~0}, /* [254] = 2062 */ {0, ~0}, /* [255] = 2063 */ {0, ~0}, /* [256] = 2064 */ {0, ~0}, /* [257] = 2065 */ {12, ~0}, /* [258] = 2066 */ {8, 40}, /* [259] = 2067 */ {0, ~0}, /* [260] = 2068 */ {0, ~0}, /* [261] = 2069 */ {0, ~0}, /* [262] = 2070 */ {0, ~0}, /* [263] = 2071 */ {0, ~0}, /* [264] = 4096 */ {20, ~0}, /* [265] = 4097 */ {8, ~0}, /* [266] = 4098 */ {0, ~0}, /* [267] = 4099 */ {60, 41}, /* [268] = 4100 */ {60, 42}, /* [269] = 4101 */ {48, 43}, /* [270] = 4102 */ {48, 44}, /* [271] = 4103 */ {16, ~0}, /* [272] = 4104 */ {12, 45}, /* [273] = 4105 */ {16, ~0}, /* [274] = 4106 */ {12, 46}, /* [275] = 4107 */ {24, ~0}, /* [276] = 4108 */ {28, ~0}, /* [277] = 4109 */ {32, 47}, /* [278] = 4110 */ {20, ~0}, /* [279] = 4111 */ {16, ~0}, /* [280] = 4112 */ {8, ~0}, /* [281] = 4113 */ {8, ~0}, /* [282] = 4114 */ {84, 48}, /* [283] = 4115 */ {92, 49}, /* [284] = 4116 */ {0, ~0}, /* [285] = 4117 */ {12, ~0}, /* [286] = 4118 */ {8, 50}, /* [287] = 4119 */ {32, ~0}, /* [288] = 4120 */ {36, ~0}, /* [289] = 4121 */ {28, ~0}, /* [290] = 4122 */ {36, ~0}, /* [291] = 4123 */ {40, ~0}, /* [292] = 4124 */ {8, ~0}, /* [293] = 4125 */ {12, ~0}, /* [294] = 4126 */ {8, ~0}, /* [295] = 4127 */ {12, ~0}, /* [296] = 4176 */ {0, ~0}, /* [297] = 4177 */ {0, ~0}, /* [298] = 4178 */ {0, ~0}, /* [299] = 4179 */ {0, ~0}, /* [300] = 4180 */ {12, ~0}, /* [301] = 4181 */ {0, ~0}, /* [302] = 4182 */ {0, ~0}, /* [303] = 4183 */ {0, ~0}, /* [304] = 4184 */ {28, ~0}, /* [305] = 4185 */ {44, ~0}, /* [306] = 4186 */ {0, ~0}, /* [307] = 4187 */ {0, ~0}, /* [308] = 4188 */ {0, ~0}, /* [309] = 4189 */ {12, ~0}, /* [310] = 4190 */ {12, ~0}, /* [311] = 4191 */ {16, ~0}, /* [312] = 4192 */ {16, ~0}, /* [313] = 4193 */ {12, ~0}, /* [314] = 4194 */ {16, ~0}, /* [315] = 4195 */ {20, ~0}, /* [316] = 4196 */ {24, ~0}, /* [317] = 4197 */ {16, ~0}, /* [318] = 4198 */ {24, ~0}, /* [319] = 4199 */ {32, ~0}, /* [320] = 4200 */ {40, ~0}, /* [321] = 4201 */ {12, ~0}, /* [322] = 4202 */ {12, 51}, /* [323] = 4203 */ {12, 52}, /* [324] = 4204 */ {12, 53}, /* [325] = 4205 */ {12, 54}, /* [326] = 4206 */ {12, 55}, /* [327] = 4207 */ {12, 56}, /* [328] = 4208 */ {12, 57}, /* [329] = 4209 */ {12, 58}, /* [330] = 4210 */ {12, 59}, /* [331] = 4211 */ {12, 60}, /* [332] = 4212 */ {12, 61}, /* [333] = 4213 */ {12, 62}, /* [334] = 4214 */ {12, 63}, /* [335] = 4215 */ {28, ~0}, /* [336] = 4216 */ {44, ~0}, /* [337] = 4217 */ {16, 64}, /* [338] = 4218 */ {0, ~0}, /* [339] = 4219 */ {0, ~0}, /* [340] = 4220 */ {8, ~0}, /* [341] = 4221 */ {12, ~0}, /* [342] = 4222 */ {8, 65}, /* [343] = 4223 */ {0, ~0}, /* [344] = 4224 */ {0, ~0}, /* [345] = 4225 */ {0, ~0}, /* [346] = 4226 */ {0, ~0}, /* [347] = 4227 */ {0, ~0}, /* [348] = 4228 */ {12, ~0}, /* [349] = 4229 */ {0, ~0}, /* [350] = 4230 */ {12, ~0}, /* [351] = 4231 */ {24, ~0}, /* [352] = 4232 */ {12, ~0}, /* [353] = 4233 */ {16, ~0}, /* [354] = 4234 */ {24, ~0}, /* [355] = 4235 */ {12, ~0}, /* [356] = 4236 */ {16, ~0}, /* [357] = 4237 */ {24, ~0}, /* [358] = 4238 */ {16, ~0}, /* [359] = 4239 */ {24, ~0}, /* [360] = 4320 */ {8, 66}, /* [361] = 4321 */ {24, ~0}, /* [362] = 4322 */ {24, ~0}, /* [363] = 4323 */ {28, ~0}, /* [364] = 4324 */ {20, ~0}, /* [365] = 4325 */ {8, ~0}, /* [366] = 4326 */ {0, ~0}, /* [367] = 4327 */ {0, ~0}, /* [368] = 4328 */ {0, ~0}, /* [369] = 4329 */ {0, ~0}, /* [370] = 4330 */ {44, ~0}, /* [371] = 4331 */ {24, ~0}, /* [372] = 4332 */ {0, ~0}, /* [373] = 4333 */ {0, ~0}, /* [374] = 4334 */ {0, ~0}, /* [375] = 4335 */ {0, ~0}, /* [376] = 4128 */ {16, ~0}, /* [377] = 4129 */ {16, ~0}, /* [378] = 4130 */ {28, ~0}, /* [379] = 4131 */ {8, ~0}, /* [380] = 4132 */ {12, ~0}, /* [381] = 4133 */ {16, ~0}, /* [382] = 4134 */ {20, ~0}, /* [383] = 4135 */ {0, ~0}, /* [384] = 4264 */ {0, ~0}, /* [385] = 4265 */ {12, ~0}, /* [386] = 4266 */ {12, ~0}, /* [387] = 4267 */ {16, ~0}, /* [388] = 4268 */ {16, ~0}, /* [389] = 4269 */ {12, ~0}, /* [390] = 4270 */ {16, ~0}, /* [391] = 4271 */ {20, ~0}, /* [392] = 4272 */ {24, ~0}, /* [393] = 4273 */ {16, ~0}, /* [394] = 4274 */ {24, ~0}, /* [395] = 4275 */ {32, ~0}, /* [396] = 4276 */ {40, ~0}, /* [397] = 4277 */ {12, ~0}, /* [398] = 4278 */ {0, ~0}, /* [399] = 4279 */ {0, ~0}, /* [400] = 4312 */ {0, ~0}, /* [401] = 4313 */ {0, ~0}, /* [402] = 4314 */ {0, ~0}, /* [403] = 4315 */ {0, ~0}, /* [404] = 4316 */ {12, ~0}, /* [405] = 4317 */ {8, 67}, /* [406] = 4318 */ {20, ~0}, /* [407] = 4319 */ {12, ~0}, }; static const gl_proto_size_func Render_size_func_table[68] = { __glXCallListsReqSize, __glXBitmapReqSize, __glXFogfvReqSize, __glXFogivReqSize, __glXLightfvReqSize, __glXLightivReqSize, __glXLightModelfvReqSize, __glXLightModelivReqSize, __glXMaterialfvReqSize, __glXMaterialivReqSize, __glXPolygonStippleReqSize, __glXTexParameterfvReqSize, __glXTexParameterivReqSize, __glXTexImage1DReqSize, __glXTexImage2DReqSize, __glXTexEnvfvReqSize, __glXTexEnvivReqSize, __glXTexGendvReqSize, __glXTexGenfvReqSize, __glXTexGenivReqSize, __glXMap1dReqSize, __glXMap1fReqSize, __glXMap2dReqSize, __glXMap2fReqSize, __glXPixelMapfvReqSize, __glXPixelMapuivReqSize, __glXPixelMapusvReqSize, __glXDrawPixelsReqSize, __glXDrawArraysReqSize, __glXColorSubTableReqSize, __glXCompressedTexImage1DReqSize, __glXCompressedTexImage2DReqSize, __glXCompressedTexImage3DReqSize, __glXCompressedTexSubImage1DReqSize, __glXCompressedTexSubImage2DReqSize, __glXCompressedTexSubImage3DReqSize, __glXDrawBuffersReqSize, __glXColorTableReqSize, __glXColorTableParameterfvReqSize, __glXColorTableParameterivReqSize, __glXPointParameterfvReqSize, __glXTexSubImage1DReqSize, __glXTexSubImage2DReqSize, __glXConvolutionFilter1DReqSize, __glXConvolutionFilter2DReqSize, __glXConvolutionParameterfvReqSize, __glXConvolutionParameterivReqSize, __glXSeparableFilter2DReqSize, __glXTexImage3DReqSize, __glXTexSubImage3DReqSize, __glXPrioritizeTexturesReqSize, __glXVertexAttribs1svNVReqSize, __glXVertexAttribs2svNVReqSize, __glXVertexAttribs3svNVReqSize, __glXVertexAttribs4svNVReqSize, __glXVertexAttribs1fvNVReqSize, __glXVertexAttribs2fvNVReqSize, __glXVertexAttribs3fvNVReqSize, __glXVertexAttribs4fvNVReqSize, __glXVertexAttribs1dvNVReqSize, __glXVertexAttribs2dvNVReqSize, __glXVertexAttribs3dvNVReqSize, __glXVertexAttribs4dvNVReqSize, __glXVertexAttribs4ubvNVReqSize, __glXProgramStringARBReqSize, __glXPointParameterivReqSize, __glXDeleteFramebuffersReqSize, __glXDeleteRenderbuffersReqSize, }; const struct __glXDispatchInfo Render_dispatch_info = { 13, Render_dispatch_tree, Render_function_table, Render_size_table, Render_size_func_table }; /*****************************************************************/ /* tree depth = 12 */ static const int_fast16_t VendorPriv_dispatch_tree[152] = { /* [0] -> opcode range [0, 131072], node depth 1 */ 2, 5, EMPTY_LEAF, 119, EMPTY_LEAF, /* [5] -> opcode range [0, 32768], node depth 2 */ 1, 8, EMPTY_LEAF, /* [8] -> opcode range [0, 16384], node depth 3 */ 1, 11, EMPTY_LEAF, /* [11] -> opcode range [0, 8192], node depth 4 */ 2, 16, EMPTY_LEAF, 78, EMPTY_LEAF, /* [16] -> opcode range [0, 2048], node depth 5 */ 2, 21, EMPTY_LEAF, 36, EMPTY_LEAF, /* [21] -> opcode range [0, 512], node depth 6 */ 1, 24, EMPTY_LEAF, /* [24] -> opcode range [0, 256], node depth 7 */ 1, 27, EMPTY_LEAF, /* [27] -> opcode range [0, 128], node depth 8 */ 1, 30, EMPTY_LEAF, /* [30] -> opcode range [0, 64], node depth 9 */ 1, 33, EMPTY_LEAF, /* [33] -> opcode range [0, 32], node depth 10 */ 1, LEAF(0), EMPTY_LEAF, /* [36] -> opcode range [1024, 1536], node depth 6 */ 2, 41, EMPTY_LEAF, 53, 67, /* [41] -> opcode range [1024, 1152], node depth 7 */ 1, 44, EMPTY_LEAF, /* [44] -> opcode range [1024, 1088], node depth 8 */ 1, 47, EMPTY_LEAF, /* [47] -> opcode range [1024, 1056], node depth 9 */ 1, 50, EMPTY_LEAF, /* [50] -> opcode range [1024, 1040], node depth 10 */ 1, LEAF(16), EMPTY_LEAF, /* [53] -> opcode range [1280, 1408], node depth 7 */ 1, 56, EMPTY_LEAF, /* [56] -> opcode range [1280, 1344], node depth 8 */ 2, 61, LEAF(24), EMPTY_LEAF, 64, /* [61] -> opcode range [1280, 1296], node depth 9 */ 1, EMPTY_LEAF, LEAF(40), /* [64] -> opcode range [1328, 1344], node depth 9 */ 1, LEAF(48), EMPTY_LEAF, /* [67] -> opcode range [1408, 1536], node depth 7 */ 1, 70, EMPTY_LEAF, /* [70] -> opcode range [1408, 1472], node depth 8 */ 1, 73, EMPTY_LEAF, /* [73] -> opcode range [1408, 1440], node depth 9 */ 2, EMPTY_LEAF, LEAF(56), LEAF(64), EMPTY_LEAF, /* [78] -> opcode range [4096, 6144], node depth 5 */ 2, 83, EMPTY_LEAF, 101, EMPTY_LEAF, /* [83] -> opcode range [4096, 4608], node depth 6 */ 1, 86, EMPTY_LEAF, /* [86] -> opcode range [4096, 4352], node depth 7 */ 1, 89, EMPTY_LEAF, /* [89] -> opcode range [4096, 4224], node depth 8 */ 1, 92, EMPTY_LEAF, /* [92] -> opcode range [4096, 4160], node depth 9 */ 1, 95, EMPTY_LEAF, /* [95] -> opcode range [4096, 4128], node depth 10 */ 1, 98, EMPTY_LEAF, /* [98] -> opcode range [4096, 4112], node depth 11 */ 1, LEAF(72), EMPTY_LEAF, /* [101] -> opcode range [5120, 5632], node depth 6 */ 1, 104, EMPTY_LEAF, /* [104] -> opcode range [5120, 5376], node depth 7 */ 1, 107, EMPTY_LEAF, /* [107] -> opcode range [5120, 5248], node depth 8 */ 1, 110, EMPTY_LEAF, /* [110] -> opcode range [5120, 5184], node depth 9 */ 1, EMPTY_LEAF, 113, /* [113] -> opcode range [5152, 5184], node depth 10 */ 1, 116, EMPTY_LEAF, /* [116] -> opcode range [5152, 5168], node depth 11 */ 1, LEAF(80), EMPTY_LEAF, /* [119] -> opcode range [65536, 98304], node depth 2 */ 1, 122, EMPTY_LEAF, /* [122] -> opcode range [65536, 81920], node depth 3 */ 1, 125, EMPTY_LEAF, /* [125] -> opcode range [65536, 73728], node depth 4 */ 1, 128, EMPTY_LEAF, /* [128] -> opcode range [65536, 69632], node depth 5 */ 1, 131, EMPTY_LEAF, /* [131] -> opcode range [65536, 67584], node depth 6 */ 1, 134, EMPTY_LEAF, /* [134] -> opcode range [65536, 66560], node depth 7 */ 1, 137, EMPTY_LEAF, /* [137] -> opcode range [65536, 66048], node depth 8 */ 1, 140, EMPTY_LEAF, /* [140] -> opcode range [65536, 65792], node depth 9 */ 1, 143, EMPTY_LEAF, /* [143] -> opcode range [65536, 65664], node depth 10 */ 1, 146, EMPTY_LEAF, /* [146] -> opcode range [65536, 65600], node depth 11 */ 1, 149, EMPTY_LEAF, /* [149] -> opcode range [65536, 65568], node depth 12 */ 1, LEAF(88), EMPTY_LEAF, }; static const void *VendorPriv_function_table[104][2] = { /* [ 0] = 0 */ {NULL, NULL}, /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, /* [ 15] = 15 */ {NULL, NULL}, /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, /* [ 17] = 1025 */ {NULL, NULL}, /* [ 18] = 1026 */ {NULL, NULL}, /* [ 19] = 1027 */ {NULL, NULL}, /* [ 20] = 1028 */ {NULL, NULL}, /* [ 21] = 1029 */ {NULL, NULL}, /* [ 22] = 1030 */ {NULL, NULL}, /* [ 23] = 1031 */ {NULL, NULL}, /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, /* [ 26] = 1298 */ {NULL, NULL}, /* [ 27] = 1299 */ {NULL, NULL}, /* [ 28] = 1300 */ {NULL, NULL}, /* [ 29] = 1301 */ {NULL, NULL}, /* [ 30] = 1302 */ {NULL, NULL}, /* [ 31] = 1303 */ {NULL, NULL}, /* [ 32] = 1304 */ {__glXDisp_IsProgramARB, __glXDispSwap_IsProgramARB}, /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, /* [ 37] = 1309 */ {NULL, NULL}, /* [ 38] = 1310 */ {NULL, NULL}, /* [ 39] = 1311 */ {NULL, NULL}, /* [ 40] = 1288 */ {NULL, NULL}, /* [ 41] = 1289 */ {NULL, NULL}, /* [ 42] = 1290 */ {NULL, NULL}, /* [ 43] = 1291 */ {NULL, NULL}, /* [ 44] = 1292 */ {NULL, NULL}, /* [ 45] = 1293 */ {NULL, NULL}, /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsARB, __glXDispSwap_DeleteProgramsARB}, /* [ 47] = 1295 */ {__glXDisp_GenProgramsARB, __glXDispSwap_GenProgramsARB}, /* [ 48] = 1328 */ {NULL, NULL}, /* [ 49] = 1329 */ {NULL, NULL}, /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, /* [ 52] = 1332 */ {NULL, NULL}, /* [ 53] = 1333 */ {NULL, NULL}, /* [ 54] = 1334 */ {NULL, NULL}, /* [ 55] = 1335 */ {NULL, NULL}, /* [ 56] = 1416 */ {NULL, NULL}, /* [ 57] = 1417 */ {NULL, NULL}, /* [ 58] = 1418 */ {NULL, NULL}, /* [ 59] = 1419 */ {NULL, NULL}, /* [ 60] = 1420 */ {NULL, NULL}, /* [ 61] = 1421 */ {NULL, NULL}, /* [ 62] = 1422 */ {__glXDisp_IsRenderbuffer, __glXDispSwap_IsRenderbuffer}, /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffers, __glXDispSwap_GenRenderbuffers}, /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameteriv, __glXDispSwap_GetRenderbufferParameteriv}, /* [ 65] = 1425 */ {__glXDisp_IsFramebuffer, __glXDispSwap_IsFramebuffer}, /* [ 66] = 1426 */ {__glXDisp_GenFramebuffers, __glXDispSwap_GenFramebuffers}, /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatus, __glXDispSwap_CheckFramebufferStatus}, /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameteriv, __glXDispSwap_GetFramebufferAttachmentParameteriv}, /* [ 69] = 1429 */ {NULL, NULL}, /* [ 70] = 1430 */ {NULL, NULL}, /* [ 71] = 1431 */ {NULL, NULL}, /* [ 72] = 4096 */ {NULL, NULL}, /* [ 73] = 4097 */ {NULL, NULL}, /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, /* [ 77] = 4101 */ {NULL, NULL}, /* [ 78] = 4102 */ {NULL, NULL}, /* [ 79] = 4103 */ {NULL, NULL}, /* [ 80] = 5152 */ {NULL, NULL}, /* [ 81] = 5153 */ {NULL, NULL}, /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, /* [ 83] = 5155 */ {NULL, NULL}, /* [ 84] = 5156 */ {NULL, NULL}, /* [ 85] = 5157 */ {NULL, NULL}, /* [ 86] = 5158 */ {NULL, NULL}, /* [ 87] = 5159 */ {NULL, NULL}, /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, /* [ 90] = 65538 */ {NULL, NULL}, /* [ 91] = 65539 */ {NULL, NULL}, /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, /* [ 95] = 65543 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX}, /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX}, /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX}, /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX}, /* [ 99] = 65547 */ {NULL, NULL}, /* [ 100] = 65548 */ {NULL, NULL}, /* [ 101] = 65549 */ {NULL, NULL}, /* [ 102] = 65550 */ {NULL, NULL}, /* [ 103] = 65551 */ {NULL, NULL}, }; const struct __glXDispatchInfo VendorPriv_dispatch_info = { 17, VendorPriv_dispatch_tree, VendorPriv_function_table, NULL, NULL }; xorg-server-21.1.16/glx/clientinfo.c0000644000175000017500000001012014757411105012715 /* * Copyright © 2011 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "indirect_dispatch.h" #include "glxbyteorder.h" #include "unpack.h" static int set_client_info(__GLXclientState * cl, xGLXSetClientInfoARBReq * req, unsigned bytes_per_version) { ClientPtr client = cl->client; char *gl_extensions; char *glx_extensions; int size; REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq); /* Verify that the size of the packet matches the size inferred from the * sizes specified for the various fields. */ size = sz_xGLXSetClientInfoARBReq; size = safe_add(size, safe_mul(req->numVersions, bytes_per_version)); size = safe_add(size, safe_pad(req->numGLExtensionBytes)); size = safe_add(size, safe_pad(req->numGLXExtensionBytes)); if (size < 0 || req->length != (size / 4)) return BadLength; /* Verify that the actual length of the GL extension string matches what's * encoded in protocol packet. */ gl_extensions = (char *) (req + 1) + (req->numVersions * bytes_per_version); if (req->numGLExtensionBytes != 0 && memchr(gl_extensions, 0, __GLX_PAD(req->numGLExtensionBytes)) == NULL) return BadLength; /* Verify that the actual length of the GLX extension string matches * what's encoded in protocol packet. */ glx_extensions = gl_extensions + __GLX_PAD(req->numGLExtensionBytes); if (req->numGLXExtensionBytes != 0 && memchr(glx_extensions, 0, __GLX_PAD(req->numGLXExtensionBytes)) == NULL) return BadLength; free(cl->GLClientextensions); cl->GLClientextensions = strdup(gl_extensions); return 0; } int __glXDisp_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc) { return set_client_info(cl, (xGLXSetClientInfoARBReq *) pc, 8); } int __glXDispSwap_SetClientInfoARB(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc; REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq); req->length = bswap_16(req->length); req->numVersions = bswap_32(req->numVersions); req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes); req->numGLXExtensionBytes = bswap_32(req->numGLXExtensionBytes); return __glXDisp_SetClientInfoARB(cl, pc); } int __glXDisp_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc) { return set_client_info(cl, (xGLXSetClientInfoARBReq *) pc, 12); } int __glXDispSwap_SetClientInfo2ARB(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXSetClientInfoARBReq *req = (xGLXSetClientInfoARBReq *) pc; REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq); req->length = bswap_16(req->length); req->numVersions = bswap_32(req->numVersions); req->numGLExtensionBytes = bswap_32(req->numGLExtensionBytes); req->numGLXExtensionBytes = bswap_32(req->numGLXExtensionBytes); return __glXDisp_SetClientInfo2ARB(cl, pc); } xorg-server-21.1.16/glx/createcontext.c0000644000175000017500000003026414757411105013446 /* * Copyright © 2011 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "glxserver.h" #include "glxext.h" #include "indirect_dispatch.h" #include "opaque.h" #define ALL_VALID_FLAGS \ (GLX_CONTEXT_DEBUG_BIT_ARB | GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB \ | GLX_CONTEXT_ROBUST_ACCESS_BIT_ARB) static Bool validate_GL_version(int major_version, int minor_version) { if (major_version <= 0 || minor_version < 0) return FALSE; switch (major_version) { case 1: if (minor_version > 5) return FALSE; break; case 2: if (minor_version > 1) return FALSE; break; case 3: if (minor_version > 3) return FALSE; break; default: break; } return TRUE; } static Bool validate_render_type(uint32_t render_type) { switch (render_type) { case GLX_RGBA_TYPE: case GLX_COLOR_INDEX_TYPE: case GLX_RGBA_FLOAT_TYPE_ARB: case GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT: return TRUE; default: return FALSE; } } int __glXDisp_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateContextAttribsARBReq *req = (xGLXCreateContextAttribsARBReq *) pc; int32_t *attribs = (req->numAttribs != 0) ? (int32_t *) (req + 1) : NULL; unsigned i; int major_version = 1; int minor_version = 0; uint32_t flags = 0; uint32_t render_type = GLX_RGBA_TYPE; uint32_t flush = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB; __GLXcontext *ctx = NULL; __GLXcontext *shareCtx = NULL; __GLXscreen *glxScreen; __GLXconfig *config = NULL; int err; /* The GLX_ARB_create_context_robustness spec says: * * "The default value for GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB * is GLX_NO_RESET_NOTIFICATION_ARB." */ int reset = GLX_NO_RESET_NOTIFICATION_ARB; /* The GLX_ARB_create_context_profile spec says: * * "The default value for GLX_CONTEXT_PROFILE_MASK_ARB is * GLX_CONTEXT_CORE_PROFILE_BIT_ARB." * * The core profile only makes sense for OpenGL versions 3.2 and later. * If the version ultimately specified is less than 3.2, the core profile * bit is cleared (see below). */ int profile = GLX_CONTEXT_CORE_PROFILE_BIT_ARB; /* Verify that the size of the packet matches the size inferred from the * sizes specified for the various fields. */ const unsigned expected_size = (sz_xGLXCreateContextAttribsARBReq + (req->numAttribs * 8)) / 4; if (req->length != expected_size) return BadLength; /* The GLX_ARB_create_context spec says: * * "* If is not a valid GLXFBConfig, GLXBadFBConfig is * generated." * * On the client, the screen comes from the FBConfig, so GLXBadFBConfig * should be issued if the screen is nonsense. */ if (!validGlxScreen(client, req->screen, &glxScreen, &err)) { client->errorValue = req->fbconfig; return __glXError(GLXBadFBConfig); } if (req->fbconfig) { if (!validGlxFBConfig(client, glxScreen, req->fbconfig, &config, &err)) { client->errorValue = req->fbconfig; return __glXError(GLXBadFBConfig); } } /* Validate the context with which the new context should share resources. */ if (req->shareList != None) { if (!validGlxContext(client, req->shareList, DixReadAccess, &shareCtx, &err)) return err; /* The crazy condition is because C doesn't have a logical XOR * operator. Comparing directly for equality may fail if one is 1 and * the other is 2 even though both are logically true. */ if (!!req->isDirect != !!shareCtx->isDirect) { client->errorValue = req->shareList; return BadMatch; } /* The GLX_ARB_create_context spec says: * * "* If the server context state for ...was * created on a different screen than the one referenced by * ...BadMatch is generated." */ if (glxScreen != shareCtx->pGlxScreen) { client->errorValue = shareCtx->pGlxScreen->pScreen->myNum; return BadMatch; } } for (i = 0; i < req->numAttribs; i++) { switch (attribs[i * 2]) { case GLX_CONTEXT_MAJOR_VERSION_ARB: major_version = attribs[2 * i + 1]; break; case GLX_CONTEXT_MINOR_VERSION_ARB: minor_version = attribs[2 * i + 1]; break; case GLX_CONTEXT_FLAGS_ARB: flags = attribs[2 * i + 1]; break; case GLX_RENDER_TYPE: /* Not valid for GLX_EXT_no_config_context */ if (!req->fbconfig) return BadValue; render_type = attribs[2 * i + 1]; break; case GLX_CONTEXT_PROFILE_MASK_ARB: profile = attribs[2 * i + 1]; break; case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB: reset = attribs[2 * i + 1]; if (reset != GLX_NO_RESET_NOTIFICATION_ARB && reset != GLX_LOSE_CONTEXT_ON_RESET_ARB) return BadValue; break; case GLX_CONTEXT_RELEASE_BEHAVIOR_ARB: flush = attribs[2 * i + 1]; if (flush != GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB && flush != GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB) return BadValue; break; case GLX_SCREEN: /* Only valid for GLX_EXT_no_config_context */ if (req->fbconfig) return BadValue; /* Must match the value in the request header */ if (attribs[2 * i + 1] != req->screen) return BadValue; break; case GLX_CONTEXT_OPENGL_NO_ERROR_ARB: /* ignore */ break; default: if (!req->isDirect) return BadValue; break; } } /* The GLX_ARB_create_context spec says: * * "If attributes GLX_CONTEXT_MAJOR_VERSION_ARB and * GLX_CONTEXT_MINOR_VERSION_ARB, when considered together * with attributes GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB and * GLX_RENDER_TYPE, specify an OpenGL version and feature set * that are not defined, BadMatch is generated. * * ...Feature deprecation was introduced with OpenGL 3.0, so * forward-compatible contexts may only be requested for * OpenGL 3.0 and above. Thus, examples of invalid * combinations of attributes include: * * - Major version < 1 or > 3 * - Major version == 1 and minor version < 0 or > 5 * - Major version == 2 and minor version < 0 or > 1 * - Major version == 3 and minor version > 2 * - Forward-compatible flag set and major version < 3 * - Color index rendering and major version >= 3" */ if (!validate_GL_version(major_version, minor_version)) return BadMatch; if (major_version < 3 && ((flags & GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) != 0)) return BadMatch; if (major_version >= 3 && render_type == GLX_COLOR_INDEX_TYPE) return BadMatch; if (!validate_render_type(render_type)) return BadValue; if ((flags & ~ALL_VALID_FLAGS) != 0) return BadValue; /* The GLX_ARB_create_context_profile spec says: * * "* If attribute GLX_CONTEXT_PROFILE_MASK_ARB has no bits set; has * any bits set other than GLX_CONTEXT_CORE_PROFILE_BIT_ARB and * GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; has more than one of * these bits set; or if the implementation does not support the * requested profile, then GLXBadProfileARB is generated." * * The GLX_EXT_create_context_es2_profile spec doesn't exactly say what * is supposed to happen if an invalid version is set, but it doesn't * much matter as support for GLES contexts is only defined for direct * contexts (at the moment anyway) so we can leave it up to the driver * to validate. */ switch (profile) { case GLX_CONTEXT_CORE_PROFILE_BIT_ARB: case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: case GLX_CONTEXT_ES2_PROFILE_BIT_EXT: break; default: return __glXError(GLXBadProfileARB); } /* The GLX_ARB_create_context_robustness spec says: * * "* If the reset notification behavior of and the * newly created context are different, BadMatch is generated." */ if (shareCtx != NULL && shareCtx->resetNotificationStrategy != reset) return BadMatch; /* There is no GLX protocol for desktop OpenGL versions after 1.4. There * is no GLX protocol for any version of OpenGL ES. If the application is * requested an indirect rendering context for a version that cannot be * satisfied, reject it. * * The GLX_ARB_create_context spec says: * * "* If does not support compatible OpenGL contexts * providing the requested API major and minor version, * forward-compatible flag, and debug context flag, GLXBadFBConfig * is generated." */ if (!req->isDirect && (major_version > 1 || minor_version > 4 || profile == GLX_CONTEXT_ES2_PROFILE_BIT_EXT)) { client->errorValue = req->fbconfig; return __glXError(GLXBadFBConfig); } /* Allocate memory for the new context */ if (req->isDirect) { ctx = __glXdirectContextCreate(glxScreen, config, shareCtx); err = BadAlloc; } else { /* Only allow creating indirect GLX contexts if allowed by * server command line. Indirect GLX is of limited use (since * it's only GL 1.4), it's slower than direct contexts, and * it's a massive attack surface for buffer overflow type * errors. */ if (!enableIndirectGLX) { client->errorValue = req->isDirect; return BadValue; } ctx = glxScreen->createContext(glxScreen, config, shareCtx, req->numAttribs, (uint32_t *) attribs, &err); } if (ctx == NULL) return err; ctx->pGlxScreen = glxScreen; ctx->config = config; ctx->id = req->context; ctx->share_id = req->shareList; ctx->idExists = TRUE; ctx->isDirect = req->isDirect; ctx->renderMode = GL_RENDER; ctx->resetNotificationStrategy = reset; ctx->releaseBehavior = flush; ctx->renderType = render_type; /* Add the new context to the various global tables of GLX contexts. */ if (!__glXAddContext(ctx)) { (*ctx->destroy) (ctx); client->errorValue = req->context; return BadAlloc; } return Success; } int __glXDispSwap_CreateContextAttribsARB(__GLXclientState * cl, GLbyte * pc) { return BadRequest; } xorg-server-21.1.16/glx/extension_string.c0000644000175000017500000001507714757411105014205 /* * (C) Copyright IBM Corporation 2002-2006 * All Rights Reserved. * * 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 * on the rights to use, copy, modify, merge, publish, distribute, sub * license, and/or sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS 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. */ /** * \file extension_string.c * Routines to manage the GLX extension string and GLX version for AIGLX * drivers. This code is loosely based on src/glx/x11/glxextensions.c from * Mesa. * * \author Ian Romanick */ #include "dix-config.h" #include "extension_string.h" #include "opaque.h" #define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8))) #define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8))) #define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0) #define CONCAT(a,b) a ## b #define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit) #define VER(a,b) a, b #define Y 1 #define N 0 #define EXT_ENABLED(bit,supported) (IS_SET(supported, bit)) struct extension_info { const char *const name; unsigned name_len; unsigned char bit; /** * This is the lowest version of GLX that "requires" this extension. * For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and * SGI_make_current_read. If the extension is not required by any known * version of GLX, use 0, 0. */ unsigned char version_major; unsigned char version_minor; /** * Is driver support forced by the ABI? */ unsigned char driver_support; }; /** * List of known GLX Extensions. * The last Y/N switch informs whether the support of this extension is always enabled. */ static const struct extension_info known_glx_extensions[] = { /* GLX_ARB_get_proc_address is implemented on the client. */ /* *INDENT-OFF* */ { GLX(ARB_context_flush_control), VER(0,0), N, }, { GLX(ARB_create_context), VER(0,0), N, }, { GLX(ARB_create_context_no_error), VER(0,0), N, }, { GLX(ARB_create_context_profile), VER(0,0), N, }, { GLX(ARB_create_context_robustness), VER(0,0), N, }, { GLX(ARB_fbconfig_float), VER(0,0), N, }, { GLX(ARB_framebuffer_sRGB), VER(0,0), N, }, { GLX(ARB_multisample), VER(1,4), Y, }, { GLX(EXT_create_context_es_profile), VER(0,0), N, }, { GLX(EXT_create_context_es2_profile), VER(0,0), N, }, { GLX(EXT_fbconfig_packed_float), VER(0,0), N, }, { GLX(EXT_framebuffer_sRGB), VER(0,0), N, }, { GLX(EXT_get_drawable_type), VER(0,0), Y, }, { GLX(EXT_import_context), VER(0,0), N, }, { GLX(EXT_libglvnd), VER(0,0), N, }, { GLX(EXT_no_config_context), VER(0,0), N, }, { GLX(EXT_stereo_tree), VER(0,0), N, }, { GLX(EXT_texture_from_pixmap), VER(0,0), N, }, { GLX(EXT_visual_info), VER(0,0), Y, }, { GLX(EXT_visual_rating), VER(0,0), Y, }, { GLX(MESA_copy_sub_buffer), VER(0,0), N, }, { GLX(OML_swap_method), VER(0,0), Y, }, { GLX(SGI_make_current_read), VER(1,3), Y, }, { GLX(SGI_swap_control), VER(0,0), N, }, { GLX(SGIS_multisample), VER(0,0), Y, }, { GLX(SGIX_fbconfig), VER(1,3), Y, }, { GLX(SGIX_pbuffer), VER(1,3), Y, }, { GLX(SGIX_visual_select_group), VER(0,0), Y, }, { GLX(INTEL_swap_event), VER(0,0), N, }, { NULL } /* *INDENT-ON* */ }; /** * Create a GLX extension string for a set of enable bits. * * Creates a GLX extension string for the set of bit in \c enable_bits. This * string is then stored in \c buffer if buffer is not \c NULL. This allows * two-pass operation. On the first pass the caller passes \c NULL for * \c buffer, and the function determines how much space is required to store * the extension string. The caller allocates the buffer and calls the * function again. * * \param enable_bits Bits representing the enabled extensions. * \param buffer Buffer to store the extension string. May be \c NULL. * * \return * The number of characters in \c buffer that were written to. If \c buffer * is \c NULL, this is the size of buffer that must be allocated by the * caller. */ int __glXGetExtensionString(const unsigned char *enable_bits, char *buffer) { unsigned i; int length = 0; for (i = 0; known_glx_extensions[i].name != NULL; i++) { const unsigned bit = known_glx_extensions[i].bit; const size_t len = known_glx_extensions[i].name_len; if (EXT_ENABLED(bit, enable_bits)) { if (buffer != NULL) { (void) memcpy(&buffer[length], known_glx_extensions[i].name, len); buffer[length + len + 0] = ' '; buffer[length + len + 1] = '\0'; } length += len + 1; } } return length + 1; } void __glXEnableExtension(unsigned char *enable_bits, const char *ext) { const size_t ext_name_len = strlen(ext); unsigned i; for (i = 0; known_glx_extensions[i].name != NULL; i++) { if ((ext_name_len == known_glx_extensions[i].name_len) && (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) { SET_BIT(enable_bits, known_glx_extensions[i].bit); break; } } } void __glXInitExtensionEnableBits(unsigned char *enable_bits) { unsigned i; (void) memset(enable_bits, 0, __GLX_EXT_BYTES); for (i = 0; known_glx_extensions[i].name != NULL; i++) { if (known_glx_extensions[i].driver_support) { SET_BIT(enable_bits, known_glx_extensions[i].bit); } } if (enableIndirectGLX) __glXEnableExtension(enable_bits, "GLX_EXT_import_context"); } xorg-server-21.1.16/glx/extension_string.h0000644000175000017500000000571414757411105014207 /* * (C) Copyright IBM Corporation 2002-2006 * All Rights Reserved. * * 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 * on the rights to use, copy, modify, merge, publish, distribute, sub * license, and/or sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS 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. */ /** * \file extension_string.h * Routines to manage the GLX extension string and GLX version for AIGLX * drivers. This code is loosely based on src/glx/x11/glxextensions.c from * Mesa. * * \author Ian Romanick */ #ifndef GLX_EXTENSION_STRING_H #define GLX_EXTENSION_STRING_H enum { /* GLX_ARB_get_proc_address is implemented on the client. */ ARB_context_flush_control_bit = 0, ARB_create_context_bit, ARB_create_context_no_error_bit, ARB_create_context_profile_bit, ARB_create_context_robustness_bit, ARB_fbconfig_float_bit, ARB_framebuffer_sRGB_bit, ARB_multisample_bit, EXT_create_context_es_profile_bit, EXT_create_context_es2_profile_bit, EXT_fbconfig_packed_float_bit, EXT_get_drawable_type_bit, EXT_import_context_bit, EXT_libglvnd_bit, EXT_no_config_context_bit, EXT_stereo_tree_bit, EXT_texture_from_pixmap_bit, EXT_visual_info_bit, EXT_visual_rating_bit, MESA_copy_sub_buffer_bit, OML_swap_method_bit, SGI_make_current_read_bit, SGI_swap_control_bit, SGI_video_sync_bit, SGIS_multisample_bit, SGIX_fbconfig_bit, SGIX_pbuffer_bit, SGIX_visual_select_group_bit, INTEL_swap_event_bit, __NUM_GLX_EXTS, }; /* For extensions which have identical ARB and EXT implementation * in GLX area, use one enabling bit for both. */ #define EXT_framebuffer_sRGB_bit ARB_framebuffer_sRGB_bit #define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8) extern int __glXGetExtensionString(const unsigned char *enable_bits, char *buffer); extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext); extern void __glXInitExtensionEnableBits(unsigned char *enable_bits); #endif /* GLX_EXTENSION_STRING_H */ xorg-server-21.1.16/glx/indirect_util.c0000644000175000017500000002161014757411105013427 /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "indirect_size.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" #include "glxserver.h" #include "glxbyteorder.h" #include "singlesize.h" #include "glxext.h" #include "indirect_table.h" #include "indirect_util.h" #define __GLX_PAD(a) (((a)+3)&~3) GLint __glGetBooleanv_variable_size(GLenum e) { if (e == GL_COMPRESSED_TEXTURE_FORMATS) { GLint temp; glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &temp); return temp; } else { return 0; } } /** * Get a properly aligned buffer to hold reply data. * * \warning * This function assumes that \c local_buffer is already properly aligned. * It also assumes that \c alignment is a power of two. */ void * __glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size, void *local_buffer, size_t local_size, unsigned alignment) { void *buffer = local_buffer; const intptr_t mask = alignment - 1; if (local_size < required_size) { size_t worst_case_size; intptr_t temp_buf; if (required_size < SIZE_MAX - alignment) worst_case_size = required_size + alignment; else return NULL; if (cl->returnBufSize < worst_case_size) { void *temp = realloc(cl->returnBuf, worst_case_size); if (temp == NULL) { return NULL; } cl->returnBuf = temp; cl->returnBufSize = worst_case_size; } temp_buf = (intptr_t) cl->returnBuf; temp_buf = (temp_buf + mask) & ~mask; buffer = (void *) temp_buf; } return buffer; } /** * Send a GLX reply to the client. * * Technically speaking, there are several different ways to encode a GLX * reply. The primary difference is whether or not certain fields (e.g., * retval, size, and "pad3") are set. This function gets around that by * always setting all of the fields to "reasonable" values. This does no * harm to clients, but it does make the server-side code much more compact. */ void __glXSendReply(ClientPtr client, const void *data, size_t elements, size_t element_size, GLboolean always_array, CARD32 retval) { size_t reply_ints = 0; xGLXSingleReply reply = { 0, }; if (__glXErrorOccured()) { elements = 0; } else if ((elements > 1) || always_array) { reply_ints = bytes_to_int32(elements * element_size); } reply.length = reply_ints; reply.type = X_Reply; reply.sequenceNumber = client->sequence; reply.size = elements; reply.retval = retval; /* It is faster on almost always every architecture to just copy the 8 * bytes, even when not necessary, than check to see of the value of * elements requires it. Copying the data when not needed will do no * harm. */ (void) memcpy(&reply.pad3, data, 8); WriteToClient(client, sz_xGLXSingleReply, &reply); if (reply_ints != 0) { WriteToClient(client, reply_ints * 4, data); } } /** * Send a GLX reply to the client. * * Technically speaking, there are several different ways to encode a GLX * reply. The primary difference is whether or not certain fields (e.g., * retval, size, and "pad3") are set. This function gets around that by * always setting all of the fields to "reasonable" values. This does no * harm to clients, but it does make the server-side code much more compact. * * \warning * This function assumes that values stored in \c data will be byte-swapped * by the caller if necessary. */ void __glXSendReplySwap(ClientPtr client, const void *data, size_t elements, size_t element_size, GLboolean always_array, CARD32 retval) { size_t reply_ints = 0; xGLXSingleReply reply = { 0, }; if (__glXErrorOccured()) { elements = 0; } else if ((elements > 1) || always_array) { reply_ints = bytes_to_int32(elements * element_size); } reply.length = bswap_32(reply_ints); reply.type = X_Reply; reply.sequenceNumber = bswap_16(client->sequence); reply.size = bswap_32(elements); reply.retval = bswap_32(retval); /* It is faster on almost always every architecture to just copy the 8 * bytes, even when not necessary, than check to see of the value of * elements requires it. Copying the data when not needed will do no * harm. */ (void) memcpy(&reply.pad3, data, 8); WriteToClient(client, sz_xGLXSingleReply, &reply); if (reply_ints != 0) { WriteToClient(client, reply_ints * 4, data); } } static int get_decode_index(const struct __glXDispatchInfo *dispatch_info, unsigned opcode) { int remaining_bits; int next_remain; const int_fast16_t *const tree = dispatch_info->dispatch_tree; int_fast16_t index; remaining_bits = dispatch_info->bits; if (opcode >= (1U << remaining_bits)) { return -1; } index = 0; for ( /* empty */ ; remaining_bits > 0; remaining_bits = next_remain) { unsigned mask; unsigned child_index; /* Calculate the slice of bits used by this node. * * If remaining_bits = 8 and tree[index] = 3, the mask of just the * remaining bits is 0x00ff and the mask for the remaining bits after * this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0. * This masks the 3 bits that we would want for this node. */ next_remain = remaining_bits - tree[index]; mask = ((1 << remaining_bits) - 1) & ~((1 << next_remain) - 1); /* Using the mask, calculate the index of the opcode in the node. * With that index, fetch the index of the next node. */ child_index = (opcode & mask) >> next_remain; index = tree[index + 1 + child_index]; /* If the next node is an empty leaf, the opcode is for a non-existent * function. We're done. * * If the next node is a non-empty leaf, look up the function pointer * and return it. */ if (index == EMPTY_LEAF) { return -1; } else if (IS_LEAF_INDEX(index)) { unsigned func_index; /* The value stored in the tree for a leaf node is the base of * the function pointers for that leaf node. The offset for the * function for a particular opcode is the remaining bits in the * opcode. */ func_index = -index; func_index += opcode & ((1 << next_remain) - 1); return func_index; } } /* We should *never* get here!!! */ return -1; } void * __glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, int opcode, int swapped_version) { const int func_index = get_decode_index(dispatch_info, opcode); return (func_index < 0) ? NULL : (void *) dispatch_info-> dispatch_functions[func_index][swapped_version]; } int __glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, int opcode, __GLXrenderSizeData * data) { if (dispatch_info->size_table != NULL) { const int func_index = get_decode_index(dispatch_info, opcode); if ((func_index >= 0) && (dispatch_info->size_table[func_index][0] != 0)) { const int var_offset = dispatch_info->size_table[func_index][1]; data->bytes = dispatch_info->size_table[func_index][0]; data->varsize = (var_offset != ~0) ? dispatch_info->size_func_table[var_offset] : NULL; return 0; } } return -1; } xorg-server-21.1.16/glx/indirect_util.h0000644000175000017500000000455414757411105013444 /* * (C) Copyright IBM Corporation 2005 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #ifndef __GLX_INDIRECT_UTIL_H__ #define __GLX_INDIRECT_UTIL_H__ extern GLint __glGetBooleanv_variable_size(GLenum e); extern void *__glXGetAnswerBuffer(__GLXclientState * cl, size_t required_size, void *local_buffer, size_t local_size, unsigned alignment); extern void __glXSendReply(ClientPtr client, const void *data, size_t elements, size_t element_size, GLboolean always_array, CARD32 retval); extern void __glXSendReplySwap(ClientPtr client, const void *data, size_t elements, size_t element_size, GLboolean always_array, CARD32 retval); struct __glXDispatchInfo; extern void *__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info, int opcode, int swapped_version); extern int __glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info, int opcode, __GLXrenderSizeData * data); #endif /* __GLX_INDIRECT_UTIL_H__ */ xorg-server-21.1.16/glx/indirect_program.c0000644000175000017500000001007514757411105014124 /* * (C) Copyright IBM Corporation 2005, 2006 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS 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. */ /** * \file indirect_program.c * Hand-coded routines needed to support programmable pipeline extensions. * * \author Ian Romanick */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxbyteorder.h" #include "glxext.h" #include "singlesize.h" #include "unpack.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" /** * Handle both types of glGetProgramString calls. */ static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte * pc, PFNGLGETPROGRAMIVARBPROC get_programiv, PFNGLGETPROGRAMSTRINGARBPROC get_program_string, Bool do_swap) { xGLXVendorPrivateWithReplyReq *const req = (xGLXVendorPrivateWithReplyReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateWithReplyReq, 8); pc += __GLX_VENDPRIV_HDR_SIZE; if (cx != NULL) { GLenum target; GLenum pname; GLint compsize = 0; char *answer = NULL, answerBuffer[200]; xGLXSingleReply reply = { 0, }; if (do_swap) { target = (GLenum) bswap_32(*(int *) (pc + 0)); pname = (GLenum) bswap_32(*(int *) (pc + 4)); } else { target = *(GLenum *) (pc + 0); pname = *(GLuint *) (pc + 4); } /* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV * enumerants is the same. */ get_programiv(target, GL_PROGRAM_LENGTH_ARB, &compsize); if (compsize != 0) { __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); get_program_string(target, pname, (GLubyte *) answer); } if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetTexImageReply *) &reply)->width = compsize; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } error = Success; } return error; } int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { PFNGLGETPROGRAMIVARBPROC get_program = __glGetProcAddress("glGetProgramivARB"); PFNGLGETPROGRAMSTRINGARBPROC get_program_string = __glGetProcAddress("glGetProgramStringARB"); return DoGetProgramString(cl, pc, get_program, get_program_string, FALSE); } int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte * pc) { PFNGLGETPROGRAMIVARBPROC get_program = __glGetProcAddress("glGetProgramivARB"); PFNGLGETPROGRAMSTRINGARBPROC get_program_string = __glGetProcAddress("glGetProgramStringARB"); return DoGetProgramString(cl, pc, get_program, get_program_string, TRUE); } xorg-server-21.1.16/glx/indirect_table.h0000644000175000017500000000655614757411105013562 /* * (C) Copyright IBM Corporation 2005, 2006 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ /** * \file indirect_table.h * * \author Ian Romanick */ #ifndef INDIRECT_TABLE_H #define INDIRECT_TABLE_H #include /** */ struct __glXDispatchInfo { /** * Number of significant bits in the protocol opcode. Opcodes with values * larger than ((1 << bits) - 1) are invalid. */ unsigned bits; /** */ const int_fast16_t *dispatch_tree; /** * Array of protocol decode and dispatch functions index by the opcode * search tree (i.e., \c dispatch_tree). The first element in each pair * is the non-byte-swapped version, and the second element is the * byte-swapped version. */ const void *(*dispatch_functions)[2]; /** * Pointer to size validation data. This table is indexed with the same * value as ::dispatch_functions. * * The first element in the pair is the size, in bytes, of the fixed-size * portion of the protocol. * * For opcodes that have a variable-size portion, the second value is an * index in \c size_func_table to calculate that size. If there is no * variable-size portion, this index will be ~0. * * \note * If size checking is not to be performed on this type of protocol * data, this pointer will be \c NULL. */ const int_fast16_t(*size_table)[2]; /** * Array of functions used to calculate the variable-size portion of * protocol messages. Indexed by the second element of the entries * in \c ::size_table. * * \note * If size checking is not to be performed on this type of protocol * data, this pointer will be \c NULL. */ const gl_proto_size_func *size_func_table; }; /** * Sentinel value for an empty leaf in the \c dispatch_tree. */ #define EMPTY_LEAF INT_FAST16_MIN /** * Declare the index \c x as a leaf index. */ #define LEAF(x) -x /** * Determine if an index is a leaf index. */ #define IS_LEAF_INDEX(x) ((x) <= 0) extern const struct __glXDispatchInfo Single_dispatch_info; extern const struct __glXDispatchInfo Render_dispatch_info; extern const struct __glXDispatchInfo VendorPriv_dispatch_info; #endif /* INDIRECT_TABLE_H */ xorg-server-21.1.16/glx/indirect_texture_compression.c0000644000175000017500000001033614757411105016576 /* * (C) Copyright IBM Corporation 2005, 2006 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * IBM, * AND/OR THEIR SUPPLIERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxbyteorder.h" #include "glxext.h" #include "singlesize.h" #include "unpack.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" int __glXDisp_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, req->contextTag, &error); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 8); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = *(GLenum *) (pc + 0); const GLint level = *(GLint *) (pc + 4); GLint compsize = 0; char *answer = NULL, answerBuffer[200]; xGLXSingleReply reply = { 0, }; glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize); if (compsize != 0) { PFNGLGETCOMPRESSEDTEXIMAGEARBPROC GetCompressedTexImageARB = __glGetProcAddress("glGetCompressedTexImageARB"); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); GetCompressedTexImageARB(target, level, answer); } if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetTexImageReply *) &reply)->width = compsize; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } error = Success; } return error; } int __glXDispSwap_GetCompressedTexImage(struct __GLXclientStateRec *cl, GLbyte * pc) { xGLXSingleReq *const req = (xGLXSingleReq *) pc; int error; __GLXcontext *const cx = __glXForceCurrent(cl, bswap_32(req->contextTag), &error); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 8); pc += __GLX_SINGLE_HDR_SIZE; if (cx != NULL) { const GLenum target = (GLenum) bswap_32(*(int *) (pc + 0)); const GLint level = (GLint) bswap_32(*(int *) (pc + 4)); GLint compsize = 0; char *answer = NULL, answerBuffer[200]; xGLXSingleReply reply = { 0, }; glGetTexLevelParameteriv(target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize); if (compsize != 0) { PFNGLGETCOMPRESSEDTEXIMAGEARBPROC GetCompressedTexImageARB = __glGetProcAddress("glGetCompressedTexImageARB"); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); GetCompressedTexImageARB(target, level, answer); } if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetTexImageReply *) &reply)->width = compsize; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } error = Success; } return error; } xorg-server-21.1.16/glx/glxbyteorder.h0000644000175000017500000000303214757411105013306 /* * (C) Copyright IBM Corporation 2006, 2007 * All Rights Reserved. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS 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. */ /** * \file glxbyteorder.h * Platform glue for handling byte-ordering issues in GLX protocol. * * \author Ian Romanick */ #if !defined(__GLXBYTEORDER_H__) #define __GLXBYTEORDER_H__ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "misc.h" #endif /* !defined(__GLXBYTEORDER_H__) */ xorg-server-21.1.16/glx/glxcmds.c0000644000175000017500000023030014757411105012230 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "glxserver.h" #include #include #include #include #include #include "glxutil.h" #include "glxext.h" #include "indirect_dispatch.h" #include "indirect_table.h" #include "indirect_util.h" #include "protocol-versions.h" #include "glxvndabi.h" #include "xace.h" static char GLXServerVendorName[] = "SGI"; _X_HIDDEN int validGlxScreen(ClientPtr client, int screen, __GLXscreen ** pGlxScreen, int *err) { /* ** Check if screen exists. */ if (screen < 0 || screen >= screenInfo.numScreens) { client->errorValue = screen; *err = BadValue; return FALSE; } *pGlxScreen = glxGetScreen(screenInfo.screens[screen]); return TRUE; } _X_HIDDEN int validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen, XID id, __GLXconfig ** config, int *err) { __GLXconfig *m; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) if (m->fbconfigID == id) { *config = m; return TRUE; } client->errorValue = id; *err = __glXError(GLXBadFBConfig); return FALSE; } static int validGlxVisual(ClientPtr client, __GLXscreen * pGlxScreen, XID id, __GLXconfig ** config, int *err) { int i; for (i = 0; i < pGlxScreen->numVisuals; i++) if (pGlxScreen->visuals[i]->visualID == id) { *config = pGlxScreen->visuals[i]; return TRUE; } client->errorValue = id; *err = BadValue; return FALSE; } static int validGlxFBConfigForWindow(ClientPtr client, __GLXconfig * config, DrawablePtr pDraw, int *err) { ScreenPtr pScreen = pDraw->pScreen; VisualPtr pVisual = NULL; XID vid; int i; vid = wVisual((WindowPtr) pDraw); for (i = 0; i < pScreen->numVisuals; i++) { if (pScreen->visuals[i].vid == vid) { pVisual = &pScreen->visuals[i]; break; } } /* FIXME: What exactly should we check here... */ if (pVisual->class != glxConvertToXVisualType(config->visualType) || !(config->drawableType & GLX_WINDOW_BIT)) { client->errorValue = pDraw->id; *err = BadMatch; return FALSE; } return TRUE; } _X_HIDDEN int validGlxContext(ClientPtr client, XID id, int access_mode, __GLXcontext ** context, int *err) { /* no ghost contexts */ if (id & SERVER_BIT) { *err = __glXError(GLXBadContext); return FALSE; } *err = dixLookupResourceByType((void **) context, id, __glXContextRes, client, access_mode); if (*err != Success || (*context)->idExists == GL_FALSE) { client->errorValue = id; if (*err == BadValue || *err == Success) *err = __glXError(GLXBadContext); return FALSE; } return TRUE; } int validGlxDrawable(ClientPtr client, XID id, int type, int access_mode, __GLXdrawable ** drawable, int *err) { int rc; rc = dixLookupResourceByType((void **) drawable, id, __glXDrawableRes, client, access_mode); if (rc != Success && rc != BadValue) { *err = rc; client->errorValue = id; return FALSE; } /* If the ID of the glx drawable we looked up doesn't match the id * we looked for, it's because we looked it up under the X * drawable ID (see DoCreateGLXDrawable). */ if (rc == BadValue || (*drawable)->drawId != id || (type != GLX_DRAWABLE_ANY && type != (*drawable)->type)) { client->errorValue = id; switch (type) { case GLX_DRAWABLE_WINDOW: *err = __glXError(GLXBadWindow); return FALSE; case GLX_DRAWABLE_PIXMAP: *err = __glXError(GLXBadPixmap); return FALSE; case GLX_DRAWABLE_PBUFFER: *err = __glXError(GLXBadPbuffer); return FALSE; case GLX_DRAWABLE_ANY: *err = __glXError(GLXBadDrawable); return FALSE; } } return TRUE; } void __glXContextDestroy(__GLXcontext * context) { lastGLContext = NULL; } static void __glXdirectContextDestroy(__GLXcontext * context) { __glXContextDestroy(context); free(context); } static int __glXdirectContextLoseCurrent(__GLXcontext * context) { return GL_TRUE; } _X_HIDDEN __GLXcontext * __glXdirectContextCreate(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * shareContext) { __GLXcontext *context; context = calloc(1, sizeof(__GLXcontext)); if (context == NULL) return NULL; context->config = modes; context->destroy = __glXdirectContextDestroy; context->loseCurrent = __glXdirectContextLoseCurrent; return context; } /** * Create a GL context with the given properties. This routine is used * to implement \c glXCreateContext, \c glXCreateNewContext, and * \c glXCreateContextWithConfigSGIX. This works because of the hack way * that GLXFBConfigs are implemented. Basically, the FBConfigID is the * same as the VisualID. */ static int DoCreateContext(__GLXclientState * cl, GLXContextID gcId, GLXContextID shareList, __GLXconfig * config, __GLXscreen * pGlxScreen, GLboolean isDirect, int renderType) { ClientPtr client = cl->client; __GLXcontext *glxc, *shareglxc; int err; /* ** Find the display list space that we want to share. ** ** NOTE: In a multithreaded X server, we would need to keep a reference ** count for each display list so that if one client destroyed a list that ** another client was using, the list would not really be freed until it ** was no longer in use. Since this sample implementation has no support ** for multithreaded servers, we don't do this. */ if (shareList == None) { shareglxc = 0; } else { if (!validGlxContext(client, shareList, DixReadAccess, &shareglxc, &err)) return err; /* Page 26 (page 32 of the PDF) of the GLX 1.4 spec says: * * "The server context state for all sharing contexts must exist * in a single address space or a BadMatch error is generated." * * If the share context is indirect, force the new context to also be * indirect. If the shard context is direct but the new context * cannot be direct, generate BadMatch. */ if (shareglxc->isDirect && !isDirect) { client->errorValue = shareList; return BadMatch; } else if (!shareglxc->isDirect) { /* ** Create an indirect context regardless of what the client asked ** for; this way we can share display list space with shareList. */ isDirect = GL_FALSE; } /* Core GLX doesn't explicitly require this, but GLX_ARB_create_context * does (see glx/createcontext.c), and it's assumed by our * implementation anyway, so let's be consistent about it. */ if (shareglxc->pGlxScreen != pGlxScreen) { client->errorValue = shareglxc->pGlxScreen->pScreen->myNum; return BadMatch; } } /* ** Allocate memory for the new context */ if (!isDirect) { /* Only allow creating indirect GLX contexts if allowed by * server command line. Indirect GLX is of limited use (since * it's only GL 1.4), it's slower than direct contexts, and * it's a massive attack surface for buffer overflow type * errors. */ if (!enableIndirectGLX) { client->errorValue = isDirect; return BadValue; } /* Without any attributes, the only error that the driver should be * able to generate is BadAlloc. As result, just drop the error * returned from the driver on the floor. */ glxc = pGlxScreen->createContext(pGlxScreen, config, shareglxc, 0, NULL, &err); } else glxc = __glXdirectContextCreate(pGlxScreen, config, shareglxc); if (!glxc) { return BadAlloc; } /* Initialize the GLXcontext structure. */ glxc->pGlxScreen = pGlxScreen; glxc->config = config; glxc->id = gcId; glxc->share_id = shareList; glxc->idExists = GL_TRUE; glxc->isDirect = isDirect; glxc->renderMode = GL_RENDER; glxc->renderType = renderType; /* The GLX_ARB_create_context_robustness spec says: * * "The default value for GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB * is GLX_NO_RESET_NOTIFICATION_ARB." * * Without using glXCreateContextAttribsARB, there is no way to specify a * non-default reset notification strategy. */ glxc->resetNotificationStrategy = GLX_NO_RESET_NOTIFICATION_ARB; #ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB /* The GLX_ARB_context_flush_control spec says: * * "The default value [for GLX_CONTEXT_RELEASE_BEHAVIOR] is * CONTEXT_RELEASE_BEHAVIOR_FLUSH, and may in some cases be changed * using platform-specific context creation extensions." * * Without using glXCreateContextAttribsARB, there is no way to specify a * non-default release behavior. */ glxc->releaseBehavior = GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB; #endif /* Add the new context to the various global tables of GLX contexts. */ if (!__glXAddContext(glxc)) { (*glxc->destroy) (glxc); client->errorValue = gcId; return BadAlloc; } return Success; } int __glXDisp_CreateContext(__GLXclientState * cl, GLbyte * pc) { xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err)) return err; return DoCreateContext(cl, req->context, req->shareList, config, pGlxScreen, req->isDirect, GLX_RGBA_TYPE); } int __glXDisp_CreateNewContext(__GLXclientState * cl, GLbyte * pc) { xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) return err; return DoCreateContext(cl, req->context, req->shareList, config, pGlxScreen, req->isDirect, req->renderType); } int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; REQUEST_SIZE_MATCH(xGLXCreateContextWithConfigSGIXReq); if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) return err; return DoCreateContext(cl, req->context, req->shareList, config, pGlxScreen, req->isDirect, req->renderType); } int __glXDisp_DestroyContext(__GLXclientState * cl, GLbyte * pc) { xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; __GLXcontext *glxc; int err; if (!validGlxContext(cl->client, req->context, DixDestroyAccess, &glxc, &err)) return err; glxc->idExists = GL_FALSE; if (glxc->currentClient) { XID ghost = FakeClientID(glxc->currentClient->index); if (!AddResource(ghost, __glXContextRes, glxc)) return BadAlloc; ChangeResourceValue(glxc->id, __glXContextRes, NULL); glxc->id = ghost; } FreeResourceByType(req->context, __glXContextRes, FALSE); return Success; } __GLXcontext * __glXLookupContextByTag(__GLXclientState * cl, GLXContextTag tag) { return glxServer.getContextTagPrivate(cl->client, tag); } static __GLXconfig * inferConfigForWindow(__GLXscreen *pGlxScreen, WindowPtr pWin) { int i, vid = wVisual(pWin); for (i = 0; i < pGlxScreen->numVisuals; i++) if (pGlxScreen->visuals[i]->visualID == vid) return pGlxScreen->visuals[i]; return NULL; } /** * This is a helper function to handle the legacy (pre GLX 1.3) cases * where passing an X window to glXMakeCurrent is valid. Given a * resource ID, look up the GLX drawable if available, otherwise, make * sure it's an X window and create a GLX drawable one the fly. */ static __GLXdrawable * __glXGetDrawable(__GLXcontext * glxc, GLXDrawable drawId, ClientPtr client, int *error) { DrawablePtr pDraw; __GLXdrawable *pGlxDraw; __GLXconfig *config; __GLXscreen *pGlxScreen; int rc; rc = dixLookupResourceByType((void **)&pGlxDraw, drawId, __glXDrawableRes, client, DixWriteAccess); if (rc == Success && /* If pGlxDraw->drawId == drawId, drawId is a valid GLX drawable. * Otherwise, if pGlxDraw->type == GLX_DRAWABLE_WINDOW, drawId is * an X window, but the client has already created a GLXWindow * associated with it, so we don't want to create another one. */ (pGlxDraw->drawId == drawId || pGlxDraw->type == GLX_DRAWABLE_WINDOW)) { if (glxc != NULL && glxc->config != NULL && glxc->config != pGlxDraw->config) { client->errorValue = drawId; *error = BadMatch; return NULL; } return pGlxDraw; } /* No active context and an unknown drawable, bail. */ if (glxc == NULL) { client->errorValue = drawId; *error = BadMatch; return NULL; } /* The drawId wasn't a GLX drawable. Make sure it's a window and * create a GLXWindow for it. Check that the drawable screen * matches the context screen and that the context fbconfig is * compatible with the window visual. */ rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); if (rc != Success || pDraw->type != DRAWABLE_WINDOW) { client->errorValue = drawId; *error = __glXError(GLXBadDrawable); return NULL; } pGlxScreen = glxc->pGlxScreen; if (pDraw->pScreen != pGlxScreen->pScreen) { client->errorValue = pDraw->pScreen->myNum; *error = BadMatch; return NULL; } config = glxc->config; if (!config) config = inferConfigForWindow(pGlxScreen, (WindowPtr)pDraw); if (!config) { /* * If we get here, we've tried to bind a no-config context to a * window without a corresponding fbconfig, presumably because * we don't support GL on it (PseudoColor perhaps). From GLX Section * 3.3.7 "Rendering Contexts": * * "If draw or read are not compatible with ctx a BadMatch error * is generated." */ *error = BadMatch; return NULL; } if (!validGlxFBConfigForWindow(client, config, pDraw, error)) return NULL; pGlxDraw = pGlxScreen->createDrawable(client, pGlxScreen, pDraw, drawId, GLX_DRAWABLE_WINDOW, drawId, config); if (!pGlxDraw) { *error = BadAlloc; return NULL; } /* since we are creating the drawablePrivate, drawId should be new */ if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) { *error = BadAlloc; return NULL; } return pGlxDraw; } /*****************************************************************************/ /* ** Make an OpenGL context and drawable current. */ int xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId, XID contextId, GLXContextTag newContextTag) { __GLXclientState *cl = glxGetClient(client); __GLXcontext *glxc = NULL, *prevglxc = NULL; __GLXdrawable *drawPriv = NULL; __GLXdrawable *readPriv = NULL; int error; /* Drawables but no context makes no sense */ if (!contextId && (drawId || readId)) return BadMatch; /* If either drawable is null, the other must be too */ if ((drawId == None) != (readId == None)) return BadMatch; /* Look up old context. If we have one, it must be in a usable state. */ if (tag != 0) { prevglxc = glxServer.getContextTagPrivate(client, tag); if (prevglxc && prevglxc->renderMode != GL_RENDER) { /* Oops. Not in render mode render. */ client->errorValue = prevglxc->id; return __glXError(GLXBadContextState); } } /* Look up new context. It must not be current for someone else. */ if (contextId != None) { int status; if (!validGlxContext(client, contextId, DixUseAccess, &glxc, &error)) return error; if ((glxc != prevglxc) && glxc->currentClient) return BadAccess; if (drawId) { drawPriv = __glXGetDrawable(glxc, drawId, client, &status); if (drawPriv == NULL) return status; } if (readId) { readPriv = __glXGetDrawable(glxc, readId, client, &status); if (readPriv == NULL) return status; } } if (prevglxc) { /* Flush the previous context if needed. */ Bool need_flush = !prevglxc->isDirect; #ifdef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB if (prevglxc->releaseBehavior == GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB) need_flush = GL_FALSE; #endif if (need_flush) { if (!__glXForceCurrent(cl, tag, (int *) &error)) return error; glFlush(); } /* Make the previous context not current. */ if (!(*prevglxc->loseCurrent) (prevglxc)) return __glXError(GLXBadContext); lastGLContext = NULL; if (!prevglxc->isDirect) { prevglxc->drawPriv = NULL; prevglxc->readPriv = NULL; } } if (glxc && !glxc->isDirect) { glxc->drawPriv = drawPriv; glxc->readPriv = readPriv; /* make the context current */ lastGLContext = glxc; if (!(*glxc->makeCurrent) (glxc)) { lastGLContext = NULL; glxc->drawPriv = NULL; glxc->readPriv = NULL; return __glXError(GLXBadContext); } } glxServer.setContextTagPrivate(client, newContextTag, glxc); if (glxc) glxc->currentClient = client; if (prevglxc) { prevglxc->currentClient = NULL; if (!prevglxc->idExists) { FreeResourceByType(prevglxc->id, __glXContextRes, FALSE); } } return Success; } int __glXDisp_MakeCurrent(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDisp_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDisp_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDisp_IsDirect(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; xGLXIsDirectReply reply; __GLXcontext *glxc; int err; if (!validGlxContext(cl->client, req->context, DixReadAccess, &glxc, &err)) return err; reply = (xGLXIsDirectReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .isDirect = glxc->isDirect }; if (client->swapped) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); } WriteToClient(client, sz_xGLXIsDirectReply, &reply); return Success; } int __glXDisp_QueryVersion(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; xGLXQueryVersionReply reply; GLuint major, minor; REQUEST_SIZE_MATCH(xGLXQueryVersionReq); major = req->majorVersion; minor = req->minorVersion; (void) major; (void) minor; /* ** Server should take into consideration the version numbers sent by the ** client if it wants to work with older clients; however, in this ** implementation the server just returns its version number. */ reply = (xGLXQueryVersionReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_GLX_MAJOR_VERSION, .minorVersion = SERVER_GLX_MINOR_VERSION }; if (client->swapped) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.majorVersion); __GLX_SWAP_INT(&reply.minorVersion); } WriteToClient(client, sz_xGLXQueryVersionReply, &reply); return Success; } int __glXDisp_WaitGL(__GLXclientState * cl, GLbyte * pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; GLXContextTag tag; __GLXcontext *glxc = NULL; int error; tag = req->contextTag; if (tag) { glxc = __glXLookupContextByTag(cl, tag); if (!glxc) return __glXError(GLXBadContextTag); if (!__glXForceCurrent(cl, req->contextTag, &error)) return error; glFinish(); } if (glxc && glxc->drawPriv && glxc->drawPriv->waitGL) (*glxc->drawPriv->waitGL) (glxc->drawPriv); return Success; } int __glXDisp_WaitX(__GLXclientState * cl, GLbyte * pc) { xGLXWaitXReq *req = (xGLXWaitXReq *) pc; GLXContextTag tag; __GLXcontext *glxc = NULL; int error; tag = req->contextTag; if (tag) { glxc = __glXLookupContextByTag(cl, tag); if (!glxc) return __glXError(GLXBadContextTag); if (!__glXForceCurrent(cl, req->contextTag, &error)) return error; } if (glxc && glxc->drawPriv && glxc->drawPriv->waitX) (*glxc->drawPriv->waitX) (glxc->drawPriv); return Success; } int __glXDisp_CopyContext(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; GLXContextID source; GLXContextID dest; GLXContextTag tag; unsigned long mask; __GLXcontext *src, *dst; int error; source = req->source; dest = req->dest; tag = req->contextTag; mask = req->mask; if (!validGlxContext(cl->client, source, DixReadAccess, &src, &error)) return error; if (!validGlxContext(cl->client, dest, DixWriteAccess, &dst, &error)) return error; /* ** They must be in the same address space, and same screen. ** NOTE: no support for direct rendering contexts here. */ if (src->isDirect || dst->isDirect || (src->pGlxScreen != dst->pGlxScreen)) { client->errorValue = source; return BadMatch; } /* ** The destination context must not be current for any client. */ if (dst->currentClient) { client->errorValue = dest; return BadAccess; } if (tag) { __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag); if (!tagcx) { return __glXError(GLXBadContextTag); } if (tagcx != src) { /* ** This would be caused by a faulty implementation of the client ** library. */ return BadMatch; } /* ** In this case, glXCopyContext is in both GL and X streams, in terms ** of sequentiality. */ if (__glXForceCurrent(cl, tag, &error)) { /* ** Do whatever is needed to make sure that all preceding requests ** in both streams are completed before the copy is executed. */ glFinish(); } else { return error; } } /* ** Issue copy. The only reason for failure is a bad mask. */ if (!(*dst->copy) (dst, src, mask)) { client->errorValue = mask; return BadValue; } return Success; } enum { GLX_VIS_CONFIG_UNPAIRED = 18, GLX_VIS_CONFIG_PAIRED = 22 }; enum { GLX_VIS_CONFIG_TOTAL = GLX_VIS_CONFIG_UNPAIRED + GLX_VIS_CONFIG_PAIRED }; int __glXDisp_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc) { xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; ClientPtr client = cl->client; xGLXGetVisualConfigsReply reply; __GLXscreen *pGlxScreen; __GLXconfig *modes; CARD32 buf[GLX_VIS_CONFIG_TOTAL]; int p, i, err; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; reply = (xGLXGetVisualConfigsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = (pGlxScreen->numVisuals * __GLX_SIZE_CARD32 * GLX_VIS_CONFIG_TOTAL) >> 2, .numVisuals = pGlxScreen->numVisuals, .numProps = GLX_VIS_CONFIG_TOTAL }; if (client->swapped) { __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.numVisuals); __GLX_SWAP_INT(&reply.numProps); } WriteToClient(client, sz_xGLXGetVisualConfigsReply, &reply); for (i = 0; i < pGlxScreen->numVisuals; i++) { modes = pGlxScreen->visuals[i]; p = 0; buf[p++] = modes->visualID; buf[p++] = glxConvertToXVisualType(modes->visualType); buf[p++] = (modes->renderType & GLX_RGBA_BIT) ? GL_TRUE : GL_FALSE; buf[p++] = modes->redBits; buf[p++] = modes->greenBits; buf[p++] = modes->blueBits; buf[p++] = modes->alphaBits; buf[p++] = modes->accumRedBits; buf[p++] = modes->accumGreenBits; buf[p++] = modes->accumBlueBits; buf[p++] = modes->accumAlphaBits; buf[p++] = modes->doubleBufferMode; buf[p++] = modes->stereoMode; buf[p++] = modes->rgbBits; buf[p++] = modes->depthBits; buf[p++] = modes->stencilBits; buf[p++] = modes->numAuxBuffers; buf[p++] = modes->level; assert(p == GLX_VIS_CONFIG_UNPAIRED); /* ** Add token/value pairs for extensions. */ buf[p++] = GLX_VISUAL_CAVEAT_EXT; buf[p++] = modes->visualRating; buf[p++] = GLX_TRANSPARENT_TYPE; buf[p++] = modes->transparentPixel; buf[p++] = GLX_TRANSPARENT_RED_VALUE; buf[p++] = modes->transparentRed; buf[p++] = GLX_TRANSPARENT_GREEN_VALUE; buf[p++] = modes->transparentGreen; buf[p++] = GLX_TRANSPARENT_BLUE_VALUE; buf[p++] = modes->transparentBlue; buf[p++] = GLX_TRANSPARENT_ALPHA_VALUE; buf[p++] = modes->transparentAlpha; buf[p++] = GLX_TRANSPARENT_INDEX_VALUE; buf[p++] = modes->transparentIndex; buf[p++] = GLX_SAMPLES_SGIS; buf[p++] = modes->samples; buf[p++] = GLX_SAMPLE_BUFFERS_SGIS; buf[p++] = modes->sampleBuffers; buf[p++] = GLX_VISUAL_SELECT_GROUP_SGIX; buf[p++] = modes->visualSelectGroup; /* Add attribute only if its value is not default. */ if (modes->sRGBCapable != GL_FALSE) { buf[p++] = GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT; buf[p++] = modes->sRGBCapable; } /* Pad with zeroes, so that attributes count is constant. */ while (p < GLX_VIS_CONFIG_TOTAL) { buf[p++] = 0; } assert(p == GLX_VIS_CONFIG_TOTAL); if (client->swapped) { __GLX_SWAP_INT_ARRAY(buf, p); } WriteToClient(client, __GLX_SIZE_CARD32 * p, buf); } return Success; } #define __GLX_TOTAL_FBCONFIG_ATTRIBS (44) #define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2) /** * Send the set of GLXFBConfigs to the client. There is not currently * and interface into the driver on the server-side to get GLXFBConfigs, * so we "invent" some based on the \c __GLXvisualConfig structures that * the driver does supply. * * The reply format for both \c glXGetFBConfigs and \c glXGetFBConfigsSGIX * is the same, so this routine pulls double duty. */ static int DoGetFBConfigs(__GLXclientState * cl, unsigned screen) { ClientPtr client = cl->client; xGLXGetFBConfigsReply reply; __GLXscreen *pGlxScreen; CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH]; int p, err; __GLXconfig *modes; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; if (!validGlxScreen(cl->client, screen, &pGlxScreen, &err)) return err; reply = (xGLXGetFBConfigsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = __GLX_FBCONFIG_ATTRIBS_LENGTH * pGlxScreen->numFBConfigs, .numFBConfigs = pGlxScreen->numFBConfigs, .numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS }; if (client->swapped) { __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.numFBConfigs); __GLX_SWAP_INT(&reply.numAttribs); } WriteToClient(client, sz_xGLXGetFBConfigsReply, &reply); for (modes = pGlxScreen->fbconfigs; modes != NULL; modes = modes->next) { p = 0; #define WRITE_PAIR(tag,value) \ do { buf[p++] = tag ; buf[p++] = value ; } while( 0 ) WRITE_PAIR(GLX_VISUAL_ID, modes->visualID); WRITE_PAIR(GLX_FBCONFIG_ID, modes->fbconfigID); WRITE_PAIR(GLX_X_RENDERABLE, (modes->drawableType & (GLX_WINDOW_BIT | GLX_PIXMAP_BIT) ? GL_TRUE : GL_FALSE)); WRITE_PAIR(GLX_RGBA, (modes->renderType & GLX_RGBA_BIT) ? GL_TRUE : GL_FALSE); WRITE_PAIR(GLX_RENDER_TYPE, modes->renderType); WRITE_PAIR(GLX_DOUBLEBUFFER, modes->doubleBufferMode); WRITE_PAIR(GLX_STEREO, modes->stereoMode); WRITE_PAIR(GLX_BUFFER_SIZE, modes->rgbBits); WRITE_PAIR(GLX_LEVEL, modes->level); WRITE_PAIR(GLX_AUX_BUFFERS, modes->numAuxBuffers); WRITE_PAIR(GLX_RED_SIZE, modes->redBits); WRITE_PAIR(GLX_GREEN_SIZE, modes->greenBits); WRITE_PAIR(GLX_BLUE_SIZE, modes->blueBits); WRITE_PAIR(GLX_ALPHA_SIZE, modes->alphaBits); WRITE_PAIR(GLX_ACCUM_RED_SIZE, modes->accumRedBits); WRITE_PAIR(GLX_ACCUM_GREEN_SIZE, modes->accumGreenBits); WRITE_PAIR(GLX_ACCUM_BLUE_SIZE, modes->accumBlueBits); WRITE_PAIR(GLX_ACCUM_ALPHA_SIZE, modes->accumAlphaBits); WRITE_PAIR(GLX_DEPTH_SIZE, modes->depthBits); WRITE_PAIR(GLX_STENCIL_SIZE, modes->stencilBits); WRITE_PAIR(GLX_X_VISUAL_TYPE, modes->visualType); WRITE_PAIR(GLX_CONFIG_CAVEAT, modes->visualRating); WRITE_PAIR(GLX_TRANSPARENT_TYPE, modes->transparentPixel); WRITE_PAIR(GLX_TRANSPARENT_RED_VALUE, modes->transparentRed); WRITE_PAIR(GLX_TRANSPARENT_GREEN_VALUE, modes->transparentGreen); WRITE_PAIR(GLX_TRANSPARENT_BLUE_VALUE, modes->transparentBlue); WRITE_PAIR(GLX_TRANSPARENT_ALPHA_VALUE, modes->transparentAlpha); WRITE_PAIR(GLX_TRANSPARENT_INDEX_VALUE, modes->transparentIndex); WRITE_PAIR(GLX_SWAP_METHOD_OML, modes->swapMethod); WRITE_PAIR(GLX_SAMPLES_SGIS, modes->samples); WRITE_PAIR(GLX_SAMPLE_BUFFERS_SGIS, modes->sampleBuffers); WRITE_PAIR(GLX_VISUAL_SELECT_GROUP_SGIX, modes->visualSelectGroup); WRITE_PAIR(GLX_DRAWABLE_TYPE, modes->drawableType); WRITE_PAIR(GLX_BIND_TO_TEXTURE_RGB_EXT, modes->bindToTextureRgb); WRITE_PAIR(GLX_BIND_TO_TEXTURE_RGBA_EXT, modes->bindToTextureRgba); WRITE_PAIR(GLX_BIND_TO_MIPMAP_TEXTURE_EXT, modes->bindToMipmapTexture); WRITE_PAIR(GLX_BIND_TO_TEXTURE_TARGETS_EXT, modes->bindToTextureTargets); /* can't report honestly until mesa is fixed */ WRITE_PAIR(GLX_Y_INVERTED_EXT, GLX_DONT_CARE); if (modes->drawableType & GLX_PBUFFER_BIT) { WRITE_PAIR(GLX_MAX_PBUFFER_WIDTH, modes->maxPbufferWidth); WRITE_PAIR(GLX_MAX_PBUFFER_HEIGHT, modes->maxPbufferHeight); WRITE_PAIR(GLX_MAX_PBUFFER_PIXELS, modes->maxPbufferPixels); WRITE_PAIR(GLX_OPTIMAL_PBUFFER_WIDTH_SGIX, modes->optimalPbufferWidth); WRITE_PAIR(GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX, modes->optimalPbufferHeight); } /* Add attribute only if its value is not default. */ if (modes->sRGBCapable != GL_FALSE) { WRITE_PAIR(GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT, modes->sRGBCapable); } /* Pad the remaining place with zeroes, so that attributes count is constant. */ while (p < __GLX_FBCONFIG_ATTRIBS_LENGTH) { WRITE_PAIR(0, 0); } assert(p == __GLX_FBCONFIG_ATTRIBS_LENGTH); if (client->swapped) { __GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH); } WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH, (char *) buf); } return Success; } int __glXDisp_GetFBConfigs(__GLXclientState * cl, GLbyte * pc) { xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; return DoGetFBConfigs(cl, req->screen); } int __glXDisp_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; /* work around mesa bug, don't use REQUEST_SIZE_MATCH */ REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq); return DoGetFBConfigs(cl, req->screen); } GLboolean __glXDrawableInit(__GLXdrawable * drawable, __GLXscreen * screen, DrawablePtr pDraw, int type, XID drawId, __GLXconfig * config) { drawable->pDraw = pDraw; drawable->type = type; drawable->drawId = drawId; drawable->config = config; drawable->eventMask = 0; return GL_TRUE; } void __glXDrawableRelease(__GLXdrawable * drawable) { } static int DoCreateGLXDrawable(ClientPtr client, __GLXscreen * pGlxScreen, __GLXconfig * config, DrawablePtr pDraw, XID drawableId, XID glxDrawableId, int type) { __GLXdrawable *pGlxDraw; if (pGlxScreen->pScreen != pDraw->pScreen) return BadMatch; pGlxDraw = pGlxScreen->createDrawable(client, pGlxScreen, pDraw, drawableId, type, glxDrawableId, config); if (pGlxDraw == NULL) return BadAlloc; if (!AddResource(glxDrawableId, __glXDrawableRes, pGlxDraw)) return BadAlloc; /* * Windows aren't refcounted, so track both the X and the GLX window * so we get called regardless of destruction order. */ if (drawableId != glxDrawableId && type == GLX_DRAWABLE_WINDOW && !AddResource(pDraw->id, __glXDrawableRes, pGlxDraw)) return BadAlloc; return Success; } static int DoCreateGLXPixmap(ClientPtr client, __GLXscreen * pGlxScreen, __GLXconfig * config, XID drawableId, XID glxDrawableId) { DrawablePtr pDraw; int err; err = dixLookupDrawable(&pDraw, drawableId, client, 0, DixAddAccess); if (err != Success) { client->errorValue = drawableId; return err; } if (pDraw->type != DRAWABLE_PIXMAP) { client->errorValue = drawableId; return BadPixmap; } err = DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, drawableId, glxDrawableId, GLX_DRAWABLE_PIXMAP); if (err == Success) ((PixmapPtr) pDraw)->refcnt++; return err; } static void determineTextureTarget(ClientPtr client, XID glxDrawableID, CARD32 *attribs, CARD32 numAttribs) { GLenum target = 0; GLenum format = 0; int i, err; __GLXdrawable *pGlxDraw; if (!validGlxDrawable(client, glxDrawableID, GLX_DRAWABLE_PIXMAP, DixWriteAccess, &pGlxDraw, &err)) /* We just added it in CreatePixmap, so we should never get here. */ return; for (i = 0; i < numAttribs; i++) { if (attribs[2 * i] == GLX_TEXTURE_TARGET_EXT) { switch (attribs[2 * i + 1]) { case GLX_TEXTURE_2D_EXT: target = GL_TEXTURE_2D; break; case GLX_TEXTURE_RECTANGLE_EXT: target = GL_TEXTURE_RECTANGLE_ARB; break; } } if (attribs[2 * i] == GLX_TEXTURE_FORMAT_EXT) format = attribs[2 * i + 1]; } if (!target) { int w = pGlxDraw->pDraw->width, h = pGlxDraw->pDraw->height; if (h & (h - 1) || w & (w - 1)) target = GL_TEXTURE_RECTANGLE_ARB; else target = GL_TEXTURE_2D; } pGlxDraw->target = target; pGlxDraw->format = format; } int __glXDisp_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc) { xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxVisual(cl->client, pGlxScreen, req->visual, &config, &err)) return err; return DoCreateGLXPixmap(cl->client, pGlxScreen, config, req->pixmap, req->glxpixmap); } int __glXDisp_CreatePixmap(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; REQUEST_AT_LEAST_SIZE(xGLXCreatePixmapReq); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3); if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) return err; err = DoCreateGLXPixmap(cl->client, pGlxScreen, config, req->pixmap, req->glxpixmap); if (err != Success) return err; determineTextureTarget(cl->client, req->glxpixmap, (CARD32 *) (req + 1), req->numAttribs); return Success; } int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateGLXPixmapWithConfigSGIXReq *req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; int err; REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapWithConfigSGIXReq); if (!validGlxScreen(cl->client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(cl->client, pGlxScreen, req->fbconfig, &config, &err)) return err; return DoCreateGLXPixmap(cl->client, pGlxScreen, config, req->pixmap, req->glxpixmap); } static int DoDestroyDrawable(__GLXclientState * cl, XID glxdrawable, int type) { __GLXdrawable *pGlxDraw; int err; if (!validGlxDrawable(cl->client, glxdrawable, type, DixDestroyAccess, &pGlxDraw, &err)) return err; FreeResource(glxdrawable, FALSE); return Success; } int __glXDisp_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc) { xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP); } int __glXDisp_DestroyPixmap(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc; /* should be REQUEST_SIZE_MATCH, but mesa's glXDestroyPixmap used to set * length to 3 instead of 2 */ REQUEST_AT_LEAST_SIZE(xGLXDestroyPixmapReq); return DoDestroyDrawable(cl, req->glxpixmap, GLX_DRAWABLE_PIXMAP); } static int DoCreatePbuffer(ClientPtr client, int screenNum, XID fbconfigId, int width, int height, XID glxDrawableId) { __GLXconfig *config; __GLXscreen *pGlxScreen; PixmapPtr pPixmap; int err; if (!validGlxScreen(client, screenNum, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(client, pGlxScreen, fbconfigId, &config, &err)) return err; pPixmap = (*pGlxScreen->pScreen->CreatePixmap) (pGlxScreen->pScreen, width, height, config->rgbBits, 0); if (!pPixmap) return BadAlloc; err = XaceHook(XACE_RESOURCE_ACCESS, client, glxDrawableId, RT_PIXMAP, pPixmap, RT_NONE, NULL, DixCreateAccess); if (err != Success) { (*pGlxScreen->pScreen->DestroyPixmap) (pPixmap); return err; } /* Assign the pixmap the same id as the pbuffer and add it as a * resource so it and the DRI2 drawable will be reclaimed when the * pbuffer is destroyed. */ pPixmap->drawable.id = glxDrawableId; if (!AddResource(pPixmap->drawable.id, RT_PIXMAP, pPixmap)) return BadAlloc; return DoCreateGLXDrawable(client, pGlxScreen, config, &pPixmap->drawable, glxDrawableId, glxDrawableId, GLX_DRAWABLE_PBUFFER); } int __glXDisp_CreatePbuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; CARD32 *attrs; int width, height, i; REQUEST_AT_LEAST_SIZE(xGLXCreatePbufferReq); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3); attrs = (CARD32 *) (req + 1); width = 0; height = 0; for (i = 0; i < req->numAttribs; i++) { switch (attrs[i * 2]) { case GLX_PBUFFER_WIDTH: width = attrs[i * 2 + 1]; break; case GLX_PBUFFER_HEIGHT: height = attrs[i * 2 + 1]; break; case GLX_LARGEST_PBUFFER: /* FIXME: huh... */ break; } } return DoCreatePbuffer(cl->client, req->screen, req->fbconfig, width, height, req->pbuffer); } int __glXDisp_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc; REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq); /* * We should really handle attributes correctly, but this extension * is so rare I have difficulty caring. */ return DoCreatePbuffer(cl->client, req->screen, req->fbconfig, req->width, req->height, req->pbuffer); } int __glXDisp_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; REQUEST_SIZE_MATCH(xGLXDestroyPbufferReq); return DoDestroyDrawable(cl, req->pbuffer, GLX_DRAWABLE_PBUFFER); } int __glXDisp_DestroyGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc; REQUEST_SIZE_MATCH(xGLXDestroyGLXPbufferSGIXReq); return DoDestroyDrawable(cl, req->pbuffer, GLX_DRAWABLE_PBUFFER); } static int DoChangeDrawableAttributes(ClientPtr client, XID glxdrawable, int numAttribs, CARD32 *attribs) { __GLXdrawable *pGlxDraw; int i, err; if (!validGlxDrawable(client, glxdrawable, GLX_DRAWABLE_ANY, DixSetAttrAccess, &pGlxDraw, &err)) return err; for (i = 0; i < numAttribs; i++) { switch (attribs[i * 2]) { case GLX_EVENT_MASK: /* All we do is to record the event mask so we can send it * back when queried. We never actually clobber the * pbuffers, so we never need to send out the event. */ pGlxDraw->eventMask = attribs[i * 2 + 1]; break; } } return Success; } int __glXDisp_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *) pc; REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesReq); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } #if 0 /* mesa sends an additional 8 bytes */ REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesReq, req->numAttribs << 3); #else if (((sizeof(xGLXChangeDrawableAttributesReq) + (req->numAttribs << 3)) >> 2) < client->req_len) return BadLength; #endif return DoChangeDrawableAttributes(cl->client, req->drawable, req->numAttribs, (CARD32 *) (req + 1)); } int __glXDisp_ChangeDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXChangeDrawableAttributesSGIXReq *req = (xGLXChangeDrawableAttributesSGIXReq *) pc; REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesSGIXReq); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq, req->numAttribs << 3); return DoChangeDrawableAttributes(cl->client, req->drawable, req->numAttribs, (CARD32 *) (req + 1)); } int __glXDisp_CreateWindow(__GLXclientState * cl, GLbyte * pc) { xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; __GLXconfig *config; __GLXscreen *pGlxScreen; ClientPtr client = cl->client; DrawablePtr pDraw; int err; REQUEST_AT_LEAST_SIZE(xGLXCreateWindowReq); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3); if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) return err; if (!validGlxFBConfig(client, pGlxScreen, req->fbconfig, &config, &err)) return err; err = dixLookupDrawable(&pDraw, req->window, client, 0, DixAddAccess); if (err != Success || pDraw->type != DRAWABLE_WINDOW) { client->errorValue = req->window; return BadWindow; } if (!validGlxFBConfigForWindow(client, config, pDraw, &err)) return err; return DoCreateGLXDrawable(client, pGlxScreen, config, pDraw, req->window, req->glxwindow, GLX_DRAWABLE_WINDOW); } int __glXDisp_DestroyWindow(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; /* mesa's glXDestroyWindow used to set length to 3 instead of 2 */ REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq); return DoDestroyDrawable(cl, req->glxwindow, GLX_DRAWABLE_WINDOW); } /*****************************************************************************/ /* ** NOTE: There is no portable implementation for swap buffers as of ** this time that is of value. Consequently, this code must be ** implemented by somebody other than SGI. */ int __glXDisp_SwapBuffers(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; GLXContextTag tag; XID drawId; __GLXcontext *glxc = NULL; __GLXdrawable *pGlxDraw; int error; tag = req->contextTag; drawId = req->drawable; if (tag) { glxc = __glXLookupContextByTag(cl, tag); if (!glxc) { return __glXError(GLXBadContextTag); } /* ** The calling thread is swapping its current drawable. In this case, ** glxSwapBuffers is in both GL and X streams, in terms of ** sequentiality. */ if (__glXForceCurrent(cl, tag, &error)) { /* ** Do whatever is needed to make sure that all preceding requests ** in both streams are completed before the swap is executed. */ glFinish(); } else { return error; } } pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); if (pGlxDraw == NULL) return error; if (pGlxDraw->type == DRAWABLE_WINDOW && (*pGlxDraw->swapBuffers) (cl->client, pGlxDraw) == GL_FALSE) return __glXError(GLXBadDrawable); return Success; } static int DoQueryContext(__GLXclientState * cl, GLXContextID gcId) { ClientPtr client = cl->client; __GLXcontext *ctx; xGLXQueryContextInfoEXTReply reply; int nProps = 5; int sendBuf[nProps * 2]; int nReplyBytes; int err; if (!validGlxContext(cl->client, gcId, DixReadAccess, &ctx, &err)) return err; reply = (xGLXQueryContextInfoEXTReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = nProps << 1, .n = nProps }; nReplyBytes = reply.length << 2; sendBuf[0] = GLX_SHARE_CONTEXT_EXT; sendBuf[1] = (int) (ctx->share_id); sendBuf[2] = GLX_VISUAL_ID_EXT; sendBuf[3] = (int) (ctx->config ? ctx->config->visualID : 0); sendBuf[4] = GLX_SCREEN_EXT; sendBuf[5] = (int) (ctx->pGlxScreen->pScreen->myNum); sendBuf[6] = GLX_FBCONFIG_ID; sendBuf[7] = (int) (ctx->config ? ctx->config->fbconfigID : 0); sendBuf[8] = GLX_RENDER_TYPE; sendBuf[9] = (int) (ctx->renderType); if (client->swapped) { int length = reply.length; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.n); WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply); __GLX_SWAP_INT_ARRAY((int *) sendBuf, length); WriteToClient(client, length << 2, sendBuf); } else { WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, &reply); WriteToClient(client, nReplyBytes, sendBuf); } return Success; } int __glXDisp_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; REQUEST_SIZE_MATCH(xGLXQueryContextInfoEXTReq); return DoQueryContext(cl, req->context); } int __glXDisp_QueryContext(__GLXclientState * cl, GLbyte * pc) { xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; return DoQueryContext(cl, req->context); } int __glXDisp_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; __GLXcontext *context; __GLXdrawable *pGlxDraw; GLXDrawable drawId; int buffer; int error; CARD32 num_attribs; if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len) return BadLength; pc += __GLX_VENDPRIV_HDR_SIZE; drawId = *((CARD32 *) (pc)); buffer = *((INT32 *) (pc + 4)); num_attribs = *((CARD32 *) (pc + 8)); if (num_attribs > (UINT32_MAX >> 3)) { client->errorValue = num_attribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 12 + (num_attribs << 3)); if (buffer != GLX_FRONT_LEFT_EXT) return __glXError(GLXBadPixmap); context = __glXForceCurrent(cl, req->contextTag, &error); if (!context) return error; if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, DixReadAccess, &pGlxDraw, &error)) return error; if (!context->bindTexImage) return __glXError(GLXUnsupportedPrivateRequest); return context->bindTexImage(context, buffer, pGlxDraw); } int __glXDisp_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; __GLXdrawable *pGlxDraw; __GLXcontext *context; GLXDrawable drawId; int buffer; int error; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8); pc += __GLX_VENDPRIV_HDR_SIZE; drawId = *((CARD32 *) (pc)); buffer = *((INT32 *) (pc + 4)); context = __glXForceCurrent(cl, req->contextTag, &error); if (!context) return error; if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_PIXMAP, DixReadAccess, &pGlxDraw, &error)) return error; if (!context->releaseTexImage) return __glXError(GLXUnsupportedPrivateRequest); return context->releaseTexImage(context, buffer, pGlxDraw); } int __glXDisp_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXContextTag tag = req->contextTag; __GLXcontext *glxc = NULL; __GLXdrawable *pGlxDraw; ClientPtr client = cl->client; GLXDrawable drawId; int error; int x, y, width, height; (void) client; (void) req; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 20); pc += __GLX_VENDPRIV_HDR_SIZE; drawId = *((CARD32 *) (pc)); x = *((INT32 *) (pc + 4)); y = *((INT32 *) (pc + 8)); width = *((INT32 *) (pc + 12)); height = *((INT32 *) (pc + 16)); if (tag) { glxc = __glXLookupContextByTag(cl, tag); if (!glxc) { return __glXError(GLXBadContextTag); } /* ** The calling thread is swapping its current drawable. In this case, ** glxSwapBuffers is in both GL and X streams, in terms of ** sequentiality. */ if (__glXForceCurrent(cl, tag, &error)) { /* ** Do whatever is needed to make sure that all preceding requests ** in both streams are completed before the swap is executed. */ glFinish(); } else { return error; } } pGlxDraw = __glXGetDrawable(glxc, drawId, client, &error); if (!pGlxDraw) return error; if (pGlxDraw == NULL || pGlxDraw->type != GLX_DRAWABLE_WINDOW || pGlxDraw->copySubBuffer == NULL) return __glXError(GLXBadDrawable); (*pGlxDraw->copySubBuffer) (pGlxDraw, x, y, width, height); return Success; } /* hack for old glxext.h */ #ifndef GLX_STEREO_TREE_EXT #define GLX_STEREO_TREE_EXT 0x20F5 #endif /* ** Get drawable attributes */ static int DoGetDrawableAttributes(__GLXclientState * cl, XID drawId) { ClientPtr client = cl->client; xGLXGetDrawableAttributesReply reply; __GLXdrawable *pGlxDraw = NULL; DrawablePtr pDraw; CARD32 attributes[20]; int num = 0, error; if (!validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, DixGetAttrAccess, &pGlxDraw, &error)) { /* hack for GLX 1.2 naked windows */ int err = dixLookupWindow((WindowPtr *)&pDraw, drawId, client, DixGetAttrAccess); if (err != Success) return __glXError(GLXBadDrawable); } if (pGlxDraw) pDraw = pGlxDraw->pDraw; #define ATTRIB(a, v) do { \ attributes[2*num] = (a); \ attributes[2*num+1] = (v); \ num++; \ } while (0) ATTRIB(GLX_Y_INVERTED_EXT, GL_FALSE); ATTRIB(GLX_WIDTH, pDraw->width); ATTRIB(GLX_HEIGHT, pDraw->height); ATTRIB(GLX_SCREEN, pDraw->pScreen->myNum); if (pGlxDraw) { ATTRIB(GLX_TEXTURE_TARGET_EXT, pGlxDraw->target == GL_TEXTURE_2D ? GLX_TEXTURE_2D_EXT : GLX_TEXTURE_RECTANGLE_EXT); ATTRIB(GLX_EVENT_MASK, pGlxDraw->eventMask); ATTRIB(GLX_FBCONFIG_ID, pGlxDraw->config->fbconfigID); if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) { ATTRIB(GLX_PRESERVED_CONTENTS, GL_TRUE); } if (pGlxDraw->type == GLX_DRAWABLE_WINDOW) { ATTRIB(GLX_STEREO_TREE_EXT, 0); } } /* GLX_EXT_get_drawable_type */ if (!pGlxDraw || pGlxDraw->type == GLX_DRAWABLE_WINDOW) ATTRIB(GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT); else if (pGlxDraw->type == GLX_DRAWABLE_PIXMAP) ATTRIB(GLX_DRAWABLE_TYPE, GLX_PIXMAP_BIT); else if (pGlxDraw->type == GLX_DRAWABLE_PBUFFER) ATTRIB(GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT); #undef ATTRIB reply = (xGLXGetDrawableAttributesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = num << 1, .numAttribs = num }; if (client->swapped) { int length = reply.length; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.numAttribs); WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply); __GLX_SWAP_INT_ARRAY((int *) attributes, length); WriteToClient(client, length << 2, attributes); } else { WriteToClient(client, sz_xGLXGetDrawableAttributesReply, &reply); WriteToClient(client, reply.length * sizeof(CARD32), attributes); } return Success; } int __glXDisp_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc; /* this should be REQUEST_SIZE_MATCH, but mesa sends an additional 4 bytes */ REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq); return DoGetDrawableAttributes(cl, req->drawable); } int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXGetDrawableAttributesSGIXReq *req = (xGLXGetDrawableAttributesSGIXReq *) pc; REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesSGIXReq); return DoGetDrawableAttributes(cl, req->drawable); } /************************************************************************/ /* ** Render and Renderlarge are not in the GLX API. They are used by the GLX ** client library to send batches of GL rendering commands. */ /* ** Reset state used to keep track of large (multi-request) commands. */ static void ResetLargeCommandStatus(__GLXcontext *cx) { cx->largeCmdBytesSoFar = 0; cx->largeCmdBytesTotal = 0; cx->largeCmdRequestsSoFar = 0; cx->largeCmdRequestsTotal = 0; } /* ** Execute all the drawing commands in a request. */ int __glXDisp_Render(__GLXclientState * cl, GLbyte * pc) { xGLXRenderReq *req; ClientPtr client = cl->client; int left, cmdlen, error; int commandsDone; CARD16 opcode; __GLXrenderHeader *hdr; __GLXcontext *glxc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXRenderReq); req = (xGLXRenderReq *) pc; if (client->swapped) { __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); } glxc = __glXForceCurrent(cl, req->contextTag, &error); if (!glxc) { return error; } commandsDone = 0; pc += sz_xGLXRenderReq; left = (req->length << 2) - sz_xGLXRenderReq; while (left > 0) { __GLXrenderSizeData entry; int extra = 0; __GLXdispatchRenderProcPtr proc; int err; if (left < sizeof(__GLXrenderHeader)) return BadLength; /* ** Verify that the header length and the overall length agree. ** Also, each command must be word aligned. */ hdr = (__GLXrenderHeader *) pc; if (client->swapped) { __GLX_SWAP_SHORT(&hdr->length); __GLX_SWAP_SHORT(&hdr->opcode); } cmdlen = hdr->length; opcode = hdr->opcode; if (left < cmdlen) return BadLength; /* ** Check for core opcodes and grab entry data. */ err = __glXGetProtocolSizeData(&Render_dispatch_info, opcode, &entry); proc = (__GLXdispatchRenderProcPtr) __glXGetProtocolDecodeFunction(&Render_dispatch_info, opcode, client->swapped); if ((err < 0) || (proc == NULL)) { client->errorValue = commandsDone; return __glXError(GLXBadRenderRequest); } if (cmdlen < entry.bytes) { return BadLength; } if (entry.varsize) { /* variable size command */ extra = (*entry.varsize) (pc + __GLX_RENDER_HDR_SIZE, client->swapped, left - __GLX_RENDER_HDR_SIZE); if (extra < 0) { return BadLength; } } if (cmdlen != safe_pad(safe_add(entry.bytes, extra))) { return BadLength; } /* ** Skip over the header and execute the command. We allow the ** caller to trash the command memory. This is useful especially ** for things that require double alignment - they can just shift ** the data towards lower memory (trashing the header) by 4 bytes ** and achieve the required alignment. */ (*proc) (pc + __GLX_RENDER_HDR_SIZE); pc += cmdlen; left -= cmdlen; commandsDone++; } return Success; } /* ** Execute a large rendering request (one that spans multiple X requests). */ int __glXDisp_RenderLarge(__GLXclientState * cl, GLbyte * pc) { xGLXRenderLargeReq *req; ClientPtr client = cl->client; size_t dataBytes; __GLXrenderLargeHeader *hdr; __GLXcontext *glxc; int error; CARD16 opcode; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXRenderLargeReq); req = (xGLXRenderLargeReq *) pc; if (client->swapped) { __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(&req->dataBytes); __GLX_SWAP_SHORT(&req->requestNumber); __GLX_SWAP_SHORT(&req->requestTotal); } glxc = __glXForceCurrent(cl, req->contextTag, &error); if (!glxc) { return error; } if (safe_pad(req->dataBytes) < 0) return BadLength; dataBytes = req->dataBytes; /* ** Check the request length. */ if ((req->length << 2) != safe_pad(dataBytes) + sz_xGLXRenderLargeReq) { client->errorValue = req->length; /* Reset in case this isn't 1st request. */ ResetLargeCommandStatus(glxc); return BadLength; } pc += sz_xGLXRenderLargeReq; if (glxc->largeCmdRequestsSoFar == 0) { __GLXrenderSizeData entry; int extra = 0; int left = (req->length << 2) - sz_xGLXRenderLargeReq; int cmdlen; int err; /* ** This is the first request of a multi request command. ** Make enough space in the buffer, then copy the entire request. */ if (req->requestNumber != 1) { client->errorValue = req->requestNumber; return __glXError(GLXBadLargeRequest); } if (dataBytes < __GLX_RENDER_LARGE_HDR_SIZE) return BadLength; hdr = (__GLXrenderLargeHeader *) pc; if (client->swapped) { __GLX_SWAP_INT(&hdr->length); __GLX_SWAP_INT(&hdr->opcode); } opcode = hdr->opcode; if ((cmdlen = safe_pad(hdr->length)) < 0) return BadLength; /* ** Check for core opcodes and grab entry data. */ err = __glXGetProtocolSizeData(&Render_dispatch_info, opcode, &entry); if (err < 0) { client->errorValue = opcode; return __glXError(GLXBadLargeRequest); } if (entry.varsize) { /* ** If it's a variable-size command (a command whose length must ** be computed from its parameters), all the parameters needed ** will be in the 1st request, so it's okay to do this. */ extra = (*entry.varsize) (pc + __GLX_RENDER_LARGE_HDR_SIZE, client->swapped, left - __GLX_RENDER_LARGE_HDR_SIZE); if (extra < 0) { return BadLength; } } /* the +4 is safe because we know entry.bytes is small */ if (cmdlen != safe_pad(safe_add(entry.bytes + 4, extra))) { return BadLength; } /* ** Make enough space in the buffer, then copy the entire request. */ if (glxc->largeCmdBufSize < cmdlen) { GLbyte *newbuf = glxc->largeCmdBuf; if (!(newbuf = realloc(newbuf, cmdlen))) return BadAlloc; glxc->largeCmdBuf = newbuf; glxc->largeCmdBufSize = cmdlen; } memcpy(glxc->largeCmdBuf, pc, dataBytes); glxc->largeCmdBytesSoFar = dataBytes; glxc->largeCmdBytesTotal = cmdlen; glxc->largeCmdRequestsSoFar = 1; glxc->largeCmdRequestsTotal = req->requestTotal; return Success; } else { /* ** We are receiving subsequent (i.e. not the first) requests of a ** multi request command. */ int bytesSoFar; /* including this packet */ /* ** Check the request number and the total request count. */ if (req->requestNumber != glxc->largeCmdRequestsSoFar + 1) { client->errorValue = req->requestNumber; ResetLargeCommandStatus(glxc); return __glXError(GLXBadLargeRequest); } if (req->requestTotal != glxc->largeCmdRequestsTotal) { client->errorValue = req->requestTotal; ResetLargeCommandStatus(glxc); return __glXError(GLXBadLargeRequest); } /* ** Check that we didn't get too much data. */ if ((bytesSoFar = safe_add(glxc->largeCmdBytesSoFar, dataBytes)) < 0) { client->errorValue = dataBytes; ResetLargeCommandStatus(glxc); return __glXError(GLXBadLargeRequest); } if (bytesSoFar > glxc->largeCmdBytesTotal) { client->errorValue = dataBytes; ResetLargeCommandStatus(glxc); return __glXError(GLXBadLargeRequest); } memcpy(glxc->largeCmdBuf + glxc->largeCmdBytesSoFar, pc, dataBytes); glxc->largeCmdBytesSoFar += dataBytes; glxc->largeCmdRequestsSoFar++; if (req->requestNumber == glxc->largeCmdRequestsTotal) { __GLXdispatchRenderProcPtr proc; /* ** This is the last request; it must have enough bytes to complete ** the command. */ /* NOTE: the pad macro below is needed because the client library ** pads the total byte count, but not the per-request byte counts. ** The Protocol Encoding says the total byte count should not be ** padded, so a proposal will be made to the ARB to relax the ** padding constraint on the total byte count, thus preserving ** backward compatibility. Meanwhile, the padding done below ** fixes a bug that did not allow large commands of odd sizes to ** be accepted by the server. */ if (safe_pad(glxc->largeCmdBytesSoFar) != glxc->largeCmdBytesTotal) { client->errorValue = dataBytes; ResetLargeCommandStatus(glxc); return __glXError(GLXBadLargeRequest); } hdr = (__GLXrenderLargeHeader *) glxc->largeCmdBuf; /* ** The opcode and length field in the header had already been ** swapped when the first request was received. ** ** Use the opcode to index into the procedure table. */ opcode = hdr->opcode; proc = (__GLXdispatchRenderProcPtr) __glXGetProtocolDecodeFunction(&Render_dispatch_info, opcode, client->swapped); if (proc == NULL) { client->errorValue = opcode; return __glXError(GLXBadLargeRequest); } /* ** Skip over the header and execute the command. */ (*proc) (glxc->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE); /* ** Reset for the next RenderLarge series. */ ResetLargeCommandStatus(glxc); } else { /* ** This is neither the first nor the last request. */ } return Success; } } /************************************************************************/ /* ** No support is provided for the vendor-private requests other than ** allocating the entry points in the dispatch table. */ int __glXDisp_VendorPrivate(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLint vendorcode = req->vendorCode; __GLXdispatchVendorPrivProcPtr proc; REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq); proc = (__GLXdispatchVendorPrivProcPtr) __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorcode, 0); if (proc != NULL) { return (*proc) (cl, (GLbyte *) req); } cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } int __glXDisp_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLint vendorcode = req->vendorCode; __GLXdispatchVendorPrivProcPtr proc; REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq); proc = (__GLXdispatchVendorPrivProcPtr) __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorcode, 0); if (proc != NULL) { return (*proc) (cl, (GLbyte *) req); } cl->client->errorValue = vendorcode; return __glXError(GLXUnsupportedPrivateRequest); } int __glXDisp_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; xGLXQueryExtensionsStringReply reply; __GLXscreen *pGlxScreen; size_t n, length; char *buf; int err; if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) return err; n = strlen(pGlxScreen->GLXextensions) + 1; length = __GLX_PAD(n) >> 2; reply = (xGLXQueryExtensionsStringReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = length, .n = n }; /* Allocate buffer to make sure it's a multiple of 4 bytes big. */ buf = calloc(length, 4); if (buf == NULL) return BadAlloc; memcpy(buf, pGlxScreen->GLXextensions, n); if (client->swapped) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.n); WriteToClient(client, sz_xGLXQueryExtensionsStringReply, &reply); __GLX_SWAP_INT_ARRAY((int *) buf, length); WriteToClient(client, length << 2, buf); } else { WriteToClient(client, sz_xGLXQueryExtensionsStringReply, &reply); WriteToClient(client, (int) (length << 2), buf); } free(buf); return Success; } #ifndef GLX_VENDOR_NAMES_EXT #define GLX_VENDOR_NAMES_EXT 0x20F6 #endif int __glXDisp_QueryServerString(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; xGLXQueryServerStringReply reply; size_t n, length; const char *ptr; char *buf; __GLXscreen *pGlxScreen; int err; if (!validGlxScreen(client, req->screen, &pGlxScreen, &err)) return err; switch (req->name) { case GLX_VENDOR: ptr = GLXServerVendorName; break; case GLX_VERSION: ptr = "1.4"; break; case GLX_EXTENSIONS: ptr = pGlxScreen->GLXextensions; break; case GLX_VENDOR_NAMES_EXT: if (pGlxScreen->glvnd) { ptr = pGlxScreen->glvnd; break; } /* else fall through */ default: return BadValue; } n = strlen(ptr) + 1; length = __GLX_PAD(n) >> 2; reply = (xGLXQueryServerStringReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = length, .n = n }; buf = calloc(length, 4); if (buf == NULL) { return BadAlloc; } memcpy(buf, ptr, n); if (client->swapped) { __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.n); WriteToClient(client, sz_xGLXQueryServerStringReply, &reply); /** no swap is needed for an array of chars **/ /* __GLX_SWAP_INT_ARRAY((int *)buf, length); */ WriteToClient(client, length << 2, buf); } else { WriteToClient(client, sz_xGLXQueryServerStringReply, &reply); WriteToClient(client, (int) (length << 2), buf); } free(buf); return Success; } int __glXDisp_ClientInfo(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; const char *buf; REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq); buf = (const char *) (req + 1); if (!memchr(buf, 0, (client->req_len << 2) - sizeof(xGLXClientInfoReq))) return BadLength; free(cl->GLClientextensions); cl->GLClientextensions = strdup(buf); return Success; } #include void __glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, CARD64 msc, CARD32 sbc) { ClientPtr client = clients[CLIENT_ID(drawable->drawId)]; xGLXBufferSwapComplete2 wire = { .type = __glXEventBase + GLX_BufferSwapComplete }; if (!client) return; if (!(drawable->eventMask & GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK)) return; wire.event_type = type; wire.drawable = drawable->drawId; wire.ust_hi = ust >> 32; wire.ust_lo = ust & 0xffffffff; wire.msc_hi = msc >> 32; wire.msc_lo = msc & 0xffffffff; wire.sbc = sbc; WriteEventsToClient(client, 1, (xEvent *) &wire); } #if PRESENT static void __glXpresentCompleteNotify(WindowPtr window, CARD8 present_kind, CARD8 present_mode, CARD32 serial, uint64_t ust, uint64_t msc) { __GLXdrawable *drawable; int glx_type; int rc; if (present_kind != PresentCompleteKindPixmap) return; rc = dixLookupResourceByType((void **) &drawable, window->drawable.id, __glXDrawableRes, serverClient, DixGetAttrAccess); if (rc != Success) return; if (present_mode == PresentCompleteModeFlip) glx_type = GLX_FLIP_COMPLETE_INTEL; else glx_type = GLX_BLIT_COMPLETE_INTEL; __glXsendSwapEvent(drawable, glx_type, ust, msc, serial); } #include void __glXregisterPresentCompleteNotify(void) { present_register_complete_notify(__glXpresentCompleteNotify); } #endif xorg-server-21.1.16/glx/glxcmdsswap.c0000644000175000017500000005177214757411105013141 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "glxserver.h" #include "glxutil.h" #include #include #include #include #include "glxext.h" #include "indirect_dispatch.h" #include "indirect_table.h" #include "indirect_util.h" /************************************************************************/ /* ** Byteswapping versions of GLX commands. In most cases they just swap ** the incoming arguments and then call the unswapped routine. For commands ** that have replies, a separate swapping routine for the reply is provided; ** it is called at the end of the unswapped routine. */ int __glXDispSwap_CreateContext(__GLXclientState * cl, GLbyte * pc) { xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); __GLX_SWAP_INT(&req->visual); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->shareList); return __glXDisp_CreateContext(cl, pc); } int __glXDispSwap_CreateNewContext(__GLXclientState * cl, GLbyte * pc) { xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->renderType); __GLX_SWAP_INT(&req->shareList); return __glXDisp_CreateNewContext(cl, pc); } int __glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXCreateContextWithConfigSGIXReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->renderType); __GLX_SWAP_INT(&req->shareList); return __glXDisp_CreateContextWithConfigSGIX(cl, pc); } int __glXDispSwap_DestroyContext(__GLXclientState * cl, GLbyte * pc) { xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); return __glXDisp_DestroyContext(cl, pc); } int __glXDispSwap_MakeCurrent(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDispSwap_MakeContextCurrent(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDispSwap_MakeCurrentReadSGI(__GLXclientState * cl, GLbyte * pc) { return BadImplementation; } int __glXDispSwap_IsDirect(__GLXclientState * cl, GLbyte * pc) { xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); return __glXDisp_IsDirect(cl, pc); } int __glXDispSwap_QueryVersion(__GLXclientState * cl, GLbyte * pc) { xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->majorVersion); __GLX_SWAP_INT(&req->minorVersion); return __glXDisp_QueryVersion(cl, pc); } int __glXDispSwap_WaitGL(__GLXclientState * cl, GLbyte * pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); return __glXDisp_WaitGL(cl, pc); } int __glXDispSwap_WaitX(__GLXclientState * cl, GLbyte * pc) { xGLXWaitXReq *req = (xGLXWaitXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); return __glXDisp_WaitX(cl, pc); } int __glXDispSwap_CopyContext(__GLXclientState * cl, GLbyte * pc) { xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->source); __GLX_SWAP_INT(&req->dest); __GLX_SWAP_INT(&req->mask); return __glXDisp_CopyContext(cl, pc); } int __glXDispSwap_GetVisualConfigs(__GLXclientState * cl, GLbyte * pc) { xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(&req->screen); return __glXDisp_GetVisualConfigs(cl, pc); } int __glXDispSwap_GetFBConfigs(__GLXclientState * cl, GLbyte * pc) { xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(&req->screen); return __glXDisp_GetFBConfigs(cl, pc); } int __glXDispSwap_GetFBConfigsSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXGetFBConfigsSGIXReq); __GLX_SWAP_INT(&req->screen); return __glXDisp_GetFBConfigsSGIX(cl, pc); } int __glXDispSwap_CreateGLXPixmap(__GLXclientState * cl, GLbyte * pc) { xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->visual); __GLX_SWAP_INT(&req->pixmap); __GLX_SWAP_INT(&req->glxpixmap); return __glXDisp_CreateGLXPixmap(cl, pc); } int __glXDispSwap_CreatePixmap(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; CARD32 *attribs; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXCreatePixmapReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->pixmap); __GLX_SWAP_INT(&req->glxpixmap); __GLX_SWAP_INT(&req->numAttribs); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreatePixmapReq, req->numAttribs << 3); attribs = (CARD32 *) (req + 1); __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); return __glXDisp_CreatePixmap(cl, pc); } int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateGLXPixmapWithConfigSGIXReq *req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXCreateGLXPixmapWithConfigSGIXReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->pixmap); __GLX_SWAP_INT(&req->glxpixmap); return __glXDisp_CreateGLXPixmapWithConfigSGIX(cl, pc); } int __glXDispSwap_DestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc) { xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->glxpixmap); return __glXDisp_DestroyGLXPixmap(cl, pc); } int __glXDispSwap_DestroyPixmap(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXDestroyGLXPixmapReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->glxpixmap); return __glXDisp_DestroyGLXPixmap(cl, pc); } int __glXDispSwap_QueryContext(__GLXclientState * cl, GLbyte * pc) { xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(&req->context); return __glXDisp_QueryContext(cl, pc); } int __glXDispSwap_CreatePbuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; CARD32 *attribs; REQUEST_AT_LEAST_SIZE(xGLXCreatePbufferReq); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->pbuffer); __GLX_SWAP_INT(&req->numAttribs); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreatePbufferReq, req->numAttribs << 3); attribs = (CARD32 *) (req + 1); __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); return __glXDisp_CreatePbuffer(cl, pc); } int __glXDispSwap_CreateGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateGLXPbufferSGIXReq *req = (xGLXCreateGLXPbufferSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXCreateGLXPbufferSGIXReq); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->pbuffer); __GLX_SWAP_INT(&req->width); __GLX_SWAP_INT(&req->height); return __glXDisp_CreateGLXPbufferSGIX(cl, pc); } int __glXDispSwap_DestroyPbuffer(__GLXclientState * cl, GLbyte * pc) { xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(&req->pbuffer); return __glXDisp_DestroyPbuffer(cl, pc); } int __glXDispSwap_DestroyGLXPbufferSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyGLXPbufferSGIXReq *req = (xGLXDestroyGLXPbufferSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXDestroyGLXPbufferSGIXReq); __GLX_SWAP_INT(&req->pbuffer); return __glXDisp_DestroyGLXPbufferSGIX(cl, pc); } int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; CARD32 *attribs; REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesReq); __GLX_SWAP_INT(&req->drawable); __GLX_SWAP_INT(&req->numAttribs); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } if (((sizeof(xGLXChangeDrawableAttributesReq) + (req->numAttribs << 3)) >> 2) < client->req_len) return BadLength; attribs = (CARD32 *) (req + 1); __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); return __glXDisp_ChangeDrawableAttributes(cl, pc); } int __glXDispSwap_ChangeDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXChangeDrawableAttributesSGIXReq *req = (xGLXChangeDrawableAttributesSGIXReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; CARD32 *attribs; REQUEST_AT_LEAST_SIZE(xGLXChangeDrawableAttributesSGIXReq); __GLX_SWAP_INT(&req->drawable); __GLX_SWAP_INT(&req->numAttribs); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXChangeDrawableAttributesSGIXReq, req->numAttribs << 3); attribs = (CARD32 *) (req + 1); __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); return __glXDisp_ChangeDrawableAttributesSGIX(cl, pc); } int __glXDispSwap_CreateWindow(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; CARD32 *attribs; REQUEST_AT_LEAST_SIZE(xGLXCreateWindowReq); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->fbconfig); __GLX_SWAP_INT(&req->window); __GLX_SWAP_INT(&req->glxwindow); __GLX_SWAP_INT(&req->numAttribs); if (req->numAttribs > (UINT32_MAX >> 3)) { client->errorValue = req->numAttribs; return BadValue; } REQUEST_FIXED_SIZE(xGLXCreateWindowReq, req->numAttribs << 3); attribs = (CARD32 *) (req + 1); __GLX_SWAP_INT_ARRAY(attribs, req->numAttribs << 1); return __glXDisp_CreateWindow(cl, pc); } int __glXDispSwap_DestroyWindow(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXDestroyWindowReq); __GLX_SWAP_INT(&req->glxwindow); return __glXDisp_DestroyWindow(cl, pc); } int __glXDispSwap_SwapBuffers(__GLXclientState * cl, GLbyte * pc) { xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(&req->drawable); return __glXDisp_SwapBuffers(cl, pc); } int __glXDispSwap_UseXFont(__GLXclientState * cl, GLbyte * pc) { xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(&req->font); __GLX_SWAP_INT(&req->first); __GLX_SWAP_INT(&req->count); __GLX_SWAP_INT(&req->listBase); return __glXDisp_UseXFont(cl, pc); } int __glXDispSwap_QueryExtensionsString(__GLXclientState * cl, GLbyte * pc) { xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); return __glXDisp_QueryExtensionsString(cl, pc); } int __glXDispSwap_QueryServerString(__GLXclientState * cl, GLbyte * pc) { xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); __GLX_SWAP_INT(&req->name); return __glXDisp_QueryServerString(cl, pc); } int __glXDispSwap_ClientInfo(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->major); __GLX_SWAP_INT(&req->minor); __GLX_SWAP_INT(&req->numbytes); return __glXDisp_ClientInfo(cl, pc); } int __glXDispSwap_QueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXQueryContextInfoEXTReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->context); return __glXDisp_QueryContextInfoEXT(cl, pc); } int __glXDispSwap_BindTexImageEXT(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; int *buffer; CARD32 *num_attribs; __GLX_DECLARE_SWAP_VARIABLES; if ((sizeof(xGLXVendorPrivateReq) + 12) >> 2 > client->req_len) return BadLength; pc += __GLX_VENDPRIV_HDR_SIZE; drawId = ((GLXDrawable *) (pc)); buffer = ((int *) (pc + 4)); num_attribs = ((CARD32 *) (pc + 8)); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(drawId); __GLX_SWAP_INT(buffer); __GLX_SWAP_INT(num_attribs); return __glXDisp_BindTexImageEXT(cl, (GLbyte *) pc); } int __glXDispSwap_ReleaseTexImageEXT(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; int *buffer; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 8); pc += __GLX_VENDPRIV_HDR_SIZE; drawId = ((GLXDrawable *) (pc)); buffer = ((int *) (pc + 4)); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(drawId); __GLX_SWAP_INT(buffer); return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *) pc); } int __glXDispSwap_CopySubBufferMESA(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; GLXDrawable *drawId; int *buffer; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 20); (void) drawId; (void) buffer; pc += __GLX_VENDPRIV_HDR_SIZE; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(pc); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_INT(pc + 16); return __glXDisp_CopySubBufferMESA(cl, pc); } int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *) pc; CARD32 *data; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXGetDrawableAttributesSGIXReq); data = (CARD32 *) (req + 1); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); __GLX_SWAP_INT(data); return __glXDisp_GetDrawableAttributesSGIX(cl, pc); } int __glXDispSwap_GetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *) pc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXGetDrawableAttributesReq); __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->drawable); return __glXDisp_GetDrawableAttributes(cl, pc); } /************************************************************************/ /* ** Render and Renderlarge are not in the GLX API. They are used by the GLX ** client library to send batches of GL rendering commands. */ int __glXDispSwap_Render(__GLXclientState * cl, GLbyte * pc) { return __glXDisp_Render(cl, pc); } /* ** Execute a large rendering request (one that spans multiple X requests). */ int __glXDispSwap_RenderLarge(__GLXclientState * cl, GLbyte * pc) { return __glXDisp_RenderLarge(cl, pc); } /************************************************************************/ /* ** No support is provided for the vendor-private requests other than ** allocating these entry points in the dispatch table. */ int __glXDispSwap_VendorPrivate(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateReq *req; GLint vendorcode; __GLXdispatchVendorPrivProcPtr proc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateReq); req = (xGLXVendorPrivateReq *) pc; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); vendorcode = req->vendorCode; proc = (__GLXdispatchVendorPrivProcPtr) __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorcode, 1); if (proc != NULL) { return (*proc) (cl, (GLbyte *) req); } cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } int __glXDispSwap_VendorPrivateWithReply(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXVendorPrivateWithReplyReq *req; GLint vendorcode; __GLXdispatchVendorPrivProcPtr proc; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_AT_LEAST_SIZE(xGLXVendorPrivateWithReplyReq); req = (xGLXVendorPrivateWithReplyReq *) pc; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); vendorcode = req->vendorCode; proc = (__GLXdispatchVendorPrivProcPtr) __glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorcode, 1); if (proc != NULL) { return (*proc) (cl, (GLbyte *) req); } cl->client->errorValue = req->vendorCode; return __glXError(GLXUnsupportedPrivateRequest); } xorg-server-21.1.16/glx/glxcontext.h0000644000175000017500000001142414757411105012777 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GLX_context_h_ #define _GLX_context_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ struct __GLXcontext { void (*destroy) (__GLXcontext * context); int (*makeCurrent) (__GLXcontext * context); int (*loseCurrent) (__GLXcontext * context); int (*copy) (__GLXcontext * dst, __GLXcontext * src, unsigned long mask); Bool (*wait) (__GLXcontext * context, __GLXclientState * cl, int *error); /* EXT_texture_from_pixmap */ int (*bindTexImage) (__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap); int (*releaseTexImage) (__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap); /* ** list of context structs */ __GLXcontext *next; /* ** config struct for this context */ __GLXconfig *config; /* ** Pointer to screen info data for this context. This is set ** when the context is created. */ __GLXscreen *pGlxScreen; /* ** If this context is current for a client, this will be that client */ ClientPtr currentClient; /* ** The XID of this context. */ XID id; /* ** The XID of the shareList context. */ XID share_id; /* ** Whether this context's ID still exists. */ GLboolean idExists; /* ** Whether this context is a direct rendering context. */ GLboolean isDirect; /* ** Current rendering mode for this context. */ GLenum renderMode; /** * Reset notification strategy used when a GPU reset occurs. */ GLenum resetNotificationStrategy; /** * Context release behavior */ GLenum releaseBehavior; /** * Context render type */ int renderType; /* ** Buffers for feedback and selection. */ GLfloat *feedbackBuf; GLint feedbackBufSize; /* number of elements allocated */ GLuint *selectBuf; GLint selectBufSize; /* number of elements allocated */ /* ** Keep track of large rendering commands, which span multiple requests. */ GLint largeCmdBytesSoFar; /* bytes received so far */ GLint largeCmdBytesTotal; /* total bytes expected */ GLint largeCmdRequestsSoFar; /* requests received so far */ GLint largeCmdRequestsTotal; /* total requests expected */ GLbyte *largeCmdBuf; GLint largeCmdBufSize; /* ** The drawable private this context is bound to */ __GLXdrawable *drawPriv; __GLXdrawable *readPriv; }; void __glXContextDestroy(__GLXcontext * context); extern int validGlxScreen(ClientPtr client, int screen, __GLXscreen ** pGlxScreen, int *err); extern int validGlxFBConfig(ClientPtr client, __GLXscreen * pGlxScreen, XID id, __GLXconfig ** config, int *err); extern int validGlxContext(ClientPtr client, XID id, int access_mode, __GLXcontext ** context, int *err); extern __GLXcontext *__glXdirectContextCreate(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * shareContext); #endif /* !__GLX_context_h__ */ xorg-server-21.1.16/glx/glxdrawable.h0000644000175000017500000000530314757411105013073 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GLX_drawable_h_ #define _GLX_drawable_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ /* We just need to avoid clashing with DRAWABLE_{WINDOW,PIXMAP} */ enum { GLX_DRAWABLE_WINDOW, GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_PBUFFER, GLX_DRAWABLE_ANY }; struct __GLXdrawable { void (*destroy) (__GLXdrawable * private); GLboolean(*swapBuffers) (ClientPtr client, __GLXdrawable *); void (*copySubBuffer) (__GLXdrawable * drawable, int x, int y, int w, int h); void (*waitX) (__GLXdrawable *); void (*waitGL) (__GLXdrawable *); DrawablePtr pDraw; XID drawId; /* ** Either GLX_DRAWABLE_PIXMAP, GLX_DRAWABLE_WINDOW or ** GLX_DRAWABLE_PBUFFER. */ int type; /* ** Configuration of the visual to which this drawable was created. */ __GLXconfig *config; GLenum target; GLenum format; /* ** Event mask */ unsigned long eventMask; }; extern int validGlxDrawable(ClientPtr client, XID id, int type, int access_mode, __GLXdrawable **drawable, int *err); #endif /* !__GLX_drawable_h__ */ xorg-server-21.1.16/glx/glxext.c0000644000175000017500000004734314757411105012117 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "glxserver.h" #include #include #include #include "privates.h" #include #include "extinit.h" #include "glx_extinit.h" #include "unpack.h" #include "glxutil.h" #include "glxext.h" #include "indirect_table.h" #include "indirect_util.h" #include "glxvndabi.h" /* ** X resources. */ static int glxGeneration; RESTYPE __glXContextRes; RESTYPE __glXDrawableRes; static DevPrivateKeyRec glxClientPrivateKeyRec; static GlxServerVendor *glvnd_vendor = NULL; #define glxClientPrivateKey (&glxClientPrivateKeyRec) /* ** Forward declarations. */ static int __glXDispatch(ClientPtr); static GLboolean __glXFreeContext(__GLXcontext * cx); /* * This procedure is called when the client who created the context goes away * OR when glXDestroyContext is called. If the context is current for a client * the dispatch layer will have moved the context struct to a fake resource ID * and cx here will be NULL. Otherwise we really free the context. */ static int ContextGone(__GLXcontext * cx, XID id) { if (!cx) return TRUE; if (!cx->currentClient) __glXFreeContext(cx); return TRUE; } static __GLXcontext *glxPendingDestroyContexts; static __GLXcontext *glxAllContexts; static int glxBlockClients; /* ** Destroy routine that gets called when a drawable is freed. A drawable ** contains the ancillary buffers needed for rendering. */ static Bool DrawableGone(__GLXdrawable * glxPriv, XID xid) { __GLXcontext *c, *next; if (glxPriv->type == GLX_DRAWABLE_WINDOW) { /* If this was created by glXCreateWindow, free the matching resource */ if (glxPriv->drawId != glxPriv->pDraw->id) { if (xid == glxPriv->drawId) FreeResourceByType(glxPriv->pDraw->id, __glXDrawableRes, TRUE); else FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); } /* otherwise this window was implicitly created by MakeCurrent */ } for (c = glxAllContexts; c; c = next) { next = c->next; if (c->currentClient && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { /* flush the context */ glFlush(); /* just force a re-bind the next time through */ (*c->loseCurrent) (c); lastGLContext = NULL; } if (c->drawPriv == glxPriv) c->drawPriv = NULL; if (c->readPriv == glxPriv) c->readPriv = NULL; } /* drop our reference to any backing pixmap */ if (glxPriv->type == GLX_DRAWABLE_PIXMAP) glxPriv->pDraw->pScreen->DestroyPixmap((PixmapPtr) glxPriv->pDraw); glxPriv->destroy(glxPriv); return TRUE; } Bool __glXAddContext(__GLXcontext * cx) { /* Register this context as a resource. */ if (!AddResource(cx->id, __glXContextRes, (void *)cx)) { return FALSE; } cx->next = glxAllContexts; glxAllContexts = cx; return TRUE; } static void __glXRemoveFromContextList(__GLXcontext * cx) { __GLXcontext *c, *prev; if (cx == glxAllContexts) glxAllContexts = cx->next; else { prev = glxAllContexts; for (c = glxAllContexts; c; c = c->next) { if (c == cx) prev->next = c->next; prev = c; } } } /* ** Free a context. */ static GLboolean __glXFreeContext(__GLXcontext * cx) { if (cx->idExists || cx->currentClient) return GL_FALSE; __glXRemoveFromContextList(cx); free(cx->feedbackBuf); free(cx->selectBuf); free(cx->largeCmdBuf); if (cx == lastGLContext) { lastGLContext = NULL; } /* We can get here through both regular dispatching from * __glXDispatch() or as a callback from the resource manager. In * the latter case we need to lift the DRI lock manually. */ if (!glxBlockClients) { cx->destroy(cx); } else { cx->next = glxPendingDestroyContexts; glxPendingDestroyContexts = cx; } return GL_TRUE; } /************************************************************************/ /* ** These routines can be used to check whether a particular GL command ** has caused an error. Specifically, we use them to check whether a ** given query has caused an error, in which case a zero-length data ** reply is sent to the client. */ static GLboolean errorOccured = GL_FALSE; /* ** The GL was will call this routine if an error occurs. */ void __glXErrorCallBack(GLenum code) { errorOccured = GL_TRUE; } /* ** Clear the error flag before calling the GL command. */ void __glXClearErrorOccured(void) { errorOccured = GL_FALSE; } /* ** Check if the GL command caused an error. */ GLboolean __glXErrorOccured(void) { return errorOccured; } static int __glXErrorBase; int __glXEventBase; int __glXError(int error) { return __glXErrorBase + error; } __GLXclientState * glxGetClient(ClientPtr pClient) { return dixLookupPrivate(&pClient->devPrivates, glxClientPrivateKey); } static void glxClientCallback(CallbackListPtr *list, void *closure, void *data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; __GLXclientState *cl = glxGetClient(pClient); switch (pClient->clientState) { case ClientStateGone: free(cl->returnBuf); free(cl->GLClientextensions); cl->returnBuf = NULL; cl->GLClientextensions = NULL; break; default: break; } } /************************************************************************/ static __GLXprovider *__glXProviderStack = &__glXDRISWRastProvider; void GlxPushProvider(__GLXprovider * provider) { provider->next = __glXProviderStack; __glXProviderStack = provider; } static Bool checkScreenVisuals(void) { int i, j; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr screen = screenInfo.screens[i]; for (j = 0; j < screen->numVisuals; j++) { if ((screen->visuals[j].class == TrueColor || screen->visuals[j].class == DirectColor) && screen->visuals[j].nplanes > 12) return TRUE; } } return FALSE; } static void GetGLXDrawableBytes(void *value, XID id, ResourceSizePtr size) { __GLXdrawable *draw = value; size->resourceSize = 0; size->pixmapRefSize = 0; size->refCnt = 1; if (draw->type == GLX_DRAWABLE_PIXMAP) { SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); ResourceSizeRec pixmapSize = { 0, }; pixmapSizeFunc((PixmapPtr)draw->pDraw, draw->pDraw->id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } } static void xorgGlxCloseExtension(const ExtensionEntry *extEntry) { if (glvnd_vendor != NULL) { glxServer.destroyVendor(glvnd_vendor); glvnd_vendor = NULL; } lastGLContext = NULL; } static int xorgGlxHandleRequest(ClientPtr client) { return __glXDispatch(client); } static ScreenPtr screenNumToScreen(int screen) { if (screen < 0 || screen >= screenInfo.numScreens) return NULL; return screenInfo.screens[screen]; } static int maybe_swap32(ClientPtr client, int x) { return client->swapped ? bswap_32(x) : x; } static GlxServerVendor * vendorForScreen(ClientPtr client, int screen) { screen = maybe_swap32(client, screen); return glxServer.getVendorForScreen(client, screenNumToScreen(screen)); } /* this ought to be generated */ static int xorgGlxThunkRequest(ClientPtr client) { REQUEST(xGLXVendorPrivateReq); CARD32 vendorCode = maybe_swap32(client, stuff->vendorCode); GlxServerVendor *vendor = NULL; XID resource = 0; int ret; switch (vendorCode) { case X_GLXvop_QueryContextInfoEXT: { xGLXQueryContextInfoEXTReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); if (!(vendor = glxServer.getXIDMap(maybe_swap32(client, req->context)))) return __glXError(GLXBadContext); break; } case X_GLXvop_GetFBConfigsSGIX: { xGLXGetFBConfigsSGIXReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); if (!(vendor = vendorForScreen(client, req->screen))) return BadValue; break; } case X_GLXvop_CreateContextWithConfigSGIX: { xGLXCreateContextWithConfigSGIXReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); resource = maybe_swap32(client, req->context); if (!(vendor = vendorForScreen(client, req->screen))) return BadValue; break; } case X_GLXvop_CreateGLXPixmapWithConfigSGIX: { xGLXCreateGLXPixmapWithConfigSGIXReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); resource = maybe_swap32(client, req->glxpixmap); if (!(vendor = vendorForScreen(client, req->screen))) return BadValue; break; } case X_GLXvop_CreateGLXPbufferSGIX: { xGLXCreateGLXPbufferSGIXReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); resource = maybe_swap32(client, req->pbuffer); if (!(vendor = vendorForScreen(client, req->screen))) return BadValue; break; } /* same offset for the drawable for these three */ case X_GLXvop_DestroyGLXPbufferSGIX: case X_GLXvop_ChangeDrawableAttributesSGIX: case X_GLXvop_GetDrawableAttributesSGIX: { xGLXGetDrawableAttributesSGIXReq *req = (void *)stuff; REQUEST_AT_LEAST_SIZE(*req); if (!(vendor = glxServer.getXIDMap(maybe_swap32(client, req->drawable)))) return __glXError(GLXBadDrawable); break; } /* most things just use the standard context tag */ default: { /* size checked by vnd layer already */ GLXContextTag tag = maybe_swap32(client, stuff->contextTag); vendor = glxServer.getContextTag(client, tag); if (!vendor) return __glXError(GLXBadContextTag); break; } } /* If we're creating a resource, add the map now */ if (resource) { LEGAL_NEW_RESOURCE(resource, client); if (!glxServer.addXIDMap(resource, vendor)) return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret == Success && vendorCode == X_GLXvop_DestroyGLXPbufferSGIX) { xGLXDestroyGLXPbufferSGIXReq *req = (void *)stuff; glxServer.removeXIDMap(maybe_swap32(client, req->pbuffer)); } if (ret != Success) glxServer.removeXIDMap(resource); return ret; } static GlxServerDispatchProc xorgGlxGetDispatchAddress(CARD8 minorOpcode, CARD32 vendorCode) { /* we don't support any other GLX opcodes */ if (minorOpcode != X_GLXVendorPrivate && minorOpcode != X_GLXVendorPrivateWithReply) return NULL; /* we only support some vendor private requests */ if (!__glXGetProtocolDecodeFunction(&VendorPriv_dispatch_info, vendorCode, FALSE)) return NULL; return xorgGlxThunkRequest; } static Bool xorgGlxServerPreInit(const ExtensionEntry *extEntry) { if (glxGeneration != serverGeneration) { /* Mesa requires at least one True/DirectColor visual */ if (!checkScreenVisuals()) return FALSE; __glXContextRes = CreateNewResourceType((DeleteType) ContextGone, "GLXContext"); __glXDrawableRes = CreateNewResourceType((DeleteType) DrawableGone, "GLXDrawable"); if (!__glXContextRes || !__glXDrawableRes) return FALSE; if (!dixRegisterPrivateKey (&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(__GLXclientState))) return FALSE; if (!AddCallback(&ClientStateCallback, glxClientCallback, 0)) return FALSE; __glXErrorBase = extEntry->errorBase; __glXEventBase = extEntry->eventBase; SetResourceTypeSizeFunc(__glXDrawableRes, GetGLXDrawableBytes); #if PRESENT __glXregisterPresentCompleteNotify(); #endif glxGeneration = serverGeneration; } return glxGeneration == serverGeneration; } static void xorgGlxInitGLVNDVendor(void) { if (glvnd_vendor == NULL) { GlxServerImports *imports = NULL; imports = glxServer.allocateServerImports(); if (imports != NULL) { imports->extensionCloseDown = xorgGlxCloseExtension; imports->handleRequest = xorgGlxHandleRequest; imports->getDispatchAddress = xorgGlxGetDispatchAddress; imports->makeCurrent = xorgGlxMakeCurrent; glvnd_vendor = glxServer.createVendor(imports); glxServer.freeServerImports(imports); } } } static void xorgGlxServerInit(CallbackListPtr *pcbl, void *param, void *ext) { const ExtensionEntry *extEntry = ext; int i; if (!xorgGlxServerPreInit(extEntry)) { return; } xorgGlxInitGLVNDVendor(); if (!glvnd_vendor) { return; } for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; __GLXprovider *p; if (glxServer.getVendorForScreen(NULL, pScreen) != NULL) { // There's already a vendor registered. LogMessage(X_INFO, "GLX: Another vendor is already registered for screen %d\n", i); continue; } for (p = __glXProviderStack; p != NULL; p = p->next) { __GLXscreen *glxScreen = p->screenProbe(pScreen); if (glxScreen != NULL) { LogMessage(X_INFO, "GLX: Initialized %s GL provider for screen %d\n", p->name, i); break; } } if (p) { glxServer.setScreenVendor(pScreen, glvnd_vendor); } else { LogMessage(X_INFO, "GLX: no usable GL providers found for screen %d\n", i); } } } Bool xorgGlxCreateVendor(void) { return AddCallback(glxServer.extensionInitCallback, xorgGlxServerInit, NULL); } /************************************************************************/ /* ** Make a context the current one for the GL (in this implementation, there ** is only one instance of the GL, and we use it to serve all GL clients by ** switching it between different contexts). While we are at it, look up ** a context by its tag and return its (__GLXcontext *). */ __GLXcontext * __glXForceCurrent(__GLXclientState * cl, GLXContextTag tag, int *error) { ClientPtr client = cl->client; REQUEST(xGLXSingleReq); __GLXcontext *cx; /* ** See if the context tag is legal; it is managed by the extension, ** so if it's invalid, we have an implementation error. */ cx = __glXLookupContextByTag(cl, tag); if (!cx) { cl->client->errorValue = tag; *error = __glXError(GLXBadContextTag); return 0; } /* If we're expecting a glXRenderLarge request, this better be one. */ if (cx->largeCmdRequestsSoFar != 0 && stuff->glxCode != X_GLXRenderLarge) { client->errorValue = stuff->glxCode; *error = __glXError(GLXBadLargeRequest); return 0; } if (!cx->isDirect) { if (cx->drawPriv == NULL) { /* ** The drawable has vanished. It must be a window, because only ** windows can be destroyed from under us; GLX pixmaps are ** refcounted and don't go away until no one is using them. */ *error = __glXError(GLXBadCurrentWindow); return 0; } } if (cx->wait && (*cx->wait) (cx, cl, error)) return NULL; if (cx == lastGLContext) { /* No need to re-bind */ return cx; } /* Make this context the current one for the GL. */ if (!cx->isDirect) { /* * If it is being forced, it means that this context was already made * current. So it cannot just be made current again without decrementing * refcount's */ (*cx->loseCurrent) (cx); lastGLContext = cx; if (!(*cx->makeCurrent) (cx)) { /* Bind failed, and set the error code. Bummer */ lastGLContext = NULL; cl->client->errorValue = cx->id; *error = __glXError(GLXBadContextState); return 0; } } return cx; } /************************************************************************/ void glxSuspendClients(void) { int i; for (i = 1; i < currentMaxClients; i++) { if (clients[i] && glxGetClient(clients[i])->client) IgnoreClient(clients[i]); } glxBlockClients = TRUE; } void glxResumeClients(void) { __GLXcontext *cx, *next; int i; glxBlockClients = FALSE; for (i = 1; i < currentMaxClients; i++) { if (clients[i] && glxGetClient(clients[i])->client) AttendClient(clients[i]); } for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) { next = cx->next; cx->destroy(cx); } glxPendingDestroyContexts = NULL; } static glx_gpa_proc _get_proc_address; void __glXsetGetProcAddress(glx_gpa_proc get_proc_address) { _get_proc_address = get_proc_address; } void *__glGetProcAddress(const char *proc) { void *ret = (void *) _get_proc_address(proc); return ret ? ret : (void *) NoopDDA; } /* ** Top level dispatcher; all commands are executed from here down. */ static int __glXDispatch(ClientPtr client) { REQUEST(xGLXSingleReq); CARD8 opcode; __GLXdispatchSingleProcPtr proc; __GLXclientState *cl; int retval = BadRequest; opcode = stuff->glxCode; cl = glxGetClient(client); if (!cl->client) cl->client = client; /* If we're currently blocking GLX clients, just put this guy to * sleep, reset the request and return. */ if (glxBlockClients) { ResetCurrentRequest(client); client->sequence--; IgnoreClient(client); return Success; } /* ** Use the opcode to index into the procedure table. */ proc = __glXGetProtocolDecodeFunction(&Single_dispatch_info, opcode, client->swapped); if (proc != NULL) retval = (*proc) (cl, (GLbyte *) stuff); return retval; } xorg-server-21.1.16/glx/glxext.h0000644000175000017500000000556014757411105012117 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _glxext_h_ #define _glxext_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ /* doing #include & #include could cause problems * with overlapping definitions, so let's use the easy way */ #ifndef GLX_RGBA_FLOAT_BIT_ARB #define GLX_RGBA_FLOAT_BIT_ARB 0x00000004 #endif #ifndef GLX_RGBA_FLOAT_TYPE_ARB #define GLX_RGBA_FLOAT_TYPE_ARB 0x20B9 #endif #ifndef GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT #define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 #endif #ifndef GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT #define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 #endif #ifndef GLX_CONTEXT_RELEASE_BEHAVIOR_ARB #define GLX_CONTEXT_RELEASE_BEHAVIOR_ARB 0x2097 #define GLX_CONTEXT_RELEASE_BEHAVIOR_NONE_ARB 0 #define GLX_CONTEXT_RELEASE_BEHAVIOR_FLUSH_ARB 0x2098 #endif extern void __glXFlushContextCache(void); extern Bool __glXAddContext(__GLXcontext * cx); extern void __glXErrorCallBack(GLenum code); extern void __glXClearErrorOccured(void); extern GLboolean __glXErrorOccured(void); extern const char GLServerVersion[]; extern int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap); extern int xorgGlxMakeCurrent(ClientPtr client, GLXContextTag tag, XID drawId, XID readId, XID contextId, GLXContextTag newContextTag); #endif /* _glxext_h_ */ xorg-server-21.1.16/glx/glxdriswrast.c0000644000175000017500000003526514757411105013341 /* * Copyright © 2008 George Sapountzis * Copyright © 2008 Red Hat, Inc * * 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 the * copyright holders not be used in advertising or publicity * pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include #include #include #include #include #include #include #include #include #include "scrnintstr.h" #include "pixmapstr.h" #include "gcstruct.h" #include "os.h" #include "glxserver.h" #include "glxutil.h" #include "glxdricommon.h" #include "extension_string.h" /* RTLD_LOCAL is not defined on Cygwin */ #ifdef __CYGWIN__ #ifndef RTLD_LOCAL #define RTLD_LOCAL 0 #endif #endif typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; struct __GLXDRIscreen { __GLXscreen base; __DRIscreen *driScreen; void *driver; const __DRIcoreExtension *core; const __DRIswrastExtension *swrast; const __DRIcopySubBufferExtension *copySubBuffer; const __DRItexBufferExtension *texBuffer; const __DRIconfig **driConfigs; }; struct __GLXDRIcontext { __GLXcontext base; __DRIcontext *driContext; }; struct __GLXDRIdrawable { __GLXdrawable base; __DRIdrawable *driDrawable; __GLXDRIscreen *screen; }; /* white lie */ extern glx_func_ptr glXGetProcAddressARB(const char *); static void __glXDRIdrawableDestroy(__GLXdrawable * drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; const __DRIcoreExtension *core = private->screen->core; (*core->destroyDrawable) (private->driDrawable); __glXDrawableRelease(drawable); free(private); } static GLboolean __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable * drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; const __DRIcoreExtension *core = private->screen->core; (*core->swapBuffers) (private->driDrawable); return TRUE; } static void __glXDRIdrawableCopySubBuffer(__GLXdrawable * basePrivate, int x, int y, int w, int h) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate; const __DRIcopySubBufferExtension *copySubBuffer = private->screen->copySubBuffer; if (copySubBuffer) (*copySubBuffer->copySubBuffer) (private->driDrawable, x, y, w, h); } static void __glXDRIcontextDestroy(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; (*screen->core->destroyContext) (context->driContext); __glXContextDestroy(&context->base); free(context); } static int __glXDRIcontextMakeCurrent(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; return (*screen->core->bindContext) (context->driContext, draw->driDrawable, read->driDrawable); } static int __glXDRIcontextLoseCurrent(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; return (*screen->core->unbindContext) (context->driContext); } static int __glXDRIcontextCopy(__GLXcontext * baseDst, __GLXcontext * baseSrc, unsigned long mask) { __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen; return (*screen->core->copyContext) (dst->driContext, src->driContext, mask); } static int __glXDRIbindTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * glxPixmap) { __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap; const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer; __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; if (texBuffer == NULL) return Success; #if __DRI_TEX_BUFFER_VERSION >= 2 if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { (*texBuffer->setTexBuffer2) (context->driContext, glxPixmap->target, glxPixmap->format, drawable->driDrawable); } else #endif texBuffer->setTexBuffer(context->driContext, glxPixmap->target, drawable->driDrawable); return Success; } static int __glXDRIreleaseTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap) { /* FIXME: Just unbind the texture? */ return Success; } static __GLXcontext * __glXDRIscreenCreateContext(__GLXscreen * baseScreen, __GLXconfig * glxConfig, __GLXcontext * baseShareContext, unsigned num_attribs, const uint32_t *attribs, int *error) { __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; __GLXDRIcontext *context, *shareContext; __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; const __DRIconfig *driConfig = config ? config->driConfig : NULL; const __DRIcoreExtension *core = screen->core; __DRIcontext *driShare; /* DRISWRAST won't support createContextAttribs, so these parameters will * never be used. */ (void) num_attribs; (void) attribs; (void) error; shareContext = (__GLXDRIcontext *) baseShareContext; if (shareContext) driShare = shareContext->driContext; else driShare = NULL; context = calloc(1, sizeof *context); if (context == NULL) return NULL; context->base.config = glxConfig; context->base.destroy = __glXDRIcontextDestroy; context->base.makeCurrent = __glXDRIcontextMakeCurrent; context->base.loseCurrent = __glXDRIcontextLoseCurrent; context->base.copy = __glXDRIcontextCopy; context->base.bindTexImage = __glXDRIbindTexImage; context->base.releaseTexImage = __glXDRIreleaseTexImage; context->driContext = (*core->createNewContext) (screen->driScreen, driConfig, driShare, context); return &context->base; } static __GLXdrawable * __glXDRIscreenCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig * glxConfig) { __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __GLXDRIdrawable *private; private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { free(private); return NULL; } private->base.destroy = __glXDRIdrawableDestroy; private->base.swapBuffers = __glXDRIdrawableSwapBuffers; private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; private->driDrawable = (*driScreen->swrast->createNewDrawable) (driScreen->driScreen, config->driConfig, private); return &private->base; } static void swrastGetDrawableInfo(__DRIdrawable * draw, int *x, int *y, int *w, int *h, void *loaderPrivate) { __GLXDRIdrawable *drawable = loaderPrivate; DrawablePtr pDraw = drawable->base.pDraw; *x = pDraw->x; *y = pDraw->y; *w = pDraw->width; *h = pDraw->height; } static void swrastPutImage(__DRIdrawable * draw, int op, int x, int y, int w, int h, char *data, void *loaderPrivate) { __GLXDRIdrawable *drawable = loaderPrivate; DrawablePtr pDraw = drawable->base.pDraw; GCPtr gc; __GLXcontext *cx = lastGLContext; if ((gc = GetScratchGC(pDraw->depth, pDraw->pScreen))) { ValidateGC(pDraw, gc); gc->ops->PutImage(pDraw, gc, pDraw->depth, x, y, w, h, 0, ZPixmap, data); FreeScratchGC(gc); } if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } } static void swrastGetImage(__DRIdrawable * draw, int x, int y, int w, int h, char *data, void *loaderPrivate) { __GLXDRIdrawable *drawable = loaderPrivate; DrawablePtr pDraw = drawable->base.pDraw; ScreenPtr pScreen = pDraw->pScreen; __GLXcontext *cx = lastGLContext; pScreen->SourceValidate(pDraw, x, y, w, h, IncludeInferiors); pScreen->GetImage(pDraw, x, y, w, h, ZPixmap, ~0L, data); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } } static const __DRIswrastLoaderExtension swrastLoaderExtension = { {__DRI_SWRAST_LOADER, 1}, swrastGetDrawableInfo, swrastPutImage, swrastGetImage }; static const __DRIextension *loader_extensions[] = { &swrastLoaderExtension.base, NULL }; static void initializeExtensions(__GLXscreen * screen) { const __DRIextension **extensions; __GLXDRIscreen *dri = (__GLXDRIscreen *)screen; int i; __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_no_config_context"); if (dri->swrast->base.version >= 3) { __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context"); __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_no_error"); __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_create_context_es_profile"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_create_context_es2_profile"); } /* these are harmless to enable unconditionally */ __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_framebuffer_sRGB"); __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_fbconfig_packed_float"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_texture_from_pixmap"); extensions = dri->core->getExtensions(dri->driScreen); for (i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, __DRI_COPY_SUB_BUFFER) == 0) { dri->copySubBuffer = (const __DRIcopySubBufferExtension *) extensions[i]; } if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { dri->texBuffer = (const __DRItexBufferExtension *) extensions[i]; } #ifdef __DRI2_FLUSH_CONTROL if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) { __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_context_flush_control"); } #endif } } static void __glXDRIscreenDestroy(__GLXscreen * baseScreen) { int i; __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; (*screen->core->destroyScreen) (screen->driScreen); dlclose(screen->driver); __glXScreenDestroy(baseScreen); if (screen->driConfigs) { for (i = 0; screen->driConfigs[i] != NULL; i++) free((__DRIconfig **) screen->driConfigs[i]); free(screen->driConfigs); } free(screen); } static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) { const char *driverName = "swrast"; __GLXDRIscreen *screen; screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; screen->base.destroy = __glXDRIscreenDestroy; screen->base.createContext = __glXDRIscreenCreateContext; screen->base.createDrawable = __glXDRIscreenCreateDrawable; screen->base.swapInterval = NULL; screen->base.pScreen = pScreen; __glXInitExtensionEnableBits(screen->base.glx_enable_bits); screen->driver = glxProbeDriver(driverName, (void **) &screen->core, __DRI_CORE, 1, (void **) &screen->swrast, __DRI_SWRAST, 1); if (screen->driver == NULL) { goto handle_error; } screen->driScreen = (*screen->swrast->createNewScreen) (pScreen->myNum, loader_extensions, &screen->driConfigs, screen); if (screen->driScreen == NULL) { LogMessage(X_ERROR, "IGLX error: Calling driver entry point failed\n"); goto handle_error; } initializeExtensions(&screen->base); screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs); #if !defined(XQUARTZ) && !defined(WIN32) screen->base.glvnd = strdup("mesa"); #endif __glXScreenInit(&screen->base, pScreen); __glXsetGetProcAddress(glXGetProcAddressARB); LogMessage(X_INFO, "IGLX: Loaded and initialized %s\n", driverName); return &screen->base; handle_error: if (screen->driver) dlclose(screen->driver); free(screen); LogMessage(X_ERROR, "GLX: could not load software renderer\n"); return NULL; } __GLXprovider __glXDRISWRastProvider = { __glXDRIscreenProbe, "DRISWRAST", NULL }; xorg-server-21.1.16/glx/glxdricommon.c0000644000175000017500000003271014757411105013276 /* * Copyright © 2008 Red Hat, Inc * * 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 the * copyright holders not be used in advertising or publicity * pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include #include #include #include #include #include #include #include #include #include "extinit.h" #include "glxserver.h" #include "glxext.h" #include "glxcontext.h" #include "glxscreens.h" #include "glxdricommon.h" #define __ATTRIB(attrib, field) \ { attrib, offsetof(__GLXconfig, field) } static const struct { unsigned int attrib, offset; } attribMap[] = { __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits), __ATTRIB(__DRI_ATTRIB_LEVEL, level), __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits), __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits), __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits), __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits), __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits), __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits), __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits), __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits), __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits), __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits), __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers), __ATTRIB(__DRI_ATTRIB_SAMPLES, samples), __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode), __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode), __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue), __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha), __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask), __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask), __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask), __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask), __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth), __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight), __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels), __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth), __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight), __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod), __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb), __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba), __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture), __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted), __ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable), }; static void setScalar(__GLXconfig * config, unsigned int attrib, unsigned int value) { int i; for (i = 0; i < ARRAY_SIZE(attribMap); i++) if (attribMap[i].attrib == attrib) { *(unsigned int *) ((char *) config + attribMap[i].offset) = value; return; } } static Bool render_type_is_pbuffer_only(unsigned renderType) { /* The GL_ARB_color_buffer_float spec says: * * "Note that floating point rendering is only supported for * GLXPbuffer drawables. The GLX_DRAWABLE_TYPE attribute of the * GLXFBConfig must have the GLX_PBUFFER_BIT bit set and the * GLX_RENDER_TYPE attribute must have the GLX_RGBA_FLOAT_BIT set." */ return !!(renderType & (__DRI_ATTRIB_UNSIGNED_FLOAT_BIT | __DRI_ATTRIB_FLOAT_BIT)); } static int server_has_depth(int depth) { int i; for (i = 0; i < screenInfo.numPixmapFormats; i++) if (screenInfo.formats[i].depth == depth) return 1; return 0; } static __GLXconfig * createModeFromConfig(const __DRIcoreExtension * core, const __DRIconfig * driConfig, unsigned int visualType, GLboolean duplicateForComp) { __GLXDRIconfig *config; GLint renderType = 0; unsigned int attrib, value, drawableType = GLX_PBUFFER_BIT; int i; config = calloc(1, sizeof *config); config->driConfig = driConfig; i = 0; while (core->indexConfigAttrib(driConfig, i++, &attrib, &value)) { switch (attrib) { case __DRI_ATTRIB_RENDER_TYPE: if (value & __DRI_ATTRIB_RGBA_BIT) renderType |= GLX_RGBA_BIT; if (value & __DRI_ATTRIB_COLOR_INDEX_BIT) renderType |= GLX_COLOR_INDEX_BIT; if (value & __DRI_ATTRIB_FLOAT_BIT) renderType |= GLX_RGBA_FLOAT_BIT_ARB; if (value & __DRI_ATTRIB_UNSIGNED_FLOAT_BIT) renderType |= GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT; break; case __DRI_ATTRIB_CONFIG_CAVEAT: if (value & __DRI_ATTRIB_NON_CONFORMANT_CONFIG) config->config.visualRating = GLX_NON_CONFORMANT_CONFIG; else if (value & __DRI_ATTRIB_SLOW_BIT) config->config.visualRating = GLX_SLOW_CONFIG; else config->config.visualRating = GLX_NONE; break; case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS: config->config.bindToTextureTargets = 0; if (value & __DRI_ATTRIB_TEXTURE_1D_BIT) config->config.bindToTextureTargets |= GLX_TEXTURE_1D_BIT_EXT; if (value & __DRI_ATTRIB_TEXTURE_2D_BIT) config->config.bindToTextureTargets |= GLX_TEXTURE_2D_BIT_EXT; if (value & __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT) config->config.bindToTextureTargets |= GLX_TEXTURE_RECTANGLE_BIT_EXT; break; case __DRI_ATTRIB_SWAP_METHOD: /* Workaround for broken dri drivers */ if (value != GLX_SWAP_UNDEFINED_OML && value != GLX_SWAP_COPY_OML && value != GLX_SWAP_EXCHANGE_OML) value = GLX_SWAP_UNDEFINED_OML; /* Fall through. */ default: setScalar(&config->config, attrib, value); break; } } if (!render_type_is_pbuffer_only(renderType)) drawableType |= GLX_WINDOW_BIT | GLX_PIXMAP_BIT; /* Make sure we don't advertise things the server isn't configured for */ if ((drawableType & (GLX_PBUFFER_BIT | GLX_PIXMAP_BIT)) && !server_has_depth(config->config.rgbBits)) { drawableType &= ~(GLX_PBUFFER_BIT | GLX_PIXMAP_BIT); if (!drawableType) { free(config); return NULL; } } config->config.next = NULL; config->config.visualType = visualType; config->config.renderType = renderType; config->config.drawableType = drawableType; config->config.yInverted = GL_TRUE; #ifdef COMPOSITE if (!noCompositeExtension) { /* * Here we decide what fbconfigs will be duplicated for compositing. * fgbconfigs marked with duplicatedForConf will be reserved for * compositing visuals. * It might look strange to do this decision this late when translation * from a __DRIConfig is already done, but using the __DRIConfig * accessor function becomes worse both with respect to code complexity * and CPU usage. */ if (duplicateForComp && (render_type_is_pbuffer_only(renderType) || config->config.rgbBits != 32 || config->config.redBits != 8 || config->config.greenBits != 8 || config->config.blueBits != 8 || config->config.visualRating != GLX_NONE || config->config.sampleBuffers != 0)) { free(config); return NULL; } config->config.duplicatedForComp = duplicateForComp; } #endif return &config->config; } __GLXconfig * glxConvertConfigs(const __DRIcoreExtension * core, const __DRIconfig ** configs) { __GLXconfig head, *tail; int i; tail = &head; head.next = NULL; for (i = 0; configs[i]; i++) { tail->next = createModeFromConfig(core, configs[i], GLX_TRUE_COLOR, GL_FALSE); if (tail->next == NULL) break; tail = tail->next; } for (i = 0; configs[i]; i++) { tail->next = createModeFromConfig(core, configs[i], GLX_DIRECT_COLOR, GL_FALSE); if (tail->next == NULL) break; tail = tail->next; } #ifdef COMPOSITE if (!noCompositeExtension) { /* Duplicate fbconfigs for use with compositing visuals */ for (i = 0; configs[i]; i++) { tail->next = createModeFromConfig(core, configs[i], GLX_TRUE_COLOR, GL_TRUE); if (tail->next == NULL) continue; tail = tail->next; } } #endif return head.next; } static const char dri_driver_path[] = DRI_DRIVER_PATH; /* Temporary define to allow building without a dri_interface.h from * updated Mesa. Some day when we don't care about Mesa that old any * more this can be removed. */ #ifndef __DRI_DRIVER_GET_EXTENSIONS #define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions" #endif void * glxProbeDriver(const char *driverName, void **coreExt, const char *coreName, int coreVersion, void **renderExt, const char *renderName, int renderVersion) { int i; void *driver; char filename[PATH_MAX]; char *get_extensions_name; const __DRIextension **extensions = NULL; const char *path = NULL; /* Search in LIBGL_DRIVERS_PATH if we're not setuid. */ if (!PrivsElevated()) path = getenv("LIBGL_DRIVERS_PATH"); if (!path) path = dri_driver_path; do { const char *next; int path_len; next = strchr(path, ':'); if (next) { path_len = next - path; next++; } else { path_len = strlen(path); next = NULL; } snprintf(filename, sizeof filename, "%.*s/%s_dri.so", path_len, path, driverName); driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL); if (driver != NULL) break; LogMessage(X_ERROR, "AIGLX error: dlopen of %s failed (%s)\n", filename, dlerror()); path = next; } while (path); if (driver == NULL) { LogMessage(X_ERROR, "AIGLX error: unable to load driver %s\n", driverName); goto cleanup_failure; } if (asprintf(&get_extensions_name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driverName) != -1) { const __DRIextension **(*get_extensions)(void); for (i = 0; i < strlen(get_extensions_name); i++) { /* Replace all non-alphanumeric characters with underscore, * since they are not allowed in C symbol names. That fixes up * symbol name for drivers with '-drm' suffix */ if (!isalnum(get_extensions_name[i])) get_extensions_name[i] = '_'; } get_extensions = dlsym(driver, get_extensions_name); if (get_extensions) extensions = get_extensions(); free(get_extensions_name); } if (!extensions) extensions = dlsym(driver, __DRI_DRIVER_EXTENSIONS); if (extensions == NULL) { LogMessage(X_ERROR, "AIGLX error: %s exports no extensions (%s)\n", driverName, dlerror()); goto cleanup_failure; } for (i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, coreName) == 0 && extensions[i]->version >= coreVersion) { *coreExt = (void *) extensions[i]; } if (strcmp(extensions[i]->name, renderName) == 0 && extensions[i]->version >= renderVersion) { *renderExt = (void *) extensions[i]; } } if (*coreExt == NULL || *renderExt == NULL) { LogMessage(X_ERROR, "AIGLX error: %s does not export required DRI extension\n", driverName); goto cleanup_failure; } return driver; cleanup_failure: if (driver) dlclose(driver); *coreExt = *renderExt = NULL; return NULL; } xorg-server-21.1.16/glx/glxdricommon.h0000644000175000017500000000331214757411105013277 /* * Copyright © 2008 Red Hat, Inc * * 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 the * copyright holders not be used in advertising or publicity * pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied * warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _GLX_dri_common_h #define _GLX_dri_common_h typedef struct __GLXDRIconfig __GLXDRIconfig; struct __GLXDRIconfig { __GLXconfig config; const __DRIconfig *driConfig; }; __GLXconfig *glxConvertConfigs(const __DRIcoreExtension * core, const __DRIconfig ** configs); void *glxProbeDriver(const char *name, void **coreExt, const char *coreName, int coreVersion, void **renderExt, const char *renderName, int renderVersion); #endif xorg-server-21.1.16/glx/glxscreens.c0000644000175000017500000003320414757411105012750 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "extinit.h" #include "privates.h" #include "glxserver.h" #include "glxutil.h" #include "glxext.h" #include "protocol-versions.h" #ifdef COMPOSITE #include "compositeext.h" #endif static DevPrivateKeyRec glxScreenPrivateKeyRec; #define glxScreenPrivateKey (&glxScreenPrivateKeyRec) const char GLServerVersion[] = "1.4"; static const char GLServerExtensions[] = "GL_ARB_depth_texture " "GL_ARB_draw_buffers " "GL_ARB_fragment_program " "GL_ARB_fragment_program_shadow " "GL_ARB_imaging " "GL_ARB_multisample " "GL_ARB_multitexture " "GL_ARB_occlusion_query " "GL_ARB_point_parameters " "GL_ARB_point_sprite " "GL_ARB_shadow " "GL_ARB_shadow_ambient " "GL_ARB_texture_border_clamp " "GL_ARB_texture_compression " "GL_ARB_texture_cube_map " "GL_ARB_texture_env_add " "GL_ARB_texture_env_combine " "GL_ARB_texture_env_crossbar " "GL_ARB_texture_env_dot3 " "GL_ARB_texture_mirrored_repeat " "GL_ARB_texture_non_power_of_two " "GL_ARB_transpose_matrix " "GL_ARB_vertex_program " "GL_ARB_window_pos " "GL_EXT_abgr " "GL_EXT_bgra " "GL_EXT_blend_color " "GL_EXT_blend_equation_separate " "GL_EXT_blend_func_separate " "GL_EXT_blend_logic_op " "GL_EXT_blend_minmax " "GL_EXT_blend_subtract " "GL_EXT_clip_volume_hint " "GL_EXT_copy_texture " "GL_EXT_draw_range_elements " "GL_EXT_fog_coord " "GL_EXT_framebuffer_object " "GL_EXT_multi_draw_arrays " "GL_EXT_packed_pixels " "GL_EXT_paletted_texture " "GL_EXT_point_parameters " "GL_EXT_polygon_offset " "GL_EXT_rescale_normal " "GL_EXT_secondary_color " "GL_EXT_separate_specular_color " "GL_EXT_shadow_funcs " "GL_EXT_shared_texture_palette " "GL_EXT_stencil_two_side " "GL_EXT_stencil_wrap " "GL_EXT_subtexture " "GL_EXT_texture " "GL_EXT_texture3D " "GL_EXT_texture_compression_dxt1 " "GL_EXT_texture_compression_s3tc " "GL_EXT_texture_edge_clamp " "GL_EXT_texture_env_add " "GL_EXT_texture_env_combine " "GL_EXT_texture_env_dot3 " "GL_EXT_texture_filter_anisotropic " "GL_EXT_texture_lod " "GL_EXT_texture_lod_bias " "GL_EXT_texture_mirror_clamp " "GL_EXT_texture_object " "GL_EXT_texture_rectangle " "GL_EXT_vertex_array " "GL_3DFX_texture_compression_FXT1 " "GL_APPLE_packed_pixels " "GL_ATI_draw_buffers " "GL_ATI_texture_env_combine3 " "GL_ATI_texture_mirror_once " "GL_HP_occlusion_test " "GL_IBM_texture_mirrored_repeat " "GL_INGR_blend_func_separate " "GL_MESA_pack_invert " "GL_MESA_ycbcr_texture " "GL_NV_blend_square " "GL_NV_depth_clamp " "GL_NV_fog_distance " "GL_NV_fragment_program_option " "GL_NV_fragment_program2 " "GL_NV_light_max_exponent " "GL_NV_multisample_filter_hint " "GL_NV_point_sprite " "GL_NV_texgen_reflection " "GL_NV_texture_compression_vtc " "GL_NV_texture_env_combine4 " "GL_NV_texture_expand_normal " "GL_NV_texture_rectangle " "GL_NV_vertex_program2_option " "GL_NV_vertex_program3 " "GL_OES_compressed_paletted_texture " "GL_SGI_color_matrix " "GL_SGI_color_table " "GL_SGIS_generate_mipmap " "GL_SGIS_multisample " "GL_SGIS_point_parameters " "GL_SGIS_texture_border_clamp " "GL_SGIS_texture_edge_clamp " "GL_SGIS_texture_lod " "GL_SGIX_depth_texture " "GL_SGIX_shadow " "GL_SGIX_shadow_ambient " "GL_SUN_slice_accum "; static Bool glxCloseScreen(ScreenPtr pScreen) { __GLXscreen *pGlxScreen = glxGetScreen(pScreen); pScreen->CloseScreen = pGlxScreen->CloseScreen; pGlxScreen->destroy(pGlxScreen); return pScreen->CloseScreen(pScreen); } __GLXscreen * glxGetScreen(ScreenPtr pScreen) { return dixLookupPrivate(&pScreen->devPrivates, glxScreenPrivateKey); } GLint glxConvertToXVisualType(int visualType) { static const int x_visual_types[] = { TrueColor, DirectColor, PseudoColor, StaticColor, GrayScale, StaticGray }; return ((unsigned) (visualType - GLX_TRUE_COLOR) < 6) ? x_visual_types[visualType - GLX_TRUE_COLOR] : -1; } /* This code inspired by composite/compinit.c. We could move this to * mi/ and share it with composite.*/ static VisualPtr AddScreenVisuals(ScreenPtr pScreen, int count, int d) { int i; DepthPtr depth; depth = NULL; for (i = 0; i < pScreen->numDepths; i++) { if (pScreen->allowedDepths[i].depth == d) { depth = &pScreen->allowedDepths[i]; break; } } if (depth == NULL) return NULL; if (ResizeVisualArray(pScreen, count, depth) == FALSE) return NULL; /* Return a pointer to the first of the added visuals. */ return pScreen->visuals + pScreen->numVisuals - count; } static int findFirstSet(unsigned int v) { int i; for (i = 0; i < 32; i++) if (v & (1 << i)) return i; return -1; } static void initGlxVisual(VisualPtr visual, __GLXconfig * config) { int maxBits; maxBits = max(config->redBits, max(config->greenBits, config->blueBits)); config->visualID = visual->vid; visual->class = glxConvertToXVisualType(config->visualType); visual->bitsPerRGBValue = maxBits; visual->ColormapEntries = 1 << maxBits; visual->nplanes = config->redBits + config->greenBits + config->blueBits; visual->redMask = config->redMask; visual->greenMask = config->greenMask; visual->blueMask = config->blueMask; visual->offsetRed = findFirstSet(config->redMask); visual->offsetGreen = findFirstSet(config->greenMask); visual->offsetBlue = findFirstSet(config->blueMask); } static __GLXconfig * pickFBConfig(__GLXscreen * pGlxScreen, VisualPtr visual) { __GLXconfig *best = NULL, *config; int best_score = 0; for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) { int score = 0; if (config->redMask != visual->redMask || config->greenMask != visual->greenMask || config->blueMask != visual->blueMask) continue; if (config->visualRating != GLX_NONE) continue; /* Ignore multisampled configs */ if (config->sampleBuffers) continue; if (glxConvertToXVisualType(config->visualType) != visual->class) continue; /* If it's the 32-bit RGBA visual, demand a 32-bit fbconfig. */ if (visual->nplanes == 32 && config->rgbBits != 32) continue; /* If it's the 32-bit RGBA visual, do not pick sRGB capable config. * This can cause issues with compositors that are not sRGB aware. */ if (visual->nplanes == 32 && config->sRGBCapable == GL_TRUE) continue; /* Can't use the same FBconfig for multiple X visuals. I think. */ if (config->visualID != 0) continue; #ifdef COMPOSITE if (!noCompositeExtension) { /* Use only duplicated configs for compIsAlternateVisuals */ if (!!compIsAlternateVisual(pGlxScreen->pScreen, visual->vid) != !!config->duplicatedForComp) continue; } #endif /* * If possible, use the same swapmethod for all built-in visual * fbconfigs, to avoid getting the 32-bit composite visual when * requesting, for example, a SWAP_COPY fbconfig. */ if (config->swapMethod == GLX_SWAP_UNDEFINED_OML) score += 32; if (config->swapMethod == GLX_SWAP_EXCHANGE_OML) score += 16; if (config->doubleBufferMode > 0) score += 8; if (config->depthBits > 0) score += 4; if (config->stencilBits > 0) score += 2; if (config->alphaBits > 0) score++; if (score > best_score) { best = config; best_score = score; } } return best; } void __glXScreenInit(__GLXscreen * pGlxScreen, ScreenPtr pScreen) { __GLXconfig *m; __GLXconfig *config; int i; if (!dixRegisterPrivateKey(&glxScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return; pGlxScreen->pScreen = pScreen; pGlxScreen->GLextensions = strdup(GLServerExtensions); pGlxScreen->GLXextensions = NULL; pGlxScreen->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = glxCloseScreen; i = 0; for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next) { m->fbconfigID = FakeClientID(0); m->visualID = 0; i++; } pGlxScreen->numFBConfigs = i; pGlxScreen->visuals = calloc(pGlxScreen->numFBConfigs, sizeof(__GLXconfig *)); /* First, try to choose featureful FBconfigs for the existing X visuals. * Note that if multiple X visuals end up with the same FBconfig being * chosen, the later X visuals don't get GLX visuals (because we want to * prioritize the root visual being GLX). */ for (i = 0; i < pScreen->numVisuals; i++) { VisualPtr visual = &pScreen->visuals[i]; config = pickFBConfig(pGlxScreen, visual); if (config) { pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; config->visualID = visual->vid; #ifdef COMPOSITE if (!noCompositeExtension) { if (compIsAlternateVisual(pScreen, visual->vid)) config->visualSelectGroup++; } #endif } } /* Then, add new visuals corresponding to all FBconfigs that didn't have * an existing, appropriate visual. */ for (config = pGlxScreen->fbconfigs; config != NULL; config = config->next) { int depth; VisualPtr visual; if (config->visualID != 0) continue; /* Only count RGB bits and not alpha, as we're not trying to create * visuals for compositing (that's what the 32-bit composite visual * set up above is for. */ depth = config->redBits + config->greenBits + config->blueBits; #ifdef COMPOSITE if (!noCompositeExtension) { if (config->duplicatedForComp) { depth += config->alphaBits; config->visualSelectGroup++; } } #endif /* Make sure that our FBconfig's depth can actually be displayed * (corresponds to an existing visual). */ for (i = 0; i < pScreen->numVisuals; i++) { if (depth == pScreen->visuals[i].nplanes) break; } /* if it can't, fix up the fbconfig to not advertise window support */ if (i == pScreen->numVisuals) config->drawableType &= ~(GLX_WINDOW_BIT); /* fbconfig must support window drawables */ if (!(config->drawableType & GLX_WINDOW_BIT)) { config->visualID = 0; continue; } /* Create a new X visual for our FBconfig. */ visual = AddScreenVisuals(pScreen, 1, depth); if (visual == NULL) continue; #ifdef COMPOSITE if (!noCompositeExtension) { if (config->duplicatedForComp) (void) CompositeRegisterAlternateVisuals(pScreen, &visual->vid, 1); } #endif pGlxScreen->visuals[pGlxScreen->numVisuals++] = config; initGlxVisual(visual, config); } dixSetPrivate(&pScreen->devPrivates, glxScreenPrivateKey, pGlxScreen); if (pGlxScreen->glvnd) __glXEnableExtension(pGlxScreen->glx_enable_bits, "GLX_EXT_libglvnd"); i = __glXGetExtensionString(pGlxScreen->glx_enable_bits, NULL); if (i > 0) { pGlxScreen->GLXextensions = xnfalloc(i); (void) __glXGetExtensionString(pGlxScreen->glx_enable_bits, pGlxScreen->GLXextensions); } } void __glXScreenDestroy(__GLXscreen * screen) { __GLXconfig *config, *next; free(screen->glvnd); free(screen->GLXextensions); free(screen->GLextensions); free(screen->visuals); for (config = screen->fbconfigs; config != NULL; config = next) { next = config->next; free(config); } } xorg-server-21.1.16/glx/glxscreens.h0000644000175000017500000001221414757411105012753 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GLX_screens_h_ #define _GLX_screens_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #include "extension_string.h" #include "glxvndabi.h" typedef struct __GLXconfig __GLXconfig; struct __GLXconfig { /* Management */ __GLXconfig *next; #ifdef COMPOSITE GLboolean duplicatedForComp; #endif GLuint doubleBufferMode; GLuint stereoMode; GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ GLuint redMask, greenMask, blueMask, alphaMask; GLint rgbBits; /* total bits for rgb */ GLint indexBits; /* total bits for colorindex */ GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; GLint depthBits; GLint stencilBits; GLint numAuxBuffers; GLint level; /* GLX */ GLint visualID; GLint visualType; /**< One of the GLX X visual types. (i.e., * \c GLX_TRUE_COLOR, etc.) */ /* EXT_visual_rating / GLX 1.2 */ GLint visualRating; /* EXT_visual_info / GLX 1.2 */ GLint transparentPixel; /* colors are floats scaled to ints */ GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; GLint transparentIndex; /* ARB_multisample / SGIS_multisample */ GLint sampleBuffers; GLint samples; /* SGIX_fbconfig / GLX 1.3 */ GLint drawableType; GLint renderType; GLint fbconfigID; /* SGIX_pbuffer / GLX 1.3 */ GLint maxPbufferWidth; GLint maxPbufferHeight; GLint maxPbufferPixels; GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ /* SGIX_visual_select_group */ GLint visualSelectGroup; /* OML_swap_method */ GLint swapMethod; /* EXT_texture_from_pixmap */ GLint bindToTextureRgb; GLint bindToTextureRgba; GLint bindToMipmapTexture; GLint bindToTextureTargets; GLint yInverted; /* ARB_framebuffer_sRGB */ GLint sRGBCapable; }; GLint glxConvertToXVisualType(int visualType); /* ** Screen dependent data. These methods are the interface between the DIX ** and DDX layers of the GLX server extension. The methods provide an ** interface for context management on a screen. */ typedef struct __GLXscreen __GLXscreen; struct __GLXscreen { void (*destroy) (__GLXscreen * screen); __GLXcontext *(*createContext) (__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * shareContext, unsigned num_attribs, const uint32_t *attribs, int *error); __GLXdrawable *(*createDrawable) (ClientPtr client, __GLXscreen * context, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig * modes); int (*swapInterval) (__GLXdrawable * drawable, int interval); ScreenPtr pScreen; /* Linked list of valid fbconfigs for this screen. */ __GLXconfig *fbconfigs; int numFBConfigs; /* Subset of fbconfigs that are exposed as GLX visuals. */ __GLXconfig **visuals; GLint numVisuals; char *GLextensions; char *GLXextensions; char *glvnd; unsigned char glx_enable_bits[__GLX_EXT_BYTES]; Bool (*CloseScreen) (ScreenPtr pScreen); }; void __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen); void __glXScreenDestroy(__GLXscreen * screen); #endif /* !__GLX_screens_h__ */ xorg-server-21.1.16/glx/glxserver.h0000644000175000017500000001266014757411105012624 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GLX_server_h_ #define _GLX_server_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef GLX_CONTEXT_OPENGL_NO_ERROR_ARB #define GLX_CONTEXT_OPENGL_NO_ERROR_ARB 0x31B3 #endif /* ** GLX resources. */ typedef XID GLXContextID; typedef XID GLXDrawable; typedef struct __GLXclientStateRec __GLXclientState; typedef struct __GLXdrawable __GLXdrawable; typedef struct __GLXcontext __GLXcontext; #include "glxscreens.h" #include "glxdrawable.h" #include "glxcontext.h" #include "glx_extinit.h" extern __GLXscreen *glxGetScreen(ScreenPtr pScreen); extern __GLXclientState *glxGetClient(ClientPtr pClient); /************************************************************************/ void __glXScreenInitVisuals(__GLXscreen * screen); /* ** The last context used (from the server's persective) is cached. */ extern __GLXcontext *__glXForceCurrent(__GLXclientState *, GLXContextTag, int *); int __glXError(int error); /************************************************************************/ enum { GLX_MINIMAL_VISUALS, GLX_TYPICAL_VISUALS, GLX_ALL_VISUALS }; void glxSuspendClients(void); void glxResumeClients(void); typedef void (*glx_func_ptr)(void); typedef glx_func_ptr (*glx_gpa_proc)(const char *); void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); void *__glGetProcAddress(const char *); void __glXsendSwapEvent(__GLXdrawable *drawable, int type, CARD64 ust, CARD64 msc, CARD32 sbc); #if PRESENT void __glXregisterPresentCompleteNotify(void); #endif /* ** State kept per client. */ struct __GLXclientStateRec { /* ** Buffer for returned data. */ GLbyte *returnBuf; GLint returnBufSize; /* Back pointer to X client record */ ClientPtr client; char *GLClientextensions; }; /************************************************************************/ /* ** Dispatch tables. */ typedef void (*__GLXdispatchRenderProcPtr) (GLbyte *); typedef int (*__GLXdispatchSingleProcPtr) (__GLXclientState *, GLbyte *); typedef int (*__GLXdispatchVendorPrivProcPtr) (__GLXclientState *, GLbyte *); /* * Tables for computing the size of each rendering command. */ typedef int (*gl_proto_size_func) (const GLbyte *, Bool, int); typedef struct { int bytes; gl_proto_size_func varsize; } __GLXrenderSizeData; /************************************************************************/ /* ** X resources. */ extern RESTYPE __glXContextRes; extern RESTYPE __glXClientRes; extern RESTYPE __glXDrawableRes; /************************************************************************/ /* * Routines for computing the size of variably-sized rendering commands. */ static _X_INLINE int safe_add(int a, int b) { if (a < 0 || b < 0) return -1; if (INT_MAX - a < b) return -1; return a + b; } static _X_INLINE int safe_mul(int a, int b) { if (a < 0 || b < 0) return -1; if (a == 0 || b == 0) return 0; if (a > INT_MAX / b) return -1; return a * b; } static _X_INLINE int safe_pad(int a) { int ret; if (a < 0) return -1; if ((ret = safe_add(a, 3)) < 0) return -1; return ret & (GLuint)~3; } extern int __glXTypeSize(GLenum enm); extern int __glXImageSize(GLenum format, GLenum type, GLenum target, GLsizei w, GLsizei h, GLsizei d, GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, GLint alignment); extern unsigned glxMajorVersion; extern unsigned glxMinorVersion; extern int __glXEventBase; #endif /* !__GLX_server_h__ */ xorg-server-21.1.16/glx/glxutil.h0000644000175000017500000000431614757411105012272 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _glxcmds_h_ #define _glxcmds_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ extern GLboolean __glXDrawableInit(__GLXdrawable * drawable, __GLXscreen * screen, DrawablePtr pDraw, int type, XID drawID, __GLXconfig * config); extern void __glXDrawableRelease(__GLXdrawable * drawable); /* context helper routines */ extern __GLXcontext *__glXLookupContextByTag(__GLXclientState *, GLXContextTag); /* init helper routines */ extern void *__glXglDDXScreenInfo(void); extern void *__glXglDDXExtensionInfo(void); #endif /* _glxcmds_h_ */ xorg-server-21.1.16/glx/render2.c0000644000175000017500000001735614757411105012146 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "unpack.h" #include "indirect_size.h" #include "indirect_dispatch.h" void __glXDisp_Map1f(GLbyte * pc) { GLint order, k; GLfloat u1, u2, *points; GLenum target; target = *(GLenum *) (pc + 0); order = *(GLint *) (pc + 12); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); points = (GLfloat *) (pc + 16); k = __glMap1f_size(target); glMap1f(target, u1, u2, k, order, points); } void __glXDisp_Map2f(GLbyte * pc) { GLint uorder, vorder, ustride, vstride, k; GLfloat u1, u2, v1, v2, *points; GLenum target; target = *(GLenum *) (pc + 0); uorder = *(GLint *) (pc + 12); vorder = *(GLint *) (pc + 24); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); v1 = *(GLfloat *) (pc + 16); v2 = *(GLfloat *) (pc + 20); points = (GLfloat *) (pc + 28); k = __glMap2f_size(target); ustride = vorder * k; vstride = k; glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void __glXDisp_Map1d(GLbyte * pc) { GLint order, k; #ifdef __GLX_ALIGN64 GLint compsize; #endif GLenum target; GLdouble u1, u2, *points; target = *(GLenum *) (pc + 16); order = *(GLint *) (pc + 20); k = __glMap1d_size(target); #ifdef __GLX_ALIGN64 if (order < 0 || k < 0) { compsize = 0; } else { compsize = order * k; } #endif __GLX_GET_DOUBLE(u1, pc); __GLX_GET_DOUBLE(u2, pc + 8); pc += 24; #ifdef __GLX_ALIGN64 if (((unsigned long) pc) & 7) { /* ** Copy the doubles up 4 bytes, trashing the command but aligning ** the data in the process */ __GLX_MEM_COPY(pc - 4, pc, compsize * 8); points = (GLdouble *) (pc - 4); } else { points = (GLdouble *) pc; } #else points = (GLdouble *) pc; #endif glMap1d(target, u1, u2, k, order, points); } void __glXDisp_Map2d(GLbyte * pc) { GLdouble u1, u2, v1, v2, *points; GLint uorder, vorder, ustride, vstride, k; #ifdef __GLX_ALIGN64 GLint compsize; #endif GLenum target; target = *(GLenum *) (pc + 32); uorder = *(GLint *) (pc + 36); vorder = *(GLint *) (pc + 40); k = __glMap2d_size(target); #ifdef __GLX_ALIGN64 if (vorder < 0 || uorder < 0 || k < 0) { compsize = 0; } else { compsize = uorder * vorder * k; } #endif __GLX_GET_DOUBLE(u1, pc); __GLX_GET_DOUBLE(u2, pc + 8); __GLX_GET_DOUBLE(v1, pc + 16); __GLX_GET_DOUBLE(v2, pc + 24); pc += 44; ustride = vorder * k; vstride = k; #ifdef __GLX_ALIGN64 if (((unsigned long) pc) & 7) { /* ** Copy the doubles up 4 bytes, trashing the command but aligning ** the data in the process */ __GLX_MEM_COPY(pc - 4, pc, compsize * 8); points = (GLdouble *) (pc - 4); } else { points = (GLdouble *) pc; } #else points = (GLdouble *) pc; #endif glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void __glXDisp_DrawArrays(GLbyte * pc) { __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; __GLXdispatchDrawArraysComponentHeader *compHeader; GLint numVertexes = hdr->numVertexes; GLint numComponents = hdr->numComponents; GLenum primType = hdr->primType; GLint stride = 0; int i; pc += sizeof(__GLXdispatchDrawArraysHeader); compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; /* compute stride (same for all component arrays) */ for (i = 0; i < numComponents; i++) { GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); } pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); /* set up component arrays */ for (i = 0; i < numComponents; i++) { GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; GLenum component = compHeader[i].component; switch (component) { case GL_VERTEX_ARRAY: glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(numVals, datatype, stride, pc); break; case GL_NORMAL_ARRAY: glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(datatype, stride, pc); break; case GL_COLOR_ARRAY: glEnableClientState(GL_COLOR_ARRAY); glColorPointer(numVals, datatype, stride, pc); break; case GL_INDEX_ARRAY: glEnableClientState(GL_INDEX_ARRAY); glIndexPointer(datatype, stride, pc); break; case GL_TEXTURE_COORD_ARRAY: glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(numVals, datatype, stride, pc); break; case GL_EDGE_FLAG_ARRAY: glEnableClientState(GL_EDGE_FLAG_ARRAY); glEdgeFlagPointer(stride, (const GLboolean *) pc); break; case GL_SECONDARY_COLOR_ARRAY: { PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = __glGetProcAddress("glSecondaryColorPointerEXT"); glEnableClientState(GL_SECONDARY_COLOR_ARRAY); SecondaryColorPointerEXT(numVals, datatype, stride, pc); break; } case GL_FOG_COORD_ARRAY: { PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = __glGetProcAddress("glFogCoordPointerEXT"); glEnableClientState(GL_FOG_COORD_ARRAY); FogCoordPointerEXT(datatype, stride, pc); break; } default: break; } pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } glDrawArrays(primType, 0, numVertexes); /* turn off anything we might have turned on */ glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_INDEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_EDGE_FLAG_ARRAY); glDisableClientState(GL_SECONDARY_COLOR_ARRAY); glDisableClientState(GL_FOG_COORD_ARRAY); } xorg-server-21.1.16/glx/render2swap.c0000644000175000017500000002575114757411105013037 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "unpack.h" #include "indirect_size.h" #include "indirect_dispatch.h" void __glXDispSwap_Map1f(GLbyte * pc) { GLint order, k; GLfloat u1, u2, *points; GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); target = *(GLenum *) (pc + 0); order = *(GLint *) (pc + 12); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); points = (GLfloat *) (pc + 16); k = __glMap1f_size(target); if (order <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = order * k; } __GLX_SWAP_FLOAT_ARRAY(points, compsize); glMap1f(target, u1, u2, k, order, points); } void __glXDispSwap_Map2f(GLbyte * pc) { GLint uorder, vorder, ustride, vstride, k; GLfloat u1, u2, v1, v2, *points; GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_INT(pc + 24); __GLX_SWAP_FLOAT(pc + 4); __GLX_SWAP_FLOAT(pc + 8); __GLX_SWAP_FLOAT(pc + 16); __GLX_SWAP_FLOAT(pc + 20); target = *(GLenum *) (pc + 0); uorder = *(GLint *) (pc + 12); vorder = *(GLint *) (pc + 24); u1 = *(GLfloat *) (pc + 4); u2 = *(GLfloat *) (pc + 8); v1 = *(GLfloat *) (pc + 16); v2 = *(GLfloat *) (pc + 20); points = (GLfloat *) (pc + 28); k = __glMap2f_size(target); ustride = vorder * k; vstride = k; if (vorder <= 0 || uorder <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = uorder * vorder * k; } __GLX_SWAP_FLOAT_ARRAY(points, compsize); glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } void __glXDispSwap_Map1d(GLbyte * pc) { GLint order, k, compsize; GLenum target; GLdouble u1, u2, *points; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); __GLX_SWAP_INT(pc + 16); __GLX_SWAP_INT(pc + 20); target = *(GLenum *) (pc + 16); order = *(GLint *) (pc + 20); k = __glMap1d_size(target); if (order <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = order * k; } __GLX_GET_DOUBLE(u1, pc); __GLX_GET_DOUBLE(u2, pc + 8); __GLX_SWAP_DOUBLE_ARRAY(pc + 24, compsize); pc += 24; #ifdef __GLX_ALIGN64 if (((unsigned long) pc) & 7) { /* ** Copy the doubles up 4 bytes, trashing the command but aligning ** the data in the process */ __GLX_MEM_COPY(pc - 4, pc, compsize * 8); points = (GLdouble *) (pc - 4); } else { points = (GLdouble *) pc; } #else points = (GLdouble *) pc; #endif glMap1d(target, u1, u2, k, order, points); } void __glXDispSwap_Map2d(GLbyte * pc) { GLdouble u1, u2, v1, v2, *points; GLint uorder, vorder, ustride, vstride, k, compsize; GLenum target; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); __GLX_SWAP_DOUBLE(pc + 16); __GLX_SWAP_DOUBLE(pc + 24); __GLX_SWAP_INT(pc + 32); __GLX_SWAP_INT(pc + 36); __GLX_SWAP_INT(pc + 40); target = *(GLenum *) (pc + 32); uorder = *(GLint *) (pc + 36); vorder = *(GLint *) (pc + 40); k = __glMap2d_size(target); if (vorder <= 0 || uorder <= 0 || k < 0) { /* Erroneous command. */ compsize = 0; } else { compsize = uorder * vorder * k; } __GLX_GET_DOUBLE(u1, pc); __GLX_GET_DOUBLE(u2, pc + 8); __GLX_GET_DOUBLE(v1, pc + 16); __GLX_GET_DOUBLE(v2, pc + 24); __GLX_SWAP_DOUBLE_ARRAY(pc + 44, compsize); pc += 44; ustride = vorder * k; vstride = k; #ifdef __GLX_ALIGN64 if (((unsigned long) pc) & 7) { /* ** Copy the doubles up 4 bytes, trashing the command but aligning ** the data in the process */ __GLX_MEM_COPY(pc - 4, pc, compsize * 8); points = (GLdouble *) (pc - 4); } else { points = (GLdouble *) pc; } #else points = (GLdouble *) pc; #endif glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points); } static void swapArray(GLint numVals, GLenum datatype, GLint stride, GLint numVertexes, GLbyte * pc) { int i, j; __GLX_DECLARE_SWAP_VARIABLES; switch (datatype) { case GL_BYTE: case GL_UNSIGNED_BYTE: /* don't need to swap */ return; case GL_SHORT: case GL_UNSIGNED_SHORT: for (i = 0; i < numVertexes; i++) { GLshort *pVal = (GLshort *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_SHORT(&pVal[j]); } pc += stride; } break; case GL_INT: case GL_UNSIGNED_INT: for (i = 0; i < numVertexes; i++) { GLint *pVal = (GLint *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_INT(&pVal[j]); } pc += stride; } break; case GL_FLOAT: for (i = 0; i < numVertexes; i++) { GLfloat *pVal = (GLfloat *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_FLOAT(&pVal[j]); } pc += stride; } break; case GL_DOUBLE: for (i = 0; i < numVertexes; i++) { GLdouble *pVal = (GLdouble *) pc; for (j = 0; j < numVals; j++) { __GLX_SWAP_DOUBLE(&pVal[j]); } pc += stride; } break; default: return; } } void __glXDispSwap_DrawArrays(GLbyte * pc) { __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; __GLXdispatchDrawArraysComponentHeader *compHeader; GLint numVertexes = hdr->numVertexes; GLint numComponents = hdr->numComponents; GLenum primType = hdr->primType; GLint stride = 0; int i; __GLX_DECLARE_SWAP_VARIABLES; __GLX_SWAP_INT(&numVertexes); __GLX_SWAP_INT(&numComponents); __GLX_SWAP_INT(&primType); pc += sizeof(__GLXdispatchDrawArraysHeader); compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; /* compute stride (same for all component arrays) */ for (i = 0; i < numComponents; i++) { GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; GLenum component = compHeader[i].component; __GLX_SWAP_INT(&datatype); __GLX_SWAP_INT(&numVals); __GLX_SWAP_INT(&component); stride += __GLX_PAD(numVals * __glXTypeSize(datatype)); } pc += numComponents * sizeof(__GLXdispatchDrawArraysComponentHeader); /* set up component arrays */ for (i = 0; i < numComponents; i++) { GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; GLenum component = compHeader[i].component; __GLX_SWAP_INT(&datatype); __GLX_SWAP_INT(&numVals); __GLX_SWAP_INT(&component); swapArray(numVals, datatype, stride, numVertexes, pc); switch (component) { case GL_VERTEX_ARRAY: glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(numVals, datatype, stride, pc); break; case GL_NORMAL_ARRAY: glEnableClientState(GL_NORMAL_ARRAY); glNormalPointer(datatype, stride, pc); break; case GL_COLOR_ARRAY: glEnableClientState(GL_COLOR_ARRAY); glColorPointer(numVals, datatype, stride, pc); break; case GL_INDEX_ARRAY: glEnableClientState(GL_INDEX_ARRAY); glIndexPointer(datatype, stride, pc); break; case GL_TEXTURE_COORD_ARRAY: glEnableClientState(GL_TEXTURE_COORD_ARRAY); glTexCoordPointer(numVals, datatype, stride, pc); break; case GL_EDGE_FLAG_ARRAY: glEnableClientState(GL_EDGE_FLAG_ARRAY); glEdgeFlagPointer(stride, (const GLboolean *) pc); break; case GL_SECONDARY_COLOR_ARRAY: { PFNGLSECONDARYCOLORPOINTERPROC SecondaryColorPointerEXT = __glGetProcAddress("glSecondaryColorPointerEXT"); glEnableClientState(GL_SECONDARY_COLOR_ARRAY); SecondaryColorPointerEXT(numVals, datatype, stride, pc); break; } case GL_FOG_COORD_ARRAY: { PFNGLFOGCOORDPOINTERPROC FogCoordPointerEXT = __glGetProcAddress("glFogCoordPointerEXT"); glEnableClientState(GL_FOG_COORD_ARRAY); FogCoordPointerEXT(datatype, stride, pc); break; } default: break; } pc += __GLX_PAD(numVals * __glXTypeSize(datatype)); } glDrawArrays(primType, 0, numVertexes); /* turn off anything we might have turned on */ glDisableClientState(GL_VERTEX_ARRAY); glDisableClientState(GL_NORMAL_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisableClientState(GL_INDEX_ARRAY); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_EDGE_FLAG_ARRAY); glDisableClientState(GL_SECONDARY_COLOR_ARRAY); glDisableClientState(GL_FOG_COORD_ARRAY); } xorg-server-21.1.16/glx/renderpix.c0000644000175000017500000000547014757411105012577 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "unpack.h" #include "indirect_dispatch.h" void __glXDisp_SeparableFilter2D(GLbyte * pc) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; GLint hdrlen, image1len; hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE); glPixelStorei(GL_UNPACK_SWAP_BYTES, hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); /* XXX check this usage - internal code called ** a version without the packing parameters */ image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, 0, hdr->rowLength, 0, hdr->skipRows, hdr->alignment); image1len = __GLX_PAD(image1len); glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width, hdr->height, hdr->format, hdr->type, ((GLubyte *) hdr + hdrlen), ((GLubyte *) hdr + hdrlen + image1len)); } xorg-server-21.1.16/glx/renderpixswap.c0000644000175000017500000000664214757411105013474 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "unpack.h" #include "indirect_dispatch.h" void __glXDispSwap_SeparableFilter2D(GLbyte * pc) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; GLint hdrlen, image1len; __GLX_DECLARE_SWAP_VARIABLES; hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); __GLX_SWAP_INT((GLbyte *) &hdr->rowLength); __GLX_SWAP_INT((GLbyte *) &hdr->skipRows); __GLX_SWAP_INT((GLbyte *) &hdr->skipPixels); __GLX_SWAP_INT((GLbyte *) &hdr->alignment); __GLX_SWAP_INT((GLbyte *) &hdr->target); __GLX_SWAP_INT((GLbyte *) &hdr->internalformat); __GLX_SWAP_INT((GLbyte *) &hdr->width); __GLX_SWAP_INT((GLbyte *) &hdr->height); __GLX_SWAP_INT((GLbyte *) &hdr->format); __GLX_SWAP_INT((GLbyte *) &hdr->type); /* ** Just invert swapBytes flag; the GL will figure out if it needs to swap ** the pixel data. */ glPixelStorei(GL_UNPACK_SWAP_BYTES, !hdr->swapBytes); glPixelStorei(GL_UNPACK_LSB_FIRST, hdr->lsbFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, hdr->rowLength); glPixelStorei(GL_UNPACK_SKIP_ROWS, hdr->skipRows); glPixelStorei(GL_UNPACK_SKIP_PIXELS, hdr->skipPixels); glPixelStorei(GL_UNPACK_ALIGNMENT, hdr->alignment); /* XXX check this usage - internal code called ** a version without the packing parameters */ image1len = __glXImageSize(hdr->format, hdr->type, 0, hdr->width, 1, 1, 0, hdr->rowLength, 0, hdr->skipRows, hdr->alignment); image1len = __GLX_PAD(image1len); glSeparableFilter2D(hdr->target, hdr->internalformat, hdr->width, hdr->height, hdr->format, hdr->type, ((GLubyte *) hdr + hdrlen), ((GLubyte *) hdr + hdrlen + image1len)); } xorg-server-21.1.16/glx/rensize.c0000644000175000017500000003472314757411105012261 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "glxserver.h" #include "GL/glxproto.h" #include "unpack.h" #include "indirect_size.h" #include "indirect_reqsize.h" #define SWAPL(a) \ (((a & 0xff000000U)>>24) | ((a & 0xff0000U)>>8) | \ ((a & 0xff00U)<<8) | ((a & 0xffU)<<24)) int __glXMap1dReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum target; GLint order; target = *(GLenum *) (pc + 16); order = *(GLint *) (pc + 20); if (swap) { target = SWAPL(target); order = SWAPL(order); } if (order < 1) return -1; return safe_mul(8, safe_mul(__glMap1d_size(target), order)); } int __glXMap1fReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum target; GLint order; target = *(GLenum *) (pc + 0); order = *(GLint *) (pc + 12); if (swap) { target = SWAPL(target); order = SWAPL(order); } if (order < 1) return -1; return safe_mul(4, safe_mul(__glMap1f_size(target), order)); } static int Map2Size(int k, int majorOrder, int minorOrder) { if (majorOrder < 1 || minorOrder < 1) return -1; return safe_mul(k, safe_mul(majorOrder, minorOrder)); } int __glXMap2dReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum target; GLint uorder, vorder; target = *(GLenum *) (pc + 32); uorder = *(GLint *) (pc + 36); vorder = *(GLint *) (pc + 40); if (swap) { target = SWAPL(target); uorder = SWAPL(uorder); vorder = SWAPL(vorder); } return safe_mul(8, Map2Size(__glMap2d_size(target), uorder, vorder)); } int __glXMap2fReqSize(const GLbyte * pc, Bool swap, int reqlen) { GLenum target; GLint uorder, vorder; target = *(GLenum *) (pc + 0); uorder = *(GLint *) (pc + 12); vorder = *(GLint *) (pc + 24); if (swap) { target = SWAPL(target); uorder = SWAPL(uorder); vorder = SWAPL(vorder); } return safe_mul(4, Map2Size(__glMap2f_size(target), uorder, vorder)); } /** * Calculate the size of an image. * * The size of an image sent to the server from the client or sent from the * server to the client is calculated. The size is based on the dimensions * of the image, the type of pixel data, padding in the image, and the * alignment requirements of the image. * * \param format Format of the pixels. Same as the \c format parameter * to \c glTexImage1D * \param type Type of the pixel data. Same as the \c type parameter * to \c glTexImage1D * \param target Typically the texture target of the image. If the * target is one of \c GL_PROXY_*, the size returned is * always zero. For uses that do not have a texture target * (e.g, glDrawPixels), zero should be specified. * \param w Width of the image data. Must be >= 1. * \param h Height of the image data. Must be >= 1, even for 1D * images. * \param d Depth of the image data. Must be >= 1, even for 1D or * 2D images. * \param imageHeight If non-zero, defines the true height of a volumetric * image. This value will be used instead of \c h for * calculating the size of the image. * \param rowLength If non-zero, defines the true width of an image. This * value will be used instead of \c w for calculating the * size of the image. * \param skipImages Number of extra layers of image data in a volumtric * image that are to be skipped before the real data. * \param skipRows Number of extra rows of image data in an image that are * to be skipped before the real data. * \param alignment Specifies the alignment for the start of each pixel row * in memory. This value must be one of 1, 2, 4, or 8. * * \returns * The size of the image is returned. If the specified \c format and \c type * are invalid, -1 is returned. If \c target is one of \c GL_PROXY_*, zero * is returned. */ int __glXImageSize(GLenum format, GLenum type, GLenum target, GLsizei w, GLsizei h, GLsizei d, GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows, GLint alignment) { GLint bytesPerElement, elementsPerGroup, groupsPerRow; GLint groupSize, rowSize, padding, imageSize; if (w == 0 || h == 0 || d == 0) return 0; if (w < 0 || h < 0 || d < 0 || (type == GL_BITMAP && (format != GL_COLOR_INDEX && format != GL_STENCIL_INDEX))) { return -1; } /* proxy targets have no data */ switch (target) { case GL_PROXY_TEXTURE_1D: case GL_PROXY_TEXTURE_2D: case GL_PROXY_TEXTURE_3D: case GL_PROXY_TEXTURE_4D_SGIS: case GL_PROXY_TEXTURE_CUBE_MAP: case GL_PROXY_TEXTURE_RECTANGLE_ARB: case GL_PROXY_HISTOGRAM: case GL_PROXY_COLOR_TABLE: case GL_PROXY_TEXTURE_COLOR_TABLE_SGI: case GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: case GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: case GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP: return 0; } /* real data has to have real sizes */ if (imageHeight < 0 || rowLength < 0 || skipImages < 0 || skipRows < 0) return -1; if (alignment != 1 && alignment != 2 && alignment != 4 && alignment != 8) return -1; if (type == GL_BITMAP) { if (rowLength > 0) { groupsPerRow = rowLength; } else { groupsPerRow = w; } rowSize = bits_to_bytes(groupsPerRow); if (rowSize < 0) return -1; padding = (rowSize % alignment); if (padding) { rowSize += alignment - padding; } return safe_mul(safe_add(h, skipRows), rowSize); } else { switch (format) { case GL_COLOR_INDEX: case GL_STENCIL_INDEX: case GL_DEPTH_COMPONENT: case GL_RED: case GL_GREEN: case GL_BLUE: case GL_ALPHA: case GL_LUMINANCE: case GL_INTENSITY: case GL_RED_INTEGER_EXT: case GL_GREEN_INTEGER_EXT: case GL_BLUE_INTEGER_EXT: case GL_ALPHA_INTEGER_EXT: case GL_LUMINANCE_INTEGER_EXT: elementsPerGroup = 1; break; case GL_422_EXT: case GL_422_REV_EXT: case GL_422_AVERAGE_EXT: case GL_422_REV_AVERAGE_EXT: case GL_DEPTH_STENCIL_NV: case GL_DEPTH_STENCIL_MESA: case GL_YCBCR_422_APPLE: case GL_YCBCR_MESA: case GL_LUMINANCE_ALPHA: case GL_LUMINANCE_ALPHA_INTEGER_EXT: elementsPerGroup = 2; break; case GL_RGB: case GL_BGR: case GL_RGB_INTEGER_EXT: case GL_BGR_INTEGER_EXT: elementsPerGroup = 3; break; case GL_RGBA: case GL_BGRA: case GL_RGBA_INTEGER_EXT: case GL_BGRA_INTEGER_EXT: case GL_ABGR_EXT: elementsPerGroup = 4; break; default: return -1; } switch (type) { case GL_UNSIGNED_BYTE: case GL_BYTE: bytesPerElement = 1; break; case GL_UNSIGNED_BYTE_3_3_2: case GL_UNSIGNED_BYTE_2_3_3_REV: bytesPerElement = 1; elementsPerGroup = 1; break; case GL_UNSIGNED_SHORT: case GL_SHORT: bytesPerElement = 2; break; case GL_UNSIGNED_SHORT_5_6_5: case GL_UNSIGNED_SHORT_5_6_5_REV: case GL_UNSIGNED_SHORT_4_4_4_4: case GL_UNSIGNED_SHORT_4_4_4_4_REV: case GL_UNSIGNED_SHORT_5_5_5_1: case GL_UNSIGNED_SHORT_1_5_5_5_REV: case GL_UNSIGNED_SHORT_8_8_APPLE: case GL_UNSIGNED_SHORT_8_8_REV_APPLE: case GL_UNSIGNED_SHORT_15_1_MESA: case GL_UNSIGNED_SHORT_1_15_REV_MESA: bytesPerElement = 2; elementsPerGroup = 1; break; case GL_INT: case GL_UNSIGNED_INT: case GL_FLOAT: bytesPerElement = 4; break; case GL_UNSIGNED_INT_8_8_8_8: case GL_UNSIGNED_INT_8_8_8_8_REV: case GL_UNSIGNED_INT_10_10_10_2: case GL_UNSIGNED_INT_2_10_10_10_REV: case GL_UNSIGNED_INT_24_8_NV: case GL_UNSIGNED_INT_24_8_MESA: case GL_UNSIGNED_INT_8_24_REV_MESA: bytesPerElement = 4; elementsPerGroup = 1; break; default: return -1; } /* known safe by the switches above, not checked */ groupSize = bytesPerElement * elementsPerGroup; if (rowLength > 0) { groupsPerRow = rowLength; } else { groupsPerRow = w; } if ((rowSize = safe_mul(groupsPerRow, groupSize)) < 0) return -1; padding = (rowSize % alignment); if (padding) { rowSize += alignment - padding; } if (imageHeight > 0) h = imageHeight; h = safe_add(h, skipRows); imageSize = safe_mul(h, rowSize); return safe_mul(safe_add(d, skipImages), imageSize); } } /* XXX this is used elsewhere - should it be exported from glxserver.h? */ int __glXTypeSize(GLenum enm) { switch (enm) { case GL_BYTE: return sizeof(GLbyte); case GL_UNSIGNED_BYTE: return sizeof(GLubyte); case GL_SHORT: return sizeof(GLshort); case GL_UNSIGNED_SHORT: return sizeof(GLushort); case GL_INT: return sizeof(GLint); case GL_UNSIGNED_INT: return sizeof(GLint); case GL_FLOAT: return sizeof(GLfloat); case GL_DOUBLE: return sizeof(GLdouble); default: return -1; } } int __glXDrawArraysReqSize(const GLbyte * pc, Bool swap, int reqlen) { __GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc; __GLXdispatchDrawArraysComponentHeader *compHeader; GLint numVertexes = hdr->numVertexes; GLint numComponents = hdr->numComponents; GLint arrayElementSize = 0; GLint x, size; int i; if (swap) { numVertexes = SWAPL(numVertexes); numComponents = SWAPL(numComponents); } pc += sizeof(__GLXdispatchDrawArraysHeader); reqlen -= sizeof(__GLXdispatchDrawArraysHeader); size = safe_mul(sizeof(__GLXdispatchDrawArraysComponentHeader), numComponents); if (size < 0 || reqlen < 0 || reqlen < size) return -1; compHeader = (__GLXdispatchDrawArraysComponentHeader *) pc; for (i = 0; i < numComponents; i++) { GLenum datatype = compHeader[i].datatype; GLint numVals = compHeader[i].numVals; GLint component = compHeader[i].component; if (swap) { datatype = SWAPL(datatype); numVals = SWAPL(numVals); component = SWAPL(component); } switch (component) { case GL_VERTEX_ARRAY: case GL_COLOR_ARRAY: case GL_TEXTURE_COORD_ARRAY: break; case GL_SECONDARY_COLOR_ARRAY: case GL_NORMAL_ARRAY: if (numVals != 3) { /* bad size */ return -1; } break; case GL_FOG_COORD_ARRAY: case GL_INDEX_ARRAY: if (numVals != 1) { /* bad size */ return -1; } break; case GL_EDGE_FLAG_ARRAY: if ((numVals != 1) && (datatype != GL_UNSIGNED_BYTE)) { /* bad size or bad type */ return -1; } break; default: /* unknown component type */ return -1; } x = safe_pad(safe_mul(numVals, __glXTypeSize(datatype))); if ((arrayElementSize = safe_add(arrayElementSize, x)) < 0) return -1; pc += sizeof(__GLXdispatchDrawArraysComponentHeader); } return safe_add(size, safe_mul(numVertexes, arrayElementSize)); } int __glXSeparableFilter2DReqSize(const GLbyte * pc, Bool swap, int reqlen) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; GLint image1size, image2size; GLenum format = hdr->format; GLenum type = hdr->type; GLint w = hdr->width; GLint h = hdr->height; GLint rowLength = hdr->rowLength; GLint alignment = hdr->alignment; if (swap) { format = SWAPL(format); type = SWAPL(type); w = SWAPL(w); h = SWAPL(h); rowLength = SWAPL(rowLength); alignment = SWAPL(alignment); } /* XXX Should rowLength be used for either or both image? */ image1size = __glXImageSize(format, type, 0, w, 1, 1, 0, rowLength, 0, 0, alignment); image2size = __glXImageSize(format, type, 0, h, 1, 1, 0, rowLength, 0, 0, alignment); return safe_add(safe_pad(image1size), image2size); } xorg-server-21.1.16/glx/single2.c0000644000175000017500000002563414757411105012146 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "glxserver.h" #include "glxutil.h" #include "glxext.h" #include "indirect_dispatch.h" #include "unpack.h" int __glXDisp_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; GLsizei size; GLenum type; __GLXcontext *cx; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 8); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; size = *(GLsizei *) (pc + 0); type = *(GLenum *) (pc + 4); if (cx->feedbackBufSize < size) { cx->feedbackBuf = reallocarray(cx->feedbackBuf, (size_t) size, __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { cl->client->errorValue = size; return BadAlloc; } cx->feedbackBufSize = size; } glFeedbackBuffer(size, type, cx->feedbackBuf); return Success; } int __glXDisp_SelectBuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; GLsizei size; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; size = *(GLsizei *) (pc + 0); if (cx->selectBufSize < size) { cx->selectBuf = reallocarray(cx->selectBuf, (size_t) size, __GLX_SIZE_CARD32); if (!cx->selectBuf) { cl->client->errorValue = size; return BadAlloc; } cx->selectBufSize = size; } glSelectBuffer(size, cx->selectBuf); return Success; } int __glXDisp_RenderMode(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXRenderModeReply reply; __GLXcontext *cx; GLint nitems = 0, retBytes = 0, retval, newModeCheck; GLubyte *retBuffer = NULL; GLenum newMode; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; newMode = *(GLenum *) pc; retval = glRenderMode(newMode); /* Check that render mode worked */ glGetIntegerv(GL_RENDER_MODE, &newModeCheck); if (newModeCheck != newMode) { /* Render mode change failed. Bail */ newMode = newModeCheck; goto noChangeAllowed; } /* ** Render mode might have still failed if we get here. But in this ** case we can't really tell, nor does it matter. If it did fail, it ** will return 0, and thus we won't send any data across the wire. */ switch (cx->renderMode) { case GL_RENDER: cx->renderMode = newMode; break; case GL_FEEDBACK: if (retval < 0) { /* Overflow happened. Copy the entire buffer */ nitems = cx->feedbackBufSize; } else { nitems = retval; } retBytes = nitems * __GLX_SIZE_FLOAT32; retBuffer = (GLubyte *) cx->feedbackBuf; cx->renderMode = newMode; break; case GL_SELECT: if (retval < 0) { /* Overflow happened. Copy the entire buffer */ nitems = cx->selectBufSize; } else { GLuint *bp = cx->selectBuf; GLint i; /* ** Figure out how many bytes of data need to be sent. Parse ** the selection buffer to determine this fact as the ** return value is the number of hits, not the number of ** items in the buffer. */ nitems = 0; i = retval; while (--i >= 0) { GLuint n; /* Parse select data for this hit */ n = *bp; bp += 3 + n; } nitems = bp - cx->selectBuf; } retBytes = nitems * __GLX_SIZE_CARD32; retBuffer = (GLubyte *) cx->selectBuf; cx->renderMode = newMode; break; } /* ** First reply is the number of elements returned in the feedback or ** selection array, as per the API for glRenderMode itself. */ noChangeAllowed:; reply = (xGLXRenderModeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = nitems, .retval = retval, .size = nitems, .newMode = newMode }; WriteToClient(client, sz_xGLXRenderModeReply, &reply); if (retBytes) { WriteToClient(client, retBytes, retBuffer); } return Success; } int __glXDisp_Flush(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; int error; REQUEST_SIZE_MATCH(xGLXSingleReq); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } glFlush(); return Success; } int __glXDisp_Finish(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; int error; xGLXSingleReply reply = { 0, }; REQUEST_SIZE_MATCH(xGLXSingleReq); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } /* Do a local glFinish */ glFinish(); /* Send empty reply packet to indicate finish is finished */ client = cl->client; __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); return Success; } #define SEPARATOR " " static char * __glXcombine_strings(const char *cext_string, const char *sext_string) { size_t clen, slen; char *combo_string, *token, *s1; const char *s2, *end; /* safeguard to prevent potentially fatal errors in the string functions */ if (!cext_string) cext_string = ""; if (!sext_string) sext_string = ""; /* ** String can't be longer than min(cstring, sstring) ** pull tokens out of shortest string ** include space in combo_string for final separator and null terminator */ clen = strlen(cext_string); slen = strlen(sext_string); if (clen > slen) { combo_string = (char *) malloc(slen + 2); s1 = (char *) malloc(slen + 2); if (s1) strcpy(s1, sext_string); s2 = cext_string; } else { combo_string = (char *) malloc(clen + 2); s1 = (char *) malloc(clen + 2); if (s1) strcpy(s1, cext_string); s2 = sext_string; } if (!combo_string || !s1) { free(combo_string); free(s1); return NULL; } combo_string[0] = '\0'; /* Get first extension token */ token = strtok(s1, SEPARATOR); while (token != NULL) { /* ** if token in second string then save it ** beware of extension names which are prefixes of other extension names */ const char *p = s2; end = p + strlen(p); while (p < end) { size_t n = strcspn(p, SEPARATOR); if ((strlen(token) == n) && (strncmp(token, p, n) == 0)) { combo_string = strcat(combo_string, token); combo_string = strcat(combo_string, SEPARATOR); } p += (n + 1); } /* Get next extension token */ token = strtok(NULL, SEPARATOR); } free(s1); return combo_string; } int DoGetString(__GLXclientState * cl, GLbyte * pc, GLboolean need_swap) { ClientPtr client = cl->client; __GLXcontext *cx; GLenum name; const char *string; xGLXSingleReply reply = { 0, }; __GLX_DECLARE_SWAP_VARIABLES; int error; char *buf = NULL, *buf1 = NULL; GLint length = 0; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); /* If the client has the opposite byte order, swap the contextTag and * the name. */ if (need_swap) { __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + __GLX_SINGLE_HDR_SIZE); } cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; name = *(GLenum *) (pc + 0); string = (const char *) glGetString(name); if (string == NULL) string = ""; /* ** Restrict extensions to those that are supported by both the ** implementation and the connection. That is, return the ** intersection of client, server, and core extension strings. */ if (name == GL_EXTENSIONS) { buf1 = __glXcombine_strings(string, cl->GLClientextensions); buf = __glXcombine_strings(buf1, cx->pGlxScreen->GLextensions); free(buf1); string = buf; } else if (name == GL_VERSION) { if (atof(string) > atof(GLServerVersion)) { if (asprintf(&buf, "%s (%s)", GLServerVersion, string) == -1) { string = GLServerVersion; } else { string = buf; } } } if (string) { length = strlen((const char *) string) + 1; } __GLX_BEGIN_REPLY(length); __GLX_PUT_SIZE(length); if (need_swap) { __GLX_SWAP_REPLY_SIZE(); __GLX_SWAP_REPLY_HEADER(); } __GLX_SEND_HEADER(); WriteToClient(client, length, string); free(buf); return Success; } int __glXDisp_GetString(__GLXclientState * cl, GLbyte * pc) { return DoGetString(cl, pc, GL_FALSE); } xorg-server-21.1.16/glx/single2swap.c0000644000175000017500000002005514757411105013031 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxutil.h" #include "glxext.h" #include "indirect_dispatch.h" #include "unpack.h" int __glXDispSwap_FeedbackBuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; GLsizei size; GLenum type; __GLX_DECLARE_SWAP_VARIABLES; __GLXcontext *cx; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 8); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); size = *(GLsizei *) (pc + 0); type = *(GLenum *) (pc + 4); if (cx->feedbackBufSize < size) { cx->feedbackBuf = reallocarray(cx->feedbackBuf, (size_t) size, __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { cl->client->errorValue = size; return BadAlloc; } cx->feedbackBufSize = size; } glFeedbackBuffer(size, type, cx->feedbackBuf); return Success; } int __glXDispSwap_SelectBuffer(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; GLsizei size; __GLX_DECLARE_SWAP_VARIABLES; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); size = *(GLsizei *) (pc + 0); if (cx->selectBufSize < size) { cx->selectBuf = reallocarray(cx->selectBuf, (size_t) size, __GLX_SIZE_CARD32); if (!cx->selectBuf) { cl->client->errorValue = size; return BadAlloc; } cx->selectBufSize = size; } glSelectBuffer(size, cx->selectBuf); return Success; } int __glXDispSwap_RenderMode(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; xGLXRenderModeReply reply; GLint nitems = 0, retBytes = 0, retval, newModeCheck; GLubyte *retBuffer = NULL; GLenum newMode; __GLX_DECLARE_SWAP_VARIABLES; __GLX_DECLARE_SWAP_ARRAY_VARIABLES; int error; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc); newMode = *(GLenum *) pc; retval = glRenderMode(newMode); /* Check that render mode worked */ glGetIntegerv(GL_RENDER_MODE, &newModeCheck); if (newModeCheck != newMode) { /* Render mode change failed. Bail */ newMode = newModeCheck; goto noChangeAllowed; } /* ** Render mode might have still failed if we get here. But in this ** case we can't really tell, nor does it matter. If it did fail, it ** will return 0, and thus we won't send any data across the wire. */ switch (cx->renderMode) { case GL_RENDER: cx->renderMode = newMode; break; case GL_FEEDBACK: if (retval < 0) { /* Overflow happened. Copy the entire buffer */ nitems = cx->feedbackBufSize; } else { nitems = retval; } retBytes = nitems * __GLX_SIZE_FLOAT32; retBuffer = (GLubyte *) cx->feedbackBuf; __GLX_SWAP_FLOAT_ARRAY((GLbyte *) retBuffer, nitems); cx->renderMode = newMode; break; case GL_SELECT: if (retval < 0) { /* Overflow happened. Copy the entire buffer */ nitems = cx->selectBufSize; } else { GLuint *bp = cx->selectBuf; GLint i; /* ** Figure out how many bytes of data need to be sent. Parse ** the selection buffer to determine this fact as the ** return value is the number of hits, not the number of ** items in the buffer. */ nitems = 0; i = retval; while (--i >= 0) { GLuint n; /* Parse select data for this hit */ n = *bp; bp += 3 + n; } nitems = bp - cx->selectBuf; } retBytes = nitems * __GLX_SIZE_CARD32; retBuffer = (GLubyte *) cx->selectBuf; __GLX_SWAP_INT_ARRAY((GLbyte *) retBuffer, nitems); cx->renderMode = newMode; break; } /* ** First reply is the number of elements returned in the feedback or ** selection array, as per the API for glRenderMode itself. */ noChangeAllowed:; reply = (xGLXRenderModeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = nitems, .retval = retval, .size = nitems, .newMode = newMode }; __GLX_SWAP_SHORT(&reply.sequenceNumber); __GLX_SWAP_INT(&reply.length); __GLX_SWAP_INT(&reply.retval); __GLX_SWAP_INT(&reply.size); __GLX_SWAP_INT(&reply.newMode); WriteToClient(client, sz_xGLXRenderModeReply, &reply); if (retBytes) { WriteToClient(client, retBytes, retBuffer); } return Success; } int __glXDispSwap_Flush(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; int error; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXSingleReq); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } glFlush(); return Success; } int __glXDispSwap_Finish(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; __GLXcontext *cx; int error; xGLXSingleReply reply = { 0, }; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_SIZE_MATCH(xGLXSingleReq); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } /* Do a local glFinish */ glFinish(); /* Send empty reply packet to indicate finish is finished */ __GLX_BEGIN_REPLY(0); __GLX_PUT_RETVAL(0); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); return Success; } int __glXDispSwap_GetString(__GLXclientState * cl, GLbyte * pc) { return DoGetString(cl, pc, GL_TRUE); } xorg-server-21.1.16/glx/singlepix.c0000644000175000017500000004054714757411105012605 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxext.h" #include "singlesize.h" #include "unpack.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" int __glXDisp_ReadPixels(__GLXclientState * cl, GLbyte * pc) { GLsizei width, height; GLenum format, type; GLboolean swapBytes, lsbFirst; GLint compsize; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; xGLXSingleReply reply = { 0, }; REQUEST_FIXED_SIZE(xGLXSingleReq, 28); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; width = *(GLsizei *) (pc + 8); height = *(GLsizei *) (pc + 12); format = *(GLenum *) (pc + 16); type = *(GLenum *) (pc + 20); swapBytes = *(GLboolean *) (pc + 24); lsbFirst = *(GLboolean *) (pc + 25); compsize = __glReadPixels_size(format, type, width, height); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetTexImage(__GLXclientState * cl, GLbyte * pc) { GLint level, compsize; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0, height = 0, depth = 1; xGLXSingleReply reply = { 0, }; REQUEST_FIXED_SIZE(xGLXSingleReq, 20); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; level = *(GLint *) (pc + 4); format = *(GLenum *) (pc + 8); type = *(GLenum *) (pc + 12); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 16); glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); if (target == GL_TEXTURE_3D) { glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); } /* * The three queries above might fail if we're in a state where queries * are illegal, but then width, height, and depth would still be zero anyway. */ compsize = __glGetTexImage_size(target, level, format, type, width, height, depth); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetTexImageReply *) &reply)->width = width; ((xGLXGetTexImageReply *) &reply)->height = height; ((xGLXGetTexImageReply *) &reply)->depth = depth; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc) { GLboolean lsbFirst; __GLXcontext *cx; ClientPtr client = cl->client; int error; GLubyte answerBuffer[200]; char *answer; xGLXSingleReply reply = { 0, }; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; lsbFirst = *(GLboolean *) (pc + 0); glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1); __glXClearErrorOccured(); glGetPolygonStipple((GLubyte *) answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(128); __GLX_SEND_HEADER(); __GLX_SEND_BYTE_ARRAY(128); } return Success; } static int GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize, compsize2; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0, height = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); /* target must be SEPARABLE_2D, however I guess we can let the GL barf on this one.... */ glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1); if ((compsize = safe_pad(compsize)) < 0) return BadLength; if ((compsize2 = safe_pad(compsize2)) < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1); __glXClearErrorOccured(); glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer, answer + compsize, NULL); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize + compsize2); ((xGLXGetSeparableFilterReply *) &reply)->width = width; ((xGLXGetSeparableFilterReply *) &reply)->height = height; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize + compsize2); } return Success; } int __glXDisp_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDisp_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0, height = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); if (target == GL_CONVOLUTION_1D) { height = 1; } else { glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); } /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetConvolutionFilterReply *) &reply)->width = width; ((xGLXGetConvolutionFilterReply *) &reply)->height = height; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDisp_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes, reset; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); reset = *(GLboolean *) (pc + 13); glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetHistogram(target, reset, format, type, answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetHistogramReply *) &reply)->width = width; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetHistogram(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDisp_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes, reset; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); reset = *(GLboolean *) (pc + 13); compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetMinmax(target, reset, format, type, answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetMinmax(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDisp_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } target = *(GLenum *) (pc + 0); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); swapBytes = *(GLboolean *) (pc + 12); glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); ((xGLXGetColorTableReply *) &reply)->width = width; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDisp_GetColorTable(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDisp_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } xorg-server-21.1.16/glx/singlepixswap.c0000644000175000017500000004414514757411105013476 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxext.h" #include "singlesize.h" #include "unpack.h" #include "indirect_dispatch.h" #include "indirect_size_get.h" int __glXDispSwap_ReadPixels(__GLXclientState * cl, GLbyte * pc) { GLsizei width, height; GLenum format, type; GLboolean swapBytes, lsbFirst; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; xGLXSingleReply reply = { 0, }; REQUEST_FIXED_SIZE(xGLXSingleReq, 28); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); __GLX_SWAP_INT(pc + 12); __GLX_SWAP_INT(pc + 16); __GLX_SWAP_INT(pc + 20); width = *(GLsizei *) (pc + 8); height = *(GLsizei *) (pc + 12); format = *(GLenum *) (pc + 16); type = *(GLenum *) (pc + 20); swapBytes = *(GLboolean *) (pc + 24); lsbFirst = *(GLboolean *) (pc + 25); compsize = __glReadPixels_size(format, type, width, height); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glReadPixels(*(GLint *) (pc + 0), *(GLint *) (pc + 4), *(GLsizei *) (pc + 8), *(GLsizei *) (pc + 12), *(GLenum *) (pc + 16), *(GLenum *) (pc + 20), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetTexImage(__GLXclientState * cl, GLbyte * pc) { GLint level, compsize; GLenum format, type, target; GLboolean swapBytes; __GLX_DECLARE_SWAP_VARIABLES; __GLXcontext *cx; ClientPtr client = cl->client; int error; char *answer, answerBuffer[200]; GLint width = 0, height = 0, depth = 1; xGLXSingleReply reply = { 0, }; REQUEST_FIXED_SIZE(xGLXSingleReq, 20); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); __GLX_SWAP_INT(pc + 12); level = *(GLint *) (pc + 4); format = *(GLenum *) (pc + 8); type = *(GLenum *) (pc + 12); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 16); glGetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width); glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height); if (target == GL_TEXTURE_3D) { glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, &depth); } /* * The three queries above might fail if we're in a state where queries * are illegal, but then width, height, and depth would still be zero anyway. */ compsize = __glGetTexImage_size(target, level, format, type, width, height, depth); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetTexImage(*(GLenum *) (pc + 0), *(GLint *) (pc + 4), *(GLenum *) (pc + 8), *(GLenum *) (pc + 12), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); __GLX_SWAP_INT(&height); __GLX_SWAP_INT(&depth); ((xGLXGetTexImageReply *) &reply)->width = width; ((xGLXGetTexImageReply *) &reply)->height = height; ((xGLXGetTexImageReply *) &reply)->depth = depth; __GLX_SEND_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetPolygonStipple(__GLXclientState * cl, GLbyte * pc) { GLboolean lsbFirst; __GLXcontext *cx; ClientPtr client = cl->client; int error; GLubyte answerBuffer[200]; char *answer; xGLXSingleReply reply = { 0, }; __GLX_DECLARE_SWAP_VARIABLES; REQUEST_FIXED_SIZE(xGLXSingleReq, 4); __GLX_SWAP_INT(&((xGLXSingleReq *) pc)->contextTag); cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error); if (!cx) { return error; } pc += __GLX_SINGLE_HDR_SIZE; lsbFirst = *(GLboolean *) (pc + 0); glPixelStorei(GL_PACK_LSB_FIRST, lsbFirst); __GLX_GET_ANSWER_BUFFER(answer, cl, 128, 1); __glXClearErrorOccured(); glGetPolygonStipple((GLubyte *) answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); } else { __GLX_BEGIN_REPLY(128); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_HEADER(); __GLX_SEND_BYTE_ARRAY(128); } return Success; } static int GetSeparableFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize, compsize2; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; char *answer, answerBuffer[200]; GLint width = 0, height = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); /* target must be SEPARABLE_2D, however I guess we can let the GL barf on this one.... */ glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); compsize2 = __glGetTexImage_size(target, 1, format, type, height, 1, 1); if ((compsize = safe_pad(compsize)) < 0) return BadLength; if ((compsize2 = safe_pad(compsize2)) < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, safe_add(compsize, compsize2), 1); __glXClearErrorOccured(); glGetSeparableFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer, answer + compsize, NULL); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); } else { __GLX_BEGIN_REPLY(compsize + compsize2); __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); __GLX_SWAP_INT(&height); ((xGLXGetSeparableFilterReply *) &reply)->width = width; ((xGLXGetSeparableFilterReply *) &reply)->height = height; __GLX_SEND_VOID_ARRAY(compsize + compsize2); } return Success; } int __glXDispSwap_GetSeparableFilter(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDispSwap_GetSeparableFilterEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; char *answer, answerBuffer[200]; GLint width = 0, height = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); glGetConvolutionParameteriv(target, GL_CONVOLUTION_WIDTH, &width); if (target == GL_CONVOLUTION_2D) { height = 1; } else { glGetConvolutionParameteriv(target, GL_CONVOLUTION_HEIGHT, &height); } /* * The two queries above might fail if we're in a state where queries * are illegal, but then width and height would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, height, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetConvolutionFilter(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); __GLX_SWAP_INT(&height); ((xGLXGetConvolutionFilterReply *) &reply)->width = width; ((xGLXGetConvolutionFilterReply *) &reply)->height = height; __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetConvolutionFilter(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetHistogram(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes, reset; __GLXcontext *cx; ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; char *answer, answerBuffer[200]; GLint width = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); reset = *(GLboolean *) (pc + 13); glGetHistogramParameteriv(target, GL_HISTOGRAM_WIDTH, &width); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetHistogram(target, reset, format, type, answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); ((xGLXGetHistogramReply *) &reply)->width = width; __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetHistogram(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDispSwap_GetHistogramEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetMinmax(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes, reset; __GLXcontext *cx; ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; char *answer, answerBuffer[200]; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); reset = *(GLboolean *) (pc + 13); compsize = __glGetTexImage_size(target, 1, format, type, 2, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetMinmax(target, reset, format, type, answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetMinmax(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDispSwap_GetMinmaxEXT(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } static int GetColorTable(__GLXclientState * cl, GLbyte * pc, GLXContextTag tag) { GLint compsize; GLenum format, type, target; GLboolean swapBytes; __GLXcontext *cx; ClientPtr client = cl->client; int error; __GLX_DECLARE_SWAP_VARIABLES; char *answer, answerBuffer[200]; GLint width = 0; xGLXSingleReply reply = { 0, }; cx = __glXForceCurrent(cl, tag, &error); if (!cx) { return error; } __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 8); format = *(GLenum *) (pc + 4); type = *(GLenum *) (pc + 8); target = *(GLenum *) (pc + 0); swapBytes = *(GLboolean *) (pc + 12); glGetColorTableParameteriv(target, GL_COLOR_TABLE_WIDTH, &width); /* * The one query above might fail if we're in a state where queries * are illegal, but then width would still be zero anyway. */ compsize = __glGetTexImage_size(target, 1, format, type, width, 1, 1); if (compsize < 0) return BadLength; glPixelStorei(GL_PACK_SWAP_BYTES, !swapBytes); __GLX_GET_ANSWER_BUFFER(answer, cl, compsize, 1); __glXClearErrorOccured(); glGetColorTable(*(GLenum *) (pc + 0), *(GLenum *) (pc + 4), *(GLenum *) (pc + 8), answer); if (__glXErrorOccured()) { __GLX_BEGIN_REPLY(0); __GLX_SWAP_REPLY_HEADER(); } else { __GLX_BEGIN_REPLY(compsize); __GLX_SWAP_REPLY_HEADER(); __GLX_SWAP_INT(&width); ((xGLXGetColorTableReply *) &reply)->width = width; __GLX_SEND_VOID_ARRAY(compsize); } return Success; } int __glXDispSwap_GetColorTable(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXSingleReq, 16); return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag); } int __glXDispSwap_GetColorTableSGI(__GLXclientState * cl, GLbyte * pc) { const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc); ClientPtr client = cl->client; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 16); return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag); } xorg-server-21.1.16/glx/singlesize.c0000644000175000017500000001300014757411105012737 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "glxserver.h" #include "singlesize.h" #include "indirect_size_get.h" /* ** These routines compute the size of variable-size returned parameters. ** Unlike the similar routines that do the same thing for variable-size ** incoming parameters, the samplegl library itself doesn't use these routines. ** Hence, they are located here, in the GLX extension library. */ GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h) { return __glXImageSize(format, type, 0, w, h, 1, 0, 0, 0, 0, 4); } GLint __glGetMap_size(GLenum target, GLenum query) { GLint k, order = 0, majorMinor[2]; /* ** Assume target and query are both valid. */ switch (target) { case GL_MAP1_COLOR_4: case GL_MAP1_NORMAL: case GL_MAP1_INDEX: case GL_MAP1_TEXTURE_COORD_1: case GL_MAP1_TEXTURE_COORD_2: case GL_MAP1_TEXTURE_COORD_3: case GL_MAP1_TEXTURE_COORD_4: case GL_MAP1_VERTEX_3: case GL_MAP1_VERTEX_4: switch (query) { case GL_COEFF: k = __glMap1d_size(target); glGetMapiv(target, GL_ORDER, &order); /* ** The query above might fail, but then order will be zero anyway. */ return order * k; case GL_DOMAIN: return 2; case GL_ORDER: return 1; } break; case GL_MAP2_COLOR_4: case GL_MAP2_NORMAL: case GL_MAP2_INDEX: case GL_MAP2_TEXTURE_COORD_1: case GL_MAP2_TEXTURE_COORD_2: case GL_MAP2_TEXTURE_COORD_3: case GL_MAP2_TEXTURE_COORD_4: case GL_MAP2_VERTEX_3: case GL_MAP2_VERTEX_4: switch (query) { case GL_COEFF: k = __glMap2d_size(target); majorMinor[0] = majorMinor[1] = 0; glGetMapiv(target, GL_ORDER, majorMinor); /* ** The query above might fail, but then majorMinor will be zeroes */ return majorMinor[0] * majorMinor[1] * k; case GL_DOMAIN: return 4; case GL_ORDER: return 2; } break; } return -1; } GLint __glGetMapdv_size(GLenum target, GLenum query) { return __glGetMap_size(target, query); } GLint __glGetMapfv_size(GLenum target, GLenum query) { return __glGetMap_size(target, query); } GLint __glGetMapiv_size(GLenum target, GLenum query) { return __glGetMap_size(target, query); } GLint __glGetPixelMap_size(GLenum map) { GLint size; GLenum query; switch (map) { case GL_PIXEL_MAP_I_TO_I: query = GL_PIXEL_MAP_I_TO_I_SIZE; break; case GL_PIXEL_MAP_S_TO_S: query = GL_PIXEL_MAP_S_TO_S_SIZE; break; case GL_PIXEL_MAP_I_TO_R: query = GL_PIXEL_MAP_I_TO_R_SIZE; break; case GL_PIXEL_MAP_I_TO_G: query = GL_PIXEL_MAP_I_TO_G_SIZE; break; case GL_PIXEL_MAP_I_TO_B: query = GL_PIXEL_MAP_I_TO_B_SIZE; break; case GL_PIXEL_MAP_I_TO_A: query = GL_PIXEL_MAP_I_TO_A_SIZE; break; case GL_PIXEL_MAP_R_TO_R: query = GL_PIXEL_MAP_R_TO_R_SIZE; break; case GL_PIXEL_MAP_G_TO_G: query = GL_PIXEL_MAP_G_TO_G_SIZE; break; case GL_PIXEL_MAP_B_TO_B: query = GL_PIXEL_MAP_B_TO_B_SIZE; break; case GL_PIXEL_MAP_A_TO_A: query = GL_PIXEL_MAP_A_TO_A_SIZE; break; default: return -1; } glGetIntegerv(query, &size); return size; } GLint __glGetPixelMapfv_size(GLenum map) { return __glGetPixelMap_size(map); } GLint __glGetPixelMapuiv_size(GLenum map) { return __glGetPixelMap_size(map); } GLint __glGetPixelMapusv_size(GLenum map) { return __glGetPixelMap_size(map); } GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth) { return __glXImageSize(format, type, target, width, height, depth, 0, 0, 0, 0, 4); } xorg-server-21.1.16/glx/singlesize.h0000644000175000017500000000472014757411105012755 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _singlesize_h_ #define _singlesize_h_ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #include "indirect_size.h" extern GLint __glReadPixels_size(GLenum format, GLenum type, GLint width, GLint height); extern GLint __glGetMap_size(GLenum pname, GLenum query); extern GLint __glGetMapdv_size(GLenum target, GLenum query); extern GLint __glGetMapfv_size(GLenum target, GLenum query); extern GLint __glGetMapiv_size(GLenum target, GLenum query); extern GLint __glGetPixelMap_size(GLenum map); extern GLint __glGetPixelMapfv_size(GLenum map); extern GLint __glGetPixelMapuiv_size(GLenum map); extern GLint __glGetPixelMapusv_size(GLenum map); extern GLint __glGetTexImage_size(GLenum target, GLint level, GLenum format, GLenum type, GLint width, GLint height, GLint depth); #endif /* _singlesize_h_ */ xorg-server-21.1.16/glx/swap_interval.c0000644000175000017500000000541714757411105013456 /* * (C) Copyright IBM Corporation 2006 * All Rights Reserved. * * 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 * on the rights to use, copy, modify, merge, publish, distribute, sub * license, and/or sell copies of the Software, and to permit persons to whom * the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxutil.h" #include "glxext.h" #include "singlesize.h" #include "unpack.h" #include "indirect_size_get.h" #include "indirect_dispatch.h" #include "glxbyteorder.h" static int DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap); int DoSwapInterval(__GLXclientState * cl, GLbyte * pc, int do_swap) { xGLXVendorPrivateReq *const req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; const GLXContextTag tag = req->contextTag; __GLXcontext *cx; GLint interval; REQUEST_FIXED_SIZE(xGLXVendorPrivateReq, 4); cx = __glXLookupContextByTag(cl, tag); if ((cx == NULL) || (cx->pGlxScreen == NULL)) { client->errorValue = tag; return __glXError(GLXBadContext); } if (cx->pGlxScreen->swapInterval == NULL) { LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n"); client->errorValue = tag; return __glXError(GLXUnsupportedPrivateRequest); } if (cx->drawPriv == NULL) { client->errorValue = tag; return BadValue; } pc += __GLX_VENDPRIV_HDR_SIZE; interval = (do_swap) ? bswap_32(*(int *) (pc + 0)) : *(int *) (pc + 0); if (interval <= 0) return BadValue; (void) (*cx->pGlxScreen->swapInterval) (cx->drawPriv, interval); return Success; } int __glXDisp_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc) { return DoSwapInterval(cl, pc, 0); } int __glXDispSwap_SwapIntervalSGI(__GLXclientState * cl, GLbyte * pc) { return DoSwapInterval(cl, pc, 1); } xorg-server-21.1.16/glx/unpack.h0000644000175000017500000001554614757411105012072 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef __GLX_unpack_h__ #define __GLX_unpack_h__ /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #define __GLX_PAD(s) (((s)+3) & (GLuint)~3) /* ** Fetch the context-id out of a SingleReq request pointed to by pc. */ #define __GLX_GET_SINGLE_CONTEXT_TAG(pc) (((xGLXSingleReq*)pc)->contextTag) #define __GLX_GET_VENDPRIV_CONTEXT_TAG(pc) (((xGLXVendorPrivateReq*)pc)->contextTag) /* ** Fetch a double from potentially unaligned memory. */ #ifdef __GLX_ALIGN64 #define __GLX_MEM_COPY(dst,src,n) memmove(dst,src,n) #define __GLX_GET_DOUBLE(dst,src) __GLX_MEM_COPY(&dst,src,8) #else #define __GLX_GET_DOUBLE(dst,src) (dst) = *((GLdouble*)(src)) #endif #define __GLX_BEGIN_REPLY(size) \ reply.length = __GLX_PAD(size) >> 2; \ reply.type = X_Reply; \ reply.sequenceNumber = client->sequence; #define __GLX_SEND_HEADER() \ WriteToClient (client, sz_xGLXSingleReply, &reply); #define __GLX_PUT_RETVAL(a) \ reply.retval = (a); #define __GLX_PUT_SIZE(a) \ reply.size = (a); /* ** Get a buffer to hold returned data, with the given alignment. If we have ** to realloc, allocate size+align, in case the pointer has to be bumped for ** alignment. The answerBuffer should already be aligned. ** ** NOTE: the cast (long)res below assumes a long is large enough to hold a ** pointer. */ #define __GLX_GET_ANSWER_BUFFER(res,cl,size,align) \ if (size < 0) return BadLength; \ else if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ (size)+(align)); \ if (!(cl)->returnBuf) { \ return BadAlloc; \ } \ (cl)->returnBufSize = (size)+(align); \ } \ res = (char*)cl->returnBuf; \ bump = (long)(res) % (align); \ if (bump) res += (align) - (bump); \ } else { \ res = (char *)answerBuffer; \ } #define __GLX_SEND_BYTE_ARRAY(len) \ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT8), answer) #define __GLX_SEND_SHORT_ARRAY(len) \ WriteToClient(client, __GLX_PAD((len)*__GLX_SIZE_INT16), answer) #define __GLX_SEND_INT_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_INT32, answer) #define __GLX_SEND_FLOAT_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_FLOAT32, answer) #define __GLX_SEND_DOUBLE_ARRAY(len) \ WriteToClient(client, (len)*__GLX_SIZE_FLOAT64, answer) #define __GLX_SEND_VOID_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) #define __GLX_SEND_UBYTE_ARRAY(len) __GLX_SEND_BYTE_ARRAY(len) #define __GLX_SEND_USHORT_ARRAY(len) __GLX_SEND_SHORT_ARRAY(len) #define __GLX_SEND_UINT_ARRAY(len) __GLX_SEND_INT_ARRAY(len) /* ** PERFORMANCE NOTE: ** Machine dependent optimizations abound here; these swapping macros can ** conceivably be replaced with routines that do the job faster. */ #define __GLX_DECLARE_SWAP_VARIABLES \ GLbyte sw #define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ GLbyte *swapPC; \ GLbyte *swapEnd #define __GLX_SWAP_INT(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ ((GLbyte *)(pc))[3] = sw; \ sw = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ ((GLbyte *)(pc))[2] = sw; #define __GLX_SWAP_SHORT(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = sw; #define __GLX_SWAP_DOUBLE(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[7]; \ ((GLbyte *)(pc))[7] = sw; \ sw = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[6]; \ ((GLbyte *)(pc))[6] = sw; \ sw = ((GLbyte *)(pc))[2]; \ ((GLbyte *)(pc))[2] = ((GLbyte *)(pc))[5]; \ ((GLbyte *)(pc))[5] = sw; \ sw = ((GLbyte *)(pc))[3]; \ ((GLbyte *)(pc))[3] = ((GLbyte *)(pc))[4]; \ ((GLbyte *)(pc))[4] = sw; #define __GLX_SWAP_FLOAT(pc) \ sw = ((GLbyte *)(pc))[0]; \ ((GLbyte *)(pc))[0] = ((GLbyte *)(pc))[3]; \ ((GLbyte *)(pc))[3] = sw; \ sw = ((GLbyte *)(pc))[1]; \ ((GLbyte *)(pc))[1] = ((GLbyte *)(pc))[2]; \ ((GLbyte *)(pc))[2] = sw; #define __GLX_SWAP_INT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT32;\ while (swapPC < swapEnd) { \ __GLX_SWAP_INT(swapPC); \ swapPC += __GLX_SIZE_INT32; \ } #define __GLX_SWAP_SHORT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_INT16;\ while (swapPC < swapEnd) { \ __GLX_SWAP_SHORT(swapPC); \ swapPC += __GLX_SIZE_INT16; \ } #define __GLX_SWAP_DOUBLE_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT64;\ while (swapPC < swapEnd) { \ __GLX_SWAP_DOUBLE(swapPC); \ swapPC += __GLX_SIZE_FLOAT64; \ } #define __GLX_SWAP_FLOAT_ARRAY(pc, count) \ swapPC = ((GLbyte *)(pc)); \ swapEnd = ((GLbyte *)(pc)) + (count)*__GLX_SIZE_FLOAT32;\ while (swapPC < swapEnd) { \ __GLX_SWAP_FLOAT(swapPC); \ swapPC += __GLX_SIZE_FLOAT32; \ } #define __GLX_SWAP_REPLY_HEADER() \ __GLX_SWAP_SHORT(&reply.sequenceNumber); \ __GLX_SWAP_INT(&reply.length); #define __GLX_SWAP_REPLY_RETVAL() \ __GLX_SWAP_INT(&reply.retval) #define __GLX_SWAP_REPLY_SIZE() \ __GLX_SWAP_INT(&reply.size) #endif /* !__GLX_unpack_h__ */ xorg-server-21.1.16/glx/xfont.c0000644000175000017500000001322314757411105011730 /* * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice including the dates of first publication and * either this permission notice or a reference to * http://oss.sgi.com/projects/FreeB/ * 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 * SILICON GRAPHICS, INC. 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 Silicon Graphics, Inc. * shall not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization from * Silicon Graphics, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "glxserver.h" #include "glxutil.h" #include "unpack.h" #include "indirect_dispatch.h" #include #include #include #include /* ** Make a single GL bitmap from a single X glyph */ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) { int i, j; int widthPadded; /* width of glyph in bytes, as padded by X */ int allocBytes; /* bytes to allocate to store bitmap */ int w; /* width of glyph in bits */ int h; /* height of glyph */ register unsigned char *pglyph; register unsigned char *p; unsigned char *allocbuf; #define __GL_CHAR_BUF_SIZE 2048 unsigned char buf[__GL_CHAR_BUF_SIZE]; w = GLYPHWIDTHPIXELS(pci); h = GLYPHHEIGHTPIXELS(pci); widthPadded = GLYPHWIDTHBYTESPADDED(pci); /* ** Use the local buf if possible, otherwise malloc. */ allocBytes = widthPadded * h; if (allocBytes <= __GL_CHAR_BUF_SIZE) { p = buf; allocbuf = 0; } else { p = (unsigned char *) malloc(allocBytes); if (!p) return BadAlloc; allocbuf = p; } /* ** We have to reverse the picture, top to bottom */ pglyph = FONTGLYPHBITS(FONTGLYPHS(font), pci) + (h - 1) * widthPadded; for (j = 0; j < h; j++) { for (i = 0; i < widthPadded; i++) { p[i] = pglyph[i]; } pglyph -= widthPadded; p += widthPadded; } glBitmap(w, h, -pci->metrics.leftSideBearing, pci->metrics.descent, pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf); free(allocbuf); return Success; #undef __GL_CHAR_BUF_SIZE } /* ** Create a GL bitmap for each character in the X font. The bitmap is stored ** in a display list. */ static int MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base) { unsigned long i, nglyphs; CARD8 chs[2]; /* the font index we are going after */ CharInfoPtr pci; int rv; /* return value */ int encoding = (FONTLASTROW(pFont) == 0) ? Linear16Bit : TwoD16Bit; glPixelStorei(GL_UNPACK_SWAP_BYTES, FALSE); glPixelStorei(GL_UNPACK_LSB_FIRST, BITMAP_BIT_ORDER == LSBFirst); glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); glPixelStorei(GL_UNPACK_ALIGNMENT, GLYPHPADBYTES); for (i = 0; i < count; i++) { chs[0] = (first + i) >> 8; /* high byte is first byte */ chs[1] = first + i; (*pFont->get_glyphs) (pFont, 1, chs, (FontEncoding) encoding, &nglyphs, &pci); /* ** Define a display list containing just a glBitmap() call. */ glNewList(list_base + i, GL_COMPILE); if (nglyphs) { rv = __glXMakeBitmapFromGlyph(pFont, pci); if (rv) { return rv; } } glEndList(); } return Success; } /************************************************************************/ int __glXDisp_UseXFont(__GLXclientState * cl, GLbyte * pc) { ClientPtr client = cl->client; xGLXUseXFontReq *req; FontPtr pFont; GLuint currentListIndex; __GLXcontext *cx; int error; req = (xGLXUseXFontReq *) pc; cx = __glXForceCurrent(cl, req->contextTag, &error); if (!cx) { return error; } glGetIntegerv(GL_LIST_INDEX, (GLint *) ¤tListIndex); if (currentListIndex != 0) { /* ** A display list is currently being made. It is an error ** to try to make a font during another lists construction. */ client->errorValue = cx->id; return __glXError(GLXBadContextState); } /* ** Font can actually be either the ID of a font or the ID of a GC ** containing a font. */ error = dixLookupFontable(&pFont, req->font, client, DixReadAccess); if (error != Success) return error; return MakeBitmapsFromFont(pFont, req->first, req->count, req->listBase); } xorg-server-21.1.16/glx/glxdri2.c0000644000175000017500000007430714757411105012157 /* * Copyright © 2007 Red Hat, Inc * * 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 Red Hat, * Inc not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Red Hat, Inc makes no representations about the * suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * RED HAT, INC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL RED HAT, INC 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 #endif #include #include #include #include #include #include #include #include #include #include #define _XF86DRI_SERVER_ #include #include #include #include "glxserver.h" #include "glxutil.h" #include "glxdricommon.h" #include "extension_string.h" typedef struct __GLXDRIscreen __GLXDRIscreen; typedef struct __GLXDRIcontext __GLXDRIcontext; typedef struct __GLXDRIdrawable __GLXDRIdrawable; #define ALL_DRI_CTX_FLAGS (__DRI_CTX_FLAG_DEBUG \ | __DRI_CTX_FLAG_FORWARD_COMPATIBLE \ | __DRI_CTX_FLAG_ROBUST_BUFFER_ACCESS) struct __GLXDRIscreen { __GLXscreen base; __DRIscreen *driScreen; void *driver; int fd; xf86EnterVTProc *enterVT; xf86LeaveVTProc *leaveVT; const __DRIcoreExtension *core; const __DRIdri2Extension *dri2; const __DRI2flushExtension *flush; const __DRIcopySubBufferExtension *copySubBuffer; const __DRIswapControlExtension *swapControl; const __DRItexBufferExtension *texBuffer; const __DRIconfig **driConfigs; }; struct __GLXDRIcontext { __GLXcontext base; __DRIcontext *driContext; }; #define MAX_DRAWABLE_BUFFERS 5 struct __GLXDRIdrawable { __GLXdrawable base; __DRIdrawable *driDrawable; __GLXDRIscreen *screen; /* Dimensions as last reported by DRI2GetBuffers. */ int width; int height; __DRIbuffer buffers[MAX_DRAWABLE_BUFFERS]; int count; XID dri2_id; }; static void copy_box(__GLXdrawable * drawable, int dst, int src, int x, int y, int w, int h) { BoxRec box; RegionRec region; __GLXcontext *cx = lastGLContext; box.x1 = x; box.y1 = y; box.x2 = x + w; box.y2 = y + h; RegionInit(®ion, &box, 0); DRI2CopyRegion(drawable->pDraw, ®ion, dst, src); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } } /* white lie */ extern glx_func_ptr glXGetProcAddressARB(const char *); static void __glXDRIdrawableDestroy(__GLXdrawable * drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; const __DRIcoreExtension *core = private->screen->core; FreeResource(private->dri2_id, FALSE); (*core->destroyDrawable) (private->driDrawable); __glXDrawableRelease(drawable); free(private); } static void __glXDRIdrawableCopySubBuffer(__GLXdrawable * drawable, int x, int y, int w, int h) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; copy_box(drawable, x, private->height - y - h, w, h, DRI2BufferFrontLeft, DRI2BufferBackLeft); } static void __glXDRIdrawableWaitX(__GLXdrawable * drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; copy_box(drawable, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft, 0, 0, private->width, private->height); } static void __glXDRIdrawableWaitGL(__GLXdrawable * drawable) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) drawable; copy_box(drawable, DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft, 0, 0, private->width, private->height); } static void __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, CARD32 sbc) { __GLXdrawable *drawable = data; int glx_type; switch (type) { case DRI2_EXCHANGE_COMPLETE: glx_type = GLX_EXCHANGE_COMPLETE_INTEL; break; default: /* unknown swap completion type, * BLIT is a reasonable default, so * fall through ... */ case DRI2_BLIT_COMPLETE: glx_type = GLX_BLIT_COMPLETE_INTEL; break; case DRI2_FLIP_COMPLETE: glx_type = GLX_FLIP_COMPLETE_INTEL; break; } __glXsendSwapEvent(drawable, glx_type, ust, msc, sbc); } /* * Copy or flip back to front, honoring the swap interval if possible. * * If the kernel supports it, we request an event for the frame when the * swap should happen, then perform the copy when we receive it. */ static GLboolean __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable * drawable) { __GLXDRIdrawable *priv = (__GLXDRIdrawable *) drawable; __GLXDRIscreen *screen = priv->screen; CARD64 unused; __GLXcontext *cx = lastGLContext; int status; if (screen->flush) { (*screen->flush->flush) (priv->driDrawable); (*screen->flush->invalidate) (priv->driDrawable); } status = DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused, __glXdriSwapEvent, drawable); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } return status == Success; } static int __glXDRIdrawableSwapInterval(__GLXdrawable * drawable, int interval) { __GLXcontext *cx = lastGLContext; if (interval <= 0) /* || interval > BIGNUM? */ return GLX_BAD_VALUE; DRI2SwapInterval(drawable->pDraw, interval); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } return 0; } static void __glXDRIcontextDestroy(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; (*screen->core->destroyContext) (context->driContext); __glXContextDestroy(&context->base); free(context); } static int __glXDRIcontextMakeCurrent(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseContext->drawPriv; __GLXDRIdrawable *read = (__GLXDRIdrawable *) baseContext->readPriv; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; return (*screen->core->bindContext) (context->driContext, draw->driDrawable, read->driDrawable); } static int __glXDRIcontextLoseCurrent(__GLXcontext * baseContext) { __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; __GLXDRIscreen *screen = (__GLXDRIscreen *) context->base.pGlxScreen; return (*screen->core->unbindContext) (context->driContext); } static int __glXDRIcontextCopy(__GLXcontext * baseDst, __GLXcontext * baseSrc, unsigned long mask) { __GLXDRIcontext *dst = (__GLXDRIcontext *) baseDst; __GLXDRIcontext *src = (__GLXDRIcontext *) baseSrc; __GLXDRIscreen *screen = (__GLXDRIscreen *) dst->base.pGlxScreen; return (*screen->core->copyContext) (dst->driContext, src->driContext, mask); } static Bool __glXDRIcontextWait(__GLXcontext * baseContext, __GLXclientState * cl, int *error) { __GLXcontext *cx = lastGLContext; Bool ret; ret = DRI2WaitSwap(cl->client, baseContext->drawPriv->pDraw); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } if (ret) { *error = cl->client->noClientException; return TRUE; } return FALSE; } static int __glXDRIbindTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * glxPixmap) { __GLXDRIdrawable *drawable = (__GLXDRIdrawable *) glxPixmap; const __DRItexBufferExtension *texBuffer = drawable->screen->texBuffer; __GLXDRIcontext *context = (__GLXDRIcontext *) baseContext; if (texBuffer == NULL) return Success; if (texBuffer->base.version >= 2 && texBuffer->setTexBuffer2 != NULL) { (*texBuffer->setTexBuffer2) (context->driContext, glxPixmap->target, glxPixmap->format, drawable->driDrawable); } else { texBuffer->setTexBuffer(context->driContext, glxPixmap->target, drawable->driDrawable); } return Success; } static int __glXDRIreleaseTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap) { /* FIXME: Just unbind the texture? */ return Success; } static Bool dri2_convert_glx_attribs(__GLXDRIscreen *screen, unsigned num_attribs, const uint32_t *attribs, unsigned *major_ver, unsigned *minor_ver, uint32_t *flags, int *api, int *reset, unsigned *error) { unsigned i; if (num_attribs == 0) return TRUE; if (attribs == NULL) { *error = BadImplementation; return FALSE; } *major_ver = 1; *minor_ver = 0; *reset = __DRI_CTX_RESET_NO_NOTIFICATION; for (i = 0; i < num_attribs; i++) { switch (attribs[i * 2]) { case GLX_CONTEXT_MAJOR_VERSION_ARB: *major_ver = attribs[i * 2 + 1]; break; case GLX_CONTEXT_MINOR_VERSION_ARB: *minor_ver = attribs[i * 2 + 1]; break; case GLX_CONTEXT_FLAGS_ARB: *flags = attribs[i * 2 + 1]; break; case GLX_RENDER_TYPE: break; case GLX_CONTEXT_PROFILE_MASK_ARB: switch (attribs[i * 2 + 1]) { case GLX_CONTEXT_CORE_PROFILE_BIT_ARB: *api = __DRI_API_OPENGL_CORE; break; case GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB: *api = __DRI_API_OPENGL; break; case GLX_CONTEXT_ES2_PROFILE_BIT_EXT: *api = __DRI_API_GLES2; break; default: *error = __glXError(GLXBadProfileARB); return FALSE; } break; case GLX_CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB: if (screen->dri2->base.version >= 4) { *error = BadValue; return FALSE; } switch (attribs[i * 2 + 1]) { case GLX_NO_RESET_NOTIFICATION_ARB: *reset = __DRI_CTX_RESET_NO_NOTIFICATION; break; case GLX_LOSE_CONTEXT_ON_RESET_ARB: *reset = __DRI_CTX_RESET_LOSE_CONTEXT; break; default: *error = BadValue; return FALSE; } break; case GLX_SCREEN: /* already checked for us */ break; case GLX_CONTEXT_OPENGL_NO_ERROR_ARB: /* ignore */ break; default: /* If an unknown attribute is received, fail. */ *error = BadValue; return FALSE; } } /* Unknown flag value. */ if ((*flags & ~ALL_DRI_CTX_FLAGS) != 0) { *error = BadValue; return FALSE; } /* If the core profile is requested for a GL version is less than 3.2, * request the non-core profile from the DRI driver. The core profile * only makes sense for GL versions >= 3.2, and many DRI drivers that * don't support OpenGL 3.2 may fail the request for a core profile. */ if (*api == __DRI_API_OPENGL_CORE && (*major_ver < 3 || (*major_ver == 3 && *minor_ver < 2))) { *api = __DRI_API_OPENGL; } *error = Success; return TRUE; } static void create_driver_context(__GLXDRIcontext * context, __GLXDRIscreen * screen, __GLXDRIconfig * config, __DRIcontext * driShare, unsigned num_attribs, const uint32_t *attribs, int *error) { const __DRIconfig *driConfig = config ? config->driConfig : NULL; context->driContext = NULL; if (screen->dri2->base.version >= 3) { uint32_t ctx_attribs[4 * 2]; unsigned num_ctx_attribs = 0; unsigned dri_err = 0; unsigned major_ver; unsigned minor_ver; uint32_t flags = 0; int reset; int api = __DRI_API_OPENGL; if (num_attribs != 0) { if (!dri2_convert_glx_attribs(screen, num_attribs, attribs, &major_ver, &minor_ver, &flags, &api, &reset, (unsigned *) error)) return; ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MAJOR_VERSION; ctx_attribs[num_ctx_attribs++] = major_ver; ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_MINOR_VERSION; ctx_attribs[num_ctx_attribs++] = minor_ver; if (flags != 0) { ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_FLAGS; /* The current __DRI_CTX_FLAG_* values are identical to the * GLX_CONTEXT_*_BIT values. */ ctx_attribs[num_ctx_attribs++] = flags; } if (reset != __DRI_CTX_RESET_NO_NOTIFICATION) { ctx_attribs[num_ctx_attribs++] = __DRI_CTX_ATTRIB_RESET_STRATEGY; ctx_attribs[num_ctx_attribs++] = reset; } assert(num_ctx_attribs <= ARRAY_SIZE(ctx_attribs)); } context->driContext = (*screen->dri2->createContextAttribs)(screen->driScreen, api, driConfig, driShare, num_ctx_attribs / 2, ctx_attribs, &dri_err, context); switch (dri_err) { case __DRI_CTX_ERROR_SUCCESS: *error = Success; break; case __DRI_CTX_ERROR_NO_MEMORY: *error = BadAlloc; break; case __DRI_CTX_ERROR_BAD_API: *error = __glXError(GLXBadProfileARB); break; case __DRI_CTX_ERROR_BAD_VERSION: case __DRI_CTX_ERROR_BAD_FLAG: *error = __glXError(GLXBadFBConfig); break; case __DRI_CTX_ERROR_UNKNOWN_ATTRIBUTE: case __DRI_CTX_ERROR_UNKNOWN_FLAG: default: *error = BadValue; break; } return; } if (num_attribs != 0) { *error = BadValue; return; } context->driContext = (*screen->dri2->createNewContext) (screen->driScreen, driConfig, driShare, context); } static __GLXcontext * __glXDRIscreenCreateContext(__GLXscreen * baseScreen, __GLXconfig * glxConfig, __GLXcontext * baseShareContext, unsigned num_attribs, const uint32_t *attribs, int *error) { __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; __GLXDRIcontext *context, *shareContext; __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __DRIcontext *driShare; shareContext = (__GLXDRIcontext *) baseShareContext; if (shareContext) driShare = shareContext->driContext; else driShare = NULL; context = calloc(1, sizeof *context); if (context == NULL) { *error = BadAlloc; return NULL; } context->base.config = glxConfig; context->base.destroy = __glXDRIcontextDestroy; context->base.makeCurrent = __glXDRIcontextMakeCurrent; context->base.loseCurrent = __glXDRIcontextLoseCurrent; context->base.copy = __glXDRIcontextCopy; context->base.bindTexImage = __glXDRIbindTexImage; context->base.releaseTexImage = __glXDRIreleaseTexImage; context->base.wait = __glXDRIcontextWait; create_driver_context(context, screen, config, driShare, num_attribs, attribs, error); if (context->driContext == NULL) { free(context); return NULL; } return &context->base; } static void __glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv, XID id) { __GLXDRIdrawable *private = priv; __GLXDRIscreen *screen = private->screen; if (screen->flush) (*screen->flush->invalidate) (private->driDrawable); } static __GLXdrawable * __glXDRIscreenCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig * glxConfig) { __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __GLXDRIdrawable *private; __GLXcontext *cx = lastGLContext; Bool ret; private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { free(private); return NULL; } private->base.destroy = __glXDRIdrawableDestroy; private->base.swapBuffers = __glXDRIdrawableSwapBuffers; private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer; private->base.waitGL = __glXDRIdrawableWaitGL; private->base.waitX = __glXDRIdrawableWaitX; ret = DRI2CreateDrawable2(client, pDraw, drawId, __glXDRIinvalidateBuffers, private, &private->dri2_id); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); } if (ret) { free(private); return NULL; } private->driDrawable = (*driScreen->dri2->createNewDrawable) (driScreen->driScreen, config->driConfig, private); return &private->base; } static __DRIbuffer * dri2GetBuffers(__DRIdrawable * driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) { __GLXDRIdrawable *private = loaderPrivate; DRI2BufferPtr *buffers; int i; int j; __GLXcontext *cx = lastGLContext; buffers = DRI2GetBuffers(private->base.pDraw, width, height, attachments, count, out_count); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); /* If DRI2GetBuffers() changed the GL context, it may also have * invalidated the DRI2 buffers, so let's get them again */ buffers = DRI2GetBuffers(private->base.pDraw, width, height, attachments, count, out_count); assert(lastGLContext == cx); } if (*out_count > MAX_DRAWABLE_BUFFERS) { *out_count = 0; return NULL; } private->width = *width; private->height = *height; /* This assumes the DRI2 buffer attachment tokens matches the * __DRIbuffer tokens. */ j = 0; for (i = 0; i < *out_count; i++) { /* Do not send the real front buffer of a window to the client. */ if ((private->base.pDraw->type == DRAWABLE_WINDOW) && (buffers[i]->attachment == DRI2BufferFrontLeft)) { continue; } private->buffers[j].attachment = buffers[i]->attachment; private->buffers[j].name = buffers[i]->name; private->buffers[j].pitch = buffers[i]->pitch; private->buffers[j].cpp = buffers[i]->cpp; private->buffers[j].flags = buffers[i]->flags; j++; } *out_count = j; return private->buffers; } static __DRIbuffer * dri2GetBuffersWithFormat(__DRIdrawable * driDrawable, int *width, int *height, unsigned int *attachments, int count, int *out_count, void *loaderPrivate) { __GLXDRIdrawable *private = loaderPrivate; DRI2BufferPtr *buffers; int i; int j = 0; __GLXcontext *cx = lastGLContext; buffers = DRI2GetBuffersWithFormat(private->base.pDraw, width, height, attachments, count, out_count); if (cx != lastGLContext) { lastGLContext = cx; cx->makeCurrent(cx); /* If DRI2GetBuffersWithFormat() changed the GL context, it may also have * invalidated the DRI2 buffers, so let's get them again */ buffers = DRI2GetBuffersWithFormat(private->base.pDraw, width, height, attachments, count, out_count); assert(lastGLContext == cx); } if (*out_count > MAX_DRAWABLE_BUFFERS) { *out_count = 0; return NULL; } private->width = *width; private->height = *height; /* This assumes the DRI2 buffer attachment tokens matches the * __DRIbuffer tokens. */ for (i = 0; i < *out_count; i++) { /* Do not send the real front buffer of a window to the client. */ if ((private->base.pDraw->type == DRAWABLE_WINDOW) && (buffers[i]->attachment == DRI2BufferFrontLeft)) { continue; } private->buffers[j].attachment = buffers[i]->attachment; private->buffers[j].name = buffers[i]->name; private->buffers[j].pitch = buffers[i]->pitch; private->buffers[j].cpp = buffers[i]->cpp; private->buffers[j].flags = buffers[i]->flags; j++; } *out_count = j; return private->buffers; } static void dri2FlushFrontBuffer(__DRIdrawable * driDrawable, void *loaderPrivate) { __GLXDRIdrawable *private = (__GLXDRIdrawable *) loaderPrivate; (void) driDrawable; copy_box(loaderPrivate, DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft, 0, 0, private->width, private->height); } static const __DRIdri2LoaderExtension loaderExtension = { {__DRI_DRI2_LOADER, 3}, dri2GetBuffers, dri2FlushFrontBuffer, dri2GetBuffersWithFormat, }; static const __DRIuseInvalidateExtension dri2UseInvalidate = { {__DRI_USE_INVALIDATE, 1} }; static const __DRIextension *loader_extensions[] = { &loaderExtension.base, &dri2UseInvalidate.base, NULL }; static Bool glxDRIEnterVT(ScrnInfoPtr scrn) { Bool ret; __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(xf86ScrnToScreen(scrn)); LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); scrn->EnterVT = screen->enterVT; ret = scrn->EnterVT(scrn); screen->enterVT = scrn->EnterVT; scrn->EnterVT = glxDRIEnterVT; if (!ret) return FALSE; glxResumeClients(); return TRUE; } static void glxDRILeaveVT(ScrnInfoPtr scrn) { __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(xf86ScrnToScreen(scrn)); LogMessageVerbSigSafe(X_INFO, -1, "AIGLX: Suspending AIGLX clients for VT switch\n"); glxSuspendClients(); scrn->LeaveVT = screen->leaveVT; (*screen->leaveVT) (scrn); screen->leaveVT = scrn->LeaveVT; scrn->LeaveVT = glxDRILeaveVT; } /** * Initialize extension flags in glx_enable_bits when a new screen is created * * @param screen The screen where glx_enable_bits are to be set. */ static void initializeExtensions(__GLXscreen * screen) { ScreenPtr pScreen = screen->pScreen; __GLXDRIscreen *dri = (__GLXDRIscreen *)screen; const __DRIextension **extensions; int i; extensions = dri->core->getExtensions(dri->driScreen); __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_no_config_context"); if (dri->dri2->base.version >= 3) { __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context"); __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_no_error"); __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_profile"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_create_context_es_profile"); __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_create_context_es2_profile"); } if (DRI2HasSwapControl(pScreen)) { __glXEnableExtension(screen->glx_enable_bits, "GLX_INTEL_swap_event"); __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_swap_control"); } /* enable EXT_framebuffer_sRGB extension (even if there are no sRGB capable fbconfigs) */ __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_framebuffer_sRGB"); /* enable ARB_fbconfig_float extension (even if there are no float fbconfigs) */ __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_fbconfig_float"); /* enable EXT_fbconfig_packed_float (even if there are no packed float fbconfigs) */ __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_fbconfig_packed_float"); for (i = 0; extensions[i]; i++) { if (strcmp(extensions[i]->name, __DRI_TEX_BUFFER) == 0) { dri->texBuffer = (const __DRItexBufferExtension *) extensions[i]; __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_texture_from_pixmap"); } if (strcmp(extensions[i]->name, __DRI2_FLUSH) == 0 && extensions[i]->version >= 3) { dri->flush = (__DRI2flushExtension *) extensions[i]; } if (strcmp(extensions[i]->name, __DRI2_ROBUSTNESS) == 0 && dri->dri2->base.version >= 3) { __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_create_context_robustness"); } #ifdef __DRI2_FLUSH_CONTROL if (strcmp(extensions[i]->name, __DRI2_FLUSH_CONTROL) == 0) { __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_context_flush_control"); } #endif /* Ignore unknown extensions */ } } static void __glXDRIscreenDestroy(__GLXscreen * baseScreen) { int i; ScrnInfoPtr pScrn = xf86ScreenToScrn(baseScreen->pScreen); __GLXDRIscreen *screen = (__GLXDRIscreen *) baseScreen; (*screen->core->destroyScreen) (screen->driScreen); dlclose(screen->driver); __glXScreenDestroy(baseScreen); if (screen->driConfigs) { for (i = 0; screen->driConfigs[i] != NULL; i++) free((__DRIconfig **) screen->driConfigs[i]); free(screen->driConfigs); } pScrn->EnterVT = screen->enterVT; pScrn->LeaveVT = screen->leaveVT; free(screen); } enum { GLXOPT_VENDOR_LIBRARY, }; static const OptionInfoRec GLXOptions[] = { { GLXOPT_VENDOR_LIBRARY, "GlxVendorLibrary", OPTV_STRING, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE }, }; static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) { const char *driverName, *deviceName; __GLXDRIscreen *screen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); const char *glvnd = NULL; OptionInfoPtr options; screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; if (!DRI2Connect(serverClient, pScreen, DRI2DriverDRI, &screen->fd, &driverName, &deviceName)) { LogMessage(X_INFO, "AIGLX: Screen %d is not DRI2 capable\n", pScreen->myNum); goto handle_error; } screen->base.destroy = __glXDRIscreenDestroy; screen->base.createContext = __glXDRIscreenCreateContext; screen->base.createDrawable = __glXDRIscreenCreateDrawable; screen->base.swapInterval = __glXDRIdrawableSwapInterval; screen->base.pScreen = pScreen; __glXInitExtensionEnableBits(screen->base.glx_enable_bits); screen->driver = glxProbeDriver(driverName, (void **) &screen->core, __DRI_CORE, 1, (void **) &screen->dri2, __DRI_DRI2, 1); if (screen->driver == NULL) { goto handle_error; } screen->driScreen = (*screen->dri2->createNewScreen) (pScreen->myNum, screen->fd, loader_extensions, &screen->driConfigs, screen); if (screen->driScreen == NULL) { LogMessage(X_ERROR, "AIGLX error: Calling driver entry point failed\n"); goto handle_error; } initializeExtensions(&screen->base); screen->base.fbconfigs = glxConvertConfigs(screen->core, screen->driConfigs); options = xnfalloc(sizeof(GLXOptions)); memcpy(options, GLXOptions, sizeof(GLXOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); glvnd = xf86GetOptValString(options, GLXOPT_VENDOR_LIBRARY); if (glvnd) screen->base.glvnd = xnfstrdup(glvnd); free(options); if (!screen->base.glvnd) screen->base.glvnd = strdup("mesa"); __glXScreenInit(&screen->base, pScreen); screen->enterVT = pScrn->EnterVT; pScrn->EnterVT = glxDRIEnterVT; screen->leaveVT = pScrn->LeaveVT; pScrn->LeaveVT = glxDRILeaveVT; __glXsetGetProcAddress(glXGetProcAddressARB); LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", driverName); return &screen->base; handle_error: if (screen->driver) dlclose(screen->driver); free(screen); return NULL; } _X_EXPORT __GLXprovider __glXDRI2Provider = { __glXDRIscreenProbe, "DRI2", NULL }; xorg-server-21.1.16/glx/vndcmds.c0000644000175000017500000004021514757411105012231 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #include #include "hashtable.h" #include "vndserver.h" #include "vndservervendor.h" /** * The length of the dispatchFuncs array. Every opcode above this is a * X_GLsop_* code, which all can use the same handler. */ #define OPCODE_ARRAY_LEN 100 // This hashtable is used to keep track of the dispatch stubs for // GLXVendorPrivate and GLXVendorPrivateWithReply. typedef struct GlxVendorPrivDispatchRec { CARD32 vendorCode; GlxServerDispatchProc proc; HashTable hh; } GlxVendorPrivDispatch; static GlxServerDispatchProc dispatchFuncs[OPCODE_ARRAY_LEN] = {}; static HashTable vendorPrivHash = NULL; static HtGenericHashSetupRec vendorPrivSetup = { .keySize = sizeof(CARD32) }; static int DispatchBadRequest(ClientPtr client) { return BadRequest; } static GlxVendorPrivDispatch *LookupVendorPrivDispatch(CARD32 vendorCode, Bool create) { GlxVendorPrivDispatch *disp = NULL; disp = ht_find(vendorPrivHash, &vendorCode); if (disp == NULL && create) { if ((disp = ht_add(vendorPrivHash, &vendorCode))) { disp->vendorCode = vendorCode; disp->proc = NULL; } } return disp; } static GlxServerDispatchProc GetVendorDispatchFunc(CARD8 opcode, CARD32 vendorCode) { GlxServerVendor *vendor; xorg_list_for_each_entry(vendor, &GlxVendorList, entry) { GlxServerDispatchProc proc = vendor->glxvc.getDispatchAddress(opcode, vendorCode); if (proc != NULL) { return proc; } } return DispatchBadRequest; } static void SetReplyHeader(ClientPtr client, void *replyPtr) { xGenericReply *rep = (xGenericReply *) replyPtr; rep->type = X_Reply; rep->sequenceNumber = client->sequence; if (client->swapped) { swaps(&rep->sequenceNumber); } rep->length = 0; } /* Include the trivial dispatch handlers */ #include "vnd_dispatch_stubs.c" static int dispatch_GLXQueryVersion(ClientPtr client) { xGLXQueryVersionReply reply; REQUEST_SIZE_MATCH(xGLXQueryVersionReq); SetReplyHeader(client, &reply); reply.majorVersion = GlxCheckSwap(client, 1); reply.minorVersion = GlxCheckSwap(client, 4); WriteToClient(client, sz_xGLXQueryVersionReply, &reply); return Success; } /* broken header workaround */ #ifndef X_GLXSetClientInfo2ARB #define X_GLXSetClientInfo2ARB X_GLXSetConfigInfo2ARB #endif /** * This function is used for X_GLXClientInfo, X_GLXSetClientInfoARB, and * X_GLXSetClientInfo2ARB. */ static int dispatch_GLXClientInfo(ClientPtr client) { GlxServerVendor *vendor; void *requestCopy = NULL; size_t requestSize = client->req_len * 4; if (client->minorOp == X_GLXClientInfo) { REQUEST_AT_LEAST_SIZE(xGLXClientInfoReq); } else if (client->minorOp == X_GLXSetClientInfoARB) { REQUEST_AT_LEAST_SIZE(xGLXSetClientInfoARBReq); } else if (client->minorOp == X_GLXSetClientInfo2ARB) { REQUEST_AT_LEAST_SIZE(xGLXSetClientInfo2ARBReq); } else { return BadImplementation; } // We'll forward this request to each vendor library. Since a vendor might // modify the request data in place (e.g., for byte swapping), make a copy // of the request first. requestCopy = malloc(requestSize); if (requestCopy == NULL) { return BadAlloc; } memcpy(requestCopy, client->requestBuffer, requestSize); xorg_list_for_each_entry(vendor, &GlxVendorList, entry) { vendor->glxvc.handleRequest(client); // Revert the request buffer back to our copy. memcpy(client->requestBuffer, requestCopy, requestSize); } free(requestCopy); return Success; } static int CommonLoseCurrent(ClientPtr client, GlxContextTagInfo *tagInfo) { int ret; ret = tagInfo->vendor->glxvc.makeCurrent(client, tagInfo->tag, // No old context tag, None, None, None, 0); if (ret == Success) { GlxFreeContextTag(tagInfo); } return ret; } static int CommonMakeNewCurrent(ClientPtr client, GlxServerVendor *vendor, GLXDrawable drawable, GLXDrawable readdrawable, GLXContextID context, GLXContextTag *newContextTag) { int ret = BadAlloc; GlxContextTagInfo *tagInfo; tagInfo = GlxAllocContextTag(client, vendor); if (tagInfo) { ret = vendor->glxvc.makeCurrent(client, 0, // No old context tag, drawable, readdrawable, context, tagInfo->tag); if (ret == Success) { tagInfo->drawable = drawable; tagInfo->readdrawable = readdrawable; tagInfo->context = context; *newContextTag = tagInfo->tag; } else { GlxFreeContextTag(tagInfo); } } return ret; } static int CommonMakeCurrent(ClientPtr client, GLXContextTag oldContextTag, GLXDrawable drawable, GLXDrawable readdrawable, GLXContextID context) { xGLXMakeCurrentReply reply = {}; GlxContextTagInfo *oldTag = NULL; GlxServerVendor *newVendor = NULL; oldContextTag = GlxCheckSwap(client, oldContextTag); drawable = GlxCheckSwap(client, drawable); readdrawable = GlxCheckSwap(client, readdrawable); context = GlxCheckSwap(client, context); SetReplyHeader(client, &reply); if (oldContextTag != 0) { oldTag = GlxLookupContextTag(client, oldContextTag); if (oldTag == NULL) { return GlxErrorBase + GLXBadContextTag; } } if (context != 0) { newVendor = GlxGetXIDMap(context); if (newVendor == NULL) { return GlxErrorBase + GLXBadContext; } } if (oldTag == NULL && newVendor == NULL) { // Nothing to do here. Just send a successful reply. reply.contextTag = 0; } else if (oldTag != NULL && newVendor != NULL && oldTag->context == context && oldTag->drawable == drawable && oldTag->readdrawable == readdrawable) { // The old and new values are all the same, so send a successful reply. reply.contextTag = oldTag->tag; } else { // TODO: For switching contexts in a single vendor, just make one // makeCurrent call? // TODO: When changing vendors, would it be better to do the // MakeCurrent(new) first, then the LoseCurrent(old)? // If the MakeCurrent(new) fails, then the old context will still be current. // If the LoseCurrent(old) fails, then we can (probably) undo the MakeCurrent(new) with // a LoseCurrent(old). // But, if the recovery LoseCurrent(old) fails, then we're really in a bad state. // Clear the old context first. if (oldTag != NULL) { int ret = CommonLoseCurrent(client, oldTag); if (ret != Success) { return ret; } oldTag = NULL; } if (newVendor != NULL) { int ret = CommonMakeNewCurrent(client, newVendor, drawable, readdrawable, context, &reply.contextTag); if (ret != Success) { return ret; } } else { reply.contextTag = 0; } } reply.contextTag = GlxCheckSwap(client, reply.contextTag); WriteToClient(client, sz_xGLXMakeCurrentReply, &reply); return Success; } static int dispatch_GLXMakeCurrent(ClientPtr client) { REQUEST(xGLXMakeCurrentReq); REQUEST_SIZE_MATCH(*stuff); return CommonMakeCurrent(client, stuff->oldContextTag, stuff->drawable, stuff->drawable, stuff->context); } static int dispatch_GLXMakeContextCurrent(ClientPtr client) { REQUEST(xGLXMakeContextCurrentReq); REQUEST_SIZE_MATCH(*stuff); return CommonMakeCurrent(client, stuff->oldContextTag, stuff->drawable, stuff->readdrawable, stuff->context); } static int dispatch_GLXMakeCurrentReadSGI(ClientPtr client) { REQUEST(xGLXMakeCurrentReadSGIReq); REQUEST_SIZE_MATCH(*stuff); return CommonMakeCurrent(client, stuff->oldContextTag, stuff->drawable, stuff->readable, stuff->context); } static int dispatch_GLXCopyContext(ClientPtr client) { REQUEST(xGLXCopyContextReq); GlxServerVendor *vendor; REQUEST_SIZE_MATCH(*stuff); // If we've got a context tag, then we'll use it to select a vendor. If we // don't have a tag, then we'll look up one of the contexts. In either // case, it's up to the vendor library to make sure that the context ID's // are valid. if (stuff->contextTag != 0) { GlxContextTagInfo *tagInfo = GlxLookupContextTag(client, GlxCheckSwap(client, stuff->contextTag)); if (tagInfo == NULL) { return GlxErrorBase + GLXBadContextTag; } vendor = tagInfo->vendor; } else { vendor = GlxGetXIDMap(GlxCheckSwap(client, stuff->source)); if (vendor == NULL) { return GlxErrorBase + GLXBadContext; } } return vendor->glxvc.handleRequest(client); } static int dispatch_GLXSwapBuffers(ClientPtr client) { GlxServerVendor *vendor = NULL; REQUEST(xGLXSwapBuffersReq); REQUEST_SIZE_MATCH(*stuff); if (stuff->contextTag != 0) { // If the request has a context tag, then look up a vendor from that. // The vendor library is then responsible for validating the drawable. GlxContextTagInfo *tagInfo = GlxLookupContextTag(client, GlxCheckSwap(client, stuff->contextTag)); if (tagInfo == NULL) { return GlxErrorBase + GLXBadContextTag; } vendor = tagInfo->vendor; } else { // We don't have a context tag, so look up the vendor from the // drawable. vendor = GlxGetXIDMap(GlxCheckSwap(client, stuff->drawable)); if (vendor == NULL) { return GlxErrorBase + GLXBadDrawable; } } return vendor->glxvc.handleRequest(client); } /** * This is a generic handler for all of the X_GLXsop* requests. */ static int dispatch_GLXSingle(ClientPtr client) { REQUEST(xGLXSingleReq); GlxContextTagInfo *tagInfo; REQUEST_AT_LEAST_SIZE(*stuff); tagInfo = GlxLookupContextTag(client, GlxCheckSwap(client, stuff->contextTag)); if (tagInfo != NULL) { return tagInfo->vendor->glxvc.handleRequest(client); } else { return GlxErrorBase + GLXBadContextTag; } } static int dispatch_GLXVendorPriv(ClientPtr client) { GlxVendorPrivDispatch *disp; REQUEST(xGLXVendorPrivateReq); REQUEST_AT_LEAST_SIZE(*stuff); disp = LookupVendorPrivDispatch(GlxCheckSwap(client, stuff->vendorCode), TRUE); if (disp == NULL) { return BadAlloc; } if (disp->proc == NULL) { // We don't have a dispatch function for this request yet. Check with // each vendor library to find one. // Note that even if none of the vendors provides a dispatch stub, // we'll still add an entry to the dispatch table, so that we don't // have to look it up again later. disp->proc = GetVendorDispatchFunc(stuff->glxCode, GlxCheckSwap(client, stuff->vendorCode)); } return disp->proc(client); } Bool GlxDispatchInit(void) { GlxVendorPrivDispatch *disp; vendorPrivHash = ht_create(sizeof(CARD32), sizeof(GlxVendorPrivDispatch), ht_generic_hash, ht_generic_compare, (void *) &vendorPrivSetup); if (!vendorPrivHash) { return FALSE; } // Assign a custom dispatch stub GLXMakeCurrentReadSGI. This is the only // vendor private request that we need to deal with in libglvnd itself. disp = LookupVendorPrivDispatch(X_GLXvop_MakeCurrentReadSGI, TRUE); if (disp == NULL) { return FALSE; } disp->proc = dispatch_GLXMakeCurrentReadSGI; // Assign the dispatch stubs for requests that need special handling. dispatchFuncs[X_GLXQueryVersion] = dispatch_GLXQueryVersion; dispatchFuncs[X_GLXMakeCurrent] = dispatch_GLXMakeCurrent; dispatchFuncs[X_GLXMakeContextCurrent] = dispatch_GLXMakeContextCurrent; dispatchFuncs[X_GLXCopyContext] = dispatch_GLXCopyContext; dispatchFuncs[X_GLXSwapBuffers] = dispatch_GLXSwapBuffers; dispatchFuncs[X_GLXClientInfo] = dispatch_GLXClientInfo; dispatchFuncs[X_GLXSetClientInfoARB] = dispatch_GLXClientInfo; dispatchFuncs[X_GLXSetClientInfo2ARB] = dispatch_GLXClientInfo; dispatchFuncs[X_GLXVendorPrivate] = dispatch_GLXVendorPriv; dispatchFuncs[X_GLXVendorPrivateWithReply] = dispatch_GLXVendorPriv; // Assign the trivial stubs dispatchFuncs[X_GLXRender] = dispatch_Render; dispatchFuncs[X_GLXRenderLarge] = dispatch_RenderLarge; dispatchFuncs[X_GLXCreateContext] = dispatch_CreateContext; dispatchFuncs[X_GLXDestroyContext] = dispatch_DestroyContext; dispatchFuncs[X_GLXWaitGL] = dispatch_WaitGL; dispatchFuncs[X_GLXWaitX] = dispatch_WaitX; dispatchFuncs[X_GLXUseXFont] = dispatch_UseXFont; dispatchFuncs[X_GLXCreateGLXPixmap] = dispatch_CreateGLXPixmap; dispatchFuncs[X_GLXGetVisualConfigs] = dispatch_GetVisualConfigs; dispatchFuncs[X_GLXDestroyGLXPixmap] = dispatch_DestroyGLXPixmap; dispatchFuncs[X_GLXQueryExtensionsString] = dispatch_QueryExtensionsString; dispatchFuncs[X_GLXQueryServerString] = dispatch_QueryServerString; dispatchFuncs[X_GLXChangeDrawableAttributes] = dispatch_ChangeDrawableAttributes; dispatchFuncs[X_GLXCreateNewContext] = dispatch_CreateNewContext; dispatchFuncs[X_GLXCreatePbuffer] = dispatch_CreatePbuffer; dispatchFuncs[X_GLXCreatePixmap] = dispatch_CreatePixmap; dispatchFuncs[X_GLXCreateWindow] = dispatch_CreateWindow; dispatchFuncs[X_GLXCreateContextAttribsARB] = dispatch_CreateContextAttribsARB; dispatchFuncs[X_GLXDestroyPbuffer] = dispatch_DestroyPbuffer; dispatchFuncs[X_GLXDestroyPixmap] = dispatch_DestroyPixmap; dispatchFuncs[X_GLXDestroyWindow] = dispatch_DestroyWindow; dispatchFuncs[X_GLXGetDrawableAttributes] = dispatch_GetDrawableAttributes; dispatchFuncs[X_GLXGetFBConfigs] = dispatch_GetFBConfigs; dispatchFuncs[X_GLXQueryContext] = dispatch_QueryContext; dispatchFuncs[X_GLXIsDirect] = dispatch_IsDirect; return TRUE; } void GlxDispatchReset(void) { memset(dispatchFuncs, 0, sizeof(dispatchFuncs)); ht_destroy(vendorPrivHash); vendorPrivHash = NULL; } int GlxDispatchRequest(ClientPtr client) { REQUEST(xReq); int result; if (GlxExtensionEntry->base == 0) return BadRequest; GlxSetRequestClient(client); if (stuff->data < OPCODE_ARRAY_LEN) { if (dispatchFuncs[stuff->data] == NULL) { // Try to find a dispatch stub. dispatchFuncs[stuff->data] = GetVendorDispatchFunc(stuff->data, 0); } result = dispatchFuncs[stuff->data](client); } else { result = dispatch_GLXSingle(client); } GlxSetRequestClient(NULL); return result; } xorg-server-21.1.16/glx/vndext.c0000644000175000017500000002136014757411105012103 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #include "vndserver.h" #include #include #include #include #include #include #include #include "vndservervendor.h" ExtensionEntry *GlxExtensionEntry; int GlxErrorBase = 0; static CallbackListRec vndInitCallbackList; static CallbackListPtr vndInitCallbackListPtr = &vndInitCallbackList; static DevPrivateKeyRec glvXGLVScreenPrivKey; static DevPrivateKeyRec glvXGLVClientPrivKey; // The resource type used to keep track of the vendor library for XID's. RESTYPE idResource; static int idResourceDeleteCallback(void *value, XID id) { return 0; } static GlxScreenPriv * xglvGetScreenPrivate(ScreenPtr pScreen) { return dixLookupPrivate(&pScreen->devPrivates, &glvXGLVScreenPrivKey); } static void xglvSetScreenPrivate(ScreenPtr pScreen, void *priv) { dixSetPrivate(&pScreen->devPrivates, &glvXGLVScreenPrivKey, priv); } GlxScreenPriv * GlxGetScreen(ScreenPtr pScreen) { if (pScreen != NULL) { GlxScreenPriv *priv = xglvGetScreenPrivate(pScreen); if (priv == NULL) { priv = calloc(1, sizeof(GlxScreenPriv)); if (priv == NULL) { return NULL; } xglvSetScreenPrivate(pScreen, priv); } return priv; } else { return NULL; } } static void GlxMappingReset(void) { int i; for (i=0; idevPrivates, &glvXGLVClientPrivKey); } static void xglvSetClientPrivate(ClientPtr pClient, void *priv) { dixSetPrivate(&pClient->devPrivates, &glvXGLVClientPrivKey, priv); } GlxClientPriv * GlxGetClientData(ClientPtr client) { GlxClientPriv *cl = xglvGetClientPrivate(client); if (cl == NULL) { cl = calloc(1, sizeof(GlxClientPriv) + screenInfo.numScreens * sizeof(GlxServerVendor *)); if (cl != NULL) { int i; cl->vendors = (GlxServerVendor **) (cl + 1); for (i=0; ivendors[i] = GlxGetVendorForScreen(NULL, screenInfo.screens[i]); } xglvSetClientPrivate(client, cl); } } return cl; } void GlxFreeClientData(ClientPtr client) { GlxClientPriv *cl = xglvGetClientPrivate(client); if (cl != NULL) { unsigned int i; for (i = 0; i < cl->contextTagCount; i++) { GlxContextTagInfo *tag = &cl->contextTags[i]; if (tag->vendor != NULL) { tag->vendor->glxvc.makeCurrent(client, tag->tag, None, None, None, 0); } } xglvSetClientPrivate(client, NULL); free(cl->contextTags); free(cl); } } static void GLXClientCallback(CallbackListPtr *list, void *closure, void *data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr client = clientinfo->client; switch (client->clientState) { case ClientStateRetained: case ClientStateGone: GlxFreeClientData(client); break; } } static void GLXReset(ExtensionEntry *extEntry) { // xf86Msg(X_INFO, "GLX: GLXReset\n"); GlxVendorExtensionReset(extEntry); GlxDispatchReset(); GlxMappingReset(); if ((dispatchException & DE_TERMINATE) == DE_TERMINATE) { while (vndInitCallbackList.list != NULL) { CallbackPtr next = vndInitCallbackList.list->next; free(vndInitCallbackList.list); vndInitCallbackList.list = next; } } } void GlxExtensionInit(void) { ExtensionEntry *extEntry; GlxExtensionEntry = NULL; // Init private keys, per-screen data if (!dixRegisterPrivateKey(&glvXGLVScreenPrivKey, PRIVATE_SCREEN, 0)) return; if (!dixRegisterPrivateKey(&glvXGLVClientPrivKey, PRIVATE_CLIENT, 0)) return; if (!GlxMappingInit()) { return; } if (!GlxDispatchInit()) { return; } if (!AddCallback(&ClientStateCallback, GLXClientCallback, NULL)) { return; } extEntry = AddExtension(GLX_EXTENSION_NAME, __GLX_NUMBER_EVENTS, __GLX_NUMBER_ERRORS, GlxDispatchRequest, GlxDispatchRequest, GLXReset, StandardMinorOpcode); if (!extEntry) { return; } GlxExtensionEntry = extEntry; GlxErrorBase = extEntry->errorBase; CallCallbacks(&vndInitCallbackListPtr, extEntry); /* We'd better have found at least one vendor */ for (int i = 0; i < screenInfo.numScreens; i++) if (GlxGetVendorForScreen(serverClient, screenInfo.screens[i])) return; extEntry->base = 0; } static int GlxForwardRequest(GlxServerVendor *vendor, ClientPtr client) { return vendor->glxvc.handleRequest(client); } static GlxServerVendor * GlxGetContextTag(ClientPtr client, GLXContextTag tag) { GlxContextTagInfo *tagInfo = GlxLookupContextTag(client, tag); if (tagInfo != NULL) { return tagInfo->vendor; } else { return NULL; } } static Bool GlxSetContextTagPrivate(ClientPtr client, GLXContextTag tag, void *data) { GlxContextTagInfo *tagInfo = GlxLookupContextTag(client, tag); if (tagInfo != NULL) { tagInfo->data = data; return TRUE; } else { return FALSE; } } static void * GlxGetContextTagPrivate(ClientPtr client, GLXContextTag tag) { GlxContextTagInfo *tagInfo = GlxLookupContextTag(client, tag); if (tagInfo != NULL) { return tagInfo->data; } else { return NULL; } } static GlxServerImports * GlxAllocateServerImports(void) { return calloc(1, sizeof(GlxServerImports)); } static void GlxFreeServerImports(GlxServerImports *imports) { free(imports); } _X_EXPORT const GlxServerExports glxServer = { .majorVersion = GLXSERVER_VENDOR_ABI_MAJOR_VERSION, .minorVersion = GLXSERVER_VENDOR_ABI_MINOR_VERSION, .extensionInitCallback = &vndInitCallbackListPtr, .allocateServerImports = GlxAllocateServerImports, .freeServerImports = GlxFreeServerImports, .createVendor = GlxCreateVendor, .destroyVendor = GlxDestroyVendor, .setScreenVendor = GlxSetScreenVendor, .addXIDMap = GlxAddXIDMap, .getXIDMap = GlxGetXIDMap, .removeXIDMap = GlxRemoveXIDMap, .getContextTag = GlxGetContextTag, .setContextTagPrivate = GlxSetContextTagPrivate, .getContextTagPrivate = GlxGetContextTagPrivate, .getVendorForScreen = GlxGetVendorForScreen, .forwardRequest = GlxForwardRequest, .setClientScreenVendor = GlxSetClientScreenVendor, }; const GlxServerExports * glvndGetExports(void) { return &glxServer; } xorg-server-21.1.16/glx/vndservermapping.c0000644000175000017500000001470714757411105014174 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #include "vndserver.h" #include #include "vndservervendor.h" static ClientPtr requestClient = NULL; void GlxSetRequestClient(ClientPtr client) { requestClient = client; } static GlxServerVendor *LookupXIDMapResource(XID id) { void *ptr = NULL; int rv; rv = dixLookupResourceByType(&ptr, id, idResource, NULL, DixReadAccess); if (rv == Success) { return (GlxServerVendor *) ptr; } else { return NULL; } } GlxServerVendor *GlxGetXIDMap(XID id) { GlxServerVendor *vendor = LookupXIDMapResource(id); if (vendor == NULL) { // If we haven't seen this XID before, then it may be a drawable that // wasn't created through GLX, like a regular X window or pixmap. Try // to look up a matching drawable to find a screen number for it. void *ptr = NULL; int rv = dixLookupResourceByClass(&ptr, id, RC_DRAWABLE, NULL, DixGetAttrAccess); if (rv == Success && ptr != NULL) { DrawablePtr draw = (DrawablePtr) ptr; vendor = GlxGetVendorForScreen(requestClient, draw->pScreen); } } return vendor; } Bool GlxAddXIDMap(XID id, GlxServerVendor *vendor) { if (id == 0 || vendor == NULL) { return FALSE; } if (LookupXIDMapResource(id) != NULL) { return FALSE; } return AddResource(id, idResource, vendor); } void GlxRemoveXIDMap(XID id) { FreeResourceByType(id, idResource, FALSE); } GlxContextTagInfo *GlxAllocContextTag(ClientPtr client, GlxServerVendor *vendor) { GlxClientPriv *cl; unsigned int index; if (vendor == NULL) { return NULL; } cl = GlxGetClientData(client); if (cl == NULL) { return NULL; } // Look for a free tag index. for (index=0; indexcontextTagCount; index++) { if (cl->contextTags[index].vendor == NULL) { break; } } if (index >= cl->contextTagCount) { // We didn't find a free entry, so grow the array. GlxContextTagInfo *newTags; unsigned int newSize = cl->contextTagCount * 2; if (newSize == 0) { // TODO: What's a good starting size for this? newSize = 16; } newTags = (GlxContextTagInfo *) realloc(cl->contextTags, newSize * sizeof(GlxContextTagInfo)); if (newTags == NULL) { return NULL; } memset(&newTags[cl->contextTagCount], 0, (newSize - cl->contextTagCount) * sizeof(GlxContextTagInfo)); index = cl->contextTagCount; cl->contextTags = newTags; cl->contextTagCount = newSize; } assert(index >= 0); assert(index < cl->contextTagCount); memset(&cl->contextTags[index], 0, sizeof(GlxContextTagInfo)); cl->contextTags[index].tag = (GLXContextTag) (index + 1); cl->contextTags[index].client = client; cl->contextTags[index].vendor = vendor; return &cl->contextTags[index]; } GlxContextTagInfo *GlxLookupContextTag(ClientPtr client, GLXContextTag tag) { GlxClientPriv *cl = GlxGetClientData(client); if (cl == NULL) { return NULL; } if (tag > 0 && (tag - 1) < cl->contextTagCount) { if (cl->contextTags[tag - 1].vendor != NULL) { assert(cl->contextTags[tag - 1].client == client); return &cl->contextTags[tag - 1]; } } return NULL; } void GlxFreeContextTag(GlxContextTagInfo *tagInfo) { if (tagInfo != NULL) { tagInfo->vendor = NULL; tagInfo->vendor = NULL; tagInfo->data = NULL; tagInfo->context = None; tagInfo->drawable = None; tagInfo->readdrawable = None; } } Bool GlxSetScreenVendor(ScreenPtr screen, GlxServerVendor *vendor) { GlxScreenPriv *priv; if (vendor == NULL) { return FALSE; } priv = GlxGetScreen(screen); if (priv == NULL) { return FALSE; } if (priv->vendor != NULL) { return FALSE; } priv->vendor = vendor; return TRUE; } Bool GlxSetClientScreenVendor(ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor) { GlxClientPriv *cl; if (screen == NULL || screen->isGPU) { return FALSE; } cl = GlxGetClientData(client); if (cl == NULL) { return FALSE; } if (vendor != NULL) { cl->vendors[screen->myNum] = vendor; } else { cl->vendors[screen->myNum] = GlxGetVendorForScreen(NULL, screen); } return TRUE; } GlxServerVendor *GlxGetVendorForScreen(ClientPtr client, ScreenPtr screen) { // Note that the client won't be sending GPU screen numbers, so we don't // need per-client mappings for them. if (client != NULL && !screen->isGPU) { GlxClientPriv *cl = GlxGetClientData(client); if (cl != NULL) { return cl->vendors[screen->myNum]; } else { return NULL; } } else { GlxScreenPriv *priv = GlxGetScreen(screen); if (priv != NULL) { return priv->vendor; } else { return NULL; } } } xorg-server-21.1.16/glx/vndservervendor.h0000644000175000017500000000421514757411105014034 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #ifndef VND_SERVER_VENDOR_H #define VND_SERVER_VENDOR_H #include #include "glxvndabi.h" #include "list.h" #if defined(__cplusplus) extern "C" { #endif /** * Info related to a single vendor library. */ struct GlxServerVendorRec { GlxServerImports glxvc; struct xorg_list entry; }; /** * A linked list of vendor libraries. * * Note that this list only includes vendor libraries that were successfully * initialized. */ extern struct xorg_list GlxVendorList; GlxServerVendor *GlxCreateVendor(const GlxServerImports *imports); void GlxDestroyVendor(GlxServerVendor *vendor); void GlxVendorExtensionReset(const ExtensionEntry *extEntry); #if defined(__cplusplus) } #endif #endif // VND_SERVER_VENDOR_H xorg-server-21.1.16/glx/vndservervendor.c0000644000175000017500000000652314757411105014033 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ #include "vndservervendor.h" struct xorg_list GlxVendorList = { &GlxVendorList, &GlxVendorList }; GlxServerVendor *GlxCreateVendor(const GlxServerImports *imports) { GlxServerVendor *vendor = NULL; if (imports == NULL) { ErrorF("GLX: Vendor library did not provide an imports table\n"); return NULL; } if (imports->extensionCloseDown == NULL || imports->handleRequest == NULL || imports->getDispatchAddress == NULL || imports->makeCurrent == NULL) { ErrorF("GLX: Vendor library is missing required callback functions.\n"); return NULL; } vendor = (GlxServerVendor *) calloc(1, sizeof(GlxServerVendor)); if (vendor == NULL) { ErrorF("GLX: Can't allocate vendor library.\n"); return NULL; } memcpy(&vendor->glxvc, imports, sizeof(GlxServerImports)); xorg_list_append(&vendor->entry, &GlxVendorList); return vendor; } void GlxDestroyVendor(GlxServerVendor *vendor) { if (vendor != NULL) { xorg_list_del(&vendor->entry); free(vendor); } } void GlxVendorExtensionReset(const ExtensionEntry *extEntry) { GlxServerVendor *vendor, *tempVendor; // TODO: Do we allow the driver to destroy a vendor library handle from // here? xorg_list_for_each_entry_safe(vendor, tempVendor, &GlxVendorList, entry) { if (vendor->glxvc.extensionCloseDown != NULL) { vendor->glxvc.extensionCloseDown(extEntry); } } // If the server is exiting instead of starting a new generation, then // free the remaining GlxServerVendor structs. // // XXX this used to be conditional on xf86ServerIsExiting, but it's // cleaner to just always create the vendor struct on every generation, // if nothing else so all ddxes get the same behavior. xorg_list_for_each_entry_safe(vendor, tempVendor, &GlxVendorList, entry) { GlxDestroyVendor(vendor); } } xorg-server-21.1.16/glx/vnd_dispatch_stubs.c0000644000175000017500000003676114757411105014474 #include #include #include "vndserver.h" // HACK: The opcode in old glxproto.h has a typo in it. #if !defined(X_GLXCreateContextAttribsARB) #define X_GLXCreateContextAttribsARB X_GLXCreateContextAtrribsARB #endif static int dispatch_Render(ClientPtr client) { REQUEST(xGLXRenderReq); CARD32 contextTag; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); contextTag = GlxCheckSwap(client, stuff->contextTag); vendor = glxServer.getContextTag(client, contextTag); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = contextTag; return GlxErrorBase + GLXBadContextTag; } } static int dispatch_RenderLarge(ClientPtr client) { REQUEST(xGLXRenderLargeReq); CARD32 contextTag; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); contextTag = GlxCheckSwap(client, stuff->contextTag); vendor = glxServer.getContextTag(client, contextTag); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = contextTag; return GlxErrorBase + GLXBadContextTag; } } static int dispatch_CreateContext(ClientPtr client) { REQUEST(xGLXCreateContextReq); CARD32 screen, context; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); context = GlxCheckSwap(client, stuff->context); LEGAL_NEW_RESOURCE(context, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(context, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(context); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_DestroyContext(ClientPtr client) { REQUEST(xGLXDestroyContextReq); CARD32 context; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); context = GlxCheckSwap(client, stuff->context); vendor = glxServer.getXIDMap(context); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); if (ret == Success) { glxServer.removeXIDMap(context); } return ret; } else { client->errorValue = context; return GlxErrorBase + GLXBadContext; } } static int dispatch_WaitGL(ClientPtr client) { REQUEST(xGLXWaitGLReq); CARD32 contextTag; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); contextTag = GlxCheckSwap(client, stuff->contextTag); vendor = glxServer.getContextTag(client, contextTag); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = contextTag; return GlxErrorBase + GLXBadContextTag; } } static int dispatch_WaitX(ClientPtr client) { REQUEST(xGLXWaitXReq); CARD32 contextTag; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); contextTag = GlxCheckSwap(client, stuff->contextTag); vendor = glxServer.getContextTag(client, contextTag); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = contextTag; return GlxErrorBase + GLXBadContextTag; } } static int dispatch_UseXFont(ClientPtr client) { REQUEST(xGLXUseXFontReq); CARD32 contextTag; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); contextTag = GlxCheckSwap(client, stuff->contextTag); vendor = glxServer.getContextTag(client, contextTag); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = contextTag; return GlxErrorBase + GLXBadContextTag; } } static int dispatch_CreateGLXPixmap(ClientPtr client) { REQUEST(xGLXCreateGLXPixmapReq); CARD32 screen, glxpixmap; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); glxpixmap = GlxCheckSwap(client, stuff->glxpixmap); LEGAL_NEW_RESOURCE(glxpixmap, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(glxpixmap, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(glxpixmap); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_GetVisualConfigs(ClientPtr client) { REQUEST(xGLXGetVisualConfigsReq); CARD32 screen; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_DestroyGLXPixmap(ClientPtr client) { REQUEST(xGLXDestroyGLXPixmapReq); CARD32 glxpixmap; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); glxpixmap = GlxCheckSwap(client, stuff->glxpixmap); vendor = glxServer.getXIDMap(glxpixmap); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = glxpixmap; return GlxErrorBase + GLXBadPixmap; } } static int dispatch_QueryExtensionsString(ClientPtr client) { REQUEST(xGLXQueryExtensionsStringReq); CARD32 screen; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_QueryServerString(ClientPtr client) { REQUEST(xGLXQueryServerStringReq); CARD32 screen; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_ChangeDrawableAttributes(ClientPtr client) { REQUEST(xGLXChangeDrawableAttributesReq); CARD32 drawable; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); drawable = GlxCheckSwap(client, stuff->drawable); vendor = glxServer.getXIDMap(drawable); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = drawable; return BadDrawable; } } static int dispatch_CreateNewContext(ClientPtr client) { REQUEST(xGLXCreateNewContextReq); CARD32 screen, context; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); context = GlxCheckSwap(client, stuff->context); LEGAL_NEW_RESOURCE(context, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(context, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(context); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_CreatePbuffer(ClientPtr client) { REQUEST(xGLXCreatePbufferReq); CARD32 screen, pbuffer; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); screen = GlxCheckSwap(client, stuff->screen); pbuffer = GlxCheckSwap(client, stuff->pbuffer); LEGAL_NEW_RESOURCE(pbuffer, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(pbuffer, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(pbuffer); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_CreatePixmap(ClientPtr client) { REQUEST(xGLXCreatePixmapReq); CARD32 screen, glxpixmap; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); screen = GlxCheckSwap(client, stuff->screen); glxpixmap = GlxCheckSwap(client, stuff->glxpixmap); LEGAL_NEW_RESOURCE(glxpixmap, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(glxpixmap, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(glxpixmap); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_CreateWindow(ClientPtr client) { REQUEST(xGLXCreateWindowReq); CARD32 screen, glxwindow; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); screen = GlxCheckSwap(client, stuff->screen); glxwindow = GlxCheckSwap(client, stuff->glxwindow); LEGAL_NEW_RESOURCE(glxwindow, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(glxwindow, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(glxwindow); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_CreateContextAttribsARB(ClientPtr client) { REQUEST(xGLXCreateContextAttribsARBReq); CARD32 screen, context; GlxServerVendor *vendor = NULL; REQUEST_AT_LEAST_SIZE(*stuff); screen = GlxCheckSwap(client, stuff->screen); context = GlxCheckSwap(client, stuff->context); LEGAL_NEW_RESOURCE(context, client); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; if (!glxServer.addXIDMap(context, vendor)) { return BadAlloc; } ret = glxServer.forwardRequest(vendor, client); if (ret != Success) { glxServer.removeXIDMap(context); } return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_DestroyPbuffer(ClientPtr client) { REQUEST(xGLXDestroyPbufferReq); CARD32 pbuffer; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); pbuffer = GlxCheckSwap(client, stuff->pbuffer); vendor = glxServer.getXIDMap(pbuffer); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); if (ret == Success) { glxServer.removeXIDMap(pbuffer); } return ret; } else { client->errorValue = pbuffer; return GlxErrorBase + GLXBadPbuffer; } } static int dispatch_DestroyPixmap(ClientPtr client) { REQUEST(xGLXDestroyPixmapReq); CARD32 glxpixmap; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); glxpixmap = GlxCheckSwap(client, stuff->glxpixmap); vendor = glxServer.getXIDMap(glxpixmap); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); if (ret == Success) { glxServer.removeXIDMap(glxpixmap); } return ret; } else { client->errorValue = glxpixmap; return GlxErrorBase + GLXBadPixmap; } } static int dispatch_DestroyWindow(ClientPtr client) { REQUEST(xGLXDestroyWindowReq); CARD32 glxwindow; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); glxwindow = GlxCheckSwap(client, stuff->glxwindow); vendor = glxServer.getXIDMap(glxwindow); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); if (ret == Success) { glxServer.removeXIDMap(glxwindow); } return ret; } else { client->errorValue = glxwindow; return GlxErrorBase + GLXBadWindow; } } static int dispatch_GetDrawableAttributes(ClientPtr client) { REQUEST(xGLXGetDrawableAttributesReq); CARD32 drawable; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); drawable = GlxCheckSwap(client, stuff->drawable); vendor = glxServer.getXIDMap(drawable); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = drawable; return BadDrawable; } } static int dispatch_GetFBConfigs(ClientPtr client) { REQUEST(xGLXGetFBConfigsReq); CARD32 screen; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); screen = GlxCheckSwap(client, stuff->screen); if (screen < screenInfo.numScreens) { vendor = glxServer.getVendorForScreen(client, screenInfo.screens[screen]); } if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = screen; return BadMatch; } } static int dispatch_QueryContext(ClientPtr client) { REQUEST(xGLXQueryContextReq); CARD32 context; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); context = GlxCheckSwap(client, stuff->context); vendor = glxServer.getXIDMap(context); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = context; return GlxErrorBase + GLXBadContext; } } static int dispatch_IsDirect(ClientPtr client) { REQUEST(xGLXIsDirectReq); CARD32 context; GlxServerVendor *vendor = NULL; REQUEST_SIZE_MATCH(*stuff); context = GlxCheckSwap(client, stuff->context); vendor = glxServer.getXIDMap(context); if (vendor != NULL) { int ret; ret = glxServer.forwardRequest(vendor, client); return ret; } else { client->errorValue = context; return GlxErrorBase + GLXBadContext; } } xorg-server-21.1.16/hw/0000755000175000017500000000000014757411134010333 5xorg-server-21.1.16/hw/kdrive/0000755000175000017500000000000014757411136011621 5xorg-server-21.1.16/hw/kdrive/ephyr/0000755000175000017500000000000014757411136012750 5xorg-server-21.1.16/hw/kdrive/ephyr/meson.build0000644000175000017500000000264414757411105015034 srcs = [ 'ephyr.c', 'ephyrinit.c', 'ephyrcursor.c', 'ephyr_draw.c', 'hostx.c', ] xephyr_dep = [ common_dep, dependency('xcb'), dependency('xcb-shape'), dependency('xcb-render'), dependency('xcb-renderutil'), dependency('xcb-aux'), dependency('xcb-image'), dependency('xcb-icccm'), dependency('xcb-shm', version : '>=1.9.3'), dependency('xcb-keysyms'), dependency('xcb-randr'), dependency('xcb-xkb'), ] xephyr_glamor = [] if build_glamor srcs += 'ephyr_glamor_glx.c' if build_xv srcs += 'ephyr_glamor_xv.c' endif xephyr_glamor += glamor xephyr_glamor += glamor_egl_stubs xephyr_dep += dependency('x11-xcb') xephyr_dep += epoxy_dep endif if build_xv srcs += 'ephyrvideo.c' xephyr_dep += dependency('xcb-xv') endif xephyr_server = executable( 'Xephyr', srcs, include_directories: [ inc, include_directories('../src') ], dependencies: xephyr_dep, link_with: [ libxserver_main, libxserver_exa, xephyr_glamor, kdrive, libxserver_fb, libxserver, libxserver_config, libxserver_xkb_stubs, libxserver_xi_stubs, libxserver_glx, libglxvnd, ], install: true, ) xephyr_man = configure_file( input: 'man/Xephyr.man', output: 'Xephyr.1', configuration: manpage_config, ) install_man(xephyr_man) xorg-server-21.1.16/hw/kdrive/ephyr/Makefile.am0000644000175000017500000000416514757411105014726 # Copyright © 2013 Intel Corporation # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. SUBDIRS = man AM_CPPFLAGS = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ \ @XEPHYR_INCS@ \ @XEPHYR_CFLAGS@ \ -DHAVE_DIX_CONFIG_H \ -I$(top_srcdir) \ -I$(top_srcdir)/glamor \ -I$(top_srcdir)/exa if XV XV_SRCS = ephyrvideo.c endif if GLAMOR if XV GLAMOR_XV_SRCS = ephyr_glamor_xv.c endif GLAMOR_SRCS = \ ephyr_glamor_glx.c \ ephyr_glamor_glx.h \ $(GLAMOR_XV_SRCS) \ $() endif bin_PROGRAMS = Xephyr Xephyr_SOURCES = \ ephyr.c \ ephyr.h \ ephyrlog.h \ ephyr_draw.c \ ephyrinit.c \ ephyrcursor.c \ hostx.c \ hostx.h \ $(XV_SRCS) \ $(GLAMOR_SRCS) \ $() if GLAMOR AM_CPPFLAGS += $(XLIB_CFLAGS) XEPHYR_GLAMOR_LIB = \ $(top_builddir)/glamor/libglamor.la \ $(top_builddir)/glamor/libglamor_egl_stubs.la \ $() endif Xephyr_LDADD = \ $(top_builddir)/exa/libexa.la \ $(XEPHYR_GLAMOR_LIB) \ @KDRIVE_LIBS@ \ @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ $(XEPHYR_GLAMOR_LIB) Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) relink: $(AM_V_at)rm -f $(bin_PROGRAMS) && $(MAKE) $(bin_PROGRAMS) xorg-server-21.1.16/hw/kdrive/ephyr/Makefile.in0000644000175000017500000010510114757411115014730 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright © 2013 Intel Corporation # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xephyr$(EXEEXT) @GLAMOR_TRUE@am__append_1 = $(XLIB_CFLAGS) subdir = hw/kdrive/ephyr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__Xephyr_SOURCES_DIST = ephyr.c ephyr.h ephyrlog.h ephyr_draw.c \ ephyrinit.c ephyrcursor.c hostx.c hostx.h ephyrvideo.c \ ephyr_glamor_glx.c ephyr_glamor_glx.h ephyr_glamor_xv.c @XV_TRUE@am__objects_1 = ephyrvideo.$(OBJEXT) @GLAMOR_TRUE@@XV_TRUE@am__objects_2 = ephyr_glamor_xv.$(OBJEXT) @GLAMOR_TRUE@am__objects_3 = ephyr_glamor_glx.$(OBJEXT) \ @GLAMOR_TRUE@ $(am__objects_2) am_Xephyr_OBJECTS = ephyr.$(OBJEXT) ephyr_draw.$(OBJEXT) \ ephyrinit.$(OBJEXT) ephyrcursor.$(OBJEXT) hostx.$(OBJEXT) \ $(am__objects_1) $(am__objects_3) Xephyr_OBJECTS = $(am_Xephyr_OBJECTS) @GLAMOR_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/glamor/libglamor.la \ @GLAMOR_TRUE@ $(top_builddir)/glamor/libglamor_egl_stubs.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = Xephyr_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(Xephyr_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/ephyr.Po ./$(DEPDIR)/ephyr_draw.Po \ ./$(DEPDIR)/ephyr_glamor_glx.Po ./$(DEPDIR)/ephyr_glamor_xv.Po \ ./$(DEPDIR)/ephyrcursor.Po ./$(DEPDIR)/ephyrinit.Po \ ./$(DEPDIR)/ephyrvideo.Po ./$(DEPDIR)/hostx.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(Xephyr_SOURCES) DIST_SOURCES = $(am__Xephyr_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man AM_CPPFLAGS = @KDRIVE_INCS@ @KDRIVE_CFLAGS@ @XEPHYR_INCS@ \ @XEPHYR_CFLAGS@ -DHAVE_DIX_CONFIG_H -I$(top_srcdir) \ -I$(top_srcdir)/glamor -I$(top_srcdir)/exa $(am__append_1) @XV_TRUE@XV_SRCS = ephyrvideo.c @GLAMOR_TRUE@@XV_TRUE@GLAMOR_XV_SRCS = ephyr_glamor_xv.c @GLAMOR_TRUE@GLAMOR_SRCS = \ @GLAMOR_TRUE@ ephyr_glamor_glx.c \ @GLAMOR_TRUE@ ephyr_glamor_glx.h \ @GLAMOR_TRUE@ $(GLAMOR_XV_SRCS) \ @GLAMOR_TRUE@ $() Xephyr_SOURCES = \ ephyr.c \ ephyr.h \ ephyrlog.h \ ephyr_draw.c \ ephyrinit.c \ ephyrcursor.c \ hostx.c \ hostx.h \ $(XV_SRCS) \ $(GLAMOR_SRCS) \ $() @GLAMOR_TRUE@XEPHYR_GLAMOR_LIB = \ @GLAMOR_TRUE@ $(top_builddir)/glamor/libglamor.la \ @GLAMOR_TRUE@ $(top_builddir)/glamor/libglamor_egl_stubs.la \ @GLAMOR_TRUE@ $() Xephyr_LDADD = \ $(top_builddir)/exa/libexa.la \ $(XEPHYR_GLAMOR_LIB) \ @KDRIVE_LIBS@ \ @XEPHYR_LIBS@ Xephyr_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ $(XEPHYR_GLAMOR_LIB) Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/ephyr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/kdrive/ephyr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list Xephyr$(EXEEXT): $(Xephyr_OBJECTS) $(Xephyr_DEPENDENCIES) $(EXTRA_Xephyr_DEPENDENCIES) @rm -f Xephyr$(EXEEXT) $(AM_V_CCLD)$(Xephyr_LINK) $(Xephyr_OBJECTS) $(Xephyr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_draw.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_glamor_glx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_glamor_xv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrcursor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrinit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrvideo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hostx.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/ephyr.Po -rm -f ./$(DEPDIR)/ephyr_draw.Po -rm -f ./$(DEPDIR)/ephyr_glamor_glx.Po -rm -f ./$(DEPDIR)/ephyr_glamor_xv.Po -rm -f ./$(DEPDIR)/ephyrcursor.Po -rm -f ./$(DEPDIR)/ephyrinit.Po -rm -f ./$(DEPDIR)/ephyrvideo.Po -rm -f ./$(DEPDIR)/hostx.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/ephyr.Po -rm -f ./$(DEPDIR)/ephyr_draw.Po -rm -f ./$(DEPDIR)/ephyr_glamor_glx.Po -rm -f ./$(DEPDIR)/ephyr_glamor_xv.Po -rm -f ./$(DEPDIR)/ephyrcursor.Po -rm -f ./$(DEPDIR)/ephyrinit.Po -rm -f ./$(DEPDIR)/ephyrvideo.Po -rm -f ./$(DEPDIR)/hostx.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile relink: $(AM_V_at)rm -f $(bin_PROGRAMS) && $(MAKE) $(bin_PROGRAMS) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/kdrive/ephyr/README0000644000175000017500000000401314757411105013542 Xephyr README ============= What Is It ? ============ Xephyr is a a kdrive server that outputs to a window on a pre-existing 'host' X display. Think Xnest but with support for modern extensions like composite, damage and randr. Unlike Xnest which is an X proxy, i.e. limited to the capabilities of the host X server, Xephyr is a real X server which uses the host X server window as "framebuffer" via fast SHM XImages. It also has support for 'visually' debugging what the server is painting. How To Use ========== You probably want to run like; Xephyr :1 -ac -screen 800x600 & Then set DISPLAY=:1 and run whatever X apps you like. Use 'xrandr' to change to orientation/size. There is a '-parent' switch which works just like Xnest's ( for use with things like matchbox-nest - http://matchbox.handhelds.org ). There is also a '-host-cursor' switch to set 'cursor acceleration' - The host's cursor is reused. This is only really there to aid debugging by avoiding server paints for the cursor. Performance improvement is negligible. Send a SIGUSR1 to the server ( eg kill -USR1 `pidof Xephyr` ) to toggle the debugging mode. In this mode red rectangles are painted to screen areas getting painted before painting the actual content. The delay between this can be altered by setting a XEPHYR_PAUSE env var to a value in microseconds. Caveats ======= - Depth is limited to being the same as the host. *Update* As of 8/11/2004. Xephyr can now do 8bpp & 16bpp on 24bpp host. - Rotated displays are currently updated via full blits. This is slower than a normal oprientated display. Debug mode will therefore not be of much use rotated. - The '-host-cursor' cursor is static in its appearance. - The build gets a warning about 'nanosleep'. I think the various '-D' build flags are causing this. I haven't figured as yet how to work around it. It doesn't appear to break anything however. - Keyboard handling is basic but works. - Mouse button 5 probably won't work. Matthew Allum 2004 xorg-server-21.1.16/hw/kdrive/ephyr/ephyr.c0000644000175000017500000011124214757411105014160 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2004 Nokia * * 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 Nokia not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Nokia makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL NOKIA 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 #endif #include #include #include "ephyr.h" #include "inputstr.h" #include "scrnintstr.h" #include "ephyrlog.h" #ifdef GLAMOR #include "glamor.h" #endif #include "ephyr_glamor_glx.h" #include "glx_extinit.h" #include "xkbsrv.h" extern Bool ephyr_glamor; KdKeyboardInfo *ephyrKbd; KdPointerInfo *ephyrMouse; Bool ephyrNoDRI = FALSE; Bool ephyrNoXV = FALSE; static int mouseState = 0; static Rotation ephyrRandr = RR_Rotate_0; typedef struct _EphyrInputPrivate { Bool enabled; } EphyrKbdPrivate, EphyrPointerPrivate; Bool EphyrWantGrayScale = 0; Bool EphyrWantResize = 0; Bool EphyrWantNoHostGrab = 0; Bool ephyrInitialize(KdCardInfo * card, EphyrPriv * priv) { OsSignal(SIGUSR1, hostx_handle_signal); priv->base = 0; priv->bytes_per_line = 0; return TRUE; } Bool ephyrCardInit(KdCardInfo * card) { EphyrPriv *priv; priv = (EphyrPriv *) malloc(sizeof(EphyrPriv)); if (!priv) return FALSE; if (!ephyrInitialize(card, priv)) { free(priv); return FALSE; } card->driver = priv; return TRUE; } Bool ephyrScreenInitialize(KdScreenInfo *screen) { EphyrScrPriv *scrpriv = screen->driver; int x = 0, y = 0; int width = 640, height = 480; CARD32 redMask, greenMask, blueMask; if (hostx_want_screen_geometry(screen, &width, &height, &x, &y) || !screen->width || !screen->height) { screen->width = width; screen->height = height; screen->x = x; screen->y = y; } if (EphyrWantGrayScale) screen->fb.depth = 8; if (screen->fb.depth && screen->fb.depth != hostx_get_depth()) { if (screen->fb.depth < hostx_get_depth() && (screen->fb.depth == 24 || screen->fb.depth == 16 || screen->fb.depth == 8)) { scrpriv->server_depth = screen->fb.depth; } else ErrorF ("\nXephyr: requested screen depth not supported, setting to match hosts.\n"); } screen->fb.depth = hostx_get_server_depth(screen); screen->rate = 72; if (screen->fb.depth <= 8) { if (EphyrWantGrayScale) screen->fb.visuals = ((1 << StaticGray) | (1 << GrayScale)); else screen->fb.visuals = ((1 << StaticGray) | (1 << GrayScale) | (1 << StaticColor) | (1 << PseudoColor) | (1 << TrueColor) | (1 << DirectColor)); screen->fb.redMask = 0x00; screen->fb.greenMask = 0x00; screen->fb.blueMask = 0x00; screen->fb.depth = 8; screen->fb.bitsPerPixel = 8; } else { screen->fb.visuals = (1 << TrueColor); if (screen->fb.depth <= 15) { screen->fb.depth = 15; screen->fb.bitsPerPixel = 16; } else if (screen->fb.depth <= 16) { screen->fb.depth = 16; screen->fb.bitsPerPixel = 16; } else if (screen->fb.depth <= 24) { screen->fb.depth = 24; screen->fb.bitsPerPixel = 32; } else if (screen->fb.depth <= 30) { screen->fb.depth = 30; screen->fb.bitsPerPixel = 32; } else { ErrorF("\nXephyr: Unsupported screen depth %d\n", screen->fb.depth); return FALSE; } hostx_get_visual_masks(screen, &redMask, &greenMask, &blueMask); screen->fb.redMask = (Pixel) redMask; screen->fb.greenMask = (Pixel) greenMask; screen->fb.blueMask = (Pixel) blueMask; } scrpriv->randr = screen->randr; return ephyrMapFramebuffer(screen); } void * ephyrWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure) { KdScreenPriv(pScreen); EphyrPriv *priv = pScreenPriv->card->driver; if (!pScreenPriv->enabled) return 0; *size = priv->bytes_per_line; return priv->base + row * priv->bytes_per_line + offset; } /** * Figure out display buffer size. If fakexa is enabled, allocate a larger * buffer so that fakexa has space to put offscreen pixmaps. */ int ephyrBufferHeight(KdScreenInfo * screen) { int buffer_height; if (ephyrFuncs.initAccel == NULL) buffer_height = screen->height; else buffer_height = 3 * screen->height; return buffer_height; } Bool ephyrMapFramebuffer(KdScreenInfo * screen) { EphyrScrPriv *scrpriv = screen->driver; EphyrPriv *priv = screen->card->driver; KdPointerMatrix m; int buffer_height; EPHYR_LOG("screen->width: %d, screen->height: %d index=%d", screen->width, screen->height, screen->mynum); /* * Use the rotation last applied to ourselves (in the Xephyr case the fb * coordinate system moves independently of the pointer coordinate system). */ KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height); KdSetPointerMatrix(&m); buffer_height = ephyrBufferHeight(screen); priv->base = hostx_screen_init(screen, screen->x, screen->y, screen->width, screen->height, buffer_height, &priv->bytes_per_line, &screen->fb.bitsPerPixel); if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) { scrpriv->shadow = FALSE; screen->fb.byteStride = priv->bytes_per_line; screen->fb.pixelStride = screen->width; screen->fb.frameBuffer = (CARD8 *) (priv->base); } else { /* Rotated/Reflected so we need to use shadow fb */ scrpriv->shadow = TRUE; EPHYR_LOG("allocing shadow"); KdShadowFbAlloc(screen, scrpriv->randr & (RR_Rotate_90 | RR_Rotate_270)); } return TRUE; } void ephyrSetScreenSizes(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; if (scrpriv->randr & (RR_Rotate_0 | RR_Rotate_180)) { pScreen->width = screen->width; pScreen->height = screen->height; pScreen->mmWidth = screen->width_mm; pScreen->mmHeight = screen->height_mm; } else { pScreen->width = screen->height; pScreen->height = screen->width; pScreen->mmWidth = screen->height_mm; pScreen->mmHeight = screen->width_mm; } } Bool ephyrUnmapFramebuffer(KdScreenInfo * screen) { EphyrScrPriv *scrpriv = screen->driver; if (scrpriv->shadow) KdShadowFbFree(screen); /* Note, priv->base will get freed when XImage recreated */ return TRUE; } void ephyrShadowUpdate(ScreenPtr pScreen, shadowBufPtr pBuf) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EPHYR_LOG("slow paint"); /* FIXME: Slow Rotated/Reflected updates could be much * much faster efficiently updating via transforming * pBuf->pDamage regions */ shadowUpdateRotatePacked(pScreen, pBuf); hostx_paint_rect(screen, 0, 0, 0, 0, screen->width, screen->height); } static void ephyrInternalDamageRedisplay(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; RegionPtr pRegion; if (!scrpriv || !scrpriv->pDamage) return; pRegion = DamageRegion(scrpriv->pDamage); if (RegionNotEmpty(pRegion)) { int nbox; BoxPtr pbox; if (ephyr_glamor) { ephyr_glamor_damage_redisplay(scrpriv->glamor, pRegion); } else { nbox = RegionNumRects(pRegion); pbox = RegionRects(pRegion); while (nbox--) { hostx_paint_rect(screen, pbox->x1, pbox->y1, pbox->x1, pbox->y1, pbox->x2 - pbox->x1, pbox->y2 - pbox->y1); pbox++; } } DamageEmpty(scrpriv->pDamage); } } static void ephyrXcbProcessEvents(Bool queued_only); static Bool ephyrEventWorkProc(ClientPtr client, void *closure) { ephyrXcbProcessEvents(TRUE); return TRUE; } static void ephyrScreenBlockHandler(ScreenPtr pScreen, void *timeout) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; pScreen->BlockHandler = scrpriv->BlockHandler; (*pScreen->BlockHandler)(pScreen, timeout); scrpriv->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = ephyrScreenBlockHandler; if (scrpriv->pDamage) ephyrInternalDamageRedisplay(pScreen); if (hostx_has_queued_event()) { if (!QueueWorkProc(ephyrEventWorkProc, NULL, NULL)) FatalError("cannot queue event processing in ephyr block handler"); AdjustWaitForDelay(timeout, 0); } } Bool ephyrSetInternalDamage(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; PixmapPtr pPixmap = NULL; scrpriv->pDamage = DamageCreate((DamageReportFunc) 0, (DamageDestroyFunc) 0, DamageReportNone, TRUE, pScreen, pScreen); pPixmap = (*pScreen->GetScreenPixmap) (pScreen); DamageRegister(&pPixmap->drawable, scrpriv->pDamage); return TRUE; } void ephyrUnsetInternalDamage(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; DamageDestroy(scrpriv->pDamage); scrpriv->pDamage = NULL; } #ifdef RANDR Bool ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; RRScreenSizePtr pSize; Rotation randr; int n = 0; struct { int width, height; } sizes[] = { {1600, 1200}, {1400, 1050}, {1280, 960}, {1280, 1024}, {1152, 864}, {1024, 768}, {832, 624}, {800, 600}, {720, 400}, {480, 640}, {640, 480}, {640, 400}, {320, 240}, {240, 320}, {160, 160}, {0, 0} }; EPHYR_LOG("mark"); *rotations = RR_Rotate_All | RR_Reflect_All; if (!hostx_want_preexisting_window(screen) && !hostx_want_fullscreen()) { /* only if no -parent switch */ while (sizes[n].width != 0 && sizes[n].height != 0) { RRRegisterSize(pScreen, sizes[n].width, sizes[n].height, (sizes[n].width * screen->width_mm) / screen->width, (sizes[n].height * screen->height_mm) / screen->height); n++; } } pSize = RRRegisterSize(pScreen, screen->width, screen->height, screen->width_mm, screen->height_mm); randr = KdSubRotation(scrpriv->randr, screen->randr); RRSetCurrentConfig(pScreen, randr, 0, pSize); return TRUE; } Bool ephyrRandRSetConfig(ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; Bool wasEnabled = pScreenPriv->enabled; EphyrScrPriv oldscr; int oldwidth, oldheight, oldmmwidth, oldmmheight; Bool oldshadow; int newwidth, newheight; if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) { newwidth = pSize->width; newheight = pSize->height; } else { newwidth = pSize->height; newheight = pSize->width; } if (wasEnabled) KdDisableScreen(pScreen); oldscr = *scrpriv; oldwidth = screen->width; oldheight = screen->height; oldmmwidth = pScreen->mmWidth; oldmmheight = pScreen->mmHeight; oldshadow = scrpriv->shadow; /* * Set new configuration */ /* * We need to store the rotation value for pointer coords transformation; * though initially the pointer and fb rotation are identical, when we map * the fb, the screen will be reinitialized and return into an unrotated * state (presumably the HW is taking care of the rotation of the fb), but the * pointer still needs to be transformed. */ ephyrRandr = KdAddRotation(screen->randr, randr); scrpriv->randr = ephyrRandr; ephyrUnmapFramebuffer(screen); screen->width = newwidth; screen->height = newheight; scrpriv->win_width = screen->width; scrpriv->win_height = screen->height; #ifdef GLAMOR ephyr_glamor_set_window_size(scrpriv->glamor, scrpriv->win_width, scrpriv->win_height); #endif if (!ephyrMapFramebuffer(screen)) goto bail4; /* FIXME below should go in own call */ if (oldshadow) KdShadowUnset(screen->pScreen); else ephyrUnsetInternalDamage(screen->pScreen); ephyrSetScreenSizes(screen->pScreen); if (scrpriv->shadow) { if (!KdShadowSet(screen->pScreen, scrpriv->randr, ephyrShadowUpdate, ephyrWindowLinear)) goto bail4; } else { #ifdef GLAMOR if (ephyr_glamor) ephyr_glamor_create_screen_resources(pScreen); #endif /* Without shadow fb ( non rotated ) we need * to use damage to efficiently update display * via signal regions what to copy from 'fb'. */ if (!ephyrSetInternalDamage(screen->pScreen)) goto bail4; } /* * Set frame buffer mapping */ (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap(pScreen), pScreen->width, pScreen->height, screen->fb.depth, screen->fb.bitsPerPixel, screen->fb.byteStride, screen->fb.frameBuffer); /* set the subpixel order */ KdSetSubpixelOrder(pScreen, scrpriv->randr); if (wasEnabled) KdEnableScreen(pScreen); RRScreenSizeNotify(pScreen); return TRUE; bail4: EPHYR_LOG("bailed"); ephyrUnmapFramebuffer(screen); *scrpriv = oldscr; (void) ephyrMapFramebuffer(screen); pScreen->width = oldwidth; pScreen->height = oldheight; pScreen->mmWidth = oldmmwidth; pScreen->mmHeight = oldmmheight; if (wasEnabled) KdEnableScreen(pScreen); return FALSE; } Bool ephyrRandRInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; if (!RRScreenInit(pScreen)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); pScrPriv->rrGetInfo = ephyrRandRGetInfo; pScrPriv->rrSetConfig = ephyrRandRSetConfig; return TRUE; } static Bool ephyrResizeScreen (ScreenPtr pScreen, int newwidth, int newheight) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; RRScreenSize size = {0}; Bool ret; int t; if (screen->randr & (RR_Rotate_90|RR_Rotate_270)) { t = newwidth; newwidth = newheight; newheight = t; } if (newwidth == screen->width && newheight == screen->height) { return FALSE; } size.width = newwidth; size.height = newheight; hostx_size_set_from_configure(TRUE); ret = ephyrRandRSetConfig (pScreen, screen->randr, 0, &size); hostx_size_set_from_configure(FALSE); if (ret) { RROutputPtr output; output = RRFirstOutput(pScreen); if (!output) return FALSE; RROutputSetModes(output, NULL, 0, 0); } return ret; } #endif Bool ephyrCreateColormap(ColormapPtr pmap) { return fbInitializeColormap(pmap); } Bool ephyrInitScreen(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EPHYR_LOG("pScreen->myNum:%d\n", pScreen->myNum); hostx_set_screen_number(screen, pScreen->myNum); if (EphyrWantNoHostGrab) { hostx_set_win_title(screen, "xephyr"); } else { hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)"); } pScreen->CreateColormap = ephyrCreateColormap; #ifdef XV if (!ephyrNoXV) { if (ephyr_glamor) ephyr_glamor_xv_init(pScreen); else if (!ephyrInitVideo(pScreen)) { EPHYR_LOG_ERROR("failed to initialize xvideo\n"); } else { EPHYR_LOG("initialized xvideo okay\n"); } } #endif /*XV*/ return TRUE; } Bool ephyrFinishInitScreen(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; /* FIXME: Calling this even if not using shadow. * Seems harmless enough. But may be safer elsewhere. */ if (!shadowSetup(pScreen)) return FALSE; #ifdef RANDR if (!ephyrRandRInit(pScreen)) return FALSE; #endif scrpriv->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = ephyrScreenBlockHandler; return TRUE; } /** * Called by kdrive after calling down the * pScreen->CreateScreenResources() chain, this gives us a chance to * make any pixmaps after the screen and all extensions have been * initialized. */ Bool ephyrCreateResources(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EPHYR_LOG("mark pScreen=%p mynum=%d shadow=%d", pScreen, pScreen->myNum, scrpriv->shadow); if (scrpriv->shadow) return KdShadowSet(pScreen, scrpriv->randr, ephyrShadowUpdate, ephyrWindowLinear); else { #ifdef GLAMOR if (ephyr_glamor) { if (!ephyr_glamor_create_screen_resources(pScreen)) return FALSE; } #endif return ephyrSetInternalDamage(pScreen); } } void ephyrScreenFini(KdScreenInfo * screen) { EphyrScrPriv *scrpriv = screen->driver; if (scrpriv->shadow) { KdShadowFbFree(screen); } scrpriv->BlockHandler = NULL; } void ephyrCloseScreen(ScreenPtr pScreen) { ephyrUnsetInternalDamage(pScreen); } /* * Port of Mark McLoughlin's Xnest fix for focus in + modifier bug. * See https://bugs.freedesktop.org/show_bug.cgi?id=3030 */ void ephyrUpdateModifierState(unsigned int state) { DeviceIntPtr pDev = inputInfo.keyboard; KeyClassPtr keyc = pDev->key; int i; CARD8 mask; int xkb_state; if (!pDev) return; xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state); state = state & 0xff; if (xkb_state == state) return; for (i = 0, mask = 1; i < 8; i++, mask <<= 1) { int key; /* Modifier is down, but shouldn't be */ if ((xkb_state & mask) && !(state & mask)) { int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) if (keyc->xkbInfo->desc->map->modmap[key] & mask) { if (mask == XCB_MOD_MASK_LOCK) { KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); } else if (key_is_down(pDev, key, KEY_PROCESSED)) KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); if (--count == 0) break; } } /* Modifier should be down, but isn't */ if (!(xkb_state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) if (keyc->xkbInfo->desc->map->modmap[key] & mask) { KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); if (mask == XCB_MOD_MASK_LOCK) KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); break; } } } static Bool ephyrCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { return FALSE; } static void ephyrCrossScreen(ScreenPtr pScreen, Bool entering) { } ScreenPtr ephyrCursorScreen; /* screen containing the cursor */ static void ephyrWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { input_lock(); ephyrCursorScreen = pScreen; miPointerWarpCursor(inputInfo.pointer, pScreen, x, y); input_unlock(); } miPointerScreenFuncRec ephyrPointerScreenFuncs = { ephyrCursorOffScreen, ephyrCrossScreen, ephyrWarpCursor, }; static KdScreenInfo * screen_from_window(Window w) { int i = 0; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; KdPrivScreenPtr kdscrpriv = KdGetScreenPriv(pScreen); KdScreenInfo *screen = kdscrpriv->screen; EphyrScrPriv *scrpriv = screen->driver; if (scrpriv->win == w || scrpriv->peer_win == w || scrpriv->win_pre_existing == w) { return screen; } } return NULL; } static void ephyrProcessErrorEvent(xcb_generic_event_t *xev) { xcb_generic_error_t *e = (xcb_generic_error_t *)xev; FatalError("X11 error\n" "Error code: %hhu\n" "Sequence number: %hu\n" "Major code: %hhu\tMinor code: %hu\n" "Error value: %u\n", e->error_code, e->sequence, e->major_code, e->minor_code, e->resource_id); } static void ephyrProcessExpose(xcb_generic_event_t *xev) { xcb_expose_event_t *expose = (xcb_expose_event_t *)xev; KdScreenInfo *screen = screen_from_window(expose->window); EphyrScrPriv *scrpriv = screen->driver; /* Wait for the last expose event in a series of cliprects * to actually paint our screen. */ if (expose->count != 0) return; if (scrpriv) { hostx_paint_rect(scrpriv->screen, 0, 0, 0, 0, scrpriv->win_width, scrpriv->win_height); } else { EPHYR_LOG_ERROR("failed to get host screen\n"); } } static void ephyrProcessMouseMotion(xcb_generic_event_t *xev) { xcb_motion_notify_event_t *motion = (xcb_motion_notify_event_t *)xev; KdScreenInfo *screen = screen_from_window(motion->event); if (!ephyrMouse || !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) { EPHYR_LOG("skipping mouse motion:%d\n", screen->pScreen->myNum); return; } if (ephyrCursorScreen != screen->pScreen) { EPHYR_LOG("warping mouse cursor. " "cur_screen:%d, motion_screen:%d\n", ephyrCursorScreen->myNum, screen->pScreen->myNum); ephyrWarpCursor(inputInfo.pointer, screen->pScreen, motion->event_x, motion->event_y); } else { int x = 0, y = 0; EPHYR_LOG("enqueuing mouse motion:%d\n", screen->pScreen->myNum); x = motion->event_x; y = motion->event_y; EPHYR_LOG("initial (x,y):(%d,%d)\n", x, y); /* convert coords into desktop-wide coordinates. * fill_pointer_events will convert that back to * per-screen coordinates where needed */ x += screen->pScreen->x; y += screen->pScreen->y; KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_POINTER_DESKTOP, x, y, 0); } } static void ephyrProcessButtonPress(xcb_generic_event_t *xev) { xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev; if (!ephyrMouse || !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) { EPHYR_LOG("skipping mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum); return; } ephyrUpdateModifierState(button->state); /* This is a bit hacky. will break for button 5 ( defined as 0x10 ) * Check KD_BUTTON defines in kdrive.h */ mouseState |= 1 << (button->detail - 1); EPHYR_LOG("enqueuing mouse press:%d\n", screen_from_window(button->event)->pScreen->myNum); KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0); } static void ephyrProcessButtonRelease(xcb_generic_event_t *xev) { xcb_button_press_event_t *button = (xcb_button_press_event_t *)xev; if (!ephyrMouse || !((EphyrPointerPrivate *) ephyrMouse->driverPrivate)->enabled) { return; } ephyrUpdateModifierState(button->state); mouseState &= ~(1 << (button->detail - 1)); EPHYR_LOG("enqueuing mouse release:%d\n", screen_from_window(button->event)->pScreen->myNum); KdEnqueuePointerEvent(ephyrMouse, mouseState | KD_MOUSE_DELTA, 0, 0, 0); } /* Xephyr wants ctrl+shift to grab the window, but that conflicts with ctrl+alt+shift key combos. Remember the modifier state on key presses and releases, if mod1 is pressed, we need ctrl, shift and mod1 released before we allow a shift-ctrl grab activation. note: a key event contains the mask _before_ the current key takes effect, so mod1_was_down will be reset on the first key press after all three were released, not on the last release. That'd require some more effort. */ static int ephyrUpdateGrabModifierState(int state) { static int mod1_was_down = 0; if ((state & (XCB_MOD_MASK_CONTROL|XCB_MOD_MASK_SHIFT|XCB_MOD_MASK_1)) == 0) mod1_was_down = 0; else if (state & XCB_MOD_MASK_1) mod1_was_down = 1; return mod1_was_down; } static void ephyrProcessKeyPress(xcb_generic_event_t *xev) { xcb_key_press_event_t *key = (xcb_key_press_event_t *)xev; if (!ephyrKbd || !((EphyrKbdPrivate *) ephyrKbd->driverPrivate)->enabled) { return; } ephyrUpdateGrabModifierState(key->state); ephyrUpdateModifierState(key->state); KdEnqueueKeyboardEvent(ephyrKbd, key->detail, FALSE); } static void ephyrProcessKeyRelease(xcb_generic_event_t *xev) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_key_release_event_t *key = (xcb_key_release_event_t *)xev; static xcb_key_symbols_t *keysyms; static int grabbed_screen = -1; int mod1_down = ephyrUpdateGrabModifierState(key->state); if (!keysyms) keysyms = xcb_key_symbols_alloc(conn); if (!EphyrWantNoHostGrab && (((xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_L || xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Shift_R) && (key->state & XCB_MOD_MASK_CONTROL)) || ((xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Control_L || xcb_key_symbols_get_keysym(keysyms, key->detail, 0) == XK_Control_R) && (key->state & XCB_MOD_MASK_SHIFT)))) { KdScreenInfo *screen = screen_from_window(key->event); EphyrScrPriv *scrpriv = screen->driver; if (grabbed_screen != -1) { xcb_ungrab_keyboard(conn, XCB_TIME_CURRENT_TIME); xcb_ungrab_pointer(conn, XCB_TIME_CURRENT_TIME); grabbed_screen = -1; hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)"); } else if (!mod1_down) { /* Attempt grab */ xcb_grab_keyboard_cookie_t kbgrabc = xcb_grab_keyboard(conn, TRUE, scrpriv->win, XCB_TIME_CURRENT_TIME, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC); xcb_grab_keyboard_reply_t *kbgrabr; xcb_grab_pointer_cookie_t pgrabc = xcb_grab_pointer(conn, TRUE, scrpriv->win, 0, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC, scrpriv->win, XCB_NONE, XCB_TIME_CURRENT_TIME); xcb_grab_pointer_reply_t *pgrabr; kbgrabr = xcb_grab_keyboard_reply(conn, kbgrabc, NULL); if (!kbgrabr || kbgrabr->status != XCB_GRAB_STATUS_SUCCESS) { xcb_discard_reply(conn, pgrabc.sequence); xcb_ungrab_pointer(conn, XCB_TIME_CURRENT_TIME); } else { pgrabr = xcb_grab_pointer_reply(conn, pgrabc, NULL); if (!pgrabr || pgrabr->status != XCB_GRAB_STATUS_SUCCESS) { xcb_ungrab_keyboard(conn, XCB_TIME_CURRENT_TIME); } else { grabbed_screen = scrpriv->mynum; hostx_set_win_title (screen, "(ctrl+shift releases mouse and keyboard)"); } } } } if (!ephyrKbd || !((EphyrKbdPrivate *) ephyrKbd->driverPrivate)->enabled) { return; } /* Still send the release event even if above has happened server * will get confused with just an up event. Maybe it would be * better to just block shift+ctrls getting to kdrive all * together. */ ephyrUpdateModifierState(key->state); KdEnqueueKeyboardEvent(ephyrKbd, key->detail, TRUE); } static void ephyrProcessConfigureNotify(xcb_generic_event_t *xev) { xcb_configure_notify_event_t *configure = (xcb_configure_notify_event_t *)xev; KdScreenInfo *screen = screen_from_window(configure->window); EphyrScrPriv *scrpriv = screen->driver; if (!scrpriv || (scrpriv->win_pre_existing == None && !EphyrWantResize)) { return; } #ifdef RANDR ephyrResizeScreen(screen->pScreen, configure->width, configure->height); #endif /* RANDR */ } static void ephyrXcbProcessEvents(Bool queued_only) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_generic_event_t *expose = NULL, *configure = NULL; while (TRUE) { xcb_generic_event_t *xev = hostx_get_event(queued_only); if (!xev) { /* If our XCB connection has died (for example, our window was * closed), exit now. */ if (xcb_connection_has_error(conn)) { CloseWellKnownConnections(); OsCleanup(1); exit(1); } break; } switch (xev->response_type & 0x7f) { case 0: ephyrProcessErrorEvent(xev); break; case XCB_EXPOSE: free(expose); expose = xev; xev = NULL; break; case XCB_MOTION_NOTIFY: ephyrProcessMouseMotion(xev); break; case XCB_KEY_PRESS: ephyrProcessKeyPress(xev); break; case XCB_KEY_RELEASE: ephyrProcessKeyRelease(xev); break; case XCB_BUTTON_PRESS: ephyrProcessButtonPress(xev); break; case XCB_BUTTON_RELEASE: ephyrProcessButtonRelease(xev); break; case XCB_CONFIGURE_NOTIFY: free(configure); configure = xev; xev = NULL; break; } if (xev) { if (ephyr_glamor) ephyr_glamor_process_event(xev); free(xev); } } if (configure) { ephyrProcessConfigureNotify(configure); free(configure); } if (expose) { ephyrProcessExpose(expose); free(expose); } } static void ephyrXcbNotify(int fd, int ready, void *data) { ephyrXcbProcessEvents(FALSE); } void ephyrCardFini(KdCardInfo * card) { EphyrPriv *priv = card->driver; free(priv); } void ephyrGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs) { /* XXX Not sure if this is right */ EPHYR_LOG("mark"); while (n--) { pdefs->red = 0; pdefs->green = 0; pdefs->blue = 0; pdefs++; } } void ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; int min, max, p; /* XXX Not sure if this is right */ min = 256; max = 0; while (n--) { p = pdefs->pixel; if (p < min) min = p; if (p > max) max = p; hostx_set_cmap_entry(pScreen, p, pdefs->red >> 8, pdefs->green >> 8, pdefs->blue >> 8); pdefs++; } if (scrpriv->pDamage) { BoxRec box; RegionRec region; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; RegionInit(®ion, &box, 1); DamageReportDamage(scrpriv->pDamage, ®ion); RegionUninit(®ion); } } /* Mouse calls */ static Status MouseInit(KdPointerInfo * pi) { pi->driverPrivate = (EphyrPointerPrivate *) calloc(sizeof(EphyrPointerPrivate), 1); ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = FALSE; pi->nAxes = 3; pi->nButtons = 32; free(pi->name); pi->name = strdup("Xephyr virtual mouse"); /* * Must transform pointer coords since the pointer position * relative to the Xephyr window is controlled by the host server and * remains constant regardless of any rotation applied to the Xephyr screen. */ pi->transformCoordinates = TRUE; ephyrMouse = pi; return Success; } static Status MouseEnable(KdPointerInfo * pi) { ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = TRUE; SetNotifyFd(hostx_get_fd(), ephyrXcbNotify, X_NOTIFY_READ, NULL); return Success; } static void MouseDisable(KdPointerInfo * pi) { ((EphyrPointerPrivate *) pi->driverPrivate)->enabled = FALSE; RemoveNotifyFd(hostx_get_fd()); return; } static void MouseFini(KdPointerInfo * pi) { free(pi->driverPrivate); ephyrMouse = NULL; return; } KdPointerDriver EphyrMouseDriver = { "ephyr", MouseInit, MouseEnable, MouseDisable, MouseFini, NULL, }; /* Keyboard */ static Status EphyrKeyboardInit(KdKeyboardInfo * ki) { KeySymsRec keySyms; CARD8 modmap[MAP_LENGTH]; XkbControlsRec controls; ki->driverPrivate = (EphyrKbdPrivate *) calloc(sizeof(EphyrKbdPrivate), 1); if (hostx_load_keymap(&keySyms, modmap, &controls)) { XkbApplyMappingChange(ki->dixdev, &keySyms, keySyms.minKeyCode, keySyms.maxKeyCode - keySyms.minKeyCode + 1, modmap, serverClient); XkbDDXChangeControls(ki->dixdev, &controls, &controls); free(keySyms.map); } ki->minScanCode = keySyms.minKeyCode; ki->maxScanCode = keySyms.maxKeyCode; if (ki->name != NULL) { free(ki->name); } ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; } static Status EphyrKeyboardEnable(KdKeyboardInfo * ki) { ((EphyrKbdPrivate *) ki->driverPrivate)->enabled = TRUE; return Success; } static void EphyrKeyboardDisable(KdKeyboardInfo * ki) { ((EphyrKbdPrivate *) ki->driverPrivate)->enabled = FALSE; } static void EphyrKeyboardFini(KdKeyboardInfo * ki) { free(ki->driverPrivate); ephyrKbd = NULL; return; } static void EphyrKeyboardLeds(KdKeyboardInfo * ki, int leds) { } static void EphyrKeyboardBell(KdKeyboardInfo * ki, int volume, int frequency, int duration) { } KdKeyboardDriver EphyrKeyboardDriver = { "ephyr", EphyrKeyboardInit, EphyrKeyboardEnable, EphyrKeyboardLeds, EphyrKeyboardBell, EphyrKeyboardDisable, EphyrKeyboardFini, NULL, }; xorg-server-21.1.16/hw/kdrive/ephyr/ephyr.h0000644000175000017500000001306114757411105014165 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2004 Nokia * * 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 Nokia not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Nokia makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL NOKIA 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. */ #ifndef _EPHYR_H_ #define _EPHYR_H_ #include #include #include #include #include "os.h" /* for OsSignal() */ #include "kdrive.h" #include "hostx.h" #include "exa.h" #ifdef RANDR #include "randrstr.h" #endif #include "damage.h" typedef struct _ephyrPriv { CARD8 *base; int bytes_per_line; } EphyrPriv; typedef struct _ephyrFakexaPriv { ExaDriverPtr exa; Bool is_synced; /* The following are arguments and other information from Prepare* calls * which are stored for use in the inner calls. */ int op; PicturePtr pSrcPicture, pMaskPicture, pDstPicture; void *saved_ptrs[3]; PixmapPtr pDst, pSrc, pMask; GCPtr pGC; } EphyrFakexaPriv; typedef struct _ephyrScrPriv { /* ephyr server info */ Rotation randr; Bool shadow; DamagePtr pDamage; EphyrFakexaPriv *fakexa; /* Host X window info */ xcb_window_t win; xcb_window_t win_pre_existing; /* Set via -parent option like xnest */ xcb_window_t peer_win; /* Used for GL; should be at most one */ xcb_image_t *ximg; Bool win_explicit_position; int win_x, win_y; int win_width, win_height; int server_depth; const char *output; /* Set via -output option */ unsigned char *fb_data; /* only used when host bpp != server bpp */ xcb_shm_segment_info_t shminfo; size_t shmsize; KdScreenInfo *screen; int mynum; /* Screen number */ unsigned long cmap[256]; ScreenBlockHandlerProcPtr BlockHandler; /** * Per-screen Xlib-using state for glamor (private to * ephyr_glamor_glx.c) */ struct ephyr_glamor *glamor; } EphyrScrPriv; extern KdCardFuncs ephyrFuncs; extern KdKeyboardInfo *ephyrKbd; extern KdPointerInfo *ephyrMouse; extern miPointerScreenFuncRec ephyrPointerScreenFuncs; Bool ephyrInitialize(KdCardInfo * card, EphyrPriv * priv); Bool ephyrCardInit(KdCardInfo * card); Bool ephyrScreenInitialize(KdScreenInfo *screen); Bool ephyrInitScreen(ScreenPtr pScreen); Bool ephyrFinishInitScreen(ScreenPtr pScreen); Bool ephyrCreateResources(ScreenPtr pScreen); void ephyrPreserve(KdCardInfo * card); Bool ephyrEnable(ScreenPtr pScreen); Bool ephyrDPMS(ScreenPtr pScreen, int mode); void ephyrDisable(ScreenPtr pScreen); void ephyrRestore(KdCardInfo * card); void ephyrScreenFini(KdScreenInfo * screen); void ephyrCloseScreen(ScreenPtr pScreen); void ephyrCardFini(KdCardInfo * card); void ephyrGetColors(ScreenPtr pScreen, int n, xColorItem * pdefs); void ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs); Bool ephyrMapFramebuffer(KdScreenInfo * screen); void *ephyrWindowLinear(ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure); void ephyrSetScreenSizes(ScreenPtr pScreen); Bool ephyrUnmapFramebuffer(KdScreenInfo * screen); void ephyrUnsetInternalDamage(ScreenPtr pScreen); Bool ephyrSetInternalDamage(ScreenPtr pScreen); Bool ephyrCreateColormap(ColormapPtr pmap); #ifdef RANDR Bool ephyrRandRGetInfo(ScreenPtr pScreen, Rotation * rotations); Bool ephyrRandRSetConfig(ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize); Bool ephyrRandRInit(ScreenPtr pScreen); void ephyrShadowUpdate(ScreenPtr pScreen, shadowBufPtr pBuf); #endif void ephyrUpdateModifierState(unsigned int state); extern KdPointerDriver EphyrMouseDriver; extern KdKeyboardDriver EphyrKeyboardDriver; extern Bool ephyrCursorInit(ScreenPtr pScreen); extern int ephyrBufferHeight(KdScreenInfo * screen); /* ephyr_draw.c */ Bool ephyrDrawInit(ScreenPtr pScreen); void ephyrDrawEnable(ScreenPtr pScreen); void ephyrDrawDisable(ScreenPtr pScreen); void ephyrDrawFini(ScreenPtr pScreen); /* hostx.c glamor support */ Bool ephyr_glamor_init(ScreenPtr pScreen); Bool ephyr_glamor_create_screen_resources(ScreenPtr pScreen); void ephyr_glamor_enable(ScreenPtr pScreen); void ephyr_glamor_disable(ScreenPtr pScreen); void ephyr_glamor_fini(ScreenPtr pScreen); void ephyr_glamor_host_paint_rect(ScreenPtr pScreen); /*ephyvideo.c*/ Bool ephyrInitVideo(ScreenPtr pScreen); /* ephyr_glamor_xv.c */ #ifdef GLAMOR void ephyr_glamor_xv_init(ScreenPtr screen); #else /* !GLAMOR */ static inline void ephyr_glamor_xv_init(ScreenPtr screen) { } #endif /* !GLAMOR */ #endif xorg-server-21.1.16/hw/kdrive/ephyr/ephyrlog.h0000644000175000017500000000506614757411105014675 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2007 OpenedHand Ltd * * 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 OpenedHand Ltd not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. OpenedHand Ltd makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * OpenedHand Ltd DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL OpenedHand Ltd 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. * * Authors: * Dodji Seketeli */ #ifndef __EPHYRLOG_H__ #define __EPHYRLOG_H__ #include #include "os.h" #ifndef DEBUG /*we are not in debug mode*/ #define EPHYR_LOG(...) #define EPHYR_LOG_ERROR(...) #endif /*!DEBUG */ #define ERROR_LOG_LEVEL 3 #define INFO_LOG_LEVEL 4 #ifndef EPHYR_LOG #define EPHYR_LOG(...) \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\ __FILE__, __LINE__, __func__) ; \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__) #endif /*nomadik_log */ #ifndef EPHYR_LOG_ERROR #define EPHYR_LOG_ERROR(...) \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\ __FILE__, __LINE__, __func__) ; \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__) #endif /*EPHYR_LOG_ERROR */ #ifndef EPHYR_RETURN_IF_FAIL #define EPHYR_RETURN_IF_FAIL(cond) \ if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return;} #endif /*nomadik_return_if_fail */ #ifndef EPHYR_RETURN_VAL_IF_FAIL #define EPHYR_RETURN_VAL_IF_FAIL(cond,val) \ if (!(cond)) {EPHYR_LOG_ERROR("condition %s failed\n", #cond);return val;} #endif /*nomadik_return_val_if_fail */ #endif /*__EPHYRLOG_H__*/ xorg-server-21.1.16/hw/kdrive/ephyr/ephyr_draw.c0000644000175000017500000003510314757411105015176 /* * Copyright © 2006 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "ephyr.h" #include "exa_priv.h" #include "fbpict.h" #define EPHYR_TRACE_DRAW 0 #if EPHYR_TRACE_DRAW #define TRACE_DRAW() ErrorF("%s\n", __FUNCTION__); #else #define TRACE_DRAW() do { } while (0) #endif /* Use some oddball alignments, to expose issues in alignment handling in EXA. */ #define EPHYR_OFFSET_ALIGN 24 #define EPHYR_PITCH_ALIGN 24 #define EPHYR_OFFSCREEN_SIZE (16 * 1024 * 1024) #define EPHYR_OFFSCREEN_BASE (1 * 1024 * 1024) /** * Forces a real devPrivate.ptr for hidden pixmaps, so that we can call down to * fb functions. */ static void ephyrPreparePipelinedAccess(PixmapPtr pPix, int index) { KdScreenPriv(pPix->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; assert(fakexa->saved_ptrs[index] == NULL); fakexa->saved_ptrs[index] = pPix->devPrivate.ptr; if (pPix->devPrivate.ptr != NULL) return; pPix->devPrivate.ptr = fakexa->exa->memoryBase + exaGetPixmapOffset(pPix); } /** * Restores the original devPrivate.ptr of the pixmap from before we messed with * it. */ static void ephyrFinishPipelinedAccess(PixmapPtr pPix, int index) { KdScreenPriv(pPix->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; pPix->devPrivate.ptr = fakexa->saved_ptrs[index]; fakexa->saved_ptrs[index] = NULL; } /** * Sets up a scratch GC for fbFill, and saves other parameters for the * ephyrSolid implementation. */ static Bool ephyrPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { ScreenPtr pScreen = pPix->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; ChangeGCVal tmpval[3]; ephyrPreparePipelinedAccess(pPix, EXA_PREPARE_DEST); fakexa->pDst = pPix; fakexa->pGC = GetScratchGC(pPix->drawable.depth, pScreen); tmpval[0].val = alu; tmpval[1].val = pm; tmpval[2].val = fg; ChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval); ValidateGC(&pPix->drawable, fakexa->pGC); TRACE_DRAW(); return TRUE; } /** * Does an fbFill of the rectangle to be drawn. */ static void ephyrSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) { ScreenPtr pScreen = pPix->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; fbFill(&fakexa->pDst->drawable, fakexa->pGC, x1, y1, x2 - x1, y2 - y1); } /** * Cleans up the scratch GC created in ephyrPrepareSolid. */ static void ephyrDoneSolid(PixmapPtr pPix) { ScreenPtr pScreen = pPix->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; FreeScratchGC(fakexa->pGC); ephyrFinishPipelinedAccess(pPix, EXA_PREPARE_DEST); } /** * Sets up a scratch GC for fbCopyArea, and saves other parameters for the * ephyrCopy implementation. */ static Bool ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm) { ScreenPtr pScreen = pDst->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; ChangeGCVal tmpval[2]; ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST); ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC); fakexa->pSrc = pSrc; fakexa->pDst = pDst; fakexa->pGC = GetScratchGC(pDst->drawable.depth, pScreen); tmpval[0].val = alu; tmpval[1].val = pm; ChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval); ValidateGC(&pDst->drawable, fakexa->pGC); TRACE_DRAW(); return TRUE; } /** * Does an fbCopyArea to take care of the requested copy. */ static void ephyrCopy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, int w, int h) { ScreenPtr pScreen = pDst->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; fbCopyArea(&fakexa->pSrc->drawable, &fakexa->pDst->drawable, fakexa->pGC, srcX, srcY, w, h, dstX, dstY); } /** * Cleans up the scratch GC created in ephyrPrepareCopy. */ static void ephyrDoneCopy(PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; FreeScratchGC(fakexa->pGC); ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC); ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST); } /** * Reports that we can always accelerate the given operation. This may not be * desirable from an EXA testing standpoint -- testing the fallback paths would * be useful, too. */ static Bool ephyrCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { /* Exercise the component alpha helper, so fail on this case like a normal * driver */ if (pMaskPicture && pMaskPicture->componentAlpha && op == PictOpOver) return FALSE; return TRUE; } /** * Saves off the parameters for ephyrComposite. */ static Bool ephyrPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { KdScreenPriv(pDst->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST); if (pSrc != NULL) ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC); if (pMask != NULL) ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK); fakexa->op = op; fakexa->pSrcPicture = pSrcPicture; fakexa->pMaskPicture = pMaskPicture; fakexa->pDstPicture = pDstPicture; fakexa->pSrc = pSrc; fakexa->pMask = pMask; fakexa->pDst = pDst; TRACE_DRAW(); return TRUE; } /** * Does an fbComposite to complete the requested drawing operation. */ static void ephyrComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { KdScreenPriv(pDst->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; fbComposite(fakexa->op, fakexa->pSrcPicture, fakexa->pMaskPicture, fakexa->pDstPicture, srcX, srcY, maskX, maskY, dstX, dstY, w, h); } static void ephyrDoneComposite(PixmapPtr pDst) { KdScreenPriv(pDst->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; if (fakexa->pMask != NULL) ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK); if (fakexa->pSrc != NULL) ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC); ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST); } /** * Does fake acceleration of DownloadFromScren using memcpy. */ static Bool ephyrDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { KdScreenPriv(pSrc->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; unsigned char *src; int src_pitch, cpp; if (pSrc->drawable.bitsPerPixel < 8) return FALSE; ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC); cpp = pSrc->drawable.bitsPerPixel / 8; src_pitch = exaGetPixmapPitch(pSrc); src = fakexa->exa->memoryBase + exaGetPixmapOffset(pSrc); src += y * src_pitch + x * cpp; for (; h > 0; h--) { memcpy(dst, src, w * cpp); dst += dst_pitch; src += src_pitch; } exaMarkSync(pSrc->drawable.pScreen); ephyrFinishPipelinedAccess(pSrc, EXA_PREPARE_SRC); return TRUE; } /** * Does fake acceleration of UploadToScreen using memcpy. */ static Bool ephyrUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch) { KdScreenPriv(pDst->drawable.pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; unsigned char *dst; int dst_pitch, cpp; if (pDst->drawable.bitsPerPixel < 8) return FALSE; ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST); cpp = pDst->drawable.bitsPerPixel / 8; dst_pitch = exaGetPixmapPitch(pDst); dst = fakexa->exa->memoryBase + exaGetPixmapOffset(pDst); dst += y * dst_pitch + x * cpp; for (; h > 0; h--) { memcpy(dst, src, w * cpp); dst += dst_pitch; src += src_pitch; } exaMarkSync(pDst->drawable.pScreen); ephyrFinishPipelinedAccess(pDst, EXA_PREPARE_DEST); return TRUE; } static Bool ephyrPrepareAccess(PixmapPtr pPix, int index) { /* Make sure we don't somehow end up with a pointer that is in framebuffer * and hasn't been readied for us. */ assert(pPix->devPrivate.ptr != NULL); return TRUE; } /** * In fakexa, we currently only track whether we have synced to the latest * "accelerated" drawing that has happened or not. It's not used for anything * yet. */ static int ephyrMarkSync(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; fakexa->is_synced = FALSE; return 0; } /** * Assumes that we're waiting on the latest marker. When EXA gets smarter and * starts using markers in a fine-grained way (for example, waiting on drawing * to required pixmaps to complete, rather than waiting for all drawing to * complete), we'll want to make the ephyrMarkSync/ephyrWaitMarker * implementation fine-grained as well. */ static void ephyrWaitMarker(ScreenPtr pScreen, int marker) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; fakexa->is_synced = TRUE; } /** * This function initializes EXA to use the fake acceleration implementation * which just falls through to software. The purpose is to have a reliable, * correct driver with which to test changes to the EXA core. */ Bool ephyrDrawInit(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrPriv *priv = screen->card->driver; EphyrFakexaPriv *fakexa; Bool success; fakexa = calloc(1, sizeof(*fakexa)); if (fakexa == NULL) return FALSE; fakexa->exa = exaDriverAlloc(); if (fakexa->exa == NULL) { free(fakexa); return FALSE; } fakexa->exa->memoryBase = (CARD8 *) (priv->base); fakexa->exa->memorySize = priv->bytes_per_line * ephyrBufferHeight(screen); fakexa->exa->offScreenBase = priv->bytes_per_line * screen->height; /* Since we statically link against EXA, we shouldn't have to be smart about * versioning. */ fakexa->exa->exa_major = 2; fakexa->exa->exa_minor = 0; fakexa->exa->PrepareSolid = ephyrPrepareSolid; fakexa->exa->Solid = ephyrSolid; fakexa->exa->DoneSolid = ephyrDoneSolid; fakexa->exa->PrepareCopy = ephyrPrepareCopy; fakexa->exa->Copy = ephyrCopy; fakexa->exa->DoneCopy = ephyrDoneCopy; fakexa->exa->CheckComposite = ephyrCheckComposite; fakexa->exa->PrepareComposite = ephyrPrepareComposite; fakexa->exa->Composite = ephyrComposite; fakexa->exa->DoneComposite = ephyrDoneComposite; fakexa->exa->DownloadFromScreen = ephyrDownloadFromScreen; fakexa->exa->UploadToScreen = ephyrUploadToScreen; fakexa->exa->MarkSync = ephyrMarkSync; fakexa->exa->WaitMarker = ephyrWaitMarker; fakexa->exa->PrepareAccess = ephyrPrepareAccess; fakexa->exa->pixmapOffsetAlign = EPHYR_OFFSET_ALIGN; fakexa->exa->pixmapPitchAlign = EPHYR_PITCH_ALIGN; fakexa->exa->maxX = 1023; fakexa->exa->maxY = 1023; fakexa->exa->flags = EXA_OFFSCREEN_PIXMAPS; success = exaDriverInit(pScreen, fakexa->exa); if (success) { ErrorF("Initialized fake EXA acceleration\n"); scrpriv->fakexa = fakexa; } else { ErrorF("Failed to initialize EXA\n"); free(fakexa->exa); free(fakexa); } return success; } void ephyrDrawEnable(ScreenPtr pScreen) { } void ephyrDrawDisable(ScreenPtr pScreen) { } void ephyrDrawFini(ScreenPtr pScreen) { } /** * exaDDXDriverInit is required by the top-level EXA module, and is used by * the xorg DDX to hook in its EnableDisableFB wrapper. We don't need it, since * we won't be enabling/disabling the FB. */ void exaDDXDriverInit(ScreenPtr pScreen) { ExaScreenPriv(pScreen); pExaScr->migration = ExaMigrationSmart; pExaScr->checkDirtyCorrectness = TRUE; } xorg-server-21.1.16/hw/kdrive/ephyr/ephyrinit.c0000644000175000017500000002613614757411105015053 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2004 Nokia * * 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 Nokia not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Nokia makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL NOKIA 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 #endif #include "ephyr.h" #include "ephyrlog.h" #include "glx_extinit.h" extern Window EphyrPreExistingHostWin; extern Bool EphyrWantGrayScale; extern Bool EphyrWantResize; extern Bool EphyrWantNoHostGrab; extern Bool kdHasPointer; extern Bool kdHasKbd; extern Bool ephyr_glamor, ephyr_glamor_gles2, ephyr_glamor_skip_present; extern Bool ephyrNoXV; void processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id); void processOutputArg(const char *output, char *parent_id); void processScreenArg(const char *screen_size, char *parent_id); int main(int argc, char *argv[], char *envp[]) { hostx_use_resname(basename(argv[0]), 0); return dix_main(argc, argv, envp); } void InitCard(char *name) { EPHYR_DBG("mark"); KdCardInfoAdd(&ephyrFuncs, 0); } void InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) { KdInitOutput(pScreenInfo, argc, argv); } void InitInput(int argc, char **argv) { KdKeyboardInfo *ki; KdPointerInfo *pi; KdAddKeyboardDriver(&EphyrKeyboardDriver); KdAddPointerDriver(&EphyrMouseDriver); if (!kdHasKbd) { ki = KdNewKeyboard(); if (!ki) FatalError("Couldn't create Xephyr keyboard\n"); ki->driver = &EphyrKeyboardDriver; KdAddKeyboard(ki); } if (!kdHasPointer) { pi = KdNewPointer(); if (!pi) FatalError("Couldn't create Xephyr pointer\n"); pi->driver = &EphyrMouseDriver; KdAddPointer(pi); } KdInitInput(); } void CloseInput(void) { KdCloseInput(); } #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { } #endif #ifdef DDXBEFORERESET void ddxBeforeReset(void) { } #endif void ddxUseMsg(void) { KdUseMsg(); ErrorF("\nXephyr Option Usage:\n"); ErrorF("-parent Use existing window as Xephyr root win\n"); ErrorF("-sw-cursor Render cursors in software in Xephyr\n"); ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); ErrorF("-output Attempt to run Xephyr fullscreen (restricted to given output geometry)\n"); ErrorF("-grayscale Simulate 8bit grayscale\n"); ErrorF("-resizeable Make Xephyr windows resizeable\n"); #ifdef GLAMOR ErrorF("-glamor Enable 2D acceleration using glamor\n"); ErrorF("-glamor_gles2 Enable 2D acceleration using glamor (with GLES2 only)\n"); ErrorF("-glamor-skip-present Skip presenting the output when using glamor (for internal testing optimization)\n"); #endif ErrorF ("-fakexa Simulate acceleration using software rendering\n"); ErrorF("-verbosity Set log verbosity level\n"); ErrorF("-noxv do not use XV\n"); ErrorF("-name [name] define the name in the WM_CLASS property\n"); ErrorF ("-title [title] set the window title in the WM_NAME property\n"); ErrorF("-no-host-grab Disable grabbing the keyboard and mouse.\n"); ErrorF("\n"); } void processScreenOrOutputArg(const char *screen_size, const char *output, char *parent_id) { KdCardInfo *card; InitCard(0); /*Put each screen on a separate card */ card = KdCardInfoLast(); if (card) { KdScreenInfo *screen; unsigned long p_id = 0; Bool use_geometry; screen = KdScreenInfoAdd(card); KdParseScreen(screen, screen_size); screen->driver = calloc(1, sizeof(EphyrScrPriv)); if (!screen->driver) FatalError("Couldn't alloc screen private\n"); if (parent_id) { p_id = strtol(parent_id, NULL, 0); } use_geometry = (strchr(screen_size, '+') != NULL); EPHYR_DBG("screen number:%d\n", screen->mynum); hostx_add_screen(screen, p_id, screen->mynum, use_geometry, output); } else { ErrorF("No matching card found!\n"); } } void processScreenArg(const char *screen_size, char *parent_id) { processScreenOrOutputArg(screen_size, NULL, parent_id); } void processOutputArg(const char *output, char *parent_id) { processScreenOrOutputArg("100x100+0+0", output, parent_id); } int ddxProcessArgument(int argc, char **argv, int i) { static char *parent = NULL; EPHYR_DBG("mark argv[%d]='%s'", i, argv[i]); if (!strcmp(argv[i], "-parent")) { if (i + 1 < argc) { int j; /* If parent is specified and a screen argument follows, don't do * anything, let the -screen handling init the rest */ for (j = i; j < argc; j++) { if (!strcmp(argv[j], "-screen")) { parent = argv[i + 1]; return 2; } } processScreenArg("100x100", argv[i + 1]); return 2; } UseMsg(); exit(1); } else if (!strcmp(argv[i], "-screen")) { if ((i + 1) < argc) { processScreenArg(argv[i + 1], parent); parent = NULL; return 2; } UseMsg(); exit(1); } else if (!strcmp(argv[i], "-output")) { if (i + 1 < argc) { processOutputArg(argv[i + 1], NULL); return 2; } UseMsg(); exit(1); } else if (!strcmp(argv[i], "-sw-cursor")) { hostx_use_sw_cursor(); return 1; } else if (!strcmp(argv[i], "-host-cursor")) { /* Compatibility with the old command line argument, now the default. */ return 1; } else if (!strcmp(argv[i], "-fullscreen")) { hostx_use_fullscreen(); return 1; } else if (!strcmp(argv[i], "-grayscale")) { EphyrWantGrayScale = 1; return 1; } else if (!strcmp(argv[i], "-resizeable")) { EphyrWantResize = 1; return 1; } #ifdef GLAMOR else if (!strcmp (argv[i], "-glamor")) { ephyr_glamor = TRUE; ephyrFuncs.initAccel = ephyr_glamor_init; ephyrFuncs.enableAccel = ephyr_glamor_enable; ephyrFuncs.disableAccel = ephyr_glamor_disable; ephyrFuncs.finiAccel = ephyr_glamor_fini; return 1; } else if (!strcmp (argv[i], "-glamor_gles2")) { ephyr_glamor = TRUE; ephyr_glamor_gles2 = TRUE; ephyrFuncs.initAccel = ephyr_glamor_init; ephyrFuncs.enableAccel = ephyr_glamor_enable; ephyrFuncs.disableAccel = ephyr_glamor_disable; ephyrFuncs.finiAccel = ephyr_glamor_fini; return 1; } else if (!strcmp (argv[i], "-glamor-skip-present")) { ephyr_glamor_skip_present = TRUE; return 1; } #endif else if (!strcmp(argv[i], "-fakexa")) { ephyrFuncs.initAccel = ephyrDrawInit; ephyrFuncs.enableAccel = ephyrDrawEnable; ephyrFuncs.disableAccel = ephyrDrawDisable; ephyrFuncs.finiAccel = ephyrDrawFini; return 1; } else if (!strcmp(argv[i], "-verbosity")) { if (i + 1 < argc && argv[i + 1][0] != '-') { int verbosity = atoi(argv[i + 1]); LogSetParameter(XLOG_VERBOSITY, verbosity); EPHYR_LOG("set verbosiry to %d\n", verbosity); return 2; } else { UseMsg(); exit(1); } } else if (!strcmp(argv[i], "-noxv")) { ephyrNoXV = TRUE; EPHYR_LOG("no XVideo enabled\n"); return 1; } else if (!strcmp(argv[i], "-name")) { if (i + 1 < argc && argv[i + 1][0] != '-') { hostx_use_resname(argv[i + 1], 1); return 2; } else { UseMsg(); return 0; } } else if (!strcmp(argv[i], "-title")) { if (i + 1 < argc && argv[i + 1][0] != '-') { hostx_set_title(argv[i + 1]); return 2; } else { UseMsg(); return 0; } } else if (argv[i][0] == ':') { hostx_set_display_name(argv[i]); } /* Xnest compatibility */ else if (!strcmp(argv[i], "-display")) { hostx_set_display_name(argv[i + 1]); return 2; } else if (!strcmp(argv[i], "-sync") || !strcmp(argv[i], "-full") || !strcmp(argv[i], "-sss") || !strcmp(argv[i], "-install")) { return 1; } else if (!strcmp(argv[i], "-bw") || !strcmp(argv[i], "-class") || !strcmp(argv[i], "-geometry") || !strcmp(argv[i], "-scrns")) { return 2; } /* end Xnest compat */ else if (!strcmp(argv[i], "-no-host-grab")) { EphyrWantNoHostGrab = 1; return 1; } else if (!strcmp(argv[i], "-sharevts") || !strcmp(argv[i], "-novtswitch")) { return 1; } else if (!strcmp(argv[i], "-layout")) { return 2; } return KdProcessArgument(argc, argv, i); } void OsVendorInit(void) { EPHYR_DBG("mark"); if (SeatId) hostx_use_sw_cursor(); if (hostx_want_host_cursor()) ephyrFuncs.initCursor = &ephyrCursorInit; if (serverGeneration == 1) { if (!KdCardInfoLast()) { processScreenArg("640x480", NULL); } hostx_init(); } } KdCardFuncs ephyrFuncs = { ephyrCardInit, /* cardinit */ ephyrScreenInitialize, /* scrinit */ ephyrInitScreen, /* initScreen */ ephyrFinishInitScreen, /* finishInitScreen */ ephyrCreateResources, /* createRes */ ephyrScreenFini, /* scrfini */ ephyrCardFini, /* cardfini */ 0, /* initCursor */ 0, /* initAccel */ 0, /* enableAccel */ 0, /* disableAccel */ 0, /* finiAccel */ ephyrGetColors, /* getColors */ ephyrPutColors, /* putColors */ ephyrCloseScreen, /* closeScreen */ }; xorg-server-21.1.16/hw/kdrive/ephyr/ephyrcursor.c0000644000175000017500000001702714757411105015424 /* * Copyright © 2014 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: * Adam Jackson */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "ephyr.h" #include "ephyrlog.h" #include "hostx.h" #include "cursorstr.h" #include #include static DevPrivateKeyRec ephyrCursorPrivateKey; typedef struct _ephyrCursor { xcb_cursor_t cursor; } ephyrCursorRec, *ephyrCursorPtr; static ephyrCursorPtr ephyrGetCursor(CursorPtr cursor) { return dixGetPrivateAddr(&cursor->devPrivates, &ephyrCursorPrivateKey); } static void ephyrRealizeCoreCursor(EphyrScrPriv *scr, CursorPtr cursor) { ephyrCursorPtr hw = ephyrGetCursor(cursor); xcb_connection_t *conn = hostx_get_xcbconn(); xcb_pixmap_t source, mask; xcb_image_t *image; xcb_gcontext_t gc; int w = cursor->bits->width, h = cursor->bits->height; uint32_t gcmask = XCB_GC_FUNCTION | XCB_GC_PLANE_MASK | XCB_GC_FOREGROUND | XCB_GC_BACKGROUND | XCB_GC_CLIP_MASK; uint32_t val[] = { XCB_GX_COPY, /* function */ ~0, /* planemask */ 1L, /* foreground */ 0L, /* background */ None, /* clipmask */ }; source = xcb_generate_id(conn); mask = xcb_generate_id(conn); xcb_create_pixmap(conn, 1, source, scr->win, w, h); xcb_create_pixmap(conn, 1, mask, scr->win, w, h); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, source, gcmask, val); image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_XY_BITMAP, 1, NULL, ~0, NULL); image->data = cursor->bits->source; xcb_image_put(conn, source, gc, image, 0, 0, 0); xcb_image_destroy(image); image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_XY_BITMAP, 1, NULL, ~0, NULL); image->data = cursor->bits->mask; xcb_image_put(conn, mask, gc, image, 0, 0, 0); xcb_image_destroy(image); xcb_free_gc(conn, gc); hw->cursor = xcb_generate_id(conn); xcb_create_cursor(conn, hw->cursor, source, mask, cursor->foreRed, cursor->foreGreen, cursor->foreBlue, cursor->backRed, cursor->backGreen, cursor->backBlue, cursor->bits->xhot, cursor->bits->yhot); xcb_free_pixmap(conn, source); xcb_free_pixmap(conn, mask); } static xcb_render_pictformat_t get_argb_format(void) { static xcb_render_pictformat_t format; if (format == None) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_render_query_pict_formats_cookie_t cookie; xcb_render_query_pict_formats_reply_t *formats; cookie = xcb_render_query_pict_formats(conn); formats = xcb_render_query_pict_formats_reply(conn, cookie, NULL); format = xcb_render_util_find_standard_format(formats, XCB_PICT_STANDARD_ARGB_32)->id; free(formats); } return format; } static void ephyrRealizeARGBCursor(EphyrScrPriv *scr, CursorPtr cursor) { ephyrCursorPtr hw = ephyrGetCursor(cursor); xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; xcb_pixmap_t source; xcb_render_picture_t picture; xcb_image_t *image; int w = cursor->bits->width, h = cursor->bits->height; /* dix' storage is PICT_a8r8g8b8 */ source = xcb_generate_id(conn); xcb_create_pixmap(conn, 32, source, scr->win, w, h); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, source, 0, NULL); image = xcb_image_create_native(conn, w, h, XCB_IMAGE_FORMAT_Z_PIXMAP, 32, NULL, ~0, NULL); image->data = (void *)cursor->bits->argb; xcb_image_put(conn, source, gc, image, 0, 0, 0); xcb_free_gc(conn, gc); xcb_image_destroy(image); picture = xcb_generate_id(conn); xcb_render_create_picture(conn, picture, source, get_argb_format(), 0, NULL); xcb_free_pixmap(conn, source); hw->cursor = xcb_generate_id(conn); xcb_render_create_cursor(conn, hw->cursor, picture, cursor->bits->xhot, cursor->bits->yhot); xcb_render_free_picture(conn, picture); } static Bool can_argb_cursor(void) { static const xcb_render_query_version_reply_t *v; if (!v) v = xcb_render_util_query_version(hostx_get_xcbconn()); return v->major_version == 0 && v->minor_version >= 5; } static Bool ephyrRealizeCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor) { KdScreenPriv(screen); KdScreenInfo *kscr = pScreenPriv->screen; EphyrScrPriv *scr = kscr->driver; if (cursor->bits->argb && can_argb_cursor()) ephyrRealizeARGBCursor(scr, cursor); else { ephyrRealizeCoreCursor(scr, cursor); } return TRUE; } static Bool ephyrUnrealizeCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor) { ephyrCursorPtr hw = ephyrGetCursor(cursor); if (hw->cursor) { xcb_free_cursor(hostx_get_xcbconn(), hw->cursor); hw->cursor = None; } return TRUE; } static void ephyrSetCursor(DeviceIntPtr dev, ScreenPtr screen, CursorPtr cursor, int x, int y) { KdScreenPriv(screen); KdScreenInfo *kscr = pScreenPriv->screen; EphyrScrPriv *scr = kscr->driver; uint32_t attr = None; if (cursor) attr = ephyrGetCursor(cursor)->cursor; else attr = hostx_get_empty_cursor(); xcb_change_window_attributes(hostx_get_xcbconn(), scr->win, XCB_CW_CURSOR, &attr); xcb_flush(hostx_get_xcbconn()); } static void ephyrMoveCursor(DeviceIntPtr dev, ScreenPtr screen, int x, int y) { } static Bool ephyrDeviceCursorInitialize(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } static void ephyrDeviceCursorCleanup(DeviceIntPtr dev, ScreenPtr screen) { } miPointerSpriteFuncRec EphyrPointerSpriteFuncs = { ephyrRealizeCursor, ephyrUnrealizeCursor, ephyrSetCursor, ephyrMoveCursor, ephyrDeviceCursorInitialize, ephyrDeviceCursorCleanup }; Bool ephyrCursorInit(ScreenPtr screen) { if (!dixRegisterPrivateKey(&ephyrCursorPrivateKey, PRIVATE_CURSOR, sizeof(ephyrCursorRec))) return FALSE; miPointerInitialize(screen, &EphyrPointerSpriteFuncs, &ephyrPointerScreenFuncs, FALSE); return TRUE; } xorg-server-21.1.16/hw/kdrive/ephyr/hostx.c0000644000175000017500000014544614757411105014213 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2004 Nokia * * 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 Nokia not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Nokia makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL NOKIA 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 #endif #include "hostx.h" #include "input.h" #include #include #include #include /* for memset */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef GLAMOR #include #include "glamor.h" #include "ephyr_glamor_glx.h" #endif #include "ephyrlog.h" #include "ephyr.h" struct EphyrHostXVars { char *server_dpy_name; xcb_connection_t *conn; int screen; xcb_visualtype_t *visual; Window winroot; xcb_gcontext_t gc; xcb_render_pictformat_t argb_format; xcb_cursor_t empty_cursor; xcb_generic_event_t *saved_event; int depth; Bool use_sw_cursor; Bool use_fullscreen; Bool have_shm; Bool have_shm_fd_passing; int n_screens; KdScreenInfo **screens; long damage_debug_msec; Bool size_set_from_configure; }; /* memset ( missing> ) instead of below */ /*static EphyrHostXVars HostX = { "?", 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};*/ static EphyrHostXVars HostX; static int HostXWantDamageDebug = 0; extern Bool EphyrWantResize; char *ephyrResName = NULL; int ephyrResNameFromCmd = 0; char *ephyrTitle = NULL; Bool ephyr_glamor = FALSE; extern Bool ephyr_glamor_skip_present; Bool hostx_has_extension(xcb_extension_t *extension) { const xcb_query_extension_reply_t *rep; rep = xcb_get_extension_data(HostX.conn, extension); return rep && rep->present; } static void hostx_set_fullscreen_hint(void); #define host_depth_matches_server(_vars) (HostX.depth == (_vars)->server_depth) int hostx_want_screen_geometry(KdScreenInfo *screen, int *width, int *height, int *x, int *y) { EphyrScrPriv *scrpriv = screen->driver; if (scrpriv && (scrpriv->win_pre_existing != None || scrpriv->output != NULL || HostX.use_fullscreen == TRUE)) { *x = scrpriv->win_x; *y = scrpriv->win_y; *width = scrpriv->win_width; *height = scrpriv->win_height; return 1; } return 0; } void hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry, const char *output) { EphyrScrPriv *scrpriv = screen->driver; int index = HostX.n_screens; HostX.n_screens += 1; HostX.screens = reallocarray(HostX.screens, HostX.n_screens, sizeof(HostX.screens[0])); HostX.screens[index] = screen; scrpriv->screen = screen; scrpriv->win_pre_existing = win_id; scrpriv->win_explicit_position = use_geometry; scrpriv->output = output; } void hostx_set_display_name(char *name) { HostX.server_dpy_name = strdup(name); } void hostx_set_screen_number(KdScreenInfo *screen, int number) { EphyrScrPriv *scrpriv = screen->driver; if (scrpriv) { scrpriv->mynum = number; hostx_set_win_title(screen, ""); } } void hostx_set_win_title(KdScreenInfo *screen, const char *extra_text) { EphyrScrPriv *scrpriv = screen->driver; if (!scrpriv) return; if (ephyrTitle) { xcb_icccm_set_wm_name(HostX.conn, scrpriv->win, XCB_ATOM_STRING, 8, strlen(ephyrTitle), ephyrTitle); } else { #define BUF_LEN 256 char buf[BUF_LEN + 1]; memset(buf, 0, BUF_LEN + 1); snprintf(buf, BUF_LEN, "Xephyr on %s.%d %s", HostX.server_dpy_name ? HostX.server_dpy_name : ":0", scrpriv->mynum, (extra_text != NULL) ? extra_text : ""); xcb_icccm_set_wm_name(HostX.conn, scrpriv->win, XCB_ATOM_STRING, 8, strlen(buf), buf); xcb_flush(HostX.conn); } } int hostx_want_host_cursor(void) { return !HostX.use_sw_cursor; } void hostx_use_sw_cursor(void) { HostX.use_sw_cursor = TRUE; } xcb_cursor_t hostx_get_empty_cursor(void) { return HostX.empty_cursor; } int hostx_want_preexisting_window(KdScreenInfo *screen) { EphyrScrPriv *scrpriv = screen->driver; if (scrpriv && scrpriv->win_pre_existing) { return 1; } else { return 0; } } void hostx_get_output_geometry(const char *output, int *x, int *y, int *width, int *height) { int i, name_len = 0, output_found = FALSE; char *name = NULL; xcb_generic_error_t *error; xcb_randr_query_version_cookie_t version_c; xcb_randr_query_version_reply_t *version_r; xcb_randr_get_screen_resources_cookie_t screen_resources_c; xcb_randr_get_screen_resources_reply_t *screen_resources_r; xcb_randr_output_t *randr_outputs; xcb_randr_get_output_info_cookie_t output_info_c; xcb_randr_get_output_info_reply_t *output_info_r; xcb_randr_get_crtc_info_cookie_t crtc_info_c; xcb_randr_get_crtc_info_reply_t *crtc_info_r; /* First of all, check for extension */ if (!hostx_has_extension(&xcb_randr_id)) { fprintf(stderr, "\nHost X server does not support RANDR extension (or it's disabled).\n"); exit(1); } /* Check RandR version */ version_c = xcb_randr_query_version(HostX.conn, 1, 2); version_r = xcb_randr_query_version_reply(HostX.conn, version_c, &error); if (error != NULL || version_r == NULL) { fprintf(stderr, "\nFailed to get RandR version supported by host X server.\n"); exit(1); } else if (version_r->major_version < 1 || version_r->minor_version < 2) { free(version_r); fprintf(stderr, "\nHost X server doesn't support RandR 1.2, needed for -output usage.\n"); exit(1); } free(version_r); /* Get list of outputs from screen resources */ screen_resources_c = xcb_randr_get_screen_resources(HostX.conn, HostX.winroot); screen_resources_r = xcb_randr_get_screen_resources_reply(HostX.conn, screen_resources_c, NULL); randr_outputs = xcb_randr_get_screen_resources_outputs(screen_resources_r); for (i = 0; !output_found && i < screen_resources_r->num_outputs; i++) { /* Get info on the output */ output_info_c = xcb_randr_get_output_info(HostX.conn, randr_outputs[i], XCB_CURRENT_TIME); output_info_r = xcb_randr_get_output_info_reply(HostX.conn, output_info_c, NULL); /* Get output name */ name_len = xcb_randr_get_output_info_name_length(output_info_r); name = malloc(name_len + 1); strncpy(name, (char*)xcb_randr_get_output_info_name(output_info_r), name_len); name[name_len] = '\0'; if (!strcmp(name, output)) { output_found = TRUE; /* Check if output is connected */ if (output_info_r->crtc == XCB_NONE) { free(name); free(output_info_r); free(screen_resources_r); fprintf(stderr, "\nOutput %s is currently disabled (or not connected).\n", output); exit(1); } /* Get CRTC from output info */ crtc_info_c = xcb_randr_get_crtc_info(HostX.conn, output_info_r->crtc, XCB_CURRENT_TIME); crtc_info_r = xcb_randr_get_crtc_info_reply(HostX.conn, crtc_info_c, NULL); /* Get CRTC geometry */ *x = crtc_info_r->x; *y = crtc_info_r->y; *width = crtc_info_r->width; *height = crtc_info_r->height; free(crtc_info_r); } free(name); free(output_info_r); } free(screen_resources_r); if (!output_found) { fprintf(stderr, "\nOutput %s not available in host X server.\n", output); exit(1); } } void hostx_use_fullscreen(void) { HostX.use_fullscreen = TRUE; } int hostx_want_fullscreen(void) { return HostX.use_fullscreen; } static xcb_intern_atom_cookie_t cookie_WINDOW_STATE, cookie_WINDOW_STATE_FULLSCREEN; static void hostx_set_fullscreen_hint(void) { xcb_atom_t atom_WINDOW_STATE, atom_WINDOW_STATE_FULLSCREEN; int index; xcb_intern_atom_reply_t *reply; reply = xcb_intern_atom_reply(HostX.conn, cookie_WINDOW_STATE, NULL); atom_WINDOW_STATE = reply->atom; free(reply); reply = xcb_intern_atom_reply(HostX.conn, cookie_WINDOW_STATE_FULLSCREEN, NULL); atom_WINDOW_STATE_FULLSCREEN = reply->atom; free(reply); for (index = 0; index < HostX.n_screens; index++) { EphyrScrPriv *scrpriv = HostX.screens[index]->driver; xcb_change_property(HostX.conn, PropModeReplace, scrpriv->win, atom_WINDOW_STATE, XCB_ATOM_ATOM, 32, 1, &atom_WINDOW_STATE_FULLSCREEN); } } static void hostx_toggle_damage_debug(void) { HostXWantDamageDebug ^= 1; } void hostx_handle_signal(int signum) { hostx_toggle_damage_debug(); EPHYR_DBG("Signal caught. Damage Debug:%i\n", HostXWantDamageDebug); } void hostx_use_resname(char *name, int fromcmd) { ephyrResName = name; ephyrResNameFromCmd = fromcmd; } void hostx_set_title(char *title) { ephyrTitle = title; } #ifdef __SUNPRO_C /* prevent "Function has no return statement" error for x_io_error_handler */ #pragma does_not_return(exit) #endif static void hostx_init_shm(void) { /* Try to get share memory ximages for a little bit more speed */ if (!hostx_has_extension(&xcb_shm_id) || getenv("XEPHYR_NO_SHM")) { HostX.have_shm = FALSE; } else { xcb_generic_error_t *error = NULL; xcb_shm_query_version_cookie_t cookie; xcb_shm_query_version_reply_t *reply; HostX.have_shm = TRUE; HostX.have_shm_fd_passing = FALSE; cookie = xcb_shm_query_version(HostX.conn); reply = xcb_shm_query_version_reply(HostX.conn, cookie, &error); if (reply) { HostX.have_shm_fd_passing = (reply->major_version == 1 && reply->minor_version >= 2) || reply->major_version > 1; free(reply); } free(error); } } static Bool hostx_create_shm_segment(xcb_shm_segment_info_t *shminfo, size_t size) { shminfo->shmaddr = NULL; if (HostX.have_shm_fd_passing) { xcb_generic_error_t *error = NULL; xcb_shm_create_segment_cookie_t cookie; xcb_shm_create_segment_reply_t *reply; shminfo->shmseg = xcb_generate_id(HostX.conn); cookie = xcb_shm_create_segment(HostX.conn, shminfo->shmseg, size, TRUE); reply = xcb_shm_create_segment_reply(HostX.conn, cookie, &error); if (reply) { int *fds = reply->nfd == 1 ? xcb_shm_create_segment_reply_fds(HostX.conn, reply) : NULL; if (fds) { shminfo->shmaddr = (uint8_t *)mmap(0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fds[0], 0); close(fds[0]); if (shminfo->shmaddr == MAP_FAILED) shminfo->shmaddr = NULL; } if (!shminfo->shmaddr) xcb_shm_detach(HostX.conn, shminfo->shmseg); free(reply); } free(error); } else { shminfo->shmid = shmget(IPC_PRIVATE, size, IPC_CREAT|0666); if (shminfo->shmid != -1) { shminfo->shmaddr = shmat(shminfo->shmid, 0, 0); if (shminfo->shmaddr == (void *)-1) { shminfo->shmaddr = NULL; } else { xcb_generic_error_t *error = NULL; xcb_void_cookie_t cookie; shmctl(shminfo->shmid, IPC_RMID, 0); shminfo->shmseg = xcb_generate_id(HostX.conn); cookie = xcb_shm_attach_checked(HostX.conn, shminfo->shmseg, shminfo->shmid, TRUE); error = xcb_request_check(HostX.conn, cookie); if (error) { free(error); shmdt(shminfo->shmaddr); shminfo->shmaddr = NULL; } } } } return shminfo->shmaddr != NULL; } static void hostx_destroy_shm_segment(xcb_shm_segment_info_t *shminfo, size_t size) { xcb_shm_detach(HostX.conn, shminfo->shmseg); if (HostX.have_shm_fd_passing) munmap(shminfo->shmaddr, size); else shmdt(shminfo->shmaddr); shminfo->shmaddr = NULL; } int hostx_init(void) { uint32_t attrs[2]; uint32_t attr_mask = 0; xcb_pixmap_t cursor_pxm; xcb_gcontext_t cursor_gc; uint16_t red, green, blue; uint32_t pixel; int index; char *tmpstr; char *class_hint; size_t class_len; xcb_screen_t *xscreen; xcb_rectangle_t rect = { 0, 0, 1, 1 }; attrs[0] = XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_POINTER_MOTION | XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY; attr_mask |= XCB_CW_EVENT_MASK; EPHYR_DBG("mark"); #ifdef GLAMOR if (ephyr_glamor) HostX.conn = ephyr_glamor_connect(); else #endif HostX.conn = xcb_connect(NULL, &HostX.screen); if (!HostX.conn || xcb_connection_has_error(HostX.conn)) { fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n"); exit(1); } xscreen = xcb_aux_get_screen(HostX.conn, HostX.screen); HostX.winroot = xscreen->root; HostX.gc = xcb_generate_id(HostX.conn); HostX.depth = xscreen->root_depth; #ifdef GLAMOR if (ephyr_glamor) { HostX.visual = ephyr_glamor_get_visual(); if (HostX.visual->visual_id != xscreen->root_visual) { attrs[1] = xcb_generate_id(HostX.conn); attr_mask |= XCB_CW_COLORMAP; xcb_create_colormap(HostX.conn, XCB_COLORMAP_ALLOC_NONE, attrs[1], HostX.winroot, HostX.visual->visual_id); } } else #endif HostX.visual = xcb_aux_find_visual_by_id(xscreen,xscreen->root_visual); xcb_create_gc(HostX.conn, HostX.gc, HostX.winroot, 0, NULL); cookie_WINDOW_STATE = xcb_intern_atom(HostX.conn, FALSE, strlen("_NET_WM_STATE"), "_NET_WM_STATE"); cookie_WINDOW_STATE_FULLSCREEN = xcb_intern_atom(HostX.conn, FALSE, strlen("_NET_WM_STATE_FULLSCREEN"), "_NET_WM_STATE_FULLSCREEN"); for (index = 0; index < HostX.n_screens; index++) { KdScreenInfo *screen = HostX.screens[index]; EphyrScrPriv *scrpriv = screen->driver; scrpriv->win = xcb_generate_id(HostX.conn); scrpriv->server_depth = HostX.depth; scrpriv->ximg = NULL; scrpriv->win_x = 0; scrpriv->win_y = 0; if (scrpriv->win_pre_existing != XCB_WINDOW_NONE) { xcb_get_geometry_reply_t *prewin_geom; xcb_get_geometry_cookie_t cookie; xcb_generic_error_t *e = NULL; /* Get screen size from existing window */ cookie = xcb_get_geometry(HostX.conn, scrpriv->win_pre_existing); prewin_geom = xcb_get_geometry_reply(HostX.conn, cookie, &e); if (e) { free(e); free(prewin_geom); fprintf (stderr, "\nXephyr -parent window' does not exist!\n"); exit (1); } scrpriv->win_width = prewin_geom->width; scrpriv->win_height = prewin_geom->height; free(prewin_geom); xcb_create_window(HostX.conn, XCB_COPY_FROM_PARENT, scrpriv->win, scrpriv->win_pre_existing, 0,0, scrpriv->win_width, scrpriv->win_height, 0, XCB_WINDOW_CLASS_COPY_FROM_PARENT, HostX.visual->visual_id, attr_mask, attrs); } else { xcb_create_window(HostX.conn, XCB_COPY_FROM_PARENT, scrpriv->win, HostX.winroot, 0,0,100,100, /* will resize */ 0, XCB_WINDOW_CLASS_COPY_FROM_PARENT, HostX.visual->visual_id, attr_mask, attrs); hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)"); if (HostX.use_fullscreen) { scrpriv->win_width = xscreen->width_in_pixels; scrpriv->win_height = xscreen->height_in_pixels; hostx_set_fullscreen_hint(); } else if (scrpriv->output) { hostx_get_output_geometry(scrpriv->output, &scrpriv->win_x, &scrpriv->win_y, &scrpriv->win_width, &scrpriv->win_height); HostX.use_fullscreen = TRUE; hostx_set_fullscreen_hint(); } tmpstr = getenv("RESOURCE_NAME"); if (tmpstr && (!ephyrResNameFromCmd)) ephyrResName = tmpstr; class_len = strlen(ephyrResName) + 1 + strlen("Xephyr") + 1; class_hint = malloc(class_len); if (class_hint) { strcpy(class_hint, ephyrResName); strcpy(class_hint + strlen(ephyrResName) + 1, "Xephyr"); xcb_change_property(HostX.conn, XCB_PROP_MODE_REPLACE, scrpriv->win, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, class_len, class_hint); free(class_hint); } } } if (!xcb_aux_parse_color((char*)"red", &red, &green, &blue)) { xcb_lookup_color_cookie_t c = xcb_lookup_color(HostX.conn, xscreen->default_colormap, 3, "red"); xcb_lookup_color_reply_t *reply = xcb_lookup_color_reply(HostX.conn, c, NULL); red = reply->exact_red; green = reply->exact_green; blue = reply->exact_blue; free(reply); } { xcb_alloc_color_cookie_t c = xcb_alloc_color(HostX.conn, xscreen->default_colormap, red, green, blue); xcb_alloc_color_reply_t *r = xcb_alloc_color_reply(HostX.conn, c, NULL); red = r->red; green = r->green; blue = r->blue; pixel = r->pixel; free(r); } xcb_change_gc(HostX.conn, HostX.gc, XCB_GC_FOREGROUND, &pixel); cursor_pxm = xcb_generate_id(HostX.conn); xcb_create_pixmap(HostX.conn, 1, cursor_pxm, HostX.winroot, 1, 1); cursor_gc = xcb_generate_id(HostX.conn); pixel = 0; xcb_create_gc(HostX.conn, cursor_gc, cursor_pxm, XCB_GC_FOREGROUND, &pixel); xcb_poly_fill_rectangle(HostX.conn, cursor_pxm, cursor_gc, 1, &rect); xcb_free_gc(HostX.conn, cursor_gc); HostX.empty_cursor = xcb_generate_id(HostX.conn); xcb_create_cursor(HostX.conn, HostX.empty_cursor, cursor_pxm, cursor_pxm, 0,0,0, 0,0,0, 1,1); xcb_free_pixmap(HostX.conn, cursor_pxm); if (!hostx_want_host_cursor ()) { CursorVisible = TRUE; /* Ditch the cursor, we provide our 'own' */ for (index = 0; index < HostX.n_screens; index++) { KdScreenInfo *screen = HostX.screens[index]; EphyrScrPriv *scrpriv = screen->driver; xcb_change_window_attributes(HostX.conn, scrpriv->win, XCB_CW_CURSOR, &HostX.empty_cursor); } } hostx_init_shm(); if (HostX.have_shm) { /* Really really check we have shm - better way ?*/ xcb_shm_segment_info_t shminfo; if (!hostx_create_shm_segment(&shminfo, 1)) { fprintf(stderr, "\nXephyr unable to use SHM XImages\n"); HostX.have_shm = FALSE; } else { hostx_destroy_shm_segment(&shminfo, 1); } } else { fprintf(stderr, "\nXephyr unable to use SHM XImages\n"); } xcb_flush(HostX.conn); /* Setup the pause time between paints when debugging updates */ HostX.damage_debug_msec = 20000; /* 1/50 th of a second */ if (getenv("XEPHYR_PAUSE")) { HostX.damage_debug_msec = strtol(getenv("XEPHYR_PAUSE"), NULL, 0); EPHYR_DBG("pause is %li\n", HostX.damage_debug_msec); } return 1; } int hostx_get_depth(void) { return HostX.depth; } int hostx_get_server_depth(KdScreenInfo *screen) { EphyrScrPriv *scrpriv = screen->driver; return scrpriv ? scrpriv->server_depth : 0; } int hostx_get_bpp(KdScreenInfo *screen) { EphyrScrPriv *scrpriv = screen->driver; if (!scrpriv) return 0; if (host_depth_matches_server(scrpriv)) return HostX.visual->bits_per_rgb_value; else return scrpriv->server_depth; /*XXX correct ?*/ } void hostx_get_visual_masks(KdScreenInfo *screen, CARD32 *rmsk, CARD32 *gmsk, CARD32 *bmsk) { EphyrScrPriv *scrpriv = screen->driver; if (!scrpriv) return; if (host_depth_matches_server(scrpriv)) { *rmsk = HostX.visual->red_mask; *gmsk = HostX.visual->green_mask; *bmsk = HostX.visual->blue_mask; } else if (scrpriv->server_depth == 16) { /* Assume 16bpp 565 */ *rmsk = 0xf800; *gmsk = 0x07e0; *bmsk = 0x001f; } else { *rmsk = 0x0; *gmsk = 0x0; *bmsk = 0x0; } } static int hostx_calculate_color_shift(unsigned long mask) { int shift = 1; /* count # of bits in mask */ while ((mask = (mask >> 1))) shift++; /* cmap entry is an unsigned char so adjust it by size of that */ shift = shift - sizeof(unsigned char) * 8; if (shift < 0) shift = 0; return shift; } void hostx_set_cmap_entry(ScreenPtr pScreen, unsigned char idx, unsigned char r, unsigned char g, unsigned char b) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; /* need to calculate the shifts for RGB because server could be BGR. */ /* XXX Not sure if this is correct for 8 on 16, but this works for 8 on 24.*/ static int rshift, bshift, gshift = 0; static int first_time = 1; if (first_time) { first_time = 0; rshift = hostx_calculate_color_shift(HostX.visual->red_mask); gshift = hostx_calculate_color_shift(HostX.visual->green_mask); bshift = hostx_calculate_color_shift(HostX.visual->blue_mask); } scrpriv->cmap[idx] = ((r << rshift) & HostX.visual->red_mask) | ((g << gshift) & HostX.visual->green_mask) | ((b << bshift) & HostX.visual->blue_mask); } /** * hostx_screen_init creates the XImage that will contain the front buffer of * the ephyr screen, and possibly offscreen memory. * * @param width width of the screen * @param height height of the screen * @param buffer_height height of the rectangle to be allocated. * * hostx_screen_init() creates an XImage, using MIT-SHM if it's available. * buffer_height can be used to create a larger offscreen buffer, which is used * by fakexa for storing offscreen pixmap data. */ void * hostx_screen_init(KdScreenInfo *screen, int x, int y, int width, int height, int buffer_height, int *bytes_per_line, int *bits_per_pixel) { EphyrScrPriv *scrpriv = screen->driver; Bool shm_success = FALSE; if (!scrpriv) { fprintf(stderr, "%s: Error in accessing hostx data\n", __func__); exit(1); } EPHYR_DBG("host_screen=%p x=%d, y=%d, wxh=%dx%d, buffer_height=%d", screen, x, y, width, height, buffer_height); if (scrpriv->ximg != NULL) { /* Free up the image data if previously used * i.ie called by server reset */ if (HostX.have_shm) { xcb_image_destroy(scrpriv->ximg); hostx_destroy_shm_segment(&scrpriv->shminfo, scrpriv->shmsize); } else { free(scrpriv->ximg->data); scrpriv->ximg->data = NULL; xcb_image_destroy(scrpriv->ximg); } } if (!ephyr_glamor && HostX.have_shm) { scrpriv->ximg = xcb_image_create_native(HostX.conn, width, buffer_height, XCB_IMAGE_FORMAT_Z_PIXMAP, HostX.depth, NULL, ~0, NULL); scrpriv->shmsize = scrpriv->ximg->stride * buffer_height; if (!hostx_create_shm_segment(&scrpriv->shminfo, scrpriv->shmsize)) { EPHYR_DBG ("Can't create SHM Segment, falling back to plain XImages"); HostX.have_shm = FALSE; xcb_image_destroy(scrpriv->ximg); } else { EPHYR_DBG("SHM segment created %p", scrpriv->shminfo.shmaddr); scrpriv->ximg->data = scrpriv->shminfo.shmaddr; shm_success = TRUE; } } if (!ephyr_glamor && !shm_success) { EPHYR_DBG("Creating image %dx%d for screen scrpriv=%p\n", width, buffer_height, scrpriv); scrpriv->ximg = xcb_image_create_native(HostX.conn, width, buffer_height, XCB_IMAGE_FORMAT_Z_PIXMAP, HostX.depth, NULL, ~0, NULL); /* Match server byte order so that the image can be converted to * the native byte order by xcb_image_put() before drawing */ if (host_depth_matches_server(scrpriv)) scrpriv->ximg->byte_order = IMAGE_BYTE_ORDER; scrpriv->ximg->data = xallocarray(scrpriv->ximg->stride, buffer_height); } if (!HostX.size_set_from_configure) { uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; uint32_t values[2] = {width, height}; xcb_configure_window(HostX.conn, scrpriv->win, mask, values); } if (scrpriv->win_pre_existing == None && !EphyrWantResize) { /* Ask the WM to keep our size static */ xcb_size_hints_t size_hints = {0}; size_hints.max_width = size_hints.min_width = width; size_hints.max_height = size_hints.min_height = height; size_hints.flags = (XCB_ICCCM_SIZE_HINT_P_MIN_SIZE | XCB_ICCCM_SIZE_HINT_P_MAX_SIZE); xcb_icccm_set_wm_normal_hints(HostX.conn, scrpriv->win, &size_hints); } #ifdef GLAMOR if (!ephyr_glamor_skip_present) #endif xcb_map_window(HostX.conn, scrpriv->win); /* Set explicit window position if it was informed in * -screen option (WxH+X or WxH+X+Y). Otherwise, accept the * position set by WM. * The trick here is putting this code after xcb_map_window() call, * so these values won't be overridden by WM. */ if (scrpriv->win_explicit_position) { uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y; uint32_t values[2] = {x, y}; xcb_configure_window(HostX.conn, scrpriv->win, mask, values); } xcb_aux_sync(HostX.conn); scrpriv->win_width = width; scrpriv->win_height = height; scrpriv->win_x = x; scrpriv->win_y = y; #ifdef GLAMOR if (ephyr_glamor) { *bytes_per_line = 0; ephyr_glamor_set_window_size(scrpriv->glamor, scrpriv->win_width, scrpriv->win_height); return NULL; } else #endif if (host_depth_matches_server(scrpriv)) { *bytes_per_line = scrpriv->ximg->stride; *bits_per_pixel = scrpriv->ximg->bpp; EPHYR_DBG("Host matches server"); return scrpriv->ximg->data; } else { int bytes_per_pixel = scrpriv->server_depth >> 3; int stride = (width * bytes_per_pixel + 0x3) & ~0x3; *bytes_per_line = stride; *bits_per_pixel = scrpriv->server_depth; EPHYR_DBG("server bpp %i", bytes_per_pixel); scrpriv->fb_data = xallocarray (stride, buffer_height); return scrpriv->fb_data; } } static void hostx_paint_debug_rect(KdScreenInfo *screen, int x, int y, int width, int height); void hostx_paint_rect(KdScreenInfo *screen, int sx, int sy, int dx, int dy, int width, int height) { EphyrScrPriv *scrpriv = screen->driver; EPHYR_DBG("painting in screen %d\n", scrpriv->mynum); #ifdef GLAMOR if (ephyr_glamor) { BoxRec box; RegionRec region; box.x1 = dx; box.y1 = dy; box.x2 = dx + width; box.y2 = dy + height; RegionInit(®ion, &box, 1); ephyr_glamor_damage_redisplay(scrpriv->glamor, ®ion); RegionUninit(®ion); return; } #endif /* * Copy the image data updated by the shadow layer * on to the window */ if (HostXWantDamageDebug) { hostx_paint_debug_rect(screen, dx, dy, width, height); } /* * If the depth of the ephyr server is less than that of the host, * the kdrive fb does not point to the ximage data but to a buffer * ( fb_data ), we shift the various bits from this onto the XImage * so they match the host. * * Note, This code is pretty new ( and simple ) so may break on * endian issues, 32 bpp host etc. * Not sure if 8bpp case is right either. * ... and it will be slower than the matching depth case. */ if (!host_depth_matches_server(scrpriv)) { int x, y, idx, bytes_per_pixel = (scrpriv->server_depth >> 3); int stride = (scrpriv->win_width * bytes_per_pixel + 0x3) & ~0x3; unsigned char r, g, b; unsigned long host_pixel; EPHYR_DBG("Unmatched host depth scrpriv=%p\n", scrpriv); for (y = sy; y < sy + height; y++) for (x = sx; x < sx + width; x++) { idx = y * stride + x * bytes_per_pixel; switch (scrpriv->server_depth) { case 16: { unsigned short pixel = *(unsigned short *) (scrpriv->fb_data + idx); r = ((pixel & 0xf800) >> 8); g = ((pixel & 0x07e0) >> 3); b = ((pixel & 0x001f) << 3); host_pixel = (r << 16) | (g << 8) | (b); xcb_image_put_pixel(scrpriv->ximg, x, y, host_pixel); break; } case 8: { unsigned char pixel = *(unsigned char *) (scrpriv->fb_data + idx); xcb_image_put_pixel(scrpriv->ximg, x, y, scrpriv->cmap[pixel]); break; } default: break; } } } if (HostX.have_shm) { xcb_image_shm_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg, scrpriv->shminfo, sx, sy, dx, dy, width, height, FALSE); } else { xcb_image_t *subimg = xcb_image_subimage(scrpriv->ximg, sx, sy, width, height, 0, 0, 0); xcb_image_t *img = xcb_image_native(HostX.conn, subimg, 1); xcb_image_put(HostX.conn, scrpriv->win, HostX.gc, img, dx, dy, 0); if (subimg != img) xcb_image_destroy(img); xcb_image_destroy(subimg); } xcb_aux_sync(HostX.conn); } static void hostx_paint_debug_rect(KdScreenInfo *screen, int x, int y, int width, int height) { EphyrScrPriv *scrpriv = screen->driver; struct timespec tspec; xcb_rectangle_t rect = { .x = x, .y = y, .width = width, .height = height }; xcb_void_cookie_t cookie; xcb_generic_error_t *e; tspec.tv_sec = HostX.damage_debug_msec / (1000000); tspec.tv_nsec = (HostX.damage_debug_msec % 1000000) * 1000; EPHYR_DBG("msec: %li tv_sec %li, tv_msec %li", HostX.damage_debug_msec, tspec.tv_sec, tspec.tv_nsec); /* fprintf(stderr, "Xephyr updating: %i+%i %ix%i\n", x, y, width, height); */ cookie = xcb_poly_fill_rectangle_checked(HostX.conn, scrpriv->win, HostX.gc, 1, &rect); e = xcb_request_check(HostX.conn, cookie); free(e); /* nanosleep seems to work better than usleep for me... */ nanosleep(&tspec, NULL); } Bool hostx_load_keymap(KeySymsPtr keySyms, CARD8 *modmap, XkbControlsPtr controls) { int min_keycode, max_keycode; int map_width; size_t i, j; int keymap_len; xcb_keysym_t *keymap; xcb_keycode_t *modifier_map; xcb_get_keyboard_mapping_cookie_t mapping_c; xcb_get_keyboard_mapping_reply_t *mapping_r; xcb_get_modifier_mapping_cookie_t modifier_c; xcb_get_modifier_mapping_reply_t *modifier_r; xcb_xkb_use_extension_cookie_t use_c; xcb_xkb_use_extension_reply_t *use_r; xcb_xkb_get_controls_cookie_t controls_c; xcb_xkb_get_controls_reply_t *controls_r; /* First of all, collect host X server's * min_keycode and max_keycode, which are * independent from XKB support. */ min_keycode = xcb_get_setup(HostX.conn)->min_keycode; max_keycode = xcb_get_setup(HostX.conn)->max_keycode; EPHYR_DBG("min: %d, max: %d", min_keycode, max_keycode); keySyms->minKeyCode = min_keycode; keySyms->maxKeyCode = max_keycode; /* Check for XKB availability in host X server */ if (!hostx_has_extension(&xcb_xkb_id)) { EPHYR_LOG_ERROR("XKB extension is not supported in host X server."); return FALSE; } use_c = xcb_xkb_use_extension(HostX.conn, XCB_XKB_MAJOR_VERSION, XCB_XKB_MINOR_VERSION); use_r = xcb_xkb_use_extension_reply(HostX.conn, use_c, NULL); if (!use_r) { EPHYR_LOG_ERROR("Couldn't use XKB extension."); return FALSE; } else if (!use_r->supported) { EPHYR_LOG_ERROR("XKB extension is not supported in host X server."); free(use_r); return FALSE; } free(use_r); /* Send all needed XCB requests at once, * and process the replies as needed. */ mapping_c = xcb_get_keyboard_mapping(HostX.conn, min_keycode, max_keycode - min_keycode + 1); modifier_c = xcb_get_modifier_mapping(HostX.conn); controls_c = xcb_xkb_get_controls(HostX.conn, XCB_XKB_ID_USE_CORE_KBD); mapping_r = xcb_get_keyboard_mapping_reply(HostX.conn, mapping_c, NULL); if (!mapping_r) { EPHYR_LOG_ERROR("xcb_get_keyboard_mapping_reply() failed."); return FALSE; } map_width = mapping_r->keysyms_per_keycode; keymap = xcb_get_keyboard_mapping_keysyms(mapping_r); keymap_len = xcb_get_keyboard_mapping_keysyms_length(mapping_r); keySyms->mapWidth = map_width; keySyms->map = calloc(keymap_len, sizeof(KeySym)); if (!keySyms->map) { EPHYR_LOG_ERROR("Failed to allocate KeySym map."); free(mapping_r); return FALSE; } for (i = 0; i < keymap_len; i++) { keySyms->map[i] = keymap[i]; } free(mapping_r); modifier_r = xcb_get_modifier_mapping_reply(HostX.conn, modifier_c, NULL); if (!modifier_r) { EPHYR_LOG_ERROR("xcb_get_modifier_mapping_reply() failed."); return FALSE; } modifier_map = xcb_get_modifier_mapping_keycodes(modifier_r); memset(modmap, 0, sizeof(CARD8) * MAP_LENGTH); for (j = 0; j < 8; j++) { for (i = 0; i < modifier_r->keycodes_per_modifier; i++) { CARD8 keycode; if ((keycode = modifier_map[j * modifier_r->keycodes_per_modifier + i])) { modmap[keycode] |= 1 << j; } } } free(modifier_r); controls_r = xcb_xkb_get_controls_reply(HostX.conn, controls_c, NULL); if (!controls_r) { EPHYR_LOG_ERROR("xcb_xkb_get_controls_reply() failed."); return FALSE; } controls->enabled_ctrls = controls_r->enabledControls; for (i = 0; i < XkbPerKeyBitArraySize; i++) { controls->per_key_repeat[i] = controls_r->perKeyRepeat[i]; } free(controls_r); return TRUE; } void hostx_size_set_from_configure(Bool ss) { HostX.size_set_from_configure = ss; } xcb_connection_t * hostx_get_xcbconn(void) { return HostX.conn; } xcb_generic_event_t * hostx_get_event(Bool queued_only) { xcb_generic_event_t *xev; if (HostX.saved_event) { xev = HostX.saved_event; HostX.saved_event = NULL; } else { if (queued_only) xev = xcb_poll_for_queued_event(HostX.conn); else xev = xcb_poll_for_event(HostX.conn); } return xev; } Bool hostx_has_queued_event(void) { if (!HostX.saved_event) HostX.saved_event = xcb_poll_for_queued_event(HostX.conn); return HostX.saved_event != NULL; } int hostx_get_screen(void) { return HostX.screen; } int hostx_get_fd(void) { return xcb_get_file_descriptor(HostX.conn); } int hostx_get_window(int a_screen_number) { EphyrScrPriv *scrpriv; if (a_screen_number < 0 || a_screen_number >= HostX.n_screens) { EPHYR_LOG_ERROR("bad screen number:%d\n", a_screen_number); return 0; } scrpriv = HostX.screens[a_screen_number]->driver; return scrpriv->win; } int hostx_get_window_attributes(int a_window, EphyrHostWindowAttributes * a_attrs) { xcb_get_geometry_cookie_t geom_cookie; xcb_get_window_attributes_cookie_t attr_cookie; xcb_get_geometry_reply_t *geom_reply; xcb_get_window_attributes_reply_t *attr_reply; geom_cookie = xcb_get_geometry(HostX.conn, a_window); attr_cookie = xcb_get_window_attributes(HostX.conn, a_window); geom_reply = xcb_get_geometry_reply(HostX.conn, geom_cookie, NULL); attr_reply = xcb_get_window_attributes_reply(HostX.conn, attr_cookie, NULL); a_attrs->x = geom_reply->x; a_attrs->y = geom_reply->y; a_attrs->width = geom_reply->width; a_attrs->height = geom_reply->height; a_attrs->visualid = attr_reply->visual; free(geom_reply); free(attr_reply); return TRUE; } int hostx_get_visuals_info(EphyrHostVisualInfo ** a_visuals, int *a_num_entries) { Bool is_ok = FALSE; EphyrHostVisualInfo *host_visuals = NULL; int nb_items = 0, i = 0, screen_num; xcb_screen_iterator_t screens; xcb_depth_iterator_t depths; EPHYR_RETURN_VAL_IF_FAIL(a_visuals && a_num_entries, FALSE); EPHYR_LOG("enter\n"); screens = xcb_setup_roots_iterator(xcb_get_setup(HostX.conn)); for (screen_num = 0; screens.rem; screen_num++, xcb_screen_next(&screens)) { depths = xcb_screen_allowed_depths_iterator(screens.data); for (; depths.rem; xcb_depth_next(&depths)) { xcb_visualtype_t *visuals = xcb_depth_visuals(depths.data); EphyrHostVisualInfo *tmp_visuals = reallocarray(host_visuals, nb_items + depths.data->visuals_len, sizeof(EphyrHostVisualInfo)); if (!tmp_visuals) { goto out; } host_visuals = tmp_visuals; for (i = 0; i < depths.data->visuals_len; i++) { host_visuals[nb_items + i].visualid = visuals[i].visual_id; host_visuals[nb_items + i].screen = screen_num; host_visuals[nb_items + i].depth = depths.data->depth; host_visuals[nb_items + i].class = visuals[i]._class; host_visuals[nb_items + i].red_mask = visuals[i].red_mask; host_visuals[nb_items + i].green_mask = visuals[i].green_mask; host_visuals[nb_items + i].blue_mask = visuals[i].blue_mask; host_visuals[nb_items + i].colormap_size = visuals[i].colormap_entries; host_visuals[nb_items + i].bits_per_rgb = visuals[i].bits_per_rgb_value; } nb_items += depths.data->visuals_len; } } EPHYR_LOG("host advertises %d visuals\n", nb_items); *a_visuals = host_visuals; *a_num_entries = nb_items; host_visuals = NULL; is_ok = TRUE; out: free(host_visuals); host_visuals = NULL; EPHYR_LOG("leave\n"); return is_ok; } int hostx_create_window(int a_screen_number, EphyrBox * a_geometry, int a_visual_id, int *a_host_peer /*out parameter */ ) { Bool is_ok = FALSE; xcb_window_t win; int winmask = 0; uint32_t attrs[2]; xcb_screen_t *screen = xcb_aux_get_screen(HostX.conn, hostx_get_screen()); xcb_visualtype_t *visual; int depth = 0; EphyrScrPriv *scrpriv = HostX.screens[a_screen_number]->driver; EPHYR_RETURN_VAL_IF_FAIL(screen && a_geometry, FALSE); EPHYR_LOG("enter\n"); visual = xcb_aux_find_visual_by_id(screen, a_visual_id); if (!visual) { EPHYR_LOG_ERROR ("argh, could not find a remote visual with id:%d\n", a_visual_id); goto out; } depth = xcb_aux_get_depth_of_visual(screen, a_visual_id); winmask = XCB_CW_EVENT_MASK | XCB_CW_COLORMAP; attrs[0] = XCB_EVENT_MASK_BUTTON_PRESS |XCB_EVENT_MASK_BUTTON_RELEASE |XCB_EVENT_MASK_POINTER_MOTION |XCB_EVENT_MASK_KEY_PRESS |XCB_EVENT_MASK_KEY_RELEASE |XCB_EVENT_MASK_EXPOSURE; attrs[1] = xcb_generate_id(HostX.conn); xcb_create_colormap(HostX.conn, XCB_COLORMAP_ALLOC_NONE, attrs[1], hostx_get_window(a_screen_number), a_visual_id); win = xcb_generate_id(HostX.conn); xcb_create_window(HostX.conn, depth, win, hostx_get_window (a_screen_number), a_geometry->x, a_geometry->y, a_geometry->width, a_geometry->height, 0, XCB_WINDOW_CLASS_COPY_FROM_PARENT, a_visual_id, winmask, attrs); if (scrpriv->peer_win == XCB_NONE) { scrpriv->peer_win = win; } else { EPHYR_LOG_ERROR("multiple peer windows created for same screen\n"); } xcb_flush(HostX.conn); xcb_map_window(HostX.conn, win); *a_host_peer = win; is_ok = TRUE; out: EPHYR_LOG("leave\n"); return is_ok; } int hostx_destroy_window(int a_win) { xcb_destroy_window(HostX.conn, a_win); xcb_flush(HostX.conn); return TRUE; } int hostx_set_window_geometry(int a_win, EphyrBox * a_geo) { uint32_t mask = XCB_CONFIG_WINDOW_X | XCB_CONFIG_WINDOW_Y | XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT; uint32_t values[4]; EPHYR_RETURN_VAL_IF_FAIL(a_geo, FALSE); EPHYR_LOG("enter. x,y,w,h:(%d,%d,%d,%d)\n", a_geo->x, a_geo->y, a_geo->width, a_geo->height); values[0] = a_geo->x; values[1] = a_geo->y; values[2] = a_geo->width; values[3] = a_geo->height; xcb_configure_window(HostX.conn, a_win, mask, values); EPHYR_LOG("leave\n"); return TRUE; } int hostx_set_window_bounding_rectangles(int a_window, EphyrRect * a_rects, int a_num_rects) { Bool is_ok = FALSE; int i = 0; xcb_rectangle_t *rects = NULL; EPHYR_RETURN_VAL_IF_FAIL(a_rects, FALSE); EPHYR_LOG("enter. num rects:%d\n", a_num_rects); rects = calloc(a_num_rects, sizeof (xcb_rectangle_t)); if (!rects) goto out; for (i = 0; i < a_num_rects; i++) { rects[i].x = a_rects[i].x1; rects[i].y = a_rects[i].y1; rects[i].width = abs(a_rects[i].x2 - a_rects[i].x1); rects[i].height = abs(a_rects[i].y2 - a_rects[i].y1); EPHYR_LOG("borders clipped to rect[x:%d,y:%d,w:%d,h:%d]\n", rects[i].x, rects[i].y, rects[i].width, rects[i].height); } xcb_shape_rectangles(HostX.conn, XCB_SHAPE_SO_SET, XCB_SHAPE_SK_BOUNDING, XCB_CLIP_ORDERING_YX_BANDED, a_window, 0, 0, a_num_rects, rects); is_ok = TRUE; out: free(rects); rects = NULL; EPHYR_LOG("leave\n"); return is_ok; } #ifdef GLAMOR Bool ephyr_glamor_init(ScreenPtr screen) { KdScreenPriv(screen); KdScreenInfo *kd_screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = kd_screen->driver; scrpriv->glamor = ephyr_glamor_glx_screen_init(scrpriv->win); ephyr_glamor_set_window_size(scrpriv->glamor, scrpriv->win_width, scrpriv->win_height); if (!glamor_init(screen, 0)) { FatalError("Failed to initialize glamor\n"); return FALSE; } return TRUE; } static int ephyrSetPixmapVisitWindow(WindowPtr window, void *data) { ScreenPtr screen = window->drawable.pScreen; if (screen->GetWindowPixmap(window) == data) { screen->SetWindowPixmap(window, screen->GetScreenPixmap(screen)); return WT_WALKCHILDREN; } return WT_DONTWALKCHILDREN; } Bool ephyr_glamor_create_screen_resources(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *kd_screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = kd_screen->driver; PixmapPtr old_screen_pixmap, screen_pixmap; uint32_t tex; if (!ephyr_glamor) return TRUE; /* kdrive's fbSetupScreen() told mi to have * miCreateScreenResources() (which is called before this) make a * scratch pixmap wrapping ephyr-glamor's NULL * KdScreenInfo->fb.framebuffer. * * We want a real (texture-based) screen pixmap at this point. * This is what glamor will render into, and we'll then texture * out of that into the host's window to present the results. * * Thus, delete the current screen pixmap, and put a fresh one in. */ old_screen_pixmap = pScreen->GetScreenPixmap(pScreen); pScreen->DestroyPixmap(old_screen_pixmap); screen_pixmap = pScreen->CreatePixmap(pScreen, pScreen->width, pScreen->height, pScreen->rootDepth, GLAMOR_CREATE_NO_LARGE); if (!screen_pixmap) return FALSE; pScreen->SetScreenPixmap(screen_pixmap); if (pScreen->root && pScreen->SetWindowPixmap) TraverseTree(pScreen->root, ephyrSetPixmapVisitWindow, old_screen_pixmap); /* Tell the GLX code what to GL texture to read from. */ tex = glamor_get_pixmap_texture(screen_pixmap); if (!tex) return FALSE; ephyr_glamor_set_texture(scrpriv->glamor, tex); return TRUE; } void ephyr_glamor_enable(ScreenPtr screen) { } void ephyr_glamor_disable(ScreenPtr screen) { } void ephyr_glamor_fini(ScreenPtr screen) { KdScreenPriv(screen); KdScreenInfo *kd_screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = kd_screen->driver; glamor_fini(screen); ephyr_glamor_glx_screen_fini(scrpriv->glamor); scrpriv->glamor = NULL; } #endif xorg-server-21.1.16/hw/kdrive/ephyr/hostx.h0000644000175000017500000001136014757411105014203 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2004 Nokia * * 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 Nokia not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Nokia makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL NOKIA 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. */ #ifndef _XLIBS_STUFF_H_ #define _XLIBS_STUFF_H_ #include #include #include #include #include "ephyr.h" #define EPHYR_WANT_DEBUG 0 #if (EPHYR_WANT_DEBUG) #define EPHYR_DBG(x, a...) \ fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a) #else #define EPHYR_DBG(x, a...) do {} while (0) #endif typedef struct EphyrHostXVars EphyrHostXVars; typedef struct { VisualID visualid; int screen; int depth; int class; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int colormap_size; int bits_per_rgb; } EphyrHostVisualInfo; typedef struct { int x, y; int width, height; int visualid; } EphyrHostWindowAttributes; typedef struct { int x, y, width, height; } EphyrBox; typedef struct { short x1, y1, x2, y2; } EphyrRect; int hostx_want_screen_geometry(KdScreenInfo *screen, int *width, int *height, int *x, int *y); int hostx_want_host_cursor(void); void hostx_use_sw_cursor(void); xcb_cursor_t hostx_get_empty_cursor(void); void hostx_get_output_geometry(const char *output, int *x, int *y, int *width, int *height); void hostx_use_fullscreen(void); int hostx_want_fullscreen(void); int hostx_want_preexisting_window(KdScreenInfo *screen); void hostx_use_preexisting_window(unsigned long win_id); void hostx_use_resname(char *name, int fromcmd); void hostx_set_title(char *name); void hostx_handle_signal(int signum); int hostx_init(void); void hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num, Bool use_geometry, const char *output); void hostx_set_display_name(char *name); void hostx_set_screen_number(KdScreenInfo *screen, int number); void hostx_set_win_title(KdScreenInfo *screen, const char *extra_text); int hostx_get_depth(void); int hostx_get_server_depth(KdScreenInfo *screen); int hostx_get_bpp(KdScreenInfo *screen); void hostx_get_visual_masks(KdScreenInfo *screen, CARD32 *rmsk, CARD32 *gmsk, CARD32 *bmsk); void hostx_set_cmap_entry(ScreenPtr pScreen, unsigned char idx, unsigned char r, unsigned char g, unsigned char b); void *hostx_screen_init(KdScreenInfo *screen, int x, int y, int width, int height, int buffer_height, int *bytes_per_line, int *bits_per_pixel); void hostx_paint_rect(KdScreenInfo *screen, int sx, int sy, int dx, int dy, int width, int height); Bool hostx_load_keymap(KeySymsPtr keySyms, CARD8 *modmap, XkbControlsPtr controls); void hostx_size_set_from_configure(Bool); xcb_connection_t * hostx_get_xcbconn(void); xcb_generic_event_t * hostx_get_event(Bool queued_only); Bool hostx_has_queued_event(void); int hostx_get_screen(void); int hostx_get_window(int a_screen_number); int hostx_get_window_attributes(int a_window, EphyrHostWindowAttributes * a_attr); int hostx_get_visuals_info(EphyrHostVisualInfo ** a_visuals, int *a_num_entries); int hostx_create_window(int a_screen_number, EphyrBox * a_geometry, int a_visual_id, int *a_host_win /*out parameter */ ); int hostx_destroy_window(int a_win); int hostx_set_window_geometry(int a_win, EphyrBox * a_geo); int hostx_set_window_bounding_rectangles(int a_window, EphyrRect * a_rects, int a_num_rects); int hostx_has_extension(xcb_extension_t *extension); int hostx_get_fd(void); #endif /*_XLIBS_STUFF_H_*/ xorg-server-21.1.16/hw/kdrive/ephyr/ephyrvideo.c0000644000175000017500000012140214757411105015206 /* * Xephyr - A kdrive X server that runs in a host X window. * Authored by Matthew Allum * * Copyright © 2007 OpenedHand Ltd * * 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 OpenedHand Ltd not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. OpenedHand Ltd makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * OpenedHand Ltd DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL OpenedHand Ltd 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. * * Authors: * Dodji Seketeli */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "ephyrlog.h" #include "kdrive.h" #include "kxv.h" #include "ephyr.h" #include "hostx.h" struct _EphyrXVPriv { xcb_xv_query_adaptors_reply_t *host_adaptors; KdVideoAdaptorPtr adaptors; int num_adaptors; }; typedef struct _EphyrXVPriv EphyrXVPriv; struct _EphyrPortPriv { int port_number; KdVideoAdaptorPtr current_adaptor; EphyrXVPriv *xv_priv; unsigned char *image_buf; int image_buf_size; int image_id; int drw_x, drw_y, drw_w, drw_h; int src_x, src_y, src_w, src_h; int image_width, image_height; }; typedef struct _EphyrPortPriv EphyrPortPriv; static Bool ephyrLocalAtomToHost(int a_local_atom, int *a_host_atom); static EphyrXVPriv *ephyrXVPrivNew(void); static void ephyrXVPrivDelete(EphyrXVPriv * a_this); static Bool ephyrXVPrivQueryHostAdaptors(EphyrXVPriv * a_this); static Bool ephyrXVPrivSetAdaptorsHooks(EphyrXVPriv * a_this); static Bool ephyrXVPrivRegisterAdaptors(EphyrXVPriv * a_this, ScreenPtr a_screen); static Bool ephyrXVPrivIsAttrValueValid(XvAttributePtr a_attrs, int a_attrs_len, const char *a_attr_name, int a_attr_value, Bool *a_is_valid); static Bool ephyrXVPrivGetImageBufSize(int a_port_id, int a_image_id, unsigned short a_width, unsigned short a_height, int *a_size); static Bool ephyrXVPrivSaveImageToPortPriv(EphyrPortPriv * a_port_priv, const unsigned char *a_image, int a_image_len); static void ephyrStopVideo(KdScreenInfo * a_info, void *a_xv_priv, Bool a_exit); static int ephyrSetPortAttribute(KdScreenInfo * a_info, Atom a_attr_name, int a_attr_value, void *a_port_priv); static int ephyrGetPortAttribute(KdScreenInfo * a_screen_info, Atom a_attr_name, int *a_attr_value, void *a_port_priv); static void ephyrQueryBestSize(KdScreenInfo * a_info, Bool a_motion, short a_src_w, short a_src_h, short a_drw_w, short a_drw_h, unsigned int *a_prefered_w, unsigned int *a_prefered_h, void *a_port_priv); static int ephyrPutImage(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_src_x, short a_src_y, short a_drw_x, short a_drw_y, short a_src_w, short a_src_h, short a_drw_w, short a_drw_h, int a_id, unsigned char *a_buf, short a_width, short a_height, Bool a_sync, RegionPtr a_clipping_region, void *a_port_priv); static int ephyrReputImage(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_drw_x, short a_drw_y, RegionPtr a_clipping_region, void *a_port_priv); static int ephyrPutVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clip_region, void *a_port_priv); static int ephyrGetVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clip_region, void *a_port_priv); static int ephyrPutStill(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clip_region, void *a_port_priv); static int ephyrGetStill(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clip_region, void *a_port_priv); static int ephyrQueryImageAttributes(KdScreenInfo * a_info, int a_id, unsigned short *a_w, unsigned short *a_h, int *a_pitches, int *a_offsets); static int s_base_port_id; /************** * * ************/ static Bool adaptor_has_flags(const xcb_xv_adaptor_info_t *adaptor, uint32_t flags) { return (adaptor->type & flags) == flags; } static Bool ephyrLocalAtomToHost(int a_local_atom, int *a_host_atom) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_intern_atom_cookie_t cookie; xcb_intern_atom_reply_t *reply; const char *atom_name = NULL; EPHYR_RETURN_VAL_IF_FAIL(a_host_atom, FALSE); if (!ValidAtom(a_local_atom)) return FALSE; atom_name = NameForAtom(a_local_atom); if (!atom_name) return FALSE; cookie = xcb_intern_atom(conn, FALSE, strlen(atom_name), atom_name); reply = xcb_intern_atom_reply(conn, cookie, NULL); if (!reply || reply->atom == None) { EPHYR_LOG_ERROR("no atom for string %s defined in host X\n", atom_name); return FALSE; } *a_host_atom = reply->atom; free(reply); return TRUE; } /************** * * ************/ Bool ephyrInitVideo(ScreenPtr pScreen) { Bool is_ok = FALSE; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; static EphyrXVPriv *xv_priv; EPHYR_LOG("enter\n"); if (screen->fb.bitsPerPixel == 8) { EPHYR_LOG_ERROR("8 bits depth not supported\n"); return FALSE; } if (!hostx_has_extension(&xcb_xv_id)) { EPHYR_LOG_ERROR("Host has no XVideo extension\n"); return FALSE; } if (!xv_priv) { xv_priv = ephyrXVPrivNew(); } if (!xv_priv) { EPHYR_LOG_ERROR("failed to create xv_priv\n"); goto out; } if (!ephyrXVPrivRegisterAdaptors(xv_priv, pScreen)) { EPHYR_LOG_ERROR("failed to register adaptors\n"); goto out; } is_ok = TRUE; out: return is_ok; } static EphyrXVPriv * ephyrXVPrivNew(void) { EphyrXVPriv *xv_priv = NULL; EPHYR_LOG("enter\n"); xv_priv = calloc(1, sizeof(EphyrXVPriv)); if (!xv_priv) { EPHYR_LOG_ERROR("failed to create EphyrXVPriv\n"); goto error; } if (!ephyrXVPrivQueryHostAdaptors(xv_priv)) { EPHYR_LOG_ERROR("failed to query the host x for xv properties\n"); goto error; } if (!ephyrXVPrivSetAdaptorsHooks(xv_priv)) { EPHYR_LOG_ERROR("failed to set xv_priv hooks\n"); goto error; } EPHYR_LOG("leave\n"); return xv_priv; error: if (xv_priv) { ephyrXVPrivDelete(xv_priv); xv_priv = NULL; } return NULL; } static void ephyrXVPrivDelete(EphyrXVPriv * a_this) { EPHYR_LOG("enter\n"); if (!a_this) return; if (a_this->host_adaptors) { free(a_this->host_adaptors); a_this->host_adaptors = NULL; } free(a_this->adaptors); a_this->adaptors = NULL; free(a_this); EPHYR_LOG("leave\n"); } static Bool translate_video_encodings(KdVideoAdaptorPtr adaptor, xcb_xv_adaptor_info_t *host_adaptor) { xcb_connection_t *conn = hostx_get_xcbconn(); int i; xcb_xv_query_encodings_cookie_t cookie; xcb_xv_query_encodings_reply_t *reply; xcb_xv_encoding_info_iterator_t encoding_it; cookie = xcb_xv_query_encodings(conn, host_adaptor->base_id); reply = xcb_xv_query_encodings_reply(conn, cookie, NULL); if (!reply) return FALSE; adaptor->nEncodings = reply->num_encodings; adaptor->pEncodings = calloc(adaptor->nEncodings, sizeof(*adaptor->pEncodings)); if (!adaptor->pEncodings) { free(reply); return FALSE; } encoding_it = xcb_xv_query_encodings_info_iterator(reply); for (i = 0; i < adaptor->nEncodings; i++) { xcb_xv_encoding_info_t *encoding_info = encoding_it.data; KdVideoEncodingPtr encoding = &adaptor->pEncodings[i]; encoding->id = encoding_info->encoding; encoding->name = strndup(xcb_xv_encoding_info_name(encoding_info), encoding_info->name_size); encoding->width = encoding_info->width; encoding->height = encoding_info->height; encoding->rate.numerator = encoding_info->rate.numerator; encoding->rate.denominator = encoding_info->rate.denominator; xcb_xv_encoding_info_next(&encoding_it); } free(reply); return TRUE; } static Bool translate_xv_attributes(KdVideoAdaptorPtr adaptor, xcb_xv_adaptor_info_t *host_adaptor) { xcb_connection_t *conn = hostx_get_xcbconn(); int i = 0; xcb_xv_attribute_info_iterator_t it; xcb_xv_query_port_attributes_cookie_t cookie = xcb_xv_query_port_attributes(conn, host_adaptor->base_id); xcb_xv_query_port_attributes_reply_t *reply = xcb_xv_query_port_attributes_reply(conn, cookie, NULL); if (!reply) return FALSE; adaptor->nAttributes = reply->num_attributes; adaptor->pAttributes = calloc(reply->num_attributes, sizeof(*adaptor->pAttributes)); if (!adaptor->pAttributes) { EPHYR_LOG_ERROR("failed to allocate attributes\n"); free(reply); return FALSE; } it = xcb_xv_query_port_attributes_attributes_iterator(reply); for (i = 0; i < reply->num_attributes; i++) { XvAttributePtr attribute = &adaptor->pAttributes[i]; attribute->flags = it.data->flags; attribute->min_value = it.data->min; attribute->max_value = it.data->max; attribute->name = strndup(xcb_xv_attribute_info_name(it.data), it.data->size); /* make sure atoms of attrs names are created in xephyr */ MakeAtom(xcb_xv_attribute_info_name(it.data), it.data->size, TRUE); xcb_xv_attribute_info_next(&it); } free(reply); return TRUE; } static Bool translate_xv_image_formats(KdVideoAdaptorPtr adaptor, xcb_xv_adaptor_info_t *host_adaptor) { xcb_connection_t *conn = hostx_get_xcbconn(); int i = 0; xcb_xv_list_image_formats_cookie_t cookie = xcb_xv_list_image_formats(conn, host_adaptor->base_id); xcb_xv_list_image_formats_reply_t *reply = xcb_xv_list_image_formats_reply(conn, cookie, NULL); xcb_xv_image_format_info_t *formats; if (!reply) return FALSE; adaptor->nImages = reply->num_formats; adaptor->pImages = calloc(reply->num_formats, sizeof(XvImageRec)); if (!adaptor->pImages) { free(reply); return FALSE; } formats = xcb_xv_list_image_formats_format(reply); for (i = 0; i < reply->num_formats; i++) { XvImagePtr image = &adaptor->pImages[i]; image->id = formats[i].id; image->type = formats[i].type; image->byte_order = formats[i].byte_order; memcpy(image->guid, formats[i].guid, 16); image->bits_per_pixel = formats[i].bpp; image->format = formats[i].format; image->num_planes = formats[i].num_planes; image->depth = formats[i].depth; image->red_mask = formats[i].red_mask; image->green_mask = formats[i].green_mask; image->blue_mask = formats[i].blue_mask; image->y_sample_bits = formats[i].y_sample_bits; image->u_sample_bits = formats[i].u_sample_bits; image->v_sample_bits = formats[i].v_sample_bits; image->horz_y_period = formats[i].vhorz_y_period; image->horz_u_period = formats[i].vhorz_u_period; image->horz_v_period = formats[i].vhorz_v_period; image->vert_y_period = formats[i].vvert_y_period; image->vert_u_period = formats[i].vvert_u_period; image->vert_v_period = formats[i].vvert_v_period; memcpy(image->component_order, formats[i].vcomp_order, 32); image->scanline_order = formats[i].vscanline_order; } free(reply); return TRUE; } static Bool ephyrXVPrivQueryHostAdaptors(EphyrXVPriv * a_this) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_screen_t *xscreen = xcb_aux_get_screen(conn, hostx_get_screen()); int base_port_id = 0, i = 0, port_priv_offset = 0; Bool is_ok = FALSE; xcb_generic_error_t *e = NULL; xcb_xv_adaptor_info_iterator_t it; EPHYR_RETURN_VAL_IF_FAIL(a_this, FALSE); EPHYR_LOG("enter\n"); { xcb_xv_query_adaptors_cookie_t cookie = xcb_xv_query_adaptors(conn, xscreen->root); a_this->host_adaptors = xcb_xv_query_adaptors_reply(conn, cookie, &e); if (e) { free(e); EPHYR_LOG_ERROR("failed to query host adaptors\n"); goto out; } } if (a_this->host_adaptors) a_this->num_adaptors = a_this->host_adaptors->num_adaptors; if (a_this->num_adaptors <= 0) { EPHYR_LOG_ERROR("failed to get number of host adaptors\n"); goto out; } EPHYR_LOG("host has %d adaptors\n", a_this->num_adaptors); /* * copy what we can from adaptors into a_this->adaptors */ if (a_this->num_adaptors) { a_this->adaptors = calloc(a_this->num_adaptors, sizeof(KdVideoAdaptorRec)); if (!a_this->adaptors) { EPHYR_LOG_ERROR("failed to create internal adaptors\n"); goto out; } } it = xcb_xv_query_adaptors_info_iterator(a_this->host_adaptors); for (i = 0; i < a_this->num_adaptors; i++) { xcb_xv_adaptor_info_t *cur_host_adaptor = it.data; xcb_xv_format_t *format = xcb_xv_adaptor_info_formats(cur_host_adaptor); int j = 0; a_this->adaptors[i].nPorts = cur_host_adaptor->num_ports; if (a_this->adaptors[i].nPorts <= 0) { EPHYR_LOG_ERROR("Could not find any port of adaptor %d\n", i); continue; } a_this->adaptors[i].type = cur_host_adaptor->type; a_this->adaptors[i].type |= XvWindowMask; a_this->adaptors[i].flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT; a_this->adaptors[i].name = strndup(xcb_xv_adaptor_info_name(cur_host_adaptor), cur_host_adaptor->name_size); if (!a_this->adaptors[i].name) a_this->adaptors[i].name = strdup("Xephyr Video Overlay"); base_port_id = cur_host_adaptor->base_id; if (base_port_id < 0) { EPHYR_LOG_ERROR("failed to get port id for adaptor %d\n", i); continue; } if (!s_base_port_id) s_base_port_id = base_port_id; if (!translate_video_encodings(&a_this->adaptors[i], cur_host_adaptor)) { EPHYR_LOG_ERROR("failed to get encodings for port port id %d," " adaptors %d\n", base_port_id, i); continue; } a_this->adaptors[i].nFormats = cur_host_adaptor->num_formats; a_this->adaptors[i].pFormats = calloc(cur_host_adaptor->num_formats, sizeof(*a_this->adaptors[i].pFormats)); for (j = 0; j < cur_host_adaptor->num_formats; j++) { xcb_visualtype_t *visual = xcb_aux_find_visual_by_id(xscreen, format[j].visual); a_this->adaptors[i].pFormats[j].depth = format[j].depth; a_this->adaptors[i].pFormats[j].class = visual->_class; } a_this->adaptors[i].pPortPrivates = calloc(a_this->adaptors[i].nPorts, sizeof(DevUnion) + sizeof(EphyrPortPriv)); port_priv_offset = a_this->adaptors[i].nPorts; for (j = 0; j < a_this->adaptors[i].nPorts; j++) { EphyrPortPriv *port_privs_base = (EphyrPortPriv *) &a_this->adaptors[i]. pPortPrivates[port_priv_offset]; EphyrPortPriv *port_priv = &port_privs_base[j]; port_priv->port_number = base_port_id + j; port_priv->current_adaptor = &a_this->adaptors[i]; port_priv->xv_priv = a_this; a_this->adaptors[i].pPortPrivates[j].ptr = port_priv; } if (!translate_xv_attributes(&a_this->adaptors[i], cur_host_adaptor)) { { EPHYR_LOG_ERROR("failed to get port attribute " "for adaptor %d\n", i); continue; } } if (!translate_xv_image_formats(&a_this->adaptors[i], cur_host_adaptor)) { EPHYR_LOG_ERROR("failed to get image formats " "for adaptor %d\n", i); continue; } xcb_xv_adaptor_info_next(&it); } is_ok = TRUE; out: EPHYR_LOG("leave\n"); return is_ok; } static Bool ephyrXVPrivSetAdaptorsHooks(EphyrXVPriv * a_this) { int i = 0; xcb_xv_adaptor_info_iterator_t it; EPHYR_RETURN_VAL_IF_FAIL(a_this, FALSE); EPHYR_LOG("enter\n"); it = xcb_xv_query_adaptors_info_iterator(a_this->host_adaptors); for (i = 0; i < a_this->num_adaptors; i++) { xcb_xv_adaptor_info_t *cur_host_adaptor = it.data; a_this->adaptors[i].ReputImage = ephyrReputImage; a_this->adaptors[i].StopVideo = ephyrStopVideo; a_this->adaptors[i].SetPortAttribute = ephyrSetPortAttribute; a_this->adaptors[i].GetPortAttribute = ephyrGetPortAttribute; a_this->adaptors[i].QueryBestSize = ephyrQueryBestSize; a_this->adaptors[i].QueryImageAttributes = ephyrQueryImageAttributes; if (adaptor_has_flags(cur_host_adaptor, XCB_XV_TYPE_IMAGE_MASK | XCB_XV_TYPE_INPUT_MASK)) a_this->adaptors[i].PutImage = ephyrPutImage; if (adaptor_has_flags(cur_host_adaptor, XCB_XV_TYPE_VIDEO_MASK | XCB_XV_TYPE_INPUT_MASK)) a_this->adaptors[i].PutVideo = ephyrPutVideo; if (adaptor_has_flags(cur_host_adaptor, XCB_XV_TYPE_VIDEO_MASK | XCB_XV_TYPE_OUTPUT_MASK)) a_this->adaptors[i].GetVideo = ephyrGetVideo; if (adaptor_has_flags(cur_host_adaptor, XCB_XV_TYPE_STILL_MASK | XCB_XV_TYPE_INPUT_MASK)) a_this->adaptors[i].PutStill = ephyrPutStill; if (adaptor_has_flags(cur_host_adaptor, XCB_XV_TYPE_STILL_MASK | XCB_XV_TYPE_OUTPUT_MASK)) a_this->adaptors[i].GetStill = ephyrGetStill; } EPHYR_LOG("leave\n"); return TRUE; } static Bool ephyrXVPrivRegisterAdaptors(EphyrXVPriv * a_this, ScreenPtr a_screen) { Bool is_ok = FALSE; EPHYR_RETURN_VAL_IF_FAIL(a_this && a_screen, FALSE); EPHYR_LOG("enter\n"); if (!a_this->num_adaptors) goto out; if (!KdXVScreenInit(a_screen, a_this->adaptors, a_this->num_adaptors)) { EPHYR_LOG_ERROR("failed to register adaptors\n"); goto out; } EPHYR_LOG("there are %d registered adaptors\n", a_this->num_adaptors); is_ok = TRUE; out: EPHYR_LOG("leave\n"); return is_ok; } static Bool ephyrXVPrivIsAttrValueValid(XvAttributePtr a_attrs, int a_attrs_len, const char *a_attr_name, int a_attr_value, Bool *a_is_valid) { int i = 0; EPHYR_RETURN_VAL_IF_FAIL(a_attrs && a_attr_name && a_is_valid, FALSE); for (i = 0; i < a_attrs_len; i++) { if (a_attrs[i].name && strcmp(a_attrs[i].name, a_attr_name)) continue; if (a_attrs[i].min_value > a_attr_value || a_attrs[i].max_value < a_attr_value) { *a_is_valid = FALSE; EPHYR_LOG_ERROR("attribute was not valid\n" "value:%d. min:%d. max:%d\n", a_attr_value, a_attrs[i].min_value, a_attrs[i].max_value); } else { *a_is_valid = TRUE; } return TRUE; } return FALSE; } static Bool ephyrXVPrivGetImageBufSize(int a_port_id, int a_image_id, unsigned short a_width, unsigned short a_height, int *a_size) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_xv_query_image_attributes_cookie_t cookie; xcb_xv_query_image_attributes_reply_t *reply; Bool is_ok = FALSE; EPHYR_RETURN_VAL_IF_FAIL(a_size, FALSE); EPHYR_LOG("enter\n"); cookie = xcb_xv_query_image_attributes(conn, a_port_id, a_image_id, a_width, a_height); reply = xcb_xv_query_image_attributes_reply(conn, cookie, NULL); if (!reply) goto out; *a_size = reply->data_size; is_ok = TRUE; free(reply); out: EPHYR_LOG("leave\n"); return is_ok; } static Bool ephyrXVPrivSaveImageToPortPriv(EphyrPortPriv * a_port_priv, const unsigned char *a_image_buf, int a_image_len) { Bool is_ok = FALSE; EPHYR_LOG("enter\n"); if (a_port_priv->image_buf_size < a_image_len) { unsigned char *buf = NULL; buf = realloc(a_port_priv->image_buf, a_image_len); if (!buf) { EPHYR_LOG_ERROR("failed to realloc image buffer\n"); goto out; } a_port_priv->image_buf = buf; a_port_priv->image_buf_size = a_image_len; } memmove(a_port_priv->image_buf, a_image_buf, a_image_len); is_ok = TRUE; out: return is_ok; EPHYR_LOG("leave\n"); } static void ephyrStopVideo(KdScreenInfo * a_info, void *a_port_priv, Bool a_exit) { xcb_connection_t *conn = hostx_get_xcbconn(); EphyrPortPriv *port_priv = a_port_priv; EphyrScrPriv *scrpriv = a_info->driver; EPHYR_RETURN_IF_FAIL(port_priv); EPHYR_LOG("enter\n"); xcb_xv_stop_video(conn, port_priv->port_number, scrpriv->win); EPHYR_LOG("leave\n"); } static int ephyrSetPortAttribute(KdScreenInfo * a_info, Atom a_attr_name, int a_attr_value, void *a_port_priv) { xcb_connection_t *conn = hostx_get_xcbconn(); int res = Success, host_atom = 0; EphyrPortPriv *port_priv = a_port_priv; Bool is_attr_valid = FALSE; EPHYR_RETURN_VAL_IF_FAIL(port_priv, BadMatch); EPHYR_RETURN_VAL_IF_FAIL(port_priv->current_adaptor, BadMatch); EPHYR_RETURN_VAL_IF_FAIL(port_priv->current_adaptor->pAttributes, BadMatch); EPHYR_RETURN_VAL_IF_FAIL(port_priv->current_adaptor->nAttributes, BadMatch); EPHYR_RETURN_VAL_IF_FAIL(ValidAtom(a_attr_name), BadMatch); EPHYR_LOG("enter, portnum:%d, atomid:%d, attr_name:%s, attr_val:%d\n", port_priv->port_number, (int) a_attr_name, NameForAtom(a_attr_name), a_attr_value); if (!ephyrLocalAtomToHost(a_attr_name, &host_atom)) { EPHYR_LOG_ERROR("failed to convert local atom to host atom\n"); res = BadMatch; goto out; } if (!ephyrXVPrivIsAttrValueValid(port_priv->current_adaptor->pAttributes, port_priv->current_adaptor->nAttributes, NameForAtom(a_attr_name), a_attr_value, &is_attr_valid)) { EPHYR_LOG_ERROR("failed to validate attribute %s\n", NameForAtom(a_attr_name)); /* res = BadMatch ; goto out ; */ } if (!is_attr_valid) { EPHYR_LOG_ERROR("attribute %s is not valid\n", NameForAtom(a_attr_name)); /* res = BadMatch ; goto out ; */ } xcb_xv_set_port_attribute(conn, port_priv->port_number, host_atom, a_attr_value); xcb_flush(conn); res = Success; out: EPHYR_LOG("leave\n"); return res; } static int ephyrGetPortAttribute(KdScreenInfo * a_screen_info, Atom a_attr_name, int *a_attr_value, void *a_port_priv) { xcb_connection_t *conn = hostx_get_xcbconn(); int res = Success, host_atom = 0; EphyrPortPriv *port_priv = a_port_priv; xcb_generic_error_t *e; xcb_xv_get_port_attribute_cookie_t cookie; xcb_xv_get_port_attribute_reply_t *reply; EPHYR_RETURN_VAL_IF_FAIL(port_priv, BadMatch); EPHYR_RETURN_VAL_IF_FAIL(ValidAtom(a_attr_name), BadMatch); EPHYR_LOG("enter, portnum:%d, atomid:%d, attr_name:%s\n", port_priv->port_number, (int) a_attr_name, NameForAtom(a_attr_name)); if (!ephyrLocalAtomToHost(a_attr_name, &host_atom)) { EPHYR_LOG_ERROR("failed to convert local atom to host atom\n"); res = BadMatch; goto out; } cookie = xcb_xv_get_port_attribute(conn, port_priv->port_number, host_atom); reply = xcb_xv_get_port_attribute_reply(conn, cookie, &e); if (e) { EPHYR_LOG_ERROR ("XvGetPortAttribute() failed: %d \n", e->error_code); free(e); res = BadMatch; goto out; } *a_attr_value = reply->value; free(reply); res = Success; out: EPHYR_LOG("leave\n"); return res; } static void ephyrQueryBestSize(KdScreenInfo * a_info, Bool a_motion, short a_src_w, short a_src_h, short a_drw_w, short a_drw_h, unsigned int *a_prefered_w, unsigned int *a_prefered_h, void *a_port_priv) { xcb_connection_t *conn = hostx_get_xcbconn(); EphyrPortPriv *port_priv = a_port_priv; xcb_xv_query_best_size_cookie_t cookie = xcb_xv_query_best_size(conn, port_priv->port_number, a_src_w, a_src_h, a_drw_w, a_drw_h, a_motion); xcb_xv_query_best_size_reply_t *reply = xcb_xv_query_best_size_reply(conn, cookie, NULL); EPHYR_LOG("enter: frame (%dx%d), drw (%dx%d)\n", a_src_w, a_src_h, a_drw_w, a_drw_h); if (!reply) { EPHYR_LOG_ERROR ("XvQueryBestSize() failed\n"); return; } *a_prefered_w = reply->actual_width; *a_prefered_h = reply->actual_height; EPHYR_LOG("actual (%dx%d)\n", *a_prefered_w, *a_prefered_h); free(reply); EPHYR_LOG("leave\n"); } static Bool ephyrHostXVPutImage(KdScreenInfo * a_info, EphyrPortPriv *port_priv, int a_image_id, int a_drw_x, int a_drw_y, int a_drw_w, int a_drw_h, int a_src_x, int a_src_y, int a_src_w, int a_src_h, int a_image_width, int a_image_height, unsigned char *a_buf, BoxPtr a_clip_rects, int a_clip_rect_nums) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; Bool is_ok = TRUE; xcb_rectangle_t *rects = NULL; int data_len, width, height; xcb_xv_query_image_attributes_cookie_t image_attr_cookie; xcb_xv_query_image_attributes_reply_t *image_attr_reply; EPHYR_RETURN_VAL_IF_FAIL(a_buf, FALSE); EPHYR_LOG("enter, num_clip_rects: %d\n", a_clip_rect_nums); image_attr_cookie = xcb_xv_query_image_attributes(conn, port_priv->port_number, a_image_id, a_image_width, a_image_height); image_attr_reply = xcb_xv_query_image_attributes_reply(conn, image_attr_cookie, NULL); if (!image_attr_reply) goto out; data_len = image_attr_reply->data_size; width = image_attr_reply->width; height = image_attr_reply->height; free(image_attr_reply); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, scrpriv->win, 0, NULL); if (a_clip_rect_nums) { int i = 0; rects = calloc(a_clip_rect_nums, sizeof(xcb_rectangle_t)); for (i=0; i < a_clip_rect_nums; i++) { rects[i].x = a_clip_rects[i].x1; rects[i].y = a_clip_rects[i].y1; rects[i].width = a_clip_rects[i].x2 - a_clip_rects[i].x1; rects[i].height = a_clip_rects[i].y2 - a_clip_rects[i].y1; EPHYR_LOG("(x,y,w,h): (%d,%d,%d,%d)\n", rects[i].x, rects[i].y, rects[i].width, rects[i].height); } xcb_set_clip_rectangles(conn, XCB_CLIP_ORDERING_YX_BANDED, gc, 0, 0, a_clip_rect_nums, rects); free(rects); } xcb_xv_put_image(conn, port_priv->port_number, scrpriv->win, gc, a_image_id, a_src_x, a_src_y, a_src_w, a_src_h, a_drw_x, a_drw_y, a_drw_w, a_drw_h, width, height, data_len, a_buf); xcb_free_gc(conn, gc); is_ok = TRUE; out: EPHYR_LOG("leave\n"); return is_ok; } static int ephyrPutImage(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_src_x, short a_src_y, short a_drw_x, short a_drw_y, short a_src_w, short a_src_h, short a_drw_w, short a_drw_h, int a_id, unsigned char *a_buf, short a_width, short a_height, Bool a_sync, RegionPtr a_clipping_region, void *a_port_priv) { EphyrPortPriv *port_priv = a_port_priv; Bool is_ok = FALSE; int result = BadImplementation, image_size = 0; EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue); EPHYR_RETURN_VAL_IF_FAIL(a_drawable, BadValue); EPHYR_LOG("enter\n"); if (!ephyrHostXVPutImage(a_info, port_priv, a_id, a_drw_x, a_drw_y, a_drw_w, a_drw_h, a_src_x, a_src_y, a_src_w, a_src_h, a_width, a_height, a_buf, RegionRects(a_clipping_region), RegionNumRects(a_clipping_region))) { EPHYR_LOG_ERROR("EphyrHostXVPutImage() failed\n"); goto out; } /* * Now save the image so that we can resend it to host it * later, in ReputImage. */ if (!ephyrXVPrivGetImageBufSize(port_priv->port_number, a_id, a_width, a_height, &image_size)) { EPHYR_LOG_ERROR("failed to get image size\n"); /*this is a minor error so we won't get bail out abruptly */ is_ok = FALSE; } else { is_ok = TRUE; } if (is_ok) { if (!ephyrXVPrivSaveImageToPortPriv(port_priv, a_buf, image_size)) { is_ok = FALSE; } else { port_priv->image_id = a_id; port_priv->drw_x = a_drw_x; port_priv->drw_y = a_drw_y; port_priv->drw_w = a_drw_w; port_priv->drw_h = a_drw_h; port_priv->src_x = a_src_x; port_priv->src_y = a_src_y; port_priv->src_w = a_src_w; port_priv->src_h = a_src_h; port_priv->image_width = a_width; port_priv->image_height = a_height; } } if (!is_ok) { if (port_priv->image_buf) { free(port_priv->image_buf); port_priv->image_buf = NULL; port_priv->image_buf_size = 0; } } result = Success; out: EPHYR_LOG("leave\n"); return result; } static int ephyrReputImage(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_drw_x, short a_drw_y, RegionPtr a_clipping_region, void *a_port_priv) { EphyrPortPriv *port_priv = a_port_priv; int result = BadImplementation; EPHYR_RETURN_VAL_IF_FAIL(a_info->pScreen, FALSE); EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue); EPHYR_LOG("enter\n"); if (!port_priv->image_buf_size || !port_priv->image_buf) { EPHYR_LOG_ERROR("has null image buf in cache\n"); goto out; } if (!ephyrHostXVPutImage(a_info, port_priv, port_priv->image_id, a_drw_x, a_drw_y, port_priv->drw_w, port_priv->drw_h, port_priv->src_x, port_priv->src_y, port_priv->src_w, port_priv->src_h, port_priv->image_width, port_priv->image_height, port_priv->image_buf, RegionRects(a_clipping_region), RegionNumRects(a_clipping_region))) { EPHYR_LOG_ERROR("ephyrHostXVPutImage() failed\n"); goto out; } result = Success; out: EPHYR_LOG("leave\n"); return result; } static int ephyrPutVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; EphyrPortPriv *port_priv = a_port_priv; EPHYR_RETURN_VAL_IF_FAIL(a_info->pScreen, BadValue); EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue); EPHYR_LOG("enter\n"); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, scrpriv->win, 0, NULL); xcb_xv_put_video(conn, port_priv->port_number, scrpriv->win, gc, a_vid_x, a_vid_y, a_vid_w, a_vid_h, a_drw_x, a_drw_y, a_drw_w, a_drw_h); xcb_free_gc(conn, gc); EPHYR_LOG("leave\n"); return Success; } static int ephyrGetVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; EphyrPortPriv *port_priv = a_port_priv; EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue); EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue); EPHYR_LOG("enter\n"); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, scrpriv->win, 0, NULL); xcb_xv_get_video(conn, port_priv->port_number, scrpriv->win, gc, a_vid_x, a_vid_y, a_vid_w, a_vid_h, a_drw_x, a_drw_y, a_drw_w, a_drw_h); xcb_free_gc(conn, gc); EPHYR_LOG("leave\n"); return Success; } static int ephyrPutStill(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; EphyrPortPriv *port_priv = a_port_priv; EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue); EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue); EPHYR_LOG("enter\n"); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, scrpriv->win, 0, NULL); xcb_xv_put_still(conn, port_priv->port_number, scrpriv->win, gc, a_vid_x, a_vid_y, a_vid_w, a_vid_h, a_drw_x, a_drw_y, a_drw_w, a_drw_h); xcb_free_gc(conn, gc); EPHYR_LOG("leave\n"); return Success; } static int ephyrGetStill(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_vid_x, short a_vid_y, short a_drw_x, short a_drw_y, short a_vid_w, short a_vid_h, short a_drw_w, short a_drw_h, RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); xcb_gcontext_t gc; EphyrPortPriv *port_priv = a_port_priv; EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue); EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue); EPHYR_LOG("enter\n"); gc = xcb_generate_id(conn); xcb_create_gc(conn, gc, scrpriv->win, 0, NULL); xcb_xv_get_still(conn, port_priv->port_number, scrpriv->win, gc, a_vid_x, a_vid_y, a_vid_w, a_vid_h, a_drw_x, a_drw_y, a_drw_w, a_drw_h); xcb_free_gc(conn, gc); EPHYR_LOG("leave\n"); return Success; } static int ephyrQueryImageAttributes(KdScreenInfo * a_info, int a_id, unsigned short *a_w, unsigned short *a_h, int *a_pitches, int *a_offsets) { xcb_connection_t *conn = hostx_get_xcbconn(); xcb_xv_query_image_attributes_cookie_t cookie; xcb_xv_query_image_attributes_reply_t *reply; int image_size = 0; EPHYR_RETURN_VAL_IF_FAIL(a_w && a_h, FALSE); EPHYR_LOG("enter: dim (%dx%d), pitches: %p, offsets: %p\n", *a_w, *a_h, a_pitches, a_offsets); cookie = xcb_xv_query_image_attributes(conn, s_base_port_id, a_id, *a_w, *a_h); reply = xcb_xv_query_image_attributes_reply(conn, cookie, NULL); if (!reply) goto out; *a_w = reply->width; *a_h = reply->height; if (a_pitches && a_offsets) { memcpy(a_pitches, xcb_xv_query_image_attributes_pitches(reply), reply->num_planes << 2); memcpy(a_offsets, xcb_xv_query_image_attributes_offsets(reply), reply->num_planes << 2); } image_size = reply->data_size; free(reply); EPHYR_LOG("image size: %d, dim (%dx%d)\n", image_size, *a_w, *a_h); out: EPHYR_LOG("leave\n"); return image_size; } xorg-server-21.1.16/hw/kdrive/ephyr/ephyr_glamor_glx.c0000644000175000017500000003010314757411105016367 /* * Copyright © 2013 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** @file ephyr_glamor_glx.c * * Separate file for hiding Xlib and GLX-using parts of xephyr from * the rest of the server-struct-aware build. */ #include #include #include #undef Xcalloc #undef Xrealloc #undef Xfree #include #include #include #include #include "ephyr_glamor_glx.h" #include "os.h" #include /* until we need geometry shaders GL3.1 should suffice. */ /* Xephyr has its own copy of this for build reasons */ #define GLAMOR_GL_CORE_VER_MAJOR 3 #define GLAMOR_GL_CORE_VER_MINOR 1 /** @{ * * global state for Xephyr with glamor. * * Xephyr can render with multiple windows, but all the windows have * to be on the same X connection and all have to have the same * visual. */ static Display *dpy; static XVisualInfo *visual_info; static GLXFBConfig fb_config; Bool ephyr_glamor_gles2; Bool ephyr_glamor_skip_present; /** @} */ /** * Per-screen state for Xephyr with glamor. */ struct ephyr_glamor { GLXContext ctx; Window win; GLXWindow glx_win; GLuint tex; GLuint texture_shader; GLuint texture_shader_position_loc; GLuint texture_shader_texcoord_loc; /* Size of the window that we're rendering to. */ unsigned width, height; GLuint vao, vbo; }; static GLint ephyr_glamor_compile_glsl_prog(GLenum type, const char *source) { GLint ok; GLint prog; prog = glCreateShader(type); glShaderSource(prog, 1, (const GLchar **) &source, NULL); glCompileShader(prog); glGetShaderiv(prog, GL_COMPILE_STATUS, &ok); if (!ok) { GLchar *info; GLint size; glGetShaderiv(prog, GL_INFO_LOG_LENGTH, &size); info = malloc(size); if (info) { glGetShaderInfoLog(prog, size, NULL, info); ErrorF("Failed to compile %s: %s\n", type == GL_FRAGMENT_SHADER ? "FS" : "VS", info); ErrorF("Program source:\n%s", source); free(info); } else ErrorF("Failed to get shader compilation info.\n"); FatalError("GLSL compile failure\n"); } return prog; } static GLuint ephyr_glamor_build_glsl_prog(GLuint vs, GLuint fs) { GLint ok; GLuint prog; prog = glCreateProgram(); glAttachShader(prog, vs); glAttachShader(prog, fs); glLinkProgram(prog); glGetProgramiv(prog, GL_LINK_STATUS, &ok); if (!ok) { GLchar *info; GLint size; glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &size); info = malloc(size); glGetProgramInfoLog(prog, size, NULL, info); ErrorF("Failed to link: %s\n", info); FatalError("GLSL link failure\n"); } return prog; } static void ephyr_glamor_setup_texturing_shader(struct ephyr_glamor *glamor) { const char *vs_source = "attribute vec2 texcoord;\n" "attribute vec2 position;\n" "varying vec2 t;\n" "\n" "void main()\n" "{\n" " t = texcoord;\n" " gl_Position = vec4(position, 0, 1);\n" "}\n"; const char *fs_source = "#ifdef GL_ES\n" "precision mediump float;\n" "#endif\n" "\n" "varying vec2 t;\n" "uniform sampler2D s; /* initially 0 */\n" "\n" "void main()\n" "{\n" " gl_FragColor = texture2D(s, t);\n" "}\n"; GLuint fs, vs, prog; vs = ephyr_glamor_compile_glsl_prog(GL_VERTEX_SHADER, vs_source); fs = ephyr_glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, fs_source); prog = ephyr_glamor_build_glsl_prog(vs, fs); glamor->texture_shader = prog; glamor->texture_shader_position_loc = glGetAttribLocation(prog, "position"); assert(glamor->texture_shader_position_loc != -1); glamor->texture_shader_texcoord_loc = glGetAttribLocation(prog, "texcoord"); assert(glamor->texture_shader_texcoord_loc != -1); } xcb_connection_t * ephyr_glamor_connect(void) { dpy = XOpenDisplay(NULL); if (!dpy) return NULL; XSetEventQueueOwner(dpy, XCBOwnsEventQueue); return XGetXCBConnection(dpy); } void ephyr_glamor_set_texture(struct ephyr_glamor *glamor, uint32_t tex) { glamor->tex = tex; } static void ephyr_glamor_set_vertices(struct ephyr_glamor *glamor) { glVertexAttribPointer(glamor->texture_shader_position_loc, 2, GL_FLOAT, FALSE, 0, (void *) 0); glVertexAttribPointer(glamor->texture_shader_texcoord_loc, 2, GL_FLOAT, FALSE, 0, (void *) (sizeof (float) * 8)); glEnableVertexAttribArray(glamor->texture_shader_position_loc); glEnableVertexAttribArray(glamor->texture_shader_texcoord_loc); } void ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor, struct pixman_region16 *damage) { GLint old_vao; /* Skip presenting the output in this mode. Presentation is * expensive, and if we're just running the X Test suite headless, * nobody's watching. */ if (ephyr_glamor_skip_present) return; glXMakeCurrent(dpy, glamor->glx_win, glamor->ctx); glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &old_vao); glBindVertexArray(glamor->vao); glBindFramebuffer(GL_FRAMEBUFFER, 0); glUseProgram(glamor->texture_shader); glViewport(0, 0, glamor->width, glamor->height); if (!ephyr_glamor_gles2) glDisable(GL_COLOR_LOGIC_OP); glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, glamor->tex); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); glBindVertexArray(old_vao); glXSwapBuffers(dpy, glamor->glx_win); } /** * Xlib-based handling of xcb events for glamor. * * We need to let the Xlib event filtering run on the event so that * Mesa's dri2_glx.c userspace event mangling gets run, and we * correctly get our invalidate events propagated into the driver. */ void ephyr_glamor_process_event(xcb_generic_event_t *xev) { uint32_t response_type = xev->response_type & 0x7f; /* Note the types on wire_to_event: there's an Xlib XEvent (with * the broken types) that it returns, and a protocol xEvent that * it inspects. */ Bool (*wire_to_event)(Display *dpy, XEvent *ret, xEvent *event); XLockDisplay(dpy); /* Set the event handler to NULL to get access to the current one. */ wire_to_event = XESetWireToEvent(dpy, response_type, NULL); if (wire_to_event) { XEvent processed_event; /* OK they had an event handler. Plug it back in, and call * through to it. */ XESetWireToEvent(dpy, response_type, wire_to_event); xev->sequence = LastKnownRequestProcessed(dpy); wire_to_event(dpy, &processed_event, (xEvent *)xev); } XUnlockDisplay(dpy); } static int ephyr_glx_error_handler(Display * _dpy, XErrorEvent * ev) { return 0; } struct ephyr_glamor * ephyr_glamor_glx_screen_init(xcb_window_t win) { int (*oldErrorHandler) (Display *, XErrorEvent *); static const float position[] = { -1, -1, 1, -1, 1, 1, -1, 1, 0, 1, 1, 1, 1, 0, 0, 0, }; GLint old_vao; GLXContext ctx; struct ephyr_glamor *glamor; GLXWindow glx_win; glamor = calloc(1, sizeof(struct ephyr_glamor)); if (!glamor) { FatalError("malloc"); return NULL; } glx_win = glXCreateWindow(dpy, fb_config, win, NULL); if (ephyr_glamor_gles2) { static const int context_attribs[] = { GLX_CONTEXT_MAJOR_VERSION_ARB, 2, GLX_CONTEXT_MINOR_VERSION_ARB, 0, GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_ES_PROFILE_BIT_EXT, 0, }; if (epoxy_has_glx_extension(dpy, DefaultScreen(dpy), "GLX_EXT_create_context_es2_profile")) { ctx = glXCreateContextAttribsARB(dpy, fb_config, NULL, True, context_attribs); } else { FatalError("Xephyr -glamor_gles2 requires " "GLX_EXT_create_context_es2_profile\n"); } } else { if (epoxy_has_glx_extension(dpy, DefaultScreen(dpy), "GLX_ARB_create_context")) { static const int context_attribs[] = { GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_CORE_PROFILE_BIT_ARB, GLX_CONTEXT_MAJOR_VERSION_ARB, GLAMOR_GL_CORE_VER_MAJOR, GLX_CONTEXT_MINOR_VERSION_ARB, GLAMOR_GL_CORE_VER_MINOR, 0, }; oldErrorHandler = XSetErrorHandler(ephyr_glx_error_handler); ctx = glXCreateContextAttribsARB(dpy, fb_config, NULL, True, context_attribs); XSync(dpy, False); XSetErrorHandler(oldErrorHandler); } else { ctx = NULL; } if (!ctx) ctx = glXCreateContext(dpy, visual_info, NULL, True); } if (ctx == NULL) FatalError("glXCreateContext failed\n"); if (!glXMakeCurrent(dpy, glx_win, ctx)) FatalError("glXMakeCurrent failed\n"); glamor->ctx = ctx; glamor->win = win; glamor->glx_win = glx_win; ephyr_glamor_setup_texturing_shader(glamor); glGenVertexArrays(1, &glamor->vao); glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &old_vao); glBindVertexArray(glamor->vao); glGenBuffers(1, &glamor->vbo); glBindBuffer(GL_ARRAY_BUFFER, glamor->vbo); glBufferData(GL_ARRAY_BUFFER, sizeof (position), position, GL_STATIC_DRAW); ephyr_glamor_set_vertices(glamor); glBindVertexArray(old_vao); return glamor; } void ephyr_glamor_glx_screen_fini(struct ephyr_glamor *glamor) { glXMakeCurrent(dpy, None, NULL); glXDestroyContext(dpy, glamor->ctx); glXDestroyWindow(dpy, glamor->glx_win); free(glamor); } xcb_visualtype_t * ephyr_glamor_get_visual(void) { xcb_screen_t *xscreen = xcb_aux_get_screen(XGetXCBConnection(dpy), DefaultScreen(dpy)); int attribs[] = { GLX_RENDER_TYPE, GLX_RGBA_BIT, GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT, GLX_RED_SIZE, 1, GLX_GREEN_SIZE, 1, GLX_BLUE_SIZE, 1, GLX_DOUBLEBUFFER, 1, None }; int event_base = 0, error_base = 0, nelements; GLXFBConfig *fbconfigs; if (!glXQueryExtension (dpy, &error_base, &event_base)) FatalError("Couldn't find GLX extension\n"); fbconfigs = glXChooseFBConfig(dpy, DefaultScreen(dpy), attribs, &nelements); if (!nelements) FatalError("Couldn't choose an FBConfig\n"); fb_config = fbconfigs[0]; free(fbconfigs); visual_info = glXGetVisualFromFBConfig(dpy, fb_config); if (visual_info == NULL) FatalError("Couldn't get RGB visual\n"); return xcb_aux_find_visual_by_id(xscreen, visual_info->visualid); } void ephyr_glamor_set_window_size(struct ephyr_glamor *glamor, unsigned width, unsigned height) { if (!glamor) return; glamor->width = width; glamor->height = height; } xorg-server-21.1.16/hw/kdrive/ephyr/ephyr_glamor_glx.h0000644000175000017500000000456614757411105016412 /* * Copyright © 2013 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * ephyr_glamor_glx.h * * Prototypes exposed by ephyr_glamor_glx.c, without including any * server headers. */ #include #include "dix-config.h" struct ephyr_glamor; struct pixman_region16; xcb_connection_t * ephyr_glamor_connect(void); void ephyr_glamor_set_texture(struct ephyr_glamor *ephyr_glamor, uint32_t tex); xcb_visualtype_t * ephyr_glamor_get_visual(void); struct ephyr_glamor * ephyr_glamor_glx_screen_init(xcb_window_t win); void ephyr_glamor_glx_screen_fini(struct ephyr_glamor *glamor); #ifdef GLAMOR void ephyr_glamor_set_window_size(struct ephyr_glamor *glamor, unsigned width, unsigned height); void ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor, struct pixman_region16 *damage); void ephyr_glamor_process_event(xcb_generic_event_t *xev); #else /* !GLAMOR */ static inline void ephyr_glamor_set_window_size(struct ephyr_glamor *glamor, unsigned width, unsigned height) { } static inline void ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor, struct pixman_region16 *damage) { } static inline void ephyr_glamor_process_event(xcb_generic_event_t *xev) { } #endif /* !GLAMOR */ xorg-server-21.1.16/hw/kdrive/ephyr/ephyr_glamor_xv.c0000644000175000017500000001252114757411105016236 /* * Copyright © 2014 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "kdrive.h" #include "kxv.h" #include "ephyr.h" #include "glamor_priv.h" #include #include "fourcc.h" #define NUM_FORMATS 3 static KdVideoFormatRec Formats[NUM_FORMATS] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor} }; static void ephyr_glamor_xv_stop_video(KdScreenInfo *screen, void *data, Bool cleanup) { if (!cleanup) return; glamor_xv_stop_video(data); } static int ephyr_glamor_xv_set_port_attribute(KdScreenInfo *screen, Atom attribute, int value, void *data) { return glamor_xv_set_port_attribute(data, attribute, (INT32)value); } static int ephyr_glamor_xv_get_port_attribute(KdScreenInfo *screen, Atom attribute, int *value, void *data) { return glamor_xv_get_port_attribute(data, attribute, (INT32 *)value); } static void ephyr_glamor_xv_query_best_size(KdScreenInfo *screen, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, void *data) { *p_w = drw_w; *p_h = drw_h; } static int ephyr_glamor_xv_query_image_attributes(KdScreenInfo *screen, int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets) { return glamor_xv_query_image_attributes(id, w, h, pitches, offsets); } static int ephyr_glamor_xv_put_image(KdScreenInfo *screen, DrawablePtr pDrawable, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes, void *data) { return glamor_xv_put_image(data, pDrawable, src_x, src_y, drw_x, drw_y, src_w, src_h, drw_w, drw_h, id, buf, width, height, sync, clipBoxes); } void ephyr_glamor_xv_init(ScreenPtr screen) { KdVideoAdaptorRec *adaptor; glamor_port_private *port_privates; KdVideoEncodingRec encoding = { 0, "XV_IMAGE", /* These sizes should probably be GL_MAX_TEXTURE_SIZE instead * of 2048, but our context isn't set up yet. */ 2048, 2048, {1, 1} }; int i; glamor_xv_core_init(screen); adaptor = xnfcalloc(1, sizeof(*adaptor)); adaptor->name = "glamor textured video"; adaptor->type = XvWindowMask | XvInputMask | XvImageMask; adaptor->flags = 0; adaptor->nEncodings = 1; adaptor->pEncodings = &encoding; adaptor->pFormats = Formats; adaptor->nFormats = NUM_FORMATS; adaptor->nPorts = 16; /* Some absurd number */ port_privates = xnfcalloc(adaptor->nPorts, sizeof(glamor_port_private)); adaptor->pPortPrivates = xnfcalloc(adaptor->nPorts, sizeof(glamor_port_private *)); for (i = 0; i < adaptor->nPorts; i++) { adaptor->pPortPrivates[i].ptr = &port_privates[i]; glamor_xv_init_port(&port_privates[i]); } adaptor->pAttributes = glamor_xv_attributes; adaptor->nAttributes = glamor_xv_num_attributes; adaptor->pImages = glamor_xv_images; adaptor->nImages = glamor_xv_num_images; adaptor->StopVideo = ephyr_glamor_xv_stop_video; adaptor->SetPortAttribute = ephyr_glamor_xv_set_port_attribute; adaptor->GetPortAttribute = ephyr_glamor_xv_get_port_attribute; adaptor->QueryBestSize = ephyr_glamor_xv_query_best_size; adaptor->PutImage = ephyr_glamor_xv_put_image; adaptor->QueryImageAttributes = ephyr_glamor_xv_query_image_attributes; KdXVScreenInit(screen, adaptor, 1); } xorg-server-21.1.16/hw/kdrive/ephyr/man/0000755000175000017500000000000014757411136013523 5xorg-server-21.1.16/hw/kdrive/ephyr/man/Makefile.am0000644000175000017500000000007214757411105015472 include $(top_srcdir)/manpages.am appman_PRE = Xephyr.man xorg-server-21.1.16/hw/kdrive/ephyr/man/Makefile.in0000644000175000017500000006311214757411115015510 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/kdrive/ephyr/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xephyr.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/ephyr/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/kdrive/ephyr/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/kdrive/ephyr/man/Xephyr.man0000644000175000017500000000616014757411105015416 .\" .\" Copyright (c) Matthieu Herrb .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, 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. .\" .TH Xephyr @appmansuffix@ @vendorversion@ .SH NAME Xephyr - X server outputting to a window on a pre-existing X display .SH SYNOPSIS .B Xephyr .RI [\fB:\fP display ] .RI [ option .IR ... ] .SH DESCRIPTION .B Xephyr is a kdrive server that outputs to a window on a pre-existing "host" X display. Think .I Xnest but with support for modern extensions like composite, damage and randr. .PP Unlike .I Xnest which is an X proxy, i.e. limited to the capabilities of the host X server, .B Xephyr is a real X server which uses the host X server window as "framebuffer" via fast SHM XImages. .PP It also has support for "visually" debugging what the server is painting. .SH OPTIONS The server accepts all the standard options of Xserver(@appmansuffix@) and the following additional options: .TP 8 .BI -screen " width" x height sets the screen size. .TP 8 .BI -parent " id" uses existing window .I id . If a .BI -screen argument follows a .BI -parent argument, this screen is embedded into the given window. .TP 8 .B -host-cursor set 'cursor acceleration': The host's cursor is reused. This is only really there to aid debugging by avoiding server paints for the cursor. Performance improvement is negligible. .TP 8 .B -resizeable Allow the Xephyr window to be resized, even if not embedded into a parent window. By default, the Xephyr window has a fixed size. .TP 8 .B -no-host-grab Disable grabbing the keyboard and mouse. .SH "SIGNALS" Send a SIGUSR1 to the server (e.g. pkill -USR1 Xephyr) to toggle the debugging mode. In this mode red rectangles are painted to screen areas getting painted before painting the actual content. The delay between this can be altered by setting a XEPHYR_PAUSE env var to a value in micro seconds. .SH CAVEATS .PP .IP \(bu 2 Rotated displays are currently updated via full blits. This is slower than a normal orientated display. Debug mode will therefore not be of much use rotated. .IP \(bu 2 The '-host-cursor' cursor is static in its appearance. .IP \(bu 2 The build gets a warning about 'nanosleep'. I think the various '-D' build flags are causing this. I haven't figured as yet how to work round it. It doesn't appear to break anything however. .IP \(bu 2 Keyboard handling is basic but works. .IP \(bu 2 Mouse button 5 probably won't work. .SH "SEE ALSO" X(@miscmansuffix@), Xserver(@appmansuffix@) .SH AUTHOR Matthew Allum 2004 xorg-server-21.1.16/hw/kdrive/src/0000755000175000017500000000000014757411136012410 5xorg-server-21.1.16/hw/kdrive/src/meson.build0000644000175000017500000000054714757411105014474 srcs_kdrive = [ 'kcmap.c', 'kdrive.c', 'kinfo.c', 'kinput.c', 'kshadow.c', '../../../mi/miinitext.c', '../../../mi/miinitext.h', ] if build_xv srcs_kdrive += 'kxv.c' endif kdrive = static_library('kdrive', srcs_kdrive, include_directories: inc, dependencies: common_dep, link_with: libxserver_miext_shadow, ) xorg-server-21.1.16/hw/kdrive/src/Makefile.am0000644000175000017500000000101614757411105014356 AM_CPPFLAGS = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H noinst_LTLIBRARIES = libkdrive.la if XV KDRIVE_XV_SOURCES = \ kxv.c \ kxv.h endif libkdrive_la_SOURCES = \ kcmap.c \ kdrive.c \ kdrive.h \ kinfo.c \ kinput.c \ kshadow.c \ $(KDRIVE_XV_SOURCES) \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h if CONFIG_UDEV libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la else if CONFIG_HAL libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la endif endif xorg-server-21.1.16/hw/kdrive/src/Makefile.in0000644000175000017500000006651614757411115014410 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/kdrive/src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@libkdrive_la_DEPENDENCIES = $(top_builddir)/config/libconfig.la @CONFIG_UDEV_TRUE@libkdrive_la_DEPENDENCIES = \ @CONFIG_UDEV_TRUE@ $(top_builddir)/config/libconfig.la am__libkdrive_la_SOURCES_DIST = kcmap.c kdrive.c kdrive.h kinfo.c \ kinput.c kshadow.c kxv.c kxv.h $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h @XV_TRUE@am__objects_1 = kxv.lo am_libkdrive_la_OBJECTS = kcmap.lo kdrive.lo kinfo.lo kinput.lo \ kshadow.lo $(am__objects_1) miinitext.lo libkdrive_la_OBJECTS = $(am_libkdrive_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/kcmap.Plo ./$(DEPDIR)/kdrive.Plo \ ./$(DEPDIR)/kinfo.Plo ./$(DEPDIR)/kinput.Plo \ ./$(DEPDIR)/kshadow.Plo ./$(DEPDIR)/kxv.Plo \ ./$(DEPDIR)/miinitext.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libkdrive_la_SOURCES) DIST_SOURCES = $(am__libkdrive_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ @KDRIVE_INCS@ \ @KDRIVE_CFLAGS@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H noinst_LTLIBRARIES = libkdrive.la @XV_TRUE@KDRIVE_XV_SOURCES = \ @XV_TRUE@ kxv.c \ @XV_TRUE@ kxv.h libkdrive_la_SOURCES = \ kcmap.c \ kdrive.c \ kdrive.h \ kinfo.c \ kinput.c \ kshadow.c \ $(KDRIVE_XV_SOURCES) \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h @CONFIG_HAL_TRUE@@CONFIG_UDEV_FALSE@libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la @CONFIG_UDEV_TRUE@libkdrive_la_LIBADD = $(top_builddir)/config/libconfig.la all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/kdrive/src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libkdrive.la: $(libkdrive_la_OBJECTS) $(libkdrive_la_DEPENDENCIES) $(EXTRA_libkdrive_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libkdrive_la_OBJECTS) $(libkdrive_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdrive.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinfo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinput.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kshadow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kxv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< miinitext.lo: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.lo -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/kcmap.Plo -rm -f ./$(DEPDIR)/kdrive.Plo -rm -f ./$(DEPDIR)/kinfo.Plo -rm -f ./$(DEPDIR)/kinput.Plo -rm -f ./$(DEPDIR)/kshadow.Plo -rm -f ./$(DEPDIR)/kxv.Plo -rm -f ./$(DEPDIR)/miinitext.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/kcmap.Plo -rm -f ./$(DEPDIR)/kdrive.Plo -rm -f ./$(DEPDIR)/kinfo.Plo -rm -f ./$(DEPDIR)/kinput.Plo -rm -f ./$(DEPDIR)/kshadow.Plo -rm -f ./$(DEPDIR)/kxv.Plo -rm -f ./$(DEPDIR)/miinitext.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/kdrive/src/kcmap.c0000644000175000017500000001612414757411105013567 /* * Copyright © 1999 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 #endif #include "kdrive.h" /* * Put the entire colormap into the DAC */ static void KdSetColormap(ScreenPtr pScreen) { KdScreenPriv(pScreen); ColormapPtr pCmap = pScreenPriv->pInstalledmap; Pixel pixels[KD_MAX_PSEUDO_SIZE]; xrgb colors[KD_MAX_PSEUDO_SIZE]; xColorItem defs[KD_MAX_PSEUDO_SIZE]; int i; if (!pScreenPriv->card->cfuncs->putColors) return; if (pScreenPriv->screen->fb.depth > KD_MAX_PSEUDO_DEPTH) return; if (!pScreenPriv->enabled) return; if (!pCmap) return; /* * Make DIX convert pixels into RGB values -- this handles * true/direct as well as pseudo/static visuals */ for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++) pixels[i] = i; QueryColors(pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors, serverClient); for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++) { defs[i].pixel = i; defs[i].red = colors[i].red; defs[i].green = colors[i].green; defs[i].blue = colors[i].blue; defs[i].flags = DoRed | DoGreen | DoBlue; } (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, (1 << pScreenPriv->screen->fb. depth), defs); } /* * When the hardware is enabled, save the hardware colors and store * the current colormap */ void KdEnableColormap(ScreenPtr pScreen) { KdScreenPriv(pScreen); int i; if (!pScreenPriv->card->cfuncs->putColors) return; if (pScreenPriv->screen->fb.depth <= KD_MAX_PSEUDO_DEPTH) { for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++) pScreenPriv->systemPalette[i].pixel = i; (*pScreenPriv->card->cfuncs->getColors) (pScreen, (1 << pScreenPriv->screen->fb. depth), pScreenPriv->systemPalette); } KdSetColormap(pScreen); } void KdDisableColormap(ScreenPtr pScreen) { KdScreenPriv(pScreen); if (!pScreenPriv->card->cfuncs->putColors) return; if (pScreenPriv->screen->fb.depth <= KD_MAX_PSEUDO_DEPTH) { (*pScreenPriv->card->cfuncs->putColors) (pScreen, (1 << pScreenPriv->screen->fb. depth), pScreenPriv->systemPalette); } } /* * KdInstallColormap * * This function is called when the server receives a request to install a * colormap or when the server needs to install one on its own, like when * there's no window manager running and the user has moved the pointer over * an X client window. It needs to build an identity Windows palette for the * colormap and realize it into the Windows system palette. */ void KdInstallColormap(ColormapPtr pCmap) { KdScreenPriv(pCmap->pScreen); if (pCmap == pScreenPriv->pInstalledmap) return; /* Tell X clients that the installed colormap is going away. */ if (pScreenPriv->pInstalledmap) WalkTree(pScreenPriv->pInstalledmap->pScreen, TellLostMap, (void *) &(pScreenPriv->pInstalledmap->mid)); /* Take note of the new installed colorscreen-> */ pScreenPriv->pInstalledmap = pCmap; KdSetColormap(pCmap->pScreen); /* Tell X clients of the new colormap */ WalkTree(pCmap->pScreen, TellGainedMap, (void *) &(pCmap->mid)); } /* * KdUninstallColormap * * This function uninstalls a colormap by either installing * the default X colormap or erasing the installed colormap pointer. * The default X colormap itself cannot be uninstalled. */ void KdUninstallColormap(ColormapPtr pCmap) { KdScreenPriv(pCmap->pScreen); Colormap defMapID; ColormapPtr defMap; /* ignore if not installed */ if (pCmap != pScreenPriv->pInstalledmap) return; /* ignore attempts to uninstall default colormap */ defMapID = pCmap->pScreen->defColormap; if ((Colormap) pCmap->mid == defMapID) return; /* install default */ dixLookupResourceByType((void **) &defMap, defMapID, RT_COLORMAP, serverClient, DixInstallAccess); if (defMap) (*pCmap->pScreen->InstallColormap) (defMap); else { /* uninstall and clear colormap pointer */ WalkTree(pCmap->pScreen, TellLostMap, (void *) &(pCmap->mid)); pScreenPriv->pInstalledmap = 0; } } int KdListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmaps) { KdScreenPriv(pScreen); int n = 0; if (pScreenPriv->pInstalledmap) { *pCmaps++ = pScreenPriv->pInstalledmap->mid; n++; } return n; } /* * KdStoreColors * * This function is called whenever the server receives a request to store * color values into one or more entries in the currently installed X * colormap; it can be either the default colormap or a private colorscreen-> */ void KdStoreColors(ColormapPtr pCmap, int ndef, xColorItem * pdefs) { KdScreenPriv(pCmap->pScreen); VisualPtr pVisual; xColorItem expanddefs[KD_MAX_PSEUDO_SIZE]; if (pCmap != pScreenPriv->pInstalledmap) return; if (!pScreenPriv->card->cfuncs->putColors) return; if (pScreenPriv->screen->fb.depth > KD_MAX_PSEUDO_DEPTH) return; if (!pScreenPriv->enabled) return; /* Check for DirectColor or TrueColor being simulated on a PseudoColor device. */ pVisual = pCmap->pVisual; if ((pVisual->class | DynamicClass) == DirectColor) { /* * Expand DirectColor or TrueColor color values into a PseudoColor * format. Defer to the Color Framebuffer (CFB) code to do that. */ ndef = fbExpandDirectColors(pCmap, ndef, pdefs, expanddefs); pdefs = expanddefs; } (*pScreenPriv->card->cfuncs->putColors) (pCmap->pScreen, ndef, pdefs); } xorg-server-21.1.16/hw/kdrive/src/kdrive.c0000644000175000017500000006615214757411105013766 /* * Copyright © 1999 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 #endif #include "kdrive.h" #include #include #include "privates.h" #ifdef RANDR #include #endif #include "glx_extinit.h" #ifdef XV #include "kxv.h" #endif #ifdef DPMSExtension #include "dpmsproc.h" #endif #ifdef HAVE_EXECINFO_H #include #endif #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) #include #endif /* This stub can be safely removed once we can * split input and GPU parts in hotplug.h et al. */ #include typedef struct _kdDepths { CARD8 depth; CARD8 bpp; } KdDepths; KdDepths kdDepths[] = { {1, 1}, {4, 4}, {8, 8}, {15, 16}, {16, 16}, {24, 32}, {32, 32} }; #define KD_DEFAULT_BUTTONS 5 DevPrivateKeyRec kdScreenPrivateKeyRec; static unsigned long kdGeneration; Bool kdEmulateMiddleButton; Bool kdRawPointerCoordinates; Bool kdDisableZaphod; static Bool kdEnabled; static int kdSubpixelOrder; static char *kdSwitchCmd; static DDXPointRec kdOrigin; Bool kdHasPointer = FALSE; Bool kdHasKbd = FALSE; const char *kdGlobalXkbRules = NULL; const char *kdGlobalXkbModel = NULL; const char *kdGlobalXkbLayout = NULL; const char *kdGlobalXkbVariant = NULL; const char *kdGlobalXkbOptions = NULL; void KdDisableScreen(ScreenPtr pScreen) { KdScreenPriv(pScreen); if (!pScreenPriv->enabled) return; if (!pScreenPriv->closed) SetRootClip(pScreen, ROOT_CLIP_NONE); KdDisableColormap(pScreen); if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->disableAccel) (*pScreenPriv->card->cfuncs->disableAccel) (pScreen); pScreenPriv->enabled = FALSE; } static void KdDoSwitchCmd(const char *reason) { if (kdSwitchCmd) { char *command; int ret; if (asprintf(&command, "%s %s", kdSwitchCmd, reason) == -1) return; /* Ignore the return value from system; I'm not sure * there's anything more useful to be done when * it fails */ ret = system(command); (void) ret; free(command); } } static void KdSuspend(void) { KdCardInfo *card; KdScreenInfo *screen; if (kdEnabled) { for (card = kdCardInfo; card; card = card->next) { for (screen = card->screenList; screen; screen = screen->next) if (screen->mynum == card->selected && screen->pScreen) KdDisableScreen(screen->pScreen); } KdDisableInput(); KdDoSwitchCmd("suspend"); } } static void KdDisableScreens(void) { KdSuspend(); kdEnabled = FALSE; } Bool KdEnableScreen(ScreenPtr pScreen) { KdScreenPriv(pScreen); if (pScreenPriv->enabled) return TRUE; pScreenPriv->enabled = TRUE; pScreenPriv->dpmsState = KD_DPMS_NORMAL; pScreenPriv->card->selected = pScreenPriv->screen->mynum; if (!pScreenPriv->screen->dumb && pScreenPriv->card->cfuncs->enableAccel) (*pScreenPriv->card->cfuncs->enableAccel) (pScreen); KdEnableColormap(pScreen); SetRootClip(pScreen, ROOT_CLIP_FULL); return TRUE; } void ddxGiveUp(enum ExitCode error) { KdDisableScreens(); } static Bool kdDumbDriver; static Bool kdSoftCursor; const char * KdParseFindNext(const char *cur, const char *delim, char *save, char *last) { while (*cur && !strchr(delim, *cur)) { *save++ = *cur++; } *save = 0; *last = *cur; if (*cur) cur++; return cur; } Rotation KdAddRotation(Rotation a, Rotation b) { Rotation rotate = (a & RR_Rotate_All) * (b & RR_Rotate_All); Rotation reflect = (a & RR_Reflect_All) ^ (b & RR_Reflect_All); if (rotate > RR_Rotate_270) rotate /= (RR_Rotate_270 * RR_Rotate_90); return reflect | rotate; } Rotation KdSubRotation(Rotation a, Rotation b) { Rotation rotate = (a & RR_Rotate_All) * 16 / (b & RR_Rotate_All); Rotation reflect = (a & RR_Reflect_All) ^ (b & RR_Reflect_All); if (rotate > RR_Rotate_270) rotate /= (RR_Rotate_270 * RR_Rotate_90); return reflect | rotate; } void KdParseScreen(KdScreenInfo * screen, const char *arg) { char delim; char save[1024]; int i; int pixels, mm; screen->dumb = kdDumbDriver; screen->softCursor = kdSoftCursor; screen->origin = kdOrigin; screen->randr = RR_Rotate_0; screen->x = 0; screen->y = 0; screen->width = 0; screen->height = 0; screen->width_mm = 0; screen->height_mm = 0; screen->subpixel_order = kdSubpixelOrder; screen->rate = 0; screen->fb.depth = 0; if (!arg) return; if (strlen(arg) >= sizeof(save)) return; for (i = 0; i < 2; i++) { arg = KdParseFindNext(arg, "x/+@XY", save, &delim); if (!save[0]) return; pixels = atoi(save); mm = 0; if (delim == '/') { arg = KdParseFindNext(arg, "x+@XY", save, &delim); if (!save[0]) return; mm = atoi(save); } if (i == 0) { screen->width = pixels; screen->width_mm = mm; } else { screen->height = pixels; screen->height_mm = mm; } if (delim != 'x' && delim != '+' && delim != '@' && delim != 'X' && delim != 'Y' && (delim != '\0' || i == 0)) return; } kdOrigin.x += screen->width; kdOrigin.y = 0; kdDumbDriver = FALSE; kdSoftCursor = FALSE; kdSubpixelOrder = SubPixelUnknown; if (delim == '+') { arg = KdParseFindNext(arg, "+@xXY", save, &delim); if (save[0]) screen->x = atoi(save); } if (delim == '+') { arg = KdParseFindNext(arg, "@xXY", save, &delim); if (save[0]) screen->y = atoi(save); } if (delim == '@') { arg = KdParseFindNext(arg, "xXY", save, &delim); if (save[0]) { int rotate = atoi(save); if (rotate < 45) screen->randr = RR_Rotate_0; else if (rotate < 135) screen->randr = RR_Rotate_90; else if (rotate < 225) screen->randr = RR_Rotate_180; else if (rotate < 315) screen->randr = RR_Rotate_270; else screen->randr = RR_Rotate_0; } } if (delim == 'X') { arg = KdParseFindNext(arg, "xY", save, &delim); screen->randr |= RR_Reflect_X; } if (delim == 'Y') { arg = KdParseFindNext(arg, "xY", save, &delim); screen->randr |= RR_Reflect_Y; } arg = KdParseFindNext(arg, "x/,", save, &delim); if (save[0]) { screen->fb.depth = atoi(save); if (delim == '/') { arg = KdParseFindNext(arg, "x,", save, &delim); if (save[0]) screen->fb.bitsPerPixel = atoi(save); } else screen->fb.bitsPerPixel = 0; } if (delim == 'x') { arg = KdParseFindNext(arg, "x", save, &delim); if (save[0]) screen->rate = atoi(save); } } static void KdParseRgba(char *rgba) { if (!strcmp(rgba, "rgb")) kdSubpixelOrder = SubPixelHorizontalRGB; else if (!strcmp(rgba, "bgr")) kdSubpixelOrder = SubPixelHorizontalBGR; else if (!strcmp(rgba, "vrgb")) kdSubpixelOrder = SubPixelVerticalRGB; else if (!strcmp(rgba, "vbgr")) kdSubpixelOrder = SubPixelVerticalBGR; else if (!strcmp(rgba, "none")) kdSubpixelOrder = SubPixelNone; else kdSubpixelOrder = SubPixelUnknown; } void KdUseMsg(void) { ErrorF("\nTinyX Device Dependent Usage:\n"); ErrorF ("-screen WIDTH[/WIDTHMM]xHEIGHT[/HEIGHTMM][+[-]XOFFSET][+[-]YOFFSET][@ROTATION][X][Y][xDEPTH/BPP[xFREQ]] Specify screen characteristics\n"); ErrorF ("-rgba rgb/bgr/vrgb/vbgr/none Specify subpixel ordering for LCD panels\n"); ErrorF ("-mouse driver [,n,,options] Specify the pointer driver and its options (n is the number of buttons)\n"); ErrorF ("-keybd driver [,,options] Specify the keyboard driver and its options\n"); ErrorF("-xkb-rules Set default XkbRules value (can be overridden by -keybd options)\n"); ErrorF("-xkb-model Set default XkbModel value (can be overridden by -keybd options)\n"); ErrorF("-xkb-layout Set default XkbLayout value (can be overridden by -keybd options)\n"); ErrorF("-xkb-variant Set default XkbVariant value (can be overridden by -keybd options)\n"); ErrorF("-xkb-options Set default XkbOptions value (can be overridden by -keybd options)\n"); ErrorF("-zaphod Disable cursor screen switching\n"); ErrorF("-2button Emulate 3 button mouse\n"); ErrorF("-3button Disable 3 button mouse emulation\n"); ErrorF ("-rawcoord Don't transform pointer coordinates on rotation\n"); ErrorF("-dumb Disable hardware acceleration\n"); ErrorF("-softCursor Force software cursor\n"); ErrorF("-videoTest Start the server, pause momentarily and exit\n"); ErrorF ("-origin X,Y Locates the next screen in the the virtual screen (Xinerama)\n"); ErrorF("-switchCmd Command to execute on vt switch\n"); ErrorF ("vtxx Use virtual terminal xx instead of the next available\n"); } int KdProcessArgument(int argc, char **argv, int i) { KdCardInfo *card; KdScreenInfo *screen; if (!strcmp(argv[i], "-screen")) { if ((i + 1) < argc) { card = KdCardInfoLast(); if (!card) { InitCard(0); card = KdCardInfoLast(); } if (card) { screen = KdScreenInfoAdd(card); KdParseScreen(screen, argv[i + 1]); } else ErrorF("No matching card found!\n"); } else UseMsg(); return 2; } if (!strcmp(argv[i], "-zaphod")) { kdDisableZaphod = TRUE; return 1; } if (!strcmp(argv[i], "-3button")) { kdEmulateMiddleButton = FALSE; return 1; } if (!strcmp(argv[i], "-2button")) { kdEmulateMiddleButton = TRUE; return 1; } if (!strcmp(argv[i], "-rawcoord")) { kdRawPointerCoordinates = 1; return 1; } if (!strcmp(argv[i], "-dumb")) { kdDumbDriver = TRUE; return 1; } if (!strcmp(argv[i], "-softCursor")) { kdSoftCursor = TRUE; return 1; } if (!strcmp(argv[i], "-origin")) { if ((i + 1) < argc) { char *x = argv[i + 1]; char *y = strchr(x, ','); if (x) kdOrigin.x = atoi(x); else kdOrigin.x = 0; if (y) kdOrigin.y = atoi(y + 1); else kdOrigin.y = 0; } else UseMsg(); return 2; } if (!strcmp(argv[i], "-rgba")) { if ((i + 1) < argc) KdParseRgba(argv[i + 1]); else UseMsg(); return 2; } if (!strcmp(argv[i], "-switchCmd")) { if ((i + 1) < argc) kdSwitchCmd = argv[i + 1]; else UseMsg(); return 2; } if (!strcmp(argv[i], "-xkb-rules")) { if (i + 1 >= argc) { UseMsg(); FatalError("Missing argument for option -xkb-rules.\n"); } kdGlobalXkbRules = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-xkb-model")) { if (i + 1 >= argc) { UseMsg(); FatalError("Missing argument for option -xkb-model.\n"); } kdGlobalXkbModel = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-xkb-layout")) { if (i + 1 >= argc) { UseMsg(); FatalError("Missing argument for option -xkb-layout.\n"); } kdGlobalXkbLayout = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-xkb-variant")) { if (i + 1 >= argc) { UseMsg(); FatalError("Missing argument for option -xkb-variant.\n"); } kdGlobalXkbVariant = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-xkb-options")) { if (i + 1 >= argc) { UseMsg(); FatalError("Missing argument for option -xkb-options.\n"); } kdGlobalXkbOptions = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-mouse") || !strcmp(argv[i], "-pointer")) { if (i + 1 >= argc) UseMsg(); KdAddConfigPointer(argv[i + 1]); kdHasPointer = TRUE; return 2; } if (!strcmp(argv[i], "-keybd")) { if (i + 1 >= argc) UseMsg(); KdAddConfigKeyboard(argv[i + 1]); kdHasKbd = TRUE; return 2; } return 0; } static Bool KdAllocatePrivates(ScreenPtr pScreen) { KdPrivScreenPtr pScreenPriv; if (kdGeneration != serverGeneration) kdGeneration = serverGeneration; if (!dixRegisterPrivateKey(&kdScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; pScreenPriv = calloc(1, sizeof(*pScreenPriv)); if (!pScreenPriv) return FALSE; KdSetScreenPriv(pScreen, pScreenPriv); return TRUE; } static Bool KdCreateScreenResources(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdCardInfo *card = pScreenPriv->card; Bool ret; pScreen->CreateScreenResources = pScreenPriv->CreateScreenResources; if (pScreen->CreateScreenResources) ret = (*pScreen->CreateScreenResources) (pScreen); else ret = -1; pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = KdCreateScreenResources; if (ret && card->cfuncs->createRes) ret = (*card->cfuncs->createRes) (pScreen); return ret; } static Bool KdCloseScreen(ScreenPtr pScreen) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; KdCardInfo *card = pScreenPriv->card; Bool ret; if (card->cfuncs->closeScreen) (*card->cfuncs->closeScreen)(pScreen); pScreenPriv->closed = TRUE; pScreen->CloseScreen = pScreenPriv->CloseScreen; if (pScreen->CloseScreen) ret = (*pScreen->CloseScreen) (pScreen); else ret = TRUE; if (screen->mynum == card->selected) KdDisableScreen(pScreen); if (!pScreenPriv->screen->dumb && card->cfuncs->finiAccel) (*card->cfuncs->finiAccel) (pScreen); if (card->cfuncs->scrfini) (*card->cfuncs->scrfini) (screen); /* * Clean up card when last screen is closed, DIX closes them in * reverse order, thus we check for when the first in the list is closed */ if (screen == card->screenList) { if (card->cfuncs->cardfini) (*card->cfuncs->cardfini) (card); /* * Clean up OS when last card is closed */ if (card == kdCardInfo) { kdEnabled = FALSE; } } pScreenPriv->screen->pScreen = 0; free((void *) pScreenPriv); return ret; } static Bool KdSaveScreen(ScreenPtr pScreen, int on) { return FALSE; } static Bool KdCreateWindow(WindowPtr pWin) { #ifndef PHOENIX if (!pWin->parent) { KdScreenPriv(pWin->drawable.pScreen); if (!pScreenPriv->enabled) { RegionEmpty(&pWin->borderClip); RegionBreak(&pWin->clipList); } } #endif return fbCreateWindow(pWin); } void KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; int subpixel_order = screen->subpixel_order; Rotation subpixel_dir; int i; static struct { int subpixel_order; Rotation direction; } orders[] = { {SubPixelHorizontalRGB, RR_Rotate_0}, {SubPixelHorizontalBGR, RR_Rotate_180}, {SubPixelVerticalRGB, RR_Rotate_270}, {SubPixelVerticalBGR, RR_Rotate_90}, }; static struct { int bit; int normal; int reflect; } reflects[] = { {RR_Reflect_X, SubPixelHorizontalRGB, SubPixelHorizontalBGR}, {RR_Reflect_X, SubPixelHorizontalBGR, SubPixelHorizontalRGB}, {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalBGR}, {RR_Reflect_Y, SubPixelVerticalRGB, SubPixelVerticalRGB}, }; /* map subpixel to direction */ for (i = 0; i < 4; i++) if (orders[i].subpixel_order == subpixel_order) break; if (i < 4) { subpixel_dir = KdAddRotation(randr & RR_Rotate_All, orders[i].direction); /* map back to subpixel order */ for (i = 0; i < 4; i++) if (orders[i].direction & subpixel_dir) { subpixel_order = orders[i].subpixel_order; break; } /* reflect */ for (i = 0; i < 4; i++) if ((randr & reflects[i].bit) && reflects[i].normal == subpixel_order) { subpixel_order = reflects[i].reflect; break; } } PictureSetSubpixelOrder(pScreen, subpixel_order); } /* Pass through AddScreen, which doesn't take any closure */ static KdScreenInfo *kdCurrentScreen; static Bool KdScreenInit(ScreenPtr pScreen, int argc, char **argv) { KdScreenInfo *screen = kdCurrentScreen; KdCardInfo *card = screen->card; KdPrivScreenPtr pScreenPriv; /* * note that screen->fb is set up for the nominal orientation * of the screen; that means if randr is rotated, the values * there should reflect a rotated frame buffer (or shadow). */ Bool rotated = (screen->randr & (RR_Rotate_90 | RR_Rotate_270)) != 0; int width, height, *width_mmp, *height_mmp; KdAllocatePrivates(pScreen); pScreenPriv = KdGetScreenPriv(pScreen); if (!rotated) { width = screen->width; height = screen->height; width_mmp = &screen->width_mm; height_mmp = &screen->height_mm; } else { width = screen->height; height = screen->width; width_mmp = &screen->height_mm; height_mmp = &screen->width_mm; } screen->pScreen = pScreen; pScreenPriv->screen = screen; pScreenPriv->card = card; pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3; pScreenPriv->dpmsState = KD_DPMS_NORMAL; pScreen->x = screen->origin.x; pScreen->y = screen->origin.y; if (!monitorResolution) monitorResolution = 75; /* * This is done in this order so that backing store wraps * our GC functions; fbFinishScreenInit initializes MI * backing store */ if (!fbSetupScreen(pScreen, screen->fb.frameBuffer, width, height, monitorResolution, monitorResolution, screen->fb.pixelStride, screen->fb.bitsPerPixel)) { return FALSE; } /* * Set colormap functions */ pScreen->InstallColormap = KdInstallColormap; pScreen->UninstallColormap = KdUninstallColormap; pScreen->ListInstalledColormaps = KdListInstalledColormaps; pScreen->StoreColors = KdStoreColors; pScreen->SaveScreen = KdSaveScreen; pScreen->CreateWindow = KdCreateWindow; if (!fbFinishScreenInit(pScreen, screen->fb.frameBuffer, width, height, monitorResolution, monitorResolution, screen->fb.pixelStride, screen->fb.bitsPerPixel)) { return FALSE; } /* * Fix screen sizes; for some reason mi takes dpi instead of mm. * Rounding errors are annoying */ if (*width_mmp) pScreen->mmWidth = *width_mmp; else *width_mmp = pScreen->mmWidth; if (*height_mmp) pScreen->mmHeight = *height_mmp; else *height_mmp = pScreen->mmHeight; /* * Plug in our own block/wakeup handlers. * miScreenInit installs NoopDDA in both places */ pScreen->BlockHandler = KdBlockHandler; pScreen->WakeupHandler = KdWakeupHandler; if (!fbPictureInit(pScreen, 0, 0)) return FALSE; if (card->cfuncs->initScreen) if (!(*card->cfuncs->initScreen) (pScreen)) return FALSE; if (!screen->dumb && card->cfuncs->initAccel) if (!(*card->cfuncs->initAccel) (pScreen)) screen->dumb = TRUE; if (card->cfuncs->finishInitScreen) if (!(*card->cfuncs->finishInitScreen) (pScreen)) return FALSE; /* * Wrap CloseScreen, the order now is: * KdCloseScreen * fbCloseScreen */ pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = KdCloseScreen; pScreenPriv->CreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = KdCreateScreenResources; if (screen->softCursor || !card->cfuncs->initCursor || !(*card->cfuncs->initCursor) (pScreen)) { /* Use MI for cursor display and event queueing. */ screen->softCursor = TRUE; miDCInitialize(pScreen, &kdPointerScreenFuncs); } if (!fbCreateDefColormap(pScreen)) { return FALSE; } KdSetSubpixelOrder(pScreen, screen->randr); /* * Enable the hardware */ kdEnabled = TRUE; if (screen->mynum == card->selected) { pScreenPriv->enabled = TRUE; KdEnableColormap(pScreen); if (!screen->dumb && card->cfuncs->enableAccel) (*card->cfuncs->enableAccel) (pScreen); } return TRUE; } static void KdInitScreen(ScreenInfo * pScreenInfo, KdScreenInfo * screen, int argc, char **argv) { KdCardInfo *card = screen->card; if (!(*card->cfuncs->scrinit) (screen)) FatalError("Screen initialization failed!\n"); if (!card->cfuncs->initAccel) screen->dumb = TRUE; if (!card->cfuncs->initCursor) screen->softCursor = TRUE; } static Bool KdSetPixmapFormats(ScreenInfo * pScreenInfo) { CARD8 depthToBpp[33]; /* depth -> bpp map */ KdCardInfo *card; KdScreenInfo *screen; int i; int bpp; PixmapFormatRec *format; for (i = 1; i <= 32; i++) depthToBpp[i] = 0; /* * Generate mappings between bitsPerPixel and depth, * also ensure that all screens comply with protocol * restrictions on equivalent formats for the same * depth on different screens */ for (card = kdCardInfo; card; card = card->next) { for (screen = card->screenList; screen; screen = screen->next) { bpp = screen->fb.bitsPerPixel; if (bpp == 24) bpp = 32; if (!depthToBpp[screen->fb.depth]) depthToBpp[screen->fb.depth] = bpp; else if (depthToBpp[screen->fb.depth] != bpp) return FALSE; } } /* * Fill in additional formats */ for (i = 0; i < ARRAY_SIZE(kdDepths); i++) if (!depthToBpp[kdDepths[i].depth]) depthToBpp[kdDepths[i].depth] = kdDepths[i].bpp; pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; pScreenInfo->numPixmapFormats = 0; for (i = 1; i <= 32; i++) { if (depthToBpp[i]) { format = &pScreenInfo->formats[pScreenInfo->numPixmapFormats++]; format->depth = i; format->bitsPerPixel = depthToBpp[i]; format->scanlinePad = BITMAP_SCANLINE_PAD; } } return TRUE; } static void KdAddScreen(ScreenInfo * pScreenInfo, KdScreenInfo * screen, int argc, char **argv) { int i; /* * Fill in fb visual type masks for this screen */ for (i = 0; i < pScreenInfo->numPixmapFormats; i++) { unsigned long visuals; Pixel rm, gm, bm; visuals = 0; rm = gm = bm = 0; if (pScreenInfo->formats[i].depth == screen->fb.depth) { visuals = screen->fb.visuals; rm = screen->fb.redMask; gm = screen->fb.greenMask; bm = screen->fb.blueMask; } fbSetVisualTypesAndMasks(pScreenInfo->formats[i].depth, visuals, 8, rm, gm, bm); } kdCurrentScreen = screen; AddScreen(KdScreenInit, argc, argv); } void KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) { KdCardInfo *card; KdScreenInfo *screen; if (!kdCardInfo) { InitCard(0); if (!(card = KdCardInfoLast())) FatalError("No matching cards found!\n"); screen = KdScreenInfoAdd(card); KdParseScreen(screen, 0); } /* * Initialize all of the screens for all of the cards */ for (card = kdCardInfo; card; card = card->next) { int ret = 1; if (card->cfuncs->cardinit) ret = (*card->cfuncs->cardinit) (card); if (ret) { for (screen = card->screenList; screen; screen = screen->next) KdInitScreen(pScreenInfo, screen, argc, argv); } } /* * Merge the various pixmap formats together, this can fail * when two screens share depth but not bitsPerPixel */ if (!KdSetPixmapFormats(pScreenInfo)) return; /* * Add all of the screens */ for (card = kdCardInfo; card; card = card->next) for (screen = card->screenList; screen; screen = screen->next) KdAddScreen(pScreenInfo, screen, argc, argv); xorgGlxCreateVendor(); #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) if (SeatId) /* Enable input hot-plugging */ config_pre_init(); #endif } void OsVendorFatalError(const char *f, va_list args) { } /* These stubs can be safely removed once we can * split input and GPU parts in hotplug.h et al. */ #ifdef CONFIG_UDEV_KMS void NewGPUDeviceRequest(struct OdevAttributes *attribs) { } void DeleteGPUDeviceRequest(struct OdevAttributes *attribs) { } #endif #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) struct xf86_platform_device * xf86_find_platform_device_by_devnum(int major, int minor) { return NULL; } #endif #ifdef SYSTEMD_LOGIND void systemd_logind_vtenter(void) { } void systemd_logind_release_fd(int major, int minor, int fd) { close(fd); } #endif xorg-server-21.1.16/hw/kdrive/src/kdrive.h0000644000175000017500000002457214757411105013773 /* * Copyright © 1999 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. */ #ifndef _KDRIVE_H_ #define _KDRIVE_H_ #include #include #include #include #include #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "servermd.h" #include "colormapst.h" #include "gcstruct.h" #include "input.h" #include "mipointer.h" #include "mi.h" #include "dix.h" #include "fb.h" #include "fboverlay.h" #include "shadow.h" #include "randrstr.h" #include "globals.h" #include "xkbstr.h" #define KD_DPMS_NORMAL 0 #define KD_DPMS_STANDBY 1 #define KD_DPMS_SUSPEND 2 #define KD_DPMS_POWERDOWN 3 #define KD_DPMS_MAX KD_DPMS_POWERDOWN #define Status int typedef struct _KdCardInfo { struct _KdCardFuncs *cfuncs; void *closure; void *driver; struct _KdScreenInfo *screenList; int selected; struct _KdCardInfo *next; } KdCardInfo; extern KdCardInfo *kdCardInfo; /* * Configuration information per X screen */ typedef struct _KdFrameBuffer { CARD8 *frameBuffer; int depth; int bitsPerPixel; int pixelStride; int byteStride; Bool shadow; unsigned long visuals; Pixel redMask, greenMask, blueMask; void *closure; } KdFrameBuffer; #define RR_Rotate_All (RR_Rotate_0|RR_Rotate_90|RR_Rotate_180|RR_Rotate_270) #define RR_Reflect_All (RR_Reflect_X|RR_Reflect_Y) typedef struct _KdScreenInfo { struct _KdScreenInfo *next; KdCardInfo *card; ScreenPtr pScreen; void *driver; Rotation randr; /* rotation and reflection */ int x; int y; int width; int height; int rate; int width_mm; int height_mm; int subpixel_order; Bool dumb; Bool softCursor; int mynum; DDXPointRec origin; KdFrameBuffer fb; } KdScreenInfo; typedef struct _KdCardFuncs { Bool (*cardinit) (KdCardInfo *); /* detect and map device */ Bool (*scrinit) (KdScreenInfo *); /* initialize screen information */ Bool (*initScreen) (ScreenPtr); /* initialize ScreenRec */ Bool (*finishInitScreen) (ScreenPtr pScreen); Bool (*createRes) (ScreenPtr); /* create screen resources */ void (*scrfini) (KdScreenInfo *); /* close down screen */ void (*cardfini) (KdCardInfo *); /* close down */ Bool (*initCursor) (ScreenPtr); /* detect and map cursor */ Bool (*initAccel) (ScreenPtr); void (*enableAccel) (ScreenPtr); void (*disableAccel) (ScreenPtr); void (*finiAccel) (ScreenPtr); void (*getColors) (ScreenPtr, int, xColorItem *); void (*putColors) (ScreenPtr, int, xColorItem *); void (*closeScreen) (ScreenPtr); /* close ScreenRec */ } KdCardFuncs; #define KD_MAX_PSEUDO_DEPTH 8 #define KD_MAX_PSEUDO_SIZE (1 << KD_MAX_PSEUDO_DEPTH) typedef struct { KdScreenInfo *screen; KdCardInfo *card; Bool enabled; Bool closed; int bytesPerPixel; int dpmsState; ColormapPtr pInstalledmap; /* current colormap */ xColorItem systemPalette[KD_MAX_PSEUDO_SIZE]; /* saved windows colors */ CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; } KdPrivScreenRec, *KdPrivScreenPtr; typedef enum _kdPointerState { start, button_1_pend, button_1_down, button_2_down, button_3_pend, button_3_down, synth_2_down_13, synth_2_down_3, synth_2_down_1, num_input_states } KdPointerState; #define KD_MAX_BUTTON 32 #define KD_KEYBOARD 1 #define KD_MOUSE 2 #define KD_TOUCHSCREEN 3 typedef struct _KdPointerInfo KdPointerInfo; typedef struct _KdPointerDriver { const char *name; Status(*Init) (KdPointerInfo *); Status(*Enable) (KdPointerInfo *); void (*Disable) (KdPointerInfo *); void (*Fini) (KdPointerInfo *); struct _KdPointerDriver *next; } KdPointerDriver; struct _KdPointerInfo { DeviceIntPtr dixdev; char *name; char *path; char *protocol; InputOption *options; int inputClass; CARD8 map[KD_MAX_BUTTON + 1]; int nButtons; int nAxes; Bool emulateMiddleButton; unsigned long emulationTimeout; int emulationDx, emulationDy; Bool timeoutPending; KdPointerState mouseState; Bool eventHeld; struct { int type; int x; int y; int z; int flags; int absrel; } heldEvent; unsigned char buttonState; Bool transformCoordinates; int pressureThreshold; KdPointerDriver *driver; void *driverPrivate; struct _KdPointerInfo *next; }; void KdAddPointerDriver(KdPointerDriver * driver); void KdRemovePointerDriver(KdPointerDriver * driver); KdPointerInfo *KdNewPointer(void); void KdFreePointer(KdPointerInfo *); int KdAddPointer(KdPointerInfo * ki); int KdAddConfigPointer(char *pointer); void KdRemovePointer(KdPointerInfo * ki); #define KD_KEY_COUNT 248 #define KD_MIN_KEYCODE 8 #define KD_MAX_KEYCODE 255 #define KD_MAX_WIDTH 4 #define KD_MAX_LENGTH (KD_MAX_KEYCODE - KD_MIN_KEYCODE + 1) typedef struct { KeySym modsym; int modbit; } KdKeySymModsRec; typedef struct _KdKeyboardInfo KdKeyboardInfo; typedef struct _KdKeyboardDriver { const char *name; Bool (*Init) (KdKeyboardInfo *); Bool (*Enable) (KdKeyboardInfo *); void (*Leds) (KdKeyboardInfo *, int); void (*Bell) (KdKeyboardInfo *, int, int, int); void (*Disable) (KdKeyboardInfo *); void (*Fini) (KdKeyboardInfo *); struct _KdKeyboardDriver *next; } KdKeyboardDriver; struct _KdKeyboardInfo { struct _KdKeyboardInfo *next; DeviceIntPtr dixdev; void *closure; char *name; char *path; int inputClass; char *xkbRules; char *xkbModel; char *xkbLayout; char *xkbVariant; char *xkbOptions; int LockLed; int minScanCode; int maxScanCode; int leds; int bellPitch; int bellDuration; InputOption *options; KdKeyboardDriver *driver; void *driverPrivate; }; void KdAddKeyboardDriver(KdKeyboardDriver * driver); void KdRemoveKeyboardDriver(KdKeyboardDriver * driver); KdKeyboardInfo *KdNewKeyboard(void); void KdFreeKeyboard(KdKeyboardInfo * ki); int KdAddConfigKeyboard(char *pointer); int KdAddKeyboard(KdKeyboardInfo * ki); void KdRemoveKeyboard(KdKeyboardInfo * ki); typedef struct _KdPointerMatrix { int matrix[2][3]; } KdPointerMatrix; extern DevPrivateKeyRec kdScreenPrivateKeyRec; #define kdScreenPrivateKey (&kdScreenPrivateKeyRec) extern Bool kdEmulateMiddleButton; extern Bool kdDisableZaphod; #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey)) #define KdSetScreenPriv(pScreen,v) \ dixSetPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey, v) #define KdScreenPriv(pScreen) KdPrivScreenPtr pScreenPriv = KdGetScreenPriv(pScreen) /* kcmap.c */ void KdEnableColormap(ScreenPtr pScreen); void KdDisableColormap(ScreenPtr pScreen); void KdInstallColormap(ColormapPtr pCmap); void KdUninstallColormap(ColormapPtr pCmap); int KdListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmaps); void KdStoreColors(ColormapPtr pCmap, int ndef, xColorItem * pdefs); /* kdrive.c */ extern miPointerScreenFuncRec kdPointerScreenFuncs; void KdDisableScreen(ScreenPtr pScreen); Bool KdEnableScreen(ScreenPtr pScreen); void KdEnableScreens(void); void KdProcessSwitch(void); Rotation KdAddRotation(Rotation a, Rotation b); Rotation KdSubRotation(Rotation a, Rotation b); void KdParseScreen(KdScreenInfo * screen, const char *arg); const char * KdParseFindNext(const char *cur, const char *delim, char *save, char *last); void KdUseMsg(void); int KdProcessArgument(int argc, char **argv, int i); void KdOsAddInputDrivers(void); void KdInitCard(ScreenInfo * pScreenInfo, KdCardInfo * card, int argc, char **argv); void KdInitOutput(ScreenInfo * pScreenInfo, int argc, char **argv); void KdSetSubpixelOrder(ScreenPtr pScreen, Rotation randr); void KdBacktrace(int signum); /* kinfo.c */ KdCardInfo *KdCardInfoAdd(KdCardFuncs * funcs, void *closure); KdCardInfo *KdCardInfoLast(void); void KdCardInfoDispose(KdCardInfo * ci); KdScreenInfo *KdScreenInfoAdd(KdCardInfo * ci); void KdScreenInfoDispose(KdScreenInfo * si); /* kinput.c */ void KdInitInput(void); void KdCloseInput(void); void KdEnqueueKeyboardEvent(KdKeyboardInfo * ki, unsigned char scan_code, unsigned char is_up); #define KD_BUTTON_1 0x01 #define KD_BUTTON_2 0x02 #define KD_BUTTON_3 0x04 #define KD_BUTTON_4 0x08 #define KD_BUTTON_5 0x10 #define KD_BUTTON_8 0x80 #define KD_POINTER_DESKTOP 0x40000000 #define KD_MOUSE_DELTA 0x80000000 void KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry, int rz); void KdSetPointerMatrix(KdPointerMatrix *pointer); void KdComputePointerMatrix(KdPointerMatrix *pointer, Rotation randr, int width, int height); void KdBlockHandler(ScreenPtr pScreen, void *timeout); void KdWakeupHandler(ScreenPtr pScreen, int result); void KdDisableInput(void); void KdEnableInput(void); /* kshadow.c */ Bool KdShadowFbAlloc(KdScreenInfo * screen, Bool rotate); void KdShadowFbFree(KdScreenInfo * screen); Bool KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindowProc window); void KdShadowUnset(ScreenPtr pScreen); /* function prototypes to be implemented by the drivers */ void InitCard(char *name); #endif /* _KDRIVE_H_ */ xorg-server-21.1.16/hw/kdrive/src/kinfo.c0000644000175000017500000000712714757411105013605 /* * Copyright © 1999 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 #endif #include "kdrive.h" KdCardInfo *kdCardInfo; KdCardInfo * KdCardInfoAdd(KdCardFuncs * funcs, void *closure) { KdCardInfo *ci, **prev; ci = calloc(1, sizeof(KdCardInfo)); if (!ci) return 0; for (prev = &kdCardInfo; *prev; prev = &(*prev)->next); *prev = ci; ci->cfuncs = funcs; ci->closure = closure; ci->screenList = 0; ci->selected = 0; ci->next = 0; return ci; } KdCardInfo * KdCardInfoLast(void) { KdCardInfo *ci; if (!kdCardInfo) return 0; for (ci = kdCardInfo; ci->next; ci = ci->next); return ci; } void KdCardInfoDispose(KdCardInfo * ci) { KdCardInfo **prev; for (prev = &kdCardInfo; *prev; prev = &(*prev)->next) if (*prev == ci) { *prev = ci->next; free(ci); break; } } KdScreenInfo * KdScreenInfoAdd(KdCardInfo * ci) { KdScreenInfo *si, **prev; int n; si = calloc(1, sizeof(KdScreenInfo)); if (!si) return 0; for (prev = &ci->screenList, n = 0; *prev; prev = &(*prev)->next, n++); *prev = si; si->next = 0; si->card = ci; si->mynum = n; return si; } void KdScreenInfoDispose(KdScreenInfo * si) { KdCardInfo *ci = si->card; KdScreenInfo **prev; for (prev = &ci->screenList; *prev; prev = &(*prev)->next) { if (*prev == si) { *prev = si->next; free(si); if (!ci->screenList) KdCardInfoDispose(ci); break; } } } KdPointerInfo * KdNewPointer(void) { KdPointerInfo *pi; int i; pi = (KdPointerInfo *) calloc(1, sizeof(KdPointerInfo)); if (!pi) return NULL; pi->name = strdup("Generic Pointer"); pi->path = NULL; pi->inputClass = KD_MOUSE; pi->driver = NULL; pi->driverPrivate = NULL; pi->next = NULL; pi->options = NULL; pi->nAxes = 3; pi->nButtons = KD_MAX_BUTTON; for (i = 1; i < KD_MAX_BUTTON; i++) pi->map[i] = i; return pi; } void KdFreePointer(KdPointerInfo * pi) { free(pi->name); free(pi->path); input_option_free_list(&pi->options); pi->next = NULL; free(pi); } void KdFreeKeyboard(KdKeyboardInfo * ki) { free(ki->name); free(ki->path); free(ki->xkbRules); free(ki->xkbModel); free(ki->xkbLayout); free(ki->xkbVariant); free(ki->xkbOptions); input_option_free_list(&ki->options); ki->next = NULL; free(ki); } xorg-server-21.1.16/hw/kdrive/src/kinput.c0000644000175000017500000015571114757411105014014 /* * Copyright © 1999 Keith Packard * Copyright © 2006 Nokia Corporation * * 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 the authors not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. The authors make no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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 #include #endif #include "kdrive.h" #include "inputstr.h" #define XK_PUBLISHING #include #if HAVE_X11_XF86KEYSYM_H #include #endif #include #ifdef __sun #include /* needed for FNONBLOCK & FASYNC */ #endif #include "xkbsrv.h" #include #include #include "XIstubs.h" /* even though we don't use stubs. cute, no? */ #include "exevents.h" #include "extinit.h" #include "exglobals.h" #include "eventstr.h" #include "xserver-properties.h" #include "inpututils.h" #include "optionstr.h" #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) #include #endif #define AtomFromName(x) MakeAtom(x, strlen(x), 1) struct KdConfigDevice { char *line; struct KdConfigDevice *next; }; /* kdKeyboards and kdPointers hold all the real devices. */ static KdKeyboardInfo *kdKeyboards = NULL; static KdPointerInfo *kdPointers = NULL; static struct KdConfigDevice *kdConfigKeyboards = NULL; static struct KdConfigDevice *kdConfigPointers = NULL; static KdKeyboardDriver *kdKeyboardDrivers = NULL; static KdPointerDriver *kdPointerDrivers = NULL; static Bool kdInputEnabled; static Bool kdOffScreen; static unsigned long kdOffScreenTime; static KdPointerMatrix kdPointerMatrix = { {{1, 0, 0}, {0, 1, 0}} }; extern Bool kdRawPointerCoordinates; extern const char *kdGlobalXkbRules; extern const char *kdGlobalXkbModel; extern const char *kdGlobalXkbLayout; extern const char *kdGlobalXkbVariant; extern const char *kdGlobalXkbOptions; #ifdef FNONBLOCK #define NOBLOCK FNONBLOCK #else #define NOBLOCK FNDELAY #endif static void KdResetInputMachine(void) { KdPointerInfo *pi; for (pi = kdPointers; pi; pi = pi->next) { pi->mouseState = start; pi->eventHeld = FALSE; } } void KdDisableInput(void) { KdKeyboardInfo *ki; KdPointerInfo *pi; input_lock(); for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->driver && ki->driver->Disable) (*ki->driver->Disable) (ki); } for (pi = kdPointers; pi; pi = pi->next) { if (pi->driver && pi->driver->Disable) (*pi->driver->Disable) (pi); } kdInputEnabled = FALSE; } void KdEnableInput(void) { InternalEvent ev; KdKeyboardInfo *ki; KdPointerInfo *pi; kdInputEnabled = TRUE; ev.any.time = GetTimeInMillis(); for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->driver && ki->driver->Enable) (*ki->driver->Enable) (ki); /* reset screen saver */ NoticeEventTime (&ev, ki->dixdev); } for (pi = kdPointers; pi; pi = pi->next) { if (pi->driver && pi->driver->Enable) (*pi->driver->Enable) (pi); /* reset screen saver */ NoticeEventTime (&ev, pi->dixdev); } input_unlock(); } static KdKeyboardDriver * KdFindKeyboardDriver(const char *name) { KdKeyboardDriver *ret; /* ask a stupid question ... */ if (!name) return NULL; for (ret = kdKeyboardDrivers; ret; ret = ret->next) { if (strcmp(ret->name, name) == 0) return ret; } return NULL; } static KdPointerDriver * KdFindPointerDriver(const char *name) { KdPointerDriver *ret; /* ask a stupid question ... */ if (!name) return NULL; for (ret = kdPointerDrivers; ret; ret = ret->next) { if (strcmp(ret->name, name) == 0) return ret; } return NULL; } static int KdPointerProc(DeviceIntPtr pDevice, int onoff) { DevicePtr pDev = (DevicePtr) pDevice; KdPointerInfo *pi; Atom xiclass; Atom *btn_labels; Atom *axes_labels; if (!pDev) return BadImplementation; for (pi = kdPointers; pi; pi = pi->next) { if (pi->dixdev && pi->dixdev->id == pDevice->id) break; } if (!pi || !pi->dixdev || pi->dixdev->id != pDevice->id) { ErrorF("[KdPointerProc] Failed to find pointer for device %d!\n", pDevice->id); return BadImplementation; } switch (onoff) { case DEVICE_INIT: #ifdef DEBUG ErrorF("initialising pointer %s ...\n", pi->name); #endif if (!pi->driver) { if (!pi->driverPrivate) { ErrorF("no driver specified for pointer device \"%s\" (%s)\n", pi->name ? pi->name : "(unnamed)", pi->path); return BadImplementation; } pi->driver = KdFindPointerDriver(pi->driverPrivate); if (!pi->driver) { ErrorF("Couldn't find pointer driver %s\n", pi->driverPrivate ? (char *) pi->driverPrivate : "(unnamed)"); return !Success; } free(pi->driverPrivate); pi->driverPrivate = NULL; } if (!pi->driver->Init) { ErrorF("no init function\n"); return BadImplementation; } if ((*pi->driver->Init) (pi) != Success) { return !Success; } btn_labels = calloc(pi->nButtons, sizeof(Atom)); if (!btn_labels) return BadAlloc; axes_labels = calloc(pi->nAxes, sizeof(Atom)); if (!axes_labels) { free(btn_labels); return BadAlloc; } switch (pi->nAxes) { default: case 7: btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); case 6: btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); case 5: btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); case 4: btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); case 3: btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); case 2: btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); case 1: btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); case 0: break; } if (pi->nAxes >= 2) { axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); } InitPointerDeviceStruct(pDev, pi->map, pi->nButtons, btn_labels, (PtrCtrlProcPtr) NoopDDA, GetMotionHistorySize(), pi->nAxes, axes_labels); free(btn_labels); free(axes_labels); if (pi->inputClass == KD_TOUCHSCREEN) { xiclass = AtomFromName(XI_TOUCHSCREEN); } else { xiclass = AtomFromName(XI_MOUSE); } AssignTypeAndName(pi->dixdev, xiclass, pi->name ? pi->name : "Generic KDrive Pointer"); return Success; case DEVICE_ON: if (pDev->on == TRUE) return Success; if (!pi->driver->Enable) { ErrorF("no enable function\n"); return BadImplementation; } if ((*pi->driver->Enable) (pi) == Success) { pDev->on = TRUE; return Success; } else { return BadImplementation; } return Success; case DEVICE_OFF: if (pDev->on == FALSE) { return Success; } if (!pi->driver->Disable) { return BadImplementation; } else { (*pi->driver->Disable) (pi); pDev->on = FALSE; return Success; } return Success; case DEVICE_CLOSE: if (pDev->on) { if (!pi->driver->Disable) { return BadImplementation; } (*pi->driver->Disable) (pi); pDev->on = FALSE; } if (!pi->driver->Fini) return BadImplementation; (*pi->driver->Fini) (pi); KdRemovePointer(pi); return Success; } /* NOTREACHED */ return BadImplementation; } static void KdRingBell(KdKeyboardInfo * ki, int volume, int pitch, int duration) { if (!ki || !ki->driver || !ki->driver->Bell) return; if (kdInputEnabled) (*ki->driver->Bell) (ki, volume, pitch, duration); } static void KdBell(int volume, DeviceIntPtr pDev, void *arg, int something) { KeybdCtrl *ctrl = arg; KdKeyboardInfo *ki = NULL; for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->dixdev && ki->dixdev->id == pDev->id) break; } if (!ki || !ki->dixdev || ki->dixdev->id != pDev->id || !ki->driver) return; KdRingBell(ki, volume, ctrl->bell_pitch, ctrl->bell_duration); } void DDXRingBell(int volume, int pitch, int duration) { KdKeyboardInfo *ki = NULL; for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->dixdev->coreEvents) KdRingBell(ki, volume, pitch, duration); } } static void KdSetLeds(KdKeyboardInfo * ki, int leds) { if (!ki || !ki->driver) return; if (kdInputEnabled) { if (ki->driver->Leds) (*ki->driver->Leds) (ki, leds); } } static void KdSetLed(KdKeyboardInfo * ki, int led, Bool on) { if (!ki || !ki->dixdev || !ki->dixdev->kbdfeed) return; NoteLedState(ki->dixdev, led, on); KdSetLeds(ki, ki->dixdev->kbdfeed->ctrl.leds); } void KdSetPointerMatrix(KdPointerMatrix * matrix) { kdPointerMatrix = *matrix; } void KdComputePointerMatrix(KdPointerMatrix * m, Rotation randr, int width, int height) { int x_dir = 1, y_dir = 1; int i, j; int size[2]; size[0] = width; size[1] = height; if (randr & RR_Reflect_X) x_dir = -1; if (randr & RR_Reflect_Y) y_dir = -1; switch (randr & (RR_Rotate_All)) { case RR_Rotate_0: m->matrix[0][0] = x_dir; m->matrix[0][1] = 0; m->matrix[1][0] = 0; m->matrix[1][1] = y_dir; break; case RR_Rotate_90: m->matrix[0][0] = 0; m->matrix[0][1] = -x_dir; m->matrix[1][0] = y_dir; m->matrix[1][1] = 0; break; case RR_Rotate_180: m->matrix[0][0] = -x_dir; m->matrix[0][1] = 0; m->matrix[1][0] = 0; m->matrix[1][1] = -y_dir; break; case RR_Rotate_270: m->matrix[0][0] = 0; m->matrix[0][1] = x_dir; m->matrix[1][0] = -y_dir; m->matrix[1][1] = 0; break; } for (i = 0; i < 2; i++) { m->matrix[i][2] = 0; for (j = 0; j < 2; j++) if (m->matrix[i][j] < 0) m->matrix[i][2] = size[j] - 1; } } static void KdKbdCtrl(DeviceIntPtr pDevice, KeybdCtrl * ctrl) { KdKeyboardInfo *ki; for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->dixdev && ki->dixdev->id == pDevice->id) break; } if (!ki || !ki->dixdev || ki->dixdev->id != pDevice->id || !ki->driver) return; KdSetLeds(ki, ctrl->leds); ki->bellPitch = ctrl->bell_pitch; ki->bellDuration = ctrl->bell_duration; } static int KdKeyboardProc(DeviceIntPtr pDevice, int onoff) { Bool ret; DevicePtr pDev = (DevicePtr) pDevice; KdKeyboardInfo *ki; Atom xiclass; XkbRMLVOSet rmlvo; if (!pDev) return BadImplementation; for (ki = kdKeyboards; ki; ki = ki->next) { if (ki->dixdev && ki->dixdev->id == pDevice->id) break; } if (!ki || !ki->dixdev || ki->dixdev->id != pDevice->id) { return BadImplementation; } switch (onoff) { case DEVICE_INIT: #ifdef DEBUG ErrorF("initialising keyboard %s\n", ki->name); #endif if (!ki->driver) { if (!ki->driverPrivate) { ErrorF("no driver specified for keyboard device \"%s\" (%s)\n", ki->name ? ki->name : "(unnamed)", ki->path); return BadImplementation; } ki->driver = KdFindKeyboardDriver(ki->driverPrivate); if (!ki->driver) { ErrorF("Couldn't find keyboard driver %s\n", ki->driverPrivate ? (char *) ki->driverPrivate : "(unnamed)"); return !Success; } free(ki->driverPrivate); ki->driverPrivate = NULL; } if (!ki->driver->Init) { ErrorF("Keyboard %s: no init function\n", ki->name); return BadImplementation; } memset(&rmlvo, 0, sizeof(rmlvo)); rmlvo.rules = ki->xkbRules; rmlvo.model = ki->xkbModel; rmlvo.layout = ki->xkbLayout; rmlvo.variant = ki->xkbVariant; rmlvo.options = ki->xkbOptions; ret = InitKeyboardDeviceStruct(pDevice, &rmlvo, KdBell, KdKbdCtrl); if (!ret) { ErrorF("Couldn't initialise keyboard %s\n", ki->name); return BadImplementation; } if ((*ki->driver->Init) (ki) != Success) { return !Success; } xiclass = AtomFromName(XI_KEYBOARD); AssignTypeAndName(pDevice, xiclass, ki->name ? ki->name : "Generic KDrive Keyboard"); KdResetInputMachine(); return Success; case DEVICE_ON: if (pDev->on == TRUE) return Success; if (!ki->driver->Enable) return BadImplementation; if ((*ki->driver->Enable) (ki) != Success) { return BadMatch; } pDev->on = TRUE; return Success; case DEVICE_OFF: if (pDev->on == FALSE) return Success; if (!ki->driver->Disable) return BadImplementation; (*ki->driver->Disable) (ki); pDev->on = FALSE; return Success; break; case DEVICE_CLOSE: if (pDev->on) { if (!ki->driver->Disable) return BadImplementation; (*ki->driver->Disable) (ki); pDev->on = FALSE; } if (!ki->driver->Fini) return BadImplementation; (*ki->driver->Fini) (ki); KdRemoveKeyboard(ki); return Success; } /* NOTREACHED */ return BadImplementation; } void KdAddPointerDriver(KdPointerDriver * driver) { KdPointerDriver **prev; if (!driver) return; for (prev = &kdPointerDrivers; *prev; prev = &(*prev)->next) { if (*prev == driver) return; } *prev = driver; } void KdRemovePointerDriver(KdPointerDriver * driver) { KdPointerDriver *tmp; if (!driver) return; /* FIXME remove all pointers using this driver */ for (tmp = kdPointerDrivers; tmp; tmp = tmp->next) { if (tmp->next == driver) tmp->next = driver->next; } if (tmp == driver) tmp = NULL; } void KdAddKeyboardDriver(KdKeyboardDriver * driver) { KdKeyboardDriver **prev; if (!driver) return; for (prev = &kdKeyboardDrivers; *prev; prev = &(*prev)->next) { if (*prev == driver) return; } *prev = driver; } void KdRemoveKeyboardDriver(KdKeyboardDriver * driver) { KdKeyboardDriver *tmp; if (!driver) return; /* FIXME remove all keyboards using this driver */ for (tmp = kdKeyboardDrivers; tmp; tmp = tmp->next) { if (tmp->next == driver) tmp->next = driver->next; } if (tmp == driver) tmp = NULL; } KdKeyboardInfo * KdNewKeyboard(void) { KdKeyboardInfo *ki = calloc(sizeof(KdKeyboardInfo), 1); if (!ki) return NULL; ki->minScanCode = 0; ki->maxScanCode = 0; ki->leds = 0; ki->bellPitch = 1000; ki->bellDuration = 200; ki->next = NULL; ki->options = NULL; ki->name = strdup("Generic Keyboard"); ki->path = NULL; ki->xkbRules = strdup(kdGlobalXkbRules ? kdGlobalXkbRules : XKB_DFLT_RULES); ki->xkbModel = strdup(kdGlobalXkbModel ? kdGlobalXkbModel : XKB_DFLT_MODEL); ki->xkbLayout = strdup(kdGlobalXkbLayout ? kdGlobalXkbLayout : XKB_DFLT_LAYOUT); ki->xkbVariant = strdup(kdGlobalXkbVariant ? kdGlobalXkbVariant :XKB_DFLT_VARIANT); ki->xkbOptions = strdup(kdGlobalXkbOptions ? kdGlobalXkbOptions : XKB_DFLT_OPTIONS); return ki; } int KdAddConfigKeyboard(char *keyboard) { struct KdConfigDevice **prev, *new; if (!keyboard) return Success; new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; new->line = strdup(keyboard); new->next = NULL; for (prev = &kdConfigKeyboards; *prev; prev = &(*prev)->next); *prev = new; return Success; } int KdAddKeyboard(KdKeyboardInfo * ki) { KdKeyboardInfo **prev; if (!ki) return !Success; ki->dixdev = AddInputDevice(serverClient, KdKeyboardProc, TRUE); if (!ki->dixdev) { ErrorF("Couldn't register keyboard device %s\n", ki->name ? ki->name : "(unnamed)"); return !Success; } #ifdef DEBUG ErrorF("added keyboard %s with dix id %d\n", ki->name, ki->dixdev->id); #endif for (prev = &kdKeyboards; *prev; prev = &(*prev)->next); *prev = ki; return Success; } void KdRemoveKeyboard(KdKeyboardInfo * ki) { KdKeyboardInfo **prev; if (!ki) return; for (prev = &kdKeyboards; *prev; prev = &(*prev)->next) { if (*prev == ki) { *prev = ki->next; break; } } KdFreeKeyboard(ki); } int KdAddConfigPointer(char *pointer) { struct KdConfigDevice **prev, *new; if (!pointer) return Success; new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; new->line = strdup(pointer); new->next = NULL; for (prev = &kdConfigPointers; *prev; prev = &(*prev)->next); *prev = new; return Success; } int KdAddPointer(KdPointerInfo * pi) { KdPointerInfo **prev; if (!pi) return Success; pi->mouseState = start; pi->eventHeld = FALSE; pi->dixdev = AddInputDevice(serverClient, KdPointerProc, TRUE); if (!pi->dixdev) { ErrorF("Couldn't add pointer device %s\n", pi->name ? pi->name : "(unnamed)"); return BadDevice; } for (prev = &kdPointers; *prev; prev = &(*prev)->next); *prev = pi; return Success; } void KdRemovePointer(KdPointerInfo * pi) { KdPointerInfo **prev; if (!pi) return; for (prev = &kdPointers; *prev; prev = &(*prev)->next) { if (*prev == pi) { *prev = pi->next; break; } } KdFreePointer(pi); } /* * You can call your kdriver server with something like: * $ ./hw/kdrive/yourserver/X :1 -mouse evdev,,device=/dev/input/event4 -keybd * evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br */ static Bool KdGetOptions(InputOption **options, char *string) { InputOption *newopt = NULL; char *key = NULL, *value = NULL; int tam_key = 0; if (strchr(string, '=')) { tam_key = (strchr(string, '=') - string); key = strndup(string, tam_key); if (!key) goto out; value = strdup(strchr(string, '=') + 1); if (!value) goto out; } else { key = strdup(string); value = NULL; } newopt = input_option_new(*options, key, value); if (newopt) *options = newopt; out: free(key); free(value); return (newopt != NULL); } static void KdParseKbdOptions(KdKeyboardInfo * ki) { InputOption *option = NULL; nt_list_for_each_entry(option, ki->options, list.next) { const char *key = input_option_get_key(option); const char *value = input_option_get_value(option); if ( #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) strcasecmp(key, "xkb_rules") == 0 || #endif strcasecmp(key, "XkbRules") == 0) ki->xkbRules = strdup(value); else if ( #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) strcasecmp(key, "xkb_model") == 0 || #endif strcasecmp(key, "XkbModel") == 0) ki->xkbModel = strdup(value); else if ( #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) strcasecmp(key, "xkb_layout") == 0 || #endif strcasecmp(key, "XkbLayout") == 0) ki->xkbLayout = strdup(value); else if ( #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) strcasecmp(key, "xkb_variant") == 0 || #endif strcasecmp(key, "XkbVariant") == 0) ki->xkbVariant = strdup(value); else if ( #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) strcasecmp(key, "xkb_options") == 0 || #endif strcasecmp(key, "XkbOptions") == 0) ki->xkbOptions = strdup(value); else if (!strcasecmp(key, "device")) { if (ki->path != NULL) free(ki->path); ki->path = strdup(value); } #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) else if (!strcasecmp(key, "path")) { if (ki->path != NULL) free(ki->path); ki->path = strdup(value); } else if (!strcasecmp(key, "name")) { free(ki->name); ki->name = strdup(value); } #endif else if (!strcasecmp(key, "driver")) ki->driver = KdFindKeyboardDriver(value); else ErrorF("Kbd option key (%s) of value (%s) not assigned!\n", key, value); } } static KdKeyboardInfo * KdParseKeyboard(const char *arg) { char save[1024]; char delim; InputOption *options = NULL; KdKeyboardInfo *ki = NULL; ki = KdNewKeyboard(); if (!ki) return NULL; ki->name = strdup("Unknown KDrive Keyboard"); ki->path = NULL; ki->driver = NULL; ki->driverPrivate = NULL; ki->next = NULL; if (!arg) { ErrorF("keybd: no arg\n"); KdFreeKeyboard(ki); return NULL; } if (strlen(arg) >= sizeof(save)) { ErrorF("keybd: arg too long\n"); KdFreeKeyboard(ki); return NULL; } arg = KdParseFindNext(arg, ",", save, &delim); if (!save[0]) { ErrorF("keybd: failed on save[0]\n"); KdFreeKeyboard(ki); return NULL; } if (strcmp(save, "auto") == 0) ki->driverPrivate = NULL; else ki->driverPrivate = strdup(save); if (delim != ',') { return ki; } arg = KdParseFindNext(arg, ",", save, &delim); while (delim == ',') { arg = KdParseFindNext(arg, ",", save, &delim); if (!KdGetOptions(&options, save)) { KdFreeKeyboard(ki); return NULL; } } if (options) { ki->options = options; KdParseKbdOptions(ki); } return ki; } static void KdParsePointerOptions(KdPointerInfo * pi) { InputOption *option = NULL; nt_list_for_each_entry(option, pi->options, list.next) { const char *key = input_option_get_key(option); const char *value = input_option_get_value(option); if (!strcasecmp(key, "emulatemiddle")) pi->emulateMiddleButton = TRUE; else if (!strcasecmp(key, "noemulatemiddle")) pi->emulateMiddleButton = FALSE; else if (!strcasecmp(key, "transformcoord")) pi->transformCoordinates = TRUE; else if (!strcasecmp(key, "rawcoord")) pi->transformCoordinates = FALSE; else if (!strcasecmp(key, "device")) { if (pi->path != NULL) free(pi->path); pi->path = strdup(value); } #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) else if (!strcasecmp(key, "path")) { if (pi->path != NULL) free(pi->path); pi->path = strdup(value); } else if (!strcasecmp(key, "name")) { free(pi->name); pi->name = strdup(value); } #endif else if (!strcasecmp(key, "protocol")) pi->protocol = strdup(value); else if (!strcasecmp(key, "driver")) pi->driver = KdFindPointerDriver(value); else ErrorF("Pointer option key (%s) of value (%s) not assigned!\n", key, value); } } static KdPointerInfo * KdParsePointer(const char *arg) { char save[1024]; char delim; KdPointerInfo *pi = NULL; InputOption *options = NULL; int i = 0; pi = KdNewPointer(); if (!pi) return NULL; pi->emulateMiddleButton = kdEmulateMiddleButton; pi->transformCoordinates = !kdRawPointerCoordinates; pi->protocol = NULL; pi->nButtons = 5; /* XXX should not be hardcoded */ pi->inputClass = KD_MOUSE; if (!arg) { ErrorF("mouse: no arg\n"); KdFreePointer(pi); return NULL; } if (strlen(arg) >= sizeof(save)) { ErrorF("mouse: arg too long\n"); KdFreePointer(pi); return NULL; } arg = KdParseFindNext(arg, ",", save, &delim); if (!save[0]) { ErrorF("failed on save[0]\n"); KdFreePointer(pi); return NULL; } if (strcmp(save, "auto") == 0) pi->driverPrivate = NULL; else pi->driverPrivate = strdup(save); if (delim != ',') { return pi; } arg = KdParseFindNext(arg, ",", save, &delim); while (delim == ',') { arg = KdParseFindNext(arg, ",", save, &delim); if (save[0] == '{') { char *s = save + 1; i = 0; while (*s && *s != '}') { if ('1' <= *s && *s <= '0' + pi->nButtons) pi->map[i] = *s - '0'; else UseMsg(); s++; } } else { if (!KdGetOptions(&options, save)) { KdFreePointer(pi); return NULL; } } } if (options) { pi->options = options; KdParsePointerOptions(pi); } return pi; } void KdInitInput(void) { KdPointerInfo *pi; KdKeyboardInfo *ki; struct KdConfigDevice *dev; if (kdConfigPointers || kdConfigKeyboards) InputThreadPreInit(); kdInputEnabled = TRUE; for (dev = kdConfigPointers; dev; dev = dev->next) { pi = KdParsePointer(dev->line); if (!pi) ErrorF("Failed to parse pointer\n"); if (KdAddPointer(pi) != Success) ErrorF("Failed to add pointer!\n"); } for (dev = kdConfigKeyboards; dev; dev = dev->next) { ki = KdParseKeyboard(dev->line); if (!ki) ErrorF("Failed to parse keyboard\n"); if (KdAddKeyboard(ki) != Success) ErrorF("Failed to add keyboard!\n"); } mieqInit(); #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) if (SeatId) /* Enable input hot-plugging */ config_init(); #endif } void KdCloseInput(void) { #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) if (SeatId) /* Input hot-plugging is enabled */ config_fini(); #endif mieqFini(); } /* * Middle button emulation state machine * * Possible transitions: * Button 1 press v1 * Button 1 release ^1 * Button 2 press v2 * Button 2 release ^2 * Button 3 press v3 * Button 3 release ^3 * Button other press vo * Button other release ^o * Mouse motion <> * Keyboard event k * timeout ... * outside box <-> * * States: * start * button_1_pend * button_1_down * button_2_down * button_3_pend * button_3_down * synthetic_2_down_13 * synthetic_2_down_3 * synthetic_2_down_1 * * Transition diagram * * start * v1 -> (hold) (settimeout) button_1_pend * ^1 -> (deliver) start * v2 -> (deliver) button_2_down * ^2 -> (deliever) start * v3 -> (hold) (settimeout) button_3_pend * ^3 -> (deliver) start * vo -> (deliver) start * ^o -> (deliver) start * <> -> (deliver) start * k -> (deliver) start * * button_1_pend (button 1 is down, timeout pending) * ^1 -> (release) (deliver) start * v2 -> (release) (deliver) button_1_down * ^2 -> (release) (deliver) button_1_down * v3 -> (cleartimeout) (generate v2) synthetic_2_down_13 * ^3 -> (release) (deliver) button_1_down * vo -> (release) (deliver) button_1_down * ^o -> (release) (deliver) button_1_down * <-> -> (release) (deliver) button_1_down * <> -> (deliver) button_1_pend * k -> (release) (deliver) button_1_down * ... -> (release) button_1_down * * button_1_down (button 1 is down) * ^1 -> (deliver) start * v2 -> (deliver) button_1_down * ^2 -> (deliver) button_1_down * v3 -> (deliver) button_1_down * ^3 -> (deliver) button_1_down * vo -> (deliver) button_1_down * ^o -> (deliver) button_1_down * <> -> (deliver) button_1_down * k -> (deliver) button_1_down * * button_2_down (button 2 is down) * v1 -> (deliver) button_2_down * ^1 -> (deliver) button_2_down * ^2 -> (deliver) start * v3 -> (deliver) button_2_down * ^3 -> (deliver) button_2_down * vo -> (deliver) button_2_down * ^o -> (deliver) button_2_down * <> -> (deliver) button_2_down * k -> (deliver) button_2_down * * button_3_pend (button 3 is down, timeout pending) * v1 -> (generate v2) synthetic_2_down * ^1 -> (release) (deliver) button_3_down * v2 -> (release) (deliver) button_3_down * ^2 -> (release) (deliver) button_3_down * ^3 -> (release) (deliver) start * vo -> (release) (deliver) button_3_down * ^o -> (release) (deliver) button_3_down * <-> -> (release) (deliver) button_3_down * <> -> (deliver) button_3_pend * k -> (release) (deliver) button_3_down * ... -> (release) button_3_down * * button_3_down (button 3 is down) * v1 -> (deliver) button_3_down * ^1 -> (deliver) button_3_down * v2 -> (deliver) button_3_down * ^2 -> (deliver) button_3_down * ^3 -> (deliver) start * vo -> (deliver) button_3_down * ^o -> (deliver) button_3_down * <> -> (deliver) button_3_down * k -> (deliver) button_3_down * * synthetic_2_down_13 (button 1 and 3 are down) * ^1 -> (generate ^2) synthetic_2_down_3 * v2 -> synthetic_2_down_13 * ^2 -> synthetic_2_down_13 * ^3 -> (generate ^2) synthetic_2_down_1 * vo -> (deliver) synthetic_2_down_13 * ^o -> (deliver) synthetic_2_down_13 * <> -> (deliver) synthetic_2_down_13 * k -> (deliver) synthetic_2_down_13 * * synthetic_2_down_3 (button 3 is down) * v1 -> (deliver) synthetic_2_down_3 * ^1 -> (deliver) synthetic_2_down_3 * v2 -> synthetic_2_down_3 * ^2 -> synthetic_2_down_3 * ^3 -> start * vo -> (deliver) synthetic_2_down_3 * ^o -> (deliver) synthetic_2_down_3 * <> -> (deliver) synthetic_2_down_3 * k -> (deliver) synthetic_2_down_3 * * synthetic_2_down_1 (button 1 is down) * ^1 -> start * v2 -> synthetic_2_down_1 * ^2 -> synthetic_2_down_1 * v3 -> (deliver) synthetic_2_down_1 * ^3 -> (deliver) synthetic_2_down_1 * vo -> (deliver) synthetic_2_down_1 * ^o -> (deliver) synthetic_2_down_1 * <> -> (deliver) synthetic_2_down_1 * k -> (deliver) synthetic_2_down_1 */ typedef enum _inputClass { down_1, up_1, down_2, up_2, down_3, up_3, down_o, up_o, motion, outside_box, keyboard, timeout, num_input_class } KdInputClass; typedef enum _inputAction { noop, hold, setto, deliver, release, clearto, gen_down_2, gen_up_2 } KdInputAction; #define MAX_ACTIONS 2 typedef struct _inputTransition { KdInputAction actions[MAX_ACTIONS]; KdPointerState nextState; } KdInputTransition; static const KdInputTransition kdInputMachine[num_input_states][num_input_class] = { /* start */ { {{hold, setto}, button_1_pend}, /* v1 */ {{deliver, noop}, start}, /* ^1 */ {{deliver, noop}, button_2_down}, /* v2 */ {{deliver, noop}, start}, /* ^2 */ {{hold, setto}, button_3_pend}, /* v3 */ {{deliver, noop}, start}, /* ^3 */ {{deliver, noop}, start}, /* vo */ {{deliver, noop}, start}, /* ^o */ {{deliver, noop}, start}, /* <> */ {{deliver, noop}, start}, /* <-> */ {{noop, noop}, start}, /* k */ {{noop, noop}, start}, /* ... */ }, /* button_1_pend */ { {{noop, noop}, button_1_pend}, /* v1 */ {{release, deliver}, start}, /* ^1 */ {{release, deliver}, button_1_down}, /* v2 */ {{release, deliver}, button_1_down}, /* ^2 */ {{clearto, gen_down_2}, synth_2_down_13}, /* v3 */ {{release, deliver}, button_1_down}, /* ^3 */ {{release, deliver}, button_1_down}, /* vo */ {{release, deliver}, button_1_down}, /* ^o */ {{deliver, noop}, button_1_pend}, /* <> */ {{release, deliver}, button_1_down}, /* <-> */ {{noop, noop}, button_1_down}, /* k */ {{release, noop}, button_1_down}, /* ... */ }, /* button_1_down */ { {{noop, noop}, button_1_down}, /* v1 */ {{deliver, noop}, start}, /* ^1 */ {{deliver, noop}, button_1_down}, /* v2 */ {{deliver, noop}, button_1_down}, /* ^2 */ {{deliver, noop}, button_1_down}, /* v3 */ {{deliver, noop}, button_1_down}, /* ^3 */ {{deliver, noop}, button_1_down}, /* vo */ {{deliver, noop}, button_1_down}, /* ^o */ {{deliver, noop}, button_1_down}, /* <> */ {{deliver, noop}, button_1_down}, /* <-> */ {{noop, noop}, button_1_down}, /* k */ {{noop, noop}, button_1_down}, /* ... */ }, /* button_2_down */ { {{deliver, noop}, button_2_down}, /* v1 */ {{deliver, noop}, button_2_down}, /* ^1 */ {{noop, noop}, button_2_down}, /* v2 */ {{deliver, noop}, start}, /* ^2 */ {{deliver, noop}, button_2_down}, /* v3 */ {{deliver, noop}, button_2_down}, /* ^3 */ {{deliver, noop}, button_2_down}, /* vo */ {{deliver, noop}, button_2_down}, /* ^o */ {{deliver, noop}, button_2_down}, /* <> */ {{deliver, noop}, button_2_down}, /* <-> */ {{noop, noop}, button_2_down}, /* k */ {{noop, noop}, button_2_down}, /* ... */ }, /* button_3_pend */ { {{clearto, gen_down_2}, synth_2_down_13}, /* v1 */ {{release, deliver}, button_3_down}, /* ^1 */ {{release, deliver}, button_3_down}, /* v2 */ {{release, deliver}, button_3_down}, /* ^2 */ {{release, deliver}, button_3_down}, /* v3 */ {{release, deliver}, start}, /* ^3 */ {{release, deliver}, button_3_down}, /* vo */ {{release, deliver}, button_3_down}, /* ^o */ {{deliver, noop}, button_3_pend}, /* <> */ {{release, deliver}, button_3_down}, /* <-> */ {{release, noop}, button_3_down}, /* k */ {{release, noop}, button_3_down}, /* ... */ }, /* button_3_down */ { {{deliver, noop}, button_3_down}, /* v1 */ {{deliver, noop}, button_3_down}, /* ^1 */ {{deliver, noop}, button_3_down}, /* v2 */ {{deliver, noop}, button_3_down}, /* ^2 */ {{noop, noop}, button_3_down}, /* v3 */ {{deliver, noop}, start}, /* ^3 */ {{deliver, noop}, button_3_down}, /* vo */ {{deliver, noop}, button_3_down}, /* ^o */ {{deliver, noop}, button_3_down}, /* <> */ {{deliver, noop}, button_3_down}, /* <-> */ {{noop, noop}, button_3_down}, /* k */ {{noop, noop}, button_3_down}, /* ... */ }, /* synthetic_2_down_13 */ { {{noop, noop}, synth_2_down_13}, /* v1 */ {{gen_up_2, noop}, synth_2_down_3}, /* ^1 */ {{noop, noop}, synth_2_down_13}, /* v2 */ {{noop, noop}, synth_2_down_13}, /* ^2 */ {{noop, noop}, synth_2_down_13}, /* v3 */ {{gen_up_2, noop}, synth_2_down_1}, /* ^3 */ {{deliver, noop}, synth_2_down_13}, /* vo */ {{deliver, noop}, synth_2_down_13}, /* ^o */ {{deliver, noop}, synth_2_down_13}, /* <> */ {{deliver, noop}, synth_2_down_13}, /* <-> */ {{noop, noop}, synth_2_down_13}, /* k */ {{noop, noop}, synth_2_down_13}, /* ... */ }, /* synthetic_2_down_3 */ { {{deliver, noop}, synth_2_down_3}, /* v1 */ {{deliver, noop}, synth_2_down_3}, /* ^1 */ {{deliver, noop}, synth_2_down_3}, /* v2 */ {{deliver, noop}, synth_2_down_3}, /* ^2 */ {{noop, noop}, synth_2_down_3}, /* v3 */ {{noop, noop}, start}, /* ^3 */ {{deliver, noop}, synth_2_down_3}, /* vo */ {{deliver, noop}, synth_2_down_3}, /* ^o */ {{deliver, noop}, synth_2_down_3}, /* <> */ {{deliver, noop}, synth_2_down_3}, /* <-> */ {{noop, noop}, synth_2_down_3}, /* k */ {{noop, noop}, synth_2_down_3}, /* ... */ }, /* synthetic_2_down_1 */ { {{noop, noop}, synth_2_down_1}, /* v1 */ {{noop, noop}, start}, /* ^1 */ {{deliver, noop}, synth_2_down_1}, /* v2 */ {{deliver, noop}, synth_2_down_1}, /* ^2 */ {{deliver, noop}, synth_2_down_1}, /* v3 */ {{deliver, noop}, synth_2_down_1}, /* ^3 */ {{deliver, noop}, synth_2_down_1}, /* vo */ {{deliver, noop}, synth_2_down_1}, /* ^o */ {{deliver, noop}, synth_2_down_1}, /* <> */ {{deliver, noop}, synth_2_down_1}, /* <-> */ {{noop, noop}, synth_2_down_1}, /* k */ {{noop, noop}, synth_2_down_1}, /* ... */ }, }; #define EMULATION_WINDOW 10 #define EMULATION_TIMEOUT 100 static int KdInsideEmulationWindow(KdPointerInfo * pi, int x, int y, int z) { pi->emulationDx = pi->heldEvent.x - x; pi->emulationDy = pi->heldEvent.y - y; return (abs(pi->emulationDx) < EMULATION_WINDOW && abs(pi->emulationDy) < EMULATION_WINDOW); } static KdInputClass KdClassifyInput(KdPointerInfo * pi, int type, int x, int y, int z, int b) { switch (type) { case ButtonPress: switch (b) { case 1: return down_1; case 2: return down_2; case 3: return down_3; default: return down_o; } break; case ButtonRelease: switch (b) { case 1: return up_1; case 2: return up_2; case 3: return up_3; default: return up_o; } break; case MotionNotify: if (pi->eventHeld && !KdInsideEmulationWindow(pi, x, y, z)) return outside_box; else return motion; default: return keyboard; } return keyboard; } static void _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, int b, int absrel, Bool force); /* We return true if we're stealing the event. */ static Bool KdRunMouseMachine(KdPointerInfo * pi, KdInputClass c, int type, int x, int y, int z, int b, int absrel) { const KdInputTransition *t; int a; c = KdClassifyInput(pi, type, x, y, z, b); t = &kdInputMachine[pi->mouseState][c]; for (a = 0; a < MAX_ACTIONS; a++) { switch (t->actions[a]) { case noop: break; case hold: pi->eventHeld = TRUE; pi->emulationDx = 0; pi->emulationDy = 0; pi->heldEvent.type = type; pi->heldEvent.x = x; pi->heldEvent.y = y; pi->heldEvent.z = z; pi->heldEvent.flags = b; pi->heldEvent.absrel = absrel; return TRUE; break; case setto: pi->emulationTimeout = GetTimeInMillis() + EMULATION_TIMEOUT; pi->timeoutPending = TRUE; break; case deliver: _KdEnqueuePointerEvent(pi, pi->heldEvent.type, pi->heldEvent.x, pi->heldEvent.y, pi->heldEvent.z, pi->heldEvent.flags, pi->heldEvent.absrel, TRUE); break; case release: pi->eventHeld = FALSE; pi->timeoutPending = FALSE; _KdEnqueuePointerEvent(pi, pi->heldEvent.type, pi->heldEvent.x, pi->heldEvent.y, pi->heldEvent.z, pi->heldEvent.flags, pi->heldEvent.absrel, TRUE); return TRUE; break; case clearto: pi->timeoutPending = FALSE; break; case gen_down_2: _KdEnqueuePointerEvent(pi, ButtonPress, x, y, z, 2, absrel, TRUE); pi->eventHeld = FALSE; return TRUE; break; case gen_up_2: _KdEnqueuePointerEvent(pi, ButtonRelease, x, y, z, 2, absrel, TRUE); return TRUE; break; } } pi->mouseState = t->nextState; return FALSE; } static int KdHandlePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, int b, int absrel) { if (pi->emulateMiddleButton) return KdRunMouseMachine(pi, KdClassifyInput(pi, type, x, y, z, b), type, x, y, z, b, absrel); return FALSE; } static void _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, int b, int absrel, Bool force) { int valuators[3] = { x, y, z }; ValuatorMask mask; /* TRUE from KdHandlePointerEvent, means 'we swallowed the event'. */ if (!force && KdHandlePointerEvent(pi, type, x, y, z, b, absrel)) return; valuator_mask_set_range(&mask, 0, 3, valuators); QueuePointerEvents(pi->dixdev, type, b, absrel, &mask); } static void KdReceiveTimeout(KdPointerInfo * pi) { KdRunMouseMachine(pi, timeout, 0, 0, 0, 0, 0, 0); } extern int nClients; static void KdCheckLock(void) { KeyClassPtr keyc = NULL; Bool isSet = FALSE, shouldBeSet = FALSE; KdKeyboardInfo *tmp = NULL; for (tmp = kdKeyboards; tmp; tmp = tmp->next) { if (tmp->LockLed && tmp->dixdev && tmp->dixdev->key) { keyc = tmp->dixdev->key; isSet = (tmp->leds & (1 << (tmp->LockLed - 1))) != 0; /* FIXME: Just use XKB indicators! */ shouldBeSet = ! !(XkbStateFieldFromRec(&keyc->xkbInfo->state) & LockMask); if (isSet != shouldBeSet) KdSetLed(tmp, tmp->LockLed, shouldBeSet); } } } void KdEnqueueKeyboardEvent(KdKeyboardInfo * ki, unsigned char scan_code, unsigned char is_up) { unsigned char key_code; int type; if (!ki || !ki->dixdev || !ki->dixdev->kbdfeed || !ki->dixdev->key) return; if (scan_code >= ki->minScanCode && scan_code <= ki->maxScanCode) { key_code = scan_code + KD_MIN_KEYCODE - ki->minScanCode; /* * Set up this event -- the type may be modified below */ if (is_up) type = KeyRelease; else type = KeyPress; QueueKeyboardEvents(ki->dixdev, type, key_code); } else { ErrorF("driver %s wanted to post scancode %d outside of [%d, %d]!\n", ki->name, scan_code, ki->minScanCode, ki->maxScanCode); } } /* * kdEnqueuePointerEvent * * This function converts hardware mouse event information into X event * information. A mouse movement event is passed off to MI to generate * a MotionNotify event, if appropriate. Button events are created and * passed off to MI for enqueueing. */ /* FIXME do something a little more clever to deal with multiple axes here */ void KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry, int rz) { unsigned char buttons; int x, y, z; int (*matrix)[3] = kdPointerMatrix.matrix; unsigned long button; int n; int dixflags = 0; if (!pi) return; /* we don't need to transform z, so we don't. */ if (flags & KD_MOUSE_DELTA) { if (pi->transformCoordinates) { x = matrix[0][0] * rx + matrix[0][1] * ry; y = matrix[1][0] * rx + matrix[1][1] * ry; } else { x = rx; y = ry; } } else { if (pi->transformCoordinates) { x = matrix[0][0] * rx + matrix[0][1] * ry + matrix[0][2]; y = matrix[1][0] * rx + matrix[1][1] * ry + matrix[1][2]; } else { x = rx; y = ry; } } z = rz; if (flags & KD_MOUSE_DELTA) { if (x || y || z) { dixflags = POINTER_RELATIVE | POINTER_ACCELERATE; _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE); } } else { dixflags = POINTER_ABSOLUTE; if (flags & KD_POINTER_DESKTOP) dixflags |= POINTER_DESKTOP; if (x != pi->dixdev->last.valuators[0] || y != pi->dixdev->last.valuators[1]) _KdEnqueuePointerEvent(pi, MotionNotify, x, y, z, 0, dixflags, FALSE); } buttons = flags; for (button = KD_BUTTON_1, n = 1; n <= pi->nButtons; button <<= 1, n++) { if (((pi->buttonState & button) ^ (buttons & button)) && !(buttons & button)) { _KdEnqueuePointerEvent(pi, ButtonRelease, x, y, z, n, dixflags, FALSE); } } for (button = KD_BUTTON_1, n = 1; n <= pi->nButtons; button <<= 1, n++) { if (((pi->buttonState & button) ^ (buttons & button)) && (buttons & button)) { _KdEnqueuePointerEvent(pi, ButtonPress, x, y, z, n, dixflags, FALSE); } } pi->buttonState = buttons; } void KdBlockHandler(ScreenPtr pScreen, void *timeo) { KdPointerInfo *pi; int myTimeout = 0; for (pi = kdPointers; pi; pi = pi->next) { if (pi->timeoutPending) { int ms; ms = pi->emulationTimeout - GetTimeInMillis(); if (ms < 1) ms = 1; if (ms < myTimeout || myTimeout == 0) myTimeout = ms; } } if (myTimeout > 0) AdjustWaitForDelay(timeo, myTimeout); } void KdWakeupHandler(ScreenPtr pScreen, int result) { KdPointerInfo *pi; for (pi = kdPointers; pi; pi = pi->next) { if (pi->timeoutPending) { if ((long) (GetTimeInMillis() - pi->emulationTimeout) >= 0) { pi->timeoutPending = FALSE; input_lock(); KdReceiveTimeout(pi); input_unlock(); } } } } #define KdScreenOrigin(pScreen) (&(KdGetScreenPriv(pScreen)->screen->origin)) static Bool KdCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { ScreenPtr pScreen = *ppScreen; ScreenPtr pNewScreen; int n; int dx, dy; int best_x, best_y; int n_best_x, n_best_y; CARD32 ms; if (kdDisableZaphod || screenInfo.numScreens <= 1) return FALSE; if (0 <= *x && *x < pScreen->width && 0 <= *y && *y < pScreen->height) return FALSE; ms = GetTimeInMillis(); if (kdOffScreen && (int) (ms - kdOffScreenTime) < 1000) return FALSE; kdOffScreen = TRUE; kdOffScreenTime = ms; n_best_x = -1; best_x = 32767; n_best_y = -1; best_y = 32767; for (n = 0; n < screenInfo.numScreens; n++) { pNewScreen = screenInfo.screens[n]; if (pNewScreen == pScreen) continue; dx = KdScreenOrigin(pNewScreen)->x - KdScreenOrigin(pScreen)->x; dy = KdScreenOrigin(pNewScreen)->y - KdScreenOrigin(pScreen)->y; if (*x < 0) { if (dx < 0 && -dx < best_x) { best_x = -dx; n_best_x = n; } } else if (*x >= pScreen->width) { if (dx > 0 && dx < best_x) { best_x = dx; n_best_x = n; } } if (*y < 0) { if (dy < 0 && -dy < best_y) { best_y = -dy; n_best_y = n; } } else if (*y >= pScreen->height) { if (dy > 0 && dy < best_y) { best_y = dy; n_best_y = n; } } } if (best_y < best_x) n_best_x = n_best_y; if (n_best_x == -1) return FALSE; pNewScreen = screenInfo.screens[n_best_x]; if (*x < 0) *x += pNewScreen->width; if (*y < 0) *y += pNewScreen->height; if (*x >= pScreen->width) *x -= pScreen->width; if (*y >= pScreen->height) *y -= pScreen->height; *ppScreen = pNewScreen; return TRUE; } static void KdCrossScreen(ScreenPtr pScreen, Bool entering) { } static void KdWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { input_lock(); miPointerWarpCursor(pDev, pScreen, x, y); input_unlock(); } miPointerScreenFuncRec kdPointerScreenFuncs = { KdCursorOffScreen, KdCrossScreen, KdWarpCursor }; void ProcessInputEvents(void) { mieqProcessInputEvents(); KdCheckLock(); } /* At the moment, absolute/relative is up to the client. */ int SetDeviceMode(register ClientPtr client, DeviceIntPtr pDev, int mode) { return BadMatch; } int SetDeviceValuators(register ClientPtr client, DeviceIntPtr pDev, int *valuators, int first_valuator, int num_valuators) { return BadMatch; } int ChangeDeviceControl(register ClientPtr client, DeviceIntPtr pDev, xDeviceCtl * control) { switch (control->control) { case DEVICE_RESOLUTION: /* FIXME do something more intelligent here */ return BadMatch; case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: case DEVICE_CORE: return BadMatch; case DEVICE_ENABLE: return Success; default: return BadMatch; } /* NOTREACHED */ return BadImplementation; } int NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, DeviceIntPtr *pdev) { InputOption *option = NULL, *optionsdup = NULL; KdPointerInfo *pi = NULL; KdKeyboardInfo *ki = NULL; nt_list_for_each_entry(option, options, list.next) { const char *key = input_option_get_key(option); const char *value = input_option_get_value(option); optionsdup = input_option_new(optionsdup, key, value); if (strcmp(key, "type") == 0) { if (strcmp(value, "pointer") == 0) { pi = KdNewPointer(); if (!pi) { input_option_free_list(&optionsdup); return BadAlloc; } } else if (strcmp(value, "keyboard") == 0) { ki = KdNewKeyboard(); if (!ki) { input_option_free_list(&optionsdup); return BadAlloc; } } else { ErrorF("unrecognised device type!\n"); return BadValue; } } #ifdef CONFIG_HAL else if (strcmp(key, "_source") == 0 && strcmp(value, "server/hal") == 0) { if (SeatId) { /* Input hot-plugging is enabled */ if (attrs->flags & ATTR_POINTER) { pi = KdNewPointer(); if (!pi) { input_option_free_list(&optionsdup); return BadAlloc; } } else if (attrs->flags & ATTR_KEYBOARD) { ki = KdNewKeyboard(); if (!ki) { input_option_free_list(&optionsdup); return BadAlloc; } } } else { ErrorF("Ignoring device from HAL.\n"); input_option_free_list(&optionsdup); return BadValue; } } #endif #ifdef CONFIG_UDEV else if (strcmp(key, "_source") == 0 && strcmp(value, "server/udev") == 0) { if (SeatId) { /* Input hot-plugging is enabled */ if (attrs->flags & ATTR_POINTER) { pi = KdNewPointer(); if (!pi) { input_option_free_list(&optionsdup); return BadAlloc; } } else if (attrs->flags & ATTR_KEYBOARD) { ki = KdNewKeyboard(); if (!ki) { input_option_free_list(&optionsdup); return BadAlloc; } } } else { ErrorF("Ignoring device from udev.\n"); input_option_free_list(&optionsdup); return BadValue; } } #endif } if (pi) { pi->options = optionsdup; KdParsePointerOptions(pi); if (!pi->driver) { ErrorF("couldn't find driver for pointer device \"%s\" (%s)\n", pi->name ? pi->name : "(unnamed)", pi->path); KdFreePointer(pi); return BadValue; } if (KdAddPointer(pi) != Success || ActivateDevice(pi->dixdev, TRUE) != Success || EnableDevice(pi->dixdev, TRUE) != TRUE) { ErrorF("couldn't add or enable pointer \"%s\" (%s)\n", pi->name ? pi->name : "(unnamed)", pi->path); KdFreePointer(pi); return BadImplementation; } *pdev = pi->dixdev; } else if (ki) { ki->options = optionsdup; KdParseKbdOptions(ki); if (!ki->driver) { ErrorF("couldn't find driver for keyboard device \"%s\" (%s)\n", ki->name ? ki->name : "(unnamed)", ki->path); KdFreeKeyboard(ki); return BadValue; } if (KdAddKeyboard(ki) != Success || ActivateDevice(ki->dixdev, TRUE) != Success || EnableDevice(ki->dixdev, TRUE) != TRUE) { ErrorF("couldn't add or enable keyboard \"%s\" (%s)\n", ki->name ? ki->name : "(unnamed)", ki->path); KdFreeKeyboard(ki); return BadImplementation; } *pdev = ki->dixdev; } else { ErrorF("unrecognised device identifier: %s\n", input_option_get_value(input_option_find(optionsdup, "device"))); input_option_free_list(&optionsdup); return BadValue; } return Success; } void DeleteInputDeviceRequest(DeviceIntPtr pDev) { RemoveDevice(pDev, TRUE); } void RemoveInputDeviceTraces(const char *config_info) { } xorg-server-21.1.16/hw/kdrive/src/kshadow.c0000644000175000017500000000512414757411105014132 /* * Copyright © 1999 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 #endif #include "kdrive.h" Bool KdShadowFbAlloc(KdScreenInfo * screen, Bool rotate) { int paddedWidth; void *buf; int width = rotate ? screen->height : screen->width; int height = rotate ? screen->width : screen->height; int bpp = screen->fb.bitsPerPixel; /* use fb computation for width */ paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits); buf = xallocarray(paddedWidth, height); if (!buf) return FALSE; if (screen->fb.shadow) free(screen->fb.frameBuffer); screen->fb.shadow = TRUE; screen->fb.frameBuffer = buf; screen->fb.byteStride = paddedWidth; screen->fb.pixelStride = paddedWidth * 8 / bpp; return TRUE; } void KdShadowFbFree(KdScreenInfo * screen) { if (screen->fb.shadow) { free(screen->fb.frameBuffer); screen->fb.frameBuffer = 0; screen->fb.shadow = FALSE; } } Bool KdShadowSet(ScreenPtr pScreen, int randr, ShadowUpdateProc update, ShadowWindowProc window) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); if (screen->fb.shadow) { return shadowAdd(pScreen, pScreen->GetScreenPixmap(pScreen), update, window, randr, 0); } return TRUE; } void KdShadowUnset(ScreenPtr pScreen) { shadowRemove(pScreen, pScreen->GetScreenPixmap(pScreen)); } xorg-server-21.1.16/hw/kdrive/src/kxv.c0000644000175000017500000012502614757411105013306 /* XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) Adapted for KDrive by Pontus Lidman Copyright (C) 2000, 2001 - Nokia Home Communications Copyright (C) 1998, 1999 - The XFree86 Project Inc. All rights reserved. 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, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. 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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "kdrive.h" #include "scrnintstr.h" #include "regionstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "mivalidate.h" #include "validate.h" #include "resource.h" #include "gcstruct.h" #include "dixstruct.h" #include #include #include "kxv.h" #include "fourcc.h" /* XvAdaptorRec fields */ static int KdXVPutVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int KdXVPutStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int KdXVGetVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int KdXVGetStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int KdXVStopVideo(XvPortPtr, DrawablePtr); static int KdXVSetPortAttribute(XvPortPtr, Atom, INT32); static int KdXVGetPortAttribute(XvPortPtr, Atom, INT32 *); static int KdXVQueryBestSize(XvPortPtr, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); static int KdXVPutImage(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr, CARD16 *, CARD16 *, int *, int *); /* ScreenRec fields */ static Bool KdXVDestroyWindow(WindowPtr pWin); static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1); static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); static Bool KdXVCloseScreen(ScreenPtr); /* misc */ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr, int); static DevPrivateKeyRec KdXVWindowKeyRec; #define KdXVWindowKey (&KdXVWindowKeyRec) static DevPrivateKey KdXvScreenKey; static DevPrivateKeyRec KdXVScreenPrivateKey; static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; #define GET_XV_SCREEN(pScreen) ((XvScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, KdXvScreenKey)) #define GET_KDXV_SCREEN(pScreen) \ ((KdXVScreenPtr)(dixGetPrivate(&pScreen->devPrivates, &KdXVScreenPrivateKey))) #define GET_KDXV_WINDOW(pWin) ((KdXVWindowPtr) \ dixLookupPrivate(&(pWin)->devPrivates, KdXVWindowKey)) Bool KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr adaptors, int num) { KdXVScreenPtr ScreenPriv; /* fprintf(stderr,"KdXVScreenInit initializing %d adaptors\n",num); */ if (KdXVGeneration != serverGeneration) KdXVGeneration = serverGeneration; if (noXvExtension) return FALSE; if (!dixRegisterPrivateKey(&KdXVWindowKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey(&KdXVScreenPrivateKey, PRIVATE_SCREEN, 0)) return FALSE; if (Success != XvScreenInit(pScreen)) return FALSE; KdXvScreenKey = XvGetScreenKey(); PortResource = XvGetRTPort(); ScreenPriv = malloc(sizeof(KdXVScreenRec)); dixSetPrivate(&pScreen->devPrivates, &KdXVScreenPrivateKey, ScreenPriv); if (!ScreenPriv) return FALSE; ScreenPriv->DestroyWindow = pScreen->DestroyWindow; ScreenPriv->WindowExposures = pScreen->WindowExposures; ScreenPriv->ClipNotify = pScreen->ClipNotify; ScreenPriv->CloseScreen = pScreen->CloseScreen; /* fprintf(stderr,"XV: Wrapping screen funcs\n"); */ pScreen->DestroyWindow = KdXVDestroyWindow; pScreen->WindowExposures = KdXVWindowExposures; pScreen->ClipNotify = KdXVClipNotify; pScreen->CloseScreen = KdXVCloseScreen; if (!KdXVInitAdaptors(pScreen, adaptors, num)) return FALSE; return TRUE; } static void KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; if (pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; XvPortRecPrivatePtr pPriv; for (i = 0; i < pAdaptor->nPorts; i++, pPort++) { pPriv = (XvPortRecPrivatePtr) pPort->devPriv.ptr; if (pPriv) { if (pPriv->clientClip) RegionDestroy(pPriv->clientClip); if (pPriv->pCompositeClip && pPriv->FreeCompositeClip) RegionDestroy(pPriv->pCompositeClip); free(pPriv); } } } XvFreeAdaptor(pAdaptor); } static Bool KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr infoPtr, int number) { KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); KdVideoAdaptorPtr adaptorPtr; XvAdaptorPtr pAdaptor, pa; XvAdaptorRecPrivatePtr adaptorPriv; int na, numAdaptor; XvPortRecPrivatePtr portPriv; XvPortPtr pPort, pp; int numPort; KdVideoFormatPtr formatPtr; XvFormatPtr pFormat, pf; int numFormat, totFormat; KdVideoEncodingPtr encodingPtr; XvEncodingPtr pEncode, pe; int numVisuals; VisualPtr pVisual; int i; pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; if (!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for (pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { adaptorPtr = &infoPtr[na]; if (!adaptorPtr->StopVideo || !adaptorPtr->SetPortAttribute || !adaptorPtr->GetPortAttribute || !adaptorPtr->QueryBestSize) continue; /* client libs expect at least one encoding */ if (!adaptorPtr->nEncodings || !adaptorPtr->pEncodings) continue; pa->type = adaptorPtr->type; if (!adaptorPtr->PutVideo && !adaptorPtr->GetVideo) pa->type &= ~XvVideoMask; if (!adaptorPtr->PutStill && !adaptorPtr->GetStill) pa->type &= ~XvStillMask; if (!adaptorPtr->PutImage || !adaptorPtr->QueryImageAttributes) pa->type &= ~XvImageMask; if (!adaptorPtr->PutVideo && !adaptorPtr->PutImage && !adaptorPtr->PutStill) pa->type &= ~XvInputMask; if (!adaptorPtr->GetVideo && !adaptorPtr->GetStill) pa->type &= ~XvOutputMask; if (!(adaptorPtr->type & (XvPixmapMask | XvWindowMask))) continue; if (!(adaptorPtr->type & (XvImageMask | XvVideoMask | XvStillMask))) continue; pa->pScreen = pScreen; pa->ddPutVideo = KdXVPutVideo; pa->ddPutStill = KdXVPutStill; pa->ddGetVideo = KdXVGetVideo; pa->ddGetStill = KdXVGetStill; pa->ddStopVideo = KdXVStopVideo; pa->ddPutImage = KdXVPutImage; pa->ddSetPortAttribute = KdXVSetPortAttribute; pa->ddGetPortAttribute = KdXVGetPortAttribute; pa->ddQueryBestSize = KdXVQueryBestSize; pa->ddQueryImageAttributes = KdXVQueryImageAttributes; pa->name = strdup(adaptorPtr->name); if (adaptorPtr->nEncodings && (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for (pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; pe->name = strdup(encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; pe->rate.numerator = encodingPtr->rate.numerator; pe->rate.denominator = encodingPtr->rate.denominator; } pa->nEncodings = adaptorPtr->nEncodings; pa->pEncodings = pEncode; } if (adaptorPtr->nImages && (pa->pImages = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { memcpy(pa->pImages, adaptorPtr->pImages, adaptorPtr->nImages * sizeof(XvImageRec)); pa->nImages = adaptorPtr->nImages; } if (adaptorPtr->nAttributes && (pa->pAttributes = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { memcpy(pa->pAttributes, adaptorPtr->pAttributes, adaptorPtr->nAttributes * sizeof(XvAttributeRec)); for (i = 0; i < adaptorPtr->nAttributes; i++) { pa->pAttributes[i].name = strdup(adaptorPtr->pAttributes[i].name); } pa->nAttributes = adaptorPtr->nAttributes; } totFormat = adaptorPtr->nFormats; if (!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { KdXVFreeAdaptor(pa); continue; } for (pf = pFormat, i = 0, numFormat = 0, formatPtr = adaptorPtr->pFormats; i < adaptorPtr->nFormats; i++, formatPtr++) { numVisuals = pScreen->numVisuals; pVisual = pScreen->visuals; while (numVisuals--) { if ((pVisual->class == formatPtr->class) && (pVisual->nplanes == formatPtr->depth)) { if (numFormat >= totFormat) { void *moreSpace; totFormat *= 2; moreSpace = reallocarray(pFormat, totFormat, sizeof(XvFormatRec)); if (!moreSpace) break; pFormat = moreSpace; pf = pFormat + numFormat; } pf->visual = pVisual->vid; pf->depth = formatPtr->depth; pf++; numFormat++; } pVisual++; } } pa->nFormats = numFormat; pa->pFormats = pFormat; if (!numFormat) { KdXVFreeAdaptor(pa); continue; } if (!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { KdXVFreeAdaptor(pa); continue; } adaptorPriv->flags = adaptorPtr->flags; adaptorPriv->PutVideo = adaptorPtr->PutVideo; adaptorPriv->PutStill = adaptorPtr->PutStill; adaptorPriv->GetVideo = adaptorPtr->GetVideo; adaptorPriv->GetStill = adaptorPtr->GetStill; adaptorPriv->StopVideo = adaptorPtr->StopVideo; adaptorPriv->SetPortAttribute = adaptorPtr->SetPortAttribute; adaptorPriv->GetPortAttribute = adaptorPtr->GetPortAttribute; adaptorPriv->QueryBestSize = adaptorPtr->QueryBestSize; adaptorPriv->QueryImageAttributes = adaptorPtr->QueryImageAttributes; adaptorPriv->PutImage = adaptorPtr->PutImage; adaptorPriv->ReputImage = adaptorPtr->ReputImage; pa->devPriv.ptr = (void *) adaptorPriv; if (!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { KdXVFreeAdaptor(pa); continue; } for (pp = pPort, i = 0, numPort = 0; i < adaptorPtr->nPorts; i++) { if (!(pp->id = FakeClientID(0))) continue; if (!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if (!AddResource(pp->id, PortResource, pp)) { free(portPriv); continue; } pp->pAdaptor = pa; pp->pNotify = (XvPortNotifyPtr) NULL; pp->pDraw = (DrawablePtr) NULL; pp->client = (ClientPtr) NULL; pp->grab.client = (ClientPtr) NULL; pp->time = currentTime; pp->devPriv.ptr = portPriv; portPriv->screen = screen; portPriv->AdaptorRec = adaptorPriv; portPriv->DevPriv.ptr = adaptorPtr->pPortPrivates[i].ptr; pp++; numPort++; } pa->nPorts = numPort; pa->pPorts = pPort; if (!numPort) { KdXVFreeAdaptor(pa); continue; } pa->base_id = pPort->id; pa++; numAdaptor++; } if (numAdaptor) { pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { free(pAdaptor); return FALSE; } return TRUE; } /* Video should be clipped to the intersection of the window cliplist and the client cliplist specified in the GC for which the video was initialized. When we need to reclip a window, the GC that started the video may not even be around anymore. That's why we save the client clip from the GC when the video is initialized. We then use KdXVUpdateCompositeClip to calculate the new composite clip when we need it. This is different from what DEC did. They saved the GC and used its clip list when they needed to reclip the window, even if the client clip was different from the one the video was initialized with. If the original GC was destroyed, they had to stop the video. I like the new method better (MArk). This function only works for windows. Will need to rewrite when (if) we support pixmap rendering. */ static void KdXVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) { RegionPtr pregWin, pCompositeClip; WindowPtr pWin; Bool freeCompClip = FALSE; if (portPriv->pCompositeClip) return; pWin = (WindowPtr) portPriv->pDraw; /* get window clip list */ if (portPriv->subWindowMode == IncludeInferiors) { pregWin = NotClippedByChildren(pWin); freeCompClip = TRUE; } else pregWin = &pWin->clipList; if (!portPriv->clientClip) { portPriv->pCompositeClip = pregWin; portPriv->FreeCompositeClip = freeCompClip; return; } pCompositeClip = RegionCreate(NullBox, 1); RegionCopy(pCompositeClip, portPriv->clientClip); RegionTranslate(pCompositeClip, portPriv->pDraw->x + portPriv->clipOrg.x, portPriv->pDraw->y + portPriv->clipOrg.y); RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if (freeCompClip) { RegionDestroy(pregWin); } } /* Save the current clientClip and update the CompositeClip whenever we have a fresh GC */ static void KdXVCopyClip(XvPortRecPrivatePtr portPriv, GCPtr pGC) { /* copy the new clip if it exists */ if (pGC->clientClip) { if (!portPriv->clientClip) portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ RegionCopy(portPriv->clientClip, pGC->clientClip); } else if (portPriv->clientClip) { /* free the old clientClip */ RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if (portPriv->pCompositeClip && portPriv->FreeCompositeClip) { RegionDestroy(portPriv->pCompositeClip); } portPriv->clipOrg = pGC->clipOrg; portPriv->pCompositeClip = pGC->pCompositeClip; portPriv->FreeCompositeClip = FALSE; portPriv->subWindowMode = pGC->subWindowMode; } static int KdXVRegetVideo(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; KdXVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->GetVideo) (portPriv->screen, portPriv->pDraw, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, portPriv->vid_w, portPriv->vid_h, portPriv->drw_w, portPriv->drw_h, &ClipRegion, portPriv->DevPriv.ptr); if (ret == Success) portPriv->isOn = XV_ON; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && portPriv->isOn == XV_ON) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVReputVideo(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; ScreenPtr pScreen = portPriv->pDraw->pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; int ret = Success; Bool clippedAway = FALSE; KdXVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = 0; VPBox.y1 = 0; VPBox.x2 = screen->width; VPBox.y2 = screen->height; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->screen, portPriv->pDraw, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, portPriv->vid_w, portPriv->vid_h, portPriv->drw_w, portPriv->drw_h, &ClipRegion, portPriv->DevPriv.ptr); if (ret == Success) portPriv->isOn = XV_ON; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVReputImage(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; ScreenPtr pScreen = portPriv->pDraw->pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; int ret = Success; Bool clippedAway = FALSE; KdXVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = 0; VPBox.y1 = 0; VPBox.x2 = screen->width; VPBox.y2 = screen->height; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->ReputImage) (portPriv->screen, portPriv->pDraw, WinBox.x1, WinBox.y1, &ClipRegion, portPriv->DevPriv.ptr); portPriv->isOn = (ret == Success) ? XV_ON : XV_OFF; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) { KdXVWindowPtr winPriv, PrivRoot; winPriv = PrivRoot = GET_KDXV_WINDOW(pWin); /* Enlist our port in the window private */ while (winPriv) { if (winPriv->PortRec == portPriv) /* we're already listed */ break; winPriv = winPriv->next; } if (!winPriv) { winPriv = malloc(sizeof(KdXVWindowRec)); if (!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv); } return Success; } static void KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) { KdXVWindowPtr winPriv, prevPriv = NULL; winPriv = GET_KDXV_WINDOW(pWin); while (winPriv) { if (winPriv->PortRec == portPriv) { if (prevPriv) prevPriv->next = winPriv->next; else dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); free(winPriv); break; } prevPriv = winPriv; winPriv = winPriv->next; } portPriv->pDraw = NULL; } /**** ScreenRec fields ****/ static Bool KdXVDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); KdXVWindowPtr tmp, WinPriv = GET_KDXV_WINDOW(pWin); int ret; while (WinPriv) { XvPortRecPrivatePtr pPriv = WinPriv->PortRec; if (pPriv->isOn > XV_OFF) { (*pPriv->AdaptorRec->StopVideo) (pPriv->screen, pPriv->DevPriv.ptr, TRUE); pPriv->isOn = XV_OFF; } pPriv->pDraw = NULL; tmp = WinPriv; WinPriv = WinPriv->next; free(tmp); } dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); pScreen->DestroyWindow = ScreenPriv->DestroyWindow; ret = (*pScreen->DestroyWindow) (pWin); pScreen->DestroyWindow = KdXVDestroyWindow; return ret; } static void KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); KdXVWindowPtr WinPriv = GET_KDXV_WINDOW(pWin); KdXVWindowPtr pPrev; XvPortRecPrivatePtr pPriv; Bool AreasExposed; AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = KdXVWindowExposures; /* filter out XClearWindow/Area */ if (!pWin->valdata) return; pPrev = NULL; while (WinPriv) { pPriv = WinPriv->PortRec; /* Reput anyone with a reput function */ switch (pPriv->type) { case XvInputMask: KdXVReputVideo(pPriv); break; case XvOutputMask: KdXVRegetVideo(pPriv); break; default: /* overlaid still/image */ if (pPriv->AdaptorRec->ReputImage) KdXVReputImage(pPriv); else if (AreasExposed) { KdXVWindowPtr tmp; if (pPriv->isOn == XV_ON) { (*pPriv->AdaptorRec->StopVideo) (pPriv->screen, pPriv->DevPriv.ptr, FALSE); pPriv->isOn = XV_PENDING; } pPriv->pDraw = NULL; if (!pPrev) dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; free(tmp); continue; } break; } pPrev = WinPriv; WinPriv = WinPriv->next; } } static void KdXVClipNotify(WindowPtr pWin, int dx, int dy) { ScreenPtr pScreen = pWin->drawable.pScreen; KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); KdXVWindowPtr WinPriv = GET_KDXV_WINDOW(pWin); KdXVWindowPtr tmp, pPrev = NULL; XvPortRecPrivatePtr pPriv; Bool visible = (pWin->visibility == VisibilityUnobscured) || (pWin->visibility == VisibilityPartiallyObscured); while (WinPriv) { pPriv = WinPriv->PortRec; if (pPriv->pCompositeClip && pPriv->FreeCompositeClip) RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; /* Stop everything except images, but stop them too if the window isn't visible. But we only remove the images. */ if (pPriv->type || !visible) { if (pPriv->isOn == XV_ON) { (*pPriv->AdaptorRec->StopVideo) (pPriv->screen, pPriv->DevPriv.ptr, FALSE); pPriv->isOn = XV_PENDING; } if (!pPriv->type) { /* overlaid still/image */ pPriv->pDraw = NULL; if (!pPrev) dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, WinPriv->next); else pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; free(tmp); continue; } } pPrev = WinPriv; WinPriv = WinPriv->next; } if (ScreenPriv->ClipNotify) { pScreen->ClipNotify = ScreenPriv->ClipNotify; (*pScreen->ClipNotify) (pWin, dx, dy); pScreen->ClipNotify = KdXVClipNotify; } } /**** Required XvScreenRec fields ****/ static Bool KdXVCloseScreen(ScreenPtr pScreen) { XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen); XvAdaptorPtr pa; int c; if (!ScreenPriv) return TRUE; pScreen->DestroyWindow = ScreenPriv->DestroyWindow; pScreen->WindowExposures = ScreenPriv->WindowExposures; pScreen->ClipNotify = ScreenPriv->ClipNotify; pScreen->CloseScreen = ScreenPriv->CloseScreen; /* fprintf(stderr,"XV: Unwrapping screen funcs\n"); */ for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) { KdXVFreeAdaptor(pa); } free(pxvs->pAdaptors); free(ScreenPriv); return pScreen->CloseScreen(pScreen); } /**** XvAdaptorRec fields ****/ static int KdXVPutVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); KdScreenPriv(portPriv->screen->pScreen); int result; /* No dumping video to pixmaps... For now anyhow */ if (pDraw->type != DRAWABLE_WINDOW) { pPort->pDraw = (DrawablePtr) NULL; return BadAlloc; } /* If we are changing windows, unregister our port in the old window */ if (portPriv->pDraw && (portPriv->pDraw != pDraw)) KdXVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); /* Register our port with the new window */ result = KdXVEnlistPortInWindow((WindowPtr) pDraw, portPriv); if (result != Success) return result; portPriv->pDraw = pDraw; portPriv->type = XvInputMask; /* save a copy of these parameters */ portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; /* make sure we have the most recent copy of the clientClip */ KdXVCopyClip(portPriv, pGC); /* To indicate to the DI layer that we were successful */ pPort->pDraw = pDraw; if (!pScreenPriv->enabled) return Success; return (KdXVReputVideo(portPriv)); } static int KdXVPutStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); ScreenPtr pScreen = pDraw->pScreen; KdScreenPriv(pScreen); KdScreenInfo *screen = pScreenPriv->screen; RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!pScreenPriv->enabled) return Success; WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = 0; VPBox.y1 = 0; VPBox.x2 = screen->width; VPBox.y2 = screen->height; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } if (portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); } if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_STILL_BAILOUT; } ret = (*portPriv->AdaptorRec->PutStill) (portPriv->screen, pDraw, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, &ClipRegion, portPriv->DevPriv.ptr); if ((ret == Success) && (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_STILLS)) { KdXVEnlistPortInWindow((WindowPtr) pDraw, portPriv); portPriv->isOn = XV_ON; portPriv->pDraw = pDraw; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; portPriv->type = 0; /* no mask means it's transient and should not be reput once it's removed */ pPort->pDraw = pDraw; /* make sure we can get stop requests */ } PUT_STILL_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVGetVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); int result; KdScreenPriv(portPriv->screen->pScreen); /* No pixmaps... For now anyhow */ if (pDraw->type != DRAWABLE_WINDOW) { pPort->pDraw = (DrawablePtr) NULL; return BadAlloc; } /* If we are changing windows, unregister our port in the old window */ if (portPriv->pDraw && (portPriv->pDraw != pDraw)) KdXVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); /* Register our port with the new window */ result = KdXVEnlistPortInWindow((WindowPtr) pDraw, portPriv); if (result != Success) return result; portPriv->pDraw = pDraw; portPriv->type = XvOutputMask; /* save a copy of these parameters */ portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; /* make sure we have the most recent copy of the clientClip */ KdXVCopyClip(portPriv, pGC); /* To indicate to the DI layer that we were successful */ pPort->pDraw = pDraw; if (!pScreenPriv->enabled) return Success; return (KdXVRegetVideo(portPriv)); } static int KdXVGetStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); ScreenPtr pScreen = pDraw->pScreen; KdScreenPriv(pScreen); RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!pScreenPriv->enabled) return Success; WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); } if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto GET_STILL_BAILOUT; } ret = (*portPriv->AdaptorRec->GetStill) (portPriv->screen, pDraw, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, &ClipRegion, portPriv->DevPriv.ptr); GET_STILL_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVStopVideo(XvPortPtr pPort, DrawablePtr pDraw) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); KdScreenPriv(portPriv->screen->pScreen); if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; KdXVRemovePortFromWindow((WindowPtr) pDraw, portPriv); if (!pScreenPriv->enabled) return Success; /* Must free resources. */ if (portPriv->isOn > XV_OFF) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, TRUE); portPriv->isOn = XV_OFF; } return Success; } static int KdXVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return ((*portPriv->AdaptorRec->SetPortAttribute) (portPriv->screen, attribute, value, portPriv->DevPriv.ptr)); } static int KdXVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return ((*portPriv->AdaptorRec->GetPortAttribute) (portPriv->screen, attribute, (int *) p_value, portPriv->DevPriv.ptr)); } static int KdXVQueryBestSize(XvPortPtr pPort, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, unsigned int *p_w, unsigned int *p_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); (*portPriv->AdaptorRec->QueryBestSize) (portPriv->screen, (Bool) motion, vid_w, vid_h, drw_w, drw_h, p_w, p_h, portPriv->DevPriv.ptr); return Success; } static int KdXVPutImage(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 src_x, INT16 src_y, CARD16 src_w, CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h, XvImagePtr format, unsigned char *data, Bool sync, CARD16 width, CARD16 height) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); ScreenPtr pScreen = pDraw->pScreen; KdScreenPriv(pScreen); RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!pScreenPriv->enabled) return Success; WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; RegionInit(&WinRegion, &WinBox, 1); RegionInit(&ClipRegion, NullBox, 1); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = 0; VPBox.y1 = 0; VPBox.x2 = pScreen->width; VPBox.y2 = pScreen->height; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } if (portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); } if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_IMAGE_BAILOUT; } ret = (*portPriv->AdaptorRec->PutImage) (portPriv->screen, pDraw, src_x, src_y, WinBox.x1, WinBox.y1, src_w, src_h, drw_w, drw_h, format->id, data, width, height, sync, &ClipRegion, portPriv->DevPriv.ptr); if ((ret == Success) && (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) { KdXVEnlistPortInWindow((WindowPtr) pDraw, portPriv); portPriv->isOn = XV_ON; portPriv->pDraw = pDraw; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; portPriv->type = 0; /* no mask means it's transient and should not be reput once it's removed */ pPort->pDraw = pDraw; /* make sure we can get stop requests */ } PUT_IMAGE_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->screen, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int KdXVQueryImageAttributes(XvPortPtr pPort, XvImagePtr format, CARD16 *width, CARD16 *height, int *pitches, int *offsets) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return (*portPriv->AdaptorRec->QueryImageAttributes) (portPriv->screen, format->id, width, height, pitches, offsets); } xorg-server-21.1.16/hw/kdrive/src/kxv.h0000644000175000017500000001673714757411105013323 /* XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) Adapted for KDrive by Pontus Lidman Copyright (C) 2000, 2001 - Nokia Home Communications Copyright (C) 1998, 1999 - The XFree86 Project Inc. All rights reserved. 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, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. 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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. */ #ifndef _XVDIX_H_ #define _XVDIX_H_ #include "scrnintstr.h" #include "regionstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "mivalidate.h" #include "validate.h" #include "resource.h" #include "gcstruct.h" #include "dixstruct.h" #include "../../Xext/xvdix.h" #define VIDEO_OVERLAID_IMAGES 0x00000004 #define VIDEO_OVERLAID_STILLS 0x00000008 #define VIDEO_CLIP_TO_VIEWPORT 0x00000010 typedef int (*PutVideoFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data); typedef int (*PutStillFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data); typedef int (*GetVideoFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data); typedef int (*GetStillFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data); typedef void (*StopVideoFuncPtr) (KdScreenInfo * screen, void *data, Bool Exit); typedef int (*SetPortAttributeFuncPtr) (KdScreenInfo * screen, Atom attribute, int value, void *data); typedef int (*GetPortAttributeFuncPtr) (KdScreenInfo * screen, Atom attribute, int *value, void *data); typedef void (*QueryBestSizeFuncPtr) (KdScreenInfo * screen, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, void *data); typedef int (*PutImageFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int image, unsigned char *buf, short width, short height, Bool Sync, RegionPtr clipBoxes, void *data); typedef int (*ReputImageFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short drw_x, short drw_y, RegionPtr clipBoxes, void *data); typedef int (*QueryImageAttributesFuncPtr) (KdScreenInfo * screen, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); typedef enum { XV_OFF, XV_PENDING, XV_ON } XvStatus; /*** this is what the driver needs to fill out ***/ typedef struct { int id; const char *name; unsigned short width, height; XvRationalRec rate; } KdVideoEncodingRec, *KdVideoEncodingPtr; typedef struct { char depth; short class; } KdVideoFormatRec, *KdVideoFormatPtr; typedef struct { unsigned int type; int flags; const char *name; int nEncodings; KdVideoEncodingPtr pEncodings; int nFormats; KdVideoFormatPtr pFormats; int nPorts; DevUnion *pPortPrivates; int nAttributes; XvAttributePtr pAttributes; int nImages; XvImagePtr pImages; PutVideoFuncPtr PutVideo; PutStillFuncPtr PutStill; GetVideoFuncPtr GetVideo; GetStillFuncPtr GetStill; StopVideoFuncPtr StopVideo; SetPortAttributeFuncPtr SetPortAttribute; GetPortAttributeFuncPtr GetPortAttribute; QueryBestSizeFuncPtr QueryBestSize; PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; } KdVideoAdaptorRec, *KdVideoAdaptorPtr; Bool KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr Adaptors, int num); /*** These are DDX layer privates ***/ typedef struct { DestroyWindowProcPtr DestroyWindow; ClipNotifyProcPtr ClipNotify; WindowExposuresProcPtr WindowExposures; CloseScreenProcPtr CloseScreen; } KdXVScreenRec, *KdXVScreenPtr; typedef struct { int flags; PutVideoFuncPtr PutVideo; PutStillFuncPtr PutStill; GetVideoFuncPtr GetVideo; GetStillFuncPtr GetStill; StopVideoFuncPtr StopVideo; SetPortAttributeFuncPtr SetPortAttribute; GetPortAttributeFuncPtr GetPortAttribute; QueryBestSizeFuncPtr QueryBestSize; PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; typedef struct { KdScreenInfo *screen; DrawablePtr pDraw; unsigned char type; unsigned int subWindowMode; DDXPointRec clipOrg; RegionPtr clientClip; RegionPtr pCompositeClip; Bool FreeCompositeClip; XvAdaptorRecPrivatePtr AdaptorRec; XvStatus isOn; Bool moved; int vid_x, vid_y, vid_w, vid_h; int drw_x, drw_y, drw_w, drw_h; DevUnion DevPriv; } XvPortRecPrivate, *XvPortRecPrivatePtr; typedef struct _KdXVWindowRec { XvPortRecPrivatePtr PortRec; struct _KdXVWindowRec *next; } KdXVWindowRec, *KdXVWindowPtr; #endif /* _XVDIX_H_ */ xorg-server-21.1.16/hw/kdrive/meson.build0000644000175000017500000000003614757411105013676 subdir('src') subdir('ephyr') xorg-server-21.1.16/hw/kdrive/Makefile.am0000644000175000017500000000036014757411105013570 if XEPHYR XEPHYR_SUBDIRS = ephyr endif SERVER_SUBDIRS = \ $(XEPHYR_SUBDIRS) SUBDIRS = \ src \ $(SERVER_SUBDIRS) DIST_SUBDIRS = ephyr src relink: $(AM_V_at)for i in $(SERVER_SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done xorg-server-21.1.16/hw/kdrive/Makefile.in0000644000175000017500000006225714757411115013617 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/kdrive ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @XEPHYR_TRUE@XEPHYR_SUBDIRS = ephyr SERVER_SUBDIRS = \ $(XEPHYR_SUBDIRS) SUBDIRS = \ src \ $(SERVER_SUBDIRS) DIST_SUBDIRS = ephyr src all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/kdrive/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile relink: $(AM_V_at)for i in $(SERVER_SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/vfb/0000755000175000017500000000000014757411135011111 5xorg-server-21.1.16/hw/vfb/meson.build0000644000175000017500000000104214757411105013165 srcs = [ 'InitInput.c', 'InitOutput.c', '../../mi/miinitext.c', '../../mi/miinitext.h', ] xvfb_server = executable( 'Xvfb', srcs, include_directories: inc, dependencies: common_dep, link_with: [ libxserver_main, libxserver_fb, libxserver, libxserver_xkb_stubs, libxserver_xi_stubs, libxserver_glx, libglxvnd, ], install: true, ) install_man(configure_file( input: 'man/Xvfb.man', output: 'Xvfb.1', configuration: manpage_config, )) xorg-server-21.1.16/hw/vfb/Makefile.am0000644000175000017500000000105514757411105013063 SUBDIRS = man bin_PROGRAMS = Xvfb AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ $(XVFBMODULES_CFLAGS) \ $(DIX_CFLAGS) SRCS = InitInput.c \ InitOutput.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h Xvfb_SOURCES = $(SRCS) XVFB_LIBS = \ @XVFB_LIBS@ \ $(MAIN_LIB) \ $(XSERVER_LIBS) \ $(top_builddir)/Xi/libXistubs.la Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) Xvfb_DEPENDENCIES = $(XVFB_LIBS) Xvfb_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) relink: $(AM_V_at)rm -f Xvfb$(EXEEXT) && $(MAKE) Xvfb$(EXEEXT) xorg-server-21.1.16/hw/vfb/Makefile.in0000644000175000017500000010252314757411115013077 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xvfb$(EXEEXT) subdir = hw/vfb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ miinitext.$(OBJEXT) am_Xvfb_OBJECTS = $(am__objects_1) Xvfb_OBJECTS = $(am_Xvfb_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ $(top_builddir)/Xi/libXistubs.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = Xvfb_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(Xvfb_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/InitInput.Po \ ./$(DEPDIR)/InitOutput.Po ./$(DEPDIR)/miinitext.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(Xvfb_SOURCES) DIST_SOURCES = $(Xvfb_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = \ @XVFB_LIBS@ \ $(MAIN_LIB) \ $(XSERVER_LIBS) \ $(top_builddir)/Xi/libXistubs.la XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ $(XVFBMODULES_CFLAGS) \ $(DIX_CFLAGS) SRCS = InitInput.c \ InitOutput.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h Xvfb_SOURCES = $(SRCS) Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) Xvfb_DEPENDENCIES = $(XVFB_LIBS) Xvfb_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/vfb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/vfb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list Xvfb$(EXEEXT): $(Xvfb_OBJECTS) $(Xvfb_DEPENDENCIES) $(EXTRA_Xvfb_DEPENDENCIES) @rm -f Xvfb$(EXEEXT) $(AM_V_CCLD)$(Xvfb_LINK) $(Xvfb_OBJECTS) $(Xvfb_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitInput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitOutput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< miinitext.o: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c miinitext.obj: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/InitInput.Po -rm -f ./$(DEPDIR)/InitOutput.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/InitInput.Po -rm -f ./$(DEPDIR)/InitOutput.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile relink: $(AM_V_at)rm -f Xvfb$(EXEEXT) && $(MAKE) Xvfb$(EXEEXT) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/vfb/InitInput.c0000644000175000017500000000714014757411105013117 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "mi.h" #include #include "scrnintstr.h" #include "inputstr.h" #include #include "mipointer.h" #include "xkbsrv.h" #include #include "xserver-properties.h" #include "exevents.h" #include "extinit.h" void ProcessInputEvents(void) { mieqProcessInputEvents(); } void DDXRingBell(int volume, int pitch, int duration) { } #define VFB_MIN_KEY 8 #define VFB_MAX_KEY 255 static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff) { DevicePtr pDev = (DevicePtr) pDevice; switch (onoff) { case DEVICE_INIT: InitKeyboardDeviceStruct(pDevice, NULL, NULL, NULL); break; case DEVICE_ON: pDev->on = TRUE; break; case DEVICE_OFF: pDev->on = FALSE; break; case DEVICE_CLOSE: break; } return Success; } static int vfbMouseProc(DeviceIntPtr pDevice, int onoff) { #define NBUTTONS 3 #define NAXES 2 BYTE map[NBUTTONS + 1]; DevicePtr pDev = (DevicePtr) pDevice; Atom btn_labels[NBUTTONS] = { 0 }; Atom axes_labels[NAXES] = { 0 }; switch (onoff) { case DEVICE_INIT: map[1] = 1; map[2] = 2; map[3] = 3; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); InitPointerDeviceStruct(pDev, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr) NoopDDA, GetMotionHistorySize(), NAXES, axes_labels); break; case DEVICE_ON: pDev->on = TRUE; break; case DEVICE_OFF: pDev->on = FALSE; break; case DEVICE_CLOSE: break; } return Success; #undef NBUTTONS #undef NAXES } void InitInput(int argc, char *argv[]) { DeviceIntPtr p, k; Atom xiclass; p = AddInputDevice(serverClient, vfbMouseProc, TRUE); k = AddInputDevice(serverClient, vfbKeybdProc, TRUE); xiclass = MakeAtom(XI_MOUSE, sizeof(XI_MOUSE) - 1, TRUE); AssignTypeAndName(p, xiclass, "Xvfb mouse"); xiclass = MakeAtom(XI_KEYBOARD, sizeof(XI_KEYBOARD) - 1, TRUE); AssignTypeAndName(k, xiclass, "Xvfb keyboard"); (void) mieqInit(); } void CloseInput(void) { mieqFini(); } xorg-server-21.1.16/hw/vfb/InitOutput.c0000644000175000017500000006721314757411105013327 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #if defined(WIN32) #include #endif #include #include #include #include #include "scrnintstr.h" #include "servermd.h" #define PSZ 8 #include "fb.h" #include "colormapst.h" #include "gcstruct.h" #include "input.h" #include "mipointer.h" #include "micmap.h" #include #ifdef HAVE_MMAP #include #ifndef MAP_FILE #define MAP_FILE 0 #endif #endif /* HAVE_MMAP */ #include #include #ifndef WIN32 #include #endif #include #ifdef HAS_SHM #include #include #endif /* HAS_SHM */ #include "dix.h" #include "miline.h" #include "glx_extinit.h" #include "randrstr.h" #define VFB_DEFAULT_WIDTH 1280 #define VFB_DEFAULT_HEIGHT 1024 #define VFB_DEFAULT_DEPTH 24 #define VFB_DEFAULT_WHITEPIXEL 1 #define VFB_DEFAULT_BLACKPIXEL 0 #define VFB_DEFAULT_LINEBIAS 0 #define XWD_WINDOW_NAME_LEN 60 typedef struct { int width; int paddedBytesWidth; int paddedWidth; int height; int depth; int bitsPerPixel; int sizeInBytes; int ncolors; char *pfbMemory; XWDColor *pXWDCmap; XWDFileHeader *pXWDHeader; Pixel blackPixel; Pixel whitePixel; unsigned int lineBias; CloseScreenProcPtr closeScreen; #ifdef HAVE_MMAP int mmap_fd; char mmap_file[MAXPATHLEN]; #endif #ifdef HAS_SHM int shmid; #endif } vfbScreenInfo, *vfbScreenInfoPtr; static int vfbNumScreens; static vfbScreenInfo *vfbScreens; static vfbScreenInfo defaultScreenInfo = { .width = VFB_DEFAULT_WIDTH, .height = VFB_DEFAULT_HEIGHT, .depth = VFB_DEFAULT_DEPTH, .blackPixel = VFB_DEFAULT_BLACKPIXEL, .whitePixel = VFB_DEFAULT_WHITEPIXEL, .lineBias = VFB_DEFAULT_LINEBIAS, }; static Bool vfbPixmapDepths[33]; #ifdef HAVE_MMAP static char *pfbdir = NULL; #endif typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB, MMAPPED_FILE_FB } fbMemType; static fbMemType fbmemtype = NORMAL_MEMORY_FB; static char needswap = 0; static Bool Render = TRUE; #define swapcopy16(_dst, _src) \ if (needswap) { CARD16 _s = _src; cpswaps(_s, _dst); } \ else _dst = _src; #define swapcopy32(_dst, _src) \ if (needswap) { CARD32 _s = _src; cpswapl(_s, _dst); } \ else _dst = _src; static void vfbInitializePixmapDepths(void) { int i; vfbPixmapDepths[1] = TRUE; /* always need bitmaps */ for (i = 2; i <= 32; i++) vfbPixmapDepths[i] = FALSE; } static int vfbBitsPerPixel(int depth) { if (depth == 1) return 1; else if (depth <= 8) return 8; else if (depth <= 16) return 16; else return 32; } static void freeScreenInfo(vfbScreenInfoPtr pvfb) { switch (fbmemtype) { #ifdef HAVE_MMAP case MMAPPED_FILE_FB: if (-1 == unlink(pvfb->mmap_file)) { perror("unlink"); ErrorF("unlink %s failed, %s", pvfb->mmap_file, strerror(errno)); } break; #else /* HAVE_MMAP */ case MMAPPED_FILE_FB: break; #endif /* HAVE_MMAP */ #ifdef HAS_SHM case SHARED_MEMORY_FB: if (-1 == shmdt((char *) pvfb->pXWDHeader)) { perror("shmdt"); ErrorF("shmdt failed, %s", strerror(errno)); } break; #else /* HAS_SHM */ case SHARED_MEMORY_FB: break; #endif /* HAS_SHM */ case NORMAL_MEMORY_FB: free(pvfb->pXWDHeader); break; } } void ddxGiveUp(enum ExitCode error) { int i; /* clean up the framebuffers */ for (i = 0; i < vfbNumScreens; i++) { freeScreenInfo(&vfbScreens[i]); } } #ifdef __APPLE__ void DarwinHandleGUI(int argc, char *argv[]) { } #endif void OsVendorInit(void) { } void OsVendorFatalError(const char *f, va_list args) { } #if defined(DDXBEFORERESET) void ddxBeforeReset(void) { return; } #endif #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { } #endif void ddxUseMsg(void) { ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); ErrorF("+/-render turn on/off RENDER extension support" "(default on)\n"); ErrorF("-linebias n adjust thin line pixelization\n"); ErrorF("-blackpixel n pixel value for black\n"); ErrorF("-whitepixel n pixel value for white\n"); #ifdef HAVE_MMAP ErrorF ("-fbdir directory put framebuffers in mmap'ed files in directory\n"); #endif #ifdef HAS_SHM ErrorF("-shmem put framebuffers in shared memory\n"); #endif } int ddxProcessArgument(int argc, char *argv[], int i) { static Bool firstTime = TRUE; static int lastScreen = -1; vfbScreenInfo *currentScreen; if (firstTime) { vfbInitializePixmapDepths(); firstTime = FALSE; } if (lastScreen == -1) currentScreen = &defaultScreenInfo; else currentScreen = &vfbScreens[lastScreen]; if (strcmp(argv[i], "-screen") == 0) { /* -screen n WxHxD */ int screenNum; CHECK_FOR_REQUIRED_ARGUMENTS(2); screenNum = atoi(argv[i + 1]); /* The protocol only has a CARD8 for number of screens in the connection setup block, so don't allow more than that. */ if ((screenNum < 0) || (screenNum >= 255)) { ErrorF("Invalid screen number %d\n", screenNum); UseMsg(); FatalError("Invalid screen number %d passed to -screen\n", screenNum); } if (vfbNumScreens <= screenNum) { vfbScreens = reallocarray(vfbScreens, screenNum + 1, sizeof(*vfbScreens)); if (!vfbScreens) FatalError("Not enough memory for screen %d\n", screenNum); for (; vfbNumScreens <= screenNum; ++vfbNumScreens) vfbScreens[vfbNumScreens] = defaultScreenInfo; } if (3 != sscanf(argv[i + 2], "%dx%dx%d", &vfbScreens[screenNum].width, &vfbScreens[screenNum].height, &vfbScreens[screenNum].depth)) { ErrorF("Invalid screen configuration %s\n", argv[i + 2]); UseMsg(); FatalError("Invalid screen configuration %s for -screen %d\n", argv[i + 2], screenNum); } lastScreen = screenNum; return 3; } if (strcmp(argv[i], "-pixdepths") == 0) { /* -pixdepths list-of-depth */ int depth, ret = 1; CHECK_FOR_REQUIRED_ARGUMENTS(1); while ((++i < argc) && (depth = atoi(argv[i])) != 0) { if (depth < 0 || depth > 32) { ErrorF("Invalid pixmap depth %d\n", depth); UseMsg(); FatalError("Invalid pixmap depth %d passed to -pixdepths\n", depth); } vfbPixmapDepths[depth] = TRUE; ret++; } return ret; } if (strcmp(argv[i], "+render") == 0) { /* +render */ Render = TRUE; return 1; } if (strcmp(argv[i], "-render") == 0) { /* -render */ Render = FALSE; #ifdef COMPOSITE noCompositeExtension = TRUE; #endif return 1; } if (strcmp(argv[i], "-blackpixel") == 0) { /* -blackpixel n */ CHECK_FOR_REQUIRED_ARGUMENTS(1); currentScreen->blackPixel = atoi(argv[++i]); return 2; } if (strcmp(argv[i], "-whitepixel") == 0) { /* -whitepixel n */ CHECK_FOR_REQUIRED_ARGUMENTS(1); currentScreen->whitePixel = atoi(argv[++i]); return 2; } if (strcmp(argv[i], "-linebias") == 0) { /* -linebias n */ CHECK_FOR_REQUIRED_ARGUMENTS(1); currentScreen->lineBias = atoi(argv[++i]); return 2; } #ifdef HAVE_MMAP if (strcmp(argv[i], "-fbdir") == 0) { /* -fbdir directory */ CHECK_FOR_REQUIRED_ARGUMENTS(1); pfbdir = argv[++i]; fbmemtype = MMAPPED_FILE_FB; return 2; } #endif /* HAVE_MMAP */ #ifdef HAS_SHM if (strcmp(argv[i], "-shmem") == 0) { /* -shmem */ fbmemtype = SHARED_MEMORY_FB; return 1; } #endif return 0; } static void vfbInstallColormap(ColormapPtr pmap) { ColormapPtr oldpmap = GetInstalledmiColormap(pmap->pScreen); if (pmap != oldpmap) { int entries; XWDFileHeader *pXWDHeader; VisualPtr pVisual; Pixel *ppix; xrgb *prgb; xColorItem *defs; int i; miInstallColormap(pmap); entries = pmap->pVisual->ColormapEntries; pXWDHeader = vfbScreens[pmap->pScreen->myNum].pXWDHeader; pVisual = pmap->pVisual; swapcopy32(pXWDHeader->visual_class, pVisual->class); swapcopy32(pXWDHeader->red_mask, pVisual->redMask); swapcopy32(pXWDHeader->green_mask, pVisual->greenMask); swapcopy32(pXWDHeader->blue_mask, pVisual->blueMask); swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); ppix = xallocarray(entries, sizeof(Pixel)); prgb = xallocarray(entries, sizeof(xrgb)); defs = xallocarray(entries, sizeof(xColorItem)); for (i = 0; i < entries; i++) ppix[i] = i; /* XXX truecolor */ QueryColors(pmap, entries, ppix, prgb, serverClient); for (i = 0; i < entries; i++) { /* convert xrgbs to xColorItems */ defs[i].pixel = ppix[i] & 0xff; /* change pixel to index */ defs[i].red = prgb[i].red; defs[i].green = prgb[i].green; defs[i].blue = prgb[i].blue; defs[i].flags = DoRed | DoGreen | DoBlue; } (*pmap->pScreen->StoreColors) (pmap, entries, defs); free(ppix); free(prgb); free(defs); } } static void vfbStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs) { XWDColor *pXWDCmap; int i; if (pmap != GetInstalledmiColormap(pmap->pScreen)) { return; } pXWDCmap = vfbScreens[pmap->pScreen->myNum].pXWDCmap; if ((pmap->pVisual->class | DynamicClass) == DirectColor) { return; } for (i = 0; i < ndef; i++) { if (pdefs[i].flags & DoRed) { swapcopy16(pXWDCmap[pdefs[i].pixel].red, pdefs[i].red); } if (pdefs[i].flags & DoGreen) { swapcopy16(pXWDCmap[pdefs[i].pixel].green, pdefs[i].green); } if (pdefs[i].flags & DoBlue) { swapcopy16(pXWDCmap[pdefs[i].pixel].blue, pdefs[i].blue); } } } #ifdef HAVE_MMAP /* this flushes any changes to the screens out to the mmapped file */ static void vfbBlockHandler(void *blockData, void *timeout) { int i; for (i = 0; i < vfbNumScreens; i++) { #ifdef MS_ASYNC if (-1 == msync((caddr_t) vfbScreens[i].pXWDHeader, (size_t) vfbScreens[i].sizeInBytes, MS_ASYNC)) #else /* silly NetBSD and who else? */ if (-1 == msync((caddr_t) vfbScreens[i].pXWDHeader, (size_t) vfbScreens[i].sizeInBytes)) #endif { perror("msync"); ErrorF("msync failed, %s", strerror(errno)); } } } static void vfbWakeupHandler(void *blockData, int result) { } static void vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) { #define DUMMY_BUFFER_SIZE 65536 char dummyBuffer[DUMMY_BUFFER_SIZE]; int currentFileSize, writeThisTime; snprintf(pvfb->mmap_file, sizeof(pvfb->mmap_file), "%s/Xvfb_screen%d", pfbdir, (int) (pvfb - vfbScreens)); if (-1 == (pvfb->mmap_fd = open(pvfb->mmap_file, O_CREAT | O_RDWR, 0666))) { perror("open"); ErrorF("open %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } /* Extend the file to be the proper size */ memset(dummyBuffer, 0, DUMMY_BUFFER_SIZE); for (currentFileSize = 0; currentFileSize < pvfb->sizeInBytes; currentFileSize += writeThisTime) { writeThisTime = min(DUMMY_BUFFER_SIZE, pvfb->sizeInBytes - currentFileSize); if (-1 == write(pvfb->mmap_fd, dummyBuffer, writeThisTime)) { perror("write"); ErrorF("write %s failed, %s", pvfb->mmap_file, strerror(errno)); return; } } /* try to mmap the file */ pvfb->pXWDHeader = (XWDFileHeader *) mmap((caddr_t) NULL, pvfb->sizeInBytes, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, pvfb->mmap_fd, 0); if (-1 == (long) pvfb->pXWDHeader) { perror("mmap"); ErrorF("mmap %s failed, %s", pvfb->mmap_file, strerror(errno)); pvfb->pXWDHeader = NULL; return; } if (!RegisterBlockAndWakeupHandlers(vfbBlockHandler, vfbWakeupHandler, NULL)) { pvfb->pXWDHeader = NULL; } } #endif /* HAVE_MMAP */ #ifdef HAS_SHM static void vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) { /* create the shared memory segment */ pvfb->shmid = shmget(IPC_PRIVATE, pvfb->sizeInBytes, IPC_CREAT | 0777); if (pvfb->shmid < 0) { perror("shmget"); ErrorF("shmget %d bytes failed, %s", pvfb->sizeInBytes, strerror(errno)); return; } /* try to attach it */ pvfb->pXWDHeader = (XWDFileHeader *) shmat(pvfb->shmid, 0, 0); if (-1 == (long) pvfb->pXWDHeader) { perror("shmat"); ErrorF("shmat failed, %s", strerror(errno)); pvfb->pXWDHeader = NULL; return; } ErrorF("screen %d shmid %d\n", (int) (pvfb - vfbScreens), pvfb->shmid); } #endif /* HAS_SHM */ static char * vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb) { if (pvfb->pfbMemory) return pvfb->pfbMemory; /* already done */ pvfb->sizeInBytes = pvfb->paddedBytesWidth * pvfb->height; /* Calculate how many entries in colormap. This is rather bogus, because * the visuals haven't even been set up yet, but we need to know because we * have to allocate space in the file for the colormap. The number 10 * below comes from the MAX_PSEUDO_DEPTH define in cfbcmap.c. */ if (pvfb->depth <= 10) { /* single index colormaps */ pvfb->ncolors = 1 << pvfb->depth; } else { /* decomposed colormaps */ int nplanes_per_color_component = pvfb->depth / 3; if (pvfb->depth % 3) nplanes_per_color_component++; pvfb->ncolors = 1 << nplanes_per_color_component; } /* add extra bytes for XWDFileHeader, window name, and colormap */ pvfb->sizeInBytes += SIZEOF(XWDheader) + XWD_WINDOW_NAME_LEN + pvfb->ncolors * SIZEOF(XWDColor); pvfb->pXWDHeader = NULL; switch (fbmemtype) { #ifdef HAVE_MMAP case MMAPPED_FILE_FB: vfbAllocateMmappedFramebuffer(pvfb); break; #else case MMAPPED_FILE_FB: break; #endif #ifdef HAS_SHM case SHARED_MEMORY_FB: vfbAllocateSharedMemoryFramebuffer(pvfb); break; #else case SHARED_MEMORY_FB: break; #endif case NORMAL_MEMORY_FB: pvfb->pXWDHeader = (XWDFileHeader *) malloc(pvfb->sizeInBytes); break; } if (pvfb->pXWDHeader) { pvfb->pXWDCmap = (XWDColor *) ((char *) pvfb->pXWDHeader + SIZEOF(XWDheader) + XWD_WINDOW_NAME_LEN); pvfb->pfbMemory = (char *) (pvfb->pXWDCmap + pvfb->ncolors); return pvfb->pfbMemory; } return NULL; } static void vfbWriteXWDFileHeader(ScreenPtr pScreen) { vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum]; XWDFileHeader *pXWDHeader = pvfb->pXWDHeader; char hostname[XWD_WINDOW_NAME_LEN]; unsigned long swaptest = 1; int i; needswap = *(char *) &swaptest; pXWDHeader->header_size = (char *) pvfb->pXWDCmap - (char *) pvfb->pXWDHeader; pXWDHeader->file_version = XWD_FILE_VERSION; pXWDHeader->pixmap_format = ZPixmap; pXWDHeader->pixmap_depth = pvfb->depth; pXWDHeader->pixmap_height = pXWDHeader->window_height = pvfb->height; pXWDHeader->xoffset = 0; pXWDHeader->byte_order = IMAGE_BYTE_ORDER; pXWDHeader->bitmap_bit_order = BITMAP_BIT_ORDER; #ifndef INTERNAL_VS_EXTERNAL_PADDING pXWDHeader->pixmap_width = pXWDHeader->window_width = pvfb->width; pXWDHeader->bitmap_unit = BITMAP_SCANLINE_UNIT; pXWDHeader->bitmap_pad = BITMAP_SCANLINE_PAD; #else pXWDHeader->pixmap_width = pXWDHeader->window_width = pvfb->paddedWidth; pXWDHeader->bitmap_unit = BITMAP_SCANLINE_UNIT_PROTO; pXWDHeader->bitmap_pad = BITMAP_SCANLINE_PAD_PROTO; #endif pXWDHeader->bits_per_pixel = pvfb->bitsPerPixel; pXWDHeader->bytes_per_line = pvfb->paddedBytesWidth; pXWDHeader->ncolors = pvfb->ncolors; /* visual related fields are written when colormap is installed */ pXWDHeader->window_x = pXWDHeader->window_y = 0; pXWDHeader->window_bdrwidth = 0; /* write xwd "window" name: Xvfb hostname:server.screen */ if (-1 == gethostname(hostname, sizeof(hostname))) hostname[0] = 0; else hostname[XWD_WINDOW_NAME_LEN - 1] = 0; sprintf((char *) (pXWDHeader + 1), "Xvfb %s:%s.%d", hostname, display, pScreen->myNum); /* write colormap pixel slot values */ for (i = 0; i < pvfb->ncolors; i++) { pvfb->pXWDCmap[i].pixel = i; } /* byte swap to most significant byte first */ if (needswap) { SwapLongs((CARD32 *) pXWDHeader, SIZEOF(XWDheader) / 4); for (i = 0; i < pvfb->ncolors; i++) { swapl(&pvfb->pXWDCmap[i].pixel); } } } static Bool vfbCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { return FALSE; } static void vfbCrossScreen(ScreenPtr pScreen, Bool entering) { } static miPointerScreenFuncRec vfbPointerCursorFuncs = { vfbCursorOffScreen, vfbCrossScreen, miPointerWarpCursor }; static Bool vfbCloseScreen(ScreenPtr pScreen) { vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum]; pScreen->CloseScreen = pvfb->closeScreen; /* * fb overwrites miCloseScreen, so do this here */ if (pScreen->devPrivate) (*pScreen->DestroyPixmap) (pScreen->devPrivate); pScreen->devPrivate = NULL; return pScreen->CloseScreen(pScreen); } static Bool vfbRROutputValidateMode(ScreenPtr pScreen, RROutputPtr output, RRModePtr mode) { rrScrPriv(pScreen); if (pScrPriv->minWidth <= mode->mode.width && pScrPriv->maxWidth >= mode->mode.width && pScrPriv->minHeight <= mode->mode.height && pScrPriv->maxHeight >= mode->mode.height) return TRUE; else return FALSE; } static Bool vfbRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { // Prevent screen updates while we change things around SetRootClip(pScreen, ROOT_CLIP_NONE); pScreen->width = width; pScreen->height = height; pScreen->mmWidth = mmWidth; pScreen->mmHeight = mmHeight; // Restore the ability to update screen, now with new dimensions SetRootClip(pScreen, ROOT_CLIP_FULL); RRScreenSizeNotify (pScreen); RRTellChanged(pScreen); return TRUE; } static Bool vfbRRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, int numOutput, RROutputPtr *outputs) { return RRCrtcNotify(crtc, mode, x, y, rotation, NULL, numOutput, outputs); } static Bool vfbRRGetInfo(ScreenPtr pScreen, Rotation *rotations) { /* Don't support rotations */ *rotations = RR_Rotate_0; return TRUE; } static Bool vfbRandRInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; #if RANDR_12_INTERFACE RRModePtr mode; RRCrtcPtr crtc; RROutputPtr output; xRRModeInfo modeInfo; char name[64]; #endif if (!RRScreenInit (pScreen)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); pScrPriv->rrGetInfo = vfbRRGetInfo; #if RANDR_12_INTERFACE pScrPriv->rrCrtcSet = vfbRRCrtcSet; pScrPriv->rrScreenSetSize = vfbRRScreenSetSize; pScrPriv->rrOutputSetProperty = NULL; #if RANDR_13_INTERFACE pScrPriv->rrOutputGetProperty = NULL; #endif pScrPriv->rrOutputValidateMode = vfbRROutputValidateMode; pScrPriv->rrModeDestroy = NULL; RRScreenSetSizeRange (pScreen, 1, 1, pScreen->width, pScreen->height); sprintf (name, "%dx%d", pScreen->width, pScreen->height); memset (&modeInfo, '\0', sizeof (modeInfo)); modeInfo.width = pScreen->width; modeInfo.height = pScreen->height; modeInfo.nameLength = strlen (name); mode = RRModeGet (&modeInfo, name); if (!mode) return FALSE; crtc = RRCrtcCreate (pScreen, NULL); if (!crtc) return FALSE; /* This is to avoid xrandr to complain about the gamma missing */ RRCrtcGammaSetSize (crtc, 256); output = RROutputCreate (pScreen, "screen", 6, NULL); if (!output) return FALSE; if (!RROutputSetClones (output, NULL, 0)) return FALSE; if (!RROutputSetModes (output, &mode, 1, 0)) return FALSE; if (!RROutputSetCrtcs (output, &crtc, 1)) return FALSE; if (!RROutputSetConnection (output, RR_Connected)) return FALSE; RRCrtcNotify (crtc, mode, 0, 0, RR_Rotate_0, NULL, 1, &output); #endif return TRUE; } static Bool vfbScreenInit(ScreenPtr pScreen, int argc, char **argv) { vfbScreenInfoPtr pvfb = &vfbScreens[pScreen->myNum]; int dpix = monitorResolution, dpiy = monitorResolution; int ret; char *pbits; if (dpix == 0) dpix = 100; if (dpiy == 0) dpiy = 100; pvfb->paddedBytesWidth = PixmapBytePad(pvfb->width, pvfb->depth); pvfb->bitsPerPixel = vfbBitsPerPixel(pvfb->depth); if (pvfb->bitsPerPixel >= 8) pvfb->paddedWidth = pvfb->paddedBytesWidth / (pvfb->bitsPerPixel / 8); else pvfb->paddedWidth = pvfb->paddedBytesWidth * 8; pbits = vfbAllocateFramebufferMemory(pvfb); if (!pbits) return FALSE; switch (pvfb->depth) { case 8: miSetVisualTypesAndMasks(8, ((1 << StaticGray) | (1 << GrayScale) | (1 << StaticColor) | (1 << PseudoColor) | (1 << TrueColor) | (1 << DirectColor)), 8, PseudoColor, 0, 0, 0); break; case 15: miSetVisualTypesAndMasks(15, ((1 << TrueColor) | (1 << DirectColor)), 8, TrueColor, 0x7c00, 0x03e0, 0x001f); break; case 16: miSetVisualTypesAndMasks(16, ((1 << TrueColor) | (1 << DirectColor)), 8, TrueColor, 0xf800, 0x07e0, 0x001f); break; case 24: miSetVisualTypesAndMasks(24, ((1 << TrueColor) | (1 << DirectColor)), 8, TrueColor, 0xff0000, 0x00ff00, 0x0000ff); break; case 30: miSetVisualTypesAndMasks(30, ((1 << TrueColor) | (1 << DirectColor)), 10, TrueColor, 0x3ff00000, 0x000ffc00, 0x000003ff); break; default: return FALSE; } miSetPixmapDepths(); ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, dpix, dpiy, pvfb->paddedWidth, pvfb->bitsPerPixel); if (ret && Render) fbPictureInit(pScreen, 0, 0); if (!ret) return FALSE; if (!vfbRandRInit(pScreen)) return FALSE; pScreen->InstallColormap = vfbInstallColormap; pScreen->StoreColors = vfbStoreColors; miDCInitialize(pScreen, &vfbPointerCursorFuncs); vfbWriteXWDFileHeader(pScreen); pScreen->blackPixel = pvfb->blackPixel; pScreen->whitePixel = pvfb->whitePixel; ret = fbCreateDefColormap(pScreen); miSetZeroLineBias(pScreen, pvfb->lineBias); pvfb->closeScreen = pScreen->CloseScreen; pScreen->CloseScreen = vfbCloseScreen; return ret; } /* end vfbScreenInit */ void InitOutput(ScreenInfo * screen_info, int argc, char **argv) { int i; int NumFormats = 0; /* initialize pixmap formats */ /* must have a pixmap depth to match every screen depth */ for (i = 0; i < vfbNumScreens; i++) { vfbPixmapDepths[vfbScreens[i].depth] = TRUE; } /* RENDER needs a good set of pixmaps. */ if (Render) { vfbPixmapDepths[1] = TRUE; vfbPixmapDepths[4] = TRUE; vfbPixmapDepths[8] = TRUE; #if 0 vfbPixmapDepths[12] = TRUE; #endif /* vfbPixmapDepths[15] = TRUE; */ vfbPixmapDepths[16] = TRUE; vfbPixmapDepths[24] = TRUE; #if 0 vfbPixmapDepths[30] = TRUE; #endif vfbPixmapDepths[32] = TRUE; } xorgGlxCreateVendor(); for (i = 1; i <= 32; i++) { if (vfbPixmapDepths[i]) { if (NumFormats >= MAXFORMATS) FatalError("MAXFORMATS is too small for this server\n"); screen_info->formats[NumFormats].depth = i; screen_info->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i); screen_info->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; NumFormats++; } } screen_info->imageByteOrder = IMAGE_BYTE_ORDER; screen_info->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; screen_info->bitmapScanlinePad = BITMAP_SCANLINE_PAD; screen_info->bitmapBitOrder = BITMAP_BIT_ORDER; screen_info->numPixmapFormats = NumFormats; /* initialize screens */ if (vfbNumScreens < 1) { vfbScreens = &defaultScreenInfo; vfbNumScreens = 1; } for (i = 0; i < vfbNumScreens; i++) { if (-1 == AddScreen(vfbScreenInit, argc, argv)) { FatalError("Couldn't add screen %d", i); } } } /* end InitOutput */ xorg-server-21.1.16/hw/vfb/man/0000755000175000017500000000000014757411135011664 5xorg-server-21.1.16/hw/vfb/man/Makefile.am0000644000175000017500000000007014757411105013632 include $(top_srcdir)/manpages.am appman_PRE = Xvfb.man xorg-server-21.1.16/hw/vfb/man/Makefile.in0000644000175000017500000006305514757411115013660 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/vfb/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xvfb.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/vfb/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/vfb/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/vfb/man/Xvfb.man0000644000175000017500000001257214757411105013212 .\" $XdotOrg: xc/programs/Xserver/hw/vfb/Xvfb.man,v 1.3 2005/03/23 20:49:52 gisburn Exp $ .\" $Xorg: Xvfb.man,v 1.4 2001/02/09 02:04:45 xorgcvs Exp $ .\" Copyright 1993, 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. .\" .\" $XFree86: xc/programs/Xserver/hw/vfb/Xvfb.man,v 1.9 2001/12/14 19:59:45 dawes Exp $ .\" .TH XVFB 1 @xorgversion@ .SH NAME Xvfb \- virtual framebuffer X server for X Version 11 .SH SYNOPSIS .B Xvfb [ option ] ... .SH DESCRIPTION .I Xvfb is an X server that can run on machines with no display hardware and no physical input devices. It emulates a dumb framebuffer using virtual memory. .PP The primary use of this server was intended to be server testing. The fb code for any depth can be exercised with this server without the need for real hardware that supports the desired depths. The X community has found many other novel uses for \fIXvfb\fP, including testing clients against unusual depths and screen configurations, doing batch processing with \fIXvfb\fP as a background rendering engine, load testing, as an aid to porting the X server to a new platform, and providing an unobtrusive way to run applications that don't really need an X server but insist on having one anyway. .SH OPTIONS .PP In addition to the normal server options described in the \fIXserver(1)\fP manual page, \fIXvfb\fP accepts the following command line switches: .TP 4 .B "\-screen \fIscreennum\fP \fIWxHxD\fP" This option creates screen \fIscreennum\fP and sets its width, height, and depth to W, H, and D respectively. By default, only screen 0 exists and has the dimensions 1280x1024x24. .TP 4 .B "\-pixdepths \fIlist-of-depths\fP" This option specifies a list of pixmap depths that the server should support in addition to the depths implied by the supported screens. \fIlist-of-depths\fP is a space-separated list of integers that can have values from 1 to 32. .TP 4 .B "\-fbdir \fIframebuffer-directory\fP" This option specifies the directory in which the memory mapped files containing the framebuffer memory should be created. See FILES. This option only exists on machines that have the mmap and msync system calls. .TP 4 .B "\-shmem" This option specifies that the framebuffer should be put in shared memory. The shared memory ID for each screen will be printed by the server. The shared memory is in xwd format. This option only exists on machines that support the System V shared memory interface. .PP If neither \fB\-shmem\fP nor \fB\-fbdir\fP is specified, the framebuffer memory will be allocated with malloc(). .TP 4 .B "\-linebias \fIn\fP" This option specifies how to adjust the pixelization of thin lines. The value \fIn\fP is a bitmask of octants in which to prefer an axial step when the Bresenham error term is exactly zero. See the file Xserver/mi/miline.h for more information. This option is probably only useful to server developers to experiment with the range of line pixelization possible with the fb code. .TP 4 .B "\-blackpixel \fIpixel-value\fP, \-whitepixel \fIpixel-value\fP" These options specify the black and white pixel values the server should use. .SH FILES The following files are created if the \-fbdir option is given. .TP 4 \fIframebuffer-directory\fP/Xvfb_screen Memory mapped file containing screen n's framebuffer memory, one file per screen. The file is in xwd format. Thus, taking a full-screen snapshot can be done with a file copy command, and the resulting snapshot will even contain the cursor image. .SH EXAMPLES .TP 8 Xvfb :1 -screen 0 1600x1200x24 The server will listen for connections as server number 1, and screen 0 will be depth 24 1600x1200. .TP 8 Xvfb :1 -screen 1 1600x1200x16 The server will listen for connections as server number 1, screen 0 will have the default screen configuration (1280x1024x24), and screen 1 will be depth 16 1600x1200. .TP 8 Xvfb -pixdepths 3 27 -fbdir /var/tmp The server will listen for connections as server number 0, will have the default screen configuration (one screen, 1280x1024x24), will also support pixmap depths of 3 and 27, and will use memory mapped files in /var/tmp for the framebuffer. .TP 8 xwud -in /var/tmp/Xvfb_screen0 Displays screen 0 of the server started by the preceding example. .SH "SEE ALSO" .PP X(@miscmansuffix@), Xserver(1), xwd(1), xwud(1), XWDFile.h .SH AUTHORS David P. Wiggins, The Open Group, Inc. xorg-server-21.1.16/hw/xfree86/0000755000175000017500000000000014757411135011623 5xorg-server-21.1.16/hw/xfree86/common/0000755000175000017500000000000014757411134013112 5xorg-server-21.1.16/hw/xfree86/common/meson.build0000644000175000017500000000430314757411105015172 srcs_xorg_common = [ 'xf86fbBus.c', 'xf86noBus.c', 'xf86Configure.c', 'xf86Bus.c', 'xf86Config.c', 'xf86Cursor.c', 'xf86DPMS.c', 'xf86Events.c', 'xf86Globals.c', 'xf86AutoConfig.c', 'xf86Option.c', 'xf86Init.c', 'xf86VidMode.c', 'xf86fbman.c', 'xf86cmap.c', 'xf86Helper.c', 'xf86PM.c', 'xf86RandR.c', 'xf86Xinput.c', 'xisb.c', 'xf86Mode.c', 'xorgHelper.c', 'xf86Extensions.c', ] xorg_sdk_headers = [ 'compiler.h', 'xf86.h', 'xf86Module.h', 'xf86Opt.h', 'xf86PciInfo.h', 'xf86Priv.h', 'xf86Privstr.h', 'xf86cmap.h', 'xf86fbman.h', 'xf86str.h', 'xf86Xinput.h', 'xisb.h', 'xorgVersion.h', 'xf86sbusBus.h', 'xf86VGAarbiter.h', 'xf86Optionstr.h', 'xf86platformBus.h', 'xf86MatchDrivers.h', 'xaarop.h', ] fallback_driver = get_option('fallback_input_driver') if fallback_driver == 'auto' if host_machine.system() == 'linux' fallback_driver = 'libinput' else fallback_driver = '' endif endif if build_dga srcs_xorg_common += 'xf86DGA.c' xorg_sdk_headers += 'dgaproc.h' endif if build_xv srcs_xorg_common += ['xf86xv.c', 'xf86xvmc.c'] xorg_sdk_headers += ['xf86xv.h', 'xf86xvmc.h', 'xf86xvpriv.h'] endif if build_udev srcs_xorg_common += 'xf86platformBus.c' endif if get_option('pciaccess') srcs_xorg_common += ['xf86pciBus.c', 'xf86VGAarbiter.c'] if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64' srcs_xorg_common += 'xf86sbusBus.c' endif endif srcs_xorg_common += custom_target( 'xf86DefModeSet.c', output: 'xf86DefModeSet.c', input: ['modeline2c.awk', 'vesamodes', 'extramodes'], command: [find_program('awk'), '-f', '@INPUT0@', '@INPUT1@', '@INPUT2@'], capture: true, ) xorg_common = static_library('xorg_common', srcs_xorg_common, include_directories: [inc, xorg_inc, top_dir_inc], dependencies: [ common_dep, dbus_dep, pciaccess_dep, libdrm_dep, ], c_args: [ xorg_c_args, '-DFALLBACK_INPUT_DRIVER="@0@"'.format(fallback_driver) ], ) install_data(xorg_sdk_headers, install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/common/Makefile.am0000644000175000017500000000527614757411105015076 noinst_LTLIBRARIES = libcommon.la if XORG_BUS_PCI PCI_SOURCES = xf86pciBus.c xf86VGAarbiter.c xf86VGAarbiter.h \ xf86VGAarbiterPriv.h endif if XORG_BUS_SPARC SBUS_SOURCES = xf86sbusBus.c endif if XV XVSOURCES = xf86xv.c xf86xvmc.c XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h endif if DGA DGASOURCES = xf86DGA.c DGA_SDK = dgaproc.h endif if XORG_BUS_PLATFORM PLATSOURCES = xf86platformBus.c endif RANDRSOURCES = xf86RandR.c BUSSOURCES = xf86fbBus.c xf86noBus.c $(PCI_SOURCES) $(SBUS_SOURCES) $(PLATSOURCES) MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) $(AM_V_GEN)cat $(MODEDEFSOURCES) | LC_ALL=C $(AWK) -f $(srcdir)/modeline2c.awk > $@ $(AM_V_GEN)echo >> $@ BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ xf86Option.c xf86Init.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c xf86Extensions.h \ xf86Extensions.c $(XF86VMODESOURCES) \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \ -I$(top_builddir) sdk_HEADERS = compiler.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h \ xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ $(XVSDKINCS) $(XF86VMODE_SDK) $(DGA_SDK) xorgVersion.h \ xf86sbusBus.h xf86VGAarbiter.h xf86Optionstr.h \ xf86platformBus.h xf86MatchDrivers.h \ xaarop.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ compiler.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ xf86InPriv.h \ xf86Module.h \ xf86Opt.h \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ xf86pciBus.h \ xf86str.h \ xf86xv.h \ xf86xvmc.h \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ xf86VGAarbiter.h \ xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) \ xaarop.h if LNXACPI XORG_CFLAGS += -DHAVE_ACPI endif if NEED_DBUS XORG_CFLAGS += $(DBUS_CFLAGS) endif AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) xorg-server-21.1.16/hw/xfree86/common/compiler.h0000644000175000017500000007675314757411105015035 /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * * 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 Thomas Roell not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Thomas Roell makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THOMAS ROELL 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 (c) 1994-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _COMPILER_H #define _COMPILER_H #if defined(__SUNPRO_C) #define DO_PROTOTYPES #endif /* Map Sun compiler platform defines to gcc-style used in the code */ #if defined(__amd64) && !defined(__amd64__) #define __amd64__ #endif #if defined(__i386) && !defined(__i386__) #define __i386__ #endif #if defined(__sparc) && !defined(__sparc__) #define __sparc__ #endif #if defined(__sparcv9) && !defined(__sparc64__) #define __sparc64__ #endif #ifndef _X_EXPORT #include #endif #include /* for uint*_t types */ /* Allow drivers to use the GCC-supported __inline__ and/or __inline. */ #ifndef __inline__ #if defined(__GNUC__) /* gcc has __inline__ */ #else #define __inline__ /**/ #endif #endif /* __inline__ */ #ifndef __inline #if defined(__GNUC__) /* gcc has __inline */ #else #define __inline /**/ #endif #endif /* __inline */ /* Support gcc's __FUNCTION__ for people using other compilers */ #if !defined(__GNUC__) && !defined(__FUNCTION__) #define __FUNCTION__ __func__ /* C99 */ #endif #if defined(DO_PROTOTYPES) #if !defined(__arm__) #if !defined(__sparc__) && !defined(__arm32__) && !defined(__nds32__) \ && !(defined(__alpha__) && defined(__linux__)) \ && !(defined(__ia64__) && defined(__linux__)) \ && !(defined(__mips64) && defined(__linux__)) \ extern _X_EXPORT void outb(unsigned short, unsigned char); extern _X_EXPORT void outw(unsigned short, unsigned short); extern _X_EXPORT void outl(unsigned short, unsigned int); extern _X_EXPORT unsigned int inb(unsigned short); extern _X_EXPORT unsigned int inw(unsigned short); extern _X_EXPORT unsigned int inl(unsigned short); #else /* __sparc__, __arm32__, __alpha__, __nds32__ */ extern _X_EXPORT void outb(unsigned long, unsigned char); extern _X_EXPORT void outw(unsigned long, unsigned short); extern _X_EXPORT void outl(unsigned long, unsigned int); extern _X_EXPORT unsigned int inb(unsigned long); extern _X_EXPORT unsigned int inw(unsigned long); extern _X_EXPORT unsigned int inl(unsigned long); #ifdef __SUNPRO_C extern _X_EXPORT unsigned char xf86ReadMmio8 (void *, unsigned long); extern _X_EXPORT unsigned short xf86ReadMmio16Be (void *, unsigned long); extern _X_EXPORT unsigned short xf86ReadMmio16Le (void *, unsigned long); extern _X_EXPORT unsigned int xf86ReadMmio32Be (void *, unsigned long); extern _X_EXPORT unsigned int xf86ReadMmio32Le (void *, unsigned long); extern _X_EXPORT void xf86WriteMmio8 (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio16Be (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio16Le (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio32Be (void *, unsigned long, unsigned int); extern _X_EXPORT void xf86WriteMmio32Le (void *, unsigned long, unsigned int); #endif /* _SUNPRO_C */ #endif /* __sparc__, __arm32__, __alpha__, __nds32__ */ #endif /* __arm__ */ #endif /* NO_INLINE || DO_PROTOTYPES */ #ifdef __GNUC__ #ifdef __i386__ #ifdef __SSE__ #define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") #else #define write_mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") #endif #ifdef __SSE2__ #define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") #else #define mem_barrier() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") #endif #elif defined __alpha__ #define mem_barrier() __asm__ __volatile__ ("mb" : : : "memory") #define write_mem_barrier() __asm__ __volatile__ ("wmb" : : : "memory") #elif defined __amd64__ #define mem_barrier() __asm__ __volatile__ ("mfence" : : : "memory") #define write_mem_barrier() __asm__ __volatile__ ("sfence" : : : "memory") #elif defined __ia64__ #ifndef __INTEL_COMPILER #define mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") #define write_mem_barrier() __asm__ __volatile__ ("mf" : : : "memory") #else #include "ia64intrin.h" #define mem_barrier() __mf() #define write_mem_barrier() __mf() #endif #elif defined __mips__ /* Note: sync instruction requires MIPS II instruction set */ #define mem_barrier() \ __asm__ __volatile__( \ ".set push\n\t" \ ".set noreorder\n\t" \ ".set mips2\n\t" \ "sync\n\t" \ ".set pop" \ : /* no output */ \ : /* no input */ \ : "memory") #define write_mem_barrier() mem_barrier() #elif defined __powerpc__ #ifndef eieio #define eieio() __asm__ __volatile__ ("eieio" ::: "memory") #endif /* eieio */ #define mem_barrier() eieio() #define write_mem_barrier() eieio() #elif defined __sparc__ #define barrier() __asm__ __volatile__ (".word 0x8143e00a" : : : "memory") #define mem_barrier() /* XXX: nop for now */ #define write_mem_barrier() /* XXX: nop for now */ #endif #endif /* __GNUC__ */ #ifndef barrier #define barrier() #endif #ifndef mem_barrier #define mem_barrier() /* NOP */ #endif #ifndef write_mem_barrier #define write_mem_barrier() /* NOP */ #endif #ifdef __GNUC__ #if defined(__alpha__) #ifdef __linux__ /* for Linux on Alpha, we use the LIBC _inx/_outx routines */ /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ extern _X_EXPORT void _outb(unsigned char val, unsigned long port); extern _X_EXPORT void _outw(unsigned short val, unsigned long port); extern _X_EXPORT void _outl(unsigned int val, unsigned long port); extern _X_EXPORT unsigned int _inb(unsigned long port); extern _X_EXPORT unsigned int _inw(unsigned long port); extern _X_EXPORT unsigned int _inl(unsigned long port); static __inline__ void outb(unsigned long port, unsigned char val) { _outb(val, port); } static __inline__ void outw(unsigned long port, unsigned short val) { _outw(val, port); } static __inline__ void outl(unsigned long port, unsigned int val) { _outl(val, port); } static __inline__ unsigned int inb(unsigned long port) { return _inb(port); } static __inline__ unsigned int inw(unsigned long port) { return _inw(port); } static __inline__ unsigned int inl(unsigned long port) { return _inl(port); } #endif /* __linux__ */ #if (defined(__FreeBSD__) || defined(__OpenBSD__)) \ && !defined(DO_PROTOTYPES) /* for FreeBSD and OpenBSD on Alpha, we use the libio (resp. libalpha) */ /* inx/outx routines */ /* note that the appropriate setup via "ioperm" needs to be done */ /* *before* any inx/outx is done. */ extern _X_EXPORT void outb(unsigned int port, unsigned char val); extern _X_EXPORT void outw(unsigned int port, unsigned short val); extern _X_EXPORT void outl(unsigned int port, unsigned int val); extern _X_EXPORT unsigned char inb(unsigned int port); extern _X_EXPORT unsigned short inw(unsigned int port); extern _X_EXPORT unsigned int inl(unsigned int port); #endif /* (__FreeBSD__ || __OpenBSD__ ) && !DO_PROTOTYPES */ #if defined(__NetBSD__) #include #endif /* __NetBSD__ */ #elif defined(__amd64__) || defined(__i386__) || defined(__ia64__) #include static __inline__ void outb(unsigned short port, unsigned char val) { __asm__ __volatile__("outb %0,%1"::"a"(val), "d"(port)); } static __inline__ void outw(unsigned short port, unsigned short val) { __asm__ __volatile__("outw %0,%1"::"a"(val), "d"(port)); } static __inline__ void outl(unsigned short port, unsigned int val) { __asm__ __volatile__("outl %0,%1"::"a"(val), "d"(port)); } static __inline__ unsigned int inb(unsigned short port) { unsigned char ret; __asm__ __volatile__("inb %1,%0":"=a"(ret):"d"(port)); return ret; } static __inline__ unsigned int inw(unsigned short port) { unsigned short ret; __asm__ __volatile__("inw %1,%0":"=a"(ret):"d"(port)); return ret; } static __inline__ unsigned int inl(unsigned short port) { unsigned int ret; __asm__ __volatile__("inl %1,%0":"=a"(ret):"d"(port)); return ret; } #elif defined(__sparc__) #ifndef ASI_PL #define ASI_PL 0x88 #endif static __inline__ void outb(unsigned long port, unsigned char val) { __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */ :"r"(val), "r"(port), "i"(ASI_PL)); barrier(); } static __inline__ void outw(unsigned long port, unsigned short val) { __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */ :"r"(val), "r"(port), "i"(ASI_PL)); barrier(); } static __inline__ void outl(unsigned long port, unsigned int val) { __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */ :"r"(val), "r"(port), "i"(ASI_PL)); barrier(); } static __inline__ unsigned int inb(unsigned long port) { unsigned int ret; __asm__ __volatile__("lduba [%1] %2, %0":"=r"(ret) :"r"(port), "i"(ASI_PL)); return ret; } static __inline__ unsigned int inw(unsigned long port) { unsigned int ret; __asm__ __volatile__("lduha [%1] %2, %0":"=r"(ret) :"r"(port), "i"(ASI_PL)); return ret; } static __inline__ unsigned int inl(unsigned long port) { unsigned int ret; __asm__ __volatile__("lda [%1] %2, %0":"=r"(ret) :"r"(port), "i"(ASI_PL)); return ret; } static __inline__ unsigned char xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned char ret; __asm__ __volatile__("lduba [%1] %2, %0":"=r"(ret) :"r"(addr), "i"(ASI_PL)); return ret; } static __inline__ unsigned short xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned short ret; __asm__ __volatile__("lduh [%1], %0":"=r"(ret) :"r"(addr)); return ret; } static __inline__ unsigned short xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned short ret; __asm__ __volatile__("lduha [%1] %2, %0":"=r"(ret) :"r"(addr), "i"(ASI_PL)); return ret; } static __inline__ unsigned int xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned int ret; __asm__ __volatile__("ld [%1], %0":"=r"(ret) :"r"(addr)); return ret; } static __inline__ unsigned int xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned int ret; __asm__ __volatile__("lda [%1] %2, %0":"=r"(ret) :"r"(addr), "i"(ASI_PL)); return ret; } static __inline__ void xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("stba %0, [%1] %2": /* No outputs */ :"r"(val), "r"(addr), "i"(ASI_PL)); barrier(); } static __inline__ void xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("sth %0, [%1]": /* No outputs */ :"r"(val), "r"(addr)); barrier(); } static __inline__ void xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("stha %0, [%1] %2": /* No outputs */ :"r"(val), "r"(addr), "i"(ASI_PL)); barrier(); } static __inline__ void xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("st %0, [%1]": /* No outputs */ :"r"(val), "r"(addr)); barrier(); } static __inline__ void xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("sta %0, [%1] %2": /* No outputs */ :"r"(val), "r"(addr), "i"(ASI_PL)); barrier(); } #elif defined(__arm32__) && !defined(__linux__) #define PORT_SIZE long extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) { *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = val; } static __inline__ void outw(unsigned PORT_SIZE port, unsigned short val) { *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = val; } static __inline__ void outl(unsigned PORT_SIZE port, unsigned int val) { *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) = val; } static __inline__ unsigned int inb(unsigned PORT_SIZE port) { return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase); } static __inline__ unsigned int inw(unsigned PORT_SIZE port) { return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase); } static __inline__ unsigned int inl(unsigned PORT_SIZE port) { return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase); } #if defined(__mips__) #ifdef __linux__ /* don't mess with other OSs */ #if X_BYTE_ORDER == X_BIG_ENDIAN static __inline__ unsigned int xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned int ret; __asm__ __volatile__("lw %0, 0(%1)":"=r"(ret) :"r"(addr)); return ret; } static __inline__ void xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("sw %0, 0(%1)": /* No outputs */ :"r"(val), "r"(addr)); } #endif #endif /* !__linux__ */ #endif /* __mips__ */ #elif defined(__powerpc__) #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) #endif extern _X_EXPORT volatile unsigned char *ioBase; static __inline__ unsigned char xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) { register unsigned char val; __asm__ __volatile__("lbzx %0,%1,%2\n\t" "eieio":"=r"(val) :"b"(base), "r"(offset), "m"(*((volatile unsigned char *) base + offset))); return val; } static __inline__ unsigned short xf86ReadMmio16Be(__volatile__ void *base, const unsigned long offset) { register unsigned short val; __asm__ __volatile__("lhzx %0,%1,%2\n\t" "eieio":"=r"(val) :"b"(base), "r"(offset), "m"(*((volatile unsigned char *) base + offset))); return val; } static __inline__ unsigned short xf86ReadMmio16Le(__volatile__ void *base, const unsigned long offset) { register unsigned short val; __asm__ __volatile__("lhbrx %0,%1,%2\n\t" "eieio":"=r"(val) :"b"(base), "r"(offset), "m"(*((volatile unsigned char *) base + offset))); return val; } static __inline__ unsigned int xf86ReadMmio32Be(__volatile__ void *base, const unsigned long offset) { register unsigned int val; __asm__ __volatile__("lwzx %0,%1,%2\n\t" "eieio":"=r"(val) :"b"(base), "r"(offset), "m"(*((volatile unsigned char *) base + offset))); return val; } static __inline__ unsigned int xf86ReadMmio32Le(__volatile__ void *base, const unsigned long offset) { register unsigned int val; __asm__ __volatile__("lwbrx %0,%1,%2\n\t" "eieio":"=r"(val) :"b"(base), "r"(offset), "m"(*((volatile unsigned char *) base + offset))); return val; } static __inline__ void xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, const unsigned char val) { __asm__ __volatile__("stbx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); eieio(); } static __inline__ void xf86WriteMmio16Le(__volatile__ void *base, const unsigned long offset, const unsigned short val) { __asm__ __volatile__("sthbrx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); eieio(); } static __inline__ void xf86WriteMmio16Be(__volatile__ void *base, const unsigned long offset, const unsigned short val) { __asm__ __volatile__("sthx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); eieio(); } static __inline__ void xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset, const unsigned int val) { __asm__ __volatile__("stwbrx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); eieio(); } static __inline__ void xf86WriteMmio32Be(__volatile__ void *base, const unsigned long offset, const unsigned int val) { __asm__ __volatile__("stwx %1,%2,%3\n\t":"=m" (*((volatile unsigned char *) base + offset)) :"r"(val), "b"(base), "r"(offset)); eieio(); } static __inline__ void outb(unsigned short port, unsigned char value) { if (ioBase == MAP_FAILED) return; xf86WriteMmio8((void *) ioBase, port, value); } static __inline__ void outw(unsigned short port, unsigned short value) { if (ioBase == MAP_FAILED) return; xf86WriteMmio16Le((void *) ioBase, port, value); } static __inline__ void outl(unsigned short port, unsigned int value) { if (ioBase == MAP_FAILED) return; xf86WriteMmio32Le((void *) ioBase, port, value); } static __inline__ unsigned int inb(unsigned short port) { if (ioBase == MAP_FAILED) return 0; return xf86ReadMmio8((void *) ioBase, port); } static __inline__ unsigned int inw(unsigned short port) { if (ioBase == MAP_FAILED) return 0; return xf86ReadMmio16Le((void *) ioBase, port); } static __inline__ unsigned int inl(unsigned short port) { if (ioBase == MAP_FAILED) return 0; return xf86ReadMmio32Le((void *) ioBase, port); } #elif defined(__nds32__) /* * Assume all port access are aligned. We need to revise this implementation * if there is unaligned port access. */ #define PORT_SIZE long static __inline__ unsigned char xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) { return *(volatile unsigned char *) ((unsigned char *) base + offset); } static __inline__ void xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, const unsigned int val) { *(volatile unsigned char *) ((unsigned char *) base + offset) = val; barrier(); } static __inline__ unsigned short xf86ReadMmio16Swap(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned short ret; __asm__ __volatile__("lhi %0, [%1];\n\t" "wsbh %0, %0;\n\t":"=r"(ret) :"r"(addr)); return ret; } static __inline__ unsigned short xf86ReadMmio16(__volatile__ void *base, const unsigned long offset) { return *(volatile unsigned short *) ((char *) base + offset); } static __inline__ void xf86WriteMmio16Swap(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("wsbh %0, %0;\n\t" "shi %0, [%1];\n\t": /* No outputs */ :"r"(val), "r"(addr)); barrier(); } static __inline__ void xf86WriteMmio16(__volatile__ void *base, const unsigned long offset, const unsigned int val) { *(volatile unsigned short *) ((unsigned char *) base + offset) = val; barrier(); } static __inline__ unsigned int xf86ReadMmio32Swap(__volatile__ void *base, const unsigned long offset) { unsigned long addr = ((unsigned long) base) + offset; unsigned int ret; __asm__ __volatile__("lwi %0, [%1];\n\t" "wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t":"=r"(ret) :"r"(addr)); return ret; } static __inline__ unsigned int xf86ReadMmio32(__volatile__ void *base, const unsigned long offset) { return *(volatile unsigned int *) ((unsigned char *) base + offset); } static __inline__ void xf86WriteMmio32Swap(__volatile__ void *base, const unsigned long offset, const unsigned int val) { unsigned long addr = ((unsigned long) base) + offset; __asm__ __volatile__("wsbh %0, %0;\n\t" "rotri %0, %0, 16;\n\t" "swi %0, [%1];\n\t": /* No outputs */ :"r"(val), "r"(addr)); barrier(); } static __inline__ void xf86WriteMmio32(__volatile__ void *base, const unsigned long offset, const unsigned int val) { *(volatile unsigned int *) ((unsigned char *) base + offset) = val; barrier(); } #if defined(NDS32_MMIO_SWAP) static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) { xf86WriteMmio8(IOPortBase, port, val); } static __inline__ void outw(unsigned PORT_SIZE port, unsigned short val) { xf86WriteMmio16Swap(IOPortBase, port, val); } static __inline__ void outl(unsigned PORT_SIZE port, unsigned int val) { xf86WriteMmio32Swap(IOPortBase, port, val); } static __inline__ unsigned int inb(unsigned PORT_SIZE port) { return xf86ReadMmio8(IOPortBase, port); } static __inline__ unsigned int inw(unsigned PORT_SIZE port) { return xf86ReadMmio16Swap(IOPortBase, port); } static __inline__ unsigned int inl(unsigned PORT_SIZE port) { return xf86ReadMmio32Swap(IOPortBase, port); } #else /* !NDS32_MMIO_SWAP */ static __inline__ void outb(unsigned PORT_SIZE port, unsigned char val) { *(volatile unsigned char *) (((unsigned PORT_SIZE) (port))) = val; barrier(); } static __inline__ void outw(unsigned PORT_SIZE port, unsigned short val) { *(volatile unsigned short *) (((unsigned PORT_SIZE) (port))) = val; barrier(); } static __inline__ void outl(unsigned PORT_SIZE port, unsigned int val) { *(volatile unsigned int *) (((unsigned PORT_SIZE) (port))) = val; barrier(); } static __inline__ unsigned int inb(unsigned PORT_SIZE port) { return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port))); } static __inline__ unsigned int inw(unsigned PORT_SIZE port) { return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port))); } static __inline__ unsigned int inl(unsigned PORT_SIZE port) { return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port))); } #endif /* NDS32_MMIO_SWAP */ #endif /* arch madness */ #else /* !GNUC */ #if defined(__STDC__) && (__STDC__ == 1) #ifndef asm #define asm __asm #endif #endif #if !defined(__SUNPRO_C) #include #endif #endif /* __GNUC__ */ #if !defined(MMIO_IS_BE) && \ (defined(SPARC_MMIO_IS_BE) || defined(PPC_MMIO_IS_BE)) #define MMIO_IS_BE #endif #ifdef __alpha__ static inline int xf86ReadMmio8(void *Base, unsigned long Offset) { mem_barrier(); return *(CARD8 *) ((unsigned long) Base + (Offset)); } static inline int xf86ReadMmio16(void *Base, unsigned long Offset) { mem_barrier(); return *(CARD16 *) ((unsigned long) Base + (Offset)); } static inline int xf86ReadMmio32(void *Base, unsigned long Offset) { mem_barrier(); return *(CARD32 *) ((unsigned long) Base + (Offset)); } static inline void xf86WriteMmio8(int Value, void *Base, unsigned long Offset) { write_mem_barrier(); *(CARD8 *) ((unsigned long) Base + (Offset)) = Value; } static inline void xf86WriteMmio16(int Value, void *Base, unsigned long Offset) { write_mem_barrier(); *(CARD16 *) ((unsigned long) Base + (Offset)) = Value; } static inline void xf86WriteMmio32(int Value, void *Base, unsigned long Offset) { write_mem_barrier(); *(CARD32 *) ((unsigned long) Base + (Offset)) = Value; } extern _X_EXPORT void xf86SlowBCopyFromBus(unsigned char *, unsigned char *, int); extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); /* Some macros to hide the system dependencies for MMIO accesses */ /* Changed to kill noise generated by gcc's -Wcast-align */ #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) #define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) #define MMIO_OUT8(base, offset, val) \ xf86WriteMmio8((CARD8)(val), base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16((CARD16)(val), base, offset) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32((CARD32)(val), base, offset) #elif defined(__powerpc__) || defined(__sparc__) /* * we provide byteswapping and no byteswapping functions here * with byteswapping as default, * drivers that don't need byteswapping should define MMIO_IS_BE */ #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) #define MMIO_OUT8(base, offset, val) \ xf86WriteMmio8(base, offset, (CARD8)(val)) #if defined(MMIO_IS_BE) /* No byteswapping */ #define MMIO_IN16(base, offset) xf86ReadMmio16Be(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32Be(base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16Be(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Be(base, offset, (CARD32)(val)) #else /* byteswapping is the default */ #define MMIO_IN16(base, offset) xf86ReadMmio16Le(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32Le(base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16Le(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Le(base, offset, (CARD32)(val)) #endif #elif defined(__nds32__) /* * we provide byteswapping and no byteswapping functions here * with no byteswapping as default; when endianness of CPU core * and I/O devices don't match, byte swapping is necessary * drivers that need byteswapping should define NDS32_MMIO_SWAP */ #define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) #define MMIO_OUT8(base, offset, val) \ xf86WriteMmio8(base, offset, (CARD8)(val)) #if defined(NDS32_MMIO_SWAP) /* byteswapping */ #define MMIO_IN16(base, offset) xf86ReadMmio16Swap(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32Swap(base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16Swap(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32Swap(base, offset, (CARD32)(val)) #else /* no byteswapping is the default */ #define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) #define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) #define MMIO_OUT16(base, offset, val) \ xf86WriteMmio16(base, offset, (CARD16)(val)) #define MMIO_OUT32(base, offset, val) \ xf86WriteMmio32(base, offset, (CARD32)(val)) #endif #else /* !__alpha__ && !__powerpc__ && !__sparc__ */ #define MMIO_IN8(base, offset) \ *(volatile CARD8 *)(((CARD8*)(base)) + (offset)) #define MMIO_IN16(base, offset) \ *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) #define MMIO_IN32(base, offset) \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) #define MMIO_OUT8(base, offset, val) \ *(volatile CARD8 *)(((CARD8*)(base)) + (offset)) = (val) #define MMIO_OUT16(base, offset, val) \ *(volatile CARD16 *)(void *)(((CARD8*)(base)) + (offset)) = (val) #define MMIO_OUT32(base, offset, val) \ *(volatile CARD32 *)(void *)(((CARD8*)(base)) + (offset)) = (val) #endif /* __alpha__ */ /* * With Intel, the version in os-support/misc/SlowBcopy.s is used. * This avoids port I/O during the copy (which causes problems with * some hardware). */ #ifdef __alpha__ #define slowbcopy_tobus(src,dst,count) xf86SlowBCopyToBus(src,dst,count) #define slowbcopy_frombus(src,dst,count) xf86SlowBCopyFromBus(src,dst,count) #else /* __alpha__ */ #define slowbcopy_tobus(src,dst,count) xf86SlowBcopy(src,dst,count) #define slowbcopy_frombus(src,dst,count) xf86SlowBcopy(src,dst,count) #endif /* __alpha__ */ #endif /* _COMPILER_H */ xorg-server-21.1.16/hw/xfree86/common/xf86.h0000644000175000017500000003750114757411105014002 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains declarations for public XFree86 functions and variables, * and definitions of public macros. * * "public" means available to video drivers. */ #ifndef _XF86_H #define _XF86_H #ifdef HAVE_XORG_CONFIG_H #include #elif HAVE_DIX_CONFIG_H #include #endif #include "xf86str.h" #include "xf86Opt.h" #include #include #ifdef RANDR #include #endif #include "propertyst.h" /* General parameters */ extern _X_EXPORT int xf86DoConfigure; extern _X_EXPORT int xf86DoShowOptions; extern _X_EXPORT Bool xf86DoConfigurePass1; extern _X_EXPORT Bool xf86ProbeIgnorePrimary; extern _X_EXPORT Bool xorgHWAccess; extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec; #define xf86ScreenKey (&xf86ScreenKeyRec) extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ extern _X_EXPORT const unsigned char byte_reversed[256]; extern _X_EXPORT Bool fbSlotClaimed; #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) extern _X_EXPORT Bool sbusSlotClaimed; #endif #if defined(XSERVER_PLATFORM_BUS) extern _X_EXPORT int platformSlotClaimed; #endif extern _X_EXPORT confDRIRec xf86ConfigDRI; extern _X_EXPORT Bool xf86DRI2Enabled(void); #define XF86SCRNINFO(p) xf86ScreenToScrn(p) #define BOOLTOSTRING(b) ((b) ? "TRUE" : "FALSE") /* Compatibility functions for pre-input-thread drivers */ static inline _X_DEPRECATED int xf86BlockSIGIO(void) { input_lock(); return 0; } static inline _X_DEPRECATED void xf86UnblockSIGIO(int wasset) { input_unlock(); } /* Function Prototypes */ #ifndef _NO_XF86_PROTOTYPES /* PCI related */ #ifdef XSERVER_LIBPCIACCESS #include extern _X_EXPORT int pciSlotClaimed; extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *); extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp, int chipset, GDevPtr dev, Bool active); extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *, GDevPtr dev); extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func); extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device *pPci); extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device *pPci, memType base); extern _X_EXPORT struct pci_device *xf86GetPciInfoForEntity(int entityIndex); extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets * PCIchipsets, GDevPtr * devList, int numDevs, DriverPtr drvp, int **foundEntities); extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, PciChipsets * p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, void *private); #else #define xf86VGAarbiterInit() do {} while (0) #define xf86VGAarbiterFini() do {} while (0) #define xf86VGAarbiterLock(x) do {} while (0) #define xf86VGAarbiterUnlock(x) do {} while (0) #define xf86VGAarbiterScrnInit(x) do {} while (0) #define xf86VGAarbiterDeviceDecodes() do {} while (0) #define xf86VGAarbiterWrapFunctions() do {} while (0) #endif /* xf86Bus.c */ extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex); extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp); extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance); extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex); extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); #define xf86SetLastScrnFlag(e, s) do { } while (0) extern _X_EXPORT Bool xf86IsEntityShared(int entityIndex); extern _X_EXPORT void xf86SetEntityShared(int entityIndex); extern _X_EXPORT Bool xf86IsEntitySharable(int entityIndex); extern _X_EXPORT void xf86SetEntitySharable(int entityIndex); extern _X_EXPORT Bool xf86IsPrimInitDone(int entityIndex); extern _X_EXPORT void xf86SetPrimInitDone(int entityIndex); extern _X_EXPORT void xf86ClearPrimInitDone(int entityIndex); extern _X_EXPORT int xf86AllocateEntityPrivateIndex(void); extern _X_EXPORT DevUnion *xf86GetEntityPrivate(int entityIndex, int privIndex); /* xf86Configure.c */ extern _X_EXPORT GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset); /* xf86Cursor.c */ extern _X_EXPORT void xf86LockZoom(ScreenPtr pScreen, int lock); extern _X_EXPORT void xf86InitViewport(ScrnInfoPtr pScr); extern _X_EXPORT void xf86SetViewport(ScreenPtr pScreen, int x, int y); extern _X_EXPORT void xf86ZoomViewport(ScreenPtr pScreen, int zoom); extern _X_EXPORT Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode); extern _X_EXPORT void *xf86GetPointerScreenFuncs(void); extern _X_EXPORT void xf86InitOrigins(void); extern _X_EXPORT void xf86ReconfigureLayout(void); /* xf86DPMS.c */ extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); /* xf86DGA.c */ #ifdef XFreeXDGA extern _X_EXPORT Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num); extern _X_EXPORT Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num); extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode; #endif /* xf86Events.c */ typedef struct _InputInfoRec *InputInfoPtr; extern _X_EXPORT void SetTimeSinceLastInputEvent(void); extern _X_EXPORT void *xf86AddInputHandler(int fd, InputHandlerProc proc, void *data); extern _X_EXPORT int xf86RemoveInputHandler(void *handler); extern _X_EXPORT void xf86DisableInputHandler(void *handler); extern _X_EXPORT void xf86EnableInputHandler(void *handler); extern _X_EXPORT void *xf86AddGeneralHandler(int fd, InputHandlerProc proc, void *data); extern _X_EXPORT int xf86RemoveGeneralHandler(void *handler); extern _X_EXPORT void xf86DisableGeneralHandler(void *handler); extern _X_EXPORT void xf86EnableGeneralHandler(void *handler); extern _X_EXPORT InputHandlerProc xf86SetConsoleHandler(InputHandlerProc handler, void *data); extern _X_EXPORT void xf86ProcessActionEvent(ActionEvent action, void *arg); extern _X_EXPORT void xf86PrintBacktrace(void); extern _X_EXPORT Bool xf86VTOwner(void); extern _X_EXPORT void xf86VTLeave(void); extern _X_EXPORT void xf86VTEnter(void); extern _X_EXPORT void xf86EnableInputDeviceForVTSwitch(InputInfoPtr pInfo); extern _X_EXPORT void xf86DisableInputDeviceForVTSwitch(InputInfoPtr pInfo); /* xf86Helper.c */ extern _X_EXPORT void xf86AddDriver(DriverPtr driver, void *module, int flags); extern _X_EXPORT void xf86DeleteDriver(int drvIndex); extern _X_EXPORT ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags); extern _X_EXPORT void xf86DeleteScreen(ScrnInfoPtr pScrn); extern _X_EXPORT int xf86AllocateScrnInfoPrivateIndex(void); extern _X_EXPORT Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad); extern _X_EXPORT Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, int depth24flags); extern _X_EXPORT void xf86PrintDepthBpp(ScrnInfoPtr scrp); extern _X_EXPORT Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); extern _X_EXPORT Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); extern _X_EXPORT Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma newGamma); extern _X_EXPORT void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); extern _X_EXPORT void xf86SetBlackWhitePixels(ScreenPtr pScreen); extern _X_EXPORT void xf86EnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable); extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(4, 0); extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(4, 5); extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT void xf86ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern _X_EXPORT const char * xf86TokenToString(SymTabPtr table, int token); extern _X_EXPORT int xf86StringToToken(SymTabPtr table, const char *string); extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips); extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr ** driversectlist); extern _X_EXPORT const char * xf86GetVisualName(int visual); extern _X_EXPORT int xf86GetVerbosity(void); extern _X_EXPORT int xf86GetDepth(void); extern _X_EXPORT rgb xf86GetWeight(void); extern _X_EXPORT Gamma xf86GetGamma(void); extern _X_EXPORT Bool xf86ServerIsExiting(void); extern _X_EXPORT Bool xf86ServerIsResetting(void); extern _X_EXPORT Bool xf86ServerIsOnlyDetecting(void); extern _X_EXPORT Bool xf86GetVidModeAllowNonLocal(void); extern _X_EXPORT Bool xf86GetVidModeEnabled(void); extern _X_EXPORT Bool xf86GetModInDevAllowNonLocal(void); extern _X_EXPORT Bool xf86GetModInDevEnabled(void); extern _X_EXPORT Bool xf86GetAllowMouseOpenFail(void); extern _X_EXPORT CARD32 xorgGetVersion(void); extern _X_EXPORT CARD32 xf86GetModuleVersion(void *module); extern _X_EXPORT void * xf86LoadDrvSubModule(DriverPtr drv, const char *name); extern _X_EXPORT void * xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); extern _X_EXPORT void * xf86LoadOneModule(const char *name, void *optlist); extern _X_EXPORT void xf86UnloadSubModule(void *mod); extern _X_EXPORT Bool xf86LoaderCheckSymbol(const char *name); extern _X_EXPORT void xf86SetBackingStore(ScreenPtr pScreen); extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen); extern _X_EXPORT void * xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, const char *port_name, const char **adaptor_name, void **adaptor_options); extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, void *private); extern _X_EXPORT Bool xf86IsScreenPrimary(ScrnInfoPtr pScrn); extern _X_EXPORT Bool xf86IsUnblank(int mode); /* xf86Init.c */ extern _X_EXPORT PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth); extern _X_EXPORT int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth); /* xf86Mode.c */ extern _X_EXPORT const char * xf86ModeStatusToString(ModeStatus status); extern _X_EXPORT ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor); extern _X_EXPORT ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags); extern _X_EXPORT int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int minHeight, int maxHeight, int pitchInc, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); extern _X_EXPORT void xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode); extern _X_EXPORT void xf86PruneDriverModes(ScrnInfoPtr scrp); extern _X_EXPORT void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); extern _X_EXPORT void xf86PrintModes(ScrnInfoPtr scrp); extern _X_EXPORT void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges); /* xf86Option.c */ extern _X_EXPORT void xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts); /* xf86RandR.c */ #ifdef RANDR extern _X_EXPORT Bool xf86RandRInit(ScreenPtr pScreen); extern _X_EXPORT Rotation xf86GetRotation(ScreenPtr pScreen); extern _X_EXPORT Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode); #endif /* xf86Extensions.c */ extern void xf86ExtensionInit(void); /* convert ScreenPtr to ScrnInfoPtr */ extern _X_EXPORT ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen); /* convert ScrnInfoPtr to ScreenPtr */ extern _X_EXPORT ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn); #endif /* _NO_XF86_PROTOTYPES */ #define XF86_HAS_SCRN_CONV 1 /* define for drivers to use in api compat */ #define XF86_SCRN_INTERFACE 1 /* define for drivers to use in api compat */ /* flags passed to xf86 allocate screen */ #define XF86_ALLOCATE_GPU_SCREEN 1 /* Update the internal total dimensions of all ScreenRecs together */ extern _X_EXPORT void xf86UpdateDesktopDimensions(void); #endif /* _XF86_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Module.h0000644000175000017500000001653614757411105015155 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the parts of the loader interface that are visible * to modules. This is the only loader-related header that modules should * include. * * It should include a bare minimum of other headers. * * Longer term, the module/loader code should probably live directly under * Xserver/. * * XXX This file arguably belongs in xfree86/loader/. */ #ifndef _XF86MODULE_H #define _XF86MODULE_H #include #include #include #ifndef NULL #define NULL ((void *)0) #endif #define DEFAULT_LIST ((char *)-1) /* Built-in ABI classes. These definitions must not be changed. */ #define ABI_CLASS_NONE NULL #define ABI_CLASS_ANSIC "X.Org ANSI C Emulation" #define ABI_CLASS_VIDEODRV "X.Org Video Driver" #define ABI_CLASS_XINPUT "X.Org XInput driver" #define ABI_CLASS_EXTENSION "X.Org Server Extension" #define ABI_MINOR_MASK 0x0000FFFF #define ABI_MAJOR_MASK 0xFFFF0000 #define GET_ABI_MINOR(v) ((v) & ABI_MINOR_MASK) #define GET_ABI_MAJOR(v) (((v) & ABI_MAJOR_MASK) >> 16) #define SET_ABI_VERSION(maj, min) \ ((((maj) << 16) & ABI_MAJOR_MASK) | ((min) & ABI_MINOR_MASK)) /* * ABI versions. Each version has a major and minor revision. Modules * using lower minor revisions must work with servers of a higher minor * revision. There is no compatibility between different major revisions. * Whenever the ABI_ANSIC_VERSION is changed, the others must also be * changed. The minor revision mask is 0x0000FFFF and the major revision * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) #define ABI_VIDEODRV_VERSION SET_ABI_VERSION(25, 2) #define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 4) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0) #define MODINFOSTRING1 0xef23fdc5 #define MODINFOSTRING2 0x10dc023a #ifndef MODULEVENDORSTRING #define MODULEVENDORSTRING "X.Org Foundation" #endif /* Error return codes for errmaj */ typedef enum { LDR_NOERROR = 0, LDR_NOMEM, /* memory allocation failed */ LDR_NOENT, /* Module file does not exist */ LDR_NOLOAD, /* type specific loader failed */ LDR_ONCEONLY, /* Module should only be loaded once (not an error) */ LDR_MISMATCH, /* the module didn't match the spec'd requirements */ LDR_BADUSAGE, /* LoadModule is called with bad arguments */ LDR_INVALID, /* The module doesn't have a valid ModuleData object */ LDR_BADOS, /* The module doesn't support the OS */ LDR_MODSPECIFIC /* A module-specific error in the SetupProc */ } LoaderErrorCode; /* * Some common module classes. The moduleclass can be used to identify * that modules loaded are of the correct type. This is a finer * classification than the ABI classes even though the default set of * classes have the same names. For example, not all modules that require * the video driver ABI are themselves video drivers. */ #define MOD_CLASS_NONE NULL #define MOD_CLASS_VIDEODRV "X.Org Video Driver" #define MOD_CLASS_XINPUT "X.Org XInput Driver" #define MOD_CLASS_EXTENSION "X.Org Server Extension" /* This structure is expected to be returned by the initfunc */ typedef struct { const char *modname; /* name of module, e.g. "foo" */ const char *vendor; /* vendor specific string */ CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */ CARD32 _modinfo2_; /* infoarea with a binary editor or sign tool */ CARD32 xf86version; /* contains XF86_VERSION_CURRENT */ CARD8 majorversion; /* module-specific major version */ CARD8 minorversion; /* module-specific minor version */ CARD16 patchlevel; /* module-specific patch level */ const char *abiclass; /* ABI class that the module uses */ CARD32 abiversion; /* ABI version */ const char *moduleclass; /* module class description */ CARD32 checksum[4]; /* contains a digital signature of the */ /* version info structure */ } XF86ModuleVersionInfo; /* * This structure can be used to callers of LoadModule and LoadSubModule to * specify version and/or ABI requirements. */ typedef struct { CARD8 majorversion; /* module-specific major version */ CARD8 minorversion; /* moudle-specific minor version */ CARD16 patchlevel; /* module-specific patch level */ const char *abiclass; /* ABI class that the module uses */ CARD32 abiversion; /* ABI version */ const char *moduleclass; /* module class */ } XF86ModReqInfo; #define MODULE_VERSION_NUMERIC(maj, min, patch) \ ((((maj) & 0xFF) << 24) | (((min) & 0xFF) << 16) | (patch & 0xFFFF)) #define GET_MODULE_MAJOR_VERSION(vers) (((vers) >> 24) & 0xFF) #define GET_MODULE_MINOR_VERSION(vers) (((vers) >> 16) & 0xFF) #define GET_MODULE_PATCHLEVEL(vers) ((vers) & 0xFFFF) #define INITARGS void /* Prototypes for Loader functions that are exported to modules */ extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **, const char **, void *, const XF86ModReqInfo *, int *, int *); extern _X_EXPORT void UnloadSubModule(void *); extern _X_EXPORT void UnloadModule(void *); extern _X_EXPORT void *LoaderSymbol(const char *); extern _X_EXPORT void *LoaderSymbolFromModule(void *, const char *); extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); typedef void *(*ModuleSetupProc) (void *, void *, int *, int *); typedef void (*ModuleTearDownProc) (void *); #define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*) #define MODULETEARDOWNPROTO(func) void func(void *) typedef struct { XF86ModuleVersionInfo *vers; ModuleSetupProc setup; ModuleTearDownProc teardown; } XF86ModuleData; #endif /* _XF86STR_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Opt.h0000644000175000017500000001774214757411105014472 /* * Copyright (c) 1998-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* Option handling things that ModuleSetup procs can use */ #ifndef _XF86_OPT_H_ #define _XF86_OPT_H_ #include "xf86Optionstr.h" typedef struct { double freq; int units; } OptFrequency; typedef union { unsigned long num; const char *str; double realnum; Bool boolean; OptFrequency freq; } ValueUnion; typedef enum { OPTV_NONE = 0, OPTV_INTEGER, OPTV_STRING, /* a non-empty string */ OPTV_ANYSTR, /* Any string, including an empty one */ OPTV_REAL, OPTV_BOOLEAN, OPTV_PERCENT, OPTV_FREQ } OptionValueType; typedef enum { OPTUNITS_HZ = 1, OPTUNITS_KHZ, OPTUNITS_MHZ } OptFreqUnits; typedef struct { int token; const char *name; OptionValueType type; ValueUnion value; Bool found; } OptionInfoRec, *OptionInfoPtr; extern _X_EXPORT int xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt); extern _X_EXPORT double xf86SetRealOption(XF86OptionPtr optlist, const char *name, double deflt); extern _X_EXPORT char *xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt); extern _X_EXPORT int xf86SetBoolOption(XF86OptionPtr list, const char *name, int deflt); extern _X_EXPORT double xf86SetPercentOption(XF86OptionPtr list, const char *name, double deflt); extern _X_EXPORT int xf86CheckIntOption(XF86OptionPtr optlist, const char *name, int deflt); extern _X_EXPORT double xf86CheckRealOption(XF86OptionPtr optlist, const char *name, double deflt); extern _X_EXPORT char *xf86CheckStrOption(XF86OptionPtr optlist, const char *name, const char *deflt); extern _X_EXPORT int xf86CheckBoolOption(XF86OptionPtr list, const char *name, int deflt); extern _X_EXPORT double xf86CheckPercentOption(XF86OptionPtr list, const char *name, double deflt); extern _X_EXPORT XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val); extern _X_EXPORT XF86OptionPtr xf86NewOption(char *name, char *value); extern _X_EXPORT XF86OptionPtr xf86NextOption(XF86OptionPtr list); extern _X_EXPORT XF86OptionPtr xf86OptionListCreate(const char **options, int count, int used); extern _X_EXPORT XF86OptionPtr xf86OptionListMerge(XF86OptionPtr head, XF86OptionPtr tail); extern _X_EXPORT XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr list); extern _X_EXPORT void xf86OptionListFree(XF86OptionPtr opt); extern _X_EXPORT char *xf86OptionName(XF86OptionPtr opt); extern _X_EXPORT char *xf86OptionValue(XF86OptionPtr opt); extern _X_EXPORT void xf86OptionListReport(XF86OptionPtr parm); extern _X_EXPORT XF86OptionPtr xf86FindOption(XF86OptionPtr options, const char *name); extern _X_EXPORT const char *xf86FindOptionValue(XF86OptionPtr options, const char *name); extern _X_EXPORT void xf86MarkOptionUsed(XF86OptionPtr option); extern _X_EXPORT void xf86MarkOptionUsedByName(XF86OptionPtr options, const char *name); extern _X_EXPORT Bool xf86CheckIfOptionUsed(XF86OptionPtr option); extern _X_EXPORT Bool xf86CheckIfOptionUsedByName(XF86OptionPtr options, const char *name); extern _X_EXPORT void xf86ShowUnusedOptions(int scrnIndex, XF86OptionPtr options); extern _X_EXPORT void xf86ProcessOptions(int scrnIndex, XF86OptionPtr options, OptionInfoPtr optinfo); extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec * table, int token); extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec * table, int token); extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec * table, int token); extern _X_EXPORT const char *xf86GetOptValString(const OptionInfoRec * table, int token); extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec * table, int token, int *value); extern _X_EXPORT Bool xf86GetOptValULong(const OptionInfoRec * table, int token, unsigned long *value); extern _X_EXPORT Bool xf86GetOptValReal(const OptionInfoRec * table, int token, double *value); extern _X_EXPORT Bool xf86GetOptValFreq(const OptionInfoRec * table, int token, OptFreqUnits expectedUnits, double *value); extern _X_EXPORT Bool xf86GetOptValBool(const OptionInfoRec * table, int token, Bool *value); extern _X_EXPORT Bool xf86ReturnOptValBool(const OptionInfoRec * table, int token, Bool def); extern _X_EXPORT int xf86NameCmp(const char *s1, const char *s2); extern _X_EXPORT char *xf86NormalizeName(const char *s); extern _X_EXPORT XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val); extern _X_EXPORT XF86OptionPtr xf86ReplaceRealOption(XF86OptionPtr optlist, const char *name, const double val); extern _X_EXPORT XF86OptionPtr xf86ReplaceBoolOption(XF86OptionPtr optlist, const char *name, const Bool val); extern _X_EXPORT XF86OptionPtr xf86ReplacePercentOption(XF86OptionPtr optlist, const char *name, const double val); extern _X_EXPORT XF86OptionPtr xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val); #endif xorg-server-21.1.16/hw/xfree86/common/xf86PciInfo.h0000644000175000017500000006124214757411105015251 /* * Copyright (c) 1995-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains macros for the PCI Vendor and Device IDs for video * cards plus a few other things that are needed in drivers or elsewhere. * This information is used in several ways: * 1. It is used by drivers and/or other code. * 2. It is used by the pciid2c.pl script to determine what vendor data to * include in the pcidata module that the X server loads. * 3. A side-effect of 2. affects how config-generation works for * otherwise "unknown" cards. * * Don't add entries here for vendors that don't make video cards, * or for non-video devices unless they're needed by a driver or elsewhere. * A comprehensive set of PCI vendor, device and subsystem data is * auto-generated from the ../etc/pci.ids file using the pciids2c.pl script, * and is used in scanpci utility. Don't modify the pci.ids file. If * new/corrected entries are required, add them to ../etc/extrapci.ids. */ #ifndef _XF86_PCIINFO_H #define _XF86_PCIINFO_H #warning "xf86PciInfo.h is deprecated. For greater compatibility, drivers should include necessary PCI IDs locally rather than relying on this file from xorg-server." /* PCI Pseudo Vendor */ #define PCI_VENDOR_GENERIC 0x00FF #define PCI_VENDOR_REAL3D 0x003D #define PCI_VENDOR_COMPAQ 0x0E11 #define PCI_VENDOR_ATI 0x1002 #define PCI_VENDOR_AVANCE 0x1005 #define PCI_VENDOR_TSENG 0x100C #define PCI_VENDOR_NS 0x100B #define PCI_VENDOR_WEITEK 0x100E #define PCI_VENDOR_VIDEOLOGIC 0x1010 #define PCI_VENDOR_DIGITAL 0x1011 #define PCI_VENDOR_CIRRUS 0x1013 #define PCI_VENDOR_AMD 0x1022 #define PCI_VENDOR_TRIDENT 0x1023 #define PCI_VENDOR_ALI 0x1025 #define PCI_VENDOR_DELL 0x1028 #define PCI_VENDOR_MATROX 0x102B #define PCI_VENDOR_CHIPSTECH 0x102C #define PCI_VENDOR_MIRO 0x1031 #define PCI_VENDOR_NEC 0x1033 #define PCI_VENDOR_SIS 0x1039 #define PCI_VENDOR_HP 0x103C #define PCI_VENDOR_SGS 0x104A #define PCI_VENDOR_TI 0x104C #define PCI_VENDOR_SONY 0x104D #define PCI_VENDOR_OAK 0x104E #define PCI_VENDOR_MOTOROLA 0x1057 #define PCI_VENDOR_NUMNINE 0x105D #define PCI_VENDOR_CYRIX 0x1078 #define PCI_VENDOR_SUN 0x108E #define PCI_VENDOR_DIAMOND 0x1092 #define PCI_VENDOR_BROOKTREE 0x109E #define PCI_VENDOR_NEOMAGIC 0x10C8 #define PCI_VENDOR_NVIDIA 0x10DE #define PCI_VENDOR_IMS 0x10E0 #define PCI_VENDOR_INTEGRAPHICS 0x10EA #define PCI_VENDOR_ALLIANCE 0x1142 #define PCI_VENDOR_RENDITION 0x1163 #define PCI_VENDOR_3DFX 0x121A #define PCI_VENDOR_SMI 0x126F #define PCI_VENDOR_TRITECH 0x1292 #define PCI_VENDOR_NVIDIA_SGS 0x12D2 #define PCI_VENDOR_VMWARE 0x15AD #define PCI_VENDOR_AST 0x1A03 #define PCI_VENDOR_3DLABS 0x3D3D #define PCI_VENDOR_AVANCE_2 0x4005 #define PCI_VENDOR_HERCULES 0x4843 #define PCI_VENDOR_S3 0x5333 #define PCI_VENDOR_INTEL 0x8086 #define PCI_VENDOR_ARK 0xEDD8 /* Generic */ #define PCI_CHIP_VGA 0x0000 #define PCI_CHIP_8514 0x0001 /* Real 3D */ #define PCI_CHIP_I740_PCI 0x00D1 /* Compaq */ #define PCI_CHIP_QV1280 0x3033 /* ATI */ #define PCI_CHIP_RV380_3150 0x3150 #define PCI_CHIP_RV380_3151 0x3151 #define PCI_CHIP_RV380_3152 0x3152 #define PCI_CHIP_RV380_3153 0x3153 #define PCI_CHIP_RV380_3154 0x3154 #define PCI_CHIP_RV380_3156 0x3156 #define PCI_CHIP_RV380_3E50 0x3E50 #define PCI_CHIP_RV380_3E51 0x3E51 #define PCI_CHIP_RV380_3E52 0x3E52 #define PCI_CHIP_RV380_3E53 0x3E53 #define PCI_CHIP_RV380_3E54 0x3E54 #define PCI_CHIP_RV380_3E56 0x3E56 #define PCI_CHIP_RS100_4136 0x4136 #define PCI_CHIP_RS200_4137 0x4137 #define PCI_CHIP_R300_AD 0x4144 #define PCI_CHIP_R300_AE 0x4145 #define PCI_CHIP_R300_AF 0x4146 #define PCI_CHIP_R300_AG 0x4147 #define PCI_CHIP_R350_AH 0x4148 #define PCI_CHIP_R350_AI 0x4149 #define PCI_CHIP_R350_AJ 0x414A #define PCI_CHIP_R350_AK 0x414B #define PCI_CHIP_RV350_AP 0x4150 #define PCI_CHIP_RV350_AQ 0x4151 #define PCI_CHIP_RV360_AR 0x4152 #define PCI_CHIP_RV350_AS 0x4153 #define PCI_CHIP_RV350_AT 0x4154 #define PCI_CHIP_RV350_4155 0x4155 #define PCI_CHIP_RV350_AV 0x4156 #define PCI_CHIP_MACH32 0x4158 #define PCI_CHIP_RS250_4237 0x4237 #define PCI_CHIP_R200_BB 0x4242 #define PCI_CHIP_R200_BC 0x4243 #define PCI_CHIP_RS100_4336 0x4336 #define PCI_CHIP_RS200_4337 0x4337 #define PCI_CHIP_MACH64CT 0x4354 #define PCI_CHIP_MACH64CX 0x4358 #define PCI_CHIP_RS250_4437 0x4437 #define PCI_CHIP_MACH64ET 0x4554 #define PCI_CHIP_MACH64GB 0x4742 #define PCI_CHIP_MACH64GD 0x4744 #define PCI_CHIP_MACH64GI 0x4749 #define PCI_CHIP_MACH64GL 0x474C #define PCI_CHIP_MACH64GM 0x474D #define PCI_CHIP_MACH64GN 0x474E #define PCI_CHIP_MACH64GO 0x474F #define PCI_CHIP_MACH64GP 0x4750 #define PCI_CHIP_MACH64GQ 0x4751 #define PCI_CHIP_MACH64GR 0x4752 #define PCI_CHIP_MACH64GS 0x4753 #define PCI_CHIP_MACH64GT 0x4754 #define PCI_CHIP_MACH64GU 0x4755 #define PCI_CHIP_MACH64GV 0x4756 #define PCI_CHIP_MACH64GW 0x4757 #define PCI_CHIP_MACH64GX 0x4758 #define PCI_CHIP_MACH64GY 0x4759 #define PCI_CHIP_MACH64GZ 0x475A #define PCI_CHIP_RV250_Id 0x4964 #define PCI_CHIP_RV250_Ie 0x4965 #define PCI_CHIP_RV250_If 0x4966 #define PCI_CHIP_RV250_Ig 0x4967 #define PCI_CHIP_R420_JH 0x4A48 #define PCI_CHIP_R420_JI 0x4A49 #define PCI_CHIP_R420_JJ 0x4A4A #define PCI_CHIP_R420_JK 0x4A4B #define PCI_CHIP_R420_JL 0x4A4C #define PCI_CHIP_R420_JM 0x4A4D #define PCI_CHIP_R420_JN 0x4A4E #define PCI_CHIP_R420_4A4F 0x4A4F #define PCI_CHIP_R420_JP 0x4A50 #define PCI_CHIP_R420_4A54 0x4A54 #define PCI_CHIP_R481_4B49 0x4B49 #define PCI_CHIP_R481_4B4A 0x4B4A #define PCI_CHIP_R481_4B4B 0x4B4B #define PCI_CHIP_R481_4B4C 0x4B4C #define PCI_CHIP_MACH64LB 0x4C42 #define PCI_CHIP_MACH64LD 0x4C44 #define PCI_CHIP_RAGE128LE 0x4C45 #define PCI_CHIP_RAGE128LF 0x4C46 #define PCI_CHIP_MACH64LG 0x4C47 #define PCI_CHIP_MACH64LI 0x4C49 #define PCI_CHIP_MACH64LM 0x4C4D #define PCI_CHIP_MACH64LN 0x4C4E #define PCI_CHIP_MACH64LP 0x4C50 #define PCI_CHIP_MACH64LQ 0x4C51 #define PCI_CHIP_MACH64LR 0x4C52 #define PCI_CHIP_MACH64LS 0x4C53 #define PCI_CHIP_RADEON_LW 0x4C57 #define PCI_CHIP_RADEON_LX 0x4C58 #define PCI_CHIP_RADEON_LY 0x4C59 #define PCI_CHIP_RADEON_LZ 0x4C5A #define PCI_CHIP_RV250_Ld 0x4C64 #define PCI_CHIP_RV250_Le 0x4C65 #define PCI_CHIP_RV250_Lf 0x4C66 #define PCI_CHIP_RV250_Lg 0x4C67 #define PCI_CHIP_RV250_Ln 0x4C6E #define PCI_CHIP_RAGE128MF 0x4D46 #define PCI_CHIP_RAGE128ML 0x4D4C #define PCI_CHIP_R300_ND 0x4E44 #define PCI_CHIP_R300_NE 0x4E45 #define PCI_CHIP_R300_NF 0x4E46 #define PCI_CHIP_R300_NG 0x4E47 #define PCI_CHIP_R350_NH 0x4E48 #define PCI_CHIP_R350_NI 0x4E49 #define PCI_CHIP_R360_NJ 0x4E4A #define PCI_CHIP_R350_NK 0x4E4B #define PCI_CHIP_RV350_NP 0x4E50 #define PCI_CHIP_RV350_NQ 0x4E51 #define PCI_CHIP_RV350_NR 0x4E52 #define PCI_CHIP_RV350_NS 0x4E53 #define PCI_CHIP_RV350_NT 0x4E54 #define PCI_CHIP_RV350_NV 0x4E56 #define PCI_CHIP_RAGE128PA 0x5041 #define PCI_CHIP_RAGE128PB 0x5042 #define PCI_CHIP_RAGE128PC 0x5043 #define PCI_CHIP_RAGE128PD 0x5044 #define PCI_CHIP_RAGE128PE 0x5045 #define PCI_CHIP_RAGE128PF 0x5046 #define PCI_CHIP_RAGE128PG 0x5047 #define PCI_CHIP_RAGE128PH 0x5048 #define PCI_CHIP_RAGE128PI 0x5049 #define PCI_CHIP_RAGE128PJ 0x504A #define PCI_CHIP_RAGE128PK 0x504B #define PCI_CHIP_RAGE128PL 0x504C #define PCI_CHIP_RAGE128PM 0x504D #define PCI_CHIP_RAGE128PN 0x504E #define PCI_CHIP_RAGE128PO 0x504F #define PCI_CHIP_RAGE128PP 0x5050 #define PCI_CHIP_RAGE128PQ 0x5051 #define PCI_CHIP_RAGE128PR 0x5052 #define PCI_CHIP_RAGE128PS 0x5053 #define PCI_CHIP_RAGE128PT 0x5054 #define PCI_CHIP_RAGE128PU 0x5055 #define PCI_CHIP_RAGE128PV 0x5056 #define PCI_CHIP_RAGE128PW 0x5057 #define PCI_CHIP_RAGE128PX 0x5058 #define PCI_CHIP_RADEON_QD 0x5144 #define PCI_CHIP_RADEON_QE 0x5145 #define PCI_CHIP_RADEON_QF 0x5146 #define PCI_CHIP_RADEON_QG 0x5147 #define PCI_CHIP_R200_QH 0x5148 #define PCI_CHIP_R200_QI 0x5149 #define PCI_CHIP_R200_QJ 0x514A #define PCI_CHIP_R200_QK 0x514B #define PCI_CHIP_R200_QL 0x514C #define PCI_CHIP_R200_QM 0x514D #define PCI_CHIP_R200_QN 0x514E #define PCI_CHIP_R200_QO 0x514F #define PCI_CHIP_RV200_QW 0x5157 #define PCI_CHIP_RV200_QX 0x5158 #define PCI_CHIP_RV100_QY 0x5159 #define PCI_CHIP_RV100_QZ 0x515A #define PCI_CHIP_RN50_515E 0x515E #define PCI_CHIP_RAGE128RE 0x5245 #define PCI_CHIP_RAGE128RF 0x5246 #define PCI_CHIP_RAGE128RG 0x5247 #define PCI_CHIP_RAGE128RK 0x524B #define PCI_CHIP_RAGE128RL 0x524C #define PCI_CHIP_RAGE128SE 0x5345 #define PCI_CHIP_RAGE128SF 0x5346 #define PCI_CHIP_RAGE128SG 0x5347 #define PCI_CHIP_RAGE128SH 0x5348 #define PCI_CHIP_RAGE128SK 0x534B #define PCI_CHIP_RAGE128SL 0x534C #define PCI_CHIP_RAGE128SM 0x534D #define PCI_CHIP_RAGE128SN 0x534E #define PCI_CHIP_RAGE128TF 0x5446 #define PCI_CHIP_RAGE128TL 0x544C #define PCI_CHIP_RAGE128TR 0x5452 #define PCI_CHIP_RAGE128TS 0x5453 #define PCI_CHIP_RAGE128TT 0x5454 #define PCI_CHIP_RAGE128TU 0x5455 #define PCI_CHIP_RV370_5460 0x5460 #define PCI_CHIP_RV370_5461 0x5461 #define PCI_CHIP_RV370_5462 0x5462 #define PCI_CHIP_RV370_5463 0x5463 #define PCI_CHIP_RV370_5464 0x5464 #define PCI_CHIP_RV370_5465 0x5465 #define PCI_CHIP_RV370_5466 0x5466 #define PCI_CHIP_RV370_5467 0x5467 #define PCI_CHIP_R423_UH 0x5548 #define PCI_CHIP_R423_UI 0x5549 #define PCI_CHIP_R423_UJ 0x554A #define PCI_CHIP_R423_UK 0x554B #define PCI_CHIP_R430_554C 0x554C #define PCI_CHIP_R430_554D 0x554D #define PCI_CHIP_R430_554E 0x554E #define PCI_CHIP_R430_554F 0x554F #define PCI_CHIP_R423_5550 0x5550 #define PCI_CHIP_R423_UQ 0x5551 #define PCI_CHIP_R423_UR 0x5552 #define PCI_CHIP_R423_UT 0x5554 #define PCI_CHIP_RV410_564A 0x564A #define PCI_CHIP_RV410_564B 0x564B #define PCI_CHIP_RV410_564F 0x564F #define PCI_CHIP_RV410_5652 0x5652 #define PCI_CHIP_RV410_5653 0x5653 #define PCI_CHIP_MACH64VT 0x5654 #define PCI_CHIP_MACH64VU 0x5655 #define PCI_CHIP_MACH64VV 0x5656 #define PCI_CHIP_RS300_5834 0x5834 #define PCI_CHIP_RS300_5835 0x5835 #define PCI_CHIP_RS300_5836 0x5836 #define PCI_CHIP_RS300_5837 0x5837 #define PCI_CHIP_RS480_5954 0x5954 #define PCI_CHIP_RS480_5955 0x5955 #define PCI_CHIP_RV280_5960 0x5960 #define PCI_CHIP_RV280_5961 0x5961 #define PCI_CHIP_RV280_5962 0x5962 #define PCI_CHIP_RV280_5964 0x5964 #define PCI_CHIP_RV280_5965 0x5965 #define PCI_CHIP_RN50_5969 0x5969 #define PCI_CHIP_RS482_5974 0x5974 #define PCI_CHIP_RS482_5975 0x5975 #define PCI_CHIP_RS400_5A41 0x5A41 #define PCI_CHIP_RS400_5A42 0x5A42 #define PCI_CHIP_RC410_5A61 0x5A61 #define PCI_CHIP_RC410_5A62 0x5A62 #define PCI_CHIP_RV370_5B60 0x5B60 #define PCI_CHIP_RV370_5B61 0x5B61 #define PCI_CHIP_RV370_5B62 0x5B62 #define PCI_CHIP_RV370_5B63 0x5B63 #define PCI_CHIP_RV370_5B64 0x5B64 #define PCI_CHIP_RV370_5B65 0x5B65 #define PCI_CHIP_RV370_5B66 0x5B66 #define PCI_CHIP_RV370_5B67 0x5B67 #define PCI_CHIP_RV280_5C61 0x5C61 #define PCI_CHIP_RV280_5C63 0x5C63 #define PCI_CHIP_R430_5D48 0x5D48 #define PCI_CHIP_R430_5D49 0x5D49 #define PCI_CHIP_R430_5D4A 0x5D4A #define PCI_CHIP_R480_5D4C 0x5D4C #define PCI_CHIP_R480_5D4D 0x5D4D #define PCI_CHIP_R480_5D4E 0x5D4E #define PCI_CHIP_R480_5D4F 0x5D4F #define PCI_CHIP_R480_5D50 0x5D50 #define PCI_CHIP_R480_5D52 0x5D52 #define PCI_CHIP_R423_5D57 0x5D57 #define PCI_CHIP_RV410_5E48 0x5E48 #define PCI_CHIP_RV410_5E4A 0x5E4A #define PCI_CHIP_RV410_5E4B 0x5E4B #define PCI_CHIP_RV410_5E4C 0x5E4C #define PCI_CHIP_RV410_5E4D 0x5E4D #define PCI_CHIP_RV410_5E4F 0x5E4F #define PCI_CHIP_RS350_7834 0x7834 #define PCI_CHIP_RS350_7835 0x7835 /* ASPEED Technology (AST) */ #define PCI_CHIP_AST2000 0x2000 /* Avance Logic */ #define PCI_CHIP_ALG2064 0x2064 #define PCI_CHIP_ALG2301 0x2301 #define PCI_CHIP_ALG2501 0x2501 /* Tseng */ #define PCI_CHIP_ET4000_W32P_A 0x3202 #define PCI_CHIP_ET4000_W32P_B 0x3205 #define PCI_CHIP_ET4000_W32P_D 0x3206 #define PCI_CHIP_ET4000_W32P_C 0x3207 #define PCI_CHIP_ET6000 0x3208 #define PCI_CHIP_ET6300 0x4702 /* Weitek */ #define PCI_CHIP_P9000 0x9001 #define PCI_CHIP_P9100 0x9100 /* Digital */ #define PCI_CHIP_DC21050 0x0001 #define PCI_CHIP_DEC21030 0x0004 #define PCI_CHIP_TGA2 0x000D /* Cirrus Logic */ #define PCI_CHIP_GD7548 0x0038 #define PCI_CHIP_GD7555 0x0040 #define PCI_CHIP_GD5430 0x00A0 #define PCI_CHIP_GD5434_4 0x00A4 #define PCI_CHIP_GD5434_8 0x00A8 #define PCI_CHIP_GD5436 0x00AC #define PCI_CHIP_GD5446 0x00B8 #define PCI_CHIP_GD5480 0x00BC #define PCI_CHIP_GD5462 0x00D0 #define PCI_CHIP_GD5464 0x00D4 #define PCI_CHIP_GD5464BD 0x00D5 #define PCI_CHIP_GD5465 0x00D6 #define PCI_CHIP_6729 0x1100 #define PCI_CHIP_6832 0x1110 #define PCI_CHIP_GD7542 0x1200 #define PCI_CHIP_GD7543 0x1202 #define PCI_CHIP_GD7541 0x1204 /* AMD */ #define PCI_CHIP_AMD761 0x700E /* Trident */ #define PCI_CHIP_2100 0x2100 #define PCI_CHIP_8400 0x8400 #define PCI_CHIP_8420 0x8420 #define PCI_CHIP_8500 0x8500 #define PCI_CHIP_8520 0x8520 #define PCI_CHIP_8600 0x8600 #define PCI_CHIP_8620 0x8620 #define PCI_CHIP_8820 0x8820 #define PCI_CHIP_9320 0x9320 #define PCI_CHIP_9388 0x9388 #define PCI_CHIP_9397 0x9397 #define PCI_CHIP_939A 0x939A #define PCI_CHIP_9420 0x9420 #define PCI_CHIP_9440 0x9440 #define PCI_CHIP_9520 0x9520 #define PCI_CHIP_9525 0x9525 #define PCI_CHIP_9540 0x9540 #define PCI_CHIP_9660 0x9660 #define PCI_CHIP_9750 0x9750 #define PCI_CHIP_9850 0x9850 #define PCI_CHIP_9880 0x9880 #define PCI_CHIP_9910 0x9910 /* ALI */ #define PCI_CHIP_M1435 0x1435 /* Matrox */ #define PCI_CHIP_MGA2085 0x0518 #define PCI_CHIP_MGA2064 0x0519 #define PCI_CHIP_MGA1064 0x051A #define PCI_CHIP_MGA2164 0x051B #define PCI_CHIP_MGA2164_AGP 0x051F #define PCI_CHIP_MGAG200_PCI 0x0520 #define PCI_CHIP_MGAG200 0x0521 #define PCI_CHIP_MGAG400 0x0525 #define PCI_CHIP_MGAG550 0x2527 #define PCI_CHIP_IMPRESSION 0x0D10 #define PCI_CHIP_MGAG100_PCI 0x1000 #define PCI_CHIP_MGAG100 0x1001 #define PCI_CARD_G400_TH 0x2179 #define PCI_CARD_MILL_G200_SD 0xFF00 #define PCI_CARD_PROD_G100_SD 0xFF01 #define PCI_CARD_MYST_G200_SD 0xFF02 #define PCI_CARD_MILL_G200_SG 0xFF03 #define PCI_CARD_MARV_G200_SD 0xFF04 /* Chips & Tech */ #define PCI_CHIP_65545 0x00D8 #define PCI_CHIP_65548 0x00DC #define PCI_CHIP_65550 0x00E0 #define PCI_CHIP_65554 0x00E4 #define PCI_CHIP_65555 0x00E5 #define PCI_CHIP_68554 0x00F4 #define PCI_CHIP_69000 0x00C0 #define PCI_CHIP_69030 0x0C30 /* Miro */ #define PCI_CHIP_ZR36050 0x5601 /* NEC */ #define PCI_CHIP_POWER_VR 0x0046 /* SiS */ #define PCI_CHIP_SG86C201 0x0001 #define PCI_CHIP_SG86C202 0x0002 #define PCI_CHIP_SG85C503 0x0008 #define PCI_CHIP_SIS5597 0x0200 /* Agregado por Carlos Duclos & Manuel Jander */ #define PCI_CHIP_SIS82C204 0x0204 #define PCI_CHIP_SG86C205 0x0205 #define PCI_CHIP_SG86C215 0x0215 #define PCI_CHIP_SG86C225 0x0225 #define PCI_CHIP_85C501 0x0406 #define PCI_CHIP_85C496 0x0496 #define PCI_CHIP_85C601 0x0601 #define PCI_CHIP_85C5107 0x5107 #define PCI_CHIP_85C5511 0x5511 #define PCI_CHIP_85C5513 0x5513 #define PCI_CHIP_SIS5571 0x5571 #define PCI_CHIP_SIS5597_2 0x5597 #define PCI_CHIP_SIS530 0x6306 #define PCI_CHIP_SIS6326 0x6326 #define PCI_CHIP_SIS7001 0x7001 #define PCI_CHIP_SIS300 0x0300 #define PCI_CHIP_SIS315H 0x0310 #define PCI_CHIP_SIS315PRO 0x0325 #define PCI_CHIP_SIS330 0x0330 #define PCI_CHIP_SIS630 0x6300 #define PCI_CHIP_SIS540 0x5300 #define PCI_CHIP_SIS550 0x5315 #define PCI_CHIP_SIS650 0x6325 #define PCI_CHIP_SIS730 0x7300 /* Hewlett-Packard */ #define PCI_CHIP_ELROY 0x1054 #define PCI_CHIP_ZX1_SBA 0x1229 #define PCI_CHIP_ZX1_IOC 0x122A #define PCI_CHIP_ZX1_LBA 0x122E /* a.k.a. Mercury */ #define PCI_CHIP_ZX1_AGP8 0x12B4 /* a.k.a. QuickSilver */ #define PCI_CHIP_ZX2_LBA 0x12EE #define PCI_CHIP_ZX2_SBA 0x4030 #define PCI_CHIP_ZX2_IOC 0x4031 #define PCI_CHIP_ZX2_PCIE 0x4037 /* SGS */ #define PCI_CHIP_STG2000 0x0008 #define PCI_CHIP_STG1764 0x0009 #define PCI_CHIP_KYROII 0x0010 /* Texas Instruments */ #define PCI_CHIP_TI_PERMEDIA 0x3D04 #define PCI_CHIP_TI_PERMEDIA2 0x3D07 /* Oak */ #define PCI_CHIP_OTI107 0x0107 /* Number Nine */ #define PCI_CHIP_I128 0x2309 #define PCI_CHIP_I128_2 0x2339 #define PCI_CHIP_I128_T2R 0x493D #define PCI_CHIP_I128_T2R4 0x5348 /* Sun */ #define PCI_CHIP_EBUS 0x1000 #define PCI_CHIP_HAPPY_MEAL 0x1001 #define PCI_CHIP_SIMBA 0x5000 #define PCI_CHIP_PSYCHO 0x8000 #define PCI_CHIP_SCHIZO 0x8001 #define PCI_CHIP_SABRE 0xA000 #define PCI_CHIP_HUMMINGBIRD 0xA001 /* BrookTree */ #define PCI_CHIP_BT848 0x0350 #define PCI_CHIP_BT849 0x0351 /* NVIDIA */ #define PCI_CHIP_NV1 0x0008 #define PCI_CHIP_DAC64 0x0009 #define PCI_CHIP_TNT 0x0020 #define PCI_CHIP_TNT2 0x0028 #define PCI_CHIP_UTNT2 0x0029 #define PCI_CHIP_VTNT2 0x002C #define PCI_CHIP_UVTNT2 0x002D #define PCI_CHIP_ITNT2 0x00A0 #define PCI_CHIP_GEFORCE_256 0x0100 #define PCI_CHIP_GEFORCE_DDR 0x0101 #define PCI_CHIP_QUADRO 0x0103 #define PCI_CHIP_GEFORCE2_MX 0x0110 #define PCI_CHIP_GEFORCE2_MX_100 0x0111 #define PCI_CHIP_GEFORCE2_GO 0x0112 #define PCI_CHIP_QUADRO2_MXR 0x0113 #define PCI_CHIP_GEFORCE2_GTS 0x0150 #define PCI_CHIP_GEFORCE2_TI 0x0151 #define PCI_CHIP_GEFORCE2_ULTRA 0x0152 #define PCI_CHIP_QUADRO2_PRO 0x0153 #define PCI_CHIP_GEFORCE4_MX_460 0x0170 #define PCI_CHIP_GEFORCE4_MX_440 0x0171 #define PCI_CHIP_GEFORCE4_MX_420 0x0172 #define PCI_CHIP_GEFORCE4_440_GO 0x0174 #define PCI_CHIP_GEFORCE4_420_GO 0x0175 #define PCI_CHIP_GEFORCE4_420_GO_M32 0x0176 #define PCI_CHIP_QUADRO4_500XGL 0x0178 #define PCI_CHIP_GEFORCE4_440_GO_M64 0x0179 #define PCI_CHIP_QUADRO4_200 0x017A #define PCI_CHIP_QUADRO4_550XGL 0x017B #define PCI_CHIP_QUADRO4_500_GOGL 0x017C #define PCI_CHIP_IGEFORCE2 0x01A0 #define PCI_CHIP_GEFORCE3 0x0200 #define PCI_CHIP_GEFORCE3_TI_200 0x0201 #define PCI_CHIP_GEFORCE3_TI_500 0x0202 #define PCI_CHIP_QUADRO_DCC 0x0203 #define PCI_CHIP_GEFORCE4_TI_4600 0x0250 #define PCI_CHIP_GEFORCE4_TI_4400 0x0251 #define PCI_CHIP_GEFORCE4_TI_4200 0x0253 #define PCI_CHIP_QUADRO4_900XGL 0x0258 #define PCI_CHIP_QUADRO4_750XGL 0x0259 #define PCI_CHIP_QUADRO4_700XGL 0x025B /* NVIDIA & SGS */ #define PCI_CHIP_RIVA128 0x0018 /* IMS */ #define PCI_CHIP_IMSTT128 0x9128 #define PCI_CHIP_IMSTT3D 0x9135 /* Alliance Semiconductor */ #define PCI_CHIP_AP6410 0x3210 #define PCI_CHIP_AP6422 0x6422 #define PCI_CHIP_AT24 0x6424 #define PCI_CHIP_AT3D 0x643D /* 3dfx Interactive */ #define PCI_CHIP_VOODOO_GRAPHICS 0x0001 #define PCI_CHIP_VOODOO2 0x0002 #define PCI_CHIP_BANSHEE 0x0003 #define PCI_CHIP_VOODOO3 0x0005 #define PCI_CHIP_VOODOO5 0x0009 #define PCI_CARD_VOODOO3_2000 0x0036 #define PCI_CARD_VOODOO3_3000 0x003A /* Rendition */ #define PCI_CHIP_V1000 0x0001 #define PCI_CHIP_V2x00 0x2000 /* 3Dlabs */ #define PCI_CHIP_300SX 0x0001 #define PCI_CHIP_500TX 0x0002 #define PCI_CHIP_DELTA 0x0003 #define PCI_CHIP_PERMEDIA 0x0004 #define PCI_CHIP_MX 0x0006 #define PCI_CHIP_PERMEDIA2 0x0007 #define PCI_CHIP_GAMMA 0x0008 #define PCI_CHIP_PERMEDIA2V 0x0009 #define PCI_CHIP_PERMEDIA3 0x000A #define PCI_CHIP_PERMEDIA4 0x000C #define PCI_CHIP_R4 0x000D #define PCI_CHIP_GAMMA2 0x000E #define PCI_CHIP_R4ALT 0x0011 /* S3 */ #define PCI_CHIP_PLATO 0x0551 #define PCI_CHIP_VIRGE 0x5631 #define PCI_CHIP_TRIO 0x8811 #define PCI_CHIP_AURORA64VP 0x8812 #define PCI_CHIP_TRIO64UVP 0x8814 #define PCI_CHIP_VIRGE_VX 0x883D #define PCI_CHIP_868 0x8880 #define PCI_CHIP_928 0x88B0 #define PCI_CHIP_864_0 0x88C0 #define PCI_CHIP_864_1 0x88C1 #define PCI_CHIP_964_0 0x88D0 #define PCI_CHIP_964_1 0x88D1 #define PCI_CHIP_968 0x88F0 #define PCI_CHIP_TRIO64V2_DXGX 0x8901 #define PCI_CHIP_PLATO_PX 0x8902 #define PCI_CHIP_Trio3D 0x8904 #define PCI_CHIP_VIRGE_DXGX 0x8A01 #define PCI_CHIP_VIRGE_GX2 0x8A10 #define PCI_CHIP_Trio3D_2X 0x8A13 #define PCI_CHIP_SAVAGE3D 0x8A20 #define PCI_CHIP_SAVAGE3D_MV 0x8A21 #define PCI_CHIP_SAVAGE4 0x8A22 #define PCI_CHIP_PROSAVAGE_PM 0x8A25 #define PCI_CHIP_PROSAVAGE_KM 0x8A26 #define PCI_CHIP_VIRGE_MX 0x8C01 #define PCI_CHIP_VIRGE_MXPLUS 0x8C02 #define PCI_CHIP_VIRGE_MXP 0x8C03 #define PCI_CHIP_SAVAGE_MX_MV 0x8C10 #define PCI_CHIP_SAVAGE_MX 0x8C11 #define PCI_CHIP_SAVAGE_IX_MV 0x8C12 #define PCI_CHIP_SAVAGE_IX 0x8C13 #define PCI_CHIP_SUPSAV_MX128 0x8C22 #define PCI_CHIP_SUPSAV_MX64 0x8C24 #define PCI_CHIP_SUPSAV_MX64C 0x8C26 #define PCI_CHIP_SUPSAV_IX128SDR 0x8C2A #define PCI_CHIP_SUPSAV_IX128DDR 0x8C2B #define PCI_CHIP_SUPSAV_IX64SDR 0x8C2C #define PCI_CHIP_SUPSAV_IX64DDR 0x8C2D #define PCI_CHIP_SUPSAV_IXCSDR 0x8C2E #define PCI_CHIP_SUPSAV_IXCDDR 0x8C2F #define PCI_CHIP_S3TWISTER_P 0x8D01 #define PCI_CHIP_S3TWISTER_K 0x8D02 #define PCI_CHIP_PROSAVAGE_DDR 0x8D03 #define PCI_CHIP_PROSAVAGE_DDRK 0x8D04 #define PCI_CHIP_SAVAGE2000 0x9102 /* ARK Logic */ #define PCI_CHIP_1000PV 0xA091 #define PCI_CHIP_2000PV 0xA099 #define PCI_CHIP_2000MT 0xA0A1 #define PCI_CHIP_2000MI 0xA0A9 /* Tritech Microelectronics */ #define PCI_CHIP_TR25202 0xFC02 /* Neomagic */ #define PCI_CHIP_NM2070 0x0001 #define PCI_CHIP_NM2090 0x0002 #define PCI_CHIP_NM2093 0x0003 #define PCI_CHIP_NM2097 0x0083 #define PCI_CHIP_NM2160 0x0004 #define PCI_CHIP_NM2200 0x0005 #define PCI_CHIP_NM2230 0x0025 #define PCI_CHIP_NM2360 0x0006 #define PCI_CHIP_NM2380 0x0016 /* Intel */ #define PCI_CHIP_I815_BRIDGE 0x1130 #define PCI_CHIP_I815 0x1132 #define PCI_CHIP_82801_P2P 0x244E #define PCI_CHIP_845_G_BRIDGE 0x2560 #define PCI_CHIP_845_G 0x2562 #define PCI_CHIP_I830_M_BRIDGE 0x3575 #define PCI_CHIP_I830_M 0x3577 #define PCI_CHIP_I810_BRIDGE 0x7120 #define PCI_CHIP_I810 0x7121 #define PCI_CHIP_I810_DC100_BRIDGE 0x7122 #define PCI_CHIP_I810_DC100 0x7123 #define PCI_CHIP_I810_E_BRIDGE 0x7124 #define PCI_CHIP_I810_E 0x7125 #define PCI_CHIP_I740_AGP 0x7800 #define PCI_CHIP_460GX_PXB 0x84CB #define PCI_CHIP_460GX_SAC 0x84E0 #define PCI_CHIP_460GX_GXB_2 0x84E2 /* PCI function 2 */ #define PCI_CHIP_460GX_WXB 0x84E6 #define PCI_CHIP_460GX_GXB_1 0x84EA /* PCI function 1 */ /* Silicon Motion Inc. */ #define PCI_CHIP_SMI910 0x0910 #define PCI_CHIP_SMI810 0x0810 #define PCI_CHIP_SMI820 0x0820 #define PCI_CHIP_SMI710 0x0710 #define PCI_CHIP_SMI712 0x0712 #define PCI_CHIP_SMI720 0x0720 #define PCI_CHIP_SMI731 0x0730 /* VMware */ #define PCI_CHIP_VMWARE0405 0x0405 #define PCI_CHIP_VMWARE0710 0x0710 #endif /* _XF86_PCIINFO_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Priv.h0000644000175000017500000001271514757411105014643 /* * Copyright (c) 1997-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains declarations for private XFree86 functions and variables, * and definitions of private macros. * * "private" means not available to video drivers. */ #ifndef _XF86PRIV_H #define _XF86PRIV_H #include "xf86Privstr.h" #include "propertyst.h" #include "input.h" /* * Parameters set ONLY from the command line options * The global state of these things is held in xf86InfoRec (when appropriate). */ extern _X_EXPORT const char *xf86ConfigFile; extern _X_EXPORT const char *xf86ConfigDir; extern _X_EXPORT Bool xf86AllowMouseOpenFail; extern _X_EXPORT Bool xf86AutoBindGPUDisabled; #ifdef XF86VIDMODE extern _X_EXPORT Bool xf86VidModeDisabled; extern _X_EXPORT Bool xf86VidModeAllowNonLocal; #endif extern _X_EXPORT Bool xf86fpFlag; extern _X_EXPORT Bool xf86sFlag; extern _X_EXPORT Bool xf86bsEnableFlag; extern _X_EXPORT Bool xf86bsDisableFlag; extern _X_EXPORT Bool xf86silkenMouseDisableFlag; extern _X_EXPORT Bool xf86xkbdirFlag; #ifdef HAVE_ACPI extern _X_EXPORT Bool xf86acpiDisableFlag; #endif extern _X_EXPORT char *xf86LayoutName; extern _X_EXPORT char *xf86ScreenName; extern _X_EXPORT char *xf86PointerName; extern _X_EXPORT char *xf86KeyboardName; extern _X_EXPORT int xf86FbBpp; extern _X_EXPORT int xf86Depth; extern _X_EXPORT rgb xf86Weight; extern _X_EXPORT Gamma xf86Gamma; /* Other parameters */ extern _X_EXPORT xf86InfoRec xf86Info; extern _X_EXPORT const char *xf86ModulePath; extern _X_EXPORT MessageType xf86ModPathFrom; extern _X_EXPORT const char *xf86LogFile; extern _X_EXPORT MessageType xf86LogFileFrom; extern _X_EXPORT Bool xf86LogFileWasOpened; extern _X_EXPORT serverLayoutRec xf86ConfigLayout; extern _X_EXPORT DriverPtr *xf86DriverList; extern _X_EXPORT int xf86NumDrivers; extern _X_EXPORT Bool xf86Resetting; extern Bool xf86Initialising; extern _X_EXPORT int xf86NumScreens; extern _X_EXPORT const char *xf86VisualNames[]; extern _X_EXPORT int xf86Verbose; /* verbosity level */ extern _X_EXPORT int xf86LogVerbose; /* log file verbosity level */ extern _X_EXPORT ScrnInfoPtr *xf86GPUScreens; /* List of pointers to ScrnInfoRecs */ extern _X_EXPORT int xf86NumGPUScreens; extern _X_EXPORT int xf86DRMMasterFd; /* Command line argument for DRM master file descriptor */ #ifndef DEFAULT_VERBOSE #define DEFAULT_VERBOSE 0 #endif #ifndef DEFAULT_LOG_VERBOSE #define DEFAULT_LOG_VERBOSE 3 #endif #ifndef DEFAULT_DPI #define DEFAULT_DPI 96 #endif /* Function Prototypes */ #ifndef _NO_XF86_PROTOTYPES /* xf86Bus.c */ extern _X_EXPORT Bool xf86BusConfig(void); extern _X_EXPORT void xf86BusProbe(void); extern _X_EXPORT void xf86PostProbe(void); extern _X_EXPORT void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn); extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); extern _X_EXPORT void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev); /* xf86Config.c */ extern _X_EXPORT Bool xf86PathIsSafe(const char *path); /* xf86DefaultModes */ extern _X_EXPORT const DisplayModeRec xf86DefaultModes[]; extern _X_EXPORT const int xf86NumDefaultModes; /* xf86Configure.c */ extern _X_EXPORT void DoConfigure(void) _X_NORETURN; extern _X_EXPORT void DoShowOptions(void) _X_NORETURN; /* xf86Events.c */ extern _X_EXPORT void xf86Wakeup(void *blockData, int err); extern _X_EXPORT void xf86HandlePMEvents(int fd, void *data); extern _X_EXPORT int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, int num); extern _X_EXPORT pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event); /* xf86Helper.c */ extern _X_EXPORT void xf86LogInit(void); extern _X_EXPORT void xf86CloseLog(enum ExitCode error); /* xf86Init.c */ extern _X_EXPORT Bool xf86LoadModules(const char **list, void **optlist); extern _X_EXPORT int xf86SetVerbosity(int verb); extern _X_EXPORT int xf86SetLogVerbosity(int verb); extern _X_EXPORT Bool xf86CallDriverProbe(struct _DriverRec *drv, Bool detect_only); extern _X_EXPORT Bool xf86PrivsElevated(void); extern _X_EXPORT Bool xf86HasTTYs(void); #endif /* _NO_XF86_PROTOTYPES */ #endif /* _XF86PRIV_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Privstr.h0000644000175000017500000001021614757411105015366 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains definitions of the private XFree86 data structures/types. * None of the data structures here should be used by video drivers. */ #ifndef _XF86PRIVSTR_H #define _XF86PRIVSTR_H #include "xf86str.h" typedef enum { XF86_GlxVisualsMinimal, XF86_GlxVisualsTypical, XF86_GlxVisualsAll, } XF86_GlxVisuals; /* * xf86InfoRec contains global parameters which the video drivers never * need to access. Global parameters which the video drivers do need * should be individual globals. */ typedef struct { int consoleFd; int vtno; /* event handler part */ int lastEventTime; Bool vtRequestsPending; #ifdef __sun int vtPendingNum; #endif Bool dontVTSwitch; Bool autoVTSwitch; Bool ShareVTs; Bool dontZap; Bool dontZoom; /* graphics part */ ScreenPtr currentScreen; #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) int consType; /* Which console driver? */ #endif /* Other things */ Bool allowMouseOpenFail; Bool vidModeEnabled; /* VidMode extension enabled */ Bool vidModeAllowNonLocal; /* allow non-local VidMode * connections */ Bool miscModInDevEnabled; /* Allow input devices to be * changed */ Bool miscModInDevAllowNonLocal; Bool pmFlag; MessageType iglxFrom; XF86_GlxVisuals glxVisuals; MessageType glxVisualsFrom; Bool useDefaultFontPath; Bool ignoreABI; Bool forceInputDevices; /* force xorg.conf or built-in input devices */ Bool autoAddDevices; /* Whether to succeed NIDR, or ignore. */ Bool autoEnableDevices; /* Whether to enable, or let the client * control. */ Bool dri2; MessageType dri2From; Bool autoAddGPU; const char *debug; Bool autoBindGPU; } xf86InfoRec, *xf86InfoPtr; /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ #define XLED1 ((unsigned long) 0x00000001) #define XLED2 ((unsigned long) 0x00000002) #define XLED3 ((unsigned long) 0x00000004) #define XLED4 ((unsigned long) 0x00000008) #define XCAPS ((unsigned long) 0x20000000) #define XNUM ((unsigned long) 0x40000000) #define XSCR ((unsigned long) 0x80000000) #define XCOMP ((unsigned long) 0x00008000) /* BSD console driver types (consType) */ #if defined(CSRG_BASED) || defined(__FreeBSD_kernel__) #define PCCONS 0 #define CODRV011 1 #define CODRV01X 2 #define SYSCONS 8 #define PCVT 16 #define WSCONS 32 #endif /* Root window property to tell clients whether our VT is currently active. * Name chosen to match the "XFree86_VT" property. */ #define HAS_VT_ATOM_NAME "XFree86_has_VT" #endif /* _XF86PRIVSTR_H */ xorg-server-21.1.16/hw/xfree86/common/xf86cmap.h0000644000175000017500000000520314757411105014635 /* * Copyright (c) 1998-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _XF86CMAP_H #define _XF86CMAP_H #include "xf86str.h" #include "colormapst.h" #define CMAP_PALETTED_TRUECOLOR 0x0000001 #define CMAP_RELOAD_ON_MODE_SWITCH 0x0000002 #define CMAP_LOAD_EVEN_IF_OFFSCREEN 0x0000004 extern _X_EXPORT Bool xf86HandleColormaps(ScreenPtr pScreen, int maxCol, int sigRGBbits, xf86LoadPaletteProc * loadPalette, xf86SetOverscanProc * setOverscan, unsigned int flags); extern _X_EXPORT Bool xf86ColormapAllocatePrivates(ScrnInfoPtr pScrn); extern _X_EXPORT int xf86ChangeGamma(ScreenPtr pScreen, Gamma newGamma); extern _X_EXPORT int xf86ChangeGammaRamp(ScreenPtr pScreen, int size, unsigned short *red, unsigned short *green, unsigned short *blue); extern _X_EXPORT int xf86GetGammaRampSize(ScreenPtr pScreen); extern _X_EXPORT int xf86GetGammaRamp(ScreenPtr pScreen, int size, unsigned short *red, unsigned short *green, unsigned short *blue); #endif /* _XF86CMAP_H */ xorg-server-21.1.16/hw/xfree86/common/xf86fbman.h0000644000175000017500000001526714757411105015013 /* * Copyright (c) 1998-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _XF86FBMAN_H #define _XF86FBMAN_H #include "scrnintstr.h" #include "regionstr.h" #define FAVOR_AREA_THEN_WIDTH 0 #define FAVOR_AREA_THEN_HEIGHT 1 #define FAVOR_WIDTH_THEN_AREA 2 #define FAVOR_HEIGHT_THEN_AREA 3 #define PRIORITY_LOW 0 #define PRIORITY_NORMAL 1 #define PRIORITY_EXTREME 2 typedef struct _FBArea { ScreenPtr pScreen; BoxRec box; int granularity; void (*MoveAreaCallback) (struct _FBArea *, struct _FBArea *); void (*RemoveAreaCallback) (struct _FBArea *); DevUnion devPrivate; } FBArea, *FBAreaPtr; typedef struct _FBLinear { ScreenPtr pScreen; int size; int offset; int granularity; void (*MoveLinearCallback) (struct _FBLinear *, struct _FBLinear *); void (*RemoveLinearCallback) (struct _FBLinear *); DevUnion devPrivate; } FBLinear, *FBLinearPtr; typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, void *); typedef void (*MoveAreaCallbackProcPtr) (FBAreaPtr, FBAreaPtr); typedef void (*RemoveAreaCallbackProcPtr) (FBAreaPtr); typedef void (*MoveLinearCallbackProcPtr) (FBLinearPtr, FBLinearPtr); typedef void (*RemoveLinearCallbackProcPtr) (FBLinearPtr); typedef struct { FBAreaPtr(*AllocateOffscreenArea) (ScreenPtr pScreen, int w, int h, int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData); void (*FreeOffscreenArea) (FBAreaPtr area); Bool (*ResizeOffscreenArea) (FBAreaPtr area, int w, int h); Bool (*QueryLargestOffscreenArea) (ScreenPtr pScreen, int *width, int *height, int granularity, int preferences, int priority); Bool (*RegisterFreeBoxCallback) (ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, void *devPriv); /* linear functions */ FBLinearPtr(*AllocateOffscreenLinear) (ScreenPtr pScreen, int size, int granularity, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, void *privData); void (*FreeOffscreenLinear) (FBLinearPtr area); Bool (*ResizeOffscreenLinear) (FBLinearPtr area, int size); Bool (*QueryLargestOffscreenLinear) (ScreenPtr pScreen, int *size, int granularity, int priority); Bool (*PurgeOffscreenAreas) (ScreenPtr); } FBManagerFuncs, *FBManagerFuncsPtr; extern _X_EXPORT Bool xf86RegisterOffscreenManager(ScreenPtr pScreen, FBManagerFuncsPtr funcs); extern _X_EXPORT Bool xf86InitFBManagerRegion(ScreenPtr pScreen, RegionPtr ScreenRegion); extern _X_EXPORT Bool xf86InitFBManagerArea(ScreenPtr pScreen, int PixalArea, int Verbosity); extern _X_EXPORT Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox); extern _X_EXPORT Bool xf86InitFBManagerLinear(ScreenPtr pScreen, int offset, int size); extern _X_EXPORT Bool xf86FBManagerRunning(ScreenPtr pScreen); extern _X_EXPORT FBAreaPtr xf86AllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData); extern _X_EXPORT FBAreaPtr xf86AllocateLinearOffscreenArea(ScreenPtr pScreen, int length, int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData); extern _X_EXPORT FBLinearPtr xf86AllocateOffscreenLinear(ScreenPtr pScreen, int length, int granularity, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, void *privData); extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area); extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area); extern _X_EXPORT Bool xf86ResizeOffscreenArea(FBAreaPtr resize, int w, int h); extern _X_EXPORT Bool xf86ResizeOffscreenLinear(FBLinearPtr resize, int size); extern _X_EXPORT Bool xf86RegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, void *devPriv); extern _X_EXPORT Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen); extern _X_EXPORT Bool xf86QueryLargestOffscreenArea(ScreenPtr pScreen, int *width, int *height, int granularity, int preferences, int priority); extern _X_EXPORT Bool xf86QueryLargestOffscreenLinear(ScreenPtr pScreen, int *size, int granularity, int priority); #endif /* _XF86FBMAN_H */ xorg-server-21.1.16/hw/xfree86/common/xf86str.h0000644000175000017500000005635014757411105014536 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains definitions of the public XFree86 data structures/types. * Any data structures that video drivers need to access should go here. */ #ifndef _XF86STR_H #define _XF86STR_H #include "misc.h" #include "input.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "colormapst.h" #include "xf86Module.h" #include "xf86Opt.h" #include "displaymode.h" /** * Integer type that is of the size of the addressable memory (machine size). * On most platforms \c uintptr_t will suffice. However, on some mixed * 32-bit / 64-bit platforms, such as 32-bit binaries on 64-bit PowerPC, this * must be 64-bits. */ #include #if defined(__powerpc__) typedef uint64_t memType; #else typedef uintptr_t memType; #endif /* Video mode flags */ typedef enum { V_PHSYNC = 0x0001, V_NHSYNC = 0x0002, V_PVSYNC = 0x0004, V_NVSYNC = 0x0008, V_INTERLACE = 0x0010, V_DBLSCAN = 0x0020, V_CSYNC = 0x0040, V_PCSYNC = 0x0080, V_NCSYNC = 0x0100, V_HSKEW = 0x0200, /* hskew provided */ V_BCAST = 0x0400, V_PIXMUX = 0x1000, V_DBLCLK = 0x2000, V_CLKDIV2 = 0x4000 } ModeFlags; typedef enum { INTERLACE_HALVE_V = 0x0001 /* Halve V values for interlacing */ } CrtcAdjustFlags; /* Flags passed to ChipValidMode() */ typedef enum { MODECHECK_INITIAL = 0, MODECHECK_FINAL = 1 } ModeCheckFlags; /* * The mode sets are, from best to worst: USERDEF, DRIVER, and DEFAULT/BUILTIN. * Preferred will bubble a mode to the top within a set. */ #define M_T_BUILTIN 0x01 /* built-in mode */ #define M_T_CLOCK_C (0x02 | M_T_BUILTIN) /* built-in mode - configure clock */ #define M_T_CRTC_C (0x04 | M_T_BUILTIN) /* built-in mode - configure CRTC */ #define M_T_CLOCK_CRTC_C (M_T_CLOCK_C | M_T_CRTC_C) /* built-in mode - configure CRTC and clock */ #define M_T_PREFERRED 0x08 /* preferred mode within a set */ #define M_T_DEFAULT 0x10 /* (VESA) default modes */ #define M_T_USERDEF 0x20 /* One of the modes from the config file */ #define M_T_DRIVER 0x40 /* Supplied by the driver (EDID, etc) */ #define M_T_USERPREF 0x80 /* mode preferred by the user config */ /* The monitor description */ #define MAX_HSYNC 8 #define MAX_VREFRESH 8 typedef struct { float hi, lo; } range; typedef struct { CARD32 red, green, blue; } rgb; typedef struct { float red, green, blue; } Gamma; /* The permitted gamma range is 1 / GAMMA_MAX <= g <= GAMMA_MAX */ #define GAMMA_MAX 10.0 #define GAMMA_MIN (1.0 / GAMMA_MAX) #define GAMMA_ZERO (GAMMA_MIN / 100.0) typedef struct { const char *id; const char *vendor; const char *model; int nHsync; range hsync[MAX_HSYNC]; int nVrefresh; range vrefresh[MAX_VREFRESH]; DisplayModePtr Modes; /* Start of the monitor's mode list */ DisplayModePtr Last; /* End of the monitor's mode list */ Gamma gamma; /* Gamma of the monitor */ int widthmm; int heightmm; void *options; void *DDC; Bool reducedblanking; /* Allow CVT reduced blanking modes? */ int maxPixClock; /* in kHz, like mode->Clock */ } MonRec, *MonPtr; /* the list of clock ranges */ typedef struct x_ClockRange { struct x_ClockRange *next; int minClock; /* (kHz) */ int maxClock; /* (kHz) */ int clockIndex; /* -1 for programmable clocks */ Bool interlaceAllowed; Bool doubleScanAllowed; int ClockMulFactor; int ClockDivFactor; int PrivFlags; } ClockRange, *ClockRangePtr; /* * The driverFunc. xorgDriverFuncOp specifies the action driver should * perform. If requested option is not supported function should return * FALSE. pointer can be used to pass arguments to the function or * to return data to the caller. */ typedef struct _ScrnInfoRec *ScrnInfoPtr; /* do not change order */ typedef enum { RR_GET_INFO, RR_SET_CONFIG, RR_GET_MODE_MM, GET_REQUIRED_HW_INTERFACES = 10, SUPPORTS_SERVER_FDS = 11, } xorgDriverFuncOp; typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); /* RR_GET_INFO, RR_SET_CONFIG */ typedef struct { int rotation; int rate; int width; int height; } xorgRRConfig; typedef union { short RRRotations; xorgRRConfig RRConfig; } xorgRRRotation, *xorgRRRotationPtr; /* RR_GET_MODE_MM */ typedef struct { DisplayModePtr mode; int virtX; int virtY; int mmWidth; int mmHeight; } xorgRRModeMM, *xorgRRModeMMPtr; /* GET_REQUIRED_HW_INTERFACES */ #define HW_IO 1 #define HW_MMIO 2 #define HW_SKIP_CONSOLE 4 #define NEED_IO_ENABLED(x) (x & HW_IO) typedef CARD32 xorgHWFlags; /* * The driver list struct. This contains the information required for each * driver before a ScrnInfoRec has been allocated. */ struct _DriverRec; struct _SymTabRec; struct _PciChipsets; struct pci_device; struct xf86_platform_device; typedef struct _DriverRec { int driverVersion; const char *driverName; void (*Identify) (int flags); Bool (*Probe) (struct _DriverRec * drv, int flags); const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); void *module; int refCount; xorgDriverFuncProc *driverFunc; const struct pci_id_match *supported_devices; Bool (*PciProbe) (struct _DriverRec * drv, int entity_num, struct pci_device * dev, intptr_t match_data); Bool (*platformProbe) (struct _DriverRec * drv, int entity_num, int flags, struct xf86_platform_device * dev, intptr_t match_data); } DriverRec, *DriverPtr; /* * platform probe flags */ #define PLATFORM_PROBE_GPU_SCREEN 1 /* * AddDriver flags */ #define HaveDriverFuncs 1 /* * These are the private bus types. New types can be added here. Types * required for the public interface should be added to xf86str.h, with * function prototypes added to xf86.h. */ /* Tolerate prior #include */ #if defined(__linux__) #undef BUS_NONE #undef BUS_PCI #undef BUS_SBUS #undef BUS_PLATFORM #undef BUS_USB #undef BUS_last #endif typedef enum { BUS_NONE, BUS_PCI, BUS_SBUS, BUS_PLATFORM, BUS_USB, BUS_last /* Keep last */ } BusType; typedef struct { int fbNum; } SbusBusId; typedef struct _bus { BusType type; union { struct pci_device *pci; SbusBusId sbus; struct xf86_platform_device *plat; } id; } BusRec, *BusPtr; typedef enum { DAC_BPP8 = 0, DAC_BPP16, DAC_BPP24, DAC_BPP32, MAXDACSPEEDS } DacSpeedIndex; typedef struct { const char *identifier; const char *vendor; const char *board; const char *chipset; const char *ramdac; const char *driver; struct _confscreenrec *myScreenSection; Bool claimed; int dacSpeeds[MAXDACSPEEDS]; int numclocks; int clock[MAXCLOCKS]; const char *clockchip; const char *busID; Bool active; Bool inUse; int videoRam; unsigned long MemBase; /* Frame buffer base address */ unsigned long IOBase; int chipID; int chipRev; void *options; int irq; int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; typedef struct { int frameX0; int frameY0; int virtualX; int virtualY; int depth; int fbbpp; rgb weight; rgb blackColour; rgb whiteColour; int defaultVisual; const char **modes; void *options; } DispRec, *DispPtr; typedef struct _confxvportrec { const char *identifier; void *options; } confXvPortRec, *confXvPortPtr; typedef struct _confxvadaptrec { const char *identifier; int numports; confXvPortPtr ports; void *options; } confXvAdaptorRec, *confXvAdaptorPtr; #define MAX_GPUDEVICES 4 typedef struct _confscreenrec { const char *id; int screennum; int defaultdepth; int defaultbpp; int defaultfbbpp; MonPtr monitor; GDevPtr device; int numdisplays; DispPtr *displays; int numxvadaptors; confXvAdaptorPtr xvadaptors; void *options; int num_gpu_devices; GDevPtr gpu_devices[MAX_GPUDEVICES]; } confScreenRec, *confScreenPtr; typedef enum { PosObsolete = -1, PosAbsolute = 0, PosRightOf, PosLeftOf, PosAbove, PosBelow, PosRelative } PositionType; typedef struct _screenlayoutrec { confScreenPtr screen; const char *topname; confScreenPtr top; const char *bottomname; confScreenPtr bottom; const char *leftname; confScreenPtr left; const char *rightname; confScreenPtr right; PositionType where; int x; int y; const char *refname; confScreenPtr refscreen; } screenLayoutRec, *screenLayoutPtr; typedef struct _InputInfoRec InputInfoRec; typedef struct _serverlayoutrec { const char *id; screenLayoutPtr screens; GDevPtr inactives; InputInfoRec **inputs; /* NULL terminated */ void *options; } serverLayoutRec, *serverLayoutPtr; typedef struct _confdribufferrec { int count; int size; enum { XF86DRI_WC_HINT = 0x0001 /* Placeholder: not implemented */ } flags; } confDRIBufferRec, *confDRIBufferPtr; typedef struct _confdrirec { int group; int mode; int bufs_count; confDRIBufferRec *bufs; } confDRIRec, *confDRIPtr; #define NUM_RESERVED_INTS 4 #define NUM_RESERVED_POINTERS 4 #define NUM_RESERVED_FUNCS 4 /* let clients know they can use this */ #define XF86_SCRN_HAS_PREFER_CLONE 1 typedef void *(*funcPointer) (void); /* Power management events: so far we only support APM */ typedef enum { XF86_APM_UNKNOWN = -1, XF86_APM_SYS_STANDBY, XF86_APM_SYS_SUSPEND, XF86_APM_CRITICAL_SUSPEND, XF86_APM_USER_STANDBY, XF86_APM_USER_SUSPEND, XF86_APM_STANDBY_RESUME, XF86_APM_NORMAL_RESUME, XF86_APM_CRITICAL_RESUME, XF86_APM_LOW_BATTERY, XF86_APM_POWER_STATUS_CHANGE, XF86_APM_UPDATE_TIME, XF86_APM_CAPABILITY_CHANGED, XF86_APM_STANDBY_FAILED, XF86_APM_SUSPEND_FAILED } pmEvent; typedef enum { PM_WAIT, PM_CONTINUE, PM_FAILED, PM_NONE } pmWait; typedef struct _PciChipsets { /** * Key used to match this device with its name in an array of * \c SymTabRec. */ int numChipset; /** * This value is quirky. Depending on the driver, it can take on one of * three meanings. In drivers that have exactly one vendor ID (e.g., * radeon, mga, i810) the low 16-bits are the device ID. * * In drivers that can have multiple vendor IDs (e.g., the glint driver * can have either 3dlabs' ID or TI's ID, the i740 driver can have either * Intel's ID or Real3D's ID, etc.) the low 16-bits are the device ID and * the high 16-bits are the vendor ID. * * In drivers that don't have a specific vendor (e.g., vga) contains the * device ID for either the generic VGA or generic 8514 devices. This * turns out to be the same as the subclass and programming interface * value (e.g., the full 24-bit class for the VGA device is 0x030000 (or * 0x000101) and for 8514 is 0x030001). */ int PCIid; /* dummy place holders for drivers to build against old/new servers */ #define RES_UNDEFINED NULL #define RES_EXCLUSIVE_VGA NULL #define RES_SHARED_VGA NULL void *dummy; } PciChipsets; /* Entity properties */ typedef void (*EntityProc) (int entityIndex, void *private); typedef struct _entityInfo { int index; BusRec location; int chipset; Bool active; GDevPtr device; DriverPtr driver; } EntityInfoRec, *EntityInfoPtr; /* DGA */ typedef struct { int num; /* A unique identifier for the mode (num > 0) */ DisplayModePtr mode; int flags; /* DGA_CONCURRENT_ACCESS, etc... */ int imageWidth; /* linear accessible portion (pixels) */ int imageHeight; int pixmapWidth; /* Xlib accessible portion (pixels) */ int pixmapHeight; /* both fields ignored if no concurrent access */ int bytesPerScanline; int byteOrder; /* MSBFirst, LSBFirst */ int depth; int bitsPerPixel; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; short visualClass; int viewportWidth; int viewportHeight; int xViewportStep; /* viewport position granularity */ int yViewportStep; int maxViewportX; /* max viewport origin */ int maxViewportY; int viewportFlags; /* types of page flipping possible */ int offset; /* offset into physical memory */ unsigned char *address; /* server's mapped framebuffer */ int reserved1; int reserved2; } DGAModeRec, *DGAModePtr; typedef struct { DGAModePtr mode; PixmapPtr pPix; } DGADeviceRec, *DGADevicePtr; /* * Flags for driver Probe() functions. */ #define PROBE_DEFAULT 0x00 #define PROBE_DETECT 0x01 #define PROBE_TRYHARD 0x02 /* * Driver entry point types */ typedef Bool xf86ProbeProc(DriverPtr, int); typedef Bool xf86PreInitProc(ScrnInfoPtr, int); typedef Bool xf86ScreenInitProc(ScreenPtr, int, char **); typedef Bool xf86SwitchModeProc(ScrnInfoPtr, DisplayModePtr); typedef void xf86AdjustFrameProc(ScrnInfoPtr, int, int); typedef Bool xf86EnterVTProc(ScrnInfoPtr); typedef void xf86LeaveVTProc(ScrnInfoPtr); typedef void xf86FreeScreenProc(ScrnInfoPtr); typedef ModeStatus xf86ValidModeProc(ScrnInfoPtr, DisplayModePtr, Bool, int); typedef void xf86EnableDisableFBAccessProc(ScrnInfoPtr, Bool); typedef int xf86SetDGAModeProc(ScrnInfoPtr, int, DGADevicePtr); typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma); typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int); typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool); typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int); typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr); typedef void xf86SetOverscanProc(ScrnInfoPtr, int); typedef void xf86ModeSetProc(ScrnInfoPtr); /* * ScrnInfoRec * * There is one of these for each screen, and it holds all the screen-specific * information. Note: No fields are to be dependent on compile-time defines. */ typedef struct _ScrnInfoRec { int driverVersion; const char *driverName; /* canonical name used in */ /* the config file */ ScreenPtr pScreen; /* Pointer to the ScreenRec */ int scrnIndex; /* Number of this screen */ Bool configured; /* Is this screen valid */ int origIndex; /* initial number assigned to * this screen before * finalising the number of * available screens */ /* Display-wide screenInfo values needed by this screen */ int imageByteOrder; int bitmapScanlineUnit; int bitmapScanlinePad; int bitmapBitOrder; int numFormats; PixmapFormatRec formats[MAXFORMATS]; PixmapFormatRec fbFormat; int bitsPerPixel; /* fb bpp */ int depth; /* depth of default visual */ MessageType depthFrom; /* set from config? */ MessageType bitsPerPixelFrom; /* set from config? */ rgb weight; /* r/g/b weights */ rgb mask; /* rgb masks */ rgb offset; /* rgb offsets */ int rgbBits; /* Number of bits in r/g/b */ Gamma gamma; /* Gamma of the monitor */ int defaultVisual; /* default visual class */ int virtualX; /* Virtual width */ int virtualY; /* Virtual height */ int xInc; /* Horizontal timing increment */ int displayWidth; /* memory pitch */ int frameX0; /* viewport position */ int frameY0; int frameX1; int frameY1; int zoomLocked; /* Disallow mode changes */ DisplayModePtr modePool; /* list of compatible modes */ DisplayModePtr modes; /* list of actual modes */ DisplayModePtr currentMode; /* current mode * This was previously * overloaded with the modes * field, which is a pointer * into a circular list */ confScreenPtr confScreen; /* Screen config info */ MonPtr monitor; /* Monitor information */ DispPtr display; /* Display information */ int *entityList; /* List of device entities */ int numEntities; int widthmm; /* physical display dimensions * in mm */ int heightmm; int xDpi; /* width DPI */ int yDpi; /* height DPI */ const char *name; /* Name to prefix messages */ void *driverPrivate; /* Driver private area */ DevUnion *privates; /* Other privates can hook in * here */ DriverPtr drv; /* xf86DriverList[] entry */ void *module; /* Pointer to module head */ int colorKey; int overlayFlags; /* Some of these may be moved out of here into the driver private area */ const char *chipset; /* chipset name */ const char *ramdac; /* ramdac name */ const char *clockchip; /* clock name */ Bool progClock; /* clock is programmable */ int numClocks; /* number of clocks */ int clock[MAXCLOCKS]; /* list of clock frequencies */ int videoRam; /* amount of video ram (kb) */ unsigned long memPhysBase; /* Physical address of FB */ unsigned long fbOffset; /* Offset of FB in the above */ void *options; /* Allow screens to be enabled/disabled individually */ Bool vtSema; /* hw cursor moves from input thread */ Bool silkenMouse; /* Storage for clockRanges and adjustFlags for use with the VidMode ext */ ClockRangePtr clockRanges; int adjustFlags; /* initial rightof support disable */ int preferClone; Bool is_gpu; uint32_t capabilities; int *entityInstanceList; struct pci_device *vgaDev; /* * Driver entry points. * */ xf86ProbeProc *Probe; xf86PreInitProc *PreInit; xf86ScreenInitProc *ScreenInit; xf86SwitchModeProc *SwitchMode; xf86AdjustFrameProc *AdjustFrame; xf86EnterVTProc *EnterVT; xf86LeaveVTProc *LeaveVT; xf86FreeScreenProc *FreeScreen; xf86ValidModeProc *ValidMode; xf86EnableDisableFBAccessProc *EnableDisableFBAccess; xf86SetDGAModeProc *SetDGAMode; xf86ChangeGammaProc *ChangeGamma; xf86PointerMovedProc *PointerMoved; xf86PMEventProc *PMEvent; xf86DPMSSetProc *DPMSSet; xf86LoadPaletteProc *LoadPalette; xf86SetOverscanProc *SetOverscan; xorgDriverFuncProc *DriverFunc; xf86ModeSetProc *ModeSet; int reservedInt[NUM_RESERVED_INTS]; void *reservedPtr[NUM_RESERVED_POINTERS]; funcPointer reservedFuncs[NUM_RESERVED_FUNCS]; } ScrnInfoRec; typedef struct { Bool (*OpenFramebuffer) (ScrnInfoPtr pScrn, char **name, unsigned char **mem, int *size, int *offset, int *extra); void (*CloseFramebuffer) (ScrnInfoPtr pScrn); Bool (*SetMode) (ScrnInfoPtr pScrn, DGAModePtr pMode); void (*SetViewport) (ScrnInfoPtr pScrn, int x, int y, int flags); int (*GetViewport) (ScrnInfoPtr pScrn); void (*Sync) (ScrnInfoPtr); void (*FillRect) (ScrnInfoPtr pScrn, int x, int y, int w, int h, unsigned long color); void (*BlitRect) (ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, int dstx, int dsty); void (*BlitTransRect) (ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long color); } DGAFunctionRec, *DGAFunctionPtr; typedef struct _SymTabRec { int token; /* id of the token */ const char *name; /* token name */ } SymTabRec, *SymTabPtr; /* flags for xf86LookupMode */ typedef enum { LOOKUP_DEFAULT = 0, /* Use default mode lookup method */ LOOKUP_BEST_REFRESH, /* Pick modes with best refresh */ LOOKUP_CLOSEST_CLOCK, /* Pick modes with the closest clock */ LOOKUP_LIST_ORDER, /* Pick first useful mode in list */ LOOKUP_CLKDIV2 = 0x0100, /* Allow half clocks */ LOOKUP_OPTIONAL_TOLERANCES = 0x0200 /* Allow missing hsync/vrefresh */ } LookupModeFlags; #define NoDepth24Support 0x00 #define Support24bppFb 0x01 /* 24bpp framebuffer supported */ #define Support32bppFb 0x02 /* 32bpp framebuffer supported */ #define SupportConvert24to32 0x04 /* Can convert 24bpp pixmap to 32bpp */ #define SupportConvert32to24 0x08 /* Can convert 32bpp pixmap to 24bpp */ #define PreferConvert24to32 0x10 /* prefer 24bpp pixmap to 32bpp conv */ #define PreferConvert32to24 0x20 /* prefer 32bpp pixmap to 24bpp conv */ /* For DPMS */ typedef void (*DPMSSetProcPtr) (ScrnInfoPtr, int, int); /* Input handler proc */ typedef void (*InputHandlerProc) (int fd, void *data); /* These are used by xf86GetClocks */ #define CLK_REG_SAVE -1 #define CLK_REG_RESTORE -2 /* * misc constants */ #define INTERLACE_REFRESH_WEIGHT 1.5 #define SYNC_TOLERANCE 0.01 /* 1 percent */ #define CLOCK_TOLERANCE 2000 /* Clock matching tolerance (2MHz) */ #define OVERLAY_8_32_DUALFB 0x00000001 #define OVERLAY_8_24_DUALFB 0x00000002 #define OVERLAY_8_16_DUALFB 0x00000004 #define OVERLAY_8_32_PLANAR 0x00000008 /* Values of xf86Info.mouseFlags */ #define MF_CLEAR_DTR 1 #define MF_CLEAR_RTS 2 /* Action Events */ typedef enum { ACTION_TERMINATE = 0, /* Terminate Server */ ACTION_NEXT_MODE = 10, /* Switch to next video mode */ ACTION_PREV_MODE, ACTION_SWITCHSCREEN = 100, /* VT switch */ ACTION_SWITCHSCREEN_NEXT, ACTION_SWITCHSCREEN_PREV, } ActionEvent; #endif /* _XF86STR_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Xinput.h0000644000175000017500000002577114757411105015220 /* * Copyright 1995-1999 by Frederic Lepied, France. * * 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 Frederic Lepied not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Frederic Lepied makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL FREDERIC LEPIED 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 (c) 2000-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _xf86Xinput_h #define _xf86Xinput_h #include "xf86.h" #include "xf86str.h" #include "inputstr.h" #include #include #include "XIstubs.h" /* Input device flags */ #define XI86_ALWAYS_CORE 0x04 /* device always controls the pointer */ /* the device sends Xinput and core pointer events */ #define XI86_SEND_CORE_EVENTS XI86_ALWAYS_CORE /* 0x08 is reserved for legacy XI86_SEND_DRAG_EVENTS, do not use for now */ /* server-internal only */ #define XI86_DEVICE_DISABLED 0x10 /* device was disabled before vt switch */ #define XI86_SERVER_FD 0x20 /* fd is managed by xserver */ /* Input device driver capabilities */ #define XI86_DRV_CAP_SERVER_FD 0x01 /* This holds the input driver entry and module information. */ typedef struct _InputDriverRec { int driverVersion; const char *driverName; void (*Identify) (int flags); int (*PreInit) (struct _InputDriverRec * drv, struct _InputInfoRec * pInfo, int flags); void (*UnInit) (struct _InputDriverRec * drv, struct _InputInfoRec * pInfo, int flags); void *module; const char **default_options; int capabilities; } InputDriverRec, *InputDriverPtr; /* This is to input devices what the ScrnInfoRec is to screens. */ struct _InputInfoRec { struct _InputInfoRec *next; char *name; char *driver; int flags; Bool (*device_control) (DeviceIntPtr device, int what); void (*read_input) (struct _InputInfoRec * local); int (*control_proc) (struct _InputInfoRec * local, xDeviceCtl * control); int (*switch_mode) (ClientPtr client, DeviceIntPtr dev, int mode); int (*set_device_valuators) (struct _InputInfoRec * local, int *valuators, int first_valuator, int num_valuators); int fd; int major; int minor; DeviceIntPtr dev; void *private; const char *type_name; InputDriverPtr drv; void *module; XF86OptionPtr options; InputAttributes *attrs; }; /* xf86Globals.c */ extern InputInfoPtr xf86InputDevs; /* xf86Xinput.c */ extern _X_EXPORT void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, ...); extern _X_EXPORT void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, const int *valuators); extern _X_EXPORT void xf86PostMotionEventM(DeviceIntPtr device, int is_absolute, const ValuatorMask *mask); extern _X_EXPORT void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, ...); extern _X_EXPORT void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, const int *valuators); extern _X_EXPORT void xf86PostProximityEventM(DeviceIntPtr device, int is_in, const ValuatorMask *mask); extern _X_EXPORT void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, ...); extern _X_EXPORT void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, const int *valuators); extern _X_EXPORT void xf86PostButtonEventM(DeviceIntPtr device, int is_absolute, int button, int is_down, const ValuatorMask *mask); extern _X_EXPORT void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyEventM(DeviceIntPtr device, unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down); extern _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type, uint32_t flags, const ValuatorMask *mask); extern _X_EXPORT void xf86PostGesturePinchEvent(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle); extern _X_EXPORT void xf86PostGestureSwipeEvent(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y); extern _X_EXPORT InputInfoPtr xf86FirstLocalDevice(void); extern _X_EXPORT int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min); extern _X_EXPORT void xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr options); extern _X_EXPORT Bool xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res, int mode); extern _X_EXPORT void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum); extern _X_EXPORT void xf86AddEnabledDevice(InputInfoPtr pInfo); extern _X_EXPORT void xf86RemoveEnabledDevice(InputInfoPtr pInfo); extern _X_EXPORT void xf86DisableDevice(DeviceIntPtr dev, Bool panic); extern _X_EXPORT void xf86EnableDevice(DeviceIntPtr dev); extern _X_EXPORT void xf86InputEnableVTProbe(void); /* not exported */ int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL is_auto); InputInfoPtr xf86AllocateInput(void); /* xf86Helper.c */ extern _X_EXPORT void xf86AddInputDriver(InputDriverPtr driver, void *module, int flags); extern _X_EXPORT void xf86DeleteInputDriver(int drvIndex); extern _X_EXPORT InputDriverPtr xf86LookupInputDriver(const char *name); extern _X_EXPORT InputInfoPtr xf86LookupInput(const char *name); extern _X_EXPORT void xf86DeleteInput(InputInfoPtr pInp, int flags); extern _X_EXPORT void xf86MotionHistoryAllocate(InputInfoPtr pInfo); extern _X_EXPORT void xf86IDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(4, 5); extern _X_EXPORT void xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(4, 0); extern _X_EXPORT void xf86AddInputEventDrainCallback(CallbackProcPtr callback, void *param); extern _X_EXPORT void xf86RemoveInputEventDrainCallback(CallbackProcPtr callback, void *param); /* xf86Option.c */ extern _X_EXPORT void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts); #endif /* _xf86Xinput_h */ xorg-server-21.1.16/hw/xfree86/common/xisb.h0000644000175000017500000000503114757411105014145 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ #ifndef _xisb_H_ #define _xisb_H_ #include /****************************************************************************** * Definitions * structs, typedefs, #defines, enums *****************************************************************************/ typedef struct _XISBuffer { int fd; int trace; int block_duration; ssize_t current; /* bytes read */ ssize_t end; ssize_t buffer_size; unsigned char *buf; } XISBuffer; /****************************************************************************** * Declarations * variables: use xisb_LOC in front * of globals. * put locals in the .c file. *****************************************************************************/ extern _X_EXPORT XISBuffer *XisbNew(int fd, ssize_t size); extern _X_EXPORT void XisbFree(XISBuffer * b); extern _X_EXPORT int XisbRead(XISBuffer * b); extern _X_EXPORT ssize_t XisbWrite(XISBuffer * b, unsigned char *msg, ssize_t len); extern _X_EXPORT void XisbTrace(XISBuffer * b, int trace); extern _X_EXPORT void XisbBlockDuration(XISBuffer * b, int block_duration); /* * DO NOT PUT ANYTHING AFTER THIS ENDIF */ #endif xorg-server-21.1.16/hw/xfree86/common/xf86xv.h0000644000175000017500000002177414757411105014365 /* * Copyright (c) 1998-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _XF86XV_H_ #define _XF86XV_H_ #include "xvdix.h" #include "xf86str.h" #define VIDEO_OVERLAID_IMAGES 0x00000004 #define VIDEO_OVERLAID_STILLS 0x00000008 /* * Usage of VIDEO_CLIP_TO_VIEWPORT is not recommended. * It can make reput behaviour inconsistent. */ #define VIDEO_CLIP_TO_VIEWPORT 0x00000010 typedef XvImageRec XF86ImageRec, *XF86ImagePtr; typedef struct { ScrnInfoPtr pScrn; int id; unsigned short width, height; int *pitches; /* bytes */ int *offsets; /* in bytes from start of framebuffer */ DevUnion devPrivate; } XF86SurfaceRec, *XF86SurfacePtr; typedef int (*PutVideoFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*PutStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*GetVideoFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*GetStillFuncPtr) (ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, void *data, Bool Exit); typedef int (*SetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, INT32 value, void *data); typedef int (*GetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, INT32 *value, void *data); typedef void (*QueryBestSizeFuncPtr) (ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, void *data); typedef int (*PutImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int image, unsigned char *buf, short width, short height, Bool Sync, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*ReputImageFuncPtr) (ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); typedef enum { XV_OFF, XV_PENDING, XV_ON } XvStatus; /*** this is what the driver needs to fill out ***/ typedef struct { int id; const char *name; unsigned short width, height; XvRationalRec rate; } XF86VideoEncodingRec, *XF86VideoEncodingPtr; typedef struct { char depth; short class; } XF86VideoFormatRec, *XF86VideoFormatPtr; typedef XvAttributeRec XF86AttributeRec, *XF86AttributePtr; typedef struct { unsigned int type; int flags; const char *name; int nEncodings; XF86VideoEncodingPtr pEncodings; int nFormats; XF86VideoFormatPtr pFormats; int nPorts; DevUnion *pPortPrivates; int nAttributes; XF86AttributePtr pAttributes; int nImages; XF86ImagePtr pImages; PutVideoFuncPtr PutVideo; PutStillFuncPtr PutStill; GetVideoFuncPtr GetVideo; GetStillFuncPtr GetStill; StopVideoFuncPtr StopVideo; SetPortAttributeFuncPtr SetPortAttribute; GetPortAttributeFuncPtr GetPortAttribute; QueryBestSizeFuncPtr QueryBestSize; PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; /* image/still */ QueryImageAttributesFuncPtr QueryImageAttributes; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; typedef struct { XF86ImagePtr image; int flags; int (*alloc_surface) (ScrnInfoPtr pScrn, int id, unsigned short width, unsigned short height, XF86SurfacePtr surface); int (*free_surface) (XF86SurfacePtr surface); int (*display) (XF86SurfacePtr surface, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes); int (*stop) (XF86SurfacePtr surface); int (*getAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 *value); int (*setAttribute) (ScrnInfoPtr pScrn, Atom attr, INT32 value); int max_width; int max_height; int num_attributes; XF86AttributePtr attributes; } XF86OffscreenImageRec, *XF86OffscreenImagePtr; extern _X_EXPORT Bool xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * Adaptors, int num); typedef int (*xf86XVInitGenericAdaptorPtr) (ScrnInfoPtr pScrn, XF86VideoAdaptorPtr ** Adaptors); extern _X_EXPORT int xf86XVRegisterGenericAdaptorDriver(xf86XVInitGenericAdaptorPtr InitFunc); extern _X_EXPORT int xf86XVListGenericAdaptors(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr ** Adaptors); extern _X_EXPORT Bool xf86XVRegisterOffscreenImages(ScreenPtr pScreen, XF86OffscreenImagePtr images, int num); extern _X_EXPORT XF86OffscreenImagePtr xf86XVQueryOffscreenImages(ScreenPtr pScreen, int *num); extern _X_EXPORT XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn); extern _X_EXPORT void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr); extern _X_EXPORT void xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes); extern _X_EXPORT void xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); extern _X_EXPORT void xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key, RegionPtr clipboxes, Bool fillEverything); extern _X_EXPORT Bool xf86XVClipVideoHelper(BoxPtr dst, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, RegionPtr reg, INT32 width, INT32 height); extern _X_EXPORT void xf86XVCopyYUV12ToPacked(const void *srcy, const void *srcv, const void *srcu, void *dst, int srcPitchy, int srcPitchuv, int dstPitch, int h, int w); extern _X_EXPORT void xf86XVCopyPacked(const void *src, void *dst, int srcPitch, int dstPitch, int h, int w); #endif /* _XF86XV_H_ */ xorg-server-21.1.16/hw/xfree86/common/xf86xvmc.h0000644000175000017500000001316214757411105014675 /* * Copyright (c) 2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _XF86XVMC_H #define _XF86XVMC_H #include "xvmcext.h" #include "xf86xv.h" typedef struct { int num_xvimages; int *xvimage_ids; /* reference the subpictures in the XF86MCAdaptorRec */ } XF86MCImageIDList; typedef struct { int surface_type_id; /* Driver generated. Must be unique on the port */ int chroma_format; int color_description; /* no longer used */ unsigned short max_width; unsigned short max_height; unsigned short subpicture_max_width; unsigned short subpicture_max_height; int mc_type; int flags; XF86MCImageIDList *compatible_subpictures; /* can be null, if none */ } XF86MCSurfaceInfoRec, *XF86MCSurfaceInfoPtr; /* xf86XvMCCreateContextProc DIX will fill everything out in the context except the driver_priv. The port_priv holds the private data specified for the port when Xv was initialized by the driver. The driver may store whatever it wants in driver_priv and edit the width, height and flags. If the driver wants to return something to the client it can allocate space in priv and specify the number of 32 bit words in num_priv. This must be dynamically allocated space because DIX will free it after it passes it to the client. */ typedef int (*xf86XvMCCreateContextProcPtr) (ScrnInfoPtr pScrn, XvMCContextPtr context, int *num_priv, CARD32 **priv); typedef void (*xf86XvMCDestroyContextProcPtr) (ScrnInfoPtr pScrn, XvMCContextPtr context); /* xf86XvMCCreateSurfaceProc DIX will fill everything out in the surface except the driver_priv. The driver may store whatever it wants in driver_priv. The driver may pass data back to the client in the same manner as the xf86XvMCCreateContextProc. */ typedef int (*xf86XvMCCreateSurfaceProcPtr) (ScrnInfoPtr pScrn, XvMCSurfacePtr surface, int *num_priv, CARD32 **priv); typedef void (*xf86XvMCDestroySurfaceProcPtr) (ScrnInfoPtr pScrn, XvMCSurfacePtr surface); /* xf86XvMCCreateSubpictureProc DIX will fill everything out in the subpicture except the driver_priv, num_palette_entries, entry_bytes and component_order. The driver may store whatever it wants in driver_priv and edit the width and height. If it is a paletted subpicture the driver needs to fill out the num_palette_entries, entry_bytes and component_order. These are not communicated to the client until the time the surface is created. The driver may pass data back to the client in the same manner as the xf86XvMCCreateContextProc. */ typedef int (*xf86XvMCCreateSubpictureProcPtr) (ScrnInfoPtr pScrn, XvMCSubpicturePtr subpicture, int *num_priv, CARD32 **priv); typedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn, XvMCSubpicturePtr subpicture); typedef struct { const char *name; int num_surfaces; XF86MCSurfaceInfoPtr *surfaces; int num_subpictures; XF86ImagePtr *subpictures; xf86XvMCCreateContextProcPtr CreateContext; xf86XvMCDestroyContextProcPtr DestroyContext; xf86XvMCCreateSurfaceProcPtr CreateSurface; xf86XvMCDestroySurfaceProcPtr DestroySurface; xf86XvMCCreateSubpictureProcPtr CreateSubpicture; xf86XvMCDestroySubpictureProcPtr DestroySubpicture; } XF86MCAdaptorRec, *XF86MCAdaptorPtr; /* xf86XvMCScreenInit Unlike Xv, the adaptor data is not copied from this structure. This structure's data is used so it must stick around for the life of the server. Note that it's an array of pointers not an array of structures. */ extern _X_EXPORT Bool xf86XvMCScreenInit(ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr * adaptors); extern _X_EXPORT XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec(void); extern _X_EXPORT void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor); #endif /* _XF86XVMC_H */ xorg-server-21.1.16/hw/xfree86/common/xf86xvpriv.h0000644000175000017500000000607414757411105015262 /* * Copyright (c) 2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef _XF86XVPRIV_H_ #define _XF86XVPRIV_H_ #include "xf86xv.h" #include "privates.h" /*** These are DDX layer privates ***/ extern _X_EXPORT DevPrivateKey XF86XvScreenKey; typedef struct { DestroyWindowProcPtr DestroyWindow; ClipNotifyProcPtr ClipNotify; WindowExposuresProcPtr WindowExposures; PostValidateTreeProcPtr PostValidateTree; void (*AdjustFrame) (ScrnInfoPtr, int, int); Bool (*EnterVT) (ScrnInfoPtr); void (*LeaveVT) (ScrnInfoPtr); xf86ModeSetProc *ModeSet; CloseScreenProcPtr CloseScreen; } XF86XVScreenRec, *XF86XVScreenPtr; typedef struct { int flags; PutVideoFuncPtr PutVideo; PutStillFuncPtr PutStill; GetVideoFuncPtr GetVideo; GetStillFuncPtr GetStill; StopVideoFuncPtr StopVideo; SetPortAttributeFuncPtr SetPortAttribute; GetPortAttributeFuncPtr GetPortAttribute; QueryBestSizeFuncPtr QueryBestSize; PutImageFuncPtr PutImage; ReputImageFuncPtr ReputImage; QueryImageAttributesFuncPtr QueryImageAttributes; } XvAdaptorRecPrivate, *XvAdaptorRecPrivatePtr; typedef struct { ScrnInfoPtr pScrn; DrawablePtr pDraw; unsigned char type; unsigned int subWindowMode; RegionPtr clientClip; RegionPtr ckeyFilled; RegionPtr pCompositeClip; Bool FreeCompositeClip; XvAdaptorRecPrivatePtr AdaptorRec; XvStatus isOn; Bool clipChanged; int vid_x, vid_y, vid_w, vid_h; int drw_x, drw_y, drw_w, drw_h; DevUnion DevPriv; } XvPortRecPrivate, *XvPortRecPrivatePtr; typedef struct _XF86XVWindowRec { XvPortRecPrivatePtr PortRec; struct _XF86XVWindowRec *next; } XF86XVWindowRec, *XF86XVWindowPtr; #endif /* _XF86XVPRIV_H_ */ xorg-server-21.1.16/hw/xfree86/common/dgaproc.h0000644000175000017500000000415114757411105014621 #ifndef __DGAPROC_H #define __DGAPROC_H #include #include "pixmap.h" #define DGA_CONCURRENT_ACCESS 0x00000001 #define DGA_FILL_RECT 0x00000002 #define DGA_BLIT_RECT 0x00000004 #define DGA_BLIT_RECT_TRANS 0x00000008 #define DGA_PIXMAP_AVAILABLE 0x00000010 #define DGA_INTERLACED 0x00010000 #define DGA_DOUBLESCAN 0x00020000 #define DGA_FLIP_IMMEDIATE 0x00000001 #define DGA_FLIP_RETRACE 0x00000002 #define DGA_COMPLETED 0x00000000 #define DGA_PENDING 0x00000001 #define DGA_NEED_ROOT 0x00000001 typedef struct { int num; /* A unique identifier for the mode (num > 0) */ const char *name; /* name of mode given in the XF86Config */ int VSync_num; int VSync_den; int flags; /* DGA_CONCURRENT_ACCESS, etc... */ int imageWidth; /* linear accessible portion (pixels) */ int imageHeight; int pixmapWidth; /* Xlib accessible portion (pixels) */ int pixmapHeight; /* both fields ignored if no concurrent access */ int bytesPerScanline; int byteOrder; /* MSBFirst, LSBFirst */ int depth; int bitsPerPixel; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; short visualClass; int viewportWidth; int viewportHeight; int xViewportStep; /* viewport position granularity */ int yViewportStep; int maxViewportX; /* max viewport origin */ int maxViewportY; int viewportFlags; /* types of page flipping possible */ int offset; int reserved1; int reserved2; } XDGAModeRec, *XDGAModePtr; /* DDX interface */ extern Bool DGAScreenAvailable(ScreenPtr pScreen); extern Bool DGAActive(int Index); extern Bool DGAVTSwitch(void); extern Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index, int button, int is_down); extern Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy); extern Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index, int key_code, int is_down); #endif /* __DGAPROC_H */ xorg-server-21.1.16/hw/xfree86/common/xorgVersion.h0000644000175000017500000000420014757411105015522 /* * Copyright (c) 2004, X.Org Foundation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef XORG_VERSION_H #define XORG_VERSION_H #ifndef XORG_VERSION_CURRENT #error #endif #define XORG_VERSION_NUMERIC(major,minor,patch,snap,dummy) \ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap) #define XORG_GET_MAJOR_VERSION(vers) ((vers) / 10000000) #define XORG_GET_MINOR_VERSION(vers) (((vers) % 10000000) / 100000) #define XORG_GET_PATCH_VERSION(vers) (((vers) % 100000) / 1000) #define XORG_GET_SNAP_VERSION(vers) ((vers) % 1000) #define XORG_VERSION_MAJOR XORG_GET_MAJOR_VERSION(XORG_VERSION_CURRENT) #define XORG_VERSION_MINOR XORG_GET_MINOR_VERSION(XORG_VERSION_CURRENT) #define XORG_VERSION_PATCH XORG_GET_PATCH_VERSION(XORG_VERSION_CURRENT) #define XORG_VERSION_SNAP XORG_GET_SNAP_VERSION(XORG_VERSION_CURRENT) #endif xorg-server-21.1.16/hw/xfree86/common/xf86sbusBus.h0000644000175000017500000001062214757411105015344 /* * SBUS bus-specific declarations * * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * JAKUB JELINEK 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. */ #ifndef _XF86_SBUSBUS_H #define _XF86_SBUSBUS_H #include "xf86str.h" #define SBUS_DEVICE_BW2 0x0001 #define SBUS_DEVICE_CG2 0x0002 #define SBUS_DEVICE_CG3 0x0003 #define SBUS_DEVICE_CG4 0x0004 #define SBUS_DEVICE_CG6 0x0005 #define SBUS_DEVICE_CG8 0x0006 #define SBUS_DEVICE_CG12 0x0007 #define SBUS_DEVICE_CG14 0x0008 #define SBUS_DEVICE_LEO 0x0009 #define SBUS_DEVICE_TCX 0x000a #define SBUS_DEVICE_FFB 0x000b #define SBUS_DEVICE_GT 0x000c #define SBUS_DEVICE_MGX 0x000d typedef struct sbus_prom_node { int node; /* Because of misdesigned openpromio */ int cookie[2]; } sbusPromNode, *sbusPromNodePtr; typedef struct sbus_device { int devId; int fbNum; int fd; int width, height; sbusPromNode node; const char *descr; const char *device; } sbusDevice, *sbusDevicePtr; struct sbus_devtable { int devId; int fbType; const char *promName; const char *driverName; const char *descr; }; extern _X_EXPORT void xf86SbusProbe(void); extern _X_EXPORT sbusDevicePtr *xf86SbusInfo; extern _X_EXPORT struct sbus_devtable sbusDeviceTable[]; extern _X_EXPORT int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr * devList, int numDevs, DriverPtr drvp, int **foundEntities); extern _X_EXPORT sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex); extern _X_EXPORT int xf86GetEntityForSbusInfo(sbusDevicePtr psdp); extern _X_EXPORT void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp); extern _X_EXPORT void *xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size); extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, void *addr, unsigned long size); extern _X_EXPORT void xf86SbusHideOsHwCursor(sbusDevicePtr psdp); extern _X_EXPORT void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg); extern _X_EXPORT Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp); extern _X_EXPORT int promRootNode; extern _X_EXPORT int promGetSibling(int node); extern _X_EXPORT int promGetChild(int node); extern _X_EXPORT char *promGetProperty(const char *prop, int *lenp); extern _X_EXPORT int promGetBool(const char *prop); extern _X_EXPORT int sparcPromInit(void); extern _X_EXPORT void sparcPromClose(void); extern _X_EXPORT char *sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp); extern _X_EXPORT int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop); extern _X_EXPORT void sparcPromAssignNodes(void); extern _X_EXPORT char *sparcPromNode2Pathname(sbusPromNodePtr pnode); extern _X_EXPORT int sparcPromPathname2Node(const char *pathName); extern _X_EXPORT char *sparcDriverName(void); extern Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus); extern void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev); #endif /* _XF86_SBUSBUS_H */ xorg-server-21.1.16/hw/xfree86/common/xf86VGAarbiter.h0000644000175000017500000000365114757411105015710 /* * Copyright (c) 2009 Tiago Vignatti * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * 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 AUTHORS OR COPYRIGHT * HOLDERS 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. */ #ifndef __XF86VGAARBITER_H #define __XF86VGAARBITER_H #include "screenint.h" #include "misc.h" #include "xf86.h" /* Functions */ extern void xf86VGAarbiterInit(void); extern void xf86VGAarbiterFini(void); void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn); extern Bool xf86VGAarbiterWrapFunctions(void); extern void xf86VGAarbiterLock(ScrnInfoPtr pScrn); extern void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn); /* allow a driver to remove itself from arbiter - really should be * done in the kernel though */ extern _X_EXPORT void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc); /* DRI and arbiter are really not possible together, * you really want to remove the card from arbitration if you can */ extern _X_EXPORT Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen); #endif /* __XF86VGAARBITER_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Optionstr.h0000644000175000017500000000273714757411105015727 /* * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef XF86OPTIONSTR_H #define XF86OPTIONSTR_H #include "list.h" /* * All options are stored using this data type. */ typedef struct _XF86OptionRec { GenericListRec list; const char *opt_name; const char *opt_val; int opt_used; const char *opt_comment; } XF86OptionRec; typedef struct _InputOption *XF86OptionPtr; #endif xorg-server-21.1.16/hw/xfree86/common/xf86platformBus.h0000644000175000017500000001347314757411105016223 /* * Copyright © 2012 Red Hat. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Dave Airlie */ #ifndef XF86_PLATFORM_BUS_H #define XF86_PLATFORM_BUS_H #include "hotplug.h" #include "xf86MatchDrivers.h" struct xf86_platform_device { struct OdevAttributes *attribs; /* for PCI devices */ struct pci_device *pdev; int flags; }; /* xf86_platform_device flags */ #define XF86_PDEV_UNOWNED 0x01 #define XF86_PDEV_SERVER_FD 0x02 #define XF86_PDEV_PAUSED 0x04 #ifdef XSERVER_PLATFORM_BUS int xf86platformProbe(void); int xf86platformProbeDev(DriverPtr drvp); int xf86platformAddGPUDevices(DriverPtr drvp); void xf86MergeOutputClassOptions(int entityIndex, void **options); extern int xf86_num_platform_devices; extern struct xf86_platform_device *xf86_platform_devices; extern int xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned); extern int xf86_remove_platform_device(int dev_index); extern Bool xf86_get_platform_device_unowned(int index); extern int xf86platformAddDevice(int index); extern void xf86platformRemoveDevice(int index); static inline struct OdevAttributes * xf86_platform_device_odev_attributes(struct xf86_platform_device *device) { return device->attribs; } static inline struct OdevAttributes * xf86_platform_odev_attributes(int index) { struct xf86_platform_device *device = &xf86_platform_devices[index]; return device->attribs; } #ifndef _XORG_CONFIG_H_ /* * Define the legacy API only for external builds */ /* path to kernel device node - Linux e.g. /dev/dri/card0 */ #define ODEV_ATTRIB_PATH 1 /* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */ #define ODEV_ATTRIB_SYSPATH 2 /* DRI-style bus id */ #define ODEV_ATTRIB_BUSID 3 /* Server managed FD */ #define ODEV_ATTRIB_FD 4 /* Major number of the device node pointed to by ODEV_ATTRIB_PATH */ #define ODEV_ATTRIB_MAJOR 5 /* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */ #define ODEV_ATTRIB_MINOR 6 /* kernel driver name */ #define ODEV_ATTRIB_DRIVER 7 /* Protect against a mismatch attribute type by generating a compiler * error using a negative array size when an incorrect attribute is * passed */ #define _ODEV_ATTRIB_IS_STRING(x) ((x) == ODEV_ATTRIB_PATH || \ (x) == ODEV_ATTRIB_SYSPATH || \ (x) == ODEV_ATTRIB_BUSID || \ (x) == ODEV_ATTRIB_DRIVER) #define _ODEV_ATTRIB_STRING_CHECK(x) ((int (*)[_ODEV_ATTRIB_IS_STRING(x)-1]) 0) static inline char * _xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib, int (*fake)[0]) { switch (attrib) { case ODEV_ATTRIB_PATH: return xf86_platform_device_odev_attributes(device)->path; case ODEV_ATTRIB_SYSPATH: return xf86_platform_device_odev_attributes(device)->syspath; case ODEV_ATTRIB_BUSID: return xf86_platform_device_odev_attributes(device)->busid; case ODEV_ATTRIB_DRIVER: return xf86_platform_device_odev_attributes(device)->driver; default: assert(FALSE); return NULL; } } #define xf86_get_platform_device_attrib(device, attrib) _xf86_get_platform_device_attrib(device,attrib,_ODEV_ATTRIB_STRING_CHECK(attrib)) #define _ODEV_ATTRIB_IS_INT(x) ((x) == ODEV_ATTRIB_FD || (x) == ODEV_ATTRIB_MAJOR || (x) == ODEV_ATTRIB_MINOR) #define _ODEV_ATTRIB_INT_DEFAULT(x) ((x) == ODEV_ATTRIB_FD ? -1 : 0) #define _ODEV_ATTRIB_DEFAULT_CHECK(x,def) (_ODEV_ATTRIB_INT_DEFAULT(x) == (def)) #define _ODEV_ATTRIB_INT_CHECK(x,def) ((int (*)[_ODEV_ATTRIB_IS_INT(x)*_ODEV_ATTRIB_DEFAULT_CHECK(x,def)-1]) 0) static inline int _xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int attrib, int (*fake)[0]) { switch (attrib) { case ODEV_ATTRIB_FD: return xf86_platform_device_odev_attributes(device)->fd; case ODEV_ATTRIB_MAJOR: return xf86_platform_device_odev_attributes(device)->major; case ODEV_ATTRIB_MINOR: return xf86_platform_device_odev_attributes(device)->minor; default: assert(FALSE); return 0; } } #define xf86_get_platform_device_int_attrib(device, attrib, def) _xf86_get_platform_device_int_attrib(device,attrib,_ODEV_ATTRIB_INT_CHECK(attrib,def)) #endif extern _X_EXPORT Bool xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid); extern _X_EXPORT void xf86PlatformMatchDriver(XF86MatchedDrivers *); extern void xf86platformVTProbe(void); extern void xf86platformPrimary(void); #else static inline int xf86platformAddGPUDevices(DriverPtr drvp) { return FALSE; } static inline void xf86MergeOutputClassOptions(int index, void **options) {} #endif #endif xorg-server-21.1.16/hw/xfree86/common/xf86MatchDrivers.h0000644000175000017500000000275314757411105016317 /* * Copyright © 2015 NVIDIA Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef _xf86_match_drivers_h #define _xf86_match_drivers_h #define MATCH_DRIVERS_LIMIT 20 typedef struct _XF86MatchedDrivers { char *matches[MATCH_DRIVERS_LIMIT]; int nmatches; } XF86MatchedDrivers; /* * prototypes */ void xf86AddMatchedDriver(XF86MatchedDrivers *, const char *); #endif /* _xf86_match_drivers_h */ xorg-server-21.1.16/hw/xfree86/common/xaarop.h0000644000175000017500000001465014757411105014501 #ifndef _XAAROP_H #define _XAAROP_H #define ROP_DST 0x00000001 #define ROP_SRC 0x00000002 #define ROP_PAT 0x00000004 #define ROP_0 0x00 #define ROP_DPSoon 0x01 #define ROP_DPSona 0x02 #define ROP_PSon 0x03 #define ROP_SDPona 0x04 #define ROP_DPon 0x05 #define ROP_PDSxnon 0x06 #define ROP_PDSaon 0x07 #define ROP_SDPnaa 0x08 #define ROP_PDSxon 0x09 #define ROP_DPna 0x0A #define ROP_PSDnaon 0x0B #define ROP_SPna 0x0C #define ROP_PDSnaon 0x0D #define ROP_PDSonon 0x0E #define ROP_Pn 0x0F #define ROP_PDSona 0x10 #define ROP_DSon 0x11 #define ROP_SDPxnon 0x12 #define ROP_SDPaon 0x13 #define ROP_DPSxnon 0x14 #define ROP_DPSaon 0x15 #define ROP_PSDPSanaxx 0x16 #define ROP_SSPxDSxaxn 0x17 #define ROP_SPxPDxa 0x18 #define ROP_SDPSanaxn 0x19 #define ROP_PDSPaox 0x1A #define ROP_SDPSxaxn 0x1B #define ROP_PSDPaox 0x1C #define ROP_DSPDxaxn 0x1D #define ROP_PDSox 0x1E #define ROP_PDSoan 0x1F #define ROP_DPSnaa 0x20 #define ROP_SDPxon 0x21 #define ROP_DSna 0x22 #define ROP_SPDnaon 0x23 #define ROP_SPxDSxa 0x24 #define ROP_PDSPanaxn 0x25 #define ROP_SDPSaox 0x26 #define ROP_SDPSxnox 0x27 #define ROP_DPSxa 0x28 #define ROP_PSDPSaoxxn 0x29 #define ROP_DPSana 0x2A #define ROP_SSPxPDxaxn 0x2B #define ROP_SPDSoax 0x2C #define ROP_PSDnox 0x2D #define ROP_PSDPxox 0x2E #define ROP_PSDnoan 0x2F #define ROP_PSna 0x30 #define ROP_SDPnaon 0x31 #define ROP_SDPSoox 0x32 #define ROP_Sn 0x33 #define ROP_SPDSaox 0x34 #define ROP_SPDSxnox 0x35 #define ROP_SDPox 0x36 #define ROP_SDPoan 0x37 #define ROP_PSDPoax 0x38 #define ROP_SPDnox 0x39 #define ROP_SPDSxox 0x3A #define ROP_SPDnoan 0x3B #define ROP_PSx 0x3C #define ROP_SPDSonox 0x3D #define ROP_SPDSnaox 0x3E #define ROP_PSan 0x3F #define ROP_PSDnaa 0x40 #define ROP_DPSxon 0x41 #define ROP_SDxPDxa 0x42 #define ROP_SPDSanaxn 0x43 #define ROP_SDna 0x44 #define ROP_DPSnaon 0x45 #define ROP_DSPDaox 0x46 #define ROP_PSDPxaxn 0x47 #define ROP_SDPxa 0x48 #define ROP_PDSPDaoxxn 0x49 #define ROP_DPSDoax 0x4A #define ROP_PDSnox 0x4B #define ROP_SDPana 0x4C #define ROP_SSPxDSxoxn 0x4D #define ROP_PDSPxox 0x4E #define ROP_PDSnoan 0x4F #define ROP_PDna 0x50 #define ROP_DSPnaon 0x51 #define ROP_DPSDaox 0x52 #define ROP_SPDSxaxn 0x53 #define ROP_DPSonon 0x54 #define ROP_Dn 0x55 #define ROP_DPSox 0x56 #define ROP_DPSoan 0x57 #define ROP_PDSPoax 0x58 #define ROP_DPSnox 0x59 #define ROP_DPx 0x5A #define ROP_DPSDonox 0x5B #define ROP_DPSDxox 0x5C #define ROP_DPSnoan 0x5D #define ROP_DPSDnaox 0x5E #define ROP_DPan 0x5F #define ROP_PDSxa 0x60 #define ROP_DSPDSaoxxn 0x61 #define ROP_DSPDoax 0x62 #define ROP_SDPnox 0x63 #define ROP_SDPSoax 0x64 #define ROP_DSPnox 0x65 #define ROP_DSx 0x66 #define ROP_SDPSonox 0x67 #define ROP_DSPDSonoxxn 0x68 #define ROP_PDSxxn 0x69 #define ROP_DPSax 0x6A #define ROP_PSDPSoaxxn 0x6B #define ROP_SDPax 0x6C #define ROP_PDSPDoaxxn 0x6D #define ROP_SDPSnoax 0x6E #define ROP_PDSxnan 0x6F #define ROP_PDSana 0x70 #define ROP_SSDxPDxaxn 0x71 #define ROP_SDPSxox 0x72 #define ROP_SDPnoan 0x73 #define ROP_DSPDxox 0x74 #define ROP_DSPnoan 0x75 #define ROP_SDPSnaox 0x76 #define ROP_DSan 0x77 #define ROP_PDSax 0x78 #define ROP_DSPDSoaxxn 0x79 #define ROP_DPSDnoax 0x7A #define ROP_SDPxnan 0x7B #define ROP_SPDSnoax 0x7C #define ROP_DPSxnan 0x7D #define ROP_SPxDSxo 0x7E #define ROP_DPSaan 0x7F #define ROP_DPSaa 0x80 #define ROP_SPxDSxon 0x81 #define ROP_DPSxna 0x82 #define ROP_SPDSnoaxn 0x83 #define ROP_SDPxna 0x84 #define ROP_PDSPnoaxn 0x85 #define ROP_DSPDSoaxx 0x86 #define ROP_PDSaxn 0x87 #define ROP_DSa 0x88 #define ROP_SDPSnaoxn 0x89 #define ROP_DSPnoa 0x8A #define ROP_DSPDxoxn 0x8B #define ROP_SDPnoa 0x8C #define ROP_SDPSxoxn 0x8D #define ROP_SSDxPDxax 0x8E #define ROP_PDSanan 0x8F #define ROP_PDSxna 0x90 #define ROP_SDPSnoaxn 0x91 #define ROP_DPSDPoaxx 0x92 #define ROP_SPDaxn 0x93 #define ROP_PSDPSoaxx 0x94 #define ROP_DPSaxn 0x95 #define ROP_DPSxx 0x96 #define ROP_PSDPSonoxx 0x97 #define ROP_SDPSonoxn 0x98 #define ROP_DSxn 0x99 #define ROP_DPSnax 0x9A #define ROP_SDPSoaxn 0x9B #define ROP_SPDnax 0x9C #define ROP_DSPDoaxn 0x9D #define ROP_DSPDSaoxx 0x9E #define ROP_PDSxan 0x9F #define ROP_DPa 0xA0 #define ROP_PDSPnaoxn 0xA1 #define ROP_DPSnoa 0xA2 #define ROP_DPSDxoxn 0xA3 #define ROP_PDSPonoxn 0xA4 #define ROP_PDxn 0xA5 #define ROP_DSPnax 0xA6 #define ROP_PDSPoaxn 0xA7 #define ROP_DPSoa 0xA8 #define ROP_DPSoxn 0xA9 #define ROP_D 0xAA #define ROP_DPSono 0xAB #define ROP_SPDSxax 0xAC #define ROP_DPSDaoxn 0xAD #define ROP_DSPnao 0xAE #define ROP_DPno 0xAF #define ROP_PDSnoa 0xB0 #define ROP_PDSPxoxn 0xB1 #define ROP_SSPxDSxox 0xB2 #define ROP_SDPanan 0xB3 #define ROP_PSDnax 0xB4 #define ROP_DPSDoaxn 0xB5 #define ROP_DPSDPaoxx 0xB6 #define ROP_SDPxan 0xB7 #define ROP_PSDPxax 0xB8 #define ROP_DSPDaoxn 0xB9 #define ROP_DPSnao 0xBA #define ROP_DSno 0xBB #define ROP_SPDSanax 0xBC #define ROP_SDxPDxan 0xBD #define ROP_DPSxo 0xBE #define ROP_DPSano 0xBF #define ROP_Psa 0xC0 #define ROP_SPDSnaoxn 0xC1 #define ROP_SPDSonoxn 0xC2 #define ROP_PSxn 0xC3 #define ROP_SPDnoa 0xC4 #define ROP_SPDSxoxn 0xC5 #define ROP_SDPnax 0xC6 #define ROP_PSDPoaxn 0xC7 #define ROP_SDPoa 0xC8 #define ROP_SPDoxn 0xC9 #define ROP_DPSDxax 0xCA #define ROP_SPDSaoxn 0xCB #define ROP_S 0xCC #define ROP_SDPono 0xCD #define ROP_SDPnao 0xCE #define ROP_SPno 0xCF #define ROP_PSDnoa 0xD0 #define ROP_PSDPxoxn 0xD1 #define ROP_PDSnax 0xD2 #define ROP_SPDSoaxn 0xD3 #define ROP_SSPxPDxax 0xD4 #define ROP_DPSanan 0xD5 #define ROP_PSDPSaoxx 0xD6 #define ROP_DPSxan 0xD7 #define ROP_PDSPxax 0xD8 #define ROP_SDPSaoxn 0xD9 #define ROP_DPSDanax 0xDA #define ROP_SPxDSxan 0xDB #define ROP_SPDnao 0xDC #define ROP_SDno 0xDD #define ROP_SDPxo 0xDE #define ROP_SDPano 0xDF #define ROP_PDSoa 0xE0 #define ROP_PDSoxn 0xE1 #define ROP_DSPDxax 0xE2 #define ROP_PSDPaoxn 0xE3 #define ROP_SDPSxax 0xE4 #define ROP_PDSPaoxn 0xE5 #define ROP_SDPSanax 0xE6 #define ROP_SPxPDxan 0xE7 #define ROP_SSPxDSxax 0xE8 #define ROP_DSPDSanaxxn 0xE9 #define ROP_DPSao 0xEA #define ROP_DPSxno 0xEB #define ROP_SDPao 0xEC #define ROP_SDPxno 0xED #define ROP_DSo 0xEE #define ROP_SDPnoo 0xEF #define ROP_P 0xF0 #define ROP_PDSono 0xF1 #define ROP_PDSnao 0xF2 #define ROP_PSno 0xF3 #define ROP_PSDnao 0xF4 #define ROP_PDno 0xF5 #define ROP_PDSxo 0xF6 #define ROP_PDSano 0xF7 #define ROP_PDSao 0xF8 #define ROP_PDSxno 0xF9 #define ROP_DPo 0xFA #define ROP_DPSnoo 0xFB #define ROP_PSo 0xFC #define ROP_PSDnoo 0xFD #define ROP_DPSoo 0xFE #define ROP_1 0xFF #define NO_SRC_ROP(rop) \ ((rop == GXnoop) || (rop == GXset) || (rop == GXclear) || (rop == GXinvert)) #endif /* _XAAROP_H */ xorg-server-21.1.16/hw/xfree86/common/Makefile.in0000644000175000017500000011153414757411115015103 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @LNXACPI_TRUE@am__append_1 = -DHAVE_ACPI @NEED_DBUS_TRUE@am__append_2 = $(DBUS_CFLAGS) subdir = hw/xfree86/common ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcommon_la_DEPENDENCIES = $(top_builddir)/config/libconfig.la am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Cursor.c xf86DGA.c xf86DPMS.c xf86Events.c xf86Globals.c \ xf86AutoConfig.c xf86Option.c xf86Init.c xf86VidMode.c \ xf86fbman.c xf86cmap.c xf86Helper.c xf86PM.c xf86Xinput.c \ xisb.c xf86Mode.c xorgHelper.c xf86Extensions.h \ xf86Extensions.c xf86xv.c xf86xvmc.c xf86fbBus.c xf86noBus.c \ xf86pciBus.c xf86VGAarbiter.c xf86VGAarbiter.h \ xf86VGAarbiterPriv.h xf86sbusBus.c xf86platformBus.c \ xf86RandR.c @DGA_TRUE@am__objects_1 = xf86DGA.lo @XV_TRUE@am__objects_2 = xf86xv.lo xf86xvmc.lo @XORG_BUS_PCI_TRUE@am__objects_3 = xf86pciBus.lo xf86VGAarbiter.lo @XORG_BUS_SPARC_TRUE@am__objects_4 = xf86sbusBus.lo @XORG_BUS_PLATFORM_TRUE@am__objects_5 = xf86platformBus.lo am__objects_6 = xf86fbBus.lo xf86noBus.lo $(am__objects_3) \ $(am__objects_4) $(am__objects_5) am__objects_7 = xf86RandR.lo am_libcommon_la_OBJECTS = xf86Configure.lo xf86Bus.lo xf86Config.lo \ xf86Cursor.lo $(am__objects_1) xf86DPMS.lo xf86Events.lo \ xf86Globals.lo xf86AutoConfig.lo xf86Option.lo xf86Init.lo \ xf86VidMode.lo xf86fbman.lo xf86cmap.lo xf86Helper.lo \ xf86PM.lo xf86Xinput.lo xisb.lo xf86Mode.lo xorgHelper.lo \ xf86Extensions.lo $(am__objects_2) $(am__objects_6) \ $(am__objects_7) nodist_libcommon_la_OBJECTS = xf86DefModeSet.lo libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) \ $(nodist_libcommon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xf86AutoConfig.Plo \ ./$(DEPDIR)/xf86Bus.Plo ./$(DEPDIR)/xf86Config.Plo \ ./$(DEPDIR)/xf86Configure.Plo ./$(DEPDIR)/xf86Cursor.Plo \ ./$(DEPDIR)/xf86DGA.Plo ./$(DEPDIR)/xf86DPMS.Plo \ ./$(DEPDIR)/xf86DefModeSet.Plo ./$(DEPDIR)/xf86Events.Plo \ ./$(DEPDIR)/xf86Extensions.Plo ./$(DEPDIR)/xf86Globals.Plo \ ./$(DEPDIR)/xf86Helper.Plo ./$(DEPDIR)/xf86Init.Plo \ ./$(DEPDIR)/xf86Mode.Plo ./$(DEPDIR)/xf86Option.Plo \ ./$(DEPDIR)/xf86PM.Plo ./$(DEPDIR)/xf86RandR.Plo \ ./$(DEPDIR)/xf86VGAarbiter.Plo ./$(DEPDIR)/xf86VidMode.Plo \ ./$(DEPDIR)/xf86Xinput.Plo ./$(DEPDIR)/xf86cmap.Plo \ ./$(DEPDIR)/xf86fbBus.Plo ./$(DEPDIR)/xf86fbman.Plo \ ./$(DEPDIR)/xf86noBus.Plo ./$(DEPDIR)/xf86pciBus.Plo \ ./$(DEPDIR)/xf86platformBus.Plo ./$(DEPDIR)/xf86sbusBus.Plo \ ./$(DEPDIR)/xf86xv.Plo ./$(DEPDIR)/xf86xvmc.Plo \ ./$(DEPDIR)/xisb.Plo ./$(DEPDIR)/xorgHelper.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libcommon_la_SOURCES) $(nodist_libcommon_la_SOURCES) DIST_SOURCES = $(am__libcommon_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = compiler.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86cmap.h xf86fbman.h \ xf86str.h xf86Xinput.h xisb.h xf86xv.h xf86xvmc.h xf86xvpriv.h \ dgaproc.h xorgVersion.h xf86sbusBus.h xf86VGAarbiter.h \ xf86Optionstr.h xf86platformBus.h xf86MatchDrivers.h xaarop.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ $(am__append_1) $(am__append_2) XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcommon.la @XORG_BUS_PCI_TRUE@PCI_SOURCES = xf86pciBus.c xf86VGAarbiter.c xf86VGAarbiter.h \ @XORG_BUS_PCI_TRUE@ xf86VGAarbiterPriv.h @XORG_BUS_SPARC_TRUE@SBUS_SOURCES = xf86sbusBus.c @XV_TRUE@XVSOURCES = xf86xv.c xf86xvmc.c @XV_TRUE@XVSDKINCS = xf86xv.h xf86xvmc.h xf86xvpriv.h @DGA_TRUE@DGASOURCES = xf86DGA.c @DGA_TRUE@DGA_SDK = dgaproc.h @XORG_BUS_PLATFORM_TRUE@PLATSOURCES = xf86platformBus.c RANDRSOURCES = xf86RandR.c BUSSOURCES = xf86fbBus.c xf86noBus.c $(PCI_SOURCES) $(SBUS_SOURCES) $(PLATSOURCES) MODEDEFSOURCES = $(srcdir)/vesamodes $(srcdir)/extramodes BUILT_SOURCES = xf86DefModeSet.c AM_LDFLAGS = -r libcommon_la_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \ xf86Cursor.c $(DGASOURCES) xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c \ xf86Option.c xf86Init.c \ xf86VidMode.c xf86fbman.c xf86cmap.c \ xf86Helper.c xf86PM.c xf86Xinput.c xisb.c \ xf86Mode.c xorgHelper.c xf86Extensions.h \ xf86Extensions.c $(XF86VMODESOURCES) \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../dixmods/extmod \ -I$(srcdir)/../modes -I$(srcdir)/../ramdac -I$(srcdir)/../dri2 \ -I$(top_builddir) sdk_HEADERS = compiler.h xf86.h xf86Module.h xf86Opt.h \ xf86PciInfo.h xf86Priv.h xf86Privstr.h \ xf86cmap.h xf86fbman.h xf86str.h xf86Xinput.h xisb.h \ $(XVSDKINCS) $(XF86VMODE_SDK) $(DGA_SDK) xorgVersion.h \ xf86sbusBus.h xf86VGAarbiter.h xf86Optionstr.h \ xf86platformBus.h xf86MatchDrivers.h \ xaarop.h CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = \ compiler.h \ xf86.h \ xf86Bus.h \ xf86Config.h \ xf86InPriv.h \ xf86Module.h \ xf86Opt.h \ xf86PciInfo.h \ xf86Priv.h \ xf86Privstr.h \ xf86Xinput.h \ xf86cmap.h \ xf86fbman.h \ xf86pciBus.h \ xf86str.h \ xf86xv.h \ xf86xvmc.h \ xf86xvpriv.h \ xisb.h \ xorgVersion.h \ $(MODEDEFSOURCES) \ modeline2c.awk \ xf86VGAarbiter.h \ xf86VGAarbiterPriv.h \ $(DISTKBDSOURCES) \ xaarop.h AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/common/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86AutoConfig.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Bus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Config.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Configure.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DGA.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DPMS.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DefModeSet.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Events.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Extensions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Globals.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Helper.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Mode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Option.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86PM.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VGAarbiter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86VidMode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Xinput.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86cmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86fbBus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86fbman.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86noBus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86pciBus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86platformBus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86sbusBus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86xv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86xvmc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorgHelper.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xf86AutoConfig.Plo -rm -f ./$(DEPDIR)/xf86Bus.Plo -rm -f ./$(DEPDIR)/xf86Config.Plo -rm -f ./$(DEPDIR)/xf86Configure.Plo -rm -f ./$(DEPDIR)/xf86Cursor.Plo -rm -f ./$(DEPDIR)/xf86DGA.Plo -rm -f ./$(DEPDIR)/xf86DPMS.Plo -rm -f ./$(DEPDIR)/xf86DefModeSet.Plo -rm -f ./$(DEPDIR)/xf86Events.Plo -rm -f ./$(DEPDIR)/xf86Extensions.Plo -rm -f ./$(DEPDIR)/xf86Globals.Plo -rm -f ./$(DEPDIR)/xf86Helper.Plo -rm -f ./$(DEPDIR)/xf86Init.Plo -rm -f ./$(DEPDIR)/xf86Mode.Plo -rm -f ./$(DEPDIR)/xf86Option.Plo -rm -f ./$(DEPDIR)/xf86PM.Plo -rm -f ./$(DEPDIR)/xf86RandR.Plo -rm -f ./$(DEPDIR)/xf86VGAarbiter.Plo -rm -f ./$(DEPDIR)/xf86VidMode.Plo -rm -f ./$(DEPDIR)/xf86Xinput.Plo -rm -f ./$(DEPDIR)/xf86cmap.Plo -rm -f ./$(DEPDIR)/xf86fbBus.Plo -rm -f ./$(DEPDIR)/xf86fbman.Plo -rm -f ./$(DEPDIR)/xf86noBus.Plo -rm -f ./$(DEPDIR)/xf86pciBus.Plo -rm -f ./$(DEPDIR)/xf86platformBus.Plo -rm -f ./$(DEPDIR)/xf86sbusBus.Plo -rm -f ./$(DEPDIR)/xf86xv.Plo -rm -f ./$(DEPDIR)/xf86xvmc.Plo -rm -f ./$(DEPDIR)/xisb.Plo -rm -f ./$(DEPDIR)/xorgHelper.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xf86AutoConfig.Plo -rm -f ./$(DEPDIR)/xf86Bus.Plo -rm -f ./$(DEPDIR)/xf86Config.Plo -rm -f ./$(DEPDIR)/xf86Configure.Plo -rm -f ./$(DEPDIR)/xf86Cursor.Plo -rm -f ./$(DEPDIR)/xf86DGA.Plo -rm -f ./$(DEPDIR)/xf86DPMS.Plo -rm -f ./$(DEPDIR)/xf86DefModeSet.Plo -rm -f ./$(DEPDIR)/xf86Events.Plo -rm -f ./$(DEPDIR)/xf86Extensions.Plo -rm -f ./$(DEPDIR)/xf86Globals.Plo -rm -f ./$(DEPDIR)/xf86Helper.Plo -rm -f ./$(DEPDIR)/xf86Init.Plo -rm -f ./$(DEPDIR)/xf86Mode.Plo -rm -f ./$(DEPDIR)/xf86Option.Plo -rm -f ./$(DEPDIR)/xf86PM.Plo -rm -f ./$(DEPDIR)/xf86RandR.Plo -rm -f ./$(DEPDIR)/xf86VGAarbiter.Plo -rm -f ./$(DEPDIR)/xf86VidMode.Plo -rm -f ./$(DEPDIR)/xf86Xinput.Plo -rm -f ./$(DEPDIR)/xf86cmap.Plo -rm -f ./$(DEPDIR)/xf86fbBus.Plo -rm -f ./$(DEPDIR)/xf86fbman.Plo -rm -f ./$(DEPDIR)/xf86noBus.Plo -rm -f ./$(DEPDIR)/xf86pciBus.Plo -rm -f ./$(DEPDIR)/xf86platformBus.Plo -rm -f ./$(DEPDIR)/xf86sbusBus.Plo -rm -f ./$(DEPDIR)/xf86xv.Plo -rm -f ./$(DEPDIR)/xf86xvmc.Plo -rm -f ./$(DEPDIR)/xisb.Plo -rm -f ./$(DEPDIR)/xorgHelper.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile xf86DefModeSet.c: $(srcdir)/modeline2c.awk $(MODEDEFSOURCES) $(AM_V_GEN)cat $(MODEDEFSOURCES) | LC_ALL=C $(AWK) -f $(srcdir)/modeline2c.awk > $@ $(AM_V_GEN)echo >> $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/common/xf86Configure.c0000644000175000017500000006746614757411105015654 /* * Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales. * * 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 Alan Hourihane not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Alan Hourihane makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL ALAN HOURIHANE 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. * * Author: Alan Hourihane, alanh@fairlite.demon.co.uk * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86Config.h" #include "xf86_OSlib.h" #include "xf86Priv.h" #define IN_XSERVER #include "Configint.h" #include "xf86DDC.h" #include "xf86pciBus.h" #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) #include "xf86Bus.h" #include "xf86Sbus.h" #endif #include "misc.h" #include "loaderProcs.h" typedef struct _DevToConfig { GDevRec GDev; struct pci_device *pVideo; #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) sbusDevicePtr sVideo; #endif int iDriver; } DevToConfigRec, *DevToConfigPtr; static DevToConfigPtr DevToConfig = NULL; static int nDevToConfig = 0, CurrentDriver; xf86MonPtr ConfiguredMonitor; Bool xf86DoConfigurePass1 = TRUE; static Bool foundMouse = FALSE; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) static const char *DFLT_MOUSE_DEV = "/dev/sysmouse"; static const char *DFLT_MOUSE_PROTO = "auto"; #elif defined(__linux__) static const char *DFLT_MOUSE_DEV = "/dev/input/mice"; static const char *DFLT_MOUSE_PROTO = "auto"; #elif defined(WSCONS_SUPPORT) static const char *DFLT_MOUSE_DEV = "/dev/wsmouse"; static const char *DFLT_MOUSE_PROTO = "wsmouse"; #else static const char *DFLT_MOUSE_DEV = "/dev/mouse"; static const char *DFLT_MOUSE_PROTO = "auto"; #endif /* * This is called by the driver, either through xf86Match???Instances() or * directly. We allocate a GDevRec and fill it in as much as we can, letting * the caller fill in the rest and/or change it as it sees fit. */ GDevPtr xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) { int ret, i, j; char *lower_driver; if (!xf86DoConfigure || !xf86DoConfigurePass1) return NULL; /* Check for duplicates */ for (i = 0; i < nDevToConfig; i++) { switch (bus) { #ifdef XSERVER_LIBPCIACCESS case BUS_PCI: ret = xf86PciConfigure(busData, DevToConfig[i].pVideo); break; #endif #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: ret = xf86SbusConfigure(busData, DevToConfig[i].sVideo); break; #endif default: return NULL; } if (ret == 0) goto out; } /* Allocate new structure occurrence */ i = nDevToConfig++; DevToConfig = xnfreallocarray(DevToConfig, nDevToConfig, sizeof(DevToConfigRec)); memset(DevToConfig + i, 0, sizeof(DevToConfigRec)); DevToConfig[i].GDev.chipID = DevToConfig[i].GDev.chipRev = DevToConfig[i].GDev.irq = -1; DevToConfig[i].iDriver = CurrentDriver; /* Fill in what we know, converting the driver name to lower case */ lower_driver = xnfalloc(strlen(driver) + 1); for (j = 0; (lower_driver[j] = tolower(driver[j])); j++); DevToConfig[i].GDev.driver = lower_driver; switch (bus) { #ifdef XSERVER_LIBPCIACCESS case BUS_PCI: DevToConfig[i].pVideo = busData; xf86PciConfigureNewDev(busData, DevToConfig[i].pVideo, &DevToConfig[i].GDev, &chipset); break; #endif #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) case BUS_SBUS: DevToConfig[i].sVideo = busData; xf86SbusConfigureNewDev(busData, DevToConfig[i].sVideo, &DevToConfig[i].GDev); break; #endif default: break; } /* Get driver's available options */ if (xf86DriverList[CurrentDriver]->AvailableOptions) DevToConfig[i].GDev.options = (OptionInfoPtr) (*xf86DriverList[CurrentDriver]->AvailableOptions) (chipset, bus); return &DevToConfig[i].GDev; out: return NULL; } static XF86ConfInputPtr configureInputSection(void) { XF86ConfInputPtr mouse = NULL; parsePrologue(XF86ConfInputPtr, XF86ConfInputRec); ptr->inp_identifier = xnfstrdup("Keyboard0"); ptr->inp_driver = xnfstrdup("kbd"); ptr->list.next = NULL; /* Crude mechanism to auto-detect mouse (os dependent) */ { int fd; fd = open(DFLT_MOUSE_DEV, 0); if (fd != -1) { foundMouse = TRUE; close(fd); } } mouse = calloc(1, sizeof(XF86ConfInputRec)); mouse->inp_identifier = xnfstrdup("Mouse0"); mouse->inp_driver = xnfstrdup("mouse"); mouse->inp_option_lst = xf86addNewOption(mouse->inp_option_lst, xnfstrdup("Protocol"), xnfstrdup(DFLT_MOUSE_PROTO)); mouse->inp_option_lst = xf86addNewOption(mouse->inp_option_lst, xnfstrdup("Device"), xnfstrdup(DFLT_MOUSE_DEV)); mouse->inp_option_lst = xf86addNewOption(mouse->inp_option_lst, xnfstrdup("ZAxisMapping"), xnfstrdup("4 5 6 7")); ptr = (XF86ConfInputPtr) xf86addListItem((glp) ptr, (glp) mouse); return ptr; } static XF86ConfScreenPtr configureScreenSection(int screennum) { int i; int depths[] = { 1, 4, 8, 15, 16, 24 /*, 32 */ }; char *tmp; parsePrologue(XF86ConfScreenPtr, XF86ConfScreenRec); XNFasprintf(&tmp, "Screen%d", screennum); ptr->scrn_identifier = tmp; XNFasprintf(&tmp, "Monitor%d", screennum); ptr->scrn_monitor_str = tmp; XNFasprintf(&tmp, "Card%d", screennum); ptr->scrn_device_str = tmp; for (i = 0; i < ARRAY_SIZE(depths); i++) { XF86ConfDisplayPtr conf_display; conf_display = calloc(1, sizeof(XF86ConfDisplayRec)); conf_display->disp_depth = depths[i]; conf_display->disp_black.red = conf_display->disp_white.red = -1; conf_display->disp_black.green = conf_display->disp_white.green = -1; conf_display->disp_black.blue = conf_display->disp_white.blue = -1; ptr->scrn_display_lst = (XF86ConfDisplayPtr) xf86addListItem((glp) ptr-> scrn_display_lst, (glp) conf_display); } return ptr; } static const char * optionTypeToString(OptionValueType type) { switch (type) { case OPTV_NONE: return ""; case OPTV_INTEGER: return ""; case OPTV_STRING: return ""; case OPTV_ANYSTR: return "[]"; case OPTV_REAL: return ""; case OPTV_BOOLEAN: return "[]"; case OPTV_FREQ: return ""; case OPTV_PERCENT: return ""; default: return ""; } } static XF86ConfDevicePtr configureDeviceSection(int screennum) { OptionInfoPtr p; int i = 0; char *identifier; parsePrologue(XF86ConfDevicePtr, XF86ConfDeviceRec); /* Move device info to parser structure */ if (asprintf(&identifier, "Card%d", screennum) == -1) identifier = NULL; ptr->dev_identifier = identifier; ptr->dev_chipset = DevToConfig[screennum].GDev.chipset; ptr->dev_busid = DevToConfig[screennum].GDev.busID; ptr->dev_driver = DevToConfig[screennum].GDev.driver; ptr->dev_ramdac = DevToConfig[screennum].GDev.ramdac; for (i = 0; i < MAXDACSPEEDS; i++) ptr->dev_dacSpeeds[i] = DevToConfig[screennum].GDev.dacSpeeds[i]; ptr->dev_videoram = DevToConfig[screennum].GDev.videoRam; ptr->dev_mem_base = DevToConfig[screennum].GDev.MemBase; ptr->dev_io_base = DevToConfig[screennum].GDev.IOBase; ptr->dev_clockchip = DevToConfig[screennum].GDev.clockchip; for (i = 0; (i < MAXCLOCKS) && (i < DevToConfig[screennum].GDev.numclocks); i++) ptr->dev_clock[i] = DevToConfig[screennum].GDev.clock[i]; ptr->dev_clocks = i; ptr->dev_chipid = DevToConfig[screennum].GDev.chipID; ptr->dev_chiprev = DevToConfig[screennum].GDev.chipRev; ptr->dev_irq = DevToConfig[screennum].GDev.irq; /* Make sure older drivers don't segv */ if (DevToConfig[screennum].GDev.options) { /* Fill in the available driver options for people to use */ const char *descrip = " ### Available Driver options are:-\n" " ### Values: : integer, : float, " ": \"True\"/\"False\",\n" " ### : \"String\", : \" Hz/kHz/MHz\",\n" " ### : \"%\"\n" " ### [arg]: arg optional\n"; ptr->dev_comment = xnfstrdup(descrip); if (ptr->dev_comment) { for (p = DevToConfig[screennum].GDev.options; p->name != NULL; p++) { char *p_e; const char *prefix = " #Option "; const char *middle = " \t# "; const char *suffix = "\n"; const char *opttype = optionTypeToString(p->type); char *optname; int len = strlen(ptr->dev_comment) + strlen(prefix) + strlen(middle) + strlen(suffix) + 1; if (asprintf(&optname, "\"%s\"", p->name) == -1) break; len += max(20, strlen(optname)); len += strlen(opttype); ptr->dev_comment = realloc(ptr->dev_comment, len); if (!ptr->dev_comment) { free(optname); break; } p_e = ptr->dev_comment + strlen(ptr->dev_comment); sprintf(p_e, "%s%-20s%s%s%s", prefix, optname, middle, opttype, suffix); free(optname); } } } return ptr; } static XF86ConfLayoutPtr configureLayoutSection(void) { int scrnum = 0; parsePrologue(XF86ConfLayoutPtr, XF86ConfLayoutRec); ptr->lay_identifier = "X.org Configured"; { XF86ConfInputrefPtr iptr; iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = xnfstrdup("Mouse0"); iptr->iref_option_lst = xf86addNewOption(iptr->iref_option_lst, xnfstrdup("CorePointer"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) ptr->lay_input_lst, (glp) iptr); } { XF86ConfInputrefPtr iptr; iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = xnfstrdup("Keyboard0"); iptr->iref_option_lst = xf86addNewOption(iptr->iref_option_lst, xnfstrdup("CoreKeyboard"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) ptr->lay_input_lst, (glp) iptr); } for (scrnum = 0; scrnum < nDevToConfig; scrnum++) { XF86ConfAdjacencyPtr aptr; char *tmp; aptr = malloc(sizeof(XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_x = 0; aptr->adj_y = 0; aptr->adj_scrnum = scrnum; XNFasprintf(&tmp, "Screen%d", scrnum); aptr->adj_screen_str = tmp; if (scrnum == 0) { aptr->adj_where = CONF_ADJ_ABSOLUTE; aptr->adj_refscreen = NULL; } else { aptr->adj_where = CONF_ADJ_RIGHTOF; XNFasprintf(&tmp, "Screen%d", scrnum - 1); aptr->adj_refscreen = tmp; } ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr) xf86addListItem((glp) ptr->lay_adjacency_lst, (glp) aptr); } return ptr; } static XF86ConfFlagsPtr configureFlagsSection(void) { parsePrologue(XF86ConfFlagsPtr, XF86ConfFlagsRec); return ptr; } static XF86ConfModulePtr configureModuleSection(void) { const char **elist, **el; parsePrologue(XF86ConfModulePtr, XF86ConfModuleRec); elist = LoaderListDir("extensions", NULL); if (elist) { for (el = elist; *el; el++) { XF86LoadPtr module; module = calloc(1, sizeof(XF86LoadRec)); module->load_name = *el; ptr->mod_load_lst = (XF86LoadPtr) xf86addListItem((glp) ptr-> mod_load_lst, (glp) module); } free(elist); } return ptr; } static XF86ConfFilesPtr configureFilesSection(void) { parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec); if (xf86ModulePath) ptr->file_modulepath = xnfstrdup(xf86ModulePath); if (defaultFontPath) ptr->file_fontpath = xnfstrdup(defaultFontPath); return ptr; } static XF86ConfMonitorPtr configureMonitorSection(int screennum) { char *tmp; parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec); XNFasprintf(&tmp, "Monitor%d", screennum); ptr->mon_identifier = tmp; ptr->mon_vendor = xnfstrdup("Monitor Vendor"); ptr->mon_modelname = xnfstrdup("Monitor Model"); return ptr; } /* Initialize Configure Monitor from Detailed Timing Block */ static void handle_detailed_input(struct detailed_monitor_section *det_mon, void *data) { XF86ConfMonitorPtr ptr = (XF86ConfMonitorPtr) data; switch (det_mon->type) { case DS_NAME: ptr->mon_modelname = realloc(ptr->mon_modelname, strlen((char *) (det_mon->section.name)) + 1); strcpy(ptr->mon_modelname, (char *) (det_mon->section.name)); break; case DS_RANGES: ptr->mon_hsync[ptr->mon_n_hsync].lo = det_mon->section.ranges.min_h; ptr->mon_hsync[ptr->mon_n_hsync].hi = det_mon->section.ranges.max_h; ptr->mon_n_vrefresh = 1; ptr->mon_vrefresh[ptr->mon_n_hsync].lo = det_mon->section.ranges.min_v; ptr->mon_vrefresh[ptr->mon_n_hsync].hi = det_mon->section.ranges.max_v; ptr->mon_n_hsync++; default: break; } } static XF86ConfMonitorPtr configureDDCMonitorSection(int screennum) { int len, mon_width, mon_height; #define displaySizeMaxLen 80 char displaySize_string[displaySizeMaxLen]; int displaySizeLen; char *tmp; parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec); XNFasprintf(&tmp, "Monitor%d", screennum); ptr->mon_identifier = tmp; ptr->mon_vendor = xnfstrdup(ConfiguredMonitor->vendor.name); XNFasprintf(&ptr->mon_modelname, "%x", ConfiguredMonitor->vendor.prod_id); /* features in centimetres, we want millimetres */ mon_width = 10 * ConfiguredMonitor->features.hsize; mon_height = 10 * ConfiguredMonitor->features.vsize; #ifdef CONFIGURE_DISPLAYSIZE ptr->mon_width = mon_width; ptr->mon_height = mon_height; #else if (mon_width && mon_height) { /* when values available add DisplaySize option AS A COMMENT */ displaySizeLen = snprintf(displaySize_string, displaySizeMaxLen, "\t#DisplaySize\t%5d %5d\t# mm\n", mon_width, mon_height); if (displaySizeLen > 0 && displaySizeLen < displaySizeMaxLen) { if (ptr->mon_comment) { len = strlen(ptr->mon_comment); } else { len = 0; } if ((ptr->mon_comment = realloc(ptr->mon_comment, len + strlen(displaySize_string) + 1))) { strcpy(ptr->mon_comment + len, displaySize_string); } } } #endif /* def CONFIGURE_DISPLAYSIZE */ xf86ForEachDetailedBlock(ConfiguredMonitor, handle_detailed_input, ptr); if (ConfiguredMonitor->features.dpms) { ptr->mon_option_lst = xf86addNewOption(ptr->mon_option_lst, xnfstrdup("DPMS"), NULL); } return ptr; } static int is_fallback(const char *s) { /* later entries are less preferred */ const char *fallback[5] = { "modesetting", "fbdev", "vesa", "wsfb", NULL }; int i; for (i = 0; fallback[i]; i++) if (strstr(s, fallback[i])) return i; return -1; } static int driver_sort(const void *_l, const void *_r) { const char *l = *(const char **)_l; const char *r = *(const char **)_r; int left = is_fallback(l); int right = is_fallback(r); /* neither is a fallback, asciibetize */ if (left == -1 && right == -1) return strcmp(l, r); /* left is a fallback, right is not */ if (left >= 0 && right == -1) return 1; /* right is a fallback, left is not */ if (right >= 0 && left == -1) return -1; /* both are fallbacks, decide which is worse */ return left - right; } static void fixup_video_driver_list(const char **drivers) { const char **end; /* walk to the end of the list */ for (end = drivers; *end && **end; end++); qsort(drivers, end - drivers, sizeof(const char *), driver_sort); } static const char ** GenerateDriverList(void) { const char **ret; static const char *patlist[] = { "(.*)_drv\\.so", NULL }; ret = LoaderListDir("drivers", patlist); /* fix up the probe order for video drivers */ if (ret != NULL) fixup_video_driver_list(ret); return ret; } void DoConfigure(void) { int i, j, screennum = -1; const char *home = NULL; char filename[PATH_MAX]; const char *addslash = ""; XF86ConfigPtr xf86config = NULL; const char **vlist, **vl; int *dev2screen; vlist = GenerateDriverList(); if (!vlist) { ErrorF("Missing output drivers. Configuration failed.\n"); goto bail; } ErrorF("List of video drivers:\n"); for (vl = vlist; *vl; vl++) ErrorF("\t%s\n", *vl); /* Load all the drivers that were found. */ xf86LoadModules(vlist, NULL); free(vlist); xorgHWAccess = xf86EnableIO(); /* Create XF86Config file structure */ xf86config = calloc(1, sizeof(XF86ConfigRec)); /* Call all of the probe functions, reporting the results. */ for (CurrentDriver = 0; CurrentDriver < xf86NumDrivers; CurrentDriver++) { Bool found_screen; DriverRec *const drv = xf86DriverList[CurrentDriver]; found_screen = xf86CallDriverProbe(drv, TRUE); if (found_screen && drv->Identify) { (*drv->Identify) (0); } } if (nDevToConfig <= 0) { ErrorF("No devices to configure. Configuration failed.\n"); goto bail; } /* Add device, monitor and screen sections for detected devices */ for (screennum = 0; screennum < nDevToConfig; screennum++) { XF86ConfDevicePtr device_ptr; XF86ConfMonitorPtr monitor_ptr; XF86ConfScreenPtr screen_ptr; device_ptr = configureDeviceSection(screennum); xf86config->conf_device_lst = (XF86ConfDevicePtr) xf86addListItem((glp) xf86config-> conf_device_lst, (glp) device_ptr); monitor_ptr = configureMonitorSection(screennum); xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) monitor_ptr); screen_ptr = configureScreenSection(screennum); xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp) xf86config-> conf_screen_lst, (glp) screen_ptr); } xf86config->conf_files = configureFilesSection(); xf86config->conf_modules = configureModuleSection(); xf86config->conf_flags = configureFlagsSection(); xf86config->conf_videoadaptor_lst = NULL; xf86config->conf_modes_lst = NULL; xf86config->conf_vendor_lst = NULL; xf86config->conf_dri = NULL; xf86config->conf_input_lst = configureInputSection(); xf86config->conf_layout_lst = configureLayoutSection(); home = getenv("HOME"); if ((home == NULL) || (home[0] == '\0')) { home = "/"; } else { /* Determine if trailing slash is present or needed */ int l = strlen(home); if (home[l - 1] != '/') { addslash = "/"; } } snprintf(filename, sizeof(filename), "%s%s" XF86CONFIGFILE ".new", home, addslash); if (xf86writeConfigFile(filename, xf86config) == 0) { xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", filename, strerror(errno)); goto bail; } xf86DoConfigurePass1 = FALSE; /* Try to get DDC information filled in */ xf86ConfigFile = filename; if (xf86HandleConfigFile(FALSE) != CONFIG_OK) { goto bail; } xf86DoConfigurePass1 = FALSE; dev2screen = xnfcalloc(nDevToConfig, sizeof(int)); { Bool *driverProbed = xnfcalloc(xf86NumDrivers, sizeof(Bool)); for (screennum = 0; screennum < nDevToConfig; screennum++) { int k, l, n, oldNumScreens; i = DevToConfig[screennum].iDriver; if (driverProbed[i]) continue; driverProbed[i] = TRUE; oldNumScreens = xf86NumScreens; xf86CallDriverProbe(xf86DriverList[i], FALSE); /* reorder */ k = screennum > 0 ? screennum : 1; for (l = oldNumScreens; l < xf86NumScreens; l++) { /* is screen primary? */ Bool primary = FALSE; for (n = 0; n < xf86Screens[l]->numEntities; n++) { if (xf86IsEntityPrimary(xf86Screens[l]->entityList[n])) { dev2screen[0] = l; primary = TRUE; break; } } if (primary) continue; /* not primary: assign it to next device of same driver */ /* * NOTE: we assume that devices in DevToConfig * and xf86Screens[] have the same order except * for the primary device which always comes first. */ for (; k < nDevToConfig; k++) { if (DevToConfig[k].iDriver == i) { dev2screen[k++] = l; break; } } } } free(driverProbed); } if (nDevToConfig != xf86NumScreens) { ErrorF("Number of created screens does not match number of detected" " devices.\n Configuration failed.\n"); goto bail; } xf86PostProbe(); for (j = 0; j < xf86NumScreens; j++) { xf86Screens[j]->scrnIndex = j; } xf86freeMonitorList(xf86config->conf_monitor_lst); xf86config->conf_monitor_lst = NULL; xf86freeScreenList(xf86config->conf_screen_lst); xf86config->conf_screen_lst = NULL; for (j = 0; j < xf86NumScreens; j++) { XF86ConfMonitorPtr monitor_ptr; XF86ConfScreenPtr screen_ptr; ConfiguredMonitor = NULL; if ((*xf86Screens[dev2screen[j]]->PreInit) && (*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]], PROBE_DETECT) && ConfiguredMonitor) { monitor_ptr = configureDDCMonitorSection(j); } else { monitor_ptr = configureMonitorSection(j); } screen_ptr = configureScreenSection(j); xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) monitor_ptr); xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp) xf86config-> conf_screen_lst, (glp) screen_ptr); } if (xf86writeConfigFile(filename, xf86config) == 0) { xf86Msg(X_ERROR, "Unable to write config file: \"%s\": %s\n", filename, strerror(errno)); goto bail; } ErrorF("\n"); if (!foundMouse) { ErrorF("\n" __XSERVERNAME__ " is not able to detect your mouse.\n" "Edit the file and correct the Device.\n"); } else { ErrorF("\n" __XSERVERNAME__ " detected your mouse at device %s.\n" "Please check your config if the mouse is still not\n" "operational, as by default " __XSERVERNAME__ " tries to autodetect\n" "the protocol.\n", DFLT_MOUSE_DEV); } if (xf86NumScreens > 1) { ErrorF("\n" __XSERVERNAME__ " has configured a multihead system, please check your config.\n"); } ErrorF("\nYour %s file is %s\n\n", XF86CONFIGFILE, filename); ErrorF("To test the server, run 'X -config %s'\n\n", filename); bail: OsCleanup(TRUE); ddxGiveUp(EXIT_ERR_CONFIGURE); fflush(stderr); exit(0); } /* Xorg -showopts: * For each driver module installed, print out the list * of options and their argument types, then exit * * Author: Marcus Schaefer, ms@suse.de */ void DoShowOptions(void) { int i = 0; const char **vlist = NULL; char *pSymbol = 0; XF86ModuleData *initData = 0; if (!(vlist = GenerateDriverList())) { ErrorF("Missing output drivers\n"); goto bail; } xf86LoadModules(vlist, 0); free(vlist); for (i = 0; i < xf86NumDrivers; i++) { if (xf86DriverList[i]->AvailableOptions) { const OptionInfoRec *pOption = (*xf86DriverList[i]->AvailableOptions) (0, 0); if (!pOption) { ErrorF("(EE) Couldn't read option table for %s driver\n", xf86DriverList[i]->driverName); continue; } XNFasprintf(&pSymbol, "%sModuleData", xf86DriverList[i]->driverName); initData = LoaderSymbol(pSymbol); if (initData) { XF86ModuleVersionInfo *vers = initData->vers; const OptionInfoRec *p; ErrorF("Driver[%d]:%s[%s] {\n", i, xf86DriverList[i]->driverName, vers->vendor); for (p = pOption; p->name != NULL; p++) { ErrorF("\t%s:%s\n", p->name, optionTypeToString(p->type)); } ErrorF("}\n"); } } } bail: OsCleanup(TRUE); ddxGiveUp(EXIT_ERR_DRIVERS); fflush(stderr); exit(0); } xorg-server-21.1.16/hw/xfree86/common/xf86Bus.c0000644000175000017500000004412014757411105014442 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the interfaces to the bus-specific code */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" #ifdef XSERVER_LIBPCIACCESS #include "xf86VGAarbiter.h" #endif /* Entity data */ EntityPtr *xf86Entities = NULL; /* Bus slots claimed by drivers */ int xf86NumEntities = 0; static int xf86EntityPrivateCount = 0; BusRec primaryBus = { BUS_NONE, {0} }; /** * Call the driver's correct probe function. * * If the driver implements the \c DriverRec::PciProbe entry-point and an * appropriate PCI device (with matching Device section in the xorg.conf file) * is found, it is called. If \c DriverRec::PciProbe or no devices can be * successfully probed with it (e.g., only non-PCI devices are available), * the driver's \c DriverRec::Probe function is called. * * \param drv Driver to probe * * \return * If a device can be successfully probed by the driver, \c TRUE is * returned. Otherwise, \c FALSE is returned. */ Bool xf86CallDriverProbe(DriverPtr drv, Bool detect_only) { Bool foundScreen = FALSE; #ifdef XSERVER_PLATFORM_BUS /* xf86platformBus.c does not support Xorg -configure */ if (!xf86DoConfigure && drv->platformProbe != NULL) { foundScreen = xf86platformProbeDev(drv); } #endif #ifdef XSERVER_LIBPCIACCESS if (!foundScreen && (drv->PciProbe != NULL)) { if (xf86DoConfigure && xf86DoConfigurePass1) { assert(detect_only); foundScreen = xf86PciAddMatchingDev(drv); } else { assert(!detect_only); foundScreen = xf86PciProbeDev(drv); } } #endif if (!foundScreen && (drv->Probe != NULL)) { xf86Msg(X_WARNING, "Falling back to old probe method for %s\n", drv->driverName); foundScreen = (*drv->Probe) (drv, (detect_only) ? PROBE_DETECT : PROBE_DEFAULT); } return foundScreen; } static screenLayoutPtr xf86BusConfigMatch(ScrnInfoPtr scrnInfo, Bool is_gpu) { screenLayoutPtr layout; int i, j; for (layout = xf86ConfigLayout.screens; layout->screen != NULL; layout++) { for (i = 0; i < scrnInfo->numEntities; i++) { GDevPtr dev = xf86GetDevFromEntity(scrnInfo->entityList[i], scrnInfo->entityInstanceList[i]); if (is_gpu) { for (j = 0; j < layout->screen->num_gpu_devices; j++) { if (dev == layout->screen->gpu_devices[j]) { /* A match has been found */ return layout; } } } else { if (dev == layout->screen->device) { /* A match has been found */ return layout; } } } } return NULL; } /** * @return TRUE if all buses are configured and set up correctly and FALSE * otherwise. */ Bool xf86BusConfig(void) { screenLayoutPtr layout; int i; /* * 3 step probe to (hopefully) ensure that we always find at least 1 * (non GPU) screen: * * 1. Call each drivers probe function normally, * Each successful probe will result in an extra entry added to the * xf86Screens[] list for each instance of the hardware found. */ for (i = 0; i < xf86NumDrivers; i++) { xf86CallDriverProbe(xf86DriverList[i], FALSE); } /* * 2. If no Screens were found, call each drivers probe function with * ignorePrimary = TRUE, to ensure that we do actually get a * Screen if there is at least one supported video card. */ if (xf86NumScreens == 0) { xf86ProbeIgnorePrimary = TRUE; for (i = 0; i < xf86NumDrivers && xf86NumScreens == 0; i++) { xf86CallDriverProbe(xf86DriverList[i], FALSE); } xf86ProbeIgnorePrimary = FALSE; } /* * 3. Call xf86platformAddGPUDevices() to add any additional video cards as * GPUScreens (GPUScreens are only supported by platformBus drivers). */ for (i = 0; i < xf86NumDrivers; i++) { xf86platformAddGPUDevices(xf86DriverList[i]); } /* If nothing was detected, return now */ if (xf86NumScreens == 0) { xf86Msg(X_ERROR, "No devices detected.\n"); return FALSE; } xf86VGAarbiterInit(); /* * Match up the screens found by the probes against those specified * in the config file. Remove the ones that won't be used. Sort * them in the order specified. * * What is the best way to do this? * * For now, go through the screens allocated by the probes, and * look for screen config entry which refers to the same device * section as picked out by the probe. * */ for (i = 0; i < xf86NumScreens; i++) { layout = xf86BusConfigMatch(xf86Screens[i], FALSE); if (layout && layout->screen) xf86Screens[i]->confScreen = layout->screen; else { /* No match found */ xf86Msg(X_ERROR, "Screen %d deleted because of no matching config section.\n", i); xf86DeleteScreen(xf86Screens[i--]); } } /* bind GPU conf screen to the configured protocol screen, or 0 if not configured */ for (i = 0; i < xf86NumGPUScreens; i++) { layout = xf86BusConfigMatch(xf86GPUScreens[i], TRUE); int scrnum = (layout && layout->screen) ? layout->screen->screennum : 0; xf86GPUScreens[i]->confScreen = xf86Screens[scrnum]->confScreen; } /* If no screens left, return now. */ if (xf86NumScreens == 0) { xf86Msg(X_ERROR, "Device(s) detected, but none match those in the config file.\n"); return FALSE; } return TRUE; } /* * Call the bus probes relevant to the architecture. * * The only one available so far is for PCI and SBUS. */ void xf86BusProbe(void) { #ifdef XSERVER_PLATFORM_BUS xf86platformProbe(); if (ServerIsNotSeat0() && xf86_num_platform_devices > 0) return; #endif #ifdef XSERVER_LIBPCIACCESS xf86PciProbe(); #endif #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) xf86SbusProbe(); #endif #ifdef XSERVER_PLATFORM_BUS xf86platformPrimary(); #endif } /* * Determine what bus type the busID string represents. The start of the * bus-dependent part of the string is returned as retID. */ BusType StringToBusType(const char *busID, const char **retID) { char *p, *s; BusType ret = BUS_NONE; /* If no type field, Default to PCI */ if (isdigit(busID[0])) { if (retID) *retID = busID; return BUS_PCI; } s = xstrdup(busID); p = strtok(s, ":"); if (p == NULL || *p == 0) { free(s); return BUS_NONE; } if (!xf86NameCmp(p, "pci") || !xf86NameCmp(p, "agp")) ret = BUS_PCI; if (!xf86NameCmp(p, "sbus")) ret = BUS_SBUS; if (!xf86NameCmp(p, "platform")) ret = BUS_PLATFORM; if (!xf86NameCmp(p, "usb")) ret = BUS_USB; if (ret != BUS_NONE) if (retID) *retID = busID + strlen(p) + 1; free(s); return ret; } int xf86AllocateEntity(void) { xf86NumEntities++; xf86Entities = xnfreallocarray(xf86Entities, xf86NumEntities, sizeof(EntityPtr)); xf86Entities[xf86NumEntities - 1] = xnfcalloc(1, sizeof(EntityRec)); xf86Entities[xf86NumEntities - 1]->entityPrivates = xnfcalloc(xf86EntityPrivateCount, sizeof(DevUnion)); return xf86NumEntities - 1; } Bool xf86IsEntityPrimary(int entityIndex) { EntityPtr pEnt = xf86Entities[entityIndex]; #ifdef XSERVER_LIBPCIACCESS if (primaryBus.type == BUS_PLATFORM && pEnt->bus.type == BUS_PCI) if (primaryBus.id.plat->pdev) return MATCH_PCI_DEVICES(pEnt->bus.id.pci, primaryBus.id.plat->pdev); #endif if (primaryBus.type != pEnt->bus.type) return FALSE; switch (pEnt->bus.type) { case BUS_PCI: return pEnt->bus.id.pci == primaryBus.id.pci; case BUS_SBUS: return pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum; case BUS_PLATFORM: return pEnt->bus.id.plat == primaryBus.id.plat; default: return FALSE; } } Bool xf86DriverHasEntities(DriverPtr drvp) { int i; for (i = 0; i < xf86NumEntities; i++) { if (xf86Entities[i]->driver == drvp) return TRUE; } return FALSE; } void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex) { if (entityIndex == -1) return; if (xf86Entities[entityIndex]->inUse && !(xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL)) { ErrorF("Requested Entity already in use!\n"); return; } pScrn->numEntities++; pScrn->entityList = xnfreallocarray(pScrn->entityList, pScrn->numEntities, sizeof(int)); pScrn->entityList[pScrn->numEntities - 1] = entityIndex; xf86Entities[entityIndex]->inUse = TRUE; pScrn->entityInstanceList = xnfreallocarray(pScrn->entityInstanceList, pScrn->numEntities, sizeof(int)); pScrn->entityInstanceList[pScrn->numEntities - 1] = 0; } void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, int instance) { int i; if (entityIndex == -1 || entityIndex >= xf86NumEntities) return; for (i = 0; i < pScrn->numEntities; i++) { if (pScrn->entityList[i] == entityIndex) { pScrn->entityInstanceList[i] = instance; break; } } } /* * XXX This needs to be updated for the case where a single entity may have * instances associated with more than one screen. */ ScrnInfoPtr xf86FindScreenForEntity(int entityIndex) { int i, j; if (entityIndex == -1) return NULL; if (xf86Screens) { for (i = 0; i < xf86NumScreens; i++) { for (j = 0; j < xf86Screens[i]->numEntities; j++) { if (xf86Screens[i]->entityList[j] == entityIndex) return xf86Screens[i]; } } } return NULL; } void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex) { int i; for (i = 0; i < pScrn->numEntities; i++) { if (pScrn->entityList[i] == entityIndex) { for (i++; i < pScrn->numEntities; i++) pScrn->entityList[i - 1] = pScrn->entityList[i]; pScrn->numEntities--; xf86Entities[entityIndex]->inUse = FALSE; break; } } } /* * xf86ClearEntityListForScreen() - called when a screen is deleted * to mark its entities unused. Called by xf86DeleteScreen(). */ void xf86ClearEntityListForScreen(ScrnInfoPtr pScrn) { int i, entityIndex; if (pScrn->entityList == NULL || pScrn->numEntities == 0) return; for (i = 0; i < pScrn->numEntities; i++) { entityIndex = pScrn->entityList[i]; xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ } free(pScrn->entityList); free(pScrn->entityInstanceList); pScrn->entityList = NULL; pScrn->entityInstanceList = NULL; } /* * Add an extra device section (GDevPtr) to an entity. */ void xf86AddDevToEntity(int entityIndex, GDevPtr dev) { EntityPtr pEnt; if (entityIndex >= xf86NumEntities) return; pEnt = xf86Entities[entityIndex]; pEnt->numInstances++; pEnt->devices = xnfreallocarray(pEnt->devices, pEnt->numInstances, sizeof(GDevPtr)); pEnt->devices[pEnt->numInstances - 1] = dev; dev->claimed = TRUE; } void xf86RemoveDevFromEntity(int entityIndex, GDevPtr dev) { EntityPtr pEnt; int i, j; if (entityIndex >= xf86NumEntities) return; pEnt = xf86Entities[entityIndex]; for (i = 0; i < pEnt->numInstances; i++) { if (pEnt->devices[i] == dev) { for (j = i; j < pEnt->numInstances - 1; j++) pEnt->devices[j] = pEnt->devices[j + 1]; break; } } pEnt->numInstances--; dev->claimed = FALSE; } /* * xf86GetEntityInfo() -- This function hands information from the * EntityRec struct to the drivers. The EntityRec structure itself * remains invisible to the driver. */ EntityInfoPtr xf86GetEntityInfo(int entityIndex) { EntityInfoPtr pEnt; int i; if (entityIndex == -1) return NULL; if (entityIndex >= xf86NumEntities) return NULL; pEnt = xnfcalloc(1, sizeof(EntityInfoRec)); pEnt->index = entityIndex; pEnt->location = xf86Entities[entityIndex]->bus; pEnt->active = xf86Entities[entityIndex]->active; pEnt->chipset = xf86Entities[entityIndex]->chipset; pEnt->driver = xf86Entities[entityIndex]->driver; if ((xf86Entities[entityIndex]->devices) && (xf86Entities[entityIndex]->devices[0])) { for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++) if (xf86Entities[entityIndex]->devices[i]->screen == 0) break; pEnt->device = xf86Entities[entityIndex]->devices[i]; } else pEnt->device = NULL; return pEnt; } int xf86GetNumEntityInstances(int entityIndex) { if (entityIndex >= xf86NumEntities) return -1; return xf86Entities[entityIndex]->numInstances; } GDevPtr xf86GetDevFromEntity(int entityIndex, int instance) { int i; /* We might not use AddDevtoEntity */ if ((!xf86Entities[entityIndex]->devices) || (!xf86Entities[entityIndex]->devices[0])) return NULL; if (entityIndex >= xf86NumEntities || instance >= xf86Entities[entityIndex]->numInstances) return NULL; for (i = 0; i < xf86Entities[entityIndex]->numInstances; i++) if (xf86Entities[entityIndex]->devices[i]->screen == instance) return xf86Entities[entityIndex]->devices[i]; return NULL; } /* * xf86PostProbe() -- Allocate all non conflicting resources * This function gets called by xf86Init(). */ void xf86PostProbe(void) { if (fbSlotClaimed && ( #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) sbusSlotClaimed || #endif #ifdef XSERVER_PLATFORM_BUS platformSlotClaimed || #endif #ifdef XSERVER_LIBPCIACCESS pciSlotClaimed #else TRUE #endif )) FatalError("Cannot run in framebuffer mode. Please specify busIDs " " for all framebuffer devices\n"); } Bool xf86IsEntityShared(int entityIndex) { if (entityIndex < xf86NumEntities) { if (xf86Entities[entityIndex]->entityProp & IS_SHARED_ACCEL) { return TRUE; } } return FALSE; } void xf86SetEntityShared(int entityIndex) { if (entityIndex < xf86NumEntities) { xf86Entities[entityIndex]->entityProp |= IS_SHARED_ACCEL; } } Bool xf86IsEntitySharable(int entityIndex) { if (entityIndex < xf86NumEntities) { if (xf86Entities[entityIndex]->entityProp & ACCEL_IS_SHARABLE) { return TRUE; } } return FALSE; } void xf86SetEntitySharable(int entityIndex) { if (entityIndex < xf86NumEntities) { xf86Entities[entityIndex]->entityProp |= ACCEL_IS_SHARABLE; } } Bool xf86IsPrimInitDone(int entityIndex) { if (entityIndex < xf86NumEntities) { if (xf86Entities[entityIndex]->entityProp & SA_PRIM_INIT_DONE) { return TRUE; } } return FALSE; } void xf86SetPrimInitDone(int entityIndex) { if (entityIndex < xf86NumEntities) { xf86Entities[entityIndex]->entityProp |= SA_PRIM_INIT_DONE; } } void xf86ClearPrimInitDone(int entityIndex) { if (entityIndex < xf86NumEntities) { xf86Entities[entityIndex]->entityProp &= ~SA_PRIM_INIT_DONE; } } /* * Allocate a private in the entities. */ int xf86AllocateEntityPrivateIndex(void) { int idx, i; EntityPtr pEnt; DevUnion *nprivs; idx = xf86EntityPrivateCount++; for (i = 0; i < xf86NumEntities; i++) { pEnt = xf86Entities[i]; nprivs = xnfreallocarray(pEnt->entityPrivates, xf86EntityPrivateCount, sizeof(DevUnion)); /* Zero the new private */ memset(&nprivs[idx], 0, sizeof(DevUnion)); pEnt->entityPrivates = nprivs; } return idx; } DevUnion * xf86GetEntityPrivate(int entityIndex, int privIndex) { if (entityIndex >= xf86NumEntities || privIndex >= xf86EntityPrivateCount) return NULL; return &(xf86Entities[entityIndex]->entityPrivates[privIndex]); } xorg-server-21.1.16/hw/xfree86/common/xf86Config.c0000644000175000017500000023634314757411105015130 /* * Loosely based on code bearing the following copyright: * * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. */ /* * Copyright 1992-2003 by The XFree86 Project, Inc. * Copyright 1997 by Metro Link, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * * Authors: * Dirk Hohndel * David Dawes * Marc La France * Egbert Eich * ... and others */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86Modes.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "xf86Config.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "configProcs.h" #include "globals.h" #include "extension.h" #include "xf86pciBus.h" #include "xf86Xinput.h" #include "loaderProcs.h" #include "xkbsrv.h" #include "picture.h" #ifdef DPMSExtension #include "dpmsproc.h" #endif /* * These paths define the way the config file search is done. The escape * sequences are documented in parser/scan.c. */ #ifndef ALL_CONFIGPATH #define ALL_CONFIGPATH "%A," "%R," \ "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ "/etc/X11/%F," "%P/etc/X11/%F," \ "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," \ "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," \ "%P/lib/X11/%X" #endif #ifndef RESTRICTED_CONFIGPATH #define RESTRICTED_CONFIGPATH "/etc/X11/%S," "%P/etc/X11/%S," \ "/etc/X11/%G," "%P/etc/X11/%G," \ "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," \ "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," \ "%P/lib/X11/%X" #endif #ifndef ALL_CONFIGDIRPATH #define ALL_CONFIGDIRPATH "%A," "%R," \ "/etc/X11/%R," "%C/X11/%R," \ "/etc/X11/%X," "%C/X11/%X" #endif #ifndef RESTRICTED_CONFIGDIRPATH #define RESTRICTED_CONFIGDIRPATH "/etc/X11/%R," "%C/X11/%R," \ "/etc/X11/%X," "%C/X11/%X" #endif #ifndef SYS_CONFIGDIRPATH #define SYS_CONFIGDIRPATH "%D/X11/%X" #endif #ifndef PROJECTROOT #define PROJECTROOT "/usr/X11R6" #endif static ModuleDefault ModuleDefaults[] = { #ifdef GLXEXT {.name = "glx",.toLoad = TRUE,.load_opt = NULL}, #endif #ifdef __CYGWIN__ /* load DIX modules used by drivers first */ {.name = "fb",.toLoad = TRUE,.load_opt = NULL}, {.name = "shadow",.toLoad = TRUE,.load_opt = NULL}, #endif {.name = NULL,.toLoad = FALSE,.load_opt = NULL} }; /* Forward declarations */ static Bool configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, MessageType from, Bool auto_gpu_device); static Bool configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor); static Bool configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active, Bool gpu); static Bool configInput(InputInfoPtr pInfo, XF86ConfInputPtr conf_input, MessageType from); static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display); static Bool addDefaultModes(MonPtr monitorp); static void configDRI(XF86ConfDRIPtr drip); static void configExtensions(XF86ConfExtensionsPtr conf_ext); /* * xf86GetPathElem -- * Extract a single element from the font path string starting at * pnt. The font path element will be returned, and pnt will be * updated to point to the start of the next element, or set to * NULL if there are no more. */ static char * xf86GetPathElem(char **pnt) { char *p1; p1 = *pnt; *pnt = index(*pnt, ','); if (*pnt != NULL) { **pnt = '\0'; *pnt += 1; } return p1; } /* * xf86ValidateFontPath -- * Validates the user-specified font path. Each element that * begins with a '/' is checked to make sure the directory exists. * If the directory exists, the existence of a file named 'fonts.dir' * is checked. If either check fails, an error is printed and the * element is removed from the font path. */ #define DIR_FILE "/fonts.dir" static char * xf86ValidateFontPath(char *path) { char *next, *tmp_path, *out_pnt, *path_elem, *p1, *dir_elem; struct stat stat_buf; int flag; int dirlen; tmp_path = calloc(1, strlen(path) + 1); out_pnt = tmp_path; path_elem = NULL; next = path; while (next != NULL) { path_elem = xf86GetPathElem(&next); if (*path_elem == '/') { dir_elem = xnfcalloc(1, strlen(path_elem) + 1); if ((p1 = strchr(path_elem, ':')) != 0) dirlen = p1 - path_elem; else dirlen = strlen(path_elem); strlcpy(dir_elem, path_elem, dirlen + 1); flag = stat(dir_elem, &stat_buf); if (flag == 0) if (!S_ISDIR(stat_buf.st_mode)) flag = -1; if (flag != 0) { xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); free(dir_elem); continue; } else { XNFasprintf(&p1, "%s%s", dir_elem, DIR_FILE); flag = stat(p1, &stat_buf); if (flag == 0) if (!S_ISREG(stat_buf.st_mode)) flag = -1; free(p1); if (flag != 0) { xf86Msg(X_WARNING, "`fonts.dir' not found (or not valid) in \"%s\".\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem); free(dir_elem); continue; } } free(dir_elem); } /* * Either an OK directory, or a font server name. So add it to * the path. */ if (out_pnt != tmp_path) *out_pnt++ = ','; strcat(out_pnt, path_elem); out_pnt += strlen(path_elem); } return tmp_path; } #define FIND_SUITABLE(pointertype, listhead, ptr) \ do { \ pointertype _l, _p; \ \ for (_l = (listhead), _p = NULL; !_p && _l; _l = (pointertype)_l->list.next) { \ if (!_l->match_seat || (SeatId && xf86nameCompare(_l->match_seat, SeatId) == 0)) \ _p = _l; \ } \ \ (ptr) = _p; \ } while(0) /* * use the datastructure that the parser provides and pick out the parts * that we need at this point */ const char ** xf86ModulelistFromConfig(void ***optlist) { int count = 0, i = 0; const char **modulearray; const char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", "freetype", "type1", NULL }; void **optarray; XF86LoadPtr modp; Bool found; /* * make sure the config file has been parsed and that we have a * ModulePath set; if no ModulePath was given, use the default * ModulePath */ if (xf86configptr == NULL) { xf86Msg(X_ERROR, "Cannot access global config data structure\n"); return NULL; } if (xf86configptr->conf_modules) { /* Walk the disable list and let people know what we've parsed to * not be loaded */ modp = xf86configptr->conf_modules->mod_disable_lst; while (modp) { xf86Msg(X_WARNING, "\"%s\" will not be loaded unless you've specified it to be loaded elsewhere.\n", modp->load_name); modp = (XF86LoadPtr) modp->list.next; } /* * Walk the default settings table. For each module listed to be * loaded, make sure it's in the mod_load_lst. If it's not, make * sure it's not in the mod_no_load_lst. If it's not disabled, * append it to mod_load_lst */ for (i = 0; ModuleDefaults[i].name != NULL; i++) { if (ModuleDefaults[i].toLoad == FALSE) { xf86Msg(X_WARNING, "\"%s\" is not to be loaded by default. Skipping.\n", ModuleDefaults[i].name); continue; } found = FALSE; modp = xf86configptr->conf_modules->mod_load_lst; while (modp) { if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) { xf86Msg(X_INFO, "\"%s\" will be loaded. This was enabled by default and also specified in the config file.\n", ModuleDefaults[i].name); found = TRUE; break; } modp = (XF86LoadPtr) modp->list.next; } if (found == FALSE) { modp = xf86configptr->conf_modules->mod_disable_lst; while (modp) { if (strcmp(modp->load_name, ModuleDefaults[i].name) == 0) { xf86Msg(X_INFO, "\"%s\" will be loaded even though the default is to disable it.\n", ModuleDefaults[i].name); found = TRUE; break; } modp = (XF86LoadPtr) modp->list.next; } } if (found == FALSE) { XF86LoadPtr ptr = (XF86LoadPtr) xf86configptr->conf_modules; xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt); xf86Msg(X_INFO, "\"%s\" will be loaded by default.\n", ModuleDefaults[i].name); } } } else { xf86configptr->conf_modules = xnfcalloc(1, sizeof(XF86ConfModuleRec)); for (i = 0; ModuleDefaults[i].name != NULL; i++) { if (ModuleDefaults[i].toLoad == TRUE) { XF86LoadPtr ptr = (XF86LoadPtr) xf86configptr->conf_modules; xf86addNewLoadDirective(ptr, ModuleDefaults[i].name, XF86_LOAD_MODULE, ModuleDefaults[i].load_opt); } } } /* * Walk the list of modules in the "Module" section to determine how * many we have. */ modp = xf86configptr->conf_modules->mod_load_lst; while (modp) { for (i = 0; ignore[i]; i++) { if (strcmp(modp->load_name, ignore[i]) == 0) modp->ignore = 1; } if (!modp->ignore) count++; modp = (XF86LoadPtr) modp->list.next; } /* * allocate the memory and walk the list again to fill in the pointers */ modulearray = xnfallocarray(count + 1, sizeof(char *)); optarray = xnfallocarray(count + 1, sizeof(void *)); count = 0; if (xf86configptr->conf_modules) { modp = xf86configptr->conf_modules->mod_load_lst; while (modp) { if (!modp->ignore) { modulearray[count] = modp->load_name; optarray[count] = modp->load_opt; count++; } modp = (XF86LoadPtr) modp->list.next; } } modulearray[count] = NULL; optarray[count] = NULL; if (optlist) *optlist = optarray; else free(optarray); return modulearray; } const char ** xf86DriverlistFromConfig(void) { int count = 0; int j, k; const char **modulearray; screenLayoutPtr slp; /* * make sure the config file has been parsed and that we have a * ModulePath set; if no ModulePath was given, use the default * ModulePath */ if (xf86configptr == NULL) { xf86Msg(X_ERROR, "Cannot access global config data structure\n"); return NULL; } /* * Walk the list of driver lines in active "Device" sections to * determine now many implicitly loaded modules there are. * */ if (xf86ConfigLayout.screens) { slp = xf86ConfigLayout.screens; while (slp->screen) { count++; count += slp->screen->num_gpu_devices; slp++; } } /* * Handle the set of inactive "Device" sections. */ j = 0; while (xf86ConfigLayout.inactives[j++].identifier) count++; if (count == 0) return NULL; /* * allocate the memory and walk the list again to fill in the pointers */ modulearray = xnfallocarray(count + 1, sizeof(char *)); count = 0; slp = xf86ConfigLayout.screens; while (slp->screen) { modulearray[count] = slp->screen->device->driver; count++; for (k = 0; k < slp->screen->num_gpu_devices; k++) { modulearray[count] = slp->screen->gpu_devices[k]->driver; count++; } slp++; } j = 0; while (xf86ConfigLayout.inactives[j].identifier) modulearray[count++] = xf86ConfigLayout.inactives[j++].driver; modulearray[count] = NULL; /* Remove duplicates */ for (count = 0; modulearray[count] != NULL; count++) { int i; for (i = 0; i < count; i++) if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) { modulearray[count] = ""; break; } } return modulearray; } const char ** xf86InputDriverlistFromConfig(void) { int count = 0; const char **modulearray; InputInfoPtr *idp; /* * make sure the config file has been parsed and that we have a * ModulePath set; if no ModulePath was given, use the default * ModulePath */ if (xf86configptr == NULL) { xf86Msg(X_ERROR, "Cannot access global config data structure\n"); return NULL; } /* * Walk the list of driver lines in active "InputDevice" sections to * determine now many implicitly loaded modules there are. */ if (xf86ConfigLayout.inputs) { idp = xf86ConfigLayout.inputs; while (*idp) { count++; idp++; } } if (count == 0) return NULL; /* * allocate the memory and walk the list again to fill in the pointers */ modulearray = xnfallocarray(count + 1, sizeof(char *)); count = 0; idp = xf86ConfigLayout.inputs; while (idp && *idp) { modulearray[count] = (*idp)->driver; count++; idp++; } modulearray[count] = NULL; /* Remove duplicates */ for (count = 0; modulearray[count] != NULL; count++) { int i; for (i = 0; i < count; i++) if (xf86NameCmp(modulearray[i], modulearray[count]) == 0) { modulearray[count] = ""; break; } } return modulearray; } static void configFiles(XF86ConfFilesPtr fileconf) { MessageType pathFrom; Bool must_copy; int size, countDirs; char *temp_path, *log_buf, *start, *end; /* FontPath */ must_copy = TRUE; temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) ""; if (xf86fpFlag) pathFrom = X_CMDLINE; else if (fileconf && fileconf->file_fontpath) { pathFrom = X_CONFIG; if (xf86Info.useDefaultFontPath) { char *new_font_path; if (asprintf(&new_font_path, "%s%s%s", fileconf->file_fontpath, *temp_path ? "," : "", temp_path) == -1) new_font_path = NULL; else must_copy = FALSE; defaultFontPath = new_font_path; } else defaultFontPath = fileconf->file_fontpath; } else pathFrom = X_DEFAULT; temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) ""; /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? xnfstrdup(defaultFontPath) : (char *) defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); free(temp_path); /* make fontpath more readable in the logfiles */ countDirs = 1; temp_path = (char *) defaultFontPath; while ((temp_path = index(temp_path, ',')) != NULL) { countDirs++; temp_path++; } log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); temp_path = log_buf; start = (char *) defaultFontPath; while ((end = index(start, ',')) != NULL) { size = (end - start) + 1; *(temp_path++) = '\t'; strncpy(temp_path, start, size); temp_path += size; *(temp_path++) = '\n'; start += size; } /* copy last entry */ *(temp_path++) = '\t'; strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); free(log_buf); /* ModulePath */ if (fileconf) { if (xf86ModPathFrom != X_CMDLINE && fileconf->file_modulepath) { xf86ModulePath = fileconf->file_modulepath; xf86ModPathFrom = X_CONFIG; } } xf86Msg(xf86ModPathFrom, "ModulePath set to \"%s\"\n", xf86ModulePath); if (!xf86xkbdirFlag && fileconf && fileconf->file_xkbdir) { XkbBaseDirectory = fileconf->file_xkbdir; xf86Msg(X_CONFIG, "XKB base directory set to \"%s\"\n", XkbBaseDirectory); } #if 0 /* LogFile */ /* * XXX The problem with this is that the log file is already open. * One option might be to copy the exiting contents to the new location. * and re-open it. The down side is that the default location would * already have been overwritten. Another option would be to start with * unique temporary location, then copy it once the correct name is known. * A problem with this is what happens if the server exits before that * happens. */ if (xf86LogFileFrom == X_DEFAULT && fileconf->file_logfile) { xf86LogFile = fileconf->file_logfile; xf86LogFileFrom = X_CONFIG; } #endif return; } typedef enum { FLAG_DONTVTSWITCH, FLAG_DONTZAP, FLAG_DONTZOOM, FLAG_DISABLEVIDMODE, FLAG_ALLOWNONLOCAL, FLAG_ALLOWMOUSEOPENFAIL, FLAG_SAVER_BLANKTIME, FLAG_DPMS_STANDBYTIME, FLAG_DPMS_SUSPENDTIME, FLAG_DPMS_OFFTIME, FLAG_NOPM, FLAG_XINERAMA, FLAG_LOG, FLAG_RENDER_COLORMAP_MODE, FLAG_IGNORE_ABI, FLAG_ALLOW_EMPTY_INPUT, FLAG_USE_DEFAULT_FONT_PATH, FLAG_AUTO_ADD_DEVICES, FLAG_AUTO_ENABLE_DEVICES, FLAG_GLX_VISUALS, FLAG_DRI2, FLAG_USE_SIGIO, FLAG_AUTO_ADD_GPU, FLAG_AUTO_BIND_GPU, FLAG_MAX_CLIENTS, FLAG_IGLX, FLAG_DEBUG, FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, } FlagValues; /** * NOTE: the last value for each entry is NOT the default. It is set to TRUE * if the parser found the option in the config file. */ static OptionInfoRec FlagOptions[] = { {FLAG_DONTVTSWITCH, "DontVTSwitch", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_ALLOWNONLOCAL, "AllowNonLocalXvidtune", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_ALLOWMOUSEOPENFAIL, "AllowMouseOpenFail", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_SAVER_BLANKTIME, "BlankTime", OPTV_INTEGER, {0}, FALSE}, {FLAG_DPMS_STANDBYTIME, "StandbyTime", OPTV_INTEGER, {0}, FALSE}, {FLAG_DPMS_SUSPENDTIME, "SuspendTime", OPTV_INTEGER, {0}, FALSE}, {FLAG_DPMS_OFFTIME, "OffTime", OPTV_INTEGER, {0}, FALSE}, {FLAG_NOPM, "NoPM", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_XINERAMA, "Xinerama", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_LOG, "Log", OPTV_STRING, {0}, FALSE}, {FLAG_RENDER_COLORMAP_MODE, "RenderColormapMode", OPTV_STRING, {0}, FALSE}, {FLAG_IGNORE_ABI, "IgnoreABI", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_USE_DEFAULT_FONT_PATH, "UseDefaultFontPath", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_AUTO_ADD_DEVICES, "AutoAddDevices", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_AUTO_ENABLE_DEVICES, "AutoEnableDevices", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_GLX_VISUALS, "GlxVisuals", OPTV_STRING, {0}, FALSE}, {FLAG_DRI2, "DRI2", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_USE_SIGIO, "UseSIGIO", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_AUTO_ADD_GPU, "AutoAddGPU", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_AUTO_BIND_GPU, "AutoBindGPU", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_MAX_CLIENTS, "MaxClients", OPTV_INTEGER, {0}, FALSE }, {FLAG_IGLX, "IndirectGLX", OPTV_BOOLEAN, {0}, FALSE}, {FLAG_DEBUG, "Debug", OPTV_STRING, {0}, FALSE}, {FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, "AllowByteSwappedClients", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; static void configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) { XF86OptionPtr optp, tmp; int i; Bool value; MessageType from; const char *s; XkbRMLVOSet set; const char *rules; /* * Merge the ServerLayout and ServerFlags options. The former have * precedence over the latter. */ optp = NULL; if (flagsconf && flagsconf->flg_option_lst) optp = xf86optionListDup(flagsconf->flg_option_lst); if (layoutopts) { tmp = xf86optionListDup(layoutopts); if (optp) optp = xf86optionListMerge(optp, tmp); else optp = tmp; } xf86ProcessOptions(-1, optp, FlagOptions); xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch); xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap); xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom); xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI); if (xf86Info.ignoreABI) { xf86Msg(X_CONFIG, "Ignoring ABI Version\n"); } xf86GetOptValBool(FlagOptions, FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, &AllowByteSwappedClients); if (AllowByteSwappedClients) { xf86Msg(X_CONFIG, "Allowing byte-swapped clients\n"); } else { xf86Msg(X_CONFIG, "Prohibiting byte-swapped clients\n"); } if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES, &xf86Info.autoAddDevices); from = X_CONFIG; } else { from = X_DEFAULT; } xf86Msg(from, "%sutomatically adding devices\n", xf86Info.autoAddDevices ? "A" : "Not a"); if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ENABLE_DEVICES)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ENABLE_DEVICES, &xf86Info.autoEnableDevices); from = X_CONFIG; } else { from = X_DEFAULT; } xf86Msg(from, "%sutomatically enabling devices\n", xf86Info.autoEnableDevices ? "A" : "Not a"); if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_GPU)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_GPU, &xf86Info.autoAddGPU); from = X_CONFIG; } else { from = X_DEFAULT; } xf86Msg(from, "%sutomatically adding GPU devices\n", xf86Info.autoAddGPU ? "A" : "Not a"); if (xf86AutoBindGPUDisabled) { xf86Info.autoBindGPU = FALSE; from = X_CMDLINE; } else if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_BIND_GPU)) { xf86GetOptValBool(FlagOptions, FLAG_AUTO_BIND_GPU, &xf86Info.autoBindGPU); from = X_CONFIG; } else { from = X_DEFAULT; } xf86Msg(from, "%sutomatically binding GPU devices\n", xf86Info.autoBindGPU ? "A" : "Not a"); /* * Set things up based on the config file information. Some of these * settings may be overridden later when the command line options are * checked. */ #ifdef XF86VIDMODE if (xf86GetOptValBool(FlagOptions, FLAG_DISABLEVIDMODE, &value)) xf86Info.vidModeEnabled = !value; if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWNONLOCAL, &value)) xf86Info.vidModeAllowNonLocal = value; #endif if (xf86GetOptValBool(FlagOptions, FLAG_ALLOWMOUSEOPENFAIL, &value)) xf86Info.allowMouseOpenFail = value; xf86Info.pmFlag = TRUE; if (xf86GetOptValBool(FlagOptions, FLAG_NOPM, &value)) xf86Info.pmFlag = !value; { if ((s = xf86GetOptValString(FlagOptions, FLAG_LOG))) { if (!xf86NameCmp(s, "flush")) { xf86Msg(X_CONFIG, "Flushing logfile enabled\n"); LogSetParameter(XLOG_FLUSH, TRUE); } else if (!xf86NameCmp(s, "sync")) { xf86Msg(X_CONFIG, "Syncing logfile enabled\n"); LogSetParameter(XLOG_FLUSH, TRUE); LogSetParameter(XLOG_SYNC, TRUE); } else { xf86Msg(X_WARNING, "Unknown Log option\n"); } } } { if ((s = xf86GetOptValString(FlagOptions, FLAG_RENDER_COLORMAP_MODE))) { int policy = PictureParseCmapPolicy(s); if (policy == PictureCmapPolicyInvalid) xf86Msg(X_WARNING, "Unknown colormap policy \"%s\"\n", s); else { xf86Msg(X_CONFIG, "Render colormap policy set to %s\n", s); PictureCmapPolicy = policy; } } } #ifdef GLXEXT xf86Info.glxVisuals = XF86_GlxVisualsTypical; xf86Info.glxVisualsFrom = X_DEFAULT; if ((s = xf86GetOptValString(FlagOptions, FLAG_GLX_VISUALS))) { if (!xf86NameCmp(s, "minimal")) { xf86Info.glxVisuals = XF86_GlxVisualsMinimal; } else if (!xf86NameCmp(s, "typical")) { xf86Info.glxVisuals = XF86_GlxVisualsTypical; } else if (!xf86NameCmp(s, "all")) { xf86Info.glxVisuals = XF86_GlxVisualsAll; } else { xf86Msg(X_WARNING, "Unknown GlxVisuals option\n"); } } if (xf86Info.iglxFrom != X_CMDLINE) { if (xf86GetOptValBool(FlagOptions, FLAG_IGLX, &value)) { enableIndirectGLX = value; xf86Info.iglxFrom = X_CONFIG; } } #endif xf86Info.debug = xf86GetOptValString(FlagOptions, FLAG_DEBUG); /* if we're not hotplugging, force some input devices to exist */ xf86Info.forceInputDevices = !(xf86Info.autoAddDevices && xf86Info.autoEnableDevices); /* when forcing input devices, we use kbd. otherwise evdev, so use the * evdev rules set. */ #if defined(__linux__) if (!xf86Info.forceInputDevices) rules = "evdev"; else #endif rules = "base"; /* Xkb default options. */ XkbInitRules(&set, rules, "pc105", "us", NULL, NULL); XkbSetRulesDflts(&set); XkbFreeRMLVOSet(&set, FALSE); xf86Info.useDefaultFontPath = TRUE; if (xf86GetOptValBool(FlagOptions, FLAG_USE_DEFAULT_FONT_PATH, &value)) { xf86Info.useDefaultFontPath = value; } /* Make sure that timers don't overflow CARD32's after multiplying */ #define MAX_TIME_IN_MIN (0x7fffffff / MILLI_PER_MIN) i = -1; xf86GetOptValInteger(FlagOptions, FLAG_SAVER_BLANKTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) ScreenSaverTime = defaultScreenSaverTime = i * MILLI_PER_MIN; else if (i != -1) ErrorF("BlankTime value %d outside legal range of 0 - %d minutes\n", i, MAX_TIME_IN_MIN); #ifdef DPMSExtension i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_STANDBYTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSStandbyTime = i * MILLI_PER_MIN; else if (i != -1) ErrorF("StandbyTime value %d outside legal range of 0 - %d minutes\n", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_SUSPENDTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSSuspendTime = i * MILLI_PER_MIN; else if (i != -1) ErrorF("SuspendTime value %d outside legal range of 0 - %d minutes\n", i, MAX_TIME_IN_MIN); i = -1; xf86GetOptValInteger(FlagOptions, FLAG_DPMS_OFFTIME, &i); if ((i >= 0) && (i < MAX_TIME_IN_MIN)) DPMSOffTime = i * MILLI_PER_MIN; else if (i != -1) ErrorF("OffTime value %d outside legal range of 0 - %d minutes\n", i, MAX_TIME_IN_MIN); #endif #ifdef PANORAMIX from = X_DEFAULT; if (!noPanoramiXExtension) from = X_CMDLINE; else if (xf86GetOptValBool(FlagOptions, FLAG_XINERAMA, &value)) { noPanoramiXExtension = !value; from = X_CONFIG; } if (!noPanoramiXExtension) xf86Msg(from, "Xinerama: enabled\n"); #endif #ifdef DRI2 xf86Info.dri2 = FALSE; xf86Info.dri2From = X_DEFAULT; if (xf86GetOptValBool(FlagOptions, FLAG_DRI2, &value)) { xf86Info.dri2 = value; xf86Info.dri2From = X_CONFIG; } #endif from = X_DEFAULT; if (LimitClients != LIMITCLIENTS) from = X_CMDLINE; i = -1; if (xf86GetOptValInteger(FlagOptions, FLAG_MAX_CLIENTS, &i)) { if (Ones(i) != 1 || i < 64 || i > 2048) { ErrorF("MaxClients must be one of 64, 128, 256, 512, 1024, or 2048\n"); } else { from = X_CONFIG; LimitClients = i; } } xf86Msg(from, "Max clients allowed: %i, resource mask: 0x%x\n", LimitClients, RESOURCE_ID_MASK); } Bool xf86DRI2Enabled(void) { return xf86Info.dri2; } /** * Search for the pInfo in the null-terminated list given and remove (and * free) it if present. All other devices are moved forward. */ static void freeDevice(InputInfoPtr * list, InputInfoPtr pInfo) { InputInfoPtr *devs; for (devs = list; devs && *devs; devs++) { if (*devs == pInfo) { free(*devs); for (; devs && *devs; devs++) devs[0] = devs[1]; break; } } } /** * Append pInfo to the null-terminated list, allocating space as necessary. * pInfo is used as the last element. */ static InputInfoPtr * addDevice(InputInfoPtr * list, InputInfoPtr pInfo) { InputInfoPtr *devs; int count = 1; for (devs = list; devs && *devs; devs++) count++; list = xnfreallocarray(list, count + 1, sizeof(InputInfoPtr)); list[count] = NULL; list[count - 1] = pInfo; return list; } /* * Locate the core input devices. These can be specified/located in * the following ways, in order of priority: * * 1. The InputDevices named by the -pointer and -keyboard command line * options. * 2. The "CorePointer" and "CoreKeyboard" InputDevices referred to by * the active ServerLayout. * 3. The first InputDevices marked as "CorePointer" and "CoreKeyboard". * 4. The first InputDevices that use 'keyboard' or 'kbd' and a valid mouse * driver (mouse, synaptics, evdev, vmmouse, void) * 5. Default devices with an empty (default) configuration. These defaults * will reference the 'mouse' and 'keyboard' drivers. */ static Bool checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) { InputInfoPtr corePointer = NULL, coreKeyboard = NULL; Bool foundPointer = FALSE, foundKeyboard = FALSE; const char *pointerMsg = NULL, *keyboardMsg = NULL; InputInfoPtr *devs, /* iterator */ indp; InputInfoPtr Pointer, Keyboard; XF86ConfInputPtr confInput; XF86ConfInputRec defPtr, defKbd; MessageType from = X_DEFAULT; const char *mousedrivers[] = { "mouse", "synaptics", "evdev", "vmmouse", "void", NULL }; /* * First check if a core pointer or core keyboard have been specified * in the active ServerLayout. If more than one is specified for either, * remove the core attribute from the later ones. */ for (devs = servlayoutp->inputs; devs && *devs; devs++) { indp = *devs; if (indp->options && xf86CheckBoolOption(indp->options, "CorePointer", FALSE)) { if (!corePointer) { corePointer = indp; } } if (indp->options && xf86CheckBoolOption(indp->options, "CoreKeyboard", FALSE)) { if (!coreKeyboard) { coreKeyboard = indp; } } } confInput = NULL; /* 1. Check for the -pointer command line option. */ if (xf86PointerName) { confInput = xf86findInput(xf86PointerName, xf86configptr->conf_input_lst); if (!confInput) { xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", xf86PointerName); return FALSE; } from = X_CMDLINE; /* * If one was already specified in the ServerLayout, it needs to be * removed. */ if (corePointer) { freeDevice(servlayoutp->inputs, corePointer); corePointer = NULL; } foundPointer = TRUE; } /* 2. ServerLayout-specified core pointer. */ if (corePointer) { foundPointer = TRUE; from = X_CONFIG; } /* 3. First core pointer device. */ if (!foundPointer && (xf86Info.forceInputDevices || implicitLayout)) { XF86ConfInputPtr p; for (p = xf86configptr->conf_input_lst; p; p = p->list.next) { if (p->inp_option_lst && xf86CheckBoolOption(p->inp_option_lst, "CorePointer", FALSE)) { confInput = p; foundPointer = TRUE; from = X_DEFAULT; pointerMsg = "first core pointer device"; break; } } } /* 4. First pointer with an allowed mouse driver. */ if (!foundPointer && xf86Info.forceInputDevices) { const char **driver = mousedrivers; confInput = xf86findInput(CONF_IMPLICIT_POINTER, xf86configptr->conf_input_lst); while (*driver && !confInput) { confInput = xf86findInputByDriver(*driver, xf86configptr->conf_input_lst); driver++; } if (confInput) { foundPointer = TRUE; from = X_DEFAULT; pointerMsg = "first mouse device"; } } /* 5. Built-in default. */ if (!foundPointer && xf86Info.forceInputDevices) { memset(&defPtr, 0, sizeof(defPtr)); defPtr.inp_identifier = strdup(""); defPtr.inp_driver = strdup("mouse"); confInput = &defPtr; foundPointer = TRUE; from = X_DEFAULT; pointerMsg = "default mouse configuration"; } /* Add the core pointer device to the layout, and set it to Core. */ if (foundPointer && confInput) { Pointer = xf86AllocateInput(); if (Pointer) foundPointer = configInput(Pointer, confInput, from); if (foundPointer) { Pointer->options = xf86AddNewOption(Pointer->options, "CorePointer", "on"); Pointer->options = xf86AddNewOption(Pointer->options, "driver", confInput->inp_driver); Pointer->options = xf86AddNewOption(Pointer->options, "identifier", confInput->inp_identifier); servlayoutp->inputs = addDevice(servlayoutp->inputs, Pointer); } } if (!foundPointer && xf86Info.forceInputDevices) { /* This shouldn't happen. */ xf86Msg(X_ERROR, "Cannot locate a core pointer device.\n"); xf86DeleteInput(Pointer, 0); return FALSE; } confInput = NULL; /* 1. Check for the -keyboard command line option. */ if (xf86KeyboardName) { confInput = xf86findInput(xf86KeyboardName, xf86configptr->conf_input_lst); if (!confInput) { xf86Msg(X_ERROR, "No InputDevice section called \"%s\"\n", xf86KeyboardName); return FALSE; } from = X_CMDLINE; /* * If one was already specified in the ServerLayout, it needs to be * removed. */ if (coreKeyboard) { freeDevice(servlayoutp->inputs, coreKeyboard); coreKeyboard = NULL; } foundKeyboard = TRUE; } /* 2. ServerLayout-specified core keyboard. */ if (coreKeyboard) { foundKeyboard = TRUE; from = X_CONFIG; } /* 3. First core keyboard device. */ if (!foundKeyboard && (xf86Info.forceInputDevices || implicitLayout)) { XF86ConfInputPtr p; for (p = xf86configptr->conf_input_lst; p; p = p->list.next) { if (p->inp_option_lst && xf86CheckBoolOption(p->inp_option_lst, "CoreKeyboard", FALSE)) { confInput = p; foundKeyboard = TRUE; from = X_DEFAULT; keyboardMsg = "first core keyboard device"; break; } } } /* 4. First keyboard with 'keyboard' or 'kbd' as the driver. */ if (!foundKeyboard && xf86Info.forceInputDevices) { confInput = xf86findInput(CONF_IMPLICIT_KEYBOARD, xf86configptr->conf_input_lst); if (!confInput) { confInput = xf86findInputByDriver("kbd", xf86configptr->conf_input_lst); } if (confInput) { foundKeyboard = TRUE; from = X_DEFAULT; keyboardMsg = "first keyboard device"; } } /* 5. Built-in default. */ if (!foundKeyboard && xf86Info.forceInputDevices) { memset(&defKbd, 0, sizeof(defKbd)); defKbd.inp_identifier = strdup(""); defKbd.inp_driver = strdup("kbd"); confInput = &defKbd; foundKeyboard = TRUE; keyboardMsg = "default keyboard configuration"; from = X_DEFAULT; } /* Add the core keyboard device to the layout, and set it to Core. */ if (foundKeyboard && confInput) { Keyboard = xf86AllocateInput(); if (Keyboard) foundKeyboard = configInput(Keyboard, confInput, from); if (foundKeyboard) { Keyboard->options = xf86AddNewOption(Keyboard->options, "CoreKeyboard", "on"); Keyboard->options = xf86AddNewOption(Keyboard->options, "driver", confInput->inp_driver); Keyboard->options = xf86AddNewOption(Keyboard->options, "identifier", confInput->inp_identifier); servlayoutp->inputs = addDevice(servlayoutp->inputs, Keyboard); } } if (!foundKeyboard && xf86Info.forceInputDevices) { /* This shouldn't happen. */ xf86Msg(X_ERROR, "Cannot locate a core keyboard device.\n"); xf86DeleteInput(Keyboard, 0); return FALSE; } if (pointerMsg) { if (implicitLayout) xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n", pointerMsg); else xf86Msg(X_DEFAULT, "The core pointer device wasn't specified " "explicitly in the layout.\n" "\tUsing the %s.\n", pointerMsg); } if (keyboardMsg) { if (implicitLayout) xf86Msg(X_DEFAULT, "No Layout section. Using the %s.\n", keyboardMsg); else xf86Msg(X_DEFAULT, "The core keyboard device wasn't specified " "explicitly in the layout.\n" "\tUsing the %s.\n", keyboardMsg); } if (!xf86Info.forceInputDevices && !(foundPointer && foundKeyboard)) { #if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) const char *config_backend; #if defined(CONFIG_HAL) config_backend = "HAL"; #elif defined(CONFIG_UDEV) config_backend = "udev"; #else config_backend = "wscons"; #endif xf86Msg(X_INFO, "The server relies on %s to provide the list of " "input devices.\n\tIf no devices become available, " "reconfigure %s or disable AutoAddDevices.\n", config_backend, config_backend); #else xf86Msg(X_WARNING, "Hotplugging requested but the server was " "compiled without a config backend. " "No input devices were configured, the server " "will start without any input devices.\n"); #endif } return TRUE; } typedef enum { LAYOUT_ISOLATEDEVICE, LAYOUT_SINGLECARD } LayoutValues; static OptionInfoRec LayoutOptions[] = { {LAYOUT_ISOLATEDEVICE, "IsolateDevice", OPTV_STRING, {0}, FALSE}, {LAYOUT_SINGLECARD, "SingleCard", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; static Bool configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp) { XF86ConfInputrefPtr irp; InputInfoPtr *indp; int count = 0; /* * Count the number of input devices. */ irp = layout->lay_input_lst; while (irp) { count++; irp = (XF86ConfInputrefPtr) irp->list.next; } DebugF("Found %d input devices in the layout section %s\n", count, layout->lay_identifier); indp = xnfcalloc((count + 1), sizeof(InputInfoPtr)); indp[count] = NULL; irp = layout->lay_input_lst; count = 0; while (irp) { indp[count] = xf86AllocateInput(); if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) { do { free(indp[count]); } while (count--); free(indp); return FALSE; } indp[count]->options = xf86OptionListMerge(indp[count]->options, irp->iref_option_lst); count++; irp = (XF86ConfInputrefPtr) irp->list.next; } servlayoutp->inputs = indp; return TRUE; } /* * figure out which layout is active, which screens are used in that layout, * which drivers and monitors are used in these screens */ static Bool configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, char *default_layout) { XF86ConfAdjacencyPtr adjp; XF86ConfInactivePtr idp; int saved_count, count = 0; int scrnum; XF86ConfLayoutPtr l; MessageType from; screenLayoutPtr slp; GDevPtr gdp; int i = 0, j; if (!servlayoutp) return FALSE; /* * which layout section is the active one? * * If there is a -layout command line option, use that one, otherwise * pick the first one. */ from = X_DEFAULT; if (xf86LayoutName != NULL) from = X_CMDLINE; else if (default_layout) { xf86LayoutName = default_layout; from = X_CONFIG; } if (xf86LayoutName != NULL) { if ((l = xf86findLayout(xf86LayoutName, conf_layout)) == NULL) { xf86Msg(X_ERROR, "No ServerLayout section called \"%s\"\n", xf86LayoutName); return FALSE; } conf_layout = l; } xf86Msg(from, "ServerLayout \"%s\"\n", conf_layout->lay_identifier); adjp = conf_layout->lay_adjacency_lst; /* * we know that each screen is referenced exactly once on the left side * of a layout statement in the Layout section. So to allocate the right * size for the array we do a quick walk of the list to figure out how * many sections we have */ while (adjp) { count++; adjp = (XF86ConfAdjacencyPtr) adjp->list.next; } DebugF("Found %d screens in the layout section %s", count, conf_layout->lay_identifier); if (!count) /* alloc enough storage even if no screen is specified */ count = 1; slp = xnfcalloc((count + 1), sizeof(screenLayoutRec)); slp[count].screen = NULL; /* * now that we have storage, loop over the list again and fill in our * data structure; at this point we do not fill in the adjacency * information as it is not clear if we need it at all */ adjp = conf_layout->lay_adjacency_lst; count = 0; while (adjp) { slp[count].screen = xnfcalloc(1, sizeof(confScreenRec)); if (adjp->adj_scrnum < 0) scrnum = count; else scrnum = adjp->adj_scrnum; if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum, X_CONFIG, (scrnum == 0 && !adjp->list.next))) { do { free(slp[count].screen); } while (count--); free(slp); return FALSE; } slp[count].x = adjp->adj_x; slp[count].y = adjp->adj_y; slp[count].refname = adjp->adj_refscreen; switch (adjp->adj_where) { case CONF_ADJ_OBSOLETE: slp[count].where = PosObsolete; slp[count].topname = adjp->adj_top_str; slp[count].bottomname = adjp->adj_bottom_str; slp[count].leftname = adjp->adj_left_str; slp[count].rightname = adjp->adj_right_str; break; case CONF_ADJ_ABSOLUTE: slp[count].where = PosAbsolute; break; case CONF_ADJ_RIGHTOF: slp[count].where = PosRightOf; break; case CONF_ADJ_LEFTOF: slp[count].where = PosLeftOf; break; case CONF_ADJ_ABOVE: slp[count].where = PosAbove; break; case CONF_ADJ_BELOW: slp[count].where = PosBelow; break; case CONF_ADJ_RELATIVE: slp[count].where = PosRelative; break; } count++; adjp = (XF86ConfAdjacencyPtr) adjp->list.next; } /* No screen was specified in the layout. take the first one from the * config file, or - if it is NULL - configScreen autogenerates one for * us */ if (!count) { XF86ConfScreenPtr screen; FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); if (!configScreen(slp[0].screen, screen, 0, X_CONFIG, TRUE)) { free(slp[0].screen); free(slp); return FALSE; } } /* XXX Need to tie down the upper left screen. */ /* Fill in the refscreen and top/bottom/left/right values */ for (i = 0; i < count; i++) { for (j = 0; j < count; j++) { if (slp[i].refname && strcmp(slp[i].refname, slp[j].screen->id) == 0) { slp[i].refscreen = slp[j].screen; } if (slp[i].topname && strcmp(slp[i].topname, slp[j].screen->id) == 0) { slp[i].top = slp[j].screen; } if (slp[i].bottomname && strcmp(slp[i].bottomname, slp[j].screen->id) == 0) { slp[i].bottom = slp[j].screen; } if (slp[i].leftname && strcmp(slp[i].leftname, slp[j].screen->id) == 0) { slp[i].left = slp[j].screen; } if (slp[i].rightname && strcmp(slp[i].rightname, slp[j].screen->id) == 0) { slp[i].right = slp[j].screen; } } if (slp[i].where != PosObsolete && slp[i].where != PosAbsolute && !slp[i].refscreen) { xf86Msg(X_ERROR, "Screen %s doesn't exist: deleting placement\n", slp[i].refname); slp[i].where = PosAbsolute; slp[i].x = 0; slp[i].y = 0; } } if (!count) saved_count = 1; else saved_count = count; /* * Count the number of inactive devices. */ count = 0; idp = conf_layout->lay_inactive_lst; while (idp) { count++; idp = (XF86ConfInactivePtr) idp->list.next; } DebugF("Found %d inactive devices in the layout section %s\n", count, conf_layout->lay_identifier); gdp = xnfallocarray(count + 1, sizeof(GDevRec)); gdp[count].identifier = NULL; idp = conf_layout->lay_inactive_lst; count = 0; while (idp) { if (!configDevice(&gdp[count], idp->inactive_device, FALSE, FALSE)) goto bail; count++; idp = (XF86ConfInactivePtr) idp->list.next; } if (!configInputDevices(conf_layout, servlayoutp)) goto bail; servlayoutp->id = conf_layout->lay_identifier; servlayoutp->screens = slp; servlayoutp->inactives = gdp; servlayoutp->options = conf_layout->lay_option_lst; from = X_DEFAULT; return TRUE; bail: do { free(slp[saved_count].screen); } while (saved_count--); free(slp); free(gdp); return FALSE; } /* * No layout section, so find the first Screen section and set that up as * the only active screen. */ static Bool configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, XF86ConfigPtr conf_ptr) { MessageType from; XF86ConfScreenPtr s; screenLayoutPtr slp; InputInfoPtr *indp; XF86ConfLayoutRec layout; if (!servlayoutp) return FALSE; /* * which screen section is the active one? * * If there is a -screen option, use that one, otherwise use the first * one. */ from = X_CONFIG; if (xf86ScreenName != NULL) { if ((s = xf86findScreen(xf86ScreenName, conf_screen)) == NULL) { xf86Msg(X_ERROR, "No Screen section called \"%s\"\n", xf86ScreenName); return FALSE; } conf_screen = s; from = X_CMDLINE; } /* We have exactly one screen */ slp = xnfcalloc(1, 2 * sizeof(screenLayoutRec)); slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); slp[1].screen = NULL; if (!configScreen(slp[0].screen, conf_screen, 0, from, TRUE)) { free(slp); return FALSE; } servlayoutp->id = "(implicit)"; servlayoutp->screens = slp; servlayoutp->inactives = xnfcalloc(1, sizeof(GDevRec)); servlayoutp->options = NULL; memset(&layout, 0, sizeof(layout)); layout.lay_identifier = servlayoutp->id; if (xf86layoutAddInputDevices(conf_ptr, &layout) > 0) { if (!configInputDevices(&layout, servlayoutp)) return FALSE; from = X_DEFAULT; } else { /* Set up an empty input device list, then look for some core devices. */ indp = xnfalloc(sizeof(InputInfoPtr)); *indp = NULL; servlayoutp->inputs = indp; } return TRUE; } static Bool configXvAdaptor(confXvAdaptorPtr adaptor, XF86ConfVideoAdaptorPtr conf_adaptor) { int count = 0; XF86ConfVideoPortPtr conf_port; xf86Msg(X_CONFIG, "| |-->VideoAdaptor \"%s\"\n", conf_adaptor->va_identifier); adaptor->identifier = conf_adaptor->va_identifier; adaptor->options = conf_adaptor->va_option_lst; if (conf_adaptor->va_busid || conf_adaptor->va_driver) { xf86Msg(X_CONFIG, "| | Unsupported device type, skipping entry\n"); return FALSE; } /* * figure out how many videoport subsections there are and fill them in */ conf_port = conf_adaptor->va_port_lst; while (conf_port) { count++; conf_port = (XF86ConfVideoPortPtr) conf_port->list.next; } adaptor->ports = xnfallocarray(count, sizeof(confXvPortRec)); adaptor->numports = count; count = 0; conf_port = conf_adaptor->va_port_lst; while (conf_port) { adaptor->ports[count].identifier = conf_port->vp_identifier; adaptor->ports[count].options = conf_port->vp_option_lst; count++; conf_port = (XF86ConfVideoPortPtr) conf_port->list.next; } return TRUE; } static Bool configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, MessageType from, Bool auto_gpu_device) { int count = 0; XF86ConfDisplayPtr dispptr; XF86ConfAdaptorLinkPtr conf_adaptor; Bool defaultMonitor = FALSE; XF86ConfScreenRec local_conf_screen; int i; if (!conf_screen) { memset(&local_conf_screen, 0, sizeof(local_conf_screen)); conf_screen = &local_conf_screen; conf_screen->scrn_identifier = "Default Screen Section"; xf86Msg(X_DEFAULT, "No screen section available. Using defaults.\n"); } xf86Msg(from, "|-->Screen \"%s\" (%d)\n", conf_screen->scrn_identifier, scrnum); /* * now we fill in the elements of the screen */ screenp->id = conf_screen->scrn_identifier; screenp->screennum = scrnum; screenp->defaultdepth = conf_screen->scrn_defaultdepth; screenp->defaultbpp = conf_screen->scrn_defaultbpp; screenp->defaultfbbpp = conf_screen->scrn_defaultfbbpp; screenp->monitor = xnfcalloc(1, sizeof(MonRec)); /* If no monitor is specified, create a default one. */ if (!conf_screen->scrn_monitor) { XF86ConfMonitorRec defMon; memset(&defMon, 0, sizeof(defMon)); defMon.mon_identifier = ""; if (!configMonitor(screenp->monitor, &defMon)) return FALSE; defaultMonitor = TRUE; } else { if (!configMonitor(screenp->monitor, conf_screen->scrn_monitor)) return FALSE; } /* Configure the device. If there isn't one configured, attach to the * first inactive one that we can configure. If there's none that work, * set it to NULL so that the section can be autoconfigured later */ screenp->device = xnfcalloc(1, sizeof(GDevRec)); if ((!conf_screen->scrn_device) && (xf86configptr->conf_device_lst)) { FIND_SUITABLE (XF86ConfDevicePtr, xf86configptr->conf_device_lst, conf_screen->scrn_device); xf86Msg(X_DEFAULT, "No device specified for screen \"%s\".\n" "\tUsing the first device section listed.\n", screenp->id); } if (configDevice(screenp->device, conf_screen->scrn_device, TRUE, FALSE)) { screenp->device->myScreenSection = screenp; } else { screenp->device = NULL; } if (auto_gpu_device && conf_screen->num_gpu_devices == 0 && xf86configptr->conf_device_lst) { /* Loop through the entire device list and skip the primary device * assigned to the screen. This is important because there are two * cases where the assigned primary device is not the first device in * the device list. Firstly, if the first device in the list is assigned * to a different seat than this X server, it will not have been picked * by the previous FIND_SUITABLE. Secondly, if the device was explicitly * assigned in the config but there is still only one screen, this code * path is executed but the explicitly assigned device may not be the * first device in the list. */ XF86ConfDevicePtr ptmp, sdevice = xf86configptr->conf_device_lst; for (i = 0; i < MAX_GPUDEVICES; i++) { if (!sdevice) break; FIND_SUITABLE (XF86ConfDevicePtr, sdevice, ptmp); if (!ptmp) break; /* skip the primary device on the screen */ if (ptmp != conf_screen->scrn_device) { conf_screen->scrn_gpu_devices[i] = ptmp; } else { sdevice = ptmp->list.next; i--; /* run the next iteration with the same index */ continue; } screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec)); if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) { screenp->gpu_devices[i]->myScreenSection = screenp; } sdevice = conf_screen->scrn_gpu_devices[i]->list.next; } screenp->num_gpu_devices = i; } else { for (i = 0; i < conf_screen->num_gpu_devices; i++) { screenp->gpu_devices[i] = xnfcalloc(1, sizeof(GDevRec)); if (configDevice(screenp->gpu_devices[i], conf_screen->scrn_gpu_devices[i], TRUE, TRUE)) { screenp->gpu_devices[i]->myScreenSection = screenp; } } screenp->num_gpu_devices = conf_screen->num_gpu_devices; } screenp->options = conf_screen->scrn_option_lst; /* * figure out how many display subsections there are and fill them in */ dispptr = conf_screen->scrn_display_lst; while (dispptr) { count++; dispptr = (XF86ConfDisplayPtr) dispptr->list.next; } screenp->displays = xnfallocarray(count, sizeof(DispPtr)); screenp->numdisplays = count; for (count = 0, dispptr = conf_screen->scrn_display_lst; dispptr; dispptr = (XF86ConfDisplayPtr) dispptr->list.next, count++) { /* Allocate individual Display records */ screenp->displays[count] = xnfcalloc(1, sizeof(DispRec)); /* Fill in the default Virtual size, if any */ if (conf_screen->scrn_virtualX && conf_screen->scrn_virtualY) { screenp->displays[count]->virtualX = conf_screen->scrn_virtualX; screenp->displays[count]->virtualY = conf_screen->scrn_virtualY; } /* Now do the per-Display Virtual sizes */ configDisplay(screenp->displays[count], dispptr); } /* * figure out how many videoadaptor references there are and fill them in */ count = 0; conf_adaptor = conf_screen->scrn_adaptor_lst; while (conf_adaptor) { count++; conf_adaptor = (XF86ConfAdaptorLinkPtr) conf_adaptor->list.next; } screenp->xvadaptors = xnfallocarray(count, sizeof(confXvAdaptorRec)); screenp->numxvadaptors = 0; conf_adaptor = conf_screen->scrn_adaptor_lst; while (conf_adaptor) { if (configXvAdaptor(&(screenp->xvadaptors[screenp->numxvadaptors]), conf_adaptor->al_adaptor)) screenp->numxvadaptors++; conf_adaptor = (XF86ConfAdaptorLinkPtr) conf_adaptor->list.next; } if (defaultMonitor) { xf86Msg(X_DEFAULT, "No monitor specified for screen \"%s\".\n" "\tUsing a default monitor configuration.\n", screenp->id); } return TRUE; } typedef enum { MON_REDUCEDBLANKING, MON_MAX_PIX_CLOCK, } MonitorValues; static OptionInfoRec MonitorOptions[] = { {MON_REDUCEDBLANKING, "ReducedBlanking", OPTV_BOOLEAN, {0}, FALSE}, {MON_MAX_PIX_CLOCK, "MaxPixClock", OPTV_FREQ, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; static Bool configMonitor(MonPtr monitorp, XF86ConfMonitorPtr conf_monitor) { int count; DisplayModePtr mode, last = NULL; XF86ConfModeLinePtr cmodep; XF86ConfModesPtr modes; XF86ConfModesLinkPtr modeslnk = conf_monitor->mon_modes_sect_lst; Gamma zeros = { 0.0, 0.0, 0.0 }; float badgamma = 0.0; double maxPixClock; xf86Msg(X_CONFIG, "| |-->Monitor \"%s\"\n", conf_monitor->mon_identifier); monitorp->id = conf_monitor->mon_identifier; monitorp->vendor = conf_monitor->mon_vendor; monitorp->model = conf_monitor->mon_modelname; monitorp->Modes = NULL; monitorp->Last = NULL; monitorp->gamma = zeros; monitorp->widthmm = conf_monitor->mon_width; monitorp->heightmm = conf_monitor->mon_height; monitorp->reducedblanking = FALSE; monitorp->maxPixClock = 0; monitorp->options = conf_monitor->mon_option_lst; /* * fill in the monitor structure */ for (count = 0; count < conf_monitor->mon_n_hsync && count < MAX_HSYNC; count++) { monitorp->hsync[count].hi = conf_monitor->mon_hsync[count].hi; monitorp->hsync[count].lo = conf_monitor->mon_hsync[count].lo; } monitorp->nHsync = count; for (count = 0; count < conf_monitor->mon_n_vrefresh && count < MAX_VREFRESH; count++) { monitorp->vrefresh[count].hi = conf_monitor->mon_vrefresh[count].hi; monitorp->vrefresh[count].lo = conf_monitor->mon_vrefresh[count].lo; } monitorp->nVrefresh = count; /* * first we collect the mode lines from the UseModes directive */ while (modeslnk) { modes = xf86findModes(modeslnk->ml_modes_str, xf86configptr->conf_modes_lst); modeslnk->ml_modes = modes; /* now add the modes found in the modes section to the list of modes for this monitor unless it has been added before because we are reusing the same section for another screen */ if (xf86itemNotSublist((GenericListPtr) conf_monitor->mon_modeline_lst, (GenericListPtr) modes->mon_modeline_lst)) { conf_monitor->mon_modeline_lst = (XF86ConfModeLinePtr) xf86addListItem((GenericListPtr) conf_monitor->mon_modeline_lst, (GenericListPtr) modes->mon_modeline_lst); } modeslnk = modeslnk->list.next; } /* * we need to hook in the mode lines now * here both data structures use lists, only our internal one * is double linked */ cmodep = conf_monitor->mon_modeline_lst; while (cmodep) { mode = xnfcalloc(1, sizeof(DisplayModeRec)); mode->type = 0; mode->Clock = cmodep->ml_clock; mode->HDisplay = cmodep->ml_hdisplay; mode->HSyncStart = cmodep->ml_hsyncstart; mode->HSyncEnd = cmodep->ml_hsyncend; mode->HTotal = cmodep->ml_htotal; mode->VDisplay = cmodep->ml_vdisplay; mode->VSyncStart = cmodep->ml_vsyncstart; mode->VSyncEnd = cmodep->ml_vsyncend; mode->VTotal = cmodep->ml_vtotal; mode->Flags = cmodep->ml_flags; mode->HSkew = cmodep->ml_hskew; mode->VScan = cmodep->ml_vscan; mode->name = xnfstrdup(cmodep->ml_identifier); if (last) { mode->prev = last; last->next = mode; } else { /* * this is the first mode */ monitorp->Modes = mode; mode->prev = NULL; } last = mode; cmodep = (XF86ConfModeLinePtr) cmodep->list.next; } if (last) { last->next = NULL; } monitorp->Last = last; /* add the (VESA) default modes */ if (!addDefaultModes(monitorp)) return FALSE; if (conf_monitor->mon_gamma_red > GAMMA_ZERO) monitorp->gamma.red = conf_monitor->mon_gamma_red; if (conf_monitor->mon_gamma_green > GAMMA_ZERO) monitorp->gamma.green = conf_monitor->mon_gamma_green; if (conf_monitor->mon_gamma_blue > GAMMA_ZERO) monitorp->gamma.blue = conf_monitor->mon_gamma_blue; /* Check that the gamma values are within range */ if (monitorp->gamma.red > GAMMA_ZERO && (monitorp->gamma.red < GAMMA_MIN || monitorp->gamma.red > GAMMA_MAX)) { badgamma = monitorp->gamma.red; } else if (monitorp->gamma.green > GAMMA_ZERO && (monitorp->gamma.green < GAMMA_MIN || monitorp->gamma.green > GAMMA_MAX)) { badgamma = monitorp->gamma.green; } else if (monitorp->gamma.blue > GAMMA_ZERO && (monitorp->gamma.blue < GAMMA_MIN || monitorp->gamma.blue > GAMMA_MAX)) { badgamma = monitorp->gamma.blue; } if (badgamma > GAMMA_ZERO) { ErrorF("Gamma value %.f is out of range (%.2f - %.1f)\n", badgamma, GAMMA_MIN, GAMMA_MAX); return FALSE; } xf86ProcessOptions(-1, monitorp->options, MonitorOptions); xf86GetOptValBool(MonitorOptions, MON_REDUCEDBLANKING, &monitorp->reducedblanking); if (xf86GetOptValFreq(MonitorOptions, MON_MAX_PIX_CLOCK, OPTUNITS_KHZ, &maxPixClock) == TRUE) { monitorp->maxPixClock = (int) maxPixClock; } return TRUE; } static int lookupVisual(const char *visname) { int i; if (!visname || !*visname) return -1; for (i = 0; i <= DirectColor; i++) { if (!xf86nameCompare(visname, xf86VisualNames[i])) break; } if (i <= DirectColor) return i; return -1; } static Bool configDisplay(DispPtr displayp, XF86ConfDisplayPtr conf_display) { int count = 0; XF86ModePtr modep; displayp->frameX0 = conf_display->disp_frameX0; displayp->frameY0 = conf_display->disp_frameY0; displayp->virtualX = conf_display->disp_virtualX; displayp->virtualY = conf_display->disp_virtualY; displayp->depth = conf_display->disp_depth; displayp->fbbpp = conf_display->disp_bpp; displayp->weight.red = conf_display->disp_weight.red; displayp->weight.green = conf_display->disp_weight.green; displayp->weight.blue = conf_display->disp_weight.blue; displayp->blackColour.red = conf_display->disp_black.red; displayp->blackColour.green = conf_display->disp_black.green; displayp->blackColour.blue = conf_display->disp_black.blue; displayp->whiteColour.red = conf_display->disp_white.red; displayp->whiteColour.green = conf_display->disp_white.green; displayp->whiteColour.blue = conf_display->disp_white.blue; displayp->options = conf_display->disp_option_lst; if (conf_display->disp_visual) { displayp->defaultVisual = lookupVisual(conf_display->disp_visual); if (displayp->defaultVisual == -1) { ErrorF("Invalid visual name: \"%s\"\n", conf_display->disp_visual); return FALSE; } } else { displayp->defaultVisual = -1; } /* * now hook in the modes */ modep = conf_display->disp_mode_lst; while (modep) { count++; modep = (XF86ModePtr) modep->list.next; } displayp->modes = xnfallocarray(count + 1, sizeof(char *)); modep = conf_display->disp_mode_lst; count = 0; while (modep) { displayp->modes[count] = modep->mode_name; count++; modep = (XF86ModePtr) modep->list.next; } displayp->modes[count] = NULL; return TRUE; } static Bool configDevice(GDevPtr devicep, XF86ConfDevicePtr conf_device, Bool active, Bool gpu) { int i; if (!conf_device) { return FALSE; } if (active) { if (gpu) xf86Msg(X_CONFIG, "| |-->GPUDevice \"%s\"\n", conf_device->dev_identifier); else xf86Msg(X_CONFIG, "| |-->Device \"%s\"\n", conf_device->dev_identifier); } else xf86Msg(X_CONFIG, "|-->Inactive Device \"%s\"\n", conf_device->dev_identifier); devicep->identifier = conf_device->dev_identifier; devicep->vendor = conf_device->dev_vendor; devicep->board = conf_device->dev_board; devicep->chipset = conf_device->dev_chipset; devicep->ramdac = conf_device->dev_ramdac; devicep->driver = conf_device->dev_driver; devicep->active = active; devicep->videoRam = conf_device->dev_videoram; devicep->MemBase = conf_device->dev_mem_base; devicep->IOBase = conf_device->dev_io_base; devicep->clockchip = conf_device->dev_clockchip; devicep->busID = conf_device->dev_busid; devicep->chipID = conf_device->dev_chipid; devicep->chipRev = conf_device->dev_chiprev; devicep->options = conf_device->dev_option_lst; devicep->irq = conf_device->dev_irq; devicep->screen = conf_device->dev_screen; for (i = 0; i < MAXDACSPEEDS; i++) { if (i < CONF_MAXDACSPEEDS) devicep->dacSpeeds[i] = conf_device->dev_dacSpeeds[i]; else devicep->dacSpeeds[i] = 0; } devicep->numclocks = conf_device->dev_clocks; if (devicep->numclocks > MAXCLOCKS) devicep->numclocks = MAXCLOCKS; for (i = 0; i < devicep->numclocks; i++) { devicep->clock[i] = conf_device->dev_clock[i]; } devicep->claimed = FALSE; return TRUE; } static void configDRI(XF86ConfDRIPtr drip) { struct group *grp; xf86ConfigDRI.group = -1; xf86ConfigDRI.mode = 0; if (drip) { if (drip->dri_group_name) { if ((grp = getgrnam(drip->dri_group_name))) xf86ConfigDRI.group = grp->gr_gid; } else { if (drip->dri_group >= 0) xf86ConfigDRI.group = drip->dri_group; } xf86ConfigDRI.mode = drip->dri_mode; } } static void configExtensions(XF86ConfExtensionsPtr conf_ext) { XF86OptionPtr o; if (conf_ext && conf_ext->ext_option_lst) { for (o = conf_ext->ext_option_lst; o; o = xf86NextOption(o)) { char *name = xf86OptionName(o); char *val = xf86OptionValue(o); char *n; Bool enable = TRUE; /* Handle "No" */ n = xf86NormalizeName(name); if (strncmp(n, "no", 2) == 0) { name += 2; enable = FALSE; } if (!val || xf86NameCmp(val, "enable") == 0 || xf86NameCmp(val, "enabled") == 0 || xf86NameCmp(val, "on") == 0 || xf86NameCmp(val, "1") == 0 || xf86NameCmp(val, "yes") == 0 || xf86NameCmp(val, "true") == 0) { /* NOTHING NEEDED -- enabling is handled below */ } else if (xf86NameCmp(val, "disable") == 0 || xf86NameCmp(val, "disabled") == 0 || xf86NameCmp(val, "off") == 0 || xf86NameCmp(val, "0") == 0 || xf86NameCmp(val, "no") == 0 || xf86NameCmp(val, "false") == 0) { enable = !enable; } else { xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val); free(n); continue; } if (EnableDisableExtension(name, enable)) { xf86Msg(X_CONFIG, "Extension \"%s\" is %s\n", name, enable ? "enabled" : "disabled"); } else { xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n", name); } free(n); } } } static Bool configInput(InputInfoPtr inputp, XF86ConfInputPtr conf_input, MessageType from) { xf86Msg(from, "|-->Input Device \"%s\"\n", conf_input->inp_identifier); inputp->name = conf_input->inp_identifier; inputp->driver = conf_input->inp_driver; inputp->options = conf_input->inp_option_lst; inputp->attrs = NULL; return TRUE; } static Bool modeIsPresent(DisplayModePtr mode, MonPtr monitorp) { DisplayModePtr knownmodes = monitorp->Modes; /* all I can think of is a linear search... */ while (knownmodes != NULL) { if (!strcmp(mode->name, knownmodes->name) && !(knownmodes->type & M_T_DEFAULT)) return TRUE; knownmodes = knownmodes->next; } return FALSE; } static Bool addDefaultModes(MonPtr monitorp) { DisplayModePtr mode; DisplayModePtr last = monitorp->Last; int i = 0; for (i = 0; i < xf86NumDefaultModes; i++) { mode = xf86DuplicateMode(&xf86DefaultModes[i]); if (!modeIsPresent(mode, monitorp)) { monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode); last = mode; } else { free(mode); } } monitorp->Last = last; return TRUE; } static void checkInput(serverLayoutPtr layout, Bool implicit_layout) { checkCoreInputDevices(layout, implicit_layout); /* Unless we're forcing input devices, disable mouse/kbd devices in the * config. Otherwise the same physical device is added multiple times, * leading to duplicate events. */ if (!xf86Info.forceInputDevices && layout->inputs) { InputInfoPtr *dev = layout->inputs; BOOL warned = FALSE; while (*dev) { if (strcmp((*dev)->driver, "kbd") == 0 || strcmp((*dev)->driver, "mouse") == 0 || strcmp((*dev)->driver, "vmmouse") == 0) { InputInfoPtr *current; if (!warned) { xf86Msg(X_WARNING, "Hotplugging is on, devices using " "drivers 'kbd', 'mouse' or 'vmmouse' will be disabled.\n"); warned = TRUE; } xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->name); current = dev; free(*dev); *dev = NULL; do { *current = *(current + 1); current++; } while (*current); } else dev++; } } } /* * load the config file and fill the global data structure */ ConfigStatus xf86HandleConfigFile(Bool autoconfig) { #ifdef XSERVER_LIBPCIACCESS const char *scanptr; Bool singlecard = 0; #endif Bool implicit_layout = FALSE; XF86ConfLayoutPtr layout; if (!autoconfig) { char *filename, *dirname, *sysdirname; const char *filesearch, *dirsearch; MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; if (!PrivsElevated()) { filesearch = ALL_CONFIGPATH; dirsearch = ALL_CONFIGDIRPATH; } else { filesearch = RESTRICTED_CONFIGPATH; dirsearch = RESTRICTED_CONFIGDIRPATH; } if (xf86ConfigFile) filefrom = X_CMDLINE; if (xf86ConfigDir) dirfrom = X_CMDLINE; xf86initConfigFiles(); sysdirname = xf86openConfigDirFiles(SYS_CONFIGDIRPATH, NULL, PROJECTROOT); dirname = xf86openConfigDirFiles(dirsearch, xf86ConfigDir, PROJECTROOT); filename = xf86openConfigFile(filesearch, xf86ConfigFile, PROJECTROOT); if (filename) { xf86MsgVerb(filefrom, 0, "Using config file: \"%s\"\n", filename); xf86ConfigFile = xnfstrdup(filename); } else { if (xf86ConfigFile) xf86Msg(X_ERROR, "Unable to locate/open config file: \"%s\"\n", xf86ConfigFile); } if (dirname) { xf86MsgVerb(dirfrom, 0, "Using config directory: \"%s\"\n", dirname); xf86ConfigDir = xnfstrdup(dirname); } else { if (xf86ConfigDir) xf86Msg(X_ERROR, "Unable to locate/open config directory: \"%s\"\n", xf86ConfigDir); } if (sysdirname) xf86MsgVerb(X_DEFAULT, 0, "Using system config directory \"%s\"\n", sysdirname); if (!filename && !dirname && !sysdirname) return CONFIG_NOFILE; free(filename); free(dirname); free(sysdirname); } if ((xf86configptr = xf86readConfigFile()) == NULL) { xf86Msg(X_ERROR, "Problem parsing the config file\n"); return CONFIG_PARSE_ERROR; } xf86closeConfigFile(); /* Initialise a few things. */ /* * now we convert part of the information contained in the parser * structures into our own structures. * The important part here is to figure out which Screen Sections * in the XF86Config file are active so that we can piece together * the modes that we need later down the road. * And while we are at it, we'll decode the rest of the stuff as well */ /* First check if a layout section is present, and if it is valid. */ FIND_SUITABLE(XF86ConfLayoutPtr, xf86configptr->conf_layout_lst, layout); if (layout == NULL || xf86ScreenName != NULL) { XF86ConfScreenPtr screen; if (xf86ScreenName == NULL) { xf86Msg(X_DEFAULT, "No Layout section. Using the first Screen section.\n"); } FIND_SUITABLE (XF86ConfScreenPtr, xf86configptr->conf_screen_lst, screen); if (!configImpliedLayout(&xf86ConfigLayout, screen, xf86configptr)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } implicit_layout = TRUE; } else { if (xf86configptr->conf_flags != NULL) { char *dfltlayout = NULL; void *optlist = xf86configptr->conf_flags->flg_option_lst; if (optlist && xf86FindOption(optlist, "defaultserverlayout")) dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL); if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } } else { if (!configLayout(&xf86ConfigLayout, layout, NULL)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } } } xf86ProcessOptions(-1, xf86ConfigLayout.options, LayoutOptions); #ifdef XSERVER_LIBPCIACCESS if ((scanptr = xf86GetOptValString(LayoutOptions, LAYOUT_ISOLATEDEVICE))) { ; /* IsolateDevice specified; overrides SingleCard */ } else { xf86GetOptValBool(LayoutOptions, LAYOUT_SINGLECARD, &singlecard); if (singlecard) scanptr = xf86ConfigLayout.screens->screen->device->busID; } if (scanptr) { if (strncmp(scanptr, "PCI:", 4) != 0) { xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n" "\tIgnoring IsolateDevice option.\n"); } else xf86PciIsolateDevice(scanptr); } #endif /* Now process everything else */ configServerFlags(xf86configptr->conf_flags, xf86ConfigLayout.options); configFiles(xf86configptr->conf_files); configExtensions(xf86configptr->conf_extensions); configDRI(xf86configptr->conf_dri); checkInput(&xf86ConfigLayout, implicit_layout); /* * Handle some command line options that can override some of the * ServerFlags settings. */ #ifdef XF86VIDMODE if (xf86VidModeDisabled) xf86Info.vidModeEnabled = FALSE; if (xf86VidModeAllowNonLocal) xf86Info.vidModeAllowNonLocal = TRUE; #endif if (xf86AllowMouseOpenFail) xf86Info.allowMouseOpenFail = TRUE; return CONFIG_OK; } Bool xf86PathIsSafe(const char *path) { return (xf86pathIsSafe(path) != 0); } xorg-server-21.1.16/hw/xfree86/common/xf86Cursor.c0000644000175000017500000006232514757411105015175 /* * Copyright (c) 1994-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "input.h" #include "cursor.h" #include "mipointer.h" #include "scrnintstr.h" #include "globals.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSproc.h" #include #include "xf86Xinput.h" #ifdef XFreeXDGA #include "dgaproc.h" #endif typedef struct _xf86EdgeRec { short screen; short start; short end; DDXPointRec offset; struct _xf86EdgeRec *next; } xf86EdgeRec, *xf86EdgePtr; typedef struct { xf86EdgePtr left, right, up, down; } xf86ScreenLayoutRec, *xf86ScreenLayoutPtr; static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y); static void xf86CrossScreen(ScreenPtr pScreen, Bool entering); static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static void xf86PointerMoved(ScrnInfoPtr pScrn, int x, int y); static miPointerScreenFuncRec xf86PointerScreenFuncs = { xf86CursorOffScreen, xf86CrossScreen, xf86WarpCursor, }; static xf86ScreenLayoutRec xf86ScreenLayout[MAXSCREENS]; /* * xf86InitViewport -- * Initialize paning & zooming parameters, so that a driver must only * check what resolutions are possible and whether the virtual area * is valid if specified. */ void xf86InitViewport(ScrnInfoPtr pScr) { pScr->PointerMoved = xf86PointerMoved; /* * Compute the initial Viewport if necessary */ if (pScr->display) { if (pScr->display->frameX0 < 0) { pScr->frameX0 = (pScr->virtualX - pScr->modes->HDisplay) / 2; pScr->frameY0 = (pScr->virtualY - pScr->modes->VDisplay) / 2; } else { pScr->frameX0 = pScr->display->frameX0; pScr->frameY0 = pScr->display->frameY0; } } pScr->frameX1 = pScr->frameX0 + pScr->modes->HDisplay - 1; pScr->frameY1 = pScr->frameY0 + pScr->modes->VDisplay - 1; /* * Now adjust the initial Viewport, so it lies within the virtual area */ if (pScr->frameX1 >= pScr->virtualX) { pScr->frameX0 = pScr->virtualX - pScr->modes->HDisplay; pScr->frameX1 = pScr->frameX0 + pScr->modes->HDisplay - 1; } if (pScr->frameY1 >= pScr->virtualY) { pScr->frameY0 = pScr->virtualY - pScr->modes->VDisplay; pScr->frameY1 = pScr->frameY0 + pScr->modes->VDisplay - 1; } } /* * xf86SetViewport -- * Scroll the visual part of the screen so the pointer is visible. */ void xf86SetViewport(ScreenPtr pScreen, int x, int y) { ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen); (*pScr->PointerMoved) (pScr, x, y); } static void xf86PointerMoved(ScrnInfoPtr pScr, int x, int y) { Bool frameChanged = FALSE; /* * check whether (x,y) belongs to the visual part of the screen * if not, change the base of the displayed frame occurring */ if (pScr->frameX0 > x) { pScr->frameX0 = x; pScr->frameX1 = x + pScr->currentMode->HDisplay - 1; frameChanged = TRUE; } if (pScr->frameX1 < x) { pScr->frameX1 = x + 1; pScr->frameX0 = x - pScr->currentMode->HDisplay + 1; frameChanged = TRUE; } if (pScr->frameY0 > y) { pScr->frameY0 = y; pScr->frameY1 = y + pScr->currentMode->VDisplay - 1; frameChanged = TRUE; } if (pScr->frameY1 < y) { pScr->frameY1 = y; pScr->frameY0 = y - pScr->currentMode->VDisplay + 1; frameChanged = TRUE; } if (frameChanged && pScr->AdjustFrame != NULL) pScr->AdjustFrame(pScr, pScr->frameX0, pScr->frameY0); } /* * xf86LockZoom -- * Enable/disable ZoomViewport */ void xf86LockZoom(ScreenPtr pScreen, Bool lock) { ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen); pScr->zoomLocked = lock; } /* * xf86SwitchMode -- * This is called by both keyboard processing and the VidMode extension to * set a new mode. */ Bool xf86SwitchMode(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen); ScreenPtr pCursorScreen; Bool Switched; int px, py; DeviceIntPtr dev, it; if (!pScr->vtSema || !mode || !pScr->SwitchMode) return FALSE; #ifdef XFreeXDGA if (DGAActive(pScr->scrnIndex)) return FALSE; #endif if (mode == pScr->currentMode) return TRUE; if (mode->HDisplay > pScr->virtualX || mode->VDisplay > pScr->virtualY) return FALSE; /* Let's take an educated guess for which pointer to take here. And about as educated as it gets is to take the first pointer we find. */ for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsPointerDevice(dev) && dev->spriteInfo->spriteOwner) break; } pCursorScreen = miPointerGetScreen(dev); if (pScreen == pCursorScreen) miPointerGetPosition(dev, &px, &py); input_lock(); Switched = (*pScr->SwitchMode) (pScr, mode); if (Switched) { pScr->currentMode = mode; /* * Adjust frame for new display size. * Frame is centered around cursor position if cursor is on same screen. */ if (pScreen == pCursorScreen) pScr->frameX0 = px - (mode->HDisplay / 2) + 1; else pScr->frameX0 = (pScr->frameX0 + pScr->frameX1 + 1 - mode->HDisplay) / 2; if (pScr->frameX0 < 0) pScr->frameX0 = 0; pScr->frameX1 = pScr->frameX0 + mode->HDisplay - 1; if (pScr->frameX1 >= pScr->virtualX) { pScr->frameX0 = pScr->virtualX - mode->HDisplay; pScr->frameX1 = pScr->virtualX - 1; } if (pScreen == pCursorScreen) pScr->frameY0 = py - (mode->VDisplay / 2) + 1; else pScr->frameY0 = (pScr->frameY0 + pScr->frameY1 + 1 - mode->VDisplay) / 2; if (pScr->frameY0 < 0) pScr->frameY0 = 0; pScr->frameY1 = pScr->frameY0 + mode->VDisplay - 1; if (pScr->frameY1 >= pScr->virtualY) { pScr->frameY0 = pScr->virtualY - mode->VDisplay; pScr->frameY1 = pScr->virtualY - 1; } } input_unlock(); if (pScr->AdjustFrame) (*pScr->AdjustFrame) (pScr, pScr->frameX0, pScr->frameY0); /* The original code centered the frame around the cursor if possible. * Since this is hard to achieve with multiple cursors, we do the following: * - center around the first pointer * - move all other pointers to the nearest edge on the screen (or leave * them unmodified if they are within the boundaries). */ if (pScreen == pCursorScreen) { xf86WarpCursor(dev, pScreen, px, py); } for (it = inputInfo.devices; it; it = it->next) { if (it == dev) continue; if (IsPointerDevice(it) && it->spriteInfo->spriteOwner) { pCursorScreen = miPointerGetScreen(it); if (pScreen == pCursorScreen) { miPointerGetPosition(it, &px, &py); if (px < pScr->frameX0) px = pScr->frameX0; else if (px > pScr->frameX1) px = pScr->frameX1; if (py < pScr->frameY0) py = pScr->frameY0; else if (py > pScr->frameY1) py = pScr->frameY1; xf86WarpCursor(it, pScreen, px, py); } } } return Switched; } /* * xf86ZoomViewport -- * Reinitialize the visual part of the screen for another mode. */ void xf86ZoomViewport(ScreenPtr pScreen, int zoom) { ScrnInfoPtr pScr = xf86ScreenToScrn(pScreen); DisplayModePtr mode; if (pScr->zoomLocked || !(mode = pScr->currentMode)) return; do { if (zoom > 0) mode = mode->next; else mode = mode->prev; } while (mode != pScr->currentMode && !(mode->type & M_T_USERDEF)); (void) xf86SwitchMode(pScreen, mode); } static xf86EdgePtr FindEdge(xf86EdgePtr edge, int val) { while (edge && (edge->end <= val)) edge = edge->next; if (edge && (edge->start <= val)) return edge; return NULL; } /* * xf86CursorOffScreen -- * Check whether it is necessary to switch to another screen */ static Bool xf86CursorOffScreen(ScreenPtr *pScreen, int *x, int *y) { xf86EdgePtr edge; int tmp; if (screenInfo.numScreens == 1) return FALSE; if (*x < 0) { tmp = *y; if (tmp < 0) tmp = 0; if (tmp >= (*pScreen)->height) tmp = (*pScreen)->height - 1; if ((edge = xf86ScreenLayout[(*pScreen)->myNum].left)) edge = FindEdge(edge, tmp); if (!edge) *x = 0; else { *x += edge->offset.x; *y += edge->offset.y; *pScreen = xf86Screens[edge->screen]->pScreen; } } if (*x >= (*pScreen)->width) { tmp = *y; if (tmp < 0) tmp = 0; if (tmp >= (*pScreen)->height) tmp = (*pScreen)->height - 1; if ((edge = xf86ScreenLayout[(*pScreen)->myNum].right)) edge = FindEdge(edge, tmp); if (!edge) *x = (*pScreen)->width - 1; else { *x += edge->offset.x; *y += edge->offset.y; *pScreen = xf86Screens[edge->screen]->pScreen; } } if (*y < 0) { tmp = *x; if (tmp < 0) tmp = 0; if (tmp >= (*pScreen)->width) tmp = (*pScreen)->width - 1; if ((edge = xf86ScreenLayout[(*pScreen)->myNum].up)) edge = FindEdge(edge, tmp); if (!edge) *y = 0; else { *x += edge->offset.x; *y += edge->offset.y; *pScreen = xf86Screens[edge->screen]->pScreen; } } if (*y >= (*pScreen)->height) { tmp = *x; if (tmp < 0) tmp = 0; if (tmp >= (*pScreen)->width) tmp = (*pScreen)->width - 1; if ((edge = xf86ScreenLayout[(*pScreen)->myNum].down)) edge = FindEdge(edge, tmp); if (!edge) *y = (*pScreen)->height - 1; else { *x += edge->offset.x; *y += edge->offset.y; (*pScreen) = xf86Screens[edge->screen]->pScreen; } } return TRUE; } /* * xf86CrossScreen -- * Switch to another screen * * Currently nothing special happens, but mi assumes the CrossScreen * method exists. */ static void xf86CrossScreen(ScreenPtr pScreen, Bool entering) { } /* * xf86WarpCursor -- * Warp possible to another screen */ /* ARGSUSED */ static void xf86WarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { input_lock(); miPointerWarpCursor(pDev, pScreen, x, y); xf86Info.currentScreen = pScreen; input_unlock(); } void * xf86GetPointerScreenFuncs(void) { return (void *) &xf86PointerScreenFuncs; } static xf86EdgePtr AddEdge(xf86EdgePtr edge, short min, short max, short dx, short dy, short screen) { xf86EdgePtr pEdge = edge, pPrev = NULL, pNew; while (1) { while (pEdge && (min >= pEdge->end)) { pPrev = pEdge; pEdge = pEdge->next; } if (!pEdge) { if (!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; pNew->start = min; pNew->end = max; pNew->offset.x = dx; pNew->offset.y = dy; pNew->next = NULL; if (pPrev) pPrev->next = pNew; else edge = pNew; break; } else if (min < pEdge->start) { if (!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; pNew->start = min; pNew->offset.x = dx; pNew->offset.y = dy; pNew->next = pEdge; if (pPrev) pPrev->next = pNew; else edge = pNew; if (max <= pEdge->start) { pNew->end = max; break; } else { pNew->end = pEdge->start; min = pEdge->end; } } else min = pEdge->end; pPrev = pEdge; pEdge = pEdge->next; if (max <= min) break; } return edge; } static void FillOutEdge(xf86EdgePtr pEdge, int limit) { xf86EdgePtr pNext; int diff; if (pEdge->start > 0) pEdge->start = 0; while ((pNext = pEdge->next)) { diff = pNext->start - pEdge->end; if (diff > 0) { pEdge->end += diff >> 1; pNext->start -= diff - (diff >> 1); } pEdge = pNext; } if (pEdge->end < limit) pEdge->end = limit; } /* * xf86InitOrigins() can deal with a maximum of 32 screens * on 32 bit architectures, 64 on 64 bit architectures. */ void xf86InitOrigins(void) { unsigned long screensLeft, prevScreensLeft, mask; screenLayoutPtr screen; ScreenPtr pScreen, refScreen; int x1, x2, y1, y2, left, right, top, bottom; int i, j, ref, minX, minY, min, max; xf86ScreenLayoutPtr pLayout; Bool OldStyleConfig = FALSE; memset(xf86ScreenLayout, 0, MAXSCREENS * sizeof(xf86ScreenLayoutRec)); screensLeft = prevScreensLeft = (1 << xf86NumScreens) - 1; while (1) { for (mask = screensLeft, i = 0; mask; mask >>= 1, i++) { if (!(mask & 1L)) continue; screen = &xf86ConfigLayout.screens[i]; if (screen->refscreen != NULL && screen->refscreen->screennum >= xf86NumScreens) { screensLeft &= ~(1 << i); xf86Msg(X_WARNING, "Not including screen \"%s\" in origins calculation.\n", screen->screen->id); continue; } pScreen = xf86Screens[i]->pScreen; switch (screen->where) { case PosObsolete: OldStyleConfig = TRUE; pLayout = &xf86ScreenLayout[i]; /* force edge lists */ if (screen->left) { ref = screen->left->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } pLayout->left = AddEdge(pLayout->left, 0, pScreen->height, xf86Screens[ref]->pScreen->width, 0, ref); } if (screen->right) { ref = screen->right->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } pLayout->right = AddEdge(pLayout->right, 0, pScreen->height, -pScreen->width, 0, ref); } if (screen->top) { ref = screen->top->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } pLayout->up = AddEdge(pLayout->up, 0, pScreen->width, 0, xf86Screens[ref]->pScreen->height, ref); } if (screen->bottom) { ref = screen->bottom->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } pLayout->down = AddEdge(pLayout->down, 0, pScreen->width, 0, -pScreen->height, ref); } /* we could also try to place it based on those relative locations if we wanted to */ screen->x = screen->y = 0; /* FALLTHROUGH */ case PosAbsolute: pScreen->x = screen->x; pScreen->y = screen->y; screensLeft &= ~(1 << i); break; case PosRelative: ref = screen->refscreen->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } if (screensLeft & (1 << ref)) break; refScreen = xf86Screens[ref]->pScreen; pScreen->x = refScreen->x + screen->x; pScreen->y = refScreen->y + screen->y; screensLeft &= ~(1 << i); break; case PosRightOf: ref = screen->refscreen->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } if (screensLeft & (1 << ref)) break; refScreen = xf86Screens[ref]->pScreen; pScreen->x = refScreen->x + refScreen->width; pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosLeftOf: ref = screen->refscreen->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } if (screensLeft & (1 << ref)) break; refScreen = xf86Screens[ref]->pScreen; pScreen->x = refScreen->x - pScreen->width; pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosBelow: ref = screen->refscreen->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } if (screensLeft & (1 << ref)) break; refScreen = xf86Screens[ref]->pScreen; pScreen->x = refScreen->x; pScreen->y = refScreen->y + refScreen->height; screensLeft &= ~(1 << i); break; case PosAbove: ref = screen->refscreen->screennum; if (!xf86Screens[ref] || !xf86Screens[ref]->pScreen) { ErrorF("Referenced uninitialized screen in Layout!\n"); break; } if (screensLeft & (1 << ref)) break; refScreen = xf86Screens[ref]->pScreen; pScreen->x = refScreen->x; pScreen->y = refScreen->y - pScreen->height; screensLeft &= ~(1 << i); break; default: ErrorF("Illegal placement keyword in Layout!\n"); break; } } if (!screensLeft) break; if (screensLeft == prevScreensLeft) { /* All the remaining screens are referencing each other. Assign a value to one of them and go through again */ i = 0; while (!((1 << i) & screensLeft)) { i++; } ref = xf86ConfigLayout.screens[i].refscreen->screennum; xf86Screens[ref]->pScreen->x = xf86Screens[ref]->pScreen->y = 0; screensLeft &= ~(1 << ref); } prevScreensLeft = screensLeft; } /* justify the topmost and leftmost to (0,0) */ minX = xf86Screens[0]->pScreen->x; minY = xf86Screens[0]->pScreen->y; for (i = 1; i < xf86NumScreens; i++) { if (xf86Screens[i]->pScreen->x < minX) minX = xf86Screens[i]->pScreen->x; if (xf86Screens[i]->pScreen->y < minY) minY = xf86Screens[i]->pScreen->y; } if (minX || minY) { for (i = 0; i < xf86NumScreens; i++) { xf86Screens[i]->pScreen->x -= minX; xf86Screens[i]->pScreen->y -= minY; } } /* Create the edge lists */ if (!OldStyleConfig) { for (i = 0; i < xf86NumScreens; i++) { pLayout = &xf86ScreenLayout[i]; pScreen = xf86Screens[i]->pScreen; left = pScreen->x; right = left + pScreen->width; top = pScreen->y; bottom = top + pScreen->height; for (j = 0; j < xf86NumScreens; j++) { if (i == j) continue; refScreen = xf86Screens[j]->pScreen; x1 = refScreen->x; x2 = x1 + refScreen->width; y1 = refScreen->y; y2 = y1 + refScreen->height; if ((bottom > y1) && (top < y2)) { min = y1 - top; if (min < 0) min = 0; max = pScreen->height - (bottom - y2); if (max > pScreen->height) max = pScreen->height; if (((left - 1) >= x1) && ((left - 1) < x2)) pLayout->left = AddEdge(pLayout->left, min, max, pScreen->x - refScreen->x, pScreen->y - refScreen->y, j); if ((right >= x1) && (right < x2)) pLayout->right = AddEdge(pLayout->right, min, max, pScreen->x - refScreen->x, pScreen->y - refScreen->y, j); } if ((left < x2) && (right > x1)) { min = x1 - left; if (min < 0) min = 0; max = pScreen->width - (right - x2); if (max > pScreen->width) max = pScreen->width; if (((top - 1) >= y1) && ((top - 1) < y2)) pLayout->up = AddEdge(pLayout->up, min, max, pScreen->x - refScreen->x, pScreen->y - refScreen->y, j); if ((bottom >= y1) && (bottom < y2)) pLayout->down = AddEdge(pLayout->down, min, max, pScreen->x - refScreen->x, pScreen->y - refScreen->y, j); } } } } if (!OldStyleConfig) { for (i = 0; i < xf86NumScreens; i++) { pLayout = &xf86ScreenLayout[i]; pScreen = xf86Screens[i]->pScreen; if (pLayout->left) FillOutEdge(pLayout->left, pScreen->height); if (pLayout->right) FillOutEdge(pLayout->right, pScreen->height); if (pLayout->up) FillOutEdge(pLayout->up, pScreen->width); if (pLayout->down) FillOutEdge(pLayout->down, pScreen->width); } } update_desktop_dimensions(); } void xf86ReconfigureLayout(void) { int i; for (i = 0; i < MAXSCREENS; i++) { xf86ScreenLayoutPtr sl = &xf86ScreenLayout[i]; /* we don't have to zero these, xf86InitOrigins() takes care of that */ free(sl->left); free(sl->right); free(sl->up); free(sl->down); } xf86InitOrigins(); } xorg-server-21.1.16/hw/xfree86/common/xf86DGA.c0000644000175000017500000016511414757411105014313 /* * Copyright (c) 1995 Jon Tombs * Copyright (c) 1995, 1996, 1999 XFree86 Inc * Copyright (c) 1998-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). * * Written by Mark Vojkovich */ /* * This is quite literally just two files glued together: * hw/xfree86/common/xf86DGA.c is the first part, and * hw/xfree86/dixmods/extmod/xf86dga2.c is the second part. One day, if * someone actually cares about DGA, it'd be nice to clean this up. But trust * me, I am not that person. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86str.h" #include "xf86Priv.h" #include "dgaproc.h" #include #include "colormapst.h" #include "pixmapstr.h" #include "inputstr.h" #include "globals.h" #include "servermd.h" #include "micmap.h" #include "xkbsrv.h" #include "xf86Xinput.h" #include "exglobals.h" #include "exevents.h" #include "eventstr.h" #include "eventconvert.h" #include "xf86Extensions.h" #include "mi.h" #include "misc.h" #include "dixstruct.h" #include "dixevents.h" #include "extnsionst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "swaprep.h" #include "dgaproc.h" #include "protocol-versions.h" #include #define DGA_PROTOCOL_OLD_SUPPORT 1 static DevPrivateKeyRec DGAScreenKeyRec; #define DGAScreenKeyRegistered dixPrivateKeyRegistered(&DGAScreenKeyRec) static Bool DGACloseScreen(ScreenPtr pScreen); static void DGADestroyColormap(ColormapPtr pmap); static void DGAInstallColormap(ColormapPtr pmap); static void DGAUninstallColormap(ColormapPtr pmap); static void DGAHandleEvent(int screen_num, InternalEvent *event, DeviceIntPtr device); static void DGACopyModeInfo(DGAModePtr mode, XDGAModePtr xmode); static unsigned char DGAReqCode = 0; static int DGAErrorBase; static int DGAEventBase; #define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, &DGAScreenKeyRec)) typedef struct _FakedVisualList { Bool free; VisualPtr pVisual; struct _FakedVisualList *next; } FakedVisualList; typedef struct { ScrnInfoPtr pScrn; int numModes; DGAModePtr modes; CloseScreenProcPtr CloseScreen; DestroyColormapProcPtr DestroyColormap; InstallColormapProcPtr InstallColormap; UninstallColormapProcPtr UninstallColormap; DGADevicePtr current; DGAFunctionPtr funcs; int input; ClientPtr client; int pixmapMode; FakedVisualList *fakedVisuals; ColormapPtr dgaColormap; ColormapPtr savedColormap; Bool grabMouse; Bool grabKeyboard; } DGAScreenRec, *DGAScreenPtr; Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); DGAScreenPtr pScreenPriv; int i; if (!funcs || !funcs->SetMode || !funcs->OpenFramebuffer) return FALSE; if (!modes || num <= 0) return FALSE; if (!dixRegisterPrivateKey(&DGAScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (!pScreenPriv) { if (!(pScreenPriv = (DGAScreenPtr) malloc(sizeof(DGAScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, &DGAScreenKeyRec, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DGACloseScreen; pScreenPriv->DestroyColormap = pScreen->DestroyColormap; pScreen->DestroyColormap = DGADestroyColormap; pScreenPriv->InstallColormap = pScreen->InstallColormap; pScreen->InstallColormap = DGAInstallColormap; pScreenPriv->UninstallColormap = pScreen->UninstallColormap; pScreen->UninstallColormap = DGAUninstallColormap; } pScreenPriv->pScrn = pScrn; pScreenPriv->numModes = num; pScreenPriv->modes = modes; pScreenPriv->current = NULL; pScreenPriv->funcs = funcs; pScreenPriv->input = 0; pScreenPriv->client = NULL; pScreenPriv->fakedVisuals = NULL; pScreenPriv->dgaColormap = NULL; pScreenPriv->savedColormap = NULL; pScreenPriv->grabMouse = FALSE; pScreenPriv->grabKeyboard = FALSE; for (i = 0; i < num; i++) modes[i].num = i + 1; #ifdef PANORAMIX if (!noPanoramiXExtension) for (i = 0; i < num; i++) modes[i].flags &= ~DGA_PIXMAP_AVAILABLE; #endif return TRUE; } /* DGAReInitModes allows the driver to re-initialize * the DGA mode list. */ Bool DGAReInitModes(ScreenPtr pScreen, DGAModePtr modes, int num) { DGAScreenPtr pScreenPriv; int i; /* No DGA? Ignore call (but don't make it look like it failed) */ if (!DGAScreenKeyRegistered) return TRUE; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); /* Same as above */ if (!pScreenPriv) return TRUE; /* Can't do this while DGA is active */ if (pScreenPriv->current) return FALSE; /* Quick sanity check */ if (!num) modes = NULL; else if (!modes) num = 0; pScreenPriv->numModes = num; pScreenPriv->modes = modes; /* This practically disables DGA. So be it. */ if (!num) return TRUE; for (i = 0; i < num; i++) modes[i].num = i + 1; #ifdef PANORAMIX if (!noPanoramiXExtension) for (i = 0; i < num; i++) modes[i].flags &= ~DGA_PIXMAP_AVAILABLE; #endif return TRUE; } static void FreeMarkedVisuals(ScreenPtr pScreen) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); FakedVisualList *prev, *curr, *tmp; if (!pScreenPriv->fakedVisuals) return; prev = NULL; curr = pScreenPriv->fakedVisuals; while (curr) { if (curr->free) { tmp = curr; curr = curr->next; if (prev) prev->next = curr; else pScreenPriv->fakedVisuals = curr; free(tmp->pVisual); free(tmp); } else { prev = curr; curr = curr->next; } } } static Bool DGACloseScreen(ScreenPtr pScreen) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); mieqSetHandler(ET_DGAEvent, NULL); pScreenPriv->pScrn->SetDGAMode(pScreenPriv->pScrn, 0, NULL); FreeMarkedVisuals(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->DestroyColormap = pScreenPriv->DestroyColormap; pScreen->InstallColormap = pScreenPriv->InstallColormap; pScreen->UninstallColormap = pScreenPriv->UninstallColormap; free(pScreenPriv); return ((*pScreen->CloseScreen) (pScreen)); } static void DGADestroyColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); VisualPtr pVisual = pmap->pVisual; if (pScreenPriv->fakedVisuals) { FakedVisualList *curr = pScreenPriv->fakedVisuals; while (curr) { if (curr->pVisual == pVisual) { /* We can't get rid of them yet since FreeColormap still needs the pVisual during the cleanup */ curr->free = TRUE; break; } curr = curr->next; } } if (pScreenPriv->DestroyColormap) { pScreen->DestroyColormap = pScreenPriv->DestroyColormap; (*pScreen->DestroyColormap) (pmap); pScreen->DestroyColormap = DGADestroyColormap; } } static void DGAInstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (pScreenPriv->current && pScreenPriv->dgaColormap) { if (pmap != pScreenPriv->dgaColormap) { pScreenPriv->savedColormap = pmap; pmap = pScreenPriv->dgaColormap; } } pScreen->InstallColormap = pScreenPriv->InstallColormap; (*pScreen->InstallColormap) (pmap); pScreen->InstallColormap = DGAInstallColormap; } static void DGAUninstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (pScreenPriv->current && pScreenPriv->dgaColormap) { if (pmap == pScreenPriv->dgaColormap) { pScreenPriv->dgaColormap = NULL; } } pScreen->UninstallColormap = pScreenPriv->UninstallColormap; (*pScreen->UninstallColormap) (pmap); pScreen->UninstallColormap = DGAUninstallColormap; } int xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); DGAScreenPtr pScreenPriv; DGADevicePtr device; PixmapPtr pPix = NULL; DGAModePtr pMode = NULL; /* First check if DGAInit was successful on this screen */ if (!DGAScreenKeyRegistered) return BadValue; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (!pScreenPriv) return BadValue; if (!num) { if (pScreenPriv->current) { PixmapPtr oldPix = pScreenPriv->current->pPix; if (oldPix) { if (oldPix->drawable.id) FreeResource(oldPix->drawable.id, RT_NONE); else (*pScreen->DestroyPixmap) (oldPix); } free(pScreenPriv->current); pScreenPriv->current = NULL; pScrn->vtSema = TRUE; (*pScreenPriv->funcs->SetMode) (pScrn, NULL); if (pScreenPriv->savedColormap) { (*pScreen->InstallColormap) (pScreenPriv->savedColormap); pScreenPriv->savedColormap = NULL; } pScreenPriv->dgaColormap = NULL; (*pScrn->EnableDisableFBAccess) (pScrn, TRUE); FreeMarkedVisuals(pScreen); } pScreenPriv->grabMouse = FALSE; pScreenPriv->grabKeyboard = FALSE; return Success; } if (!pScrn->vtSema && !pScreenPriv->current) /* Really switched away */ return BadAlloc; if ((num > 0) && (num <= pScreenPriv->numModes)) pMode = &(pScreenPriv->modes[num - 1]); else return BadValue; if (!(device = (DGADevicePtr) malloc(sizeof(DGADeviceRec)))) return BadAlloc; if (!pScreenPriv->current) { Bool oldVTSema = pScrn->vtSema; pScrn->vtSema = FALSE; /* kludge until we rewrite VT switching */ (*pScrn->EnableDisableFBAccess) (pScrn, FALSE); pScrn->vtSema = oldVTSema; } if (!(*pScreenPriv->funcs->SetMode) (pScrn, pMode)) { free(device); return BadAlloc; } pScrn->currentMode = pMode->mode; if (!pScreenPriv->current && !pScreenPriv->input) { /* if it's multihead we need to warp the cursor off of our screen so it doesn't get trapped */ } pScrn->vtSema = FALSE; if (pScreenPriv->current) { PixmapPtr oldPix = pScreenPriv->current->pPix; if (oldPix) { if (oldPix->drawable.id) FreeResource(oldPix->drawable.id, RT_NONE); else (*pScreen->DestroyPixmap) (oldPix); } free(pScreenPriv->current); pScreenPriv->current = NULL; } if (pMode->flags & DGA_PIXMAP_AVAILABLE) { if ((pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, pMode->depth, 0))) { (*pScreen->ModifyPixmapHeader) (pPix, pMode->pixmapWidth, pMode->pixmapHeight, pMode->depth, pMode->bitsPerPixel, pMode->bytesPerScanline, (void *) (pMode->address)); } } devRet->mode = device->mode = pMode; devRet->pPix = device->pPix = pPix; pScreenPriv->current = device; pScreenPriv->pixmapMode = FALSE; pScreenPriv->grabMouse = TRUE; pScreenPriv->grabKeyboard = TRUE; mieqSetHandler(ET_DGAEvent, DGAHandleEvent); return Success; } /*********** exported ones ***************/ static void DGASetInputMode(int index, Bool keyboard, Bool mouse) { ScreenPtr pScreen = screenInfo.screens[index]; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (pScreenPriv) { pScreenPriv->grabMouse = mouse; pScreenPriv->grabKeyboard = keyboard; mieqSetHandler(ET_DGAEvent, DGAHandleEvent); } } static Bool DGAChangePixmapMode(int index, int *x, int *y, int mode) { DGAScreenPtr pScreenPriv; DGADevicePtr pDev; DGAModePtr pMode; PixmapPtr pPix; if (!DGAScreenKeyRegistered) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (!pScreenPriv || !pScreenPriv->current || !pScreenPriv->current->pPix) return FALSE; pDev = pScreenPriv->current; pPix = pDev->pPix; pMode = pDev->mode; if (mode) { int shift = 2; if (*x > (pMode->pixmapWidth - pMode->viewportWidth)) *x = pMode->pixmapWidth - pMode->viewportWidth; if (*y > (pMode->pixmapHeight - pMode->viewportHeight)) *y = pMode->pixmapHeight - pMode->viewportHeight; switch (xf86Screens[index]->bitsPerPixel) { case 16: shift = 1; break; case 32: shift = 0; break; default: break; } if (BITMAP_SCANLINE_PAD == 64) shift++; *x = (*x >> shift) << shift; pPix->drawable.x = *x; pPix->drawable.y = *y; pPix->drawable.width = pMode->viewportWidth; pPix->drawable.height = pMode->viewportHeight; } else { pPix->drawable.x = 0; pPix->drawable.y = 0; pPix->drawable.width = pMode->pixmapWidth; pPix->drawable.height = pMode->pixmapHeight; } pPix->drawable.serialNumber = NEXT_SERIAL_NUMBER; pScreenPriv->pixmapMode = mode; return TRUE; } Bool DGAScreenAvailable(ScreenPtr pScreen) { if (!DGAScreenKeyRegistered) return FALSE; if (DGA_GET_SCREEN_PRIV(pScreen)) return TRUE; return FALSE; } static Bool DGAAvailable(int index) { ScreenPtr pScreen; assert(index < MAXSCREENS); pScreen = screenInfo.screens[index]; return DGAScreenAvailable(pScreen); } Bool DGAActive(int index) { DGAScreenPtr pScreenPriv; if (!DGAScreenKeyRegistered) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (pScreenPriv && pScreenPriv->current) return TRUE; return FALSE; } /* Called by the extension to initialize a mode */ static int DGASetMode(int index, int num, XDGAModePtr mode, PixmapPtr *pPix) { ScrnInfoPtr pScrn = xf86Screens[index]; DGADeviceRec device; int ret; /* We rely on the extension to check that DGA is available */ ret = (*pScrn->SetDGAMode) (pScrn, num, &device); if ((ret == Success) && num) { DGACopyModeInfo(device.mode, mode); *pPix = device.pPix; } return ret; } /* Called from the extension to let the DDX know which events are requested */ static void DGASelectInput(int index, ClientPtr client, long mask) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is available */ pScreenPriv->client = client; pScreenPriv->input = mask; } static int DGAGetViewportStatus(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is active */ if (!pScreenPriv->funcs->GetViewport) return 0; return (*pScreenPriv->funcs->GetViewport) (pScreenPriv->pScrn); } static int DGASetViewport(int index, int x, int y, int mode) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (pScreenPriv->funcs->SetViewport) (*pScreenPriv->funcs->SetViewport) (pScreenPriv->pScrn, x, y, mode); return Success; } static int BitsClear(CARD32 data) { int bits = 0; CARD32 mask; for (mask = 1; mask; mask <<= 1) { if (!(data & mask)) bits++; else break; } return bits; } static int DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) { ScreenPtr pScreen = screenInfo.screens[index]; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); FakedVisualList *fvlp; VisualPtr pVisual; DGAModePtr pMode; ColormapPtr pmap; if (!mode || (mode > pScreenPriv->numModes)) return BadValue; if ((alloc != AllocNone) && (alloc != AllocAll)) return BadValue; pMode = &(pScreenPriv->modes[mode - 1]); if (!(pVisual = malloc(sizeof(VisualRec)))) return BadAlloc; pVisual->vid = FakeClientID(0); pVisual->class = pMode->visualClass; pVisual->nplanes = pMode->depth; pVisual->ColormapEntries = 1 << pMode->depth; pVisual->bitsPerRGBValue = (pMode->depth + 2) / 3; switch (pVisual->class) { case PseudoColor: case GrayScale: case StaticGray: pVisual->bitsPerRGBValue = 8; /* not quite */ pVisual->redMask = 0; pVisual->greenMask = 0; pVisual->blueMask = 0; pVisual->offsetRed = 0; pVisual->offsetGreen = 0; pVisual->offsetBlue = 0; break; case DirectColor: case TrueColor: pVisual->ColormapEntries = 1 << pVisual->bitsPerRGBValue; /* fall through */ case StaticColor: pVisual->redMask = pMode->red_mask; pVisual->greenMask = pMode->green_mask; pVisual->blueMask = pMode->blue_mask; pVisual->offsetRed = BitsClear(pVisual->redMask); pVisual->offsetGreen = BitsClear(pVisual->greenMask); pVisual->offsetBlue = BitsClear(pVisual->blueMask); } if (!(fvlp = malloc(sizeof(FakedVisualList)))) { free(pVisual); return BadAlloc; } fvlp->free = FALSE; fvlp->pVisual = pVisual; fvlp->next = pScreenPriv->fakedVisuals; pScreenPriv->fakedVisuals = fvlp; LEGAL_NEW_RESOURCE(id, client); return CreateColormap(id, pScreen, pVisual, &pmap, alloc, client->index); } /* Called by the extension to install a colormap on DGA active screens */ static void DGAInstallCmap(ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); /* We rely on the extension to check that DGA is active */ if (!pScreenPriv->dgaColormap) pScreenPriv->savedColormap = GetInstalledmiColormap(pScreen); pScreenPriv->dgaColormap = cmap; (*pScreen->InstallColormap) (cmap); } static int DGASync(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is active */ if (pScreenPriv->funcs->Sync) (*pScreenPriv->funcs->Sync) (pScreenPriv->pScrn); return Success; } static int DGAFillRect(int index, int x, int y, int w, int h, unsigned long color) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is active */ if (pScreenPriv->funcs->FillRect && (pScreenPriv->current->mode->flags & DGA_FILL_RECT)) { (*pScreenPriv->funcs->FillRect) (pScreenPriv->pScrn, x, y, w, h, color); return Success; } return BadMatch; } static int DGABlitRect(int index, int srcx, int srcy, int w, int h, int dstx, int dsty) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is active */ if (pScreenPriv->funcs->BlitRect && (pScreenPriv->current->mode->flags & DGA_BLIT_RECT)) { (*pScreenPriv->funcs->BlitRect) (pScreenPriv->pScrn, srcx, srcy, w, h, dstx, dsty); return Success; } return BadMatch; } static int DGABlitTransRect(int index, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long color) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is active */ if (pScreenPriv->funcs->BlitTransRect && (pScreenPriv->current->mode->flags & DGA_BLIT_RECT_TRANS)) { (*pScreenPriv->funcs->BlitTransRect) (pScreenPriv->pScrn, srcx, srcy, w, h, dstx, dsty, color); return Success; } return BadMatch; } static int DGAGetModes(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is available */ return pScreenPriv->numModes; } static int DGAGetModeInfo(int index, XDGAModePtr mode, int num) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is available */ if ((num <= 0) || (num > pScreenPriv->numModes)) return BadValue; DGACopyModeInfo(&(pScreenPriv->modes[num - 1]), mode); return Success; } static void DGACopyModeInfo(DGAModePtr mode, XDGAModePtr xmode) { DisplayModePtr dmode = mode->mode; xmode->num = mode->num; xmode->name = dmode->name; xmode->VSync_num = (int) (dmode->VRefresh * 1000.0); xmode->VSync_den = 1000; xmode->flags = mode->flags; xmode->imageWidth = mode->imageWidth; xmode->imageHeight = mode->imageHeight; xmode->pixmapWidth = mode->pixmapWidth; xmode->pixmapHeight = mode->pixmapHeight; xmode->bytesPerScanline = mode->bytesPerScanline; xmode->byteOrder = mode->byteOrder; xmode->depth = mode->depth; xmode->bitsPerPixel = mode->bitsPerPixel; xmode->red_mask = mode->red_mask; xmode->green_mask = mode->green_mask; xmode->blue_mask = mode->blue_mask; xmode->visualClass = mode->visualClass; xmode->viewportWidth = mode->viewportWidth; xmode->viewportHeight = mode->viewportHeight; xmode->xViewportStep = mode->xViewportStep; xmode->yViewportStep = mode->yViewportStep; xmode->maxViewportX = mode->maxViewportX; xmode->maxViewportY = mode->maxViewportY; xmode->viewportFlags = mode->viewportFlags; xmode->reserved1 = mode->reserved1; xmode->reserved2 = mode->reserved2; xmode->offset = mode->offset; if (dmode->Flags & V_INTERLACE) xmode->flags |= DGA_INTERLACED; if (dmode->Flags & V_DBLSCAN) xmode->flags |= DGA_DOUBLESCAN; } Bool DGAVTSwitch(void) { ScreenPtr pScreen; int i; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; /* Alternatively, this could send events to DGA clients */ if (DGAScreenKeyRegistered) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (pScreenPriv && pScreenPriv->current) return FALSE; } } return TRUE; } Bool DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) { DGAScreenPtr pScreenPriv; DGAEvent event; if (!DGAScreenKeyRegistered) /* no DGA */ return FALSE; if (key_code < 8 || key_code > 255) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (!pScreenPriv || !pScreenPriv->grabKeyboard) /* no direct mode */ return FALSE; event = (DGAEvent) { .header = ET_Internal, .type = ET_DGAEvent, .length = sizeof(event), .time = GetTimeInMillis(), .subtype = (is_down ? ET_KeyPress : ET_KeyRelease), .detail = key_code, .dx = 0, .dy = 0 }; mieqEnqueue(dev, (InternalEvent *) &event); return TRUE; } Bool DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) { DGAScreenPtr pScreenPriv; DGAEvent event; if (!DGAScreenKeyRegistered) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (!pScreenPriv || !pScreenPriv->grabMouse) /* no direct mode */ return FALSE; event = (DGAEvent) { .header = ET_Internal, .type = ET_DGAEvent, .length = sizeof(event), .time = GetTimeInMillis(), .subtype = ET_Motion, .detail = 0, .dx = dx, .dy = dy }; mieqEnqueue(dev, (InternalEvent *) &event); return TRUE; } Bool DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) { DGAScreenPtr pScreenPriv; DGAEvent event; if (!DGAScreenKeyRegistered) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); if (!pScreenPriv || !pScreenPriv->grabMouse) return FALSE; event = (DGAEvent) { .header = ET_Internal, .type = ET_DGAEvent, .length = sizeof(event), .time = GetTimeInMillis(), .subtype = (is_down ? ET_ButtonPress : ET_ButtonRelease), .detail = button, .dx = 0, .dy = 0 }; mieqEnqueue(dev, (InternalEvent *) &event); return TRUE; } /* We have the power to steal or modify events that are about to get queued */ #define NoSuchEvent 0x80000000 /* so doesn't match NoEventMask */ static Mask filters[] = { NoSuchEvent, /* 0 */ NoSuchEvent, /* 1 */ KeyPressMask, /* KeyPress */ KeyReleaseMask, /* KeyRelease */ ButtonPressMask, /* ButtonPress */ ButtonReleaseMask, /* ButtonRelease */ PointerMotionMask, /* MotionNotify (initial state) */ }; static void DGAProcessKeyboardEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr keybd) { KeyClassPtr keyc = keybd->key; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceIntPtr pointer = GetMaster(keybd, POINTER_OR_FLOAT); DeviceEvent ev = { .header = ET_Internal, .length = sizeof(ev), .detail.key = event->detail, .type = event->subtype, .root_x = 0, .root_y = 0, .corestate = XkbStateFieldFromRec(&keyc->xkbInfo->state) }; ev.corestate |= pointer->button->state; UpdateDeviceState(keybd, &ev); if (!IsMaster(keybd)) return; /* * Deliver the DGA event */ if (pScreenPriv->client) { dgaEvent de = { .u.event.time = event->time, .u.event.dx = event->dx, .u.event.dy = event->dy, .u.event.screen = pScreen->myNum, .u.event.state = ev.corestate }; de.u.u.type = DGAEventBase + GetCoreType(ev.type); de.u.u.detail = event->detail; /* If the DGA client has selected input, then deliver based on the usual filter */ TryClientEvents(pScreenPriv->client, keybd, (xEvent *) &de, 1, filters[ev.type], pScreenPriv->input, 0); } else { /* If the keyboard is actively grabbed, deliver a grabbed core event */ if (keybd->deviceGrab.grab && !keybd->deviceGrab.fromPassiveGrab) { ev.detail.key = event->detail; ev.time = event->time; ev.root_x = event->dx; ev.root_y = event->dy; ev.corestate = event->state; ev.deviceid = keybd->id; DeliverGrabbedEvent((InternalEvent *) &ev, keybd, FALSE); } } } static void DGAProcessPointerEvent(ScreenPtr pScreen, DGAEvent * event, DeviceIntPtr mouse) { ButtonClassPtr butc = mouse->button; DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); DeviceIntPtr master = GetMaster(mouse, MASTER_KEYBOARD); DeviceEvent ev = { .header = ET_Internal, .length = sizeof(ev), .detail.key = event->detail, .type = event->subtype, .corestate = butc ? butc->state : 0 }; if (master && master->key) ev.corestate |= XkbStateFieldFromRec(&master->key->xkbInfo->state); UpdateDeviceState(mouse, &ev); if (!IsMaster(mouse)) return; /* * Deliver the DGA event */ if (pScreenPriv->client) { int coreEquiv = GetCoreType(ev.type); dgaEvent de = { .u.event.time = event->time, .u.event.dx = event->dx, .u.event.dy = event->dy, .u.event.screen = pScreen->myNum, .u.event.state = ev.corestate }; de.u.u.type = DGAEventBase + coreEquiv; de.u.u.detail = event->detail; /* If the DGA client has selected input, then deliver based on the usual filter */ TryClientEvents(pScreenPriv->client, mouse, (xEvent *) &de, 1, filters[coreEquiv], pScreenPriv->input, 0); } else { /* If the pointer is actively grabbed, deliver a grabbed core event */ if (mouse->deviceGrab.grab && !mouse->deviceGrab.fromPassiveGrab) { ev.detail.button = event->detail; ev.time = event->time; ev.root_x = event->dx; ev.root_y = event->dy; ev.corestate = event->state; /* DGA is core only, so valuators.data doesn't actually matter. * Mask must be set for EventToCore to create motion events. */ SetBit(ev.valuators.mask, 0); SetBit(ev.valuators.mask, 1); DeliverGrabbedEvent((InternalEvent *) &ev, mouse, FALSE); } } } static Bool DGAOpenFramebuffer(int index, char **name, unsigned char **mem, int *size, int *offset, int *flags) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is available */ return (*pScreenPriv->funcs->OpenFramebuffer) (pScreenPriv->pScrn, name, mem, size, offset, flags); } static void DGACloseFramebuffer(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); /* We rely on the extension to check that DGA is available */ if (pScreenPriv->funcs->CloseFramebuffer) (*pScreenPriv->funcs->CloseFramebuffer) (pScreenPriv->pScrn); } /* For DGA 1.0 backwards compatibility only */ static int DGAGetOldDGAMode(int index) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); ScrnInfoPtr pScrn = pScreenPriv->pScrn; DGAModePtr mode; int i, w, h, p; /* We rely on the extension to check that DGA is available */ w = pScrn->currentMode->HDisplay; h = pScrn->currentMode->VDisplay; p = pad_to_int32(pScrn->displayWidth * bits_to_bytes(pScrn->bitsPerPixel)); for (i = 0; i < pScreenPriv->numModes; i++) { mode = &(pScreenPriv->modes[i]); if ((mode->viewportWidth == w) && (mode->viewportHeight == h) && (mode->bytesPerScanline == p) && (mode->bitsPerPixel == pScrn->bitsPerPixel) && (mode->depth == pScrn->depth)) { return mode->num; } } return 0; } static void DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) { DGAEvent *event = &ev->dga_event; ScreenPtr pScreen = screenInfo.screens[screen_num]; DGAScreenPtr pScreenPriv; /* no DGA */ if (!DGAScreenKeyRegistered || noXFree86DGAExtension) return; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); /* DGA not initialized on this screen */ if (!pScreenPriv) return; switch (event->subtype) { case KeyPress: case KeyRelease: DGAProcessKeyboardEvent(pScreen, event, device); break; case MotionNotify: case ButtonPress: case ButtonRelease: DGAProcessPointerEvent(pScreen, event, device); break; default: break; } } static void XDGAResetProc(ExtensionEntry * extEntry); static void DGAClientStateChange(CallbackListPtr *, void *, void *); static DevPrivateKeyRec DGAScreenPrivateKeyRec; #define DGAScreenPrivateKey (&DGAScreenPrivateKeyRec) #define DGAScreenPrivateKeyRegistered (DGAScreenPrivateKeyRec.initialized) static DevPrivateKeyRec DGAClientPrivateKeyRec; #define DGAClientPrivateKey (&DGAClientPrivateKeyRec) static int DGACallbackRefCount = 0; /* This holds the client's version information */ typedef struct { int major; int minor; } DGAPrivRec, *DGAPrivPtr; #define DGA_GETCLIENT(idx) ((ClientPtr) \ dixLookupPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey)) #define DGA_SETCLIENT(idx,p) \ dixSetPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey, p) #define DGA_GETPRIV(c) ((DGAPrivPtr) \ dixLookupPrivate(&(c)->devPrivates, DGAClientPrivateKey)) #define DGA_SETPRIV(c,p) \ dixSetPrivate(&(c)->devPrivates, DGAClientPrivateKey, p) static void XDGAResetProc(ExtensionEntry * extEntry) { DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); DGACallbackRefCount = 0; } static int ProcXDGAQueryVersion(ClientPtr client) { xXDGAQueryVersionReply rep; REQUEST_SIZE_MATCH(xXDGAQueryVersionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.majorVersion = SERVER_XDGA_MAJOR_VERSION; rep.minorVersion = SERVER_XDGA_MINOR_VERSION; WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *) &rep); return Success; } static int ProcXDGAOpenFramebuffer(ClientPtr client) { REQUEST(xXDGAOpenFramebufferReq); xXDGAOpenFramebufferReply rep; char *deviceName; int nameSize; REQUEST_SIZE_MATCH(xXDGAOpenFramebufferReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (!DGAOpenFramebuffer(stuff->screen, &deviceName, (unsigned char **) (&rep.mem1), (int *) &rep.size, (int *) &rep.offset, (int *) &rep.extra)) { return BadAlloc; } nameSize = deviceName ? (strlen(deviceName) + 1) : 0; rep.length = bytes_to_int32(nameSize); WriteToClient(client, sizeof(xXDGAOpenFramebufferReply), (char *) &rep); if (rep.length) WriteToClient(client, nameSize, deviceName); return Success; } static int ProcXDGACloseFramebuffer(ClientPtr client) { REQUEST(xXDGACloseFramebufferReq); REQUEST_SIZE_MATCH(xXDGACloseFramebufferReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; DGACloseFramebuffer(stuff->screen); return Success; } static int ProcXDGAQueryModes(ClientPtr client) { int i, num, size; REQUEST(xXDGAQueryModesReq); xXDGAQueryModesReply rep; xXDGAModeInfo info; XDGAModePtr mode; REQUEST_SIZE_MATCH(xXDGAQueryModesReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; rep.type = X_Reply; rep.length = 0; rep.number = 0; rep.sequenceNumber = client->sequence; if (!DGAAvailable(stuff->screen)) { rep.number = 0; rep.length = 0; WriteToClient(client, sz_xXDGAQueryModesReply, (char *) &rep); return Success; } if (!(num = DGAGetModes(stuff->screen))) { WriteToClient(client, sz_xXDGAQueryModesReply, (char *) &rep); return Success; } if (!(mode = xallocarray(num, sizeof(XDGAModeRec)))) return BadAlloc; for (i = 0; i < num; i++) DGAGetModeInfo(stuff->screen, mode + i, i + 1); size = num * sz_xXDGAModeInfo; for (i = 0; i < num; i++) size += pad_to_int32(strlen(mode[i].name) + 1); /* plus NULL */ rep.number = num; rep.length = bytes_to_int32(size); WriteToClient(client, sz_xXDGAQueryModesReply, (char *) &rep); for (i = 0; i < num; i++) { size = strlen(mode[i].name) + 1; info.byte_order = mode[i].byteOrder; info.depth = mode[i].depth; info.num = mode[i].num; info.bpp = mode[i].bitsPerPixel; info.name_size = (size + 3) & ~3L; info.vsync_num = mode[i].VSync_num; info.vsync_den = mode[i].VSync_den; info.flags = mode[i].flags; info.image_width = mode[i].imageWidth; info.image_height = mode[i].imageHeight; info.pixmap_width = mode[i].pixmapWidth; info.pixmap_height = mode[i].pixmapHeight; info.bytes_per_scanline = mode[i].bytesPerScanline; info.red_mask = mode[i].red_mask; info.green_mask = mode[i].green_mask; info.blue_mask = mode[i].blue_mask; info.visual_class = mode[i].visualClass; info.viewport_width = mode[i].viewportWidth; info.viewport_height = mode[i].viewportHeight; info.viewport_xstep = mode[i].xViewportStep; info.viewport_ystep = mode[i].yViewportStep; info.viewport_xmax = mode[i].maxViewportX; info.viewport_ymax = mode[i].maxViewportY; info.viewport_flags = mode[i].viewportFlags; info.reserved1 = mode[i].reserved1; info.reserved2 = mode[i].reserved2; WriteToClient(client, sz_xXDGAModeInfo, (char *) (&info)); WriteToClient(client, size, mode[i].name); } free(mode); return Success; } static void DGAClientStateChange(CallbackListPtr *pcbl, void *nulldata, void *calldata) { NewClientInfoRec *pci = (NewClientInfoRec *) calldata; ClientPtr client = NULL; int i; for (i = 0; i < screenInfo.numScreens; i++) { if (DGA_GETCLIENT(i) == pci->client) { client = pci->client; break; } } if (client && ((client->clientState == ClientStateGone) || (client->clientState == ClientStateRetained))) { XDGAModeRec mode; PixmapPtr pPix; DGA_SETCLIENT(i, NULL); DGASelectInput(i, NULL, 0); DGASetMode(i, 0, &mode, &pPix); if (--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } } static int ProcXDGASetMode(ClientPtr client) { REQUEST(xXDGASetModeReq); xXDGASetModeReply rep; XDGAModeRec mode; xXDGAModeInfo info; PixmapPtr pPix; ClientPtr owner; int size; REQUEST_SIZE_MATCH(xXDGASetModeReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; owner = DGA_GETCLIENT(stuff->screen); rep.type = X_Reply; rep.length = 0; rep.offset = 0; rep.flags = 0; rep.sequenceNumber = client->sequence; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; if (owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if (!stuff->mode) { if (owner) { if (--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } DGA_SETCLIENT(stuff->screen, NULL); DGASelectInput(stuff->screen, NULL, 0); DGASetMode(stuff->screen, 0, &mode, &pPix); WriteToClient(client, sz_xXDGASetModeReply, (char *) &rep); return Success; } if (Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) return BadValue; if (!owner) { if (DGACallbackRefCount++ == 0) AddCallback(&ClientStateCallback, DGAClientStateChange, NULL); } DGA_SETCLIENT(stuff->screen, client); if (pPix) { if (AddResource(stuff->pid, RT_PIXMAP, (void *) (pPix))) { pPix->drawable.id = (int) stuff->pid; rep.flags = DGA_PIXMAP_AVAILABLE; } } size = strlen(mode.name) + 1; info.byte_order = mode.byteOrder; info.depth = mode.depth; info.num = mode.num; info.bpp = mode.bitsPerPixel; info.name_size = (size + 3) & ~3L; info.vsync_num = mode.VSync_num; info.vsync_den = mode.VSync_den; info.flags = mode.flags; info.image_width = mode.imageWidth; info.image_height = mode.imageHeight; info.pixmap_width = mode.pixmapWidth; info.pixmap_height = mode.pixmapHeight; info.bytes_per_scanline = mode.bytesPerScanline; info.red_mask = mode.red_mask; info.green_mask = mode.green_mask; info.blue_mask = mode.blue_mask; info.visual_class = mode.visualClass; info.viewport_width = mode.viewportWidth; info.viewport_height = mode.viewportHeight; info.viewport_xstep = mode.xViewportStep; info.viewport_ystep = mode.yViewportStep; info.viewport_xmax = mode.maxViewportX; info.viewport_ymax = mode.maxViewportY; info.viewport_flags = mode.viewportFlags; info.reserved1 = mode.reserved1; info.reserved2 = mode.reserved2; rep.length = bytes_to_int32(sz_xXDGAModeInfo + info.name_size); WriteToClient(client, sz_xXDGASetModeReply, (char *) &rep); WriteToClient(client, sz_xXDGAModeInfo, (char *) (&info)); WriteToClient(client, size, mode.name); return Success; } static int ProcXDGASetViewport(ClientPtr client) { REQUEST(xXDGASetViewportReq); REQUEST_SIZE_MATCH(xXDGASetViewportReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags); return Success; } static int ProcXDGAInstallColormap(ClientPtr client) { ColormapPtr cmap; int rc; REQUEST(xXDGAInstallColormapReq); REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; rc = dixLookupResourceByType((void **) &cmap, stuff->cmap, RT_COLORMAP, client, DixInstallAccess); if (rc != Success) return rc; DGAInstallCmap(cmap); return Success; } static int ProcXDGASelectInput(ClientPtr client) { REQUEST(xXDGASelectInputReq); REQUEST_SIZE_MATCH(xXDGASelectInputReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (DGA_GETCLIENT(stuff->screen) == client) DGASelectInput(stuff->screen, client, stuff->mask); return Success; } static int ProcXDGAFillRectangle(ClientPtr client) { REQUEST(xXDGAFillRectangleReq); REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (Success != DGAFillRect(stuff->screen, stuff->x, stuff->y, stuff->width, stuff->height, stuff->color)) return BadMatch; return Success; } static int ProcXDGACopyArea(ClientPtr client) { REQUEST(xXDGACopyAreaReq); REQUEST_SIZE_MATCH(xXDGACopyAreaReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (Success != DGABlitRect(stuff->screen, stuff->srcx, stuff->srcy, stuff->width, stuff->height, stuff->dstx, stuff->dsty)) return BadMatch; return Success; } static int ProcXDGACopyTransparentArea(ClientPtr client) { REQUEST(xXDGACopyTransparentAreaReq); REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (Success != DGABlitTransRect(stuff->screen, stuff->srcx, stuff->srcy, stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key)) return BadMatch; return Success; } static int ProcXDGAGetViewportStatus(ClientPtr client) { REQUEST(xXDGAGetViewportStatusReq); xXDGAGetViewportStatusReply rep; REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.status = DGAGetViewportStatus(stuff->screen); WriteToClient(client, sizeof(xXDGAGetViewportStatusReply), (char *) &rep); return Success; } static int ProcXDGASync(ClientPtr client) { REQUEST(xXDGASyncReq); xXDGASyncReply rep; REQUEST_SIZE_MATCH(xXDGASyncReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; DGASync(stuff->screen); WriteToClient(client, sizeof(xXDGASyncReply), (char *) &rep); return Success; } static int ProcXDGASetClientVersion(ClientPtr client) { REQUEST(xXDGASetClientVersionReq); DGAPrivPtr pPriv; REQUEST_SIZE_MATCH(xXDGASetClientVersionReq); if ((pPriv = DGA_GETPRIV(client)) == NULL) { pPriv = malloc(sizeof(DGAPrivRec)); /* XXX Need to look into freeing this */ if (!pPriv) return BadAlloc; DGA_SETPRIV(client, pPriv); } pPriv->major = stuff->major; pPriv->minor = stuff->minor; return Success; } static int ProcXDGAChangePixmapMode(ClientPtr client) { REQUEST(xXDGAChangePixmapModeReq); xXDGAChangePixmapModeReply rep; int x, y; REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; x = stuff->x; y = stuff->y; if (!DGAChangePixmapMode(stuff->screen, &x, &y, stuff->flags)) return BadMatch; rep.x = x; rep.y = y; WriteToClient(client, sizeof(xXDGAChangePixmapModeReply), (char *) &rep); return Success; } static int ProcXDGACreateColormap(ClientPtr client) { REQUEST(xXDGACreateColormapReq); int result; REQUEST_SIZE_MATCH(xXDGACreateColormapReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (!stuff->mode) return BadValue; result = DGACreateColormap(stuff->screen, client, stuff->id, stuff->mode, stuff->alloc); if (result != Success) return result; return Success; } /* * * Support for the old DGA protocol, used to live in xf86dga.c * */ #ifdef DGA_PROTOCOL_OLD_SUPPORT static int ProcXF86DGAGetVideoLL(ClientPtr client) { REQUEST(xXF86DGAGetVideoLLReq); xXF86DGAGetVideoLLReply rep; XDGAModeRec mode; int num, offset, flags; char *name; REQUEST_SIZE_MATCH(xXF86DGAGetVideoLLReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; if (!(num = DGAGetOldDGAMode(stuff->screen))) return DGAErrorBase + XF86DGANoDirectVideoMode; /* get the parameters for the mode that best matches */ DGAGetModeInfo(stuff->screen, &mode, num); if (!DGAOpenFramebuffer(stuff->screen, &name, (unsigned char **) (&rep.offset), (int *) (&rep.bank_size), &offset, &flags)) return BadAlloc; rep.offset += mode.offset; rep.width = mode.bytesPerScanline / (mode.bitsPerPixel >> 3); rep.ram_size = rep.bank_size >> 10; WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *) &rep); return Success; } static int ProcXF86DGADirectVideo(ClientPtr client) { int num; PixmapPtr pix; XDGAModeRec mode; ClientPtr owner; REQUEST(xXF86DGADirectVideoReq); REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; owner = DGA_GETCLIENT(stuff->screen); if (owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if (stuff->enable & XF86DGADirectGraphics) { if (!(num = DGAGetOldDGAMode(stuff->screen))) return DGAErrorBase + XF86DGANoDirectVideoMode; } else num = 0; if (Success != DGASetMode(stuff->screen, num, &mode, &pix)) return DGAErrorBase + XF86DGAScreenNotActive; DGASetInputMode(stuff->screen, (stuff->enable & XF86DGADirectKeyb) != 0, (stuff->enable & XF86DGADirectMouse) != 0); /* We need to track the client and attach the teardown callback */ if (stuff->enable & (XF86DGADirectGraphics | XF86DGADirectKeyb | XF86DGADirectMouse)) { if (!owner) { if (DGACallbackRefCount++ == 0) AddCallback(&ClientStateCallback, DGAClientStateChange, NULL); } DGA_SETCLIENT(stuff->screen, client); } else { if (owner) { if (--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } DGA_SETCLIENT(stuff->screen, NULL); } return Success; } static int ProcXF86DGAGetViewPortSize(ClientPtr client) { int num; XDGAModeRec mode; REQUEST(xXF86DGAGetViewPortSizeReq); xXF86DGAGetViewPortSizeReply rep; REQUEST_SIZE_MATCH(xXF86DGAGetViewPortSizeReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; if (!(num = DGAGetOldDGAMode(stuff->screen))) return DGAErrorBase + XF86DGANoDirectVideoMode; DGAGetModeInfo(stuff->screen, &mode, num); rep.width = mode.viewportWidth; rep.height = mode.viewportHeight; WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *) &rep); return Success; } static int ProcXF86DGASetViewPort(ClientPtr client) { REQUEST(xXF86DGASetViewPortReq); REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; if (!DGAActive(stuff->screen)) return DGAErrorBase + XF86DGADirectNotActivated; if (DGASetViewport(stuff->screen, stuff->x, stuff->y, DGA_FLIP_RETRACE) != Success) return DGAErrorBase + XF86DGADirectNotActivated; return Success; } static int ProcXF86DGAGetVidPage(ClientPtr client) { REQUEST(xXF86DGAGetVidPageReq); xXF86DGAGetVidPageReply rep; REQUEST_SIZE_MATCH(xXF86DGAGetVidPageReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.vpage = 0; /* silently fail */ WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *) &rep); return Success; } static int ProcXF86DGASetVidPage(ClientPtr client) { REQUEST(xXF86DGASetVidPageReq); REQUEST_SIZE_MATCH(xXF86DGASetVidPageReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; /* silently fail */ return Success; } static int ProcXF86DGAInstallColormap(ClientPtr client) { ColormapPtr pcmp; int rc; REQUEST(xXF86DGAInstallColormapReq); REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (!DGAActive(stuff->screen)) return DGAErrorBase + XF86DGADirectNotActivated; rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP, client, DixInstallAccess); if (rc == Success) { DGAInstallCmap(pcmp); return Success; } else { return rc; } } static int ProcXF86DGAQueryDirectVideo(ClientPtr client) { REQUEST(xXF86DGAQueryDirectVideoReq); xXF86DGAQueryDirectVideoReply rep; REQUEST_SIZE_MATCH(xXF86DGAQueryDirectVideoReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.flags = 0; if (DGAAvailable(stuff->screen)) rep.flags = XF86DGADirectPresent; WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *) &rep); return Success; } static int ProcXF86DGAViewPortChanged(ClientPtr client) { REQUEST(xXF86DGAViewPortChangedReq); xXF86DGAViewPortChangedReply rep; REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; if (!DGAActive(stuff->screen)) return DGAErrorBase + XF86DGADirectNotActivated; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.result = 1; WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *) &rep); return Success; } #endif /* DGA_PROTOCOL_OLD_SUPPORT */ static int _X_COLD SProcXDGADispatch(ClientPtr client) { return DGAErrorBase + XF86DGAClientNotLocal; } #if 0 #define DGA_REQ_DEBUG #endif #ifdef DGA_REQ_DEBUG static char *dgaMinor[] = { "QueryVersion", "GetVideoLL", "DirectVideo", "GetViewPortSize", "SetViewPort", "GetVidPage", "SetVidPage", "InstallColormap", "QueryDirectVideo", "ViewPortChanged", "10", "11", "QueryModes", "SetMode", "SetViewport", "InstallColormap", "SelectInput", "FillRectangle", "CopyArea", "CopyTransparentArea", "GetViewportStatus", "Sync", "OpenFramebuffer", "CloseFramebuffer", "SetClientVersion", "ChangePixmapMode", "CreateColormap", }; #endif static int ProcXDGADispatch(ClientPtr client) { REQUEST(xReq); if (!client->local) return DGAErrorBase + XF86DGAClientNotLocal; #ifdef DGA_REQ_DEBUG if (stuff->data <= X_XDGACreateColormap) fprintf(stderr, " DGA %s\n", dgaMinor[stuff->data]); #endif switch (stuff->data) { /* * DGA2 Protocol */ case X_XDGAQueryVersion: return ProcXDGAQueryVersion(client); case X_XDGAQueryModes: return ProcXDGAQueryModes(client); case X_XDGASetMode: return ProcXDGASetMode(client); case X_XDGAOpenFramebuffer: return ProcXDGAOpenFramebuffer(client); case X_XDGACloseFramebuffer: return ProcXDGACloseFramebuffer(client); case X_XDGASetViewport: return ProcXDGASetViewport(client); case X_XDGAInstallColormap: return ProcXDGAInstallColormap(client); case X_XDGASelectInput: return ProcXDGASelectInput(client); case X_XDGAFillRectangle: return ProcXDGAFillRectangle(client); case X_XDGACopyArea: return ProcXDGACopyArea(client); case X_XDGACopyTransparentArea: return ProcXDGACopyTransparentArea(client); case X_XDGAGetViewportStatus: return ProcXDGAGetViewportStatus(client); case X_XDGASync: return ProcXDGASync(client); case X_XDGASetClientVersion: return ProcXDGASetClientVersion(client); case X_XDGAChangePixmapMode: return ProcXDGAChangePixmapMode(client); case X_XDGACreateColormap: return ProcXDGACreateColormap(client); /* * Old DGA Protocol */ #ifdef DGA_PROTOCOL_OLD_SUPPORT case X_XF86DGAGetVideoLL: return ProcXF86DGAGetVideoLL(client); case X_XF86DGADirectVideo: return ProcXF86DGADirectVideo(client); case X_XF86DGAGetViewPortSize: return ProcXF86DGAGetViewPortSize(client); case X_XF86DGASetViewPort: return ProcXF86DGASetViewPort(client); case X_XF86DGAGetVidPage: return ProcXF86DGAGetVidPage(client); case X_XF86DGASetVidPage: return ProcXF86DGASetVidPage(client); case X_XF86DGAInstallColormap: return ProcXF86DGAInstallColormap(client); case X_XF86DGAQueryDirectVideo: return ProcXF86DGAQueryDirectVideo(client); case X_XF86DGAViewPortChanged: return ProcXF86DGAViewPortChanged(client); #endif /* DGA_PROTOCOL_OLD_SUPPORT */ default: return BadRequest; } } void XFree86DGAExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey(&DGAClientPrivateKeyRec, PRIVATE_CLIENT, 0)) return; if (!dixRegisterPrivateKey(&DGAScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return; if ((extEntry = AddExtension(XF86DGANAME, XF86DGANumberEvents, XF86DGANumberErrors, ProcXDGADispatch, SProcXDGADispatch, XDGAResetProc, StandardMinorOpcode))) { int i; DGAReqCode = (unsigned char) extEntry->base; DGAErrorBase = extEntry->errorBase; DGAEventBase = extEntry->eventBase; for (i = KeyPress; i <= MotionNotify; i++) SetCriticalEvent(DGAEventBase + i); } } xorg-server-21.1.16/hw/xfree86/common/xf86DPMS.c0000644000175000017500000000551114757411105014455 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the DPMS functions required by the extension. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "globals.h" #include "windowstr.h" #include "xf86.h" #include "xf86Priv.h" #ifdef DPMSExtension #include #include "dpmsproc.h" #endif #ifdef XSERVER_LIBPCIACCESS #include "xf86VGAarbiter.h" #endif #ifdef DPMSExtension static void xf86DPMS(ScreenPtr pScreen, int level) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (pScrn->DPMSSet && pScrn->vtSema) { xf86VGAarbiterLock(pScrn); pScrn->DPMSSet(pScrn, level, 0); xf86VGAarbiterUnlock(pScrn); } } #endif Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) { #ifdef DPMSExtension ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); void *DPMSOpt; MessageType enabled_from = X_DEFAULT; Bool enabled = TRUE; DPMSOpt = xf86FindOption(pScrn->options, "dpms"); if (DPMSDisabledSwitch) { enabled_from = X_CMDLINE; enabled = FALSE; } else if (DPMSOpt) { enabled_from = X_CONFIG; enabled = xf86CheckBoolOption(pScrn->options, "dpms", FALSE); xf86MarkOptionUsed(DPMSOpt); } if (enabled) { xf86DrvMsg(pScreen->myNum, enabled_from, "DPMS enabled\n"); pScrn->DPMSSet = set; pScreen->DPMS = xf86DPMS; } return TRUE; #else return FALSE; #endif } xorg-server-21.1.16/hw/xfree86/common/xf86Events.c0000644000175000017500000004337014757411105015163 /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * * 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 Thomas Roell not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Thomas Roell makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THOMAS ROELL 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 (c) 1994-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* [JCH-96/01/21] Extended std reverse map to four buttons. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSlib.h" #include #ifdef XFreeXDGA #include "dgaproc.h" #endif #include #include #include "inputstr.h" #include "xf86Xinput.h" #include "mi.h" #include "mipointer.h" #include "xkbsrv.h" #include "xkbstr.h" #ifdef DPMSExtension #include #include "dpmsproc.h" #endif #include "xf86platformBus.h" #include "systemd-logind.h" extern void (*xf86OSPMClose) (void); static void xf86VTSwitch(void); /* * Allow arbitrary drivers or other XFree86 code to register with our main * Wakeup handler. */ typedef struct x_IHRec { int fd; InputHandlerProc ihproc; void *data; Bool enabled; Bool is_input; struct x_IHRec *next; } IHRec, *IHPtr; static IHPtr InputHandlers = NULL; /* * TimeSinceLastInputEvent -- * Function used for screensaver purposes by the os module. Returns the * time in milliseconds since there last was any input. */ int TimeSinceLastInputEvent(void) { if (xf86Info.lastEventTime == 0) { xf86Info.lastEventTime = GetTimeInMillis(); } return GetTimeInMillis() - xf86Info.lastEventTime; } /* * SetTimeSinceLastInputEvent -- * Set the lastEventTime to now. */ void SetTimeSinceLastInputEvent(void) { xf86Info.lastEventTime = GetTimeInMillis(); } /* * ProcessInputEvents -- * Retrieve all waiting input events and pass them to DIX in their * correct chronological order. Only reads from the system pointer * and keyboard. */ void ProcessInputEvents(void) { int x, y; mieqProcessInputEvents(); /* FIXME: This is a problem if we have multiple pointers */ miPointerGetPosition(inputInfo.pointer, &x, &y); xf86SetViewport(xf86Info.currentScreen, x, y); } /* * Handle keyboard events that cause some kind of "action" * (i.e., server termination, video mode changes, VT switches, etc.) */ void xf86ProcessActionEvent(ActionEvent action, void *arg) { DebugF("ProcessActionEvent(%d,%p)\n", (int) action, arg); switch (action) { case ACTION_TERMINATE: if (!xf86Info.dontZap) { xf86Msg(X_INFO, "Server zapped. Shutting down.\n"); GiveUp(0); } break; case ACTION_NEXT_MODE: if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, 1); break; case ACTION_PREV_MODE: if (!xf86Info.dontZoom) xf86ZoomViewport(xf86Info.currentScreen, -1); break; case ACTION_SWITCHSCREEN: if (!xf86Info.dontVTSwitch && arg) { int vtno = *((int *) arg); if (vtno != xf86Info.vtno) { if (!xf86VTActivate(vtno)) { ErrorF("Failed to switch from vt%02d to vt%02d: %s\n", xf86Info.vtno, vtno, strerror(errno)); } } } break; case ACTION_SWITCHSCREEN_NEXT: if (!xf86Info.dontVTSwitch) { if (!xf86VTActivate(xf86Info.vtno + 1)) { /* If first try failed, assume this is the last VT and * try wrapping around to the first vt. */ if (!xf86VTActivate(1)) { ErrorF("Failed to switch from vt%02d to next vt: %s\n", xf86Info.vtno, strerror(errno)); } } } break; case ACTION_SWITCHSCREEN_PREV: if (!xf86Info.dontVTSwitch && xf86Info.vtno > 0) { if (!xf86VTActivate(xf86Info.vtno - 1)) { /* Don't know what the maximum VT is, so can't wrap around */ ErrorF("Failed to switch from vt%02d to previous vt: %s\n", xf86Info.vtno, strerror(errno)); } } break; default: break; } } /* * xf86Wakeup -- * Os wakeup handler. */ /* ARGSUSED */ void xf86Wakeup(void *blockData, int err) { if (xf86VTSwitchPending()) xf86VTSwitch(); } /* * xf86ReadInput -- * input thread handler */ static void xf86ReadInput(int fd, int ready, void *closure) { InputInfoPtr pInfo = closure; pInfo->read_input(pInfo); } /* * xf86AddEnabledDevice -- * */ void xf86AddEnabledDevice(InputInfoPtr pInfo) { InputThreadRegisterDev(pInfo->fd, xf86ReadInput, pInfo); } /* * xf86RemoveEnabledDevice -- * */ void xf86RemoveEnabledDevice(InputInfoPtr pInfo) { InputThreadUnregisterDev(pInfo->fd); } /* * xf86PrintBacktrace -- * Print a stack backtrace for debugging purposes. */ void xf86PrintBacktrace(void) { xorg_backtrace(); } static void xf86ReleaseKeys(DeviceIntPtr pDev) { KeyClassPtr keyc; int i; if (!pDev || !pDev->key) return; keyc = pDev->key; /* * Hmm... here is the biggest hack of every time ! * It may be possible that a switch-vt procedure has finished BEFORE * you released all keys necessary to do this. That peculiar behavior * can fool the X-server pretty much, cause it assumes that some keys * were not released. TWM may stuck almost completely.... * OK, what we are doing here is after returning from the vt-switch * explicitly unrelease all keyboard keys before the input-devices * are re-enabled. */ for (i = keyc->xkbInfo->desc->min_key_code; i < keyc->xkbInfo->desc->max_key_code; i++) { if (key_is_down(pDev, i, KEY_POSTED)) { input_lock(); QueueKeyboardEvents(pDev, KeyRelease, i); input_unlock(); } } } void xf86DisableInputDeviceForVTSwitch(InputInfoPtr pInfo) { if (!pInfo->dev) return; if (!pInfo->dev->enabled) pInfo->flags |= XI86_DEVICE_DISABLED; xf86ReleaseKeys(pInfo->dev); ProcessInputEvents(); DisableDevice(pInfo->dev, TRUE); } void xf86EnableInputDeviceForVTSwitch(InputInfoPtr pInfo) { if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0) EnableDevice(pInfo->dev, TRUE); pInfo->flags &= ~XI86_DEVICE_DISABLED; } /* * xf86UpdateHasVTProperty -- * Update a flag property on the root window to say whether the server VT * is currently the active one as some clients need to know this. */ static void xf86UpdateHasVTProperty(Bool hasVT) { Atom property_name; int32_t value = hasVT ? 1 : 0; int i; property_name = MakeAtom(HAS_VT_ATOM_NAME, sizeof(HAS_VT_ATOM_NAME) - 1, FALSE); if (property_name == BAD_RESOURCE) FatalError("Failed to retrieve \"HAS_VT\" atom\n"); for (i = 0; i < xf86NumScreens; i++) { dixChangeWindowProperty(serverClient, xf86ScrnToScreen(xf86Screens[i])->root, property_name, XA_INTEGER, 32, PropModeReplace, 1, &value, TRUE); } } void xf86VTLeave(void) { int i; InputInfoPtr pInfo; IHPtr ih; DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE)); #ifdef DPMSExtension if (DPMSPowerLevel != DPMSModeOn) DPMSSet(serverClient, DPMSModeOn); #endif for (i = 0; i < xf86NumScreens; i++) { if (!(dispatchException & DE_TERMINATE)) if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], FALSE); } /* * Keep the order: Disable Device > LeaveVT * EnterVT > EnableDevice */ for (ih = InputHandlers; ih; ih = ih->next) { if (ih->is_input) xf86DisableInputHandler(ih); else xf86DisableGeneralHandler(ih); } for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) xf86DisableInputDeviceForVTSwitch(pInfo); input_lock(); for (i = 0; i < xf86NumScreens; i++) xf86Screens[i]->LeaveVT(xf86Screens[i]); for (i = 0; i < xf86NumGPUScreens; i++) xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); if (systemd_logind_controls_session()) { systemd_logind_drop_master(); } if (!xf86VTSwitchAway()) goto switch_failed; if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; for (i = 0; i < xf86NumScreens; i++) { /* * zero all access functions to * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; } if (xorgHWAccess) xf86DisableIO(); xf86UpdateHasVTProperty(FALSE); return; switch_failed: DebugF("xf86VTSwitch: Leave failed\n"); for (i = 0; i < xf86NumScreens; i++) { if (!xf86Screens[i]->EnterVT(xf86Screens[i])) FatalError("EnterVT failed for screen %d\n", i); } for (i = 0; i < xf86NumGPUScreens; i++) { if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i])) FatalError("EnterVT failed for gpu screen %d\n", i); } if (!(dispatchException & DE_TERMINATE)) { for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE); } } dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) xf86EnableInputDeviceForVTSwitch(pInfo); for (ih = InputHandlers; ih; ih = ih->next) { if (ih->is_input) xf86EnableInputHandler(ih); else xf86EnableGeneralHandler(ih); } input_unlock(); } void xf86VTEnter(void) { int i; InputInfoPtr pInfo; IHPtr ih; DebugF("xf86VTSwitch: Entering\n"); if (!xf86VTSwitchTo()) return; xf86OSPMClose = xf86OSPMOpen(); if (xorgHWAccess) xf86EnableIO(); for (i = 0; i < xf86NumScreens; i++) { xf86Screens[i]->vtSema = TRUE; if (!xf86Screens[i]->EnterVT(xf86Screens[i])) FatalError("EnterVT failed for screen %d\n", i); } for (i = 0; i < xf86NumGPUScreens; i++) { xf86GPUScreens[i]->vtSema = TRUE; if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i])) FatalError("EnterVT failed for gpu screen %d\n", i); } for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE); } /* Turn screen saver off when switching back */ dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { /* Devices with server managed fds get enabled on logind resume */ if (!(pInfo->flags & XI86_SERVER_FD)) xf86EnableInputDeviceForVTSwitch(pInfo); } for (ih = InputHandlers; ih; ih = ih->next) { if (ih->is_input) xf86EnableInputHandler(ih); else xf86EnableGeneralHandler(ih); } #ifdef XSERVER_PLATFORM_BUS /* check for any new output devices */ xf86platformVTProbe(); #endif xf86UpdateHasVTProperty(TRUE); input_unlock(); } /* * xf86VTSwitch -- * Handle requests for switching the vt. */ static void xf86VTSwitch(void) { DebugF("xf86VTSwitch()\n"); #ifdef XFreeXDGA if (!DGAVTSwitch()) return; #endif /* * Since all screens are currently all in the same state it is sufficient * check the first. This might change in future. * * VTLeave is always handled here (VT_PROCESS guarantees this is safe), * if we use systemd_logind xf86VTEnter() gets called by systemd-logind.c * once it has resumed all drm nodes. */ if (xf86VTOwner()) xf86VTLeave(); else if (!systemd_logind_controls_session()) xf86VTEnter(); } /* Input handler registration */ static void xf86InputHandlerNotify(int fd, int ready, void *data) { IHPtr ih = data; if (ih->enabled && ih->fd >= 0 && ih->ihproc) { ih->ihproc(ih->fd, ih->data); } } static void * addInputHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih; if (fd < 0 || !proc) return NULL; ih = calloc(sizeof(*ih), 1); if (!ih) return NULL; ih->fd = fd; ih->ihproc = proc; ih->data = data; ih->enabled = TRUE; if (!SetNotifyFd(fd, xf86InputHandlerNotify, X_NOTIFY_READ, ih)) { free(ih); return NULL; } ih->next = InputHandlers; InputHandlers = ih; return ih; } void * xf86AddInputHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih = addInputHandler(fd, proc, data); if (ih) ih->is_input = TRUE; return ih; } void * xf86AddGeneralHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih = addInputHandler(fd, proc, data); return ih; } /** * Set the handler for the console's fd. Replaces (and returns) the previous * handler or NULL, whichever appropriate. * proc may be NULL if the server should not handle events on the console. */ InputHandlerProc xf86SetConsoleHandler(InputHandlerProc proc, void *data) { static IHPtr handler = NULL; InputHandlerProc old_proc = NULL; if (handler) { old_proc = handler->ihproc; xf86RemoveGeneralHandler(handler); } handler = xf86AddGeneralHandler(xf86Info.consoleFd, proc, data); return old_proc; } static void removeInputHandler(IHPtr ih) { IHPtr p; if (ih->fd >= 0) RemoveNotifyFd(ih->fd); if (ih == InputHandlers) InputHandlers = ih->next; else { p = InputHandlers; while (p && p->next != ih) p = p->next; if (ih) p->next = ih->next; } free(ih); } int xf86RemoveInputHandler(void *handler) { IHPtr ih; int fd; if (!handler) return -1; ih = handler; fd = ih->fd; removeInputHandler(ih); return fd; } int xf86RemoveGeneralHandler(void *handler) { IHPtr ih; int fd; if (!handler) return -1; ih = handler; fd = ih->fd; removeInputHandler(ih); return fd; } void xf86DisableInputHandler(void *handler) { IHPtr ih; if (!handler) return; ih = handler; ih->enabled = FALSE; if (ih->fd >= 0) RemoveNotifyFd(ih->fd); } void xf86DisableGeneralHandler(void *handler) { IHPtr ih; if (!handler) return; ih = handler; ih->enabled = FALSE; if (ih->fd >= 0) RemoveNotifyFd(ih->fd); } void xf86EnableInputHandler(void *handler) { IHPtr ih; if (!handler) return; ih = handler; ih->enabled = TRUE; if (ih->fd >= 0) SetNotifyFd(ih->fd, xf86InputHandlerNotify, X_NOTIFY_READ, ih); } void xf86EnableGeneralHandler(void *handler) { IHPtr ih; if (!handler) return; ih = handler; ih->enabled = TRUE; if (ih->fd >= 0) SetNotifyFd(ih->fd, xf86InputHandlerNotify, X_NOTIFY_READ, ih); } void DDXRingBell(int volume, int pitch, int duration) { xf86OSRingBell(volume, pitch, duration); } Bool xf86VTOwner(void) { /* at system startup xf86Screens[0] won't be set - but we will own the VT */ if (xf86NumScreens == 0) return TRUE; return xf86Screens[0]->vtSema; } xorg-server-21.1.16/hw/xfree86/common/xf86Globals.c0000644000175000017500000001470314757411105015300 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains all the XFree86 global variables. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "windowstr.h" #include "propertyst.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86Parser.h" #include "xf86Xinput.h" #include "xf86InPriv.h" #include "xf86Config.h" /* Globals that video drivers may access */ DevPrivateKeyRec xf86CreateRootWindowKeyRec; DevPrivateKeyRec xf86ScreenKeyRec; ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ ScrnInfoPtr *xf86GPUScreens = NULL; /* List of ScrnInfos */ int xf86DRMMasterFd = -1; /* Command line argument for DRM master file descriptor */ const unsigned char byte_reversed[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff, }; /* Globals that input drivers may access */ InputInfoPtr xf86InputDevs = NULL; /* Globals that video drivers may not access */ xf86InfoRec xf86Info = { .consoleFd = -1, .vtno = -1, .lastEventTime = -1, .vtRequestsPending = FALSE, #ifdef __sun .vtPendingNum = -1, #endif .dontVTSwitch = FALSE, .autoVTSwitch = TRUE, .ShareVTs = FALSE, .dontZap = FALSE, .dontZoom = FALSE, .currentScreen = NULL, #ifdef CSRG_BASED .consType = -1, #endif .allowMouseOpenFail = FALSE, .vidModeEnabled = TRUE, .vidModeAllowNonLocal = FALSE, .miscModInDevEnabled = TRUE, .miscModInDevAllowNonLocal = FALSE, .pmFlag = TRUE, #if defined(CONFIG_HAL) || defined(CONFIG_UDEV) || defined(CONFIG_WSCONS) .forceInputDevices = FALSE, .autoAddDevices = TRUE, .autoEnableDevices = TRUE, #else .forceInputDevices = TRUE, .autoAddDevices = FALSE, .autoEnableDevices = FALSE, #endif #if defined(CONFIG_UDEV_KMS) .autoAddGPU = TRUE, #else .autoAddGPU = FALSE, #endif .autoBindGPU = TRUE, }; const char *xf86ConfigFile = NULL; const char *xf86ConfigDir = NULL; const char *xf86ModulePath = DEFAULT_MODULE_PATH; MessageType xf86ModPathFrom = X_DEFAULT; const char *xf86LogFile = DEFAULT_LOGDIR "/" DEFAULT_LOGPREFIX; MessageType xf86LogFileFrom = X_DEFAULT; Bool xf86LogFileWasOpened = FALSE; serverLayoutRec xf86ConfigLayout = { NULL, }; confDRIRec xf86ConfigDRI = { 0, }; XF86ConfigPtr xf86configptr = NULL; Bool xf86Resetting = FALSE; Bool xf86Initialising = FALSE; Bool xf86DoConfigure = FALSE; Bool xf86ProbeIgnorePrimary = FALSE; Bool xf86DoShowOptions = FALSE; DriverPtr *xf86DriverList = NULL; int xf86NumDrivers = 0; InputDriverPtr *xf86InputDriverList = NULL; int xf86NumInputDrivers = 0; int xf86NumScreens = 0; int xf86NumGPUScreens = 0; const char *xf86VisualNames[] = { "StaticGray", "GrayScale", "StaticColor", "PseudoColor", "TrueColor", "DirectColor" }; /* Parameters set only from the command line */ Bool xf86fpFlag = FALSE; Bool xf86sFlag = FALSE; Bool xf86bsEnableFlag = FALSE; Bool xf86bsDisableFlag = FALSE; Bool xf86silkenMouseDisableFlag = FALSE; Bool xf86xkbdirFlag = FALSE; #ifdef HAVE_ACPI Bool xf86acpiDisableFlag = FALSE; #endif char *xf86LayoutName = NULL; char *xf86ScreenName = NULL; char *xf86PointerName = NULL; char *xf86KeyboardName = NULL; int xf86Verbose = DEFAULT_VERBOSE; int xf86LogVerbose = DEFAULT_LOG_VERBOSE; int xf86FbBpp = -1; int xf86Depth = -1; rgb xf86Weight = { 0, 0, 0 }; Gamma xf86Gamma = { 0.0, 0.0, 0.0 }; Bool xf86AllowMouseOpenFail = FALSE; Bool xf86AutoBindGPUDisabled = FALSE; #ifdef XF86VIDMODE Bool xf86VidModeDisabled = FALSE; Bool xf86VidModeAllowNonLocal = FALSE; #endif Bool xorgHWAccess = FALSE; xorg-server-21.1.16/hw/xfree86/common/xf86AutoConfig.c0000644000175000017500000003114414757411105015751 /* * Copyright 2003 by David H. Dawes. * Copyright 2003 by X-Oz Technologies. * All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). * * Author: David Dawes . */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "xf86Config.h" #include "xf86MatchDrivers.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86platformBus.h" #include "xf86pciBus.h" #ifdef __sparc__ #include "xf86sbusBus.h" #endif #ifdef __sun #include #include #endif /* Sections for the default built-in configuration. */ #define BUILTIN_DEVICE_NAME \ "\"Builtin Default %s Device %d\"" #define BUILTIN_DEVICE_SECTION_PRE \ "Section \"Device\"\n" \ "\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \ "\tDriver\t\"%s\"\n" #define BUILTIN_DEVICE_SECTION_POST \ "EndSection\n\n" #define BUILTIN_DEVICE_SECTION \ BUILTIN_DEVICE_SECTION_PRE \ BUILTIN_DEVICE_SECTION_POST #define BUILTIN_SCREEN_NAME \ "\"Builtin Default %s Screen %d\"" #define BUILTIN_SCREEN_SECTION \ "Section \"Screen\"\n" \ "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \ "EndSection\n\n" #define BUILTIN_LAYOUT_SECTION_PRE \ "Section \"ServerLayout\"\n" \ "\tIdentifier\t\"Builtin Default Layout\"\n" #define BUILTIN_LAYOUT_SCREEN_LINE \ "\tScreen\t" BUILTIN_SCREEN_NAME "\n" #define BUILTIN_LAYOUT_SECTION_POST \ "EndSection\n\n" static const char **builtinConfig = NULL; static int builtinLines = 0; static void listPossibleVideoDrivers(XF86MatchedDrivers *md); /* * A built-in config file is stored as an array of strings, with each string * representing a single line. AppendToConfig() breaks up the string "s" * into lines, and appends those lines it to builtinConfig. */ static void AppendToList(const char *s, const char ***list, int *lines) { char *str, *newstr, *p; str = xnfstrdup(s); for (p = strtok(str, "\n"); p; p = strtok(NULL, "\n")) { (*lines)++; *list = xnfreallocarray(*list, *lines + 1, sizeof(**list)); newstr = xnfalloc(strlen(p) + 2); strcpy(newstr, p); strcat(newstr, "\n"); (*list)[*lines - 1] = newstr; (*list)[*lines] = NULL; } free(str); } static void FreeList(const char ***list, int *lines) { int i; for (i = 0; i < *lines; i++) { free((char *) ((*list)[i])); } free(*list); *list = NULL; *lines = 0; } static void FreeConfig(void) { FreeList(&builtinConfig, &builtinLines); } static void AppendToConfig(const char *s) { AppendToList(s, &builtinConfig, &builtinLines); } void xf86AddMatchedDriver(XF86MatchedDrivers *md, const char *driver) { int j; int nmatches = md->nmatches; for (j = 0; j < nmatches; ++j) { if (xf86NameCmp(md->matches[j], driver) == 0) { // Driver already in matched drivers return; } } if (nmatches < MATCH_DRIVERS_LIMIT) { md->matches[nmatches] = xnfstrdup(driver); md->nmatches++; } else { xf86Msg(X_WARNING, "Too many drivers registered, can't add %s\n", driver); } } Bool xf86AutoConfig(void) { XF86MatchedDrivers md; int i; const char **cp; char buf[1024]; ConfigStatus ret; /* Make sure config rec is there */ if (xf86allocateConfig() != NULL) { ret = CONFIG_OK; /* OK so far */ } else { xf86Msg(X_ERROR, "Couldn't allocate Config record.\n"); return FALSE; } listPossibleVideoDrivers(&md); for (i = 0; i < md.nmatches; i++) { snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, md.matches[i], 0, md.matches[i]); AppendToConfig(buf); snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, md.matches[i], 0, md.matches[i], 0); AppendToConfig(buf); } AppendToConfig(BUILTIN_LAYOUT_SECTION_PRE); for (i = 0; i < md.nmatches; i++) { snprintf(buf, sizeof(buf), BUILTIN_LAYOUT_SCREEN_LINE, md.matches[i], 0); AppendToConfig(buf); } AppendToConfig(BUILTIN_LAYOUT_SECTION_POST); for (i = 0; i < md.nmatches; i++) { free(md.matches[i]); } xf86MsgVerb(X_DEFAULT, 0, "Using default built-in configuration (%d lines)\n", builtinLines); xf86MsgVerb(X_DEFAULT, 3, "--- Start of built-in configuration ---\n"); for (cp = builtinConfig; *cp; cp++) xf86ErrorFVerb(3, "\t%s", *cp); xf86MsgVerb(X_DEFAULT, 3, "--- End of built-in configuration ---\n"); xf86initConfigFiles(); xf86setBuiltinConfig(builtinConfig); ret = xf86HandleConfigFile(TRUE); FreeConfig(); if (ret != CONFIG_OK) xf86Msg(X_ERROR, "Error parsing the built-in default configuration.\n"); return ret == CONFIG_OK; } static void listPossibleVideoDrivers(XF86MatchedDrivers *md) { md->nmatches = 0; #ifdef XSERVER_PLATFORM_BUS xf86PlatformMatchDriver(md); #endif #ifdef __sun /* Check for driver type based on /dev/fb type and if valid, use it instead of PCI bus probe results */ if (xf86Info.consoleFd >= 0) { struct vis_identifier visid; const char *cp; int iret; SYSCALL(iret = ioctl(xf86Info.consoleFd, VIS_GETIDENTIFIER, &visid)); if (iret < 0) { int fbfd; fbfd = open(xf86SolarisFbDev, O_RDONLY); if (fbfd >= 0) { SYSCALL(iret = ioctl(fbfd, VIS_GETIDENTIFIER, &visid)); close(fbfd); } } if (iret < 0) { xf86Msg(X_WARNING, "could not get frame buffer identifier from %s\n", xf86SolarisFbDev); } else { xf86Msg(X_PROBED, "console driver: %s\n", visid.name); /* Special case from before the general case was set */ if (strcmp(visid.name, "NVDAnvda") == 0) { xf86AddMatchedDriver(md, "nvidia"); } /* General case - split into vendor name (initial all-caps prefix) & driver name (rest of the string). */ if (strcmp(visid.name, "SUNWtext") != 0) { for (cp = visid.name; (*cp != '\0') && isupper(*cp); cp++) { /* find end of all uppercase vendor section */ } if ((cp != visid.name) && (*cp != '\0')) { char *vendorName = xnfstrdup(visid.name); vendorName[cp - visid.name] = '\0'; xf86AddMatchedDriver(md, vendorName); xf86AddMatchedDriver(md, cp); free(vendorName); } } } } #endif #ifdef __sparc__ char *sbusDriver = sparcDriverName(); if (sbusDriver) xf86AddMatchedDriver(md, sbusDriver); #endif #ifdef XSERVER_LIBPCIACCESS xf86PciMatchDriver(md); #endif #if defined(__linux__) xf86AddMatchedDriver(md, "modesetting"); #endif #if !defined(__sun) /* Fallback to platform default frame buffer driver */ #if !defined(__linux__) && defined(__sparc__) xf86AddMatchedDriver(md, "wsfb"); #else xf86AddMatchedDriver(md, "fbdev"); #endif #endif /* !__sun */ /* Fallback to platform default hardware */ #if defined(__i386__) || defined(__amd64__) || defined(__hurd__) xf86AddMatchedDriver(md, "vesa"); #elif defined(__sparc__) && !defined(__sun) xf86AddMatchedDriver(md, "sunffb"); #endif } /* copy a screen section and enter the desired driver * and insert it at i in the list of screens */ static Bool copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver) { confScreenPtr nscreen; GDevPtr cptr = NULL; char *identifier; nscreen = malloc(sizeof(confScreenRec)); if (!nscreen) return FALSE; memcpy(nscreen, oscreen, sizeof(confScreenRec)); cptr = malloc(sizeof(GDevRec)); if (!cptr) { free(nscreen); return FALSE; } memcpy(cptr, odev, sizeof(GDevRec)); if (asprintf(&identifier, "Autoconfigured Video Device %s", driver) == -1) { free(cptr); free(nscreen); return FALSE; } cptr->driver = driver; cptr->identifier = identifier; xf86ConfigLayout.screens[i].screen = nscreen; /* now associate the new driver entry with the new screen entry */ xf86ConfigLayout.screens[i].screen->device = cptr; cptr->myScreenSection = xf86ConfigLayout.screens[i].screen; return TRUE; } GDevPtr autoConfigDevice(GDevPtr preconf_device) { GDevPtr ptr = NULL; XF86MatchedDrivers md; int num_screens = 0, i; screenLayoutPtr slp; if (!xf86configptr) { return NULL; } /* If there's a configured section with no driver chosen, use it */ if (preconf_device) { ptr = preconf_device; } else { ptr = calloc(1, sizeof(GDevRec)); if (!ptr) { return NULL; } ptr->chipID = -1; ptr->chipRev = -1; ptr->irq = -1; ptr->active = TRUE; ptr->claimed = FALSE; ptr->identifier = "Autoconfigured Video Device"; ptr->driver = NULL; } if (!ptr->driver) { /* get all possible video drivers and count them */ listPossibleVideoDrivers(&md); for (i = 0; i < md.nmatches; i++) { xf86Msg(X_DEFAULT, "Matched %s as autoconfigured driver %d\n", md.matches[i], i); } slp = xf86ConfigLayout.screens; if (slp) { /* count the number of screens and make space for * a new screen for each additional possible driver * minus one for the already existing first one * plus one for the terminating NULL */ for (; slp[num_screens].screen; num_screens++); xf86ConfigLayout.screens = xnfcalloc(num_screens + md.nmatches, sizeof(screenLayoutRec)); xf86ConfigLayout.screens[0] = slp[0]; /* do the first match and set that for the original first screen */ ptr->driver = md.matches[0]; if (!xf86ConfigLayout.screens[0].screen->device) { xf86ConfigLayout.screens[0].screen->device = ptr; ptr->myScreenSection = xf86ConfigLayout.screens[0].screen; } /* for each other driver found, copy the first screen, insert it * into the list of screens and set the driver */ for (i = 1; i < md.nmatches; i++) { if (!copyScreen(slp[0].screen, ptr, i, md.matches[i])) return NULL; } /* shift the rest of the original screen list * to the end of the current screen list * * TODO Handle rest of multiple screen sections */ for (i = 1; i < num_screens; i++) { xf86ConfigLayout.screens[i + md.nmatches] = slp[i]; } xf86ConfigLayout.screens[num_screens + md.nmatches - 1].screen = NULL; free(slp); } else { /* layout does not have any screens, not much to do */ ptr->driver = md.matches[0]; for (i = 1; i < md.nmatches; i++) { free(md.matches[i]); } } } xf86Msg(X_DEFAULT, "Assigned the driver to the xf86ConfigLayout\n"); return ptr; } xorg-server-21.1.16/hw/xfree86/common/xf86Option.c0000644000175000017500000005752514757411105015176 /* * Copyright (c) 1998-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * Author: David Dawes * * This file includes public option handling functions. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include "os.h" #include "xf86.h" #include "xf86Opt.h" #include "xf86Xinput.h" #include "xf86Optrec.h" #include "xf86Parser.h" #include "xf86platformBus.h" /* For OutputClass functions */ #include "optionstr.h" static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p, Bool markUsed); /* * xf86CollectOptions collects the options from each of the config file * sections used by the screen and puts the combined list in pScrn->options. * This function requires that the following have been initialised: * * pScrn->confScreen * pScrn->Entities[i]->device * pScrn->display * pScrn->monitor * * The extraOpts parameter may optionally contain a list of additional options * to include. * * The order of precedence for options is: * * extraOpts, display, confScreen, monitor, device, outputClassOptions */ void xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts) { XF86OptionPtr tmp; XF86OptionPtr extras = (XF86OptionPtr) extraOpts; GDevPtr device; int i; pScrn->options = NULL; for (i = pScrn->numEntities - 1; i >= 0; i--) { xf86MergeOutputClassOptions(pScrn->entityList[i], &pScrn->options); device = xf86GetDevFromEntity(pScrn->entityList[i], pScrn->entityInstanceList[i]); if (device && device->options) { tmp = xf86optionListDup(device->options); if (pScrn->options) pScrn->options = xf86optionListMerge(pScrn->options, tmp); else pScrn->options = tmp; } } if (pScrn->monitor->options) { tmp = xf86optionListDup(pScrn->monitor->options); if (pScrn->options) pScrn->options = xf86optionListMerge(pScrn->options, tmp); else pScrn->options = tmp; } if (pScrn->confScreen->options) { tmp = xf86optionListDup(pScrn->confScreen->options); if (pScrn->options) pScrn->options = xf86optionListMerge(pScrn->options, tmp); else pScrn->options = tmp; } if (pScrn->display->options) { tmp = xf86optionListDup(pScrn->display->options); if (pScrn->options) pScrn->options = xf86optionListMerge(pScrn->options, tmp); else pScrn->options = tmp; } if (extras) { tmp = xf86optionListDup(extras); if (pScrn->options) pScrn->options = xf86optionListMerge(pScrn->options, tmp); else pScrn->options = tmp; } } /* * xf86CollectInputOptions collects extra options for an InputDevice (other * than those added by the config backend). * The options are merged into the existing ones and thus take precedence * over the others. */ void xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts) { if (defaultOpts) { XF86OptionPtr tmp = xf86optionListCreate(defaultOpts, -1, 0); if (pInfo->options) pInfo->options = xf86optionListMerge(tmp, pInfo->options); else pInfo->options = tmp; } } /** * Duplicate the option list passed in. The returned pointer will be a newly * allocated option list and must be freed by the caller. */ XF86OptionPtr xf86OptionListDuplicate(XF86OptionPtr options) { XF86OptionPtr o = NULL; while (options) { o = xf86AddNewOption(o, xf86OptionName(options), xf86OptionValue(options)); options = xf86nextOption(options); } return o; } /* Created for new XInput stuff -- essentially extensions to the parser */ static int LookupIntOption(XF86OptionPtr optlist, const char *name, int deflt, Bool markUsed) { OptionInfoRec o; o.name = name; o.type = OPTV_INTEGER; if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.num; return deflt; } static double LookupRealOption(XF86OptionPtr optlist, const char *name, double deflt, Bool markUsed) { OptionInfoRec o; o.name = name; o.type = OPTV_REAL; if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.realnum; return deflt; } static char * LookupStrOption(XF86OptionPtr optlist, const char *name, const char *deflt, Bool markUsed) { OptionInfoRec o; o.name = name; o.type = OPTV_STRING; if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.str; if (deflt) return strdup(deflt); else return NULL; } static int LookupBoolOption(XF86OptionPtr optlist, const char *name, int deflt, Bool markUsed) { OptionInfoRec o; o.name = name; o.type = OPTV_BOOLEAN; if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.boolean; return deflt; } static double LookupPercentOption(XF86OptionPtr optlist, const char *name, double deflt, Bool markUsed) { OptionInfoRec o; o.name = name; o.type = OPTV_PERCENT; if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.realnum; return deflt; } /* These xf86Set* functions are intended for use by non-screen specific code */ int xf86SetIntOption(XF86OptionPtr optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, TRUE); } double xf86SetRealOption(XF86OptionPtr optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, TRUE); } char * xf86SetStrOption(XF86OptionPtr optlist, const char *name, const char *deflt) { return LookupStrOption(optlist, name, deflt, TRUE); } int xf86SetBoolOption(XF86OptionPtr optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, TRUE); } double xf86SetPercentOption(XF86OptionPtr optlist, const char *name, double deflt) { return LookupPercentOption(optlist, name, deflt, TRUE); } /* * These are like the Set*Option functions, but they don't mark the options * as used. */ int xf86CheckIntOption(XF86OptionPtr optlist, const char *name, int deflt) { return LookupIntOption(optlist, name, deflt, FALSE); } double xf86CheckRealOption(XF86OptionPtr optlist, const char *name, double deflt) { return LookupRealOption(optlist, name, deflt, FALSE); } char * xf86CheckStrOption(XF86OptionPtr optlist, const char *name, const char *deflt) { return LookupStrOption(optlist, name, deflt, FALSE); } int xf86CheckBoolOption(XF86OptionPtr optlist, const char *name, int deflt) { return LookupBoolOption(optlist, name, deflt, FALSE); } double xf86CheckPercentOption(XF86OptionPtr optlist, const char *name, double deflt) { return LookupPercentOption(optlist, name, deflt, FALSE); } /* * xf86AddNewOption() has the required property of replacing the option value * if the option is already present. */ XF86OptionPtr xf86ReplaceIntOption(XF86OptionPtr optlist, const char *name, const int val) { char tmp[16]; snprintf(tmp, sizeof(tmp), "%i", val); return xf86AddNewOption(optlist, name, tmp); } XF86OptionPtr xf86ReplaceRealOption(XF86OptionPtr optlist, const char *name, const double val) { char tmp[32]; snprintf(tmp, sizeof(tmp), "%f", val); return xf86AddNewOption(optlist, name, tmp); } XF86OptionPtr xf86ReplaceBoolOption(XF86OptionPtr optlist, const char *name, const Bool val) { return xf86AddNewOption(optlist, name, val ? "True" : "False"); } XF86OptionPtr xf86ReplacePercentOption(XF86OptionPtr optlist, const char *name, const double val) { char tmp[16]; snprintf(tmp, sizeof(tmp), "%lf%%", val); return xf86AddNewOption(optlist, name, tmp); } XF86OptionPtr xf86ReplaceStrOption(XF86OptionPtr optlist, const char *name, const char *val) { return xf86AddNewOption(optlist, name, val); } XF86OptionPtr xf86AddNewOption(XF86OptionPtr head, const char *name, const char *val) { /* XXX These should actually be allocated in the parser library. */ char *tmp = val ? strdup(val) : NULL; char *tmp_name = strdup(name); return xf86addNewOption(head, tmp_name, tmp); } XF86OptionPtr xf86NewOption(char *name, char *value) { return xf86newOption(name, value); } XF86OptionPtr xf86NextOption(XF86OptionPtr list) { return xf86nextOption(list); } XF86OptionPtr xf86OptionListCreate(const char **options, int count, int used) { return xf86optionListCreate(options, count, used); } XF86OptionPtr xf86OptionListMerge(XF86OptionPtr head, XF86OptionPtr tail) { return xf86optionListMerge(head, tail); } void xf86OptionListFree(XF86OptionPtr opt) { xf86optionListFree(opt); } char * xf86OptionName(XF86OptionPtr opt) { return xf86optionName(opt); } char * xf86OptionValue(XF86OptionPtr opt) { return xf86optionValue(opt); } void xf86OptionListReport(XF86OptionPtr parm) { XF86OptionPtr opts = parm; while (opts) { if (xf86optionValue(opts)) xf86ErrorFVerb(5, "\tOption \"%s\" \"%s\"\n", xf86optionName(opts), xf86optionValue(opts)); else xf86ErrorFVerb(5, "\tOption \"%s\"\n", xf86optionName(opts)); opts = xf86nextOption(opts); } } /* End of XInput-caused section */ XF86OptionPtr xf86FindOption(XF86OptionPtr options, const char *name) { return xf86findOption(options, name); } const char * xf86FindOptionValue(XF86OptionPtr options, const char *name) { return xf86findOptionValue(options, name); } void xf86MarkOptionUsed(XF86OptionPtr option) { if (option != NULL) option->opt_used = TRUE; } void xf86MarkOptionUsedByName(XF86OptionPtr options, const char *name) { XF86OptionPtr opt; opt = xf86findOption(options, name); if (opt != NULL) opt->opt_used = TRUE; } Bool xf86CheckIfOptionUsed(XF86OptionPtr option) { if (option != NULL) return option->opt_used; else return FALSE; } Bool xf86CheckIfOptionUsedByName(XF86OptionPtr options, const char *name) { XF86OptionPtr opt; opt = xf86findOption(options, name); if (opt != NULL) return opt->opt_used; else return FALSE; } void xf86ShowUnusedOptions(int scrnIndex, XF86OptionPtr opt) { while (opt) { if (opt->opt_name && !opt->opt_used) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" is not used\n", opt->opt_name); } opt = opt->list.next; } } static Bool GetBoolValue(OptionInfoPtr p, const char *s) { return xf86getBoolValue(&p->value.boolean, s); } static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p, Bool markUsed) { const char *s; char *end; Bool wasUsed = FALSE; if ((s = xf86findOptionValue(options, p->name)) != NULL) { if (markUsed) { wasUsed = xf86CheckIfOptionUsedByName(options, p->name); xf86MarkOptionUsedByName(options, p->name); } switch (p->type) { case OPTV_INTEGER: if (*s == '\0') { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires an integer value\n", p->name); } p->found = FALSE; } else { p->value.num = strtoul(s, &end, 0); if (*end == '\0') { p->found = TRUE; } else { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires an integer value\n", p->name); } p->found = FALSE; } } break; case OPTV_STRING: if (*s == '\0') { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a string value\n", p->name); } p->found = FALSE; } else { p->value.str = s; p->found = TRUE; } break; case OPTV_ANYSTR: p->value.str = s; p->found = TRUE; break; case OPTV_REAL: if (*s == '\0') { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a floating point " "value\n", p->name); } p->found = FALSE; } else { p->value.realnum = strtod(s, &end); if (*end == '\0') { p->found = TRUE; } else { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a floating point " "value\n", p->name); } p->found = FALSE; } } break; case OPTV_BOOLEAN: if (GetBoolValue(p, s)) { p->found = TRUE; } else { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a boolean value\n", p->name); } p->found = FALSE; } break; case OPTV_PERCENT: { char tmp = 0; /* awkward match, but %% doesn't increase the match counter, * hence 100 looks the same as 100% to the caller of sccanf */ if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != '%') { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a percent value\n", p->name); } p->found = FALSE; } else { p->found = TRUE; } } break; case OPTV_FREQ: if (*s == '\0') { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); } p->found = FALSE; } else { double freq = strtod(s, &end); int units = 0; if (end != s) { p->found = TRUE; if (!xf86NameCmp(end, "Hz")) units = 1; else if (!xf86NameCmp(end, "kHz") || !xf86NameCmp(end, "k")) units = 1000; else if (!xf86NameCmp(end, "MHz") || !xf86NameCmp(end, "M")) units = 1000000; else { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); } p->found = FALSE; } if (p->found) freq *= (double) units; } else { if (markUsed) { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); } p->found = FALSE; } if (p->found) { p->value.freq.freq = freq; p->value.freq.units = units; } } break; case OPTV_NONE: /* Should never get here */ p->found = FALSE; break; } if (p->found && markUsed) { int verb = 2; if (wasUsed) verb = 4; xf86DrvMsgVerb(scrnIndex, X_CONFIG, verb, "Option \"%s\"", p->name); if (!(p->type == OPTV_BOOLEAN && *s == 0)) { xf86ErrorFVerb(verb, " \"%s\"", s); } xf86ErrorFVerb(verb, "\n"); } } else if (p->type == OPTV_BOOLEAN) { /* Look for matches with options with or without a "No" prefix. */ char *n, *newn; OptionInfoRec opt; n = xf86NormalizeName(p->name); if (!n) { p->found = FALSE; return FALSE; } if (strncmp(n, "no", 2) == 0) { newn = n + 2; } else { free(n); if (asprintf(&n, "No%s", p->name) == -1) { p->found = FALSE; return FALSE; } newn = n; } if ((s = xf86findOptionValue(options, newn)) != NULL) { if (markUsed) xf86MarkOptionUsedByName(options, newn); if (GetBoolValue(&opt, s)) { p->value.boolean = !opt.value.boolean; p->found = TRUE; } else { xf86DrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a boolean value\n", newn); p->found = FALSE; } } else { p->found = FALSE; } if (p->found && markUsed) { xf86DrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn); if (*s != 0) { xf86ErrorFVerb(2, " \"%s\"", s); } xf86ErrorFVerb(2, "\n"); } free(n); } else { p->found = FALSE; } return p->found; } void xf86ProcessOptions(int scrnIndex, XF86OptionPtr options, OptionInfoPtr optinfo) { OptionInfoPtr p; for (p = optinfo; p->name != NULL; p++) { ParseOptionValue(scrnIndex, options, p, TRUE); } } OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec * table, int token) { const OptionInfoRec *p, *match = NULL, *set = NULL; if (!table) { ErrorF("xf86TokenToOptinfo: table is NULL\n"); return NULL; } for (p = table; p->token >= 0; p++) { if (p->token == token) { match = p; if (p->found) set = p; } } if (set) return (OptionInfoPtr) set; else if (match) return (OptionInfoPtr) match; else return NULL; } const char * xf86TokenToOptName(const OptionInfoRec * table, int token) { const OptionInfoRec *p; p = xf86TokenToOptinfo(table, token); return p ? p->name : NULL; } Bool xf86IsOptionSet(const OptionInfoRec * table, int token) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); return p && p->found; } const char * xf86GetOptValString(const OptionInfoRec * table, int token) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) return p->value.str; else return NULL; } Bool xf86GetOptValInteger(const OptionInfoRec * table, int token, int *value) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { *value = p->value.num; return TRUE; } else return FALSE; } Bool xf86GetOptValULong(const OptionInfoRec * table, int token, unsigned long *value) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { *value = p->value.num; return TRUE; } else return FALSE; } Bool xf86GetOptValReal(const OptionInfoRec * table, int token, double *value) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { *value = p->value.realnum; return TRUE; } else return FALSE; } Bool xf86GetOptValFreq(const OptionInfoRec * table, int token, OptFreqUnits expectedUnits, double *value) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { if (p->value.freq.units > 0) { /* Units give, so the scaling is known. */ switch (expectedUnits) { case OPTUNITS_HZ: *value = p->value.freq.freq; break; case OPTUNITS_KHZ: *value = p->value.freq.freq / 1000.0; break; case OPTUNITS_MHZ: *value = p->value.freq.freq / 1000000.0; break; } } else { /* No units given, so try to guess the scaling. */ switch (expectedUnits) { case OPTUNITS_HZ: *value = p->value.freq.freq; break; case OPTUNITS_KHZ: if (p->value.freq.freq > 1000.0) *value = p->value.freq.freq / 1000.0; else *value = p->value.freq.freq; break; case OPTUNITS_MHZ: if (p->value.freq.freq > 1000000.0) *value = p->value.freq.freq / 1000000.0; else if (p->value.freq.freq > 1000.0) *value = p->value.freq.freq / 1000.0; else *value = p->value.freq.freq; } } return TRUE; } else return FALSE; } Bool xf86GetOptValBool(const OptionInfoRec * table, int token, Bool *value) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { *value = p->value.boolean; return TRUE; } else return FALSE; } Bool xf86ReturnOptValBool(const OptionInfoRec * table, int token, Bool def) { OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); if (p && p->found) { return p->value.boolean; } else return def; } int xf86NameCmp(const char *s1, const char *s2) { return xf86nameCompare(s1, s2); } char * xf86NormalizeName(const char *s) { char *ret, *q; const char *p; if (s == NULL) return NULL; ret = malloc(strlen(s) + 1); for (p = s, q = ret; *p != 0; p++) { switch (*p) { case '_': case ' ': case '\t': continue; default: if (isupper(*p)) *q++ = tolower(*p); else *q++ = *p; } } *q = '\0'; return ret; } xorg-server-21.1.16/hw/xfree86/common/xf86Init.c0000644000175000017500000012130014757411105014610 /* * Loosely based on code bearing the following copyright: * * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. */ /* * Copyright (c) 1992-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #undef HAS_UTSNAME #if !defined(WIN32) #define HAS_UTSNAME 1 #include #endif #include #include #include #include #include "input.h" #include "servermd.h" #include "windowstr.h" #include "scrnintstr.h" #include "mi.h" #include "dbus-core.h" #include "systemd-logind.h" #include "loaderProcs.h" #define XF86_OS_PRIVS #include "xf86.h" #include "xf86Priv.h" #include "xf86Config.h" #include "xf86_OSlib.h" #include "xf86cmap.h" #include "xorgVersion.h" #include "mipointer.h" #include #include #include "xf86Extensions.h" #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" #include "xf86Crtc.h" #include "picturestr.h" #include "randrstr.h" #include "xf86Bus.h" #ifdef XSERVER_LIBPCIACCESS #include "xf86VGAarbiter.h" #endif #include "globals.h" #include "xserver-properties.h" #ifdef DPMSExtension #include #include "dpmsproc.h" #endif #ifdef __linux__ #include #include #endif #include void (*xf86OSPMClose) (void) = NULL; static Bool xorgHWOpenConsole = FALSE; /* Common pixmap formats */ static PixmapFormatRec formats[MAXFORMATS] = { {1, 1, BITMAP_SCANLINE_PAD}, {4, 8, BITMAP_SCANLINE_PAD}, {8, 8, BITMAP_SCANLINE_PAD}, {15, 16, BITMAP_SCANLINE_PAD}, {16, 16, BITMAP_SCANLINE_PAD}, {24, 32, BITMAP_SCANLINE_PAD}, {32, 32, BITMAP_SCANLINE_PAD}, }; static int numFormats = 7; static Bool formatsDone = FALSE; static void xf86PrintBanner(void) { xf86ErrorFVerb(0, "\nX.Org X Server %d.%d.%d", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH); #if XORG_VERSION_SNAP > 0 xf86ErrorFVerb(0, ".%d", XORG_VERSION_SNAP); #endif #if XORG_VERSION_SNAP >= 900 /* When the minor number is 99, that signifies that the we are making * a release candidate for a major version. (X.0.0) * When the patch number is 99, that signifies that the we are making * a release candidate for a minor version. (X.Y.0) * When the patch number is < 99, then we are making a release * candidate for the next point release. (X.Y.Z) */ #if XORG_VERSION_MINOR >= 99 xf86ErrorFVerb(0, " (%d.0.0 RC %d)", XORG_VERSION_MAJOR + 1, XORG_VERSION_SNAP - 900); #elif XORG_VERSION_PATCH == 99 xf86ErrorFVerb(0, " (%d.%d.0 RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR + 1, XORG_VERSION_SNAP - 900); #else xf86ErrorFVerb(0, " (%d.%d.%d RC %d)", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH + 1, XORG_VERSION_SNAP - 900); #endif #endif #ifdef XORG_CUSTOM_VERSION xf86ErrorFVerb(0, " (%s)", XORG_CUSTOM_VERSION); #endif xf86ErrorFVerb(0, "\nX Protocol Version %d, Revision %d\n", X_PROTOCOL, X_PROTOCOL_REVISION); #ifdef HAS_UTSNAME { struct utsname name; /* Linux & BSD state that 0 is success, SysV (including Solaris, HP-UX, and Irix) and Single Unix Spec 3 just say that non-negative is success. All agree that failure is represented by a negative number. */ if (uname(&name) >= 0) { xf86ErrorFVerb(0, "Current Operating System: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine); #ifdef __linux__ do { char buf[80]; int fd = open("/proc/cmdline", O_RDONLY); if (fd != -1) { xf86ErrorFVerb(0, "Kernel command line: "); memset(buf, 0, 80); while (read(fd, buf, 80) > 0) { xf86ErrorFVerb(0, "%.80s", buf); memset(buf, 0, 80); } close(fd); } } while (0); #endif } } #endif #if defined(BUILDERSTRING) xf86ErrorFVerb(0, "%s \n", BUILDERSTRING); #endif xf86ErrorFVerb(0, "Current version of pixman: %s\n", pixman_version_string()); xf86ErrorFVerb(0, "\tBefore reporting problems, check " "" __VENDORDWEBSUPPORT__ "\n" "\tto make sure that you have the latest version.\n"); } Bool xf86PrivsElevated(void) { return PrivsElevated(); } Bool xf86HasTTYs(void) { #ifdef __linux__ struct stat tty0devAttributes; return (stat("/dev/tty0", &tty0devAttributes) == 0 && major(tty0devAttributes.st_rdev) == TTY_MAJOR); #else return TRUE; #endif } static void xf86AutoConfigOutputDevices(void) { int i; if (!xf86Info.autoBindGPU) return; for (i = 0; i < xf86NumGPUScreens; i++) { int scrnum = xf86GPUScreens[i]->confScreen->screennum; RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), xf86ScrnToScreen(xf86Screens[scrnum])); } } static void AddSeatId(CallbackListPtr *pcbl, void *data, void *screen) { ScreenPtr pScreen = screen; Atom SeatAtom = MakeAtom(SEAT_ATOM_NAME, sizeof(SEAT_ATOM_NAME) - 1, TRUE); int err; err = dixChangeWindowProperty(serverClient, pScreen->root, SeatAtom, XA_STRING, 8, PropModeReplace, strlen(data) + 1, data, FALSE); if (err != Success) xf86DrvMsg(pScreen->myNum, X_WARNING, "Failed to register seat property\n"); } static void AddVTAtoms(CallbackListPtr *pcbl, void *data, void *screen) { #define VT_ATOM_NAME "XFree86_VT" int err, HasVT = 1; ScreenPtr pScreen = screen; Atom VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); Atom HasVTAtom = MakeAtom(HAS_VT_ATOM_NAME, sizeof(HAS_VT_ATOM_NAME) - 1, TRUE); err = dixChangeWindowProperty(serverClient, pScreen->root, VTAtom, XA_INTEGER, 32, PropModeReplace, 1, &xf86Info.vtno, FALSE); err |= dixChangeWindowProperty(serverClient, pScreen->root, HasVTAtom, XA_INTEGER, 32, PropModeReplace, 1, &HasVT, FALSE); if (err != Success) xf86DrvMsg(pScreen->myNum, X_WARNING, "Failed to register VT properties\n"); } static Bool xf86ScreenInit(ScreenPtr pScreen, int argc, char **argv) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); pScrn->pScreen = pScreen; return pScrn->ScreenInit (pScreen, argc, argv); } static void xf86EnsureRANDR(ScreenPtr pScreen) { #ifdef RANDR if (!dixPrivateKeyRegistered(rrPrivKey) || !rrGetScrPriv(pScreen)) xf86RandRInit(pScreen); #endif } /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. * That includes vt-manager setup, querying all possible devices and * collecting the pixmap formats. */ void InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) { int i, j, k, scr_index; const char **modulelist; void **optionlist; Bool autoconfig = FALSE; Bool sigio_blocked = FALSE; Bool want_hw_access = FALSE; GDevPtr configured_device; xf86Initialising = TRUE; config_pre_init(); if (serverGeneration == 1) { xf86PrintBanner(); LogPrintMarkers(); if (xf86LogFile) { time_t t; const char *ct; t = time(NULL); ct = ctime(&t); xf86MsgVerb(xf86LogFileFrom, 0, "Log file: \"%s\", Time: %s", xf86LogFile, ct); } /* Read and parse the config file */ if (!xf86DoConfigure && !xf86DoShowOptions) { switch (xf86HandleConfigFile(FALSE)) { case CONFIG_OK: break; case CONFIG_PARSE_ERROR: xf86Msg(X_ERROR, "Error parsing the config file\n"); return; case CONFIG_NOFILE: autoconfig = TRUE; break; } } /* Initialise the loader */ LoaderInit(); /* Tell the loader the default module search path */ LoaderSetPath(xf86ModulePath); if (xf86Info.ignoreABI) { LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); } if (xf86DoShowOptions) DoShowOptions(); dbus_core_init(); systemd_logind_init(); /* Do a general bus probe. This will be a PCI probe for x86 platforms */ xf86BusProbe(); if (xf86DoConfigure) DoConfigure(); if (autoconfig) { if (!xf86AutoConfig()) { xf86Msg(X_ERROR, "Auto configuration failed\n"); return; } } xf86OSPMClose = xf86OSPMOpen(); xf86ExtensionInit(); /* Load all modules specified explicitly in the config file */ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { xf86LoadModules(modulelist, optionlist); free(modulelist); free(optionlist); } /* Load all driver modules specified in the config file */ /* If there aren't any specified in the config file, autoconfig them */ /* FIXME: Does not handle multiple active screen sections, but I'm not * sure if we really want to handle that case*/ configured_device = xf86ConfigLayout.screens->screen->device; if ((!configured_device) || (!configured_device->driver)) { if (!autoConfigDevice(configured_device)) { xf86Msg(X_ERROR, "Automatic driver configuration failed\n"); return; } } if ((modulelist = xf86DriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); free(modulelist); } /* Load all input driver modules specified in the config file. */ if ((modulelist = xf86InputDriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); free(modulelist); } /* * It is expected that xf86AddDriver()/xf86AddInputDriver will be * called for each driver as it is loaded. Those functions save the * module pointers for drivers. * XXX Nothing keeps track of them for other modules. */ /* XXX What do we do if not all of these could be loaded? */ /* * At this point, xf86DriverList[] is all filled in with entries for * each of the drivers to try and xf86NumDrivers has the number of * drivers. If there are none, return now. */ if (xf86NumDrivers == 0) { xf86Msg(X_ERROR, "No drivers available.\n"); return; } /* * Call each of the Identify functions and call the driverFunc to check * if HW access is required. The Identify functions print out some * identifying information, and anything else that might be * needed at this early stage. */ for (i = 0; i < xf86NumDrivers; i++) { xorgHWFlags flags = HW_IO; if (xf86DriverList[i]->Identify != NULL) xf86DriverList[i]->Identify(0); if (xf86DriverList[i]->driverFunc) xf86DriverList[i]->driverFunc(NULL, GET_REQUIRED_HW_INTERFACES, &flags); if (NEED_IO_ENABLED(flags)) want_hw_access = TRUE; /* Non-seat0 X servers should not open console */ if (!(flags & HW_SKIP_CONSOLE) && !ServerIsNotSeat0() && xf86HasTTYs()) xorgHWOpenConsole = TRUE; } if (xorgHWOpenConsole) xf86OpenConsole(); else xf86Info.dontVTSwitch = TRUE; /* Enable full I/O access */ if (want_hw_access) xorgHWAccess = xf86EnableIO(); if (xf86BusConfig() == FALSE) return; xf86PostProbe(); /* * Sort the drivers to match the requested ording. Using a slow * bubble sort. */ for (j = 0; j < xf86NumScreens - 1; j++) { for (i = 0; i < xf86NumScreens - j - 1; i++) { if (xf86Screens[i + 1]->confScreen->screennum < xf86Screens[i]->confScreen->screennum) { ScrnInfoPtr tmpScrn = xf86Screens[i + 1]; xf86Screens[i + 1] = xf86Screens[i]; xf86Screens[i] = tmpScrn; } } } /* Fix up the indexes */ for (i = 0; i < xf86NumScreens; i++) { xf86Screens[i]->scrnIndex = i; } /* * Call the driver's PreInit()'s to complete initialisation for the first * generation. */ for (i = 0; i < xf86NumScreens; i++) { xf86VGAarbiterScrnInit(xf86Screens[i]); xf86VGAarbiterLock(xf86Screens[i]); if (xf86Screens[i]->PreInit && xf86Screens[i]->PreInit(xf86Screens[i], 0)) xf86Screens[i]->configured = TRUE; xf86VGAarbiterUnlock(xf86Screens[i]); } for (i = 0; i < xf86NumScreens; i++) if (!xf86Screens[i]->configured) xf86DeleteScreen(xf86Screens[i--]); for (i = 0; i < xf86NumGPUScreens; i++) { xf86VGAarbiterScrnInit(xf86GPUScreens[i]); xf86VGAarbiterLock(xf86GPUScreens[i]); if (xf86GPUScreens[i]->PreInit && xf86GPUScreens[i]->PreInit(xf86GPUScreens[i], 0)) xf86GPUScreens[i]->configured = TRUE; xf86VGAarbiterUnlock(xf86GPUScreens[i]); } for (i = 0; i < xf86NumGPUScreens; i++) if (!xf86GPUScreens[i]->configured) xf86DeleteScreen(xf86GPUScreens[i--]); /* * If no screens left, return now. */ if (xf86NumScreens == 0) { xf86Msg(X_ERROR, "Screen(s) found, but none have a usable configuration.\n"); return; } /* Remove (unload) drivers that are not required */ for (i = 0; i < xf86NumDrivers; i++) if (xf86DriverList[i] && xf86DriverList[i]->refCount <= 0) xf86DeleteDriver(i); /* * At this stage we know how many screens there are. */ for (i = 0; i < xf86NumScreens; i++) xf86InitViewport(xf86Screens[i]); /* * Collect all pixmap formats and check for conflicts at the display * level. Should we die here? Or just delete the offending screens? */ for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->imageByteOrder != xf86Screens[0]->imageByteOrder) FatalError("Inconsistent display bitmapBitOrder. Exiting\n"); if (xf86Screens[i]->bitmapScanlinePad != xf86Screens[0]->bitmapScanlinePad) FatalError ("Inconsistent display bitmapScanlinePad. Exiting\n"); if (xf86Screens[i]->bitmapScanlineUnit != xf86Screens[0]->bitmapScanlineUnit) FatalError ("Inconsistent display bitmapScanlineUnit. Exiting\n"); if (xf86Screens[i]->bitmapBitOrder != xf86Screens[0]->bitmapBitOrder) FatalError("Inconsistent display bitmapBitOrder. Exiting\n"); } /* Collect additional formats */ for (i = 0; i < xf86NumScreens; i++) { for (j = 0; j < xf86Screens[i]->numFormats; j++) { for (k = 0;; k++) { if (k >= numFormats) { if (k >= MAXFORMATS) FatalError("Too many pixmap formats! Exiting\n"); formats[k] = xf86Screens[i]->formats[j]; numFormats++; break; } if (formats[k].depth == xf86Screens[i]->formats[j].depth) { if ((formats[k].bitsPerPixel == xf86Screens[i]->formats[j].bitsPerPixel) && (formats[k].scanlinePad == xf86Screens[i]->formats[j].scanlinePad)) break; FatalError("Inconsistent pixmap format for depth %d." " Exiting\n", formats[k].depth); } } } } formatsDone = TRUE; } else { /* * serverGeneration != 1; some OSs have to do things here, too. */ if (xorgHWOpenConsole) xf86OpenConsole(); /* should we reopen it here? We need to deal with an already opened device. We could leave this to the OS layer. For now we simply close it here */ if (xf86OSPMClose) xf86OSPMClose(); if ((xf86OSPMClose = xf86OSPMOpen()) != NULL) xf86MsgVerb(X_INFO, 3, "APM registered successfully\n"); /* Make sure full I/O access is enabled */ if (xorgHWAccess) xf86EnableIO(); } if (xf86Info.vtno >= 0) AddCallback(&RootWindowFinalizeCallback, AddVTAtoms, NULL); if (SeatId) AddCallback(&RootWindowFinalizeCallback, AddSeatId, SeatId); /* * Use the previously collected parts to setup pScreenInfo */ pScreenInfo->imageByteOrder = xf86Screens[0]->imageByteOrder; pScreenInfo->bitmapScanlinePad = xf86Screens[0]->bitmapScanlinePad; pScreenInfo->bitmapScanlineUnit = xf86Screens[0]->bitmapScanlineUnit; pScreenInfo->bitmapBitOrder = xf86Screens[0]->bitmapBitOrder; pScreenInfo->numPixmapFormats = numFormats; for (i = 0; i < numFormats; i++) pScreenInfo->formats[i] = formats[i]; /* Make sure the server's VT is active */ if (serverGeneration != 1) { xf86Resetting = TRUE; /* All screens are in the same state, so just check the first */ if (!xf86VTOwner()) { #ifdef HAS_USL_VTS ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ); #endif input_lock(); sigio_blocked = TRUE; } } for (i = 0; i < xf86NumScreens; i++) if (!xf86ColormapAllocatePrivates(xf86Screens[i])) FatalError("Cannot register DDX private keys"); if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0)) FatalError("Cannot register DDX private keys"); for (i = 0; i < xf86NumScreens; i++) { xf86VGAarbiterLock(xf86Screens[i]); /* * Almost everything uses these defaults, and many of those that * don't, will wrap them. */ xf86Screens[i]->EnableDisableFBAccess = xf86EnableDisableFBAccess; #ifdef XFreeXDGA xf86Screens[i]->SetDGAMode = xf86SetDGAMode; #endif scr_index = AddScreen(xf86ScreenInit, argc, argv); xf86VGAarbiterUnlock(xf86Screens[i]); if (scr_index == i) { /* * Hook in our ScrnInfoRec, and initialise some other pScreen * fields. */ dixSetPrivate(&screenInfo.screens[scr_index]->devPrivates, xf86ScreenKey, xf86Screens[i]); xf86Screens[i]->pScreen = screenInfo.screens[scr_index]; /* The driver should set this, but make sure it is set anyway */ xf86Screens[i]->vtSema = TRUE; } else { /* This shouldn't normally happen */ FatalError("AddScreen/ScreenInit failed for driver %d\n", i); } if (PictureGetSubpixelOrder(xf86Screens[i]->pScreen) == SubPixelUnknown) { xf86MonPtr DDC = (xf86MonPtr) (xf86Screens[i]->monitor->DDC); PictureSetSubpixelOrder(xf86Screens[i]->pScreen, DDC ? (DDC->features.input_type ? SubPixelHorizontalRGB : SubPixelNone) : SubPixelUnknown); } /* * If the driver hasn't set up its own RANDR support, install the * fallback support. */ xf86EnsureRANDR(xf86Screens[i]->pScreen); } for (i = 0; i < xf86NumGPUScreens; i++) { ScrnInfoPtr pScrn = xf86GPUScreens[i]; xf86VGAarbiterLock(pScrn); /* * Almost everything uses these defaults, and many of those that * don't, will wrap them. */ pScrn->EnableDisableFBAccess = xf86EnableDisableFBAccess; #ifdef XFreeXDGA pScrn->SetDGAMode = xf86SetDGAMode; #endif scr_index = AddGPUScreen(xf86ScreenInit, argc, argv); xf86VGAarbiterUnlock(pScrn); if (scr_index == i) { dixSetPrivate(&screenInfo.gpuscreens[scr_index]->devPrivates, xf86ScreenKey, xf86GPUScreens[i]); pScrn->pScreen = screenInfo.gpuscreens[scr_index]; /* The driver should set this, but make sure it is set anyway */ pScrn->vtSema = TRUE; } else { FatalError("AddScreen/ScreenInit failed for gpu driver %d %d\n", i, scr_index); } } for (i = 0; i < xf86NumGPUScreens; i++) { int scrnum = xf86GPUScreens[i]->confScreen->screennum; AttachUnboundGPU(xf86Screens[scrnum]->pScreen, xf86GPUScreens[i]->pScreen); } xf86AutoConfigOutputDevices(); xf86VGAarbiterWrapFunctions(); if (sigio_blocked) input_unlock(); xf86InitOrigins(); xf86Resetting = FALSE; xf86Initialising = FALSE; RegisterBlockAndWakeupHandlers((ServerBlockHandlerProcPtr) NoopDDA, xf86Wakeup, NULL); } /** * Initialize all supported input devices present and referenced in the * xorg.conf. */ void InitInput(int argc, char **argv) { InputInfoPtr *pInfo; DeviceIntPtr dev; xf86Info.vtRequestsPending = FALSE; /* Enable threaded input */ InputThreadPreInit(); mieqInit(); /* Initialize all configured input devices */ for (pInfo = xf86ConfigLayout.inputs; pInfo && *pInfo; pInfo++) { (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "driver", (*pInfo)->driver); (*pInfo)->options = xf86AddNewOption((*pInfo)->options, "identifier", (*pInfo)->name); /* If one fails, the others will too */ if (NewInputDeviceRequest((*pInfo)->options, NULL, &dev) == BadAlloc) break; } config_init(); } void CloseInput(void) { config_fini(); mieqFini(); } /* * OsVendorInit -- * OS/Vendor-specific initialisations. Called from OsInit(), which * is called by dix before establishing the well known sockets. */ void OsVendorInit(void) { static Bool beenHere = FALSE; OsSignal(SIGCHLD, SIG_DFL); /* Need to wait for child processes */ if (!beenHere) { umask(022); xf86LogInit(); } /* Set stderr to non-blocking. */ #ifndef O_NONBLOCK #if defined(FNDELAY) #define O_NONBLOCK FNDELAY #elif defined(O_NDELAY) #define O_NONBLOCK O_NDELAY #endif #ifdef O_NONBLOCK if (!beenHere) { if (PrivsElevated()) { int status; status = fcntl(fileno(stderr), F_GETFL, 0); if (status != -1) { fcntl(fileno(stderr), F_SETFL, status | O_NONBLOCK); } } } #endif #endif beenHere = TRUE; } /* * ddxGiveUp -- * Device dependent cleanup. Called by by dix before normal server death. * For SYSV386 we must switch the terminal back to normal mode. No error- * checking here, since there should be restored as much as possible. */ void ddxGiveUp(enum ExitCode error) { int i; if (error == EXIT_ERR_ABORT) { input_lock(); /* try to restore the original video state */ #ifdef DPMSExtension /* Turn screens back on */ if (DPMSPowerLevel != DPMSModeOn) DPMSSet(serverClient, DPMSModeOn); #endif if (xf86Screens) { for (i = 0; i < xf86NumScreens; i++) if (xf86Screens[i]->vtSema) { /* * if we are aborting before ScreenInit() has finished we * might not have been wrapped yet. Therefore enable screen * explicitly. */ xf86VGAarbiterLock(xf86Screens[i]); (xf86Screens[i]->LeaveVT) (xf86Screens[i]); xf86VGAarbiterUnlock(xf86Screens[i]); } } } xf86VGAarbiterFini(); if (xf86OSPMClose) xf86OSPMClose(); xf86OSPMClose = NULL; for (i = 0; i < xf86NumScreens; i++) { /* * zero all access functions to * trap calls when switched away. */ xf86Screens[i]->vtSema = FALSE; } if (xorgHWOpenConsole) xf86CloseConsole(); systemd_logind_fini(); dbus_core_fini(); xf86CloseLog(error); } void OsVendorFatalError(const char *f, va_list args) { #ifdef VENDORSUPPORT ErrorFSigSafe("\nPlease refer to your Operating System Vendor support " "pages\nat %s for support on this crash.\n", VENDORSUPPORT); #else ErrorFSigSafe("\nPlease consult the " XVENDORNAME " support \n\t at " __VENDORDWEBSUPPORT__ "\n for help. \n"); #endif if (xf86LogFile && xf86LogFileWasOpened) ErrorFSigSafe("Please also check the log file at \"%s\" for additional " "information.\n", xf86LogFile); ErrorFSigSafe("\n"); } int xf86SetVerbosity(int verb) { int save = xf86Verbose; xf86Verbose = verb; LogSetParameter(XLOG_VERBOSITY, verb); return save; } int xf86SetLogVerbosity(int verb) { int save = xf86LogVerbose; xf86LogVerbose = verb; LogSetParameter(XLOG_FILE_VERBOSITY, verb); return save; } static void xf86PrintDefaultModulePath(void) { ErrorF("%s\n", DEFAULT_MODULE_PATH); } static void xf86PrintDefaultLibraryPath(void) { ErrorF("%s\n", DEFAULT_LIBRARY_PATH); } static void xf86CheckPrivs(const char *option, const char *arg) { if (PrivsElevated() && !xf86PathIsSafe(arg)) { FatalError("\nInvalid argument for %s - \"%s\"\n" "\tWith elevated privileges %s must specify a relative path\n" "\twithout any \"..\" elements.\n\n", option, arg, option); } } /* * ddxProcessArgument -- * Process device-dependent command line args. Returns 0 if argument is * not device dependent, otherwise Count of number of elements of argv * that are part of a device dependent commandline option. * */ /* ARGSUSED */ int ddxProcessArgument(int argc, char **argv, int i) { /* First the options that are not allowed with elevated privileges */ if (!strcmp(argv[i], "-modulepath")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); if (xf86PrivsElevated()) FatalError("\nInvalid argument -modulepath " "with elevated privileges\n"); xf86ModulePath = argv[i + 1]; xf86ModPathFrom = X_CMDLINE; return 2; } if (!strcmp(argv[i], "-logfile")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); if (xf86PrivsElevated()) FatalError("\nInvalid argument -logfile " "with elevated privileges\n"); xf86LogFile = argv[i + 1]; xf86LogFileFrom = X_CMDLINE; return 2; } if (!strcmp(argv[i], "-config") || !strcmp(argv[i], "-xf86config")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86CheckPrivs(argv[i], argv[i + 1]); xf86ConfigFile = argv[i + 1]; return 2; } if (!strcmp(argv[i], "-configdir")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86CheckPrivs(argv[i], argv[i + 1]); xf86ConfigDir = argv[i + 1]; return 2; } #ifdef XF86VIDMODE if (!strcmp(argv[i], "-disableVidMode")) { xf86VidModeDisabled = TRUE; return 1; } if (!strcmp(argv[i], "-allowNonLocalXvidtune")) { xf86VidModeAllowNonLocal = TRUE; return 1; } #endif if (!strcmp(argv[i], "-allowMouseOpenFail")) { xf86AllowMouseOpenFail = TRUE; return 1; } if (!strcmp(argv[i], "-ignoreABI")) { LoaderSetOptions(LDR_OPT_ABI_MISMATCH_NONFATAL); return 1; } if (!strcmp(argv[i], "-verbose")) { if (++i < argc && argv[i]) { char *end; long val; val = strtol(argv[i], &end, 0); if (*end == '\0') { xf86SetVerbosity(val); return 2; } } xf86SetVerbosity(++xf86Verbose); return 1; } if (!strcmp(argv[i], "-logverbose")) { if (++i < argc && argv[i]) { char *end; long val; val = strtol(argv[i], &end, 0); if (*end == '\0') { xf86SetLogVerbosity(val); return 2; } } xf86SetLogVerbosity(++xf86LogVerbose); return 1; } if (!strcmp(argv[i], "-quiet")) { xf86SetVerbosity(-1); return 1; } if (!strcmp(argv[i], "-showconfig") || !strcmp(argv[i], "-version")) { xf86PrintBanner(); exit(0); } if (!strcmp(argv[i], "-showDefaultModulePath")) { xf86PrintDefaultModulePath(); exit(0); } if (!strcmp(argv[i], "-showDefaultLibPath")) { xf86PrintDefaultLibraryPath(); exit(0); } /* Notice the -fp flag, but allow it to pass to the dix layer */ if (!strcmp(argv[i], "-fp")) { xf86fpFlag = TRUE; return 0; } /* Notice the -bs flag, but allow it to pass to the dix layer */ if (!strcmp(argv[i], "-bs")) { xf86bsDisableFlag = TRUE; return 0; } /* Notice the +bs flag, but allow it to pass to the dix layer */ if (!strcmp(argv[i], "+bs")) { xf86bsEnableFlag = TRUE; return 0; } /* Notice the -s flag, but allow it to pass to the dix layer */ if (!strcmp(argv[i], "-s")) { xf86sFlag = TRUE; return 0; } if (!strcmp(argv[i], "-pixmap32") || !strcmp(argv[i], "-pixmap24")) { /* silently accept */ return 1; } if (!strcmp(argv[i], "-fbbpp")) { int bpp; CHECK_FOR_REQUIRED_ARGUMENTS(1); if (sscanf(argv[++i], "%d", &bpp) == 1) { xf86FbBpp = bpp; return 2; } else { ErrorF("Invalid fbbpp\n"); return 0; } } if (!strcmp(argv[i], "-depth")) { int depth; CHECK_FOR_REQUIRED_ARGUMENTS(1); if (sscanf(argv[++i], "%d", &depth) == 1) { xf86Depth = depth; return 2; } else { ErrorF("Invalid depth\n"); return 0; } } if (!strcmp(argv[i], "-weight")) { int red, green, blue; CHECK_FOR_REQUIRED_ARGUMENTS(1); if (sscanf(argv[++i], "%1d%1d%1d", &red, &green, &blue) == 3) { xf86Weight.red = red; xf86Weight.green = green; xf86Weight.blue = blue; return 2; } else { ErrorF("Invalid weighting\n"); return 0; } } if (!strcmp(argv[i], "-gamma") || !strcmp(argv[i], "-rgamma") || !strcmp(argv[i], "-ggamma") || !strcmp(argv[i], "-bgamma")) { double gamma; CHECK_FOR_REQUIRED_ARGUMENTS(1); if (sscanf(argv[++i], "%lf", &gamma) == 1) { if (gamma < GAMMA_MIN || gamma > GAMMA_MAX) { ErrorF("gamma out of range, only %.2f <= gamma_value <= %.1f" " is valid\n", GAMMA_MIN, GAMMA_MAX); return 0; } if (!strcmp(argv[i - 1], "-gamma")) xf86Gamma.red = xf86Gamma.green = xf86Gamma.blue = gamma; else if (!strcmp(argv[i - 1], "-rgamma")) xf86Gamma.red = gamma; else if (!strcmp(argv[i - 1], "-ggamma")) xf86Gamma.green = gamma; else if (!strcmp(argv[i - 1], "-bgamma")) xf86Gamma.blue = gamma; return 2; } } if (!strcmp(argv[i], "-layout")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86LayoutName = argv[++i]; return 2; } if (!strcmp(argv[i], "-screen")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86ScreenName = argv[++i]; return 2; } if (!strcmp(argv[i], "-pointer")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86PointerName = argv[++i]; return 2; } if (!strcmp(argv[i], "-keyboard")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); xf86KeyboardName = argv[++i]; return 2; } if (!strcmp(argv[i], "-nosilk")) { xf86silkenMouseDisableFlag = TRUE; return 1; } #ifdef HAVE_ACPI if (!strcmp(argv[i], "-noacpi")) { xf86acpiDisableFlag = TRUE; return 1; } #endif if (!strcmp(argv[i], "-configure")) { if (getuid() != 0 && geteuid() == 0) { ErrorF("The '-configure' option can only be used by root.\n"); exit(1); } xf86DoConfigure = TRUE; xf86AllowMouseOpenFail = TRUE; return 1; } if (!strcmp(argv[i], "-showopts")) { if (getuid() != 0 && geteuid() == 0) { ErrorF("The '-showopts' option can only be used by root.\n"); exit(1); } xf86DoShowOptions = TRUE; return 1; } #ifdef XSERVER_LIBPCIACCESS if (!strcmp(argv[i], "-isolateDevice")) { CHECK_FOR_REQUIRED_ARGUMENTS(1); if (strncmp(argv[++i], "PCI:", 4)) { FatalError("Bus types other than PCI not yet isolable\n"); } xf86PciIsolateDevice(argv[i]); return 2; } #endif /* Notice cmdline xkbdir, but pass to dix as well */ if (!strcmp(argv[i], "-xkbdir")) { xf86xkbdirFlag = TRUE; return 0; } if (!strcmp(argv[i], "-novtswitch")) { xf86Info.autoVTSwitch = FALSE; return 1; } if (!strcmp(argv[i], "-sharevts")) { xf86Info.ShareVTs = TRUE; return 1; } if (!strcmp(argv[i], "-iglx") || !strcmp(argv[i], "+iglx")) { xf86Info.iglxFrom = X_CMDLINE; return 0; } if (!strcmp(argv[i], "-noautoBindGPU")) { xf86AutoBindGPUDisabled = TRUE; return 1; } /* OS-specific processing */ return xf86ProcessArgument(argc, argv, i); } /* * ddxUseMsg -- * Print out correct use of device dependent commandline options. * Maybe the user now knows what really to do ... */ void ddxUseMsg(void) { ErrorF("\n"); ErrorF("\n"); ErrorF("Device Dependent Usage\n"); if (!PrivsElevated()) { ErrorF("-modulepath paths specify the module search path\n"); ErrorF("-logfile file specify a log file name\n"); ErrorF("-configure probe for devices and write an " XCONFIGFILE "\n"); ErrorF ("-showopts print available options for all installed drivers\n"); } ErrorF ("-config file specify a configuration file, relative to the\n"); ErrorF(" " XCONFIGFILE " search path, only root can use absolute\n"); ErrorF ("-configdir dir specify a configuration directory, relative to the\n"); ErrorF(" " XCONFIGDIR " search path, only root can use absolute\n"); ErrorF("-verbose [n] verbose startup messages\n"); ErrorF("-logverbose [n] verbose log messages\n"); ErrorF("-quiet minimal startup messages\n"); ErrorF("-fbbpp n set bpp for the framebuffer. Default: 8\n"); ErrorF("-depth n set colour depth. Default: 8\n"); ErrorF ("-gamma f set gamma value (0.1 < f < 10.0) Default: 1.0\n"); ErrorF("-rgamma f set gamma value for red phase\n"); ErrorF("-ggamma f set gamma value for green phase\n"); ErrorF("-bgamma f set gamma value for blue phase\n"); ErrorF ("-weight nnn set RGB weighting at 16 bpp. Default: 565\n"); ErrorF("-layout name specify the ServerLayout section name\n"); ErrorF("-screen name specify the Screen section name\n"); ErrorF ("-keyboard name specify the core keyboard InputDevice name\n"); ErrorF ("-pointer name specify the core pointer InputDevice name\n"); ErrorF("-nosilk disable Silken Mouse\n"); #ifdef XF86VIDMODE ErrorF("-disableVidMode disable mode adjustments with xvidtune\n"); ErrorF ("-allowNonLocalXvidtune allow xvidtune to be run as a non-local client\n"); #endif ErrorF ("-allowMouseOpenFail start server even if the mouse can't be initialized\n"); ErrorF("-ignoreABI make module ABI mismatches non-fatal\n"); #ifdef XSERVER_LIBPCIACCESS ErrorF ("-isolateDevice bus_id restrict device resets to bus_id (PCI only)\n"); #endif ErrorF("-version show the server version\n"); ErrorF("-showDefaultModulePath show the server default module path\n"); ErrorF("-showDefaultLibPath show the server default library path\n"); ErrorF ("-novtswitch don't automatically switch VT at reset & exit\n"); ErrorF("-sharevts share VTs with another X server\n"); /* OS-specific usage */ xf86UseMsg(); ErrorF("\n"); } /* * xf86LoadModules iterates over a list that is being passed in. */ Bool xf86LoadModules(const char **list, void **optlist) { int errmaj; void *opt; int i; char *name; Bool failed = FALSE; if (!list) return TRUE; for (i = 0; list[i] != NULL; i++) { /* Normalise the module name */ name = xf86NormalizeName(list[i]); /* Skip empty names */ if (name == NULL || *name == '\0') { free(name); continue; } /* Replace obsolete keyboard driver with kbd */ if (!xf86NameCmp(name, "keyboard")) { strcpy(name, "kbd"); } if (optlist) opt = optlist[i]; else opt = NULL; if (!LoadModule(name, opt, NULL, &errmaj)) { LoaderErrorMsg(NULL, name, errmaj, 0); failed = TRUE; } free(name); } return !failed; } /* Pixmap format stuff */ PixmapFormatPtr xf86GetPixFormat(ScrnInfoPtr pScrn, int depth) { int i; for (i = 0; i < numFormats; i++) if (formats[i].depth == depth) break; if (i != numFormats) return &formats[i]; else if (!formatsDone) { /* Check for screen-specified formats */ for (i = 0; i < pScrn->numFormats; i++) if (pScrn->formats[i].depth == depth) break; if (i != pScrn->numFormats) return &pScrn->formats[i]; } return NULL; } int xf86GetBppFromDepth(ScrnInfoPtr pScrn, int depth) { PixmapFormatPtr format; format = xf86GetPixFormat(pScrn, depth); if (format) return format->bitsPerPixel; else return 0; } #ifdef DDXBEFORERESET void ddxBeforeReset(void) { } #endif #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { xf86OSInputThreadInit(); } #endif xorg-server-21.1.16/hw/xfree86/common/xf86VidMode.c0000644000175000017500000002756014757411105015251 /* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the VidMode functions required by the extension. * These have been added to avoid the need for the higher level extension * code to access the private XFree86 data structures directly. Wherever * possible this code uses the functions in xf86Mode.c to do the work, * so that two version of code that do similar things don't have to be * maintained. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #include "extinit.h" #ifdef XF86VIDMODE #include "vidmodestr.h" #include "xf86Privstr.h" #include "xf86Extensions.h" #include "xf86cmap.h" static vidMonitorValue xf86VidModeGetMonitorValue(ScreenPtr pScreen, int valtyp, int indx) { vidMonitorValue ret = { NULL, }; MonPtr monitor; ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); monitor = pScrn->monitor; switch (valtyp) { case VIDMODE_MON_VENDOR: ret.ptr = monitor->vendor; break; case VIDMODE_MON_MODEL: ret.ptr = monitor->model; break; case VIDMODE_MON_NHSYNC: ret.i = monitor->nHsync; break; case VIDMODE_MON_NVREFRESH: ret.i = monitor->nVrefresh; break; case VIDMODE_MON_HSYNC_LO: ret.f = (100.0 * monitor->hsync[indx].lo); break; case VIDMODE_MON_HSYNC_HI: ret.f = (100.0 * monitor->hsync[indx].hi); break; case VIDMODE_MON_VREFRESH_LO: ret.f = (100.0 * monitor->vrefresh[indx].lo); break; case VIDMODE_MON_VREFRESH_HI: ret.f = (100.0 * monitor->vrefresh[indx].hi); break; } return ret; } static Bool xf86VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); if (pScrn->currentMode) { *mode = pScrn->currentMode; *dotClock = pScrn->currentMode->Clock; return TRUE; } return FALSE; } static int xf86VidModeGetDotClock(ScreenPtr pScreen, int Clock) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); if ((pScrn->progClock) || (Clock >= MAXCLOCKS)) return Clock; else return pScrn->clock[Clock]; } static int xf86VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); if (pScrn->progClock) { *progClock = TRUE; return 0; } else { *progClock = FALSE; return pScrn->numClocks; } } static Bool xf86VidModeGetClocks(ScreenPtr pScreen, int *Clocks) { ScrnInfoPtr pScrn; int i; pScrn = xf86ScreenToScrn(pScreen); if (pScrn->progClock) return FALSE; for (i = 0; i < pScrn->numClocks; i++) *Clocks++ = pScrn->clock[i]; return TRUE; } static Bool xf86VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock) { VidModePtr pVidMode; DisplayModePtr p; pVidMode = VidModeGetPtr(pScreen); for (p = pVidMode->Next; p != NULL && p != pVidMode->First; p = p->next) { if (p->status == MODE_OK) { pVidMode->Next = p->next; *mode = p; *dotClock = xf86VidModeGetDotClock(pScreen, p->Clock); return TRUE; } } return FALSE; } static Bool xf86VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock) { ScrnInfoPtr pScrn; VidModePtr pVidMode; pScrn = xf86ScreenToScrn(pScreen); if (pScrn->modes == NULL) return FALSE; pVidMode = VidModeGetPtr(pScreen); pVidMode->First = pScrn->modes; pVidMode->Next = pVidMode->First->next; if (pVidMode->First->status == MODE_OK) { *mode = pVidMode->First; *dotClock = xf86VidModeGetDotClock(pScreen, pVidMode->First->Clock); return TRUE; } return xf86VidModeGetNextModeline(pScreen, mode, dotClock); } static Bool xf86VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; if (mode == NULL) return FALSE; pScrn = xf86ScreenToScrn(pScreen); xf86DeleteMode(&(pScrn->modes), mode); return TRUE; } static Bool xf86VidModeZoomViewport(ScreenPtr pScreen, int zoom) { xf86ZoomViewport(pScreen, zoom); return TRUE; } static Bool xf86VidModeSetViewPort(ScreenPtr pScreen, int x, int y) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); pScrn->frameX0 = min(max(x, 0), pScrn->virtualX - pScrn->currentMode->HDisplay); pScrn->frameX1 = pScrn->frameX0 + pScrn->currentMode->HDisplay - 1; pScrn->frameY0 = min(max(y, 0), pScrn->virtualY - pScrn->currentMode->VDisplay); pScrn->frameY1 = pScrn->frameY0 + pScrn->currentMode->VDisplay - 1; if (pScrn->AdjustFrame != NULL) (pScrn->AdjustFrame) (pScrn, pScrn->frameX0, pScrn->frameY0); return TRUE; } static Bool xf86VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); *x = pScrn->frameX0; *y = pScrn->frameY0; return TRUE; } static Bool xf86VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; DisplayModePtr pTmpMode; Bool retval; pScrn = xf86ScreenToScrn(pScreen); /* save in case we fail */ pTmpMode = pScrn->currentMode; /* Force a mode switch */ pScrn->currentMode = NULL; retval = xf86SwitchMode(pScrn->pScreen, mode); /* we failed: restore it */ if (retval == FALSE) pScrn->currentMode = pTmpMode; return retval; } static Bool xf86VidModeLockZoom(ScreenPtr pScreen, Bool lock) { if (xf86Info.dontZoom) return FALSE; xf86LockZoom(pScreen, lock); return TRUE; } static ModeStatus xf86VidModeCheckModeForMonitor(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; if (mode == NULL) return MODE_ERROR; pScrn = xf86ScreenToScrn(pScreen); return xf86CheckModeForMonitor(mode, pScrn->monitor); } static ModeStatus xf86VidModeCheckModeForDriver(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; if (mode == NULL) return MODE_ERROR; pScrn = xf86ScreenToScrn(pScreen); return xf86CheckModeForDriver(pScrn, mode, 0); } static void xf86VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; DisplayModePtr ScreenModes; if (mode == NULL) return; /* Ugly hack so that the xf86Mode.c function can be used without change */ pScrn = xf86ScreenToScrn(pScreen); ScreenModes = pScrn->modes; pScrn->modes = mode; xf86SetCrtcForModes(pScrn, pScrn->adjustFlags); pScrn->modes = ScreenModes; return; } static Bool xf86VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode) { ScrnInfoPtr pScrn; if (mode == NULL) return FALSE; pScrn = xf86ScreenToScrn(pScreen); mode->name = strdup(""); /* freed by deletemode */ mode->status = MODE_OK; mode->next = pScrn->modes->next; mode->prev = pScrn->modes; pScrn->modes->next = mode; if (mode->next != NULL) mode->next->prev = mode; return TRUE; } static int xf86VidModeGetNumOfModes(ScreenPtr pScreen) { DisplayModePtr mode = NULL; int dotClock = 0, nummodes = 0; if (!xf86VidModeGetFirstModeline(pScreen, &mode, &dotClock)) return nummodes; do { nummodes++; if (!xf86VidModeGetNextModeline(pScreen, &mode, &dotClock)) return nummodes; } while (TRUE); } static Bool xf86VidModeSetGamma(ScreenPtr pScreen, float red, float green, float blue) { Gamma gamma; gamma.red = red; gamma.green = green; gamma.blue = blue; if (xf86ChangeGamma(pScreen, gamma) != Success) return FALSE; else return TRUE; } static Bool xf86VidModeGetGamma(ScreenPtr pScreen, float *red, float *green, float *blue) { ScrnInfoPtr pScrn; pScrn = xf86ScreenToScrn(pScreen); *red = pScrn->gamma.red; *green = pScrn->gamma.green; *blue = pScrn->gamma.blue; return TRUE; } static Bool xf86VidModeSetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b) { xf86ChangeGammaRamp(pScreen, size, r, g, b); return TRUE; } static Bool xf86VidModeGetGammaRamp(ScreenPtr pScreen, int size, CARD16 *r, CARD16 *g, CARD16 *b) { xf86GetGammaRamp(pScreen, size, r, g, b); return TRUE; } static Bool xf86VidModeInit(ScreenPtr pScreen) { VidModePtr pVidMode; if (!xf86GetVidModeEnabled()) { DebugF("!xf86GetVidModeEnabled()\n"); return FALSE; } pVidMode = VidModeInit(pScreen); if (!pVidMode) return FALSE; pVidMode->Flags = 0; pVidMode->Next = NULL; pVidMode->GetMonitorValue = xf86VidModeGetMonitorValue; pVidMode->GetCurrentModeline = xf86VidModeGetCurrentModeline; pVidMode->GetFirstModeline = xf86VidModeGetFirstModeline; pVidMode->GetNextModeline = xf86VidModeGetNextModeline; pVidMode->DeleteModeline = xf86VidModeDeleteModeline; pVidMode->ZoomViewport = xf86VidModeZoomViewport; pVidMode->GetViewPort = xf86VidModeGetViewPort; pVidMode->SetViewPort = xf86VidModeSetViewPort; pVidMode->SwitchMode = xf86VidModeSwitchMode; pVidMode->LockZoom = xf86VidModeLockZoom; pVidMode->GetNumOfClocks = xf86VidModeGetNumOfClocks; pVidMode->GetClocks = xf86VidModeGetClocks; pVidMode->CheckModeForMonitor = xf86VidModeCheckModeForMonitor; pVidMode->CheckModeForDriver = xf86VidModeCheckModeForDriver; pVidMode->SetCrtcForMode = xf86VidModeSetCrtcForMode; pVidMode->AddModeline = xf86VidModeAddModeline; pVidMode->GetDotClock = xf86VidModeGetDotClock; pVidMode->GetNumOfModes = xf86VidModeGetNumOfModes; pVidMode->SetGamma = xf86VidModeSetGamma; pVidMode->GetGamma = xf86VidModeGetGamma; pVidMode->SetGammaRamp = xf86VidModeSetGammaRamp; pVidMode->GetGammaRamp = xf86VidModeGetGammaRamp; pVidMode->GetGammaRampSize = xf86GetGammaRampSize; /* use xf86cmap API directly */ return TRUE; } void XFree86VidModeExtensionInit(void) { int i; Bool enabled = FALSE; DebugF("XFree86VidModeExtensionInit"); /* This means that the DDX doesn't want the vidmode extension enabled */ if (!xf86GetVidModeEnabled()) return; for (i = 0; i < screenInfo.numScreens; i++) { if (xf86VidModeInit (screenInfo.screens[i])) enabled = TRUE; } /* This means that the DDX doesn't want the vidmode extension enabled */ if (!enabled) return; VidModeAddExtension(xf86GetVidModeAllowNonLocal()); } #endif /* XF86VIDMODE */ xorg-server-21.1.16/hw/xfree86/common/xf86fbman.c0000644000175000017500000011735014757411105015002 /* * Copyright (c) 1998-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include #include "scrnintstr.h" #include "regionstr.h" #include "xf86fbman.h" /* #define DEBUG */ static DevPrivateKeyRec xf86FBManagerKeyRec; static DevPrivateKey xf86FBManagerKey; Bool xf86RegisterOffscreenManager(ScreenPtr pScreen, FBManagerFuncsPtr funcs) { xf86FBManagerKey = &xf86FBManagerKeyRec; if (!dixRegisterPrivateKey(&xf86FBManagerKeyRec, PRIVATE_SCREEN, 0)) return FALSE; dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs); return TRUE; } Bool xf86FBManagerRunning(ScreenPtr pScreen) { if (xf86FBManagerKey == NULL) return FALSE; if (!dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey)) return FALSE; return TRUE; } Bool xf86RegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, void *devPriv) { FBManagerFuncsPtr funcs; if (xf86FBManagerKey == NULL) return FALSE; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->RegisterFreeBoxCallback) (pScreen, FreeBoxCallback, devPriv); } FBAreaPtr xf86AllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int gran, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData) { FBManagerFuncsPtr funcs; if (xf86FBManagerKey == NULL) return NULL; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return NULL; return (*funcs->AllocateOffscreenArea) (pScreen, w, h, gran, moveCB, removeCB, privData); } FBLinearPtr xf86AllocateOffscreenLinear(ScreenPtr pScreen, int length, int gran, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, void *privData) { FBManagerFuncsPtr funcs; if (xf86FBManagerKey == NULL) return NULL; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return NULL; return (*funcs->AllocateOffscreenLinear) (pScreen, length, gran, moveCB, removeCB, privData); } void xf86FreeOffscreenArea(FBAreaPtr area) { FBManagerFuncsPtr funcs; if (!area) return; if (xf86FBManagerKey == NULL) return; if (! (funcs = (FBManagerFuncsPtr) dixLookupPrivate(&area->pScreen->devPrivates, xf86FBManagerKey))) return; (*funcs->FreeOffscreenArea) (area); return; } void xf86FreeOffscreenLinear(FBLinearPtr linear) { FBManagerFuncsPtr funcs; if (!linear) return; if (xf86FBManagerKey == NULL) return; if (! (funcs = (FBManagerFuncsPtr) dixLookupPrivate(&linear->pScreen->devPrivates, xf86FBManagerKey))) return; (*funcs->FreeOffscreenLinear) (linear); return; } Bool xf86ResizeOffscreenArea(FBAreaPtr resize, int w, int h) { FBManagerFuncsPtr funcs; if (!resize) return FALSE; if (xf86FBManagerKey == NULL) return FALSE; if (! (funcs = (FBManagerFuncsPtr) dixLookupPrivate(&resize->pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->ResizeOffscreenArea) (resize, w, h); } Bool xf86ResizeOffscreenLinear(FBLinearPtr resize, int size) { FBManagerFuncsPtr funcs; if (!resize) return FALSE; if (xf86FBManagerKey == NULL) return FALSE; if (! (funcs = (FBManagerFuncsPtr) dixLookupPrivate(&resize->pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->ResizeOffscreenLinear) (resize, size); } Bool xf86QueryLargestOffscreenArea(ScreenPtr pScreen, int *w, int *h, int gran, int preferences, int severity) { FBManagerFuncsPtr funcs; *w = 0; *h = 0; if (xf86FBManagerKey == NULL) return FALSE; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->QueryLargestOffscreenArea) (pScreen, w, h, gran, preferences, severity); } Bool xf86QueryLargestOffscreenLinear(ScreenPtr pScreen, int *size, int gran, int severity) { FBManagerFuncsPtr funcs; *size = 0; if (xf86FBManagerKey == NULL) return FALSE; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->QueryLargestOffscreenLinear) (pScreen, size, gran, severity); } Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerFuncsPtr funcs; if (xf86FBManagerKey == NULL) return FALSE; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return FALSE; return (*funcs->PurgeOffscreenAreas) (pScreen); } /************************************************************\ Below is a specific implementation of an offscreen manager. \************************************************************/ static DevPrivateKeyRec xf86FBScreenKeyRec; #define xf86FBScreenKey (&xf86FBScreenKeyRec) typedef struct _FBLink { FBArea area; struct _FBLink *next; } FBLink, *FBLinkPtr; typedef struct _FBLinearLink { FBLinear linear; int free; /* need to add free here as FBLinear is publicly accessible */ FBAreaPtr area; /* only used if allocation came from XY area */ struct _FBLinearLink *next; } FBLinearLink, *FBLinearLinkPtr; typedef struct { ScreenPtr pScreen; RegionPtr InitialBoxes; RegionPtr FreeBoxes; FBLinkPtr UsedAreas; int NumUsedAreas; FBLinearLinkPtr LinearAreas; CloseScreenProcPtr CloseScreen; int NumCallbacks; FreeBoxCallbackProcPtr *FreeBoxesUpdateCallback; DevUnion *devPrivates; } FBManager, *FBManagerPtr; static void SendCallFreeBoxCallbacks(FBManagerPtr offman) { int i = offman->NumCallbacks; while (i--) { (*offman->FreeBoxesUpdateCallback[i]) (offman->pScreen, offman->FreeBoxes, offman->devPrivates[i].ptr); } } static Bool localRegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, void *devPriv) { FBManagerPtr offman; FreeBoxCallbackProcPtr *newCallbacks; DevUnion *newPrivates; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); newCallbacks = reallocarray(offman->FreeBoxesUpdateCallback, offman->NumCallbacks + 1, sizeof(FreeBoxCallbackProcPtr)); if (!newCallbacks) return FALSE; else offman->FreeBoxesUpdateCallback = newCallbacks; newPrivates = reallocarray(offman->devPrivates, offman->NumCallbacks + 1, sizeof(DevUnion)); if (!newPrivates) return FALSE; else offman->devPrivates = newPrivates; offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback; offman->devPrivates[offman->NumCallbacks].ptr = devPriv; offman->NumCallbacks++; SendCallFreeBoxCallbacks(offman); return TRUE; } static FBAreaPtr AllocateArea(FBManagerPtr offman, int w, int h, int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData) { ScreenPtr pScreen = offman->pScreen; FBLinkPtr link = NULL; FBAreaPtr area = NULL; RegionRec NewReg; int i, x = 0, num; BoxPtr boxp; if (granularity <= 1) granularity = 0; boxp = RegionRects(offman->FreeBoxes); num = RegionNumRects(offman->FreeBoxes); /* look through the free boxes */ for (i = 0; i < num; i++, boxp++) { x = boxp->x1; if (granularity > 1) x = ((x + granularity - 1) / granularity) * granularity; if (((boxp->y2 - boxp->y1) < h) || ((boxp->x2 - x) < w)) continue; link = malloc(sizeof(FBLink)); if (!link) return NULL; area = &(link->area); link->next = offman->UsedAreas; offman->UsedAreas = link; offman->NumUsedAreas++; break; } /* try to boot a removable one out if we are not expendable ourselves */ if (!area && !removeCB) { link = offman->UsedAreas; while (link) { if (!link->area.RemoveAreaCallback) { link = link->next; continue; } boxp = &(link->area.box); x = boxp->x1; if (granularity > 1) x = ((x + granularity - 1) / granularity) * granularity; if (((boxp->y2 - boxp->y1) < h) || ((boxp->x2 - x) < w)) { link = link->next; continue; } /* bye, bye */ (*link->area.RemoveAreaCallback) (&link->area); RegionInit(&NewReg, &(link->area.box), 1); RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg); RegionUninit(&NewReg); area = &(link->area); break; } } if (area) { area->pScreen = pScreen; area->granularity = granularity; area->box.x1 = x; area->box.x2 = x + w; area->box.y1 = boxp->y1; area->box.y2 = boxp->y1 + h; area->MoveAreaCallback = moveCB; area->RemoveAreaCallback = removeCB; area->devPrivate.ptr = privData; RegionInit(&NewReg, &(area->box), 1); RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg); RegionUninit(&NewReg); } return area; } static FBAreaPtr localAllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int gran, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData) { FBManagerPtr offman; FBAreaPtr area = NULL; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); if ((area = AllocateArea(offman, w, h, gran, moveCB, removeCB, privData))) SendCallFreeBoxCallbacks(offman); return area; } static void localFreeOffscreenArea(FBAreaPtr area) { FBManagerPtr offman; FBLinkPtr pLink, pLinkPrev = NULL; RegionRec FreedRegion; ScreenPtr pScreen; pScreen = area->pScreen; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pLink = offman->UsedAreas; if (!pLink) return; while (&(pLink->area) != area) { pLinkPrev = pLink; pLink = pLink->next; if (!pLink) return; } /* put the area back into the pool */ RegionInit(&FreedRegion, &(pLink->area.box), 1); RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion); RegionUninit(&FreedRegion); if (pLinkPrev) pLinkPrev->next = pLink->next; else offman->UsedAreas = pLink->next; free(pLink); offman->NumUsedAreas--; SendCallFreeBoxCallbacks(offman); } static Bool localResizeOffscreenArea(FBAreaPtr resize, int w, int h) { FBManagerPtr offman; ScreenPtr pScreen; BoxRec OrigArea; RegionRec FreedReg; FBAreaPtr area = NULL; FBLinkPtr pLink, newLink, pLinkPrev = NULL; pScreen = resize->pScreen; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); /* find this link */ if (!(pLink = offman->UsedAreas)) return FALSE; while (&(pLink->area) != resize) { pLinkPrev = pLink; pLink = pLink->next; if (!pLink) return FALSE; } OrigArea.x1 = resize->box.x1; OrigArea.x2 = resize->box.x2; OrigArea.y1 = resize->box.y1; OrigArea.y2 = resize->box.y2; /* if it's smaller, this is easy */ if ((w <= (resize->box.x2 - resize->box.x1)) && (h <= (resize->box.y2 - resize->box.y1))) { RegionRec NewReg; resize->box.x2 = resize->box.x1 + w; resize->box.y2 = resize->box.y1 + h; if ((resize->box.y2 == OrigArea.y2) && (resize->box.x2 == OrigArea.x2)) return TRUE; RegionInit(&FreedReg, &OrigArea, 1); RegionInit(&NewReg, &(resize->box), 1); RegionSubtract(&FreedReg, &FreedReg, &NewReg); RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); RegionUninit(&FreedReg); RegionUninit(&NewReg); SendCallFreeBoxCallbacks(offman); return TRUE; } /* otherwise we remove the old region */ RegionInit(&FreedReg, &OrigArea, 1); RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); /* remove the old link */ if (pLinkPrev) pLinkPrev->next = pLink->next; else offman->UsedAreas = pLink->next; /* and try to add a new one */ if ((area = AllocateArea(offman, w, h, resize->granularity, resize->MoveAreaCallback, resize->RemoveAreaCallback, resize->devPrivate.ptr))) { /* copy data over to our link and replace the new with old */ memcpy(resize, area, sizeof(FBArea)); pLinkPrev = NULL; newLink = offman->UsedAreas; while (&(newLink->area) != area) { pLinkPrev = newLink; newLink = newLink->next; } if (pLinkPrev) pLinkPrev->next = newLink->next; else offman->UsedAreas = newLink->next; pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; free(newLink); /* AllocateArea added one but we really only exchanged one */ offman->NumUsedAreas--; } else { /* reinstate the old region */ RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); RegionUninit(&FreedReg); pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; return FALSE; } RegionUninit(&FreedReg); SendCallFreeBoxCallbacks(offman); return TRUE; } static Bool localQueryLargestOffscreenArea(ScreenPtr pScreen, int *width, int *height, int granularity, int preferences, int severity) { FBManagerPtr offman; RegionPtr newRegion = NULL; BoxPtr pbox; int nbox; int x, w, h, area, oldArea; *width = *height = oldArea = 0; if (granularity <= 1) granularity = 0; if ((preferences < 0) || (preferences > 3)) return FALSE; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); if (severity < 0) severity = 0; if (severity > 2) severity = 2; switch (severity) { case 2: if (offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; newRegion = RegionCreate(NULL, 1); RegionCopy(newRegion, offman->InitialBoxes); pLink = offman->UsedAreas; while (pLink) { if (!pLink->area.RemoveAreaCallback) { RegionInit(&tmpRegion, &(pLink->area.box), 1); RegionSubtract(newRegion, newRegion, &tmpRegion); RegionUninit(&tmpRegion); } pLink = pLink->next; } nbox = RegionNumRects(newRegion); pbox = RegionRects(newRegion); break; } case 1: if (offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; newRegion = RegionCreate(NULL, 1); RegionCopy(newRegion, offman->FreeBoxes); pLink = offman->UsedAreas; while (pLink) { if (pLink->area.RemoveAreaCallback) { RegionInit(&tmpRegion, &(pLink->area.box), 1); RegionAppend(newRegion, &tmpRegion); RegionUninit(&tmpRegion); } pLink = pLink->next; } nbox = RegionNumRects(newRegion); pbox = RegionRects(newRegion); break; } default: nbox = RegionNumRects(offman->FreeBoxes); pbox = RegionRects(offman->FreeBoxes); break; } while (nbox--) { x = pbox->x1; if (granularity > 1) x = ((x + granularity - 1) / granularity) * granularity; w = pbox->x2 - x; h = pbox->y2 - pbox->y1; area = w * h; if (w > 0) { Bool gotIt = FALSE; switch (preferences) { case FAVOR_AREA_THEN_WIDTH: if ((area > oldArea) || ((area == oldArea) && (w > *width))) gotIt = TRUE; break; case FAVOR_AREA_THEN_HEIGHT: if ((area > oldArea) || ((area == oldArea) && (h > *height))) gotIt = TRUE; break; case FAVOR_WIDTH_THEN_AREA: if ((w > *width) || ((w == *width) && (area > oldArea))) gotIt = TRUE; break; case FAVOR_HEIGHT_THEN_AREA: if ((h > *height) || ((h == *height) && (area > oldArea))) gotIt = TRUE; break; } if (gotIt) { *width = w; *height = h; oldArea = area; } } pbox++; } if (newRegion) RegionDestroy(newRegion); return TRUE; } static Bool localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) { FBManagerPtr offman; FBLinkPtr pLink, tmp, pPrev = NULL; RegionRec FreedRegion; Bool anyUsed = FALSE; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pLink = offman->UsedAreas; if (!pLink) return TRUE; while (pLink) { if (pLink->area.RemoveAreaCallback) { (*pLink->area.RemoveAreaCallback) (&pLink->area); RegionInit(&FreedRegion, &(pLink->area.box), 1); RegionAppend(offman->FreeBoxes, &FreedRegion); RegionUninit(&FreedRegion); if (pPrev) pPrev->next = pLink->next; else offman->UsedAreas = pLink->next; tmp = pLink; pLink = pLink->next; free(tmp); offman->NumUsedAreas--; anyUsed = TRUE; } else { pPrev = pLink; pLink = pLink->next; } } if (anyUsed) { RegionValidate(offman->FreeBoxes, &anyUsed); SendCallFreeBoxCallbacks(offman); } return TRUE; } static void LinearMoveCBWrapper(FBAreaPtr from, FBAreaPtr to) { /* this will never get called */ } static void LinearRemoveCBWrapper(FBAreaPtr area) { FBManagerPtr offman; FBLinearLinkPtr pLink, pLinkPrev = NULL; ScreenPtr pScreen = area->pScreen; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pLink = offman->LinearAreas; if (!pLink) return; while (pLink->area != area) { pLinkPrev = pLink; pLink = pLink->next; if (!pLink) return; } /* give the user the callback it is expecting */ (*pLink->linear.RemoveLinearCallback) (&(pLink->linear)); if (pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; free(pLink); } static void DumpDebug(FBLinearLinkPtr pLink) { #ifdef DEBUG if (!pLink) ErrorF("MMmm, PLINK IS NULL!\n"); while (pLink) { ErrorF(" Offset:%08x, Size:%08x, %s,%s\n", pLink->linear.offset, pLink->linear.size, pLink->free ? "Free" : "Used", pLink->area ? "Area" : "Linear"); pLink = pLink->next; } #endif } static FBLinearPtr AllocateLinear(FBManagerPtr offman, int size, int granularity, void *privData) { ScreenPtr pScreen = offman->pScreen; FBLinearLinkPtr linear = NULL; FBLinearLinkPtr newlink = NULL; int offset, end; if (size <= 0) return NULL; if (!offman->LinearAreas) return NULL; linear = offman->LinearAreas; while (linear) { /* Make sure we get a free area that's not an XY fallback case */ if (!linear->area && linear->free) { offset = linear->linear.offset; if (granularity > 1) offset = ((offset + granularity - 1) / granularity) * granularity; end = offset + size; if (end <= (linear->linear.offset + linear->linear.size)) break; } linear = linear->next; } if (!linear) return NULL; /* break left */ if (offset > linear->linear.offset) { newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; newlink->linear.offset = offset; newlink->linear.size = linear->linear.size - (offset - linear->linear.offset); newlink->free = 1; newlink->next = linear->next; linear->linear.size -= newlink->linear.size; linear->next = newlink; linear = newlink; } /* break right */ if (size < linear->linear.size) { newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; newlink->linear.offset = offset + size; newlink->linear.size = linear->linear.size - size; newlink->free = 1; newlink->next = linear->next; linear->linear.size = size; linear->next = newlink; } /* p = middle block */ linear->linear.granularity = granularity; linear->free = 0; linear->linear.pScreen = pScreen; linear->linear.MoveLinearCallback = NULL; linear->linear.RemoveLinearCallback = NULL; linear->linear.devPrivate.ptr = NULL; DumpDebug(offman->LinearAreas); return &(linear->linear); } static FBLinearPtr localAllocateOffscreenLinear(ScreenPtr pScreen, int length, int gran, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, void *privData) { FBManagerPtr offman; FBLinearLinkPtr link; FBAreaPtr area; FBLinearPtr linear = NULL; BoxPtr extents; int w, h, pitch; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); /* Try to allocate from linear memory first...... */ DebugF("ALLOCATING LINEAR\n"); if ((linear = AllocateLinear(offman, length, gran, privData))) return linear; DebugF("NOPE, ALLOCATING AREA\n"); if (!(link = malloc(sizeof(FBLinearLink)))) return NULL; /* No linear available, so try and pinch some from the XY areas */ extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if (gran > 1) { if (gran > pitch) { /* we can't match the specified alignment with XY allocations */ free(link); return NULL; } if (pitch % gran) { /* pitch and granularity aren't a perfect match, let's allocate * a bit more so we can align later on */ length += gran - 1; } } if (length < pitch) { /* special case */ w = length; h = 1; } else { w = pitch; h = (length + pitch - 1) / pitch; } if ((area = localAllocateOffscreenArea(pScreen, w, h, gran, moveCB ? LinearMoveCBWrapper : NULL, removeCB ? LinearRemoveCBWrapper : NULL, privData))) { link->area = area; link->free = 0; link->next = offman->LinearAreas; offman->LinearAreas = link; linear = &(link->linear); linear->pScreen = pScreen; linear->size = h * w; linear->offset = (pitch * area->box.y1) + area->box.x1; if (gran > 1) linear->offset = ((linear->offset + gran - 1) / gran) * gran; linear->granularity = gran; linear->MoveLinearCallback = moveCB; linear->RemoveLinearCallback = removeCB; linear->devPrivate.ptr = privData; } else free(link); DumpDebug(offman->LinearAreas); return linear; } static void localFreeOffscreenLinear(FBLinearPtr linear) { FBManagerPtr offman; FBLinearLinkPtr pLink, pLinkPrev = NULL; ScreenPtr pScreen = linear->pScreen; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pLink = offman->LinearAreas; if (!pLink) return; while (&(pLink->linear) != linear) { pLinkPrev = pLink; pLink = pLink->next; if (!pLink) return; } if (pLink->area) { /* really an XY area */ DebugF("FREEING AREA\n"); localFreeOffscreenArea(pLink->area); if (pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; free(pLink); DumpDebug(offman->LinearAreas); return; } pLink->free = 1; if (pLink->next && pLink->next->free) { FBLinearLinkPtr p = pLink->next; pLink->linear.size += p->linear.size; pLink->next = p->next; free(p); } if (pLinkPrev) { if (pLinkPrev->next && pLinkPrev->next->free && !pLinkPrev->area) { FBLinearLinkPtr p = pLinkPrev->next; pLinkPrev->linear.size += p->linear.size; pLinkPrev->next = p->next; free(p); } } DebugF("FREEING LINEAR\n"); DumpDebug(offman->LinearAreas); } static Bool localResizeOffscreenLinear(FBLinearPtr resize, int length) { FBManagerPtr offman; FBLinearLinkPtr pLink; ScreenPtr pScreen = resize->pScreen; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pLink = offman->LinearAreas; if (!pLink) return FALSE; while (&(pLink->linear) != resize) { pLink = pLink->next; if (!pLink) return FALSE; } /* This could actually be a lot smarter and try to move allocations from XY to linear when available. For now if it was XY, we keep it XY */ if (pLink->area) { /* really an XY area */ BoxPtr extents; int pitch, w, h; extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if (length < pitch) { /* special case */ w = length; h = 1; } else { w = pitch; h = (length + pitch - 1) / pitch; } if (localResizeOffscreenArea(pLink->area, w, h)) { resize->size = h * w; resize->offset = (pitch * pLink->area->box.y1) + pLink->area->box.x1; return TRUE; } } else { /* TODO!!!! resize the linear area */ } return FALSE; } static Bool localQueryLargestOffscreenLinear(ScreenPtr pScreen, int *size, int gran, int priority) { FBManagerPtr offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); FBLinearLinkPtr pLink; FBLinearLinkPtr pLinkRet; *size = 0; pLink = offman->LinearAreas; if (pLink && !pLink->area) { pLinkRet = pLink; while (pLink) { if (pLink->free) { if (pLink->linear.size > pLinkRet->linear.size) pLinkRet = pLink; } pLink = pLink->next; } if (pLinkRet->free) { *size = pLinkRet->linear.size; return TRUE; } } else { int w, h; if (localQueryLargestOffscreenArea(pScreen, &w, &h, gran, FAVOR_WIDTH_THEN_AREA, priority)) { BoxPtr extents; extents = RegionExtents(offman->InitialBoxes); if ((extents->x2 - extents->x1) == w) *size = w * h; return TRUE; } } return FALSE; } static FBManagerFuncs xf86FBManFuncs = { localAllocateOffscreenArea, localFreeOffscreenArea, localResizeOffscreenArea, localQueryLargestOffscreenArea, localRegisterFreeBoxCallback, localAllocateOffscreenLinear, localFreeOffscreenLinear, localResizeOffscreenLinear, localQueryLargestOffscreenLinear, localPurgeUnlockedOffscreenAreas }; static Bool xf86FBCloseScreen(ScreenPtr pScreen) { FBLinkPtr pLink, tmp; FBLinearLinkPtr pLinearLink, tmp2; FBManagerPtr offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); pScreen->CloseScreen = offman->CloseScreen; pLink = offman->UsedAreas; while (pLink) { tmp = pLink; pLink = pLink->next; free(tmp); } pLinearLink = offman->LinearAreas; while (pLinearLink) { tmp2 = pLinearLink; pLinearLink = pLinearLink->next; free(tmp2); } RegionDestroy(offman->InitialBoxes); RegionDestroy(offman->FreeBoxes); free(offman->FreeBoxesUpdateCallback); free(offman->devPrivates); free(offman); dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL); return (*pScreen->CloseScreen) (pScreen); } Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RegionRec ScreenRegion; RegionRec FullRegion; BoxRec ScreenBox; Bool ret; ScreenBox.x1 = 0; ScreenBox.y1 = 0; ScreenBox.x2 = pScrn->virtualX; ScreenBox.y2 = pScrn->virtualY; if ((FullBox->x1 > ScreenBox.x1) || (FullBox->y1 > ScreenBox.y1) || (FullBox->x2 < ScreenBox.x2) || (FullBox->y2 < ScreenBox.y2)) { return FALSE; } if (FullBox->y2 < FullBox->y1) return FALSE; if (FullBox->x2 < FullBox->x1) return FALSE; RegionInit(&ScreenRegion, &ScreenBox, 1); RegionInit(&FullRegion, FullBox, 1); RegionSubtract(&FullRegion, &FullRegion, &ScreenRegion); ret = xf86InitFBManagerRegion(pScreen, &FullRegion); RegionUninit(&ScreenRegion); RegionUninit(&FullRegion); return ret; } Bool xf86InitFBManagerArea(ScreenPtr pScreen, int PixelArea, int Verbosity) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xRectangle Rect[3]; RegionPtr pRegion, pScreenRegion; int nRect; Bool ret = FALSE; if (PixelArea < (pScrn->displayWidth * pScrn->virtualY)) return FALSE; Rect[0].x = Rect[0].y = 0; Rect[0].width = pScrn->displayWidth; Rect[0].height = PixelArea / pScrn->displayWidth; nRect = 1; /* Add a possible partial scanline */ if ((Rect[1].height = Rect[1].width = PixelArea % pScrn->displayWidth)) { Rect[1].x = 0; Rect[1].y = Rect[0].height; Rect[1].height = 1; nRect++; } /* Factor out virtual resolution */ pRegion = RegionFromRects(nRect, Rect, 0); if (pRegion) { if (!RegionNar(pRegion)) { Rect[2].x = Rect[2].y = 0; Rect[2].width = pScrn->virtualX; Rect[2].height = pScrn->virtualY; pScreenRegion = RegionFromRects(1, &Rect[2], 0); if (pScreenRegion) { if (!RegionNar(pScreenRegion)) { RegionSubtract(pRegion, pRegion, pScreenRegion); ret = xf86InitFBManagerRegion(pScreen, pRegion); if (ret && xf86GetVerbosity() >= Verbosity) { int scrnIndex = pScrn->scrnIndex; xf86DrvMsgVerb(scrnIndex, X_INFO, Verbosity, "Largest offscreen areas (with overlaps):\n"); if (Rect[2].width < Rect[0].width) { xf86DrvMsgVerb(scrnIndex, X_INFO, Verbosity, "\t%d x %d rectangle at %d,0\n", Rect[0].width - Rect[2].width, Rect[0].height, Rect[2].width); } if (Rect[2].width < Rect[1].width) { xf86DrvMsgVerb(scrnIndex, X_INFO, Verbosity, "\t%d x %d rectangle at %d,0\n", Rect[1].width - Rect[2].width, Rect[0].height + Rect[1].height, Rect[2].width); } if (Rect[2].height < Rect[0].height) { xf86DrvMsgVerb(scrnIndex, X_INFO, Verbosity, "\t%d x %d rectangle at 0,%d\n", Rect[0].width, Rect[0].height - Rect[2].height, Rect[2].height); } if (Rect[1].height) { xf86DrvMsgVerb(scrnIndex, X_INFO, Verbosity, "\t%d x %d rectangle at 0,%d\n", Rect[1].width, Rect[0].height - Rect[2].height + Rect[1].height, Rect[2].height); } } } RegionDestroy(pScreenRegion); } } RegionDestroy(pRegion); } return ret; } Bool xf86InitFBManagerRegion(ScreenPtr pScreen, RegionPtr FullRegion) { FBManagerPtr offman; if (RegionNil(FullRegion)) return FALSE; if (!dixRegisterPrivateKey(&xf86FBScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs)) return FALSE; offman = malloc(sizeof(FBManager)); if (!offman) return FALSE; dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman); offman->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86FBCloseScreen; offman->InitialBoxes = RegionCreate(NULL, 1); offman->FreeBoxes = RegionCreate(NULL, 1); RegionCopy(offman->InitialBoxes, FullRegion); RegionCopy(offman->FreeBoxes, FullRegion); offman->pScreen = pScreen; offman->UsedAreas = NULL; offman->LinearAreas = NULL; offman->NumUsedAreas = 0; offman->NumCallbacks = 0; offman->FreeBoxesUpdateCallback = NULL; offman->devPrivates = NULL; return TRUE; } Bool xf86InitFBManagerLinear(ScreenPtr pScreen, int offset, int size) { FBManagerPtr offman; FBLinearLinkPtr link; FBLinearPtr linear; if (size <= 0) return FALSE; /* we expect people to have called the Area setup first for pixmap cache */ if (!dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey)) return FALSE; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); offman->LinearAreas = malloc(sizeof(FBLinearLink)); if (!offman->LinearAreas) return FALSE; link = offman->LinearAreas; link->area = NULL; link->next = NULL; link->free = 1; linear = &(link->linear); linear->pScreen = pScreen; linear->size = size; linear->offset = offset; linear->granularity = 0; linear->MoveLinearCallback = NULL; linear->RemoveLinearCallback = NULL; linear->devPrivate.ptr = NULL; return TRUE; } /* This is an implementation specific function and should disappear after the next release. People should use the real linear functions instead */ FBAreaPtr xf86AllocateLinearOffscreenArea(ScreenPtr pScreen, int length, int gran, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, void *privData) { FBManagerFuncsPtr funcs; FBManagerPtr offman; BoxPtr extents; int w, h; if (xf86FBManagerKey == NULL) return NULL; if (!(funcs = (FBManagerFuncsPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey))) return NULL; offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); extents = RegionExtents(offman->InitialBoxes); w = extents->x2 - extents->x1; if (gran > 1) { if (gran > w) return NULL; if (w % gran) length += gran - 1; } if (length <= w) { /* special case */ h = 1; w = length; } else { h = (length + w - 1) / w; } return (*funcs->AllocateOffscreenArea) (pScreen, w, h, gran, moveCB, removeCB, privData); } xorg-server-21.1.16/hw/xfree86/common/xf86cmap.c0000644000175000017500000010700114757411105014627 /* * Copyright (c) 1998-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #if defined(_XOPEN_SOURCE) || defined(__sun) && defined(__SVR4) #include #else #define _XOPEN_SOURCE /* to get prototype for pow on some systems */ #include #undef _XOPEN_SOURCE #endif #include #include "misc.h" #include #include "colormapst.h" #include "scrnintstr.h" #include "resource.h" #include "xf86.h" #include "xf86_OSproc.h" #include "xf86str.h" #include "micmap.h" #include "xf86RandR12.h" #include "xf86Crtc.h" #ifdef XFreeXDGA #include #include "dgaproc.h" #endif #include "xf86cmap.h" #define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = \ ((CMapScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, CMapScreenKey))->field) #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) #define LOAD_PALETTE(pmap) \ ((pmap == GetInstalledmiColormap(pmap->pScreen)) && \ ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || \ xf86ScreenToScrn(pmap->pScreen)->vtSema || pScreenPriv->isDGAmode)) typedef struct _CMapLink { ColormapPtr cmap; struct _CMapLink *next; } CMapLink, *CMapLinkPtr; typedef struct { CloseScreenProcPtr CloseScreen; CreateColormapProcPtr CreateColormap; DestroyColormapProcPtr DestroyColormap; InstallColormapProcPtr InstallColormap; StoreColorsProcPtr StoreColors; Bool (*EnterVT) (ScrnInfoPtr); Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr); int (*SetDGAMode) (ScrnInfoPtr, int, DGADevicePtr); xf86ChangeGammaProc *ChangeGamma; int maxColors; int sigRGBbits; int gammaElements; LOCO *gamma; int *PreAllocIndices; CMapLinkPtr maps; unsigned int flags; Bool isDGAmode; } CMapScreenRec, *CMapScreenPtr; typedef struct { int numColors; LOCO *colors; Bool recalculate; int overscan; } CMapColormapRec, *CMapColormapPtr; static DevPrivateKeyRec CMapScreenKeyRec; #define CMapScreenKeyRegistered dixPrivateKeyRegistered(&CMapScreenKeyRec) #define CMapScreenKey (&CMapScreenKeyRec) static DevPrivateKeyRec CMapColormapKeyRec; #define CMapColormapKey (&CMapColormapKeyRec) static void CMapInstallColormap(ColormapPtr); static void CMapStoreColors(ColormapPtr, int, xColorItem *); static Bool CMapCloseScreen(ScreenPtr); static Bool CMapCreateColormap(ColormapPtr); static void CMapDestroyColormap(ColormapPtr); static Bool CMapEnterVT(ScrnInfoPtr); static Bool CMapSwitchMode(ScrnInfoPtr, DisplayModePtr); #ifdef XFreeXDGA static int CMapSetDGAMode(ScrnInfoPtr, int, DGADevicePtr); #endif static int CMapChangeGamma(ScrnInfoPtr, Gamma); static void ComputeGamma(ScrnInfoPtr, CMapScreenPtr); static Bool CMapAllocateColormapPrivate(ColormapPtr); static void CMapRefreshColors(ColormapPtr, int, int *); static void CMapSetOverscan(ColormapPtr, int, int *); static void CMapReinstallMap(ColormapPtr); static void CMapUnwrapScreen(ScreenPtr pScreen); Bool xf86ColormapAllocatePrivates(ScrnInfoPtr pScrn) { if (!dixRegisterPrivateKey(&CMapScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&CMapColormapKeyRec, PRIVATE_COLORMAP, 0)) return FALSE; return TRUE; } Bool xf86HandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, xf86LoadPaletteProc * loadPalette, xf86SetOverscanProc * setOverscan, unsigned int flags) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ColormapPtr pDefMap = NULL; CMapScreenPtr pScreenPriv; LOCO *gamma; int *indices; int elements; if (!maxColors || !sigRGBbits || (!loadPalette && !xf86_crtc_supports_gamma(pScrn))) return FALSE; elements = 1 << sigRGBbits; if (!(gamma = xallocarray(elements, sizeof(LOCO)))) return FALSE; if (!(indices = xallocarray(maxColors, sizeof(int)))) { free(gamma); return FALSE; } if (!(pScreenPriv = malloc(sizeof(CMapScreenRec)))) { free(gamma); free(indices); return FALSE; } dixSetPrivate(&pScreen->devPrivates, &CMapScreenKeyRec, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreenPriv->CreateColormap = pScreen->CreateColormap; pScreenPriv->DestroyColormap = pScreen->DestroyColormap; pScreenPriv->InstallColormap = pScreen->InstallColormap; pScreenPriv->StoreColors = pScreen->StoreColors; pScreen->CloseScreen = CMapCloseScreen; pScreen->CreateColormap = CMapCreateColormap; pScreen->DestroyColormap = CMapDestroyColormap; pScreen->InstallColormap = CMapInstallColormap; pScreen->StoreColors = CMapStoreColors; pScrn->LoadPalette = loadPalette; pScrn->SetOverscan = setOverscan; pScreenPriv->maxColors = maxColors; pScreenPriv->sigRGBbits = sigRGBbits; pScreenPriv->gammaElements = elements; pScreenPriv->gamma = gamma; pScreenPriv->PreAllocIndices = indices; pScreenPriv->maps = NULL; pScreenPriv->flags = flags; pScreenPriv->isDGAmode = FALSE; pScreenPriv->EnterVT = pScrn->EnterVT; pScreenPriv->SwitchMode = pScrn->SwitchMode; pScreenPriv->SetDGAMode = pScrn->SetDGAMode; pScreenPriv->ChangeGamma = pScrn->ChangeGamma; if (!(flags & CMAP_LOAD_EVEN_IF_OFFSCREEN)) { pScrn->EnterVT = CMapEnterVT; if ((flags & CMAP_RELOAD_ON_MODE_SWITCH) && pScrn->SwitchMode) pScrn->SwitchMode = CMapSwitchMode; } #ifdef XFreeXDGA pScrn->SetDGAMode = CMapSetDGAMode; #endif pScrn->ChangeGamma = CMapChangeGamma; ComputeGamma(pScrn, pScreenPriv); /* get the default map */ dixLookupResourceByType((void **) &pDefMap, pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); if (!CMapAllocateColormapPrivate(pDefMap)) { CMapUnwrapScreen(pScreen); return FALSE; } if (xf86_crtc_supports_gamma(pScrn)) { pScrn->LoadPalette = xf86RandR12LoadPalette; if (!xf86RandR12InitGamma(pScrn, elements)) { CMapUnwrapScreen(pScreen); return FALSE; } } /* Force the initial map to be loaded */ SetInstalledmiColormap(pScreen, NULL); CMapInstallColormap(pDefMap); return TRUE; } /**** Screen functions ****/ static Bool CMapCloseScreen(ScreenPtr pScreen) { CMapUnwrapScreen(pScreen); return (*pScreen->CloseScreen) (pScreen); } static Bool CMapColormapUseMax(VisualPtr pVisual, CMapScreenPtr pScreenPriv) { if (pVisual->nplanes > 16) return TRUE; return ((1 << pVisual->nplanes) > pScreenPriv->maxColors); } static Bool CMapAllocateColormapPrivate(ColormapPtr pmap) { CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pmap->pScreen->devPrivates, CMapScreenKey); CMapColormapPtr pColPriv; CMapLinkPtr pLink; int numColors; LOCO *colors; if (CMapColormapUseMax(pmap->pVisual, pScreenPriv)) numColors = pmap->pVisual->ColormapEntries; else numColors = 1 << pmap->pVisual->nplanes; if (!(colors = xallocarray(numColors, sizeof(LOCO)))) return FALSE; if (!(pColPriv = malloc(sizeof(CMapColormapRec)))) { free(colors); return FALSE; } dixSetPrivate(&pmap->devPrivates, CMapColormapKey, pColPriv); pColPriv->numColors = numColors; pColPriv->colors = colors; pColPriv->recalculate = TRUE; pColPriv->overscan = -1; /* add map to list */ pLink = malloc(sizeof(CMapLink)); if (pLink) { pLink->cmap = pmap; pLink->next = pScreenPriv->maps; pScreenPriv->maps = pLink; } return TRUE; } static Bool CMapCreateColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); Bool ret = FALSE; pScreen->CreateColormap = pScreenPriv->CreateColormap; if ((*pScreen->CreateColormap) (pmap)) { if (CMapAllocateColormapPrivate(pmap)) ret = TRUE; } pScreen->CreateColormap = CMapCreateColormap; return ret; } static void CMapDestroyColormap(ColormapPtr cmap) { ScreenPtr pScreen = cmap->pScreen; CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); CMapColormapPtr pColPriv = (CMapColormapPtr) dixLookupPrivate(&cmap->devPrivates, CMapColormapKey); CMapLinkPtr prevLink = NULL, pLink = pScreenPriv->maps; if (pColPriv) { free(pColPriv->colors); free(pColPriv); } /* remove map from list */ while (pLink) { if (pLink->cmap == cmap) { if (prevLink) prevLink->next = pLink->next; else pScreenPriv->maps = pLink->next; free(pLink); break; } prevLink = pLink; pLink = pLink->next; } if (pScreenPriv->DestroyColormap) { pScreen->DestroyColormap = pScreenPriv->DestroyColormap; (*pScreen->DestroyColormap) (cmap); pScreen->DestroyColormap = CMapDestroyColormap; } } static void CMapStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs) { ScreenPtr pScreen = pmap->pScreen; VisualPtr pVisual = pmap->pVisual; CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); int *indices = pScreenPriv->PreAllocIndices; int num = ndef; /* At the moment this isn't necessary since there's nobody below us */ pScreen->StoreColors = pScreenPriv->StoreColors; (*pScreen->StoreColors) (pmap, ndef, pdefs); pScreen->StoreColors = CMapStoreColors; /* should never get here for these */ if ((pVisual->class == TrueColor) || (pVisual->class == StaticColor) || (pVisual->class == StaticGray)) return; if (pVisual->class == DirectColor) { CMapColormapPtr pColPriv = (CMapColormapPtr) dixLookupPrivate(&pmap->devPrivates, CMapColormapKey); int i; if (CMapColormapUseMax(pVisual, pScreenPriv)) { int index; num = 0; while (ndef--) { if (pdefs[ndef].flags & DoRed) { index = (pdefs[ndef].pixel & pVisual->redMask) >> pVisual->offsetRed; i = num; while (i--) if (indices[i] == index) break; if (i == -1) indices[num++] = index; } if (pdefs[ndef].flags & DoGreen) { index = (pdefs[ndef].pixel & pVisual->greenMask) >> pVisual->offsetGreen; i = num; while (i--) if (indices[i] == index) break; if (i == -1) indices[num++] = index; } if (pdefs[ndef].flags & DoBlue) { index = (pdefs[ndef].pixel & pVisual->blueMask) >> pVisual->offsetBlue; i = num; while (i--) if (indices[i] == index) break; if (i == -1) indices[num++] = index; } } } else { /* not really as overkill as it seems */ num = pColPriv->numColors; for (i = 0; i < pColPriv->numColors; i++) indices[i] = i; } } else { while (ndef--) indices[ndef] = pdefs[ndef].pixel; } CMapRefreshColors(pmap, num, indices); } static void CMapInstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if (pmap == GetInstalledmiColormap(pmap->pScreen)) return; pScreen->InstallColormap = pScreenPriv->InstallColormap; (*pScreen->InstallColormap) (pmap); pScreen->InstallColormap = CMapInstallColormap; /* Important. We let the lower layers, namely DGA, overwrite the choice of Colormap to install */ if (GetInstalledmiColormap(pmap->pScreen)) pmap = GetInstalledmiColormap(pmap->pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pmap->pVisual->class == TrueColor) && CMapColormapUseMax(pmap->pVisual, pScreenPriv)) return; if (LOAD_PALETTE(pmap)) CMapReinstallMap(pmap); } /**** ScrnInfoRec functions ****/ static Bool CMapEnterVT(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); Bool ret; CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); pScrn->EnterVT = pScreenPriv->EnterVT; ret = (*pScreenPriv->EnterVT) (pScrn); pScreenPriv->EnterVT = pScrn->EnterVT; pScrn->EnterVT = CMapEnterVT; if (ret) { if (GetInstalledmiColormap(pScreen)) CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; } static Bool CMapSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if ((*pScreenPriv->SwitchMode) (pScrn, mode)) { if (GetInstalledmiColormap(pScreen)) CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; } #ifdef XFreeXDGA static int CMapSetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr dev) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); int ret; ret = (*pScreenPriv->SetDGAMode) (pScrn, num, dev); pScreenPriv->isDGAmode = DGAActive(pScrn->scrnIndex); if (!pScreenPriv->isDGAmode && GetInstalledmiColormap(pScreen) && xf86ScreenToScrn(pScreen)->vtSema) CMapReinstallMap(GetInstalledmiColormap(pScreen)); return ret; } #endif /**** Utilities ****/ static void CMapReinstallMap(ColormapPtr pmap) { CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pmap->pScreen->devPrivates, CMapScreenKey); CMapColormapPtr cmapPriv = (CMapColormapPtr) dixLookupPrivate(&pmap->devPrivates, CMapColormapKey); ScrnInfoPtr pScrn = xf86ScreenToScrn(pmap->pScreen); int i = cmapPriv->numColors; int *indices = pScreenPriv->PreAllocIndices; while (i--) indices[i] = i; if (cmapPriv->recalculate) CMapRefreshColors(pmap, cmapPriv->numColors, indices); else { (*pScrn->LoadPalette) (pScrn, cmapPriv->numColors, indices, cmapPriv->colors, pmap->pVisual); if (pScrn->SetOverscan) { #ifdef DEBUGOVERSCAN ErrorF("SetOverscan() called from CMapReinstallMap\n"); #endif pScrn->SetOverscan(pScrn, cmapPriv->overscan); } } cmapPriv->recalculate = FALSE; } static void CMapRefreshColors(ColormapPtr pmap, int defs, int *indices) { CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pmap->pScreen->devPrivates, CMapScreenKey); CMapColormapPtr pColPriv = (CMapColormapPtr) dixLookupPrivate(&pmap->devPrivates, CMapColormapKey); VisualPtr pVisual = pmap->pVisual; ScrnInfoPtr pScrn = xf86ScreenToScrn(pmap->pScreen); int numColors, i; LOCO *gamma, *colors; EntryPtr entry; int reds, greens, blues, maxValue, index, shift; numColors = pColPriv->numColors; shift = 16 - pScreenPriv->sigRGBbits; maxValue = (1 << pScreenPriv->sigRGBbits) - 1; gamma = pScreenPriv->gamma; colors = pColPriv->colors; reds = pVisual->redMask >> pVisual->offsetRed; greens = pVisual->greenMask >> pVisual->offsetGreen; blues = pVisual->blueMask >> pVisual->offsetBlue; switch (pVisual->class) { case StaticGray: for (i = 0; i < numColors; i++) { index = (i + 1) * maxValue / numColors; colors[i].red = gamma[index].red; colors[i].green = gamma[index].green; colors[i].blue = gamma[index].blue; } break; case TrueColor: if (CMapColormapUseMax(pVisual, pScreenPriv)) { for (i = 0; i <= reds; i++) colors[i].red = gamma[i * maxValue / reds].red; for (i = 0; i <= greens; i++) colors[i].green = gamma[i * maxValue / greens].green; for (i = 0; i <= blues; i++) colors[i].blue = gamma[i * maxValue / blues].blue; break; } for (i = 0; i < numColors; i++) { colors[i].red = gamma[((i >> pVisual->offsetRed) & reds) * maxValue / reds].red; colors[i].green = gamma[((i >> pVisual->offsetGreen) & greens) * maxValue / greens].green; colors[i].blue = gamma[((i >> pVisual->offsetBlue) & blues) * maxValue / blues].blue; } break; case StaticColor: case PseudoColor: case GrayScale: for (i = 0; i < defs; i++) { index = indices[i]; entry = (EntryPtr) &pmap->red[index]; if (entry->fShared) { colors[index].red = gamma[entry->co.shco.red->color >> shift].red; colors[index].green = gamma[entry->co.shco.green->color >> shift].green; colors[index].blue = gamma[entry->co.shco.blue->color >> shift].blue; } else { colors[index].red = gamma[entry->co.local.red >> shift].red; colors[index].green = gamma[entry->co.local.green >> shift].green; colors[index].blue = gamma[entry->co.local.blue >> shift].blue; } } break; case DirectColor: if (CMapColormapUseMax(pVisual, pScreenPriv)) { for (i = 0; i < defs; i++) { index = indices[i]; if (index <= reds) colors[index].red = gamma[pmap->red[index].co.local.red >> shift].red; if (index <= greens) colors[index].green = gamma[pmap->green[index].co.local.green >> shift].green; if (index <= blues) colors[index].blue = gamma[pmap->blue[index].co.local.blue >> shift].blue; } break; } for (i = 0; i < defs; i++) { index = indices[i]; colors[index].red = gamma[pmap->red[(index >> pVisual-> offsetRed) & reds].co.local. red >> shift].red; colors[index].green = gamma[pmap->green[(index >> pVisual->offsetGreen) & greens].co. local.green >> shift].green; colors[index].blue = gamma[pmap->blue[(index >> pVisual->offsetBlue) & blues].co. local.blue >> shift].blue; } break; } if (LOAD_PALETTE(pmap)) (*pScrn->LoadPalette) (pScrn, defs, indices, colors, pmap->pVisual); if (pScrn->SetOverscan) CMapSetOverscan(pmap, defs, indices); } static Bool CMapCompareColors(LOCO * color1, LOCO * color2) { /* return TRUE if the color1 is "closer" to black than color2 */ #ifdef DEBUGOVERSCAN ErrorF("#%02x%02x%02x vs #%02x%02x%02x (%d vs %d)\n", color1->red, color1->green, color1->blue, color2->red, color2->green, color2->blue, color1->red + color1->green + color1->blue, color2->red + color2->green + color2->blue); #endif return (color1->red + color1->green + color1->blue < color2->red + color2->green + color2->blue); } static void CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) { CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pmap->pScreen->devPrivates, CMapScreenKey); CMapColormapPtr pColPriv = (CMapColormapPtr) dixLookupPrivate(&pmap->devPrivates, CMapColormapKey); ScrnInfoPtr pScrn = xf86ScreenToScrn(pmap->pScreen); VisualPtr pVisual = pmap->pVisual; int i; LOCO *colors; int index; Bool newOverscan = FALSE; int overscan, tmpOverscan; colors = pColPriv->colors; overscan = pColPriv->overscan; /* * Search for a new overscan index in the following cases: * * - The index hasn't yet been initialised.  In this case search * for an index that is black or a close match to black. * * - The colour of the old index is changed. In this case search * all indices for a black or close match to black. * * - The colour of the old index wasn't black. In this case only * search the indices that were changed for a better match to black. */ switch (pVisual->class) { case StaticGray: case TrueColor: /* Should only come here once. Initialise the overscan index to 0 */ overscan = 0; newOverscan = TRUE; break; case StaticColor: /* * Only come here once, but search for the overscan in the same way * as for the other cases. */ case DirectColor: case PseudoColor: case GrayScale: if (overscan < 0 || overscan > pScreenPriv->maxColors - 1) { /* Uninitialised */ newOverscan = TRUE; } else { /* Check if the overscan was changed */ for (i = 0; i < defs; i++) { index = indices[i]; if (index == overscan) { newOverscan = TRUE; break; } } } if (newOverscan) { /* The overscan is either uninitialised or it has been changed */ if (overscan < 0 || overscan > pScreenPriv->maxColors - 1) tmpOverscan = pScreenPriv->maxColors - 1; else tmpOverscan = overscan; /* search all entries for a close match to black */ for (i = pScreenPriv->maxColors - 1; i >= 0; i--) { if (colors[i].red == 0 && colors[i].green == 0 && colors[i].blue == 0) { overscan = i; #ifdef DEBUGOVERSCAN ErrorF("Black found at index 0x%02x\n", i); #endif break; } else { #ifdef DEBUGOVERSCAN ErrorF("0x%02x: ", i); #endif if (CMapCompareColors(&colors[i], &colors[tmpOverscan])) { tmpOverscan = i; #ifdef DEBUGOVERSCAN ErrorF("possible \"Black\" at index 0x%02x\n", i); #endif } } } if (i < 0) overscan = tmpOverscan; } else { /* Check of the old overscan wasn't black */ if (colors[overscan].red != 0 || colors[overscan].green != 0 || colors[overscan].blue != 0) { int oldOverscan = tmpOverscan = overscan; /* See of there is now a better match */ for (i = 0; i < defs; i++) { index = indices[i]; if (colors[index].red == 0 && colors[index].green == 0 && colors[index].blue == 0) { overscan = index; #ifdef DEBUGOVERSCAN ErrorF("Black found at index 0x%02x\n", index); #endif break; } else { #ifdef DEBUGOVERSCAN ErrorF("0x%02x: ", index); #endif if (CMapCompareColors(&colors[index], &colors[tmpOverscan])) { tmpOverscan = index; #ifdef DEBUGOVERSCAN ErrorF("possible \"Black\" at index 0x%02x\n", index); #endif } } } if (i == defs) overscan = tmpOverscan; if (overscan != oldOverscan) newOverscan = TRUE; } } break; } if (newOverscan) { pColPriv->overscan = overscan; if (LOAD_PALETTE(pmap)) { #ifdef DEBUGOVERSCAN ErrorF("SetOverscan() called from CmapSetOverscan\n"); #endif pScrn->SetOverscan(pScrn, overscan); } } } static void CMapUnwrapScreen(ScreenPtr pScreen) { CMapScreenPtr pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->CreateColormap = pScreenPriv->CreateColormap; pScreen->DestroyColormap = pScreenPriv->DestroyColormap; pScreen->InstallColormap = pScreenPriv->InstallColormap; pScreen->StoreColors = pScreenPriv->StoreColors; pScrn->EnterVT = pScreenPriv->EnterVT; pScrn->SwitchMode = pScreenPriv->SwitchMode; pScrn->SetDGAMode = pScreenPriv->SetDGAMode; pScrn->ChangeGamma = pScreenPriv->ChangeGamma; free(pScreenPriv->gamma); free(pScreenPriv->PreAllocIndices); free(pScreenPriv); } static void ComputeGamma(ScrnInfoPtr pScrn, CMapScreenPtr priv) { int elements = priv->gammaElements - 1; double RedGamma, GreenGamma, BlueGamma; int i; #ifndef DONT_CHECK_GAMMA /* This check is to catch drivers that are not initialising pScrn->gamma */ if (pScrn->gamma.red < GAMMA_MIN || pScrn->gamma.red > GAMMA_MAX || pScrn->gamma.green < GAMMA_MIN || pScrn->gamma.green > GAMMA_MAX || pScrn->gamma.blue < GAMMA_MIN || pScrn->gamma.blue > GAMMA_MAX) { xf86DrvMsgVerb(pScrn->scrnIndex, X_WARNING, 0, "The %s driver didn't call xf86SetGamma() to initialise\n" "\tthe gamma values.\n", pScrn->driverName); xf86DrvMsgVerb(pScrn->scrnIndex, X_WARNING, 0, "PLEASE FIX THE `%s' DRIVER!\n", pScrn->driverName); pScrn->gamma.red = 1.0; pScrn->gamma.green = 1.0; pScrn->gamma.blue = 1.0; } #endif RedGamma = 1.0 / (double) pScrn->gamma.red; GreenGamma = 1.0 / (double) pScrn->gamma.green; BlueGamma = 1.0 / (double) pScrn->gamma.blue; for (i = 0; i <= elements; i++) { if (RedGamma == 1.0) priv->gamma[i].red = i; else priv->gamma[i].red = (CARD16) (pow((double) i / (double) elements, RedGamma) * (double) elements + 0.5); if (GreenGamma == 1.0) priv->gamma[i].green = i; else priv->gamma[i].green = (CARD16) (pow((double) i / (double) elements, GreenGamma) * (double) elements + 0.5); if (BlueGamma == 1.0) priv->gamma[i].blue = i; else priv->gamma[i].blue = (CARD16) (pow((double) i / (double) elements, BlueGamma) * (double) elements + 0.5); } } int CMapChangeGamma(ScrnInfoPtr pScrn, Gamma gamma) { int ret = Success; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); CMapColormapPtr pColPriv; CMapScreenPtr pScreenPriv; CMapLinkPtr pLink; /* Is this sufficient checking ? */ if (!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if (!pScreenPriv) return BadImplementation; if (gamma.red < GAMMA_MIN || gamma.red > GAMMA_MAX || gamma.green < GAMMA_MIN || gamma.green > GAMMA_MAX || gamma.blue < GAMMA_MIN || gamma.blue > GAMMA_MAX) return BadValue; pScrn->gamma.red = gamma.red; pScrn->gamma.green = gamma.green; pScrn->gamma.blue = gamma.blue; ComputeGamma(pScrn, pScreenPriv); /* mark all colormaps on this screen */ pLink = pScreenPriv->maps; while (pLink) { pColPriv = (CMapColormapPtr) dixLookupPrivate(&pLink->cmap->devPrivates, CMapColormapKey); pColPriv->recalculate = TRUE; pLink = pLink->next; } if (GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && CMapColormapUseMax(pMap->pVisual, pScreenPriv)) { /* if the current map doesn't have a palette look for another map to change the gamma on. */ pLink = pScreenPriv->maps; while (pLink) { if (pLink->cmap->pVisual->class == PseudoColor) break; pLink = pLink->next; } if (pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); } pScrn->ChangeGamma = pScreenPriv->ChangeGamma; if (pScrn->ChangeGamma) ret = pScrn->ChangeGamma(pScrn, gamma); pScrn->ChangeGamma = CMapChangeGamma; return ret; } static void ComputeGammaRamp(CMapScreenPtr priv, unsigned short *red, unsigned short *green, unsigned short *blue) { int elements = priv->gammaElements; LOCO *entry = priv->gamma; int shift = 16 - priv->sigRGBbits; while (elements--) { entry->red = *(red++) >> shift; entry->green = *(green++) >> shift; entry->blue = *(blue++) >> shift; entry++; } } int xf86ChangeGammaRamp(ScreenPtr pScreen, int size, unsigned short *red, unsigned short *green, unsigned short *blue) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CMapColormapPtr pColPriv; CMapScreenPtr pScreenPriv; CMapLinkPtr pLink; if (!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if (!pScreenPriv) return BadImplementation; if (pScreenPriv->gammaElements != size) return BadValue; ComputeGammaRamp(pScreenPriv, red, green, blue); /* mark all colormaps on this screen */ pLink = pScreenPriv->maps; while (pLink) { pColPriv = (CMapColormapPtr) dixLookupPrivate(&pLink->cmap->devPrivates, CMapColormapKey); pColPriv->recalculate = TRUE; pLink = pLink->next; } if (GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && CMapColormapUseMax(pMap->pVisual, pScreenPriv)) { /* if the current map doesn't have a palette look for another map to change the gamma on. */ pLink = pScreenPriv->maps; while (pLink) { if (pLink->cmap->pVisual->class == PseudoColor) break; pLink = pLink->next; } if (pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); } return Success; } int xf86GetGammaRampSize(ScreenPtr pScreen) { CMapScreenPtr pScreenPriv; if (!CMapScreenKeyRegistered) return 0; pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if (!pScreenPriv) return 0; return pScreenPriv->gammaElements; } int xf86GetGammaRamp(ScreenPtr pScreen, int size, unsigned short *red, unsigned short *green, unsigned short *blue) { CMapScreenPtr pScreenPriv; LOCO *entry; int shift, sigbits; if (!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr) dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); if (!pScreenPriv) return BadImplementation; if (size > pScreenPriv->gammaElements) return BadValue; entry = pScreenPriv->gamma; sigbits = pScreenPriv->sigRGBbits; while (size--) { *red = entry->red << (16 - sigbits); *green = entry->green << (16 - sigbits); *blue = entry->blue << (16 - sigbits); shift = sigbits; while (shift < 16) { *red |= *red >> shift; *green |= *green >> shift; *blue |= *blue >> shift; shift += sigbits; } red++; green++; blue++; entry++; } return Success; } int xf86ChangeGamma(ScreenPtr pScreen, Gamma gamma) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (pScrn->ChangeGamma) return (*pScrn->ChangeGamma) (pScrn, gamma); return BadImplementation; } xorg-server-21.1.16/hw/xfree86/common/xf86Helper.c0000644000175000017500000014224514757411105015137 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * Authors: Dirk Hohndel * David Dawes * ... and others * * This file includes the helper functions that the server provides for * different drivers. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "mi.h" #include "os.h" #include "servermd.h" #include "pixmapstr.h" #include "windowstr.h" #include "propertyst.h" #include "gcstruct.h" #include "loaderProcs.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "micmap.h" #include "xf86DDC.h" #include "xf86Xinput.h" #include "xf86InPriv.h" #include "mivalidate.h" /* For xf86GetClocks */ #if defined(CSRG_BASED) || defined(__GNU__) #define HAS_SETPRIORITY #include #endif static int xf86ScrnInfoPrivateCount = 0; /* Add a pointer to a new DriverRec to xf86DriverList */ void xf86AddDriver(DriverPtr driver, void *module, int flags) { /* Don't add null entries */ if (!driver) return; if (xf86DriverList == NULL) xf86NumDrivers = 0; xf86NumDrivers++; xf86DriverList = xnfreallocarray(xf86DriverList, xf86NumDrivers, sizeof(DriverPtr)); xf86DriverList[xf86NumDrivers - 1] = xnfalloc(sizeof(DriverRec)); *xf86DriverList[xf86NumDrivers - 1] = *driver; xf86DriverList[xf86NumDrivers - 1]->module = module; xf86DriverList[xf86NumDrivers - 1]->refCount = 0; } void xf86DeleteDriver(int drvIndex) { if (xf86DriverList[drvIndex] && (!xf86DriverHasEntities(xf86DriverList[drvIndex]))) { if (xf86DriverList[drvIndex]->module) UnloadModule(xf86DriverList[drvIndex]->module); free(xf86DriverList[drvIndex]); xf86DriverList[drvIndex] = NULL; } } /* Add a pointer to a new InputDriverRec to xf86InputDriverList */ void xf86AddInputDriver(InputDriverPtr driver, void *module, int flags) { /* Don't add null entries */ if (!driver) return; if (xf86InputDriverList == NULL) xf86NumInputDrivers = 0; xf86NumInputDrivers++; xf86InputDriverList = xnfreallocarray(xf86InputDriverList, xf86NumInputDrivers, sizeof(InputDriverPtr)); xf86InputDriverList[xf86NumInputDrivers - 1] = xnfalloc(sizeof(InputDriverRec)); *xf86InputDriverList[xf86NumInputDrivers - 1] = *driver; xf86InputDriverList[xf86NumInputDrivers - 1]->module = module; } void xf86DeleteInputDriver(int drvIndex) { if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module) UnloadModule(xf86InputDriverList[drvIndex]->module); free(xf86InputDriverList[drvIndex]); xf86InputDriverList[drvIndex] = NULL; } InputDriverPtr xf86LookupInputDriver(const char *name) { int i; for (i = 0; i < xf86NumInputDrivers; i++) { if (xf86InputDriverList[i] && xf86InputDriverList[i]->driverName && xf86NameCmp(name, xf86InputDriverList[i]->driverName) == 0) return xf86InputDriverList[i]; } return NULL; } InputInfoPtr xf86LookupInput(const char *name) { InputInfoPtr p; for (p = xf86InputDevs; p != NULL; p = p->next) { if (strcmp(name, p->name) == 0) return p; } return NULL; } /* Allocate a new ScrnInfoRec in xf86Screens */ ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags) { int i; ScrnInfoPtr pScrn; if (flags & XF86_ALLOCATE_GPU_SCREEN) { if (xf86GPUScreens == NULL) xf86NumGPUScreens = 0; i = xf86NumGPUScreens++; xf86GPUScreens = xnfreallocarray(xf86GPUScreens, xf86NumGPUScreens, sizeof(ScrnInfoPtr)); xf86GPUScreens[i] = xnfcalloc(sizeof(ScrnInfoRec), 1); pScrn = xf86GPUScreens[i]; pScrn->scrnIndex = i + GPU_SCREEN_OFFSET; /* Changes when a screen is removed */ pScrn->is_gpu = TRUE; } else { if (xf86Screens == NULL) xf86NumScreens = 0; i = xf86NumScreens++; xf86Screens = xnfreallocarray(xf86Screens, xf86NumScreens, sizeof(ScrnInfoPtr)); xf86Screens[i] = xnfcalloc(sizeof(ScrnInfoRec), 1); pScrn = xf86Screens[i]; pScrn->scrnIndex = i; /* Changes when a screen is removed */ } pScrn->origIndex = pScrn->scrnIndex; /* This never changes */ pScrn->privates = xnfcalloc(sizeof(DevUnion), xf86ScrnInfoPrivateCount); /* * EnableDisableFBAccess now gets initialized in InitOutput() * pScrn->EnableDisableFBAccess = xf86EnableDisableFBAccess; */ pScrn->drv = drv; drv->refCount++; pScrn->module = DuplicateModule(drv->module, NULL); pScrn->DriverFunc = drv->driverFunc; return pScrn; } /* * Remove an entry from xf86Screens. Ideally it should free all allocated * data. To do this properly may require a driver hook. */ void xf86DeleteScreen(ScrnInfoPtr pScrn) { int i; int scrnIndex; Bool is_gpu = FALSE; if (!pScrn) return; if (pScrn->is_gpu) { /* First check if the screen is valid */ if (xf86NumGPUScreens == 0 || xf86GPUScreens == NULL) return; is_gpu = TRUE; } else { /* First check if the screen is valid */ if (xf86NumScreens == 0 || xf86Screens == NULL) return; } scrnIndex = pScrn->scrnIndex; /* If a FreeScreen function is defined, call it here */ if (pScrn->FreeScreen != NULL) pScrn->FreeScreen(pScrn); while (pScrn->modes) xf86DeleteMode(&pScrn->modes, pScrn->modes); while (pScrn->modePool) xf86DeleteMode(&pScrn->modePool, pScrn->modePool); xf86OptionListFree(pScrn->options); if (pScrn->module) UnloadModule(pScrn->module); if (pScrn->drv) pScrn->drv->refCount--; free(pScrn->privates); xf86ClearEntityListForScreen(pScrn); free(pScrn); /* Move the other entries down, updating their scrnIndex fields */ if (is_gpu) { xf86NumGPUScreens--; scrnIndex -= GPU_SCREEN_OFFSET; for (i = scrnIndex; i < xf86NumGPUScreens; i++) { xf86GPUScreens[i] = xf86GPUScreens[i + 1]; xf86GPUScreens[i]->scrnIndex = i + GPU_SCREEN_OFFSET; /* Also need to take care of the screen layout settings */ } } else { xf86NumScreens--; for (i = scrnIndex; i < xf86NumScreens; i++) { xf86Screens[i] = xf86Screens[i + 1]; xf86Screens[i]->scrnIndex = i; /* Also need to take care of the screen layout settings */ } } } /* * Allocate a private in ScrnInfoRec. */ int xf86AllocateScrnInfoPrivateIndex(void) { int idx, i; ScrnInfoPtr pScr; DevUnion *nprivs; idx = xf86ScrnInfoPrivateCount++; for (i = 0; i < xf86NumScreens; i++) { pScr = xf86Screens[i]; nprivs = xnfreallocarray(pScr->privates, xf86ScrnInfoPrivateCount, sizeof(DevUnion)); /* Zero the new private */ memset(&nprivs[idx], 0, sizeof(DevUnion)); pScr->privates = nprivs; } for (i = 0; i < xf86NumGPUScreens; i++) { pScr = xf86GPUScreens[i]; nprivs = xnfreallocarray(pScr->privates, xf86ScrnInfoPrivateCount, sizeof(DevUnion)); /* Zero the new private */ memset(&nprivs[idx], 0, sizeof(DevUnion)); pScr->privates = nprivs; } return idx; } Bool xf86AddPixFormat(ScrnInfoPtr pScrn, int depth, int bpp, int pad) { int i; if (pScrn->numFormats >= MAXFORMATS) return FALSE; if (bpp <= 0) { if (depth == 1) bpp = 1; else if (depth <= 8) bpp = 8; else if (depth <= 16) bpp = 16; else if (depth <= 32) bpp = 32; else return FALSE; } if (pad <= 0) pad = BITMAP_SCANLINE_PAD; i = pScrn->numFormats++; pScrn->formats[i].depth = depth; pScrn->formats[i].bitsPerPixel = bpp; pScrn->formats[i].scanlinePad = pad; return TRUE; } /* * Set the depth we are using based on (in the following order of preference): * - values given on the command line * - values given in the config file * - values provided by the driver * - an overall default when nothing else is given * * Also find a Display subsection matching the depth/bpp found. * * Sets the following ScrnInfoRec fields: * bitsPerPixel, depth, display, imageByteOrder, * bitmapScanlinePad, bitmapScanlineUnit, bitmapBitOrder, numFormats, * formats, fbFormat. */ /* Can the screen handle 32 bpp pixmaps */ #define DO_PIX32(f) ((f & Support32bppFb) || \ ((f & Support24bppFb) && (f & SupportConvert32to24))) #ifndef GLOBAL_DEFAULT_DEPTH #define GLOBAL_DEFAULT_DEPTH 24 #endif Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, int depth24flags) { int i; DispPtr disp; scrp->bitsPerPixel = -1; scrp->depth = -1; scrp->bitsPerPixelFrom = X_DEFAULT; scrp->depthFrom = X_DEFAULT; if (xf86FbBpp > 0) { if (xf86FbBpp == 24) /* lol no */ xf86FbBpp = 32; scrp->bitsPerPixel = xf86FbBpp; scrp->bitsPerPixelFrom = X_CMDLINE; } if (xf86Depth > 0) { scrp->depth = xf86Depth; scrp->depthFrom = X_CMDLINE; } if (xf86FbBpp < 0 && xf86Depth < 0) { if (scrp->confScreen->defaultfbbpp > 0) { scrp->bitsPerPixel = scrp->confScreen->defaultfbbpp; scrp->bitsPerPixelFrom = X_CONFIG; } if (scrp->confScreen->defaultdepth > 0) { scrp->depth = scrp->confScreen->defaultdepth; scrp->depthFrom = X_CONFIG; } if (scrp->confScreen->defaultfbbpp <= 0 && scrp->confScreen->defaultdepth <= 0) { /* * Check for DefaultDepth and DefaultFbBpp options in the * Device sections. */ GDevPtr device; Bool found = FALSE; for (i = 0; i < scrp->numEntities; i++) { device = xf86GetDevFromEntity(scrp->entityList[i], scrp->entityInstanceList[i]); if (device && device->options) { if (xf86FindOption(device->options, "DefaultDepth")) { scrp->depth = xf86SetIntOption(device->options, "DefaultDepth", -1); scrp->depthFrom = X_CONFIG; found = TRUE; } if (xf86FindOption(device->options, "DefaultFbBpp")) { scrp->bitsPerPixel = xf86SetIntOption(device->options, "DefaultFbBpp", -1); scrp->bitsPerPixelFrom = X_CONFIG; found = TRUE; } } if (found) break; } } } /* If none of these is set, pick a default */ if (scrp->bitsPerPixel < 0 && scrp->depth < 0) { if (fbbpp > 0 || depth > 0) { if (fbbpp > 0) scrp->bitsPerPixel = fbbpp; if (depth > 0) scrp->depth = depth; } else { scrp->depth = GLOBAL_DEFAULT_DEPTH; } } /* If any are not given, determine a default for the others */ if (scrp->bitsPerPixel < 0) { /* The depth must be set */ if (scrp->depth > -1) { if (scrp->depth == 1) scrp->bitsPerPixel = 1; else if (scrp->depth <= 4) scrp->bitsPerPixel = 4; else if (scrp->depth <= 8) scrp->bitsPerPixel = 8; else if (scrp->depth <= 16) scrp->bitsPerPixel = 16; else if (scrp->depth <= 24 && DO_PIX32(depth24flags)) { scrp->bitsPerPixel = 32; } else if (scrp->depth <= 32) scrp->bitsPerPixel = 32; else { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "No bpp for depth (%d)\n", scrp->depth); return FALSE; } } else { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "xf86SetDepthBpp: internal error: depth and fbbpp" " are both not set\n"); return FALSE; } if (scrp->bitsPerPixel < 0) { if ((depth24flags & (Support24bppFb | Support32bppFb)) == NoDepth24Support) xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Driver can't support depth 24\n"); else xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Can't find fbbpp for depth 24\n"); return FALSE; } scrp->bitsPerPixelFrom = X_PROBED; } if (scrp->depth <= 0) { /* bitsPerPixel is already set */ switch (scrp->bitsPerPixel) { case 32: scrp->depth = 24; break; default: /* 1, 4, 8, 16 and 24 */ scrp->depth = scrp->bitsPerPixel; break; } scrp->depthFrom = X_PROBED; } /* Sanity checks */ if (scrp->depth < 1 || scrp->depth > 32) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Specified depth (%d) is not in the range 1-32\n", scrp->depth); return FALSE; } switch (scrp->bitsPerPixel) { case 1: case 4: case 8: case 16: case 32: break; default: xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Specified fbbpp (%d) is not a permitted value\n", scrp->bitsPerPixel); return FALSE; } if (scrp->depth > scrp->bitsPerPixel) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Specified depth (%d) is greater than the fbbpp (%d)\n", scrp->depth, scrp->bitsPerPixel); return FALSE; } /* * Find the Display subsection matching the depth/fbbpp and initialise * scrp->display with it. */ for (i = 0; i < scrp->confScreen->numdisplays; i++) { disp = scrp->confScreen->displays[i]; if ((disp->depth == scrp->depth && disp->fbbpp == scrp->bitsPerPixel) || (disp->depth == scrp->depth && disp->fbbpp <= 0) || (disp->fbbpp == scrp->bitsPerPixel && disp->depth <= 0)) { scrp->display = disp; break; } } /* * If an exact match can't be found, see if there is one with no * depth or fbbpp specified. */ if (i == scrp->confScreen->numdisplays) { for (i = 0; i < scrp->confScreen->numdisplays; i++) { disp = scrp->confScreen->displays[i]; if (disp->depth <= 0 && disp->fbbpp <= 0) { scrp->display = disp; break; } } } /* * If all else fails, create a default one. */ if (i == scrp->confScreen->numdisplays) { scrp->confScreen->numdisplays++; scrp->confScreen->displays = xnfreallocarray(scrp->confScreen->displays, scrp->confScreen->numdisplays, sizeof(DispPtr)); xf86DrvMsg(scrp->scrnIndex, X_INFO, "Creating default Display subsection in Screen section\n" "\t\"%s\" for depth/fbbpp %d/%d\n", scrp->confScreen->id, scrp->depth, scrp->bitsPerPixel); scrp->confScreen->displays[i] = xnfcalloc(1, sizeof(DispRec)); memset(scrp->confScreen->displays[i], 0, sizeof(DispRec)); scrp->confScreen->displays[i]->blackColour.red = -1; scrp->confScreen->displays[i]->blackColour.green = -1; scrp->confScreen->displays[i]->blackColour.blue = -1; scrp->confScreen->displays[i]->whiteColour.red = -1; scrp->confScreen->displays[i]->whiteColour.green = -1; scrp->confScreen->displays[i]->whiteColour.blue = -1; scrp->confScreen->displays[i]->defaultVisual = -1; scrp->confScreen->displays[i]->modes = xnfalloc(sizeof(char *)); scrp->confScreen->displays[i]->modes[0] = NULL; scrp->confScreen->displays[i]->depth = depth; scrp->confScreen->displays[i]->fbbpp = fbbpp; scrp->display = scrp->confScreen->displays[i]; } /* * Setup defaults for the display-wide attributes the framebuffer will * need. These defaults should eventually be set globally, and not * dependent on the screens. */ scrp->imageByteOrder = IMAGE_BYTE_ORDER; scrp->bitmapScanlinePad = BITMAP_SCANLINE_PAD; if (scrp->depth < 8) { /* Planar modes need these settings */ scrp->bitmapScanlineUnit = 8; scrp->bitmapBitOrder = MSBFirst; } else { scrp->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; scrp->bitmapBitOrder = BITMAP_BIT_ORDER; } /* * If an unusual depth is required, add it to scrp->formats. The formats * for the common depths are handled globally in InitOutput */ switch (scrp->depth) { case 1: case 4: case 8: case 15: case 16: case 24: /* Common depths. Nothing to do for them */ break; default: if (!xf86AddPixFormat(scrp, scrp->depth, 0, 0)) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Can't add pixmap format for depth %d\n", scrp->depth); return FALSE; } } /* Initialise the framebuffer format for this screen */ scrp->fbFormat.depth = scrp->depth; scrp->fbFormat.bitsPerPixel = scrp->bitsPerPixel; scrp->fbFormat.scanlinePad = BITMAP_SCANLINE_PAD; return TRUE; } /* * Print out the selected depth and bpp. */ void xf86PrintDepthBpp(ScrnInfoPtr scrp) { xf86DrvMsg(scrp->scrnIndex, scrp->depthFrom, "Depth %d, ", scrp->depth); xf86Msg(scrp->bitsPerPixelFrom, "framebuffer bpp %d\n", scrp->bitsPerPixel); } /* * xf86SetWeight sets scrp->weight, scrp->mask, scrp->offset, and for depths * greater than MAX_PSEUDO_DEPTH also scrp->rgbBits. */ Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) { MessageType weightFrom = X_DEFAULT; scrp->weight.red = 0; scrp->weight.green = 0; scrp->weight.blue = 0; if (xf86Weight.red > 0 && xf86Weight.green > 0 && xf86Weight.blue > 0) { scrp->weight = xf86Weight; weightFrom = X_CMDLINE; } else if (scrp->display->weight.red > 0 && scrp->display->weight.green > 0 && scrp->display->weight.blue > 0) { scrp->weight = scrp->display->weight; weightFrom = X_CONFIG; } else if (weight.red > 0 && weight.green > 0 && weight.blue > 0) { scrp->weight = weight; } else { switch (scrp->depth) { case 1: case 4: case 8: scrp->weight.red = scrp->weight.green = scrp->weight.blue = scrp->rgbBits; break; case 15: scrp->weight.red = scrp->weight.green = scrp->weight.blue = 5; break; case 16: scrp->weight.red = scrp->weight.blue = 5; scrp->weight.green = 6; break; case 18: scrp->weight.red = scrp->weight.green = scrp->weight.blue = 6; break; case 24: scrp->weight.red = scrp->weight.green = scrp->weight.blue = 8; break; case 30: scrp->weight.red = scrp->weight.green = scrp->weight.blue = 10; break; } } if (scrp->weight.red) xf86DrvMsg(scrp->scrnIndex, weightFrom, "RGB weight %d%d%d\n", (int) scrp->weight.red, (int) scrp->weight.green, (int) scrp->weight.blue); if (scrp->depth > MAX_PSEUDO_DEPTH && (scrp->depth != scrp->weight.red + scrp->weight.green + scrp->weight.blue)) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Weight given (%d%d%d) is inconsistent with the " "depth (%d)\n", (int) scrp->weight.red, (int) scrp->weight.green, (int) scrp->weight.blue, scrp->depth); return FALSE; } if (scrp->depth > MAX_PSEUDO_DEPTH && scrp->weight.red) { /* * XXX Does this even mean anything for TrueColor visuals? * If not, we shouldn't even be setting it here. However, this * matches the behaviour of 3.x versions of XFree86. */ scrp->rgbBits = scrp->weight.red; if (scrp->weight.green > scrp->rgbBits) scrp->rgbBits = scrp->weight.green; if (scrp->weight.blue > scrp->rgbBits) scrp->rgbBits = scrp->weight.blue; } /* Set the mask and offsets */ if (mask.red == 0 || mask.green == 0 || mask.blue == 0) { /* Default to a setting common to PC hardware */ scrp->offset.red = scrp->weight.green + scrp->weight.blue; scrp->offset.green = scrp->weight.blue; scrp->offset.blue = 0; scrp->mask.red = ((1 << scrp->weight.red) - 1) << scrp->offset.red; scrp->mask.green = ((1 << scrp->weight.green) - 1) << scrp->offset.green; scrp->mask.blue = (1 << scrp->weight.blue) - 1; } else { /* Initialise to the values passed */ scrp->mask.red = mask.red; scrp->mask.green = mask.green; scrp->mask.blue = mask.blue; scrp->offset.red = ffs(mask.red) - 1; scrp->offset.green = ffs(mask.green) - 1; scrp->offset.blue = ffs(mask.blue) - 1; } return TRUE; } Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual) { MessageType visualFrom = X_DEFAULT; if (defaultColorVisualClass >= 0) { scrp->defaultVisual = defaultColorVisualClass; visualFrom = X_CMDLINE; } else if (scrp->display->defaultVisual >= 0) { scrp->defaultVisual = scrp->display->defaultVisual; visualFrom = X_CONFIG; } else if (visual >= 0) { scrp->defaultVisual = visual; } else { if (scrp->depth == 1) scrp->defaultVisual = StaticGray; else if (scrp->depth == 4) scrp->defaultVisual = StaticColor; else if (scrp->depth <= MAX_PSEUDO_DEPTH) scrp->defaultVisual = PseudoColor; else scrp->defaultVisual = TrueColor; } switch (scrp->defaultVisual) { case StaticGray: case GrayScale: case StaticColor: case PseudoColor: case TrueColor: case DirectColor: xf86DrvMsg(scrp->scrnIndex, visualFrom, "Default visual is %s\n", xf86VisualNames[scrp->defaultVisual]); return TRUE; default: xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Invalid default visual class (%d)\n", scrp->defaultVisual); return FALSE; } } #define TEST_GAMMA(g) \ (g).red > GAMMA_ZERO || (g).green > GAMMA_ZERO || (g).blue > GAMMA_ZERO #define SET_GAMMA(g) \ (g) > GAMMA_ZERO ? (g) : 1.0 Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma) { MessageType from = X_DEFAULT; #if 0 xf86MonPtr DDC = (xf86MonPtr) (scrp->monitor->DDC); #endif if (TEST_GAMMA(xf86Gamma)) { from = X_CMDLINE; scrp->gamma.red = SET_GAMMA(xf86Gamma.red); scrp->gamma.green = SET_GAMMA(xf86Gamma.green); scrp->gamma.blue = SET_GAMMA(xf86Gamma.blue); } else if (TEST_GAMMA(scrp->monitor->gamma)) { from = X_CONFIG; scrp->gamma.red = SET_GAMMA(scrp->monitor->gamma.red); scrp->gamma.green = SET_GAMMA(scrp->monitor->gamma.green); scrp->gamma.blue = SET_GAMMA(scrp->monitor->gamma.blue); #if 0 } else if (DDC && DDC->features.gamma > GAMMA_ZERO) { from = X_PROBED; scrp->gamma.red = SET_GAMMA(DDC->features.gamma); scrp->gamma.green = SET_GAMMA(DDC->features.gamma); scrp->gamma.blue = SET_GAMMA(DDC->features.gamma); /* EDID structure version 2 gives optional separate red, green & blue * gamma values in bytes 0x57-0x59 */ #endif } else if (TEST_GAMMA(gamma)) { scrp->gamma.red = SET_GAMMA(gamma.red); scrp->gamma.green = SET_GAMMA(gamma.green); scrp->gamma.blue = SET_GAMMA(gamma.blue); } else { scrp->gamma.red = 1.0; scrp->gamma.green = 1.0; scrp->gamma.blue = 1.0; } xf86DrvMsg(scrp->scrnIndex, from, "Using gamma correction (%.1f, %.1f, %.1f)\n", scrp->gamma.red, scrp->gamma.green, scrp->gamma.blue); return TRUE; } #undef TEST_GAMMA #undef SET_GAMMA /* * Set the DPI from the command line option. XXX should allow it to be * calculated from the widthmm/heightmm values. */ #undef MMPERINCH #define MMPERINCH 25.4 void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y) { MessageType from = X_DEFAULT; xf86MonPtr DDC = (xf86MonPtr) (pScrn->monitor->DDC); int ddcWidthmm, ddcHeightmm; int widthErr, heightErr; /* XXX Maybe there is no need for widthmm/heightmm in ScrnInfoRec */ pScrn->widthmm = pScrn->monitor->widthmm; pScrn->heightmm = pScrn->monitor->heightmm; if (DDC && (DDC->features.hsize > 0 && DDC->features.vsize > 0)) { /* DDC gives display size in mm for individual modes, * but cm for monitor */ ddcWidthmm = DDC->features.hsize * 10; /* 10mm in 1cm */ ddcHeightmm = DDC->features.vsize * 10; /* 10mm in 1cm */ } else { ddcWidthmm = ddcHeightmm = 0; } if (monitorResolution > 0) { pScrn->xDpi = monitorResolution; pScrn->yDpi = monitorResolution; from = X_CMDLINE; } else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) { from = X_CONFIG; if (pScrn->widthmm > 0) { pScrn->xDpi = (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); } if (pScrn->heightmm > 0) { pScrn->yDpi = (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); } if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) pScrn->yDpi = pScrn->xDpi; if (pScrn->yDpi > 0 && pScrn->xDpi <= 0) pScrn->xDpi = pScrn->yDpi; xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n", pScrn->widthmm, pScrn->heightmm); /* Warn if config and probe disagree about display size */ if (ddcWidthmm && ddcHeightmm) { if (pScrn->widthmm > 0) { widthErr = abs(ddcWidthmm - pScrn->widthmm); } else { widthErr = 0; } if (pScrn->heightmm > 0) { heightErr = abs(ddcHeightmm - pScrn->heightmm); } else { heightErr = 0; } if (widthErr > 10 || heightErr > 10) { /* Should include config file name for monitor here */ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Probed monitor is %dx%d mm, using Displaysize %dx%d mm\n", ddcWidthmm, ddcHeightmm, pScrn->widthmm, pScrn->heightmm); } } } else if (ddcWidthmm && ddcHeightmm) { from = X_PROBED; xf86DrvMsg(pScrn->scrnIndex, from, "Display dimensions: (%d, %d) mm\n", ddcWidthmm, ddcHeightmm); pScrn->widthmm = ddcWidthmm; pScrn->heightmm = ddcHeightmm; if (pScrn->widthmm > 0) { pScrn->xDpi = (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm); } if (pScrn->heightmm > 0) { pScrn->yDpi = (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm); } if (pScrn->xDpi > 0 && pScrn->yDpi <= 0) pScrn->yDpi = pScrn->xDpi; if (pScrn->yDpi > 0 && pScrn->xDpi <= 0) pScrn->xDpi = pScrn->yDpi; } else { if (x > 0) pScrn->xDpi = x; else pScrn->xDpi = DEFAULT_DPI; if (y > 0) pScrn->yDpi = y; else pScrn->yDpi = DEFAULT_DPI; } xf86DrvMsg(pScrn->scrnIndex, from, "DPI set to (%d, %d)\n", pScrn->xDpi, pScrn->yDpi); } #undef MMPERINCH void xf86SetBlackWhitePixels(ScreenPtr pScreen) { pScreen->whitePixel = 1; pScreen->blackPixel = 0; } /* * Function to enable/disable access to the frame buffer * * This is used when VT switching and when entering/leaving DGA direct mode. * * This has been rewritten again to eliminate the saved pixmap. The * devPrivate field in the screen pixmap is set to NULL to catch code * accidentally referencing the frame buffer while the X server is not * supposed to touch it. * * Here, we exchange the pixmap private data, rather than the pixmaps * themselves to avoid having to find and change any references to the screen * pixmap such as GC's, window privates etc. This also means that this code * does not need to know exactly how the pixmap pixels are accessed. Further, * this exchange is >not< done through the screen's ModifyPixmapHeader() * vector. This means the called frame buffer code layers can determine * whether they are switched in or out by keeping track of the root pixmap's * private data, and therefore don't need to access pScrnInfo->vtSema. */ void xf86EnableDisableFBAccess(ScrnInfoPtr pScrnInfo, Bool enable) { ScreenPtr pScreen = pScrnInfo->pScreen; if (enable) { /* * Restore all of the clip lists on the screen */ if (!xf86Resetting) SetRootClip(pScreen, ROOT_CLIP_FULL); } else { /* * Empty all of the clip lists on the screen */ SetRootClip(pScreen, ROOT_CLIP_NONE); } } /* Print driver messages in the standard format of () (): */ void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args) { /* Prefix the scrnIndex name to the format string. */ if (scrnIndex >= 0 && scrnIndex < xf86NumScreens && xf86Screens[scrnIndex]->name) LogHdrMessageVerb(type, verb, format, args, "%s(%d): ", xf86Screens[scrnIndex]->name, scrnIndex); else if (scrnIndex >= GPU_SCREEN_OFFSET && scrnIndex < GPU_SCREEN_OFFSET + xf86NumGPUScreens && xf86GPUScreens[scrnIndex - GPU_SCREEN_OFFSET]->name) LogHdrMessageVerb(type, verb, format, args, "%s(G%d): ", xf86GPUScreens[scrnIndex - GPU_SCREEN_OFFSET]->name, scrnIndex - GPU_SCREEN_OFFSET); else LogVMessageVerb(type, verb, format, args); } /* Print driver messages, with verbose level specified directly */ void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); xf86VDrvMsgVerb(scrnIndex, type, verb, format, ap); va_end(ap); } /* Print driver messages, with verbose level of 1 (default) */ void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); xf86VDrvMsgVerb(scrnIndex, type, 1, format, ap); va_end(ap); } /* Print input driver messages in the standard format of () : : */ void xf86VIDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format, va_list args) { const char *driverName = NULL; const char *deviceName = NULL; /* Prefix driver and device names to formatted message. */ if (dev) { deviceName = dev->name; if (dev->drv) driverName = dev->drv->driverName; } LogHdrMessageVerb(type, verb, format, args, "%s: %s: ", driverName, deviceName); } /* Print input driver message, with verbose level specified directly */ void xf86IDrvMsgVerb(InputInfoPtr dev, MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); xf86VIDrvMsgVerb(dev, type, verb, format, ap); va_end(ap); } /* Print input driver messages, with verbose level of 1 (default) */ void xf86IDrvMsg(InputInfoPtr dev, MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); xf86VIDrvMsgVerb(dev, type, 1, format, ap); va_end(ap); } /* Print non-driver messages with verbose level specified directly */ void xf86MsgVerb(MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, verb, format, ap); va_end(ap); } /* Print non-driver messages with verbose level of 1 (default) */ void xf86Msg(MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, 1, format, ap); va_end(ap); } /* Just like ErrorF, but with the verbose level checked */ void xf86ErrorFVerb(int verb, const char *format, ...) { va_list ap; va_start(ap, format); if (xf86Verbose >= verb || xf86LogVerbose >= verb) LogVWrite(verb, format, ap); va_end(ap); } /* Like xf86ErrorFVerb, but with an implied verbose level of 1 */ void xf86ErrorF(const char *format, ...) { va_list ap; va_start(ap, format); if (xf86Verbose >= 1 || xf86LogVerbose >= 1) LogVWrite(1, format, ap); va_end(ap); } /* Note temporarily modifies the passed in buffer! */ static void xf86_mkdir_p(char *path) { char *sep = path; while ((sep = strchr(sep + 1, '/'))) { *sep = 0; (void)mkdir(path, 0777); *sep = '/'; } (void)mkdir(path, 0777); } void xf86LogInit(void) { char *env, *lf = NULL; char buf[PATH_MAX]; #define LOGSUFFIX ".log" #define LOGOLDSUFFIX ".old" /* Get the log file name */ if (xf86LogFileFrom == X_DEFAULT) { /* When not running as root, we won't be able to write to /var/log */ if (geteuid() != 0) { if ((env = getenv("XDG_DATA_HOME"))) snprintf(buf, sizeof(buf), "%s/%s", env, DEFAULT_XDG_DATA_HOME_LOGDIR); else if ((env = getenv("HOME"))) snprintf(buf, sizeof(buf), "%s/%s/%s", env, DEFAULT_XDG_DATA_HOME, DEFAULT_XDG_DATA_HOME_LOGDIR); if (env) { xf86_mkdir_p(buf); strlcat(buf, "/" DEFAULT_LOGPREFIX, sizeof(buf)); xf86LogFile = buf; } } /* Append the display number and ".log" */ if (asprintf(&lf, "%s%%s" LOGSUFFIX, xf86LogFile) == -1) FatalError("Cannot allocate space for the log file name\n"); xf86LogFile = lf; } xf86LogFile = LogInit(xf86LogFile, LOGOLDSUFFIX); xf86LogFileWasOpened = TRUE; xf86SetVerbosity(xf86Verbose); xf86SetLogVerbosity(xf86LogVerbose); #undef LOGSUFFIX #undef LOGOLDSUFFIX free(lf); } void xf86CloseLog(enum ExitCode error) { LogClose(error); } /* * Drivers can use these for using their own SymTabRecs. */ const char * xf86TokenToString(SymTabPtr table, int token) { int i; for (i = 0; table[i].token >= 0 && table[i].token != token; i++); if (table[i].token < 0) return NULL; else return table[i].name; } int xf86StringToToken(SymTabPtr table, const char *string) { int i; if (string == NULL) return -1; for (i = 0; table[i].token >= 0 && xf86NameCmp(string, table[i].name); i++); return table[i].token; } /* * helper to display the clocks found on a card */ void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from) { int j; xf86DrvMsg(scrp->scrnIndex, from, "Pixel clocks available:"); for (j = 0; j < scrp->numClocks; j++) { if ((j % 4) == 0) { xf86ErrorF("\n"); xf86DrvMsg(scrp->scrnIndex, from, "pixel clocks:"); } xf86ErrorF(" %7.3f", (double) scrp->clock[j] / 1000.0); } xf86ErrorF("\n"); } /* * This prints out the driver identify message, including the names of * the supported chipsets. * * XXX This makes assumptions about the line width, etc. Maybe we could * use a more general "pretty print" function for messages. */ void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips) { int len, i; len = 6 + strlen(drvname) + 2 + strlen(drvmsg) + 2; xf86Msg(X_INFO, "%s: %s:", drvname, drvmsg); for (i = 0; chips[i].name != NULL; i++) { if (i != 0) { xf86ErrorF(","); len++; } if (len + 2 + strlen(chips[i].name) < 78) { xf86ErrorF(" "); len++; } else { xf86ErrorF("\n\t"); len = 8; } xf86ErrorF("%s", chips[i].name); len += strlen(chips[i].name); } xf86ErrorF("\n"); } int xf86MatchDevice(const char *drivername, GDevPtr ** sectlist) { GDevPtr gdp, *pgdp = NULL; confScreenPtr screensecptr; int i, j, k; if (sectlist) *sectlist = NULL; /* * This can happen when running Xorg -showopts and a module like ati * or vmware tries to load its submodules when xf86ConfigLayout is empty */ if (!xf86ConfigLayout.screens) return 0; /* * This is a very important function that matches the device sections * as they show up in the config file with the drivers that the server * loads at run time. * * ChipProbe can call * int xf86MatchDevice(char * drivername, GDevPtr ** sectlist) * with its driver name. The function allocates an array of GDevPtr and * returns this via sectlist and returns the number of elements in * this list as return value. 0 means none found, -1 means fatal error. * * It can figure out which of the Device sections to use for which card * (using things like the Card statement, etc). For single headed servers * there will of course be just one such Device section. */ i = 0; /* * first we need to loop over all the Screens sections to get to all * 'active' device sections */ for (j = 0; xf86ConfigLayout.screens[j].screen != NULL; j++) { screensecptr = xf86ConfigLayout.screens[j].screen; if ((screensecptr->device->driver != NULL) && (xf86NameCmp(screensecptr->device->driver, drivername) == 0) && (!screensecptr->device->claimed)) { /* * we have a matching driver that wasn't claimed, yet */ pgdp = xnfreallocarray(pgdp, i + 2, sizeof(GDevPtr)); pgdp[i++] = screensecptr->device; } for (k = 0; k < screensecptr->num_gpu_devices; k++) { if ((screensecptr->gpu_devices[k]->driver != NULL) && (xf86NameCmp(screensecptr->gpu_devices[k]->driver, drivername) == 0) && (!screensecptr->gpu_devices[k]->claimed)) { /* * we have a matching driver that wasn't claimed, yet */ pgdp = xnfrealloc(pgdp, (i + 2) * sizeof(GDevPtr)); pgdp[i++] = screensecptr->gpu_devices[k]; } } } /* Then handle the inactive devices */ j = 0; while (xf86ConfigLayout.inactives[j].identifier) { gdp = &xf86ConfigLayout.inactives[j]; if (gdp->driver && !gdp->claimed && !xf86NameCmp(gdp->driver, drivername)) { /* we have a matching driver that wasn't claimed yet */ pgdp = xnfreallocarray(pgdp, i + 2, sizeof(GDevPtr)); pgdp[i++] = gdp; } j++; } /* * make the array NULL terminated and return its address */ if (i) pgdp[i] = NULL; if (sectlist) *sectlist = pgdp; else free(pgdp); return i; } const char * xf86GetVisualName(int visual) { if (visual < 0 || visual > DirectColor) return NULL; return xf86VisualNames[visual]; } int xf86GetVerbosity(void) { return max(xf86Verbose, xf86LogVerbose); } int xf86GetDepth(void) { return xf86Depth; } rgb xf86GetWeight(void) { return xf86Weight; } Gamma xf86GetGamma(void) { return xf86Gamma; } Bool xf86ServerIsExiting(void) { return (dispatchException & DE_TERMINATE) == DE_TERMINATE; } Bool xf86ServerIsResetting(void) { return xf86Resetting; } Bool xf86ServerIsOnlyDetecting(void) { return xf86DoConfigure; } Bool xf86GetVidModeAllowNonLocal(void) { return xf86Info.vidModeAllowNonLocal; } Bool xf86GetVidModeEnabled(void) { return xf86Info.vidModeEnabled; } Bool xf86GetModInDevAllowNonLocal(void) { return xf86Info.miscModInDevAllowNonLocal; } Bool xf86GetModInDevEnabled(void) { return xf86Info.miscModInDevEnabled; } Bool xf86GetAllowMouseOpenFail(void) { return xf86Info.allowMouseOpenFail; } CARD32 xf86GetModuleVersion(void *module) { return (CARD32) LoaderGetModuleVersion(module); } void * xf86LoadDrvSubModule(DriverPtr drv, const char *name) { void *ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL, &errmaj, &errmin); if (!ret) LoaderErrorMsg(NULL, name, errmaj, errmin); return ret; } void * xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { void *ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL, &errmaj, &errmin); if (!ret) LoaderErrorMsg(pScrn->name, name, errmaj, errmin); return ret; } /* * xf86LoadOneModule loads a single module. */ void * xf86LoadOneModule(const char *name, void *opt) { int errmaj; char *Name; void *mod; if (!name) return NULL; /* Normalise the module name */ Name = xf86NormalizeName(name); /* Skip empty names */ if (Name == NULL) return NULL; if (*Name == '\0') { free(Name); return NULL; } mod = LoadModule(Name, opt, NULL, &errmaj); if (!mod) LoaderErrorMsg(NULL, Name, errmaj, 0); free(Name); return mod; } void xf86UnloadSubModule(void *mod) { UnloadSubModule(mod); } Bool xf86LoaderCheckSymbol(const char *name) { return LoaderSymbol(name) != NULL; } typedef enum { OPTION_BACKING_STORE } BSOpts; static const OptionInfoRec BSOptions[] = { {OPTION_BACKING_STORE, "BackingStore", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; void xf86SetBackingStore(ScreenPtr pScreen) { Bool useBS = FALSE; MessageType from = X_DEFAULT; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); OptionInfoPtr options; options = xnfalloc(sizeof(BSOptions)); (void) memcpy(options, BSOptions, sizeof(BSOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); /* check for commandline option here */ if (xf86bsEnableFlag) { from = X_CMDLINE; useBS = TRUE; } else if (xf86bsDisableFlag) { from = X_CMDLINE; useBS = FALSE; } else { if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS)) from = X_CONFIG; #ifdef COMPOSITE if (from != X_CONFIG) useBS = xf86ReturnOptValBool(options, OPTION_BACKING_STORE, !noCompositeExtension); #endif } free(options); pScreen->backingStoreSupport = useBS ? WhenMapped : NotUseful; if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n", useBS ? "enabled" : "disabled"); } typedef enum { OPTION_SILKEN_MOUSE } SMOpts; static const OptionInfoRec SMOptions[] = { {OPTION_SILKEN_MOUSE, "SilkenMouse", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; void xf86SetSilkenMouse(ScreenPtr pScreen) { Bool useSM = TRUE; MessageType from = X_DEFAULT; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); OptionInfoPtr options; options = xnfalloc(sizeof(SMOptions)); (void) memcpy(options, SMOptions, sizeof(SMOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); /* check for commandline option here */ /* disable if screen shares resources */ /* TODO VGA arb disable silken mouse */ if (xf86silkenMouseDisableFlag) { from = X_CMDLINE; useSM = FALSE; } else { if (xf86GetOptValBool(options, OPTION_SILKEN_MOUSE, &useSM)) from = X_CONFIG; } free(options); /* * Use silken mouse if requested and if we have threaded input */ pScrn->silkenMouse = useSM && InputThreadEnable; if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Silken mouse %s\n", pScrn->silkenMouse ? "enabled" : "disabled"); } /* Wrote this function for the PM2 Xv driver, preliminary. */ void * xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, const char *port_name, const char **adaptor_name, void **adaptor_options) { confXvAdaptorPtr adaptor; int i; if (adaptor_index >= pScrn->confScreen->numxvadaptors) { if (adaptor_name) *adaptor_name = NULL; if (adaptor_options) *adaptor_options = NULL; return NULL; } adaptor = &pScrn->confScreen->xvadaptors[adaptor_index]; if (adaptor_name) *adaptor_name = adaptor->identifier; if (adaptor_options) *adaptor_options = adaptor->options; for (i = 0; i < adaptor->numports; i++) if (!xf86NameCmp(adaptor->ports[i].identifier, port_name)) return adaptor->ports[i].options; return NULL; } static void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, void *private) { ScrnInfoPtr pScrn; if ((pScrn = xf86FindScreenForEntity(pEnt->index))) xf86RemoveEntityFromScreen(pScrn, pEnt->index); } ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, void *private) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (init || enter || leave) FatalError("Legacy entity access functions are unsupported\n"); if (!pEnt) return pScrn; if (!(pEnt->location.type == BUS_NONE)) { free(pEnt); return pScrn; } if (!pEnt->active) { xf86ConfigFbEntityInactive(pEnt, init, enter, leave, private); free(pEnt); return pScrn; } if (!pScrn) pScrn = xf86AllocateScreen(pEnt->driver, scrnFlag); xf86AddEntityToScreen(pScrn, entityIndex); free(pEnt); return pScrn; } Bool xf86IsScreenPrimary(ScrnInfoPtr pScrn) { int i; for (i = 0; i < pScrn->numEntities; i++) { if (xf86IsEntityPrimary(i)) return TRUE; } return FALSE; } Bool xf86IsUnblank(int mode) { switch (mode) { case SCREEN_SAVER_OFF: case SCREEN_SAVER_FORCER: return TRUE; case SCREEN_SAVER_ON: case SCREEN_SAVER_CYCLE: return FALSE; default: xf86MsgVerb(X_WARNING, 0, "Unexpected save screen mode: %d\n", mode); return TRUE; } } void xf86MotionHistoryAllocate(InputInfoPtr pInfo) { AllocateMotionHistory(pInfo->dev); } ScrnInfoPtr xf86ScreenToScrn(ScreenPtr pScreen) { if (pScreen->isGPU) { assert(pScreen->myNum - GPU_SCREEN_OFFSET < xf86NumGPUScreens); return xf86GPUScreens[pScreen->myNum - GPU_SCREEN_OFFSET]; } else { assert(pScreen->myNum < xf86NumScreens); return xf86Screens[pScreen->myNum]; } } ScreenPtr xf86ScrnToScreen(ScrnInfoPtr pScrn) { if (pScrn->is_gpu) { assert(pScrn->scrnIndex - GPU_SCREEN_OFFSET < screenInfo.numGPUScreens); return screenInfo.gpuscreens[pScrn->scrnIndex - GPU_SCREEN_OFFSET]; } else { assert(pScrn->scrnIndex < screenInfo.numScreens); return screenInfo.screens[pScrn->scrnIndex]; } } void xf86UpdateDesktopDimensions(void) { update_desktop_dimensions(); } void xf86AddInputEventDrainCallback(CallbackProcPtr callback, void *param) { mieqAddCallbackOnDrained(callback, param); } void xf86RemoveInputEventDrainCallback(CallbackProcPtr callback, void *param) { mieqRemoveCallbackOnDrained(callback, param); } xorg-server-21.1.16/hw/xfree86/common/xf86PM.c0000644000175000017500000001530414757411105014227 /* * Copyright (c) 2000-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86Xinput.h" #include "xf86_OSproc.h" int (*xf86PMGetEventFromOs) (int fd, pmEvent * events, int num) = NULL; pmWait (*xf86PMConfirmEventToOs) (int fd, pmEvent event) = NULL; static Bool suspended = FALSE; static int eventName(pmEvent event, const char **str) { switch (event) { case XF86_APM_SYS_STANDBY: *str = "System Standby Request"; return 0; case XF86_APM_SYS_SUSPEND: *str = "System Suspend Request"; return 0; case XF86_APM_CRITICAL_SUSPEND: *str = "Critical Suspend"; return 0; case XF86_APM_USER_STANDBY: *str = "User System Standby Request"; return 0; case XF86_APM_USER_SUSPEND: *str = "User System Suspend Request"; return 0; case XF86_APM_STANDBY_RESUME: *str = "System Standby Resume"; return 0; case XF86_APM_NORMAL_RESUME: *str = "Normal Resume System"; return 0; case XF86_APM_CRITICAL_RESUME: *str = "Critical Resume System"; return 0; case XF86_APM_LOW_BATTERY: *str = "Battery Low"; return 3; case XF86_APM_POWER_STATUS_CHANGE: *str = "Power Status Change"; return 3; case XF86_APM_UPDATE_TIME: *str = "Update Time"; return 3; case XF86_APM_CAPABILITY_CHANGED: *str = "Capability Changed"; return 3; case XF86_APM_STANDBY_FAILED: *str = "Standby Request Failed"; return 0; case XF86_APM_SUSPEND_FAILED: *str = "Suspend Request Failed"; return 0; default: *str = "Unknown Event"; return 0; } } static void suspend(pmEvent event, Bool undo) { int i; InputInfoPtr pInfo; for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], FALSE); } pInfo = xf86InputDevs; while (pInfo) { DisableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } input_lock(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(xf86Screens[i], event, undo); else { xf86Screens[i]->LeaveVT(xf86Screens[i]); xf86Screens[i]->vtSema = FALSE; } } } static void resume(pmEvent event, Bool undo) { int i; InputInfoPtr pInfo; for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) xf86Screens[i]->PMEvent(xf86Screens[i], event, undo); else { xf86Screens[i]->vtSema = TRUE; xf86Screens[i]->EnterVT(xf86Screens[i]); } } input_unlock(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE); } dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); pInfo = xf86InputDevs; while (pInfo) { EnableDevice(pInfo->dev, TRUE); pInfo = pInfo->next; } } static void DoApmEvent(pmEvent event, Bool undo) { int i; switch (event) { #if 0 case XF86_APM_SYS_STANDBY: case XF86_APM_USER_STANDBY: #endif case XF86_APM_SYS_SUSPEND: case XF86_APM_CRITICAL_SUSPEND: /*do we want to delay a critical suspend? */ case XF86_APM_USER_SUSPEND: /* should we do this ? */ if (!undo && !suspended) { suspend(event, undo); suspended = TRUE; } else if (undo && suspended) { resume(event, undo); suspended = FALSE; } break; #if 0 case XF86_APM_STANDBY_RESUME: #endif case XF86_APM_NORMAL_RESUME: case XF86_APM_CRITICAL_RESUME: if (suspended) { resume(event, undo); suspended = FALSE; } break; default: input_lock(); for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->PMEvent) { xf86Screens[i]->PMEvent(xf86Screens[i], event, undo); } } input_unlock(); break; } } #define MAX_NO_EVENTS 8 void xf86HandlePMEvents(int fd, void *data) { pmEvent events[MAX_NO_EVENTS]; int i, n; Bool wait = FALSE; if (!xf86PMGetEventFromOs) return; if ((n = xf86PMGetEventFromOs(fd, events, MAX_NO_EVENTS))) { do { for (i = 0; i < n; i++) { const char *str = NULL; int verb = eventName(events[i], &str); xf86MsgVerb(X_INFO, verb, "PM Event received: %s\n", str); DoApmEvent(events[i], FALSE); switch (xf86PMConfirmEventToOs(fd, events[i])) { case PM_WAIT: wait = TRUE; break; case PM_CONTINUE: wait = FALSE; break; case PM_FAILED: DoApmEvent(events[i], TRUE); wait = FALSE; break; default: break; } } if (wait) n = xf86PMGetEventFromOs(fd, events, MAX_NO_EVENTS); else break; } while (1); } } xorg-server-21.1.16/hw/xfree86/common/xf86Xinput.c0000644000175000017500000014145714757411105015213 /* * Copyright 1995-1999 by Frederic Lepied, France. * * 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 Frederic Lepied not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Frederic Lepied makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL FREDERIC LEPIED 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 (c) 2000-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * OTHER DEALINGS IN THE SOFTWARE. * * Except as contained in this notice, the name of the copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86Config.h" #include "xf86Xinput.h" #include "xf86Optrec.h" #include "mipointer.h" #include "extinit.h" #include "loaderProcs.h" #include "systemd-logind.h" #include "exevents.h" /* AddInputDevice */ #include "exglobals.h" #include "eventstr.h" #include "inpututils.h" #include "optionstr.h" #include /* InputClassMatches */ #ifdef HAVE_FNMATCH_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #include #include /* for int64_t */ #include #include #include #ifdef HAVE_SYS_SYSMACROS_H #include #endif #ifdef HAVE_SYS_MKDEV_H #include /* for major() & minor() on Solaris */ #endif #include "mi.h" #include /* dix pointer acceleration */ #include #ifdef XFreeXDGA #include "dgaproc.h" #endif #include "xkbsrv.h" /* Valuator verification macro */ #define XI_VERIFY_VALUATORS(num_valuators) \ if (num_valuators > MAX_VALUATORS) { \ xf86Msg(X_ERROR, "%s: num_valuator %d is greater than" \ " MAX_VALUATORS\n", __FUNCTION__, num_valuators); \ return; \ } static int xf86InputDevicePostInit(DeviceIntPtr dev); typedef struct { struct xorg_list node; InputInfoPtr pInfo; } PausedInputDeviceRec; typedef PausedInputDeviceRec *PausedInputDevicePtr; static struct xorg_list new_input_devices_list = { .next = &new_input_devices_list, .prev = &new_input_devices_list, }; /** * Eval config and modify DeviceVelocityRec accordingly */ static void ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, DeviceVelocityPtr s) { int tempi; float tempf; Atom float_prop = XIGetKnownProperty(XATOM_FLOAT); Atom prop; if (!s) return; /* common settings (available via device properties) */ tempf = xf86SetRealOption(list, "ConstantDeceleration", 1.0); if (tempf != 1.0) { xf86Msg(X_CONFIG, "%s: (accel) constant deceleration by %.1f\n", devname, tempf); prop = XIGetKnownProperty(ACCEL_PROP_CONSTANT_DECELERATION); XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); } tempf = xf86SetRealOption(list, "AdaptiveDeceleration", 1.0); if (tempf > 1.0) { xf86Msg(X_CONFIG, "%s: (accel) adaptive deceleration by %.1f\n", devname, tempf); prop = XIGetKnownProperty(ACCEL_PROP_ADAPTIVE_DECELERATION); XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); } /* select profile by number */ tempi = xf86SetIntOption(list, "AccelerationProfile", s->statistics.profile_number); prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); if (XIChangeDeviceProperty(pDev, prop, XA_INTEGER, 32, PropModeReplace, 1, &tempi, FALSE) == Success) { xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i\n", devname, tempi); } else { xf86Msg(X_CONFIG, "%s: (accel) acceleration profile %i is unknown\n", devname, tempi); } /* set scaling */ tempf = xf86SetRealOption(list, "ExpectedRate", 0); prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); if (tempf > 0) { tempf = 1000.0 / tempf; XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); } else { tempf = xf86SetRealOption(list, "VelocityScale", s->corr_mul); XIChangeDeviceProperty(pDev, prop, float_prop, 32, PropModeReplace, 1, &tempf, FALSE); } tempi = xf86SetIntOption(list, "VelocityTrackerCount", -1); if (tempi > 1) InitTrackers(s, tempi); s->initial_range = xf86SetIntOption(list, "VelocityInitialRange", s->initial_range); s->max_diff = xf86SetRealOption(list, "VelocityAbsDiff", s->max_diff); tempf = xf86SetRealOption(list, "VelocityRelDiff", -1); if (tempf >= 0) { xf86Msg(X_CONFIG, "%s: (accel) max rel. velocity difference: %.1f%%\n", devname, tempf * 100.0); s->max_rel_diff = tempf; } /* Configure softening. If const deceleration is used, this is expected * to provide better subpixel information so we enable * softening by default only if ConstantDeceleration is not used */ s->use_softening = xf86SetBoolOption(list, "Softening", s->const_acceleration == 1.0); s->average_accel = xf86SetBoolOption(list, "AccelerationProfileAveraging", s->average_accel); s->reset_time = xf86SetIntOption(list, "VelocityReset", s->reset_time); } static void ApplyAccelerationSettings(DeviceIntPtr dev) { int scheme, i; DeviceVelocityPtr pVel; InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; char *schemeStr; if (dev->valuator && dev->ptrfeed) { schemeStr = xf86SetStrOption(pInfo->options, "AccelerationScheme", ""); scheme = dev->valuator->accelScheme.number; if (!xf86NameCmp(schemeStr, "predictable")) scheme = PtrAccelPredictable; if (!xf86NameCmp(schemeStr, "lightweight")) scheme = PtrAccelLightweight; if (!xf86NameCmp(schemeStr, "none")) scheme = PtrAccelNoOp; /* reinit scheme if needed */ if (dev->valuator->accelScheme.number != scheme) { if (dev->valuator->accelScheme.AccelCleanupProc) { dev->valuator->accelScheme.AccelCleanupProc(dev); } if (InitPointerAccelerationScheme(dev, scheme)) { xf86Msg(X_CONFIG, "%s: (accel) selected scheme %s/%i\n", pInfo->name, schemeStr, scheme); } else { xf86Msg(X_CONFIG, "%s: (accel) could not init scheme %s\n", pInfo->name, schemeStr); scheme = dev->valuator->accelScheme.number; } } else { xf86Msg(X_CONFIG, "%s: (accel) keeping acceleration scheme %i\n", pInfo->name, scheme); } free(schemeStr); /* process special configuration */ switch (scheme) { case PtrAccelPredictable: pVel = GetDevicePredictableAccelData(dev); ProcessVelocityConfiguration(dev, pInfo->name, pInfo->options, pVel); break; } i = xf86SetIntOption(pInfo->options, "AccelerationNumerator", dev->ptrfeed->ctrl.num); if (i >= 0) dev->ptrfeed->ctrl.num = i; i = xf86SetIntOption(pInfo->options, "AccelerationDenominator", dev->ptrfeed->ctrl.den); if (i > 0) dev->ptrfeed->ctrl.den = i; i = xf86SetIntOption(pInfo->options, "AccelerationThreshold", dev->ptrfeed->ctrl.threshold); if (i >= 0) dev->ptrfeed->ctrl.threshold = i; xf86Msg(X_CONFIG, "%s: (accel) acceleration factor: %.3f\n", pInfo->name, ((float) dev->ptrfeed->ctrl.num) / ((float) dev->ptrfeed->ctrl.den)); xf86Msg(X_CONFIG, "%s: (accel) acceleration threshold: %i\n", pInfo->name, dev->ptrfeed->ctrl.threshold); } } static void ApplyTransformationMatrix(DeviceIntPtr dev) { InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; char *str; int rc; float matrix[9] = { 0 }; if (!dev->valuator) return; str = xf86SetStrOption(pInfo->options, "TransformationMatrix", NULL); if (!str) return; rc = sscanf(str, "%f %f %f %f %f %f %f %f %f", &matrix[0], &matrix[1], &matrix[2], &matrix[3], &matrix[4], &matrix[5], &matrix[6], &matrix[7], &matrix[8]); if (rc != 9) { xf86Msg(X_ERROR, "%s: invalid format for transformation matrix. Ignoring configuration.\n", pInfo->name); return; } XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), XIGetKnownProperty(XATOM_FLOAT), 32, PropModeReplace, 9, matrix, FALSE); } static void ApplyAutoRepeat(DeviceIntPtr dev) { InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; XkbSrvInfoPtr xkbi; char *repeatStr; long delay, rate; if (!dev->key) return; xkbi = dev->key->xkbInfo; repeatStr = xf86SetStrOption(pInfo->options, "AutoRepeat", NULL); if (!repeatStr) return; if (sscanf(repeatStr, "%ld %ld", &delay, &rate) != 2) { xf86Msg(X_ERROR, "\"%s\" is not a valid AutoRepeat value\n", repeatStr); return; } xf86Msg(X_CONFIG, "AutoRepeat: %ld %ld\n", delay, rate); xkbi->desc->ctrls->repeat_delay = delay; xkbi->desc->ctrls->repeat_interval = rate; } /*********************************************************************** * * xf86ProcessCommonOptions -- * * Process global options. * *********************************************************************** */ void xf86ProcessCommonOptions(InputInfoPtr pInfo, XF86OptionPtr list) { if (xf86SetBoolOption(list, "Floating", 0) || !xf86SetBoolOption(list, "AlwaysCore", 1) || !xf86SetBoolOption(list, "SendCoreEvents", 1) || !xf86SetBoolOption(list, "CorePointer", 1) || !xf86SetBoolOption(list, "CoreKeyboard", 1)) { xf86Msg(X_CONFIG, "%s: doesn't report core events\n", pInfo->name); } else { pInfo->flags |= XI86_ALWAYS_CORE; xf86Msg(X_CONFIG, "%s: always reports core events\n", pInfo->name); } } /*********************************************************************** * * xf86ActivateDevice -- * * Initialize an input device. * * Returns TRUE on success, or FALSE otherwise. *********************************************************************** */ static DeviceIntPtr xf86ActivateDevice(InputInfoPtr pInfo) { DeviceIntPtr dev; Atom atom; dev = AddInputDevice(serverClient, pInfo->device_control, TRUE); if (dev == NULL) { xf86Msg(X_ERROR, "Too many input devices. Ignoring %s\n", pInfo->name); pInfo->dev = NULL; return NULL; } atom = MakeAtom(pInfo->type_name, strlen(pInfo->type_name), TRUE); AssignTypeAndName(dev, atom, pInfo->name); dev->public.devicePrivate = pInfo; pInfo->dev = dev; dev->coreEvents = pInfo->flags & XI86_ALWAYS_CORE; dev->type = SLAVE; dev->spriteInfo->spriteOwner = FALSE; dev->config_info = xf86SetStrOption(pInfo->options, "config_info", NULL); if (serverGeneration == 1) xf86Msg(X_INFO, "XINPUT: Adding extended input device \"%s\" (type: %s, id %d)\n", pInfo->name, pInfo->type_name, dev->id); return dev; } /**************************************************************************** * * Caller: ProcXSetDeviceMode * * Change the mode of an extension device. * This function is used to change the mode of a device from reporting * relative motion to reporting absolute positional information, and * vice versa. * The default implementation below is that no such devices are supported. * *********************************************************************** */ int SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) { InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; if (pInfo->switch_mode) { return (*pInfo->switch_mode) (client, dev, mode); } else return BadMatch; } /*********************************************************************** * * Caller: ProcXSetDeviceValuators * * Set the value of valuators on an extension input device. * This function is used to set the initial value of valuators on * those input devices that are capable of reporting either relative * motion or an absolute position, and allow an initial position to be set. * The default implementation below is that no such devices are supported. * *********************************************************************** */ int SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, int *valuators, int first_valuator, int num_valuators) { InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; if (pInfo->set_device_valuators) return (*pInfo->set_device_valuators) (pInfo, valuators, first_valuator, num_valuators); return BadMatch; } /*********************************************************************** * * Caller: ProcXChangeDeviceControl * * Change the specified device controls on an extension input device. * *********************************************************************** */ int ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control) { InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate; if (!pInfo->control_proc) { switch (control->control) { case DEVICE_CORE: case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: return BadMatch; case DEVICE_RESOLUTION: case DEVICE_ENABLE: return Success; default: return BadMatch; } } else { return (*pInfo->control_proc) (pInfo, control); } } /* * Get the operating system name from uname and store it statically to avoid * repeating the system call each time MatchOS is checked. */ static const char * HostOS(void) { #ifdef HAVE_SYS_UTSNAME_H struct utsname name; static char host_os[sizeof(name.sysname)] = ""; if (*host_os == '\0') { if (uname(&name) >= 0) strlcpy(host_os, name.sysname, sizeof(host_os)); else { strlcpy(host_os, "unknown", sizeof(host_os)); } } return host_os; #else return ""; #endif } static int match_substring(const char *attr, const char *pattern) { return (strstr(attr, pattern)) ? 0 : -1; } #ifdef HAVE_FNMATCH_H static int match_pattern(const char *attr, const char *pattern) { return fnmatch(pattern, attr, 0); } #else #define match_pattern match_substring #endif #ifdef HAVE_FNMATCH_H static int match_path_pattern(const char *attr, const char *pattern) { return fnmatch(pattern, attr, FNM_PATHNAME); } #else #define match_path_pattern match_substring #endif /* * If no Layout section is found, xf86ServerLayout.id becomes "(implicit)" * It is convenient that "" in patterns means "no explicit layout" */ static int match_string_implicit(const char *attr, const char *pattern) { if (strlen(pattern)) { return strcmp(attr, pattern); } else { return strcmp(attr, "(implicit)"); } } /* * Match an attribute against a list of NULL terminated arrays of patterns. * If a pattern in each list entry is matched, return TRUE. */ static Bool MatchAttrToken(const char *attr, struct xorg_list *patterns, int (*compare) (const char *attr, const char *pattern)) { const xf86MatchGroup *group; /* If there are no patterns, accept the match */ if (xorg_list_is_empty(patterns)) return TRUE; /* * Iterate the list of patterns ensuring each entry has a * match. Each list entry is a separate Match line of the same type. */ xorg_list_for_each_entry(group, patterns, entry) { char *const *cur; Bool is_negated = group->is_negated; Bool match = is_negated; /* If there's a pattern but no attribute, we reject the match for a * MatchFoo directive, and accept it for a NoMatchFoo directive */ if (!attr) return is_negated; for (cur = group->values; *cur; cur++) if ((*compare) (attr, *cur) == 0) { match = !is_negated; break; } if (!match) return FALSE; } /* All the entries in the list matched the attribute */ return TRUE; } /* * Classes without any Match statements match all devices. Otherwise, all * statements must match. */ static Bool InputClassMatches(const XF86ConfInputClassPtr iclass, const InputInfoPtr idev, const InputAttributes * attrs) { /* MatchProduct substring */ if (!MatchAttrToken (attrs->product, &iclass->match_product, match_substring)) return FALSE; /* MatchVendor substring */ if (!MatchAttrToken(attrs->vendor, &iclass->match_vendor, match_substring)) return FALSE; /* MatchDevicePath pattern */ if (!MatchAttrToken (attrs->device, &iclass->match_device, match_path_pattern)) return FALSE; /* MatchOS case-insensitive string */ if (!MatchAttrToken(HostOS(), &iclass->match_os, strcasecmp)) return FALSE; /* MatchPnPID pattern */ if (!MatchAttrToken(attrs->pnp_id, &iclass->match_pnpid, match_pattern)) return FALSE; /* MatchUSBID pattern */ if (!MatchAttrToken(attrs->usb_id, &iclass->match_usbid, match_pattern)) return FALSE; /* MatchDriver string */ if (!MatchAttrToken(idev->driver, &iclass->match_driver, strcmp)) return FALSE; /* * MatchTag string * See if any of the device's tags match any of the MatchTag tokens. */ if (!xorg_list_is_empty(&iclass->match_tag)) { char *const *tag; Bool match; if (!attrs->tags) return FALSE; for (tag = attrs->tags, match = FALSE; *tag; tag++) { if (MatchAttrToken(*tag, &iclass->match_tag, strcmp)) { match = TRUE; break; } } if (!match) return FALSE; } /* MatchLayout string */ if (!xorg_list_is_empty(&iclass->match_layout)) { if (!MatchAttrToken(xf86ConfigLayout.id, &iclass->match_layout, match_string_implicit)) return FALSE; } /* MatchIs* booleans */ if (iclass->is_keyboard.set && iclass->is_keyboard.val != ! !(attrs->flags & (ATTR_KEY|ATTR_KEYBOARD))) return FALSE; if (iclass->is_pointer.set && iclass->is_pointer.val != ! !(attrs->flags & ATTR_POINTER)) return FALSE; if (iclass->is_joystick.set && iclass->is_joystick.val != ! !(attrs->flags & ATTR_JOYSTICK)) return FALSE; if (iclass->is_tablet.set && iclass->is_tablet.val != ! !(attrs->flags & ATTR_TABLET)) return FALSE; if (iclass->is_tablet_pad.set && iclass->is_tablet_pad.val != ! !(attrs->flags & ATTR_TABLET_PAD)) return FALSE; if (iclass->is_touchpad.set && iclass->is_touchpad.val != ! !(attrs->flags & ATTR_TOUCHPAD)) return FALSE; if (iclass->is_touchscreen.set && iclass->is_touchscreen.val != ! !(attrs->flags & ATTR_TOUCHSCREEN)) return FALSE; return TRUE; } /* * Merge in any InputClass configurations. Options in each InputClass * section have more priority than the original device configuration as * well as any previous InputClass sections. */ static int MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs) { XF86ConfInputClassPtr cl; XF86OptionPtr classopts; for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) { if (!InputClassMatches(cl, idev, attrs)) continue; /* Collect class options and driver settings */ classopts = xf86optionListDup(cl->option_lst); if (cl->driver) { free((void *) idev->driver); idev->driver = xstrdup(cl->driver); if (!idev->driver) { xf86Msg(X_ERROR, "Failed to allocate memory while merging " "InputClass configuration"); return BadAlloc; } classopts = xf86ReplaceStrOption(classopts, "driver", idev->driver); } /* Apply options to device with InputClass settings preferred. */ xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n", idev->name, cl->identifier); idev->options = xf86optionListMerge(idev->options, classopts); } return Success; } /* * Iterate the list of classes and look for Option "Ignore". Return the * value of the last matching class and holler when returning TRUE. */ static Bool IgnoreInputClass(const InputInfoPtr idev, const InputAttributes * attrs) { XF86ConfInputClassPtr cl; Bool ignore = FALSE; const char *ignore_class; for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) { if (!InputClassMatches(cl, idev, attrs)) continue; if (xf86findOption(cl->option_lst, "Ignore")) { ignore = xf86CheckBoolOption(cl->option_lst, "Ignore", FALSE); ignore_class = cl->identifier; } } if (ignore) xf86Msg(X_CONFIG, "%s: Ignoring device from InputClass \"%s\"\n", idev->name, ignore_class); return ignore; } InputInfoPtr xf86AllocateInput(void) { InputInfoPtr pInfo; pInfo = calloc(sizeof(*pInfo), 1); if (!pInfo) return NULL; pInfo->fd = -1; pInfo->type_name = "UNKNOWN"; return pInfo; } /* Append InputInfoRec to the tail of xf86InputDevs. */ static void xf86AddInput(InputDriverPtr drv, InputInfoPtr pInfo) { InputInfoPtr *prev = NULL; pInfo->drv = drv; pInfo->module = DuplicateModule(drv->module, NULL); for (prev = &xf86InputDevs; *prev; prev = &(*prev)->next); *prev = pInfo; pInfo->next = NULL; xf86CollectInputOptions(pInfo, (const char **) drv->default_options); xf86OptionListReport(pInfo->options); xf86ProcessCommonOptions(pInfo, pInfo->options); } /* * Remove an entry from xf86InputDevs and free all the device's information. */ void xf86DeleteInput(InputInfoPtr pInp, int flags) { /* First check if the inputdev is valid. */ if (pInp == NULL) return; if (pInp->module) UnloadModule(pInp->module); /* This should *really* be handled in drv->UnInit(dev) call instead, but * if the driver forgets about it make sure we free it or at least crash * with flying colors */ free(pInp->private); FreeInputAttributes(pInp->attrs); if (pInp->flags & XI86_SERVER_FD) systemd_logind_release_fd(pInp->major, pInp->minor, pInp->fd); /* Remove the entry from the list. */ if (pInp == xf86InputDevs) xf86InputDevs = pInp->next; else { InputInfoPtr p = xf86InputDevs; while (p && p->next != pInp) p = p->next; if (p) p->next = pInp->next; /* Else the entry wasn't in the xf86InputDevs list (ignore this). */ } free((void *) pInp->driver); free((void *) pInp->name); xf86optionListFree(pInp->options); free(pInp); } /* * Apply backend-specific initialization. Invoked after ActivateDevice(), * i.e. after the driver successfully completed DEVICE_INIT and the device * is advertised. * @param dev the device * @return Success or an error code */ static int xf86InputDevicePostInit(DeviceIntPtr dev) { ApplyAccelerationSettings(dev); ApplyTransformationMatrix(dev); ApplyAutoRepeat(dev); return Success; } static void xf86stat(const char *path, int *maj, int *min) { struct stat st; if (stat(path, &st) == -1) return; *maj = major(st.st_rdev); *min = minor(st.st_rdev); } static inline InputDriverPtr xf86LoadInputDriver(const char *driver_name) { InputDriverPtr drv = NULL; /* Memory leak for every attached device if we don't * test if the module is already loaded first */ drv = xf86LookupInputDriver(driver_name); if (!drv) { if (xf86LoadOneModule(driver_name, NULL)) drv = xf86LookupInputDriver(driver_name); } return drv; } /** * Create a new input device, activate and enable it. * * Possible return codes: * BadName .. a bad driver name was supplied. * BadImplementation ... The driver does not have a PreInit function. This * is a driver bug. * BadMatch .. device initialization failed. * BadAlloc .. too many input devices * * @param idev The device, already set up with identifier, driver, and the * options. * @param pdev Pointer to the new device, if Success was reported. * @param enable Enable the device after activating it. * * @return Success or an error code */ _X_INTERNAL int xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) { InputDriverPtr drv = NULL; DeviceIntPtr dev = NULL; Bool paused = FALSE; int rval; char *path = NULL; drv = xf86LoadInputDriver(pInfo->driver); if (!drv) { xf86Msg(X_ERROR, "No input driver matching `%s'\n", pInfo->driver); if (strlen(FALLBACK_INPUT_DRIVER) > 0) { xf86Msg(X_INFO, "Falling back to input driver `%s'\n", FALLBACK_INPUT_DRIVER); drv = xf86LoadInputDriver(FALLBACK_INPUT_DRIVER); if (drv) { free(pInfo->driver); pInfo->driver = strdup(FALLBACK_INPUT_DRIVER); } } if (!drv) { rval = BadName; goto unwind; } } xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName, pInfo->name); if (!drv->PreInit) { xf86Msg(X_ERROR, "Input driver `%s' has no PreInit function (ignoring)\n", drv->driverName); rval = BadImplementation; goto unwind; } path = xf86CheckStrOption(pInfo->options, "Device", NULL); if (path && pInfo->major == 0 && pInfo->minor == 0) xf86stat(path, &pInfo->major, &pInfo->minor); if (path && (drv->capabilities & XI86_DRV_CAP_SERVER_FD)){ int fd = systemd_logind_take_fd(pInfo->major, pInfo->minor, path, &paused); if (fd != -1) { if (paused) { /* Put on new_input_devices list for delayed probe */ PausedInputDevicePtr new_device = xnfalloc(sizeof *new_device); new_device->pInfo = pInfo; xorg_list_append(&new_device->node, &new_input_devices_list); systemd_logind_release_fd(pInfo->major, pInfo->minor, fd); free(path); return BadMatch; } pInfo->fd = fd; pInfo->flags |= XI86_SERVER_FD; pInfo->options = xf86ReplaceIntOption(pInfo->options, "fd", fd); } } free(path); xf86AddInput(drv, pInfo); input_lock(); rval = drv->PreInit(drv, pInfo, 0); input_unlock(); if (rval != Success) { xf86Msg(X_ERROR, "PreInit returned %d for \"%s\"\n", rval, pInfo->name); goto unwind; } if (!(dev = xf86ActivateDevice(pInfo))) { rval = BadAlloc; goto unwind; } rval = ActivateDevice(dev, TRUE); if (rval != Success) { xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name); RemoveDevice(dev, TRUE); goto unwind; } rval = xf86InputDevicePostInit(dev); if (rval != Success) { xf86Msg(X_ERROR, "Couldn't post-init device \"%s\"\n", pInfo->name); RemoveDevice(dev, TRUE); goto unwind; } /* Enable it if it's properly initialised and we're currently in the VT */ if (enable && dev->inited && dev->startup && xf86VTOwner()) { input_lock(); EnableDevice(dev, TRUE); if (!dev->enabled) { xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name); RemoveDevice(dev, TRUE); rval = BadMatch; input_unlock(); goto unwind; } /* send enter/leave event, update sprite window */ CheckMotion(NULL, dev); input_unlock(); } *pdev = dev; return Success; unwind: if (pInfo) { if (drv && drv->UnInit) drv->UnInit(drv, pInfo, 0); else xf86DeleteInput(pInfo, 0); } return rval; } int NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, DeviceIntPtr *pdev) { InputInfoPtr pInfo = NULL; InputOption *option = NULL; int rval = Success; int is_auto = 0; pInfo = xf86AllocateInput(); if (!pInfo) return BadAlloc; nt_list_for_each_entry(option, options, list.next) { const char *key = input_option_get_key(option); const char *value = input_option_get_value(option); if (strcasecmp(key, "driver") == 0) { if (pInfo->driver) { rval = BadRequest; goto unwind; } pInfo->driver = xstrdup(value); if (!pInfo->driver) { rval = BadAlloc; goto unwind; } } if (strcasecmp(key, "name") == 0 || strcasecmp(key, "identifier") == 0) { if (pInfo->name) { rval = BadRequest; goto unwind; } pInfo->name = xstrdup(value); if (!pInfo->name) { rval = BadAlloc; goto unwind; } } if (strcmp(key, "_source") == 0 && (strcmp(value, "server/hal") == 0 || strcmp(value, "server/udev") == 0 || strcmp(value, "server/wscons") == 0)) { is_auto = 1; if (!xf86Info.autoAddDevices) { rval = BadMatch; goto unwind; } } if (strcmp(key, "major") == 0) pInfo->major = atoi(value); if (strcmp(key, "minor") == 0) pInfo->minor = atoi(value); } nt_list_for_each_entry(option, options, list.next) { /* Copy option key/value strings from the provided list */ pInfo->options = xf86AddNewOption(pInfo->options, input_option_get_key(option), input_option_get_value(option)); } /* Apply InputClass settings */ if (attrs) { if (IgnoreInputClass(pInfo, attrs)) { rval = BadIDChoice; goto unwind; } rval = MergeInputClasses(pInfo, attrs); if (rval != Success) goto unwind; pInfo->attrs = DuplicateInputAttributes(attrs); } if (!pInfo->name) { xf86Msg(X_INFO, "No identifier specified, ignoring this device.\n"); rval = BadRequest; goto unwind; } if (!pInfo->driver) { xf86Msg(X_INFO, "No input driver specified, ignoring this device.\n"); xf86Msg(X_INFO, "This device may have been added with another device file.\n"); rval = BadRequest; goto unwind; } rval = xf86NewInputDevice(pInfo, pdev, (!is_auto || (is_auto && xf86Info.autoEnableDevices))); return rval; unwind: if (is_auto && !xf86Info.autoAddDevices) xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n"); xf86DeleteInput(pInfo, 0); return rval; } void DeleteInputDeviceRequest(DeviceIntPtr pDev) { InputInfoPtr pInfo = (InputInfoPtr) pDev->public.devicePrivate; InputDriverPtr drv = NULL; Bool isMaster = IsMaster(pDev); if (pInfo) /* need to get these before RemoveDevice */ drv = pInfo->drv; input_lock(); RemoveDevice(pDev, TRUE); if (!isMaster && pInfo != NULL) { if (drv->UnInit) drv->UnInit(drv, pInfo, 0); else xf86DeleteInput(pInfo, 0); } input_unlock(); } void RemoveInputDeviceTraces(const char *config_info) { PausedInputDevicePtr d, tmp; xorg_list_for_each_entry_safe(d, tmp, &new_input_devices_list, node) { const char *ci = xf86findOptionValue(d->pInfo->options, "config_info"); if (!ci || strcmp(ci, config_info) != 0) continue; xorg_list_del(&d->node); free(d); } } /* * convenient functions to post events */ void xf86PostMotionEvent(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, ...) { va_list var; int i = 0; ValuatorMask mask; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_zero(&mask); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuator_mask_set(&mask, first_valuator + i, va_arg(var, int)); va_end(var); xf86PostMotionEventM(device, is_absolute, &mask); } void xf86PostMotionEventP(DeviceIntPtr device, int is_absolute, int first_valuator, int num_valuators, const int *valuators) { ValuatorMask mask; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_set_range(&mask, first_valuator, num_valuators, valuators); xf86PostMotionEventM(device, is_absolute, &mask); } static int xf86CheckMotionEvent4DGA(DeviceIntPtr device, int is_absolute, const ValuatorMask *mask) { int stolen = 0; #ifdef XFreeXDGA ScreenPtr scr = NULL; int idx = 0, i; /* The evdev driver may not always send all axes across. */ if (valuator_mask_isset(mask, 0) || valuator_mask_isset(mask, 1)) { scr = miPointerGetScreen(device); if (scr) { int dx = 0, dy = 0; idx = scr->myNum; if (valuator_mask_isset(mask, 0)) { dx = valuator_mask_get(mask, 0); if (is_absolute) dx -= device->last.valuators[0]; else if (valuator_mask_has_unaccelerated(mask)) dx = valuator_mask_get_unaccelerated(mask, 0); } if (valuator_mask_isset(mask, 1)) { dy = valuator_mask_get(mask, 1); if (is_absolute) dy -= device->last.valuators[1]; else if (valuator_mask_has_unaccelerated(mask)) dy = valuator_mask_get_unaccelerated(mask, 1); } if (DGAStealMotionEvent(device, idx, dx, dy)) stolen = 1; } } for (i = 2; i < valuator_mask_size(mask); i++) { AxisInfoPtr ax; double incr; int val, button; if (i >= device->valuator->numAxes) break; if (!valuator_mask_isset(mask, i)) continue; ax = &device->valuator->axes[i]; if (ax->scroll.type == SCROLL_TYPE_NONE) continue; if (!scr) { scr = miPointerGetScreen(device); if (!scr) break; idx = scr->myNum; } incr = ax->scroll.increment; val = valuator_mask_get(mask, i); if (ax->scroll.type == SCROLL_TYPE_VERTICAL) { if (incr * val < 0) button = 4; /* up */ else button = 5; /* down */ } else { /* SCROLL_TYPE_HORIZONTAL */ if (incr * val < 0) button = 6; /* left */ else button = 7; /* right */ } if (DGAStealButtonEvent(device, idx, button, 1) && DGAStealButtonEvent(device, idx, button, 0)) stolen = 1; } #endif return stolen; } void xf86PostMotionEventM(DeviceIntPtr device, int is_absolute, const ValuatorMask *mask) { int flags = 0; if (xf86CheckMotionEvent4DGA(device, is_absolute, mask)) return; if (valuator_mask_num_valuators(mask) > 0) { if (is_absolute) flags = POINTER_ABSOLUTE; else flags = POINTER_RELATIVE | POINTER_ACCELERATE; } QueuePointerEvents(device, MotionNotify, 0, flags, mask); } void xf86PostProximityEvent(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, ...) { va_list var; int i; ValuatorMask mask; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_zero(&mask); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuator_mask_set(&mask, first_valuator + i, va_arg(var, int)); va_end(var); xf86PostProximityEventM(device, is_in, &mask); } void xf86PostProximityEventP(DeviceIntPtr device, int is_in, int first_valuator, int num_valuators, const int *valuators) { ValuatorMask mask; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_set_range(&mask, first_valuator, num_valuators, valuators); xf86PostProximityEventM(device, is_in, &mask); } void xf86PostProximityEventM(DeviceIntPtr device, int is_in, const ValuatorMask *mask) { QueueProximityEvents(device, is_in ? ProximityIn : ProximityOut, mask); } void xf86PostButtonEvent(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, ...) { va_list var; ValuatorMask mask; int i = 0; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_zero(&mask); va_start(var, num_valuators); for (i = 0; i < num_valuators; i++) valuator_mask_set(&mask, first_valuator + i, va_arg(var, int)); va_end(var); xf86PostButtonEventM(device, is_absolute, button, is_down, &mask); } void xf86PostButtonEventP(DeviceIntPtr device, int is_absolute, int button, int is_down, int first_valuator, int num_valuators, const int *valuators) { ValuatorMask mask; XI_VERIFY_VALUATORS(num_valuators); valuator_mask_set_range(&mask, first_valuator, num_valuators, valuators); xf86PostButtonEventM(device, is_absolute, button, is_down, &mask); } void xf86PostButtonEventM(DeviceIntPtr device, int is_absolute, int button, int is_down, const ValuatorMask *mask) { int flags = 0; if (valuator_mask_num_valuators(mask) > 0) { if (is_absolute) flags = POINTER_ABSOLUTE; else flags = POINTER_RELATIVE | POINTER_ACCELERATE; } #ifdef XFreeXDGA if (miPointerGetScreen(device)) { int index = miPointerGetScreen(device)->myNum; if (DGAStealButtonEvent(device, index, button, is_down)) return; } #endif QueuePointerEvents(device, is_down ? ButtonPress : ButtonRelease, button, flags, mask); } void xf86PostKeyEvent(DeviceIntPtr device, unsigned int key_code, int is_down) { xf86PostKeyEventM(device, key_code, is_down); } void xf86PostKeyEventP(DeviceIntPtr device, unsigned int key_code, int is_down) { xf86PostKeyEventM(device, key_code, is_down); } void xf86PostKeyEventM(DeviceIntPtr device, unsigned int key_code, int is_down) { #ifdef XFreeXDGA DeviceIntPtr pointer; /* Some pointers send key events, paired device is wrong then. */ pointer = GetMaster(device, POINTER_OR_FLOAT); if (miPointerGetScreen(pointer)) { int index = miPointerGetScreen(pointer)->myNum; if (DGAStealKeyEvent(device, index, key_code, is_down)) return; } #endif QueueKeyboardEvents(device, is_down ? KeyPress : KeyRelease, key_code); } void xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down) { ValuatorMask mask; valuator_mask_zero(&mask); xf86PostKeyEventM(device, key_code, is_down); } InputInfoPtr xf86FirstLocalDevice(void) { return xf86InputDevs; } /* * Cx - raw data from touch screen * to_max - scaled highest dimension * (remember, this is of rows - 1 because of 0 origin) * to_min - scaled lowest dimension * from_max - highest raw value from touch screen calibration * from_min - lowest raw value from touch screen calibration * * This function is the same for X or Y coordinates. * You may have to reverse the high and low values to compensate for * different origins on the touch screen vs X. * * e.g. to scale from device coordinates into screen coordinates, call * xf86ScaleAxis(x, 0, screen_width, dev_min, dev_max); */ int xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min) { int X; int64_t to_width = to_max - to_min; int64_t from_width = from_max - from_min; if (from_width) { X = (int) (((to_width * (Cx - from_min)) / from_width) + to_min); } else { X = 0; ErrorF("Divide by Zero in xf86ScaleAxis\n"); } if (X > to_max) X = to_max; if (X < to_min) X = to_min; return X; } Bool xf86InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res, int mode) { if (!dev || !dev->valuator) return FALSE; return InitValuatorAxisStruct(dev, axnum, label, minval, maxval, resolution, min_res, max_res, mode); } /* * Set the valuator values to be in sync with dix/event.c * DefineInitialRootWindow(). */ void xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) { if (axnum == 0) { dev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; dev->last.valuators[0] = dev->valuator->axisVal[0]; } else if (axnum == 1) { dev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; dev->last.valuators[1] = dev->valuator->axisVal[1]; } } /** * Deactivate a device. Call this function from the driver if you receive a * read error or something else that spoils your day. * Device will be moved to the off_devices list, but it will still be there * until you really clean up after it. * Notifies the client about an inactive device. * * @param panic True if device is unrecoverable and needs to be removed. */ void xf86DisableDevice(DeviceIntPtr dev, Bool panic) { if (!panic) { DisableDevice(dev, TRUE); } else { SendDevicePresenceEvent(dev->id, DeviceUnrecoverable); DeleteInputDeviceRequest(dev); } } /** * Reactivate a device. Call this function from the driver if you just found * out that the read error wasn't quite that bad after all. * Device will be re-activated, and an event sent to the client. */ void xf86EnableDevice(DeviceIntPtr dev) { EnableDevice(dev, TRUE); } /** * Post a touch event with optional valuators. If this is the first touch in * the sequence, at least x & y valuators must be provided. The driver is * responsible for maintaining the correct event sequence (TouchBegin, TouchUpdate, * TouchEnd). Submitting an update or end event for a unregistered touchid will * result in errors. * Touch IDs may be reused by the driver but only after a TouchEnd has been * submitted for that touch ID. * * @param dev The device to post the event for * @param touchid The touchid of the current touch event. Must be an * existing ID for TouchUpdate or TouchEnd events * @param type One of XI_TouchBegin, XI_TouchUpdate, XI_TouchEnd * @param flags Flags for this event * @param The valuator mask with all valuators set for this event. */ void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type, uint32_t flags, const ValuatorMask *mask) { QueueTouchEvents(dev, type, touchid, flags, mask); } /** * Post a gesture pinch event. The driver is responsible for maintaining the * correct event sequence (GesturePinchBegin, GesturePinchUpdate, * GesturePinchEnd). * * @param dev The device to post the event for * @param type One of XI_GesturePinchBegin, XI_GesturePinchUpdate, * XI_GesturePinchEnd * @param num_touches The number of touches in the gesture * @param flags Flags for this event * @param delta_x,delta_y accelerated relative motion delta * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta * @param scale absolute scale of a pinch gesture * @param delta_angle the ange delta in degrees between the last and the current pinch event. */ void xf86PostGesturePinchEvent(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle) { QueueGesturePinchEvents(dev, type, num_touches, flags, delta_x, delta_y, delta_unaccel_x, delta_unaccel_y, scale, delta_angle); } /** * Post a gesture swipe event. The driver is responsible for maintaining the * correct event sequence (GestureSwipeBegin, GestureSwipeUpdate, * GestureSwipeEnd). * * @param dev The device to post the event for * @param type One of XI_GestureSwipeBegin, XI_GestureSwipeUpdate, * XI_GestureSwipeEnd * @param num_touches The number of touches in the gesture * @param flags Flags for this event * @param delta_x,delta_y accelerated relative motion delta * @param delta_unaccel_x,delta_unaccel_y unaccelerated relative motion delta */ void xf86PostGestureSwipeEvent(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y) { QueueGestureSwipeEvents(dev, type, num_touches, flags, delta_x, delta_y, delta_unaccel_x, delta_unaccel_y); } void xf86InputEnableVTProbe(void) { int is_auto = 0; DeviceIntPtr pdev; PausedInputDevicePtr d, tmp; xorg_list_for_each_entry_safe(d, tmp, &new_input_devices_list, node) { InputInfoPtr pInfo = d->pInfo; const char *value = xf86findOptionValue(pInfo->options, "_source"); is_auto = 0; if (value && (strcmp(value, "server/hal") == 0 || strcmp(value, "server/udev") == 0 || strcmp(value, "server/wscons") == 0)) is_auto = 1; xf86NewInputDevice(pInfo, &pdev, (!is_auto || (is_auto && xf86Info.autoEnableDevices))); xorg_list_del(&d->node); free(d); } } /* end of xf86Xinput.c */ xorg-server-21.1.16/hw/xfree86/common/xisb.c0000644000175000017500000001206614757411105014146 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* X Input Serial Buffer routines for use in any XInput driver that accesses a serial device. */ /***************************************************************************** * Standard Headers ****************************************************************************/ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "xisb.h" /***************************************************************************** * Local Headers ****************************************************************************/ /***************************************************************************** * Variables without includable headers ****************************************************************************/ /***************************************************************************** * Local Variables ****************************************************************************/ /***************************************************************************** * Function Definitions ****************************************************************************/ XISBuffer * XisbNew(int fd, ssize_t size) { XISBuffer *b; b = malloc(sizeof(XISBuffer)); if (!b) return NULL; b->buf = malloc((sizeof(unsigned char) * size)); if (!b->buf) { free(b); return NULL; } b->fd = fd; b->trace = 0; b->block_duration = 0; b->current = 1; /* force it to be past the end to trigger initial read */ b->end = 0; b->buffer_size = size; return b; } void XisbFree(XISBuffer * b) { free(b->buf); free(b); } int XisbRead(XISBuffer * b) { int ret; if (b->current >= b->end) { if (b->block_duration >= 0) { if (xf86WaitForInput(b->fd, b->block_duration) < 1) return -1; } else { /* * automatically clear it so if XisbRead is called in a loop * the next call will make sure there is data with select and * thus prevent a blocking read */ b->block_duration = 0; } ret = xf86ReadSerial(b->fd, b->buf, b->buffer_size); switch (ret) { case 0: return -1; /* timeout */ case -1: return -2; /* error */ default: b->end = ret; b->current = 0; break; } } if (b->trace) ErrorF("read 0x%02x (%c)\n", b->buf[b->current], isprint(b->buf[b->current]) ? b->buf[b->current] : '.'); return b->buf[b->current++]; } /* the only purpose of this function is to provide output tracing */ ssize_t XisbWrite(XISBuffer * b, unsigned char *msg, ssize_t len) { if (b->trace) { int i = 0; for (i = 0; i < len; i++) ErrorF("\t\twrote 0x%02x (%c)\n", msg[i], msg[i]); } return (xf86WriteSerial(b->fd, msg, len)); } /* turn tracing of this buffer on (1) or off (0) */ void XisbTrace(XISBuffer * b, int trace) { b->trace = trace; } /* * specify a block_duration of -1 when you know the buffer's fd is ready to * read. After a read, it is automatically set to 0 so that the next read * will use check to select for data and prevent a block. * It is the caller's responsibility to set the block_duration to -1 if it * knows that there is data to read (because the main select loop triggered * the read) and wants to avoid the unnecessary overhead of the select call * * a zero or positive block duration will cause the select to block for the * give duration in usecs. */ void XisbBlockDuration(XISBuffer * b, int block_duration) { b->block_duration = block_duration; } xorg-server-21.1.16/hw/xfree86/common/xf86Mode.c0000644000175000017500000021734514757411105014610 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * LCM() and scanLineWidth() are: * * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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 1990,91,92,93 by Thomas Roell, Germany. * Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. * * 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 Thomas Roell nor * SGCS be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. * Thomas Roell nor SGCS makes no representations about the suitability * of this software for any purpose. It is provided "as is" without * express or implied warranty. * * THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS 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. */ /* * Authors: Dirk Hohndel * David Dawes * Marc La France * ... and others * * This file includes helper functions for mode related things. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86Modes.h" #include "xf86Crtc.h" #include "os.h" #include "servermd.h" #include "globals.h" #include "xf86.h" #include "xf86Priv.h" #include "edid.h" static void printModeRejectMessage(int index, DisplayModePtr p, int status) { const char *type; if (p->type & M_T_BUILTIN) type = "built-in "; else if (p->type & M_T_DEFAULT) type = "default "; else if (p->type & M_T_DRIVER) type = "driver "; else type = ""; xf86DrvMsg(index, X_INFO, "Not using %smode \"%s\" (%s)\n", type, p->name, xf86ModeStatusToString(status)); } /* * Find closest clock to given frequency (in kHz). This assumes the * number of clocks is greater than zero. */ static int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, int DivFactor, int MulFactor, int *divider) { int nearestClock = 0, nearestDiv = 1; int minimumGap = abs(freq - scrp->clock[0]); int i, j, k, gap; if (allowDiv2) k = 2; else k = 1; /* Must set this here in case the best match is scrp->clock[0] */ if (divider != NULL) *divider = 0; for (i = 0; i < scrp->numClocks; i++) { for (j = 1; j <= k; j++) { gap = abs((freq * j) - ((scrp->clock[i] * DivFactor) / MulFactor)); if ((gap < minimumGap) || ((gap == minimumGap) && (j < nearestDiv))) { minimumGap = gap; nearestClock = i; nearestDiv = j; if (divider != NULL) *divider = (j - 1) * V_CLKDIV2; } } } return nearestClock; } /* * xf86ModeStatusToString * * Convert a ModeStatus value to a printable message */ const char * xf86ModeStatusToString(ModeStatus status) { switch (status) { case MODE_OK: return "Mode OK"; case MODE_HSYNC: return "hsync out of range"; case MODE_VSYNC: return "vrefresh out of range"; case MODE_H_ILLEGAL: return "illegal horizontal timings"; case MODE_V_ILLEGAL: return "illegal vertical timings"; case MODE_BAD_WIDTH: return "width requires unsupported line pitch"; case MODE_NOMODE: return "no mode of this name"; case MODE_NO_INTERLACE: return "interlace mode not supported"; case MODE_NO_DBLESCAN: return "doublescan mode not supported"; case MODE_NO_VSCAN: return "multiscan mode not supported"; case MODE_MEM: return "insufficient memory for mode"; case MODE_VIRTUAL_X: return "width too large for virtual size"; case MODE_VIRTUAL_Y: return "height too large for virtual size"; case MODE_MEM_VIRT: return "insufficient memory given virtual size"; case MODE_NOCLOCK: return "no clock available for mode"; case MODE_CLOCK_HIGH: return "mode clock too high"; case MODE_CLOCK_LOW: return "mode clock too low"; case MODE_CLOCK_RANGE: return "bad mode clock/interlace/doublescan"; case MODE_BAD_HVALUE: return "horizontal timing out of range"; case MODE_BAD_VVALUE: return "vertical timing out of range"; case MODE_BAD_VSCAN: return "VScan value out of range"; case MODE_HSYNC_NARROW: return "horizontal sync too narrow"; case MODE_HSYNC_WIDE: return "horizontal sync too wide"; case MODE_HBLANK_NARROW: return "horizontal blanking too narrow"; case MODE_HBLANK_WIDE: return "horizontal blanking too wide"; case MODE_VSYNC_NARROW: return "vertical sync too narrow"; case MODE_VSYNC_WIDE: return "vertical sync too wide"; case MODE_VBLANK_NARROW: return "vertical blanking too narrow"; case MODE_VBLANK_WIDE: return "vertical blanking too wide"; case MODE_PANEL: return "exceeds panel dimensions"; case MODE_INTERLACE_WIDTH: return "width too large for interlaced mode"; case MODE_ONE_WIDTH: return "all modes must have the same width"; case MODE_ONE_HEIGHT: return "all modes must have the same height"; case MODE_ONE_SIZE: return "all modes must have the same resolution"; case MODE_NO_REDUCED: return "monitor doesn't support reduced blanking"; case MODE_BANDWIDTH: return "mode requires too much memory bandwidth"; case MODE_BAD: return "unknown reason"; case MODE_ERROR: return "internal error"; default: return "unknown"; } } /* * xf86ShowClockRanges() -- Print the clock ranges allowed * and the clock values scaled by ClockMulFactor and ClockDivFactor */ void xf86ShowClockRanges(ScrnInfoPtr scrp, ClockRangePtr clockRanges) { ClockRangePtr cp; int MulFactor = 1; int DivFactor = 1; int i, j; int scaledClock; for (cp = clockRanges; cp != NULL; cp = cp->next) { DivFactor = max(1, cp->ClockDivFactor); MulFactor = max(1, cp->ClockMulFactor); if (scrp->progClock) { if (cp->minClock) { if (cp->maxClock) { xf86DrvMsg(scrp->scrnIndex, X_INFO, "Clock range: %6.2f to %6.2f MHz\n", (double) cp->minClock / 1000.0, (double) cp->maxClock / 1000.0); } else { xf86DrvMsg(scrp->scrnIndex, X_INFO, "Minimum clock: %6.2f MHz\n", (double) cp->minClock / 1000.0); } } else { if (cp->maxClock) { xf86DrvMsg(scrp->scrnIndex, X_INFO, "Maximum clock: %6.2f MHz\n", (double) cp->maxClock / 1000.0); } } } else if (DivFactor > 1 || MulFactor > 1) { j = 0; for (i = 0; i < scrp->numClocks; i++) { scaledClock = (scrp->clock[i] * DivFactor) / MulFactor; if (scaledClock >= cp->minClock && scaledClock <= cp->maxClock) { if ((j % 8) == 0) { if (j > 0) xf86ErrorF("\n"); xf86DrvMsg(scrp->scrnIndex, X_INFO, "scaled clocks:"); } xf86ErrorF(" %6.2f", (double) scaledClock / 1000.0); j++; } } xf86ErrorF("\n"); } } } static Bool modeInClockRange(ClockRangePtr cp, DisplayModePtr p) { return ((p->Clock >= cp->minClock) && (p->Clock <= cp->maxClock) && (cp->interlaceAllowed || !(p->Flags & V_INTERLACE)) && (cp->doubleScanAllowed || ((p->VScan <= 1) && !(p->Flags & V_DBLSCAN)))); } /* * xf86FindClockRangeForMode() [... like the name says ...] */ static ClockRangePtr xf86FindClockRangeForMode(ClockRangePtr clockRanges, DisplayModePtr p) { ClockRangePtr cp; for (cp = clockRanges;; cp = cp->next) if (!cp || modeInClockRange(cp, p)) return cp; } /* * xf86HandleBuiltinMode() - handles built-in modes */ static ModeStatus xf86HandleBuiltinMode(ScrnInfoPtr scrp, DisplayModePtr p, DisplayModePtr modep, ClockRangePtr clockRanges, Bool allowDiv2) { ClockRangePtr cp; int extraFlags = 0; int MulFactor = 1; int DivFactor = 1; int clockIndex; /* Reject previously rejected modes */ if (p->status != MODE_OK) return p->status; /* Reject previously considered modes */ if (p->prev) return MODE_NOMODE; if ((p->type & M_T_CLOCK_C) == M_T_CLOCK_C) { /* Check clock is in range */ cp = xf86FindClockRangeForMode(clockRanges, p); if (cp == NULL) { modep->type = p->type; p->status = MODE_CLOCK_RANGE; return MODE_CLOCK_RANGE; } DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; if (!scrp->progClock) { clockIndex = xf86GetNearestClock(scrp, p->Clock, allowDiv2, cp->ClockDivFactor, cp->ClockMulFactor, &extraFlags); modep->Clock = (scrp->clock[clockIndex] * DivFactor) / MulFactor; modep->ClockIndex = clockIndex; modep->SynthClock = scrp->clock[clockIndex]; if (extraFlags & V_CLKDIV2) { modep->Clock /= 2; modep->SynthClock /= 2; } } else { modep->Clock = p->Clock; modep->ClockIndex = -1; modep->SynthClock = (modep->Clock * MulFactor) / DivFactor; } modep->PrivFlags = cp->PrivFlags; } else { if (!scrp->progClock) { modep->Clock = p->Clock; modep->ClockIndex = p->ClockIndex; modep->SynthClock = p->SynthClock; } else { modep->Clock = p->Clock; modep->ClockIndex = -1; modep->SynthClock = p->SynthClock; } modep->PrivFlags = p->PrivFlags; } modep->type = p->type; modep->HDisplay = p->HDisplay; modep->HSyncStart = p->HSyncStart; modep->HSyncEnd = p->HSyncEnd; modep->HTotal = p->HTotal; modep->HSkew = p->HSkew; modep->VDisplay = p->VDisplay; modep->VSyncStart = p->VSyncStart; modep->VSyncEnd = p->VSyncEnd; modep->VTotal = p->VTotal; modep->VScan = p->VScan; modep->Flags = p->Flags | extraFlags; modep->CrtcHDisplay = p->CrtcHDisplay; modep->CrtcHBlankStart = p->CrtcHBlankStart; modep->CrtcHSyncStart = p->CrtcHSyncStart; modep->CrtcHSyncEnd = p->CrtcHSyncEnd; modep->CrtcHBlankEnd = p->CrtcHBlankEnd; modep->CrtcHTotal = p->CrtcHTotal; modep->CrtcHSkew = p->CrtcHSkew; modep->CrtcVDisplay = p->CrtcVDisplay; modep->CrtcVBlankStart = p->CrtcVBlankStart; modep->CrtcVSyncStart = p->CrtcVSyncStart; modep->CrtcVSyncEnd = p->CrtcVSyncEnd; modep->CrtcVBlankEnd = p->CrtcVBlankEnd; modep->CrtcVTotal = p->CrtcVTotal; modep->CrtcHAdjusted = p->CrtcHAdjusted; modep->CrtcVAdjusted = p->CrtcVAdjusted; modep->HSync = p->HSync; modep->VRefresh = p->VRefresh; modep->Private = p->Private; modep->PrivSize = p->PrivSize; p->prev = modep; return MODE_OK; } /* * xf86LookupMode * * This function returns a mode from the given list which matches the * given name. When multiple modes with the same name are available, * the method of picking the matching mode is determined by the * strategy selected. * * This function takes the following parameters: * scrp ScrnInfoPtr * modep pointer to the returned mode, which must have the name * field filled in. * clockRanges a list of clock ranges. This is optional when all the * modes are built-in modes. * strategy how to decide which mode to use from multiple modes with * the same name * * In addition, the following fields from the ScrnInfoRec are used: * modePool the list of monitor modes compatible with the driver * clocks a list of discrete clocks * numClocks number of discrete clocks * progClock clock is programmable * * If a mode was found, its values are filled in to the area pointed to * by modep, If a mode was not found the return value indicates the * reason. */ static ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, ClockRangePtr clockRanges, LookupModeFlags strategy) { DisplayModePtr p, bestMode = NULL; ClockRangePtr cp; int i, k, gap, minimumGap = CLOCK_TOLERANCE + 1; double refresh, bestRefresh = 0.0; Bool found = FALSE; int extraFlags = 0; int clockIndex = -1; int MulFactor = 1; int DivFactor = 1; int ModePrivFlags = 0; ModeStatus status = MODE_NOMODE; Bool allowDiv2 = (strategy & LOOKUP_CLKDIV2) != 0; int n; const int types[] = { M_T_BUILTIN | M_T_PREFERRED, M_T_BUILTIN, M_T_USERDEF | M_T_PREFERRED, M_T_USERDEF, M_T_DRIVER | M_T_PREFERRED, M_T_DRIVER, 0 }; const int ntypes = ARRAY_SIZE(types); strategy &= ~(LOOKUP_CLKDIV2 | LOOKUP_OPTIONAL_TOLERANCES); /* Some sanity checking */ if (scrp == NULL || scrp->modePool == NULL || (!scrp->progClock && scrp->numClocks == 0)) { ErrorF("xf86LookupMode: called with invalid scrnInfoRec\n"); return MODE_ERROR; } if (modep == NULL || modep->name == NULL) { ErrorF("xf86LookupMode: called with invalid modep\n"); return MODE_ERROR; } for (cp = clockRanges; cp != NULL; cp = cp->next) { /* DivFactor and MulFactor must be > 0 */ cp->ClockDivFactor = max(1, cp->ClockDivFactor); cp->ClockMulFactor = max(1, cp->ClockMulFactor); } /* Scan the mode pool for matching names */ for (n = 0; n < ntypes; n++) { int type = types[n]; for (p = scrp->modePool; p != NULL; p = p->next) { /* scan through the modes in the sort order above */ if ((p->type & type) != type) continue; if (p->name == NULL) continue; if (strcmp(p->name, modep->name) == 0) { /* Skip over previously rejected modes */ if (p->status != MODE_OK) { if (!found) status = p->status; continue; } /* Skip over previously considered modes */ if (p->prev) continue; if (p->type & M_T_BUILTIN) { return xf86HandleBuiltinMode(scrp, p, modep, clockRanges, allowDiv2); } /* Check clock is in range */ cp = xf86FindClockRangeForMode(clockRanges, p); if (cp == NULL) { /* * XXX Could do more here to provide a more detailed * reason for not finding a mode. */ p->status = MODE_CLOCK_RANGE; if (!found) status = MODE_CLOCK_RANGE; continue; } /* * If programmable clock and strategy is not * LOOKUP_BEST_REFRESH, the required mode has been found, * otherwise record the refresh and continue looking. */ if (scrp->progClock) { found = TRUE; if (strategy != LOOKUP_BEST_REFRESH) { bestMode = p; DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; break; } refresh = xf86ModeVRefresh(p); if (p->Flags & V_INTERLACE) refresh /= INTERLACE_REFRESH_WEIGHT; if (refresh > bestRefresh) { bestMode = p; DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; bestRefresh = refresh; } continue; } /* * Clock is in range, so if it is not a programmable clock, find * a matching clock. */ i = xf86GetNearestClock(scrp, p->Clock, allowDiv2, cp->ClockDivFactor, cp->ClockMulFactor, &k); /* * If the clock is too far from the requested clock, this * mode is no good. */ if (k & V_CLKDIV2) gap = abs((p->Clock * 2) - ((scrp->clock[i] * cp->ClockDivFactor) / cp->ClockMulFactor)); else gap = abs(p->Clock - ((scrp->clock[i] * cp->ClockDivFactor) / cp->ClockMulFactor)); if (gap > minimumGap) { p->status = MODE_NOCLOCK; if (!found) status = MODE_NOCLOCK; continue; } found = TRUE; if (strategy == LOOKUP_BEST_REFRESH) { refresh = xf86ModeVRefresh(p); if (p->Flags & V_INTERLACE) refresh /= INTERLACE_REFRESH_WEIGHT; if (refresh > bestRefresh) { bestMode = p; DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; extraFlags = k; clockIndex = i; bestRefresh = refresh; } continue; } if (strategy == LOOKUP_CLOSEST_CLOCK) { if (gap < minimumGap) { bestMode = p; DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; extraFlags = k; clockIndex = i; minimumGap = gap; } continue; } /* * If strategy is neither LOOKUP_BEST_REFRESH or * LOOKUP_CLOSEST_CLOCK the required mode has been found. */ bestMode = p; DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; extraFlags = k; clockIndex = i; break; } } if (found) break; } if (!found || bestMode == NULL) return status; /* Fill in the mode parameters */ if (scrp->progClock) { modep->Clock = bestMode->Clock; modep->ClockIndex = -1; modep->SynthClock = (modep->Clock * MulFactor) / DivFactor; } else { modep->Clock = (scrp->clock[clockIndex] * DivFactor) / MulFactor; modep->ClockIndex = clockIndex; modep->SynthClock = scrp->clock[clockIndex]; if (extraFlags & V_CLKDIV2) { modep->Clock /= 2; modep->SynthClock /= 2; } } modep->type = bestMode->type; modep->PrivFlags = ModePrivFlags; modep->HDisplay = bestMode->HDisplay; modep->HSyncStart = bestMode->HSyncStart; modep->HSyncEnd = bestMode->HSyncEnd; modep->HTotal = bestMode->HTotal; modep->HSkew = bestMode->HSkew; modep->VDisplay = bestMode->VDisplay; modep->VSyncStart = bestMode->VSyncStart; modep->VSyncEnd = bestMode->VSyncEnd; modep->VTotal = bestMode->VTotal; modep->VScan = bestMode->VScan; modep->Flags = bestMode->Flags | extraFlags; modep->CrtcHDisplay = bestMode->CrtcHDisplay; modep->CrtcHBlankStart = bestMode->CrtcHBlankStart; modep->CrtcHSyncStart = bestMode->CrtcHSyncStart; modep->CrtcHSyncEnd = bestMode->CrtcHSyncEnd; modep->CrtcHBlankEnd = bestMode->CrtcHBlankEnd; modep->CrtcHTotal = bestMode->CrtcHTotal; modep->CrtcHSkew = bestMode->CrtcHSkew; modep->CrtcVDisplay = bestMode->CrtcVDisplay; modep->CrtcVBlankStart = bestMode->CrtcVBlankStart; modep->CrtcVSyncStart = bestMode->CrtcVSyncStart; modep->CrtcVSyncEnd = bestMode->CrtcVSyncEnd; modep->CrtcVBlankEnd = bestMode->CrtcVBlankEnd; modep->CrtcVTotal = bestMode->CrtcVTotal; modep->CrtcHAdjusted = bestMode->CrtcHAdjusted; modep->CrtcVAdjusted = bestMode->CrtcVAdjusted; modep->HSync = bestMode->HSync; modep->VRefresh = bestMode->VRefresh; modep->Private = bestMode->Private; modep->PrivSize = bestMode->PrivSize; bestMode->prev = modep; return MODE_OK; } /* * xf86CheckModeForMonitor * * This function takes a mode and monitor description, and determines * if the mode is valid for the monitor. */ ModeStatus xf86CheckModeForMonitor(DisplayModePtr mode, MonPtr monitor) { int i; /* Sanity checks */ if (mode == NULL || monitor == NULL) { ErrorF("xf86CheckModeForMonitor: called with invalid parameters\n"); return MODE_ERROR; } DebugF("xf86CheckModeForMonitor(%p %s, %p %s)\n", mode, mode->name, monitor, monitor->id); /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || mode->HSyncStart >= mode->HSyncEnd || mode->HSyncEnd >= mode->HTotal) return MODE_H_ILLEGAL; if (0 >= mode->VDisplay || mode->VDisplay > mode->VSyncStart || mode->VSyncStart >= mode->VSyncEnd || mode->VSyncEnd >= mode->VTotal) return MODE_V_ILLEGAL; if (monitor->nHsync > 0) { /* Check hsync against the allowed ranges */ float hsync = xf86ModeHSync(mode); for (i = 0; i < monitor->nHsync; i++) if ((hsync > monitor->hsync[i].lo * (1.0 - SYNC_TOLERANCE)) && (hsync < monitor->hsync[i].hi * (1.0 + SYNC_TOLERANCE))) break; /* Now see whether we ran out of sync ranges without finding a match */ if (i == monitor->nHsync) return MODE_HSYNC; } if (monitor->nVrefresh > 0) { /* Check vrefresh against the allowed ranges */ float vrefrsh = xf86ModeVRefresh(mode); for (i = 0; i < monitor->nVrefresh; i++) if ((vrefrsh > monitor->vrefresh[i].lo * (1.0 - SYNC_TOLERANCE)) && (vrefrsh < monitor->vrefresh[i].hi * (1.0 + SYNC_TOLERANCE))) break; /* Now see whether we ran out of refresh ranges without finding a match */ if (i == monitor->nVrefresh) return MODE_VSYNC; } /* Force interlaced modes to have an odd VTotal */ if (mode->Flags & V_INTERLACE) mode->CrtcVTotal = mode->VTotal |= 1; /* * This code stops cvt -r modes, and only cvt -r modes, from hitting 15y+ * old CRTs which might, when there is a lot of solar flare activity and * when the celestial bodies are unfavourably aligned, implode trying to * sync to it. It's called "Protecting the user from doing anything stupid". * -- libv */ if (xf86ModeIsReduced(mode)) { if (!monitor->reducedblanking && !(mode->type & M_T_DRIVER)) return MODE_NO_REDUCED; } if ((monitor->maxPixClock) && (mode->Clock > monitor->maxPixClock)) return MODE_CLOCK_HIGH; return MODE_OK; } /* * xf86CheckModeSize * * An internal routine to check if a mode fits in video memory. This tries to * avoid overflows that would otherwise occur when video memory size is greater * than 256MB. */ static Bool xf86CheckModeSize(ScrnInfoPtr scrp, int w, int x, int y) { int bpp = scrp->fbFormat.bitsPerPixel, pad = scrp->fbFormat.scanlinePad; int lineWidth, lastWidth; if (scrp->depth == 4) pad *= 4; /* 4 planes */ /* Sanity check */ if ((w < 0) || (x < 0) || (y <= 0)) return FALSE; lineWidth = (((w * bpp) + pad - 1) / pad) * pad; lastWidth = x * bpp; /* * At this point, we need to compare * * (lineWidth * (y - 1)) + lastWidth * * against * * scrp->videoRam * (1024 * 8) * * These are bit quantities. To avoid overflows, do the comparison in * terms of BITMAP_SCANLINE_PAD units. This assumes BITMAP_SCANLINE_PAD * is a power of 2. We currently use 32, which limits us to a video * memory size of 8GB. */ lineWidth = (lineWidth + (BITMAP_SCANLINE_PAD - 1)) / BITMAP_SCANLINE_PAD; lastWidth = (lastWidth + (BITMAP_SCANLINE_PAD - 1)) / BITMAP_SCANLINE_PAD; if ((lineWidth * (y - 1) + lastWidth) > (scrp->videoRam * ((1024 * 8) / BITMAP_SCANLINE_PAD))) return FALSE; return TRUE; } /* * xf86InitialCheckModeForDriver * * This function checks if a mode satisfies a driver's initial requirements: * - mode size fits within the available pixel area (memory) * - width lies within the range of supported line pitches * - mode size fits within virtual size (if fixed) * - horizontal timings are in range * * This function takes the following parameters: * scrp ScrnInfoPtr * mode mode to check * maxPitch (optional) maximum line pitch * virtualX (optional) virtual width requested * virtualY (optional) virtual height requested * * In addition, the following fields from the ScrnInfoRec are used: * monitor pointer to structure for monitor section * fbFormat pixel format for the framebuffer * videoRam video memory size (in kB) */ static ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, ClockRangePtr clockRanges, LookupModeFlags strategy, int maxPitch, int virtualX, int virtualY) { ClockRangePtr cp; ModeStatus status; Bool allowDiv2 = (strategy & LOOKUP_CLKDIV2) != 0; int i, needDiv2; /* Sanity checks */ if (!scrp || !mode || !clockRanges) { ErrorF("xf86InitialCheckModeForDriver: " "called with invalid parameters\n"); return MODE_ERROR; } DebugF("xf86InitialCheckModeForDriver(%p, %p %s, %p, 0x%x, %d, %d, %d)\n", scrp, mode, mode->name, clockRanges, strategy, maxPitch, virtualX, virtualY); /* Some basic mode validity checks */ if (0 >= mode->HDisplay || mode->HDisplay > mode->HSyncStart || mode->HSyncStart >= mode->HSyncEnd || mode->HSyncEnd >= mode->HTotal) return MODE_H_ILLEGAL; if (0 >= mode->VDisplay || mode->VDisplay > mode->VSyncStart || mode->VSyncStart >= mode->VSyncEnd || mode->VSyncEnd >= mode->VTotal) return MODE_V_ILLEGAL; if (!xf86CheckModeSize(scrp, mode->HDisplay, mode->HDisplay, mode->VDisplay)) return MODE_MEM; if (maxPitch > 0 && mode->HDisplay > maxPitch) return MODE_BAD_WIDTH; if (virtualX > 0 && mode->HDisplay > virtualX) return MODE_VIRTUAL_X; if (virtualY > 0 && mode->VDisplay > virtualY) return MODE_VIRTUAL_Y; /* * The use of the DisplayModeRec's Crtc* and SynthClock elements below is * provisional, in that they are later reused by the driver at mode-set * time. Here, they are temporarily enlisted to contain the mode timings * as seen by the CRT or panel (rather than the CRTC). The driver's * ValidMode() is allowed to modify these so it can deal with such things * as mode stretching and/or centering. The driver should >NOT< modify the * user-supplied values as these are reported back when mode validation is * said and done. */ /* * NOTE: We (ab)use the mode->Crtc* values here to store timing * information for the calculation of Hsync and Vrefresh. Before * these values are calculated the driver is given the opportunity * to either set these HSync and VRefresh itself or modify the timing * values. * The difference to the final calculation is small but imortand: * here we pass the flag INTERLACE_HALVE_V regardless if the driver * sets it or not. This way our calculation of VRefresh has the same * effect as if we do if (flags & V_INTERLACE) refresh *= 2.0 * This dual use of the mode->Crtc* values will certainly create * confusion and is bad software design. However since it's part of * the driver API it's hard to change. */ if (scrp->ValidMode) { xf86SetModeCrtc(mode, INTERLACE_HALVE_V); cp = xf86FindClockRangeForMode(clockRanges, mode); if (!cp) return MODE_CLOCK_RANGE; if (cp->ClockMulFactor < 1) cp->ClockMulFactor = 1; if (cp->ClockDivFactor < 1) cp->ClockDivFactor = 1; /* * XXX The effect of clock dividers and multipliers on the monitor's * pixel clock needs to be verified. */ if (scrp->progClock) { mode->SynthClock = mode->Clock; } else { i = xf86GetNearestClock(scrp, mode->Clock, allowDiv2, cp->ClockDivFactor, cp->ClockMulFactor, &needDiv2); mode->SynthClock = (scrp->clock[i] * cp->ClockDivFactor) / cp->ClockMulFactor; if (needDiv2 & V_CLKDIV2) mode->SynthClock /= 2; } status = (*scrp->ValidMode) (scrp, mode, FALSE, MODECHECK_INITIAL); if (status != MODE_OK) return status; if (mode->HSync <= 0.0) mode->HSync = (float) mode->SynthClock / (float) mode->CrtcHTotal; if (mode->VRefresh <= 0.0) mode->VRefresh = (mode->SynthClock * 1000.0) / (mode->CrtcHTotal * mode->CrtcVTotal); } mode->HSync = xf86ModeHSync(mode); mode->VRefresh = xf86ModeVRefresh(mode); /* Assume it is OK */ return MODE_OK; } /* * xf86CheckModeForDriver * * This function is for checking modes while the server is running (for * use mainly by the VidMode extension). * * This function checks if a mode satisfies a driver's requirements: * - width lies within the line pitch * - mode size fits within virtual size * - horizontal/vertical timings are in range * * This function takes the following parameters: * scrp ScrnInfoPtr * mode mode to check * flags not (currently) used * * In addition, the following fields from the ScrnInfoRec are used: * virtualX virtual width * virtualY virtual height * clockRanges allowable clock ranges */ ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags) { ClockRangePtr cp; int i, k, gap, minimumGap = CLOCK_TOLERANCE + 1; int extraFlags = 0; int clockIndex = -1; int MulFactor = 1; int DivFactor = 1; int ModePrivFlags = 0; ModeStatus status = MODE_NOMODE; /* Some sanity checking */ if (scrp == NULL || (!scrp->progClock && scrp->numClocks == 0)) { ErrorF("xf86CheckModeForDriver: called with invalid scrnInfoRec\n"); return MODE_ERROR; } if (mode == NULL) { ErrorF("xf86CheckModeForDriver: called with invalid modep\n"); return MODE_ERROR; } /* Check the mode size */ if (mode->HDisplay > scrp->virtualX) return MODE_VIRTUAL_X; if (mode->VDisplay > scrp->virtualY) return MODE_VIRTUAL_Y; for (cp = scrp->clockRanges; cp != NULL; cp = cp->next) { /* DivFactor and MulFactor must be > 0 */ cp->ClockDivFactor = max(1, cp->ClockDivFactor); cp->ClockMulFactor = max(1, cp->ClockMulFactor); } if (scrp->progClock) { /* Check clock is in range */ for (cp = scrp->clockRanges; cp != NULL; cp = cp->next) { if (modeInClockRange(cp, mode)) break; } if (cp == NULL) { return MODE_CLOCK_RANGE; } /* * If programmable clock the required mode has been found */ DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; } else { status = MODE_CLOCK_RANGE; /* Check clock is in range */ for (cp = scrp->clockRanges; cp != NULL; cp = cp->next) { if (modeInClockRange(cp, mode)) { /* * Clock is in range, so if it is not a programmable clock, * find a matching clock. */ i = xf86GetNearestClock(scrp, mode->Clock, 0, cp->ClockDivFactor, cp->ClockMulFactor, &k); /* * If the clock is too far from the requested clock, this * mode is no good. */ if (k & V_CLKDIV2) gap = abs((mode->Clock * 2) - ((scrp->clock[i] * cp->ClockDivFactor) / cp->ClockMulFactor)); else gap = abs(mode->Clock - ((scrp->clock[i] * cp->ClockDivFactor) / cp->ClockMulFactor)); if (gap > minimumGap) { status = MODE_NOCLOCK; continue; } DivFactor = cp->ClockDivFactor; MulFactor = cp->ClockMulFactor; ModePrivFlags = cp->PrivFlags; extraFlags = k; clockIndex = i; break; } } if (cp == NULL) return status; } /* Fill in the mode parameters */ if (scrp->progClock) { mode->ClockIndex = -1; mode->SynthClock = (mode->Clock * MulFactor) / DivFactor; } else { mode->Clock = (scrp->clock[clockIndex] * DivFactor) / MulFactor; mode->ClockIndex = clockIndex; mode->SynthClock = scrp->clock[clockIndex]; if (extraFlags & V_CLKDIV2) { mode->Clock /= 2; mode->SynthClock /= 2; } } mode->PrivFlags = ModePrivFlags; return MODE_OK; } static int inferVirtualSize(ScrnInfoPtr scrp, DisplayModePtr modes, int *vx, int *vy) { float aspect = 0.0; MonPtr mon = scrp->monitor; xf86MonPtr DDC; int x = 0, y = 0; DisplayModePtr mode; if (!mon) return 0; DDC = mon->DDC; if (DDC && DDC->ver.revision >= 4) { /* For 1.4, we might actually get native pixel format. How novel. */ if (PREFERRED_TIMING_MODE(DDC->features.msc)) { for (mode = modes; mode; mode = mode->next) { if (mode->type & (M_T_DRIVER | M_T_PREFERRED)) { x = mode->HDisplay; y = mode->VDisplay; goto found; } } } /* * Even if we don't, we might get aspect ratio from extra CVT info * or from the monitor size fields. TODO. */ } /* * Technically this triggers if either is zero. That wasn't legal * before EDID 1.4, but right now we'll get that wrong. TODO. */ if (!aspect) { if (!mon->widthmm || !mon->heightmm) aspect = 4.0 / 3.0; else aspect = (float) mon->widthmm / (float) mon->heightmm; } /* find the largest M_T_DRIVER mode with that aspect ratio */ for (mode = modes; mode; mode = mode->next) { float mode_aspect, metaspect; if (!(mode->type & (M_T_DRIVER | M_T_USERDEF))) continue; mode_aspect = (float) mode->HDisplay / (float) mode->VDisplay; metaspect = aspect / mode_aspect; /* 5% slop or so, since we only get size in centimeters */ if (fabs(1.0 - metaspect) < 0.05) { if ((mode->HDisplay > x) && (mode->VDisplay > y)) { x = mode->HDisplay; y = mode->VDisplay; } } } if (!x || !y) { xf86DrvMsg(scrp->scrnIndex, X_WARNING, "Unable to estimate virtual size\n"); return 0; } found: *vx = x; *vy = y; xf86DrvMsg(scrp->scrnIndex, X_INFO, "Estimated virtual size for aspect ratio %.4f is %dx%d\n", aspect, *vx, *vy); return 1; } /* Least common multiple */ static unsigned int LCM(unsigned int x, unsigned int y) { unsigned int m = x, n = y, o; while ((o = m % n)) { m = n; n = o; } return (x / n) * y; } /* * Given various screen attributes, determine the minimum scanline width such * that each scanline is server and DDX padded and any pixels with embedded * bank boundaries are off-screen. This function returns -1 if such a width * cannot exist. */ static int scanLineWidth(unsigned int xsize, /* pixels */ unsigned int ysize, /* pixels */ unsigned int width, /* pixels */ unsigned long BankSize, /* char's */ PixmapFormatRec * pBankFormat, unsigned int nWidthUnit /* bits */ ) { unsigned long nBitsPerBank, nBitsPerScanline, nBitsPerScanlinePadUnit; unsigned long minBitsPerScanline, maxBitsPerScanline; /* Sanity checks */ if (!nWidthUnit || !pBankFormat) return -1; nBitsPerBank = BankSize * 8; if (nBitsPerBank % pBankFormat->scanlinePad) return -1; if (xsize > width) width = xsize; nBitsPerScanlinePadUnit = LCM(pBankFormat->scanlinePad, nWidthUnit); nBitsPerScanline = (((width * pBankFormat->bitsPerPixel) + nBitsPerScanlinePadUnit - 1) / nBitsPerScanlinePadUnit) * nBitsPerScanlinePadUnit; width = nBitsPerScanline / pBankFormat->bitsPerPixel; if (!xsize || !(nBitsPerBank % pBankFormat->bitsPerPixel)) return (int) width; /* * Scanlines will be server-pad aligned at this point. They will also be * a multiple of nWidthUnit bits long. Ensure that pixels with embedded * bank boundaries are off-screen. * * It seems reasonable to limit total frame buffer size to 1/16 of the * theoretical maximum address space size. On a machine with 32-bit * addresses (to 8-bit quantities) this turns out to be 256MB. Not only * does this provide a simple limiting condition for the loops below, but * it also prevents unsigned long wraparounds. */ if (!ysize) return -1; minBitsPerScanline = xsize * pBankFormat->bitsPerPixel; if (minBitsPerScanline > nBitsPerBank) return -1; if (ysize == 1) return (int) width; maxBitsPerScanline = (((unsigned long) (-1) >> 1) - minBitsPerScanline) / (ysize - 1); while (nBitsPerScanline <= maxBitsPerScanline) { unsigned long BankBase, BankUnit; BankUnit = ((nBitsPerBank + nBitsPerScanline - 1) / nBitsPerBank) * nBitsPerBank; if (!(BankUnit % nBitsPerScanline)) return (int) width; for (BankBase = BankUnit;; BankBase += nBitsPerBank) { unsigned long x, y; y = BankBase / nBitsPerScanline; if (y >= ysize) return (int) width; x = BankBase % nBitsPerScanline; if (!(x % pBankFormat->bitsPerPixel)) continue; if (x < minBitsPerScanline) { /* * Skip ahead certain widths by dividing the excess scanline * amongst the y's. */ y *= nBitsPerScanlinePadUnit; nBitsPerScanline += ((x + y - 1) / y) * nBitsPerScanlinePadUnit; width = nBitsPerScanline / pBankFormat->bitsPerPixel; break; } if (BankBase != BankUnit) continue; if (!(nBitsPerScanline % x)) return (int) width; BankBase = ((nBitsPerScanline - minBitsPerScanline) / (nBitsPerScanline - x)) * BankUnit; } } return -1; } /* * xf86ValidateModes * * This function takes a set of mode names, modes and limiting conditions, * and selects a set of modes and parameters based on those conditions. * * This function takes the following parameters: * scrp ScrnInfoPtr * availModes the list of modes available for the monitor * modeNames (optional) list of mode names that the screen is requesting * clockRanges a list of clock ranges * linePitches (optional) a list of line pitches * minPitch (optional) minimum line pitch (in pixels) * maxPitch (optional) maximum line pitch (in pixels) * pitchInc (mandatory) pitch increment (in bits) * minHeight (optional) minimum virtual height (in pixels) * maxHeight (optional) maximum virtual height (in pixels) * virtualX (optional) virtual width requested (in pixels) * virtualY (optional) virtual height requested (in pixels) * apertureSize size of video aperture (in bytes) * strategy how to decide which mode to use from multiple modes with * the same name * * In addition, the following fields from the ScrnInfoRec are used: * clocks a list of discrete clocks * numClocks number of discrete clocks * progClock clock is programmable * monitor pointer to structure for monitor section * fbFormat format of the framebuffer * videoRam video memory size * xInc horizontal timing increment (defaults to 8 pixels) * * The function fills in the following ScrnInfoRec fields: * modePool A subset of the modes available to the monitor which * are compatible with the driver. * modes one mode entry for each of the requested modes, with the * status field filled in to indicate if the mode has been * accepted or not. * virtualX the resulting virtual width * virtualY the resulting virtual height * displayWidth the resulting line pitch * * The function's return value is the number of matching modes found, or -1 * if an unrecoverable error was encountered. */ int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy) { DisplayModePtr p, q, r, new, last, *endp; int i, numModes = 0; ModeStatus status; int linePitch = -1, virtX = 0, virtY = 0; int newLinePitch, newVirtX, newVirtY; int modeSize; /* in pixels */ Bool validateAllDefaultModes = FALSE; Bool userModes = FALSE; int saveType; PixmapFormatRec *BankFormat; ClockRangePtr cp; int numTimings = 0; range hsync[MAX_HSYNC]; range vrefresh[MAX_VREFRESH]; Bool inferred_virtual = FALSE; DebugF ("xf86ValidateModes(%p, %p, %p, %p,\n\t\t %p, %d, %d, %d, %d, %d, %d, %d, %d, 0x%x)\n", scrp, availModes, modeNames, clockRanges, linePitches, minPitch, maxPitch, pitchInc, minHeight, maxHeight, virtualX, virtualY, apertureSize, strategy); /* Some sanity checking */ if (scrp == NULL || scrp->name == NULL || !scrp->monitor || (!scrp->progClock && scrp->numClocks == 0)) { ErrorF("xf86ValidateModes: called with invalid scrnInfoRec\n"); return -1; } if (linePitches != NULL && linePitches[0] <= 0) { ErrorF("xf86ValidateModes: called with invalid linePitches\n"); return -1; } if (pitchInc <= 0) { ErrorF("xf86ValidateModes: called with invalid pitchInc\n"); return -1; } if ((virtualX > 0) != (virtualY > 0)) { ErrorF("xf86ValidateModes: called with invalid virtual resolution\n"); return -1; } /* * If requested by the driver, allow missing hsync and/or vrefresh ranges * in the monitor section. */ if (strategy & LOOKUP_OPTIONAL_TOLERANCES) { strategy &= ~LOOKUP_OPTIONAL_TOLERANCES; } else { const char *type = ""; Bool specified = FALSE; if (scrp->monitor->nHsync <= 0) { if (numTimings > 0) { scrp->monitor->nHsync = numTimings; for (i = 0; i < numTimings; i++) { scrp->monitor->hsync[i].lo = hsync[i].lo; scrp->monitor->hsync[i].hi = hsync[i].hi; } } else { scrp->monitor->hsync[0].lo = 31.5; scrp->monitor->hsync[0].hi = 48.0; scrp->monitor->nHsync = 1; } type = "default "; } else { specified = TRUE; } for (i = 0; i < scrp->monitor->nHsync; i++) { if (scrp->monitor->hsync[i].lo == scrp->monitor->hsync[i].hi) xf86DrvMsg(scrp->scrnIndex, X_INFO, "%s: Using %shsync value of %.2f kHz\n", scrp->monitor->id, type, scrp->monitor->hsync[i].lo); else xf86DrvMsg(scrp->scrnIndex, X_INFO, "%s: Using %shsync range of %.2f-%.2f kHz\n", scrp->monitor->id, type, scrp->monitor->hsync[i].lo, scrp->monitor->hsync[i].hi); } type = ""; if (scrp->monitor->nVrefresh <= 0) { if (numTimings > 0) { scrp->monitor->nVrefresh = numTimings; for (i = 0; i < numTimings; i++) { scrp->monitor->vrefresh[i].lo = vrefresh[i].lo; scrp->monitor->vrefresh[i].hi = vrefresh[i].hi; } } else { scrp->monitor->vrefresh[0].lo = 50; scrp->monitor->vrefresh[0].hi = 70; scrp->monitor->nVrefresh = 1; } type = "default "; } else { specified = TRUE; } for (i = 0; i < scrp->monitor->nVrefresh; i++) { if (scrp->monitor->vrefresh[i].lo == scrp->monitor->vrefresh[i].hi) xf86DrvMsg(scrp->scrnIndex, X_INFO, "%s: Using %svrefresh value of %.2f Hz\n", scrp->monitor->id, type, scrp->monitor->vrefresh[i].lo); else xf86DrvMsg(scrp->scrnIndex, X_INFO, "%s: Using %svrefresh range of %.2f-%.2f Hz\n", scrp->monitor->id, type, scrp->monitor->vrefresh[i].lo, scrp->monitor->vrefresh[i].hi); } type = ""; if (!scrp->monitor->maxPixClock && !specified) { type = "default "; scrp->monitor->maxPixClock = 65000.0; } if (scrp->monitor->maxPixClock) { xf86DrvMsg(scrp->scrnIndex, X_INFO, "%s: Using %smaximum pixel clock of %.2f MHz\n", scrp->monitor->id, type, (float) scrp->monitor->maxPixClock / 1000.0); } } /* * Store the clockRanges for later use by the VidMode extension. */ nt_list_for_each_entry(cp, clockRanges, next) { ClockRangePtr newCR = xnfalloc(sizeof(ClockRange)); memcpy(newCR, cp, sizeof(ClockRange)); newCR->next = NULL; if (scrp->clockRanges == NULL) scrp->clockRanges = newCR; else nt_list_append(newCR, scrp->clockRanges, ClockRange, next); } /* Determine which pixmap format to pass to scanLineWidth() */ if (scrp->depth > 4) BankFormat = &scrp->fbFormat; else BankFormat = xf86GetPixFormat(scrp, 1); /* >not< scrp->depth! */ if (scrp->xInc <= 0) scrp->xInc = 8; /* Suitable for VGA and others */ #define _VIRTUALX(x) ((((x) + scrp->xInc - 1) / scrp->xInc) * scrp->xInc) /* * Determine maxPitch if it wasn't given explicitly. Note linePitches * always takes precedence if is non-NULL. In that case the minPitch and * maxPitch values passed are ignored. */ if (linePitches) { minPitch = maxPitch = linePitches[0]; for (i = 1; linePitches[i] > 0; i++) { if (linePitches[i] > maxPitch) maxPitch = linePitches[i]; if (linePitches[i] < minPitch) minPitch = linePitches[i]; } } /* * Initialise virtX and virtY if the values are fixed. */ if (virtualY > 0) { if (maxHeight > 0 && virtualY > maxHeight) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Virtual height (%d) is too large for the hardware " "(max %d)\n", virtualY, maxHeight); return -1; } if (minHeight > 0 && virtualY < minHeight) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Virtual height (%d) is too small for the hardware " "(min %d)\n", virtualY, minHeight); return -1; } virtualX = _VIRTUALX(virtualX); if (linePitches != NULL) { for (i = 0; linePitches[i] != 0; i++) { if ((linePitches[i] >= virtualX) && (linePitches[i] == scanLineWidth(virtualX, virtualY, linePitches[i], apertureSize, BankFormat, pitchInc))) { linePitch = linePitches[i]; break; } } } else { linePitch = scanLineWidth(virtualX, virtualY, minPitch, apertureSize, BankFormat, pitchInc); } if ((linePitch < minPitch) || (linePitch > maxPitch)) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Virtual width (%d) is too large for the hardware " "(max %d)\n", virtualX, maxPitch); return -1; } if (!xf86CheckModeSize(scrp, linePitch, virtualX, virtualY)) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Virtual size (%dx%d) (pitch %d) exceeds video memory\n", virtualX, virtualY, linePitch); return -1; } virtX = virtualX; virtY = virtualY; } else if (!modeNames || !*modeNames) { /* No virtual size given in the config, try to infer */ /* XXX this doesn't take m{in,ax}Pitch into account; oh well */ inferred_virtual = inferVirtualSize(scrp, availModes, &virtX, &virtY); if (inferred_virtual) linePitch = scanLineWidth(virtX, virtY, minPitch, apertureSize, BankFormat, pitchInc); } /* Print clock ranges and scaled clocks */ xf86ShowClockRanges(scrp, clockRanges); /* * If scrp->modePool hasn't been setup yet, set it up now. This allows the * modes that the driver definitely can't use to be weeded out early. Note * that a modePool mode's prev field is used to hold a pointer to the * member of the scrp->modes list for which a match was considered. */ if (scrp->modePool == NULL) { q = NULL; for (p = availModes; p != NULL; p = p->next) { status = xf86InitialCheckModeForDriver(scrp, p, clockRanges, strategy, maxPitch, virtX, virtY); if (status == MODE_OK) { status = xf86CheckModeForMonitor(p, scrp->monitor); } if (status == MODE_OK) { new = xnfalloc(sizeof(DisplayModeRec)); *new = *p; new->next = NULL; if (!q) { scrp->modePool = new; } else { q->next = new; } new->prev = NULL; q = new; q->name = xnfstrdup(p->name); q->status = MODE_OK; } else { printModeRejectMessage(scrp->scrnIndex, p, status); } } if (scrp->modePool == NULL) { xf86DrvMsg(scrp->scrnIndex, X_WARNING, "Mode pool is empty\n"); return 0; } } else { for (p = scrp->modePool; p != NULL; p = p->next) { p->prev = NULL; p->status = MODE_OK; } } /* * Allocate one entry in scrp->modes for each named mode. */ while (scrp->modes) xf86DeleteMode(&scrp->modes, scrp->modes); endp = &scrp->modes; last = NULL; if (modeNames != NULL) { for (i = 0; modeNames[i] != NULL; i++) { userModes = TRUE; new = xnfcalloc(1, sizeof(DisplayModeRec)); new->prev = last; new->type = M_T_USERDEF; new->name = xnfstrdup(modeNames[i]); if (new->prev) new->prev->next = new; *endp = last = new; endp = &new->next; } } /* Lookup each mode */ #ifdef PANORAMIX if (noPanoramiXExtension) validateAllDefaultModes = TRUE; #endif for (p = scrp->modes;; p = p->next) { Bool repeat; /* * If the supplied mode names don't produce a valid mode, scan through * unconsidered modePool members until one survives validation. This * is done in decreasing order by mode pixel area. */ if (p == NULL) { if ((numModes > 0) && !validateAllDefaultModes) break; validateAllDefaultModes = TRUE; r = NULL; modeSize = 0; for (q = scrp->modePool; q != NULL; q = q->next) { if ((q->prev == NULL) && (q->status == MODE_OK)) { /* * Deal with the case where this mode wasn't considered * because of a builtin mode of the same name. */ for (p = scrp->modes; p != NULL; p = p->next) { if ((p->status != MODE_OK) && !strcmp(p->name, q->name)) break; } if (p != NULL) q->prev = p; else { /* * A quick check to not allow default modes with * horizontal timing parameters that CRTs may have * problems with. */ if (!scrp->monitor->reducedblanking && (q->type & M_T_DEFAULT) && ((double) q->HTotal / (double) q->HDisplay) < 1.15) continue; if (modeSize < (q->HDisplay * q->VDisplay)) { r = q; modeSize = q->HDisplay * q->VDisplay; } } } } if (r == NULL) break; p = xnfcalloc(1, sizeof(DisplayModeRec)); p->prev = last; p->name = xnfstrdup(r->name); if (!userModes) p->type = M_T_USERDEF; if (p->prev) p->prev->next = p; *endp = last = p; endp = &p->next; } repeat = FALSE; lookupNext: if (repeat && ((status = p->status) != MODE_OK)) printModeRejectMessage(scrp->scrnIndex, p, status); saveType = p->type; status = xf86LookupMode(scrp, p, clockRanges, strategy); if (repeat && status == MODE_NOMODE) continue; if (status != MODE_OK) printModeRejectMessage(scrp->scrnIndex, p, status); if (status == MODE_ERROR) { ErrorF("xf86ValidateModes: " "unexpected result from xf86LookupMode()\n"); return -1; } if (status != MODE_OK) { if (p->status == MODE_OK) p->status = status; continue; } p->type |= saveType; repeat = TRUE; newLinePitch = linePitch; newVirtX = virtX; newVirtY = virtY; /* * Don't let non-user defined modes increase the virtual size */ if (!(p->type & M_T_USERDEF) && (numModes > 0)) { if (p->HDisplay > virtX) { p->status = MODE_VIRTUAL_X; goto lookupNext; } if (p->VDisplay > virtY) { p->status = MODE_VIRTUAL_Y; goto lookupNext; } } /* * Adjust virtual width and height if the mode is too large for the * current values and if they are not fixed. */ if (virtualX <= 0 && p->HDisplay > newVirtX) newVirtX = _VIRTUALX(p->HDisplay); if (virtualY <= 0 && p->VDisplay > newVirtY) { if (maxHeight > 0 && p->VDisplay > maxHeight) { p->status = MODE_VIRTUAL_Y; /* ? */ goto lookupNext; } newVirtY = p->VDisplay; } /* * If virtual resolution is to be increased, revalidate it. */ if ((virtX != newVirtX) || (virtY != newVirtY)) { if (linePitches != NULL) { newLinePitch = -1; for (i = 0; linePitches[i] != 0; i++) { if ((linePitches[i] >= newVirtX) && (linePitches[i] >= linePitch) && (linePitches[i] == scanLineWidth(newVirtX, newVirtY, linePitches[i], apertureSize, BankFormat, pitchInc))) { newLinePitch = linePitches[i]; break; } } } else { if (linePitch < minPitch) linePitch = minPitch; newLinePitch = scanLineWidth(newVirtX, newVirtY, linePitch, apertureSize, BankFormat, pitchInc); } if ((newLinePitch < minPitch) || (newLinePitch > maxPitch)) { p->status = MODE_BAD_WIDTH; goto lookupNext; } /* * Check that the pixel area required by the new virtual height * and line pitch isn't too large. */ if (!xf86CheckModeSize(scrp, newLinePitch, newVirtX, newVirtY)) { p->status = MODE_MEM_VIRT; goto lookupNext; } } if (scrp->ValidMode) { /* * Give the driver a final say, passing it the proposed virtual * geometry. */ scrp->virtualX = newVirtX; scrp->virtualY = newVirtY; scrp->displayWidth = newLinePitch; p->status = (scrp->ValidMode) (scrp, p, FALSE, MODECHECK_FINAL); if (p->status != MODE_OK) { goto lookupNext; } } /* Mode has passed all the tests */ virtX = newVirtX; virtY = newVirtY; linePitch = newLinePitch; p->status = MODE_OK; numModes++; } /* * If we estimated the virtual size above, we may have filtered away all * the modes that maximally match that size; scan again to find out and * fix up if so. */ if (inferred_virtual) { int vx = 0, vy = 0; for (p = scrp->modes; p; p = p->next) { if (p->HDisplay > vx && p->VDisplay > vy) { vx = p->HDisplay; vy = p->VDisplay; } } if (vx < virtX || vy < virtY) { const int types[] = { M_T_BUILTIN | M_T_PREFERRED, M_T_BUILTIN, M_T_DRIVER | M_T_PREFERRED, M_T_DRIVER, 0 }; const int ntypes = ARRAY_SIZE(types); int n; /* * We did not find the estimated virtual size. So now we want to * find the largest mode available, but we want to search in the * modes in the order of "types" listed above. */ for (n = 0; n < ntypes; n++) { int type = types[n]; vx = 0; vy = 0; for (p = scrp->modes; p; p = p->next) { /* scan through the modes in the sort order above */ if ((p->type & type) != type) continue; if (p->HDisplay > vx && p->VDisplay > vy) { vx = p->HDisplay; vy = p->VDisplay; } } if (vx && vy) /* Found one */ break; } xf86DrvMsg(scrp->scrnIndex, X_WARNING, "Shrinking virtual size estimate from %dx%d to %dx%d\n", virtX, virtY, vx, vy); virtX = _VIRTUALX(vx); virtY = vy; for (p = scrp->modes; p; p = p->next) { if (numModes > 0) { if (p->HDisplay > virtX) p->status = MODE_VIRTUAL_X; if (p->VDisplay > virtY) p->status = MODE_VIRTUAL_Y; if (p->status != MODE_OK) { numModes--; printModeRejectMessage(scrp->scrnIndex, p, p->status); } } } if (linePitches != NULL) { for (i = 0; linePitches[i] != 0; i++) { if ((linePitches[i] >= virtX) && (linePitches[i] == scanLineWidth(virtX, virtY, linePitches[i], apertureSize, BankFormat, pitchInc))) { linePitch = linePitches[i]; break; } } } else { linePitch = scanLineWidth(virtX, virtY, minPitch, apertureSize, BankFormat, pitchInc); } } } /* Update the ScrnInfoRec parameters */ scrp->virtualX = virtX; scrp->virtualY = virtY; scrp->displayWidth = linePitch; if (numModes <= 0) return 0; /* Make the mode list into a circular list by joining up the ends */ p = scrp->modes; while (p->next != NULL) p = p->next; /* p is now the last mode on the list */ p->next = scrp->modes; scrp->modes->prev = p; if (minHeight > 0 && virtY < minHeight) { xf86DrvMsg(scrp->scrnIndex, X_ERROR, "Virtual height (%d) is too small for the hardware " "(min %d)\n", virtY, minHeight); return -1; } return numModes; } /* * xf86DeleteMode * * This function removes a mode from a list of modes. * * There are different types of mode lists: * * - singly linked linear lists, ending in NULL * - doubly linked linear lists, starting and ending in NULL * - doubly linked circular lists * */ void xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode) { /* Catch the easy/insane cases */ if (modeList == NULL || *modeList == NULL || mode == NULL) return; /* If the mode is at the start of the list, move the start of the list */ if (*modeList == mode) *modeList = mode->next; /* If mode is the only one on the list, set the list to NULL */ if ((mode == mode->prev) && (mode == mode->next)) { *modeList = NULL; } else { if ((mode->prev != NULL) && (mode->prev->next == mode)) mode->prev->next = mode->next; if ((mode->next != NULL) && (mode->next->prev == mode)) mode->next->prev = mode->prev; } free((void *) mode->name); free(mode); } /* * xf86PruneDriverModes * * Remove modes from the driver's mode list which have been marked as * invalid. */ void xf86PruneDriverModes(ScrnInfoPtr scrp) { DisplayModePtr first, p, n; p = scrp->modes; if (p == NULL) return; do { if (!(first = scrp->modes)) return; n = p->next; if (p->status != MODE_OK) { xf86DeleteMode(&(scrp->modes), p); } p = n; } while (p != NULL && p != first); /* modePool is no longer needed, turf it */ while (scrp->modePool) { /* * A modePool mode's prev field is used to hold a pointer to the * member of the scrp->modes list for which a match was considered. * Clear that pointer first, otherwise xf86DeleteMode might get * confused */ scrp->modePool->prev = NULL; xf86DeleteMode(&scrp->modePool, scrp->modePool); } } /* * xf86SetCrtcForModes * * Goes through the screen's mode list, and initialises the Crtc * parameters for each mode. The initialisation includes adjustments * for interlaced and double scan modes. */ void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags) { DisplayModePtr p; /* * Store adjustFlags for use with the VidMode extension. There is an * implicit assumption here that SetCrtcForModes is called once. */ scrp->adjustFlags = adjustFlags; p = scrp->modes; if (p == NULL) return; do { xf86SetModeCrtc(p, adjustFlags); DebugF("%sMode %s: %d (%d) %d %d (%d) %d %d (%d) %d %d (%d) %d\n", (p->type & M_T_DEFAULT) ? "Default " : "", p->name, p->CrtcHDisplay, p->CrtcHBlankStart, p->CrtcHSyncStart, p->CrtcHSyncEnd, p->CrtcHBlankEnd, p->CrtcHTotal, p->CrtcVDisplay, p->CrtcVBlankStart, p->CrtcVSyncStart, p->CrtcVSyncEnd, p->CrtcVBlankEnd, p->CrtcVTotal); p = p->next; } while (p != NULL && p != scrp->modes); } void xf86PrintModes(ScrnInfoPtr scrp) { DisplayModePtr p; float hsync, refresh = 0; const char *desc, *desc2, *prefix, *uprefix; if (scrp == NULL) return; xf86DrvMsg(scrp->scrnIndex, X_INFO, "Virtual size is %dx%d (pitch %d)\n", scrp->virtualX, scrp->virtualY, scrp->displayWidth); p = scrp->modes; if (p == NULL) return; do { desc = desc2 = ""; hsync = xf86ModeHSync(p); refresh = xf86ModeVRefresh(p); if (p->Flags & V_INTERLACE) { desc = " (I)"; } if (p->Flags & V_DBLSCAN) { desc = " (D)"; } if (p->VScan > 1) { desc2 = " (VScan)"; } if (p->type & M_T_BUILTIN) prefix = "Built-in mode"; else if (p->type & M_T_DEFAULT) prefix = "Default mode"; else if (p->type & M_T_DRIVER) prefix = "Driver mode"; else prefix = "Mode"; if (p->type & M_T_USERDEF) uprefix = "*"; else uprefix = " "; if (hsync == 0 || refresh == 0) { if (p->name) xf86DrvMsg(scrp->scrnIndex, X_CONFIG, "%s%s \"%s\"\n", uprefix, prefix, p->name); else xf86DrvMsg(scrp->scrnIndex, X_PROBED, "%s%s %dx%d (unnamed)\n", uprefix, prefix, p->HDisplay, p->VDisplay); } else if (p->Clock == p->SynthClock) { xf86DrvMsg(scrp->scrnIndex, X_CONFIG, "%s%s \"%s\": %.1f MHz, %.1f kHz, %.1f Hz%s%s\n", uprefix, prefix, p->name, p->Clock / 1000.0, hsync, refresh, desc, desc2); } else { xf86DrvMsg(scrp->scrnIndex, X_CONFIG, "%s%s \"%s\": %.1f MHz (scaled from %.1f MHz), " "%.1f kHz, %.1f Hz%s%s\n", uprefix, prefix, p->name, p->Clock / 1000.0, p->SynthClock / 1000.0, hsync, refresh, desc, desc2); } if (hsync != 0 && refresh != 0) xf86PrintModeline(scrp->scrnIndex, p); p = p->next; } while (p != NULL && p != scrp->modes); } xorg-server-21.1.16/hw/xfree86/common/xorgHelper.c0000644000175000017500000000055514757411105015320 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "servermd.h" #include "pixmapstr.h" #include "windowstr.h" #include "propertyst.h" #include "gcstruct.h" #include "loaderProcs.h" #include "xf86.h" #include "xf86Priv.h" #include "xorgVersion.h" CARD32 xorgGetVersion(void) { return XORG_VERSION_CURRENT; } xorg-server-21.1.16/hw/xfree86/common/xf86Extensions.h0000644000175000017500000000353514757411105016062 /* * Copyright © 2011 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifndef XF86EXTENSIONS_H #define XF86EXTENSIONS_H #include "extnsionst.h" #ifdef XF86DRI extern _X_EXPORT Bool noXFree86DRIExtension; extern void XFree86DRIExtensionInit(void); #endif #ifdef DRI2 #include extern _X_EXPORT Bool noDRI2Extension; extern void DRI2ExtensionInit(void); #endif #ifdef XF86VIDMODE #include extern _X_EXPORT Bool noXFree86VidModeExtension; extern void XFree86VidModeExtensionInit(void); #endif #ifdef XFreeXDGA #include extern _X_EXPORT Bool noXFree86DGAExtension; extern void XFree86DGAExtensionInit(void); extern void XFree86DGARegister(void); #endif #endif xorg-server-21.1.16/hw/xfree86/common/xf86Extensions.c0000644000175000017500000000731614757411105016056 /* * Copyright © 2011 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "extension.h" #include "extinit.h" #include "globals.h" #include "xf86.h" #include "xf86Config.h" #include "xf86Module.h" #include "xf86Extensions.h" #include "xf86Opt.h" #include "optionstr.h" #ifdef XSELINUX #include "xselinux.h" #endif #ifdef XFreeXDGA #include #endif #ifdef XF86VIDMODE #include #include "vidmodestr.h" #endif /* * DDX-specific extensions. */ static const ExtensionModule extensionModules[] = { #ifdef XF86VIDMODE { XFree86VidModeExtensionInit, XF86VIDMODENAME, &noXFree86VidModeExtension }, #endif #ifdef XFreeXDGA { XFree86DGAExtensionInit, XF86DGANAME, &noXFree86DGAExtension }, #endif #ifdef XF86DRI { XFree86DRIExtensionInit, "XFree86-DRI", &noXFree86DRIExtension }, #endif #ifdef DRI2 { DRI2ExtensionInit, DRI2_NAME, &noDRI2Extension } #endif }; static void load_extension_config(void) { XF86ConfModulePtr mod_con = xf86configptr->conf_modules; XF86LoadPtr modp; /* Only the best. */ if (!mod_con) return; nt_list_for_each_entry(modp, mod_con->mod_load_lst, list.next) { InputOption *opt; if (strcasecmp(modp->load_name, "extmod") != 0) continue; /* extmod options are of the form "omit " */ nt_list_for_each_entry(opt, modp->load_opt, list.next) { const char *key = input_option_get_key(opt); if (strncasecmp(key, "omit", 4) != 0 || strlen(key) < 5) continue; if (EnableDisableExtension(key + 4, FALSE)) xf86MarkOptionUsed(opt); } #ifdef XSELINUX if ((opt = xf86FindOption(modp->load_opt, "SELinux mode disabled"))) { xf86MarkOptionUsed(opt); selinuxEnforcingState = SELINUX_MODE_DISABLED; } if ((opt = xf86FindOption(modp->load_opt, "SELinux mode permissive"))) { xf86MarkOptionUsed(opt); selinuxEnforcingState = SELINUX_MODE_PERMISSIVE; } if ((opt = xf86FindOption(modp->load_opt, "SELinux mode enforcing"))) { xf86MarkOptionUsed(opt); selinuxEnforcingState = SELINUX_MODE_ENFORCING; } #endif } } void xf86ExtensionInit(void) { load_extension_config(); LoadExtensionList(extensionModules, ARRAY_SIZE(extensionModules), TRUE); } xorg-server-21.1.16/hw/xfree86/common/xf86xv.c0000644000175000017500000016610514757411105014356 /* * XFree86 Xv DDX written by Mark Vojkovich (markv@valinux.com) */ /* * Copyright (c) 1998-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include #include #include "scrnintstr.h" #include "regionstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "mivalidate.h" #include "validate.h" #include "resource.h" #include "gcstruct.h" #include "dixstruct.h" #include #include #include "xvdix.h" #include "xf86xvpriv.h" /* XvAdaptorRec fields */ static int xf86XVPutVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int xf86XVPutStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int xf86XVGetVideo(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int xf86XVGetStill(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); static int xf86XVStopVideo(XvPortPtr, DrawablePtr); static int xf86XVSetPortAttribute(XvPortPtr, Atom, INT32); static int xf86XVGetPortAttribute(XvPortPtr, Atom, INT32 *); static int xf86XVQueryBestSize(XvPortPtr, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); static int xf86XVPutImage(DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr, CARD16 *, CARD16 *, int *, int *); /* ScreenRec fields */ static Bool xf86XVDestroyWindow(WindowPtr pWin); static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1); static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind); static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy); static Bool xf86XVCloseScreen(ScreenPtr); #define PostValidateTreeUndefined ((PostValidateTreeProcPtr)-1) /* ScrnInfoRec functions */ static Bool xf86XVEnterVT(ScrnInfoPtr); static void xf86XVLeaveVT(ScrnInfoPtr); static void xf86XVAdjustFrame(ScrnInfoPtr, int x, int y); static void xf86XVModeSet(ScrnInfoPtr pScrn); /* misc */ static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr *, int); static DevPrivateKeyRec XF86XVWindowKeyRec; #define XF86XVWindowKey (&XF86XVWindowKeyRec) /* dixmain.c XvScreenPtr screen private */ DevPrivateKey XF86XvScreenKey; /** xf86xv.c XF86XVScreenPtr screen private */ static DevPrivateKeyRec XF86XVScreenPrivateKey; static unsigned long PortResource = 0; #define GET_XV_SCREEN(pScreen) \ ((XvScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XF86XvScreenKey)) #define GET_XF86XV_SCREEN(pScreen) \ ((XF86XVScreenPtr)(dixGetPrivate(&pScreen->devPrivates, &XF86XVScreenPrivateKey))) #define GET_XF86XV_WINDOW(pWin) \ ((XF86XVWindowPtr)dixLookupPrivate(&(pWin)->devPrivates, XF86XVWindowKey)) static xf86XVInitGenericAdaptorPtr *GenDrivers = NULL; static int NumGenDrivers = 0; int xf86XVRegisterGenericAdaptorDriver(xf86XVInitGenericAdaptorPtr InitFunc) { xf86XVInitGenericAdaptorPtr *newdrivers; newdrivers = reallocarray(GenDrivers, 1 + NumGenDrivers, sizeof(xf86XVInitGenericAdaptorPtr)); if (!newdrivers) return 0; GenDrivers = newdrivers; GenDrivers[NumGenDrivers++] = InitFunc; return 1; } int xf86XVListGenericAdaptors(ScrnInfoPtr pScrn, XF86VideoAdaptorPtr ** adaptors) { int i, j, n, num; XF86VideoAdaptorPtr *DrivAdap, *new; num = 0; *adaptors = NULL; /* * The v4l driver registers itself first, but can use surfaces registered * by other drivers. So, call the v4l driver last. */ for (i = NumGenDrivers; --i >= 0;) { DrivAdap = NULL; n = (*GenDrivers[i]) (pScrn, &DrivAdap); if (0 == n) continue; new = reallocarray(*adaptors, num + n, sizeof(XF86VideoAdaptorPtr)); if (NULL == new) continue; *adaptors = new; for (j = 0; j < n; j++, num++) (*adaptors)[num] = DrivAdap[j]; } return num; } /**************** Offscreen surface stuff *******************/ typedef struct { XF86OffscreenImagePtr images; int num; } OffscreenImageRec; static DevPrivateKeyRec OffscreenPrivateKeyRec; #define OffscreenPrivateKey (&OffscreenPrivateKeyRec) #define GetOffscreenImage(pScreen) ((OffscreenImageRec *) dixLookupPrivate(&(pScreen)->devPrivates, OffscreenPrivateKey)) Bool xf86XVRegisterOffscreenImages(ScreenPtr pScreen, XF86OffscreenImagePtr images, int num) { OffscreenImageRec *OffscreenImage; /* This function may be called before xf86XVScreenInit, so there's * no better place than this to call dixRegisterPrivateKey to ensure we * have space reserved. After the first call it is a no-op. */ if (!dixRegisterPrivateKey (OffscreenPrivateKey, PRIVATE_SCREEN, sizeof(OffscreenImageRec)) || !(OffscreenImage = GetOffscreenImage(pScreen))) /* Every X.org driver assumes this function always succeeds, so * just die on allocation failure. */ FatalError ("Could not allocate private storage for XV offscreen images.\n"); OffscreenImage->num = num; OffscreenImage->images = images; return TRUE; } XF86OffscreenImagePtr xf86XVQueryOffscreenImages(ScreenPtr pScreen, int *num) { OffscreenImageRec *OffscreenImage = GetOffscreenImage(pScreen); *num = OffscreenImage->num; return OffscreenImage->images; } XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { return calloc(1, sizeof(XF86VideoAdaptorRec)); } void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { free(ptr); } Bool xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) { ScrnInfoPtr pScrn; XF86XVScreenPtr ScreenPriv; if (num <= 0 || noXvExtension) return FALSE; if (Success != XvScreenInit(pScreen)) return FALSE; if (!dixRegisterPrivateKey(&XF86XVWindowKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey(&XF86XVScreenPrivateKey, PRIVATE_SCREEN, 0)) return FALSE; XF86XvScreenKey = XvGetScreenKey(); PortResource = XvGetRTPort(); ScreenPriv = malloc(sizeof(XF86XVScreenRec)); dixSetPrivate(&pScreen->devPrivates, &XF86XVScreenPrivateKey, ScreenPriv); if (!ScreenPriv) return FALSE; pScrn = xf86ScreenToScrn(pScreen); ScreenPriv->DestroyWindow = pScreen->DestroyWindow; ScreenPriv->WindowExposures = pScreen->WindowExposures; ScreenPriv->PostValidateTree = PostValidateTreeUndefined; ScreenPriv->ClipNotify = pScreen->ClipNotify; ScreenPriv->CloseScreen = pScreen->CloseScreen; ScreenPriv->EnterVT = pScrn->EnterVT; ScreenPriv->LeaveVT = pScrn->LeaveVT; ScreenPriv->AdjustFrame = pScrn->AdjustFrame; ScreenPriv->ModeSet = pScrn->ModeSet; pScreen->DestroyWindow = xf86XVDestroyWindow; pScreen->WindowExposures = xf86XVWindowExposures; pScreen->ClipNotify = xf86XVClipNotify; pScreen->CloseScreen = xf86XVCloseScreen; pScrn->EnterVT = xf86XVEnterVT; pScrn->LeaveVT = xf86XVLeaveVT; if (pScrn->AdjustFrame) pScrn->AdjustFrame = xf86XVAdjustFrame; pScrn->ModeSet = xf86XVModeSet; if (!xf86XVInitAdaptors(pScreen, adaptors, num)) return FALSE; return TRUE; } static void xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; if (pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; XvPortRecPrivatePtr pPriv; for (i = 0; i < pAdaptor->nPorts; i++, pPort++) { pPriv = (XvPortRecPrivatePtr) pPort->devPriv.ptr; if (pPriv) { if (pPriv->clientClip) RegionDestroy(pPriv->clientClip); if (pPriv->pCompositeClip && pPriv->FreeCompositeClip) RegionDestroy(pPriv->pCompositeClip); if (pPriv->ckeyFilled) RegionDestroy(pPriv->ckeyFilled); free(pPriv); } } } XvFreeAdaptor(pAdaptor); } static Bool xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * infoPtr, int number) { XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XF86VideoAdaptorPtr adaptorPtr; XvAdaptorPtr pAdaptor, pa; XvAdaptorRecPrivatePtr adaptorPriv; int na, numAdaptor; XvPortRecPrivatePtr portPriv; XvPortPtr pPort, pp; int numPort; XF86VideoFormatPtr formatPtr; XvFormatPtr pFormat, pf; int numFormat, totFormat; XF86VideoEncodingPtr encodingPtr; XvEncodingPtr pEncode, pe; int numVisuals; VisualPtr pVisual; int i; pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; if (!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for (pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { adaptorPtr = infoPtr[na]; if (!adaptorPtr->StopVideo || !adaptorPtr->SetPortAttribute || !adaptorPtr->GetPortAttribute || !adaptorPtr->QueryBestSize) continue; /* client libs expect at least one encoding */ if (!adaptorPtr->nEncodings || !adaptorPtr->pEncodings) continue; pa->type = adaptorPtr->type; if (!adaptorPtr->PutVideo && !adaptorPtr->GetVideo) pa->type &= ~XvVideoMask; if (!adaptorPtr->PutStill && !adaptorPtr->GetStill) pa->type &= ~XvStillMask; if (!adaptorPtr->PutImage || !adaptorPtr->QueryImageAttributes) pa->type &= ~XvImageMask; if (!adaptorPtr->PutVideo && !adaptorPtr->PutImage && !adaptorPtr->PutStill) pa->type &= ~XvInputMask; if (!adaptorPtr->GetVideo && !adaptorPtr->GetStill) pa->type &= ~XvOutputMask; if (!(adaptorPtr->type & (XvPixmapMask | XvWindowMask))) continue; if (!(adaptorPtr->type & (XvImageMask | XvVideoMask | XvStillMask))) continue; pa->pScreen = pScreen; pa->ddPutVideo = xf86XVPutVideo; pa->ddPutStill = xf86XVPutStill; pa->ddGetVideo = xf86XVGetVideo; pa->ddGetStill = xf86XVGetStill; pa->ddStopVideo = xf86XVStopVideo; pa->ddPutImage = xf86XVPutImage; pa->ddSetPortAttribute = xf86XVSetPortAttribute; pa->ddGetPortAttribute = xf86XVGetPortAttribute; pa->ddQueryBestSize = xf86XVQueryBestSize; pa->ddQueryImageAttributes = xf86XVQueryImageAttributes; pa->name = strdup(adaptorPtr->name); if (adaptorPtr->nEncodings && (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for (pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; pe->name = strdup(encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; pe->rate.numerator = encodingPtr->rate.numerator; pe->rate.denominator = encodingPtr->rate.denominator; } pa->nEncodings = adaptorPtr->nEncodings; pa->pEncodings = pEncode; } if (adaptorPtr->nImages && (pa->pImages = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { memcpy(pa->pImages, adaptorPtr->pImages, adaptorPtr->nImages * sizeof(XvImageRec)); pa->nImages = adaptorPtr->nImages; } if (adaptorPtr->nAttributes && (pa->pAttributes = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { memcpy(pa->pAttributes, adaptorPtr->pAttributes, adaptorPtr->nAttributes * sizeof(XvAttributeRec)); for (i = 0; i < adaptorPtr->nAttributes; i++) { pa->pAttributes[i].name = strdup(adaptorPtr->pAttributes[i].name); } pa->nAttributes = adaptorPtr->nAttributes; } totFormat = adaptorPtr->nFormats; if (!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { xf86XVFreeAdaptor(pa); continue; } for (pf = pFormat, i = 0, numFormat = 0, formatPtr = adaptorPtr->pFormats; i < adaptorPtr->nFormats; i++, formatPtr++) { numVisuals = pScreen->numVisuals; pVisual = pScreen->visuals; while (numVisuals--) { if ((pVisual->class == formatPtr->class) && (pVisual->nplanes == formatPtr->depth)) { if (numFormat >= totFormat) { void *moreSpace; totFormat *= 2; moreSpace = reallocarray(pFormat, totFormat, sizeof(XvFormatRec)); if (!moreSpace) break; pFormat = moreSpace; pf = pFormat + numFormat; } pf->visual = pVisual->vid; pf->depth = formatPtr->depth; pf++; numFormat++; } pVisual++; } } pa->nFormats = numFormat; pa->pFormats = pFormat; if (!numFormat) { xf86XVFreeAdaptor(pa); continue; } if (!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { xf86XVFreeAdaptor(pa); continue; } adaptorPriv->flags = adaptorPtr->flags; adaptorPriv->PutVideo = adaptorPtr->PutVideo; adaptorPriv->PutStill = adaptorPtr->PutStill; adaptorPriv->GetVideo = adaptorPtr->GetVideo; adaptorPriv->GetStill = adaptorPtr->GetStill; adaptorPriv->StopVideo = adaptorPtr->StopVideo; adaptorPriv->SetPortAttribute = adaptorPtr->SetPortAttribute; adaptorPriv->GetPortAttribute = adaptorPtr->GetPortAttribute; adaptorPriv->QueryBestSize = adaptorPtr->QueryBestSize; adaptorPriv->QueryImageAttributes = adaptorPtr->QueryImageAttributes; adaptorPriv->PutImage = adaptorPtr->PutImage; adaptorPriv->ReputImage = adaptorPtr->ReputImage; /* image/still */ pa->devPriv.ptr = (void *) adaptorPriv; if (!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { xf86XVFreeAdaptor(pa); continue; } for (pp = pPort, i = 0, numPort = 0; i < adaptorPtr->nPorts; i++) { if (!(pp->id = FakeClientID(0))) continue; if (!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if (!AddResource(pp->id, PortResource, pp)) { free(portPriv); continue; } pp->pAdaptor = pa; pp->pNotify = (XvPortNotifyPtr) NULL; pp->pDraw = (DrawablePtr) NULL; pp->client = (ClientPtr) NULL; pp->grab.client = (ClientPtr) NULL; pp->time = currentTime; pp->devPriv.ptr = portPriv; portPriv->pScrn = pScrn; portPriv->AdaptorRec = adaptorPriv; portPriv->DevPriv.ptr = adaptorPtr->pPortPrivates[i].ptr; pp++; numPort++; } pa->nPorts = numPort; pa->pPorts = pPort; if (!numPort) { xf86XVFreeAdaptor(pa); continue; } pa->base_id = pPort->id; pa++; numAdaptor++; } if (numAdaptor) { pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { free(pAdaptor); return FALSE; } return TRUE; } /* Video should be clipped to the intersection of the window cliplist and the client cliplist specified in the GC for which the video was initialized. When we need to reclip a window, the GC that started the video may not even be around anymore. That's why we save the client clip from the GC when the video is initialized. We then use xf86XVUpdateCompositeClip to calculate the new composite clip when we need it. This is different from what DEC did. They saved the GC and used its clip list when they needed to reclip the window, even if the client clip was different from the one the video was initialized with. If the original GC was destroyed, they had to stop the video. I like the new method better (MArk). This function only works for windows. Will need to rewrite when (if) we support pixmap rendering. */ static void xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) { RegionPtr pregWin, pCompositeClip; WindowPtr pWin; Bool freeCompClip = FALSE; if (portPriv->pCompositeClip) return; pWin = (WindowPtr) portPriv->pDraw; /* get window clip list */ if (portPriv->subWindowMode == IncludeInferiors) { pregWin = NotClippedByChildren(pWin); freeCompClip = TRUE; } else pregWin = &pWin->clipList; if (!portPriv->clientClip) { portPriv->pCompositeClip = pregWin; portPriv->FreeCompositeClip = freeCompClip; return; } pCompositeClip = RegionCreate(NullBox, 1); RegionCopy(pCompositeClip, portPriv->clientClip); RegionTranslate(pCompositeClip, portPriv->pDraw->x, portPriv->pDraw->y); RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if (freeCompClip) { RegionDestroy(pregWin); } } /* Save the current clientClip and update the CompositeClip whenever we have a fresh GC */ static void xf86XVCopyClip(XvPortRecPrivatePtr portPriv, GCPtr pGC) { /* copy the new clip if it exists */ if (pGC->clientClip) { if (!portPriv->clientClip) portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ RegionCopy(portPriv->clientClip, pGC->clientClip); RegionTranslate(portPriv->clientClip, pGC->clipOrg.x, pGC->clipOrg.y); } else if (portPriv->clientClip) { /* free the old clientClip */ RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if (portPriv->pCompositeClip && portPriv->FreeCompositeClip) { RegionDestroy(portPriv->pCompositeClip); } portPriv->pCompositeClip = pGC->pCompositeClip; portPriv->FreeCompositeClip = FALSE; portPriv->subWindowMode = pGC->subWindowMode; } static void xf86XVCopyCompositeClip(XvPortRecPrivatePtr portPriv, GCPtr pGC, DrawablePtr pDraw) { if (!portPriv->clientClip) portPriv->clientClip = RegionCreate(NullBox, 1); /* Keep the original GC composite clip around for ReputImage */ RegionCopy(portPriv->clientClip, pGC->pCompositeClip); RegionTranslate(portPriv->clientClip, -pDraw->x, -pDraw->y); /* get rid of the old clip list */ if (portPriv->pCompositeClip && portPriv->FreeCompositeClip) RegionDestroy(portPriv->pCompositeClip); portPriv->pCompositeClip = pGC->pCompositeClip; portPriv->FreeCompositeClip = FALSE; portPriv->subWindowMode = pGC->subWindowMode; } static int xf86XVRegetVideo(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; xf86XVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->GetVideo) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, portPriv->vid_w, portPriv->vid_h, portPriv->drw_w, portPriv->drw_h, &ClipRegion, portPriv->DevPriv.ptr, portPriv->pDraw); if (ret == Success) portPriv->isOn = XV_ON; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && portPriv->isOn == XV_ON) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int xf86XVReputVideo(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; xf86XVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = portPriv->pScrn->frameX0; VPBox.y1 = portPriv->pScrn->frameY0; VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->PutVideo) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, portPriv->vid_w, portPriv->vid_h, portPriv->drw_w, portPriv->drw_h, &ClipRegion, portPriv->DevPriv.ptr, portPriv->pDraw); if (ret == Success) portPriv->isOn = XV_ON; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } /* Reput image/still */ static int xf86XVReputImage(XvPortRecPrivatePtr portPriv) { RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; xf86XVUpdateCompositeClip(portPriv); /* the clip can get smaller over time */ RegionCopy(portPriv->clientClip, portPriv->pCompositeClip); RegionTranslate(portPriv->clientClip, -portPriv->pDraw->x, -portPriv->pDraw->y); /* translate the video region to the screen */ WinBox.x1 = portPriv->pDraw->x + portPriv->drw_x; WinBox.y1 = portPriv->pDraw->y + portPriv->drw_y; WinBox.x2 = WinBox.x1 + portPriv->drw_w; WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = portPriv->pScrn->frameX0; VPBox.y1 = portPriv->pScrn->frameY0; VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } /* that's all if it's totally obscured */ if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } ret = (*portPriv->AdaptorRec->ReputImage) (portPriv->pScrn, portPriv->vid_x, portPriv->vid_y, WinBox.x1, WinBox.y1, portPriv->vid_w, portPriv->vid_h, portPriv->drw_w, portPriv->drw_h, &ClipRegion, portPriv->DevPriv.ptr, portPriv->pDraw); portPriv->isOn = (ret == Success) ? XV_ON : XV_OFF; CLIP_VIDEO_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int xf86XVReputAllVideo(WindowPtr pWin, void *data) { XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); while (WinPriv) { if (WinPriv->PortRec->type == XvInputMask) xf86XVReputVideo(WinPriv->PortRec); else xf86XVRegetVideo(WinPriv->PortRec); WinPriv = WinPriv->next; } return WT_WALKCHILDREN; } static int xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) { XF86XVWindowPtr winPriv, PrivRoot; winPriv = PrivRoot = GET_XF86XV_WINDOW(pWin); /* Enlist our port in the window private */ while (winPriv) { if (winPriv->PortRec == portPriv) /* we're already listed */ break; winPriv = winPriv->next; } if (!winPriv) { winPriv = calloc(1, sizeof(XF86XVWindowRec)); if (!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv); } portPriv->pDraw = (DrawablePtr) pWin; return Success; } static void xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) { XF86XVWindowPtr winPriv, prevPriv = NULL; winPriv = GET_XF86XV_WINDOW(pWin); while (winPriv) { if (winPriv->PortRec == portPriv) { if (prevPriv) prevPriv->next = winPriv->next; else dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv->next); free(winPriv); break; } prevPriv = winPriv; winPriv = winPriv->next; } portPriv->pDraw = NULL; if (portPriv->ckeyFilled) { RegionDestroy(portPriv->ckeyFilled); portPriv->ckeyFilled = NULL; } portPriv->clipChanged = FALSE; } static void xf86XVReputOrStopPort(XvPortRecPrivatePtr pPriv, WindowPtr pWin, Bool visible) { if (!visible) { if (pPriv->isOn == XV_ON) { (*pPriv->AdaptorRec->StopVideo) (pPriv->pScrn, pPriv->DevPriv.ptr, FALSE); pPriv->isOn = XV_PENDING; } if (!pPriv->type) /* overlaid still/image */ xf86XVRemovePortFromWindow(pWin, pPriv); return; } switch (pPriv->type) { case XvInputMask: xf86XVReputVideo(pPriv); break; case XvOutputMask: xf86XVRegetVideo(pPriv); break; default: /* overlaid still/image */ if (pPriv->AdaptorRec->ReputImage) xf86XVReputImage(pPriv); break; } } static void xf86XVReputOrStopAllPorts(ScrnInfoPtr pScrn, Bool onlyChanged) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); XvAdaptorPtr pa; int c, i; for (c = pxvs->nAdaptors, pa = pxvs->pAdaptors; c > 0; c--, pa++) { XvPortPtr pPort = pa->pPorts; for (i = pa->nPorts; i > 0; i--, pPort++) { XvPortRecPrivatePtr pPriv = (XvPortRecPrivatePtr) pPort->devPriv.ptr; WindowPtr pWin = (WindowPtr) pPriv->pDraw; Bool visible; if (pPriv->isOn == XV_OFF || !pWin) continue; if (onlyChanged && !pPriv->clipChanged) continue; visible = pWin->visibility == VisibilityUnobscured || pWin->visibility == VisibilityPartiallyObscured; /* * Stop and remove still/images if * ReputImage isn't supported. */ if (!pPriv->type && !pPriv->AdaptorRec->ReputImage) visible = FALSE; xf86XVReputOrStopPort(pPriv, pWin, visible); pPriv->clipChanged = FALSE; } } } /**** ScreenRec fields ****/ static Bool xf86XVDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); XF86XVWindowPtr tmp, WinPriv = GET_XF86XV_WINDOW(pWin); int ret; while (WinPriv) { XvPortRecPrivatePtr pPriv = WinPriv->PortRec; if (pPriv->isOn > XV_OFF) { (*pPriv->AdaptorRec->StopVideo) (pPriv->pScrn, pPriv->DevPriv.ptr, TRUE); pPriv->isOn = XV_OFF; } pPriv->pDraw = NULL; tmp = WinPriv; WinPriv = WinPriv->next; free(tmp); } dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, NULL); pScreen->DestroyWindow = ScreenPriv->DestroyWindow; ret = (*pScreen->DestroyWindow) (pWin); pScreen->DestroyWindow = xf86XVDestroyWindow; return ret; } static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind) { ScreenPtr pScreen; XF86XVScreenPtr ScreenPriv; ScrnInfoPtr pScrn; if (pWin) pScreen = pWin->drawable.pScreen; else pScreen = pLayerWin->drawable.pScreen; ScreenPriv = GET_XF86XV_SCREEN(pScreen); pScrn = xf86ScreenToScrn(pScreen); xf86XVReputOrStopAllPorts(pScrn, TRUE); pScreen->PostValidateTree = ScreenPriv->PostValidateTree; if (pScreen->PostValidateTree) { (*pScreen->PostValidateTree) (pWin, pLayerWin, kind); } ScreenPriv->PostValidateTree = PostValidateTreeUndefined; } static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1) { ScreenPtr pScreen = pWin->drawable.pScreen; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); XvPortRecPrivatePtr pPriv; Bool AreasExposed; AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; (*pScreen->WindowExposures) (pWin, reg1); pScreen->WindowExposures = xf86XVWindowExposures; /* filter out XClearWindow/Area */ if (!pWin->valdata) return; while (WinPriv) { Bool visible = TRUE; pPriv = WinPriv->PortRec; /* * Stop and remove still/images if areas were exposed and * ReputImage isn't supported. */ if (!pPriv->type && !pPriv->AdaptorRec->ReputImage) visible = !AreasExposed; /* * Subtract exposed areas from overlaid image to match textured video * behavior. */ if (!pPriv->type && pPriv->clientClip) RegionSubtract(pPriv->clientClip, pPriv->clientClip, reg1); if (visible && pPriv->ckeyFilled) { RegionRec tmp; RegionNull(&tmp); RegionCopy(&tmp, reg1); RegionTranslate(&tmp, pWin->drawable.x, pWin->drawable.y); RegionSubtract(pPriv->ckeyFilled, pPriv->ckeyFilled, &tmp); } WinPriv = WinPriv->next; xf86XVReputOrStopPort(pPriv, pWin, visible); pPriv->clipChanged = FALSE; } } static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy) { ScreenPtr pScreen = pWin->drawable.pScreen; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); XvPortRecPrivatePtr pPriv; while (WinPriv) { pPriv = WinPriv->PortRec; if (pPriv->pCompositeClip && pPriv->FreeCompositeClip) RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; pPriv->clipChanged = TRUE; if (ScreenPriv->PostValidateTree == PostValidateTreeUndefined) { ScreenPriv->PostValidateTree = pScreen->PostValidateTree; pScreen->PostValidateTree = xf86XVPostValidateTree; } WinPriv = WinPriv->next; } if (ScreenPriv->ClipNotify) { pScreen->ClipNotify = ScreenPriv->ClipNotify; (*pScreen->ClipNotify) (pWin, dx, dy); pScreen->ClipNotify = xf86XVClipNotify; } } /**** Required XvScreenRec fields ****/ static Bool xf86XVCloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); XvAdaptorPtr pa; int c; if (!ScreenPriv) return TRUE; pScreen->DestroyWindow = ScreenPriv->DestroyWindow; pScreen->WindowExposures = ScreenPriv->WindowExposures; pScreen->ClipNotify = ScreenPriv->ClipNotify; pScreen->CloseScreen = ScreenPriv->CloseScreen; pScrn->EnterVT = ScreenPriv->EnterVT; pScrn->LeaveVT = ScreenPriv->LeaveVT; pScrn->AdjustFrame = ScreenPriv->AdjustFrame; pScrn->ModeSet = ScreenPriv->ModeSet; for (c = 0, pa = pxvs->pAdaptors; c < pxvs->nAdaptors; c++, pa++) { xf86XVFreeAdaptor(pa); } free(pxvs->pAdaptors); free(ScreenPriv); return pScreen->CloseScreen(pScreen); } /**** ScrnInfoRec fields ****/ static Bool xf86XVEnterVT(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); Bool ret; pScrn->EnterVT = ScreenPriv->EnterVT; ret = (*ScreenPriv->EnterVT) (pScrn); ScreenPriv->EnterVT = pScrn->EnterVT; pScrn->EnterVT = xf86XVEnterVT; if (ret) WalkTree(pScreen, xf86XVReputAllVideo, 0); return ret; } static void xf86XVLeaveVT(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); XvAdaptorPtr pAdaptor; XvPortPtr pPort; XvPortRecPrivatePtr pPriv; int i, j; for (i = 0; i < pxvs->nAdaptors; i++) { pAdaptor = &pxvs->pAdaptors[i]; for (j = 0; j < pAdaptor->nPorts; j++) { pPort = &pAdaptor->pPorts[j]; pPriv = (XvPortRecPrivatePtr) pPort->devPriv.ptr; if (pPriv->isOn > XV_OFF) { (*pPriv->AdaptorRec->StopVideo) (pPriv->pScrn, pPriv->DevPriv.ptr, TRUE); pPriv->isOn = XV_OFF; if (pPriv->pCompositeClip && pPriv->FreeCompositeClip) RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; if (!pPriv->type && pPriv->pDraw) { /* still */ xf86XVRemovePortFromWindow((WindowPtr) pPriv->pDraw, pPriv); } } } } pScrn->LeaveVT = ScreenPriv->LeaveVT; (*ScreenPriv->LeaveVT) (pScrn); ScreenPriv->LeaveVT = pScrn->LeaveVT; pScrn->LeaveVT = xf86XVLeaveVT; } static void xf86XVAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); if (ScreenPriv->AdjustFrame) { pScrn->AdjustFrame = ScreenPriv->AdjustFrame; (*pScrn->AdjustFrame) (pScrn, x, y); pScrn->AdjustFrame = xf86XVAdjustFrame; } xf86XVReputOrStopAllPorts(pScrn, FALSE); } static void xf86XVModeSet(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XF86XVScreenPtr ScreenPriv; /* Can be called before pScrn->pScreen is set */ if (!pScreen) return; ScreenPriv = GET_XF86XV_SCREEN(pScreen); if (ScreenPriv->ModeSet) { pScrn->ModeSet = ScreenPriv->ModeSet; (*pScrn->ModeSet) (pScrn); pScrn->ModeSet = xf86XVModeSet; } xf86XVReputOrStopAllPorts(pScrn, FALSE); } /**** XvAdaptorRec fields ****/ static int xf86XVPutVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); int result; /* No dumping video to pixmaps... For now anyhow */ if (pDraw->type != DRAWABLE_WINDOW) { pPort->pDraw = (DrawablePtr) NULL; return BadAlloc; } /* If we are changing windows, unregister our port in the old window */ if (portPriv->pDraw && (portPriv->pDraw != pDraw)) xf86XVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); /* Register our port with the new window */ result = xf86XVEnlistPortInWindow((WindowPtr) pDraw, portPriv); if (result != Success) return result; portPriv->type = XvInputMask; /* save a copy of these parameters */ portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; /* make sure we have the most recent copy of the clientClip */ xf86XVCopyClip(portPriv, pGC); /* To indicate to the DI layer that we were successful */ pPort->pDraw = pDraw; if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ return (xf86XVReputVideo(portPriv)); } static int xf86XVPutStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; xf86XVCopyCompositeClip(portPriv, pGC, pDraw); RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = portPriv->pScrn->frameX0; VPBox.y1 = portPriv->pScrn->frameY0; VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } if (portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); } if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_STILL_BAILOUT; } ret = (*portPriv->AdaptorRec->PutStill) (portPriv->pScrn, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, &ClipRegion, portPriv->DevPriv.ptr, pDraw); if ((ret == Success) && (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_STILLS)) { xf86XVEnlistPortInWindow((WindowPtr) pDraw, portPriv); portPriv->isOn = XV_ON; portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; portPriv->type = 0; /* no mask means it's transient and should not be reput once it's removed */ pPort->pDraw = pDraw; /* make sure we can get stop requests */ } PUT_STILL_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int xf86XVGetVideo(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); int result; /* No pixmaps... For now anyhow */ if (pDraw->type != DRAWABLE_WINDOW) { pPort->pDraw = (DrawablePtr) NULL; return BadAlloc; } /* If we are changing windows, unregister our port in the old window */ if (portPriv->pDraw && (portPriv->pDraw != pDraw)) xf86XVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); /* Register our port with the new window */ result = xf86XVEnlistPortInWindow((WindowPtr) pDraw, portPriv); if (result != Success) return result; portPriv->type = XvOutputMask; /* save a copy of these parameters */ portPriv->vid_x = vid_x; portPriv->vid_y = vid_y; portPriv->vid_w = vid_w; portPriv->vid_h = vid_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; /* make sure we have the most recent copy of the clientClip */ xf86XVCopyClip(portPriv, pGC); /* To indicate to the DI layer that we were successful */ pPort->pDraw = pDraw; if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ return (xf86XVRegetVideo(portPriv)); } static int xf86XVGetStill(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); } if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto GET_STILL_BAILOUT; } ret = (*portPriv->AdaptorRec->GetStill) (portPriv->pScrn, vid_x, vid_y, WinBox.x1, WinBox.y1, vid_w, vid_h, drw_w, drw_h, &ClipRegion, portPriv->DevPriv.ptr, pDraw); GET_STILL_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int xf86XVStopVideo(XvPortPtr pPort, DrawablePtr pDraw) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; xf86XVRemovePortFromWindow((WindowPtr) pDraw, portPriv); if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ /* Must free resources. */ if (portPriv->isOn > XV_OFF) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, TRUE); portPriv->isOn = XV_OFF; } return Success; } static int xf86XVSetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return ((*portPriv->AdaptorRec->SetPortAttribute) (portPriv->pScrn, attribute, value, portPriv->DevPriv.ptr)); } static int xf86XVGetPortAttribute(XvPortPtr pPort, Atom attribute, INT32 *p_value) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return ((*portPriv->AdaptorRec->GetPortAttribute) (portPriv->pScrn, attribute, p_value, portPriv->DevPriv.ptr)); } static int xf86XVQueryBestSize(XvPortPtr pPort, CARD8 motion, CARD16 vid_w, CARD16 vid_h, CARD16 drw_w, CARD16 drw_h, unsigned int *p_w, unsigned int *p_h) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); (*portPriv->AdaptorRec->QueryBestSize) (portPriv->pScrn, (Bool) motion, vid_w, vid_h, drw_w, drw_h, p_w, p_h, portPriv->DevPriv.ptr); return Success; } static int xf86XVPutImage(DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 src_x, INT16 src_y, CARD16 src_w, CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h, XvImagePtr format, unsigned char *data, Bool sync, CARD16 width, CARD16 height) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; if (pDraw->type != DRAWABLE_WINDOW) return BadAlloc; if (!portPriv->pScrn->vtSema) return Success; /* Success ? */ xf86XVCopyCompositeClip(portPriv, pGC, pDraw); WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; RegionInit(&WinRegion, &WinBox, 1); RegionNull(&ClipRegion); RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if (portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; BoxRec VPBox; VPBox.x1 = portPriv->pScrn->frameX0; VPBox.y1 = portPriv->pScrn->frameY0; VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; RegionInit(&VPReg, &VPBox, 1); RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); RegionUninit(&VPReg); } /* If we are changing windows, unregister our port in the old window */ if (portPriv->pDraw && (portPriv->pDraw != pDraw)) xf86XVRemovePortFromWindow((WindowPtr) (portPriv->pDraw), portPriv); /* Register our port with the new window */ ret = xf86XVEnlistPortInWindow((WindowPtr) pDraw, portPriv); if (ret != Success) goto PUT_IMAGE_BAILOUT; if (!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_IMAGE_BAILOUT; } ret = (*portPriv->AdaptorRec->PutImage) (portPriv->pScrn, src_x, src_y, WinBox.x1, WinBox.y1, src_w, src_h, drw_w, drw_h, format->id, data, width, height, sync, &ClipRegion, portPriv->DevPriv.ptr, pDraw); if ((ret == Success) && (portPriv->AdaptorRec->flags & VIDEO_OVERLAID_IMAGES)) { portPriv->isOn = XV_ON; portPriv->vid_x = src_x; portPriv->vid_y = src_y; portPriv->vid_w = src_w; portPriv->vid_h = src_h; portPriv->drw_x = drw_x; portPriv->drw_y = drw_y; portPriv->drw_w = drw_w; portPriv->drw_h = drw_h; portPriv->type = 0; /* no mask means it's transient and should not be reput once it's removed */ pPort->pDraw = pDraw; /* make sure we can get stop requests */ } PUT_IMAGE_BAILOUT: if ((clippedAway || (ret != Success)) && (portPriv->isOn == XV_ON)) { (*portPriv->AdaptorRec->StopVideo) (portPriv->pScrn, portPriv->DevPriv.ptr, FALSE); portPriv->isOn = XV_PENDING; } /* This clip was copied and only good for one shot */ if (!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; RegionUninit(&WinRegion); RegionUninit(&ClipRegion); return ret; } static int xf86XVQueryImageAttributes(XvPortPtr pPort, XvImagePtr format, CARD16 *width, CARD16 *height, int *pitches, int *offsets) { XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return (*portPriv->AdaptorRec->QueryImageAttributes) (portPriv->pScrn, format->id, width, height, pitches, offsets); } void xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr fillboxes) { ScreenPtr pScreen = pDraw->pScreen; if (!xf86ScreenToScrn(pScreen)->vtSema) return; XvFillColorKey(pDraw, key, fillboxes); } void xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr fillboxes) { xf86XVFillKeyHelperDrawable(&pScreen->root->drawable, key, fillboxes); } void xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key, RegionPtr clipboxes, Bool fillEverything) { WindowPtr pWin = (WindowPtr) pDraw; XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); XvPortRecPrivatePtr portPriv = NULL; RegionRec reg; RegionPtr fillboxes; while (WinPriv) { XvPortRecPrivatePtr pPriv = WinPriv->PortRec; if (data == pPriv->DevPriv.ptr) { portPriv = pPriv; break; } WinPriv = WinPriv->next; } if (!portPriv) return; if (!portPriv->ckeyFilled) portPriv->ckeyFilled = RegionCreate(NULL, 0); if (!fillEverything) { RegionNull(®); fillboxes = ® RegionSubtract(fillboxes, clipboxes, portPriv->ckeyFilled); if (!RegionNotEmpty(fillboxes)) goto out; } else fillboxes = clipboxes; RegionCopy(portPriv->ckeyFilled, clipboxes); xf86XVFillKeyHelperDrawable(pDraw, key, fillboxes); out: if (!fillEverything) RegionUninit(®); } /* xf86XVClipVideoHelper - Takes the dst box in standard X BoxRec form (top and left edges inclusive, bottom and right exclusive). The new dst box is returned. The source boundaries are given (x1, y1 inclusive, x2, y2 exclusive) and returned are the new source boundaries in 16.16 fixed point. */ Bool xf86XVClipVideoHelper(BoxPtr dst, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, RegionPtr reg, INT32 width, INT32 height) { double xsw, xdw, ysw, ydw; INT32 delta; BoxPtr extents = RegionExtents(reg); int diff; xsw = (*xb - *xa) << 16; xdw = dst->x2 - dst->x1; ysw = (*yb - *ya) << 16; ydw = dst->y2 - dst->y1; *xa <<= 16; *xb <<= 16; *ya <<= 16; *yb <<= 16; diff = extents->x1 - dst->x1; if (diff > 0) { dst->x1 = extents->x1; *xa += (diff * xsw) / xdw; } diff = dst->x2 - extents->x2; if (diff > 0) { dst->x2 = extents->x2; *xb -= (diff * xsw) / xdw; } diff = extents->y1 - dst->y1; if (diff > 0) { dst->y1 = extents->y1; *ya += (diff * ysw) / ydw; } diff = dst->y2 - extents->y2; if (diff > 0) { dst->y2 = extents->y2; *yb -= (diff * ysw) / ydw; } if (*xa < 0) { diff = (((-*xa) * xdw) + xsw - 1) / xsw; dst->x1 += diff; *xa += (diff * xsw) / xdw; } delta = *xb - (width << 16); if (delta > 0) { diff = ((delta * xdw) + xsw - 1) / xsw; dst->x2 -= diff; *xb -= (diff * xsw) / xdw; } if (*xa >= *xb) return FALSE; if (*ya < 0) { diff = (((-*ya) * ydw) + ysw - 1) / ysw; dst->y1 += diff; *ya += (diff * ysw) / ydw; } delta = *yb - (height << 16); if (delta > 0) { diff = ((delta * ydw) + ysw - 1) / ysw; dst->y2 -= diff; *yb -= (diff * ysw) / ydw; } if (*ya >= *yb) return FALSE; if ((dst->x1 > extents->x1) || (dst->x2 < extents->x2) || (dst->y1 > extents->y1) || (dst->y2 < extents->y2)) { RegionRec clipReg; RegionInit(&clipReg, dst, 1); RegionIntersect(reg, reg, &clipReg); RegionUninit(&clipReg); } return TRUE; } void xf86XVCopyYUV12ToPacked(const void *srcy, const void *srcv, const void *srcu, void *dst, int srcPitchy, int srcPitchuv, int dstPitch, int h, int w) { CARD32 *Dst; const CARD8 *Y, *U, *V; int i, j; w >>= 1; for (j = 0; j < h; j++) { Dst = dst; Y = srcy; V = srcv; U = srcu; i = w; while (i >= 4) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24); Dst[1] = Y[2] | (Y[3] << 16) | (U[1] << 8) | (V[1] << 24); Dst[2] = Y[4] | (Y[5] << 16) | (U[2] << 8) | (V[2] << 24); Dst[3] = Y[6] | (Y[7] << 16) | (U[3] << 8) | (V[3] << 24); #else /* This assumes a little-endian framebuffer */ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; Dst[1] = (Y[2] << 24) | (Y[3] << 8) | (U[1] << 16) | V[1]; Dst[2] = (Y[4] << 24) | (Y[5] << 8) | (U[2] << 16) | V[2]; Dst[3] = (Y[6] << 24) | (Y[7] << 8) | (U[3] << 16) | V[3]; #endif Dst += 4; Y += 8; V += 4; U += 4; i -= 4; } while (i--) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN Dst[0] = Y[0] | (Y[1] << 16) | (U[0] << 8) | (V[0] << 24); #else /* This assumes a little-endian framebuffer */ Dst[0] = (Y[0] << 24) | (Y[1] << 8) | (U[0] << 16) | V[0]; #endif Dst++; Y += 2; V++; U++; } dst = (CARD8 *) dst + dstPitch; srcy = (const CARD8 *) srcy + srcPitchy; if (j & 1) { srcu = (const CARD8 *) srcu + srcPitchuv; srcv = (const CARD8 *) srcv + srcPitchuv; } } } void xf86XVCopyPacked(const void *src, void *dst, int srcPitch, int dstPitch, int h, int w) { const CARD32 *Src; CARD32 *Dst; int i; w >>= 1; while (--h >= 0) { do { Dst = dst; Src = src; i = w; while (i >= 4) { Dst[0] = Src[0]; Dst[1] = Src[1]; Dst[2] = Src[2]; Dst[3] = Src[3]; Dst += 4; Src += 4; i -= 4; } if (!i) break; Dst[0] = Src[0]; if (i == 1) break; Dst[1] = Src[1]; if (i == 2) break; Dst[2] = Src[2]; } while (0); src = (const CARD8 *) src + srcPitch; dst = (CARD8 *) dst + dstPitch; } } xorg-server-21.1.16/hw/xfree86/common/xf86xvmc.c0000644000175000017500000001711614757411105014673 /* * Copyright (c) 2001-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include #include #include "scrnintstr.h" #include "resource.h" #include "dixstruct.h" #include "xf86xvpriv.h" #include "xf86xvmc.h" typedef struct { CloseScreenProcPtr CloseScreen; int num_adaptors; XF86MCAdaptorPtr *adaptors; XvMCAdaptorPtr dixinfo; } xf86XvMCScreenRec, *xf86XvMCScreenPtr; static DevPrivateKeyRec XF86XvMCScreenKeyRec; #define XF86XvMCScreenKey (&XF86XvMCScreenKeyRec) #define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey) static int xf86XvMCCreateContext(XvPortPtr pPort, XvMCContextPtr pContext, int *num_priv, CARD32 **priv) { xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); pContext->port_priv = (XvPortRecPrivatePtr) (pPort->devPriv.ptr); return (*pScreenPriv->adaptors[pContext->adapt_num]->CreateContext) (pScrn, pContext, num_priv, priv); } static void xf86XvMCDestroyContext(XvMCContextPtr pContext) { xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num]->DestroyContext) (pScrn, pContext); } static int xf86XvMCCreateSurface(XvMCSurfacePtr pSurface, int *num_priv, CARD32 **priv) { XvMCContextPtr pContext = pSurface->context; xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); return (*pScreenPriv->adaptors[pContext->adapt_num]->CreateSurface) (pScrn, pSurface, num_priv, priv); } static void xf86XvMCDestroySurface(XvMCSurfacePtr pSurface) { XvMCContextPtr pContext = pSurface->context; xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num]->DestroySurface) (pScrn, pSurface); } static int xf86XvMCCreateSubpicture(XvMCSubpicturePtr pSubpicture, int *num_priv, CARD32 **priv) { XvMCContextPtr pContext = pSubpicture->context; xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); return (*pScreenPriv->adaptors[pContext->adapt_num]-> CreateSubpicture) (pScrn, pSubpicture, num_priv, priv); } static void xf86XvMCDestroySubpicture(XvMCSubpicturePtr pSubpicture) { XvMCContextPtr pContext = pSubpicture->context; xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pContext->pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num]->DestroySubpicture) (pScrn, pSubpicture); } static Bool xf86XvMCCloseScreen(ScreenPtr pScreen) { xf86XvMCScreenPtr pScreenPriv = XF86XVMC_GET_PRIVATE(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; free(pScreenPriv->dixinfo); free(pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } Bool xf86XvMCScreenInit(ScreenPtr pScreen, int num_adaptors, XF86MCAdaptorPtr * adaptors) { XvMCAdaptorPtr pAdapt; xf86XvMCScreenPtr pScreenPriv; XvScreenPtr pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XF86XvScreenKey); int i, j; if (noXvExtension) return FALSE; if (!(pAdapt = xallocarray(num_adaptors, sizeof(XvMCAdaptorRec)))) return FALSE; if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) { free(pAdapt); return FALSE; } if (!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) { free(pAdapt); return FALSE; } dixSetPrivate(&pScreen->devPrivates, XF86XvMCScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86XvMCCloseScreen; pScreenPriv->num_adaptors = num_adaptors; pScreenPriv->adaptors = adaptors; pScreenPriv->dixinfo = pAdapt; for (i = 0; i < num_adaptors; i++) { pAdapt[i].xv_adaptor = NULL; for (j = 0; j < pxvs->nAdaptors; j++) { if (!strcmp((*adaptors)->name, pxvs->pAdaptors[j].name)) { pAdapt[i].xv_adaptor = &(pxvs->pAdaptors[j]); break; } } if (!pAdapt[i].xv_adaptor) { /* no adaptor by that name */ pScreenPriv->dixinfo = FALSE; free(pAdapt); return FALSE; } pAdapt[i].num_surfaces = (*adaptors)->num_surfaces; pAdapt[i].surfaces = (XvMCSurfaceInfoPtr *) ((*adaptors)->surfaces); pAdapt[i].num_subpictures = (*adaptors)->num_subpictures; pAdapt[i].subpictures = (XvImagePtr *) ((*adaptors)->subpictures); pAdapt[i].CreateContext = xf86XvMCCreateContext; pAdapt[i].DestroyContext = xf86XvMCDestroyContext; pAdapt[i].CreateSurface = xf86XvMCCreateSurface; pAdapt[i].DestroySurface = xf86XvMCDestroySurface; pAdapt[i].CreateSubpicture = xf86XvMCCreateSubpicture; pAdapt[i].DestroySubpicture = xf86XvMCDestroySubpicture; adaptors++; } if (Success != XvMCScreenInit(pScreen, num_adaptors, pAdapt)) return FALSE; return TRUE; } XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec(void) { return calloc(1, sizeof(XF86MCAdaptorRec)); } void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { free(adaptor); } xorg-server-21.1.16/hw/xfree86/common/xf86fbBus.c0000644000175000017500000000534214757411105014755 /* * Copyright (c) 2000-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the interfaces to the bus-specific code */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86Bus.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" Bool fbSlotClaimed = FALSE; int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; int num; #ifdef XSERVER_PLATFORM_BUS if (platformSlotClaimed) return -1; #endif #ifdef XSERVER_LIBPCIACCESS if (pciSlotClaimed) return -1; #endif #if defined(__sparc__) || defined (__sparc64__) if (sbusSlotClaimed) return -1; #endif num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); fbSlotClaimed = TRUE; return num; } /* * Get the list of FB "slots" claimed by a screen */ int xf86GetFbInfoForScreen(int scrnIndex) { int num = 0; int i; EntityPtr p; for (i = 0; i < xf86Screens[scrnIndex]->numEntities; i++) { p = xf86Entities[xf86Screens[scrnIndex]->entityList[i]]; if (p->bus.type == BUS_NONE) { num++; } } return num; } xorg-server-21.1.16/hw/xfree86/common/xf86noBus.c0000644000175000017500000000406514757411105015003 /* * Copyright (c) 2000-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the interfaces to the bus-specific code */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86Bus.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p; int num; num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = 0; p->bus.type = BUS_NONE; p->active = active; p->inUse = FALSE; xf86AddDevToEntity(num, dev); return num; } xorg-server-21.1.16/hw/xfree86/common/xf86pciBus.c0000644000175000017500000013167214757411105015147 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the interfaces to the bus-specific code */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "os.h" #include "Pci.h" #include "xf86.h" #include "xf86Priv.h" #include "dirent.h" /* DIR, FILE type definitions */ /* Bus-specific headers */ #include "xf86Bus.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" #define PCI_VENDOR_GENERIC 0x00FF /* Bus-specific globals */ int pciSlotClaimed = 0; #define PCIINFOCLASSES(c) \ ( (((c) & 0x00ff0000) == (PCI_CLASS_PREHISTORIC << 16)) \ || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \ || ((((c) & 0x00ffff00) \ == ((PCI_CLASS_MULTIMEDIA << 16) | (PCI_SUBCLASS_MULTIMEDIA_VIDEO << 8)))) \ || ((((c) & 0x00ffff00) \ == ((PCI_CLASS_PROCESSOR << 16) | (PCI_SUBCLASS_PROCESSOR_COPROC << 8)))) ) /* * PCI classes that have messages printed always. The others are only * have a message printed when the vendor/dev IDs are recognised. */ #define PCIALWAYSPRINTCLASSES(c) \ ( (((c) & 0x00ffff00) \ == ((PCI_CLASS_PREHISTORIC << 16) | (PCI_SUBCLASS_PREHISTORIC_VGA << 8))) \ || (((c) & 0x00ff0000) == (PCI_CLASS_DISPLAY << 16)) \ || ((((c) & 0x00ffff00) \ == ((PCI_CLASS_MULTIMEDIA << 16) | (PCI_SUBCLASS_MULTIMEDIA_VIDEO << 8)))) ) #define IS_VGA(c) \ (((c) & 0x00ffff00) \ == ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8))) static struct pci_slot_match xf86IsolateDevice = { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0 }; /* * xf86Bus.c interface */ void xf86PciProbe(void) { int i = 0, k; int num = 0; struct pci_device *info; struct pci_device_iterator *iter; struct pci_device **xf86PciVideoInfo = NULL; if (!xf86scanpci()) { xf86PciVideoInfo = NULL; return; } iter = pci_slot_match_iterator_create(&xf86IsolateDevice); while ((info = pci_device_next(iter)) != NULL) { if (PCIINFOCLASSES(info->device_class)) { num++; xf86PciVideoInfo = xnfreallocarray(xf86PciVideoInfo, num + 1, sizeof(struct pci_device *)); xf86PciVideoInfo[num] = NULL; xf86PciVideoInfo[num - 1] = info; pci_device_probe(info); if (primaryBus.type == BUS_NONE && pci_device_is_boot_vga(info)) { primaryBus.type = BUS_PCI; primaryBus.id.pci = info; } info->user_data = 0; } } free(iter); /* If we haven't found a primary device try a different heuristic */ if (primaryBus.type == BUS_NONE && num) { for (i = 0; i < num; i++) { uint16_t command; info = xf86PciVideoInfo[i]; pci_device_cfg_read_u16(info, &command, 4); if ((command & PCI_CMD_MEM_ENABLE) && ((num == 1) || IS_VGA(info->device_class))) { if (primaryBus.type == BUS_NONE) { primaryBus.type = BUS_PCI; primaryBus.id.pci = info; } else { xf86Msg(X_NOTICE, "More than one possible primary device found\n"); primaryBus.type ^= (BusType) (-1); } } } } /* Print a summary of the video devices found */ for (k = 0; k < num; k++) { const char *prim = " "; Bool memdone = FALSE, iodone = FALSE; info = xf86PciVideoInfo[k]; if (!PCIALWAYSPRINTCLASSES(info->device_class)) continue; if (xf86IsPrimaryPci(info)) prim = "*"; xf86Msg(X_PROBED, "PCI:%s(%u@%u:%u:%u) %04x:%04x:%04x:%04x ", prim, info->bus, info->domain, info->dev, info->func, info->vendor_id, info->device_id, info->subvendor_id, info->subdevice_id); xf86ErrorF("rev %d", info->revision); for (i = 0; i < 6; i++) { struct pci_mem_region *r = &info->regions[i]; if (r->size && !r->is_IO) { if (!memdone) { xf86ErrorF(", Mem @ "); memdone = TRUE; } else xf86ErrorF(", "); xf86ErrorF("0x%08lx/%ld", (long) r->base_addr, (long) r->size); } } for (i = 0; i < 6; i++) { struct pci_mem_region *r = &info->regions[i]; if (r->size && r->is_IO) { if (!iodone) { xf86ErrorF(", I/O @ "); iodone = TRUE; } else xf86ErrorF(", "); xf86ErrorF("0x%08lx/%ld", (long) r->base_addr, (long) r->size); } } if (info->rom_size) { xf86ErrorF(", BIOS @ 0x\?\?\?\?\?\?\?\?/%ld", (long) info->rom_size); } xf86ErrorF("\n"); } free(xf86PciVideoInfo); } /* * If the slot requested is already in use, return -1. * Otherwise, claim the slot for the screen requesting it. */ int xf86ClaimPciSlot(struct pci_device *d, DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p = NULL; int num; if (xf86CheckPciSlot(d)) { num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = chipset; p->bus.type = BUS_PCI; p->bus.id.pci = d; p->active = active; p->inUse = FALSE; if (dev) xf86AddDevToEntity(num, dev); pciSlotClaimed++; return num; } else return -1; } /* * Unclaim PCI slot, e.g. if probing failed, so that a different driver can claim. */ void xf86UnclaimPciSlot(struct pci_device *d, GDevPtr dev) { int i; for (i = 0; i < xf86NumEntities; i++) { const EntityPtr p = xf86Entities[i]; if ((p->bus.type == BUS_PCI) && (p->bus.id.pci == d)) { /* Probably the slot should be deallocated? */ xf86RemoveDevFromEntity(i, dev); pciSlotClaimed--; p->bus.type = BUS_NONE; return; } } } /* * Parse a BUS ID string, and return the PCI bus parameters if it was * in the correct format for a PCI bus id. */ Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) { /* * The format is assumed to be "bus[@domain]:device[:func]", where domain, * bus, device and func are decimal integers. domain and func may be * omitted and assumed to be zero, although doing this isn't encouraged. */ char *p, *s, *d; const char *id; int i; if (StringToBusType(busID, &id) != BUS_PCI) return FALSE; s = xstrdup(id); p = strtok(s, ":"); if (p == NULL || *p == 0) { free(s); return FALSE; } d = strpbrk(p, "@"); if (d != NULL) { *(d++) = 0; for (i = 0; d[i] != 0; i++) { if (!isdigit(d[i])) { free(s); return FALSE; } } } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { free(s); return FALSE; } } *bus = atoi(p); if (d != NULL && *d != 0) *bus += atoi(d) << 8; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { free(s); return FALSE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { free(s); return FALSE; } } *device = atoi(p); *func = 0; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { free(s); return TRUE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { free(s); return FALSE; } } *func = atoi(p); free(s); return TRUE; } /* * Compare a BUS ID string with a PCI bus id. Return TRUE if they match. */ Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func) { int ibus, idevice, ifunc; if (xf86ParsePciBusString(busID, &ibus, &idevice, &ifunc)) { return bus == ibus && device == idevice && func == ifunc; } else { return FALSE; } } /* * xf86IsPrimaryPci() -- return TRUE if primary device * is PCI and bus, dev and func numbers match. */ Bool xf86IsPrimaryPci(struct pci_device *pPci) { /* Add max. 1 screen for the IgnorePrimary fallback path */ if (xf86ProbeIgnorePrimary && xf86NumScreens == 0) return TRUE; if (primaryBus.type == BUS_PCI) return pPci == primaryBus.id.pci; #ifdef XSERVER_PLATFORM_BUS if (primaryBus.type == BUS_PLATFORM) if (primaryBus.id.plat->pdev) if (MATCH_PCI_DEVICES(primaryBus.id.plat->pdev, pPci)) return TRUE; #endif return FALSE; } /* * xf86GetPciInfoForEntity() -- Get the pciVideoRec of entity. */ struct pci_device * xf86GetPciInfoForEntity(int entityIndex) { EntityPtr p; if (entityIndex >= xf86NumEntities) return NULL; p = xf86Entities[entityIndex]; switch (p->bus.type) { case BUS_PCI: return p->bus.id.pci; case BUS_PLATFORM: return p->bus.id.plat->pdev; default: break; } return NULL; } /* * xf86CheckPciMemBase() checks that the memory base value matches one of the * PCI base address register values for the given PCI device. */ Bool xf86CheckPciMemBase(struct pci_device *pPci, memType base) { int i; for (i = 0; i < 6; i++) if (base == pPci->regions[i].base_addr) return TRUE; return FALSE; } /* * Check if the slot requested is free. If it is already in use, return FALSE. */ Bool xf86CheckPciSlot(const struct pci_device *d) { int i; for (i = 0; i < xf86NumEntities; i++) { const EntityPtr p = xf86Entities[i]; if ((p->bus.type == BUS_PCI) && (p->bus.id.pci == d)) { return FALSE; } #ifdef XSERVER_PLATFORM_BUS if ((p->bus.type == BUS_PLATFORM) && (p->bus.id.plat->pdev)) { struct pci_device *ud = p->bus.id.plat->pdev; if (MATCH_PCI_DEVICES(ud, d)) return FALSE; } #endif } return TRUE; } #define END_OF_MATCHES(m) \ (((m).vendor_id == 0) && ((m).device_id == 0) && ((m).subvendor_id == 0)) Bool xf86PciAddMatchingDev(DriverPtr drvp) { const struct pci_id_match *const devices = drvp->supported_devices; int j; struct pci_device *pPci; struct pci_device_iterator *iter; int numFound = 0; iter = pci_id_match_iterator_create(NULL); while ((pPci = pci_device_next(iter)) != NULL) { /* Determine if this device is supported by the driver. If it is, * add it to the list of devices to configure. */ for (j = 0; !END_OF_MATCHES(devices[j]); j++) { if (PCI_ID_COMPARE(devices[j].vendor_id, pPci->vendor_id) && PCI_ID_COMPARE(devices[j].device_id, pPci->device_id) && ((devices[j].device_class_mask & pPci->device_class) == devices[j].device_class)) { if (xf86CheckPciSlot(pPci)) { GDevPtr pGDev = xf86AddBusDeviceToConfigure(drvp->driverName, BUS_PCI, pPci, -1); if (pGDev != NULL) { /* After configure pass 1, chipID and chipRev are * treated as over-rides, so clobber them here. */ pGDev->chipID = -1; pGDev->chipRev = -1; } numFound++; } break; } } } pci_iterator_destroy(iter); return numFound != 0; } Bool xf86PciProbeDev(DriverPtr drvp) { int i, j; struct pci_device *pPci; Bool foundScreen = FALSE; const struct pci_id_match *const devices = drvp->supported_devices; GDevPtr *devList; const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList); for (i = 0; i < numDevs; i++) { struct pci_device_iterator *iter; unsigned device_id; /* Find the pciVideoRec associated with this device section. */ iter = pci_id_match_iterator_create(NULL); while ((pPci = pci_device_next(iter)) != NULL) { if (devList[i]->busID && *devList[i]->busID) { if (xf86ComparePciBusString(devList[i]->busID, ((pPci->domain << 8) | pPci->bus), pPci->dev, pPci->func)) { break; } } else if (xf86IsPrimaryPci(pPci)) { break; } } pci_iterator_destroy(iter); if (pPci == NULL) { continue; } device_id = (devList[i]->chipID > 0) ? devList[i]->chipID : pPci->device_id; /* Once the pciVideoRec is found, determine if the device is supported * by the driver. If it is, probe it! */ for (j = 0; !END_OF_MATCHES(devices[j]); j++) { if (PCI_ID_COMPARE(devices[j].vendor_id, pPci->vendor_id) && PCI_ID_COMPARE(devices[j].device_id, device_id) && ((devices[j].device_class_mask & pPci->device_class) == devices[j].device_class)) { int entry; /* Allow the same entity to be used more than once for * devices with multiple screens per entity. This assumes * implicitly that there will be a screen == 0 instance. * * FIXME Need to make sure that two different drivers don't * FIXME claim the same screen > 0 instance. */ if ((devList[i]->screen == 0) && !xf86CheckPciSlot(pPci)) continue; DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", drvp->driverName, pPci->bus, pPci->dev, pPci->func); /* Allocate an entry in the lists to be returned */ entry = xf86ClaimPciSlot(pPci, drvp, device_id, devList[i], devList[i]->active); if ((entry == -1) && (devList[i]->screen > 0)) { unsigned k; for (k = 0; k < xf86NumEntities; k++) { EntityPtr pEnt = xf86Entities[k]; if (pEnt->bus.type != BUS_PCI) continue; if (pEnt->bus.id.pci == pPci) { entry = k; xf86AddDevToEntity(k, devList[i]); break; } } } if (entry != -1) { if ((*drvp->PciProbe) (drvp, entry, pPci, devices[j].match_data)) { foundScreen = TRUE; } else xf86UnclaimPciSlot(pPci, devList[i]); } break; } } } free(devList); return foundScreen; } void xf86PciIsolateDevice(const char *argument) { int bus, device, func; if (sscanf(argument, "PCI:%d:%d:%d", &bus, &device, &func) == 3) { xf86IsolateDevice.domain = PCI_DOM_FROM_BUS(bus); xf86IsolateDevice.bus = PCI_BUS_NO_DOMAIN(bus); xf86IsolateDevice.dev = device; xf86IsolateDevice.func = func; } else FatalError("Invalid isolated device specification\n"); } static Bool pciDeviceHasBars(struct pci_device *pci) { int i; for (i = 0; i < 6; i++) if (pci->regions[i].size) return TRUE; if (pci->rom_size) return TRUE; return FALSE; } struct Inst { struct pci_device *pci; GDevPtr dev; Bool foundHW; /* PCIid in list of supported chipsets */ Bool claimed; /* BusID matches with a device section */ int chip; int screen; }; /** * Find set of unclaimed devices matching a given vendor ID. * * Used by drivers to find as yet unclaimed devices matching the specified * vendor ID. * * \param driverName Name of the driver. This is used to find Device * sections in the config file. * \param vendorID PCI vendor ID of associated devices. If zero, then * the true vendor ID must be encoded in the \c PCIid * fields of the \c PCIchipsets entries. * \param chipsets Symbol table used to associate chipset names with * PCI IDs. * \param devList List of Device sections parsed from the config file. * \param numDevs Number of entries in \c devList. * \param drvp Pointer the driver's control structure. * \param foundEntities Returned list of entity indices associated with the * driver. * * \returns * The number of elements in returned in \c foundEntities on success or zero * on failure. * * \todo * This function does a bit more than short description says. Fill in some * more of the details of its operation. * * \todo * The \c driverName parameter is redundant. It is the same as * \c DriverRec::driverName. In a future version of this function, remove * that parameter. */ int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets * PCIchipsets, GDevPtr * devList, int numDevs, DriverPtr drvp, int **foundEntities) { int i, j; struct pci_device *pPci; struct pci_device_iterator *iter; struct Inst *instances = NULL; int numClaimedInstances = 0; int allocatedInstances = 0; int numFound = 0; SymTabRec *c; PciChipsets *id; int *retEntities = NULL; *foundEntities = NULL; /* Each PCI device will contribute at least one entry. Each device * section can contribute at most one entry. The sum of the two is * guaranteed to be larger than the maximum possible number of entries. * Do this calculation and memory allocation once now to eliminate the * need for realloc calls inside the loop. */ if (!(xf86DoConfigure && xf86DoConfigurePass1)) { unsigned max_entries = numDevs; iter = pci_slot_match_iterator_create(NULL); while ((pPci = pci_device_next(iter)) != NULL) { max_entries++; } pci_iterator_destroy(iter); instances = xnfallocarray(max_entries, sizeof(struct Inst)); } iter = pci_slot_match_iterator_create(NULL); while ((pPci = pci_device_next(iter)) != NULL) { unsigned device_class = pPci->device_class; Bool foundVendor = FALSE; /* Convert the pre-PCI 2.0 device class for a VGA adapter to the * 2.0 version of the same class. */ if (device_class == 0x00000101) { device_class = 0x00030000; } /* Find PCI devices that match the given vendor ID. The vendor ID is * either specified explicitly as a parameter to the function or * implicitly encoded in the high bits of id->PCIid. * * The first device with a matching vendor is recorded, even if the * device ID doesn't match. This is done because the Device section * in the xorg.conf file can over-ride the device ID. A matching PCI * ID might not be found now, but after the device ID over-ride is * applied there /might/ be a match. */ for (id = PCIchipsets; id->PCIid != -1; id++) { const unsigned vendor_id = ((id->PCIid & 0xFFFF0000) >> 16) | vendorID; const unsigned device_id = (id->PCIid & 0x0000FFFF); const unsigned match_class = 0x00030000 | id->PCIid; if ((vendor_id == pPci->vendor_id) || ((vendorID == PCI_VENDOR_GENERIC) && (match_class == device_class))) { if (!foundVendor && (instances != NULL)) { ++allocatedInstances; instances[allocatedInstances - 1].pci = pPci; instances[allocatedInstances - 1].dev = NULL; instances[allocatedInstances - 1].claimed = FALSE; instances[allocatedInstances - 1].foundHW = FALSE; instances[allocatedInstances - 1].screen = 0; } foundVendor = TRUE; if ((device_id == pPci->device_id) || ((vendorID == PCI_VENDOR_GENERIC) && (match_class == device_class))) { if (instances != NULL) { instances[allocatedInstances - 1].foundHW = TRUE; instances[allocatedInstances - 1].chip = id->numChipset; } if (xf86DoConfigure && xf86DoConfigurePass1) { if (xf86CheckPciSlot(pPci)) { GDevPtr pGDev = xf86AddBusDeviceToConfigure(drvp->driverName, BUS_PCI, pPci, -1); if (pGDev) { /* After configure pass 1, chipID and chipRev * are treated as over-rides, so clobber them * here. */ pGDev->chipID = -1; pGDev->chipRev = -1; } numFound++; } } else { numFound++; } break; } } } } pci_iterator_destroy(iter); /* In "probe only" or "configure" mode (signaled by instances being NULL), * our work is done. Return the number of detected devices. */ if (instances == NULL) { return numFound; } /* * This may be debatable, but if no PCI devices with a matching vendor * type is found, return zero now. It is probably not desirable to * allow the config file to override this. */ if (allocatedInstances <= 0) { free(instances); return 0; } DebugF("%s instances found: %d\n", driverName, allocatedInstances); /* * Check for devices that need duplicated instances. This is required * when there is more than one screen per entity. * * XXX This currently doesn't work for cases where the BusID isn't * specified explicitly in the config file. */ for (j = 0; j < numDevs; j++) { if (devList[j]->screen > 0 && devList[j]->busID && *devList[j]->busID) { for (i = 0; i < allocatedInstances; i++) { pPci = instances[i].pci; if (xf86ComparePciBusString(devList[j]->busID, PCI_MAKE_BUS(pPci->domain, pPci->bus), pPci->dev, pPci->func)) { allocatedInstances++; instances[allocatedInstances - 1] = instances[i]; instances[allocatedInstances - 1].screen = devList[j]->screen; numFound++; break; } } } } for (i = 0; i < allocatedInstances; i++) { GDevPtr dev = NULL; GDevPtr devBus = NULL; pPci = instances[i].pci; for (j = 0; j < numDevs; j++) { if (devList[j]->busID && *devList[j]->busID) { if (xf86ComparePciBusString(devList[j]->busID, PCI_MAKE_BUS(pPci->domain, pPci->bus), pPci->dev, pPci->func) && devList[j]->screen == instances[i].screen) { if (devBus) xf86MsgVerb(X_WARNING, 0, "%s: More than one matching Device section for " "instances\n\t(BusID: %s) found: %s\n", driverName, devList[j]->busID, devList[j]->identifier); else devBus = devList[j]; } } else { /* * if device section without BusID is found * only assign to it to the primary device. */ if (xf86IsPrimaryPci(pPci)) { xf86Msg(X_PROBED, "Assigning device section with no busID" " to primary device\n"); if (dev || devBus) xf86MsgVerb(X_WARNING, 0, "%s: More than one matching Device section " "found: %s\n", driverName, devList[j]->identifier); else dev = devList[j]; } } } if (devBus) dev = devBus; /* busID preferred */ if (!dev) { if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) { xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " "for instance (BusID PCI:%u@%u:%u:%u) found\n", driverName, pPci->bus, pPci->domain, pPci->dev, pPci->func); } } else { numClaimedInstances++; instances[i].claimed = TRUE; instances[i].dev = dev; } } DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Now check that a chipset or chipID override in the device section * is valid. Chipset has precedence over chipID. * If chipset is not valid ignore BusSlot completely. */ for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { MessageType from = X_PROBED; if (!instances[i].claimed) { continue; } if (instances[i].dev->chipset) { for (c = chipsets; c->token >= 0; c++) { if (xf86NameCmp(c->name, instances[i].dev->chipset) == 0) break; } if (c->token == -1) { instances[i].claimed = FALSE; numClaimedInstances--; xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " "section \"%s\" isn't valid for this driver\n", driverName, instances[i].dev->chipset, instances[i].dev->identifier); } else { instances[i].chip = c->token; for (id = PCIchipsets; id->numChipset >= 0; id++) { if (id->numChipset == instances[i].chip) break; } if (id->numChipset >= 0) { xf86Msg(X_CONFIG, "Chipset override: %s\n", instances[i].dev->chipset); from = X_CONFIG; } else { instances[i].claimed = FALSE; numClaimedInstances--; xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " "section \"%s\" isn't a valid PCI chipset\n", driverName, instances[i].dev->chipset, instances[i].dev->identifier); } } } else if (instances[i].dev->chipID > 0) { for (id = PCIchipsets; id->numChipset >= 0; id++) { if (id->PCIid == instances[i].dev->chipID) break; } if (id->numChipset == -1) { instances[i].claimed = FALSE; numClaimedInstances--; xf86MsgVerb(X_WARNING, 0, "%s: ChipID 0x%04X in Device " "section \"%s\" isn't valid for this driver\n", driverName, instances[i].dev->chipID, instances[i].dev->identifier); } else { instances[i].chip = id->numChipset; xf86Msg(X_CONFIG, "ChipID override: 0x%04X\n", instances[i].dev->chipID); from = X_CONFIG; } } else if (!instances[i].foundHW) { /* * This means that there was no override and the PCI chipType * doesn't match one that is supported */ instances[i].claimed = FALSE; numClaimedInstances--; } if (instances[i].claimed == TRUE) { for (c = chipsets; c->token >= 0; c++) { if (c->token == instances[i].chip) break; } xf86Msg(from, "Chipset %s found\n", c->name); } } /* * Of the claimed instances, check that another driver hasn't already * claimed its slot. */ numFound = 0; for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { if (!instances[i].claimed) continue; pPci = instances[i].pci; /* * Allow the same entity to be used more than once for devices with * multiple screens per entity. This assumes implicitly that there * will be a screen == 0 instance. * * XXX Need to make sure that two different drivers don't claim * the same screen > 0 instance. */ if (instances[i].screen == 0 && !xf86CheckPciSlot(pPci)) continue; DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", driverName, pPci->bus, pPci->dev, pPci->func); /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfreallocarray(retEntities, numFound, sizeof(int)); retEntities[numFound - 1] = xf86ClaimPciSlot(pPci, drvp, instances[i].chip, instances[i].dev, instances[i].dev->active); if (retEntities[numFound - 1] == -1 && instances[i].screen > 0) { for (j = 0; j < xf86NumEntities; j++) { EntityPtr pEnt = xf86Entities[j]; if (pEnt->bus.type != BUS_PCI) continue; if (pEnt->bus.id.pci == pPci) { retEntities[numFound - 1] = j; xf86AddDevToEntity(j, instances[i].dev); break; } } } } free(instances); if (numFound > 0) { *foundEntities = retEntities; } return numFound; } /* * xf86ConfigPciEntityInactive() -- This function can be used * to configure an inactive entity as well as to reconfigure an * previously active entity inactive. If the entity has been * assigned to a screen before it will be removed. If p_chip is * non-NULL all static resources listed there will be registered. */ static void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip, EntityProc init, EntityProc enter, EntityProc leave, void *private) { ScrnInfoPtr pScrn; if ((pScrn = xf86FindScreenForEntity(pEnt->index))) xf86RemoveEntityFromScreen(pScrn, pEnt->index); } ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, PciChipsets * p_chip, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, void *private) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); if (dummy || init || enter || leave) FatalError("Legacy entity access functions are unsupported\n"); if (!pEnt) return pScrn; if (!(pEnt->location.type == BUS_PCI) || !xf86GetPciInfoForEntity(entityIndex)) { free(pEnt); return pScrn; } if (!pEnt->active) { xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, leave, private); free(pEnt); return pScrn; } if (!pScrn) pScrn = xf86AllocateScreen(pEnt->driver, scrnFlag); if (xf86IsEntitySharable(entityIndex)) { xf86SetEntityShared(entityIndex); } xf86AddEntityToScreen(pScrn, entityIndex); if (xf86IsEntityShared(entityIndex)) { return pScrn; } free(pEnt); return pScrn; } void xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md) { int i; /* Add more entries here if we ever return more than 4 drivers for any device */ const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; switch (dev->vendor_id) { /* AMD Geode LX */ case 0x1022: if (dev->device_id == 0x2081) driverList[0] = "geode"; break; /* older Geode products acquired by AMD still carry an NSC vendor_id */ case 0x100b: if (dev->device_id == 0x0030) { /* NSC Geode GX2 specifically */ driverList[0] = "geode"; /* GX2 support started its life in the NSC tree and was later forked by AMD for GEODE so we keep it as a backup */ driverList[1] = "nsc"; } else /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ driverList[0] = "nsc"; break; /* Cyrix Geode GX1 */ case 0x1078: if (dev->device_id == 0x0104) driverList[0] = "cyrix"; break; case 0x1142: driverList[0] = "apm"; break; case 0xedd8: driverList[0] = "ark"; break; case 0x1a03: driverList[0] = "ast"; break; case 0x1002: driverList[0] = "ati"; break; case 0x102c: driverList[0] = "chips"; break; case 0x1013: driverList[0] = "cirrus"; break; case 0x3d3d: driverList[0] = "glint"; break; case 0x105d: driverList[0] = "i128"; break; case 0x8086: switch (dev->device_id) { /* Intel i740 */ case 0x00d1: case 0x7800: driverList[0] = "i740"; break; /* GMA500/Poulsbo */ case 0x8108: case 0x8109: /* Try psb driver on Poulsbo - if available */ driverList[0] = "psb"; driverList[1] = "psb_drv"; break; /* GMA600/Oaktrail */ case 0x4100: case 0x4101: case 0x4102: case 0x4103: case 0x4104: case 0x4105: case 0x4106: case 0x4107: /* Atom E620/Oaktrail */ case 0x4108: /* Medfield */ case 0x0130: case 0x0131: case 0x0132: case 0x0133: case 0x0134: case 0x0135: case 0x0136: case 0x0137: /* GMA 3600/CDV */ case 0x0be0: case 0x0be1: case 0x0be2: case 0x0be3: case 0x0be4: case 0x0be5: case 0x0be6: case 0x0be7: case 0x0be8: case 0x0be9: case 0x0bea: case 0x0beb: case 0x0bec: case 0x0bed: case 0x0bee: case 0x0bef: /* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */ break; default: driverList[0] = "intel"; break; } break; case 0x102b: driverList[0] = "mga"; break; case 0x10c8: driverList[0] = "neomagic"; break; case 0x10de: case 0x12d2: { int idx = 0; #if defined(__linux__) || defined(__NetBSD__) driverList[idx++] = "nouveau"; #endif driverList[idx++] = "nv"; break; } case 0x1106: driverList[0] = "openchrome"; break; case 0x1b36: driverList[0] = "qxl"; break; case 0x1163: driverList[0] = "rendition"; break; case 0x5333: switch (dev->device_id) { case 0x88d0: case 0x88d1: case 0x88f0: case 0x8811: case 0x8812: case 0x8814: case 0x8901: driverList[0] = "s3"; break; case 0x5631: case 0x883d: case 0x8a01: case 0x8a10: case 0x8c01: case 0x8c03: case 0x8904: case 0x8a13: driverList[0] = "s3virge"; break; default: driverList[0] = "savage"; break; } break; case 0x1039: driverList[0] = "sis"; break; case 0x126f: driverList[0] = "siliconmotion"; break; case 0x121a: if (dev->device_id < 0x0003) driverList[0] = "voodoo"; else driverList[0] = "tdfx"; break; case 0x1011: driverList[0] = "tga"; break; case 0x1023: driverList[0] = "trident"; break; case 0x100c: driverList[0] = "tseng"; break; case 0x80ee: driverList[0] = "vboxvideo"; break; case 0x15ad: driverList[0] = "vmware"; break; case 0x18ca: if (dev->device_id == 0x47) driverList[0] = "xgixp"; else driverList[0] = "xgi"; break; default: break; } for (i = 0; driverList[i] != NULL; i++) { xf86AddMatchedDriver(md, driverList[i]); } } #ifdef __linux__ static int xchomp(char *line) { size_t len = 0; if (!line) { return 1; } len = strlen(line); if (line[len - 1] == '\n' && len > 0) { line[len - 1] = '\0'; } return 0; } /* This function is used to provide a workaround for binary drivers that * don't export their PCI ID's properly. If distros don't end up using this * feature it can and should be removed because the symbol-based resolution * scheme should be the primary one */ void xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, XF86MatchedDrivers *md) { DIR *idsdir; FILE *fp; struct dirent *direntry; char *line = NULL, *tmpMatch; size_t len; ssize_t read; char path_name[512], vendor_str[5], chip_str[5]; uint16_t vendor, chip; int j; idsdir = opendir(PCI_TXT_IDS_PATH); if (!idsdir) return; xf86Msg(X_INFO, "Scanning %s directory for additional PCI ID's supported by the drivers\n", PCI_TXT_IDS_PATH); direntry = readdir(idsdir); /* Read the directory */ while (direntry) { if (direntry->d_name[0] == '.') { direntry = readdir(idsdir); continue; } len = strlen(direntry->d_name); /* A tiny bit of sanity checking. We should probably do better */ if (strncmp(&(direntry->d_name[len - 4]), ".ids", 4) == 0) { /* We need the full path name to open the file */ snprintf(path_name, sizeof(path_name), "%s/%s", PCI_TXT_IDS_PATH, direntry->d_name); fp = fopen(path_name, "r"); if (fp == NULL) { xf86Msg(X_ERROR, "Could not open %s for reading. Exiting.\n", path_name); goto end; } /* Read the file */ #ifdef __GLIBC__ while ((read = getline(&line, &len, fp)) != -1) { #else while ((line = fgetln(fp, &len)) != (char *) NULL) { #endif /* __GLIBC __ */ xchomp(line); if (isdigit(line[0])) { strlcpy(vendor_str, line, sizeof(vendor_str)); vendor = (int) strtol(vendor_str, NULL, 16); if ((strlen(&line[4])) == 0) { chip_str[0] = '\0'; chip = -1; } else { /* Handle trailing whitespace */ if (isspace(line[4])) { chip_str[0] = '\0'; chip = -1; } else { /* Ok, it's a real ID */ strlcpy(chip_str, &line[4], sizeof(chip_str)); chip = (int) strtol(chip_str, NULL, 16); } } if (vendor == match_vendor && chip == match_chip) { tmpMatch = (char *) malloc(sizeof(char) * strlen(direntry->d_name) - 3); if (!tmpMatch) { xf86Msg(X_ERROR, "Could not allocate space for the module name. Exiting.\n"); goto end; } /* hack off the .ids suffix. This should guard * against other problems, but it will end up * taking off anything after the first '.' */ for (j = 0; j < (strlen(direntry->d_name) - 3); j++) { if (direntry->d_name[j] == '.') { tmpMatch[j] = '\0'; break; } else { tmpMatch[j] = direntry->d_name[j]; } } xf86AddMatchedDriver(md, tmpMatch); xf86Msg(X_INFO, "Matched %s from file name %s\n", tmpMatch, direntry->d_name); free(tmpMatch); } } else { /* TODO Handle driver overrides here */ } } fclose(fp); } direntry = readdir(idsdir); } end: free(line); closedir(idsdir); } #endif /* __linux__ */ void xf86PciMatchDriver(XF86MatchedDrivers *md) { struct pci_device *info = NULL; struct pci_device_iterator *iter; /* Find the primary device, and get some information about it. */ iter = pci_slot_match_iterator_create(NULL); while ((info = pci_device_next(iter)) != NULL) { if (xf86IsPrimaryPci(info)) { break; } } pci_iterator_destroy(iter); #ifdef __linux__ if (info) xf86MatchDriverFromFiles(info->vendor_id, info->device_id, md); #endif if (info != NULL) { xf86VideoPtrToDriverList(info, md); } } Bool xf86PciConfigure(void *busData, struct pci_device *pDev) { struct pci_device *pVideo = NULL; pVideo = (struct pci_device *) busData; if (pDev && (pDev->domain == pVideo->domain) && (pDev->bus == pVideo->bus) && (pDev->dev == pVideo->dev) && (pDev->func == pVideo->func)) return 0; return 1; } void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, GDevRec * GDev, int *chipset) { char busnum[8]; char *tmp; pVideo = (struct pci_device *) busData; snprintf(busnum, sizeof(busnum), "%d", pVideo->bus); XNFasprintf(&tmp, "PCI:%s:%d:%d", busnum, pVideo->dev, pVideo->func); GDev->busID = tmp; GDev->chipID = pVideo->device_id; GDev->chipRev = pVideo->revision; if (*chipset < 0) *chipset = (pVideo->vendor_id << 16) | pVideo->device_id; } char * DRICreatePCIBusID(const struct pci_device *dev) { char *busID; if (asprintf(&busID, "pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func) == -1) return NULL; return busID; } xorg-server-21.1.16/hw/xfree86/common/xf86VGAarbiter.c0000644000175000017500000006552714757411105015715 /* * This code was stolen from RAC and adapted to control the legacy vga * interface. * * * Copyright (c) 2007 Paulo R. Zanoni, Tiago Vignatti * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * 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 AUTHORS OR COPYRIGHT * HOLDERS 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. * */ #include "xorg-config.h" #include "xf86VGAarbiter.h" #include "xf86VGAarbiterPriv.h" #include "xf86Bus.h" #include "xf86Priv.h" #include "pciaccess.h" static GCFuncs VGAarbiterGCFuncs = { VGAarbiterValidateGC, VGAarbiterChangeGC, VGAarbiterCopyGC, VGAarbiterDestroyGC, VGAarbiterChangeClip, VGAarbiterDestroyClip, VGAarbiterCopyClip }; static GCOps VGAarbiterGCOps = { VGAarbiterFillSpans, VGAarbiterSetSpans, VGAarbiterPutImage, VGAarbiterCopyArea, VGAarbiterCopyPlane, VGAarbiterPolyPoint, VGAarbiterPolylines, VGAarbiterPolySegment, VGAarbiterPolyRectangle, VGAarbiterPolyArc, VGAarbiterFillPolygon, VGAarbiterPolyFillRect, VGAarbiterPolyFillArc, VGAarbiterPolyText8, VGAarbiterPolyText16, VGAarbiterImageText8, VGAarbiterImageText16, VGAarbiterImageGlyphBlt, VGAarbiterPolyGlyphBlt, VGAarbiterPushPixels, }; static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = { VGAarbiterSpriteRealizeCursor, VGAarbiterSpriteUnrealizeCursor, VGAarbiterSpriteSetCursor, VGAarbiterSpriteMoveCursor, VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup }; static DevPrivateKeyRec VGAarbiterScreenKeyRec; #define VGAarbiterScreenKey (&VGAarbiterScreenKeyRec) static DevPrivateKeyRec VGAarbiterGCKeyRec; #define VGAarbiterGCKey (&VGAarbiterGCKeyRec) static int vga_no_arb = 0; void xf86VGAarbiterInit(void) { if (pci_device_vgaarb_init() != 0) { vga_no_arb = 1; xf86Msg(X_WARNING, "VGA arbiter: cannot open kernel arbiter, no multi-card support\n"); } } void xf86VGAarbiterFini(void) { if (vga_no_arb) return; pci_device_vgaarb_fini(); } void xf86VGAarbiterLock(ScrnInfoPtr pScrn) { if (vga_no_arb) return; pci_device_vgaarb_set_target(pScrn->vgaDev); pci_device_vgaarb_lock(); } void xf86VGAarbiterUnlock(ScrnInfoPtr pScrn) { if (vga_no_arb) return; pci_device_vgaarb_unlock(); } Bool xf86VGAarbiterAllowDRI(ScreenPtr pScreen) { int vga_count; int rsrc_decodes = 0; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (vga_no_arb) return TRUE; pci_device_vgaarb_get_info(pScrn->vgaDev, &vga_count, &rsrc_decodes); if (vga_count > 1) { if (rsrc_decodes) { return FALSE; } } return TRUE; } void xf86VGAarbiterScrnInit(ScrnInfoPtr pScrn) { struct pci_device *dev; EntityPtr pEnt; if (vga_no_arb) return; pEnt = xf86Entities[pScrn->entityList[0]]; if (pEnt->bus.type != BUS_PCI) return; dev = pEnt->bus.id.pci; pScrn->vgaDev = dev; } void xf86VGAarbiterDeviceDecodes(ScrnInfoPtr pScrn, int rsrc) { if (vga_no_arb) return; pci_device_vgaarb_set_target(pScrn->vgaDev); pci_device_vgaarb_decodes(rsrc); } Bool xf86VGAarbiterWrapFunctions(void) { ScrnInfoPtr pScrn; VGAarbiterScreenPtr pScreenPriv; miPointerScreenPtr PointPriv; PictureScreenPtr ps; ScreenPtr pScreen; int vga_count, i; if (vga_no_arb) return FALSE; /* * we need to wrap the arbiter if we have more than * one VGA card - hotplug cries. */ pci_device_vgaarb_get_info(NULL, &vga_count, NULL); if (vga_count < 2 || !xf86Screens) return FALSE; xf86Msg(X_INFO, "Found %d VGA devices: arbiter wrapping enabled\n", vga_count); for (i = 0; i < xf86NumScreens; i++) { pScreen = xf86Screens[i]->pScreen; ps = GetPictureScreenIfSet(pScreen); pScrn = xf86ScreenToScrn(pScreen); PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); if (!dixRegisterPrivateKey (&VGAarbiterGCKeyRec, PRIVATE_GC, sizeof(VGAarbiterGCRec))) return FALSE; if (!dixRegisterPrivateKey(&VGAarbiterScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); WRAP_SCREEN(CloseScreen, VGAarbiterCloseScreen); WRAP_SCREEN(SaveScreen, VGAarbiterSaveScreen); WRAP_SCREEN(WakeupHandler, VGAarbiterWakeupHandler); WRAP_SCREEN(BlockHandler, VGAarbiterBlockHandler); WRAP_SCREEN(CreateGC, VGAarbiterCreateGC); WRAP_SCREEN(GetImage, VGAarbiterGetImage); WRAP_SCREEN(GetSpans, VGAarbiterGetSpans); WRAP_SCREEN(SourceValidate, VGAarbiterSourceValidate); WRAP_SCREEN(CopyWindow, VGAarbiterCopyWindow); WRAP_SCREEN(ClearToBackground, VGAarbiterClearToBackground); WRAP_SCREEN(CreatePixmap, VGAarbiterCreatePixmap); WRAP_SCREEN(StoreColors, VGAarbiterStoreColors); WRAP_SCREEN(DisplayCursor, VGAarbiterDisplayCursor); WRAP_SCREEN(RealizeCursor, VGAarbiterRealizeCursor); WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); WRAP_PICT(Composite, VGAarbiterComposite); WRAP_PICT(Glyphs, VGAarbiterGlyphs); WRAP_PICT(CompositeRects, VGAarbiterCompositeRects); WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); WRAP_SCREEN_INFO(LeaveVT, VGAarbiterLeaveVT); WRAP_SCREEN_INFO(FreeScreen, VGAarbiterFreeScreen); WRAP_SPRITE; } return TRUE; } /* Screen funcs */ static Bool VGAarbiterCloseScreen(ScreenPtr pScreen) { Bool val; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); miPointerScreenPtr PointPriv = (miPointerScreenPtr) dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); UNWRAP_SCREEN(CreateGC); UNWRAP_SCREEN(CloseScreen); UNWRAP_SCREEN(GetImage); UNWRAP_SCREEN(GetSpans); UNWRAP_SCREEN(SourceValidate); UNWRAP_SCREEN(CopyWindow); UNWRAP_SCREEN(ClearToBackground); UNWRAP_SCREEN(SaveScreen); UNWRAP_SCREEN(StoreColors); UNWRAP_SCREEN(DisplayCursor); UNWRAP_SCREEN(RealizeCursor); UNWRAP_SCREEN(UnrealizeCursor); UNWRAP_SCREEN(RecolorCursor); UNWRAP_SCREEN(SetCursorPosition); UNWRAP_PICT(Composite); UNWRAP_PICT(Glyphs); UNWRAP_PICT(CompositeRects); UNWRAP_SCREEN_INFO(AdjustFrame); UNWRAP_SCREEN_INFO(SwitchMode); UNWRAP_SCREEN_INFO(EnterVT); UNWRAP_SCREEN_INFO(LeaveVT); UNWRAP_SCREEN_INFO(FreeScreen); UNWRAP_SPRITE; free((void *) pScreenPriv); xf86VGAarbiterLock(xf86ScreenToScrn(pScreen)); val = (*pScreen->CloseScreen) (pScreen); xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen)); return val; } static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout) { SCREEN_PROLOG(BlockHandler); VGAGet(pScreen); pScreen->BlockHandler(pScreen, pTimeout); VGAPut(); SCREEN_EPILOG(BlockHandler, VGAarbiterBlockHandler); } static void VGAarbiterWakeupHandler(ScreenPtr pScreen, int result) { SCREEN_PROLOG(WakeupHandler); VGAGet(pScreen); pScreen->WakeupHandler(pScreen, result); VGAPut(); SCREEN_EPILOG(WakeupHandler, VGAarbiterWakeupHandler); } static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, unsigned int format, unsigned long planemask, char *pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; SCREEN_PROLOG(GetImage); VGAGet(pScreen); (*pScreen->GetImage) (pDrawable, sx, sy, w, h, format, planemask, pdstLine); VGAPut(); SCREEN_EPILOG(GetImage, VGAarbiterGetImage); } static void VGAarbiterGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart) { ScreenPtr pScreen = pDrawable->pScreen; SCREEN_PROLOG(GetSpans); VGAGet(pScreen); (*pScreen->GetSpans) (pDrawable, wMax, ppt, pwidth, nspans, pdstStart); VGAPut(); SCREEN_EPILOG(GetSpans, VGAarbiterGetSpans); } static void VGAarbiterSourceValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; SCREEN_PROLOG(SourceValidate); VGAGet(pScreen); (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode); VGAPut(); SCREEN_EPILOG(SourceValidate, VGAarbiterSourceValidate); } static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_PROLOG(CopyWindow); VGAGet(pScreen); (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); VGAPut(); SCREEN_EPILOG(CopyWindow, VGAarbiterCopyWindow); } static void VGAarbiterClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures) { ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_PROLOG(ClearToBackground); VGAGet(pScreen); (*pScreen->ClearToBackground) (pWin, x, y, w, h, generateExposures); VGAPut(); SCREEN_EPILOG(ClearToBackground, VGAarbiterClearToBackground); } static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) { PixmapPtr pPix; SCREEN_PROLOG(CreatePixmap); VGAGet(pScreen); pPix = (*pScreen->CreatePixmap) (pScreen, w, h, depth, usage_hint); VGAPut(); SCREEN_EPILOG(CreatePixmap, VGAarbiterCreatePixmap); return pPix; } static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank) { Bool val; SCREEN_PROLOG(SaveScreen); VGAGet(pScreen); val = (*pScreen->SaveScreen) (pScreen, unblank); VGAPut(); SCREEN_EPILOG(SaveScreen, VGAarbiterSaveScreen); return val; } static void VGAarbiterStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs) { ScreenPtr pScreen = pmap->pScreen; SCREEN_PROLOG(StoreColors); VGAGet(pScreen); (*pScreen->StoreColors) (pmap, ndef, pdefs); VGAPut(); SCREEN_EPILOG(StoreColors, VGAarbiterStoreColors); } static void VGAarbiterRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) { SCREEN_PROLOG(RecolorCursor); VGAGet(pScreen); (*pScreen->RecolorCursor) (pDev, pScreen, pCurs, displayed); VGAPut(); SCREEN_EPILOG(RecolorCursor, VGAarbiterRecolorCursor); } static Bool VGAarbiterRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { Bool val; SCREEN_PROLOG(RealizeCursor); VGAGet(pScreen); val = (*pScreen->RealizeCursor) (pDev, pScreen, pCursor); VGAPut(); SCREEN_EPILOG(RealizeCursor, VGAarbiterRealizeCursor); return val; } static Bool VGAarbiterUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { Bool val; SCREEN_PROLOG(UnrealizeCursor); VGAGet(pScreen); val = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor); VGAPut(); SCREEN_EPILOG(UnrealizeCursor, VGAarbiterUnrealizeCursor); return val; } static Bool VGAarbiterDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { Bool val; SCREEN_PROLOG(DisplayCursor); VGAGet(pScreen); val = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); VGAPut(); SCREEN_EPILOG(DisplayCursor, VGAarbiterDisplayCursor); return val; } static Bool VGAarbiterSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent) { Bool val; SCREEN_PROLOG(SetCursorPosition); VGAGet(pScreen); val = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); VGAPut(); SCREEN_EPILOG(SetCursorPosition, VGAarbiterSetCursorPosition); return val; } static void VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(pScreen); (*pScreenPriv->AdjustFrame) (pScrn, x, y); VGAPut(); } static Bool VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { Bool val; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(pScreen); val = (*pScreenPriv->SwitchMode) (pScrn, mode); VGAPut(); return val; } static Bool VGAarbiterEnterVT(ScrnInfoPtr pScrn) { Bool val; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(pScreen); pScrn->EnterVT = pScreenPriv->EnterVT; val = (*pScrn->EnterVT) (pScrn); pScreenPriv->EnterVT = pScrn->EnterVT; pScrn->EnterVT = VGAarbiterEnterVT; VGAPut(); return val; } static void VGAarbiterLeaveVT(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(pScreen); pScrn->LeaveVT = pScreenPriv->LeaveVT; (*pScreenPriv->LeaveVT) (pScrn); pScreenPriv->LeaveVT = pScrn->LeaveVT; pScrn->LeaveVT = VGAarbiterLeaveVT; VGAPut(); } static void VGAarbiterFreeScreen(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr) dixLookupPrivate(&pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(pScreen); (*pScreenPriv->FreeScreen) (pScrn); VGAPut(); } static Bool VGAarbiterCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; VGAarbiterGCPtr pGCPriv = (VGAarbiterGCPtr) dixLookupPrivate(&pGC->devPrivates, VGAarbiterGCKey); Bool ret; SCREEN_PROLOG(CreateGC); ret = (*pScreen->CreateGC) (pGC); GC_WRAP(pGC); SCREEN_EPILOG(CreateGC, VGAarbiterCreateGC); return ret; } /* GC funcs */ static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw) { GC_UNWRAP(pGC); (*pGC->funcs->ValidateGC) (pGC, changes, pDraw); GC_WRAP(pGC); } static void VGAarbiterDestroyGC(GCPtr pGC) { GC_UNWRAP(pGC); (*pGC->funcs->DestroyGC) (pGC); GC_WRAP(pGC); } static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask) { GC_UNWRAP(pGC); (*pGC->funcs->ChangeGC) (pGC, mask); GC_WRAP(pGC); } static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { GC_UNWRAP(pGCDst); (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); GC_WRAP(pGCDst); } static void VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { GC_UNWRAP(pGC); (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); GC_WRAP(pGC); } static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { GC_UNWRAP(pgcDst); (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); GC_WRAP(pgcDst); } static void VGAarbiterDestroyClip(GCPtr pGC) { GC_UNWRAP(pGC); (*pGC->funcs->DestroyClip) (pGC); GC_WRAP(pGC); } /* GC Ops */ static void VGAarbiterFillSpans(DrawablePtr pDraw, GC * pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->FillSpans) (pDraw, pGC, nInit, pptInit, pwidthInit, fSorted); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->SetSpans) (pDraw, pGC, pcharsrc, ppt, pwidth, nspans, fSorted); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PutImage) (pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); VGAPut(); GC_WRAP(pGC); } static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC * pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { RegionPtr ret; ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); ret = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty); VGAPut(); GC_WRAP(pGC); return ret; } static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitPlane) { RegionPtr ret; ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); ret = (*pGC->ops->CopyPlane) (pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); VGAPut(); GC_WRAP(pGC); return ret; } static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt, xPoint * pptInit) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyPoint) (pDraw, pGC, mode, npt, pptInit); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->Polylines) (pDraw, pGC, mode, npt, pptInit); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment * pSeg) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolySegment) (pDraw, pGC, nseg, pSeg); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, xRectangle *pRectsInit) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyRectangle) (pDraw, pGC, nRectsInit, pRectsInit); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyArc) (pDraw, pGC, narcs, parcs); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, int mode, int count, DDXPointPtr ptsIn) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->FillPolygon) (pDraw, pGC, shape, mode, count, ptsIn); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nrectFill, xRectangle *prectInit) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyFillRect) (pDraw, pGC, nrectFill, prectInit); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, parcs); VGAPut(); GC_WRAP(pGC); } static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { int ret; ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); ret = (*pGC->ops->PolyText8) (pDraw, pGC, x, y, count, chars); VGAPut(); GC_WRAP(pGC); return ret; } static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { int ret; ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); ret = (*pGC->ops->PolyText16) (pDraw, pGC, x, y, count, chars); VGAPut(); GC_WRAP(pGC); return ret; } static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->ImageText8) (pDraw, pGC, x, y, count, chars); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->ImageText16) (pDraw, pGC, x, y, count, chars); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, xInit, yInit, nglyph, ppci, pglyphBase); VGAPut(); GC_WRAP(pGC); } static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg) { ScreenPtr pScreen = pGC->pScreen; GC_UNWRAP(pGC); VGAGet(pScreen); (*pGC->ops->PushPixels) (pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); VGAPut(); GC_WRAP(pGC); } /* miSpriteFuncs */ static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) { Bool val; SPRITE_PROLOG; VGAGet(pScreen); val = PointPriv->spriteFuncs->RealizeCursor(pDev, pScreen, pCur); VGAPut(); SPRITE_EPILOG; return val; } static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur) { Bool val; SPRITE_PROLOG; VGAGet(pScreen); val = PointPriv->spriteFuncs->UnrealizeCursor(pDev, pScreen, pCur); VGAPut(); SPRITE_EPILOG; return val; } static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y) { SPRITE_PROLOG; VGAGet(pScreen); PointPriv->spriteFuncs->SetCursor(pDev, pScreen, pCur, x, y); VGAPut(); SPRITE_EPILOG; } static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { SPRITE_PROLOG; VGAGet(pScreen); PointPriv->spriteFuncs->MoveCursor(pDev, pScreen, x, y); VGAPut(); SPRITE_EPILOG; } static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { Bool val; SPRITE_PROLOG; VGAGet(pScreen); val = PointPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen); VGAPut(); SPRITE_EPILOG; return val; } static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { SPRITE_PROLOG; VGAGet(pScreen); PointPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen); VGAPut(); SPRITE_EPILOG; } static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); PICTURE_PROLOGUE(Composite); VGAGet(pScreen); (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); VGAPut(); PICTURE_EPILOGUE(Composite, VGAarbiterComposite); } static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); PICTURE_PROLOGUE(Glyphs); VGAGet(pScreen); (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); VGAPut(); PICTURE_EPILOGUE(Glyphs, VGAarbiterGlyphs); } static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); PICTURE_PROLOGUE(CompositeRects); VGAGet(pScreen); (*ps->CompositeRects) (op, pDst, color, nRect, rects); VGAPut(); PICTURE_EPILOGUE(CompositeRects, VGAarbiterCompositeRects); } xorg-server-21.1.16/hw/xfree86/common/xf86VGAarbiterPriv.h0000644000175000017500000003151014757411105016544 /* * Copyright (c) 2009 Tiago Vignatti * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * 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 AUTHORS OR COPYRIGHT * HOLDERS 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. * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include #include "colormapst.h" #include "scrnintstr.h" #include "screenint.h" #include "gcstruct.h" #include "pixmapstr.h" #include "pixmap.h" #include "windowstr.h" #include "window.h" #include "xf86str.h" #include "mipointer.h" #include "mipointrst.h" #include "picturestr.h" #define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;} #define UNWRAP_SCREEN(x) pScreen->x = pScreenPriv->x #define SCREEN_PRIV() ((VGAarbiterScreenPtr) dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey)) #define SCREEN_PROLOG(x) (pScreen->x = SCREEN_PRIV()->x) #define SCREEN_EPILOG(x,y) do { \ SCREEN_PRIV()->x = pScreen->x; \ pScreen->x = y; \ } while (0) #define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\ ps->x = y;} #define UNWRAP_PICT(x) if (ps) {ps->x = pScreenPriv->x;} #define PICTURE_PROLOGUE(field) ps->field = \ ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ VGAarbiterScreenKey))->field #define PICTURE_EPILOGUE(field, wrap) ps->field = wrap #define WRAP_SCREEN_INFO(x,y) do {pScreenPriv->x = pScrn->x; pScrn->x = y;} while(0) #define UNWRAP_SCREEN_INFO(x) pScrn->x = pScreenPriv->x #define SPRITE_PROLOG \ miPointerScreenPtr PointPriv; \ VGAarbiterScreenPtr pScreenPriv; \ input_lock(); \ PointPriv = dixLookupPrivate(&pScreen->devPrivates, \ miPointerScreenKey); \ pScreenPriv = dixLookupPrivate(&(pScreen)->devPrivates, \ VGAarbiterScreenKey); \ PointPriv->spriteFuncs = pScreenPriv->miSprite; \ #define SPRITE_EPILOG \ pScreenPriv->miSprite = PointPriv->spriteFuncs; \ PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \ input_unlock(); #define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\ PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \ } while (0) #define UNWRAP_SPRITE PointPriv->spriteFuncs = pScreenPriv->miSprite #define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\ (x)->funcs = &VGAarbiterGCFuncs; #define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \ (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\ (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs; static inline void VGAGet(ScreenPtr pScreen) { pci_device_vgaarb_set_target(xf86ScreenToScrn(pScreen)->vgaDev); pci_device_vgaarb_lock(); } static inline void VGAPut(void) { pci_device_vgaarb_unlock(); } typedef struct _VGAarbiterScreen { CreateGCProcPtr CreateGC; CloseScreenProcPtr CloseScreen; ScreenBlockHandlerProcPtr BlockHandler; ScreenWakeupHandlerProcPtr WakeupHandler; GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; SourceValidateProcPtr SourceValidate; CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; CreatePixmapProcPtr CreatePixmap; SaveScreenProcPtr SaveScreen; /* Colormap */ StoreColorsProcPtr StoreColors; /* Cursor */ DisplayCursorProcPtr DisplayCursor; RealizeCursorProcPtr RealizeCursor; UnrealizeCursorProcPtr UnrealizeCursor; RecolorCursorProcPtr RecolorCursor; SetCursorPositionProcPtr SetCursorPosition; void (*AdjustFrame) (ScrnInfoPtr, int, int); Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr); Bool (*EnterVT) (ScrnInfoPtr); void (*LeaveVT) (ScrnInfoPtr); void (*FreeScreen) (ScrnInfoPtr); miPointerSpriteFuncPtr miSprite; CompositeProcPtr Composite; GlyphsProcPtr Glyphs; CompositeRectsProcPtr CompositeRects; } VGAarbiterScreenRec, *VGAarbiterScreenPtr; typedef struct _VGAarbiterGC { const GCOps *wrapOps; const GCFuncs *wrapFuncs; } VGAarbiterGCRec, *VGAarbiterGCPtr; /* Screen funcs */ static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout); static void VGAarbiterWakeupHandler(ScreenPtr pScreen, int result); static Bool VGAarbiterCloseScreen(ScreenPtr pScreen); static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, unsigned int format, unsigned long planemask, char *pdstLine); static void VGAarbiterGetSpans(DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart); static void VGAarbiterSourceValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode); static void VGAarbiterCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); static void VGAarbiterClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures); static PixmapPtr VGAarbiterCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned int usage_hint); static Bool VGAarbiterCreateGC(GCPtr pGC); static Bool VGAarbiterSaveScreen(ScreenPtr pScreen, Bool unblank); static void VGAarbiterStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs); static void VGAarbiterRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed); static Bool VGAarbiterRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool VGAarbiterUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool VGAarbiterDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool VGAarbiterSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent); static void VGAarbiterAdjustFrame(ScrnInfoPtr pScrn, int x, int y); static Bool VGAarbiterSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode); static Bool VGAarbiterEnterVT(ScrnInfoPtr pScrn); static void VGAarbiterLeaveVT(ScrnInfoPtr pScrn); static void VGAarbiterFreeScreen(ScrnInfoPtr pScrn); /* GC funcs */ static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw); static void VGAarbiterChangeGC(GCPtr pGC, unsigned long mask); static void VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); static void VGAarbiterDestroyGC(GCPtr pGC); static void VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); static void VGAarbiterDestroyClip(GCPtr pGC); static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc); /* GC ops */ static void VGAarbiterFillSpans(DrawablePtr pDraw, GC * pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted); static void VGAarbiterSetSpans(DrawablePtr pDraw, GCPtr pGC, char *pcharsrc, register DDXPointPtr ppt, int *pwidth, int nspans, int fSorted); static void VGAarbiterPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage); static RegionPtr VGAarbiterCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC * pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); static RegionPtr VGAarbiterCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitPlane); static void VGAarbiterPolyPoint(DrawablePtr pDraw, GCPtr pGC, int mode, int npt, xPoint * pptInit); static void VGAarbiterPolylines(DrawablePtr pDraw, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit); static void VGAarbiterPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment * pSeg); static void VGAarbiterPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nRectsInit, xRectangle *pRectsInit); static void VGAarbiterPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); static void VGAarbiterFillPolygon(DrawablePtr pDraw, GCPtr pGC, int shape, int mode, int count, DDXPointPtr ptsIn); static void VGAarbiterPolyFillRect(DrawablePtr pDraw, GCPtr pGC, int nrectFill, xRectangle *prectInit); static void VGAarbiterPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); static int VGAarbiterPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars); static int VGAarbiterPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars); static void VGAarbiterImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars); static void VGAarbiterImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars); static void VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg); /* miSpriteFuncs */ static Bool VGAarbiterSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur); static Bool VGAarbiterSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur); static void VGAarbiterSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCur, int x, int y); static void VGAarbiterSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects); xorg-server-21.1.16/hw/xfree86/common/xf86sbusBus.c0000644000175000017500000005525414757411105015351 /* * SBUS bus-specific code. * * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * JAKUB JELINEK 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86cmap.h" #include "xf86Bus.h" #include "xf86sbusBus.h" #include "xf86Sbus.h" Bool sbusSlotClaimed = FALSE; static int xf86nSbusInfo; static void CheckSbusDevice(const char *device, int fbNum) { int fd, i; struct fbgattr fbattr; sbusDevicePtr psdp; fd = open(device, O_RDONLY, 0); if (fd < 0) return; memset(&fbattr, 0, sizeof(fbattr)); if (ioctl(fd, FBIOGATTR, &fbattr) < 0) { if (ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0) { close(fd); return; } } close(fd); for (i = 0; sbusDeviceTable[i].devId; i++) if (sbusDeviceTable[i].fbType == fbattr.fbtype.fb_type) break; if (!sbusDeviceTable[i].devId) return; xf86SbusInfo = xnfreallocarray(xf86SbusInfo, ++xf86nSbusInfo + 1, sizeof(psdp)); xf86SbusInfo[xf86nSbusInfo] = NULL; xf86SbusInfo[xf86nSbusInfo - 1] = psdp = xnfcalloc(sizeof(sbusDevice), 1); psdp->devId = sbusDeviceTable[i].devId; psdp->fbNum = fbNum; psdp->device = xnfstrdup(device); psdp->width = fbattr.fbtype.fb_width; psdp->height = fbattr.fbtype.fb_height; psdp->fd = -1; } void xf86SbusProbe(void) { int i, useProm = 0; char fbDevName[32]; sbusDevicePtr psdp, *psdpp; xf86SbusInfo = malloc(sizeof(psdp)); *xf86SbusInfo = NULL; for (i = 0; i < 32; i++) { snprintf(fbDevName, sizeof(fbDevName), "/dev/fb%d", i); CheckSbusDevice(fbDevName, i); } if (sparcPromInit() >= 0) { useProm = 1; sparcPromAssignNodes(); } for (psdpp = xf86SbusInfo; (psdp = *psdpp); psdpp++) { for (i = 0; sbusDeviceTable[i].devId; i++) if (sbusDeviceTable[i].devId == psdp->devId) psdp->descr = sbusDeviceTable[i].descr; /* * If we can use PROM information and found the PROM node for this * device, we can tell more about the card. */ if (useProm && psdp->node.node) { char *prop, *promPath; int len, chiprev, vmsize; switch (psdp->devId) { case SBUS_DEVICE_MGX: prop = sparcPromGetProperty(&psdp->node, "fb_size", &len); if (prop && len == 4 && *(int *) prop == 0x400000) psdp->descr = "Quantum 3D MGXplus with 4M VRAM"; break; case SBUS_DEVICE_CG6: chiprev = 0; vmsize = 0; prop = sparcPromGetProperty(&psdp->node, "chiprev", &len); if (prop && len == 4) chiprev = *(int *) prop; prop = sparcPromGetProperty(&psdp->node, "vmsize", &len); if (prop && len == 4) vmsize = *(int *) prop; switch (chiprev) { case 1: case 2: case 3: case 4: psdp->descr = "Sun Double width GX"; break; case 5: case 6: case 7: case 8: case 9: psdp->descr = "Sun Single width GX"; break; case 11: switch (vmsize) { case 2: psdp->descr = "Sun Turbo GX with 1M VSIMM"; break; case 4: psdp->descr = "Sun Turbo GX Plus"; break; default: psdp->descr = "Sun Turbo GX"; break; } } break; case SBUS_DEVICE_CG14: prop = sparcPromGetProperty(&psdp->node, "reg", &len); vmsize = 0; if (prop && !(len % 12) && len > 0) vmsize = *(int *) (prop + len - 4); switch (vmsize) { case 0x400000: psdp->descr = "Sun SX with 4M VSIMM"; break; case 0x800000: psdp->descr = "Sun SX with 8M VSIMM"; break; } break; case SBUS_DEVICE_LEO: prop = sparcPromGetProperty(&psdp->node, "model", &len); if (prop && len > 0 && !strstr(prop, "501-2503")) psdp->descr = "Sun Turbo ZX"; break; case SBUS_DEVICE_TCX: if (sparcPromGetBool(&psdp->node, "tcx-8-bit")) psdp->descr = "Sun TCX (8bit)"; else psdp->descr = "Sun TCX (S24)"; break; case SBUS_DEVICE_FFB: prop = sparcPromGetProperty(&psdp->node, "name", &len); chiprev = 0; prop = sparcPromGetProperty(&psdp->node, "board_type", &len); if (prop && len == 4) chiprev = *(int *) prop; if (strstr(prop, "afb")) { if (chiprev == 3) psdp->descr = "Sun|Elite3D-M6 Horizontal"; } else { switch (chiprev) { case 0x08: psdp->descr = "Sun FFB 67MHz Creator"; break; case 0x0b: psdp->descr = "Sun FFB 67MHz Creator 3D"; break; case 0x1b: psdp->descr = "Sun FFB 75MHz Creator 3D"; break; case 0x20: case 0x28: psdp->descr = "Sun FFB2 Vertical Creator"; break; case 0x23: case 0x2b: psdp->descr = "Sun FFB2 Vertical Creator 3D"; break; case 0x30: psdp->descr = "Sun FFB2+ Vertical Creator"; break; case 0x33: psdp->descr = "Sun FFB2+ Vertical Creator 3D"; break; case 0x40: case 0x48: psdp->descr = "Sun FFB2 Horizontal Creator"; break; case 0x43: case 0x4b: psdp->descr = "Sun FFB2 Horizontal Creator 3D"; break; } } break; } xf86Msg(X_PROBED, "SBUS:(0x%08x) %s", psdp->node.node, psdp->descr); promPath = sparcPromNode2Pathname(&psdp->node); if (promPath) { xf86ErrorF(" at %s", promPath); free(promPath); } } else xf86Msg(X_PROBED, "SBUS: %s", psdp->descr); xf86ErrorF("\n"); } if (useProm) sparcPromClose(); } /* * Parse a BUS ID string, and return the SBUS bus parameters if it was * in the correct format for a SBUS bus id. */ static Bool xf86ParseSbusBusString(const char *busID, int *fbNum) { /* * The format is assumed to be one of: * "fbN", e.g. "fb1", which means the device corresponding to /dev/fbN * "nameN", e.g. "cgsix0", which means Nth instance of card NAME * "/prompath", e.g. "/sbus@0,10001000/cgsix@3,0" which is PROM pathname * to the device. */ const char *id; int i, len; if (StringToBusType(busID, &id) != BUS_SBUS) return FALSE; if (*id != '/') { if (!strncmp(id, "fb", 2)) { if (!isdigit(id[2])) return FALSE; *fbNum = atoi(id + 2); return TRUE; } else { sbusDevicePtr *psdpp; int devId; for (i = 0, len = 0; sbusDeviceTable[i].devId; i++) { len = strlen(sbusDeviceTable[i].promName); if (!strncmp(sbusDeviceTable[i].promName, id, len) && isdigit(id[len])) break; } devId = sbusDeviceTable[i].devId; if (!devId) return FALSE; i = atoi(id + len); for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) { if ((*psdpp)->devId != devId) continue; if (!i) { *fbNum = (*psdpp)->fbNum; return TRUE; } i--; } } return FALSE; } if (sparcPromInit() >= 0) { i = sparcPromPathname2Node(id); sparcPromClose(); if (i) { sbusDevicePtr *psdpp; for (psdpp = xf86SbusInfo; *psdpp; ++psdpp) { if ((*psdpp)->node.node == i) { *fbNum = (*psdpp)->fbNum; return TRUE; } } } } return FALSE; } /* * Compare a BUS ID string with a SBUS bus id. Return TRUE if they match. */ static Bool xf86CompareSbusBusString(const char *busID, int fbNum) { int iFbNum; if (xf86ParseSbusBusString(busID, &iFbNum)) { return fbNum == iFbNum; } else { return FALSE; } } /* * Check if the slot requested is free. If it is already in use, return FALSE. */ static Bool xf86CheckSbusSlot(int fbNum) { int i; EntityPtr p; for (i = 0; i < xf86NumEntities; i++) { p = xf86Entities[i]; /* Check if this SBUS slot is taken */ if (p->bus.type == BUS_SBUS && p->bus.id.sbus.fbNum == fbNum) return FALSE; } return TRUE; } /* * If the slot requested is already in use, return -1. * Otherwise, claim the slot for the screen requesting it. */ static int xf86ClaimSbusSlot(sbusDevicePtr psdp, DriverPtr drvp, GDevPtr dev, Bool active) { EntityPtr p = NULL; int num; if (xf86CheckSbusSlot(psdp->fbNum)) { num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = -1; p->bus.type = BUS_SBUS; xf86AddDevToEntity(num, dev); p->bus.id.sbus.fbNum = psdp->fbNum; p->active = active; p->inUse = FALSE; sbusSlotClaimed = TRUE; return num; } else return -1; } int xf86MatchSbusInstances(const char *driverName, int sbusDevId, GDevPtr * devList, int numDevs, DriverPtr drvp, int **foundEntities) { int i, j; sbusDevicePtr psdp, *psdpp; int numClaimedInstances = 0; int allocatedInstances = 0; int numFound = 0; GDevPtr devBus = NULL; GDevPtr dev = NULL; int *retEntities = NULL; int useProm = 0; struct Inst { sbusDevicePtr sbus; GDevPtr dev; Bool claimed; /* BusID matches with a device section */ } *instances = NULL; *foundEntities = NULL; for (psdpp = xf86SbusInfo, psdp = *psdpp; psdp; psdp = *++psdpp) { if (psdp->devId != sbusDevId) continue; if (psdp->fd == -2) continue; ++allocatedInstances; instances = xnfreallocarray(instances, allocatedInstances, sizeof(struct Inst)); instances[allocatedInstances - 1].sbus = psdp; instances[allocatedInstances - 1].dev = NULL; instances[allocatedInstances - 1].claimed = FALSE; numFound++; } /* * This may be debatable, but if no SBUS devices with a matching vendor * type is found, return zero now. It is probably not desirable to * allow the config file to override this. */ if (allocatedInstances <= 0) { free(instances); return 0; } if (sparcPromInit() >= 0) useProm = 1; if (xf86DoConfigure && xf86DoConfigurePass1) { GDevPtr pGDev; int actualcards = 0; for (i = 0; i < allocatedInstances; i++) { actualcards++; pGDev = xf86AddBusDeviceToConfigure(drvp->driverName, BUS_SBUS, instances[i].sbus, -1); if (pGDev) { /* * XF86Match???Instances() treat chipID and chipRev as * overrides, so clobber them here. */ pGDev->chipID = pGDev->chipRev = -1; } } free(instances); if (useProm) sparcPromClose(); return actualcards; } DebugF("%s instances found: %d\n", driverName, allocatedInstances); for (i = 0; i < allocatedInstances; i++) { char *promPath = NULL; psdp = instances[i].sbus; devBus = NULL; dev = NULL; if (useProm && psdp->node.node) promPath = sparcPromNode2Pathname(&psdp->node); for (j = 0; j < numDevs; j++) { if (devList[j]->busID && *devList[j]->busID) { if (xf86CompareSbusBusString(devList[j]->busID, psdp->fbNum)) { if (devBus) xf86MsgVerb(X_WARNING, 0, "%s: More than one matching Device section for " "instance (BusID: %s) found: %s\n", driverName, devList[j]->identifier, devList[j]->busID); else devBus = devList[j]; } } else { if (!dev && !devBus) { if (promPath) xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:%s\n", promPath); else xf86Msg(X_PROBED, "Assigning device section with no busID to SBUS:fb%d\n", psdp->fbNum); dev = devList[j]; } else xf86MsgVerb(X_WARNING, 0, "%s: More than one matching Device section " "found: %s\n", driverName, devList[j]->identifier); } } if (devBus) dev = devBus; /* busID preferred */ if (!dev && psdp->fd != -2) { if (promPath) { xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " "for instance (BusID SBUS:%s) found\n", driverName, promPath); } else xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " "for instance (BusID SBUS:fb%d) found\n", driverName, psdp->fbNum); } else if (dev) { numClaimedInstances++; instances[i].claimed = TRUE; instances[i].dev = dev; } free(promPath); } DebugF("%s instances found: %d\n", driverName, numClaimedInstances); /* * Of the claimed instances, check that another driver hasn't already * claimed its slot. */ numFound = 0; for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { if (!instances[i].claimed) continue; psdp = instances[i].sbus; if (!xf86CheckSbusSlot(psdp->fbNum)) continue; DebugF("%s: card at fb%d %08x is claimed by a Device section\n", driverName, psdp->fbNum, psdp->node.node); /* Allocate an entry in the lists to be returned */ numFound++; retEntities = xnfreallocarray(retEntities, numFound, sizeof(int)); retEntities[numFound - 1] = xf86ClaimSbusSlot(psdp, drvp, instances[i].dev, instances[i].dev->active ? TRUE : FALSE); } free(instances); if (numFound > 0) { *foundEntities = retEntities; } if (useProm) sparcPromClose(); return numFound; } /* * xf86GetSbusInfoForEntity() -- Get the sbusDevicePtr of entity. */ sbusDevicePtr xf86GetSbusInfoForEntity(int entityIndex) { sbusDevicePtr *psdpp; EntityPtr p = xf86Entities[entityIndex]; if (entityIndex >= xf86NumEntities || p->bus.type != BUS_SBUS) return NULL; for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) { if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum) return *psdpp; } return NULL; } int xf86GetEntityForSbusInfo(sbusDevicePtr psdp) { int i; for (i = 0; i < xf86NumEntities; i++) { EntityPtr p = xf86Entities[i]; if (p->bus.type != BUS_SBUS) continue; if (p->bus.id.sbus.fbNum == psdp->fbNum) return i; } return -1; } void xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) { DisplayModePtr mode; mode = xnfcalloc(sizeof(DisplayModeRec), 1); mode->name = "current"; mode->next = mode; mode->prev = mode; mode->type = M_T_BUILTIN; mode->Clock = 100000000; mode->HDisplay = psdp->width; mode->HSyncStart = psdp->width; mode->HSyncEnd = psdp->width; mode->HTotal = psdp->width; mode->VDisplay = psdp->height; mode->VSyncStart = psdp->height; mode->VSyncEnd = psdp->height; mode->VTotal = psdp->height; mode->SynthClock = mode->Clock; mode->CrtcHDisplay = mode->HDisplay; mode->CrtcHSyncStart = mode->HSyncStart; mode->CrtcHSyncEnd = mode->HSyncEnd; mode->CrtcHTotal = mode->HTotal; mode->CrtcVDisplay = mode->VDisplay; mode->CrtcVSyncStart = mode->VSyncStart; mode->CrtcVSyncEnd = mode->VSyncEnd; mode->CrtcVTotal = mode->VTotal; mode->CrtcHAdjusted = FALSE; mode->CrtcVAdjusted = FALSE; pScrn->modes = mode; pScrn->virtualX = psdp->width; pScrn->virtualY = psdp->height; } static DevPrivateKeyRec sbusPaletteKeyRec; #define sbusPaletteKey (&sbusPaletteKeyRec) typedef struct _sbusCmap { sbusDevicePtr psdp; CloseScreenProcPtr CloseScreen; Bool origCmapValid; unsigned char origRed[16]; unsigned char origGreen[16]; unsigned char origBlue[16]; } sbusCmapRec, *sbusCmapPtr; #define SBUSCMAPPTR(pScreen) ((sbusCmapPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, sbusPaletteKey)) static void xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { int i, index; sbusCmapPtr cmap; struct fbcmap fbcmap; unsigned char *data; cmap = SBUSCMAPPTR(pScrn->pScreen); if (!cmap) return; fbcmap.count = 0; fbcmap.index = indices[0]; fbcmap.red = data = xallocarray(numColors, 3); if (!data) return; fbcmap.green = data + numColors; fbcmap.blue = fbcmap.green + numColors; for (i = 0; i < numColors; i++) { index = indices[i]; if (fbcmap.count && index != fbcmap.index + fbcmap.count) { ioctl(cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); fbcmap.count = 0; fbcmap.index = index; } fbcmap.red[fbcmap.count] = colors[index].red; fbcmap.green[fbcmap.count] = colors[index].green; fbcmap.blue[fbcmap.count++] = colors[index].blue; } ioctl(cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); free(data); } static Bool xf86SbusCmapCloseScreen(ScreenPtr pScreen) { sbusCmapPtr cmap; struct fbcmap fbcmap; cmap = SBUSCMAPPTR(pScreen); if (cmap->origCmapValid) { fbcmap.index = 0; fbcmap.count = 16; fbcmap.red = cmap->origRed; fbcmap.green = cmap->origGreen; fbcmap.blue = cmap->origBlue; ioctl(cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); } pScreen->CloseScreen = cmap->CloseScreen; free(cmap); return (*pScreen->CloseScreen) (pScreen); } Bool xf86SbusHandleColormaps(ScreenPtr pScreen, sbusDevicePtr psdp) { sbusCmapPtr cmap; struct fbcmap fbcmap; unsigned char data[2]; if (!dixRegisterPrivateKey(sbusPaletteKey, PRIVATE_SCREEN, 0)) FatalError("Cannot register sbus private key"); cmap = xnfcalloc(1, sizeof(sbusCmapRec)); dixSetPrivate(&pScreen->devPrivates, sbusPaletteKey, cmap); cmap->psdp = psdp; fbcmap.index = 0; fbcmap.count = 16; fbcmap.red = cmap->origRed; fbcmap.green = cmap->origGreen; fbcmap.blue = cmap->origBlue; if (ioctl(psdp->fd, FBIOGETCMAP, &fbcmap) >= 0) cmap->origCmapValid = TRUE; fbcmap.index = 0; fbcmap.count = 2; fbcmap.red = data; fbcmap.green = data; fbcmap.blue = data; if (pScreen->whitePixel == 0) { data[0] = 255; data[1] = 0; } else { data[0] = 0; data[1] = 255; } ioctl(psdp->fd, FBIOPUTCMAP, &fbcmap); cmap->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86SbusCmapCloseScreen; return xf86HandleColormaps(pScreen, 256, 8, xf86SbusCmapLoadPalette, NULL, 0); } Bool xf86SbusConfigure(void *busData, sbusDevicePtr sBus) { if (sBus && sBus->fbNum == ((sbusDevicePtr) busData)->fbNum) return 0; return 1; } void xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev) { char *promPath = NULL; char *tmp; sBus = (sbusDevicePtr) busData; GDev->identifier = sBus->descr; if (sparcPromInit() >= 0) { promPath = sparcPromNode2Pathname(&sBus->node); sparcPromClose(); } if (promPath) { XNFasprintf(&tmp, "SBUS:%s", promPath); free(promPath); } else { XNFasprintf(&tmp, "SBUS:fb%d", sBus->fbNum); } GDev->busID = tmp; } xorg-server-21.1.16/hw/xfree86/common/xf86platformBus.c0000644000175000017500000005406114757411105016214 /* * Copyright © 2012 Red Hat. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Dave Airlie */ /* * This file contains the interfaces to the bus-specific code */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifdef XSERVER_PLATFORM_BUS #include #include #include #include #include "os.h" #include "hotplug.h" #include "systemd-logind.h" #include "loaderProcs.h" #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Priv.h" #include "xf86str.h" #include "xf86Bus.h" #include "Pci.h" #include "xf86platformBus.h" #include "xf86Config.h" #include "xf86Crtc.h" #include "randrstr.h" int platformSlotClaimed; int xf86_num_platform_devices; struct xf86_platform_device *xf86_platform_devices; int xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned) { xf86_platform_devices = xnfreallocarray(xf86_platform_devices, xf86_num_platform_devices + 1, sizeof(struct xf86_platform_device)); xf86_platform_devices[xf86_num_platform_devices].attribs = attribs; xf86_platform_devices[xf86_num_platform_devices].pdev = NULL; xf86_platform_devices[xf86_num_platform_devices].flags = unowned ? XF86_PDEV_UNOWNED : 0; xf86_num_platform_devices++; return 0; } int xf86_remove_platform_device(int dev_index) { int j; config_odev_free_attributes(xf86_platform_devices[dev_index].attribs); for (j = dev_index; j < xf86_num_platform_devices - 1; j++) memcpy(&xf86_platform_devices[j], &xf86_platform_devices[j + 1], sizeof(struct xf86_platform_device)); xf86_num_platform_devices--; return 0; } Bool xf86_get_platform_device_unowned(int index) { return (xf86_platform_devices[index].flags & XF86_PDEV_UNOWNED) ? TRUE : FALSE; } struct xf86_platform_device * xf86_find_platform_device_by_devnum(int major, int minor) { int i, attr_major, attr_minor; for (i = 0; i < xf86_num_platform_devices; i++) { attr_major = xf86_platform_odev_attributes(i)->major; attr_minor = xf86_platform_odev_attributes(i)->minor; if (attr_major == major && attr_minor == minor) return &xf86_platform_devices[i]; } return NULL; } /* * xf86IsPrimaryPlatform() -- return TRUE if primary device * is a platform device and it matches this one. */ static Bool xf86IsPrimaryPlatform(struct xf86_platform_device *plat) { /* Add max. 1 screen for the IgnorePrimary fallback path */ if (xf86ProbeIgnorePrimary && xf86NumScreens == 0) return TRUE; if (primaryBus.type == BUS_PLATFORM) return plat == primaryBus.id.plat; #ifdef XSERVER_LIBPCIACCESS if (primaryBus.type == BUS_PCI) if (plat->pdev) if (MATCH_PCI_DEVICES(primaryBus.id.pci, plat->pdev)) return TRUE; #endif return FALSE; } static void platform_find_pci_info(struct xf86_platform_device *pd, char *busid) { struct pci_slot_match devmatch; struct pci_device *info; struct pci_device_iterator *iter; int ret; ret = sscanf(busid, "pci:%04x:%02x:%02x.%u", &devmatch.domain, &devmatch.bus, &devmatch.dev, &devmatch.func); if (ret != 4) return; iter = pci_slot_match_iterator_create(&devmatch); info = pci_device_next(iter); if (info) pd->pdev = info; pci_iterator_destroy(iter); } static Bool xf86_check_platform_slot(const struct xf86_platform_device *pd) { int i; for (i = 0; i < xf86NumEntities; i++) { const EntityPtr u = xf86Entities[i]; if (pd->pdev && u->bus.type == BUS_PCI && MATCH_PCI_DEVICES(pd->pdev, u->bus.id.pci)) { return FALSE; } if ((u->bus.type == BUS_PLATFORM) && (pd == u->bus.id.plat)) { return FALSE; } } return TRUE; } static Bool MatchToken(const char *value, struct xorg_list *patterns, int (*compare)(const char *, const char *)) { const xf86MatchGroup *group; /* If there are no patterns, accept the match */ if (xorg_list_is_empty(patterns)) return TRUE; /* If there are patterns but no attribute, reject the match */ if (!value) return FALSE; /* * Otherwise, iterate the list of patterns ensuring each entry has a * match. Each list entry is a separate Match line of the same type. */ xorg_list_for_each_entry(group, patterns, entry) { Bool match = FALSE; char *const *cur; for (cur = group->values; *cur; cur++) { if ((*compare)(value, *cur) == 0) { match = TRUE; break; } } if (!match) return FALSE; } /* All the entries in the list matched the attribute */ return TRUE; } static Bool OutputClassMatches(const XF86ConfOutputClassPtr oclass, struct xf86_platform_device *dev) { char *driver = dev->attribs->driver; if (!MatchToken(driver, &oclass->match_driver, strcmp)) return FALSE; return TRUE; } static void xf86OutputClassDriverList(int index, XF86MatchedDrivers *md) { XF86ConfOutputClassPtr cl; for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { if (OutputClassMatches(cl, &xf86_platform_devices[index])) { char *path = xf86_platform_odev_attributes(index)->path; xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", cl->identifier, path); xf86Msg(X_NONE, "\tloading driver: %s\n", cl->driver); xf86AddMatchedDriver(md, cl->driver); } } } /** * @return The numbers of found devices that match with the current system * drivers. */ void xf86PlatformMatchDriver(XF86MatchedDrivers *md) { int i; struct pci_device *info = NULL; int pass = 0; for (pass = 0; pass < 2; pass++) { for (i = 0; i < xf86_num_platform_devices; i++) { if (xf86IsPrimaryPlatform(&xf86_platform_devices[i]) && (pass == 1)) continue; else if (!xf86IsPrimaryPlatform(&xf86_platform_devices[i]) && (pass == 0)) continue; xf86OutputClassDriverList(i, md); info = xf86_platform_devices[i].pdev; #ifdef __linux__ if (info) xf86MatchDriverFromFiles(info->vendor_id, info->device_id, md); #endif if (info != NULL) { xf86VideoPtrToDriverList(info, md); } } } } int xf86platformProbe(void) { int i; Bool pci = TRUE; XF86ConfOutputClassPtr cl, cl_head = (xf86configptr) ? xf86configptr->conf_outputclass_lst : NULL; char *old_path, *path = NULL; config_odev_probe(xf86PlatformDeviceProbe); if (!xf86scanpci()) { pci = FALSE; } for (i = 0; i < xf86_num_platform_devices; i++) { char *busid = xf86_platform_odev_attributes(i)->busid; if (pci && busid && (strncmp(busid, "pci:", 4) == 0)) { platform_find_pci_info(&xf86_platform_devices[i], busid); } /* * Deal with OutputClass ModulePath directives, these must be * processed before we do any module loading. */ for (cl = cl_head; cl; cl = cl->list.next) { if (!OutputClassMatches(cl, &xf86_platform_devices[i])) continue; if (cl->modulepath && xf86ModPathFrom != X_CMDLINE) { old_path = path; XNFasprintf(&path, "%s,%s", cl->modulepath, path ? path : xf86ModulePath); free(old_path); xf86Msg(X_CONFIG, "OutputClass \"%s\" ModulePath extended to \"%s\"\n", cl->identifier, path); LoaderSetPath(path); } } } free(path); /* First see if there is an OutputClass match marking a device as primary */ for (i = 0; i < xf86_num_platform_devices; i++) { struct xf86_platform_device *dev = &xf86_platform_devices[i]; for (cl = cl_head; cl; cl = cl->list.next) { if (!OutputClassMatches(cl, dev)) continue; if (xf86CheckBoolOption(cl->option_lst, "PrimaryGPU", FALSE)) { xf86Msg(X_CONFIG, "OutputClass \"%s\" setting %s as PrimaryGPU\n", cl->identifier, dev->attribs->path); primaryBus.type = BUS_PLATFORM; primaryBus.id.plat = dev; return 0; } } } /* Then check for pci_device_is_boot_vga() */ for (i = 0; i < xf86_num_platform_devices; i++) { struct xf86_platform_device *dev = &xf86_platform_devices[i]; if (!dev->pdev) continue; pci_device_probe(dev->pdev); if (pci_device_is_boot_vga(dev->pdev)) { primaryBus.type = BUS_PLATFORM; primaryBus.id.plat = dev; } } return 0; } void xf86MergeOutputClassOptions(int entityIndex, void **options) { const EntityPtr entity = xf86Entities[entityIndex]; struct xf86_platform_device *dev = NULL; XF86ConfOutputClassPtr cl; XF86OptionPtr classopts; int i = 0; switch (entity->bus.type) { case BUS_PLATFORM: dev = entity->bus.id.plat; break; case BUS_PCI: for (i = 0; i < xf86_num_platform_devices; i++) { if (xf86_platform_devices[i].pdev) { if (MATCH_PCI_DEVICES(xf86_platform_devices[i].pdev, entity->bus.id.pci)) { dev = &xf86_platform_devices[i]; break; } } } break; default: xf86Msg(X_DEBUG, "xf86MergeOutputClassOptions unsupported bus type %d\n", entity->bus.type); } if (!dev) return; for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { if (!OutputClassMatches(cl, dev) || !cl->option_lst) continue; xf86Msg(X_INFO, "Applying OutputClass \"%s\" options to %s\n", cl->identifier, dev->attribs->path); classopts = xf86optionListDup(cl->option_lst); *options = xf86optionListMerge(*options, classopts); } } static int xf86ClaimPlatformSlot(struct xf86_platform_device * d, DriverPtr drvp, int chipset, GDevPtr dev, Bool active) { EntityPtr p = NULL; int num; if (xf86_check_platform_slot(d)) { num = xf86AllocateEntity(); p = xf86Entities[num]; p->driver = drvp; p->chipset = chipset; p->bus.type = BUS_PLATFORM; p->bus.id.plat = d; p->active = active; p->inUse = FALSE; if (dev) xf86AddDevToEntity(num, dev); platformSlotClaimed++; return num; } else return -1; } static int xf86UnclaimPlatformSlot(struct xf86_platform_device *d, GDevPtr dev) { int i; for (i = 0; i < xf86NumEntities; i++) { const EntityPtr p = xf86Entities[i]; if ((p->bus.type == BUS_PLATFORM) && (p->bus.id.plat == d)) { if (dev) xf86RemoveDevFromEntity(i, dev); platformSlotClaimed--; p->bus.type = BUS_NONE; return 0; } } return 0; } #define END_OF_MATCHES(m) \ (((m).vendor_id == 0) && ((m).device_id == 0) && ((m).subvendor_id == 0)) static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, GDevPtr gdev, int flags, intptr_t match_data) { Bool foundScreen = FALSE; int entity; if (gdev && gdev->screen == 0 && !xf86_check_platform_slot(dev)) return FALSE; entity = xf86ClaimPlatformSlot(dev, drvp, 0, gdev, gdev ? gdev->active : 0); if ((entity == -1) && gdev && (gdev->screen > 0)) { unsigned nent; for (nent = 0; nent < xf86NumEntities; nent++) { EntityPtr pEnt = xf86Entities[nent]; if (pEnt->bus.type != BUS_PLATFORM) continue; if (pEnt->bus.id.plat == dev) { entity = nent; xf86AddDevToEntity(nent, gdev); break; } } } if (entity != -1) { if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc || !drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) { systemd_logind_release_fd(dev->attribs->major, dev->attribs->minor, dev->attribs->fd); dev->attribs->fd = -1; dev->flags &= ~XF86_PDEV_SERVER_FD; } if (drvp->platformProbe(drvp, entity, flags, dev, match_data)) foundScreen = TRUE; else xf86UnclaimPlatformSlot(dev, gdev); } return foundScreen; } static Bool probeSingleDevice(struct xf86_platform_device *dev, DriverPtr drvp, GDevPtr gdev, int flags) { int k; Bool foundScreen = FALSE; struct pci_device *pPci; const struct pci_id_match *const devices = drvp->supported_devices; if (dev->pdev && devices) { int device_id = dev->pdev->device_id; pPci = dev->pdev; for (k = 0; !END_OF_MATCHES(devices[k]); k++) { if (PCI_ID_COMPARE(devices[k].vendor_id, pPci->vendor_id) && PCI_ID_COMPARE(devices[k].device_id, device_id) && ((devices[k].device_class_mask & pPci->device_class) == devices[k].device_class)) { foundScreen = doPlatformProbe(dev, drvp, gdev, flags, devices[k].match_data); if (foundScreen) break; } } } else if (dev->pdev && !devices) return FALSE; else foundScreen = doPlatformProbe(dev, drvp, gdev, flags, 0); return foundScreen; } static Bool isGPUDevice(GDevPtr gdev) { int i; for (i = 0; i < gdev->myScreenSection->num_gpu_devices; i++) { if (gdev == gdev->myScreenSection->gpu_devices[i]) return TRUE; } return FALSE; } int xf86platformProbeDev(DriverPtr drvp) { Bool foundScreen = FALSE; GDevPtr *devList; const unsigned numDevs = xf86MatchDevice(drvp->driverName, &devList); int i, j; /* find the main device or any device specified in xorg.conf */ for (i = 0; i < numDevs; i++) { const char *devpath; /* skip inactive devices */ if (!devList[i]->active) continue; /* This is specific to modesetting. */ devpath = xf86FindOptionValue(devList[i]->options, "kmsdev"); for (j = 0; j < xf86_num_platform_devices; j++) { if (devpath && *devpath) { if (strcmp(xf86_platform_devices[j].attribs->path, devpath) == 0) break; } else if (devList[i]->busID && *devList[i]->busID) { if (xf86PlatformDeviceCheckBusID(&xf86_platform_devices[j], devList[i]->busID)) break; } else { /* for non-seat0 servers assume first device is the master */ if (ServerIsNotSeat0()) { break; } else { /* Accept the device if the driver is simpledrm */ if (strcmp(xf86_platform_devices[j].attribs->driver, "simpledrm") == 0) break; } if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) break; } } if (j == xf86_num_platform_devices) continue; foundScreen = probeSingleDevice(&xf86_platform_devices[j], drvp, devList[i], isGPUDevice(devList[i]) ? PLATFORM_PROBE_GPU_SCREEN : 0); } free(devList); return foundScreen; } int xf86platformAddGPUDevices(DriverPtr drvp) { Bool foundScreen = FALSE; GDevPtr *devList; int j; if (!drvp->platformProbe) return FALSE; xf86MatchDevice(drvp->driverName, &devList); /* if autoaddgpu devices is enabled then go find any unclaimed platform * devices and add them as GPU screens */ if (xf86Info.autoAddGPU) { for (j = 0; j < xf86_num_platform_devices; j++) { if (probeSingleDevice(&xf86_platform_devices[j], drvp, devList ? devList[0] : NULL, PLATFORM_PROBE_GPU_SCREEN)) foundScreen = TRUE; } } free(devList); return foundScreen; } int xf86platformAddDevice(int index) { int i, old_screens, scr_index, scrnum; DriverPtr drvp = NULL; screenLayoutPtr layout; static const char *hotplug_driver_name = "modesetting"; if (!xf86Info.autoAddGPU) return -1; /* force load the driver for now */ xf86LoadOneModule(hotplug_driver_name, NULL); for (i = 0; i < xf86NumDrivers; i++) { if (!xf86DriverList[i]) continue; if (!strcmp(xf86DriverList[i]->driverName, hotplug_driver_name)) { drvp = xf86DriverList[i]; break; } } if (i == xf86NumDrivers) return -1; old_screens = xf86NumGPUScreens; doPlatformProbe(&xf86_platform_devices[index], drvp, NULL, PLATFORM_PROBE_GPU_SCREEN, 0); if (old_screens == xf86NumGPUScreens) return -1; i = old_screens; for (layout = xf86ConfigLayout.screens; layout->screen != NULL; layout++) { xf86GPUScreens[i]->confScreen = layout->screen; break; } if (xf86GPUScreens[i]->PreInit && xf86GPUScreens[i]->PreInit(xf86GPUScreens[i], 0)) xf86GPUScreens[i]->configured = TRUE; if (!xf86GPUScreens[i]->configured) { ErrorF("hotplugged device %d didn't configure\n", i); xf86DeleteScreen(xf86GPUScreens[i]); return -1; } scr_index = AddGPUScreen(xf86GPUScreens[i]->ScreenInit, 0, NULL); if (scr_index == -1) { xf86DeleteScreen(xf86GPUScreens[i]); xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); xf86NumGPUScreens = old_screens; return -1; } dixSetPrivate(&xf86GPUScreens[i]->pScreen->devPrivates, xf86ScreenKey, xf86GPUScreens[i]); CreateScratchPixmapsForScreen(xf86GPUScreens[i]->pScreen); if (xf86GPUScreens[i]->pScreen->CreateScreenResources && !(*xf86GPUScreens[i]->pScreen->CreateScreenResources) (xf86GPUScreens[i]->pScreen)) { RemoveGPUScreen(xf86GPUScreens[i]->pScreen); xf86DeleteScreen(xf86GPUScreens[i]); xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); xf86NumGPUScreens = old_screens; return -1; } /* attach unbound to the configured protocol screen (or 0) */ scrnum = xf86GPUScreens[i]->confScreen->screennum; AttachUnboundGPU(xf86Screens[scrnum]->pScreen, xf86GPUScreens[i]->pScreen); if (xf86Info.autoBindGPU) RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]), xf86ScrnToScreen(xf86Screens[scrnum])); RRResourcesChanged(xf86Screens[scrnum]->pScreen); RRTellChanged(xf86Screens[scrnum]->pScreen); return 0; } void xf86platformRemoveDevice(int index) { EntityPtr entity; int ent_num, i, j, scrnum; Bool found; for (ent_num = 0; ent_num < xf86NumEntities; ent_num++) { entity = xf86Entities[ent_num]; if (entity->bus.type == BUS_PLATFORM && entity->bus.id.plat == &xf86_platform_devices[index]) break; } if (ent_num == xf86NumEntities) goto out; found = FALSE; for (i = 0; i < xf86NumGPUScreens; i++) { for (j = 0; j < xf86GPUScreens[i]->numEntities; j++) if (xf86GPUScreens[i]->entityList[j] == ent_num) { found = TRUE; break; } if (found) break; } if (!found) { ErrorF("failed to find screen to remove\n"); goto out; } scrnum = xf86GPUScreens[i]->confScreen->screennum; xf86GPUScreens[i]->pScreen->CloseScreen(xf86GPUScreens[i]->pScreen); RemoveGPUScreen(xf86GPUScreens[i]->pScreen); xf86DeleteScreen(xf86GPUScreens[i]); xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); xf86_remove_platform_device(index); RRResourcesChanged(xf86Screens[scrnum]->pScreen); RRTellChanged(xf86Screens[scrnum]->pScreen); out: return; } /* called on return from VT switch to find any new devices */ void xf86platformVTProbe(void) { int i; for (i = 0; i < xf86_num_platform_devices; i++) { if (!(xf86_platform_devices[i].flags & XF86_PDEV_UNOWNED)) continue; xf86_platform_devices[i].flags &= ~XF86_PDEV_UNOWNED; xf86PlatformReprobeDevice(i, xf86_platform_devices[i].attribs); } } void xf86platformPrimary(void) { /* use the first platform device as a fallback */ if (primaryBus.type == BUS_NONE) { xf86Msg(X_INFO, "no primary bus or device found\n"); if (xf86_num_platform_devices > 0) { primaryBus.id.plat = &xf86_platform_devices[0]; primaryBus.type = BUS_PLATFORM; xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath); } } } #endif xorg-server-21.1.16/hw/xfree86/common/xf86RandR.c0000644000175000017500000003220714757411105014722 /* * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * 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_XORG_CONFIG_H #include #endif #include #include "os.h" #include "globals.h" #include "xf86.h" #include "xf86str.h" #include "xf86Priv.h" #include "xf86DDC.h" #include "mipointer.h" #include #include "inputstr.h" typedef struct _xf86RandRInfo { CloseScreenProcPtr CloseScreen; int virtualX; int virtualY; int mmWidth; int mmHeight; Rotation rotation; } XF86RandRInfoRec, *XF86RandRInfoPtr; static DevPrivateKeyRec xf86RandRKeyRec; static DevPrivateKey xf86RandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey)) static int xf86RandRModeRefresh(DisplayModePtr mode) { if (mode->VRefresh) return (int) (mode->VRefresh + 0.5); else if (mode->Clock == 0) return 0; else return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5); } static Bool xf86RandRGetInfo(ScreenPtr pScreen, Rotation * rotations) { RRScreenSizePtr pSize; ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; int refresh0 = 60; xorgRRModeMM RRModeMM; *rotations = RR_Rotate_0; for (mode = scrp->modes; mode != NULL; mode = mode->next) { int refresh = xf86RandRModeRefresh(mode); if (mode == scrp->modes) refresh0 = refresh; RRModeMM.mode = mode; RRModeMM.virtX = randrp->virtualX; RRModeMM.virtY = randrp->virtualY; RRModeMM.mmWidth = randrp->mmWidth; RRModeMM.mmHeight = randrp->mmHeight; if (scrp->DriverFunc) { (*scrp->DriverFunc) (scrp, RR_GET_MODE_MM, &RRModeMM); } pSize = RRRegisterSize(pScreen, mode->HDisplay, mode->VDisplay, RRModeMM.mmWidth, RRModeMM.mmHeight); if (!pSize) return FALSE; RRRegisterRate(pScreen, pSize, refresh); if (mode == scrp->currentMode && mode->HDisplay == scrp->virtualX && mode->VDisplay == scrp->virtualY) RRSetCurrentConfig(pScreen, randrp->rotation, refresh, pSize); if (mode->next == scrp->modes) break; } if (scrp->currentMode->HDisplay != randrp->virtualX || scrp->currentMode->VDisplay != randrp->virtualY) { mode = scrp->modes; RRModeMM.mode = NULL; RRModeMM.virtX = randrp->virtualX; RRModeMM.virtY = randrp->virtualY; RRModeMM.mmWidth = randrp->mmWidth; RRModeMM.mmHeight = randrp->mmHeight; if (scrp->DriverFunc) { (*scrp->DriverFunc) (scrp, RR_GET_MODE_MM, &RRModeMM); } pSize = RRRegisterSize(pScreen, randrp->virtualX, randrp->virtualY, RRModeMM.mmWidth, RRModeMM.mmHeight); if (!pSize) return FALSE; RRRegisterRate(pScreen, pSize, refresh0); if (scrp->virtualX == randrp->virtualX && scrp->virtualY == randrp->virtualY) { RRSetCurrentConfig(pScreen, randrp->rotation, refresh0, pSize); } } /* If there is driver support for randr, let it set our supported rotations */ if (scrp->DriverFunc) { xorgRRRotation RRRotation; RRRotation.RRRotations = *rotations; if (!(*scrp->DriverFunc) (scrp, RR_GET_INFO, &RRRotation)) return TRUE; *rotations = RRRotation.RRRotations; } return TRUE; } static Bool xf86RandRSetMode(ScreenPtr pScreen, DisplayModePtr mode, Bool useVirtual, int mmWidth, int mmHeight) { ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); int oldWidth = pScreen->width; int oldHeight = pScreen->height; int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; int oldVirtualX = scrp->virtualX; int oldVirtualY = scrp->virtualY; WindowPtr pRoot = pScreen->root; Bool ret = TRUE; if (pRoot && scrp->vtSema) (*scrp->EnableDisableFBAccess) (scrp, FALSE); if (useVirtual) { scrp->virtualX = randrp->virtualX; scrp->virtualY = randrp->virtualY; } else { scrp->virtualX = mode->HDisplay; scrp->virtualY = mode->VDisplay; } /* * The DIX forgets the physical dimensions we passed into RRRegisterSize, so * reconstruct them if possible. */ if (scrp->DriverFunc) { xorgRRModeMM RRModeMM; RRModeMM.mode = mode; RRModeMM.virtX = scrp->virtualX; RRModeMM.virtY = scrp->virtualY; RRModeMM.mmWidth = mmWidth; RRModeMM.mmHeight = mmHeight; (*scrp->DriverFunc) (scrp, RR_GET_MODE_MM, &RRModeMM); mmWidth = RRModeMM.mmWidth; mmHeight = RRModeMM.mmHeight; } if (randrp->rotation & (RR_Rotate_90 | RR_Rotate_270)) { /* If the screen is rotated 90 or 270 degrees, swap the sizes. */ pScreen->width = scrp->virtualY; pScreen->height = scrp->virtualX; pScreen->mmWidth = mmHeight; pScreen->mmHeight = mmWidth; } else { pScreen->width = scrp->virtualX; pScreen->height = scrp->virtualY; pScreen->mmWidth = mmWidth; pScreen->mmHeight = mmHeight; } if (!xf86SwitchMode(pScreen, mode)) { pScreen->width = oldWidth; pScreen->height = oldHeight; pScreen->mmWidth = oldmmWidth; pScreen->mmHeight = oldmmHeight; scrp->virtualX = oldVirtualX; scrp->virtualY = oldVirtualY; ret = FALSE; } /* * Make sure the layout is correct */ xf86ReconfigureLayout(); if (scrp->vtSema) { /* * Make sure the whole screen is visible */ xf86SetViewport (pScreen, pScreen->width, pScreen->height); xf86SetViewport (pScreen, 0, 0); if (pRoot) (*scrp->EnableDisableFBAccess) (scrp, TRUE); } return ret; } static Bool xf86RandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize) { ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; int pos[MAXDEVICES][2]; Bool useVirtual = FALSE; Rotation oldRotation = randrp->rotation; DeviceIntPtr dev; Bool view_adjusted = FALSE; for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) continue; miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); } for (mode = scrp->modes;; mode = mode->next) { if (mode->HDisplay == pSize->width && mode->VDisplay == pSize->height && (rate == 0 || xf86RandRModeRefresh(mode) == rate)) break; if (mode->next == scrp->modes) { if (pSize->width == randrp->virtualX && pSize->height == randrp->virtualY) { mode = scrp->modes; useVirtual = TRUE; break; } return FALSE; } } if (randrp->rotation != rotation) { /* Have the driver do its thing. */ if (scrp->DriverFunc) { xorgRRRotation RRRotation; RRRotation.RRConfig.rotation = rotation; RRRotation.RRConfig.rate = rate; RRRotation.RRConfig.width = pSize->width; RRRotation.RRConfig.height = pSize->height; /* * Currently we need to rely on HW support for rotation. */ if (!(*scrp->DriverFunc) (scrp, RR_SET_CONFIG, &RRRotation)) return FALSE; } else return FALSE; randrp->rotation = rotation; } if (!xf86RandRSetMode (pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight)) { if (randrp->rotation != oldRotation) { /* Have the driver undo its thing. */ if (scrp->DriverFunc) { xorgRRRotation RRRotation; RRRotation.RRConfig.rotation = oldRotation; RRRotation.RRConfig.rate = xf86RandRModeRefresh(scrp->currentMode); RRRotation.RRConfig.width = scrp->virtualX; RRRotation.RRConfig.height = scrp->virtualY; (*scrp->DriverFunc) (scrp, RR_SET_CONFIG, &RRRotation); } randrp->rotation = oldRotation; } return FALSE; } update_desktop_dimensions(); /* * Move the cursor back where it belongs; SwitchMode repositions it * FIXME: duplicated code, see modes/xf86RandR12.c */ for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) continue; if (pScreen == miPointerGetScreen(dev)) { int px = pos[dev->id][0]; int py = pos[dev->id][1]; px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); /* Setting the viewpoint makes only sense on one device */ if (!view_adjusted && IsMaster(dev)) { xf86SetViewport(pScreen, px, py); view_adjusted = TRUE; } (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE); } } return TRUE; } /* * Reset size back to original */ static Bool xf86RandRCloseScreen(ScreenPtr pScreen) { ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); scrp->virtualX = pScreen->width = randrp->virtualX; scrp->virtualY = pScreen->height = randrp->virtualY; scrp->currentMode = scrp->modes; pScreen->CloseScreen = randrp->CloseScreen; free(randrp); dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL); return (*pScreen->CloseScreen) (pScreen); } Rotation xf86GetRotation(ScreenPtr pScreen) { if (xf86RandRKey == NULL) return RR_Rotate_0; return XF86RANDRINFO(pScreen)->rotation; } /* Function to change RandR's idea of the virtual screen size */ Bool xf86RandRSetNewVirtualAndDimensions(ScreenPtr pScreen, int newvirtX, int newvirtY, int newmmWidth, int newmmHeight, Bool resetMode) { XF86RandRInfoPtr randrp; if (xf86RandRKey == NULL) return FALSE; randrp = XF86RANDRINFO(pScreen); if (randrp == NULL) return FALSE; if (newvirtX > 0) randrp->virtualX = newvirtX; if (newvirtY > 0) randrp->virtualY = newvirtY; if (newmmWidth > 0) randrp->mmWidth = newmmWidth; if (newmmHeight > 0) randrp->mmHeight = newmmHeight; /* This is only for during server start */ if (resetMode) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); return (xf86RandRSetMode(pScreen, pScrn->currentMode, TRUE, pScreen->mmWidth, pScreen->mmHeight)); } return TRUE; } Bool xf86RandRInit(ScreenPtr pScreen) { rrScrPrivPtr rp; XF86RandRInfoPtr randrp; ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) return TRUE; #endif xf86RandRKey = &xf86RandRKeyRec; if (!dixRegisterPrivateKey(&xf86RandRKeyRec, PRIVATE_SCREEN, 0)) return FALSE; randrp = malloc(sizeof(XF86RandRInfoRec)); if (!randrp) return FALSE; if (!RRScreenInit(pScreen)) { free(randrp); return FALSE; } rp = rrGetScrPriv(pScreen); rp->rrGetInfo = xf86RandRGetInfo; rp->rrSetConfig = xf86RandRSetConfig; randrp->virtualX = scrp->virtualX; randrp->virtualY = scrp->virtualY; randrp->mmWidth = pScreen->mmWidth; randrp->mmHeight = pScreen->mmHeight; randrp->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86RandRCloseScreen; randrp->rotation = RR_Rotate_0; dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, randrp); return TRUE; } xorg-server-21.1.16/hw/xfree86/common/xf86Bus.h0000644000175000017500000000455614757411105014460 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains definitions of the bus-related data structures/types. * Everything contained here is private to xf86Bus.c. In particular the * video drivers must not include this file. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _XF86_BUS_H #define _XF86_BUS_H #include "xf86pciBus.h" #if defined(__sparc__) || defined(__sparc) #include "xf86sbusBus.h" #endif #include "xf86platformBus.h" typedef struct { DriverPtr driver; int chipset; int entityProp; Bool active; Bool inUse; BusRec bus; DevUnion *entityPrivates; int numInstances; GDevPtr *devices; } EntityRec, *EntityPtr; #define ACCEL_IS_SHARABLE 0x100 #define IS_SHARED_ACCEL 0x200 #define SA_PRIM_INIT_DONE 0x400 extern EntityPtr *xf86Entities; extern int xf86NumEntities; extern BusRec primaryBus; int xf86AllocateEntity(void); BusType StringToBusType(const char *busID, const char **retID); #endif /* _XF86_BUS_H */ xorg-server-21.1.16/hw/xfree86/common/xf86Config.h0000644000175000017500000000450014757411105015121 /* * Copyright (c) 1997-2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _xf86_config_h #define _xf86_config_h #include "xf86Optrec.h" #include "xf86Parser.h" #include "xf86str.h" #ifdef HAVE_PARSER_DECLS /* * global structure that holds the result of parsing the config file */ extern _X_EXPORT XF86ConfigPtr xf86configptr; #endif typedef enum _ConfigStatus { CONFIG_OK = 0, CONFIG_PARSE_ERROR, CONFIG_NOFILE } ConfigStatus; typedef struct _ModuleDefault { const char *name; Bool toLoad; XF86OptionPtr load_opt; } ModuleDefault; /* * prototypes */ const char **xf86ModulelistFromConfig(void ***); const char **xf86DriverlistFromConfig(void); const char **xf86InputDriverlistFromConfig(void); Bool xf86BuiltinInputDriver(const char *); ConfigStatus xf86HandleConfigFile(Bool); Bool xf86AutoConfig(void); GDevPtr autoConfigDevice(GDevPtr preconf_device); #endif /* _xf86_config_h */ xorg-server-21.1.16/hw/xfree86/common/xf86InPriv.h0000644000175000017500000000322014757411105015121 /* * Copyright (c) 1999 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _xf86InPriv_h #define _xf86InPriv_h /* xf86Globals.c */ extern InputDriverPtr *xf86InputDriverList; extern int xf86NumInputDrivers; #endif /* _xf86InPriv_h */ xorg-server-21.1.16/hw/xfree86/common/xf86pciBus.h0000644000175000017500000000471214757411105015146 /* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _XF86_PCI_BUS_H #define _XF86_PCI_BUS_H #include "xf86MatchDrivers.h" void xf86PciProbe(void); Bool xf86PciAddMatchingDev(DriverPtr drvp); Bool xf86PciProbeDev(DriverPtr drvp); void xf86PciIsolateDevice(const char *argument); void xf86PciMatchDriver(XF86MatchedDrivers *md); Bool xf86PciConfigure(void *busData, struct pci_device *pDev); void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, GDevRec * GDev, int *chipset); #define MATCH_PCI_DEVICES(x, y) (((x)->domain == (y)->domain) && \ ((x)->bus == (y)->bus) && \ ((x)->func == (y)->func) && \ ((x)->dev == (y)->dev)) void xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, XF86MatchedDrivers *md); void xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md); #endif /* _XF86_PCI_BUS_H */ xorg-server-21.1.16/hw/xfree86/common/vesamodes0000644000175000017500000001070514757411105014744 // // Default modes distilled from // "VESA and Industry Standards and Guide for Computer Display Monitor // Timing", version 1.0, revision 0.8, adopted September 17, 1998. // // $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $ # 640x350 @ 85Hz (VESA) hsync: 37.9kHz ModeLine "640x350" 31.5 640 672 736 832 350 382 385 445 +hsync -vsync # 640x400 @ 85Hz (VESA) hsync: 37.9kHz ModeLine "640x400" 31.5 640 672 736 832 400 401 404 445 -hsync +vsync # 720x400 @ 85Hz (VESA) hsync: 37.9kHz ModeLine "720x400" 35.5 720 756 828 936 400 401 404 446 -hsync +vsync # 640x480 @ 60Hz (Industry standard) hsync: 31.5kHz ModeLine "640x480" 25.175 640 656 752 800 480 490 492 525 -hsync -vsync # 640x480 @ 72Hz (VESA) hsync: 37.9kHz ModeLine "640x480" 31.5 640 664 704 832 480 489 492 520 -hsync -vsync # 640x480 @ 75Hz (VESA) hsync: 37.5kHz ModeLine "640x480" 31.5 640 656 720 840 480 481 484 500 -hsync -vsync # 640x480 @ 85Hz (VESA) hsync: 43.3kHz ModeLine "640x480" 36.0 640 696 752 832 480 481 484 509 -hsync -vsync # 800x600 @ 56Hz (VESA) hsync: 35.2kHz ModeLine "800x600" 36.0 800 824 896 1024 600 601 603 625 +hsync +vsync # 800x600 @ 60Hz (VESA) hsync: 37.9kHz ModeLine "800x600" 40.0 800 840 968 1056 600 601 605 628 +hsync +vsync # 800x600 @ 72Hz (VESA) hsync: 48.1kHz ModeLine "800x600" 50.0 800 856 976 1040 600 637 643 666 +hsync +vsync # 800x600 @ 75Hz (VESA) hsync: 46.9kHz ModeLine "800x600" 49.5 800 816 896 1056 600 601 604 625 +hsync +vsync # 800x600 @ 85Hz (VESA) hsync: 53.7kHz ModeLine "800x600" 56.3 800 832 896 1048 600 601 604 631 +hsync +vsync # 1024x768i @ 43Hz (industry standard) hsync: 35.5kHz ModeLine "1024x768" 44.9 1024 1032 1208 1264 768 768 776 817 +hsync +vsync Interlace # 1024x768 @ 60Hz (VESA) hsync: 48.4kHz ModeLine "1024x768" 65.0 1024 1048 1184 1344 768 771 777 806 -hsync -vsync # 1024x768 @ 70Hz (VESA) hsync: 56.5kHz ModeLine "1024x768" 75.0 1024 1048 1184 1328 768 771 777 806 -hsync -vsync # 1024x768 @ 75Hz (VESA) hsync: 60.0kHz ModeLine "1024x768" 78.75 1024 1040 1136 1312 768 769 772 800 +hsync +vsync # 1024x768 @ 85Hz (VESA) hsync: 68.7kHz ModeLine "1024x768" 94.5 1024 1072 1168 1376 768 769 772 808 +hsync +vsync # 1152x864 @ 75Hz (VESA) hsync: 67.5kHz ModeLine "1152x864" 108.0 1152 1216 1344 1600 864 865 868 900 +hsync +vsync # 1280x960 @ 60Hz (VESA) hsync: 60.0kHz ModeLine "1280x960" 108.0 1280 1376 1488 1800 960 961 964 1000 +hsync +vsync # 1280x960 @ 85Hz (VESA) hsync: 85.9kHz ModeLine "1280x960" 148.5 1280 1344 1504 1728 960 961 964 1011 +hsync +vsync # 1280x1024 @ 60Hz (VESA) hsync: 64.0kHz ModeLine "1280x1024" 108.0 1280 1328 1440 1688 1024 1025 1028 1066 +hsync +vsync # 1280x1024 @ 75Hz (VESA) hsync: 80.0kHz ModeLine "1280x1024" 135.0 1280 1296 1440 1688 1024 1025 1028 1066 +hsync +vsync # 1280x1024 @ 85Hz (VESA) hsync: 91.1kHz ModeLine "1280x1024" 157.5 1280 1344 1504 1728 1024 1025 1028 1072 +hsync +vsync # 1600x1200 @ 60Hz (VESA) hsync: 75.0kHz ModeLine "1600x1200" 162.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1600x1200 @ 65Hz (VESA) hsync: 81.3kHz ModeLine "1600x1200" 175.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1600x1200 @ 70Hz (VESA) hsync: 87.5kHz ModeLine "1600x1200" 189.0 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1600x1200 @ 75Hz (VESA) hsync: 93.8kHz ModeLine "1600x1200" 202.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1600x1200 @ 85Hz (VESA) hsync: 106.3kHz ModeLine "1600x1200" 229.5 1600 1664 1856 2160 1200 1201 1204 1250 +hsync +vsync # 1792x1344 @ 60Hz (VESA) hsync: 83.6kHz ModeLine "1792x1344" 204.8 1792 1920 2120 2448 1344 1345 1348 1394 -hsync +vsync # 1792x1344 @ 75Hz (VESA) hsync: 106.3kHz ModeLine "1792x1344" 261.0 1792 1888 2104 2456 1344 1345 1348 1417 -hsync +vsync # 1856x1392 @ 60Hz (VESA) hsync: 86.3kHz ModeLine "1856x1392" 218.3 1856 1952 2176 2528 1392 1393 1396 1439 -hsync +vsync # 1856x1392 @ 75Hz (VESA) hsync: 112.5kHz ModeLine "1856x1392" 288.0 1856 1984 2208 2560 1392 1393 1396 1500 -hsync +vsync # 1920x1440 @ 60Hz (VESA) hsync: 90.0kHz ModeLine "1920x1440" 234.0 1920 2048 2256 2600 1440 1441 1444 1500 -hsync +vsync # 1920x1440 @ 75Hz (VESA) hsync: 112.5kHz ModeLine "1920x1440" 297.0 1920 2064 2288 2640 1440 1441 1444 1500 -hsync +vsync xorg-server-21.1.16/hw/xfree86/common/extramodes0000644000175000017500000002004114757411105015123 // // Extra modes to include as default modes in the X server. // // $XFree86: xc/programs/Xserver/hw/xfree86/etc/extramodes,v 1.5 2002/06/05 19:43:05 dawes Exp $ // # 832x624 @ 75Hz (74.55Hz) (fix if the official/Apple spec is different) hsync: 49.725kHz ModeLine "832x624" 57.284 832 864 928 1152 624 625 628 667 -Hsync -Vsync # 1400x1050 @ 60Hz (VESA GTF) hsync: 65.5kHz ModeLine "1400x1050" 122.0 1400 1488 1640 1880 1050 1052 1064 1082 +hsync +vsync # 1400x1050 @ 75Hz (VESA GTF) hsync: 82.2kHz ModeLine "1400x1050" 155.8 1400 1464 1784 1912 1050 1052 1064 1090 +hsync +vsync # 1920x1440 @ 85Hz (VESA GTF) hsync: 128.5kHz Modeline "1920x1440" 341.35 1920 2072 2288 2656 1440 1441 1444 1512 -hsync +vsync # 2048x1536 @ 60Hz (VESA GTF) hsync: 95.3kHz Modeline "2048x1536" 266.95 2048 2200 2424 2800 1536 1537 1540 1589 -hsync +vsync # 2048x1536 @ 75Hz (VESA GTF) hsync: 120.2kHz Modeline "2048x1536" 340.48 2048 2216 2440 2832 1536 1537 1540 1603 -hsync +vsync # 2048x1536 @ 85Hz (VESA GTF) hsync: 137.0kHz Modeline "2048x1536" 388.04 2048 2216 2440 2832 1536 1537 1540 1612 -hsync +vsync ### 16:9 modelines generated by cvt # 640x360 59.32 Hz (CVT 0.23M9-R) hsync: 22.19 kHz; pclk: 17.75 MHz Modeline "640x360R" 17.75 640 688 720 800 360 363 368 374 +hsync -vsync # 640x360 59.84 Hz (CVT 0.23M9) hsync: 22.50 kHz; pclk: 18.00 MHz Modeline "640x360" 18.00 640 664 720 800 360 363 368 376 -hsync +vsync # 720x405 58.99 Hz (CVT 0.29M9-R) hsync: 24.72 kHz; pclk: 21.75 MHz Modeline "720x405R" 21.75 720 768 800 880 405 408 413 419 +hsync -vsync # 720x405 59.51 Hz (CVT 0.29M9) hsync: 25.11 kHz; pclk: 22.50 MHz Modeline "720x405" 22.50 720 744 808 896 405 408 413 422 -hsync +vsync # 864x486 59.57 Hz (CVT 0.42M9-R) hsync: 29.79 kHz; pclk: 30.50 MHz Modeline "864x486R" 30.50 864 912 944 1024 486 489 494 500 +hsync -vsync # 864x486 59.92 Hz (CVT 0.42M9) hsync: 30.32 kHz; pclk: 32.50 MHz Modeline "864x486" 32.50 864 888 968 1072 486 489 494 506 -hsync +vsync # 960x540 59.82 Hz (CVT 0.52M9-R) hsync: 33.26 kHz; pclk: 37.25 MHz Modeline "960x540R" 37.25 960 1008 1040 1120 540 543 548 556 +hsync -vsync # 960x540 59.63 Hz (CVT 0.52M9) hsync: 33.51 kHz; pclk: 40.75 MHz Modeline "960x540" 40.75 960 992 1088 1216 540 543 548 562 -hsync +vsync # 1024x576 59.82 Hz (CVT 0.59M9-R) hsync: 35.47 kHz; pclk: 42.00 MHz Modeline "1024x576R" 42.00 1024 1072 1104 1184 576 579 584 593 +hsync -vsync # 1024x576 59.90 Hz (CVT 0.59M9) hsync: 35.88 kHz; pclk: 46.50 MHz Modeline "1024x576" 46.50 1024 1064 1160 1296 576 579 584 599 -hsync +vsync # 1280x720 59.74 Hz (CVT 0.92M9-R) hsync: 44.27 kHz; pclk: 63.75 MHz Modeline "1280x720R" 63.75 1280 1328 1360 1440 720 723 728 741 +hsync -vsync # 1280x720 59.86 Hz (CVT 0.92M9) hsync: 44.77 kHz; pclk: 74.50 MHz Modeline "1280x720" 74.50 1280 1344 1472 1664 720 723 728 748 -hsync +vsync # 1368x768 59.85 Hz (CVT) hsync: 47.28 kHz; pclk: 72.25 MHz Modeline "1368x768R" 72.25 1368 1416 1448 1528 768 771 781 790 +hsync -vsync # 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz Modeline "1368x768" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync # 1600x900 59.82 Hz (CVT 1.44M9-R) hsync: 55.40 kHz; pclk: 97.50 MHz Modeline "1600x900R" 97.50 1600 1648 1680 1760 900 903 908 926 +hsync -vsync # 1600x900 59.95 Hz (CVT 1.44M9) hsync: 55.99 kHz; pclk: 118.25 MHz Modeline "1600x900" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync # 1920x1080 59.93 Hz (CVT 2.07M9-R) hsync: 66.59 kHz; pclk: 138.50 MHz Modeline "1920x1080R" 138.50 1920 1968 2000 2080 1080 1083 1088 1111 +hsync -vsync # 1920x1080 59.96 Hz (CVT 2.07M9) hsync: 67.16 kHz; pclk: 173.00 MHz Modeline "1920x1080" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync # 2048x1152 59.91 Hz (CVT 2.36M9-R) hsync: 70.99 kHz; pclk: 156.75 MHz Modeline "2048x1152R" 156.75 2048 2096 2128 2208 1152 1155 1160 1185 +hsync -vsync # 2048x1152 59.90 Hz (CVT 2.36M9) hsync: 71.58 kHz; pclk: 197.00 MHz Modeline "2048x1152" 197.00 2048 2184 2400 2752 1152 1155 1160 1195 -hsync +vsync # 2560x1440 59.95 Hz (CVT 3.69M9-R) hsync: 88.79 kHz; pclk: 241.50 MHz Modeline "2560x1440R" 241.50 2560 2608 2640 2720 1440 1443 1448 1481 +hsync -vsync # 2560x1440 59.96 Hz (CVT 3.69M9) hsync: 89.52 kHz; pclk: 312.25 MHz Modeline "2560x1440" 312.25 2560 2752 3024 3488 1440 1443 1448 1493 -hsync +vsync # 2880x1620 59.97 Hz (CVT 4.67M9-R) hsync: 99.92 kHz; pclk: 303.75 MHz Modeline "2880x1620R" 303.75 2880 2928 2960 3040 1620 1623 1628 1666 +hsync -vsync # 2880x1620 59.96 Hz (CVT 4.67M9) hsync: 100.67 kHz; pclk: 396.25 MHz Modeline "2880x1620" 396.25 2880 3096 3408 3936 1620 1623 1628 1679 -hsync +vsync # 3200x1800 59.94 Hz (CVT 5.76M9-R) hsync: 111.01 kHz; pclk: 373.00 MHz Modeline "3200x1800R" 373.00 3200 3248 3280 3360 1800 1803 1808 1852 +hsync -vsync # 3200x1800 59.96 Hz (CVT 5.76M9) hsync: 111.82 kHz; pclk: 492.00 MHz Modeline "3200x1800" 492.00 3200 3456 3800 4400 1800 1803 1808 1865 -hsync +vsync # 3840x2160 59.97 Hz (CVT 8.29M9-R) hsync: 133.25 kHz; pclk: 533.00 MHz Modeline "3840x2160R" 533.00 3840 3888 3920 4000 2160 2163 2168 2222 +hsync -vsync # 3840x2160 59.98 Hz (CVT 8.29M9) hsync: 134.18 kHz; pclk: 712.75 MHz Modeline "3840x2160" 712.75 3840 4160 4576 5312 2160 2163 2168 2237 -hsync +vsync # 4096x2304 59.98 Hz (CVT 9.44M9-R) hsync: 142.15 kHz; pclk: 605.00 MHz Modeline "4096x2304R" 605.00 4096 4144 4176 4256 2304 2307 2312 2370 +hsync -vsync # 4096x2304 59.99 Hz (CVT 9.44M9) hsync: 143.13 kHz; pclk: 813.00 MHz Modeline "4096x2304" 813.00 4096 4440 4888 5680 2304 2307 2312 2386 -hsync +vsync # 5120x2880 59.99 Hz (CVT 14.75M9-R) hsync: 177.70 kHz; pclk: 938.25 MHz Modeline "5120x2880R" 938.25 5120 5168 5200 5280 2880 2883 2888 2962 +hsync -vsync # 5120x2880 59.99 Hz (CVT 14.75M9) hsync: 178.88 kHz; pclk: 1276.50 MHz Modeline "5120x2880" 1276.50 5120 5560 6128 7136 2880 2883 2888 2982 -hsync +vsync # 7680x4320 59.99 Hz (CVT 33.18M9-R) hsync: 266.55 kHz; pclk: 2089.75 MHz Modeline "7680x4320R" 2089.75 7680 7728 7760 7840 4320 4323 4328 4443 +hsync -vsync # 7680x4320 59.99 Hz (CVT 33.18M9) hsync: 268.22 kHz; pclk: 2892.50 MHz Modeline "7680x4320" 2892.50 7680 8376 9232 10784 4320 4323 4328 4471 -hsync +vsync # 15360x8640 59.99 Hz (CVT 132.71M9-R) hsync: 533.10 kHz; pclk: 8273.75 MHz Modeline "15360x8640R" 8273.75 15360 15408 15440 15520 8640 8643 8648 8886 +hsync -vsync # 15360x8640 60.00 Hz (CVT 132.71M9) hsync: 536.27 kHz; pclk: 11669.25 MHz Modeline "15360x8640" 11669.25 15360 16824 18560 21760 8640 8643 8648 8938 -hsync +vsync ## 16:10 modelines generated by cvt # 1280x800 59.91 Hz (CVT 1.02MA-R) hsync: 49.31 kHz; pclk: 71.00 MHz Modeline "1280x800R" 71.00 1280 1328 1360 1440 800 803 809 823 +hsync -vsync # 1280x800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 MHz Modeline "1280x800" 83.50 1280 1352 1480 1680 800 803 809 831 -hsync +vsync # 1400x900 59.88 Hz (CVT) hsync: 55.45 kHz; pclk: 86.50 MHz Modeline "1400x900R" 86.50 1400 1448 1480 1560 900 903 913 926 +hsync -vsync # 1400x900 59.96 Hz (CVT) hsync: 56.01 kHz; pclk: 103.50 MHz Modeline "1400x900" 103.50 1400 1480 1624 1848 900 903 913 934 -hsync +vsync # 1680x1050 59.88 Hz (CVT 1.76MA-R) hsync: 64.67 kHz; pclk: 119.00 MHz Modeline "1680x1050R" 119.00 1680 1728 1760 1840 1050 1053 1059 1080 +hsync -vsync # 1680x1050 59.95 Hz (CVT 1.76MA) hsync: 65.29 kHz; pclk: 146.25 MHz Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync # 1920x1200 59.95 Hz (CVT 2.30MA-R) hsync: 74.04 kHz; pclk: 154.00 MHz Modeline "1920x1200R" 154.00 1920 1968 2000 2080 1200 1203 1209 1235 +hsync -vsync # 1920x1200 59.88 Hz (CVT 2.30MA) hsync: 74.56 kHz; pclk: 193.25 MHz Modeline "1920x1200" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync # 2560x1600 59.97 Hz (CVT 4.10MA-R) hsync: 98.71 kHz; pclk: 268.50 MHz Modeline "2560x1600R" 268.50 2560 2608 2640 2720 1600 1603 1609 1646 +hsync -vsync # 2560x1600 59.99 Hz (CVT 4.10MA) hsync: 99.46 kHz; pclk: 348.50 MHz Modeline "2560x1600" 348.50 2560 2760 3032 3504 1600 1603 1609 1658 -hsync +vsync xorg-server-21.1.16/hw/xfree86/common/modeline2c.awk0000644000175000017500000000656714757411105015573 #!/usr/bin/awk -f # # Copyright (c) 2007 Joerg Sonnenberger . # All rights reserved. # # Based on Perl script by Dirk Hohndel. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # Usage: modeline2c.awk < modefile > xf86DefModeSet.c # BEGIN { flagsdict[""] = "0" flagsdict["+hsync +vsync"] = "V_PHSYNC | V_PVSYNC" flagsdict["+hsync -vsync"] = "V_PHSYNC | V_NVSYNC" flagsdict["-hsync +vsync"] = "V_NHSYNC | V_PVSYNC" flagsdict["-hsync -vsync"] = "V_NHSYNC | V_NVSYNC" flagsdict["+hsync +vsync interlace"] = "V_PHSYNC | V_PVSYNC | V_INTERLACE" flagsdict["+hsync -vsync interlace"] = "V_PHSYNC | V_NVSYNC | V_INTERLACE" flagsdict["-hsync +vsync interlace"] = "V_NHSYNC | V_PVSYNC | V_INTERLACE" flagsdict["-hsync -vsync interlace"] = "V_NHSYNC | V_NVSYNC | V_INTERLACE" print "/* THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT -- LOOK at" print " * modeline2c.awk */" print "" print "/*" print " * Author: Joerg Sonnenberger " print " * Based on Perl script from Dirk Hohndel " print " */" print "" print "#ifdef HAVE_XORG_CONFIG_H" print "#include " print "#endif" print "" print "#include \"xf86.h\"" print "#include \"xf86Config.h\"" print "#include \"xf86Priv.h\"" print "#include \"xf86_OSlib.h\"" print "" print "#include \"globals.h\"" print "" print "#define MODEPREFIX NULL, NULL, NULL, MODE_OK, M_T_DEFAULT" print "#define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0" print "" print "const DisplayModeRec xf86DefaultModes [] = {" modeline = "\t{MODEPREFIX,%d, %d,%d,%d,%d,0, %d,%d,%d,%d,0, %s, MODESUFFIX},\n" modeline_data = "^[a-zA-Z]+[ \t]+[^ \t]+[ \t0-9.]+" } /^[mM][oO][dD][eE][lL][iI][nN][eE]/ { flags = $0 gsub(modeline_data, "", flags) flags = tolower(flags) printf(modeline, $3 * 1000, $4, $5, $6, $7, $8, $9, $10, $11, flagsdict[flags]) # Half-width double scanned modes printf(modeline, $3 * 500, $4/2, $5/2, $6/2, $7/2, $8/2, $9/2, $10/2, $11/2, flagsdict[flags] " | V_DBLSCAN") } /^#/ { print "/*" substr($0, 2) " */" } END { print "};" printf "const int xf86NumDefaultModes = ARRAY_SIZE(xf86DefaultModes);" } xorg-server-21.1.16/hw/xfree86/ddc/0000755000175000017500000000000014757411134012354 5xorg-server-21.1.16/hw/xfree86/ddc/meson.build0000644000175000017500000000047714757411105014444 srcs_xorg_ddc = [ 'ddc.c', 'interpret_edid.c', 'print_edid.c', 'ddcProperty.c', ] xorg_ddc = static_library('xorg_ddc', srcs_xorg_ddc, include_directories: [inc, xorg_inc], dependencies: common_dep, c_args: xorg_c_args, ) install_data(['edid.h', 'xf86DDC.h'], install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/ddc/Makefile.am0000644000175000017500000000036714757411105014334 sdk_HEADERS = edid.h xf86DDC.h noinst_LTLIBRARIES = libddc.la libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = DDC.HOWTO xorg-server-21.1.16/hw/xfree86/ddc/edid.h0000644000175000017500000004612014757411105013353 /* * edid.h: defines to parse an EDID block * * This file contains all information to interpret a standard EDIC block * transmitted by a display device via DDC (Display Data Channel). So far * there is no information to deal with optional EDID blocks. * DDC is a Trademark of VESA (Video Electronics Standard Association). * * Copyright 1998 by Egbert Eich */ #ifndef _EDID_H_ #define _EDID_H_ #include #ifndef _X_EXPORT #include #endif /* read complete EDID record */ #define EDID1_LEN 128 #define BITS_PER_BYTE 9 #define NUM BITS_PER_BYTE*EDID1_LEN #define HEADER 6 #define STD_TIMINGS 8 #define DET_TIMINGS 4 #ifdef _PARSE_EDID_ /* header: 0x00 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0x00 */ #define HEADER_SECTION 0 #define HEADER_LENGTH 8 /* vendor section */ #define VENDOR_SECTION (HEADER_SECTION + HEADER_LENGTH) #define V_MANUFACTURER 0 #define V_PROD_ID (V_MANUFACTURER + 2) #define V_SERIAL (V_PROD_ID + 2) #define V_WEEK (V_SERIAL + 4) #define V_YEAR (V_WEEK + 1) #define VENDOR_LENGTH (V_YEAR + 1) /* EDID version */ #define VERSION_SECTION (VENDOR_SECTION + VENDOR_LENGTH) #define V_VERSION 0 #define V_REVISION (V_VERSION + 1) #define VERSION_LENGTH (V_REVISION + 1) /* display information */ #define DISPLAY_SECTION (VERSION_SECTION + VERSION_LENGTH) #define D_INPUT 0 #define D_HSIZE (D_INPUT + 1) #define D_VSIZE (D_HSIZE + 1) #define D_GAMMA (D_VSIZE + 1) #define FEAT_S (D_GAMMA + 1) #define D_RG_LOW (FEAT_S + 1) #define D_BW_LOW (D_RG_LOW + 1) #define D_REDX (D_BW_LOW + 1) #define D_REDY (D_REDX + 1) #define D_GREENX (D_REDY + 1) #define D_GREENY (D_GREENX + 1) #define D_BLUEX (D_GREENY + 1) #define D_BLUEY (D_BLUEX + 1) #define D_WHITEX (D_BLUEY + 1) #define D_WHITEY (D_WHITEX + 1) #define DISPLAY_LENGTH (D_WHITEY + 1) /* supported VESA and other standard timings */ #define ESTABLISHED_TIMING_SECTION (DISPLAY_SECTION + DISPLAY_LENGTH) #define E_T1 0 #define E_T2 (E_T1 + 1) #define E_TMANU (E_T2 + 1) #define E_TIMING_LENGTH (E_TMANU + 1) /* non predefined standard timings supported by display */ #define STD_TIMING_SECTION (ESTABLISHED_TIMING_SECTION + E_TIMING_LENGTH) #define STD_TIMING_INFO_LEN 2 #define STD_TIMING_INFO_NUM STD_TIMINGS #define STD_TIMING_LENGTH (STD_TIMING_INFO_LEN * STD_TIMING_INFO_NUM) /* detailed timing info of non standard timings */ #define DET_TIMING_SECTION (STD_TIMING_SECTION + STD_TIMING_LENGTH) #define DET_TIMING_INFO_LEN 18 #define MONITOR_DESC_LEN DET_TIMING_INFO_LEN #define DET_TIMING_INFO_NUM DET_TIMINGS #define DET_TIMING_LENGTH (DET_TIMING_INFO_LEN * DET_TIMING_INFO_NUM) /* number of EDID sections to follow */ #define NO_EDID (DET_TIMING_SECTION + DET_TIMING_LENGTH) /* one byte checksum */ #define CHECKSUM (NO_EDID + 1) #if (CHECKSUM != (EDID1_LEN - 1)) #error "EDID1 length != 128!" #endif #define SECTION(x,y) (Uchar *)(x + y) #define GET_ARRAY(y) ((Uchar *)(c + y)) #define GET(y) *(Uchar *)(c + y) /* extract information from vendor section */ #define _PROD_ID(x) x[0] + (x[1] << 8); #define PROD_ID _PROD_ID(GET_ARRAY(V_PROD_ID)) #define _SERIAL_NO(x) x[0] + (x[1] << 8) + (x[2] << 16) + (x[3] << 24) #define SERIAL_NO _SERIAL_NO(GET_ARRAY(V_SERIAL)) #define _YEAR(x) (x & 0xFF) + 1990 #define YEAR _YEAR(GET(V_YEAR)) #define WEEK GET(V_WEEK) & 0xFF #define _L1(x) ((x[0] & 0x7C) >> 2) + '@' #define _L2(x) ((x[0] & 0x03) << 3) + ((x[1] & 0xE0) >> 5) + '@' #define _L3(x) (x[1] & 0x1F) + '@'; #define L1 _L1(GET_ARRAY(V_MANUFACTURER)) #define L2 _L2(GET_ARRAY(V_MANUFACTURER)) #define L3 _L3(GET_ARRAY(V_MANUFACTURER)) /* extract information from version section */ #define VERSION GET(V_VERSION) #define REVISION GET(V_REVISION) /* extract information from display section */ #define _INPUT_TYPE(x) ((x & 0x80) >> 7) #define INPUT_TYPE _INPUT_TYPE(GET(D_INPUT)) #define _INPUT_VOLTAGE(x) ((x & 0x60) >> 5) #define INPUT_VOLTAGE _INPUT_VOLTAGE(GET(D_INPUT)) #define _SETUP(x) ((x & 0x10) >> 4) #define SETUP _SETUP(GET(D_INPUT)) #define _SYNC(x) (x & 0x0F) #define SYNC _SYNC(GET(D_INPUT)) #define _DFP(x) (x & 0x01) #define DFP _DFP(GET(D_INPUT)) #define _BPC(x) ((x & 0x70) >> 4) #define BPC _BPC(GET(D_INPUT)) #define _DIGITAL_INTERFACE(x) (x & 0x0F) #define DIGITAL_INTERFACE _DIGITAL_INTERFACE(GET(D_INPUT)) #define _GAMMA(x) (x == 0xff ? 0.0 : ((x + 100.0)/100.0)) #define GAMMA _GAMMA(GET(D_GAMMA)) #define HSIZE_MAX GET(D_HSIZE) #define VSIZE_MAX GET(D_VSIZE) #define _DPMS(x) ((x & 0xE0) >> 5) #define DPMS _DPMS(GET(FEAT_S)) #define _DISPLAY_TYPE(x) ((x & 0x18) >> 3) #define DISPLAY_TYPE _DISPLAY_TYPE(GET(FEAT_S)) #define _MSC(x) (x & 0x7) #define MSC _MSC(GET(FEAT_S)) /* color characteristics */ #define CC_L(x,y) ((x & (0x03 << y)) >> y) #define CC_H(x) (x << 2) #define I_CC(x,y,z) CC_H(y) | CC_L(x,z) #define F_CC(x) ((x)/1024.0) #define REDX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDX)),6)) #define REDY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_REDY)),4)) #define GREENX F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENX)),2)) #define GREENY F_CC(I_CC((GET(D_RG_LOW)),(GET(D_GREENY)),0)) #define BLUEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEX)),6)) #define BLUEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_BLUEY)),4)) #define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2)) #define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0)) /* extract information from standard timing section */ #define T1 GET(E_T1) #define T2 GET(E_T2) #define T_MANU GET(E_TMANU) /* extract information from established timing section */ #define _VALID_TIMING(x) !(((x[0] == 0x01) && (x[1] == 0x01)) \ || ((x[0] == 0x00) && (x[1] == 0x00)) \ || ((x[0] == 0x20) && (x[1] == 0x20)) ) #define VALID_TIMING _VALID_TIMING(c) #define _HSIZE1(x) ((x[0] + 31) * 8) #define HSIZE1 _HSIZE1(c) #define RATIO(x) ((x[1] & 0xC0) >> 6) #define RATIO1_1 0 /* EDID Ver. 1.3 redefined this */ #define RATIO16_10 RATIO1_1 #define RATIO4_3 1 #define RATIO5_4 2 #define RATIO16_9 3 #define _VSIZE1(x,y,r) switch(RATIO(x)){ \ case RATIO1_1: y = ((v->version > 1 || v->revision > 2) \ ? (_HSIZE1(x) * 10) / 16 : _HSIZE1(x)); break; \ case RATIO4_3: y = _HSIZE1(x) * 3 / 4; break; \ case RATIO5_4: y = _HSIZE1(x) * 4 / 5; break; \ case RATIO16_9: y = _HSIZE1(x) * 9 / 16; break; \ } #define VSIZE1(x) _VSIZE1(c,x,v) #define _REFRESH_R(x) (x[1] & 0x3F) + 60 #define REFRESH_R _REFRESH_R(c) #define _ID_LOW(x) x[0] #define ID_LOW _ID_LOW(c) #define _ID_HIGH(x) (x[1] << 8) #define ID_HIGH _ID_HIGH(c) #define STD_TIMING_ID (ID_LOW | ID_HIGH) #define _NEXT_STD_TIMING(x) (x = (x + STD_TIMING_INFO_LEN)) #define NEXT_STD_TIMING _NEXT_STD_TIMING(c) /* EDID Ver. >= 1.2 */ /** * Returns true if the pointer is the start of a monitor descriptor block * instead of a detailed timing descriptor. * * Checking the reserved pad fields for zeroes fails on some monitors with * broken empty ASCII strings. Only the first two bytes are reliable. */ #define _IS_MONITOR_DESC(x) (x[0] == 0 && x[1] == 0) #define IS_MONITOR_DESC _IS_MONITOR_DESC(c) #define _PIXEL_CLOCK(x) (x[0] + (x[1] << 8)) * 10000 #define PIXEL_CLOCK _PIXEL_CLOCK(c) #define _H_ACTIVE(x) (x[2] + ((x[4] & 0xF0) << 4)) #define H_ACTIVE _H_ACTIVE(c) #define _H_BLANK(x) (x[3] + ((x[4] & 0x0F) << 8)) #define H_BLANK _H_BLANK(c) #define _V_ACTIVE(x) (x[5] + ((x[7] & 0xF0) << 4)) #define V_ACTIVE _V_ACTIVE(c) #define _V_BLANK(x) (x[6] + ((x[7] & 0x0F) << 8)) #define V_BLANK _V_BLANK(c) #define _H_SYNC_OFF(x) (x[8] + ((x[11] & 0xC0) << 2)) #define H_SYNC_OFF _H_SYNC_OFF(c) #define _H_SYNC_WIDTH(x) (x[9] + ((x[11] & 0x30) << 4)) #define H_SYNC_WIDTH _H_SYNC_WIDTH(c) #define _V_SYNC_OFF(x) ((x[10] >> 4) + ((x[11] & 0x0C) << 2)) #define V_SYNC_OFF _V_SYNC_OFF(c) #define _V_SYNC_WIDTH(x) ((x[10] & 0x0F) + ((x[11] & 0x03) << 4)) #define V_SYNC_WIDTH _V_SYNC_WIDTH(c) #define _H_SIZE(x) (x[12] + ((x[14] & 0xF0) << 4)) #define H_SIZE _H_SIZE(c) #define _V_SIZE(x) (x[13] + ((x[14] & 0x0F) << 8)) #define V_SIZE _V_SIZE(c) #define _H_BORDER(x) (x[15]) #define H_BORDER _H_BORDER(c) #define _V_BORDER(x) (x[16]) #define V_BORDER _V_BORDER(c) #define _INTERLACED(x) ((x[17] & 0x80) >> 7) #define INTERLACED _INTERLACED(c) #define _STEREO(x) ((x[17] & 0x60) >> 5) #define STEREO _STEREO(c) #define _STEREO1(x) (x[17] & 0x1) #define STEREO1 _STEREO(c) #define _SYNC_T(x) ((x[17] & 0x18) >> 3) #define SYNC_T _SYNC_T(c) #define _MISC(x) ((x[17] & 0x06) >> 1) #define MISC _MISC(c) #define _MONITOR_DESC_TYPE(x) x[3] #define MONITOR_DESC_TYPE _MONITOR_DESC_TYPE(c) #define SERIAL_NUMBER 0xFF #define ASCII_STR 0xFE #define MONITOR_RANGES 0xFD #define _MIN_V_OFFSET(x) ((!!(x[4] & 0x01)) * 255) #define _MAX_V_OFFSET(x) ((!!(x[4] & 0x02)) * 255) #define _MIN_H_OFFSET(x) ((!!(x[4] & 0x04)) * 255) #define _MAX_H_OFFSET(x) ((!!(x[4] & 0x08)) * 255) #define _MIN_V(x) x[5] #define MIN_V (_MIN_V(c) + _MIN_V_OFFSET(c)) #define _MAX_V(x) x[6] #define MAX_V (_MAX_V(c) + _MAX_V_OFFSET(c)) #define _MIN_H(x) x[7] #define MIN_H (_MIN_H(c) + _MIN_H_OFFSET(c)) #define _MAX_H(x) x[8] #define MAX_H (_MAX_H(c) + _MAX_H_OFFSET(c)) #define _MAX_CLOCK(x) x[9] #define MAX_CLOCK _MAX_CLOCK(c) #define _DEFAULT_GTF(x) (x[10] == 0x00) #define DEFAULT_GTF _DEFAULT_GTF(c) #define _RANGE_LIMITS_ONLY(x) (x[10] == 0x01) #define RANGE_LIMITS_ONLY _RANGE_LIMITS_ONLY(c) #define _HAVE_2ND_GTF(x) (x[10] == 0x02) #define HAVE_2ND_GTF _HAVE_2ND_GTF(c) #define _F_2ND_GTF(x) (x[12] * 2) #define F_2ND_GTF _F_2ND_GTF(c) #define _C_2ND_GTF(x) (x[13] / 2) #define C_2ND_GTF _C_2ND_GTF(c) #define _M_2ND_GTF(x) (x[14] + (x[15] << 8)) #define M_2ND_GTF _M_2ND_GTF(c) #define _K_2ND_GTF(x) (x[16]) #define K_2ND_GTF _K_2ND_GTF(c) #define _J_2ND_GTF(x) (x[17] / 2) #define J_2ND_GTF _J_2ND_GTF(c) #define _HAVE_CVT(x) (x[10] == 0x04) #define HAVE_CVT _HAVE_CVT(c) #define _MAX_CLOCK_KHZ(x) (x[12] >> 2) #define MAX_CLOCK_KHZ (MAX_CLOCK * 10000) - (_MAX_CLOCK_KHZ(c) * 250) #define _MAXWIDTH(x) ((x[13] == 0 ? 0 : x[13] + ((x[12] & 0x03) << 8)) * 8) #define MAXWIDTH _MAXWIDTH(c) #define _SUPPORTED_ASPECT(x) x[14] #define SUPPORTED_ASPECT _SUPPORTED_ASPECT(c) #define SUPPORTED_ASPECT_4_3 0x80 #define SUPPORTED_ASPECT_16_9 0x40 #define SUPPORTED_ASPECT_16_10 0x20 #define SUPPORTED_ASPECT_5_4 0x10 #define SUPPORTED_ASPECT_15_9 0x08 #define _PREFERRED_ASPECT(x) ((x[15] & 0xe0) >> 5) #define PREFERRED_ASPECT _PREFERRED_ASPECT(c) #define PREFERRED_ASPECT_4_3 0 #define PREFERRED_ASPECT_16_9 1 #define PREFERRED_ASPECT_16_10 2 #define PREFERRED_ASPECT_5_4 3 #define PREFERRED_ASPECT_15_9 4 #define _SUPPORTED_BLANKING(x) ((x[15] & 0x18) >> 3) #define SUPPORTED_BLANKING _SUPPORTED_BLANKING(c) #define CVT_STANDARD 0x01 #define CVT_REDUCED 0x02 #define _SUPPORTED_SCALING(x) ((x[16] & 0xf0) >> 4) #define SUPPORTED_SCALING _SUPPORTED_SCALING(c) #define SCALING_HSHRINK 0x08 #define SCALING_HSTRETCH 0x04 #define SCALING_VSHRINK 0x02 #define SCALING_VSTRETCH 0x01 #define _PREFERRED_REFRESH(x) x[17] #define PREFERRED_REFRESH _PREFERRED_REFRESH(c) #define MONITOR_NAME 0xFC #define ADD_COLOR_POINT 0xFB #define WHITEX F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEX)),2)) #define WHITEY F_CC(I_CC((GET(D_BW_LOW)),(GET(D_WHITEY)),0)) #define _WHITEX_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 1)),2)) #define _WHITEY_ADD(x,y) F_CC(I_CC(((*(x + y))),(*(x + y + 2)),0)) #define _WHITE_INDEX1(x) x[5] #define WHITE_INDEX1 _WHITE_INDEX1(c) #define _WHITE_INDEX2(x) x[10] #define WHITE_INDEX2 _WHITE_INDEX2(c) #define WHITEX1 _WHITEX_ADD(c,6) #define WHITEY1 _WHITEY_ADD(c,6) #define WHITEX2 _WHITEX_ADD(c,12) #define WHITEY2 _WHITEY_ADD(c,12) #define _WHITE_GAMMA1(x) _GAMMA(x[9]) #define WHITE_GAMMA1 _WHITE_GAMMA1(c) #define _WHITE_GAMMA2(x) _GAMMA(x[14]) #define WHITE_GAMMA2 _WHITE_GAMMA2(c) #define ADD_STD_TIMINGS 0xFA #define COLOR_MANAGEMENT_DATA 0xF9 #define CVT_3BYTE_DATA 0xF8 #define ADD_EST_TIMINGS 0xF7 #define ADD_DUMMY 0x10 #define _NEXT_DT_MD_SECTION(x) (x = (x + DET_TIMING_INFO_LEN)) #define NEXT_DT_MD_SECTION _NEXT_DT_MD_SECTION(c) #endif /* _PARSE_EDID_ */ /* input type */ #define DIGITAL(x) x /* DFP */ #define DFP1(x) x /* input voltage level */ #define V070 0 /* 0.700V/0.300V */ #define V071 1 /* 0.714V/0.286V */ #define V100 2 /* 1.000V/0.400V */ #define V007 3 /* 0.700V/0.000V */ /* Signal level setup */ #define SIG_SETUP(x) (x) /* sync characteristics */ #define SEP_SYNC(x) (x & 0x08) #define COMP_SYNC(x) (x & 0x04) #define SYNC_O_GREEN(x) (x & 0x02) #define SYNC_SERR(x) (x & 0x01) /* DPMS features */ #define DPMS_STANDBY(x) (x & 0x04) #define DPMS_SUSPEND(x) (x & 0x02) #define DPMS_OFF(x) (x & 0x01) /* display type, analog */ #define DISP_MONO 0 #define DISP_RGB 1 #define DISP_MULTCOLOR 2 /* display color encodings, digital */ #define DISP_YCRCB444 0x01 #define DISP_YCRCB422 0x02 /* Msc stuff EDID Ver > 1.1 */ #define STD_COLOR_SPACE(x) (x & 0x4) #define PREFERRED_TIMING_MODE(x) (x & 0x2) #define GFT_SUPPORTED(x) (x & 0x1) #define GTF_SUPPORTED(x) (x & 0x1) #define CVT_SUPPORTED(x) (x & 0x1) /* detailed timing misc */ #define IS_INTERLACED(x) (x) #define IS_STEREO(x) (x) #define IS_RIGHT_STEREO(x) (x & 0x01) #define IS_LEFT_STEREO(x) (x & 0x02) #define IS_4WAY_STEREO(x) (x & 0x03) #define IS_RIGHT_ON_SYNC(x) IS_RIGHT_STEREO(x) #define IS_LEFT_ON_SYNC(x) IS_LEFT_STEREO(x) typedef unsigned int Uint; typedef unsigned char Uchar; struct vendor { char name[4]; int prod_id; Uint serial; int week; int year; }; struct edid_version { int version; int revision; }; struct disp_features { unsigned int input_type:1; unsigned int input_voltage:2; unsigned int input_setup:1; unsigned int input_sync:5; unsigned int input_dfp:1; unsigned int input_bpc:3; unsigned int input_interface:4; /* 15 bit hole */ int hsize; int vsize; float gamma; unsigned int dpms:3; unsigned int display_type:2; unsigned int msc:3; float redx; float redy; float greenx; float greeny; float bluex; float bluey; float whitex; float whitey; }; struct established_timings { Uchar t1; Uchar t2; Uchar t_manu; }; struct std_timings { int hsize; int vsize; int refresh; CARD16 id; }; struct detailed_timings { int clock; int h_active; int h_blanking; int v_active; int v_blanking; int h_sync_off; int h_sync_width; int v_sync_off; int v_sync_width; int h_size; int v_size; int h_border; int v_border; unsigned int interlaced:1; unsigned int stereo:2; unsigned int sync:2; unsigned int misc:2; unsigned int stereo_1:1; }; #define DT 0 #define DS_SERIAL 0xFF #define DS_ASCII_STR 0xFE #define DS_NAME 0xFC #define DS_RANGES 0xFD #define DS_WHITE_P 0xFB #define DS_STD_TIMINGS 0xFA #define DS_CMD 0xF9 #define DS_CVT 0xF8 #define DS_EST_III 0xF7 #define DS_DUMMY 0x10 #define DS_UNKOWN 0x100 /* type is an int */ #define DS_VENDOR 0x101 #define DS_VENDOR_MAX 0x110 /* * Display range limit Descriptor of EDID version1, reversion 4 */ typedef enum { DR_DEFAULT_GTF, DR_LIMITS_ONLY, DR_SECONDARY_GTF, DR_CVT_SUPPORTED = 4, } DR_timing_flags; struct monitor_ranges { int min_v; int max_v; int min_h; int max_h; int max_clock; /* in mhz */ int gtf_2nd_f; int gtf_2nd_c; int gtf_2nd_m; int gtf_2nd_k; int gtf_2nd_j; int max_clock_khz; int maxwidth; /* in pixels */ char supported_aspect; char preferred_aspect; char supported_blanking; char supported_scaling; int preferred_refresh; /* in hz */ DR_timing_flags display_range_timing_flags; }; struct whitePoints { int index; float white_x; float white_y; float white_gamma; }; struct cvt_timings { int width; int height; int rate; int rates; }; /* * Be careful when adding new sections; this structure can't grow, it's * embedded in the middle of xf86Monitor which is ABI. Sizes below are * in bytes, for ILP32 systems. If all else fails just copy the section * literally like serial and friends. */ struct detailed_monitor_section { int type; union { struct detailed_timings d_timings; /* 56 */ Uchar serial[13]; Uchar ascii_data[13]; Uchar name[13]; struct monitor_ranges ranges; /* 60 */ struct std_timings std_t[5]; /* 80 */ struct whitePoints wp[2]; /* 32 */ /* color management data */ struct cvt_timings cvt[4]; /* 64 */ Uchar est_iii[6]; /* 6 */ } section; /* max: 80 */ }; /* flags */ #define MONITOR_EDID_COMPLETE_RAWDATA 0x01 /* old, don't use */ #define EDID_COMPLETE_RAWDATA 0x01 /* * For DisplayID devices, only the scrnIndex, flags, and rawData fields * are meaningful. For EDID, they all are. */ typedef struct { int scrnIndex; struct vendor vendor; struct edid_version ver; struct disp_features features; struct established_timings timings1; struct std_timings timings2[8]; struct detailed_monitor_section det_mon[4]; unsigned long flags; int no_sections; Uchar *rawData; } xf86Monitor, *xf86MonPtr; extern _X_EXPORT xf86MonPtr ConfiguredMonitor; #define EXT_TAG 0 #define EXT_REV 1 #define CEA_EXT 0x02 #define VTB_EXT 0x10 #define DI_EXT 0x40 #define LS_EXT 0x50 #define MI_EXT 0x60 #define CEA_EXT_MIN_DATA_OFFSET 4 #define CEA_EXT_MAX_DATA_OFFSET 127 #define CEA_EXT_DET_TIMING_NUM 6 #define IEEE_ID_HDMI 0x000C03 #define CEA_AUDIO_BLK 1 #define CEA_VIDEO_BLK 2 #define CEA_VENDOR_BLK 3 #define CEA_SPEAKER_ALLOC_BLK 4 #define CEA_VESA_DTC_BLK 5 #define VENDOR_SUPPORT_AI(x) ((x) >> 7) #define VENDOR_SUPPORT_DC_48bit(x) ( ( (x) >> 6) & 0x01) #define VENDOR_SUPPORT_DC_36bit(x) ( ( (x) >> 5) & 0x01) #define VENDOR_SUPPORT_DC_30bit(x) ( ( (x) >> 4) & 0x01) #define VENDOR_SUPPORT_DC_Y444(x) ( ( (x) >> 3) & 0x01) #define VENDOR_LATENCY_PRESENT(x) ( (x) >> 7) #define VENDOR_LATENCY_PRESENT_I(x) ( ( (x) >> 6) & 0x01) #define HDMI_MAX_TMDS_UNIT (5000) struct cea_video_block { Uchar video_code; }; struct cea_audio_block_descriptor { Uchar audio_code[3]; }; struct cea_audio_block { struct cea_audio_block_descriptor descriptor[10]; }; struct cea_vendor_block_hdmi { Uchar portB:4; Uchar portA:4; Uchar portD:4; Uchar portC:4; Uchar support_flags; Uchar max_tmds_clock; Uchar latency_present; Uchar video_latency; Uchar audio_latency; Uchar interlaced_video_latency; Uchar interlaced_audio_latency; }; struct cea_vendor_block { unsigned char ieee_id[3]; union { struct cea_vendor_block_hdmi hdmi; /* any other vendor blocks we know about */ }; }; struct cea_speaker_block { Uchar FLR:1; Uchar LFE:1; Uchar FC:1; Uchar RLR:1; Uchar RC:1; Uchar FLRC:1; Uchar RLRC:1; Uchar FLRW:1; Uchar FLRH:1; Uchar TC:1; Uchar FCH:1; Uchar Resv:5; Uchar ResvByte; }; struct cea_data_block { Uchar len:5; Uchar tag:3; union { struct cea_video_block video; struct cea_audio_block audio; struct cea_vendor_block vendor; struct cea_speaker_block speaker; } u; }; struct cea_ext_body { Uchar tag; Uchar rev; Uchar dt_offset; Uchar flags; struct cea_data_block data_collection; }; #endif /* _EDID_H_ */ xorg-server-21.1.16/hw/xfree86/ddc/xf86DDC.h0000644000175000017500000000650414757411105013556 /* xf86DDC.h * * This file contains all information to interpret a standard EDIC block * transmitted by a display device via DDC (Display Data Channel). So far * there is no information to deal with optional EDID blocks. * DDC is a Trademark of VESA (Video Electronics Standard Association). * * Copyright 1998 by Egbert Eich */ #ifndef XF86_DDC_H #define XF86_DDC_H #include "edid.h" #include "xf86i2c.h" #include "xf86str.h" /* speed up / slow down */ typedef enum { DDC_SLOW, DDC_FAST } xf86ddcSpeed; typedef void (*DDC1SetSpeedProc) (ScrnInfoPtr, xf86ddcSpeed); extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDC1SetSpeed, unsigned int (*DDC1Read) (ScrnInfoPtr) ); extern _X_EXPORT xf86MonPtr xf86DoEDID_DDC2(ScrnInfoPtr pScrn, I2CBusPtr pBus); extern _X_EXPORT xf86MonPtr xf86DoEEDID(ScrnInfoPtr pScrn, I2CBusPtr pBus, Bool); extern _X_EXPORT xf86MonPtr xf86PrintEDID(xf86MonPtr monPtr); extern _X_EXPORT xf86MonPtr xf86InterpretEDID(int screenIndex, Uchar * block); extern _X_EXPORT xf86MonPtr xf86InterpretEEDID(int screenIndex, Uchar * block); extern _X_EXPORT void xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC); extern _X_EXPORT Bool xf86SetDDCproperties(ScrnInfoPtr pScreen, xf86MonPtr DDC); extern _X_EXPORT Bool xf86MonitorIsHDMI(xf86MonPtr mon); extern _X_EXPORT Bool gtf_supported(xf86MonPtr mon); extern _X_EXPORT DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb); extern _X_EXPORT const DisplayModeRec DMTModes[]; /* * Quirks to work around broken EDID data from various monitors. */ typedef enum { DDC_QUIRK_NONE = 0, /* First detailed mode is bogus, prefer largest mode at 60hz */ DDC_QUIRK_PREFER_LARGE_60 = 1 << 0, /* 135MHz clock is too high, drop a bit */ DDC_QUIRK_135_CLOCK_TOO_HIGH = 1 << 1, /* Prefer the largest mode at 75 Hz */ DDC_QUIRK_PREFER_LARGE_75 = 1 << 2, /* Convert detailed timing's horizontal from units of cm to mm */ DDC_QUIRK_DETAILED_H_IN_CM = 1 << 3, /* Convert detailed timing's vertical from units of cm to mm */ DDC_QUIRK_DETAILED_V_IN_CM = 1 << 4, /* Detailed timing descriptors have bogus size values, so just take the * maximum size and use that. */ DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE = 1 << 5, /* Monitor forgot to set the first detailed is preferred bit. */ DDC_QUIRK_FIRST_DETAILED_PREFERRED = 1 << 6, /* use +hsync +vsync for detailed mode */ DDC_QUIRK_DETAILED_SYNC_PP = 1 << 7, /* Force single-link DVI bandwidth limit */ DDC_QUIRK_DVI_SINGLE_LINK = 1 << 8, } ddc_quirk_t; typedef void (*handle_detailed_fn) (struct detailed_monitor_section *, void *); void xf86ForEachDetailedBlock(xf86MonPtr mon, handle_detailed_fn, void *data); ddc_quirk_t xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose); void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon, ddc_quirk_t quirks, int hsize, int vsize); typedef void (*handle_video_fn) (struct cea_video_block *, void *); void xf86ForEachVideoBlock(xf86MonPtr, handle_video_fn, void *); struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon); #endif xorg-server-21.1.16/hw/xfree86/ddc/Makefile.in0000644000175000017500000006642714757411115014357 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/ddc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libddc_la_LIBADD = am_libddc_la_OBJECTS = ddc.lo interpret_edid.lo print_edid.lo \ ddcProperty.lo libddc_la_OBJECTS = $(am_libddc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/ddc.Plo ./$(DEPDIR)/ddcProperty.Plo \ ./$(DEPDIR)/interpret_edid.Plo ./$(DEPDIR)/print_edid.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libddc_la_SOURCES) DIST_SOURCES = $(libddc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sdk_HEADERS = edid.h xf86DDC.h noinst_LTLIBRARIES = libddc.la libddc_la_SOURCES = ddc.c interpret_edid.c print_edid.c ddcProperty.c AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = DDC.HOWTO all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/ddc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/ddc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libddc.la: $(libddc_la_OBJECTS) $(libddc_la_DEPENDENCIES) $(EXTRA_libddc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libddc_la_OBJECTS) $(libddc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddcProperty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpret_edid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_edid.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/ddc.Plo -rm -f ./$(DEPDIR)/ddcProperty.Plo -rm -f ./$(DEPDIR)/interpret_edid.Plo -rm -f ./$(DEPDIR)/print_edid.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/ddc.Plo -rm -f ./$(DEPDIR)/ddcProperty.Plo -rm -f ./$(DEPDIR)/interpret_edid.Plo -rm -f ./$(DEPDIR)/print_edid.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/ddc/ddc.c0000644000175000017500000002671714757411105013205 /* xf86DDC.c * * Copyright 1998,1999 by Egbert Eich */ /* * A note on terminology. DDC1 is the original dumb serial protocol, and * can only do up to 128 bytes of EDID. DDC2 is I2C-encapsulated and * introduces extension blocks. EDID is the old display identification * block, DisplayID is the new one. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include "xf86DDC.h" #include #define RETRIES 4 typedef enum { DDCOPT_NODDC1, DDCOPT_NODDC2, DDCOPT_NODDC } DDCOpts; static const OptionInfoRec DDCOptions[] = { {DDCOPT_NODDC1, "NoDDC1", OPTV_BOOLEAN, {0}, FALSE}, {DDCOPT_NODDC2, "NoDDC2", OPTV_BOOLEAN, {0}, FALSE}, {DDCOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; /* DDC1 */ static int find_start(unsigned int *ptr) { unsigned int comp[9], test[9]; int i, j; for (i = 0; i < 9; i++) { comp[i] = *(ptr++); test[i] = 1; } for (i = 0; i < 127; i++) { for (j = 0; j < 9; j++) { test[j] = test[j] & !(comp[j] ^ *(ptr++)); } } for (i = 0; i < 9; i++) if (test[i]) return i + 1; return -1; } static unsigned char * find_header(unsigned char *block) { unsigned char *ptr, *head_ptr, *end; unsigned char header[] = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }; ptr = block; end = block + EDID1_LEN; while (ptr < end) { int i; head_ptr = ptr; for (i = 0; i < 8; i++) { if (header[i] != *(head_ptr++)) break; if (head_ptr == end) head_ptr = block; } if (i == 8) break; ptr++; } if (ptr == end) return NULL; return ptr; } static unsigned char * resort(unsigned char *s_block) { unsigned char *d_new, *d_ptr, *d_end, *s_ptr, *s_end; unsigned char tmp; s_ptr = find_header(s_block); if (!s_ptr) return NULL; s_end = s_block + EDID1_LEN; d_new = malloc(EDID1_LEN); if (!d_new) return NULL; d_end = d_new + EDID1_LEN; for (d_ptr = d_new; d_ptr < d_end; d_ptr++) { tmp = *(s_ptr++); *d_ptr = tmp; if (s_ptr == s_end) s_ptr = s_block; } free(s_block); return d_new; } static int DDC_checksum(const unsigned char *block, int len) { int i, result = 0; int not_null = 0; for (i = 0; i < len; i++) { not_null |= block[i]; result += block[i]; } #ifdef DEBUG if (result & 0xFF) ErrorF("DDC checksum not correct\n"); if (!not_null) ErrorF("DDC read all Null\n"); #endif /* catch the trivial case where all bytes are 0 */ if (!not_null) return 1; return result & 0xFF; } static unsigned char * GetEDID_DDC1(unsigned int *s_ptr) { unsigned char *d_block, *d_pos; unsigned int *s_pos, *s_end; int s_start; int i, j; s_start = find_start(s_ptr); if (s_start == -1) return NULL; s_end = s_ptr + NUM; s_pos = s_ptr + s_start; d_block = calloc(1, EDID1_LEN); if (!d_block) return NULL; d_pos = d_block; for (i = 0; i < EDID1_LEN; i++) { for (j = 0; j < 8; j++) { *d_pos <<= 1; if (*s_pos) { *d_pos |= 0x01; } s_pos++; if (s_pos == s_end) s_pos = s_ptr; }; s_pos++; if (s_pos == s_end) s_pos = s_ptr; d_pos++; } free(s_ptr); if (d_block && DDC_checksum(d_block, EDID1_LEN)) { free(d_block); return NULL; } return (resort(d_block)); } /* fetch entire EDID record; DDC bit needs to be masked */ static unsigned int * FetchEDID_DDC1(register ScrnInfoPtr pScrn, register unsigned int (*read_DDC) (ScrnInfoPtr)) { int count = NUM; unsigned int *ptr, *xp; ptr = xp = malloc(sizeof(int) * NUM); if (!ptr) return NULL; do { /* wait for next retrace */ *xp = read_DDC(pScrn); xp++; } while (--count); return ptr; } /* test if DDC1 return 0 if not */ static Bool TestDDC1(ScrnInfoPtr pScrn, unsigned int (*read_DDC) (ScrnInfoPtr)) { int old, count; old = read_DDC(pScrn); count = HEADER * BITS_PER_BYTE; do { /* wait for next retrace */ if (old != read_DDC(pScrn)) break; } while (count--); return count; } /* * read EDID record , pass it to callback function to interpret. * callback function will store it for further use by calling * function; it will also decide if we need to reread it */ static unsigned char * EDIDRead_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDCSpeed, unsigned int (*read_DDC) (ScrnInfoPtr)) { unsigned char *EDID_block = NULL; int count = RETRIES; if (!read_DDC) { xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "chipset doesn't support DDC1\n"); return NULL; }; if (TestDDC1(pScrn, read_DDC) == -1) { xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "No DDC signal\n"); return NULL; }; if (DDCSpeed) DDCSpeed(pScrn, DDC_FAST); do { EDID_block = GetEDID_DDC1(FetchEDID_DDC1(pScrn, read_DDC)); count--; } while (!EDID_block && count); if (DDCSpeed) DDCSpeed(pScrn, DDC_SLOW); return EDID_block; } /** * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC1 are * unset. EDID information blocks are interpreted and the results returned in * an xf86MonPtr. * * This function does not affect the list of modes used by drivers -- it is up * to the driver to decide policy on what to do with EDID information. * * @return pointer to a new xf86MonPtr containing the EDID information. * @return NULL if no monitor attached or failure to interpret the EDID. */ xf86MonPtr xf86DoEDID_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDC1SetSpeed, unsigned int (*DDC1Read) (ScrnInfoPtr)) { unsigned char *EDID_block = NULL; xf86MonPtr tmp = NULL; /* Default DDC and DDC1 to enabled. */ Bool noddc = FALSE, noddc1 = FALSE; OptionInfoPtr options; options = xnfalloc(sizeof(DDCOptions)); (void) memcpy(options, DDCOptions, sizeof(DDCOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); xf86GetOptValBool(options, DDCOPT_NODDC1, &noddc1); free(options); if (noddc || noddc1) return NULL; OsBlockSignals(); EDID_block = EDIDRead_DDC1(pScrn, DDC1SetSpeed, DDC1Read); OsReleaseSignals(); if (EDID_block) { tmp = xf86InterpretEDID(pScrn->scrnIndex, EDID_block); } #ifdef DEBUG else ErrorF("No EDID block returned\n"); if (!tmp) ErrorF("Cannot interpret EDID block\n"); #endif return tmp; } /* DDC2 */ static I2CDevPtr DDC2MakeDevice(I2CBusPtr pBus, int address, const char *name) { I2CDevPtr dev = NULL; if (!(dev = xf86I2CFindDev(pBus, address))) { dev = xf86CreateI2CDevRec(); dev->DevName = name; dev->SlaveAddr = address; dev->ByteTimeout = 2200; /* VESA DDC spec 3 p. 43 (+10 %) */ dev->StartTimeout = 550; dev->BitTimeout = 40; dev->AcknTimeout = 40; dev->pI2CBus = pBus; if (!xf86I2CDevInit(dev)) { xf86DrvMsg(pBus->scrnIndex, X_PROBED, "No DDC2 device\n"); return NULL; } } return dev; } static I2CDevPtr DDC2Init(I2CBusPtr pBus) { I2CDevPtr dev = NULL; /* * Slow down the bus so that older monitors don't * miss things. */ pBus->RiseFallTime = 20; dev = DDC2MakeDevice(pBus, 0x00A0, "ddc2"); if (xf86I2CProbeAddress(pBus, 0x0060)) DDC2MakeDevice(pBus, 0x0060, "E-EDID segment register"); return dev; } /* Mmmm, smell the hacks */ static void EEDIDStop(I2CDevPtr d) { } /* block is the EDID block number. a segment is two blocks. */ static Bool DDC2Read(I2CDevPtr dev, int block, unsigned char *R_Buffer) { unsigned char W_Buffer[1]; int i, segment; I2CDevPtr seg; void (*stop) (I2CDevPtr); for (i = 0; i < RETRIES; i++) { /* Stop bits reset the segment pointer to 0, so be careful here. */ segment = block >> 1; if (segment) { Bool b; if (!(seg = xf86I2CFindDev(dev->pI2CBus, 0x0060))) return FALSE; W_Buffer[0] = segment; stop = dev->pI2CBus->I2CStop; dev->pI2CBus->I2CStop = EEDIDStop; b = xf86I2CWriteRead(seg, W_Buffer, 1, NULL, 0); dev->pI2CBus->I2CStop = stop; if (!b) { dev->pI2CBus->I2CStop(dev); continue; } } W_Buffer[0] = (block & 0x01) * EDID1_LEN; if (xf86I2CWriteRead(dev, W_Buffer, 1, R_Buffer, EDID1_LEN)) { if (!DDC_checksum(R_Buffer, EDID1_LEN)) return TRUE; } } return FALSE; } /** * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are * unset. EDID information blocks are interpreted and the results returned in * an xf86MonPtr. Unlike xf86DoEDID_DDC[12](), this function will return * the complete EDID data, including all extension blocks, if the 'complete' * parameter is TRUE; * * This function does not affect the list of modes used by drivers -- it is up * to the driver to decide policy on what to do with EDID information. * * @return pointer to a new xf86MonPtr containing the EDID information. * @return NULL if no monitor attached or failure to interpret the EDID. */ xf86MonPtr xf86DoEEDID(ScrnInfoPtr pScrn, I2CBusPtr pBus, Bool complete) { unsigned char *EDID_block = NULL; xf86MonPtr tmp = NULL; I2CDevPtr dev = NULL; /* Default DDC and DDC2 to enabled. */ Bool noddc = FALSE, noddc2 = FALSE; OptionInfoPtr options; options = malloc(sizeof(DDCOptions)); if (!options) return NULL; memcpy(options, DDCOptions, sizeof(DDCOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options); xf86GetOptValBool(options, DDCOPT_NODDC, &noddc); xf86GetOptValBool(options, DDCOPT_NODDC2, &noddc2); free(options); if (noddc || noddc2) return NULL; if (!(dev = DDC2Init(pBus))) return NULL; EDID_block = calloc(1, EDID1_LEN); if (!EDID_block) return NULL; if (DDC2Read(dev, 0, EDID_block)) { int i, n = EDID_block[0x7e]; if (complete && n) { EDID_block = reallocarray(EDID_block, 1 + n, EDID1_LEN); for (i = 0; i < n; i++) DDC2Read(dev, i + 1, EDID_block + (EDID1_LEN * (1 + i))); } tmp = xf86InterpretEEDID(pScrn->scrnIndex, EDID_block); } if (tmp && complete) tmp->flags |= MONITOR_EDID_COMPLETE_RAWDATA; return tmp; } /** * Attempts to probe the monitor for EDID information, if NoDDC and NoDDC2 are * unset. EDID information blocks are interpreted and the results returned in * an xf86MonPtr. * * This function does not affect the list of modes used by drivers -- it is up * to the driver to decide policy on what to do with EDID information. * * @return pointer to a new xf86MonPtr containing the EDID information. * @return NULL if no monitor attached or failure to interpret the EDID. */ xf86MonPtr xf86DoEDID_DDC2(ScrnInfoPtr pScrn, I2CBusPtr pBus) { return xf86DoEEDID(pScrn, pBus, FALSE); } xorg-server-21.1.16/hw/xfree86/ddc/interpret_edid.c0000644000175000017500000005164314757411105015450 /* * Copyright 1998 by Egbert Eich * Copyright 2007 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * interpret_edid.c: interpret a primary EDID block */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #define _PARSE_EDID_ #include "xf86DDC.h" #include static void get_vendor_section(Uchar *, struct vendor *); static void get_version_section(Uchar *, struct edid_version *); static void get_display_section(Uchar *, struct disp_features *, struct edid_version *); static void get_established_timing_section(Uchar *, struct established_timings *); static void get_std_timing_section(Uchar *, struct std_timings *, struct edid_version *); static void fetch_detailed_block(Uchar * c, struct edid_version *ver, struct detailed_monitor_section *det_mon); static void get_dt_md_section(Uchar *, struct edid_version *, struct detailed_monitor_section *det_mon); static void copy_string(Uchar *, Uchar *); static void get_dst_timing_section(Uchar *, struct std_timings *, struct edid_version *); static void get_monitor_ranges(Uchar *, struct monitor_ranges *); static void get_whitepoint_section(Uchar *, struct whitePoints *); static void get_detailed_timing_section(Uchar *, struct detailed_timings *); static Bool validate_version(int scrnIndex, struct edid_version *); static void find_ranges_section(struct detailed_monitor_section *det, void *ranges) { if (det->type == DS_RANGES && det->section.ranges.max_clock) *(struct monitor_ranges **) ranges = &det->section.ranges; } static void find_max_detailed_clock(struct detailed_monitor_section *det, void *ret) { if (det->type == DT) { *(int *) ret = max(*((int *) ret), det->section.d_timings.clock); } } static void handle_edid_quirks(xf86MonPtr m) { struct monitor_ranges *ranges = NULL; /* * max_clock is only encoded in EDID in tens of MHz, so occasionally we * find a monitor claiming a max of 160 with a mode requiring 162, or * similar. Strictly we should refuse to round up too far, but let's * see how well this works. */ /* Try to find Monitor Range and max clock, then re-set range value */ xf86ForEachDetailedBlock(m, find_ranges_section, &ranges); if (ranges && ranges->max_clock) { int clock = 0; xf86ForEachDetailedBlock(m, find_max_detailed_clock, &clock); if (clock && (ranges->max_clock * 1e6 < clock)) { xf86Msg(X_WARNING, "EDID timing clock %.2f exceeds claimed max " "%dMHz, fixing\n", clock / 1.0e6, ranges->max_clock); ranges->max_clock = (clock + 999999) / 1e6; } } } struct det_hv_parameter { int real_hsize; int real_vsize; float target_aspect; }; static void handle_detailed_hvsize(struct detailed_monitor_section *det_mon, void *data) { struct det_hv_parameter *p = (struct det_hv_parameter *) data; float timing_aspect; if (det_mon->type == DT) { struct detailed_timings *timing; timing = &det_mon->section.d_timings; if (!timing->v_size) return; timing_aspect = (float) timing->h_size / timing->v_size; if (fabs(1 - (timing_aspect / p->target_aspect)) < 0.05) { p->real_hsize = max(p->real_hsize, timing->h_size); p->real_vsize = max(p->real_vsize, timing->v_size); } } } static void encode_aspect_ratio(xf86MonPtr m) { /* * some monitors encode the aspect ratio instead of the physical size. * try to find the largest detailed timing that matches that aspect * ratio and use that to fill in the feature section. */ if ((m->features.hsize == 16 && m->features.vsize == 9) || (m->features.hsize == 16 && m->features.vsize == 10) || (m->features.hsize == 4 && m->features.vsize == 3) || (m->features.hsize == 5 && m->features.vsize == 4)) { struct det_hv_parameter p; p.real_hsize = 0; p.real_vsize = 0; p.target_aspect = (float) m->features.hsize / m->features.vsize; xf86ForEachDetailedBlock(m, handle_detailed_hvsize, &p); if (!p.real_hsize || !p.real_vsize) { m->features.hsize = m->features.vsize = 0; } else if ((m->features.hsize * 10 == p.real_hsize) && (m->features.vsize * 10 == p.real_vsize)) { /* exact match is just unlikely, should do a better check though */ m->features.hsize = m->features.vsize = 0; } else { /* convert mm to cm */ m->features.hsize = (p.real_hsize + 5) / 10; m->features.vsize = (p.real_vsize + 5) / 10; } xf86Msg(X_INFO, "Quirked EDID physical size to %dx%d cm\n", m->features.hsize, m->features.vsize); } } xf86MonPtr xf86InterpretEDID(int scrnIndex, Uchar * block) { xf86MonPtr m; if (!block) return NULL; if (!(m = xnfcalloc(sizeof(xf86Monitor), 1))) return NULL; m->scrnIndex = scrnIndex; m->rawData = block; get_vendor_section(SECTION(VENDOR_SECTION, block), &m->vendor); get_version_section(SECTION(VERSION_SECTION, block), &m->ver); if (!validate_version(scrnIndex, &m->ver)) goto error; get_display_section(SECTION(DISPLAY_SECTION, block), &m->features, &m->ver); get_established_timing_section(SECTION(ESTABLISHED_TIMING_SECTION, block), &m->timings1); get_std_timing_section(SECTION(STD_TIMING_SECTION, block), m->timings2, &m->ver); get_dt_md_section(SECTION(DET_TIMING_SECTION, block), &m->ver, m->det_mon); m->no_sections = (int) *(char *) SECTION(NO_EDID, block); handle_edid_quirks(m); encode_aspect_ratio(m); return m; error: free(m); return NULL; } static int get_cea_detail_timing(Uchar * blk, xf86MonPtr mon, struct detailed_monitor_section *det_mon) { int dt_num; int dt_offset = ((struct cea_ext_body *) blk)->dt_offset; dt_num = 0; if (dt_offset < CEA_EXT_MIN_DATA_OFFSET) return dt_num; for (; dt_offset < (CEA_EXT_MAX_DATA_OFFSET - DET_TIMING_INFO_LEN) && dt_num < CEA_EXT_DET_TIMING_NUM; _NEXT_DT_MD_SECTION(dt_offset)) { fetch_detailed_block(blk + dt_offset, &mon->ver, det_mon + dt_num); dt_num = dt_num + 1; } return dt_num; } static void handle_cea_detail_block(Uchar * ext, xf86MonPtr mon, handle_detailed_fn fn, void *data) { int i; struct detailed_monitor_section det_mon[CEA_EXT_DET_TIMING_NUM]; int det_mon_num; det_mon_num = get_cea_detail_timing(ext, mon, det_mon); for (i = 0; i < det_mon_num; i++) fn(det_mon + i, data); } void xf86ForEachDetailedBlock(xf86MonPtr mon, handle_detailed_fn fn, void *data) { int i; Uchar *ext; if (mon == NULL) return; for (i = 0; i < DET_TIMINGS; i++) fn(mon->det_mon + i, data); for (i = 0; i < mon->no_sections; i++) { ext = mon->rawData + EDID1_LEN * (i + 1); switch (ext[EXT_TAG]) { case CEA_EXT: handle_cea_detail_block(ext, mon, fn, data); break; case VTB_EXT: case DI_EXT: case LS_EXT: case MI_EXT: break; } } } static struct cea_data_block * extract_cea_data_block(Uchar * ext, int data_type) { struct cea_ext_body *cea; struct cea_data_block *data_collection; struct cea_data_block *data_end; cea = (struct cea_ext_body *) ext; if (cea->dt_offset <= CEA_EXT_MIN_DATA_OFFSET) return NULL; data_collection = &cea->data_collection; data_end = (struct cea_data_block *) (cea->dt_offset + ext); for (; data_collection < data_end;) { if (data_type == data_collection->tag) { return data_collection; } data_collection = (void *) ((unsigned char *) data_collection + data_collection->len + 1); } return NULL; } static void handle_cea_video_block(Uchar * ext, handle_video_fn fn, void *data) { struct cea_video_block *video; struct cea_video_block *video_end; struct cea_data_block *data_collection; data_collection = extract_cea_data_block(ext, CEA_VIDEO_BLK); if (data_collection == NULL) return; video = &data_collection->u.video; video_end = (struct cea_video_block *) ((Uchar *) video + data_collection->len); for (; video < video_end; video = video + 1) { fn(video, data); } } void xf86ForEachVideoBlock(xf86MonPtr mon, handle_video_fn fn, void *data) { int i; Uchar *ext; if (mon == NULL) return; for (i = 0; i < mon->no_sections; i++) { ext = mon->rawData + EDID1_LEN * (i + 1); switch (ext[EXT_TAG]) { case CEA_EXT: handle_cea_video_block(ext, fn, data); break; case VTB_EXT: case DI_EXT: case LS_EXT: case MI_EXT: break; } } } static Bool cea_db_offsets(Uchar *cea, int *start, int *end) { /* Data block offset in CEA extension block */ *start = CEA_EXT_MIN_DATA_OFFSET; *end = cea[2]; if (*end == 0) *end = CEA_EXT_MAX_DATA_OFFSET; if (*end < CEA_EXT_MIN_DATA_OFFSET || *end > CEA_EXT_MAX_DATA_OFFSET) return FALSE; return TRUE; } static int cea_db_len(Uchar *db) { return db[0] & 0x1f; } static int cea_db_tag(Uchar *db) { return db[0] >> 5; } typedef void (*handle_cea_db_fn) (Uchar *, void *); static void cea_for_each_db(xf86MonPtr mon, handle_cea_db_fn fn, void *data) { int i; if (!mon) return; if (!(mon->flags & EDID_COMPLETE_RAWDATA)) return; if (!mon->no_sections) return; if (!mon->rawData) return; for (i = 0; i < mon->no_sections; i++) { int start, end, offset; Uchar *ext; ext = mon->rawData + EDID1_LEN * (i + 1); if (ext[EXT_TAG] != CEA_EXT) continue; if (!cea_db_offsets(ext, &start, &end)) continue; for (offset = start; offset < end && offset + cea_db_len(&ext[offset]) < end; offset += cea_db_len(&ext[offset]) + 1) fn(&ext[offset], data); } } struct find_hdmi_block_data { struct cea_data_block *hdmi; }; static void find_hdmi_block(Uchar *db, void *data) { struct find_hdmi_block_data *result = data; int oui; if (cea_db_tag(db) != CEA_VENDOR_BLK) return; if (cea_db_len(db) < 5) return; oui = (db[3] << 16) | (db[2] << 8) | db[1]; if (oui == IEEE_ID_HDMI) result->hdmi = (struct cea_data_block *)db; } struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon) { struct find_hdmi_block_data result = { NULL }; cea_for_each_db(mon, find_hdmi_block, &result); return result.hdmi; } xf86MonPtr xf86InterpretEEDID(int scrnIndex, Uchar * block) { xf86MonPtr m; m = xf86InterpretEDID(scrnIndex, block); if (!m) return NULL; /* extension parse */ return m; } static void get_vendor_section(Uchar * c, struct vendor *r) { r->name[0] = L1; r->name[1] = L2; r->name[2] = L3; r->name[3] = '\0'; r->prod_id = PROD_ID; r->serial = SERIAL_NO; r->week = WEEK; r->year = YEAR; } static void get_version_section(Uchar * c, struct edid_version *r) { r->version = VERSION; r->revision = REVISION; } static void get_display_section(Uchar * c, struct disp_features *r, struct edid_version *v) { r->input_type = INPUT_TYPE; if (!DIGITAL(r->input_type)) { r->input_voltage = INPUT_VOLTAGE; r->input_setup = SETUP; r->input_sync = SYNC; } else if (v->revision == 2 || v->revision == 3) { r->input_dfp = DFP; } else if (v->revision >= 4) { r->input_bpc = BPC; r->input_interface = DIGITAL_INTERFACE; } r->hsize = HSIZE_MAX; r->vsize = VSIZE_MAX; r->gamma = GAMMA; r->dpms = DPMS; r->display_type = DISPLAY_TYPE; r->msc = MSC; r->redx = REDX; r->redy = REDY; r->greenx = GREENX; r->greeny = GREENY; r->bluex = BLUEX; r->bluey = BLUEY; r->whitex = WHITEX; r->whitey = WHITEY; } static void get_established_timing_section(Uchar * c, struct established_timings *r) { r->t1 = T1; r->t2 = T2; r->t_manu = T_MANU; } static void get_cvt_timing_section(Uchar * c, struct cvt_timings *r) { int i; for (i = 0; i < 4; i++) { if (c[0] && c[1] && c[2]) { r[i].height = (c[0] + ((c[1] & 0xF0) << 8) + 1) * 2; switch (c[1] & 0xc0) { case 0x00: r[i].width = r[i].height * 4 / 3; break; case 0x40: r[i].width = r[i].height * 16 / 9; break; case 0x80: r[i].width = r[i].height * 16 / 10; break; case 0xc0: r[i].width = r[i].height * 15 / 9; break; } switch (c[2] & 0x60) { case 0x00: r[i].rate = 50; break; case 0x20: r[i].rate = 60; break; case 0x40: r[i].rate = 75; break; case 0x60: r[i].rate = 85; break; } r[i].rates = c[2] & 0x1f; } else { return; } c += 3; } } static void get_std_timing_section(Uchar * c, struct std_timings *r, struct edid_version *v) { int i; for (i = 0; i < STD_TIMINGS; i++) { if (VALID_TIMING) { r[i].hsize = HSIZE1; VSIZE1(r[i].vsize); r[i].refresh = REFRESH_R; r[i].id = STD_TIMING_ID; } else { r[i].hsize = r[i].vsize = r[i].refresh = r[i].id = 0; } NEXT_STD_TIMING; } } static const unsigned char empty_block[18]; static void fetch_detailed_block(Uchar * c, struct edid_version *ver, struct detailed_monitor_section *det_mon) { if (ver->version == 1 && ver->revision >= 1 && IS_MONITOR_DESC) { switch (MONITOR_DESC_TYPE) { case SERIAL_NUMBER: det_mon->type = DS_SERIAL; copy_string(c, det_mon->section.serial); break; case ASCII_STR: det_mon->type = DS_ASCII_STR; copy_string(c, det_mon->section.ascii_data); break; case MONITOR_RANGES: det_mon->type = DS_RANGES; get_monitor_ranges(c, &det_mon->section.ranges); break; case MONITOR_NAME: det_mon->type = DS_NAME; copy_string(c, det_mon->section.name); break; case ADD_COLOR_POINT: det_mon->type = DS_WHITE_P; get_whitepoint_section(c, det_mon->section.wp); break; case ADD_STD_TIMINGS: det_mon->type = DS_STD_TIMINGS; get_dst_timing_section(c, det_mon->section.std_t, ver); break; case COLOR_MANAGEMENT_DATA: det_mon->type = DS_CMD; break; case CVT_3BYTE_DATA: det_mon->type = DS_CVT; get_cvt_timing_section(c, det_mon->section.cvt); break; case ADD_EST_TIMINGS: det_mon->type = DS_EST_III; memcpy(det_mon->section.est_iii, c + 6, 6); break; case ADD_DUMMY: det_mon->type = DS_DUMMY; break; default: det_mon->type = DS_UNKOWN; break; } if (c[3] <= 0x0F && memcmp(c, empty_block, sizeof(empty_block))) { det_mon->type = DS_VENDOR + c[3]; } } else { det_mon->type = DT; get_detailed_timing_section(c, &det_mon->section.d_timings); } } static void get_dt_md_section(Uchar * c, struct edid_version *ver, struct detailed_monitor_section *det_mon) { int i; for (i = 0; i < DET_TIMINGS; i++) { fetch_detailed_block(c, ver, det_mon + i); NEXT_DT_MD_SECTION; } } static void copy_string(Uchar * c, Uchar * s) { int i; c = c + 5; for (i = 0; (i < 13 && *c != 0x0A); i++) *(s++) = *(c++); *s = 0; while (i-- && (*--s == 0x20)) *s = 0; } static void get_dst_timing_section(Uchar * c, struct std_timings *t, struct edid_version *v) { int j; c = c + 5; for (j = 0; j < 5; j++) { t[j].hsize = HSIZE1; VSIZE1(t[j].vsize); t[j].refresh = REFRESH_R; t[j].id = STD_TIMING_ID; NEXT_STD_TIMING; } } static void get_monitor_ranges(Uchar * c, struct monitor_ranges *r) { r->min_v = MIN_V; r->max_v = MAX_V; r->min_h = MIN_H; r->max_h = MAX_H; r->max_clock = 0; if (MAX_CLOCK != 0xff) /* is specified? */ r->max_clock = MAX_CLOCK * 10 + 5; r->display_range_timing_flags = c[10]; if (HAVE_2ND_GTF) { r->gtf_2nd_f = F_2ND_GTF; r->gtf_2nd_c = C_2ND_GTF; r->gtf_2nd_m = M_2ND_GTF; r->gtf_2nd_k = K_2ND_GTF; r->gtf_2nd_j = J_2ND_GTF; } else { r->gtf_2nd_f = 0; } if (HAVE_CVT) { r->max_clock_khz = MAX_CLOCK_KHZ; r->max_clock = r->max_clock_khz / 1000; r->maxwidth = MAXWIDTH; r->supported_aspect = SUPPORTED_ASPECT; r->preferred_aspect = PREFERRED_ASPECT; r->supported_blanking = SUPPORTED_BLANKING; r->supported_scaling = SUPPORTED_SCALING; r->preferred_refresh = PREFERRED_REFRESH; } else { r->max_clock_khz = 0; } } static void get_whitepoint_section(Uchar * c, struct whitePoints *wp) { wp[0].white_x = WHITEX1; wp[0].white_y = WHITEY1; wp[1].white_x = WHITEX2; wp[1].white_y = WHITEY2; wp[0].index = WHITE_INDEX1; wp[1].index = WHITE_INDEX2; wp[0].white_gamma = WHITE_GAMMA1; wp[1].white_gamma = WHITE_GAMMA2; } static void get_detailed_timing_section(Uchar * c, struct detailed_timings *r) { r->clock = PIXEL_CLOCK; r->h_active = H_ACTIVE; r->h_blanking = H_BLANK; r->v_active = V_ACTIVE; r->v_blanking = V_BLANK; r->h_sync_off = H_SYNC_OFF; r->h_sync_width = H_SYNC_WIDTH; r->v_sync_off = V_SYNC_OFF; r->v_sync_width = V_SYNC_WIDTH; r->h_size = H_SIZE; r->v_size = V_SIZE; r->h_border = H_BORDER; r->v_border = V_BORDER; r->interlaced = INTERLACED; r->stereo = STEREO; r->stereo_1 = STEREO1; r->sync = SYNC_T; r->misc = MISC; } #define MAX_EDID_MINOR 4 static Bool validate_version(int scrnIndex, struct edid_version *r) { if (r->version != 1) { xf86DrvMsg(scrnIndex, X_ERROR, "Unknown EDID version %d\n", r->version); return FALSE; } if (r->revision > MAX_EDID_MINOR) xf86DrvMsg(scrnIndex, X_WARNING, "Assuming version 1.%d is compatible with 1.%d\n", r->revision, MAX_EDID_MINOR); return TRUE; } Bool gtf_supported(xf86MonPtr mon) { int i; if (!mon) return FALSE; if ((mon->ver.version == 1) && (mon->ver.revision < 4)) { if (mon->features.msc & 0x1) return TRUE; } else { for (i = 0; i < DET_TIMINGS; i++) { struct detailed_monitor_section *det_timing_des = &(mon->det_mon[i]); if (det_timing_des && (det_timing_des->type == DS_RANGES) && (mon->features.msc & 0x1) && (det_timing_des->section.ranges.display_range_timing_flags == DR_DEFAULT_GTF || det_timing_des->section.ranges.display_range_timing_flags == DR_SECONDARY_GTF)) return TRUE; } } return FALSE; } /* * Returns true if HDMI, false if definitely not or unknown. */ Bool xf86MonitorIsHDMI(xf86MonPtr mon) { return xf86MonitorFindHDMIBlock(mon) != NULL; } xorg-server-21.1.16/hw/xfree86/ddc/print_edid.c0000644000175000017500000004641514757411105014571 /* * Copyright 1998 by Egbert Eich * Copyright 2007 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * print_edid.c: print out all information retrieved from display device */ #ifdef HAVE_XORG_CONFIG_H #include #endif /* XXX kinda gross */ #define _PARSE_EDID_ #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include "xf86DDC.h" #include "edid.h" #define EDID_WIDTH 16 static void print_vendor(int scrnIndex, struct vendor *c) { xf86DrvMsg(scrnIndex, X_INFO, "Manufacturer: %s Model: %x Serial#: %u\n", (char *) &c->name, c->prod_id, c->serial); xf86DrvMsg(scrnIndex, X_INFO, "Year: %u Week: %u\n", c->year, c->week); } static void print_version(int scrnIndex, struct edid_version *c) { xf86DrvMsg(scrnIndex, X_INFO, "EDID Version: %u.%u\n", c->version, c->revision); } static const char *digital_interfaces[] = { "undefined", "DVI", "HDMI-a", "HDMI-b", "MDDI", "DisplayPort", "unknown" }; static void print_input_features(int scrnIndex, struct disp_features *c, struct edid_version *v) { if (DIGITAL(c->input_type)) { xf86DrvMsg(scrnIndex, X_INFO, "Digital Display Input\n"); if (v->revision == 2 || v->revision == 3) { if (DFP1(c->input_dfp)) xf86DrvMsg(scrnIndex, X_INFO, "DFP 1.x compatible TMDS\n"); } else if (v->revision >= 4) { int interface = c->input_interface; int bpc = c->input_bpc; if (interface > 6) interface = 6; /* unknown */ if (bpc == 0 || bpc == 7) xf86DrvMsg(scrnIndex, X_INFO, "Undefined color depth\n"); else xf86DrvMsg(scrnIndex, X_INFO, "%d bits per channel\n", bpc * 2 + 4); xf86DrvMsg(scrnIndex, X_INFO, "Digital interface is %s\n", digital_interfaces[interface]); } } else { xf86DrvMsg(scrnIndex, X_INFO, "Analog Display Input, "); xf86ErrorF("Input Voltage Level: "); switch (c->input_voltage) { case V070: xf86ErrorF("0.700/0.300 V\n"); break; case V071: xf86ErrorF("0.714/0.286 V\n"); break; case V100: xf86ErrorF("1.000/0.400 V\n"); break; case V007: xf86ErrorF("0.700/0.700 V\n"); break; default: xf86ErrorF("undefined\n"); } if (SIG_SETUP(c->input_setup)) xf86DrvMsg(scrnIndex, X_INFO, "Signal levels configurable\n"); xf86DrvMsg(scrnIndex, X_INFO, "Sync:"); if (SEP_SYNC(c->input_sync)) xf86ErrorF(" Separate"); if (COMP_SYNC(c->input_sync)) xf86ErrorF(" Composite"); if (SYNC_O_GREEN(c->input_sync)) xf86ErrorF(" SyncOnGreen"); if (SYNC_SERR(c->input_sync)) xf86ErrorF("Serration on. " "V.Sync Pulse req. if CompSync or SyncOnGreen\n"); else xf86ErrorF("\n"); } } static void print_dpms_features(int scrnIndex, struct disp_features *c, struct edid_version *v) { if (c->dpms) { xf86DrvMsg(scrnIndex, X_INFO, "DPMS capabilities:"); if (DPMS_STANDBY(c->dpms)) xf86ErrorF(" StandBy"); if (DPMS_SUSPEND(c->dpms)) xf86ErrorF(" Suspend"); if (DPMS_OFF(c->dpms)) xf86ErrorF(" Off"); } else xf86DrvMsg(scrnIndex, X_INFO, "No DPMS capabilities specified"); if (!c->input_type) { /* analog */ switch (c->display_type) { case DISP_MONO: xf86ErrorF("; Monochrome/GrayScale Display\n"); break; case DISP_RGB: xf86ErrorF("; RGB/Color Display\n"); break; case DISP_MULTCOLOR: xf86ErrorF("; Non RGB Multicolor Display\n"); break; default: xf86ErrorF("\n"); break; } } else { int enc = c->display_type; xf86ErrorF("\n"); xf86DrvMsg(scrnIndex, X_INFO, "Supported color encodings: " "RGB 4:4:4 %s%s\n", enc & DISP_YCRCB444 ? "YCrCb 4:4:4 " : "", enc & DISP_YCRCB422 ? "YCrCb 4:2:2" : ""); } if (STD_COLOR_SPACE(c->msc)) xf86DrvMsg(scrnIndex, X_INFO, "Default color space is primary color space\n"); if (PREFERRED_TIMING_MODE(c->msc) || v->revision >= 4) { xf86DrvMsg(scrnIndex, X_INFO, "First detailed timing is preferred mode\n"); if (v->revision >= 4) xf86DrvMsg(scrnIndex, X_INFO, "Preferred mode is native pixel format and refresh rate\n"); } else if (v->revision == 3) { xf86DrvMsg(scrnIndex, X_INFO, "First detailed timing not preferred " "mode in violation of standard!\n"); } if (v->revision >= 4) { if (GFT_SUPPORTED(c->msc)) { xf86DrvMsg(scrnIndex, X_INFO, "Display is continuous-frequency\n"); } } else { if (GFT_SUPPORTED(c->msc)) xf86DrvMsg(scrnIndex, X_INFO, "GTF timings supported\n"); } } static void print_whitepoint(int scrnIndex, struct disp_features *disp) { xf86DrvMsg(scrnIndex, X_INFO, "redX: %.3f redY: %.3f ", disp->redx, disp->redy); xf86ErrorF("greenX: %.3f greenY: %.3f\n", disp->greenx, disp->greeny); xf86DrvMsg(scrnIndex, X_INFO, "blueX: %.3f blueY: %.3f ", disp->bluex, disp->bluey); xf86ErrorF("whiteX: %.3f whiteY: %.3f\n", disp->whitex, disp->whitey); } static void print_display(int scrnIndex, struct disp_features *disp, struct edid_version *v) { print_input_features(scrnIndex, disp, v); if (disp->hsize && disp->vsize) { xf86DrvMsg(scrnIndex, X_INFO, "Max Image Size [cm]: "); xf86ErrorF("horiz.: %i ", disp->hsize); xf86ErrorF("vert.: %i\n", disp->vsize); } else if (v->revision >= 4 && (disp->hsize || disp->vsize)) { if (disp->hsize) xf86DrvMsg(scrnIndex, X_INFO, "Aspect ratio: %.2f (landscape)\n", (disp->hsize + 99) / 100.0); if (disp->vsize) xf86DrvMsg(scrnIndex, X_INFO, "Aspect ratio: %.2f (portrait)\n", 100.0 / (float) (disp->vsize + 99)); } else { xf86DrvMsg(scrnIndex, X_INFO, "Indeterminate output size\n"); } if (!disp->gamma && v->revision >= 1.4) xf86DrvMsg(scrnIndex, X_INFO, "Gamma defined in extension block\n"); else xf86DrvMsg(scrnIndex, X_INFO, "Gamma: %.2f\n", disp->gamma); print_dpms_features(scrnIndex, disp, v); print_whitepoint(scrnIndex, disp); } static void print_established_timings(int scrnIndex, struct established_timings *t) { unsigned char c; if (t->t1 || t->t2 || t->t_manu) xf86DrvMsg(scrnIndex, X_INFO, "Supported established timings:\n"); c = t->t1; if (c & 0x80) xf86DrvMsg(scrnIndex, X_INFO, "720x400@70Hz\n"); if (c & 0x40) xf86DrvMsg(scrnIndex, X_INFO, "720x400@88Hz\n"); if (c & 0x20) xf86DrvMsg(scrnIndex, X_INFO, "640x480@60Hz\n"); if (c & 0x10) xf86DrvMsg(scrnIndex, X_INFO, "640x480@67Hz\n"); if (c & 0x08) xf86DrvMsg(scrnIndex, X_INFO, "640x480@72Hz\n"); if (c & 0x04) xf86DrvMsg(scrnIndex, X_INFO, "640x480@75Hz\n"); if (c & 0x02) xf86DrvMsg(scrnIndex, X_INFO, "800x600@56Hz\n"); if (c & 0x01) xf86DrvMsg(scrnIndex, X_INFO, "800x600@60Hz\n"); c = t->t2; if (c & 0x80) xf86DrvMsg(scrnIndex, X_INFO, "800x600@72Hz\n"); if (c & 0x40) xf86DrvMsg(scrnIndex, X_INFO, "800x600@75Hz\n"); if (c & 0x20) xf86DrvMsg(scrnIndex, X_INFO, "832x624@75Hz\n"); if (c & 0x10) xf86DrvMsg(scrnIndex, X_INFO, "1024x768@87Hz (interlaced)\n"); if (c & 0x08) xf86DrvMsg(scrnIndex, X_INFO, "1024x768@60Hz\n"); if (c & 0x04) xf86DrvMsg(scrnIndex, X_INFO, "1024x768@70Hz\n"); if (c & 0x02) xf86DrvMsg(scrnIndex, X_INFO, "1024x768@75Hz\n"); if (c & 0x01) xf86DrvMsg(scrnIndex, X_INFO, "1280x1024@75Hz\n"); c = t->t_manu; if (c & 0x80) xf86DrvMsg(scrnIndex, X_INFO, "1152x864@75Hz\n"); xf86DrvMsg(scrnIndex, X_INFO, "Manufacturer's mask: %X\n", c & 0x7F); } static void print_std_timings(int scrnIndex, struct std_timings *t) { int i; char done = 0; for (i = 0; i < STD_TIMINGS; i++) { if (t[i].hsize > 256) { /* sanity check */ if (!done) { xf86DrvMsg(scrnIndex, X_INFO, "Supported standard timings:\n"); done = 1; } xf86DrvMsg(scrnIndex, X_INFO, "#%i: hsize: %i vsize %i refresh: %i vid: %i\n", i, t[i].hsize, t[i].vsize, t[i].refresh, t[i].id); } } } static void print_cvt_timings(int si, struct cvt_timings *t) { int i; for (i = 0; i < 4; i++) { if (t[i].height) { xf86DrvMsg(si, X_INFO, "%dx%d @ %s%s%s%s%s Hz\n", t[i].width, t[i].height, t[i].rates & 0x10 ? "50," : "", t[i].rates & 0x08 ? "60," : "", t[i].rates & 0x04 ? "75," : "", t[i].rates & 0x02 ? "85," : "", t[i].rates & 0x01 ? "60RB" : ""); } else break; } } static void print_detailed_timings(int scrnIndex, struct detailed_timings *t) { if (t->clock > 15000000) { /* sanity check */ xf86DrvMsg(scrnIndex, X_INFO, "Supported detailed timing:\n"); xf86DrvMsg(scrnIndex, X_INFO, "clock: %.1f MHz ", t->clock / 1000000.0); xf86ErrorF("Image Size: %i x %i mm\n", t->h_size, t->v_size); xf86DrvMsg(scrnIndex, X_INFO, "h_active: %i h_sync: %i h_sync_end %i h_blank_end %i ", t->h_active, t->h_sync_off + t->h_active, t->h_sync_off + t->h_sync_width + t->h_active, t->h_active + t->h_blanking); xf86ErrorF("h_border: %i\n", t->h_border); xf86DrvMsg(scrnIndex, X_INFO, "v_active: %i v_sync: %i v_sync_end %i v_blanking: %i ", t->v_active, t->v_sync_off + t->v_active, t->v_sync_off + t->v_sync_width + t->v_active, t->v_active + t->v_blanking); xf86ErrorF("v_border: %i\n", t->v_border); if (IS_STEREO(t->stereo)) { xf86DrvMsg(scrnIndex, X_INFO, "Stereo: "); if (IS_RIGHT_STEREO(t->stereo)) { if (!t->stereo_1) xf86ErrorF("right channel on sync\n"); else xf86ErrorF("left channel on sync\n"); } else if (IS_LEFT_STEREO(t->stereo)) { if (!t->stereo_1) xf86ErrorF("right channel on even line\n"); else xf86ErrorF("left channel on evel line\n"); } if (IS_4WAY_STEREO(t->stereo)) { if (!t->stereo_1) xf86ErrorF("4-way interleaved\n"); else xf86ErrorF("side-by-side interleaved"); } } } } /* This function handle all detailed patchs, * including EDID and EDID-extension */ struct det_print_parameter { xf86MonPtr m; int index; ddc_quirk_t quirks; }; static void handle_detailed_print(struct detailed_monitor_section *det_mon, void *data) { int j, scrnIndex; struct det_print_parameter *p; p = (struct det_print_parameter *) data; scrnIndex = p->m->scrnIndex; xf86DetTimingApplyQuirks(det_mon, p->quirks, p->m->features.hsize, p->m->features.vsize); switch (det_mon->type) { case DT: print_detailed_timings(scrnIndex, &det_mon->section.d_timings); break; case DS_SERIAL: xf86DrvMsg(scrnIndex, X_INFO, "Serial No: %s\n", det_mon->section.serial); break; case DS_ASCII_STR: xf86DrvMsg(scrnIndex, X_INFO, " %s\n", det_mon->section.ascii_data); break; case DS_NAME: xf86DrvMsg(scrnIndex, X_INFO, "Monitor name: %s\n", det_mon->section.name); break; case DS_RANGES: { struct monitor_ranges *r = &det_mon->section.ranges; xf86DrvMsg(scrnIndex, X_INFO, "Ranges: V min: %i V max: %i Hz, H min: %i H max: %i kHz,", r->min_v, r->max_v, r->min_h, r->max_h); if (r->max_clock_khz != 0) { xf86ErrorF(" PixClock max %i kHz\n", r->max_clock_khz); if (r->maxwidth) xf86DrvMsg(scrnIndex, X_INFO, "Maximum pixel width: %d\n", r->maxwidth); xf86DrvMsg(scrnIndex, X_INFO, "Supported aspect ratios:"); if (r->supported_aspect & SUPPORTED_ASPECT_4_3) xf86ErrorF(" 4:3%s", r->preferred_aspect == PREFERRED_ASPECT_4_3 ? "*" : ""); if (r->supported_aspect & SUPPORTED_ASPECT_16_9) xf86ErrorF(" 16:9%s", r->preferred_aspect == PREFERRED_ASPECT_16_9 ? "*" : ""); if (r->supported_aspect & SUPPORTED_ASPECT_16_10) xf86ErrorF(" 16:10%s", r->preferred_aspect == PREFERRED_ASPECT_16_10 ? "*" : ""); if (r->supported_aspect & SUPPORTED_ASPECT_5_4) xf86ErrorF(" 5:4%s", r->preferred_aspect == PREFERRED_ASPECT_5_4 ? "*" : ""); if (r->supported_aspect & SUPPORTED_ASPECT_15_9) xf86ErrorF(" 15:9%s", r->preferred_aspect == PREFERRED_ASPECT_15_9 ? "*" : ""); xf86ErrorF("\n"); xf86DrvMsg(scrnIndex, X_INFO, "Supported blankings:"); if (r->supported_blanking & CVT_STANDARD) xf86ErrorF(" standard"); if (r->supported_blanking & CVT_REDUCED) xf86ErrorF(" reduced"); xf86ErrorF("\n"); xf86DrvMsg(scrnIndex, X_INFO, "Supported scalings:"); if (r->supported_scaling & SCALING_HSHRINK) xf86ErrorF(" hshrink"); if (r->supported_scaling & SCALING_HSTRETCH) xf86ErrorF(" hstretch"); if (r->supported_scaling & SCALING_VSHRINK) xf86ErrorF(" vshrink"); if (r->supported_scaling & SCALING_VSTRETCH) xf86ErrorF(" vstretch"); xf86ErrorF("\n"); if (r->preferred_refresh) xf86DrvMsg(scrnIndex, X_INFO, "Preferred refresh rate: %d\n", r->preferred_refresh); else xf86DrvMsg(scrnIndex, X_INFO, "Buggy monitor, no preferred " "refresh rate given\n"); } else if (r->max_clock != 0) { xf86ErrorF(" PixClock max %i MHz\n", r->max_clock); } else { xf86ErrorF("\n"); } if (r->gtf_2nd_f > 0) xf86DrvMsg(scrnIndex, X_INFO, " 2nd GTF parameters: f: %i kHz " "c: %i m: %i k %i j %i\n", r->gtf_2nd_f, r->gtf_2nd_c, r->gtf_2nd_m, r->gtf_2nd_k, r->gtf_2nd_j); break; } case DS_STD_TIMINGS: for (j = 0; j < 5; j++) xf86DrvMsg(scrnIndex, X_INFO, "#%i: hsize: %i vsize %i refresh: %i " "vid: %i\n", p->index, det_mon->section.std_t[j].hsize, det_mon->section.std_t[j].vsize, det_mon->section.std_t[j].refresh, det_mon->section.std_t[j].id); break; case DS_WHITE_P: for (j = 0; j < 2; j++) if (det_mon->section.wp[j].index != 0) xf86DrvMsg(scrnIndex, X_INFO, "White point %i: whiteX: %f, whiteY: %f; gamma: %f\n", det_mon->section.wp[j].index, det_mon->section.wp[j].white_x, det_mon->section.wp[j].white_y, det_mon->section.wp[j].white_gamma); break; case DS_CMD: xf86DrvMsg(scrnIndex, X_INFO, "Color management data: (not decoded)\n"); break; case DS_CVT: xf86DrvMsg(scrnIndex, X_INFO, "CVT 3-byte-code modes:\n"); print_cvt_timings(scrnIndex, det_mon->section.cvt); break; case DS_EST_III: xf86DrvMsg(scrnIndex, X_INFO, "Established timings III: (not decoded)\n"); break; case DS_DUMMY: default: break; } if (det_mon->type >= DS_VENDOR && det_mon->type <= DS_VENDOR_MAX) { xf86DrvMsg(scrnIndex, X_INFO, "Unknown vendor-specific block %x\n", det_mon->type - DS_VENDOR); } p->index = p->index + 1; } static void print_number_sections(int scrnIndex, int num) { if (num) xf86DrvMsg(scrnIndex, X_INFO, "Number of EDID sections to follow: %i\n", num); } xf86MonPtr xf86PrintEDID(xf86MonPtr m) { CARD16 i, j, n; char buf[EDID_WIDTH * 2 + 1]; struct det_print_parameter p; if (!m) return NULL; print_vendor(m->scrnIndex, &m->vendor); print_version(m->scrnIndex, &m->ver); print_display(m->scrnIndex, &m->features, &m->ver); print_established_timings(m->scrnIndex, &m->timings1); print_std_timings(m->scrnIndex, m->timings2); p.m = m; p.index = 0; p.quirks = xf86DDCDetectQuirks(m->scrnIndex, m, FALSE); xf86ForEachDetailedBlock(m, handle_detailed_print, &p); print_number_sections(m->scrnIndex, m->no_sections); /* extension block section stuff */ xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n"); n = 128; if (m->flags & EDID_COMPLETE_RAWDATA) n += m->no_sections * 128; for (i = 0; i < n; i += j) { for (j = 0; j < EDID_WIDTH; ++j) { sprintf(&buf[j * 2], "%02x", m->rawData[i + j]); } xf86DrvMsg(m->scrnIndex, X_INFO, "\t%s\n", buf); } return m; } xorg-server-21.1.16/hw/xfree86/ddc/ddcProperty.c0000644000175000017500000000474214757411105014744 /* * Copyright 2006 Luc Verhaegen. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86DDC.h" #include "xf86Priv.h" #include #include "property.h" #include "propertyst.h" #include #define EDID1_ATOM_NAME "XFree86_DDC_EDID1_RAWDATA" static int edidSize(const xf86MonPtr DDC) { int ret = 128; if (DDC->flags & EDID_COMPLETE_RAWDATA) ret += DDC->no_sections * 128; return ret; } static void setRootWindowEDID(ScreenPtr pScreen, xf86MonPtr DDC) { Atom atom = MakeAtom(EDID1_ATOM_NAME, strlen(EDID1_ATOM_NAME), TRUE); dixChangeWindowProperty(serverClient, pScreen->root, atom, XA_INTEGER, 8, PropModeReplace, edidSize(DDC), DDC->rawData, FALSE); } static void addEDIDProp(CallbackListPtr *pcbl, void *scrn, void *screen) { ScreenPtr pScreen = screen; ScrnInfoPtr pScrn = scrn; if (xf86ScreenToScrn(pScreen) == pScrn) setRootWindowEDID(pScreen, pScrn->monitor->DDC); } Bool xf86SetDDCproperties(ScrnInfoPtr pScrn, xf86MonPtr DDC) { if (!pScrn || !pScrn->monitor || !DDC) return FALSE; xf86EdidMonitorSet(pScrn->scrnIndex, pScrn->monitor, DDC); if (xf86Initialising) AddCallback(&RootWindowFinalizeCallback, addEDIDProp, pScrn); else setRootWindowEDID(pScrn->pScreen, DDC); return TRUE; } xorg-server-21.1.16/hw/xfree86/ddc/DDC.HOWTO0000644000175000017500000000723614757411105013516 DDC.HOWTO This file describes how to add DDC support to a chipset driver. 1) DDC INITIALIZATION When implementing DDC in the driver one has the choice between DDC1 and DDC2. DDC1 data is continuously transmitted by a DDC1 capable display device. The data is send serially over a data line; the Vsync signal serves as clock. Only one EDID 1.x data block can be transmitted using DDC1. Since transmission of an EDID1 block using a regular Vsync frequency would take up several seconds the driver can increase the Vsync frequency to up to 25 kHz as soon as it detects DDC1 activity on the data line. DDC2 data is transmitted using the I2C protocol. This requires an additional clock line. DDC2 is capable of transmitting EDID1 and EDID2 block as well as a VDIF block on display devices that support these. Display devices switch into the DDC2 mode as soon as they detect activity on the DDC clock line. Once the are in DDC2 mode they stop transmitting DDC1 signals until the next power cycle. Some graphics chipset configurations which are not capable of DDC2 might still be able to read DDC1 data. Where available DDC2 it is preferable. All relevant prototypes and defines are in xf86DDC.h. DDC2 additionally requires I2C support. The I2C prototypes are in xf86i2c.h. DDC1 Support: The driver has to provide a read function which waits for the end of the next Vsync signal and reads in and returns the status of the DDC line: unsigned int XXX_ddc1Read(ScrnInfoPtr pScrn) Additionally a function is required to increase the Vsync frequency to max. 25 kHz. void XXX_ddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) If the speed argument is DDC_FAST the function should increase the Vsync frequency on DDC_SLOW it should restore the original value. For convenience a generic ddc1SetSpeed() function is provided in the vga module for VGA-like chipsets. void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, sf86ddcSpeed speed). To read out the DDC1 data the driver should call xf86MonPtr xf86DoEDID_DDC1(int scrnIndex, void (*DDC1SetSpeed)(ScrnInfoPtr, xf86ddcSpeed), unsigned int (*DDC1Read)(ScrnInfoPtr)) in PreInit(). DDC1SetSpeed is a pointer to the SetSpeed() function, DDC1Read has to point to the DDC1 read function. The function will return a pointer to the xf86Monitor structure which contains all information retrieved by DDC. NULL will be returned on failure. DDC2 Support To read out DDC2 information I2C has to be initialized first. (See documentation for the i2c module). The function xf86MonPtr xf86DoEDID_DDC2(int scrnIndex, I2CBusPtr pBus) is provided to read out and process DDC2 data. A pointer to the I2CBusRec of the appropriate I2C Bus has to be passed as the second argument. The function will return a pointer to the xf86Monitor structure which contains all information retrieved by DDC. NULL will be returned on failure. Printing monitor parameters To print out the information contained in the xf86Monitor structure the function xf86MonPtr xf86PrintEDID(xf86MonPtr monitor) is provided. Further processing of the xf86Monitor structure is not yet implemented. However, it is planned to use the information about video modes, gamma values etc. Therefore it is strongly recommended to read out DDC data before any video mode processing is done. $XFree86: xc/programs/Xserver/hw/xfree86/ddc/DDC.HOWTO,v 1.2 1998/12/06 13:30:39 dawes Exp $ xorg-server-21.1.16/hw/xfree86/dixmods/0000755000175000017500000000000014757411134013271 5xorg-server-21.1.16/hw/xfree86/dixmods/meson.build0000644000175000017500000000162114757411105015351 shared_module( 'wfb', 'fbmodule.c', include_directories: [inc, xorg_inc], c_args: [ xorg_c_args, wfb_args ], dependencies: common_dep, link_whole: libxserver_wfb, link_with: e, install: true, install_dir: module_dir, ) shared_module( 'shadow', 'shmodule.c', include_directories: [inc, xorg_inc], c_args: xorg_c_args, dependencies: common_dep, link_whole: libxserver_miext_shadow, link_with: e, install: true, install_dir: module_dir, ) if build_glx shared_module( 'glx', [ 'glxmodule.c', srcs_glxdri2 ], include_directories: [ inc, xorg_inc, glx_inc ], c_args: [ xorg_c_args, glx_align64 ], dependencies: [ common_dep, dl_dep, dri_dep ], link_whole: libxserver_glx, link_with: e, install: true, install_dir: join_paths(module_dir, 'extensions') ) endif xorg-server-21.1.16/hw/xfree86/dixmods/Makefile.am0000644000175000017500000000225714757411105015251 noinst_LTLIBRARIES = libdixmods.la if GLX GLXMODS = libglx.la endif module_LTLIBRARIES = libwfb.la \ libshadow.la extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = $(GLXMODS) AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_INCS@ \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/glx libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la libwfb_la_SOURCES = fbmodule.c libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS) if DRI2 libglx_la_LIBADD += $(top_builddir)/glx/libglxdri.la if NO_UNDEFINED libglx_la_LIBADD += $(LIBDRM_LIBS) $(PIXMAN_LIBS) endif endif libglx_la_SOURCES = glxmodule.c libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la libshadow_la_SOURCES = shmodule.c libdixmods_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h libdixmods_la_CFLAGS = $(AM_CFLAGS) xorg-server-21.1.16/hw/xfree86/dixmods/Makefile.in0000644000175000017500000010575014757411115015265 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @DRI2_TRUE@am__append_1 = $(top_builddir)/glx/libglxdri.la @DRI2_TRUE@@NO_UNDEFINED_TRUE@am__append_2 = $(LIBDRM_LIBS) $(PIXMAN_LIBS) subdir = hw/xfree86/dixmods ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(extsmoduledir)" \ "$(DESTDIR)$(moduledir)" LTLIBRARIES = $(extsmodule_LTLIBRARIES) $(module_LTLIBRARIES) \ $(noinst_LTLIBRARIES) libdixmods_la_LIBADD = am_libdixmods_la_OBJECTS = libdixmods_la-miinitext.lo libdixmods_la_OBJECTS = $(am_libdixmods_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdixmods_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdixmods_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__DEPENDENCIES_1 = @DRI2_TRUE@@NO_UNDEFINED_TRUE@am__DEPENDENCIES_2 = \ @DRI2_TRUE@@NO_UNDEFINED_TRUE@ $(am__DEPENDENCIES_1) \ @DRI2_TRUE@@NO_UNDEFINED_TRUE@ $(am__DEPENDENCIES_1) libglx_la_DEPENDENCIES = $(top_builddir)/glx/libglx.la \ $(am__DEPENDENCIES_1) $(am__append_1) $(am__DEPENDENCIES_2) am_libglx_la_OBJECTS = glxmodule.lo libglx_la_OBJECTS = $(am_libglx_la_OBJECTS) libglx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libglx_la_LDFLAGS) $(LDFLAGS) -o $@ @GLX_TRUE@am_libglx_la_rpath = -rpath $(extsmoduledir) libshadow_la_DEPENDENCIES = $(top_builddir)/miext/shadow/libshadow.la am_libshadow_la_OBJECTS = shmodule.lo libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS) libshadow_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libshadow_la_LDFLAGS) $(LDFLAGS) -o $@ libwfb_la_DEPENDENCIES = $(top_builddir)/fb/libwfb.la am_libwfb_la_OBJECTS = libwfb_la-fbmodule.lo libwfb_la_OBJECTS = $(am_libwfb_la_OBJECTS) libwfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libwfb_la_CFLAGS) \ $(CFLAGS) $(libwfb_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/glxmodule.Plo \ ./$(DEPDIR)/libdixmods_la-miinitext.Plo \ ./$(DEPDIR)/libwfb_la-fbmodule.Plo ./$(DEPDIR)/shmodule.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdixmods_la_SOURCES) $(libglx_la_SOURCES) \ $(libshadow_la_SOURCES) $(libwfb_la_SOURCES) DIST_SOURCES = $(libdixmods_la_SOURCES) $(libglx_la_SOURCES) \ $(libshadow_la_SOURCES) $(libwfb_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdixmods.la @GLX_TRUE@GLXMODS = libglx.la module_LTLIBRARIES = libwfb.la \ libshadow.la extsmoduledir = $(moduledir)/extensions extsmodule_LTLIBRARIES = $(GLXMODS) AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_INCS@ \ -I$(top_srcdir)/hw/xfree86/loader \ -I$(top_srcdir)/miext/shadow \ -I$(top_srcdir)/glx libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la libwfb_la_SOURCES = fbmodule.c libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libglx_la_LIBADD = $(top_builddir)/glx/libglx.la $(GLX_SYS_LIBS) \ $(am__append_1) $(am__append_2) libglx_la_SOURCES = glxmodule.c libshadow_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libshadow_la_LIBADD = $(top_builddir)/miext/shadow/libshadow.la libshadow_la_SOURCES = shmodule.c libdixmods_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h libdixmods_la_CFLAGS = $(AM_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/dixmods/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/dixmods/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-extsmoduleLTLIBRARIES: $(extsmodule_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(extsmodule_LTLIBRARIES)'; test -n "$(extsmoduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(extsmoduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(extsmoduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(extsmoduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(extsmoduledir)"; \ } uninstall-extsmoduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(extsmodule_LTLIBRARIES)'; test -n "$(extsmoduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(extsmoduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(extsmoduledir)/$$f"; \ done clean-extsmoduleLTLIBRARIES: -test -z "$(extsmodule_LTLIBRARIES)" || rm -f $(extsmodule_LTLIBRARIES) @list='$(extsmodule_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdixmods.la: $(libdixmods_la_OBJECTS) $(libdixmods_la_DEPENDENCIES) $(EXTRA_libdixmods_la_DEPENDENCIES) $(AM_V_CCLD)$(libdixmods_la_LINK) $(libdixmods_la_OBJECTS) $(libdixmods_la_LIBADD) $(LIBS) libglx.la: $(libglx_la_OBJECTS) $(libglx_la_DEPENDENCIES) $(EXTRA_libglx_la_DEPENDENCIES) $(AM_V_CCLD)$(libglx_la_LINK) $(am_libglx_la_rpath) $(libglx_la_OBJECTS) $(libglx_la_LIBADD) $(LIBS) libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES) $(EXTRA_libshadow_la_DEPENDENCIES) $(AM_V_CCLD)$(libshadow_la_LINK) -rpath $(moduledir) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS) libwfb.la: $(libwfb_la_OBJECTS) $(libwfb_la_DEPENDENCIES) $(EXTRA_libwfb_la_DEPENDENCIES) $(AM_V_CCLD)$(libwfb_la_LINK) -rpath $(moduledir) $(libwfb_la_OBJECTS) $(libwfb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdixmods_la-miinitext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmodule.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libdixmods_la-miinitext.lo: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdixmods_la_CFLAGS) $(CFLAGS) -MT libdixmods_la-miinitext.lo -MD -MP -MF $(DEPDIR)/libdixmods_la-miinitext.Tpo -c -o libdixmods_la-miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdixmods_la-miinitext.Tpo $(DEPDIR)/libdixmods_la-miinitext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='libdixmods_la-miinitext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdixmods_la_CFLAGS) $(CFLAGS) -c -o libdixmods_la-miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c libwfb_la-fbmodule.lo: fbmodule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -MT libwfb_la-fbmodule.lo -MD -MP -MF $(DEPDIR)/libwfb_la-fbmodule.Tpo -c -o libwfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libwfb_la-fbmodule.Tpo $(DEPDIR)/libwfb_la-fbmodule.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fbmodule.c' object='libwfb_la-fbmodule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libwfb_la_CFLAGS) $(CFLAGS) -c -o libwfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(extsmoduledir)" "$(DESTDIR)$(moduledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-extsmoduleLTLIBRARIES clean-generic clean-libtool \ clean-moduleLTLIBRARIES clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/glxmodule.Plo -rm -f ./$(DEPDIR)/libdixmods_la-miinitext.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbmodule.Plo -rm -f ./$(DEPDIR)/shmodule.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-extsmoduleLTLIBRARIES \ install-moduleLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/glxmodule.Plo -rm -f ./$(DEPDIR)/libdixmods_la-miinitext.Plo -rm -f ./$(DEPDIR)/libwfb_la-fbmodule.Plo -rm -f ./$(DEPDIR)/shmodule.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-extsmoduleLTLIBRARIES \ uninstall-moduleLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-extsmoduleLTLIBRARIES clean-generic clean-libtool \ clean-moduleLTLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-extsmoduleLTLIBRARIES install-html \ install-html-am install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-extsmoduleLTLIBRARIES uninstall-moduleLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/dixmods/glxmodule.c0000644000175000017500000000455214757411105015361 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Kevin E. Martin * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Module.h" #include "xf86Priv.h" #include "xf86.h" #include "colormap.h" #include "micmap.h" #include "globals.h" #include "glxserver.h" #include "extinit.h" #include "glx_extinit.h" static MODULESETUPPROTO(glxSetup); static XF86ModuleVersionInfo VersRec = { "glx", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_EXTENSION, ABI_EXTENSION_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData glxModuleData = { &VersRec, glxSetup, NULL }; static void * glxSetup(void *module, void *opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; __GLXprovider *provider; if (setupDone) { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; } setupDone = TRUE; provider = LoaderSymbol("__glXDRI2Provider"); if (provider) GlxPushProvider(provider); xorgGlxCreateVendor(); return module; } xorg-server-21.1.16/hw/xfree86/dixmods/shmodule.c0000644000175000017500000000364314757411105015201 /* * Copyright © 2000 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_XORG_CONFIG_H #include #endif #include "xf86Module.h" #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" static XF86ModuleVersionInfo VersRec = { "shadow", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 1, 0, ABI_CLASS_ANSIC, /* Only need the ansic layer */ ABI_ANSIC_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} /* signature, to be patched into the file by a tool */ }; _X_EXPORT XF86ModuleData shadowModuleData = { &VersRec, NULL, NULL }; xorg-server-21.1.16/hw/xfree86/dixmods/fbmodule.c0000644000175000017500000000365314757411105015157 /* * Copyright (C) 1998 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Module.h" #include "fb.h" static XF86ModuleVersionInfo VersRec = { #ifdef FB_ACCESS_WRAPPER "wfb", #else "fb", #endif MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_ANSIC, /* Only need the ansic layer */ ABI_ANSIC_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} /* signature, to be patched into the file by a tool */ }; _X_EXPORT XF86ModuleData FBPREFIX(ModuleData) = { &VersRec, NULL, NULL}; xorg-server-21.1.16/hw/xfree86/doc/0000755000175000017500000000000014757411135012370 5xorg-server-21.1.16/hw/xfree86/doc/meson.build0000644000175000017500000000220514757411105014446 if build_docs_devel basename = 'ddxDesign' input_xml = basename + '.xml' custom_target( basename + '.html', output: basename + '.html', input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-xhtml.xsl'), '-o', meson.current_build_dir(), 'xhtml-nochunks', '@INPUT0@'], build_by_default: true, install: false, ) if build_docs_pdf foreach format : ['ps', 'pdf'] output_fn = basename + '.' + format custom_target( output_fn, output: output_fn, input: [input_xml], command: [xmlto] + docs_xmlto_search_flags + [ '-x', join_paths(doc_stylesheet_srcdir, 'xorg-fo.xsl'), '--stringparam', 'img.src.path=' + meson.current_build_dir(), '-o', meson.current_build_dir(), '--with-fop', format, '@INPUT0@'], build_by_default: true, install: false, ) endforeach endif endif xorg-server-21.1.16/hw/xfree86/doc/Makefile.am0000644000175000017500000000046014757411105014341 if ENABLE_DEVEL_DOCS if HAVE_XMLTO # Main DocBook/XML files (DOCTYPE book) docbook = ddxDesign.xml # Generate DocBook/XML output formats with or without stylesheets include $(top_srcdir)/devbook.am endif HAVE_XMLTO endif ENABLE_DEVEL_DOCS EXTRA_DIST = \ Registry \ exa-driver.txt \ README.modes xorg-server-21.1.16/hw/xfree86/doc/ddxDesign.xml0000644000175000017500000112423214757411105014745 %xorg-defs; %defs; Device"> Monitor"> Display"> InputDevice"> Screen"> ServerLayout"> Driver"> Module"> Identifier"> ServerFlags"> ] >
XFree86 DDX Design The XFree86 Project The X.Org Foundation JimGettys Updates for X11R6.7 &xserver.reldate; X Version 11, Release &fullrelvers; X Server Version &xserver.version; This document describes software undergoing continual evolution, and the interfaces described here are subject to change without notice. This document is intended to cover the interfaces as found in the xorg-server-&xserver.version; release, but is probably not completely in sync with the code base. Preface This document was originally the design spec for the DDX layer of the XFree86 4.0 X server. The X.Org Foundation adopted the XFree86 4.4rc2 version of that server as the basis of the Xorg server project, and has evolved the XFree86 DDX layer greatly since forking. This document thus covers only the current implementation of the XFree86 DDX as found in the Xorg server &xserver.version; release, and no longer matches the XFree86 server itself. The XFree86 Project's broad design principles for XFree86 4.0 were: keep it reasonable We cannot rewrite the complete server We don't want to re-invent the wheel keep it modular As many things as possible should go into modules The basic loader binary should be minimal A clean design with well defined layering is important DDX specific global variables are a nono The structure should be flexible enough to allow future extensions The structure should minimize duplication of common code keep important features in mind multiple screens, including multiple instances of drivers mixing different color depths and visuals on different and ideally even on the same screen better control of the PCI device used better config file parser get rid of all VGA compatibility assumptions While the XFree86 project had a goal of avoiding changes to the DIX layer unless they found major deficiencies there, to avoid divergence from the X.Org sample implementation they were integrating changes from, the X.Org developers now maintain both sides, and make changes where they are most appropriate. This document concentrates on the XFree86 DDX layer used in the Xorg server itself (the code found in hw/xfree86 in the source tree), and developers will also want to refer to the Xserver-spec documentation that covers the DIX layer routines common to all the X servers in the sample implementation. The xorg.conf File The xorg.conf file format is based on the XF86Config format from XFree86 4.4, which is in turn similar to the old XFree86 3.x XF86Config format, with the following changes: &k.device; section The &k.device; sections are similar to what they used to be, and describe hardware-specific information for a single video card. &k.device; Some new keywords are added: Driver "drivername" Specifies the name of the driver to be used for the card. This is mandatory. BusID "busslot" Specifies uniquely the location of the card on the bus. The purpose is to identify particular cards in a multi-headed configuration. The format of the argument is intentionally vague, and may be architecture dependent. For a PCI bus, it is something like "bus@domain:slot:func". The "@domain" part can be left out for domain 0. A &k.device; section is considered active if there is a reference to it in an active &k.screen; section. &k.screen; section The &k.screen; sections are similar to what they used to be. They no longer have a &k.driver; keyword, but an &k.identifier; keyword is added. (The &k.driver; keyword may be accepted in place of the &k.identifier; keyword for compatibility purposes.) The identifier can be used to identify which screen is to be active when multiple &k.screen; sections are present. It is possible to specify the active screen from the command line. A default is chosen in the absence of one being specified. A &k.screen; section is considered active if there is a reference to it either from the command line, or from an active &k.serverlayout; section. &k.inputdevice; section The &k.inputdevice; section is a new section that describes configuration information for input devices. It replaces the old Keyboard, Pointer and XInput sections. Like the &k.device; section, it has two mandatory keywords: &k.identifier; and &k.driver;. For compatibility purposes the old Keyboard and Pointer sections are converted by the parser into &k.inputdevice; sections as follows: Keyboard &k.identifier; "Implicit Core Keyboard" &k.driver; "kbd" Pointer &k.identifier; "Implicit Core Pointer" &k.driver; "mouse" An &k.inputdevice; section is considered active if there is a reference to it in an active &k.serverlayout; section. An &k.inputdevice; section may also be referenced implicitly if there is no &k.serverlayout; section, if the command line options is used, or if the &k.serverlayout; section doesn't reference any &k.inputdevice; sections. In this case, the first sections with drivers "kbd" and "mouse" are used as the core keyboard and pointer respectively. &k.serverlayout; section The &k.serverlayout; section is a new section that is used to identify which &k.screen; sections are to be used in a multi-headed configuration, and the relative layout of those screens. It also identifies which &k.inputdevice; sections are to be used. Each &k.serverlayout; section has an identifier, a list of &k.screen; section identifiers, and a list of &k.inputdevice; section identifiers. &k.serverflags; options may also be included in a &k.serverlayout; section, making it possible to override the global values in the &k.serverflags; section. A &k.serverlayout; section can be made active by being referenced on the command line. In the absence of this, a default will be chosen (the first one found). The screen names may optionally be followed by a number specifying the preferred screen number, and optionally by information specifying the physical positioning of the screen, either in absolute terms or relative to another screen (or screens). When no screen number is specified, they are numbered according to the order in which they are listed. The old (now obsolete) method of providing the positioning information is to give the names of the four adjacent screens. The order of these is top, bottom, left, right. Here is an example of a &k.serverlayout; section for two screens using the old method, with the second located to the right of the first: Section "ServerLayout" Identifier "Main Layout" Screen 0 "Screen 1" "" "" "" "Screen 2" Screen 1 "Screen 2" Screen "Screen 3" EndSection The preferred way of specifying the layout is to explicitly specify the screen's location in absolute terms or relative to another screen. In the absolute case, the upper left corner's coordinates are given after the Absolute keyword. If the coordinates are omitted, a value of (0,0) is assumed. An example of absolute positioning follows: Section "ServerLayout" Identifier "Main Layout" Screen 0 "Screen 1" Absolute 0 0 Screen 1 "Screen 2" Absolute 1024 0 Screen "Screen 3" Absolute 2048 0 EndSection In the relative case, the position is specified by either using one of the following keywords followed by the name of the reference screen: RightOf LeftOf Above Below Relative When the Relative keyword is used, the reference screen name is followed by the coordinates of the new screen's origin relative to reference screen. The following example shows how to use some of the relative positioning options. Section "ServerLayout" Identifier "Main Layout" Screen 0 "Screen 1" Screen 1 "Screen 2" RightOf "Screen 1" Screen "Screen 3" Relative "Screen 1" 2048 0 EndSection Options Options are used more extensively. They may appear in most sections now. Options related to drivers can be present in the &k.screen;, &k.device; and &k.monitor; sections and the &k.display; subsections. The order of precedence is &k.display;, &k.screen;, &k.monitor;, &k.device;. Options have been extended to allow an optional value to be specified in addition to the option name. For more details about options, see the Options section for details. Driver Interface The driver interface consists of a minimal set of entry points that are required based on the external events that the driver must react to. No non-essential structure is imposed on the way they are used beyond that. This is a significant difference compared with the old design. The entry points for drawing operations are already taken care of by the framebuffer code. Extensions and enhancements to framebuffer code are outside the scope of this document. This approach to the driver interface provides good flexibility, but does increase the complexity of drivers. To help address this, the XFree86 common layer provides a set of helper functions to take care of things that most drivers need. These helpers help minimise the amount of code duplication between drivers. The use of helper functions by drivers is however optional, though encouraged. The basic philosophy behind the helper functions is that they should be useful to many drivers, that they should balance this against the complexity of their interface. It is inevitable that some drivers may find some helpers unsuitable and need to provide their own code. Events that a driver needs to react to are: ScreenInit An initialisation function is called from the DIX layer for each screen at the start of each server generation. Enter VT The server takes control of the console. Leave VT The server releases control of the console. Mode Switch Change video mode. ViewPort change Change the origin of the physical view port. ScreenSaver state change Screen saver activation/deactivation. CloseScreen A close screen function is called from the DIX layer for each screen at the end of each server generation. In addition to these events, the following functions are required by the XFree86 common layer: Identify Print a driver identifying message. Probe This is how a driver identifies if there is any hardware present that it knows how to drive. PreInit Process information from the xorg.conf file, determine the full characteristics of the hardware, and determine if a valid configuration is present. The VidMode extension also requires: ValidMode Identify if a new mode is usable with the current configuration. The PreInit function (and/or helpers it calls) may also make use of the ValidMode function or something similar. Other extensions may require other entry points. The drivers will inform the common layer of these in such cases. Resource Access Control Introduction Graphics devices are accessed through ranges in I/O or memory space. While most modern graphics devices allow relocation of such ranges many of them still require the use of well established interfaces such as VGA memory and IO ranges or 8514/A IO ranges. With modern buses (like PCI) it is possible for multiple video devices to share access to these resources. The RAC (Resource Access Control) subsystem provides a mechanism for this. Terms and Definitions Bus Bus is ambiguous as it is used for different things: it may refer to physical incompatible extension connectors in a computer system. The RAC system knows two such systems: The ISA bus and the PCI bus. (On the software level EISA, MCA and VL buses are currently treated like ISA buses). Bus may also refer to logically different entities on a single bus system which are connected via bridges. A PCI system may have several distinct PCI buses connecting each other by PCI-PCI bridges or to the host CPU by HOST-PCI bridges. Systems that host more than one bus system link these together using bridges. Bridges are a concern to RAC as they might block or pass specific resources. PCI-PCI bridges may be set up to pass VGA resources to the secondary bus. PCI-ISA buses pass any resources not decoded on the primary PCI bus to the ISA bus. This way VGA resources (although exclusive on the ISA bus) can be shared by ISA and PCI cards. Currently HOST-PCI bridges are not yet handled by RAC as they require specific drivers. Entity The smallest independently addressable unit on a system bus is referred to as an entity. So far we know ISA and PCI entities. PCI entities can be located on the PCI bus by an unique ID consisting of the bus, card and function number. Resource Resource refers to a range of memory or I/O addresses an entity can decode. If a device is capable of disabling this decoding the resource is called shareable. For PCI devices a generic method is provided to control resource decoding. Other devices will have to provide a device specific function to control decoding. If the entity is capable of decoding this range at a different location this resource is considered relocatable. Resources which start at a specific address and occupy a single continuous range are called block resources. Alternatively resource addresses can be decoded in a way that they satisfy the conditions: address & mask == base and base & mask == base Resources addressed in such a way are called sparse resources. Server States The resource access control system knows two server states: the SETUP and the OPERATING state. The SETUP state is entered whenever a mode change takes place or the server exits or does VT switching. During this state all entity resources are under resource access control. During OPERATING state only those entities are controlled which actually have shared resources that conflict with others. Control Flow in the Server and Mandatory Driver Functions At the start of each server generation, main() (dix/main.c) calls the DDX function InitOutput(). This is the first place that the DDX gets control. InitOutput() is expected to fill in the global screenInfo struct, and one screenInfo.screen[] entry for each screen present. Here is what InitOutput() does: Parse the xorg.conf file This is done at the start of the first server generation only. The xorg.conf file is read in full, and the resulting information stored in data structures. None of the parsed information is processed at this point. The parser data structures are opaque to the video drivers and to most of the common layer code. The entire file is parsed first to remove any section ordering requirements. Initial processing of parsed information and command line options This is done at the start of the first server generation only. The initial processing is to determine paths like the ModulePath, etc, and to determine which &k.serverlayout;, &k.screen; and &k.device; sections are active. Enable port I/O access Port I/O access is controlled from the XFree86 common layer, and is all or nothing. It is enabled prior to calling driver probes, at the start of subsequent server generations, and when VT switching back to the Xserver. It is disabled at the end of server generations, and when VT switching away from the Xserver. The implementation details of this may vary on different platforms. General bus probe This is done at the start of the first server generation only. In the case of ix86 machines, this will be a general PCI probe. The full information obtained here will be available to the drivers. This information persists for the life of the Xserver. In the PCI case, the PCI information for all video cards found is available by calling xf86GetPciVideoInfo().
pciVideoPtr *xf86GetPciVideoInfo(void);
returns a pointer to a list of pointers to pciVideoRec entries, of which there is one for each detected PCI video card. The list is terminated with a NULL pointer. If no PCI video cards were detected, the return value is NULL.
After the bus probe, the resource broker is initialised.
Load initial set of modules This is done at the start of the first server generation only. The next set of modules loaded are those specified explicitly in the &k.module; section of the config file. The final set of initial modules are the driver modules referenced by the active &k.device; and &k.inputdevice; sections in the config file. Each of these modules is loaded exactly once. Register Video and Input Drivers This is done at the start of the first server generation only. When a driver module is loaded, the loader calls its Setup function. For video drivers, this function calls xf86AddDriver() to register the driver's DriverRec, which contains a small set of essential details and driver entry points required during the early phase of InitOutput(). xf86AddDriver() adds it to the global xf86DriverList[] array. The DriverRec contains the driver canonical name, the Identify(), Probe() and AvailableOptions() function entry points as well as a pointer to the driver's module (as returned from the loader when the driver was loaded) and a reference count which keeps track of how many screens are using the driver. The entry driver entry points are those required prior to the driver allocating and filling in its ScrnInfoRec. For a static server, the xf86DriverList[] array is initialised at build time, and the loading of modules is not done. A similar procedure is used for input drivers. The input driver's Setup function calls xf86AddInputDriver() to register the driver's InputDriverRec, which contains a small set of essential details and driver entry points required during the early phase of InitInput(). xf86AddInputDriver() adds it to the global xf86InputDriverList[] array. For a static server, the xf86InputDriverList[] array is initialised at build time. Both the xf86DriverList[] and xf86InputDriverList[] arrays have been initialised by the end of this stage. Once all the drivers are registered, their ChipIdentify() functions are called.
void ChipIdentify(int flags);
This is expected to print a message indicating the driver name, a short summary of what it supports, and a list of the chipset names that it supports. It may use the xf86PrintChipsets() helper to do this.
void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips);
This function provides an easy way for a driver's ChipIdentify function to format the identification message.
Initialise Access Control This is done at the start of the first server generation only. The Resource Access Control (RAC) subsystem is initialised before calling any driver functions that may access hardware. All generic bus information is probed and saved (for restoration later). All (shared resource) video devices are disabled at the generic bus level, and a probe is done to find the primary video device. These devices remain disabled for the next step. Video Driver Probe This is done at the start of the first server generation only. The ChipProbe() function of each registered video driver is called.
Bool ChipProbe(DriverPtr drv, int flags);
The purpose of this is to identify all instances of hardware supported by the driver. The flags value is currently either 0, PROBE_DEFAULT or PROBE_DETECT. PROBE_DETECT is used if "-configure" or "-probe" command line arguments are given and indicates to the Probe() function that it should not configure the bus entities and that no xorg.conf information is available. The probe must find the active device sections that match the driver by calling xf86MatchDevice(). The number of matches found limits the maximum number of instances for this driver. If no matches are found, the function should return FALSE immediately. Devices that cannot be identified by using device-independent methods should be probed at this stage (keeping in mind that access to all resources that can be disabled in a device-independent way are disabled during this phase). The probe must be a minimal probe. It should just determine if there is a card present that the driver can drive. It should use the least intrusive probe methods possible. It must not do anything that is not essential, like probing for other details such as the amount of memory installed, etc. It is recommended that the xf86MatchPciInstances() helper function be used for identifying matching PCI devices (see the RAC section). These helpers also checks and claims the appropriate entity. When not using the helper, that should be done with xf86CheckPciSlot() and xf86ClaimPciSlot() for PCI devices (see the RAC section). The probe must register all non-relocatable resources at this stage. If a resource conflict is found between exclusive resources the driver will fail immediately. This is usually best done with the xf86ConfigPciEntity() helper function for PCI. If a chipset is specified in an active device section which the driver considers relevant (ie it has no driver specified, or the driver specified matches the driver doing the probe), the Probe must return FALSE if the chipset doesn't match one supported by the driver. If there are no active device sections that the driver considers relevant, it must return FALSE. Allocate a ScrnInfoRec for each active instance of the hardware found, and fill in the basic information, including the other driver entry points. This is best done with the xf86ConfigPciEntity() for PCI instances. These functions allocate a ScrnInfoRec for active entities. Optionally xf86AllocateScreen() function may also be used to allocate the ScrnInfoRec. Any of these functions take care of initialising fields to defined unused values. Claim the entities for each instance of the hardware found. This prevents other drivers from claiming the same hardware. Must leave hardware in the same state it found it in, and must not do any hardware initialisation. All detection can be overridden via the config file, and that parsed information is available to the driver at this stage. Returns TRUE if one or more instances are found, and FALSE otherwise.
int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist)
This function takes the name of the driver and returns via driversectlist a list of device sections that match the driver name. The function return value is the number of matches found. If a fatal error is encountered the return value is -1. The caller should use xfree() to free *driversectlist when it is no longer needed.
ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags)
This function allocates a new ScrnInfoRec in the xf86Screens[] array. This function is normally called by the video driver ChipProbe() functions. The return value is a pointer to the newly allocated ScrnInfoRec. The scrnIndex, origIndex, module and drv fields are initialised. The reference count in drv is incremented. The storage for any currently allocated privates pointers is also allocated and the privates field initialised (the privates data is of course not allocated or initialised). This function never returns on failure. If the allocation fails, the server exits with a fatal error. The flags value is not currently used, and should be set to zero.
At the completion of this, a list of ScrnInfoRecs have been allocated in the xf86Screens[] array, and the associated entities and fixed resources have been claimed. The following ScrnInfoRec fields must be initialised at this point: driverVersion driverName scrnIndex(*) origIndex(*) drv(*) module(*) name Probe PreInit ScreenInit EnterVT LeaveVT numEntities entityList access (*) These are initialised when the ScrnInfoRec is allocated, and not explicitly by the driver. The following ScrnInfoRec fields must be initialised if the driver is going to use them: SwitchMode AdjustFrame FreeScreen ValidMode
Matching Screens This is done at the start of the first server generation only. After the Probe phase is finished, there will be some number of ScrnInfoRecs. These are then matched with the active &k.screen; sections in the xorg.conf, and those not having an active &k.screen; section are deleted. If the number of remaining screens is 0, InitOutput() sets screenInfo.numScreens to 0 and returns. At this point the following fields of the ScrnInfoRecs must be initialised: confScreen Allocate non-conflicting resources This is done at the start of the first server generation only. Before calling the drivers again, the resource information collected from the Probe phase is processed. This includes checking the extent of PCI resources for the probed devices, and resolving any conflicts in the relocatable PCI resources. It also reports conflicts, checks bus routing issues, and anything else that is needed to enable the entities for the next phase. If any drivers registered an EntityInit() function during the Probe phase, then they are called here. Sort the Screens and pre-check Monitor Information This is done at the start of the first server generation only. The list of screens is sorted to match the ordering requested in the config file. The list of modes for each active monitor is checked against the monitor's parameters. Invalid modes are pruned. PreInit This is done at the start of the first server generation only. For each ScrnInfoRec, enable access to the screens entities and call the ChipPreInit() function.
Bool ChipPreInit(ScrnInfoRec screen, int flags);
The purpose of this function is to find out all the information required to determine if the configuration is usable, and to initialise those parts of the ScrnInfoRec that can be set once at the beginning of the first server generation. The number of entities registered for the screen should be checked against the expected number (most drivers expect only one). The entity information for each of them should be retrieved (with xf86GetEntityInfo()) and checked for the correct bus type and that none of the shareable resources registered during the Probe phase was rejected. Access to resources for the entities that can be controlled in a device-independent way are enabled before this function is called. If the driver needs to access any resources that it has disabled in an EntityInit() function that it registered, then it may enable them here providing that it disables them before this function returns. This includes probing for video memory, clocks, ramdac, and all other HW info that is needed. It includes determining the depth/bpp/visual and related info. It includes validating and determining the set of video modes that will be used (and anything that is required to determine that). This information should be determined in the least intrusive way possible. The state of the HW must remain unchanged by this function. Although video memory (including MMIO) may be mapped within this function, it must be unmapped before returning. Driver specific information should be stored in a structure hooked into the ScrnInfoRec's driverPrivate field. Any other modules which require persistent data (ie data that persists across server generations) should be initialised in this function, and they should allocate a privates index to hook their data into by calling xf86AllocateScrnInfoPrivateIndex(). The privates data is persistent. Helper functions for some of these things are provided at the XFree86 common level, and the driver can choose to make use of them. Modules may be loaded at any point in this function, and all modules that the driver will need must be loaded before the end of this function. Either the xf86LoadSubModule() or the xf86LoadDrvSubModule() function should be used to load modules depending on whether a ScrnInfoRec has been set up. A driver may unload a module within this function if it was only needed temporarily, and the xf86UnloadSubModule() function should be used to do that. Otherwise there is no need to explicitly unload modules because the loader takes care of module dependencies and will unload submodules automatically if/when the driver module is unloaded. The bulk of the ScrnInfoRec fields should be filled out in this function. ChipPreInit() returns FALSE when the configuration is unusable in some way (unsupported depth, no valid modes, not enough video memory, etc), and TRUE if it is usable. It is expected that if the ChipPreInit() function returns TRUE, then the only reasons that subsequent stages in the driver might fail are lack or resources (like xalloc failures). All other possible reasons for failure should be determined by the ChipPreInit() function.
The ScrnInfoRecs for screens where the ChipPreInit() fails are removed. If none remain, InitOutput() sets screenInfo.numScreens to 0 and returns. At this point, further fields of the ScrnInfoRecs would normally be filled in. Most are not strictly mandatory, but many are required by other layers and/or helper functions that the driver may choose to use. The documentation for those layers and helper functions indicates which they require. The following fields of the ScrnInfoRecs should be filled in if the driver is going to use them: monitor display depth pixmapBPP bitsPerPixel weight (>8bpp only) mask (>8bpp only) offset (>8bpp only) rgbBits (8bpp only) gamma defaultVisual virtualX virtualY displayWidth frameX0 frameY0 frameX1 frameY1 zoomLocked modePool modes currentMode progClock (TRUE if clock is programmable) chipset ramdac clockchip numClocks (if not programmable) clock[] (if not programmable) videoRam memBase driverPrivate chipID chipRev
pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); and pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name);
Load a module that a driver depends on. This function loads the module name as a sub module of the driver. The return value is a handle identifying the new module. If the load fails, the return value will be NULL. If a driver needs to explicitly unload a module it has loaded in this way, the return value must be saved and passed to xf86UnloadSubModule() when unloading.
void xf86UnloadSubModule(pointer module);
Unloads the module referenced by module. module should be a pointer returned previously by xf86LoadSubModule() or xf86LoadDrvSubModule() .
Cleaning up Unused Drivers At this point it is known which screens will be in use, and which drivers are being used. Unreferenced drivers (and modules they may have loaded) are unloaded here. Consistency Checks The parameters that must be global to the server, like pixmap formats, bitmap bit order, bitmap scanline unit and image byte order are compared for each of the screens. If a mismatch is found, the server exits with an appropriate message. Check if Resource Control is Needed Determine if resource access control is needed. This is the case if more than one screen is used. If necessary the RAC wrapper module is loaded. AddScreen (ScreenInit) At this point, the valid screens are known. AddScreen() is called for each of them, passing ChipScreenInit() as the argument. AddScreen() is a DIX function that allocates a new screenInfo.screen[] entry (aka pScreen), and does some basic initialisation of it. It then calls the ChipScreenInit() function, with pScreen as one of its arguments. If ChipScreenInit() returns FALSE, AddScreen() returns -1. Otherwise it returns the index of the screen. AddScreen() should only fail because of programming errors or failure to allocate resources (like memory). All configuration problems should be detected BEFORE this point.
Bool ChipScreenInit(ScreenPtr pScreen, int argc, char **argv);
This is called at the start of each server generation. Fill in all of pScreen, possibly doing some of this by calling ScreenInit functions from other layers like mi, framebuffers (cfb, etc), and extensions. Decide which operations need to be placed under resource access control. The classes of operations are the frame buffer operations (RAC_FB), the pointer operations (RAC_CURSOR), the viewport change operations (RAC_VIEWPORT) and the colormap operations (RAC_COLORMAP). Any operation that requires resources which might be disabled during OPERATING state should be set to use RAC. This can be specified separately for memory and IO resources (the racMemFlags and racIoFlags fields of the ScrnInfoRec respectively). Map any video memory or other memory regions. Save the video card state. Enough state must be saved so that the original state can later be restored. Initialise the initial video mode. The ScrnInfoRec's vtSema field should be set to TRUE just prior to changing the video hardware's state.
The ChipScreenInit() function (or functions from other layers that it calls) should allocate entries in the ScreenRec's devPrivates area by calling AllocateScreenPrivateIndex() if it needs per-generation storage. Since the ScreenRec's devPrivates information is cleared for each server generation, this is the correct place to initialise it. After AddScreen() has successfully returned, the following ScrnInfoRec fields are initialised: pScreen racMemFlags racIoFlags The ChipScreenInit() function should initialise the CloseScreen and SaveScreen fields of pScreen. The old value of pScreen->CloseScreen should be saved as part of the driver's per-screen private data, allowing it to be called from ChipCloseScreen(). This means that the existing CloseScreen() function is wrapped.
Finalising RAC Initialisation After all the ChipScreenInit() functions have been called, each screen has registered its RAC requirements. This information is used to determine which shared resources are requested by more than one driver and set the access functions accordingly. This is done following these rules: The shareable resources registered by each entity are compared. If a resource is registered by more than one entity the entity will be marked to indicate that it needs to share this resources type (IO or MEM). A resource marked disabled during OPERATING state will be ignored entirely. A resource marked unused will only conflict with an overlapping resource of an other entity if the second is actually in use during OPERATING state. If an unused resource was found to conflict but the entity does not use any other resource of this type the entire resource type will be disabled for that entity. Finishing InitOutput() At this point InitOutput() is finished, and all the screens have been setup in their initial video mode. Mode Switching When a SwitchMode event is received, ChipSwitchMode() is called (when it exists):
Bool ChipSwitchMode(int index, DisplayModePtr mode);
Initialises the new mode for the screen identified by index;. The viewport may need to be adjusted also.
Changing Viewport When a Change Viewport event is received, ChipAdjustFrame() is called (when it exists):
void ChipAdjustFrame(int index, int x, int y);
Changes the viewport for the screen identified by index;. It should be noted that many chipsets impose restrictions on where the viewport may be placed in the virtual resolution, either for alignment reasons, or to prevent the start of the viewport from being positioned within a pixel (as can happen in a 24bpp mode). After calculating the value the chipset's panning registers need to be set to for non-DGA modes, this function should recalculate the ScrnInfoRec's frameX0, frameY0, frameX1 and frameY1 fields to correspond to that value. If this is not done, switching to another mode might cause the position of a hardware cursor to change.
VT Switching When a VT switch event is received, xf86VTSwitch() is called. xf86VTSwitch() does the following: On ENTER: enable port I/O access save and initialise the bus/resource state enter the SETUP server state calls ChipEnterVT() for each screen enter the OPERATING server state validate GCs Restore fb from saved pixmap for each screen Enable all input devices On LEAVE: Save fb to pixmap for each screen validate GCs enter the SETUP server state calls ChipLeaveVT() for each screen disable all input devices restore bus/resource state disables port I/O access
Bool ChipEnterVT(ScrnInfoPtr pScrn);
This function should initialise the current video mode and initialise the viewport, turn on the HW cursor if appropriate, etc. Should it re-save the video state before initialising the video mode?
void ChipLeaveVT(ScrnInfoPtr pScrn);
This function should restore the saved video state. If appropriate it should also turn off the HW cursor, and invalidate any pixmap/font caches.
Optionally, ChipLeaveVT() may also unmap memory regions. If so, ChipEnterVT() will need to remap them. Additionally, if an aperture used to access video memory is unmapped and remapped in this fashion, ChipEnterVT() will also need to notify the framebuffer layers of the aperture's new location in virtual memory. This is done with a call to the screen's ModifyPixmapHeader() function, as follows
(*pScreen->ModifyPixmapHeader)(pScrn->ppix, -1, -1, -1, -1, -1, NewApertureAddress);
where the ppix field in a ScrnInfoRec points to the pixmap used by the screen's SaveRestoreImage() function to hold the screen's contents while switched out.
Other layers may wrap the ChipEnterVT() and ChipLeaveVT() functions if they need to take some action when these events are received.
End of server generation At the end of each server generation, the DIX layer calls ChipCloseScreen() for each screen:
Bool ChipCloseScreen(int index, ScreenPtr pScreen);
This function should restore the saved video state and unmap the memory regions. It should also free per-screen data structures allocated by the driver. Note that the persistent data held in the ScrnInfoRec's driverPrivate field should not be freed here because it is needed by subsequent server generations. The ScrnInfoRec's vtSema field should be set to FALSE once the video HW state has been restored. Before freeing the per-screen driver data the saved CloseScreen value should be restored to pScreen->CloseScreen, and that function should be called after freeing the data.
Optional Driver Functions The functions outlined here can be called from the XFree86 common layer, but their presence is optional. Mode Validation When a mode validation helper supplied by the XFree86-common layer is being used, it can be useful to provide a function to check for hw specific mode constraints:
ModeStatus ChipValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags);
Check the passed mode for hw-specific constraints, and return the appropriate status value.
This function may also modify the effective timings and clock of the passed mode. These have been stored in the mode's Crtc* and SynthClock elements, and have already been adjusted for interlacing, doublescanning, multiscanning and clock multipliers and dividers. The function should not modify any other mode field, unless it wants to modify the mode timings reported to the user by xf86PrintModes(). The function is called once for every mode in the xorg.conf Monitor section assigned to the screen, with flags set to MODECHECK_INITIAL. It is subsequently called for every mode in the xorg.conf Display subsection assigned to the screen, with flags set to MODECHECK_FINAL. In the second case, the mode will have successfully passed all other tests. In addition, the ScrnInfoRec's virtualX, virtualY and displayWidth fields will have been set as if the mode to be validated were to be the last mode accepted. In effect, calls with MODECHECK_INITIAL are intended for checks that do not depend on any mode other than the one being validated, while calls with MODECHECK_FINAL are intended for checks that may involve more than one mode.
Free screen data When a screen is deleted prior to the completion of the ScreenInit phase the ChipFreeScreen() function is called when defined.
void ChipFreeScreen(ScrnInfoPtr pScrn);
Free any driver-allocated data that may have been allocated up to and including an unsuccessful ChipScreenInit() call. This would predominantly be data allocated by ChipPreInit() that persists across server generations. It would include the driverPrivate, and any privates entries that modules may have allocated.
Recommended driver functions The functions outlined here are for internal use by the driver only. They are entirely optional, and are never accessed directly from higher layers. The sample function declarations shown here are just examples. The interface (if any) used is up to the driver. Save Save the video state. This could be called from ChipScreenInit() and (possibly) ChipEnterVT().
void ChipSave(ScrnInfoPtr pScrn);
Saves the current state. This will only be saving pre-server states or states before returning to the server. There is only one current saved state per screen and it is stored in private storage in the screen.
Restore Restore the original video state. This could be called from the ChipLeaveVT() and ChipCloseScreen() functions.
void ChipRestore(ScrnInfoPtr pScrn);
Restores the saved state from the private storage. Usually only used for restoring text modes.
Initialise Mode Initialise a video mode. This could be called from the ChipScreenInit(), ChipSwitchMode() and ChipEnterVT() functions.
Bool ChipModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Programs the hardware for the given video mode.
Data and Data Structures Command line data Command line options are typically global, and are stored in global variables. These variables are read-only and are available to drivers via a function call interface. Most of these command line values are processed via helper functions to ensure that they are treated consistently by all drivers. The other means of access is provided for cases where the supplied helper functions might not be appropriate. Some of them are: xf86Verbose verbosity level xf86Bpp -bpp from the command line xf86Depth -depth from the command line xf86Weight -weight from the command line xf86Gamma -{r,g,b,}gamma from the command line xf86ProbeOnly -probeonly from the command line defaultColorVisualClass -cc from the command line If we ever do allow for screen-specific command line options, we may need to rethink this. These can be accessed in a read-only manner by drivers with the following functions:
int xf86GetVerbosity();
Returns the value of xf86Verbose.
int xf86GetDepth();
Returns the command line setting. If not set on the command line, -1 is returned.
rgb xf86GetWeight();
Returns the command line setting. If not set on the command line, {0, 0, 0} is returned.
Gamma xf86GetGamma();
Returns the or , , command line settings. If not set on the command line, {0.0, 0.0, 0.0} is returned.
Data handling Config file data contains parts that are global, and parts that are Screen specific. All of it is parsed into data structures that neither the drivers or most other parts of the server need to know about. The global data is typically not required by drivers, and as such, most of it is stored in the private xf86InfoRec. The screen-specific data collected from the config file is stored in screen, device, display, monitor-specific data structures that are separate from the ScrnInfoRecs, with the appropriate elements/fields hooked into the ScrnInfoRecs as required. The screen config data is held in confScreenRec, device data in the GDevRec, monitor data in the MonRec, and display data in the DispRec. The XFree86 common layer's screen specific data (the actual data in use for each screen) is held in the ScrnInfoRecs. As has been outlined above, the ScrnInfoRecs are allocated at probe time, and it is the responsibility of the Drivers' Probe() and PreInit() functions to finish filling them in based on both data provided on the command line and data provided from the Config file. The precedence for this is:
command line -> config file -> probed/default data
For most things in this category there are helper functions that the drivers can use to ensure that the above precedence is consistently used. As well as containing screen-specific data that the XFree86 common layer (including essential parts of the server infrastructure as well as helper functions) needs to access, it also contains some data that drivers use internally. When considering whether to add a new field to the ScrnInfoRec, consider the balance between the convenience of things that lots of drivers need and the size/obscurity of the ScrnInfoRec. Per-screen driver specific data that cannot be accommodated with the static ScrnInfoRec fields is held in a driver-defined data structure, a pointer to which is assigned to the ScrnInfoRec's driverPrivate field. This is per-screen data that persists across server generations (as does the bulk of the static ScrnInfoRec data). It would typically also include the video card's saved state. Per-screen data for other modules that the driver uses that is reset for each server generation is hooked into the ScrnInfoRec through its privates field. Once it has stabilised, the data structures and variables accessible to video drivers will be documented here. In the meantime, those things defined in the xf86.h and xf86str.h files are visible to video drivers. Things defined in xf86Priv.h and xf86Privstr.h are NOT intended to be visible to video drivers, and it is an error for a driver to include those files.
Accessing global data Some other global state information that the drivers may access via functions is as follows:
Bool xf86ServerIsExiting();
Returns TRUE if the server is at the end of a generation and is in the process of exiting, and FALSE otherwise.
Bool xf86ServerIsResetting();
Returns TRUE if the server is at the end of a generation and is in the process of resetting, and FALSE otherwise.
Bool xf86ServerIsOnlyProbing();
Returns TRUE if the -probeonly command line flag was specified, and FALSE otherwise.
Allocating private data A driver and any module it uses may allocate per-screen private storage in either the ScreenRec (DIX level) or ScrnInfoRec (XFree86 common layer level). ScreenRec storage persists only for a single server generation, and ScrnInfoRec storage persists across generations for the lifetime of the server. The ScreenRec devPrivates data must be reallocated/initialised at the start of each new generation. This is normally done from the ChipScreenInit() function, and Init functions for other modules that it calls. Data allocated in this way should be freed by the driver's ChipCloseScreen() functions, and Close functions for other modules that it calls. A new devPrivates entry is allocated by calling the AllocateScreenPrivateIndex() function.
int AllocateScreenPrivateIndex();
This function allocates a new element in the devPrivates field of all currently existing ScreenRecs. The return value is the index of this new element in the devPrivates array. The devPrivates field is of type DevUnion: typedef union _DevUnion { pointer ptr; long val; unsigned long uval; pointer (*fptr)(void); } DevUnion; which allows the element to be used for any of the above types. It is commonly used as a pointer to data that the caller allocates after the new index has been allocated. This function will return -1 when there is an error allocating the new index.
The ScrnInfoRec privates data persists for the life of the server, so only needs to be allocated once. This should be done from the ChipPreInit() function, and Init functions for other modules that it calls. Data allocated in this way should be freed by the driver's ChipFreeScreen() functions, and Free functions for other modules that it calls. A new privates entry is allocated by calling the xf86AllocateScrnInfoPrivateIndex() function.
int xf86AllocateScrnInfoPrivateIndex();
This function allocates a new element in the privates field of all currently existing ScrnInfoRecs. The return value is the index of this new element in the privates array. The privates field is of type DevUnion: typedef union _DevUnion { pointer ptr; long val; unsigned long uval; pointer (*fptr)(void); } DevUnion; which allows the element to be used for any of the above types. It is commonly used as a pointer to data that the caller allocates after the new index has been allocated. This function will not return when there is an error allocating the new index. When there is an error it will cause the server to exit with a fatal error. The similar function for allocation privates in the ScreenRec (AllocateScreenPrivateIndex()) differs in this respect by returning -1 when the allocation fails.
Keeping Track of Bus Resources Theory of Operation The XFree86 common layer has knowledge of generic access control mechanisms for devices on certain bus systems (currently the PCI bus) as well as of methods to enable or disable access to the buses itself. Furthermore it can access information on resources decoded by these devices and if necessary modify it. When first starting the Xserver collects all this information, saves it for restoration, checks it for consistency, and if necessary, corrects it. Finally it disables all resources on a generic level prior to calling any driver function. When the Probe() function of each driver is called the device sections are matched against the devices found in the system. The driver may probe devices at this stage that cannot be identified by using device independent methods. Access to all resources that can be controlled in a device independent way is disabled. The Probe() function should register all non-relocatable resources at this stage. If a resource conflict is found between exclusive resources the driver will fail immediately. Optionally the driver might specify an EntityInit(), EntityLeave() and EntityEnter() function. EntityInit() can be used to disable any shared resources that are not controlled by the generic access control functions. It is called prior to the PreInit phase regardless if an entity is active or not. When calling the EntityInit(), EntityEnter() and EntityLeave() functions the common level will disable access to all other entities on a generic level. Since the common level has no knowledge of device specific methods to disable access to resources it cannot be guaranteed that certain resources are not decoded by any other entity until the EntityInit() or EntityEnter() phase is finished. Device drivers should therefore register all those resources which they are going to disable. If these resources are never to be used by any driver function they may be flagged ResInit so that they can be removed from the resource list after processing all EntityInit() functions. EntityEnter() should disable decoding of all resources which are not registered as exclusive and which are not handled by the generic access control in the common level. The difference to EntityInit() is that the latter one is only called once during lifetime of the server. It can therefore be used to set up variables prior to disabling resources. EntityLeave() should restore the original state when exiting the server or switching to a different VT. It also needs to disable device specific access functions if they need to be disabled on server exit or VT switch. The default state is to enable them before giving up the VT. In PreInit() phase each driver should check if any shareable resources it has registered during Probe() has been denied and take appropriate action which could simply be to fail. If it needs to access resources it has disabled during EntitySetup() it can do so provided it has registered these and will disable them before returning from PreInit(). This also applies to all other driver functions. Several functions are provided to request resource ranges, register these, correct PCI config space and add replacements for the generic access functions. Resources may be marked disabled or unused during OPERATING stage. Although these steps could also be performed in ScreenInit(), this is not desirable. Following PreInit() phase the common level determines if resource access control is needed. This is the case if more than one screen is used. If necessary the RAC wrapper module is loaded. In ScreenInit() the drivers can decide which operations need to be placed under RAC. Available are the frame buffer operations, the pointer operations and the colormap operations. Any operation that requires resources which might be disabled during OPERATING state should be set to use RAC. This can be specified separately for memory and IO resources. When ScreenInit() phase is done the common level will determine which shared resources are requested by more than one driver and set the access functions accordingly. This is done following these rules: The shareable resources registered by each entity are compared. If a resource is registered by more than one entity the entity will be marked to need to share this resources type (IO or MEM). A resource marked disabled during OPERATING state will be ignored entirely. A resource marked unused will only conflicts with an overlapping resource of an other entity if the second is actually in use during OPERATING state. If an unused resource was found to conflict however the entity does not use any other resource of this type the entire resource type will be disabled for that entity. The driver has the choice among different ways to control access to certain resources: It can rely on the generic access functions. This is probably the most common case. Here the driver only needs to register any resource it is going to use. It can replace the generic access functions by driver specific ones. This will mostly be used in cases where no generic access functions are available. In this case the driver has to make sure these resources are disabled when entering the PreInit() stage. Since the replacement functions are registered in PreInit() the driver will have to enable these resources itself if it needs to access them during this state. The driver can specify if the replacement functions can control memory and/or I/O resources separately. The driver can enable resources itself when it needs them. Each driver function enabling them needs to disable them before it will return. This should be used if a resource which can be controlled in a device dependent way is only required during SETUP state. This way it can be marked unused during OPERATING state. A resource which is decoded during OPERATING state however never accessed by the driver should be marked unused. Since access switching latencies are an issue during Xserver operation, the common level attempts to minimize the number of entities that need to be placed under RAC control. When a wrapped operation is called, the EnableAccess() function is called before control is passed on. EnableAccess() checks if a screen is under access control. If not it just establishes bus routing and returns. If the screen needs to be under access control, EnableAccess() determines which resource types (MEM, IO) are required. Then it tests if this access is already established. If so it simply returns. If not it disables the currently established access, fixes bus routing and enables access to all entities registered for this screen. Whenever a mode switch or a VT-switch is performed the common level will return to SETUP state. Resource Types Resource have certain properties. When registering resources each range is accompanied by a flag consisting of the ORed flags of the different properties the resource has. Each resource range may be classified according to its physical properties i.e., if it addresses memory (ResMem) or I/O space (ResIo), if it addresses a block (ResBlock) or sparse (ResSparse) range, its access properties. There are two known access properties: ResExclusive for resources which may not be shared with any other device and ResShared for resources which can be disabled and therefore can be shared. If it is necessary to test a resource against any type a generic access type ResAny is provided. If this is set the resource will conflict with any resource of a different entity intersecting its range. Further it can be specified that a resource is decoded however never used during any stage (ResUnused) or during OPERATING state (ResUnusedOpr). A resource only visible during the init functions (ie. EntityInit(), EntityEnter() and EntityLeave() should be registered with the flag ResInit. A resource that might conflict with background resource ranges may be flagged with ResBios. This might be useful when registering resources ranges that were assigned by the system Bios. Several predefined resource lists are available for VGA and 8514/A resources in common/xf86Resources.h. Available Functions The functions provided for resource management are listed in their order of use in the driver. Probe Phase In this phase each driver detects those resources it is able to drive, creates an entity record for each of them, registers non-relocatable resources and allocates screens and adds the resources to screens. Two helper functions are provided for matching device sections in the xorg.conf file to the devices:
int xf86MatchPciInstances(const char *driverName, int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities);
This function finds matches between PCI cards that a driver supports and config file device sections. It is intended for use in the ChipProbe() function of drivers for PCI cards. Only probed PCI devices with a vendor ID matching vendorID are considered. devList and numDevs are typically those found from calling xf86MatchDevice(), and represent the active config file device sections relevant to the driver. PCIchipsets is a table that provides a mapping between the PCI device IDs, the driver's internal chipset tokens and a list of fixed resources. When a device section doesn't have a BusID entry it can only match the primary video device. Secondary devices are only matched with device sections that have a matching BusID entry. Once the preliminary matches have been found, a final match is confirmed by checking if the chipset override, ChipID override or probed PCI chipset type match one of those given in the chipsets and PCIchipsets lists. The PCIchipsets list includes a list of the PCI device IDs supported by the driver. The list should be terminated with an entry with PCI ID -1". The chipsets list is a table mapping the driver's internal chipset tokens to names, and should be terminated with a NULL entry. Only those entries with a corresponding entry in the PCIchipsets list are considered. The order of precedence is: config file chipset, config file ChipID, probed PCI device ID. In cases where a driver handles PCI chipsets with more than one vendor ID, it may set vendorID to 0, and OR each devID in the list with (the vendor ID << 16). Entity index numbers for confirmed matches are returned as an array via foundEntities. The PCI information, chipset token and device section for each match are found in the EntityInfoRec referenced by the indices. The function return value is the number of confirmed matches. A return value of -1 indicates an internal error. The returned foundEntities array should be freed by the driver with xfree() when it is no longer needed in cases where the return value is greater than zero.
These two helper functions make use of several core functions that are available at the driver level:
Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func);
Takes a BusID string, and if it is in the correct format, returns the PCI bus, device, func values that it indicates. The format of the string is expected to be "PCI:bus:device:func" where each of bus, device and func are decimal integers. The ":func" part may be omitted, and the func value assumed to be zero, but this isn't encouraged. The "PCI" prefix may also be omitted. The prefix "AGP" is currently equivalent to the "PCI" prefix. If the string isn't a valid PCI BusID, the return value is FALSE.
Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func);
Compares a BusID string with PCI bus, device, func values. If they match TRUE is returned, and FALSE if they don't.
Bool xf86CheckPciSlot(int bus, int device, int func);
Checks if the PCI slot bus:device:func has been claimed. If so, it returns FALSE, and otherwise TRUE.
int xf86ClaimPciSlot(int bus, int device, int func, DriverPtr drvp, int chipset, GDevPtr dev, Bool active);
This function is used to claim a PCI slot, allocate the associated entity record and initialise their data structures. The return value is the index of the newly allocated entity record, or -1 if the claim fails. This function should always succeed if xf86CheckPciSlot() returned TRUE for the same PCI slot.
Bool xf86IsPrimaryPci(void);
This function returns TRUE if the primary card is a PCI device, and FALSE otherwise.
Two helper functions are provided to aid configuring entities:
ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, PciChipsets *p_chip, void *res, EntityProc init, EntityProc enter, EntityProc leave, pointer private);
This functions is used to register the entity. The res, init, enter, and leave arguments are unused, and should be NULL. For active entities a ScrnInfoRec is allocated if the pScrn argument is NULL. The return value is TRUE when successful.
These two helper functions make use of several core functions that are available at the driver level:
void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex);
This function associates the entity referenced by entityIndex with the screen.
PreInit Phase During this phase the remaining resources should be registered. PreInit() should call xf86GetEntityInfo() to obtain a pointer to an EntityInfoRec for each entity it is able to drive and check if any resource are listed in its resources field. If resources registered in the Probe phase have been rejected in the post-Probe phase (resources is non-NULL), then the driver should decide if it can continue without using these or if it should fail.
EntityInfoPtr xf86GetEntityInfo(int entityIndex);
This function returns a pointer to the EntityInfoRec referenced by entityIndex. The returned EntityInfoRec should be freed with xfree() when no longer needed.
Several functions are provided to simplify resource registration:
Bool xf86IsEntityPrimary(int entityIndex);
This function returns TRUE if the entity referenced by entityIndex is the primary display device (i.e., the one initialised at boot time and used in text mode).
Bool xf86IsScreenPrimary(ScrnInfoPtr pScrn);
This function returns TRUE if the primary entity is registered with the screen referenced by pScrn.
pciVideoPtr xf86GetPciInfoForEntity(int entityIndex);
This function returns a pointer to the pciVideoRec for the specified entity. If the entity is not a PCI device, NULL is returned.
Two functions are provided to obtain a resource range of a given type:
resRange xf86GetBlock(long type, memType size, memType window_start, memType window_end, memType align_mask, resPtr avoid);
This function tries to find a block range of size size and type type in a window bound by window_start and window_end with the alignment specified in align_mask. Optionally a list of resource ranges which should be avoided within the window can be supplied. On failure a zero-length range of type ResEnd will be returned.
resRange xf86GetSparse(long type, memType fixed_bits, memType decode_mask, memType address_mask, resPtr avoid);
This function is like the previous one, but attempts to find a sparse range instead of a block range. Here three values have to be specified: the address_mask which marks all bits of the mask part of the address, the decode_mask which masks out the bits which are hardcoded and are therefore not available for relocation and the values of the fixed bits. The function tries to find a base that satisfies the given condition. If the function fails it will return a zero range of type ResEnd. Optionally it might be passed a list of resource ranges to avoid.
Bool xf86CheckPciMemBase(pciVideoPtr pPci, memType base);
This function checks that the memory base address specified matches one of the PCI base address register values for the given PCI device. This is mostly used to check that an externally provided base address (e.g., from a config file) matches an actual value allocated to a device.
The following two functions are provided for special cases:
void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex);
This function may be used to remove an entity from a screen. This only makes sense if a screen has more than one entity assigned or the screen is to be deleted. No test is made if the screen has any entities left.
ScreenInit Phase All that is required in this phase is to setup the RAC flags. Note that it is also permissible to set these flags up in the PreInit phase. The RAC flags are held in the racIoFlags and racMemFlags fields of the ScrnInfoRec for each screen. They specify which graphics operations might require the use of shared resources. This can be specified separately for memory and I/O resources. The available flags are defined in rac/xf86RAC.h. They are: RAC_FB for framebuffer operations (including hw acceleration) RAC_CURSOR for Cursor operations (??? I'm not sure if we need this for SW cursor it depends on which level the sw cursor is drawn) RAC_COLORMAP for colormap operations RAC_VIEWPORT for the call to ChipAdjustFrame() The flags are ORed together.
Config file <quote>Option</quote> entries Option entries are permitted in most sections and subsections of the config file. There are two forms of option entries: Option "option-name" A boolean option. Option "option-name" "option-value" An option with an arbitrary value. The option entries are handled by the parser, and a list of the parsed options is included with each of the appropriate data structures that the drivers have access to. The data structures used to hold the option information are opaque to the driver, and a driver must not access the option data directly. Instead, the common layer provides a set of functions that may be used to access, check and manipulate the option data. First, the low level option handling functions. In most cases drivers would not need to use these directly.
XF86OptionPtr xf86FindOption(XF86OptionPtr options, const char *name);
Takes a list of options and an option name, and returns a handle for the first option entry in the list matching the name. Returns NULL if no match is found.
const char *xf86FindOptionValue(XF86OptionPtr options, const char *name);
Takes a list of options and an option name, and returns the value associated with the first option entry in the list matching the name. If the matching option has no value, an empty string ("") is returned. Returns NULL if no match is found.
void xf86MarkOptionUsed(XF86OptionPtr option);
Takes a handle for an option, and marks that option as used.
void xf86MarkOptionUsedByName(XF86OptionPtr options, const char *name);
Takes a list of options and an option name and marks the first option entry in the list matching the name as used.
Next, the higher level functions that most drivers would use.
void xf86CollectOptions(ScrnInfoPtr pScrn, XF86OptionPtr extraOpts);
Collect the options from each of the config file sections used by the screen (pScrn) and return the merged list as pScrn->options. This function requires that pScrn->confScreen, pScrn->display, pScrn->monitor, pScrn->numEntities, and pScrn->entityList are initialised. extraOpts may optionally be set to an additional list of options to be combined with the others. The order of precedence for options is extraOpts, display, confScreen, monitor, device.
void xf86ProcessOptions(int scrnIndex, XF86OptionPtr options, OptionInfoPtr optinfo);
Processes a list of options according to the information in the array of OptionInfoRecs (optinfo). The resulting information is stored in the value fields of the appropriate optinfo entries. The found fields are set to TRUE when an option with a value of the correct type if found, and FALSE otherwise. The type field is used to determine the expected value type for each option. Each option in the list of options for which there is a name match (but not necessarily a value type match) is marked as used. Warning messages are printed when option values don't match the types specified in the optinfo data. NOTE: If this function is called before a driver's screen number is known (e.g., from the ChipProbe() function) a scrnIndex value of -1 should be used. NOTE 2: Given that this function stores into the OptionInfoRecs pointed to by optinfo, the caller should ensure the OptionInfoRecs are (re-)initialised before the call, especially if the caller expects to use the predefined option values as defaults. The OptionInfoRec is defined as follows: typedef struct { double freq; int units; } OptFrequency; typedef union { unsigned long num; char * str; double realnum; Bool bool; OptFrequency freq; } ValueUnion; typedef enum { OPTV_NONE = 0, OPTV_INTEGER, OPTV_STRING, /* a non-empty string */ OPTV_ANYSTR, /* Any string, including an empty one */ OPTV_REAL, OPTV_BOOLEAN, OPTV_PERCENT, OPTV_FREQ } OptionValueType; typedef enum { OPTUNITS_HZ = 1, OPTUNITS_KHZ, OPTUNITS_MHZ } OptFreqUnits; typedef struct { int token; const char* name; OptionValueType type; ValueUnion value; Bool found; } OptionInfoRec, *OptionInfoPtr; OPTV_FREQ can be used for options values that are frequencies. These values are a floating point number with an optional unit name appended. The unit name can be one of "Hz", "kHz", "k", "MHz", "M". The multiplier associated with the unit is stored in freq.units, and the scaled frequency is stored in freq.freq. When no unit is specified, freq.units is set to 0, and freq.freq is unscaled. OPTV_PERCENT can be used for option values that are specified in percent (e.g. "20%"). These values are a floating point number with a percent sign appended. If the percent sign is missing, the parser will fail to match the value. Typical usage is to setup an array of OptionInfoRecs with all fields initialised. The value and found fields get set by xf86ProcessOptions(). For cases where the value parsing is more complex, the driver should specify OPTV_STRING, and parse the string itself. An example of using this option handling is included in the Sample Driver section.
void xf86ShowUnusedOptions(int scrnIndex, XF86OptionPtr options);
Prints out warning messages for each option in the list of options that isn't marked as used. This is intended to show options that the driver hasn't recognised. It would normally be called near the end of the ChipScreenInit() function, but only when serverGeneration == 1
OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, int token);
Returns a pointer to the OptionInfoRec in table with a token field matching token. Returns NULL if no match is found.
Bool xf86IsOptionSet(const OptionInfoRec *table, int token);
Returns the found field of the OptionInfoRec in table with a token field matching token. This can be used for options of all types. Note that for options of type OPTV_BOOLEAN, it isn't sufficient to check this to determine the value of the option. Returns FALSE if no match is found.
char *xf86GetOptValString(const OptionInfoRec *table, int token);
Returns the value.str field of the OptionInfoRec in table with a token field matching token. Returns NULL if no match is found.
Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, int *value);
Returns via *value the value.num field of the OptionInfoRec in table with a token field matching token. *value is only changed when a match is found so it can be safely initialised with a default prior to calling this function. The function return value is as for xf86IsOptionSet().
Bool xf86GetOptValULong(const OptionInfoRec *table, int token, unsigned long *value);
Like xf86GetOptValInteger(), except the value is treated as an unsigned long.
Bool xf86GetOptValReal(const OptionInfoRec *table, int token, double *value);
Like xf86GetOptValInteger(), except that value.realnum is used.
Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, OptFreqUnits expectedUnits, double *value);
Like xf86GetOptValInteger(), except that the value.freq data is returned. The frequency value is scaled to the units indicated by expectedUnits. The scaling is exact when the units were specified explicitly in the option's value. Otherwise, the expectedUnits field is used as a hint when doing the scaling. In this case, values larger than 1000 are assumed to have be specified in the next smallest units. For example, if the Option value is "10000" and expectedUnits is OPTUNITS_MHZ, the value returned is 10.
Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value);
This function is used to check boolean options (OPTV_BOOLEAN). If the function return value is FALSE, it means the option wasn't set. Otherwise *value is set to the boolean value indicated by the option's value. No option value is interpreted as TRUE. Option values meaning TRUE are "1", "yes", "on", "true", and option values meaning FALSE are "0", "no", "off", "false". Option names both with the "no" prefix in their names, and with that prefix removed are also checked and handled in the obvious way. *value is not changed when the option isn't present. It should normally be set to a default value before calling this function.
Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def);
This function is used to check boolean options (OPTV_BOOLEAN). If the option is set, its value is returned. If the options is not set, the default value specified by def is returned. The option interpretation is the same as for xf86GetOptValBool().
int xf86NameCmp(const char *s1, const char *s2);
This function should be used when comparing strings from the config file with expected values. It works like strcmp(), but is not case sensitive and space, tab, and _ characters are ignored in the comparison. The use of this function isn't restricted to parsing option values. It may be used anywhere where this functionality required.
Modules, Drivers, Include Files and Interface Issues NOTE: this section is incomplete. Include files The following include files are typically required by video drivers:
All drivers should include these: "xf86.h" "xf86_OSproc.h" "xf86_ansic.h" "xf86Resources.h" Wherever inb/outb (and related things) are used the following should be included: "compiler.h" Note: in drivers, this must be included after "xf86_ansic.h". Drivers that need to access the PCI config space need this: "xf86Pci.h" Drivers that initialise a SW cursor need this: "mipointer.h" All drivers using the mi colourmap code need this: "micmap.h" If a driver uses the vgahw module, it needs this: "vgaHW.h" Drivers supporting VGA or Hercules monochrome screens need: "xf1bpp.h" Drivers supporting VGA or EGC 16-colour screens need: "xf4bpp.h" Drivers using cfb need: #define PSZ 8 #include "cfb.h" #undef PSZ Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: "cfb16.h" "cfb24.h" "cfb32.h" If a driver uses the fb manager, it needs this: "xf86fbman.h"
Non-driver modules should include "xf86_ansic.h" to get the correct wrapping of ANSI C/libc functions. All modules must NOT include any system include files, or the following: "xf86Priv.h" "xf86Privstr.h" "xf86_OSlib.h" "Xos.h" In addition, "xf86_libc.h" must not be included explicitly. It is included implicitly by "xf86_ansic.h".
Offscreen Memory Manager Management of offscreen video memory may be handled by the XFree86 framebuffer manager. Once the offscreen memory manager is running, drivers or extensions may allocate, free or resize areas of offscreen video memory using the following functions (definitions taken from xf86fbman.h): typedef struct _FBArea { ScreenPtr pScreen; BoxRec box; int granularity; void (*MoveAreaCallback)(struct _FBArea*, struct _FBArea*) void (*RemoveAreaCallback)(struct _FBArea*) DevUnion devPrivate; } FBArea, *FBAreaPtr; typedef void (*MoveAreaCallbackProcPtr)(FBAreaPtr from, FBAreaPtr to) typedef void (*RemoveAreaCallbackProcPtr)(FBAreaPtr) FBAreaPtr xf86AllocateOffscreenArea ( ScreenPtr pScreen, int width, int height, int granularity, MoveAreaCallbackProcPtr MoveAreaCallback, RemoveAreaCallbackProcPtr RemoveAreaCallback, pointer privData ) void xf86FreeOffscreenArea (FBAreaPtr area) Bool xf86ResizeOffscreenArea ( FBAreaPtr area int w, int h ) The function: Bool xf86FBManagerRunning(ScreenPtr pScreen); can be used by an extension to check if the driver has initialized the memory manager. The manager is not available if this returns FALSE and the functions above will all fail. xf86AllocateOffscreenArea() can be used to request a rectangle of dimensions width × height (in pixels) from unused offscreen memory. granularity specifies that the leftmost edge of the rectangle must lie on some multiple of granularity pixels. A granularity of zero means the same thing as a granularity of one - no alignment preference. A MoveAreaCallback can be provided to notify the requester when the offscreen area is moved. If no MoveAreaCallback is supplied then the area is considered to be immovable. The privData field will be stored in the manager's internal structure for that allocated area and will be returned to the requester in the FBArea passed via the MoveAreaCallback. An optional RemoveAreaCallback is provided. If the driver provides this it indicates that the area should be allocated with a lower priority. Such an area may be removed when a higher priority request (one that doesn't have a RemoveAreaCallback) is made. When this function is called, the driver will have an opportunity to do whatever cleanup it needs to do to deal with the loss of the area, but it must finish its cleanup before the function exits since the offscreen memory manager will free the area immediately after. xf86AllocateOffscreenArea() returns NULL if it was unable to allocate the requested area. When no longer needed, areas should be freed with xf86FreeOffscreenArea(). xf86ResizeOffscreenArea() resizes an existing FBArea. xf86ResizeOffscreenArea() returns TRUE if the resize was successful. If xf86ResizeOffscreenArea() returns FALSE, the original FBArea is left unmodified. Resizing an area maintains the area's original granularity, devPrivate, and MoveAreaCallback. xf86ResizeOffscreenArea() has considerably less overhead than freeing the old area then reallocating the new size, so it should be used whenever possible. The function: Bool xf86QueryLargestOffscreenArea( ScreenPtr pScreen, int *width, int *height, int granularity, int preferences, int priority ); is provided to query the width and height of the largest single FBArea allocatable given a particular priority. preferences can be one of the following to indicate whether width, height or area should be considered when determining which is the largest single FBArea available. FAVOR_AREA_THEN_WIDTH FAVOR_AREA_THEN_HEIGHT FAVOR_WIDTH_THEN_AREA FAVOR_HEIGHT_THEN_AREA priority is one of the following:
PRIORITY_LOW
Return the largest block available without stealing anyone else's space. This corresponds to the priority of allocating a FBArea when a RemoveAreaCallback is provided.
PRIORITY_NORMAL
Return the largest block available if it is acceptable to steal a lower priority area from someone. This corresponds to the priority of allocating a FBArea without providing a RemoveAreaCallback.
PRIORITY_EXTREME
Return the largest block available if all FBAreas that aren't locked down were expunged from memory first. This corresponds to any allocation made directly after a call to xf86PurgeUnlockedOffscreenAreas().
The function: Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen); is provided as an extreme method to free up offscreen memory. This will remove all removable FBArea allocations. Initialization of the XFree86 framebuffer manager is done via Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox); FullBox represents the area of the framebuffer that the manager is allowed to manage. This is typically a box with a width of pScrn->displayWidth and a height of as many lines as can be fit within the total video memory, however, the driver can reserve areas at the extremities by passing a smaller area to the manager.
Colormap Handling A generic colormap handling layer is provided within the XFree86 common layer. This layer takes care of most of the details, and only requires a function from the driver that loads the hardware palette when required. To use the colormap layer, a driver calls the xf86HandleColormaps() function.
Bool xf86HandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits, LoadPaletteFuncPtr loadPalette, SetOverscanFuncPtr setOverscan, unsigned int flags);
This function must be called after the default colormap has been initialised. The pScrn->gamma field must also be initialised, preferably by calling xf86SetGamma(). maxColors is the number of entries in the palette. sigRGBbits is the size in bits of each color component in the DAC's palette. loadPalette is a driver-provided function for loading a colormap into the hardware, and is described below. setOverscan is an optional function that may be provided when the overscan color is an index from the standard LUT and when it needs to be adjusted to keep it as close to black as possible. The setOverscan function programs the overscan index. It shouldn't normally be used for depths other than 8. setOverscan should be set to NULL when it isn't needed. flags may be set to the following (which may be ORed together): CMAP_PALETTED_TRUECOLOR the TrueColor visual is paletted and is just a special case of DirectColor. This flag is only valid for bpp > 8. CMAP_RELOAD_ON_MODE_SWITCH reload the colormap automatically after mode switches. This is useful for when the driver is resetting the hardware during mode switches and corrupting or erasing the hardware palette. CMAP_LOAD_EVEN_IF_OFFSCREEN reload the colormap even if the screen is switched out of the server's VC. The palette is not reloaded when the screen is switched back in, nor after mode switches. This is useful when the driver needs to keep track of palette changes. The colormap layer normally reloads the palette after VT enters so it is not necessary for the driver to save and restore the palette when switching VTs. The driver must, however, still save the initial palette during server start up and restore it during server exit.
void LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual);
LoadPalette() is a driver-provided function for loading a colormap into hardware. colors is the array of RGB values that represent the full colormap. indices is a list of index values into the colors array. These indices indicate the entries that need to be updated. numColors is the number of the indices to be updated.
void SetOverscan(ScrnInfoPtr pScrn, int overscan);
SetOverscan() is a driver-provided function for programming the overscan index. As described above, it is normally only appropriate for LUT modes where all colormap entries are available for the display, but where one of them is also used for the overscan (typically 8bpp for VGA compatible LUTs). It isn't required in cases where the overscan area is never visible.
DPMS Extension Support code for the DPMS extension is included in the XFree86 common layer. This code provides an interface between the main extension code, and a means for drivers to initialise DPMS when they support it. One function is available to drivers to do this initialisation, and it is always available, even when the DPMS extension is not supported by the core server (in which case it returns a failure result).
Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags);
This function registers a driver's DPMS level programming function set. It also checks pScrn->options for the "dpms" option, and when present marks DPMS as being enabled for that screen. The set function is called whenever the DPMS level changes, and is used to program the requested level. flags is currently not used, and should be 0. If the initialisation fails for any reason, including when there is no DPMS support in the core server, the function returns FALSE.
Drivers that implement DPMS support must provide the following function, that gets called when the DPMS level is changed:
void ChipDPMSSet(ScrnInfoPtr pScrn, int level, int flags);
Program the DPMS level specified by level. Valid values of level are DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, DPMSModeOff. These values are defined in "extensions/dpms.h".
DGA Extension Drivers can support the XFree86 Direct Graphics Architecture (DGA) by filling out a structure of function pointers and a list of modes and passing them to DGAInit.
Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, DGAModePtr modes, int num); /** The DGAModeRec **/ typedef struct { int num; DisplayModePtr mode; int flags; int imageWidth; int imageHeight; int pixmapWidth; int pixmapHeight; int bytesPerScanline; int byteOrder; int depth; int bitsPerPixel; unsigned long red_mask; unsigned long green_mask; unsigned long blue_mask; int viewportWidth; int viewportHeight; int xViewportStep; int yViewportStep; int maxViewportX; int maxViewportY; int viewportFlags; int offset; unsigned char *address; int reserved1; int reserved2; } DGAModeRec, *DGAModePtr; num Can be ignored. The DGA DDX will assign these numbers. mode A pointer to the DisplayModeRec for this mode. flags The following flags are defined and may be OR'd together: DGA_CONCURRENT_ACCESS Indicates that the driver supports concurrent graphics accelerator and linear framebuffer access. DGA_FILL_RECT DGA_BLIT_RECT DGA_BLIT_RECT_TRANS Indicates that the driver supports the FillRect, BlitRect or BlitTransRect functions in this mode. DGA_PIXMAP_AVAILABLE Indicates that Xlib may be used on the framebuffer. This flag will usually be set unless the driver wishes to prohibit this for some reason. DGA_INTERLACED DGA_DOUBLESCAN Indicates that these are interlaced or double scan modes. imageWidth imageHeight These are the dimensions of the linear framebuffer accessible by the client. pixmapWidth pixmapHeight These are the dimensions of the area of the framebuffer accessible by the graphics accelerator. bytesPerScanline Pitch of the framebuffer in bytes. byteOrder Usually the same as pScrn->imageByteOrder. depth The depth of the framebuffer in this mode. bitsPerPixel The number of bits per pixel in this mode. red_mask green_mask blue_mask The RGB masks for this mode, if applicable. viewportWidth viewportHeight Dimensions of the visible part of the framebuffer. Usually mode->HDisplay and mode->VDisplay. xViewportStep yViewportStep The granularity of x and y viewport positions that the driver supports in this mode. maxViewportX maxViewportY The maximum viewport position supported by the driver in this mode. viewportFlags The following may be OR'd together: DGA_FLIP_IMMEDIATE The driver supports immediate viewport changes. DGA_FLIP_RETRACE The driver supports viewport changes at retrace. offset The offset into the linear framebuffer that corresponds to pixel (0,0) for this mode. address The virtual address of the framebuffer as mapped by the driver. This is needed when DGA_PIXMAP_AVAILABLE is set. /** The DGAFunctionRec **/ typedef struct { Bool (*OpenFramebuffer)( ScrnInfoPtr pScrn, char **name, unsigned char **mem, int *size, int *offset, int *extra ); void (*CloseFramebuffer)(ScrnInfoPtr pScrn); Bool (*SetMode)(ScrnInfoPtr pScrn, DGAModePtr pMode); void (*SetViewport)(ScrnInfoPtr pScrn, int x, int y, int flags); int (*GetViewport)(ScrnInfoPtr pScrn); void (*Sync)(ScrnInfoPtr); void (*FillRect)( ScrnInfoPtr pScrn, int x, int y, int w, int h, unsigned long color ); void (*BlitRect)( ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, int dstx, int dsty ); void (*BlitTransRect)( ScrnInfoPtr pScrn, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long color ); } DGAFunctionRec, *DGAFunctionPtr;
Bool OpenFramebuffer (pScrn, name, mem, size, offset, extra);
OpenFramebuffer() should pass the client everything it needs to know to be able to open the framebuffer. These parameters are OS specific and their meanings are to be interpreted by an OS specific client library. name The name of the device to open or NULL if there is no special device to open. A NULL name tells the client that it should open whatever device one would usually open to access physical memory. mem The physical address of the start of the framebuffer. size The size of the framebuffer in bytes. offset Any offset into the device, if applicable. flags Any additional information that the client may need. Currently, only the DGA_NEED_ROOT flag is defined.
void CloseFramebuffer (pScrn);
CloseFramebuffer() merely informs the driver (if it even cares) that client no longer needs to access the framebuffer directly. This function is optional.
Bool SetMode (pScrn, pMode);
SetMode() tells the driver to initialize the mode passed to it. If pMode is NULL, then the driver should restore the original pre-DGA mode.
void SetViewport (pScrn, x, y, flags);
SetViewport() tells the driver to make the upper left-hand corner of the visible screen correspond to coordinate (x,y) on the framebuffer. flags currently defined are: DGA_FLIP_IMMEDIATE The viewport change should occur immediately. DGA_FLIP_RETRACE The viewport change should occur at the vertical retrace, but this function should return sooner if possible. The (x,y) locations will be passed as the client specified them, however, the driver is expected to round these locations down to the next supported location as specified by the xViewportStep and yViewportStep for the current mode.
int GetViewport (pScrn);
GetViewport() gets the current page flip status. Set bits in the returned int correspond to viewport change requests still pending. For instance, set bit zero if the last SetViewport request is still pending, bit one if the one before that is still pending, etc.
void Sync (pScrn);
This function should ensure that any graphics accelerator operations have finished. This function should not return until the graphics accelerator is idle.
void FillRect (pScrn, x, y, w, h, color);
This optional function should fill a rectangle w × h located at (x,y) in the given color.
void BlitRect (pScrn, srcx, srcy, w, h, dstx, dsty);
This optional function should copy an area w × h located at (srcx,srcy) to location (dstx,dsty). This function will need to handle copy directions as appropriate.
void BlitTransRect (pScrn, srcx, srcy, w, h, dstx, dsty, color);
This optional function is the same as BlitRect except that pixels in the source corresponding to the color key color should be skipped.
The XFree86 X Video Extension (Xv) Device Dependent Layer XFree86 offers the X Video Extension which allows clients to treat video as any another primitive and Put video into drawables. By default, the extension reports no video adaptors as being available since the DDX layer has not been initialized. The driver can initialize the DDX layer by filling out one or more XF86VideoAdaptorRecs as described later in this document and passing a list of XF86VideoAdaptorPtr pointers to the following function: Bool xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr *adaptPtrs, int num); After doing this, the extension will report video adaptors as being available, providing the data in their respective XF86VideoAdaptorRecs was valid. xf86XVScreenInit() copies data from the structure passed to it so the driver may free it after the initialization. At the moment, the DDX only supports rendering into Window drawables. Pixmap rendering will be supported after a sufficient survey of suitable hardware is completed. The XF86VideoAdaptorRec: typedef struct { unsigned int type; int flags; char *name; int nEncodings; XF86VideoEncodingPtr pEncodings; int nFormats; XF86VideoFormatPtr pFormats; int nPorts; DevUnion *pPortPrivates; int nAttributes; XF86AttributePtr pAttributes; int nImages; XF86ImagePtr pImages; PutVideoFuncPtr PutVideo; PutStillFuncPtr PutStill; GetVideoFuncPtr GetVideo; GetStillFuncPtr GetStill; StopVideoFuncPtr StopVideo; SetPortAttributeFuncPtr SetPortAttribute; GetPortAttributeFuncPtr GetPortAttribute; QueryBestSizeFuncPtr QueryBestSize; PutImageFuncPtr PutImage; QueryImageAttributesFuncPtr QueryImageAttributes; } XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; Each adaptor will have its own XF86VideoAdaptorRec. The fields are as follows: type This can be any of the following flags OR'd together. XvInputMask XvOutputMask These refer to the target drawable and are similar to a Window's class. XvInputMask indicates that the adaptor can put video into a drawable. XvOutputMask indicates that the adaptor can get video from a drawable. XvVideoMask XvStillMask XvImageMask These indicate that the adaptor supports video, still or image primitives respectively. XvWindowMask XvPixmapMask These indicate the types of drawables the adaptor is capable of rendering into. At the moment, Pixmap rendering is not supported and the XvPixmapMask flag is ignored. flags Currently, the following flags are defined: VIDEO_OVERLAID_STILLS Implementing PutStill for hardware that does video as an overlay can be awkward since it's unclear how long to leave the video up for. When this flag is set, StopVideo will be called whenever the destination gets clipped or moved so that the still can be left up until then. VIDEO_OVERLAID_IMAGES Same as VIDEO_OVERLAID_STILLS but for images. VIDEO_CLIP_TO_VIEWPORT Indicates that the clip region passed to the driver functions should be clipped to the visible portion of the screen in the case where the viewport is smaller than the virtual desktop. name The name of the adaptor. nEncodings pEncodings The number of encodings the adaptor is capable of and pointer to the XF86VideoEncodingRec array. The XF86VideoEncodingRec is described later on. For drivers that only support XvImages there should be an encoding named "XV_IMAGE" and the width and height should specify the maximum size source image supported. nFormats pFormats The number of formats the adaptor is capable of and pointer to the XF86VideoFormatRec array. The XF86VideoFormatRec is described later on. nPorts pPortPrivates The number of ports is the number of separate data streams which the adaptor can handle simultaneously. If you have more than one port, the adaptor is expected to be able to render into more than one window at a time. pPortPrivates is an array of pointers or ints - one for each port. A port's private data will be passed to the driver any time the port is requested to do something like put the video or stop the video. In the case where there may be many ports, this enables the driver to know which port the request is intended for. Most commonly, this will contain a pointer to the data structure containing information about the port. In Xv, all ports on a particular adaptor are expected to be identical in their functionality. nAttributes pAttributes The number of attributes recognized by the adaptor and a pointer to the array of XF86AttributeRecs. The XF86AttributeRec is described later on. nImages pImages The number of XF86ImageRecs supported by the adaptor and a pointer to the array of XF86ImageRecs. The XF86ImageRec is described later on. PutVideo PutStill GetVideo GetStill StopVideo SetPortAttribute GetPortAttribute QueryBestSize PutImage QueryImageAttributes These functions define the DDX->driver interface. In each case, the pointer data is passed to the driver. This is the port private for that port as described above. All fields are required except under the following conditions: PutVideo, PutStill and the image routines PutImage and QueryImageAttributes are not required when the adaptor type does not contain XvInputMask. GetVideo and GetStill are not required when the adaptor type does not contain XvOutputMask. GetVideo and PutVideo are not required when the adaptor type does not contain XvVideoMask. GetStill and PutStill are not required when the adaptor type does not contain XvStillMask. PutImage and QueryImageAttributes are not required when the adaptor type does not contain XvImageMask. With the exception of QueryImageAttributes, these functions should return Success if the operation was completed successfully. They can return XvBadAlloc otherwise. QueryImageAttributes returns the size of the XvImage queried. ClipBoxes is an X-Y banded region identical to those used throughout the server. The clipBoxes represent the visible portions of the area determined by drw_x, drw_y, drw_w and drw_h in the Get/Put function. The boxes are in screen coordinates, are guaranteed not to overlap and an empty region will never be passed.
typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, pointer data );
This indicates that the driver should take a subsection vid_w by vid_h at location (vid_x,vid_y) from the video stream and direct it into the rectangle drw_w by drw_h at location (drw_x,drw_y) on the screen, scaling as necessary. Due to the large variations in capabilities of the various hardware expected to be used with this extension, it is not expected that all hardware will be able to do this exactly as described. In that case the driver should just do the best it can, scaling as closely to the target rectangle as it can without rendering outside of it. In the worst case, the driver can opt to just not turn on the video.
typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, pointer data );
This is same as PutVideo except that the driver should place only one frame from the stream on the screen.
typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, pointer data );
This is same as PutVideo except that the driver gets video from the screen and outputs it. The driver should do the best it can to get the requested dimensions correct without reading from an area larger than requested.
typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn, short vid_x, short vid_y, short drw_x, short drw_y, short vid_w, short vid_h, short drw_w, short drw_h, RegionPtr clipBoxes, pointer data );
This is the same as GetVideo except that the driver should place only one frame from the screen into the output stream.
typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, pointer data, Bool cleanup);
This indicates the driver should stop displaying the video. This is used to stop both input and output video. The cleanup field indicates that the video is being stopped because the client requested it to stop or because the server is exiting the current VT. In that case the driver should deallocate any offscreen memory areas (if there are any) being used to put the video to the screen. If cleanup is not set, the video is being stopped temporarily due to clipping or moving of the window, etc... and video will likely be restarted soon so the driver should not deallocate any offscreen areas associated with that port.
typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,INT32 value, pointer data); typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, Atom attribute,INT32 *value, pointer data);
A port may have particular attributes such as hue, saturation, brightness or contrast. Xv clients set and get these attribute values by sending attribute strings (Atoms) to the server. Such requests end up at these driver functions. It is recommended that the driver provide at least the following attributes mentioned in the Xv client library docs: XV_ENCODING XV_HUE XV_SATURATION XV_BRIGHTNESS XV_CONTRAST but the driver may recognize as many atoms as it wishes. If a requested attribute is unknown by the driver it should return BadMatch. XV_ENCODING is the attribute intended to let the client specify which video encoding the particular port should be using (see the description of XF86VideoEncodingRec below). If the requested encoding is unsupported, the driver should return XvBadEncoding. If the value lies outside the advertised range BadValue may be returned. Success should be returned otherwise.
typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, pointer data);
QueryBestSize provides the client with a way to query what the destination dimensions would end up being if they were to request that an area vid_w by vid_h from the video stream be scaled to rectangle of drw_w by drw_h on the screen. Since it is not expected that all hardware will be able to get the target dimensions exactly, it is important that the driver provide this function.
typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int image, char *buf, short width, short height, Bool sync, RegionPtr clipBoxes, pointer data );
This is similar to PutStill except that the source of the video is not a port but the data stored in a system memory buffer at buf. The data is in the format indicated by the image descriptor and represents a source of size width by height. If sync is TRUE the driver should not return from this function until it is through reading the data from buf. Returning when sync is TRUE indicates that it is safe for the data at buf to be replaced, freed, or modified.
typedef int (* QueryImageAttributesFuncPtr)( ScrnInfoPtr pScrn, int image, short *width, short *height, int *pitches, int *offsets);
This function is called to let the driver specify how data for a particular image of size width by height should be stored. Sometimes only the size and corrected width and height are needed. In that case pitches and offsets are NULL. The size of the memory required for the image is returned by this function. The width and height of the requested image can be altered by the driver to reflect format limitations (such as component sampling periods that are larger than one). If pitches and offsets are not NULL, these will be arrays with as many elements in them as there are planes in the image format. The driver should specify the pitch (in bytes) of each scanline in the particular plane as well as the offset to that plane (in bytes) from the beginning of the image.
The XF86VideoEncodingRec:
typedef struct { int id; char *name; unsigned short width, height; XvRationalRec rate; } XF86VideoEncodingRec, *XF86VideoEncodingPtr;
The XF86VideoEncodingRec specifies what encodings the adaptor can support. Most of this data is just informational and for the client's benefit, and is what will be reported by XvQueryEncodings. The id field is expected to be a unique identifier to allow the client to request a certain encoding via the XV_ENCODING attribute string.
The XF86VideoFormatRec:
typedef struct { char depth; short class; } XF86VideoFormatRec, *XF86VideoFormatPtr;
This specifies what visuals the video is viewable in. depth is the depth of the visual (not bpp). class is the visual class such as TrueColor, DirectColor or PseudoColor. Initialization of an adaptor will fail if none of the visuals on that screen are supported.
The XF86AttributeRec:
typedef struct { int flags; int min_value; int max_value; char *name; } XF86AttributeListRec, *XF86AttributeListPtr;
Each adaptor may have an array of these advertising the attributes for its ports. Currently defined flags are XvGettable and XvSettable which may be OR'd together indicating that attribute is gettable or settable by the client. The min and max field specify the valid range for the value. Name is a text string describing the attribute by name.
The XF86ImageRec:
typedef struct { int id; int type; int byte_order; char guid[16]; int bits_per_pixel; int format; int num_planes; /* for RGB formats */ int depth; unsigned int red_mask; unsigned int green_mask; unsigned int blue_mask; /* for YUV formats */ unsigned int y_sample_bits; unsigned int u_sample_bits; unsigned int v_sample_bits; unsigned int horz_y_period; unsigned int horz_u_period; unsigned int horz_v_period; unsigned int vert_y_period; unsigned int vert_u_period; unsigned int vert_v_period; char component_order[32]; int scanline_order; } XF86ImageRec, *XF86ImagePtr;
XF86ImageRec describes how video source data is laid out in memory. The fields are as follows: id This is a unique descriptor for the format. It is often good to set this value to the FOURCC for the format when applicable. type This is XvRGB or XvYUV. byte_order This is LSBFirst or MSBFirst. guid This is the Globally Unique IDentifier for the format. When not applicable, all characters should be NULL. bits_per_pixel The number of bits taken up (but not necessarily used) by each pixel. Note that for some planar formats which have fractional bits per pixel (such as IF09) this number may be rounded _down_. format This is XvPlanar or XvPacked. num_planes The number of planes in planar formats. This should be set to one for packed formats. depth The significant bits per pixel in RGB formats (analogous to the depth of a pixmap format). red_mask green_mask blue_mask The red, green and blue bitmasks for packed RGB formats. y_sample_bits u_sample_bits v_sample_bits The y, u and v sample sizes (in bits). horz_y_period horz_u_period horz_v_period The y, u and v sampling periods in the horizontal direction. vert_y_period vert_u_period vert_v_period The y, u and v sampling periods in the vertical direction. component_order Uppercase ascii characters representing the order that samples are stored within packed formats. For planar formats this represents the ordering of the planes. Unused characters in the 32 byte string should be set to NULL. scanline_order This is XvTopToBottom or XvBottomToTop. Since some formats (particular some planar YUV formats) may not be completely defined by the parameters above, the guid, when available, should provide the most accurate description of the format.
The Loader This section describes the interfaces to the module loader. The loader interfaces can be divided into two groups: those that are only available to the XFree86 common layer, and those that are also available to modules. Loader Overview The loader is capable of loading modules in a range of object formats, and knowledge of these formats is built in to the loader. Knowledge of new object formats can be added to the loader in a straightforward manner. This makes it possible to provide OS-independent modules (for a given CPU architecture type). In addition to this, the loader can load modules via the OS-provided dlopen(3) service where available. Such modules are not platform independent, and the semantics of dlopen() on most systems results in significant limitations in the use of modules of this type. Support for dlopen() modules in the loader is primarily for experimental and development purposes. Symbols exported by the loader (on behalf of the core X server) to modules are determined at compile time. Only those symbols explicitly exported are available to modules. All external symbols of loaded modules are exported to other modules, and to the core X server. The loader can be requested to check for unresolved symbols at any time, and the action to be taken for unresolved symbols can be controlled by the caller of the loader. Typically the caller identifies which symbols can safely remain unresolved and which cannot. NOTE: Now that ISO-C allows pointers to functions and pointers to data to have different internal representations, some of the following interfaces will need to be revisited. Semi-private Loader Interface The following is the semi-private loader interface that is available to the XFree86 common layer.
void LoaderInit(void);
The LoaderInit() function initialises the loader, and it must be called once before calling any other loader functions. This function initialises the tables of exported symbols, and anything else that might need to be initialised.
void LoaderSetPath(const char *path);
The LoaderSetPath() function initialises a default module search path. This must be called if calls to other functions are to be made without explicitly specifying a module search path. The search path path must be a string of one or more comma separated absolute paths. Modules are expected to be located below these paths, possibly in subdirectories of these paths.
pointer LoadModule(const char *module, pointer options, const XF86ModReqInfo * modreq, int *errmaj);
The LoadModule() function loads the module called module. The return value is a module handle, and may be used in future calls to the loader that require a reference to a loaded module. The module name module is normally the module's canonical name, which doesn't contain any directory path information, or any object/library file prefixes of suffixes. Currently a full pathname and/or filename is also accepted. This might change. The other parameters are: options An optional parameter that is passed to the newly loaded module's SetupProc function (if it has one). This argument is normally a NULL terminated list of Options, and must be interpreted that way by modules loaded directly by the XFree86 common layer. However, it may be used for application-specific parameter passing in other situations. modreq An optional XF86ModReqInfo* containing version/ABI/vendor information to requirements to check the newly loaded module against. The main purpose of this is to allow the loader to verify that a module of the correct type/version before running its SetupProc function. The XF86ModReqInfo struct is defined as follows: typedef struct { CARD8 majorversion; CARD8 minorversion; CARD16 patchlevel; const char * abiclass; CARD32 abiversion; const char * moduleclass; } XF86ModReqInfo; The information here is compared against the equivalent information in the module's XF86ModuleVersionInfo record (which is described below). The values in comments above indicate don't care settings for each of the fields. The comparisons made are as follows: majorversion Must match the module's majorversion exactly. minorversion The module's minor version must be no less than this value. This comparison is only made if majorversion matches. patchlevel The module's patchlevel must be no less than this value. This comparison is only made if minorversion matches. abiclass String must match the module's abiclass string. abiversion Must be consistent with the module's abiversion (major equal, minor no older). moduleclass String must match the module's moduleclass string. errmaj An optional pointer to a variable holding the major part or the error code. When provided, *errmaj is filled in when LoadModule() fails.
void UnloadModule(pointer mod);
This function unloads the module referred to by the handle mod. All child modules are also unloaded recursively. This function must not be used to directly unload modules that are child modules (i.e., those that have been loaded with the LoadSubModule() described below).
Module Requirements Modules must provide information about themselves to the loader, and may optionally provide entry points for "setup" and "teardown" functions (those two functions are referred to here as SetupProc and TearDownProc). The module information is contained in the XF86ModuleVersionInfo struct, which is defined as follows: typedef struct { const char * modname; /* name of module, e.g. "foo" */ const char * vendor; /* vendor specific string */ CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */ CARD32 _modinfo2_; /* infoarea with a binary editor/sign tool */ CARD32 xf86version; /* contains XF86_VERSION_CURRENT */ CARD8 majorversion; /* module-specific major version */ CARD8 minorversion; /* module-specific minor version */ CARD16 patchlevel; /* module-specific patch level */ const char * abiclass; /* ABI class that the module uses */ CARD32 abiversion; /* ABI version */ const char * moduleclass; /* module class */ CARD32 checksum[4]; /* contains a digital signature of the */ /* version info structure */ } XF86ModuleVersionInfo; The fields are used as follows: modname The module's name. This field is currently only for informational purposes, but the loader may be modified in future to require it to match the module's canonical name. vendor The module vendor. This field is for informational purposes only. _modinfo1_ This field holds the first part of a signature that can be used to locate this structure in the binary. It should always be initialised to MODINFOSTRING1. _modinfo2_ This field holds the second part of a signature that can be used to locate this structure in the binary. It should always be initialised to MODINFOSTRING2. xf86version The XFree86 version against which the module was compiled. This is mostly for informational/diagnostic purposes. It should be initialised to XF86_VERSION_CURRENT, which is defined in xf86Version.h. majorversion The module-specific major version. For modules where this version is used for more than simply informational purposes, the major version should only change (be incremented) when ABI incompatibilities are introduced, or ABI components are removed. minorversion The module-specific minor version. For modules where this version is used for more than simply informational purposes, the minor version should only change (be incremented) when ABI additions are made in a backward compatible way. It should be reset to zero when the major version is increased. patchlevel The module-specific patch level. The patch level should increase with new revisions of the module where there are no ABI changes, and it should be reset to zero when the minor version is increased. abiclass The ABI class that the module requires. The class is specified as a string for easy extensibility. It should indicate which (if any) of the X server's built-in ABI classes that the module relies on, or a third-party ABI if appropriate. Built-in ABI classes currently defined are: ABI_CLASS_NONE no class ABI_CLASS_ANSIC only requires the ANSI C interfaces ABI_CLASS_VIDEODRV requires the video driver ABI ABI_CLASS_XINPUT requires the XInput driver ABI ABI_CLASS_EXTENSION requires the extension module ABI abiversion The version of abiclass that the module requires. The version consists of major and minor components. The major version must match and the minor version must be no newer than that provided by the server or parent module. Version identifiers for the built-in classes currently defined are: ABI_ANSIC_VERSION ABI_VIDEODRV_VERSION ABI_XINPUT_VERSION ABI_EXTENSION_VERSION moduleclass This is similar to the abiclass field, except that it defines the type of module rather than the ABI it requires. For example, although all video drivers require the video driver ABI, not all modules that require the video driver ABI are video drivers. This distinction can be made with the moduleclass. Currently pre-defined module classes are: MOD_CLASS_NONE MOD_CLASS_VIDEODRV MOD_CLASS_XINPUT MOD_CLASS_EXTENSION checksum Not currently used. The module version information, and the optional SetupProc and TearDownProc entry points are found by the loader by locating a data object in the module called "modnameModuleData", where "modname" is the canonical name of the module. Modules must contain such a data object, and it must be declared with global scope, be compile-time initialised, and is of the following type: typedef struct { XF86ModuleVersionInfo * vers; ModuleSetupProc setup; ModuleTearDownProc teardown; } XF86ModuleData; The vers parameter must be initialised to a pointer to a correctly initialised XF86ModuleVersionInfo struct. The other two parameter are optional, and should be initialised to NULL when not required. The other parameters are defined as
typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); typedef void (*ModuleTearDownProc)(pointer); pointer SetupProc(pointer module, pointer options, int *errmaj, int *errmin);
When defined, this function is called by the loader after successfully loading a module. module is a handle for the newly loaded module, and maybe used by the SetupProc if it calls other loader functions that require a reference to it. The remaining arguments are those that were passed to the LoadModule() (or LoadSubModule()), and are described above. When the SetupProc is successful it must return a non-NULL value. The loader checks this, and if it is NULL it unloads the module and reports the failure to the caller of LoadModule(). If the SetupProc does things that need to be undone when the module is unloaded, it should define a TearDownProc, and return a pointer that the TearDownProc can use to undo what has been done. When a module is loaded multiple times, the SetupProc is called once for each time it is loaded.
void TearDownProc(pointer tearDownData);
When defined, this function is called when the loader unloads a module. The tearDownData parameter is the return value of the SetupProc() that was called when the module was loaded. The purpose of this function is to clean up before the module is unloaded (for example, by freeing allocated resources).
Public Loader Interface The following is the Loader interface that is available to any part of the server, and may also be used from within modules.
pointer LoadSubModule(pointer parent, const char *module, const char **subdirlist, const char **patternlist, pointer options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin);
This function is like the LoadModule() function described above, except that the module loaded is registered as a child of the calling module. The parent parameter is the calling module's handle. Modules loaded with this function are automatically unloaded when the parent module is unloaded.
void UnloadSubModule(pointer module);
This function unloads the module with handle module. If that module itself has children, they are also unloaded. It is like UnloadModule(), except that it is safe to use for unloading child modules.
pointer LoaderSymbol(const char *symbol);
This function returns the address of the symbol with name symbol. This may be used to locate a module entry point with a known name.
char **LoaderlistDirs(const char **subdirlist, const char **patternlist);
This function returns a NULL terminated list of canonical modules names for modules found in the default module search path. The subdirlist and patternlist parameters are as described above, and can be used to control the locations and names that are searched. If no modules are found, the return value is NULL. The returned list should be freed by calling LoaderFreeDirList() when it is no longer needed.
void LoaderFreeDirList(char **list);
This function frees a module list created by LoaderlistDirs().
void LoaderReqSymLists(const char **list0, ...);
This function allows the registration of required symbols with the loader. It is normally used by a caller of LoadSubModule(). If any symbols registered in this way are found to be unresolved when LoaderCheckUnresolved() is called then LoaderCheckUnresolved() will report a failure. The function takes one or more NULL terminated lists of symbols. The end of the argument list is indicated by a NULL argument.
void LoaderReqSymbols(const char *sym0, ...);
This function is like LoaderReqSymLists() except that its arguments are symbols rather than lists of symbols. This function is more convenient when single functions are to be registered, especially when the single function might depend on runtime factors. The end of the argument list is indicated by a NULL argument.
void LoaderRefSymLists(const char **list0, ...);
This function allows the registration of possibly unresolved symbols with the loader. When LoaderCheckUnresolved() is run it won't generate warnings for symbols registered in this way unless they were also registered as required symbols. The function takes one or more NULL terminated lists of symbols. The end of the argument list is indicated by a NULL argument.
void LoaderRefSymbols(const char *sym0, ...);
This function is like LoaderRefSymLists() except that its arguments are symbols rather than lists of symbols. This function is more convenient when single functions are to be registered, especially when the single function might depend on runtime factors. The end of the argument list is indicated by a NULL argument.
int LoaderCheckUnresolved(int delayflag);
This function checks for unresolved symbols. It generates warnings for unresolved symbols that have not been registered with LoaderRefSymLists(), and maps them to a dummy function. This behaviour may change in future. If unresolved symbols are found that have been registered with LoaderReqSymLists() or LoaderReqSymbols() then this function returns a non-zero value. If none of these symbols are unresolved the return value is zero, indicating success. The delayflag parameter should normally be set to LD_RESOLV_IFDONE.
LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin);
This function prints an error message that includes the text Failed to load module, the module name modname, a message specific to the errmaj value, and the value if errmin. If name is non-NULL, it is printed as an identifying prefix to the message (followed by a :).
Special Registration Functions The loader contains some functions for registering some classes of modules. These may be moved out of the loader at some point.
void LoadExtensionList(const ExtensionModule ext[], int size, Bool builtin);
This registers the entry points for the extension array identified by ext. The ExtensionModule struct is defined as: typedef struct { InitExtension initFunc; char * name; Bool *disablePtr; } ExtensionModule;
Helper Functions This section describe helper functions that video driver might find useful. While video drivers are not required to use any of these to be considered compliant, the use of appropriate helpers is strongly encouraged to improve the consistency of driver behaviour. Functions for printing messages
ErrorF(const char *format, ...);
This is the basic function for writing to the error log (typically stderr and/or a log file). Video drivers should usually avoid using this directly in favour of the more specialised functions described below. This function is useful for printing messages while debugging a driver.
FatalError(const char *format, ...);
This prints a message and causes the Xserver to abort. It should rarely be used within a video driver, as most error conditions should be flagged by the return values of the driver functions. This allows the higher layers to decide how to proceed. In rare cases, this can be used within a driver if a fatal unexpected condition is found.
xf86ErrorF(const char *format, ...);
This is like ErrorF(), except that the message is only printed when the Xserver's verbosity level is set to the default (1) or higher. It means that the messages are not printed when the server is started with the flag. Typically this function would only be used for continuing messages started with one of the more specialised functions described below.
xf86ErrorFVerb(int verb, const char *format, ...);
Like xf86ErrorF(), except the minimum verbosity level for which the message is to be printed is given explicitly. Passing a verb value of zero means the message is always printed. A value higher than 1 can be used for information would normally not be needed, but which might be useful when diagnosing problems.
xf86Msg(MessageType type, const char *format, ...);
This is like xf86ErrorF(), except that the message is prefixed with a marker determined by the value of type. The marker is used to indicate the type of message (warning, error, probed value, config value, etc). Note the xf86Verbose value is ignored for messages of type X_ERROR. The marker values are: X_PROBED Value was probed. X_CONFIG Value was given in the config file. X_DEFAULT Value is a default. X_CMDLINE Value was given on the command line. X_NOTICE Notice. X_ERROR Error message. X_WARNING Warning message. X_INFO Informational message. X_NONE No prefix. X_NOT_IMPLEMENTED The message relates to functionality that is not yetimplemented.
xf86MsgVerb(MessageType type, int verb, const char *format, ...);
Like xf86Msg(), but with the verbosity level given explicitly.
xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...);
This is like xf86Msg() except that the driver's name (the name field of the ScrnInfoRec) followed by the scrnIndex in parentheses is printed following the prefix. This should be used by video drivers in most cases as it clearly indicates which driver/screen the message is for. If scrnIndex is negative, this function behaves exactly like xf86Msg(). NOTE: This function can only be used after the ScrnInfoRec and its name field have been allocated. Normally, this means that it can not be used before the END of the ChipProbe() function. Prior to that, use xf86Msg(), providing the driver's name explicitly. No screen number can be supplied at that point.
xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...);
Like xf86DrvMsg(), but with the verbosity level given explicitly.
Functions for setting values based on command line and config file
Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, int fbbpp, int depth24flags);
This function sets the depth, pixmapBPP and bitsPerPixel fields of the ScrnInfoRec. It also determines the defaults for display-wide attributes and pixmap formats the screen will support, and finds the Display subsection that matches the depth/bpp. This function should normally be called very early from the ChipPreInit() function. It requires that the confScreen field of the ScrnInfoRec be initialised prior to calling it. This is done by the XFree86 common layer prior to calling ChipPreInit(). The parameters passed are: depth driver's preferred default depth if no other is given. If zero, use the overall server default. bpp Same, but for the pixmap bpp. fbbpp Same, but for the framebuffer bpp. depth24flags Flags that indicate the level of 24/32bpp support and whether conversion between different framebuffer and pixmap formats is supported. The flags for this argument are defined as follows, and multiple flags may be ORed together: NoDepth24Support No depth 24 formats supported Support24bppFb 24bpp framebuffer supported Support32bppFb 32bpp framebuffer supported SupportConvert24to32 Can convert 24bpp pixmap to 32bpp fb SupportConvert32to24 Can convert 32bpp pixmap to 24bpp fb ForceConvert24to32 Force 24bpp pixmap to 32bpp fb conversion ForceConvert32to24 Force 32bpp pixmap to 24bpp fb conversion It uses the command line, config file, and default values in the correct order of precedence to determine the depth and bpp values. It is up to the driver to check the results to see that it supports them. If not the ChipPreInit() function should return FALSE. If only one of depth/bpp is given, the other is set to a reasonable (and consistent) default. If a driver finds that the initial depth24flags it uses later results in a fb format that requires more video memory than is available it may call this function a second time with a different depth24flags setting. On success, the return value is TRUE. On failure it prints an error message and returns FALSE. The following fields of the ScrnInfoRec are initialised by this function:
depth, bitsPerPixel, display, imageByteOrder, bitmapScanlinePad, bitmapScanlineUnit, bitmapBitOrder, numFormats, formats, fbFormat.
void xf86PrintDepthBpp(scrnInfoPtr scrp);
This function can be used to print out the depth and bpp settings. It should be called after the final call to xf86SetDepthBpp().
Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask);
This function sets the weight, mask, offset and rgbBits fields of the ScrnInfoRec. It would normally be called fairly early in the ChipPreInit() function for depths > 8bpp. It requires that the depth and display fields of the ScrnInfoRec be initialised prior to calling it. The parameters passed are: weight driver's preferred default weight if no other is given. If zero, use the overall server default. mask Same, but for mask. It uses the command line, config file, and default values in the correct order of precedence to determine the weight value. It derives the mask and offset values from the weight and the defaults. It is up to the driver to check the results to see that it supports them. If not the ChipPreInit() function should return FALSE. On success, this function prints a message showing the weight values selected, and returns TRUE. On failure it prints an error message and returns FALSE. The following fields of the ScrnInfoRec are initialised by this function:
weight, mask, offset.
Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual);
This function sets the defaultVisual field of the ScrnInfoRec. It would normally be called fairly early from the ChipPreInit() function. It requires that the depth and display fields of the ScrnInfoRec be initialised prior to calling it. The parameters passed are: visual driver's preferred default visual if no other is given. If -1, use the overall server default. It uses the command line, config file, and default values in the correct order of precedence to determine the default visual value. It is up to the driver to check the result to see that it supports it. If not the ChipPreInit() function should return FALSE. On success, this function prints a message showing the default visual selected, and returns TRUE. On failure it prints an error message and returns FALSE.
Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma);
This function sets the gamma field of the ScrnInfoRec. It would normally be called fairly early from the ChipPreInit() function in cases where the driver supports gamma correction. It requires that the monitor field of the ScrnInfoRec be initialised prior to calling it. The parameters passed are: gamma driver's preferred default gamma if no other is given. If zero (< 0.01), use the overall server default. It uses the command line, config file, and default values in the correct order of precedence to determine the gamma value. It is up to the driver to check the results to see that it supports them. If not the ChipPreInit() function should return FALSE. On success, this function prints a message showing the gamma value selected, and returns TRUE. On failure it prints an error message and returns FALSE.
void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y);
This function sets the xDpi and yDpi fields of the ScrnInfoRec. The driver can specify preferred defaults by setting x and y to non-zero values. The command line option overrides all other settings. Otherwise, if the DisplaySize entry is present in the screen's &k.monitor; config file section, it is used together with the virtual size to calculate the dpi values. This function should be called after all the mode resolution has been done.
const char *xf86GetVisualName(int visual);
Returns a printable string with the visual name matching the numerical visual class provided. If the value is outside the range of valid visual classes, NULL is returned.
Primary Mode functions The primary mode helper functions are those which would normally be used by a driver, unless it has unusual requirements which cannot be catered for the by the helpers.
int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, unsigned long apertureSize, LookupModeFlags strategy);
This function basically selects the set of modes to use based on those available and the various constraints. It also sets some other related parameters. It is normally called near the end of the ChipPreInit() function. The parameters passed to the function are: availModes List of modes available for the monitor. modeNames List of mode names that the screen is requesting. clockRanges A list of clock ranges allowed by the driver. Each range includes whether interlaced or multiscan modes are supported for that range. See below for more on clockRanges. linePitches List of line pitches supported by the driver. This is optional and should be NULL when not used. minPitch Minimum line pitch supported by the driver. This must be supplied when linePitches is NULL, and is ignored otherwise. maxPitch Maximum line pitch supported by the driver. This is required when minPitch is required. pitchInc Granularity of horizontal pitch values as supported by the chipset. This is expressed in bits. This must be supplied. minHeight minimum virtual height allowed. If zero, no limit is imposed. maxHeight maximum virtual height allowed. If zero, no limit is imposed. virtualX If greater than zero, this is the virtual width value that will be used. Otherwise, the virtual width is chosen to be the smallest that can accommodate the modes selected. virtualY If greater than zero, this is the virtual height value that will be used. Otherwise, the virtual height is chosen to be the smallest that can accommodate the modes selected. apertureSize The size (in bytes) of the aperture used to access video memory. strategy The strategy to use when choosing from multiple modes with the same name. The options are: LOOKUP_DEFAULT ??? LOOKUP_BEST_REFRESH mode with best refresh rate LOOKUP_CLOSEST_CLOCK mode with closest matching clock LOOKUP_LIST_ORDER first usable mode in list The following options can also be combined (OR'ed) with one of the above: LOOKUP_CLKDIV2 Allow halved clocks LOOKUP_OPTIONAL_TOLERANCES Allow missing horizontal sync and/or vertical refresh ranges in the xorg.conf Monitor section LOOKUP_OPTIONAL_TOLERANCES should only be specified when the driver can ensure all modes it generates can sync on, or at least not damage, the monitor or digital flat panel. Horizontal sync and/or vertical refresh ranges specified by the user will still be honoured (and acted upon). This function requires that the following fields of the ScrnInfoRec are initialised prior to calling it: clock[] List of discrete clocks (when non-programmable) numClocks Number of discrete clocks (when non-programmable) progClock Whether the clock is programmable or not monitor Pointer to the applicable xorg.conf monitor section fdFormat Format of the screen buffer videoRam total video memory size (in bytes) xInc Horizontal timing increment in pixels (defaults to 8) This function fills in the following ScrnInfoRec fields: modePool A subset of the modes available to the monitor which are compatible with the driver. modes One mode entry for each of the requested modes, with the status field of each filled in to indicate if the mode has been accepted or not. This list of modes is a circular list. virtualX The resulting virtual width. virtualY The resulting virtual height. displayWidth The resulting line pitch. The first stage of this function checks that the virtualX and virtualY values supplied (if greater than zero) are consistent with the line pitch and maxHeight limitations. If not, an error message is printed, and the return value is -1. The second stage sets up the mode pool, eliminating immediately any modes that exceed the driver's line pitch limits, and also the virtual width and height limits (if greater than zero). For each mode removed an informational message is printed at verbosity level 2. If the mode pool ends up being empty, a warning message is printed, and the return value is 0. The final stage is to lookup each mode name, and fill in the remaining parameters. If an error condition is encountered, a message is printed, and the return value is -1. Otherwise, the return value is the number of valid modes found (0 if none are found). Even if the supplied mode names include duplicates, no two names will ever match the same mode. Furthermore, if the supplied mode names do not yield a valid mode (including the case where no names are passed at all), the function will continue looking through the mode pool until it finds a mode that survives all checks, or until the mode pool is exhausted. A message is only printed by this function when a fundamental problem is found. It is intended that this function may be called more than once if there is more than one set of constraints that the driver can work within. If this function returns -1, the ChipPreInit() function should return FALSE. clockRanges is a linked list of clock ranges allowed by the driver. If a mode doesn't fit in any of the defined clockRanges, it is rejected. The first clockRange that matches all requirements is used. This structure needs to be initialized to NULL when allocated. clockRanges contains the following fields: minClock maxClock The lower and upper mode clock bounds for which the rest of the clockRange parameters apply. Since these are the mode clocks, they are not scaled with the ClockMulFactor and ClockDivFactor. It is up to the driver to adjust these values if they depend on the clock scaling factors. clockIndex (not used yet) -1 for programmable clocks interlaceAllowed TRUE if interlacing is allowed for this range doubleScanAllowed TRUE if doublescan or multiscan is allowed for this range ClockMulFactor ClockDivFactor Scaling factors that are applied to the mode clocks ONLY before selecting a clock index (when there is no programmable clock) or a SynthClock value. This is useful for drivers that support pixel multiplexing or that need to scale the clocks because of hardware restrictions (like sending 24bpp data to an 8 bit RAMDAC using a tripled clock). Note that these parameters describe what must be done to the mode clock to achieve the data transport clock between graphics controller and RAMDAC. For example for 2:1 pixel multiplexing, two pixels are sent to the RAMDAC on each clock. This allows the RAMDAC clock to be half of the actual pixel clock. Hence, ClockMulFactor=1 and ClockDivFactor=2. This means that the clock used for clock selection (ie, determining the correct clock index from the list of discrete clocks) or for the SynthClock field in case of a programmable clock is: (mode->Clock * ClockMulFactor) / ClockDivFactor. PrivFlags This field is copied into the mode->PrivFlags field when this clockRange is selected by xf86ValidateModes(). It allows the driver to find out what clock range was selected, so it knows it needs to set up pixel multiplexing or any other range-dependent feature. This field is purely driver-defined: it may contain flag bits, an index or anything else (as long as it is an INT). Note that the mode->SynthClock field is always filled in by xf86ValidateModes(): it will contain the data transport clock, which is the clock that will have to be programmed in the chip when it has a programmable clock, or the clock that will be picked from the clocks list when it is not a programmable one. Thus: mode->SynthClock = (mode->Clock * ClockMulFactor) / ClockDivFactor
void xf86PruneDriverModes(ScrnInfoPtr scrp);
This function deletes modes in the modes field of the ScrnInfoRec that have been marked as invalid. This is normally run after having run xf86ValidateModes() for the last time. For each mode that is deleted, a warning message is printed out indicating the reason for it being deleted.
void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags);
This function fills in the Crtc* fields for all the modes in the modes field of the ScrnInfoRec. The adjustFlags parameter determines how the vertical CRTC values are scaled for interlaced modes. They are halved if it is INTERLACE_HALVE_V. The vertical CRTC values are doubled for doublescan modes, and are further multiplied by the VScan value. This function is normally called after calling xf86PruneDriverModes().
void xf86PrintModes(ScrnInfoPtr scrp);
This function prints out the virtual size setting, and the line pitch being used. It also prints out two lines for each mode being used. The first line includes the mode's pixel clock, horizontal sync rate, refresh rate, and whether it is interlaced, doublescanned and/or multi-scanned. The second line is the mode's Modeline. This function is normally called after calling xf86SetCrtcForModes().
Secondary Mode functions The secondary mode helper functions are functions which are normally used by the primary mode helper functions, and which are not normally called directly by a driver. If a driver has unusual requirements and needs to do its own mode validation, it might be able to make use of some of these secondary mode helper functions.
const char *xf86ModeStatusToString(ModeStatus status);
This function converts the status value to a descriptive printable string.
void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode);
This function deletes the mode given from the modeList. It never prints any messages, so it is up to the caller to print a message if required.
Functions for handling strings and tokens Tables associating strings and numerical tokens combined with the following functions provide a compact way of handling strings from the config file, and for converting tokens into printable strings. The table data structure is: typedef struct { int token; const char * name; } SymTabRec, *SymTabPtr; A table is an initialised array of SymTabRec. The tokens must be non-negative integers. Multiple names may be mapped to a single token. The table is terminated with an element with a token value of -1 and NULL for the name.
const char *xf86TokenToString(SymTabPtr table, int token);
This function returns the first string in table that matches token. If no match is found, NULL is returned (NOTE, older versions of this function would return the string "unknown" when no match is found).
int xf86StringToToken(SymTabPtr table, const char *string);
This function returns the first token in table that matches string. The xf86NameCmp() function is used to determine the match. If no match is found, -1 is returned.
Functions for finding which config file entries to use These functions can be used to select the appropriate config file entries that match the detected hardware. They are described above in the Probe and Available Functions sections. Probing discrete clocks on old hardware The xf86GetClocks() function may be used to assist in finding the discrete pixel clock values on older hardware.
void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), void (*BlankScreen)(ScrnInfoPtr, Bool), int vertsyncreg, int maskval, int knownclkindex, int knownclkvalue);
This function uses a comparative sampling method to measure the discrete pixel clock values. The number of discrete clocks to measure is given by num. clockFunc is a function that selects the n'th clock. It should also save or restore any state affected by programming the clocks when the index passed is CLK_REG_SAVE or CLK_REG_RESTORE. ProtectRegs is a function that does whatever is required to protect the hardware state while selecting a new clock. BlankScreen is a function that blanks the screen. vertsyncreg and maskval are the register and bitmask to check for the presence of vertical sync pulses. knownclkindex and knownclkvalue are the index and value of a known clock. These are the known references on which the comparative measurements are based. The number of clocks probed is set in pScrn->numClocks, and the probed clocks are set in the pScrn->clock[] array. All of the clock values are in units of kHz.
void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from);
Print out the pixel clocks scrp->clock[]. from indicates whether the clocks were probed or from the config file.
Other helper functions
Bool xf86IsUnblank(int mode);
Returns TRUE when the screen saver mode specified by mode requires the screen be unblanked, and FALSE otherwise. The screen saver modes that require blanking are SCREEN_SAVER_ON and SCREEN_SAVER_CYCLE, and the screen saver modes that require unblanking are SCREEN_SAVER_OFF and SCREEN_SAVER_FORCER. Drivers may call this helper from their SaveScreen() function to interpret the screen saver modes.
The vgahw module The vgahw modules provides an interface for saving, restoring and programming the standard VGA registers, and for handling VGA colourmaps. Data Structures The public data structures used by the vgahw module are vgaRegRec and vgaHWRec. They are defined in vgaHW.h. General vgahw Functions
Bool vgaHWGetHWRec(ScrnInfoPtr pScrn);
This function allocates a vgaHWRec structure, and hooks it into the ScrnInfoRec's privates. Like all information hooked into the privates, it is persistent, and only needs to be allocated once per screen. This function should normally be called from the driver's ChipPreInit() function. The vgaHWRec is zero-allocated, and the following fields are explicitly initialised: ModeReg.DAC[] initialised with a default colourmap ModeReg.Attribute[0x11] initialised with the default overscan index ShowOverscan initialised according to the "ShowOverscan" option paletteEnabled initialised to FALSE cmapSaved initialised to FALSE pScrn initialised to pScrn In addition to the above, vgaHWSetStdFuncs() is called to initialise the register access function fields with the standard VGA set of functions. Once allocated, a pointer to the vgaHWRec can be obtained from the ScrnInfoPtr with the VGAHWPTR(pScrn) macro.
void vgaHWFreeHWRec(ScrnInfoPtr pScrn);
This function frees a vgaHWRec structure. It should be called from a driver's ChipFreeScreen() function.
Bool vgaHWSetRegCounts(ScrnInfoPtr pScrn, int numCRTC, int numSequencer, int numGraphics, int numAttribute);
This function allows the number of CRTC, Sequencer, Graphics and Attribute registers to be changed. This makes it possible for extended registers to be saved and restored with vgaHWSave() and vgaHWRestore(). This function should be called after a vgaHWRec has been allocated with vgaHWGetHWRec(). The default values are defined in vgaHW.h as follows: #define VGA_NUM_CRTC 25 #define VGA_NUM_SEQ 5 #define VGA_NUM_GFX 9 #define VGA_NUM_ATTR 21
Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src);
This function copies the contents of the VGA saved registers in src to dst. Note that it isn't possible to simply do this with memcpy() (or similar). This function returns TRUE unless there is a problem allocating space for the CRTC and related fields in dst.
void vgaHWSetStdFuncs(vgaHWPtr hwp);
This function initialises the register access function fields of hwp with the standard VGA set of functions. This is called by vgaHWGetHWRec(), so there is usually no need to call this explicitly. The register access functions are described below. If the registers are shadowed in some other port I/O space (for example a PCI I/O region), these functions can be used to access the shadowed registers if hwp->PIOOffset is initialised with offset, calculated in such a way that when the standard VGA I/O port value is added to it the correct offset into the PIO area results. This value is initialised to zero in vgaHWGetHWRec(). (Note: the PIOOffset functionality is present in XFree86 4.1.0 and later.)
void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset);
This function initialised the register access function fields of hwp with a generic MMIO set of functions. hwp->MMIOBase is initialised with base, which must be the virtual address that the start of MMIO area is mapped to. hwp->MMIOOffset is initialised with offset, which must be calculated in such a way that when the standard VGA I/O port value is added to it the correct offset into the MMIO area results. That means that these functions are only suitable when the VGA I/O ports are made available in a direct mapping to the MMIO space. If that is not the case, the driver will need to provide its own register access functions. The register access functions are described below.
Bool vgaHWMapMem(ScrnInfoPtr pScrn);
This function maps the VGA memory window. It requires that the vgaHWRec be allocated. If a driver requires non-default MapPhys or MapSize settings (the physical location and size of the VGA memory window) then those fields of the vgaHWRec must be initialised before calling this function. Otherwise, this function initialiases the default values of 0xA0000 for MapPhys and (64 * 1024) for MapSize. This function must be called before attempting to save or restore the VGA state. If the driver doesn't call it explicitly, the vgaHWSave() and vgaHWRestore() functions may call it if they need to access the VGA memory (in which case they will also call vgaHWUnmapMem() to unmap the VGA memory before exiting).
void vgaHWUnmapMem(ScrnInfoPtr pScrn);
This function unmaps the VGA memory window. It must only be called after the memory has been mapped. The Base field of the vgaHWRec field is set to NULL to indicate that the memory is no longer mapped.
void vgaHWGetIOBase(vgaHWPtr hwp);
This function initialises the IOBase field of the vgaHWRec. This function must be called before using any other functions that access the video hardware. A macro VGAHW_GET_IOBASE() is also available in vgaHW.h that returns the I/O base, and this may be used when the vgahw module is not loaded (for example, in the ChipProbe() function).
void vgaHWUnlock(vgaHWPtr hwp);
This function unlocks the VGA CRTC[0-7] registers, and must be called before attempting to write to those registers.
void vgaHWLock(vgaHWPtr hwp);
This function locks the VGA CRTC[0-7] registers.
void vgaHWEnable(vgaHWPtr hwp);
This function enables the VGA subsystem. (Note, this function is present in XFree86 4.1.0 and later.).
void vgaHWDisable(vgaHWPtr hwp);
This function disables the VGA subsystem. (Note, this function is present in XFree86 4.1.0 and later.).
void vgaHWSave(ScrnInfoPtr pScrn, vgaRegPtr save, int flags);
This function saves the VGA state. The state is written to the vgaRegRec pointed to by save. flags is set to one or more of the following flags ORed together: VGA_SR_MODE the mode setting registers are saved VGA_SR_FONTS the text mode font/text data is saved VGA_SR_CMAP the colourmap (LUT) is saved VGA_SR_ALL all of the above are saved The vgaHWRec and its IOBase fields must be initialised before this function is called. If VGA_SR_FONTS is set in flags, the VGA memory window must be mapped. If it isn't then vgaHWMapMem() will be called to map it, and vgaHWUnmapMem() will be called to unmap it afterwards. vgaHWSave() uses the three functions below in the order vgaHWSaveColormap(), vgaHWSaveMode(), vgaHWSaveFonts() to carry out the different save phases. It is undecided at this stage whether they will remain part of the vgahw module's public interface or not.
void vgaHWSaveMode(ScrnInfoPtr pScrn, vgaRegPtr save);
This function saves the VGA mode registers. They are saved to the vgaRegRec pointed to by save. The registers saved are: MiscOut CRTC[0-0x18] Attribute[0-0x14] Graphics[0-8] Sequencer[0-4] The number of registers actually saved may be modified by a prior call to vgaHWSetRegCounts().
void vgaHWSaveFonts(ScrnInfoPtr pScrn, vgaRegPtr save);
This function saves the text mode font and text data held in the video memory. If called while in a graphics mode, no save is done. The VGA memory window must be mapped with vgaHWMapMem() before to calling this function. On some platforms, one or more of the font/text plane saves may be no-ops. This is the case when the platform's VC driver already takes care of this.
void vgaHWSaveColormap(ScrnInfoPtr pScrn, vgaRegPtr save);
This function saves the VGA colourmap (LUT). Before saving it, it attempts to verify that the colourmap is readable. In rare cases where it isn't readable, a default colourmap is saved instead.
void vgaHWRestore(ScrnInfoPtr pScrn, vgaRegPtr restore, int flags);
This function programs the VGA state. The state programmed is that contained in the vgaRegRec pointed to by restore. flags is the same as described above for the vgaHWSave() function. The vgaHWRec and its IOBase fields must be initialised before this function is called. If VGA_SR_FONTS is set in flags, the VGA memory window must be mapped. If it isn't then vgaHWMapMem() will be called to map it, and vgaHWUnmapMem() will be called to unmap it afterwards. vgaHWRestore() uses the three functions below in the order vgaHWRestoreFonts(), vgaHWRestoreMode(), vgaHWRestoreColormap() to carry out the different restore phases. It is undecided at this stage whether they will remain part of the vgahw module's public interface or not.
void vgaHWRestoreMode(ScrnInfoPtr pScrn, vgaRegPtr restore);
This function restores the VGA mode registers. They are restored from the data in the vgaRegRec pointed to by restore. The registers restored are: MiscOut CRTC[0-0x18] Attribute[0-0x14] Graphics[0-8] Sequencer[0-4] The number of registers actually restored may be modified by a prior call to vgaHWSetRegCounts().
void vgaHWRestoreFonts(ScrnInfoPtr pScrn, vgaRegPtr restore);
This function restores the text mode font and text data to the video memory. The VGA memory window must be mapped with vgaHWMapMem() before to calling this function. On some platforms, one or more of the font/text plane restores may be no-ops. This is the case when the platform's VC driver already takes care of this.
void vgaHWRestoreColormap(ScrnInfoPtr pScrn, vgaRegPtr restore);
This function restores the VGA colourmap (LUT).
void vgaHWInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
This function fills in the vgaHWRec's ModeReg field with the values appropriate for programming the given video mode. It requires that the ScrnInfoRec's depth field is initialised, which determines how the registers are programmed.
void vgaHWSeqReset(vgaHWPtr hwp, Bool start);
Do a VGA sequencer reset. If start is TRUE, the reset is started. If start is FALSE, the reset is ended.
void vgaHWProtect(ScrnInfoPtr pScrn, Bool on);
This function protects VGA registers and memory from corruption during loads. It is typically called with on set to TRUE before programming, and with on set to FALSE after programming.
Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode);
This function blanks and unblanks the screen. It is blanked when mode is SCREEN_SAVER_ON or SCREEN_SAVER_CYCLE, and unblanked when mode is SCREEN_SAVER_OFF or SCREEN_SAVER_FORCER.
void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on);
This function blanks and unblanks the screen. It is blanked when on is FALSE, and unblanked when on is TRUE. This function is provided for use in cases where the ScrnInfoRec can't be derived from the ScreenRec (while probing for clocks, for example).
VGA Colormap Functions The vgahw module uses the standard colormap support (see the Colormap Handling section. This is initialised with the following function:
Bool vgaHWHandleColormaps(ScreenPtr pScreen);
VGA Register Access Functions The vgahw module abstracts access to the standard VGA registers by using a set of functions held in the vgaHWRec. When the vgaHWRec is created these function pointers are initialised with the set of standard VGA I/O register access functions. In addition to these, the vgahw module includes a basic set of MMIO register access functions, and the vgaHWRec function pointers can be initialised to these by calling the vgaHWSetMmioFuncs() function described above. Some drivers/platforms may require a different set of functions for VGA access. The access functions are described here.
void writeCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value);
Write value to CRTC register index.
CARD8 readCrtc(vgaHWPtr hwp, CARD8 index);
Return the value read from CRTC register index.
void writeGr(vgaHWPtr hwp, CARD8 index, CARD8 value);
Write value to Graphics Controller register index.
CARD8 readGR(vgaHWPtr hwp, CARD8 index);
Return the value read from Graphics Controller register index.
void writeSeq(vgaHWPtr hwp, CARD8 index, CARD8, value);
Write value to Sequencer register index.
CARD8 readSeq(vgaHWPtr hwp, CARD8 index);
Return the value read from Sequencer register index.
void writeAttr(vgaHWPtr hwp, CARD8 index, CARD8, value);
Write value to Attribute Controller register index. When writing out the index value this function should set bit 5 (0x20) according to the setting of hwp->paletteEnabled in order to preserve the palette access state. It should be cleared when hwp->paletteEnabled is TRUE and set when it is FALSE.
CARD8 readAttr(vgaHWPtr hwp, CARD8 index);
Return the value read from Attribute Controller register index. When writing out the index value this function should set bit 5 (0x20) according to the setting of hwp->paletteEnabled in order to preserve the palette access state. It should be cleared when hwp->paletteEnabled is TRUE and set when it is FALSE.
void writeMiscOut(vgaHWPtr hwp, CARD8 value);
Write value to the Miscellaneous Output register.
CARD8 readMiscOut(vgwHWPtr hwp);
Return the value read from the Miscellaneous Output register.
void enablePalette(vgaHWPtr hwp);
Clear the palette address source bit in the Attribute Controller index register and set hwp->paletteEnabled to TRUE.
void disablePalette(vgaHWPtr hwp);
Set the palette address source bit in the Attribute Controller index register and set hwp->paletteEnabled to FALSE.
void writeDacMask(vgaHWPtr hwp, CARD8 value);
Write value to the DAC Mask register.
CARD8 readDacMask(vgaHWptr hwp);
Return the value read from the DAC Mask register.
void writeDacReadAddress(vgaHWPtr hwp, CARD8 value);
Write value to the DAC Read Address register.
void writeDacWriteAddress(vgaHWPtr hwp, CARD8 value);
Write value to the DAC Write Address register.
void writeDacData(vgaHWPtr hwp, CARD8 value);
Write value to the DAC Data register.
CARD8 readDacData(vgaHWptr hwp);
Return the value read from the DAC Data register.
CARD8 readEnable(vgaHWptr hwp);
Return the value read from the VGA Enable register. (Note: This function is present in XFree86 4.1.0 and later.)
void writeEnable(vgaHWPtr hwp, CARD8 value);
Write value to the VGA Enable register. (Note: This function is present in XFree86 4.1.0 and later.)
Some notes about writing a driver NOTE: some parts of this are not up to date The following is an outline for writing a basic unaccelerated driver for a PCI video card with a linear mapped framebuffer, and which has a VGA core. It is includes some general information that is relevant to most drivers (even those which don't fit that basic description). The information here is based on the initial conversion of the Matrox Millennium driver to the new design. For a fleshing out and sample implementation of some of the bits outlined here, refer to that driver. Note that this is an example only. The approach used here will not be appropriate for all drivers. Each driver must reserve a unique driver name, and a string that is used to prefix all of its externally visible symbols. This is to avoid name space clashes when loading multiple drivers. The examples here are for the ZZZ driver, which uses the ZZZ or zzz prefix for its externally visible symbols. Include files All drivers normally include the following headers: "xf86.h" "xf86_OSproc.h" "xf86_ansic.h" "xf86Resources.h" Wherever inb/outb (and related things) are used the following should be included: "compiler.h" Note: in drivers, this must be included after "xf86_ansic.h". Drivers that need to access PCI vendor/device definitions need this: "xf86PciInfo.h" Drivers that need to access the PCI config space need this: "xf86Pci.h" Drivers using the mi banking wrapper need: "mibank.h" Drivers that initialise a SW cursor need this: "mipointer.h" All drivers using the mi colourmap code need this: "micmap.h" If a driver uses the vgahw module, it needs this: "vgaHW.h" Drivers supporting VGA or Hercules monochrome screens need: "xf1bpp.h" Drivers supporting VGA or EGC 16-colour screens need: "xf4bpp.h" Drivers using cfb need: #define PSZ 8 #include "cfb.h" #undef PSZ Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: "cfb16.h" "cfb24.h" "cfb32.h" The driver's own header file: "zzz.h" Drivers must NOT include the following: "xf86Priv.h" "xf86Privstr.h" "xf86_libc.h" "xf86_OSlib.h" "Xos.h" any OS header Data structures and initialisation The following macros should be defined: #define VERSION <version-as-an-int> #define ZZZ_NAME "ZZZ" /* the name used to prefix messages */ #define ZZZ_DRIVER_NAME "zzz" /* the driver name as used in config file */ #define ZZZ_MAJOR_VERSION <int> #define ZZZ_MINOR_VERSION <int> #define ZZZ_PATCHLEVEL <int> NOTE: ZZZ_DRIVER_NAME should match the name of the driver module without things like the "lib" prefix, the "_drv" suffix or filename extensions. A DriverRec must be defined, which includes the functions required at the pre-probe phase. The name of this DriverRec must be an upper-case version of ZZZ_DRIVER_NAME (for the purposes of static linking). DriverRec ZZZ = { VERSION, ZZZ_DRIVER_NAME, ZZZIdentify, ZZZProbe, ZZZAvailableOptions, NULL, 0 }; Define list of supported chips and their matching ID: static SymTabRec ZZZChipsets[] = { { PCI_CHIP_ZZZ1234, "zzz1234a" }, { PCI_CHIP_ZZZ5678, "zzz5678a" }, { -1, NULL } }; The token field may be any integer value that the driver may use to uniquely identify the supported chipsets. For drivers that support only PCI devices using the PCI device IDs might be a natural choice, but this isn't mandatory. For drivers that support both PCI and other devices (like ISA), some other ID should probably used. When other IDs are used as the tokens it is recommended that the names be defined as an enum type. If the driver uses the xf86MatchPciInstances() helper (recommended for drivers that support PCI cards) a list that maps PCI IDs to chip IDs and fixed resources must be defined: static PciChipsets ZZZPciChipsets[] = { { PCI_CHIP_ZZZ1234, PCI_CHIP_ZZZ1234, RES_SHARED_VGA }, { PCI_CHIP_ZZZ5678, PCI_CHIP_ZZZ5678, RES_SHARED_VGA }, { -1, -1, RES_UNDEFINED } } Define the XF86ModuleVersionInfo struct for the driver. This is required for the dynamically loaded version: static XF86ModuleVersionInfo zzzVersRec = { "zzz", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XF86_VERSION_CURRENT, ZZZ_MAJOR_VERSION, ZZZ_MINOR_VERSION, ZZZ_PATCHLEVEL, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0,0,0,0} }; Define a data structure to hold the driver's screen-specific data. This must be used instead of global variables. This would be defined in the "zzz.h" file, something like: typedef struct { type1 field1; type2 field2; int fooHack; Bool pciRetry; Bool noAccel; Bool hwCursor; CloseScreenProcPtr CloseScreen; OptionInfoPtr Options; ... } ZZZRec, *ZZZPtr; Define the list of config file Options that the driver accepts. For consistency between drivers those in the list of standard options should be used where appropriate before inventing new options. typedef enum { OPTION_FOO_HACK, OPTION_PCI_RETRY, OPTION_HW_CURSOR, OPTION_NOACCEL } ZZZOpts; static const OptionInfoRec ZZZOptions[] = { { OPTION_FOO_HACK, "FooHack", OPTV_INTEGER, {0}, FALSE }, { OPTION_PCI_RETRY, "PciRetry", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; Functions SetupProc For dynamically loaded modules, a ModuleData variable is required. It is should be the name of the driver prepended to "ModuleData". A Setup() function is also required, which calls xf86AddDriver() to add the driver to the main list of drivers. static MODULESETUPPROTO(zzzSetup); XF86ModuleData zzzModuleData = { &zzzVersRec, zzzSetup, NULL }; static pointer zzzSetup(pointer module, pointer opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; /* This module should be loaded only once, but check to be sure. */ if (!setupDone) { /* * Modules that this driver always requires may be loaded * here by calling LoadSubModule(). */ setupDone = TRUE; xf86AddDriver(&MGA, module, 0); /* * The return value must be non-NULL on success even though * there is no TearDownProc. */ return (pointer)1; } else { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; } } GetRec, FreeRec A function is usually required to allocate the driver's screen-specific data structure and hook it into the ScrnInfoRec's driverPrivate field. The ScrnInfoRec's driverPrivate is initialised to NULL, so it is easy to check if the initialisation has already been done. After allocating it, initialise the fields. By using xnfcalloc() to do the allocation it is zeroed, and if the allocation fails the server exits. NOTE: When allocating structures from inside the driver which are defined on the common level it is important to initialize the structure to zero. Only this guarantees that the server remains source compatible to future changes in common level structures. static Bool ZZZGetRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate != NULL) return TRUE; pScrn->driverPrivate = xnfcalloc(sizeof(ZZZRec), 1); /* Initialise as required */ ... return TRUE; } Define a macro in "zzz.h" which gets a pointer to the ZZZRec when given pScrn: #define ZZZPTR(p) ((ZZZPtr)((p)->driverPrivate)) Define a function to free the above, setting it to NULL once it has been freed: static void ZZZFreeRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate == NULL) return; xfree(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } Identify Define the Identify() function. It is run before the Probe, and typically prints out an identifying message, which might include the chipsets it supports. This function is mandatory: static void ZZZIdentify(int flags) { xf86PrintChipsets(ZZZ_NAME, "driver for ZZZ Tech chipsets", ZZZChipsets); } Probe Define the Probe() function. The purpose of this is to find all instances of the hardware that the driver supports, and for the ones not already claimed by another driver, claim the slot, and allocate a ScrnInfoRec. This should be a minimal probe, and it should under no circumstances leave the state of the hardware changed. Because a device is found, don't assume that it will be used. Don't do any initialisations other than the required ScrnInfoRec initialisations. Don't allocate any new data structures. This function is mandatory. NOTE: The xf86DrvMsg() functions cannot be used from the Probe. static Bool ZZZProbe(DriverPtr drv, int flags) { Bool foundScreen = FALSE; int numDevSections, numUsed; GDevPtr *devSections; int *usedChips; int i; /* * Find the config file Device sections that match this * driver, and return if there are none. */ if ((numDevSections = xf86MatchDevice(ZZZ_DRIVER_NAME, &devSections)) <= 0) { return FALSE; } /* * Since this is a PCI card, "probing" just amounts to checking * the PCI data that the server has already collected. If there * is none, return. * * Although the config file is allowed to override things, it * is reasonable to not allow it to override the detection * of no PCI video cards. * * The provided xf86MatchPciInstances() helper takes care of * the details. */ /* test if PCI bus present */ if (xf86GetPciVideoInfo()) { numUsed = xf86MatchPciInstances(ZZZ_NAME, PCI_VENDOR_ZZZ, ZZZChipsets, ZZZPciChipsets, devSections, numDevSections, drv, &usedChips); for (i = 0; i < numUsed; i++) { ScrnInfoPtr pScrn = NULL; if ((pScrn = xf86ConfigPciEntity(pScrn, flags, usedChips[i], ZZZPciChipsets, NULL, NULL, NULL, NULL, NULL))) { /* Allocate a ScrnInfoRec */ pScrn->driverVersion = VERSION; pScrn->driverName = ZZZ_DRIVER_NAME; pScrn->name = ZZZ_NAME; pScrn->Probe = ZZZProbe; pScrn->PreInit = ZZZPreInit; pScrn->ScreenInit = ZZZScreenInit; pScrn->SwitchMode = ZZZSwitchMode; pScrn->AdjustFrame = ZZZAdjustFrame; pScrn->EnterVT = ZZZEnterVT; pScrn->LeaveVT = ZZZLeaveVT; pScrn->FreeScreen = ZZZFreeScreen; pScrn->ValidMode = ZZZValidMode; foundScreen = TRUE; /* add screen to entity */ } } xfree(usedChips); } xfree(devSections); return foundScreen; AvailableOptions Define the AvailableOptions() function. The purpose of this is to return the available driver options back to the -configure option, so that an xorg.conf file can be built and the user can see which options are available for them to use. PreInit Define the PreInit() function. The purpose of this is to find all the information required to determine if the configuration is usable, and to initialise those parts of the ScrnInfoRec that can be set once at the beginning of the first server generation. The information should be found in the least intrusive way possible. This function is mandatory. NOTES: The PreInit() function is only called once during the life of the X server (at the start of the first generation). Data allocated here must be of the type that persists for the life of the X server. This means that data that hooks into the ScrnInfoRec's privates field should be allocated here, but data that hooks into the ScreenRec's devPrivates field should not be allocated here. The driverPrivate field should also be allocated here. Although the ScrnInfoRec has been allocated before this function is called, the ScreenRec has not been allocated. That means that things requiring it cannot be used in this function. Very little of the ScrnInfoRec has been initialised when this function is called. It is important to get the order of doing things right in this function. static Bool ZZZPreInit(ScrnInfoPtr pScrn, int flags) { /* Fill in the monitor field */ pScrn->monitor = pScrn->confScreen->monitor; /* * If using the vgahw module, it will typically be loaded * here by calling xf86LoadSubModule(pScrn, "vgahw"); */ /* * Set the depth/bpp. Use the globally preferred depth/bpp. If the * driver has special default depth/bpp requirements, the defaults should * be specified here explicitly. * We support both 24bpp and 32bpp framebuffer layouts. * This sets pScrn->display also. */ if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support24bppFb | Support32bppFb)) { return FALSE; } else { if (depth/bpp isn't one we support) { print error message; return FALSE; } } /* Print out the depth/bpp that was set */ xf86PrintDepthBpp(pScrn); /* Set bits per RGB for 8bpp */ if (pScrn->depth <= 8) { /* Take into account a dac_6_bit option here */ pScrn->rgbBits = 6 or 8; } /* * xf86SetWeight() and xf86SetDefaultVisual() must be called * after pScrn->display is initialised. */ /* Set weight/mask/offset for depth > 8 */ if (pScrn->depth > 8) { if (!xf86SetWeight(pScrn, defaultWeight, defaultMask)) { return FALSE; } else { if (weight isn't one we support) { print error message; return FALSE; } } } /* Set the default visual. */ if (!xf86SetDefaultVisual(pScrn, -1)) { return FALSE; } else { if (visual isn't one we support) { print error message; return FALSE; } } /* If the driver supports gamma correction, set the gamma. */ if (!xf86SetGamma(pScrn, default_gamma)) { return FALSE; } /* This driver uses a programmable clock */ pScrn->progClock = TRUE; /* Allocate the ZZZRec driverPrivate */ if (!ZZZGetRec(pScrn)) { return FALSE; } pZzz = ZZZPTR(pScrn); /* Collect all of the option flags (fill in pScrn->options) */ xf86CollectOptions(pScrn, NULL); /* * Process the options based on the information in ZZZOptions. * The results are written to pZzz->Options. If all of the options * processing is done within this function a local variable "options" * can be used instead of pZzz->Options. */ if (!(pZzz->Options = xalloc(sizeof(ZZZOptions)))) return FALSE; (void)memcpy(pZzz->Options, ZZZOptions, sizeof(ZZZOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pZzz->Options); /* * Set various fields of ScrnInfoRec and/or ZZZRec based on * the options found. */ from = X_DEFAULT; pZzz->hwCursor = FALSE; if (xf86IsOptionSet(pZzz->Options, OPTION_HW_CURSOR)) { from = X_CONFIG; pZzz->hwCursor = TRUE; } xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n", pZzz->hwCursor ? "HW" : "SW"); if (xf86IsOptionSet(pZzz->Options, OPTION_NOACCEL)) { pZzz->noAccel = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Acceleration disabled\n"); } else { pZzz->noAccel = FALSE; } if (xf86IsOptionSet(pZzz->Options, OPTION_PCI_RETRY)) { pZzz->UsePCIRetry = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "PCI retry enabled\n"); } pZzz->fooHack = 0; if (xf86GetOptValInteger(pZzz->Options, OPTION_FOO_HACK, &pZzz->fooHack)) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Foo Hack set to %d\n", pZzz->fooHack); } /* * Find the PCI slot(s) that this screen claimed in the probe. * In this case, exactly one is expected, so complain otherwise. * Note in this case we're not interested in the card types so * that parameter is set to NULL. */ if ((i = xf86GetPciInfoForScreen(pScrn->scrnIndex, &pciList, NULL)) != 1) { print error message; ZZZFreeRec(pScrn); if (i > 0) xfree(pciList); return FALSE; } /* Note that pciList should be freed below when no longer needed */ /* * Determine the chipset, allowing config file chipset and * chipid values to override the probed information. The config * chipset value has precedence over its chipid value if both * are present. * * It isn't necessary to fill in pScrn->chipset if the driver * keeps track of the chipset in its ZZZRec. */ ... /* * Determine video memory, fb base address, I/O addresses, etc, * allowing the config file to override probed values. * * Set the appropriate pScrn fields (videoRam is probably the * most important one that other code might require), and * print out the settings. */ ... /* Initialise a clockRanges list. */ ... /* Set any other chipset specific things in the ZZZRec */ ... /* Select valid modes from those available */ i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, pScrn->display->modes, clockRanges, NULL, minPitch, maxPitch, rounding, minHeight, maxHeight, pScrn->display->virtualX, pScrn->display->virtualY, pScrn->videoRam * 1024, LOOKUP_BEST_REFRESH); if (i == -1) { ZZZFreeRec(pScrn); return FALSE; } /* Prune the modes marked as invalid */ xf86PruneDriverModes(pScrn); /* If no valid modes, return */ if (i == 0 || pScrn->modes == NULL) { print error message; ZZZFreeRec(pScrn); return FALSE; } /* * Initialise the CRTC fields for the modes. This driver expects * vertical values to be halved for interlaced modes. */ xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V); /* Set the current mode to the first in the list. */ pScrn->currentMode = pScrn->modes; /* Print the list of modes being used. */ xf86PrintModes(pScrn); /* Set the DPI */ xf86SetDpi(pScrn, 0, 0); /* Load bpp-specific modules */ switch (pScrn->bitsPerPixel) { case 1: mod = "xf1bpp"; break; case 4: mod = "xf4bpp"; break; case 8: mod = "cfb"; break; case 16: mod = "cfb16"; break; case 24: mod = "cfb24"; break; case 32: mod = "cfb32"; break; } if (mod && !xf86LoadSubModule(pScrn, mod)) ZZZFreeRec(pScrn); return FALSE; /* Done */ return TRUE; } MapMem, UnmapMem Define functions to map and unmap the video memory and any other memory apertures required. These functions are not mandatory, but it is often useful to have such functions. static Bool ZZZMapMem(ScrnInfoPtr pScrn) { /* Call xf86MapPciMem() to map each PCI memory area */ ... return TRUE or FALSE; } static Bool ZZZUnmapMem(ScrnInfoPtr pScrn) { /* Call xf86UnMapVidMem() to unmap each memory area */ ... return TRUE or FALSE; } Save, Restore Define functions to save and restore the original video state. These functions are not mandatory, but are often useful. static void ZZZSave(ScrnInfoPtr pScrn) { /* * Save state into per-screen data structures. * If using the vgahw module, vgaHWSave will typically be * called here. */ ... } static void ZZZRestore(ScrnInfoPtr pScrn) { /* * Restore state from per-screen data structures. * If using the vgahw module, vgaHWRestore will typically be * called here. */ ... } ModeInit Define a function to initialise a new video mode. This function isn't mandatory, but is often useful. static Bool ZZZModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { /* * Program a video mode. If using the vgahw module, * vgaHWInit and vgaRestore will typically be called here. * Once up to the point where there can't be a failure * set pScrn->vtSema to TRUE. */ ... } ScreenInit Define the ScreenInit() function. This is called at the start of each server generation, and should fill in as much of the ScreenRec as possible as well as any other data that is initialised once per generation. It should initialise the framebuffer layers it is using, and initialise the initial video mode. This function is mandatory. NOTE: The ScreenRec (pScreen) is passed to this driver, but it and the ScrnInfoRecs are not yet hooked into each other. This means that in this function, and functions it calls, one cannot be found from the other. static Bool ZZZScreenInit(ScreenPtr pScreen, int argc, char **argv) { /* Get the ScrnInfoRec */ pScrn = xf86ScreenToScrn(pScreen); /* * If using the vgahw module, its data structures and related * things are typically initialised/mapped here. */ /* Save the current video state */ ZZZSave(pScrn); /* Initialise the first mode */ ZZZModeInit(pScrn, pScrn->currentMode); /* Set the viewport if supported */ ZZZAdjustFrame(pScrn, pScrn->frameX0, pScrn->frameY0); /* * Setup the screen's visuals, and initialise the framebuffer * code. */ /* Reset the visual list */ miClearVisualTypes(); /* * Setup the visuals supported. This driver only supports * TrueColor for bpp > 8, so the default set of visuals isn't * acceptable. To deal with this, call miSetVisualTypes with * the appropriate visual mask. */ if (pScrn->bitsPerPixel > 8) { if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; } else { if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; } /* * Initialise the framebuffer. */ switch (pScrn->bitsPerPixel) { case 1: ret = xf1bppScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; case 4: ret = xf4bppScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; case 8: ret = cfbScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; case 16: ret = cfb16ScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; case 24: ret = cfb24ScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; case 32: ret = cfb32ScreenInit(pScreen, FbBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth); break; default: print a message about an internal error; ret = FALSE; break; } if (!ret) return FALSE; /* Override the default mask/offset settings */ if (pScrn->bitsPerPixel > 8) { for (i = 0, visual = pScreen->visuals; i < pScreen->numVisuals; i++, visual++) { if ((visual->class | DynamicClass) == DirectColor) { visual->offsetRed = pScrn->offset.red; visual->offsetGreen = pScrn->offset.green; visual->offsetBlue = pScrn->offset.blue; visual->redMask = pScrn->mask.red; visual->greenMask = pScrn->mask.green; visual->blueMask = pScrn->mask.blue; } } } /* * If banking is needed, initialise an miBankInfoRec (defined in * "mibank.h"), and call miInitializeBanking(). */ if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY, pScrn->displayWidth, pBankInfo)) return FALSE; /* * Set initial black & white colourmap indices. */ xf86SetBlackWhitePixels(pScreen); /* * Install colourmap functions. */ ... /* * Initialise cursor functions. This example is for the mi * software cursor. */ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); /* Initialise the default colourmap */ switch (pScrn->depth) { case 1: if (!xf1bppCreateDefColormap(pScreen)) return FALSE; break; case 4: if (!xf4bppCreateDefColormap(pScreen)) return FALSE; break; default: if (!cfbCreateDefColormap(pScreen)) return FALSE; break; } /* * Wrap the CloseScreen vector and set SaveScreen. */ ZZZPTR(pScrn)->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = ZZZCloseScreen; pScreen->SaveScreen = ZZZSaveScreen; /* Report any unused options (only for the first generation) */ if (serverGeneration == 1) { xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); } /* Done */ return TRUE; } SwitchMode Define the SwitchMode() function if mode switching is supported by the driver. static Bool ZZZSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { return ZZZModeInit(pScrn, mode); } AdjustFrame Define the AdjustFrame() function if the driver supports this. static void ZZZAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { /* Adjust the viewport */ } EnterVT, LeaveVT Define the EnterVT() and LeaveVT() functions. These functions are mandatory. static Bool ZZZEnterVT(ScrnInfoPtr pScrn) { return ZZZModeInit(pScrn, pScrn->currentMode); } static void ZZZLeaveVT(ScrnInfoPtr pScrn) { ZZZRestore(pScrn); } CloseScreen Define the CloseScreen() function: This function is mandatory. Note that it unwraps the previously wrapped pScreen->CloseScreen, and finishes by calling it. static Bool ZZZCloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (pScrn->vtSema) { ZZZRestore(pScrn); ZZZUnmapMem(pScrn); } pScrn->vtSema = FALSE; pScreen->CloseScreen = ZZZPTR(pScrn)->CloseScreen; return (*pScreen->CloseScreen)(pScreen); } SaveScreen Define the SaveScreen() function (the screen blanking function). When using the vgahw module, this will typically be: static Bool ZZZSaveScreen(ScreenPtr pScreen, int mode) { return vgaHWSaveScreen(pScreen, mode); } This function is mandatory. Before modifying any hardware register directly this function needs to make sure that the Xserver is active by checking if pScrn is non-NULL and for pScrn->vtSema == TRUE. FreeScreen Define the FreeScreen() function. This function is optional. It should be defined if the ScrnInfoRec driverPrivate field is used so that it can be freed when a screen is deleted by the common layer for reasons possibly beyond the driver's control. This function is not used in during normal (error free) operation. The per-generation data is freed by the CloseScreen() function. static void ZZZFreeScreen(ScrnInfoPtr pScrn) { /* * If the vgahw module is used vgaHWFreeHWRec() would be called * here. */ ZZZFreeRec(pScrn); }
xorg-server-21.1.16/hw/xfree86/doc/Makefile.in0000644000175000017500000005532314757411115014363 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # Generate output formats for a single DocBook/XML with/without chapters # # Variables set by the calling Makefile: # noinst_DATA: developers docs are not installed # docbook: the main DocBook/XML file, no chapters, appendix or image files # chapters: all files pulled in by an XInclude statement and images. # # # This makefile is intended for Developers Documentation and is not installed. # Do not use for Users docs or Specs which need to be installed and require olink support # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 # for an explanation on documents classification. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_1 = $(docbook:.xml=.html) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(docbook:.xml=.txt) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(docbook:.xml=.pdf) $(docbook:.xml=.ps) subdir = hw/xfree86/doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__dist_noinst_DATA_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__dist_noinst_DATA_DIST = ddxDesign.xml DATA = $(dist_noinst_DATA) $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/devbook.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # Main DocBook/XML files (DOCTYPE book) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@docbook = ddxDesign.xml # Developers documnetation is not installed @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@noinst_DATA = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_1) \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_2) \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@ $(am__append_3) # DocBook/XML file with chapters, appendix and images it includes @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@dist_noinst_DATA = $(docbook) $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@FILTER_XMLTO = $(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_HTML_FLAGS = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@XMLTO_FO_FLAGS = \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(XORG_SGML_PATH)/X11" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --searchpath "$(abs_top_builddir)" \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ --stringparam img.src.path=$(abs_builddir)/ \ @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl @ENABLE_DEVEL_DOCS_TRUE@@HAVE_XMLTO_TRUE@CLEANFILES = $(noinst_DATA) # Generate DocBook/XML output formats with or without stylesheets EXTRA_DIST = \ Registry \ exa-driver.txt \ README.modes all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/devbook.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/devbook.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.html: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@%.txt: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.pdf: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@%.ps: %.xml $(chapters) @ENABLE_DEVEL_DOCS_TRUE@@HAVE_FOP_TRUE@@HAVE_STYLESHEETS_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/doc/Registry0000644000175000017500000002650514757411105014050 This is the XFree86 driver/module registry. To avoid name space clashes and to maintain some consistency between drivers the important name spaces are maintained here. 1. Module Names. Each module is required to have a unique name. Registered names are: GLcore acecad afb apm ark ati atimisc bitmap bt8xx calcomp cfb cfb16 cfb24 cfb32 chips cirrus citron cyrix dbe ddc digitaledge dmc dri drm dynapro elo2300 elographics extmod fb fbdev fbdevhw fi12x6 freetype glide glint glx hyperpen i128 i2c i740 i810 imstt int10 joystick keyboard layer magellan magictouch mfb mga microtouch mouse msp34xx mutouch neomagic newport nv pcidata penmount pex5 r128 radeon rac ramdac record rendition s3 s3virge savage shadow shadowfb siliconmotion sis spaceorb speedo summa sunbw2 suncg14 suncg3 suncg6 sunffb sunleo suntcx tdfx tga trident tseng type1 v4l vbe vesa vga vgahw vmware void wacom xaa xf1bpp xf24_32bpp xf4bpp xf8_16bpp xf8_32bpp xf8_32wid xie xtrap xtt 2. External Module Object Symbols. Each module is required to use a unique prefix or prefixes for all of its externally visible symbols. They should be unique without regard to case. Registered prefixes are: ati bt8xx cfb chips fi12x6 glide glint mfb mga msp34xx neo permedia tseng vga vgahw vmware xaa xf1bpp xf4bpp 3. Chipset Names. Each video driver is required to use a unique set of chipset names. Case, white space and underscore characters are ignored when comparing chipset names. All names listed here are in lower case with all white space and underscores removed. Registered chipset names are: ati ativga ct64200 ct64300 ct65520 ct65525 ct65530 ct65535 ct65540 ct65545 ct65546 ct65548 ct65550 ct65554 ct65555 ct68554 ct69000 et4000 et4000w32 et4000w32i et4000w32p et6000 et6100 generic ibmvga ibm8514 mach32 mach64 mach8 mga2064w mga1064sg mga2164w mga2164wagp neo2070 neo2090 neo2093 neo2097 neo2160 neo2200 tipm2 vgawonder voodoo 4. Option Names. Option names and their usage should be consistent between drivers. Case, white space and underscore characters are ignored when comparing option names. The prefix "no" may be added or removed from boolean option names. All names listed here are in their preferred user-visible form. Some registered option names are: Types are: B = boolean, O = set/unset (no value), I = integer, S = string, A = optional string, F = floating point number Q = frequency Scopes are: F = global flags, V = video driver, C = common (per screen), I = input drivers, X = XAA, Xv = Xv extension, M = misc. Names currently in use: Name Type Scope Description ---------------------------------------------------------------------------- AllowMouseOpenFail B F ignore mouse dev open failure AllowNonLocalModInDev B F allow non-local mod of input devs AllowNonLocalXvidtune B F allow non-local VidMode connections BlankTime I F Screen saver timeout (min) DisableModInDev B F disallow changing input devs DisableVidModeExtension B F disable VidMode extension DontVTSwitch B F disable Ctrl-Alt-Fn DontZap B F disable Ctrl-Alt-BS sequence DontZoom B F disable Ctrl-Alt-+/- OffTime I F Time before DPMS off mode active (min) PciProbe1 O F use PCI probe algorithm 1 PciProbe2 O F use PCI probe algorithm 2 PciForceConfig1 O F force PCI config type 1 PciForceConfig2 O F force PCI config type 2 Pixmap I F depth 24 pixmap size (24 or 32) StandbyTime I F Time before DPMS standby active (min) SuspendTime I F Time before DPMS suspend mode active (min) BackingStore B C Enable backing store DDC B C Enable/disable DDC DDC1 B C Enable/disable DDC1 DDC2 B C Enable/disable DDC2 DPMS O C Enable DPMS BaudRate I I Serial port baud rate ButtonNumber I I Button number (for touch screen?) ButtonThreshold I I ?? ClearDTR O I Clear serial port DTR ClearRTS O I Clear serial port RTS DataBits I I Serial port data bits DemandLoad O I ?? Device S I Device file name DeviceName S I Input device name FlowControl S I Serial flow control ("xon", "none") Floating B I Device initialised as floating HistorySize I I ?? MaxX I I Maximum X coordinate MaxY I I Maximum Y coordinate MinX I I Minimum X coordinate MinY I I Minimum Y coordinate Parity S I Serial port parity ("odd", "even", "none") ReportDelay I I ?? ReportingMode S I may be "raw" or "scaled" ScreenNumber I I Screen number (for touch screen) SendCoreEvents B I Send core events StopBits I I Serial port stop bits SwapXY B I Swap the X and Y axes UntouchDelay I I ?? Vmin I I Tty VMIN Vtime I I Tty VTIME 18BitBus B V ?? 8Plus16 B V Enable depth 8 + depth 16 with overlay 8Plus24 B V Enable depth 8 + depth 24 with overlay BlockWrite B V Enable/disable block write ColorKey I V Set the color key for overlay modes CompositeSync B V Composite sync CRTDisplay B V Force display on CRT, not LCD CRTScreen B V Display on CRT, not LCD (Obsolete) EarlyRasPrecharge O V Early RAS pre-charge FastDRAM O V Fast DRAM FifoAggressive O V Aggressive FIFO setting FifoConservative O V Conservative FIFO setting FifoModerate O V Moderate FIFO setting FireGL3000 B V Card is Diamond FireGL3000 FixPanelSize B V ?? FPClock8 Q V Flat panel clock for 8bpp fb (MHz) FPClock16 Q V Flat panel clock for 16bpp fb (MHz) FPClock24 Q V Flat panel clock for 24bpp fb (MHz) FPClock32 Q V Flat panel clock for 32bpp fb (MHz) FPMVRAM O V Fast page mode VRAM FramebufferWC B V Enable/disable WC for the framebuffer GlideDevice I V Selects which Voodoo board to use HiBitHigh O V High clock bit default to set HiBitLow O V High clock bit default to cleared HWClocks B V Enable/disable HW clocks HWCursor B V Enable/disable HW cursor LateRasPrecharge O V Late RAS pre-charge Legend O V Card is Legend ET4000 LCDCenter B V Enable/disable centering for LCD displays Linear B V Enable/disable linear framebuffer MCLK Q V Specify the current MCLK value (MHz) MedDRAM B V Medium speed DRAM MemCfg1 I V ?? MemCfg2 I V ?? MGASDRAM B V Mga card has SDRAM MMIO B V Enable/disable memory mapped I/O MMIOCache B V Enable/Disable MMIO cache MuxThreshold I V Multiplexing threshold (kHz) NoAccel B V Disable/enable acceleration NoClockChip B V ?? NoStretch B V Disable/enable stretching for LCD displays OnAtExit B V Leave video signal on when exiting server OverclockMem B V Enable memory overclocking Overlay A V Enable multi-depth/overlay. An optional string "M,N" may be specified, where M, N are the depths. PanelDisplay B V Force display on LCD PciBurst B V Enable/disable PCI burst mode PciRetry B V Enable/disable PCI retries ProbeClocks B V Force probe for non-programmable clocks ReferenceClock Q V Clock generator reference frequency RGBbits I V Number of significant bits per rgb Rotate S V Rotate the virtual display (CW or CCW) SetLCDClk Q V Set LCD clock (MHz) SetMclk Q V Set Memory Clock (MHz) ShadowFB B V Enable shadow framebuffer layer ShowCache B V Enable viewing of offscreen memory ShowOverscan O V Set the overscan area to a visible colour SlowDRAM O V Slow DRAM SlowEDODRAM O V Slow EDO DRAM STN B V STN screen type (??) SWCursor B V Enable/disable SW cursor SuspendHack B V ?? SyncOnGreen B V Enable/disable sync on green TurboQueue B V Enable/disable turbo queue UseFBDev B V Use the fbdev driver interface UseModeLine B V Use Modeline (??) W32Interleave B V ?? Buffers I Xv Number of buffers Device S Xv Device file name Expose B Xv Disable occlusion clipping (see DESIGN) FramesPerSec I Xv Max. refresh frequency XAA options. All are of type "O" and scope "X", and are self-explanatory XaaNoColor8x8PatternFillRect XaaNoColor8x8PatternFillTrap XaaNoCPUToScreenColorExpandFill XaaNoDashedBresenhamLine XaaNoDashedTwoPointLine XaaNoScreenToScreenCopy XaaNoImageReadRect XaaNoImageWriteRect XaaNoMono8x8PatternFillRect XaaNoMono8x8PatternFillTrap XaaNoOffscreenPixmaps XaaNoPixmapCache XaaNoScanlineCPUToScreenColorExpandFill XaaNoScanlineImageWriteRect XaaNoScreenToScreenColorExpandFill XaaNoSolidBresenhamLine XaaNoSolidFillRect XaaNoSolidFillTrap XaaNoSolidHorVertLine XaaNoSolidTwoPointLine Names used in previous versions: 16Clocks 8Clocks ClkDiv2 EDO VRAM ExternDisp ExtFramBuf FastVRAM FavorBitBlt InternDisp NoBitBlt NoFontCache NoImageBlt NoMemAccess NoPciDisconnect NoPixmapCache NoProgramClocks NoSplitXfer OverrideBIOS OverrideValidateMode ProgLcdModeRegs ProgLcdModeStretch SlowDRAMrefresh SlowVRAM SwapHiBit 5. Ramdac Names. Ramdac names should be consistent between drivers. Case, white space and underscore characters are ignored when comparing ramdac names. All names listed here are in lower case with all white space and underscores removed. 6. Clock Chip Names. Clock chip names should be consistent between drivers. Case, white space and underscore characters are ignored when comparing clock chip names. All names listed here are in lower case with all white space and underscores removed. $XFree86: xc/programs/Xserver/hw/xfree86/Registry,v 1.18 2002/04/06 18:31:09 tsi Exp $ xorg-server-21.1.16/hw/xfree86/doc/exa-driver.txt0000644000175000017500000000601314757411105015114 Adding EXA support to your X.Org video driver --------------------------------------------- EXA (for EXcellent Architecture or Ex-kaa aXeleration Architecture or whatever) aims to extend the life of the venerable XFree86 video drivers by introducing a new set of acceleration hooks that efficiently accelerate the X Render extension, including solid fills, blits within screen memory and to and from system memory, and Porter-Duff compositing and transform operations. Configuration ------------- Some drivers implement a per-instance useEXA flag to track whether EXA is active or not. Setting the flag can be done in the driver's Options parsing routine. Loading EXA ------------ EXA drivers in the XFree86 DDX should use the loadable module loader to load the EXA core. Careful versioning allows the EXA API to be extended without breaking the ABI for older versions of drivers. Example code for loading EXA: static const char *exaSymbols[] = { "exaDriverAlloc", "exaDriverInit", "exaDriverFini", "exaOffscreenAlloc", "exaOffscreenFree", "exaGetPixmapOffset", "exaGetPixmapPitch", "exaGetPixmapSize", "exaMarkSync", "exaWaitSync", NULL }; if (info->useEXA) { info->exaReq.majorversion = 2; info->exaReq.minorversion = 0; if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &info->exaReq, &errmaj, &errmin)) { LoaderErrorMsg(NULL, "exa", errmaj, errmin); return FALSE; } xf86LoaderReqSymLists(exaSymbols, NULL); } EXA is then initialized using exaDriverAlloc and exaDriverInit. See doxygen documentation for getting started there. Further documentation ------------ The EXA driver interface and public API is documented using doxygen in xserver/xorg/exa/. To build the documentation, run: doxygen -g doxygen Doxyfile The resulting documentation will appear an html/index.html under the current directory. EXA initialization ------------------ Your driver's AccelInit routine must initialize an ExaDriverRec structure if EXA support is enabled, with appropriate error handling (i.e. NoAccel and NoXvideo should be set to true if EXA fails to initialize for whatever reason). The AccelInit routine also needs to make sure that there's enough offscreen memory for certain operations to function, like Xvideo, which should advertise a maximum size no larger than can be dealt with given the amount of offscreen memory available. EXA and Xv ---------- Video support becomes easier with EXA since AllocateFBMemory can use exaOffscreenAlloc directly, freeing a previous area if necessary and allocating a new one. Likewise, FreeFBMemory can call exaOffscreenFree. EXA teardown ------------ At screen close time, EXA drivers should call exaDriverFini with their screen pointer, free their EXADriver structure, and do any other necessary teardown. EXA misc. --------- In many drivers, DGA support will need to be changed to be aware of the new EXA support. Send updates and corrections to Jesse Barnes or just check them in if you have permission. xorg-server-21.1.16/hw/xfree86/doc/README.modes0000644000175000017500000004077514757411105014310 Multi-monitor Mode Setting APIs Keith Packard, SaveScreen and the core X screen saver will be implemented by disabling outputs and crtcs using their dpms functions. void xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) Pass this function to xf86DPMSInit and all DPMS mode switching will be managed by using the dpms functions provided by the Outputs and CRTCs. Bool xf86CrtcScreenInit (ScreenPtr screen) This function completes the screen initialization process for the crtc and output objects. Call it near the end of the ScreenInit function, after the frame buffer and acceleration layers have been added. 3.3 EnterVT functions Functions used during EnterVT, or whenever the current configuration needs to be applied to the hardware. Bool xf86SetDesiredModes (ScrnInfoPtr scrn) xf86InitialConfiguration selects the desired configuration at PreInit time; when the server finally hits ScreenInit, xf86SetDesiredModes is used by the driver to take that configuration and apply it to the hardware. In addition, successful mode selection at other times updates the configuration that will be used by this function, so LeaveVT/EnterVT pairs can simply invoke this and return to the previous configuration. 3.4 SwitchMode functions Functions called from the pScrn->SwitchMode hook, which is used by the XFree86-VidModeExtension and the keypad mode switch commands. Bool xf86SetSingleMode (ScrnInfoPtr scrn, DisplayModePtr desired, Rotation rotation) This function applies the specified mode to all active outputs. Which is to say, it picks reasonable modes for all active outputs, attempting to get the screen to the specified size while not breaking anything that is currently working. 3.7 get_modes functions Functions called during output->get_modes to help build lists of modes xf86MonPtr xf86OutputGetEDID (xf86OutputPtr output, I2CBusPtr pDDCBus) This returns the EDID data structure for the 'output' using the I2C bus 'pDDCBus'. This has no effect on 'output' itself. void xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) Once the EDID data has been fetched, this call applies the EDID data to the output object, setting the physical size and also various properties, like the DDC root window property (when output is the 'compat' output), and the RandR 1.2 EDID output properties. DisplayModePtr xf86OutputGetEDIDModes (xf86OutputPtr output) Given an EDID data structure, this function computes a list of suitable modes. This function also applies a sequence of 'quirks' during this process so that the returned modes may not actually match the mode data present in the EDID data. 3.6 Other functions These remaining functions in the API can be used by the driver as needed. Bool xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) Applies a mode to a CRTC. All of the outputs which are currently using the specified CRTC are included in the mode setting process. 'x' and 'y' are the offset within the frame buffer that the crtc is placed at. No checking is done in this function to ensure that the mode is usable by the active outputs. void xf86ProbeOutputModes (ScrnInfoPtr pScrn, int maxX, int maxY) This discards the mode lists for all outputs, re-detects monitor presence and then acquires new mode lists for all monitors which are not disconnected. Monitor configuration data is used to modify the mode lists returned by the outputs. 'maxX' and 'maxY' limit the maximum size modes that will be returned. void xf86SetScrnInfoModes (ScrnInfoPtr pScrn) This copies the 'compat' output mode list into the pScrn modes list which is used by the XFree86-VidModeExtension and the keypad mode switching operations. The current 'desired' mode for the CRTC associated with the 'compat' output is placed first in this list to indicate the current mode. Usually, the driver won't need to call this function as xf86InitialConfiguration will do so automatically, as well as any RandR functions which reprobe for modes. However, if the driver reprobes for modes at other times using xf86ProbeOutputModes, this function needs to be called. Bool xf86DiDGAReInit (ScreenPtr pScreen) This is similar to xf86SetScrnInfoModes, but it applies the 'compat' output mode list to the set of modes advertised by the DGA extension; it needs to be called whenever xf86ProbeOutputModes is invoked. void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) After any sequence of calls using xf86CrtcSetMode, this function cleans up any leftover Output and CRTC objects by disabling them, saving power. It is safe to call this whenever the server is running as it only disables objects which are not currently in use. 4. CRTC operations 4.1 CRTC functions These functions provide an abstract interface for the CRTC object; most manipulation of the CRTC object is done through these functions. void crtc->funcs->dpms (xf86CrtcPtr crtc, int mode) Where 'mode' is one of DPMSModeOff, DPMSModeSuspend, DPMSModeStandby or DPMSModeOn. This requests that the crtc go to the specified power state. When changing power states, the output dpms functions are invoked before the crtc dpms functions. void crtc->funcs->save (xf86CrtcPtr crtc) void crtc->funcs->restore (xf86CrtcPtr crtc) Preserve/restore any register contents related to the CRTC. These are strictly a convenience for the driver writer; if the existing driver has fully operation save/restore functions, you need not place any additional code here. In particular, the server itself never uses this function. Bool crtc->funcs->lock (xf86CrtcPtr crtc) void crtc->funcs->unlock (xf86CrtcPtr crtc) These functions are invoked around mode setting operations; the intent is that DRI locking be done here to prevent DRI applications from manipulating the hardware while the server is busy changing the output configuration. If the lock function returns FALSE, the unlock function will not be invoked. Bool crtc->funcs->mode_fixup (xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode) This call gives the CRTC a chance to see what mode will be set and to comment on the mode by changing 'adjusted_mode' as needed. This function shall not modify the state of the crtc hardware at all. If the CRTC cannot accept this mode, this function may return FALSE. void crtc->funcs->prepare (xf86CrtcPtr crtc) This call is made just before the mode is set to make the hardware ready for the operation. A usual function to perform here is to disable the crtc so that mode setting can occur with clocks turned off and outputs deactivated. void crtc->funcs->mode_set (xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode) This function applies the specified mode (possibly adjusted by the CRTC and/or Outputs). void crtc->funcs->commit (xf86CrtcPtr crtc) Once the mode has been applied to the CRTC and Outputs, this function is invoked to let the hardware turn things back on. void crtc->funcs->gamma_set (xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size) This function adjusts the gamma ramps for the specified crtc. void * crtc->funcs->shadow_allocate (xf86CrtcPtr crtc, int width, int height) This function allocates frame buffer space for a shadow frame buffer. When allocated, the crtc must scan from the shadow instead of the main frame buffer. This is used for rotation. The address returned is passed to the shadow_create function. This function should return NULL on failure. PixmapPtr crtc->funcs->shadow_create (xf86CrtcPtr crtc, void *data, int width, int height) This function creates a pixmap object that will be used as a shadow of the main frame buffer for CRTCs which are rotated or reflected. 'data' is the value returned by shadow_allocate. void crtc->funcs->shadow_destroy (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data) Destroys any associated shadow objects. If pPixmap is NULL, then a pixmap was not created, but 'data' may still be non-NULL indicating that the shadow had been allocated. void crtc->funcs->destroy (xf86CrtcPtr crtc) When a CRTC is destroyed (which only happens in error cases), this function can clean up any driver-specific data. 4.2 CRTC fields The CRTC object is not opaque; there are several fields of interest to the driver writer. struct _xf86Crtc { /** * Associated ScrnInfo */ ScrnInfoPtr scrn; /** * Active state of this CRTC * * Set when this CRTC is driving one or more outputs */ Bool enabled; /** Track whether cursor is within CRTC range */ Bool cursorInRange; /** Track state of cursor associated with this CRTC */ Bool cursorShown; /** * Active mode * * This reflects the mode as set in the CRTC currently * It will be cleared when the VT is not active or * during server startup */ DisplayModeRec mode; Rotation rotation; PixmapPtr rotatedPixmap; void *rotatedData; /** * Position on screen * * Locates this CRTC within the frame buffer */ int x, y; /** * Desired mode * * This is set to the requested mode, independent of * whether the VT is active. In particular, it receives * the startup configured mode and saves the active mode * on VT switch. */ DisplayModeRec desiredMode; Rotation desiredRotation; int desiredX, desiredY; /** crtc-specific functions */ const xf86CrtcFuncsRec *funcs; /** * Driver private * * Holds driver-private information */ void *driver_private; #ifdef RANDR_12_INTERFACE /** * RandR crtc * * When RandR 1.2 is available, this * points at the associated crtc object */ RRCrtcPtr randr_crtc; #else void *randr_crtc; #endif }; 5. Output functions. 6. Configuration Because the configuration file syntax is fixed, this was done by creating new "Driver" section options that hook specific outputs to specific "Monitor" sections in the file. The option: section of the form: Option "monitor-VGA" "My VGA Monitor" connects the VGA output of this driver to the "Monitor" section with Identifier "My VGA Monitor". All of the usual monitor options can now be placed in that "Monitor" section and will be applied to the VGA output configuration. xorg-server-21.1.16/hw/xfree86/dri/0000755000175000017500000000000014757411135012401 5xorg-server-21.1.16/hw/xfree86/dri/meson.build0000644000175000017500000000055214757411105014462 srcs_xorg_dri = [ 'dri.c', 'xf86dri.c', ] xorg_dri = static_library('xorg_dri', srcs_xorg_dri, include_directories: [inc, xorg_inc], dependencies: [ common_dep, libdrm_dep, ], c_args: xorg_c_args, ) install_data( [ 'dri.h', 'sarea.h', 'dristruct.h', ], install_dir: xorgsdkdir, ) xorg-server-21.1.16/hw/xfree86/dri/Makefile.am0000644000175000017500000000120614757411105014351 noinst_LTLIBRARIES = libdri.la AM_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/modes \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/i2c \ -I$(top_srcdir)/hw/xfree86/parser \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ libdri_la_SOURCES = \ dri.c \ dri.h \ dristruct.h \ sarea.h \ xf86dri.c sdk_HEADERS = dri.h sarea.h dristruct.h xorg-server-21.1.16/hw/xfree86/dri/dri.h0000644000175000017500000003161014757411105013246 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * */ /* Prototypes for DRI functions */ #ifndef _DRI_H_ #include #include "scrnintstr.h" #include "xf86dri.h" typedef int DRISyncType; #define DRI_NO_SYNC 0 #define DRI_2D_SYNC 1 #define DRI_3D_SYNC 2 typedef int DRIContextType; typedef struct _DRIContextPrivRec DRIContextPrivRec, *DRIContextPrivPtr; typedef enum _DRIContextFlags { DRI_CONTEXT_2DONLY = 0x01, DRI_CONTEXT_PRESERVED = 0x02, DRI_CONTEXT_RESERVED = 0x04 /* DRI Only -- no kernel equivalent */ } DRIContextFlags; #define DRI_NO_CONTEXT 0 #define DRI_2D_CONTEXT 1 #define DRI_3D_CONTEXT 2 typedef int DRISwapMethod; #define DRI_HIDE_X_CONTEXT 0 #define DRI_SERVER_SWAP 1 #define DRI_KERNEL_SWAP 2 typedef int DRIWindowRequests; #define DRI_NO_WINDOWS 0 #define DRI_3D_WINDOWS_ONLY 1 #define DRI_ALL_WINDOWS 2 typedef void (*ClipNotifyPtr) (WindowPtr, int, int); typedef void (*AdjustFramePtr) (ScrnInfoPtr pScrn, int x, int y); /* * These functions can be wrapped by the DRI. Each of these have * generic default funcs (initialized in DRICreateInfoRec) and can be * overridden by the driver in its [driver]DRIScreenInit function. */ typedef struct { ScreenWakeupHandlerProcPtr WakeupHandler; ScreenBlockHandlerProcPtr BlockHandler; WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; ClipNotifyProcPtr ClipNotify; AdjustFramePtr AdjustFrame; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; /* * Prior to Xorg 6.8.99.8, the DRIInfoRec structure was implicitly versioned * by the XF86DRI_*_VERSION defines in xf86dristr.h. These numbers were also * being used to version the XFree86-DRI protocol. Bugs #3066 and #3163 * showed that this was inadequate. The DRIInfoRec structure is now versioned * by the DRIINFO_*_VERSION defines in this file. - ajax, 2005-05-18. * * Revision history: * 4.1.0 and earlier: DRIQueryVersion returns XF86DRI_*_VERSION. * 4.2.0: DRIQueryVersion begins returning DRIINFO_*_VERSION. * 5.0.0: frameBufferPhysicalAddress changed from CARD32 to pointer. */ #define DRIINFO_MAJOR_VERSION 5 #define DRIINFO_MINOR_VERSION 4 #define DRIINFO_PATCH_VERSION 0 typedef unsigned long long (*DRITexOffsetStartProcPtr) (PixmapPtr pPix); typedef void (*DRITexOffsetFinishProcPtr) (PixmapPtr pPix); typedef struct { /* driver call back functions * * New fields should be added at the end for backwards compatibility. * Bump the DRIINFO patch number to indicate bugfixes. * Bump the DRIINFO minor number to indicate new fields. * Bump the DRIINFO major number to indicate binary-incompatible changes. */ Bool (*CreateContext) (ScreenPtr pScreen, VisualPtr visual, drm_context_t hHWContext, void *pVisualConfigPriv, DRIContextType context); void (*DestroyContext) (ScreenPtr pScreen, drm_context_t hHWContext, DRIContextType context); void (*SwapContext) (ScreenPtr pScreen, DRISyncType syncType, DRIContextType readContextType, void *readContextStore, DRIContextType writeContextType, void *writeContextStore); void (*InitBuffers) (WindowPtr pWin, RegionPtr prgn, CARD32 indx); void (*MoveBuffers) (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc, CARD32 indx); void (*TransitionTo3d) (ScreenPtr pScreen); void (*TransitionTo2d) (ScreenPtr pScreen); void (*SetDrawableIndex) (WindowPtr pWin, CARD32 indx); Bool (*OpenFullScreen) (ScreenPtr pScreen); Bool (*CloseFullScreen) (ScreenPtr pScreen); /* wrapped functions */ DRIWrappedFuncsRec wrap; /* device info */ char *drmDriverName; char *clientDriverName; char *busIdString; int ddxDriverMajorVersion; int ddxDriverMinorVersion; int ddxDriverPatchVersion; void *frameBufferPhysicalAddress; long frameBufferSize; long frameBufferStride; long SAREASize; int maxDrawableTableEntry; int ddxDrawableTableEntry; long contextSize; DRISwapMethod driverSwapMethod; DRIWindowRequests bufferRequests; int devPrivateSize; void *devPrivate; Bool createDummyCtx; Bool createDummyCtxPriv; /* New with DRI version 4.1.0 */ void (*TransitionSingleToMulti3D) (ScreenPtr pScreen); void (*TransitionMultiToSingle3D) (ScreenPtr pScreen); /* New with DRI version 5.1.0 */ void (*ClipNotify) (ScreenPtr pScreen, WindowPtr *ppWin, int num); /* New with DRI version 5.2.0 */ Bool allocSarea; Bool keepFDOpen; /* New with DRI version 5.3.0 */ DRITexOffsetStartProcPtr texOffsetStart; DRITexOffsetFinishProcPtr texOffsetFinish; /* New with DRI version 5.4.0 */ int dontMapFrameBuffer; drm_handle_t hFrameBuffer; /* Handle to framebuffer, either * mapped by DDX driver or DRI */ } DRIInfoRec, *DRIInfoPtr; extern _X_EXPORT Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, const char *busID, const char *drmDriverName); extern _X_EXPORT Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD); extern _X_EXPORT void DRICloseScreen(ScreenPtr pScreen); extern Bool DRIExtensionInit(void); extern _X_EXPORT void DRIReset(void); extern _X_EXPORT Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable); extern _X_EXPORT Bool DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString); extern _X_EXPORT Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic); extern _X_EXPORT Bool DRICloseConnection(ScreenPtr pScreen); extern _X_EXPORT Bool DRIGetClientDriverName(ScreenPtr pScreen, int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, int *ddxDriverPatchVersion, char **clientDriverName); extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, XID context, drm_context_t * pHWContext); extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context); extern _X_EXPORT Bool DRIContextPrivDelete(void *pResource, XID id); extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drm_drawable_t * hHWDrawable); extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable); extern _X_EXPORT Bool DRIDrawablePrivDelete(void *pResource, XID id); extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen, DrawablePtr pDrawable, unsigned int *indx, unsigned int *stamp, int *X, int *Y, int *W, int *H, int *numClipRects, drm_clip_rect_t ** pClipRects, int *backX, int *backY, int *numBackClipRects, drm_clip_rect_t ** pBackClipRects); extern _X_EXPORT Bool DRIGetDeviceInfo(ScreenPtr pScreen, drm_handle_t * hFrameBuffer, int *fbOrigin, int *fbSize, int *fbStride, int *devPrivateSize, void **pDevPrivate); extern _X_EXPORT DRIInfoPtr DRICreateInfoRec(void); extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen); extern _X_EXPORT void DRIWakeupHandler(void *wakeupData, int result); extern _X_EXPORT void DRIBlockHandler(void *blockData, void *timeout); extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen, int result); extern _X_EXPORT void DRIDoBlockHandler(ScreenPtr pScreen, void *timeout); extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context); extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn); extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin); extern _X_EXPORT void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern _X_EXPORT void DRIClipNotify(WindowPtr pWin, int dx, int dy); extern _X_EXPORT CARD32 DRIGetDrawableIndex(WindowPtr pWin); extern _X_EXPORT void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg); extern _X_EXPORT void DRILock(ScreenPtr pScreen, int flags); extern _X_EXPORT void DRIUnlock(ScreenPtr pScreen); extern _X_EXPORT DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen); extern _X_EXPORT void *DRIGetSAREAPrivate(ScreenPtr pScreen); extern _X_EXPORT unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index); extern _X_EXPORT DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, drm_context_t * pHWContext, DRIContextFlags flags); extern _X_EXPORT DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, drm_context_t hHWContext, DRIContextFlags flags); extern _X_EXPORT Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv); extern _X_EXPORT drm_context_t DRIGetContext(ScreenPtr pScreen); extern _X_EXPORT void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion); extern _X_EXPORT void DRIAdjustFrame(ScrnInfoPtr pScrn, int x, int y); extern _X_EXPORT void DRIMoveBuffersHelper(ScreenPtr pScreen, int dx, int dy, int *xdir, int *ydir, RegionPtr reg); extern _X_EXPORT int DRIMasterFD(ScrnInfoPtr pScrn); extern _X_EXPORT void *DRIMasterSareaPointer(ScrnInfoPtr pScrn); extern _X_EXPORT drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn); extern _X_EXPORT void DRIGetTexOffsetFuncs(ScreenPtr pScreen, DRITexOffsetStartProcPtr * texOffsetStartFunc, DRITexOffsetFinishProcPtr * texOffsetFinishFunc); #define _DRI_H_ #endif xorg-server-21.1.16/hw/xfree86/dri/sarea.h0000644000175000017500000000544114757411105013566 /** * \file sarea.h * SAREA definitions. * * \author Kevin E. Martin * \author Jens Owen * \author Rickard E. (Rik) Faith */ /* * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc. * All Rights Reserved. * * 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, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 NON-INFRINGEMENT. * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. */ #ifndef _SAREA_H_ #define _SAREA_H_ #include "xf86drm.h" /* SAREA area needs to be at least a page */ #if defined(__alpha__) #define SAREA_MAX 0x2000 #elif defined(__ia64__) #define SAREA_MAX 0x10000 /* 64kB */ #else /* Intel 830M driver needs at least 8k SAREA */ #define SAREA_MAX 0x2000 #endif #define SAREA_MAX_DRAWABLES 256 #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 /** * SAREA per drawable information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREADrawable { unsigned int stamp; unsigned int flags; } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr; /** * SAREA frame information. * * \sa _XF86DRISAREA. */ typedef struct _XF86DRISAREAFrame { unsigned int x; unsigned int y; unsigned int width; unsigned int height; unsigned int fullscreen; } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr; /** * SAREA definition. */ typedef struct _XF86DRISAREA { /** first thing is always the DRM locking structure */ drmLock lock; /** \todo Use readers/writer lock for drawable_lock */ drmLock drawable_lock; XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES]; XF86DRISAREAFrameRec frame; drm_context_t dummy_context; } XF86DRISAREARec, *XF86DRISAREAPtr; typedef struct _XF86DRILSAREA { drmLock lock; drmLock otherLocks[31]; } XF86DRILSAREARec, *XF86DRILSAREAPtr; #endif xorg-server-21.1.16/hw/xfree86/dri/dristruct.h0000644000175000017500000001100514757411105014507 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * */ #ifndef DRI_STRUCT_H #define DRI_STRUCT_H #include "xf86drm.h" #include "xf86Crtc.h" #define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \ dixLookupPrivate(&(pWin)->devPrivates, DRIWindowPrivKey)) #define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \ dixLookupPrivate(&(pPix)->devPrivates, DRIWindowPrivKey)) typedef struct _DRIDrawablePrivRec { drm_drawable_t hwDrawable; int drawableIndex; ScreenPtr pScreen; int refCount; int nrects; } DRIDrawablePrivRec, *DRIDrawablePrivPtr; struct _DRIContextPrivRec { drm_context_t hwContext; ScreenPtr pScreen; Bool valid3D; DRIContextFlags flags; void **pContextStore; }; #define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \ (dixPrivateKeyRegistered(DRIScreenPrivKey) ? \ dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey) : NULL)) #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \ DRIScreenPrivKey)) #define DRI_ENT_PRIV(pScrn) \ ((DRIEntPrivIndex < 0) ? \ NULL: \ ((DRIEntPrivPtr)(xf86GetEntityPrivate((pScrn)->entityList[0], \ DRIEntPrivIndex)->ptr))) typedef struct _DRIScreenPrivRec { Bool directRenderingSupport; int drmFD; /* File descriptor for /dev/video/? */ drm_handle_t hSAREA; /* Handle to SAREA, for mapping */ XF86DRISAREAPtr pSAREA; /* Mapped pointer to SAREA */ drm_context_t myContext; /* DDX Driver's context */ DRIContextPrivPtr myContextPriv; /* Pointer to server's private area */ DRIContextPrivPtr lastPartial3DContext; /* last one partially saved */ void **hiddenContextStore; /* hidden X context */ void **partial3DContextStore; /* parital 3D context */ DRIInfoPtr pDriverInfo; int nrWindows; int nrWindowsVisible; int nrWalked; drm_clip_rect_t private_buffer_rect; /* management of private buffers */ DrawablePtr fullscreen; /* pointer to fullscreen drawable */ drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */ DRIWrappedFuncsRec wrap; DestroyWindowProcPtr DestroyWindow; DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES]; DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */ Bool createDummyCtx; Bool createDummyCtxPriv; Bool grabbedDRILock; Bool drmSIGIOHandlerInstalled; Bool wrapped; Bool windowsTouched; int lockRefCount; drm_handle_t hLSAREA; /* Handle to SAREA containing lock, for mapping */ XF86DRILSAREAPtr pLSAREA; /* Mapped pointer to SAREA containing lock */ int *pLockRefCount; int *pLockingContext; xf86_crtc_notify_proc_ptr xf86_crtc_notify; } DRIScreenPrivRec, *DRIScreenPrivPtr; typedef struct _DRIEntPrivRec { int drmFD; Bool drmOpened; Bool sAreaGrabbed; drm_handle_t hLSAREA; XF86DRILSAREAPtr pLSAREA; unsigned long sAreaSize; int lockRefCount; int lockingContext; ScreenPtr resOwner; Bool keepFDOpen; int refCount; } DRIEntPrivRec, *DRIEntPrivPtr; #endif /* DRI_STRUCT_H */ xorg-server-21.1.16/hw/xfree86/dri/Makefile.in0000644000175000017500000006634014757411115014375 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/dri ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdri_la_LIBADD = am_libdri_la_OBJECTS = dri.lo xf86dri.lo libdri_la_OBJECTS = $(am_libdri_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dri.Plo ./$(DEPDIR)/xf86dri.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdri_la_SOURCES) DIST_SOURCES = $(libdri_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdri.la AM_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/modes \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/i2c \ -I$(top_srcdir)/hw/xfree86/parser \ -I$(top_srcdir)/hw/xfree86/ramdac \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/glx \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ libdri_la_SOURCES = \ dri.c \ dri.h \ dristruct.h \ sarea.h \ xf86dri.c sdk_HEADERS = dri.h sarea.h dristruct.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/dri/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/dri/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdri.la: $(libdri_la_OBJECTS) $(libdri_la_DEPENDENCIES) $(EXTRA_libdri_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdri_la_OBJECTS) $(libdri_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86dri.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dri.Plo -rm -f ./$(DEPDIR)/xf86dri.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dri.Plo -rm -f ./$(DEPDIR)/xf86dri.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/dri/dri.c0000644000175000017500000022474314757411105013254 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * Rickard E. (Rik) Faith * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include #include #include #include #include #include #include #include #include "xf86drm.h" #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "extinit.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #define _XF86DRI_SERVER_ #include #include "swaprep.h" #include "xf86str.h" #include "dri.h" #include "sarea.h" #include "dristruct.h" #include "mi.h" #include "mipointer.h" #include "xf86_OSproc.h" #include "inputstr.h" #include "xf86VGAarbiter.h" #include "xf86Extensions.h" static int DRIEntPrivIndex = -1; static DevPrivateKeyRec DRIScreenPrivKeyRec; #define DRIScreenPrivKey (&DRIScreenPrivKeyRec) static DevPrivateKeyRec DRIWindowPrivKeyRec; #define DRIWindowPrivKey (&DRIWindowPrivKeyRec) static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; static RESTYPE DRIDrawablePrivResType; static RESTYPE DRIContextPrivResType; static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv); drmServerInfo DRIDRMServerInfo; /* Wrapper just like xf86DrvMsg, but without the verbosity level checking. This will make it easy to turn off some messages later, based on verbosity level. */ /* * Since we're already referencing things from the XFree86 common layer in * this file, we'd might as well just call xf86VDrvMsgVerb, and have * consistent message formatting. The verbosity of these messages can be * easily changed here. */ #define DRI_MSG_VERBOSITY 1 static void DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3,4); static void DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); xf86VDrvMsgVerb(scrnIndex, type, DRI_MSG_VERBOSITY, format, ap); va_end(ap); } static void DRIOpenDRMCleanup(DRIEntPrivPtr pDRIEntPriv) { if (pDRIEntPriv->pLSAREA != NULL) { drmUnmap(pDRIEntPriv->pLSAREA, pDRIEntPriv->sAreaSize); pDRIEntPriv->pLSAREA = NULL; } if (pDRIEntPriv->hLSAREA != 0) { drmRmMap(pDRIEntPriv->drmFD, pDRIEntPriv->hLSAREA); } if (pDRIEntPriv->drmFD >= 0) { drmClose(pDRIEntPriv->drmFD); pDRIEntPriv->drmFD = 0; } } int DRIMasterFD(ScrnInfoPtr pScrn) { return DRI_ENT_PRIV(pScrn)->drmFD; } void * DRIMasterSareaPointer(ScrnInfoPtr pScrn) { return DRI_ENT_PRIV(pScrn)->pLSAREA; } drm_handle_t DRIMasterSareaHandle(ScrnInfoPtr pScrn) { return DRI_ENT_PRIV(pScrn)->hLSAREA; } Bool DRIOpenDRMMaster(ScrnInfoPtr pScrn, unsigned long sAreaSize, const char *busID, const char *drmDriverName) { drmSetVersion saveSv, sv; Bool drmWasAvailable; DRIEntPrivPtr pDRIEntPriv; DRIEntPrivRec tmp; int count; int err; if (DRIEntPrivIndex == -1) DRIEntPrivIndex = xf86AllocateEntityPrivateIndex(); pDRIEntPriv = DRI_ENT_PRIV(pScrn); if (pDRIEntPriv && pDRIEntPriv->drmFD != -1) return TRUE; drmWasAvailable = drmAvailable(); memset(&tmp, 0, sizeof(tmp)); tmp.drmFD = -1; sv.drm_di_major = 1; sv.drm_di_minor = 1; sv.drm_dd_major = -1; saveSv = sv; count = 10; while (count--) { tmp.drmFD = drmOpen(drmDriverName, busID); if (tmp.drmFD < 0) { DRIDrvMsg(-1, X_ERROR, "[drm] drmOpen failed.\n"); goto out_err; } err = drmSetInterfaceVersion(tmp.drmFD, &sv); if (err != -EPERM) break; sv = saveSv; drmClose(tmp.drmFD); tmp.drmFD = -1; usleep(100000); } if (tmp.drmFD <= 0) { DRIDrvMsg(-1, X_ERROR, "[drm] DRM was busy with another master.\n"); goto out_err; } if (!drmWasAvailable) { DRIDrvMsg(-1, X_INFO, "[drm] loaded kernel module for \"%s\" driver.\n", drmDriverName); } if (err != 0) { sv.drm_di_major = 1; sv.drm_di_minor = 0; } DRIDrvMsg(-1, X_INFO, "[drm] DRM interface version %d.%d\n", sv.drm_di_major, sv.drm_di_minor); if (sv.drm_di_major == 1 && sv.drm_di_minor >= 1) err = 0; else err = drmSetBusid(tmp.drmFD, busID); if (err) { DRIDrvMsg(-1, X_ERROR, "[drm] Could not set DRM device bus ID.\n"); goto out_err; } /* * Create a lock-containing sarea. */ if (drmAddMap(tmp.drmFD, 0, sAreaSize, DRM_SHM, DRM_CONTAINS_LOCK, &tmp.hLSAREA) < 0) { DRIDrvMsg(-1, X_INFO, "[drm] Could not create SAREA for DRM lock.\n"); tmp.hLSAREA = 0; goto out_err; } if (drmMap(tmp.drmFD, tmp.hLSAREA, sAreaSize, (drmAddressPtr) (&tmp.pLSAREA)) < 0) { DRIDrvMsg(-1, X_INFO, "[drm] Mapping SAREA for DRM lock failed.\n"); tmp.pLSAREA = NULL; goto out_err; } memset(tmp.pLSAREA, 0, sAreaSize); /* * Reserved contexts are handled by the first opened screen. */ tmp.resOwner = NULL; if (!pDRIEntPriv) pDRIEntPriv = xnfcalloc(sizeof(*pDRIEntPriv), 1); if (!pDRIEntPriv) { DRIDrvMsg(-1, X_INFO, "[drm] Failed to allocate memory for " "DRM device.\n"); goto out_err; } *pDRIEntPriv = tmp; xf86GetEntityPrivate((pScrn)->entityList[0], DRIEntPrivIndex)->ptr = pDRIEntPriv; DRIDrvMsg(-1, X_INFO, "[drm] DRM open master succeeded.\n"); return TRUE; out_err: DRIOpenDRMCleanup(&tmp); return FALSE; } static void DRIClipNotifyAllDrawables(ScreenPtr pScreen); static void dri_crtc_notify(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIClipNotifyAllDrawables(pScreen); xf86_unwrap_crtc_notify(pScreen, pDRIPriv->xf86_crtc_notify); xf86_crtc_notify(pScreen); pDRIPriv->xf86_crtc_notify = xf86_wrap_crtc_notify(pScreen, dri_crtc_notify); } static void drmSIGIOHandler(int interrupt, void *closure) { unsigned long key; void *value; ssize_t count; drm_ctx_t ctx; typedef void (*_drmCallback) (int, void *, void *); char buf[256]; drm_context_t old; drm_context_t new; void *oldctx; void *newctx; char *pt; drmHashEntry *entry; void *hash_table; hash_table = drmGetHashTable(); if (!hash_table) return; if (drmHashFirst(hash_table, &key, &value)) { entry = value; do { if ((count = read(entry->fd, buf, sizeof(buf) - 1)) > 0) { buf[count] = '\0'; for (pt = buf; *pt != ' '; ++pt); /* Find first space */ ++pt; old = strtol(pt, &pt, 0); new = strtol(pt, NULL, 0); oldctx = drmGetContextTag(entry->fd, old); newctx = drmGetContextTag(entry->fd, new); ((_drmCallback) entry->f) (entry->fd, oldctx, newctx); ctx.handle = new; ioctl(entry->fd, DRM_IOCTL_NEW_CTX, &ctx); } } while (drmHashNext(hash_table, &key, &value)); } } static int drmInstallSIGIOHandler(int fd, void (*f) (int, void *, void *)) { drmHashEntry *entry; entry = drmGetEntry(fd); entry->f = f; return xf86InstallSIGIOHandler(fd, drmSIGIOHandler, 0); } static int drmRemoveSIGIOHandler(int fd) { drmHashEntry *entry = drmGetEntry(fd); entry->f = NULL; return xf86RemoveSIGIOHandler(fd); } Bool DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) { DRIScreenPrivPtr pDRIPriv; drm_context_t *reserved; int reserved_count; int i; DRIEntPrivPtr pDRIEntPriv; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); DRIContextFlags flags = 0; DRIContextPrivPtr pDRIContextPriv; static Bool drm_server_inited; /* If the DRI extension is disabled, do not initialize the DRI */ if (noXFree86DRIExtension) { DRIDrvMsg(pScreen->myNum, X_WARNING, "Direct rendering has been disabled.\n"); return FALSE; } if (!xf86VGAarbiterAllowDRI(pScreen)) { DRIDrvMsg(pScreen->myNum, X_WARNING, "Direct rendering is not supported when VGA arb is necessary for the device\n"); return FALSE; } #ifdef PANORAMIX /* * If Xinerama is on, don't allow DRI to initialise. It won't be usable * anyway. */ if (!noPanoramiXExtension) { DRIDrvMsg(pScreen->myNum, X_WARNING, "Direct rendering is not supported when Xinerama is enabled\n"); return FALSE; } #endif if (drm_server_inited == FALSE) { drmSetServerInfo(&DRIDRMServerInfo); drm_server_inited = TRUE; } if (!DRIOpenDRMMaster(pScrn, pDRIInfo->SAREASize, pDRIInfo->busIdString, pDRIInfo->drmDriverName)) return FALSE; pDRIEntPriv = DRI_ENT_PRIV(pScrn); if (DRIGeneration != serverGeneration) DRIGeneration = serverGeneration; if (!dixRegisterPrivateKey(&DRIScreenPrivKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&DRIWindowPrivKeyRec, PRIVATE_WINDOW, 0)) return FALSE; pDRIPriv = (DRIScreenPrivPtr) calloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); return FALSE; } dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv); pDRIPriv->drmFD = pDRIEntPriv->drmFD; pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->pDriverInfo = pDRIInfo; pDRIPriv->nrWindows = 0; pDRIPriv->nrWindowsVisible = 0; pDRIPriv->fullscreen = NULL; pDRIPriv->createDummyCtx = pDRIInfo->createDummyCtx; pDRIPriv->createDummyCtxPriv = pDRIInfo->createDummyCtxPriv; pDRIPriv->grabbedDRILock = FALSE; pDRIPriv->drmSIGIOHandlerInstalled = FALSE; *pDRMFD = pDRIPriv->drmFD; if (pDRIEntPriv->sAreaGrabbed || pDRIInfo->allocSarea) { if (drmAddMap(pDRIPriv->drmFD, 0, pDRIPriv->pDriverInfo->SAREASize, DRM_SHM, 0, &pDRIPriv->hSAREA) < 0) { pDRIPriv->directRenderingSupport = FALSE; dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] drmAddMap failed\n"); return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] added %d byte SAREA at %p\n", (int) pDRIPriv->pDriverInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA); /* Backwards compat. */ if (drmMap(pDRIPriv->drmFD, pDRIPriv->hSAREA, pDRIPriv->pDriverInfo->SAREASize, (drmAddressPtr) (&pDRIPriv->pSAREA)) < 0) { pDRIPriv->directRenderingSupport = FALSE; dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] drmMap failed\n"); return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA %p to %p\n", (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize); } else { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] Using the DRM lock " "SAREA also for drawables.\n"); pDRIPriv->hSAREA = pDRIEntPriv->hLSAREA; pDRIPriv->pSAREA = (XF86DRISAREAPtr) pDRIEntPriv->pLSAREA; pDRIEntPriv->sAreaGrabbed = TRUE; } pDRIPriv->hLSAREA = pDRIEntPriv->hLSAREA; pDRIPriv->pLSAREA = pDRIEntPriv->pLSAREA; if (!pDRIPriv->pDriverInfo->dontMapFrameBuffer) { if (drmAddMap(pDRIPriv->drmFD, (uintptr_t) pDRIPriv->pDriverInfo-> frameBufferPhysicalAddress, pDRIPriv->pDriverInfo->frameBufferSize, DRM_FRAME_BUFFER, 0, &pDRIPriv->pDriverInfo->hFrameBuffer) < 0) { pDRIPriv->directRenderingSupport = FALSE; dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); drmUnmap(pDRIPriv->pSAREA, pDRIPriv->pDriverInfo->SAREASize); drmClose(pDRIPriv->drmFD); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] drmAddMap failed\n"); return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer handle = %p\n", (void *) (uintptr_t) pDRIPriv->pDriverInfo->hFrameBuffer); } else { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer mapped by ddx driver\n"); } if (pDRIEntPriv->resOwner == NULL) { pDRIEntPriv->resOwner = pScreen; /* Add tags for reserved contexts */ if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD, &reserved_count))) { int r; void *tag; for (r = 0; r < reserved_count; r++) { tag = DRICreateContextPrivFromHandle(pScreen, reserved[r], DRI_CONTEXT_RESERVED); drmAddContextTag(pDRIPriv->drmFD, reserved[r], tag); } drmFreeReservedContextList(reserved); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] added %d reserved context%s for kernel\n", reserved_count, reserved_count > 1 ? "s" : ""); } } /* validate max drawable table entry set by driver */ if ((pDRIPriv->pDriverInfo->maxDrawableTableEntry <= 0) || (pDRIPriv->pDriverInfo->maxDrawableTableEntry > SAREA_MAX_DRAWABLES)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "Invalid max drawable table size set by driver: %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry); } /* Initialize drawable tables (screen private and SAREA) */ for (i = 0; i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; i++) { pDRIPriv->DRIDrawables[i] = NULL; pDRIPriv->pSAREA->drawableTable[i].stamp = 0; pDRIPriv->pSAREA->drawableTable[i].flags = 0; } pDRIPriv->pLockRefCount = &pDRIEntPriv->lockRefCount; pDRIPriv->pLockingContext = &pDRIEntPriv->lockingContext; if (!pDRIEntPriv->keepFDOpen) pDRIEntPriv->keepFDOpen = pDRIInfo->keepFDOpen; pDRIEntPriv->refCount++; /* Set up flags for DRICreateContextPriv */ switch (pDRIInfo->driverSwapMethod) { case DRI_KERNEL_SWAP: flags = DRI_CONTEXT_2DONLY; break; case DRI_HIDE_X_CONTEXT: flags = DRI_CONTEXT_PRESERVED; break; } if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, &pDRIPriv->myContext, flags))) { DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to create server context\n"); return FALSE; } pDRIPriv->myContextPriv = pDRIContextPriv; DRIDrvMsg(pScreen->myNum, X_INFO, "X context handle = %p\n", (void *) (uintptr_t) pDRIPriv->myContext); /* Now that we have created the X server's context, we can grab the * hardware lock for the X server. */ DRILock(pScreen, 0); pDRIPriv->grabbedDRILock = TRUE; /* pointers so that we can prevent memory leaks later */ pDRIPriv->hiddenContextStore = NULL; pDRIPriv->partial3DContextStore = NULL; switch (pDRIInfo->driverSwapMethod) { case DRI_HIDE_X_CONTEXT: /* Server will handle 3D swaps, and hide 2D swaps from kernel. * Register server context as a preserved context. */ /* allocate memory for hidden context store */ pDRIPriv->hiddenContextStore = (void *) calloc(1, pDRIInfo->contextSize); if (!pDRIPriv->hiddenContextStore) { DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to allocate hidden context\n"); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } /* allocate memory for partial 3D context store */ pDRIPriv->partial3DContextStore = (void *) calloc(1, pDRIInfo->contextSize); if (!pDRIPriv->partial3DContextStore) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] failed to allocate partial 3D context\n"); free(pDRIPriv->hiddenContextStore); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } /* save initial context store */ if (pDRIInfo->SwapContext) { (*pDRIInfo->SwapContext) (pScreen, DRI_NO_SYNC, DRI_2D_CONTEXT, pDRIPriv->hiddenContextStore, DRI_NO_CONTEXT, NULL); } /* fall through */ case DRI_SERVER_SWAP: /* For swap methods of DRI_SERVER_SWAP and DRI_HIDE_X_CONTEXT * setup signal handler for receiving swap requests from kernel */ if (!(pDRIPriv->drmSIGIOHandlerInstalled = drmInstallSIGIOHandler(pDRIPriv->drmFD, DRISwapContext))) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to setup DRM signal handler\n"); free(pDRIPriv->hiddenContextStore); free(pDRIPriv->partial3DContextStore); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } else { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] installed DRM signal handler\n"); } default: break; } return TRUE; } Bool DRIFinishScreenInit(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; /* Wrap DRI support */ if (pDRIInfo->wrap.WindowExposures) { pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; pScreen->WindowExposures = pDRIInfo->wrap.WindowExposures; } pDRIPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DRIDestroyWindow; pDRIPriv->xf86_crtc_notify = xf86_wrap_crtc_notify(pScreen, dri_crtc_notify); if (pDRIInfo->wrap.CopyWindow) { pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = pDRIInfo->wrap.CopyWindow; } if (pDRIInfo->wrap.ClipNotify) { pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = pDRIInfo->wrap.ClipNotify; } if (pDRIInfo->wrap.AdjustFrame) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame; pScrn->AdjustFrame = pDRIInfo->wrap.AdjustFrame; } pDRIPriv->wrapped = TRUE; DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] installation complete\n"); return TRUE; } void DRICloseScreen(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo; drm_context_t *reserved; int reserved_count; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); DRIEntPrivPtr pDRIEntPriv = DRI_ENT_PRIV(pScrn); Bool closeMaster; if (pDRIPriv) { pDRIInfo = pDRIPriv->pDriverInfo; if (pDRIPriv->wrapped) { /* Unwrap DRI Functions */ if (pDRIInfo->wrap.WindowExposures) { pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; pDRIPriv->wrap.WindowExposures = NULL; } if (pDRIPriv->DestroyWindow) { pScreen->DestroyWindow = pDRIPriv->DestroyWindow; pDRIPriv->DestroyWindow = NULL; } xf86_unwrap_crtc_notify(pScreen, pDRIPriv->xf86_crtc_notify); if (pDRIInfo->wrap.CopyWindow) { pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; pDRIPriv->wrap.CopyWindow = NULL; } if (pDRIInfo->wrap.ClipNotify) { pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; pDRIPriv->wrap.ClipNotify = NULL; } if (pDRIInfo->wrap.AdjustFrame) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); scrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; pDRIPriv->wrap.AdjustFrame = NULL; } pDRIPriv->wrapped = FALSE; } if (pDRIPriv->drmSIGIOHandlerInstalled) { if (!drmRemoveSIGIOHandler(pDRIPriv->drmFD)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to remove DRM signal handler\n"); } } if (pDRIPriv->dummyCtxPriv && pDRIPriv->createDummyCtx) { DRIDestroyDummyContext(pScreen, pDRIPriv->createDummyCtxPriv); } if (!DRIDestroyContextPriv(pDRIPriv->myContextPriv)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to destroy server context\n"); } /* Remove tags for reserved contexts */ if (pDRIEntPriv->resOwner == pScreen) { pDRIEntPriv->resOwner = NULL; if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD, &reserved_count))) { int i; for (i = 0; i < reserved_count; i++) { DRIDestroyContextPriv(drmGetContextTag(pDRIPriv->drmFD, reserved[i])); } drmFreeReservedContextList(reserved); DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] removed %d reserved context%s for kernel\n", reserved_count, reserved_count > 1 ? "s" : ""); } } /* Make sure signals get unblocked etc. */ drmUnlock(pDRIPriv->drmFD, pDRIPriv->myContext); pDRIPriv->pLockRefCount = NULL; closeMaster = (--pDRIEntPriv->refCount == 0) && !pDRIEntPriv->keepFDOpen; if (closeMaster || pDRIPriv->hSAREA != pDRIEntPriv->hLSAREA) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA %p at %p\n", (int) pDRIInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); if (drmUnmap(pDRIPriv->pSAREA, pDRIInfo->SAREASize)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] unable to unmap %d bytes" " of SAREA %p at %p\n", (int) pDRIInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); } } else { pDRIEntPriv->sAreaGrabbed = FALSE; } if (closeMaster || (pDRIEntPriv->drmFD != pDRIPriv->drmFD)) { drmClose(pDRIPriv->drmFD); if (pDRIEntPriv->drmFD == pDRIPriv->drmFD) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] Closed DRM master.\n"); pDRIEntPriv->drmFD = -1; } } free(pDRIPriv); dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); } } #define DRM_MSG_VERBOSITY 3 static int dri_drm_debug_print(const char *format, va_list ap) _X_ATTRIBUTE_PRINTF(1,0); static int dri_drm_debug_print(const char *format, va_list ap) { xf86VDrvMsgVerb(-1, X_NONE, DRM_MSG_VERBOSITY, format, ap); return 0; } static void dri_drm_get_perms(gid_t * group, mode_t * mode) { *group = xf86ConfigDRI.group; *mode = xf86ConfigDRI.mode; } drmServerInfo DRIDRMServerInfo = { dri_drm_debug_print, xf86LoadKernelModule, dri_drm_get_perms, }; Bool DRIExtensionInit(void) { if (DRIGeneration != serverGeneration) { return FALSE; } DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete, "DRIDrawable"); DRIContextPrivResType = CreateNewResourceType(DRIContextPrivDelete, "DRIContext"); if (!DRIDrawablePrivResType || !DRIContextPrivResType) return FALSE; RegisterBlockAndWakeupHandlers(DRIBlockHandler, DRIWakeupHandler, NULL); return TRUE; } void DRIReset(void) { /* * This stub routine is called when the X Server recycles, resources * allocated by DRIExtensionInit need to be managed here. * * Currently this routine is a stub because all the interesting resources * are managed via the screen init process. */ } Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv) *isCapable = pDRIPriv->directRenderingSupport; else *isCapable = FALSE; return TRUE; } Bool DRIOpenConnection(ScreenPtr pScreen, drm_handle_t * hSAREA, char **busIdString) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); *hSAREA = pDRIPriv->hSAREA; *busIdString = pDRIPriv->pDriverInfo->busIdString; return TRUE; } Bool DRIAuthConnection(ScreenPtr pScreen, drm_magic_t magic) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (drmAuthMagic(pDRIPriv->drmFD, magic)) return FALSE; return TRUE; } Bool DRICloseConnection(ScreenPtr pScreen) { return TRUE; } Bool DRIGetClientDriverName(ScreenPtr pScreen, int *ddxDriverMajorVersion, int *ddxDriverMinorVersion, int *ddxDriverPatchVersion, char **clientDriverName) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); *ddxDriverMajorVersion = pDRIPriv->pDriverInfo->ddxDriverMajorVersion; *ddxDriverMinorVersion = pDRIPriv->pDriverInfo->ddxDriverMinorVersion; *ddxDriverPatchVersion = pDRIPriv->pDriverInfo->ddxDriverPatchVersion; *clientDriverName = pDRIPriv->pDriverInfo->clientDriverName; return TRUE; } /* DRICreateContextPriv and DRICreateContextPrivFromHandle are helper functions that layer on drmCreateContext and drmAddContextTag. DRICreateContextPriv always creates a kernel drm_context_t and then calls DRICreateContextPrivFromHandle to create a DRIContextPriv structure for DRI tracking. For the SIGIO handler, the drm_context_t is associated with DRIContextPrivPtr. Any special flags are stored in the DRIContextPriv area and are passed to the kernel (if necessary). DRICreateContextPriv returns a pointer to newly allocated DRIContextPriv, and returns the kernel drm_context_t in pHWContext. */ DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen, drm_context_t * pHWContext, DRIContextFlags flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (drmCreateContext(pDRIPriv->drmFD, pHWContext)) { return NULL; } return DRICreateContextPrivFromHandle(pScreen, *pHWContext, flags); } DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen, drm_context_t hHWContext, DRIContextFlags flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIContextPrivPtr pDRIContextPriv; int contextPrivSize; contextPrivSize = sizeof(DRIContextPrivRec) + pDRIPriv->pDriverInfo->contextSize; if (!(pDRIContextPriv = calloc(1, contextPrivSize))) { return NULL; } pDRIContextPriv->pContextStore = (void *) (pDRIContextPriv + 1); drmAddContextTag(pDRIPriv->drmFD, hHWContext, pDRIContextPriv); pDRIContextPriv->hwContext = hHWContext; pDRIContextPriv->pScreen = pScreen; pDRIContextPriv->flags = flags; pDRIContextPriv->valid3D = FALSE; if (flags & DRI_CONTEXT_2DONLY) { if (drmSetContextFlags(pDRIPriv->drmFD, hHWContext, DRM_CONTEXT_2DONLY)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to set 2D context flag\n"); DRIDestroyContextPriv(pDRIContextPriv); return NULL; } } if (flags & DRI_CONTEXT_PRESERVED) { if (drmSetContextFlags(pDRIPriv->drmFD, hHWContext, DRM_CONTEXT_PRESERVED)) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[drm] failed to set preserved flag\n"); DRIDestroyContextPriv(pDRIContextPriv); return NULL; } } return pDRIContextPriv; } Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv) { DRIScreenPrivPtr pDRIPriv; if (!pDRIContextPriv) return TRUE; pDRIPriv = DRI_SCREEN_PRIV(pDRIContextPriv->pScreen); if (!(pDRIContextPriv->flags & DRI_CONTEXT_RESERVED)) { /* Don't delete reserved contexts from kernel area -- the kernel manages its reserved contexts itself. */ if (drmDestroyContext(pDRIPriv->drmFD, pDRIContextPriv->hwContext)) return FALSE; } /* Remove the tag last to prevent a race condition where the context has pending buffers. The context can't be re-used while in this thread, but buffers can be dispatched asynchronously. */ drmDelContextTag(pDRIPriv->drmFD, pDRIContextPriv->hwContext); free(pDRIContextPriv); return TRUE; } static Bool DRICreateDummyContext(ScreenPtr pScreen, Bool needCtxPriv) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIContextPrivPtr pDRIContextPriv; void *contextStore; if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, &pDRIPriv->pSAREA->dummy_context, 0))) { return FALSE; } contextStore = DRIGetContextStore(pDRIContextPriv); if (pDRIPriv->pDriverInfo->CreateContext && needCtxPriv) { if (!pDRIPriv->pDriverInfo->CreateContext(pScreen, NULL, pDRIPriv->pSAREA-> dummy_context, NULL, (DRIContextType) (long) contextStore)) { DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } } pDRIPriv->dummyCtxPriv = pDRIContextPriv; return TRUE; } static void DRIDestroyDummyContext(ScreenPtr pScreen, Bool hasCtxPriv) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIContextPrivPtr pDRIContextPriv = pDRIPriv->dummyCtxPriv; void *contextStore; if (!pDRIContextPriv) return; if (pDRIPriv->pDriverInfo->DestroyContext && hasCtxPriv) { contextStore = DRIGetContextStore(pDRIContextPriv); pDRIPriv->pDriverInfo->DestroyContext(pDRIContextPriv->pScreen, pDRIContextPriv->hwContext, (DRIContextType) (long) contextStore); } DRIDestroyContextPriv(pDRIPriv->dummyCtxPriv); pDRIPriv->dummyCtxPriv = NULL; } Bool DRICreateContext(ScreenPtr pScreen, VisualPtr visual, XID context, drm_context_t * pHWContext) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIContextPrivPtr pDRIContextPriv; void *contextStore; if (pDRIPriv->createDummyCtx && !pDRIPriv->dummyCtxPriv) { if (!DRICreateDummyContext(pScreen, pDRIPriv->createDummyCtxPriv)) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] Could not create dummy context\n"); return FALSE; } } if (!(pDRIContextPriv = DRICreateContextPriv(pScreen, pHWContext, 0))) { return FALSE; } contextStore = DRIGetContextStore(pDRIContextPriv); if (pDRIPriv->pDriverInfo->CreateContext) { if (!((*pDRIPriv->pDriverInfo->CreateContext) (pScreen, NULL, *pHWContext, NULL, (DRIContextType) (long) contextStore))) { DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } } /* track this in case the client dies before cleanup */ if (!AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv)) return FALSE; return TRUE; } Bool DRIDestroyContext(ScreenPtr pScreen, XID context) { FreeResourceByType(context, DRIContextPrivResType, FALSE); return TRUE; } /* DRIContextPrivDelete is called by the resource manager. */ Bool DRIContextPrivDelete(void *pResource, XID id) { DRIContextPrivPtr pDRIContextPriv = (DRIContextPrivPtr) pResource; DRIScreenPrivPtr pDRIPriv; void *contextStore; pDRIPriv = DRI_SCREEN_PRIV(pDRIContextPriv->pScreen); if (pDRIPriv->pDriverInfo->DestroyContext) { contextStore = DRIGetContextStore(pDRIContextPriv); pDRIPriv->pDriverInfo->DestroyContext(pDRIContextPriv->pScreen, pDRIContextPriv->hwContext, (DRIContextType) (long) contextStore); } return DRIDestroyContextPriv(pDRIContextPriv); } /* This walks the drawable timestamp array and invalidates all of them * in the case of transition from private to shared backbuffers. It's * not necessary for correctness, because DRIClipNotify gets called in * time to prevent any conflict, but the transition from * shared->private is sometimes missed if we don't do this. */ static void DRIClipNotifyAllDrawables(ScreenPtr pScreen) { int i; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); for (i = 0; i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; i++) { pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; } } static void DRITransitionToSharedBuffers(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; DRIClipNotifyAllDrawables(pScreen); if (pDRIInfo->TransitionSingleToMulti3D) pDRIInfo->TransitionSingleToMulti3D(pScreen); } static void DRITransitionToPrivateBuffers(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; DRIClipNotifyAllDrawables(pScreen); if (pDRIInfo->TransitionMultiToSingle3D) pDRIInfo->TransitionMultiToSingle3D(pScreen); } static void DRITransitionTo3d(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; DRIClipNotifyAllDrawables(pScreen); if (pDRIInfo->TransitionTo3d) pDRIInfo->TransitionTo3d(pScreen); } static void DRITransitionTo2d(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; DRIClipNotifyAllDrawables(pScreen); if (pDRIInfo->TransitionTo2d) pDRIInfo->TransitionTo2d(pScreen); } static int DRIDCNTreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (RegionNumRects(&pWin->clipList) > 0) { WindowPtr *pDRIWindows = (WindowPtr *) data; int i = 0; while (pDRIWindows[i]) i++; pDRIWindows[i] = pWin; pDRIPriv->nrWalked++; } if (pDRIPriv->nrWindows == pDRIPriv->nrWalked) return WT_STOPWALKING; } return WT_WALKCHILDREN; } static void DRIDriverClipNotify(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv->pDriverInfo->ClipNotify) { WindowPtr *pDRIWindows = calloc(sizeof(WindowPtr), pDRIPriv->nrWindows); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; if (pDRIPriv->nrWindows > 0) { pDRIPriv->nrWalked = 0; TraverseTree(pScreen->root, DRIDCNTreeTraversal, (void *) pDRIWindows); } pDRIInfo->ClipNotify(pScreen, pDRIWindows, pDRIPriv->nrWindows); free(pDRIWindows); } } static void DRIIncreaseNumberVisible(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); switch (++pDRIPriv->nrWindowsVisible) { case 1: DRITransitionTo3d(pScreen); break; case 2: DRITransitionToSharedBuffers(pScreen); break; default: break; } DRIDriverClipNotify(pScreen); } static void DRIDecreaseNumberVisible(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); switch (--pDRIPriv->nrWindowsVisible) { case 0: DRITransitionTo2d(pScreen); break; case 1: DRITransitionToPrivateBuffers(pScreen); break; default: break; } DRIDriverClipNotify(pScreen); } Bool DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drm_drawable_t * hHWDrawable) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; WindowPtr pWin; if (pDrawable->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDrawable; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { pDRIDrawablePriv->refCount++; if (!pDRIDrawablePriv->hwDrawable) { drmCreateDrawable(pDRIPriv->drmFD, &pDRIDrawablePriv->hwDrawable); } } else { /* allocate a DRI Window Private record */ if (!(pDRIDrawablePriv = malloc(sizeof(DRIDrawablePrivRec)))) { return FALSE; } /* Only create a drm_drawable_t once */ if (drmCreateDrawable(pDRIPriv->drmFD, &pDRIDrawablePriv->hwDrawable)) { free(pDRIDrawablePriv); return FALSE; } /* add it to the list of DRI drawables for this screen */ pDRIDrawablePriv->pScreen = pScreen; pDRIDrawablePriv->refCount = 1; pDRIDrawablePriv->drawableIndex = -1; pDRIDrawablePriv->nrects = RegionNumRects(&pWin->clipList); /* save private off of preallocated index */ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, pDRIDrawablePriv); pDRIPriv->nrWindows++; if (pDRIDrawablePriv->nrects) DRIIncreaseNumberVisible(pScreen); } /* track this in case the client dies */ if (!AddResource(FakeClientID(client->index), DRIDrawablePrivResType, (void *) (intptr_t) pDrawable->id)) return FALSE; if (pDRIDrawablePriv->hwDrawable) { drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, RegionNumRects(&pWin->clipList), RegionRects(&pWin->clipList)); *hHWDrawable = pDRIDrawablePriv->hwDrawable; } } else if (pDrawable->type != DRAWABLE_PIXMAP) { /* PBuffer */ /* NOT_DONE */ return FALSE; } return TRUE; } static void DRIDrawablePrivDestroy(WindowPtr pWin) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); ScreenPtr pScreen; DRIScreenPrivPtr pDRIPriv; if (!pDRIDrawablePriv) return; pScreen = pWin->drawable.pScreen; pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIDrawablePriv->drawableIndex != -1) { /* bump stamp to force outstanding 3D requests to resync */ pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp = DRIDrawableValidationStamp++; /* release drawable table entry */ pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; } pDRIPriv->nrWindows--; if (pDRIDrawablePriv->nrects) DRIDecreaseNumberVisible(pScreen); drmDestroyDrawable(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable); free(pDRIDrawablePriv); dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } static Bool DRIDestroyDrawableCB(void *value, XID id, void *data) { if (value == data) { /* This calls back DRIDrawablePrivDelete which frees private area */ FreeResourceByType(id, DRIDrawablePrivResType, FALSE); return TRUE; } return FALSE; } Bool DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) { LookupClientResourceComplex(client, DRIDrawablePrivResType, DRIDestroyDrawableCB, (void *) (intptr_t) pDrawable->id); } else { /* pixmap (or for GLX 1.3, a PBuffer) */ /* NOT_DONE */ return FALSE; } return TRUE; } Bool DRIDrawablePrivDelete(void *pResource, XID id) { WindowPtr pWin; int rc; /* For DRIDrawablePrivResType, the XID is the client's fake ID. The * important XID is the value in pResource. */ id = (XID) (intptr_t) pResource; rc = dixLookupWindow(&pWin, id, serverClient, DixGetAttrAccess); if (rc == Success) { DRIDrawablePrivPtr pDRIDrwPriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (!pDRIDrwPriv) return FALSE; if (--pDRIDrwPriv->refCount == 0) DRIDrawablePrivDestroy(pWin); return TRUE; } else { /* pixmap (or for GLX 1.3, a PBuffer) */ /* NOT_DONE */ return FALSE; } } Bool DRIGetDrawableInfo(ScreenPtr pScreen, DrawablePtr pDrawable, unsigned int *index, unsigned int *stamp, int *X, int *Y, int *W, int *H, int *numClipRects, drm_clip_rect_t ** pClipRects, int *backX, int *backY, int *numBackClipRects, drm_clip_rect_t ** pBackClipRects) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv, pOldDrawPriv; WindowPtr pWin, pOldWin; int i; #if 0 printf("maxDrawableTableEntry = %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry); #endif if (pDrawable->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDrawable; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { /* Manage drawable table */ if (pDRIDrawablePriv->drawableIndex == -1) { /* load SAREA table */ /* Search table for empty entry */ i = 0; while (i < pDRIPriv->pDriverInfo->maxDrawableTableEntry) { if (!(pDRIPriv->DRIDrawables[i])) { pDRIPriv->DRIDrawables[i] = pDrawable; pDRIDrawablePriv->drawableIndex = i; pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; break; } i++; } /* Search table for oldest entry */ if (i == pDRIPriv->pDriverInfo->maxDrawableTableEntry) { unsigned int oldestStamp = ~0; int oldestIndex = 0; i = pDRIPriv->pDriverInfo->maxDrawableTableEntry; while (i--) { if (pDRIPriv->pSAREA->drawableTable[i].stamp < oldestStamp) { oldestIndex = i; oldestStamp = pDRIPriv->pSAREA->drawableTable[i].stamp; } } pDRIDrawablePriv->drawableIndex = oldestIndex; /* release oldest drawable table entry */ pOldWin = (WindowPtr) pDRIPriv->DRIDrawables[oldestIndex]; pOldDrawPriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pOldWin); pOldDrawPriv->drawableIndex = -1; /* claim drawable table entry */ pDRIPriv->DRIDrawables[oldestIndex] = pDrawable; /* validate SAREA entry */ pDRIPriv->pSAREA->drawableTable[oldestIndex].stamp = DRIDrawableValidationStamp++; /* check for stamp wrap around */ if (oldestStamp > DRIDrawableValidationStamp) { /* walk SAREA table and invalidate all drawables */ for (i = 0; i < pDRIPriv->pDriverInfo->maxDrawableTableEntry; i++) { pDRIPriv->pSAREA->drawableTable[i].stamp = DRIDrawableValidationStamp++; } } } /* If the driver wants to be notified when the index is * set for a drawable, let it know now. */ if (pDRIPriv->pDriverInfo->SetDrawableIndex) pDRIPriv->pDriverInfo->SetDrawableIndex(pWin, pDRIDrawablePriv-> drawableIndex); /* reinit drawable ID if window is visible */ if ((pWin->viewable) && (pDRIPriv->pDriverInfo->bufferRequests != DRI_NO_WINDOWS)) { (*pDRIPriv->pDriverInfo->InitBuffers) (pWin, &pWin->clipList, pDRIDrawablePriv-> drawableIndex); } } *index = pDRIDrawablePriv->drawableIndex; *stamp = pDRIPriv->pSAREA->drawableTable[*index].stamp; *X = (int) (pWin->drawable.x); *Y = (int) (pWin->drawable.y); *W = (int) (pWin->drawable.width); *H = (int) (pWin->drawable.height); *numClipRects = RegionNumRects(&pWin->clipList); *pClipRects = (drm_clip_rect_t *) RegionRects(&pWin->clipList); if (!*numClipRects && pDRIPriv->fullscreen) { /* use fake full-screen clip rect */ pDRIPriv->fullscreen_rect.x1 = *X; pDRIPriv->fullscreen_rect.y1 = *Y; pDRIPriv->fullscreen_rect.x2 = *X + *W; pDRIPriv->fullscreen_rect.y2 = *Y + *H; *numClipRects = 1; *pClipRects = &pDRIPriv->fullscreen_rect; } *backX = *X; *backY = *Y; if (pDRIPriv->nrWindowsVisible == 1 && *numClipRects) { /* Use a single cliprect. */ int x0 = *X; int y0 = *Y; int x1 = x0 + *W; int y1 = y0 + *H; if (x0 < 0) x0 = 0; if (y0 < 0) y0 = 0; if (x1 > pScreen->width) x1 = pScreen->width; if (y1 > pScreen->height) y1 = pScreen->height; if (y0 >= y1 || x0 >= x1) { *numBackClipRects = 0; *pBackClipRects = NULL; } else { pDRIPriv->private_buffer_rect.x1 = x0; pDRIPriv->private_buffer_rect.y1 = y0; pDRIPriv->private_buffer_rect.x2 = x1; pDRIPriv->private_buffer_rect.y2 = y1; *numBackClipRects = 1; *pBackClipRects = &(pDRIPriv->private_buffer_rect); } } else { /* Use the frontbuffer cliprects for back buffers. */ *numBackClipRects = 0; *pBackClipRects = 0; } } else { /* Not a DRIDrawable */ return FALSE; } } else { /* pixmap (or for GLX 1.3, a PBuffer) */ /* NOT_DONE */ return FALSE; } return TRUE; } Bool DRIGetDeviceInfo(ScreenPtr pScreen, drm_handle_t * hFrameBuffer, int *fbOrigin, int *fbSize, int *fbStride, int *devPrivateSize, void **pDevPrivate) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); *hFrameBuffer = pDRIPriv->pDriverInfo->hFrameBuffer; *fbOrigin = 0; *fbSize = pDRIPriv->pDriverInfo->frameBufferSize; *fbStride = pDRIPriv->pDriverInfo->frameBufferStride; *devPrivateSize = pDRIPriv->pDriverInfo->devPrivateSize; *pDevPrivate = pDRIPriv->pDriverInfo->devPrivate; return TRUE; } DRIInfoPtr DRICreateInfoRec(void) { DRIInfoPtr inforec = (DRIInfoPtr) calloc(1, sizeof(DRIInfoRec)); if (!inforec) return NULL; /* Initialize defaults */ inforec->busIdString = NULL; /* Wrapped function defaults */ inforec->wrap.WakeupHandler = DRIDoWakeupHandler; inforec->wrap.BlockHandler = DRIDoBlockHandler; inforec->wrap.WindowExposures = DRIWindowExposures; inforec->wrap.CopyWindow = DRICopyWindow; inforec->wrap.ClipNotify = DRIClipNotify; inforec->wrap.AdjustFrame = DRIAdjustFrame; inforec->TransitionTo2d = 0; inforec->TransitionTo3d = 0; inforec->SetDrawableIndex = 0; return inforec; } void DRIDestroyInfoRec(DRIInfoPtr DRIInfo) { free(DRIInfo->busIdString); free((char *) DRIInfo); } void DRIWakeupHandler(void *wakeupData, int result) { int i; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.WakeupHandler) (*pDRIPriv->pDriverInfo->wrap.WakeupHandler) (pScreen, result); } } void DRIBlockHandler(void *blockData, void *pTimeout) { int i; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv && pDRIPriv->pDriverInfo->wrap.BlockHandler) (*pDRIPriv->pDriverInfo->wrap.BlockHandler) (pScreen, pTimeout); } } void DRIDoWakeupHandler(ScreenPtr pScreen, int result) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRILock(pScreen, 0); if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* hide X context by swapping 2D component here */ (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, DRI_3D_SYNC, DRI_2D_CONTEXT, pDRIPriv->partial3DContextStore, DRI_2D_CONTEXT, pDRIPriv->hiddenContextStore); } } void DRIDoBlockHandler(ScreenPtr pScreen, void *timeout) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* hide X context by swapping 2D component here */ (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, DRI_2D_SYNC, DRI_NO_CONTEXT, NULL, DRI_2D_CONTEXT, pDRIPriv->partial3DContextStore); } if (pDRIPriv->windowsTouched) DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1); pDRIPriv->windowsTouched = FALSE; DRIUnlock(pScreen); } void DRISwapContext(int drmFD, void *oldctx, void *newctx) { DRIContextPrivPtr oldContext = (DRIContextPrivPtr) oldctx; DRIContextPrivPtr newContext = (DRIContextPrivPtr) newctx; ScreenPtr pScreen = newContext->pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); void *oldContextStore = NULL; DRIContextType oldContextType; void *newContextStore = NULL; DRIContextType newContextType; DRISyncType syncType; #ifdef DEBUG static int count = 0; if (!newContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Context Switch Error: oldContext=%p, newContext=%p\n", oldContext, newContext); return; } /* useful for debugging, just print out after n context switches */ if (!count || !(count % 1)) { DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] Context switch %5d from %p/0x%08x (%d)\n", count, oldContext, oldContext ? oldContext->flags : 0, oldContext ? oldContext->hwContext : -1); DRIDrvMsg(pScreen->myNum, X_INFO, "[DRI] Context switch %5d to %p/0x%08x (%d)\n", count, newContext, newContext ? newContext->flags : 0, newContext ? newContext->hwContext : -1); } ++count; #endif if (!pDRIPriv->pDriverInfo->SwapContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] DDX driver missing context swap call back\n"); return; } if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* only 3D contexts are swapped in this case */ if (oldContext) { oldContextStore = DRIGetContextStore(oldContext); oldContext->valid3D = TRUE; oldContextType = DRI_3D_CONTEXT; } else { oldContextType = DRI_NO_CONTEXT; } newContextStore = DRIGetContextStore(newContext); if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } else { newContextType = DRI_2D_CONTEXT; } syncType = DRI_3D_SYNC; } else { /* default: driverSwapMethod == DRI_SERVER_SWAP */ /* optimize 2D context swaps */ if (newContext->flags & DRI_CONTEXT_2DONLY) { /* go from 3D context to 2D context and only save 2D * subset of 3D state */ oldContextStore = DRIGetContextStore(oldContext); oldContextType = DRI_2D_CONTEXT; newContextStore = DRIGetContextStore(newContext); newContextType = DRI_2D_CONTEXT; syncType = DRI_3D_SYNC; pDRIPriv->lastPartial3DContext = oldContext; } else if (oldContext->flags & DRI_CONTEXT_2DONLY) { if (pDRIPriv->lastPartial3DContext == newContext) { /* go from 2D context back to previous 3D context and * only restore 2D subset of previous 3D state */ oldContextStore = DRIGetContextStore(oldContext); oldContextType = DRI_2D_CONTEXT; newContextStore = DRIGetContextStore(newContext); newContextType = DRI_2D_CONTEXT; syncType = DRI_2D_SYNC; } else { /* go from 2D context to a different 3D context */ /* call DDX driver to do partial restore */ oldContextStore = DRIGetContextStore(oldContext); newContextStore = DRIGetContextStore(pDRIPriv->lastPartial3DContext); (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, DRI_2D_SYNC, DRI_2D_CONTEXT, oldContextStore, DRI_2D_CONTEXT, newContextStore); /* now setup for a complete 3D swap */ oldContextStore = newContextStore; oldContext->valid3D = TRUE; oldContextType = DRI_3D_CONTEXT; newContextStore = DRIGetContextStore(newContext); if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } else { newContextType = DRI_2D_CONTEXT; } syncType = DRI_NO_SYNC; } } else { /* now setup for a complete 3D swap */ oldContextStore = newContextStore; oldContext->valid3D = TRUE; oldContextType = DRI_3D_CONTEXT; newContextStore = DRIGetContextStore(newContext); if ((newContext->valid3D) && (newContext->hwContext != pDRIPriv->myContext)) { newContextType = DRI_3D_CONTEXT; } else { newContextType = DRI_2D_CONTEXT; } syncType = DRI_3D_SYNC; } } /* call DDX driver to perform the swap */ (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, syncType, oldContextType, oldContextStore, newContextType, newContextStore); } void * DRIGetContextStore(DRIContextPrivPtr context) { return ((void *) context->pContextStore); } void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv) { (*pDRIPriv->pDriverInfo->InitBuffers) (pWin, prgn, pDRIDrawablePriv->drawableIndex); } /* call lower wrapped functions */ if (pDRIPriv && pDRIPriv->wrap.WindowExposures) { /* unwrap */ pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures; /* call lower layers */ (*pScreen->WindowExposures) (pWin, prgn); /* rewrap */ pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures; pScreen->WindowExposures = DRIWindowExposures; } } static int DRITreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (RegionNumRects(&(pWin->clipList)) > 0) { RegionPtr reg = (RegionPtr) data; RegionUnion(reg, reg, &(pWin->clipList)); pDRIPriv->nrWalked++; } if (pDRIPriv->nrWindows == pDRIPriv->nrWalked) return WT_STOPWALKING; } return WT_WALKCHILDREN; } Bool DRIDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); Bool retval = TRUE; DRIDrawablePrivDestroy(pWin); /* call lower wrapped functions */ if (pDRIPriv->DestroyWindow) { /* unwrap */ pScreen->DestroyWindow = pDRIPriv->DestroyWindow; /* call lower layers */ retval = (*pScreen->DestroyWindow) (pWin); /* rewrap */ pDRIPriv->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = DRIDestroyWindow; } return retval; } void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv) return; if (pDRIPriv->nrWindowsVisible > 0) { RegionRec reg; RegionNull(®); pDRIPriv->nrWalked = 0; TraverseTree(pWin, DRITreeTraversal, (void *) (®)); if (RegionNotEmpty(®)) { RegionTranslate(®, ptOldOrg.x - pWin->drawable.x, ptOldOrg.y - pWin->drawable.y); RegionIntersect(®, ®, prgnSrc); /* The MoveBuffers interface is not ideal */ (*pDRIPriv->pDriverInfo->MoveBuffers) (pWin, ptOldOrg, ®, pDRIPriv->pDriverInfo-> ddxDrawableTableEntry); } RegionUninit(®); } /* call lower wrapped functions */ if (pDRIPriv->wrap.CopyWindow) { /* unwrap */ pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; /* call lower layers */ (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); /* rewrap */ pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = DRICopyWindow; } } static void DRIGetSecs(long *secs, long *usecs) { struct timeval tv; gettimeofday(&tv, NULL); *secs = tv.tv_sec; *usecs = tv.tv_usec; } static unsigned long DRIComputeMilliSeconds(unsigned long s_secs, unsigned long s_usecs, unsigned long f_secs, unsigned long f_usecs) { if (f_usecs < s_usecs) { --f_secs; f_usecs += 1000000; } return (f_secs - s_secs) * 1000 + (f_usecs - s_usecs) / 1000; } static void DRISpinLockTimeout(drmLock * lock, int val, unsigned long timeout /* in mS */ ) { int count = 10000; #if !defined(__alpha__) && !defined(__powerpc__) char ret; #else int ret; #endif long s_secs, s_usecs; long f_secs, f_usecs; long msecs; long prev = 0; DRIGetSecs(&s_secs, &s_usecs); do { DRM_SPINLOCK_COUNT(lock, val, count, ret); if (!ret) return; /* Got lock */ DRIGetSecs(&f_secs, &f_usecs); msecs = DRIComputeMilliSeconds(s_secs, s_usecs, f_secs, f_usecs); if (msecs - prev < 250) count *= 2; /* Not more than 0.5S */ } while (msecs < timeout); /* Didn't get lock, so take it. The worst that can happen is that there is some garbage written to the wrong part of the framebuffer that a refresh will repair. That's undesirable, but better than locking the server. This should be a very rare event. */ DRM_SPINLOCK_TAKE(lock, val); } static void DRILockTree(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv) return; /* Restore the last known 3D context if the X context is hidden */ if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, DRI_2D_SYNC, DRI_NO_CONTEXT, NULL, DRI_2D_CONTEXT, pDRIPriv->partial3DContextStore); } /* Call kernel to release lock */ DRIUnlock(pScreen); /* Grab drawable spin lock: a time out between 10 and 30 seconds is appropriate, since this should never time out except in the case of client death while the lock is being held. The timeout must be greater than any reasonable rendering time. */ DRISpinLockTimeout(&pDRIPriv->pSAREA->drawable_lock, 1, 10000); /*10 secs */ /* Call kernel flush outstanding buffers and relock */ DRILock(pScreen, DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH_ALL); /* Switch back to our 2D context if the X context is hidden */ if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { /* hide X context by swapping 2D component here */ (*pDRIPriv->pDriverInfo->SwapContext) (pScreen, DRI_3D_SYNC, DRI_2D_CONTEXT, pDRIPriv->partial3DContextStore, DRI_2D_CONTEXT, pDRIPriv->hiddenContextStore); } } void DRIClipNotify(WindowPtr pWin, int dx, int dy) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; if (!pDRIPriv) return; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { int nrects = RegionNumRects(&pWin->clipList); if (!pDRIPriv->windowsTouched) { DRILockTree(pScreen); pDRIPriv->windowsTouched = TRUE; } if (nrects && !pDRIDrawablePriv->nrects) DRIIncreaseNumberVisible(pScreen); else if (!nrects && pDRIDrawablePriv->nrects) DRIDecreaseNumberVisible(pScreen); else DRIDriverClipNotify(pScreen); pDRIDrawablePriv->nrects = nrects; pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp = DRIDrawableValidationStamp++; drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, nrects, RegionRects(&pWin->clipList)); } /* call lower wrapped functions */ if (pDRIPriv->wrap.ClipNotify) { /* unwrap */ pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; /* call lower layers */ (*pScreen->ClipNotify) (pWin, dx, dy); /* rewrap */ pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = DRIClipNotify; } } CARD32 DRIGetDrawableIndex(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); CARD32 index; if (pDRIDrawablePriv) { index = pDRIDrawablePriv->drawableIndex; } else { index = pDRIPriv->pDriverInfo->ddxDrawableTableEntry; } return index; } unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); return pDRIPriv->pSAREA->drawableTable[drawable_index].stamp; } void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); ErrorF("%s: %d\n", msg, pDRIPriv->pSAREA->drawable_lock.lock); } void DRILock(ScreenPtr pScreen, int flags) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv || !pDRIPriv->pLockRefCount) return; if (!*pDRIPriv->pLockRefCount) { DRM_LOCK(pDRIPriv->drmFD, pDRIPriv->pLSAREA, pDRIPriv->myContext, flags); *pDRIPriv->pLockingContext = pDRIPriv->myContext; } else if (*pDRIPriv->pLockingContext != pDRIPriv->myContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Locking deadlock.\n" "\tAlready locked with context %p,\n" "\ttrying to lock with context %p.\n", pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)++; } void DRIUnlock(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv || !pDRIPriv->pLockRefCount) return; if (*pDRIPriv->pLockRefCount > 0) { if (pDRIPriv->myContext != *pDRIPriv->pLockingContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Unlocking inconsistency:\n" "\tContext %p trying to unlock lock held by context %p\n", pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)--; } else { DRIDrvMsg(pScreen->myNum, X_ERROR, "DRIUnlock called when not locked.\n"); return; } if (!*pDRIPriv->pLockRefCount) DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pLSAREA, pDRIPriv->myContext); } void * DRIGetSAREAPrivate(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv) return 0; return (void *) (((char *) pDRIPriv->pSAREA) + sizeof(XF86DRISAREARec)); } drm_context_t DRIGetContext(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv) return 0; return pDRIPriv->myContext; } void DRIGetTexOffsetFuncs(ScreenPtr pScreen, DRITexOffsetStartProcPtr * texOffsetStartFunc, DRITexOffsetFinishProcPtr * texOffsetFinishFunc) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (!pDRIPriv) return; *texOffsetStartFunc = pDRIPriv->pDriverInfo->texOffsetStart; *texOffsetFinishFunc = pDRIPriv->pDriverInfo->texOffsetFinish; } /* This lets get at the unwrapped functions so that they can correctly * call the lowerlevel functions, and choose whether they will be * called at every level of recursion (eg in validatetree). */ DRIWrappedFuncsRec * DRIGetWrappedFuncs(ScreenPtr pScreen) { return &(DRI_SCREEN_PRIV(pScreen)->wrap); } /* note that this returns the library version, not the protocol version */ void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion) { *majorVersion = DRIINFO_MAJOR_VERSION; *minorVersion = DRIINFO_MINOR_VERSION; *patchVersion = DRIINFO_PATCH_VERSION; } static void _DRIAdjustFrame(ScrnInfoPtr pScrn, DRIScreenPrivPtr pDRIPriv, int x, int y) { pDRIPriv->pSAREA->frame.x = x; pDRIPriv->pSAREA->frame.y = y; pDRIPriv->pSAREA->frame.width = pScrn->frameX1 - x + 1; pDRIPriv->pSAREA->frame.height = pScrn->frameY1 - y + 1; } void DRIAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); int px, py; if (!pDRIPriv || !pDRIPriv->pSAREA) { DRIDrvMsg(pScrn->scrnIndex, X_ERROR, "[DRI] No SAREA (%p %p)\n", pDRIPriv, pDRIPriv ? pDRIPriv->pSAREA : NULL); return; } if (pDRIPriv->fullscreen) { /* Fix up frame */ pScrn->frameX0 = pDRIPriv->pSAREA->frame.x; pScrn->frameY0 = pDRIPriv->pSAREA->frame.y; pScrn->frameX1 = pScrn->frameX0 + pDRIPriv->pSAREA->frame.width - 1; pScrn->frameY1 = pScrn->frameY0 + pDRIPriv->pSAREA->frame.height - 1; /* Fix up cursor */ miPointerGetPosition(inputInfo.pointer, &px, &py); if (px < pScrn->frameX0) px = pScrn->frameX0; if (px > pScrn->frameX1) px = pScrn->frameX1; if (py < pScrn->frameY0) py = pScrn->frameY0; if (py > pScrn->frameY1) py = pScrn->frameY1; pScreen->SetCursorPosition(inputInfo.pointer, pScreen, px, py, TRUE); return; } if (pDRIPriv->wrap.AdjustFrame) { /* unwrap */ pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; /* call lower layers */ (*pScrn->AdjustFrame) (pScrn, x, y); /* rewrap */ pDRIPriv->wrap.AdjustFrame = pScrn->AdjustFrame; pScrn->AdjustFrame = DRIAdjustFrame; } _DRIAdjustFrame(pScrn, pDRIPriv, x, y); } /* * DRIMoveBuffersHelper swaps the regions rects in place leaving you * a region with the rects in the order that you need to blit them, * but it is possibly (likely) an invalid region afterwards. If you * need to use the region again for anything you have to call * REGION_VALIDATE on it, or better yet, save a copy first. */ void DRIMoveBuffersHelper(ScreenPtr pScreen, int dx, int dy, int *xdir, int *ydir, RegionPtr reg) { BoxPtr extents, pbox, firstBox, lastBox; BoxRec tmpBox; int y, nbox; extents = RegionExtents(reg); nbox = RegionNumRects(reg); pbox = RegionRects(reg); if ((dy > 0) && (dy < (extents->y2 - extents->y1))) { *ydir = -1; if (nbox > 1) { firstBox = pbox; lastBox = pbox + nbox - 1; while ((unsigned long) firstBox < (unsigned long) lastBox) { tmpBox = *firstBox; *firstBox = *lastBox; *lastBox = tmpBox; firstBox++; lastBox--; } } } else *ydir = 1; if ((dx > 0) && (dx < (extents->x2 - extents->x1))) { *xdir = -1; if (nbox > 1) { firstBox = lastBox = pbox; y = pbox->y1; while (--nbox) { pbox++; if (pbox->y1 == y) lastBox++; else { while ((unsigned long) firstBox < (unsigned long) lastBox) { tmpBox = *firstBox; *firstBox = *lastBox; *lastBox = tmpBox; firstBox++; lastBox--; } firstBox = lastBox = pbox; y = pbox->y1; } } while ((unsigned long) firstBox < (unsigned long) lastBox) { tmpBox = *firstBox; *firstBox = *lastBox; *lastBox = tmpBox; firstBox++; lastBox--; } } } else *xdir = 1; } xorg-server-21.1.16/hw/xfree86/dri/xf86dri.c0000644000175000017500000004340614757411105013763 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Kevin E. Martin * Jens Owen * Rickard E. (Rik) Faith * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "extinit.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" #define _XF86DRI_SERVER_ #include #include "swaprep.h" #include "xf86str.h" #include "dri.h" #include "sarea.h" #include "dristruct.h" #include "xf86drm.h" #include "protocol-versions.h" #include "xf86Extensions.h" static int DRIErrorBase; static void XF86DRIResetProc(ExtensionEntry *extEntry); static unsigned char DRIReqCode = 0; /*ARGSUSED*/ static void XF86DRIResetProc(ExtensionEntry *extEntry) { DRIReset(); } static int ProcXF86DRIQueryVersion(register ClientPtr client) { xXF86DRIQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_XF86DRI_MAJOR_VERSION, .minorVersion = SERVER_XF86DRI_MINOR_VERSION, .patchVersion = SERVER_XF86DRI_PATCH_VERSION }; REQUEST_SIZE_MATCH(xXF86DRIQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); swapl(&rep.patchVersion); } WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), &rep); return Success; } static int ProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) { xXF86DRIQueryDirectRenderingCapableReply rep; Bool isCapable; REQUEST(xXF86DRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIQueryDirectRenderingCapable(screenInfo.screens[stuff->screen], &isCapable)) { return BadValue; } if (!client->local || client->swapped) isCapable = 0; rep = (xXF86DRIQueryDirectRenderingCapableReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .isCapable = isCapable }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), &rep); return Success; } static int ProcXF86DRIOpenConnection(register ClientPtr client) { xXF86DRIOpenConnectionReply rep; drm_handle_t hSAREA; char *busIdString; CARD32 busIdStringLength = 0; REQUEST(xXF86DRIOpenConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIOpenConnection(screenInfo.screens[stuff->screen], &hSAREA, &busIdString)) { return BadValue; } if (busIdString) busIdStringLength = strlen(busIdString); rep = (xXF86DRIOpenConnectionReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(SIZEOF(xXF86DRIOpenConnectionReply) - SIZEOF(xGenericReply) + pad_to_int32(busIdStringLength)), .busIdStringLength = busIdStringLength, .hSAREALow = (CARD32) (hSAREA & 0xffffffff), #if defined(LONG64) && !defined(__linux__) .hSAREAHigh = (CARD32) (hSAREA >> 32), #else .hSAREAHigh = 0 #endif }; WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), &rep); if (busIdStringLength) WriteToClient(client, busIdStringLength, busIdString); return Success; } static int ProcXF86DRIAuthConnection(register ClientPtr client) { xXF86DRIAuthConnectionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .authenticated = 1 }; REQUEST(xXF86DRIAuthConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIAuthConnectionReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIAuthConnection(screenInfo.screens[stuff->screen], stuff->magic)) { ErrorF("Failed to authenticate %lu\n", (unsigned long) stuff->magic); rep.authenticated = 0; } WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), &rep); return Success; } static int ProcXF86DRICloseConnection(register ClientPtr client) { REQUEST(xXF86DRICloseConnectionReq); REQUEST_SIZE_MATCH(xXF86DRICloseConnectionReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } DRICloseConnection(screenInfo.screens[stuff->screen]); return Success; } static int ProcXF86DRIGetClientDriverName(register ClientPtr client) { xXF86DRIGetClientDriverNameReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .clientDriverNameLength = 0 }; char *clientDriverName; REQUEST(xXF86DRIGetClientDriverNameReq); REQUEST_SIZE_MATCH(xXF86DRIGetClientDriverNameReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } DRIGetClientDriverName(screenInfo.screens[stuff->screen], (int *) &rep.ddxDriverMajorVersion, (int *) &rep.ddxDriverMinorVersion, (int *) &rep.ddxDriverPatchVersion, &clientDriverName); if (clientDriverName) rep.clientDriverNameLength = strlen(clientDriverName); rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetClientDriverNameReply) - SIZEOF(xGenericReply) + pad_to_int32(rep.clientDriverNameLength)); WriteToClient(client, sizeof(xXF86DRIGetClientDriverNameReply), &rep); if (rep.clientDriverNameLength) WriteToClient(client, rep.clientDriverNameLength, clientDriverName); return Success; } static int ProcXF86DRICreateContext(register ClientPtr client) { xXF86DRICreateContextReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; ScreenPtr pScreen; REQUEST(xXF86DRICreateContextReq); REQUEST_SIZE_MATCH(xXF86DRICreateContextReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } pScreen = screenInfo.screens[stuff->screen]; if (!DRICreateContext(pScreen, NULL, stuff->context, (drm_context_t *) &rep.hHWContext)) { return BadValue; } WriteToClient(client, sizeof(xXF86DRICreateContextReply), &rep); return Success; } static int ProcXF86DRIDestroyContext(register ClientPtr client) { REQUEST(xXF86DRIDestroyContextReq); REQUEST_SIZE_MATCH(xXF86DRIDestroyContextReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIDestroyContext(screenInfo.screens[stuff->screen], stuff->context)) { return BadValue; } return Success; } static int ProcXF86DRICreateDrawable(ClientPtr client) { xXF86DRICreateDrawableReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DrawablePtr pDrawable; int rc; REQUEST(xXF86DRICreateDrawableReq); REQUEST_SIZE_MATCH(xXF86DRICreateDrawableReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!DRICreateDrawable(screenInfo.screens[stuff->screen], client, pDrawable, (drm_drawable_t *) &rep.hHWDrawable)) { return BadValue; } WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), &rep); return Success; } static int ProcXF86DRIDestroyDrawable(register ClientPtr client) { REQUEST(xXF86DRIDestroyDrawableReq); DrawablePtr pDrawable; int rc; REQUEST_SIZE_MATCH(xXF86DRIDestroyDrawableReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!DRIDestroyDrawable(screenInfo.screens[stuff->screen], client, pDrawable)) { return BadValue; } return Success; } static int ProcXF86DRIGetDrawableInfo(register ClientPtr client) { xXF86DRIGetDrawableInfoReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DrawablePtr pDrawable; int X, Y, W, H; drm_clip_rect_t *pClipRects, *pClippedRects; drm_clip_rect_t *pBackClipRects; int backX, backY, rc; REQUEST(xXF86DRIGetDrawableInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDrawableInfoReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!DRIGetDrawableInfo(screenInfo.screens[stuff->screen], pDrawable, (unsigned int *) &rep.drawableTableIndex, (unsigned int *) &rep.drawableTableStamp, (int *) &X, (int *) &Y, (int *) &W, (int *) &H, (int *) &rep.numClipRects, &pClipRects, &backX, &backY, (int *) &rep.numBackClipRects, &pBackClipRects)) { return BadValue; } rep.drawableX = X; rep.drawableY = Y; rep.drawableWidth = W; rep.drawableHeight = H; rep.length = (SIZEOF(xXF86DRIGetDrawableInfoReply) - SIZEOF(xGenericReply)); rep.backX = backX; rep.backY = backY; if (rep.numBackClipRects) rep.length += sizeof(drm_clip_rect_t) * rep.numBackClipRects; pClippedRects = pClipRects; if (rep.numClipRects) { /* Clip cliprects to screen dimensions (redirected windows) */ pClippedRects = xallocarray(rep.numClipRects, sizeof(drm_clip_rect_t)); if (pClippedRects) { ScreenPtr pScreen = screenInfo.screens[stuff->screen]; int i, j; for (i = 0, j = 0; i < rep.numClipRects; i++) { pClippedRects[j].x1 = max(pClipRects[i].x1, 0); pClippedRects[j].y1 = max(pClipRects[i].y1, 0); pClippedRects[j].x2 = min(pClipRects[i].x2, pScreen->width); pClippedRects[j].y2 = min(pClipRects[i].y2, pScreen->height); if (pClippedRects[j].x1 < pClippedRects[j].x2 && pClippedRects[j].y1 < pClippedRects[j].y2) { j++; } } rep.numClipRects = j; } else { rep.numClipRects = 0; } rep.length += sizeof(drm_clip_rect_t) * rep.numClipRects; } rep.length = bytes_to_int32(rep.length); WriteToClient(client, sizeof(xXF86DRIGetDrawableInfoReply), &rep); if (rep.numClipRects) { WriteToClient(client, sizeof(drm_clip_rect_t) * rep.numClipRects, pClippedRects); free(pClippedRects); } if (rep.numBackClipRects) { WriteToClient(client, sizeof(drm_clip_rect_t) * rep.numBackClipRects, pBackClipRects); } return Success; } static int ProcXF86DRIGetDeviceInfo(register ClientPtr client) { xXF86DRIGetDeviceInfoReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; drm_handle_t hFrameBuffer; void *pDevPrivate; REQUEST(xXF86DRIGetDeviceInfoReq); REQUEST_SIZE_MATCH(xXF86DRIGetDeviceInfoReq); if (stuff->screen >= screenInfo.numScreens) { client->errorValue = stuff->screen; return BadValue; } if (!DRIGetDeviceInfo(screenInfo.screens[stuff->screen], &hFrameBuffer, (int *) &rep.framebufferOrigin, (int *) &rep.framebufferSize, (int *) &rep.framebufferStride, (int *) &rep.devPrivateSize, &pDevPrivate)) { return BadValue; } rep.hFrameBufferLow = (CARD32) (hFrameBuffer & 0xffffffff); #if defined(LONG64) && !defined(__linux__) rep.hFrameBufferHigh = (CARD32) (hFrameBuffer >> 32); #else rep.hFrameBufferHigh = 0; #endif if (rep.devPrivateSize) { rep.length = bytes_to_int32(SIZEOF(xXF86DRIGetDeviceInfoReply) - SIZEOF(xGenericReply) + pad_to_int32(rep.devPrivateSize)); } WriteToClient(client, sizeof(xXF86DRIGetDeviceInfoReply), &rep); if (rep.length) { WriteToClient(client, rep.devPrivateSize, pDevPrivate); } return Success; } static int ProcXF86DRIDispatch(register ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XF86DRIQueryVersion: return ProcXF86DRIQueryVersion(client); case X_XF86DRIQueryDirectRenderingCapable: return ProcXF86DRIQueryDirectRenderingCapable(client); } if (!client->local) return DRIErrorBase + XF86DRIClientNotLocal; switch (stuff->data) { case X_XF86DRIOpenConnection: return ProcXF86DRIOpenConnection(client); case X_XF86DRICloseConnection: return ProcXF86DRICloseConnection(client); case X_XF86DRIGetClientDriverName: return ProcXF86DRIGetClientDriverName(client); case X_XF86DRICreateContext: return ProcXF86DRICreateContext(client); case X_XF86DRIDestroyContext: return ProcXF86DRIDestroyContext(client); case X_XF86DRICreateDrawable: return ProcXF86DRICreateDrawable(client); case X_XF86DRIDestroyDrawable: return ProcXF86DRIDestroyDrawable(client); case X_XF86DRIGetDrawableInfo: return ProcXF86DRIGetDrawableInfo(client); case X_XF86DRIGetDeviceInfo: return ProcXF86DRIGetDeviceInfo(client); case X_XF86DRIAuthConnection: return ProcXF86DRIAuthConnection(client); /* {Open,Close}FullScreen are deprecated now */ default: return BadRequest; } } static int _X_COLD SProcXF86DRIQueryVersion(register ClientPtr client) { REQUEST(xXF86DRIQueryVersionReq); swaps(&stuff->length); return ProcXF86DRIQueryVersion(client); } static int _X_COLD SProcXF86DRIQueryDirectRenderingCapable(register ClientPtr client) { REQUEST(xXF86DRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xXF86DRIQueryDirectRenderingCapableReq); swaps(&stuff->length); swapl(&stuff->screen); return ProcXF86DRIQueryDirectRenderingCapable(client); } static int _X_COLD SProcXF86DRIDispatch(register ClientPtr client) { REQUEST(xReq); /* * Only local clients are allowed DRI access, but remote clients still need * these requests to find out cleanly. */ switch (stuff->data) { case X_XF86DRIQueryVersion: return SProcXF86DRIQueryVersion(client); case X_XF86DRIQueryDirectRenderingCapable: return SProcXF86DRIQueryDirectRenderingCapable(client); default: return DRIErrorBase + XF86DRIClientNotLocal; } } void XFree86DRIExtensionInit(void) { ExtensionEntry *extEntry; if (DRIExtensionInit() && (extEntry = AddExtension(XF86DRINAME, XF86DRINumberEvents, XF86DRINumberErrors, ProcXF86DRIDispatch, SProcXF86DRIDispatch, XF86DRIResetProc, StandardMinorOpcode))) { DRIReqCode = (unsigned char) extEntry->base; DRIErrorBase = extEntry->errorBase; } } xorg-server-21.1.16/hw/xfree86/dri2/0000755000175000017500000000000014757411135012463 5xorg-server-21.1.16/hw/xfree86/dri2/meson.build0000644000175000017500000000045214757411105014543 srcs_xorg_dri2 = [ 'dri2.c', 'dri2ext.c', ] xorg_dri2 = static_library('xorg_dri2', srcs_xorg_dri2, include_directories: [inc, xorg_inc], dependencies: [ common_dep, libdrm_dep, ], c_args: xorg_c_args, ) install_data('dri2.h', install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/dri2/Makefile.am0000644000175000017500000000043714757411105014440 SUBDIRS=pci_ids noinst_LTLIBRARIES = libdri2.la AM_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus libdri2_la_SOURCES = \ dri2.c \ dri2.h \ dri2ext.c \ dri2int.h sdk_HEADERS = dri2.h xorg-server-21.1.16/hw/xfree86/dri2/dri2.h0000644000175000017500000003744414757411105013425 /* * Copyright © 2007 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL 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 PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg (krh@redhat.com) */ #ifndef _DRI2_H_ #define _DRI2_H_ #include /* Version 2 structure (with format at the end) */ typedef struct { unsigned int attachment; unsigned int name; unsigned int pitch; unsigned int cpp; unsigned int flags; unsigned int format; void *driverPrivate; } DRI2BufferRec, *DRI2BufferPtr; extern CARD8 dri2_major; /* version of DRI2 supported by DDX */ extern CARD8 dri2_minor; typedef DRI2BufferRec DRI2Buffer2Rec, *DRI2Buffer2Ptr; typedef void (*DRI2SwapEventPtr) (ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, CARD32 sbc); typedef DRI2BufferPtr(*DRI2CreateBuffersProcPtr) (DrawablePtr pDraw, unsigned int *attachments, int count); typedef void (*DRI2DestroyBuffersProcPtr) (DrawablePtr pDraw, DRI2BufferPtr buffers, int count); typedef void (*DRI2CopyRegionProcPtr) (DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer); typedef void (*DRI2WaitProcPtr) (WindowPtr pWin, unsigned int sequence); typedef int (*DRI2AuthMagicProcPtr) (int fd, uint32_t magic); typedef int (*DRI2AuthMagic2ProcPtr) (ScreenPtr pScreen, uint32_t magic); /** * Schedule a buffer swap * * This callback is used to support glXSwapBuffers and the OML_sync_control * extension (see it for a description of the params). * * Drivers should queue an event for the frame count that satisfies the * parameters passed in. If the event is in the future (i.e. the conditions * aren't currently satisfied), the server may block the client at the next * GLX request using DRI2WaitSwap. When the event arrives, drivers should call * \c DRI2SwapComplete, which will handle waking the client and returning * the appropriate data. * * The DDX is responsible for doing a flip, exchange, or blit of the swap * when the corresponding event arrives. The \c DRI2CanFlip and * \c DRI2CanExchange functions can be used as helpers for this purpose. * * \param client client pointer (used for block/unblock) * \param pDraw drawable whose count we want * \param pDestBuffer current front buffer * \param pSrcBuffer current back buffer * \param target_msc frame count to wait for * \param divisor divisor for condition equation * \param remainder remainder for division equation * \param func function to call when the swap completes * \param data data for the callback \p func. */ typedef int (*DRI2ScheduleSwapProcPtr) (ClientPtr client, DrawablePtr pDraw, DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer, CARD64 * target_msc, CARD64 divisor, CARD64 remainder, DRI2SwapEventPtr func, void *data); typedef DRI2BufferPtr(*DRI2CreateBufferProcPtr) (DrawablePtr pDraw, unsigned int attachment, unsigned int format); typedef void (*DRI2DestroyBufferProcPtr) (DrawablePtr pDraw, DRI2BufferPtr buffer); /** * Notifies driver when DRI2GetBuffers reuses a dri2 buffer. * * Driver may rename the dri2 buffer in this notify if it is required. * * \param pDraw drawable whose count we want * \param buffer buffer that will be returned to client */ typedef void (*DRI2ReuseBufferNotifyProcPtr) (DrawablePtr pDraw, DRI2BufferPtr buffer); /** * Get current media stamp counter values * * This callback is used to support the SGI_video_sync and OML_sync_control * extensions. * * Drivers should return the current frame counter and the timestamp from * when the returned frame count was last incremented. * * The count should correspond to the screen where the drawable is currently * visible. If the drawable isn't visible (e.g. redirected), the server * should return BadDrawable to the client, pending GLX spec updates to * define this behavior. * * \param pDraw drawable whose count we want * \param ust timestamp from when the count was last incremented. * \param mst current frame count */ typedef int (*DRI2GetMSCProcPtr) (DrawablePtr pDraw, CARD64 * ust, CARD64 * msc); /** * Schedule a frame count related wait * * This callback is used to support the SGI_video_sync and OML_sync_control * extensions. See those specifications for details on how to handle * the divisor and remainder parameters. * * Drivers should queue an event for the frame count that satisfies the * parameters passed in. If the event is in the future (i.e. the conditions * aren't currently satisfied), the driver should block the client using * \c DRI2BlockClient. When the event arrives, drivers should call * \c DRI2WaitMSCComplete, which will handle waking the client and returning * the appropriate data. * * \param client client pointer (used for block/unblock) * \param pDraw drawable whose count we want * \param target_msc frame count to wait for * \param divisor divisor for condition equation * \param remainder remainder for division equation */ typedef int (*DRI2ScheduleWaitMSCProcPtr) (ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, CARD64 divisor, CARD64 remainder); typedef void (*DRI2InvalidateProcPtr) (DrawablePtr pDraw, void *data, XID id); /** * DRI2 calls this hook when ever swap_limit is going to be changed. Default * implementation for the hook only accepts one as swap_limit. If driver can * support other swap_limits it has to implement supported limits with this * callback. * * \param pDraw drawable whose swap_limit is going to be changed * \param swap_limit new swap_limit that going to be set * \return TRUE if limit is support, FALSE if not. */ typedef Bool (*DRI2SwapLimitValidateProcPtr) (DrawablePtr pDraw, int swap_limit); typedef DRI2BufferPtr(*DRI2CreateBuffer2ProcPtr) (ScreenPtr pScreen, DrawablePtr pDraw, unsigned int attachment, unsigned int format); typedef void (*DRI2DestroyBuffer2ProcPtr) (ScreenPtr pScreen, DrawablePtr pDraw, DRI2BufferPtr buffer); typedef void (*DRI2CopyRegion2ProcPtr) (ScreenPtr pScreen, DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDestBuffer, DRI2BufferPtr pSrcBuffer); /** * \brief Get the value of a parameter. * * The parameter's \a value is looked up on the screen associated with * \a pDrawable. * * \return \c Success or error code. */ typedef int (*DRI2GetParamProcPtr) (ClientPtr client, DrawablePtr pDrawable, CARD64 param, BOOL *is_param_recognized, CARD64 *value); /** * Version of the DRI2InfoRec structure defined in this header */ #define DRI2INFOREC_VERSION 9 typedef struct { unsigned int version; /**< Version of this struct */ int fd; const char *driverName; const char *deviceName; DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; DRI2WaitProcPtr Wait; /* added in version 4 */ DRI2ScheduleSwapProcPtr ScheduleSwap; DRI2GetMSCProcPtr GetMSC; DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC; /* number of drivers in the driverNames array */ unsigned int numDrivers; /* array of driver names, indexed by DRI2Driver* driver types */ /* a name of NULL means that driver is not supported */ const char *const *driverNames; /* added in version 5 */ DRI2AuthMagicProcPtr AuthMagic; /* added in version 6 */ DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify; DRI2SwapLimitValidateProcPtr SwapLimitValidate; /* added in version 7 */ DRI2GetParamProcPtr GetParam; /* added in version 8 */ /* AuthMagic callback which passes extra context */ /* If this is NULL the AuthMagic callback is used */ /* If this is non-NULL the AuthMagic callback is ignored */ DRI2AuthMagic2ProcPtr AuthMagic2; /* added in version 9 */ DRI2CreateBuffer2ProcPtr CreateBuffer2; DRI2DestroyBuffer2ProcPtr DestroyBuffer2; DRI2CopyRegion2ProcPtr CopyRegion2; } DRI2InfoRec, *DRI2InfoPtr; extern _X_EXPORT Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info); extern _X_EXPORT void DRI2CloseScreen(ScreenPtr pScreen); extern _X_EXPORT Bool DRI2HasSwapControl(ScreenPtr pScreen); extern _X_EXPORT Bool DRI2Connect(ClientPtr client, ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName); extern _X_EXPORT Bool DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic); extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id, DRI2InvalidateProcPtr invalidate, void *priv); extern _X_EXPORT int DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id, DRI2InvalidateProcPtr invalidate, void *priv, XID *dri2_id_out); extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); extern _X_EXPORT int DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, unsigned int dest, unsigned int src); /** * Determine the major and minor version of the DRI2 extension. * * Provides a mechanism to other modules (e.g., 2D drivers) to determine the * version of the DRI2 extension. While it is possible to peek directly at * the \c XF86ModuleData from a layered module, such a module will fail to * load (due to an unresolved symbol) if the DRI2 extension is not loaded. * * \param major Location to store the major version of the DRI2 extension * \param minor Location to store the minor version of the DRI2 extension * * \note * This interface was added some time after the initial release of the DRI2 * module. Layered modules that wish to use this interface must first test * its existence by calling \c xf86LoaderCheckSymbol. */ extern _X_EXPORT void DRI2Version(int *major, int *minor); extern _X_EXPORT DRI2BufferPtr *DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count); extern _X_EXPORT void DRI2SwapInterval(DrawablePtr pDrawable, int interval); extern _X_EXPORT Bool DRI2SwapLimit(DrawablePtr pDraw, int swap_limit); extern _X_EXPORT int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDrawable, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 * swap_target, DRI2SwapEventPtr func, void *data); extern _X_EXPORT Bool DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable); extern _X_EXPORT int DRI2GetMSC(DrawablePtr pDrawable, CARD64 * ust, CARD64 * msc, CARD64 * sbc); extern _X_EXPORT int DRI2WaitMSC(ClientPtr client, DrawablePtr pDrawable, CARD64 target_msc, CARD64 divisor, CARD64 remainder); extern _X_EXPORT int ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust, CARD64 msc, CARD64 sbc); extern _X_EXPORT int DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc); extern _X_EXPORT Bool DRI2ThrottleClient(ClientPtr client, DrawablePtr pDraw); extern _X_EXPORT Bool DRI2CanFlip(DrawablePtr pDraw); extern _X_EXPORT Bool DRI2CanExchange(DrawablePtr pDraw); /* Note: use *only* for MSC related waits */ extern _X_EXPORT void DRI2BlockClient(ClientPtr client, DrawablePtr pDraw); extern _X_EXPORT void DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, unsigned int tv_sec, unsigned int tv_usec, int type, DRI2SwapEventPtr swap_complete, void *swap_data); extern _X_EXPORT void DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw, int frame, unsigned int tv_sec, unsigned int tv_usec); extern _X_EXPORT int DRI2GetParam(ClientPtr client, DrawablePtr pDrawable, CARD64 param, BOOL *is_param_recognized, CARD64 *value); extern _X_EXPORT DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest); #endif xorg-server-21.1.16/hw/xfree86/dri2/Makefile.in0000644000175000017500000007620014757411115014453 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/dri2 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdri2_la_LIBADD = am_libdri2_la_OBJECTS = dri2.lo dri2ext.lo libdri2_la_OBJECTS = $(am_libdri2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dri2.Plo ./$(DEPDIR)/dri2ext.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdri2_la_SOURCES) DIST_SOURCES = $(libdri2_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = pci_ids noinst_LTLIBRARIES = libdri2.la AM_CFLAGS = \ -DHAVE_XORG_CONFIG_H \ @DIX_CFLAGS@ @XORG_CFLAGS@ \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/os-support/bus libdri2_la_SOURCES = \ dri2.c \ dri2.h \ dri2ext.c \ dri2int.h sdk_HEADERS = dri2.h all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/dri2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/dri2/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdri2.la: $(libdri2_la_OBJECTS) $(libdri2_la_DEPENDENCIES) $(EXTRA_libdri2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdri2_la_OBJECTS) $(libdri2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2ext.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/dri2.Plo -rm -f ./$(DEPDIR)/dri2ext.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/dri2.Plo -rm -f ./$(DEPDIR)/dri2ext.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-sdkHEADERS install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/dri2/dri2.c0000644000175000017500000014000214757411105013401 /* * Copyright © 2007, 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL 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 PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg (krh@redhat.com) */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #ifdef WITH_LIBDRM #include #endif #include "list.h" #include "scrnintstr.h" #include "windowstr.h" #include "dixstruct.h" #include "dri2.h" #include "dri2int.h" #include "damage.h" #include "xf86.h" CARD8 dri2_major; /* version of DRI2 supported by DDX */ CARD8 dri2_minor; uint32_t prime_id_allocate_bitmask; static DevPrivateKeyRec dri2ScreenPrivateKeyRec; #define dri2ScreenPrivateKey (&dri2ScreenPrivateKeyRec) static DevPrivateKeyRec dri2WindowPrivateKeyRec; #define dri2WindowPrivateKey (&dri2WindowPrivateKeyRec) static DevPrivateKeyRec dri2PixmapPrivateKeyRec; #define dri2PixmapPrivateKey (&dri2PixmapPrivateKeyRec) static DevPrivateKeyRec dri2ClientPrivateKeyRec; #define dri2ClientPrivateKey (&dri2ClientPrivateKeyRec) #define dri2ClientPrivate(_pClient) (dixLookupPrivate(&(_pClient)->devPrivates, \ dri2ClientPrivateKey)) typedef struct _DRI2Client { int prime_id; } DRI2ClientRec, *DRI2ClientPtr; static RESTYPE dri2DrawableRes; typedef struct _DRI2Screen *DRI2ScreenPtr; typedef struct _DRI2Drawable { DRI2ScreenPtr dri2_screen; DrawablePtr drawable; struct xorg_list reference_list; int width; int height; DRI2BufferPtr *buffers; int bufferCount; unsigned int swapsPending; int swap_interval; CARD64 swap_count; int64_t target_sbc; /* -1 means no SBC wait outstanding */ CARD64 last_swap_target; /* most recently queued swap target */ CARD64 last_swap_msc; /* msc at completion of most recent swap */ CARD64 last_swap_ust; /* ust at completion of most recent swap */ int swap_limit; /* for N-buffering */ unsigned blocked[3]; Bool needInvalidate; int prime_id; PixmapPtr prime_secondary_pixmap; PixmapPtr redirectpixmap; } DRI2DrawableRec, *DRI2DrawablePtr; typedef struct _DRI2Screen { ScreenPtr screen; int refcnt; unsigned int numDrivers; const char **driverNames; const char *deviceName; int fd; unsigned int lastSequence; int prime_id; DRI2CreateBufferProcPtr CreateBuffer; DRI2DestroyBufferProcPtr DestroyBuffer; DRI2CopyRegionProcPtr CopyRegion; DRI2ScheduleSwapProcPtr ScheduleSwap; DRI2GetMSCProcPtr GetMSC; DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC; DRI2AuthMagic2ProcPtr AuthMagic; DRI2AuthMagicProcPtr LegacyAuthMagic; DRI2ReuseBufferNotifyProcPtr ReuseBufferNotify; DRI2SwapLimitValidateProcPtr SwapLimitValidate; DRI2GetParamProcPtr GetParam; HandleExposuresProcPtr HandleExposures; ConfigNotifyProcPtr ConfigNotify; SetWindowPixmapProcPtr SetWindowPixmap; DRI2CreateBuffer2ProcPtr CreateBuffer2; DRI2DestroyBuffer2ProcPtr DestroyBuffer2; DRI2CopyRegion2ProcPtr CopyRegion2; } DRI2ScreenRec; static void destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, int prime_id); enum DRI2WakeType { WAKE_SBC, WAKE_MSC, WAKE_SWAP, }; #define Wake(c, t) (void *)((uintptr_t)(c) | (t)) static Bool dri2WakeClient(ClientPtr client, void *closure) { ClientWakeup(client); return TRUE; } static Bool dri2WakeAll(ClientPtr client, DRI2DrawablePtr pPriv, enum DRI2WakeType t) { int count; if (!pPriv->blocked[t]) return FALSE; count = ClientSignalAll(client, dri2WakeClient, Wake(pPriv, t)); pPriv->blocked[t] -= count; return count; } static Bool dri2Sleep(ClientPtr client, DRI2DrawablePtr pPriv, enum DRI2WakeType t) { if (ClientSleep(client, dri2WakeClient, Wake(pPriv, t))) { pPriv->blocked[t]++; return TRUE; } return FALSE; } static DRI2ScreenPtr DRI2GetScreen(ScreenPtr pScreen) { return dixLookupPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey); } static ScreenPtr GetScreenPrime(ScreenPtr primary, int prime_id) { ScreenPtr secondary; if (prime_id == 0) { return primary; } xorg_list_for_each_entry(secondary, &primary->secondary_list, secondary_head) { DRI2ScreenPtr ds; if (!secondary->is_offload_secondary) continue; ds = DRI2GetScreen(secondary); if (ds == NULL) continue; if (ds->prime_id == prime_id) return secondary; } return primary; } static DRI2ScreenPtr DRI2GetScreenPrime(ScreenPtr primary, int prime_id) { ScreenPtr secondary = GetScreenPrime(primary, prime_id); return DRI2GetScreen(secondary); } static DRI2DrawablePtr DRI2GetDrawable(DrawablePtr pDraw) { WindowPtr pWin; PixmapPtr pPixmap; switch (pDraw->type) { case DRAWABLE_WINDOW: pWin = (WindowPtr) pDraw; return dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); case DRAWABLE_PIXMAP: pPixmap = (PixmapPtr) pDraw; return dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); default: return NULL; } } static DRI2DrawablePtr DRI2AllocateDrawable(DrawablePtr pDraw) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv; CARD64 ust; WindowPtr pWin; PixmapPtr pPixmap; pPriv = malloc(sizeof *pPriv); if (pPriv == NULL) return NULL; pPriv->dri2_screen = ds; pPriv->drawable = pDraw; pPriv->width = pDraw->width; pPriv->height = pDraw->height; pPriv->buffers = NULL; pPriv->bufferCount = 0; pPriv->swapsPending = 0; pPriv->swap_count = 0; pPriv->target_sbc = -1; pPriv->swap_interval = 1; /* Initialize last swap target from DDX if possible */ if (!ds->GetMSC || !(*ds->GetMSC) (pDraw, &ust, &pPriv->last_swap_target)) pPriv->last_swap_target = 0; memset(pPriv->blocked, 0, sizeof(pPriv->blocked)); pPriv->swap_limit = 1; /* default to double buffering */ pPriv->last_swap_msc = 0; pPriv->last_swap_ust = 0; xorg_list_init(&pPriv->reference_list); pPriv->needInvalidate = FALSE; pPriv->redirectpixmap = NULL; pPriv->prime_secondary_pixmap = NULL; if (pDraw->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDraw; dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, pPriv); } else { pPixmap = (PixmapPtr) pDraw; dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, pPriv); } return pPriv; } Bool DRI2SwapLimit(DrawablePtr pDraw, int swap_limit) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); DRI2ScreenPtr ds; if (!pPriv) return FALSE; ds = pPriv->dri2_screen; if (!ds->SwapLimitValidate || !ds->SwapLimitValidate(pDraw, swap_limit)) return FALSE; pPriv->swap_limit = swap_limit; /* Check throttling */ if (pPriv->swapsPending >= pPriv->swap_limit) return TRUE; dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_SWAP); return TRUE; } typedef struct DRI2DrawableRefRec { XID id; XID dri2_id; DRI2InvalidateProcPtr invalidate; void *priv; struct xorg_list link; } DRI2DrawableRefRec, *DRI2DrawableRefPtr; static DRI2DrawableRefPtr DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id) { DRI2DrawableRefPtr ref; xorg_list_for_each_entry(ref, &pPriv->reference_list, link) { if (ref->id == id) return ref; } return NULL; } static int DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id, DRI2InvalidateProcPtr invalidate, void *priv) { DRI2DrawableRefPtr ref; ref = malloc(sizeof *ref); if (ref == NULL) return BadAlloc; if (!AddResource(dri2_id, dri2DrawableRes, pPriv)) { free(ref); return BadAlloc; } if (!DRI2LookupDrawableRef(pPriv, id)) if (!AddResource(id, dri2DrawableRes, pPriv)) { FreeResourceByType(dri2_id, dri2DrawableRes, TRUE); free(ref); return BadAlloc; } ref->id = id; ref->dri2_id = dri2_id; ref->invalidate = invalidate; ref->priv = priv; xorg_list_add(&ref->link, &pPriv->reference_list); return Success; } int DRI2CreateDrawable2(ClientPtr client, DrawablePtr pDraw, XID id, DRI2InvalidateProcPtr invalidate, void *priv, XID *dri2_id_out) { DRI2DrawablePtr pPriv; DRI2ClientPtr dri2_client; XID dri2_id; int rc; if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey)) return BadValue; dri2_client = dri2ClientPrivate(client); pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) pPriv = DRI2AllocateDrawable(pDraw); if (pPriv == NULL) return BadAlloc; pPriv->prime_id = dri2_client->prime_id; dri2_id = FakeClientID(client->index); rc = DRI2AddDrawableRef(pPriv, id, dri2_id, invalidate, priv); if (rc != Success) return rc; if (dri2_id_out) *dri2_id_out = dri2_id; return Success; } int DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id, DRI2InvalidateProcPtr invalidate, void *priv) { return DRI2CreateDrawable2(client, pDraw, id, invalidate, priv, NULL); } static int DRI2DrawableGone(void *p, XID id) { DRI2DrawablePtr pPriv = p; DRI2DrawableRefPtr ref, next; WindowPtr pWin; PixmapPtr pPixmap; DrawablePtr pDraw; int i; xorg_list_for_each_entry_safe(ref, next, &pPriv->reference_list, link) { if (ref->dri2_id == id) { xorg_list_del(&ref->link); /* If this was the last ref under this X drawable XID, * unregister the X drawable resource. */ if (!DRI2LookupDrawableRef(pPriv, ref->id)) FreeResourceByType(ref->id, dri2DrawableRes, TRUE); free(ref); break; } if (ref->id == id) { xorg_list_del(&ref->link); FreeResourceByType(ref->dri2_id, dri2DrawableRes, TRUE); free(ref); } } if (!xorg_list_is_empty(&pPriv->reference_list)) return Success; pDraw = pPriv->drawable; if (pDraw->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDraw; dixSetPrivate(&pWin->devPrivates, dri2WindowPrivateKey, NULL); } else { pPixmap = (PixmapPtr) pDraw; dixSetPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey, NULL); } if (pPriv->prime_secondary_pixmap) { (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap); (*pPriv->prime_secondary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap); } if (pPriv->buffers != NULL) { for (i = 0; i < pPriv->bufferCount; i++) destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id); free(pPriv->buffers); } if (pPriv->redirectpixmap) { (*pDraw->pScreen->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE); (*pDraw->pScreen->DestroyPixmap)(pPriv->redirectpixmap); } dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_SWAP); dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_MSC); dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_SBC); free(pPriv); return Success; } static DRI2BufferPtr create_buffer(DRI2ScreenPtr ds, DrawablePtr pDraw, unsigned int attachment, unsigned int format) { DRI2BufferPtr buffer; if (ds->CreateBuffer2) buffer = (*ds->CreateBuffer2)(GetScreenPrime(pDraw->pScreen, DRI2GetDrawable(pDraw)->prime_id), pDraw, attachment, format); else buffer = (*ds->CreateBuffer)(pDraw, attachment, format); return buffer; } static void destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buffer, int prime_id) { ScreenPtr primeScreen; DRI2ScreenPtr ds; primeScreen = GetScreenPrime(pDraw->pScreen, prime_id); ds = DRI2GetScreen(primeScreen); if (ds->DestroyBuffer2) (*ds->DestroyBuffer2)(primeScreen, pDraw, buffer); else (*ds->DestroyBuffer)(pDraw, buffer); } static int find_attachment(DRI2DrawablePtr pPriv, unsigned attachment) { int i; if (pPriv->buffers == NULL) { return -1; } for (i = 0; i < pPriv->bufferCount; i++) { if ((pPriv->buffers[i] != NULL) && (pPriv->buffers[i]->attachment == attachment)) { return i; } } return -1; } static Bool allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, DRI2DrawablePtr pPriv, unsigned int attachment, unsigned int format, int dimensions_match, DRI2BufferPtr * buffer) { int old_buf = find_attachment(pPriv, attachment); if ((old_buf < 0) || attachment == DRI2BufferFrontLeft || !dimensions_match || (pPriv->buffers[old_buf]->format != format)) { *buffer = create_buffer(ds, pDraw, attachment, format); return TRUE; } else { *buffer = pPriv->buffers[old_buf]; if (ds->ReuseBufferNotify) (*ds->ReuseBufferNotify) (pDraw, *buffer); pPriv->buffers[old_buf] = NULL; return FALSE; } } static void update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, DRI2BufferPtr * buffers, int out_count, int *width, int *height) { int i; if (pPriv->buffers != NULL) { for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i] != NULL) { destroy_buffer(pDraw, pPriv->buffers[i], pPriv->prime_id); } } free(pPriv->buffers); } pPriv->buffers = buffers; pPriv->bufferCount = out_count; pPriv->width = pDraw->width; pPriv->height = pDraw->height; *width = pPriv->width; *height = pPriv->height; } static DRI2BufferPtr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, int has_format) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); DRI2ScreenPtr ds; DRI2BufferPtr *buffers; int need_real_front = 0; int need_fake_front = 0; int have_fake_front = 0; int front_format = 0; int dimensions_match; int buffers_changed = 0; int i; if (!pPriv) { *width = pDraw->width; *height = pDraw->height; *out_count = 0; return NULL; } ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id); dimensions_match = (pDraw->width == pPriv->width) && (pDraw->height == pPriv->height); buffers = calloc((count + 1), sizeof(buffers[0])); if (!buffers) goto err_out; for (i = 0; i < count; i++) { const unsigned attachment = *(attachments++); const unsigned format = (has_format) ? *(attachments++) : 0; if (allocate_or_reuse_buffer(pDraw, ds, pPriv, attachment, format, dimensions_match, &buffers[i])) buffers_changed = 1; if (buffers[i] == NULL) goto err_out; /* If the drawable is a window and the front-buffer is requested, * silently add the fake front-buffer to the list of requested * attachments. The counting logic in the loop accounts for the case * where the client requests both the fake and real front-buffer. */ if (attachment == DRI2BufferBackLeft) { need_real_front++; front_format = format; } if (attachment == DRI2BufferFrontLeft) { need_real_front--; front_format = format; if (pDraw->type == DRAWABLE_WINDOW) { need_fake_front++; } } if (pDraw->type == DRAWABLE_WINDOW) { if (attachment == DRI2BufferFakeFrontLeft) { need_fake_front--; have_fake_front = 1; } } } if (need_real_front > 0) { if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft, front_format, dimensions_match, &buffers[i])) buffers_changed = 1; if (buffers[i] == NULL) goto err_out; i++; } if (need_fake_front > 0) { if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft, front_format, dimensions_match, &buffers[i])) buffers_changed = 1; if (buffers[i] == NULL) goto err_out; i++; have_fake_front = 1; } *out_count = i; update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, height); /* If the client is getting a fake front-buffer, pre-fill it with the * contents of the real front-buffer. This ensures correct operation of * applications that call glXWaitX before calling glDrawBuffer. */ if (have_fake_front && buffers_changed) { BoxRec box; RegionRec region; box.x1 = 0; box.y1 = 0; box.x2 = pPriv->width; box.y2 = pPriv->height; RegionInit(®ion, &box, 0); DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); } pPriv->needInvalidate = TRUE; return pPriv->buffers; err_out: *out_count = 0; if (buffers) { for (i = 0; i < count; i++) { if (buffers[i] != NULL) destroy_buffer(pDraw, buffers[i], 0); } free(buffers); buffers = NULL; } update_dri2_drawable_buffers(pPriv, pDraw, buffers, *out_count, width, height); return buffers; } DRI2BufferPtr * DRI2GetBuffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { return do_get_buffers(pDraw, width, height, attachments, count, out_count, FALSE); } DRI2BufferPtr * DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count) { return do_get_buffers(pDraw, width, height, attachments, count, out_count, TRUE); } static void DRI2InvalidateDrawable(DrawablePtr pDraw) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); DRI2DrawableRefPtr ref; if (!pPriv || !pPriv->needInvalidate) return; pPriv->needInvalidate = FALSE; xorg_list_for_each_entry(ref, &pPriv->reference_list, link) ref->invalidate(pDraw, ref->priv, ref->id); } /* * In the direct rendered case, we throttle the clients that have more * than their share of outstanding swaps (and thus busy buffers) when a * new GetBuffers request is received. In the AIGLX case, we allow the * client to get the new buffers, but throttle when the next GLX request * comes in (see __glXDRIcontextWait()). */ Bool DRI2ThrottleClient(ClientPtr client, DrawablePtr pDraw) { DRI2DrawablePtr pPriv; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return FALSE; /* Throttle to swap limit */ if (pPriv->swapsPending >= pPriv->swap_limit) { if (dri2Sleep(client, pPriv, WAKE_SWAP)) { ResetCurrentRequest(client); client->sequence--; return TRUE; } } return FALSE; } void DRI2BlockClient(ClientPtr client, DrawablePtr pDraw) { DRI2DrawablePtr pPriv; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return; dri2Sleep(client, pPriv, WAKE_MSC); } static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) { if (drawable->type == DRAWABLE_PIXMAP) return (PixmapPtr)drawable; else { struct _Window *pWin = (struct _Window *)drawable; return drawable->pScreen->GetWindowPixmap(pWin); } } /* * A TraverseTree callback to invalidate all windows using the same * pixmap */ static int DRI2InvalidateWalk(WindowPtr pWin, void *data) { if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) return WT_DONTWALKCHILDREN; DRI2InvalidateDrawable(&pWin->drawable); return WT_WALKCHILDREN; } static void DRI2InvalidateDrawableAll(DrawablePtr pDraw) { if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDraw; PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); /* * Find the top-most window using this pixmap */ while (pWin->parent && pDraw->pScreen->GetWindowPixmap(pWin->parent) == pPixmap) pWin = pWin->parent; /* * Walk the sub-tree to invalidate all of the * windows using the same pixmap */ TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); DRI2InvalidateDrawable(&pPixmap->drawable); } else DRI2InvalidateDrawable(pDraw); } DrawablePtr DRI2UpdatePrime(DrawablePtr pDraw, DRI2BufferPtr pDest) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); PixmapPtr spix; PixmapPtr mpix = GetDrawablePixmap(pDraw); ScreenPtr primary, secondary; Bool ret; primary = mpix->drawable.pScreen; if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDraw; PixmapPtr pPixmap = pDraw->pScreen->GetWindowPixmap(pWin); if (pDraw->pScreen->GetScreenPixmap(pDraw->pScreen) == pPixmap) { if (pPriv->redirectpixmap && pPriv->redirectpixmap->drawable.width == pDraw->width && pPriv->redirectpixmap->drawable.height == pDraw->height && pPriv->redirectpixmap->drawable.depth == pDraw->depth) { mpix = pPriv->redirectpixmap; } else { if (primary->ReplaceScanoutPixmap) { mpix = (*primary->CreatePixmap)(primary, pDraw->width, pDraw->height, pDraw->depth, CREATE_PIXMAP_USAGE_SHARED); if (!mpix) return NULL; ret = (*primary->ReplaceScanoutPixmap)(pDraw, mpix, TRUE); if (ret == FALSE) { (*primary->DestroyPixmap)(mpix); return NULL; } pPriv->redirectpixmap = mpix; } else return NULL; } } else if (pPriv->redirectpixmap) { (*primary->ReplaceScanoutPixmap)(pDraw, pPriv->redirectpixmap, FALSE); (*primary->DestroyPixmap)(pPriv->redirectpixmap); pPriv->redirectpixmap = NULL; } } secondary = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); /* check if the pixmap is still fine */ if (pPriv->prime_secondary_pixmap) { if (pPriv->prime_secondary_pixmap->primary_pixmap == mpix) return &pPriv->prime_secondary_pixmap->drawable; else { PixmapUnshareSecondaryPixmap(pPriv->prime_secondary_pixmap); (*pPriv->prime_secondary_pixmap->primary_pixmap->drawable.pScreen->DestroyPixmap)(pPriv->prime_secondary_pixmap->primary_pixmap); (*secondary->DestroyPixmap)(pPriv->prime_secondary_pixmap); pPriv->prime_secondary_pixmap = NULL; } } spix = PixmapShareToSecondary(mpix, secondary); if (!spix) return NULL; pPriv->prime_secondary_pixmap = spix; #ifdef COMPOSITE spix->screen_x = mpix->screen_x; spix->screen_y = mpix->screen_y; #endif DRI2InvalidateDrawableAll(pDraw); return &spix->drawable; } static void dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDest, DRI2BufferPtr pSrc) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); DRI2ScreenPtr ds; ScreenPtr primeScreen; primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); ds = DRI2GetScreen(primeScreen); if (ds->CopyRegion2) (*ds->CopyRegion2)(primeScreen, pDraw, pRegion, pDest, pSrc); else (*ds->CopyRegion) (pDraw, pRegion, pDest, pSrc); /* cause damage to the box */ if (pPriv->prime_id) { BoxRec box; RegionRec region; box.x1 = 0; box.x2 = box.x1 + pDraw->width; box.y1 = 0; box.y2 = box.y1 + pDraw->height; RegionInit(®ion, &box, 1); RegionTranslate(®ion, pDraw->x, pDraw->y); DamageRegionAppend(pDraw, ®ion); DamageRegionProcessPending(pDraw); RegionUninit(®ion); } } int DRI2CopyRegion(DrawablePtr pDraw, RegionPtr pRegion, unsigned int dest, unsigned int src) { DRI2DrawablePtr pPriv; DRI2BufferPtr pDestBuffer, pSrcBuffer; int i; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return BadDrawable; pDestBuffer = NULL; pSrcBuffer = NULL; for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i]->attachment == dest) pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; if (pPriv->buffers[i]->attachment == src) pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; } if (pSrcBuffer == NULL || pDestBuffer == NULL) return BadValue; dri2_copy_region(pDraw, pRegion, pDestBuffer, pSrcBuffer); return Success; } /* Can this drawable be page flipped? */ Bool DRI2CanFlip(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; WindowPtr pWin, pRoot; PixmapPtr pWinPixmap, pRootPixmap; if (pDraw->type == DRAWABLE_PIXMAP) return TRUE; pRoot = pScreen->root; pRootPixmap = pScreen->GetWindowPixmap(pRoot); pWin = (WindowPtr) pDraw; pWinPixmap = pScreen->GetWindowPixmap(pWin); if (pRootPixmap != pWinPixmap) return FALSE; if (!RegionEqual(&pWin->clipList, &pRoot->winSize)) return FALSE; /* Does the window match the pixmap exactly? */ if (pDraw->x != 0 || pDraw->y != 0 || #ifdef COMPOSITE pDraw->x != pWinPixmap->screen_x || pDraw->y != pWinPixmap->screen_y || #endif pDraw->width != pWinPixmap->drawable.width || pDraw->height != pWinPixmap->drawable.height) return FALSE; return TRUE; } /* Can we do a pixmap exchange instead of a blit? */ Bool DRI2CanExchange(DrawablePtr pDraw) { return FALSE; } void DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw, int frame, unsigned int tv_sec, unsigned int tv_usec) { DRI2DrawablePtr pPriv; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return; ProcDRI2WaitMSCReply(client, ((CARD64) tv_sec * 1000000) + tv_usec, frame, pPriv->swap_count); dri2WakeAll(client, pPriv, WAKE_MSC); } static void DRI2WakeClient(ClientPtr client, DrawablePtr pDraw, int frame, unsigned int tv_sec, unsigned int tv_usec) { ScreenPtr pScreen = pDraw->pScreen; DRI2DrawablePtr pPriv; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: bad drawable\n", __func__); return; } /* * Swap completed. * Wake the client iff: * - it was waiting on SBC * - was blocked due to GLX make current * - was blocked due to swap throttling * - is not blocked due to an MSC wait */ if (pPriv->target_sbc != -1 && pPriv->target_sbc <= pPriv->swap_count) { if (dri2WakeAll(client, pPriv, WAKE_SBC)) { ProcDRI2WaitMSCReply(client, ((CARD64) tv_sec * 1000000) + tv_usec, frame, pPriv->swap_count); pPriv->target_sbc = -1; } } dri2WakeAll(CLIENT_SIGNAL_ANY, pPriv, WAKE_SWAP); } void DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, unsigned int tv_sec, unsigned int tv_usec, int type, DRI2SwapEventPtr swap_complete, void *swap_data) { ScreenPtr pScreen = pDraw->pScreen; DRI2DrawablePtr pPriv; CARD64 ust = 0; BoxRec box; RegionRec region; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: bad drawable\n", __func__); return; } pPriv->swapsPending--; pPriv->swap_count++; box.x1 = 0; box.y1 = 0; box.x2 = pDraw->width; box.y2 = pDraw->height; RegionInit(®ion, &box, 0); DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); ust = ((CARD64) tv_sec * 1000000) + tv_usec; if (swap_complete) swap_complete(client, swap_data, type, ust, frame, pPriv->swap_count); pPriv->last_swap_msc = frame; pPriv->last_swap_ust = ust; DRI2WakeClient(client, pDraw, frame, tv_sec, tv_usec); } Bool DRI2WaitSwap(ClientPtr client, DrawablePtr pDrawable) { DRI2DrawablePtr pPriv = DRI2GetDrawable(pDrawable); /* If we're currently waiting for a swap on this drawable, reset * the request and suspend the client. */ if (pPriv && pPriv->swapsPending) { if (dri2Sleep(client, pPriv, WAKE_SWAP)) { ResetCurrentRequest(client); client->sequence--; return TRUE; } } return FALSE; } int DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, CARD64 divisor, CARD64 remainder, CARD64 * swap_target, DRI2SwapEventPtr func, void *data) { ScreenPtr pScreen = pDraw->pScreen; DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv; DRI2BufferPtr pDestBuffer = NULL, pSrcBuffer = NULL; int ret, i; CARD64 ust, current_msc; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: bad drawable\n", __func__); return BadDrawable; } /* According to spec, return expected swapbuffers count SBC after this swap * will complete. This is ignored unless we return Success, but it must be * initialized on every path where we return Success or the caller will send * an uninitialized value off the stack to the client. So let's initialize * it as early as possible, just to be sure. */ *swap_target = pPriv->swap_count + pPriv->swapsPending + 1; for (i = 0; i < pPriv->bufferCount; i++) { if (pPriv->buffers[i]->attachment == DRI2BufferFrontLeft) pDestBuffer = (DRI2BufferPtr) pPriv->buffers[i]; if (pPriv->buffers[i]->attachment == DRI2BufferBackLeft) pSrcBuffer = (DRI2BufferPtr) pPriv->buffers[i]; } if (pSrcBuffer == NULL || pDestBuffer == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: drawable has no back or front?\n", __func__); return BadDrawable; } /* Old DDX or no swap interval, just blit */ if (!ds->ScheduleSwap || !pPriv->swap_interval || pPriv->prime_id) { BoxRec box; RegionRec region; box.x1 = 0; box.y1 = 0; box.x2 = pDraw->width; box.y2 = pDraw->height; RegionInit(®ion, &box, 0); pPriv->swapsPending++; dri2_copy_region(pDraw, ®ion, pDestBuffer, pSrcBuffer); DRI2SwapComplete(client, pDraw, target_msc, 0, 0, DRI2_BLIT_COMPLETE, func, data); return Success; } /* * In the simple glXSwapBuffers case, all params will be 0, and we just * need to schedule a swap for the last swap target + the swap interval. */ if (target_msc == 0 && divisor == 0 && remainder == 0) { /* If the current vblank count of the drawable's crtc is lower * than the count stored in last_swap_target from a previous swap * then reinitialize last_swap_target to the current crtc's msc, * otherwise the swap will hang. This will happen if the drawable * is moved to a crtc with a lower refresh rate, or a crtc that just * got enabled. */ if (ds->GetMSC) { if (!(*ds->GetMSC) (pDraw, &ust, ¤t_msc)) pPriv->last_swap_target = 0; if (current_msc < pPriv->last_swap_target) pPriv->last_swap_target = current_msc; } /* * Swap target for this swap is last swap target + swap interval since * we have to account for the current swap count, interval, and the * number of pending swaps. */ target_msc = pPriv->last_swap_target + pPriv->swap_interval; } pPriv->swapsPending++; ret = (*ds->ScheduleSwap) (client, pDraw, pDestBuffer, pSrcBuffer, &target_msc, divisor, remainder, func, data); if (!ret) { pPriv->swapsPending--; /* didn't schedule */ xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: driver failed to schedule swap\n", __func__); return BadDrawable; } pPriv->last_swap_target = target_msc; DRI2InvalidateDrawableAll(pDraw); return Success; } void DRI2SwapInterval(DrawablePtr pDrawable, int interval) { ScreenPtr pScreen = pDrawable->pScreen; DRI2DrawablePtr pPriv = DRI2GetDrawable(pDrawable); if (pPriv == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: bad drawable\n", __func__); return; } /* fixme: check against arbitrary max? */ pPriv->swap_interval = interval; } int DRI2GetMSC(DrawablePtr pDraw, CARD64 * ust, CARD64 * msc, CARD64 * sbc) { ScreenPtr pScreen = pDraw->pScreen; DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv; Bool ret; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] %s: bad drawable\n", __func__); return BadDrawable; } if (!ds->GetMSC) { *ust = 0; *msc = 0; *sbc = pPriv->swap_count; return Success; } /* * Spec needs to be updated to include unmapped or redirected * drawables */ ret = (*ds->GetMSC) (pDraw, ust, msc); if (!ret) return BadDrawable; *sbc = pPriv->swap_count; return Success; } int DRI2WaitMSC(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, CARD64 divisor, CARD64 remainder) { DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); DRI2DrawablePtr pPriv; Bool ret; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return BadDrawable; /* Old DDX just completes immediately */ if (!ds->ScheduleWaitMSC) { DRI2WaitMSCComplete(client, pDraw, target_msc, 0, 0); return Success; } ret = (*ds->ScheduleWaitMSC) (client, pDraw, target_msc, divisor, remainder); if (!ret) return BadDrawable; return Success; } int DRI2WaitSBC(ClientPtr client, DrawablePtr pDraw, CARD64 target_sbc) { DRI2DrawablePtr pPriv; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) return BadDrawable; if (pPriv->target_sbc != -1) /* already in use */ return BadDrawable; /* target_sbc == 0 means to block until all pending swaps are * finished. Recalculate target_sbc to get that behaviour. */ if (target_sbc == 0) target_sbc = pPriv->swap_count + pPriv->swapsPending; /* If current swap count already >= target_sbc, reply and * return immediately with (ust, msc, sbc) triplet of * most recent completed swap. */ if (pPriv->swap_count >= target_sbc) { ProcDRI2WaitMSCReply(client, pPriv->last_swap_ust, pPriv->last_swap_msc, pPriv->swap_count); return Success; } if (!dri2Sleep(client, pPriv, WAKE_SBC)) return BadAlloc; pPriv->target_sbc = target_sbc; return Success; } Bool DRI2HasSwapControl(ScreenPtr pScreen) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); return ds->ScheduleSwap && ds->GetMSC; } Bool DRI2Connect(ClientPtr client, ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName) { DRI2ScreenPtr ds; uint32_t prime_id = DRI2DriverPrimeId(driverType); uint32_t driver_id = driverType & 0xffff; if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey)) return FALSE; ds = DRI2GetScreenPrime(pScreen, prime_id); if (ds == NULL) return FALSE; if (driver_id >= ds->numDrivers || !ds->driverNames[driver_id]) return FALSE; *driverName = ds->driverNames[driver_id]; *deviceName = ds->deviceName; *fd = ds->fd; if (client) { DRI2ClientPtr dri2_client; dri2_client = dri2ClientPrivate(client); dri2_client->prime_id = prime_id; } return TRUE; } static int DRI2AuthMagic (ScreenPtr pScreen, uint32_t magic) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); if (ds == NULL) return -EINVAL; return (*ds->LegacyAuthMagic) (ds->fd, magic); } Bool DRI2Authenticate(ClientPtr client, ScreenPtr pScreen, uint32_t magic) { DRI2ScreenPtr ds; DRI2ClientPtr dri2_client; ScreenPtr primescreen; if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey)) return FALSE; dri2_client = dri2ClientPrivate(client); ds = DRI2GetScreenPrime(pScreen, dri2_client->prime_id); if (ds == NULL) return FALSE; primescreen = GetScreenPrime(pScreen, dri2_client->prime_id); if ((*ds->AuthMagic)(primescreen, magic)) return FALSE; return TRUE; } static int DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw, WindowPtr pSib) { DrawablePtr pDraw = (DrawablePtr) pWin; ScreenPtr pScreen = pDraw->pScreen; DRI2ScreenPtr ds = DRI2GetScreen(pScreen); DRI2DrawablePtr dd = DRI2GetDrawable(pDraw); int ret; if (ds->ConfigNotify) { pScreen->ConfigNotify = ds->ConfigNotify; ret = (*pScreen->ConfigNotify) (pWin, x, y, w, h, bw, pSib); ds->ConfigNotify = pScreen->ConfigNotify; pScreen->ConfigNotify = DRI2ConfigNotify; if (ret) return ret; } if (!dd || (dd->width == w && dd->height == h)) return Success; DRI2InvalidateDrawable(pDraw); return Success; } static void DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix) { ScreenPtr pScreen = pWin->drawable.pScreen; DRI2ScreenPtr ds = DRI2GetScreen(pScreen); pScreen->SetWindowPixmap = ds->SetWindowPixmap; (*pScreen->SetWindowPixmap) (pWin, pPix); ds->SetWindowPixmap = pScreen->SetWindowPixmap; pScreen->SetWindowPixmap = DRI2SetWindowPixmap; DRI2InvalidateDrawable(&pWin->drawable); } #define MAX_PRIME DRI2DriverPrimeMask static int get_prime_id(void) { int i; /* start at 1, prime id 0 is just normal driver */ for (i = 1; i < MAX_PRIME; i++) { if (prime_id_allocate_bitmask & (1 << i)) continue; prime_id_allocate_bitmask |= (1 << i); return i; } return -1; } #include "pci_ids/pci_id_driver_map.h" static char * dri2_probe_driver_name(ScreenPtr pScreen, DRI2InfoPtr info) { #ifdef WITH_LIBDRM int i, j; char *driver = NULL; drmDevicePtr dev; /* For non-PCI devices and drmGetDevice fail, just assume that * the 3D driver is named the same as the kernel driver. This is * currently true for vc4 and msm (freedreno). */ if (drmGetDevice(info->fd, &dev) || dev->bustype != DRM_BUS_PCI) { drmVersionPtr version = drmGetVersion(info->fd); if (!version) { xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] Couldn't drmGetVersion() on non-PCI device, " "no driver name found.\n"); return NULL; } driver = strndup(version->name, version->name_len); drmFreeVersion(version); return driver; } for (i = 0; driver_map[i].driver; i++) { if (dev->deviceinfo.pci->vendor_id != driver_map[i].vendor_id) continue; if (driver_map[i].num_chips_ids == -1) { driver = strdup(driver_map[i].driver); goto out; } for (j = 0; j < driver_map[i].num_chips_ids; j++) { if (driver_map[i].chip_ids[j] == dev->deviceinfo.pci->device_id) { driver = strdup(driver_map[i].driver); goto out; } } } xf86DrvMsg(pScreen->myNum, X_ERROR, "[DRI2] No driver mapping found for PCI device " "0x%04x / 0x%04x\n", dev->deviceinfo.pci->vendor_id, dev->deviceinfo.pci->device_id); out: drmFreeDevice(&dev); return driver; #else return NULL; #endif } Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) { DRI2ScreenPtr ds; const char *driverTypeNames[] = { "DRI", /* DRI2DriverDRI */ "VDPAU", /* DRI2DriverVDPAU */ }; unsigned int i; CARD8 cur_minor; if (info->version < 3) return FALSE; if (!dixRegisterPrivateKey(&dri2ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&dri2WindowPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey(&dri2PixmapPrivateKeyRec, PRIVATE_PIXMAP, 0)) return FALSE; if (!dixRegisterPrivateKey(&dri2ClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(DRI2ClientRec))) return FALSE; ds = calloc(1, sizeof *ds); if (!ds) return FALSE; ds->screen = pScreen; ds->fd = info->fd; ds->deviceName = info->deviceName; dri2_major = 1; ds->CreateBuffer = info->CreateBuffer; ds->DestroyBuffer = info->DestroyBuffer; ds->CopyRegion = info->CopyRegion; cur_minor = 1; if (info->version >= 4) { ds->ScheduleSwap = info->ScheduleSwap; ds->ScheduleWaitMSC = info->ScheduleWaitMSC; ds->GetMSC = info->GetMSC; cur_minor = 3; } if (info->version >= 5) { ds->LegacyAuthMagic = info->AuthMagic; } if (info->version >= 6) { ds->ReuseBufferNotify = info->ReuseBufferNotify; ds->SwapLimitValidate = info->SwapLimitValidate; } if (info->version >= 7) { ds->GetParam = info->GetParam; cur_minor = 4; } if (info->version >= 8) { ds->AuthMagic = info->AuthMagic2; } if (info->version >= 9) { ds->CreateBuffer2 = info->CreateBuffer2; if (info->CreateBuffer2 && pScreen->isGPU) { ds->prime_id = get_prime_id(); if (ds->prime_id == -1) { free(ds); return FALSE; } } ds->DestroyBuffer2 = info->DestroyBuffer2; ds->CopyRegion2 = info->CopyRegion2; } /* * if the driver doesn't provide an AuthMagic function or the info struct * version is too low, call through LegacyAuthMagic */ if (!ds->AuthMagic) { ds->AuthMagic = DRI2AuthMagic; /* * If the driver doesn't provide an AuthMagic function * it relies on the old method (using libdrm) or fails */ if (!ds->LegacyAuthMagic) #ifdef WITH_LIBDRM ds->LegacyAuthMagic = drmAuthMagic; #else goto err_out; #endif } /* Initialize minor if needed and set to minimum provied by DDX */ if (!dri2_minor || dri2_minor > cur_minor) dri2_minor = cur_minor; if (info->version == 3 || info->numDrivers == 0) { /* Driver too old: use the old-style driverName field */ ds->numDrivers = info->driverName ? 1 : 2; ds->driverNames = xallocarray(ds->numDrivers, sizeof(*ds->driverNames)); if (!ds->driverNames) goto err_out; if (info->driverName) { ds->driverNames[0] = info->driverName; } else { /* FIXME dri2_probe_driver_name() returns a strdup-ed string, * currently this gets leaked */ ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info); if (!ds->driverNames[0]) return FALSE; /* There is no VDPAU driver for i965, fallback to the generic * OpenGL/VAAPI va_gl backend to emulate VDPAU on i965. */ if (strcmp(ds->driverNames[0], "i965") == 0) ds->driverNames[1] = "va_gl"; } } else { ds->numDrivers = info->numDrivers; ds->driverNames = xallocarray(info->numDrivers, sizeof(*ds->driverNames)); if (!ds->driverNames) goto err_out; memcpy(ds->driverNames, info->driverNames, info->numDrivers * sizeof(*ds->driverNames)); } dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); ds->ConfigNotify = pScreen->ConfigNotify; pScreen->ConfigNotify = DRI2ConfigNotify; ds->SetWindowPixmap = pScreen->SetWindowPixmap; pScreen->SetWindowPixmap = DRI2SetWindowPixmap; xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] Setup complete\n"); for (i = 0; i < ARRAY_SIZE(driverTypeNames); i++) { if (i < ds->numDrivers && ds->driverNames[i]) { xf86DrvMsg(pScreen->myNum, X_INFO, "[DRI2] %s driver: %s\n", driverTypeNames[i], ds->driverNames[i]); } } return TRUE; err_out: xf86DrvMsg(pScreen->myNum, X_WARNING, "[DRI2] Initialization failed for info version %d.\n", info->version); free(ds); return FALSE; } void DRI2CloseScreen(ScreenPtr pScreen) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); pScreen->ConfigNotify = ds->ConfigNotify; pScreen->SetWindowPixmap = ds->SetWindowPixmap; if (ds->prime_id) prime_id_allocate_bitmask &= ~(1 << ds->prime_id); free(ds->driverNames); free(ds); dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); } /* Called by InitExtensions() */ Bool DRI2ModuleSetup(void) { dri2DrawableRes = CreateNewResourceType(DRI2DrawableGone, "DRI2Drawable"); if (!dri2DrawableRes) return FALSE; return TRUE; } void DRI2Version(int *major, int *minor) { if (major != NULL) *major = 1; if (minor != NULL) *minor = 2; } int DRI2GetParam(ClientPtr client, DrawablePtr drawable, CARD64 param, BOOL *is_param_recognized, CARD64 *value) { DRI2ScreenPtr ds = DRI2GetScreen(drawable->pScreen); char high_byte = (param >> 24); switch (high_byte) { case 0: /* Parameter names whose high_byte is 0 are reserved for the X * server. The server currently recognizes no parameters. */ goto not_recognized; case 1: /* Parameter names whose high byte is 1 are reserved for the DDX. */ if (ds->GetParam) return ds->GetParam(client, drawable, param, is_param_recognized, value); else goto not_recognized; default: /* Other parameter names are reserved for future use. They are never * recognized. */ goto not_recognized; } not_recognized: *is_param_recognized = FALSE; return Success; } xorg-server-21.1.16/hw/xfree86/dri2/dri2ext.c0000644000175000017500000004521114757411105014130 /* * Copyright © 2008 Red Hat, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Soft- * ware"), to deal in the Software without restriction, including without * limitation the rights to use, copy, modify, merge, publish, distribute, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, provided that the above copyright * notice(s) and this permission notice appear in all copies of the Soft- * ware and that both the above copyright notice(s) and this permission * notice appear in supporting documentation. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- * QUENTIAL 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 PERFOR- * MANCE OF THIS SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall * not be used in advertising or otherwise to promote the sale, use or * other dealings in this Software without prior written authorization of * the copyright holder. * * Authors: * Kristian Høgsberg (krh@redhat.com) */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "dixstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "xfixes.h" #include "dri2.h" #include "dri2int.h" #include "protocol-versions.h" /* The only xf86 includes */ #include "xf86Module.h" #include "xf86Extensions.h" static int DRI2EventBase; static Bool validDrawable(ClientPtr client, XID drawable, Mask access_mode, DrawablePtr *pDrawable, int *status) { *status = dixLookupDrawable(pDrawable, drawable, client, M_DRAWABLE_WINDOW | M_DRAWABLE_PIXMAP, access_mode); if (*status != Success) { client->errorValue = drawable; return FALSE; } return TRUE; } static int ProcDRI2QueryVersion(ClientPtr client) { REQUEST(xDRI2QueryVersionReq); xDRI2QueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = dri2_major, .minorVersion = dri2_minor }; if (client->swapped) swaps(&stuff->length); REQUEST_SIZE_MATCH(xDRI2QueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep); return Success; } static int ProcDRI2Connect(ClientPtr client) { REQUEST(xDRI2ConnectReq); xDRI2ConnectReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .driverNameLength = 0, .deviceNameLength = 0 }; DrawablePtr pDraw; int fd, status; const char *driverName; const char *deviceName; REQUEST_SIZE_MATCH(xDRI2ConnectReq); if (!validDrawable(client, stuff->window, DixGetAttrAccess, &pDraw, &status)) return status; if (!DRI2Connect(client, pDraw->pScreen, stuff->driverType, &fd, &driverName, &deviceName)) goto fail; rep.driverNameLength = strlen(driverName); rep.deviceNameLength = strlen(deviceName); rep.length = (rep.driverNameLength + 3) / 4 + (rep.deviceNameLength + 3) / 4; fail: WriteToClient(client, sizeof(xDRI2ConnectReply), &rep); WriteToClient(client, rep.driverNameLength, driverName); WriteToClient(client, rep.deviceNameLength, deviceName); return Success; } static int ProcDRI2Authenticate(ClientPtr client) { REQUEST(xDRI2AuthenticateReq); xDRI2AuthenticateReply rep; DrawablePtr pDraw; int status; REQUEST_SIZE_MATCH(xDRI2AuthenticateReq); if (!validDrawable(client, stuff->window, DixGetAttrAccess, &pDraw, &status)) return status; rep = (xDRI2AuthenticateReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .authenticated = DRI2Authenticate(client, pDraw->pScreen, stuff->magic) }; WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep); return Success; } static void DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv, XID id) { ClientPtr client = priv; xDRI2InvalidateBuffers event = { .type = DRI2EventBase + DRI2_InvalidateBuffers, .drawable = id }; WriteEventsToClient(client, 1, (xEvent *) &event); } static int ProcDRI2CreateDrawable(ClientPtr client) { REQUEST(xDRI2CreateDrawableReq); DrawablePtr pDrawable; int status; REQUEST_SIZE_MATCH(xDRI2CreateDrawableReq); if (!validDrawable(client, stuff->drawable, DixAddAccess, &pDrawable, &status)) return status; status = DRI2CreateDrawable(client, pDrawable, stuff->drawable, DRI2InvalidateBuffersEvent, client); if (status != Success) return status; return Success; } static int ProcDRI2DestroyDrawable(ClientPtr client) { REQUEST(xDRI2DestroyDrawableReq); DrawablePtr pDrawable; int status; REQUEST_SIZE_MATCH(xDRI2DestroyDrawableReq); if (!validDrawable(client, stuff->drawable, DixRemoveAccess, &pDrawable, &status)) return status; return Success; } static int send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, DRI2BufferPtr * buffers, int count, int width, int height) { xDRI2GetBuffersReply rep; int skip = 0; int i; if (buffers == NULL) return BadAlloc; if (pDrawable->type == DRAWABLE_WINDOW) { for (i = 0; i < count; i++) { /* Do not send the real front buffer of a window to the client. */ if (buffers[i]->attachment == DRI2BufferFrontLeft) { skip++; continue; } } } rep = (xDRI2GetBuffersReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = (count - skip) * sizeof(xDRI2Buffer) / 4, .width = width, .height = height, .count = count - skip }; WriteToClient(client, sizeof(xDRI2GetBuffersReply), &rep); for (i = 0; i < count; i++) { xDRI2Buffer buffer; /* Do not send the real front buffer of a window to the client. */ if ((pDrawable->type == DRAWABLE_WINDOW) && (buffers[i]->attachment == DRI2BufferFrontLeft)) { continue; } buffer.attachment = buffers[i]->attachment; buffer.name = buffers[i]->name; buffer.pitch = buffers[i]->pitch; buffer.cpp = buffers[i]->cpp; buffer.flags = buffers[i]->flags; WriteToClient(client, sizeof(xDRI2Buffer), &buffer); } return Success; } static int ProcDRI2GetBuffers(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq); /* stuff->count is a count of CARD32 attachments that follows */ if (stuff->count > (INT_MAX / sizeof(CARD32))) return BadLength; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * sizeof(CARD32)); if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, &pDrawable, &status)) return status; if (DRI2ThrottleClient(client, pDrawable)) return Success; attachments = (unsigned int *) &stuff[1]; buffers = DRI2GetBuffers(pDrawable, &width, &height, attachments, stuff->count, &count); return send_buffers_reply(client, pDrawable, buffers, count, width, height); } static int ProcDRI2GetBuffersWithFormat(ClientPtr client) { REQUEST(xDRI2GetBuffersReq); DrawablePtr pDrawable; DRI2BufferPtr *buffers; int status, width, height, count; unsigned int *attachments; REQUEST_AT_LEAST_SIZE(xDRI2GetBuffersReq); /* stuff->count is a count of pairs of CARD32s (attachments & formats) that follows */ if (stuff->count > (INT_MAX / (2 * sizeof(CARD32)))) return BadLength; REQUEST_FIXED_SIZE(xDRI2GetBuffersReq, stuff->count * (2 * sizeof(CARD32))); if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, &pDrawable, &status)) return status; if (DRI2ThrottleClient(client, pDrawable)) return Success; attachments = (unsigned int *) &stuff[1]; buffers = DRI2GetBuffersWithFormat(pDrawable, &width, &height, attachments, stuff->count, &count); return send_buffers_reply(client, pDrawable, buffers, count, width, height); } static int ProcDRI2CopyRegion(ClientPtr client) { REQUEST(xDRI2CopyRegionReq); xDRI2CopyRegionReply rep; DrawablePtr pDrawable; int status; RegionPtr pRegion; REQUEST_SIZE_MATCH(xDRI2CopyRegionReq); if (!validDrawable(client, stuff->drawable, DixWriteAccess, &pDrawable, &status)) return status; VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); status = DRI2CopyRegion(pDrawable, pRegion, stuff->dest, stuff->src); if (status != Success) return status; /* CopyRegion needs to be a round trip to make sure the X server * queues the swap buffer rendering commands before the DRI client * continues rendering. The reply has a bitmask to signal the * presence of optional return values as well, but we're not using * that yet. */ rep = (xDRI2CopyRegionReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; WriteToClient(client, sizeof(xDRI2CopyRegionReply), &rep); return Success; } static void load_swap_reply(xDRI2SwapBuffersReply * rep, CARD64 sbc) { rep->swap_hi = sbc >> 32; rep->swap_lo = sbc & 0xffffffff; } static CARD64 vals_to_card64(CARD32 lo, CARD32 hi) { return (CARD64) hi << 32 | lo; } static void DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, CARD32 sbc) { DrawablePtr pDrawable = data; xDRI2BufferSwapComplete2 event = { .type = DRI2EventBase + DRI2_BufferSwapComplete, .event_type = type, .drawable = pDrawable->id, .ust_hi = (CARD64) ust >> 32, .ust_lo = ust & 0xffffffff, .msc_hi = (CARD64) msc >> 32, .msc_lo = msc & 0xffffffff, .sbc = sbc }; WriteEventsToClient(client, 1, (xEvent *) &event); } static int ProcDRI2SwapBuffers(ClientPtr client) { REQUEST(xDRI2SwapBuffersReq); xDRI2SwapBuffersReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DrawablePtr pDrawable; CARD64 target_msc, divisor, remainder, swap_target; int status; REQUEST_SIZE_MATCH(xDRI2SwapBuffersReq); if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, &pDrawable, &status)) return status; /* * Ensures an out of control client can't exhaust our swap queue, and * also orders swaps. */ if (DRI2ThrottleClient(client, pDrawable)) return Success; target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi); divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi); remainder = vals_to_card64(stuff->remainder_lo, stuff->remainder_hi); status = DRI2SwapBuffers(client, pDrawable, target_msc, divisor, remainder, &swap_target, DRI2SwapEvent, pDrawable); if (status != Success) return BadDrawable; load_swap_reply(&rep, swap_target); WriteToClient(client, sizeof(xDRI2SwapBuffersReply), &rep); return Success; } static void load_msc_reply(xDRI2MSCReply * rep, CARD64 ust, CARD64 msc, CARD64 sbc) { rep->ust_hi = ust >> 32; rep->ust_lo = ust & 0xffffffff; rep->msc_hi = msc >> 32; rep->msc_lo = msc & 0xffffffff; rep->sbc_hi = sbc >> 32; rep->sbc_lo = sbc & 0xffffffff; } static int ProcDRI2GetMSC(ClientPtr client) { REQUEST(xDRI2GetMSCReq); xDRI2MSCReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DrawablePtr pDrawable; CARD64 ust, msc, sbc; int status; REQUEST_SIZE_MATCH(xDRI2GetMSCReq); if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, &status)) return status; status = DRI2GetMSC(pDrawable, &ust, &msc, &sbc); if (status != Success) return status; load_msc_reply(&rep, ust, msc, sbc); WriteToClient(client, sizeof(xDRI2MSCReply), &rep); return Success; } static int ProcDRI2WaitMSC(ClientPtr client) { REQUEST(xDRI2WaitMSCReq); DrawablePtr pDrawable; CARD64 target, divisor, remainder; int status; /* FIXME: in restart case, client may be gone at this point */ REQUEST_SIZE_MATCH(xDRI2WaitMSCReq); if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, &status)) return status; target = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi); divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi); remainder = vals_to_card64(stuff->remainder_lo, stuff->remainder_hi); status = DRI2WaitMSC(client, pDrawable, target, divisor, remainder); if (status != Success) return status; return Success; } int ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust, CARD64 msc, CARD64 sbc) { xDRI2MSCReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; load_msc_reply(&rep, ust, msc, sbc); WriteToClient(client, sizeof(xDRI2MSCReply), &rep); return Success; } static int ProcDRI2SwapInterval(ClientPtr client) { REQUEST(xDRI2SwapIntervalReq); DrawablePtr pDrawable; int status; /* FIXME: in restart case, client may be gone at this point */ REQUEST_SIZE_MATCH(xDRI2SwapIntervalReq); if (!validDrawable(client, stuff->drawable, DixReadAccess | DixWriteAccess, &pDrawable, &status)) return status; DRI2SwapInterval(pDrawable, stuff->interval); return Success; } static int ProcDRI2WaitSBC(ClientPtr client) { REQUEST(xDRI2WaitSBCReq); DrawablePtr pDrawable; CARD64 target; int status; REQUEST_SIZE_MATCH(xDRI2WaitSBCReq); if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, &status)) return status; target = vals_to_card64(stuff->target_sbc_lo, stuff->target_sbc_hi); status = DRI2WaitSBC(client, pDrawable, target); return status; } static int ProcDRI2GetParam(ClientPtr client) { REQUEST(xDRI2GetParamReq); xDRI2GetParamReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; DrawablePtr pDrawable; CARD64 value; int status; REQUEST_SIZE_MATCH(xDRI2GetParamReq); if (!validDrawable(client, stuff->drawable, DixReadAccess, &pDrawable, &status)) return status; status = DRI2GetParam(client, pDrawable, stuff->param, &rep.is_param_recognized, &value); rep.value_hi = value >> 32; rep.value_lo = value & 0xffffffff; if (status != Success) return status; WriteToClient(client, sizeof(xDRI2GetParamReply), &rep); return status; } static int ProcDRI2Dispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_DRI2QueryVersion: return ProcDRI2QueryVersion(client); } if (!client->local) return BadRequest; switch (stuff->data) { case X_DRI2Connect: return ProcDRI2Connect(client); case X_DRI2Authenticate: return ProcDRI2Authenticate(client); case X_DRI2CreateDrawable: return ProcDRI2CreateDrawable(client); case X_DRI2DestroyDrawable: return ProcDRI2DestroyDrawable(client); case X_DRI2GetBuffers: return ProcDRI2GetBuffers(client); case X_DRI2CopyRegion: return ProcDRI2CopyRegion(client); case X_DRI2GetBuffersWithFormat: return ProcDRI2GetBuffersWithFormat(client); case X_DRI2SwapBuffers: return ProcDRI2SwapBuffers(client); case X_DRI2GetMSC: return ProcDRI2GetMSC(client); case X_DRI2WaitMSC: return ProcDRI2WaitMSC(client); case X_DRI2WaitSBC: return ProcDRI2WaitSBC(client); case X_DRI2SwapInterval: return ProcDRI2SwapInterval(client); case X_DRI2GetParam: return ProcDRI2GetParam(client); default: return BadRequest; } } static int _X_COLD SProcDRI2Connect(ClientPtr client) { REQUEST(xDRI2ConnectReq); xDRI2ConnectReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .driverNameLength = 0, .deviceNameLength = 0 }; /* If the client is swapped, it's not local. Talk to the hand. */ swaps(&stuff->length); if (sizeof(*stuff) / 4 != client->req_len) return BadLength; swaps(&rep.sequenceNumber); WriteToClient(client, sizeof(xDRI2ConnectReply), &rep); return Success; } static int _X_COLD SProcDRI2Dispatch(ClientPtr client) { REQUEST(xReq); /* * Only local clients are allowed DRI access, but remote clients * still need these requests to find out cleanly. */ switch (stuff->data) { case X_DRI2QueryVersion: return ProcDRI2QueryVersion(client); case X_DRI2Connect: return SProcDRI2Connect(client); default: return BadRequest; } } void DRI2ExtensionInit(void) { ExtensionEntry *dri2Extension; #ifdef PANORAMIX if (!noPanoramiXExtension) return; #endif dri2Extension = AddExtension(DRI2_NAME, DRI2NumberEvents, DRI2NumberErrors, ProcDRI2Dispatch, SProcDRI2Dispatch, NULL, StandardMinorOpcode); DRI2EventBase = dri2Extension->eventBase; DRI2ModuleSetup(); } xorg-server-21.1.16/hw/xfree86/dri2/dri2int.h0000644000175000017500000000232514757411105014126 /* * Copyright © 2011 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ extern Bool DRI2ModuleSetup(void); xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/0000755000175000017500000000000014757411135014075 5xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/Makefile.am0000644000175000017500000000034614757411105016051 EXTRA_DIST = \ pci_id_driver_map.h \ i810_pci_ids.h \ i915_pci_ids.h \ i965_pci_ids.h \ r200_pci_ids.h \ r300_pci_ids.h \ r600_pci_ids.h \ radeon_pci_ids.h \ radeonsi_pci_ids.h \ virtio_gpu_pci_ids.h \ vmwgfx_pci_ids.h xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/Makefile.in0000644000175000017500000004602614757411115016070 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/dri2/pci_ids ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ pci_id_driver_map.h \ i810_pci_ids.h \ i915_pci_ids.h \ i965_pci_ids.h \ r200_pci_ids.h \ r300_pci_ids.h \ r600_pci_ids.h \ radeon_pci_ids.h \ radeonsi_pci_ids.h \ virtio_gpu_pci_ids.h \ vmwgfx_pci_ids.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/dri2/pci_ids/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/dri2/pci_ids/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h0000644000175000017500000000415714757411105017631 #ifndef _PCI_ID_DRIVER_MAP_H_ #define _PCI_ID_DRIVER_MAP_H_ #include #ifndef ARRAY_SIZE #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) #endif static const int i915_chip_ids[] = { #define CHIPSET(chip, desc, name) chip, #include "pci_ids/i915_pci_ids.h" #undef CHIPSET }; static const int i965_chip_ids[] = { #define CHIPSET(chip, family, name) chip, #include "pci_ids/i965_pci_ids.h" #undef CHIPSET }; #ifndef DRIVER_MAP_GALLIUM_ONLY static const int r100_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/radeon_pci_ids.h" #undef CHIPSET }; static const int r200_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/r200_pci_ids.h" #undef CHIPSET }; #endif static const int r300_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/r300_pci_ids.h" #undef CHIPSET }; static const int r600_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/r600_pci_ids.h" #undef CHIPSET }; static const int virtio_gpu_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/virtio_gpu_pci_ids.h" #undef CHIPSET }; static const int vmwgfx_chip_ids[] = { #define CHIPSET(chip, name, family) chip, #include "pci_ids/vmwgfx_pci_ids.h" #undef CHIPSET }; static const struct { int vendor_id; const char *driver; const int *chip_ids; int num_chips_ids; } driver_map[] = { { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) }, { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) }, { 0x8086, "i965", NULL, -1 }, #ifndef DRIVER_MAP_GALLIUM_ONLY { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) }, { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) }, #endif { 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) }, { 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) }, { 0x1002, "radeonsi", NULL, -1 }, { 0x10de, "nouveau", NULL, -1 }, { 0x1af4, "virtio_gpu", virtio_gpu_chip_ids, ARRAY_SIZE(virtio_gpu_chip_ids) }, { 0x15ad, "vmwgfx", vmwgfx_chip_ids, ARRAY_SIZE(vmwgfx_chip_ids) }, { 0x0000, NULL, NULL, 0 }, }; #endif /* _PCI_ID_DRIVER_MAP_H_ */ xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/i810_pci_ids.h0000644000175000017500000000017014757411105016334 CHIPSET(0x7121, I810, i8xx) CHIPSET(0x7123, I810_DC100, i8xx) CHIPSET(0x7125, I810_E, i8xx) CHIPSET(0x1132, I815, i8xx) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/i915_pci_ids.h0000644000175000017500000000124014757411105016341 CHIPSET(0x3577, I830_M, "Intel(R) 830M") CHIPSET(0x2562, 845_G, "Intel(R) 845G") CHIPSET(0x3582, I855_GM, "Intel(R) 852GM/855GM") CHIPSET(0x2572, I865_G, "Intel(R) 865G") CHIPSET(0x2582, I915_G, "Intel(R) 915G") CHIPSET(0x258A, E7221_G, "Intel(R) E7221G (i915)") CHIPSET(0x2592, I915_GM, "Intel(R) 915GM") CHIPSET(0x2772, I945_G, "Intel(R) 945G") CHIPSET(0x27A2, I945_GM, "Intel(R) 945GM") CHIPSET(0x27AE, I945_GME, "Intel(R) 945GME") CHIPSET(0x29B2, Q35_G, "Intel(R) Q35") CHIPSET(0x29C2, G33_G, "Intel(R) G33") CHIPSET(0x29D2, Q33_G, "Intel(R) Q33") CHIPSET(0xA011, PNV_GM, "Intel(R) Pineview M") CHIPSET(0xA001, PNV_G, "Intel(R) Pineview") xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/i965_pci_ids.h0000644000175000017500000003541114757411105016355 #ifndef IRIS CHIPSET(0x29A2, i965, "Intel(R) 965G") CHIPSET(0x2992, i965, "Intel(R) 965Q") CHIPSET(0x2982, i965, "Intel(R) 965G") CHIPSET(0x2972, i965, "Intel(R) 946GZ") CHIPSET(0x2A02, i965, "Intel(R) 965GM") CHIPSET(0x2A12, i965, "Intel(R) 965GME/GLE") CHIPSET(0x2A42, g4x, "Mobile Intel® GM45 Express Chipset") CHIPSET(0x2E02, g4x, "Intel(R) Integrated Graphics Device") CHIPSET(0x2E12, g4x, "Intel(R) Q45/Q43") CHIPSET(0x2E22, g4x, "Intel(R) G45/G43") CHIPSET(0x2E32, g4x, "Intel(R) G41") CHIPSET(0x2E42, g4x, "Intel(R) B43") CHIPSET(0x2E92, g4x, "Intel(R) B43") CHIPSET(0x0042, ilk, "Intel(R) Ironlake Desktop") CHIPSET(0x0046, ilk, "Intel(R) Ironlake Mobile") CHIPSET(0x0102, snb_gt1, "Intel(R) Sandybridge Desktop") CHIPSET(0x0112, snb_gt2, "Intel(R) Sandybridge Desktop") CHIPSET(0x0122, snb_gt2, "Intel(R) Sandybridge Desktop") CHIPSET(0x0106, snb_gt1, "Intel(R) Sandybridge Mobile") CHIPSET(0x0116, snb_gt2, "Intel(R) Sandybridge Mobile") CHIPSET(0x0126, snb_gt2, "Intel(R) Sandybridge Mobile") CHIPSET(0x010A, snb_gt1, "Intel(R) Sandybridge Server") CHIPSET(0x0152, ivb_gt1, "Intel(R) Ivybridge Desktop") CHIPSET(0x0162, ivb_gt2, "Intel(R) Ivybridge Desktop") CHIPSET(0x0156, ivb_gt1, "Intel(R) Ivybridge Mobile") CHIPSET(0x0166, ivb_gt2, "Intel(R) Ivybridge Mobile") CHIPSET(0x015a, ivb_gt1, "Intel(R) Ivybridge Server") CHIPSET(0x016a, ivb_gt2, "Intel(R) Ivybridge Server") CHIPSET(0x0402, hsw_gt1, "Intel(R) Haswell Desktop") CHIPSET(0x0412, hsw_gt2, "Intel(R) Haswell Desktop") CHIPSET(0x0422, hsw_gt3, "Intel(R) Haswell Desktop") CHIPSET(0x0406, hsw_gt1, "Intel(R) Haswell Mobile") CHIPSET(0x0416, hsw_gt2, "Intel(R) Haswell Mobile") CHIPSET(0x0426, hsw_gt3, "Intel(R) Haswell Mobile") CHIPSET(0x040A, hsw_gt1, "Intel(R) Haswell Server") CHIPSET(0x041A, hsw_gt2, "Intel(R) Haswell Server") CHIPSET(0x042A, hsw_gt3, "Intel(R) Haswell Server") CHIPSET(0x040B, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x041B, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x042B, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x040E, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x041E, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x042E, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0C02, hsw_gt1, "Intel(R) Haswell Desktop") CHIPSET(0x0C12, hsw_gt2, "Intel(R) Haswell Desktop") CHIPSET(0x0C22, hsw_gt3, "Intel(R) Haswell Desktop") CHIPSET(0x0C06, hsw_gt1, "Intel(R) Haswell Mobile") CHIPSET(0x0C16, hsw_gt2, "Intel(R) Haswell Mobile") CHIPSET(0x0C26, hsw_gt3, "Intel(R) Haswell Mobile") CHIPSET(0x0C0A, hsw_gt1, "Intel(R) Haswell Server") CHIPSET(0x0C1A, hsw_gt2, "Intel(R) Haswell Server") CHIPSET(0x0C2A, hsw_gt3, "Intel(R) Haswell Server") CHIPSET(0x0C0B, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0C1B, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0C2B, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0C0E, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0C1E, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0C2E, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0A02, hsw_gt1, "Intel(R) Haswell Desktop") CHIPSET(0x0A12, hsw_gt2, "Intel(R) Haswell Desktop") CHIPSET(0x0A22, hsw_gt3, "Intel(R) Haswell Desktop") CHIPSET(0x0A06, hsw_gt1, "Intel(R) Haswell Mobile") CHIPSET(0x0A16, hsw_gt2, "Intel(R) Haswell Mobile") CHIPSET(0x0A26, hsw_gt3, "Intel(R) Haswell Mobile") CHIPSET(0x0A0A, hsw_gt1, "Intel(R) Haswell Server") CHIPSET(0x0A1A, hsw_gt2, "Intel(R) Haswell Server") CHIPSET(0x0A2A, hsw_gt3, "Intel(R) Haswell Server") CHIPSET(0x0A0B, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0A1B, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0A2B, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0A0E, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0A1E, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0A2E, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0D02, hsw_gt1, "Intel(R) Haswell Desktop") CHIPSET(0x0D12, hsw_gt2, "Intel(R) Haswell Desktop") CHIPSET(0x0D22, hsw_gt3, "Intel(R) Haswell Desktop") CHIPSET(0x0D06, hsw_gt1, "Intel(R) Haswell Mobile") CHIPSET(0x0D16, hsw_gt2, "Intel(R) Haswell Mobile") CHIPSET(0x0D26, hsw_gt3, "Intel(R) Haswell Mobile") CHIPSET(0x0D0A, hsw_gt1, "Intel(R) Haswell Server") CHIPSET(0x0D1A, hsw_gt2, "Intel(R) Haswell Server") CHIPSET(0x0D2A, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0D0B, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0D1B, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0D2B, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0D0E, hsw_gt1, "Intel(R) Haswell") CHIPSET(0x0D1E, hsw_gt2, "Intel(R) Haswell") CHIPSET(0x0D2E, hsw_gt3, "Intel(R) Haswell") CHIPSET(0x0F31, byt, "Intel(R) Bay Trail") CHIPSET(0x0F32, byt, "Intel(R) Bay Trail") CHIPSET(0x0F33, byt, "Intel(R) Bay Trail") CHIPSET(0x0157, byt, "Intel(R) Bay Trail") CHIPSET(0x0155, byt, "Intel(R) Bay Trail") CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)") CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */ CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)") CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)") #endif CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell GT1") CHIPSET(0x1612, bdw_gt2, "Intel(R) HD Graphics 5600 (Broadwell GT2)") CHIPSET(0x1616, bdw_gt2, "Intel(R) HD Graphics 5500 (Broadwell GT2)") CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell GT2") CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell GT2") CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell GT2") CHIPSET(0x161E, bdw_gt2, "Intel(R) HD Graphics 5300 (Broadwell GT2)") CHIPSET(0x1622, bdw_gt3, "Intel(R) Iris Pro 6200 (Broadwell GT3e)") CHIPSET(0x1626, bdw_gt3, "Intel(R) HD Graphics 6000 (Broadwell GT3)") CHIPSET(0x162A, bdw_gt3, "Intel(R) Iris Pro P6300 (Broadwell GT3e)") CHIPSET(0x162B, bdw_gt3, "Intel(R) Iris 6100 (Broadwell GT3)") CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell GT3") CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3") CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1") CHIPSET(0x190B, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)") CHIPSET(0x190E, skl_gt1, "Intel(R) Skylake GT1") CHIPSET(0x1912, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)") CHIPSET(0x1913, skl_gt2, "Intel(R) Skylake GT2f") CHIPSET(0x1915, skl_gt2, "Intel(R) Skylake GT2f") CHIPSET(0x1916, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)") CHIPSET(0x1917, skl_gt2, "Intel(R) Skylake GT2f") CHIPSET(0x191A, skl_gt2, "Intel(R) Skylake GT2") CHIPSET(0x191B, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)") CHIPSET(0x191D, skl_gt2, "Intel(R) HD Graphics P530 (Skylake GT2)") CHIPSET(0x191E, skl_gt2, "Intel(R) HD Graphics 515 (Skylake GT2)") CHIPSET(0x1921, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)") CHIPSET(0x1923, skl_gt3, "Intel(R) Skylake GT3e") CHIPSET(0x1926, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)") CHIPSET(0x1927, skl_gt3, "Intel(R) Iris Graphics 550 (Skylake GT3e)") CHIPSET(0x192A, skl_gt4, "Intel(R) Skylake GT4") CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics 555 (Skylake GT3e)") CHIPSET(0x192D, skl_gt3, "Intel(R) Iris Graphics P555 (Skylake GT3e)") CHIPSET(0x1932, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)") CHIPSET(0x193A, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)") CHIPSET(0x193B, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)") CHIPSET(0x193D, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)") CHIPSET(0x0A84, bxt, "Intel(R) HD Graphics (Broxton)") CHIPSET(0x1A84, bxt, "Intel(R) HD Graphics (Broxton)") CHIPSET(0x1A85, bxt_2x6, "Intel(R) HD Graphics (Broxton 2x6)") CHIPSET(0x5A84, bxt, "Intel(R) HD Graphics 505 (Broxton)") CHIPSET(0x5A85, bxt_2x6, "Intel(R) HD Graphics 500 (Broxton 2x6)") CHIPSET(0x5902, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)") CHIPSET(0x5906, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)") CHIPSET(0x590A, kbl_gt1, "Intel(R) Kabylake GT1") CHIPSET(0x5908, kbl_gt1, "Intel(R) Kabylake GT1") CHIPSET(0x590B, kbl_gt1, "Intel(R) Kabylake GT1") CHIPSET(0x590E, kbl_gt1, "Intel(R) Kabylake GT1") CHIPSET(0x5913, kbl_gt1_5, "Intel(R) Kabylake GT1.5") CHIPSET(0x5915, kbl_gt1_5, "Intel(R) Kabylake GT1.5") CHIPSET(0x5917, kbl_gt2, "Intel(R) UHD Graphics 620 (Kabylake GT2)") CHIPSET(0x5912, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)") CHIPSET(0x5916, kbl_gt2, "Intel(R) HD Graphics 620 (Kaby Lake GT2)") CHIPSET(0x591A, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)") CHIPSET(0x591B, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)") CHIPSET(0x591D, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)") CHIPSET(0x591E, kbl_gt2, "Intel(R) HD Graphics 615 (Kaby Lake GT2)") CHIPSET(0x5921, kbl_gt2, "Intel(R) Kabylake GT2F") CHIPSET(0x5923, kbl_gt3, "Intel(R) Kabylake GT3") CHIPSET(0x5926, kbl_gt3, "Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)") CHIPSET(0x5927, kbl_gt3, "Intel(R) Iris Plus Graphics 650 (Kaby Lake GT3e)") CHIPSET(0x593B, kbl_gt4, "Intel(R) Kabylake GT4") CHIPSET(0x591C, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2") CHIPSET(0x87C0, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2") CHIPSET(0x87CA, cfl_gt2, "Intel(R) Amber Lake (Coffeelake) GT2") CHIPSET(0x3184, glk, "Intel(R) UHD Graphics 605 (Geminilake)") CHIPSET(0x3185, glk_2x6, "Intel(R) UHD Graphics 600 (Geminilake 2x6)") CHIPSET(0x3E90, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)") CHIPSET(0x3E93, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)") CHIPSET(0x3E99, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)") CHIPSET(0x3E9C, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)") CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") CHIPSET(0x3E98, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)") CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") CHIPSET(0x3EA9, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)") CHIPSET(0x3EA5, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") CHIPSET(0x3EA6, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") CHIPSET(0x3EA7, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") CHIPSET(0x3EA8, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)") CHIPSET(0x3EA1, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 2x6 GT1)") CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT1)") CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)") CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)") CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT3)") CHIPSET(0x9B21, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BA0, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BA2, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BA4, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BA5, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BA8, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BAA, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BAB, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9BAC, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)") CHIPSET(0x9B41, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BC0, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BC2, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BC4, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BC5, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BC8, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BCA, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BCB, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x9BCC, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)") CHIPSET(0x5A49, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)") CHIPSET(0x5A4A, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)") CHIPSET(0x5A41, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") CHIPSET(0x5A42, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") CHIPSET(0x5A44, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)") CHIPSET(0x5A59, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") CHIPSET(0x5A5A, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") CHIPSET(0x5A5C, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)") CHIPSET(0x5A50, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") CHIPSET(0x5A51, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") CHIPSET(0x5A52, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") CHIPSET(0x5A54, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)") CHIPSET(0x8A50, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") CHIPSET(0x8A51, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") CHIPSET(0x8A52, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") CHIPSET(0x8A53, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)") CHIPSET(0x8A54, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") CHIPSET(0x8A56, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") CHIPSET(0x8A57, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") CHIPSET(0x8A58, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") CHIPSET(0x8A59, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") CHIPSET(0x8A5A, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") CHIPSET(0x8A5B, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") CHIPSET(0x8A5C, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)") CHIPSET(0x8A5D, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)") CHIPSET(0x8A71, icl_1x8, "Intel(R) HD Graphics (Ice Lake 1x8 GT0.5)") CHIPSET(0x4500, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)") CHIPSET(0x4571, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)") CHIPSET(0x4551, ehl_4x4, "Intel(R) HD Graphics (Elkhart Lake 4x4)") CHIPSET(0x4541, ehl_2x4, "Intel(R) HD Graphics (Elkhart Lake 2x4)") CHIPSET(0x9A40, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)") CHIPSET(0x9A49, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)") CHIPSET(0x9A59, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)") CHIPSET(0x9A60, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)") CHIPSET(0x9A68, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)") CHIPSET(0x9A70, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)") CHIPSET(0x9A78, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)") CHIPSET(0x9AC0, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)") CHIPSET(0x9AC9, tg1_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)") CHIPSET(0x9AD9, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)") CHIPSET(0x9AF8, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1X2X16 GT2)") xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/r200_pci_ids.h0000644000175000017500000000131014757411105016333 CHIPSET(0x5148, R200_QH, R200) CHIPSET(0x514C, R200_QL, R200) CHIPSET(0x514D, R200_QM, R200) CHIPSET(0x4242, R200_BB, R200) CHIPSET(0x4966, RV250_If, RV250) CHIPSET(0x4967, RV250_Ig, RV250) CHIPSET(0x4C64, RV250_Ld, RV250) CHIPSET(0x4C66, RV250_Lf, RV250) CHIPSET(0x4C67, RV250_Lg, RV250) CHIPSET(0x4C6E, RV280_4C6E, RV280) CHIPSET(0x5960, RV280_5960, RV280) CHIPSET(0x5961, RV280_5961, RV280) CHIPSET(0x5962, RV280_5962, RV280) CHIPSET(0x5964, RV280_5964, RV280) CHIPSET(0x5965, RV280_5965, RV280) CHIPSET(0x5C61, RV280_5C61, RV280) CHIPSET(0x5C63, RV280_5C63, RV280) CHIPSET(0x5834, RS300_5834, RS300) CHIPSET(0x5835, RS300_5835, RS300) CHIPSET(0x7834, RS350_7834, RS300) CHIPSET(0x7835, RS350_7835, RS300) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/r300_pci_ids.h0000644000175000017500000001543514757411105016351 CHIPSET(0x4144, R300_AD, R300) CHIPSET(0x4145, R300_AE, R300) CHIPSET(0x4146, R300_AF, R300) CHIPSET(0x4147, R300_AG, R300) CHIPSET(0x4E44, R300_ND, R300) CHIPSET(0x4E45, R300_NE, R300) CHIPSET(0x4E46, R300_NF, R300) CHIPSET(0x4E47, R300_NG, R300) CHIPSET(0x4E48, R350_NH, R350) CHIPSET(0x4E49, R350_NI, R350) CHIPSET(0x4E4B, R350_NK, R350) CHIPSET(0x4148, R350_AH, R350) CHIPSET(0x4149, R350_AI, R350) CHIPSET(0x414A, R350_AJ, R350) CHIPSET(0x414B, R350_AK, R350) CHIPSET(0x4E4A, R360_NJ, R350) CHIPSET(0x4150, RV350_AP, RV350) CHIPSET(0x4151, RV350_AQ, RV350) CHIPSET(0x4152, RV350_AR, RV350) CHIPSET(0x4153, RV350_AS, RV350) CHIPSET(0x4154, RV350_AT, RV350) CHIPSET(0x4155, RV350_AU, RV350) CHIPSET(0x4156, RV350_AV, RV350) CHIPSET(0x4E50, RV350_NP, RV350) CHIPSET(0x4E51, RV350_NQ, RV350) CHIPSET(0x4E52, RV350_NR, RV350) CHIPSET(0x4E53, RV350_NS, RV350) CHIPSET(0x4E54, RV350_NT, RV350) CHIPSET(0x4E56, RV350_NV, RV350) CHIPSET(0x5460, RV370_5460, RV370) CHIPSET(0x5462, RV370_5462, RV370) CHIPSET(0x5464, RV370_5464, RV370) CHIPSET(0x5B60, RV370_5B60, RV370) CHIPSET(0x5B62, RV370_5B62, RV370) CHIPSET(0x5B63, RV370_5B63, RV370) CHIPSET(0x5B64, RV370_5B64, RV370) CHIPSET(0x5B65, RV370_5B65, RV370) CHIPSET(0x3150, RV380_3150, RV380) CHIPSET(0x3151, RV380_3151, RV380) CHIPSET(0x3152, RV380_3152, RV380) CHIPSET(0x3154, RV380_3154, RV380) CHIPSET(0x3155, RV380_3155, RV380) CHIPSET(0x3E50, RV380_3E50, RV380) CHIPSET(0x3E54, RV380_3E54, RV380) CHIPSET(0x4A48, R420_JH, R420) CHIPSET(0x4A49, R420_JI, R420) CHIPSET(0x4A4A, R420_JJ, R420) CHIPSET(0x4A4B, R420_JK, R420) CHIPSET(0x4A4C, R420_JL, R420) CHIPSET(0x4A4D, R420_JM, R420) CHIPSET(0x4A4E, R420_JN, R420) CHIPSET(0x4A4F, R420_JO, R420) CHIPSET(0x4A50, R420_JP, R420) CHIPSET(0x4A54, R420_JT, R420) CHIPSET(0x5548, R423_UH, R423) CHIPSET(0x5549, R423_UI, R423) CHIPSET(0x554A, R423_UJ, R423) CHIPSET(0x554B, R423_UK, R423) CHIPSET(0x5550, R423_5550, R423) CHIPSET(0x5551, R423_UQ, R423) CHIPSET(0x5552, R423_UR, R423) CHIPSET(0x5554, R423_UT, R423) CHIPSET(0x5D57, R423_5D57, R423) CHIPSET(0x554C, R430_554C, R430) CHIPSET(0x554D, R430_554D, R430) CHIPSET(0x554E, R430_554E, R430) CHIPSET(0x554F, R430_554F, R430) CHIPSET(0x5D48, R430_5D48, R430) CHIPSET(0x5D49, R430_5D49, R430) CHIPSET(0x5D4A, R430_5D4A, R430) CHIPSET(0x5D4C, R480_5D4C, R480) CHIPSET(0x5D4D, R480_5D4D, R480) CHIPSET(0x5D4E, R480_5D4E, R480) CHIPSET(0x5D4F, R480_5D4F, R480) CHIPSET(0x5D50, R480_5D50, R480) CHIPSET(0x5D52, R480_5D52, R480) CHIPSET(0x4B48, R481_4B48, R481) CHIPSET(0x4B49, R481_4B49, R481) CHIPSET(0x4B4A, R481_4B4A, R481) CHIPSET(0x4B4B, R481_4B4B, R481) CHIPSET(0x4B4C, R481_4B4C, R481) CHIPSET(0x564A, RV410_564A, RV410) CHIPSET(0x564B, RV410_564B, RV410) CHIPSET(0x564F, RV410_564F, RV410) CHIPSET(0x5652, RV410_5652, RV410) CHIPSET(0x5653, RV410_5653, RV410) CHIPSET(0x5657, RV410_5657, RV410) CHIPSET(0x5E48, RV410_5E48, RV410) CHIPSET(0x5E4A, RV410_5E4A, RV410) CHIPSET(0x5E4B, RV410_5E4B, RV410) CHIPSET(0x5E4C, RV410_5E4C, RV410) CHIPSET(0x5E4D, RV410_5E4D, RV410) CHIPSET(0x5E4F, RV410_5E4F, RV410) CHIPSET(0x5A41, RS400_5A41, RS400) CHIPSET(0x5A42, RS400_5A42, RS400) CHIPSET(0x5A61, RC410_5A61, RC410) CHIPSET(0x5A62, RC410_5A62, RC410) CHIPSET(0x5954, RS480_5954, RS480) CHIPSET(0x5955, RS480_5955, RS480) CHIPSET(0x5974, RS482_5974, RS480) CHIPSET(0x5975, RS482_5975, RS480) CHIPSET(0x7100, R520_7100, R520) CHIPSET(0x7101, R520_7101, R520) CHIPSET(0x7102, R520_7102, R520) CHIPSET(0x7103, R520_7103, R520) CHIPSET(0x7104, R520_7104, R520) CHIPSET(0x7105, R520_7105, R520) CHIPSET(0x7106, R520_7106, R520) CHIPSET(0x7108, R520_7108, R520) CHIPSET(0x7109, R520_7109, R520) CHIPSET(0x710A, R520_710A, R520) CHIPSET(0x710B, R520_710B, R520) CHIPSET(0x710C, R520_710C, R520) CHIPSET(0x710E, R520_710E, R520) CHIPSET(0x710F, R520_710F, R520) CHIPSET(0x7140, RV515_7140, RV515) CHIPSET(0x7141, RV515_7141, RV515) CHIPSET(0x7142, RV515_7142, RV515) CHIPSET(0x7143, RV515_7143, RV515) CHIPSET(0x7144, RV515_7144, RV515) CHIPSET(0x7145, RV515_7145, RV515) CHIPSET(0x7146, RV515_7146, RV515) CHIPSET(0x7147, RV515_7147, RV515) CHIPSET(0x7149, RV515_7149, RV515) CHIPSET(0x714A, RV515_714A, RV515) CHIPSET(0x714B, RV515_714B, RV515) CHIPSET(0x714C, RV515_714C, RV515) CHIPSET(0x714D, RV515_714D, RV515) CHIPSET(0x714E, RV515_714E, RV515) CHIPSET(0x714F, RV515_714F, RV515) CHIPSET(0x7151, RV515_7151, RV515) CHIPSET(0x7152, RV515_7152, RV515) CHIPSET(0x7153, RV515_7153, RV515) CHIPSET(0x715E, RV515_715E, RV515) CHIPSET(0x715F, RV515_715F, RV515) CHIPSET(0x7180, RV515_7180, RV515) CHIPSET(0x7181, RV515_7181, RV515) CHIPSET(0x7183, RV515_7183, RV515) CHIPSET(0x7186, RV515_7186, RV515) CHIPSET(0x7187, RV515_7187, RV515) CHIPSET(0x7188, RV515_7188, RV515) CHIPSET(0x718A, RV515_718A, RV515) CHIPSET(0x718B, RV515_718B, RV515) CHIPSET(0x718C, RV515_718C, RV515) CHIPSET(0x718D, RV515_718D, RV515) CHIPSET(0x718F, RV515_718F, RV515) CHIPSET(0x7193, RV515_7193, RV515) CHIPSET(0x7196, RV515_7196, RV515) CHIPSET(0x719B, RV515_719B, RV515) CHIPSET(0x719F, RV515_719F, RV515) CHIPSET(0x7200, RV515_7200, RV515) CHIPSET(0x7210, RV515_7210, RV515) CHIPSET(0x7211, RV515_7211, RV515) CHIPSET(0x71C0, RV530_71C0, RV530) CHIPSET(0x71C1, RV530_71C1, RV530) CHIPSET(0x71C2, RV530_71C2, RV530) CHIPSET(0x71C3, RV530_71C3, RV530) CHIPSET(0x71C4, RV530_71C4, RV530) CHIPSET(0x71C5, RV530_71C5, RV530) CHIPSET(0x71C6, RV530_71C6, RV530) CHIPSET(0x71C7, RV530_71C7, RV530) CHIPSET(0x71CD, RV530_71CD, RV530) CHIPSET(0x71CE, RV530_71CE, RV530) CHIPSET(0x71D2, RV530_71D2, RV530) CHIPSET(0x71D4, RV530_71D4, RV530) CHIPSET(0x71D5, RV530_71D5, RV530) CHIPSET(0x71D6, RV530_71D6, RV530) CHIPSET(0x71DA, RV530_71DA, RV530) CHIPSET(0x71DE, RV530_71DE, RV530) CHIPSET(0x7281, RV560_7281, RV560) CHIPSET(0x7283, RV560_7283, RV560) CHIPSET(0x7287, RV560_7287, RV560) CHIPSET(0x7290, RV560_7290, RV560) CHIPSET(0x7291, RV560_7291, RV560) CHIPSET(0x7293, RV560_7293, RV560) CHIPSET(0x7297, RV560_7297, RV560) CHIPSET(0x7280, RV570_7280, RV570) CHIPSET(0x7288, RV570_7288, RV570) CHIPSET(0x7289, RV570_7289, RV570) CHIPSET(0x728B, RV570_728B, RV570) CHIPSET(0x728C, RV570_728C, RV570) CHIPSET(0x7240, R580_7240, R580) CHIPSET(0x7243, R580_7243, R580) CHIPSET(0x7244, R580_7244, R580) CHIPSET(0x7245, R580_7245, R580) CHIPSET(0x7246, R580_7246, R580) CHIPSET(0x7247, R580_7247, R580) CHIPSET(0x7248, R580_7248, R580) CHIPSET(0x7249, R580_7249, R580) CHIPSET(0x724A, R580_724A, R580) CHIPSET(0x724B, R580_724B, R580) CHIPSET(0x724C, R580_724C, R580) CHIPSET(0x724D, R580_724D, R580) CHIPSET(0x724E, R580_724E, R580) CHIPSET(0x724F, R580_724F, R580) CHIPSET(0x7284, R580_7284, R580) CHIPSET(0x793F, RS600_793F, RS600) CHIPSET(0x7941, RS600_7941, RS600) CHIPSET(0x7942, RS600_7942, RS600) CHIPSET(0x791E, RS690_791E, RS690) CHIPSET(0x791F, RS690_791F, RS690) CHIPSET(0x796C, RS740_796C, RS740) CHIPSET(0x796D, RS740_796D, RS740) CHIPSET(0x796E, RS740_796E, RS740) CHIPSET(0x796F, RS740_796F, RS740) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/r600_pci_ids.h0000644000175000017500000002506414757411105016353 CHIPSET(0x9400, R600_9400, R600) CHIPSET(0x9401, R600_9401, R600) CHIPSET(0x9402, R600_9402, R600) CHIPSET(0x9403, R600_9403, R600) CHIPSET(0x9405, R600_9405, R600) CHIPSET(0x940A, R600_940A, R600) CHIPSET(0x940B, R600_940B, R600) CHIPSET(0x940F, R600_940F, R600) CHIPSET(0x94C0, RV610_94C0, RV610) CHIPSET(0x94C1, RV610_94C1, RV610) CHIPSET(0x94C3, RV610_94C3, RV610) CHIPSET(0x94C4, RV610_94C4, RV610) CHIPSET(0x94C5, RV610_94C5, RV610) CHIPSET(0x94C6, RV610_94C6, RV610) CHIPSET(0x94C7, RV610_94C7, RV610) CHIPSET(0x94C8, RV610_94C8, RV610) CHIPSET(0x94C9, RV610_94C9, RV610) CHIPSET(0x94CB, RV610_94CB, RV610) CHIPSET(0x94CC, RV610_94CC, RV610) CHIPSET(0x94CD, RV610_94CD, RV610) CHIPSET(0x9580, RV630_9580, RV630) CHIPSET(0x9581, RV630_9581, RV630) CHIPSET(0x9583, RV630_9583, RV630) CHIPSET(0x9586, RV630_9586, RV630) CHIPSET(0x9587, RV630_9587, RV630) CHIPSET(0x9588, RV630_9588, RV630) CHIPSET(0x9589, RV630_9589, RV630) CHIPSET(0x958A, RV630_958A, RV630) CHIPSET(0x958B, RV630_958B, RV630) CHIPSET(0x958C, RV630_958C, RV630) CHIPSET(0x958D, RV630_958D, RV630) CHIPSET(0x958E, RV630_958E, RV630) CHIPSET(0x958F, RV630_958F, RV630) CHIPSET(0x9500, RV670_9500, RV670) CHIPSET(0x9501, RV670_9501, RV670) CHIPSET(0x9504, RV670_9504, RV670) CHIPSET(0x9505, RV670_9505, RV670) CHIPSET(0x9506, RV670_9506, RV670) CHIPSET(0x9507, RV670_9507, RV670) CHIPSET(0x9508, RV670_9508, RV670) CHIPSET(0x9509, RV670_9509, RV670) CHIPSET(0x950F, RV670_950F, RV670) CHIPSET(0x9511, RV670_9511, RV670) CHIPSET(0x9515, RV670_9515, RV670) CHIPSET(0x9517, RV670_9517, RV670) CHIPSET(0x9519, RV670_9519, RV670) CHIPSET(0x95C0, RV620_95C0, RV620) CHIPSET(0x95C2, RV620_95C2, RV620) CHIPSET(0x95C4, RV620_95C4, RV620) CHIPSET(0x95C5, RV620_95C5, RV620) CHIPSET(0x95C6, RV620_95C6, RV620) CHIPSET(0x95C7, RV620_95C7, RV620) CHIPSET(0x95C9, RV620_95C9, RV620) CHIPSET(0x95CC, RV620_95CC, RV620) CHIPSET(0x95CD, RV620_95CD, RV620) CHIPSET(0x95CE, RV620_95CE, RV620) CHIPSET(0x95CF, RV620_95CF, RV620) CHIPSET(0x9590, RV635_9590, RV635) CHIPSET(0x9591, RV635_9591, RV635) CHIPSET(0x9593, RV635_9593, RV635) CHIPSET(0x9595, RV635_9595, RV635) CHIPSET(0x9596, RV635_9596, RV635) CHIPSET(0x9597, RV635_9597, RV635) CHIPSET(0x9598, RV635_9598, RV635) CHIPSET(0x9599, RV635_9599, RV635) CHIPSET(0x959B, RV635_959B, RV635) CHIPSET(0x9610, RS780_9610, RS780) CHIPSET(0x9611, RS780_9611, RS780) CHIPSET(0x9612, RS780_9612, RS780) CHIPSET(0x9613, RS780_9613, RS780) CHIPSET(0x9614, RS780_9614, RS780) CHIPSET(0x9615, RS780_9615, RS780) CHIPSET(0x9616, RS780_9616, RS780) CHIPSET(0x9710, RS880_9710, RS880) CHIPSET(0x9711, RS880_9711, RS880) CHIPSET(0x9712, RS880_9712, RS880) CHIPSET(0x9713, RS880_9713, RS880) CHIPSET(0x9714, RS880_9714, RS880) CHIPSET(0x9715, RS880_9715, RS880) CHIPSET(0x9440, RV770_9440, RV770) CHIPSET(0x9441, RV770_9441, RV770) CHIPSET(0x9442, RV770_9442, RV770) CHIPSET(0x9443, RV770_9443, RV770) CHIPSET(0x9444, RV770_9444, RV770) CHIPSET(0x9446, RV770_9446, RV770) CHIPSET(0x944A, RV770_944A, RV770) CHIPSET(0x944B, RV770_944B, RV770) CHIPSET(0x944C, RV770_944C, RV770) CHIPSET(0x944E, RV770_944E, RV770) CHIPSET(0x9450, RV770_9450, RV770) CHIPSET(0x9452, RV770_9452, RV770) CHIPSET(0x9456, RV770_9456, RV770) CHIPSET(0x945A, RV770_945A, RV770) CHIPSET(0x945B, RV770_945B, RV770) CHIPSET(0x945E, RV770_945E, RV770) CHIPSET(0x9460, RV790_9460, RV770) CHIPSET(0x9462, RV790_9462, RV770) CHIPSET(0x946A, RV770_946A, RV770) CHIPSET(0x946B, RV770_946B, RV770) CHIPSET(0x947A, RV770_947A, RV770) CHIPSET(0x947B, RV770_947B, RV770) CHIPSET(0x9480, RV730_9480, RV730) CHIPSET(0x9487, RV730_9487, RV730) CHIPSET(0x9488, RV730_9488, RV730) CHIPSET(0x9489, RV730_9489, RV730) CHIPSET(0x948A, RV730_948A, RV730) CHIPSET(0x948F, RV730_948F, RV730) CHIPSET(0x9490, RV730_9490, RV730) CHIPSET(0x9491, RV730_9491, RV730) CHIPSET(0x9495, RV730_9495, RV730) CHIPSET(0x9498, RV730_9498, RV730) CHIPSET(0x949C, RV730_949C, RV730) CHIPSET(0x949E, RV730_949E, RV730) CHIPSET(0x949F, RV730_949F, RV730) CHIPSET(0x9540, RV710_9540, RV710) CHIPSET(0x9541, RV710_9541, RV710) CHIPSET(0x9542, RV710_9542, RV710) CHIPSET(0x954E, RV710_954E, RV710) CHIPSET(0x954F, RV710_954F, RV710) CHIPSET(0x9552, RV710_9552, RV710) CHIPSET(0x9553, RV710_9553, RV710) CHIPSET(0x9555, RV710_9555, RV710) CHIPSET(0x9557, RV710_9557, RV710) CHIPSET(0x955F, RV710_955F, RV710) CHIPSET(0x94A0, RV740_94A0, RV740) CHIPSET(0x94A1, RV740_94A1, RV740) CHIPSET(0x94A3, RV740_94A3, RV740) CHIPSET(0x94B1, RV740_94B1, RV740) CHIPSET(0x94B3, RV740_94B3, RV740) CHIPSET(0x94B4, RV740_94B4, RV740) CHIPSET(0x94B5, RV740_94B5, RV740) CHIPSET(0x94B9, RV740_94B9, RV740) CHIPSET(0x68E0, CEDAR_68E0, CEDAR) CHIPSET(0x68E1, CEDAR_68E1, CEDAR) CHIPSET(0x68E4, CEDAR_68E4, CEDAR) CHIPSET(0x68E5, CEDAR_68E5, CEDAR) CHIPSET(0x68E8, CEDAR_68E8, CEDAR) CHIPSET(0x68E9, CEDAR_68E9, CEDAR) CHIPSET(0x68F1, CEDAR_68F1, CEDAR) CHIPSET(0x68F2, CEDAR_68F2, CEDAR) CHIPSET(0x68F8, CEDAR_68F8, CEDAR) CHIPSET(0x68F9, CEDAR_68F9, CEDAR) CHIPSET(0x68FA, CEDAR_68FA, CEDAR) CHIPSET(0x68FE, CEDAR_68FE, CEDAR) CHIPSET(0x68C0, REDWOOD_68C0, REDWOOD) CHIPSET(0x68C1, REDWOOD_68C1, REDWOOD) CHIPSET(0x68C7, REDWOOD_68C7, REDWOOD) CHIPSET(0x68C8, REDWOOD_68C8, REDWOOD) CHIPSET(0x68C9, REDWOOD_68C9, REDWOOD) CHIPSET(0x68D8, REDWOOD_68D8, REDWOOD) CHIPSET(0x68D9, REDWOOD_68D9, REDWOOD) CHIPSET(0x68DA, REDWOOD_68DA, REDWOOD) CHIPSET(0x68DE, REDWOOD_68DE, REDWOOD) CHIPSET(0x68A0, JUNIPER_68A0, JUNIPER) CHIPSET(0x68A1, JUNIPER_68A1, JUNIPER) CHIPSET(0x68A8, JUNIPER_68A8, JUNIPER) CHIPSET(0x68A9, JUNIPER_68A9, JUNIPER) CHIPSET(0x68B0, JUNIPER_68B0, JUNIPER) CHIPSET(0x68B8, JUNIPER_68B8, JUNIPER) CHIPSET(0x68B9, JUNIPER_68B9, JUNIPER) CHIPSET(0x68BA, JUNIPER_68BA, JUNIPER) CHIPSET(0x68BE, JUNIPER_68BE, JUNIPER) CHIPSET(0x68BF, JUNIPER_68BF, JUNIPER) CHIPSET(0x6880, CYPRESS_6880, CYPRESS) CHIPSET(0x6888, CYPRESS_6888, CYPRESS) CHIPSET(0x6889, CYPRESS_6889, CYPRESS) CHIPSET(0x688A, CYPRESS_688A, CYPRESS) CHIPSET(0x688C, CYPRESS_688C, CYPRESS) CHIPSET(0x688D, CYPRESS_688D, CYPRESS) CHIPSET(0x6898, CYPRESS_6898, CYPRESS) CHIPSET(0x6899, CYPRESS_6899, CYPRESS) CHIPSET(0x689B, CYPRESS_689B, CYPRESS) CHIPSET(0x689E, CYPRESS_689E, CYPRESS) CHIPSET(0x689C, HEMLOCK_689C, HEMLOCK) CHIPSET(0x689D, HEMLOCK_689D, HEMLOCK) CHIPSET(0x9802, PALM_9802, PALM) CHIPSET(0x9803, PALM_9803, PALM) CHIPSET(0x9804, PALM_9804, PALM) CHIPSET(0x9805, PALM_9805, PALM) CHIPSET(0x9806, PALM_9806, PALM) CHIPSET(0x9807, PALM_9807, PALM) CHIPSET(0x9808, PALM_9808, PALM) CHIPSET(0x9809, PALM_9809, PALM) CHIPSET(0x980A, PALM_980A, PALM) CHIPSET(0x9640, SUMO_9640, SUMO) CHIPSET(0x9641, SUMO_9641, SUMO) CHIPSET(0x9642, SUMO2_9642, SUMO2) CHIPSET(0x9643, SUMO2_9643, SUMO2) CHIPSET(0x9644, SUMO2_9644, SUMO2) CHIPSET(0x9645, SUMO2_9645, SUMO2) CHIPSET(0x9647, SUMO_9647, SUMO) CHIPSET(0x9648, SUMO_9648, SUMO) CHIPSET(0x9649, SUMO2_9649, SUMO2) CHIPSET(0x964a, SUMO_964A, SUMO) CHIPSET(0x964b, SUMO_964B, SUMO) CHIPSET(0x964c, SUMO_964C, SUMO) CHIPSET(0x964e, SUMO_964E, SUMO) CHIPSET(0x964f, SUMO_964F, SUMO) CHIPSET(0x6700, CAYMAN_6700, CAYMAN) CHIPSET(0x6701, CAYMAN_6701, CAYMAN) CHIPSET(0x6702, CAYMAN_6702, CAYMAN) CHIPSET(0x6703, CAYMAN_6703, CAYMAN) CHIPSET(0x6704, CAYMAN_6704, CAYMAN) CHIPSET(0x6705, CAYMAN_6705, CAYMAN) CHIPSET(0x6706, CAYMAN_6706, CAYMAN) CHIPSET(0x6707, CAYMAN_6707, CAYMAN) CHIPSET(0x6708, CAYMAN_6708, CAYMAN) CHIPSET(0x6709, CAYMAN_6709, CAYMAN) CHIPSET(0x6718, CAYMAN_6718, CAYMAN) CHIPSET(0x6719, CAYMAN_6719, CAYMAN) CHIPSET(0x671C, CAYMAN_671C, CAYMAN) CHIPSET(0x671D, CAYMAN_671D, CAYMAN) CHIPSET(0x671F, CAYMAN_671F, CAYMAN) CHIPSET(0x6720, BARTS_6720, BARTS) CHIPSET(0x6721, BARTS_6721, BARTS) CHIPSET(0x6722, BARTS_6722, BARTS) CHIPSET(0x6723, BARTS_6723, BARTS) CHIPSET(0x6724, BARTS_6724, BARTS) CHIPSET(0x6725, BARTS_6725, BARTS) CHIPSET(0x6726, BARTS_6726, BARTS) CHIPSET(0x6727, BARTS_6727, BARTS) CHIPSET(0x6728, BARTS_6728, BARTS) CHIPSET(0x6729, BARTS_6729, BARTS) CHIPSET(0x6738, BARTS_6738, BARTS) CHIPSET(0x6739, BARTS_6739, BARTS) CHIPSET(0x673E, BARTS_673E, BARTS) CHIPSET(0x6740, TURKS_6740, TURKS) CHIPSET(0x6741, TURKS_6741, TURKS) CHIPSET(0x6742, TURKS_6742, TURKS) CHIPSET(0x6743, TURKS_6743, TURKS) CHIPSET(0x6744, TURKS_6744, TURKS) CHIPSET(0x6745, TURKS_6745, TURKS) CHIPSET(0x6746, TURKS_6746, TURKS) CHIPSET(0x6747, TURKS_6747, TURKS) CHIPSET(0x6748, TURKS_6748, TURKS) CHIPSET(0x6749, TURKS_6749, TURKS) CHIPSET(0x674A, TURKS_674A, TURKS) CHIPSET(0x6750, TURKS_6750, TURKS) CHIPSET(0x6751, TURKS_6751, TURKS) CHIPSET(0x6758, TURKS_6758, TURKS) CHIPSET(0x6759, TURKS_6759, TURKS) CHIPSET(0x675B, TURKS_675B, TURKS) CHIPSET(0x675D, TURKS_675D, TURKS) CHIPSET(0x675F, TURKS_675F, TURKS) CHIPSET(0x6840, TURKS_6840, TURKS) CHIPSET(0x6841, TURKS_6841, TURKS) CHIPSET(0x6842, TURKS_6842, TURKS) CHIPSET(0x6843, TURKS_6843, TURKS) CHIPSET(0x6849, TURKS_6849, TURKS) CHIPSET(0x6850, TURKS_6850, TURKS) CHIPSET(0x6858, TURKS_6858, TURKS) CHIPSET(0x6859, TURKS_6859, TURKS) CHIPSET(0x6760, CAICOS_6760, CAICOS) CHIPSET(0x6761, CAICOS_6761, CAICOS) CHIPSET(0x6762, CAICOS_6762, CAICOS) CHIPSET(0x6763, CAICOS_6763, CAICOS) CHIPSET(0x6764, CAICOS_6764, CAICOS) CHIPSET(0x6765, CAICOS_6765, CAICOS) CHIPSET(0x6766, CAICOS_6766, CAICOS) CHIPSET(0x6767, CAICOS_6767, CAICOS) CHIPSET(0x6768, CAICOS_6768, CAICOS) CHIPSET(0x6770, CAICOS_6770, CAICOS) CHIPSET(0x6771, CAICOS_6771, CAICOS) CHIPSET(0x6772, CAICOS_6772, CAICOS) CHIPSET(0x6778, CAICOS_6778, CAICOS) CHIPSET(0x6779, CAICOS_6779, CAICOS) CHIPSET(0x677B, CAICOS_677B, CAICOS) CHIPSET(0x9900, ARUBA_9900, ARUBA) CHIPSET(0x9901, ARUBA_9901, ARUBA) CHIPSET(0x9903, ARUBA_9903, ARUBA) CHIPSET(0x9904, ARUBA_9904, ARUBA) CHIPSET(0x9905, ARUBA_9905, ARUBA) CHIPSET(0x9906, ARUBA_9906, ARUBA) CHIPSET(0x9907, ARUBA_9907, ARUBA) CHIPSET(0x9908, ARUBA_9908, ARUBA) CHIPSET(0x9909, ARUBA_9909, ARUBA) CHIPSET(0x990A, ARUBA_990A, ARUBA) CHIPSET(0x990B, ARUBA_990B, ARUBA) CHIPSET(0x990C, ARUBA_990C, ARUBA) CHIPSET(0x990D, ARUBA_990D, ARUBA) CHIPSET(0x990E, ARUBA_990E, ARUBA) CHIPSET(0x990F, ARUBA_990F, ARUBA) CHIPSET(0x9910, ARUBA_9910, ARUBA) CHIPSET(0x9913, ARUBA_9913, ARUBA) CHIPSET(0x9917, ARUBA_9917, ARUBA) CHIPSET(0x9918, ARUBA_9918, ARUBA) CHIPSET(0x9919, ARUBA_9919, ARUBA) CHIPSET(0x9990, ARUBA_9990, ARUBA) CHIPSET(0x9991, ARUBA_9991, ARUBA) CHIPSET(0x9992, ARUBA_9992, ARUBA) CHIPSET(0x9993, ARUBA_9993, ARUBA) CHIPSET(0x9994, ARUBA_9994, ARUBA) CHIPSET(0x9995, ARUBA_9995, ARUBA) CHIPSET(0x9996, ARUBA_9996, ARUBA) CHIPSET(0x9997, ARUBA_9997, ARUBA) CHIPSET(0x9998, ARUBA_9998, ARUBA) CHIPSET(0x9999, ARUBA_9999, ARUBA) CHIPSET(0x999A, ARUBA_999A, ARUBA) CHIPSET(0x999B, ARUBA_999B, ARUBA) CHIPSET(0x999C, ARUBA_999C, ARUBA) CHIPSET(0x999D, ARUBA_999D, ARUBA) CHIPSET(0x99A0, ARUBA_99A0, ARUBA) CHIPSET(0x99A2, ARUBA_99A2, ARUBA) CHIPSET(0x99A4, ARUBA_99A4, ARUBA) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h0000644000175000017500000000125714757411105017132 CHIPSET(0x4C57, RADEON_LW, RV200) CHIPSET(0x4C58, RADEON_LX, RV200) CHIPSET(0x4C59, RADEON_LY, RV100) CHIPSET(0x4C5A, RADEON_LZ, RV100) CHIPSET(0x5144, RADEON_QD, R100) CHIPSET(0x5145, RADEON_QE, R100) CHIPSET(0x5146, RADEON_QF, R100) CHIPSET(0x5147, RADEON_QG, R100) CHIPSET(0x5159, RADEON_QY, RV100) CHIPSET(0x515A, RADEON_QZ, RV100) CHIPSET(0x5157, RV200_QW, RV200) CHIPSET(0x5158, RV200_QX, RV200) CHIPSET(0x515E, RN50_515E, UNKNOWN) CHIPSET(0x5969, RN50_5969, UNKNOWN) CHIPSET(0x4136, RS100_4136, RS100) CHIPSET(0x4336, RS100_4336, RS100) CHIPSET(0x4137, RS200_4137, RS200) CHIPSET(0x4337, RS200_4337, RS200) CHIPSET(0x4237, RS250_4237, RS200) CHIPSET(0x4437, RS250_4437, RS200) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h0000644000175000017500000001737514757411105017476 CHIPSET(0x6780, TAHITI_6780, TAHITI) CHIPSET(0x6784, TAHITI_6784, TAHITI) CHIPSET(0x6788, TAHITI_6788, TAHITI) CHIPSET(0x678A, TAHITI_678A, TAHITI) CHIPSET(0x6790, TAHITI_6790, TAHITI) CHIPSET(0x6791, TAHITI_6791, TAHITI) CHIPSET(0x6792, TAHITI_6792, TAHITI) CHIPSET(0x6798, TAHITI_6798, TAHITI) CHIPSET(0x6799, TAHITI_6799, TAHITI) CHIPSET(0x679A, TAHITI_679A, TAHITI) CHIPSET(0x679B, TAHITI_679B, TAHITI) CHIPSET(0x679E, TAHITI_679E, TAHITI) CHIPSET(0x679F, TAHITI_679F, TAHITI) CHIPSET(0x6800, PITCAIRN_6800, PITCAIRN) CHIPSET(0x6801, PITCAIRN_6801, PITCAIRN) CHIPSET(0x6802, PITCAIRN_6802, PITCAIRN) CHIPSET(0x6806, PITCAIRN_6806, PITCAIRN) CHIPSET(0x6808, PITCAIRN_6808, PITCAIRN) CHIPSET(0x6809, PITCAIRN_6809, PITCAIRN) CHIPSET(0x6810, PITCAIRN_6810, PITCAIRN) CHIPSET(0x6811, PITCAIRN_6811, PITCAIRN) CHIPSET(0x6816, PITCAIRN_6816, PITCAIRN) CHIPSET(0x6817, PITCAIRN_6817, PITCAIRN) CHIPSET(0x6818, PITCAIRN_6818, PITCAIRN) CHIPSET(0x6819, PITCAIRN_6819, PITCAIRN) CHIPSET(0x684C, PITCAIRN_684C, PITCAIRN) CHIPSET(0x6820, VERDE_6820, VERDE) CHIPSET(0x6821, VERDE_6821, VERDE) CHIPSET(0x6822, VERDE_6822, VERDE) CHIPSET(0x6823, VERDE_6823, VERDE) CHIPSET(0x6824, VERDE_6824, VERDE) CHIPSET(0x6825, VERDE_6825, VERDE) CHIPSET(0x6826, VERDE_6826, VERDE) CHIPSET(0x6827, VERDE_6827, VERDE) CHIPSET(0x6828, VERDE_6828, VERDE) CHIPSET(0x6829, VERDE_6829, VERDE) CHIPSET(0x682A, VERDE_682A, VERDE) CHIPSET(0x682B, VERDE_682B, VERDE) CHIPSET(0x682C, VERDE_682C, VERDE) CHIPSET(0x682D, VERDE_682D, VERDE) CHIPSET(0x682F, VERDE_682F, VERDE) CHIPSET(0x6830, VERDE_6830, VERDE) CHIPSET(0x6831, VERDE_6831, VERDE) CHIPSET(0x6835, VERDE_6835, VERDE) CHIPSET(0x6837, VERDE_6837, VERDE) CHIPSET(0x6838, VERDE_6838, VERDE) CHIPSET(0x6839, VERDE_6839, VERDE) CHIPSET(0x683B, VERDE_683B, VERDE) CHIPSET(0x683D, VERDE_683D, VERDE) CHIPSET(0x683F, VERDE_683F, VERDE) CHIPSET(0x6600, OLAND_6600, OLAND) CHIPSET(0x6601, OLAND_6601, OLAND) CHIPSET(0x6602, OLAND_6602, OLAND) CHIPSET(0x6603, OLAND_6603, OLAND) CHIPSET(0x6604, OLAND_6604, OLAND) CHIPSET(0x6605, OLAND_6605, OLAND) CHIPSET(0x6606, OLAND_6606, OLAND) CHIPSET(0x6607, OLAND_6607, OLAND) CHIPSET(0x6608, OLAND_6608, OLAND) CHIPSET(0x6610, OLAND_6610, OLAND) CHIPSET(0x6611, OLAND_6611, OLAND) CHIPSET(0x6613, OLAND_6613, OLAND) CHIPSET(0x6617, OLAND_6617, OLAND) CHIPSET(0x6620, OLAND_6620, OLAND) CHIPSET(0x6621, OLAND_6621, OLAND) CHIPSET(0x6623, OLAND_6623, OLAND) CHIPSET(0x6631, OLAND_6631, OLAND) CHIPSET(0x6660, HAINAN_6660, HAINAN) CHIPSET(0x6663, HAINAN_6663, HAINAN) CHIPSET(0x6664, HAINAN_6664, HAINAN) CHIPSET(0x6665, HAINAN_6665, HAINAN) CHIPSET(0x6667, HAINAN_6667, HAINAN) CHIPSET(0x666F, HAINAN_666F, HAINAN) CHIPSET(0x6640, BONAIRE_6640, BONAIRE) CHIPSET(0x6641, BONAIRE_6641, BONAIRE) CHIPSET(0x6646, BONAIRE_6646, BONAIRE) CHIPSET(0x6647, BONAIRE_6647, BONAIRE) CHIPSET(0x6649, BONAIRE_6649, BONAIRE) CHIPSET(0x6650, BONAIRE_6650, BONAIRE) CHIPSET(0x6651, BONAIRE_6651, BONAIRE) CHIPSET(0x6658, BONAIRE_6658, BONAIRE) CHIPSET(0x665C, BONAIRE_665C, BONAIRE) CHIPSET(0x665D, BONAIRE_665D, BONAIRE) CHIPSET(0x665F, BONAIRE_665F, BONAIRE) CHIPSET(0x9830, KABINI_9830, KABINI) CHIPSET(0x9831, KABINI_9831, KABINI) CHIPSET(0x9832, KABINI_9832, KABINI) CHIPSET(0x9833, KABINI_9833, KABINI) CHIPSET(0x9834, KABINI_9834, KABINI) CHIPSET(0x9835, KABINI_9835, KABINI) CHIPSET(0x9836, KABINI_9836, KABINI) CHIPSET(0x9837, KABINI_9837, KABINI) CHIPSET(0x9838, KABINI_9838, KABINI) CHIPSET(0x9839, KABINI_9839, KABINI) CHIPSET(0x983A, KABINI_983A, KABINI) CHIPSET(0x983B, KABINI_983B, KABINI) CHIPSET(0x983C, KABINI_983C, KABINI) CHIPSET(0x983D, KABINI_983D, KABINI) CHIPSET(0x983E, KABINI_983E, KABINI) CHIPSET(0x983F, KABINI_983F, KABINI) CHIPSET(0x9850, MULLINS_9850, MULLINS) CHIPSET(0x9851, MULLINS_9851, MULLINS) CHIPSET(0x9852, MULLINS_9852, MULLINS) CHIPSET(0x9853, MULLINS_9853, MULLINS) CHIPSET(0x9854, MULLINS_9854, MULLINS) CHIPSET(0x9855, MULLINS_9855, MULLINS) CHIPSET(0x9856, MULLINS_9856, MULLINS) CHIPSET(0x9857, MULLINS_9857, MULLINS) CHIPSET(0x9858, MULLINS_9858, MULLINS) CHIPSET(0x9859, MULLINS_9859, MULLINS) CHIPSET(0x985A, MULLINS_985A, MULLINS) CHIPSET(0x985B, MULLINS_985B, MULLINS) CHIPSET(0x985C, MULLINS_985C, MULLINS) CHIPSET(0x985D, MULLINS_985D, MULLINS) CHIPSET(0x985E, MULLINS_985E, MULLINS) CHIPSET(0x985F, MULLINS_985F, MULLINS) CHIPSET(0x1304, KAVERI_1304, KAVERI) CHIPSET(0x1305, KAVERI_1305, KAVERI) CHIPSET(0x1306, KAVERI_1306, KAVERI) CHIPSET(0x1307, KAVERI_1307, KAVERI) CHIPSET(0x1309, KAVERI_1309, KAVERI) CHIPSET(0x130A, KAVERI_130A, KAVERI) CHIPSET(0x130B, KAVERI_130B, KAVERI) CHIPSET(0x130C, KAVERI_130C, KAVERI) CHIPSET(0x130D, KAVERI_130D, KAVERI) CHIPSET(0x130E, KAVERI_130E, KAVERI) CHIPSET(0x130F, KAVERI_130F, KAVERI) CHIPSET(0x1310, KAVERI_1310, KAVERI) CHIPSET(0x1311, KAVERI_1311, KAVERI) CHIPSET(0x1312, KAVERI_1312, KAVERI) CHIPSET(0x1313, KAVERI_1313, KAVERI) CHIPSET(0x1315, KAVERI_1315, KAVERI) CHIPSET(0x1316, KAVERI_1316, KAVERI) CHIPSET(0x1317, KAVERI_1317, KAVERI) CHIPSET(0x1318, KAVERI_1318, KAVERI) CHIPSET(0x131B, KAVERI_131B, KAVERI) CHIPSET(0x131C, KAVERI_131C, KAVERI) CHIPSET(0x131D, KAVERI_131D, KAVERI) CHIPSET(0x67A0, HAWAII_67A0, HAWAII) CHIPSET(0x67A1, HAWAII_67A1, HAWAII) CHIPSET(0x67A2, HAWAII_67A2, HAWAII) CHIPSET(0x67A8, HAWAII_67A8, HAWAII) CHIPSET(0x67A9, HAWAII_67A9, HAWAII) CHIPSET(0x67AA, HAWAII_67AA, HAWAII) CHIPSET(0x67B0, HAWAII_67B0, HAWAII) CHIPSET(0x67B1, HAWAII_67B1, HAWAII) CHIPSET(0x67B8, HAWAII_67B8, HAWAII) CHIPSET(0x67B9, HAWAII_67B9, HAWAII) CHIPSET(0x67BA, HAWAII_67BA, HAWAII) CHIPSET(0x67BE, HAWAII_67BE, HAWAII) CHIPSET(0x6900, ICELAND_, ICELAND) CHIPSET(0x6901, ICELAND_, ICELAND) CHIPSET(0x6902, ICELAND_, ICELAND) CHIPSET(0x6903, ICELAND_, ICELAND) CHIPSET(0x6907, ICELAND_, ICELAND) CHIPSET(0x6920, TONGA_, TONGA) CHIPSET(0x6921, TONGA_, TONGA) CHIPSET(0x6928, TONGA_, TONGA) CHIPSET(0x6929, TONGA_, TONGA) CHIPSET(0x692B, TONGA_, TONGA) CHIPSET(0x692F, TONGA_, TONGA) CHIPSET(0x6930, TONGA_, TONGA) CHIPSET(0x6938, TONGA_, TONGA) CHIPSET(0x6939, TONGA_, TONGA) CHIPSET(0x9870, CARRIZO_, CARRIZO) CHIPSET(0x9874, CARRIZO_, CARRIZO) CHIPSET(0x9875, CARRIZO_, CARRIZO) CHIPSET(0x9876, CARRIZO_, CARRIZO) CHIPSET(0x9877, CARRIZO_, CARRIZO) CHIPSET(0x7300, FIJI_, FIJI) CHIPSET(0x67E0, POLARIS11_, POLARIS11) CHIPSET(0x67E1, POLARIS11_, POLARIS11) CHIPSET(0x67E3, POLARIS11_, POLARIS11) CHIPSET(0x67E7, POLARIS11_, POLARIS11) CHIPSET(0x67E8, POLARIS11_, POLARIS11) CHIPSET(0x67E9, POLARIS11_, POLARIS11) CHIPSET(0x67EB, POLARIS11_, POLARIS11) CHIPSET(0x67EF, POLARIS11_, POLARIS11) CHIPSET(0x67FF, POLARIS11_, POLARIS11) CHIPSET(0x67C0, POLARIS10_, POLARIS10) CHIPSET(0x67C1, POLARIS10_, POLARIS10) CHIPSET(0x67C2, POLARIS10_, POLARIS10) CHIPSET(0x67C4, POLARIS10_, POLARIS10) CHIPSET(0x67C7, POLARIS10_, POLARIS10) CHIPSET(0x67C8, POLARIS10_, POLARIS10) CHIPSET(0x67C9, POLARIS10_, POLARIS10) CHIPSET(0x67CA, POLARIS10_, POLARIS10) CHIPSET(0x67CC, POLARIS10_, POLARIS10) CHIPSET(0x67CF, POLARIS10_, POLARIS10) CHIPSET(0x67DF, POLARIS10_, POLARIS10) CHIPSET(0x98E4, STONEY_, STONEY) CHIPSET(0x6980, POLARIS12_, POLARIS12) CHIPSET(0x6981, POLARIS12_, POLARIS12) CHIPSET(0x6985, POLARIS12_, POLARIS12) CHIPSET(0x6986, POLARIS12_, POLARIS12) CHIPSET(0x6987, POLARIS12_, POLARIS12) CHIPSET(0x6995, POLARIS12_, POLARIS12) CHIPSET(0x6997, POLARIS12_, POLARIS12) CHIPSET(0x699F, POLARIS12_, POLARIS12) CHIPSET(0x694C, VEGAM_, VEGAM) CHIPSET(0x694E, VEGAM_, VEGAM) CHIPSET(0x6860, VEGA10_, VEGA10) CHIPSET(0x6861, VEGA10_, VEGA10) CHIPSET(0x6862, VEGA10_, VEGA10) CHIPSET(0x6863, VEGA10_, VEGA10) CHIPSET(0x6864, VEGA10_, VEGA10) CHIPSET(0x6867, VEGA10_, VEGA10) CHIPSET(0x6868, VEGA10_, VEGA10) CHIPSET(0x687F, VEGA10_, VEGA10) CHIPSET(0x686C, VEGA10_, VEGA10) CHIPSET(0x69A0, VEGA12_, VEGA12) CHIPSET(0x69A1, VEGA12_, VEGA12) CHIPSET(0x69A2, VEGA12_, VEGA12) CHIPSET(0x69A3, VEGA12_, VEGA12) CHIPSET(0x69AF, VEGA12_, VEGA12) CHIPSET(0x15DD, RAVEN_, RAVEN) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/virtio_gpu_pci_ids.h0000644000175000017500000000010014757411105020033 CHIPSET(0x0010, VIRTGL, VIRTGL) CHIPSET(0x1050, VIRTGL, VIRTGL) xorg-server-21.1.16/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h0000644000175000017500000000004014757411105017165 CHIPSET(0x0405, SVGAII, SVGAII) xorg-server-21.1.16/hw/xfree86/drivers/0000755000175000017500000000000014757411135013301 5xorg-server-21.1.16/hw/xfree86/drivers/inputtest/0000755000175000017500000000000014757411135015340 5xorg-server-21.1.16/hw/xfree86/drivers/inputtest/meson.build0000644000175000017500000000102014757411105017410 inputtestdrv_srcs = [ 'xf86-input-inputtest.c', ] shared_module( 'inputtest_drv', inputtestdrv_srcs, name_prefix: '', include_directories: [inc, xorg_inc], c_args: xorg_c_args, dependencies: [common_dep], install: true, install_dir: join_paths(module_dir, 'input'), link_with: e, ) install_man(configure_file( input: 'inputtestdrv.man', output: 'inputtestdrv.4', configuration: manpage_config, )) install_data('xf86-input-inputtest-protocol.h', install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/drivers/inputtest/Makefile.am0000644000175000017500000000374314757411105017320 # Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, and/or sell copies of the Software, and to permit persons to whom # the Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON 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. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. include $(top_srcdir)/manpages.am AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CWARNFLAGS) AM_CPPFLAGS = $(XORG_INCS) inputtest_drv_la_LTLIBRARIES = inputtest_drv.la inputtest_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) inputtest_drv_ladir = @moduledir@/input inputtest_drv_la_SOURCES = xf86-input-inputtest.c xf86-input-inputtest-protocol.h sdk_HEADERS = xf86-input-inputtest-protocol.h drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = inputtestdrv.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = inputtestdrv.man CLEANFILES = $(driverman_DATA) xorg-server-21.1.16/hw/xfree86/drivers/inputtest/xf86-input-inputtest-protocol.h0000644000175000017500000001104114757411105023247 /* * Copyright © 2020 Povilas Kanapickas * * 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 Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS 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. */ #ifndef XF86_INPUT_INPUTTEST_PROTOCOL_H_ #define XF86_INPUT_INPUTTEST_PROTOCOL_H_ #ifdef __cplusplus extern "C" { #endif #include #define XF86IT_PROTOCOL_VERSION_MAJOR 1 #define XF86IT_PROTOCOL_VERSION_MINOR 1 enum xf86ITResponseType { XF86IT_RESPONSE_SERVER_VERSION, XF86IT_RESPONSE_SYNC_FINISHED, }; typedef struct { uint32_t length; /* length of the whole event in bytes, including the header */ enum xf86ITResponseType type; } xf86ITResponseHeader; typedef struct { xf86ITResponseHeader header; uint16_t major; uint16_t minor; } xf86ITResponseServerVersion; typedef struct { xf86ITResponseHeader header; } xf86ITResponseSyncFinished; typedef union { xf86ITResponseHeader header; xf86ITResponseServerVersion version; } xf86ITResponseAny; /* We care more about preserving the binary input driver protocol more than the size of the messages, so hardcode a larger valuator count than the server has */ #define XF86IT_MAX_VALUATORS 64 enum xf86ITEventType { XF86IT_EVENT_CLIENT_VERSION, XF86IT_EVENT_WAIT_FOR_SYNC, XF86IT_EVENT_MOTION, XF86IT_EVENT_PROXIMITY, XF86IT_EVENT_BUTTON, XF86IT_EVENT_KEY, XF86IT_EVENT_TOUCH, XF86IT_EVENT_GESTURE_PINCH, XF86IT_EVENT_GESTURE_SWIPE, }; typedef struct { uint32_t length; /* length of the whole event in bytes, including the header */ enum xf86ITEventType type; } xf86ITEventHeader; typedef struct { uint32_t has_unaccelerated; uint8_t mask[(XF86IT_MAX_VALUATORS + 7) / 8]; double valuators[XF86IT_MAX_VALUATORS]; double unaccelerated[XF86IT_MAX_VALUATORS]; } xf86ITValuatorData; typedef struct { xf86ITEventHeader header; uint16_t major; uint16_t minor; } xf86ITEventClientVersion; typedef struct { xf86ITEventHeader header; } xf86ITEventWaitForSync; typedef struct { xf86ITEventHeader header; uint32_t is_absolute; xf86ITValuatorData valuators; } xf86ITEventMotion; typedef struct { xf86ITEventHeader header; uint32_t is_prox_in; xf86ITValuatorData valuators; } xf86ITEventProximity; typedef struct { xf86ITEventHeader header; int32_t is_absolute; int32_t button; uint32_t is_press; xf86ITValuatorData valuators; } xf86ITEventButton; typedef struct { xf86ITEventHeader header; int32_t key_code; uint32_t is_press; } xf86ITEventKey; typedef struct { xf86ITEventHeader header; uint32_t touchid; uint32_t touch_type; xf86ITValuatorData valuators; } xf86ITEventTouch; typedef struct { xf86ITEventHeader header; uint16_t gesture_type; uint16_t num_touches; uint32_t flags; double delta_x; double delta_y; double delta_unaccel_x; double delta_unaccel_y; double scale; double delta_angle; } xf86ITEventGesturePinch; typedef struct { xf86ITEventHeader header; uint16_t gesture_type; uint16_t num_touches; uint32_t flags; double delta_x; double delta_y; double delta_unaccel_x; double delta_unaccel_y; } xf86ITEventGestureSwipe; typedef union { xf86ITEventHeader header; xf86ITEventClientVersion version; xf86ITEventMotion motion; xf86ITEventProximity proximity; xf86ITEventButton button; xf86ITEventKey key; xf86ITEventTouch touch; xf86ITEventGesturePinch pinch; xf86ITEventGestureSwipe swipe; } xf86ITEventAny; #ifdef __cplusplus } /* extern "C" */ #endif #endif /* XF86_INPUT_INPUTTEST_PROTOCOL_H_ */ xorg-server-21.1.16/hw/xfree86/drivers/inputtest/Makefile.in0000644000175000017500000010646514757411115017337 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, and/or sell copies of the Software, and to permit persons to whom # the Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON 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. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/drivers/inputtest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(inputtest_drv_ladir)" \ "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(inputtest_drv_la_LTLIBRARIES) inputtest_drv_la_LIBADD = am_inputtest_drv_la_OBJECTS = xf86-input-inputtest.lo inputtest_drv_la_OBJECTS = $(am_inputtest_drv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = inputtest_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(inputtest_drv_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xf86-input-inputtest.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(inputtest_drv_la_SOURCES) DIST_SOURCES = $(inputtest_drv_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) EXTRA_DIST = inputtestdrv.man CLEANFILES = $(driverman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(CWARNFLAGS) AM_CPPFLAGS = $(XORG_INCS) inputtest_drv_la_LTLIBRARIES = inputtest_drv.la inputtest_drv_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) inputtest_drv_ladir = @moduledir@/input inputtest_drv_la_SOURCES = xf86-input-inputtest.c xf86-input-inputtest-protocol.h sdk_HEADERS = xf86-input-inputtest-protocol.h driverman_PRE = inputtestdrv.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/drivers/inputtest/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/drivers/inputtest/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-inputtest_drv_laLTLIBRARIES: $(inputtest_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(inputtest_drv_la_LTLIBRARIES)'; test -n "$(inputtest_drv_ladir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(inputtest_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(inputtest_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(inputtest_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(inputtest_drv_ladir)"; \ } uninstall-inputtest_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(inputtest_drv_la_LTLIBRARIES)'; test -n "$(inputtest_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputtest_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputtest_drv_ladir)/$$f"; \ done clean-inputtest_drv_laLTLIBRARIES: -test -z "$(inputtest_drv_la_LTLIBRARIES)" || rm -f $(inputtest_drv_la_LTLIBRARIES) @list='$(inputtest_drv_la_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } inputtest_drv.la: $(inputtest_drv_la_OBJECTS) $(inputtest_drv_la_DEPENDENCIES) $(EXTRA_inputtest_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(inputtest_drv_la_LINK) -rpath $(inputtest_drv_ladir) $(inputtest_drv_la_OBJECTS) $(inputtest_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86-input-inputtest.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(inputtest_drv_ladir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-inputtest_drv_laLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xf86-input-inputtest.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-inputtest_drv_laLTLIBRARIES \ install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xf86-input-inputtest.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA uninstall-inputtest_drv_laLTLIBRARIES \ uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-inputtest_drv_laLTLIBRARIES clean-libtool \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-appmanDATA install-data install-data-am \ install-drivermanDATA install-dvi install-dvi-am install-exec \ install-exec-am install-filemanDATA install-html \ install-html-am install-info install-info-am \ install-inputtest_drv_laLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA uninstall-inputtest_drv_laLTLIBRARIES \ uninstall-sdkHEADERS .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/drivers/inputtest/xf86-input-inputtest.c0000644000175000017500000010763014757411105021415 /* * Copyright © 2013-2017 Red Hat, Inc. * Copyright © 2020 Povilas Kanapickas * * 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 Red Hat * not be used in advertising or publicity pertaining to distribution * of the software without specific, written prior permission. Red * Hat makes no representations about the suitability of this software * for any purpose. It is provided "as is" without express or implied * warranty. * * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN * NO EVENT SHALL THE AUTHORS 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_XORG_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "xorgVersion.h" #include #include #include #include #include #include #include #include "xf86-input-inputtest-protocol.h" #define MAX_POINTER_NUM_AXES 5 /* x, y, hscroll, vscroll, [pressure] */ #define MAX_TOUCH_NUM_AXES 5 /* x, y, hscroll, vscroll, pressure */ #define TOUCH_MAX_SLOTS 15 #define TOUCH_AXIS_MAX 0xffff #define TABLET_PRESSURE_AXIS_MAX 2047 #define EVENT_BUFFER_SIZE 4096 enum xf86ITDeviceType { DEVICE_KEYBOARD = 1, DEVICE_POINTER, DEVICE_POINTER_GESTURE, DEVICE_POINTER_ABS, DEVICE_POINTER_ABS_PROXIMITY, DEVICE_TOUCH, }; enum xf86ITClientState { CLIENT_STATE_NOT_CONNECTED = 0, /* connection_fd is valid */ CLIENT_STATE_NEW, /* connection_fd is valid and client_protocol.{major,minor} are set */ CLIENT_STATE_READY, }; typedef struct { InputInfoPtr pInfo; int socket_fd; /* for accepting new clients */ int connection_fd; /* current client connection */ char *socket_path; enum xf86ITClientState client_state; struct { int major, minor; } client_protocol; struct { char data[EVENT_BUFFER_SIZE]; int valid_length; } buffer; uint32_t device_type; /* last_processed_event_num == last_event_num and waiting_for_drain != 0 must never be true both at the same time. This would mean that we are waiting for the input queue to be processed, yet all events have already been processed, i.e. a deadlock. waiting_for_drain_mutex protects concurrent access to waiting_for_drain variable which may be modified from multiple threads. */ pthread_mutex_t waiting_for_drain_mutex; bool waiting_for_drain; int last_processed_event_num; int last_event_num; ValuatorMask *valuators; ValuatorMask *valuators_unaccelerated; } xf86ITDevice, *xf86ITDevicePtr; static void read_input_from_connection(InputInfoPtr pInfo); static Bool notify_sync_finished(ClientPtr ptr, void *closure) { int fd = (int)(intptr_t) closure; xf86ITResponseSyncFinished response; response.header.length = sizeof(response); response.header.type = XF86IT_RESPONSE_SYNC_FINISHED; input_lock(); /* we don't really care whether the write succeeds. It may fail if the device is already shut down and the descriptor is closed. */ if (write(fd, &response, response.header.length) != response.header.length) { LogMessageVerbSigSafe(X_ERROR, 0, "inputtest: Failed to write sync response: %s\n", strerror(errno)); } input_unlock(); return TRUE; } static void input_drain_callback(CallbackListPtr *callback, void *data, void *call_data) { void *drain_write_closure; InputInfoPtr pInfo = data; xf86ITDevicePtr driver_data = pInfo->private; bool notify_synchronization = false; pthread_mutex_lock(&driver_data->waiting_for_drain_mutex); driver_data->last_processed_event_num = driver_data->last_event_num; if (driver_data->waiting_for_drain) { driver_data->waiting_for_drain = false; notify_synchronization = true; } pthread_mutex_unlock(&driver_data->waiting_for_drain_mutex); if (notify_synchronization) { drain_write_closure = (void*)(intptr_t) driver_data->connection_fd; /* One input event may result in additional sets of events being submitted to the input queue from the input processing code itself. This results in input_drain_callback being called multiple times. We therefore schedule a WorkProc (to be run when the server is no longer busy) to notify the client when all current events have been processed. */ xf86IDrvMsg(pInfo, X_DEBUG, "Synchronization finished\n"); QueueWorkProc(notify_sync_finished, NULL, drain_write_closure); } } static void read_events(int fd, int ready, void *data) { DeviceIntPtr dev = (DeviceIntPtr) data; InputInfoPtr pInfo = dev->public.devicePrivate; read_input_from_connection(pInfo); } static void try_accept_connection(int fd, int ready, void *data) { DeviceIntPtr dev = (DeviceIntPtr) data; InputInfoPtr pInfo = dev->public.devicePrivate; xf86ITDevicePtr driver_data = pInfo->private; int connection_fd; int flags; if (driver_data->connection_fd >= 0) return; connection_fd = accept(driver_data->socket_fd, NULL, NULL); if (connection_fd < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) return; xf86IDrvMsg(pInfo, X_ERROR, "Failed to accept a connection\n"); return; } xf86IDrvMsg(pInfo, X_DEBUG, "Accepted input control connection\n"); flags = fcntl(connection_fd, F_GETFL, 0); fcntl(connection_fd, F_SETFL, flags | O_NONBLOCK); driver_data->connection_fd = connection_fd; xf86AddInputEventDrainCallback(input_drain_callback, pInfo); SetNotifyFd(driver_data->connection_fd, read_events, X_NOTIFY_READ, dev); driver_data->client_state = CLIENT_STATE_NEW; } static int device_on(DeviceIntPtr dev) { InputInfoPtr pInfo = dev->public.devicePrivate; xf86ITDevicePtr driver_data = pInfo->private; xf86IDrvMsg(pInfo, X_DEBUG, "Device turned on\n"); xf86AddEnabledDevice(pInfo); dev->public.on = TRUE; driver_data->buffer.valid_length = 0; try_accept_connection(-1, 0, dev); if (driver_data->connection_fd < 0) SetNotifyFd(driver_data->socket_fd, try_accept_connection, X_NOTIFY_READ, dev); return Success; } static void teardown_client_connection(InputInfoPtr pInfo) { xf86ITDevicePtr driver_data = pInfo->private; if (driver_data->client_state != CLIENT_STATE_NOT_CONNECTED) { RemoveNotifyFd(driver_data->connection_fd); xf86RemoveInputEventDrainCallback(input_drain_callback, pInfo); close(driver_data->connection_fd); driver_data->connection_fd = -1; } RemoveNotifyFd(driver_data->socket_fd); driver_data->client_state = CLIENT_STATE_NOT_CONNECTED; } static int device_off(DeviceIntPtr dev) { InputInfoPtr pInfo = dev->public.devicePrivate; xf86IDrvMsg(pInfo, X_DEBUG, "Device turned off\n"); if (dev->public.on) { teardown_client_connection(pInfo); xf86RemoveEnabledDevice(pInfo); } dev->public.on = FALSE; return Success; } static void ptr_ctl(DeviceIntPtr dev, PtrCtrl *ctl) { } static void init_button_map(unsigned char *btnmap, size_t size) { int i; memset(btnmap, 0, size); for (i = 0; i < size; i++) btnmap[i] = i; } static void init_button_labels(Atom *labels, size_t size) { assert(size > 10); memset(labels, 0, size * sizeof(Atom)); labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_SIDE); labels[8] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_EXTRA); labels[9] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_FORWARD); labels[10] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_BACK); } static void init_pointer(InputInfoPtr pInfo) { DeviceIntPtr dev= pInfo->dev; int min, max, res; int nbuttons = 7; bool has_pressure = false; int num_axes = 0; unsigned char btnmap[MAX_BUTTONS + 1]; Atom btnlabels[MAX_BUTTONS]; Atom axislabels[MAX_POINTER_NUM_AXES]; nbuttons = xf86SetIntOption(pInfo->options, "PointerButtonCount", 7); has_pressure = xf86SetBoolOption(pInfo->options, "PointerHasPressure", false); init_button_map(btnmap, ARRAY_SIZE(btnmap)); init_button_labels(btnlabels, ARRAY_SIZE(btnlabels)); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL); if (has_pressure) axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE); InitPointerDeviceStruct((DevicePtr)dev, btnmap, nbuttons, btnlabels, ptr_ctl, GetMotionHistorySize(), num_axes, axislabels); min = -1; max = -1; res = 0; xf86InitValuatorAxisStruct(dev, 0, XIGetKnownProperty(AXIS_LABEL_PROP_REL_X), min, max, res * 1000, 0, res * 1000, Relative); xf86InitValuatorAxisStruct(dev, 1, XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y), min, max, res * 1000, 0, res * 1000, Relative); SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0); SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0); if (has_pressure) { xf86InitValuatorAxisStruct(dev, 4, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE), 0, 1000, 1, 1, 1, Absolute); } } static void init_pointer_absolute(InputInfoPtr pInfo) { DeviceIntPtr dev = pInfo->dev; int min, max, res; int nbuttons = 7; bool has_pressure = false; int num_axes = 0; unsigned char btnmap[MAX_BUTTONS + 1]; Atom btnlabels[MAX_BUTTONS]; Atom axislabels[MAX_POINTER_NUM_AXES]; nbuttons = xf86SetIntOption(pInfo->options, "PointerButtonCount", 7); has_pressure = xf86SetBoolOption(pInfo->options, "PointerHasPressure", false); init_button_map(btnmap, ARRAY_SIZE(btnmap)); init_button_labels(btnlabels, ARRAY_SIZE(btnlabels)); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL); if (has_pressure) axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE); InitPointerDeviceStruct((DevicePtr)dev, btnmap, nbuttons, btnlabels, ptr_ctl, GetMotionHistorySize(), num_axes , axislabels); min = 0; max = TOUCH_AXIS_MAX; res = 0; xf86InitValuatorAxisStruct(dev, 0, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X), min, max, res * 1000, 0, res * 1000, Absolute); xf86InitValuatorAxisStruct(dev, 1, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y), min, max, res * 1000, 0, res * 1000, Absolute); SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0); SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0); if (has_pressure) { xf86InitValuatorAxisStruct(dev, 4, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE), 0, 1000, 1, 1, 1, Absolute); } } static void init_proximity(InputInfoPtr pInfo) { DeviceIntPtr dev = pInfo->dev; InitProximityClassDeviceStruct(dev); } static void init_keyboard(InputInfoPtr pInfo) { DeviceIntPtr dev= pInfo->dev; XkbRMLVOSet rmlvo = {0}; XkbRMLVOSet defaults = {0}; XkbGetRulesDflts(&defaults); rmlvo.rules = xf86SetStrOption(pInfo->options, "xkb_rules", defaults.rules); rmlvo.model = xf86SetStrOption(pInfo->options, "xkb_model", defaults.model); rmlvo.layout = xf86SetStrOption(pInfo->options, "xkb_layout", defaults.layout); rmlvo.variant = xf86SetStrOption(pInfo->options, "xkb_variant", defaults.variant); rmlvo.options = xf86SetStrOption(pInfo->options, "xkb_options", defaults.options); InitKeyboardDeviceStruct(dev, &rmlvo, NULL, NULL); XkbFreeRMLVOSet(&rmlvo, FALSE); XkbFreeRMLVOSet(&defaults, FALSE); } static void init_touch(InputInfoPtr pInfo) { DeviceIntPtr dev = pInfo->dev; int min, max, res; unsigned char btnmap[MAX_BUTTONS + 1]; Atom btnlabels[MAX_BUTTONS]; Atom axislabels[MAX_TOUCH_NUM_AXES]; int num_axes = 0; int nbuttons = 7; int ntouches = TOUCH_MAX_SLOTS; init_button_map(btnmap, ARRAY_SIZE(btnmap)); init_button_labels(btnlabels, ARRAY_SIZE(btnlabels)); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_X); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_Y); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL); axislabels[num_axes++] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_PRESSURE); InitPointerDeviceStruct((DevicePtr)dev, btnmap, nbuttons, btnlabels, ptr_ctl, GetMotionHistorySize(), num_axes, axislabels); min = 0; max = TOUCH_AXIS_MAX; res = 0; xf86InitValuatorAxisStruct(dev, 0, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_X), min, max, res * 1000, 0, res * 1000, Absolute); xf86InitValuatorAxisStruct(dev, 1, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_POSITION_Y), min, max, res * 1000, 0, res * 1000, Absolute); SetScrollValuator(dev, 2, SCROLL_TYPE_HORIZONTAL, 120, 0); SetScrollValuator(dev, 3, SCROLL_TYPE_VERTICAL, 120, 0); xf86InitValuatorAxisStruct(dev, 4, XIGetKnownProperty(AXIS_LABEL_PROP_ABS_MT_PRESSURE), min, TABLET_PRESSURE_AXIS_MAX, res * 1000, 0, res * 1000, Absolute); ntouches = xf86SetIntOption(pInfo->options, "TouchCount", TOUCH_MAX_SLOTS); if (ntouches == 0) /* unknown */ ntouches = TOUCH_MAX_SLOTS; InitTouchClassDeviceStruct(dev, ntouches, XIDirectTouch, 2); } static void init_gesture(InputInfoPtr pInfo) { DeviceIntPtr dev = pInfo->dev; int ntouches = TOUCH_MAX_SLOTS; InitGestureClassDeviceStruct(dev, ntouches); } static void device_init(DeviceIntPtr dev) { InputInfoPtr pInfo = dev->public.devicePrivate; xf86ITDevicePtr driver_data = pInfo->private; dev->public.on = FALSE; switch (driver_data->device_type) { case DEVICE_KEYBOARD: init_keyboard(pInfo); break; case DEVICE_POINTER: init_pointer(pInfo); break; case DEVICE_POINTER_GESTURE: init_pointer(pInfo); init_gesture(pInfo); break; case DEVICE_POINTER_ABS: init_pointer_absolute(pInfo); break; case DEVICE_POINTER_ABS_PROXIMITY: init_pointer_absolute(pInfo); init_proximity(pInfo); break; case DEVICE_TOUCH: init_touch(pInfo); break; } } static void device_destroy(DeviceIntPtr dev) { InputInfoPtr pInfo = dev->public.devicePrivate; xf86IDrvMsg(pInfo, X_INFO, "Close\n"); } static int device_control(DeviceIntPtr dev, int mode) { switch (mode) { case DEVICE_INIT: device_init(dev); break; case DEVICE_ON: device_on(dev); break; case DEVICE_OFF: device_off(dev); break; case DEVICE_CLOSE: device_destroy(dev); break; } return Success; } static void convert_to_valuator_mask(xf86ITValuatorData *event, ValuatorMask *mask) { valuator_mask_zero(mask); for (int i = 0; i < min(XF86IT_MAX_VALUATORS, MAX_VALUATORS); ++i) { if (BitIsOn(event->mask, i)) { if (event->has_unaccelerated) { valuator_mask_set_unaccelerated(mask, i, event->valuators[i], event->unaccelerated[i]); } else { valuator_mask_set_double(mask, i, event->valuators[i]); } } } } static void handle_client_version(InputInfoPtr pInfo, xf86ITEventClientVersion *event) { xf86ITDevicePtr driver_data = pInfo->private; xf86ITResponseServerVersion response; response.header.length = sizeof(response); response.header.type = XF86IT_RESPONSE_SERVER_VERSION; response.major = XF86IT_PROTOCOL_VERSION_MAJOR; response.minor = XF86IT_PROTOCOL_VERSION_MINOR; if (write(driver_data->connection_fd, &response, response.header.length) != response.header.length) { xf86IDrvMsg(pInfo, X_ERROR, "Error writing driver version: %s\n", strerror(errno)); teardown_client_connection(pInfo); return; } if (event->major != XF86IT_PROTOCOL_VERSION_MAJOR || event->minor > XF86IT_PROTOCOL_VERSION_MINOR) { xf86IDrvMsg(pInfo, X_ERROR, "Unsupported protocol version: %d.%d (current %d.%d)\n", event->major, event->minor, XF86IT_PROTOCOL_VERSION_MAJOR, XF86IT_PROTOCOL_VERSION_MINOR); teardown_client_connection(pInfo); return; } driver_data->client_protocol.major = event->major; driver_data->client_protocol.minor = event->minor; driver_data->client_state = CLIENT_STATE_READY; } static void handle_wait_for_sync(InputInfoPtr pInfo) { xf86ITDevicePtr driver_data = pInfo->private; bool notify_synchronization = false; void *drain_write_closure; xf86IDrvMsg(pInfo, X_DEBUG, "Handling sync event\n"); pthread_mutex_lock(&driver_data->waiting_for_drain_mutex); if (driver_data->last_processed_event_num == driver_data->last_event_num) { notify_synchronization = true; } else { driver_data->waiting_for_drain = true; } pthread_mutex_unlock(&driver_data->waiting_for_drain_mutex); if (notify_synchronization) { drain_write_closure = (void*)(intptr_t) driver_data->connection_fd; xf86IDrvMsg(pInfo, X_DEBUG, "Synchronization finished\n"); notify_sync_finished(NULL, drain_write_closure); } } static void handle_motion(InputInfoPtr pInfo, xf86ITEventMotion *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; ValuatorMask *mask = driver_data->valuators; xf86IDrvMsg(pInfo, X_DEBUG, "Handling motion event\n"); driver_data->last_event_num++; convert_to_valuator_mask(&event->valuators, mask); xf86PostMotionEventM(dev, event->is_absolute ? Absolute : Relative, mask); } static void handle_proximity(InputInfoPtr pInfo, xf86ITEventProximity *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; ValuatorMask *mask = driver_data->valuators; xf86IDrvMsg(pInfo, X_DEBUG, "Handling proximity event\n"); driver_data->last_event_num++; convert_to_valuator_mask(&event->valuators, mask); xf86PostProximityEventM(dev, event->is_prox_in, mask); } static void handle_button(InputInfoPtr pInfo, xf86ITEventButton *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; ValuatorMask *mask = driver_data->valuators; xf86IDrvMsg(pInfo, X_DEBUG, "Handling button event\n"); driver_data->last_event_num++; convert_to_valuator_mask(&event->valuators, mask); xf86PostButtonEventM(dev, event->is_absolute ? Absolute : Relative, event->button, event->is_press, mask); } static void handle_key(InputInfoPtr pInfo, xf86ITEventKey *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; xf86IDrvMsg(pInfo, X_DEBUG, "Handling key event\n"); driver_data->last_event_num++; xf86PostKeyboardEvent(dev, event->key_code, event->is_press); } static void handle_touch(InputInfoPtr pInfo, xf86ITEventTouch *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; ValuatorMask *mask = driver_data->valuators; xf86IDrvMsg(pInfo, X_DEBUG, "Handling touch event\n"); driver_data->last_event_num++; convert_to_valuator_mask(&event->valuators, mask); xf86PostTouchEvent(dev, event->touchid, event->touch_type, 0, mask); } static void handle_gesture_swipe(InputInfoPtr pInfo, xf86ITEventGestureSwipe *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; xf86IDrvMsg(pInfo, X_DEBUG, "Handling gesture swipe event\n"); driver_data->last_event_num++; xf86PostGestureSwipeEvent(dev, event->gesture_type, event->num_touches, event->flags, event->delta_x, event->delta_y, event->delta_unaccel_x, event->delta_unaccel_y); } static void handle_gesture_pinch(InputInfoPtr pInfo, xf86ITEventGesturePinch *event) { DeviceIntPtr dev = pInfo->dev; xf86ITDevicePtr driver_data = pInfo->private; xf86IDrvMsg(pInfo, X_DEBUG, "Handling gesture pinch event\n"); driver_data->last_event_num++; xf86PostGesturePinchEvent(dev, event->gesture_type, event->num_touches, event->flags, event->delta_x, event->delta_y, event->delta_unaccel_x, event->delta_unaccel_y, event->scale, event->delta_angle); } static void client_new_handle_event(InputInfoPtr pInfo, xf86ITEventAny *event) { switch (event->header.type) { case XF86IT_EVENT_CLIENT_VERSION: handle_client_version(pInfo, &event->version); break; default: xf86IDrvMsg(pInfo, X_ERROR, "Event before client is ready: event type %d\n", event->header.type); teardown_client_connection(pInfo); break; } } static void client_ready_handle_event(InputInfoPtr pInfo, xf86ITEventAny *event) { switch (event->header.type) { case XF86IT_EVENT_WAIT_FOR_SYNC: handle_wait_for_sync(pInfo); break; case XF86IT_EVENT_MOTION: handle_motion(pInfo, &event->motion); break; case XF86IT_EVENT_PROXIMITY: handle_proximity(pInfo, &event->proximity); break; case XF86IT_EVENT_BUTTON: handle_button(pInfo, &event->button); break; case XF86IT_EVENT_KEY: handle_key(pInfo, &event->key); break; case XF86IT_EVENT_TOUCH: handle_touch(pInfo, &event->touch); break; case XF86IT_EVENT_GESTURE_PINCH: handle_gesture_pinch(pInfo, &(event->pinch)); break; case XF86IT_EVENT_GESTURE_SWIPE: handle_gesture_swipe(pInfo, &(event->swipe)); break; case XF86IT_EVENT_CLIENT_VERSION: xf86IDrvMsg(pInfo, X_ERROR, "Only single ClientVersion event is allowed\n"); teardown_client_connection(pInfo); break; default: xf86IDrvMsg(pInfo, X_ERROR, "Invalid event when client is ready %d\n", event->header.type); teardown_client_connection(pInfo); break; } } static void handle_event(InputInfoPtr pInfo, xf86ITEventAny *event) { xf86ITDevicePtr driver_data = pInfo->private; if (!pInfo->dev->public.on) return; switch (driver_data->client_state) { case CLIENT_STATE_NOT_CONNECTED: xf86IDrvMsg(pInfo, X_ERROR, "Got event when client is not connected\n"); break; case CLIENT_STATE_NEW: client_new_handle_event(pInfo, event); break; case CLIENT_STATE_READY: client_ready_handle_event(pInfo, event); break; } } static bool is_supported_event(enum xf86ITEventType type) { switch (type) { case XF86IT_EVENT_CLIENT_VERSION: case XF86IT_EVENT_WAIT_FOR_SYNC: case XF86IT_EVENT_MOTION: case XF86IT_EVENT_PROXIMITY: case XF86IT_EVENT_BUTTON: case XF86IT_EVENT_KEY: case XF86IT_EVENT_TOUCH: case XF86IT_EVENT_GESTURE_PINCH: case XF86IT_EVENT_GESTURE_SWIPE: return true; } return false; } static int get_event_size(enum xf86ITEventType type) { switch (type) { case XF86IT_EVENT_CLIENT_VERSION: return sizeof(xf86ITEventClientVersion); case XF86IT_EVENT_WAIT_FOR_SYNC: return sizeof(xf86ITEventWaitForSync); case XF86IT_EVENT_MOTION: return sizeof(xf86ITEventMotion); case XF86IT_EVENT_PROXIMITY: return sizeof(xf86ITEventProximity); case XF86IT_EVENT_BUTTON: return sizeof(xf86ITEventButton); case XF86IT_EVENT_KEY: return sizeof(xf86ITEventKey); case XF86IT_EVENT_TOUCH: return sizeof(xf86ITEventTouch); case XF86IT_EVENT_GESTURE_PINCH: return sizeof(xf86ITEventGesturePinch); case XF86IT_EVENT_GESTURE_SWIPE: return sizeof(xf86ITEventGestureSwipe); } abort(); } static void read_input_from_connection(InputInfoPtr pInfo) { xf86ITDevicePtr driver_data = pInfo->private; while (1) { int processed_size = 0; int read_size = read(driver_data->connection_fd, driver_data->buffer.data + driver_data->buffer.valid_length, EVENT_BUFFER_SIZE - driver_data->buffer.valid_length); if (read_size < 0) { if (errno == EAGAIN || errno == EWOULDBLOCK) return; xf86IDrvMsg(pInfo, X_ERROR, "Error reading events: %s\n", strerror(errno)); teardown_client_connection(pInfo); return; } driver_data->buffer.valid_length += read_size; while (1) { xf86ITEventHeader event_header; char *event_begin = driver_data->buffer.data + processed_size; if (driver_data->buffer.valid_length - processed_size < sizeof(xf86ITEventHeader)) break; /* Note that event_begin pointer is not aligned, accessing it directly is undefined behavior. We must use memcpy to copy the data to aligned data area. Most compilers will optimize out this call out and use whatever is most efficient to access unaligned data on a particular platform */ memcpy(&event_header, event_begin, sizeof(xf86ITEventHeader)); if (event_header.length >= EVENT_BUFFER_SIZE) { xf86IDrvMsg(pInfo, X_ERROR, "Received event with too long length: %d\n", event_header.length); teardown_client_connection(pInfo); return; } if (driver_data->buffer.valid_length - processed_size < event_header.length) break; if (is_supported_event(event_header.type)) { int expected_event_size = get_event_size(event_header.type); if (event_header.length != expected_event_size) { xf86IDrvMsg(pInfo, X_ERROR, "Unexpected event length: was %d bytes, " "expected %d (event type: %d)\n", event_header.length, expected_event_size, (int) event_header.type); teardown_client_connection(pInfo); return; } /* We could use event_begin pointer directly, but we want to ensure correct data alignment (if only so that address sanitizer does not complain) */ xf86ITEventAny event_data; memset(&event_data, 0, sizeof(event_data)); memcpy(&event_data, event_begin, event_header.length); handle_event(pInfo, &event_data); } processed_size += event_header.length; } if (processed_size > 0) { memmove(driver_data->buffer.data, driver_data->buffer.data + processed_size, driver_data->buffer.valid_length - processed_size); driver_data->buffer.valid_length -= processed_size; } if (read_size == 0) break; } } static void read_input(InputInfoPtr pInfo) { /* The test input driver does not set up the pInfo->fd and use the regular read_input callback because we want to only accept the connection to the controlling socket after the device is turned on. */ } static const char* get_type_name(InputInfoPtr pInfo, xf86ITDevicePtr driver_data) { switch (driver_data->device_type) { case DEVICE_TOUCH: return XI_TOUCHSCREEN; case DEVICE_POINTER: return XI_MOUSE; case DEVICE_POINTER_GESTURE: return XI_TOUCHPAD; case DEVICE_POINTER_ABS: return XI_MOUSE; case DEVICE_POINTER_ABS_PROXIMITY: return XI_TABLET; case DEVICE_KEYBOARD: return XI_KEYBOARD; } xf86IDrvMsg(pInfo, X_ERROR, "Unexpected device type %d\n", driver_data->device_type); return XI_KEYBOARD; } static xf86ITDevicePtr device_alloc(void) { xf86ITDevicePtr driver_data = calloc(sizeof(xf86ITDevice), 1); if (!driver_data) return NULL; driver_data->socket_fd = -1; driver_data->connection_fd = -1; return driver_data; } static void free_driver_data(xf86ITDevicePtr driver_data) { if (driver_data) { close(driver_data->connection_fd); close(driver_data->socket_fd); if (driver_data->socket_path) unlink(driver_data->socket_path); free(driver_data->socket_path); pthread_mutex_destroy(&driver_data->waiting_for_drain_mutex); if (driver_data->valuators) valuator_mask_free(&driver_data->valuators); if (driver_data->valuators_unaccelerated) valuator_mask_free(&driver_data->valuators_unaccelerated); } free(driver_data); } static int pre_init(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { xf86ITDevicePtr driver_data = NULL; char *device_type_option; struct sockaddr_un addr; pInfo->type_name = 0; pInfo->device_control = device_control; pInfo->read_input = read_input; pInfo->control_proc = NULL; pInfo->switch_mode = NULL; driver_data = device_alloc(); if (!driver_data) goto fail; driver_data->client_state = CLIENT_STATE_NOT_CONNECTED; driver_data->last_event_num = 1; driver_data->last_processed_event_num = 0; driver_data->waiting_for_drain = false; pthread_mutex_init(&driver_data->waiting_for_drain_mutex, NULL); driver_data->valuators = valuator_mask_new(6); if (!driver_data->valuators) goto fail; driver_data->valuators_unaccelerated = valuator_mask_new(2); if (!driver_data->valuators_unaccelerated) goto fail; driver_data->socket_path = xf86SetStrOption(pInfo->options, "SocketPath", NULL); if (!driver_data->socket_path){ xf86IDrvMsg(pInfo, X_ERROR, "SocketPath must be specified\n"); goto fail; } if (strlen(driver_data->socket_path) >= sizeof(addr.sun_path)) { xf86IDrvMsg(pInfo, X_ERROR, "SocketPath is too long\n"); goto fail; } unlink(driver_data->socket_path); #ifdef SOCK_NONBLOCK driver_data->socket_fd = socket(PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0); #else int fd = socket(PF_UNIX, SOCK_STREAM, 0); if (fd >= 0) { flags = fcntl(fd, F_GETFL, 0); if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) { fd = -1; } } driver_data->socket_fd = fd; #endif if (driver_data->socket_fd < 0) { xf86IDrvMsg(pInfo, X_ERROR, "Failed to create a socket for communication: %s\n", strerror(errno)); goto fail; } memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strncpy(addr.sun_path, driver_data->socket_path, sizeof(addr.sun_path) - 1); if (bind(driver_data->socket_fd, (struct sockaddr*) &addr, sizeof(addr)) < 0) { xf86IDrvMsg(pInfo, X_ERROR, "Failed to assign address to the socket\n"); goto fail; } if (chmod(driver_data->socket_path, 0777) != 0) { xf86IDrvMsg(pInfo, X_ERROR, "Failed to chmod the socket path\n"); goto fail; } if (listen(driver_data->socket_fd, 1) != 0) { xf86IDrvMsg(pInfo, X_ERROR, "Failed to listen on the socket\n"); goto fail; } device_type_option = xf86SetStrOption(pInfo->options, "DeviceType", NULL); if (device_type_option == NULL) { xf86IDrvMsg(pInfo, X_ERROR, "DeviceType option must be specified\n"); goto fail; } if (strcmp(device_type_option, "Keyboard") == 0) { driver_data->device_type = DEVICE_KEYBOARD; } else if (strcmp(device_type_option, "Pointer") == 0) { driver_data->device_type = DEVICE_POINTER; } else if (strcmp(device_type_option, "PointerGesture") == 0) { driver_data->device_type = DEVICE_POINTER_GESTURE; } else if (strcmp(device_type_option, "PointerAbsolute") == 0) { driver_data->device_type = DEVICE_POINTER_ABS; } else if (strcmp(device_type_option, "PointerAbsoluteProximity") == 0) { driver_data->device_type = DEVICE_POINTER_ABS_PROXIMITY; } else if (strcmp(device_type_option, "Touch") == 0) { driver_data->device_type = DEVICE_TOUCH; } else { xf86IDrvMsg(pInfo, X_ERROR, "Unsupported DeviceType option.\n"); goto fail; } free(device_type_option); pInfo->private = driver_data; driver_data->pInfo = pInfo; pInfo->type_name = get_type_name(pInfo, driver_data); return Success; fail: free_driver_data(driver_data); return BadValue; } static void uninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) { xf86ITDevicePtr driver_data = pInfo->private; free_driver_data(driver_data); pInfo->private = NULL; xf86DeleteInput(pInfo, flags); } InputDriverRec driver = { .driverVersion = 1, .driverName = "inputtest", .PreInit = pre_init, .UnInit = uninit, .module = NULL, .default_options = NULL, .capabilities = 0 }; static XF86ModuleVersionInfo version_info = { "inputtest", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, ABI_CLASS_XINPUT, ABI_XINPUT_VERSION, MOD_CLASS_XINPUT, {0, 0, 0, 0} }; static void* setup_proc(void *module, void *options, int *errmaj, int *errmin) { xf86AddInputDriver(&driver, module, 0); return module; } _X_EXPORT XF86ModuleData inputtestModuleData = { .vers = &version_info, .setup = &setup_proc, .teardown = NULL }; xorg-server-21.1.16/hw/xfree86/drivers/inputtest/inputtestdrv.man0000644000175000017500000001047014757411105020527 .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH INPUTTEST @drivermansuffix@ @vendorversion@ .SH NAME inputtest \- An X.Org input driver for testing .SH SYNOPSIS .nf .B "Section \*qInputDevice\*q" .BI " Identifier \*q" devname \*q .B " Driver \*qinputtest\*q" .BI " Option \*qSocketPath\*q \*q" path \*q \ \ ... .B EndSection .fi .SH DESCRIPTION .B inputtest is an Xorg input driver that passes events received over a socket on to the server as input events. It supports the full set of the xf86 driver APIs exposed by Xorg. The primary use cases of this input driver are various integration tests that need to interface with the input subsystem. .SH CONFIGURATION DETAILS Please refer to @xconfigfile@(@filemansuffix@) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver. .PP External process can communicate with the input driver via a named socket that is created after the driver is initialized. The paths to the socket is passed via input driver options. .PP The following driver .B Options are supported: .TP 7 .BI "Option \*qSocketPath\*q \*q" string \*q Sets the path where the driver will create a named socket. Any existing file at that location will be removed. .TP 7 .BI "Option \*qDeviceType\*q \*q" string \*q Sets the type of the device to be emulated. .IP .BI Keyboard Initializes a keyboard device. .IP .BI Pointer Initializes a relative-mode pointer device. It will have four valuators - a "Rel X" valuator at axis 0 and a "Rel Y" valuator at axis 1. A horizontal scroll valuator will be set up at axis 2. A vertical scroll valuator will be set up at axis 3. .IP .BI PointerAbsolute Initializes an absolute-mode pointer device. It will have four valuators - an "Abs X" valuator at axis 0 and an "Abs Y" valuator at axis 1. A horizontal scroll valuator will be set up at axis 2. A vertical scroll valuator will be set up at axis 3. .IP .BI PointerAbsoluteProximity Initializes an absolute-mode pointer device with proximity support. The valuators are initialized in the same way as for \fBPointerAbsolute\fR type. .IP .BI Touch Initializes a touch device. It will have 5 valuators: an "Abs MT Position X" at axis 0, an "Abs MT Position Y" valuator at axis 1, a horizontal scroll valuator on axis 2, a vertical scroll valuator on axis 3 and an "Abs MT Pressure" valuator at axis 4. .TP 7 .BI "Option \*qTouchCount\*q \*q" int \*q Sets the maximum number of simultaneous touches for touch devices. .TP 7 .BI "Option \*qPointerButtonCount\*q \*q" int \*q Sets the maximum number of buttons in pointer devices. .TP 7 .BI "Option \*qPointerHasPressure\*q \*q" bool \*q Selects whether "Abs Pressure" is available at the axis 4 in pointer devices. .SH INTERFACE WITH THE DRIVER The communication with the driver is a binary protocol defined in include/xf86-input-inputtest-protocol.h .PP At the beginning, the client process that communicates with the driver must connect to the socket that is created by the driver at SocketPath. Once the connection is established, it must write a xf86ITEventClientVersion event and read a xf86ITResponseServerVersion response where the driver specifies the protocol version supported by it. If this version is lower than requested by the client, then the driver will disconnect. .PP After receiving xf86ITResponseServerVersion message the client may send events to the driver. Each event is an instance of one of the .BI xf86ITEvent* structs. The length field defines the full length of the struct in bytes and the event field defines the type of the struct. .PP The responses from the server follow the same structure. Each response is an instance of one of the .BI xf86ITResponse* structs. The length field defines the full length of the struct in bytes and the event field defines the type of the struct. .PP The synchronization with Xorg is performed via .BI xf86ITEventWaitForSync event. After sending such event, the client must read of a .BI xf86ITResponseSyncFinished event from the socket without sending additional events. The completion of the read operation indicates that Xorg has fully processed all input events sent to it so far. .SH AUTHORS Povilas Kanapickas .SH "SEE ALSO" @xservername@(@appmansuffix@), @xconfigfile@(@filemansuffix@), Xserver(@appmansuffix@), X(@miscmansuffix@) xorg-server-21.1.16/hw/xfree86/drivers/modesetting/0000755000175000017500000000000014757411135015623 5xorg-server-21.1.16/hw/xfree86/drivers/modesetting/meson.build0000644000175000017500000000225314757411105017704 modesetting_srcs = [ 'dri2.c', 'driver.c', 'drmmode_display.c', 'dumb_bo.c', 'pageflip.c', 'present.c', 'vblank.c', ] shared_module( 'modesetting_drv', modesetting_srcs, name_prefix: '', include_directories: [inc, xorg_inc], c_args: xorg_c_args, dependencies: [ common_dep, udev_dep, libdrm_dep, gbm_dep, ], install: true, install_dir: join_paths(module_dir, 'drivers'), ) # Test that we don't have any unresolved symbols from our module to Xorg. xorg_build_root = join_paths(meson.build_root(), 'hw', 'xfree86') symbol_test_args = [] symbol_test_args += join_paths(xorg_build_root, 'libxorgserver.so') symbol_test_args += join_paths(xorg_build_root, 'dixmods', 'libshadow.so') if gbm_dep.found() symbol_test_args += join_paths(xorg_build_root, 'glamor_egl', 'libglamoregl.so') endif symbol_test_args += join_paths(xorg_build_root, 'drivers', 'modesetting', 'modesetting_drv.so') install_man(configure_file( input: 'modesetting.man', output: 'modesetting.4', configuration: manpage_config, )) test('modesetting symbol test', xorg_symbol_test, args: symbol_test_args, ) xorg-server-21.1.16/hw/xfree86/drivers/modesetting/Makefile.am0000644000175000017500000000445514757411105017604 # Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, and/or sell copies of the Software, and to permit persons to whom # the Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON 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. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. include $(top_srcdir)/manpages.am AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(LIBDRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS) AM_CPPFLAGS = \ $(XORG_INCS) \ -I$(top_srcdir)/glamor \ -I$(srcdir)/../../ddc \ -I$(srcdir)/../../dri2 \ -I$(srcdir)/../../i2c \ -I$(srcdir)/../../modes \ -I$(srcdir)/../../parser \ -I$(srcdir)/../../ramdac \ $(NULL) modesetting_drv_la_LTLIBRARIES = modesetting_drv.la modesetting_drv_la_LDFLAGS = -module -avoid-version modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS) modesetting_drv_ladir = @moduledir@/drivers modesetting_drv_la_SOURCES = \ dri2.c \ driver.c \ driver.h \ drmmode_display.c \ drmmode_display.h \ dumb_bo.c \ dumb_bo.h \ present.c \ vblank.c \ pageflip.c \ $(NULL) drivermandir = $(DRIVER_MAN_DIR) driverman_PRE = modesetting.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = modesetting.man CLEANFILES = $(driverman_DATA) xorg-server-21.1.16/hw/xfree86/drivers/modesetting/Makefile.in0000644000175000017500000010767714757411115017630 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright 2005 Adam Jackson. # # 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 # on the rights to use, copy, modify, merge, publish, distribute, sub # license, and/or sell copies of the Software, and to permit persons to whom # the Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL # ADAM JACKSON 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. # this is obnoxious: # -module lets us name the module exactly how we want # -avoid-version prevents gratuitous .0.0.0 version numbers on the end # _ladir passes a dummy rpath to libtool so the thing will actually link # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/drivers/modesetting ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(modesetting_drv_ladir)" \ "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" LTLIBRARIES = $(modesetting_drv_la_LTLIBRARIES) am__DEPENDENCIES_1 = modesetting_drv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_modesetting_drv_la_OBJECTS = dri2.lo driver.lo drmmode_display.lo \ dumb_bo.lo present.lo vblank.lo pageflip.lo modesetting_drv_la_OBJECTS = $(am_modesetting_drv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = modesetting_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(modesetting_drv_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dri2.Plo ./$(DEPDIR)/driver.Plo \ ./$(DEPDIR)/drmmode_display.Plo ./$(DEPDIR)/dumb_bo.Plo \ ./$(DEPDIR)/pageflip.Plo ./$(DEPDIR)/present.Plo \ ./$(DEPDIR)/vblank.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(modesetting_drv_la_SOURCES) DIST_SOURCES = $(modesetting_drv_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) EXTRA_DIST = modesetting.man CLEANFILES = $(driverman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(LIBDRM_CFLAGS) $(UDEV_CFLAGS) $(CWARNFLAGS) AM_CPPFLAGS = \ $(XORG_INCS) \ -I$(top_srcdir)/glamor \ -I$(srcdir)/../../ddc \ -I$(srcdir)/../../dri2 \ -I$(srcdir)/../../i2c \ -I$(srcdir)/../../modes \ -I$(srcdir)/../../parser \ -I$(srcdir)/../../ramdac \ $(NULL) modesetting_drv_la_LTLIBRARIES = modesetting_drv.la modesetting_drv_la_LDFLAGS = -module -avoid-version modesetting_drv_la_LIBADD = $(UDEV_LIBS) $(DRM_LIBS) modesetting_drv_ladir = @moduledir@/drivers modesetting_drv_la_SOURCES = \ dri2.c \ driver.c \ driver.h \ drmmode_display.c \ drmmode_display.h \ dumb_bo.c \ dumb_bo.h \ present.c \ vblank.c \ pageflip.c \ $(NULL) driverman_PRE = modesetting.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/drivers/modesetting/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/drivers/modesetting/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-modesetting_drv_laLTLIBRARIES: $(modesetting_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(modesetting_drv_la_LTLIBRARIES)'; test -n "$(modesetting_drv_ladir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(modesetting_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(modesetting_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(modesetting_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(modesetting_drv_ladir)"; \ } uninstall-modesetting_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(modesetting_drv_la_LTLIBRARIES)'; test -n "$(modesetting_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(modesetting_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(modesetting_drv_ladir)/$$f"; \ done clean-modesetting_drv_laLTLIBRARIES: -test -z "$(modesetting_drv_la_LTLIBRARIES)" || rm -f $(modesetting_drv_la_LTLIBRARIES) @list='$(modesetting_drv_la_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } modesetting_drv.la: $(modesetting_drv_la_OBJECTS) $(modesetting_drv_la_DEPENDENCIES) $(EXTRA_modesetting_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(modesetting_drv_la_LINK) -rpath $(modesetting_drv_ladir) $(modesetting_drv_la_OBJECTS) $(modesetting_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmmode_display.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumb_bo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pageflip.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vblank.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(modesetting_drv_ladir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool \ clean-modesetting_drv_laLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dri2.Plo -rm -f ./$(DEPDIR)/driver.Plo -rm -f ./$(DEPDIR)/drmmode_display.Plo -rm -f ./$(DEPDIR)/dumb_bo.Plo -rm -f ./$(DEPDIR)/pageflip.Plo -rm -f ./$(DEPDIR)/present.Plo -rm -f ./$(DEPDIR)/vblank.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-modesetting_drv_laLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dri2.Plo -rm -f ./$(DEPDIR)/driver.Plo -rm -f ./$(DEPDIR)/drmmode_display.Plo -rm -f ./$(DEPDIR)/dumb_bo.Plo -rm -f ./$(DEPDIR)/pageflip.Plo -rm -f ./$(DEPDIR)/present.Plo -rm -f ./$(DEPDIR)/vblank.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA uninstall-modesetting_drv_laLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool \ clean-modesetting_drv_laLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-appmanDATA \ install-data install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man \ install-modesetting_drv_laLTLIBRARIES install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-appmanDATA \ uninstall-drivermanDATA uninstall-filemanDATA \ uninstall-modesetting_drv_laLTLIBRARIES .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/drivers/modesetting/dri2.c0000644000175000017500000010102714757411105016545 /* * Copyright © 2013 Intel Corporation * Copyright © 2014 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file dri2.c * * Implements generic support for DRI2 on KMS, using glamor pixmaps * for color buffer management (no support for other aux buffers), and * the DRM vblank ioctls. * * This doesn't implement pageflipping yet. */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include #include "list.h" #include "xf86.h" #include "driver.h" #include "dri2.h" #ifdef GLAMOR_HAS_GBM enum ms_dri2_frame_event_type { MS_DRI2_QUEUE_SWAP, MS_DRI2_QUEUE_FLIP, MS_DRI2_WAIT_MSC, }; typedef struct ms_dri2_frame_event { ScreenPtr screen; DrawablePtr drawable; ClientPtr client; enum ms_dri2_frame_event_type type; int frame; xf86CrtcPtr crtc; struct xorg_list drawable_resource, client_resource; /* for swaps & flips only */ DRI2SwapEventPtr event_complete; void *event_data; DRI2BufferPtr front; DRI2BufferPtr back; } ms_dri2_frame_event_rec, *ms_dri2_frame_event_ptr; typedef struct { int refcnt; PixmapPtr pixmap; } ms_dri2_buffer_private_rec, *ms_dri2_buffer_private_ptr; static DevPrivateKeyRec ms_dri2_client_key; static RESTYPE frame_event_client_type, frame_event_drawable_type; static int ms_dri2_server_generation; struct ms_dri2_resource { XID id; RESTYPE type; struct xorg_list list; }; static struct ms_dri2_resource * ms_get_resource(XID id, RESTYPE type) { struct ms_dri2_resource *resource; void *ptr; ptr = NULL; dixLookupResourceByType(&ptr, id, type, NULL, DixWriteAccess); if (ptr) return ptr; resource = malloc(sizeof(*resource)); if (resource == NULL) return NULL; if (!AddResource(id, type, resource)) return NULL; resource->id = id; resource->type = type; xorg_list_init(&resource->list); return resource; } static inline PixmapPtr get_drawable_pixmap(DrawablePtr drawable) { ScreenPtr screen = drawable->pScreen; if (drawable->type == DRAWABLE_PIXMAP) return (PixmapPtr) drawable; else return screen->GetWindowPixmap((WindowPtr) drawable); } static DRI2Buffer2Ptr ms_dri2_create_buffer2(ScreenPtr screen, DrawablePtr drawable, unsigned int attachment, unsigned int format) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); DRI2Buffer2Ptr buffer; PixmapPtr pixmap; CARD32 size; CARD16 pitch; ms_dri2_buffer_private_ptr private; buffer = calloc(1, sizeof *buffer); if (buffer == NULL) return NULL; private = calloc(1, sizeof(*private)); if (private == NULL) { free(buffer); return NULL; } pixmap = NULL; if (attachment == DRI2BufferFrontLeft) { pixmap = get_drawable_pixmap(drawable); if (pixmap && pixmap->drawable.pScreen != screen) pixmap = NULL; if (pixmap) pixmap->refcnt++; } if (pixmap == NULL) { int pixmap_width = drawable->width; int pixmap_height = drawable->height; int pixmap_cpp = (format != 0) ? format : drawable->depth; /* Assume that non-color-buffers require special * device-specific handling. Mesa currently makes no requests * for non-color aux buffers. */ switch (attachment) { case DRI2BufferAccum: case DRI2BufferBackLeft: case DRI2BufferBackRight: case DRI2BufferFakeFrontLeft: case DRI2BufferFakeFrontRight: case DRI2BufferFrontLeft: case DRI2BufferFrontRight: break; case DRI2BufferStencil: case DRI2BufferDepth: case DRI2BufferDepthStencil: case DRI2BufferHiz: default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Request for DRI2 buffer attachment %d unsupported\n", attachment); free(private); free(buffer); return NULL; } pixmap = screen->CreatePixmap(screen, pixmap_width, pixmap_height, pixmap_cpp, 0); if (pixmap == NULL) { free(private); free(buffer); return NULL; } } buffer->attachment = attachment; buffer->cpp = pixmap->drawable.bitsPerPixel / 8; buffer->format = format; /* The buffer's flags field is unused by the client drivers in * Mesa currently. */ buffer->flags = 0; buffer->name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size); buffer->pitch = pitch; if (buffer->name == -1) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to get DRI2 name for pixmap\n"); screen->DestroyPixmap(pixmap); free(private); free(buffer); return NULL; } buffer->driverPrivate = private; private->refcnt = 1; private->pixmap = pixmap; return buffer; } static DRI2Buffer2Ptr ms_dri2_create_buffer(DrawablePtr drawable, unsigned int attachment, unsigned int format) { return ms_dri2_create_buffer2(drawable->pScreen, drawable, attachment, format); } static void ms_dri2_reference_buffer(DRI2Buffer2Ptr buffer) { if (buffer) { ms_dri2_buffer_private_ptr private = buffer->driverPrivate; private->refcnt++; } } static void ms_dri2_destroy_buffer2(ScreenPtr unused, DrawablePtr unused2, DRI2Buffer2Ptr buffer) { if (!buffer) return; if (buffer->driverPrivate) { ms_dri2_buffer_private_ptr private = buffer->driverPrivate; if (--private->refcnt == 0) { ScreenPtr screen = private->pixmap->drawable.pScreen; screen->DestroyPixmap(private->pixmap); free(private); free(buffer); } } else { free(buffer); } } static void ms_dri2_destroy_buffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer) { ms_dri2_destroy_buffer2(NULL, drawable, buffer); } static void ms_dri2_copy_region2(ScreenPtr screen, DrawablePtr drawable, RegionPtr pRegion, DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer) { ms_dri2_buffer_private_ptr src_priv = sourceBuffer->driverPrivate; ms_dri2_buffer_private_ptr dst_priv = destBuffer->driverPrivate; PixmapPtr src_pixmap = src_priv->pixmap; PixmapPtr dst_pixmap = dst_priv->pixmap; DrawablePtr src = (sourceBuffer->attachment == DRI2BufferFrontLeft) ? drawable : &src_pixmap->drawable; DrawablePtr dst = (destBuffer->attachment == DRI2BufferFrontLeft) ? drawable : &dst_pixmap->drawable; int off_x = 0, off_y = 0; Bool translate = FALSE; RegionPtr pCopyClip; GCPtr gc; if (destBuffer->attachment == DRI2BufferFrontLeft && drawable->pScreen != screen) { dst = DRI2UpdatePrime(drawable, destBuffer); if (!dst) return; if (dst != drawable) translate = TRUE; } if (translate && drawable->type == DRAWABLE_WINDOW) { #ifdef COMPOSITE PixmapPtr pixmap = get_drawable_pixmap(drawable); off_x = -pixmap->screen_x; off_y = -pixmap->screen_y; #endif off_x += drawable->x; off_y += drawable->y; } gc = GetScratchGC(dst->depth, screen); if (!gc) return; pCopyClip = REGION_CREATE(screen, NULL, 0); REGION_COPY(screen, pCopyClip, pRegion); if (translate) REGION_TRANSLATE(screen, pCopyClip, off_x, off_y); (*gc->funcs->ChangeClip) (gc, CT_REGION, pCopyClip, 0); ValidateGC(dst, gc); /* It's important that this copy gets submitted before the direct * rendering client submits rendering for the next frame, but we * don't actually need to submit right now. The client will wait * for the DRI2CopyRegion reply or the swap buffer event before * rendering, and we'll hit the flush callback chain before those * messages are sent. We submit our batch buffers from the flush * callback chain so we know that will happen before the client * tries to render again. */ gc->ops->CopyArea(src, dst, gc, 0, 0, drawable->width, drawable->height, off_x, off_y); FreeScratchGC(gc); } static void ms_dri2_copy_region(DrawablePtr drawable, RegionPtr pRegion, DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer) { ms_dri2_copy_region2(drawable->pScreen, drawable, pRegion, destBuffer, sourceBuffer); } static uint64_t gettime_us(void) { struct timespec tv; if (clock_gettime(CLOCK_MONOTONIC, &tv)) return 0; return (uint64_t)tv.tv_sec * 1000000 + tv.tv_nsec / 1000; } /** * Get current frame count and frame count timestamp, based on drawable's * crtc. */ static int ms_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc) { int ret; xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw); /* Drawable not displayed, make up a *monotonic* value */ if (crtc == NULL) { *ust = gettime_us(); *msc = 0; return TRUE; } ret = ms_get_crtc_ust_msc(crtc, ust, msc); if (ret) return FALSE; return TRUE; } static XID get_client_id(ClientPtr client) { XID *ptr = dixGetPrivateAddr(&client->devPrivates, &ms_dri2_client_key); if (*ptr == 0) *ptr = FakeClientID(client->index); return *ptr; } /* * Hook this frame event into the server resource * database so we can clean it up if the drawable or * client exits while the swap is pending */ static Bool ms_dri2_add_frame_event(ms_dri2_frame_event_ptr info) { struct ms_dri2_resource *resource; resource = ms_get_resource(get_client_id(info->client), frame_event_client_type); if (resource == NULL) return FALSE; xorg_list_add(&info->client_resource, &resource->list); resource = ms_get_resource(info->drawable->id, frame_event_drawable_type); if (resource == NULL) { xorg_list_del(&info->client_resource); return FALSE; } xorg_list_add(&info->drawable_resource, &resource->list); return TRUE; } static void ms_dri2_del_frame_event(ms_dri2_frame_event_rec *info) { xorg_list_del(&info->client_resource); xorg_list_del(&info->drawable_resource); if (info->front) ms_dri2_destroy_buffer(NULL, info->front); if (info->back) ms_dri2_destroy_buffer(NULL, info->back); free(info); } static void ms_dri2_blit_swap(DrawablePtr drawable, DRI2BufferPtr dst, DRI2BufferPtr src) { BoxRec box; RegionRec region; box.x1 = 0; box.y1 = 0; box.x2 = drawable->width; box.y2 = drawable->height; REGION_INIT(pScreen, ®ion, &box, 0); ms_dri2_copy_region(drawable, ®ion, dst, src); } struct ms_dri2_vblank_event { XID drawable_id; ClientPtr client; DRI2SwapEventPtr event_complete; void *event_data; }; static void ms_dri2_flip_abort(modesettingPtr ms, void *data) { struct ms_present_vblank_event *event = data; ms->drmmode.dri2_flipping = FALSE; free(event); } static void ms_dri2_flip_handler(modesettingPtr ms, uint64_t msc, uint64_t ust, void *data) { struct ms_dri2_vblank_event *event = data; uint32_t frame = msc; uint32_t tv_sec = ust / 1000000; uint32_t tv_usec = ust % 1000000; DrawablePtr drawable; int status; status = dixLookupDrawable(&drawable, event->drawable_id, serverClient, M_ANY, DixWriteAccess); if (status == Success) DRI2SwapComplete(event->client, drawable, frame, tv_sec, tv_usec, DRI2_FLIP_COMPLETE, event->event_complete, event->event_data); ms->drmmode.dri2_flipping = FALSE; free(event); } static Bool ms_dri2_schedule_flip(ms_dri2_frame_event_ptr info) { DrawablePtr draw = info->drawable; ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); ms_dri2_buffer_private_ptr back_priv = info->back->driverPrivate; struct ms_dri2_vblank_event *event; drmmode_crtc_private_ptr drmmode_crtc = info->crtc->driver_private; event = calloc(1, sizeof(struct ms_dri2_vblank_event)); if (!event) return FALSE; event->drawable_id = draw->id; event->client = info->client; event->event_complete = info->event_complete; event->event_data = info->event_data; if (ms_do_pageflip(screen, back_priv->pixmap, event, drmmode_crtc->vblank_pipe, FALSE, ms_dri2_flip_handler, ms_dri2_flip_abort, "DRI2-flip")) { ms->drmmode.dri2_flipping = TRUE; return TRUE; } return FALSE; } static Bool update_front(DrawablePtr draw, DRI2BufferPtr front) { ScreenPtr screen = draw->pScreen; PixmapPtr pixmap = get_drawable_pixmap(draw); ms_dri2_buffer_private_ptr priv = front->driverPrivate; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); CARD32 size; CARD16 pitch; int name; name = ms->glamor.name_from_pixmap(pixmap, &pitch, &size); if (name < 0) return FALSE; front->name = name; (*screen->DestroyPixmap) (priv->pixmap); front->pitch = pixmap->devKind; front->cpp = pixmap->drawable.bitsPerPixel / 8; priv->pixmap = pixmap; pixmap->refcnt++; return TRUE; } static Bool can_exchange(ScrnInfoPtr scrn, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { ms_dri2_buffer_private_ptr front_priv = front->driverPrivate; ms_dri2_buffer_private_ptr back_priv = back->driverPrivate; PixmapPtr front_pixmap; PixmapPtr back_pixmap = back_priv->pixmap; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int num_crtcs_on = 0; int i; for (i = 0; i < config->num_crtc; i++) { drmmode_crtc_private_ptr drmmode_crtc = config->crtc[i]->driver_private; /* Don't do pageflipping if CRTCs are rotated. */ #ifdef GLAMOR_HAS_GBM if (drmmode_crtc->rotate_bo.gbm) return FALSE; #endif if (xf86_crtc_on(config->crtc[i])) num_crtcs_on++; } /* We can't do pageflipping if all the CRTCs are off. */ if (num_crtcs_on == 0) return FALSE; if (!update_front(draw, front)) return FALSE; front_pixmap = front_priv->pixmap; if (front_pixmap->drawable.width != back_pixmap->drawable.width) return FALSE; if (front_pixmap->drawable.height != back_pixmap->drawable.height) return FALSE; if (front_pixmap->drawable.bitsPerPixel != back_pixmap->drawable.bitsPerPixel) return FALSE; if (front_pixmap->devKind != back_pixmap->devKind) return FALSE; return TRUE; } static Bool can_flip(ScrnInfoPtr scrn, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { modesettingPtr ms = modesettingPTR(scrn); return draw->type == DRAWABLE_WINDOW && ms->drmmode.pageflip && !ms->drmmode.sprites_visible && !ms->drmmode.present_flipping && scrn->vtSema && DRI2CanFlip(draw) && can_exchange(scrn, draw, front, back); } static void ms_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { ms_dri2_buffer_private_ptr front_priv = front->driverPrivate; ms_dri2_buffer_private_ptr back_priv = back->driverPrivate; ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); msPixmapPrivPtr front_pix = msGetPixmapPriv(&ms->drmmode, front_priv->pixmap); msPixmapPrivPtr back_pix = msGetPixmapPriv(&ms->drmmode, back_priv->pixmap); msPixmapPrivRec tmp_pix; RegionRec region; int tmp; /* Swap BO names so DRI works */ tmp = front->name; front->name = back->name; back->name = tmp; /* Swap pixmap privates */ tmp_pix = *front_pix; *front_pix = *back_pix; *back_pix = tmp_pix; ms->glamor.egl_exchange_buffers(front_priv->pixmap, back_priv->pixmap); /* Post damage on the front buffer so that listeners, such * as DisplayLink know take a copy and shove it over the USB. */ region.extents.x1 = region.extents.y1 = 0; region.extents.x2 = front_priv->pixmap->drawable.width; region.extents.y2 = front_priv->pixmap->drawable.height; region.data = NULL; DamageRegionAppend(&front_priv->pixmap->drawable, ®ion); DamageRegionProcessPending(&front_priv->pixmap->drawable); } static void ms_dri2_frame_event_handler(uint64_t msc, uint64_t usec, void *data) { ms_dri2_frame_event_ptr frame_info = data; DrawablePtr drawable = frame_info->drawable; ScreenPtr screen = frame_info->screen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); uint32_t tv_sec = usec / 1000000; uint32_t tv_usec = usec % 1000000; if (!drawable) { ms_dri2_del_frame_event(frame_info); return; } switch (frame_info->type) { case MS_DRI2_QUEUE_FLIP: if (can_flip(scrn, drawable, frame_info->front, frame_info->back) && ms_dri2_schedule_flip(frame_info)) { ms_dri2_exchange_buffers(drawable, frame_info->front, frame_info->back); break; } /* else fall through to blit */ case MS_DRI2_QUEUE_SWAP: ms_dri2_blit_swap(drawable, frame_info->front, frame_info->back); DRI2SwapComplete(frame_info->client, drawable, msc, tv_sec, tv_usec, DRI2_BLIT_COMPLETE, frame_info->client ? frame_info->event_complete : NULL, frame_info->event_data); break; case MS_DRI2_WAIT_MSC: if (frame_info->client) DRI2WaitMSCComplete(frame_info->client, drawable, msc, tv_sec, tv_usec); break; default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event (type %d) received\n", __func__, frame_info->type); break; } ms_dri2_del_frame_event(frame_info); } static void ms_dri2_frame_event_abort(void *data) { ms_dri2_frame_event_ptr frame_info = data; ms_dri2_del_frame_event(frame_info); } /** * Request a DRM event when the requested conditions will be satisfied. * * We need to handle the event and ask the server to wake up the client when * we receive it. */ static int ms_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc, CARD64 divisor, CARD64 remainder) { ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); ms_dri2_frame_event_ptr wait_info; int ret; xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw); CARD64 current_msc, current_ust, request_msc; uint32_t seq; uint64_t queued_msc; /* Drawable not visible, return immediately */ if (!crtc) goto out_complete; wait_info = calloc(1, sizeof(*wait_info)); if (!wait_info) goto out_complete; wait_info->screen = screen; wait_info->drawable = draw; wait_info->client = client; wait_info->type = MS_DRI2_WAIT_MSC; if (!ms_dri2_add_frame_event(wait_info)) { free(wait_info); wait_info = NULL; goto out_complete; } /* Get current count */ ret = ms_get_crtc_ust_msc(crtc, ¤t_ust, ¤t_msc); /* * If divisor is zero, or current_msc is smaller than target_msc, * we just need to make sure target_msc passes before waking up the * client. */ if (divisor == 0 || current_msc < target_msc) { /* If target_msc already reached or passed, set it to * current_msc to ensure we return a reasonable value back * to the caller. This keeps the client from continually * sending us MSC targets from the past by forcibly updating * their count on this call. */ seq = ms_drm_queue_alloc(crtc, wait_info, ms_dri2_frame_event_handler, ms_dri2_frame_event_abort); if (!seq) goto out_free; if (current_msc >= target_msc) target_msc = current_msc; ret = ms_queue_vblank(crtc, MS_QUEUE_ABSOLUTE, target_msc, &queued_msc, seq); if (!ret) { static int limit = 5; if (limit) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s:%d get vblank counter failed: %s\n", __FUNCTION__, __LINE__, strerror(errno)); limit--; } goto out_free; } wait_info->frame = queued_msc; DRI2BlockClient(client, draw); return TRUE; } /* * If we get here, target_msc has already passed or we don't have one, * so we queue an event that will satisfy the divisor/remainder equation. */ request_msc = current_msc - (current_msc % divisor) + remainder; /* * If calculated remainder is larger than requested remainder, * it means we've passed the last point where * seq % divisor == remainder, so we need to wait for the next time * that will happen. */ if ((current_msc % divisor) >= remainder) request_msc += divisor; seq = ms_drm_queue_alloc(crtc, wait_info, ms_dri2_frame_event_handler, ms_dri2_frame_event_abort); if (!seq) goto out_free; if (!ms_queue_vblank(crtc, MS_QUEUE_ABSOLUTE, request_msc, &queued_msc, seq)) { static int limit = 5; if (limit) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s:%d get vblank counter failed: %s\n", __FUNCTION__, __LINE__, strerror(errno)); limit--; } goto out_free; } wait_info->frame = queued_msc; DRI2BlockClient(client, draw); return TRUE; out_free: ms_dri2_del_frame_event(wait_info); out_complete: DRI2WaitMSCComplete(client, draw, target_msc, 0, 0); return TRUE; } /** * ScheduleSwap is responsible for requesting a DRM vblank event for * the appropriate frame, or executing the swap immediately if it * doesn't need to wait. * * When the swap is complete, the driver should call into the server so it * can send any swap complete events that have been requested. */ static int ms_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back, CARD64 *target_msc, CARD64 divisor, CARD64 remainder, DRI2SwapEventPtr func, void *data) { ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); int ret, flip = 0; xf86CrtcPtr crtc = ms_dri2_crtc_covering_drawable(draw); ms_dri2_frame_event_ptr frame_info = NULL; uint64_t current_msc, current_ust; uint64_t request_msc; uint32_t seq; ms_queue_flag ms_flag = MS_QUEUE_ABSOLUTE; uint64_t queued_msc; /* Drawable not displayed... just complete the swap */ if (!crtc) goto blit_fallback; frame_info = calloc(1, sizeof(*frame_info)); if (!frame_info) goto blit_fallback; frame_info->screen = screen; frame_info->drawable = draw; frame_info->client = client; frame_info->event_complete = func; frame_info->event_data = data; frame_info->front = front; frame_info->back = back; frame_info->crtc = crtc; frame_info->type = MS_DRI2_QUEUE_SWAP; if (!ms_dri2_add_frame_event(frame_info)) { free(frame_info); frame_info = NULL; goto blit_fallback; } ms_dri2_reference_buffer(front); ms_dri2_reference_buffer(back); ret = ms_get_crtc_ust_msc(crtc, ¤t_ust, ¤t_msc); if (ret != Success) goto blit_fallback; /* Flips need to be submitted one frame before */ if (can_flip(scrn, draw, front, back)) { frame_info->type = MS_DRI2_QUEUE_FLIP; flip = 1; } /* Correct target_msc by 'flip' if frame_info->type == MS_DRI2_QUEUE_FLIP. * Do it early, so handling of different timing constraints * for divisor, remainder and msc vs. target_msc works. */ if (*target_msc > 0) *target_msc -= flip; /* If non-pageflipping, but blitting/exchanging, we need to use * DRM_VBLANK_NEXTONMISS to avoid unreliable timestamping later * on. */ if (flip == 0) ms_flag |= MS_QUEUE_NEXT_ON_MISS; /* * If divisor is zero, or current_msc is smaller than target_msc * we just need to make sure target_msc passes before initiating * the swap. */ if (divisor == 0 || current_msc < *target_msc) { /* If target_msc already reached or passed, set it to * current_msc to ensure we return a reasonable value back * to the caller. This makes swap_interval logic more robust. */ if (current_msc >= *target_msc) *target_msc = current_msc; seq = ms_drm_queue_alloc(crtc, frame_info, ms_dri2_frame_event_handler, ms_dri2_frame_event_abort); if (!seq) goto blit_fallback; if (!ms_queue_vblank(crtc, ms_flag, *target_msc, &queued_msc, seq)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "divisor 0 get vblank counter failed: %s\n", strerror(errno)); goto blit_fallback; } *target_msc = queued_msc + flip; frame_info->frame = *target_msc; return TRUE; } /* * If we get here, target_msc has already passed or we don't have one, * and we need to queue an event that will satisfy the divisor/remainder * equation. */ request_msc = current_msc - (current_msc % divisor) + remainder; /* * If the calculated deadline vbl.request.sequence is smaller than * or equal to current_msc, it means we've passed the last point * when effective onset frame seq could satisfy * seq % divisor == remainder, so we need to wait for the next time * this will happen. * This comparison takes the DRM_VBLANK_NEXTONMISS delay into account. */ if (request_msc <= current_msc) request_msc += divisor; seq = ms_drm_queue_alloc(crtc, frame_info, ms_dri2_frame_event_handler, ms_dri2_frame_event_abort); if (!seq) goto blit_fallback; /* Account for 1 frame extra pageflip delay if flip > 0 */ if (!ms_queue_vblank(crtc, ms_flag, request_msc - flip, &queued_msc, seq)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "final get vblank counter failed: %s\n", strerror(errno)); goto blit_fallback; } /* Adjust returned value for 1 fame pageflip offset of flip > 0 */ *target_msc = queued_msc + flip; frame_info->frame = *target_msc; return TRUE; blit_fallback: ms_dri2_blit_swap(draw, front, back); DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data); if (frame_info) ms_dri2_del_frame_event(frame_info); *target_msc = 0; /* offscreen, so zero out target vblank count */ return TRUE; } static int ms_dri2_frame_event_client_gone(void *data, XID id) { struct ms_dri2_resource *resource = data; while (!xorg_list_is_empty(&resource->list)) { ms_dri2_frame_event_ptr info = xorg_list_first_entry(&resource->list, ms_dri2_frame_event_rec, client_resource); xorg_list_del(&info->client_resource); info->client = NULL; } free(resource); return Success; } static int ms_dri2_frame_event_drawable_gone(void *data, XID id) { struct ms_dri2_resource *resource = data; while (!xorg_list_is_empty(&resource->list)) { ms_dri2_frame_event_ptr info = xorg_list_first_entry(&resource->list, ms_dri2_frame_event_rec, drawable_resource); xorg_list_del(&info->drawable_resource); info->drawable = NULL; } free(resource); return Success; } static Bool ms_dri2_register_frame_event_resource_types(void) { frame_event_client_type = CreateNewResourceType(ms_dri2_frame_event_client_gone, "Frame Event Client"); if (!frame_event_client_type) return FALSE; frame_event_drawable_type = CreateNewResourceType(ms_dri2_frame_event_drawable_gone, "Frame Event Drawable"); if (!frame_event_drawable_type) return FALSE; return TRUE; } Bool ms_dri2_screen_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); DRI2InfoRec info; const char *driver_names[2] = { NULL, NULL }; if (!ms->glamor.supports_pixmap_import_export(screen)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "DRI2: glamor lacks support for pixmap import/export\n"); } if (!xf86LoaderCheckSymbol("DRI2Version")) return FALSE; if (!dixRegisterPrivateKey(&ms_dri2_client_key, PRIVATE_CLIENT, sizeof(XID))) return FALSE; if (serverGeneration != ms_dri2_server_generation) { ms_dri2_server_generation = serverGeneration; if (!ms_dri2_register_frame_event_resource_types()) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Cannot register DRI2 frame event resources\n"); return FALSE; } } memset(&info, '\0', sizeof(info)); info.fd = ms->fd; info.driverName = NULL; /* Compat field, unused. */ info.deviceName = drmGetDeviceNameFromFd(ms->fd); info.version = 9; info.CreateBuffer = ms_dri2_create_buffer; info.DestroyBuffer = ms_dri2_destroy_buffer; info.CopyRegion = ms_dri2_copy_region; info.ScheduleSwap = ms_dri2_schedule_swap; info.GetMSC = ms_dri2_get_msc; info.ScheduleWaitMSC = ms_dri2_schedule_wait_msc; info.CreateBuffer2 = ms_dri2_create_buffer2; info.DestroyBuffer2 = ms_dri2_destroy_buffer2; info.CopyRegion2 = ms_dri2_copy_region2; /* Ask Glamor to obtain the DRI driver name via EGL_MESA_query_driver, */ if (ms->glamor.egl_get_driver_name) driver_names[0] = ms->glamor.egl_get_driver_name(screen); if (driver_names[0]) { /* There is no VDPAU driver for Intel, fallback to the generic * OpenGL/VAAPI va_gl backend to emulate VDPAU. Otherwise, * guess that the DRI and VDPAU drivers have the same name. */ if (strcmp(driver_names[0], "i965") == 0 || strcmp(driver_names[0], "iris") == 0 || strcmp(driver_names[0], "crocus") == 0) { driver_names[1] = "va_gl"; } else { driver_names[1] = driver_names[0]; } info.numDrivers = 2; info.driverNames = driver_names; } else { /* EGL_MESA_query_driver was unavailable; let dri2.c select the * driver and fill in these fields for us. */ info.numDrivers = 0; info.driverNames = NULL; } return DRI2ScreenInit(screen, &info); } void ms_dri2_close_screen(ScreenPtr screen) { DRI2CloseScreen(screen); } #endif /* GLAMOR_HAS_GBM */ xorg-server-21.1.16/hw/xfree86/drivers/modesetting/driver.c0000644000175000017500000017462514757411105017216 /* * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. * Copyright 2011 Dave Airlie * Copyright 2019 NVIDIA CORPORATION * All Rights Reserved. * * 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, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 NON-INFRINGEMENT. * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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. * * * Original Author: Alan Hourihane * Rewrite: Dave Airlie * Additional contributors: * Aaron Plattner * */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSproc.h" #include "compiler.h" #include "xf86Pci.h" #include "mipointer.h" #include "mipointrst.h" #include "micmap.h" #include #include "fb.h" #include "edid.h" #include "xf86i2c.h" #include "xf86Crtc.h" #include "miscstruct.h" #include "dixstruct.h" #include "xf86xv.h" #include #include #ifdef XSERVER_PLATFORM_BUS #include "xf86platformBus.h" #endif #ifdef XSERVER_LIBPCIACCESS #include #endif #include "driver.h" static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y); static Bool CloseScreen(ScreenPtr pScreen); static Bool EnterVT(ScrnInfoPtr pScrn); static void Identify(int flags); static const OptionInfoRec *AvailableOptions(int chipid, int busid); static ModeStatus ValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags); static void FreeScreen(ScrnInfoPtr pScrn); static void LeaveVT(ScrnInfoPtr pScrn); static Bool SwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode); static Bool ScreenInit(ScreenPtr pScreen, int argc, char **argv); static Bool PreInit(ScrnInfoPtr pScrn, int flags); static Bool Probe(DriverPtr drv, int flags); static Bool ms_pci_probe(DriverPtr driver, int entity_num, struct pci_device *device, intptr_t match_data); static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data); /* window wrapper functions used to get the notification when * the window property changes */ static Atom vrr_atom; static Bool property_vectors_wrapped; static Bool restore_property_vector; static int (*saved_change_property) (ClientPtr client); static int (*saved_delete_property) (ClientPtr client); #ifdef XSERVER_LIBPCIACCESS static const struct pci_id_match ms_device_match[] = { { PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0x00030000, 0x00ff0000, 0}, {0, 0, 0}, }; #endif #ifndef XSERVER_PLATFORM_BUS struct xf86_platform_device; #endif #ifdef XSERVER_PLATFORM_BUS static Bool ms_platform_probe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *device, intptr_t match_data); #endif _X_EXPORT DriverRec modesetting = { 1, "modesetting", Identify, Probe, AvailableOptions, NULL, 0, ms_driver_func, ms_device_match, ms_pci_probe, #ifdef XSERVER_PLATFORM_BUS ms_platform_probe, #endif }; static SymTabRec Chipsets[] = { {0, "kms"}, {-1, NULL} }; static const OptionInfoRec Options[] = { {OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_DEVICE_PATH, "kmsdev", OPTV_STRING, {0}, FALSE}, {OPTION_SHADOW_FB, "ShadowFB", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_ACCEL_METHOD, "AccelMethod", OPTV_STRING, {0}, FALSE}, {OPTION_PAGEFLIP, "PageFlip", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE}, {OPTION_DOUBLE_SHADOW, "DoubleShadow", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_ATOMIC, "Atomic", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_VARIABLE_REFRESH, "VariableRefresh", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_USE_GAMMA_LUT, "UseGammaLUT", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_ASYNC_FLIP_SECONDARIES, "AsyncFlipSecondaries", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; int ms_entity_index = -1; static MODULESETUPPROTO(Setup); static XF86ModuleVersionInfo VersRec = { "modesetting", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData modesettingModuleData = { &VersRec, Setup, NULL }; static void * Setup(void *module, void *opts, int *errmaj, int *errmin) { static Bool setupDone = 0; /* This module should be loaded only once, but check to be sure. */ if (!setupDone) { setupDone = 1; xf86AddDriver(&modesetting, module, HaveDriverFuncs); /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ return (void *) 1; } else { if (errmaj) *errmaj = LDR_ONCEONLY; return NULL; } } static void Identify(int flags) { xf86PrintChipsets("modesetting", "Driver for Modesetting Kernel Drivers", Chipsets); } modesettingEntPtr ms_ent_priv(ScrnInfoPtr scrn) { DevUnion *pPriv; modesettingPtr ms = modesettingPTR(scrn); pPriv = xf86GetEntityPrivate(ms->pEnt->index, ms_entity_index); return pPriv->ptr; } static int get_passed_fd(void) { if (xf86DRMMasterFd >= 0) { xf86DrvMsg(-1, X_INFO, "Using passed DRM master file descriptor %d\n", xf86DRMMasterFd); return dup(xf86DRMMasterFd); } return -1; } static int open_hw(const char *dev) { int fd; if ((fd = get_passed_fd()) != -1) return fd; if (dev) fd = open(dev, O_RDWR | O_CLOEXEC, 0); else { dev = getenv("KMSDEVICE"); if ((NULL == dev) || ((fd = open(dev, O_RDWR | O_CLOEXEC, 0)) == -1)) { dev = "/dev/dri/card0"; fd = open(dev, O_RDWR | O_CLOEXEC, 0); } } if (fd == -1) xf86DrvMsg(-1, X_ERROR, "open %s: %s\n", dev, strerror(errno)); return fd; } static int check_outputs(int fd, int *count) { drmModeResPtr res = drmModeGetResources(fd); int ret; if (!res) return FALSE; if (count) *count = res->count_connectors; ret = res->count_connectors > 0; #if defined(GLAMOR_HAS_GBM_LINEAR) if (ret == FALSE) { uint64_t value = 0; if (drmGetCap(fd, DRM_CAP_PRIME, &value) == 0 && (value & DRM_PRIME_CAP_EXPORT)) ret = TRUE; } #endif drmModeFreeResources(res); return ret; } static Bool probe_hw(const char *dev, struct xf86_platform_device *platform_dev) { int fd; #ifdef XF86_PDEV_SERVER_FD if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { fd = xf86_platform_device_odev_attributes(platform_dev)->fd; if (fd == -1) return FALSE; return check_outputs(fd, NULL); } #endif fd = open_hw(dev); if (fd != -1) { int ret = check_outputs(fd, NULL); close(fd); return ret; } return FALSE; } static char * ms_DRICreatePCIBusID(const struct pci_device *dev) { char *busID; if (asprintf(&busID, "pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func) == -1) return NULL; return busID; } static Bool probe_hw_pci(const char *dev, struct pci_device *pdev) { int ret = FALSE, fd = open_hw(dev); char *id, *devid; drmSetVersion sv; if (fd == -1) return FALSE; sv.drm_di_major = 1; sv.drm_di_minor = 4; sv.drm_dd_major = -1; sv.drm_dd_minor = -1; if (drmSetInterfaceVersion(fd, &sv)) { close(fd); return FALSE; } id = drmGetBusid(fd); devid = ms_DRICreatePCIBusID(pdev); if (id && devid && !strcmp(id, devid)) ret = check_outputs(fd, NULL); close(fd); free(id); free(devid); return ret; } static const OptionInfoRec * AvailableOptions(int chipid, int busid) { return Options; } static Bool ms_driver_func(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data) { xorgHWFlags *flag; switch (op) { case GET_REQUIRED_HW_INTERFACES: flag = (CARD32 *) data; (*flag) = 0; return TRUE; case SUPPORTS_SERVER_FDS: return TRUE; default: return FALSE; } } static void ms_setup_scrn_hooks(ScrnInfoPtr scrn) { scrn->driverVersion = 1; scrn->driverName = "modesetting"; scrn->name = "modeset"; scrn->Probe = NULL; scrn->PreInit = PreInit; scrn->ScreenInit = ScreenInit; scrn->SwitchMode = SwitchMode; scrn->AdjustFrame = AdjustFrame; scrn->EnterVT = EnterVT; scrn->LeaveVT = LeaveVT; scrn->FreeScreen = FreeScreen; scrn->ValidMode = ValidMode; } static void ms_setup_entity(ScrnInfoPtr scrn, int entity_num) { DevUnion *pPriv; xf86SetEntitySharable(entity_num); if (ms_entity_index == -1) ms_entity_index = xf86AllocateEntityPrivateIndex(); pPriv = xf86GetEntityPrivate(entity_num, ms_entity_index); xf86SetEntityInstanceForScreen(scrn, entity_num, xf86GetNumEntityInstances(entity_num) - 1); if (!pPriv->ptr) pPriv->ptr = xnfcalloc(sizeof(modesettingEntRec), 1); } #ifdef XSERVER_LIBPCIACCESS static Bool ms_pci_probe(DriverPtr driver, int entity_num, struct pci_device *dev, intptr_t match_data) { ScrnInfoPtr scrn = NULL; scrn = xf86ConfigPciEntity(scrn, 0, entity_num, NULL, NULL, NULL, NULL, NULL, NULL); if (scrn) { const char *devpath; GDevPtr devSection = xf86GetDevFromEntity(scrn->entityList[0], scrn->entityInstanceList[0]); devpath = xf86FindOptionValue(devSection->options, "kmsdev"); if (probe_hw_pci(devpath, dev)) { ms_setup_scrn_hooks(scrn); xf86DrvMsg(scrn->scrnIndex, X_CONFIG, "claimed PCI slot %d@%d:%d:%d\n", dev->bus, dev->domain, dev->dev, dev->func); xf86DrvMsg(scrn->scrnIndex, X_INFO, "using %s\n", devpath ? devpath : "default device"); ms_setup_entity(scrn, entity_num); } else scrn = NULL; } return scrn != NULL; } #endif #ifdef XSERVER_PLATFORM_BUS static Bool ms_platform_probe(DriverPtr driver, int entity_num, int flags, struct xf86_platform_device *dev, intptr_t match_data) { ScrnInfoPtr scrn = NULL; const char *path = xf86_platform_device_odev_attributes(dev)->path; int scr_flags = 0; if (flags & PLATFORM_PROBE_GPU_SCREEN) scr_flags = XF86_ALLOCATE_GPU_SCREEN; if (probe_hw(path, dev)) { scrn = xf86AllocateScreen(driver, scr_flags); if (xf86IsEntitySharable(entity_num)) xf86SetEntityShared(entity_num); xf86AddEntityToScreen(scrn, entity_num); ms_setup_scrn_hooks(scrn); xf86DrvMsg(scrn->scrnIndex, X_INFO, "using drv %s\n", path ? path : "default device"); ms_setup_entity(scrn, entity_num); } return scrn != NULL; } #endif static Bool Probe(DriverPtr drv, int flags) { int i, numDevSections; GDevPtr *devSections; Bool foundScreen = FALSE; const char *dev; ScrnInfoPtr scrn = NULL; /* For now, just bail out for PROBE_DETECT. */ if (flags & PROBE_DETECT) return FALSE; /* * Find the config file Device sections that match this * driver, and return if there are none. */ if ((numDevSections = xf86MatchDevice("modesetting", &devSections)) <= 0) { return FALSE; } for (i = 0; i < numDevSections; i++) { int entity_num; dev = xf86FindOptionValue(devSections[i]->options, "kmsdev"); if (probe_hw(dev, NULL)) { entity_num = xf86ClaimFbSlot(drv, 0, devSections[i], TRUE); scrn = xf86ConfigFbEntity(scrn, 0, entity_num, NULL, NULL, NULL, NULL); } if (scrn) { foundScreen = TRUE; ms_setup_scrn_hooks(scrn); scrn->Probe = Probe; xf86DrvMsg(scrn->scrnIndex, X_INFO, "using %s\n", dev ? dev : "default device"); ms_setup_entity(scrn, entity_num); } } free(devSections); return foundScreen; } static Bool GetRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate) return TRUE; pScrn->driverPrivate = xnfcalloc(sizeof(modesettingRec), 1); return TRUE; } static void rotate_clip(PixmapPtr pixmap, BoxPtr rect, drmModeClip *clip, Rotation rotation) { int w = pixmap->drawable.width; int h = pixmap->drawable.height; if (rotation == RR_Rotate_90) { /* Rotate 90 degrees counter clockwise */ clip->x1 = rect->y1; clip->x2 = rect->y2; clip->y1 = w - rect->x2; clip->y2 = w - rect->x1; } else if (rotation == RR_Rotate_180) { /* Rotate 180 degrees */ clip->x1 = w - rect->x2; clip->x2 = w - rect->x1; clip->y1 = h - rect->y2; clip->y2 = h - rect->y1; } else if (rotation == RR_Rotate_270) { /* Rotate 90 degrees clockwise */ clip->x1 = h - rect->y2; clip->x2 = h - rect->y1; clip->y1 = rect->x1; clip->y2 = rect->x2; } else { clip->x1 = rect->x1; clip->x2 = rect->x2; clip->y1 = rect->y1; clip->y2 = rect->y2; } } static int dispatch_dirty_region(ScrnInfoPtr scrn, xf86CrtcPtr crtc, PixmapPtr pixmap, DamagePtr damage, int fb_id) { modesettingPtr ms = modesettingPTR(scrn); RegionPtr dirty = DamageRegion(damage); unsigned num_cliprects = REGION_NUM_RECTS(dirty); int ret = 0; if (num_cliprects) { drmModeClip *clip = xallocarray(num_cliprects, sizeof(drmModeClip)); BoxPtr rect = REGION_RECTS(dirty); int i; if (!clip) return -ENOMEM; /* Rotate and copy rects into clips */ for (i = 0; i < num_cliprects; i++, rect++) rotate_clip(pixmap, rect, &clip[i], crtc->rotation); /* TODO query connector property to see if this is needed */ ret = drmModeDirtyFB(ms->fd, fb_id, clip, num_cliprects); /* if we're swamping it with work, try one at a time */ if (ret == -EINVAL) { for (i = 0; i < num_cliprects; i++) { if ((ret = drmModeDirtyFB(ms->fd, fb_id, &clip[i], 1)) < 0) break; } } free(clip); DamageEmpty(damage); } return ret; } static void dispatch_dirty(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); modesettingPtr ms = modesettingPTR(scrn); PixmapPtr pixmap = pScreen->GetScreenPixmap(pScreen); uint32_t fb_id; int ret, c, x, y ; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!drmmode_crtc) continue; drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y); ret = dispatch_dirty_region(scrn, crtc, pixmap, ms->damage, fb_id); if (ret == -EINVAL || ret == -ENOSYS) { ms->dirty_enabled = FALSE; DamageUnregister(ms->damage); DamageDestroy(ms->damage); ms->damage = NULL; xf86DrvMsg(scrn->scrnIndex, X_INFO, "Disabling kernel dirty updates, not required.\n"); return; } } } static void dispatch_dirty_pixmap(ScrnInfoPtr scrn, xf86CrtcPtr crtc, PixmapPtr ppix) { modesettingPtr ms = modesettingPTR(scrn); msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); DamagePtr damage = ppriv->secondary_damage; int fb_id = ppriv->fb_id; dispatch_dirty_region(scrn, crtc, ppix, damage, fb_id); } static void dispatch_secondary_dirty(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!drmmode_crtc) continue; if (drmmode_crtc->prime_pixmap) dispatch_dirty_pixmap(scrn, crtc, drmmode_crtc->prime_pixmap); if (drmmode_crtc->prime_pixmap_back) dispatch_dirty_pixmap(scrn, crtc, drmmode_crtc->prime_pixmap_back); } } static void redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout) { RegionRec pixregion; PixmapRegionInit(&pixregion, dirty->secondary_dst); DamageRegionAppend(&dirty->secondary_dst->drawable, &pixregion); PixmapSyncDirtyHelper(dirty); if (!screen->isGPU) { #ifdef GLAMOR_HAS_GBM modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); /* * When copying from the primary framebuffer to the shared pixmap, * we must ensure the copy is complete before the secondary starts a * copy to its own framebuffer (some secondarys scanout directly from * the shared pixmap, but not all). */ if (ms->drmmode.glamor) ms->glamor.finish(screen); #endif /* Ensure the secondary processes the damage immediately */ if (timeout) *timeout = 0; } DamageRegionProcessPending(&dirty->secondary_dst->drawable); RegionUninit(&pixregion); } static void ms_dirty_update(ScreenPtr screen, int *timeout) { modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); RegionPtr region; PixmapDirtyUpdatePtr ent; if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return; xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) { region = DamageRegion(ent->damage); if (RegionNotEmpty(region)) { if (!screen->isGPU) { msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ent->secondary_dst->primary_pixmap); if (ppriv->notify_on_damage) { ppriv->notify_on_damage = FALSE; ent->secondary_dst->drawable.pScreen-> SharedPixmapNotifyDamage(ent->secondary_dst); } /* Requested manual updating */ if (ppriv->defer_dirty_update) continue; } redisplay_dirty(screen, ent, timeout); DamageEmpty(ent->damage); } } } static PixmapDirtyUpdatePtr ms_dirty_get_ent(ScreenPtr screen, PixmapPtr secondary_dst) { PixmapDirtyUpdatePtr ent; if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return NULL; xorg_list_for_each_entry(ent, &screen->pixmap_dirty_list, ent) { if (ent->secondary_dst == secondary_dst) return ent; } return NULL; } static void msBlockHandler(ScreenPtr pScreen, void *timeout) { modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); pScreen->BlockHandler = ms->BlockHandler; pScreen->BlockHandler(pScreen, timeout); ms->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = msBlockHandler; if (pScreen->isGPU && !ms->drmmode.reverse_prime_offload_mode) dispatch_secondary_dirty(pScreen); else if (ms->dirty_enabled) dispatch_dirty(pScreen); ms_dirty_update(pScreen, timeout); } static void msBlockHandler_oneshot(ScreenPtr pScreen, void *pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); msBlockHandler(pScreen, pTimeout); drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, FALSE); } Bool ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win) { struct ms_vrr_priv *priv = dixLookupPrivate(&win->devPrivates, &ms->drmmode.vrrPrivateKeyRec); return priv->variable_refresh; } static void ms_vrr_property_update(WindowPtr window, Bool variable_refresh) { ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen); modesettingPtr ms = modesettingPTR(scrn); struct ms_vrr_priv *priv = dixLookupPrivate(&window->devPrivates, &ms->drmmode.vrrPrivateKeyRec); priv->variable_refresh = variable_refresh; if (ms->flip_window == window && ms->drmmode.present_flipping) ms_present_set_screen_vrr(scrn, variable_refresh); } /* Wrapper for xserver/dix/property.c:ProcChangeProperty */ static int ms_change_property(ClientPtr client) { WindowPtr window = NULL; int ret = 0; REQUEST(xChangePropertyReq); client->requestVector[X_ChangeProperty] = saved_change_property; ret = saved_change_property(client); if (restore_property_vector) return ret; client->requestVector[X_ChangeProperty] = ms_change_property; if (ret != Success) return ret; ret = dixLookupWindow(&window, stuff->window, client, DixSetPropAccess); if (ret != Success) return ret; // Checking for the VRR property change on the window if (stuff->property == vrr_atom && xf86ScreenToScrn(window->drawable.pScreen)->PreInit == PreInit && stuff->format == 32 && stuff->nUnits == 1) { uint32_t *value = (uint32_t *)(stuff + 1); ms_vrr_property_update(window, *value != 0); } return ret; } /* Wrapper for xserver/dix/property.c:ProcDeleteProperty */ static int ms_delete_property(ClientPtr client) { WindowPtr window; int ret; REQUEST(xDeletePropertyReq); client->requestVector[X_DeleteProperty] = saved_delete_property; ret = saved_delete_property(client); if (restore_property_vector) return ret; client->requestVector[X_DeleteProperty] = ms_delete_property; if (ret != Success) return ret; ret = dixLookupWindow(&window, stuff->window, client, DixSetPropAccess); if (ret != Success) return ret; if (stuff->property == vrr_atom && xf86ScreenToScrn(window->drawable.pScreen)->PreInit == PreInit) ms_vrr_property_update(window, FALSE); return ret; } static void ms_unwrap_property_requests(ScrnInfoPtr scrn) { int i; if (!property_vectors_wrapped) return; if (ProcVector[X_ChangeProperty] == ms_change_property) ProcVector[X_ChangeProperty] = saved_change_property; else restore_property_vector = TRUE; if (ProcVector[X_DeleteProperty] == ms_delete_property) ProcVector[X_DeleteProperty] = saved_delete_property; else restore_property_vector = TRUE; for (i = 0; i < currentMaxClients; i++) { if (clients[i]->requestVector[X_ChangeProperty] == ms_change_property) { clients[i]->requestVector[X_ChangeProperty] = saved_change_property; } else { restore_property_vector = TRUE; } if (clients[i]->requestVector[X_DeleteProperty] == ms_delete_property) { clients[i]->requestVector[X_DeleteProperty] = saved_delete_property; } else { restore_property_vector = TRUE; } } if (restore_property_vector) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Couldn't unwrap some window property request vectors\n"); } property_vectors_wrapped = FALSE; } static void FreeRec(ScrnInfoPtr pScrn) { modesettingPtr ms; if (!pScrn) return; ms = modesettingPTR(pScrn); if (!ms) return; if (ms->fd > 0) { modesettingEntPtr ms_ent; int ret; ms_ent = ms_ent_priv(pScrn); ms_ent->fd_ref--; if (!ms_ent->fd_ref) { ms_unwrap_property_requests(pScrn); if (ms->pEnt->location.type == BUS_PCI) ret = drmClose(ms->fd); else #ifdef XF86_PDEV_SERVER_FD if (!(ms->pEnt->location.type == BUS_PLATFORM && (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))) #endif ret = close(ms->fd); (void) ret; ms_ent->fd = 0; } } pScrn->driverPrivate = NULL; free(ms->drmmode.Options); free(ms); } #ifdef GLAMOR_HAS_GBM static Bool load_glamor(ScrnInfoPtr pScrn) { void *mod = xf86LoadSubModule(pScrn, GLAMOR_EGL_MODULE_NAME); modesettingPtr ms = modesettingPTR(pScrn); if (!mod) return FALSE; ms->glamor.back_pixmap_from_fd = LoaderSymbolFromModule(mod, "glamor_back_pixmap_from_fd"); ms->glamor.block_handler = LoaderSymbolFromModule(mod, "glamor_block_handler"); ms->glamor.clear_pixmap = LoaderSymbolFromModule(mod, "glamor_clear_pixmap"); ms->glamor.egl_create_textured_pixmap = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap"); ms->glamor.egl_create_textured_pixmap_from_gbm_bo = LoaderSymbolFromModule(mod, "glamor_egl_create_textured_pixmap_from_gbm_bo"); ms->glamor.egl_exchange_buffers = LoaderSymbolFromModule(mod, "glamor_egl_exchange_buffers"); ms->glamor.egl_get_gbm_device = LoaderSymbolFromModule(mod, "glamor_egl_get_gbm_device"); ms->glamor.egl_init = LoaderSymbolFromModule(mod, "glamor_egl_init"); ms->glamor.finish = LoaderSymbolFromModule(mod, "glamor_finish"); ms->glamor.gbm_bo_from_pixmap = LoaderSymbolFromModule(mod, "glamor_gbm_bo_from_pixmap"); ms->glamor.init = LoaderSymbolFromModule(mod, "glamor_init"); ms->glamor.name_from_pixmap = LoaderSymbolFromModule(mod, "glamor_name_from_pixmap"); ms->glamor.set_drawable_modifiers_func = LoaderSymbolFromModule(mod, "glamor_set_drawable_modifiers_func"); ms->glamor.shareable_fd_from_pixmap = LoaderSymbolFromModule(mod, "glamor_shareable_fd_from_pixmap"); ms->glamor.supports_pixmap_import_export = LoaderSymbolFromModule(mod, "glamor_supports_pixmap_import_export"); ms->glamor.xv_init = LoaderSymbolFromModule(mod, "glamor_xv_init"); ms->glamor.egl_get_driver_name = LoaderSymbolFromModule(mod, "glamor_egl_get_driver_name"); return TRUE; } #endif static void try_enable_glamor(ScrnInfoPtr pScrn) { modesettingPtr ms = modesettingPTR(pScrn); const char *accel_method_str = xf86GetOptValString(ms->drmmode.Options, OPTION_ACCEL_METHOD); Bool do_glamor = (!accel_method_str || strcmp(accel_method_str, "glamor") == 0); ms->drmmode.glamor = FALSE; #ifdef GLAMOR_HAS_GBM if (ms->drmmode.force_24_32) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Cannot use glamor with 24bpp packed fb\n"); return; } if (!do_glamor) { xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "glamor disabled\n"); return; } if (load_glamor(pScrn)) { if (ms->glamor.egl_init(pScrn, ms->fd)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialized\n"); ms->drmmode.glamor = TRUE; } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "glamor initialization failed\n"); } } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to load glamor module.\n"); } #else if (do_glamor) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "No glamor support in the X Server\n"); } #endif } static Bool msShouldDoubleShadow(ScrnInfoPtr pScrn, modesettingPtr ms) { Bool ret = FALSE, asked; int from; drmVersionPtr v = drmGetVersion(ms->fd); if (!ms->drmmode.shadow_enable) return FALSE; if (!strcmp(v->name, "mgag200") || !strcmp(v->name, "ast")) /* XXX || rn50 */ ret = TRUE; drmFreeVersion(v); asked = xf86GetOptValBool(ms->drmmode.Options, OPTION_DOUBLE_SHADOW, &ret); if (asked) from = X_CONFIG; else from = X_INFO; xf86DrvMsg(pScrn->scrnIndex, from, "Double-buffered shadow updates: %s\n", ret ? "on" : "off"); return ret; } static Bool ms_get_drm_master_fd(ScrnInfoPtr pScrn) { EntityInfoPtr pEnt; modesettingPtr ms; modesettingEntPtr ms_ent; ms = modesettingPTR(pScrn); ms_ent = ms_ent_priv(pScrn); pEnt = ms->pEnt; if (ms_ent->fd) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, " reusing fd for second head\n"); ms->fd = ms_ent->fd; ms_ent->fd_ref++; return TRUE; } ms->fd_passed = FALSE; if ((ms->fd = get_passed_fd()) >= 0) { ms->fd_passed = TRUE; return TRUE; } #ifdef XSERVER_PLATFORM_BUS if (pEnt->location.type == BUS_PLATFORM) { #ifdef XF86_PDEV_SERVER_FD if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD) ms->fd = xf86_platform_device_odev_attributes(pEnt->location.id.plat)-> fd; else #endif { char *path = xf86_platform_device_odev_attributes(pEnt->location.id.plat)-> path; ms->fd = open_hw(path); } } else #endif #ifdef XSERVER_LIBPCIACCESS if (pEnt->location.type == BUS_PCI) { char *BusID = NULL; struct pci_device *PciInfo; PciInfo = xf86GetPciInfoForEntity(ms->pEnt->index); if (PciInfo) { if ((BusID = ms_DRICreatePCIBusID(PciInfo)) != NULL) { ms->fd = drmOpen(NULL, BusID); free(BusID); } } } else #endif { const char *devicename; devicename = xf86FindOptionValue(ms->pEnt->device->options, "kmsdev"); ms->fd = open_hw(devicename); } if (ms->fd < 0) return FALSE; ms_ent->fd = ms->fd; ms_ent->fd_ref = 1; return TRUE; } static Bool PreInit(ScrnInfoPtr pScrn, int flags) { modesettingPtr ms; rgb defaultWeight = { 0, 0, 0 }; EntityInfoPtr pEnt; uint64_t value = 0; int ret; int bppflags, connector_count; int defaultdepth, defaultbpp; if (pScrn->numEntities != 1) return FALSE; if (flags & PROBE_DETECT) { return FALSE; } /* Allocate driverPrivate */ if (!GetRec(pScrn)) return FALSE; pEnt = xf86GetEntityInfo(pScrn->entityList[0]); ms = modesettingPTR(pScrn); ms->SaveGeneration = -1; ms->pEnt = pEnt; ms->drmmode.is_secondary = FALSE; pScrn->displayWidth = 640; /* default it */ if (xf86IsEntityShared(pScrn->entityList[0])) { if (xf86IsPrimInitDone(pScrn->entityList[0])) ms->drmmode.is_secondary = TRUE; else xf86SetPrimInitDone(pScrn->entityList[0]); } pScrn->monitor = pScrn->confScreen->monitor; pScrn->progClock = TRUE; pScrn->rgbBits = 8; if (!ms_get_drm_master_fd(pScrn)) return FALSE; ms->drmmode.fd = ms->fd; if (!check_outputs(ms->fd, &connector_count)) return FALSE; drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp); if (defaultdepth == 24 && defaultbpp == 24) { ms->drmmode.force_24_32 = TRUE; ms->drmmode.kbpp = 24; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using 24bpp hw front buffer with 32bpp shadow\n"); defaultbpp = 32; } else { ms->drmmode.kbpp = 0; } bppflags = PreferConvert24to32 | SupportConvert24to32 | Support32bppFb; if (!xf86SetDepthBpp (pScrn, defaultdepth, defaultdepth, defaultbpp, bppflags)) return FALSE; switch (pScrn->depth) { case 15: case 16: case 24: case 30: break; default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Given depth (%d) is not supported by the driver\n", pScrn->depth); return FALSE; } xf86PrintDepthBpp(pScrn); if (!ms->drmmode.kbpp) ms->drmmode.kbpp = pScrn->bitsPerPixel; /* Process the options */ xf86CollectOptions(pScrn, NULL); if (!(ms->drmmode.Options = malloc(sizeof(Options)))) return FALSE; memcpy(ms->drmmode.Options, Options, sizeof(Options)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ms->drmmode.Options); if (!xf86SetWeight(pScrn, defaultWeight, defaultWeight)) return FALSE; if (!xf86SetDefaultVisual(pScrn, -1)) return FALSE; if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SW_CURSOR, FALSE)) { ms->drmmode.sw_cursor = TRUE; } ms->cursor_width = 64; ms->cursor_height = 64; ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_WIDTH, &value); if (!ret) { ms->cursor_width = value; } ret = drmGetCap(ms->fd, DRM_CAP_CURSOR_HEIGHT, &value); if (!ret) { ms->cursor_height = value; } try_enable_glamor(pScrn); if (!ms->drmmode.glamor) { Bool prefer_shadow = TRUE; if (ms->drmmode.force_24_32) { prefer_shadow = TRUE; ms->drmmode.shadow_enable = TRUE; } else { ret = drmGetCap(ms->fd, DRM_CAP_DUMB_PREFER_SHADOW, &value); if (!ret) { prefer_shadow = !!value; } ms->drmmode.shadow_enable = xf86ReturnOptValBool(ms->drmmode.Options, OPTION_SHADOW_FB, prefer_shadow); } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "ShadowFB: preferred %s, enabled %s\n", prefer_shadow ? "YES" : "NO", ms->drmmode.force_24_32 ? "FORCE" : ms->drmmode.shadow_enable ? "YES" : "NO"); ms->drmmode.shadow_enable2 = msShouldDoubleShadow(pScrn, ms); } else { if (!pScrn->is_gpu) { MessageType from = xf86GetOptValBool(ms->drmmode.Options, OPTION_VARIABLE_REFRESH, &ms->vrr_support) ? X_CONFIG : X_DEFAULT; xf86DrvMsg(pScrn->scrnIndex, from, "VariableRefresh: %sabled\n", ms->vrr_support ? "en" : "dis"); ms->drmmode.async_flip_secondaries = FALSE; from = xf86GetOptValBool(ms->drmmode.Options, OPTION_ASYNC_FLIP_SECONDARIES, &ms->drmmode.async_flip_secondaries) ? X_CONFIG : X_DEFAULT; xf86DrvMsg(pScrn->scrnIndex, from, "AsyncFlipSecondaries: %sabled\n", ms->drmmode.async_flip_secondaries ? "en" : "dis"); } } ms->drmmode.pageflip = xf86ReturnOptValBool(ms->drmmode.Options, OPTION_PAGEFLIP, TRUE); pScrn->capabilities = 0; ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value); if (ret == 0) { if (connector_count && (value & DRM_PRIME_CAP_IMPORT)) { pScrn->capabilities |= RR_Capability_SinkOutput; if (ms->drmmode.glamor) pScrn->capabilities |= RR_Capability_SinkOffload; } #ifdef GLAMOR_HAS_GBM_LINEAR if (value & DRM_PRIME_CAP_EXPORT && ms->drmmode.glamor) pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SourceOffload; #endif } /* * Use "atomic modesetting disable" request to detect if the kms driver is * atomic capable, regardless if we will actually use atomic modesetting. * This is effectively a no-op, we only care about the return status code. */ ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0); ms->atomic_modeset_capable = (ret == 0); if (xf86ReturnOptValBool(ms->drmmode.Options, OPTION_ATOMIC, FALSE)) { ret = drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 1); ms->atomic_modeset = (ret == 0); } else { ms->atomic_modeset = FALSE; } ms->kms_has_modifiers = FALSE; ret = drmGetCap(ms->fd, DRM_CAP_ADDFB2_MODIFIERS, &value); if (ret == 0 && value != 0) ms->kms_has_modifiers = TRUE; if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS setup failed\n"); goto fail; } /* * If the driver can do gamma correction, it should call xf86SetGamma() here. */ { Gamma zeros = { 0.0, 0.0, 0.0 }; if (!xf86SetGamma(pScrn, zeros)) { return FALSE; } } if (!(pScrn->is_gpu && connector_count == 0) && pScrn->modes == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n"); return FALSE; } pScrn->currentMode = pScrn->modes; /* Set display resolution */ xf86SetDpi(pScrn, 0, 0); /* Load the required sub modules */ if (!xf86LoadSubModule(pScrn, "fb")) { return FALSE; } if (ms->drmmode.shadow_enable) { void *mod = xf86LoadSubModule(pScrn, "shadow"); if (!mod) return FALSE; ms->shadow.Setup = LoaderSymbolFromModule(mod, "shadowSetup"); ms->shadow.Add = LoaderSymbolFromModule(mod, "shadowAdd"); ms->shadow.Remove = LoaderSymbolFromModule(mod, "shadowRemove"); ms->shadow.Update32to24 = LoaderSymbolFromModule(mod, "shadowUpdate32to24"); ms->shadow.UpdatePacked = LoaderSymbolFromModule(mod, "shadowUpdatePacked"); } return TRUE; fail: return FALSE; } static void * msShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure) { ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(pScrn); int stride; stride = (pScrn->displayWidth * ms->drmmode.kbpp) / 8; *size = stride; return ((uint8_t *) ms->drmmode.front_bo.dumb->ptr + row * stride + offset); } /* somewhat arbitrary tile size, in pixels */ #define TILE 16 static int msUpdateIntersect(modesettingPtr ms, shadowBufPtr pBuf, BoxPtr box, xRectangle *prect) { int i, dirty = 0, stride = pBuf->pPixmap->devKind, cpp = ms->drmmode.cpp; int width = (box->x2 - box->x1) * cpp; unsigned char *old, *new; old = ms->drmmode.shadow_fb2; old += (box->y1 * stride) + (box->x1 * cpp); new = ms->drmmode.shadow_fb; new += (box->y1 * stride) + (box->x1 * cpp); for (i = box->y2 - box->y1 - 1; i >= 0; i--) { unsigned char *o = old + i * stride, *n = new + i * stride; if (memcmp(o, n, width) != 0) { dirty = 1; memcpy(o, n, width); } } if (dirty) { prect->x = box->x1; prect->y = box->y1; prect->width = box->x2 - box->x1; prect->height = box->y2 - box->y1; } return dirty; } static void msUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); Bool use_3224 = ms->drmmode.force_24_32 && pScrn->bitsPerPixel == 32; if (ms->drmmode.shadow_enable2 && ms->drmmode.shadow_fb2) do { RegionPtr damage = DamageRegion(pBuf->pDamage), tiles; BoxPtr extents = RegionExtents(damage); xRectangle *prect; int nrects; int i, j, tx1, tx2, ty1, ty2; tx1 = extents->x1 / TILE; tx2 = (extents->x2 + TILE - 1) / TILE; ty1 = extents->y1 / TILE; ty2 = (extents->y2 + TILE - 1) / TILE; nrects = (tx2 - tx1) * (ty2 - ty1); if (!(prect = calloc(nrects, sizeof(xRectangle)))) break; nrects = 0; for (j = ty2 - 1; j >= ty1; j--) { for (i = tx2 - 1; i >= tx1; i--) { BoxRec box; box.x1 = max(i * TILE, extents->x1); box.y1 = max(j * TILE, extents->y1); box.x2 = min((i+1) * TILE, extents->x2); box.y2 = min((j+1) * TILE, extents->y2); if (RegionContainsRect(damage, &box) != rgnOUT) { if (msUpdateIntersect(ms, pBuf, &box, prect + nrects)) { nrects++; } } } } tiles = RegionFromRects(nrects, prect, CT_NONE); RegionIntersect(damage, damage, tiles); RegionDestroy(tiles); free(prect); } while (0); if (use_3224) ms->shadow.Update32to24(pScreen, pBuf); else ms->shadow.UpdatePacked(pScreen, pBuf); } static Bool msEnableSharedPixmapFlipping(RRCrtcPtr crtc, PixmapPtr front, PixmapPtr back) { ScreenPtr screen = crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); EntityInfoPtr pEnt = ms->pEnt; xf86CrtcPtr xf86Crtc = crtc->devPrivate; if (!xf86Crtc) return FALSE; /* Not supported if we can't flip */ if (!ms->drmmode.pageflip) return FALSE; /* Not currently supported with reverse PRIME */ if (ms->drmmode.reverse_prime_offload_mode) return FALSE; #ifdef XSERVER_PLATFORM_BUS if (pEnt->location.type == BUS_PLATFORM) { char *syspath = xf86_platform_device_odev_attributes(pEnt->location.id.plat)-> syspath; /* Not supported for devices using USB transport due to misbehaved * vblank events */ if (syspath && strstr(syspath, "usb")) return FALSE; /* EVDI uses USB transport but is platform device, not usb. * Exclude it explicitly. */ if (syspath && strstr(syspath, "evdi")) return FALSE; } #endif return drmmode_EnableSharedPixmapFlipping(xf86Crtc, &ms->drmmode, front, back); } static void msDisableSharedPixmapFlipping(RRCrtcPtr crtc) { ScreenPtr screen = crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcPtr xf86Crtc = crtc->devPrivate; if (xf86Crtc) drmmode_DisableSharedPixmapFlipping(xf86Crtc, &ms->drmmode); } static Bool msStartFlippingPixmapTracking(RRCrtcPtr crtc, DrawablePtr src, PixmapPtr secondary_dst1, PixmapPtr secondary_dst2, int x, int y, int dst_x, int dst_y, Rotation rotation) { ScreenPtr pScreen = src->pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, secondary_dst1->primary_pixmap), ppriv2 = msGetPixmapPriv(&ms->drmmode, secondary_dst2->primary_pixmap); if (!PixmapStartDirtyTracking(src, secondary_dst1, x, y, dst_x, dst_y, rotation)) { return FALSE; } if (!PixmapStartDirtyTracking(src, secondary_dst2, x, y, dst_x, dst_y, rotation)) { PixmapStopDirtyTracking(src, secondary_dst1); return FALSE; } ppriv1->secondary_src = src; ppriv2->secondary_src = src; ppriv1->dirty = ms_dirty_get_ent(pScreen, secondary_dst1); ppriv2->dirty = ms_dirty_get_ent(pScreen, secondary_dst2); ppriv1->defer_dirty_update = TRUE; ppriv2->defer_dirty_update = TRUE; return TRUE; } static Bool msPresentSharedPixmap(PixmapPtr secondary_dst) { ScreenPtr pScreen = secondary_dst->primary_pixmap->drawable.pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, secondary_dst->primary_pixmap); RegionPtr region = DamageRegion(ppriv->dirty->damage); if (RegionNotEmpty(region)) { redisplay_dirty(ppriv->secondary_src->pScreen, ppriv->dirty, NULL); DamageEmpty(ppriv->dirty->damage); return TRUE; } return FALSE; } static Bool msStopFlippingPixmapTracking(DrawablePtr src, PixmapPtr secondary_dst1, PixmapPtr secondary_dst2) { ScreenPtr pScreen = src->pScreen; modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(pScreen)); msPixmapPrivPtr ppriv1 = msGetPixmapPriv(&ms->drmmode, secondary_dst1->primary_pixmap), ppriv2 = msGetPixmapPriv(&ms->drmmode, secondary_dst2->primary_pixmap); Bool ret = TRUE; ret &= PixmapStopDirtyTracking(src, secondary_dst1); ret &= PixmapStopDirtyTracking(src, secondary_dst2); if (ret) { ppriv1->secondary_src = NULL; ppriv2->secondary_src = NULL; ppriv1->dirty = NULL; ppriv2->dirty = NULL; ppriv1->defer_dirty_update = FALSE; ppriv2->defer_dirty_update = FALSE; } return ret; } static Bool CreateScreenResources(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); PixmapPtr rootPixmap; Bool ret; void *pixels = NULL; int err; pScreen->CreateScreenResources = ms->createScreenResources; ret = pScreen->CreateScreenResources(pScreen); pScreen->CreateScreenResources = CreateScreenResources; if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, pScrn->is_gpu, FALSE)) return FALSE; if (!drmmode_glamor_handle_new_screen_pixmap(&ms->drmmode)) return FALSE; drmmode_uevent_init(pScrn, &ms->drmmode); if (!ms->drmmode.sw_cursor) drmmode_map_cursor_bos(pScrn, &ms->drmmode); if (!ms->drmmode.gbm) { pixels = drmmode_map_front_bo(&ms->drmmode); if (!pixels) return FALSE; } rootPixmap = pScreen->GetScreenPixmap(pScreen); if (ms->drmmode.shadow_enable) pixels = ms->drmmode.shadow_fb; if (ms->drmmode.shadow_enable2) { ms->drmmode.shadow_fb2 = calloc(1, pScrn->displayWidth * pScrn->virtualY * ((pScrn->bitsPerPixel + 7) >> 3)); if (!ms->drmmode.shadow_fb2) ms->drmmode.shadow_enable2 = FALSE; } if (!pScreen->ModifyPixmapHeader(rootPixmap, -1, -1, -1, -1, -1, pixels)) FatalError("Couldn't adjust screen pixmap\n"); if (ms->drmmode.shadow_enable) { if (!ms->shadow.Add(pScreen, rootPixmap, msUpdatePacked, msShadowWindow, 0, 0)) return FALSE; } err = drmModeDirtyFB(ms->fd, ms->drmmode.fb_id, NULL, 0); if (err != -EINVAL && err != -ENOSYS) { ms->damage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, pScreen, rootPixmap); if (ms->damage) { DamageRegister(&rootPixmap->drawable, ms->damage); ms->dirty_enabled = TRUE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Damage tracking initialized\n"); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to create screen damage record\n"); return FALSE; } } if (dixPrivateKeyRegistered(rrPrivKey)) { rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); pScrPriv->rrEnableSharedPixmapFlipping = msEnableSharedPixmapFlipping; pScrPriv->rrDisableSharedPixmapFlipping = msDisableSharedPixmapFlipping; pScrPriv->rrStartFlippingPixmapTracking = msStartFlippingPixmapTracking; } if (ms->vrr_support && !dixRegisterPrivateKey(&ms->drmmode.vrrPrivateKeyRec, PRIVATE_WINDOW, sizeof(struct ms_vrr_priv))) return FALSE; return ret; } static Bool msSharePixmapBacking(PixmapPtr ppix, ScreenPtr secondary, void **handle) { #ifdef GLAMOR_HAS_GBM modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(ppix->drawable.pScreen)); int ret; CARD16 stride; CARD32 size; ret = ms->glamor.shareable_fd_from_pixmap(ppix->drawable.pScreen, ppix, &stride, &size); if (ret == -1) return FALSE; *handle = (void *)(long)(ret); return TRUE; #endif return FALSE; } static Bool msSetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle) { #ifdef GLAMOR_HAS_GBM ScreenPtr screen = ppix->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); Bool ret; int ihandle = (int) (long) fd_handle; if (ihandle == -1) if (!ms->drmmode.reverse_prime_offload_mode) return drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, 0, 0); if (ms->drmmode.reverse_prime_offload_mode) { ret = ms->glamor.back_pixmap_from_fd(ppix, ihandle, ppix->drawable.width, ppix->drawable.height, ppix->devKind, ppix->drawable.depth, ppix->drawable.bitsPerPixel); } else { int size = ppix->devKind * ppix->drawable.height; ret = drmmode_SetSlaveBO(ppix, &ms->drmmode, ihandle, ppix->devKind, size); } if (ret == FALSE) return ret; return TRUE; #else return FALSE; #endif } static Bool msRequestSharedPixmapNotifyDamage(PixmapPtr ppix) { ScreenPtr screen = ppix->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix->primary_pixmap); ppriv->notify_on_damage = TRUE; return TRUE; } static Bool msSharedPixmapNotifyDamage(PixmapPtr ppix) { Bool ret = FALSE; int c; ScreenPtr screen = ppix->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); msPixmapPrivPtr ppriv = msGetPixmapPriv(&ms->drmmode, ppix); if (!ppriv->wait_for_damage) return ret; ppriv->wait_for_damage = FALSE; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!drmmode_crtc) continue; if (!(drmmode_crtc->prime_pixmap && drmmode_crtc->prime_pixmap_back)) continue; // Received damage on primary screen pixmap, schedule present on vblank ret |= drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, &ms->drmmode); } return ret; } static Bool SetMaster(ScrnInfoPtr pScrn) { modesettingPtr ms = modesettingPTR(pScrn); int ret; #ifdef XF86_PDEV_SERVER_FD if (ms->pEnt->location.type == BUS_PLATFORM && (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) return TRUE; #endif if (ms->fd_passed) return TRUE; ret = drmSetMaster(ms->fd); if (ret) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "drmSetMaster failed: %s\n", strerror(errno)); return ret == 0; } /* When the root window is created, initialize the screen contents from * console if -background none was specified on the command line */ static Bool CreateWindow_oneshot(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); Bool ret; pScreen->CreateWindow = ms->CreateWindow; ret = pScreen->CreateWindow(pWin); if (ret) drmmode_copy_fb(pScrn, &ms->drmmode); return ret; } static Bool ScreenInit(ScreenPtr pScreen, int argc, char **argv) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); VisualPtr visual; pScrn->pScreen = pScreen; if (!SetMaster(pScrn)) return FALSE; #ifdef GLAMOR_HAS_GBM if (ms->drmmode.glamor) ms->drmmode.gbm = ms->glamor.egl_get_gbm_device(pScreen); #endif /* HW dependent - FIXME */ pScrn->displayWidth = pScrn->virtualX; if (!drmmode_create_initial_bos(pScrn, &ms->drmmode)) return FALSE; if (ms->drmmode.shadow_enable) { ms->drmmode.shadow_fb = calloc(1, pScrn->displayWidth * pScrn->virtualY * ((pScrn->bitsPerPixel + 7) >> 3)); if (!ms->drmmode.shadow_fb) ms->drmmode.shadow_enable = FALSE; } miClearVisualTypes(); if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; if (!miSetPixmapDepths()) return FALSE; if (!dixRegisterScreenSpecificPrivateKey (pScreen, &ms->drmmode.pixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(msPixmapPrivRec))) { return FALSE; } pScrn->memPhysBase = 0; pScrn->fbOffset = 0; if (!fbScreenInit(pScreen, NULL, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) return FALSE; if (pScrn->bitsPerPixel > 8) { /* Fixup RGB ordering */ visual = pScreen->visuals + pScreen->numVisuals; while (--visual >= pScreen->visuals) { if ((visual->class | DynamicClass) == DirectColor) { visual->offsetRed = pScrn->offset.red; visual->offsetGreen = pScrn->offset.green; visual->offsetBlue = pScrn->offset.blue; visual->redMask = pScrn->mask.red; visual->greenMask = pScrn->mask.green; visual->blueMask = pScrn->mask.blue; } } } fbPictureInit(pScreen, NULL, 0); if (drmmode_init(pScrn, &ms->drmmode) == FALSE) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize glamor at ScreenInit() time.\n"); return FALSE; } if (ms->drmmode.shadow_enable && !ms->shadow.Setup(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "shadow fb init failed\n"); return FALSE; } ms->createScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = CreateScreenResources; xf86SetBlackWhitePixels(pScreen); xf86SetBackingStore(pScreen); xf86SetSilkenMouse(pScreen); miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); /* If pageflip is enabled hook the screen's cursor-sprite (swcursor) funcs. * So that we can disable page-flipping on fallback to a swcursor. */ if (ms->drmmode.pageflip) { miPointerScreenPtr PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); if (!dixRegisterScreenPrivateKey(&ms->drmmode.spritePrivateKeyRec, pScreen, PRIVATE_DEVICE, sizeof(msSpritePrivRec))) return FALSE; ms->SpriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &drmmode_sprite_funcs; } /* Need to extend HWcursor support to handle mask interleave */ if (!ms->drmmode.sw_cursor) xf86_cursors_init(pScreen, ms->cursor_width, ms->cursor_height, HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 | HARDWARE_CURSOR_UPDATE_UNHIDDEN | HARDWARE_CURSOR_ARGB); /* Must force it before EnterVT, so we are in control of VT and * later memory should be bound when allocating, e.g rotate_mem */ pScrn->vtSema = TRUE; if (serverGeneration == 1 && bgNoneRoot && ms->drmmode.glamor) { ms->CreateWindow = pScreen->CreateWindow; pScreen->CreateWindow = CreateWindow_oneshot; } pScreen->SaveScreen = xf86SaveScreen; ms->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = CloseScreen; ms->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = msBlockHandler_oneshot; pScreen->SharePixmapBacking = msSharePixmapBacking; pScreen->SetSharedPixmapBacking = msSetSharedPixmapBacking; pScreen->StartPixmapTracking = PixmapStartDirtyTracking; pScreen->StopPixmapTracking = PixmapStopDirtyTracking; pScreen->SharedPixmapNotifyDamage = msSharedPixmapNotifyDamage; pScreen->RequestSharedPixmapNotifyDamage = msRequestSharedPixmapNotifyDamage; pScreen->PresentSharedPixmap = msPresentSharedPixmap; pScreen->StopFlippingPixmapTracking = msStopFlippingPixmapTracking; if (!xf86CrtcScreenInit(pScreen)) return FALSE; if (!drmmode_setup_colormap(pScreen, pScrn)) return FALSE; if (ms->atomic_modeset) xf86DPMSInit(pScreen, drmmode_set_dpms, 0); else xf86DPMSInit(pScreen, xf86DPMSSet, 0); #ifdef GLAMOR_HAS_GBM if (ms->drmmode.glamor) { XF86VideoAdaptorPtr glamor_adaptor; glamor_adaptor = ms->glamor.xv_init(pScreen, 16); if (glamor_adaptor != NULL) xf86XVScreenInit(pScreen, &glamor_adaptor, 1); else xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize XV support.\n"); } #endif if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); if (!ms_vblank_screen_init(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize vblank support.\n"); return FALSE; } #ifdef GLAMOR_HAS_GBM if (ms->drmmode.glamor) { if (!(ms->drmmode.dri2_enable = ms_dri2_screen_init(pScreen))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize the DRI2 extension.\n"); } /* enable reverse prime if we are a GPU screen, and accelerated, and not * i915, evdi or udl. i915 is happy scanning out from sysmem. * evdi and udl are virtual drivers scanning out from sysmem * backed dumb buffers. */ if (pScreen->isGPU) { drmVersionPtr version; /* enable if we are an accelerated GPU screen */ ms->drmmode.reverse_prime_offload_mode = TRUE; if ((version = drmGetVersion(ms->drmmode.fd))) { if (!strncmp("i915", version->name, version->name_len)) { ms->drmmode.reverse_prime_offload_mode = FALSE; } if (!strncmp("evdi", version->name, version->name_len)) { ms->drmmode.reverse_prime_offload_mode = FALSE; } if (!strncmp("udl", version->name, version->name_len)) { ms->drmmode.reverse_prime_offload_mode = FALSE; } if (!ms->drmmode.reverse_prime_offload_mode) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Disable reverse prime offload mode for %s.\n", version->name); } drmFreeVersion(version); } } } #endif if (!(ms->drmmode.present_enable = ms_present_screen_init(pScreen))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to initialize the Present extension.\n"); } pScrn->vtSema = TRUE; if (ms->vrr_support) { if (!property_vectors_wrapped) { saved_change_property = ProcVector[X_ChangeProperty]; ProcVector[X_ChangeProperty] = ms_change_property; saved_delete_property = ProcVector[X_DeleteProperty]; ProcVector[X_DeleteProperty] = ms_delete_property; property_vectors_wrapped = TRUE; } vrr_atom = MakeAtom("_VARIABLE_REFRESH", strlen("_VARIABLE_REFRESH"), TRUE); } return TRUE; } static void AdjustFrame(ScrnInfoPtr pScrn, int x, int y) { modesettingPtr ms = modesettingPTR(pScrn); drmmode_adjust_frame(pScrn, &ms->drmmode, x, y); } static void FreeScreen(ScrnInfoPtr pScrn) { FreeRec(pScrn); } static void LeaveVT(ScrnInfoPtr pScrn) { modesettingPtr ms = modesettingPTR(pScrn); xf86_hide_cursors(pScrn); pScrn->vtSema = FALSE; #ifdef XF86_PDEV_SERVER_FD if (ms->pEnt->location.type == BUS_PLATFORM && (ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)) return; #endif if (!ms->fd_passed) drmDropMaster(ms->fd); } /* * This gets called when gaining control of the VT, and from ScreenInit(). */ static Bool EnterVT(ScrnInfoPtr pScrn) { modesettingPtr ms = modesettingPTR(pScrn); pScrn->vtSema = TRUE; SetMaster(pScrn); drmmode_update_kms_state(&ms->drmmode); /* allow not all modes to be set successfully since some events might have * happened while not being master that could prevent the previous * configuration from being re-applied. */ if (!drmmode_set_desired_modes(pScrn, &ms->drmmode, TRUE, TRUE)) { xf86DisableUnusedFunctions(pScrn); /* TODO: check that at least one screen is on, to allow the user to fix * their setup if all modeset failed... */ /* Tell the desktop environment that something changed, so that they * can hopefully correct the situation */ RRSetChanged(xf86ScrnToScreen(pScrn)); RRTellChanged(xf86ScrnToScreen(pScrn)); } return TRUE; } static Bool SwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { return xf86SetSingleMode(pScrn, mode, RR_Rotate_0); } static Bool CloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(pScrn); modesettingEntPtr ms_ent = ms_ent_priv(pScrn); /* Clear mask of assigned crtc's in this generation */ ms_ent->assigned_crtcs = 0; #ifdef GLAMOR_HAS_GBM if (ms->drmmode.dri2_enable) { ms_dri2_close_screen(pScreen); } #endif ms_vblank_close_screen(pScreen); if (ms->damage) { DamageUnregister(ms->damage); DamageDestroy(ms->damage); ms->damage = NULL; } if (ms->drmmode.shadow_enable) { ms->shadow.Remove(pScreen, pScreen->GetScreenPixmap(pScreen)); free(ms->drmmode.shadow_fb); ms->drmmode.shadow_fb = NULL; free(ms->drmmode.shadow_fb2); ms->drmmode.shadow_fb2 = NULL; } drmmode_uevent_fini(pScrn, &ms->drmmode); drmmode_free_bos(pScrn, &ms->drmmode); if (ms->drmmode.pageflip) { miPointerScreenPtr PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); if (PointPriv->spriteFuncs == &drmmode_sprite_funcs) PointPriv->spriteFuncs = ms->SpriteFuncs; } if (pScrn->vtSema) { LeaveVT(pScrn); } pScreen->CreateScreenResources = ms->createScreenResources; pScreen->BlockHandler = ms->BlockHandler; pScrn->vtSema = FALSE; pScreen->CloseScreen = ms->CloseScreen; return (*pScreen->CloseScreen) (pScreen); } static ModeStatus ValidMode(ScrnInfoPtr arg, DisplayModePtr mode, Bool verbose, int flags) { return MODE_OK; } xorg-server-21.1.16/hw/xfree86/drivers/modesetting/driver.h0000644000175000017500000001712014757411105017205 /* * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. * Copyright 2019 NVIDIA CORPORATION * All Rights Reserved. * * 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, sub license, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 NON-INFRINGEMENT. * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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. * * * Author: Alan Hourihane * Additional contributors: * Aaron Plattner */ #include #include #include #include #include #include #include #ifdef GLAMOR_HAS_GBM #define GLAMOR_FOR_XORG 1 #include "glamor.h" #include #endif #include "drmmode_display.h" #define MS_LOGLEVEL_DEBUG 4 struct ms_vrr_priv { Bool variable_refresh; }; typedef enum { OPTION_SW_CURSOR, OPTION_DEVICE_PATH, OPTION_SHADOW_FB, OPTION_ACCEL_METHOD, OPTION_PAGEFLIP, OPTION_ZAPHOD_HEADS, OPTION_DOUBLE_SHADOW, OPTION_ATOMIC, OPTION_VARIABLE_REFRESH, OPTION_USE_GAMMA_LUT, OPTION_ASYNC_FLIP_SECONDARIES, } modesettingOpts; typedef struct { int fd; int fd_ref; unsigned long fd_wakeup_registered; /* server generation for which fd has been registered for wakeup handling */ int fd_wakeup_ref; unsigned int assigned_crtcs; } modesettingEntRec, *modesettingEntPtr; typedef void (*ms_drm_handler_proc)(uint64_t frame, uint64_t usec, void *data); typedef void (*ms_drm_abort_proc)(void *data); /** * A tracked handler for an event that will hopefully be generated by * the kernel, and what to do when it is encountered. */ struct ms_drm_queue { struct xorg_list list; xf86CrtcPtr crtc; uint32_t seq; void *data; ScrnInfoPtr scrn; ms_drm_handler_proc handler; ms_drm_abort_proc abort; }; typedef struct _modesettingRec { int fd; Bool fd_passed; int Chipset; EntityInfoPtr pEnt; Bool noAccel; CloseScreenProcPtr CloseScreen; CreateWindowProcPtr CreateWindow; unsigned int SaveGeneration; CreateScreenResourcesProcPtr createScreenResources; ScreenBlockHandlerProcPtr BlockHandler; miPointerSpriteFuncPtr SpriteFuncs; void *driver; drmmode_rec drmmode; drmEventContext event_context; /** * Page flipping stuff. * @{ */ Bool atomic_modeset_capable; Bool atomic_modeset; Bool pending_modeset; /** @} */ DamagePtr damage; Bool dirty_enabled; uint32_t cursor_width, cursor_height; Bool has_queue_sequence; Bool tried_queue_sequence; Bool kms_has_modifiers; /* VRR support */ Bool vrr_support; WindowPtr flip_window; Bool is_connector_vrr_capable; uint32_t connector_prop_id; /* shadow API */ struct { Bool (*Setup)(ScreenPtr); Bool (*Add)(ScreenPtr, PixmapPtr, ShadowUpdateProc, ShadowWindowProc, int, void *); void (*Remove)(ScreenPtr, PixmapPtr); void (*Update32to24)(ScreenPtr, shadowBufPtr); void (*UpdatePacked)(ScreenPtr, shadowBufPtr); } shadow; #ifdef GLAMOR_HAS_GBM /* glamor API */ struct { Bool (*back_pixmap_from_fd)(PixmapPtr, int, CARD16, CARD16, CARD16, CARD8, CARD8); void (*block_handler)(ScreenPtr); void (*clear_pixmap)(PixmapPtr); Bool (*egl_create_textured_pixmap)(PixmapPtr, int, int); Bool (*egl_create_textured_pixmap_from_gbm_bo)(PixmapPtr, struct gbm_bo *, Bool); void (*egl_exchange_buffers)(PixmapPtr, PixmapPtr); struct gbm_device *(*egl_get_gbm_device)(ScreenPtr); Bool (*egl_init)(ScrnInfoPtr, int); void (*finish)(ScreenPtr); struct gbm_bo *(*gbm_bo_from_pixmap)(ScreenPtr, PixmapPtr); Bool (*init)(ScreenPtr, unsigned int); int (*name_from_pixmap)(PixmapPtr, CARD16 *, CARD32 *); void (*set_drawable_modifiers_func)(ScreenPtr, GetDrawableModifiersFuncPtr); int (*shareable_fd_from_pixmap)(ScreenPtr, PixmapPtr, CARD16 *, CARD32 *); Bool (*supports_pixmap_import_export)(ScreenPtr); XF86VideoAdaptorPtr (*xv_init)(ScreenPtr, int); const char *(*egl_get_driver_name)(ScreenPtr); } glamor; #endif } modesettingRec, *modesettingPtr; #define glamor_finish(screen) ms->glamor.finish(screen) #define modesettingPTR(p) ((modesettingPtr)((p)->driverPrivate)) modesettingEntPtr ms_ent_priv(ScrnInfoPtr scrn); uint32_t ms_drm_queue_alloc(xf86CrtcPtr crtc, void *data, ms_drm_handler_proc handler, ms_drm_abort_proc abort); typedef enum ms_queue_flag { MS_QUEUE_ABSOLUTE = 0, MS_QUEUE_RELATIVE = 1, MS_QUEUE_NEXT_ON_MISS = 2 } ms_queue_flag; Bool ms_queue_vblank(xf86CrtcPtr crtc, ms_queue_flag flags, uint64_t msc, uint64_t *msc_queued, uint32_t seq); void ms_drm_abort(ScrnInfoPtr scrn, Bool (*match)(void *data, void *match_data), void *match_data); void ms_drm_abort_seq(ScrnInfoPtr scrn, uint32_t seq); Bool xf86_crtc_on(xf86CrtcPtr crtc); xf86CrtcPtr ms_dri2_crtc_covering_drawable(DrawablePtr pDraw); RRCrtcPtr ms_randr_crtc_covering_drawable(DrawablePtr pDraw); int ms_get_crtc_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc); uint64_t ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint64_t sequence, Bool is64bit); Bool ms_dri2_screen_init(ScreenPtr screen); void ms_dri2_close_screen(ScreenPtr screen); Bool ms_vblank_screen_init(ScreenPtr screen); void ms_vblank_close_screen(ScreenPtr screen); Bool ms_present_screen_init(ScreenPtr screen); #ifdef GLAMOR_HAS_GBM typedef void (*ms_pageflip_handler_proc)(modesettingPtr ms, uint64_t frame, uint64_t usec, void *data); typedef void (*ms_pageflip_abort_proc)(modesettingPtr ms, void *data); Bool ms_do_pageflip(ScreenPtr screen, PixmapPtr new_front, void *event, int ref_crtc_vblank_pipe, Bool async, ms_pageflip_handler_proc pageflip_handler, ms_pageflip_abort_proc pageflip_abort, const char *log_prefix); #endif int ms_flush_drm_events(ScreenPtr screen); Bool ms_window_has_variable_refresh(modesettingPtr ms, WindowPtr win); void ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled); xorg-server-21.1.16/hw/xfree86/drivers/modesetting/drmmode_display.c0000644000175000017500000041226114757411105021066 /* * Copyright © 2007 Red Hat, Inc. * Copyright © 2019 NVIDIA CORPORATION * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * Aaron Plattner * */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include #include #include #include #include "dumb_bo.h" #include "inputstr.h" #include "xf86str.h" #include "X11/Xatom.h" #include "mi.h" #include "micmap.h" #include "xf86cmap.h" #include "xf86DDC.h" #include #include #include #include "xf86Crtc.h" #include "drmmode_display.h" #include "present.h" #include #include #include "driver.h" static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height); static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); static const struct drm_color_ctm ctm_identity = { { 1UL << 32, 0, 0, 0, 1UL << 32, 0, 0, 0, 1UL << 32 } }; static Bool ctm_is_identity(const struct drm_color_ctm *ctm) { const size_t matrix_len = sizeof(ctm->matrix) / sizeof(ctm->matrix[0]); const uint64_t one = 1ULL << 32; const uint64_t neg_zero = 1ULL << 63; int i; for (i = 0; i < matrix_len; i++) { const Bool diagonal = i / 3 == i % 3; const uint64_t val = ctm->matrix[i]; if ((diagonal && val != one) || (!diagonal && val != 0 && val != neg_zero)) { return FALSE; } } return TRUE; } static inline uint32_t * formats_ptr(struct drm_format_modifier_blob *blob) { return (uint32_t *)(((char *)blob) + blob->formats_offset); } static inline struct drm_format_modifier * modifiers_ptr(struct drm_format_modifier_blob *blob) { return (struct drm_format_modifier *)(((char *)blob) + blob->modifiers_offset); } static uint32_t get_opaque_format(uint32_t format) { switch (format) { case DRM_FORMAT_ARGB8888: return DRM_FORMAT_XRGB8888; case DRM_FORMAT_ARGB2101010: return DRM_FORMAT_XRGB2101010; default: return format; } } Bool drmmode_is_format_supported(ScrnInfoPtr scrn, uint32_t format, uint64_t modifier) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c, i, j; /* BO are imported as opaque surface, so let's pretend there is no alpha */ format = get_opaque_format(format); for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; Bool found = FALSE; if (!crtc->enabled) continue; if (drmmode_crtc->num_formats == 0) continue; for (i = 0; i < drmmode_crtc->num_formats; i++) { drmmode_format_ptr iter = &drmmode_crtc->formats[i]; if (iter->format != format) continue; if (modifier == DRM_FORMAT_MOD_INVALID || iter->num_modifiers == 0) { found = TRUE; break; } for (j = 0; j < iter->num_modifiers; j++) { if (iter->modifiers[j] == modifier) { found = TRUE; break; } } break; } if (!found) return FALSE; } return TRUE; } #ifdef GBM_BO_WITH_MODIFIERS static uint32_t get_modifiers_set(ScrnInfoPtr scrn, uint32_t format, uint64_t **modifiers, Bool enabled_crtc_only, Bool exclude_multiplane) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; int c, i, j, k, count_modifiers = 0; uint64_t *tmp, *ret = NULL; /* BOs are imported as opaque surfaces, so pretend the same thing here */ format = get_opaque_format(format); *modifiers = NULL; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (enabled_crtc_only && !crtc->enabled) continue; for (i = 0; i < drmmode_crtc->num_formats; i++) { drmmode_format_ptr iter = &drmmode_crtc->formats[i]; if (iter->format != format) continue; for (j = 0; j < iter->num_modifiers; j++) { Bool found = FALSE; /* Don't choose multi-plane formats for our screen pixmap. * These will get used with frontbuffer rendering, which will * lead to worse-than-tearing with multi-plane formats, as the * primary and auxiliary planes go out of sync. */ if (exclude_multiplane && gbm_device_get_format_modifier_plane_count(drmmode->gbm, format, iter->modifiers[j]) > 1) { continue; } for (k = 0; k < count_modifiers; k++) { if (iter->modifiers[j] == ret[k]) found = TRUE; } if (!found) { count_modifiers++; tmp = realloc(ret, count_modifiers * sizeof(uint64_t)); if (!tmp) { free(ret); return 0; } ret = tmp; ret[count_modifiers - 1] = iter->modifiers[j]; } } } } *modifiers = ret; return count_modifiers; } static Bool get_drawable_modifiers(DrawablePtr draw, uint32_t format, uint32_t *num_modifiers, uint64_t **modifiers) { ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); modesettingPtr ms = modesettingPTR(scrn); if (!present_can_window_flip((WindowPtr) draw) || !ms->drmmode.pageflip || ms->drmmode.dri2_flipping || !scrn->vtSema) { *num_modifiers = 0; *modifiers = NULL; return TRUE; } *num_modifiers = get_modifiers_set(scrn, format, modifiers, TRUE, FALSE); return TRUE; } #endif static Bool drmmode_zaphod_string_matches(ScrnInfoPtr scrn, const char *s, char *output_name) { char **token = xstrtokenize(s, ", \t\n\r"); Bool ret = FALSE; if (!token) return FALSE; for (int i = 0; token[i]; i++) { if (strcmp(token[i], output_name) == 0) ret = TRUE; free(token[i]); } free(token); return ret; } static uint64_t drmmode_prop_get_value(drmmode_prop_info_ptr info, drmModeObjectPropertiesPtr props, uint64_t def) { unsigned int i; if (info->prop_id == 0) return def; for (i = 0; i < props->count_props; i++) { unsigned int j; if (props->props[i] != info->prop_id) continue; /* Simple (non-enum) types can return the value directly */ if (info->num_enum_values == 0) return props->prop_values[i]; /* Map from raw value to enum value */ for (j = 0; j < info->num_enum_values; j++) { if (!info->enum_values[j].valid) continue; if (info->enum_values[j].value != props->prop_values[i]) continue; return j; } } return def; } static uint32_t drmmode_prop_info_update(drmmode_ptr drmmode, drmmode_prop_info_ptr info, unsigned int num_infos, drmModeObjectProperties *props) { drmModePropertyRes *prop; uint32_t valid_mask = 0; unsigned i, j; assert(num_infos <= 32 && "update return type"); for (i = 0; i < props->count_props; i++) { Bool props_incomplete = FALSE; unsigned int k; for (j = 0; j < num_infos; j++) { if (info[j].prop_id == props->props[i]) break; if (!info[j].prop_id) props_incomplete = TRUE; } /* We've already discovered this property. */ if (j != num_infos) continue; /* We haven't found this property ID, but as we've already * found all known properties, we don't need to look any * further. */ if (!props_incomplete) break; prop = drmModeGetProperty(drmmode->fd, props->props[i]); if (!prop) continue; for (j = 0; j < num_infos; j++) { if (!strcmp(prop->name, info[j].name)) break; } /* We don't know/care about this property. */ if (j == num_infos) { drmModeFreeProperty(prop); continue; } info[j].prop_id = props->props[i]; info[j].value = props->prop_values[i]; valid_mask |= 1U << j; if (info[j].num_enum_values == 0) { drmModeFreeProperty(prop); continue; } if (!(prop->flags & DRM_MODE_PROP_ENUM)) { xf86DrvMsg(drmmode->scrn->scrnIndex, X_WARNING, "expected property %s to be an enum," " but it is not; ignoring\n", prop->name); drmModeFreeProperty(prop); continue; } for (k = 0; k < info[j].num_enum_values; k++) { int l; if (info[j].enum_values[k].valid) continue; for (l = 0; l < prop->count_enums; l++) { if (!strcmp(prop->enums[l].name, info[j].enum_values[k].name)) break; } if (l == prop->count_enums) continue; info[j].enum_values[k].valid = TRUE; info[j].enum_values[k].value = prop->enums[l].value; } drmModeFreeProperty(prop); } return valid_mask; } static Bool drmmode_prop_info_copy(drmmode_prop_info_ptr dst, const drmmode_prop_info_rec *src, unsigned int num_props, Bool copy_prop_id) { unsigned int i; memcpy(dst, src, num_props * sizeof(*dst)); for (i = 0; i < num_props; i++) { unsigned int j; if (copy_prop_id) dst[i].prop_id = src[i].prop_id; else dst[i].prop_id = 0; if (src[i].num_enum_values == 0) continue; dst[i].enum_values = malloc(src[i].num_enum_values * sizeof(*dst[i].enum_values)); if (!dst[i].enum_values) goto err; memcpy(dst[i].enum_values, src[i].enum_values, src[i].num_enum_values * sizeof(*dst[i].enum_values)); for (j = 0; j < dst[i].num_enum_values; j++) dst[i].enum_values[j].valid = FALSE; } return TRUE; err: while (i--) free(dst[i].enum_values); return FALSE; } static void drmmode_prop_info_free(drmmode_prop_info_ptr info, int num_props) { int i; for (i = 0; i < num_props; i++) free(info[i].enum_values); } static void drmmode_ConvertToKMode(ScrnInfoPtr scrn, drmModeModeInfo * kmode, DisplayModePtr mode); static int plane_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc, enum drmmode_plane_property prop, uint64_t val) { drmmode_prop_info_ptr info = &drmmode_crtc->props_plane[prop]; int ret; if (!info) return -1; ret = drmModeAtomicAddProperty(req, drmmode_crtc->plane_id, info->prop_id, val); return (ret <= 0) ? -1 : 0; } static int plane_add_props(drmModeAtomicReq *req, xf86CrtcPtr crtc, uint32_t fb_id, int x, int y) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; int ret = 0; ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_FB_ID, fb_id); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_ID, fb_id ? drmmode_crtc->mode_crtc->crtc_id : 0); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_X, x << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_Y, y << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_W, crtc->mode.HDisplay << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_SRC_H, crtc->mode.VDisplay << 16); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_X, 0); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_Y, 0); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_W, crtc->mode.HDisplay); ret |= plane_add_prop(req, drmmode_crtc, DRMMODE_PLANE_CRTC_H, crtc->mode.VDisplay); return ret; } static int crtc_add_prop(drmModeAtomicReq *req, drmmode_crtc_private_ptr drmmode_crtc, enum drmmode_crtc_property prop, uint64_t val) { drmmode_prop_info_ptr info = &drmmode_crtc->props[prop]; int ret; if (!info) return -1; ret = drmModeAtomicAddProperty(req, drmmode_crtc->mode_crtc->crtc_id, info->prop_id, val); return (ret <= 0) ? -1 : 0; } static int connector_add_prop(drmModeAtomicReq *req, drmmode_output_private_ptr drmmode_output, enum drmmode_connector_property prop, uint64_t val) { drmmode_prop_info_ptr info = &drmmode_output->props_connector[prop]; int ret; if (!info) return -1; ret = drmModeAtomicAddProperty(req, drmmode_output->output_id, info->prop_id, val); return (ret <= 0) ? -1 : 0; } static int drmmode_CompareKModes(drmModeModeInfo * kmode, drmModeModeInfo * other) { return memcmp(kmode, other, sizeof(*kmode)); } static int drm_mode_ensure_blob(xf86CrtcPtr crtc, drmModeModeInfo mode_info) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_mode_ptr mode; int ret; if (drmmode_crtc->current_mode && drmmode_CompareKModes(&drmmode_crtc->current_mode->mode_info, &mode_info) == 0) return 0; mode = calloc(sizeof(drmmode_mode_rec), 1); if (!mode) return -1; mode->mode_info = mode_info; ret = drmModeCreatePropertyBlob(ms->fd, &mode->mode_info, sizeof(mode->mode_info), &mode->blob_id); drmmode_crtc->current_mode = mode; xorg_list_add(&mode->entry, &drmmode_crtc->mode_list); return ret; } static int crtc_add_dpms_props(drmModeAtomicReq *req, xf86CrtcPtr crtc, int new_dpms, Bool *active) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; Bool crtc_active = FALSE; int i; int ret = 0; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output = output->driver_private; if (output->crtc != crtc) { if (drmmode_output->current_crtc == crtc) { ret |= connector_add_prop(req, drmmode_output, DRMMODE_CONNECTOR_CRTC_ID, 0); } continue; } if (drmmode_output->output_id == -1) continue; if (new_dpms == DPMSModeOn) crtc_active = TRUE; ret |= connector_add_prop(req, drmmode_output, DRMMODE_CONNECTOR_CRTC_ID, crtc_active ? drmmode_crtc->mode_crtc->crtc_id : 0); } if (crtc_active) { drmModeModeInfo kmode; drmmode_ConvertToKMode(crtc->scrn, &kmode, &crtc->mode); ret |= drm_mode_ensure_blob(crtc, kmode); ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_ACTIVE, 1); ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_MODE_ID, drmmode_crtc->current_mode->blob_id); } else { ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_ACTIVE, 0); ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_MODE_ID, 0); } if (active) *active = crtc_active; return ret; } static void drm_mode_destroy(xf86CrtcPtr crtc, drmmode_mode_ptr mode) { modesettingPtr ms = modesettingPTR(crtc->scrn); if (mode->blob_id) drmModeDestroyPropertyBlob(ms->fd, mode->blob_id); xorg_list_del(&mode->entry); free(mode); } static int drmmode_crtc_can_test_mode(xf86CrtcPtr crtc) { modesettingPtr ms = modesettingPTR(crtc->scrn); return ms->atomic_modeset; } Bool drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t *fb_id, int *x, int *y) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int ret; *fb_id = 0; if (drmmode_crtc->prime_pixmap) { if (!drmmode->reverse_prime_offload_mode) { msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap); *fb_id = ppriv->fb_id; *x = 0; } else *x = drmmode_crtc->prime_pixmap_x; *y = 0; } else if (drmmode_crtc->rotate_fb_id) { *fb_id = drmmode_crtc->rotate_fb_id; *x = *y = 0; } else { *fb_id = drmmode->fb_id; *x = crtc->x; *y = crtc->y; } if (*fb_id == 0) { ret = drmmode_bo_import(drmmode, &drmmode->front_bo, &drmmode->fb_id); if (ret < 0) { ErrorF("failed to add fb %d\n", ret); return FALSE; } *fb_id = drmmode->fb_id; } return TRUE; } void drmmode_set_dpms(ScrnInfoPtr scrn, int dpms, int flags) { modesettingPtr ms = modesettingPTR(scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); drmModeAtomicReq *req = drmModeAtomicAlloc(); uint32_t mode_flags = DRM_MODE_ATOMIC_ALLOW_MODESET; int ret = 0; int i; assert(ms->atomic_modeset); if (!req) return; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output = output->driver_private; if (output->crtc != NULL) continue; ret = connector_add_prop(req, drmmode_output, DRMMODE_CONNECTOR_CRTC_ID, 0); } for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; Bool active = FALSE; ret |= crtc_add_dpms_props(req, crtc, dpms, &active); if (dpms == DPMSModeOn && active && drmmode_crtc->need_modeset) { uint32_t fb_id; int x, y; if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y)) continue; ret |= plane_add_props(req, crtc, fb_id, x, y); drmmode_crtc->need_modeset = FALSE; } } if (ret == 0) drmModeAtomicCommit(ms->fd, req, mode_flags, NULL); drmModeAtomicFree(req); ms->pending_modeset = TRUE; xf86DPMSSet(scrn, dpms, flags); ms->pending_modeset = FALSE; } static int drmmode_output_disable(xf86OutputPtr output) { modesettingPtr ms = modesettingPTR(output->scrn); drmmode_output_private_ptr drmmode_output = output->driver_private; xf86CrtcPtr crtc = drmmode_output->current_crtc; drmModeAtomicReq *req = drmModeAtomicAlloc(); uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET; int ret = 0; assert(ms->atomic_modeset); if (!req) return 1; ret |= connector_add_prop(req, drmmode_output, DRMMODE_CONNECTOR_CRTC_ID, 0); if (crtc) ret |= crtc_add_dpms_props(req, crtc, DPMSModeOff, NULL); if (ret == 0) ret = drmModeAtomicCommit(ms->fd, req, flags, NULL); if (ret == 0) drmmode_output->current_crtc = NULL; drmModeAtomicFree(req); return ret; } static int drmmode_crtc_disable(xf86CrtcPtr crtc) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmModeAtomicReq *req = drmModeAtomicAlloc(); uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET; int ret = 0; assert(ms->atomic_modeset); if (!req) return 1; ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_ACTIVE, 0); ret |= crtc_add_prop(req, drmmode_crtc, DRMMODE_CRTC_MODE_ID, 0); if (ret == 0) ret = drmModeAtomicCommit(ms->fd, req, flags, NULL); drmModeAtomicFree(req); return ret; } static void drmmode_set_ctm(xf86CrtcPtr crtc, const struct drm_color_ctm *ctm) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_prop_info_ptr ctm_info = &drmmode_crtc->props[DRMMODE_CRTC_CTM]; int ret; uint32_t blob_id = 0; if (ctm_info->prop_id == 0) return; if (ctm && drmmode_crtc->use_gamma_lut && !ctm_is_identity(ctm)) { ret = drmModeCreatePropertyBlob(drmmode->fd, ctm, sizeof(*ctm), &blob_id); if (ret != 0) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Failed to create CTM property blob: %d\n", ret); blob_id = 0; } } ret = drmModeObjectSetProperty(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, DRM_MODE_OBJECT_CRTC, ctm_info->prop_id, blob_id); if (ret != 0) xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Failed to set CTM property: %d\n", ret); drmModeDestroyPropertyBlob(drmmode->fd, blob_id); } static int drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only) { modesettingPtr ms = modesettingPTR(crtc->scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeModeInfo kmode; int output_count = 0; uint32_t *output_ids = NULL; uint32_t fb_id; int x, y; int i, ret = 0; const struct drm_color_ctm *ctm = NULL; if (!drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y)) return 1; #ifdef GLAMOR_HAS_GBM /* Make sure any pending drawing will be visible in a new scanout buffer */ if (drmmode->glamor) glamor_finish(crtc->scrn->pScreen); #endif if (ms->atomic_modeset) { drmModeAtomicReq *req = drmModeAtomicAlloc(); Bool active; uint32_t flags = DRM_MODE_ATOMIC_ALLOW_MODESET; if (!req) return 1; ret |= crtc_add_dpms_props(req, crtc, DPMSModeOn, &active); ret |= plane_add_props(req, crtc, active ? fb_id : 0, x, y); /* Orphaned CRTCs need to be disabled right now in atomic mode */ for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr other_crtc = xf86_config->crtc[i]; drmmode_crtc_private_ptr other_drmmode_crtc = other_crtc->driver_private; int lost_outputs = 0; int remaining_outputs = 0; int j; if (other_crtc == crtc) continue; for (j = 0; j < xf86_config->num_output; j++) { xf86OutputPtr output = xf86_config->output[j]; drmmode_output_private_ptr drmmode_output = output->driver_private; if (drmmode_output->current_crtc == other_crtc) { if (output->crtc == crtc) lost_outputs++; else remaining_outputs++; } } if (lost_outputs > 0 && remaining_outputs == 0) { ret |= crtc_add_prop(req, other_drmmode_crtc, DRMMODE_CRTC_ACTIVE, 0); ret |= crtc_add_prop(req, other_drmmode_crtc, DRMMODE_CRTC_MODE_ID, 0); } } if (test_only) flags |= DRM_MODE_ATOMIC_TEST_ONLY; if (ret == 0) ret = drmModeAtomicCommit(ms->fd, req, flags, NULL); if (ret == 0 && !test_only) { for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output = output->driver_private; if (output->crtc == crtc) drmmode_output->current_crtc = crtc; else if (drmmode_output->current_crtc == crtc) drmmode_output->current_crtc = NULL; } } drmModeAtomicFree(req); return ret; } output_ids = calloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) return -1; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; if (output->crtc != crtc) continue; drmmode_output = output->driver_private; if (drmmode_output->output_id == -1) continue; output_ids[output_count] = drmmode_output->output_id; output_count++; ctm = &drmmode_output->ctm; } drmmode_ConvertToKMode(crtc->scrn, &kmode, &crtc->mode); ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, x, y, output_ids, output_count, &kmode); drmmode_set_ctm(crtc, ctm); free(output_ids); return ret; } int drmmode_crtc_flip(xf86CrtcPtr crtc, uint32_t fb_id, uint32_t flags, void *data) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; int ret; if (ms->atomic_modeset) { drmModeAtomicReq *req = drmModeAtomicAlloc(); if (!req) return 1; ret = plane_add_props(req, crtc, fb_id, crtc->x, crtc->y); flags |= DRM_MODE_ATOMIC_NONBLOCK; if (ret == 0) ret = drmModeAtomicCommit(ms->fd, req, flags, data); drmModeAtomicFree(req); return ret; } return drmModePageFlip(ms->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, flags, data); } int drmmode_bo_destroy(drmmode_ptr drmmode, drmmode_bo *bo) { int ret; #ifdef GLAMOR_HAS_GBM if (bo->gbm) { gbm_bo_destroy(bo->gbm); bo->gbm = NULL; } #endif if (bo->dumb) { ret = dumb_bo_destroy(drmmode->fd, bo->dumb); if (ret == 0) bo->dumb = NULL; } return 0; } uint32_t drmmode_bo_get_pitch(drmmode_bo *bo) { #ifdef GLAMOR_HAS_GBM if (bo->gbm) return gbm_bo_get_stride(bo->gbm); #endif return bo->dumb->pitch; } static Bool drmmode_bo_has_bo(drmmode_bo *bo) { #ifdef GLAMOR_HAS_GBM if (bo->gbm) return TRUE; #endif return bo->dumb != NULL; } uint32_t drmmode_bo_get_handle(drmmode_bo *bo) { #ifdef GLAMOR_HAS_GBM if (bo->gbm) return gbm_bo_get_handle(bo->gbm).u32; #endif return bo->dumb->handle; } static void * drmmode_bo_map(drmmode_ptr drmmode, drmmode_bo *bo) { int ret; #ifdef GLAMOR_HAS_GBM if (bo->gbm) return NULL; #endif if (bo->dumb->ptr) return bo->dumb->ptr; ret = dumb_bo_map(drmmode->fd, bo->dumb); if (ret) return NULL; return bo->dumb->ptr; } int drmmode_bo_import(drmmode_ptr drmmode, drmmode_bo *bo, uint32_t *fb_id) { #ifdef GBM_BO_WITH_MODIFIERS modesettingPtr ms = modesettingPTR(drmmode->scrn); if (bo->gbm && ms->kms_has_modifiers && gbm_bo_get_modifier(bo->gbm) != DRM_FORMAT_MOD_INVALID) { int num_fds; num_fds = gbm_bo_get_plane_count(bo->gbm); if (num_fds > 0) { int i; uint32_t format; uint32_t handles[4]; uint32_t strides[4]; uint32_t offsets[4]; uint64_t modifiers[4]; memset(handles, 0, sizeof(handles)); memset(strides, 0, sizeof(strides)); memset(offsets, 0, sizeof(offsets)); memset(modifiers, 0, sizeof(modifiers)); format = gbm_bo_get_format(bo->gbm); format = get_opaque_format(format); for (i = 0; i < num_fds; i++) { handles[i] = gbm_bo_get_handle_for_plane(bo->gbm, i).u32; strides[i] = gbm_bo_get_stride_for_plane(bo->gbm, i); offsets[i] = gbm_bo_get_offset(bo->gbm, i); modifiers[i] = gbm_bo_get_modifier(bo->gbm); } return drmModeAddFB2WithModifiers(drmmode->fd, bo->width, bo->height, format, handles, strides, offsets, modifiers, fb_id, DRM_MODE_FB_MODIFIERS); } } #endif return drmModeAddFB(drmmode->fd, bo->width, bo->height, drmmode->scrn->depth, drmmode->kbpp, drmmode_bo_get_pitch(bo), drmmode_bo_get_handle(bo), fb_id); } static Bool drmmode_create_bo(drmmode_ptr drmmode, drmmode_bo *bo, unsigned width, unsigned height, unsigned bpp) { bo->width = width; bo->height = height; #ifdef GLAMOR_HAS_GBM if (drmmode->glamor) { #ifdef GBM_BO_WITH_MODIFIERS uint32_t num_modifiers; uint64_t *modifiers = NULL; #endif uint32_t format; switch (drmmode->scrn->depth) { case 15: format = GBM_FORMAT_ARGB1555; break; case 16: format = GBM_FORMAT_RGB565; break; case 30: format = GBM_FORMAT_ARGB2101010; break; default: format = GBM_FORMAT_ARGB8888; break; } #ifdef GBM_BO_WITH_MODIFIERS num_modifiers = get_modifiers_set(drmmode->scrn, format, &modifiers, FALSE, TRUE); if (num_modifiers > 0 && !(num_modifiers == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID)) { bo->gbm = gbm_bo_create_with_modifiers(drmmode->gbm, width, height, format, modifiers, num_modifiers); free(modifiers); if (bo->gbm) { bo->used_modifiers = TRUE; return TRUE; } } #endif bo->gbm = gbm_bo_create(drmmode->gbm, width, height, format, GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT); bo->used_modifiers = FALSE; return bo->gbm != NULL; } #endif bo->dumb = dumb_bo_create(drmmode->fd, width, height, bpp); return bo->dumb != NULL; } Bool drmmode_SetSlaveBO(PixmapPtr ppix, drmmode_ptr drmmode, int fd_handle, int pitch, int size) { msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); if (fd_handle == -1) { dumb_bo_destroy(drmmode->fd, ppriv->backing_bo); ppriv->backing_bo = NULL; return TRUE; } ppriv->backing_bo = dumb_get_bo_from_fd(drmmode->fd, fd_handle, pitch, size); if (!ppriv->backing_bo) return FALSE; close(fd_handle); return TRUE; } static Bool drmmode_SharedPixmapPresent(PixmapPtr ppix, xf86CrtcPtr crtc, drmmode_ptr drmmode) { ScreenPtr primary = crtc->randr_crtc->pScreen->current_primary; if (primary->PresentSharedPixmap(ppix)) { /* Success, queue flip to back target */ if (drmmode_SharedPixmapFlip(ppix, crtc, drmmode)) return TRUE; xf86DrvMsg(drmmode->scrn->scrnIndex, X_WARNING, "drmmode_SharedPixmapFlip() failed, trying again next vblank\n"); return drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, drmmode); } /* Failed to present, try again on next vblank after damage */ if (primary->RequestSharedPixmapNotifyDamage) { msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); /* Set flag first in case we are immediately notified */ ppriv->wait_for_damage = TRUE; if (primary->RequestSharedPixmapNotifyDamage(ppix)) return TRUE; else ppriv->wait_for_damage = FALSE; } /* Damage notification not available, just try again on vblank */ return drmmode_SharedPixmapPresentOnVBlank(ppix, crtc, drmmode); } struct vblank_event_args { PixmapPtr frontTarget; PixmapPtr backTarget; xf86CrtcPtr crtc; drmmode_ptr drmmode; Bool flip; }; static void drmmode_SharedPixmapVBlankEventHandler(uint64_t frame, uint64_t usec, void *data) { struct vblank_event_args *args = data; drmmode_crtc_private_ptr drmmode_crtc = args->crtc->driver_private; if (args->flip) { /* frontTarget is being displayed, update crtc to reflect */ drmmode_crtc->prime_pixmap = args->frontTarget; drmmode_crtc->prime_pixmap_back = args->backTarget; /* Safe to present on backTarget, no longer displayed */ drmmode_SharedPixmapPresent(args->backTarget, args->crtc, args->drmmode); } else { /* backTarget is still being displayed, present on frontTarget */ drmmode_SharedPixmapPresent(args->frontTarget, args->crtc, args->drmmode); } free(args); } static void drmmode_SharedPixmapVBlankEventAbort(void *data) { struct vblank_event_args *args = data; msGetPixmapPriv(args->drmmode, args->frontTarget)->flip_seq = 0; free(args); } Bool drmmode_SharedPixmapPresentOnVBlank(PixmapPtr ppix, xf86CrtcPtr crtc, drmmode_ptr drmmode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; msPixmapPrivPtr ppriv = msGetPixmapPriv(drmmode, ppix); struct vblank_event_args *event_args; if (ppix == drmmode_crtc->prime_pixmap) return FALSE; /* Already flipped to this pixmap */ if (ppix != drmmode_crtc->prime_pixmap_back) return FALSE; /* Pixmap is not a scanout pixmap for CRTC */ event_args = calloc(1, sizeof(*event_args)); if (!event_args) return FALSE; event_args->frontTarget = ppix; event_args->backTarget = drmmode_crtc->prime_pixmap; event_args->crtc = crtc; event_args->drmmode = drmmode; event_args->flip = FALSE; ppriv->flip_seq = ms_drm_queue_alloc(crtc, event_args, drmmode_SharedPixmapVBlankEventHandler, drmmode_SharedPixmapVBlankEventAbort); return ms_queue_vblank(crtc, MS_QUEUE_RELATIVE, 1, NULL, ppriv->flip_seq); } Bool drmmode_SharedPixmapFlip(PixmapPtr frontTarget, xf86CrtcPtr crtc, drmmode_ptr drmmode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; msPixmapPrivPtr ppriv_front = msGetPixmapPriv(drmmode, frontTarget); struct vblank_event_args *event_args; event_args = calloc(1, sizeof(*event_args)); if (!event_args) return FALSE; event_args->frontTarget = frontTarget; event_args->backTarget = drmmode_crtc->prime_pixmap; event_args->crtc = crtc; event_args->drmmode = drmmode; event_args->flip = TRUE; ppriv_front->flip_seq = ms_drm_queue_alloc(crtc, event_args, drmmode_SharedPixmapVBlankEventHandler, drmmode_SharedPixmapVBlankEventAbort); if (drmModePageFlip(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, ppriv_front->fb_id, DRM_MODE_PAGE_FLIP_EVENT, (void *)(intptr_t) ppriv_front->flip_seq) < 0) { ms_drm_abort_seq(crtc->scrn, ppriv_front->flip_seq); return FALSE; } return TRUE; } static Bool drmmode_InitSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!drmmode_crtc->enable_flipping) return FALSE; if (drmmode_crtc->flipping_active) return TRUE; drmmode_crtc->flipping_active = drmmode_SharedPixmapPresent(drmmode_crtc->prime_pixmap_back, crtc, drmmode); return drmmode_crtc->flipping_active; } static void drmmode_FiniSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode) { uint32_t seq; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!drmmode_crtc->flipping_active) return; drmmode_crtc->flipping_active = FALSE; /* Abort page flip event handler on prime_pixmap */ seq = msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap)->flip_seq; if (seq) ms_drm_abort_seq(crtc->scrn, seq); /* Abort page flip event handler on prime_pixmap_back */ seq = msGetPixmapPriv(drmmode, drmmode_crtc->prime_pixmap_back)->flip_seq; if (seq) ms_drm_abort_seq(crtc->scrn, seq); } static Bool drmmode_set_target_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix, PixmapPtr *target); Bool drmmode_EnableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode, PixmapPtr front, PixmapPtr back) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->enable_flipping = TRUE; /* Set front scanout pixmap */ drmmode_crtc->enable_flipping &= drmmode_set_target_scanout_pixmap(crtc, front, &drmmode_crtc->prime_pixmap); if (!drmmode_crtc->enable_flipping) return FALSE; /* Set back scanout pixmap */ drmmode_crtc->enable_flipping &= drmmode_set_target_scanout_pixmap(crtc, back, &drmmode_crtc->prime_pixmap_back); if (!drmmode_crtc->enable_flipping) { drmmode_set_target_scanout_pixmap(crtc, NULL, &drmmode_crtc->prime_pixmap); return FALSE; } return TRUE; } void drmmode_DisableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->enable_flipping = FALSE; drmmode_FiniSharedPixmapFlipping(crtc, drmmode); drmmode_set_target_scanout_pixmap(crtc, NULL, &drmmode_crtc->prime_pixmap); drmmode_set_target_scanout_pixmap(crtc, NULL, &drmmode_crtc->prime_pixmap_back); } static void drmmode_ConvertFromKMode(ScrnInfoPtr scrn, drmModeModeInfo * kmode, DisplayModePtr mode) { memset(mode, 0, sizeof(DisplayModeRec)); mode->status = MODE_OK; mode->Clock = kmode->clock; mode->HDisplay = kmode->hdisplay; mode->HSyncStart = kmode->hsync_start; mode->HSyncEnd = kmode->hsync_end; mode->HTotal = kmode->htotal; mode->HSkew = kmode->hskew; mode->VDisplay = kmode->vdisplay; mode->VSyncStart = kmode->vsync_start; mode->VSyncEnd = kmode->vsync_end; mode->VTotal = kmode->vtotal; mode->VScan = kmode->vscan; mode->Flags = kmode->flags; //& FLAG_BITS; mode->name = strdup(kmode->name); if (kmode->type & DRM_MODE_TYPE_DRIVER) mode->type = M_T_DRIVER; if (kmode->type & DRM_MODE_TYPE_PREFERRED) mode->type |= M_T_PREFERRED; xf86SetModeCrtc(mode, scrn->adjustFlags); } static void drmmode_ConvertToKMode(ScrnInfoPtr scrn, drmModeModeInfo * kmode, DisplayModePtr mode) { memset(kmode, 0, sizeof(*kmode)); kmode->clock = mode->Clock; kmode->hdisplay = mode->HDisplay; kmode->hsync_start = mode->HSyncStart; kmode->hsync_end = mode->HSyncEnd; kmode->htotal = mode->HTotal; kmode->hskew = mode->HSkew; kmode->vdisplay = mode->VDisplay; kmode->vsync_start = mode->VSyncStart; kmode->vsync_end = mode->VSyncEnd; kmode->vtotal = mode->VTotal; kmode->vscan = mode->VScan; kmode->flags = mode->Flags; //& FLAG_BITS; if (mode->name) strncpy(kmode->name, mode->name, DRM_DISPLAY_MODE_LEN); kmode->name[DRM_DISPLAY_MODE_LEN - 1] = 0; } static void drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; /* XXX Check if DPMS mode is already the right one */ drmmode_crtc->dpms_mode = mode; if (ms->atomic_modeset) { if (mode != DPMSModeOn && !ms->pending_modeset) drmmode_crtc_disable(crtc); } else if (crtc->enabled == FALSE) { drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL); } } #ifdef GLAMOR_HAS_GBM static PixmapPtr create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id) { PixmapPtr pixmap = drmmode->fbcon_pixmap; drmModeFBPtr fbcon; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); modesettingPtr ms = modesettingPTR(pScrn); Bool ret; if (pixmap) return pixmap; fbcon = drmModeGetFB(drmmode->fd, fbcon_id); if (fbcon == NULL) return NULL; if (fbcon->depth != pScrn->depth || fbcon->width != pScrn->virtualX || fbcon->height != pScrn->virtualY) goto out_free_fb; pixmap = drmmode_create_pixmap_header(pScreen, fbcon->width, fbcon->height, fbcon->depth, fbcon->bpp, fbcon->pitch, NULL); if (!pixmap) goto out_free_fb; ret = ms->glamor.egl_create_textured_pixmap(pixmap, fbcon->handle, fbcon->pitch); if (!ret) { FreePixmap(pixmap); pixmap = NULL; } drmmode->fbcon_pixmap = pixmap; out_free_fb: drmModeFreeFB(fbcon); return pixmap; } #endif void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { #ifdef GLAMOR_HAS_GBM xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); ScreenPtr pScreen = xf86ScrnToScreen(pScrn); PixmapPtr src, dst; int fbcon_id = 0; GCPtr gc; int i; for (i = 0; i < xf86_config->num_crtc; i++) { drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[i]->driver_private; if (drmmode_crtc->mode_crtc->buffer_id) fbcon_id = drmmode_crtc->mode_crtc->buffer_id; } if (!fbcon_id) return; if (fbcon_id == drmmode->fb_id) { /* in some rare case there might be no fbcon and we might already * be the one with the current fb to avoid a false deadlck in * kernel ttm code just do nothing as anyway there is nothing * to do */ return; } src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id); if (!src) return; dst = pScreen->GetScreenPixmap(pScreen); gc = GetScratchGC(pScrn->depth, pScreen); ValidateGC(&dst->drawable, gc); (*gc->ops->CopyArea)(&src->drawable, &dst->drawable, gc, 0, 0, pScrn->virtualX, pScrn->virtualY, 0, 0); FreeScratchGC(gc); pScreen->canDoBGNoneRoot = TRUE; if (drmmode->fbcon_pixmap) pScrn->pScreen->DestroyPixmap(drmmode->fbcon_pixmap); drmmode->fbcon_pixmap = NULL; #endif } static Bool drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { modesettingPtr ms = modesettingPTR(crtc->scrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int saved_x, saved_y; Rotation saved_rotation; DisplayModeRec saved_mode; Bool ret = TRUE; Bool can_test; int i; saved_mode = crtc->mode; saved_x = crtc->x; saved_y = crtc->y; saved_rotation = crtc->rotation; if (mode) { crtc->mode = *mode; crtc->x = x; crtc->y = y; crtc->rotation = rotation; if (!xf86CrtcRotate(crtc)) { goto done; } crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); can_test = drmmode_crtc_can_test_mode(crtc); if (drmmode_crtc_set_mode(crtc, can_test)) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "failed to set mode: %s\n", strerror(errno)); ret = FALSE; goto done; } else ret = TRUE; if (crtc->scrn->pScreen) xf86CrtcSetScreenSubpixelOrder(crtc->scrn->pScreen); ms->pending_modeset = TRUE; drmmode_crtc->need_modeset = FALSE; crtc->funcs->dpms(crtc, DPMSModeOn); if (drmmode_crtc->prime_pixmap_back) drmmode_InitSharedPixmapFlipping(crtc, drmmode); /* go through all the outputs and force DPMS them back on? */ for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; if (output->crtc != crtc) continue; drmmode_output = output->driver_private; if (drmmode_output->output_id == -1) continue; output->funcs->dpms(output, DPMSModeOn); } /* if we only tested the mode previously, really set it now */ if (can_test) drmmode_crtc_set_mode(crtc, FALSE); ms->pending_modeset = FALSE; } done: if (!ret) { crtc->x = saved_x; crtc->y = saved_y; crtc->rotation = saved_rotation; crtc->mode = saved_mode; } else crtc->active = TRUE; return ret; } static void drmmode_set_cursor_colors(xf86CrtcPtr crtc, int bg, int fg) { } static void drmmode_set_cursor_position(xf86CrtcPtr crtc, int x, int y) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeMoveCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, x, y); } static Bool drmmode_set_cursor(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; uint32_t handle = drmmode_crtc->cursor_bo->handle; modesettingPtr ms = modesettingPTR(crtc->scrn); CursorPtr cursor = xf86CurrentCursor(crtc->scrn->pScreen); int ret = -EINVAL; if (cursor == NullCursor) return TRUE; ret = drmModeSetCursor2(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, ms->cursor_width, ms->cursor_height, cursor->bits->xhot, cursor->bits->yhot); /* -EINVAL can mean that an old kernel supports drmModeSetCursor but * not drmModeSetCursor2, though it can mean other things too. */ if (ret == -EINVAL) ret = drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, ms->cursor_width, ms->cursor_height); /* -ENXIO normally means that the current drm driver supports neither * cursor_set nor cursor_set2. Disable hardware cursor support for * the rest of the session in that case. */ if (ret == -ENXIO) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; cursor_info->MaxWidth = cursor_info->MaxHeight = 0; drmmode_crtc->drmmode->sw_cursor = TRUE; } if (ret) /* fallback to swcursor */ return FALSE; return TRUE; } static void drmmode_hide_cursor(xf86CrtcPtr crtc); /* * The load_cursor_argb_check driver hook. * * Sets the hardware cursor by calling the drmModeSetCursor2 ioctl. * On failure, returns FALSE indicating that the X server should fall * back to software cursors. */ static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 *image) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; int i; uint32_t *ptr; /* cursor should be mapped already */ ptr = (uint32_t *) (drmmode_crtc->cursor_bo->ptr); for (i = 0; i < ms->cursor_width * ms->cursor_height; i++) ptr[i] = image[i]; // cpu_to_le32(image[i]); if (drmmode_crtc->cursor_up) return drmmode_set_cursor(crtc); return TRUE; } static void drmmode_hide_cursor(xf86CrtcPtr crtc) { modesettingPtr ms = modesettingPTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_crtc->cursor_up = FALSE; drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, ms->cursor_width, ms->cursor_height); } static Bool drmmode_show_cursor(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->cursor_up = TRUE; return drmmode_set_cursor(crtc); } static void drmmode_set_gamma_lut(drmmode_crtc_private_ptr drmmode_crtc, uint16_t * red, uint16_t * green, uint16_t * blue, int size) { drmmode_ptr drmmode = drmmode_crtc->drmmode; drmmode_prop_info_ptr gamma_lut_info = &drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT]; const uint32_t crtc_id = drmmode_crtc->mode_crtc->crtc_id; uint32_t blob_id; struct drm_color_lut lut[size]; assert(gamma_lut_info->prop_id != 0); for (int i = 0; i < size; i++) { lut[i].red = red[i]; lut[i].green = green[i]; lut[i].blue = blue[i]; } if (drmModeCreatePropertyBlob(drmmode->fd, lut, sizeof(lut), &blob_id)) return; drmModeObjectSetProperty(drmmode->fd, crtc_id, DRM_MODE_OBJECT_CRTC, gamma_lut_info->prop_id, blob_id); drmModeDestroyPropertyBlob(drmmode->fd, blob_id); } static void drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t * red, uint16_t * green, uint16_t * blue, int size) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (drmmode_crtc->use_gamma_lut) { drmmode_set_gamma_lut(drmmode_crtc, red, green, blue, size); } else { drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, size, red, green, blue); } } static Bool drmmode_set_target_scanout_pixmap_gpu(xf86CrtcPtr crtc, PixmapPtr ppix, PixmapPtr *target) { ScreenPtr screen = xf86ScrnToScreen(crtc->scrn); PixmapPtr screenpix = screen->GetScreenPixmap(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int c, total_width = 0, max_height = 0, this_x = 0; if (*target) { PixmapStopDirtyTracking(&(*target)->drawable, screenpix); if (drmmode->fb_id) { drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = 0; } drmmode_crtc->prime_pixmap_x = 0; *target = NULL; } if (!ppix) return TRUE; /* iterate over all the attached crtcs to work out the bounding box */ for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr iter = xf86_config->crtc[c]; if (!iter->enabled && iter != crtc) continue; if (iter == crtc) { this_x = total_width; total_width += ppix->drawable.width; if (max_height < ppix->drawable.height) max_height = ppix->drawable.height; } else { total_width += iter->mode.HDisplay; if (max_height < iter->mode.VDisplay) max_height = iter->mode.VDisplay; } } if (total_width != screenpix->drawable.width || max_height != screenpix->drawable.height) { if (!drmmode_xf86crtc_resize(crtc->scrn, total_width, max_height)) return FALSE; screenpix = screen->GetScreenPixmap(screen); screen->width = screenpix->drawable.width = total_width; screen->height = screenpix->drawable.height = max_height; } drmmode_crtc->prime_pixmap_x = this_x; PixmapStartDirtyTracking(&ppix->drawable, screenpix, 0, 0, this_x, 0, RR_Rotate_0); *target = ppix; return TRUE; } static Bool drmmode_set_target_scanout_pixmap_cpu(xf86CrtcPtr crtc, PixmapPtr ppix, PixmapPtr *target) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; msPixmapPrivPtr ppriv; void *ptr; if (*target) { ppriv = msGetPixmapPriv(drmmode, *target); drmModeRmFB(drmmode->fd, ppriv->fb_id); ppriv->fb_id = 0; if (ppriv->secondary_damage) { DamageUnregister(ppriv->secondary_damage); ppriv->secondary_damage = NULL; } *target = NULL; } if (!ppix) return TRUE; ppriv = msGetPixmapPriv(drmmode, ppix); if (!ppriv->secondary_damage) { ppriv->secondary_damage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, crtc->randr_crtc->pScreen, NULL); } ptr = drmmode_map_secondary_bo(drmmode, ppriv); ppix->devPrivate.ptr = ptr; DamageRegister(&ppix->drawable, ppriv->secondary_damage); if (ppriv->fb_id == 0) { drmModeAddFB(drmmode->fd, ppix->drawable.width, ppix->drawable.height, ppix->drawable.depth, ppix->drawable.bitsPerPixel, ppix->devKind, ppriv->backing_bo->handle, &ppriv->fb_id); } *target = ppix; return TRUE; } static Bool drmmode_set_target_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix, PixmapPtr *target) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (drmmode->reverse_prime_offload_mode) return drmmode_set_target_scanout_pixmap_gpu(crtc, ppix, target); else return drmmode_set_target_scanout_pixmap_cpu(crtc, ppix, target); } static Bool drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; /* Use DisableSharedPixmapFlipping before switching to single buf */ if (drmmode_crtc->enable_flipping) return FALSE; return drmmode_set_target_scanout_pixmap(crtc, ppix, &drmmode_crtc->prime_pixmap); } static void drmmode_clear_pixmap(PixmapPtr pixmap) { ScreenPtr screen = pixmap->drawable.pScreen; GCPtr gc; #ifdef GLAMOR_HAS_GBM modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); if (ms->drmmode.glamor) { ms->glamor.clear_pixmap(pixmap); return; } #endif gc = GetScratchGC(pixmap->drawable.depth, screen); if (gc) { miClearDrawable(&pixmap->drawable, gc); FreeScratchGC(gc); } } static void * drmmode_shadow_allocate(xf86CrtcPtr crtc, int width, int height) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int ret; if (!drmmode_create_bo(drmmode, &drmmode_crtc->rotate_bo, width, height, drmmode->kbpp)) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "Couldn't allocate shadow memory for rotated CRTC\n"); return NULL; } ret = drmmode_bo_import(drmmode, &drmmode_crtc->rotate_bo, &drmmode_crtc->rotate_fb_id); if (ret) { ErrorF("failed to add rotate fb\n"); drmmode_bo_destroy(drmmode, &drmmode_crtc->rotate_bo); return NULL; } #ifdef GLAMOR_HAS_GBM if (drmmode->gbm) return drmmode_crtc->rotate_bo.gbm; #endif return drmmode_crtc->rotate_bo.dumb; } static PixmapPtr drmmode_create_pixmap_header(ScreenPtr pScreen, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { PixmapPtr pixmap; /* width and height of 0 means don't allocate any pixmap data */ pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0); if (pixmap) { if ((*pScreen->ModifyPixmapHeader)(pixmap, width, height, depth, bitsPerPixel, devKind, pPixData)) return pixmap; (*pScreen->DestroyPixmap)(pixmap); } return NullPixmap; } static Bool drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo); static PixmapPtr drmmode_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height) { ScrnInfoPtr scrn = crtc->scrn; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; uint32_t rotate_pitch; PixmapPtr rotate_pixmap; void *pPixData = NULL; if (!data) { data = drmmode_shadow_allocate(crtc, width, height); if (!data) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Couldn't allocate shadow pixmap for rotated CRTC\n"); return NULL; } } if (!drmmode_bo_has_bo(&drmmode_crtc->rotate_bo)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Couldn't allocate shadow pixmap for rotated CRTC\n"); return NULL; } pPixData = drmmode_bo_map(drmmode, &drmmode_crtc->rotate_bo); rotate_pitch = drmmode_bo_get_pitch(&drmmode_crtc->rotate_bo); rotate_pixmap = drmmode_create_pixmap_header(scrn->pScreen, width, height, scrn->depth, drmmode->kbpp, rotate_pitch, pPixData); if (rotate_pixmap == NULL) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Couldn't allocate shadow pixmap for rotated CRTC\n"); return NULL; } drmmode_set_pixmap_bo(drmmode, rotate_pixmap, &drmmode_crtc->rotate_bo); return rotate_pixmap; } static void drmmode_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (rotate_pixmap) { rotate_pixmap->drawable.pScreen->DestroyPixmap(rotate_pixmap); } if (data) { drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id); drmmode_crtc->rotate_fb_id = 0; drmmode_bo_destroy(drmmode, &drmmode_crtc->rotate_bo); memset(&drmmode_crtc->rotate_bo, 0, sizeof drmmode_crtc->rotate_bo); } } static void drmmode_crtc_destroy(xf86CrtcPtr crtc) { drmmode_mode_ptr iterator, next; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; modesettingPtr ms = modesettingPTR(crtc->scrn); if (!ms->atomic_modeset) return; drmmode_prop_info_free(drmmode_crtc->props_plane, DRMMODE_PLANE__COUNT); xorg_list_for_each_entry_safe(iterator, next, &drmmode_crtc->mode_list, entry) { drm_mode_destroy(crtc, iterator); } } static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .dpms = drmmode_crtc_dpms, .set_mode_major = drmmode_set_mode_major, .set_cursor_colors = drmmode_set_cursor_colors, .set_cursor_position = drmmode_set_cursor_position, .show_cursor_check = drmmode_show_cursor, .hide_cursor = drmmode_hide_cursor, .load_cursor_argb_check = drmmode_load_cursor_argb_check, .gamma_set = drmmode_crtc_gamma_set, .destroy = drmmode_crtc_destroy, .set_scanout_pixmap = drmmode_set_scanout_pixmap, .shadow_allocate = drmmode_shadow_allocate, .shadow_create = drmmode_shadow_create, .shadow_destroy = drmmode_shadow_destroy, }; static uint32_t drmmode_crtc_vblank_pipe(int crtc_id) { if (crtc_id > 1) return crtc_id << DRM_VBLANK_HIGH_CRTC_SHIFT; else if (crtc_id > 0) return DRM_VBLANK_SECONDARY; else return 0; } static Bool is_plane_assigned(ScrnInfoPtr scrn, int plane_id) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr iter = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = iter->driver_private; if (drmmode_crtc->plane_id == plane_id) return TRUE; } return FALSE; } /** * Populates the formats array, and the modifiers of each format for a drm_plane. */ static Bool populate_format_modifiers(xf86CrtcPtr crtc, const drmModePlane *kplane, uint32_t blob_id) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; unsigned i, j; drmModePropertyBlobRes *blob; struct drm_format_modifier_blob *fmt_mod_blob; uint32_t *blob_formats; struct drm_format_modifier *blob_modifiers; if (!blob_id) return FALSE; blob = drmModeGetPropertyBlob(drmmode->fd, blob_id); if (!blob) return FALSE; fmt_mod_blob = blob->data; blob_formats = formats_ptr(fmt_mod_blob); blob_modifiers = modifiers_ptr(fmt_mod_blob); assert(drmmode_crtc->num_formats == fmt_mod_blob->count_formats); for (i = 0; i < fmt_mod_blob->count_formats; i++) { uint32_t num_modifiers = 0; uint64_t *modifiers = NULL; uint64_t *tmp; for (j = 0; j < fmt_mod_blob->count_modifiers; j++) { struct drm_format_modifier *mod = &blob_modifiers[j]; if ((i < mod->offset) || (i > mod->offset + 63)) continue; if (!(mod->formats & (1 << (i - mod->offset)))) continue; num_modifiers++; tmp = realloc(modifiers, num_modifiers * sizeof(modifiers[0])); if (!tmp) { free(modifiers); drmModeFreePropertyBlob(blob); return FALSE; } modifiers = tmp; modifiers[num_modifiers - 1] = mod->modifier; } drmmode_crtc->formats[i].format = blob_formats[i]; drmmode_crtc->formats[i].modifiers = modifiers; drmmode_crtc->formats[i].num_modifiers = num_modifiers; } drmModeFreePropertyBlob(blob); return TRUE; } static void drmmode_crtc_create_planes(xf86CrtcPtr crtc, int num) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModePlaneRes *kplane_res; drmModePlane *kplane, *best_kplane = NULL; drmModeObjectProperties *props; uint32_t i, type, blob_id; int current_crtc, best_plane = 0; static drmmode_prop_enum_info_rec plane_type_enums[] = { [DRMMODE_PLANE_TYPE_PRIMARY] = { .name = "Primary", }, [DRMMODE_PLANE_TYPE_OVERLAY] = { .name = "Overlay", }, [DRMMODE_PLANE_TYPE_CURSOR] = { .name = "Cursor", }, }; static const drmmode_prop_info_rec plane_props[] = { [DRMMODE_PLANE_TYPE] = { .name = "type", .enum_values = plane_type_enums, .num_enum_values = DRMMODE_PLANE_TYPE__COUNT, }, [DRMMODE_PLANE_FB_ID] = { .name = "FB_ID", }, [DRMMODE_PLANE_CRTC_ID] = { .name = "CRTC_ID", }, [DRMMODE_PLANE_IN_FORMATS] = { .name = "IN_FORMATS", }, [DRMMODE_PLANE_SRC_X] = { .name = "SRC_X", }, [DRMMODE_PLANE_SRC_Y] = { .name = "SRC_Y", }, [DRMMODE_PLANE_SRC_W] = { .name = "SRC_W", }, [DRMMODE_PLANE_SRC_H] = { .name = "SRC_H", }, [DRMMODE_PLANE_CRTC_X] = { .name = "CRTC_X", }, [DRMMODE_PLANE_CRTC_Y] = { .name = "CRTC_Y", }, [DRMMODE_PLANE_CRTC_W] = { .name = "CRTC_W", }, [DRMMODE_PLANE_CRTC_H] = { .name = "CRTC_H", }, }; drmmode_prop_info_rec tmp_props[DRMMODE_PLANE__COUNT]; if (!drmmode_prop_info_copy(tmp_props, plane_props, DRMMODE_PLANE__COUNT, 0)) { xf86DrvMsg(drmmode->scrn->scrnIndex, X_ERROR, "failed to copy plane property info\n"); drmmode_prop_info_free(tmp_props, DRMMODE_PLANE__COUNT); return; } kplane_res = drmModeGetPlaneResources(drmmode->fd); if (!kplane_res) { xf86DrvMsg(drmmode->scrn->scrnIndex, X_ERROR, "failed to get plane resources: %s\n", strerror(errno)); drmmode_prop_info_free(tmp_props, DRMMODE_PLANE__COUNT); return; } for (i = 0; i < kplane_res->count_planes; i++) { int plane_id; kplane = drmModeGetPlane(drmmode->fd, kplane_res->planes[i]); if (!kplane) continue; if (!(kplane->possible_crtcs & (1 << num)) || is_plane_assigned(drmmode->scrn, kplane->plane_id)) { drmModeFreePlane(kplane); continue; } plane_id = kplane->plane_id; props = drmModeObjectGetProperties(drmmode->fd, plane_id, DRM_MODE_OBJECT_PLANE); if (!props) { xf86DrvMsg(drmmode->scrn->scrnIndex, X_ERROR, "couldn't get plane properties\n"); drmModeFreePlane(kplane); continue; } drmmode_prop_info_update(drmmode, tmp_props, DRMMODE_PLANE__COUNT, props); /* Only primary planes are important for atomic page-flipping */ type = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_TYPE], props, DRMMODE_PLANE_TYPE__COUNT); if (type != DRMMODE_PLANE_TYPE_PRIMARY) { drmModeFreePlane(kplane); drmModeFreeObjectProperties(props); continue; } /* Check if plane is already on this CRTC */ current_crtc = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_CRTC_ID], props, 0); if (current_crtc == drmmode_crtc->mode_crtc->crtc_id) { if (best_plane) { drmModeFreePlane(best_kplane); drmmode_prop_info_free(drmmode_crtc->props_plane, DRMMODE_PLANE__COUNT); } best_plane = plane_id; best_kplane = kplane; blob_id = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_IN_FORMATS], props, 0); drmmode_prop_info_copy(drmmode_crtc->props_plane, tmp_props, DRMMODE_PLANE__COUNT, 1); drmModeFreeObjectProperties(props); break; } if (!best_plane) { best_plane = plane_id; best_kplane = kplane; blob_id = drmmode_prop_get_value(&tmp_props[DRMMODE_PLANE_IN_FORMATS], props, 0); drmmode_prop_info_copy(drmmode_crtc->props_plane, tmp_props, DRMMODE_PLANE__COUNT, 1); } else { drmModeFreePlane(kplane); } drmModeFreeObjectProperties(props); } drmmode_crtc->plane_id = best_plane; if (best_kplane) { drmmode_crtc->num_formats = best_kplane->count_formats; drmmode_crtc->formats = calloc(sizeof(drmmode_format_rec), best_kplane->count_formats); if (!populate_format_modifiers(crtc, best_kplane, blob_id)) { for (i = 0; i < best_kplane->count_formats; i++) drmmode_crtc->formats[i].format = best_kplane->formats[i]; } drmModeFreePlane(best_kplane); } drmmode_prop_info_free(tmp_props, DRMMODE_PLANE__COUNT); drmModeFreePlaneResources(kplane_res); } static uint32_t drmmode_crtc_get_prop_id(uint32_t drm_fd, drmModeObjectPropertiesPtr props, char const* name) { uint32_t i, prop_id = 0; for (i = 0; !prop_id && i < props->count_props; ++i) { drmModePropertyPtr drm_prop = drmModeGetProperty(drm_fd, props->props[i]); if (!drm_prop) continue; if (strcmp(drm_prop->name, name) == 0) prop_id = drm_prop->prop_id; drmModeFreeProperty(drm_prop); } return prop_id; } static void drmmode_crtc_vrr_init(int drm_fd, xf86CrtcPtr crtc) { drmModeObjectPropertiesPtr drm_props; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (drmmode->vrr_prop_id) return; drm_props = drmModeObjectGetProperties(drm_fd, drmmode_crtc->mode_crtc->crtc_id, DRM_MODE_OBJECT_CRTC); if (!drm_props) return; drmmode->vrr_prop_id = drmmode_crtc_get_prop_id(drm_fd, drm_props, "VRR_ENABLED"); drmModeFreeObjectProperties(drm_props); } static unsigned int drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num) { xf86CrtcPtr crtc; drmmode_crtc_private_ptr drmmode_crtc; modesettingEntPtr ms_ent = ms_ent_priv(pScrn); drmModeObjectPropertiesPtr props; static const drmmode_prop_info_rec crtc_props[] = { [DRMMODE_CRTC_ACTIVE] = { .name = "ACTIVE" }, [DRMMODE_CRTC_MODE_ID] = { .name = "MODE_ID" }, [DRMMODE_CRTC_GAMMA_LUT] = { .name = "GAMMA_LUT" }, [DRMMODE_CRTC_GAMMA_LUT_SIZE] = { .name = "GAMMA_LUT_SIZE" }, [DRMMODE_CRTC_CTM] = { .name = "CTM" }, }; crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs); if (crtc == NULL) return 0; drmmode_crtc = xnfcalloc(sizeof(drmmode_crtc_private_rec), 1); crtc->driver_private = drmmode_crtc; drmmode_crtc->mode_crtc = drmModeGetCrtc(drmmode->fd, mode_res->crtcs[num]); drmmode_crtc->drmmode = drmmode; drmmode_crtc->vblank_pipe = drmmode_crtc_vblank_pipe(num); xorg_list_init(&drmmode_crtc->mode_list); props = drmModeObjectGetProperties(drmmode->fd, mode_res->crtcs[num], DRM_MODE_OBJECT_CRTC); if (!props || !drmmode_prop_info_copy(drmmode_crtc->props, crtc_props, DRMMODE_CRTC__COUNT, 0)) { xf86CrtcDestroy(crtc); return 0; } drmmode_prop_info_update(drmmode, drmmode_crtc->props, DRMMODE_CRTC__COUNT, props); drmModeFreeObjectProperties(props); drmmode_crtc_create_planes(crtc, num); /* Hide any cursors which may be active from previous users */ drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0); drmmode_crtc_vrr_init(drmmode->fd, crtc); /* Mark num'th crtc as in use on this device. */ ms_ent->assigned_crtcs |= (1 << num); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG, "Allocated crtc nr. %d to this screen.\n", num); if (drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].prop_id && drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value) { /* * GAMMA_LUT property supported, and so far tested to be safe to use by * default for lut sizes up to 4096 slots. Intel Tigerlake+ has some * issues, and a large GAMMA_LUT with 262145 slots, so keep GAMMA_LUT * off for large lut sizes by default for now. */ drmmode_crtc->use_gamma_lut = drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value <= 4096; /* Allow config override. */ drmmode_crtc->use_gamma_lut = xf86ReturnOptValBool(drmmode->Options, OPTION_USE_GAMMA_LUT, drmmode_crtc->use_gamma_lut); } else { drmmode_crtc->use_gamma_lut = FALSE; } if (drmmode_crtc->use_gamma_lut && drmmode_crtc->props[DRMMODE_CRTC_CTM].prop_id) { drmmode->use_ctm = TRUE; } return 1; } /* * Update all of the property values for an output */ static void drmmode_output_update_properties(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; int i, j, k; int err; drmModeConnectorPtr koutput; /* Use the most recently fetched values from the kernel */ koutput = drmmode_output->mode_output; if (!koutput) return; for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; for (j = 0; koutput && j < koutput->count_props; j++) { if (koutput->props[j] == p->mode_prop->prop_id) { /* Check to see if the property value has changed */ if (koutput->prop_values[j] != p->value) { p->value = koutput->prop_values[j]; if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) { INT32 value = p->value; err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_INTEGER, 32, PropModeReplace, 1, &value, FALSE, TRUE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } else if (p->mode_prop->flags & DRM_MODE_PROP_ENUM) { for (k = 0; k < p->mode_prop->count_enums; k++) if (p->mode_prop->enums[k].value == p->value) break; if (k < p->mode_prop->count_enums) { err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_ATOM, 32, PropModeReplace, 1, &p->atoms[k + 1], FALSE, TRUE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } } } break; } } } /* Update the CTM property */ if (drmmode_output->ctm_atom) { err = RRChangeOutputProperty(output->randr_output, drmmode_output->ctm_atom, XA_INTEGER, 32, PropModeReplace, 18, &drmmode_output->ctm, FALSE, TRUE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } } static xf86OutputStatus drmmode_output_detect(xf86OutputPtr output) { /* go to the hw and retrieve a new output struct */ drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; xf86OutputStatus status; if (drmmode_output->output_id == -1) return XF86OutputStatusDisconnected; drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id); if (!drmmode_output->mode_output) { drmmode_output->output_id = -1; return XF86OutputStatusDisconnected; } drmmode_output_update_properties(output); switch (drmmode_output->mode_output->connection) { case DRM_MODE_CONNECTED: status = XF86OutputStatusConnected; break; case DRM_MODE_DISCONNECTED: status = XF86OutputStatusDisconnected; break; default: case DRM_MODE_UNKNOWNCONNECTION: status = XF86OutputStatusUnknown; break; } return status; } static Bool drmmode_output_mode_valid(xf86OutputPtr output, DisplayModePtr pModes) { return MODE_OK; } static int koutput_get_prop_idx(int fd, drmModeConnectorPtr koutput, int type, const char *name) { int idx = -1; for (int i = 0; i < koutput->count_props; i++) { drmModePropertyPtr prop = drmModeGetProperty(fd, koutput->props[i]); if (!prop) continue; if (drm_property_type_is(prop, type) && !strcmp(prop->name, name)) idx = i; drmModeFreeProperty(prop); if (idx > -1) break; } return idx; } static int koutput_get_prop_id(int fd, drmModeConnectorPtr koutput, int type, const char *name) { int idx = koutput_get_prop_idx(fd, koutput, type, name); return (idx > -1) ? koutput->props[idx] : -1; } static drmModePropertyBlobPtr koutput_get_prop_blob(int fd, drmModeConnectorPtr koutput, const char *name) { drmModePropertyBlobPtr blob = NULL; int idx = koutput_get_prop_idx(fd, koutput, DRM_MODE_PROP_BLOB, name); if (idx > -1) blob = drmModeGetPropertyBlob(fd, koutput->prop_values[idx]); return blob; } static void drmmode_output_attach_tile(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; struct xf86CrtcTileInfo tile_info, *set = NULL; if (!koutput) { xf86OutputSetTile(output, NULL); return; } drmModeFreePropertyBlob(drmmode_output->tile_blob); /* look for a TILE property */ drmmode_output->tile_blob = koutput_get_prop_blob(drmmode->fd, koutput, "TILE"); if (drmmode_output->tile_blob) { if (xf86OutputParseKMSTile(drmmode_output->tile_blob->data, drmmode_output->tile_blob->length, &tile_info) == TRUE) set = &tile_info; } xf86OutputSetTile(output, set); } static Bool has_panel_fitter(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; int idx; /* Presume that if the output supports scaling, then we have a * panel fitter capable of adjust any mode to suit. */ idx = koutput_get_prop_idx(drmmode->fd, koutput, DRM_MODE_PROP_ENUM, "scaling mode"); return (idx > -1); } static DisplayModePtr drmmode_output_add_gtf_modes(xf86OutputPtr output, DisplayModePtr Modes) { xf86MonPtr mon = output->MonInfo; DisplayModePtr i, m, preferred = NULL; int max_x = 0, max_y = 0; float max_vrefresh = 0.0; if (mon && gtf_supported(mon)) return Modes; if (!has_panel_fitter(output)) return Modes; for (m = Modes; m; m = m->next) { if (m->type & M_T_PREFERRED) preferred = m; max_x = max(max_x, m->HDisplay); max_y = max(max_y, m->VDisplay); max_vrefresh = max(max_vrefresh, xf86ModeVRefresh(m)); } max_vrefresh = max(max_vrefresh, 60.0); max_vrefresh *= (1 + SYNC_TOLERANCE); m = xf86GetDefaultModes(); xf86ValidateModesSize(output->scrn, m, max_x, max_y, 0); for (i = m; i; i = i->next) { if (xf86ModeVRefresh(i) > max_vrefresh) i->status = MODE_VSYNC; if (preferred && i->HDisplay >= preferred->HDisplay && i->VDisplay >= preferred->VDisplay && xf86ModeVRefresh(i) >= xf86ModeVRefresh(preferred)) i->status = MODE_VSYNC; } xf86PruneInvalidModes(output->scrn, &m, FALSE); return xf86ModesAdd(Modes, m); } static DisplayModePtr drmmode_output_get_modes(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr koutput = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; int i; DisplayModePtr Modes = NULL, Mode; xf86MonPtr mon = NULL; if (!koutput) return NULL; drmModeFreePropertyBlob(drmmode_output->edid_blob); /* look for an EDID property */ drmmode_output->edid_blob = koutput_get_prop_blob(drmmode->fd, koutput, "EDID"); if (drmmode_output->edid_blob) { mon = xf86InterpretEDID(output->scrn->scrnIndex, drmmode_output->edid_blob->data); if (mon && drmmode_output->edid_blob->length > 128) mon->flags |= MONITOR_EDID_COMPLETE_RAWDATA; } xf86OutputSetEDID(output, mon); drmmode_output_attach_tile(output); /* modes should already be available */ for (i = 0; i < koutput->count_modes; i++) { Mode = xnfalloc(sizeof(DisplayModeRec)); drmmode_ConvertFromKMode(output->scrn, &koutput->modes[i], Mode); Modes = xf86ModesAdd(Modes, Mode); } return drmmode_output_add_gtf_modes(output, Modes); } static void drmmode_output_destroy(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; int i; drmModeFreePropertyBlob(drmmode_output->edid_blob); drmModeFreePropertyBlob(drmmode_output->tile_blob); for (i = 0; i < drmmode_output->num_props; i++) { drmModeFreeProperty(drmmode_output->props[i].mode_prop); free(drmmode_output->props[i].atoms); } free(drmmode_output->props); if (drmmode_output->mode_output) { for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) { drmModeFreeEncoder(drmmode_output->mode_encoders[i]); } drmModeFreeConnector(drmmode_output->mode_output); } free(drmmode_output->mode_encoders); free(drmmode_output); output->driver_private = NULL; } static void drmmode_output_dpms(xf86OutputPtr output, int mode) { modesettingPtr ms = modesettingPTR(output->scrn); drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; xf86CrtcPtr crtc = output->crtc; drmModeConnectorPtr koutput = drmmode_output->mode_output; if (!koutput) return; /* XXX Check if DPMS mode is already the right one */ drmmode_output->dpms = mode; if (ms->atomic_modeset) { if (mode != DPMSModeOn && !ms->pending_modeset) drmmode_output_disable(output); } else { drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id, drmmode_output->dpms_enum_id, mode); } if (crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (mode == DPMSModeOn) { if (drmmode_crtc->need_modeset) drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); if (drmmode_crtc->enable_flipping) drmmode_InitSharedPixmapFlipping(crtc, drmmode_crtc->drmmode); } else { if (drmmode_crtc->enable_flipping) drmmode_FiniSharedPixmapFlipping(crtc, drmmode_crtc->drmmode); } } return; } static Bool drmmode_property_ignore(drmModePropertyPtr prop) { if (!prop) return TRUE; /* ignore blob prop */ if (prop->flags & DRM_MODE_PROP_BLOB) return TRUE; /* ignore standard property */ if (!strcmp(prop->name, "EDID") || !strcmp(prop->name, "DPMS") || !strcmp(prop->name, "CRTC_ID")) return TRUE; return FALSE; } static void drmmode_output_create_resources(xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmModeConnectorPtr mode_output = drmmode_output->mode_output; drmmode_ptr drmmode = drmmode_output->drmmode; drmModePropertyPtr drmmode_prop; int i, j, err; drmmode_output->props = calloc(mode_output->count_props, sizeof(drmmode_prop_rec)); if (!drmmode_output->props) return; drmmode_output->num_props = 0; for (i = 0, j = 0; i < mode_output->count_props; i++) { drmmode_prop = drmModeGetProperty(drmmode->fd, mode_output->props[i]); if (drmmode_property_ignore(drmmode_prop)) { drmModeFreeProperty(drmmode_prop); continue; } drmmode_output->props[j].mode_prop = drmmode_prop; drmmode_output->props[j].value = mode_output->prop_values[i]; drmmode_output->num_props++; j++; } /* Create CONNECTOR_ID property */ { Atom name = MakeAtom("CONNECTOR_ID", 12, TRUE); INT32 value = mode_output->connector_id; if (name != BAD_RESOURCE) { err = RRConfigureOutputProperty(output->randr_output, name, FALSE, FALSE, TRUE, 1, &value); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } err = RRChangeOutputProperty(output->randr_output, name, XA_INTEGER, 32, PropModeReplace, 1, &value, FALSE, FALSE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } } if (drmmode->use_ctm) { Atom name = MakeAtom("CTM", 3, TRUE); if (name != BAD_RESOURCE) { drmmode_output->ctm_atom = name; err = RRConfigureOutputProperty(output->randr_output, name, FALSE, FALSE, TRUE, 0, NULL); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } err = RRChangeOutputProperty(output->randr_output, name, XA_INTEGER, 32, PropModeReplace, 18, &ctm_identity, FALSE, FALSE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } drmmode_output->ctm = ctm_identity; } } for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; drmmode_prop = p->mode_prop; if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) { INT32 prop_range[2]; INT32 value = p->value; p->num_atoms = 1; p->atoms = calloc(p->num_atoms, sizeof(Atom)); if (!p->atoms) continue; p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); prop_range[0] = drmmode_prop->values[0]; prop_range[1] = drmmode_prop->values[1]; err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], FALSE, TRUE, drmmode_prop-> flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, 2, prop_range); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_INTEGER, 32, PropModeReplace, 1, &value, FALSE, TRUE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } else if (drmmode_prop->flags & DRM_MODE_PROP_ENUM) { p->num_atoms = drmmode_prop->count_enums + 1; p->atoms = calloc(p->num_atoms, sizeof(Atom)); if (!p->atoms) continue; p->atoms[0] = MakeAtom(drmmode_prop->name, strlen(drmmode_prop->name), TRUE); for (j = 1; j <= drmmode_prop->count_enums; j++) { struct drm_mode_property_enum *e = &drmmode_prop->enums[j - 1]; p->atoms[j] = MakeAtom(e->name, strlen(e->name), TRUE); } err = RRConfigureOutputProperty(output->randr_output, p->atoms[0], FALSE, FALSE, drmmode_prop-> flags & DRM_MODE_PROP_IMMUTABLE ? TRUE : FALSE, p->num_atoms - 1, (INT32 *) &p->atoms[1]); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } for (j = 0; j < drmmode_prop->count_enums; j++) if (drmmode_prop->enums[j].value == p->value) break; /* there's always a matching value */ err = RRChangeOutputProperty(output->randr_output, p->atoms[0], XA_ATOM, 32, PropModeReplace, 1, &p->atoms[j + 1], FALSE, TRUE); if (err != 0) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } } } } static Bool drmmode_output_set_property(xf86OutputPtr output, Atom property, RRPropertyValuePtr value) { drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_ptr drmmode = drmmode_output->drmmode; int i; for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; if (p->atoms[0] != property) continue; if (p->mode_prop->flags & DRM_MODE_PROP_RANGE) { uint32_t val; if (value->type != XA_INTEGER || value->format != 32 || value->size != 1) return FALSE; val = *(uint32_t *) value->data; drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, (uint64_t) val); return TRUE; } else if (p->mode_prop->flags & DRM_MODE_PROP_ENUM) { Atom atom; const char *name; int j; if (value->type != XA_ATOM || value->format != 32 || value->size != 1) return FALSE; memcpy(&atom, value->data, 4); if (!(name = NameForAtom(atom))) return FALSE; /* search for matching name string, then set its value down */ for (j = 0; j < p->mode_prop->count_enums; j++) { if (!strcmp(p->mode_prop->enums[j].name, name)) { drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, p->mode_prop->enums[j].value); return TRUE; } } } } if (property == drmmode_output->ctm_atom) { const size_t matrix_size = sizeof(drmmode_output->ctm); if (value->type != XA_INTEGER || value->format != 32 || value->size * 4 != matrix_size) return FALSE; memcpy(&drmmode_output->ctm, value->data, matrix_size); // Update the CRTC if there is one bound to this output. if (output->crtc) { drmmode_set_ctm(output->crtc, &drmmode_output->ctm); } } return TRUE; } static Bool drmmode_output_get_property(xf86OutputPtr output, Atom property) { return TRUE; } static const xf86OutputFuncsRec drmmode_output_funcs = { .dpms = drmmode_output_dpms, .create_resources = drmmode_output_create_resources, .set_property = drmmode_output_set_property, .get_property = drmmode_output_get_property, .detect = drmmode_output_detect, .mode_valid = drmmode_output_mode_valid, .get_modes = drmmode_output_get_modes, .destroy = drmmode_output_destroy }; static int subpixel_conv_table[7] = { 0, SubPixelUnknown, SubPixelHorizontalRGB, SubPixelHorizontalBGR, SubPixelVerticalRGB, SubPixelVerticalBGR, SubPixelNone }; static const char *const output_names[] = { "None", "VGA", "DVI-I", "DVI-D", "DVI-A", "Composite", "SVIDEO", "LVDS", "Component", "DIN", "DP", "HDMI", "HDMI-B", "TV", "eDP", "Virtual", "DSI", "DPI", }; static xf86OutputPtr find_output(ScrnInfoPtr pScrn, int id) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; if (drmmode_output->output_id == id) return output; } return NULL; } static int parse_path_blob(drmModePropertyBlobPtr path_blob, int *conn_base_id, char **path) { char *conn; char conn_id[5]; int id, len; char *blob_data; if (!path_blob) return -1; blob_data = path_blob->data; /* we only handle MST paths for now */ if (strncmp(blob_data, "mst:", 4)) return -1; conn = strchr(blob_data + 4, '-'); if (!conn) return -1; len = conn - (blob_data + 4); if (len + 1> 5) return -1; memcpy(conn_id, blob_data + 4, len); conn_id[len] = '\0'; id = strtoul(conn_id, NULL, 10); *conn_base_id = id; *path = conn + 1; return 0; } static void drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name, drmModePropertyBlobPtr path_blob) { int ret; char *extra_path; int conn_id; xf86OutputPtr output; ret = parse_path_blob(path_blob, &conn_id, &extra_path); if (ret == -1) goto fallback; output = find_output(pScrn, conn_id); if (!output) goto fallback; snprintf(name, 32, "%s-%s", output->name, extra_path); return; fallback: if (koutput->connector_type >= ARRAY_SIZE(output_names)) snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id); else if (pScrn->is_gpu) snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id); else snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id); } static Bool drmmode_connector_check_vrr_capable(uint32_t drm_fd, int connector_id) { uint32_t i; Bool found = FALSE; uint64_t prop_value = 0; drmModeObjectPropertiesPtr props; const char* prop_name = "VRR_CAPABLE"; props = drmModeObjectGetProperties(drm_fd, connector_id, DRM_MODE_OBJECT_CONNECTOR); for (i = 0; !found && i < props->count_props; ++i) { drmModePropertyPtr drm_prop = drmModeGetProperty(drm_fd, props->props[i]); if (!drm_prop) continue; if (strcasecmp(drm_prop->name, prop_name) == 0) { prop_value = props->prop_values[i]; found = TRUE; } drmModeFreeProperty(drm_prop); } drmModeFreeObjectProperties(props); if(found) return prop_value ? TRUE : FALSE; return FALSE; } static unsigned int drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_res, int num, Bool dynamic, int crtcshift) { xf86OutputPtr output; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); modesettingPtr ms = modesettingPTR(pScrn); drmModeConnectorPtr koutput; drmModeEncoderPtr *kencoders = NULL; drmmode_output_private_ptr drmmode_output; char name[32]; int i; Bool nonDesktop = FALSE; drmModePropertyBlobPtr path_blob = NULL; const char *s; drmModeObjectPropertiesPtr props; static const drmmode_prop_info_rec connector_props[] = { [DRMMODE_CONNECTOR_CRTC_ID] = { .name = "CRTC_ID", }, }; koutput = drmModeGetConnector(drmmode->fd, mode_res->connectors[num]); if (!koutput) return 0; path_blob = koutput_get_prop_blob(drmmode->fd, koutput, "PATH"); i = koutput_get_prop_idx(drmmode->fd, koutput, DRM_MODE_PROP_RANGE, RR_PROPERTY_NON_DESKTOP); if (i >= 0) nonDesktop = koutput->prop_values[i] != 0; drmmode_create_name(pScrn, koutput, name, path_blob); if (path_blob) drmModeFreePropertyBlob(path_blob); if (path_blob && dynamic) { /* see if we have an output with this name already and hook stuff up */ for (i = 0; i < xf86_config->num_output; i++) { output = xf86_config->output[i]; if (strncmp(output->name, name, 32)) continue; drmmode_output = output->driver_private; drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->mode_output = koutput; output->non_desktop = nonDesktop; return 1; } } kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders); if (!kencoders) { goto out_free_encoders; } for (i = 0; i < koutput->count_encoders; i++) { kencoders[i] = drmModeGetEncoder(drmmode->fd, koutput->encoders[i]); if (!kencoders[i]) { goto out_free_encoders; } } if (xf86IsEntityShared(pScrn->entityList[0])) { if ((s = xf86GetOptValString(drmmode->Options, OPTION_ZAPHOD_HEADS))) { if (!drmmode_zaphod_string_matches(pScrn, s, name)) goto out_free_encoders; } else { if (!drmmode->is_secondary && (num != 0)) goto out_free_encoders; else if (drmmode->is_secondary && (num != 1)) goto out_free_encoders; } } output = xf86OutputCreate(pScrn, &drmmode_output_funcs, name); if (!output) { goto out_free_encoders; } drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1); if (!drmmode_output) { xf86OutputDestroy(output); goto out_free_encoders; } drmmode_output->output_id = mode_res->connectors[num]; drmmode_output->mode_output = koutput; drmmode_output->mode_encoders = kencoders; drmmode_output->drmmode = drmmode; output->mm_width = koutput->mmWidth; output->mm_height = koutput->mmHeight; output->subpixel_order = subpixel_conv_table[koutput->subpixel]; output->interlaceAllowed = TRUE; output->doubleScanAllowed = TRUE; output->driver_private = drmmode_output; output->non_desktop = nonDesktop; output->possible_crtcs = 0; for (i = 0; i < koutput->count_encoders; i++) { output->possible_crtcs |= (kencoders[i]->possible_crtcs >> crtcshift) & 0x7f; } /* work out the possible clones later */ output->possible_clones = 0; if (ms->atomic_modeset) { if (!drmmode_prop_info_copy(drmmode_output->props_connector, connector_props, DRMMODE_CONNECTOR__COUNT, 0)) { goto out_free_encoders; } props = drmModeObjectGetProperties(drmmode->fd, drmmode_output->output_id, DRM_MODE_OBJECT_CONNECTOR); drmmode_prop_info_update(drmmode, drmmode_output->props_connector, DRMMODE_CONNECTOR__COUNT, props); } else { drmmode_output->dpms_enum_id = koutput_get_prop_id(drmmode->fd, koutput, DRM_MODE_PROP_ENUM, "DPMS"); } if (dynamic) { output->randr_output = RROutputCreate(xf86ScrnToScreen(pScrn), output->name, strlen(output->name), output); if (output->randr_output) { drmmode_output_create_resources(output); RRPostPendingProperties(output->randr_output); } } ms->is_connector_vrr_capable |= drmmode_connector_check_vrr_capable(drmmode->fd, drmmode_output->output_id); return 1; out_free_encoders: if (kencoders) { for (i = 0; i < koutput->count_encoders; i++) drmModeFreeEncoder(kencoders[i]); free(kencoders); } drmModeFreeConnector(koutput); return 0; } static uint32_t find_clones(ScrnInfoPtr scrn, xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private, clone_drmout; int i; xf86OutputPtr clone_output; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int index_mask = 0; if (drmmode_output->enc_clone_mask == 0) return index_mask; for (i = 0; i < xf86_config->num_output; i++) { clone_output = xf86_config->output[i]; clone_drmout = clone_output->driver_private; if (output == clone_output) continue; if (clone_drmout->enc_mask == 0) continue; if (drmmode_output->enc_clone_mask == clone_drmout->enc_mask) index_mask |= (1 << i); } return index_mask; } static void drmmode_clones_init(ScrnInfoPtr scrn, drmmode_ptr drmmode, drmModeResPtr mode_res) { int i, j; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; drmmode_output->enc_clone_mask = 0xff; /* and all the possible encoder clones for this output together */ for (j = 0; j < drmmode_output->mode_output->count_encoders; j++) { int k; for (k = 0; k < mode_res->count_encoders; k++) { if (mode_res->encoders[k] == drmmode_output->mode_encoders[j]->encoder_id) drmmode_output->enc_mask |= (1 << k); } drmmode_output->enc_clone_mask &= drmmode_output->mode_encoders[j]->possible_clones; } } for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; output->possible_clones = find_clones(scrn, output); } } static Bool drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo) { #ifdef GLAMOR_HAS_GBM ScrnInfoPtr scrn = drmmode->scrn; modesettingPtr ms = modesettingPTR(scrn); if (!drmmode->glamor) return TRUE; if (!ms->glamor.egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm, bo->used_modifiers)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create pixmap\n"); return FALSE; } #endif return TRUE; } Bool drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode) { ScreenPtr screen = xf86ScrnToScreen(drmmode->scrn); PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen); if (!drmmode_set_pixmap_bo(drmmode, screen_pixmap, &drmmode->front_bo)) return FALSE; return TRUE; } static Bool drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; drmmode_bo old_front; ScreenPtr screen = xf86ScrnToScreen(scrn); uint32_t old_fb_id; int i, pitch, old_width, old_height, old_pitch; int cpp = (scrn->bitsPerPixel + 7) / 8; int kcpp = (drmmode->kbpp + 7) / 8; PixmapPtr ppix = screen->GetScreenPixmap(screen); void *new_pixels = NULL; if (scrn->virtualX == width && scrn->virtualY == height) return TRUE; xf86DrvMsg(scrn->scrnIndex, X_INFO, "Allocate new frame buffer %dx%d stride\n", width, height); old_width = scrn->virtualX; old_height = scrn->virtualY; old_pitch = drmmode_bo_get_pitch(&drmmode->front_bo); old_front = drmmode->front_bo; old_fb_id = drmmode->fb_id; drmmode->fb_id = 0; if (!drmmode_create_bo(drmmode, &drmmode->front_bo, width, height, drmmode->kbpp)) goto fail; pitch = drmmode_bo_get_pitch(&drmmode->front_bo); scrn->virtualX = width; scrn->virtualY = height; scrn->displayWidth = pitch / kcpp; if (!drmmode->gbm) { new_pixels = drmmode_map_front_bo(drmmode); if (!new_pixels) goto fail; } if (drmmode->shadow_enable) { uint32_t size = scrn->displayWidth * scrn->virtualY * cpp; new_pixels = calloc(1, size); if (new_pixels == NULL) goto fail; free(drmmode->shadow_fb); drmmode->shadow_fb = new_pixels; } if (drmmode->shadow_enable2) { uint32_t size = scrn->displayWidth * scrn->virtualY * cpp; void *fb2 = calloc(1, size); free(drmmode->shadow_fb2); drmmode->shadow_fb2 = fb2; } screen->ModifyPixmapHeader(ppix, width, height, -1, -1, scrn->displayWidth * cpp, new_pixels); if (!drmmode_glamor_handle_new_screen_pixmap(drmmode)) goto fail; drmmode_clear_pixmap(ppix); for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (!crtc->enabled) continue; drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); } if (old_fb_id) drmModeRmFB(drmmode->fd, old_fb_id); drmmode_bo_destroy(drmmode, &old_front); return TRUE; fail: drmmode_bo_destroy(drmmode, &drmmode->front_bo); drmmode->front_bo = old_front; scrn->virtualX = old_width; scrn->virtualY = old_height; scrn->displayWidth = old_pitch / kcpp; drmmode->fb_id = old_fb_id; return FALSE; } static void drmmode_validate_leases(ScrnInfoPtr scrn) { ScreenPtr screen = scrn->pScreen; rrScrPrivPtr scr_priv; modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; drmModeLesseeListPtr lessees; RRLeasePtr lease, next; int l; /* Bail out if RandR wasn't initialized. */ if (!dixPrivateKeyRegistered(rrPrivKey)) return; scr_priv = rrGetScrPriv(screen); /* We can't talk to the kernel about leases when VT switched */ if (!scrn->vtSema) return; lessees = drmModeListLessees(drmmode->fd); if (!lessees) return; xorg_list_for_each_entry_safe(lease, next, &scr_priv->leases, list) { drmmode_lease_private_ptr lease_private = lease->devPrivate; for (l = 0; l < lessees->count; l++) { if (lessees->lessees[l] == lease_private->lessee_id) break; } /* check to see if the lease has gone away */ if (l == lessees->count) { free(lease_private); lease->devPrivate = NULL; xf86CrtcLeaseTerminated(lease); } } free(lessees); } static int drmmode_create_lease(RRLeasePtr lease, int *fd) { ScreenPtr screen = lease->screen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; int ncrtc = lease->numCrtcs; int noutput = lease->numOutputs; int nobjects; int c, o; int i; int lease_fd; uint32_t *objects; drmmode_lease_private_ptr lease_private; nobjects = ncrtc + noutput; if (ms->atomic_modeset) nobjects += ncrtc; /* account for planes as well */ if (nobjects == 0) return BadValue; lease_private = calloc(1, sizeof (drmmode_lease_private_rec)); if (!lease_private) return BadAlloc; objects = xallocarray(nobjects, sizeof (uint32_t)); if (!objects) { free(lease_private); return BadAlloc; } i = 0; /* Add CRTC and plane ids */ for (c = 0; c < ncrtc; c++) { xf86CrtcPtr crtc = lease->crtcs[c]->devPrivate; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; objects[i++] = drmmode_crtc->mode_crtc->crtc_id; if (ms->atomic_modeset) objects[i++] = drmmode_crtc->plane_id; } /* Add connector ids */ for (o = 0; o < noutput; o++) { xf86OutputPtr output = lease->outputs[o]->devPrivate; drmmode_output_private_ptr drmmode_output = output->driver_private; objects[i++] = drmmode_output->mode_output->connector_id; } /* call kernel to create lease */ assert (i == nobjects); lease_fd = drmModeCreateLease(drmmode->fd, objects, nobjects, 0, &lease_private->lessee_id); free(objects); if (lease_fd < 0) { free(lease_private); return BadMatch; } lease->devPrivate = lease_private; xf86CrtcLeaseStarted(lease); *fd = lease_fd; return Success; } static void drmmode_terminate_lease(RRLeasePtr lease) { ScreenPtr screen = lease->screen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); drmmode_ptr drmmode = &ms->drmmode; drmmode_lease_private_ptr lease_private = lease->devPrivate; if (drmModeRevokeLease(drmmode->fd, lease_private->lessee_id) == 0) { free(lease_private); lease->devPrivate = NULL; xf86CrtcLeaseTerminated(lease); } } static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = { .resize = drmmode_xf86crtc_resize, .create_lease = drmmode_create_lease, .terminate_lease = drmmode_terminate_lease }; Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) { modesettingEntPtr ms_ent = ms_ent_priv(pScrn); int i; int ret; uint64_t value = 0; unsigned int crtcs_needed = 0; drmModeResPtr mode_res; int crtcshift; /* check for dumb capability */ ret = drmGetCap(drmmode->fd, DRM_CAP_DUMB_BUFFER, &value); if (ret > 0 || value != 1) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS doesn't support dumb interface\n"); return FALSE; } xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs); drmmode->scrn = pScrn; drmmode->cpp = cpp; mode_res = drmModeGetResources(drmmode->fd); if (!mode_res) return FALSE; crtcshift = ffs(ms_ent->assigned_crtcs ^ 0xffffffff) - 1; for (i = 0; i < mode_res->count_connectors; i++) crtcs_needed += drmmode_output_init(pScrn, drmmode, mode_res, i, FALSE, crtcshift); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG, "Up to %d crtcs needed for screen.\n", crtcs_needed); xf86CrtcSetSizeRange(pScrn, 320, 200, mode_res->max_width, mode_res->max_height); for (i = 0; i < mode_res->count_crtcs; i++) if (!xf86IsEntityShared(pScrn->entityList[0]) || (crtcs_needed && !(ms_ent->assigned_crtcs & (1 << i)))) crtcs_needed -= drmmode_crtc_init(pScrn, drmmode, mode_res, i); /* All ZaphodHeads outputs provided with matching crtcs? */ if (xf86IsEntityShared(pScrn->entityList[0]) && (crtcs_needed > 0)) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%d ZaphodHeads crtcs unavailable. Some outputs will stay off.\n", crtcs_needed); /* workout clones */ drmmode_clones_init(pScrn, drmmode, mode_res); drmModeFreeResources(mode_res); xf86ProviderSetup(pScrn, NULL, "modesetting"); xf86InitialConfiguration(pScrn, TRUE); return TRUE; } Bool drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { #ifdef GLAMOR_HAS_GBM ScreenPtr pScreen = xf86ScrnToScreen(pScrn); modesettingPtr ms = modesettingPTR(pScrn); if (drmmode->glamor) { if (!ms->glamor.init(pScreen, GLAMOR_USE_EGL_SCREEN)) { return FALSE; } #ifdef GBM_BO_WITH_MODIFIERS ms->glamor.set_drawable_modifiers_func(pScreen, get_drawable_modifiers); #endif } #endif return TRUE; } void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86OutputPtr output = config->output[config->compat_output]; xf86CrtcPtr crtc = output->crtc; if (crtc && crtc->enabled) { drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, x, y); } } Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw, Bool ign_err) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); Bool success = TRUE; int c; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; xf86OutputPtr output = NULL; int o; /* Skip disabled CRTCs */ if (!crtc->enabled) { if (set_hw) { drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL); } continue; } if (config->output[config->compat_output]->crtc == crtc) output = config->output[config->compat_output]; else { for (o = 0; o < config->num_output; o++) if (config->output[o]->crtc == crtc) { output = config->output[o]; break; } } /* paranoia */ if (!output) continue; /* Mark that we'll need to re-set the mode for sure */ memset(&crtc->mode, 0, sizeof(crtc->mode)); if (!crtc->desiredMode.CrtcHDisplay) { DisplayModePtr mode = xf86OutputFindClosestMode(output, pScrn->currentMode); if (!mode) return FALSE; crtc->desiredMode = *mode; crtc->desiredRotation = RR_Rotate_0; crtc->desiredX = 0; crtc->desiredY = 0; } if (set_hw) { if (!crtc->funcs-> set_mode_major(crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY)) { if (!ign_err) return FALSE; else { success = FALSE; crtc->enabled = FALSE; xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to set the desired mode on connector %s\n", output->name); } } } else { crtc->mode = crtc->desiredMode; crtc->rotation = crtc->desiredRotation; crtc->x = crtc->desiredX; crtc->y = crtc->desiredY; if (!xf86CrtcRotate(crtc)) return FALSE; } } /* Validate leases on VT re-entry */ drmmode_validate_leases(pScrn); return success; } static void drmmode_load_palette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); uint16_t lut_r[256], lut_g[256], lut_b[256]; int index, j, i; int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; for (i = 0; i < 256; i++) { lut_r[i] = drmmode_crtc->lut_r[i] << 6; lut_g[i] = drmmode_crtc->lut_g[i] << 6; lut_b[i] = drmmode_crtc->lut_b[i] << 6; } switch (pScrn->depth) { case 15: for (i = 0; i < numColors; i++) { index = indices[i]; for (j = 0; j < 8; j++) { lut_r[index * 8 + j] = colors[index].red << 6; lut_g[index * 8 + j] = colors[index].green << 6; lut_b[index * 8 + j] = colors[index].blue << 6; } } break; case 16: for (i = 0; i < numColors; i++) { index = indices[i]; if (i <= 31) { for (j = 0; j < 8; j++) { lut_r[index * 8 + j] = colors[index].red << 6; lut_b[index * 8 + j] = colors[index].blue << 6; } } for (j = 0; j < 4; j++) { lut_g[index * 4 + j] = colors[index].green << 6; } } break; default: for (i = 0; i < numColors; i++) { index = indices[i]; lut_r[index] = colors[index].red << 6; lut_g[index] = colors[index].green << 6; lut_b[index] = colors[index].blue << 6; } break; } /* Make the change through RandR */ if (crtc->randr_crtc) RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b); else crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256); } } static Bool drmmode_crtc_upgrade_lut(xf86CrtcPtr crtc, int num) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; uint64_t size; if (!drmmode_crtc->use_gamma_lut) return TRUE; assert(drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].prop_id); size = drmmode_crtc->props[DRMMODE_CRTC_GAMMA_LUT_SIZE].value; if (size != crtc->gamma_size) { ScrnInfoPtr pScrn = crtc->scrn; uint16_t *gamma = malloc(3 * size * sizeof(uint16_t)); if (gamma) { free(crtc->gamma_red); crtc->gamma_size = size; crtc->gamma_red = gamma; crtc->gamma_green = gamma + size; crtc->gamma_blue = gamma + size * 2; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, MS_LOGLEVEL_DEBUG, "Gamma ramp set to %ld entries on CRTC %d\n", size, num); } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate memory for %ld gamma ramp entries " "on CRTC %d.\n", size, num); return FALSE; } } return TRUE; } Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Initializing kms color map for depth %d, %d bpc.\n", pScrn->depth, pScrn->rgbBits); if (!miCreateDefColormap(pScreen)) return FALSE; /* If the GAMMA_LUT property is available, replace the server's default * gamma ramps with ones of the appropriate size. */ for (i = 0; i < xf86_config->num_crtc; i++) if (!drmmode_crtc_upgrade_lut(xf86_config->crtc[i], i)) return FALSE; /* Adapt color map size and depth to color depth of screen. */ if (!xf86HandleColormaps(pScreen, 1 << pScrn->rgbBits, 10, drmmode_load_palette, NULL, CMAP_PALETTED_TRUECOLOR | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE; return TRUE; } #define DRM_MODE_LINK_STATUS_GOOD 0 #define DRM_MODE_LINK_STATUS_BAD 1 void drmmode_update_kms_state(drmmode_ptr drmmode) { ScrnInfoPtr scrn = drmmode->scrn; drmModeResPtr mode_res; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i, j; Bool found = FALSE; Bool changed = FALSE; /* Try to re-set the mode on all the connectors with a BAD link-state: * This may happen if a link degrades and a new modeset is necessary, using * different link-training parameters. If the kernel found that the current * mode is not achievable anymore, it should have pruned the mode before * sending the hotplug event. Try to re-set the currently-set mode to keep * the display alive, this will fail if the mode has been pruned. * In any case, we will send randr events for the Desktop Environment to * deal with it, if it wants to. */ for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; drmmode_output_private_ptr drmmode_output = output->driver_private; drmmode_output_detect(output); /* Get an updated view of the properties for the current connector and * look for the link-status property */ for (j = 0; j < drmmode_output->num_props; j++) { drmmode_prop_ptr p = &drmmode_output->props[j]; if (!strcmp(p->mode_prop->name, "link-status")) { if (p->value == DRM_MODE_LINK_STATUS_BAD) { xf86CrtcPtr crtc = output->crtc; if (!crtc) continue; /* the connector got a link failure, re-set the current mode */ drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); xf86DrvMsg(scrn->scrnIndex, X_WARNING, "hotplug event: connector %u's link-state is BAD, " "tried resetting the current mode. You may be left" "with a black screen if this fails...\n", drmmode_output->mode_output->connector_id); } break; } } } mode_res = drmModeGetResources(drmmode->fd); if (!mode_res) goto out; if (mode_res->count_crtcs != config->num_crtc) { /* this triggers with Zaphod mode where we don't currently support connector hotplug or MST. */ goto out_free_res; } /* figure out if we have gotten rid of any connectors traverse old output list looking for outputs */ for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; found = FALSE; for (j = 0; j < mode_res->count_connectors; j++) { if (mode_res->connectors[j] == drmmode_output->output_id) { found = TRUE; break; } } if (found) continue; drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = NULL; drmmode_output->output_id = -1; changed = TRUE; } /* find new output ids we don't have outputs for */ for (i = 0; i < mode_res->count_connectors; i++) { found = FALSE; for (j = 0; j < config->num_output; j++) { xf86OutputPtr output = config->output[j]; drmmode_output_private_ptr drmmode_output; drmmode_output = output->driver_private; if (mode_res->connectors[i] == drmmode_output->output_id) { found = TRUE; break; } } if (found) continue; changed = TRUE; drmmode_output_init(scrn, drmmode, mode_res, i, TRUE, 0); } if (changed) { RRSetChanged(xf86ScrnToScreen(scrn)); RRTellChanged(xf86ScrnToScreen(scrn)); } out_free_res: /* Check to see if a lessee has disappeared */ drmmode_validate_leases(scrn); drmModeFreeResources(mode_res); out: RRGetInfo(xf86ScrnToScreen(scrn), TRUE); } #undef DRM_MODE_LINK_STATUS_BAD #undef DRM_MODE_LINK_STATUS_GOOD #ifdef CONFIG_UDEV_KMS static void drmmode_handle_uevents(int fd, void *closure) { drmmode_ptr drmmode = closure; struct udev_device *dev; Bool found = FALSE; while ((dev = udev_monitor_receive_device(drmmode->uevent_monitor))) { udev_device_unref(dev); found = TRUE; } if (!found) return; drmmode_update_kms_state(drmmode); } #endif void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode) { #ifdef CONFIG_UDEV_KMS struct udev *u; struct udev_monitor *mon; u = udev_new(); if (!u) return; mon = udev_monitor_new_from_netlink(u, "udev"); if (!mon) { udev_unref(u); return; } if (udev_monitor_filter_add_match_subsystem_devtype(mon, "drm", "drm_minor") < 0 || udev_monitor_enable_receiving(mon) < 0) { udev_monitor_unref(mon); udev_unref(u); return; } drmmode->uevent_handler = xf86AddGeneralHandler(udev_monitor_get_fd(mon), drmmode_handle_uevents, drmmode); drmmode->uevent_monitor = mon; #endif } void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode) { #ifdef CONFIG_UDEV_KMS if (drmmode->uevent_handler) { struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor); xf86RemoveGeneralHandler(drmmode->uevent_handler); udev_monitor_unref(drmmode->uevent_monitor); udev_unref(u); } #endif } /* create front and cursor BOs */ Bool drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { modesettingPtr ms = modesettingPTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int width; int height; int bpp = ms->drmmode.kbpp; int i; int cpp = (bpp + 7) / 8; width = pScrn->virtualX; height = pScrn->virtualY; if (!drmmode_create_bo(drmmode, &drmmode->front_bo, width, height, bpp)) return FALSE; pScrn->displayWidth = drmmode_bo_get_pitch(&drmmode->front_bo) / cpp; width = ms->cursor_width; height = ms->cursor_height; bpp = 32; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->cursor_bo = dumb_bo_create(drmmode->fd, width, height, bpp); } return TRUE; } void * drmmode_map_front_bo(drmmode_ptr drmmode) { return drmmode_bo_map(drmmode, &drmmode->front_bo); } void * drmmode_map_secondary_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv) { int ret; if (ppriv->backing_bo->ptr) return ppriv->backing_bo->ptr; ret = dumb_bo_map(drmmode->fd, ppriv->backing_bo); if (ret) return NULL; return ppriv->backing_bo->ptr; } Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i, ret; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; ret = dumb_bo_map(drmmode->fd, drmmode_crtc->cursor_bo); if (ret) return FALSE; } return TRUE; } void drmmode_free_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; if (drmmode->fb_id) { drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = 0; } drmmode_bo_destroy(drmmode, &drmmode->front_bo); for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; dumb_bo_destroy(drmmode->fd, drmmode_crtc->cursor_bo); } } /* ugly workaround to see if we can create 32bpp */ void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int *depth, int *bpp) { drmModeResPtr mode_res; uint64_t value; struct dumb_bo *bo; uint32_t fb_id; int ret; /* 16 is fine */ ret = drmGetCap(drmmode->fd, DRM_CAP_DUMB_PREFERRED_DEPTH, &value); if (!ret && (value == 16 || value == 8)) { *depth = value; *bpp = value; return; } *depth = 24; mode_res = drmModeGetResources(drmmode->fd); if (!mode_res) return; if (mode_res->min_width == 0) mode_res->min_width = 1; if (mode_res->min_height == 0) mode_res->min_height = 1; /*create a bo */ bo = dumb_bo_create(drmmode->fd, mode_res->min_width, mode_res->min_height, 32); if (!bo) { *bpp = 24; goto out; } ret = drmModeAddFB(drmmode->fd, mode_res->min_width, mode_res->min_height, 24, 32, bo->pitch, bo->handle, &fb_id); if (ret) { *bpp = 24; dumb_bo_destroy(drmmode->fd, bo); goto out; } drmModeRmFB(drmmode->fd, fb_id); *bpp = 32; dumb_bo_destroy(drmmode->fd, bo); out: drmModeFreeResources(mode_res); return; } void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled) { ScrnInfoPtr pScrn = crtc->scrn; modesettingPtr ms = modesettingPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; if (drmmode->vrr_prop_id && drmmode_crtc->vrr_enabled != enabled && drmModeObjectSetProperty(ms->fd, drmmode_crtc->mode_crtc->crtc_id, DRM_MODE_OBJECT_CRTC, drmmode->vrr_prop_id, enabled) == 0) drmmode_crtc->vrr_enabled = enabled; } /* * We hook the screen's cursor-sprite (swcursor) functions to see if a swcursor * is active. When a swcursor is active we disable page-flipping. */ static void drmmode_sprite_do_set_cursor(msSpritePrivPtr sprite_priv, ScrnInfoPtr scrn, int x, int y) { modesettingPtr ms = modesettingPTR(scrn); CursorPtr cursor = sprite_priv->cursor; Bool sprite_visible = sprite_priv->sprite_visible; if (cursor) { x -= cursor->bits->xhot; y -= cursor->bits->yhot; sprite_priv->sprite_visible = x < scrn->virtualX && y < scrn->virtualY && (x + cursor->bits->width > 0) && (y + cursor->bits->height > 0); } else { sprite_priv->sprite_visible = FALSE; } ms->drmmode.sprites_visible += sprite_priv->sprite_visible - sprite_visible; } static void drmmode_sprite_set_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); msSpritePrivPtr sprite_priv = msGetSpritePriv(pDev, ms, pScreen); sprite_priv->cursor = pCursor; drmmode_sprite_do_set_cursor(sprite_priv, scrn, x, y); ms->SpriteFuncs->SetCursor(pDev, pScreen, pCursor, x, y); } static void drmmode_sprite_move_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); msSpritePrivPtr sprite_priv = msGetSpritePriv(pDev, ms, pScreen); drmmode_sprite_do_set_cursor(sprite_priv, scrn, x, y); ms->SpriteFuncs->MoveCursor(pDev, pScreen, x, y); } static Bool drmmode_sprite_realize_realize_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); return ms->SpriteFuncs->RealizeCursor(pDev, pScreen, pCursor); } static Bool drmmode_sprite_realize_unrealize_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); return ms->SpriteFuncs->UnrealizeCursor(pDev, pScreen, pCursor); } static Bool drmmode_sprite_device_cursor_initialize(DeviceIntPtr pDev, ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); return ms->SpriteFuncs->DeviceCursorInitialize(pDev, pScreen); } static void drmmode_sprite_device_cursor_cleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); modesettingPtr ms = modesettingPTR(scrn); ms->SpriteFuncs->DeviceCursorCleanup(pDev, pScreen); } miPointerSpriteFuncRec drmmode_sprite_funcs = { .RealizeCursor = drmmode_sprite_realize_realize_cursor, .UnrealizeCursor = drmmode_sprite_realize_unrealize_cursor, .SetCursor = drmmode_sprite_set_cursor, .MoveCursor = drmmode_sprite_move_cursor, .DeviceCursorInitialize = drmmode_sprite_device_cursor_initialize, .DeviceCursorCleanup = drmmode_sprite_device_cursor_cleanup, }; xorg-server-21.1.16/hw/xfree86/drivers/modesetting/drmmode_display.h0000644000175000017500000002350114757411105021066 /* * Copyright © 2007 Red Hat, Inc. * Copyright © 2019 NVIDIA CORPORATION * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * Aaron Plattner * */ #ifndef DRMMODE_DISPLAY_H #define DRMMODE_DISPLAY_H #include "xf86drmMode.h" #ifdef CONFIG_UDEV_KMS #include "libudev.h" #endif #include "dumb_bo.h" struct gbm_device; enum drmmode_plane_property { DRMMODE_PLANE_TYPE = 0, DRMMODE_PLANE_FB_ID, DRMMODE_PLANE_IN_FORMATS, DRMMODE_PLANE_CRTC_ID, DRMMODE_PLANE_SRC_X, DRMMODE_PLANE_SRC_Y, DRMMODE_PLANE_SRC_W, DRMMODE_PLANE_SRC_H, DRMMODE_PLANE_CRTC_X, DRMMODE_PLANE_CRTC_Y, DRMMODE_PLANE_CRTC_W, DRMMODE_PLANE_CRTC_H, DRMMODE_PLANE__COUNT }; enum drmmode_plane_type { DRMMODE_PLANE_TYPE_PRIMARY = 0, DRMMODE_PLANE_TYPE_CURSOR, DRMMODE_PLANE_TYPE_OVERLAY, DRMMODE_PLANE_TYPE__COUNT }; enum drmmode_connector_property { DRMMODE_CONNECTOR_CRTC_ID, DRMMODE_CONNECTOR__COUNT }; enum drmmode_crtc_property { DRMMODE_CRTC_ACTIVE, DRMMODE_CRTC_MODE_ID, DRMMODE_CRTC_GAMMA_LUT, DRMMODE_CRTC_GAMMA_LUT_SIZE, DRMMODE_CRTC_CTM, DRMMODE_CRTC__COUNT }; typedef struct { uint32_t width; uint32_t height; struct dumb_bo *dumb; #ifdef GLAMOR_HAS_GBM Bool used_modifiers; struct gbm_bo *gbm; #endif } drmmode_bo; typedef struct { int fd; unsigned fb_id; drmModeFBPtr mode_fb; int cpp; int kbpp; ScrnInfoPtr scrn; struct gbm_device *gbm; #ifdef CONFIG_UDEV_KMS struct udev_monitor *uevent_monitor; InputHandlerProc uevent_handler; #endif drmEventContext event_context; drmmode_bo front_bo; Bool sw_cursor; /* Broken-out options. */ OptionInfoPtr Options; Bool glamor; Bool shadow_enable; Bool shadow_enable2; /** Is Option "PageFlip" enabled? */ Bool pageflip; Bool force_24_32; void *shadow_fb; void *shadow_fb2; DevPrivateKeyRec pixmapPrivateKeyRec; DevScreenPrivateKeyRec spritePrivateKeyRec; DevPrivateKeyRec vrrPrivateKeyRec; /* Number of SW cursors currently visible on this screen */ int sprites_visible; Bool reverse_prime_offload_mode; Bool is_secondary; PixmapPtr fbcon_pixmap; Bool dri2_flipping; Bool present_flipping; Bool flip_bo_import_failed; Bool can_async_flip; Bool async_flip_secondaries; Bool dri2_enable; Bool present_enable; uint32_t vrr_prop_id; Bool use_ctm; } drmmode_rec, *drmmode_ptr; typedef struct { const char *name; Bool valid; uint64_t value; } drmmode_prop_enum_info_rec, *drmmode_prop_enum_info_ptr; typedef struct { const char *name; uint32_t prop_id; uint64_t value; unsigned int num_enum_values; drmmode_prop_enum_info_rec *enum_values; } drmmode_prop_info_rec, *drmmode_prop_info_ptr; typedef struct { drmModeModeInfo mode_info; uint32_t blob_id; struct xorg_list entry; } drmmode_mode_rec, *drmmode_mode_ptr; typedef struct { uint32_t format; uint32_t num_modifiers; uint64_t *modifiers; } drmmode_format_rec, *drmmode_format_ptr; typedef struct { drmmode_ptr drmmode; drmModeCrtcPtr mode_crtc; uint32_t vblank_pipe; int dpms_mode; struct dumb_bo *cursor_bo; Bool cursor_up; uint16_t lut_r[256], lut_g[256], lut_b[256]; drmmode_prop_info_rec props[DRMMODE_CRTC__COUNT]; drmmode_prop_info_rec props_plane[DRMMODE_PLANE__COUNT]; uint32_t plane_id; drmmode_mode_ptr current_mode; uint32_t num_formats; drmmode_format_rec *formats; drmmode_bo rotate_bo; unsigned rotate_fb_id; PixmapPtr prime_pixmap; PixmapPtr prime_pixmap_back; unsigned prime_pixmap_x; /** * @{ MSC (vblank count) handling for the PRESENT extension. * * The kernel's vblank counters are 32 bits and apparently full of * lies, and we need to give a reliable 64-bit msc for GL, so we * have to track and convert to a userland-tracked 64-bit msc. */ uint32_t msc_prev; uint64_t msc_high; /** @} */ Bool need_modeset; struct xorg_list mode_list; Bool enable_flipping; Bool flipping_active; Bool vrr_enabled; Bool use_gamma_lut; } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; typedef struct { drmModePropertyPtr mode_prop; uint64_t value; int num_atoms; /* if range prop, num_atoms == 1; if enum prop, num_atoms == num_enums + 1 */ Atom *atoms; } drmmode_prop_rec, *drmmode_prop_ptr; typedef struct { drmmode_ptr drmmode; int output_id; drmModeConnectorPtr mode_output; drmModeEncoderPtr *mode_encoders; drmModePropertyBlobPtr edid_blob; drmModePropertyBlobPtr tile_blob; int dpms_enum_id; int dpms; int num_props; drmmode_prop_ptr props; drmmode_prop_info_rec props_connector[DRMMODE_CONNECTOR__COUNT]; int enc_mask; int enc_clone_mask; xf86CrtcPtr current_crtc; Atom ctm_atom; struct drm_color_ctm ctm; } drmmode_output_private_rec, *drmmode_output_private_ptr; typedef struct { uint32_t lessee_id; } drmmode_lease_private_rec, *drmmode_lease_private_ptr; typedef struct _msPixmapPriv { uint32_t fb_id; struct dumb_bo *backing_bo; /* if this pixmap is backed by a dumb bo */ DamagePtr secondary_damage; /** Sink fields for flipping shared pixmaps */ int flip_seq; /* seq of current page flip event handler */ Bool wait_for_damage; /* if we have requested damage notification from source */ /** Source fields for flipping shared pixmaps */ Bool defer_dirty_update; /* if we want to manually update */ PixmapDirtyUpdatePtr dirty; /* cached dirty ent to avoid searching list */ DrawablePtr secondary_src; /* if we exported shared pixmap, dirty tracking src */ Bool notify_on_damage; /* if sink has requested damage notification */ } msPixmapPrivRec, *msPixmapPrivPtr; #define msGetPixmapPriv(drmmode, p) ((msPixmapPrivPtr)dixGetPrivateAddr(&(p)->devPrivates, &(drmmode)->pixmapPrivateKeyRec)) typedef struct _msSpritePriv { CursorPtr cursor; Bool sprite_visible; } msSpritePrivRec, *msSpritePrivPtr; #define msGetSpritePriv(dev, ms, screen) dixLookupScreenPrivate(&(dev)->devPrivates, &(ms)->drmmode.spritePrivateKeyRec, screen) extern miPointerSpriteFuncRec drmmode_sprite_funcs; Bool drmmode_is_format_supported(ScrnInfoPtr scrn, uint32_t format, uint64_t modifier); int drmmode_bo_import(drmmode_ptr drmmode, drmmode_bo *bo, uint32_t *fb_id); int drmmode_bo_destroy(drmmode_ptr drmmode, drmmode_bo *bo); uint32_t drmmode_bo_get_pitch(drmmode_bo *bo); uint32_t drmmode_bo_get_handle(drmmode_bo *bo); Bool drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode); void *drmmode_map_secondary_bo(drmmode_ptr drmmode, msPixmapPrivPtr ppriv); Bool drmmode_SetSlaveBO(PixmapPtr ppix, drmmode_ptr drmmode, int fd_handle, int pitch, int size); Bool drmmode_EnableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode, PixmapPtr front, PixmapPtr back); Bool drmmode_SharedPixmapPresentOnVBlank(PixmapPtr frontTarget, xf86CrtcPtr crtc, drmmode_ptr drmmode); Bool drmmode_SharedPixmapFlip(PixmapPtr frontTarget, xf86CrtcPtr crtc, drmmode_ptr drmmode); void drmmode_DisableSharedPixmapFlipping(xf86CrtcPtr crtc, drmmode_ptr drmmode); extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp); extern Bool drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y); extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode, Bool set_hw, Bool ign_err); extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn); extern void drmmode_update_kms_state(drmmode_ptr drmmode); extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode); extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode); Bool drmmode_create_initial_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void *drmmode_map_front_bo(drmmode_ptr drmmode); Bool drmmode_map_cursor_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_free_bos(ScrnInfoPtr pScrn, drmmode_ptr drmmode); void drmmode_get_default_bpp(ScrnInfoPtr pScrn, drmmode_ptr drmmmode, int *depth, int *bpp); void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode); int drmmode_crtc_flip(xf86CrtcPtr crtc, uint32_t fb_id, uint32_t flags, void *data); Bool drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t *fb_id, int *x, int *y); void drmmode_set_dpms(ScrnInfoPtr scrn, int PowerManagementMode, int flags); void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled); #endif xorg-server-21.1.16/hw/xfree86/drivers/modesetting/dumb_bo.c0000644000175000017500000000626414757411105017323 /* * Copyright © 2007 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include "dumb_bo.h" #include #include #include #include #include #include #include struct dumb_bo * dumb_bo_create(int fd, const unsigned width, const unsigned height, const unsigned bpp) { struct drm_mode_create_dumb arg; struct dumb_bo *bo; int ret; bo = calloc(1, sizeof(*bo)); if (!bo) return NULL; memset(&arg, 0, sizeof(arg)); arg.width = width; arg.height = height; arg.bpp = bpp; ret = drmIoctl(fd, DRM_IOCTL_MODE_CREATE_DUMB, &arg); if (ret) goto err_free; bo->handle = arg.handle; bo->size = arg.size; bo->pitch = arg.pitch; return bo; err_free: free(bo); return NULL; } int dumb_bo_map(int fd, struct dumb_bo *bo) { struct drm_mode_map_dumb arg; int ret; void *map; if (bo->ptr) { return 0; } memset(&arg, 0, sizeof(arg)); arg.handle = bo->handle; ret = drmIoctl(fd, DRM_IOCTL_MODE_MAP_DUMB, &arg); if (ret) return ret; map = mmap(0, bo->size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, arg.offset); if (map == MAP_FAILED) return -errno; bo->ptr = map; return 0; } int dumb_bo_destroy(int fd, struct dumb_bo *bo) { struct drm_mode_destroy_dumb arg; int ret; if (bo->ptr) { munmap(bo->ptr, bo->size); bo->ptr = NULL; } memset(&arg, 0, sizeof(arg)); arg.handle = bo->handle; ret = drmIoctl(fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg); if (ret) return -errno; free(bo); return 0; } struct dumb_bo * dumb_get_bo_from_fd(int fd, int handle, int pitch, int size) { struct dumb_bo *bo; int ret; bo = calloc(1, sizeof(*bo)); if (!bo) return NULL; ret = drmPrimeFDToHandle(fd, handle, &bo->handle); if (ret) { free(bo); return NULL; } bo->pitch = pitch; bo->size = size; return bo; } xorg-server-21.1.16/hw/xfree86/drivers/modesetting/dumb_bo.h0000644000175000017500000000322014757411105017315 /* * Copyright © 2007 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * */ #ifndef DUMB_BO_H #define DUMB_BO_H #include struct dumb_bo { uint32_t handle; uint32_t size; void *ptr; uint32_t pitch; }; struct dumb_bo *dumb_bo_create(int fd, const unsigned width, const unsigned height, const unsigned bpp); int dumb_bo_map(int fd, struct dumb_bo *bo); int dumb_bo_destroy(int fd, struct dumb_bo *bo); struct dumb_bo *dumb_get_bo_from_fd(int fd, int handle, int pitch, int size); #endif xorg-server-21.1.16/hw/xfree86/drivers/modesetting/present.c0000644000175000017500000003163214757411105017371 /* * Copyright © 2014 Intel Corporation * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "driver.h" #include "drmmode_display.h" #if 0 #define DebugPresent(x) ErrorF x #else #define DebugPresent(x) #endif struct ms_present_vblank_event { uint64_t event_id; Bool unflip; }; static RRCrtcPtr ms_present_get_crtc(WindowPtr window) { return ms_randr_crtc_covering_drawable(&window->drawable); } static int ms_present_get_ust_msc(RRCrtcPtr crtc, CARD64 *ust, CARD64 *msc) { xf86CrtcPtr xf86_crtc = crtc->devPrivate; return ms_get_crtc_ust_msc(xf86_crtc, ust, msc); } /* * Changes the variable refresh state for every CRTC on the screen. */ void ms_present_set_screen_vrr(ScrnInfoPtr scrn, Bool vrr_enabled) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc; int i; for (i = 0; i < config->num_crtc; i++) { crtc = config->crtc[i]; drmmode_crtc_set_vrr(crtc, vrr_enabled); } } /* * Called when the queued vblank event has occurred */ static void ms_present_vblank_handler(uint64_t msc, uint64_t usec, void *data) { struct ms_present_vblank_event *event = data; DebugPresent(("\t\tmh %lld msc %llu\n", (long long) event->event_id, (long long) msc)); present_event_notify(event->event_id, usec, msc); free(event); } /* * Called when the queued vblank is aborted */ static void ms_present_vblank_abort(void *data) { struct ms_present_vblank_event *event = data; DebugPresent(("\t\tma %lld\n", (long long) event->event_id)); free(event); } /* * Queue an event to report back to the Present extension when the specified * MSC has past */ static int ms_present_queue_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) { xf86CrtcPtr xf86_crtc = crtc->devPrivate; struct ms_present_vblank_event *event; uint32_t seq; event = calloc(sizeof(struct ms_present_vblank_event), 1); if (!event) return BadAlloc; event->event_id = event_id; seq = ms_drm_queue_alloc(xf86_crtc, event, ms_present_vblank_handler, ms_present_vblank_abort); if (!seq) { free(event); return BadAlloc; } if (!ms_queue_vblank(xf86_crtc, MS_QUEUE_ABSOLUTE, msc, NULL, seq)) return BadAlloc; DebugPresent(("\t\tmq %lld seq %u msc %llu\n", (long long) event_id, seq, (long long) msc)); return Success; } static Bool ms_present_event_match(void *data, void *match_data) { struct ms_present_vblank_event *event = data; uint64_t *match = match_data; return *match == event->event_id; } /* * Remove a pending vblank event from the DRM queue so that it is not reported * to the extension */ static void ms_present_abort_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) { ScreenPtr screen = crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); ms_drm_abort(scrn, ms_present_event_match, &event_id); } /* * Flush our batch buffer when requested by the Present extension. */ static void ms_present_flush(WindowPtr window) { #ifdef GLAMOR_HAS_GBM ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (ms->drmmode.glamor) ms->glamor.block_handler(screen); #endif } #ifdef GLAMOR_HAS_GBM /** * Callback for the DRM event queue when a flip has completed on all pipes * * Notify the extension code */ static void ms_present_flip_handler(modesettingPtr ms, uint64_t msc, uint64_t ust, void *data) { struct ms_present_vblank_event *event = data; DebugPresent(("\t\tms:fc %lld msc %llu ust %llu\n", (long long) event->event_id, (long long) msc, (long long) ust)); if (event->unflip) ms->drmmode.present_flipping = FALSE; ms_present_vblank_handler(msc, ust, event); } /* * Callback for the DRM queue abort code. A flip has been aborted. */ static void ms_present_flip_abort(modesettingPtr ms, void *data) { struct ms_present_vblank_event *event = data; DebugPresent(("\t\tms:fa %lld\n", (long long) event->event_id)); free(event); } /* * Test to see if page flipping is possible on the target crtc * * We ignore sw-cursors when *disabling* flipping, we may very well be * returning to scanning out the normal framebuffer *because* we just * switched to sw-cursor mode and check_flip just failed because of that. */ static Bool ms_present_check_unflip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip, PresentFlipReason *reason) { ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int num_crtcs_on = 0; int i; struct gbm_bo *gbm; if (!ms->drmmode.pageflip) return FALSE; if (ms->drmmode.dri2_flipping) return FALSE; if (!scrn->vtSema) return FALSE; for (i = 0; i < config->num_crtc; i++) { drmmode_crtc_private_ptr drmmode_crtc = config->crtc[i]->driver_private; /* Don't do pageflipping if CRTCs are rotated. */ if (drmmode_crtc->rotate_bo.gbm) return FALSE; if (xf86_crtc_on(config->crtc[i])) num_crtcs_on++; } /* We can't do pageflipping if all the CRTCs are off. */ if (num_crtcs_on == 0) return FALSE; /* * Check stride, can't change that reliably on flip on some drivers, unless * the kms driver is atomic_modeset_capable. */ if (!ms->atomic_modeset_capable && pixmap->devKind != drmmode_bo_get_pitch(&ms->drmmode.front_bo)) return FALSE; if (!ms->drmmode.glamor) return FALSE; #ifdef GBM_BO_WITH_MODIFIERS /* Check if buffer format/modifier is supported by all active CRTCs */ gbm = ms->glamor.gbm_bo_from_pixmap(screen, pixmap); if (gbm) { uint32_t format; uint64_t modifier; format = gbm_bo_get_format(gbm); modifier = gbm_bo_get_modifier(gbm); gbm_bo_destroy(gbm); if (!drmmode_is_format_supported(scrn, format, modifier)) { if (reason) *reason = PRESENT_FLIP_REASON_BUFFER_FORMAT; return FALSE; } } #endif /* Make sure there's a bo we can get to */ /* XXX: actually do this. also...is it sufficient? * if (!glamor_get_pixmap_private(pixmap)) * return FALSE; */ return TRUE; } static Bool ms_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip, PresentFlipReason *reason) { ScreenPtr screen = window->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (ms->drmmode.sprites_visible > 0) return FALSE; if(!ms_present_check_unflip(crtc, window, pixmap, sync_flip, reason)) return FALSE; ms->flip_window = window; return TRUE; } /* * Queue a flip on 'crtc' to 'pixmap' at 'target_msc'. If 'sync_flip' is true, * then wait for vblank. Otherwise, flip immediately */ static Bool ms_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, PixmapPtr pixmap, Bool sync_flip) { ScreenPtr screen = crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcPtr xf86_crtc = crtc->devPrivate; drmmode_crtc_private_ptr drmmode_crtc = xf86_crtc->driver_private; Bool ret; struct ms_present_vblank_event *event; if (!ms_present_check_flip(crtc, ms->flip_window, pixmap, sync_flip, NULL)) return FALSE; event = calloc(1, sizeof(struct ms_present_vblank_event)); if (!event) return FALSE; DebugPresent(("\t\tms:pf %lld msc %llu\n", (long long) event_id, (long long) target_msc)); event->event_id = event_id; event->unflip = FALSE; /* A window can only flip if it covers the entire X screen. * Only one window can flip at a time. * * If the window also has the variable refresh property then * variable refresh supported can be enabled on every CRTC. */ if (ms->vrr_support && ms->is_connector_vrr_capable && ms_window_has_variable_refresh(ms, ms->flip_window)) { ms_present_set_screen_vrr(scrn, TRUE); } ret = ms_do_pageflip(screen, pixmap, event, drmmode_crtc->vblank_pipe, !sync_flip, ms_present_flip_handler, ms_present_flip_abort, "Present-flip"); if (ret) ms->drmmode.present_flipping = TRUE; return ret; } /* * Queue a flip back to the normal frame buffer */ static void ms_present_unflip(ScreenPtr screen, uint64_t event_id) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); PixmapPtr pixmap = screen->GetScreenPixmap(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i; ms_present_set_screen_vrr(scrn, FALSE); if (ms_present_check_unflip(NULL, screen->root, pixmap, TRUE, NULL)) { struct ms_present_vblank_event *event; event = calloc(1, sizeof(struct ms_present_vblank_event)); if (!event) return; event->event_id = event_id; event->unflip = TRUE; if (ms_do_pageflip(screen, pixmap, event, -1, FALSE, ms_present_flip_handler, ms_present_flip_abort, "Present-unflip")) { return; } } for (i = 0; i < config->num_crtc; i++) { xf86CrtcPtr crtc = config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!crtc->enabled) continue; /* info->drmmode.fb_id still points to the FB for the last flipped BO. * Clear it, drmmode_set_mode_major will re-create it */ if (drmmode_crtc->drmmode->fb_id) { drmModeRmFB(drmmode_crtc->drmmode->fd, drmmode_crtc->drmmode->fb_id); drmmode_crtc->drmmode->fb_id = 0; } if (drmmode_crtc->dpms_mode == DPMSModeOn) crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation, crtc->x, crtc->y); else drmmode_crtc->need_modeset = TRUE; } present_event_notify(event_id, 0, 0); ms->drmmode.present_flipping = FALSE; } #endif static present_screen_info_rec ms_present_screen_info = { .version = PRESENT_SCREEN_INFO_VERSION, .get_crtc = ms_present_get_crtc, .get_ust_msc = ms_present_get_ust_msc, .queue_vblank = ms_present_queue_vblank, .abort_vblank = ms_present_abort_vblank, .flush = ms_present_flush, .capabilities = PresentCapabilityNone, #ifdef GLAMOR_HAS_GBM .check_flip = NULL, .check_flip2 = ms_present_check_flip, .flip = ms_present_flip, .unflip = ms_present_unflip, #endif }; Bool ms_present_screen_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); uint64_t value; int ret; ret = drmGetCap(ms->fd, DRM_CAP_ASYNC_PAGE_FLIP, &value); if (ret == 0 && value == 1) { ms_present_screen_info.capabilities |= PresentCapabilityAsync; ms->drmmode.can_async_flip = TRUE; } return present_screen_init(screen, &ms_present_screen_info); } xorg-server-21.1.16/hw/xfree86/drivers/modesetting/vblank.c0000644000175000017500000004057614757411105017175 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ /** @file vblank.c * * Support for tracking the DRM's vblank events. */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #include #include #include #include "driver.h" #include "drmmode_display.h" /** * Tracking for outstanding events queued to the kernel. * * Each list entry is a struct ms_drm_queue, which has a uint32_t * value generated from drm_seq that identifies the event and a * reference back to the crtc/screen associated with the event. It's * done this way rather than in the screen because we want to be able * to drain the list of event handlers that should be called at server * regen time, even though we don't close the drm fd and have no way * to actually drain the kernel events. */ static struct xorg_list ms_drm_queue; static uint32_t ms_drm_seq; static void box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) { dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1; dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2; if (dest->x1 >= dest->x2) { dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; return; } dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1; dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2; if (dest->y1 >= dest->y2) dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; } static void rr_crtc_box(RRCrtcPtr crtc, BoxPtr crtc_box) { if (crtc->mode) { crtc_box->x1 = crtc->x; crtc_box->y1 = crtc->y; switch (crtc->rotation) { case RR_Rotate_0: case RR_Rotate_180: default: crtc_box->x2 = crtc->x + crtc->mode->mode.width; crtc_box->y2 = crtc->y + crtc->mode->mode.height; break; case RR_Rotate_90: case RR_Rotate_270: crtc_box->x2 = crtc->x + crtc->mode->mode.height; crtc_box->y2 = crtc->y + crtc->mode->mode.width; break; } } else crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0; } static int box_area(BoxPtr box) { return (int)(box->x2 - box->x1) * (int)(box->y2 - box->y1); } static Bool rr_crtc_on(RRCrtcPtr crtc, Bool crtc_is_xf86_hint) { if (!crtc) { return FALSE; } if (crtc_is_xf86_hint && crtc->devPrivate) { return xf86_crtc_on(crtc->devPrivate); } else { return !!crtc->mode; } } Bool xf86_crtc_on(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn; } /* * Return the crtc covering 'box'. If two crtcs cover a portion of * 'box', then prefer the crtc with greater coverage. */ static RRCrtcPtr rr_crtc_covering_box(ScreenPtr pScreen, BoxPtr box, Bool screen_is_xf86_hint) { rrScrPrivPtr pScrPriv; RROutputPtr primary_output; RRCrtcPtr crtc, best_crtc, primary_crtc; int coverage, best_coverage; int c; BoxRec crtc_box, cover_box; best_crtc = NULL; best_coverage = 0; if (!dixPrivateKeyRegistered(rrPrivKey)) return NULL; pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) return NULL; primary_crtc = NULL; primary_output = RRFirstOutput(pScreen); if (primary_output) primary_crtc = primary_output->crtc; for (c = 0; c < pScrPriv->numCrtcs; c++) { crtc = pScrPriv->crtcs[c]; /* If the CRTC is off, treat it as not covering */ if (!rr_crtc_on(crtc, screen_is_xf86_hint)) continue; rr_crtc_box(crtc, &crtc_box); box_intersect(&cover_box, &crtc_box, box); coverage = box_area(&cover_box); if ((coverage > best_coverage) || (coverage == best_coverage && crtc == primary_crtc)) { best_crtc = crtc; best_coverage = coverage; } } return best_crtc; } static RRCrtcPtr rr_crtc_covering_box_on_secondary(ScreenPtr pScreen, BoxPtr box) { if (!pScreen->isGPU) { ScreenPtr secondary; RRCrtcPtr crtc = NULL; xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; crtc = rr_crtc_covering_box(secondary, box, FALSE); if (crtc) return crtc; } } return NULL; } xf86CrtcPtr ms_dri2_crtc_covering_drawable(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; RRCrtcPtr crtc = NULL; BoxRec box; box.x1 = pDraw->x; box.y1 = pDraw->y; box.x2 = box.x1 + pDraw->width; box.y2 = box.y1 + pDraw->height; crtc = rr_crtc_covering_box(pScreen, &box, TRUE); if (crtc) { return crtc->devPrivate; } return NULL; } RRCrtcPtr ms_randr_crtc_covering_drawable(DrawablePtr pDraw) { ScreenPtr pScreen = pDraw->pScreen; RRCrtcPtr crtc = NULL; BoxRec box; box.x1 = pDraw->x; box.y1 = pDraw->y; box.x2 = box.x1 + pDraw->width; box.y2 = box.y1 + pDraw->height; crtc = rr_crtc_covering_box(pScreen, &box, TRUE); if (!crtc) { crtc = rr_crtc_covering_box_on_secondary(pScreen, &box); } return crtc; } static Bool ms_get_kernel_ust_msc(xf86CrtcPtr crtc, uint64_t *msc, uint64_t *ust) { ScreenPtr screen = crtc->randr_crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmVBlank vbl; int ret; if (ms->has_queue_sequence || !ms->tried_queue_sequence) { uint64_t ns; ms->tried_queue_sequence = TRUE; ret = drmCrtcGetSequence(ms->fd, drmmode_crtc->mode_crtc->crtc_id, msc, &ns); if (ret != -1 || (errno != ENOTTY && errno != EINVAL)) { ms->has_queue_sequence = TRUE; if (ret == 0) *ust = ns / 1000; return ret == 0; } } /* Get current count */ vbl.request.type = DRM_VBLANK_RELATIVE | drmmode_crtc->vblank_pipe; vbl.request.sequence = 0; vbl.request.signal = 0; ret = drmWaitVBlank(ms->fd, &vbl); if (ret) { *msc = 0; *ust = 0; return FALSE; } else { *msc = vbl.reply.sequence; *ust = (CARD64) vbl.reply.tval_sec * 1000000 + vbl.reply.tval_usec; return TRUE; } } Bool ms_queue_vblank(xf86CrtcPtr crtc, ms_queue_flag flags, uint64_t msc, uint64_t *msc_queued, uint32_t seq) { ScreenPtr screen = crtc->randr_crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmVBlank vbl; int ret; for (;;) { /* Queue an event at the specified sequence */ if (ms->has_queue_sequence || !ms->tried_queue_sequence) { uint32_t drm_flags = 0; uint64_t kernel_queued; ms->tried_queue_sequence = TRUE; if (flags & MS_QUEUE_RELATIVE) drm_flags |= DRM_CRTC_SEQUENCE_RELATIVE; if (flags & MS_QUEUE_NEXT_ON_MISS) drm_flags |= DRM_CRTC_SEQUENCE_NEXT_ON_MISS; ret = drmCrtcQueueSequence(ms->fd, drmmode_crtc->mode_crtc->crtc_id, drm_flags, msc, &kernel_queued, seq); if (ret == 0) { if (msc_queued) *msc_queued = ms_kernel_msc_to_crtc_msc(crtc, kernel_queued, TRUE); ms->has_queue_sequence = TRUE; return TRUE; } if (ret != -1 || (errno != ENOTTY && errno != EINVAL)) { ms->has_queue_sequence = TRUE; goto check; } } vbl.request.type = DRM_VBLANK_EVENT | drmmode_crtc->vblank_pipe; if (flags & MS_QUEUE_RELATIVE) vbl.request.type |= DRM_VBLANK_RELATIVE; else vbl.request.type |= DRM_VBLANK_ABSOLUTE; if (flags & MS_QUEUE_NEXT_ON_MISS) vbl.request.type |= DRM_VBLANK_NEXTONMISS; vbl.request.sequence = msc; vbl.request.signal = seq; ret = drmWaitVBlank(ms->fd, &vbl); if (ret == 0) { if (msc_queued) *msc_queued = ms_kernel_msc_to_crtc_msc(crtc, vbl.reply.sequence, FALSE); return TRUE; } check: if (errno != EBUSY) { ms_drm_abort_seq(scrn, seq); return FALSE; } ms_flush_drm_events(screen); } } /** * Convert a 32-bit or 64-bit kernel MSC sequence number to a 64-bit local * sequence number, adding in the high 32 bits, and dealing with 32-bit * wrapping if needed. */ uint64_t ms_kernel_msc_to_crtc_msc(xf86CrtcPtr crtc, uint64_t sequence, Bool is64bit) { drmmode_crtc_private_rec *drmmode_crtc = crtc->driver_private; if (!is64bit) { /* sequence is provided as a 32 bit value from one of the 32 bit apis, * e.g., drmWaitVBlank(), classic vblank events, or pageflip events. * * Track and handle 32-Bit wrapping, somewhat robust against occasional * out-of-order not always monotonically increasing sequence values. */ if ((int64_t) sequence < ((int64_t) drmmode_crtc->msc_prev - 0x40000000)) drmmode_crtc->msc_high += 0x100000000L; if ((int64_t) sequence > ((int64_t) drmmode_crtc->msc_prev + 0x40000000)) drmmode_crtc->msc_high -= 0x100000000L; drmmode_crtc->msc_prev = sequence; return drmmode_crtc->msc_high + sequence; } /* True 64-Bit sequence from Linux 4.15+ 64-Bit drmCrtcGetSequence / * drmCrtcQueueSequence apis and events. Pass through sequence unmodified, * but update the 32-bit tracking variables with reliable ground truth. * * With 64-Bit api in use, the only !is64bit input is from pageflip events, * and any pageflip event is usually preceded by some is64bit input from * swap scheduling, so this should provide reliable mapping for pageflip * events based on true 64-bit input as baseline as well. */ drmmode_crtc->msc_prev = sequence; drmmode_crtc->msc_high = sequence & 0xffffffff00000000; return sequence; } int ms_get_crtc_ust_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc) { ScreenPtr screen = crtc->randr_crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); uint64_t kernel_msc; if (!ms_get_kernel_ust_msc(crtc, &kernel_msc, ust)) return BadMatch; *msc = ms_kernel_msc_to_crtc_msc(crtc, kernel_msc, ms->has_queue_sequence); return Success; } /** * Check for pending DRM events and process them. */ static void ms_drm_socket_handler(int fd, int ready, void *data) { ScreenPtr screen = data; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (data == NULL) return; drmHandleEvent(fd, &ms->event_context); } /* * Enqueue a potential drm response; when the associated response * appears, we've got data to pass to the handler from here */ uint32_t ms_drm_queue_alloc(xf86CrtcPtr crtc, void *data, ms_drm_handler_proc handler, ms_drm_abort_proc abort) { ScreenPtr screen = crtc->randr_crtc->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct ms_drm_queue *q; q = calloc(1, sizeof(struct ms_drm_queue)); if (!q) return 0; if (!ms_drm_seq) ++ms_drm_seq; q->seq = ms_drm_seq++; q->scrn = scrn; q->crtc = crtc; q->data = data; q->handler = handler; q->abort = abort; xorg_list_add(&q->list, &ms_drm_queue); return q->seq; } /** * Abort one queued DRM entry, removing it * from the list, calling the abort function and * freeing the memory */ static void ms_drm_abort_one(struct ms_drm_queue *q) { xorg_list_del(&q->list); q->abort(q->data); free(q); } /** * Abort all queued entries on a specific scrn, used * when resetting the X server */ static void ms_drm_abort_scrn(ScrnInfoPtr scrn) { struct ms_drm_queue *q, *tmp; xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) { if (q->scrn == scrn) ms_drm_abort_one(q); } } /** * Abort by drm queue sequence number. */ void ms_drm_abort_seq(ScrnInfoPtr scrn, uint32_t seq) { struct ms_drm_queue *q, *tmp; xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) { if (q->seq == seq) { ms_drm_abort_one(q); break; } } } /* * Externally usable abort function that uses a callback to match a single * queued entry to abort */ void ms_drm_abort(ScrnInfoPtr scrn, Bool (*match)(void *data, void *match_data), void *match_data) { struct ms_drm_queue *q; xorg_list_for_each_entry(q, &ms_drm_queue, list) { if (match(q->data, match_data)) { ms_drm_abort_one(q); break; } } } /* * General DRM kernel handler. Looks for the matching sequence number in the * drm event queue and calls the handler for it. */ static void ms_drm_sequence_handler(int fd, uint64_t frame, uint64_t ns, Bool is64bit, uint64_t user_data) { struct ms_drm_queue *q, *tmp; uint32_t seq = (uint32_t) user_data; xorg_list_for_each_entry_safe(q, tmp, &ms_drm_queue, list) { if (q->seq == seq) { uint64_t msc; msc = ms_kernel_msc_to_crtc_msc(q->crtc, frame, is64bit); xorg_list_del(&q->list); q->handler(msc, ns / 1000, q->data); free(q); break; } } } static void ms_drm_sequence_handler_64bit(int fd, uint64_t frame, uint64_t ns, uint64_t user_data) { /* frame is true 64 bit wrapped into 64 bit */ ms_drm_sequence_handler(fd, frame, ns, TRUE, user_data); } static void ms_drm_handler(int fd, uint32_t frame, uint32_t sec, uint32_t usec, void *user_ptr) { /* frame is 32 bit wrapped into 64 bit */ ms_drm_sequence_handler(fd, frame, ((uint64_t) sec * 1000000 + usec) * 1000, FALSE, (uint32_t) (uintptr_t) user_ptr); } Bool ms_vblank_screen_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); modesettingEntPtr ms_ent = ms_ent_priv(scrn); xorg_list_init(&ms_drm_queue); ms->event_context.version = 4; ms->event_context.vblank_handler = ms_drm_handler; ms->event_context.page_flip_handler = ms_drm_handler; ms->event_context.sequence_handler = ms_drm_sequence_handler_64bit; /* We need to re-register the DRM fd for the synchronisation * feedback on every server generation, so perform the * registration within ScreenInit and not PreInit. */ if (ms_ent->fd_wakeup_registered != serverGeneration) { SetNotifyFd(ms->fd, ms_drm_socket_handler, X_NOTIFY_READ, screen); ms_ent->fd_wakeup_registered = serverGeneration; ms_ent->fd_wakeup_ref = 1; } else ms_ent->fd_wakeup_ref++; return TRUE; } void ms_vblank_close_screen(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); modesettingEntPtr ms_ent = ms_ent_priv(scrn); ms_drm_abort_scrn(scrn); if (ms_ent->fd_wakeup_registered == serverGeneration && !--ms_ent->fd_wakeup_ref) { RemoveNotifyFd(ms->fd); } } xorg-server-21.1.16/hw/xfree86/drivers/modesetting/pageflip.c0000644000175000017500000003672414757411105017507 /* * Copyright © 2014 Intel Corporation * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #include #include "driver.h" /* * Flush the DRM event queue when full; makes space for new events. * * Returns a negative value on error, 0 if there was nothing to process, * or 1 if we handled any events. */ int ms_flush_drm_events(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); struct pollfd p = { .fd = ms->fd, .events = POLLIN }; int r; do { r = xserver_poll(&p, 1, 0); } while (r == -1 && (errno == EINTR || errno == EAGAIN)); /* If there was an error, r will be < 0. Return that. If there was * nothing to process, r == 0. Return that. */ if (r <= 0) return r; /* Try to handle the event. If there was an error, return it. */ r = drmHandleEvent(ms->fd, &ms->event_context); if (r < 0) return r; /* Otherwise return 1 to indicate that we handled an event. */ return 1; } #ifdef GLAMOR_HAS_GBM /* * Event data for an in progress flip. * This contains a pointer to the vblank event, * and information about the flip in progress. * a reference to this is stored in the per-crtc * flips. */ struct ms_flipdata { ScreenPtr screen; void *event; ms_pageflip_handler_proc event_handler; ms_pageflip_abort_proc abort_handler; /* number of CRTC events referencing this */ int flip_count; uint64_t fe_msc; uint64_t fe_usec; uint32_t old_fb_id; }; /* * Per crtc pageflipping information, * These are submitted to the queuing code * one of them per crtc per flip. */ struct ms_crtc_pageflip { Bool on_reference_crtc; /* reference to the ms_flipdata */ struct ms_flipdata *flipdata; }; /** * Free an ms_crtc_pageflip. * * Drops the reference count on the flipdata. */ static void ms_pageflip_free(struct ms_crtc_pageflip *flip) { struct ms_flipdata *flipdata = flip->flipdata; free(flip); if (--flipdata->flip_count > 0) return; free(flipdata); } /** * Callback for the DRM event queue when a single flip has completed * * Once the flip has been completed on all pipes, notify the * extension code telling it when that happened */ static void ms_pageflip_handler(uint64_t msc, uint64_t ust, void *data) { struct ms_crtc_pageflip *flip = data; struct ms_flipdata *flipdata = flip->flipdata; ScreenPtr screen = flipdata->screen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (flip->on_reference_crtc) { flipdata->fe_msc = msc; flipdata->fe_usec = ust; } if (flipdata->flip_count == 1) { flipdata->event_handler(ms, flipdata->fe_msc, flipdata->fe_usec, flipdata->event); drmModeRmFB(ms->fd, flipdata->old_fb_id); } ms_pageflip_free(flip); } /* * Callback for the DRM queue abort code. A flip has been aborted. */ static void ms_pageflip_abort(void *data) { struct ms_crtc_pageflip *flip = data; struct ms_flipdata *flipdata = flip->flipdata; ScreenPtr screen = flipdata->screen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); if (flipdata->flip_count == 1) flipdata->abort_handler(ms, flipdata->event); ms_pageflip_free(flip); } static Bool do_queue_flip_on_crtc(modesettingPtr ms, xf86CrtcPtr crtc, uint32_t flags, uint32_t seq) { return drmmode_crtc_flip(crtc, ms->drmmode.fb_id, flags, (void *) (uintptr_t) seq); } enum queue_flip_status { QUEUE_FLIP_SUCCESS, QUEUE_FLIP_ALLOC_FAILED, QUEUE_FLIP_QUEUE_ALLOC_FAILED, QUEUE_FLIP_DRM_FLUSH_FAILED, }; static int queue_flip_on_crtc(ScreenPtr screen, xf86CrtcPtr crtc, struct ms_flipdata *flipdata, int ref_crtc_vblank_pipe, uint32_t flags) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; struct ms_crtc_pageflip *flip; uint32_t seq; flip = calloc(1, sizeof(struct ms_crtc_pageflip)); if (flip == NULL) { return QUEUE_FLIP_ALLOC_FAILED; } /* Only the reference crtc will finally deliver its page flip * completion event. All other crtc's events will be discarded. */ flip->on_reference_crtc = (drmmode_crtc->vblank_pipe == ref_crtc_vblank_pipe); flip->flipdata = flipdata; seq = ms_drm_queue_alloc(crtc, flip, ms_pageflip_handler, ms_pageflip_abort); if (!seq) { free(flip); return QUEUE_FLIP_QUEUE_ALLOC_FAILED; } /* take a reference on flipdata for use in flip */ flipdata->flip_count++; while (do_queue_flip_on_crtc(ms, crtc, flags, seq)) { /* We may have failed because the event queue was full. Flush it * and retry. If there was nothing to flush, then we failed for * some other reason and should just return an error. */ if (ms_flush_drm_events(screen) <= 0) { /* Aborting will also decrement flip_count and free(flip). */ ms_drm_abort_seq(scrn, seq); return QUEUE_FLIP_DRM_FLUSH_FAILED; } /* We flushed some events, so try again. */ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue retry\n"); } /* The page flip succeeded. */ return QUEUE_FLIP_SUCCESS; } #define MS_ASYNC_FLIP_LOG_ENABLE_LOGS_INTERVAL_MS 10000 #define MS_ASYNC_FLIP_LOG_FREQUENT_LOGS_INTERVAL_MS 1000 #define MS_ASYNC_FLIP_FREQUENT_LOG_COUNT 10 static void ms_print_pageflip_error(int screen_index, const char *log_prefix, int crtc_index, int flags, int err) { /* In certain circumstances we will have a lot of flip errors without a * reasonable way to prevent them. In such case we reduce the number of * logged messages to at least not fill the error logs. * * The details are as follows: * * At least on i915 hardware support for async page flip support depends * on the used modifiers which themselves can change dynamically for a * screen. This results in the following problems: * * - We can't know about whether a particular CRTC will be able to do an * async flip without hardcoding the same logic as the kernel as there's * no interface to query this information. * * - There is no way to give this information to an application, because * the protocol of the present extension does not specify anything about * changing of the capabilities on runtime or the need to re-query them. * * Even if the above was solved, the only benefit would be avoiding a * roundtrip to the kernel and reduced amount of error logs. The former * does not seem to be a good enough benefit compared to the amount of work * that would need to be done. The latter is solved below. */ static CARD32 error_last_time_ms; static int frequent_logs; static Bool logs_disabled; if (flags & DRM_MODE_PAGE_FLIP_ASYNC) { CARD32 curr_time_ms = GetTimeInMillis(); int clocks_since_last_log = curr_time_ms - error_last_time_ms; if (clocks_since_last_log > MS_ASYNC_FLIP_LOG_ENABLE_LOGS_INTERVAL_MS) { frequent_logs = 0; logs_disabled = FALSE; } if (!logs_disabled) { if (clocks_since_last_log < MS_ASYNC_FLIP_LOG_FREQUENT_LOGS_INTERVAL_MS) { frequent_logs++; } if (frequent_logs > MS_ASYNC_FLIP_FREQUENT_LOG_COUNT) { xf86DrvMsg(screen_index, X_WARNING, "%s: detected too frequent flip errors, disabling " "logs until frequency is reduced\n", log_prefix); logs_disabled = TRUE; } else { xf86DrvMsg(screen_index, X_WARNING, "%s: queue async flip during flip on CRTC %d failed: %s\n", log_prefix, crtc_index, strerror(err)); } } error_last_time_ms = curr_time_ms; } else { xf86DrvMsg(screen_index, X_WARNING, "%s: queue flip during flip on CRTC %d failed: %s\n", log_prefix, crtc_index, strerror(err)); } } Bool ms_do_pageflip(ScreenPtr screen, PixmapPtr new_front, void *event, int ref_crtc_vblank_pipe, Bool async, ms_pageflip_handler_proc pageflip_handler, ms_pageflip_abort_proc pageflip_abort, const char *log_prefix) { #ifndef GLAMOR_HAS_GBM return FALSE; #else ScrnInfoPtr scrn = xf86ScreenToScrn(screen); modesettingPtr ms = modesettingPTR(scrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); drmmode_bo new_front_bo; uint32_t flags; int i; struct ms_flipdata *flipdata; ms->glamor.block_handler(screen); new_front_bo.gbm = ms->glamor.gbm_bo_from_pixmap(screen, new_front); new_front_bo.dumb = NULL; if (!new_front_bo.gbm) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s: Failed to get GBM BO for flip to new front.\n", log_prefix); return FALSE; } flipdata = calloc(1, sizeof(struct ms_flipdata)); if (!flipdata) { drmmode_bo_destroy(&ms->drmmode, &new_front_bo); xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s: Failed to allocate flipdata.\n", log_prefix); return FALSE; } flipdata->event = event; flipdata->screen = screen; flipdata->event_handler = pageflip_handler; flipdata->abort_handler = pageflip_abort; /* * Take a local reference on flipdata. * if the first flip fails, the sequence abort * code will free the crtc flip data, and drop * its reference which would cause this to be * freed when we still required it. */ flipdata->flip_count++; /* Create a new handle for the back buffer */ flipdata->old_fb_id = ms->drmmode.fb_id; new_front_bo.width = new_front->drawable.width; new_front_bo.height = new_front->drawable.height; if (drmmode_bo_import(&ms->drmmode, &new_front_bo, &ms->drmmode.fb_id)) { if (!ms->drmmode.flip_bo_import_failed) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Import BO failed: %s\n", log_prefix, strerror(errno)); ms->drmmode.flip_bo_import_failed = TRUE; } goto error_out; } else { if (ms->drmmode.flip_bo_import_failed && new_front != screen->GetScreenPixmap(screen)) ms->drmmode.flip_bo_import_failed = FALSE; } /* Queue flips on all enabled CRTCs. * * Note that if/when we get per-CRTC buffers, we'll have to update this. * Right now it assumes a single shared fb across all CRTCs, with the * kernel fixing up the offset of each CRTC as necessary. * * Also, flips queued on disabled or incorrectly configured displays * may never complete; this is a configuration error. */ for (i = 0; i < config->num_crtc; i++) { enum queue_flip_status flip_status; xf86CrtcPtr crtc = config->crtc[i]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; if (!xf86_crtc_on(crtc)) continue; flags = DRM_MODE_PAGE_FLIP_EVENT; if (ms->drmmode.can_async_flip && async) flags |= DRM_MODE_PAGE_FLIP_ASYNC; /* * If this is not the reference crtc used for flip timing and flip event * delivery and timestamping, ie. not the one whose presentation timing * we do really care about, and async flips are possible, and requested * by an xorg.conf option, then we flip this "secondary" crtc without * sync to vblank. This may cause tearing on such "secondary" outputs, * but it will prevent throttling of multi-display flips to the refresh * cycle of any of the secondary crtcs, avoiding periodic slowdowns and * judder caused by unsynchronized outputs. This is especially useful for * outputs in a "clone-mode" or "mirror-mode" configuration. */ if (ms->drmmode.can_async_flip && ms->drmmode.async_flip_secondaries && (drmmode_crtc->vblank_pipe != ref_crtc_vblank_pipe) && (ref_crtc_vblank_pipe >= 0)) flags |= DRM_MODE_PAGE_FLIP_ASYNC; flip_status = queue_flip_on_crtc(screen, crtc, flipdata, ref_crtc_vblank_pipe, flags); switch (flip_status) { case QUEUE_FLIP_ALLOC_FAILED: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: carrier alloc for queue flip on CRTC %d failed.\n", log_prefix, i); goto error_undo; case QUEUE_FLIP_QUEUE_ALLOC_FAILED: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: entry alloc for queue flip on CRTC %d failed.\n", log_prefix, i); goto error_undo; case QUEUE_FLIP_DRM_FLUSH_FAILED: ms_print_pageflip_error(scrn->scrnIndex, log_prefix, i, flags, errno); goto error_undo; case QUEUE_FLIP_SUCCESS: break; } } drmmode_bo_destroy(&ms->drmmode, &new_front_bo); /* * Do we have more than our local reference, * if so and no errors, then drop our local * reference and return now. */ if (flipdata->flip_count > 1) { flipdata->flip_count--; return TRUE; } error_undo: /* * Have we just got the local reference? * free the framebuffer if so since nobody successfully * submitted anything */ if (flipdata->flip_count == 1) { drmModeRmFB(ms->fd, ms->drmmode.fb_id); ms->drmmode.fb_id = flipdata->old_fb_id; } error_out: drmmode_bo_destroy(&ms->drmmode, &new_front_bo); /* if only the local reference - free the structure, * else drop the local reference and return */ if (flipdata->flip_count == 1) free(flipdata); else flipdata->flip_count--; return FALSE; #endif /* GLAMOR_HAS_GBM */ } #endif xorg-server-21.1.16/hw/xfree86/drivers/modesetting/modesetting.man0000644000175000017500000001125714757411105020565 .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH MODESETTING @drivermansuffix@ @vendorversion@ .SH NAME modesetting \- video driver for framebuffer device .SH SYNOPSIS .nf .B "Section \*qDevice\*q" .BI " Identifier \*q" devname \*q .B " Driver \*qmodesetting\*q" .BI " BusID \*qpci:" bus : dev : func \*q \ \ ... .B EndSection .fi .SH DESCRIPTION .B modesetting is an @xservername@ driver for KMS devices. This driver supports TrueColor visuals at framebuffer depths of 15, 16, 24, and 30. RandR 1.2 is supported for multi-head configurations. Acceleration is available through glamor for devices supporting at least OpenGL ES 2.0 or OpenGL 2.1. If glamor is not enabled, a shadow framebuffer is configured based on the KMS drivers' preference (unless the framebuffer is 24 bits per pixel, in which case the shadow framebuffer is always used). .SH SUPPORTED HARDWARE The .B modesetting driver supports all hardware where a KMS driver is available. modesetting uses the Linux DRM KMS ioctls and dumb object create/map. .SH CONFIGURATION DETAILS Please refer to @xconfigfile@(@filemansuffix@) for general configuration details. This section only covers configuration details specific to this driver. .PP For this driver it is not required to specify modes in the screen section of the config file. The .B modesetting driver can pick up the currently used video mode from the kernel driver and will use it if there are no video modes configured. .PP For PCI boards you might have to add a BusID line to the Device section. See above for a sample line. .PP The following driver .B Options are supported: .TP .BI "Option \*qSWcursor\*q \*q" boolean \*q Selects software cursor. The default is .B off. .TP .BI "Option \*qkmsdev\*q \*q" string \*q The framebuffer device to use. Default: /dev/dri/card0. .TP .BI "Option \*qShadowFB\*q \*q" boolean \*q Enable or disable use of the shadow framebuffer layer. Default: on. .TP .BI "Option \*qDoubleShadow\*q \*q" boolean \*q Double-buffer shadow updates. When enabled, the driver will keep two copies of the shadow framebuffer. When the shadow framebuffer is flushed, the old and new versions of the shadow are compared, and only tiles that have actually changed are uploaded to the device. This is an optimization for server-class GPUs with a remote display function (typically VNC), where remote updates are triggered by any framebuffer write, so minimizing the amount of data uploaded is crucial. This defaults to enabled for ASPEED and Matrox G200 devices, and disabled otherwise. .TP .BI "Option \*qAccelMethod\*q \*q" string \*q One of \*qglamor\*q or \*qnone\*q. Default: glamor. .TP .BI "Option \*qPageFlip\*q \*q" boolean \*q Enable DRI3 page flipping. The default is .B on. .TP .BI "Option \*qVariableRefresh\*q \*q" boolean \*q Enables support for enabling variable refresh on the Screen's CRTCs when an suitable application is flipping via the Present extension. .br The default is .B off. .TP .BI "Option \*qAsyncFlipSecondaries\*q \*q" boolean \*q Use async flips for secondary video outputs on multi-display setups. If a screen has multiple displays attached and DRI3 page flipping is used, then only one of the displays will have its page flip synchronized to vblank for tear-free presentation. This is the display that is used for presentation timing and timestamping, usually the one covering the biggest pixel area of the screen. All other displays ("Secondaries") will not synchronize their flips. This may cause some tearing on these displays, but it prevents a permanent or periodic slowdown or irritating judder of animations if not all video outputs are running synchronized with each other and with the same refresh rate. There is no perfect solution apart from perfectly synchronized outputs, but this option may give preferrable results if the displays in a multi-display setup mirror or clone each other. The default is .B off. .TP .BI "Option \*qZaphodHeads\*q \*q" string \*q Specify the RandR output(s) to use with zaphod mode for a particular driver instance. If you use this option you must use this option for all instances of the driver. .br For example: .B Option \*qZaphodHeads\*q \*qLVDS,VGA-0\*q will assign xrandr outputs LVDS and VGA-0 to this instance of the driver. .TP .BI "Option \*qUseGammaLUT\*q \*q" boolean \*q Enable or disable use of the GAMMA_LUT property, when available. When enabled, this option allows the driver to use gamma ramps with more entries, if supported by the kernel. By default, GAMMA_LUT will be used for kms drivers which are known to be safe for use of GAMMA_LUT. .TP .SH "SEE ALSO" @xservername@(@appmansuffix@), @xconfigfile@(@filemansuffix@), Xserver(@appmansuffix@), X(@miscmansuffix@) .SH AUTHORS Authors include: Dave Airlie xorg-server-21.1.16/hw/xfree86/drivers/Makefile.am0000644000175000017500000000017514757411105015255 SUBDIRS = if XORG_DRIVER_MODESETTING SUBDIRS += modesetting endif if XORG_DRIVER_INPUT_INPUTTEST SUBDIRS += inputtest endif xorg-server-21.1.16/hw/xfree86/drivers/Makefile.in0000644000175000017500000006224514757411115015275 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XORG_DRIVER_MODESETTING_TRUE@am__append_1 = modesetting @XORG_DRIVER_INPUT_INPUTTEST_TRUE@am__append_2 = inputtest subdir = hw/xfree86/drivers ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = modesetting inputtest am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(am__append_1) $(am__append_2) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/drivers/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/drivers/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/exa/0000755000175000017500000000000014757411135012400 5xorg-server-21.1.16/hw/xfree86/exa/meson.build0000644000175000017500000000053414757411105014461 xorg_exa = shared_module('exa', 'examodule.c', include_directories: [inc, xorg_inc], dependencies: common_dep, link_with: [libxserver_exa, e], c_args: xorg_c_args, install: true, install_dir: module_dir, ) install_man(configure_file( input: 'man/exa.man', output: 'exa.4', configuration: manpage_config, )) xorg-server-21.1.16/hw/xfree86/exa/Makefile.am0000644000175000017500000000047014757411105014352 SUBDIRS = man module_LTLIBRARIES = libexa.la libexa_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) AM_CPPFLAGS = \ $(XORG_INCS) \ -I$(srcdir)/../../../exa AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) libexa_la_SOURCES = \ examodule.c libexa_la_LIBADD = \ ../../../exa/libexa.la $(PIXMAN_LIBS) xorg-server-21.1.16/hw/xfree86/exa/Makefile.in0000644000175000017500000007676614757411115014411 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/exa ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" LTLIBRARIES = $(module_LTLIBRARIES) am__DEPENDENCIES_1 = libexa_la_DEPENDENCIES = ../../../exa/libexa.la $(am__DEPENDENCIES_1) am_libexa_la_OBJECTS = examodule.lo libexa_la_OBJECTS = $(am_libexa_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libexa_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libexa_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/examodule.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libexa_la_SOURCES) DIST_SOURCES = $(libexa_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man module_LTLIBRARIES = libexa.la libexa_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) AM_CPPFLAGS = \ $(XORG_INCS) \ -I$(srcdir)/../../../exa AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) libexa_la_SOURCES = \ examodule.c libexa_la_LIBADD = \ ../../../exa/libexa.la $(PIXMAN_LIBS) all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/exa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/exa/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libexa.la: $(libexa_la_OBJECTS) $(libexa_la_DEPENDENCIES) $(EXTRA_libexa_la_DEPENDENCIES) $(AM_V_CCLD)$(libexa_la_LINK) -rpath $(moduledir) $(libexa_la_OBJECTS) $(libexa_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/examodule.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(moduledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/examodule.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-moduleLTLIBRARIES install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/examodule.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-moduleLTLIBRARIES .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-moduleLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/exa/examodule.c0000644000175000017500000001512714757411105014452 /* * Copyright © 2006 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "exa_priv.h" #include "xf86str.h" #include "xf86.h" typedef struct _ExaXorgScreenPrivRec { CloseScreenProcPtr SavedCloseScreen; xf86EnableDisableFBAccessProc *SavedEnableDisableFBAccess; OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; static DevPrivateKeyRec exaXorgScreenPrivateKeyRec; #define exaXorgScreenPrivateKey (&exaXorgScreenPrivateKeyRec) typedef enum { EXAOPT_MIGRATION_HEURISTIC, EXAOPT_NO_COMPOSITE, EXAOPT_NO_UTS, EXAOPT_NO_DFS, EXAOPT_OPTIMIZE_MIGRATION } EXAOpts; static const OptionInfoRec EXAOptions[] = { {EXAOPT_MIGRATION_HEURISTIC, "MigrationHeuristic", OPTV_ANYSTR, {0}, FALSE}, {EXAOPT_NO_COMPOSITE, "EXANoComposite", OPTV_BOOLEAN, {0}, FALSE}, {EXAOPT_NO_UTS, "EXANoUploadToScreen", OPTV_BOOLEAN, {0}, FALSE}, {EXAOPT_NO_DFS, "EXANoDownloadFromScreen", OPTV_BOOLEAN, {0}, FALSE}, {EXAOPT_OPTIMIZE_MIGRATION, "EXAOptimizeMigration", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE} }; static Bool exaXorgCloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); pScreen->CloseScreen = pScreenPriv->SavedCloseScreen; pScrn->EnableDisableFBAccess = pScreenPriv->SavedEnableDisableFBAccess; free(pScreenPriv->options); free(pScreenPriv); return pScreen->CloseScreen(pScreen); } static void exaXorgEnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); ExaXorgScreenPrivPtr pScreenPriv = (ExaXorgScreenPrivPtr) dixLookupPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey); if (!enable) exaEnableDisableFBAccess(pScreen, enable); if (pScreenPriv->SavedEnableDisableFBAccess) pScreenPriv->SavedEnableDisableFBAccess(pScrn, enable); if (enable) exaEnableDisableFBAccess(pScreen, enable); } /** * This will be called during exaDriverInit, giving us the chance to set options * and hook in our EnableDisableFBAccess. */ void exaDDXDriverInit(ScreenPtr pScreen) { ExaScreenPriv(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ExaXorgScreenPrivPtr pScreenPriv; if (!dixRegisterPrivateKey(&exaXorgScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return; pScreenPriv = calloc(1, sizeof(ExaXorgScreenPrivRec)); if (pScreenPriv == NULL) return; pScreenPriv->options = xnfalloc(sizeof(EXAOptions)); memcpy(pScreenPriv->options, EXAOptions, sizeof(EXAOptions)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pScreenPriv->options); if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && pExaScr->info->offScreenBase < pExaScr->info->memorySize) { const char *heuristicName; heuristicName = xf86GetOptValString(pScreenPriv->options, EXAOPT_MIGRATION_HEURISTIC); if (heuristicName != NULL) { if (strcmp(heuristicName, "greedy") == 0) pExaScr->migration = ExaMigrationGreedy; else if (strcmp(heuristicName, "always") == 0) pExaScr->migration = ExaMigrationAlways; else if (strcmp(heuristicName, "smart") == 0) pExaScr->migration = ExaMigrationSmart; else { xf86DrvMsg(pScreen->myNum, X_WARNING, "EXA: unknown migration heuristic %s\n", heuristicName); } } } pExaScr->optimize_migration = xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_OPTIMIZE_MIGRATION, TRUE); } if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_COMPOSITE, FALSE)) { xf86DrvMsg(pScreen->myNum, X_CONFIG, "EXA: Disabling Composite operation " "(RENDER acceleration)\n"); pExaScr->info->CheckComposite = NULL; pExaScr->info->PrepareComposite = NULL; } if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_UTS, FALSE)) { xf86DrvMsg(pScreen->myNum, X_CONFIG, "EXA: Disabling UploadToScreen\n"); pExaScr->info->UploadToScreen = NULL; } if (xf86ReturnOptValBool(pScreenPriv->options, EXAOPT_NO_DFS, FALSE)) { xf86DrvMsg(pScreen->myNum, X_CONFIG, "EXA: Disabling DownloadFromScreen\n"); pExaScr->info->DownloadFromScreen = NULL; } dixSetPrivate(&pScreen->devPrivates, exaXorgScreenPrivateKey, pScreenPriv); pScreenPriv->SavedEnableDisableFBAccess = pScrn->EnableDisableFBAccess; pScrn->EnableDisableFBAccess = exaXorgEnableDisableFBAccess; pScreenPriv->SavedCloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = exaXorgCloseScreen; } static XF86ModuleVersionInfo exaVersRec = { "exa", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, EXA_VERSION_MAJOR, EXA_VERSION_MINOR, EXA_VERSION_RELEASE, ABI_CLASS_VIDEODRV, /* requires the video driver ABI */ ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData exaModuleData = { &exaVersRec, NULL, NULL }; xorg-server-21.1.16/hw/xfree86/exa/man/0000755000175000017500000000000014757411135013153 5xorg-server-21.1.16/hw/xfree86/exa/man/Makefile.am0000644000175000017500000000007214757411105015123 include $(top_srcdir)/manpages.am driverman_PRE = exa.man xorg-server-21.1.16/hw/xfree86/exa/man/Makefile.in0000644000175000017500000006310714757411115015145 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/exa/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man driverman_PRE = exa.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/exa/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/exa/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/exa/man/exa.man0000644000175000017500000000337314757411105014350 .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH EXA @drivermansuffix@ @vendorversion@ .SH NAME exa \- new 2D acceleration architecture for X.Org .SH DESCRIPTION .B EXA provides a simple API for video drivers to implement for 2D acceleration. It is a module loaded by drivers, and is not intended to be loaded on its own. See your driver's manual page for how to enable .BR EXA . .PP The .B EXA architecture is designed to make accelerating the Render extension simple and efficient, and results in various performance tradeoffs compared to XAA. Some xorg.conf options are available for debugging performance issues or driver rendering problems. They are not intended for general use. .TP .BI "Option \*qEXANoComposite\*q \*q" boolean \*q Disables acceleration of the Composite operation, which is at the heart of the Render extension. Not related to the Composite extension. Default: No. .TP .BI "Option \*qEXANoUploadToScreen\*q \*q" boolean \*q Disables acceleration of uploading pixmap data to the framebuffer. Default: No. .TP .BI "Option \*qEXANoDownloadFromScreen\*q \*q" boolean \*q Disables acceleration of downloading of pixmap data from the framebuffer. .B NOTE: Not usable with drivers which rely on DownloadFromScreen succeeding. Default: No. .TP .BI "Option \*qMigrationHeuristic\*q \*q" anystr \*q Chooses an alternate pixmap migration heuristic, for debugging purposes. The default is intended to be the best performing one for general use, though others may help with specific use cases. Available options include \*qalways\*q, \*qgreedy\*q, and \*qsmart\*q. Default: always. .SH "SEE ALSO" .BR Xorg (@appmansuffix@), .BR xorg.conf(@filemansuffix@). .SH AUTHORS Authors include: Keith Packard, Eric Anholt, Zack Rusin, and Michel D\(:anzer xorg-server-21.1.16/hw/xfree86/fbdevhw/0000755000175000017500000000000014757411134013247 5xorg-server-21.1.16/hw/xfree86/fbdevhw/meson.build0000644000175000017500000000076214757411105015334 if host_machine.system() == 'linux' srcs_fbdevhw = 'fbdevhw.c' else srcs_fbdevhw = 'fbdevhwstub.c' endif shared_module('fbdevhw', srcs_fbdevhw, include_directories: [ inc, xorg_inc ], dependencies: common_dep, c_args: xorg_c_args, install: true, install_dir: module_dir, link_with: e, ) install_data('fbdevhw.h', install_dir: xorgsdkdir) install_man(configure_file( input: 'man/fbdevhw.man', output: 'fbdevhw.4', configuration: manpage_config, )) xorg-server-21.1.16/hw/xfree86/fbdevhw/Makefile.am0000644000175000017500000000064714757411105015230 SUBDIRS = man module_LTLIBRARIES = libfbdevhw.la libfbdevhw_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) if FBDEVHW libfbdevhw_la_SOURCES = fbdevhw.c else libfbdevhw_la_SOURCES = fbdevhwstub.c endif AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../i2c -I$(srcdir)/../modes -I$(srcdir)/../ddc -I$(srcdir)/../parser AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = fbdevhw.h EXTRA_DIST = fbpriv.h README xorg-server-21.1.16/hw/xfree86/fbdevhw/fbdevhw.h0000644000175000017500000000606614757411105014773 #ifndef _FBDEVHW_H_ #define _FBDEVHW_H_ #include "xf86str.h" #include "colormapst.h" #define FBDEVHW_PACKED_PIXELS 0 /* Packed Pixels */ #define FBDEVHW_PLANES 1 /* Non interleaved planes */ #define FBDEVHW_INTERLEAVED_PLANES 2 /* Interleaved planes */ #define FBDEVHW_TEXT 3 /* Text/attributes */ #define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */ extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn); extern _X_EXPORT int fbdevHWGetFD(ScrnInfoPtr pScrn); extern _X_EXPORT Bool fbdevHWProbe(struct pci_device *pPci, char *device, char **namep); extern _X_EXPORT Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device); extern _X_EXPORT char *fbdevHWGetName(ScrnInfoPtr pScrn); extern _X_EXPORT int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp); extern _X_EXPORT int fbdevHWGetLineLength(ScrnInfoPtr pScrn); extern _X_EXPORT int fbdevHWGetType(ScrnInfoPtr pScrn); extern _X_EXPORT int fbdevHWGetVidmem(ScrnInfoPtr pScrn); extern _X_EXPORT void *fbdevHWMapVidmem(ScrnInfoPtr pScrn); extern _X_EXPORT int fbdevHWLinearOffset(ScrnInfoPtr pScrn); extern _X_EXPORT Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn); extern _X_EXPORT void *fbdevHWMapMMIO(ScrnInfoPtr pScrn); extern _X_EXPORT Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWSetVideoModes(ScrnInfoPtr pScrn); extern _X_EXPORT DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn); extern _X_EXPORT Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual); extern _X_EXPORT ModeStatus fbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags); extern _X_EXPORT Bool fbdevHWSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode); extern _X_EXPORT void fbdevHWAdjustFrame(ScrnInfoPtr pScrn, int x, int y); extern _X_EXPORT Bool fbdevHWEnterVT(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWLeaveVT(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags); extern _X_EXPORT Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode); extern _X_EXPORT xf86SwitchModeProc *fbdevHWSwitchModeWeak(void); extern _X_EXPORT xf86AdjustFrameProc *fbdevHWAdjustFrameWeak(void); extern _X_EXPORT xf86EnterVTProc *fbdevHWEnterVTWeak(void); extern _X_EXPORT xf86LeaveVTProc *fbdevHWLeaveVTWeak(void); extern _X_EXPORT xf86ValidModeProc *fbdevHWValidModeWeak(void); extern _X_EXPORT xf86DPMSSetProc *fbdevHWDPMSSetWeak(void); extern _X_EXPORT xf86LoadPaletteProc *fbdevHWLoadPaletteWeak(void); extern _X_EXPORT SaveScreenProcPtr fbdevHWSaveScreenWeak(void); #endif xorg-server-21.1.16/hw/xfree86/fbdevhw/Makefile.in0000644000175000017500000010153614757411115015241 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/fbdevhw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(module_LTLIBRARIES) libfbdevhw_la_LIBADD = am__libfbdevhw_la_SOURCES_DIST = fbdevhwstub.c fbdevhw.c @FBDEVHW_FALSE@am_libfbdevhw_la_OBJECTS = fbdevhwstub.lo @FBDEVHW_TRUE@am_libfbdevhw_la_OBJECTS = fbdevhw.lo libfbdevhw_la_OBJECTS = $(am_libfbdevhw_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfbdevhw_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libfbdevhw_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/fbdevhw.Plo \ ./$(DEPDIR)/fbdevhwstub.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfbdevhw_la_SOURCES) DIST_SOURCES = $(am__libfbdevhw_la_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(sdk_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man module_LTLIBRARIES = libfbdevhw.la libfbdevhw_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) @FBDEVHW_FALSE@libfbdevhw_la_SOURCES = fbdevhwstub.c @FBDEVHW_TRUE@libfbdevhw_la_SOURCES = fbdevhw.c AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../i2c -I$(srcdir)/../modes -I$(srcdir)/../ddc -I$(srcdir)/../parser AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = fbdevhw.h EXTRA_DIST = fbpriv.h README all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/fbdevhw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/fbdevhw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libfbdevhw.la: $(libfbdevhw_la_OBJECTS) $(libfbdevhw_la_DEPENDENCIES) $(EXTRA_libfbdevhw_la_DEPENDENCIES) $(AM_V_CCLD)$(libfbdevhw_la_LINK) -rpath $(moduledir) $(libfbdevhw_la_OBJECTS) $(libfbdevhw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdevhw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbdevhwstub.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/fbdevhw.Plo -rm -f ./$(DEPDIR)/fbdevhwstub.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/fbdevhw.Plo -rm -f ./$(DEPDIR)/fbdevhwstub.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-moduleLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/fbdevhw/README0000644000175000017500000000100614757411105014042 This is a submodule to access linux framebuffer devices. It is supported to work as helper module (like vgahw) for the chipset drivers. There are functions for saving/restoring/setting video modes, set palette entries, and a few more helper functions. Some of them can be hooked directly into ScrnInfoRec. In ../drivers/fbdev is a "chipset" driver. It is a simple, non-accelerated and hardware-independent driver which works on top of this fbdevhw submodule. Gerd -- Gerd Knorr xorg-server-21.1.16/hw/xfree86/fbdevhw/fbdevhwstub.c0000644000175000017500000000551614757411105015663 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86cmap.h" #include "fbdevhw.h" /* Stubs for the static server on platforms that don't support fbdev */ Bool fbdevHWGetRec(ScrnInfoPtr pScrn) { return FALSE; } void fbdevHWFreeRec(ScrnInfoPtr pScrn) { } Bool fbdevHWProbe(struct pci_device *pPci, char *device, char **namep) { return FALSE; } Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device) { xf86Msg(X_ERROR, "fbdevhw is not available on this platform\n"); return FALSE; } char * fbdevHWGetName(ScrnInfoPtr pScrn) { return NULL; } int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp) { return -1; } int fbdevHWGetLineLength(ScrnInfoPtr pScrn) { return -1; /* Should cause something spectacular... */ } int fbdevHWGetType(ScrnInfoPtr pScrn) { return -1; } int fbdevHWGetVidmem(ScrnInfoPtr pScrn) { return -1; } void fbdevHWSetVideoModes(ScrnInfoPtr pScrn) { } DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn) { return NULL; } void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn) { } void * fbdevHWMapVidmem(ScrnInfoPtr pScrn) { return NULL; } int fbdevHWLinearOffset(ScrnInfoPtr pScrn) { return 0; } Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn) { return FALSE; } void * fbdevHWMapMMIO(ScrnInfoPtr pScrn) { return NULL; } Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn) { return FALSE; } Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { return FALSE; } void fbdevHWSave(ScrnInfoPtr pScrn) { } void fbdevHWRestore(ScrnInfoPtr pScrn) { } void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { } ModeStatus fbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags) { return MODE_ERROR; } Bool fbdevHWSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { return FALSE; } void fbdevHWAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { } Bool fbdevHWEnterVT(ScrnInfoPtr pScrn) { return FALSE; } void fbdevHWLeaveVT(ScrnInfoPtr pScrn) { } void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags) { } Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode) { return FALSE; } xf86SwitchModeProc * fbdevHWSwitchModeWeak(void) { return fbdevHWSwitchMode; } xf86AdjustFrameProc * fbdevHWAdjustFrameWeak(void) { return fbdevHWAdjustFrame; } xf86EnterVTProc * fbdevHWEnterVTWeak(void) { return fbdevHWEnterVT; } xf86LeaveVTProc * fbdevHWLeaveVTWeak(void) { return fbdevHWLeaveVT; } xf86ValidModeProc * fbdevHWValidModeWeak(void) { return fbdevHWValidMode; } xf86DPMSSetProc * fbdevHWDPMSSetWeak(void) { return fbdevHWDPMSSet; } xf86LoadPaletteProc * fbdevHWLoadPaletteWeak(void) { return fbdevHWLoadPalette; } SaveScreenProcPtr fbdevHWSaveScreenWeak(void) { return fbdevHWSaveScreen; } xorg-server-21.1.16/hw/xfree86/fbdevhw/fbdevhw.c0000644000175000017500000006501714757411105014767 /* all drivers need this */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Modes.h" #include "xf86_OSproc.h" /* pci stuff */ #include "xf86Pci.h" #include "xf86cmap.h" #include "fbdevhw.h" #include "fbpriv.h" #include "globals.h" #include #define PAGE_MASK (~(getpagesize() - 1)) static XF86ModuleVersionInfo fbdevHWVersRec = { "fbdevhw", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 0, 0, 2, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData fbdevhwModuleData = { &fbdevHWVersRec, NULL, NULL }; #include #include #include #include #include #include #include /* -------------------------------------------------------------------- */ /* our private data, and two functions to allocate/free this */ #define FBDEVHWPTRLVAL(p) (p)->privates[fbdevHWPrivateIndex].ptr #define FBDEVHWPTR(p) ((fbdevHWPtr)(FBDEVHWPTRLVAL(p))) static int fbdevHWPrivateIndex = -1; typedef struct { /* framebuffer device: filename (/dev/fb*), handle, more */ char *device; int fd; void *fbmem; unsigned int fbmem_len; unsigned int fboff; char *mmio; unsigned int mmio_len; /* current hardware state */ struct fb_fix_screeninfo fix; struct fb_var_screeninfo var; /* saved video mode */ struct fb_var_screeninfo saved_var; /* buildin video mode */ DisplayModeRec buildin; /* disable non-fatal unsupported ioctls */ CARD32 unsupported_ioctls; } fbdevHWRec, *fbdevHWPtr; enum { FBIOBLANK_UNSUPPORTED = 0, }; Bool fbdevHWGetRec(ScrnInfoPtr pScrn) { if (fbdevHWPrivateIndex < 0) fbdevHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); if (FBDEVHWPTR(pScrn) != NULL) return TRUE; FBDEVHWPTRLVAL(pScrn) = xnfcalloc(sizeof(fbdevHWRec), 1); return TRUE; } void fbdevHWFreeRec(ScrnInfoPtr pScrn) { if (fbdevHWPrivateIndex < 0) return; free(FBDEVHWPTR(pScrn)); FBDEVHWPTRLVAL(pScrn) = NULL; } int fbdevHWGetFD(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr; fbdevHWGetRec(pScrn); fPtr = FBDEVHWPTR(pScrn); return fPtr->fd; } /* -------------------------------------------------------------------- */ /* some helpers for printing debug information */ #ifdef DEBUG static void print_fbdev_mode(const char *txt, struct fb_var_screeninfo *var) { ErrorF("fbdev %s mode:\t%d %d %d %d %d %d %d %d %d %d %d:%d:%d\n", txt, var->pixclock, var->xres, var->right_margin, var->hsync_len, var->left_margin, var->yres, var->lower_margin, var->vsync_len, var->upper_margin, var->bits_per_pixel, var->red.length, var->green.length, var->blue.length); } static void print_xfree_mode(const char *txt, DisplayModePtr mode) { ErrorF("xfree %s mode:\t%d %d %d %d %d %d %d %d %d\n", txt, mode->Clock, mode->HDisplay, mode->HSyncStart, mode->HSyncEnd, mode->HTotal, mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, mode->VTotal); } #endif /* -------------------------------------------------------------------- */ /* Convert timings between the XFree and the Frame Buffer Device */ static void xfree2fbdev_fblayout(ScrnInfoPtr pScrn, struct fb_var_screeninfo *var) { var->xres_virtual = pScrn->displayWidth ? pScrn->displayWidth : pScrn->virtualX; var->yres_virtual = pScrn->virtualY; var->bits_per_pixel = pScrn->bitsPerPixel; if (pScrn->defaultVisual == TrueColor || pScrn->defaultVisual == DirectColor) { var->red.length = pScrn->weight.red; var->green.length = pScrn->weight.green; var->blue.length = pScrn->weight.blue; } else { var->red.length = 8; var->green.length = 8; var->blue.length = 8; } } static void xfree2fbdev_timing(DisplayModePtr mode, struct fb_var_screeninfo *var) { var->xres = mode->HDisplay; var->yres = mode->VDisplay; if (var->xres_virtual < var->xres) var->xres_virtual = var->xres; if (var->yres_virtual < var->yres) var->yres_virtual = var->yres; var->xoffset = var->yoffset = 0; var->pixclock = mode->Clock ? 1000000000 / mode->Clock : 0; var->right_margin = mode->HSyncStart - mode->HDisplay; var->hsync_len = mode->HSyncEnd - mode->HSyncStart; var->left_margin = mode->HTotal - mode->HSyncEnd; var->lower_margin = mode->VSyncStart - mode->VDisplay; var->vsync_len = mode->VSyncEnd - mode->VSyncStart; var->upper_margin = mode->VTotal - mode->VSyncEnd; var->sync = 0; if (mode->Flags & V_PHSYNC) var->sync |= FB_SYNC_HOR_HIGH_ACT; if (mode->Flags & V_PVSYNC) var->sync |= FB_SYNC_VERT_HIGH_ACT; if (mode->Flags & V_PCSYNC) var->sync |= FB_SYNC_COMP_HIGH_ACT; if (mode->Flags & V_BCAST) var->sync |= FB_SYNC_BROADCAST; if (mode->Flags & V_INTERLACE) var->vmode = FB_VMODE_INTERLACED; else if (mode->Flags & V_DBLSCAN) var->vmode = FB_VMODE_DOUBLE; else var->vmode = FB_VMODE_NONINTERLACED; } static Bool fbdev_modes_equal(struct fb_var_screeninfo *set, struct fb_var_screeninfo *req) { return (set->xres_virtual >= req->xres_virtual && set->yres_virtual >= req->yres_virtual && set->bits_per_pixel == req->bits_per_pixel && set->red.length == req->red.length && set->green.length == req->green.length && set->blue.length == req->blue.length && set->xres == req->xres && set->yres == req->yres && set->right_margin == req->right_margin && set->hsync_len == req->hsync_len && set->left_margin == req->left_margin && set->lower_margin == req->lower_margin && set->vsync_len == req->vsync_len && set->upper_margin == req->upper_margin && set->sync == req->sync && set->vmode == req->vmode); } static void fbdev2xfree_timing(struct fb_var_screeninfo *var, DisplayModePtr mode) { mode->Clock = var->pixclock ? 1000000000 / var->pixclock : 0; mode->HDisplay = var->xres; mode->HSyncStart = mode->HDisplay + var->right_margin; mode->HSyncEnd = mode->HSyncStart + var->hsync_len; mode->HTotal = mode->HSyncEnd + var->left_margin; mode->VDisplay = var->yres; mode->VSyncStart = mode->VDisplay + var->lower_margin; mode->VSyncEnd = mode->VSyncStart + var->vsync_len; mode->VTotal = mode->VSyncEnd + var->upper_margin; mode->Flags = 0; mode->Flags |= var->sync & FB_SYNC_HOR_HIGH_ACT ? V_PHSYNC : V_NHSYNC; mode->Flags |= var->sync & FB_SYNC_VERT_HIGH_ACT ? V_PVSYNC : V_NVSYNC; mode->Flags |= var->sync & FB_SYNC_COMP_HIGH_ACT ? V_PCSYNC : V_NCSYNC; if (var->sync & FB_SYNC_BROADCAST) mode->Flags |= V_BCAST; if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_INTERLACED) mode->Flags |= V_INTERLACE; else if ((var->vmode & FB_VMODE_MASK) == FB_VMODE_DOUBLE) mode->Flags |= V_DBLSCAN; mode->SynthClock = mode->Clock; mode->CrtcHDisplay = mode->HDisplay; mode->CrtcHSyncStart = mode->HSyncStart; mode->CrtcHSyncEnd = mode->HSyncEnd; mode->CrtcHTotal = mode->HTotal; mode->CrtcVDisplay = mode->VDisplay; mode->CrtcVSyncStart = mode->VSyncStart; mode->CrtcVSyncEnd = mode->VSyncEnd; mode->CrtcVTotal = mode->VTotal; mode->CrtcHAdjusted = FALSE; mode->CrtcVAdjusted = FALSE; } /* -------------------------------------------------------------------- */ /* open correct framebuffer device */ /** * Try to find the framebuffer device for a given PCI device */ static int fbdev_open_pci(struct pci_device *pPci, char **namep) { struct fb_fix_screeninfo fix; char filename[256]; int fd, i; for (i = 0; i < 8; i++) { snprintf(filename, sizeof(filename), "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics/fb%d", pPci->domain, pPci->bus, pPci->dev, pPci->func, i); fd = open(filename, O_RDONLY, 0); if (fd < 0) { snprintf(filename, sizeof(filename), "/sys/bus/pci/devices/%04x:%02x:%02x.%d/graphics:fb%d", pPci->domain, pPci->bus, pPci->dev, pPci->func, i); fd = open(filename, O_RDONLY, 0); } if (fd >= 0) { close(fd); snprintf(filename, sizeof(filename), "/dev/fb%d", i); fd = open(filename, O_RDWR, 0); if (fd != -1) { if (ioctl(fd, FBIOGET_FSCREENINFO, (void *) &fix) != -1) { if (namep) { *namep = xnfalloc(16); strncpy(*namep, fix.id, 16); } return fd; } close(fd); } } } if (namep) *namep = NULL; xf86DrvMsg(-1, X_ERROR, "Unable to find a valid framebuffer device\n"); return -1; } static int fbdev_open(int scrnIndex, const char *dev, char **namep) { struct fb_fix_screeninfo fix; int fd; /* try argument (from XF86Config) first */ if (dev) { fd = open(dev, O_RDWR, 0); } else { /* second: environment variable */ dev = getenv("FRAMEBUFFER"); if ((NULL == dev) || ((fd = open(dev, O_RDWR, 0)) == -1)) { /* last try: default device */ dev = "/dev/fb0"; fd = open(dev, O_RDWR, 0); } } if (fd == -1) { xf86DrvMsg(scrnIndex, X_ERROR, "open %s: %s\n", dev, strerror(errno)); return -1; } /* only touch non-PCI devices on this path */ { char buf[PATH_MAX] = {0}; char *sysfs_path = NULL; char *node = strrchr(dev, '/') + 1; if (asprintf(&sysfs_path, "/sys/class/graphics/%s/device/subsystem", node) < 0 || readlink(sysfs_path, buf, sizeof(buf) - 1) < 0 || strstr(buf, "bus/pci")) { free(sysfs_path); close(fd); return -1; } free(sysfs_path); } if (namep) { if (-1 == ioctl(fd, FBIOGET_FSCREENINFO, (void *) (&fix))) { *namep = NULL; xf86DrvMsg(scrnIndex, X_ERROR, "FBIOGET_FSCREENINFO: %s\n", strerror(errno)); return -1; } else { *namep = xnfalloc(16); strncpy(*namep, fix.id, 16); } } return fd; } /* -------------------------------------------------------------------- */ Bool fbdevHWProbe(struct pci_device *pPci, char *device, char **namep) { int fd; if (pPci) fd = fbdev_open_pci(pPci, namep); else fd = fbdev_open(-1, device, namep); if (-1 == fd) return FALSE; close(fd); return TRUE; } Bool fbdevHWInit(ScrnInfoPtr pScrn, struct pci_device *pPci, char *device) { fbdevHWPtr fPtr; fbdevHWGetRec(pScrn); fPtr = FBDEVHWPTR(pScrn); /* open device */ if (pPci) fPtr->fd = fbdev_open_pci(pPci, NULL); else fPtr->fd = fbdev_open(pScrn->scrnIndex, device, NULL); if (-1 == fPtr->fd) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to open framebuffer device, consult warnings" " and/or errors above for possible reasons\n" "\t(you may have to look at the server log to see" " warnings)\n"); return FALSE; } /* get current fb device settings */ if (-1 == ioctl(fPtr->fd, FBIOGET_FSCREENINFO, (void *) (&fPtr->fix))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ioctl FBIOGET_FSCREENINFO: %s\n", strerror(errno)); return FALSE; } if (-1 == ioctl(fPtr->fd, FBIOGET_VSCREENINFO, (void *) (&fPtr->var))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ioctl FBIOGET_VSCREENINFO: %s\n", strerror(errno)); return FALSE; } /* we can use the current settings as "buildin mode" */ fbdev2xfree_timing(&fPtr->var, &fPtr->buildin); fPtr->buildin.name = "current"; fPtr->buildin.next = &fPtr->buildin; fPtr->buildin.prev = &fPtr->buildin; fPtr->buildin.type |= M_T_BUILTIN; return TRUE; } char * fbdevHWGetName(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); return fPtr->fix.id; } int fbdevHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (fbbpp) *fbbpp = fPtr->var.bits_per_pixel; if (fPtr->fix.visual == FB_VISUAL_TRUECOLOR || fPtr->fix.visual == FB_VISUAL_DIRECTCOLOR) return fPtr->var.red.length + fPtr->var.green.length + fPtr->var.blue.length; else return fPtr->var.bits_per_pixel; } int fbdevHWGetLineLength(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (fPtr->fix.line_length) return fPtr->fix.line_length; else return fPtr->var.xres_virtual * fPtr->var.bits_per_pixel / 8; } int fbdevHWGetType(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); return fPtr->fix.type; } int fbdevHWGetVidmem(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); return fPtr->fix.smem_len; } static Bool fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); struct fb_var_screeninfo req_var = fPtr->var, set_var; xfree2fbdev_fblayout(pScrn, &req_var); xfree2fbdev_timing(mode, &req_var); #ifdef DEBUG print_xfree_mode("init", mode); print_fbdev_mode("init", &req_var); #endif set_var = req_var; if (check) set_var.activate = FB_ACTIVATE_TEST; if (0 != ioctl(fPtr->fd, FBIOPUT_VSCREENINFO, (void *) (&set_var))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOPUT_VSCREENINFO: %s\n", strerror(errno)); return FALSE; } if (!fbdev_modes_equal(&set_var, &req_var)) { if (!check) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOPUT_VSCREENINFO succeeded but modified " "mode\n"); #ifdef DEBUG print_fbdev_mode("returned", &set_var); #endif return FALSE; } if (!check) fPtr->var = set_var; return TRUE; } void fbdevHWSetVideoModes(ScrnInfoPtr pScrn) { const char **modename; DisplayModePtr mode, this, last = pScrn->modes; if (NULL == pScrn->display->modes) return; pScrn->virtualX = pScrn->display->virtualX; pScrn->virtualY = pScrn->display->virtualY; for (modename = pScrn->display->modes; *modename != NULL; modename++) { for (mode = pScrn->monitor->Modes; mode != NULL; mode = mode->next) { if (0 == strcmp(mode->name, *modename)) { if (fbdevHWSetMode(pScrn, mode, TRUE)) break; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "\tmode \"%s\" test failed\n", *modename); } } if (NULL == mode) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "\tmode \"%s\" not found\n", *modename); continue; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "\tmode \"%s\" ok\n", *modename); if (pScrn->virtualX < mode->HDisplay) pScrn->virtualX = mode->HDisplay; if (pScrn->virtualY < mode->VDisplay) pScrn->virtualY = mode->VDisplay; if (NULL == pScrn->modes) { this = pScrn->modes = xf86DuplicateMode(mode); this->next = this; this->prev = this; } else { this = xf86DuplicateMode(mode); this->next = pScrn->modes; this->prev = last; last->next = this; pScrn->modes->prev = this; } last = this; } } DisplayModePtr fbdevHWGetBuildinMode(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); return &fPtr->buildin; } void fbdevHWUseBuildinMode(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); pScrn->modes = &fPtr->buildin; pScrn->virtualX = pScrn->display->virtualX; pScrn->virtualY = pScrn->display->virtualY; if (pScrn->virtualX < fPtr->buildin.HDisplay) pScrn->virtualX = fPtr->buildin.HDisplay; if (pScrn->virtualY < fPtr->buildin.VDisplay) pScrn->virtualY = fPtr->buildin.VDisplay; } /* -------------------------------------------------------------------- */ static void calculateFbmem_len(fbdevHWPtr fPtr) { fPtr->fboff = (unsigned long) fPtr->fix.smem_start & ~PAGE_MASK; fPtr->fbmem_len = (fPtr->fboff + fPtr->fix.smem_len + ~PAGE_MASK) & PAGE_MASK; } void * fbdevHWMapVidmem(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (NULL == fPtr->fbmem) { calculateFbmem_len(fPtr); fPtr->fbmem = mmap(NULL, fPtr->fbmem_len, PROT_READ | PROT_WRITE, MAP_SHARED, fPtr->fd, 0); if (-1 == (long) fPtr->fbmem) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mmap fbmem: %s\n", strerror(errno)); fPtr->fbmem = NULL; } else { /* Perhaps we'd better add fboff to fbmem and return 0 in fbdevHWLinearOffset()? Of course we then need to mask fPtr->fbmem with PAGE_MASK in fbdevHWUnmapVidmem() as well. [geert] */ } } pScrn->memPhysBase = (unsigned long) fPtr->fix.smem_start & (unsigned long) (PAGE_MASK); pScrn->fbOffset = (unsigned long) fPtr->fix.smem_start & (unsigned long) (~PAGE_MASK); return fPtr->fbmem; } int fbdevHWLinearOffset(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); return fPtr->fboff; } Bool fbdevHWUnmapVidmem(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (NULL != fPtr->fbmem) { if (-1 == munmap(fPtr->fbmem, fPtr->fbmem_len)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "munmap fbmem: %s\n", strerror(errno)); fPtr->fbmem = NULL; } return TRUE; } void * fbdevHWMapMMIO(ScrnInfoPtr pScrn) { unsigned int mmio_off; fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (NULL == fPtr->mmio) { /* tell the kernel not to use accels to speed up console scrolling */ fPtr->var.accel_flags = 0; if (0 != ioctl(fPtr->fd, FBIOPUT_VSCREENINFO, (void *) (&fPtr->var))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOPUT_VSCREENINFO: %s\n", strerror(errno)); return FALSE; } mmio_off = (unsigned long) fPtr->fix.mmio_start & ~PAGE_MASK; fPtr->mmio_len = (mmio_off + fPtr->fix.mmio_len + ~PAGE_MASK) & PAGE_MASK; if (NULL == fPtr->fbmem) calculateFbmem_len(fPtr); fPtr->mmio = mmap(NULL, fPtr->mmio_len, PROT_READ | PROT_WRITE, MAP_SHARED, fPtr->fd, fPtr->fbmem_len); if (-1 == (long) fPtr->mmio) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mmap mmio: %s\n", strerror(errno)); fPtr->mmio = NULL; } else fPtr->mmio += mmio_off; } return fPtr->mmio; } Bool fbdevHWUnmapMMIO(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (NULL != fPtr->mmio) { if (-1 == munmap((void *) ((unsigned long) fPtr->mmio & PAGE_MASK), fPtr->mmio_len)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "munmap mmio: %s\n", strerror(errno)); fPtr->mmio = NULL; /* FIXME: restore var.accel_flags [geert] */ } return TRUE; } /* -------------------------------------------------------------------- */ Bool fbdevHWModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); pScrn->vtSema = TRUE; /* set */ if (!fbdevHWSetMode(pScrn, mode, FALSE)) return FALSE; /* read back */ if (0 != ioctl(fPtr->fd, FBIOGET_FSCREENINFO, (void *) (&fPtr->fix))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOGET_FSCREENINFO: %s\n", strerror(errno)); return FALSE; } if (0 != ioctl(fPtr->fd, FBIOGET_VSCREENINFO, (void *) (&fPtr->var))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOGET_VSCREENINFO: %s\n", strerror(errno)); return FALSE; } if (pScrn->defaultVisual == TrueColor || pScrn->defaultVisual == DirectColor) { /* XXX: This is a hack, but it should be a NOP for all the setups that * worked before and actually seems to fix some others... */ pScrn->offset.red = fPtr->var.red.offset; pScrn->offset.green = fPtr->var.green.offset; pScrn->offset.blue = fPtr->var.blue.offset; pScrn->mask.red = ((1 << fPtr->var.red.length) - 1) << fPtr->var.red.offset; pScrn->mask.green = ((1 << fPtr->var.green.length) - 1) << fPtr->var.green.offset; pScrn->mask.blue = ((1 << fPtr->var.blue.length) - 1) << fPtr->var.blue.offset; } return TRUE; } /* -------------------------------------------------------------------- */ /* video mode save/restore */ void fbdevHWSave(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (0 != ioctl(fPtr->fd, FBIOGET_VSCREENINFO, (void *) (&fPtr->saved_var))) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOGET_VSCREENINFO: %s\n", strerror(errno)); } void fbdevHWRestore(ScrnInfoPtr pScrn) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (0 != ioctl(fPtr->fd, FBIOPUT_VSCREENINFO, (void *) (&fPtr->saved_var))) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOPUT_VSCREENINFO: %s\n", strerror(errno)); } /* -------------------------------------------------------------------- */ /* callback for xf86HandleColormaps */ void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); struct fb_cmap cmap; unsigned short red, green, blue; int i; cmap.len = 1; cmap.red = &red; cmap.green = &green; cmap.blue = &blue; cmap.transp = NULL; for (i = 0; i < numColors; i++) { cmap.start = indices[i]; red = (colors[indices[i]].red << 8) | colors[indices[i]].red; green = (colors[indices[i]].green << 8) | colors[indices[i]].green; blue = (colors[indices[i]].blue << 8) | colors[indices[i]].blue; if (-1 == ioctl(fPtr->fd, FBIOPUTCMAP, (void *) &cmap)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "FBIOPUTCMAP: %s\n", strerror(errno)); } } /* -------------------------------------------------------------------- */ /* these can be hooked directly into ScrnInfoRec */ ModeStatus fbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags) { if (!fbdevHWSetMode(pScrn, mode, TRUE)) return MODE_BAD; return MODE_OK; } Bool fbdevHWSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { if (!fbdevHWSetMode(pScrn, mode, FALSE)) return FALSE; return TRUE; } void fbdevHWAdjustFrame(ScrnInfoPtr pScrn, int x, int y) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); if (x < 0 || x + fPtr->var.xres > fPtr->var.xres_virtual || y < 0 || y + fPtr->var.yres > fPtr->var.yres_virtual) return; fPtr->var.xoffset = x; fPtr->var.yoffset = y; if (-1 == ioctl(fPtr->fd, FBIOPAN_DISPLAY, (void *) &fPtr->var)) xf86DrvMsgVerb(pScrn->scrnIndex, X_WARNING, 5, "FBIOPAN_DISPLAY: %s\n", strerror(errno)); } Bool fbdevHWEnterVT(ScrnInfoPtr pScrn) { if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) return FALSE; fbdevHWAdjustFrame(pScrn, pScrn->frameX0, pScrn->frameY0); return TRUE; } void fbdevHWLeaveVT(ScrnInfoPtr pScrn) { fbdevHWRestore(pScrn); } void fbdevHWDPMSSet(ScrnInfoPtr pScrn, int mode, int flags) { fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); unsigned long fbmode; if (!pScrn->vtSema) return; if (fPtr->unsupported_ioctls & (1 << FBIOBLANK_UNSUPPORTED)) return; switch (mode) { case DPMSModeOn: fbmode = 0; break; case DPMSModeStandby: fbmode = 2; break; case DPMSModeSuspend: fbmode = 3; break; case DPMSModeOff: fbmode = 4; break; default: return; } RETRY: if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) fbmode)) { switch (errno) { case EAGAIN: xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBIOBLANK: %s\n", strerror(errno)); break; case EINTR: case ERESTART: goto RETRY; default: fPtr->unsupported_ioctls |= (1 << FBIOBLANK_UNSUPPORTED); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBIOBLANK: %s (Screen blanking not supported " "by kernel - disabling)\n", strerror(errno)); } } } Bool fbdevHWSaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); fbdevHWPtr fPtr = FBDEVHWPTR(pScrn); unsigned long unblank; if (!pScrn->vtSema) return TRUE; if (fPtr->unsupported_ioctls & (1 << FBIOBLANK_UNSUPPORTED)) return FALSE; unblank = xf86IsUnblank(mode); RETRY: if (-1 == ioctl(fPtr->fd, FBIOBLANK, (void *) (1 - unblank))) { switch (errno) { case EAGAIN: xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBIOBLANK: %s\n", strerror(errno)); break; case EINTR: case ERESTART: goto RETRY; default: fPtr->unsupported_ioctls |= (1 << FBIOBLANK_UNSUPPORTED); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "FBIOBLANK: %s (Screen blanking not supported " "by kernel - disabling)\n", strerror(errno)); } return FALSE; } return TRUE; } xf86SwitchModeProc * fbdevHWSwitchModeWeak(void) { return fbdevHWSwitchMode; } xf86AdjustFrameProc * fbdevHWAdjustFrameWeak(void) { return fbdevHWAdjustFrame; } xf86EnterVTProc * fbdevHWEnterVTWeak(void) { return fbdevHWEnterVT; } xf86LeaveVTProc * fbdevHWLeaveVTWeak(void) { return fbdevHWLeaveVT; } xf86ValidModeProc * fbdevHWValidModeWeak(void) { return fbdevHWValidMode; } xf86DPMSSetProc * fbdevHWDPMSSetWeak(void) { return fbdevHWDPMSSet; } xf86LoadPaletteProc * fbdevHWLoadPaletteWeak(void) { return fbdevHWLoadPalette; } SaveScreenProcPtr fbdevHWSaveScreenWeak(void) { return fbdevHWSaveScreen; } xorg-server-21.1.16/hw/xfree86/fbdevhw/fbpriv.h0000644000175000017500000002610214757411105014627 /* * copied from from linux kernel 2.2.4 * removed internal stuff (#ifdef __KERNEL__) */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _LINUX_FB_H #define _LINUX_FB_H #include /* Definitions of frame buffers */ #define FB_MAJOR 29 #define FB_MODES_SHIFT 5 /* 32 modes per framebuffer */ #define FB_NUM_MINORS 256 /* 256 Minors */ #define FB_MAX (FB_NUM_MINORS / (1 << FB_MODES_SHIFT)) #define GET_FB_IDX(node) (MINOR(node) >> FB_MODES_SHIFT) /* ioctls 0x46 is 'F' */ #define FBIOGET_VSCREENINFO 0x4600 #define FBIOPUT_VSCREENINFO 0x4601 #define FBIOGET_FSCREENINFO 0x4602 #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 #define FBIOPAN_DISPLAY 0x4606 /* 0x4607-0x460B are defined below */ /* #define FBIOGET_MONITORSPEC 0x460C */ /* #define FBIOPUT_MONITORSPEC 0x460D */ /* #define FBIOSWITCH_MONIBIT 0x460E */ #define FBIOGET_CON2FBMAP 0x460F #define FBIOPUT_CON2FBMAP 0x4610 #define FBIOBLANK 0x4611 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ #define FB_TYPE_TEXT 3 /* Text/attributes */ #define FB_AUX_TEXT_MDA 0 /* Monochrome text */ #define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ #define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ #define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ #define FB_VISUAL_TRUECOLOR 2 /* True color */ #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ #define FB_ACCEL_NONE 0 /* no hardware accelerator */ #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ #define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ #define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ #define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ #define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ #define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ #define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ #define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ #define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ #define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ #define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ #define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ #define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ #define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ #define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ #define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ #define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ #define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ #define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ #define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ #define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ #define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ #define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ #define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ #define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ #define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ #define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ #define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ #define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ #define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */ char *smem_start; /* Start of frame buffer mem */ /* (physical address) */ __u32 smem_len; /* Length of frame buffer mem */ __u32 type; /* see FB_TYPE_* */ __u32 type_aux; /* Interleave for interleaved Planes */ __u32 visual; /* see FB_VISUAL_* */ __u16 xpanstep; /* zero if no hardware panning */ __u16 ypanstep; /* zero if no hardware panning */ __u16 ywrapstep; /* zero if no hardware ywrap */ __u32 line_length; /* length of a line in bytes */ char *mmio_start; /* Start of Memory Mapped I/O */ /* (physical address) */ __u32 mmio_len; /* Length of Memory Mapped I/O */ __u32 accel; /* Type of acceleration available */ __u16 reserved[3]; /* Reserved for future compatibility */ }; /* Interpretation of offset for color fields: All offsets are from the right, * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you * can use the offset as right argument to <<). A pixel afterwards is a bit * stream and is written to video memory as that unmodified. This implies * big-endian byte order if bits_per_pixel is greater than 8. */ struct fb_bitfield { __u32 offset; /* beginning of bitfield */ __u32 length; /* length of bitfield */ __u32 msb_right; /* != 0 : Most significant bit is */ /* right */ }; #define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ #define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl) */ #define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ #define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ #define FB_ACTIVATE_MASK 15 /* values */ #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ #define FB_ACCELF_TEXT 1 /* text mode acceleration */ #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ #define FB_SYNC_EXT 4 /* external sync */ #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ #define FB_SYNC_BROADCAST 16 /* broadcast video timings */ /* vtotal = 144d/288n/576i => PAL */ /* vtotal = 121d/242n/484i => NTSC */ #define FB_SYNC_ON_GREEN 32 /* sync on green */ #define FB_VMODE_NONINTERLACED 0 /* non interlaced */ #define FB_VMODE_INTERLACED 1 /* interlaced */ #define FB_VMODE_DOUBLE 2 /* double scan */ #define FB_VMODE_MASK 255 #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ struct fb_var_screeninfo { __u32 xres; /* visible resolution */ __u32 yres; __u32 xres_virtual; /* virtual resolution */ __u32 yres_virtual; __u32 xoffset; /* offset from virtual to visible */ __u32 yoffset; /* resolution */ __u32 bits_per_pixel; /* guess what */ __u32 grayscale; /* != 0 Graylevels instead of colors */ struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; struct fb_bitfield transp; /* transparency */ __u32 nonstd; /* != 0 Non standard pixel format */ __u32 activate; /* see FB_ACTIVATE_* */ __u32 height; /* height of picture in mm */ __u32 width; /* width of picture in mm */ __u32 accel_flags; /* acceleration flags (hints) */ /* Timing: All values in pixclocks, except pixclock (of course) */ __u32 pixclock; /* pixel clock in ps (pico seconds) */ __u32 left_margin; /* time from sync to picture */ __u32 right_margin; /* time from picture to sync */ __u32 upper_margin; /* time from sync to picture */ __u32 lower_margin; __u32 hsync_len; /* length of horizontal sync */ __u32 vsync_len; /* length of vertical sync */ __u32 sync; /* see FB_SYNC_* */ __u32 vmode; /* see FB_VMODE_* */ __u32 reserved[6]; /* Reserved for future compatibility */ }; struct fb_cmap { __u32 start; /* First entry */ __u32 len; /* Number of entries */ __u16 *red; /* Red values */ __u16 *green; __u16 *blue; __u16 *transp; /* transparency, can be NULL */ }; struct fb_con2fbmap { __u32 console; __u32 framebuffer; }; struct fb_monspecs { __u32 hfmin; /* hfreq lower limit (Hz) */ __u32 hfmax; /* hfreq upper limit (Hz) */ __u16 vfmin; /* vfreq lower limit (Hz) */ __u16 vfmax; /* vfreq upper limit (Hz) */ unsigned dpms:1; /* supports DPMS */ }; #if 1 #define FBCMD_GET_CURRENTPAR 0xDEAD0005 #define FBCMD_SET_CURRENTPAR 0xDEAD8005 #endif #if 1 /* Preliminary */ /* * Hardware Cursor */ #define FBIOGET_FCURSORINFO 0x4607 #define FBIOGET_VCURSORINFO 0x4608 #define FBIOPUT_VCURSORINFO 0x4609 #define FBIOGET_CURSORSTATE 0x460A #define FBIOPUT_CURSORSTATE 0x460B struct fb_fix_cursorinfo { __u16 crsr_width; /* width and height of the cursor in */ __u16 crsr_height; /* pixels (zero if no cursor) */ __u16 crsr_xsize; /* cursor size in display pixels */ __u16 crsr_ysize; __u16 crsr_color1; /* colormap entry for cursor color1 */ __u16 crsr_color2; /* colormap entry for cursor color2 */ }; struct fb_var_cursorinfo { __u16 width; __u16 height; __u16 xspot; __u16 yspot; __u8 data[1]; /* field with [height][width] */ }; struct fb_cursorstate { __s16 xoffset; __s16 yoffset; __u16 mode; }; #define FB_CURSOR_OFF 0 #define FB_CURSOR_ON 1 #define FB_CURSOR_FLASH 2 #endif /* Preliminary */ #endif /* _LINUX_FB_H */ xorg-server-21.1.16/hw/xfree86/fbdevhw/man/0000755000175000017500000000000014757411134014022 5xorg-server-21.1.16/hw/xfree86/fbdevhw/man/Makefile.am0000644000175000017500000000007614757411105015777 include $(top_srcdir)/manpages.am driverman_PRE = fbdevhw.man xorg-server-21.1.16/hw/xfree86/fbdevhw/man/Makefile.in0000644000175000017500000006312714757411115016017 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/fbdevhw/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man driverman_PRE = fbdevhw.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/fbdevhw/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/fbdevhw/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/fbdevhw/man/fbdevhw.man0000644000175000017500000000165414757411105016070 .\" $XFree86: xc/programs/Xserver/hw/xfree86/fbdevhw/fbdevhw.man,v 1.1 2001/01/24 00:06:34 dawes Exp $ .TH FBDEVHW @drivermansuffix@ @vendorversion@ .SH NAME fbdevhw \- os-specific submodule for framebuffer device access .SH DESCRIPTION .B fbdevhw provides functions for talking to a framebuffer device. It is os-specific. It is a submodule used by other video drivers. A .B fbdevhw module is currently available for linux framebuffer devices. .PP fbdev(@drivermansuffix@) is a non-accelerated driver which runs on top of the fbdevhw module. fbdevhw can be used by other drivers too, this is usually activated with `Option "UseFBDev"' in the device section. .SH "SEE ALSO" Xorg(@appmansuffix@), xorg.conf(@filemansuffix@), xorgconfig(@appmansuffix@), Xserver(@appmansuffix@), X(@miscmansuffix@), fbdev(@drivermansuffix@) .SH AUTHORS Authors include: Gerd Knorr, based on the XF68_FBDev Server code (Martin Schaller, Geert Uytterhoeven). xorg-server-21.1.16/hw/xfree86/glamor_egl/0000755000175000017500000000000014757411135013733 5xorg-server-21.1.16/hw/xfree86/glamor_egl/meson.build0000644000175000017500000000066014757411105016014 glamoregl_src = [ '../../../glamor/glamor_egl.c', '../../../glamor/glamor_eglmodule.c', 'glamor_xf86_xv.c', ] shared_module( 'glamoregl', glamoregl_src, include_directories: [inc, xorg_inc], c_args: xorg_c_args, dependencies: [ common_dep, dependency('libdrm', version: '>= 2.4.46'), gbm_dep, ], link_with: glamor, install: true, install_dir: module_dir, ) xorg-server-21.1.16/hw/xfree86/glamor_egl/Makefile.am0000644000175000017500000000307614757411105015712 # Copyright © 2013 Intel Corporation # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. module_LTLIBRARIES = libglamoregl.la libglamoregl_la_SOURCES = \ $(top_srcdir)/glamor/glamor_egl.c \ $(top_srcdir)/glamor/glamor_eglmodule.c \ glamor_xf86_xv.c \ $() libglamoregl_la_LDFLAGS = \ -avoid-version \ $(GBM_LIBS) \ $() libglamoregl_la_LIBADD = \ $(top_builddir)/glamor/libglamor.la \ $() AM_CPPFLAGS = $(XORG_INCS) \ -I$(top_srcdir)/dri3 \ -I$(top_srcdir)/glamor \ $() AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(GLAMOR_CFLAGS) $(GBM_CFLAGS) xorg-server-21.1.16/hw/xfree86/glamor_egl/Makefile.in0000644000175000017500000007643714757411115015737 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright © 2013 Intel Corporation # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/glamor_egl ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" LTLIBRARIES = $(module_LTLIBRARIES) libglamoregl_la_DEPENDENCIES = $(top_builddir)/glamor/libglamor.la am_libglamoregl_la_OBJECTS = glamor_egl.lo glamor_eglmodule.lo \ glamor_xf86_xv.lo libglamoregl_la_OBJECTS = $(am_libglamoregl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libglamoregl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libglamoregl_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/glamor_egl.Plo \ ./$(DEPDIR)/glamor_eglmodule.Plo \ ./$(DEPDIR)/glamor_xf86_xv.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libglamoregl_la_SOURCES) DIST_SOURCES = $(libglamoregl_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ module_LTLIBRARIES = libglamoregl.la libglamoregl_la_SOURCES = \ $(top_srcdir)/glamor/glamor_egl.c \ $(top_srcdir)/glamor/glamor_eglmodule.c \ glamor_xf86_xv.c \ $() libglamoregl_la_LDFLAGS = \ -avoid-version \ $(GBM_LIBS) \ $() libglamoregl_la_LIBADD = \ $(top_builddir)/glamor/libglamor.la \ $() AM_CPPFLAGS = $(XORG_INCS) \ -I$(top_srcdir)/dri3 \ -I$(top_srcdir)/glamor \ $() AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(GLAMOR_CFLAGS) $(GBM_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/glamor_egl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/glamor_egl/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libglamoregl.la: $(libglamoregl_la_OBJECTS) $(libglamoregl_la_DEPENDENCIES) $(EXTRA_libglamoregl_la_DEPENDENCIES) $(AM_V_CCLD)$(libglamoregl_la_LINK) -rpath $(moduledir) $(libglamoregl_la_OBJECTS) $(libglamoregl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_egl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_eglmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_xf86_xv.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< glamor_egl.lo: $(top_srcdir)/glamor/glamor_egl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT glamor_egl.lo -MD -MP -MF $(DEPDIR)/glamor_egl.Tpo -c -o glamor_egl.lo `test -f '$(top_srcdir)/glamor/glamor_egl.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_egl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/glamor_egl.Tpo $(DEPDIR)/glamor_egl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/glamor/glamor_egl.c' object='glamor_egl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o glamor_egl.lo `test -f '$(top_srcdir)/glamor/glamor_egl.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_egl.c glamor_eglmodule.lo: $(top_srcdir)/glamor/glamor_eglmodule.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT glamor_eglmodule.lo -MD -MP -MF $(DEPDIR)/glamor_eglmodule.Tpo -c -o glamor_eglmodule.lo `test -f '$(top_srcdir)/glamor/glamor_eglmodule.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_eglmodule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/glamor_eglmodule.Tpo $(DEPDIR)/glamor_eglmodule.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/glamor/glamor_eglmodule.c' object='glamor_eglmodule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o glamor_eglmodule.lo `test -f '$(top_srcdir)/glamor/glamor_eglmodule.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_eglmodule.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(moduledir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/glamor_egl.Plo -rm -f ./$(DEPDIR)/glamor_eglmodule.Plo -rm -f ./$(DEPDIR)/glamor_xf86_xv.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-moduleLTLIBRARIES install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/glamor_egl.Plo -rm -f ./$(DEPDIR)/glamor_eglmodule.Plo -rm -f ./$(DEPDIR)/glamor_xf86_xv.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moduleLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-moduleLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/glamor_egl/glamor_xf86_xv.c0000644000175000017500000001340014757411105016663 /* * Copyright © 2013 Red Hat * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Dave Airlie * * some code is derived from the xf86-video-ati radeon driver, mainly * the calculations. */ /** @file glamor_xf86_xv.c * * This implements the XF86 XV interface, and calls into glamor core * for its support of the suspiciously similar XF86 and Kdrive * device-dependent XV interfaces. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #define GLAMOR_FOR_XORG #include "glamor_priv.h" #include #include "fourcc.h" #define NUM_FORMATS 4 static XF86VideoFormatRec Formats[NUM_FORMATS] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor}, {30, TrueColor} }; static void glamor_xf86_xv_stop_video(ScrnInfoPtr pScrn, void *data, Bool cleanup) { if (!cleanup) return; glamor_xv_stop_video(data); } static int glamor_xf86_xv_set_port_attribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, void *data) { return glamor_xv_set_port_attribute(data, attribute, value); } static int glamor_xf86_xv_get_port_attribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, void *data) { return glamor_xv_get_port_attribute(data, attribute, value); } static void glamor_xf86_xv_query_best_size(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h, short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h, void *data) { *p_w = drw_w; *p_h = drw_h; } static int glamor_xf86_xv_query_image_attributes(ScrnInfoPtr pScrn, int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets) { return glamor_xv_query_image_attributes(id, w, h, pitches, offsets); } static int glamor_xf86_xv_put_image(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, int id, unsigned char *buf, short width, short height, Bool sync, RegionPtr clipBoxes, void *data, DrawablePtr pDrawable) { return glamor_xv_put_image(data, pDrawable, src_x, src_y, drw_x, drw_y, src_w, src_h, drw_w, drw_h, id, buf, width, height, sync, clipBoxes); } static XF86VideoEncodingRec DummyEncodingGLAMOR[1] = { { 0, "XV_IMAGE", 8192, 8192, {1, 1} } }; XF86VideoAdaptorPtr glamor_xv_init(ScreenPtr screen, int num_texture_ports) { glamor_port_private *port_priv; XF86VideoAdaptorPtr adapt; int i; glamor_xv_core_init(screen); adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + num_texture_ports * (sizeof(glamor_port_private) + sizeof(DevUnion))); if (adapt == NULL) return NULL; adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; adapt->name = "GLAMOR Textured Video"; adapt->nEncodings = 1; adapt->pEncodings = DummyEncodingGLAMOR; adapt->nFormats = NUM_FORMATS; adapt->pFormats = Formats; adapt->nPorts = num_texture_ports; adapt->pPortPrivates = (DevUnion *) (&adapt[1]); adapt->pAttributes = glamor_xv_attributes; adapt->nAttributes = glamor_xv_num_attributes; port_priv = (glamor_port_private *) (&adapt->pPortPrivates[num_texture_ports]); adapt->pImages = glamor_xv_images; adapt->nImages = glamor_xv_num_images; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = glamor_xf86_xv_stop_video; adapt->SetPortAttribute = glamor_xf86_xv_set_port_attribute; adapt->GetPortAttribute = glamor_xf86_xv_get_port_attribute; adapt->QueryBestSize = glamor_xf86_xv_query_best_size; adapt->PutImage = glamor_xf86_xv_put_image; adapt->ReputImage = NULL; adapt->QueryImageAttributes = glamor_xf86_xv_query_image_attributes; for (i = 0; i < num_texture_ports; i++) { glamor_port_private *pPriv = &port_priv[i]; pPriv->brightness = 0; pPriv->contrast = 0; pPriv->saturation = 0; pPriv->hue = 0; pPriv->gamma = 1000; pPriv->transform_index = 0; REGION_NULL(pScreen, &pPriv->clip); adapt->pPortPrivates[i].ptr = (void *) (pPriv); } return adapt; } xorg-server-21.1.16/hw/xfree86/i2c/0000755000175000017500000000000014757411134012277 5xorg-server-21.1.16/hw/xfree86/i2c/meson.build0000644000175000017500000000040414757411105014355 srcs_xorg_i2c = [ 'xf86i2c.c' ] xorg_i2c = static_library('xorg_i2c', srcs_xorg_i2c, include_directories: [inc, xorg_inc], dependencies: common_dep, c_args: xorg_c_args, ) install_data(['xf86i2c.h', 'i2c_def.h'], install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/i2c/Makefile.am0000644000175000017500000000024714757411105014254 noinst_LTLIBRARIES = libi2c.la libi2c_la_SOURCES = xf86i2c.c AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = xf86i2c.h i2c_def.h xorg-server-21.1.16/hw/xfree86/i2c/xf86i2c.h0000644000175000017500000001020614757411105013556 /* * Copyright (C) 1998 Itai Nahshon, Michael Schimek */ #ifndef _XF86I2C_H #define _XF86I2C_H #include "regionstr.h" #include "xf86.h" typedef unsigned char I2CByte; typedef unsigned short I2CSlaveAddr; typedef struct _I2CBusRec *I2CBusPtr; typedef struct _I2CDevRec *I2CDevPtr; /* I2C masters have to register themselves */ typedef struct _I2CBusRec { char *BusName; int scrnIndex; ScrnInfoPtr pScrn; void (*I2CUDelay) (I2CBusPtr b, int usec); void (*I2CPutBits) (I2CBusPtr b, int scl, int sda); void (*I2CGetBits) (I2CBusPtr b, int *scl, int *sda); /* Look at the generic routines to see how these functions should behave. */ Bool (*I2CStart) (I2CBusPtr b, int timeout); Bool (*I2CAddress) (I2CDevPtr d, I2CSlaveAddr); void (*I2CStop) (I2CDevPtr d); Bool (*I2CPutByte) (I2CDevPtr d, I2CByte data); Bool (*I2CGetByte) (I2CDevPtr d, I2CByte * data, Bool); DevUnion DriverPrivate; int HoldTime; /* 1 / bus clock frequency, 5 or 2 usec */ int BitTimeout; /* usec */ int ByteTimeout; /* usec */ int AcknTimeout; /* usec */ int StartTimeout; /* usec */ int RiseFallTime; /* usec */ I2CDevPtr FirstDev; I2CBusPtr NextBus; Bool (*I2CWriteRead) (I2CDevPtr d, I2CByte * WriteBuffer, int nWrite, I2CByte * ReadBuffer, int nRead); } I2CBusRec; #define CreateI2CBusRec xf86CreateI2CBusRec extern _X_EXPORT I2CBusPtr xf86CreateI2CBusRec(void); #define DestroyI2CBusRec xf86DestroyI2CBusRec extern _X_EXPORT void xf86DestroyI2CBusRec(I2CBusPtr pI2CBus, Bool unalloc, Bool devs_too); #define I2CBusInit xf86I2CBusInit extern _X_EXPORT Bool xf86I2CBusInit(I2CBusPtr pI2CBus); extern _X_EXPORT I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name); extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr ** pppI2CBus); /* I2C slave devices */ typedef struct _I2CDevRec { const char *DevName; int BitTimeout; /* usec */ int ByteTimeout; /* usec */ int AcknTimeout; /* usec */ int StartTimeout; /* usec */ I2CSlaveAddr SlaveAddr; I2CBusPtr pI2CBus; I2CDevPtr NextDev; DevUnion DriverPrivate; } I2CDevRec; #define CreateI2CDevRec xf86CreateI2CDevRec extern _X_EXPORT I2CDevPtr xf86CreateI2CDevRec(void); extern _X_EXPORT void xf86DestroyI2CDevRec(I2CDevPtr pI2CDev, Bool unalloc); #define I2CDevInit xf86I2CDevInit extern _X_EXPORT Bool xf86I2CDevInit(I2CDevPtr pI2CDev); extern _X_EXPORT I2CDevPtr xf86I2CFindDev(I2CBusPtr, I2CSlaveAddr); /* See descriptions of these functions in xf86i2c.c */ #define I2CProbeAddress xf86I2CProbeAddress extern _X_EXPORT Bool xf86I2CProbeAddress(I2CBusPtr pI2CBus, I2CSlaveAddr); #define I2C_WriteRead xf86I2CWriteRead extern _X_EXPORT Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte * WriteBuffer, int nWrite, I2CByte * ReadBuffer, int nRead); #define xf86I2CRead(d, rb, nr) xf86I2CWriteRead(d, NULL, 0, rb, nr) extern _X_EXPORT Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte * pbyte); extern _X_EXPORT Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte); extern _X_EXPORT Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte, int n); extern _X_EXPORT Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword); #define xf86I2CWrite(d, wb, nw) xf86I2CWriteRead(d, wb, nw, NULL, 0) extern _X_EXPORT Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte); extern _X_EXPORT Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * WriteBuffer, int nWrite); extern _X_EXPORT Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word); extern _X_EXPORT Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte * vec, int nValues); #endif /*_XF86I2C_H */ xorg-server-21.1.16/hw/xfree86/i2c/i2c_def.h0000644000175000017500000000011214757411105013653 #ifndef __I2C_DEF_H__ #define __I2C_DEF_H__ #include "xf86i2c.h" #endif xorg-server-21.1.16/hw/xfree86/i2c/Makefile.in0000644000175000017500000006512014757411115014267 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/i2c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libi2c_la_LIBADD = am_libi2c_la_OBJECTS = xf86i2c.lo libi2c_la_OBJECTS = $(am_libi2c_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xf86i2c.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libi2c_la_SOURCES) DIST_SOURCES = $(libi2c_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libi2c.la libi2c_la_SOURCES = xf86i2c.c AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = xf86i2c.h i2c_def.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/i2c/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/i2c/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libi2c.la: $(libi2c_la_OBJECTS) $(libi2c_la_DEPENDENCIES) $(EXTRA_libi2c_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libi2c_la_OBJECTS) $(libi2c_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86i2c.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xf86i2c.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xf86i2c.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/i2c/xf86i2c.c0000644000175000017500000005470714757411105013567 /* * Copyright (C) 1998 Itai Nahshon, Michael Schimek * * The original code was derived from and inspired by * the I2C driver from the Linux kernel. * (c) 1998 Gerd Knorr */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include #include #include #include "scrnintstr.h" #include "regionstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "validate.h" #include "resource.h" #include "gcstruct.h" #include "dixstruct.h" #include "xf86i2c.h" #define I2C_TIMEOUT(x) /*(x)*/ /* Report timeouts */ #define I2C_TRACE(x) /*(x)*/ /* Report progress */ /* This is the default I2CUDelay function if not supplied by the driver. * High level I2C interfaces implementing the bus protocol in hardware * should supply this function too. * * Delay execution at least usec microseconds. * All values 0 to 1e6 inclusive must be expected. */ static void I2CUDelay(I2CBusPtr b, int usec) { struct timeval begin, cur; long d_secs, d_usecs; long diff; if (usec > 0) { X_GETTIMEOFDAY(&begin); do { /* It would be nice to use {xf86}usleep, * but usleep (1) takes >10000 usec ! */ X_GETTIMEOFDAY(&cur); d_secs = (cur.tv_sec - begin.tv_sec); d_usecs = (cur.tv_usec - begin.tv_usec); diff = d_secs * 1000000 + d_usecs; } while (diff >= 0 && diff < (usec + 1)); } } /* Most drivers will register just with GetBits/PutBits functions. * The following functions implement a software I2C protocol * by using the promitive functions given by the driver. * ================================================================ * * It is assumed that there is just one master on the I2C bus, therefore * there is no explicit test for conflits. */ #define RISEFALLTIME 2 /* usec, actually 300 to 1000 ns according to the i2c specs */ /* Some devices will hold SCL low to slow down the bus or until * ready for transmission. * * This condition will be noticed when the master tries to raise * the SCL line. You can set the timeout to zero if the slave device * does not support this clock synchronization. */ static Bool I2CRaiseSCL(I2CBusPtr b, int sda, int timeout) { int i, scl; b->I2CPutBits(b, 1, sda); b->I2CUDelay(b, b->RiseFallTime); for (i = timeout; i > 0; i -= b->RiseFallTime) { b->I2CGetBits(b, &scl, &sda); if (scl) break; b->I2CUDelay(b, b->RiseFallTime); } if (i <= 0) { I2C_TIMEOUT(ErrorF ("[I2CRaiseSCL(<%s>, %d, %d) timeout]", b->BusName, sda, timeout)); return FALSE; } return TRUE; } /* Send a start signal on the I2C bus. The start signal notifies * devices that a new transaction is initiated by the bus master. * * The start signal is always followed by a slave address. * Slave addresses are 8+ bits. The first 7 bits identify the * device and the last bit signals if this is a read (1) or * write (0) operation. * * There may be more than one start signal on one transaction. * This happens for example on some devices that allow reading * of registers. First send a start bit followed by the device * address (with the last bit 0) and the register number. Then send * a new start bit with the device address (with the last bit 1) * and then read the value from the device. * * Note this is function does not implement a multiple master * arbitration procedure. */ static Bool I2CStart(I2CBusPtr b, int timeout) { if (!I2CRaiseSCL(b, 1, timeout)) return FALSE; b->I2CPutBits(b, 1, 0); b->I2CUDelay(b, b->HoldTime); b->I2CPutBits(b, 0, 0); b->I2CUDelay(b, b->HoldTime); I2C_TRACE(ErrorF("\ni2c: <")); return TRUE; } /* This is the default I2CStop function if not supplied by the driver. * * Signal devices on the I2C bus that a transaction on the * bus has finished. There may be more than one start signal * on a transaction but only one stop signal. */ static void I2CStop(I2CDevPtr d) { I2CBusPtr b = d->pI2CBus; b->I2CPutBits(b, 0, 0); b->I2CUDelay(b, b->RiseFallTime); b->I2CPutBits(b, 1, 0); b->I2CUDelay(b, b->HoldTime); b->I2CPutBits(b, 1, 1); b->I2CUDelay(b, b->HoldTime); I2C_TRACE(ErrorF(">\n")); } /* Write/Read a single bit to/from a device. * Return FALSE if a timeout occurs. */ static Bool I2CWriteBit(I2CBusPtr b, int sda, int timeout) { Bool r; b->I2CPutBits(b, 0, sda); b->I2CUDelay(b, b->RiseFallTime); r = I2CRaiseSCL(b, sda, timeout); b->I2CUDelay(b, b->HoldTime); b->I2CPutBits(b, 0, sda); b->I2CUDelay(b, b->HoldTime); return r; } static Bool I2CReadBit(I2CBusPtr b, int *psda, int timeout) { Bool r; int scl; r = I2CRaiseSCL(b, 1, timeout); b->I2CUDelay(b, b->HoldTime); b->I2CGetBits(b, &scl, psda); b->I2CPutBits(b, 0, 1); b->I2CUDelay(b, b->HoldTime); return r; } /* This is the default I2CPutByte function if not supplied by the driver. * * A single byte is sent to the device. * The function returns FALSE if a timeout occurs, you should send * a stop condition afterwards to reset the bus. * * A timeout occurs, * if the slave pulls SCL to slow down the bus more than ByteTimeout usecs, * or slows down the bus for more than BitTimeout usecs for each bit, * or does not send an ACK bit (0) to acknowledge the transmission within * AcknTimeout usecs, but a NACK (1) bit. * * AcknTimeout must be at least b->HoldTime, the other timeouts can be * zero according to the comment on I2CRaiseSCL. */ static Bool I2CPutByte(I2CDevPtr d, I2CByte data) { Bool r; int i, scl, sda; I2CBusPtr b = d->pI2CBus; if (!I2CWriteBit(b, (data >> 7) & 1, d->ByteTimeout)) return FALSE; for (i = 6; i >= 0; i--) if (!I2CWriteBit(b, (data >> i) & 1, d->BitTimeout)) return FALSE; b->I2CPutBits(b, 0, 1); b->I2CUDelay(b, b->RiseFallTime); r = I2CRaiseSCL(b, 1, b->HoldTime); if (r) { for (i = d->AcknTimeout; i > 0; i -= b->HoldTime) { b->I2CUDelay(b, b->HoldTime); b->I2CGetBits(b, &scl, &sda); if (sda == 0) break; } if (i <= 0) { I2C_TIMEOUT(ErrorF("[I2CPutByte(<%s>, 0x%02x, %d, %d, %d) timeout]", b->BusName, data, d->BitTimeout, d->ByteTimeout, d->AcknTimeout)); r = FALSE; } I2C_TRACE(ErrorF("W%02x%c ", (int) data, sda ? '-' : '+')); } b->I2CPutBits(b, 0, 1); b->I2CUDelay(b, b->HoldTime); return r; } /* This is the default I2CGetByte function if not supplied by the driver. * * A single byte is read from the device. * The function returns FALSE if a timeout occurs, you should send * a stop condition afterwards to reset the bus. * * A timeout occurs, * if the slave pulls SCL to slow down the bus more than ByteTimeout usecs, * or slows down the bus for more than b->BitTimeout usecs for each bit. * * ByteTimeout must be at least b->HoldTime, the other timeouts can be * zero according to the comment on I2CRaiseSCL. * * For the byte in a sequence the acknowledge bit NACK (1), * otherwise ACK (0) will be sent. */ static Bool I2CGetByte(I2CDevPtr d, I2CByte * data, Bool last) { int i, sda; I2CBusPtr b = d->pI2CBus; b->I2CPutBits(b, 0, 1); b->I2CUDelay(b, b->RiseFallTime); if (!I2CReadBit(b, &sda, d->ByteTimeout)) return FALSE; *data = (sda > 0) << 7; for (i = 6; i >= 0; i--) if (!I2CReadBit(b, &sda, d->BitTimeout)) return FALSE; else *data |= (sda > 0) << i; if (!I2CWriteBit(b, last ? 1 : 0, d->BitTimeout)) return FALSE; I2C_TRACE(ErrorF("R%02x%c ", (int) *data, last ? '+' : '-')); return TRUE; } /* This is the default I2CAddress function if not supplied by the driver. * * It creates the start condition, followed by the d->SlaveAddr. * Higher level functions must call this routine rather than * I2CStart/PutByte because a hardware I2C master may not be able * to send a slave address without a start condition. * * The same timeouts apply as with I2CPutByte and additional a * StartTimeout, similar to the ByteTimeout but for the start * condition. * * In case of a timeout, the bus is left in a clean idle condition. * I. e. you *must not* send a Stop. If this function succeeds, you *must*. * * The slave address format is 16 bit, with the legacy _8_bit_ slave address * in the least significant byte. This is, the slave address must include the * R/_W flag as least significant bit. * * The most significant byte of the address will be sent _after_ the LSB, * but only if the LSB indicates: * a) an 11 bit address, this is LSB = 1111 0xxx. * b) a 'general call address', this is LSB = 0000 000x - see the I2C specs * for more. */ static Bool I2CAddress(I2CDevPtr d, I2CSlaveAddr addr) { if (I2CStart(d->pI2CBus, d->StartTimeout)) { if (I2CPutByte(d, addr & 0xFF)) { if ((addr & 0xF8) != 0xF0 && (addr & 0xFE) != 0x00) return TRUE; if (I2CPutByte(d, (addr >> 8) & 0xFF)) return TRUE; } I2CStop(d); } return FALSE; } /* These are the hardware independent I2C helper functions. * ======================================================== */ /* Function for probing. Just send the slave address * and return true if the device responds. The slave address * must have the lsb set to reflect a read (1) or write (0) access. * Don't expect a read- or write-only device will respond otherwise. */ Bool xf86I2CProbeAddress(I2CBusPtr b, I2CSlaveAddr addr) { int r; I2CDevRec d; d.DevName = "Probing"; d.BitTimeout = b->BitTimeout; d.ByteTimeout = b->ByteTimeout; d.AcknTimeout = b->AcknTimeout; d.StartTimeout = b->StartTimeout; d.SlaveAddr = addr; d.pI2CBus = b; d.NextDev = NULL; r = b->I2CAddress(&d, addr); if (r) b->I2CStop(&d); return r; } /* All functions below are related to devices and take the * slave address and timeout values from an I2CDevRec. They * return FALSE in case of an error (presumably a timeout). */ /* General purpose read and write function. * * 1st, if nWrite > 0 * Send a start condition * Send the slave address (1 or 2 bytes) with write flag * Write n bytes from WriteBuffer * 2nd, if nRead > 0 * Send a start condition [again] * Send the slave address (1 or 2 bytes) with read flag * Read n bytes to ReadBuffer * 3rd, if a Start condition has been successfully sent, * Send a Stop condition. * * The function exits immediately when an error occurs, * not processing any data left. However, step 3 will * be executed anyway to leave the bus in clean idle state. */ static Bool I2CWriteRead(I2CDevPtr d, I2CByte * WriteBuffer, int nWrite, I2CByte * ReadBuffer, int nRead) { Bool r = TRUE; I2CBusPtr b = d->pI2CBus; int s = 0; if (r && nWrite > 0) { r = b->I2CAddress(d, d->SlaveAddr & ~1); if (r) { for (; nWrite > 0; WriteBuffer++, nWrite--) if (!(r = b->I2CPutByte(d, *WriteBuffer))) break; s++; } } if (r && nRead > 0) { r = b->I2CAddress(d, d->SlaveAddr | 1); if (r) { for (; nRead > 0; ReadBuffer++, nRead--) if (!(r = b->I2CGetByte(d, ReadBuffer, nRead == 1))) break; s++; } } if (s) b->I2CStop(d); return r; } /* wrapper - for compatibility and convenience */ Bool xf86I2CWriteRead(I2CDevPtr d, I2CByte * WriteBuffer, int nWrite, I2CByte * ReadBuffer, int nRead) { I2CBusPtr b = d->pI2CBus; return b->I2CWriteRead(d, WriteBuffer, nWrite, ReadBuffer, nRead); } /* Read a byte, the only readable register of a device. */ Bool xf86I2CReadStatus(I2CDevPtr d, I2CByte * pbyte) { return xf86I2CWriteRead(d, NULL, 0, pbyte, 1); } /* Read a byte from one of the registers determined by its sub-address. */ Bool xf86I2CReadByte(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte) { return xf86I2CWriteRead(d, &subaddr, 1, pbyte, 1); } /* Read bytes from subsequent registers determined by the * sub-address of the first register. */ Bool xf86I2CReadBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * pbyte, int n) { return xf86I2CWriteRead(d, &subaddr, 1, pbyte, n); } /* Read a word (high byte, then low byte) from one of the registers * determined by its sub-address. */ Bool xf86I2CReadWord(I2CDevPtr d, I2CByte subaddr, unsigned short *pword) { I2CByte rb[2]; if (!xf86I2CWriteRead(d, &subaddr, 1, rb, 2)) return FALSE; *pword = (rb[0] << 8) | rb[1]; return TRUE; } /* Write a byte to one of the registers determined by its sub-address. */ Bool xf86I2CWriteByte(I2CDevPtr d, I2CByte subaddr, I2CByte byte) { I2CByte wb[2]; wb[0] = subaddr; wb[1] = byte; return xf86I2CWriteRead(d, wb, 2, NULL, 0); } /* Write bytes to subsequent registers determined by the * sub-address of the first register. */ Bool xf86I2CWriteBytes(I2CDevPtr d, I2CByte subaddr, I2CByte * WriteBuffer, int nWrite) { I2CBusPtr b = d->pI2CBus; Bool r = TRUE; if (nWrite > 0) { r = b->I2CAddress(d, d->SlaveAddr & ~1); if (r) { if ((r = b->I2CPutByte(d, subaddr))) for (; nWrite > 0; WriteBuffer++, nWrite--) if (!(r = b->I2CPutByte(d, *WriteBuffer))) break; b->I2CStop(d); } } return r; } /* Write a word (high byte, then low byte) to one of the registers * determined by its sub-address. */ Bool xf86I2CWriteWord(I2CDevPtr d, I2CByte subaddr, unsigned short word) { I2CByte wb[3]; wb[0] = subaddr; wb[1] = word >> 8; wb[2] = word & 0xFF; return xf86I2CWriteRead(d, wb, 3, NULL, 0); } /* Write a vector of bytes to not adjacent registers. This vector is, * 1st byte sub-address, 2nd byte value, 3rd byte sub-address asf. * This function is intended to initialize devices. Note this function * exits immediately when an error occurs, some registers may * remain uninitialized. */ Bool xf86I2CWriteVec(I2CDevPtr d, I2CByte * vec, int nValues) { I2CBusPtr b = d->pI2CBus; Bool r = TRUE; int s = 0; if (nValues > 0) { for (; nValues > 0; nValues--, vec += 2) { if (!(r = b->I2CAddress(d, d->SlaveAddr & ~1))) break; s++; if (!(r = b->I2CPutByte(d, vec[0]))) break; if (!(r = b->I2CPutByte(d, vec[1]))) break; } if (s > 0) b->I2CStop(d); } return r; } /* Administrative functions. * ========================= */ /* Allocates an I2CDevRec for you and initializes with proper defaults * you may modify before calling xf86I2CDevInit. Your I2CDevRec must * contain at least a SlaveAddr, and a pI2CBus pointer to the bus this * device shall be linked to. * * See function I2CAddress for the slave address format. Always set * the least significant bit, indicating a read or write access, to zero. */ I2CDevPtr xf86CreateI2CDevRec(void) { return calloc(1, sizeof(I2CDevRec)); } /* Unlink an I2C device. If you got the I2CDevRec from xf86CreateI2CDevRec * you should set to free it. */ void xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc) { if (d && d->pI2CBus) { I2CDevPtr *p; /* Remove this from the list of active I2C devices. */ for (p = &d->pI2CBus->FirstDev; *p != NULL; p = &(*p)->NextDev) if (*p == d) { *p = (*p)->NextDev; break; } xf86DrvMsg(d->pI2CBus->scrnIndex, X_INFO, "I2C device \"%s:%s\" removed.\n", d->pI2CBus->BusName, d->DevName); } if (unalloc) free(d); } /* I2C transmissions are related to an I2CDevRec you must link to a * previously registered bus (see xf86I2CBusInit) before attempting * to read and write data. You may call xf86I2CProbeAddress first to * see if the device in question is present on this bus. * * xf86I2CDevInit will not allocate an I2CBusRec for you, instead you * may enter a pointer to a statically allocated I2CDevRec or the (modified) * result of xf86CreateI2CDevRec. * * If you don't specify timeouts for the device (n <= 0), it will inherit * the bus-wide defaults. The function returns TRUE on success. */ Bool xf86I2CDevInit(I2CDevPtr d) { I2CBusPtr b; if (d == NULL || (b = d->pI2CBus) == NULL || (d->SlaveAddr & 1) || xf86I2CFindDev(b, d->SlaveAddr) != NULL) return FALSE; if (d->BitTimeout <= 0) d->BitTimeout = b->BitTimeout; if (d->ByteTimeout <= 0) d->ByteTimeout = b->ByteTimeout; if (d->AcknTimeout <= 0) d->AcknTimeout = b->AcknTimeout; if (d->StartTimeout <= 0) d->StartTimeout = b->StartTimeout; d->NextDev = b->FirstDev; b->FirstDev = d; xf86DrvMsg(b->scrnIndex, X_INFO, "I2C device \"%s:%s\" registered at address 0x%02X.\n", b->BusName, d->DevName, d->SlaveAddr); return TRUE; } I2CDevPtr xf86I2CFindDev(I2CBusPtr b, I2CSlaveAddr addr) { I2CDevPtr d; if (b) { for (d = b->FirstDev; d != NULL; d = d->NextDev) if (d->SlaveAddr == addr) return d; } return NULL; } static I2CBusPtr I2CBusList; /* Allocates an I2CBusRec for you and initializes with proper defaults * you may modify before calling xf86I2CBusInit. Your I2CBusRec must * contain at least a BusName, a scrnIndex (or -1), and a complete set * of either high or low level I2C function pointers. You may pass * bus-wide timeouts, otherwise inplausible values will be replaced * with safe defaults. */ I2CBusPtr xf86CreateI2CBusRec(void) { I2CBusPtr b; b = (I2CBusPtr) calloc(1, sizeof(I2CBusRec)); if (b != NULL) { b->scrnIndex = -1; b->pScrn = NULL; b->HoldTime = 5; /* 100 kHz bus */ b->BitTimeout = 5; b->ByteTimeout = 5; b->AcknTimeout = 5; b->StartTimeout = 5; b->RiseFallTime = RISEFALLTIME; } return b; } /* Unregister an I2C bus. If you got the I2CBusRec from xf86CreateI2CBusRec * you should set to free it. If you set , the function * xf86DestroyI2CDevRec will be called for all devices linked to the bus * first, passing down the option. */ void xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too) { if (b) { I2CBusPtr *p; /* Remove this from the list of active I2C buses */ for (p = &I2CBusList; *p != NULL; p = &(*p)->NextBus) if (*p == b) { *p = (*p)->NextBus; break; } if (b->FirstDev != NULL) { if (devs_too) { I2CDevPtr d; while ((d = b->FirstDev) != NULL) { b->FirstDev = d->NextDev; xf86DestroyI2CDevRec(d, unalloc); } } else { if (unalloc) { xf86Msg(X_ERROR, "i2c bug: Attempt to remove I2C bus \"%s\", " "but device list is not empty.\n", b->BusName); return; } } } xf86DrvMsg(b->scrnIndex, X_INFO, "I2C bus \"%s\" removed.\n", b->BusName); if (unalloc) free(b); } } /* I2C masters have to register themselves using this function. * It will not allocate an I2CBusRec for you, instead you may enter * a pointer to a statically allocated I2CBusRec or the (modified) * result of xf86CreateI2CBusRec. Returns TRUE on success. * * At this point there won't be any traffic on the I2C bus. */ Bool xf86I2CBusInit(I2CBusPtr b) { /* I2C buses must be identified by a unique scrnIndex * and name. If scrnIndex is unspecified (a negative value), * then the name must be unique throughout the server. */ if (b->BusName == NULL || xf86I2CFindBus(b->scrnIndex, b->BusName) != NULL) return FALSE; /* If the high level functions are not * supplied, use the generic functions. * In this case we need the low-level * function. */ if (b->I2CWriteRead == NULL) { b->I2CWriteRead = I2CWriteRead; if (b->I2CPutBits == NULL || b->I2CGetBits == NULL) { if (b->I2CPutByte == NULL || b->I2CGetByte == NULL || b->I2CAddress == NULL || b->I2CStart == NULL || b->I2CStop == NULL) return FALSE; } else { b->I2CPutByte = I2CPutByte; b->I2CGetByte = I2CGetByte; b->I2CAddress = I2CAddress; b->I2CStop = I2CStop; b->I2CStart = I2CStart; } } if (b->I2CUDelay == NULL) b->I2CUDelay = I2CUDelay; if (b->HoldTime < 2) b->HoldTime = 5; if (b->BitTimeout <= 0) b->BitTimeout = b->HoldTime; if (b->ByteTimeout <= 0) b->ByteTimeout = b->HoldTime; if (b->AcknTimeout <= 0) b->AcknTimeout = b->HoldTime; if (b->StartTimeout <= 0) b->StartTimeout = b->HoldTime; /* Put new bus on list. */ b->NextBus = I2CBusList; I2CBusList = b; xf86DrvMsg(b->scrnIndex, X_INFO, "I2C bus \"%s\" initialized.\n", b->BusName); return TRUE; } I2CBusPtr xf86I2CFindBus(int scrnIndex, char *name) { I2CBusPtr p; if (name != NULL) for (p = I2CBusList; p != NULL; p = p->NextBus) if (scrnIndex < 0 || p->scrnIndex == scrnIndex) if (!strcmp(p->BusName, name)) return p; return NULL; } /* * Return an array of I2CBusPtr's related to a screen. The caller is * responsible for freeing the array. */ int xf86I2CGetScreenBuses(int scrnIndex, I2CBusPtr ** pppI2CBus) { I2CBusPtr pI2CBus; int n = 0; if (pppI2CBus) *pppI2CBus = NULL; for (pI2CBus = I2CBusList; pI2CBus; pI2CBus = pI2CBus->NextBus) { if ((pI2CBus->scrnIndex >= 0) && (pI2CBus->scrnIndex != scrnIndex)) continue; n++; if (!pppI2CBus) continue; *pppI2CBus = xnfreallocarray(*pppI2CBus, n, sizeof(I2CBusPtr)); (*pppI2CBus)[n - 1] = pI2CBus; } return n; } xorg-server-21.1.16/hw/xfree86/int10/0000755000175000017500000000000014757411134012555 5xorg-server-21.1.16/hw/xfree86/int10/meson.build0000644000175000017500000000251214757411105014635 srcs_xorg_int10 = [ 'vbe.c', 'vbeModes.c', 'helper_exec.c', 'helper_mem.c', 'xf86int10.c', 'xf86int10module.c', ] int10_c_args = [xorg_c_args] int10_link = [] if host_machine.cpu() == 'i386' or host_machine.cpu() == 'x86_64' int10_c_args += '-D_PC' endif if int10 == 'stub' srcs_xorg_int10 += 'stub.c' int10_c_args += '-D_VM86_LINUX' endif if int10 == 'x86emu' srcs_xorg_int10 += [ 'generic.c', 'xf86x86emu.c', 'x86emu.c', ] int10_c_args += '-D_X86EMU' int10_c_args += '-DNO_SYS_HEADERS' # Silence some useless warnings from x86emu if cc.has_argument('-Wno-format-nonliteral') int10_c_args += '-Wno-format-nonliteral' endif int10_link += xorg_x86emu endif if int10 == 'vm86' srcs_xorg_int10 += [ 'vm86/linux_vm86.c', 'linux.c', ] int10_c_args += '-D_VM86_LINUX' endif xorg_int10 = shared_module('int10', srcs_xorg_int10, include_directories: [ inc, xorg_inc, include_directories('../x86emu') ], dependencies: common_dep, link_with: int10_link, c_args: int10_c_args, install: true, install_dir: module_dir, ) install_data('xf86int10.h', install_dir: xorgsdkdir) install_data('vbe.h', install_dir: xorgsdkdir) install_data('vbeModes.h', install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/int10/Makefile.am0000644000175000017500000000221614757411105014530 module_LTLIBRARIES = libint10.la sdk_HEADERS = xf86int10.h vbe.h vbeModes.h EXTRA_CFLAGS = libint10_la_LDFLAGS = -avoid-version libint10_la_LIBADD = $(PCIACCESS_LIBS) COMMON_SOURCES = \ vbe.c \ vbeModes.c \ helper_exec.c \ helper_mem.c \ xf86int10.c \ xf86int10module.c if I386_VIDEO I386_VIDEO_CFLAGS = -D_PC endif AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../modes -I$(srcdir)/../i2c \ -I$(srcdir)/../parser if INT10_VM86 AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS) libint10_la_SOURCES = \ $(COMMON_SOURCES) \ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \ $(srcdir)/../os-support/linux/int10/linux.c endif if INT10_X86EMU AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \ $(XORG_CFLAGS) $(EXTRA_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS += -I$(srcdir)/../x86emu libint10_la_SOURCES = \ $(COMMON_SOURCES) \ xf86x86emu.c \ generic.c \ x86emu.c endif if INT10_STUB AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS) libint10_la_SOURCES = stub.c xf86int10module.c endif EXTRA_DIST = xf86x86emu.h INT10.HOWTO xorg-server-21.1.16/hw/xfree86/int10/xf86int10.h0000644000175000017500000001477114757411105014325 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifndef _XF86INT10_H #define _XF86INT10_H #include #include #include "xf86Pci.h" #define SEG_ADDR(x) (((x) >> 4) & 0x00F000) #define SEG_OFF(x) ((x) & 0x0FFFF) #define SET_BIOS_SCRATCH 0x1 #define RESTORE_BIOS_SCRATCH 0x2 /* int10 info structure */ typedef struct { int entityIndex; uint16_t BIOSseg; uint16_t inb40time; ScrnInfoPtr pScrn; void *cpuRegs; char *BIOSScratch; int Flags; void *private; struct _int10Mem *mem; int num; int ax; int bx; int cx; int dx; int si; int di; int es; int bp; int flags; int stackseg; struct pci_device *dev; struct pci_io_handle *io; } xf86Int10InfoRec, *xf86Int10InfoPtr; typedef struct _int10Mem { uint8_t (*rb) (xf86Int10InfoPtr, int); uint16_t (*rw) (xf86Int10InfoPtr, int); uint32_t (*rl) (xf86Int10InfoPtr, int); void (*wb) (xf86Int10InfoPtr, int, uint8_t); void (*ww) (xf86Int10InfoPtr, int, uint16_t); void (*wl) (xf86Int10InfoPtr, int, uint32_t); } int10MemRec, *int10MemPtr; typedef struct { uint8_t save_msr; uint8_t save_pos102; uint8_t save_vse; uint8_t save_46e8; } legacyVGARec, *legacyVGAPtr; /* OS dependent functions */ extern _X_EXPORT xf86Int10InfoPtr xf86InitInt10(int entityIndex); extern _X_EXPORT xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags); extern _X_EXPORT void xf86FreeInt10(xf86Int10InfoPtr pInt); extern _X_EXPORT void *xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off); extern _X_EXPORT void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num); extern _X_EXPORT void *xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr); /* x86 executor related functions */ extern _X_EXPORT void xf86ExecX86int10(xf86Int10InfoPtr pInt); #ifdef _INT10_PRIVATE #define I_S_DEFAULT_INT_VECT 0xFF065 #define SYS_SIZE 0x100000 #define SYS_BIOS 0xF0000 #if 1 #define BIOS_SIZE 0x10000 #else /* a bug in DGUX requires this - let's try it */ #define BIOS_SIZE (0x10000 - 1) #endif #define LOW_PAGE_SIZE 0x600 #define V_RAM 0xA0000 #define VRAM_SIZE 0x20000 #define V_BIOS_SIZE 0x10000 #define V_BIOS 0xC0000 #define BIOS_SCRATCH_OFF 0x449 #define BIOS_SCRATCH_END 0x466 #define BIOS_SCRATCH_LEN (BIOS_SCRATCH_END - BIOS_SCRATCH_OFF + 1) #define HIGH_MEM V_BIOS #define HIGH_MEM_SIZE (SYS_BIOS - HIGH_MEM) #define SEG_ADR(type, seg, reg) type((seg << 4) + (X86_##reg)) #define SEG_EADR(type, seg, reg) type((seg << 4) + (X86_E##reg)) #define X86_TF_MASK 0x00000100 #define X86_IF_MASK 0x00000200 #define X86_IOPL_MASK 0x00003000 #define X86_NT_MASK 0x00004000 #define X86_VM_MASK 0x00020000 #define X86_AC_MASK 0x00040000 #define X86_VIF_MASK 0x00080000 /* virtual interrupt flag */ #define X86_VIP_MASK 0x00100000 /* virtual interrupt pending */ #define X86_ID_MASK 0x00200000 #define MEM_RB(name, addr) (*name->mem->rb)(name, addr) #define MEM_RW(name, addr) (*name->mem->rw)(name, addr) #define MEM_RL(name, addr) (*name->mem->rl)(name, addr) #define MEM_WB(name, addr, val) (*name->mem->wb)(name, addr, val) #define MEM_WW(name, addr, val) (*name->mem->ww)(name, addr, val) #define MEM_WL(name, addr, val) (*name->mem->wl)(name, addr, val) /* OS dependent functions */ extern _X_EXPORT Bool MapCurrentInt10(xf86Int10InfoPtr pInt); /* x86 executor related functions */ extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); /* int.c */ extern _X_EXPORT xf86Int10InfoPtr Int10Current; int int_handler(xf86Int10InfoPtr pInt); /* helper_exec.c */ int setup_int(xf86Int10InfoPtr pInt); void finish_int(xf86Int10InfoPtr, int sig); uint32_t getIntVect(xf86Int10InfoPtr pInt, int num); void pushw(xf86Int10InfoPtr pInt, uint16_t val); int run_bios_int(int num, xf86Int10InfoPtr pInt); void dump_code(xf86Int10InfoPtr pInt); void dump_registers(xf86Int10InfoPtr pInt); void stack_trace(xf86Int10InfoPtr pInt); uint8_t bios_checksum(const uint8_t *start, int size); void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); #if defined (_PC) extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); #endif int port_rep_inb(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_inw(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_inl(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outb(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outw(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outl(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count); uint8_t x_inb(uint16_t port); uint16_t x_inw(uint16_t port); void x_outb(uint16_t port, uint8_t val); void x_outw(uint16_t port, uint16_t val); uint32_t x_inl(uint16_t port); void x_outl(uint16_t port, uint32_t val); uint8_t Mem_rb(uint32_t addr); uint16_t Mem_rw(uint32_t addr); uint32_t Mem_rl(uint32_t addr); void Mem_wb(uint32_t addr, uint8_t val); void Mem_ww(uint32_t addr, uint16_t val); void Mem_wl(uint32_t addr, uint32_t val); /* helper_mem.c */ void setup_int_vect(xf86Int10InfoPtr pInt); int setup_system_bios(void *base_addr); void reset_int_vect(xf86Int10InfoPtr pInt); void set_return_trap(xf86Int10InfoPtr pInt); extern _X_EXPORT void *xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex); Bool int10skip(const void *options); Bool int10_check_bios(int scrnIndex, int codeSeg, const unsigned char *vbiosMem); Bool initPrimary(const void *options); extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt); extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base); #ifdef DEBUG void dprint(unsigned long start, unsigned long size); #endif #endif /* _INT10_PRIVATE */ #endif /* _XF86INT10_H */ xorg-server-21.1.16/hw/xfree86/int10/vbe.h0000644000175000017500000003001614757411105013420 /* * XFree86 vbe module * Copyright 2000 Egbert Eich * * The mode query/save/set/restore functions from the vesa driver * have been moved here. * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) * Authors: Paulo César Pereira de Andrade */ #ifndef _VBE_H #define _VBE_H #include "xf86int10.h" #include "xf86DDC.h" typedef enum { DDC_UNCHECKED, DDC_NONE, DDC_1, DDC_2, DDC_1_2 } ddc_lvl; typedef struct { xf86Int10InfoPtr pInt10; int version; void *memory; int real_mode_base; int num_pages; Bool init_int10; ddc_lvl ddc; Bool ddc_blank; } vbeInfoRec, *vbeInfoPtr; #define VBE_VERSION_MAJOR(x) *((CARD8*)(&x) + 1) #define VBE_VERSION_MINOR(x) (CARD8)(x) extern _X_EXPORT vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex); extern _X_EXPORT vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags); extern _X_EXPORT void vbeFree(vbeInfoPtr pVbe); extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, void *pDDCModule); #pragma pack(1) typedef struct vbeControllerInfoBlock { CARD8 VbeSignature[4]; CARD16 VbeVersion; CARD32 OemStringPtr; CARD8 Capabilities[4]; CARD32 VideoModePtr; CARD16 TotalMem; CARD16 OemSoftwareRev; CARD32 OemVendorNamePtr; CARD32 OemProductNamePtr; CARD32 OemProductRevPtr; CARD8 Scratch[222]; CARD8 OemData[256]; } vbeControllerInfoRec, *vbeControllerInfoPtr; #if defined(__GNUC__) || defined(__USLC__) || defined(__SUNPRO_C) #pragma pack() /* All GCC versions recognise this syntax */ #else #pragma pack(0) #endif #if !( defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) ) #define __attribute__(a) #endif typedef struct _VbeInfoBlock VbeInfoBlock; typedef struct _VbeModeInfoBlock VbeModeInfoBlock; typedef struct _VbeCRTCInfoBlock VbeCRTCInfoBlock; /* * INT 0 */ struct _VbeInfoBlock { /* VESA 1.2 fields */ CARD8 VESASignature[4]; /* VESA */ CARD16 VESAVersion; /* Higher byte major, lower byte minor */ /*CARD32 */ char *OEMStringPtr; /* Pointer to OEM string */ CARD8 Capabilities[4]; /* Capabilities of the video environment */ /*CARD32 */ CARD16 *VideoModePtr; /* pointer to supported Super VGA modes */ CARD16 TotalMemory; /* Number of 64kb memory blocks on board */ /* if not VESA 2, 236 scratch bytes follow (256 bytes total size) */ /* VESA 2 fields */ CARD16 OemSoftwareRev; /* VBE implementation Software revision */ /*CARD32 */ char *OemVendorNamePtr; /* Pointer to Vendor Name String */ /*CARD32 */ char *OemProductNamePtr; /* Pointer to Product Name String */ /*CARD32 */ char *OemProductRevPtr; /* Pointer to Product Revision String */ CARD8 Reserved[222]; /* Reserved for VBE implementation */ CARD8 OemData[256]; /* Data Area for OEM Strings */ } __attribute__ ((packed)); /* Return Super VGA Information */ extern _X_EXPORT VbeInfoBlock *VBEGetVBEInfo(vbeInfoPtr pVbe); extern _X_EXPORT void VBEFreeVBEInfo(VbeInfoBlock * block); /* * INT 1 */ struct _VbeModeInfoBlock { CARD16 ModeAttributes; /* mode attributes */ CARD8 WinAAttributes; /* window A attributes */ CARD8 WinBAttributes; /* window B attributes */ CARD16 WinGranularity; /* window granularity */ CARD16 WinSize; /* window size */ CARD16 WinASegment; /* window A start segment */ CARD16 WinBSegment; /* window B start segment */ CARD32 WinFuncPtr; /* real mode pointer to window function */ CARD16 BytesPerScanline; /* bytes per scanline */ /* Mandatory information for VBE 1.2 and above */ CARD16 XResolution; /* horizontal resolution in pixels or characters */ CARD16 YResolution; /* vertical resolution in pixels or characters */ CARD8 XCharSize; /* character cell width in pixels */ CARD8 YCharSize; /* character cell height in pixels */ CARD8 NumberOfPlanes; /* number of memory planes */ CARD8 BitsPerPixel; /* bits per pixel */ CARD8 NumberOfBanks; /* number of banks */ CARD8 MemoryModel; /* memory model type */ CARD8 BankSize; /* bank size in KB */ CARD8 NumberOfImages; /* number of images */ CARD8 Reserved; /* 1 *//* reserved for page function */ /* Direct color fields (required for direct/6 and YUV/7 memory models) */ CARD8 RedMaskSize; /* size of direct color red mask in bits */ CARD8 RedFieldPosition; /* bit position of lsb of red mask */ CARD8 GreenMaskSize; /* size of direct color green mask in bits */ CARD8 GreenFieldPosition; /* bit position of lsb of green mask */ CARD8 BlueMaskSize; /* size of direct color blue mask in bits */ CARD8 BlueFieldPosition; /* bit position of lsb of blue mask */ CARD8 RsvdMaskSize; /* size of direct color reserved mask in bits */ CARD8 RsvdFieldPosition; /* bit position of lsb of reserved mask */ CARD8 DirectColorModeInfo; /* direct color mode attributes */ /* Mandatory information for VBE 2.0 and above */ CARD32 PhysBasePtr; /* physical address for flat memory frame buffer */ CARD32 Reserved32; /* 0 *//* Reserved - always set to 0 */ CARD16 Reserved16; /* 0 *//* Reserved - always set to 0 */ /* Mandatory information for VBE 3.0 and above */ CARD16 LinBytesPerScanLine; /* bytes per scan line for linear modes */ CARD8 BnkNumberOfImagePages; /* number of images for banked modes */ CARD8 LinNumberOfImagePages; /* number of images for linear modes */ CARD8 LinRedMaskSize; /* size of direct color red mask (linear modes) */ CARD8 LinRedFieldPosition; /* bit position of lsb of red mask (linear modes) */ CARD8 LinGreenMaskSize; /* size of direct color green mask (linear modes) */ CARD8 LinGreenFieldPosition; /* bit position of lsb of green mask (linear modes) */ CARD8 LinBlueMaskSize; /* size of direct color blue mask (linear modes) */ CARD8 LinBlueFieldPosition; /* bit position of lsb of blue mask (linear modes) */ CARD8 LinRsvdMaskSize; /* size of direct color reserved mask (linear modes) */ CARD8 LinRsvdFieldPosition; /* bit position of lsb of reserved mask (linear modes) */ CARD32 MaxPixelClock; /* maximum pixel clock (in Hz) for graphics mode */ CARD8 Reserved2[189]; /* remainder of VbeModeInfoBlock */ } __attribute__ ((packed)); /* Return VBE Mode Information */ extern _X_EXPORT VbeModeInfoBlock *VBEGetModeInfo(vbeInfoPtr pVbe, int mode); extern _X_EXPORT void VBEFreeModeInfo(VbeModeInfoBlock * block); /* * INT2 */ #define CRTC_DBLSCAN (1<<0) #define CRTC_INTERLACE (1<<1) #define CRTC_NHSYNC (1<<2) #define CRTC_NVSYNC (1<<3) struct _VbeCRTCInfoBlock { CARD16 HorizontalTotal; /* Horizontal total in pixels */ CARD16 HorizontalSyncStart; /* Horizontal sync start in pixels */ CARD16 HorizontalSyncEnd; /* Horizontal sync end in pixels */ CARD16 VerticalTotal; /* Vertical total in lines */ CARD16 VerticalSyncStart; /* Vertical sync start in lines */ CARD16 VerticalSyncEnd; /* Vertical sync end in lines */ CARD8 Flags; /* Flags (Interlaced, Double Scan etc) */ CARD32 PixelClock; /* Pixel clock in units of Hz */ CARD16 RefreshRate; /* Refresh rate in units of 0.01 Hz */ CARD8 Reserved[40]; /* remainder of ModeInfoBlock */ } __attribute__ ((packed)); /* VbeCRTCInfoBlock is in the VESA 3.0 specs */ extern _X_EXPORT Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock * crtc); /* * INT 3 */ extern _X_EXPORT Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode); /* * INT 4 */ /* Save/Restore Super VGA video state */ /* function values are (values stored in VESAPtr): * 0 := query & allocate amount of memory to save state * 1 := save state * 2 := restore state * * function 0 called automatically if function 1 called without * a previous call to function 0. */ typedef enum { MODE_QUERY, MODE_SAVE, MODE_RESTORE } vbeSaveRestoreFunction; extern _X_EXPORT Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function, void **memory, int *size, int *real_mode_pages); /* * INT 5 */ extern _X_EXPORT Bool VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window); /* * INT 6 */ typedef enum { SCANWID_SET, SCANWID_GET, SCANWID_SET_BYTES, SCANWID_GET_MAX } vbeScanwidthCommand; #define VBESetLogicalScanline(pVbe, width) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET, width, \ NULL, NULL, NULL) #define VBESetLogicalScanlineBytes(pVbe, width) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_SET_BYTES, width, \ NULL, NULL, NULL) #define VBEGetLogicalScanline(pVbe, pixels, bytes, max) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET, 0, \ pixels, bytes, max) #define VBEGetMaxLogicalScanline(pVbe, pixels, bytes, max) \ VBESetGetLogicalScanlineLength(pVbe, SCANWID_GET_MAX, 0, \ pixels, bytes, max) extern _X_EXPORT Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max); /* * INT 7 */ /* 16 bit code */ extern _X_EXPORT Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace); extern _X_EXPORT Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y); /* * INT 8 */ /* if bits is 0, then it is a GET */ extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); /* * INT 9 */ /* * If getting a palette, the data argument is not used. It will return * the data. * If setting a palette, it will return the pointer received on success, * NULL on failure. */ extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace); #define VBEFreePaletteData(data) free(data) /* * INT A */ typedef struct _VBEpmi { int seg_tbl; int tbl_off; int tbl_len; } VBEpmi; extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); #define VESAFreeVBEpmi(pmi) free(pmi) /* high level helper functions */ typedef struct _vbeModeInfoRec { int width; int height; int bpp; int n; struct _vbeModeInfoRec *next; } vbeModeInfoRec, *vbeModeInfoPtr; typedef struct { CARD8 *state; CARD8 *pstate; int statePage; int stateSize; int stateMode; } vbeSaveRestoreRec, *vbeSaveRestorePtr; extern _X_EXPORT void VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbeSaveRestoreFunction function); extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock); extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode); struct vbePanelID { short hsize; short vsize; short fptype; char redbpp; char greenbpp; char bluebpp; char reservedbpp; int reserved_offscreen_mem_size; int reserved_offscreen_mem_pointer; char reserved[14]; }; extern _X_EXPORT void VBEInterpretPanelID(ScrnInfoPtr pScrn, struct vbePanelID *data); extern _X_EXPORT struct vbePanelID *VBEReadPanelID(vbeInfoPtr pVbe); #endif xorg-server-21.1.16/hw/xfree86/int10/vbeModes.h0000644000175000017500000000755214757411105014421 /* * Copyright © 2002 David Dawes * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 AUTHOR(S) 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 author(s) 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 author(s). * * Authors: David Dawes * */ #ifndef _VBE_MODES_H /* * This is intended to be stored in the DisplayModeRec's private area. * It includes all the information necessary to VBE information. */ typedef struct _VbeModeInfoData { int mode; VbeModeInfoBlock *data; VbeCRTCInfoBlock *block; } VbeModeInfoData; #define V_DEPTH_1 0x001 #define V_DEPTH_4 0x002 #define V_DEPTH_8 0x004 #define V_DEPTH_15 0x008 #define V_DEPTH_16 0x010 #define V_DEPTH_24_24 0x020 #define V_DEPTH_24_32 0x040 #define V_DEPTH_24 (V_DEPTH_24_24 | V_DEPTH_24_32) #define V_DEPTH_30 0x080 #define V_DEPTH_32 0x100 #define VBE_MODE_SUPPORTED(m) (((m)->ModeAttributes & 0x01) != 0) #define VBE_MODE_COLOR(m) (((m)->ModeAttributes & 0x08) != 0) #define VBE_MODE_GRAPHICS(m) (((m)->ModeAttributes & 0x10) != 0) #define VBE_MODE_VGA(m) (((m)->ModeAttributes & 0x40) == 0) #define VBE_MODE_LINEAR(m) (((m)->ModeAttributes & 0x80) != 0 && \ ((m)->PhysBasePtr != 0)) #define VBE_MODE_USABLE(m, f) (VBE_MODE_SUPPORTED(m) || \ (f & V_MODETYPE_BAD)) && \ VBE_MODE_GRAPHICS(m) && \ (VBE_MODE_VGA(m) || VBE_MODE_LINEAR(m)) #define V_MODETYPE_VBE 0x01 #define V_MODETYPE_VGA 0x02 #define V_MODETYPE_BAD 0x04 extern _X_EXPORT int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock * vbe, int *flags24, int modeTypes); extern _X_EXPORT DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock * vbe, int modeTypes); extern _X_EXPORT void VBESetModeNames(DisplayModePtr pMode); extern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); /* * Note: These are alternatives to the standard helpers. They should * usually just wrap the standard helpers. */ extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy); extern _X_EXPORT void VBEPrintModes(ScrnInfoPtr scrp); #endif /* VBE_MODES_H */ xorg-server-21.1.16/hw/xfree86/int10/Makefile.in0000644000175000017500000010456314757411115014552 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @INT10_X86EMU_TRUE@am__append_1 = -I$(srcdir)/../x86emu subdir = hw/xfree86/int10 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(module_LTLIBRARIES) am__DEPENDENCIES_1 = libint10_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libint10_la_SOURCES_DIST = stub.c xf86int10module.c vbe.c \ vbeModes.c helper_exec.c helper_mem.c xf86int10.c \ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \ $(srcdir)/../os-support/linux/int10/linux.c xf86x86emu.c \ generic.c x86emu.c am__objects_1 = vbe.lo vbeModes.lo helper_exec.lo helper_mem.lo \ xf86int10.lo xf86int10module.lo @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@am_libint10_la_OBJECTS = $(am__objects_1) \ @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@ xf86x86emu.lo \ @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@ generic.lo \ @INT10_STUB_FALSE@@INT10_VM86_FALSE@@INT10_X86EMU_TRUE@ x86emu.lo @INT10_STUB_FALSE@@INT10_VM86_TRUE@am_libint10_la_OBJECTS = \ @INT10_STUB_FALSE@@INT10_VM86_TRUE@ $(am__objects_1) \ @INT10_STUB_FALSE@@INT10_VM86_TRUE@ linux_vm86.lo linux.lo @INT10_STUB_TRUE@am_libint10_la_OBJECTS = stub.lo xf86int10module.lo libint10_la_OBJECTS = $(am_libint10_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libint10_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libint10_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/generic.Plo \ ./$(DEPDIR)/helper_exec.Plo ./$(DEPDIR)/helper_mem.Plo \ ./$(DEPDIR)/linux.Plo ./$(DEPDIR)/linux_vm86.Plo \ ./$(DEPDIR)/stub.Plo ./$(DEPDIR)/vbe.Plo \ ./$(DEPDIR)/vbeModes.Plo ./$(DEPDIR)/x86emu.Plo \ ./$(DEPDIR)/xf86int10.Plo ./$(DEPDIR)/xf86int10module.Plo \ ./$(DEPDIR)/xf86x86emu.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libint10_la_SOURCES) DIST_SOURCES = $(am__libint10_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ module_LTLIBRARIES = libint10.la sdk_HEADERS = xf86int10.h vbe.h vbeModes.h EXTRA_CFLAGS = libint10_la_LDFLAGS = -avoid-version libint10_la_LIBADD = $(PCIACCESS_LIBS) COMMON_SOURCES = \ vbe.c \ vbeModes.c \ helper_exec.c \ helper_mem.c \ xf86int10.c \ xf86int10module.c @I386_VIDEO_TRUE@I386_VIDEO_CFLAGS = -D_PC AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../modes \ -I$(srcdir)/../i2c -I$(srcdir)/../parser $(am__append_1) @INT10_STUB_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS) @INT10_VM86_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_VM86_LINUX $(DIX_CFLAGS) $(XORG_CFLAGS) $(EXTRA_CFLAGS) @INT10_X86EMU_TRUE@AM_CFLAGS = $(I386_VIDEO_CFLAGS) -D_X86EMU -DNO_SYS_HEADERS \ @INT10_X86EMU_TRUE@ $(XORG_CFLAGS) $(EXTRA_CFLAGS) $(DIX_CFLAGS) @INT10_STUB_TRUE@libint10_la_SOURCES = stub.c xf86int10module.c @INT10_VM86_TRUE@libint10_la_SOURCES = \ @INT10_VM86_TRUE@ $(COMMON_SOURCES) \ @INT10_VM86_TRUE@ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \ @INT10_VM86_TRUE@ $(srcdir)/../os-support/linux/int10/linux.c @INT10_X86EMU_TRUE@libint10_la_SOURCES = \ @INT10_X86EMU_TRUE@ $(COMMON_SOURCES) \ @INT10_X86EMU_TRUE@ xf86x86emu.c \ @INT10_X86EMU_TRUE@ generic.c \ @INT10_X86EMU_TRUE@ x86emu.c EXTRA_DIST = xf86x86emu.h INT10.HOWTO all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/int10/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/int10/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libint10.la: $(libint10_la_OBJECTS) $(libint10_la_DEPENDENCIES) $(EXTRA_libint10_la_DEPENDENCIES) $(AM_V_CCLD)$(libint10_la_LINK) -rpath $(moduledir) $(libint10_la_OBJECTS) $(libint10_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/generic.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_exec.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper_mem.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linux_vm86.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbe.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbeModes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x86emu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86int10.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86int10module.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86x86emu.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< linux_vm86.lo: $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT linux_vm86.lo -MD -MP -MF $(DEPDIR)/linux_vm86.Tpo -c -o linux_vm86.lo `test -f '$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c' || echo '$(srcdir)/'`$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/linux_vm86.Tpo $(DEPDIR)/linux_vm86.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c' object='linux_vm86.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o linux_vm86.lo `test -f '$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c' || echo '$(srcdir)/'`$(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c linux.lo: $(srcdir)/../os-support/linux/int10/linux.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT linux.lo -MD -MP -MF $(DEPDIR)/linux.Tpo -c -o linux.lo `test -f '$(srcdir)/../os-support/linux/int10/linux.c' || echo '$(srcdir)/'`$(srcdir)/../os-support/linux/int10/linux.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/linux.Tpo $(DEPDIR)/linux.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../os-support/linux/int10/linux.c' object='linux.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o linux.lo `test -f '$(srcdir)/../os-support/linux/int10/linux.c' || echo '$(srcdir)/'`$(srcdir)/../os-support/linux/int10/linux.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/generic.Plo -rm -f ./$(DEPDIR)/helper_exec.Plo -rm -f ./$(DEPDIR)/helper_mem.Plo -rm -f ./$(DEPDIR)/linux.Plo -rm -f ./$(DEPDIR)/linux_vm86.Plo -rm -f ./$(DEPDIR)/stub.Plo -rm -f ./$(DEPDIR)/vbe.Plo -rm -f ./$(DEPDIR)/vbeModes.Plo -rm -f ./$(DEPDIR)/x86emu.Plo -rm -f ./$(DEPDIR)/xf86int10.Plo -rm -f ./$(DEPDIR)/xf86int10module.Plo -rm -f ./$(DEPDIR)/xf86x86emu.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/generic.Plo -rm -f ./$(DEPDIR)/helper_exec.Plo -rm -f ./$(DEPDIR)/helper_mem.Plo -rm -f ./$(DEPDIR)/linux.Plo -rm -f ./$(DEPDIR)/linux_vm86.Plo -rm -f ./$(DEPDIR)/stub.Plo -rm -f ./$(DEPDIR)/vbe.Plo -rm -f ./$(DEPDIR)/vbeModes.Plo -rm -f ./$(DEPDIR)/x86emu.Plo -rm -f ./$(DEPDIR)/xf86int10.Plo -rm -f ./$(DEPDIR)/xf86int10module.Plo -rm -f ./$(DEPDIR)/xf86x86emu.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-moduleLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/int10/stub.c0000644000175000017500000000202414757411105013612 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86str.h" #include "xf86_OSproc.h" #define _INT10_PRIVATE #include "xf86int10.h" xf86Int10InfoPtr xf86InitInt10(int entityIndex) { return xf86ExtendedInitInt10(entityIndex, 0); } xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { return NULL; } Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { return FALSE; } void xf86FreeInt10(xf86Int10InfoPtr pInt) { return; } void * xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) { *off = 0; return NULL; } void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) { return; } Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt) { return FALSE; } void xf86ExecX86int10(xf86Int10InfoPtr pInt) { return; } void * xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr) { return 0; } xorg-server-21.1.16/hw/xfree86/int10/xf86int10module.c0000644000175000017500000000152214757411105015514 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86str.h" #include "xf86Pci.h" #include "xf86int10.h" #ifndef MOD_NAME #define MOD_NAME int10 #endif #define stringify(x) #x #define STRING(x) stringify(x) #define concat(x,y) x ## y #define combine(a,b) concat(a,b) #define NAME(x) combine(MOD_NAME,x) static XF86ModuleVersionInfo NAME(VersRec) = { STRING(NAME()), MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_VIDEODRV, /* needs the video driver ABI */ ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, { 0, 0, 0, 0} }; _X_EXPORT XF86ModuleData NAME(ModuleData) = { &NAME(VersRec), NULL, NULL}; xorg-server-21.1.16/hw/xfree86/int10/vbe.c0000644000175000017500000007402714757411105013425 /* * XFree86 vbe module * Copyright 2000 Egbert Eich * * The mode query/save/set/restore functions from the vesa driver * have been moved here. * Copyright (c) 2000 by Conectiva S.A. (http://www.conectiva.com) * Authors: Paulo César Pereira de Andrade */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Modes.h" #include "vbe.h" #include #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x) #if X_BYTE_ORDER == X_LITTLE_ENDIAN #define B_O16(x) (x) #define B_O32(x) (x) #else #define B_O16(x) ((((x) & 0xff) << 8) | (((x) & 0xff) >> 8)) #define B_O32(x) ((((x) & 0xff) << 24) | (((x) & 0xff00) << 8) \ | (((x) & 0xff0000) >> 8) | (((x) & 0xff000000) >> 24)) #endif #define L_ADD(x) (B_O32(x) & 0xffff) + ((B_O32(x) >> 12) & 0xffff00) #define FARP(p) (((unsigned)(p & 0xffff0000) >> 12) | (p & 0xffff)) #define R16(v) ((v) & 0xffff) static unsigned char *vbeReadEDID(vbeInfoPtr pVbe); static Bool vbeProbeDDC(vbeInfoPtr pVbe); static const char vbeVersionString[] = "VBE2"; vbeInfoPtr VBEInit(xf86Int10InfoPtr pInt, int entityIndex) { return VBEExtendedInit(pInt, entityIndex, 0); } vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags) { int RealOff; void *page = NULL; ScrnInfoPtr pScrn = xf86FindScreenForEntity(entityIndex); vbeControllerInfoPtr vbe = NULL; Bool init_int10 = FALSE; vbeInfoPtr vip = NULL; int screen; if (!pScrn) return NULL; screen = pScrn->scrnIndex; if (!pInt) { if (!xf86LoadSubModule(pScrn, "int10")) goto error; xf86DrvMsg(screen, X_INFO, "initializing int10\n"); pInt = xf86ExtendedInitInt10(entityIndex, Flags); if (!pInt) goto error; init_int10 = TRUE; } page = xf86Int10AllocPages(pInt, 1, &RealOff); if (!page) goto error; vbe = (vbeControllerInfoPtr) page; memcpy(vbe->VbeSignature, vbeVersionString, 4); pInt->ax = 0x4F00; pInt->es = SEG_ADDR(RealOff); pInt->di = SEG_OFF(RealOff); pInt->num = 0x10; xf86ExecX86int10(pInt); if ((pInt->ax & 0xff) != 0x4f) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA BIOS not detected\n"); goto error; } switch (pInt->ax & 0xff00) { case 0: xf86DrvMsg(screen, X_INFO, "VESA BIOS detected\n"); break; case 0x100: xf86DrvMsg(screen, X_INFO, "VESA BIOS function failed\n"); goto error; case 0x200: xf86DrvMsg(screen, X_INFO, "VESA BIOS not supported\n"); goto error; case 0x300: xf86DrvMsg(screen, X_INFO, "VESA BIOS not supported in current mode\n"); goto error; default: xf86DrvMsg(screen, X_INFO, "Invalid\n"); goto error; } xf86DrvMsgVerb(screen, X_INFO, 4, "VbeVersion is %d, OemStringPtr is 0x%08lx,\n" "\tOemVendorNamePtr is 0x%08lx, OemProductNamePtr is 0x%08lx,\n" "\tOemProductRevPtr is 0x%08lx\n", vbe->VbeVersion, (unsigned long) vbe->OemStringPtr, (unsigned long) vbe->OemVendorNamePtr, (unsigned long) vbe->OemProductNamePtr, (unsigned long) vbe->OemProductRevPtr); xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE Version %i.%i\n", VERSION(vbe->VbeVersion)); xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE Total Mem: %i kB\n", vbe->TotalMem * 64); xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE OEM: %s\n", (CARD8 *) xf86int10Addr(pInt, L_ADD(vbe->OemStringPtr))); if (B_O16(vbe->VbeVersion) >= 0x200) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE OEM Software Rev: %i.%i\n", VERSION(vbe->OemSoftwareRev)); if (vbe->OemVendorNamePtr) xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE OEM Vendor: %s\n", (CARD8 *) xf86int10Addr(pInt, L_ADD(vbe-> OemVendorNamePtr))); if (vbe->OemProductNamePtr) xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE OEM Product: %s\n", (CARD8 *) xf86int10Addr(pInt, L_ADD(vbe-> OemProductNamePtr))); if (vbe->OemProductRevPtr) xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE OEM Product Rev: %s\n", (CARD8 *) xf86int10Addr(pInt, L_ADD(vbe-> OemProductRevPtr))); } vip = (vbeInfoPtr) xnfalloc(sizeof(vbeInfoRec)); vip->version = B_O16(vbe->VbeVersion); vip->pInt10 = pInt; vip->ddc = DDC_UNCHECKED; vip->memory = page; vip->real_mode_base = RealOff; vip->num_pages = 1; vip->init_int10 = init_int10; return vip; error: if (page) xf86Int10FreePages(pInt, page, 1); if (init_int10) xf86FreeInt10(pInt); return NULL; } void vbeFree(vbeInfoPtr pVbe) { if (!pVbe) return; xf86Int10FreePages(pVbe->pInt10, pVbe->memory, pVbe->num_pages); /* If we have initialized int10 we ought to free it, too */ if (pVbe->init_int10) xf86FreeInt10(pVbe->pInt10); free(pVbe); return; } static Bool vbeProbeDDC(vbeInfoPtr pVbe) { const char *ddc_level; int screen = pVbe->pInt10->pScrn->scrnIndex; if (pVbe->ddc == DDC_NONE) return FALSE; if (pVbe->ddc != DDC_UNCHECKED) return TRUE; pVbe->pInt10->ax = 0x4F15; pVbe->pInt10->bx = 0; pVbe->pInt10->cx = 0; pVbe->pInt10->es = 0; pVbe->pInt10->di = 0; pVbe->pInt10->num = 0x10; xf86ExecX86int10(pVbe->pInt10); if ((pVbe->pInt10->ax & 0xff) != 0x4f) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC not supported\n"); pVbe->ddc = DDC_NONE; return FALSE; } switch ((pVbe->pInt10->ax >> 8) & 0xff) { case 0: xf86DrvMsg(screen, X_INFO, "VESA VBE DDC supported\n"); switch (pVbe->pInt10->bx & 0x3) { case 0: ddc_level = " none"; pVbe->ddc = DDC_NONE; break; case 1: ddc_level = " 1"; pVbe->ddc = DDC_1; break; case 2: ddc_level = " 2"; pVbe->ddc = DDC_2; break; case 3: ddc_level = " 1 + 2"; pVbe->ddc = DDC_1_2; break; default: ddc_level = ""; pVbe->ddc = DDC_NONE; break; } xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC Level%s\n", ddc_level); if (pVbe->pInt10->bx & 0x4) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC Screen blanked" "for data transfer\n"); pVbe->ddc_blank = TRUE; } else pVbe->ddc_blank = FALSE; xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC transfer in appr. %x sec.\n", (pVbe->pInt10->bx >> 8) & 0xff); } return TRUE; } typedef enum { VBEOPT_NOVBE, VBEOPT_NODDC } VBEOpts; static const OptionInfoRec VBEOptions[] = { {VBEOPT_NOVBE, "NoVBE", OPTV_BOOLEAN, {0}, FALSE}, {VBEOPT_NODDC, "NoDDC", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; static unsigned char * vbeReadEDID(vbeInfoPtr pVbe) { int RealOff = pVbe->real_mode_base; void *page = pVbe->memory; unsigned char *tmp = NULL; Bool novbe = FALSE; Bool noddc = FALSE; ScrnInfoPtr pScrn = pVbe->pInt10->pScrn; int screen = pScrn->scrnIndex; OptionInfoPtr options; if (!page) return NULL; options = xnfalloc(sizeof(VBEOptions)); (void) memcpy(options, VBEOptions, sizeof(VBEOptions)); xf86ProcessOptions(screen, pScrn->options, options); xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe); xf86GetOptValBool(options, VBEOPT_NODDC, &noddc); free(options); if (novbe || noddc) return NULL; if (!vbeProbeDDC(pVbe)) goto error; memset(page, 0, sizeof(vbeInfoPtr)); strcpy(page, vbeVersionString); pVbe->pInt10->ax = 0x4F15; pVbe->pInt10->bx = 0x01; pVbe->pInt10->cx = 0; pVbe->pInt10->dx = 0; pVbe->pInt10->es = SEG_ADDR(RealOff); pVbe->pInt10->di = SEG_OFF(RealOff); pVbe->pInt10->num = 0x10; xf86ExecX86int10(pVbe->pInt10); if ((pVbe->pInt10->ax & 0xff) != 0x4f) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC invalid\n"); goto error; } switch (pVbe->pInt10->ax & 0xff00) { case 0x0: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC read successfully\n"); tmp = (unsigned char *) xnfalloc(128); memcpy(tmp, page, 128); break; case 0x100: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC read failed\n"); break; default: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC unknown failure %i\n", pVbe->pInt10->ax & 0xff00); break; } error: return tmp; } xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, void *unused) { unsigned char *DDC_data = NULL; if (!pVbe) return NULL; if (pVbe->version < 0x102) return NULL; DDC_data = vbeReadEDID(pVbe); if (!DDC_data) return NULL; return xf86InterpretEDID(pVbe->pInt10->pScrn->scrnIndex, DDC_data); } #define GET_UNALIGNED2(x) \ ((*(CARD16*)(x)) | (*(((CARD16*)(x) + 1))) << 16) VbeInfoBlock * VBEGetVBEInfo(vbeInfoPtr pVbe) { VbeInfoBlock *block = NULL; int i, pStr, pModes; char *str; CARD16 major, *modes; memset(pVbe->memory, 0, sizeof(VbeInfoBlock)); /* Input: AH := 4Fh Super VGA support AL := 00h Return Super VGA information ES:DI := Pointer to buffer Output: AX := status (All other registers are preserved) */ ((char *) pVbe->memory)[0] = 'V'; ((char *) pVbe->memory)[1] = 'B'; ((char *) pVbe->memory)[2] = 'E'; ((char *) pVbe->memory)[3] = '2'; pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f00; pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base); pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base); xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return NULL; block = calloc(sizeof(VbeInfoBlock), 1); block->VESASignature[0] = ((char *) pVbe->memory)[0]; block->VESASignature[1] = ((char *) pVbe->memory)[1]; block->VESASignature[2] = ((char *) pVbe->memory)[2]; block->VESASignature[3] = ((char *) pVbe->memory)[3]; block->VESAVersion = *(CARD16 *) (((char *) pVbe->memory) + 4); major = (unsigned) block->VESAVersion >> 8; pStr = GET_UNALIGNED2((((char *) pVbe->memory) + 6)); str = xf86int10Addr(pVbe->pInt10, FARP(pStr)); block->OEMStringPtr = strdup(str); block->Capabilities[0] = ((char *) pVbe->memory)[10]; block->Capabilities[1] = ((char *) pVbe->memory)[11]; block->Capabilities[2] = ((char *) pVbe->memory)[12]; block->Capabilities[3] = ((char *) pVbe->memory)[13]; pModes = GET_UNALIGNED2((((char *) pVbe->memory) + 14)); modes = xf86int10Addr(pVbe->pInt10, FARP(pModes)); i = 0; while (modes[i] != 0xffff) i++; block->VideoModePtr = xallocarray(i + 1, sizeof(CARD16)); memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i); block->VideoModePtr[i] = 0xffff; block->TotalMemory = *(CARD16 *) (((char *) pVbe->memory) + 18); if (major < 2) memcpy(&block->OemSoftwareRev, ((char *) pVbe->memory) + 20, 236); else { block->OemSoftwareRev = *(CARD16 *) (((char *) pVbe->memory) + 20); pStr = GET_UNALIGNED2((((char *) pVbe->memory) + 22)); str = xf86int10Addr(pVbe->pInt10, FARP(pStr)); block->OemVendorNamePtr = strdup(str); pStr = GET_UNALIGNED2((((char *) pVbe->memory) + 26)); str = xf86int10Addr(pVbe->pInt10, FARP(pStr)); block->OemProductNamePtr = strdup(str); pStr = GET_UNALIGNED2((((char *) pVbe->memory) + 30)); str = xf86int10Addr(pVbe->pInt10, FARP(pStr)); block->OemProductRevPtr = strdup(str); memcpy(&block->Reserved, ((char *) pVbe->memory) + 34, 222); memcpy(&block->OemData, ((char *) pVbe->memory) + 256, 256); } return block; } void VBEFreeVBEInfo(VbeInfoBlock * block) { free(block->OEMStringPtr); free(block->VideoModePtr); if (((unsigned) block->VESAVersion >> 8) >= 2) { free(block->OemVendorNamePtr); free(block->OemProductNamePtr); free(block->OemProductRevPtr); } free(block); } Bool VBESetVBEMode(vbeInfoPtr pVbe, int mode, VbeCRTCInfoBlock * block) { /* Input: AH := 4Fh Super VGA support AL := 02h Set Super VGA video mode BX := Video mode D0-D8 := Mode number D9-D10 := Reserved (must be 0) D11 := 0 Use current default refresh rate := 1 Use user specified CRTC values for refresh rate D12-13 Reserved for VBE/AF (must be 0) D14 := 0 Use windowed frame buffer model := 1 Use linear/flat frame buffer model D15 := 0 Clear video memory := 1 Don't clear video memory ES:DI := Pointer to VbeCRTCInfoBlock structure Output: AX = Status (All other registers are preserved) */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f02; pVbe->pInt10->bx = mode; if (block) { pVbe->pInt10->bx |= 1 << 11; memcpy(pVbe->memory, block, sizeof(VbeCRTCInfoBlock)); pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base); pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base); } else pVbe->pInt10->bx &= ~(1 << 11); xf86ExecX86int10(pVbe->pInt10); return (R16(pVbe->pInt10->ax) == 0x4f); } Bool VBEGetVBEMode(vbeInfoPtr pVbe, int *mode) { /* Input: AH := 4Fh Super VGA support AL := 03h Return current video mode Output: AX := Status BX := Current video mode (All other registers are preserved) */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f03; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) == 0x4f) { *mode = R16(pVbe->pInt10->bx); return TRUE; } return FALSE; } VbeModeInfoBlock * VBEGetModeInfo(vbeInfoPtr pVbe, int mode) { VbeModeInfoBlock *block = NULL; memset(pVbe->memory, 0, sizeof(VbeModeInfoBlock)); /* Input: AH := 4Fh Super VGA support AL := 01h Return Super VGA mode information CX := Super VGA video mode (mode number must be one of those returned by Function 0) ES:DI := Pointer to buffer Output: AX := status (All other registers are preserved) */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f01; pVbe->pInt10->cx = mode; pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base); pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base); xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return NULL; block = malloc(sizeof(VbeModeInfoBlock)); if (block) memcpy(block, pVbe->memory, sizeof(*block)); return block; } void VBEFreeModeInfo(VbeModeInfoBlock * block) { free(block); } Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function, void **memory, int *size, int *real_mode_pages) { /* Input: AH := 4Fh Super VGA support AL := 04h Save/restore Super VGA video state DL := 00h Return save/restore state buffer size CX := Requested states D0 = Save/restore video hardware state D1 = Save/restore video BIOS data state D2 = Save/restore video DAC state D3 = Save/restore Super VGA state Output: AX = Status BX = Number of 64-byte blocks to hold the state buffer (All other registers are preserved) Input: AH := 4Fh Super VGA support AL := 04h Save/restore Super VGA video state DL := 01h Save Super VGA video state CX := Requested states (see above) ES:BX := Pointer to buffer Output: AX := Status (All other registers are preserved) Input: AH := 4Fh Super VGA support AL := 04h Save/restore Super VGA video state DL := 02h Restore Super VGA video state CX := Requested states (see above) ES:BX := Pointer to buffer Output: AX := Status (All other registers are preserved) */ if ((pVbe->version & 0xff00) > 0x100) { int screen = pVbe->pInt10->pScrn->scrnIndex; if (function == MODE_QUERY || (function == MODE_SAVE && !*memory)) { /* Query amount of memory to save state */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f04; pVbe->pInt10->dx = 0; pVbe->pInt10->cx = 0x000f; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return FALSE; if (function == MODE_SAVE) { int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1; if ((*memory = xf86Int10AllocPages(pVbe->pInt10, npages, real_mode_pages)) == NULL) { xf86DrvMsg(screen, X_ERROR, "Cannot allocate memory to save SVGA state.\n"); return FALSE; } } *size = pVbe->pInt10->bx * 64; } /* Save/Restore Super VGA state */ if (function != MODE_QUERY) { if (!*memory) return FALSE; pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f04; switch (function) { case MODE_SAVE: pVbe->pInt10->dx = 1; break; case MODE_RESTORE: pVbe->pInt10->dx = 2; break; case MODE_QUERY: return FALSE; } pVbe->pInt10->cx = 0x000f; pVbe->pInt10->es = SEG_ADDR(*real_mode_pages); pVbe->pInt10->bx = SEG_OFF(*real_mode_pages); xf86ExecX86int10(pVbe->pInt10); return (R16(pVbe->pInt10->ax) == 0x4f); } } return TRUE; } Bool VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window) { /* Input: AH := 4Fh Super VGA support AL := 05h Output: */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f05; pVbe->pInt10->bx = window; pVbe->pInt10->dx = iBank; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return FALSE; return TRUE; } Bool VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max) { if (command < SCANWID_SET || command > SCANWID_GET_MAX) return FALSE; /* Input: AX := 4F06h VBE Set/Get Logical Scan Line Length BL := 00h Set Scan Line Length in Pixels := 01h Get Scan Line Length := 02h Set Scan Line Length in Bytes := 03h Get Maximum Scan Line Length CX := If BL=00h Desired Width in Pixels If BL=02h Desired Width in Bytes (Ignored for Get Functions) Output: AX := VBE Return Status BX := Bytes Per Scan Line CX := Actual Pixels Per Scan Line (truncated to nearest complete pixel) DX := Maximum Number of Scan Lines */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f06; pVbe->pInt10->bx = command; if (command == SCANWID_SET || command == SCANWID_SET_BYTES) pVbe->pInt10->cx = width; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return FALSE; if (command == SCANWID_GET || command == SCANWID_GET_MAX) { if (pixels) *pixels = R16(pVbe->pInt10->cx); if (bytes) *bytes = R16(pVbe->pInt10->bx); if (max) *max = R16(pVbe->pInt10->dx); } return TRUE; } Bool VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace) { pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f07; pVbe->pInt10->bx = wait_retrace ? 0x80 : 0x00; pVbe->pInt10->cx = x; pVbe->pInt10->dx = y; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return FALSE; return TRUE; } Bool VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y) { pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f07; pVbe->pInt10->bx = 0x01; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return FALSE; *x = pVbe->pInt10->cx; *y = pVbe->pInt10->dx; return TRUE; } int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits) { /* Input: AX := 4F08h VBE Set/Get Palette Format BL := 00h Set DAC Palette Format := 01h Get DAC Palette Format BH := Desired bits of color per primary (Set DAC Palette Format only) Output: AX := VBE Return Status BH := Current number of bits of color per primary */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f08; if (!bits) pVbe->pInt10->bx = 0x01; else pVbe->pInt10->bx = (bits & 0x00ff) << 8; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return 0; return (bits != 0 ? bits : (pVbe->pInt10->bx >> 8) & 0x00ff); } CARD32 * VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace) { /* Input: (16-bit) AX := 4F09h VBE Load/Unload Palette Data BL := 00h Set Palette Data := 01h Get Palette Data := 02h Set Secondary Palette Data := 03h Get Secondary Palette Data := 80h Set Palette Data during Vertical Retrace CX := Number of palette registers to update (to a maximum of 256) DX := First of the palette registers to update (start) ES:DI := Table of palette values (see below for format) Output: AX := VBE Return Status Input: (32-bit) BL := 00h Set Palette Data := 80h Set Palette Data during Vertical Retrace CX := Number of palette registers to update (to a maximum of 256) DX := First of the palette registers to update (start) ES:EDI := Table of palette values (see below for format) DS := Selector for memory mapped registers */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f09; if (!secondary) pVbe->pInt10->bx = set && wait_retrace ? 0x80 : set ? 0 : 1; else pVbe->pInt10->bx = set ? 2 : 3; pVbe->pInt10->cx = num; pVbe->pInt10->dx = first; pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base); pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base); if (set) memcpy(pVbe->memory, data, num * sizeof(CARD32)); xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return NULL; if (set) return data; data = xallocarray(num, sizeof(CARD32)); memcpy(data, pVbe->memory, num * sizeof(CARD32)); return data; } VBEpmi * VBEGetVBEpmi(vbeInfoPtr pVbe) { VBEpmi *pmi; /* Input: AH := 4Fh Super VGA support AL := 0Ah Protected Mode Interface BL := 00h Return Protected Mode Table Output: AX := Status ES := Real Mode Segment of Table DI := Offset of Table CX := Length of Table including protected mode code in bytes (for copying purposes) (All other registers are preserved) */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f0a; pVbe->pInt10->bx = 0; pVbe->pInt10->di = 0; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return NULL; pmi = malloc(sizeof(VBEpmi)); pmi->seg_tbl = R16(pVbe->pInt10->es); pmi->tbl_off = R16(pVbe->pInt10->di); pmi->tbl_len = R16(pVbe->pInt10->cx); return pmi; } #if 0 vbeModeInfoPtr VBEBuildVbeModeList(vbeInfoPtr pVbe, VbeInfoBlock * vbe) { vbeModeInfoPtr ModeList = NULL; int i = 0; while (vbe->VideoModePtr[i] != 0xffff) { vbeModeInfoPtr m; VbeModeInfoBlock *mode; int id = vbe->VideoModePtr[i++]; int bpp; if ((mode = VBEGetModeInfo(pVbe, id)) == NULL) continue; bpp = mode->BitsPerPixel; m = xnfcalloc(sizeof(vbeModeInfoRec), 1); m->width = mode->XResolution; m->height = mode->YResolution; m->bpp = bpp; m->n = id; m->next = ModeList; xf86DrvMsgVerb(pVbe->pInt10->pScrn->scrnIndex, X_PROBED, 3, "BIOS reported VESA mode 0x%x: x:%i y:%i bpp:%i\n", m->n, m->width, m->height, m->bpp); ModeList = m; VBEFreeModeInfo(mode); } return ModeList; } unsigned short VBECalcVbeModeIndex(vbeModeInfoPtr m, DisplayModePtr mode, int bpp) { while (m) { if (bpp == m->bpp && mode->HDisplay == m->width && mode->VDisplay == m->height) return m->n; m = m->next; } return 0; } #endif void VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbeSaveRestoreFunction function) { Bool SaveSucc = FALSE; if (VBE_VERSION_MAJOR(pVbe->version) > 1 && (function == MODE_SAVE || vbe_sr->pstate)) { if (function == MODE_RESTORE) memcpy(vbe_sr->state, vbe_sr->pstate, vbe_sr->stateSize); ErrorF("VBESaveRestore\n"); if ((VBESaveRestore(pVbe, function, (void *) &vbe_sr->state, &vbe_sr->stateSize, &vbe_sr->statePage))) { if (function == MODE_SAVE) { SaveSucc = TRUE; vbe_sr->stateMode = -1; /* invalidate */ /* don't rely on the memory not being touched */ if (vbe_sr->pstate == NULL) vbe_sr->pstate = malloc(vbe_sr->stateSize); memcpy(vbe_sr->pstate, vbe_sr->state, vbe_sr->stateSize); } ErrorF("VBESaveRestore done with success\n"); return; } ErrorF("VBESaveRestore done\n"); } if (function == MODE_SAVE && !SaveSucc) (void) VBEGetVBEMode(pVbe, &vbe_sr->stateMode); if (function == MODE_RESTORE && vbe_sr->stateMode != -1) VBESetVBEMode(pVbe, vbe_sr->stateMode, NULL); } int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) { /* Input: AX := 4F0Bh VBE Get Pixel Clock BL := 00h Get Pixel Clock ECX := pixel clock in units of Hz DX := mode number Output: AX := VBE Return Status ECX := Closest pixel clock */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f0b; pVbe->pInt10->bx = 0x00; pVbe->pInt10->cx = clock; pVbe->pInt10->dx = mode; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) return 0; return pVbe->pInt10->cx; } Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode) { /* Input: AX := 4F10h DPMS BL := 01h Set Display Power State BH := requested power state Output: AX := VBE Return Status */ pVbe->pInt10->num = 0x10; pVbe->pInt10->ax = 0x4f10; pVbe->pInt10->bx = 0x01; switch (mode) { case DPMSModeOn: break; case DPMSModeStandby: pVbe->pInt10->bx |= 0x100; break; case DPMSModeSuspend: pVbe->pInt10->bx |= 0x200; break; case DPMSModeOff: pVbe->pInt10->bx |= 0x400; break; } xf86ExecX86int10(pVbe->pInt10); return (R16(pVbe->pInt10->ax) == 0x4f); } void VBEInterpretPanelID(ScrnInfoPtr pScrn, struct vbePanelID *data) { DisplayModePtr mode; const float PANEL_HZ = 60.0; if (!data) return; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PanelID returned panel resolution %dx%d\n", data->hsize, data->vsize); if (pScrn->monitor->nHsync || pScrn->monitor->nVrefresh) return; if (data->hsize < 320 || data->vsize < 240) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "...which I refuse to believe\n"); return; } mode = xf86CVTMode(data->hsize, data->vsize, PANEL_HZ, 1, 0); pScrn->monitor->nHsync = 1; pScrn->monitor->hsync[0].lo = 29.37; pScrn->monitor->hsync[0].hi = (float) mode->Clock / (float) mode->HTotal; pScrn->monitor->nVrefresh = 1; pScrn->monitor->vrefresh[0].lo = 56.0; pScrn->monitor->vrefresh[0].hi = (float) mode->Clock * 1000.0 / (float) mode->HTotal / (float) mode->VTotal; if (pScrn->monitor->vrefresh[0].hi < 59.47) pScrn->monitor->vrefresh[0].hi = 59.47; free(mode); } struct vbePanelID * VBEReadPanelID(vbeInfoPtr pVbe) { int RealOff = pVbe->real_mode_base; void *page = pVbe->memory; void *tmp = NULL; int screen = pVbe->pInt10->pScrn->scrnIndex; pVbe->pInt10->ax = 0x4F11; pVbe->pInt10->bx = 0x01; pVbe->pInt10->cx = 0; pVbe->pInt10->dx = 0; pVbe->pInt10->es = SEG_ADDR(RealOff); pVbe->pInt10->di = SEG_OFF(RealOff); pVbe->pInt10->num = 0x10; xf86ExecX86int10(pVbe->pInt10); if ((pVbe->pInt10->ax & 0xff) != 0x4f) { xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID invalid\n"); goto error; } switch (pVbe->pInt10->ax & 0xff00) { case 0x0: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID read successfully\n"); tmp = xnfalloc(32); memcpy(tmp, page, 32); break; case 0x100: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID read failed\n"); break; default: xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID unknown failure %i\n", pVbe->pInt10->ax & 0xff00); break; } error: return tmp; } xorg-server-21.1.16/hw/xfree86/int10/vbeModes.c0000644000175000017500000003771714757411105014422 #define DEBUG_VERB 2 /* * Copyright © 2002 David Dawes * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 AUTHOR(S) 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 author(s) 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 author(s). * * Authors: David Dawes * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "vbe.h" #include "vbeModes.h" static int GetDepthFlag(vbeInfoPtr pVbe, int id) { VbeModeInfoBlock *mode; int bpp; if ((mode = VBEGetModeInfo(pVbe, id)) == NULL) return 0; if (VBE_MODE_USABLE(mode, 0)) { int depth; if (VBE_MODE_COLOR(mode)) { depth = mode->RedMaskSize + mode->GreenMaskSize + mode->BlueMaskSize; } else { depth = 1; } bpp = mode->BitsPerPixel; VBEFreeModeInfo(mode); mode = NULL; switch (depth) { case 1: return V_DEPTH_1; case 4: return V_DEPTH_4; case 8: return V_DEPTH_8; case 15: return V_DEPTH_15; case 16: return V_DEPTH_16; case 24: switch (bpp) { case 24: return V_DEPTH_24_24; case 32: return V_DEPTH_24_32; } } } if (mode) VBEFreeModeInfo(mode); return 0; } /* * Find supported mode depths. */ int VBEFindSupportedDepths(vbeInfoPtr pVbe, VbeInfoBlock * vbe, int *flags24, int modeTypes) { int i = 0; int depths = 0; if (modeTypes & V_MODETYPE_VBE) { while (vbe->VideoModePtr[i] != 0xffff) { depths |= GetDepthFlag(pVbe, vbe->VideoModePtr[i++]); } } /* * XXX This possibly only works with VBE 3.0 and later. */ if (modeTypes & V_MODETYPE_VGA) { for (i = 0; i < 0x7F; i++) { depths |= GetDepthFlag(pVbe, i); } } if (flags24) { if (depths & V_DEPTH_24_24) *flags24 |= Support24bppFb; if (depths & V_DEPTH_24_32) *flags24 |= Support32bppFb; } return depths; } static DisplayModePtr CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock * vbe, int id, int flags) { CARD16 major; VbeModeInfoBlock *mode; DisplayModePtr pMode; VbeModeInfoData *data; Bool modeOK = FALSE; major = (unsigned) (vbe->VESAVersion >> 8); if ((mode = VBEGetModeInfo(pVbe, id)) == NULL) return NULL; /* Does the mode match the depth/bpp? */ /* Some BIOS's set BitsPerPixel to 15 instead of 16 for 15/16 */ if (VBE_MODE_USABLE(mode, flags) && ((pScrn->bitsPerPixel == 1 && !VBE_MODE_COLOR(mode)) || (mode->BitsPerPixel > 8 && (mode->RedMaskSize + mode->GreenMaskSize + mode->BlueMaskSize) == pScrn->depth && mode->BitsPerPixel == pScrn->bitsPerPixel) || (mode->BitsPerPixel == 15 && pScrn->depth == 15) || (mode->BitsPerPixel <= 8 && mode->BitsPerPixel == pScrn->bitsPerPixel))) { modeOK = TRUE; xf86ErrorFVerb(DEBUG_VERB, "*"); } xf86ErrorFVerb(DEBUG_VERB, "Mode: %x (%dx%d)\n", id, mode->XResolution, mode->YResolution); xf86ErrorFVerb(DEBUG_VERB, " ModeAttributes: 0x%x\n", mode->ModeAttributes); xf86ErrorFVerb(DEBUG_VERB, " WinAAttributes: 0x%x\n", mode->WinAAttributes); xf86ErrorFVerb(DEBUG_VERB, " WinBAttributes: 0x%x\n", mode->WinBAttributes); xf86ErrorFVerb(DEBUG_VERB, " WinGranularity: %d\n", mode->WinGranularity); xf86ErrorFVerb(DEBUG_VERB, " WinSize: %d\n", mode->WinSize); xf86ErrorFVerb(DEBUG_VERB, " WinASegment: 0x%x\n", mode->WinASegment); xf86ErrorFVerb(DEBUG_VERB, " WinBSegment: 0x%x\n", mode->WinBSegment); xf86ErrorFVerb(DEBUG_VERB, " WinFuncPtr: 0x%lx\n", (unsigned long) mode->WinFuncPtr); xf86ErrorFVerb(DEBUG_VERB, " BytesPerScanline: %d\n", mode->BytesPerScanline); xf86ErrorFVerb(DEBUG_VERB, " XResolution: %d\n", mode->XResolution); xf86ErrorFVerb(DEBUG_VERB, " YResolution: %d\n", mode->YResolution); xf86ErrorFVerb(DEBUG_VERB, " XCharSize: %d\n", mode->XCharSize); xf86ErrorFVerb(DEBUG_VERB, " YCharSize: %d\n", mode->YCharSize); xf86ErrorFVerb(DEBUG_VERB, " NumberOfPlanes: %d\n", mode->NumberOfPlanes); xf86ErrorFVerb(DEBUG_VERB, " BitsPerPixel: %d\n", mode->BitsPerPixel); xf86ErrorFVerb(DEBUG_VERB, " NumberOfBanks: %d\n", mode->NumberOfBanks); xf86ErrorFVerb(DEBUG_VERB, " MemoryModel: %d\n", mode->MemoryModel); xf86ErrorFVerb(DEBUG_VERB, " BankSize: %d\n", mode->BankSize); xf86ErrorFVerb(DEBUG_VERB, " NumberOfImages: %d\n", mode->NumberOfImages); xf86ErrorFVerb(DEBUG_VERB, " RedMaskSize: %d\n", mode->RedMaskSize); xf86ErrorFVerb(DEBUG_VERB, " RedFieldPosition: %d\n", mode->RedFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " GreenMaskSize: %d\n", mode->GreenMaskSize); xf86ErrorFVerb(DEBUG_VERB, " GreenFieldPosition: %d\n", mode->GreenFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " BlueMaskSize: %d\n", mode->BlueMaskSize); xf86ErrorFVerb(DEBUG_VERB, " BlueFieldPosition: %d\n", mode->BlueFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " RsvdMaskSize: %d\n", mode->RsvdMaskSize); xf86ErrorFVerb(DEBUG_VERB, " RsvdFieldPosition: %d\n", mode->RsvdFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " DirectColorModeInfo: %d\n", mode->DirectColorModeInfo); if (major >= 2) { xf86ErrorFVerb(DEBUG_VERB, " PhysBasePtr: 0x%lx\n", (unsigned long) mode->PhysBasePtr); if (major >= 3) { xf86ErrorFVerb(DEBUG_VERB, " LinBytesPerScanLine: %d\n", mode->LinBytesPerScanLine); xf86ErrorFVerb(DEBUG_VERB, " BnkNumberOfImagePages: %d\n", mode->BnkNumberOfImagePages); xf86ErrorFVerb(DEBUG_VERB, " LinNumberOfImagePages: %d\n", mode->LinNumberOfImagePages); xf86ErrorFVerb(DEBUG_VERB, " LinRedMaskSize: %d\n", mode->LinRedMaskSize); xf86ErrorFVerb(DEBUG_VERB, " LinRedFieldPosition: %d\n", mode->LinRedFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " LinGreenMaskSize: %d\n", mode->LinGreenMaskSize); xf86ErrorFVerb(DEBUG_VERB, " LinGreenFieldPosition: %d\n", mode->LinGreenFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " LinBlueMaskSize: %d\n", mode->LinBlueMaskSize); xf86ErrorFVerb(DEBUG_VERB, " LinBlueFieldPosition: %d\n", mode->LinBlueFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " LinRsvdMaskSize: %d\n", mode->LinRsvdMaskSize); xf86ErrorFVerb(DEBUG_VERB, " LinRsvdFieldPosition: %d\n", mode->LinRsvdFieldPosition); xf86ErrorFVerb(DEBUG_VERB, " MaxPixelClock: %ld\n", (unsigned long) mode->MaxPixelClock); } } if (!modeOK) { VBEFreeModeInfo(mode); return NULL; } pMode = xnfcalloc(sizeof(DisplayModeRec), 1); pMode->status = MODE_OK; pMode->type = M_T_BUILTIN; /* for adjust frame */ pMode->HDisplay = mode->XResolution; pMode->VDisplay = mode->YResolution; data = xnfcalloc(sizeof(VbeModeInfoData), 1); data->mode = id; data->data = mode; pMode->PrivSize = sizeof(VbeModeInfoData); pMode->Private = (INT32 *) data; pMode->next = NULL; return pMode; } /* * Check the available BIOS modes, and extract those that match the * requirements into the modePool. Note: modePool is a NULL-terminated * list. */ DisplayModePtr VBEGetModePool(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock * vbe, int modeTypes) { DisplayModePtr pMode, p = NULL, modePool = NULL; int i = 0; if (modeTypes & V_MODETYPE_VBE) { while (vbe->VideoModePtr[i] != 0xffff) { int id = vbe->VideoModePtr[i++]; if ((pMode = CheckMode(pScrn, pVbe, vbe, id, modeTypes)) != NULL) { ModeStatus status = MODE_OK; /* Check the mode against a specified virtual size (if any) */ if (pScrn->display->virtualX > 0 && pMode->HDisplay > pScrn->display->virtualX) { status = MODE_VIRTUAL_X; } if (pScrn->display->virtualY > 0 && pMode->VDisplay > pScrn->display->virtualY) { status = MODE_VIRTUAL_Y; } if (status != MODE_OK) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using mode \"%dx%d\" (%s)\n", pMode->HDisplay, pMode->VDisplay, xf86ModeStatusToString(status)); } else { if (p == NULL) { modePool = pMode; } else { p->next = pMode; } pMode->prev = NULL; p = pMode; } } } } if (modeTypes & V_MODETYPE_VGA) { for (i = 0; i < 0x7F; i++) { if ((pMode = CheckMode(pScrn, pVbe, vbe, i, modeTypes)) != NULL) { ModeStatus status = MODE_OK; /* Check the mode against a specified virtual size (if any) */ if (pScrn->display->virtualX > 0 && pMode->HDisplay > pScrn->display->virtualX) { status = MODE_VIRTUAL_X; } if (pScrn->display->virtualY > 0 && pMode->VDisplay > pScrn->display->virtualY) { status = MODE_VIRTUAL_Y; } if (status != MODE_OK) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using mode \"%dx%d\" (%s)\n", pMode->HDisplay, pMode->VDisplay, xf86ModeStatusToString(status)); } else { if (p == NULL) { modePool = pMode; } else { p->next = pMode; } pMode->prev = NULL; p = pMode; } } } } return modePool; } void VBESetModeNames(DisplayModePtr pMode) { if (!pMode) return; do { if (!pMode->name) { /* Catch "bad" modes. */ if (pMode->HDisplay > 10000 || pMode->HDisplay < 0 || pMode->VDisplay > 10000 || pMode->VDisplay < 0) { pMode->name = strdup("BADMODE"); } else { char *tmp; XNFasprintf(&tmp, "%dx%d", pMode->HDisplay, pMode->VDisplay); pMode->name = tmp; } } pMode = pMode->next; } while (pMode); } /* * Go through the monitor modes and selecting the best set of * parameters for each BIOS mode. Note: This is only supported in * VBE version 3.0 or later. */ void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) { DisplayModePtr pMode; VbeModeInfoData *data; pMode = pScrn->modes; do { DisplayModePtr p, best = NULL; ModeStatus status; for (p = pScrn->monitor->Modes; p != NULL; p = p->next) { if ((p->HDisplay != pMode->HDisplay) || (p->VDisplay != pMode->VDisplay) || (p->Flags & (V_INTERLACE | V_DBLSCAN | V_CLKDIV2))) continue; /* XXX could support the various V_ flags */ status = xf86CheckModeForMonitor(p, pScrn->monitor); if (status != MODE_OK) continue; if (!best || (p->Clock > best->Clock)) best = p; } if (best) { int clock; data = (VbeModeInfoData *) pMode->Private; pMode->HSync = (float) best->Clock * 1000.0 / best->HTotal + 0.5; pMode->VRefresh = pMode->HSync / best->VTotal + 0.5; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Attempting to use %dHz refresh for mode \"%s\" (%x)\n", (int) pMode->VRefresh, pMode->name, data->mode); data->block = calloc(sizeof(VbeCRTCInfoBlock), 1); data->block->HorizontalTotal = best->HTotal; data->block->HorizontalSyncStart = best->HSyncStart; data->block->HorizontalSyncEnd = best->HSyncEnd; data->block->VerticalTotal = best->VTotal; data->block->VerticalSyncStart = best->VSyncStart; data->block->VerticalSyncEnd = best->VSyncEnd; data->block->Flags = ((best->Flags & V_NHSYNC) ? CRTC_NHSYNC : 0) | ((best->Flags & V_NVSYNC) ? CRTC_NVSYNC : 0); data->block->PixelClock = best->Clock * 1000; /* XXX May not have this. */ clock = VBEGetPixelClock(pVbe, data->mode, data->block->PixelClock); DebugF("Setting clock %.2fMHz, closest is %.2fMHz\n", (double) data->block->PixelClock / 1000000.0, (double) clock / 1000000.0); if (clock) data->block->PixelClock = clock; data->mode |= (1 << 11); data->block->RefreshRate = ((double) (data->block->PixelClock) / (double) (best->HTotal * best->VTotal)) * 100; } pMode = pMode->next; } while (pMode != pScrn->modes); } /* * These wrappers are to allow (temporary) functionality divergences. */ int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, int maxHeight, int virtualX, int virtualY, int apertureSize, LookupModeFlags strategy) { return xf86ValidateModes(scrp, availModes, modeNames, clockRanges, linePitches, minPitch, maxPitch, pitchInc, minHeight, maxHeight, virtualX, virtualY, apertureSize, strategy); } void VBEPrintModes(ScrnInfoPtr scrp) { xf86PrintModes(scrp); } xorg-server-21.1.16/hw/xfree86/int10/helper_exec.c0000644000175000017500000005171014757411105015126 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich * * Part of this code was inspired by the VBIOS POSTing code in DOSEMU * developed by the "DOSEMU-Development-Team" */ /* * To debug port accesses define PRINT_PORT to 1. * Note! You also have to comment out ioperm() * in xf86EnableIO(). Otherwise we won't trap * on PIO. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #define PRINT_PORT 0 #include #include #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" #define _INT10_PRIVATE #include "int10Defines.h" #include "xf86int10.h" #include "Pci.h" #ifdef _X86EMU #include "x86emu/x86emui.h" #else #define DEBUG_IO_TRACE() 0 #endif #include static int pciCfg1in(uint16_t addr, uint32_t *val); static int pciCfg1out(uint16_t addr, uint32_t val); static int pciCfg1inw(uint16_t addr, uint16_t *val); static int pciCfg1outw(uint16_t addr, uint16_t val); static int pciCfg1inb(uint16_t addr, uint8_t *val); static int pciCfg1outb(uint16_t addr, uint8_t val); #if defined (_PC) static void SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set); #endif #define REG pInt int setup_int(xf86Int10InfoPtr pInt) { if (pInt != Int10Current) { if (!MapCurrentInt10(pInt)) return -1; Int10Current = pInt; } X86_EAX = (uint32_t) pInt->ax; X86_EBX = (uint32_t) pInt->bx; X86_ECX = (uint32_t) pInt->cx; X86_EDX = (uint32_t) pInt->dx; X86_ESI = (uint32_t) pInt->si; X86_EDI = (uint32_t) pInt->di; X86_EBP = (uint32_t) pInt->bp; X86_ESP = 0x1000; X86_SS = pInt->stackseg >> 4; X86_EIP = 0x0600; X86_CS = 0x0; /* address of 'hlt' */ X86_DS = 0x40; /* standard pc ds */ X86_ES = pInt->es; X86_FS = 0; X86_GS = 0; X86_EFLAGS = X86_IF_MASK | X86_IOPL_MASK; #if defined (_PC) if (pInt->Flags & SET_BIOS_SCRATCH) SetResetBIOSVars(pInt, TRUE); #endif OsBlockSignals(); return 0; } void finish_int(xf86Int10InfoPtr pInt, int sig) { OsReleaseSignals(); pInt->ax = (uint32_t) X86_EAX; pInt->bx = (uint32_t) X86_EBX; pInt->cx = (uint32_t) X86_ECX; pInt->dx = (uint32_t) X86_EDX; pInt->si = (uint32_t) X86_ESI; pInt->di = (uint32_t) X86_EDI; pInt->es = (uint16_t) X86_ES; pInt->bp = (uint32_t) X86_EBP; pInt->flags = (uint32_t) X86_FLAGS; #if defined (_PC) if (pInt->Flags & RESTORE_BIOS_SCRATCH) SetResetBIOSVars(pInt, FALSE); #endif } /* general software interrupt handler */ uint32_t getIntVect(xf86Int10InfoPtr pInt, int num) { return MEM_RW(pInt, num << 2) + (MEM_RW(pInt, (num << 2) + 2) << 4); } void pushw(xf86Int10InfoPtr pInt, uint16_t val) { X86_ESP -= 2; MEM_WW(pInt, ((uint32_t) X86_SS << 4) + X86_SP, val); } int run_bios_int(int num, xf86Int10InfoPtr pInt) { uint32_t eflags; #ifndef _PC /* check if bios vector is initialized */ if (MEM_RW(pInt, (num << 2) + 2) == (SYS_BIOS >> 4)) { /* SYS_BIOS_SEG ? */ if (num == 21 && X86_AH == 0x4e) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_NOTICE, "Failing Find-Matching-File on non-PC" " (int 21, func 4e)\n"); X86_AX = 2; SET_FLAG(F_CF); return 1; } else { xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "Ignoring int 0x%02x call\n", num); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } return 1; } } #endif #ifdef PRINT_INT ErrorF("calling card BIOS at: "); #endif eflags = X86_EFLAGS; #if 0 eflags = eflags | IF_MASK; X86_EFLAGS = X86_EFLAGS & ~(VIF_MASK | TF_MASK | IF_MASK | NT_MASK); #endif pushw(pInt, eflags); pushw(pInt, X86_CS); pushw(pInt, X86_IP); X86_CS = MEM_RW(pInt, (num << 2) + 2); X86_IP = MEM_RW(pInt, num << 2); #ifdef PRINT_INT ErrorF("0x%x:%lx\n", X86_CS, X86_EIP); #endif return 1; } /* Debugging stuff */ void dump_code(xf86Int10InfoPtr pInt) { int i; uint32_t lina = SEG_ADR((uint32_t), X86_CS, IP); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "code at 0x%8.8" PRIx32 ":\n", (unsigned) lina); for (i = 0; i < 0x10; i++) xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i)); xf86ErrorFVerb(3, "\n"); for (; i < 0x20; i++) xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i)); xf86ErrorFVerb(3, "\n"); } void dump_registers(xf86Int10InfoPtr pInt) { xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "EAX=0x%8.8lx, EBX=0x%8.8lx, ECX=0x%8.8lx, EDX=0x%8.8lx\n", (unsigned long) X86_EAX, (unsigned long) X86_EBX, (unsigned long) X86_ECX, (unsigned long) X86_EDX); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "ESP=0x%8.8lx, EBP=0x%8.8lx, ESI=0x%8.8lx, EDI=0x%8.8lx\n", (unsigned long) X86_ESP, (unsigned long) X86_EBP, (unsigned long) X86_ESI, (unsigned long) X86_EDI); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "CS=0x%4.4x, SS=0x%4.4x," " DS=0x%4.4x, ES=0x%4.4x, FS=0x%4.4x, GS=0x%4.4x\n", X86_CS, X86_SS, X86_DS, X86_ES, X86_FS, X86_GS); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "EIP=0x%8.8lx, EFLAGS=0x%8.8lx\n", (unsigned long) X86_EIP, (unsigned long) X86_EFLAGS); } void stack_trace(xf86Int10InfoPtr pInt) { int i = 0; unsigned long stack = SEG_ADR((uint32_t), X86_SS, SP); unsigned long tail = (uint32_t) ((X86_SS << 4) + 0x1000); if (stack >= tail) return; xf86MsgVerb(X_INFO, 3, "stack at 0x%8.8lx:\n", stack); for (; stack < tail; stack++) { xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, stack)); i = (i + 1) % 0x10; if (!i) xf86ErrorFVerb(3, "\n"); } if (i) xf86ErrorFVerb(3, "\n"); } int port_rep_inb(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -1 : 1; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WB(pInt, dst, x_inb(port)); dst += inc; } return dst - base; } int port_rep_inw(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -2 : 2; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WW(pInt, dst, x_inw(port)); dst += inc; } return dst - base; } int port_rep_inl(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -4 : 4; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WL(pInt, dst, x_inl(port)); dst += inc; } return dst - base; } int port_rep_outb(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -1 : 1; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outb(port, MEM_RB(pInt, dst)); dst += inc; } return dst - base; } int port_rep_outw(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -2 : 2; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outw(port, MEM_RW(pInt, dst)); dst += inc; } return dst - base; } int port_rep_outl(xf86Int10InfoPtr pInt, uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -4 : 4; uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outl(port, MEM_RL(pInt, dst)); dst += inc; } return dst - base; } uint8_t x_inb(uint16_t port) { uint8_t val; if (port == 0x40) { Int10Current->inb40time++; val = (uint8_t) (Int10Current->inb40time >> ((Int10Current->inb40time & 1) << 3)); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" inb(%#x) = %2.2x\n", port, val); #ifdef __NOT_YET__ } else if (port < 0x0100) { /* Don't interfere with mainboard */ val = 0; xf86DrvMsgVerb(Int10Current->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "inb 0x%4.4x\n", port); if (xf86GetVerbosity() > 3) { dump_registers(Int10Current); stack_trace(Int10Current); } #endif /* __NOT_YET__ */ } else if (!pciCfg1inb(port, &val)) { val = pci_io_read8(Int10Current->io, port); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" inb(%#x) = %2.2x\n", port, val); } return val; } uint16_t x_inw(uint16_t port) { uint16_t val; if (port == 0x5c) { struct timeval tv; /* * Emulate a PC's timer. Typical resolution is 3.26 usec. * Approximate this by dividing by 3. */ X_GETTIMEOFDAY(&tv); val = (uint16_t) (tv.tv_usec / 3); } else if (!pciCfg1inw(port, &val)) { val = pci_io_read16(Int10Current->io, port); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" inw(%#x) = %4.4x\n", port, val); } return val; } void x_outb(uint16_t port, uint8_t val) { if ((port == 0x43) && (val == 0)) { struct timeval tv; /* * Emulate a PC's timer 0. Such timers typically have a resolution of * some .838 usec per tick, but this can only provide 1 usec per tick. * (Not that this matters much, given inherent emulation delays.) Use * the bottom bit as a byte select. See inb(0x40) above. */ X_GETTIMEOFDAY(&tv); Int10Current->inb40time = (uint16_t) (tv.tv_usec | 1); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" outb(%#x, %2.2x)\n", port, val); #ifdef __NOT_YET__ } else if (port < 0x0100) { /* Don't interfere with mainboard */ xf86DrvMsgVerb(Int10Current->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "outb 0x%4.4x,0x%2.2x\n", port, val); if (xf86GetVerbosity() > 3) { dump_registers(Int10Current); stack_trace(Int10Current); } #endif /* __NOT_YET__ */ } else if (!pciCfg1outb(port, val)) { if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" outb(%#x, %2.2x)\n", port, val); pci_io_write8(Int10Current->io, port, val); } } void x_outw(uint16_t port, uint16_t val) { if (!pciCfg1outw(port, val)) { if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" outw(%#x, %4.4x)\n", port, val); pci_io_write16(Int10Current->io, port, val); } } uint32_t x_inl(uint16_t port) { uint32_t val; if (!pciCfg1in(port, &val)) { val = pci_io_read32(Int10Current->io, port); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" inl(%#x) = %8.8" PRIx32 "\n", port, (unsigned) val); } return val; } void x_outl(uint16_t port, uint32_t val) { if (!pciCfg1out(port, val)) { if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" outl(%#x, %8.8" PRIx32 ")\n", port, (unsigned) val); pci_io_write32(Int10Current->io, port, val); } } uint8_t Mem_rb(uint32_t addr) { return (*Int10Current->mem->rb) (Int10Current, addr); } uint16_t Mem_rw(uint32_t addr) { return (*Int10Current->mem->rw) (Int10Current, addr); } uint32_t Mem_rl(uint32_t addr) { return (*Int10Current->mem->rl) (Int10Current, addr); } void Mem_wb(uint32_t addr, uint8_t val) { (*Int10Current->mem->wb) (Int10Current, addr, val); } void Mem_ww(uint32_t addr, uint16_t val) { (*Int10Current->mem->ww) (Int10Current, addr, val); } void Mem_wl(uint32_t addr, uint32_t val) { (*Int10Current->mem->wl) (Int10Current, addr, val); } static uint32_t PciCfg1Addr = 0; #define PCI_DOM_FROM_TAG(tag) (((tag) >> 24) & (PCI_DOM_MASK)) #define PCI_BUS_FROM_TAG(tag) (((tag) >> 16) & (PCI_DOMBUS_MASK)) #define PCI_DEV_FROM_TAG(tag) (((tag) & 0x0000f800u) >> 11) #define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8) #define PCI_OFFSET(x) ((x) & 0x000000ff) #define PCI_TAG(x) ((x) & 0x7fffff00) static struct pci_device * pci_device_for_cfg_address(uint32_t addr) { struct pci_device *dev = NULL; uint32_t tag = PCI_TAG(addr); struct pci_slot_match slot_match = { .domain = PCI_DOM_FROM_TAG(tag), .bus = PCI_BUS_NO_DOMAIN(PCI_BUS_FROM_TAG(tag)), .dev = PCI_DEV_FROM_TAG(tag), .func = PCI_FUNC_FROM_TAG(tag), .match_data = 0 }; struct pci_device_iterator *iter = pci_slot_match_iterator_create(&slot_match); if (iter) dev = pci_device_next(iter); pci_iterator_destroy(iter); return dev; } static int pciCfg1in(uint16_t addr, uint32_t *val) { if (addr == 0xCF8) { *val = PciCfg1Addr; return 1; } if (addr == 0xCFC) { pci_device_cfg_read_u32(pci_device_for_cfg_address(PciCfg1Addr), (uint32_t *) val, PCI_OFFSET(PciCfg1Addr)); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_inl(%#" PRIx32 ") = %8.8" PRIx32 "\n", (unsigned) PciCfg1Addr, (unsigned) *val); return 1; } return 0; } static int pciCfg1out(uint16_t addr, uint32_t val) { if (addr == 0xCF8) { PciCfg1Addr = val; return 1; } if (addr == 0xCFC) { if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_outl(%#" PRIx32 ", %8.8" PRIx32 ")\n", (unsigned) PciCfg1Addr, (unsigned) val); pci_device_cfg_write_u32(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr)); return 1; } return 0; } static int pciCfg1inw(uint16_t addr, uint16_t *val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; *val = (PciCfg1Addr >> shift) & 0xffff; return 1; } if ((addr >= 0xCFC) && (addr <= 0xCFF)) { const unsigned offset = addr - 0xCFC; pci_device_cfg_read_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_inw(%#" PRIx32 ") = %4.4x\n", (unsigned) (PciCfg1Addr + offset), (unsigned) *val); return 1; } return 0; } static int pciCfg1outw(uint16_t addr, uint16_t val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; PciCfg1Addr &= ~(0xffff << shift); PciCfg1Addr |= ((uint32_t) val) << shift; return 1; } if ((addr >= 0xCFC) && (addr <= 0xCFF)) { const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_outw(%#" PRIx32 ", %4.4x)\n", (unsigned) (PciCfg1Addr + offset), (unsigned) val); pci_device_cfg_write_u16(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; } return 0; } static int pciCfg1inb(uint16_t addr, uint8_t *val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; *val = (PciCfg1Addr >> shift) & 0xff; return 1; } if ((addr >= 0xCFC) && (addr <= 0xCFF)) { const unsigned offset = addr - 0xCFC; pci_device_cfg_read_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_inb(%#" PRIx32 ") = %2.2x\n", (unsigned) (PciCfg1Addr + offset), (unsigned) *val); return 1; } return 0; } static int pciCfg1outb(uint16_t addr, uint8_t val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; PciCfg1Addr &= ~(0xff << shift); PciCfg1Addr |= ((uint32_t) val) << shift; return 1; } if ((addr >= 0xCFC) && (addr <= 0xCFF)) { const unsigned offset = addr - 0xCFC; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" cfg_outb(%#" PRIx32 ", %2.2x)\n", (unsigned) (PciCfg1Addr + offset), (unsigned) val); pci_device_cfg_write_u8(pci_device_for_cfg_address(PciCfg1Addr), val, PCI_OFFSET(PciCfg1Addr) + offset); return 1; } return 0; } uint8_t bios_checksum(const uint8_t *start, int size) { uint8_t sum = 0; while (size-- > 0) sum += *start++; return sum; } /* * Lock/Unlock legacy VGA. Some Bioses try to be very clever and make * an attempt to detect a legacy ISA card. If they find one they might * act very strange: for example they might configure the card as a * monochrome card. This might cause some drivers to choke. * To avoid this we attempt legacy VGA by writing to all known VGA * disable registers before we call the BIOS initialization and * restore the original values afterwards. In between we hold our * breath. To get to a (possibly existing) ISA card need to disable * our current PCI card. */ /* * This is just for booting: we just want to catch pure * legacy vga therefore we don't worry about mmio etc. * This stuff should really go into vgaHW.c. However then * the driver would have to load the vga-module prior to * doing int10. */ void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { vga->save_msr = pci_io_read8(pInt->io, 0x03CC); vga->save_vse = pci_io_read8(pInt->io, 0x03C3); #ifndef __ia64__ vga->save_46e8 = pci_io_read8(pInt->io, 0x46E8); #endif vga->save_pos102 = pci_io_read8(pInt->io, 0x0102); pci_io_write8(pInt->io, 0x03C2, ~(uint8_t) 0x03 & vga->save_msr); pci_io_write8(pInt->io, 0x03C3, ~(uint8_t) 0x01 & vga->save_vse); #ifndef __ia64__ pci_io_write8(pInt->io, 0x46E8, ~(uint8_t) 0x08 & vga->save_46e8); #endif pci_io_write8(pInt->io, 0x0102, ~(uint8_t) 0x01 & vga->save_pos102); } void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) { pci_io_write8(pInt->io, 0x0102, vga->save_pos102); #ifndef __ia64__ pci_io_write8(pInt->io, 0x46E8, vga->save_46e8); #endif pci_io_write8(pInt->io, 0x03C3, vga->save_vse); pci_io_write8(pInt->io, 0x03C2, vga->save_msr); } #if defined (_PC) static void SetResetBIOSVars(xf86Int10InfoPtr pInt, Bool set) { int pagesize = getpagesize(); unsigned char *base; int i; if (pci_device_map_legacy (pInt->dev, 0, pagesize, PCI_DEV_MAP_FLAG_WRITABLE, (void **) &base)) return; /* eek */ if (set) { for (i = BIOS_SCRATCH_OFF; i < BIOS_SCRATCH_END; i++) MEM_WW(pInt, i, *(base + i)); } else { for (i = BIOS_SCRATCH_OFF; i < BIOS_SCRATCH_END; i++) *(base + i) = MEM_RW(pInt, i); } pci_device_unmap_legacy(pInt->dev, base, pagesize); } void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save) { int pagesize = getpagesize(); unsigned char *base; int i; if (!xf86IsEntityPrimary(pInt->entityIndex) || (!save && !pInt->BIOSScratch)) return; if (pci_device_map_legacy (pInt->dev, 0, pagesize, PCI_DEV_MAP_FLAG_WRITABLE, (void **) &base)) return; /* eek */ base += BIOS_SCRATCH_OFF; if (save) { if ((pInt->BIOSScratch = xnfalloc(BIOS_SCRATCH_LEN))) for (i = 0; i < BIOS_SCRATCH_LEN; i++) *(((char *) pInt->BIOSScratch + i)) = *(base + i); } else { if (pInt->BIOSScratch) { for (i = 0; i < BIOS_SCRATCH_LEN; i++) *(base + i) = *(pInt->BIOSScratch + i); free(pInt->BIOSScratch); pInt->BIOSScratch = NULL; } } pci_device_unmap_legacy(pInt->dev, base - BIOS_SCRATCH_OFF, pagesize); } #endif xf86Int10InfoPtr xf86InitInt10(int entityIndex) { return xf86ExtendedInitInt10(entityIndex, 0); } xorg-server-21.1.16/hw/xfree86/int10/helper_mem.c0000644000175000017500000002123014757411105014752 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" #include "xf86Pci.h" #define _INT10_PRIVATE #if 0 #include "int10Defines.h" #endif #include "xf86int10.h" #define REG pInt typedef enum { OPT_NOINT10, OPT_INIT_PRIMARY, } INT10Opts; static const OptionInfoRec INT10Options[] = { {OPT_NOINT10, "NoINT10", OPTV_BOOLEAN, {0}, FALSE}, {OPT_INIT_PRIMARY, "InitPrimary", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; #ifdef DEBUG void dprint(unsigned long start, unsigned long size) { int i, j; char *c = (char *) start; for (j = 0; j < (size >> 4); j++) { char *d = c; ErrorF("\n0x%lx: ", (unsigned long) c); for (i = 0; i < 16; i++) ErrorF("%2.2x ", (unsigned char) (*(c++))); c = d; for (i = 0; i < 16; i++) { ErrorF("%c", ((((CARD8) (*c)) > 32) && (((CARD8) (*c)) < 128)) ? (unsigned char) (*(c)) : '.'); c++; } } ErrorF("\n"); } #endif #ifndef _PC /* * here we are really paranoid about faking a "real" * BIOS. Most of this information was pulled from * dosemu. */ void setup_int_vect(xf86Int10InfoPtr pInt) { int i; /* let the int vects point to the SYS_BIOS seg */ for (i = 0; i < 0x80; i++) { MEM_WW(pInt, i << 2, 0); MEM_WW(pInt, (i << 2) + 2, SYS_BIOS >> 4); } reset_int_vect(pInt); /* font tables default location (int 1F) */ MEM_WW(pInt, 0x1f << 2, 0xfa6e); /* int 11 default location (Get Equipment Configuration) */ MEM_WW(pInt, 0x11 << 2, 0xf84d); /* int 12 default location (Get Conventional Memory Size) */ MEM_WW(pInt, 0x12 << 2, 0xf841); /* int 15 default location (I/O System Extensions) */ MEM_WW(pInt, 0x15 << 2, 0xf859); /* int 1A default location (RTC, PCI and others) */ MEM_WW(pInt, 0x1a << 2, 0xff6e); /* int 05 default location (Bound Exceeded) */ MEM_WW(pInt, 0x05 << 2, 0xff54); /* int 08 default location (Double Fault) */ MEM_WW(pInt, 0x08 << 2, 0xfea5); /* int 13 default location (Disk) */ MEM_WW(pInt, 0x13 << 2, 0xec59); /* int 0E default location (Page Fault) */ MEM_WW(pInt, 0x0e << 2, 0xef57); /* int 17 default location (Parallel Port) */ MEM_WW(pInt, 0x17 << 2, 0xefd2); /* fdd table default location (int 1e) */ MEM_WW(pInt, 0x1e << 2, 0xefc7); /* Set Equipment flag to VGA */ i = MEM_RB(pInt, 0x0410) & 0xCF; MEM_WB(pInt, 0x0410, i); /* XXX Perhaps setup more of the BDA here. See also int42(0x00). */ } #endif int setup_system_bios(void *base_addr) { char *base = (char *) base_addr; /* * we trap the "industry standard entry points" to the BIOS * and all other locations by filling them with "hlt" * TODO: implement hlt-handler for these */ memset(base, 0xf4, 0x10000); /* set bios date */ strcpy(base + 0x0FFF5, "06/11/99"); /* set up eisa ident string */ strcpy(base + 0x0FFD9, "PCI_ISA"); /* write system model id for IBM-AT */ *((unsigned char *) (base + 0x0FFFE)) = 0xfc; return 1; } void reset_int_vect(xf86Int10InfoPtr pInt) { /* * This table is normally located at 0xF000:0xF0A4. However, int 0x42, * function 0 (Mode Set) expects it (or a copy) somewhere in the bottom * 64kB. Note that because this data doesn't survive POST, int 0x42 should * only be used during EGA/VGA BIOS initialisation. */ static const CARD8 VideoParms[] = { /* Timing for modes 0x00 & 0x01 */ 0x38, 0x28, 0x2d, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, /* Timing for modes 0x02 & 0x03 */ 0x71, 0x50, 0x5a, 0x0a, 0x1f, 0x06, 0x19, 0x1c, 0x02, 0x07, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, /* Timing for modes 0x04, 0x05 & 0x06 */ 0x38, 0x28, 0x2d, 0x0a, 0x7f, 0x06, 0x64, 0x70, 0x02, 0x01, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, /* Timing for mode 0x07 */ 0x61, 0x50, 0x52, 0x0f, 0x19, 0x06, 0x19, 0x19, 0x02, 0x0d, 0x0b, 0x0c, 0x00, 0x00, 0x00, 0x00, /* Display page lengths in little endian order */ 0x00, 0x08, /* Modes 0x00 and 0x01 */ 0x00, 0x10, /* Modes 0x02 and 0x03 */ 0x00, 0x40, /* Modes 0x04 and 0x05 */ 0x00, 0x40, /* Modes 0x06 and 0x07 */ /* Number of columns for each mode */ 40, 40, 80, 80, 40, 40, 80, 80, /* CGA Mode register value for each mode */ 0x2c, 0x28, 0x2d, 0x29, 0x2a, 0x2e, 0x1e, 0x29, /* Padding */ 0x00, 0x00, 0x00, 0x00 }; int i; for (i = 0; i < sizeof(VideoParms); i++) MEM_WB(pInt, i + (0x1000 - sizeof(VideoParms)), VideoParms[i]); MEM_WW(pInt, 0x1d << 2, 0x1000 - sizeof(VideoParms)); MEM_WW(pInt, (0x1d << 2) + 2, 0); MEM_WW(pInt, 0x10 << 2, 0xf065); MEM_WW(pInt, (0x10 << 2) + 2, SYS_BIOS >> 4); MEM_WW(pInt, 0x42 << 2, 0xf065); MEM_WW(pInt, (0x42 << 2) + 2, SYS_BIOS >> 4); MEM_WW(pInt, 0x6D << 2, 0xf065); MEM_WW(pInt, (0x6D << 2) + 2, SYS_BIOS >> 4); } void set_return_trap(xf86Int10InfoPtr pInt) { /* * Here we set the exit condition: We return when we encounter * 'hlt' (=0xf4), which we locate at address 0x600 in x86 memory. */ MEM_WB(pInt, 0x0600, 0xf4); /* * Allocate a segment for the stack */ xf86Int10AllocPages(pInt, 1, &pInt->stackseg); } void * xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); OptionInfoPtr options = NULL; if (pEnt->device) { void *configOptions = NULL; /* Check if xf86CollectOptions() has already been called */ if (((pEnt->index < 0) || !pScrn || !(configOptions = pScrn->options)) && pEnt->device) configOptions = pEnt->device->options; if (configOptions) { if (!(options = (OptionInfoPtr) malloc(sizeof(INT10Options)))) return NULL; (void) memcpy(options, INT10Options, sizeof(INT10Options)); xf86ProcessOptions(pScrn->scrnIndex, configOptions, options); } } free(pEnt); return options; } Bool int10skip(const void *options) { Bool noint10 = FALSE; if (!options) return FALSE; xf86GetOptValBool(options, OPT_NOINT10, &noint10); return noint10; } Bool int10_check_bios(int scrnIndex, int codeSeg, const unsigned char *vbiosMem) { int size; if ((codeSeg & 0x1f) || /* Not 512-byte aligned otherwise */ ((codeSeg << 4) < V_BIOS) || ((codeSeg << 4) >= SYS_SIZE)) return FALSE; if ((*vbiosMem != 0x55) || (*(vbiosMem + 1) != 0xAA) || !*(vbiosMem + 2)) return FALSE; size = *(vbiosMem + 2) * 512; if ((size + (codeSeg << 4)) > SYS_SIZE) return FALSE; if (bios_checksum(vbiosMem, size)) xf86DrvMsg(scrnIndex, X_INFO, "Bad V_BIOS checksum\n"); return TRUE; } Bool initPrimary(const void *options) { Bool initPrimary = FALSE; if (!options) return FALSE; xf86GetOptValBool(options, OPT_INIT_PRIMARY, &initPrimary); return initPrimary; } BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt) { BusType location_type; EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex); location_type = pEnt->location.type; free(pEnt); return location_type; } #define CHECK_V_SEGMENT_RANGE(x) \ if (((x) << 4) < V_BIOS) { \ xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, \ "V_BIOS address 0x%lx out of range\n", \ (unsigned long)(x) << 4); \ return FALSE; \ } Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base) { unsigned i; int cs = ~0; int segments[4]; segments[0] = MEM_RW(pInt, (0x10 << 2) + 2); segments[1] = MEM_RW(pInt, (0x42 << 2) + 2); segments[2] = V_BIOS >> 4; segments[3] = ~0; for (i = 0; segments[i] != ~0; i++) { unsigned char *vbiosMem; cs = segments[i]; CHECK_V_SEGMENT_RANGE(cs); vbiosMem = (unsigned char *) base + (cs << 4); if (int10_check_bios(pInt->pScrn->scrnIndex, cs, vbiosMem)) { break; } } if (segments[i] == ~0) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "No V_BIOS found\n"); return FALSE; } xf86DrvMsg(pInt->pScrn->scrnIndex, X_INFO, "Primary V_BIOS segment is: 0x%lx\n", (unsigned long) cs); pInt->BIOSseg = cs; return TRUE; } xorg-server-21.1.16/hw/xfree86/int10/xf86int10.c0000644000175000017500000007717414757411105014326 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "compiler.h" #define _INT10_PRIVATE #include "xf86int10.h" #include "int10Defines.h" #include "Pci.h" #define REG pInt xf86Int10InfoPtr Int10Current = NULL; static int int1A_handler(xf86Int10InfoPtr pInt); #ifndef _PC static int int42_handler(xf86Int10InfoPtr pInt); #endif static int intE6_handler(xf86Int10InfoPtr pInt); static struct pci_device *findPci(xf86Int10InfoPtr pInt, unsigned short bx); static CARD32 pciSlotBX(const struct pci_device *pvp); int int_handler(xf86Int10InfoPtr pInt) { int num = pInt->num; int ret = 0; switch (num) { #ifndef _PC case 0x10: case 0x42: case 0x6D: if (getIntVect(pInt, num) == I_S_DEFAULT_INT_VECT) ret = int42_handler(pInt); break; #endif case 0x1A: ret = int1A_handler(pInt); break; case 0xe6: ret = intE6_handler(pInt); break; default: break; } if (!ret) ret = run_bios_int(num, pInt); if (!ret) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Halting on int 0x%2.2x!\n", num); dump_registers(pInt); stack_trace(pInt); } return ret; } #ifndef _PC /* * This is derived from a number of PC system BIOS'es. The intent here is to * provide very primitive video support, before an EGA/VGA BIOS installs its * own interrupt vector. Here, "Ignored" calls should remain so. "Not * Implemented" denotes functionality that can be implemented should the need * arise. What are "Not Implemented" throughout are video memory accesses. * Also, very little input validity checking is done here. */ static int int42_handler(xf86Int10InfoPtr pInt) { switch (X86_AH) { case 0x00: /* Set Video Mode */ /* Enter: AL = video mode number */ /* Leave: Nothing */ /* Implemented (except for clearing the screen) */ { /* Localise */ unsigned int ioport; int i; CARD16 int1d, regvals, tmp; CARD8 mode, cgamode, cgacolour; /* * Ignore all mode numbers but 0x00-0x13. Some systems also ignore * 0x0B and 0x0C, but don't do that here. */ if (X86_AL > 0x13) break; /* * You didn't think that was really the mode set, did you? There * are only so many slots in the video parameter table... */ mode = X86_AL; ioport = 0x03D4; switch (MEM_RB(pInt, 0x0410) & 0x30) { case 0x30: /* MDA */ mode = 0x07; /* Force mode to 0x07 */ ioport = 0x03B4; break; case 0x10: /* CGA 40x25 */ if (mode >= 0x07) mode = 0x01; break; case 0x20: /* CGA 80x25 (MCGA?) */ if (mode >= 0x07) mode = 0x03; break; case 0x00: /* EGA/VGA */ if (mode >= 0x07) /* Don't try MDA timings */ mode = 0x01; /* !?!?! */ break; } /* Locate data in video parameter table */ int1d = MEM_RW(pInt, 0x1d << 2); regvals = ((mode >> 1) << 4) + int1d; cgacolour = 0x30; if (mode == 0x06) { regvals -= 0x10; cgacolour = 0x3F; } /** Update BIOS Data Area **/ /* Video mode */ MEM_WB(pInt, 0x0449, mode); /* Columns */ tmp = MEM_RB(pInt, mode + int1d + 0x48); MEM_WW(pInt, 0x044A, tmp); /* Page length */ tmp = MEM_RW(pInt, (mode & 0x06) + int1d + 0x40); MEM_WW(pInt, 0x044C, tmp); /* Start Address */ MEM_WW(pInt, 0x044E, 0); /* Cursor positions, one for each display page */ for (i = 0x0450; i < 0x0460; i += 2) MEM_WW(pInt, i, 0); /* Cursor start & end scanlines */ tmp = MEM_RB(pInt, regvals + 0x0B); MEM_WB(pInt, 0x0460, tmp); tmp = MEM_RB(pInt, regvals + 0x0A); MEM_WB(pInt, 0x0461, tmp); /* Current display page number */ MEM_WB(pInt, 0x0462, 0); /* CRTC I/O address */ MEM_WW(pInt, 0x0463, ioport); /* CGA Mode register value */ cgamode = MEM_RB(pInt, mode + int1d + 0x50); MEM_WB(pInt, 0x0465, cgamode); /* CGA Colour register value */ MEM_WB(pInt, 0x0466, cgacolour); /* Rows */ MEM_WB(pInt, 0x0484, (25 - 1)); /* Program the mode */ pci_io_write8(pInt->io, ioport + 4, cgamode & 0x37); /* Turn off screen */ for (i = 0; i < 0x10; i++) { tmp = MEM_RB(pInt, regvals + i); pci_io_write8(pInt->io, ioport, i); pci_io_write8(pInt->io, ioport + 1, tmp); } pci_io_write8(pInt->io, ioport + 5, cgacolour); /* Select colour mode */ pci_io_write8(pInt->io, ioport + 4, cgamode); /* Turn on screen */ } break; case 0x01: /* Set Cursor Type */ /* Enter: CH = starting line for cursor */ /* CL = ending line for cursor */ /* Leave: Nothing */ /* Implemented */ { /* Localise */ unsigned int ioport = MEM_RW(pInt, 0x0463); MEM_WB(pInt, 0x0460, X86_CL); MEM_WB(pInt, 0x0461, X86_CH); pci_io_write8(pInt->io, ioport, 0x0A); pci_io_write8(pInt->io, ioport + 1, X86_CH); pci_io_write8(pInt->io, ioport, 0x0B); pci_io_write8(pInt->io, ioport + 1, X86_CL); } break; case 0x02: /* Set Cursor Position */ /* Enter: BH = display page number */ /* DH = row */ /* DL = column */ /* Leave: Nothing */ /* Implemented */ { /* Localise */ unsigned int ioport; CARD16 offset; MEM_WB(pInt, (X86_BH << 1) + 0x0450, X86_DL); MEM_WB(pInt, (X86_BH << 1) + 0x0451, X86_DH); if (X86_BH != MEM_RB(pInt, 0x0462)) break; offset = (X86_DH * MEM_RW(pInt, 0x044A)) + X86_DL; offset += MEM_RW(pInt, 0x044E) << 1; ioport = MEM_RW(pInt, 0x0463); pci_io_write8(pInt->io, ioport, 0x0E); pci_io_write8(pInt->io, ioport + 1, offset >> 8); pci_io_write8(pInt->io, ioport, 0x0F); pci_io_write8(pInt->io, ioport + 1, offset & 0xFF); } break; case 0x03: /* Get Cursor Position */ /* Enter: BH = display page number */ /* Leave: CH = starting line for cursor */ /* CL = ending line for cursor */ /* DH = row */ /* DL = column */ /* Implemented */ { /* Localise */ X86_CL = MEM_RB(pInt, 0x0460); X86_CH = MEM_RB(pInt, 0x0461); X86_DL = MEM_RB(pInt, (X86_BH << 1) + 0x0450); X86_DH = MEM_RB(pInt, (X86_BH << 1) + 0x0451); } break; case 0x04: /* Get Light Pen Position */ /* Enter: Nothing */ /* Leave: AH = 0x01 (down/triggered) or 0x00 (not) */ /* BX = pixel column */ /* CX = pixel row */ /* DH = character row */ /* DL = character column */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x04) -- Get Light Pen Position\n", pInt->num); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } X86_AH = X86_BX = X86_CX = X86_DX = 0; } break; case 0x05: /* Set Display Page */ /* Enter: AL = display page number */ /* Leave: Nothing */ /* Implemented */ { /* Localise */ unsigned int ioport = MEM_RW(pInt, 0x0463); CARD16 start; CARD8 x, y; /* Calculate new start address */ MEM_WB(pInt, 0x0462, X86_AL); start = X86_AL * MEM_RW(pInt, 0x044C); MEM_WW(pInt, 0x044E, start); start <<= 1; /* Update start address */ pci_io_write8(pInt->io, ioport, 0x0C); pci_io_write8(pInt->io, ioport + 1, start >> 8); pci_io_write8(pInt->io, ioport, 0x0D); pci_io_write8(pInt->io, ioport + 1, start & 0xFF); /* Switch cursor position */ y = MEM_RB(pInt, (X86_AL << 1) + 0x0450); x = MEM_RB(pInt, (X86_AL << 1) + 0x0451); start += (y * MEM_RW(pInt, 0x044A)) + x; /* Update cursor position */ pci_io_write8(pInt->io, ioport, 0x0E); pci_io_write8(pInt->io, ioport + 1, start >> 8); pci_io_write8(pInt->io, ioport, 0x0F); pci_io_write8(pInt->io, ioport + 1, start & 0xFF); } break; case 0x06: /* Initialise or Scroll Window Up */ /* Enter: AL = lines to scroll up */ /* BH = attribute for blank */ /* CH = upper y of window */ /* CL = left x of window */ /* DH = lower y of window */ /* DL = right x of window */ /* Leave: Nothing */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x06) -- Initialise or Scroll Window Up\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, " AL=0x%2.2x, BH=0x%2.2x," " CH=0x%2.2x, CL=0x%2.2x, DH=0x%2.2x, DL=0x%2.2x\n", X86_AL, X86_BH, X86_CH, X86_CL, X86_DH, X86_DL); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x07: /* Initialise or Scroll Window Down */ /* Enter: AL = lines to scroll down */ /* BH = attribute for blank */ /* CH = upper y of window */ /* CL = left x of window */ /* DH = lower y of window */ /* DL = right x of window */ /* Leave: Nothing */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x07) -- Initialise or Scroll Window Down\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, " AL=0x%2.2x, BH=0x%2.2x," " CH=0x%2.2x, CL=0x%2.2x, DH=0x%2.2x, DL=0x%2.2x\n", X86_AL, X86_BH, X86_CH, X86_CL, X86_DH, X86_DL); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x08: /* Read Character and Attribute at Cursor */ /* Enter: BH = display page number */ /* Leave: AH = attribute */ /* AL = character */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x08) -- Read Character and Attribute at" " Cursor\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "BH=0x%2.2x\n", X86_BH); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } X86_AX = 0; } break; case 0x09: /* Write Character and Attribute at Cursor */ /* Enter: AL = character */ /* BH = display page number */ /* BL = attribute (text) or colour (graphics) */ /* CX = replication count */ /* Leave: Nothing */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x09) -- Write Character and Attribute at" " Cursor\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x\n", X86_AL, X86_BH, X86_BL, X86_CX); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x0a: /* Write Character at Cursor */ /* Enter: AL = character */ /* BH = display page number */ /* BL = colour */ /* CX = replication count */ /* Leave: Nothing */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x0A) -- Write Character at Cursor\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x\n", X86_AL, X86_BH, X86_BL, X86_CX); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x0b: /* Set Palette, Background or Border */ /* Enter: BH = 0x00 or 0x01 */ /* BL = colour or palette (respectively) */ /* Leave: Nothing */ /* Implemented */ { /* Localise */ unsigned int ioport = MEM_RW(pInt, 0x0463) + 5; CARD8 cgacolour = MEM_RB(pInt, 0x0466); if (X86_BH) { cgacolour &= 0xDF; cgacolour |= (X86_BL & 0x01) << 5; } else { cgacolour &= 0xE0; cgacolour |= X86_BL & 0x1F; } MEM_WB(pInt, 0x0466, cgacolour); pci_io_write8(pInt->io, ioport, cgacolour); } break; case 0x0c: /* Write Graphics Pixel */ /* Enter: AL = pixel value */ /* BH = display page number */ /* CX = column */ /* DX = row */ /* Leave: Nothing */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x0C) -- Write Graphics Pixel\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "AL=0x%2.2x, BH=0x%2.2x, CX=0x%4.4x, DX=0x%4.4x\n", X86_AL, X86_BH, X86_CX, X86_DX); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x0d: /* Read Graphics Pixel */ /* Enter: BH = display page number */ /* CX = column */ /* DX = row */ /* Leave: AL = pixel value */ /* Not Implemented */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x0D) -- Read Graphics Pixel\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "BH=0x%2.2x, CX=0x%4.4x, DX=0x%4.4x\n", X86_BH, X86_CX, X86_DX); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } X86_AL = 0; } break; case 0x0e: /* Write Character in Teletype Mode */ /* Enter: AL = character */ /* BH = display page number */ /* BL = foreground colour */ /* Leave: Nothing */ /* Not Implemented */ /* WARNING: Emulation of BEL characters will require */ /* emulation of RTC and PC speaker I/O. */ /* Also, this recurses through int 0x10 */ /* which might or might not have been */ /* installed yet. */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x0E) -- Write Character in Teletype Mode\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "AL=0x%2.2x, BH=0x%2.2x, BL=0x%2.2x\n", X86_AL, X86_BH, X86_BL); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; case 0x0f: /* Get Video Mode */ /* Enter: Nothing */ /* Leave: AH = number of columns */ /* AL = video mode number */ /* BH = display page number */ /* Implemented */ { /* Localise */ X86_AH = MEM_RW(pInt, 0x044A); X86_AL = MEM_RB(pInt, 0x0449); X86_BH = MEM_RB(pInt, 0x0462); } break; case 0x10: /* Colour Control (subfunction in AL) */ /* Enter: Various */ /* Leave: Various */ /* Ignored */ break; case 0x11: /* Font Control (subfunction in AL) */ /* Enter: Various */ /* Leave: Various */ /* Ignored */ break; case 0x12: /* Miscellaneous (subfunction in BL) */ /* Enter: Various */ /* Leave: Various */ /* Ignored. Previous code here optionally allowed */ /* the enabling and disabling of VGA, but no system */ /* BIOS I've come across actually implements it. */ break; case 0x13: /* Write String in Teletype Mode */ /* Enter: AL = write mode */ /* BL = attribute (if (AL & 0x02) == 0) */ /* CX = string length */ /* DH = row */ /* DL = column */ /* ES:BP = string segment:offset */ /* Leave: Nothing */ /* Not Implemented */ /* WARNING: Emulation of BEL characters will require */ /* emulation of RTC and PC speaker I/O. */ /* Also, this recurses through int 0x10 */ /* which might or might not have been */ /* installed yet. */ { /* Localise */ xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x%2.2x(AH=0x13) -- Write String in Teletype Mode\n", pInt->num); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 3, "AL=0x%2.2x, BL=0x%2.2x, CX=0x%4.4x," " DH=0x%2.2x, DL=0x%2.2x, ES:BP=0x%4.4x:0x%4.4x\n", X86_AL, X86_BL, X86_CX, X86_DH, X86_DL, X86_ES, X86_BP); if (xf86GetVerbosity() > 3) { dump_registers(pInt); stack_trace(pInt); } } break; default: /* Various extensions */ /* Enter: Various */ /* Leave: Various */ /* Ignored */ break; } return 1; } #endif #define SUCCESSFUL 0x00 #define DEVICE_NOT_FOUND 0x86 #define BAD_REGISTER_NUMBER 0x87 #ifdef SHOW_ALL_DEVICES /** * These functions are meant to be used by the PCI BIOS emulation. Some * BIOSes need to see if there are \b other chips of the same type around so * by setting \c exclude one PCI device can be explicitly excluded, if * required. */ static struct pci_device * do_find(const struct pci_id_match *m, char n, const struct pci_device *exclude) { struct pci_device *dev; struct pci_device_iterator *iter; n++; iter = pci_id_match_iterator_create(m); while ((dev = pci_device_next(iter)) != NULL) { if ((dev != exclude) && !(--n)) { break; } } pci_iterator_destroy(iter); return dev; } static struct pci_device * find_pci_device_vendor(CARD16 vendorID, CARD16 deviceID, char n, const struct pci_device *exclude) { struct pci_id_match m; m.vendor_id = vendorID; m.device_id = deviceID; m.subvendor_id = PCI_MATCH_ANY; m.subdevice_id = PCI_MATCH_ANY; m.device_class = 0; m.device_class_mask = 0; return do_find(&m, n, exclude); } static struct pci_device * find_pci_class(CARD8 intf, CARD8 subClass, CARD16 _class, char n, const struct pci_device *exclude) { struct pci_id_match m; m.vendor_id = PCI_MATCH_ANY; m.device_id = PCI_MATCH_ANY; m.subvendor_id = PCI_MATCH_ANY; m.subdevice_id = PCI_MATCH_ANY; m.device_class = (((uint32_t) _class) << 16) | (((uint32_t) subClass) << 8) | intf; m.device_class_mask = 0x00ffffff; return do_find(&m, n, exclude); } #endif /* * Return the last bus number in the same domain as dev. Only look at the * one domain since this is going into %cl, and VGA I/O is per-domain anyway. */ static int int1A_last_bus_number(struct pci_device *dev) { struct pci_device *d; struct pci_slot_match m = { dev->domain, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY }; struct pci_device_iterator *iter; int i = 0; iter = pci_slot_match_iterator_create(&m); while ((d = pci_device_next(iter))) if (d->bus > i) i = d->bus; pci_iterator_destroy(iter); return i; } static int int1A_handler(xf86Int10InfoPtr pInt) { struct pci_device *const pvp = xf86GetPciInfoForEntity(pInt->entityIndex); struct pci_device *dev; if (pvp == NULL) return 0; /* oops */ #ifdef PRINT_INT ErrorF("int 0x1a: ax=0x%x bx=0x%x cx=0x%x dx=0x%x di=0x%x es=0x%x\n", X86_EAX, X86_EBX, X86_ECX, X86_EDX, X86_EDI, X86_ESI); #endif switch (X86_AX) { case 0xb101: X86_EAX &= 0xFF00; /* no config space/special cycle support */ X86_EDX = 0x20494350; /* " ICP" */ X86_EBX = 0x0210; /* Version 2.10 */ X86_ECX &= 0xFF00; X86_ECX |= int1A_last_bus_number(pvp); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ #ifdef PRINT_INT ErrorF("ax=0x%x dx=0x%x bx=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_EDX, X86_EBX, X86_ECX, X86_EFLAGS); #endif return 1; case 0xb102: if ((X86_DX == pvp->vendor_id) && (X86_CX == pvp->device_id) && (X86_ESI == 0)) { X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ X86_EBX = pciSlotBX(pvp); } #ifdef SHOW_ALL_DEVICES else if ((dev = find_pci_device_vendor(X86_EDX, X86_ECX, X86_ESI, pvp))) { X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ X86_EBX = pciSlotBX(dev); } #endif else { X86_EAX = X86_AL | (DEVICE_NOT_FOUND << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x bx=0x%x flags=0x%x\n", X86_EAX, X86_EBX, X86_EFLAGS); #endif return 1; case 0xb103: if ((X86_ECX & 0x00FFFFFF) == pvp->device_class) { X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EBX = pciSlotBX(pvp); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } #ifdef SHOW_ALL_DEVICES else if ((dev = find_pci_class(X86_CL, X86_CH, (X86_ECX & 0xffff0000) >> 16, X86_ESI, pvp))) { X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ X86_EBX = pciSlotBX(dev); } #endif else { X86_EAX = X86_AL | (DEVICE_NOT_FOUND << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS); #endif return 1; case 0xb108: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_read_u8(dev, &X86_CL, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS); #endif return 1; case 0xb109: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_read_u16(dev, &X86_CX, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS); #endif return 1; case 0xb10a: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_read_u32(dev, &X86_ECX, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x cx=0x%x flags=0x%x\n", X86_EAX, X86_ECX, X86_EFLAGS); #endif return 1; case 0xb10b: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_write_u8(dev, X86_CL, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS); #endif return 1; case 0xb10c: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_write_u16(dev, X86_CX, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS); #endif return 1; case 0xb10d: if ((dev = findPci(pInt, X86_EBX)) != NULL) { pci_device_cfg_write_u32(dev, X86_ECX, X86_DI); X86_EAX = X86_AL | (SUCCESSFUL << 8); X86_EFLAGS &= ~((unsigned long) 0x01); /* clear carry flag */ } else { X86_EAX = X86_AL | (BAD_REGISTER_NUMBER << 8); X86_EFLAGS |= ((unsigned long) 0x01); /* set carry flag */ } #ifdef PRINT_INT ErrorF("ax=0x%x flags=0x%x\n", X86_EAX, X86_EFLAGS); #endif return 1; default: xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_NOT_IMPLEMENTED, 2, "int 0x1a subfunction\n"); dump_registers(pInt); if (xf86GetVerbosity() > 3) stack_trace(pInt); return 0; } } static struct pci_device * findPci(xf86Int10InfoPtr pInt, unsigned short bx) { const unsigned bus = (bx >> 8) & 0x00FF; const unsigned dev = (bx >> 3) & 0x001F; const unsigned func = (bx) & 0x0007; return pci_device_find_by_slot(pInt->dev->domain, bus, dev, func); } static CARD32 pciSlotBX(const struct pci_device *pvp) { return ((pvp->bus << 8) & 0x00FF00) | (pvp->dev << 3) | (pvp->func); } /* * handle initialization */ static int intE6_handler(xf86Int10InfoPtr pInt) { struct pci_device *pvp; if ((pvp = xf86GetPciInfoForEntity(pInt->entityIndex))) X86_AX = (pvp->bus << 8) | (pvp->dev << 3) | (pvp->func & 0x7); pushw(pInt, X86_CS); pushw(pInt, X86_IP); X86_CS = pInt->BIOSseg; X86_EIP = 0x0003; X86_ES = 0; /* standard pc es */ return 1; } xorg-server-21.1.16/hw/xfree86/int10/xf86x86emu.c0000644000175000017500000000305414757411105014511 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" #define _INT10_PRIVATE #include "xf86int10.h" #include "int10Defines.h" #include #define M _X86EMU_env static void x86emu_do_int(int num) { Int10Current->num = num; if (!int_handler(Int10Current)) { X86EMU_halt_sys(); } } void xf86ExecX86int10(xf86Int10InfoPtr pInt) { int sig = setup_int(pInt); if (sig < 0) return; if (int_handler(pInt)) { X86EMU_exec(); } finish_int(pInt, sig); } Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt) { int i; X86EMU_intrFuncs intFuncs[256]; X86EMU_pioFuncs pioFuncs = { .inb = x_inb, .inw = x_inw, .inl = x_inl, .outb = x_outb, .outw = x_outw, .outl = x_outl }; X86EMU_memFuncs memFuncs = { (&Mem_rb), (&Mem_rw), (&Mem_rl), (&Mem_wb), (&Mem_ww), (&Mem_wl) }; X86EMU_setupMemFuncs(&memFuncs); pInt->cpuRegs = &M; M.mem_base = 0; M.mem_size = 1024 * 1024 + 1024; X86EMU_setupPioFuncs(&pioFuncs); for (i = 0; i < 256; i++) intFuncs[i] = x86emu_do_int; X86EMU_setupIntrFuncs(intFuncs); return TRUE; } void printk(const char *fmt, ...) { va_list argptr; va_start(argptr, fmt); VErrorF(fmt, argptr); va_end(argptr); } xorg-server-21.1.16/hw/xfree86/int10/generic.c0000644000175000017500000002761714757411105014270 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86_OSproc.h" #include "compiler.h" #define _INT10_PRIVATE #include "xf86int10.h" #include "int10Defines.h" #include "Pci.h" #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) #include /* needed for memmove */ static __inline__ uint32_t ldl_u(uint32_t * p) { uint32_t ret; memmove(&ret, p, sizeof(*p)); return ret; } static __inline__ uint16_t ldw_u(uint16_t * p) { uint16_t ret; memmove(&ret, p, sizeof(*p)); return ret; } static __inline__ void stl_u(uint32_t val, uint32_t * p) { uint32_t tmp = val; memmove(p, &tmp, sizeof(*p)); } static __inline__ void stw_u(uint16_t val, uint16_t * p) { uint16_t tmp = val; memmove(p, &tmp, sizeof(*p)); } static uint8_t read_b(xf86Int10InfoPtr pInt, int addr); static uint16_t read_w(xf86Int10InfoPtr pInt, int addr); static uint32_t read_l(xf86Int10InfoPtr pInt, int addr); static void write_b(xf86Int10InfoPtr pInt, int addr, uint8_t val); static void write_w(xf86Int10InfoPtr pInt, int addr, uint16_t val); static void write_l(xf86Int10InfoPtr pInt, int addr, uint32_t val); /* * the emulator cannot pass a pointer to the current xf86Int10InfoRec * to the memory access functions therefore store it here. */ typedef struct { int shift; int entries; void *base; void *vRam; int highMemory; void *sysMem; char *alloc; } genericInt10Priv; #define INTPriv(x) ((genericInt10Priv*)x->private) int10MemRec genericMem = { read_b, read_w, read_l, write_b, write_w, write_l }; static void MapVRam(xf86Int10InfoPtr pInt); static void UnmapVRam(xf86Int10InfoPtr pInt); #ifdef _PC #define GET_HIGH_BASE(x) (((V_BIOS + (x) + getpagesize() - 1)/getpagesize()) \ * getpagesize()) #endif static void *sysMem = NULL; static Bool readIntVec(struct pci_device *dev, unsigned char *buf, int len) { void *map; if (pci_device_map_legacy(dev, 0, len, 0, &map)) return FALSE; memcpy(buf, map, len); pci_device_unmap_legacy(dev, map, len); return TRUE; } xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { xf86Int10InfoPtr pInt; void *base = 0; void *vbiosMem = 0; void *options = NULL; legacyVGARec vga; ScrnInfoPtr pScrn; pScrn = xf86FindScreenForEntity(entityIndex); options = xf86HandleInt10Options(pScrn, entityIndex); if (int10skip(options)) { free(options); return NULL; } pInt = (xf86Int10InfoPtr) xnfcalloc(1, sizeof(xf86Int10InfoRec)); pInt->entityIndex = entityIndex; if (!xf86Int10ExecSetup(pInt)) goto error0; pInt->mem = &genericMem; pInt->private = (void *) xnfcalloc(1, sizeof(genericInt10Priv)); INTPriv(pInt)->alloc = (void *) xnfcalloc(1, ALLOC_ENTRIES(getpagesize())); pInt->pScrn = pScrn; base = INTPriv(pInt)->base = xnfalloc(SYS_BIOS); /* FIXME: Shouldn't this be a failure case? Leaving dev as NULL seems like * FIXME: an error */ pInt->dev = xf86GetPciInfoForEntity(entityIndex); /* * we need to map video RAM MMIO as some chipsets map mmio * registers into this range. */ MapVRam(pInt); #ifdef _PC if (!sysMem) pci_device_map_legacy(pInt->dev, V_BIOS, BIOS_SIZE + SYS_BIOS - V_BIOS, PCI_DEV_MAP_FLAG_WRITABLE, &sysMem); INTPriv(pInt)->sysMem = sysMem; if (!readIntVec(pInt->dev, base, LOW_PAGE_SIZE)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot read int vect\n"); goto error1; } /* * Retrieve everything between V_BIOS and SYS_BIOS as some system BIOSes * have executable code there. */ memset((char *) base + V_BIOS, 0, SYS_BIOS - V_BIOS); INTPriv(pInt)->highMemory = V_BIOS; if (xf86IsEntityPrimary(entityIndex) && !(initPrimary(options))) { if (!xf86int10GetBiosSegment(pInt, (unsigned char *) sysMem - V_BIOS)) goto error1; set_return_trap(pInt); pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH); if (!(pInt->Flags & SET_BIOS_SCRATCH)) pInt->Flags &= ~RESTORE_BIOS_SCRATCH; xf86Int10SaveRestoreBIOSVars(pInt, TRUE); } else { const BusType location_type = xf86int10GetBiosLocationType(pInt); int bios_location = V_BIOS; reset_int_vect(pInt); set_return_trap(pInt); switch (location_type) { case BUS_PCI:{ int err; struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); vbiosMem = (unsigned char *) base + bios_location; err = pci_device_read_rom(rom_device, vbiosMem); if (err) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot read V_BIOS (3) %s\n", strerror(err)); goto error1; } INTPriv(pInt)->highMemory = GET_HIGH_BASE(rom_device->rom_size); break; } default: goto error1; } pInt->BIOSseg = V_BIOS >> 4; pInt->num = 0xe6; LockLegacyVGA(pInt, &vga); xf86ExecX86int10(pInt); UnlockLegacyVGA(pInt, &vga); } #else if (!sysMem) { sysMem = xnfalloc(BIOS_SIZE); setup_system_bios(sysMem); } INTPriv(pInt)->sysMem = sysMem; setup_int_vect(pInt); set_return_trap(pInt); /* Retrieve the entire legacy video BIOS segment. This can be up to * 128KiB. */ vbiosMem = (char *) base + V_BIOS; memset(vbiosMem, 0, 2 * V_BIOS_SIZE); if (pci_device_read_rom(pInt->dev, vbiosMem) != 0 || pInt->dev->rom_size < V_BIOS_SIZE) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unable to retrieve all of segment 0x0C0000.\n"); } /* * If this adapter is the primary, use its post-init BIOS (if we can find * it). */ { int bios_location = V_BIOS; Bool done = FALSE; vbiosMem = (unsigned char *) base + bios_location; if (xf86IsEntityPrimary(entityIndex)) { if (int10_check_bios(pScrn->scrnIndex, bios_location >> 4, vbiosMem)) done = TRUE; else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "No legacy BIOS found -- trying PCI\n"); } if (!done) { int err; struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); err = pci_device_read_rom(rom_device, vbiosMem); if (err) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Cannot read V_BIOS (5) %s\n", strerror(err)); goto error1; } } } pInt->BIOSseg = V_BIOS >> 4; pInt->num = 0xe6; LockLegacyVGA(pInt, &vga); xf86ExecX86int10(pInt); UnlockLegacyVGA(pInt, &vga); #endif free(options); return pInt; error1: free(base); UnmapVRam(pInt); free(INTPriv(pInt)->alloc); free(pInt->private); error0: free(pInt); free(options); return NULL; } static void MapVRam(xf86Int10InfoPtr pInt) { int pagesize = getpagesize(); int size = ((VRAM_SIZE + pagesize - 1) / pagesize) * pagesize; pci_device_map_legacy(pInt->dev, V_RAM, size, PCI_DEV_MAP_FLAG_WRITABLE, &(INTPriv(pInt)->vRam)); pInt->io = pci_legacy_open_io(pInt->dev, 0, 64 * 1024); } static void UnmapVRam(xf86Int10InfoPtr pInt) { int pagesize = getpagesize(); int size = ((VRAM_SIZE + pagesize - 1) / pagesize) * pagesize; pci_device_unmap_legacy(pInt->dev, INTPriv(pInt)->vRam, size); pci_device_close_io(pInt->dev, pInt->io); pInt->io = NULL; } Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { /* nothing to do here */ return TRUE; } void xf86FreeInt10(xf86Int10InfoPtr pInt) { if (!pInt) return; #if defined (_PC) xf86Int10SaveRestoreBIOSVars(pInt, FALSE); #endif if (Int10Current == pInt) Int10Current = NULL; free(INTPriv(pInt)->base); UnmapVRam(pInt); free(INTPriv(pInt)->alloc); free(pInt->private); free(pInt); } void * xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) { int pagesize = getpagesize(); int num_pages = ALLOC_ENTRIES(pagesize); int i, j; for (i = 0; i < (num_pages - num); i++) { if (INTPriv(pInt)->alloc[i] == 0) { for (j = i; j < (num + i); j++) if (INTPriv(pInt)->alloc[j] != 0) break; if (j == (num + i)) break; i += num; } } if (i == (num_pages - num)) return NULL; for (j = i; j < (i + num); j++) INTPriv(pInt)->alloc[j] = 1; *off = (i + 1) * pagesize; return (char *) INTPriv(pInt)->base + *off; } void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) { int pagesize = getpagesize(); int first = (((char *) pbase - (char *) INTPriv(pInt)->base) / pagesize) - 1; int i; for (i = first; i < (first + num); i++) INTPriv(pInt)->alloc[i] = 0; } #define OFF(addr) ((addr) & 0xffff) #if defined _PC #define HIGH_OFFSET (INTPriv(pInt)->highMemory) #define HIGH_BASE V_BIOS #else #define HIGH_OFFSET SYS_BIOS #define HIGH_BASE SYS_BIOS #endif #define SYS(addr) ((addr) >= HIGH_OFFSET) #define V_ADDR(addr) \ (SYS(addr) ? ((char*)INTPriv(pInt)->sysMem) + (addr - HIGH_BASE) \ : (((char*)(INTPriv(pInt)->base) + addr))) #define VRAM_ADDR(addr) (addr - V_RAM) #define VRAM_BASE (INTPriv(pInt)->vRam) #define VRAM(addr) ((addr >= V_RAM) && (addr < (V_RAM + VRAM_SIZE))) #define V_ADDR_RB(addr) \ ((VRAM(addr)) ? MMIO_IN8((uint8_t*)VRAM_BASE,VRAM_ADDR(addr)) \ : *(uint8_t*) V_ADDR(addr)) #define V_ADDR_RW(addr) \ ((VRAM(addr)) ? MMIO_IN16((uint16_t*)VRAM_BASE,VRAM_ADDR(addr)) \ : ldw_u((void *)V_ADDR(addr))) #define V_ADDR_RL(addr) \ ((VRAM(addr)) ? MMIO_IN32((uint32_t*)VRAM_BASE,VRAM_ADDR(addr)) \ : ldl_u((void *)V_ADDR(addr))) #define V_ADDR_WB(addr,val) \ if(VRAM(addr)) \ MMIO_OUT8((uint8_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ *(uint8_t*) V_ADDR(addr) = val; #define V_ADDR_WW(addr,val) \ if(VRAM(addr)) \ MMIO_OUT16((uint16_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ stw_u((val),(void *)(V_ADDR(addr))); #define V_ADDR_WL(addr,val) \ if (VRAM(addr)) \ MMIO_OUT32((uint32_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ stl_u(val,(void *)(V_ADDR(addr))); static uint8_t read_b(xf86Int10InfoPtr pInt, int addr) { return V_ADDR_RB(addr); } static uint16_t read_w(xf86Int10InfoPtr pInt, int addr) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (OFF(addr + 1) > 0) return V_ADDR_RW(addr); #endif return V_ADDR_RB(addr) | (V_ADDR_RB(addr + 1) << 8); } static uint32_t read_l(xf86Int10InfoPtr pInt, int addr) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (OFF(addr + 3) > 2) return V_ADDR_RL(addr); #endif return V_ADDR_RB(addr) | (V_ADDR_RB(addr + 1) << 8) | (V_ADDR_RB(addr + 2) << 16) | (V_ADDR_RB(addr + 3) << 24); } static void write_b(xf86Int10InfoPtr pInt, int addr, uint8_t val) { V_ADDR_WB(addr, val); } static void write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (OFF(addr + 1) > 0) { V_ADDR_WW(addr, val); } #endif V_ADDR_WB(addr, val); V_ADDR_WB(addr + 1, val >> 8); } static void write_l(xf86Int10InfoPtr pInt, int addr, uint32_t val) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (OFF(addr + 3) > 2) { V_ADDR_WL(addr, val); } #endif V_ADDR_WB(addr, val); V_ADDR_WB(addr + 1, val >> 8); V_ADDR_WB(addr + 2, val >> 16); V_ADDR_WB(addr + 3, val >> 24); } void * xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr) { return V_ADDR(addr); } xorg-server-21.1.16/hw/xfree86/int10/x86emu.c0000644000175000017500000000027614757411105014000 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "debug.c" #include "decode.c" #include "fpu.c" #include "ops.c" #include "ops2.c" #include "prim_ops.c" #include "sys.c" xorg-server-21.1.16/hw/xfree86/int10/xf86x86emu.h0000644000175000017500000000231214757411105014512 /* * XFree86 int10 module * execute BIOS int 10h calls in x86 real mode environment * Copyright 1999 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef XF86X86EMU_H_ #define XF86X86EMU_H_ #include #define M _X86EMU_env #define X86_EAX M.x86.R_EAX #define X86_EBX M.x86.R_EBX #define X86_ECX M.x86.R_ECX #define X86_EDX M.x86.R_EDX #define X86_ESI M.x86.R_ESI #define X86_EDI M.x86.R_EDI #define X86_EBP M.x86.R_EBP #define X86_EIP M.x86.R_EIP #define X86_ESP M.x86.R_ESP #define X86_EFLAGS M.x86.R_EFLG #define X86_FLAGS M.x86.R_FLG #define X86_AX M.x86.R_AX #define X86_BX M.x86.R_BX #define X86_CX M.x86.R_CX #define X86_DX M.x86.R_DX #define X86_SI M.x86.R_SI #define X86_DI M.x86.R_DI #define X86_BP M.x86.R_BP #define X86_IP M.x86.R_IP #define X86_SP M.x86.R_SP #define X86_CS M.x86.R_CS #define X86_DS M.x86.R_DS #define X86_ES M.x86.R_ES #define X86_SS M.x86.R_SS #define X86_FS M.x86.R_FS #define X86_GS M.x86.R_GS #define X86_AL M.x86.R_AL #define X86_BL M.x86.R_BL #define X86_CL M.x86.R_CL #define X86_DL M.x86.R_DL #define X86_AH M.x86.R_AH #define X86_BH M.x86.R_BH #define X86_CH M.x86.R_CH #define X86_DH M.x86.R_DH #endif xorg-server-21.1.16/hw/xfree86/int10/INT10.HOWTO0000644000175000017500000003426414757411105014121 INT10 X86 Real Mode executor ============================= PRELIMINARY INT10 is a XFree86 module for soft-booting and executing real mode int10 BIOS calls. The BIOS call code is largely untested, yet. 1. Usage ======== To use the int10 module in a driver the header file xfree86/os-support/int10/xf86int10.h must be included. a. Initialization ----------------- The int10-executer gets initialized by calling: xf86Int10InfoPtr xf86InitInt10(int entityIndex); The function will soft-boot any non-primary device and return a pointer to a xf86Int10InfoRec on success. If anything fails or if int10 execution is disabled by an option in the device section NULL will be returned. The driver should store this pointer for later calls to other int10 module functions. b. Memory allocation -------------------- To allocate memory in the real mode execution environment void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off); can be called. It allocates num consecutive pagesize chunks. It returns the address of the allocated area. off is set to its offset in the real mode memory space. void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num); Is used to free num pages beginning at pbase. c. Doing int10 BIOS calls ------------------------- The BIOS call is executed by calling: void xf86ExecX86int10(xf86Int10InfoPtr pInt); The number of the interrupt (normally 10) and the initial values of the ax, bx, cx, dx, si, di and es x86-CPU registers can be set in the xf86Int10InfoRec passed to the function. On return this structure contains the exit values of the registers listed above and the CPU flag register. d. De-initializing ----------------- If no further int10 calls are required for a certain chipset the driver should call: void xf86FreeInt10(xf86Int10InfoPtr pInt); to free the memory allocated for real mode int10 calls. 2. Porting issues ================= The int10 real mode executor is designed to run on top of various x86 CPU emulators as well as in vm86 mode of a real x86 CPU. If used with a CPU emulator the emulator and CPU specific interfaces can be held separate thus requiring minimal efforts to port the int10 module to new platforms. Currently an interface to the x86emu real mode emulator is provided. Since details of setting up and running the vm86 mode is platform dependent both the platform dependent environment and the emulation layer have to be ported. Several helper functions are provided for that. A CPU emulator should meet certain requirements to be usable for the INT10 executor: 1. It must trap calls to intXX instructions and pass execution to an external function which is allowed to modify CPU registers including the instruction pointer (IP) before returning to the emulator for continuing execution. When the external function is called the IP must point to the instruction past the intXX call. 2. The emulator should use externally provided functions to handle PIO. 3. The emulator should be able to use externally provided functions to access memory from the real mode memory environment. Note, that the vm86 mode usually requires one hunk of consecutive memory starting at address 0 in the process virtual memory space. Thus if this mode is to be used, the OS environment has to be able to provide that, ie. it must be able to remap the processes virtual memory space onto itself. If the emulator is able to handle memory access through externally provided functions the real mode process memory can be located anywhere in the processes virtual memory. It does not even have to be consecutive. 4. The executor should terminate on encountering a 'hlt' instruction. Functions to implement: To simplify development the code has been split into a general setup part and an emulator specific one. A generic setup code is provided in generic.c. It should be usable with any emulator satisfying the conditions mentioned above. Therefore the following section on int10 setup may be skipped when porting int10 to new emulator. If the vm86() is to be used no memory access functions can be used. Therefore the layout of the real mode memory image has to meet certain requirements. Therefore when porting to other platforms a new setup code may have to be designed, too. The following section will give guidelines how this may be done. A sample implementation using SysV IPC to map the appropriate real mode memory image to address 0 in virtual address space just prior to execution may be found in xfree86/os-support/linux/int10/linux.c. On non-PC like platforms emulation of certain PC features such as initialization of BIOS int vectors, sys_BIOS constants or PCI config method 1 can be turned on by defining _PC. I. Setup Code ------------- This sets up the real mode memory image, calls the emulator to POST the chipset if required and maintains memory allocations in real mode address space. 1. xf86Int10InfoPtr xf86InitInt10(int entityIndex); This function should first find the screen assigned to the entity carrying entitiyIndex and then call Bool int10skip(ScrnInfoPtr pScrn) to find out if the user has requested not to initialize int10. If so xf86InitInt10() should return NULL. Otherwise an xf86Int10InfoRec should be allocated. This structure contains the following fields: a. int entityIndex - index of the entity whose BIOS is to be executed. b. int scrnIndex - index of the screen assigned the entity. c. pointer cpuRegs - pointer to a emulator/vm86-mode private structure. May hold cpu register values for the emulator. d. CARD16 BIOSseg - Video BIOS segment address. e. pointer private - pointer to a os specific data structure. f. struct _int10Mem* - pointer to a structure to hold the memory access functions for use by an emulator. g. int num - number of the int to be called. h. int ax..es,flags - CPU register values to pass to int-call. The Init function should initialize a-f. To initialize the emulator specific execute environment the function Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt) should be called. If this function returns FALSE any already allocated memory should be freed and xf86Int10Init(0 should exit returning NULL. If the platform has a PC like system BIOS it may be copied to or mapped into memory locations SYS_BIOS to SYS_SIZE-1 of the real mode memory environment of this process. Otherwise the helper function: int setup_system_bios(CARD32 base_addr); may be called to set up a rudimentary system BIOS sufficient to be used to boot video BIOSes. base_addr specifies the virtual address corresponding to SYS_BIOS in the real mode environment. If a PC-like int vector and BIOS data area is available it should be copied to 0 to LOW_PAGE_SIZE of the entities real mode environment. In this case the video interrupt related entries should be reset for all non-primary cards by calling: void reset_int_vect(xf86Int10InfoPtr pInt); To initialize the correct video BIOS entry points the BIOS must be warm-booted. If no PC-like int vector is available one can be set up by calling void setup_int_vect(xf86Int10InfoPtr pInt); In this case the video BIOS has to be warm-booted always. If the video BIOS for this entity has been installed during boot it may be mapped (or copied) directly to the correct address in the real mode memory environment. Otherwise int mapPciRom(xf86Int10InfoPtr pInt, unsigned char * address); should be called to copy the BIOS image from PCI ROM. 'address' specifies the address this image should be copied to. Sufficient space to hold an entire BIOS image should be allocated prior to calling mapPciRom(). This function will return the size of the BIOS image in bytes if it was able to successfully copy the image and 0 otherwise. To create a well defined point to exit the softbooter void set_return_trap(xf86Int10Ptr pInt); may be called. It sets up a 'hlt' instruction in the emulator memory just above the BIOS variable area. Before entering real mode execution this address will be pushed onto the return stack. If the BIOS needs to be warm-booted this should be done before leaving xf86InitInt10() by setting num in the xf86Int10InfoRec to 0xe6 and calling void xf86ExecX86int10(xf86Int10IfoPtr pInt); The implementation of this function will be discussed below. This function should be wrapped by calls to void LockLegacyVGA(screen, legacyVGAPtr vga); and void UnlockLegacyVGA(screen, legacyVGAPtr vga); The struct vga is used to hold the state of the legacy VGA access registers if a legacy VGA device exists. xf86InitInt10() should return a pointer to the xf86Int10InfoRec allocated. 2. Bool MapCurrentInt10(xf86Int10InfoPtr pInt); In case a platform specific mapping has to be performed to map the memory allocated for the real mode memory environment into a specific location prior to executing the x86 real mode code a function Bool MapCurrentInt10(xf86Int10InfoPtr pInt); has to be provided. It will be called by a helper function whenever the active entity changes. If the vm86 mode is used it is most likely that the 1MB real mode memory space located somewhere in the processes virtual memory will have to be remapped to address 0 of the virtual memory space. 3. void xf86FreeInt10(xf86Int10InfoPtr pInt); To free all memory allocated for video BIOS calls of a specific entity the function void xf86FreeInt10(xf86Int10InfoPtr pInt); should be provided. If the entity to be freed was mapped by MapCurrentInt10() this mapping needs to be undone also. 4. void * xf86Int10AllocPages(xf86Int10InfoPtr pInt,int num, int *off) void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) xf86Int10AllocPages() should allocate 'num' consecutive page-size chunks of memory. In real mode memory space this range needs to occupy consecutive addresses, too. The function must return the address of this memory. The offset in real mode memory needs to be returned in 'off'. If no block of 'num' pages are available the function should return NULL. xf86Int10FreePages() will free the 'num' pages starting at 'pbase'. 'num' is equal to the number of pages allocated by a single xf86Int10AllocatePages() call. 'pbase' is the address of the range previously returned by xf86Int10AllocatePages(). II. Emulator specific functions ------------------------------- 1. Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt); This function will be called from xf86InitInt10(). It may be used to set up the static emulator specific part of the real mode environment. On success it should return TRUE. 2. xf86ExecX86int10(xf86Int10InfoPtr pInt); This function gets called to execute an int call. It may call the helper function: void setup_int(xf86Int10InfoPrt pInt); to copy the register values to the emulator specific locations and to set up the non-static real mode execution environment. On return from setup_int() 'Int10Current' holds a pointer to the current xf86Int10InfoRec. It should start execution by calling Bool int_handler(xf86Int10InfoPtr pInt); and if this function returns TRUE it should call whatever necessary to continue execution until a 'hlt' instruction is encountered. To copy the resulting register values back to the xf86Int10InfoRec structure void finish_int(xf86Int10InfoPtr pInt); should be called. Helper functions are provided to aid the implementation of a vm86 call: Bool vm86_GP_fault(xf86Int10InfoPtr pInt); This function handles instructions which cause a vm86 call to trap. PIO access is handled by the in/out calls as defined in compiler.h. Optionally the PIO instructions can be logged by defining PRINT_PORT in xf86int10.h. This is meant for debugging purposes. Unknown instructions and 'hlt' cause vm86_GP_fault() to return FALSE. Otherwise TRUE is returned. Note: This function is currently based on the Linux vm86 call. It might have to be modified or even rewritten for other OS. So your mileage may vary. Functions to dump memory, code, xf86 CPU register values and stack are also provided. Take a look at helper.c To view a memory range the function void dprint(unsigned long start, unsigned long size) is provided. The use should be self explanatory. Register and memory access functions are provided in helper_mem.c. The PIO register access functions can trap access to PCI config space access register (config method 1) if _PC is not defined. A header file 'defines.h' is required to define OS/emulator specific ways to access memory and xf86 CPU registers: Defines need to be provided for memory byte/work/long read/write access (MEM_RB(name,addr),MEM_RW(name,addr),MEM_RL(name,addr), MEM_WB(name,addr,val),MEM_WL(name,addr,val),MEM_WL(name,addr,val)) of the real mode memory environment. 'name' will contain a pointer to the current xf86Int10InfoRec. Currently defines are available for vm86-mode under Linux and x86emu. They may be activated by defining _X86EMU or _VM86_LINUX respectively. Note: Emulators usually are not able to pass this pointer when calling memory access functions. In this case a global variable should be defined which can hold this pointer. This variable can be set in MapCurrentInt10(). It also must be set in xf86InitInt10() if this function calls the memory access functions either directly or by calling xf86ExecX86int10(pInt). Defines to access the emulator specific xf86 CPU register locations are also required: X86_EAX,...,X86_EFLAGS for access of the full 32 bit registers, X86_AX...X86_FLAGS for access of the 16 bit registers and XF86_AL,XF86_BL,XF86_CL,XF86_DL to access the lower byte of the AX,BX,CX and DX register. $XFree86: xc/programs/Xserver/hw/xfree86/int10/INT10.HOWTO,v 1.2 2000/02/08 13:13:22 eich Exp $ xorg-server-21.1.16/hw/xfree86/loader/0000755000175000017500000000000014757411134013070 5xorg-server-21.1.16/hw/xfree86/loader/symbol-test.c0000644000175000017500000000341214757411105015434 /* * Copyright © 2017 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Small test program to see if we can successfully resolve all * symbols of a set of X.Org modules when they're loaded in order. */ #include #include #include int main (int argc, char**argv) { void *ret; if (argc < 2) { fprintf(stderr, "Must pass path any modules to be loaded.\n"); exit(1); } for (int i = 1; i < argc; i++) { fprintf(stderr, "opening %s\n", argv[i]); ret = dlopen(argv[i], RTLD_GLOBAL | RTLD_NOW); if (!ret) { fprintf(stderr, "dlopen error: %s\n", dlerror()); exit(1); } } return 0; } xorg-server-21.1.16/hw/xfree86/loader/meson.build0000644000175000017500000000051414757411105015150 srcs_xorg_loader = [ 'loader.c', 'loadmod.c', ] xorg_loader = static_library('xorg_loader', srcs_xorg_loader, include_directories: [inc, xorg_inc], dependencies: [common_dep, dl_dep], c_args: xorg_c_args, ) xorg_symbol_test = executable('xorg_symbol_test', 'symbol-test.c', dependencies: dl_dep, ) xorg-server-21.1.16/hw/xfree86/loader/Makefile.am0000644000175000017500000000065514757411105015050 noinst_LTLIBRARIES = libloader.la AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../parser \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac -I$(srcdir)/../dri -I$(srcdir)/../dri2 #AM_LDFLAGS = -r AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ loader.h \ loaderProcs.h libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadmod.c libloader_la_LIBADD = $(DLOPEN_LIBS) xorg-server-21.1.16/hw/xfree86/loader/Makefile.in0000644000175000017500000006170514757411115015065 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/loader ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libloader_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libloader_la_OBJECTS = loader.lo loadmod.lo libloader_la_OBJECTS = $(am_libloader_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/loader.Plo ./$(DEPDIR)/loadmod.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libloader_la_SOURCES) DIST_SOURCES = $(libloader_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libloader.la AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../parser \ -I$(srcdir)/../ddc -I$(srcdir)/../i2c -I$(srcdir)/../modes \ -I$(srcdir)/../ramdac -I$(srcdir)/../dri -I$(srcdir)/../dri2 #AM_LDFLAGS = -r AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = \ loader.h \ loaderProcs.h libloader_la_SOURCES = \ loader.c \ loaderProcs.h \ loadmod.c libloader_la_LIBADD = $(DLOPEN_LIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/loader/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/loader/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libloader.la: $(libloader_la_OBJECTS) $(libloader_la_DEPENDENCIES) $(EXTRA_libloader_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libloader_la_OBJECTS) $(libloader_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loader.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/loadmod.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/loader.Plo -rm -f ./$(DEPDIR)/loadmod.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/loader.Plo -rm -f ./$(DEPDIR)/loadmod.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/loader/loader.c0000644000175000017500000001313114757411105014417 /* * Copyright 1995-1998 by Metro Link, Inc. * * 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 Metro Link, Inc. not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Metro Link, Inc. makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL METRO LINK, INC. 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 (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "loader.h" #include "loaderProcs.h" #ifdef HAVE_DLFCN_H #include #include #else #error i have no dynamic linker and i must scream #endif #ifndef XORG_NO_SDKSYMS extern void *xorg_symbols[]; #endif void LoaderInit(void) { #ifndef XORG_NO_SDKSYMS LogMessageVerb(X_INFO, 2, "Loader magic: %p\n", (void *) xorg_symbols); #endif LogMessageVerb(X_INFO, 2, "Module ABI versions:\n"); LogWrite(2, "\t%s: %d.%d\n", ABI_CLASS_ANSIC, GET_ABI_MAJOR(LoaderVersionInfo.ansicVersion), GET_ABI_MINOR(LoaderVersionInfo.ansicVersion)); LogWrite(2, "\t%s: %d.%d\n", ABI_CLASS_VIDEODRV, GET_ABI_MAJOR(LoaderVersionInfo.videodrvVersion), GET_ABI_MINOR(LoaderVersionInfo.videodrvVersion)); LogWrite(2, "\t%s : %d.%d\n", ABI_CLASS_XINPUT, GET_ABI_MAJOR(LoaderVersionInfo.xinputVersion), GET_ABI_MINOR(LoaderVersionInfo.xinputVersion)); LogWrite(2, "\t%s : %d.%d\n", ABI_CLASS_EXTENSION, GET_ABI_MAJOR(LoaderVersionInfo.extensionVersion), GET_ABI_MINOR(LoaderVersionInfo.extensionVersion)); } /* Public Interface to the loader. */ void * LoaderOpen(const char *module, int *errmaj) { void *ret; #if defined(DEBUG) ErrorF("LoaderOpen(%s)\n", module); #endif LogMessage(X_INFO, "Loading %s\n", module); if (!(ret = dlopen(module, RTLD_LAZY | RTLD_GLOBAL))) { LogMessage(X_ERROR, "Failed to load %s: %s\n", module, dlerror()); if (errmaj) *errmaj = LDR_NOLOAD; return NULL; } return ret; } void * LoaderSymbol(const char *name) { static void *global_scope = NULL; void *p; p = dlsym(RTLD_DEFAULT, name); if (p != NULL) return p; if (!global_scope) global_scope = dlopen(NULL, RTLD_LAZY | RTLD_GLOBAL); if (global_scope) return dlsym(global_scope, name); return NULL; } void * LoaderSymbolFromModule(void *handle, const char *name) { ModuleDescPtr mod = handle; return dlsym(mod->handle, name); } void LoaderUnload(const char *name, void *handle) { LogMessageVerbSigSafe(X_INFO, 1, "Unloading %s\n", name); if (handle) dlclose(handle); } unsigned long LoaderOptions = 0; void LoaderSetOptions(unsigned long opts) { LoaderOptions |= opts; } Bool LoaderShouldIgnoreABI(void) { return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0; } int LoaderGetABIVersion(const char *abiclass) { struct { const char *name; int version; } classes[] = { {ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion}, {ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion}, {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, {NULL, 0} }; int i; for (i = 0; classes[i].name; i++) { if (!strcmp(classes[i].name, abiclass)) { return classes[i].version; } } return 0; } xorg-server-21.1.16/hw/xfree86/loader/loaderProcs.h0000644000175000017500000000722514757411105015442 /* * Copyright 1995-1998 by Metro Link, Inc. * * 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 Metro Link, Inc. not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Metro Link, Inc. makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL METRO LINK, INC. 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 (c) 1997-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _LOADERPROCS_H #define _LOADERPROCS_H #include "xf86Module.h" typedef struct module_desc { struct module_desc *child; struct module_desc *sib; struct module_desc *parent; void *handle; ModuleSetupProc SetupProc; ModuleTearDownProc TearDownProc; void *TearDownData; /* returned from SetupProc */ const XF86ModuleVersionInfo *VersionInfo; } ModuleDesc, *ModuleDescPtr; /* External API for the loader */ void LoaderInit(void); ModuleDescPtr LoadModule(const char *, void *, const XF86ModReqInfo *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); void UnloadDriver(ModuleDescPtr); void LoaderSetPath(const char *path); void LoaderUnload(const char *, void *); unsigned long LoaderGetModuleVersion(ModuleDescPtr mod); void LoaderResetOptions(void); void LoaderSetOptions(unsigned long); const char **LoaderListDir(const char *, const char **); /* Options for LoaderSetOptions */ #define LDR_OPT_ABI_MISMATCH_NONFATAL 0x0001 #endif /* _LOADERPROCS_H */ xorg-server-21.1.16/hw/xfree86/loader/loadmod.c0000644000175000017500000007337614757411105014611 /* * Copyright 1995-1998 by Metro Link, Inc. * * 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 Metro Link, Inc. not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Metro Link, Inc. makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL METRO LINK, INC. 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 (c) 1997-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "dix.h" #include "os.h" #include "loaderProcs.h" #include "xf86Module.h" #include "loader.h" #include #include #include #include #include typedef struct _pattern { const char *pattern; regex_t rex; } PatternRec, *PatternPtr; /* Prototypes for static functions */ static char *FindModule(const char *, const char *, PatternPtr); static Bool CheckVersion(const char *, XF86ModuleVersionInfo *, const XF86ModReqInfo *); static char *LoaderGetCanonicalName(const char *, PatternPtr); static void RemoveChild(ModuleDescPtr); const ModuleVersions LoaderVersionInfo = { XORG_VERSION_CURRENT, ABI_ANSIC_VERSION, ABI_VIDEODRV_VERSION, ABI_XINPUT_VERSION, ABI_EXTENSION_VERSION, }; static int ModuleDuplicated[] = { }; static void FreeStringList(char **paths) { char **p; if (!paths) return; for (p = paths; *p; p++) free(*p); free(paths); } static char **defaultPathList = NULL; static Bool PathIsAbsolute(const char *path) { return *path == '/'; } /* * Convert a comma-separated path into a NULL-terminated array of path * elements, rejecting any that are not full absolute paths, and appending * a '/' when it isn't already present. */ static char ** InitPathList(const char *path) { char *fullpath = NULL; char *elem = NULL; char **list = NULL, **save = NULL; int len; int addslash; int n = 0; fullpath = strdup(path); if (!fullpath) return NULL; elem = strtok(fullpath, ","); while (elem) { if (PathIsAbsolute(elem)) { len = strlen(elem); addslash = (elem[len - 1] != '/'); if (addslash) len++; save = list; list = reallocarray(list, n + 2, sizeof(char *)); if (!list) { if (save) { save[n] = NULL; FreeStringList(save); } free(fullpath); return NULL; } list[n] = malloc(len + 1); if (!list[n]) { FreeStringList(list); free(fullpath); return NULL; } strcpy(list[n], elem); if (addslash) { list[n][len - 1] = '/'; list[n][len] = '\0'; } n++; } elem = strtok(NULL, ","); } if (list) list[n] = NULL; free(fullpath); return list; } void LoaderSetPath(const char *path) { if (!path) return; FreeStringList(defaultPathList); defaultPathList = InitPathList(path); } /* Standard set of module subdirectories to search, in order of preference */ static const char *stdSubdirs[] = { "", "input/", "drivers/", "extensions/", NULL }; /* * Standard set of module name patterns to check, in order of preference * These are regular expressions (suitable for use with POSIX regex(3)). * * This list assumes that you're an ELFish platform and therefore your * shared libraries are named something.so. If we're ever nuts enough * to port this DDX to, say, Darwin, we'll need to fix this. */ static PatternRec stdPatterns[] = { #ifdef __CYGWIN__ {"^cyg(.*)\\.dll$",}, {"(.*)_drv\\.dll$",}, {"(.*)\\.dll$",}, #else {"^lib(.*)\\.so$",}, {"(.*)_drv\\.so$",}, {"(.*)\\.so$",}, #endif {NULL,} }; static PatternPtr InitPatterns(const char **patternlist) { char errmsg[80]; int i, e; PatternPtr patterns = NULL; PatternPtr p = NULL; static int firstTime = 1; const char **s; if (firstTime) { /* precompile stdPatterns */ firstTime = 0; for (p = stdPatterns; p->pattern; p++) if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) { regerror(e, &p->rex, errmsg, sizeof(errmsg)); FatalError("InitPatterns: regcomp error for `%s': %s\n", p->pattern, errmsg); } } if (patternlist) { for (i = 0, s = patternlist; *s; i++, s++) if (*s == DEFAULT_LIST) i += ARRAY_SIZE(stdPatterns) - 1 - 1; patterns = xallocarray(i + 1, sizeof(PatternRec)); if (!patterns) { return NULL; } for (i = 0, s = patternlist; *s; i++, s++) if (*s != DEFAULT_LIST) { p = patterns + i; p->pattern = *s; if ((e = regcomp(&p->rex, p->pattern, REG_EXTENDED)) != 0) { regerror(e, &p->rex, errmsg, sizeof(errmsg)); ErrorF("InitPatterns: regcomp error for `%s': %s\n", p->pattern, errmsg); i--; } } else { for (p = stdPatterns; p->pattern; p++, i++) patterns[i] = *p; if (p != stdPatterns) i--; } patterns[i].pattern = NULL; } else patterns = stdPatterns; return patterns; } static void FreePatterns(PatternPtr patterns) { if (patterns && patterns != stdPatterns) free(patterns); } static char * FindModuleInSubdir(const char *dirpath, const char *module) { struct dirent *direntry = NULL; DIR *dir = NULL; char *ret = NULL, tmpBuf[PATH_MAX]; struct stat stat_buf; dir = opendir(dirpath); if (!dir) return NULL; while ((direntry = readdir(dir))) { if (direntry->d_name[0] == '.') continue; snprintf(tmpBuf, PATH_MAX, "%s%s/", dirpath, direntry->d_name); /* the stat with the appended / fails for normal files, and works for sub dirs fine, looks a bit strange in strace but does seem to work */ if ((stat(tmpBuf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) { if ((ret = FindModuleInSubdir(tmpBuf, module))) break; continue; } #ifdef __CYGWIN__ snprintf(tmpBuf, PATH_MAX, "cyg%s.dll", module); #else snprintf(tmpBuf, PATH_MAX, "lib%s.so", module); #endif if (strcmp(direntry->d_name, tmpBuf) == 0) { if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) ret = NULL; break; } #ifdef __CYGWIN__ snprintf(tmpBuf, PATH_MAX, "%s_drv.dll", module); #else snprintf(tmpBuf, PATH_MAX, "%s_drv.so", module); #endif if (strcmp(direntry->d_name, tmpBuf) == 0) { if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) ret = NULL; break; } #ifdef __CYGWIN__ snprintf(tmpBuf, PATH_MAX, "%s.dll", module); #else snprintf(tmpBuf, PATH_MAX, "%s.so", module); #endif if (strcmp(direntry->d_name, tmpBuf) == 0) { if (asprintf(&ret, "%s%s", dirpath, tmpBuf) == -1) ret = NULL; break; } } closedir(dir); return ret; } static char * FindModule(const char *module, const char *dirname, PatternPtr patterns) { char buf[PATH_MAX + 1]; char *name = NULL; const char **s; if (strlen(dirname) > PATH_MAX) return NULL; for (s = stdSubdirs; *s; s++) { snprintf(buf, PATH_MAX, "%s%s", dirname, *s); if ((name = FindModuleInSubdir(buf, module))) break; } return name; } const char ** LoaderListDir(const char *subdir, const char **patternlist) { char buf[PATH_MAX + 1]; char **pathlist; char **elem; PatternPtr patterns = NULL; PatternPtr p; DIR *d; struct dirent *dp; regmatch_t match[2]; struct stat stat_buf; int len, dirlen; char *fp; char **listing = NULL; char **save; char **ret = NULL; int n = 0; if (!(pathlist = defaultPathList)) return NULL; if (!(patterns = InitPatterns(patternlist))) goto bail; for (elem = pathlist; *elem; elem++) { dirlen = snprintf(buf, PATH_MAX, "%s/%s", *elem, subdir); fp = buf + dirlen; if (stat(buf, &stat_buf) == 0 && S_ISDIR(stat_buf.st_mode) && (d = opendir(buf))) { if (buf[dirlen - 1] != '/') { buf[dirlen++] = '/'; fp++; } while ((dp = readdir(d))) { if (dirlen + strlen(dp->d_name) > PATH_MAX) continue; strcpy(fp, dp->d_name); if (!(stat(buf, &stat_buf) == 0 && S_ISREG(stat_buf.st_mode))) continue; for (p = patterns; p->pattern; p++) { if (regexec(&p->rex, dp->d_name, 2, match, 0) == 0 && match[1].rm_so != -1) { len = match[1].rm_eo - match[1].rm_so; save = listing; listing = reallocarray(listing, n + 2, sizeof(char *)); if (!listing) { if (save) { save[n] = NULL; FreeStringList(save); } closedir(d); goto bail; } listing[n] = malloc(len + 1); if (!listing[n]) { FreeStringList(listing); closedir(d); goto bail; } strncpy(listing[n], dp->d_name + match[1].rm_so, len); listing[n][len] = '\0'; n++; break; } } } closedir(d); } } if (listing) listing[n] = NULL; ret = listing; bail: FreePatterns(patterns); return (const char **) ret; } static Bool CheckVersion(const char *module, XF86ModuleVersionInfo * data, const XF86ModReqInfo * req) { int vercode[4]; long ver = data->xf86version; MessageType errtype; LogMessage(X_INFO, "Module %s: vendor=\"%s\"\n", data->modname ? data->modname : "UNKNOWN!", data->vendor ? data->vendor : "UNKNOWN!"); vercode[0] = ver / 10000000; vercode[1] = (ver / 100000) % 100; vercode[2] = (ver / 1000) % 100; vercode[3] = ver % 1000; LogWrite(1, "\tcompiled for %d.%d.%d", vercode[0], vercode[1], vercode[2]); if (vercode[3] != 0) LogWrite(1, ".%d", vercode[3]); LogWrite(1, ", module version = %d.%d.%d\n", data->majorversion, data->minorversion, data->patchlevel); if (data->moduleclass) LogWrite(2, "\tModule class: %s\n", data->moduleclass); ver = -1; if (data->abiclass) { int abimaj, abimin; int vermaj, vermin; if (!strcmp(data->abiclass, ABI_CLASS_ANSIC)) ver = LoaderVersionInfo.ansicVersion; else if (!strcmp(data->abiclass, ABI_CLASS_VIDEODRV)) ver = LoaderVersionInfo.videodrvVersion; else if (!strcmp(data->abiclass, ABI_CLASS_XINPUT)) ver = LoaderVersionInfo.xinputVersion; else if (!strcmp(data->abiclass, ABI_CLASS_EXTENSION)) ver = LoaderVersionInfo.extensionVersion; abimaj = GET_ABI_MAJOR(data->abiversion); abimin = GET_ABI_MINOR(data->abiversion); LogWrite(2, "\tABI class: %s, version %d.%d\n", data->abiclass, abimaj, abimin); if (ver != -1) { vermaj = GET_ABI_MAJOR(ver); vermin = GET_ABI_MINOR(ver); if (abimaj != vermaj) { if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) errtype = X_WARNING; else errtype = X_ERROR; LogMessageVerb(errtype, 0, "%s: module ABI major version (%d) " "doesn't match the server's version (%d)\n", module, abimaj, vermaj); if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)) return FALSE; } else if (abimin > vermin) { if (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) errtype = X_WARNING; else errtype = X_ERROR; LogMessageVerb(errtype, 0, "%s: module ABI minor version (%d) " "is newer than the server's version (%d)\n", module, abimin, vermin); if (!(LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL)) return FALSE; } } } /* Check against requirements that the caller has specified */ if (req) { if (data->majorversion != req->majorversion) { LogMessageVerb(X_WARNING, 2, "%s: module major version (%d) " "doesn't match required major version (%d)\n", module, data->majorversion, req->majorversion); return FALSE; } else if (data->minorversion < req->minorversion) { LogMessageVerb(X_WARNING, 2, "%s: module minor version (%d) is " "less than the required minor version (%d)\n", module, data->minorversion, req->minorversion); return FALSE; } else if (data->minorversion == req->minorversion && data->patchlevel < req->patchlevel) { LogMessageVerb(X_WARNING, 2, "%s: module patch level (%d) " "is less than the required patch level " "(%d)\n", module, data->patchlevel, req->patchlevel); return FALSE; } if (req->moduleclass) { if (!data->moduleclass || strcmp(req->moduleclass, data->moduleclass)) { LogMessageVerb(X_WARNING, 2, "%s: Module class (%s) doesn't " "match the required class (%s)\n", module, data->moduleclass ? data->moduleclass : "", req->moduleclass); return FALSE; } } else if (req->abiclass != ABI_CLASS_NONE) { if (!data->abiclass || strcmp(req->abiclass, data->abiclass)) { LogMessageVerb(X_WARNING, 2, "%s: ABI class (%s) doesn't match" " the required ABI class (%s)\n", module, data->abiclass ? data->abiclass : "", req->abiclass); return FALSE; } } if (req->abiclass != ABI_CLASS_NONE) { int reqmaj, reqmin, maj, min; reqmaj = GET_ABI_MAJOR(req->abiversion); reqmin = GET_ABI_MINOR(req->abiversion); maj = GET_ABI_MAJOR(data->abiversion); min = GET_ABI_MINOR(data->abiversion); if (maj != reqmaj) { LogMessageVerb(X_WARNING, 2, "%s: ABI major version (%d) " "doesn't match the required ABI major version " "(%d)\n", module, maj, reqmaj); return FALSE; } /* XXX Maybe this should be the other way around? */ if (min > reqmin) { LogMessageVerb(X_WARNING, 2, "%s: module ABI minor version " "(%d) is newer than that available (%d)\n", module, min, reqmin); return FALSE; } } } return TRUE; } static ModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new) { new->sib = head; return new; } void * LoadSubModule(void *_parent, const char *module, const char **subdirlist, const char **patternlist, void *options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { ModuleDescPtr submod; ModuleDescPtr parent = (ModuleDescPtr) _parent; LogMessageVerb(X_INFO, 3, "Loading sub module \"%s\"\n", module); if (PathIsAbsolute(module)) { LogMessage(X_ERROR, "LoadSubModule: " "Absolute module path not permitted: \"%s\"\n", module); if (errmaj) *errmaj = LDR_BADUSAGE; if (errmin) *errmin = 0; return NULL; } submod = LoadModule(module, options, modreq, errmaj); if (submod && submod != (ModuleDescPtr) 1) { parent->child = AddSibling(parent->child, submod); submod->parent = parent; } return submod; } ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent) { ModuleDescPtr ret; if (!mod) return NULL; ret = calloc(1, sizeof(ModuleDesc)); if (ret == NULL) return NULL; ret->handle = mod->handle; ret->SetupProc = mod->SetupProc; ret->TearDownProc = mod->TearDownProc; ret->TearDownData = ModuleDuplicated; ret->child = DuplicateModule(mod->child, ret); ret->sib = DuplicateModule(mod->sib, parent); ret->parent = parent; ret->VersionInfo = mod->VersionInfo; return ret; } static const char *compiled_in_modules[] = { "ddc", "fb", "i2c", "ramdac", "dbe", "record", "extmod", "dri", "dri2", #ifdef DRI3 "dri3", #endif #ifdef PRESENT "present", #endif NULL }; /* * LoadModule: load a module * * module The module name. Normally this is not a filename but the * module's "canonical name. A full pathname is, however, * also accepted. * options A NULL terminated list of Options that are passed to the * module's SetupProc function. * modreq An optional XF86ModReqInfo* containing * version/ABI/vendor-ABI requirements to check for when * loading the module. The following fields of the * XF86ModReqInfo struct are checked: * majorversion - must match the module's majorversion exactly * minorversion - the module's minorversion must be >= this * patchlevel - the module's minorversion.patchlevel must be * >= this. Patchlevel is ignored when * minorversion is not set. * abiclass - (string) must match the module's abiclass * abiversion - must be consistent with the module's * abiversion (major equal, minor no older) * moduleclass - string must match the module's moduleclass * string * "don't care" values are ~0 for numbers, and NULL for strings * errmaj Major error return. * */ ModuleDescPtr LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq, int *errmaj) { XF86ModuleData *initdata = NULL; char **pathlist = NULL; char *found = NULL; char *name = NULL; char **path_elem = NULL; char *p = NULL; ModuleDescPtr ret = NULL; PatternPtr patterns = NULL; int noncanonical = 0; char *m = NULL; const char **cim; LogMessageVerb(X_INFO, 3, "LoadModule: \"%s\"", module); patterns = InitPatterns(NULL); name = LoaderGetCanonicalName(module, patterns); noncanonical = (name && strcmp(module, name) != 0); if (noncanonical) { LogWrite(3, " (%s)\n", name); LogMessageVerb(X_WARNING, 1, "LoadModule: given non-canonical module name \"%s\"\n", module); m = name; } else { LogWrite(3, "\n"); m = (char *) module; } /* Backward compatibility, vbe and int10 are merged into int10 now */ if (!strcmp(m, "vbe")) m = name = strdup("int10"); for (cim = compiled_in_modules; *cim; cim++) if (!strcmp(m, *cim)) { LogMessageVerb(X_INFO, 3, "Module \"%s\" already built-in\n", m); ret = (ModuleDescPtr) 1; goto LoadModule_exit; } if (!name) { if (errmaj) *errmaj = LDR_BADUSAGE; goto LoadModule_fail; } ret = calloc(1, sizeof(ModuleDesc)); if (!ret) { if (errmaj) *errmaj = LDR_NOMEM; goto LoadModule_fail; } pathlist = defaultPathList; if (!pathlist) { /* This could be a malloc failure too */ if (errmaj) *errmaj = LDR_BADUSAGE; goto LoadModule_fail; } /* * if the module name is not a full pathname, we need to * check the elements in the path */ if (PathIsAbsolute(module)) found = xstrdup(module); path_elem = pathlist; while (!found && *path_elem != NULL) { found = FindModule(m, *path_elem, patterns); path_elem++; /* * When the module name isn't the canonical name, search for the * former if no match was found for the latter. */ if (!*path_elem && m == name) { path_elem = pathlist; m = (char *) module; } } /* * did we find the module? */ if (!found) { LogMessage(X_WARNING, "Warning, couldn't open module %s\n", module); if (errmaj) *errmaj = LDR_NOENT; goto LoadModule_fail; } ret->handle = LoaderOpen(found, errmaj); if (ret->handle == NULL) goto LoadModule_fail; /* drop any explicit suffix from the module name */ p = strchr(name, '.'); if (p) *p = '\0'; /* * now check if the special data object ModuleData is * present. */ if (asprintf(&p, "%sModuleData", name) == -1) { p = NULL; if (errmaj) *errmaj = LDR_NOMEM; goto LoadModule_fail; } initdata = LoaderSymbolFromModule(ret, p); if (initdata) { ModuleSetupProc setup; ModuleTearDownProc teardown; XF86ModuleVersionInfo *vers; vers = initdata->vers; setup = initdata->setup; teardown = initdata->teardown; if (vers) { if (!CheckVersion(module, vers, modreq)) { if (errmaj) *errmaj = LDR_MISMATCH; goto LoadModule_fail; } } else { LogMessage(X_ERROR, "LoadModule: Module %s does not supply" " version information\n", module); if (errmaj) *errmaj = LDR_INVALID; goto LoadModule_fail; } if (setup) ret->SetupProc = setup; if (teardown) ret->TearDownProc = teardown; ret->VersionInfo = vers; } else { /* no initdata, fail the load */ LogMessage(X_ERROR, "LoadModule: Module %s does not have a %s " "data object.\n", module, p); if (errmaj) *errmaj = LDR_INVALID; goto LoadModule_fail; } if (ret->SetupProc) { ret->TearDownData = ret->SetupProc(ret, options, errmaj, NULL); if (!ret->TearDownData) { goto LoadModule_fail; } } else if (options) { LogMessage(X_WARNING, "Module Options present, but no SetupProc " "available for %s\n", module); } goto LoadModule_exit; LoadModule_fail: UnloadModule(ret); ret = NULL; LoadModule_exit: FreePatterns(patterns); free(found); free(name); free(p); return ret; } void UnloadModule(void *_mod) { ModuleDescPtr mod = _mod; if (mod == (ModuleDescPtr) 1) return; if (mod == NULL) return; if (mod->VersionInfo) { const char *name = mod->VersionInfo->modname; if (mod->parent) LogMessageVerbSigSafe(X_INFO, 3, "UnloadSubModule: \"%s\"\n", name); else LogMessageVerbSigSafe(X_INFO, 3, "UnloadModule: \"%s\"\n", name); if (mod->TearDownData != ModuleDuplicated) { if ((mod->TearDownProc) && (mod->TearDownData)) mod->TearDownProc(mod->TearDownData); LoaderUnload(name, mod->handle); } } if (mod->child) UnloadModule(mod->child); if (mod->sib) UnloadModule(mod->sib); free(mod); } void UnloadSubModule(void *_mod) { ModuleDescPtr mod = (ModuleDescPtr) _mod; /* Some drivers are calling us on built-in submodules, ignore them */ if (mod == (ModuleDescPtr) 1) return; RemoveChild(mod); UnloadModule(mod); } static void RemoveChild(ModuleDescPtr child) { ModuleDescPtr mdp; ModuleDescPtr prevsib; ModuleDescPtr parent; if (!child->parent) return; parent = child->parent; if (parent->child == child) { parent->child = child->sib; return; } prevsib = parent->child; mdp = prevsib->sib; while (mdp && mdp != child) { prevsib = mdp; mdp = mdp->sib; } if (mdp == child) prevsib->sib = child->sib; child->sib = NULL; return; } void LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) { const char *msg; MessageType type = X_ERROR; switch (errmaj) { case LDR_NOERROR: msg = "no error"; break; case LDR_NOMEM: msg = "out of memory"; break; case LDR_NOENT: msg = "module does not exist"; break; case LDR_NOLOAD: msg = "loader failed"; break; case LDR_ONCEONLY: msg = "already loaded"; type = X_INFO; break; case LDR_MISMATCH: msg = "module requirement mismatch"; break; case LDR_BADUSAGE: msg = "invalid argument(s) to LoadModule()"; break; case LDR_INVALID: msg = "invalid module"; break; case LDR_BADOS: msg = "module doesn't support this OS"; break; case LDR_MODSPECIFIC: msg = "module-specific error"; break; default: msg = "unknown error"; } if (name) LogMessage(type, "%s: Failed to load module \"%s\" (%s, %d)\n", name, modname, msg, errmin); else LogMessage(type, "Failed to load module \"%s\" (%s, %d)\n", modname, msg, errmin); } /* Given a module path or file name, return the module's canonical name */ static char * LoaderGetCanonicalName(const char *modname, PatternPtr patterns) { char *str; const char *s; int len; PatternPtr p; regmatch_t match[2]; /* Strip off any leading path */ s = strrchr(modname, '/'); if (s == NULL) s = modname; else s++; /* Find the first regex that is matched */ for (p = patterns; p->pattern; p++) if (regexec(&p->rex, s, 2, match, 0) == 0 && match[1].rm_so != -1) { len = match[1].rm_eo - match[1].rm_so; str = malloc(len + 1); if (!str) return NULL; strncpy(str, s + match[1].rm_so, len); str[len] = '\0'; return str; } /* If there is no match, return the whole name minus the leading path */ return strdup(s); } /* * Return the module version information. */ unsigned long LoaderGetModuleVersion(ModuleDescPtr mod) { if (!mod || mod == (ModuleDescPtr) 1 || !mod->VersionInfo) return 0; return MODULE_VERSION_NUMERIC(mod->VersionInfo->majorversion, mod->VersionInfo->minorversion, mod->VersionInfo->patchlevel); } xorg-server-21.1.16/hw/xfree86/loader/loader.h0000644000175000017500000000616714757411105014437 /* * Copyright 1995-1998 by Metro Link, Inc. * * 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 Metro Link, Inc. not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Metro Link, Inc. makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL METRO LINK, INC. 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 (c) 1997-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _LOADER_H #define _LOADER_H #include #include #include /* Compiled-in version information */ typedef struct { int xf86Version; int ansicVersion; int videodrvVersion; int xinputVersion; int extensionVersion; int fontVersion; } ModuleVersions; extern const ModuleVersions LoaderVersionInfo; extern unsigned long LoaderOptions; /* Internal Functions */ void *LoaderOpen(const char *, int *); #endif /* _LOADER_H */ xorg-server-21.1.16/hw/xfree86/modes/0000755000175000017500000000000014757411135012732 5xorg-server-21.1.16/hw/xfree86/modes/meson.build0000644000175000017500000000102114757411105015003 srcs_xorg_modes = [ 'xf86Crtc.c', 'xf86Cursors.c', 'xf86gtf.c', 'xf86EdidModes.c', 'xf86Modes.c', 'xf86RandR12.c', 'xf86Rotate.c', ] if build_dga srcs_xorg_modes += 'xf86DiDGA.c' endif xorg_modes = static_library('xorg_modes', srcs_xorg_modes, include_directories: [ inc, xorg_inc ], dependencies: [ common_dep, libxcvt_dep ], c_args: xorg_c_args, ) install_data( [ 'xf86Crtc.h', 'xf86Modes.h', 'xf86RandR12.h', ], install_dir: xorgsdkdir, ) xorg-server-21.1.16/hw/xfree86/modes/Makefile.am0000644000175000017500000000121114757411105014676 noinst_LTLIBRARIES = libxf86modes.la if DGA DGA_SRCS = xf86DiDGA.c endif libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86gtf.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rotate.c \ $(DGA_SRCS) AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \ -I$(srcdir)/../dixmods/extmod sdk_HEADERS = \ xf86Crtc.h \ xf86Modes.h \ xf86RandR12.h AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) xorg-server-21.1.16/hw/xfree86/modes/xf86Crtc.h0000644000175000017500000007037514757411105014443 /* * Copyright © 2006 Keith Packard * Copyright © 2011 Aaron Plattner * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _XF86CRTC_H_ #define _XF86CRTC_H_ #include #include "randrstr.h" #include "xf86Modes.h" #include "xf86Cursor.h" #include "xf86i2c.h" #include "damage.h" #include "picturestr.h" /* Compat definitions for older X Servers. */ #ifndef M_T_PREFERRED #define M_T_PREFERRED 0x08 #endif #ifndef M_T_DRIVER #define M_T_DRIVER 0x40 #endif #ifndef M_T_USERPREF #define M_T_USERPREF 0x80 #endif #ifndef HARDWARE_CURSOR_ARGB #define HARDWARE_CURSOR_ARGB 0x00004000 #endif typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr; typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr; typedef struct _xf86Lease xf86LeaseRec, *xf86LeasePtr; /* define a standard for connector types */ typedef enum _xf86ConnectorType { XF86ConnectorNone, XF86ConnectorVGA, XF86ConnectorDVI_I, XF86ConnectorDVI_D, XF86ConnectorDVI_A, XF86ConnectorComposite, XF86ConnectorSvideo, XF86ConnectorComponent, XF86ConnectorLFP, XF86ConnectorProprietary, XF86ConnectorHDMI, XF86ConnectorDisplayPort, } xf86ConnectorType; typedef enum _xf86OutputStatus { XF86OutputStatusConnected, XF86OutputStatusDisconnected, XF86OutputStatusUnknown } xf86OutputStatus; typedef enum _xf86DriverTransforms { XF86DriverTransformNone = 0, XF86DriverTransformOutput = 1 << 0, XF86DriverTransformCursorImage = 1 << 1, XF86DriverTransformCursorPosition = 1 << 2, } xf86DriverTransforms; struct xf86CrtcTileInfo { uint32_t group_id; uint32_t flags; uint32_t num_h_tile; uint32_t num_v_tile; uint32_t tile_h_loc; uint32_t tile_v_loc; uint32_t tile_h_size; uint32_t tile_v_size; }; typedef struct _xf86CrtcFuncs { /** * Turns the crtc on/off, or sets intermediate power levels if available. * * Unsupported intermediate modes drop to the lower power setting. If the * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to * be safe to call mode_set. */ void (*dpms) (xf86CrtcPtr crtc, int mode); /** * Saves the crtc's state for restoration on VT switch. */ void (*save) (xf86CrtcPtr crtc); /** * Restore's the crtc's state at VT switch. */ void (*restore) (xf86CrtcPtr crtc); /** * Lock CRTC prior to mode setting, mostly for DRI. * Returns whether unlock is needed */ Bool (*lock) (xf86CrtcPtr crtc); /** * Unlock CRTC after mode setting, mostly for DRI */ void (*unlock) (xf86CrtcPtr crtc); /** * Callback to adjust the mode to be set in the CRTC. * * This allows a CRTC to adjust the clock or even the entire set of * timings, which is used for panels with fixed timings or for * buses with clock limitations. */ Bool (*mode_fixup) (xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode); /** * Prepare CRTC for an upcoming mode set. */ void (*prepare) (xf86CrtcPtr crtc); /** * Callback for setting up a video mode after fixups have been made. */ void (*mode_set) (xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjusted_mode, int x, int y); /** * Commit mode changes to a CRTC */ void (*commit) (xf86CrtcPtr crtc); /* Set the color ramps for the CRTC to the given values. */ void (*gamma_set) (xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size); /** * Allocate the shadow area, delay the pixmap creation until needed */ void *(*shadow_allocate) (xf86CrtcPtr crtc, int width, int height); /** * Create shadow pixmap for rotation support */ PixmapPtr (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height); /** * Destroy shadow pixmap */ void (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data); /** * Set cursor colors */ void (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg); /** * Set cursor position */ void (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y); /** * Show cursor */ void (*show_cursor) (xf86CrtcPtr crtc); Bool (*show_cursor_check) (xf86CrtcPtr crtc); /** * Hide cursor */ void (*hide_cursor) (xf86CrtcPtr crtc); /** * Load monochrome image */ void (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image); Bool (*load_cursor_image_check) (xf86CrtcPtr crtc, CARD8 *image); /** * Load ARGB image */ void (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image); Bool (*load_cursor_argb_check) (xf86CrtcPtr crtc, CARD32 *image); /** * Clean up driver-specific bits of the crtc */ void (*destroy) (xf86CrtcPtr crtc); /** * Less fine-grained mode setting entry point for kernel modesetting */ Bool (*set_mode_major) (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); /** * Callback for panning. Doesn't change the mode. * Added in ABI version 2 */ void (*set_origin) (xf86CrtcPtr crtc, int x, int y); /** */ Bool (*set_scanout_pixmap)(xf86CrtcPtr crtc, PixmapPtr pixmap); } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr; #define XF86_CRTC_VERSION 8 struct _xf86Crtc { /** * ABI versioning */ int version; /** * Associated ScrnInfo */ ScrnInfoPtr scrn; /** * Desired state of this CRTC * * Set when this CRTC should be driving one or more outputs */ Bool enabled; /** * Active mode * * This reflects the mode as set in the CRTC currently * It will be cleared when the VT is not active or * during server startup */ DisplayModeRec mode; Rotation rotation; PixmapPtr rotatedPixmap; void *rotatedData; /** * Position on screen * * Locates this CRTC within the frame buffer */ int x, y; /** * Desired mode * * This is set to the requested mode, independent of * whether the VT is active. In particular, it receives * the startup configured mode and saves the active mode * on VT switch. */ DisplayModeRec desiredMode; Rotation desiredRotation; int desiredX, desiredY; /** crtc-specific functions */ const xf86CrtcFuncsRec *funcs; /** * Driver private * * Holds driver-private information */ void *driver_private; #ifdef RANDR_12_INTERFACE /** * RandR crtc * * When RandR 1.2 is available, this * points at the associated crtc object */ RRCrtcPtr randr_crtc; #else void *randr_crtc; #endif /** * Current cursor is ARGB */ Bool cursor_argb; /** * Track whether cursor is within CRTC range */ Bool cursor_in_range; /** * Track state of cursor associated with this CRTC */ Bool cursor_shown; /** * Current transformation matrix */ PictTransform crtc_to_framebuffer; /* framebuffer_to_crtc was removed in ABI 2 */ struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */ struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */ PictFilterPtr filter; /* ABI 2 */ xFixed *params; /* ABI 2 */ int nparams; /* ABI 2 */ int filter_width; /* ABI 2 */ int filter_height; /* ABI 2 */ Bool transform_in_use; RRTransformRec transform; /* ABI 2 */ Bool transformPresent; /* ABI 2 */ RRTransformRec desiredTransform; /* ABI 2 */ Bool desiredTransformPresent; /* ABI 2 */ /** * Bounding box in screen space */ BoxRec bounds; /** * Panning: * TotalArea: total panning area, larger than CRTC's size * TrackingArea: Area of the pointer for which the CRTC is panned * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them * Added in ABI version 2 */ BoxRec panningTotalArea; BoxRec panningTrackingArea; INT16 panningBorder[4]; /** * Current gamma, especially useful after initial config. * Added in ABI version 3 */ CARD16 *gamma_red; CARD16 *gamma_green; CARD16 *gamma_blue; int gamma_size; /** * Actual state of this CRTC * * Set to TRUE after modesetting, set to FALSE if no outputs are connected * Added in ABI version 3 */ Bool active; /** * Clear the shadow */ Bool shadowClear; /** * Indicates that the driver is handling some or all transforms: * * XF86DriverTransformOutput: The driver handles the output transform, so * the shadow surface should be disabled. The driver writes this field * before calling xf86CrtcRotate to indicate that it is handling the * transform (including rotation and reflection). * * XF86DriverTransformCursorImage: Setting this flag causes the server to * pass the untransformed cursor image to the driver hook. * * XF86DriverTransformCursorPosition: Setting this flag causes the server * to pass the untransformed cursor position to the driver hook. * * Added in ABI version 4, changed to xf86DriverTransforms in ABI version 7 */ xf86DriverTransforms driverIsPerformingTransform; /* Added in ABI version 5 */ PixmapPtr current_scanout; /* Added in ABI version 6 */ PixmapPtr current_scanout_back; }; typedef struct _xf86OutputFuncs { /** * Called to allow the output a chance to create properties after the * RandR objects have been created. */ void (*create_resources) (xf86OutputPtr output); /** * Turns the output on/off, or sets intermediate power levels if available. * * Unsupported intermediate modes drop to the lower power setting. If the * mode is DPMSModeOff, the output must be disabled, as the DPLL may be * disabled afterwards. */ void (*dpms) (xf86OutputPtr output, int mode); /** * Saves the output's state for restoration on VT switch. */ void (*save) (xf86OutputPtr output); /** * Restore's the output's state at VT switch. */ void (*restore) (xf86OutputPtr output); /** * Callback for testing a video mode for a given output. * * This function should only check for cases where a mode can't be supported * on the output specifically, and not represent generic CRTC limitations. * * \return MODE_OK if the mode is valid, or another MODE_* otherwise. */ int (*mode_valid) (xf86OutputPtr output, DisplayModePtr pMode); /** * Callback to adjust the mode to be set in the CRTC. * * This allows an output to adjust the clock or even the entire set of * timings, which is used for panels with fixed timings or for * buses with clock limitations. */ Bool (*mode_fixup) (xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode); /** * Callback for preparing mode changes on an output */ void (*prepare) (xf86OutputPtr output); /** * Callback for committing mode changes on an output */ void (*commit) (xf86OutputPtr output); /** * Callback for setting up a video mode after fixups have been made. * * This is only called while the output is disabled. The dpms callback * must be all that's necessary for the output, to turn the output on * after this function is called. */ void (*mode_set) (xf86OutputPtr output, DisplayModePtr mode, DisplayModePtr adjusted_mode); /** * Probe for a connected output, and return detect_status. */ xf86OutputStatus(*detect) (xf86OutputPtr output); /** * Query the device for the modes it provides. * * This function may also update MonInfo, mm_width, and mm_height. * * \return singly-linked list of modes or NULL if no modes found. */ DisplayModePtr(*get_modes) (xf86OutputPtr output); #ifdef RANDR_12_INTERFACE /** * Callback when an output's property has changed. */ Bool (*set_property) (xf86OutputPtr output, Atom property, RRPropertyValuePtr value); #endif #ifdef RANDR_13_INTERFACE /** * Callback to get an updated property value */ Bool (*get_property) (xf86OutputPtr output, Atom property); #endif #ifdef RANDR_GET_CRTC_INTERFACE /** * Callback to get current CRTC for a given output */ xf86CrtcPtr(*get_crtc) (xf86OutputPtr output); #endif /** * Clean up driver-specific bits of the output */ void (*destroy) (xf86OutputPtr output); } xf86OutputFuncsRec, *xf86OutputFuncsPtr; #define XF86_OUTPUT_VERSION 3 struct _xf86Output { /** * ABI versioning */ int version; /** * Associated ScrnInfo */ ScrnInfoPtr scrn; /** * Currently connected crtc (if any) * * If this output is not in use, this field will be NULL. */ xf86CrtcPtr crtc; /** * Possible CRTCs for this output as a mask of crtc indices */ CARD32 possible_crtcs; /** * Possible outputs to share the same CRTC as a mask of output indices */ CARD32 possible_clones; /** * Whether this output can support interlaced modes */ Bool interlaceAllowed; /** * Whether this output can support double scan modes */ Bool doubleScanAllowed; /** * List of available modes on this output. * * This should be the list from get_modes(), plus perhaps additional * compatible modes added later. */ DisplayModePtr probed_modes; /** * Options parsed from the related monitor section */ OptionInfoPtr options; /** * Configured monitor section */ XF86ConfMonitorPtr conf_monitor; /** * Desired initial position */ int initial_x, initial_y; /** * Desired initial rotation */ Rotation initial_rotation; /** * Current connection status * * This indicates whether a monitor is known to be connected * to this output or not, or whether there is no way to tell */ xf86OutputStatus status; /** EDID monitor information */ xf86MonPtr MonInfo; /** subpixel order */ int subpixel_order; /** Physical size of the currently attached output device. */ int mm_width, mm_height; /** Output name */ char *name; /** output-specific functions */ const xf86OutputFuncsRec *funcs; /** driver private information */ void *driver_private; /** Whether to use the old per-screen Monitor config section */ Bool use_screen_monitor; /** For pre-init, whether the output should be excluded from the * desktop when there are other viable outputs to use */ Bool non_desktop; #ifdef RANDR_12_INTERFACE /** * RandR 1.2 output structure. * * When RandR 1.2 is available, this points at the associated * RandR output structure and is created when this output is created */ RROutputPtr randr_output; #else void *randr_output; #endif /** * Desired initial panning * Added in ABI version 2 */ BoxRec initialTotalArea; BoxRec initialTrackingArea; INT16 initialBorder[4]; struct xf86CrtcTileInfo tile_info; }; typedef struct _xf86ProviderFuncs { /** * Called to allow the provider a chance to create properties after the * RandR objects have been created. */ void (*create_resources) (ScrnInfoPtr scrn); /** * Callback when an provider's property has changed. */ Bool (*set_property) (ScrnInfoPtr scrn, Atom property, RRPropertyValuePtr value); /** * Callback to get an updated property value */ Bool (*get_property) (ScrnInfoPtr provider, Atom property); } xf86ProviderFuncsRec, *xf86ProviderFuncsPtr; #define XF86_LEASE_VERSION 1 struct _xf86Lease { /** * ABI versioning */ int version; /** * Associated ScrnInfo */ ScrnInfoPtr scrn; /** * Driver private */ void *driver_private; /** * RandR lease */ RRLeasePtr randr_lease; /* * Contents of the lease */ /** * Number of leased CRTCs */ int num_crtc; /** * Number of leased outputs */ int num_output; /** * Array of pointers to leased CRTCs */ RRCrtcPtr *crtcs; /** * Array of pointers to leased outputs */ RROutputPtr *outputs; }; typedef struct _xf86CrtcConfigFuncs { /** * Requests that the driver resize the screen. * * The driver is responsible for updating scrn->virtualX and scrn->virtualY. * If the requested size cannot be set, the driver should leave those values * alone and return FALSE. * * A naive driver that cannot reallocate the screen may simply change * virtual[XY]. A more advanced driver will want to also change the * devPrivate.ptr and devKind of the screen pixmap, update any offscreen * pixmaps it may have moved, and change pScrn->displayWidth. */ Bool (*resize) (ScrnInfoPtr scrn, int width, int height); /** * Requests that the driver create a lease */ int (*create_lease)(RRLeasePtr lease, int *fd); /** * Ask the driver to terminate a lease, freeing all * driver resources */ void (*terminate_lease)(RRLeasePtr lease); } xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr; /* * The driver calls this when it detects that a lease * has been terminated */ extern _X_EXPORT void xf86CrtcLeaseTerminated(RRLeasePtr lease); extern _X_EXPORT void xf86CrtcLeaseStarted(RRLeasePtr lease); typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen); typedef struct _xf86CrtcConfig { int num_output; xf86OutputPtr *output; /** * compat_output is used whenever we deal * with legacy code that only understands a single * output. pScrn->modes will be loaded from this output, * adjust frame will whack this output, etc. */ int compat_output; int num_crtc; xf86CrtcPtr *crtc; int minWidth, minHeight; int maxWidth, maxHeight; /* For crtc-based rotation */ DamagePtr rotation_damage; Bool rotation_damage_registered; /* DGA */ unsigned int dga_flags; unsigned long dga_address; DGAModePtr dga_modes; int dga_nmode; int dga_width, dga_height, dga_stride; DisplayModePtr dga_save_mode; const xf86CrtcConfigFuncsRec *funcs; CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; /* Cursor information */ xf86CursorInfoPtr cursor_info; CursorPtr cursor; CARD8 *cursor_image; Bool cursor_on; CARD32 cursor_fg, cursor_bg; /** * Options parsed from the related device section */ OptionInfoPtr options; Bool debug_modes; /* wrap screen BlockHandler for rotation */ ScreenBlockHandlerProcPtr BlockHandler; /* callback when crtc configuration changes */ xf86_crtc_notify_proc_ptr xf86_crtc_notify; char *name; const xf86ProviderFuncsRec *provider_funcs; #ifdef RANDR_12_INTERFACE RRProviderPtr randr_provider; #else void *randr_provider; #endif } xf86CrtcConfigRec, *xf86CrtcConfigPtr; extern _X_EXPORT int xf86CrtcConfigPrivateIndex; #define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr)) static _X_INLINE xf86OutputPtr xf86CompatOutput(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); if (xf86CrtcConfigPrivateIndex == -1) return NULL; if (config->compat_output < 0) return NULL; return config->output[config->compat_output]; } static _X_INLINE xf86CrtcPtr xf86CompatCrtc(ScrnInfoPtr pScrn) { xf86OutputPtr compat_output = xf86CompatOutput(pScrn); if (!compat_output) return NULL; return compat_output->crtc; } static _X_INLINE RRCrtcPtr xf86CompatRRCrtc(ScrnInfoPtr pScrn) { xf86CrtcPtr compat_crtc = xf86CompatCrtc(pScrn); if (!compat_crtc) return NULL; return compat_crtc->randr_crtc; } /* * Initialize xf86CrtcConfig structure */ extern _X_EXPORT void xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs); extern _X_EXPORT void xf86CrtcSetSizeRange(ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight); /* * Crtc functions */ extern _X_EXPORT xf86CrtcPtr xf86CrtcCreate(ScrnInfoPtr scrn, const xf86CrtcFuncsRec * funcs); extern _X_EXPORT void xf86CrtcDestroy(xf86CrtcPtr crtc); /** * Sets the given video mode on the given crtc */ extern _X_EXPORT Bool xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y); extern _X_EXPORT Bool xf86CrtcSetMode(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y); extern _X_EXPORT void xf86CrtcSetOrigin(xf86CrtcPtr crtc, int x, int y); /* * Assign crtc rotation during mode set */ extern _X_EXPORT Bool xf86CrtcRotate(xf86CrtcPtr crtc); /* * Clean up any rotation data, used when a crtc is turned off * as well as when rotation is disabled. */ extern _X_EXPORT void xf86RotateDestroy(xf86CrtcPtr crtc); /* * free shadow memory allocated for all crtcs */ extern _X_EXPORT void xf86RotateFreeShadow(ScrnInfoPtr pScrn); /* * Clean up rotation during CloseScreen */ extern _X_EXPORT void xf86RotateCloseScreen(ScreenPtr pScreen); /** * Return whether any output is assigned to the crtc */ extern _X_EXPORT Bool xf86CrtcInUse(xf86CrtcPtr crtc); /* * Output functions */ extern _X_EXPORT xf86OutputPtr xf86OutputCreate(ScrnInfoPtr scrn, const xf86OutputFuncsRec * funcs, const char *name); extern _X_EXPORT void xf86OutputUseScreenMonitor(xf86OutputPtr output, Bool use_screen_monitor); extern _X_EXPORT Bool xf86OutputRename(xf86OutputPtr output, const char *name); extern _X_EXPORT void xf86OutputDestroy(xf86OutputPtr output); extern _X_EXPORT void xf86ProbeOutputModes(ScrnInfoPtr pScrn, int maxX, int maxY); extern _X_EXPORT void xf86SetScrnInfoModes(ScrnInfoPtr pScrn); #ifdef RANDR_13_INTERFACE #define ScreenInitRetType int #else #define ScreenInitRetType Bool #endif extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit(ScreenPtr pScreen); extern _X_EXPORT void xf86AssignNoOutputInitialSize(ScrnInfoPtr scrn, const OptionInfoRec *options, int *no_output_width, int *no_output_height); extern _X_EXPORT Bool xf86InitialConfiguration(ScrnInfoPtr pScrn, Bool canGrow); extern _X_EXPORT void xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); extern _X_EXPORT Bool xf86SaveScreen(ScreenPtr pScreen, int mode); extern _X_EXPORT void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn); extern _X_EXPORT DisplayModePtr xf86OutputFindClosestMode(xf86OutputPtr output, DisplayModePtr desired); extern _X_EXPORT Bool xf86SetSingleMode(ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation); /** * Set the EDID information for the specified output */ extern _X_EXPORT void xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon); /** * Set the TILE information for the specified output */ extern _X_EXPORT void xf86OutputSetTile(xf86OutputPtr output, struct xf86CrtcTileInfo *tile_info); extern _X_EXPORT Bool xf86OutputParseKMSTile(const char *tile_data, int tile_length, struct xf86CrtcTileInfo *tile_info); /** * Return the list of modes supported by the EDID information * stored in 'output' */ extern _X_EXPORT DisplayModePtr xf86OutputGetEDIDModes(xf86OutputPtr output); extern _X_EXPORT xf86MonPtr xf86OutputGetEDID(xf86OutputPtr output, I2CBusPtr pDDCBus); /** * Initialize dga for this screen */ #ifdef XFreeXDGA extern _X_EXPORT Bool xf86DiDGAInit(ScreenPtr pScreen, unsigned long dga_address); /* this is the real function, used only internally */ _X_INTERNAL Bool _xf86_di_dga_init_internal(ScreenPtr pScreen); /** * Re-initialize dga for this screen (as when the set of modes changes) */ extern _X_EXPORT Bool xf86DiDGAReInit(ScreenPtr pScreen); #endif /* This is the real function, used only internally */ _X_INTERNAL Bool _xf86_di_dga_reinit_internal(ScreenPtr pScreen); /* * Set the subpixel order reported for the screen using * the information from the outputs */ extern _X_EXPORT void xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen); /* * Get a standard string name for a connector type */ extern _X_EXPORT const char *xf86ConnectorGetName(xf86ConnectorType connector); /* * Using the desired mode information in each crtc, set * modes (used in EnterVT functions, or at server startup) */ extern _X_EXPORT Bool xf86SetDesiredModes(ScrnInfoPtr pScrn); /** * Initialize the CRTC-based cursor code. CRTC function vectors must * contain relevant cursor setting functions. * * Driver should call this from ScreenInit function */ extern _X_EXPORT Bool xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags); /** * Superseded by xf86CursorResetCursor, which is getting called * automatically when necessary. */ static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {} /** * Called from EnterVT to turn the cursors back on */ extern _X_EXPORT Bool xf86_show_cursors(ScrnInfoPtr scrn); /** * Called by the driver to turn a single crtc's cursor off */ extern _X_EXPORT void xf86_crtc_hide_cursor(xf86CrtcPtr crtc); /** * Called by the driver to turn a single crtc's cursor on */ extern _X_EXPORT Bool xf86_crtc_show_cursor(xf86CrtcPtr crtc); /** * Called by the driver to turn cursors off */ extern _X_EXPORT void xf86_hide_cursors(ScrnInfoPtr scrn); /** * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time. */ extern _X_EXPORT void xf86_cursors_fini(ScreenPtr screen); #ifdef XV /* * For overlay video, compute the relevant CRTC and * clip video to that. * wraps xf86XVClipVideoHelper() */ extern _X_EXPORT Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr * crtc_ret, xf86CrtcPtr desired_crtc, BoxPtr dst, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, RegionPtr reg, INT32 width, INT32 height); #endif extern _X_EXPORT xf86_crtc_notify_proc_ptr xf86_wrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new); extern _X_EXPORT void xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old); extern _X_EXPORT void xf86_crtc_notify(ScreenPtr pScreen); /** * Gamma */ extern _X_EXPORT Bool xf86_crtc_supports_gamma(ScrnInfoPtr pScrn); extern _X_EXPORT void xf86ProviderSetup(ScrnInfoPtr scrn, const xf86ProviderFuncsRec * funcs, const char *name); extern _X_EXPORT void xf86DetachAllCrtc(ScrnInfoPtr scrn); Bool xf86OutputForceEnabled(xf86OutputPtr output); #endif /* _XF86CRTC_H_ */ xorg-server-21.1.16/hw/xfree86/modes/xf86Modes.h0000644000175000017500000001066614757411105014614 /* * Copyright © 2006 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ #ifndef _XF86MODES_H_ #define _XF86MODES_H_ #include #include #include #include "xf86.h" #include "xorgVersion.h" #include "edid.h" #include "xf86Parser.h" extern _X_EXPORT double xf86ModeHSync(const DisplayModeRec * mode); extern _X_EXPORT double xf86ModeVRefresh(const DisplayModeRec * mode); extern _X_EXPORT unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth); extern _X_EXPORT int xf86ModeWidth(const DisplayModeRec * mode, Rotation rotation); extern _X_EXPORT int xf86ModeHeight(const DisplayModeRec * mode, Rotation rotation); extern _X_EXPORT DisplayModePtr xf86DuplicateMode(const DisplayModeRec * pMode); extern _X_EXPORT DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT void xf86SetModeDefaultName(DisplayModePtr mode); extern _X_EXPORT void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags); extern _X_EXPORT Bool xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2); extern _X_EXPORT void xf86PrintModeline(int scrnIndex, DisplayModePtr mode); extern _X_EXPORT DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new); extern _X_EXPORT DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC); extern _X_EXPORT DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); extern _X_EXPORT DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins); extern _X_EXPORT Bool xf86ModeIsReduced(const DisplayModeRec * mode); extern _X_EXPORT void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags); extern _X_EXPORT void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges); extern _X_EXPORT void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch); extern _X_EXPORT void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon); extern _X_EXPORT void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth); extern _X_EXPORT void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr * modeList, Bool verbose); extern _X_EXPORT DisplayModePtr xf86PruneDuplicateModes(DisplayModePtr modes); extern _X_EXPORT void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList); extern _X_EXPORT DisplayModePtr xf86GetMonitorModes(ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor); extern _X_EXPORT DisplayModePtr xf86GetDefaultModes(void); extern _X_EXPORT void xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode); extern _X_EXPORT void xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC); #endif /* _XF86MODES_H_ */ xorg-server-21.1.16/hw/xfree86/modes/xf86RandR12.h0000644000175000017500000000502714757411105014711 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _XF86_RANDR_H_ #define _XF86_RANDR_H_ #include #include extern _X_EXPORT Bool xf86RandR12CreateScreenResources(ScreenPtr pScreen); extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen); extern _X_EXPORT void xf86RandR12CloseScreen(ScreenPtr pScreen); extern _X_EXPORT void xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotation); extern _X_EXPORT void xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms); extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); extern _X_EXPORT Rotation xf86RandR12GetRotation(ScreenPtr pScreen); extern _X_EXPORT void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y); extern _X_EXPORT Bool xf86RandR12PreInit(ScrnInfoPtr pScrn); extern _X_EXPORT void xf86RandR12TellChanged(ScreenPtr pScreen); extern void xf86RandR12LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual); extern Bool xf86RandR12InitGamma(ScrnInfoPtr pScrn, unsigned gammaSize); #endif /* _XF86_RANDR_H_ */ xorg-server-21.1.16/hw/xfree86/modes/Makefile.in0000644000175000017500000007144714757411115014732 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/modes ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxf86modes_la_LIBADD = am__libxf86modes_la_SOURCES_DIST = xf86Crtc.c xf86Crtc.h xf86Cursors.c \ xf86gtf.c xf86EdidModes.c xf86Modes.c xf86Modes.h \ xf86RandR12.c xf86RandR12.h xf86Rotate.c xf86DiDGA.c @DGA_TRUE@am__objects_1 = xf86DiDGA.lo am_libxf86modes_la_OBJECTS = xf86Crtc.lo xf86Cursors.lo xf86gtf.lo \ xf86EdidModes.lo xf86Modes.lo xf86RandR12.lo xf86Rotate.lo \ $(am__objects_1) libxf86modes_la_OBJECTS = $(am_libxf86modes_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xf86Crtc.Plo \ ./$(DEPDIR)/xf86Cursors.Plo ./$(DEPDIR)/xf86DiDGA.Plo \ ./$(DEPDIR)/xf86EdidModes.Plo ./$(DEPDIR)/xf86Modes.Plo \ ./$(DEPDIR)/xf86RandR12.Plo ./$(DEPDIR)/xf86Rotate.Plo \ ./$(DEPDIR)/xf86gtf.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxf86modes_la_SOURCES) DIST_SOURCES = $(am__libxf86modes_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxf86modes.la @DGA_TRUE@DGA_SRCS = xf86DiDGA.c libxf86modes_la_SOURCES = \ xf86Crtc.c \ xf86Crtc.h \ xf86Cursors.c \ xf86gtf.c \ xf86EdidModes.c \ xf86Modes.c \ xf86Modes.h \ xf86RandR12.c \ xf86RandR12.h \ xf86Rotate.c \ $(DGA_SRCS) AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac \ -I$(srcdir)/../dixmods/extmod sdk_HEADERS = \ xf86Crtc.h \ xf86Modes.h \ xf86RandR12.h AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/modes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/modes/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxf86modes.la: $(libxf86modes_la_OBJECTS) $(libxf86modes_la_DEPENDENCIES) $(EXTRA_libxf86modes_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxf86modes_la_OBJECTS) $(libxf86modes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Crtc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Cursors.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86DiDGA.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86EdidModes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Modes.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86RandR12.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Rotate.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86gtf.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xf86Crtc.Plo -rm -f ./$(DEPDIR)/xf86Cursors.Plo -rm -f ./$(DEPDIR)/xf86DiDGA.Plo -rm -f ./$(DEPDIR)/xf86EdidModes.Plo -rm -f ./$(DEPDIR)/xf86Modes.Plo -rm -f ./$(DEPDIR)/xf86RandR12.Plo -rm -f ./$(DEPDIR)/xf86Rotate.Plo -rm -f ./$(DEPDIR)/xf86gtf.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xf86Crtc.Plo -rm -f ./$(DEPDIR)/xf86Cursors.Plo -rm -f ./$(DEPDIR)/xf86DiDGA.Plo -rm -f ./$(DEPDIR)/xf86EdidModes.Plo -rm -f ./$(DEPDIR)/xf86Modes.Plo -rm -f ./$(DEPDIR)/xf86RandR12.Plo -rm -f ./$(DEPDIR)/xf86Rotate.Plo -rm -f ./$(DEPDIR)/xf86gtf.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/modes/xf86Crtc.c0000644000175000017500000032357714757411105014443 /* * Copyright © 2006 Keith Packard * Copyright © 2008 Red Hat, Inc. * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include #include #include #include "xf86.h" #include "xf86DDC.h" #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86Priv.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" #include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #include "picturestr.h" #ifdef XV #include "xf86xv.h" #endif #define NO_OUTPUT_DEFAULT_WIDTH 1024 #define NO_OUTPUT_DEFAULT_HEIGHT 768 /* * Initialize xf86CrtcConfig structure */ int xf86CrtcConfigPrivateIndex = -1; void xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs) { xf86CrtcConfigPtr config; if (xf86CrtcConfigPrivateIndex == -1) xf86CrtcConfigPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); config = xnfcalloc(1, sizeof(xf86CrtcConfigRec)); config->funcs = funcs; config->compat_output = -1; scrn->privates[xf86CrtcConfigPrivateIndex].ptr = config; } void xf86CrtcSetSizeRange(ScrnInfoPtr scrn, int minWidth, int minHeight, int maxWidth, int maxHeight) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); config->minWidth = minWidth; config->minHeight = minHeight; config->maxWidth = maxWidth; config->maxHeight = maxHeight; } /* * Crtc functions */ xf86CrtcPtr xf86CrtcCreate(ScrnInfoPtr scrn, const xf86CrtcFuncsRec * funcs) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc, *crtcs; crtc = calloc(sizeof(xf86CrtcRec), 1); if (!crtc) return NULL; crtc->version = XF86_CRTC_VERSION; crtc->scrn = scrn; crtc->funcs = funcs; #ifdef RANDR_12_INTERFACE crtc->randr_crtc = NULL; #endif crtc->rotation = RR_Rotate_0; crtc->desiredRotation = RR_Rotate_0; pixman_transform_init_identity(&crtc->crtc_to_framebuffer); pixman_f_transform_init_identity(&crtc->f_crtc_to_framebuffer); pixman_f_transform_init_identity(&crtc->f_framebuffer_to_crtc); crtc->filter = NULL; crtc->params = NULL; crtc->nparams = 0; crtc->filter_width = 0; crtc->filter_height = 0; crtc->transform_in_use = FALSE; crtc->transformPresent = FALSE; crtc->desiredTransformPresent = FALSE; memset(&crtc->bounds, '\0', sizeof(crtc->bounds)); /* Preallocate gamma at a sensible size. */ crtc->gamma_size = 256; crtc->gamma_red = xallocarray(crtc->gamma_size, 3 * sizeof(CARD16)); if (!crtc->gamma_red) { free(crtc); return NULL; } crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; if (xf86_config->crtc) crtcs = reallocarray(xf86_config->crtc, xf86_config->num_crtc + 1, sizeof(xf86CrtcPtr)); else crtcs = xallocarray(xf86_config->num_crtc + 1, sizeof(xf86CrtcPtr)); if (!crtcs) { free(crtc->gamma_red); free(crtc); return NULL; } xf86_config->crtc = crtcs; xf86_config->crtc[xf86_config->num_crtc++] = crtc; return crtc; } void xf86CrtcDestroy(xf86CrtcPtr crtc) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); int c; (*crtc->funcs->destroy) (crtc); for (c = 0; c < xf86_config->num_crtc; c++) if (xf86_config->crtc[c] == crtc) { memmove(&xf86_config->crtc[c], &xf86_config->crtc[c + 1], ((xf86_config->num_crtc - (c + 1)) * sizeof(void *))); xf86_config->num_crtc--; break; } free(crtc->params); free(crtc->gamma_red); free(crtc); } /** * Return whether any outputs are connected to the specified pipe */ Bool xf86CrtcInUse(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int o; for (o = 0; o < xf86_config->num_output; o++) if (xf86_config->output[o]->crtc == crtc) return TRUE; return FALSE; } /** * Return whether the crtc is leased by a client */ static Bool xf86CrtcIsLeased(xf86CrtcPtr crtc) { /* If the DIX structure hasn't been created, it can't have been leased */ if (!crtc->randr_crtc) return FALSE; return RRCrtcIsLeased(crtc->randr_crtc); } /** * Return whether the output is leased by a client */ static Bool xf86OutputIsLeased(xf86OutputPtr output) { /* If the DIX structure hasn't been created, it can't have been leased */ if (!output->randr_output) return FALSE; return RROutputIsLeased(output->randr_output); } void xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen) { int subpixel_order = SubPixelUnknown; Bool has_none = FALSE; ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int icrtc, o; for (icrtc = 0; icrtc < xf86_config->num_crtc; icrtc++) { xf86CrtcPtr crtc = xf86_config->crtc[icrtc]; for (o = 0; o < xf86_config->num_output; o++) { xf86OutputPtr output = xf86_config->output[o]; if (output->crtc == crtc) { switch (output->subpixel_order) { case SubPixelNone: has_none = TRUE; break; case SubPixelUnknown: break; default: subpixel_order = output->subpixel_order; break; } } if (subpixel_order != SubPixelUnknown) break; } if (subpixel_order != SubPixelUnknown) { static const int circle[4] = { SubPixelHorizontalRGB, SubPixelVerticalRGB, SubPixelHorizontalBGR, SubPixelVerticalBGR, }; int rotate; int sc; for (rotate = 0; rotate < 4; rotate++) if (crtc->rotation & (1 << rotate)) break; for (sc = 0; sc < 4; sc++) if (circle[sc] == subpixel_order) break; sc = (sc + rotate) & 0x3; if ((crtc->rotation & RR_Reflect_X) && !(sc & 1)) sc ^= 2; if ((crtc->rotation & RR_Reflect_Y) && (sc & 1)) sc ^= 2; subpixel_order = circle[sc]; break; } } if (subpixel_order == SubPixelUnknown && has_none) subpixel_order = SubPixelNone; PictureSetSubpixelOrder(pScreen, subpixel_order); } /** * Sets the given video mode on the given crtc */ Bool xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, RRTransformPtr transform, int x, int y) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int i; Bool ret = FALSE; Bool didLock = FALSE; DisplayModePtr adjusted_mode; DisplayModeRec saved_mode; int saved_x, saved_y; Rotation saved_rotation; RRTransformRec saved_transform; Bool saved_transform_present; crtc->enabled = xf86CrtcInUse(crtc) && !xf86CrtcIsLeased(crtc); /* We only hit this if someone explicitly sends a "disabled" modeset. */ if (!crtc->enabled) { /* Check everything for stuff that should be off. */ xf86DisableUnusedFunctions(scrn); return TRUE; } adjusted_mode = xf86DuplicateMode(mode); saved_mode = crtc->mode; saved_x = crtc->x; saved_y = crtc->y; saved_rotation = crtc->rotation; if (crtc->transformPresent) { RRTransformInit(&saved_transform); RRTransformCopy(&saved_transform, &crtc->transform); } saved_transform_present = crtc->transformPresent; /* Update crtc values up front so the driver can rely on them for mode * setting. */ crtc->mode = *mode; crtc->x = x; crtc->y = y; crtc->rotation = rotation; if (transform) { RRTransformCopy(&crtc->transform, transform); crtc->transformPresent = TRUE; } else crtc->transformPresent = FALSE; if (crtc->funcs->set_mode_major) { ret = crtc->funcs->set_mode_major(crtc, mode, rotation, x, y); goto done; } didLock = crtc->funcs->lock(crtc); /* Pass our mode to the outputs and the CRTC to give them a chance to * adjust it according to limitations or output properties, and also * a chance to reject the mode entirely. */ for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc != crtc) continue; if (!output->funcs->mode_fixup(output, mode, adjusted_mode)) { goto done; } } if (!crtc->funcs->mode_fixup(crtc, mode, adjusted_mode)) { goto done; } if (!xf86CrtcRotate(crtc)) goto done; /* Prepare the outputs and CRTCs before setting the mode. */ for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc != crtc) continue; /* Disable the output as the first thing we do. */ output->funcs->prepare(output); } crtc->funcs->prepare(crtc); /* Set up the DPLL and any output state that needs to adjust or depend * on the DPLL. */ crtc->funcs->mode_set(crtc, mode, adjusted_mode, crtc->x, crtc->y); for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc == crtc) output->funcs->mode_set(output, mode, adjusted_mode); } /* Only upload when needed, to avoid unneeded delays. */ if (!crtc->active && crtc->funcs->gamma_set) crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); /* Now, enable the clocks, plane, pipe, and outputs that we set up. */ crtc->funcs->commit(crtc); for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc == crtc) output->funcs->commit(output); } ret = TRUE; done: if (ret) { crtc->active = TRUE; if (scrn->pScreen) xf86CrtcSetScreenSubpixelOrder(scrn->pScreen); if (scrn->ModeSet) scrn->ModeSet(scrn); /* Make sure the HW cursor is hidden if it's supposed to be, in case * it was hidden while the CRTC was disabled */ if (!xf86_config->cursor_on) xf86_hide_cursors(scrn); } else { crtc->x = saved_x; crtc->y = saved_y; crtc->rotation = saved_rotation; crtc->mode = saved_mode; if (saved_transform_present) RRTransformCopy(&crtc->transform, &saved_transform); crtc->transformPresent = saved_transform_present; } free((void *) adjusted_mode->name); free(adjusted_mode); if (didLock) crtc->funcs->unlock(crtc); return ret; } /** * Sets the given video mode on the given crtc, but without providing * a transform */ Bool xf86CrtcSetMode(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { return xf86CrtcSetModeTransform(crtc, mode, rotation, NULL, x, y); } /** * Pans the screen, does not change the mode */ void xf86CrtcSetOrigin(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr scrn = crtc->scrn; crtc->x = x; crtc->y = y; if (xf86CrtcIsLeased(crtc)) return; if (crtc->funcs->set_origin) { if (!xf86CrtcRotate(crtc)) return; crtc->funcs->set_origin(crtc, x, y); if (scrn->ModeSet) scrn->ModeSet(scrn); } else xf86CrtcSetMode(crtc, &crtc->mode, crtc->rotation, x, y); } /* * Output functions */ extern XF86ConfigPtr xf86configptr; typedef enum { OPTION_PREFERRED_MODE, OPTION_ZOOM_MODES, OPTION_POSITION, OPTION_BELOW, OPTION_RIGHT_OF, OPTION_ABOVE, OPTION_LEFT_OF, OPTION_ENABLE, OPTION_DISABLE, OPTION_MIN_CLOCK, OPTION_MAX_CLOCK, OPTION_IGNORE, OPTION_ROTATE, OPTION_PANNING, OPTION_PRIMARY, OPTION_DEFAULT_MODES, } OutputOpts; static OptionInfoRec xf86OutputOptions[] = { {OPTION_PREFERRED_MODE, "PreferredMode", OPTV_STRING, {0}, FALSE}, {OPTION_ZOOM_MODES, "ZoomModes", OPTV_STRING, {0}, FALSE }, {OPTION_POSITION, "Position", OPTV_STRING, {0}, FALSE}, {OPTION_BELOW, "Below", OPTV_STRING, {0}, FALSE}, {OPTION_RIGHT_OF, "RightOf", OPTV_STRING, {0}, FALSE}, {OPTION_ABOVE, "Above", OPTV_STRING, {0}, FALSE}, {OPTION_LEFT_OF, "LeftOf", OPTV_STRING, {0}, FALSE}, {OPTION_ENABLE, "Enable", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_DISABLE, "Disable", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_MIN_CLOCK, "MinClock", OPTV_FREQ, {0}, FALSE}, {OPTION_MAX_CLOCK, "MaxClock", OPTV_FREQ, {0}, FALSE}, {OPTION_IGNORE, "Ignore", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE}, {OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE}, {OPTION_PRIMARY, "Primary", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_DEFAULT_MODES, "DefaultModes", OPTV_BOOLEAN, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; enum { OPTION_MODEDEBUG, OPTION_PREFER_CLONEMODE, OPTION_NO_OUTPUT_INITIAL_SIZE, }; static OptionInfoRec xf86DeviceOptions[] = { {OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_PREFER_CLONEMODE, "PreferCloneMode", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_NO_OUTPUT_INITIAL_SIZE, "NoOutputInitialSize", OPTV_STRING, {0}, FALSE}, {-1, NULL, OPTV_NONE, {0}, FALSE}, }; static void xf86OutputSetMonitor(xf86OutputPtr output) { char *option_name; const char *monitor; if (!output->name) return; free(output->options); output->options = xnfalloc(sizeof(xf86OutputOptions)); memcpy(output->options, xf86OutputOptions, sizeof(xf86OutputOptions)); XNFasprintf(&option_name, "monitor-%s", output->name); monitor = xf86findOptionValue(output->scrn->options, option_name); if (!monitor) monitor = output->name; else xf86MarkOptionUsedByName(output->scrn->options, option_name); free(option_name); output->conf_monitor = xf86findMonitor(monitor, xf86configptr->conf_monitor_lst); /* * Find the monitor section of the screen and use that */ if (!output->conf_monitor && output->use_screen_monitor) output->conf_monitor = xf86findMonitor(output->scrn->monitor->id, xf86configptr->conf_monitor_lst); if (output->conf_monitor) { xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s using monitor section %s\n", output->name, output->conf_monitor->mon_identifier); xf86ProcessOptions(output->scrn->scrnIndex, output->conf_monitor->mon_option_lst, output->options); } else xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s has no monitor section\n", output->name); } Bool xf86OutputForceEnabled(xf86OutputPtr output) { Bool enable; if (xf86GetOptValBool(output->options, OPTION_ENABLE, &enable) && enable) return TRUE; return FALSE; } static Bool xf86OutputEnabled(xf86OutputPtr output, Bool strict) { Bool enable, disable; /* check to see if this output was enabled in the config file */ if (xf86GetOptValBool(output->options, OPTION_ENABLE, &enable) && enable) { xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s enabled by config file\n", output->name); return TRUE; } /* or if this output was disabled in the config file */ if (xf86GetOptValBool(output->options, OPTION_DISABLE, &disable) && disable) { xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s disabled by config file\n", output->name); return FALSE; } /* If not, try to only light up the ones we know are connected which are supposed to be on the desktop */ if (strict) { enable = output->status == XF86OutputStatusConnected && !output->non_desktop; } /* But if that fails, try to light up even outputs we're unsure of */ else { enable = output->status != XF86OutputStatusDisconnected; } xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s %sconnected\n", output->name, enable ? "" : "dis"); return enable; } static Bool xf86OutputIgnored(xf86OutputPtr output) { return xf86ReturnOptValBool(output->options, OPTION_IGNORE, FALSE); } static const char *direction[4] = { "normal", "left", "inverted", "right" }; static Rotation xf86OutputInitialRotation(xf86OutputPtr output) { const char *rotate_name = xf86GetOptValString(output->options, OPTION_ROTATE); int i; if (!rotate_name) { if (output->initial_rotation) return output->initial_rotation; return RR_Rotate_0; } for (i = 0; i < 4; i++) if (xf86nameCompare(direction[i], rotate_name) == 0) return 1 << i; return RR_Rotate_0; } xf86OutputPtr xf86OutputCreate(ScrnInfoPtr scrn, const xf86OutputFuncsRec * funcs, const char *name) { xf86OutputPtr output, *outputs; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int len; Bool primary; if (name) len = strlen(name) + 1; else len = 0; output = calloc(sizeof(xf86OutputRec) + len, 1); if (!output) return NULL; output->scrn = scrn; output->funcs = funcs; if (name) { output->name = (char *) (output + 1); strcpy(output->name, name); } output->subpixel_order = SubPixelUnknown; /* * Use the old per-screen monitor section for the first output */ output->use_screen_monitor = (xf86_config->num_output == 0); #ifdef RANDR_12_INTERFACE output->randr_output = NULL; #endif if (name) { xf86OutputSetMonitor(output); if (xf86OutputIgnored(output)) { free(output); return FALSE; } } if (xf86_config->output) outputs = reallocarray(xf86_config->output, xf86_config->num_output + 1, sizeof(xf86OutputPtr)); else outputs = xallocarray(xf86_config->num_output + 1, sizeof(xf86OutputPtr)); if (!outputs) { free(output); return NULL; } xf86_config->output = outputs; if (xf86GetOptValBool(output->options, OPTION_PRIMARY, &primary) && primary) { memmove(xf86_config->output + 1, xf86_config->output, xf86_config->num_output * sizeof(xf86OutputPtr)); xf86_config->output[0] = output; } else { xf86_config->output[xf86_config->num_output] = output; } xf86_config->num_output++; return output; } Bool xf86OutputRename(xf86OutputPtr output, const char *name) { char *newname = strdup(name); if (!newname) return FALSE; /* so sorry... */ if (output->name && output->name != (char *) (output + 1)) free(output->name); output->name = newname; xf86OutputSetMonitor(output); if (xf86OutputIgnored(output)) return FALSE; return TRUE; } void xf86OutputUseScreenMonitor(xf86OutputPtr output, Bool use_screen_monitor) { if (use_screen_monitor != output->use_screen_monitor) { output->use_screen_monitor = use_screen_monitor; xf86OutputSetMonitor(output); } } void xf86OutputDestroy(xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int o; (*output->funcs->destroy) (output); while (output->probed_modes) xf86DeleteMode(&output->probed_modes, output->probed_modes); for (o = 0; o < xf86_config->num_output; o++) if (xf86_config->output[o] == output) { memmove(&xf86_config->output[o], &xf86_config->output[o + 1], ((xf86_config->num_output - (o + 1)) * sizeof(void *))); xf86_config->num_output--; break; } if (output->name && output->name != (char *) (output + 1)) free(output->name); free(output); } /* * Called during CreateScreenResources to hook up RandR */ static Bool xf86CrtcCreateScreenResources(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); screen->CreateScreenResources = config->CreateScreenResources; if (!(*screen->CreateScreenResources) (screen)) return FALSE; if (!xf86RandR12CreateScreenResources(screen)) return FALSE; return TRUE; } /* * Clean up config on server reset */ static Bool xf86CrtcCloseScreen(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o, c; /* The randr_output and randr_crtc pointers are already invalid as * the DIX resources were freed when the associated resources were * freed. Clear them now; referencing through them during the rest * of the CloseScreen sequence will not end well. */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; output->randr_output = NULL; } for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; crtc->randr_crtc = NULL; } screen->CloseScreen = config->CloseScreen; xf86RotateCloseScreen(screen); xf86RandR12CloseScreen(screen); screen->CloseScreen(screen); /* detach any providers */ if (config->randr_provider) { RRProviderDestroy(config->randr_provider); config->randr_provider = NULL; } return TRUE; } /* * Called at ScreenInit time to set up */ #ifdef RANDR_13_INTERFACE int #else Bool #endif xf86CrtcScreenInit(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int c; /* Rotation */ xf86RandR12Init(screen); /* support all rotations if every crtc has the shadow alloc funcs */ for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; if (!crtc->funcs->shadow_allocate || !crtc->funcs->shadow_create) break; } if (c == config->num_crtc) { xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 | RR_Reflect_X | RR_Reflect_Y); xf86RandR12SetTransformSupport(screen, TRUE); } else { xf86RandR12SetRotations(screen, RR_Rotate_0); xf86RandR12SetTransformSupport(screen, FALSE); } /* Wrap CreateScreenResources so we can initialize the RandR code */ config->CreateScreenResources = screen->CreateScreenResources; screen->CreateScreenResources = xf86CrtcCreateScreenResources; config->CloseScreen = screen->CloseScreen; screen->CloseScreen = xf86CrtcCloseScreen; /* This might still be marked wrapped from a previous generation */ config->BlockHandler = NULL; #ifdef XFreeXDGA _xf86_di_dga_init_internal(screen); #endif #ifdef RANDR_13_INTERFACE return RANDR_INTERFACE_VERSION; #else return TRUE; #endif } static DisplayModePtr xf86DefaultMode(xf86OutputPtr output, int width, int height) { DisplayModePtr target_mode = NULL; DisplayModePtr mode; int target_diff = 0; int target_preferred = 0; int mm_height; mm_height = output->mm_height; if (!mm_height) mm_height = (768 * 25.4) / DEFAULT_DPI; /* * Pick a mode closest to DEFAULT_DPI */ for (mode = output->probed_modes; mode; mode = mode->next) { int dpi; int preferred = (((mode->type & M_T_PREFERRED) != 0) + ((mode->type & M_T_USERPREF) != 0)); int diff; if (xf86ModeWidth(mode, output->initial_rotation) > width || xf86ModeHeight(mode, output->initial_rotation) > height) continue; /* yes, use VDisplay here, not xf86ModeHeight */ dpi = (mode->VDisplay * 254) / (mm_height * 10); diff = dpi - DEFAULT_DPI; diff = diff < 0 ? -diff : diff; if (target_mode == NULL || (preferred > target_preferred) || (preferred == target_preferred && diff < target_diff)) { target_mode = mode; target_diff = diff; target_preferred = preferred; } } return target_mode; } static DisplayModePtr xf86ClosestMode(xf86OutputPtr output, DisplayModePtr match, Rotation match_rotation, int width, int height) { DisplayModePtr target_mode = NULL; DisplayModePtr mode; int target_diff = 0; /* * Pick a mode closest to the specified mode */ for (mode = output->probed_modes; mode; mode = mode->next) { int dx, dy; int diff; if (xf86ModeWidth(mode, output->initial_rotation) > width || xf86ModeHeight(mode, output->initial_rotation) > height) continue; /* exact matches are preferred */ if (output->initial_rotation == match_rotation && xf86ModesEqual(mode, match)) return mode; dx = xf86ModeWidth(match, match_rotation) - xf86ModeWidth(mode, output-> initial_rotation); dy = xf86ModeHeight(match, match_rotation) - xf86ModeHeight(mode, output-> initial_rotation); diff = dx * dx + dy * dy; if (target_mode == NULL || diff < target_diff) { target_mode = mode; target_diff = diff; } } return target_mode; } static DisplayModePtr xf86OutputHasPreferredMode(xf86OutputPtr output, int width, int height) { DisplayModePtr mode; for (mode = output->probed_modes; mode; mode = mode->next) { if (xf86ModeWidth(mode, output->initial_rotation) > width || xf86ModeHeight(mode, output->initial_rotation) > height) continue; if (mode->type & M_T_PREFERRED) return mode; } return NULL; } static DisplayModePtr xf86OutputHasUserPreferredMode(xf86OutputPtr output) { DisplayModePtr mode, first = output->probed_modes; for (mode = first; mode && mode->next != first; mode = mode->next) if (mode->type & M_T_USERPREF) return mode; return NULL; } static int xf86PickCrtcs(ScrnInfoPtr scrn, xf86CrtcPtr * best_crtcs, DisplayModePtr * modes, int n, int width, int height) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int c, o; xf86OutputPtr output; xf86CrtcPtr crtc; xf86CrtcPtr *crtcs; int best_score; int score; int my_score; if (n == config->num_output) return 0; output = config->output[n]; /* * Compute score with this output disabled */ best_crtcs[n] = NULL; best_score = xf86PickCrtcs(scrn, best_crtcs, modes, n + 1, width, height); if (modes[n] == NULL) return best_score; crtcs = xallocarray(config->num_output, sizeof(xf86CrtcPtr)); if (!crtcs) return best_score; my_score = 1; /* Score outputs that are known to be connected higher */ if (output->status == XF86OutputStatusConnected) my_score++; /* Score outputs with preferred modes higher */ if (xf86OutputHasPreferredMode(output, width, height)) my_score++; /* * Select a crtc for this output and * then attempt to configure the remaining * outputs */ for (c = 0; c < config->num_crtc; c++) { if ((output->possible_crtcs & (1 << c)) == 0) continue; crtc = config->crtc[c]; /* * Check to see if some other output is * using this crtc */ for (o = 0; o < n; o++) if (best_crtcs[o] == crtc) break; if (o < n) { /* * If the two outputs desire the same mode, * see if they can be cloned */ if (xf86ModesEqual(modes[o], modes[n]) && config->output[o]->initial_rotation == config->output[n]->initial_rotation && config->output[o]->initial_x == config->output[n]->initial_x && config->output[o]->initial_y == config->output[n]->initial_y) { if ((output->possible_clones & (1 << o)) == 0) continue; /* nope, try next CRTC */ } else continue; /* different modes, can't clone */ } crtcs[n] = crtc; memcpy(crtcs, best_crtcs, n * sizeof(xf86CrtcPtr)); score = my_score + xf86PickCrtcs(scrn, crtcs, modes, n + 1, width, height); if (score > best_score) { best_score = score; memcpy(best_crtcs, crtcs, config->num_output * sizeof(xf86CrtcPtr)); } } free(crtcs); return best_score; } /* * Compute the virtual size necessary to place all of the available * crtcs in the specified configuration. * * canGrow indicates that the driver can make the screen larger than its initial * configuration. If FALSE, this function will enlarge the screen to include * the largest available mode. */ static void xf86DefaultScreenLimits(ScrnInfoPtr scrn, int *widthp, int *heightp, Bool canGrow) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int width = 0, height = 0; int o; int c; int s; for (c = 0; c < config->num_crtc; c++) { int crtc_width = 0, crtc_height = 0; xf86CrtcPtr crtc = config->crtc[c]; if (crtc->enabled) { crtc_width = crtc->desiredX + xf86ModeWidth(&crtc->desiredMode, crtc->desiredRotation); crtc_height = crtc->desiredY + xf86ModeHeight(&crtc->desiredMode, crtc->desiredRotation); } if (!canGrow) { for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; for (s = 0; s < config->num_crtc; s++) if (output->possible_crtcs & (1 << s)) { DisplayModePtr mode; for (mode = output->probed_modes; mode; mode = mode->next) { if (mode->HDisplay > crtc_width) crtc_width = mode->HDisplay; if (mode->VDisplay > crtc_width) crtc_width = mode->VDisplay; if (mode->VDisplay > crtc_height) crtc_height = mode->VDisplay; if (mode->HDisplay > crtc_height) crtc_height = mode->HDisplay; } } } } if (crtc_width > width) width = crtc_width; if (crtc_height > height) height = crtc_height; } if (config->maxWidth && width > config->maxWidth) width = config->maxWidth; if (config->maxHeight && height > config->maxHeight) height = config->maxHeight; if (config->minWidth && width < config->minWidth) width = config->minWidth; if (config->minHeight && height < config->minHeight) height = config->minHeight; *widthp = width; *heightp = height; } #define POSITION_UNSET -100000 /* * check if the user configured any outputs at all * with either a position or a relative setting or a mode. */ static Bool xf86UserConfiguredOutputs(ScrnInfoPtr scrn, DisplayModePtr * modes) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; Bool user_conf = FALSE; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; const char *position; const char *relative_name; OutputOpts relation; int r; static const OutputOpts relations[] = { OPTION_BELOW, OPTION_RIGHT_OF, OPTION_ABOVE, OPTION_LEFT_OF }; position = xf86GetOptValString(output->options, OPTION_POSITION); if (position) user_conf = TRUE; relation = 0; relative_name = NULL; for (r = 0; r < 4; r++) { relation = relations[r]; relative_name = xf86GetOptValString(output->options, relation); if (relative_name) break; } if (relative_name) user_conf = TRUE; modes[o] = xf86OutputHasUserPreferredMode(output); if (modes[o]) user_conf = TRUE; } return user_conf; } static Bool xf86InitialOutputPositions(ScrnInfoPtr scrn, DisplayModePtr * modes) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; int min_x, min_y; /* check for initial right-of heuristic */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; if (output->initial_x || output->initial_y) return TRUE; } for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; output->initial_x = output->initial_y = POSITION_UNSET; } /* * Loop until all outputs are set */ for (;;) { Bool any_set = FALSE; Bool keep_going = FALSE; for (o = 0; o < config->num_output; o++) { static const OutputOpts relations[] = { OPTION_BELOW, OPTION_RIGHT_OF, OPTION_ABOVE, OPTION_LEFT_OF }; xf86OutputPtr output = config->output[o]; xf86OutputPtr relative; const char *relative_name; const char *position; OutputOpts relation; int r; if (output->initial_x != POSITION_UNSET) continue; position = xf86GetOptValString(output->options, OPTION_POSITION); /* * Absolute position wins */ if (position) { int x, y; if (sscanf(position, "%d %d", &x, &y) == 2) { output->initial_x = x; output->initial_y = y; } else { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Output %s position not of form \"x y\"\n", output->name); output->initial_x = output->initial_y = 0; } any_set = TRUE; continue; } /* * Next comes relative positions */ relation = 0; relative_name = NULL; for (r = 0; r < 4; r++) { relation = relations[r]; relative_name = xf86GetOptValString(output->options, relation); if (relative_name) break; } if (relative_name) { int or; relative = NULL; for (or = 0; or < config->num_output; or++) { xf86OutputPtr out_rel = config->output[or]; XF86ConfMonitorPtr rel_mon = out_rel->conf_monitor; if (rel_mon) { if (xf86nameCompare(rel_mon->mon_identifier, relative_name) == 0) { relative = config->output[or]; break; } } if (strcmp(out_rel->name, relative_name) == 0) { relative = config->output[or]; break; } } if (!relative) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Cannot position output %s relative to unknown output %s\n", output->name, relative_name); output->initial_x = 0; output->initial_y = 0; any_set = TRUE; continue; } if (!modes[or]) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Cannot position output %s relative to output %s without modes\n", output->name, relative_name); output->initial_x = 0; output->initial_y = 0; any_set = TRUE; continue; } if (relative->initial_x == POSITION_UNSET) { keep_going = TRUE; continue; } output->initial_x = relative->initial_x; output->initial_y = relative->initial_y; switch (relation) { case OPTION_BELOW: output->initial_y += xf86ModeHeight(modes[or], relative->initial_rotation); break; case OPTION_RIGHT_OF: output->initial_x += xf86ModeWidth(modes[or], relative->initial_rotation); break; case OPTION_ABOVE: if (modes[o]) output->initial_y -= xf86ModeHeight(modes[o], output->initial_rotation); break; case OPTION_LEFT_OF: if (modes[o]) output->initial_x -= xf86ModeWidth(modes[o], output->initial_rotation); break; default: break; } any_set = TRUE; continue; } /* Nothing set, just stick them at 0,0 */ output->initial_x = 0; output->initial_y = 0; any_set = TRUE; } if (!keep_going) break; if (!any_set) { for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; if (output->initial_x == POSITION_UNSET) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Output position loop. Moving %s to 0,0\n", output->name); output->initial_x = output->initial_y = 0; break; } } } } /* * normalize positions */ min_x = 1000000; min_y = 1000000; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; if (output->initial_x < min_x) min_x = output->initial_x; if (output->initial_y < min_y) min_y = output->initial_y; } for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; output->initial_x -= min_x; output->initial_y -= min_y; } return TRUE; } static void xf86InitialPanning(ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; const char *panning = xf86GetOptValString(output->options, OPTION_PANNING); int width, height, left, top; int track_width, track_height, track_left, track_top; int brdr[4]; memset(&output->initialTotalArea, 0, sizeof(BoxRec)); memset(&output->initialTrackingArea, 0, sizeof(BoxRec)); memset(output->initialBorder, 0, 4 * sizeof(INT16)); if (!panning) continue; switch (sscanf(panning, "%dx%d+%d+%d/%dx%d+%d+%d/%d/%d/%d/%d", &width, &height, &left, &top, &track_width, &track_height, &track_left, &track_top, &brdr[0], &brdr[1], &brdr[2], &brdr[3])) { case 12: output->initialBorder[0] = brdr[0]; output->initialBorder[1] = brdr[1]; output->initialBorder[2] = brdr[2]; output->initialBorder[3] = brdr[3]; /* fall through */ case 8: output->initialTrackingArea.x1 = track_left; output->initialTrackingArea.y1 = track_top; output->initialTrackingArea.x2 = track_left + track_width; output->initialTrackingArea.y2 = track_top + track_height; /* fall through */ case 4: output->initialTotalArea.x1 = left; output->initialTotalArea.y1 = top; /* fall through */ case 2: output->initialTotalArea.x2 = output->initialTotalArea.x1 + width; output->initialTotalArea.y2 = output->initialTotalArea.y1 + height; break; default: xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Broken panning specification '%s' for output %s in config file\n", panning, output->name); } } } /** Return - 0 + if a should be earlier, same or later than b in list */ static int xf86ModeCompare(DisplayModePtr a, DisplayModePtr b) { int diff; diff = ((b->type & M_T_PREFERRED) != 0) - ((a->type & M_T_PREFERRED) != 0); if (diff) return diff; diff = b->HDisplay * b->VDisplay - a->HDisplay * a->VDisplay; if (diff) return diff; diff = b->Clock - a->Clock; return diff; } /** * Insertion sort input in-place and return the resulting head */ static DisplayModePtr xf86SortModes(DisplayModePtr input) { DisplayModePtr output = NULL, i, o, n, *op, prev; /* sort by preferred status and pixel area */ while (input) { i = input; input = input->next; for (op = &output; (o = *op); op = &o->next) if (xf86ModeCompare(o, i) > 0) break; i->next = *op; *op = i; } /* prune identical modes */ for (o = output; o && (n = o->next); o = n) { if (!strcmp(o->name, n->name) && xf86ModesEqual(o, n)) { o->next = n->next; free((void *) n->name); free(n); n = o; } } /* hook up backward links */ prev = NULL; for (o = output; o; o = o->next) { o->prev = prev; prev = o; } return output; } static const char * preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output) { const char *preferred_mode = NULL; /* Check for a configured preference for a particular mode */ preferred_mode = xf86GetOptValString(output->options, OPTION_PREFERRED_MODE); if (preferred_mode) return preferred_mode; if (pScrn->display->modes && *pScrn->display->modes) preferred_mode = *pScrn->display->modes; return preferred_mode; } /** identify a token * args * *src a string with zero or more tokens, e.g. "tok0 tok1", * **token stores a pointer to the first token character, * *len stores the token length. * return * a pointer into src[] at the token terminating character, or * NULL if no token is found. */ static const char * gettoken(const char *src, const char **token, int *len) { const char *delim = " \t"; int skip; if (!src) return NULL; skip = strspn(src, delim); *token = &src[skip]; *len = strcspn(*token, delim); /* Support for backslash escaped delimiters could be implemented * here. */ /* (*token)[0] != '\0' <==> *len > 0 */ if (*len > 0) return &(*token)[*len]; else return NULL; } /** Check for a user configured zoom mode list, Option "ZoomModes": * * Section "Monitor" * Identifier "a21inch" * Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" * EndSection * * Each user mode name is searched for independently so the list * specification order is free. An output mode is matched at most * once, a mode with an already set M_T_USERDEF type bit is skipped. * Thus a repeat mode name specification matches the next output mode * with the same name. * * Ctrl+Alt+Keypad-{Plus,Minus} zooms {in,out} by selecting the * {next,previous} M_T_USERDEF mode in the screen modes list, itself * sorted toward lower dot area or lower dot clock frequency, see * modes/xf86Crtc.c: xf86SortModes() xf86SetScrnInfoModes(), and * common/xf86Cursor.c: xf86ZoomViewport(). */ static int processZoomModes(xf86OutputPtr output) { const char *zoom_modes; int count = 0; zoom_modes = xf86GetOptValString(output->options, OPTION_ZOOM_MODES); if (zoom_modes) { const char *token, *next; int len; next = gettoken(zoom_modes, &token, &len); while (next) { DisplayModePtr mode; for (mode = output->probed_modes; mode; mode = mode->next) if (!strncmp(token, mode->name, len) /* prefix match */ && mode->name[len] == '\0' /* equal length */ && !(mode->type & M_T_USERDEF)) { /* no rematch */ mode->type |= M_T_USERDEF; break; } count++; next = gettoken(next, &token, &len); } } return count; } static void GuessRangeFromModes(MonPtr mon, DisplayModePtr mode) { if (!mon || !mode) return; mon->nHsync = 1; mon->hsync[0].lo = 1024.0; mon->hsync[0].hi = 0.0; mon->nVrefresh = 1; mon->vrefresh[0].lo = 1024.0; mon->vrefresh[0].hi = 0.0; while (mode) { if (!mode->HSync) mode->HSync = ((float) mode->Clock) / ((float) mode->HTotal); if (!mode->VRefresh) mode->VRefresh = (1000.0 * ((float) mode->Clock)) / ((float) (mode->HTotal * mode->VTotal)); if (mode->HSync < mon->hsync[0].lo) mon->hsync[0].lo = mode->HSync; if (mode->HSync > mon->hsync[0].hi) mon->hsync[0].hi = mode->HSync; if (mode->VRefresh < mon->vrefresh[0].lo) mon->vrefresh[0].lo = mode->VRefresh; if (mode->VRefresh > mon->vrefresh[0].hi) mon->vrefresh[0].hi = mode->VRefresh; mode = mode->next; } /* stretch out the bottom to fit 640x480@60 */ if (mon->hsync[0].lo > 31.0) mon->hsync[0].lo = 31.0; if (mon->vrefresh[0].lo > 58.0) mon->vrefresh[0].lo = 58.0; } enum det_monrec_source { sync_config, sync_edid, sync_default }; struct det_monrec_parameter { MonRec *mon_rec; int *max_clock; Bool set_hsync; Bool set_vrefresh; enum det_monrec_source *sync_source; }; static void handle_detailed_monrec(struct detailed_monitor_section *det_mon, void *data) { struct det_monrec_parameter *p; p = (struct det_monrec_parameter *) data; if (det_mon->type == DS_RANGES) { struct monitor_ranges *ranges = &det_mon->section.ranges; if (p->set_hsync && ranges->max_h) { p->mon_rec->hsync[p->mon_rec->nHsync].lo = ranges->min_h; p->mon_rec->hsync[p->mon_rec->nHsync].hi = ranges->max_h; p->mon_rec->nHsync++; if (*p->sync_source == sync_default) *p->sync_source = sync_edid; } if (p->set_vrefresh && ranges->max_v) { p->mon_rec->vrefresh[p->mon_rec->nVrefresh].lo = ranges->min_v; p->mon_rec->vrefresh[p->mon_rec->nVrefresh].hi = ranges->max_v; p->mon_rec->nVrefresh++; if (*p->sync_source == sync_default) *p->sync_source = sync_edid; } if (ranges->max_clock * 1000 > *p->max_clock) *p->max_clock = ranges->max_clock * 1000; } } void xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; /* When canGrow was TRUE in the initial configuration we have to * compare against the maximum values so that we don't drop modes. * When canGrow was FALSE, the maximum values would have been clamped * anyway. */ if (maxX == 0 || maxY == 0) { maxX = config->maxWidth; maxY = config->maxHeight; } /* Probe the list of modes for each output. */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; DisplayModePtr mode; DisplayModePtr config_modes = NULL, output_modes, default_modes = NULL; const char *preferred_mode; xf86MonPtr edid_monitor; XF86ConfMonitorPtr conf_monitor; MonRec mon_rec; int min_clock = 0; int max_clock = 0; double clock; Bool add_default_modes; Bool debug_modes = config->debug_modes || xf86Initialising; enum det_monrec_source sync_source = sync_default; while (output->probed_modes != NULL) xf86DeleteMode(&output->probed_modes, output->probed_modes); /* * Check connection status */ output->status = (*output->funcs->detect) (output); if (output->status == XF86OutputStatusDisconnected && !xf86ReturnOptValBool(output->options, OPTION_ENABLE, FALSE)) { xf86OutputSetEDID(output, NULL); continue; } memset(&mon_rec, '\0', sizeof(mon_rec)); conf_monitor = output->conf_monitor; if (conf_monitor) { int i; for (i = 0; i < conf_monitor->mon_n_hsync; i++) { mon_rec.hsync[mon_rec.nHsync].lo = conf_monitor->mon_hsync[i].lo; mon_rec.hsync[mon_rec.nHsync].hi = conf_monitor->mon_hsync[i].hi; mon_rec.nHsync++; sync_source = sync_config; } for (i = 0; i < conf_monitor->mon_n_vrefresh; i++) { mon_rec.vrefresh[mon_rec.nVrefresh].lo = conf_monitor->mon_vrefresh[i].lo; mon_rec.vrefresh[mon_rec.nVrefresh].hi = conf_monitor->mon_vrefresh[i].hi; mon_rec.nVrefresh++; sync_source = sync_config; } config_modes = xf86GetMonitorModes(scrn, conf_monitor); } output_modes = (*output->funcs->get_modes) (output); /* * If the user has a preference, respect it. * Otherwise, don't second-guess the driver. */ if (!xf86GetOptValBool(output->options, OPTION_DEFAULT_MODES, &add_default_modes)) add_default_modes = (output_modes == NULL); edid_monitor = output->MonInfo; if (edid_monitor) { struct det_monrec_parameter p; struct cea_data_block *hdmi_db; /* if display is not continuous-frequency, don't add default modes */ if (!gtf_supported(edid_monitor)) add_default_modes = FALSE; p.mon_rec = &mon_rec; p.max_clock = &max_clock; p.set_hsync = mon_rec.nHsync == 0; p.set_vrefresh = mon_rec.nVrefresh == 0; p.sync_source = &sync_source; xf86ForEachDetailedBlock(edid_monitor, handle_detailed_monrec, &p); /* Look at the CEA HDMI vendor block for the max TMDS freq */ hdmi_db = xf86MonitorFindHDMIBlock(edid_monitor); if (hdmi_db && hdmi_db->len >= 7) { int tmds_freq = hdmi_db->u.vendor.hdmi.max_tmds_clock * 5000; xf86DrvMsg(scrn->scrnIndex, X_PROBED, "HDMI max TMDS frequency %dKHz\n", tmds_freq); if (tmds_freq > max_clock) max_clock = tmds_freq; } } if (xf86GetOptValFreq(output->options, OPTION_MIN_CLOCK, OPTUNITS_KHZ, &clock)) min_clock = (int) clock; if (xf86GetOptValFreq(output->options, OPTION_MAX_CLOCK, OPTUNITS_KHZ, &clock)) max_clock = (int) clock; /* If we still don't have a sync range, guess wildly */ if (!mon_rec.nHsync || !mon_rec.nVrefresh) GuessRangeFromModes(&mon_rec, output_modes); /* * These limits will end up setting a 1024x768@60Hz mode by default, * which seems like a fairly good mode to use when nothing else is * specified */ if (mon_rec.nHsync == 0) { mon_rec.hsync[0].lo = 31.0; mon_rec.hsync[0].hi = 55.0; mon_rec.nHsync = 1; } if (mon_rec.nVrefresh == 0) { mon_rec.vrefresh[0].lo = 58.0; mon_rec.vrefresh[0].hi = 62.0; mon_rec.nVrefresh = 1; } if (add_default_modes) default_modes = xf86GetDefaultModes(); /* * If this is not an RB monitor, remove RB modes from the default * pool. RB modes from the config or the monitor itself are fine. */ if (!mon_rec.reducedblanking) xf86ValidateModesReducedBlanking(scrn, default_modes); if (sync_source == sync_config) { /* * Check output and config modes against sync range from config file */ xf86ValidateModesSync(scrn, output_modes, &mon_rec); xf86ValidateModesSync(scrn, config_modes, &mon_rec); } /* * Check default modes against sync range */ xf86ValidateModesSync(scrn, default_modes, &mon_rec); /* * Check default modes against monitor max clock */ if (max_clock) { xf86ValidateModesClocks(scrn, default_modes, &min_clock, &max_clock, 1); xf86ValidateModesClocks(scrn, output_modes, &min_clock, &max_clock, 1); } output->probed_modes = NULL; output->probed_modes = xf86ModesAdd(output->probed_modes, config_modes); output->probed_modes = xf86ModesAdd(output->probed_modes, output_modes); output->probed_modes = xf86ModesAdd(output->probed_modes, default_modes); /* * Check all modes against max size, interlace, and doublescan */ if (maxX && maxY) xf86ValidateModesSize(scrn, output->probed_modes, maxX, maxY, 0); { int flags = (output->interlaceAllowed ? V_INTERLACE : 0) | (output->doubleScanAllowed ? V_DBLSCAN : 0); xf86ValidateModesFlags(scrn, output->probed_modes, flags); } /* * Check all modes against output */ for (mode = output->probed_modes; mode != NULL; mode = mode->next) if (mode->status == MODE_OK) mode->status = (*output->funcs->mode_valid) (output, mode); xf86PruneInvalidModes(scrn, &output->probed_modes, debug_modes); output->probed_modes = xf86SortModes(output->probed_modes); /* Check for a configured preference for a particular mode */ preferred_mode = preferredMode(scrn, output); if (preferred_mode) { for (mode = output->probed_modes; mode; mode = mode->next) { if (!strcmp(preferred_mode, mode->name)) { if (mode != output->probed_modes) { if (mode->prev) mode->prev->next = mode->next; if (mode->next) mode->next->prev = mode->prev; mode->next = output->probed_modes; output->probed_modes->prev = mode; mode->prev = NULL; output->probed_modes = mode; } mode->type |= (M_T_PREFERRED | M_T_USERPREF); break; } } } /* Ctrl+Alt+Keypad-{Plus,Minus} zoom mode: M_T_USERDEF mode type */ processZoomModes(output); output->initial_rotation = xf86OutputInitialRotation(output); if (debug_modes) { if (output->probed_modes != NULL) { xf86DrvMsg(scrn->scrnIndex, X_INFO, "Printing probed modes for output %s\n", output->name); } else { xf86DrvMsg(scrn->scrnIndex, X_INFO, "No remaining probed modes for output %s\n", output->name); } } for (mode = output->probed_modes; mode != NULL; mode = mode->next) { /* The code to choose the best mode per pipe later on will require * VRefresh to be set. */ mode->VRefresh = xf86ModeVRefresh(mode); xf86SetModeCrtc(mode, INTERLACE_HALVE_V); if (debug_modes) xf86PrintModeline(scrn->scrnIndex, mode); } } } /** * Copy one of the output mode lists to the ScrnInfo record */ static DisplayModePtr biggestMode(DisplayModePtr a, DisplayModePtr b) { int A, B; if (!a) return b; if (!b) return a; A = a->HDisplay * a->VDisplay; B = b->HDisplay * b->VDisplay; if (A > B) return a; return b; } static xf86OutputPtr SetCompatOutput(xf86CrtcConfigPtr config) { xf86OutputPtr output = NULL, test = NULL; DisplayModePtr maxmode = NULL, testmode, mode; int o, compat = -1, count, mincount = 0; if (config->num_output == 0) return NULL; /* Look for one that's definitely connected */ for (o = 0; o < config->num_output; o++) { test = config->output[o]; if (!test->crtc) continue; if (test->status != XF86OutputStatusConnected) continue; if (!test->probed_modes) continue; testmode = mode = test->probed_modes; for (count = 0; mode; mode = mode->next, count++) testmode = biggestMode(testmode, mode); if (!output) { output = test; compat = o; maxmode = testmode; mincount = count; } else if (maxmode == biggestMode(maxmode, testmode)) { output = test; compat = o; maxmode = testmode; mincount = count; } else if ((maxmode->HDisplay == testmode->HDisplay) && (maxmode->VDisplay == testmode->VDisplay) && count <= mincount) { output = test; compat = o; maxmode = testmode; mincount = count; } } /* If we didn't find one, take anything we can get */ if (!output) { for (o = 0; o < config->num_output; o++) { test = config->output[o]; if (!test->crtc) continue; if (!test->probed_modes) continue; if (!output) { output = test; compat = o; } else if (test->probed_modes->HDisplay < output->probed_modes->HDisplay) { output = test; compat = o; } } } if (compat >= 0) { config->compat_output = compat; } else if (config->compat_output >= 0 && config->compat_output < config->num_output) { /* Don't change the compat output when no valid outputs found */ output = config->output[config->compat_output]; } /* All outputs are disconnected, select one to fake */ if (!output && config->num_output) { config->compat_output = 0; output = config->output[config->compat_output]; } return output; } void xf86SetScrnInfoModes(ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86OutputPtr output; xf86CrtcPtr crtc; DisplayModePtr last, mode = NULL; output = SetCompatOutput(config); if (!output) return; /* punt */ crtc = output->crtc; /* Clear any existing modes from scrn->modes */ while (scrn->modes != NULL) xf86DeleteMode(&scrn->modes, scrn->modes); /* Set scrn->modes to the mode list for the 'compat' output */ scrn->modes = xf86DuplicateModes(scrn, output->probed_modes); if (crtc) { for (mode = scrn->modes; mode; mode = mode->next) if (xf86ModesEqual(mode, &crtc->desiredMode)) break; } if (!scrn->modes) { scrn->modes = xf86ModesAdd(scrn->modes, xf86CVTMode(scrn->display->virtualX, scrn->display->virtualY, 60, 0, 0)); } /* For some reason, scrn->modes is circular, unlike the other mode * lists. How great is that? */ for (last = scrn->modes; last && last->next; last = last->next); last->next = scrn->modes; scrn->modes->prev = last; if (mode) { while (scrn->modes != mode) scrn->modes = scrn->modes->next; } scrn->currentMode = scrn->modes; #ifdef XFreeXDGA if (scrn->pScreen) _xf86_di_dga_reinit_internal(scrn->pScreen); #endif } static Bool xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled) { Bool any_enabled = FALSE; int o; /* * Don't bother enabling outputs on GPU screens: a client needs to attach * it to a source provider before setting a mode that scans out a shared * pixmap. */ if (scrn->is_gpu) return FALSE; for (o = 0; o < config->num_output; o++) any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], TRUE); if (!any_enabled) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "No outputs definitely connected, trying again...\n"); for (o = 0; o < config->num_output; o++) any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], FALSE); } return any_enabled; } static Bool nextEnabledOutput(xf86CrtcConfigPtr config, Bool *enabled, int *index) { int o = *index; for (o++; o < config->num_output; o++) { if (enabled[o]) { *index = o; return TRUE; } } return FALSE; } static Bool aspectMatch(float a, float b) { return fabs(1 - (a / b)) < 0.05; } static DisplayModePtr nextAspectMode(xf86OutputPtr o, DisplayModePtr last, float aspect) { DisplayModePtr m = NULL; if (!o) return NULL; if (!last) m = o->probed_modes; else m = last->next; for (; m; m = m->next) if (aspectMatch(aspect, (float) m->HDisplay / (float) m->VDisplay)) return m; return NULL; } static DisplayModePtr bestModeForAspect(xf86CrtcConfigPtr config, Bool *enabled, float aspect) { int o = -1, p; DisplayModePtr mode = NULL, test = NULL, match = NULL; if (!nextEnabledOutput(config, enabled, &o)) return NULL; while ((mode = nextAspectMode(config->output[o], mode, aspect))) { test = mode; for (p = o; nextEnabledOutput(config, enabled, &p);) { test = xf86OutputFindClosestMode(config->output[p], mode); if (!test) break; if (test->HDisplay != mode->HDisplay || test->VDisplay != mode->VDisplay) { test = NULL; break; } } /* if we didn't match it on all outputs, try the next one */ if (!test) continue; /* if it's bigger than the last one, save it */ if (!match || (test->HDisplay > match->HDisplay)) match = test; } /* return the biggest one found */ return match; } static int numEnabledOutputs(xf86CrtcConfigPtr config, Bool *enabled) { int i = 0, p; for (i = 0, p = -1; nextEnabledOutput(config, enabled, &p); i++) ; return i; } static Bool xf86TargetRightOf(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr *modes, Bool *enabled, int width, int height) { int o; int w = 0; Bool has_tile = FALSE; uint32_t configured_outputs; xf86GetOptValBool(config->options, OPTION_PREFER_CLONEMODE, &scrn->preferClone); if (scrn->preferClone) return FALSE; if (numEnabledOutputs(config, enabled) < 2) return FALSE; for (o = -1; nextEnabledOutput(config, enabled, &o); ) { DisplayModePtr mode = xf86OutputHasPreferredMode(config->output[o], width, height); if (!mode) return FALSE; w += mode->HDisplay; } if (w > width) return FALSE; w = 0; configured_outputs = 0; for (o = -1; nextEnabledOutput(config, enabled, &o); ) { DisplayModePtr mode = xf86OutputHasPreferredMode(config->output[o], width, height); if (configured_outputs & (1 << o)) continue; if (config->output[o]->tile_info.group_id) { has_tile = TRUE; continue; } config->output[o]->initial_x = w; w += mode->HDisplay; configured_outputs |= (1 << o); modes[o] = mode; } if (has_tile) { for (o = -1; nextEnabledOutput(config, enabled, &o); ) { int ht, vt, ot; int add_x, cur_x = w; struct xf86CrtcTileInfo *tile_info = &config->output[o]->tile_info, *this_tile; if (configured_outputs & (1 << o)) continue; if (!tile_info->group_id) continue; if (tile_info->tile_h_loc != 0 && tile_info->tile_v_loc != 0) continue; for (ht = 0; ht < tile_info->num_h_tile; ht++) { int cur_y = 0; add_x = 0; for (vt = 0; vt < tile_info->num_v_tile; vt++) { for (ot = -1; nextEnabledOutput(config, enabled, &ot); ) { DisplayModePtr mode = xf86OutputHasPreferredMode(config->output[ot], width, height); if (!config->output[ot]->tile_info.group_id) continue; this_tile = &config->output[ot]->tile_info; if (this_tile->group_id != tile_info->group_id) continue; if (this_tile->tile_h_loc != ht || this_tile->tile_v_loc != vt) continue; config->output[ot]->initial_x = cur_x; config->output[ot]->initial_y = cur_y; if (vt == 0) add_x = this_tile->tile_h_size; cur_y += this_tile->tile_v_size; configured_outputs |= (1 << ot); modes[ot] = mode; } } cur_x += add_x; } w = cur_x; } } return TRUE; } static Bool xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr * modes, Bool *enabled, int width, int height) { int o, p; int max_pref_width = 0, max_pref_height = 0; DisplayModePtr *preferred, *preferred_match; Bool ret = FALSE; preferred = xnfcalloc(config->num_output, sizeof(DisplayModePtr)); preferred_match = xnfcalloc(config->num_output, sizeof(DisplayModePtr)); /* Check if the preferred mode is available on all outputs */ for (p = -1; nextEnabledOutput(config, enabled, &p);) { Rotation r = config->output[p]->initial_rotation; DisplayModePtr mode; if ((preferred[p] = xf86OutputHasPreferredMode(config->output[p], width, height))) { int pref_width = xf86ModeWidth(preferred[p], r); int pref_height = xf86ModeHeight(preferred[p], r); Bool all_match = TRUE; for (o = -1; nextEnabledOutput(config, enabled, &o);) { Bool match = FALSE; xf86OutputPtr output = config->output[o]; if (o == p) continue; /* * First see if the preferred mode matches on the next * output as well. This catches the common case of identical * monitors and makes sure they all have the same timings * and refresh. If that fails, we fall back to trying to * match just width & height. */ mode = xf86OutputHasPreferredMode(output, pref_width, pref_height); if (mode && xf86ModesEqual(mode, preferred[p])) { preferred[o] = mode; match = TRUE; } else { for (mode = output->probed_modes; mode; mode = mode->next) { Rotation ir = output->initial_rotation; if (xf86ModeWidth(mode, ir) == pref_width && xf86ModeHeight(mode, ir) == pref_height) { preferred[o] = mode; match = TRUE; } } } all_match &= match; } if (all_match && (pref_width * pref_height > max_pref_width * max_pref_height)) { for (o = -1; nextEnabledOutput(config, enabled, &o);) preferred_match[o] = preferred[o]; max_pref_width = pref_width; max_pref_height = pref_height; ret = TRUE; } } } /* * If there's no preferred mode, but only one monitor, pick the * biggest mode for its aspect ratio or 4:3, assuming one exists. */ if (!ret) do { float aspect = 0.0; DisplayModePtr a = NULL, b = NULL; if (numEnabledOutputs(config, enabled) != 1) break; p = -1; nextEnabledOutput(config, enabled, &p); if (config->output[p]->mm_height) aspect = (float) config->output[p]->mm_width / (float) config->output[p]->mm_height; a = bestModeForAspect(config, enabled, 4.0/3.0); if (aspect) b = bestModeForAspect(config, enabled, aspect); preferred_match[p] = biggestMode(a, b); if (preferred_match[p]) ret = TRUE; } while (0); if (ret) { /* oh good, there is a match. stash the selected modes and return. */ memcpy(modes, preferred_match, config->num_output * sizeof(DisplayModePtr)); } free(preferred); free(preferred_match); return ret; } static Bool xf86TargetAspect(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr * modes, Bool *enabled, int width, int height) { int o; float aspect = 0.0, *aspects; xf86OutputPtr output; Bool ret = FALSE; DisplayModePtr guess = NULL, aspect_guess = NULL, base_guess = NULL; aspects = xnfcalloc(config->num_output, sizeof(float)); /* collect the aspect ratios */ for (o = -1; nextEnabledOutput(config, enabled, &o);) { output = config->output[o]; if (output->mm_height) aspects[o] = (float) output->mm_width / (float) output->mm_height; else aspects[o] = 4.0 / 3.0; } /* check that they're all the same */ for (o = -1; nextEnabledOutput(config, enabled, &o);) { output = config->output[o]; if (!aspect) { aspect = aspects[o]; } else if (!aspectMatch(aspect, aspects[o])) { goto no_aspect_match; } } /* if they're all 4:3, just skip ahead and save effort */ if (!aspectMatch(aspect, 4.0 / 3.0)) aspect_guess = bestModeForAspect(config, enabled, aspect); no_aspect_match: base_guess = bestModeForAspect(config, enabled, 4.0 / 3.0); guess = biggestMode(base_guess, aspect_guess); if (!guess) goto out; /* found a mode that works everywhere, now apply it */ for (o = -1; nextEnabledOutput(config, enabled, &o);) { modes[o] = xf86OutputFindClosestMode(config->output[o], guess); } ret = TRUE; out: free(aspects); return ret; } static Bool xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr * modes, Bool *enabled, int width, int height) { DisplayModePtr target_mode = NULL; Rotation target_rotation = RR_Rotate_0; DisplayModePtr default_mode; int default_preferred, target_preferred = 0, o; /* User preferred > preferred > other modes */ for (o = -1; nextEnabledOutput(config, enabled, &o);) { default_mode = xf86DefaultMode(config->output[o], width, height); if (!default_mode) continue; default_preferred = (((default_mode->type & M_T_PREFERRED) != 0) + ((default_mode->type & M_T_USERPREF) != 0)); if (default_preferred > target_preferred || !target_mode) { target_mode = default_mode; target_preferred = default_preferred; target_rotation = config->output[o]->initial_rotation; config->compat_output = o; } } if (target_mode) modes[config->compat_output] = target_mode; /* Fill in other output modes */ for (o = -1; nextEnabledOutput(config, enabled, &o);) { if (!modes[o]) modes[o] = xf86ClosestMode(config->output[o], target_mode, target_rotation, width, height); } return target_mode != NULL; } static Bool xf86TargetUserpref(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, DisplayModePtr * modes, Bool *enabled, int width, int height) { int o; if (xf86UserConfiguredOutputs(scrn, modes)) return xf86TargetFallback(scrn, config, modes, enabled, width, height); for (o = -1; nextEnabledOutput(config, enabled, &o);) if (xf86OutputHasUserPreferredMode(config->output[o])) return xf86TargetFallback(scrn, config, modes, enabled, width, height); return FALSE; } void xf86AssignNoOutputInitialSize(ScrnInfoPtr scrn, const OptionInfoRec *options, int *no_output_width, int *no_output_height) { int width = 0, height = 0; const char *no_output_size = xf86GetOptValString(options, OPTION_NO_OUTPUT_INITIAL_SIZE); *no_output_width = NO_OUTPUT_DEFAULT_WIDTH; *no_output_height = NO_OUTPUT_DEFAULT_HEIGHT; if (no_output_size == NULL) { return; } if (sscanf(no_output_size, "%d %d", &width, &height) != 2) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "\"NoOutputInitialSize\" string \"%s\" not of form " "\"width height\"\n", no_output_size); return; } *no_output_width = width; *no_output_height = height; } /** * Construct default screen configuration * * Given auto-detected (and, eventually, configured) values, * construct a usable configuration for the system * * canGrow indicates that the driver can resize the screen to larger than its * initially configured size via the config->funcs->resize hook. If TRUE, this * function will set virtualX and virtualY to match the initial configuration * and leave config->max{Width,Height} alone. If FALSE, it will bloat * virtual[XY] to include the largest modes and set config->max{Width,Height} * accordingly. */ Bool xf86InitialConfiguration(ScrnInfoPtr scrn, Bool canGrow) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o, c; xf86CrtcPtr *crtcs; DisplayModePtr *modes; Bool *enabled; int width, height; int no_output_width, no_output_height; int i = scrn->scrnIndex; Bool have_outputs = TRUE; Bool ret; Bool success = FALSE; /* Set up the device options */ config->options = xnfalloc(sizeof(xf86DeviceOptions)); memcpy(config->options, xf86DeviceOptions, sizeof(xf86DeviceOptions)); xf86ProcessOptions(scrn->scrnIndex, scrn->options, config->options); config->debug_modes = xf86ReturnOptValBool(config->options, OPTION_MODEDEBUG, FALSE); if (scrn->display->virtualX && !scrn->is_gpu) width = scrn->display->virtualX; else width = config->maxWidth; if (scrn->display->virtualY && !scrn->is_gpu) height = scrn->display->virtualY; else height = config->maxHeight; xf86AssignNoOutputInitialSize(scrn, config->options, &no_output_width, &no_output_height); xf86ProbeOutputModes(scrn, width, height); crtcs = xnfcalloc(config->num_output, sizeof(xf86CrtcPtr)); modes = xnfcalloc(config->num_output, sizeof(DisplayModePtr)); enabled = xnfcalloc(config->num_output, sizeof(Bool)); ret = xf86CollectEnabledOutputs(scrn, config, enabled); if (ret == FALSE && canGrow) { if (!scrn->is_gpu) xf86DrvMsg(i, X_WARNING, "Unable to find connected outputs - setting %dx%d " "initial framebuffer\n", no_output_width, no_output_height); have_outputs = FALSE; } else { if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); else if (xf86TargetRightOf(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using spanning desktop for initial modes\n"); else if (xf86TargetPreferred (scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); else if (xf86TargetAspect(scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n"); else if (xf86TargetFallback (scrn, config, modes, enabled, width, height)) xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n"); else xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n"); } for (o = -1; nextEnabledOutput(config, enabled, &o);) { if (!modes[o]) xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Output %s enabled but has no modes\n", config->output[o]->name); else xf86DrvMsg (scrn->scrnIndex, X_INFO, "Output %s using initial mode %s +%d+%d\n", config->output[o]->name, modes[o]->name, config->output[o]->initial_x, config->output[o]->initial_y); } /* * Set the position of each output */ if (!xf86InitialOutputPositions(scrn, modes)) goto bailout; /* * Set initial panning of each output */ xf86InitialPanning(scrn); /* * Assign CRTCs to fit output configuration */ if (have_outputs && !xf86PickCrtcs(scrn, crtcs, modes, 0, width, height)) goto bailout; /* XXX override xf86 common frame computation code */ if (!scrn->is_gpu) { scrn->display->frameX0 = 0; scrn->display->frameY0 = 0; } for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; crtc->enabled = FALSE; memset(&crtc->desiredMode, '\0', sizeof(crtc->desiredMode)); } /* * Set initial configuration */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; DisplayModePtr mode = modes[o]; xf86CrtcPtr crtc = crtcs[o]; if (mode && crtc) { xf86SaveModeContents(&crtc->desiredMode, mode); crtc->desiredRotation = output->initial_rotation; crtc->desiredX = output->initial_x; crtc->desiredY = output->initial_y; crtc->desiredTransformPresent = FALSE; crtc->enabled = TRUE; memcpy(&crtc->panningTotalArea, &output->initialTotalArea, sizeof(BoxRec)); memcpy(&crtc->panningTrackingArea, &output->initialTrackingArea, sizeof(BoxRec)); memcpy(crtc->panningBorder, output->initialBorder, 4 * sizeof(INT16)); output->crtc = crtc; } else { output->crtc = NULL; } } if (scrn->display->virtualX == 0 || scrn->is_gpu) { /* * Expand virtual size to cover the current config and potential mode * switches, if the driver can't enlarge the screen later. */ xf86DefaultScreenLimits(scrn, &width, &height, canGrow); if (have_outputs == FALSE) { if (width < no_output_width && height < no_output_height) { width = no_output_width; height = no_output_height; } } if (!scrn->is_gpu) { scrn->display->virtualX = width; scrn->display->virtualY = height; } } if (width > scrn->virtualX) scrn->virtualX = width; if (height > scrn->virtualY) scrn->virtualY = height; /* * Make sure the configuration isn't too small. */ if (width < config->minWidth || height < config->minHeight) goto bailout; /* * Limit the crtc config to virtual[XY] if the driver can't grow the * desktop. */ if (!canGrow) { xf86CrtcSetSizeRange(scrn, config->minWidth, config->minHeight, width, height); } xf86SetScrnInfoModes(scrn); success = TRUE; bailout: free(crtcs); free(modes); free(enabled); return success; } /* Turn a CRTC off, using the DPMS function and disabling the cursor */ static void xf86DisableCrtc(xf86CrtcPtr crtc) { if (xf86CrtcIsLeased(crtc)) return; crtc->funcs->dpms(crtc, DPMSModeOff); xf86_crtc_hide_cursor(crtc); } /* * Check the CRTC we're going to map each output to vs. its current * CRTC. If they don't match, we have to disable the output and the CRTC * since the driver will have to re-route things. */ static void xf86PrepareOutputs(ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; if (xf86OutputIsLeased(output)) continue; #if RANDR_GET_CRTC_INTERFACE /* Disable outputs that are unused or will be re-routed */ if (!output->funcs->get_crtc || output->crtc != (*output->funcs->get_crtc) (output) || output->crtc == NULL) #endif (*output->funcs->dpms) (output, DPMSModeOff); } } static void xf86PrepareCrtcs(ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int c; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; #if RANDR_GET_CRTC_INTERFACE xf86OutputPtr output = NULL; uint32_t desired_outputs = 0, current_outputs = 0; int o; if (xf86CrtcIsLeased(crtc)) continue; for (o = 0; o < config->num_output; o++) { output = config->output[o]; if (output->crtc == crtc) desired_outputs |= (1 << o); /* If we can't tell where it's mapped, force it off */ if (!output->funcs->get_crtc) { desired_outputs = 0; break; } if ((*output->funcs->get_crtc) (output) == crtc) current_outputs |= (1 << o); } /* * If mappings are different or the CRTC is unused, * we need to disable it */ if (desired_outputs != current_outputs || !desired_outputs) xf86DisableCrtc(crtc); #else if (xf86CrtcIsLeased(crtc)) continue; xf86DisableCrtc(crtc); #endif } } /* * Using the desired mode information in each crtc, set * modes (used in EnterVT functions, or at server startup) */ Bool xf86SetDesiredModes(ScrnInfoPtr scrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc = config->crtc[0]; int enabled = 0, failed = 0; int c; /* A driver with this hook will take care of this */ if (!crtc->funcs->set_mode_major) { xf86PrepareOutputs(scrn); xf86PrepareCrtcs(scrn); } for (c = 0; c < config->num_crtc; c++) { xf86OutputPtr output = NULL; int o; RRTransformPtr transform; crtc = config->crtc[c]; /* Skip disabled CRTCs */ if (!crtc->enabled) continue; if (xf86CompatOutput(scrn) && xf86CompatCrtc(scrn) == crtc) output = xf86CompatOutput(scrn); else { for (o = 0; o < config->num_output; o++) if (config->output[o]->crtc == crtc) { output = config->output[o]; break; } } /* paranoia */ if (!output) continue; /* Mark that we'll need to re-set the mode for sure */ memset(&crtc->mode, 0, sizeof(crtc->mode)); if (!crtc->desiredMode.CrtcHDisplay) { DisplayModePtr mode = xf86OutputFindClosestMode(output, scrn->currentMode); if (!mode) return FALSE; xf86SaveModeContents(&crtc->desiredMode, mode); crtc->desiredRotation = RR_Rotate_0; crtc->desiredTransformPresent = FALSE; crtc->desiredX = 0; crtc->desiredY = 0; } if (crtc->desiredTransformPresent) transform = &crtc->desiredTransform; else transform = NULL; if (xf86CrtcSetModeTransform (crtc, &crtc->desiredMode, crtc->desiredRotation, transform, crtc->desiredX, crtc->desiredY)) { ++enabled; } else { for (o = 0; o < config->num_output; o++) if (config->output[o]->crtc == crtc) config->output[o]->crtc = NULL; crtc->enabled = FALSE; ++failed; } } xf86DisableUnusedFunctions(scrn); return enabled != 0 || failed == 0; } /** * In the current world order, there are lists of modes per output, which may * or may not include the mode that was asked to be set by XFree86's mode * selection. Find the closest one, in the following preference order: * * - Equality * - Closer in size to the requested mode, but no larger * - Closer in refresh rate to the requested mode. */ DisplayModePtr xf86OutputFindClosestMode(xf86OutputPtr output, DisplayModePtr desired) { DisplayModePtr best = NULL, scan = NULL; for (scan = output->probed_modes; scan != NULL; scan = scan->next) { /* If there's an exact match, we're done. */ if (xf86ModesEqual(scan, desired)) { best = desired; break; } /* Reject if it's larger than the desired mode. */ if (scan->HDisplay > desired->HDisplay || scan->VDisplay > desired->VDisplay) { continue; } /* * If we haven't picked a best mode yet, use the first * one in the size range */ if (best == NULL) { best = scan; continue; } /* Find if it's closer to the right size than the current best * option. */ if ((scan->HDisplay > best->HDisplay && scan->VDisplay >= best->VDisplay) || (scan->HDisplay >= best->HDisplay && scan->VDisplay > best->VDisplay)) { best = scan; continue; } /* Find if it's still closer to the right refresh than the current * best resolution. */ if (scan->HDisplay == best->HDisplay && scan->VDisplay == best->VDisplay && (fabs(scan->VRefresh - desired->VRefresh) < fabs(best->VRefresh - desired->VRefresh))) { best = scan; } } return best; } /** * When setting a mode through XFree86-VidModeExtension or XFree86-DGA, * take the specified mode and apply it to the crtc connected to the compat * output. Then, find similar modes for the other outputs, as with the * InitialConfiguration code above. The goal is to clone the desired * mode across all outputs that are currently active. */ Bool xf86SetSingleMode(ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); Bool ok = TRUE; xf86OutputPtr compat_output; DisplayModePtr compat_mode = NULL; int c; /* * Let the compat output drive the final mode selection */ compat_output = xf86CompatOutput(pScrn); if (compat_output) compat_mode = xf86OutputFindClosestMode(compat_output, desired); if (compat_mode) desired = compat_mode; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; DisplayModePtr crtc_mode = NULL; int o; if (!crtc->enabled) continue; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; DisplayModePtr output_mode; /* skip outputs not on this crtc */ if (output->crtc != crtc) continue; if (crtc_mode) { output_mode = xf86OutputFindClosestMode(output, crtc_mode); if (output_mode != crtc_mode) output->crtc = NULL; } else crtc_mode = xf86OutputFindClosestMode(output, desired); } if (!crtc_mode) { crtc->enabled = FALSE; continue; } if (!xf86CrtcSetModeTransform(crtc, crtc_mode, rotation, NULL, 0, 0)) ok = FALSE; else { xf86SaveModeContents(&crtc->desiredMode, crtc_mode); crtc->desiredRotation = rotation; crtc->desiredTransformPresent = FALSE; crtc->desiredX = 0; crtc->desiredY = 0; } } xf86DisableUnusedFunctions(pScrn); #ifdef RANDR_12_INTERFACE xf86RandR12TellChanged(pScrn->pScreen); #endif return ok; } /** * Set the DPMS power mode of all outputs and CRTCs. * * If the new mode is off, it will turn off outputs and then CRTCs. * Otherwise, it will affect CRTCs before outputs. */ void xf86DPMSSet(ScrnInfoPtr scrn, int mode, int flags) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int i; if (!scrn->vtSema) return; if (mode == DPMSModeOff) { for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; if (!xf86OutputIsLeased(output) && output->crtc != NULL) (*output->funcs->dpms) (output, mode); } } for (i = 0; i < config->num_crtc; i++) { xf86CrtcPtr crtc = config->crtc[i]; if (crtc->enabled) (*crtc->funcs->dpms) (crtc, mode); } if (mode != DPMSModeOff) { for (i = 0; i < config->num_output; i++) { xf86OutputPtr output = config->output[i]; if (!xf86OutputIsLeased(output) && output->crtc != NULL) (*output->funcs->dpms) (output, mode); } } } /** * Implement the screensaver by just calling down into the driver DPMS hooks. * * Even for monitors with no DPMS support, by the definition of our DPMS hooks, * the outputs will still get disabled (blanked). */ Bool xf86SaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (xf86IsUnblank(mode)) xf86DPMSSet(pScrn, DPMSModeOn, 0); else xf86DPMSSet(pScrn, DPMSModeOff, 0); return TRUE; } /** * Disable all inactive crtcs and outputs */ void xf86DisableUnusedFunctions(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int o, c; for (o = 0; o < xf86_config->num_output; o++) { xf86OutputPtr output = xf86_config->output[o]; if (!output->crtc) (*output->funcs->dpms) (output, DPMSModeOff); } for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (!crtc->enabled) { xf86DisableCrtc(crtc); memset(&crtc->mode, 0, sizeof(crtc->mode)); xf86RotateDestroy(crtc); crtc->active = FALSE; } } if (pScrn->pScreen) xf86_crtc_notify(pScrn->pScreen); if (pScrn->ModeSet) pScrn->ModeSet(pScrn); if (pScrn->pScreen) { if (pScrn->pScreen->isGPU) xf86CursorResetCursor(pScrn->pScreen->current_primary); else xf86CursorResetCursor(pScrn->pScreen); } } #ifdef RANDR_12_INTERFACE #define EDID_ATOM_NAME "EDID" /** * Set the RandR EDID property */ static void xf86OutputSetEDIDProperty(xf86OutputPtr output, void *data, int data_len) { Atom edid_atom = MakeAtom(EDID_ATOM_NAME, sizeof(EDID_ATOM_NAME) - 1, TRUE); /* This may get called before the RandR resources have been created */ if (output->randr_output == NULL) return; if (data_len != 0) { RRChangeOutputProperty(output->randr_output, edid_atom, XA_INTEGER, 8, PropModeReplace, data_len, data, FALSE, TRUE); } else { RRDeleteOutputProperty(output->randr_output, edid_atom); } } #define TILE_ATOM_NAME "TILE" /* changing this in the future could be tricky as people may hardcode 8 */ #define TILE_PROP_NUM_ITEMS 8 static void xf86OutputSetTileProperty(xf86OutputPtr output) { Atom tile_atom = MakeAtom(TILE_ATOM_NAME, sizeof(TILE_ATOM_NAME) - 1, TRUE); /* This may get called before the RandR resources have been created */ if (output->randr_output == NULL) return; if (output->tile_info.group_id != 0) { RRChangeOutputProperty(output->randr_output, tile_atom, XA_INTEGER, 32, PropModeReplace, TILE_PROP_NUM_ITEMS, (uint32_t *)&output->tile_info, FALSE, TRUE); } else { RRDeleteOutputProperty(output->randr_output, tile_atom); } } #endif /* Pull out a physical size from a detailed timing if available. */ struct det_phySize_parameter { xf86OutputPtr output; ddc_quirk_t quirks; Bool ret; }; static void handle_detailed_physical_size(struct detailed_monitor_section *det_mon, void *data) { struct det_phySize_parameter *p; p = (struct det_phySize_parameter *) data; if (p->ret == TRUE) return; xf86DetTimingApplyQuirks(det_mon, p->quirks, p->output->MonInfo->features.hsize, p->output->MonInfo->features.vsize); if (det_mon->type == DT && det_mon->section.d_timings.h_size != 0 && det_mon->section.d_timings.v_size != 0) { /* some sanity checking for aspect ratio: assume any h / v (or v / h) > 2.4 to be bogus. This would even include cinemascope */ if (((det_mon->section.d_timings.h_size * 5) < (det_mon->section.d_timings.v_size * 12)) && ((det_mon->section.d_timings.v_size * 5) < (det_mon->section.d_timings.h_size * 12))) { p->output->mm_width = det_mon->section.d_timings.h_size; p->output->mm_height = det_mon->section.d_timings.v_size; p->ret = TRUE; } else xf86DrvMsg(p->output->scrn->scrnIndex, X_WARNING, "Output %s: Strange aspect ratio (%i/%i), " "consider adding a quirk\n", p->output->name, det_mon->section.d_timings.h_size, det_mon->section.d_timings.v_size); } } Bool xf86OutputParseKMSTile(const char *tile_data, int tile_length, struct xf86CrtcTileInfo *tile_info) { int ret; ret = sscanf(tile_data, "%d:%d:%d:%d:%d:%d:%d:%d", &tile_info->group_id, &tile_info->flags, &tile_info->num_h_tile, &tile_info->num_v_tile, &tile_info->tile_h_loc, &tile_info->tile_v_loc, &tile_info->tile_h_size, &tile_info->tile_v_size); if (ret != 8) return FALSE; return TRUE; } void xf86OutputSetTile(xf86OutputPtr output, struct xf86CrtcTileInfo *tile_info) { if (tile_info) output->tile_info = *tile_info; else memset(&output->tile_info, 0, sizeof(output->tile_info)); #ifdef RANDR_12_INTERFACE xf86OutputSetTileProperty(output); #endif } /** * Set the EDID information for the specified output */ void xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon) { ScrnInfoPtr scrn = output->scrn; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); Bool debug_modes = config->debug_modes || xf86Initialising; #ifdef RANDR_12_INTERFACE int size; #endif free(output->MonInfo); output->MonInfo = edid_mon; output->mm_width = 0; output->mm_height = 0; if (debug_modes) { xf86DrvMsg(scrn->scrnIndex, X_INFO, "EDID for output %s\n", output->name); xf86PrintEDID(edid_mon); } /* Set the DDC properties for the 'compat' output */ /* GPU screens don't have a root window */ if (output == xf86CompatOutput(scrn) && !scrn->is_gpu) xf86SetDDCproperties(scrn, edid_mon); #ifdef RANDR_12_INTERFACE /* Set the RandR output properties */ size = 0; if (edid_mon) { if (edid_mon->ver.version == 1) { size = 128; if (edid_mon->flags & EDID_COMPLETE_RAWDATA) size += edid_mon->no_sections * 128; } else if (edid_mon->ver.version == 2) size = 256; } xf86OutputSetEDIDProperty(output, edid_mon ? edid_mon->rawData : NULL, size); #endif if (edid_mon) { struct det_phySize_parameter p; p.output = output; p.quirks = xf86DDCDetectQuirks(scrn->scrnIndex, edid_mon, FALSE); p.ret = FALSE; xf86ForEachDetailedBlock(edid_mon, handle_detailed_physical_size, &p); /* if no mm size is available from a detailed timing, check the max size field */ if ((!output->mm_width || !output->mm_height) && (edid_mon->features.hsize && edid_mon->features.vsize)) { output->mm_width = edid_mon->features.hsize * 10; output->mm_height = edid_mon->features.vsize * 10; } } } /** * Return the list of modes supported by the EDID information * stored in 'output' */ DisplayModePtr xf86OutputGetEDIDModes(xf86OutputPtr output) { ScrnInfoPtr scrn = output->scrn; xf86MonPtr edid_mon = output->MonInfo; if (!edid_mon) return NULL; return xf86DDCGetModes(scrn->scrnIndex, edid_mon); } /* maybe we should care about DDC1? meh. */ xf86MonPtr xf86OutputGetEDID(xf86OutputPtr output, I2CBusPtr pDDCBus) { ScrnInfoPtr scrn = output->scrn; xf86MonPtr mon; mon = xf86DoEEDID(scrn, pDDCBus, TRUE); if (mon) xf86DDCApplyQuirks(scrn->scrnIndex, mon); return mon; } static const char *_xf86ConnectorNames[] = { "None", "VGA", "DVI-I", "DVI-D", "DVI-A", "Composite", "S-Video", "Component", "LFP", "Proprietary", "HDMI", "DisplayPort", }; const char * xf86ConnectorGetName(xf86ConnectorType connector) { return _xf86ConnectorNames[connector]; } #ifdef XV static void x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) { dest->x1 = a->x1 > b->x1 ? a->x1 : b->x1; dest->x2 = a->x2 < b->x2 ? a->x2 : b->x2; dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1; dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2; if (dest->x1 >= dest->x2 || dest->y1 >= dest->y2) dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; } static void x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box) { if (crtc->enabled) { crtc_box->x1 = crtc->x; crtc_box->x2 = crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation); crtc_box->y1 = crtc->y; crtc_box->y2 = crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation); } else crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0; } static int xf86_crtc_box_area(BoxPtr box) { return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1); } /* * Return the crtc covering 'box'. If two crtcs cover a portion of * 'box', then prefer 'desired'. If 'desired' is NULL, then prefer the crtc * with greater coverage */ static xf86CrtcPtr xf86_covering_crtc(ScrnInfoPtr pScrn, BoxPtr box, xf86CrtcPtr desired, BoxPtr crtc_box_ret) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc, best_crtc; int coverage, best_coverage; int c; BoxRec crtc_box, cover_box; best_crtc = NULL; best_coverage = 0; crtc_box_ret->x1 = 0; crtc_box_ret->x2 = 0; crtc_box_ret->y1 = 0; crtc_box_ret->y2 = 0; for (c = 0; c < xf86_config->num_crtc; c++) { crtc = xf86_config->crtc[c]; x86_crtc_box(crtc, &crtc_box); x86_crtc_box_intersect(&cover_box, &crtc_box, box); coverage = xf86_crtc_box_area(&cover_box); if (coverage && crtc == desired) { *crtc_box_ret = crtc_box; return crtc; } else if (coverage > best_coverage) { *crtc_box_ret = crtc_box; best_crtc = crtc; best_coverage = coverage; } } return best_crtc; } /* * For overlay video, compute the relevant CRTC and * clip video to that. * * returning FALSE means there was a memory failure of some kind, * not that the video shouldn't be displayed */ Bool xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, xf86CrtcPtr * crtc_ret, xf86CrtcPtr desired_crtc, BoxPtr dst, INT32 *xa, INT32 *xb, INT32 *ya, INT32 *yb, RegionPtr reg, INT32 width, INT32 height) { Bool ret; RegionRec crtc_region_local; RegionPtr crtc_region = reg; if (crtc_ret) { BoxRec crtc_box; xf86CrtcPtr crtc = xf86_covering_crtc(pScrn, dst, desired_crtc, &crtc_box); if (crtc) { RegionInit(&crtc_region_local, &crtc_box, 1); crtc_region = &crtc_region_local; RegionIntersect(crtc_region, crtc_region, reg); } *crtc_ret = crtc; } ret = xf86XVClipVideoHelper(dst, xa, xb, ya, yb, crtc_region, width, height); if (crtc_region != reg) RegionUninit(&crtc_region_local); return ret; } #endif xf86_crtc_notify_proc_ptr xf86_wrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr new) { if (xf86CrtcConfigPrivateIndex != -1) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); xf86_crtc_notify_proc_ptr old; old = config->xf86_crtc_notify; config->xf86_crtc_notify = new; return old; } return NULL; } void xf86_unwrap_crtc_notify(ScreenPtr screen, xf86_crtc_notify_proc_ptr old) { if (xf86CrtcConfigPrivateIndex != -1) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); config->xf86_crtc_notify = old; } } void xf86_crtc_notify(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); if (config->xf86_crtc_notify) config->xf86_crtc_notify(screen); } Bool xf86_crtc_supports_gamma(ScrnInfoPtr pScrn) { if (xf86CrtcConfigPrivateIndex != -1) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc; /* for multiple drivers loaded we need this */ if (!xf86_config) return FALSE; if (xf86_config->num_crtc == 0) return FALSE; crtc = xf86_config->crtc[0]; return crtc->funcs->gamma_set != NULL; } return FALSE; } void xf86ProviderSetup(ScrnInfoPtr scrn, const xf86ProviderFuncsRec *funcs, const char *name) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); assert(!xf86_config->name); assert(name); xf86_config->name = strdup(name); xf86_config->provider_funcs = funcs; #ifdef RANDR_12_INTERFACE xf86_config->randr_provider = NULL; #endif } void xf86DetachAllCrtc(ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int i; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (crtc->randr_crtc) RRCrtcDetachScanoutPixmap(crtc->randr_crtc); /* dpms off */ xf86DisableCrtc(crtc); /* force a reset the next time its used */ crtc->randr_crtc->mode = NULL; crtc->mode.HDisplay = 0; crtc->x = crtc->y = 0; } } xorg-server-21.1.16/hw/xfree86/modes/xf86Cursors.c0000644000175000017500000005067314757411105015202 /* * Copyright © 2007 Keith Packard * Copyright © 2010-2011 Aaron Plattner * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include #include #include #include #include "xf86.h" #include "xf86DDC.h" #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86RandR12.h" #include "xf86CursorPriv.h" #include "X11/extensions/render.h" #include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" #include "picturestr.h" #include "cursorstr.h" #include "inputstr.h" /* * Returns the rotation being performed by the server. If the driver indicates * that it's handling the screen transform, then this returns RR_Rotate_0. */ static Rotation xf86_crtc_cursor_rotation(xf86CrtcPtr crtc) { if (crtc->driverIsPerformingTransform & XF86DriverTransformCursorImage) return RR_Rotate_0; return crtc->rotation; } /* * Given a screen coordinate, rotate back to a cursor source coordinate */ static void xf86_crtc_rotate_coord(Rotation rotation, int width, int height, int x_dst, int y_dst, int *x_src, int *y_src) { int t; switch (rotation & 0xf) { case RR_Rotate_0: break; case RR_Rotate_90: t = x_dst; x_dst = width - y_dst - 1; y_dst = t; break; case RR_Rotate_180: x_dst = width - x_dst - 1; y_dst = height - y_dst - 1; break; case RR_Rotate_270: t = x_dst; x_dst = y_dst; y_dst = height - t - 1; break; } if (rotation & RR_Reflect_X) x_dst = width - x_dst - 1; if (rotation & RR_Reflect_Y) y_dst = height - y_dst - 1; *x_src = x_dst; *y_src = y_dst; } /* * Given a cursor source coordinate, rotate to a screen coordinate */ static void xf86_crtc_rotate_coord_back(Rotation rotation, int width, int height, int x_dst, int y_dst, int *x_src, int *y_src) { int t; if (rotation & RR_Reflect_X) x_dst = width - x_dst - 1; if (rotation & RR_Reflect_Y) y_dst = height - y_dst - 1; switch (rotation & 0xf) { case RR_Rotate_0: break; case RR_Rotate_90: t = x_dst; x_dst = y_dst; y_dst = width - t - 1; break; case RR_Rotate_180: x_dst = width - x_dst - 1; y_dst = height - y_dst - 1; break; case RR_Rotate_270: t = x_dst; x_dst = height - y_dst - 1; y_dst = t; break; } *x_src = x_dst; *y_src = y_dst; } struct cursor_bit { CARD8 *byte; char bitpos; }; /* * Convert an x coordinate to a position within the cursor bitmap */ static struct cursor_bit cursor_bitpos(CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask) { const int flags = cursor_info->Flags; const Bool interleaved = ! !(flags & (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64)); const int width = cursor_info->MaxWidth; const int height = cursor_info->MaxHeight; const int stride = interleaved ? width / 4 : width / 8; struct cursor_bit ret; image += y * stride; if (flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK) mask = !mask; if (flags & HARDWARE_CURSOR_NIBBLE_SWAPPED) x = (x & ~3) | (3 - (x & 3)); if (((flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) == 0) == (X_BYTE_ORDER == X_BIG_ENDIAN)) x = (x & ~7) | (7 - (x & 7)); if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1) x = (x << 1) + mask; else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8) x = ((x & ~7) << 1) | (mask << 3) | (x & 7); else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16) x = ((x & ~15) << 1) | (mask << 4) | (x & 15); else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32) x = ((x & ~31) << 1) | (mask << 5) | (x & 31); else if (flags & HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64) x = ((x & ~63) << 1) | (mask << 6) | (x & 63); else if (mask) image += stride * height; ret.byte = image + (x / 8); ret.bitpos = x & 7; return ret; } /* * Fetch one bit from a cursor bitmap */ static CARD8 get_bit(CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask) { struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask); return (*bit.byte >> bit.bitpos) & 1; } /* * Set one bit in a cursor bitmap */ static void set_bit(CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask) { struct cursor_bit bit = cursor_bitpos(image, cursor_info, x, y, mask); *bit.byte |= 1 << bit.bitpos; } /* * Wrappers to deal with API compatibility with drivers that don't expose * *_cursor_*_check */ static inline Bool xf86_driver_has_show_cursor(xf86CrtcPtr crtc) { return crtc->funcs->show_cursor_check || crtc->funcs->show_cursor; } static inline Bool xf86_driver_has_load_cursor_image(xf86CrtcPtr crtc) { return crtc->funcs->load_cursor_image_check || crtc->funcs->load_cursor_image; } static inline Bool xf86_driver_has_load_cursor_argb(xf86CrtcPtr crtc) { return crtc->funcs->load_cursor_argb_check || crtc->funcs->load_cursor_argb; } static inline Bool xf86_driver_show_cursor(xf86CrtcPtr crtc) { if (crtc->funcs->show_cursor_check) return crtc->funcs->show_cursor_check(crtc); crtc->funcs->show_cursor(crtc); return TRUE; } static inline Bool xf86_driver_load_cursor_image(xf86CrtcPtr crtc, CARD8 *cursor_image) { if (crtc->funcs->load_cursor_image_check) return crtc->funcs->load_cursor_image_check(crtc, cursor_image); crtc->funcs->load_cursor_image(crtc, cursor_image); return TRUE; } static inline Bool xf86_driver_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *cursor_argb) { if (crtc->funcs->load_cursor_argb_check) return crtc->funcs->load_cursor_argb_check(crtc, cursor_argb); crtc->funcs->load_cursor_argb(crtc, cursor_argb); return TRUE; } /* * Load a two color cursor into a driver that supports only ARGB cursors */ static Bool xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image; int x, y; int xin, yin; int flags = cursor_info->Flags; CARD32 bits; const Rotation rotation = xf86_crtc_cursor_rotation(crtc); crtc->cursor_argb = FALSE; for (y = 0; y < cursor_info->MaxHeight; y++) for (x = 0; x < cursor_info->MaxWidth; x++) { xf86_crtc_rotate_coord(rotation, cursor_info->MaxWidth, cursor_info->MaxHeight, x, y, &xin, &yin); if (get_bit(src, cursor_info, xin, yin, TRUE) == ((flags & HARDWARE_CURSOR_INVERT_MASK) == 0)) { if (get_bit(src, cursor_info, xin, yin, FALSE)) bits = xf86_config->cursor_fg; else bits = xf86_config->cursor_bg; } else bits = 0; cursor_image[y * cursor_info->MaxWidth + x] = bits; } return xf86_driver_load_cursor_argb(crtc, cursor_image); } /* * Set the colors for a two-color cursor (ignore for ARGB cursors) */ static void xf86_set_cursor_colors(ScrnInfoPtr scrn, int bg, int fg) { ScreenPtr screen = scrn->pScreen; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); CursorPtr cursor = xf86CurrentCursor(screen); int c; CARD8 *bits = cursor ? dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey, screen) : NULL; /* Save ARGB versions of these colors */ xf86_config->cursor_fg = (CARD32) fg | 0xff000000; xf86_config->cursor_bg = (CARD32) bg | 0xff000000; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled && !crtc->cursor_argb) { if (xf86_driver_has_load_cursor_image(crtc)) crtc->funcs->set_cursor_colors(crtc, bg, fg); else if (bits) xf86_crtc_convert_cursor_to_argb(crtc, bits); } } } void xf86_crtc_hide_cursor(xf86CrtcPtr crtc) { if (crtc->cursor_shown) { crtc->funcs->hide_cursor(crtc); crtc->cursor_shown = FALSE; } } void xf86_hide_cursors(ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; xf86_config->cursor_on = FALSE; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) xf86_crtc_hide_cursor(crtc); } } Bool xf86_crtc_show_cursor(xf86CrtcPtr crtc) { if (!crtc->cursor_in_range) { crtc->funcs->hide_cursor(crtc); return TRUE; } if (!crtc->cursor_shown) crtc->cursor_shown = xf86_driver_show_cursor(crtc); return crtc->cursor_shown; } Bool xf86_show_cursors(ScrnInfoPtr scrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; xf86_config->cursor_on = TRUE; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled && !xf86_crtc_show_cursor(crtc)) return FALSE; } return TRUE; } static void xf86_crtc_transform_cursor_position(xf86CrtcPtr crtc, int *x, int *y) { ScrnInfoPtr scrn = crtc->scrn; ScreenPtr screen = scrn->pScreen; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&screen->devPrivates, xf86CursorScreenKey); int dx, dy, t; Bool swap_reflection = FALSE; *x = *x - crtc->x + ScreenPriv->HotX; *y = *y - crtc->y + ScreenPriv->HotY; switch (crtc->rotation & 0xf) { case RR_Rotate_0: break; case RR_Rotate_90: t = *x; *x = *y; *y = crtc->mode.VDisplay - t - 1; swap_reflection = TRUE; break; case RR_Rotate_180: *x = crtc->mode.HDisplay - *x - 1; *y = crtc->mode.VDisplay - *y - 1; break; case RR_Rotate_270: t = *x; *x = crtc->mode.HDisplay - *y - 1; *y = t; swap_reflection = TRUE; break; } if (swap_reflection) { if (crtc->rotation & RR_Reflect_Y) *x = crtc->mode.HDisplay - *x - 1; if (crtc->rotation & RR_Reflect_X) *y = crtc->mode.VDisplay - *y - 1; } else { if (crtc->rotation & RR_Reflect_X) *x = crtc->mode.HDisplay - *x - 1; if (crtc->rotation & RR_Reflect_Y) *y = crtc->mode.VDisplay - *y - 1; } /* * Transform position of cursor upper left corner */ xf86_crtc_rotate_coord_back(crtc->rotation, cursor_info->MaxWidth, cursor_info->MaxHeight, ScreenPriv->HotX, ScreenPriv->HotY, &dx, &dy); *x -= dx; *y -= dy; } static void xf86_crtc_set_cursor_position(xf86CrtcPtr crtc, int x, int y) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; DisplayModePtr mode = &crtc->mode; int crtc_x = x, crtc_y = y; /* * Transform position of cursor on screen */ if (crtc->rotation != RR_Rotate_0) xf86_crtc_transform_cursor_position(crtc, &crtc_x, &crtc_y); else { crtc_x -= crtc->x; crtc_y -= crtc->y; } /* * Disable the cursor when it is outside the viewport */ if (crtc_x >= mode->HDisplay || crtc_y >= mode->VDisplay || crtc_x <= -cursor_info->MaxWidth || crtc_y <= -cursor_info->MaxHeight) { crtc->cursor_in_range = FALSE; xf86_crtc_hide_cursor(crtc); } else { crtc->cursor_in_range = TRUE; if (crtc->driverIsPerformingTransform & XF86DriverTransformCursorPosition) crtc->funcs->set_cursor_position(crtc, x, y); else crtc->funcs->set_cursor_position(crtc, crtc_x, crtc_y); xf86_crtc_show_cursor(crtc); } } static void xf86_set_cursor_position(ScrnInfoPtr scrn, int x, int y) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; /* undo what xf86HWCurs did to the coordinates */ x += scrn->frameX0; y += scrn->frameY0; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) xf86_crtc_set_cursor_position(crtc, x, y); } } /* * Load a two-color cursor into a crtc, performing rotation as needed */ static Bool xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; CARD8 *cursor_image; const Rotation rotation = xf86_crtc_cursor_rotation(crtc); crtc->cursor_argb = FALSE; if (rotation == RR_Rotate_0) cursor_image = src; else { int x, y; int xin, yin; int stride = cursor_info->MaxWidth >> 2; cursor_image = xf86_config->cursor_image; memset(cursor_image, 0, cursor_info->MaxHeight * stride); for (y = 0; y < cursor_info->MaxHeight; y++) for (x = 0; x < cursor_info->MaxWidth; x++) { xf86_crtc_rotate_coord(rotation, cursor_info->MaxWidth, cursor_info->MaxHeight, x, y, &xin, &yin); if (get_bit(src, cursor_info, xin, yin, FALSE)) set_bit(cursor_image, cursor_info, x, y, FALSE); if (get_bit(src, cursor_info, xin, yin, TRUE)) set_bit(cursor_image, cursor_info, x, y, TRUE); } } return xf86_driver_load_cursor_image(crtc, cursor_image); } /* * Load a cursor image into all active CRTCs */ static Bool xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; xf86_config->cursor = xf86CurrentCursor(scrn->pScreen); for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) { if (xf86_driver_has_load_cursor_image(crtc)) { if (!xf86_crtc_load_cursor_image(crtc, src)) return FALSE; } else if (xf86_driver_has_load_cursor_argb(crtc)) { if (!xf86_crtc_convert_cursor_to_argb(crtc, src)) return FALSE; } else return FALSE; } } return TRUE; } static Bool xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; int c; if (cursor->bits->width > cursor_info->MaxWidth || cursor->bits->height > cursor_info->MaxHeight) return FALSE; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (!crtc->enabled) continue; if (crtc->transformPresent) return FALSE; } return TRUE; } static Bool xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; if (!xf86_use_hw_cursor(screen, cursor)) return FALSE; /* Make sure ARGB support is available */ if ((cursor_info->Flags & HARDWARE_CURSOR_ARGB) == 0) return FALSE; return TRUE; } static Bool xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; CARD32 *cursor_image = (CARD32 *) xf86_config->cursor_image; CARD32 *cursor_source = (CARD32 *) cursor->bits->argb; int x, y; int xin, yin; CARD32 bits; int source_width = cursor->bits->width; int source_height = cursor->bits->height; int image_width = cursor_info->MaxWidth; int image_height = cursor_info->MaxHeight; const Rotation rotation = xf86_crtc_cursor_rotation(crtc); for (y = 0; y < image_height; y++) for (x = 0; x < image_width; x++) { xf86_crtc_rotate_coord(rotation, image_width, image_height, x, y, &xin, &yin); if (xin < source_width && yin < source_height) bits = cursor_source[yin * source_width + xin]; else bits = 0; cursor_image[y * image_width + x] = bits; } return xf86_driver_load_cursor_argb(crtc, cursor_image); } static Bool xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; xf86_config->cursor = cursor; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) if (!xf86_crtc_load_cursor_argb(crtc, cursor)) return FALSE; } return TRUE; } Bool xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info; cursor_info = xf86CreateCursorInfoRec(); if (!cursor_info) return FALSE; xf86_config->cursor_image = malloc(max_width * max_height * 4); if (!xf86_config->cursor_image) { xf86DestroyCursorInfoRec(cursor_info); return FALSE; } xf86_config->cursor_info = cursor_info; cursor_info->MaxWidth = max_width; cursor_info->MaxHeight = max_height; cursor_info->Flags = flags; cursor_info->SetCursorColors = xf86_set_cursor_colors; cursor_info->SetCursorPosition = xf86_set_cursor_position; cursor_info->LoadCursorImageCheck = xf86_load_cursor_image; cursor_info->HideCursor = xf86_hide_cursors; cursor_info->ShowCursorCheck = xf86_show_cursors; cursor_info->UseHWCursor = xf86_use_hw_cursor; if (flags & HARDWARE_CURSOR_ARGB) { cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb; cursor_info->LoadCursorARGBCheck = xf86_load_cursor_argb; } xf86_hide_cursors(scrn); return xf86InitCursor(screen, cursor_info); } /** * Clean up CRTC-based cursor code */ void xf86_cursors_fini(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); if (xf86_config->cursor_info) { xf86DestroyCursorInfoRec(xf86_config->cursor_info); xf86_config->cursor_info = NULL; } free(xf86_config->cursor_image); xf86_config->cursor_image = NULL; xf86_config->cursor = NULL; } xorg-server-21.1.16/hw/xfree86/modes/xf86gtf.c0000644000175000017500000003173314757411105014316 /* * gtf.c Generate mode timings using the GTF Timing Standard * * gcc gtf.c -o gtf -lm -Wall * * Copyright (c) 2001, Andy Ritger aritger@nvidia.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * o Neither the name of NVIDIA nor the names of its contributors * may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * This program is based on the Generalized Timing Formula(GTF TM) * Standard Version: 1.0, Revision: 1.0 * * The GTF Document contains the following Copyright information: * * Copyright (c) 1994, 1995, 1996 - Video Electronics Standards * Association. Duplication of this document within VESA member * companies for review purposes is permitted. All other rights * reserved. * * While every precaution has been taken in the preparation * of this standard, the Video Electronics Standards Association and * its contributors assume no responsibility for errors or omissions, * and make no warranties, expressed or implied, of functionality * of suitability for any purpose. The sample code contained within * this standard may be used without restriction. * * * * The GTF EXCEL(TM) SPREADSHEET, a sample (and the definitive) * implementation of the GTF Timing Standard, is available at: * * ftp://ftp.vesa.org/pub/GTF/GTF_V1R1.xls */ /* Ruthlessly converted to server code by Adam Jackson */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86Modes.h" #include #define MARGIN_PERCENT 1.8 /* % of active vertical image */ #define CELL_GRAN 8.0 /* assumed character cell granularity */ #define MIN_PORCH 1 /* minimum front porch */ #define V_SYNC_RQD 3 /* width of vsync in lines */ #define H_SYNC_PERCENT 8.0 /* width of hsync as % of total line */ #define MIN_VSYNC_PLUS_BP 550.0 /* min time of vsync + back porch (microsec) */ #define M 600.0 /* blanking formula gradient */ #define C 40.0 /* blanking formula offset */ #define K 128.0 /* blanking formula scaling factor */ #define J 20.0 /* blanking formula scaling factor */ /* C' and M' are part of the Blanking Duty Cycle computation */ #define C_PRIME (((C - J) * K/256.0) + J) #define M_PRIME (K/256.0 * M) /* * xf86GTFMode() - as defined by the GTF Timing Standard, compute the * Stage 1 Parameters using the vertical refresh frequency. In other * words: input a desired resolution and desired refresh rate, and * output the GTF mode timings. * * XXX All the code is in place to compute interlaced modes, but I don't * feel like testing it right now. * * XXX margin computations are implemented but not tested (nor used by * XServer of fbset mode descriptions, from what I can tell). */ DisplayModePtr xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) { DisplayModeRec *mode = xnfcalloc(1, sizeof(DisplayModeRec)); float h_pixels_rnd; float v_lines_rnd; float v_field_rate_rqd; float top_margin; float bottom_margin; float interlace; float h_period_est; float vsync_plus_bp; float v_back_porch; float total_v_lines; float v_field_rate_est; float h_period; float v_field_rate; float v_frame_rate; float left_margin; float right_margin; float total_active_pixels; float ideal_duty_cycle; float h_blank; float total_pixels; float pixel_freq; float h_freq; float h_sync; float h_front_porch; float v_odd_front_porch_lines; /* 1. In order to give correct results, the number of horizontal * pixels requested is first processed to ensure that it is divisible * by the character size, by rounding it to the nearest character * cell boundary: * * [H PIXELS RND] = ((ROUND([H PIXELS]/[CELL GRAN RND],0))*[CELLGRAN RND]) */ h_pixels_rnd = rint((float) h_pixels / CELL_GRAN) * CELL_GRAN; /* 2. If interlace is requested, the number of vertical lines assumed * by the calculation must be halved, as the computation calculates * the number of vertical lines per field. In either case, the * number of lines is rounded to the nearest integer. * * [V LINES RND] = IF([INT RQD?]="y", ROUND([V LINES]/2,0), * ROUND([V LINES],0)) */ v_lines_rnd = interlaced ? rint((float) v_lines) / 2.0 : rint((float) v_lines); /* 3. Find the frame rate required: * * [V FIELD RATE RQD] = IF([INT RQD?]="y", [I/P FREQ RQD]*2, * [I/P FREQ RQD]) */ v_field_rate_rqd = interlaced ? (freq * 2.0) : (freq); /* 4. Find number of lines in Top margin: * * [TOP MARGIN (LINES)] = IF([MARGINS RQD?]="Y", * ROUND(([MARGIN%]/100*[V LINES RND]),0), * 0) */ top_margin = margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0); /* 5. Find number of lines in Bottom margin: * * [BOT MARGIN (LINES)] = IF([MARGINS RQD?]="Y", * ROUND(([MARGIN%]/100*[V LINES RND]),0), * 0) */ bottom_margin = margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0); /* 6. If interlace is required, then set variable [INTERLACE]=0.5: * * [INTERLACE]=(IF([INT RQD?]="y",0.5,0)) */ interlace = interlaced ? 0.5 : 0.0; /* 7. Estimate the Horizontal period * * [H PERIOD EST] = ((1/[V FIELD RATE RQD]) - [MIN VSYNC+BP]/1000000) / * ([V LINES RND] + (2*[TOP MARGIN (LINES)]) + * [MIN PORCH RND]+[INTERLACE]) * 1000000 */ h_period_est = (((1.0 / v_field_rate_rqd) - (MIN_VSYNC_PLUS_BP / 1000000.0)) / (v_lines_rnd + (2 * top_margin) + MIN_PORCH + interlace) * 1000000.0); /* 8. Find the number of lines in V sync + back porch: * * [V SYNC+BP] = ROUND(([MIN VSYNC+BP]/[H PERIOD EST]),0) */ vsync_plus_bp = rint(MIN_VSYNC_PLUS_BP / h_period_est); /* 9. Find the number of lines in V back porch alone: * * [V BACK PORCH] = [V SYNC+BP] - [V SYNC RND] * * XXX is "[V SYNC RND]" a typo? should be [V SYNC RQD]? */ v_back_porch = vsync_plus_bp - V_SYNC_RQD; (void) v_back_porch; /* 10. Find the total number of lines in Vertical field period: * * [TOTAL V LINES] = [V LINES RND] + [TOP MARGIN (LINES)] + * [BOT MARGIN (LINES)] + [V SYNC+BP] + [INTERLACE] + * [MIN PORCH RND] */ total_v_lines = v_lines_rnd + top_margin + bottom_margin + vsync_plus_bp + interlace + MIN_PORCH; /* 11. Estimate the Vertical field frequency: * * [V FIELD RATE EST] = 1 / [H PERIOD EST] / [TOTAL V LINES] * 1000000 */ v_field_rate_est = 1.0 / h_period_est / total_v_lines * 1000000.0; /* 12. Find the actual horizontal period: * * [H PERIOD] = [H PERIOD EST] / ([V FIELD RATE RQD] / [V FIELD RATE EST]) */ h_period = h_period_est / (v_field_rate_rqd / v_field_rate_est); /* 13. Find the actual Vertical field frequency: * * [V FIELD RATE] = 1 / [H PERIOD] / [TOTAL V LINES] * 1000000 */ v_field_rate = 1.0 / h_period / total_v_lines * 1000000.0; /* 14. Find the Vertical frame frequency: * * [V FRAME RATE] = (IF([INT RQD?]="y", [V FIELD RATE]/2, [V FIELD RATE])) */ v_frame_rate = interlaced ? v_field_rate / 2.0 : v_field_rate; (void) v_frame_rate; /* 15. Find number of pixels in left margin: * * [LEFT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y", * (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 / * [CELL GRAN RND]),0)) * [CELL GRAN RND], * 0)) */ left_margin = margins ? rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN : 0.0; /* 16. Find number of pixels in right margin: * * [RIGHT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y", * (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 / * [CELL GRAN RND]),0)) * [CELL GRAN RND], * 0)) */ right_margin = margins ? rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN : 0.0; /* 17. Find total number of active pixels in image and left and right * margins: * * [TOTAL ACTIVE PIXELS] = [H PIXELS RND] + [LEFT MARGIN (PIXELS)] + * [RIGHT MARGIN (PIXELS)] */ total_active_pixels = h_pixels_rnd + left_margin + right_margin; /* 18. Find the ideal blanking duty cycle from the blanking duty cycle * equation: * * [IDEAL DUTY CYCLE] = [C'] - ([M']*[H PERIOD]/1000) */ ideal_duty_cycle = C_PRIME - (M_PRIME * h_period / 1000.0); /* 19. Find the number of pixels in the blanking time to the nearest * double character cell: * * [H BLANK (PIXELS)] = (ROUND(([TOTAL ACTIVE PIXELS] * * [IDEAL DUTY CYCLE] / * (100-[IDEAL DUTY CYCLE]) / * (2*[CELL GRAN RND])), 0)) * * (2*[CELL GRAN RND]) */ h_blank = rint(total_active_pixels * ideal_duty_cycle / (100.0 - ideal_duty_cycle) / (2.0 * CELL_GRAN)) * (2.0 * CELL_GRAN); /* 20. Find total number of pixels: * * [TOTAL PIXELS] = [TOTAL ACTIVE PIXELS] + [H BLANK (PIXELS)] */ total_pixels = total_active_pixels + h_blank; /* 21. Find pixel clock frequency: * * [PIXEL FREQ] = [TOTAL PIXELS] / [H PERIOD] */ pixel_freq = total_pixels / h_period; /* 22. Find horizontal frequency: * * [H FREQ] = 1000 / [H PERIOD] */ h_freq = 1000.0 / h_period; /* Stage 1 computations are now complete; I should really pass the results to another function and do the Stage 2 computations, but I only need a few more values so I'll just append the computations here for now */ /* 17. Find the number of pixels in the horizontal sync period: * * [H SYNC (PIXELS)] =(ROUND(([H SYNC%] / 100 * [TOTAL PIXELS] / * [CELL GRAN RND]),0))*[CELL GRAN RND] */ h_sync = rint(H_SYNC_PERCENT / 100.0 * total_pixels / CELL_GRAN) * CELL_GRAN; /* 18. Find the number of pixels in the horizontal front porch period: * * [H FRONT PORCH (PIXELS)] = ([H BLANK (PIXELS)]/2)-[H SYNC (PIXELS)] */ h_front_porch = (h_blank / 2.0) - h_sync; /* 36. Find the number of lines in the odd front porch period: * * [V ODD FRONT PORCH(LINES)]=([MIN PORCH RND]+[INTERLACE]) */ v_odd_front_porch_lines = MIN_PORCH + interlace; /* finally, pack the results in the mode struct */ mode->HDisplay = (int) (h_pixels_rnd); mode->HSyncStart = (int) (h_pixels_rnd + h_front_porch); mode->HSyncEnd = (int) (h_pixels_rnd + h_front_porch + h_sync); mode->HTotal = (int) (total_pixels); mode->VDisplay = (int) (v_lines_rnd); mode->VSyncStart = (int) (v_lines_rnd + v_odd_front_porch_lines); mode->VSyncEnd = (int) (v_lines_rnd + v_odd_front_porch_lines + V_SYNC_RQD); mode->VTotal = (int) (total_v_lines); mode->Clock = (int) (pixel_freq * 1000.0); mode->HSync = h_freq; mode->VRefresh = freq; xf86SetModeDefaultName(mode); mode->Flags = V_NHSYNC | V_PVSYNC; if (interlaced) { mode->VTotal *= 2; mode->Flags |= V_INTERLACE; } return mode; } xorg-server-21.1.16/hw/xfree86/modes/xf86EdidModes.c0000644000175000017500000015205514757411105015374 /* * Copyright 2006 Luc Verhaegen. * Copyright 2008 Red Hat, Inc. * * 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, sub license, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file This file covers code to convert a xf86MonPtr containing EDID-probed * information into a list of modes, including applying monitor-specific * quirks to fix broken EDID data. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #define _PARSE_EDID_ #include "xf86.h" #include "xf86DDC.h" #include #include "property.h" #include "propertyst.h" #include "xf86Crtc.h" #include #include static void handle_detailed_rblank(struct detailed_monitor_section *det_mon, void *data) { if (det_mon->type == DS_RANGES) if (det_mon->section.ranges.supported_blanking & CVT_REDUCED) *(Bool *) data = TRUE; } static Bool xf86MonitorSupportsReducedBlanking(xf86MonPtr DDC) { /* EDID 1.4 explicitly defines RB support */ if (DDC->ver.revision >= 4) { Bool ret = FALSE; xf86ForEachDetailedBlock(DDC, handle_detailed_rblank, &ret); return ret; } /* For anything older, assume digital means RB support. Boo. */ if (DDC->features.input_type) return TRUE; return FALSE; } static Bool quirk_prefer_large_60(int scrnIndex, xf86MonPtr DDC) { /* Belinea 10 15 55 */ if (memcmp(DDC->vendor.name, "MAX", 4) == 0 && ((DDC->vendor.prod_id == 1516) || (DDC->vendor.prod_id == 0x77e))) return TRUE; /* Acer AL1706 */ if (memcmp(DDC->vendor.name, "ACR", 4) == 0 && DDC->vendor.prod_id == 44358) return TRUE; /* Bug #10814: Samsung SyncMaster 225BW */ if (memcmp(DDC->vendor.name, "SAM", 4) == 0 && DDC->vendor.prod_id == 596) return TRUE; /* Bug #10545: Samsung SyncMaster 226BW */ if (memcmp(DDC->vendor.name, "SAM", 4) == 0 && DDC->vendor.prod_id == 638) return TRUE; /* Acer F51 */ if (memcmp(DDC->vendor.name, "API", 4) == 0 && DDC->vendor.prod_id == 0x7602) return TRUE; return FALSE; } static Bool quirk_prefer_large_75(int scrnIndex, xf86MonPtr DDC) { /* Bug #11603: Funai Electronics PM36B */ if (memcmp(DDC->vendor.name, "FCM", 4) == 0 && DDC->vendor.prod_id == 13600) return TRUE; return FALSE; } static Bool quirk_detailed_h_in_cm(int scrnIndex, xf86MonPtr DDC) { /* Bug #11603: Funai Electronics PM36B */ if (memcmp(DDC->vendor.name, "FCM", 4) == 0 && DDC->vendor.prod_id == 13600) return TRUE; return FALSE; } static Bool quirk_detailed_v_in_cm(int scrnIndex, xf86MonPtr DDC) { /* Bug #11603: Funai Electronics PM36B */ if (memcmp(DDC->vendor.name, "FCM", 4) == 0 && DDC->vendor.prod_id == 13600) return TRUE; /* Bug #21000: LGPhilipsLCD LP154W01-TLAJ */ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 && DDC->vendor.prod_id == 47360) return TRUE; /* Bug #10304: LGPhilipsLCD LP154W01-A5 */ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 && DDC->vendor.prod_id == 0) return TRUE; /* Bug #24482: LGPhilipsLCD LP154W01-TLA1 */ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 && DDC->vendor.prod_id == 0x2a00) return TRUE; /* Bug #28414: HP Compaq NC8430 LP154W01-TLA8 */ if (memcmp(DDC->vendor.name, "LPL", 4) == 0 && DDC->vendor.prod_id == 5750) return TRUE; /* Bug #21750: Samsung Syncmaster 2333HD */ if (memcmp(DDC->vendor.name, "SAM", 4) == 0 && DDC->vendor.prod_id == 1157) return TRUE; return FALSE; } static Bool quirk_detailed_use_maximum_size(int scrnIndex, xf86MonPtr DDC) { /* ADA 1024x600 7" display */ if (memcmp(DDC->vendor.name, "ADA", 4) == 0 && DDC->vendor.prod_id == 4) return TRUE; /* Bug #21324: Iiyama Vision Master 450 */ if (memcmp(DDC->vendor.name, "IVM", 4) == 0 && DDC->vendor.prod_id == 6400) return TRUE; /* Bug #41141: Acer Aspire One */ if (memcmp(DDC->vendor.name, "LGD", 4) == 0 && DDC->vendor.prod_id == 0x7f01) return TRUE; /* Sony Vaio Pro 13 */ if (memcmp(DDC->vendor.name, "MEI", 4) == 0 && DDC->vendor.prod_id == 0x96a2) return TRUE; return FALSE; } static Bool quirk_135_clock_too_high(int scrnIndex, xf86MonPtr DDC) { /* Envision Peripherals, Inc. EN-7100e. See bug #9550. */ if (memcmp(DDC->vendor.name, "EPI", 4) == 0 && DDC->vendor.prod_id == 59264) return TRUE; return FALSE; } static Bool quirk_first_detailed_preferred(int scrnIndex, xf86MonPtr DDC) { /* Philips 107p5 CRT. Reported on xorg@ with pastebin. */ if (memcmp(DDC->vendor.name, "PHL", 4) == 0 && DDC->vendor.prod_id == 57364) return TRUE; /* Proview AY765C 17" LCD. See bug #15160 */ if (memcmp(DDC->vendor.name, "PTS", 4) == 0 && DDC->vendor.prod_id == 765) return TRUE; /* ACR of some sort RH #284231 */ if (memcmp(DDC->vendor.name, "ACR", 4) == 0 && DDC->vendor.prod_id == 2423) return TRUE; /* Peacock Ergovision 19. See rh#492359 */ if (memcmp(DDC->vendor.name, "PEA", 4) == 0 && DDC->vendor.prod_id == 9003) return TRUE; return FALSE; } static Bool quirk_detailed_sync_pp(int scrnIndex, xf86MonPtr DDC) { /* Bug #12439: Samsung SyncMaster 205BW */ if (memcmp(DDC->vendor.name, "SAM", 4) == 0 && DDC->vendor.prod_id == 541) return TRUE; return FALSE; } /* This should probably be made more generic */ static Bool quirk_dvi_single_link(int scrnIndex, xf86MonPtr DDC) { /* Red Hat bug #453106: Apple 23" Cinema Display */ if (memcmp(DDC->vendor.name, "APL", 4) == 0 && DDC->vendor.prod_id == 0x921c) return TRUE; return FALSE; } typedef struct { Bool (*detect) (int scrnIndex, xf86MonPtr DDC); ddc_quirk_t quirk; const char *description; } ddc_quirk_map_t; static const ddc_quirk_map_t ddc_quirks[] = { { quirk_prefer_large_60, DDC_QUIRK_PREFER_LARGE_60, "Detailed timing is not preferred, use largest mode at 60Hz"}, { quirk_135_clock_too_high, DDC_QUIRK_135_CLOCK_TOO_HIGH, "Recommended 135MHz pixel clock is too high"}, { quirk_prefer_large_75, DDC_QUIRK_PREFER_LARGE_75, "Detailed timing is not preferred, use largest mode at 75Hz"}, { quirk_detailed_h_in_cm, DDC_QUIRK_DETAILED_H_IN_CM, "Detailed timings give horizontal size in cm."}, { quirk_detailed_v_in_cm, DDC_QUIRK_DETAILED_V_IN_CM, "Detailed timings give vertical size in cm."}, { quirk_detailed_use_maximum_size, DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE, "Use maximum size instead of detailed timing sizes."}, { quirk_first_detailed_preferred, DDC_QUIRK_FIRST_DETAILED_PREFERRED, "First detailed timing was not marked as preferred."}, { quirk_detailed_sync_pp, DDC_QUIRK_DETAILED_SYNC_PP, "Use +hsync +vsync for detailed timing."}, { quirk_dvi_single_link, DDC_QUIRK_DVI_SINGLE_LINK, "Forcing maximum pixel clock to single DVI link."}, { NULL, DDC_QUIRK_NONE, "No known quirks"}, }; /* * These more or less come from the DMT spec. The 720x400 modes are * inferred from historical 80x25 practice. The 640x480@67 and 832x624@75 * modes are old-school Mac modes. The EDID spec says the 1152x864@75 mode * should be 1152x870, again for the Mac, but instead we use the x864 DMT * mode. * * The DMT modes have been fact-checked; the rest are mild guesses. */ #define MODEPREFIX NULL, NULL, NULL, 0, M_T_DRIVER #define MODESUFFIX 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 static const DisplayModeRec DDCEstablishedModes[17] = { {MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@60Hz */ {MODEPREFIX, 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@56Hz */ {MODEPREFIX, 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@75Hz */ {MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 492, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@72Hz */ {MODEPREFIX, 30240, 640, 704, 768, 864, 0, 480, 483, 486, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@67Hz */ {MODEPREFIX, 25175, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@60Hz */ {MODEPREFIX, 35500, 720, 738, 846, 900, 0, 400, 421, 423, 449, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 720x400@88Hz */ {MODEPREFIX, 28320, 720, 738, 846, 900, 0, 400, 412, 414, 449, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 720x400@70Hz */ {MODEPREFIX, 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x1024@75Hz */ {MODEPREFIX, 78750, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1024x768@75Hz */ {MODEPREFIX, 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 1024x768@70Hz */ {MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 1024x768@60Hz */ {MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 772, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* 1024x768@43Hz */ {MODEPREFIX, 57284, 832, 864, 928, 1152, 0, 624, 625, 628, 667, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 832x624@75Hz */ {MODEPREFIX, 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@75Hz */ {MODEPREFIX, 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@72Hz */ {MODEPREFIX, 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1152x864@75Hz */ }; static DisplayModePtr DDCModesFromEstablished(int scrnIndex, struct established_timings *timing, ddc_quirk_t quirks) { DisplayModePtr Modes = NULL, Mode = NULL; CARD32 bits = (timing->t1) | (timing->t2 << 8) | ((timing->t_manu & 0x80) << 9); int i; for (i = 0; i < 17; i++) { if (bits & (0x01 << i)) { Mode = xf86DuplicateMode(&DDCEstablishedModes[i]); Modes = xf86ModesAdd(Modes, Mode); } } return Modes; } /* Autogenerated from the DMT spec */ const DisplayModeRec DMTModes[] = { {MODEPREFIX, 31500, 640, 672, 736, 832, 0, 350, 382, 385, 445, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x350@85Hz */ {MODEPREFIX, 31500, 640, 672, 736, 832, 0, 400, 401, 404, 445, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 640x400@85Hz */ {MODEPREFIX, 35500, 720, 756, 828, 936, 0, 400, 401, 404, 446, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 720x400@85Hz */ {MODEPREFIX, 25175, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@60Hz */ {MODEPREFIX, 31500, 640, 664, 704, 832, 0, 480, 489, 492, 520, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@72Hz */ {MODEPREFIX, 31500, 640, 656, 720, 840, 0, 480, 481, 484, 500, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@75Hz */ {MODEPREFIX, 36000, 640, 696, 752, 832, 0, 480, 481, 484, 509, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 640x480@85Hz */ {MODEPREFIX, 36000, 800, 824, 896, 1024, 0, 600, 601, 603, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@56Hz */ {MODEPREFIX, 40000, 800, 840, 968, 1056, 0, 600, 601, 605, 628, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@60Hz */ {MODEPREFIX, 50000, 800, 856, 976, 1040, 0, 600, 637, 643, 666, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@72Hz */ {MODEPREFIX, 49500, 800, 816, 896, 1056, 0, 600, 601, 604, 625, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@75Hz */ {MODEPREFIX, 56250, 800, 832, 896, 1048, 0, 600, 601, 604, 631, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 800x600@85Hz */ {MODEPREFIX, 73250, 800, 848, 880, 960, 0, 600, 603, 607, 636, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 800x600@120Hz RB */ {MODEPREFIX, 33750, 848, 864, 976, 1088, 0, 480, 486, 494, 517, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 848x480@60Hz */ {MODEPREFIX, 44900, 1024, 1032, 1208, 1264, 0, 768, 768, 772, 817, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* 1024x768@43Hz (interlaced) */ {MODEPREFIX, 65000, 1024, 1048, 1184, 1344, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 1024x768@60Hz */ {MODEPREFIX, 75000, 1024, 1048, 1184, 1328, 0, 768, 771, 777, 806, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* 1024x768@70Hz */ {MODEPREFIX, 78750, 1024, 1040, 1136, 1312, 0, 768, 769, 772, 800, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1024x768@75Hz */ {MODEPREFIX, 94500, 1024, 1072, 1168, 1376, 0, 768, 769, 772, 808, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1024x768@85Hz */ {MODEPREFIX, 115500, 1024, 1072, 1104, 1184, 0, 768, 771, 775, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1024x768@120Hz RB */ {MODEPREFIX, 108000, 1152, 1216, 1344, 1600, 0, 864, 865, 868, 900, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1152x864@75Hz */ {MODEPREFIX, 68250, 1280, 1328, 1360, 1440, 0, 768, 771, 778, 790, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x768@60Hz RB */ {MODEPREFIX, 79500, 1280, 1344, 1472, 1664, 0, 768, 771, 778, 798, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x768@60Hz */ {MODEPREFIX, 102250, 1280, 1360, 1488, 1696, 0, 768, 771, 778, 805, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x768@75Hz */ {MODEPREFIX, 117500, 1280, 1360, 1496, 1712, 0, 768, 771, 778, 809, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x768@85Hz */ {MODEPREFIX, 140250, 1280, 1328, 1360, 1440, 0, 768, 771, 778, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x768@120Hz RB */ {MODEPREFIX, 71000, 1280, 1328, 1360, 1440, 0, 800, 803, 809, 823, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x800@60Hz RB */ {MODEPREFIX, 83500, 1280, 1352, 1480, 1680, 0, 800, 803, 809, 831, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x800@60Hz */ {MODEPREFIX, 106500, 1280, 1360, 1488, 1696, 0, 800, 803, 809, 838, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x800@75Hz */ {MODEPREFIX, 122500, 1280, 1360, 1496, 1712, 0, 800, 803, 809, 843, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x800@85Hz */ {MODEPREFIX, 146250, 1280, 1328, 1360, 1440, 0, 800, 803, 809, 847, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x800@120Hz RB */ {MODEPREFIX, 108000, 1280, 1376, 1488, 1800, 0, 960, 961, 964, 1000, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x960@60Hz */ {MODEPREFIX, 148500, 1280, 1344, 1504, 1728, 0, 960, 961, 964, 1011, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x960@85Hz */ {MODEPREFIX, 175500, 1280, 1328, 1360, 1440, 0, 960, 963, 967, 1017, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x960@120Hz RB */ {MODEPREFIX, 108000, 1280, 1328, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x1024@60Hz */ {MODEPREFIX, 135000, 1280, 1296, 1440, 1688, 0, 1024, 1025, 1028, 1066, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x1024@75Hz */ {MODEPREFIX, 157500, 1280, 1344, 1504, 1728, 0, 1024, 1025, 1028, 1072, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1280x1024@85Hz */ {MODEPREFIX, 187250, 1280, 1328, 1360, 1440, 0, 1024, 1027, 1034, 1084, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1280x1024@120Hz RB */ {MODEPREFIX, 85500, 1360, 1424, 1536, 1792, 0, 768, 771, 777, 795, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1360x768@60Hz */ {MODEPREFIX, 148250, 1360, 1408, 1440, 1520, 0, 768, 771, 776, 813, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1360x768@120Hz RB */ {MODEPREFIX, 101000, 1400, 1448, 1480, 1560, 0, 1050, 1053, 1057, 1080, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1400x1050@60Hz RB */ {MODEPREFIX, 121750, 1400, 1488, 1632, 1864, 0, 1050, 1053, 1057, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1400x1050@60Hz */ {MODEPREFIX, 156000, 1400, 1504, 1648, 1896, 0, 1050, 1053, 1057, 1099, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1400x1050@75Hz */ {MODEPREFIX, 179500, 1400, 1504, 1656, 1912, 0, 1050, 1053, 1057, 1105, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1400x1050@85Hz */ {MODEPREFIX, 208000, 1400, 1448, 1480, 1560, 0, 1050, 1053, 1057, 1112, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1400x1050@120Hz RB */ {MODEPREFIX, 88750, 1440, 1488, 1520, 1600, 0, 900, 903, 909, 926, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1440x900@60Hz RB */ {MODEPREFIX, 106500, 1440, 1520, 1672, 1904, 0, 900, 903, 909, 934, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1440x900@60Hz */ {MODEPREFIX, 136750, 1440, 1536, 1688, 1936, 0, 900, 903, 909, 942, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1440x900@75Hz */ {MODEPREFIX, 157000, 1440, 1544, 1696, 1952, 0, 900, 903, 909, 948, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1440x900@85Hz */ {MODEPREFIX, 182750, 1440, 1488, 1520, 1600, 0, 900, 903, 909, 953, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1440x900@120Hz RB */ {MODEPREFIX, 162000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1600x1200@60Hz */ {MODEPREFIX, 175500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1600x1200@65Hz */ {MODEPREFIX, 189000, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1600x1200@70Hz */ {MODEPREFIX, 202500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1600x1200@75Hz */ {MODEPREFIX, 229500, 1600, 1664, 1856, 2160, 0, 1200, 1201, 1204, 1250, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* 1600x1200@85Hz */ {MODEPREFIX, 268250, 1600, 1648, 1680, 1760, 0, 1200, 1203, 1207, 1271, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1600x1200@120Hz RB */ {MODEPREFIX, 119000, 1680, 1728, 1760, 1840, 0, 1050, 1053, 1059, 1080, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1680x1050@60Hz RB */ {MODEPREFIX, 146250, 1680, 1784, 1960, 2240, 0, 1050, 1053, 1059, 1089, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1680x1050@60Hz */ {MODEPREFIX, 187000, 1680, 1800, 1976, 2272, 0, 1050, 1053, 1059, 1099, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1680x1050@75Hz */ {MODEPREFIX, 214750, 1680, 1808, 1984, 2288, 0, 1050, 1053, 1059, 1105, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1680x1050@85Hz */ {MODEPREFIX, 245500, 1680, 1728, 1760, 1840, 0, 1050, 1053, 1059, 1112, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1680x1050@120Hz RB */ {MODEPREFIX, 204750, 1792, 1920, 2120, 2448, 0, 1344, 1345, 1348, 1394, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1792x1344@60Hz */ {MODEPREFIX, 261000, 1792, 1888, 2104, 2456, 0, 1344, 1345, 1348, 1417, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1792x1344@75Hz */ {MODEPREFIX, 333250, 1792, 1840, 1872, 1952, 0, 1344, 1347, 1351, 1423, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1792x1344@120Hz RB */ {MODEPREFIX, 218250, 1856, 1952, 2176, 2528, 0, 1392, 1393, 1396, 1439, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1856x1392@60Hz */ {MODEPREFIX, 288000, 1856, 1984, 2208, 2560, 0, 1392, 1393, 1396, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1856x1392@75Hz */ {MODEPREFIX, 356500, 1856, 1904, 1936, 2016, 0, 1392, 1395, 1399, 1474, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1856x1392@120Hz RB */ {MODEPREFIX, 154000, 1920, 1968, 2000, 2080, 0, 1200, 1203, 1209, 1235, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1920x1200@60Hz RB */ {MODEPREFIX, 193250, 1920, 2056, 2256, 2592, 0, 1200, 1203, 1209, 1245, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1920x1200@60Hz */ {MODEPREFIX, 245250, 1920, 2056, 2264, 2608, 0, 1200, 1203, 1209, 1255, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1920x1200@75Hz */ {MODEPREFIX, 281250, 1920, 2064, 2272, 2624, 0, 1200, 1203, 1209, 1262, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1920x1200@85Hz */ {MODEPREFIX, 317000, 1920, 1968, 2000, 2080, 0, 1200, 1203, 1209, 1271, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1920x1200@120Hz RB */ {MODEPREFIX, 234000, 1920, 2048, 2256, 2600, 0, 1440, 1441, 1444, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1920x1440@60Hz */ {MODEPREFIX, 297000, 1920, 2064, 2288, 2640, 0, 1440, 1441, 1444, 1500, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 1920x1440@75Hz */ {MODEPREFIX, 380500, 1920, 1968, 2000, 2080, 0, 1440, 1443, 1447, 1525, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 1920x1440@120Hz RB */ {MODEPREFIX, 268500, 2560, 2608, 2640, 2720, 0, 1600, 1603, 1609, 1646, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 2560x1600@60Hz RB */ {MODEPREFIX, 348500, 2560, 2752, 3032, 3504, 0, 1600, 1603, 1609, 1658, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 2560x1600@60Hz */ {MODEPREFIX, 443250, 2560, 2768, 3048, 3536, 0, 1600, 1603, 1609, 1672, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 2560x1600@75Hz */ {MODEPREFIX, 505250, 2560, 2768, 3048, 3536, 0, 1600, 1603, 1609, 1682, 0, V_NHSYNC | V_PVSYNC, MODESUFFIX}, /* 2560x1600@85Hz */ {MODEPREFIX, 552750, 2560, 2608, 2640, 2720, 0, 1600, 1603, 1609, 1694, 0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, /* 2560x1600@120Hz RB */ }; #define LEVEL_DMT 0 #define LEVEL_GTF 1 #define LEVEL_CVT 2 static int MonitorStandardTimingLevel(xf86MonPtr DDC) { if (DDC->ver.revision >= 2) { if (DDC->ver.revision >= 4 && CVT_SUPPORTED(DDC->features.msc)) { return LEVEL_CVT; } return LEVEL_GTF; } return LEVEL_DMT; } static int ModeRefresh(const DisplayModeRec * mode) { return (int) (xf86ModeVRefresh(mode) + 0.5); } /* * If rb is not set, then we'll not consider reduced-blanking modes as * part of the DMT pool. For the 'standard' EDID mode descriptor there's * no way to specify whether the mode should be RB or not. */ DisplayModePtr FindDMTMode(int hsize, int vsize, int refresh, Bool rb) { int i; const DisplayModeRec *ret; for (i = 0; i < ARRAY_SIZE(DMTModes); i++) { ret = &DMTModes[i]; if (!rb && xf86ModeIsReduced(ret)) continue; if (ret->HDisplay == hsize && ret->VDisplay == vsize && refresh == ModeRefresh(ret)) return xf86DuplicateMode(ret); } return NULL; } /* * Appendix B of the EDID 1.4 spec defines the right thing to do here. * If the timing given here matches a mode defined in the VESA DMT standard, * we _must_ use that. If the device supports CVT modes, then we should * generate a CVT timing. If both of the above fail, use GTF. * * There are some wrinkles here. EDID 1.1 and 1.0 sinks can't really * "support" GTF, since it wasn't a standard yet; so if they ask for a * timing in this section that isn't defined in DMT, returning a GTF mode * may not actually be valid. EDID 1.3 sinks often report support for * some CVT modes, but they are not required to support CVT timings for * modes in the standard timing descriptor, so we should _not_ treat them * as CVT-compliant (unless specified in an extension block I suppose). * * EDID 1.4 requires that all sink devices support both GTF and CVT timings * for modes in this section, but does say that CVT is preferred. */ static DisplayModePtr DDCModesFromStandardTiming(DisplayModePtr pool, struct std_timings *timing, ddc_quirk_t quirks, int timing_level, Bool rb) { DisplayModePtr Modes = NULL, Mode = NULL; int i, hsize, vsize, refresh; for (i = 0; i < STD_TIMINGS; i++) { DisplayModePtr p = NULL; hsize = timing[i].hsize; vsize = timing[i].vsize; refresh = timing[i].refresh; /* HDTV hack, part one */ if (refresh == 60 && ((hsize == 1360 && vsize == 765) || (hsize == 1368 && vsize == 769))) { hsize = 1366; vsize = 768; } /* If we already have a detailed timing for this size, don't add more */ for (p = pool; p; p = p->next) { if (p->HDisplay == hsize && p->VDisplay == vsize && refresh == round(xf86ModeVRefresh(p))) break; } if (p) continue; /* HDTV hack, because you can't say 1366 */ if (refresh == 60 && hsize == 1366 && vsize == 768) { Mode = xf86CVTMode(1366, 768, 60, FALSE, FALSE); Mode->HDisplay = 1366; Mode->HSyncStart--; Mode->HSyncEnd--; } else if (hsize && vsize && refresh) { Mode = FindDMTMode(hsize, vsize, refresh, rb); if (!Mode) { if (timing_level == LEVEL_CVT) /* pass rb here too? */ Mode = xf86CVTMode(hsize, vsize, refresh, FALSE, FALSE); else if (timing_level == LEVEL_GTF) Mode = xf86GTFMode(hsize, vsize, refresh, FALSE, FALSE); } } if (Mode) { Mode->type = M_T_DRIVER; Modes = xf86ModesAdd(Modes, Mode); } Mode = NULL; } return Modes; } static void DDCModeDoInterlaceQuirks(DisplayModePtr mode) { /* * EDID is delightfully ambiguous about how interlaced modes are to be * encoded. X's internal representation is of frame height, but some * HDTV detailed timings are encoded as field height. * * The format list here is from CEA, in frame size. Technically we * should be checking refresh rate too. Whatever. */ static const struct { int w, h; } cea_interlaced[] = { {1920, 1080}, {720, 480}, {1440, 480}, {2880, 480}, {720, 576}, {1440, 576}, {2880, 576}, }; int i; for (i = 0; i < ARRAY_SIZE(cea_interlaced); i++) { if ((mode->HDisplay == cea_interlaced[i].w) && (mode->VDisplay == cea_interlaced[i].h / 2)) { mode->VDisplay *= 2; mode->VSyncStart *= 2; mode->VSyncEnd *= 2; mode->VTotal *= 2; mode->VTotal |= 1; } } mode->Flags |= V_INTERLACE; } /* * */ static DisplayModePtr DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, Bool preferred, ddc_quirk_t quirks) { DisplayModePtr Mode; /* * Refuse to create modes that are insufficiently large. 64 is a random * number, maybe the spec says something about what the minimum is. In * particular I see this frequently with _old_ EDID, 1.0 or so, so maybe * our parser is just being too aggressive there. */ if (timing->h_active < 64 || timing->v_active < 64) { xf86DrvMsg(scrnIndex, X_INFO, "%s: Ignoring tiny %dx%d mode\n", __func__, timing->h_active, timing->v_active); return NULL; } /* We don't do stereo */ if (timing->stereo) { xf86DrvMsg(scrnIndex, X_INFO, "%s: Ignoring: We don't handle stereo.\n", __func__); return NULL; } /* We only do separate sync currently */ if (timing->sync != 0x03) { xf86DrvMsg(scrnIndex, X_INFO, "%s: %dx%d Warning: We only handle separate" " sync.\n", __func__, timing->h_active, timing->v_active); } Mode = xnfcalloc(1, sizeof(DisplayModeRec)); Mode->type = M_T_DRIVER; if (preferred) Mode->type |= M_T_PREFERRED; if ((quirks & DDC_QUIRK_135_CLOCK_TOO_HIGH) && timing->clock == 135000000) Mode->Clock = 108880; else Mode->Clock = timing->clock / 1000.0; Mode->HDisplay = timing->h_active; Mode->HSyncStart = timing->h_active + timing->h_sync_off; Mode->HSyncEnd = Mode->HSyncStart + timing->h_sync_width; Mode->HTotal = timing->h_active + timing->h_blanking; Mode->VDisplay = timing->v_active; Mode->VSyncStart = timing->v_active + timing->v_sync_off; Mode->VSyncEnd = Mode->VSyncStart + timing->v_sync_width; Mode->VTotal = timing->v_active + timing->v_blanking; /* perform basic check on the detail timing */ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) { free(Mode); return NULL; } /* We ignore h/v_size and h/v_border for now. */ if (timing->interlaced) DDCModeDoInterlaceQuirks(Mode); if (quirks & DDC_QUIRK_DETAILED_SYNC_PP) Mode->Flags |= V_PVSYNC | V_PHSYNC; else { if (timing->misc & 0x02) Mode->Flags |= V_PVSYNC; else Mode->Flags |= V_NVSYNC; if (timing->misc & 0x01) Mode->Flags |= V_PHSYNC; else Mode->Flags |= V_NHSYNC; } xf86SetModeDefaultName(Mode); return Mode; } static DisplayModePtr DDCModesFromCVT(int scrnIndex, struct cvt_timings *t) { DisplayModePtr modes = NULL; int i; for (i = 0; i < 4; i++) { if (t[i].height) { if (t[i].rates & 0x10) modes = xf86ModesAdd(modes, xf86CVTMode(t[i].width, t[i].height, 50, 0, 0)); if (t[i].rates & 0x08) modes = xf86ModesAdd(modes, xf86CVTMode(t[i].width, t[i].height, 60, 0, 0)); if (t[i].rates & 0x04) modes = xf86ModesAdd(modes, xf86CVTMode(t[i].width, t[i].height, 75, 0, 0)); if (t[i].rates & 0x02) modes = xf86ModesAdd(modes, xf86CVTMode(t[i].width, t[i].height, 85, 0, 0)); if (t[i].rates & 0x01) modes = xf86ModesAdd(modes, xf86CVTMode(t[i].width, t[i].height, 60, 1, 0)); } else break; } return modes; } static const struct { short w; short h; short r; short rb; } EstIIIModes[] = { /* byte 6 */ {640, 350, 85, 0}, {640, 400, 85, 0}, {720, 400, 85, 0}, {640, 480, 85, 0}, {848, 480, 60, 0}, {800, 600, 85, 0}, {1024, 768, 85, 0}, {1152, 864, 75, 0}, /* byte 7 */ {1280, 768, 60, 1}, {1280, 768, 60, 0}, {1280, 768, 75, 0}, {1280, 768, 85, 0}, {1280, 960, 60, 0}, {1280, 960, 85, 0}, {1280, 1024, 60, 0}, {1280, 1024, 85, 0}, /* byte 8 */ {1360, 768, 60, 0}, {1440, 900, 60, 1}, {1440, 900, 60, 0}, {1440, 900, 75, 0}, {1440, 900, 85, 0}, {1400, 1050, 60, 1}, {1400, 1050, 60, 0}, {1400, 1050, 75, 0}, /* byte 9 */ {1400, 1050, 85, 0}, {1680, 1050, 60, 1}, {1680, 1050, 60, 0}, {1680, 1050, 75, 0}, {1680, 1050, 85, 0}, {1600, 1200, 60, 0}, {1600, 1200, 65, 0}, {1600, 1200, 70, 0}, /* byte 10 */ {1600, 1200, 75, 0}, {1600, 1200, 85, 0}, {1792, 1344, 60, 0}, {1792, 1344, 75, 0}, {1856, 1392, 60, 0}, {1856, 1392, 75, 0}, {1920, 1200, 60, 1}, {1920, 1200, 60, 0}, /* byte 11 */ {1920, 1200, 75, 0}, {1920, 1200, 85, 0}, {1920, 1440, 60, 0}, {1920, 1440, 75, 0}, /* fill up last byte */ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, }; static DisplayModePtr DDCModesFromEstIII(unsigned char *est) { DisplayModePtr modes = NULL; int i, j, m; for (i = 0; i < 6; i++) { for (j = 7; j >= 0; j--) { if (est[i] & (1 << j)) { m = (i * 8) + (7 - j); if (EstIIIModes[m].w) modes = xf86ModesAdd(modes, FindDMTMode(EstIIIModes[m].w, EstIIIModes[m].h, EstIIIModes[m].r, EstIIIModes[m].rb)); } } } return modes; } /* * This is only valid when the sink claims to be continuous-frequency * but does not supply a detailed range descriptor. Such sinks are * arguably broken. Currently the mode validation code isn't aware of * this; the non-RANDR code even punts the decision of optional sync * range checking to the driver. Loss. */ static void DDCGuessRangesFromModes(int scrnIndex, MonPtr Monitor, DisplayModePtr Modes) { DisplayModePtr Mode = Modes; if (!Monitor || !Modes) return; /* set up the ranges for scanning through the modes */ Monitor->nHsync = 1; Monitor->hsync[0].lo = 1024.0; Monitor->hsync[0].hi = 0.0; Monitor->nVrefresh = 1; Monitor->vrefresh[0].lo = 1024.0; Monitor->vrefresh[0].hi = 0.0; while (Mode) { if (!Mode->HSync) Mode->HSync = ((float) Mode->Clock) / ((float) Mode->HTotal); if (!Mode->VRefresh) Mode->VRefresh = (1000.0 * ((float) Mode->Clock)) / ((float) (Mode->HTotal * Mode->VTotal)); if (Mode->HSync < Monitor->hsync[0].lo) Monitor->hsync[0].lo = Mode->HSync; if (Mode->HSync > Monitor->hsync[0].hi) Monitor->hsync[0].hi = Mode->HSync; if (Mode->VRefresh < Monitor->vrefresh[0].lo) Monitor->vrefresh[0].lo = Mode->VRefresh; if (Mode->VRefresh > Monitor->vrefresh[0].hi) Monitor->vrefresh[0].hi = Mode->VRefresh; Mode = Mode->next; } } ddc_quirk_t xf86DDCDetectQuirks(int scrnIndex, xf86MonPtr DDC, Bool verbose) { ddc_quirk_t quirks; int i; quirks = DDC_QUIRK_NONE; for (i = 0; ddc_quirks[i].detect; i++) { if (ddc_quirks[i].detect(scrnIndex, DDC)) { if (verbose) { xf86DrvMsg(scrnIndex, X_INFO, " EDID quirk: %s\n", ddc_quirks[i].description); } quirks |= ddc_quirks[i].quirk; } } return quirks; } void xf86DetTimingApplyQuirks(struct detailed_monitor_section *det_mon, ddc_quirk_t quirks, int hsize, int vsize) { if (det_mon->type != DT) return; if (quirks & DDC_QUIRK_DETAILED_H_IN_CM) det_mon->section.d_timings.h_size *= 10; if (quirks & DDC_QUIRK_DETAILED_V_IN_CM) det_mon->section.d_timings.v_size *= 10; if (quirks & DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE) { det_mon->section.d_timings.h_size = 10 * hsize; det_mon->section.d_timings.v_size = 10 * vsize; } } /** * Applies monitor-specific quirks to the decoded EDID information. * * Note that some quirks applying to the mode list are still implemented in * xf86DDCGetModes. */ void xf86DDCApplyQuirks(int scrnIndex, xf86MonPtr DDC) { ddc_quirk_t quirks = xf86DDCDetectQuirks(scrnIndex, DDC, FALSE); int i; for (i = 0; i < DET_TIMINGS; i++) { xf86DetTimingApplyQuirks(DDC->det_mon + i, quirks, DDC->features.hsize, DDC->features.vsize); } } /** * Walks the modes list, finding the mode with the largest area which is * closest to the target refresh rate, and marks it as the only preferred mode. */ static void xf86DDCSetPreferredRefresh(int scrnIndex, DisplayModePtr modes, float target_refresh) { DisplayModePtr mode, best = modes; for (mode = modes; mode; mode = mode->next) { mode->type &= ~M_T_PREFERRED; if (mode == best) continue; if (mode->HDisplay * mode->VDisplay > best->HDisplay * best->VDisplay) { best = mode; continue; } if (mode->HDisplay * mode->VDisplay == best->HDisplay * best->VDisplay) { double mode_refresh = xf86ModeVRefresh(mode); double best_refresh = xf86ModeVRefresh(best); double mode_dist = fabs(mode_refresh - target_refresh); double best_dist = fabs(best_refresh - target_refresh); if (mode_dist < best_dist) { best = mode; continue; } } } if (best) best->type |= M_T_PREFERRED; } #define CEA_VIDEO_MODES_NUM 64 static const DisplayModeRec CEAVideoModes[CEA_VIDEO_MODES_NUM] = { {MODEPREFIX, 25175, 640, 656, 752, 800, 0, 480, 490, 492, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 1:640x480@60Hz */ {MODEPREFIX, 27000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 2:720x480@60Hz */ {MODEPREFIX, 27000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 3:720x480@60Hz */ {MODEPREFIX, 74250, 1280, 1390, 1430, 1650, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 4: 1280x720@60Hz */ {MODEPREFIX, 74250, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 5:1920x1080i@60Hz */ {MODEPREFIX, 27000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 6:1440x480i@60Hz */ {MODEPREFIX, 27000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 7:1440x480i@60Hz */ {MODEPREFIX, 27000, 1440, 1478, 1602, 1716, 0, 240, 244, 247, 262, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 8:1440x240@60Hz */ {MODEPREFIX, 27000, 1440, 1478, 1602, 1716, 0, 240, 244, 247, 262, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 9:1440x240@60Hz */ {MODEPREFIX, 54000, 2880, 2956, 3204, 3432, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 10:2880x480i@60Hz */ {MODEPREFIX, 54000, 2880, 2956, 3204, 3432, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 11:2880x480i@60Hz */ {MODEPREFIX, 54000, 2880, 2956, 3204, 3432, 0, 240, 244, 247, 262, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 12:2880x240@60Hz */ {MODEPREFIX, 54000, 2880, 2956, 3204, 3432, 0, 240, 244, 247, 262, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 13:2880x240@60Hz */ {MODEPREFIX, 54000, 1440, 1472, 1596, 1716, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 14:1440x480@60Hz */ {MODEPREFIX, 54000, 1440, 1472, 1596, 1716, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 15:1440x480@60Hz */ {MODEPREFIX, 148500, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 16:1920x1080@60Hz */ {MODEPREFIX, 27000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 17:720x576@50Hz */ {MODEPREFIX, 27000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 18:720x576@50Hz */ {MODEPREFIX, 74250, 1280, 1720, 1760, 1980, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 19: 1280x720@50Hz */ {MODEPREFIX, 74250, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 20:1920x1080i@50Hz */ {MODEPREFIX, 27000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 21:1440x576i@50Hz */ {MODEPREFIX, 27000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 22:1440x576i@50Hz */ {MODEPREFIX, 27000, 1440, 1464, 1590, 1728, 0, 288, 290, 293, 312, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 23:1440x288@50Hz */ {MODEPREFIX, 27000, 1440, 1464, 1590, 1728, 0, 288, 290, 293, 312, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 24:1440x288@50Hz */ {MODEPREFIX, 54000, 2880, 2928, 3180, 3456, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 25:2880x576i@50Hz */ {MODEPREFIX, 54000, 2880, 2928, 3180, 3456, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 26:2880x576i@50Hz */ {MODEPREFIX, 54000, 2880, 2928, 3180, 3456, 0, 288, 290, 293, 312, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 27:2880x288@50Hz */ {MODEPREFIX, 54000, 2880, 2928, 3180, 3456, 0, 288, 290, 293, 312, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 28:2880x288@50Hz */ {MODEPREFIX, 54000, 1440, 1464, 1592, 1728, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 29:1440x576@50Hz */ {MODEPREFIX, 54000, 1440, 1464, 1592, 1728, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 30:1440x576@50Hz */ {MODEPREFIX, 148500, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 31:1920x1080@50Hz */ {MODEPREFIX, 74250, 1920, 2558, 2602, 2750, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 32:1920x1080@24Hz */ {MODEPREFIX, 74250, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 33:1920x1080@25Hz */ {MODEPREFIX, 74250, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 34:1920x1080@30Hz */ {MODEPREFIX, 108000, 2880, 2944, 3192, 3432, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 35:2880x480@60Hz */ {MODEPREFIX, 108000, 2880, 2944, 3192, 3432, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 36:2880x480@60Hz */ {MODEPREFIX, 108000, 2880, 2928, 3184, 3456, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 37:2880x576@50Hz */ {MODEPREFIX, 108000, 2880, 2928, 3184, 3456, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 38:2880x576@50Hz */ {MODEPREFIX, 72000, 1920, 1952, 2120, 2304, 0, 1080, 1126, 1136, 1250, 0, V_PHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 39:1920x1080i@50Hz */ {MODEPREFIX, 148500, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 40:1920x1080i@100Hz */ {MODEPREFIX, 148500, 1280, 1720, 1760, 1980, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 41:1280x720@100Hz */ {MODEPREFIX, 54000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 42:720x576@100Hz */ {MODEPREFIX, 54000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 43:720x576@100Hz */ {MODEPREFIX, 54000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 44:1440x576i@100Hz */ {MODEPREFIX, 54000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 45:1440x576i@100Hz */ {MODEPREFIX, 148500, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 46:1920x1080i@120Hz */ {MODEPREFIX, 148500, 1280, 1390, 1430, 1650, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 47:1280x720@120Hz */ {MODEPREFIX, 54000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 48:720x480@120Hz */ {MODEPREFIX, 54000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 49:720x480@120Hz */ {MODEPREFIX, 54000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 50:1440x480i@120Hz */ {MODEPREFIX, 54000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 51:1440x480i@120Hz */ {MODEPREFIX, 108000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 52:720x576@200Hz */ {MODEPREFIX, 108000, 720, 732, 796, 864, 0, 576, 581, 586, 625, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 53:720x576@200Hz */ {MODEPREFIX, 108000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 54:1440x576i@200Hz */ {MODEPREFIX, 108000, 1440, 1464, 1590, 1728, 0, 576, 580, 586, 625, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 55:1440x576i@200Hz */ {MODEPREFIX, 108000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 56:720x480@240Hz */ {MODEPREFIX, 108000, 720, 736, 798, 858, 0, 480, 489, 495, 525, 0, V_NHSYNC | V_NVSYNC, MODESUFFIX}, /* VIC 57:720x480@240Hz */ {MODEPREFIX, 108000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 58:1440x480i@240 */ {MODEPREFIX, 108000, 1440, 1478, 1602, 1716, 0, 480, 488, 494, 525, 0, V_NHSYNC | V_NVSYNC | V_INTERLACE, MODESUFFIX}, /* VIC 59:1440x480i@240 */ {MODEPREFIX, 59400, 1280, 3040, 3080, 3300, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 60: 1280x720@24Hz */ {MODEPREFIX, 74250, 1280, 3700, 3740, 3960, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 61: 1280x720@25Hz */ {MODEPREFIX, 74250, 1280, 3040, 3080, 3300, 0, 720, 725, 730, 750, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 62: 1280x720@30Hz */ {MODEPREFIX, 297000, 1920, 2008, 2052, 2200, 0, 1080, 1084, 1089, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 63: 1920x1080@120Hz */ {MODEPREFIX, 297000, 1920, 2448, 2492, 2640, 0, 1080, 1084, 1094, 1125, 0, V_PHSYNC | V_PVSYNC, MODESUFFIX}, /* VIC 64:1920x1080@100Hz */ }; /* chose mode line by cea short video descriptor*/ static void handle_cea_svd(struct cea_video_block *video, void *data) { DisplayModePtr Mode; DisplayModePtr *Modes = (DisplayModePtr *) data; int vid; vid = video->video_code & 0x7f; if (vid >= 1 && vid <= CEA_VIDEO_MODES_NUM) { Mode = xf86DuplicateMode(CEAVideoModes + (vid - 1)); *Modes = xf86ModesAdd(*Modes, Mode); } } static DisplayModePtr DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr mon_ptr) { DisplayModePtr Modes = NULL; xf86ForEachVideoBlock(mon_ptr, handle_cea_svd, &Modes); return Modes; } struct det_modes_parameter { xf86MonPtr DDC; ddc_quirk_t quirks; DisplayModePtr Modes; Bool rb; Bool preferred; int timing_level; }; static void handle_detailed_modes(struct detailed_monitor_section *det_mon, void *data) { DisplayModePtr Mode; struct det_modes_parameter *p = (struct det_modes_parameter *) data; xf86DetTimingApplyQuirks(det_mon, p->quirks, p->DDC->features.hsize, p->DDC->features.vsize); switch (det_mon->type) { case DT: Mode = DDCModeFromDetailedTiming(p->DDC->scrnIndex, &det_mon->section.d_timings, p->preferred, p->quirks); p->preferred = FALSE; p->Modes = xf86ModesAdd(p->Modes, Mode); break; case DS_STD_TIMINGS: Mode = DDCModesFromStandardTiming(p->Modes, det_mon->section.std_t, p->quirks, p->timing_level, p->rb); p->Modes = xf86ModesAdd(p->Modes, Mode); break; case DS_CVT: Mode = DDCModesFromCVT(p->DDC->scrnIndex, det_mon->section.cvt); p->Modes = xf86ModesAdd(p->Modes, Mode); break; case DS_EST_III: Mode = DDCModesFromEstIII(det_mon->section.est_iii); p->Modes = xf86ModesAdd(p->Modes, Mode); break; default: break; } } DisplayModePtr xf86DDCGetModes(int scrnIndex, xf86MonPtr DDC) { DisplayModePtr Modes = NULL, Mode; ddc_quirk_t quirks; Bool preferred, rb; int timing_level; struct det_modes_parameter p; xf86DrvMsg(scrnIndex, X_INFO, "EDID vendor \"%s\", prod id %d\n", DDC->vendor.name, DDC->vendor.prod_id); quirks = xf86DDCDetectQuirks(scrnIndex, DDC, TRUE); preferred = PREFERRED_TIMING_MODE(DDC->features.msc); if (DDC->ver.revision >= 4) preferred = TRUE; if (quirks & DDC_QUIRK_FIRST_DETAILED_PREFERRED) preferred = TRUE; if (quirks & (DDC_QUIRK_PREFER_LARGE_60 | DDC_QUIRK_PREFER_LARGE_75)) preferred = FALSE; rb = xf86MonitorSupportsReducedBlanking(DDC); timing_level = MonitorStandardTimingLevel(DDC); p.quirks = quirks; p.DDC = DDC; p.Modes = Modes; p.rb = rb; p.preferred = preferred; p.timing_level = timing_level; xf86ForEachDetailedBlock(DDC, handle_detailed_modes, &p); Modes = p.Modes; /* Add cea-extension mode timings */ Mode = DDCModesFromCEAExtension(scrnIndex, DDC); Modes = xf86ModesAdd(Modes, Mode); /* Add established timings */ Mode = DDCModesFromEstablished(scrnIndex, &DDC->timings1, quirks); Modes = xf86ModesAdd(Modes, Mode); /* Add standard timings */ Mode = DDCModesFromStandardTiming(Modes, DDC->timings2, quirks, timing_level, rb); Modes = xf86ModesAdd(Modes, Mode); if (quirks & DDC_QUIRK_PREFER_LARGE_60) xf86DDCSetPreferredRefresh(scrnIndex, Modes, 60); if (quirks & DDC_QUIRK_PREFER_LARGE_75) xf86DDCSetPreferredRefresh(scrnIndex, Modes, 75); Modes = xf86PruneDuplicateModes(Modes); return Modes; } struct det_mon_parameter { MonPtr Monitor; ddc_quirk_t quirks; Bool have_hsync; Bool have_vrefresh; Bool have_maxpixclock; }; static void handle_detailed_monset(struct detailed_monitor_section *det_mon, void *data) { int clock; struct det_mon_parameter *p = (struct det_mon_parameter *) data; int scrnIndex = ((xf86MonPtr) (p->Monitor->DDC))->scrnIndex; switch (det_mon->type) { case DS_RANGES: if (!p->have_hsync) { if (!p->Monitor->nHsync) xf86DrvMsg(scrnIndex, X_INFO, "Using EDID range info for horizontal sync\n"); p->Monitor->hsync[p->Monitor->nHsync].lo = det_mon->section.ranges.min_h; p->Monitor->hsync[p->Monitor->nHsync].hi = det_mon->section.ranges.max_h; p->Monitor->nHsync++; } else { xf86DrvMsg(scrnIndex, X_INFO, "Using hsync ranges from config file\n"); } if (!p->have_vrefresh) { if (!p->Monitor->nVrefresh) xf86DrvMsg(scrnIndex, X_INFO, "Using EDID range info for vertical refresh\n"); p->Monitor->vrefresh[p->Monitor->nVrefresh].lo = det_mon->section.ranges.min_v; p->Monitor->vrefresh[p->Monitor->nVrefresh].hi = det_mon->section.ranges.max_v; p->Monitor->nVrefresh++; } else { xf86DrvMsg(scrnIndex, X_INFO, "Using vrefresh ranges from config file\n"); } clock = det_mon->section.ranges.max_clock * 1000; if (p->quirks & DDC_QUIRK_DVI_SINGLE_LINK) clock = min(clock, 165000); if (!p->have_maxpixclock && clock > p->Monitor->maxPixClock) p->Monitor->maxPixClock = clock; break; default: break; } } /* * Fill out MonPtr with xf86MonPtr information. */ void xf86EdidMonitorSet(int scrnIndex, MonPtr Monitor, xf86MonPtr DDC) { DisplayModePtr Modes = NULL, Mode; struct det_mon_parameter p; if (!Monitor || !DDC) return; Monitor->DDC = DDC; if (Monitor->widthmm <= 0 || Monitor->heightmm <= 0) { Monitor->widthmm = 10 * DDC->features.hsize; Monitor->heightmm = 10 * DDC->features.vsize; } Monitor->reducedblanking = xf86MonitorSupportsReducedBlanking(DDC); Modes = xf86DDCGetModes(scrnIndex, DDC); /* Go through the detailed monitor sections */ p.Monitor = Monitor; p.quirks = xf86DDCDetectQuirks(scrnIndex, Monitor->DDC, FALSE); p.have_hsync = (Monitor->nHsync != 0); p.have_vrefresh = (Monitor->nVrefresh != 0); p.have_maxpixclock = (Monitor->maxPixClock != 0); xf86ForEachDetailedBlock(DDC, handle_detailed_monset, &p); if (Modes) { /* Print Modes */ xf86DrvMsg(scrnIndex, X_INFO, "Printing DDC gathered Modelines:\n"); Mode = Modes; while (Mode) { xf86PrintModeline(scrnIndex, Mode); Mode = Mode->next; } /* Do we still need ranges to be filled in? */ if (!Monitor->nHsync || !Monitor->nVrefresh) DDCGuessRangesFromModes(scrnIndex, Monitor, Modes); /* add to MonPtr */ if (Monitor->Modes) { Monitor->Last->next = Modes; Modes->prev = Monitor->Last; } else { Monitor->Modes = Modes; } Monitor->Modes = xf86PruneDuplicateModes(Monitor->Modes); /* Update pointer to last mode */ for (Mode = Monitor->Modes; Mode && Mode->next; Mode = Mode->next) {} Monitor->Last = Mode; } } xorg-server-21.1.16/hw/xfree86/modes/xf86Modes.c0000644000175000017500000005622714757411105014612 /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86Modes.h" #include "xf86Priv.h" extern XF86ConfigPtr xf86configptr; /** * Calculates the horizontal sync rate of a mode. */ double xf86ModeHSync(const DisplayModeRec * mode) { double hsync = 0.0; if (mode->HSync > 0.0) hsync = mode->HSync; else if (mode->HTotal > 0) hsync = (float) mode->Clock / (float) mode->HTotal; return hsync; } /** * Calculates the vertical refresh rate of a mode. */ double xf86ModeVRefresh(const DisplayModeRec * mode) { double refresh = 0.0; if (mode->VRefresh > 0.0) refresh = mode->VRefresh; else if (mode->HTotal > 0 && mode->VTotal > 0) { refresh = mode->Clock * 1000.0 / mode->HTotal / mode->VTotal; if (mode->Flags & V_INTERLACE) refresh *= 2.0; if (mode->Flags & V_DBLSCAN) refresh /= 2.0; if (mode->VScan > 1) refresh /= (float) (mode->VScan); } return refresh; } int xf86ModeWidth(const DisplayModeRec * mode, Rotation rotation) { switch (rotation & 0xf) { case RR_Rotate_0: case RR_Rotate_180: return mode->HDisplay; case RR_Rotate_90: case RR_Rotate_270: return mode->VDisplay; default: return 0; } } int xf86ModeHeight(const DisplayModeRec * mode, Rotation rotation) { switch (rotation & 0xf) { case RR_Rotate_0: case RR_Rotate_180: return mode->VDisplay; case RR_Rotate_90: case RR_Rotate_270: return mode->HDisplay; default: return 0; } } /** Calculates the memory bandwidth (in MiB/sec) of a mode. */ unsigned int xf86ModeBandwidth(DisplayModePtr mode, int depth) { float a_active, a_total, active_percent, pixels_per_second; int bytes_per_pixel = bits_to_bytes(depth); if (!mode->HTotal || !mode->VTotal || !mode->Clock) return 0; a_active = mode->HDisplay * mode->VDisplay; a_total = mode->HTotal * mode->VTotal; active_percent = a_active / a_total; pixels_per_second = active_percent * mode->Clock * 1000.0; return (unsigned int) (pixels_per_second * bytes_per_pixel / (1024 * 1024)); } /** Sets a default mode name of x on a mode. */ void xf86SetModeDefaultName(DisplayModePtr mode) { Bool interlaced = ! !(mode->Flags & V_INTERLACE); char *tmp; free((void *) mode->name); XNFasprintf(&tmp, "%dx%d%s", mode->HDisplay, mode->VDisplay, interlaced ? "i" : ""); mode->name = tmp; } /* * xf86SetModeCrtc * * Initialises the Crtc parameters for a mode. The initialisation includes * adjustments for interlaced and double scan modes. */ void xf86SetModeCrtc(DisplayModePtr p, int adjustFlags) { if ((p == NULL) || ((p->type & M_T_CRTC_C) == M_T_BUILTIN)) return; p->CrtcHDisplay = p->HDisplay; p->CrtcHSyncStart = p->HSyncStart; p->CrtcHSyncEnd = p->HSyncEnd; p->CrtcHTotal = p->HTotal; p->CrtcHSkew = p->HSkew; p->CrtcVDisplay = p->VDisplay; p->CrtcVSyncStart = p->VSyncStart; p->CrtcVSyncEnd = p->VSyncEnd; p->CrtcVTotal = p->VTotal; if (p->Flags & V_INTERLACE) { if (adjustFlags & INTERLACE_HALVE_V) { p->CrtcVDisplay /= 2; p->CrtcVSyncStart /= 2; p->CrtcVSyncEnd /= 2; p->CrtcVTotal /= 2; } /* Force interlaced modes to have an odd VTotal */ /* maybe we should only do this when INTERLACE_HALVE_V is set? */ p->CrtcVTotal |= 1; } if (p->Flags & V_DBLSCAN) { p->CrtcVDisplay *= 2; p->CrtcVSyncStart *= 2; p->CrtcVSyncEnd *= 2; p->CrtcVTotal *= 2; } if (p->VScan > 1) { p->CrtcVDisplay *= p->VScan; p->CrtcVSyncStart *= p->VScan; p->CrtcVSyncEnd *= p->VScan; p->CrtcVTotal *= p->VScan; } p->CrtcVBlankStart = min(p->CrtcVSyncStart, p->CrtcVDisplay); p->CrtcVBlankEnd = max(p->CrtcVSyncEnd, p->CrtcVTotal); p->CrtcHBlankStart = min(p->CrtcHSyncStart, p->CrtcHDisplay); p->CrtcHBlankEnd = max(p->CrtcHSyncEnd, p->CrtcHTotal); p->CrtcHAdjusted = FALSE; p->CrtcVAdjusted = FALSE; } /** * Fills in a copy of mode, removing all stale pointer references. * xf86ModesEqual will return true when comparing with original mode. */ void xf86SaveModeContents(DisplayModePtr intern, const DisplayModeRec *mode) { *intern = *mode; intern->prev = intern->next = NULL; intern->name = NULL; intern->PrivSize = 0; intern->PrivFlags = 0; intern->Private = NULL; } /** * Allocates and returns a copy of pMode, including pointers within pMode. */ DisplayModePtr xf86DuplicateMode(const DisplayModeRec * pMode) { DisplayModePtr pNew; pNew = xnfalloc(sizeof(DisplayModeRec)); *pNew = *pMode; pNew->next = NULL; pNew->prev = NULL; if (pMode->name == NULL) xf86SetModeDefaultName(pNew); else pNew->name = xnfstrdup(pMode->name); return pNew; } /** * Duplicates every mode in the given list and returns a pointer to the first * mode. * * \param modeList doubly-linked mode list */ DisplayModePtr xf86DuplicateModes(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr first = NULL, last = NULL; DisplayModePtr mode; for (mode = modeList; mode != NULL; mode = mode->next) { DisplayModePtr new; new = xf86DuplicateMode(mode); /* Insert pNew into modeList */ if (last) { last->next = new; new->prev = last; } else { first = new; new->prev = NULL; } new->next = NULL; last = new; } return first; } /** * Returns true if the given modes should program to the same timings. * * This doesn't use Crtc values, as it might be used on ModeRecs without the * Crtc values set. So, it's assumed that the other numbers are enough. */ Bool xf86ModesEqual(const DisplayModeRec * pMode1, const DisplayModeRec * pMode2) { if (pMode1->Clock == pMode2->Clock && pMode1->HDisplay == pMode2->HDisplay && pMode1->HSyncStart == pMode2->HSyncStart && pMode1->HSyncEnd == pMode2->HSyncEnd && pMode1->HTotal == pMode2->HTotal && pMode1->HSkew == pMode2->HSkew && pMode1->VDisplay == pMode2->VDisplay && pMode1->VSyncStart == pMode2->VSyncStart && pMode1->VSyncEnd == pMode2->VSyncEnd && pMode1->VTotal == pMode2->VTotal && pMode1->VScan == pMode2->VScan && pMode1->Flags == pMode2->Flags) { return TRUE; } else { return FALSE; } } static void add(char **p, const char *new) { *p = xnfrealloc(*p, strlen(*p) + strlen(new) + 2); strcat(*p, " "); strcat(*p, new); } /** * Print out a modeline. * * The mode type bits are informational except for the capitalized U * and P bits which give sort order priority. Letter map: * * USERPREF, U, user preferred is set from the xorg.conf Monitor * Option "PreferredMode" or from the Screen Display Modes statement. * This unique modeline is moved to the head of the list after sorting. * * DRIVER, e, is set by the video driver, EDID or flat panel native. * * USERDEF, z, a configured zoom mode Ctrl+Alt+Keypad-{Plus,Minus}. * * DEFAULT, d, a compiled-in default. * * PREFERRED, P, driver preferred is set by the video device driver, * e.g. the EDID detailed timing modeline. This is a true sort * priority and multiple P modes form a sorted sublist at the list * head. * * BUILTIN, b, a hardware fixed CRTC mode. * * See modes/xf86Crtc.c: xf86ProbeOutputModes(). */ void xf86PrintModeline(int scrnIndex, DisplayModePtr mode) { char tmp[256]; char *flags = xnfcalloc(1, 1); #define TBITS 6 const char tchar[TBITS + 1] = "UezdPb"; int tbit[TBITS] = { M_T_USERPREF, M_T_DRIVER, M_T_USERDEF, M_T_DEFAULT, M_T_PREFERRED, M_T_BUILTIN }; char type[TBITS + 2]; /* +1 for leading space */ #undef TBITS int tlen = 0; if (mode->type) { int i; type[tlen++] = ' '; for (i = 0; tchar[i]; i++) if (mode->type & tbit[i]) type[tlen++] = tchar[i]; } type[tlen] = '\0'; if (mode->HSkew) { snprintf(tmp, 256, "hskew %i", mode->HSkew); add(&flags, tmp); } if (mode->VScan) { snprintf(tmp, 256, "vscan %i", mode->VScan); add(&flags, tmp); } if (mode->Flags & V_INTERLACE) add(&flags, "interlace"); if (mode->Flags & V_CSYNC) add(&flags, "composite"); if (mode->Flags & V_DBLSCAN) add(&flags, "doublescan"); if (mode->Flags & V_BCAST) add(&flags, "bcast"); if (mode->Flags & V_PHSYNC) add(&flags, "+hsync"); if (mode->Flags & V_NHSYNC) add(&flags, "-hsync"); if (mode->Flags & V_PVSYNC) add(&flags, "+vsync"); if (mode->Flags & V_NVSYNC) add(&flags, "-vsync"); if (mode->Flags & V_PCSYNC) add(&flags, "+csync"); if (mode->Flags & V_NCSYNC) add(&flags, "-csync"); #if 0 if (mode->Flags & V_CLKDIV2) add(&flags, "vclk/2"); #endif xf86DrvMsg(scrnIndex, X_INFO, "Modeline \"%s\"x%.01f %6.2f %i %i %i %i %i %i %i %i%s" " (%.01f kHz%s)\n", mode->name, mode->VRefresh, mode->Clock / 1000., mode->HDisplay, mode->HSyncStart, mode->HSyncEnd, mode->HTotal, mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, mode->VTotal, flags, xf86ModeHSync(mode), type); free(flags); } /** * Marks as bad any modes with unsupported flags. * * \param modeList doubly-linked list of modes. * \param flags flags supported by the driver. * * \bug only V_INTERLACE and V_DBLSCAN are supported. Is that enough? */ void xf86ValidateModesFlags(ScrnInfoPtr pScrn, DisplayModePtr modeList, int flags) { DisplayModePtr mode; if (flags == (V_INTERLACE | V_DBLSCAN)) return; for (mode = modeList; mode != NULL; mode = mode->next) { if (mode->Flags & V_INTERLACE && !(flags & V_INTERLACE)) mode->status = MODE_NO_INTERLACE; if (mode->Flags & V_DBLSCAN && !(flags & V_DBLSCAN)) mode->status = MODE_NO_DBLESCAN; } } /** * Marks as bad any modes extending beyond the given max X, Y, or pitch. * * \param modeList doubly-linked list of modes. */ void xf86ValidateModesSize(ScrnInfoPtr pScrn, DisplayModePtr modeList, int maxX, int maxY, int maxPitch) { DisplayModePtr mode; if (maxPitch <= 0) maxPitch = MAXINT; if (maxX <= 0) maxX = MAXINT; if (maxY <= 0) maxY = MAXINT; for (mode = modeList; mode != NULL; mode = mode->next) { if ((xf86ModeWidth(mode, RR_Rotate_0) > maxPitch || xf86ModeWidth(mode, RR_Rotate_0) > maxX || xf86ModeHeight(mode, RR_Rotate_0) > maxY) && (xf86ModeWidth(mode, RR_Rotate_90) > maxPitch || xf86ModeWidth(mode, RR_Rotate_90) > maxX || xf86ModeHeight(mode, RR_Rotate_90) > maxY)) { if (xf86ModeWidth(mode, RR_Rotate_0) > maxPitch || xf86ModeWidth(mode, RR_Rotate_90) > maxPitch) mode->status = MODE_BAD_WIDTH; if (xf86ModeWidth(mode, RR_Rotate_0) > maxX || xf86ModeWidth(mode, RR_Rotate_90) > maxX) mode->status = MODE_VIRTUAL_X; if (xf86ModeHeight(mode, RR_Rotate_0) > maxY || xf86ModeHeight(mode, RR_Rotate_90) > maxY) mode->status = MODE_VIRTUAL_Y; } if (mode->next == modeList) break; } } /** * Marks as bad any modes that aren't supported by the given monitor's * hsync and vrefresh ranges. * * \param modeList doubly-linked list of modes. */ void xf86ValidateModesSync(ScrnInfoPtr pScrn, DisplayModePtr modeList, MonPtr mon) { DisplayModePtr mode; for (mode = modeList; mode != NULL; mode = mode->next) { Bool bad; int i; bad = TRUE; for (i = 0; i < mon->nHsync; i++) { if (xf86ModeHSync(mode) >= mon->hsync[i].lo * (1 - SYNC_TOLERANCE) && xf86ModeHSync(mode) <= mon->hsync[i].hi * (1 + SYNC_TOLERANCE)) { bad = FALSE; } } if (bad) mode->status = MODE_HSYNC; bad = TRUE; for (i = 0; i < mon->nVrefresh; i++) { if (xf86ModeVRefresh(mode) >= mon->vrefresh[i].lo * (1 - SYNC_TOLERANCE) && xf86ModeVRefresh(mode) <= mon->vrefresh[i].hi * (1 + SYNC_TOLERANCE)) { bad = FALSE; } } if (bad) mode->status = MODE_VSYNC; if (mode->next == modeList) break; } } /** * Marks as bad any modes extending beyond outside of the given clock ranges. * * \param modeList doubly-linked list of modes. * \param min pointer to minimums of clock ranges * \param max pointer to maximums of clock ranges * \param n_ranges number of ranges. */ void xf86ValidateModesClocks(ScrnInfoPtr pScrn, DisplayModePtr modeList, int *min, int *max, int n_ranges) { DisplayModePtr mode; int i; for (mode = modeList; mode != NULL; mode = mode->next) { Bool good = FALSE; for (i = 0; i < n_ranges; i++) { if (mode->Clock >= min[i] * (1 - SYNC_TOLERANCE) && mode->Clock <= max[i] * (1 + SYNC_TOLERANCE)) { good = TRUE; break; } } if (!good) mode->status = MODE_CLOCK_RANGE; } } /** * If the user has specified a set of mode names to use, mark as bad any modes * not listed. * * The user mode names specified are prefixes to names of modes, so "1024x768" * will match modes named "1024x768", "1024x768x75", "1024x768-good", but * "1024x768x75" would only match "1024x768x75" from that list. * * MODE_BAD is used as the rejection flag, for lack of a better flag. * * \param modeList doubly-linked list of modes. */ void xf86ValidateModesUserConfig(ScrnInfoPtr pScrn, DisplayModePtr modeList) { DisplayModePtr mode; if (pScrn->display->modes[0] == NULL) return; for (mode = modeList; mode != NULL; mode = mode->next) { int i; Bool good = FALSE; for (i = 0; pScrn->display->modes[i] != NULL; i++) { if (strncmp(pScrn->display->modes[i], mode->name, strlen(pScrn->display->modes[i])) == 0) { good = TRUE; break; } } if (!good) mode->status = MODE_BAD; } } /** * Marks as bad any modes exceeding the given bandwidth. * * \param modeList doubly-linked list of modes. * \param bandwidth bandwidth in MHz. * \param depth color depth. */ void xf86ValidateModesBandwidth(ScrnInfoPtr pScrn, DisplayModePtr modeList, unsigned int bandwidth, int depth) { DisplayModePtr mode; for (mode = modeList; mode != NULL; mode = mode->next) { if (xf86ModeBandwidth(mode, depth) > bandwidth) mode->status = MODE_BANDWIDTH; } } Bool xf86ModeIsReduced(const DisplayModeRec * mode) { if ((((mode->HDisplay * 5 / 4) & ~0x07) > mode->HTotal) && ((mode->HTotal - mode->HDisplay) == 160) && ((mode->HSyncEnd - mode->HDisplay) == 80) && ((mode->HSyncEnd - mode->HSyncStart) == 32) && ((mode->VSyncStart - mode->VDisplay) == 3)) return TRUE; return FALSE; } /** * Marks as bad any reduced-blanking modes. * * \param modeList doubly-linked list of modes. */ void xf86ValidateModesReducedBlanking(ScrnInfoPtr pScrn, DisplayModePtr modeList) { for (; modeList != NULL; modeList = modeList->next) if (xf86ModeIsReduced(modeList)) modeList->status = MODE_NO_REDUCED; } /** * Frees any modes from the list with a status other than MODE_OK. * * \param modeList pointer to a doubly-linked or circular list of modes. * \param verbose determines whether the reason for mode invalidation is * printed. */ void xf86PruneInvalidModes(ScrnInfoPtr pScrn, DisplayModePtr * modeList, Bool verbose) { DisplayModePtr mode; for (mode = *modeList; mode != NULL;) { DisplayModePtr next = mode->next, first = *modeList; if (mode->status != MODE_OK) { if (verbose) { const char *type = ""; if (mode->type & M_T_BUILTIN) type = "built-in "; else if (mode->type & M_T_DEFAULT) type = "default "; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Not using %smode \"%s\" (%s)\n", type, mode->name, xf86ModeStatusToString(mode->status)); } xf86DeleteMode(modeList, mode); } if (next == first) break; mode = next; } } /** * Adds the new mode into the mode list, and returns the new list * * \param modes doubly-linked mode list. */ DisplayModePtr xf86ModesAdd(DisplayModePtr modes, DisplayModePtr new) { if (modes == NULL) return new; if (new) { DisplayModePtr mode = modes; while (mode->next) mode = mode->next; mode->next = new; new->prev = mode; } return modes; } /** * Build a mode list from a list of config file modes */ static DisplayModePtr xf86GetConfigModes(XF86ConfModeLinePtr conf_mode) { DisplayModePtr head = NULL, prev = NULL, mode; for (; conf_mode; conf_mode = (XF86ConfModeLinePtr) conf_mode->list.next) { mode = calloc(1, sizeof(DisplayModeRec)); if (!mode) continue; mode->name = xstrdup(conf_mode->ml_identifier); if (!mode->name) { free(mode); continue; } mode->type = 0; mode->Clock = conf_mode->ml_clock; mode->HDisplay = conf_mode->ml_hdisplay; mode->HSyncStart = conf_mode->ml_hsyncstart; mode->HSyncEnd = conf_mode->ml_hsyncend; mode->HTotal = conf_mode->ml_htotal; mode->VDisplay = conf_mode->ml_vdisplay; mode->VSyncStart = conf_mode->ml_vsyncstart; mode->VSyncEnd = conf_mode->ml_vsyncend; mode->VTotal = conf_mode->ml_vtotal; mode->Flags = conf_mode->ml_flags; mode->HSkew = conf_mode->ml_hskew; mode->VScan = conf_mode->ml_vscan; mode->prev = prev; mode->next = NULL; if (prev) prev->next = mode; else head = mode; prev = mode; } return head; } /** * Build a mode list from a monitor configuration */ DisplayModePtr xf86GetMonitorModes(ScrnInfoPtr pScrn, XF86ConfMonitorPtr conf_monitor) { DisplayModePtr modes = NULL; XF86ConfModesLinkPtr modes_link; if (!conf_monitor) return NULL; /* * first we collect the mode lines from the UseModes directive */ for (modes_link = conf_monitor->mon_modes_sect_lst; modes_link; modes_link = modes_link->list.next) { /* If this modes link hasn't been resolved, go look it up now */ if (!modes_link->ml_modes) modes_link->ml_modes = xf86findModes(modes_link->ml_modes_str, xf86configptr->conf_modes_lst); if (modes_link->ml_modes) modes = xf86ModesAdd(modes, xf86GetConfigModes(modes_link->ml_modes-> mon_modeline_lst)); } return xf86ModesAdd(modes, xf86GetConfigModes(conf_monitor->mon_modeline_lst)); } /** * Build a mode list containing all of the default modes */ DisplayModePtr xf86GetDefaultModes(void) { DisplayModePtr head = NULL, mode; int i; for (i = 0; i < xf86NumDefaultModes; i++) { const DisplayModeRec *defMode = &xf86DefaultModes[i]; mode = xf86DuplicateMode(defMode); head = xf86ModesAdd(head, mode); } return head; } /* * Walk a mode list and prune out duplicates. Will preserve the preferred * mode of an otherwise-duplicate pair. * * Probably best to call this on lists that are all of a single class * (driver, default, user, etc.), otherwise, which mode gets deleted is * not especially well defined. * * Returns the new list. */ DisplayModePtr xf86PruneDuplicateModes(DisplayModePtr modes) { DisplayModePtr m, n, o; top: for (m = modes; m; m = m->next) { for (n = m->next; n; n = o) { o = n->next; if (xf86ModesEqual(m, n)) { if (n->type & M_T_PREFERRED) { xf86DeleteMode(&modes, m); goto top; } else xf86DeleteMode(&modes, n); } } } return modes; } /* * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh. */ DisplayModePtr xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced) { struct libxcvt_mode_info *libxcvt_mode_info; DisplayModeRec *Mode = xnfcalloc(1, sizeof(DisplayModeRec)); char *tmp; libxcvt_mode_info = libxcvt_gen_mode_info(HDisplay, VDisplay, VRefresh, Reduced, Interlaced); XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay); Mode->name = tmp; Mode->VDisplay = libxcvt_mode_info->vdisplay; Mode->HDisplay = libxcvt_mode_info->hdisplay; Mode->Clock = libxcvt_mode_info->dot_clock; Mode->HSyncStart = libxcvt_mode_info->hsync_start; Mode->HSyncEnd = libxcvt_mode_info->hsync_end; Mode->HTotal = libxcvt_mode_info->htotal; Mode->VSyncStart = libxcvt_mode_info->vsync_start; Mode->VSyncEnd = libxcvt_mode_info->vsync_end; Mode->VTotal = libxcvt_mode_info->vtotal; Mode->VRefresh = libxcvt_mode_info->vrefresh; Mode->Flags = libxcvt_mode_info->mode_flags; free(libxcvt_mode_info); return Mode; } xorg-server-21.1.16/hw/xfree86/modes/xf86RandR12.c0000644000175000017500000022270314757411105014706 /* * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include "xf86.h" #include "os.h" #include "globals.h" #include "xf86Modes.h" #include "xf86Priv.h" #include "xf86DDC.h" #include "mipointer.h" #include "windowstr.h" #include "inputstr.h" #include #include #include "xf86cmap.h" #include "xf86Crtc.h" #include "xf86RandR12.h" typedef struct _xf86RandR12Info { int virtualX; int virtualY; int mmWidth; int mmHeight; int maxX; int maxY; int pointerX; int pointerY; Rotation rotation; /* current mode */ Rotation supported_rotations; /* driver supported */ /* Compatibility with colormaps and XF86VidMode's gamma */ int palette_red_size; int palette_green_size; int palette_blue_size; int palette_size; LOCO *palette; /* Used to wrap EnterVT so we can re-probe the outputs when a laptop unsuspends * (actually, any time that we switch back into our VT). * * See https://bugs.freedesktop.org/show_bug.cgi?id=21554 */ xf86EnterVTProc *orig_EnterVT; Bool panning; ConstrainCursorHarderProcPtr orig_ConstrainCursorHarder; } XF86RandRInfoRec, *XF86RandRInfoPtr; #ifdef RANDR_12_INTERFACE static Bool xf86RandR12Init12(ScreenPtr pScreen); static Bool xf86RandR12CreateScreenResources12(ScreenPtr pScreen); #endif static int xf86RandR12Generation; static DevPrivateKeyRec xf86RandR12KeyRec; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, &xf86RandR12KeyRec)) static int xf86RandR12ModeRefresh(DisplayModePtr mode) { if (mode->VRefresh) return (int) (mode->VRefresh + 0.5); else return (int) (mode->Clock * 1000.0 / mode->HTotal / mode->VTotal + 0.5); } /* Adapt panning area; return TRUE if panning area was valid without adaption */ static int xf86RandR13VerifyPanningArea(xf86CrtcPtr crtc, int screenWidth, int screenHeight) { int ret = TRUE; if (crtc->version < 2) return FALSE; if (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1) { /* Panning in X is disabled */ if (crtc->panningTotalArea.x1 || crtc->panningTotalArea.x2) /* Illegal configuration -> fail/disable */ ret = FALSE; crtc->panningTotalArea.x1 = crtc->panningTotalArea.x2 = 0; crtc->panningTrackingArea.x1 = crtc->panningTrackingArea.x2 = 0; crtc->panningBorder[0] = crtc->panningBorder[2] = 0; } else { /* Panning in X is enabled */ if (crtc->panningTotalArea.x1 < 0) { /* Panning region outside screen -> move inside */ crtc->panningTotalArea.x2 -= crtc->panningTotalArea.x1; crtc->panningTotalArea.x1 = 0; ret = FALSE; } if (crtc->panningTotalArea.x2 < crtc->panningTotalArea.x1 + crtc->mode.HDisplay) { /* Panning region smaller than displayed area -> crop to displayed area */ crtc->panningTotalArea.x2 = crtc->panningTotalArea.x1 + crtc->mode.HDisplay; ret = FALSE; } if (crtc->panningTotalArea.x2 > screenWidth) { /* Panning region larger than screen -> move inside, then crop to screen */ crtc->panningTotalArea.x1 -= crtc->panningTotalArea.x2 - screenWidth; crtc->panningTotalArea.x2 = screenWidth; ret = FALSE; if (crtc->panningTotalArea.x1 < 0) crtc->panningTotalArea.x1 = 0; } if (crtc->panningBorder[0] + crtc->panningBorder[2] > crtc->mode.HDisplay) { /* Borders too large -> set to 0 */ crtc->panningBorder[0] = crtc->panningBorder[2] = 0; ret = FALSE; } } if (crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1) { /* Panning in Y is disabled */ if (crtc->panningTotalArea.y1 || crtc->panningTotalArea.y2) /* Illegal configuration -> fail/disable */ ret = FALSE; crtc->panningTotalArea.y1 = crtc->panningTotalArea.y2 = 0; crtc->panningTrackingArea.y1 = crtc->panningTrackingArea.y2 = 0; crtc->panningBorder[1] = crtc->panningBorder[3] = 0; } else { /* Panning in Y is enabled */ if (crtc->panningTotalArea.y1 < 0) { /* Panning region outside screen -> move inside */ crtc->panningTotalArea.y2 -= crtc->panningTotalArea.y1; crtc->panningTotalArea.y1 = 0; ret = FALSE; } if (crtc->panningTotalArea.y2 < crtc->panningTotalArea.y1 + crtc->mode.VDisplay) { /* Panning region smaller than displayed area -> crop to displayed area */ crtc->panningTotalArea.y2 = crtc->panningTotalArea.y1 + crtc->mode.VDisplay; ret = FALSE; } if (crtc->panningTotalArea.y2 > screenHeight) { /* Panning region larger than screen -> move inside, then crop to screen */ crtc->panningTotalArea.y1 -= crtc->panningTotalArea.y2 - screenHeight; crtc->panningTotalArea.y2 = screenHeight; ret = FALSE; if (crtc->panningTotalArea.y1 < 0) crtc->panningTotalArea.y1 = 0; } if (crtc->panningBorder[1] + crtc->panningBorder[3] > crtc->mode.VDisplay) { /* Borders too large -> set to 0 */ crtc->panningBorder[1] = crtc->panningBorder[3] = 0; ret = FALSE; } } return ret; } /* * The heart of the panning operation: * * Given a frame buffer position (fb_x, fb_y), * and a crtc position (crtc_x, crtc_y), * and a transform matrix which maps frame buffer to crtc, * compute a panning position (pan_x, pan_y) that * makes the resulting transform line those two up */ static void xf86ComputeCrtcPan(Bool transform_in_use, struct pixman_f_transform *m, double screen_x, double screen_y, double crtc_x, double crtc_y, int old_pan_x, int old_pan_y, int *new_pan_x, int *new_pan_y) { if (transform_in_use) { /* * Given the current transform, M, the current position * on the Screen, S, and the desired position on the CRTC, * C, compute a translation, T, such that: * * M T S = C * * where T is of the form * * | 1 0 dx | * | 0 1 dy | * | 0 0 1 | * * M T S = * | M00 Sx + M01 Sy + M00 dx + M01 dy + M02 | | Cx F | * | M10 Sx + M11 Sy + M10 dx + M11 dy + M12 | = | Cy F | * | M20 Sx + M21 Sy + M20 dx + M21 dy + M22 | | F | * * R = M S * * Cx F = M00 dx + M01 dy + R0 * Cy F = M10 dx + M11 dy + R1 * F = M20 dx + M21 dy + R2 * * Zero out dx, then dy * * F (Cx M10 - Cy M00) = * (M10 M01 - M00 M11) dy + M10 R0 - M00 R1 * F (M10 - Cy M20) = * (M10 M21 - M20 M11) dy + M10 R2 - M20 R1 * * F (Cx M11 - Cy M01) = * (M11 M00 - M01 M10) dx + M11 R0 - M01 R1 * F (M11 - Cy M21) = * (M11 M20 - M21 M10) dx + M11 R2 - M21 R1 * * Make some temporaries * * T = | Cx M10 - Cy M00 | * | Cx M11 - Cy M01 | * * U = | M10 M01 - M00 M11 | * | M11 M00 - M01 M10 | * * Q = | M10 R0 - M00 R1 | * | M11 R0 - M01 R1 | * * P = | M10 - Cy M20 | * | M11 - Cy M21 | * * W = | M10 M21 - M20 M11 | * | M11 M20 - M21 M10 | * * V = | M10 R2 - M20 R1 | * | M11 R2 - M21 R1 | * * Rewrite: * * F T0 = U0 dy + Q0 * F P0 = W0 dy + V0 * F T1 = U1 dx + Q1 * F P1 = W1 dx + V1 * * Solve for F (two ways) * * F (W0 T0 - U0 P0) = W0 Q0 - U0 V0 * * W0 Q0 - U0 V0 * F = ------------- * W0 T0 - U0 P0 * * F (W1 T1 - U1 P1) = W1 Q1 - U1 V1 * * W1 Q1 - U1 V1 * F = ------------- * W1 T1 - U1 P1 * * We'll use which ever solution works (denominator != 0) * * Finally, solve for dx and dy: * * dx = (F T1 - Q1) / U1 * dx = (F P1 - V1) / W1 * * dy = (F T0 - Q0) / U0 * dy = (F P0 - V0) / W0 */ double r[3]; double q[2], u[2], t[2], v[2], w[2], p[2]; double f; struct pict_f_vector d; int i; /* Get the un-normalized crtc coordinates again */ for (i = 0; i < 3; i++) r[i] = m->m[i][0] * screen_x + m->m[i][1] * screen_y + m->m[i][2]; /* Combine values into temporaries */ for (i = 0; i < 2; i++) { q[i] = m->m[1][i] * r[0] - m->m[0][i] * r[1]; u[i] = m->m[1][i] * m->m[0][1 - i] - m->m[0][i] * m->m[1][1 - i]; t[i] = m->m[1][i] * crtc_x - m->m[0][i] * crtc_y; v[i] = m->m[1][i] * r[2] - m->m[2][i] * r[1]; w[i] = m->m[1][i] * m->m[2][1 - i] - m->m[2][i] * m->m[1][1 - i]; p[i] = m->m[1][i] - m->m[2][i] * crtc_y; } /* Find a way to compute f */ f = 0; for (i = 0; i < 2; i++) { double a = w[i] * q[i] - u[i] * v[i]; double b = w[i] * t[i] - u[i] * p[i]; if (b != 0) { f = a / b; break; } } /* Solve for the resulting transform vector */ for (i = 0; i < 2; i++) { if (u[i]) d.v[1 - i] = (t[i] * f - q[i]) / u[i]; else if (w[1]) d.v[1 - i] = (p[i] * f - v[i]) / w[i]; else d.v[1 - i] = 0; } *new_pan_x = old_pan_x - floor(d.v[0] + 0.5); *new_pan_y = old_pan_y - floor(d.v[1] + 0.5); } else { *new_pan_x = screen_x - crtc_x; *new_pan_y = screen_y - crtc_y; } } static void xf86RandR13Pan(xf86CrtcPtr crtc, int x, int y) { int newX, newY; int width, height; Bool panned = FALSE; if (crtc->version < 2) return; if (!crtc->enabled || (crtc->panningTotalArea.x2 <= crtc->panningTotalArea.x1 && crtc->panningTotalArea.y2 <= crtc->panningTotalArea.y1)) return; newX = crtc->x; newY = crtc->y; width = crtc->mode.HDisplay; height = crtc->mode.VDisplay; if ((crtc->panningTrackingArea.x2 <= crtc->panningTrackingArea.x1 || (x >= crtc->panningTrackingArea.x1 && x < crtc->panningTrackingArea.x2)) && (crtc->panningTrackingArea.y2 <= crtc->panningTrackingArea.y1 || (y >= crtc->panningTrackingArea.y1 && y < crtc->panningTrackingArea.y2))) { struct pict_f_vector c; /* * Pre-clip the mouse position to the panning area so that we don't * push the crtc outside. This doesn't deal with changes to the * panning values, only mouse position changes. */ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) { if (x < crtc->panningTotalArea.x1) x = crtc->panningTotalArea.x1; if (x >= crtc->panningTotalArea.x2) x = crtc->panningTotalArea.x2 - 1; } if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { if (y < crtc->panningTotalArea.y1) y = crtc->panningTotalArea.y1; if (y >= crtc->panningTotalArea.y2) y = crtc->panningTotalArea.y2 - 1; } c.v[0] = x; c.v[1] = y; c.v[2] = 1.0; if (crtc->transform_in_use) { pixman_f_transform_point(&crtc->f_framebuffer_to_crtc, &c); } else { c.v[0] -= crtc->x; c.v[1] -= crtc->y; } if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) { if (c.v[0] < crtc->panningBorder[0]) { c.v[0] = crtc->panningBorder[0]; panned = TRUE; } if (c.v[0] >= width - crtc->panningBorder[2]) { c.v[0] = width - crtc->panningBorder[2] - 1; panned = TRUE; } } if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { if (c.v[1] < crtc->panningBorder[1]) { c.v[1] = crtc->panningBorder[1]; panned = TRUE; } if (c.v[1] >= height - crtc->panningBorder[3]) { c.v[1] = height - crtc->panningBorder[3] - 1; panned = TRUE; } } if (panned) xf86ComputeCrtcPan(crtc->transform_in_use, &crtc->f_framebuffer_to_crtc, x, y, c.v[0], c.v[1], newX, newY, &newX, &newY); } /* * Ensure that the crtc is within the panning region. * * XXX This computation only works when we do not have a transform * in use. */ if (!crtc->transform_in_use) { /* Validate against [xy]1 after [xy]2, to be sure that results are > 0 for [xy]1 > 0 */ if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1) { if (newX > crtc->panningTotalArea.x2 - width) newX = crtc->panningTotalArea.x2 - width; if (newX < crtc->panningTotalArea.x1) newX = crtc->panningTotalArea.x1; } if (crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) { if (newY > crtc->panningTotalArea.y2 - height) newY = crtc->panningTotalArea.y2 - height; if (newY < crtc->panningTotalArea.y1) newY = crtc->panningTotalArea.y1; } } if (newX != crtc->x || newY != crtc->y) xf86CrtcSetOrigin(crtc, newX, newY); } static Bool xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations) { RRScreenSizePtr pSize; ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; int maxX = 0, maxY = 0; *rotations = randrp->supported_rotations; if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = scrp->virtualX; randrp->virtualY = scrp->virtualY; } /* Re-probe the outputs for new monitors or modes */ if (scrp->vtSema) { xf86ProbeOutputModes(scrp, 0, 0); xf86SetScrnInfoModes(scrp); } for (mode = scrp->modes;; mode = mode->next) { int refresh = xf86RandR12ModeRefresh(mode); if (randrp->maxX == 0 || randrp->maxY == 0) { if (maxX < mode->HDisplay) maxX = mode->HDisplay; if (maxY < mode->VDisplay) maxY = mode->VDisplay; } pSize = RRRegisterSize(pScreen, mode->HDisplay, mode->VDisplay, randrp->mmWidth, randrp->mmHeight); if (!pSize) return FALSE; RRRegisterRate(pScreen, pSize, refresh); if (xf86ModesEqual(mode, scrp->currentMode)) { RRSetCurrentConfig(pScreen, randrp->rotation, refresh, pSize); } if (mode->next == scrp->modes) break; } if (randrp->maxX == 0 || randrp->maxY == 0) { randrp->maxX = maxX; randrp->maxY = maxY; } return TRUE; } static Bool xf86RandR12SetMode(ScreenPtr pScreen, DisplayModePtr mode, Bool useVirtual, int mmWidth, int mmHeight) { ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); int oldWidth = pScreen->width; int oldHeight = pScreen->height; int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; WindowPtr pRoot = pScreen->root; DisplayModePtr currentMode = NULL; Bool ret = TRUE; if (pRoot) (*scrp->EnableDisableFBAccess) (scrp, FALSE); if (useVirtual) { scrp->virtualX = randrp->virtualX; scrp->virtualY = randrp->virtualY; } else { scrp->virtualX = mode->HDisplay; scrp->virtualY = mode->VDisplay; } if (randrp->rotation & (RR_Rotate_90 | RR_Rotate_270)) { /* If the screen is rotated 90 or 270 degrees, swap the sizes. */ pScreen->width = scrp->virtualY; pScreen->height = scrp->virtualX; pScreen->mmWidth = mmHeight; pScreen->mmHeight = mmWidth; } else { pScreen->width = scrp->virtualX; pScreen->height = scrp->virtualY; pScreen->mmWidth = mmWidth; pScreen->mmHeight = mmHeight; } if (scrp->currentMode == mode) { /* Save current mode */ currentMode = scrp->currentMode; /* Reset, just so we ensure the drivers SwitchMode is called */ scrp->currentMode = NULL; } /* * We know that if the driver failed to SwitchMode to the rotated * version, then it should revert back to its prior mode. */ if (!xf86SwitchMode(pScreen, mode)) { ret = FALSE; scrp->virtualX = pScreen->width = oldWidth; scrp->virtualY = pScreen->height = oldHeight; pScreen->mmWidth = oldmmWidth; pScreen->mmHeight = oldmmHeight; scrp->currentMode = currentMode; } /* * Make sure the layout is correct */ xf86ReconfigureLayout(); /* * Make sure the whole screen is visible */ xf86SetViewport(pScreen, pScreen->width, pScreen->height); xf86SetViewport(pScreen, 0, 0); if (pRoot) (*scrp->EnableDisableFBAccess) (scrp, TRUE); return ret; } Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize) { ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; int pos[MAXDEVICES][2]; Bool useVirtual = FALSE; int maxX = 0, maxY = 0; Rotation oldRotation = randrp->rotation; DeviceIntPtr dev; Bool view_adjusted = FALSE; randrp->rotation = rotation; if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = scrp->virtualX; randrp->virtualY = scrp->virtualY; } for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) continue; miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); } for (mode = scrp->modes;; mode = mode->next) { if (randrp->maxX == 0 || randrp->maxY == 0) { if (maxX < mode->HDisplay) maxX = mode->HDisplay; if (maxY < mode->VDisplay) maxY = mode->VDisplay; } if (mode->HDisplay == pSize->width && mode->VDisplay == pSize->height && (rate == 0 || xf86RandR12ModeRefresh(mode) == rate)) break; if (mode->next == scrp->modes) { if (pSize->width == randrp->virtualX && pSize->height == randrp->virtualY) { mode = scrp->modes; useVirtual = TRUE; break; } if (randrp->maxX == 0 || randrp->maxY == 0) { randrp->maxX = maxX; randrp->maxY = maxY; } return FALSE; } } if (randrp->maxX == 0 || randrp->maxY == 0) { randrp->maxX = maxX; randrp->maxY = maxY; } if (!xf86RandR12SetMode(pScreen, mode, useVirtual, pSize->mmWidth, pSize->mmHeight)) { randrp->rotation = oldRotation; return FALSE; } /* * Move the cursor back where it belongs; SwitchMode repositions it * FIXME: duplicated code, see modes/xf86RandR12.c */ for (dev = inputInfo.devices; dev; dev = dev->next) { if (!IsMaster(dev) && !IsFloating(dev)) continue; if (pScreen == miPointerGetScreen(dev)) { int px = pos[dev->id][0]; int py = pos[dev->id][1]; px = (px >= pScreen->width ? (pScreen->width - 1) : px); py = (py >= pScreen->height ? (pScreen->height - 1) : py); /* Setting the viewpoint makes only sense on one device */ if (!view_adjusted && IsMaster(dev)) { xf86SetViewport(pScreen, px, py); view_adjusted = TRUE; } (*pScreen->SetCursorPosition) (dev, pScreen, px, py, FALSE); } } return TRUE; } #define PANNING_ENABLED(crtc) \ ((crtc)->panningTotalArea.x2 > (crtc)->panningTotalArea.x1 || \ (crtc)->panningTotalArea.y2 > (crtc)->panningTotalArea.y1) static Bool xf86RandR12ScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); WindowPtr pRoot = pScreen->root; PixmapPtr pScrnPix; Bool ret = FALSE; int c; if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = pScrn->virtualX; randrp->virtualY = pScrn->virtualY; } if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScrn, FALSE); /* Let the driver update virtualX and virtualY */ if (!(*config->funcs->resize) (pScrn, width, height)) goto finish; ret = TRUE; /* Update panning information */ for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; if (PANNING_ENABLED (crtc)) { if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1) crtc->panningTotalArea.x2 += width - pScreen->width; if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1) crtc->panningTotalArea.y2 += height - pScreen->height; if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1) crtc->panningTrackingArea.x2 += width - pScreen->width; if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1) crtc->panningTrackingArea.y2 += height - pScreen->height; xf86RandR13VerifyPanningArea(crtc, width, height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); } } pScrnPix = (*pScreen->GetScreenPixmap) (pScreen); pScreen->width = pScrnPix->drawable.width = width; pScreen->height = pScrnPix->drawable.height = height; randrp->mmWidth = pScreen->mmWidth = mmWidth; randrp->mmHeight = pScreen->mmHeight = mmHeight; xf86SetViewport(pScreen, pScreen->width - 1, pScreen->height - 1); xf86SetViewport(pScreen, 0, 0); finish: update_desktop_dimensions(); if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScrn, TRUE); #if RANDR_12_INTERFACE if (pScreen->root && ret) RRScreenSizeNotify(pScreen); #endif return ret; } Rotation xf86RandR12GetRotation(ScreenPtr pScreen) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); return randrp->rotation; } Bool xf86RandR12CreateScreenResources(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config; XF86RandRInfoPtr randrp; int c; int width, height; int mmWidth, mmHeight; #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) return TRUE; #endif config = XF86_CRTC_CONFIG_PTR(pScrn); randrp = XF86RANDRINFO(pScreen); /* * Compute size of screen */ width = 0; height = 0; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; int crtc_width = crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation); int crtc_height = crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation); if (crtc->enabled) { if (crtc_width > width) width = crtc_width; if (crtc_height > height) height = crtc_height; if (crtc->panningTotalArea.x2 > width) width = crtc->panningTotalArea.x2; if (crtc->panningTotalArea.y2 > height) height = crtc->panningTotalArea.y2; } } if (width && height) { /* * Compute physical size of screen */ if (monitorResolution) { mmWidth = width * 25.4 / monitorResolution; mmHeight = height * 25.4 / monitorResolution; } else { xf86OutputPtr output = xf86CompatOutput(pScrn); if (output && output->conf_monitor && (output->conf_monitor->mon_width > 0 && output->conf_monitor->mon_height > 0)) { /* * Prefer user configured DisplaySize */ mmWidth = output->conf_monitor->mon_width; mmHeight = output->conf_monitor->mon_height; } else { /* * Otherwise, just set the screen to DEFAULT_DPI */ mmWidth = width * 25.4 / DEFAULT_DPI; mmHeight = height * 25.4 / DEFAULT_DPI; } } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting screen physical size to %d x %d\n", mmWidth, mmHeight); /* * This is the initial setting of the screen size. * We have to pre-set it here, otherwise panning would be adapted * to the new screen size. */ pScreen->width = width; pScreen->height = height; xf86RandR12ScreenSetSize(pScreen, width, height, mmWidth, mmHeight); } if (randrp->virtualX == -1 || randrp->virtualY == -1) { randrp->virtualX = pScrn->virtualX; randrp->virtualY = pScrn->virtualY; } xf86CrtcSetScreenSubpixelOrder(pScreen); #if RANDR_12_INTERFACE if (xf86RandR12CreateScreenResources12(pScreen)) return TRUE; #endif return TRUE; } Bool xf86RandR12Init(ScreenPtr pScreen) { rrScrPrivPtr rp; XF86RandRInfoPtr randrp; #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) { if (xf86NumScreens == 1) noPanoramiXExtension = TRUE; else return TRUE; } #endif if (xf86RandR12Generation != serverGeneration) xf86RandR12Generation = serverGeneration; if (!dixRegisterPrivateKey(&xf86RandR12KeyRec, PRIVATE_SCREEN, 0)) return FALSE; randrp = malloc(sizeof(XF86RandRInfoRec)); if (!randrp) return FALSE; if (!RRScreenInit(pScreen)) { free(randrp); return FALSE; } rp = rrGetScrPriv(pScreen); rp->rrGetInfo = xf86RandR12GetInfo; rp->rrSetConfig = xf86RandR12SetConfig; randrp->virtualX = -1; randrp->virtualY = -1; randrp->mmWidth = pScreen->mmWidth; randrp->mmHeight = pScreen->mmHeight; randrp->rotation = RR_Rotate_0; /* initial rotated mode */ randrp->supported_rotations = RR_Rotate_0; randrp->maxX = randrp->maxY = 0; randrp->palette_size = 0; randrp->palette = NULL; dixSetPrivate(&pScreen->devPrivates, &xf86RandR12KeyRec, randrp); #if RANDR_12_INTERFACE if (!xf86RandR12Init12(pScreen)) return FALSE; #endif return TRUE; } void xf86RandR12CloseScreen(ScreenPtr pScreen) { XF86RandRInfoPtr randrp; if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec)) return; randrp = XF86RANDRINFO(pScreen); #if RANDR_12_INTERFACE xf86ScreenToScrn(pScreen)->EnterVT = randrp->orig_EnterVT; pScreen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder; #endif free(randrp->palette); free(randrp); } void xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotations) { XF86RandRInfoPtr randrp; #if RANDR_12_INTERFACE ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); int c; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); #endif if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec)) return; randrp = XF86RANDRINFO(pScreen); #if RANDR_12_INTERFACE for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; RRCrtcSetRotations(crtc->randr_crtc, rotations); } #endif randrp->supported_rotations = rotations; } void xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms) { #if RANDR_13_INTERFACE ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); int c; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); if (!dixPrivateKeyRegistered(&xf86RandR12KeyRec)) return; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; RRCrtcSetTransformSupport(crtc->randr_crtc, transforms); } #endif } void xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr pScrn, int *x, int *y) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); if (xf86RandR12Generation != serverGeneration || XF86RANDRINFO(pScreen)->virtualX == -1) { *x = pScrn->virtualX; *y = pScrn->virtualY; } else { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); *x = randrp->virtualX; *y = randrp->virtualY; } } #if RANDR_12_INTERFACE #define FLAG_BITS (RR_HSyncPositive | \ RR_HSyncNegative | \ RR_VSyncPositive | \ RR_VSyncNegative | \ RR_Interlace | \ RR_DoubleScan | \ RR_CSync | \ RR_CSyncPositive | \ RR_CSyncNegative | \ RR_HSkewPresent | \ RR_BCast | \ RR_PixelMultiplex | \ RR_DoubleClock | \ RR_ClockDivideBy2) static Bool xf86RandRModeMatches(RRModePtr randr_mode, DisplayModePtr mode) { #if 0 if (match_name) { /* check for same name */ int len = strlen(mode->name); if (randr_mode->mode.nameLength != len) return FALSE; if (memcmp(randr_mode->name, mode->name, len) != 0) return FALSE; } #endif /* check for same timings */ if (randr_mode->mode.dotClock / 1000 != mode->Clock) return FALSE; if (randr_mode->mode.width != mode->HDisplay) return FALSE; if (randr_mode->mode.hSyncStart != mode->HSyncStart) return FALSE; if (randr_mode->mode.hSyncEnd != mode->HSyncEnd) return FALSE; if (randr_mode->mode.hTotal != mode->HTotal) return FALSE; if (randr_mode->mode.hSkew != mode->HSkew) return FALSE; if (randr_mode->mode.height != mode->VDisplay) return FALSE; if (randr_mode->mode.vSyncStart != mode->VSyncStart) return FALSE; if (randr_mode->mode.vSyncEnd != mode->VSyncEnd) return FALSE; if (randr_mode->mode.vTotal != mode->VTotal) return FALSE; /* check for same flags (using only the XF86 valid flag bits) */ if ((randr_mode->mode.modeFlags & FLAG_BITS) != (mode->Flags & FLAG_BITS)) return FALSE; /* everything matches */ return TRUE; } static Bool xf86RandR12CrtcNotify(RRCrtcPtr randr_crtc) { ScreenPtr pScreen = randr_crtc->pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); RRModePtr randr_mode = NULL; int x; int y; Rotation rotation; int numOutputs; RROutputPtr *randr_outputs; RROutputPtr randr_output; xf86CrtcPtr crtc = randr_crtc->devPrivate; xf86OutputPtr output; int i, j; DisplayModePtr mode = &crtc->mode; Bool ret; randr_outputs = xallocarray(config->num_output, sizeof(RROutputPtr)); if (!randr_outputs) return FALSE; x = crtc->x; y = crtc->y; rotation = crtc->rotation; numOutputs = 0; randr_mode = NULL; for (i = 0; i < config->num_output; i++) { output = config->output[i]; if (output->crtc == crtc) { randr_output = output->randr_output; randr_outputs[numOutputs++] = randr_output; /* * We make copies of modes, so pointer equality * isn't sufficient */ for (j = 0; j < randr_output->numModes + randr_output->numUserModes; j++) { RRModePtr m = (j < randr_output->numModes ? randr_output-> modes[j] : randr_output->userModes[j - randr_output-> numModes]); if (xf86RandRModeMatches(m, mode)) { randr_mode = m; break; } } } } ret = RRCrtcNotify(randr_crtc, randr_mode, x, y, rotation, crtc->transformPresent ? &crtc->transform : NULL, numOutputs, randr_outputs); free(randr_outputs); return ret; } /* * Convert a RandR mode to a DisplayMode */ static void xf86RandRModeConvert(ScrnInfoPtr scrn, RRModePtr randr_mode, DisplayModePtr mode) { memset(mode, 0, sizeof(DisplayModeRec)); mode->status = MODE_OK; mode->Clock = randr_mode->mode.dotClock / 1000; mode->HDisplay = randr_mode->mode.width; mode->HSyncStart = randr_mode->mode.hSyncStart; mode->HSyncEnd = randr_mode->mode.hSyncEnd; mode->HTotal = randr_mode->mode.hTotal; mode->HSkew = randr_mode->mode.hSkew; mode->VDisplay = randr_mode->mode.height; mode->VSyncStart = randr_mode->mode.vSyncStart; mode->VSyncEnd = randr_mode->mode.vSyncEnd; mode->VTotal = randr_mode->mode.vTotal; mode->VScan = 0; mode->Flags = randr_mode->mode.modeFlags & FLAG_BITS; xf86SetModeCrtc(mode, scrn->adjustFlags); } static Bool xf86RandR12CrtcSet(ScreenPtr pScreen, RRCrtcPtr randr_crtc, RRModePtr randr_mode, int x, int y, Rotation rotation, int num_randr_outputs, RROutputPtr * randr_outputs) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86CrtcPtr crtc = randr_crtc->devPrivate; RRTransformPtr transform; Bool changed = FALSE; int o, ro; xf86CrtcPtr *save_crtcs; Bool save_enabled = crtc->enabled; if (!crtc->scrn->vtSema) return FALSE; save_crtcs = xallocarray(config->num_output, sizeof(xf86CrtcPtr)); if ((randr_mode != NULL) != crtc->enabled) changed = TRUE; else if (randr_mode && !xf86RandRModeMatches(randr_mode, &crtc->mode)) changed = TRUE; if (rotation != crtc->rotation) changed = TRUE; if (crtc->current_scanout != randr_crtc->scanout_pixmap || crtc->current_scanout_back != randr_crtc->scanout_pixmap_back) changed = TRUE; transform = RRCrtcGetTransform(randr_crtc); if ((transform != NULL) != crtc->transformPresent) changed = TRUE; else if (transform && !RRTransformEqual(transform, &crtc->transform)) changed = TRUE; if (x != crtc->x || y != crtc->y) changed = TRUE; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; xf86CrtcPtr new_crtc; save_crtcs[o] = output->crtc; if (output->crtc == crtc) new_crtc = NULL; else new_crtc = output->crtc; for (ro = 0; ro < num_randr_outputs; ro++) if (output->randr_output == randr_outputs[ro]) { new_crtc = crtc; break; } if (new_crtc != output->crtc) { changed = TRUE; output->crtc = new_crtc; } } for (ro = 0; ro < num_randr_outputs; ro++) if (randr_outputs[ro]->pendingProperties) changed = TRUE; /* XXX need device-independent mode setting code through an API */ if (changed) { crtc->enabled = randr_mode != NULL; if (randr_mode) { DisplayModeRec mode; xf86RandRModeConvert(pScrn, randr_mode, &mode); if (!xf86CrtcSetModeTransform (crtc, &mode, rotation, transform, x, y)) { crtc->enabled = save_enabled; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; output->crtc = save_crtcs[o]; } free(save_crtcs); return FALSE; } xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); randrp->panning = PANNING_ENABLED (crtc); /* * Save the last successful setting for EnterVT */ xf86SaveModeContents(&crtc->desiredMode, &mode); crtc->desiredRotation = rotation; crtc->current_scanout = randr_crtc->scanout_pixmap; crtc->current_scanout_back = randr_crtc->scanout_pixmap_back; if (transform) { crtc->desiredTransform = *transform; crtc->desiredTransformPresent = TRUE; } else crtc->desiredTransformPresent = FALSE; crtc->desiredX = x; crtc->desiredY = y; } xf86DisableUnusedFunctions(pScrn); } free(save_crtcs); return xf86RandR12CrtcNotify(randr_crtc); } static void xf86RandR12CrtcComputeGamma(xf86CrtcPtr crtc, LOCO *palette, int palette_red_size, int palette_green_size, int palette_blue_size, CARD16 *gamma_red, CARD16 *gamma_green, CARD16 *gamma_blue, int gamma_size) { int gamma_slots; unsigned shift; int i, j; CARD32 value = 0; for (shift = 0; (gamma_size << shift) < (1 << 16); shift++); if (crtc->gamma_size >= palette_red_size) { /* Upsampling of smaller palette to larger hw lut size */ gamma_slots = crtc->gamma_size / palette_red_size; for (i = 0; i < palette_red_size; i++) { value = palette[i].red; if (gamma_red) value = gamma_red[value]; else value <<= shift; for (j = 0; j < gamma_slots; j++) crtc->gamma_red[i * gamma_slots + j] = value; } /* Replicate last value until end of crtc for gamma_size not a power of 2 */ for (j = i * gamma_slots; j < crtc->gamma_size; j++) crtc->gamma_red[j] = value; } else { /* Downsampling of larger palette to smaller hw lut size */ for (i = 0; i < crtc->gamma_size; i++) { value = palette[i * (palette_red_size - 1) / (crtc->gamma_size - 1)].red; if (gamma_red) value = gamma_red[value]; else value <<= shift; crtc->gamma_red[i] = value; } } if (crtc->gamma_size >= palette_green_size) { /* Upsampling of smaller palette to larger hw lut size */ gamma_slots = crtc->gamma_size / palette_green_size; for (i = 0; i < palette_green_size; i++) { value = palette[i].green; if (gamma_green) value = gamma_green[value]; else value <<= shift; for (j = 0; j < gamma_slots; j++) crtc->gamma_green[i * gamma_slots + j] = value; } /* Replicate last value until end of crtc for gamma_size not a power of 2 */ for (j = i * gamma_slots; j < crtc->gamma_size; j++) crtc->gamma_green[j] = value; } else { /* Downsampling of larger palette to smaller hw lut size */ for (i = 0; i < crtc->gamma_size; i++) { value = palette[i * (palette_green_size - 1) / (crtc->gamma_size - 1)].green; if (gamma_green) value = gamma_green[value]; else value <<= shift; crtc->gamma_green[i] = value; } } if (crtc->gamma_size >= palette_blue_size) { /* Upsampling of smaller palette to larger hw lut size */ gamma_slots = crtc->gamma_size / palette_blue_size; for (i = 0; i < palette_blue_size; i++) { value = palette[i].blue; if (gamma_blue) value = gamma_blue[value]; else value <<= shift; for (j = 0; j < gamma_slots; j++) crtc->gamma_blue[i * gamma_slots + j] = value; } /* Replicate last value until end of crtc for gamma_size not a power of 2 */ for (j = i * gamma_slots; j < crtc->gamma_size; j++) crtc->gamma_blue[j] = value; } else { /* Downsampling of larger palette to smaller hw lut size */ for (i = 0; i < crtc->gamma_size; i++) { value = palette[i * (palette_blue_size - 1) / (crtc->gamma_size - 1)].blue; if (gamma_blue) value = gamma_blue[value]; else value <<= shift; crtc->gamma_blue[i] = value; } } } static void xf86RandR12CrtcReloadGamma(xf86CrtcPtr crtc) { if (!crtc->scrn->vtSema || !crtc->funcs->gamma_set) return; /* Only set it when the crtc is actually running. * Otherwise it will be set when it's activated. */ if (crtc->active) crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); } static Bool xf86RandR12CrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr randr_crtc) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); xf86CrtcPtr crtc = randr_crtc->devPrivate; int max_size = crtc->gamma_size; if (crtc->funcs->gamma_set == NULL) return FALSE; if (randrp->palette_size) { xf86RandR12CrtcComputeGamma(crtc, randrp->palette, randrp->palette_red_size, randrp->palette_green_size, randrp->palette_blue_size, randr_crtc->gammaRed, randr_crtc->gammaGreen, randr_crtc->gammaBlue, randr_crtc->gammaSize); } else { if (max_size > randr_crtc->gammaSize) max_size = randr_crtc->gammaSize; memcpy(crtc->gamma_red, randr_crtc->gammaRed, max_size * sizeof(crtc->gamma_red[0])); memcpy(crtc->gamma_green, randr_crtc->gammaGreen, max_size * sizeof(crtc->gamma_green[0])); memcpy(crtc->gamma_blue, randr_crtc->gammaBlue, max_size * sizeof(crtc->gamma_blue[0])); } xf86RandR12CrtcReloadGamma(crtc); return TRUE; } static void init_one_component(CARD16 *comp, unsigned size, float gamma) { int i; unsigned shift; for (shift = 0; (size << shift) < (1 << 16); shift++); if (gamma == 1.0) { for (i = 0; i < size; i++) comp[i] = i << shift; } else { for (i = 0; i < size; i++) comp[i] = (CARD16) (pow((double) i / (double) (size - 1), 1. / (double) gamma) * (double) (size - 1) * (1 << shift)); } } static Bool xf86RandR12CrtcInitGamma(xf86CrtcPtr crtc, float gamma_red, float gamma_green, float gamma_blue) { unsigned size = crtc->randr_crtc->gammaSize; CARD16 *red, *green, *blue; if (!crtc->funcs->gamma_set && (gamma_red != 1.0f || gamma_green != 1.0f || gamma_blue != 1.0f)) return FALSE; red = xallocarray(size, 3 * sizeof(CARD16)); if (!red) return FALSE; green = red + size; blue = green + size; init_one_component(red, size, gamma_red); init_one_component(green, size, gamma_green); init_one_component(blue, size, gamma_blue); RRCrtcGammaSet(crtc->randr_crtc, red, green, blue); free(red); return TRUE; } static Bool xf86RandR12OutputInitGamma(xf86OutputPtr output) { XF86ConfMonitorPtr mon = output->conf_monitor; float gamma_red = 1.0, gamma_green = 1.0, gamma_blue = 1.0; if (!mon) return TRUE; /* Get configured values, where they exist. */ if (mon->mon_gamma_red >= GAMMA_MIN && mon->mon_gamma_red <= GAMMA_MAX) gamma_red = mon->mon_gamma_red; if (mon->mon_gamma_green >= GAMMA_MIN && mon->mon_gamma_green <= GAMMA_MAX) gamma_green = mon->mon_gamma_green; if (mon->mon_gamma_blue >= GAMMA_MIN && mon->mon_gamma_blue <= GAMMA_MAX) gamma_blue = mon->mon_gamma_blue; /* Don't set gamma 1.0 if another cloned output on this CRTC already set a * different gamma */ if (gamma_red != 1.0 || gamma_green != 1.0 || gamma_blue != 1.0) { if (!output->crtc->randr_crtc) { xf86DrvMsg(output->scrn->scrnIndex, X_WARNING, "Gamma correction for output %s not possible because " "RandR is disabled\n", output->name); return TRUE; } xf86DrvMsg(output->scrn->scrnIndex, X_INFO, "Output %s wants gamma correction (%.1f, %.1f, %.1f)\n", output->name, gamma_red, gamma_green, gamma_blue); return xf86RandR12CrtcInitGamma(output->crtc, gamma_red, gamma_green, gamma_blue); } return TRUE; } Bool xf86RandR12InitGamma(ScrnInfoPtr pScrn, unsigned gammaSize) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int o, c; /* Set default gamma for all CRTCs * This is done to avoid problems later on with cloned outputs */ for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; if (!crtc->randr_crtc) continue; if (!RRCrtcGammaSetSize(crtc->randr_crtc, gammaSize) || !xf86RandR12CrtcInitGamma(crtc, 1.0f, 1.0f, 1.0f)) return FALSE; } /* Set initial gamma per monitor configuration */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; if (output->crtc && !xf86RandR12OutputInitGamma(output)) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Initial gamma correction for output %s: failed.\n", output->name); } return TRUE; } static Bool xf86RandR12OutputSetProperty(ScreenPtr pScreen, RROutputPtr randr_output, Atom property, RRPropertyValuePtr value) { xf86OutputPtr output = randr_output->devPrivate; /* If we don't have any property handler, then we don't care what the * user is setting properties to. */ if (output->funcs->set_property == NULL) return TRUE; /* * This function gets called even when vtSema is FALSE, as * drivers will need to remember the correct value to apply * when the VT switch occurs */ return output->funcs->set_property(output, property, value); } static Bool xf86RandR13OutputGetProperty(ScreenPtr pScreen, RROutputPtr randr_output, Atom property) { xf86OutputPtr output = randr_output->devPrivate; if (output->funcs->get_property == NULL) return TRUE; /* Should be safe even w/o vtSema */ return output->funcs->get_property(output, property); } static Bool xf86RandR12OutputValidateMode(ScreenPtr pScreen, RROutputPtr randr_output, RRModePtr randr_mode) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86OutputPtr output = randr_output->devPrivate; DisplayModeRec mode; xf86RandRModeConvert(pScrn, randr_mode, &mode); /* * This function may be called when vtSema is FALSE, so * the underlying function must either avoid touching the hardware * or return FALSE when vtSema is FALSE */ if (output->funcs->mode_valid(output, &mode) != MODE_OK) return FALSE; return TRUE; } static void xf86RandR12ModeDestroy(ScreenPtr pScreen, RRModePtr randr_mode) { } /** * Given a list of xf86 modes and a RandR Output object, construct * RandR modes and assign them to the output */ static Bool xf86RROutputSetModes(RROutputPtr randr_output, DisplayModePtr modes) { DisplayModePtr mode; RRModePtr *rrmodes = NULL; int nmode = 0; int npreferred = 0; Bool ret = TRUE; int pref; for (mode = modes; mode; mode = mode->next) nmode++; if (nmode) { rrmodes = xallocarray(nmode, sizeof(RRModePtr)); if (!rrmodes) return FALSE; nmode = 0; for (pref = 1; pref >= 0; pref--) { for (mode = modes; mode; mode = mode->next) { if ((pref != 0) == ((mode->type & M_T_PREFERRED) != 0)) { xRRModeInfo modeInfo; RRModePtr rrmode; modeInfo.nameLength = strlen(mode->name); modeInfo.width = mode->HDisplay; modeInfo.dotClock = mode->Clock * 1000; modeInfo.hSyncStart = mode->HSyncStart; modeInfo.hSyncEnd = mode->HSyncEnd; modeInfo.hTotal = mode->HTotal; modeInfo.hSkew = mode->HSkew; modeInfo.height = mode->VDisplay; modeInfo.vSyncStart = mode->VSyncStart; modeInfo.vSyncEnd = mode->VSyncEnd; modeInfo.vTotal = mode->VTotal; modeInfo.modeFlags = mode->Flags; rrmode = RRModeGet(&modeInfo, mode->name); if (rrmode) { rrmodes[nmode++] = rrmode; npreferred += pref; } } } } } ret = RROutputSetModes(randr_output, rrmodes, nmode, npreferred); free(rrmodes); return ret; } /* * Mirror the current mode configuration to RandR */ static Bool xf86RandR12SetInfo12(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); RROutputPtr *clones; RRCrtcPtr *crtcs; int ncrtc; int o, c, l; int nclone; clones = xallocarray(config->num_output, sizeof(RROutputPtr)); crtcs = xallocarray(config->num_crtc, sizeof(RRCrtcPtr)); for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; ncrtc = 0; for (c = 0; c < config->num_crtc; c++) if (output->possible_crtcs & (1 << c)) crtcs[ncrtc++] = config->crtc[c]->randr_crtc; if (!RROutputSetCrtcs(output->randr_output, crtcs, ncrtc)) { free(crtcs); free(clones); return FALSE; } RROutputSetPhysicalSize(output->randr_output, output->mm_width, output->mm_height); xf86RROutputSetModes(output->randr_output, output->probed_modes); switch (output->status) { case XF86OutputStatusConnected: RROutputSetConnection(output->randr_output, RR_Connected); break; case XF86OutputStatusDisconnected: if (xf86OutputForceEnabled(output)) RROutputSetConnection(output->randr_output, RR_Connected); else RROutputSetConnection(output->randr_output, RR_Disconnected); break; case XF86OutputStatusUnknown: RROutputSetConnection(output->randr_output, RR_UnknownConnection); break; } RROutputSetSubpixelOrder(output->randr_output, output->subpixel_order); /* * Valid clones */ nclone = 0; for (l = 0; l < config->num_output; l++) { xf86OutputPtr clone = config->output[l]; if (l != o && (output->possible_clones & (1 << l))) clones[nclone++] = clone->randr_output; } if (!RROutputSetClones(output->randr_output, clones, nclone)) { free(crtcs); free(clones); return FALSE; } } free(crtcs); free(clones); return TRUE; } /* * Query the hardware for the current state, then mirror * that to RandR */ static Bool xf86RandR12GetInfo12(ScreenPtr pScreen, Rotation * rotations) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (!pScrn->vtSema) return TRUE; xf86ProbeOutputModes(pScrn, 0, 0); xf86SetScrnInfoModes(pScrn); return xf86RandR12SetInfo12(pScreen); } static Bool xf86RandR12CreateObjects12(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int c; int o; if (!RRInit()) return FALSE; /* * Configure crtcs */ for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; crtc->randr_crtc = RRCrtcCreate(pScreen, crtc); } /* * Configure outputs */ for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; output->randr_output = RROutputCreate(pScreen, output->name, strlen(output->name), output); if (output->funcs->create_resources != NULL) output->funcs->create_resources(output); RRPostPendingProperties(output->randr_output); } if (config->name) { config->randr_provider = RRProviderCreate(pScreen, config->name, strlen(config->name)); RRProviderSetCapabilities(config->randr_provider, pScrn->capabilities); } return TRUE; } static void xf86RandR12CreateMonitors(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int o, ot; int ht, vt; int ret; char buf[25]; for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; struct xf86CrtcTileInfo *tile_info = &output->tile_info, *this_tile; RRMonitorPtr monitor; int output_num, num_outputs; if (!tile_info->group_id) continue; if (tile_info->tile_h_loc || tile_info->tile_v_loc) continue; num_outputs = tile_info->num_h_tile * tile_info->num_v_tile; monitor = RRMonitorAlloc(num_outputs); if (!monitor) return; monitor->pScreen = pScreen; snprintf(buf, 25, "Auto-Monitor-%d", tile_info->group_id); monitor->name = MakeAtom(buf, strlen(buf), TRUE); monitor->primary = 0; monitor->automatic = TRUE; memset(&monitor->geometry.box, 0, sizeof(monitor->geometry.box)); output_num = 0; for (ht = 0; ht < tile_info->num_h_tile; ht++) { for (vt = 0; vt < tile_info->num_v_tile; vt++) { for (ot = 0; ot < config->num_output; ot++) { this_tile = &config->output[ot]->tile_info; if (this_tile->group_id != tile_info->group_id) continue; if (this_tile->tile_h_loc != ht || this_tile->tile_v_loc != vt) continue; monitor->outputs[output_num] = config->output[ot]->randr_output->id; output_num++; } } } ret = RRMonitorAdd(serverClient, pScreen, monitor); if (ret) { RRMonitorFree(monitor); return; } } } static Bool xf86RandR12CreateScreenResources12(ScreenPtr pScreen) { int c; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); rrScrPrivPtr rp = rrGetScrPriv(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); for (c = 0; c < config->num_crtc; c++) xf86RandR12CrtcNotify(config->crtc[c]->randr_crtc); RRScreenSetSizeRange(pScreen, config->minWidth, config->minHeight, config->maxWidth, config->maxHeight); xf86RandR12CreateMonitors(pScreen); if (!pScreen->isGPU) { rp->primaryOutput = config->output[0]->randr_output; RROutputChanged(rp->primaryOutput, FALSE); rp->layoutChanged = TRUE; } return TRUE; } /* * Something happened within the screen configuration due * to DGA, VidMode or hot key. Tell RandR */ void xf86RandR12TellChanged(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int c; xf86RandR12SetInfo12(pScreen); for (c = 0; c < config->num_crtc; c++) xf86RandR12CrtcNotify(config->crtc[c]->randr_crtc); RRTellChanged(pScreen); } static void xf86RandR12PointerMoved(ScrnInfoPtr pScrn, int x, int y) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); int c; randrp->pointerX = x; randrp->pointerY = y; for (c = 0; c < config->num_crtc; c++) xf86RandR13Pan(config->crtc[c], x, y); } static Bool xf86RandR13GetPanning(ScreenPtr pScreen, RRCrtcPtr randr_crtc, BoxPtr totalArea, BoxPtr trackingArea, INT16 *border) { xf86CrtcPtr crtc = randr_crtc->devPrivate; if (crtc->version < 2) return FALSE; if (totalArea) memcpy(totalArea, &crtc->panningTotalArea, sizeof(BoxRec)); if (trackingArea) memcpy(trackingArea, &crtc->panningTrackingArea, sizeof(BoxRec)); if (border) memcpy(border, crtc->panningBorder, 4 * sizeof(INT16)); return TRUE; } static Bool xf86RandR13SetPanning(ScreenPtr pScreen, RRCrtcPtr randr_crtc, BoxPtr totalArea, BoxPtr trackingArea, INT16 *border) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); xf86CrtcPtr crtc = randr_crtc->devPrivate; BoxRec oldTotalArea; BoxRec oldTrackingArea; INT16 oldBorder[4]; Bool oldPanning = randrp->panning; if (crtc->version < 2) return FALSE; memcpy(&oldTotalArea, &crtc->panningTotalArea, sizeof(BoxRec)); memcpy(&oldTrackingArea, &crtc->panningTrackingArea, sizeof(BoxRec)); memcpy(oldBorder, crtc->panningBorder, 4 * sizeof(INT16)); if (totalArea) memcpy(&crtc->panningTotalArea, totalArea, sizeof(BoxRec)); if (trackingArea) memcpy(&crtc->panningTrackingArea, trackingArea, sizeof(BoxRec)); if (border) memcpy(crtc->panningBorder, border, 4 * sizeof(INT16)); if (xf86RandR13VerifyPanningArea(crtc, pScreen->width, pScreen->height)) { xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); randrp->panning = PANNING_ENABLED (crtc); return TRUE; } else { /* Restore old settings */ memcpy(&crtc->panningTotalArea, &oldTotalArea, sizeof(BoxRec)); memcpy(&crtc->panningTrackingArea, &oldTrackingArea, sizeof(BoxRec)); memcpy(crtc->panningBorder, oldBorder, 4 * sizeof(INT16)); randrp->panning = oldPanning; return FALSE; } } /* * Compatibility with colormaps and XF86VidMode's gamma */ void xf86RandR12LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { ScreenPtr pScreen = pScrn->pScreen; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int reds, greens, blues, index, palette_size; int c, i; if (pVisual->class == TrueColor || pVisual->class == DirectColor) { reds = (pVisual->redMask >> pVisual->offsetRed) + 1; greens = (pVisual->greenMask >> pVisual->offsetGreen) + 1; blues = (pVisual->blueMask >> pVisual->offsetBlue) + 1; } else { reds = greens = blues = pVisual->ColormapEntries; } palette_size = max(reds, max(greens, blues)); if (dixPrivateKeyRegistered(rrPrivKey)) { XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); if (randrp->palette_size != palette_size) { randrp->palette = reallocarray(randrp->palette, palette_size, sizeof(colors[0])); if (!randrp->palette) { randrp->palette_size = 0; return; } randrp->palette_size = palette_size; } randrp->palette_red_size = reds; randrp->palette_green_size = greens; randrp->palette_blue_size = blues; for (i = 0; i < numColors; i++) { index = indices[i]; if (index < reds) randrp->palette[index].red = colors[index].red; if (index < greens) randrp->palette[index].green = colors[index].green; if (index < blues) randrp->palette[index].blue = colors[index].blue; } } for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; RRCrtcPtr randr_crtc = crtc->randr_crtc; if (randr_crtc) { xf86RandR12CrtcComputeGamma(crtc, colors, reds, greens, blues, randr_crtc->gammaRed, randr_crtc->gammaGreen, randr_crtc->gammaBlue, randr_crtc->gammaSize); } else { xf86RandR12CrtcComputeGamma(crtc, colors, reds, greens, blues, NULL, NULL, NULL, xf86GetGammaRampSize(pScreen)); } xf86RandR12CrtcReloadGamma(crtc); } } /* * Compatibility pScrn->ChangeGamma provider for ddx drivers which do not call * xf86HandleColormaps(). Note such drivers really should be fixed to call * xf86HandleColormaps() as this clobbers the per-CRTC gamma ramp of the CRTC * assigned to the RandR compatibility output. */ static int xf86RandR12ChangeGamma(ScrnInfoPtr pScrn, Gamma gamma) { RRCrtcPtr randr_crtc = xf86CompatRRCrtc(pScrn); int size; if (!randr_crtc || pScrn->LoadPalette == xf86RandR12LoadPalette) return Success; size = max(0, randr_crtc->gammaSize); if (!size) return Success; init_one_component(randr_crtc->gammaRed, size, gamma.red); init_one_component(randr_crtc->gammaGreen, size, gamma.green); init_one_component(randr_crtc->gammaBlue, size, gamma.blue); xf86RandR12CrtcSetGamma(xf86ScrnToScreen(pScrn), randr_crtc); pScrn->gamma = gamma; return Success; } static Bool xf86RandR12EnterVT(ScrnInfoPtr pScrn) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); rrScrPrivPtr rp = rrGetScrPriv(pScreen); Bool ret; int i; if (randrp->orig_EnterVT) { pScrn->EnterVT = randrp->orig_EnterVT; ret = pScrn->EnterVT(pScrn); randrp->orig_EnterVT = pScrn->EnterVT; pScrn->EnterVT = xf86RandR12EnterVT; if (!ret) return FALSE; } /* reload gamma */ for (i = 0; i < rp->numCrtcs; i++) xf86RandR12CrtcReloadGamma(rp->crtcs[i]->devPrivate); return RRGetInfo(pScreen, TRUE); /* force a re-probe of outputs and notify clients about changes */ } static void xf86DetachOutputGPU(ScreenPtr pScreen) { rrScrPrivPtr rp = rrGetScrPriv(pScreen); int i; /* make sure there are no attached shared scanout pixmaps first */ for (i = 0; i < rp->numCrtcs; i++) RRCrtcDetachScanoutPixmap(rp->crtcs[i]); DetachOutputGPU(pScreen); } static Bool xf86RandR14ProviderSetOutputSource(ScreenPtr pScreen, RRProviderPtr provider, RRProviderPtr source_provider) { if (!source_provider) { if (provider->output_source) { xf86DetachOutputGPU(pScreen); } provider->output_source = NULL; return TRUE; } if (provider->output_source == source_provider) return TRUE; SetRootClip(source_provider->pScreen, ROOT_CLIP_NONE); AttachOutputGPU(source_provider->pScreen, pScreen); provider->output_source = source_provider; SetRootClip(source_provider->pScreen, ROOT_CLIP_FULL); return TRUE; } static Bool xf86RandR14ProviderSetOffloadSink(ScreenPtr pScreen, RRProviderPtr provider, RRProviderPtr sink_provider) { if (!sink_provider) { if (provider->offload_sink) { xf86DetachOutputGPU(pScreen); } provider->offload_sink = NULL; return TRUE; } if (provider->offload_sink == sink_provider) return TRUE; AttachOffloadGPU(sink_provider->pScreen, pScreen); provider->offload_sink = sink_provider; return TRUE; } static Bool xf86RandR14ProviderSetProperty(ScreenPtr pScreen, RRProviderPtr randr_provider, Atom property, RRPropertyValuePtr value) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); /* If we don't have any property handler, then we don't care what the * user is setting properties to. */ if (config->provider_funcs->set_property == NULL) return TRUE; /* * This function gets called even when vtSema is FALSE, as * drivers will need to remember the correct value to apply * when the VT switch occurs */ return config->provider_funcs->set_property(pScrn, property, value); } static Bool xf86RandR14ProviderGetProperty(ScreenPtr pScreen, RRProviderPtr randr_provider, Atom property) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); if (config->provider_funcs->get_property == NULL) return TRUE; /* Should be safe even w/o vtSema */ return config->provider_funcs->get_property(pScrn, property); } static Bool xf86CrtcSetScanoutPixmap(RRCrtcPtr randr_crtc, PixmapPtr pixmap) { xf86CrtcPtr crtc = randr_crtc->devPrivate; if (!crtc->funcs->set_scanout_pixmap) return FALSE; return crtc->funcs->set_scanout_pixmap(crtc, pixmap); } static void xf86RandR13ConstrainCursorHarder(DeviceIntPtr dev, ScreenPtr screen, int mode, int *x, int *y) { XF86RandRInfoPtr randrp = XF86RANDRINFO(screen); if (randrp->panning) return; if (randrp->orig_ConstrainCursorHarder) { screen->ConstrainCursorHarder = randrp->orig_ConstrainCursorHarder; screen->ConstrainCursorHarder(dev, screen, mode, x, y); screen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder; } } static void xf86RandR14ProviderDestroy(ScreenPtr screen, RRProviderPtr provider) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); if (config->randr_provider == provider) { if (config->randr_provider->offload_sink) { DetachOffloadGPU(screen); config->randr_provider->offload_sink = NULL; RRSetChanged(screen); } if (config->randr_provider->output_source) { xf86DetachOutputGPU(screen); config->randr_provider->output_source = NULL; RRSetChanged(screen); } if (screen->current_primary) DetachUnboundGPU(screen); } config->randr_provider = NULL; } static void xf86CrtcCheckReset(xf86CrtcPtr crtc) { if (xf86CrtcInUse(crtc)) { RRTransformPtr transform; if (crtc->desiredTransformPresent) transform = &crtc->desiredTransform; else transform = NULL; xf86CrtcSetModeTransform(crtc, &crtc->desiredMode, crtc->desiredRotation, transform, crtc->desiredX, crtc->desiredY); xf86_crtc_show_cursor(crtc); } } void xf86CrtcLeaseTerminated(RRLeasePtr lease) { int c; int o; ScrnInfoPtr scrn = xf86ScreenToScrn(lease->screen); RRLeaseTerminated(lease); /* * Force a full mode set on any crtc in the expiring lease which * was running before the lease started */ for (c = 0; c < lease->numCrtcs; c++) { RRCrtcPtr randr_crtc = lease->crtcs[c]; xf86CrtcPtr crtc = randr_crtc->devPrivate; xf86CrtcCheckReset(crtc); } /* Check to see if any leased output is using a crtc which * was not reset in the above loop */ for (o = 0; o < lease->numOutputs; o++) { RROutputPtr randr_output = lease->outputs[o]; xf86OutputPtr output = randr_output->devPrivate; xf86CrtcPtr crtc = output->crtc; if (crtc) { for (c = 0; c < lease->numCrtcs; c++) if (lease->crtcs[c] == crtc->randr_crtc) break; if (c != lease->numCrtcs) continue; xf86CrtcCheckReset(crtc); } } /* Power off if necessary */ xf86DisableUnusedFunctions(scrn); RRLeaseFree(lease); } static Bool xf86CrtcSoleOutput(xf86CrtcPtr crtc, xf86OutputPtr output) { ScrnInfoPtr scrn = crtc->scrn; xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); int o; for (o = 0; o < config->num_output; o++) { xf86OutputPtr other = config->output[o]; if (other != output && other->crtc == crtc) return FALSE; } return TRUE; } void xf86CrtcLeaseStarted(RRLeasePtr lease) { int c; int o; for (c = 0; c < lease->numCrtcs; c++) { RRCrtcPtr randr_crtc = lease->crtcs[c]; xf86CrtcPtr crtc = randr_crtc->devPrivate; if (crtc->enabled) { /* * Leave the primary plane enabled so we can * flip without blanking the screen. Hide * the cursor so it doesn't remain on the screen * while the lease is active */ xf86_crtc_hide_cursor(crtc); crtc->enabled = FALSE; } } for (o = 0; o < lease->numOutputs; o++) { RROutputPtr randr_output = lease->outputs[o]; xf86OutputPtr output = randr_output->devPrivate; xf86CrtcPtr crtc = output->crtc; if (crtc) if (xf86CrtcSoleOutput(crtc, output)) crtc->enabled = FALSE; } } static int xf86RandR16CreateLease(ScreenPtr screen, RRLeasePtr randr_lease, int *fd) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); if (config->funcs->create_lease) return config->funcs->create_lease(randr_lease, fd); else return BadMatch; } static void xf86RandR16TerminateLease(ScreenPtr screen, RRLeasePtr randr_lease) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); if (config->funcs->terminate_lease) config->funcs->terminate_lease(randr_lease); } static Bool xf86RandR12Init12(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); rrScrPrivPtr rp = rrGetScrPriv(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); rp->rrGetInfo = xf86RandR12GetInfo12; rp->rrScreenSetSize = xf86RandR12ScreenSetSize; rp->rrCrtcSet = xf86RandR12CrtcSet; rp->rrCrtcSetGamma = xf86RandR12CrtcSetGamma; rp->rrOutputSetProperty = xf86RandR12OutputSetProperty; rp->rrOutputValidateMode = xf86RandR12OutputValidateMode; #if RANDR_13_INTERFACE rp->rrOutputGetProperty = xf86RandR13OutputGetProperty; rp->rrGetPanning = xf86RandR13GetPanning; rp->rrSetPanning = xf86RandR13SetPanning; #endif rp->rrModeDestroy = xf86RandR12ModeDestroy; rp->rrSetConfig = NULL; rp->rrProviderSetOutputSource = xf86RandR14ProviderSetOutputSource; rp->rrProviderSetOffloadSink = xf86RandR14ProviderSetOffloadSink; rp->rrProviderSetProperty = xf86RandR14ProviderSetProperty; rp->rrProviderGetProperty = xf86RandR14ProviderGetProperty; rp->rrCrtcSetScanoutPixmap = xf86CrtcSetScanoutPixmap; rp->rrProviderDestroy = xf86RandR14ProviderDestroy; rp->rrCreateLease = xf86RandR16CreateLease; rp->rrTerminateLease = xf86RandR16TerminateLease; pScrn->PointerMoved = xf86RandR12PointerMoved; pScrn->ChangeGamma = xf86RandR12ChangeGamma; randrp->orig_EnterVT = pScrn->EnterVT; pScrn->EnterVT = xf86RandR12EnterVT; randrp->panning = FALSE; randrp->orig_ConstrainCursorHarder = pScreen->ConstrainCursorHarder; pScreen->ConstrainCursorHarder = xf86RandR13ConstrainCursorHarder; if (!xf86RandR12CreateObjects12(pScreen)) return FALSE; /* * Configure output modes */ if (!xf86RandR12SetInfo12(pScreen)) return FALSE; if (!xf86RandR12InitGamma(pScrn, 256)) return FALSE; return TRUE; } #endif Bool xf86RandR12PreInit(ScrnInfoPtr pScrn) { return TRUE; } xorg-server-21.1.16/hw/xfree86/modes/xf86Rotate.c0000644000175000017500000004025214757411105014770 /* * Copyright © 2006 Keith Packard * Copyright © 2011 Aaron Plattner * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include #include #include #include "mi.h" #include "xf86.h" #include "xf86DDC.h" #include "windowstr.h" #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86RandR12.h" #include "X11/extensions/render.h" #include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" static void xf86RotateCrtcRedisplay(xf86CrtcPtr crtc, RegionPtr region) { ScrnInfoPtr scrn = crtc->scrn; ScreenPtr screen = scrn->pScreen; WindowPtr root = screen->root; PixmapPtr dst_pixmap = crtc->rotatedPixmap; PictFormatPtr format = PictureWindowFormat(screen->root); int error; PicturePtr src, dst; int n = RegionNumRects(region); BoxPtr b = RegionRects(region); XID include_inferiors = IncludeInferiors; if (crtc->driverIsPerformingTransform & XF86DriverTransformOutput) return; src = CreatePicture(None, &root->drawable, format, CPSubwindowMode, &include_inferiors, serverClient, &error); if (!src) return; dst = CreatePicture(None, &dst_pixmap->drawable, format, 0L, NULL, serverClient, &error); if (!dst) return; error = SetPictureTransform(src, &crtc->crtc_to_framebuffer); if (error) return; if (crtc->transform_in_use && crtc->filter) SetPicturePictFilter(src, crtc->filter, crtc->params, crtc->nparams); if (crtc->shadowClear) { CompositePicture(PictOpSrc, src, NULL, dst, 0, 0, 0, 0, 0, 0, crtc->mode.HDisplay, crtc->mode.VDisplay); crtc->shadowClear = FALSE; } else { while (n--) { BoxRec dst_box; dst_box = *b; dst_box.x1 -= crtc->filter_width >> 1; dst_box.x2 += crtc->filter_width >> 1; dst_box.y1 -= crtc->filter_height >> 1; dst_box.y2 += crtc->filter_height >> 1; pixman_f_transform_bounds(&crtc->f_framebuffer_to_crtc, &dst_box); CompositePicture(PictOpSrc, src, NULL, dst, dst_box.x1, dst_box.y1, 0, 0, dst_box.x1, dst_box.y1, dst_box.x2 - dst_box.x1, dst_box.y2 - dst_box.y1); b++; } } FreePicture(src, None); FreePicture(dst, None); } static void xf86CrtcDamageShadow(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; BoxRec damage_box; RegionRec damage_region; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); damage_box.x1 = 0; damage_box.x2 = crtc->mode.HDisplay; damage_box.y1 = 0; damage_box.y2 = crtc->mode.VDisplay; if (!pixman_transform_bounds(&crtc->crtc_to_framebuffer, &damage_box)) { damage_box.x1 = 0; damage_box.y1 = 0; damage_box.x2 = pScreen->width; damage_box.y2 = pScreen->height; } if (damage_box.x1 < 0) damage_box.x1 = 0; if (damage_box.y1 < 0) damage_box.y1 = 0; if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width; if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height; RegionInit(&damage_region, &damage_box, 1); DamageDamageRegion(&(*pScreen->GetScreenPixmap) (pScreen)->drawable, &damage_region); RegionUninit(&damage_region); crtc->shadowClear = TRUE; } static void xf86RotatePrepare(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->rotatedData && !crtc->rotatedPixmap) { crtc->rotatedPixmap = crtc->funcs->shadow_create(crtc, crtc->rotatedData, crtc->mode. HDisplay, crtc->mode. VDisplay); if (!xf86_config->rotation_damage_registered) { /* Hook damage to screen pixmap */ DamageRegister(&pScreen->root->drawable, xf86_config->rotation_damage); xf86_config->rotation_damage_registered = TRUE; EnableLimitedSchedulingLatency(); } xf86CrtcDamageShadow(crtc); } } } static Bool xf86RotateRedisplay(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); DamagePtr damage = xf86_config->rotation_damage; RegionPtr region; if (!damage || !pScreen->root) return FALSE; xf86RotatePrepare(pScreen); region = DamageRegion(damage); if (RegionNotEmpty(region)) { int c; SourceValidateProcPtr SourceValidate; /* * SourceValidate is used by the software cursor code * to pull the cursor off of the screen when reading * bits from the frame buffer. Bypassing this function * leaves the software cursor in place */ SourceValidate = pScreen->SourceValidate; pScreen->SourceValidate = miSourceValidate; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->transform_in_use && crtc->enabled) { RegionRec crtc_damage; /* compute portion of damage that overlaps crtc */ RegionInit(&crtc_damage, &crtc->bounds, 1); RegionIntersect(&crtc_damage, &crtc_damage, region); /* update damaged region */ if (RegionNotEmpty(&crtc_damage)) xf86RotateCrtcRedisplay(crtc, &crtc_damage); RegionUninit(&crtc_damage); } } pScreen->SourceValidate = SourceValidate; DamageEmpty(damage); } return TRUE; } static void xf86RotateBlockHandler(ScreenPtr pScreen, void *pTimeout) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); /* Unwrap before redisplay in case the software * cursor layer wants to add its block handler to the * chain */ pScreen->BlockHandler = xf86_config->BlockHandler; xf86RotateRedisplay(pScreen); (*pScreen->BlockHandler) (pScreen, pTimeout); /* Re-wrap if we still need this hook */ if (xf86_config->rotation_damage != NULL) { xf86_config->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = xf86RotateBlockHandler; } else xf86_config->BlockHandler = NULL; } void xf86RotateDestroy(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int c; /* Free memory from rotation */ if (crtc->rotatedPixmap || crtc->rotatedData) { crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap, crtc->rotatedData); crtc->rotatedPixmap = NULL; crtc->rotatedData = NULL; } for (c = 0; c < xf86_config->num_crtc; c++) if (xf86_config->crtc[c]->rotatedData) return; /* * Clean up damage structures when no crtcs are rotated */ if (xf86_config->rotation_damage) { /* Free damage structure */ if (xf86_config->rotation_damage_registered) { xf86_config->rotation_damage_registered = FALSE; DisableLimitedSchedulingLatency(); } DamageDestroy(xf86_config->rotation_damage); xf86_config->rotation_damage = NULL; } } void xf86RotateFreeShadow(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int c; for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; if (crtc->rotatedPixmap || crtc->rotatedData) { crtc->funcs->shadow_destroy(crtc, crtc->rotatedPixmap, crtc->rotatedData); crtc->rotatedPixmap = NULL; crtc->rotatedData = NULL; } } } void xf86RotateCloseScreen(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int c; /* This has already been destroyed when the root window was destroyed */ xf86_config->rotation_damage = NULL; for (c = 0; c < xf86_config->num_crtc; c++) xf86RotateDestroy(xf86_config->crtc[c]); } static Bool xf86CrtcFitsScreen(xf86CrtcPtr crtc, struct pict_f_transform *crtc_to_fb) { ScrnInfoPtr pScrn = crtc->scrn; BoxRec b; /* When called before PreInit, the driver is * presumably doing load detect */ if (pScrn->is_gpu) { ScreenPtr pScreen = xf86ScrnToScreen(pScrn); if (pScreen->current_primary) pScrn = xf86ScreenToScrn(pScreen->current_primary); } if (pScrn->virtualX == 0 || pScrn->virtualY == 0) return TRUE; b.x1 = 0; b.y1 = 0; b.x2 = crtc->mode.HDisplay; b.y2 = crtc->mode.VDisplay; if (crtc_to_fb) pixman_f_transform_bounds(crtc_to_fb, &b); else { b.x1 += crtc->x; b.y1 += crtc->y; b.x2 += crtc->x; b.y2 += crtc->y; } return (0 <= b.x1 && b.x2 <= pScrn->virtualX && 0 <= b.y1 && b.y2 <= pScrn->virtualY); } Bool xf86CrtcRotate(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); ScreenPtr pScreen = xf86ScrnToScreen(pScrn); PictTransform crtc_to_fb; struct pict_f_transform f_crtc_to_fb, f_fb_to_crtc; xFixed *new_params = NULL; int new_nparams = 0; PictFilterPtr new_filter = NULL; int new_width = 0; int new_height = 0; RRTransformPtr transform = NULL; Bool damage = FALSE; if (pScreen->isGPU) return TRUE; if (crtc->transformPresent) transform = &crtc->transform; if (!RRTransformCompute(crtc->x, crtc->y, crtc->mode.HDisplay, crtc->mode.VDisplay, crtc->rotation, transform, &crtc_to_fb, &f_crtc_to_fb, &f_fb_to_crtc) && xf86CrtcFitsScreen(crtc, &f_crtc_to_fb)) { /* * If the untranslated transformation is the identity, * disable the shadow buffer */ xf86RotateDestroy(crtc); crtc->transform_in_use = FALSE; free(new_params); new_params = NULL; new_nparams = 0; new_filter = NULL; new_width = 0; new_height = 0; } else { if (crtc->driverIsPerformingTransform & XF86DriverTransformOutput) { xf86RotateDestroy(crtc); } else { /* * these are the size of the shadow pixmap, which * matches the mode, not the pre-rotated copy in the * frame buffer */ int width = crtc->mode.HDisplay; int height = crtc->mode.VDisplay; void *shadowData = crtc->rotatedData; PixmapPtr shadow = crtc->rotatedPixmap; int old_width = shadow ? shadow->drawable.width : 0; int old_height = shadow ? shadow->drawable.height : 0; /* Allocate memory for rotation */ if (old_width != width || old_height != height) { if (shadow || shadowData) { crtc->funcs->shadow_destroy(crtc, shadow, shadowData); crtc->rotatedPixmap = NULL; crtc->rotatedData = NULL; } shadowData = crtc->funcs->shadow_allocate(crtc, width, height); if (!shadowData) goto bail1; crtc->rotatedData = shadowData; /* shadow will be damaged in xf86RotatePrepare */ } else { /* mark shadowed area as damaged so it will be repainted */ damage = TRUE; } if (!xf86_config->rotation_damage) { /* Create damage structure */ xf86_config->rotation_damage = DamageCreate(NULL, NULL, DamageReportNone, TRUE, pScreen, pScreen); if (!xf86_config->rotation_damage) goto bail2; /* Wrap block handler */ if (!xf86_config->BlockHandler) { xf86_config->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = xf86RotateBlockHandler; } } if (0) { bail2: if (shadow || shadowData) { crtc->funcs->shadow_destroy(crtc, shadow, shadowData); crtc->rotatedPixmap = NULL; crtc->rotatedData = NULL; } bail1: if (old_width && old_height) crtc->rotatedPixmap = crtc->funcs->shadow_create(crtc, NULL, old_width, old_height); return FALSE; } } #ifdef RANDR_12_INTERFACE if (transform) { if (transform->nparams) { new_params = malloc(transform->nparams * sizeof(xFixed)); if (new_params) { memcpy(new_params, transform->params, transform->nparams * sizeof(xFixed)); new_nparams = transform->nparams; new_filter = transform->filter; } } else new_filter = transform->filter; if (new_filter) { new_width = new_filter->width; new_height = new_filter->height; } } #endif crtc->transform_in_use = TRUE; } crtc->crtc_to_framebuffer = crtc_to_fb; crtc->f_crtc_to_framebuffer = f_crtc_to_fb; crtc->f_framebuffer_to_crtc = f_fb_to_crtc; free(crtc->params); crtc->params = new_params; crtc->nparams = new_nparams; crtc->filter = new_filter; crtc->filter_width = new_width; crtc->filter_height = new_height; crtc->bounds.x1 = 0; crtc->bounds.x2 = crtc->mode.HDisplay; crtc->bounds.y1 = 0; crtc->bounds.y2 = crtc->mode.VDisplay; pixman_f_transform_bounds(&f_crtc_to_fb, &crtc->bounds); if (damage) xf86CrtcDamageShadow(crtc); else if (crtc->rotatedData && !crtc->rotatedPixmap) /* Make sure the new rotate buffer has valid transformed contents */ xf86RotateRedisplay(pScreen); /* All done */ return TRUE; } xorg-server-21.1.16/hw/xfree86/modes/xf86DiDGA.c0000644000175000017500000001347214757411105014406 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86DDC.h" #include "xf86_OSproc.h" #include "dgaproc.h" #include "xf86Crtc.h" #include "xf86Modes.h" #include "gcstruct.h" #include "scrnintstr.h" #include "windowstr.h" static Bool xf86_dga_get_modes(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); DGAModePtr modes, mode; DisplayModePtr display_mode; int bpp = scrn->bitsPerPixel >> 3; int num; num = 0; display_mode = scrn->modes; while (display_mode) { num++; display_mode = display_mode->next; if (display_mode == scrn->modes) break; } if (!num) return FALSE; modes = xallocarray(num, sizeof(DGAModeRec)); if (!modes) return FALSE; num = 0; display_mode = scrn->modes; while (display_mode) { mode = modes + num++; mode->mode = display_mode; mode->flags = DGA_CONCURRENT_ACCESS; if (display_mode->Flags & V_DBLSCAN) mode->flags |= DGA_DOUBLESCAN; if (display_mode->Flags & V_INTERLACE) mode->flags |= DGA_INTERLACED; mode->byteOrder = scrn->imageByteOrder; mode->depth = scrn->depth; mode->bitsPerPixel = scrn->bitsPerPixel; mode->red_mask = scrn->mask.red; mode->green_mask = scrn->mask.green; mode->blue_mask = scrn->mask.blue; mode->visualClass = (bpp == 1) ? PseudoColor : TrueColor; mode->viewportWidth = display_mode->HDisplay; mode->viewportHeight = display_mode->VDisplay; mode->xViewportStep = (bpp == 3) ? 2 : 1; mode->yViewportStep = 1; mode->viewportFlags = DGA_FLIP_RETRACE; mode->offset = 0; mode->address = 0; mode->imageWidth = mode->viewportWidth; mode->imageHeight = mode->viewportHeight; mode->bytesPerScanline = (mode->imageWidth * scrn->bitsPerPixel) >> 3; mode->pixmapWidth = mode->imageWidth; mode->pixmapHeight = mode->imageHeight; mode->maxViewportX = 0; mode->maxViewportY = 0; display_mode = display_mode->next; if (display_mode == scrn->modes) break; } free(xf86_config->dga_modes); xf86_config->dga_nmode = num; xf86_config->dga_modes = modes; return TRUE; } static Bool xf86_dga_set_mode(ScrnInfoPtr scrn, DGAModePtr display_mode) { ScreenPtr pScreen = scrn->pScreen; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); if (!display_mode) { if (xf86_config->dga_save_mode) { xf86SwitchMode(pScreen, xf86_config->dga_save_mode); xf86_config->dga_save_mode = NULL; } } else { if (!xf86_config->dga_save_mode) { xf86_config->dga_save_mode = scrn->currentMode; xf86SwitchMode(pScreen, display_mode->mode); } } return TRUE; } static int xf86_dga_get_viewport(ScrnInfoPtr scrn) { return 0; } static void xf86_dga_set_viewport(ScrnInfoPtr scrn, int x, int y, int flags) { scrn->AdjustFrame(scrn, x, y); } static Bool xf86_dga_open_framebuffer(ScrnInfoPtr scrn, char **name, unsigned char **mem, int *size, int *offset, int *flags) { return FALSE; } static void xf86_dga_close_framebuffer(ScrnInfoPtr scrn) { } static DGAFunctionRec xf86_dga_funcs = { xf86_dga_open_framebuffer, xf86_dga_close_framebuffer, xf86_dga_set_mode, xf86_dga_set_viewport, xf86_dga_get_viewport, NULL, NULL, NULL, NULL }; Bool xf86DiDGAReInit(ScreenPtr pScreen) { return TRUE; } Bool _xf86_di_dga_reinit_internal(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); if (!DGAScreenAvailable(pScreen)) return TRUE; if (!xf86_dga_get_modes(pScreen)) return FALSE; return DGAReInitModes(pScreen, xf86_config->dga_modes, xf86_config->dga_nmode); } Bool xf86DiDGAInit(ScreenPtr pScreen, unsigned long dga_address) { return TRUE; } Bool _xf86_di_dga_init_internal(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86_config->dga_flags = 0; xf86_config->dga_address = 0; xf86_config->dga_width = 0; xf86_config->dga_height = 0; xf86_config->dga_stride = 0; if (!xf86_dga_get_modes(pScreen)) return FALSE; return DGAInit(pScreen, &xf86_dga_funcs, xf86_config->dga_modes, xf86_config->dga_nmode); } xorg-server-21.1.16/hw/xfree86/os-support/0000755000175000017500000000000014757411134013755 5xorg-server-21.1.16/hw/xfree86/os-support/meson.build0000644000175000017500000001142114757411105016034 srcs_xorg_os_support = [ 'bus/nobus.c', 'shared/posix_tty.c', 'shared/sigio.c', 'shared/vidmem.c', ] hdrs_xorg_os_support = [ 'bus/xf86Pci.h', 'xf86_OSlib.h', 'xf86_OSproc.h' ] os_dep = [] os_c_args = [] if get_option('pciaccess') srcs_xorg_os_support += 'bus/Pci.c' if host_machine.system() != 'linux' srcs_xorg_os_support += 'bus/bsd_pci.c' endif if host_machine.cpu() == 'sparc' or host_machine.cpu() == 'sparc64' srcs_xorg_os_support += 'bus/Sbus.c' install_data('bus/xf86Sbus.h', install_dir: xorgsdkdir) endif endif if get_option('agp') == 'auto' build_agp = cc.has_header('sys/agpio.h') or cc.has_header('sys/agpgart.h') or cc.has_header('linux/agpgart.h') else build_agp = get_option('agp') == 'true' endif if host_machine.system() == 'linux' srcs_xorg_os_support += [ 'linux/lnx_bell.c', 'linux/lnx_init.c', 'linux/lnx_kmod.c', 'linux/lnx_platform.c', 'linux/lnx_video.c', 'misc/SlowBcopy.c', 'shared/VTsw_usl.c', ] if build_agp srcs_xorg_os_support += 'linux/lnx_agp.c' else srcs_xorg_os_support += 'shared/agp_noop.c' endif if build_systemd_logind srcs_xorg_os_support += 'linux/systemd-logind.c' endif # this is ugly because the code is also if build_apm or build_acpi srcs_xorg_os_support += 'linux/lnx_apm.c' if build_acpi srcs_xorg_os_support += 'linux/lnx_acpi.c' endif else srcs_xorg_os_support += 'shared/pm_noop.c' endif elif host_machine.system() == 'sunos' srcs_xorg_os_support += [ 'solaris/sun_apm.c', 'solaris/sun_bell.c', 'solaris/sun_init.c', 'solaris/sun_vid.c', 'shared/kmod_noop.c', ] if cc.has_header('sys/vt.h') srcs_xorg_os_support += 'solaris/sun_VTsw.c' else srcs_xorg_os_support += 'shared/VTsw_noop.c' endif if build_agp srcs_xorg_os_support += 'solaris/sun_agp.c' else srcs_xorg_os_support += 'shared/agp_noop.c' endif if host_machine.cpu_family() == 'sparc' srcs_xorg_os_support += 'solaris/solaris-sparcv8plus.S' elif host_machine.cpu_family() == 'x86_64' srcs_xorg_os_support += 'solaris/solaris-amd64.S' elif host_machine.cpu_family() == 'x86' srcs_xorg_os_support += 'solaris/solaris-ia32.S' else error('Unknown CPU family for Solaris build') endif elif host_machine.system().endswith('bsd') srcs_xorg_os_support += [ 'bsd/bsd_VTsw.c', 'bsd/bsd_bell.c', 'bsd/bsd_init.c', 'shared/pm_noop.c' ] if host_machine.cpu_family() == 'x86_64' srcs_xorg_os_support += 'bsd/i386_video.c' if host_machine.system() == 'netbsd' os_dep += cc.find_library('x86_64') elif host_machine.system() == 'openbsd' os_dep += cc.find_library('amd64') endif elif host_machine.cpu_family() == 'x86' srcs_xorg_os_support += 'bsd/i386_video.c' if host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd' os_dep += cc.find_library('i386') endif elif host_machine.cpu_family() == 'arm' srcs_xorg_os_support += 'bsd/arm_video.c' elif host_machine.cpu_family() == 'powerpc' srcs_xorg_os_support += 'bsd/ppc_video.c' elif host_machine.cpu_family() == 'sparc64' srcs_xorg_os_support += 'bsd/sparc64_video.c' srcs_xorg_os_support += 'shared/ioperm_noop.c' elif host_machine.cpu_family() == 'alpha' srcs_xorg_os_support += 'bsd/alpha_video.c' if host_machine.system() == 'freebsd' os_dep += cc.find_library('io') elif host_machine.system() == 'netbsd' os_c_args += '-DUSE_ALPHA_PIO' endif endif if host_machine.system() == 'freebsd' srcs_xorg_os_support += 'bsd/bsd_kmod.c' else srcs_xorg_os_support += 'shared/kmod_noop.c' endif if build_agp srcs_xorg_os_support += 'linux/lnx_agp.c' else srcs_xorg_os_support += 'shared/agp_noop.c' endif else # stub ossupport srcs_xorg_os_support += [ 'shared/VTsw_noop.c', 'shared/agp_noop.c', 'shared/ioperm_noop.c', 'shared/kmod_noop.c', 'shared/pm_noop.c', 'shared/vidmem.c', 'shared/posix_tty.c', 'shared/sigio.c', 'stub/stub_bell.c', 'stub/stub_init.c', 'stub/stub_video.c', ] endif xorg_os_support = static_library('xorg_os_support', srcs_xorg_os_support, include_directories: [inc, xorg_inc], dependencies: [ common_dep, dbus_dep, libdrm_dep, os_dep, ], c_args: xorg_c_args + os_c_args, ) install_data(hdrs_xorg_os_support, install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/os-support/linux/0000755000175000017500000000000014757411134015114 5xorg-server-21.1.16/hw/xfree86/os-support/linux/int10/0000755000175000017500000000000014757411134016047 5xorg-server-21.1.16/hw/xfree86/os-support/linux/int10/vm86/0000755000175000017500000000000014757411134016647 5xorg-server-21.1.16/hw/xfree86/os-support/linux/int10/vm86/linux_vm86.c0000644000175000017500000002124414757411105020753 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" #include "compiler.h" #define _INT10_PRIVATE #include "xf86int10.h" #define REG pInt #ifdef _VM86_LINUX #include "int10Defines.h" static int vm86_rep(struct vm86_struct *ptr); static struct vm86_struct vm86_s; Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt) { #define VM86S ((struct vm86_struct *)pInt->cpuRegs) pInt->cpuRegs = &vm86_s; VM86S->flags = 0; VM86S->screen_bitmap = 0; VM86S->cpu_type = CPU_586; memset(&VM86S->int_revectored, 0xff, sizeof(VM86S->int_revectored)); memset(&VM86S->int21_revectored, 0xff, sizeof(VM86S->int21_revectored)); return TRUE; } /* get the linear address */ #define LIN_PREF_SI ((pref_seg << 4) + X86_SI) #define LWECX ((prefix66 ^ prefix67) ? X86_ECX : X86_CX) #define LWECX_ZERO {if (prefix66 ^ prefix67) X86_ECX = 0; else X86_CX = 0;} #define DF (1 << 10) /* vm86 fault handling */ static Bool vm86_GP_fault(xf86Int10InfoPtr pInt) { unsigned char *csp, *lina; CARD32 org_eip; int pref_seg; int done, is_rep, prefix66, prefix67; csp = lina = SEG_ADR((unsigned char *), X86_CS, IP); is_rep = 0; prefix66 = prefix67 = 0; pref_seg = -1; /* eat up prefixes */ done = 0; do { switch (MEM_RB(pInt, (int) csp++)) { case 0x66: /* operand prefix */ prefix66 = 1; break; case 0x67: /* address prefix */ prefix67 = 1; break; case 0x2e: /* CS */ pref_seg = X86_CS; break; case 0x3e: /* DS */ pref_seg = X86_DS; break; case 0x26: /* ES */ pref_seg = X86_ES; break; case 0x36: /* SS */ pref_seg = X86_SS; break; case 0x65: /* GS */ pref_seg = X86_GS; break; case 0x64: /* FS */ pref_seg = X86_FS; break; case 0xf0: /* lock */ break; case 0xf2: /* repnz */ case 0xf3: /* rep */ is_rep = 1; break; default: done = 1; } } while (!done); csp--; /* oops one too many */ org_eip = X86_EIP; X86_IP += (csp - lina); switch (MEM_RB(pInt, (int) csp)) { case 0x6c: /* insb */ /* NOTE: ES can't be overwritten; prefixes 66,67 should use esi,edi,ecx * but is anyone using extended regs in real mode? */ /* WARNING: no test for DI wrapping! */ X86_EDI += port_rep_inb(pInt, X86_DX, SEG_EADR((CARD32), X86_ES, DI), X86_FLAGS & DF, is_rep ? LWECX : 1); if (is_rep) LWECX_ZERO; X86_IP++; break; case 0x6d: /* (rep) insw / insd */ /* NOTE: ES can't be overwritten */ /* WARNING: no test for _DI wrapping! */ if (prefix66) { X86_DI += port_rep_inl(pInt, X86_DX, SEG_ADR((CARD32), X86_ES, DI), X86_EFLAGS & DF, is_rep ? LWECX : 1); } else { X86_DI += port_rep_inw(pInt, X86_DX, SEG_ADR((CARD32), X86_ES, DI), X86_FLAGS & DF, is_rep ? LWECX : 1); } if (is_rep) LWECX_ZERO; X86_IP++; break; case 0x6e: /* (rep) outsb */ if (pref_seg < 0) pref_seg = X86_DS; /* WARNING: no test for _SI wrapping! */ X86_SI += port_rep_outb(pInt, X86_DX, (CARD32) LIN_PREF_SI, X86_FLAGS & DF, is_rep ? LWECX : 1); if (is_rep) LWECX_ZERO; X86_IP++; break; case 0x6f: /* (rep) outsw / outsd */ if (pref_seg < 0) pref_seg = X86_DS; /* WARNING: no test for _SI wrapping! */ if (prefix66) { X86_SI += port_rep_outl(pInt, X86_DX, (CARD32) LIN_PREF_SI, X86_EFLAGS & DF, is_rep ? LWECX : 1); } else { X86_SI += port_rep_outw(pInt, X86_DX, (CARD32) LIN_PREF_SI, X86_FLAGS & DF, is_rep ? LWECX : 1); } if (is_rep) LWECX_ZERO; X86_IP++; break; case 0xe5: /* inw xx, inl xx */ if (prefix66) X86_EAX = x_inl(csp[1]); else X86_AX = x_inw(csp[1]); X86_IP += 2; break; case 0xe4: /* inb xx */ X86_AL = x_inb(csp[1]); X86_IP += 2; break; case 0xed: /* inw dx, inl dx */ if (prefix66) X86_EAX = x_inl(X86_DX); else X86_AX = x_inw(X86_DX); X86_IP += 1; break; case 0xec: /* inb dx */ X86_AL = x_inb(X86_DX); X86_IP += 1; break; case 0xe7: /* outw xx */ if (prefix66) x_outl(csp[1], X86_EAX); else x_outw(csp[1], X86_AX); X86_IP += 2; break; case 0xe6: /* outb xx */ x_outb(csp[1], X86_AL); X86_IP += 2; break; case 0xef: /* outw dx */ if (prefix66) x_outl(X86_DX, X86_EAX); else x_outw(X86_DX, X86_AX); X86_IP += 1; break; case 0xee: /* outb dx */ x_outb(X86_DX, X86_AL); X86_IP += 1; break; case 0xf4: DebugF("hlt at %p\n", lina); return FALSE; case 0x0f: xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "CPU 0x0f Trap at CS:EIP=0x%4.4x:0x%8.8lx\n", X86_CS, X86_EIP); goto op0ferr; default: xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "unknown reason for exception\n"); op0ferr: dump_registers(pInt); stack_trace(pInt); dump_code(pInt); xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "cannot continue\n"); return FALSE; } /* end of switch() */ return TRUE; } static int do_vm86(xf86Int10InfoPtr pInt) { int retval; retval = vm86_rep(VM86S); switch (VM86_TYPE(retval)) { case VM86_UNKNOWN: if (!vm86_GP_fault(pInt)) return 0; break; case VM86_STI: xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "vm86_sti :-((\n"); dump_registers(pInt); dump_code(pInt); stack_trace(pInt); return 0; case VM86_INTx: pInt->num = VM86_ARG(retval); if (!int_handler(pInt)) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Unknown vm86_int: 0x%X\n\n", VM86_ARG(retval)); dump_registers(pInt); dump_code(pInt); stack_trace(pInt); return 0; } /* I'm not sure yet what to do if we can handle ints */ break; case VM86_SIGNAL: return 1; /* * we used to warn here and bail out - but now the sigio stuff * always fires signals at us. So we just ignore them for now. */ xf86DrvMsg(pInt->pScrn->scrnIndex, X_WARNING, "received signal\n"); return 0; default: xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "unknown type(0x%x)=0x%x\n", VM86_ARG(retval), VM86_TYPE(retval)); dump_registers(pInt); dump_code(pInt); stack_trace(pInt); return 0; } return 1; } void xf86ExecX86int10(xf86Int10InfoPtr pInt) { int sig = setup_int(pInt); if (int_handler(pInt)) while (do_vm86(pInt)) { }; finish_int(pInt, sig); } static int vm86_rep(struct vm86_struct *ptr) { int __res; #ifdef __PIC__ /* When compiling with -fPIC, we can't use asm constraint "b" because %ebx is already taken by gcc. */ __asm__ __volatile__("pushl %%ebx\n\t" "push %%gs\n\t" "movl %2,%%ebx\n\t" "movl %1,%%eax\n\t" "int $0x80\n\t" "pop %%gs\n\t" "popl %%ebx":"=a"(__res) :"n"((int) 113), "r"((struct vm86_struct *) ptr)); #else __asm__ __volatile__("push %%gs\n\t" "int $0x80\n\t" "pop %%gs":"=a"(__res):"a"((int) 113), "b"((struct vm86_struct *) ptr)); #endif if (__res < 0) { errno = -__res; __res = -1; } else errno = 0; return __res; } #endif xorg-server-21.1.16/hw/xfree86/os-support/linux/int10/linux.c0000644000175000017500000003741714757411105017304 /* * linux specific part of the int10 module * Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2008 Egbert Eich */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" #include "compiler.h" #define _INT10_PRIVATE #include "xf86int10.h" #ifdef __sparc__ #define DEV_MEM "/dev/fb" #else #define DEV_MEM "/dev/mem" #endif #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) #define SHMERRORPTR (void *)(-1) #include #include #include #include #include #include #include static int counter = 0; static unsigned long int10Generation = 0; static CARD8 read_b(xf86Int10InfoPtr pInt, int addr); static CARD16 read_w(xf86Int10InfoPtr pInt, int addr); static CARD32 read_l(xf86Int10InfoPtr pInt, int addr); static void write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val); static void write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val); static void write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val); int10MemRec linuxMem = { read_b, read_w, read_l, write_b, write_w, write_l }; typedef struct { int lowMem; int highMem; char *base; char *base_high; char *alloc; } linuxInt10Priv; #if defined DoSubModules typedef enum { INT10_NOT_LOADED, INT10_LOADED_VM86, INT10_LOADED_X86EMU, INT10_LOAD_FAILED } Int10LinuxSubModuleState; static Int10LinuxSubModuleState loadedSubModule = INT10_NOT_LOADED; static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn); #endif /* DoSubModules */ static Bool readLegacy(struct pci_device *dev, unsigned char *buf, int base, int len) { void *map; if (pci_device_map_legacy(dev, base, len, 0, &map)) return FALSE; memcpy(buf, map, len); pci_device_unmap_legacy(dev, man, len); return TRUE; } xf86Int10InfoPtr xf86ExtendedInitInt10(int entityIndex, int Flags) { xf86Int10InfoPtr pInt = NULL; int screen; int fd; static void *vidMem = NULL; static void *sysMem = NULL; void *vMem = NULL; void *options = NULL; int low_mem; int high_mem = -1; char *base = SHMERRORPTR; char *base_high = SHMERRORPTR; int pagesize; memType cs; legacyVGARec vga; Bool videoBiosMapped = FALSE; ScrnInfoPtr pScrn; if (int10Generation != serverGeneration) { counter = 0; int10Generation = serverGeneration; } pScrn = xf86FindScreenForEntity(entityIndex); screen = pScrn->scrnIndex; options = xf86HandleInt10Options(pScrn, entityIndex); if (int10skip(options)) { free(options); return NULL; } #if defined DoSubModules if (loadedSubModule == INT10_NOT_LOADED) loadedSubModule = int10LinuxLoadSubModule(pScrn); if (loadedSubModule == INT10_LOAD_FAILED) return NULL; #endif if ((!vidMem) || (!sysMem)) { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (!sysMem) { DebugF("Mapping sys bios area\n"); if ((sysMem = mmap((void *) (SYS_BIOS), BIOS_SIZE, PROT_READ | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, SYS_BIOS)) == MAP_FAILED) { xf86DrvMsg(screen, X_ERROR, "Cannot map SYS BIOS\n"); close(fd); goto error0; } } if (!vidMem) { DebugF("Mapping VRAM area\n"); if ((vidMem = mmap((void *) (V_RAM), VRAM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, V_RAM)) == MAP_FAILED) { xf86DrvMsg(screen, X_ERROR, "Cannot map V_RAM\n"); close(fd); goto error0; } } close(fd); } else { xf86DrvMsg(screen, X_ERROR, "Cannot open %s\n", DEV_MEM); goto error0; } } pInt = (xf86Int10InfoPtr) xnfcalloc(1, sizeof(xf86Int10InfoRec)); pInt->pScrn = pScrn; pInt->entityIndex = entityIndex; pInt->dev = xf86GetPciInfoForEntity(entityIndex); if (!xf86Int10ExecSetup(pInt)) goto error0; pInt->mem = &linuxMem; pagesize = getpagesize(); pInt->private = (void *) xnfcalloc(1, sizeof(linuxInt10Priv)); ((linuxInt10Priv *) pInt->private)->alloc = (void *) xnfcalloc(1, ALLOC_ENTRIES(pagesize)); if (!xf86IsEntityPrimary(entityIndex)) { DebugF("Mapping high memory area\n"); if ((high_mem = shmget(counter++, HIGH_MEM_SIZE, IPC_CREAT | SHM_R | SHM_W)) == -1) { if (errno == ENOSYS) xf86DrvMsg(screen, X_ERROR, "shmget error\n Please reconfigure" " your kernel to include System V IPC support\n"); else xf86DrvMsg(screen, X_ERROR, "shmget(highmem) error: %s\n", strerror(errno)); goto error1; } } else { DebugF("Mapping Video BIOS\n"); videoBiosMapped = TRUE; if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if ((vMem = mmap((void *) (V_BIOS), SYS_BIOS - V_BIOS, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, V_BIOS)) == MAP_FAILED) { xf86DrvMsg(screen, X_ERROR, "Cannot map V_BIOS\n"); close(fd); goto error1; } close(fd); } else goto error1; } ((linuxInt10Priv *) pInt->private)->highMem = high_mem; DebugF("Mapping 640kB area\n"); if ((low_mem = shmget(counter++, V_RAM, IPC_CREAT | SHM_R | SHM_W)) == -1) { xf86DrvMsg(screen, X_ERROR, "shmget(lowmem) error: %s\n", strerror(errno)); goto error2; } ((linuxInt10Priv *) pInt->private)->lowMem = low_mem; base = shmat(low_mem, 0, 0); if (base == SHMERRORPTR) { xf86DrvMsg(screen, X_ERROR, "shmat(low_mem) error: %s\n", strerror(errno)); goto error3; } ((linuxInt10Priv *) pInt->private)->base = base; if (high_mem > -1) { base_high = shmat(high_mem, 0, 0); if (base_high == SHMERRORPTR) { xf86DrvMsg(screen, X_ERROR, "shmat(high_mem) error: %s\n", strerror(errno)); goto error3; } ((linuxInt10Priv *) pInt->private)->base_high = base_high; } else ((linuxInt10Priv *) pInt->private)->base_high = NULL; if (!MapCurrentInt10(pInt)) goto error3; Int10Current = pInt; DebugF("Mapping int area\n"); /* note: yes, we really are writing the 0 page here */ if (!readLegacy(pInt->dev, (unsigned char *) 0, 0, LOW_PAGE_SIZE)) { xf86DrvMsg(screen, X_ERROR, "Cannot read int vect\n"); goto error3; } DebugF("done\n"); /* * Read in everything between V_BIOS and SYS_BIOS as some system BIOSes * have executable code there. Note that xf86ReadBIOS() can only bring in * 64K bytes at a time. */ if (!videoBiosMapped) { memset((void *) V_BIOS, 0, SYS_BIOS - V_BIOS); DebugF("Reading BIOS\n"); for (cs = V_BIOS; cs < SYS_BIOS; cs += V_BIOS_SIZE) if (!readLegacy(pInt->dev, (void *)cs, cs, V_BIOS_SIZE)) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long) cs); DebugF("done\n"); } if (xf86IsEntityPrimary(entityIndex) && !(initPrimary(options))) { if (!xf86int10GetBiosSegment(pInt, NULL)) goto error3; set_return_trap(pInt); #ifdef _PC pInt->Flags = Flags & (SET_BIOS_SCRATCH | RESTORE_BIOS_SCRATCH); if (!(pInt->Flags & SET_BIOS_SCRATCH)) pInt->Flags &= ~RESTORE_BIOS_SCRATCH; xf86Int10SaveRestoreBIOSVars(pInt, TRUE); #endif } else { const BusType location_type = xf86int10GetBiosLocationType(pInt); switch (location_type) { case BUS_PCI:{ int err; struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); pci_device_enable(rom_device); err = pci_device_read_rom(rom_device, (unsigned char *) (V_BIOS)); if (err) { xf86DrvMsg(screen, X_ERROR, "Cannot read V_BIOS (%s)\n", strerror(err)); goto error3; } pInt->BIOSseg = V_BIOS >> 4; break; } default: goto error3; } pInt->num = 0xe6; reset_int_vect(pInt); set_return_trap(pInt); LockLegacyVGA(pInt, &vga); xf86ExecX86int10(pInt); UnlockLegacyVGA(pInt, &vga); } #ifdef DEBUG dprint(0xc0000, 0x20); #endif free(options); return pInt; error3: if (base_high) shmdt(base_high); shmdt(base); shmdt(0); if (base_high) shmdt((char *) HIGH_MEM); shmctl(low_mem, IPC_RMID, NULL); Int10Current = NULL; error2: if (high_mem > -1) shmctl(high_mem, IPC_RMID, NULL); error1: if (vMem) munmap(vMem, SYS_BIOS - V_BIOS); free(((linuxInt10Priv *) pInt->private)->alloc); free(pInt->private); error0: free(options); free(pInt); return NULL; } Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { void *addr; int fd = -1; if (Int10Current) { shmdt(0); if (((linuxInt10Priv *) Int10Current->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); } addr = shmat(((linuxInt10Priv *) pInt->private)->lowMem, (char *) 1, SHM_RND); if (addr == SHMERRORPTR) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot shmat() low memory\n"); xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "shmat(low_mem) error: %s\n", strerror(errno)); return FALSE; } if (mprotect((void *) 0, V_RAM, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot set EXEC bit on low memory: %s\n", strerror(errno)); if (((linuxInt10Priv *) pInt->private)->highMem >= 0) { addr = shmat(((linuxInt10Priv *) pInt->private)->highMem, (char *) HIGH_MEM, 0); if (addr == SHMERRORPTR) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot shmat() high memory\n"); xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "shmget error: %s\n", strerror(errno)); return FALSE; } if (mprotect((void *) HIGH_MEM, HIGH_MEM_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot set EXEC bit on high memory: %s\n", strerror(errno)); } else { if ((fd = open(DEV_MEM, O_RDWR, 0)) >= 0) { if (mmap((void *) (V_BIOS), SYS_BIOS - V_BIOS, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_SHARED | MAP_FIXED, fd, V_BIOS) == MAP_FAILED) { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot map V_BIOS\n"); close(fd); return FALSE; } } else { xf86DrvMsg(pInt->pScrn->scrnIndex, X_ERROR, "Cannot open %s\n", DEV_MEM); return FALSE; } close(fd); } return TRUE; } void xf86FreeInt10(xf86Int10InfoPtr pInt) { if (!pInt) return; #ifdef _PC xf86Int10SaveRestoreBIOSVars(pInt, FALSE); #endif if (Int10Current == pInt) { shmdt(0); if (((linuxInt10Priv *) pInt->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); Int10Current = NULL; } if (((linuxInt10Priv *) pInt->private)->base_high) shmdt(((linuxInt10Priv *) pInt->private)->base_high); shmdt(((linuxInt10Priv *) pInt->private)->base); shmctl(((linuxInt10Priv *) pInt->private)->lowMem, IPC_RMID, NULL); if (((linuxInt10Priv *) pInt->private)->highMem >= 0) shmctl(((linuxInt10Priv *) pInt->private)->highMem, IPC_RMID, NULL); free(((linuxInt10Priv *) pInt->private)->alloc); free(pInt->private); free(pInt); } void * xf86Int10AllocPages(xf86Int10InfoPtr pInt, int num, int *off) { int pagesize = getpagesize(); int num_pages = ALLOC_ENTRIES(pagesize); int i, j; for (i = 0; i < (num_pages - num); i++) { if (((linuxInt10Priv *) pInt->private)->alloc[i] == 0) { for (j = i; j < (num + i); j++) if ((((linuxInt10Priv *) pInt->private)->alloc[j] != 0)) break; if (j == (num + i)) break; else i = i + num; } } if (i == (num_pages - num)) return NULL; for (j = i; j < (i + num); j++) ((linuxInt10Priv *) pInt->private)->alloc[j] = 1; *off = (i + 1) * pagesize; return ((linuxInt10Priv *) pInt->private)->base + ((i + 1) * pagesize); } void xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) { int pagesize = getpagesize(); int first = (((unsigned long) pbase - (unsigned long) ((linuxInt10Priv *) pInt->private)->base) / pagesize) - 1; int i; for (i = first; i < (first + num); i++) ((linuxInt10Priv *) pInt->private)->alloc[i] = 0; } static CARD8 read_b(xf86Int10InfoPtr pInt, int addr) { return *((CARD8 *) (memType) addr); } static CARD16 read_w(xf86Int10InfoPtr pInt, int addr) { return *((CARD16 *) (memType) addr); } static CARD32 read_l(xf86Int10InfoPtr pInt, int addr) { return *((CARD32 *) (memType) addr); } static void write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val) { *((CARD8 *) (memType) addr) = val; } static void write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val) { *((CARD16 *) (memType) addr) = val; } static void write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) { *((CARD32 *) (memType) addr) = val; } void * xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) { if (addr < V_RAM) return ((linuxInt10Priv *) pInt->private)->base + addr; else if (addr < V_BIOS) return (void *) (memType) addr; else if (addr < SYS_BIOS) { if (((linuxInt10Priv *) pInt->private)->base_high) return (void *) (((linuxInt10Priv *) pInt->private)->base_high - V_BIOS + addr); else return (void *) (memType) addr; } else return (void *) (memType) addr; } #if defined DoSubModules static Bool vm86_tst(void) { int __res; #ifdef __PIC__ /* When compiling with -fPIC, we can't use asm constraint "b" because %ebx is already taken by gcc. */ __asm__ __volatile__("pushl %%ebx\n\t" "movl %2,%%ebx\n\t" "movl %1,%%eax\n\t" "int $0x80\n\t" "popl %%ebx":"=a"(__res) :"n"((int) 113), "r"(NULL)); #else __asm__ __volatile__("int $0x80\n\t":"=a"(__res):"a"((int) 113), "b"((struct vm86_struct *) NULL)); #endif if (__res < 0 && __res == -ENOSYS) return FALSE; return TRUE; } static Int10LinuxSubModuleState int10LinuxLoadSubModule(ScrnInfoPtr pScrn) { if (vm86_tst()) { if (xf86LoadSubModule(pScrn, "vm86")) return INT10_LOADED_VM86; } if (xf86LoadSubModule(pScrn, "x86emu")) return INT10_LOADED_X86EMU; return INT10_LOAD_FAILED; } #endif /* DoSubModules */ xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_agp.c0000644000175000017500000002301014757411105016622 /* * Abstraction of the AGP GART interface. * * This version is for Linux and Free/Open/NetBSD. * * Copyright © 2000 VA Linux Systems, Inc. * Copyright © 2001 The XFree86 Project, Inc. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" #if defined(__linux__) #include #include #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include #include #endif #ifndef AGP_DEVICE #define AGP_DEVICE "/dev/agpgart" #endif /* AGP page size is independent of the host page size. */ #ifndef AGP_PAGE_SIZE #define AGP_PAGE_SIZE 4096 #endif #define AGPGART_MAJOR_VERSION 0 #define AGPGART_MINOR_VERSION 99 static int gartFd = -1; static int acquiredScreen = -1; static Bool initDone = FALSE; /* * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ Bool xf86GARTCloseScreen(int screenNum) { if (gartFd != -1) { close(gartFd); acquiredScreen = -1; gartFd = -1; initDone = FALSE; } return TRUE; } /* * Open /dev/agpgart. Keep it open until xf86GARTCloseScreen is called. */ static Bool GARTInit(int screenNum) { struct _agp_info agpinf; if (initDone) return gartFd != -1; initDone = TRUE; if (gartFd == -1) gartFd = open(AGP_DEVICE, O_RDWR, 0); else return FALSE; if (gartFd == -1) { xf86DrvMsg(screenNum, X_ERROR, "GARTInit: Unable to open " AGP_DEVICE " (%s)\n", strerror(errno)); return FALSE; } xf86AcquireGART(-1); /* Check the kernel driver version. */ if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { xf86DrvMsg(screenNum, X_ERROR, "GARTInit: AGPIOC_INFO failed (%s)\n", strerror(errno)); close(gartFd); gartFd = -1; return FALSE; } xf86ReleaseGART(-1); #if defined(__linux__) /* Per Dave Jones, every effort will be made to keep the * agpgart interface backwards compatible, so allow all * future versions. */ if ( #if (AGPGART_MAJOR_VERSION > 0) /* quiet compiler */ agpinf.version.major < AGPGART_MAJOR_VERSION || #endif (agpinf.version.major == AGPGART_MAJOR_VERSION && agpinf.version.minor < AGPGART_MINOR_VERSION)) { xf86DrvMsg(screenNum, X_ERROR, "GARTInit: Kernel agpgart driver version is not current" " (%d.%d vs %d.%d)\n", agpinf.version.major, agpinf.version.minor, AGPGART_MAJOR_VERSION, AGPGART_MINOR_VERSION); close(gartFd); gartFd = -1; return FALSE; } #endif return TRUE; } Bool xf86AgpGARTSupported(void) { return GARTInit(-1); } AgpInfoPtr xf86GetAGPInfo(int screenNum) { struct _agp_info agpinf; AgpInfoPtr info; if (!GARTInit(screenNum)) return NULL; if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); return NULL; } memset((char *) &agpinf, 0, sizeof(agpinf)); if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", strerror(errno)); free(info); return NULL; } info->bridgeId = agpinf.bridge_id; info->agpMode = agpinf.agp_mode; info->base = agpinf.aper_base; info->size = agpinf.aper_size; info->totalPages = agpinf.pg_total; info->systemPages = agpinf.pg_system; info->usedPages = agpinf.pg_used; xf86DrvMsg(screenNum, X_INFO, "Kernel reported %zu total, %zu used\n", agpinf.pg_total, agpinf.pg_used); return info; } /* * XXX If multiple screens can acquire the GART, should we have a reference * count instead of using acquiredScreen? */ Bool xf86AcquireGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) return FALSE; if (screenNum == -1 || acquiredScreen != screenNum) { if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n", strerror(errno)); return FALSE; } acquiredScreen = screenNum; } return TRUE; } Bool xf86ReleaseGART(int screenNum) { if (screenNum != -1 && !GARTInit(screenNum)) return FALSE; if (acquiredScreen == screenNum) { /* * The FreeBSD agp driver removes allocations on release. * The Linux driver doesn't. xf86ReleaseGART() is expected * to give up access to the GART, but not to remove any * allocations. */ #if !defined(__linux__) if (screenNum == -1) #endif { if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n", strerror(errno)); return FALSE; } acquiredScreen = -1; } return TRUE; } return FALSE; } int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { struct _agp_allocate alloc; int pages; /* * Allocates "size" bytes of GART memory (rounds up to the next * page multiple) or type "type". A handle (key) for the allocated * memory is returned. On error, the return value is -1. */ if (!GARTInit(screenNum) || acquiredScreen != screenNum) return -1; pages = (size / AGP_PAGE_SIZE); if (size % AGP_PAGE_SIZE != 0) pages++; /* XXX check for pages == 0? */ alloc.pg_count = pages; alloc.type = type; if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: " "allocation of %d pages failed\n\t(%s)\n", pages, strerror(errno)); return -1; } if (physical) *physical = alloc.physical; return alloc.key; } Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || acquiredScreen != screenNum) return FALSE; if (acquiredScreen != screenNum) { xf86DrvMsg(screenNum, X_ERROR, "xf86UnbindGARTMemory: AGP not acquired by this screen\n"); return FALSE; } #ifdef __linux__ if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *) (uintptr_t) key) != 0) { #else if (ioctl(gartFd, AGPIOC_DEALLOCATE, &key) != 0) { #endif xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: " "deallocation gart memory with key %d failed\n\t(%s)\n", key, strerror(errno)); return FALSE; } return TRUE; } /* Bind GART memory with "key" at "offset" */ Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { struct _agp_bind bind; int pageOffset; if (!GARTInit(screenNum) || acquiredScreen != screenNum) return FALSE; if (acquiredScreen != screenNum) { xf86DrvMsg(screenNum, X_ERROR, "xf86BindGARTMemory: AGP not acquired by this screen\n"); return FALSE; } if (offset % AGP_PAGE_SIZE != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " "offset (0x%lx) is not page-aligned (%d)\n", offset, AGP_PAGE_SIZE); return FALSE; } pageOffset = offset / AGP_PAGE_SIZE; xf86DrvMsgVerb(screenNum, X_INFO, 3, "xf86BindGARTMemory: bind key %d at 0x%08lx " "(pgoffset %d)\n", key, offset, pageOffset); bind.pg_start = pageOffset; bind.key = key; if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " "binding of gart memory with key %d\n" "\tat offset 0x%lx failed (%s)\n", key, offset, strerror(errno)); return FALSE; } return TRUE; } /* Unbind GART memory with "key" */ Bool xf86UnbindGARTMemory(int screenNum, int key) { struct _agp_unbind unbind; if (!GARTInit(screenNum) || acquiredScreen != screenNum) return FALSE; if (acquiredScreen != screenNum) { xf86DrvMsg(screenNum, X_ERROR, "xf86UnbindGARTMemory: AGP not acquired by this screen\n"); return FALSE; } unbind.priority = 0; unbind.key = key; if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: " "unbinding of gart memory with key %d " "failed (%s)\n", key, strerror(errno)); return FALSE; } xf86DrvMsgVerb(screenNum, X_INFO, 3, "xf86UnbindGARTMemory: unbind key %d\n", key); return TRUE; } /* XXX Interface may change. */ Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup setup; if (!GARTInit(screenNum) || acquiredScreen != screenNum) return FALSE; setup.agp_mode = mode; if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: " "AGPIOC_SETUP with mode %ld failed (%s)\n", (unsigned long) mode, strerror(errno)); return FALSE; } return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/linux/Makefile.am0000644000175000017500000000170314757411105017067 noinst_LTLIBRARIES = liblinux.la if LNXACPI ACPI_SRCS = lnx_acpi.c if !LNXAPM ACPI_SRCS += lnx_apm.c endif XORG_CFLAGS += -DHAVE_ACPI endif if LNXAPM APM_SRCS = lnx_apm.c XORG_CFLAGS += -DHAVE_APM endif if !LNXAPM if !LNXACPI ACPI_SRCS = $(srcdir)/../shared/pm_noop.c endif endif if SYSTEMD_LOGIND LOGIND_SRCS = systemd-logind.c XORG_CFLAGS += $(DBUS_CFLAGS) endif if AGP AGP_SRCS = lnx_agp.c endif liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(LOGIND_SRCS) \ $(AGP_SRCS) AM_CFLAGS = -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) xorg-server-21.1.16/hw/xfree86/os-support/linux/Makefile.in0000644000175000017500000010321014757411115017075 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @LNXACPI_TRUE@@LNXAPM_FALSE@am__append_1 = lnx_apm.c @LNXACPI_TRUE@am__append_2 = -DHAVE_ACPI @LNXAPM_TRUE@am__append_3 = -DHAVE_APM @SYSTEMD_LOGIND_TRUE@am__append_4 = $(DBUS_CFLAGS) subdir = hw/xfree86/os-support/linux ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liblinux_la_LIBADD = am__liblinux_la_SOURCES_DIST = linux.h lnx_init.c lnx_video.c \ lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/VTsw_usl.c $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/pm_noop.c lnx_acpi.c lnx_apm.c \ systemd-logind.c lnx_agp.c @LNXACPI_TRUE@@LNXAPM_FALSE@am__objects_1 = lnx_apm.lo @LNXACPI_FALSE@@LNXAPM_FALSE@am__objects_2 = pm_noop.lo @LNXACPI_TRUE@am__objects_2 = lnx_acpi.lo $(am__objects_1) @LNXAPM_TRUE@am__objects_3 = lnx_apm.lo @SYSTEMD_LOGIND_TRUE@am__objects_4 = systemd-logind.lo @AGP_TRUE@am__objects_5 = lnx_agp.lo am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_kmod.lo \ lnx_bell.lo lnx_platform.lo VTsw_usl.lo posix_tty.lo vidmem.lo \ sigio.lo $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/VTsw_usl.Plo \ ./$(DEPDIR)/lnx_acpi.Plo ./$(DEPDIR)/lnx_agp.Plo \ ./$(DEPDIR)/lnx_apm.Plo ./$(DEPDIR)/lnx_bell.Plo \ ./$(DEPDIR)/lnx_init.Plo ./$(DEPDIR)/lnx_kmod.Plo \ ./$(DEPDIR)/lnx_platform.Plo ./$(DEPDIR)/lnx_video.Plo \ ./$(DEPDIR)/pm_noop.Plo ./$(DEPDIR)/posix_tty.Plo \ ./$(DEPDIR)/sigio.Plo ./$(DEPDIR)/systemd-logind.Plo \ ./$(DEPDIR)/vidmem.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(liblinux_la_SOURCES) DIST_SOURCES = $(am__liblinux_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ $(am__append_2) $(am__append_3) \ $(am__append_4) XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = liblinux.la @LNXACPI_FALSE@@LNXAPM_FALSE@ACPI_SRCS = $(srcdir)/../shared/pm_noop.c @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c $(am__append_1) @LNXAPM_TRUE@APM_SRCS = lnx_apm.c @SYSTEMD_LOGIND_TRUE@LOGIND_SRCS = systemd-logind.c @AGP_TRUE@AGP_SRCS = lnx_agp.c liblinux_la_SOURCES = linux.h lnx_init.c lnx_video.c \ lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ $(LOGIND_SRCS) \ $(AGP_SRCS) AM_CFLAGS = -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) AM_CPPFLAGS = $(XORG_INCS) $(PLATFORM_INCLUDES) $(LIBDRM_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/linux/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/linux/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } liblinux.la: $(liblinux_la_OBJECTS) $(liblinux_la_DEPENDENCIES) $(EXTRA_liblinux_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(liblinux_la_OBJECTS) $(liblinux_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_usl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_acpi.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_agp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_apm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_bell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_kmod.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_platform.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemd-logind.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< VTsw_usl.lo: $(srcdir)/../shared/VTsw_usl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_usl.lo -MD -MP -MF $(DEPDIR)/VTsw_usl.Tpo -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/VTsw_usl.Tpo $(DEPDIR)/VTsw_usl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/VTsw_usl.c' object='VTsw_usl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_usl.lo `test -f '$(srcdir)/../shared/VTsw_usl.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_usl.c posix_tty.lo: $(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posix_tty.lo -MD -MP -MF $(DEPDIR)/posix_tty.Tpo -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/posix_tty.Tpo $(DEPDIR)/posix_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/posix_tty.c' object='posix_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c sigio.lo: $(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c pm_noop.lo: $(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pm_noop.lo -MD -MP -MF $(DEPDIR)/pm_noop.Tpo -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pm_noop.Tpo $(DEPDIR)/pm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/pm_noop.c' object='pm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/VTsw_usl.Plo -rm -f ./$(DEPDIR)/lnx_acpi.Plo -rm -f ./$(DEPDIR)/lnx_agp.Plo -rm -f ./$(DEPDIR)/lnx_apm.Plo -rm -f ./$(DEPDIR)/lnx_bell.Plo -rm -f ./$(DEPDIR)/lnx_init.Plo -rm -f ./$(DEPDIR)/lnx_kmod.Plo -rm -f ./$(DEPDIR)/lnx_platform.Plo -rm -f ./$(DEPDIR)/lnx_video.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/systemd-logind.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/VTsw_usl.Plo -rm -f ./$(DEPDIR)/lnx_acpi.Plo -rm -f ./$(DEPDIR)/lnx_agp.Plo -rm -f ./$(DEPDIR)/lnx_apm.Plo -rm -f ./$(DEPDIR)/lnx_bell.Plo -rm -f ./$(DEPDIR)/lnx_init.Plo -rm -f ./$(DEPDIR)/lnx_kmod.Plo -rm -f ./$(DEPDIR)/lnx_platform.Plo -rm -f ./$(DEPDIR)/lnx_video.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/systemd-logind.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/linux/linux.h0000644000175000017500000000245614757411105016351 /* * Copyright © 2015 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Hans de Goede */ #ifndef XF86_LINUX_H #define XF86_LINUX_H int linux_parse_vt_settings(int may_fail); int linux_get_keeptty(void); #endif xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_init.c0000644000175000017500000003044114757411105017024 /* * Copyright 1992 by Orest Zborowski * Copyright 1993 by David Wexelblat * * 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 names of Orest Zborowski and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Orest Zborowski * and David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include #include "compiler.h" #include "linux.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include #ifdef HAVE_SYS_SYSMACROS_H #include #endif #ifndef K_OFF #define K_OFF 0x4 #endif static Bool KeepTty = FALSE; static int activeVT = -1; static char vtname[11]; static struct termios tty_attr; /* tty state to restore */ static int tty_mode; /* kbd mode to restore */ static void drain_console(int fd, void *closure) { errno = 0; if (tcflush(fd, TCIOFLUSH) == -1 && errno == EIO) { xf86SetConsoleHandler(NULL, NULL); } } static int switch_to(int vt, const char *from) { int ret; SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt)); if (ret < 0) { xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno)); return 0; } SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt)); if (ret < 0) { xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); return 0; } return 1; } #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" int linux_parse_vt_settings(int may_fail) { int i, fd = -1, ret, current_vt = -1; struct vt_stat vts; struct stat st; MessageType from = X_PROBED; /* Only do this once */ static int vt_settings_parsed = 0; if (vt_settings_parsed) return 1; /* * setup the virtual terminal manager */ if (xf86Info.vtno != -1) { from = X_CMDLINE; } else { fd = open("/dev/tty0", O_WRONLY, 0); if (fd < 0) { if (may_fail) return 0; FatalError("parse_vt_settings: Cannot open /dev/tty0 (%s)\n", strerror(errno)); } if (xf86Info.ShareVTs) { SYSCALL(ret = ioctl(fd, VT_GETSTATE, &vts)); if (ret < 0) { if (may_fail) return 0; FatalError("parse_vt_settings: Cannot find the current" " VT (%s)\n", strerror(errno)); } xf86Info.vtno = vts.v_active; } else { SYSCALL(ret = ioctl(fd, VT_OPENQRY, &xf86Info.vtno)); if (ret < 0) { if (may_fail) return 0; FatalError("parse_vt_settings: Cannot find a free VT: " "%s\n", strerror(errno)); } if (xf86Info.vtno == -1) { if (may_fail) return 0; FatalError("parse_vt_settings: Cannot find a free VT\n"); } } close(fd); } xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); /* Some of stdin / stdout / stderr maybe redirected to a file */ for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) { ret = fstat(i, &st); if (ret == 0 && S_ISCHR(st.st_mode) && major(st.st_rdev) == 4) { current_vt = minor(st.st_rdev); break; } } if (!KeepTty && current_vt == xf86Info.vtno) { xf86Msg(X_PROBED, "controlling tty is VT number %d, auto-enabling KeepTty\n", current_vt); KeepTty = TRUE; } vt_settings_parsed = 1; return 1; } int linux_get_keeptty(void) { return KeepTty; } void xf86OpenConsole(void) { int i, ret; struct vt_stat vts; struct vt_mode VT; const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; if (serverGeneration == 1) { linux_parse_vt_settings(FALSE); if (!KeepTty) { pid_t ppid = getppid(); pid_t ppgid; ppgid = getpgid(ppid); /* * change to parent process group that pgid != pid so * that setsid() doesn't fail and we become process * group leader */ if (setpgid(0, ppgid) < 0) xf86Msg(X_WARNING, "xf86OpenConsole: setpgid failed: %s\n", strerror(errno)); /* become process group leader */ if ((setsid() < 0)) xf86Msg(X_WARNING, "xf86OpenConsole: setsid failed: %s\n", strerror(errno)); } i = 0; while (vcs[i] != NULL) { snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */ if ((xf86Info.consoleFd = open(vtname, O_RDWR | O_NDELAY, 0)) >= 0) break; i++; } if (xf86Info.consoleFd < 0) FatalError("xf86OpenConsole: Cannot open virtual console" " %d (%s)\n", xf86Info.vtno, strerror(errno)); /* * Linux doesn't switch to an active vt after the last close of a vt, * so we do this ourselves by remembering which is active now. */ SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts)); if (ret < 0) xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n", strerror(errno)); else activeVT = vts.v_active; if (!xf86Info.ShareVTs) { struct termios nTty; /* * now get the VT. This _must_ succeed, or else fail completely. */ if (!switch_to(xf86Info.vtno, "xf86OpenConsole")) FatalError("xf86OpenConsole: Switching VT failed\n"); SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); if (ret < 0) FatalError("xf86OpenConsole: VT_GETMODE failed %s\n", strerror(errno)); OsSignal(SIGUSR1, xf86VTRequest); VT.mode = VT_PROCESS; VT.relsig = SIGUSR1; VT.acqsig = SIGUSR1; SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); if (ret < 0) FatalError ("xf86OpenConsole: VT_SETMODE VT_PROCESS failed: %s\n", strerror(errno)); SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS)); if (ret < 0) FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed %s\n", strerror(errno)); tcgetattr(xf86Info.consoleFd, &tty_attr); SYSCALL(ioctl(xf86Info.consoleFd, KDGKBMODE, &tty_mode)); /* disable kernel special keys and buffering */ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_OFF)); if (ret < 0) { /* fine, just disable special keys */ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSKBMODE, K_RAW)); if (ret < 0) FatalError("xf86OpenConsole: KDSKBMODE K_RAW failed %s\n", strerror(errno)); /* ... and drain events, else the kernel gets angry */ xf86SetConsoleHandler(drain_console, NULL); } nTty = tty_attr; nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); nTty.c_oflag = 0; nTty.c_cflag = CREAD | CS8; nTty.c_lflag = 0; nTty.c_cc[VTIME] = 0; nTty.c_cc[VMIN] = 1; cfsetispeed(&nTty, 9600); cfsetospeed(&nTty, 9600); tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); } } else { /* serverGeneration != 1 */ if (!xf86Info.ShareVTs && xf86Info.autoVTSwitch) { /* now get the VT */ if (!switch_to(xf86Info.vtno, "xf86OpenConsole")) FatalError("xf86OpenConsole: Switching VT failed\n"); } } } #pragma GCC diagnostic pop void xf86CloseConsole(void) { struct vt_mode VT; struct vt_stat vts; int ret; if (xf86Info.ShareVTs) { close(xf86Info.consoleFd); return; } /* * unregister the drain_console handler * - what to do if someone else changed it in the meantime? */ xf86SetConsoleHandler(NULL, NULL); /* Back to text mode ... */ SYSCALL(ret = ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: KDSETMODE failed: %s\n", strerror(errno)); SYSCALL(ioctl(xf86Info.consoleFd, KDSKBMODE, tty_mode)); tcsetattr(xf86Info.consoleFd, TCSANOW, &tty_attr); SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETMODE, &VT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_GETMODE failed: %s\n", strerror(errno)); else { /* set dflt vt handling */ VT.mode = VT_AUTO; SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_SETMODE, &VT)); if (ret < 0) xf86Msg(X_WARNING, "xf86CloseConsole: VT_SETMODE failed: %s\n", strerror(errno)); } if (xf86Info.autoVTSwitch) { /* * Perform a switch back to the active VT when we were started if our * vt is active now. */ if (activeVT >= 0) { SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_GETSTATE, &vts)); if (ret < 0) { xf86Msg(X_WARNING, "xf86OpenConsole: VT_GETSTATE failed: %s\n", strerror(errno)); } else { if (vts.v_active == xf86Info.vtno) { switch_to(activeVT, "xf86CloseConsole"); } } activeVT = -1; } } close(xf86Info.consoleFd); /* make the vt-manager happy */ } #define CHECK_FOR_REQUIRED_ARGUMENT() \ if (((i + 1) >= argc) || (!argv[i + 1])) { \ ErrorF("Required argument to %s not specified\n", argv[i]); \ UseMsg(); \ FatalError("Required argument to %s not specified\n", argv[i]); \ } int xf86ProcessArgument(int argc, char *argv[], int i) { /* * Keep server from detaching from controlling tty. This is useful * when debugging (so the server can receive keyboard signals. */ if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; return 1; } if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { if (sscanf(argv[i], "vt%2d", &xf86Info.vtno) == 0) { UseMsg(); xf86Info.vtno = -1; return 0; } return 1; } if (!strcmp(argv[i], "-masterfd")) { CHECK_FOR_REQUIRED_ARGUMENT(); if (xf86PrivsElevated()) FatalError("\nCannot specify -masterfd when server is setuid/setgid\n"); if (sscanf(argv[++i], "%d", &xf86DRMMasterFd) != 1) { UseMsg(); xf86DRMMasterFd = -1; return 0; } return 2; } return 0; } void xf86UseMsg(void) { ErrorF("vtXX use the specified VT number\n"); ErrorF("-keeptty "); ErrorF("don't detach controlling tty (for debugging only)\n"); ErrorF("-masterfd use the specified fd as the DRM master fd (not if setuid/gid)\n"); } void xf86OSInputThreadInit(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_video.c0000644000175000017500000001132614757411105017170 /* * Copyright 1992 by Orest Zborowski * Copyright 1993 by David Wexelblat * * 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 names of Orest Zborowski and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Orest Zborowski * and David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include #include #include "input.h" #include "scrnintstr.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" static Bool ExtendedEnabled = FALSE; #ifdef __ia64__ #include "compiler.h" #include #elif !defined(__powerpc__) && \ !defined(__mc68000__) && \ !defined(__sparc__) && \ !defined(__mips__) && \ !defined(__nds32__) && \ !defined(__arm__) && \ !defined(__aarch64__) && \ !defined(__arc__) && \ !defined(__xtensa__) /* * Due to conflicts with "compiler.h", don't rely on to declare * these. */ extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on); extern int iopl(int __level); #endif /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; } /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ #if defined(__powerpc__) volatile unsigned char *ioBase = NULL; #ifndef __NR_pciconfig_iobase #define __NR_pciconfig_iobase 200 #endif static Bool hwEnableIO(void) { int fd; unsigned int ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0); fd = open("/dev/mem", O_RDWR); if (ioBase == NULL) { ioBase = (volatile unsigned char *) mmap(0, 0x20000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, ioBase_phys); } close(fd); return ioBase != MAP_FAILED; } static void hwDisableIO(void) { munmap(ioBase, 0x20000); ioBase = NULL; } #elif defined(__i386__) || defined(__x86_64__) || defined(__ia64__) || \ defined(__alpha__) static Bool hwEnableIO(void) { short i; size_t n=0; int begin, end; char *buf=NULL, target[5]; FILE *fp; if (ioperm(0, 1024, 1)) { ErrorF("xf86EnableIO: failed to enable I/O ports 0000-03ff (%s)\n", strerror(errno)); return FALSE; } #if !defined(__alpha__) target[4] = '\0'; /* trap access to the keyboard controller(s) and timer chip(s) */ fp = fopen("/proc/ioports", "r"); while (getline(&buf, &n, fp) != -1) { if ((strstr(buf, "keyboard") != NULL) || (strstr(buf, "timer") != NULL)) { for (i=0; i<4; i++) target[i] = buf[i+2]; begin = atoi(target); for (i=0; i<4; i++) target[i] = buf[i+7]; end = atoi(target); ioperm(begin, end-begin+1, 0); } } free(buf); fclose(fp); #endif return TRUE; } static void hwDisableIO(void) { iopl(0); ioperm(0, 1024, 0); } #else /* non-IO architectures */ #define hwEnableIO() TRUE #define hwDisableIO() do {} while (0) #endif Bool xf86EnableIO(void) { if (ExtendedEnabled) return TRUE; ExtendedEnabled = hwEnableIO(); return ExtendedEnabled; } void xf86DisableIO(void) { if (!ExtendedEnabled) return; hwDisableIO(); ExtendedEnabled = FALSE; } xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_kmod.c0000644000175000017500000000566614757411105017026 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "xf86_OSlib.h" #include "xf86.h" #define MODPROBE_PATH_FILE "/proc/sys/kernel/modprobe" #define MAX_PATH 1024 #if 0 /* XFree86 #defines execl to be the xf86execl() function which does * a fork AND exec. We don't want that. We want the regular, * standard execl(). */ #ifdef execl #undef execl #endif #endif /* * Load a Linux kernel module. * This is used by the DRI/DRM to load a DRM kernel module when * the X server starts. It could be used for other purposes in the future. * Input: * modName - name of the kernel module (Ex: "tdfx") * Return: * 0 for failure, 1 for success */ int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; int fd = -1, status; pid_t pid; /* get the path to the modprobe program */ fd = open(MODPROBE_PATH_FILE, O_RDONLY); if (fd >= 0) { int count = read(fd, mpPath, MAX_PATH - 1); if (count <= 0) { mpPath[0] = 0; } else if (mpPath[count - 1] == '\n') { mpPath[count - 1] = 0; /* replaces \n with \0 */ } close(fd); /* if this worked, mpPath will be "/sbin/modprobe" or similar. */ } if (mpPath[0] == 0) { /* we failed to get the path from the system, use a default */ strcpy(mpPath, "/sbin/modprobe"); } /* now fork/exec the modprobe command */ /* * It would be good to capture stdout/stderr so that it can be directed * to the log file. modprobe errors currently are missing from the log * file. */ switch (pid = fork()) { case 0: /* child */ /* change real/effective user ID to 0/0 as we need to * preinstall agpgart module for some DRM modules */ if (setreuid(0, 0)) { xf86Msg(X_WARNING, "LoadKernelModule: " "Setting of real/effective user Id to 0/0 failed"); } setenv("PATH", "/sbin", 1); execl(mpPath, "modprobe", modName, NULL); xf86Msg(X_WARNING, "LoadKernelModule %s\n", strerror(errno)); exit(EXIT_FAILURE); /* if we get here the child's exec failed */ break; case -1: /* fork failed */ return 0; default: /* fork worked */ { /* XXX we loop over waitpid() because it sometimes fails on * the first attempt. Don't know why! */ int count = 0, p; do { p = waitpid(pid, &status, 0); } while (p == -1 && count++ < 4); if (p == -1) { return 0; } if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { return 1; /* success! */ } else { return 0; } } } /* never get here */ return 0; } xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_bell.c0000644000175000017500000000316614757411105017003 /* * Copyright © 2006 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSproc.h" void xf86OSRingBell(int loudness, int pitch, int duration) { if (xf86Info.consoleFd == -1 || !pitch || !loudness) return; ioctl(xf86Info.consoleFd, KDMKTONE, ((1193190 / pitch) & 0xffff) | (((unsigned long) duration * loudness / 50) << 16)); } xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_platform.c0000644000175000017500000001231614757411105017706 #ifdef HAVE_XORG_CONFIG_H #include #endif #ifdef XSERVER_PLATFORM_BUS #include #include #include #include #include /* Linux platform device support */ #include "xf86_OSproc.h" #include "xf86.h" #include "xf86platformBus.h" #include "xf86Bus.h" #include "hotplug.h" #include "systemd-logind.h" static Bool get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) { drmVersionPtr v; int fd; int err = 0; Bool paused, server_fd = FALSE; LogMessage(X_INFO, "Platform probe for %s\n", attribs->syspath); fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused); if (fd != -1) { if (paused) { LogMessage(X_ERROR, "Error systemd-logind returned paused fd for drm node\n"); systemd_logind_release_fd(attribs->major, attribs->minor, -1); return FALSE; } attribs->fd = fd; server_fd = TRUE; } if (fd == -1) fd = open(path, O_RDWR | O_CLOEXEC, 0); if (fd == -1) return FALSE; /* for a delayed probe we've already added the device */ if (delayed_index == -1) { xf86_add_platform_device(attribs, FALSE); delayed_index = xf86_num_platform_devices - 1; } if (server_fd) xf86_platform_devices[delayed_index].flags |= XF86_PDEV_SERVER_FD; v = drmGetVersion(fd); if (!v) { xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path); goto out; } xf86_platform_odev_attributes(delayed_index)->driver = XNFstrdup(v->name); drmFreeVersion(v); out: if (!server_fd) close(fd); return (err == 0); } Bool xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid) { const char *syspath = device->attribs->syspath; BusType bustype; const char *id; if (!syspath) return FALSE; bustype = StringToBusType(busid, &id); if (bustype == BUS_PCI) { struct pci_device *pPci = device->pdev; if (!pPci) return FALSE; if (xf86ComparePciBusString(busid, ((pPci->domain << 8) | pPci->bus), pPci->dev, pPci->func)) { return TRUE; } } else if (bustype == BUS_PLATFORM) { /* match on the minimum string */ int len = strlen(id); if (strlen(syspath) < strlen(id)) len = strlen(syspath); if (strncmp(id, syspath, len)) return FALSE; return TRUE; } else if (bustype == BUS_USB) { if (strcasecmp(busid, device->attribs->busid)) return FALSE; return TRUE; } return FALSE; } void xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs) { Bool ret; char *dpath = attribs->path; ret = get_drm_info(attribs, dpath, index); if (ret == FALSE) { xf86_remove_platform_device(index); return; } ret = xf86platformAddDevice(index); if (ret == -1) xf86_remove_platform_device(index); } void xf86PlatformDeviceProbe(struct OdevAttributes *attribs) { int i; char *path = attribs->path; Bool ret; if (!path) goto out_free; for (i = 0; i < xf86_num_platform_devices; i++) { char *dpath = xf86_platform_odev_attributes(i)->path; if (dpath && !strcmp(path, dpath)) break; } if (i != xf86_num_platform_devices) goto out_free; LogMessage(X_INFO, "xfree86: Adding drm device (%s)\n", path); if (!xf86VTOwner()) { /* if we don't currently own the VT then don't probe the device, just mark it as unowned for later use */ xf86_add_platform_device(attribs, TRUE); return; } ret = get_drm_info(attribs, path, -1); if (ret == FALSE) goto out_free; return; out_free: config_odev_free_attributes(attribs); } void NewGPUDeviceRequest(struct OdevAttributes *attribs) { int old_num = xf86_num_platform_devices; int ret; xf86PlatformDeviceProbe(attribs); if (old_num == xf86_num_platform_devices) return; if (xf86_get_platform_device_unowned(xf86_num_platform_devices - 1) == TRUE) return; ret = xf86platformAddDevice(xf86_num_platform_devices-1); if (ret == -1) xf86_remove_platform_device(xf86_num_platform_devices-1); ErrorF("xf86: found device %d\n", xf86_num_platform_devices); return; } void DeleteGPUDeviceRequest(struct OdevAttributes *attribs) { int index; char *syspath = attribs->syspath; if (!syspath) goto out; for (index = 0; index < xf86_num_platform_devices; index++) { char *dspath = xf86_platform_odev_attributes(index)->syspath; if (dspath && !strcmp(syspath, dspath)) break; } if (index == xf86_num_platform_devices) goto out; ErrorF("xf86: remove device %d %s\n", index, syspath); if (xf86_get_platform_device_unowned(index) == TRUE) xf86_remove_platform_device(index); else xf86platformRemoveDevice(index); out: config_odev_free_attributes(attribs); } #endif xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_acpi.c0000644000175000017500000001041414757411105016773 #ifdef HAVE_XORG_CONFIG_H #include "xorg-config.h" #endif #include "os.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" #include #include #include #include #include #include #include #define ACPI_SOCKET "/var/run/acpid.socket" #define ACPI_VIDEO_NOTIFY_SWITCH 0x80 #define ACPI_VIDEO_NOTIFY_PROBE 0x81 #define ACPI_VIDEO_NOTIFY_CYCLE 0x82 #define ACPI_VIDEO_NOTIFY_NEXT_OUTPUT 0x83 #define ACPI_VIDEO_NOTIFY_PREV_OUTPUT 0x84 #define ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS 0x85 #define ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS 0x86 #define ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS 0x87 #define ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS 0x88 #define ACPI_VIDEO_NOTIFY_DISPLAY_OFF 0x89 #define ACPI_VIDEO_HEAD_INVALID (~0u - 1) #define ACPI_VIDEO_HEAD_END (~0u) static void lnxCloseACPI(void); static void *ACPIihPtr = NULL; PMClose lnxACPIOpen(void); /* in milliseconds */ #define ACPI_REOPEN_DELAY 1000 static CARD32 lnxACPIReopen(OsTimerPtr timer, CARD32 time, void *arg) { if (lnxACPIOpen()) { TimerFree(timer); return 0; } return ACPI_REOPEN_DELAY; } #define LINE_LENGTH 80 static int lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) { char ev[LINE_LENGTH]; int n; memset(ev, 0, LINE_LENGTH); do { n = read(fd, ev, LINE_LENGTH); } while ((n == -1) && (errno == EAGAIN || errno == EINTR)); if (n <= 0) { lnxCloseACPI(); TimerSet(NULL, 0, ACPI_REOPEN_DELAY, lnxACPIReopen, NULL); return 0; } /* FIXME: this only processes the first read ACPI event & might break * with interrupted reads. */ /* Check that we have a video event */ if (!strncmp(ev, "video", 5)) { char *GFX = NULL; char *notify = NULL; char *data = NULL; /* doesn't appear to be used in the kernel */ unsigned long int notify_l; strtok(ev, " "); if (!(GFX = strtok(NULL, " "))) return 0; #if 0 ErrorF("GFX: %s\n", GFX); #endif if (!(notify = strtok(NULL, " "))) return 0; notify_l = strtoul(notify, NULL, 16); #if 0 ErrorF("notify: 0x%lx\n", notify_l); #endif if (!(data = strtok(NULL, " "))) return 0; #if 0 data_l = strtoul(data, NULL, 16); ErrorF("data: 0x%lx\n", data_l); #endif /* Differentiate between events */ switch (notify_l) { case ACPI_VIDEO_NOTIFY_SWITCH: case ACPI_VIDEO_NOTIFY_CYCLE: case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: case ACPI_VIDEO_NOTIFY_PREV_OUTPUT: events[0] = XF86_APM_CAPABILITY_CHANGED; return 1; case ACPI_VIDEO_NOTIFY_PROBE: return 0; default: return 0; } } return 0; } static pmWait lnxACPIConfirmEventToOs(int fd, pmEvent event) { /* No ability to send back to the kernel in ACPI */ switch (event) { default: return PM_NONE; } } PMClose lnxACPIOpen(void) { int fd; struct sockaddr_un addr; int r = -1; static int warned = 0; DebugF("ACPI: OSPMOpen called\n"); if (ACPIihPtr || !xf86Info.pmFlag) return NULL; DebugF("ACPI: Opening device\n"); if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) > -1) { memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strcpy(addr.sun_path, ACPI_SOCKET); if ((r = connect(fd, (struct sockaddr *) &addr, sizeof(addr))) == -1) { if (!warned) xf86MsgVerb(X_WARNING, 3, "Open ACPI failed (%s) (%s)\n", ACPI_SOCKET, strerror(errno)); warned = 1; shutdown(fd, 2); close(fd); return NULL; } } xf86PMGetEventFromOs = lnxACPIGetEventFromOs; xf86PMConfirmEventToOs = lnxACPIConfirmEventToOs; ACPIihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); xf86MsgVerb(X_INFO, 3, "Open ACPI successful (%s)\n", ACPI_SOCKET); warned = 0; return lnxCloseACPI; } static void lnxCloseACPI(void) { int fd; DebugF("ACPI: Closing device\n"); if (ACPIihPtr) { fd = xf86RemoveGeneralHandler(ACPIihPtr); shutdown(fd, 2); close(fd); ACPIihPtr = NULL; } } xorg-server-21.1.16/hw/xfree86/os-support/linux/lnx_apm.c0000644000175000017500000001160514757411105016637 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" #ifdef HAVE_ACPI extern PMClose lnxACPIOpen(void); #endif #ifdef HAVE_APM #include #include #include #include #include #include #include #define APM_PROC "/proc/apm" #define APM_DEVICE "/dev/apm_bios" #ifndef APM_STANDBY_FAILED #define APM_STANDBY_FAILED 0xf000 #endif #ifndef APM_SUSPEND_FAILED #define APM_SUSPEND_FAILED 0xf001 #endif static PMClose lnxAPMOpen(void); static void lnxCloseAPM(void); static void *APMihPtr = NULL; static struct { apm_event_t apmLinux; pmEvent xf86; } LinuxToXF86[] = { {APM_SYS_STANDBY, XF86_APM_SYS_STANDBY}, {APM_SYS_SUSPEND, XF86_APM_SYS_SUSPEND}, {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {APM_CRITICAL_RESUME, XF86_APM_CRITICAL_RESUME}, {APM_LOW_BATTERY, XF86_APM_LOW_BATTERY}, {APM_POWER_STATUS_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {APM_CRITICAL_SUSPEND, XF86_APM_CRITICAL_SUSPEND}, {APM_USER_STANDBY, XF86_APM_USER_STANDBY}, {APM_USER_SUSPEND, XF86_APM_USER_SUSPEND}, {APM_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #if defined(APM_CAPABILITY_CHANGED) {APM_CAPABILITY_CHANGED, XF86_CAPABILITY_CHANGED}, #endif #if 0 {APM_STANDBY_FAILED, XF86_APM_STANDBY_FAILED}, {APM_SUSPEND_FAILED, XF86_APM_SUSPEND_FAILED} #endif }; /* * APM is still under construction. * I'm not sure if the places where I initialize/deinitialize * apm is correct. Also I don't know what to do in SETUP state. * This depends if wakeup gets called in this situation, too. * Also we need to check if the action that is taken on an * event is reasonable. */ static int lnxPMGetEventFromOs(int fd, pmEvent * events, int num) { int i, j, n; apm_event_t linuxEvents[8]; if ((n = read(fd, linuxEvents, num * sizeof(apm_event_t))) == -1) return 0; n /= sizeof(apm_event_t); if (n > num) n = num; for (i = 0; i < n; i++) { for (j = 0; j < ARRAY_SIZE(LinuxToXF86); j++) if (LinuxToXF86[j].apmLinux == linuxEvents[i]) { events[i] = LinuxToXF86[j].xf86; break; } if (j == ARRAY_SIZE(LinuxToXF86)) events[i] = XF86_APM_UNKNOWN; } return n; } static pmWait lnxPMConfirmEventToOs(int fd, pmEvent event) { switch (event) { case XF86_APM_SYS_STANDBY: case XF86_APM_USER_STANDBY: if (ioctl(fd, APM_IOC_STANDBY, NULL)) return PM_FAILED; return PM_CONTINUE; case XF86_APM_SYS_SUSPEND: case XF86_APM_CRITICAL_SUSPEND: case XF86_APM_USER_SUSPEND: if (ioctl(fd, APM_IOC_SUSPEND, NULL)) { /* I believe this is wrong (EE) EBUSY is sent when a device refuses to be suspended. In this case we still need to undo everything we have done to suspend ourselves or we will stay in suspended state forever. */ if (errno == EBUSY) return PM_CONTINUE; else return PM_FAILED; } return PM_CONTINUE; case XF86_APM_STANDBY_RESUME: case XF86_APM_NORMAL_RESUME: case XF86_APM_CRITICAL_RESUME: case XF86_APM_STANDBY_FAILED: case XF86_APM_SUSPEND_FAILED: return PM_CONTINUE; default: return PM_NONE; } } #endif // HAVE_APM PMClose xf86OSPMOpen(void) { PMClose ret = NULL; #ifdef HAVE_ACPI /* Favour ACPI over APM, but only when enabled */ if (!xf86acpiDisableFlag) { ret = lnxACPIOpen(); if (ret) return ret; } #endif #ifdef HAVE_APM ret = lnxAPMOpen(); #endif return ret; } #ifdef HAVE_APM static PMClose lnxAPMOpen(void) { int fd, pfd; DebugF("APM: OSPMOpen called\n"); if (APMihPtr || !xf86Info.pmFlag) return NULL; DebugF("APM: Opening device\n"); if ((fd = open(APM_DEVICE, O_RDWR)) > -1) { if (access(APM_PROC, R_OK) || ((pfd = open(APM_PROC, O_RDONLY)) == -1)) { xf86MsgVerb(X_WARNING, 3, "Cannot open APM (%s) (%s)\n", APM_PROC, strerror(errno)); close(fd); return NULL; } else close(pfd); xf86PMGetEventFromOs = lnxPMGetEventFromOs; xf86PMConfirmEventToOs = lnxPMConfirmEventToOs; APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); xf86MsgVerb(X_INFO, 3, "Open APM successful\n"); return lnxCloseAPM; } return NULL; } static void lnxCloseAPM(void) { int fd; DebugF("APM: Closing device\n"); if (APMihPtr) { fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } } #endif // HAVE_APM xorg-server-21.1.16/hw/xfree86/os-support/linux/systemd-logind.c0000644000175000017500000004764114757411105020154 /* * Copyright © 2013 Red Hat Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Hans de Goede */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "os.h" #include "dbus-core.h" #include "linux.h" #include "xf86.h" #include "xf86platformBus.h" #include "xf86Xinput.h" #include "xf86Priv.h" #include "globals.h" #include "systemd-logind.h" struct systemd_logind_info { DBusConnection *conn; char *session; Bool active; Bool vt_active; }; static struct systemd_logind_info logind_info; static InputInfoPtr systemd_logind_find_info_ptr_by_devnum(InputInfoPtr start, int major, int minor) { InputInfoPtr pInfo; for (pInfo = start; pInfo; pInfo = pInfo->next) if (pInfo->major == major && pInfo->minor == minor && (pInfo->flags & XI86_SERVER_FD)) return pInfo; return NULL; } static void systemd_logind_set_input_fd_for_all_devs(int major, int minor, int fd, Bool enable) { InputInfoPtr pInfo; pInfo = systemd_logind_find_info_ptr_by_devnum(xf86InputDevs, major, minor); while (pInfo) { pInfo->fd = fd; pInfo->options = xf86ReplaceIntOption(pInfo->options, "fd", fd); if (enable) xf86EnableInputDeviceForVTSwitch(pInfo); pInfo = systemd_logind_find_info_ptr_by_devnum(pInfo->next, major, minor); } } int systemd_logind_take_fd(int _major, int _minor, const char *path, Bool *paused_ret) { struct systemd_logind_info *info = &logind_info; InputInfoPtr pInfo; DBusError error; DBusMessage *msg = NULL; DBusMessage *reply = NULL; dbus_int32_t major = _major; dbus_int32_t minor = _minor; dbus_bool_t paused; int fd = -1; if (!info->session || major == 0) return -1; /* logind does not support mouse devs (with evdev we don't need them) */ if (strstr(path, "mouse")) return -1; /* Check if we already have an InputInfo entry with this major, minor * (shared device-nodes happen ie with Wacom tablets). */ pInfo = systemd_logind_find_info_ptr_by_devnum(xf86InputDevs, major, minor); if (pInfo) { LogMessage(X_INFO, "systemd-logind: returning pre-existing fd for %s %u:%u\n", path, major, minor); *paused_ret = FALSE; return pInfo->fd; } dbus_error_init(&error); msg = dbus_message_new_method_call("org.freedesktop.login1", info->session, "org.freedesktop.login1.Session", "TakeDevice"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } if (!dbus_message_append_args(msg, DBUS_TYPE_UINT32, &major, DBUS_TYPE_UINT32, &minor, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(info->conn, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) { LogMessage(X_ERROR, "systemd-logind: failed to take device %s: %s\n", path, error.message); goto cleanup; } if (!dbus_message_get_args(reply, &error, DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_BOOLEAN, &paused, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: TakeDevice %s: %s\n", path, error.message); goto cleanup; } *paused_ret = paused; LogMessage(X_INFO, "systemd-logind: got fd for %s %u:%u fd %d paused %d\n", path, major, minor, fd, paused); cleanup: if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); dbus_error_free(&error); return fd; } void systemd_logind_release_fd(int _major, int _minor, int fd) { struct systemd_logind_info *info = &logind_info; InputInfoPtr pInfo; DBusError error; DBusMessage *msg = NULL; DBusMessage *reply = NULL; dbus_int32_t major = _major; dbus_int32_t minor = _minor; int matches = 0; if (!info->session || major == 0) goto close; /* Only release the fd if there is only 1 InputInfo left for this major * and minor, otherwise other InputInfo's are still referencing the fd. */ pInfo = systemd_logind_find_info_ptr_by_devnum(xf86InputDevs, major, minor); while (pInfo) { matches++; pInfo = systemd_logind_find_info_ptr_by_devnum(pInfo->next, major, minor); } if (matches > 1) { LogMessage(X_INFO, "systemd-logind: not releasing fd for %u:%u, still in use\n", major, minor); return; } LogMessage(X_INFO, "systemd-logind: releasing fd for %u:%u\n", major, minor); dbus_error_init(&error); msg = dbus_message_new_method_call("org.freedesktop.login1", info->session, "org.freedesktop.login1.Session", "ReleaseDevice"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } if (!dbus_message_append_args(msg, DBUS_TYPE_UINT32, &major, DBUS_TYPE_UINT32, &minor, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(info->conn, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) LogMessage(X_ERROR, "systemd-logind: failed to release device: %s\n", error.message); cleanup: if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); dbus_error_free(&error); close: if (fd != -1) close(fd); } int systemd_logind_controls_session(void) { return logind_info.session ? 1 : 0; } void systemd_logind_vtenter(void) { struct systemd_logind_info *info = &logind_info; InputInfoPtr pInfo; int i; if (!info->session) return; /* Not using systemd-logind */ if (!info->active) return; /* Session not active */ if (info->vt_active) return; /* Already did vtenter */ for (i = 0; i < xf86_num_platform_devices; i++) { if (xf86_platform_devices[i].flags & XF86_PDEV_PAUSED) break; } if (i != xf86_num_platform_devices) return; /* Some drm nodes are still paused wait for resume */ xf86VTEnter(); info->vt_active = TRUE; /* Activate any input devices which were resumed before the drm nodes */ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) if ((pInfo->flags & XI86_SERVER_FD) && pInfo->fd != -1) xf86EnableInputDeviceForVTSwitch(pInfo); /* Do delayed input probing, this must be done after the above enabling */ xf86InputEnableVTProbe(); } static void systemd_logind_ack_pause(struct systemd_logind_info *info, dbus_int32_t minor, dbus_int32_t major) { DBusError error; DBusMessage *msg = NULL; DBusMessage *reply = NULL; dbus_error_init(&error); msg = dbus_message_new_method_call("org.freedesktop.login1", info->session, "org.freedesktop.login1.Session", "PauseDeviceComplete"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } if (!dbus_message_append_args(msg, DBUS_TYPE_UINT32, &major, DBUS_TYPE_UINT32, &minor, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(info->conn, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) LogMessage(X_ERROR, "systemd-logind: failed to ack pause: %s\n", error.message); cleanup: if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); dbus_error_free(&error); } /* * Send a message to logind, to pause the drm device * and ensure the drm_drop_master is done before * VT_RELDISP when switching VT */ void systemd_logind_drop_master(void) { int i; for (i = 0; i < xf86_num_platform_devices; i++) { if (xf86_platform_devices[i].flags & XF86_PDEV_SERVER_FD) { dbus_int32_t major, minor; struct systemd_logind_info *info = &logind_info; xf86_platform_devices[i].flags |= XF86_PDEV_PAUSED; major = xf86_platform_odev_attributes(i)->major; minor = xf86_platform_odev_attributes(i)->minor; systemd_logind_ack_pause(info, minor, major); } } } static Bool are_platform_devices_resumed(void) { int i; for (i = 0; i < xf86_num_platform_devices; i++) { if (xf86_platform_devices[i].flags & XF86_PDEV_PAUSED) { return FALSE; } } return TRUE; } static DBusHandlerResult message_filter(DBusConnection * connection, DBusMessage * message, void *data) { struct systemd_logind_info *info = data; struct xf86_platform_device *pdev = NULL; InputInfoPtr pInfo = NULL; int ack = 0, pause = 0, fd = -1; DBusError error; dbus_int32_t major, minor; char *pause_str; if (strcmp(dbus_message_get_path(message), info->session) != 0) return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; dbus_error_init(&error); if (dbus_message_is_signal(message, "org.freedesktop.login1.Session", "PauseDevice")) { if (!dbus_message_get_args(message, &error, DBUS_TYPE_UINT32, &major, DBUS_TYPE_UINT32, &minor, DBUS_TYPE_STRING, &pause_str, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: PauseDevice: %s\n", error.message); dbus_error_free(&error); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } if (strcmp(pause_str, "pause") == 0) { pause = 1; ack = 1; } else if (strcmp(pause_str, "force") == 0) { pause = 1; } else if (strcmp(pause_str, "gone") == 0) { /* Device removal is handled through udev */ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } else { LogMessage(X_WARNING, "systemd-logind: unknown pause type: %s\n", pause_str); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } } else if (dbus_message_is_signal(message, "org.freedesktop.login1.Session", "ResumeDevice")) { if (!dbus_message_get_args(message, &error, DBUS_TYPE_UINT32, &major, DBUS_TYPE_UINT32, &minor, DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: ResumeDevice: %s\n", error.message); dbus_error_free(&error); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } } else return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; LogMessage(X_INFO, "systemd-logind: got %s for %u:%u\n", pause ? "pause" : "resume", major, minor); pdev = xf86_find_platform_device_by_devnum(major, minor); if (!pdev) pInfo = systemd_logind_find_info_ptr_by_devnum(xf86InputDevs, major, minor); if (!pdev && !pInfo) { LogMessage(X_WARNING, "systemd-logind: could not find dev %u:%u\n", major, minor); return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } if (pause) { /* Our VT_PROCESS usage guarantees we've already given up the vt */ info->active = info->vt_active = FALSE; /* Note the actual vtleave has already been handled by xf86Events.c */ if (pdev) pdev->flags |= XF86_PDEV_PAUSED; else { close(pInfo->fd); systemd_logind_set_input_fd_for_all_devs(major, minor, -1, FALSE); } if (ack) systemd_logind_ack_pause(info, major, minor); } else { /* info->vt_active gets set by systemd_logind_vtenter() */ info->active = TRUE; if (pdev) { pdev->flags &= ~XF86_PDEV_PAUSED; } else systemd_logind_set_input_fd_for_all_devs(major, minor, fd, info->vt_active); /* Call vtenter if all platform devices are resumed, or if there are no platform device */ if (are_platform_devices_resumed()) systemd_logind_vtenter(); } return DBUS_HANDLER_RESULT_HANDLED; } static void connect_hook(DBusConnection *connection, void *data) { struct systemd_logind_info *info = data; DBusError error; DBusMessage *msg = NULL; DBusMessage *reply = NULL; dbus_int32_t arg; char *session = NULL; dbus_error_init(&error); msg = dbus_message_new_method_call("org.freedesktop.login1", "/org/freedesktop/login1", "org.freedesktop.login1.Manager", "GetSessionByPID"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } arg = getpid(); if (!dbus_message_append_args(msg, DBUS_TYPE_UINT32, &arg, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(connection, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) { LogMessage(X_ERROR, "systemd-logind: failed to get session: %s\n", error.message); goto cleanup; } dbus_message_unref(msg); if (!dbus_message_get_args(reply, &error, DBUS_TYPE_OBJECT_PATH, &session, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: GetSessionByPID: %s\n", error.message); goto cleanup; } session = XNFstrdup(session); dbus_message_unref(reply); reply = NULL; msg = dbus_message_new_method_call("org.freedesktop.login1", session, "org.freedesktop.login1.Session", "TakeControl"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } arg = FALSE; /* Don't forcibly take over over the session */ if (!dbus_message_append_args(msg, DBUS_TYPE_BOOLEAN, &arg, DBUS_TYPE_INVALID)) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(connection, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) { LogMessage(X_ERROR, "systemd-logind: TakeControl failed: %s\n", error.message); goto cleanup; } dbus_bus_add_match(connection, "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.login1.Session',member='PauseDevice'", &error); if (dbus_error_is_set(&error)) { LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n", error.message); goto cleanup; } dbus_bus_add_match(connection, "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.login1.Session',member='ResumeDevice'", &error); if (dbus_error_is_set(&error)) { LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n", error.message); goto cleanup; } /* * HdG: This is not useful with systemd <= 208 since the signal only * contains invalidated property names there, rather than property, val * pairs as it should. Instead we just use the first resume / pause now. */ #if 0 snprintf(match, sizeof(match), "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.DBus.Properties',member='PropertiesChanged',path='%s'", session); dbus_bus_add_match(connection, match, &error); if (dbus_error_is_set(&error)) { LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n", error.message); goto cleanup; } #endif if (!dbus_connection_add_filter(connection, message_filter, info, NULL)) { LogMessage(X_ERROR, "systemd-logind: could not add filter: %s\n", error.message); goto cleanup; } LogMessage(X_INFO, "systemd-logind: took control of session %s\n", session); info->conn = connection; info->session = session; info->vt_active = info->active = TRUE; /* The server owns the vt during init */ session = NULL; cleanup: free(session); if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); dbus_error_free(&error); } static void systemd_logind_release_control(struct systemd_logind_info *info) { DBusError error; DBusMessage *msg = NULL; DBusMessage *reply = NULL; dbus_error_init(&error); msg = dbus_message_new_method_call("org.freedesktop.login1", info->session, "org.freedesktop.login1.Session", "ReleaseControl"); if (!msg) { LogMessage(X_ERROR, "systemd-logind: out of memory\n"); goto cleanup; } reply = dbus_connection_send_with_reply_and_block(info->conn, msg, DBUS_TIMEOUT_USE_DEFAULT, &error); if (!reply) { LogMessage(X_ERROR, "systemd-logind: ReleaseControl failed: %s\n", error.message); goto cleanup; } cleanup: if (msg) dbus_message_unref(msg); if (reply) dbus_message_unref(reply); dbus_error_free(&error); } static void disconnect_hook(void *data) { struct systemd_logind_info *info = data; free(info->session); info->session = NULL; info->conn = NULL; } static struct dbus_core_hook core_hook = { .connect = connect_hook, .disconnect = disconnect_hook, .data = &logind_info, }; int systemd_logind_init(void) { if (!ServerIsNotSeat0() && xf86HasTTYs() && linux_parse_vt_settings(TRUE) && !linux_get_keeptty()) { LogMessage(X_INFO, "systemd-logind: logind integration requires -keeptty and " "-keeptty was not provided, disabling logind integration\n"); return 1; } return dbus_core_add_hook(&core_hook); } void systemd_logind_fini(void) { if (logind_info.session) systemd_logind_release_control(&logind_info); dbus_core_remove_hook(&core_hook); } xorg-server-21.1.16/hw/xfree86/os-support/Makefile.am0000644000175000017500000000114214757411105015725 SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS) DIST_SUBDIRS = bsd bus misc linux solaris stub hurd sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h EXTRA_DIST = int10Defines.h xf86OSpriv.h # to get the grouping semantics right, you have to glom these three together # as one library, otherwise libtool will actively defeat your attempts to # list them multiple times on the link line. noinst_LTLIBRARIES = libxorgos.la libxorgos_la_SOURCES = libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \ bus/libbus.la \ misc/libmisc.la AM_CFLAGS = $(DIX_CFLAGS) xorg-server-21.1.16/hw/xfree86/os-support/xf86_OSproc.h0000644000175000017500000002101014757411105016116 /* * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany * Copyright 1992 by David Dawes * Copyright 1992 by Jim Tsillas * Copyright 1992 by Rich Murphey * Copyright 1992 by Robert Baron * Copyright 1992 by Orest Zborowski * Copyright 1993 by Vrije Universiteit, The Netherlands * Copyright 1993 by David Wexelblat * Copyright 1994, 1996 by Holger Veit * Copyright 1994-2003 by The XFree86 Project, Inc * * 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 names of the above listed copyright holders * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holders make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS 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. * */ /* * The ARM32 code here carries the following copyright: * * Copyright 1997 * Digital Equipment Corporation. All rights reserved. * This software is furnished under license and may be used and copied only in * accordance with the following terms and conditions. Subject to these * conditions, you may download, copy, install, use, modify and distribute * this software in source and/or binary form. No title or ownership is * transferred hereby. * * 1) Any source code used, modified or distributed must reproduce and retain * this copyright notice and list of conditions as they appear in the * source file. * * 2) No right is granted to use any trade name, trademark, or logo of Digital * Equipment Corporation. Neither the "Digital Equipment Corporation" * name nor any trademark or logo of Digital Equipment Corporation may be * used to endorse or promote products derived from this software without * the prior written permission of Digital Equipment Corporation. * * 3) This software is provided "AS-IS" and any express or implied warranties, * including but not limited to, any implied warranties of merchantability, * fitness for a particular purpose, or non-infringement are disclaimed. * In no event shall DIGITAL be liable for any damages whatsoever, and in * particular, DIGITAL shall not be liable for special, indirect, * consequential, or incidental damages or damages for lost profits, loss * of revenue or loss of use, whether such damages arise in contract, * negligence, tort, under statute, in equity, at law or otherwise, even * if advised of the possibility of such damage. * */ #ifndef _XF86_OSPROC_H #define _XF86_OSPROC_H /* * The actual prototypes have been pulled into this separate file so * that they can can be used without pulling in all of the OS specific * stuff like sys/stat.h, etc. that causes problems for loadable modules. */ /* * OS-independent modem state flags for xf86SetSerialModemState() and * xf86GetSerialModemState(). */ #define XF86_M_LE 0x001 /* line enable */ #define XF86_M_DTR 0x002 /* data terminal ready */ #define XF86_M_RTS 0x004 /* request to send */ #define XF86_M_ST 0x008 /* secondary transmit */ #define XF86_M_SR 0x010 /* secondary receive */ #define XF86_M_CTS 0x020 /* clear to send */ #define XF86_M_CAR 0x040 /* carrier detect */ #define XF86_M_RNG 0x080 /* ring */ #define XF86_M_DSR 0x100 /* data set ready */ #ifndef NO_OSLIB_PROTOTYPES /* * This is to prevent re-entrancy to FatalError() when aborting. * Anything that can be called as a result of ddxGiveUp() should use this * instead of FatalError(). */ #define xf86FatalError(a, b) \ if (dispatchException & DE_TERMINATE) { \ ErrorF(a, b); \ ErrorF("\n"); \ return; \ } else FatalError(a, b) /***************************************************************************/ /* Prototypes */ /***************************************************************************/ #include #include "opaque.h" #include "xf86Optionstr.h" _XFUNCPROTOBEGIN /* public functions */ extern _X_EXPORT Bool xf86EnableIO(void); extern _X_EXPORT void xf86DisableIO(void); #ifdef __NetBSD__ extern _X_EXPORT void xf86SetTVOut(int); extern _X_EXPORT void xf86SetRGBOut(void); #endif extern _X_EXPORT void xf86OSRingBell(int, int, int); extern _X_EXPORT void xf86SetReallySlowBcopy(void); extern _X_EXPORT void xf86SlowBcopy(unsigned char *, unsigned char *, int); extern _X_EXPORT int xf86OpenSerial(XF86OptionPtr options); extern _X_EXPORT int xf86SetSerial(int fd, XF86OptionPtr options); extern _X_EXPORT int xf86SetSerialSpeed(int fd, int speed); extern _X_EXPORT int xf86ReadSerial(int fd, void *buf, int count); extern _X_EXPORT int xf86WriteSerial(int fd, const void *buf, int count); extern _X_EXPORT int xf86CloseSerial(int fd); extern _X_EXPORT int xf86FlushInput(int fd); extern _X_EXPORT int xf86WaitForInput(int fd, int timeout); extern _X_EXPORT int xf86SerialSendBreak(int fd, int duration); extern _X_EXPORT int xf86SetSerialModemState(int fd, int state); extern _X_EXPORT int xf86GetSerialModemState(int fd); extern _X_EXPORT int xf86SerialModemSetBits(int fd, int bits); extern _X_EXPORT int xf86SerialModemClearBits(int fd, int bits); extern _X_EXPORT int xf86LoadKernelModule(const char *pathname); extern _X_EXPORT void xf86OSInputThreadInit(void); /* AGP GART interface */ typedef struct _AgpInfo { CARD32 bridgeId; CARD32 agpMode; unsigned long base; unsigned long size; unsigned long totalPages; unsigned long systemPages; unsigned long usedPages; } AgpInfo, *AgpInfoPtr; extern _X_EXPORT Bool xf86AgpGARTSupported(void); extern _X_EXPORT AgpInfoPtr xf86GetAGPInfo(int screenNum); extern _X_EXPORT Bool xf86AcquireGART(int screenNum); extern _X_EXPORT Bool xf86ReleaseGART(int screenNum); extern _X_EXPORT int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical); extern _X_EXPORT Bool xf86DeallocateGARTMemory(int screenNum, int key); extern _X_EXPORT Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset); extern _X_EXPORT Bool xf86UnbindGARTMemory(int screenNum, int key); extern _X_EXPORT Bool xf86EnableAGP(int screenNum, CARD32 mode); extern _X_EXPORT Bool xf86GARTCloseScreen(int screenNum); /* These routines are in shared/sigio.c and are not loaded as part of the module. These routines are small, and the code if very POSIX-signal (or OS-signal) specific, so it seemed better to provide more complex wrappers than to wrap each individual function called. */ extern _X_EXPORT int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *); extern _X_EXPORT int xf86RemoveSIGIOHandler(int fd); #ifdef XF86_OS_PRIVS typedef void (*PMClose) (void); extern _X_EXPORT void xf86OpenConsole(void); extern _X_EXPORT void xf86CloseConsole(void); extern _X_HIDDEN Bool xf86VTActivate(int vtno); extern _X_EXPORT Bool xf86VTSwitchPending(void); extern _X_EXPORT Bool xf86VTSwitchAway(void); extern _X_EXPORT Bool xf86VTSwitchTo(void); extern _X_EXPORT void xf86VTRequest(int sig); extern _X_EXPORT int xf86ProcessArgument(int, char **, int); extern _X_EXPORT void xf86UseMsg(void); extern _X_EXPORT PMClose xf86OSPMOpen(void); extern _X_EXPORT void xf86InitVidMem(void); #endif /* XF86_OS_PRIVS */ #ifdef XSERVER_PLATFORM_BUS #include "hotplug.h" void xf86PlatformDeviceProbe(struct OdevAttributes *attribs); void xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs); #endif _XFUNCPROTOEND #endif /* NO_OSLIB_PROTOTYPES */ #endif /* _XF86_OSPROC_H */ xorg-server-21.1.16/hw/xfree86/os-support/xf86_OSlib.h0000644000175000017500000002676314757411105015745 /* * Copyright 1990, 1991 by Thomas Roell, Dinkelscherben, Germany * Copyright 1992 by David Dawes * Copyright 1992 by Jim Tsillas * Copyright 1992 by Rich Murphey * Copyright 1992 by Robert Baron * Copyright 1992 by Orest Zborowski * Copyright 1993 by Vrije Universiteit, The Netherlands * Copyright 1993 by David Wexelblat * Copyright 1994, 1996 by Holger Veit * Copyright 1997 by Takis Psarogiannakopoulos * Copyright 1994-2003 by The XFree86 Project, Inc * * 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 names of the above listed copyright holders * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holders make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS 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. * */ /* * The ARM32 code here carries the following copyright: * * Copyright 1997 * Digital Equipment Corporation. All rights reserved. * This software is furnished under license and may be used and copied only in * accordance with the following terms and conditions. Subject to these * conditions, you may download, copy, install, use, modify and distribute * this software in source and/or binary form. No title or ownership is * transferred hereby. * * 1) Any source code used, modified or distributed must reproduce and retain * this copyright notice and list of conditions as they appear in the * source file. * * 2) No right is granted to use any trade name, trademark, or logo of Digital * Equipment Corporation. Neither the "Digital Equipment Corporation" * name nor any trademark or logo of Digital Equipment Corporation may be * used to endorse or promote products derived from this software without * the prior written permission of Digital Equipment Corporation. * * 3) This software is provided "AS-IS" and any express or implied warranties, * including but not limited to, any implied warranties of merchantability, * fitness for a particular purpose, or non-infringement are disclaimed. * In no event shall DIGITAL be liable for any damages whatsoever, and in * particular, DIGITAL shall not be liable for special, indirect, * consequential, or incidental damages or damages for lost profits, loss * of revenue or loss of use, whether such damages arise in contract, * negligence, tort, under statute, in equity, at law or otherwise, even * if advised of the possibility of such damage. * */ /* * This is private, and should not be included by any drivers. Drivers * may include xf86_OSproc.h to get prototypes for public interfaces. */ #ifndef _XF86_OSLIB_H #define _XF86_OSLIB_H #include #include #include #include #include /**************************************************************************/ /* SYSV386 (SVR3, SVR4), including Solaris */ /**************************************************************************/ #if (defined(SYSV) || defined(SVR4)) && \ (defined(__sun) || defined(__i386__)) #include #include #include #include #include #include #if defined(_NEED_SYSI86) #if !(defined (__sun) && defined (SVR4)) #include #include #include #endif #include #include #if defined(SVR4) && !defined(__sun) #include #endif /* SVR4 && !__sun */ /* V86SC_IOPL was moved to on Solaris 7 and later */ #if !defined(V86SC_IOPL) /* Solaris 7 or later? */ #include /* Nope */ #endif #if defined(__sun) && (defined (__i386__) || defined(__i386) || defined(__x86)) && defined (SVR4) #include #endif #endif /* _NEED_SYSI86 */ #if defined(HAS_SVR3_MMAPDRV) #include #if !defined(_NEED_SYSI86) #include #include #endif #include /* MMAP driver header */ #endif #if !defined(__sun) || defined(HAVE_SYS_VT_H) #define HAS_USL_VTS #endif #if !defined(__sun) #include #endif #if defined(HAS_USL_VTS) #if !defined(__sun) #include #endif #include #include extern _X_HIDDEN void xf86VTAcquire(int); extern _X_HIDDEN void xf86VTRelease(int); #endif #if defined(__sun) #include extern _X_HIDDEN char xf86SolarisFbDev[PATH_MAX]; #include #include /* undefine symbols from we don't need that conflict with enum definitions in parser/xf86tokens.h */ #undef STRING #undef LEFTALT #undef RIGHTALT #define LED_CAP LED_CAPS_LOCK #define LED_NUM LED_NUM_LOCK #define LED_SCR LED_SCROLL_LOCK #define LED_COMP LED_COMPOSE #endif /* __sun */ #if !defined(VT_ACKACQ) #define VT_ACKACQ 2 #endif /* !VT_ACKACQ */ #if defined(SVR4) #include #if !(defined(__sun) && defined (SVR4)) #define DEV_MEM "/dev/pmem" #endif #define CLEARDTR_SUPPORT #define POSIX_TTY #endif /* SVR4 */ #endif /* (SYSV || SVR4) */ /**************************************************************************/ /* Linux or Glibc-based system */ /**************************************************************************/ #if defined(__linux__) || defined(__GLIBC__) || defined(__CYGWIN__) #include #include #include #include #include #include #ifdef __sparc__ #include #endif #include #include #include #ifdef __linux__ #define HAS_USL_VTS #include #include #define LDGMAP GIO_SCRNMAP #define LDSMAP PIO_SCRNMAP #define LDNMAP LDSMAP #define CLEARDTR_SUPPORT #endif #define POSIX_TTY #endif /* __linux__ || __GLIBC__ */ /**************************************************************************/ /* System is BSD-like */ /**************************************************************************/ #ifdef CSRG_BASED #include #include #include #define termio termios #define POSIX_TTY #include #include #include #include #endif /* CSRG_BASED */ /**************************************************************************/ /* Kernel of *BSD */ /**************************************************************************/ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include #if defined(__FreeBSD_version) && !defined(__FreeBSD_kernel_version) #define __FreeBSD_kernel_version __FreeBSD_version #endif #ifdef SYSCONS_SUPPORT #define COMPAT_SYSCONS #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #if defined(__DragonFly__) || (__FreeBSD_kernel_version >= 410000) #include #include #else #include #endif /* FreeBSD 4.1 RELEASE or lator */ #else #include #endif #endif /* SYSCONS_SUPPORT */ #if defined(PCVT_SUPPORT) && !defined(__NetBSD__) && !defined(__OpenBSD__) #if !defined(SYSCONS_SUPPORT) /* no syscons, so include pcvt specific header file */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #else #include #endif /* __FreeBSD_kernel__ */ #else /* pcvt and syscons: hard-code the ID magic */ #define VGAPCVTID _IOWR('V',113, struct pcvtid) struct pcvtid { char name[16]; int rmajor, rminor; }; #endif /* PCVT_SUPPORT && SYSCONS_SUPPORT */ #endif /* PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT #include #include #endif /* WSCONS_SUPPORT */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #include #endif /* Include these definitions in case ioctl_pc.h didn't get included */ #ifndef CONSOLE_X_MODE_ON #define CONSOLE_X_MODE_ON _IO('t',121) #endif #ifndef CONSOLE_X_MODE_OFF #define CONSOLE_X_MODE_OFF _IO('t',122) #endif #ifndef CONSOLE_X_BELL #define CONSOLE_X_BELL _IOW('t',123,int[2]) #endif #ifndef CONSOLE_X_TV_ON #define CONSOLE_X_TV_ON _IOW('t',155,int) #define XMODE_RGB 0 #define XMODE_NTSC 1 #define XMODE_PAL 2 #define XMODE_SECAM 3 #endif #ifndef CONSOLE_X_TV_OFF #define CONSOLE_X_TV_OFF _IO('t',156) #endif #ifndef CONSOLE_GET_LINEAR_INFO #define CONSOLE_GET_LINEAR_INFO _IOR('t',157,struct map_info) #endif #ifndef CONSOLE_GET_IO_INFO #define CONSOLE_GET_IO_INFO _IOR('t',158,struct map_info) #endif #ifndef CONSOLE_GET_MEM_INFO #define CONSOLE_GET_MEM_INFO _IOR('t',159,struct map_info) #endif #if defined(USE_I386_IOPL) || defined(USE_AMD64_IOPL) #include #endif #define CLEARDTR_SUPPORT #endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __DragonFly__ */ /**************************************************************************/ /* IRIX */ /**************************************************************************/ /**************************************************************************/ /* Generic */ /**************************************************************************/ #include /* May need to adjust this for other OSs */ /* For PATH_MAX */ #include "misc.h" /* * Hack originally for ISC 2.2 POSIX headers, but may apply elsewhere, * and it's safe, so just do it. */ #if !defined(O_NDELAY) && defined(O_NONBLOCK) #define O_NDELAY O_NONBLOCK #endif /* !O_NDELAY && O_NONBLOCK */ #if !defined(MAXHOSTNAMELEN) #define MAXHOSTNAMELEN 32 #endif /* !MAXHOSTNAMELEN */ #include #ifndef DEV_MEM #define DEV_MEM "/dev/mem" #endif #ifndef MAP_FAILED #define MAP_FAILED ((void *)-1) #endif #define SYSCALL(call) while(((call) == -1) && (errno == EINTR)) #define XF86_OS_PRIVS #include "xf86_OSproc.h" #endif /* _XF86_OSLIB_H */ xorg-server-21.1.16/hw/xfree86/os-support/Makefile.in0000644000175000017500000007312714757411115015753 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxorgos_la_DEPENDENCIES = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \ bus/libbus.la misc/libmisc.la am_libxorgos_la_OBJECTS = libxorgos_la_OBJECTS = $(am_libxorgos_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxorgos_la_SOURCES) DIST_SOURCES = $(libxorgos_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = bus @XORG_OS_SUBDIR@ misc $(DRI_SUBDIRS) DIST_SUBDIRS = bsd bus misc linux solaris stub hurd sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h EXTRA_DIST = int10Defines.h xf86OSpriv.h # to get the grouping semantics right, you have to glom these three together # as one library, otherwise libtool will actively defeat your attempts to # list them multiple times on the link line. noinst_LTLIBRARIES = libxorgos.la libxorgos_la_SOURCES = libxorgos_la_LIBADD = @XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.la \ bus/libbus.la \ misc/libmisc.la AM_CFLAGS = $(DIX_CFLAGS) all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxorgos.la: $(libxorgos_la_OBJECTS) $(libxorgos_la_DEPENDENCIES) $(EXTRA_libxorgos_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxorgos_la_OBJECTS) $(libxorgos_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-sdkHEADERS install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/int10Defines.h0000644000175000017500000000552414757411105016303 /* * Copyright (c) 2000-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _INT10DEFINES_H_ #define _INT10DEFINES_H_ 1 #ifdef _VM86_LINUX #include #define CPU_R(type,name,num) \ (((type *)&(((struct vm86_struct *)REG->cpuRegs)->regs.name))[num]) #define CPU_RD(name,num) CPU_R(CARD32,name,num) #define CPU_RW(name,num) CPU_R(CARD16,name,num) #define CPU_RB(name,num) CPU_R(CARD8,name,num) #define X86_EAX CPU_RD(eax,0) #define X86_EBX CPU_RD(ebx,0) #define X86_ECX CPU_RD(ecx,0) #define X86_EDX CPU_RD(edx,0) #define X86_ESI CPU_RD(esi,0) #define X86_EDI CPU_RD(edi,0) #define X86_EBP CPU_RD(ebp,0) #define X86_EIP CPU_RD(eip,0) #define X86_ESP CPU_RD(esp,0) #define X86_EFLAGS CPU_RD(eflags,0) #define X86_FLAGS CPU_RW(eflags,0) #define X86_AX CPU_RW(eax,0) #define X86_BX CPU_RW(ebx,0) #define X86_CX CPU_RW(ecx,0) #define X86_DX CPU_RW(edx,0) #define X86_SI CPU_RW(esi,0) #define X86_DI CPU_RW(edi,0) #define X86_BP CPU_RW(ebp,0) #define X86_IP CPU_RW(eip,0) #define X86_SP CPU_RW(esp,0) #define X86_CS CPU_RW(cs,0) #define X86_DS CPU_RW(ds,0) #define X86_ES CPU_RW(es,0) #define X86_SS CPU_RW(ss,0) #define X86_FS CPU_RW(fs,0) #define X86_GS CPU_RW(gs,0) #define X86_AL CPU_RB(eax,0) #define X86_BL CPU_RB(ebx,0) #define X86_CL CPU_RB(ecx,0) #define X86_DL CPU_RB(edx,0) #define X86_AH CPU_RB(eax,1) #define X86_BH CPU_RB(ebx,1) #define X86_CH CPU_RB(ecx,1) #define X86_DH CPU_RB(edx,1) #elif defined(_X86EMU) #include "xf86x86emu.h" #endif #endif xorg-server-21.1.16/hw/xfree86/os-support/xf86OSpriv.h0000644000175000017500000000324014757411105016001 /* * Copyright (c) 1999-2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _XF86OSPRIV_H #define _XF86OSPRIV_H typedef struct { Bool initialised; } VidMemInfo, *VidMemInfoPtr; void xf86OSInitVidMem(VidMemInfoPtr); #endif /* _XF86OSPRIV_H */ xorg-server-21.1.16/hw/xfree86/os-support/bsd/0000755000175000017500000000000014757411134014525 5xorg-server-21.1.16/hw/xfree86/os-support/bsd/Makefile.am0000644000175000017500000000226414757411105016503 noinst_LTLIBRARIES = libbsd.la # No APM support. APM_SOURCES = $(srcdir)/../shared/pm_noop.c if FREEBSD_KLDLOAD KMOD_SOURCES = bsd_kmod.c else KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c endif if AGP AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c else AGP_SOURCES = $(srcdir)/../shared/agp_noop.c endif if ALPHA_VIDEO # Cheat here and piggyback other alpha bits on ALPHA_VIDEO. ARCH_SOURCES = \ alpha_video.c endif if ARM_VIDEO ARCH_SOURCES = arm_video.c endif if I386_VIDEO ARCH_SOURCES = i386_video.c endif if PPC_VIDEO ARCH_SOURCES = ppc_video.c endif if SPARC64_VIDEO # Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO. ARCH_SOURCES = \ sparc64_video.c \ $(srcdir)/../shared/ioperm_noop.c endif # FIXME: NetBSD Aperture defines (configure.ac) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) libbsd_la_SOURCES = \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c \ bsd_init.c \ bsd_bell.c \ $(ARCH_SOURCES) \ $(AGP_SOURCES) \ $(APM_SOURCES) \ $(AXP_SOURCES) \ $(DRI_SOURCES) \ $(KMOD_SOURCES) \ $(RES_SOURCES) # FIXME: Add these files to the build as needed EXTRA_DIST = \ memrange.h xorg-server-21.1.16/hw/xfree86/os-support/bsd/Makefile.in0000644000175000017500000011375014757411115016520 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support/bsd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsd_la_LIBADD = am__libbsd_la_SOURCES_DIST = $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c bsd_init.c bsd_bell.c alpha_video.c arm_video.c \ i386_video.c ppc_video.c sparc64_video.c \ $(srcdir)/../shared/ioperm_noop.c \ $(srcdir)/../shared/agp_noop.c $(srcdir)/../linux/lnx_agp.c \ $(srcdir)/../shared/pm_noop.c $(srcdir)/../shared/kmod_noop.c \ bsd_kmod.c @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@am__objects_1 = sparc64_video.lo \ @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_FALSE@@SPARC64_VIDEO_TRUE@ ioperm_noop.lo @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_FALSE@@PPC_VIDEO_TRUE@am__objects_1 = ppc_video.lo @ALPHA_VIDEO_FALSE@@ARM_VIDEO_FALSE@@I386_VIDEO_TRUE@am__objects_1 = i386_video.lo @ALPHA_VIDEO_FALSE@@ARM_VIDEO_TRUE@am__objects_1 = arm_video.lo @ALPHA_VIDEO_TRUE@am__objects_1 = alpha_video.lo @AGP_FALSE@am__objects_2 = agp_noop.lo @AGP_TRUE@am__objects_2 = lnx_agp.lo am__objects_3 = pm_noop.lo @FREEBSD_KLDLOAD_FALSE@am__objects_4 = kmod_noop.lo @FREEBSD_KLDLOAD_TRUE@am__objects_4 = bsd_kmod.lo am_libbsd_la_OBJECTS = posix_tty.lo sigio.lo vidmem.lo bsd_VTsw.lo \ bsd_init.lo bsd_bell.lo $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) libbsd_la_OBJECTS = $(am_libbsd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/agp_noop.Plo \ ./$(DEPDIR)/alpha_video.Plo ./$(DEPDIR)/arm_video.Plo \ ./$(DEPDIR)/bsd_VTsw.Plo ./$(DEPDIR)/bsd_bell.Plo \ ./$(DEPDIR)/bsd_init.Plo ./$(DEPDIR)/bsd_kmod.Plo \ ./$(DEPDIR)/i386_video.Plo ./$(DEPDIR)/ioperm_noop.Plo \ ./$(DEPDIR)/kmod_noop.Plo ./$(DEPDIR)/lnx_agp.Plo \ ./$(DEPDIR)/pm_noop.Plo ./$(DEPDIR)/posix_tty.Plo \ ./$(DEPDIR)/ppc_video.Plo ./$(DEPDIR)/sigio.Plo \ ./$(DEPDIR)/sparc64_video.Plo ./$(DEPDIR)/vidmem.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbsd_la_SOURCES) DIST_SOURCES = $(am__libbsd_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsd.la # No APM support. APM_SOURCES = $(srcdir)/../shared/pm_noop.c @FREEBSD_KLDLOAD_FALSE@KMOD_SOURCES = $(srcdir)/../shared/kmod_noop.c @FREEBSD_KLDLOAD_TRUE@KMOD_SOURCES = bsd_kmod.c @AGP_FALSE@AGP_SOURCES = $(srcdir)/../shared/agp_noop.c @AGP_TRUE@AGP_SOURCES = $(srcdir)/../linux/lnx_agp.c # Cheat here and piggyback other alpha bits on ALPHA_VIDEO. @ALPHA_VIDEO_TRUE@ARCH_SOURCES = \ @ALPHA_VIDEO_TRUE@ alpha_video.c @ARM_VIDEO_TRUE@ARCH_SOURCES = arm_video.c @I386_VIDEO_TRUE@ARCH_SOURCES = i386_video.c @PPC_VIDEO_TRUE@ARCH_SOURCES = ppc_video.c # Cheat here and piggyback other sparc64 bits on SPARC64_VIDEO. @SPARC64_VIDEO_TRUE@ARCH_SOURCES = \ @SPARC64_VIDEO_TRUE@ sparc64_video.c \ @SPARC64_VIDEO_TRUE@ $(srcdir)/../shared/ioperm_noop.c # FIXME: NetBSD Aperture defines (configure.ac) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) libbsd_la_SOURCES = \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ bsd_VTsw.c \ bsd_init.c \ bsd_bell.c \ $(ARCH_SOURCES) \ $(AGP_SOURCES) \ $(APM_SOURCES) \ $(AXP_SOURCES) \ $(DRI_SOURCES) \ $(KMOD_SOURCES) \ $(RES_SOURCES) # FIXME: Add these files to the build as needed EXTRA_DIST = \ memrange.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/bsd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/bsd/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libbsd.la: $(libbsd_la_OBJECTS) $(libbsd_la_DEPENDENCIES) $(EXTRA_libbsd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsd_la_OBJECTS) $(libbsd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alpha_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_VTsw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_bell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_kmod.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i386_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_agp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppc_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sparc64_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< posix_tty.lo: $(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posix_tty.lo -MD -MP -MF $(DEPDIR)/posix_tty.Tpo -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/posix_tty.Tpo $(DEPDIR)/posix_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/posix_tty.c' object='posix_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c sigio.lo: $(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c ioperm_noop.lo: $(srcdir)/../shared/ioperm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ioperm_noop.lo -MD -MP -MF $(DEPDIR)/ioperm_noop.Tpo -c -o ioperm_noop.lo `test -f '$(srcdir)/../shared/ioperm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/ioperm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ioperm_noop.Tpo $(DEPDIR)/ioperm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/ioperm_noop.c' object='ioperm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ioperm_noop.lo `test -f '$(srcdir)/../shared/ioperm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/ioperm_noop.c agp_noop.lo: $(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c lnx_agp.lo: $(srcdir)/../linux/lnx_agp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT lnx_agp.lo -MD -MP -MF $(DEPDIR)/lnx_agp.Tpo -c -o lnx_agp.lo `test -f '$(srcdir)/../linux/lnx_agp.c' || echo '$(srcdir)/'`$(srcdir)/../linux/lnx_agp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/lnx_agp.Tpo $(DEPDIR)/lnx_agp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../linux/lnx_agp.c' object='lnx_agp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o lnx_agp.lo `test -f '$(srcdir)/../linux/lnx_agp.c' || echo '$(srcdir)/'`$(srcdir)/../linux/lnx_agp.c pm_noop.lo: $(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pm_noop.lo -MD -MP -MF $(DEPDIR)/pm_noop.Tpo -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pm_noop.Tpo $(DEPDIR)/pm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/pm_noop.c' object='pm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/kmod_noop.c' object='kmod_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/alpha_video.Plo -rm -f ./$(DEPDIR)/arm_video.Plo -rm -f ./$(DEPDIR)/bsd_VTsw.Plo -rm -f ./$(DEPDIR)/bsd_bell.Plo -rm -f ./$(DEPDIR)/bsd_init.Plo -rm -f ./$(DEPDIR)/bsd_kmod.Plo -rm -f ./$(DEPDIR)/i386_video.Plo -rm -f ./$(DEPDIR)/ioperm_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/lnx_agp.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/ppc_video.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/sparc64_video.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/alpha_video.Plo -rm -f ./$(DEPDIR)/arm_video.Plo -rm -f ./$(DEPDIR)/bsd_VTsw.Plo -rm -f ./$(DEPDIR)/bsd_bell.Plo -rm -f ./$(DEPDIR)/bsd_init.Plo -rm -f ./$(DEPDIR)/bsd_kmod.Plo -rm -f ./$(DEPDIR)/i386_video.Plo -rm -f ./$(DEPDIR)/ioperm_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/lnx_agp.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/ppc_video.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/sparc64_video.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/bsd/bsd_VTsw.c0000644000175000017500000000565114757411105016351 /* * Derived from VTsw_usl.c which is * Copyright 1993 by David Wexelblat * by S_ren Schmidt (sos@login.dkuug.dk) * * 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 David Wexelblat not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. David Wexelblat makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" /* * Handle the VT-switching interface for OSs that use USL-style ioctl()s * (the bsd, sysv, sco, and linux subdirs). */ /* * This function is the signal handler for the VT-switching signal. It * is only referenced inside the OS-support layer. */ void xf86VTRequest(int sig) { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { xf86Info.vtRequestsPending = TRUE; } #endif return; } Bool xf86VTSwitchPending() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { return xf86Info.vtRequestsPending ? TRUE : FALSE; } #endif return FALSE; } Bool xf86VTSwitchAway() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) return FALSE; else return TRUE; } #endif return FALSE; } Bool xf86VTSwitchTo() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) return FALSE; else return TRUE; } #endif return TRUE; } Bool xf86VTActivate(int vtno) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { return FALSE; } return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/bsd/bsd_init.c0000644000175000017500000005056414757411105016414 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "compiler.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include #include #include #include static Bool KeepTty = FALSE; #ifdef PCCONS_SUPPORT static int devConsoleFd = -1; #endif #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) static int VTnum = -1; static int initialVT = -1; #endif #ifdef PCCONS_SUPPORT /* Stock 0.1 386bsd pccons console driver interface */ #define PCCONS_CONSOLE_DEV1 "/dev/ttyv0" #define PCCONS_CONSOLE_DEV2 "/dev/vga" #define PCCONS_CONSOLE_MODE O_RDWR|O_NDELAY #endif #ifdef SYSCONS_SUPPORT /* The FreeBSD 1.1 version syscons driver uses /dev/ttyv0 */ #define SYSCONS_CONSOLE_DEV1 "/dev/ttyv0" #define SYSCONS_CONSOLE_DEV2 "/dev/vga" #define SYSCONS_CONSOLE_MODE O_RDWR|O_NDELAY #endif #ifdef PCVT_SUPPORT /* Hellmuth Michaelis' pcvt driver */ #ifndef __OpenBSD__ #define PCVT_CONSOLE_DEV "/dev/ttyv0" #else #define PCVT_CONSOLE_DEV "/dev/ttyC0" #endif #define PCVT_CONSOLE_MODE O_RDWR|O_NDELAY #endif #if defined(WSCONS_SUPPORT) && defined(__NetBSD__) /* NetBSD's new console driver */ #define WSCONS_PCVT_COMPAT_CONSOLE_DEV "/dev/ttyE0" #endif #ifdef __GLIBC__ #define setpgrp setpgid #endif #define CHECK_DRIVER_MSG \ "Check your kernel's console driver configuration and /dev entries" static char *supported_drivers[] = { #ifdef PCCONS_SUPPORT "pccons (with X support)", #endif #ifdef SYSCONS_SUPPORT "syscons", #endif #ifdef PCVT_SUPPORT "pcvt", #endif #ifdef WSCONS_SUPPORT "wscons", #endif }; /* * Functions to probe for the existence of a supported console driver. * Any function returns either a valid file descriptor (driver probed * successfully), -1 (driver not found), or uses FatalError() if the * driver was found but proved to not support the required mode to run * an X server. */ typedef int (*xf86ConsOpen_t) (void); #ifdef PCCONS_SUPPORT static int xf86OpenPccons(void); #endif /* PCCONS_SUPPORT */ #ifdef SYSCONS_SUPPORT static int xf86OpenSyscons(void); #endif /* SYSCONS_SUPPORT */ #ifdef PCVT_SUPPORT static int xf86OpenPcvt(void); #endif /* PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT static int xf86OpenWScons(void); #endif /* * The sequence of the driver probes is important; start with the * driver that is best distinguishable, and end with the most generic * driver. (Otherwise, pcvt would also probe as syscons, and either * pcvt or syscons might successfully probe as pccons.) */ static xf86ConsOpen_t xf86ConsTab[] = { #ifdef PCVT_SUPPORT xf86OpenPcvt, #endif #ifdef SYSCONS_SUPPORT xf86OpenSyscons, #endif #ifdef PCCONS_SUPPORT xf86OpenPccons, #endif #ifdef WSCONS_SUPPORT xf86OpenWScons, #endif (xf86ConsOpen_t) NULL }; void xf86OpenConsole() { int i, fd = -1; xf86ConsOpen_t *driver; #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) int result; #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) struct utsname uts; #endif vtmode_t vtmode; #endif if (serverGeneration == 1) { /* check if we are run with euid==0 */ if (geteuid() != 0) { FatalError("xf86OpenConsole: Server must be suid root"); } if (!KeepTty) { /* * detaching the controlling tty solves problems of kbd character * loss. This is not interesting for CO driver, because it is * exclusive. */ setpgrp(0, getpid()); if ((i = open("/dev/tty", O_RDWR)) >= 0) { ioctl(i, TIOCNOTTY, (char *) 0); close(i); } } /* detect which driver we are running on */ for (driver = xf86ConsTab; *driver; driver++) { if ((fd = (*driver) ()) >= 0) break; } /* Check that a supported console driver was found */ if (fd < 0) { char cons_drivers[80] = { 0, }; for (i = 0; i < ARRAY_SIZE(supported_drivers); i++) { if (i) { strcat(cons_drivers, ", "); } strcat(cons_drivers, supported_drivers[i]); } FatalError ("%s: No console driver found\n\tSupported drivers: %s\n\t%s", "xf86OpenConsole", cons_drivers, CHECK_DRIVER_MSG); } xf86Info.consoleFd = fd; switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT case PCCONS: if (ioctl(xf86Info.consoleFd, CONSOLE_X_MODE_ON, 0) < 0) { FatalError("%s: CONSOLE_X_MODE_ON failed (%s)\n%s", "xf86OpenConsole", strerror(errno), CHECK_DRIVER_MSG); } /* * Hack to prevent keyboard hanging when syslogd closes * /dev/console */ if ((devConsoleFd = open("/dev/console", O_WRONLY, 0)) < 0) { xf86Msg(X_WARNING, "xf86OpenConsole: couldn't open /dev/console (%s)\n", strerror(errno)); } break; #endif #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) case SYSCONS: /* as of FreeBSD 2.2.8, syscons driver does not need the #1 vt * switching anymore. Here we check for FreeBSD 3.1 and up. * Add cases for other *BSD that behave the same. */ #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) uname(&uts); i = atof(uts.release) * 100; if (i >= 310) goto acquire_vt; #endif /* otherwise fall through */ case PCVT: #if !(defined(__NetBSD__) && (__NetBSD_Version__ >= 200000000)) /* * First activate the #1 VT. This is a hack to allow a server * to be started while another one is active. There should be * a better way. */ if (initialVT != 1) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, 1) != 0) { xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); } sleep(1); } #endif acquire_vt: if (!xf86Info.ShareVTs) { /* * now get the VT */ SYSCALL(result = ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno)); if (result != 0) { xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); } SYSCALL(result = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, xf86Info.vtno)); if (result != 0) { xf86Msg(X_WARNING, "xf86OpenConsole: VT_WAITACTIVE failed\n"); } OsSignal(SIGUSR1, xf86VTRequest); vtmode.mode = VT_PROCESS; vtmode.relsig = SIGUSR1; vtmode.acqsig = SIGUSR1; vtmode.frsig = SIGUSR1; if (ioctl(xf86Info.consoleFd, VT_SETMODE, &vtmode) < 0) { FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed"); } #if !defined(__OpenBSD__) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) if (ioctl(xf86Info.consoleFd, KDENABIO, 0) < 0) { FatalError("xf86OpenConsole: KDENABIO failed (%s)", strerror(errno)); } #endif if (ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS) < 0) { FatalError("xf86OpenConsole: KDSETMODE KD_GRAPHICS failed"); } } else { /* xf86Info.ShareVTs */ close(xf86Info.consoleFd); } break; #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT case WSCONS: /* Nothing to do */ break; #endif } } else { /* serverGeneration != 1 */ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (!xf86Info.ShareVTs && (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT)) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, xf86Info.vtno) != 0) { xf86Msg(X_WARNING, "xf86OpenConsole: VT_ACTIVATE failed\n"); } } #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ } return; } #ifdef PCCONS_SUPPORT static int xf86OpenPccons() { int fd = -1; if ((fd = open(PCCONS_CONSOLE_DEV1, PCCONS_CONSOLE_MODE, 0)) >= 0 || (fd = open(PCCONS_CONSOLE_DEV2, PCCONS_CONSOLE_MODE, 0)) >= 0) { if (ioctl(fd, CONSOLE_X_MODE_OFF, 0) < 0) { FatalError("%s: CONSOLE_X_MODE_OFF failed (%s)\n%s\n%s", "xf86OpenPccons", strerror(errno), "Was expecting pccons driver with X support", CHECK_DRIVER_MSG); } xf86Info.consType = PCCONS; xf86Msg(X_PROBED, "Using pccons driver with X support\n"); } return fd; } #endif /* PCCONS_SUPPORT */ #ifdef SYSCONS_SUPPORT static int xf86OpenSyscons() { int fd = -1; vtmode_t vtmode; char vtname[12]; long syscons_version; MessageType from; /* Check for syscons */ if ((fd = open(SYSCONS_CONSOLE_DEV1, SYSCONS_CONSOLE_MODE, 0)) >= 0 || (fd = open(SYSCONS_CONSOLE_DEV2, SYSCONS_CONSOLE_MODE, 0)) >= 0) { if (ioctl(fd, VT_GETMODE, &vtmode) >= 0) { /* Get syscons version */ if (ioctl(fd, CONS_GETVERS, &syscons_version) < 0) { syscons_version = 0; } xf86Info.vtno = VTnum; from = X_CMDLINE; #ifdef VT_GETACTIVE if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0) initialVT = -1; #endif if (xf86Info.ShareVTs) xf86Info.vtno = initialVT; if (xf86Info.vtno == -1) { /* * For old syscons versions (<0x100), VT_OPENQRY returns * the current VT rather than the next free VT. In this * case, the server gets started on the current VT instead * of the next free VT. */ #if 0 /* check for the fixed VT_OPENQRY */ if (syscons_version >= 0x100) { #endif if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) { /* No free VTs */ xf86Info.vtno = -1; } #if 0 } #endif if (xf86Info.vtno == -1) { /* * All VTs are in use. If initialVT was found, use it. */ if (initialVT != -1) { xf86Info.vtno = initialVT; } else { if (syscons_version >= 0x100) { FatalError("%s: Cannot find a free VT", "xf86OpenSyscons"); } /* Should no longer reach here */ FatalError("%s: %s %s\n\t%s %s", "xf86OpenSyscons", "syscons versions prior to 1.0 require", "either the", "server's stdin be a VT", "or the use of the vtxx server option"); } } from = X_PROBED; } close(fd); snprintf(vtname, sizeof(vtname), "/dev/ttyv%01x", xf86Info.vtno - 1); if ((fd = open(vtname, SYSCONS_CONSOLE_MODE, 0)) < 0) { FatalError("xf86OpenSyscons: Cannot open %s (%s)", vtname, strerror(errno)); } if (ioctl(fd, VT_GETMODE, &vtmode) < 0) { FatalError("xf86OpenSyscons: VT_GETMODE failed"); } xf86Info.consType = SYSCONS; xf86Msg(X_PROBED, "Using syscons driver with X support"); if (syscons_version >= 0x100) { xf86ErrorF(" (version %ld.%ld)\n", syscons_version >> 8, syscons_version & 0xFF); } else { xf86ErrorF(" (version 0.x)\n"); } xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); } else { /* VT_GETMODE failed, probably not syscons */ close(fd); fd = -1; } } return fd; } #endif /* SYSCONS_SUPPORT */ #ifdef PCVT_SUPPORT static int xf86OpenPcvt() { /* This looks much like syscons, since pcvt is API compatible */ int fd = -1; vtmode_t vtmode; char vtname[12], *vtprefix; struct pcvtid pcvt_version; #ifndef __OpenBSD__ vtprefix = "/dev/ttyv"; #else vtprefix = "/dev/ttyC"; #endif fd = open(PCVT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0); #ifdef WSCONS_PCVT_COMPAT_CONSOLE_DEV if (fd < 0) { fd = open(WSCONS_PCVT_COMPAT_CONSOLE_DEV, PCVT_CONSOLE_MODE, 0); vtprefix = "/dev/ttyE"; } #endif if (fd >= 0) { if (ioctl(fd, VGAPCVTID, &pcvt_version) >= 0) { if (ioctl(fd, VT_GETMODE, &vtmode) < 0) { FatalError("%s: VT_GETMODE failed\n%s%s\n%s", "xf86OpenPcvt", "Found pcvt driver but X11 seems to be", " not supported.", CHECK_DRIVER_MSG); } xf86Info.vtno = VTnum; if (ioctl(fd, VT_GETACTIVE, &initialVT) < 0) initialVT = -1; if (xf86Info.vtno == -1) { if (ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) { /* No free VTs */ xf86Info.vtno = -1; } if (xf86Info.vtno == -1) { /* * All VTs are in use. If initialVT was found, use it. */ if (initialVT != -1) { xf86Info.vtno = initialVT; } else { FatalError("%s: Cannot find a free VT", "xf86OpenPcvt"); } } } close(fd); snprintf(vtname, sizeof(vtname), "%s%01x", vtprefix, xf86Info.vtno - 1); if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) { ErrorF("xf86OpenPcvt: Cannot open %s (%s)", vtname, strerror(errno)); xf86Info.vtno = initialVT; snprintf(vtname, sizeof(vtname), "%s%01x", vtprefix, xf86Info.vtno - 1); if ((fd = open(vtname, PCVT_CONSOLE_MODE, 0)) < 0) { FatalError("xf86OpenPcvt: Cannot open %s (%s)", vtname, strerror(errno)); } } if (ioctl(fd, VT_GETMODE, &vtmode) < 0) { FatalError("xf86OpenPcvt: VT_GETMODE failed"); } xf86Info.consType = PCVT; #ifdef WSCONS_SUPPORT xf86Msg(X_PROBED, "Using wscons driver on %s in pcvt compatibility mode " "(version %d.%d)\n", vtname, pcvt_version.rmajor, pcvt_version.rminor); #else xf86Msg(X_PROBED, "Using pcvt driver (version %d.%d)\n", pcvt_version.rmajor, pcvt_version.rminor); #endif } else { /* Not pcvt */ close(fd); fd = -1; } } return fd; } #endif /* PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT static int xf86OpenWScons() { int fd = -1; int mode = WSDISPLAYIO_MODE_MAPPED; int i; char ttyname[16]; /* XXX Is this ok? */ for (i = 0; i < 8; i++) { #if defined(__NetBSD__) snprintf(ttyname, sizeof(ttyname), "/dev/ttyE%d", i); #elif defined(__OpenBSD__) snprintf(ttyname, sizeof(ttyname), "/dev/ttyC%x", i); #endif if ((fd = open(ttyname, 2)) != -1) break; } if (fd != -1) { if (ioctl(fd, WSDISPLAYIO_SMODE, &mode) < 0) { FatalError("%s: WSDISPLAYIO_MODE_MAPPED failed (%s)\n%s", "xf86OpenConsole", strerror(errno), CHECK_DRIVER_MSG); } xf86Info.consType = WSCONS; xf86Msg(X_PROBED, "Using wscons driver\n"); } return fd; } #endif /* WSCONS_SUPPORT */ void xf86CloseConsole() { #if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) struct vt_mode VT; #endif if (xf86Info.ShareVTs) return; switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT case PCCONS: ioctl(xf86Info.consoleFd, CONSOLE_X_MODE_OFF, 0); break; #endif /* PCCONS_SUPPORT */ #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) case SYSCONS: case PCVT: ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT); /* Back to text mode */ if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { VT.mode = VT_AUTO; ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); /* dflt vt handling */ } #if !defined(__OpenBSD__) && !defined(USE_DEV_IO) && !defined(USE_I386_IOPL) if (ioctl(xf86Info.consoleFd, KDDISABIO, 0) < 0) { xf86FatalError("xf86CloseConsole: KDDISABIO failed (%s)", strerror(errno)); } #endif if (initialVT != -1) ioctl(xf86Info.consoleFd, VT_ACTIVATE, initialVT); break; #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ #ifdef WSCONS_SUPPORT case WSCONS: { int mode = WSDISPLAYIO_MODE_EMUL; ioctl(xf86Info.consoleFd, WSDISPLAYIO_SMODE, &mode); break; } #endif } close(xf86Info.consoleFd); #ifdef PCCONS_SUPPORT if (devConsoleFd >= 0) close(devConsoleFd); #endif return; } int xf86ProcessArgument(int argc, char *argv[], int i) { /* * Keep server from detaching from controlling tty. This is useful * when debugging (so the server can receive keyboard signals. */ if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; return 1; } #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { if (sscanf(argv[i], "vt%2d", &VTnum) == 0 || VTnum < 1 || VTnum > 12) { UseMsg(); VTnum = -1; return 0; } return 1; } #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ return 0; } void xf86UseMsg() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) ErrorF("vtXX use the specified VT number (1-12)\n"); #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ ErrorF("-keeptty "); ErrorF("don't detach controlling tty (for debugging only)\n"); return; } void xf86OSInputThreadInit(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/bsd/bsd_bell.c0000644000175000017500000000475714757411105016372 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Dawes * * 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 names of Rich Murphey and David Dawes * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Dawes make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES 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_XORG_CONFIG_H #include #endif #if defined (SYSCONS_SUPPORT) #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" void xf86OSRingBell(int loudness, int pitch, int duration) { #ifdef WSCONS_SUPPORT struct wskbd_bell_data wsb; #endif if (loudness && pitch) { #ifdef PCCONS_SUPPORT int data[2]; #endif switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT case PCCONS: data[0] = pitch; data[1] = (duration * loudness) / 50; ioctl(xf86Info.consoleFd, CONSOLE_X_BELL, data); break; #endif #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) case SYSCONS: case PCVT: ioctl(xf86Info.consoleFd, KDMKTONE, ((1193190 / pitch) & 0xffff) | (((unsigned long) duration * loudness / 50) << 16)); break; #endif #if defined (WSCONS_SUPPORT) case WSCONS: wsb.which = WSKBD_BELL_DOALL; wsb.pitch = pitch; wsb.period = duration; wsb.volume = loudness; ioctl(xf86Info.consoleFd, WSKBDIO_COMPLEXBELL, &wsb); break; #endif } } } xorg-server-21.1.16/hw/xfree86/os-support/bsd/alpha_video.c0000644000175000017500000001527314757411105017072 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include #ifndef __NetBSD__ #include #endif #include "xf86_OSlib.h" #include "xf86OSpriv.h" #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif #ifndef __NetBSD__ extern unsigned long dense_base(void); #else /* __NetBSD__ */ static struct alpha_bus_window *abw; static int abw_count = -1; static void init_abw(void) { if (abw_count < 0) { abw_count = alpha_bus_getwindows(ALPHA_BUS_TYPE_PCI_MEM, &abw); if (abw_count <= 0) FatalError("init_abw: alpha_bus_getwindows failed\n"); } } static unsigned long dense_base(void) { if (abw_count < 0) init_abw(); /* XXX check abst_flags for ABST_DENSE just to be safe? */ xf86Msg(X_INFO, "dense base = %#lx\n", abw[0].abw_abst.abst_sys_start); /* XXXX */ return abw[0].abw_abst.abst_sys_start; } #endif /* __NetBSD__ */ #define BUS_BASE dense_base() /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ #ifdef __OpenBSD__ #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\ "\tin /etc/sysctl.conf and reboot your machine\n" \ "\trefer to xf86(4) for details" #endif static int devMemFd = -1; #ifdef HAS_APERTURE_DRV #define DEV_APERTURE "/dev/xf86" #endif /* * Check if /dev/mem can be mmap'd. If it can't print a warning when * "warn" is TRUE. */ static void checkDevMem(Bool warn) { static Bool devMemChecked = FALSE; int fd; void *base; if (devMemChecked) return; devMemChecked = TRUE; #ifdef HAS_APERTURE_DRV /* Try the aperture driver first */ if ((fd = open(DEV_APERTURE, O_RDWR)) >= 0) { /* Try to map a page at the VGA address */ base = mmap((caddr_t) 0, 4096, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0xA0000 + BUS_BASE); if (base != MAP_FAILED) { munmap((caddr_t) base, 4096); devMemFd = fd; xf86Msg(X_INFO, "checkDevMem: using aperture driver %s\n", DEV_APERTURE); return; } else { if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n", DEV_APERTURE, strerror(errno)); } } } #endif if ((fd = open(DEV_MEM, O_RDWR)) >= 0) { /* Try to map a page at the VGA address */ base = mmap((caddr_t) 0, 4096, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0xA0000 + BUS_BASE); if (base != MAP_FAILED) { munmap((caddr_t) base, 4096); devMemFd = fd; return; } else { if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n", DEV_MEM, strerror(errno)); } } } if (warn) { #ifndef HAS_APERTURE_DRV xf86Msg(X_WARNING, "checkDevMem: failed to open/mmap %s (%s)\n", DEV_MEM, strerror(errno)); #else #ifndef __OpenBSD__ xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n" "\t(%s)\n", DEV_APERTURE, DEV_MEM, strerror(errno)); #else /* __OpenBSD__ */ xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n" "\t(%s)\n%s", DEV_APERTURE, DEV_MEM, strerror(errno), SYSCTL_MSG); #endif /* __OpenBSD__ */ #endif xf86ErrorF("\tlinear framebuffer access unavailable\n"); } return; } void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { checkDevMem(TRUE); pVidMem->initialised = TRUE; } #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) extern int ioperm(unsigned long from, unsigned long num, int on); Bool xf86EnableIO() { if (!ioperm(0, 65536, TRUE)) return TRUE; return FALSE; } void xf86DisableIO() { return; } #endif /* __FreeBSD_kernel__ || __OpenBSD__ */ #ifdef USE_ALPHA_PIO Bool xf86EnableIO() { alpha_pci_io_enable(1); return TRUE; } void xf86DisableIO() { alpha_pci_io_enable(0); } #endif /* USE_ALPHA_PIO */ extern int readDense8(void *Base, register unsigned long Offset); extern int readDense16(void *Base, register unsigned long Offset); extern int readDense32(void *Base, register unsigned long Offset); extern void writeDense8(int Value, void *Base, register unsigned long Offset); extern void writeDense16(int Value, void *Base, register unsigned long Offset); extern void writeDense32(int Value, void *Base, register unsigned long Offset); void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) = writeDense8; void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; int (*xf86ReadMmio16) (void *Base, unsigned long Offset) = readDense16; int (*xf86ReadMmio32) (void *Base, unsigned long Offset) = readDense32; xorg-server-21.1.16/hw/xfree86/os-support/bsd/arm_video.c0000644000175000017500000001375014757411105016562 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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. * */ /* * The ARM32 code here carries the following copyright: * * Copyright 1997 * Digital Equipment Corporation. All rights reserved. * This software is furnished under license and may be used and copied only in * accordance with the following terms and conditions. Subject to these * conditions, you may download, copy, install, use, modify and distribute * this software in source and/or binary form. No title or ownership is * transferred hereby. * * 1) Any source code used, modified or distributed must reproduce and retain * this copyright notice and list of conditions as they appear in the * source file. * * 2) No right is granted to use any trade name, trademark, or logo of Digital * Equipment Corporation. Neither the "Digital Equipment Corporation" * name nor any trademark or logo of Digital Equipment Corporation may be * used to endorse or promote products derived from this software without * the prior written permission of Digital Equipment Corporation. * * 3) This software is provided "AS-IS" and any express or implied warranties, * including but not limited to, any implied warranties of merchantability, * fitness for a particular purpose, or non-infringement are disclaimed. * In no event shall DIGITAL be liable for any damages whatsoever, and in * particular, DIGITAL shall not be liable for special, indirect, * consequential, or incidental damages or damages for lost profits, loss * of revenue or loss of use, whether such damages arise in contract, * negligence, tort, under statute, in equity, at law or otherwise, even * if advised of the possibility of such damage. * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" #include "compiler.h" #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif #define BUS_BASE 0L #define BUS_BASE_BWX 0L /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ static int devMemFd = -1; /* * Check if /dev/mem can be mmap'd. If it can't print a warning when * "warn" is TRUE. */ static void checkDevMem(Bool warn) { static Bool devMemChecked = FALSE; int fd; void *base; if (devMemChecked) return; devMemChecked = TRUE; if ((fd = open(DEV_MEM, O_RDWR)) >= 0) { /* Try to map a page at the VGA address */ base = mmap((caddr_t) 0, 4096, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0xA0000 + BUS_BASE); if (base != MAP_FAILED) { munmap((caddr_t) base, 4096); devMemFd = fd; return; } else { /* This should not happen */ if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n", DEV_MEM, strerror(errno)); } return; } } if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to open %s (%s)\n", DEV_MEM, strerror(errno)); } return; } void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { checkDevMem(TRUE); pVidMem->initialised = TRUE; } #ifdef USE_DEV_IO static int IoFd = -1; Bool xf86EnableIO() { if (IoFd >= 0) return TRUE; if ((IoFd = open("/dev/io", O_RDWR)) == -1) { xf86Msg(X_WARNING, "xf86EnableIO: " "Failed to open /dev/io for extended I/O\n"); return FALSE; } return TRUE; } void xf86DisableIO() { if (IoFd < 0) return; close(IoFd); IoFd = -1; return; } #endif #if defined(USE_ARC_MMAP) || defined(__arm32__) unsigned int IOPortBase; Bool xf86EnableIO() { int fd; void *base; if (ExtendedEnabled) return TRUE; if ((fd = open("/dev/ttyC0", O_RDWR)) >= 0) { /* Try to map a page at the pccons I/O space */ base = (void *) mmap((caddr_t) 0, 65536, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0x0000); if (base != (void *) -1) { IOPortBase = base; } else { xf86Msg(X_WARNING, "EnableIO: failed to mmap %s (%s)\n", "/dev/ttyC0", strerror(errno)); return FALSE; } } else { xf86Msg("EnableIO: failed to open %s (%s)\n", "/dev/ttyC0", strerror(errno)); return FALSE; } ExtendedEnabled = TRUE; return TRUE; } void xf86DisableIO() { return; } #endif /* USE_ARC_MMAP */ xorg-server-21.1.16/hw/xfree86/os-support/bsd/i386_video.c0000644000175000017500000002062414757411105016472 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include #include #include "xf86_OSlib.h" #include "xf86OSpriv.h" #if defined(__NetBSD__) && !defined(MAP_FILE) #define MAP_FLAGS MAP_SHARED #else #define MAP_FLAGS (MAP_FILE | MAP_SHARED) #endif #ifdef __OpenBSD__ #define SYSCTL_MSG "\tCheck that you have set 'machdep.allowaperture=1'\n"\ "\tin /etc/sysctl.conf and reboot your machine\n" \ "\trefer to xf86(4) for details" #define SYSCTL_MSG2 \ "Check that you have set 'machdep.allowaperture=2'\n" \ "\tin /etc/sysctl.conf and reboot your machine\n" \ "\trefer to xf86(4) for details" #endif /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ static Bool useDevMem = FALSE; static int devMemFd = -1; #ifdef HAS_APERTURE_DRV #define DEV_APERTURE "/dev/xf86" #endif /* * Check if /dev/mem can be mmap'd. If it can't print a warning when * "warn" is TRUE. */ static void checkDevMem(Bool warn) { static Bool devMemChecked = FALSE; int fd; void *base; if (devMemChecked) return; devMemChecked = TRUE; if ((fd = open(DEV_MEM, O_RDWR)) >= 0) { /* Try to map a page at the VGA address */ base = mmap((caddr_t) 0, 4096, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0xA0000); if (base != MAP_FAILED) { munmap((caddr_t) base, 4096); devMemFd = fd; useDevMem = TRUE; return; } else { /* This should not happen */ if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n", DEV_MEM, strerror(errno)); } useDevMem = FALSE; return; } } #ifndef HAS_APERTURE_DRV if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to open %s (%s)\n", DEV_MEM, strerror(errno)); } useDevMem = FALSE; return; #else /* Failed to open /dev/mem, try the aperture driver */ if ((fd = open(DEV_APERTURE, O_RDWR)) >= 0) { /* Try to map a page at the VGA address */ base = mmap((caddr_t) 0, 4096, PROT_READ | PROT_WRITE, MAP_FLAGS, fd, (off_t) 0xA0000); if (base != MAP_FAILED) { munmap((caddr_t) base, 4096); devMemFd = fd; useDevMem = TRUE; xf86Msg(X_INFO, "checkDevMem: using aperture driver %s\n", DEV_APERTURE); return; } else { if (warn) { xf86Msg(X_WARNING, "checkDevMem: failed to mmap %s (%s)\n", DEV_APERTURE, strerror(errno)); } } } else { if (warn) { #ifndef __OpenBSD__ xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n" "\t(%s)\n", DEV_MEM, DEV_APERTURE, strerror(errno)); #else /* __OpenBSD__ */ xf86Msg(X_WARNING, "checkDevMem: failed to open %s and %s\n" "\t(%s)\n%s", DEV_MEM, DEV_APERTURE, strerror(errno), SYSCTL_MSG); #endif /* __OpenBSD__ */ } } useDevMem = FALSE; return; #endif } void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { checkDevMem(TRUE); pci_system_init_dev_mem(devMemFd); pVidMem->initialised = TRUE; } #ifdef USE_I386_IOPL /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ static Bool ExtendedEnabled = FALSE; Bool xf86EnableIO() { if (ExtendedEnabled) return TRUE; if (i386_iopl(TRUE) < 0) { #ifndef __OpenBSD__ xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O", "xf86EnableIO"); #else xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O\n%s", "xf86EnableIO", SYSCTL_MSG); #endif return FALSE; } ExtendedEnabled = TRUE; return TRUE; } void xf86DisableIO() { if (!ExtendedEnabled) return; i386_iopl(FALSE); ExtendedEnabled = FALSE; return; } #endif /* USE_I386_IOPL */ #ifdef USE_AMD64_IOPL /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ static Bool ExtendedEnabled = FALSE; Bool xf86EnableIO() { if (ExtendedEnabled) return TRUE; if (amd64_iopl(TRUE) < 0) { #ifndef __OpenBSD__ xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O", "xf86EnableIO"); #else xf86Msg(X_WARNING, "%s: Failed to set IOPL for extended I/O\n%s", "xf86EnableIO", SYSCTL_MSG); #endif return FALSE; } ExtendedEnabled = TRUE; return TRUE; } void xf86DisableIO() { if (!ExtendedEnabled) return; if (amd64_iopl(FALSE) == 0) { ExtendedEnabled = FALSE; } /* Otherwise, the X server has revoqued its root uid, and thus cannot give up IO privileges any more */ return; } #endif /* USE_AMD64_IOPL */ #ifdef USE_DEV_IO static int IoFd = -1; Bool xf86EnableIO() { if (IoFd >= 0) return TRUE; if ((IoFd = open("/dev/io", O_RDWR)) == -1) { xf86Msg(X_WARNING, "xf86EnableIO: " "Failed to open /dev/io for extended I/O"); return FALSE; } return TRUE; } void xf86DisableIO() { if (IoFd < 0) return; close(IoFd); IoFd = -1; return; } #endif #ifdef __NetBSD__ /***************************************************************************/ /* Set TV output mode */ /***************************************************************************/ void xf86SetTVOut(int mode) { switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT case PCCONS:{ if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_ON, &mode) < 0) { xf86Msg(X_WARNING, "xf86SetTVOut: Could not set console to TV output, %s\n", strerror(errno)); } } break; #endif /* PCCONS_SUPPORT */ default: FatalError("Xf86SetTVOut: Unsupported console"); break; } return; } void xf86SetRGBOut() { switch (xf86Info.consType) { #ifdef PCCONS_SUPPORT case PCCONS:{ if (ioctl(xf86Info.consoleFd, CONSOLE_X_TV_OFF, 0) < 0) { xf86Msg(X_WARNING, "xf86SetTVOut: Could not set console to RGB output, %s\n", strerror(errno)); } } break; #endif /* PCCONS_SUPPORT */ default: FatalError("Xf86SetTVOut: Unsupported console"); break; } return; } #endif xorg-server-21.1.16/hw/xfree86/os-support/bsd/ppc_video.c0000644000175000017500000000506614757411105016566 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" #include "bus/Pci.h" /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ #ifdef __OpenBSD__ #define DEV_MEM "/dev/xf86" #endif Bool xf86EnableIO(void); void xf86DisableIO(void); void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; xf86EnableIO(); } volatile unsigned char *ioBase = MAP_FAILED; Bool xf86EnableIO() { int fd = xf86Info.consoleFd; xf86MsgVerb(X_WARNING, 3, "xf86EnableIO %d\n", fd); if (ioBase == MAP_FAILED) { ioBase = mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0xf2000000); xf86MsgVerb(X_INFO, 3, "xf86EnableIO: %08x\n", ioBase); if (ioBase == MAP_FAILED) { xf86MsgVerb(X_WARNING, 3, "Can't map IO space!\n"); return FALSE; } } return TRUE; } void xf86DisableIO() { if (ioBase != MAP_FAILED) { munmap(__UNVOLATILE(ioBase), 0x10000); ioBase = MAP_FAILED; } } xorg-server-21.1.16/hw/xfree86/os-support/bsd/sparc64_video.c0000644000175000017500000000340414757411105017260 /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat * * 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 names of Rich Murphey and David Wexelblat * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. Rich Murphey and * David Wexelblat make no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/bsd/bsd_kmod.c0000644000175000017500000000114114757411105016366 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "xf86_OSproc.h" /* * Load a FreeBSD kernel module. * This is used by the DRI/DRM to load a DRM kernel module when * the X server starts. It could be used for other purposes in the future. * Input: * modName - name of the kernel module (Ex: "tdfx") * Return: * 0 for failure, 1 for success */ int xf86LoadKernelModule(const char *modName) { if (kldload(modName) != -1) return 1; else return 0; } xorg-server-21.1.16/hw/xfree86/os-support/bsd/memrange.h0000644000175000017500000000401414757411105016406 /* * Memory range attribute operations, performed on /dev/mem */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _MEMRANGE_H #define _MEMRANGE_H /* Memory range attributes */ #define MDF_UNCACHEABLE (1<<0) /* region not cached */ #define MDF_WRITECOMBINE (1<<1) /* region supports "write combine" * action */ #define MDF_WRITETHROUGH (1<<2) /* write-through cached */ #define MDF_WRITEBACK (1<<3) /* write-back cached */ #define MDF_WRITEPROTECT (1<<4) /* read-only region */ #define MDF_ATTRMASK (0x00ffffff) #define MDF_FIXBASE (1<<24) /* fixed base */ #define MDF_FIXLEN (1<<25) /* fixed length */ #define MDF_FIRMWARE (1<<26) /* set by firmware (XXX not useful?) */ #define MDF_ACTIVE (1<<27) /* currently active */ #define MDF_BOGUS (1<<28) /* we don't like it */ #define MDF_FIXACTIVE (1<<29) /* can't be turned off */ #define MDF_BUSY (1<<30) /* range is in use */ struct mem_range_desc { u_int64_t mr_base; u_int64_t mr_len; int mr_flags; char mr_owner[8]; }; struct mem_range_op { struct mem_range_desc *mo_desc; int mo_arg[2]; #define MEMRANGE_SET_UPDATE 0 #define MEMRANGE_SET_REMOVE 1 /* XXX want a flag that says "set and undo when I exit" */ }; #define MEMRANGE_GET _IOWR('m', 50, struct mem_range_op) #define MEMRANGE_SET _IOW('m', 51, struct mem_range_op) #ifdef _KERNEL struct mem_range_softc; struct mem_range_ops { void (*init) __P((struct mem_range_softc * sc)); int (*set) __P((struct mem_range_softc * sc, struct mem_range_desc * mrd, int *arg)); void (*initAP) __P((struct mem_range_softc * sc)); }; struct mem_range_softc { struct mem_range_ops *mr_op; int mr_cap; int mr_ndesc; struct mem_range_desc *mr_desc; }; extern struct mem_range_softc mem_range_softc; extern int mem_range_attr_get __P((struct mem_range_desc * mrd, int *arg)); extern int mem_range_attr_set __P((struct mem_range_desc * mrd, int *arg)); extern void mem_range_AP_init __P((void)); #endif #endif xorg-server-21.1.16/hw/xfree86/os-support/shared/0000755000175000017500000000000014757411134015223 5xorg-server-21.1.16/hw/xfree86/os-support/shared/posix_tty.c0000644000175000017500000003355414757411105017361 /* * Copyright 1993-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. */ /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" static int GetBaud(int baudrate) { #ifdef B300 if (baudrate == 300) return B300; #endif #ifdef B1200 if (baudrate == 1200) return B1200; #endif #ifdef B2400 if (baudrate == 2400) return B2400; #endif #ifdef B4800 if (baudrate == 4800) return B4800; #endif #ifdef B9600 if (baudrate == 9600) return B9600; #endif #ifdef B19200 if (baudrate == 19200) return B19200; #endif #ifdef B38400 if (baudrate == 38400) return B38400; #endif #ifdef B57600 if (baudrate == 57600) return B57600; #endif #ifdef B115200 if (baudrate == 115200) return B115200; #endif #ifdef B230400 if (baudrate == 230400) return B230400; #endif #ifdef B460800 if (baudrate == 460800) return B460800; #endif return 0; } int xf86OpenSerial(XF86OptionPtr options) { struct termios t; int fd, i; char *dev; dev = xf86SetStrOption(options, "Device", NULL); if (!dev) { xf86Msg(X_ERROR, "xf86OpenSerial: No Device specified.\n"); return -1; } fd = xf86CheckIntOption(options, "fd", -1); if (fd == -1) SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK)); if (fd == -1) { xf86Msg(X_ERROR, "xf86OpenSerial: Cannot open device %s\n\t%s.\n", dev, strerror(errno)); free(dev); return -1; } if (!isatty(fd)) { /* Allow non-tty devices to be opened. */ free(dev); return fd; } /* set up default port parameters */ SYSCALL(tcgetattr(fd, &t)); t.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); t.c_oflag &= ~OPOST; t.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN); t.c_cflag &= ~(CSIZE | PARENB); t.c_cflag |= CS8 | CLOCAL; cfsetispeed(&t, B9600); cfsetospeed(&t, B9600); t.c_cc[VMIN] = 1; t.c_cc[VTIME] = 0; SYSCALL(tcsetattr(fd, TCSANOW, &t)); if (xf86SetSerial(fd, options) == -1) { SYSCALL(close(fd)); free(dev); return -1; } SYSCALL(i = fcntl(fd, F_GETFL, 0)); if (i == -1) { SYSCALL(close(fd)); free(dev); return -1; } i &= ~O_NONBLOCK; SYSCALL(i = fcntl(fd, F_SETFL, i)); if (i == -1) { SYSCALL(close(fd)); free(dev); return -1; } free(dev); return fd; } int xf86SetSerial(int fd, XF86OptionPtr options) { struct termios t; int val; char *s; int baud, r; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; SYSCALL(tcgetattr(fd, &t)); if ((val = xf86SetIntOption(options, "BaudRate", 0))) { if ((baud = GetBaud(val))) { cfsetispeed(&t, baud); cfsetospeed(&t, baud); } else { xf86Msg(X_ERROR, "Invalid Option BaudRate value: %d\n", val); return -1; } } if ((val = xf86SetIntOption(options, "StopBits", 0))) { switch (val) { case 1: t.c_cflag &= ~(CSTOPB); break; case 2: t.c_cflag |= CSTOPB; break; default: xf86Msg(X_ERROR, "Invalid Option StopBits value: %d\n", val); return -1; break; } } if ((val = xf86SetIntOption(options, "DataBits", 0))) { switch (val) { case 5: t.c_cflag &= ~(CSIZE); t.c_cflag |= CS5; break; case 6: t.c_cflag &= ~(CSIZE); t.c_cflag |= CS6; break; case 7: t.c_cflag &= ~(CSIZE); t.c_cflag |= CS7; break; case 8: t.c_cflag &= ~(CSIZE); t.c_cflag |= CS8; break; default: xf86Msg(X_ERROR, "Invalid Option DataBits value: %d\n", val); return -1; break; } } if ((s = xf86SetStrOption(options, "Parity", NULL))) { if (xf86NameCmp(s, "Odd") == 0) { t.c_cflag |= PARENB | PARODD; } else if (xf86NameCmp(s, "Even") == 0) { t.c_cflag |= PARENB; t.c_cflag &= ~(PARODD); } else if (xf86NameCmp(s, "None") == 0) { t.c_cflag &= ~(PARENB); } else { xf86Msg(X_ERROR, "Invalid Option Parity value: %s\n", s); free(s); return -1; } free(s); } if ((val = xf86SetIntOption(options, "Vmin", -1)) != -1) { t.c_cc[VMIN] = val; } if ((val = xf86SetIntOption(options, "Vtime", -1)) != -1) { t.c_cc[VTIME] = val; } if ((s = xf86SetStrOption(options, "FlowControl", NULL))) { xf86MarkOptionUsedByName(options, "FlowControl"); if (xf86NameCmp(s, "Xoff") == 0) { t.c_iflag |= IXOFF; } else if (xf86NameCmp(s, "Xon") == 0) { t.c_iflag |= IXON; } else if (xf86NameCmp(s, "XonXoff") == 0) { t.c_iflag |= IXON | IXOFF; } else if (xf86NameCmp(s, "None") == 0) { t.c_iflag &= ~(IXON | IXOFF); } else { xf86Msg(X_ERROR, "Invalid Option FlowControl value: %s\n", s); free(s); return -1; } free(s); } if ((xf86SetBoolOption(options, "ClearDTR", FALSE))) { #ifdef CLEARDTR_SUPPORT #if defined(TIOCMBIC) val = TIOCM_DTR; SYSCALL(ioctl(fd, TIOCMBIC, &val)); #else SYSCALL(ioctl(fd, TIOCCDTR, NULL)); #endif #else xf86Msg(X_WARNING, "Option ClearDTR not supported on this OS\n"); return -1; #endif xf86MarkOptionUsedByName(options, "ClearDTR"); } if ((xf86SetBoolOption(options, "ClearRTS", FALSE))) { xf86Msg(X_WARNING, "Option ClearRTS not supported on this OS\n"); return -1; xf86MarkOptionUsedByName(options, "ClearRTS"); } SYSCALL(r = tcsetattr(fd, TCSANOW, &t)); return r; } int xf86SetSerialSpeed(int fd, int speed) { struct termios t; int baud, r; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; SYSCALL(tcgetattr(fd, &t)); if ((baud = GetBaud(speed))) { cfsetispeed(&t, baud); cfsetospeed(&t, baud); } else { xf86Msg(X_ERROR, "Invalid Option BaudRate value: %d\n", speed); return -1; } SYSCALL(r = tcsetattr(fd, TCSANOW, &t)); return r; } int xf86ReadSerial(int fd, void *buf, int count) { int r; int i; SYSCALL(r = read(fd, buf, count)); DebugF("ReadingSerial: 0x%x", (unsigned char) *(((unsigned char *) buf))); for (i = 1; i < r; i++) DebugF(", 0x%x", (unsigned char) *(((unsigned char *) buf) + i)); DebugF("\n"); return r; } int xf86WriteSerial(int fd, const void *buf, int count) { int r; int i; DebugF("WritingSerial: 0x%x", (unsigned char) *(((unsigned char *) buf))); for (i = 1; i < count; i++) DebugF(", 0x%x", (unsigned char) *(((unsigned char *) buf) + i)); DebugF("\n"); SYSCALL(r = write(fd, buf, count)); return r; } int xf86CloseSerial(int fd) { int r; SYSCALL(r = close(fd)); return r; } int xf86WaitForInput(int fd, int timeout) { int r; struct pollfd poll_fd; poll_fd.fd = fd; poll_fd.events = POLLIN; /* convert microseconds to milliseconds */ timeout = (timeout + 999) / 1000; if (fd >= 0) { SYSCALL(r = xserver_poll(&poll_fd, 1, timeout)); } else { SYSCALL(r = xserver_poll(&poll_fd, 0, timeout)); } xf86ErrorFVerb(9, "poll returned %d\n", r); return r; } int xf86SerialSendBreak(int fd, int duration) { int r; SYSCALL(r = tcsendbreak(fd, duration)); return r; } int xf86FlushInput(int fd) { struct pollfd poll_fd; /* this needs to be big enough to flush an evdev event. */ char c[256]; DebugF("FlushingSerial\n"); if (tcflush(fd, TCIFLUSH) == 0) return 0; poll_fd.fd = fd; poll_fd.events = POLLIN; while (xserver_poll(&poll_fd, 1, 0) > 0) { if (read(fd, &c, sizeof(c)) < 1) return 0; } return 0; } static struct states { int xf; int os; } modemStates[] = { #ifdef TIOCM_LE { XF86_M_LE, TIOCM_LE}, #endif #ifdef TIOCM_DTR { XF86_M_DTR, TIOCM_DTR}, #endif #ifdef TIOCM_RTS { XF86_M_RTS, TIOCM_RTS}, #endif #ifdef TIOCM_ST { XF86_M_ST, TIOCM_ST}, #endif #ifdef TIOCM_SR { XF86_M_SR, TIOCM_SR}, #endif #ifdef TIOCM_CTS { XF86_M_CTS, TIOCM_CTS}, #endif #ifdef TIOCM_CAR { XF86_M_CAR, TIOCM_CAR}, #elif defined(TIOCM_CD) { XF86_M_CAR, TIOCM_CD}, #endif #ifdef TIOCM_RNG { XF86_M_RNG, TIOCM_RNG}, #elif defined(TIOCM_RI) { XF86_M_CAR, TIOCM_RI}, #endif #ifdef TIOCM_DSR { XF86_M_DSR, TIOCM_DSR}, #endif }; static int numStates = ARRAY_SIZE(modemStates); static int xf2osState(int state) { int i; int ret = 0; for (i = 0; i < numStates; i++) if (state & modemStates[i].xf) ret |= modemStates[i].os; return ret; } static int os2xfState(int state) { int i; int ret = 0; for (i = 0; i < numStates; i++) if (state & modemStates[i].os) ret |= modemStates[i].xf; return ret; } static int getOsStateMask(void) { int i; int ret = 0; for (i = 0; i < numStates; i++) ret |= modemStates[i].os; return ret; } static int osStateMask = 0; int xf86SetSerialModemState(int fd, int state) { int ret; int s; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; #ifndef TIOCMGET return -1; #else if (!osStateMask) osStateMask = getOsStateMask(); state = xf2osState(state); SYSCALL((ret = ioctl(fd, TIOCMGET, &s))); if (ret < 0) return -1; s &= ~osStateMask; s |= state; SYSCALL((ret = ioctl(fd, TIOCMSET, &s))); if (ret < 0) return -1; else return 0; #endif } int xf86GetSerialModemState(int fd) { int ret; int s; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; #ifndef TIOCMGET return -1; #else SYSCALL((ret = ioctl(fd, TIOCMGET, &s))); if (ret < 0) return -1; return os2xfState(s); #endif } int xf86SerialModemSetBits(int fd, int bits) { int ret; int s; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; #ifndef TIOCMGET return -1; #else s = xf2osState(bits); SYSCALL((ret = ioctl(fd, TIOCMBIS, &s))); return ret; #endif } int xf86SerialModemClearBits(int fd, int bits) { int ret; int s; if (fd < 0) return -1; /* Don't try to set parameters for non-tty devices. */ if (!isatty(fd)) return 0; #ifndef TIOCMGET return -1; #else s = xf2osState(bits); SYSCALL((ret = ioctl(fd, TIOCMBIC, &s))); return ret; #endif } xorg-server-21.1.16/hw/xfree86/os-support/shared/sigio.c0000644000175000017500000002115314757411105016421 /* sigio.c -- Support for SIGIO handler installation and removal * Created: Thu Jun 3 15:39:18 1999 by faith@precisioninsight.com * * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 * PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. * * Authors: Rickard E. (Rik) Faith */ /* * Copyright (c) 2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "inputstr.h" #ifdef HAVE_STROPTS_H #include #endif #ifdef MAXDEVICES /* MAXDEVICES represents the maximum number of input devices usable * at the same time plus one entry for DRM support. */ #define MAX_FUNCS (MAXDEVICES + 1) #else #define MAX_FUNCS 16 #endif typedef struct _xf86SigIOFunc { void (*f) (int, void *); int fd; void *closure; } Xf86SigIOFunc; static Xf86SigIOFunc xf86SigIOFuncs[MAX_FUNCS]; static int xf86SigIOMax; static struct pollfd *xf86SigIOFds; static int xf86SigIONum; static Bool xf86SigIOAdd(int fd) { struct pollfd *n; n = realloc(xf86SigIOFds, (xf86SigIONum + 1) * sizeof (struct pollfd)); if (!n) return FALSE; n[xf86SigIONum].fd = fd; n[xf86SigIONum].events = POLLIN; xf86SigIONum++; xf86SigIOFds = n; return TRUE; } static void xf86SigIORemove(int fd) { int i; for (i = 0; i < xf86SigIONum; i++) if (xf86SigIOFds[i].fd == fd) { memmove(&xf86SigIOFds[i], &xf86SigIOFds[i+1], (xf86SigIONum - i - 1) * sizeof (struct pollfd)); xf86SigIONum--; break; } } /* * SIGIO gives no way of discovering which fd signalled, select * to discover */ static void xf86SIGIO(int sig) { int i, f; int save_errno = errno; /* do not clobber the global errno */ int r; inSignalContext = TRUE; SYSCALL(r = xserver_poll(xf86SigIOFds, xf86SigIONum, 0)); for (f = 0; r > 0 && f < xf86SigIONum; f++) { if (xf86SigIOFds[f].revents & POLLIN) { for (i = 0; i < xf86SigIOMax; i++) if (xf86SigIOFuncs[i].f && xf86SigIOFuncs[i].fd == xf86SigIOFds[f].fd) (*xf86SigIOFuncs[i].f) (xf86SigIOFuncs[i].fd, xf86SigIOFuncs[i].closure); r--; } } if (r > 0) { xf86Msg(X_ERROR, "SIGIO %d descriptors not handled\n", r); } /* restore global errno */ errno = save_errno; inSignalContext = FALSE; } static int xf86IsPipe(int fd) { struct stat buf; if (fstat(fd, &buf) < 0) return 0; return S_ISFIFO(buf.st_mode); } static void block_sigio(void) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGIO); xthread_sigmask(SIG_BLOCK, &set, NULL); } static void release_sigio(void) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGIO); xthread_sigmask(SIG_UNBLOCK, &set, NULL); } int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) { struct sigaction sa; struct sigaction osa; int i; int installed = FALSE; for (i = 0; i < MAX_FUNCS; i++) { if (!xf86SigIOFuncs[i].f) { if (xf86IsPipe(fd)) return 0; block_sigio(); #ifdef O_ASYNC if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_ASYNC) == -1) { xf86Msg(X_WARNING, "fcntl(%d, O_ASYNC): %s\n", fd, strerror(errno)); } else { if (fcntl(fd, F_SETOWN, getpid()) == -1) { xf86Msg(X_WARNING, "fcntl(%d, F_SETOWN): %s\n", fd, strerror(errno)); } else { installed = TRUE; } } #endif #if defined(I_SETSIG) && defined(HAVE_ISASTREAM) /* System V Streams - used on Solaris for input devices */ if (!installed && isastream(fd)) { if (ioctl(fd, I_SETSIG, S_INPUT | S_ERROR | S_HANGUP) == -1) { xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG): %s\n", fd, strerror(errno)); } else { installed = TRUE; } } #endif if (!installed) { release_sigio(); return 0; } sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGIO); sa.sa_flags = SA_RESTART; sa.sa_handler = xf86SIGIO; sigaction(SIGIO, &sa, &osa); xf86SigIOFuncs[i].fd = fd; xf86SigIOFuncs[i].closure = closure; xf86SigIOFuncs[i].f = f; if (i >= xf86SigIOMax) xf86SigIOMax = i + 1; xf86SigIOAdd(fd); release_sigio(); return 1; } /* Allow overwriting of the closure and callback */ else if (xf86SigIOFuncs[i].fd == fd) { xf86SigIOFuncs[i].closure = closure; xf86SigIOFuncs[i].f = f; return 1; } } return 0; } int xf86RemoveSIGIOHandler(int fd) { struct sigaction sa; struct sigaction osa; int i; int max; int ret; max = 0; ret = 0; for (i = 0; i < MAX_FUNCS; i++) { if (xf86SigIOFuncs[i].f) { if (xf86SigIOFuncs[i].fd == fd) { xf86SigIOFuncs[i].f = 0; xf86SigIOFuncs[i].fd = 0; xf86SigIOFuncs[i].closure = 0; xf86SigIORemove(fd); ret = 1; } else { max = i + 1; } } } if (ret) { #ifdef O_ASYNC fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) & ~O_ASYNC); #endif #if defined(I_SETSIG) && defined(HAVE_ISASTREAM) if (isastream(fd)) { if (ioctl(fd, I_SETSIG, 0) == -1) { xf86Msg(X_WARNING, "fcntl(%d, I_SETSIG, 0): %s\n", fd, strerror(errno)); } } #endif xf86SigIOMax = max; if (!max) { sigemptyset(&sa.sa_mask); sigaddset(&sa.sa_mask, SIGIO); sa.sa_flags = 0; sa.sa_handler = SIG_IGN; sigaction(SIGIO, &sa, &osa); } } return ret; } xorg-server-21.1.16/hw/xfree86/os-support/shared/vidmem.c0000644000175000017500000000361414757411105016572 /* * Copyright (c) 1993-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "input.h" #include "scrnintstr.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" /* * This file contains the common part of the video memory mapping functions */ static VidMemInfo vidMemInfo = { FALSE, }; void xf86InitVidMem(void) { if (!vidMemInfo.initialised) { memset(&vidMemInfo, 0, sizeof(VidMemInfo)); xf86OSInitVidMem(&vidMemInfo); } } xorg-server-21.1.16/hw/xfree86/os-support/shared/ioperm_noop.c0000644000175000017500000000302214757411105017630 /* * Copyright 1993 by David Wexelblat * * 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 David Wexelblat not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. David Wexelblat makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL DAVID WEXELBLAT 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. * */ /* * Some platforms don't bother with I/O permissions, * or the permissions are implicit with opening/enabling the console. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" Bool xf86EnableIO(void) { return TRUE; } void xf86DisableIO(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/shared/agp_noop.c0000644000175000017500000000462114757411105017112 /* * Copyright (c) 2000-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * Abstraction of the AGP GART interface. Stubs for platforms without * AGP GART support. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" Bool xf86GARTCloseScreen(int screenNum) { return FALSE; } Bool xf86AgpGARTSupported(void) { return FALSE; } AgpInfoPtr xf86GetAGPInfo(int screenNum) { return NULL; } Bool xf86AcquireGART(int screenNum) { return FALSE; } Bool xf86ReleaseGART(int screenNum) { return FALSE; } int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { return -1; } Bool xf86DeallocateGARTMemory(int screenNum, int key) { return FALSE; } Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { return FALSE; } Bool xf86UnbindGARTMemory(int screenNum, int key) { return FALSE; } Bool xf86EnableAGP(int screenNum, CARD32 mode) { return FALSE; } xorg-server-21.1.16/hw/xfree86/os-support/shared/pm_noop.c0000644000175000017500000000327214757411105016760 /* * Copyright (c) 2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* Stubs for the OS-support layer power-management functions. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" PMClose xf86OSPMOpen(void) { return NULL; } xorg-server-21.1.16/hw/xfree86/os-support/shared/kmod_noop.c0000644000175000017500000000313514757411105017274 /* * Copyright (c) 2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86_OSproc.h" int xf86LoadKernelModule(const char *pathname) { (void) pathname; return 0; /* failure */ } xorg-server-21.1.16/hw/xfree86/os-support/shared/VTsw_usl.c0000644000175000017500000000444414757411105017101 /* * Copyright 1993 by David Wexelblat * * 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 David Wexelblat not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. David Wexelblat makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" /* * Handle the VT-switching interface for OSs that use USL-style ioctl()s * (the sysv, sco, and linux subdirs). */ /* * This function is the signal handler for the VT-switching signal. It * is only referenced inside the OS-support layer. */ void xf86VTRequest(int sig) { OsSignal(sig, (void (*)(int)) xf86VTRequest); xf86Info.vtRequestsPending = TRUE; return; } Bool xf86VTSwitchPending(void) { return xf86Info.vtRequestsPending ? TRUE : FALSE; } Bool xf86VTSwitchAway(void) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) return FALSE; else return TRUE; } Bool xf86VTSwitchTo(void) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) return FALSE; else return TRUE; } Bool xf86VTActivate(int vtno) { #ifdef VT_ACTIVATE if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { return FALSE; } #endif return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/shared/VTsw_noop.c0000644000175000017500000000306414757411105017246 /* * Copyright 1993 by David Wexelblat * * 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 David Wexelblat not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. David Wexelblat makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL DAVID WEXELBLAT 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_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" /* * No-op functions for OSs without VTs */ Bool xf86VTSwitchPending(void) { return FALSE; } Bool xf86VTSwitchAway(void) { return FALSE; } Bool xf86VTSwitchTo(void) { return TRUE; } Bool xf86VTActivate(int vtno) { return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/shared/sigiostubs.c0000644000175000017500000000327214757411105017504 /* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" int xf86InstallSIGIOHandler(int fd, void (*f) (int, void *), void *closure) { return 0; } int xf86RemoveSIGIOHandler(int fd) { return 0; } xorg-server-21.1.16/hw/xfree86/os-support/bus/0000755000175000017500000000000014757411134014546 5xorg-server-21.1.16/hw/xfree86/os-support/bus/Makefile.am0000644000175000017500000000063214757411105016521 noinst_LTLIBRARIES = libbus.la sdk_HEADERS = xf86Pci.h PCI_SOURCES = if XORG_BUS_PCI PCI_SOURCES += Pci.c Pci.h endif if XORG_BUS_BSDPCI PCI_SOURCES += bsd_pci.c endif if XORG_BUS_SPARC PLATFORM_SOURCES = Sbus.c sdk_HEADERS += xf86Sbus.h endif libbus_la_SOURCES = $(PCI_SOURCES) $(PLATFORM_SOURCES) nobus.c AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) EXTRA_DIST = $(sdk_HEADERS) xorg-server-21.1.16/hw/xfree86/os-support/bus/xf86Pci.h0000644000175000017500000002246714757411105016077 /* * Copyright 1998 by Concurrent Computer Corporation * * 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 Concurrent Computer * Corporation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Concurrent Computer Corporation makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION 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 1998 by Metro Link Incorporated * * 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 Metro Link * Incorporated not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Metro Link Incorporated makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED 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. * * This file is derived in part from the original xf86_PCI.h that included * following copyright message: * * Copyright 1995 by Robin Cutshaw * * 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 names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains just the public interface to the PCI code. * Drivers should use this file rather than Pci.h. */ #ifndef _XF86PCI_H #define _XF86PCI_H 1 #include #include #include "misc.h" #include /* * PCI cfg space definitions (e.g. stuff right out of the PCI spec) */ /* Device identification register */ #define PCI_ID_REG 0x00 /* Command and status register */ #define PCI_CMD_STAT_REG 0x04 #define PCI_CMD_BASE_REG 0x10 #define PCI_CMD_BIOS_REG 0x30 #define PCI_CMD_MASK 0xffff #define PCI_CMD_IO_ENABLE 0x01 #define PCI_CMD_MEM_ENABLE 0x02 #define PCI_CMD_MASTER_ENABLE 0x04 #define PCI_CMD_SPECIAL_ENABLE 0x08 #define PCI_CMD_INVALIDATE_ENABLE 0x10 #define PCI_CMD_PALETTE_ENABLE 0x20 #define PCI_CMD_PARITY_ENABLE 0x40 #define PCI_CMD_STEPPING_ENABLE 0x80 #define PCI_CMD_SERR_ENABLE 0x100 #define PCI_CMD_BACKTOBACK_ENABLE 0x200 #define PCI_CMD_BIOS_ENABLE 0x01 /* base class */ #define PCI_CLASS_REG 0x08 #define PCI_CLASS_MASK 0xff000000 #define PCI_CLASS_SHIFT 24 #define PCI_CLASS_EXTRACT(x) \ (((x) & PCI_CLASS_MASK) >> PCI_CLASS_SHIFT) /* base class values */ #define PCI_CLASS_PREHISTORIC 0x00 #define PCI_CLASS_MASS_STORAGE 0x01 #define PCI_CLASS_NETWORK 0x02 #define PCI_CLASS_DISPLAY 0x03 #define PCI_CLASS_MULTIMEDIA 0x04 #define PCI_CLASS_MEMORY 0x05 #define PCI_CLASS_BRIDGE 0x06 #define PCI_CLASS_COMMUNICATIONS 0x07 #define PCI_CLASS_SYSPERIPH 0x08 #define PCI_CLASS_INPUT 0x09 #define PCI_CLASS_DOCKING 0x0a #define PCI_CLASS_PROCESSOR 0x0b #define PCI_CLASS_SERIALBUS 0x0c #define PCI_CLASS_WIRELESS 0x0d #define PCI_CLASS_I2O 0x0e #define PCI_CLASS_SATELLITE 0x0f #define PCI_CLASS_CRYPT 0x10 #define PCI_CLASS_DATA_ACQUISTION 0x11 #define PCI_CLASS_UNDEFINED 0xff /* sub class */ #define PCI_SUBCLASS_MASK 0x00ff0000 #define PCI_SUBCLASS_SHIFT 16 #define PCI_SUBCLASS_EXTRACT(x) \ (((x) & PCI_SUBCLASS_MASK) >> PCI_SUBCLASS_SHIFT) /* Sub class values */ /* 0x00 prehistoric subclasses */ #define PCI_SUBCLASS_PREHISTORIC_MISC 0x00 #define PCI_SUBCLASS_PREHISTORIC_VGA 0x01 /* 0x03 display subclasses */ #define PCI_SUBCLASS_DISPLAY_VGA 0x00 #define PCI_SUBCLASS_DISPLAY_XGA 0x01 #define PCI_SUBCLASS_DISPLAY_MISC 0x80 /* 0x04 multimedia subclasses */ #define PCI_SUBCLASS_MULTIMEDIA_VIDEO 0x00 #define PCI_SUBCLASS_MULTIMEDIA_AUDIO 0x01 #define PCI_SUBCLASS_MULTIMEDIA_MISC 0x80 /* 0x06 bridge subclasses */ #define PCI_SUBCLASS_BRIDGE_HOST 0x00 #define PCI_SUBCLASS_BRIDGE_ISA 0x01 #define PCI_SUBCLASS_BRIDGE_EISA 0x02 #define PCI_SUBCLASS_BRIDGE_MC 0x03 #define PCI_SUBCLASS_BRIDGE_PCI 0x04 #define PCI_SUBCLASS_BRIDGE_PCMCIA 0x05 #define PCI_SUBCLASS_BRIDGE_NUBUS 0x06 #define PCI_SUBCLASS_BRIDGE_CARDBUS 0x07 #define PCI_SUBCLASS_BRIDGE_RACEWAY 0x08 #define PCI_SUBCLASS_BRIDGE_MISC 0x80 #define PCI_IF_BRIDGE_PCI_SUBTRACTIVE 0x01 /* 0x0b processor subclasses */ #define PCI_SUBCLASS_PROCESSOR_386 0x00 #define PCI_SUBCLASS_PROCESSOR_486 0x01 #define PCI_SUBCLASS_PROCESSOR_PENTIUM 0x02 #define PCI_SUBCLASS_PROCESSOR_ALPHA 0x10 #define PCI_SUBCLASS_PROCESSOR_POWERPC 0x20 #define PCI_SUBCLASS_PROCESSOR_MIPS 0x30 #define PCI_SUBCLASS_PROCESSOR_COPROC 0x40 /* PCI-PCI bridge mapping registers */ #define PCI_PCI_BRIDGE_BUS_REG 0x18 #define PCI_SUBORDINATE_BUS_MASK 0x00ff0000 #define PCI_SECONDARY_BUS_MASK 0x0000ff00 #define PCI_PRIMARY_BUS_MASK 0x000000ff #define PCI_PCI_BRIDGE_IO_REG 0x1c #define PCI_PCI_BRIDGE_MEM_REG 0x20 #define PCI_PCI_BRIDGE_PMEM_REG 0x24 #define PCI_PCI_BRIDGE_CONTROL_REG 0x3E #define PCI_PCI_BRIDGE_PARITY_EN 0x01 #define PCI_PCI_BRIDGE_SERR_EN 0x02 #define PCI_PCI_BRIDGE_ISA_EN 0x04 #define PCI_PCI_BRIDGE_VGA_EN 0x08 #define PCI_PCI_BRIDGE_MASTER_ABORT_EN 0x20 #define PCI_PCI_BRIDGE_SECONDARY_RESET 0x40 #define PCI_PCI_BRIDGE_FAST_B2B_EN 0x80 /* Subsystem identification register */ #define PCI_SUBSYSTEM_ID_REG 0x2c /* User defined cfg space regs */ #define PCI_REG_USERCONFIG 0x40 #define PCI_OPTION_REG 0x40 /* * Typedefs, etc... */ /* Public PCI access functions */ extern _X_EXPORT Bool xf86scanpci(void); extern _X_EXPORT char *DRICreatePCIBusID(const struct pci_device *dev); #endif /* _XF86PCI_H */ xorg-server-21.1.16/hw/xfree86/os-support/bus/xf86Sbus.h0000644000175000017500000000402214757411105016263 /* * Platform specific SBUS and OpenPROM access declarations. * * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * JAKUB JELINEK 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _XF86_SBUS_H #define _XF86_SBUS_H #if defined(__linux__) #include #include #include #include #elif defined(SVR4) #include #include #elif defined(__OpenBSD__) && defined(__sparc64__) /* XXX */ #elif defined(CSRG_BASED) #if defined(__FreeBSD__) #include #include #include #else #include #endif #else #include #endif #ifndef FBTYPE_SUNGP3 #define FBTYPE_SUNGP3 -1 #endif #ifndef FBTYPE_MDICOLOR #define FBTYPE_MDICOLOR -1 #endif #ifndef FBTYPE_SUNLEO #define FBTYPE_SUNLEO -1 #endif #ifndef FBTYPE_TCXCOLOR #define FBTYPE_TCXCOLOR -1 #endif #ifndef FBTYPE_CREATOR #define FBTYPE_CREATOR -1 #endif #endif /* _XF86_SBUS_H */ xorg-server-21.1.16/hw/xfree86/os-support/bus/Makefile.in0000644000175000017500000006737014757411115016547 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XORG_BUS_PCI_TRUE@am__append_1 = Pci.c Pci.h @XORG_BUS_BSDPCI_TRUE@am__append_2 = bsd_pci.c @XORG_BUS_SPARC_TRUE@am__append_3 = xf86Sbus.h subdir = hw/xfree86/os-support/bus ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbus_la_LIBADD = am__libbus_la_SOURCES_DIST = Pci.c Pci.h bsd_pci.c Sbus.c nobus.c @XORG_BUS_PCI_TRUE@am__objects_1 = Pci.lo @XORG_BUS_BSDPCI_TRUE@am__objects_2 = bsd_pci.lo am__objects_3 = $(am__objects_1) $(am__objects_2) @XORG_BUS_SPARC_TRUE@am__objects_4 = Sbus.lo am_libbus_la_OBJECTS = $(am__objects_3) $(am__objects_4) nobus.lo libbus_la_OBJECTS = $(am_libbus_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/Pci.Plo ./$(DEPDIR)/Sbus.Plo \ ./$(DEPDIR)/bsd_pci.Plo ./$(DEPDIR)/nobus.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libbus_la_SOURCES) DIST_SOURCES = $(am__libbus_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = xf86Pci.h xf86Sbus.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbus.la sdk_HEADERS = xf86Pci.h $(am__append_3) PCI_SOURCES = $(am__append_1) $(am__append_2) @XORG_BUS_SPARC_TRUE@PLATFORM_SOURCES = Sbus.c libbus_la_SOURCES = $(PCI_SOURCES) $(PLATFORM_SOURCES) nobus.c AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) EXTRA_DIST = $(sdk_HEADERS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/bus/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/bus/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libbus.la: $(libbus_la_OBJECTS) $(libbus_la_DEPENDENCIES) $(EXTRA_libbus_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbus_la_OBJECTS) $(libbus_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pci.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Sbus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsd_pci.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nobus.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/Pci.Plo -rm -f ./$(DEPDIR)/Sbus.Plo -rm -f ./$(DEPDIR)/bsd_pci.Plo -rm -f ./$(DEPDIR)/nobus.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/Pci.Plo -rm -f ./$(DEPDIR)/Sbus.Plo -rm -f ./$(DEPDIR)/bsd_pci.Plo -rm -f ./$(DEPDIR)/nobus.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/bus/Pci.c0000644000175000017500000001573414757411105015355 /* * Copyright 1998 by Concurrent Computer Corporation * * 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 Concurrent Computer * Corporation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Concurrent Computer Corporation makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION 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 1998 by Metro Link Incorporated * * 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 Metro Link * Incorporated not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Metro Link Incorporated makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED 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. * * This software is derived from the original XFree86 PCI code * which includes the following copyright notices as well: * * Copyright 1995 by Robin Cutshaw * * 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 names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. * * This code is also based heavily on the code in FreeBSD-current, which was * written by Wolfgang Stanglmeier, and contains the following copyright: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /* * Copyright (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "Pci.h" Bool xf86scanpci(void) { Bool success = FALSE; success = (pci_system_init() == 0); /* choose correct platform/OS specific PCI init routine */ osPciInit(); return success; } xorg-server-21.1.16/hw/xfree86/os-support/bus/Pci.h0000644000175000017500000001477214757411105015363 /* * Copyright 1998 by Concurrent Computer Corporation * * 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 Concurrent Computer * Corporation not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Concurrent Computer Corporation makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION 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 1998 by Metro Link Incorporated * * 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 Metro Link * Incorporated not be used in advertising or publicity pertaining to * distribution of the software without specific, written prior * permission. Metro Link Incorporated makes no representations * about the suitability of this software for any purpose. It is * provided "as is" without express or implied warranty. * * METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED 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. * * This file is derived in part from the original xf86_PCI.h that included * following copyright message: * * Copyright 1995 by Robin Cutshaw * * 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 names of the above listed copyright holder(s) * not be used in advertising or publicity pertaining to distribution of * the software without specific, written prior permission. The above listed * copyright holder(s) make(s) no representations about the suitability of this * software for any purpose. It is provided "as is" without express or * implied warranty. * * THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 (c) 1999-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file has the private Pci definitions. The public ones are imported * from xf86Pci.h. Drivers should not use this file. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _PCI_H #define _PCI_H 1 #include "xf86Pci.h" /* * Global Definitions */ #if (defined(__alpha__) || defined(__ia64__)) && defined (__linux__) #define PCI_DOM_MASK 0x01fful #else #define PCI_DOM_MASK 0x0ffu #endif #ifndef PCI_DOM_MASK #define PCI_DOM_MASK 0x0ffu #endif #define PCI_DOMBUS_MASK (((PCI_DOM_MASK) << 8) | 0x0ffu) /* * "b" contains an optional domain number. */ #define PCI_MAKE_TAG(b,d,f) ((((b) & (PCI_DOMBUS_MASK)) << 16) | \ (((d) & 0x00001fu) << 11) | \ (((f) & 0x000007u) << 8)) #define PCI_MAKE_BUS(d,b) ((((d) & (PCI_DOM_MASK)) << 8) | ((b) & 0xffu)) #define PCI_DOM_FROM_BUS(bus) (((bus) >> 8) & (PCI_DOM_MASK)) #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u) #if defined(__linux__) #define osPciInit(x) do {} while (0) #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || \ defined(__OpenBSD__) || defined(__NetBSD__) || \ defined(__DragonFly__) || defined(__sun) || defined(__GNU__) extern void osPciInit(void); #else #error No PCI support available for this architecture/OS combination #endif #endif /* _PCI_H */ xorg-server-21.1.16/hw/xfree86/os-support/bus/bsd_pci.c0000644000175000017500000000331314757411105016233 /* * Copyright © 2007 Intel Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: * Eric Anholt * */ /** * @file bsd_pci.c * * This is a trivial implementation of the remaining PCI support hooks in the * X Server that is unaware of domains. * * Most of even this should go away once drivers are converted and the * old interfaces are confirmed to all be obsolete. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "compiler.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "Pci.h" #include "pciaccess.h" void osPciInit(void) { xf86InitVidMem(); } xorg-server-21.1.16/hw/xfree86/os-support/bus/Sbus.c0000644000175000017500000005042514757411105015552 /* * SBUS and OpenPROM access functions. * * Copyright (C) 2000 Jakub Jelinek (jakub@redhat.com) * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * JAKUB JELINEK 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include #ifdef __sun #include #endif #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86sbusBus.h" #include "xf86Sbus.h" int promRootNode; static int promFd = -1; static int promCurrentNode; static int promOpenCount = 0; static int promP1275 = -1; #define MAX_PROP 128 #define MAX_VAL (4096-128-4) static struct openpromio *promOpio; sbusDevicePtr *xf86SbusInfo = NULL; struct sbus_devtable sbusDeviceTable[] = { {SBUS_DEVICE_BW2, FBTYPE_SUN2BW, "bwtwo", "sunbw2", "Sun Monochrome (bwtwo)"}, {SBUS_DEVICE_CG2, FBTYPE_SUN2COLOR, "cgtwo", NULL, "Sun Color2 (cgtwo)"}, {SBUS_DEVICE_CG3, FBTYPE_SUN3COLOR, "cgthree", "suncg3", "Sun Color3 (cgthree)"}, {SBUS_DEVICE_CG4, FBTYPE_SUN4COLOR, "cgfour", NULL, "Sun Color4 (cgfour)"}, {SBUS_DEVICE_CG6, FBTYPE_SUNFAST_COLOR, "cgsix", "suncg6", "Sun GX"}, {SBUS_DEVICE_CG8, FBTYPE_MEMCOLOR, "cgeight", NULL, "Sun CG8/RasterOps"}, {SBUS_DEVICE_CG12, FBTYPE_SUNGP3, "cgtwelve", NULL, "Sun GS (cgtwelve)"}, {SBUS_DEVICE_CG14, FBTYPE_MDICOLOR, "cgfourteen", "suncg14", "Sun SX"}, {SBUS_DEVICE_GT, FBTYPE_SUNGT, "gt", NULL, "Sun Graphics Tower"}, {SBUS_DEVICE_MGX, -1, "mgx", NULL, "Quantum 3D MGXplus"}, {SBUS_DEVICE_LEO, FBTYPE_SUNLEO, "leo", "sunleo", "Sun ZX or Turbo ZX"}, {SBUS_DEVICE_TCX, FBTYPE_TCXCOLOR, "tcx", "suntcx", "Sun TCX"}, {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "ffb", "sunffb", "Sun FFB"}, {SBUS_DEVICE_FFB, FBTYPE_CREATOR, "afb", "sunffb", "Sun Elite3D"}, {0, 0, NULL} }; int promGetSibling(int node) { promOpio->oprom_size = sizeof(int); if (node == -1) return 0; *(int *) promOpio->oprom_array = node; if (ioctl(promFd, OPROMNEXT, promOpio) < 0) return 0; promCurrentNode = *(int *) promOpio->oprom_array; return *(int *) promOpio->oprom_array; } int promGetChild(int node) { promOpio->oprom_size = sizeof(int); if (!node || node == -1) return 0; *(int *) promOpio->oprom_array = node; if (ioctl(promFd, OPROMCHILD, promOpio) < 0) return 0; promCurrentNode = *(int *) promOpio->oprom_array; return *(int *) promOpio->oprom_array; } char * promGetProperty(const char *prop, int *lenp) { promOpio->oprom_size = MAX_VAL; strcpy(promOpio->oprom_array, prop); if (ioctl(promFd, OPROMGETPROP, promOpio) < 0) return 0; if (lenp) *lenp = promOpio->oprom_size; return promOpio->oprom_array; } int promGetBool(const char *prop) { promOpio->oprom_size = 0; *(int *) promOpio->oprom_array = 0; for (;;) { promOpio->oprom_size = MAX_PROP; if (ioctl(promFd, OPROMNXTPROP, promOpio) < 0) return 0; if (!promOpio->oprom_size) return 0; if (!strcmp(promOpio->oprom_array, prop)) return 1; } } #define PROM_NODE_SIBLING 0x01 #define PROM_NODE_PREF 0x02 #define PROM_NODE_SBUS 0x04 #define PROM_NODE_EBUS 0x08 #define PROM_NODE_PCI 0x10 static int promSetNode(sbusPromNodePtr pnode) { int node; if (!pnode->node || pnode->node == -1) return -1; if (pnode->cookie[0] & PROM_NODE_SIBLING) node = promGetSibling(pnode->cookie[1]); else node = promGetChild(pnode->cookie[1]); if (pnode->node != node) return -1; return 0; } static void promIsP1275(void) { #ifdef __linux__ FILE *f; char buffer[1024]; if (promP1275 != -1) return; promP1275 = 0; f = fopen("/proc/cpuinfo", "r"); if (!f) return; while (fgets(buffer, 1024, f) != NULL) if (!strncmp(buffer, "type", 4) && strstr(buffer, "sun4u")) { promP1275 = 1; break; } fclose(f); #elif defined(__sun) struct utsname buffer; if ((uname(&buffer) >= 0) && !strcmp(buffer.machine, "sun4u")) promP1275 = TRUE; else promP1275 = FALSE; #elif defined(__FreeBSD__) promP1275 = TRUE; #else #error Missing promIsP1275() function for this OS #endif } void sparcPromClose(void) { if (promOpenCount > 1) { promOpenCount--; return; } if (promFd != -1) { close(promFd); promFd = -1; } free(promOpio); promOpio = NULL; promOpenCount = 0; } int sparcPromInit(void) { if (promOpenCount) { promOpenCount++; return 0; } promFd = open("/dev/openprom", O_RDONLY, 0); if (promFd == -1) return -1; promOpio = (struct openpromio *) malloc(4096); if (!promOpio) { sparcPromClose(); return -1; } promRootNode = promGetSibling(0); if (!promRootNode) { sparcPromClose(); return -1; } promIsP1275(); promOpenCount++; return 0; } char * sparcPromGetProperty(sbusPromNodePtr pnode, const char *prop, int *lenp) { if (promSetNode(pnode)) return NULL; return promGetProperty(prop, lenp); } int sparcPromGetBool(sbusPromNodePtr pnode, const char *prop) { if (promSetNode(pnode)) return 0; return promGetBool(prop); } static char * promWalkGetDriverName(int node, int oldnode) { int nextnode; int len; char *prop; int devId, i; prop = promGetProperty("device_type", &len); if (prop && (len > 0)) do { if (!strcmp(prop, "display")) { prop = promGetProperty("name", &len); if (!prop || len <= 0) break; while ((*prop >= 'A' && *prop <= 'Z') || *prop == ',') prop++; for (i = 0; sbusDeviceTable[i].devId; i++) if (!strcmp(prop, sbusDeviceTable[i].promName)) break; devId = sbusDeviceTable[i].devId; if (!devId) break; if (sbusDeviceTable[i].driverName) return sbusDeviceTable[i].driverName; } } while (0); nextnode = promGetChild(node); if (nextnode) { char *name; name = promWalkGetDriverName(nextnode, node); if (name) return name; } nextnode = promGetSibling(node); if (nextnode) return promWalkGetDriverName(nextnode, node); return NULL; } char * sparcDriverName(void) { char *name; if (sparcPromInit() < 0) return NULL; promGetSibling(0); name = promWalkGetDriverName(promRootNode, 0); sparcPromClose(); return name; } static void promWalkAssignNodes(int node, int oldnode, int flags, sbusDevicePtr * devicePtrs) { int nextnode; int len, sbus = flags & PROM_NODE_SBUS; char *prop; int devId, i, j; sbusPromNode pNode, pNode2; prop = promGetProperty("device_type", &len); if (prop && (len > 0)) do { if (!strcmp(prop, "display")) { prop = promGetProperty("name", &len); if (!prop || len <= 0) break; while ((*prop >= 'A' && *prop <= 'Z') || *prop == ',') prop++; for (i = 0; sbusDeviceTable[i].devId; i++) if (!strcmp(prop, sbusDeviceTable[i].promName)) break; devId = sbusDeviceTable[i].devId; if (!devId) break; if (!sbus) { if (devId == SBUS_DEVICE_FFB) { /* * All /SUNW,ffb outside of SBUS tree come before all * /SUNW,afb outside of SBUS tree in Linux. */ if (!strcmp(prop, "afb")) flags |= PROM_NODE_PREF; } else if (devId != SBUS_DEVICE_CG14) break; } for (i = 0; i < 32; i++) { if (!devicePtrs[i] || devicePtrs[i]->devId != devId) continue; if (devicePtrs[i]->node.node) { if ((devicePtrs[i]->node. cookie[0] & ~PROM_NODE_SIBLING) <= (flags & ~PROM_NODE_SIBLING)) continue; for (j = i + 1, pNode = devicePtrs[i]->node; j < 32; j++) { if (!devicePtrs[j] || devicePtrs[j]->devId != devId) continue; pNode2 = devicePtrs[j]->node; devicePtrs[j]->node = pNode; pNode = pNode2; } } devicePtrs[i]->node.node = node; devicePtrs[i]->node.cookie[0] = flags; devicePtrs[i]->node.cookie[1] = oldnode; break; } break; } } while (0); prop = promGetProperty("name", &len); if (prop && len > 0) { if (!strcmp(prop, "sbus") || !strcmp(prop, "sbi")) sbus = PROM_NODE_SBUS; } nextnode = promGetChild(node); if (nextnode) promWalkAssignNodes(nextnode, node, sbus, devicePtrs); nextnode = promGetSibling(node); if (nextnode) promWalkAssignNodes(nextnode, node, PROM_NODE_SIBLING | sbus, devicePtrs); } void sparcPromAssignNodes(void) { sbusDevicePtr psdp, *psdpp; int n, holes = 0, i, j; FILE *f; sbusDevicePtr devicePtrs[32]; memset(devicePtrs, 0, sizeof(devicePtrs)); for (psdpp = xf86SbusInfo, n = 0; (psdp = *psdpp); psdpp++, n++) { if (psdp->fbNum != n) holes = 1; devicePtrs[psdp->fbNum] = psdp; } if (holes && (f = fopen("/proc/fb", "r")) != NULL) { /* We could not open one of fb devices, check /proc/fb to see what * were the types of the cards missed. */ char buffer[64]; int fbNum, devId; static struct { int devId; char *prefix; } procFbPrefixes[] = { {SBUS_DEVICE_BW2, "BWtwo"}, {SBUS_DEVICE_CG14, "CGfourteen"}, {SBUS_DEVICE_CG6, "CGsix"}, {SBUS_DEVICE_CG3, "CGthree"}, {SBUS_DEVICE_FFB, "Creator"}, {SBUS_DEVICE_FFB, "Elite 3D"}, {SBUS_DEVICE_LEO, "Leo"}, {SBUS_DEVICE_TCX, "TCX"}, {0, NULL}, }; while (fscanf(f, "%d %63s\n", &fbNum, buffer) == 2) { for (i = 0; procFbPrefixes[i].devId; i++) if (!strncmp(procFbPrefixes[i].prefix, buffer, strlen(procFbPrefixes[i].prefix))) break; devId = procFbPrefixes[i].devId; if (!devId) continue; if (devicePtrs[fbNum]) { if (devicePtrs[fbNum]->devId != devId) xf86ErrorF("Inconsistent /proc/fb with FBIOGATTR\n"); } else if (!devicePtrs[fbNum]) { devicePtrs[fbNum] = psdp = xnfcalloc(sizeof(sbusDevice), 1); psdp->devId = devId; psdp->fbNum = fbNum; psdp->fd = -2; } } fclose(f); } promGetSibling(0); promWalkAssignNodes(promRootNode, 0, PROM_NODE_PREF, devicePtrs); for (i = 0, j = 0; i < 32; i++) if (devicePtrs[i] && devicePtrs[i]->fbNum == -1) j++; xf86SbusInfo = xnfreallocarray(xf86SbusInfo, n + j + 1, sizeof(psdp)); for (i = 0, psdpp = xf86SbusInfo; i < 32; i++) if (devicePtrs[i]) { if (devicePtrs[i]->fbNum == -1) { memmove(psdpp + 1, psdpp, sizeof(psdpp) * (n + 1)); *psdpp = devicePtrs[i]; } else n--; } } static char * promGetReg(int type) { char *prop; int len; static char regstr[40]; regstr[0] = 0; prop = promGetProperty("reg", &len); if (prop && len >= 4) { unsigned int *reg = (unsigned int *) prop; if (!promP1275 || (type == PROM_NODE_SBUS) || (type == PROM_NODE_EBUS)) snprintf(regstr, sizeof(regstr), "@%x,%x", reg[0], reg[1]); else if (type == PROM_NODE_PCI) { if ((reg[0] >> 8) & 7) snprintf(regstr, sizeof(regstr), "@%x,%x", (reg[0] >> 11) & 0x1f, (reg[0] >> 8) & 7); else snprintf(regstr, sizeof(regstr), "@%x", (reg[0] >> 11) & 0x1f); } else if (len == 4) snprintf(regstr, sizeof(regstr), "@%x", reg[0]); else { unsigned int regs[2]; /* Things get more complicated on UPA. If upa-portid exists, then address is @upa-portid,second-int-in-reg, otherwise it is @first-int-in-reg/16,second-int-in-reg (well, probably upa-portid always exists, but just to be safe). */ memcpy(regs, reg, sizeof(regs)); prop = promGetProperty("upa-portid", &len); if (prop && len == 4) { reg = (unsigned int *) prop; snprintf(regstr, sizeof(regstr), "@%x,%x", reg[0], regs[1]); } else snprintf(regstr, sizeof(regstr), "@%x,%x", regs[0] >> 4, regs[1]); } } return regstr; } static int promWalkNode2Pathname(char *path, int parent, int node, int searchNode, int type) { int nextnode; int len, ntype = type; char *prop, *p; prop = promGetProperty("name", &len); *path = '/'; if (!prop || len <= 0) return 0; if ((!strcmp(prop, "sbus") || !strcmp(prop, "sbi")) && !type) ntype = PROM_NODE_SBUS; else if (!strcmp(prop, "ebus") && type == PROM_NODE_PCI) ntype = PROM_NODE_EBUS; else if (!strcmp(prop, "pci") && !type) ntype = PROM_NODE_PCI; strcpy(path + 1, prop); p = promGetReg(type); if (*p) strcat(path, p); if (node == searchNode) return 1; nextnode = promGetChild(node); if (nextnode && promWalkNode2Pathname(strchr(path, 0), node, nextnode, searchNode, ntype)) return 1; nextnode = promGetSibling(node); if (nextnode && promWalkNode2Pathname(path, parent, nextnode, searchNode, type)) return 1; return 0; } char * sparcPromNode2Pathname(sbusPromNodePtr pnode) { char *ret; if (!pnode->node) return NULL; ret = malloc(4096); if (!ret) return NULL; if (promWalkNode2Pathname (ret, promRootNode, promGetChild(promRootNode), pnode->node, 0)) return ret; free(ret); return NULL; } static int promWalkPathname2Node(char *name, char *regstr, int parent, int type) { int len, node, ret; char *prop, *p; for (;;) { prop = promGetProperty("name", &len); if (!prop || len <= 0) return 0; if ((!strcmp(prop, "sbus") || !strcmp(prop, "sbi")) && !type) type = PROM_NODE_SBUS; else if (!strcmp(prop, "ebus") && type == PROM_NODE_PCI) type = PROM_NODE_EBUS; else if (!strcmp(prop, "pci") && !type) type = PROM_NODE_PCI; for (node = promGetChild(parent); node; node = promGetSibling(node)) { prop = promGetProperty("name", &len); if (!prop || len <= 0) continue; if (*name && strcmp(name, prop)) continue; if (*regstr) { p = promGetReg(type); if (!*p || strcmp(p + 1, regstr)) continue; } break; } if (!node) { for (node = promGetChild(parent); node; node = promGetSibling(node)) { ret = promWalkPathname2Node(name, regstr, node, type); if (ret) return ret; } return 0; } name = strchr(regstr, 0) + 1; if (!*name) return node; p = strchr(name, '/'); if (p) *p = 0; else p = strchr(name, 0); regstr = strchr(name, '@'); if (regstr) *regstr++ = 0; else regstr = p; if (name == regstr) return 0; parent = node; } } int sparcPromPathname2Node(const char *pathName) { int i; char *name, *regstr, *p; i = strlen(pathName); name = malloc(i + 2); if (!name) return 0; strcpy(name, pathName); name[i + 1] = 0; if (name[0] != '/') { free(name); return 0; } p = strchr(name + 1, '/'); if (p) *p = 0; else p = strchr(name, 0); regstr = strchr(name, '@'); if (regstr) *regstr++ = 0; else regstr = p; if (name + 1 == regstr) { free(name); return 0; } promGetSibling(0); i = promWalkPathname2Node(name + 1, regstr, promRootNode, 0); free(name); return i; } void * xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) { void *ret; unsigned long pagemask = getpagesize() - 1; unsigned long off = offset & ~pagemask; unsigned long len = ((offset + size + pagemask) & ~pagemask) - off; if (psdp->fd == -1) { psdp->fd = open(psdp->device, O_RDWR); if (psdp->fd == -1) return NULL; } else if (psdp->fd < 0) return NULL; ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, psdp->fd, off); if (ret == (void *) -1) { ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, psdp->fd, off); } if (ret == (void *) -1) return NULL; return (char *) ret + (offset - off); } void xf86UnmapSbusMem(sbusDevicePtr psdp, void *addr, unsigned long size) { unsigned long mask = getpagesize() - 1; unsigned long base = (unsigned long) addr & ~mask; unsigned long len = (((unsigned long) addr + size + mask) & ~mask) - base; munmap((void *) base, len); } /* Tell OS that we are driving the HW cursor ourselves. */ void xf86SbusHideOsHwCursor(sbusDevicePtr psdp) { struct fbcursor fbcursor; unsigned char zeros[8]; memset(&fbcursor, 0, sizeof(fbcursor)); memset(&zeros, 0, sizeof(zeros)); fbcursor.cmap.count = 2; fbcursor.cmap.red = zeros; fbcursor.cmap.green = zeros; fbcursor.cmap.blue = zeros; fbcursor.image = (char *) zeros; fbcursor.mask = (char *) zeros; fbcursor.size.x = 32; fbcursor.size.y = 1; fbcursor.set = FB_CUR_SETALL; ioctl(psdp->fd, FBIOSCURSOR, &fbcursor); } /* Set HW cursor colormap. */ void xf86SbusSetOsHwCursorCmap(sbusDevicePtr psdp, int bg, int fg) { struct fbcursor fbcursor; unsigned char red[2], green[2], blue[2]; memset(&fbcursor, 0, sizeof(fbcursor)); red[0] = bg >> 16; green[0] = bg >> 8; blue[0] = bg; red[1] = fg >> 16; green[1] = fg >> 8; blue[1] = fg; fbcursor.cmap.count = 2; fbcursor.cmap.red = red; fbcursor.cmap.green = green; fbcursor.cmap.blue = blue; fbcursor.set = FB_CUR_SETCMAP; ioctl(psdp->fd, FBIOSCURSOR, &fbcursor); } xorg-server-21.1.16/hw/xfree86/os-support/bus/nobus.c0000644000175000017500000000012614757411105015755 void __noop_to_appease_ar__(void); void __noop_to_appease_ar__(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/misc/0000755000175000017500000000000014757411134014710 5xorg-server-21.1.16/hw/xfree86/os-support/misc/Makefile.am0000644000175000017500000000030514757411105016660 noinst_LTLIBRARIES = libmisc.la libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) xorg-server-21.1.16/hw/xfree86/os-support/misc/Makefile.in0000644000175000017500000006077214757411115016710 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support/misc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmisc_la_LIBADD = am_libmisc_la_OBJECTS = SlowBcopy.lo libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/SlowBcopy.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmisc_la_SOURCES) DIST_SOURCES = $(libmisc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmisc.la libmisc_la_SOURCES = SlowBcopy.c #AM_LDFLAGS = -r AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) EXTRA_DIST = $(I386_SRCS) $(PORTIO_SRCS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/misc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/misc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmisc.la: $(libmisc_la_OBJECTS) $(libmisc_la_DEPENDENCIES) $(EXTRA_libmisc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmisc_la_OBJECTS) $(libmisc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SlowBcopy.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/SlowBcopy.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/SlowBcopy.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/misc/SlowBcopy.c0000644000175000017500000000464414757411105016723 /******************************************************************************* for Alpha Linux *******************************************************************************/ /* * Create a dependency that should be immune from the effect of register * renaming as is commonly seen in superscalar processors. This should * insert a minimum of 100-ns delays between reads/writes at clock rates * up to 100 MHz---GGL * * Slowbcopy(char *src, char *dst, int count) * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "compiler.h" static int really_slow_bcopy; void xf86SetReallySlowBcopy(void) { really_slow_bcopy = 1; } #if defined(__i386__) || defined(__amd64__) static void xf86_really_slow_bcopy(unsigned char *src, unsigned char *dst, int len) { while (len--) { *dst++ = *src++; outb(0x80, 0x00); } } #endif /* The outb() isn't needed on my machine, but who knows ... -- ost */ void xf86SlowBcopy(unsigned char *src, unsigned char *dst, int len) { #if defined(__i386__) || defined(__amd64__) if (really_slow_bcopy) { xf86_really_slow_bcopy(src, dst, len); return; } #endif while (len--) *dst++ = *src++; } #ifdef __alpha__ #ifdef __linux__ unsigned long _bus_base(void); #define useSparse() (!_bus_base()) #define SPARSE (7) #else #define useSparse() 0 #define SPARSE 0 #endif void xf86SlowBCopyFromBus(unsigned char *src, unsigned char *dst, int count) { if (useSparse()) { unsigned long addr; long result; addr = (unsigned long) src; while (count) { result = *(volatile int *) addr; result >>= ((addr >> SPARSE) & 3) * 8; *dst++ = (unsigned char) (0xffUL & result); addr += 1 << SPARSE; count--; outb(0x80, 0x00); } } else xf86SlowBcopy(src, dst, count); } void xf86SlowBCopyToBus(unsigned char *src, unsigned char *dst, int count) { if (useSparse()) { unsigned long addr; addr = (unsigned long) dst; while (count) { *(volatile unsigned int *) addr = (unsigned short) (*src) * 0x01010101; src++; addr += 1 << SPARSE; count--; outb(0x80, 0x00); } } else xf86SlowBcopy(src, dst, count); } #endif xorg-server-21.1.16/hw/xfree86/os-support/solaris/0000755000175000017500000000000014757411134015431 5xorg-server-21.1.16/hw/xfree86/os-support/solaris/Makefile.am0000644000175000017500000000167414757411105017413 if SOLARIS_VT VTSW_SRC = sun_VTsw.c else VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c endif if AGP AGP_SRC = sun_agp.c else AGP_SRC = $(srcdir)/../shared/agp_noop.c endif SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) EXTRA_DIST = solaris-amd64.S solaris-ia32.S solaris-sparcv8plus.S sun_inout.s xorg-server-21.1.16/hw/xfree86/os-support/solaris/Makefile.in0000644000175000017500000011674414757411115017432 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support/solaris ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsolaris_la_LIBADD = am__libsolaris_la_SOURCES_DIST = sun_init.c sun_vid.c sun_bell.c \ $(srcdir)/../shared/agp_noop.c sun_agp.c sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c $(srcdir)/../shared/VTsw_noop.c \ sun_VTsw.c @AGP_FALSE@am__objects_1 = agp_noop.lo @AGP_TRUE@am__objects_1 = sun_agp.lo @SOLARIS_VT_FALSE@am__objects_2 = VTsw_noop.lo @SOLARIS_VT_TRUE@am__objects_2 = sun_VTsw.lo am_libsolaris_la_OBJECTS = sun_init.lo sun_vid.lo sun_bell.lo \ $(am__objects_1) sun_apm.lo kmod_noop.lo posix_tty.lo sigio.lo \ vidmem.lo $(am__objects_2) am__objects_3 = solaris-@SOLARIS_INOUT_ARCH@.lo nodist_libsolaris_la_OBJECTS = $(am__objects_3) libsolaris_la_OBJECTS = $(am_libsolaris_la_OBJECTS) \ $(nodist_libsolaris_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/VTsw_noop.Plo \ ./$(DEPDIR)/agp_noop.Plo ./$(DEPDIR)/kmod_noop.Plo \ ./$(DEPDIR)/posix_tty.Plo ./$(DEPDIR)/sigio.Plo \ ./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo \ ./$(DEPDIR)/sun_VTsw.Plo ./$(DEPDIR)/sun_agp.Plo \ ./$(DEPDIR)/sun_apm.Plo ./$(DEPDIR)/sun_bell.Plo \ ./$(DEPDIR)/sun_init.Plo ./$(DEPDIR)/sun_vid.Plo \ ./$(DEPDIR)/vidmem.Plo am__mv = mv -f CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CCASFLAGS) $(CCASFLAGS) AM_V_CPPAS = $(am__v_CPPAS_@AM_V@) am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@) am__v_CPPAS_0 = @echo " CPPAS " $@; am__v_CPPAS_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libsolaris_la_SOURCES) $(nodist_libsolaris_la_SOURCES) DIST_SOURCES = $(am__libsolaris_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)" HEADERS = $(nodist_sdk_HEADERS) $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @SOLARIS_VT_FALSE@VTSW_SRC = $(srcdir)/../shared/VTsw_noop.c @SOLARIS_VT_TRUE@VTSW_SRC = sun_VTsw.c @AGP_FALSE@AGP_SRC = $(srcdir)/../shared/agp_noop.c @AGP_TRUE@AGP_SRC = sun_agp.c SOLARIS_INOUT_SRC = solaris-@SOLARIS_INOUT_ARCH@.S DISTCLEANFILES = solaris-@SOLARIS_INOUT_ARCH@.il noinst_LTLIBRARIES = libsolaris.la libsolaris_la_SOURCES = sun_init.c \ sun_vid.c sun_bell.c $(AGP_SRC) sun_apm.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ $(srcdir)/../shared/vidmem.c \ $(VTSW_SRC) nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC) sdk_HEADERS = nodist_sdk_HEADERS = solaris-@SOLARIS_INOUT_ARCH@.il AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) EXTRA_DIST = solaris-amd64.S solaris-ia32.S solaris-sparcv8plus.S sun_inout.s all: all-am .SUFFIXES: .SUFFIXES: .S .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/solaris/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/solaris/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libsolaris.la: $(libsolaris_la_OBJECTS) $(libsolaris_la_DEPENDENCIES) $(EXTRA_libsolaris_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsolaris_la_OBJECTS) $(libsolaris_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_VTsw.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_agp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_apm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_bell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sun_vid.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .S.o: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $< .S.obj: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .S.lo: @am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $< .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< agp_noop.lo: $(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/kmod_noop.c' object='kmod_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c posix_tty.lo: $(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posix_tty.lo -MD -MP -MF $(DEPDIR)/posix_tty.Tpo -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/posix_tty.Tpo $(DEPDIR)/posix_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/posix_tty.c' object='posix_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c sigio.lo: $(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_noop.lo -MD -MP -MF $(DEPDIR)/VTsw_noop.Tpo -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/VTsw_noop.Tpo $(DEPDIR)/VTsw_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/VTsw_noop.c' object='VTsw_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_sdkHEADERS: $(nodist_sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-nodist_sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo -rm -f ./$(DEPDIR)/sun_VTsw.Plo -rm -f ./$(DEPDIR)/sun_agp.Plo -rm -f ./$(DEPDIR)/sun_apm.Plo -rm -f ./$(DEPDIR)/sun_bell.Plo -rm -f ./$(DEPDIR)/sun_init.Plo -rm -f ./$(DEPDIR)/sun_vid.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_sdkHEADERS install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/solaris-@SOLARIS_INOUT_ARCH@.Plo -rm -f ./$(DEPDIR)/sun_VTsw.Plo -rm -f ./$(DEPDIR)/sun_agp.Plo -rm -f ./$(DEPDIR)/sun_apm.Plo -rm -f ./$(DEPDIR)/sun_bell.Plo -rm -f ./$(DEPDIR)/sun_init.Plo -rm -f ./$(DEPDIR)/sun_vid.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nodist_sdkHEADERS install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS .PRECIOUS: Makefile solaris-@SOLARIS_INOUT_ARCH@.il: solaris-@SOLARIS_INOUT_ARCH@.S $(CPP) -P -DINLINE_ASM $(srcdir)/solaris-@SOLARIS_INOUT_ARCH@.S > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_init.c0000644000175000017500000002725214757411105017353 /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany * Copyright 1993 by David Wexelblat * Copyright 1999 by David Holland * * 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 names of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #ifdef HAVE_SYS_KD_H #include #endif /* * Applications see VT number as consecutive integers starting from 1. * VT number VT device * ------------------------------------------------------- * 1 : /dev/vt/0 (Alt + Ctrl + F1) * 2 : /dev/vt/2 (Alt + Ctrl + F2) * 3 : /dev/vt/3 (Alt + Ctrl + F3) * ... ... */ #define CONSOLE_VTNO 1 #define SOL_CONSOLE_DEV "/dev/console" static Bool KeepTty = FALSE; static Bool UseConsole = FALSE; #ifdef HAS_USL_VTS static int VTnum = -1; static int xf86StartVT = -1; static int vtEnabled = 0; #endif /* Device to open as xf86Info.consoleFd */ static char consoleDev[PATH_MAX] = "/dev/fb"; /* Set by -dev argument on CLI Used by hw/xfree86/common/xf86AutoConfig.c for VIS_GETIDENTIFIER */ _X_HIDDEN char xf86SolarisFbDev[PATH_MAX] = "/dev/fb"; static void switch_to(int vt, const char *from) { int ret; SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt)); if (ret != 0) xf86Msg(X_WARNING, "%s: VT_ACTIVATE failed: %s\n", from, strerror(errno)); SYSCALL(ret = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt)); if (ret != 0) xf86Msg(X_WARNING, "%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno)); } void xf86OpenConsole(void) { int i; #ifdef HAS_USL_VTS int fd; struct vt_mode VT; struct vt_stat vtinfo; MessageType from = X_PROBED; #endif if (serverGeneration == 1) { /* Check if we're run with euid==0 */ if (geteuid() != 0) FatalError("xf86OpenConsole: Server must be suid root\n"); #ifdef HAS_USL_VTS /* * Setup the virtual terminal manager */ if ((fd = open("/dev/vt/0", O_RDWR, 0)) == -1) { xf86ErrorF("xf86OpenConsole: Cannot open /dev/vt/0 (%s)\n", strerror(errno)); vtEnabled = 0; } else { if (ioctl(fd, VT_ENABLED, &vtEnabled) < 0) { xf86ErrorF("xf86OpenConsole: VT_ENABLED failed (%s)\n", strerror(errno)); vtEnabled = 0; } } #endif /* HAS_USL_VTS */ if (UseConsole) { strlcpy(consoleDev, SOL_CONSOLE_DEV, sizeof(consoleDev)); #ifdef HAS_USL_VTS xf86Info.vtno = CONSOLE_VTNO; if (vtEnabled == 0) { xf86StartVT = 0; } else { if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0) FatalError ("xf86OpenConsole: Cannot determine current VT\n"); xf86StartVT = vtinfo.v_active; } #endif /* HAS_USL_VTS */ goto OPENCONSOLE; } #ifdef HAS_USL_VTS if (vtEnabled == 0) { /* VT not enabled - kernel too old or Sparc platforms without visual_io support */ xf86Msg(from, "VT infrastructure is not available\n"); xf86StartVT = 0; xf86Info.vtno = 0; strlcpy(consoleDev, xf86SolarisFbDev, sizeof(consoleDev)); goto OPENCONSOLE; } if (ioctl(fd, VT_GETSTATE, &vtinfo) < 0) FatalError("xf86OpenConsole: Cannot determine current VT\n"); xf86StartVT = vtinfo.v_active; if (VTnum != -1) { xf86Info.vtno = VTnum; from = X_CMDLINE; } else if (xf86Info.ShareVTs) { xf86Info.vtno = vtinfo.v_active; from = X_CMDLINE; } else { if ((ioctl(fd, VT_OPENQRY, &xf86Info.vtno) < 0) || (xf86Info.vtno == -1)) { FatalError("xf86OpenConsole: Cannot find a free VT\n"); } } xf86Msg(from, "using VT number %d\n\n", xf86Info.vtno); snprintf(consoleDev, PATH_MAX, "/dev/vt/%d", xf86Info.vtno); if (fd != -1) { close(fd); } #endif /* HAS_USL_VTS */ OPENCONSOLE: if (!KeepTty) setpgrp(); if (((xf86Info.consoleFd = open(consoleDev, O_RDWR | O_NDELAY, 0)) < 0)) FatalError("xf86OpenConsole: Cannot open %s (%s)\n", consoleDev, strerror(errno)); /* Change ownership of the vt or console */ chown(consoleDev, getuid(), getgid()); #ifdef HAS_USL_VTS if (xf86Info.ShareVTs) return; if (vtEnabled) { /* * Now get the VT */ switch_to(xf86Info.vtno, "xf86OpenConsole"); #ifdef VT_SET_CONSUSER /* added in snv_139 */ if (strcmp(display, "0") == 0) if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0) xf86Msg(X_WARNING, "xf86OpenConsole: VT_SET_CONSUSER failed\n"); #endif if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) < 0) FatalError("xf86OpenConsole: VT_GETMODE failed\n"); OsSignal(SIGUSR1, xf86VTAcquire); OsSignal(SIGUSR2, xf86VTRelease); VT.mode = VT_PROCESS; VT.acqsig = SIGUSR1; VT.relsig = SIGUSR2; if (ioctl(xf86Info.consoleFd, VT_SETMODE, &VT) < 0) FatalError("xf86OpenConsole: VT_SETMODE VT_PROCESS failed\n"); if (ioctl(xf86Info.consoleFd, VT_SETDISPINFO, atoi(display)) < 0) xf86Msg(X_WARNING, "xf86OpenConsole: VT_SETDISPINFO failed\n"); } #endif #ifdef KDSETMODE SYSCALL(i = ioctl(xf86Info.consoleFd, KDSETMODE, KD_GRAPHICS)); if (i < 0) { xf86Msg(X_WARNING, "xf86OpenConsole: KDSETMODE KD_GRAPHICS failed on %s (%s)\n", consoleDev, strerror(errno)); } #endif } else { /* serverGeneration != 1 */ #ifdef HAS_USL_VTS if (vtEnabled && !xf86Info.ShareVTs) { /* * Now re-get the VT */ if (xf86Info.autoVTSwitch) switch_to(xf86Info.vtno, "xf86OpenConsole"); #ifdef VT_SET_CONSUSER /* added in snv_139 */ if (strcmp(display, "0") == 0) if (ioctl(xf86Info.consoleFd, VT_SET_CONSUSER) != 0) xf86Msg(X_WARNING, "xf86OpenConsole: VT_SET_CONSUSER failed\n"); #endif /* * If the server doesn't have the VT when the reset occurs, * this is to make sure we don't continue until the activate * signal is received. */ if (!xf86VTOwner()) sleep(5); } #endif /* HAS_USL_VTS */ } } void xf86CloseConsole(void) { #ifdef HAS_USL_VTS struct vt_mode VT; #endif #if !defined(__i386__) && !defined(__i386) && !defined(__x86) if (!xf86DoConfigure) { int fd; /* * Wipe out framebuffer just like the non-SI Xsun server does. This * could be improved by saving framebuffer contents in * xf86OpenConsole() above and restoring them here. Also, it's unclear * at this point whether this should be done for all framebuffers in * the system, rather than only the console. */ if ((fd = open(xf86SolarisFbDev, O_RDWR, 0)) < 0) { xf86Msg(X_WARNING, "xf86CloseConsole(): unable to open framebuffer (%s)\n", strerror(errno)); } else { struct fbgattr fbattr; if ((ioctl(fd, FBIOGATTR, &fbattr) < 0) && (ioctl(fd, FBIOGTYPE, &fbattr.fbtype) < 0)) { xf86Msg(X_WARNING, "xf86CloseConsole(): unable to retrieve framebuffer" " attributes (%s)\n", strerror(errno)); } else { void *fbdata; fbdata = mmap(NULL, fbattr.fbtype.fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); if (fbdata == MAP_FAILED) { xf86Msg(X_WARNING, "xf86CloseConsole(): unable to mmap framebuffer" " (%s)\n", strerror(errno)); } else { memset(fbdata, 0, fbattr.fbtype.fb_size); munmap(fbdata, fbattr.fbtype.fb_size); } } close(fd); } } #endif #ifdef KDSETMODE /* Reset the display back to text mode */ SYSCALL(ioctl(xf86Info.consoleFd, KDSETMODE, KD_TEXT)); #endif #ifdef HAS_USL_VTS if (vtEnabled) { if (ioctl(xf86Info.consoleFd, VT_GETMODE, &VT) != -1) { VT.mode = VT_AUTO; /* Set default vt handling */ ioctl(xf86Info.consoleFd, VT_SETMODE, &VT); } /* Activate the VT that X was started on */ if (xf86Info.autoVTSwitch) switch_to(xf86StartVT, "xf86CloseConsole"); } #endif /* HAS_USL_VTS */ close(xf86Info.consoleFd); } int xf86ProcessArgument(int argc, char **argv, int i) { /* * Keep server from detaching from controlling tty. This is useful when * debugging, so the server can receive keyboard signals. */ if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; return 1; } /* * Use /dev/console as the console device. */ if (!strcmp(argv[i], "-C")) { UseConsole = TRUE; return 1; } #ifdef HAS_USL_VTS if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { if (sscanf(argv[i], "vt%d", &VTnum) == 0) { UseMsg(); VTnum = -1; return 0; } return 1; } #endif /* HAS_USL_VTS */ if ((i + 1) < argc) { if (!strcmp(argv[i], "-dev")) { strlcpy(xf86SolarisFbDev, argv[i + 1], sizeof(xf86SolarisFbDev)); return 2; } } return 0; } void xf86UseMsg(void) { #ifdef HAS_USL_VTS ErrorF("vtX Use the specified VT number\n"); #endif ErrorF("-dev Framebuffer device\n"); ErrorF("-keeptty Don't detach controlling tty\n"); ErrorF(" (for debugging only)\n"); ErrorF("-C Use /dev/console as the console device\n"); } xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_vid.c0000644000175000017500000000770614757411105017174 /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany * Copyright 1993 by David Wexelblat * Copyright 1999 by David Holland * * 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 names of the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT * SHALL THE COPYRIGHT HOLDERS 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 (c) 2008, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include /* get __x86 definition if not set by compiler */ #if defined(__i386__) || defined(__i386) || defined(__x86) #define _NEED_SYSI86 #endif #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" #include /***************************************************************************/ /* Video Memory Mapping section */ /***************************************************************************/ _X_HIDDEN void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; } /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ void xf86OSInputThreadInit(void) { /* * Need to enable in input thread as well, as Solaris kernel tracks * IOPL per-thread and doesn't inherit when creating a new thread. */ xf86EnableIO(); } Bool xf86EnableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) if (sysi86(SI86V86, V86SC_IOPL, PS_IOPL) < 0) { xf86Msg(X_WARNING, "xf86EnableIOPorts: Failed to set IOPL for I/O\n"); return FALSE; } #endif /* i386 */ return TRUE; } void xf86DisableIO(void) { #if defined(__i386__) || defined(__i386) || defined(__x86) sysi86(SI86V86, V86SC_IOPL, 0); #endif /* i386 */ } xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_bell.c0000644000175000017500000001322414757411105017320 /* Copyright (c) 2004-2005, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #define BELL_RATE 48000 /* Samples per second */ #define BELL_HZ 50 /* Fraction of a second i.e. 1/x */ #define BELL_MS (1000/BELL_HZ) /* MS */ #define BELL_SAMPLES (BELL_RATE / BELL_HZ) #define BELL_MIN 3 /* Min # of repeats */ #define AUDIO_DEVICE "/dev/audio" void xf86OSRingBell(int loudness, int pitch, int duration) { static short samples[BELL_SAMPLES]; static short silence[BELL_SAMPLES]; /* "The Sound of Silence" */ static int lastFreq; int cnt; int i; int written; int repeats; int freq; audio_info_t audioInfo; struct iovec iov[IOV_MAX]; int iovcnt; double ampl, cyclen, phase; int audioFD; if ((loudness <= 0) || (pitch <= 0) || (duration <= 0)) { return; } lastFreq = 0; memset(silence, 0, sizeof(silence)); audioFD = open(AUDIO_DEVICE, O_WRONLY | O_NONBLOCK); if (audioFD == -1) { xf86Msg(X_ERROR, "Bell: cannot open audio device \"%s\": %s\n", AUDIO_DEVICE, strerror(errno)); return; } freq = pitch; freq = min(freq, (BELL_RATE / 2) - 1); freq = max(freq, 2 * BELL_HZ); /* * Ensure full waves per buffer */ freq -= freq % BELL_HZ; if (freq != lastFreq) { lastFreq = freq; ampl = 16384.0; cyclen = (double) freq / (double) BELL_RATE; phase = 0.0; for (i = 0; i < BELL_SAMPLES; i++) { samples[i] = (short) (ampl * sin(2.0 * M_PI * phase)); phase += cyclen; if (phase >= 1.0) phase -= 1.0; } } repeats = (duration + (BELL_MS / 2)) / BELL_MS; repeats = max(repeats, BELL_MIN); loudness = max(0, loudness); loudness = min(loudness, 100); #ifdef DEBUG ErrorF("BELL : freq %d volume %d duration %d repeats %d\n", freq, loudness, duration, repeats); #endif AUDIO_INITINFO(&audioInfo); audioInfo.play.encoding = AUDIO_ENCODING_LINEAR; audioInfo.play.sample_rate = BELL_RATE; audioInfo.play.channels = 2; audioInfo.play.precision = 16; audioInfo.play.gain = min(AUDIO_MAX_GAIN, AUDIO_MAX_GAIN * loudness / 100); if (ioctl(audioFD, AUDIO_SETINFO, &audioInfo) < 0) { xf86Msg(X_ERROR, "Bell: AUDIO_SETINFO failed on audio device \"%s\": %s\n", AUDIO_DEVICE, strerror(errno)); close(audioFD); return; } iovcnt = 0; for (cnt = 0; cnt <= repeats; cnt++) { if (cnt == repeats) { /* Insert a bit of silence so that multiple beeps are distinct and * not compressed into a single tone. */ iov[iovcnt].iov_base = (char *) silence; iov[iovcnt++].iov_len = sizeof(silence); } else { iov[iovcnt].iov_base = (char *) samples; iov[iovcnt++].iov_len = sizeof(samples); } if ((iovcnt >= IOV_MAX) || (cnt == repeats)) { written = writev(audioFD, iov, iovcnt); if ((written < ((int) (sizeof(samples) * iovcnt)))) { /* audio buffer was full! */ int naptime; if (written == -1) { if (errno != EAGAIN) { xf86Msg(X_ERROR, "Bell: writev failed on audio device \"%s\": %s\n", AUDIO_DEVICE, strerror(errno)); close(audioFD); return; } i = iovcnt; } else { i = ((sizeof(samples) * iovcnt) - written) / sizeof(samples); } cnt -= i; /* sleep a little to allow audio buffer to drain */ naptime = BELL_MS * i; xserver_poll(NULL, 0, naptime); i = ((sizeof(samples) * iovcnt) - written) % sizeof(samples); iovcnt = 0; if ((written != -1) && (i > 0)) { iov[iovcnt].iov_base = ((char *) samples) + i; iov[iovcnt++].iov_len = sizeof(samples) - i; } } else { iovcnt = 0; } } } close(audioFD); return; } xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_agp.c0000644000175000017500000002136014757411105017151 /* * Abstraction of the AGP GART interface. * * This version is for Solaris. * * Copyright © 2000 VA Linux Systems, Inc. * Copyright © 2001 The XFree86 Project, Inc. */ /* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86_OSproc.h" #include #include #include #include #include /* AGP page size is independent of the host page size. */ #ifndef AGP_PAGE_SIZE #define AGP_PAGE_SIZE 4096 #endif static int gartFd = -1; static int acquiredScreen = -1; static Bool initDone = FALSE; /* * Close /dev/agpgart. This frees all associated memory allocated during * this server generation. */ Bool xf86GARTCloseScreen(int screenNum) { if (gartFd != -1) { close(gartFd); acquiredScreen = -1; gartFd = -1; initDone = FALSE; xf86DrvMsg(screenNum, X_INFO, "xf86GARTCloseScreen: device closed successfully\n"); } return TRUE; } /* * Open /dev/agpgart. Keep it open until xf86GARTCloseScreen is called. */ static Bool GARTInit(int screenNum) { if (initDone) return gartFd != -1; if (gartFd == -1) gartFd = open(AGP_DEVICE, O_RDWR); else return FALSE; if (gartFd == -1) { xf86DrvMsg(screenNum, X_ERROR, "GARTInit: Unable to open " AGP_DEVICE " (%s)\n", strerror(errno)); return FALSE; } initDone = TRUE; xf86DrvMsg(screenNum, X_INFO, "GARTInit: " AGP_DEVICE " opened successfully\n"); return TRUE; } Bool xf86AgpGARTSupported(void) { return (GARTInit(-1)); } AgpInfoPtr xf86GetAGPInfo(int screenNum) { agp_info_t agpinf; AgpInfoPtr info; if (!GARTInit(screenNum)) return NULL; if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", strerror(errno)); return NULL; } if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); return NULL; } info->bridgeId = agpinf.agpi_devid; info->agpMode = agpinf.agpi_mode; info->base = agpinf.agpi_aperbase; info->size = agpinf.agpi_apersize; info->totalPages = (unsigned long) agpinf.agpi_pgtotal; info->systemPages = (unsigned long) agpinf.agpi_pgsystem; info->usedPages = (unsigned long) agpinf.agpi_pgused; return info; } Bool xf86AcquireGART(int screenNum) { if (!GARTInit(screenNum)) return FALSE; if (acquiredScreen != screenNum) { if (ioctl(gartFd, AGPIOC_ACQUIRE, 0) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86AcquireGART: AGPIOC_ACQUIRE failed (%s)\n", strerror(errno)); return FALSE; } acquiredScreen = screenNum; xf86DrvMsg(screenNum, X_INFO, "xf86AcquireGART: AGPIOC_ACQUIRE succeeded\n"); } return TRUE; } Bool xf86ReleaseGART(int screenNum) { if (!GARTInit(screenNum)) return FALSE; if (acquiredScreen == screenNum) { /* * The FreeBSD agp driver removes allocations on release. * The Solaris driver doesn't. xf86ReleaseGART() is expected * to give up access to the GART, but not to remove any * allocations. */ if (ioctl(gartFd, AGPIOC_RELEASE, 0) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86ReleaseGART: AGPIOC_RELEASE failed (%s)\n", strerror(errno)); return FALSE; } acquiredScreen = -1; xf86DrvMsg(screenNum, X_INFO, "xf86ReleaseGART: AGPIOC_RELEASE succeeded\n"); return TRUE; } return FALSE; } int xf86AllocateGARTMemory(int screenNum, unsigned long size, int type, unsigned long *physical) { agp_allocate_t alloc; int pages; /* * Allocates "size" bytes of GART memory (rounds up to the next * page multiple) or type "type". A handle (key) for the allocated * memory is returned. On error, the return value is -1. * "size" should be larger than 0, or AGPIOC_ALLOCATE ioctl will * return error. */ if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) return -1; pages = (size / AGP_PAGE_SIZE); if (size % AGP_PAGE_SIZE != 0) pages++; alloc.agpa_pgcount = pages; alloc.agpa_type = type; if (ioctl(gartFd, AGPIOC_ALLOCATE, &alloc) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86AllocateGARTMemory: " "allocation of %d pages failed\n\t(%s)\n", pages, strerror(errno)); return -1; } if (physical) *physical = (unsigned long) alloc.agpa_physical; return alloc.agpa_key; } Bool xf86DeallocateGARTMemory(int screenNum, int key) { if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) return FALSE; if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *) (uintptr_t) key) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86DeAllocateGARTMemory: " "deallocation of gart memory with key %d failed\n" "\t(%s)\n", key, strerror(errno)); return FALSE; } return TRUE; } /* Bind GART memory with "key" at "offset" */ Bool xf86BindGARTMemory(int screenNum, int key, unsigned long offset) { agp_bind_t bind; int pageOffset; if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) return FALSE; if (offset % AGP_PAGE_SIZE != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " "offset (0x%lx) is not page-aligned (%d)\n", offset, AGP_PAGE_SIZE); return FALSE; } pageOffset = offset / AGP_PAGE_SIZE; xf86DrvMsgVerb(screenNum, X_INFO, 3, "xf86BindGARTMemory: bind key %d at 0x%08lx " "(pgoffset %d)\n", key, offset, pageOffset); bind.agpb_pgstart = pageOffset; bind.agpb_key = key; if (ioctl(gartFd, AGPIOC_BIND, &bind) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86BindGARTMemory: " "binding of gart memory with key %d\n" "\tat offset 0x%lx failed (%s)\n", key, offset, strerror(errno)); return FALSE; } return TRUE; } /* Unbind GART memory with "key" */ Bool xf86UnbindGARTMemory(int screenNum, int key) { agp_unbind_t unbind; if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) return FALSE; unbind.agpu_pri = 0; unbind.agpu_key = key; if (ioctl(gartFd, AGPIOC_UNBIND, &unbind) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86UnbindGARTMemory: " "unbinding of gart memory with key %d " "failed (%s)\n", key, strerror(errno)); return FALSE; } xf86DrvMsgVerb(screenNum, X_INFO, 3, "xf86UnbindGARTMemory: unbind key %d\n", key); return TRUE; } /* XXX Interface may change. */ Bool xf86EnableAGP(int screenNum, CARD32 mode) { agp_setup_t setup; if (!GARTInit(screenNum) || (acquiredScreen != screenNum)) return FALSE; setup.agps_mode = mode; if (ioctl(gartFd, AGPIOC_SETUP, &setup) != 0) { xf86DrvMsg(screenNum, X_WARNING, "xf86EnableAGP: " "AGPIOC_SETUP with mode %x failed (%s)\n", (unsigned int) mode, strerror(errno)); return FALSE; } return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_apm.c0000644000175000017500000001573214757411105017165 /* Based on hw/xfree86/os-support/bsd/bsd_apm.c which bore no explicit * copyright notice, so is covered by the following notice: * * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. */ /* Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "xf86.h" #include "xf86Priv.h" #define XF86_OS_PRIVS #include "xf86_OSproc.h" #include "xf86_OSlib.h" #ifndef PLEASE_FIX_THIS #define APM_STANDBY_REQ 0xa01 #define APM_SUSPEND_REQ 0xa02 #define APM_NORMAL_RESUME 0xa03 #define APM_CRIT_RESUME 0xa04 #define APM_BATTERY_LOW 0xa05 #define APM_POWER_CHANGE 0xa06 #define APM_UPDATE_TIME 0xa07 #define APM_CRIT_SUSPEND_REQ 0xa08 #define APM_USER_STANDBY_REQ 0xa09 #define APM_USER_SUSPEND_REQ 0xa0a #define APM_SYS_STANDBY_RESUME 0xa0b #define APM_IOC_NEXTEVENT 0xa0c #define APM_IOC_RESUME 0xa0d #define APM_IOC_SUSPEND 0xa0e #define APM_IOC_STANDBY 0xa0f #endif typedef struct apm_event_info { int type; } apm_event_info; /* This may be replaced with a better device name very soon... */ #define APM_DEVICE "/dev/srn" #define APM_DEVICE1 "/dev/apm" static void *APMihPtr = NULL; static void sunCloseAPM(void); static struct { u_int apmBsd; pmEvent xf86; } sunToXF86Array[] = { {APM_STANDBY_REQ, XF86_APM_SYS_STANDBY}, {APM_SUSPEND_REQ, XF86_APM_SYS_SUSPEND}, {APM_NORMAL_RESUME, XF86_APM_NORMAL_RESUME}, {APM_CRIT_RESUME, XF86_APM_CRITICAL_RESUME}, {APM_BATTERY_LOW, XF86_APM_LOW_BATTERY}, {APM_POWER_CHANGE, XF86_APM_POWER_STATUS_CHANGE}, {APM_UPDATE_TIME, XF86_APM_UPDATE_TIME}, {APM_CRIT_SUSPEND_REQ, XF86_APM_CRITICAL_SUSPEND}, {APM_USER_STANDBY_REQ, XF86_APM_USER_STANDBY}, {APM_USER_SUSPEND_REQ, XF86_APM_USER_SUSPEND}, {APM_SYS_STANDBY_RESUME, XF86_APM_STANDBY_RESUME}, #ifdef APM_CAPABILITY_CHANGE {APM_CAPABILITY_CHANGE, XF86_APM_CAPABILITY_CHANGED}, #endif }; static pmEvent sunToXF86(int type) { int i; for (i = 0; i < ARRAY_SIZE(sunToXF86Array); i++) { if (type == sunToXF86Array[i].apmBsd) { return sunToXF86Array[i].xf86; } } return XF86_APM_UNKNOWN; } /* * APM events can be requested directly from /dev/apm */ static int sunPMGetEventFromOS(int fd, pmEvent * events, int num) { struct apm_event_info sunEvent; int i; for (i = 0; i < num; i++) { if (ioctl(fd, APM_IOC_NEXTEVENT, &sunEvent) < 0) { if (errno != EAGAIN) { xf86Msg(X_WARNING, "sunPMGetEventFromOS: APM_IOC_NEXTEVENT" " %s\n", strerror(errno)); } break; } events[i] = sunToXF86(sunEvent.type); } xf86Msg(X_WARNING, "Got some events\n"); return i; } static pmWait sunPMConfirmEventToOs(int fd, pmEvent event) { switch (event) { /* XXX: NOT CURRENTLY RETURNED FROM OS */ case XF86_APM_SYS_STANDBY: case XF86_APM_USER_STANDBY: if (ioctl(fd, APM_IOC_STANDBY, NULL) == 0) return PM_WAIT; /* should we stop the Xserver in standby, too? */ else return PM_NONE; case XF86_APM_SYS_SUSPEND: case XF86_APM_CRITICAL_SUSPEND: case XF86_APM_USER_SUSPEND: xf86Msg(X_WARNING, "Got SUSPENDED\n"); if (ioctl(fd, APM_IOC_SUSPEND, NULL) == 0) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_SUSPEND" " %s\n", strerror(errno)); return PM_FAILED; } case XF86_APM_STANDBY_RESUME: case XF86_APM_NORMAL_RESUME: case XF86_APM_CRITICAL_RESUME: case XF86_APM_STANDBY_FAILED: case XF86_APM_SUSPEND_FAILED: xf86Msg(X_WARNING, "Got RESUME\n"); if (ioctl(fd, APM_IOC_RESUME, NULL) == 0) return PM_CONTINUE; else { xf86Msg(X_WARNING, "sunPMConfirmEventToOs: APM_IOC_RESUME" " %s\n", strerror(errno)); return PM_FAILED; } default: return PM_NONE; } } PMClose xf86OSPMOpen(void) { int fd; if (APMihPtr || !xf86Info.pmFlag) { return NULL; } if ((fd = open(APM_DEVICE, O_RDWR)) == -1) { if ((fd = open(APM_DEVICE1, O_RDWR)) == -1) { return NULL; } } xf86PMGetEventFromOs = sunPMGetEventFromOS; xf86PMConfirmEventToOs = sunPMConfirmEventToOs; APMihPtr = xf86AddGeneralHandler(fd, xf86HandlePMEvents, NULL); return sunCloseAPM; } static void sunCloseAPM(void) { int fd; if (APMihPtr) { fd = xf86RemoveGeneralHandler(APMihPtr); close(fd); APMihPtr = NULL; } } xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_VTsw.c0000644000175000017500000000621014757411105017302 /* * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include #include /* * Handle the VT-switching interface for Solaris/OpenSolaris */ static int xf86VTPruneDoor = 0; void xf86VTRelease(int sig) { if (xf86Info.vtPendingNum == -1) { xf86VTPruneDoor = 1; xf86Info.vtRequestsPending = TRUE; return; } ioctl(xf86Info.consoleFd, VT_RELDISP, 1); xf86Info.vtPendingNum = -1; return; } void xf86VTAcquire(int sig) { xf86Info.vtRequestsPending = TRUE; return; } Bool xf86VTSwitchPending(void) { return xf86Info.vtRequestsPending ? TRUE : FALSE; } Bool xf86VTSwitchAway(void) { int door_fd; vt_cmd_arg_t vt_door_arg; door_arg_t door_arg; xf86Info.vtRequestsPending = FALSE; if (xf86VTPruneDoor) { xf86VTPruneDoor = 0; ioctl(xf86Info.consoleFd, VT_RELDISP, 1); return TRUE; } vt_door_arg.vt_ev = VT_EV_HOTKEYS; vt_door_arg.vt_num = xf86Info.vtPendingNum; door_arg.data_ptr = (char *) &vt_door_arg; door_arg.data_size = sizeof(vt_cmd_arg_t); door_arg.rbuf = NULL; door_arg.rsize = 0; door_arg.desc_ptr = NULL; door_arg.desc_num = 0; if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0) return FALSE; if (door_call(door_fd, &door_arg) != 0) { close(door_fd); return FALSE; } close(door_fd); return TRUE; } Bool xf86VTSwitchTo(void) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) { return FALSE; } else { return TRUE; } } Bool xf86VTActivate(int vtno) { struct vt_stat state; if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &state) < 0) return FALSE; if ((state.v_state & (1 << vtno)) == 0) return FALSE; xf86Info.vtRequestsPending = TRUE; xf86Info.vtPendingNum = vtno; return TRUE; } xorg-server-21.1.16/hw/xfree86/os-support/solaris/solaris-amd64.S0000644000175000017500000000363014757411105020062 / Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. / / 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, and to permit persons to whom the / Software is furnished to do so, subject to the following conditions: / / The above copyright notice and this permission notice (including the next / paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. #ifdef INLINE_ASM #define FUNCTION_START(f,n) .inline f,n #define FUNCTION_END(f) .end #else #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) #define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) movq %rdi, %rdx xorq %rax, %rax inb (%dx) FUNCTION_END(inb) FUNCTION_START(inw,4) movq %rdi, %rdx xorq %rax, %rax inw (%dx) FUNCTION_END(inw) FUNCTION_START(inl,4) movq %rdi, %rdx xorq %rax, %rax inl (%dx) FUNCTION_END(inl) FUNCTION_START(outb,8) movq %rdi, %rdx movq %rsi, %rax outb (%dx) FUNCTION_END(outb) FUNCTION_START(outw,8) movq %rdi, %rdx movq %rsi, %rax outw (%dx) FUNCTION_END(outw) FUNCTION_START(outl,8) movq %rdi, %rdx movq %rsi, %rax outl (%dx) FUNCTION_END(outl) xorg-server-21.1.16/hw/xfree86/os-support/solaris/solaris-ia32.S0000644000175000017500000000365514757411105017714 / Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. / / 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, and to permit persons to whom the / Software is furnished to do so, subject to the following conditions: / / The above copyright notice and this permission notice (including the next / paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. #ifdef INLINE_ASM #define FUNCTION_START(f,n) .inline f,n #define FUNCTION_END(f) .end #else #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) #define FUNCTION_END(f) ret; SET_SIZE(f) #endif FUNCTION_START(inb,4) movl (%esp), %edx xorl %eax, %eax inb (%dx) FUNCTION_END(inb) FUNCTION_START(inw,4) movl (%esp), %edx xorl %eax, %eax inw (%dx) FUNCTION_END(inw) FUNCTION_START(inl,4) movl (%esp), %edx xorl %eax, %eax inl (%dx) FUNCTION_END(inl) FUNCTION_START(outb,8) movl (%esp), %edx movl 4(%esp), %eax outb (%dx) FUNCTION_END(outb) FUNCTION_START(outw,8) movl (%esp), %edx movl 4(%esp), %eax outw (%dx) FUNCTION_END(outw) FUNCTION_START(outl,8) movl (%esp), %edx movl 4(%esp), %eax outl (%dx) FUNCTION_END(outl) xorg-server-21.1.16/hw/xfree86/os-support/solaris/solaris-sparcv8plus.S0000644000175000017500000000757714757411105021457 /* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef INLINE_ASM #define FUNCTION_START(f,n) .inline f,n #define FUNCTION_END(f) .end #else #define _ASM #include #define FUNCTION_START(f,n) ENTRY(f) #define FUNCTION_END(f) retl; nop; SET_SIZE(f) #endif /* Converted from common/compiler.h gcc inline format to Sun cc inline * format by Kenjiro Tsuji * * The value 0x88 means ASI_PRIMARY_LITTLE. * The store or load to/from the address space will be done * as little-endian. In the original xrog code, the value * is defined as the macro ASI_PL. * * In the original xorg code, "membar #StoreStore|#StoreLoad" * is directly implemented as an instruction "0x8143e00a". * */ FUNCTION_START(outb, 0) stba %o1, [%o0] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(outb) FUNCTION_START(outw, 0) stha %o1, [%o0] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(outw) FUNCTION_START(outl, 0) sta %o1, [%o0] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(outl) FUNCTION_START(inb, 0) lduba [%o0] 0x88, %o0 FUNCTION_END(inb) FUNCTION_START(inw, 0) lduha [%o0] 0x88, %o0 FUNCTION_END(inw) FUNCTION_START(inl, 0) lda [%o0] 0x88, %o0 FUNCTION_END(inl) FUNCTION_START(xf86ReadMmio8, 0) lduba [%o0 + %o1] 0x88, %o0 FUNCTION_END(xf86ReadMmio8) FUNCTION_START(xf86ReadMmio16Be, 0) lduh [%o0 + %o1], %o0 FUNCTION_END(xf86ReadMmio16Be) FUNCTION_START(xf86ReadMmio16Le, 0) lduha [%o0 + %o1] 0x88, %o0 FUNCTION_END(xf86ReadMmio16Le) FUNCTION_START(xf86ReadMmio32Be, 0) ld [%o0 + %o1], %o0 FUNCTION_END(xf86ReadMmio32Be) FUNCTION_START(xf86ReadMmio32Le, 0) lda [%o0 + %o1] 0x88, %o0 FUNCTION_END(xf86ReadMmio32Le) FUNCTION_START(xf86WriteMmio8, 0) stba %o2, [%o0 + %o1] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(xf86WriteMmio8) FUNCTION_START(xf86WriteMmio16Be, 0) sth %o2, [%o0 + %o1] membar #StoreStore|#StoreLoad FUNCTION_END(xf86WriteMmio16Be) FUNCTION_START(xf86WriteMmio16Le, 0) stha %o2, [%o0 + %o1] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(xf86WriteMmio16Le) FUNCTION_START(xf86WriteMmio32Be, 0) st %o2, [%o0 + %o1] membar #StoreStore|#StoreLoad FUNCTION_END(xf86WriteMmio32Be) FUNCTION_START(xf86WriteMmio32Le, 0) sta %o2, [%o0 + %o1] 0x88 membar #StoreStore|#StoreLoad FUNCTION_END(xf86WriteMmio32Le) FUNCTION_START(xf86WriteMmio8NB, 0) add %o0, %o1, %o0 stba %o2, [%o0] 0x88 FUNCTION_END(xf86WriteMmio8NB) FUNCTION_START(xf86WriteMmio16BeNB, 0) sth %o2, [%o0 + %o1] FUNCTION_END(xf86WriteMmio16BeNB) FUNCTION_START(xf86WriteMmio16LeNB, 0) stha %o2, [%o0 + %o1] 0x88 FUNCTION_END(xf86WriteMmio16LeNB) FUNCTION_START(xf86WriteMmio32BeNB, 0) st %o2, [%o0 + %o1] FUNCTION_END(xf86WriteMmio32BeNB) FUNCTION_START(xf86WriteMmio32LeNB, 0) sta %o2, [%o0 + %o1] 0x88 FUNCTION_END(xf86WriteMmio32LeNB) xorg-server-21.1.16/hw/xfree86/os-support/solaris/sun_inout.s0000644000175000017500000000603614757411105017563 / $XFree86: xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_inout.s,v 1.1 2001/05/28 02:42:31 tsi Exp $ / / Copyright 1994-2001 The XFree86 Project, Inc. All Rights Reserved. / / 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, and to permit persons to whom the Software is / furnished to do so, subject to the following conditions: / / 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 / XFREE86 PROJECT 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 XFree86 Project 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 / XFree86 Project. / / / File: sun_inout.s / / Purpose: Provide inb(), inw(), inl(), outb(), outw(), outl() functions / for Solaris x86 using the ProWorks compiler by SunPro / / Author: Installed into XFree86 SuperProbe by Doug Anson (danson@lgc.com) / Portions donated to XFree86 by Steve Dever (Steve.Dever@Eng.Sun.Com) / / Synopsis: (c callable external declarations) / extern unsigned char inb(int port); / extern unsigned short inw(int port); / extern unsigned long inl(int port); / extern void outb(int port, unsigned char value); / extern void outw(int port, unsigned short value); / extern void outl(int port, unsigned long value); / .file "sunos_inout.s" .text .globl inb .globl inw .globl inl .globl outb .globl outw .globl outl / / unsigned char inb(int port); / .align 4 inb: movl 4(%esp),%edx subl %eax,%eax inb (%dx) ret .type inb,@function .size inb,.-inb / / unsigned short inw(int port); / .align 4 inw: movl 4(%esp),%edx subl %eax,%eax inw (%dx) ret .type inw,@function .size inw,.-inw / / unsigned long inl(int port); / .align 4 inl: movl 4(%esp),%edx inl (%dx) ret .type inl,@function .size inl,.-inl / / void outb(int port, unsigned char value); / .align 4 outb: movl 4(%esp),%edx movl 8(%esp),%eax outb (%dx) ret .type outb,@function .size outb,.-outb / / void outw(int port, unsigned short value); / .align 4 outw: movl 4(%esp),%edx movl 8(%esp),%eax outw (%dx) ret .type outw,@function .size outw,.-outw / / void outl(int port, unsigned long value); / .align 4 outl: movl 4(%esp),%edx movl 8(%esp),%eax outl (%dx) ret .type outl,@function .size outl,.-outl xorg-server-21.1.16/hw/xfree86/os-support/stub/0000755000175000017500000000000014757411134014732 5xorg-server-21.1.16/hw/xfree86/os-support/stub/Makefile.am0000644000175000017500000000067214757411105016711 noinst_LTLIBRARIES = libstub.la AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) libstub_la_SOURCES = \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/agp_noop.c \ $(srcdir)/../shared/ioperm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ stub_bell.c \ stub_init.c \ stub_video.c xorg-server-21.1.16/hw/xfree86/os-support/stub/Makefile.in0000644000175000017500000010576014757411115016727 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support/stub ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libstub_la_LIBADD = am_libstub_la_OBJECTS = VTsw_noop.lo agp_noop.lo ioperm_noop.lo \ kmod_noop.lo pm_noop.lo vidmem.lo posix_tty.lo sigio.lo \ stub_bell.lo stub_init.lo stub_video.lo libstub_la_OBJECTS = $(am_libstub_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/VTsw_noop.Plo \ ./$(DEPDIR)/agp_noop.Plo ./$(DEPDIR)/ioperm_noop.Plo \ ./$(DEPDIR)/kmod_noop.Plo ./$(DEPDIR)/pm_noop.Plo \ ./$(DEPDIR)/posix_tty.Plo ./$(DEPDIR)/sigio.Plo \ ./$(DEPDIR)/stub_bell.Plo ./$(DEPDIR)/stub_init.Plo \ ./$(DEPDIR)/stub_video.Plo ./$(DEPDIR)/vidmem.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libstub_la_SOURCES) DIST_SOURCES = $(libstub_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libstub.la AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) libstub_la_SOURCES = \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/agp_noop.c \ $(srcdir)/../shared/ioperm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/sigio.c \ stub_bell.c \ stub_init.c \ stub_video.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/stub/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/stub/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libstub.la: $(libstub_la_OBJECTS) $(libstub_la_DEPENDENCIES) $(EXTRA_libstub_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libstub_la_OBJECTS) $(libstub_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ioperm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_bell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_noop.lo -MD -MP -MF $(DEPDIR)/VTsw_noop.Tpo -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/VTsw_noop.Tpo $(DEPDIR)/VTsw_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/VTsw_noop.c' object='VTsw_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c agp_noop.lo: $(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c ioperm_noop.lo: $(srcdir)/../shared/ioperm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ioperm_noop.lo -MD -MP -MF $(DEPDIR)/ioperm_noop.Tpo -c -o ioperm_noop.lo `test -f '$(srcdir)/../shared/ioperm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/ioperm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ioperm_noop.Tpo $(DEPDIR)/ioperm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/ioperm_noop.c' object='ioperm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ioperm_noop.lo `test -f '$(srcdir)/../shared/ioperm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/ioperm_noop.c kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/kmod_noop.c' object='kmod_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c pm_noop.lo: $(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pm_noop.lo -MD -MP -MF $(DEPDIR)/pm_noop.Tpo -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pm_noop.Tpo $(DEPDIR)/pm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/pm_noop.c' object='pm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c posix_tty.lo: $(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posix_tty.lo -MD -MP -MF $(DEPDIR)/posix_tty.Tpo -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/posix_tty.Tpo $(DEPDIR)/posix_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/posix_tty.c' object='posix_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c sigio.lo: $(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigio.lo -MD -MP -MF $(DEPDIR)/sigio.Tpo -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sigio.Tpo $(DEPDIR)/sigio.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/sigio.c' object='sigio.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigio.lo `test -f '$(srcdir)/../shared/sigio.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigio.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/ioperm_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/stub_bell.Plo -rm -f ./$(DEPDIR)/stub_init.Plo -rm -f ./$(DEPDIR)/stub_video.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/ioperm_noop.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigio.Plo -rm -f ./$(DEPDIR)/stub_bell.Plo -rm -f ./$(DEPDIR)/stub_init.Plo -rm -f ./$(DEPDIR)/stub_video.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/stub/stub_bell.c0000644000175000017500000000022314757411105016764 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86_OSlib.h" void xf86OSRingBell(int loudness, int pitch, int duration) { } xorg-server-21.1.16/hw/xfree86/os-support/stub/stub_init.c0000644000175000017500000000045314757411105017016 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86_OSlib.h" void xf86OpenConsole(void) { } void xf86CloseConsole(void) { } int xf86ProcessArgument(int argc, char *argv[], int i) { return 0; } void xf86UseMsg(void) { } void xf86OSInputThreadInit(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/stub/stub_video.c0000644000175000017500000000031214757411105017153 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86_OSlib.h" #include "xf86OSpriv.h" void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; return; } xorg-server-21.1.16/hw/xfree86/os-support/hurd/0000755000175000017500000000000014757411134014717 5xorg-server-21.1.16/hw/xfree86/os-support/hurd/Makefile.am0000644000175000017500000000065414757411105016676 noinst_LTLIBRARIES = libhurd.la libhurd_la_SOURCES = hurd_bell.c hurd_init.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/agp_noop.c AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) xorg-server-21.1.16/hw/xfree86/os-support/hurd/Makefile.in0000644000175000017500000010343614757411115016712 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/os-support/hurd ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhurd_la_LIBADD = am_libhurd_la_OBJECTS = hurd_bell.lo hurd_init.lo hurd_video.lo \ VTsw_noop.lo posix_tty.lo vidmem.lo sigiostubs.lo pm_noop.lo \ kmod_noop.lo agp_noop.lo libhurd_la_OBJECTS = $(am_libhurd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/VTsw_noop.Plo \ ./$(DEPDIR)/agp_noop.Plo ./$(DEPDIR)/hurd_bell.Plo \ ./$(DEPDIR)/hurd_init.Plo ./$(DEPDIR)/hurd_video.Plo \ ./$(DEPDIR)/kmod_noop.Plo ./$(DEPDIR)/pm_noop.Plo \ ./$(DEPDIR)/posix_tty.Plo ./$(DEPDIR)/sigiostubs.Plo \ ./$(DEPDIR)/vidmem.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libhurd_la_SOURCES) DIST_SOURCES = $(libhurd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libhurd.la libhurd_la_SOURCES = hurd_bell.c hurd_init.c \ hurd_video.c \ $(srcdir)/../shared/VTsw_noop.c \ $(srcdir)/../shared/posix_tty.c \ $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigiostubs.c \ $(srcdir)/../shared/pm_noop.c \ $(srcdir)/../shared/kmod_noop.c \ $(srcdir)/../shared/agp_noop.c AM_CFLAGS = -DHAVE_SYSV_IPC $(XORG_CFLAGS) $(DIX_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/os-support/hurd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/os-support/hurd/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libhurd.la: $(libhurd_la_OBJECTS) $(libhurd_la_DEPENDENCIES) $(EXTRA_libhurd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhurd_la_OBJECTS) $(libhurd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/VTsw_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agp_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_bell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_init.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hurd_video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kmod_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pm_noop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigiostubs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< VTsw_noop.lo: $(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT VTsw_noop.lo -MD -MP -MF $(DEPDIR)/VTsw_noop.Tpo -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/VTsw_noop.Tpo $(DEPDIR)/VTsw_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/VTsw_noop.c' object='VTsw_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o VTsw_noop.lo `test -f '$(srcdir)/../shared/VTsw_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/VTsw_noop.c posix_tty.lo: $(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT posix_tty.lo -MD -MP -MF $(DEPDIR)/posix_tty.Tpo -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/posix_tty.Tpo $(DEPDIR)/posix_tty.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/posix_tty.c' object='posix_tty.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o posix_tty.lo `test -f '$(srcdir)/../shared/posix_tty.c' || echo '$(srcdir)/'`$(srcdir)/../shared/posix_tty.c vidmem.lo: $(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT vidmem.lo -MD -MP -MF $(DEPDIR)/vidmem.Tpo -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/vidmem.Tpo $(DEPDIR)/vidmem.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/vidmem.c' object='vidmem.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o vidmem.lo `test -f '$(srcdir)/../shared/vidmem.c' || echo '$(srcdir)/'`$(srcdir)/../shared/vidmem.c sigiostubs.lo: $(srcdir)/../shared/sigiostubs.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sigiostubs.lo -MD -MP -MF $(DEPDIR)/sigiostubs.Tpo -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sigiostubs.Tpo $(DEPDIR)/sigiostubs.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/sigiostubs.c' object='sigiostubs.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sigiostubs.lo `test -f '$(srcdir)/../shared/sigiostubs.c' || echo '$(srcdir)/'`$(srcdir)/../shared/sigiostubs.c pm_noop.lo: $(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT pm_noop.lo -MD -MP -MF $(DEPDIR)/pm_noop.Tpo -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pm_noop.Tpo $(DEPDIR)/pm_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/pm_noop.c' object='pm_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o pm_noop.lo `test -f '$(srcdir)/../shared/pm_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/pm_noop.c kmod_noop.lo: $(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT kmod_noop.lo -MD -MP -MF $(DEPDIR)/kmod_noop.Tpo -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/kmod_noop.Tpo $(DEPDIR)/kmod_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/kmod_noop.c' object='kmod_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o kmod_noop.lo `test -f '$(srcdir)/../shared/kmod_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/kmod_noop.c agp_noop.lo: $(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT agp_noop.lo -MD -MP -MF $(DEPDIR)/agp_noop.Tpo -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/agp_noop.Tpo $(DEPDIR)/agp_noop.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/../shared/agp_noop.c' object='agp_noop.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o agp_noop.lo `test -f '$(srcdir)/../shared/agp_noop.c' || echo '$(srcdir)/'`$(srcdir)/../shared/agp_noop.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/hurd_bell.Plo -rm -f ./$(DEPDIR)/hurd_init.Plo -rm -f ./$(DEPDIR)/hurd_video.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigiostubs.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/VTsw_noop.Plo -rm -f ./$(DEPDIR)/agp_noop.Plo -rm -f ./$(DEPDIR)/hurd_bell.Plo -rm -f ./$(DEPDIR)/hurd_init.Plo -rm -f ./$(DEPDIR)/hurd_video.Plo -rm -f ./$(DEPDIR)/kmod_noop.Plo -rm -f ./$(DEPDIR)/pm_noop.Plo -rm -f ./$(DEPDIR)/posix_tty.Plo -rm -f ./$(DEPDIR)/sigiostubs.Plo -rm -f ./$(DEPDIR)/vidmem.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/os-support/hurd/hurd_bell.c0000644000175000017500000000254114757411105016743 /* * Copyright © 2006 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86Priv.h" void xf86OSRingBell(int loudness, int pitch, int duration) { return; } xorg-server-21.1.16/hw/xfree86/os-support/hurd/hurd_init.c0000644000175000017500000000453514757411105016775 /* * Copyright 1997,1998 by UCHIYAMA Yasushi * * 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 UCHIYAMA Yasushi not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. UCHIYAMA Yasushi makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL UCHIYAMA YASUSHI 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_XORG_CONFIG_H #include #endif #include #include "input.h" #include "scrnintstr.h" #include "compiler.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include #include #include #include #include #include #include int xf86ProcessArgument(int argc, char **argv, int i) { return 0; } void xf86UseMsg() { return; } void xf86OpenConsole() { if (serverGeneration == 1) { kern_return_t err; mach_port_t device; int fd; err = get_privileged_ports(NULL, &device); if (err) { errno = err; FatalError("xf86KbdInit can't get_privileged_ports. (%s)\n", strerror(errno)); } mach_port_deallocate(mach_task_self(), device); if ((fd = open("/dev/kbd", O_RDONLY | O_NONBLOCK)) < 0) { fprintf(stderr, "Cannot open keyboard (%s)\n", strerror(errno)); exit(1); } xf86Info.consoleFd = fd; } return; } void xf86CloseConsole() { close(xf86Info.consoleFd); return; } void xf86OSInputThreadInit(void) { return; } xorg-server-21.1.16/hw/xfree86/os-support/hurd/hurd_video.c0000644000175000017500000000545314757411105017140 /* * Copyright 1997, 1998 by UCHIYAMA Yasushi * * 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 UCHIYAMA Yasushi not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. UCHIYAMA Yasushi makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL UCHIYAMA YASUSHI 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_XORG_CONFIG_H #include #endif #include #include #include #include #include #include "input.h" #include "scrnintstr.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_OSlib.h" #include "xf86OSpriv.h" /************************************************************************** * Video Memory Mapping section ***************************************************************************/ /************************************************************************** * I/O Permissions section ***************************************************************************/ /* * Due to conflicts with "compiler.h", don't rely on to declare * this. */ extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on); Bool xf86EnableIO() { if (ioperm(0, 0x10000, 1)) { FatalError("xf86EnableIO: ioperm() failed (%s)\n", strerror(errno)); return FALSE; } #if 0 /* * Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these * ports, and the int10 wrapper is not emulating them. (Note that it's * effectively what happens in the Linux variant too, as iopl() is used * there, making the ioperm() meaningless.) * * Reenable this when int10 gets fixed. */ ioperm(0x40, 4, 0); /* trap access to the timer chip */ ioperm(0x60, 4, 0); /* trap access to the keyboard controller */ #endif return TRUE; } void xf86DisableIO() { ioperm(0, 0x10000, 0); return; } void xf86OSInitVidMem(VidMemInfoPtr pVidMem) { pVidMem->initialised = TRUE; } xorg-server-21.1.16/hw/xfree86/parser/0000755000175000017500000000000014757411134013116 5xorg-server-21.1.16/hw/xfree86/parser/meson.build0000644000175000017500000000122114757411105015172 srcs_xorg_parser = [ 'Device.c', 'Files.c', 'Flags.c', 'Input.c', 'InputClass.c', 'OutputClass.c', 'Layout.c', 'Module.c', 'Video.c', 'Monitor.c', 'Pointer.c', 'Screen.c', 'Vendor.c', 'read.c', 'scan.c', 'write.c', 'DRI.c', 'Extensions.c', ] xorg_parser = static_library('xorg_parser', srcs_xorg_parser, include_directories: [inc, xorg_inc], dependencies: common_dep, c_args: [ xorg_c_args, '-DDATADIR="' + join_paths(get_option('prefix'), get_option('datadir')) + '"', ], ) install_data(['xf86Parser.h', 'xf86Optrec.h'], install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/parser/Makefile.am0000644000175000017500000000107714757411105015075 noinst_LTLIBRARIES = libxf86config.la INTERNAL_SOURCES= \ Device.c \ Files.c \ Flags.c \ Input.c \ InputClass.c \ OutputClass.c \ Layout.c \ Module.c \ Video.c \ Monitor.c \ Pointer.c \ Screen.c \ Vendor.c \ read.c \ scan.c \ write.c \ DRI.c \ Extensions.c libxf86config_la_SOURCES = \ $(INTERNAL_SOURCES) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \ -DDATADIR=\"$(datadir)\" EXTRA_DIST = \ Configint.h \ configProcs.h \ xf86Optrec.h \ xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ xf86Parser.h \ xf86Optrec.h AM_CPPFLAGS = -I$(srcdir)/../common xorg-server-21.1.16/hw/xfree86/parser/xf86Parser.h0000644000175000017500000003621214757411105015161 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the external interfaces for the XFree86 configuration * file parser. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _xf86Parser_h_ #define _xf86Parser_h_ #include #include "xf86Optrec.h" #include "list.h" #define HAVE_PARSER_DECLS typedef struct { char *file_logfile; char *file_modulepath; char *file_fontpath; char *file_comment; char *file_xkbdir; } XF86ConfFilesRec, *XF86ConfFilesPtr; /* Values for load_type */ #define XF86_LOAD_MODULE 0 #define XF86_LOAD_DRIVER 1 #define XF86_DISABLE_MODULE 2 typedef struct { GenericListRec list; int load_type; const char *load_name; XF86OptionPtr load_opt; char *load_comment; int ignore; } XF86LoadRec, *XF86LoadPtr; typedef struct { XF86LoadPtr mod_load_lst; XF86LoadPtr mod_disable_lst; char *mod_comment; } XF86ConfModuleRec, *XF86ConfModulePtr; #define CONF_IMPLICIT_KEYBOARD "Implicit Core Keyboard" #define CONF_IMPLICIT_POINTER "Implicit Core Pointer" #define XF86CONF_PHSYNC 0x0001 #define XF86CONF_NHSYNC 0x0002 #define XF86CONF_PVSYNC 0x0004 #define XF86CONF_NVSYNC 0x0008 #define XF86CONF_INTERLACE 0x0010 #define XF86CONF_DBLSCAN 0x0020 #define XF86CONF_CSYNC 0x0040 #define XF86CONF_PCSYNC 0x0080 #define XF86CONF_NCSYNC 0x0100 #define XF86CONF_HSKEW 0x0200 /* hskew provided */ #define XF86CONF_BCAST 0x0400 #define XF86CONF_VSCAN 0x1000 typedef struct { GenericListRec list; const char *ml_identifier; int ml_clock; int ml_hdisplay; int ml_hsyncstart; int ml_hsyncend; int ml_htotal; int ml_vdisplay; int ml_vsyncstart; int ml_vsyncend; int ml_vtotal; int ml_vscan; int ml_flags; int ml_hskew; char *ml_comment; } XF86ConfModeLineRec, *XF86ConfModeLinePtr; typedef struct { GenericListRec list; const char *vp_identifier; XF86OptionPtr vp_option_lst; char *vp_comment; } XF86ConfVideoPortRec, *XF86ConfVideoPortPtr; typedef struct { GenericListRec list; const char *va_identifier; const char *va_vendor; const char *va_board; const char *va_busid; const char *va_driver; XF86OptionPtr va_option_lst; XF86ConfVideoPortPtr va_port_lst; const char *va_fwdref; char *va_comment; } XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr; #define CONF_MAX_HSYNC 8 #define CONF_MAX_VREFRESH 8 typedef struct { float hi, lo; } parser_range; typedef struct { int red, green, blue; } parser_rgb; typedef struct { GenericListRec list; const char *modes_identifier; XF86ConfModeLinePtr mon_modeline_lst; char *modes_comment; } XF86ConfModesRec, *XF86ConfModesPtr; typedef struct { GenericListRec list; const char *ml_modes_str; XF86ConfModesPtr ml_modes; } XF86ConfModesLinkRec, *XF86ConfModesLinkPtr; typedef struct { GenericListRec list; const char *mon_identifier; const char *mon_vendor; char *mon_modelname; int mon_width; /* in mm */ int mon_height; /* in mm */ XF86ConfModeLinePtr mon_modeline_lst; int mon_n_hsync; parser_range mon_hsync[CONF_MAX_HSYNC]; int mon_n_vrefresh; parser_range mon_vrefresh[CONF_MAX_VREFRESH]; float mon_gamma_red; float mon_gamma_green; float mon_gamma_blue; XF86OptionPtr mon_option_lst; XF86ConfModesLinkPtr mon_modes_sect_lst; char *mon_comment; } XF86ConfMonitorRec, *XF86ConfMonitorPtr; #define CONF_MAXDACSPEEDS 4 #define CONF_MAXCLOCKS 128 typedef struct { GenericListRec list; const char *dev_identifier; const char *dev_vendor; const char *dev_board; const char *dev_chipset; const char *dev_busid; const char *dev_card; const char *dev_driver; const char *dev_ramdac; int dev_dacSpeeds[CONF_MAXDACSPEEDS]; int dev_videoram; unsigned long dev_mem_base; unsigned long dev_io_base; const char *dev_clockchip; int dev_clocks; int dev_clock[CONF_MAXCLOCKS]; int dev_chipid; int dev_chiprev; int dev_irq; int dev_screen; XF86OptionPtr dev_option_lst; char *dev_comment; char *match_seat; } XF86ConfDeviceRec, *XF86ConfDevicePtr; typedef struct { GenericListRec list; const char *mode_name; } XF86ModeRec, *XF86ModePtr; typedef struct { GenericListRec list; int disp_frameX0; int disp_frameY0; int disp_virtualX; int disp_virtualY; int disp_depth; int disp_bpp; const char *disp_visual; parser_rgb disp_weight; parser_rgb disp_black; parser_rgb disp_white; XF86ModePtr disp_mode_lst; XF86OptionPtr disp_option_lst; char *disp_comment; } XF86ConfDisplayRec, *XF86ConfDisplayPtr; typedef struct { XF86OptionPtr flg_option_lst; char *flg_comment; } XF86ConfFlagsRec, *XF86ConfFlagsPtr; typedef struct { GenericListRec list; const char *al_adaptor_str; XF86ConfVideoAdaptorPtr al_adaptor; } XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr; #define CONF_MAXGPUDEVICES 4 typedef struct { GenericListRec list; const char *scrn_identifier; const char *scrn_obso_driver; int scrn_defaultdepth; int scrn_defaultbpp; int scrn_defaultfbbpp; const char *scrn_monitor_str; XF86ConfMonitorPtr scrn_monitor; const char *scrn_device_str; XF86ConfDevicePtr scrn_device; XF86ConfAdaptorLinkPtr scrn_adaptor_lst; XF86ConfDisplayPtr scrn_display_lst; XF86OptionPtr scrn_option_lst; char *scrn_comment; int scrn_virtualX, scrn_virtualY; char *match_seat; int num_gpu_devices; const char *scrn_gpu_device_str[CONF_MAXGPUDEVICES]; XF86ConfDevicePtr scrn_gpu_devices[CONF_MAXGPUDEVICES]; } XF86ConfScreenRec, *XF86ConfScreenPtr; typedef struct { GenericListRec list; char *inp_identifier; char *inp_driver; XF86OptionPtr inp_option_lst; char *inp_comment; } XF86ConfInputRec, *XF86ConfInputPtr; typedef struct { GenericListRec list; XF86ConfInputPtr iref_inputdev; char *iref_inputdev_str; XF86OptionPtr iref_option_lst; } XF86ConfInputrefRec, *XF86ConfInputrefPtr; typedef struct { Bool set; Bool val; } xf86TriState; typedef struct { struct xorg_list entry; char **values; Bool is_negated; } xf86MatchGroup; typedef struct { GenericListRec list; char *identifier; char *driver; struct xorg_list match_product; struct xorg_list match_vendor; struct xorg_list match_device; struct xorg_list match_os; struct xorg_list match_pnpid; struct xorg_list match_usbid; struct xorg_list match_driver; struct xorg_list match_tag; struct xorg_list match_layout; xf86TriState is_keyboard; xf86TriState is_pointer; xf86TriState is_joystick; xf86TriState is_tablet; xf86TriState is_tablet_pad; xf86TriState is_touchpad; xf86TriState is_touchscreen; XF86OptionPtr option_lst; char *comment; } XF86ConfInputClassRec, *XF86ConfInputClassPtr; typedef struct { GenericListRec list; char *identifier; char *driver; char *modulepath; struct xorg_list match_driver; XF86OptionPtr option_lst; char *comment; } XF86ConfOutputClassRec, *XF86ConfOutputClassPtr; /* Values for adj_where */ #define CONF_ADJ_OBSOLETE -1 #define CONF_ADJ_ABSOLUTE 0 #define CONF_ADJ_RIGHTOF 1 #define CONF_ADJ_LEFTOF 2 #define CONF_ADJ_ABOVE 3 #define CONF_ADJ_BELOW 4 #define CONF_ADJ_RELATIVE 5 typedef struct { GenericListRec list; int adj_scrnum; XF86ConfScreenPtr adj_screen; const char *adj_screen_str; XF86ConfScreenPtr adj_top; const char *adj_top_str; XF86ConfScreenPtr adj_bottom; const char *adj_bottom_str; XF86ConfScreenPtr adj_left; const char *adj_left_str; XF86ConfScreenPtr adj_right; const char *adj_right_str; int adj_where; int adj_x; int adj_y; const char *adj_refscreen; } XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr; typedef struct { GenericListRec list; const char *inactive_device_str; XF86ConfDevicePtr inactive_device; } XF86ConfInactiveRec, *XF86ConfInactivePtr; typedef struct { GenericListRec list; const char *lay_identifier; XF86ConfAdjacencyPtr lay_adjacency_lst; XF86ConfInactivePtr lay_inactive_lst; XF86ConfInputrefPtr lay_input_lst; XF86OptionPtr lay_option_lst; char *match_seat; char *lay_comment; } XF86ConfLayoutRec, *XF86ConfLayoutPtr; typedef struct { GenericListRec list; const char *vs_name; const char *vs_identifier; XF86OptionPtr vs_option_lst; char *vs_comment; } XF86ConfVendSubRec, *XF86ConfVendSubPtr; typedef struct { GenericListRec list; const char *vnd_identifier; XF86OptionPtr vnd_option_lst; XF86ConfVendSubPtr vnd_sub_lst; char *vnd_comment; } XF86ConfVendorRec, *XF86ConfVendorPtr; typedef struct { const char *dri_group_name; int dri_group; int dri_mode; char *dri_comment; } XF86ConfDRIRec, *XF86ConfDRIPtr; typedef struct { XF86OptionPtr ext_option_lst; char *extensions_comment; } XF86ConfExtensionsRec, *XF86ConfExtensionsPtr; typedef struct { XF86ConfFilesPtr conf_files; XF86ConfModulePtr conf_modules; XF86ConfFlagsPtr conf_flags; XF86ConfVideoAdaptorPtr conf_videoadaptor_lst; XF86ConfModesPtr conf_modes_lst; XF86ConfMonitorPtr conf_monitor_lst; XF86ConfDevicePtr conf_device_lst; XF86ConfScreenPtr conf_screen_lst; XF86ConfInputPtr conf_input_lst; XF86ConfInputClassPtr conf_inputclass_lst; XF86ConfOutputClassPtr conf_outputclass_lst; XF86ConfLayoutPtr conf_layout_lst; XF86ConfVendorPtr conf_vendor_lst; XF86ConfDRIPtr conf_dri; XF86ConfExtensionsPtr conf_extensions; char *conf_comment; } XF86ConfigRec, *XF86ConfigPtr; typedef struct { int token; /* id of the token */ const char *name; /* pointer to the LOWERCASED name */ } xf86ConfigSymTabRec, *xf86ConfigSymTabPtr; /* * prototypes for public functions */ extern void xf86initConfigFiles(void); extern char *xf86openConfigFile(const char *path, const char *cmdline, const char *projroot); extern char *xf86openConfigDirFiles(const char *path, const char *cmdline, const char *projroot); extern void xf86setBuiltinConfig(const char *config[]); extern XF86ConfigPtr xf86readConfigFile(void); extern void xf86closeConfigFile(void); extern XF86ConfigPtr xf86allocateConfig(void); extern void xf86freeConfig(XF86ConfigPtr p); extern int xf86writeConfigFile(const char *, XF86ConfigPtr); extern _X_EXPORT XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p); extern _X_EXPORT XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list); extern _X_EXPORT XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p); extern _X_EXPORT XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p); extern _X_EXPORT XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p); extern _X_EXPORT XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p); extern _X_EXPORT XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p); extern _X_EXPORT XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p); extern _X_EXPORT XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, XF86ConfVideoAdaptorPtr p); extern int xf86layoutAddInputDevices(XF86ConfigPtr config, XF86ConfLayoutPtr layout); extern _X_EXPORT GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr c_new); extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2); extern _X_EXPORT int xf86pathIsAbsolute(const char *path); extern _X_EXPORT int xf86pathIsSafe(const char *path); extern _X_EXPORT char *xf86addComment(char *cur, const char *add); extern _X_EXPORT Bool xf86getBoolValue(Bool *val, const char *str); #endif /* _xf86Parser_h_ */ xorg-server-21.1.16/hw/xfree86/parser/xf86Optrec.h0000644000175000017500000001071414757411105015160 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * This file contains the Option Record that is passed between the Parser, * and Module setup procs. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _xf86Optrec_h_ #define _xf86Optrec_h_ #include #include #include "xf86Optionstr.h" #include extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val); extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt); extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt); extern _X_EXPORT char *xf86optionName(XF86OptionPtr opt); extern _X_EXPORT char *xf86optionValue(XF86OptionPtr opt); extern _X_EXPORT XF86OptionPtr xf86newOption(char *name, char *value); extern _X_EXPORT XF86OptionPtr xf86nextOption(XF86OptionPtr list); extern _X_EXPORT XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name); extern _X_EXPORT const char *xf86findOptionValue(XF86OptionPtr list, const char *name); extern _X_EXPORT XF86OptionPtr xf86optionListCreate(const char **options, int count, int used); extern _X_EXPORT XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail); extern _X_EXPORT int xf86nameCompare(const char *s1, const char *s2); extern _X_EXPORT char *xf86uLongToString(unsigned long i); extern _X_EXPORT XF86OptionPtr xf86parseOption(XF86OptionPtr head); extern _X_EXPORT void xf86printOptionList(FILE * fp, XF86OptionPtr list, int tabs); #endif /* _xf86Optrec_h_ */ xorg-server-21.1.16/hw/xfree86/parser/Makefile.in0000644000175000017500000007440014757411115015107 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/parser ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxf86config_la_LIBADD = am__objects_1 = Device.lo Files.lo Flags.lo Input.lo InputClass.lo \ OutputClass.lo Layout.lo Module.lo Video.lo Monitor.lo \ Pointer.lo Screen.lo Vendor.lo read.lo scan.lo write.lo DRI.lo \ Extensions.lo am_libxf86config_la_OBJECTS = $(am__objects_1) libxf86config_la_OBJECTS = $(am_libxf86config_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/DRI.Plo ./$(DEPDIR)/Device.Plo \ ./$(DEPDIR)/Extensions.Plo ./$(DEPDIR)/Files.Plo \ ./$(DEPDIR)/Flags.Plo ./$(DEPDIR)/Input.Plo \ ./$(DEPDIR)/InputClass.Plo ./$(DEPDIR)/Layout.Plo \ ./$(DEPDIR)/Module.Plo ./$(DEPDIR)/Monitor.Plo \ ./$(DEPDIR)/OutputClass.Plo ./$(DEPDIR)/Pointer.Plo \ ./$(DEPDIR)/Screen.Plo ./$(DEPDIR)/Vendor.Plo \ ./$(DEPDIR)/Video.Plo ./$(DEPDIR)/read.Plo \ ./$(DEPDIR)/scan.Plo ./$(DEPDIR)/write.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxf86config_la_SOURCES) DIST_SOURCES = $(libxf86config_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxf86config.la INTERNAL_SOURCES = \ Device.c \ Files.c \ Flags.c \ Input.c \ InputClass.c \ OutputClass.c \ Layout.c \ Module.c \ Video.c \ Monitor.c \ Pointer.c \ Screen.c \ Vendor.c \ read.c \ scan.c \ write.c \ DRI.c \ Extensions.c libxf86config_la_SOURCES = \ $(INTERNAL_SOURCES) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) \ -DDATADIR=\"$(datadir)\" EXTRA_DIST = \ Configint.h \ configProcs.h \ xf86Optrec.h \ xf86Parser.h \ xf86tokens.h sdk_HEADERS = \ xf86Parser.h \ xf86Optrec.h AM_CPPFLAGS = -I$(srcdir)/../common all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/parser/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxf86config.la: $(libxf86config_la_OBJECTS) $(libxf86config_la_DEPENDENCIES) $(EXTRA_libxf86config_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxf86config_la_OBJECTS) $(libxf86config_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DRI.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Device.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Extensions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Files.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Flags.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Input.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InputClass.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputClass.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Video.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scan.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/write.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/DRI.Plo -rm -f ./$(DEPDIR)/Device.Plo -rm -f ./$(DEPDIR)/Extensions.Plo -rm -f ./$(DEPDIR)/Files.Plo -rm -f ./$(DEPDIR)/Flags.Plo -rm -f ./$(DEPDIR)/Input.Plo -rm -f ./$(DEPDIR)/InputClass.Plo -rm -f ./$(DEPDIR)/Layout.Plo -rm -f ./$(DEPDIR)/Module.Plo -rm -f ./$(DEPDIR)/Monitor.Plo -rm -f ./$(DEPDIR)/OutputClass.Plo -rm -f ./$(DEPDIR)/Pointer.Plo -rm -f ./$(DEPDIR)/Screen.Plo -rm -f ./$(DEPDIR)/Vendor.Plo -rm -f ./$(DEPDIR)/Video.Plo -rm -f ./$(DEPDIR)/read.Plo -rm -f ./$(DEPDIR)/scan.Plo -rm -f ./$(DEPDIR)/write.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/DRI.Plo -rm -f ./$(DEPDIR)/Device.Plo -rm -f ./$(DEPDIR)/Extensions.Plo -rm -f ./$(DEPDIR)/Files.Plo -rm -f ./$(DEPDIR)/Flags.Plo -rm -f ./$(DEPDIR)/Input.Plo -rm -f ./$(DEPDIR)/InputClass.Plo -rm -f ./$(DEPDIR)/Layout.Plo -rm -f ./$(DEPDIR)/Module.Plo -rm -f ./$(DEPDIR)/Monitor.Plo -rm -f ./$(DEPDIR)/OutputClass.Plo -rm -f ./$(DEPDIR)/Pointer.Plo -rm -f ./$(DEPDIR)/Screen.Plo -rm -f ./$(DEPDIR)/Vendor.Plo -rm -f ./$(DEPDIR)/Video.Plo -rm -f ./$(DEPDIR)/read.Plo -rm -f ./$(DEPDIR)/scan.Plo -rm -f ./$(DEPDIR)/write.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/parser/Device.c0000644000175000017500000003063414757411105014405 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec DeviceTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {VENDOR, "vendorname"}, {BOARD, "boardname"}, {CHIPSET, "chipset"}, {RAMDAC, "ramdac"}, {DACSPEED, "dacspeed"}, {CLOCKS, "clocks"}, {MATCHSEAT, "matchseat"}, {OPTION, "option"}, {VIDEORAM, "videoram"}, {BIOSBASE, "biosbase"}, {MEMBASE, "membase"}, {IOBASE, "iobase"}, {CLOCKCHIP, "clockchip"}, {CHIPID, "chipid"}, {CHIPREV, "chiprev"}, {CARD, "card"}, {DRIVER, "driver"}, {BUSID, "busid"}, {IRQ, "irq"}, {SCREEN, "screen"}, {-1, ""}, }; #define CLEANUP xf86freeDeviceList XF86ConfDevicePtr xf86parseDeviceSection(void) { int i; int has_ident = FALSE; int token; parsePrologue(XF86ConfDevicePtr, XF86ConfDeviceRec) /* Zero is a valid value for these */ ptr->dev_chipid = -1; ptr->dev_chiprev = -1; ptr->dev_irq = -1; while ((token = xf86getToken(DeviceTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->dev_comment = xf86addComment(ptr->dev_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->dev_identifier = xf86_lex_val.str; has_ident = TRUE; break; case VENDOR: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Vendor"); ptr->dev_vendor = xf86_lex_val.str; break; case BOARD: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Board"); ptr->dev_board = xf86_lex_val.str; break; case CHIPSET: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Chipset"); ptr->dev_chipset = xf86_lex_val.str; break; case CARD: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Card"); ptr->dev_card = xf86_lex_val.str; break; case DRIVER: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Driver"); ptr->dev_driver = xf86_lex_val.str; break; case RAMDAC: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Ramdac"); ptr->dev_ramdac = xf86_lex_val.str; break; case DACSPEED: for (i = 0; i < CONF_MAXDACSPEEDS; i++) ptr->dev_dacSpeeds[i] = 0; if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) { Error(DACSPEED_MSG, CONF_MAXDACSPEEDS); } else { ptr->dev_dacSpeeds[0] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); for (i = 1; i < CONF_MAXDACSPEEDS; i++) { if (xf86getSubToken(&(ptr->dev_comment)) == NUMBER) ptr->dev_dacSpeeds[i] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); else { xf86unGetToken(token); break; } } } break; case VIDEORAM: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "VideoRam"); ptr->dev_videoram = xf86_lex_val.num; break; case BIOSBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "BIOSBase"); /* ignored */ break; case MEMBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "MemBase"); ptr->dev_mem_base = xf86_lex_val.num; break; case IOBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "IOBase"); ptr->dev_io_base = xf86_lex_val.num; break; case CLOCKCHIP: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "ClockChip"); ptr->dev_clockchip = xf86_lex_val.str; break; case CHIPID: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "ChipID"); ptr->dev_chipid = xf86_lex_val.num; break; case CHIPREV: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "ChipRev"); ptr->dev_chiprev = xf86_lex_val.num; break; case CLOCKS: token = xf86getSubToken(&(ptr->dev_comment)); for (i = ptr->dev_clocks; token == NUMBER && i < CONF_MAXCLOCKS; i++) { ptr->dev_clock[i] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); token = xf86getSubToken(&(ptr->dev_comment)); } ptr->dev_clocks = i; xf86unGetToken(token); break; case MATCHSEAT: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "MatchSeat"); ptr->match_seat = xf86_lex_val.str; break; case OPTION: ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst); break; case BUSID: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "BusID"); ptr->dev_busid = xf86_lex_val.str; break; case IRQ: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(QUOTE_MSG, "IRQ"); ptr->dev_irq = xf86_lex_val.num; break; case SCREEN: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "Screen"); ptr->dev_screen = xf86_lex_val.num; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Device section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr) { int i; while (ptr) { fprintf(cf, "Section \"Device\"\n"); if (ptr->dev_comment) fprintf(cf, "%s", ptr->dev_comment); if (ptr->dev_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->dev_identifier); if (ptr->dev_driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->dev_driver); if (ptr->dev_vendor) fprintf(cf, "\tVendorName \"%s\"\n", ptr->dev_vendor); if (ptr->dev_board) fprintf(cf, "\tBoardName \"%s\"\n", ptr->dev_board); if (ptr->dev_chipset) fprintf(cf, "\tChipSet \"%s\"\n", ptr->dev_chipset); if (ptr->dev_card) fprintf(cf, "\tCard \"%s\"\n", ptr->dev_card); if (ptr->dev_ramdac) fprintf(cf, "\tRamDac \"%s\"\n", ptr->dev_ramdac); if (ptr->dev_dacSpeeds[0] > 0) { fprintf(cf, "\tDacSpeed "); for (i = 0; i < CONF_MAXDACSPEEDS && ptr->dev_dacSpeeds[i] > 0; i++) fprintf(cf, "%g ", (double) (ptr->dev_dacSpeeds[i]) / 1000.0); fprintf(cf, "\n"); } if (ptr->dev_videoram) fprintf(cf, "\tVideoRam %d\n", ptr->dev_videoram); if (ptr->dev_mem_base) fprintf(cf, "\tMemBase 0x%lx\n", ptr->dev_mem_base); if (ptr->dev_io_base) fprintf(cf, "\tIOBase 0x%lx\n", ptr->dev_io_base); if (ptr->dev_clockchip) fprintf(cf, "\tClockChip \"%s\"\n", ptr->dev_clockchip); if (ptr->dev_chipid != -1) fprintf(cf, "\tChipId 0x%x\n", ptr->dev_chipid); if (ptr->dev_chiprev != -1) fprintf(cf, "\tChipRev 0x%x\n", ptr->dev_chiprev); xf86printOptionList(cf, ptr->dev_option_lst, 1); if (ptr->dev_clocks > 0) { fprintf(cf, "\tClocks "); for (i = 0; i < ptr->dev_clocks; i++) fprintf(cf, "%.1f ", (double) ptr->dev_clock[i] / 1000.0); fprintf(cf, "\n"); } if (ptr->dev_busid) fprintf(cf, "\tBusID \"%s\"\n", ptr->dev_busid); if (ptr->dev_screen > 0) fprintf(cf, "\tScreen %d\n", ptr->dev_screen); if (ptr->dev_irq >= 0) fprintf(cf, "\tIRQ %d\n", ptr->dev_irq); fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86freeDeviceList(XF86ConfDevicePtr ptr) { XF86ConfDevicePtr prev; while (ptr) { TestFree(ptr->dev_identifier); TestFree(ptr->dev_vendor); TestFree(ptr->dev_board); TestFree(ptr->dev_chipset); TestFree(ptr->dev_card); TestFree(ptr->dev_driver); TestFree(ptr->dev_ramdac); TestFree(ptr->dev_clockchip); TestFree(ptr->dev_comment); xf86optionListFree(ptr->dev_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } XF86ConfDevicePtr xf86findDevice(const char *ident, XF86ConfDevicePtr p) { while (p) { if (xf86nameCompare(ident, p->dev_identifier) == 0) return p; p = p->list.next; } return NULL; } xorg-server-21.1.16/hw/xfree86/parser/Files.c0000644000175000017500000001700314757411105014243 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec FilesTab[] = { {ENDSECTION, "endsection"}, {FONTPATH, "fontpath"}, {MODULEPATH, "modulepath"}, {LOGFILEPATH, "logfile"}, {XKBDIR, "xkbdir"}, /* Obsolete keywords that aren't used but shouldn't cause errors: */ {OBSOLETE_TOKEN, "rgbpath"}, {OBSOLETE_TOKEN, "inputdevices"}, {-1, ""}, }; #define CLEANUP xf86freeFiles XF86ConfFilesPtr xf86parseFilesSection(void) { int i, j; int k, l; char *str; int token; parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) while ((token = xf86getToken(FilesTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->file_comment = xf86addComment(ptr->file_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case FONTPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "FontPath"); j = FALSE; str = xf86_lex_val.str; if (ptr->file_fontpath == NULL) { ptr->file_fontpath = calloc(1, 1); i = strlen(str) + 1; } else { i = strlen(ptr->file_fontpath) + strlen(str) + 1; if (ptr->file_fontpath[strlen(ptr->file_fontpath) - 1] != ',') { i++; j = TRUE; } } ptr->file_fontpath = realloc(ptr->file_fontpath, i); if (j) strcat(ptr->file_fontpath, ","); strcat(ptr->file_fontpath, str); free(xf86_lex_val.str); break; case MODULEPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "ModulePath"); l = FALSE; str = xf86_lex_val.str; if (ptr->file_modulepath == NULL) { ptr->file_modulepath = malloc(1); ptr->file_modulepath[0] = '\0'; k = strlen(str) + 1; } else { k = strlen(ptr->file_modulepath) + strlen(str) + 1; if (ptr->file_modulepath[strlen(ptr->file_modulepath) - 1] != ',') { k++; l = TRUE; } } ptr->file_modulepath = realloc(ptr->file_modulepath, k); if (l) strcat(ptr->file_modulepath, ","); strcat(ptr->file_modulepath, str); free(xf86_lex_val.str); break; case LOGFILEPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "LogFile"); ptr->file_logfile = xf86_lex_val.str; break; case XKBDIR: if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING) Error(QUOTE_MSG, "XkbDir"); ptr->file_xkbdir = xf86_lex_val.str; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; case OBSOLETE_TOKEN: xf86parseError(OBSOLETE_MSG, xf86tokenString()); xf86getSubToken(&(ptr->file_comment)); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("File section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr) { char *p, *s; if (ptr == NULL) return; if (ptr->file_comment) fprintf(cf, "%s", ptr->file_comment); if (ptr->file_logfile) fprintf(cf, "\tLogFile \"%s\"\n", ptr->file_logfile); if (ptr->file_modulepath) { s = ptr->file_modulepath; p = index(s, ','); while (p) { *p = '\000'; fprintf(cf, "\tModulePath \"%s\"\n", s); *p = ','; s = p; s++; p = index(s, ','); } fprintf(cf, "\tModulePath \"%s\"\n", s); } if (ptr->file_fontpath) { s = ptr->file_fontpath; p = index(s, ','); while (p) { *p = '\000'; fprintf(cf, "\tFontPath \"%s\"\n", s); *p = ','; s = p; s++; p = index(s, ','); } fprintf(cf, "\tFontPath \"%s\"\n", s); } if (ptr->file_xkbdir) fprintf(cf, "\tXkbDir \"%s\"\n", ptr->file_xkbdir); } void xf86freeFiles(XF86ConfFilesPtr p) { if (p == NULL) return; TestFree(p->file_logfile); TestFree(p->file_modulepath); TestFree(p->file_fontpath); TestFree(p->file_comment); TestFree(p->file_xkbdir); free(p); } xorg-server-21.1.16/hw/xfree86/parser/Flags.c0000644000175000017500000003273714757411105014250 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" #include #include "Xprintf.h" #include "optionstr.h" static const xf86ConfigSymTabRec ServerFlagsTab[] = { {ENDSECTION, "endsection"}, {DONTZAP, "dontzap"}, {DONTZOOM, "dontzoom"}, {DISABLEVIDMODE, "disablevidmodeextension"}, {ALLOWNONLOCAL, "allownonlocalxvidtune"}, {DISABLEMODINDEV, "disablemodindev"}, {MODINDEVALLOWNONLOCAL, "allownonlocalmodindev"}, {ALLOWMOUSEOPENFAIL, "allowmouseopenfail"}, {OPTION, "option"}, {BLANKTIME, "blanktime"}, {STANDBYTIME, "standbytime"}, {SUSPENDTIME, "suspendtime"}, {OFFTIME, "offtime"}, {DEFAULTLAYOUT, "defaultserverlayout"}, {-1, ""}, }; #define CLEANUP xf86freeFlags XF86ConfFlagsPtr xf86parseFlagsSection(void) { int token; parsePrologue(XF86ConfFlagsPtr, XF86ConfFlagsRec) while ((token = xf86getToken(ServerFlagsTab)) != ENDSECTION) { int hasvalue = FALSE; int strvalue = FALSE; int tokentype; switch (token) { case COMMENT: ptr->flg_comment = xf86addComment(ptr->flg_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; /* * these old keywords are turned into standard generic options. * we fall through here on purpose */ case DEFAULTLAYOUT: strvalue = TRUE; case BLANKTIME: case STANDBYTIME: case SUSPENDTIME: case OFFTIME: hasvalue = TRUE; case DONTZAP: case DONTZOOM: case DISABLEVIDMODE: case ALLOWNONLOCAL: case DISABLEMODINDEV: case MODINDEVALLOWNONLOCAL: case ALLOWMOUSEOPENFAIL: { int i = 0; while (ServerFlagsTab[i].token != -1) { char *tmp; if (ServerFlagsTab[i].token == token) { char *valstr = NULL; tmp = strdup(ServerFlagsTab[i].name); if (hasvalue) { tokentype = xf86getSubToken(&(ptr->flg_comment)); if (strvalue) { if (tokentype != STRING) Error(QUOTE_MSG, tmp); valstr = xf86_lex_val.str; } else { if (tokentype != NUMBER) Error(NUMBER_MSG, tmp); if (asprintf(&valstr, "%d", xf86_lex_val.num) == -1) valstr = NULL; } } ptr->flg_option_lst = xf86addNewOption (ptr->flg_option_lst, tmp, valstr); } i++; } } break; case OPTION: ptr->flg_option_lst = xf86parseOption(ptr->flg_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("Flags section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printServerFlagsSection(FILE * f, XF86ConfFlagsPtr flags) { XF86OptionPtr p; if ((!flags) || (!flags->flg_option_lst)) return; p = flags->flg_option_lst; fprintf(f, "Section \"ServerFlags\"\n"); if (flags->flg_comment) fprintf(f, "%s", flags->flg_comment); xf86printOptionList(f, p, 1); fprintf(f, "EndSection\n\n"); } static XF86OptionPtr addNewOption2(XF86OptionPtr head, char *name, char *_val, int used) { XF86OptionPtr new, old = NULL; /* Don't allow duplicates, free old strings */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { new = old; free(new->opt_name); free(new->opt_val); } else new = calloc(1, sizeof(*new)); new->opt_name = name; new->opt_val = _val; new->opt_used = used; if (old) return head; return ((XF86OptionPtr) xf86addListItem((glp) head, (glp) new)); } XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *_val) { return addNewOption2(head, name, _val, 0); } void xf86freeFlags(XF86ConfFlagsPtr flags) { if (flags == NULL) return; xf86optionListFree(flags->flg_option_lst); TestFree(flags->flg_comment); free(flags); } XF86OptionPtr xf86optionListDup(XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; char *_val; while (opt) { _val = opt->opt_val ? strdup(opt->opt_val) : NULL; newopt = xf86addNewOption(newopt, strdup(opt->opt_name), _val); newopt->opt_used = opt->opt_used; if (opt->opt_comment) newopt->opt_comment = strdup(opt->opt_comment); opt = opt->list.next; } return newopt; } void xf86optionListFree(XF86OptionPtr opt) { XF86OptionPtr prev; while (opt) { TestFree(opt->opt_name); TestFree(opt->opt_val); TestFree(opt->opt_comment); prev = opt; opt = opt->list.next; free(prev); } } char * xf86optionName(XF86OptionPtr opt) { if (opt) return opt->opt_name; return 0; } char * xf86optionValue(XF86OptionPtr opt) { if (opt) return opt->opt_val; return 0; } XF86OptionPtr xf86newOption(char *name, char *value) { XF86OptionPtr opt; opt = calloc(1, sizeof(*opt)); if (!opt) return NULL; opt->opt_used = 0; opt->list.next = 0; opt->opt_name = name; opt->opt_val = value; return opt; } XF86OptionPtr xf86nextOption(XF86OptionPtr list) { if (!list) return NULL; return list->list.next; } /* * this function searches the given option list for the named option and * returns a pointer to the option rec if found. If not found, it returns * NULL */ XF86OptionPtr xf86findOption(XF86OptionPtr list, const char *name) { while (list) { if (xf86nameCompare(list->opt_name, name) == 0) return list; list = list->list.next; } return NULL; } /* * this function searches the given option list for the named option. If * found and the option has a parameter, a pointer to the parameter is * returned. If the option does not have a parameter an empty string is * returned. If the option is not found, a NULL is returned. */ const char * xf86findOptionValue(XF86OptionPtr list, const char *name) { XF86OptionPtr p = xf86findOption(list, name); if (p) { if (p->opt_val) return p->opt_val; else return ""; } return NULL; } XF86OptionPtr xf86optionListCreate(const char **options, int count, int used) { XF86OptionPtr p = NULL; char *t1, *t2; int i; if (count == -1) { for (count = 0; options[count]; count++); } if ((count % 2) != 0) { fprintf(stderr, "xf86optionListCreate: count must be an even number.\n"); return NULL; } for (i = 0; i < count; i += 2) { t1 = strdup(options[i]); t2 = strdup(options[i + 1]); p = addNewOption2(p, t1, t2, used); } return p; } /* the 2 given lists are merged. If an option with the same name is present in * both, the option from the user list - specified in the second argument - * is used. The end result is a single valid list of options. Duplicates * are freed, and the original lists are no longer guaranteed to be complete. */ XF86OptionPtr xf86optionListMerge(XF86OptionPtr head, XF86OptionPtr tail) { XF86OptionPtr a, b, ap = NULL, bp = NULL; a = tail; b = head; while (tail && b) { if (xf86nameCompare(a->opt_name, b->opt_name) == 0) { if (b == head) head = a; else bp->list.next = a; if (a == tail) tail = a->list.next; else ap->list.next = a->list.next; a->list.next = b->list.next; b->list.next = NULL; xf86optionListFree(b); b = a->list.next; bp = a; a = tail; ap = NULL; } else { ap = a; if (!(a = a->list.next)) { a = tail; bp = b; b = b->list.next; ap = NULL; } } } if (head) { for (a = head; a->list.next; a = a->list.next); a->list.next = tail; } else head = tail; return head; } char * xf86uLongToString(unsigned long i) { char *s; if (asprintf(&s, "%lu", i) == -1) return NULL; return s; } XF86OptionPtr xf86parseOption(XF86OptionPtr head) { XF86OptionPtr option, cnew, old; char *name, *comment = NULL; int token; if ((token = xf86getSubToken(&comment)) != STRING) { xf86parseError(BAD_OPTION_MSG); free(comment); return head; } name = xf86_lex_val.str; if ((token = xf86getSubToken(&comment)) == STRING) { option = xf86newOption(name, xf86_lex_val.str); option->opt_comment = comment; if ((token = xf86getToken(NULL)) == COMMENT) { option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; } else { xf86unGetToken(token); } } else { option = xf86newOption(name, NULL); option->opt_comment = comment; if (token == COMMENT) { option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; } else { xf86unGetToken(token); } } old = NULL; /* Don't allow duplicates */ if (head != NULL && (old = xf86findOption(head, name)) != NULL) { cnew = old; free(option->opt_name); TestFree(option->opt_val); TestFree(option->opt_comment); free(option); } else cnew = option; if (old == NULL) return ((XF86OptionPtr) xf86addListItem((glp) head, (glp) cnew)); return head; } void xf86printOptionList(FILE * fp, XF86OptionPtr list, int tabs) { int i; if (!list) return; while (list) { for (i = 0; i < tabs; i++) fputc('\t', fp); if (list->opt_val) fprintf(fp, "Option \"%s\" \"%s\"", list->opt_name, list->opt_val); else fprintf(fp, "Option \"%s\"", list->opt_name); if (list->opt_comment) fprintf(fp, "%s", list->opt_comment); else fputc('\n', fp); list = list->list.next; } } xorg-server-21.1.16/hw/xfree86/parser/Input.c0000644000175000017500000001442714757411105014307 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec InputTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {OPTION, "option"}, {DRIVER, "driver"}, {-1, ""}, }; #define CLEANUP xf86freeInputList XF86ConfInputPtr xf86parseInputSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfInputPtr, XF86ConfInputRec) while ((token = xf86getToken(InputTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->inp_identifier = xf86_lex_val.str; has_ident = TRUE; break; case DRIVER: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Driver"); if (strcmp(xf86_lex_val.str, "keyboard") == 0) { ptr->inp_driver = strdup("kbd"); free(xf86_lex_val.str); } else ptr->inp_driver = xf86_lex_val.str; break; case OPTION: ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("InputDevice section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printInputSection(FILE * cf, XF86ConfInputPtr ptr) { while (ptr) { fprintf(cf, "Section \"InputDevice\"\n"); if (ptr->inp_comment) fprintf(cf, "%s", ptr->inp_comment); if (ptr->inp_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->inp_identifier); if (ptr->inp_driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->inp_driver); xf86printOptionList(cf, ptr->inp_option_lst, 1); fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86freeInputList(XF86ConfInputPtr ptr) { XF86ConfInputPtr prev; while (ptr) { TestFree(ptr->inp_identifier); TestFree(ptr->inp_driver); TestFree(ptr->inp_comment); xf86optionListFree(ptr->inp_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } int xf86validateInput(XF86ConfigPtr p) { XF86ConfInputPtr input = p->conf_input_lst; while (input) { if (!input->inp_driver) { xf86validationError(UNDEFINED_INPUTDRIVER_MSG, input->inp_identifier); return FALSE; } input = input->list.next; } return TRUE; } XF86ConfInputPtr xf86findInput(const char *ident, XF86ConfInputPtr p) { while (p) { if (xf86nameCompare(ident, p->inp_identifier) == 0) return p; p = p->list.next; } return NULL; } XF86ConfInputPtr xf86findInputByDriver(const char *driver, XF86ConfInputPtr p) { while (p) { if (xf86nameCompare(driver, p->inp_driver) == 0) return p; p = p->list.next; } return NULL; } xorg-server-21.1.16/hw/xfree86/parser/InputClass.c0000644000175000017500000004501114757411105015266 /* * Copyright (c) 2009 Dan Nicholson * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * 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 AUTHORS OR COPYRIGHT * HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec InputClassTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {OPTION, "option"}, {DRIVER, "driver"}, {MATCH_PRODUCT, "matchproduct"}, {MATCH_VENDOR, "matchvendor"}, {MATCH_DEVICE_PATH, "matchdevicepath"}, {MATCH_OS, "matchos"}, {MATCH_PNPID, "matchpnpid"}, {MATCH_USBID, "matchusbid"}, {MATCH_DRIVER, "matchdriver"}, {MATCH_TAG, "matchtag"}, {MATCH_LAYOUT, "matchlayout"}, {MATCH_IS_KEYBOARD, "matchiskeyboard"}, {MATCH_IS_POINTER, "matchispointer"}, {MATCH_IS_JOYSTICK, "matchisjoystick"}, {MATCH_IS_TABLET, "matchistablet"}, {MATCH_IS_TABLET_PAD, "matchistabletpad"}, {MATCH_IS_TOUCHPAD, "matchistouchpad"}, {MATCH_IS_TOUCHSCREEN, "matchistouchscreen"}, {NOMATCH_PRODUCT, "nomatchproduct"}, {NOMATCH_VENDOR, "nomatchvendor"}, {NOMATCH_DEVICE_PATH, "nomatchdevicepath"}, {NOMATCH_OS, "nomatchos"}, {NOMATCH_PNPID, "nomatchpnpid"}, {NOMATCH_USBID, "nomatchusbid"}, {NOMATCH_DRIVER, "nomatchdriver"}, {NOMATCH_TAG, "nomatchtag"}, {NOMATCH_LAYOUT, "nomatchlayout"}, {-1, ""}, }; static void xf86freeInputClassList(XF86ConfInputClassPtr ptr) { XF86ConfInputClassPtr prev; while (ptr) { xf86MatchGroup *group, *next; char **list; TestFree(ptr->identifier); TestFree(ptr->driver); xorg_list_for_each_entry_safe(group, next, &ptr->match_product, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_vendor, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_device, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_os, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_pnpid, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_usbid, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_driver, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_tag, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xorg_list_for_each_entry_safe(group, next, &ptr->match_layout, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } TestFree(ptr->comment); xf86optionListFree(ptr->option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } #define CLEANUP xf86freeInputClassList #define TOKEN_SEP "|" enum MatchType { MATCH_NORMAL, MATCH_NEGATED, }; static void add_group_entry(struct xorg_list *head, char **values, enum MatchType type) { xf86MatchGroup *group; group = malloc(sizeof(*group)); if (group) { group->is_negated = (type == MATCH_NEGATED); group->values = values; xorg_list_add(&group->entry, head); } } XF86ConfInputClassPtr xf86parseInputClassSection(void) { int has_ident = FALSE; int token; enum MatchType matchtype; parsePrologue(XF86ConfInputClassPtr, XF86ConfInputClassRec) /* Initialize MatchGroup lists */ xorg_list_init(&ptr->match_product); xorg_list_init(&ptr->match_vendor); xorg_list_init(&ptr->match_device); xorg_list_init(&ptr->match_os); xorg_list_init(&ptr->match_pnpid); xorg_list_init(&ptr->match_usbid); xorg_list_init(&ptr->match_driver); xorg_list_init(&ptr->match_tag); xorg_list_init(&ptr->match_layout); while ((token = xf86getToken(InputClassTab)) != ENDSECTION) { matchtype = MATCH_NORMAL; switch (token) { case COMMENT: ptr->comment = xf86addComment(ptr->comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->identifier = xf86_lex_val.str; has_ident = TRUE; break; case DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Driver"); if (strcmp(xf86_lex_val.str, "keyboard") == 0) { ptr->driver = strdup("kbd"); free(xf86_lex_val.str); } else ptr->driver = xf86_lex_val.str; break; case OPTION: ptr->option_lst = xf86parseOption(ptr->option_lst); break; case NOMATCH_PRODUCT: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_PRODUCT: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchProduct"); add_group_entry(&ptr->match_product, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_VENDOR: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_VENDOR: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchVendor"); add_group_entry(&ptr->match_vendor, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_DEVICE_PATH: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_DEVICE_PATH: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDevicePath"); add_group_entry(&ptr->match_device, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_OS: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_OS: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchOS"); add_group_entry(&ptr->match_os, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_PNPID: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_PNPID: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchPnPID"); add_group_entry(&ptr->match_pnpid, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_USBID: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_USBID: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchUSBID"); add_group_entry(&ptr->match_usbid, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_DRIVER: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDriver"); add_group_entry(&ptr->match_driver, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_TAG: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_TAG: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchTag"); add_group_entry(&ptr->match_tag, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case NOMATCH_LAYOUT: matchtype = MATCH_NEGATED; /* fallthrough */ case MATCH_LAYOUT: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchLayout"); add_group_entry(&ptr->match_layout, xstrtokenize(xf86_lex_val.str, TOKEN_SEP), matchtype); free(xf86_lex_val.str); break; case MATCH_IS_KEYBOARD: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsKeyboard"); ptr->is_keyboard.set = xf86getBoolValue(&ptr->is_keyboard.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_keyboard.set) Error(BOOL_MSG, "MatchIsKeyboard"); break; case MATCH_IS_POINTER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsPointer"); ptr->is_pointer.set = xf86getBoolValue(&ptr->is_pointer.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_pointer.set) Error(BOOL_MSG, "MatchIsPointer"); break; case MATCH_IS_JOYSTICK: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsJoystick"); ptr->is_joystick.set = xf86getBoolValue(&ptr->is_joystick.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_joystick.set) Error(BOOL_MSG, "MatchIsJoystick"); break; case MATCH_IS_TABLET: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTablet"); ptr->is_tablet.set = xf86getBoolValue(&ptr->is_tablet.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_tablet.set) Error(BOOL_MSG, "MatchIsTablet"); break; case MATCH_IS_TABLET_PAD: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTabletPad"); ptr->is_tablet_pad.set = xf86getBoolValue(&ptr->is_tablet_pad.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_tablet_pad.set) Error(BOOL_MSG, "MatchIsTabletPad"); break; case MATCH_IS_TOUCHPAD: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTouchpad"); ptr->is_touchpad.set = xf86getBoolValue(&ptr->is_touchpad.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_touchpad.set) Error(BOOL_MSG, "MatchIsTouchpad"); break; case MATCH_IS_TOUCHSCREEN: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTouchscreen"); ptr->is_touchscreen.set = xf86getBoolValue(&ptr->is_touchscreen.val, xf86_lex_val.str); free(xf86_lex_val.str); if (!ptr->is_touchscreen.set) Error(BOOL_MSG, "MatchIsTouchscreen"); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("InputClass section parsed\n"); #endif return ptr; } void xf86printInputClassSection(FILE * cf, XF86ConfInputClassPtr ptr) { const xf86MatchGroup *group; char *const *cur; while (ptr) { fprintf(cf, "Section \"InputClass\"\n"); if (ptr->comment) fprintf(cf, "%s", ptr->comment); if (ptr->identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->identifier); if (ptr->driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->driver); xorg_list_for_each_entry(group, &ptr->match_product, entry) { fprintf(cf, "\tMatchProduct \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_vendor, entry) { fprintf(cf, "\tMatchVendor \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_device, entry) { fprintf(cf, "\tMatchDevicePath \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_os, entry) { fprintf(cf, "\tMatchOS \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_pnpid, entry) { fprintf(cf, "\tMatchPnPID \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_usbid, entry) { fprintf(cf, "\tMatchUSBID \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_driver, entry) { fprintf(cf, "\tMatchDriver \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_tag, entry) { fprintf(cf, "\tMatchTag \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } xorg_list_for_each_entry(group, &ptr->match_layout, entry) { fprintf(cf, "\tMatchLayout \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } if (ptr->is_keyboard.set) fprintf(cf, "\tIsKeyboard \"%s\"\n", ptr->is_keyboard.val ? "yes" : "no"); if (ptr->is_pointer.set) fprintf(cf, "\tIsPointer \"%s\"\n", ptr->is_pointer.val ? "yes" : "no"); if (ptr->is_joystick.set) fprintf(cf, "\tIsJoystick \"%s\"\n", ptr->is_joystick.val ? "yes" : "no"); if (ptr->is_tablet.set) fprintf(cf, "\tIsTablet \"%s\"\n", ptr->is_tablet.val ? "yes" : "no"); if (ptr->is_tablet_pad.set) fprintf(cf, "\tIsTabletPad \"%s\"\n", ptr->is_tablet_pad.val ? "yes" : "no"); if (ptr->is_touchpad.set) fprintf(cf, "\tIsTouchpad \"%s\"\n", ptr->is_touchpad.val ? "yes" : "no"); if (ptr->is_touchscreen.set) fprintf(cf, "\tIsTouchscreen \"%s\"\n", ptr->is_touchscreen.val ? "yes" : "no"); xf86printOptionList(cf, ptr->option_lst, 1); fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } xorg-server-21.1.16/hw/xfree86/parser/OutputClass.c0000644000175000017500000001306714757411105015475 /* * Copyright (c) 2014 NVIDIA Corporation. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * 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 AUTHORS OR COPYRIGHT * HOLDERS 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. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec OutputClassTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {DRIVER, "driver"}, {MODULEPATH, "modulepath"}, {OPTION, "option"}, {MATCH_DRIVER, "matchdriver"}, {-1, ""}, }; static void xf86freeOutputClassList(XF86ConfOutputClassPtr ptr) { XF86ConfOutputClassPtr prev; while (ptr) { xf86MatchGroup *group, *next; char **list; TestFree(ptr->identifier); TestFree(ptr->comment); TestFree(ptr->driver); TestFree(ptr->modulepath); xorg_list_for_each_entry_safe(group, next, &ptr->match_driver, entry) { xorg_list_del(&group->entry); for (list = group->values; *list; list++) free(*list); free(group); } xf86optionListFree(ptr->option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } #define CLEANUP xf86freeOutputClassList #define TOKEN_SEP "|" static void add_group_entry(struct xorg_list *head, char **values) { xf86MatchGroup *group; group = malloc(sizeof(*group)); if (group) { group->values = values; xorg_list_add(&group->entry, head); } } XF86ConfOutputClassPtr xf86parseOutputClassSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfOutputClassPtr, XF86ConfOutputClassRec) /* Initialize MatchGroup lists */ xorg_list_init(&ptr->match_driver); while ((token = xf86getToken(OutputClassTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->comment = xf86addComment(ptr->comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->identifier = xf86_lex_val.str; has_ident = TRUE; break; case DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Driver"); else ptr->driver = xf86_lex_val.str; break; case MODULEPATH: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "ModulePath"); if (ptr->modulepath) { char *path; XNFasprintf(&path, "%s,%s", ptr->modulepath, xf86_lex_val.str); free(xf86_lex_val.str); free(ptr->modulepath); ptr->modulepath = path; } else { ptr->modulepath = xf86_lex_val.str; } break; case OPTION: ptr->option_lst = xf86parseOption(ptr->option_lst); break; case MATCH_DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDriver"); add_group_entry(&ptr->match_driver, xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); free(xf86_lex_val.str); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("OutputClass section parsed\n"); #endif return ptr; } void xf86printOutputClassSection(FILE * cf, XF86ConfOutputClassPtr ptr) { const xf86MatchGroup *group; char *const *cur; while (ptr) { fprintf(cf, "Section \"OutputClass\"\n"); if (ptr->comment) fprintf(cf, "%s", ptr->comment); if (ptr->identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->identifier); if (ptr->driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->driver); xorg_list_for_each_entry(group, &ptr->match_driver, entry) { fprintf(cf, "\tMatchDriver \""); for (cur = group->values; *cur; cur++) fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, *cur); fprintf(cf, "\"\n"); } fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } xorg-server-21.1.16/hw/xfree86/parser/Layout.c0000644000175000017500000004351614757411105014466 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" #include #include "optionstr.h" /* Needed for auto server layout */ extern int xf86CheckBoolOption(void *optlist, const char *name, int deflt); static const xf86ConfigSymTabRec LayoutTab[] = { {ENDSECTION, "endsection"}, {SCREEN, "screen"}, {IDENTIFIER, "identifier"}, {MATCHSEAT, "matchseat"}, {INACTIVE, "inactive"}, {INPUTDEVICE, "inputdevice"}, {OPTION, "option"}, {-1, ""}, }; static const xf86ConfigSymTabRec AdjTab[] = { {RIGHTOF, "rightof"}, {LEFTOF, "leftof"}, {ABOVE, "above"}, {BELOW, "below"}, {RELATIVE, "relative"}, {ABSOLUTE, "absolute"}, {-1, ""}, }; #define CLEANUP xf86freeLayoutList XF86ConfLayoutPtr xf86parseLayoutSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfLayoutPtr, XF86ConfLayoutRec) while ((token = xf86getToken(LayoutTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->lay_comment = xf86addComment(ptr->lay_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->lay_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->lay_identifier = xf86_lex_val.str; has_ident = TRUE; break; case MATCHSEAT: if (xf86getSubToken(&(ptr->lay_comment)) != STRING) Error(QUOTE_MSG, "MatchSeat"); ptr->match_seat = xf86_lex_val.str; break; case INACTIVE: { XF86ConfInactivePtr iptr; iptr = calloc(1, sizeof(XF86ConfInactiveRec)); iptr->list.next = NULL; if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(iptr); Error(INACTIVE_MSG); } iptr->inactive_device_str = xf86_lex_val.str; ptr->lay_inactive_lst = (XF86ConfInactivePtr) xf86addListItem((glp) ptr->lay_inactive_lst, (glp) iptr); } break; case SCREEN: { XF86ConfAdjacencyPtr aptr; int absKeyword = 0; aptr = calloc(1, sizeof(XF86ConfAdjacencyRec)); aptr->list.next = NULL; aptr->adj_scrnum = -1; aptr->adj_where = CONF_ADJ_OBSOLETE; aptr->adj_x = 0; aptr->adj_y = 0; aptr->adj_refscreen = NULL; if ((token = xf86getSubToken(&(ptr->lay_comment))) == NUMBER) aptr->adj_scrnum = xf86_lex_val.num; else xf86unGetToken(token); token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { free(aptr); Error(SCREEN_MSG); } aptr->adj_screen_str = xf86_lex_val.str; token = xf86getSubTokenWithTab(&(ptr->lay_comment), AdjTab); switch (token) { case RIGHTOF: aptr->adj_where = CONF_ADJ_RIGHTOF; break; case LEFTOF: aptr->adj_where = CONF_ADJ_LEFTOF; break; case ABOVE: aptr->adj_where = CONF_ADJ_ABOVE; break; case BELOW: aptr->adj_where = CONF_ADJ_BELOW; break; case RELATIVE: aptr->adj_where = CONF_ADJ_RELATIVE; break; case ABSOLUTE: aptr->adj_where = CONF_ADJ_ABSOLUTE; absKeyword = 1; break; case EOF_TOKEN: free(aptr); Error(UNEXPECTED_EOF_MSG); break; default: xf86unGetToken(token); token = xf86getSubToken(&(ptr->lay_comment)); if (token == STRING) aptr->adj_where = CONF_ADJ_OBSOLETE; else aptr->adj_where = CONF_ADJ_ABSOLUTE; } switch (aptr->adj_where) { case CONF_ADJ_ABSOLUTE: if (absKeyword) token = xf86getSubToken(&(ptr->lay_comment)); if (token == NUMBER) { aptr->adj_x = xf86_lex_val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { free(aptr); Error(INVALID_SCR_MSG); } aptr->adj_y = xf86_lex_val.num; } else { if (absKeyword) { free(aptr); Error(INVALID_SCR_MSG); } else xf86unGetToken(token); } break; case CONF_ADJ_RIGHTOF: case CONF_ADJ_LEFTOF: case CONF_ADJ_ABOVE: case CONF_ADJ_BELOW: case CONF_ADJ_RELATIVE: token = xf86getSubToken(&(ptr->lay_comment)); if (token != STRING) { free(aptr); Error(INVALID_SCR_MSG); } aptr->adj_refscreen = xf86_lex_val.str; if (aptr->adj_where == CONF_ADJ_RELATIVE) { token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { free(aptr); Error(INVALID_SCR_MSG); } aptr->adj_x = xf86_lex_val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { free(aptr); Error(INVALID_SCR_MSG); } aptr->adj_y = xf86_lex_val.num; } break; case CONF_ADJ_OBSOLETE: /* top */ aptr->adj_top_str = xf86_lex_val.str; /* bottom */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } aptr->adj_bottom_str = xf86_lex_val.str; /* left */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } aptr->adj_left_str = xf86_lex_val.str; /* right */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } aptr->adj_right_str = xf86_lex_val.str; } ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr) xf86addListItem((glp) ptr->lay_adjacency_lst, (glp) aptr); } break; case INPUTDEVICE: { XF86ConfInputrefPtr iptr; iptr = calloc(1, sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(iptr); Error(INPUTDEV_MSG); } iptr->iref_inputdev_str = xf86_lex_val.str; while ((token = xf86getSubToken(&(ptr->lay_comment))) == STRING) { iptr->iref_option_lst = xf86addNewOption(iptr->iref_option_lst, xf86_lex_val.str, NULL); } xf86unGetToken(token); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) ptr->lay_input_lst, (glp) iptr); } break; case OPTION: ptr->lay_option_lst = xf86parseOption(ptr->lay_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Layout section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printLayoutSection(FILE * cf, XF86ConfLayoutPtr ptr) { XF86ConfAdjacencyPtr aptr; XF86ConfInactivePtr iptr; XF86ConfInputrefPtr inptr; XF86OptionPtr optr; while (ptr) { fprintf(cf, "Section \"ServerLayout\"\n"); if (ptr->lay_comment) fprintf(cf, "%s", ptr->lay_comment); if (ptr->lay_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->lay_identifier); for (aptr = ptr->lay_adjacency_lst; aptr; aptr = aptr->list.next) { fprintf(cf, "\tScreen "); if (aptr->adj_scrnum >= 0) fprintf(cf, "%2d", aptr->adj_scrnum); else fprintf(cf, " "); fprintf(cf, " \"%s\"", aptr->adj_screen_str); switch (aptr->adj_where) { case CONF_ADJ_OBSOLETE: fprintf(cf, " \"%s\"", aptr->adj_top_str); fprintf(cf, " \"%s\"", aptr->adj_bottom_str); fprintf(cf, " \"%s\"", aptr->adj_right_str); fprintf(cf, " \"%s\"\n", aptr->adj_left_str); break; case CONF_ADJ_ABSOLUTE: if (aptr->adj_x != -1) fprintf(cf, " %d %d\n", aptr->adj_x, aptr->adj_y); else fprintf(cf, "\n"); break; case CONF_ADJ_RIGHTOF: fprintf(cf, " RightOf \"%s\"\n", aptr->adj_refscreen); break; case CONF_ADJ_LEFTOF: fprintf(cf, " LeftOf \"%s\"\n", aptr->adj_refscreen); break; case CONF_ADJ_ABOVE: fprintf(cf, " Above \"%s\"\n", aptr->adj_refscreen); break; case CONF_ADJ_BELOW: fprintf(cf, " Below \"%s\"\n", aptr->adj_refscreen); break; case CONF_ADJ_RELATIVE: fprintf(cf, " Relative \"%s\" %d %d\n", aptr->adj_refscreen, aptr->adj_x, aptr->adj_y); break; } } for (iptr = ptr->lay_inactive_lst; iptr; iptr = iptr->list.next) fprintf(cf, "\tInactive \"%s\"\n", iptr->inactive_device_str); for (inptr = ptr->lay_input_lst; inptr; inptr = inptr->list.next) { fprintf(cf, "\tInputDevice \"%s\"", inptr->iref_inputdev_str); for (optr = inptr->iref_option_lst; optr; optr = optr->list.next) { fprintf(cf, " \"%s\"", optr->opt_name); } fprintf(cf, "\n"); } xf86printOptionList(cf, ptr->lay_option_lst, 1); fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } static void xf86freeAdjacencyList(XF86ConfAdjacencyPtr ptr) { XF86ConfAdjacencyPtr prev; while (ptr) { TestFree(ptr->adj_screen_str); TestFree(ptr->adj_top_str); TestFree(ptr->adj_bottom_str); TestFree(ptr->adj_left_str); TestFree(ptr->adj_right_str); prev = ptr; ptr = ptr->list.next; free(prev); } } static void xf86freeInputrefList(XF86ConfInputrefPtr ptr) { XF86ConfInputrefPtr prev; while (ptr) { TestFree(ptr->iref_inputdev_str); xf86optionListFree(ptr->iref_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } void xf86freeLayoutList(XF86ConfLayoutPtr ptr) { XF86ConfLayoutPtr prev; while (ptr) { TestFree(ptr->lay_identifier); TestFree(ptr->lay_comment); xf86freeAdjacencyList(ptr->lay_adjacency_lst); xf86freeInputrefList(ptr->lay_input_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } int xf86layoutAddInputDevices(XF86ConfigPtr config, XF86ConfLayoutPtr layout) { int count = 0; XF86ConfInputPtr input = config->conf_input_lst; XF86ConfInputrefPtr inptr; /* add all AutoServerLayout devices to the server layout */ while (input) { if (xf86CheckBoolOption (input->inp_option_lst, "AutoServerLayout", FALSE)) { XF86ConfInputrefPtr iref = layout->lay_input_lst; /* avoid duplicates if referenced but lists AutoServerLayout too */ while (iref) { if (strcmp(iref->iref_inputdev_str, input->inp_identifier) == 0) break; iref = iref->list.next; } if (!iref) { XF86ConfInputrefPtr iptr; iptr = calloc(1, sizeof(XF86ConfInputrefRec)); iptr->iref_inputdev_str = input->inp_identifier; layout->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) layout->lay_input_lst, (glp) iptr); count++; } } input = input->list.next; } inptr = layout->lay_input_lst; while (inptr) { input = xf86findInput(inptr->iref_inputdev_str, config->conf_input_lst); if (!input) { xf86validationError(UNDEFINED_INPUT_MSG, inptr->iref_inputdev_str, layout->lay_identifier); return -1; } else inptr->iref_inputdev = input; inptr = inptr->list.next; } return count; } int xf86validateLayout(XF86ConfigPtr p) { XF86ConfLayoutPtr layout = p->conf_layout_lst; XF86ConfAdjacencyPtr adj; XF86ConfInactivePtr iptr; XF86ConfScreenPtr screen; XF86ConfDevicePtr device; while (layout) { adj = layout->lay_adjacency_lst; while (adj) { /* the first one can't be "" but all others can */ screen = xf86findScreen(adj->adj_screen_str, p->conf_screen_lst); if (!screen) { xf86validationError(UNDEFINED_SCREEN_MSG, adj->adj_screen_str, layout->lay_identifier); return FALSE; } else adj->adj_screen = screen; adj = adj->list.next; } iptr = layout->lay_inactive_lst; while (iptr) { device = xf86findDevice(iptr->inactive_device_str, p->conf_device_lst); if (!device) { xf86validationError(UNDEFINED_DEVICE_LAY_MSG, iptr->inactive_device_str, layout->lay_identifier); return FALSE; } else iptr->inactive_device = device; iptr = iptr->list.next; } if (xf86layoutAddInputDevices(p, layout) == -1) return FALSE; layout = layout->list.next; } return TRUE; } XF86ConfLayoutPtr xf86findLayout(const char *name, XF86ConfLayoutPtr list) { while (list) { if (xf86nameCompare(list->lay_identifier, name) == 0) return list; list = list->list.next; } return NULL; } xorg-server-21.1.16/hw/xfree86/parser/Module.c0000644000175000017500000002121614757411105014427 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec SubModuleTab[] = { {ENDSUBSECTION, "endsubsection"}, {OPTION, "option"}, {-1, ""}, }; static const xf86ConfigSymTabRec ModuleTab[] = { {ENDSECTION, "endsection"}, {LOAD, "load"}, {DISABLE, "disable"}, {LOAD_DRIVER, "loaddriver"}, {SUBSECTION, "subsection"}, {-1, ""}, }; #define CLEANUP xf86freeModules static XF86LoadPtr xf86parseModuleSubSection(XF86LoadPtr head, char *name) { int token; parsePrologue(XF86LoadPtr, XF86LoadRec) ptr->load_name = name; ptr->load_type = XF86_LOAD_MODULE; ptr->ignore = 0; ptr->load_opt = NULL; ptr->list.next = NULL; while ((token = xf86getToken(SubModuleTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: ptr->load_comment = xf86addComment(ptr->load_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case OPTION: ptr->load_opt = xf86parseOption(ptr->load_opt); break; case EOF_TOKEN: xf86parseError(UNEXPECTED_EOF_MSG); free(ptr); return NULL; default: xf86parseError(INVALID_KEYWORD_MSG, xf86tokenString()); free(ptr); return NULL; break; } } return ((XF86LoadPtr) xf86addListItem((glp) head, (glp) ptr)); } XF86ConfModulePtr xf86parseModuleSection(void) { int token; parsePrologue(XF86ConfModulePtr, XF86ConfModuleRec) while ((token = xf86getToken(ModuleTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->mod_comment = xf86addComment(ptr->mod_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case LOAD: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) Error(QUOTE_MSG, "Load"); ptr->mod_load_lst = xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str, XF86_LOAD_MODULE, NULL); break; case DISABLE: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) Error(QUOTE_MSG, "Disable"); ptr->mod_disable_lst = xf86addNewLoadDirective(ptr->mod_disable_lst, xf86_lex_val.str, XF86_DISABLE_MODULE, NULL); break; case LOAD_DRIVER: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) Error(QUOTE_MSG, "LoadDriver"); ptr->mod_load_lst = xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str, XF86_LOAD_DRIVER, NULL); break; case SUBSECTION: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) Error(QUOTE_MSG, "SubSection"); ptr->mod_load_lst = xf86parseModuleSubSection(ptr->mod_load_lst, xf86_lex_val.str); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("Module section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr) { XF86LoadPtr lptr; if (ptr == NULL) return; if (ptr->mod_comment) fprintf(cf, "%s", ptr->mod_comment); for (lptr = ptr->mod_load_lst; lptr; lptr = lptr->list.next) { switch (lptr->load_type) { case XF86_LOAD_MODULE: if (lptr->load_opt == NULL) { fprintf(cf, "\tLoad \"%s\"", lptr->load_name); if (lptr->load_comment) fprintf(cf, "%s", lptr->load_comment); else fputc('\n', cf); } else { fprintf(cf, "\tSubSection \"%s\"\n", lptr->load_name); if (lptr->load_comment) fprintf(cf, "%s", lptr->load_comment); xf86printOptionList(cf, lptr->load_opt, 2); fprintf(cf, "\tEndSubSection\n"); } break; case XF86_LOAD_DRIVER: fprintf(cf, "\tLoadDriver \"%s\"", lptr->load_name); if (lptr->load_comment) fprintf(cf, "%s", lptr->load_comment); else fputc('\n', cf); break; #if 0 default: fprintf(cf, "#\tUnknown type \"%s\"\n", lptr->load_name); break; #endif } } } XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type, XF86OptionPtr opts) { XF86LoadPtr new; int token; new = calloc(1, sizeof(XF86LoadRec)); new->load_name = name; new->load_type = type; new->load_opt = opts; new->ignore = 0; new->list.next = NULL; if ((token = xf86getToken(NULL)) == COMMENT) { new->load_comment = xf86addComment(new->load_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; } else { xf86unGetToken(token); } return ((XF86LoadPtr) xf86addListItem((glp) head, (glp) new)); } void xf86freeModules(XF86ConfModulePtr ptr) { XF86LoadPtr lptr; XF86LoadPtr prev; if (ptr == NULL) return; lptr = ptr->mod_load_lst; while (lptr) { TestFree(lptr->load_name); TestFree(lptr->load_comment); prev = lptr; lptr = lptr->list.next; free(prev); } lptr = ptr->mod_disable_lst; while (lptr) { TestFree(lptr->load_name); TestFree(lptr->load_comment); prev = lptr; lptr = lptr->list.next; free(prev); } TestFree(ptr->mod_comment); free(ptr); } xorg-server-21.1.16/hw/xfree86/parser/Video.c0000644000175000017500000002220214757411105014244 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec VideoPortTab[] = { {ENDSUBSECTION, "endsubsection"}, {IDENTIFIER, "identifier"}, {OPTION, "option"}, {-1, ""}, }; #define CLEANUP xf86freeVideoPortList static void xf86freeVideoPortList(XF86ConfVideoPortPtr ptr) { XF86ConfVideoPortPtr prev; while (ptr) { TestFree(ptr->vp_identifier); TestFree(ptr->vp_comment); xf86optionListFree(ptr->vp_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } static XF86ConfVideoPortPtr xf86parseVideoPortSubSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfVideoPortPtr, XF86ConfVideoPortRec) while ((token = xf86getToken(VideoPortTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: ptr->vp_comment = xf86addComment(ptr->vp_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vp_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->vp_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: ptr->vp_option_lst = xf86parseOption(ptr->vp_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("VideoPort subsection parsed\n"); #endif return ptr; } #undef CLEANUP static const xf86ConfigSymTabRec VideoAdaptorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {VENDOR, "vendorname"}, {BOARD, "boardname"}, {BUSID, "busid"}, {DRIVER, "driver"}, {OPTION, "option"}, {SUBSECTION, "subsection"}, {-1, ""}, }; #define CLEANUP xf86freeVideoAdaptorList XF86ConfVideoAdaptorPtr xf86parseVideoAdaptorSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfVideoAdaptorPtr, XF86ConfVideoAdaptorRec) while ((token = xf86getToken(VideoAdaptorTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->va_comment = xf86addComment(ptr->va_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); ptr->va_identifier = xf86_lex_val.str; if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); has_ident = TRUE; break; case VENDOR: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Vendor"); ptr->va_vendor = xf86_lex_val.str; break; case BOARD: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Board"); ptr->va_board = xf86_lex_val.str; break; case BUSID: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "BusID"); ptr->va_busid = xf86_lex_val.str; break; case DRIVER: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Driver"); ptr->va_driver = xf86_lex_val.str; break; case OPTION: ptr->va_option_lst = xf86parseOption(ptr->va_option_lst); break; case SUBSECTION: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "SubSection"); { HANDLE_LIST(va_port_lst, xf86parseVideoPortSubSection, XF86ConfVideoPortPtr); } break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("VideoAdaptor section parsed\n"); #endif return ptr; } void xf86printVideoAdaptorSection(FILE * cf, XF86ConfVideoAdaptorPtr ptr) { XF86ConfVideoPortPtr pptr; while (ptr) { fprintf(cf, "Section \"VideoAdaptor\"\n"); if (ptr->va_comment) fprintf(cf, "%s", ptr->va_comment); if (ptr->va_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->va_identifier); if (ptr->va_vendor) fprintf(cf, "\tVendorName \"%s\"\n", ptr->va_vendor); if (ptr->va_board) fprintf(cf, "\tBoardName \"%s\"\n", ptr->va_board); if (ptr->va_busid) fprintf(cf, "\tBusID \"%s\"\n", ptr->va_busid); if (ptr->va_driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->va_driver); xf86printOptionList(cf, ptr->va_option_lst, 1); for (pptr = ptr->va_port_lst; pptr; pptr = pptr->list.next) { fprintf(cf, "\tSubSection \"VideoPort\"\n"); if (pptr->vp_comment) fprintf(cf, "%s", pptr->vp_comment); if (pptr->vp_identifier) fprintf(cf, "\t\tIdentifier \"%s\"\n", pptr->vp_identifier); xf86printOptionList(cf, pptr->vp_option_lst, 2); fprintf(cf, "\tEndSubSection\n"); } fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86freeVideoAdaptorList(XF86ConfVideoAdaptorPtr ptr) { XF86ConfVideoAdaptorPtr prev; while (ptr) { TestFree(ptr->va_identifier); TestFree(ptr->va_vendor); TestFree(ptr->va_board); TestFree(ptr->va_busid); TestFree(ptr->va_driver); TestFree(ptr->va_fwdref); TestFree(ptr->va_comment); xf86freeVideoPortList(ptr->va_port_lst); xf86optionListFree(ptr->va_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } XF86ConfVideoAdaptorPtr xf86findVideoAdaptor(const char *ident, XF86ConfVideoAdaptorPtr p) { while (p) { if (xf86nameCompare(ident, p->va_identifier) == 0) return p; p = p->list.next; } return NULL; } xorg-server-21.1.16/hw/xfree86/parser/Monitor.c0000644000175000017500000007246314757411105014643 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec MonitorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {VENDOR, "vendorname"}, {MODEL, "modelname"}, {USEMODES, "usemodes"}, {MODELINE, "modeline"}, {DISPLAYSIZE, "displaysize"}, {HORIZSYNC, "horizsync"}, {VERTREFRESH, "vertrefresh"}, {MODE, "mode"}, {GAMMA, "gamma"}, {OPTION, "option"}, {-1, ""}, }; static const xf86ConfigSymTabRec ModesTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {MODELINE, "modeline"}, {MODE, "mode"}, {-1, ""}, }; static const xf86ConfigSymTabRec TimingTab[] = { {TT_INTERLACE, "interlace"}, {TT_PHSYNC, "+hsync"}, {TT_NHSYNC, "-hsync"}, {TT_PVSYNC, "+vsync"}, {TT_NVSYNC, "-vsync"}, {TT_CSYNC, "composite"}, {TT_PCSYNC, "+csync"}, {TT_NCSYNC, "-csync"}, {TT_DBLSCAN, "doublescan"}, {TT_HSKEW, "hskew"}, {TT_BCAST, "bcast"}, {TT_VSCAN, "vscan"}, {-1, ""}, }; static const xf86ConfigSymTabRec ModeTab[] = { {DOTCLOCK, "dotclock"}, {HTIMINGS, "htimings"}, {VTIMINGS, "vtimings"}, {FLAGS, "flags"}, {HSKEW, "hskew"}, {BCAST, "bcast"}, {VSCAN, "vscan"}, {ENDMODE, "endmode"}, {-1, ""}, }; #define CLEANUP xf86freeModeLineList static void xf86freeModeLineList(XF86ConfModeLinePtr ptr) { XF86ConfModeLinePtr prev; while (ptr) { TestFree(ptr->ml_identifier); TestFree(ptr->ml_comment); prev = ptr; ptr = ptr->list.next; free(prev); } } static XF86ConfModeLinePtr xf86parseModeLine(void) { int token; parsePrologue(XF86ConfModeLinePtr, XF86ConfModeLineRec) /* Identifier */ if (xf86getSubToken(&(ptr->ml_comment)) != STRING) Error("ModeLine identifier expected"); ptr->ml_identifier = xf86_lex_val.str; /* DotClock */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine dotclock expected"); ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); /* HDisplay */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine Hdisplay expected"); ptr->ml_hdisplay = xf86_lex_val.num; /* HSyncStart */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HSyncStart expected"); ptr->ml_hsyncstart = xf86_lex_val.num; /* HSyncEnd */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HSyncEnd expected"); ptr->ml_hsyncend = xf86_lex_val.num; /* HTotal */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HTotal expected"); ptr->ml_htotal = xf86_lex_val.num; /* VDisplay */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine Vdisplay expected"); ptr->ml_vdisplay = xf86_lex_val.num; /* VSyncStart */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VSyncStart expected"); ptr->ml_vsyncstart = xf86_lex_val.num; /* VSyncEnd */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VSyncEnd expected"); ptr->ml_vsyncend = xf86_lex_val.num; /* VTotal */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VTotal expected"); ptr->ml_vtotal = xf86_lex_val.num; token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab); while ((token == TT_INTERLACE) || (token == TT_PHSYNC) || (token == TT_NHSYNC) || (token == TT_PVSYNC) || (token == TT_NVSYNC) || (token == TT_CSYNC) || (token == TT_PCSYNC) || (token == TT_NCSYNC) || (token == TT_DBLSCAN) || (token == TT_HSKEW) || (token == TT_VSCAN) || (token == TT_BCAST)) { switch (token) { case TT_INTERLACE: ptr->ml_flags |= XF86CONF_INTERLACE; break; case TT_PHSYNC: ptr->ml_flags |= XF86CONF_PHSYNC; break; case TT_NHSYNC: ptr->ml_flags |= XF86CONF_NHSYNC; break; case TT_PVSYNC: ptr->ml_flags |= XF86CONF_PVSYNC; break; case TT_NVSYNC: ptr->ml_flags |= XF86CONF_NVSYNC; break; case TT_CSYNC: ptr->ml_flags |= XF86CONF_CSYNC; break; case TT_PCSYNC: ptr->ml_flags |= XF86CONF_PCSYNC; break; case TT_NCSYNC: ptr->ml_flags |= XF86CONF_NCSYNC; break; case TT_DBLSCAN: ptr->ml_flags |= XF86CONF_DBLSCAN; break; case TT_HSKEW: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error(NUMBER_MSG, "Hskew"); ptr->ml_hskew = xf86_lex_val.num; ptr->ml_flags |= XF86CONF_HSKEW; break; case TT_BCAST: ptr->ml_flags |= XF86CONF_BCAST; break; case TT_VSCAN: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error(NUMBER_MSG, "Vscan"); ptr->ml_vscan = xf86_lex_val.num; ptr->ml_flags |= XF86CONF_VSCAN; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab); } xf86unGetToken(token); #ifdef DEBUG printf("ModeLine parsed\n"); #endif return ptr; } static XF86ConfModeLinePtr xf86parseVerboseMode(void) { int token, token2; int had_dotclock = 0, had_htimings = 0, had_vtimings = 0; parsePrologue(XF86ConfModeLinePtr, XF86ConfModeLineRec) if (xf86getSubToken(&(ptr->ml_comment)) != STRING) Error("Mode name expected"); ptr->ml_identifier = xf86_lex_val.str; while ((token = xf86getToken(ModeTab)) != ENDMODE) { switch (token) { case COMMENT: ptr->ml_comment = xf86addComment(ptr->ml_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case DOTCLOCK: if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER) Error(NUMBER_MSG, "DotClock"); ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); had_dotclock = 1; break; case HTIMINGS: if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_hdisplay = xf86_lex_val.num; else Error("Horizontal display expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_hsyncstart = xf86_lex_val.num; else Error("Horizontal sync start expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_hsyncend = xf86_lex_val.num; else Error("Horizontal sync end expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_htotal = xf86_lex_val.num; else Error("Horizontal total expected"); had_htimings = 1; break; case VTIMINGS: if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_vdisplay = xf86_lex_val.num; else Error("Vertical display expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_vsyncstart = xf86_lex_val.num; else Error("Vertical sync start expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_vsyncend = xf86_lex_val.num; else Error("Vertical sync end expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) ptr->ml_vtotal = xf86_lex_val.num; else Error("Vertical total expected"); had_vtimings = 1; break; case FLAGS: token = xf86getSubToken(&(ptr->ml_comment)); if (token != STRING) Error(QUOTE_MSG, "Flags"); while (token == STRING) { token2 = xf86getStringToken(TimingTab); switch (token2) { case TT_INTERLACE: ptr->ml_flags |= XF86CONF_INTERLACE; break; case TT_PHSYNC: ptr->ml_flags |= XF86CONF_PHSYNC; break; case TT_NHSYNC: ptr->ml_flags |= XF86CONF_NHSYNC; break; case TT_PVSYNC: ptr->ml_flags |= XF86CONF_PVSYNC; break; case TT_NVSYNC: ptr->ml_flags |= XF86CONF_NVSYNC; break; case TT_CSYNC: ptr->ml_flags |= XF86CONF_CSYNC; break; case TT_PCSYNC: ptr->ml_flags |= XF86CONF_PCSYNC; break; case TT_NCSYNC: ptr->ml_flags |= XF86CONF_NCSYNC; break; case TT_DBLSCAN: ptr->ml_flags |= XF86CONF_DBLSCAN; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error("Unknown flag string"); break; } token = xf86getSubToken(&(ptr->ml_comment)); } xf86unGetToken(token); break; case HSKEW: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("Horizontal skew expected"); ptr->ml_flags |= XF86CONF_HSKEW; ptr->ml_hskew = xf86_lex_val.num; break; case VSCAN: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("Vertical scan count expected"); ptr->ml_flags |= XF86CONF_VSCAN; ptr->ml_vscan = xf86_lex_val.num; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error("Unexpected token in verbose \"Mode\" entry\n"); } } if (!had_dotclock) Error("the dotclock is missing"); if (!had_htimings) Error("the horizontal timings are missing"); if (!had_vtimings) Error("the vertical timings are missing"); #ifdef DEBUG printf("Verbose Mode parsed\n"); #endif return ptr; } #undef CLEANUP #define CLEANUP xf86freeMonitorList XF86ConfMonitorPtr xf86parseMonitorSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec) while ((token = xf86getToken(MonitorTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->mon_comment = xf86addComment(ptr->mon_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->mon_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->mon_identifier = xf86_lex_val.str; has_ident = TRUE; break; case VENDOR: if (xf86getSubToken(&(ptr->mon_comment)) != STRING) Error(QUOTE_MSG, "Vendor"); ptr->mon_vendor = xf86_lex_val.str; break; case MODEL: if (xf86getSubToken(&(ptr->mon_comment)) != STRING) Error(QUOTE_MSG, "ModelName"); ptr->mon_modelname = xf86_lex_val.str; break; case MODE: HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode, XF86ConfModeLinePtr); break; case MODELINE: HANDLE_LIST(mon_modeline_lst, xf86parseModeLine, XF86ConfModeLinePtr); break; case DISPLAYSIZE: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(DISPLAYSIZE_MSG); ptr->mon_width = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(DISPLAYSIZE_MSG); ptr->mon_height = xf86_lex_val.realnum; break; case HORIZSYNC: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(HORIZSYNC_MSG); do { if (ptr->mon_n_hsync >= CONF_MAX_HSYNC) Error("Sorry. Too many horizontal sync intervals."); ptr->mon_hsync[ptr->mon_n_hsync].lo = xf86_lex_val.realnum; switch (token = xf86getSubToken(&(ptr->mon_comment))) { case COMMA: ptr->mon_hsync[ptr->mon_n_hsync].hi = ptr->mon_hsync[ptr->mon_n_hsync].lo; break; case DASH: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || (float) xf86_lex_val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo) Error(HORIZSYNC_MSG); ptr->mon_hsync[ptr->mon_n_hsync].hi = xf86_lex_val.realnum; if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) break; ptr->mon_n_hsync++; goto HorizDone; default: /* We cannot currently know if a '\n' was found, * or this is a real error */ ptr->mon_hsync[ptr->mon_n_hsync].hi = ptr->mon_hsync[ptr->mon_n_hsync].lo; ptr->mon_n_hsync++; goto HorizDone; } ptr->mon_n_hsync++; } while ((token = xf86getSubToken(&(ptr->mon_comment))) == NUMBER); HorizDone: xf86unGetToken(token); break; case VERTREFRESH: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(VERTREFRESH_MSG); do { ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = xf86_lex_val.realnum; switch (token = xf86getSubToken(&(ptr->mon_comment))) { case COMMA: ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo; break; case DASH: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || (float) xf86_lex_val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo) Error(VERTREFRESH_MSG); ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = xf86_lex_val.realnum; if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) break; ptr->mon_n_vrefresh++; goto VertDone; default: /* We cannot currently know if a '\n' was found, * or this is a real error */ ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo; ptr->mon_n_vrefresh++; goto VertDone; } if (ptr->mon_n_vrefresh >= CONF_MAX_VREFRESH) Error("Sorry. Too many vertical refresh intervals."); ptr->mon_n_vrefresh++; } while ((token = xf86getSubToken(&(ptr->mon_comment))) == NUMBER); VertDone: xf86unGetToken(token); break; case GAMMA: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) { Error(INVALID_GAMMA_MSG); } else { ptr->mon_gamma_red = ptr->mon_gamma_green = ptr->mon_gamma_blue = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { ptr->mon_gamma_green = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { ptr->mon_gamma_blue = xf86_lex_val.realnum; } else { Error(INVALID_GAMMA_MSG); } } else xf86unGetToken(token); } break; case OPTION: ptr->mon_option_lst = xf86parseOption(ptr->mon_option_lst); break; case USEMODES: { XF86ConfModesLinkPtr mptr; if ((token = xf86getSubToken(&(ptr->mon_comment))) != STRING) Error(QUOTE_MSG, "UseModes"); /* add to the end of the list of modes sections referenced here */ mptr = calloc(1, sizeof(XF86ConfModesLinkRec)); mptr->list.next = NULL; mptr->ml_modes_str = xf86_lex_val.str; mptr->ml_modes = NULL; ptr->mon_modes_sect_lst = (XF86ConfModesLinkPtr) xf86addListItem((GenericListPtr) ptr->mon_modes_sect_lst, (GenericListPtr) mptr); } break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: xf86parseError(INVALID_KEYWORD_MSG, xf86tokenString()); CLEANUP(ptr); return NULL; break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Monitor section parsed\n"); #endif return ptr; } #undef CLEANUP #define CLEANUP xf86freeModesList XF86ConfModesPtr xf86parseModesSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfModesPtr, XF86ConfModesRec) while ((token = xf86getToken(ModesTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->modes_comment = xf86addComment(ptr->modes_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->modes_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->modes_identifier = xf86_lex_val.str; has_ident = TRUE; break; case MODE: HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode, XF86ConfModeLinePtr); break; case MODELINE: HANDLE_LIST(mon_modeline_lst, xf86parseModeLine, XF86ConfModeLinePtr); break; default: xf86parseError(INVALID_KEYWORD_MSG, xf86tokenString()); CLEANUP(ptr); return NULL; break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Modes section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printMonitorSection(FILE * cf, XF86ConfMonitorPtr ptr) { int i; XF86ConfModeLinePtr mlptr; XF86ConfModesLinkPtr mptr; while (ptr) { mptr = ptr->mon_modes_sect_lst; fprintf(cf, "Section \"Monitor\"\n"); if (ptr->mon_comment) fprintf(cf, "%s", ptr->mon_comment); if (ptr->mon_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->mon_identifier); if (ptr->mon_vendor) fprintf(cf, "\tVendorName \"%s\"\n", ptr->mon_vendor); if (ptr->mon_modelname) fprintf(cf, "\tModelName \"%s\"\n", ptr->mon_modelname); while (mptr) { fprintf(cf, "\tUseModes \"%s\"\n", mptr->ml_modes_str); mptr = mptr->list.next; } if (ptr->mon_width) fprintf(cf, "\tDisplaySize %d\t%d\n", ptr->mon_width, ptr->mon_height); for (i = 0; i < ptr->mon_n_hsync; i++) { fprintf(cf, "\tHorizSync %2.1f - %2.1f\n", ptr->mon_hsync[i].lo, ptr->mon_hsync[i].hi); } for (i = 0; i < ptr->mon_n_vrefresh; i++) { fprintf(cf, "\tVertRefresh %2.1f - %2.1f\n", ptr->mon_vrefresh[i].lo, ptr->mon_vrefresh[i].hi); } if (ptr->mon_gamma_red) { if (ptr->mon_gamma_red == ptr->mon_gamma_green && ptr->mon_gamma_red == ptr->mon_gamma_blue) { fprintf(cf, "\tGamma %.4g\n", ptr->mon_gamma_red); } else { fprintf(cf, "\tGamma %.4g %.4g %.4g\n", ptr->mon_gamma_red, ptr->mon_gamma_green, ptr->mon_gamma_blue); } } for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next) { fprintf(cf, "\tModeLine \"%s\" %2.1f ", mlptr->ml_identifier, mlptr->ml_clock / 1000.0); fprintf(cf, "%d %d %d %d %d %d %d %d", mlptr->ml_hdisplay, mlptr->ml_hsyncstart, mlptr->ml_hsyncend, mlptr->ml_htotal, mlptr->ml_vdisplay, mlptr->ml_vsyncstart, mlptr->ml_vsyncend, mlptr->ml_vtotal); if (mlptr->ml_flags & XF86CONF_PHSYNC) fprintf(cf, " +hsync"); if (mlptr->ml_flags & XF86CONF_NHSYNC) fprintf(cf, " -hsync"); if (mlptr->ml_flags & XF86CONF_PVSYNC) fprintf(cf, " +vsync"); if (mlptr->ml_flags & XF86CONF_NVSYNC) fprintf(cf, " -vsync"); if (mlptr->ml_flags & XF86CONF_INTERLACE) fprintf(cf, " interlace"); if (mlptr->ml_flags & XF86CONF_CSYNC) fprintf(cf, " composite"); if (mlptr->ml_flags & XF86CONF_PCSYNC) fprintf(cf, " +csync"); if (mlptr->ml_flags & XF86CONF_NCSYNC) fprintf(cf, " -csync"); if (mlptr->ml_flags & XF86CONF_DBLSCAN) fprintf(cf, " doublescan"); if (mlptr->ml_flags & XF86CONF_HSKEW) fprintf(cf, " hskew %d", mlptr->ml_hskew); if (mlptr->ml_flags & XF86CONF_BCAST) fprintf(cf, " bcast"); fprintf(cf, "\n"); } xf86printOptionList(cf, ptr->mon_option_lst, 1); fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86printModesSection(FILE * cf, XF86ConfModesPtr ptr) { XF86ConfModeLinePtr mlptr; while (ptr) { fprintf(cf, "Section \"Modes\"\n"); if (ptr->modes_comment) fprintf(cf, "%s", ptr->modes_comment); if (ptr->modes_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->modes_identifier); for (mlptr = ptr->mon_modeline_lst; mlptr; mlptr = mlptr->list.next) { fprintf(cf, "\tModeLine \"%s\" %2.1f ", mlptr->ml_identifier, mlptr->ml_clock / 1000.0); fprintf(cf, "%d %d %d %d %d %d %d %d", mlptr->ml_hdisplay, mlptr->ml_hsyncstart, mlptr->ml_hsyncend, mlptr->ml_htotal, mlptr->ml_vdisplay, mlptr->ml_vsyncstart, mlptr->ml_vsyncend, mlptr->ml_vtotal); if (mlptr->ml_flags & XF86CONF_PHSYNC) fprintf(cf, " +hsync"); if (mlptr->ml_flags & XF86CONF_NHSYNC) fprintf(cf, " -hsync"); if (mlptr->ml_flags & XF86CONF_PVSYNC) fprintf(cf, " +vsync"); if (mlptr->ml_flags & XF86CONF_NVSYNC) fprintf(cf, " -vsync"); if (mlptr->ml_flags & XF86CONF_INTERLACE) fprintf(cf, " interlace"); if (mlptr->ml_flags & XF86CONF_CSYNC) fprintf(cf, " composite"); if (mlptr->ml_flags & XF86CONF_PCSYNC) fprintf(cf, " +csync"); if (mlptr->ml_flags & XF86CONF_NCSYNC) fprintf(cf, " -csync"); if (mlptr->ml_flags & XF86CONF_DBLSCAN) fprintf(cf, " doublescan"); if (mlptr->ml_flags & XF86CONF_HSKEW) fprintf(cf, " hskew %d", mlptr->ml_hskew); if (mlptr->ml_flags & XF86CONF_VSCAN) fprintf(cf, " vscan %d", mlptr->ml_vscan); if (mlptr->ml_flags & XF86CONF_BCAST) fprintf(cf, " bcast"); if (mlptr->ml_comment) fprintf(cf, "%s", mlptr->ml_comment); else fprintf(cf, "\n"); } fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86freeMonitorList(XF86ConfMonitorPtr ptr) { XF86ConfMonitorPtr prev; while (ptr) { TestFree(ptr->mon_identifier); TestFree(ptr->mon_vendor); TestFree(ptr->mon_modelname); TestFree(ptr->mon_comment); xf86optionListFree(ptr->mon_option_lst); xf86freeModeLineList(ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } void xf86freeModesList(XF86ConfModesPtr ptr) { XF86ConfModesPtr prev; while (ptr) { TestFree(ptr->modes_identifier); TestFree(ptr->modes_comment); xf86freeModeLineList(ptr->mon_modeline_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } XF86ConfMonitorPtr xf86findMonitor(const char *ident, XF86ConfMonitorPtr p) { while (p) { if (xf86nameCompare(ident, p->mon_identifier) == 0) return p; p = p->list.next; } return NULL; } XF86ConfModesPtr xf86findModes(const char *ident, XF86ConfModesPtr p) { while (p) { if (xf86nameCompare(ident, p->modes_identifier) == 0) return p; p = p->list.next; } return NULL; } XF86ConfModeLinePtr xf86findModeLine(const char *ident, XF86ConfModeLinePtr p) { while (p) { if (xf86nameCompare(ident, p->ml_identifier) == 0) return p; p = p->list.next; } return NULL; } int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen) { XF86ConfMonitorPtr monitor = screen->scrn_monitor; XF86ConfModesLinkPtr modeslnk = monitor->mon_modes_sect_lst; XF86ConfModesPtr modes; while (modeslnk) { modes = xf86findModes(modeslnk->ml_modes_str, p->conf_modes_lst); if (!modes) { xf86validationError(UNDEFINED_MODES_MSG, modeslnk->ml_modes_str, screen->scrn_identifier); return FALSE; } modeslnk->ml_modes = modes; modeslnk = modeslnk->list.next; } return TRUE; } xorg-server-21.1.16/hw/xfree86/parser/Pointer.c0000644000175000017500000002160214757411105014621 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" #include "Xprintf.h" static const xf86ConfigSymTabRec PointerTab[] = { {PROTOCOL, "protocol"}, {EMULATE3, "emulate3buttons"}, {EM3TIMEOUT, "emulate3timeout"}, {ENDSUBSECTION, "endsubsection"}, {ENDSECTION, "endsection"}, {PDEVICE, "device"}, {PDEVICE, "port"}, {BAUDRATE, "baudrate"}, {SAMPLERATE, "samplerate"}, {CLEARDTR, "cleardtr"}, {CLEARRTS, "clearrts"}, {CHORDMIDDLE, "chordmiddle"}, {PRESOLUTION, "resolution"}, {DEVICE_NAME, "devicename"}, {ALWAYSCORE, "alwayscore"}, {PBUTTONS, "buttons"}, {ZAXISMAPPING, "zaxismapping"}, {-1, ""}, }; static const xf86ConfigSymTabRec ZMapTab[] = { {XAXIS, "x"}, {YAXIS, "y"}, {-1, ""}, }; #define CLEANUP xf86freeInputList XF86ConfInputPtr xf86parsePointerSection(void) { char *s; unsigned long val1; int token; parsePrologue(XF86ConfInputPtr, XF86ConfInputRec) while ((token = xf86getToken(PointerTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case PROTOCOL: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Protocol"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Protocol"), xf86_lex_val.str); break; case PDEVICE: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Device"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Device"), xf86_lex_val.str); break; case EMULATE3: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Emulate3Buttons"), NULL); break; case EM3TIMEOUT: if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Emulate3Timeout"); s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Emulate3Timeout"), s); break; case CHORDMIDDLE: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("ChordMiddle"), NULL); break; case PBUTTONS: if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Buttons"); s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Buttons"), s); break; case BAUDRATE: if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "BaudRate"); s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("BaudRate"), s); break; case SAMPLERATE: if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "SampleRate"); s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("SampleRate"), s); break; case PRESOLUTION: if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Resolution"); s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Resolution"), s); break; case CLEARDTR: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("ClearDTR"), NULL); break; case CLEARRTS: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("ClearRTS"), NULL); break; case ZAXISMAPPING: switch (xf86getToken(ZMapTab)) { case NUMBER: if (xf86_lex_val.num < 0) Error(ZAXISMAPPING_MSG); val1 = xf86_lex_val.num; if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) { Error(ZAXISMAPPING_MSG); } if (asprintf(&s, "%lu %u", val1, xf86_lex_val.num) == -1) s = NULL; break; case XAXIS: s = strdup("x"); break; case YAXIS: s = strdup("y"); break; default: Error(ZAXISMAPPING_MSG); break; } ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("ZAxisMapping"), s); break; case ALWAYSCORE: break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } ptr->inp_identifier = strdup(CONF_IMPLICIT_POINTER); ptr->inp_driver = strdup("mouse"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("CorePointer"), NULL); #ifdef DEBUG printf("Pointer section parsed\n"); #endif return ptr; } #undef CLEANUP xorg-server-21.1.16/hw/xfree86/parser/Screen.c0000644000175000017500000004764314757411105014435 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec DisplayTab[] = { {ENDSUBSECTION, "endsubsection"}, {MODES, "modes"}, {VIEWPORT, "viewport"}, {VIRTUAL, "virtual"}, {VISUAL, "visual"}, {BLACK_TOK, "black"}, {WHITE_TOK, "white"}, {DEPTH, "depth"}, {BPP, "fbbpp"}, {WEIGHT, "weight"}, {OPTION, "option"}, {-1, ""}, }; static void xf86freeModeList(XF86ModePtr ptr) { XF86ModePtr prev; while (ptr) { TestFree(ptr->mode_name); prev = ptr; ptr = ptr->list.next; free(prev); } } static void xf86freeDisplayList(XF86ConfDisplayPtr ptr) { XF86ConfDisplayPtr prev; while (ptr) { xf86freeModeList(ptr->disp_mode_lst); xf86optionListFree(ptr->disp_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } #define CLEANUP xf86freeDisplayList static XF86ConfDisplayPtr xf86parseDisplaySubSection(void) { int token; parsePrologue(XF86ConfDisplayPtr, XF86ConfDisplayRec) ptr->disp_black.red = ptr->disp_black.green = ptr->disp_black.blue = -1; ptr->disp_white.red = ptr->disp_white.green = ptr->disp_white.blue = -1; ptr->disp_frameX0 = ptr->disp_frameY0 = -1; while ((token = xf86getToken(DisplayTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: ptr->disp_comment = xf86addComment(ptr->disp_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case VIEWPORT: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIEWPORT_MSG); ptr->disp_frameX0 = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIEWPORT_MSG); ptr->disp_frameY0 = xf86_lex_val.num; break; case VIRTUAL: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIRTUAL_MSG); ptr->disp_virtualX = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIRTUAL_MSG); ptr->disp_virtualY = xf86_lex_val.num; break; case DEPTH: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(NUMBER_MSG, "Display"); ptr->disp_depth = xf86_lex_val.num; break; case BPP: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(NUMBER_MSG, "Display"); ptr->disp_bpp = xf86_lex_val.num; break; case VISUAL: if (xf86getSubToken(&(ptr->disp_comment)) != STRING) Error(QUOTE_MSG, "Display"); ptr->disp_visual = xf86_lex_val.str; break; case WEIGHT: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); ptr->disp_weight.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); ptr->disp_weight.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); ptr->disp_weight.blue = xf86_lex_val.num; break; case BLACK_TOK: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(BLACK_MSG); ptr->disp_black.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(BLACK_MSG); ptr->disp_black.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(BLACK_MSG); ptr->disp_black.blue = xf86_lex_val.num; break; case WHITE_TOK: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WHITE_MSG); ptr->disp_white.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WHITE_MSG); ptr->disp_white.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WHITE_MSG); ptr->disp_white.blue = xf86_lex_val.num; break; case MODES: { XF86ModePtr mptr; while ((token = xf86getSubTokenWithTab(&(ptr->disp_comment), DisplayTab)) == STRING) { mptr = calloc(1, sizeof(XF86ModeRec)); mptr->mode_name = xf86_lex_val.str; mptr->list.next = NULL; ptr->disp_mode_lst = (XF86ModePtr) xf86addListItem((glp) ptr->disp_mode_lst, (glp) mptr); } xf86unGetToken(token); } break; case OPTION: ptr->disp_option_lst = xf86parseOption(ptr->disp_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("Display subsection parsed\n"); #endif return ptr; } #undef CLEANUP static const xf86ConfigSymTabRec ScreenTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {MATCHSEAT, "matchseat"}, {OBSDRIVER, "driver"}, {MDEVICE, "device"}, {MONITOR, "monitor"}, {VIDEOADAPTOR, "videoadaptor"}, {SCREENNO, "screenno"}, {SUBSECTION, "subsection"}, {DEFAULTDEPTH, "defaultcolordepth"}, {DEFAULTDEPTH, "defaultdepth"}, {DEFAULTBPP, "defaultbpp"}, {DEFAULTFBBPP, "defaultfbbpp"}, {VIRTUAL, "virtual"}, {OPTION, "option"}, {GDEVICE, "gpudevice"}, {-1, ""}, }; #define CLEANUP xf86freeScreenList XF86ConfScreenPtr xf86parseScreenSection(void) { int has_ident = FALSE; int has_driver = FALSE; int token; parsePrologue(XF86ConfScreenPtr, XF86ConfScreenRec) while ((token = xf86getToken(ScreenTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->scrn_comment = xf86addComment(ptr->scrn_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); ptr->scrn_identifier = xf86_lex_val.str; if (has_ident || has_driver) Error(ONLY_ONE_MSG, "Identifier or Driver"); has_ident = TRUE; break; case MATCHSEAT: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "MatchSeat"); ptr->match_seat = xf86_lex_val.str; break; case OBSDRIVER: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Driver"); ptr->scrn_obso_driver = xf86_lex_val.str; if (has_ident || has_driver) Error(ONLY_ONE_MSG, "Identifier or Driver"); has_driver = TRUE; break; case DEFAULTDEPTH: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultDepth"); ptr->scrn_defaultdepth = xf86_lex_val.num; break; case DEFAULTBPP: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultBPP"); ptr->scrn_defaultbpp = xf86_lex_val.num; break; case DEFAULTFBBPP: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultFbBPP"); ptr->scrn_defaultfbbpp = xf86_lex_val.num; break; case MDEVICE: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Device"); ptr->scrn_device_str = xf86_lex_val.str; break; case GDEVICE: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "GPUDevice"); if (ptr->num_gpu_devices == CONF_MAXGPUDEVICES) Error(GPU_DEVICE_TOO_MANY, CONF_MAXGPUDEVICES); ptr->scrn_gpu_device_str[ptr->num_gpu_devices++] = xf86_lex_val.str; break; case MONITOR: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Monitor"); ptr->scrn_monitor_str = xf86_lex_val.str; break; case VIDEOADAPTOR: { XF86ConfAdaptorLinkPtr aptr; if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "VideoAdaptor"); /* Don't allow duplicates */ for (aptr = ptr->scrn_adaptor_lst; aptr; aptr = (XF86ConfAdaptorLinkPtr) aptr->list.next) if (xf86nameCompare(xf86_lex_val.str, aptr->al_adaptor_str) == 0) break; if (aptr == NULL) { aptr = calloc(1, sizeof(XF86ConfAdaptorLinkRec)); aptr->list.next = NULL; aptr->al_adaptor_str = xf86_lex_val.str; ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr) xf86addListItem((glp) ptr->scrn_adaptor_lst, (glp) aptr); } } break; case VIRTUAL: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(VIRTUAL_MSG); ptr->scrn_virtualX = xf86_lex_val.num; if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(VIRTUAL_MSG); ptr->scrn_virtualY = xf86_lex_val.num; break; case OPTION: ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst); break; case SUBSECTION: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "SubSection"); { free(xf86_lex_val.str); HANDLE_LIST(scrn_display_lst, xf86parseDisplaySubSection, XF86ConfDisplayPtr); } break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident && !has_driver) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Screen section parsed\n"); #endif return ptr; } void xf86printScreenSection(FILE * cf, XF86ConfScreenPtr ptr) { XF86ConfAdaptorLinkPtr aptr; XF86ConfDisplayPtr dptr; XF86ModePtr mptr; int i; while (ptr) { fprintf(cf, "Section \"Screen\"\n"); if (ptr->scrn_comment) fprintf(cf, "%s", ptr->scrn_comment); if (ptr->scrn_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->scrn_identifier); if (ptr->scrn_obso_driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->scrn_obso_driver); if (ptr->scrn_device_str) fprintf(cf, "\tDevice \"%s\"\n", ptr->scrn_device_str); for (i = 0; i < ptr->num_gpu_devices; i++) if (ptr->scrn_gpu_device_str[i]) fprintf(cf, "\tGPUDevice \"%s\"\n", ptr->scrn_gpu_device_str[i]); if (ptr->scrn_monitor_str) fprintf(cf, "\tMonitor \"%s\"\n", ptr->scrn_monitor_str); if (ptr->scrn_defaultdepth) fprintf(cf, "\tDefaultDepth %d\n", ptr->scrn_defaultdepth); if (ptr->scrn_defaultbpp) fprintf(cf, "\tDefaultBPP %d\n", ptr->scrn_defaultbpp); if (ptr->scrn_defaultfbbpp) fprintf(cf, "\tDefaultFbBPP %d\n", ptr->scrn_defaultfbbpp); xf86printOptionList(cf, ptr->scrn_option_lst, 1); for (aptr = ptr->scrn_adaptor_lst; aptr; aptr = aptr->list.next) { fprintf(cf, "\tVideoAdaptor \"%s\"\n", aptr->al_adaptor_str); } if (ptr->scrn_virtualX && ptr->scrn_virtualY) fprintf(cf, "\tVirtual %d %d\n", ptr->scrn_virtualX, ptr->scrn_virtualY); for (dptr = ptr->scrn_display_lst; dptr; dptr = dptr->list.next) { fprintf(cf, "\tSubSection \"Display\"\n"); if (dptr->disp_comment) fprintf(cf, "%s", dptr->disp_comment); if (dptr->disp_frameX0 >= 0 || dptr->disp_frameY0 >= 0) { fprintf(cf, "\t\tViewport %d %d\n", dptr->disp_frameX0, dptr->disp_frameY0); } if (dptr->disp_virtualX != 0 || dptr->disp_virtualY != 0) { fprintf(cf, "\t\tVirtual %d %d\n", dptr->disp_virtualX, dptr->disp_virtualY); } if (dptr->disp_depth) { fprintf(cf, "\t\tDepth %d\n", dptr->disp_depth); } if (dptr->disp_bpp) { fprintf(cf, "\t\tFbBPP %d\n", dptr->disp_bpp); } if (dptr->disp_visual) { fprintf(cf, "\t\tVisual \"%s\"\n", dptr->disp_visual); } if (dptr->disp_weight.red != 0) { fprintf(cf, "\t\tWeight %d %d %d\n", dptr->disp_weight.red, dptr->disp_weight.green, dptr->disp_weight.blue); } if (dptr->disp_black.red != -1) { fprintf(cf, "\t\tBlack 0x%04x 0x%04x 0x%04x\n", dptr->disp_black.red, dptr->disp_black.green, dptr->disp_black.blue); } if (dptr->disp_white.red != -1) { fprintf(cf, "\t\tWhite 0x%04x 0x%04x 0x%04x\n", dptr->disp_white.red, dptr->disp_white.green, dptr->disp_white.blue); } if (dptr->disp_mode_lst) { fprintf(cf, "\t\tModes "); } for (mptr = dptr->disp_mode_lst; mptr; mptr = mptr->list.next) { fprintf(cf, " \"%s\"", mptr->mode_name); } if (dptr->disp_mode_lst) { fprintf(cf, "\n"); } xf86printOptionList(cf, dptr->disp_option_lst, 2); fprintf(cf, "\tEndSubSection\n"); } fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } static void xf86freeAdaptorLinkList(XF86ConfAdaptorLinkPtr ptr) { XF86ConfAdaptorLinkPtr prev; while (ptr) { TestFree(ptr->al_adaptor_str); prev = ptr; ptr = ptr->list.next; free(prev); } } void xf86freeScreenList(XF86ConfScreenPtr ptr) { XF86ConfScreenPtr prev; int i; while (ptr) { TestFree(ptr->scrn_identifier); TestFree(ptr->scrn_monitor_str); TestFree(ptr->scrn_device_str); for (i = 0; i < ptr->num_gpu_devices; i++) TestFree(ptr->scrn_gpu_device_str[i]); TestFree(ptr->scrn_comment); xf86optionListFree(ptr->scrn_option_lst); xf86freeAdaptorLinkList(ptr->scrn_adaptor_lst); xf86freeDisplayList(ptr->scrn_display_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } int xf86validateScreen(XF86ConfigPtr p) { XF86ConfScreenPtr screen = p->conf_screen_lst; XF86ConfMonitorPtr monitor; XF86ConfAdaptorLinkPtr adaptor; int i; while (screen) { if (screen->scrn_obso_driver && !screen->scrn_identifier) screen->scrn_identifier = screen->scrn_obso_driver; monitor = xf86findMonitor(screen->scrn_monitor_str, p->conf_monitor_lst); if (screen->scrn_monitor_str) { if (monitor) { screen->scrn_monitor = monitor; if (!xf86validateMonitor(p, screen)) return FALSE; } } screen->scrn_device = xf86findDevice(screen->scrn_device_str, p->conf_device_lst); for (i = 0; i < screen->num_gpu_devices; i++) { screen->scrn_gpu_devices[i] = xf86findDevice(screen->scrn_gpu_device_str[i], p->conf_device_lst); } adaptor = screen->scrn_adaptor_lst; while (adaptor) { adaptor->al_adaptor = xf86findVideoAdaptor(adaptor->al_adaptor_str, p->conf_videoadaptor_lst); if (!adaptor->al_adaptor) { xf86validationError(UNDEFINED_ADAPTOR_MSG, adaptor->al_adaptor_str, screen->scrn_identifier); return FALSE; } else if (adaptor->al_adaptor->va_fwdref) { xf86validationError(ADAPTOR_REF_TWICE_MSG, adaptor->al_adaptor_str, adaptor->al_adaptor->va_fwdref); return FALSE; } adaptor->al_adaptor->va_fwdref = strdup(screen->scrn_identifier); adaptor = adaptor->list.next; } screen = screen->list.next; } return TRUE; } XF86ConfScreenPtr xf86findScreen(const char *ident, XF86ConfScreenPtr p) { while (p) { if (xf86nameCompare(ident, p->scrn_identifier) == 0) return p; p = p->list.next; } return NULL; } xorg-server-21.1.16/hw/xfree86/parser/Vendor.c0000644000175000017500000001655614757411105014452 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec VendorSubTab[] = { {ENDSUBSECTION, "endsubsection"}, {IDENTIFIER, "identifier"}, {OPTION, "option"}, {-1, ""}, }; static void xf86freeVendorSubList(XF86ConfVendSubPtr ptr) { XF86ConfVendSubPtr prev; while (ptr) { TestFree(ptr->vs_identifier); TestFree(ptr->vs_name); TestFree(ptr->vs_comment); xf86optionListFree(ptr->vs_option_lst); prev = ptr; ptr = ptr->list.next; free(prev); } } #define CLEANUP xf86freeVendorSubList static XF86ConfVendSubPtr xf86parseVendorSubSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfVendSubPtr, XF86ConfVendSubRec) while ((token = xf86getToken(VendorSubTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: ptr->vs_comment = xf86addComment(ptr->vs_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vs_comment))) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->vs_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: ptr->vs_option_lst = xf86parseOption(ptr->vs_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG printf("Vendor subsection parsed\n"); #endif return ptr; } #undef CLEANUP static const xf86ConfigSymTabRec VendorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, {OPTION, "option"}, {SUBSECTION, "subsection"}, {-1, ""}, }; #define CLEANUP xf86freeVendorList XF86ConfVendorPtr xf86parseVendorSection(void) { int has_ident = FALSE; int token; parsePrologue(XF86ConfVendorPtr, XF86ConfVendorRec) while ((token = xf86getToken(VendorTab)) != ENDSECTION) { switch (token) { case COMMENT: ptr->vnd_comment = xf86addComment(ptr->vnd_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vnd_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); ptr->vnd_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: ptr->vnd_option_lst = xf86parseOption(ptr->vnd_option_lst); break; case SUBSECTION: if (xf86getSubToken(&(ptr->vnd_comment)) != STRING) Error(QUOTE_MSG, "SubSection"); { HANDLE_LIST(vnd_sub_lst, xf86parseVendorSubSection, XF86ConfVendSubPtr); } break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } if (!has_ident) Error(NO_IDENT_MSG); #ifdef DEBUG printf("Vendor section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printVendorSection(FILE * cf, XF86ConfVendorPtr ptr) { XF86ConfVendSubPtr pptr; while (ptr) { fprintf(cf, "Section \"Vendor\"\n"); if (ptr->vnd_comment) fprintf(cf, "%s", ptr->vnd_comment); if (ptr->vnd_identifier) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->vnd_identifier); xf86printOptionList(cf, ptr->vnd_option_lst, 1); for (pptr = ptr->vnd_sub_lst; pptr; pptr = pptr->list.next) { fprintf(cf, "\tSubSection \"Vendor\"\n"); if (pptr->vs_comment) fprintf(cf, "%s", pptr->vs_comment); if (pptr->vs_identifier) fprintf(cf, "\t\tIdentifier \"%s\"\n", pptr->vs_identifier); xf86printOptionList(cf, pptr->vs_option_lst, 2); fprintf(cf, "\tEndSubSection\n"); } fprintf(cf, "EndSection\n\n"); ptr = ptr->list.next; } } void xf86freeVendorList(XF86ConfVendorPtr p) { if (p == NULL) return; xf86freeVendorSubList(p->vnd_sub_lst); TestFree(p->vnd_identifier); TestFree(p->vnd_comment); xf86optionListFree(p->vnd_option_lst); free(p); } xorg-server-21.1.16/hw/xfree86/parser/read.c0000644000175000017500000002540714757411105014123 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Config.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec TopLevelTab[] = { {SECTION, "section"}, {-1, ""}, }; #define CLEANUP xf86freeConfig /* * This function resolves name references and reports errors if the named * objects cannot be found. */ static int xf86validateConfig(XF86ConfigPtr p) { if (!xf86validateScreen(p)) return FALSE; if (!xf86validateInput(p)) return FALSE; if (!xf86validateLayout(p)) return FALSE; return TRUE; } XF86ConfigPtr xf86readConfigFile(void) { int token; XF86ConfigPtr ptr = NULL; if ((ptr = xf86allocateConfig()) == NULL) { return NULL; } while ((token = xf86getToken(TopLevelTab)) != EOF_TOKEN) { switch (token) { case COMMENT: ptr->conf_comment = xf86addComment(ptr->conf_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; case SECTION: if (xf86getSubToken(&(ptr->conf_comment)) != STRING) { xf86parseError(QUOTE_MSG, "Section"); CLEANUP(ptr); return NULL; } xf86setSection(xf86_lex_val.str); if (xf86nameCompare(xf86_lex_val.str, "files") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_RETURN(conf_files, xf86parseFilesSection()); } else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_RETURN(conf_flags, xf86parseFlagsSection()); } else if (xf86nameCompare(xf86_lex_val.str, "pointer") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_input_lst, xf86parsePointerSection, XF86ConfInputPtr); } else if (xf86nameCompare(xf86_lex_val.str, "videoadaptor") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_videoadaptor_lst, xf86parseVideoAdaptorSection, XF86ConfVideoAdaptorPtr); } else if (xf86nameCompare(xf86_lex_val.str, "device") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_device_lst, xf86parseDeviceSection, XF86ConfDevicePtr); } else if (xf86nameCompare(xf86_lex_val.str, "monitor") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_monitor_lst, xf86parseMonitorSection, XF86ConfMonitorPtr); } else if (xf86nameCompare(xf86_lex_val.str, "modes") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_modes_lst, xf86parseModesSection, XF86ConfModesPtr); } else if (xf86nameCompare(xf86_lex_val.str, "screen") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_screen_lst, xf86parseScreenSection, XF86ConfScreenPtr); } else if (xf86nameCompare(xf86_lex_val.str, "inputdevice") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_input_lst, xf86parseInputSection, XF86ConfInputPtr); } else if (xf86nameCompare(xf86_lex_val.str, "inputclass") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_inputclass_lst, xf86parseInputClassSection, XF86ConfInputClassPtr); } else if (xf86nameCompare(xf86_lex_val.str, "outputclass") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_outputclass_lst, xf86parseOutputClassSection, XF86ConfOutputClassPtr); } else if (xf86nameCompare(xf86_lex_val.str, "module") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_RETURN(conf_modules, xf86parseModuleSection()); } else if (xf86nameCompare(xf86_lex_val.str, "serverlayout") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_layout_lst, xf86parseLayoutSection, XF86ConfLayoutPtr); } else if (xf86nameCompare(xf86_lex_val.str, "vendor") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_LIST(conf_vendor_lst, xf86parseVendorSection, XF86ConfVendorPtr); } else if (xf86nameCompare(xf86_lex_val.str, "dri") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_RETURN(conf_dri, xf86parseDRISection()); } else if (xf86nameCompare(xf86_lex_val.str, "extensions") == 0) { free(xf86_lex_val.str); xf86_lex_val.str = NULL; HANDLE_RETURN(conf_extensions, xf86parseExtensionsSection()); } else { free(xf86_lex_val.str); xf86_lex_val.str = NULL; Error(INVALID_SECTION_MSG, xf86tokenString()); } break; default: free(xf86_lex_val.str); xf86_lex_val.str = NULL; Error(INVALID_KEYWORD_MSG, xf86tokenString()); } } if (xf86validateConfig(ptr)) return ptr; else { CLEANUP(ptr); return NULL; } } #undef CLEANUP /* * adds an item to the end of the linked list. Any record whose first field * is a GenericListRec can be cast to this type and used with this function. * A pointer to the head of the list is returned to handle the addition of * the first item. */ GenericListPtr xf86addListItem(GenericListPtr head, GenericListPtr new) { GenericListPtr p = head; GenericListPtr last = NULL; while (p) { last = p; p = p->next; } if (last) { last->next = new; return head; } else return new; } /* * Test if one chained list contains the other. * In this case both list have the same endpoint (provided they don't loop) */ int xf86itemNotSublist(GenericListPtr list_1, GenericListPtr list_2) { GenericListPtr p = list_1; GenericListPtr last_1 = NULL, last_2 = NULL; while (p) { last_1 = p; p = p->next; } p = list_2; while (p) { last_2 = p; p = p->next; } return (!(last_1 == last_2)); } /* * Conditionally allocate config struct, but only allocate it * if it's not already there. In either event, return the pointer * to the global config struct. */ XF86ConfigPtr xf86allocateConfig(void) { if (!xf86configptr) { xf86configptr = calloc(1, sizeof(XF86ConfigRec)); } return xf86configptr; } void xf86freeConfig(XF86ConfigPtr p) { if (p == NULL) return; xf86freeFiles(p->conf_files); xf86freeModules(p->conf_modules); xf86freeFlags(p->conf_flags); xf86freeMonitorList(p->conf_monitor_lst); xf86freeModesList(p->conf_modes_lst); xf86freeVideoAdaptorList(p->conf_videoadaptor_lst); xf86freeDeviceList(p->conf_device_lst); xf86freeScreenList(p->conf_screen_lst); xf86freeLayoutList(p->conf_layout_lst); xf86freeInputList(p->conf_input_lst); xf86freeVendorList(p->conf_vendor_lst); xf86freeDRI(p->conf_dri); xf86freeExtensions(p->conf_extensions); TestFree(p->conf_comment); free(p); } xorg-server-21.1.16/hw/xfree86/parser/scan.c0000644000175000017500000007426514757411105014142 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #if !defined(MAXHOSTNAMELEN) #define MAXHOSTNAMELEN 32 #endif /* !MAXHOSTNAMELEN */ /* For PATH_MAX */ #include "misc.h" #include "Configint.h" #include "xf86tokens.h" #define CONFIG_BUF_LEN 1024 #define CONFIG_MAX_FILES 64 static struct { FILE *file; char *path; } configFiles[CONFIG_MAX_FILES]; static const char **builtinConfig = NULL; static int builtinIndex = 0; static int configPos = 0; /* current readers position */ static int configLineNo = 0; /* linenumber */ static char *configBuf, *configRBuf; /* buffer for lines */ static char *configSection = NULL; /* name of current section being parsed */ static int numFiles = 0; /* number of config files */ static int curFileIndex = 0; /* index of current config file */ static int pushToken = LOCK_TOKEN; static int eol_seen = 0; /* private state to handle comments */ LexRec xf86_lex_val; /* * xf86getNextLine -- * * read from the configFiles FILE stream until we encounter a new * line; this is effectively just a big wrapper for fgets(3). * * xf86getToken() assumes that we will read up to the next * newline; we need to grow configBuf and configRBuf as needed to * support that. */ static char * xf86getNextLine(void) { static int configBufLen = CONFIG_BUF_LEN; char *tmpConfigBuf, *tmpConfigRBuf; int c, i, pos = 0, eolFound = 0; char *ret = NULL; /* * reallocate the string if it was grown last time (i.e., is no * longer CONFIG_BUF_LEN); we malloc the new strings first, so * that if either of the mallocs fail, we can fall back on the * existing buffer allocations */ if (configBufLen != CONFIG_BUF_LEN) { tmpConfigBuf = malloc(CONFIG_BUF_LEN); tmpConfigRBuf = malloc(CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { /* * at least one of the mallocs failed; keep the old buffers * and free any partial allocations */ free(tmpConfigBuf); free(tmpConfigRBuf); } else { /* * malloc succeeded; free the old buffers and use the new * buffers */ configBufLen = CONFIG_BUF_LEN; free(configBuf); free(configRBuf); configBuf = tmpConfigBuf; configRBuf = tmpConfigRBuf; } } /* read in another block of chars */ do { ret = fgets(configBuf + pos, configBufLen - pos - 1, configFiles[curFileIndex].file); if (!ret) { /* * if the file doesn't end in a newline, add one * and trigger another read */ if (pos != 0) { strcpy(&configBuf[pos], "\n"); ret = configBuf; } else break; } /* search for EOL in the new block of chars */ for (i = pos; i < (configBufLen - 1); i++) { c = configBuf[i]; if (c == '\0') break; if ((c == '\n') || (c == '\r')) { eolFound = 1; break; } } /* * if we didn't find EOL, then grow the string and * read in more */ if (!eolFound) { tmpConfigBuf = realloc(configBuf, configBufLen + CONFIG_BUF_LEN); tmpConfigRBuf = realloc(configRBuf, configBufLen + CONFIG_BUF_LEN); if (!tmpConfigBuf || !tmpConfigRBuf) { /* * at least one of the reallocations failed; use the * new allocation that succeeded, but we have to * fallback to the previous configBufLen size and use * the string we have, even though we don't have an * EOL */ if (tmpConfigBuf) configBuf = tmpConfigBuf; if (tmpConfigRBuf) configRBuf = tmpConfigRBuf; break; } else { /* reallocation succeeded */ configBuf = tmpConfigBuf; configRBuf = tmpConfigRBuf; pos = i; configBufLen += CONFIG_BUF_LEN; } } } while (!eolFound); return ret; } static int StringToToken(const char *str, const xf86ConfigSymTabRec * tab) { int i; for (i = 0; tab[i].token != -1; i++) { if (!xf86nameCompare(tab[i].name, str)) return tab[i].token; } return ERROR_TOKEN; } /* * xf86getToken -- * Read next Token from the config file. Handle the global variable * pushToken. */ int xf86getToken(const xf86ConfigSymTabRec * tab) { int c, i; /* * First check whether pushToken has a different value than LOCK_TOKEN. * In this case rBuf[] contains a valid STRING/TOKEN/NUMBER. But in the * oth * case the next token must be read from the input. */ if (pushToken == EOF_TOKEN) return EOF_TOKEN; else if (pushToken == LOCK_TOKEN) { /* * eol_seen is only set for the first token after a newline. */ eol_seen = 0; c = configBuf[configPos]; /* * Get start of next Token. EOF is handled, * whitespaces are skipped. */ again: if (!c) { char *ret; if (numFiles > 0) ret = xf86getNextLine(); else { if (builtinConfig[builtinIndex] == NULL) ret = NULL; else { strlcpy(configBuf, builtinConfig[builtinIndex], CONFIG_BUF_LEN); ret = configBuf; builtinIndex++; } } if (ret == NULL) { /* * if necessary, move to the next file and * read the first line */ if (curFileIndex + 1 < numFiles) { curFileIndex++; configLineNo = 0; goto again; } else return pushToken = EOF_TOKEN; } configLineNo++; configPos = 0; eol_seen = 1; } i = 0; for (;;) { c = configBuf[configPos++]; configRBuf[i++] = c; switch (c) { case ' ': case '\t': case '\r': continue; case '\n': i = 0; continue; } break; } if (c == '\0') goto again; if (c == '#') { do { configRBuf[i++] = (c = configBuf[configPos++]); } while ((c != '\n') && (c != '\r') && (c != '\0')); configRBuf[i] = '\0'; /* XXX private copy. * Use xf86addComment when setting a comment. */ xf86_lex_val.str = strdup(configRBuf); return COMMENT; } /* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */ else if ((c == ',') && !isalpha(configBuf[configPos])) { return COMMA; } else if ((c == '-') && !isalpha(configBuf[configPos])) { return DASH; } /* * Numbers are returned immediately ... */ if (isdigit(c)) { int base; if (c == '0') if ((configBuf[configPos] == 'x') || (configBuf[configPos] == 'X')) { base = 16; xf86_lex_val.numType = PARSE_HEX; } else { base = 8; xf86_lex_val.numType = PARSE_OCTAL; } else { base = 10; xf86_lex_val.numType = PARSE_DECIMAL; } configRBuf[0] = c; i = 1; while (isdigit(c = configBuf[configPos++]) || (c == '.') || (c == 'x') || (c == 'X') || ((base == 16) && (((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F'))))) configRBuf[i++] = c; configPos--; /* GJA -- one too far */ configRBuf[i] = '\0'; xf86_lex_val.num = strtoul(configRBuf, NULL, 0); xf86_lex_val.realnum = atof(configRBuf); return NUMBER; } /* * All Strings START with a \" ... */ else if (c == '\"') { i = -1; do { configRBuf[++i] = (c = configBuf[configPos++]); } while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0')); configRBuf[i] = '\0'; xf86_lex_val.str = malloc(strlen(configRBuf) + 1); strcpy(xf86_lex_val.str, configRBuf); /* private copy ! */ return STRING; } /* * ... and now we MUST have a valid token. The search is * handled later along with the pushed tokens. */ else { configRBuf[0] = c; i = 0; do { configRBuf[++i] = (c = configBuf[configPos++]); } while ((c != ' ') && (c != '\t') && (c != '\n') && (c != '\r') && (c != '\0') && (c != '#')); --configPos; configRBuf[i] = '\0'; i = 0; } } else { /* * Here we deal with pushed tokens. Reinitialize pushToken again. If * the pushed token was NUMBER || STRING return them again ... */ int temp = pushToken; pushToken = LOCK_TOKEN; if (temp == COMMA || temp == DASH) return temp; if (temp == NUMBER || temp == STRING) return temp; } /* * Joop, at last we have to lookup the token ... */ if (tab) return StringToToken(configRBuf, tab); return ERROR_TOKEN; /* Error catcher */ } int xf86getSubToken(char **comment) { int token; for (;;) { token = xf86getToken(NULL); if (token == COMMENT) { if (comment) { *comment = xf86addComment(*comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; } } else return token; } /*NOTREACHED*/} int xf86getSubTokenWithTab(char **comment, const xf86ConfigSymTabRec * tab) { int token; for (;;) { token = xf86getToken(tab); if (token == COMMENT) { if (comment) { *comment = xf86addComment(*comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; } } else return token; } /*NOTREACHED*/} void xf86unGetToken(int token) { pushToken = token; } char * xf86tokenString(void) { return configRBuf; } int xf86pathIsAbsolute(const char *path) { if (path && path[0] == '/') return 1; return 0; } /* A path is "safe" if it is relative and if it contains no ".." elements. */ int xf86pathIsSafe(const char *path) { if (xf86pathIsAbsolute(path)) return 0; /* Compare with ".." */ if (!strcmp(path, "..")) return 0; /* Look for leading "../" */ if (!strncmp(path, "../", 3)) return 0; /* Look for trailing "/.." */ if ((strlen(path) > 3) && !strcmp(path + strlen(path) - 3, "/..")) return 0; /* Look for "/../" */ if (strstr(path, "/../")) return 0; return 1; } /* * This function substitutes the following escape sequences: * * %A cmdline argument as an absolute path (must be absolute to match) * %R cmdline argument as a relative path * %S cmdline argument as a "safe" path (relative, and no ".." elements) * %X default config file name ("xorg.conf") * %H hostname * %E config file environment ($XORGCONFIG) as an absolute path * %F config file environment ($XORGCONFIG) as a relative path * %G config file environment ($XORGCONFIG) as a safe path * %P projroot * %C sysconfdir * %D datadir * %% % */ #define XCONFIGSUFFIX ".conf" #define XCONFENV "XORGCONFIG" #define BAIL_OUT do { \ free(result); \ return NULL; \ } while (0) #define CHECK_LENGTH do { \ if (l > PATH_MAX) { \ BAIL_OUT; \ } \ } while (0) #define APPEND_STR(s) do { \ if (strlen(s) + l > PATH_MAX) { \ BAIL_OUT; \ } else { \ strcpy(result + l, s); \ l += strlen(s); \ } \ } while (0) static char * DoSubstitution(const char *template, const char *cmdline, const char *projroot, int *cmdlineUsed, int *envUsed, const char *XConfigFile) { char *result; int i, l; static const char *env = NULL; static char *hostname = NULL; if (!template) return NULL; if (cmdlineUsed) *cmdlineUsed = 0; if (envUsed) *envUsed = 0; result = malloc(PATH_MAX + 1); l = 0; for (i = 0; template[i]; i++) { if (template[i] != '%') { result[l++] = template[i]; CHECK_LENGTH; } else { switch (template[++i]) { case 'A': if (cmdline && xf86pathIsAbsolute(cmdline)) { APPEND_STR(cmdline); if (cmdlineUsed) *cmdlineUsed = 1; } else BAIL_OUT; break; case 'R': if (cmdline && !xf86pathIsAbsolute(cmdline)) { APPEND_STR(cmdline); if (cmdlineUsed) *cmdlineUsed = 1; } else BAIL_OUT; break; case 'S': if (cmdline && xf86pathIsSafe(cmdline)) { APPEND_STR(cmdline); if (cmdlineUsed) *cmdlineUsed = 1; } else BAIL_OUT; break; case 'X': APPEND_STR(XConfigFile); break; case 'H': if (!hostname) { if ((hostname = malloc(MAXHOSTNAMELEN + 1))) { if (gethostname(hostname, MAXHOSTNAMELEN) == 0) { hostname[MAXHOSTNAMELEN] = '\0'; } else { free(hostname); hostname = NULL; } } } if (hostname) APPEND_STR(hostname); break; case 'E': if (!env) env = getenv(XCONFENV); if (env && xf86pathIsAbsolute(env)) { APPEND_STR(env); if (envUsed) *envUsed = 1; } else BAIL_OUT; break; case 'F': if (!env) env = getenv(XCONFENV); if (env && !xf86pathIsAbsolute(env)) { APPEND_STR(env); if (envUsed) *envUsed = 1; } else BAIL_OUT; break; case 'G': if (!env) env = getenv(XCONFENV); if (env && xf86pathIsSafe(env)) { APPEND_STR(env); if (envUsed) *envUsed = 1; } else BAIL_OUT; break; case 'P': if (projroot && xf86pathIsAbsolute(projroot)) APPEND_STR(projroot); else BAIL_OUT; break; case 'C': APPEND_STR(SYSCONFDIR); break; case 'D': APPEND_STR(DATADIR); break; case '%': result[l++] = '%'; CHECK_LENGTH; break; default: fprintf(stderr, "invalid escape %%%c found in path template\n", template[i]); BAIL_OUT; break; } } } #ifdef DEBUG fprintf(stderr, "Converted `%s' to `%s'\n", template, result); #endif return result; } /* * Given some searching parameters, locate and open the xorg config file. */ static char * OpenConfigFile(const char *path, const char *cmdline, const char *projroot, const char *confname) { char *filepath = NULL; char *pathcopy; const char *template; int cmdlineUsed = 0; FILE *file = NULL; pathcopy = strdup(path); for (template = strtok(pathcopy, ","); template && !file; template = strtok(NULL, ",")) { filepath = DoSubstitution(template, cmdline, projroot, &cmdlineUsed, NULL, confname); if (!filepath) continue; if (cmdline && !cmdlineUsed) { free(filepath); filepath = NULL; continue; } file = fopen(filepath, "r"); if (!file) { free(filepath); filepath = NULL; } } free(pathcopy); if (file) { configFiles[numFiles].file = file; configFiles[numFiles].path = strdup(filepath); numFiles++; } return filepath; } /* * Match non-hidden files in the xorg config directory with a .conf * suffix. This filter is passed to scandir(3). */ static int ConfigFilter(const struct dirent *de) { const char *name = de->d_name; size_t len; size_t suflen = strlen(XCONFIGSUFFIX); if (!name || name[0] == '.') return 0; len = strlen(name); if (len <= suflen) return 0; if (strcmp(&name[len - suflen], XCONFIGSUFFIX) != 0) return 0; return 1; } static Bool AddConfigDirFiles(const char *dirpath, struct dirent **list, int num) { int i; Bool openedFile = FALSE; Bool warnOnce = FALSE; for (i = 0; i < num; i++) { char *path; FILE *file; if (numFiles >= CONFIG_MAX_FILES) { if (!warnOnce) { ErrorF("Maximum number of configuration " "files opened\n"); warnOnce = TRUE; } continue; } path = malloc(PATH_MAX + 1); snprintf(path, PATH_MAX + 1, "%s/%s", dirpath, list[i]->d_name); file = fopen(path, "r"); if (!file) { free(path); continue; } openedFile = TRUE; configFiles[numFiles].file = file; configFiles[numFiles].path = path; numFiles++; } return openedFile; } /* * Given some searching parameters, locate and open the xorg config * directory. The directory does not need to contain config files. */ static char * OpenConfigDir(const char *path, const char *cmdline, const char *projroot, const char *confname) { char *dirpath = NULL, *pathcopy; const char *template; Bool found = FALSE; int cmdlineUsed = 0; pathcopy = strdup(path); for (template = strtok(pathcopy, ","); template && !found; template = strtok(NULL, ",")) { struct dirent **list = NULL; int num; dirpath = DoSubstitution(template, cmdline, projroot, &cmdlineUsed, NULL, confname); if (!dirpath) continue; if (cmdline && !cmdlineUsed) { free(dirpath); dirpath = NULL; continue; } /* match files named *.conf */ num = scandir(dirpath, &list, ConfigFilter, alphasort); if (num < 0) { list = NULL; num = 0; } found = AddConfigDirFiles(dirpath, list, num); if (!found) { free(dirpath); dirpath = NULL; } while (num--) free(list[num]); free(list); } free(pathcopy); return dirpath; } /* * xf86initConfigFiles -- Setup global variables and buffers. */ void xf86initConfigFiles(void) { curFileIndex = 0; configPos = 0; configLineNo = 0; pushToken = LOCK_TOKEN; configBuf = malloc(CONFIG_BUF_LEN); configRBuf = malloc(CONFIG_BUF_LEN); configBuf[0] = '\0'; /* sanity ... */ } /* * xf86openConfigFile -- * * This function take a config file search path (optional), a command-line * specified file name (optional) and the ProjectRoot path (optional) and * locates and opens a config file based on that information. If a * command-line file name is specified, then this function fails if none * of the located files. * * The return value is a pointer to the actual name of the file that was * opened. When no file is found, the return value is NULL. The caller should * free() the returned value. * * The escape sequences allowed in the search path are defined above. * */ #ifndef DEFAULT_CONF_PATH #define DEFAULT_CONF_PATH "/etc/X11/%S," \ "%P/etc/X11/%S," \ "/etc/X11/%G," \ "%P/etc/X11/%G," \ "/etc/X11/%X-%M," \ "/etc/X11/%X," \ "/etc/%X," \ "%P/etc/X11/%X.%H," \ "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," \ "%P/lib/X11/%X-%M," \ "%P/lib/X11/%X" #endif char * xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) { if (!path || !path[0]) path = DEFAULT_CONF_PATH; if (!projroot || !projroot[0]) projroot = PROJECTROOT; /* Search for a config file */ return OpenConfigFile(path, cmdline, projroot, XCONFIGFILE); } /* * xf86openConfigDirFiles -- * * This function take a config directory search path (optional), a * command-line specified directory name (optional) and the ProjectRoot path * (optional) and locates and opens a config directory based on that * information. If a command-line name is specified, then this function * fails if it is not found. * * The return value is a pointer to the actual name of the directory that was * opened. When no directory is found, the return value is NULL. The caller * should free() the returned value. * * The escape sequences allowed in the search path are defined above. * */ char * xf86openConfigDirFiles(const char *path, const char *cmdline, const char *projroot) { if (!path || !path[0]) path = DEFAULT_CONF_PATH; if (!projroot || !projroot[0]) projroot = PROJECTROOT; /* Search for the multiconf directory */ return OpenConfigDir(path, cmdline, projroot, XCONFIGDIR); } void xf86closeConfigFile(void) { int i; free(configRBuf); configRBuf = NULL; free(configBuf); configBuf = NULL; if (numFiles == 0) { builtinConfig = NULL; builtinIndex = 0; } for (i = 0; i < numFiles; i++) { fclose(configFiles[i].file); configFiles[i].file = NULL; free(configFiles[i].path); configFiles[i].path = NULL; } numFiles = 0; } void xf86setBuiltinConfig(const char *config[]) { builtinConfig = config; } void xf86parseError(const char *format, ...) { va_list ap; const char *filename = numFiles ? configFiles[curFileIndex].path : ""; ErrorF("Parse error on line %d of section %s in file %s\n\t", configLineNo, configSection, filename); va_start(ap, format); VErrorF(format, ap); va_end(ap); ErrorF("\n"); } void xf86validationError(const char *format, ...) { va_list ap; const char *filename = numFiles ? configFiles[curFileIndex].path : ""; ErrorF("Data incomplete in file %s\n\t", filename); va_start(ap, format); VErrorF(format, ap); va_end(ap); ErrorF("\n"); } void xf86setSection(const char *section) { free(configSection); configSection = strdup(section); } /* * xf86getToken -- * Lookup a string if it is actually a token in disguise. */ int xf86getStringToken(const xf86ConfigSymTabRec * tab) { return StringToToken(xf86_lex_val.str, tab); } /* * Compare two names. The characters '_', ' ', and '\t' are ignored * in the comparison. */ int xf86nameCompare(const char *s1, const char *s2) { char c1, c2; if (!s1 || *s1 == 0) { if (!s2 || *s2 == 0) return 0; else return 1; } else if (!s2 || *s2 == 0) { return -1; } while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') s1++; while (*s2 == '_' || *s2 == ' ' || *s2 == '\t') s2++; c1 = (isupper(*s1) ? tolower(*s1) : *s1); c2 = (isupper(*s2) ? tolower(*s2) : *s2); while (c1 == c2) { if (c1 == '\0') return 0; s1++; s2++; while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') s1++; while (*s2 == '_' || *s2 == ' ' || *s2 == '\t') s2++; c1 = (isupper(*s1) ? tolower(*s1) : *s1); c2 = (isupper(*s2) ? tolower(*s2) : *s2); } return c1 - c2; } char * xf86addComment(char *cur, const char *add) { char *str; const char *cstr; int len, curlen, iscomment, hasnewline = 0, insnewline, endnewline; if (add == NULL || add[0] == '\0') return cur; if (cur) { curlen = strlen(cur); if (curlen) hasnewline = cur[curlen - 1] == '\n'; eol_seen = 0; } else curlen = 0; cstr = add; iscomment = 0; while (*cstr) { if (*cstr != ' ' && *cstr != '\t') break; ++cstr; } iscomment = (*cstr == '#'); len = strlen(add); endnewline = add[len - 1] == '\n'; insnewline = eol_seen || (curlen && !hasnewline); if (insnewline) len++; if (!iscomment) len++; if (!endnewline) len++; /* Allocate + 1 char for '\0' terminator. */ str = realloc(cur, curlen + len + 1); if (!str) return cur; cur = str; if (insnewline) cur[curlen++] = '\n'; if (!iscomment) cur[curlen++] = '#'; strcpy(cur + curlen, add); if (!endnewline) strcat(cur, "\n"); return cur; } Bool xf86getBoolValue(Bool *val, const char *str) { if (!val || !str) return FALSE; if (*str == '\0') { *val = TRUE; } else { if (xf86nameCompare(str, "1") == 0) *val = TRUE; else if (xf86nameCompare(str, "on") == 0) *val = TRUE; else if (xf86nameCompare(str, "true") == 0) *val = TRUE; else if (xf86nameCompare(str, "yes") == 0) *val = TRUE; else if (xf86nameCompare(str, "0") == 0) *val = FALSE; else if (xf86nameCompare(str, "off") == 0) *val = FALSE; else if (xf86nameCompare(str, "false") == 0) *val = FALSE; else if (xf86nameCompare(str, "no") == 0) *val = FALSE; else return FALSE; } return TRUE; } xorg-server-21.1.16/hw/xfree86/parser/write.c0000644000175000017500000001451214757411105014335 /* * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" #include #include #include #include #if defined(HAVE_SETEUID) && defined(_POSIX_SAVED_IDS) && _POSIX_SAVED_IDS > 0 #define HAS_SAVED_IDS_AND_SETEUID #endif #if defined(WIN32) #define HAS_NO_UIDS #endif static int doWriteConfigFile(const char *filename, XF86ConfigPtr cptr) { FILE *cf; if ((cf = fopen(filename, "w")) == NULL) { return 0; } if (cptr->conf_comment) fprintf(cf, "%s\n", cptr->conf_comment); xf86printLayoutSection(cf, cptr->conf_layout_lst); if (cptr->conf_files != NULL) { fprintf(cf, "Section \"Files\"\n"); xf86printFileSection(cf, cptr->conf_files); fprintf(cf, "EndSection\n\n"); } if (cptr->conf_modules != NULL) { fprintf(cf, "Section \"Module\"\n"); xf86printModuleSection(cf, cptr->conf_modules); fprintf(cf, "EndSection\n\n"); } xf86printVendorSection(cf, cptr->conf_vendor_lst); xf86printServerFlagsSection(cf, cptr->conf_flags); xf86printInputSection(cf, cptr->conf_input_lst); xf86printInputClassSection(cf, cptr->conf_inputclass_lst); xf86printOutputClassSection(cf, cptr->conf_outputclass_lst); xf86printVideoAdaptorSection(cf, cptr->conf_videoadaptor_lst); xf86printModesSection(cf, cptr->conf_modes_lst); xf86printMonitorSection(cf, cptr->conf_monitor_lst); xf86printDeviceSection(cf, cptr->conf_device_lst); xf86printScreenSection(cf, cptr->conf_screen_lst); xf86printDRISection(cf, cptr->conf_dri); xf86printExtensionsSection(cf, cptr->conf_extensions); fclose(cf); return 1; } int xf86writeConfigFile(const char *filename, XF86ConfigPtr cptr) { #ifndef HAS_NO_UIDS int ret; if (getuid() != geteuid()) { #if !defined(HAS_SAVED_IDS_AND_SETEUID) int pid, p; int status; void (*csig) (int); /* Need to fork to change ruid without losing euid */ csig = OsSignal(SIGCHLD, SIG_DFL); switch ((pid = fork())) { case -1: ErrorF("xf86writeConfigFile(): fork failed (%s)\n", strerror(errno)); return 0; case 0: /* child */ if (setuid(getuid()) == -1) FatalError("xf86writeConfigFile(): " "setuid failed(%s)\n", strerror(errno)); ret = doWriteConfigFile(filename, cptr); exit(ret); break; default: /* parent */ do { p = waitpid(pid, &status, 0); } while (p == -1 && errno == EINTR); } OsSignal(SIGCHLD, csig); if (p != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0) return 1; /* success */ else return 0; #else /* HAS_SAVED_IDS_AND_SETEUID */ int ruid, euid; ruid = getuid(); euid = geteuid(); if (seteuid(ruid) == -1) { ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n", ruid, strerror(errno)); return 0; } ret = doWriteConfigFile(filename, cptr); if (seteuid(euid) == -1) { ErrorF("xf86writeConfigFile(): seteuid(%d) failed (%s)\n", euid, strerror(errno)); } return ret; #endif /* HAS_SAVED_IDS_AND_SETEUID */ } else #endif /* !HAS_NO_UIDS */ return doWriteConfigFile(filename, cptr); } xorg-server-21.1.16/hw/xfree86/parser/DRI.c0000644000175000017500000000717614757411105013631 /* DRI.c -- DRI Section in XF86Config file * Created: Fri Mar 19 08:40:22 1999 by faith@precisioninsight.com * Revised: Thu Jun 17 16:08:05 1999 by faith@precisioninsight.com * * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 * PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. * * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec DRITab[] = { {ENDSECTION, "endsection"}, {GROUP, "group"}, {MODE, "mode"}, {-1, ""}, }; #define CLEANUP xf86freeDRI XF86ConfDRIPtr xf86parseDRISection(void) { int token; parsePrologue(XF86ConfDRIPtr, XF86ConfDRIRec); /* Zero is a valid value for this. */ ptr->dri_group = -1; while ((token = xf86getToken(DRITab)) != ENDSECTION) { switch (token) { case GROUP: if ((token = xf86getSubToken(&(ptr->dri_comment))) == STRING) ptr->dri_group_name = xf86_lex_val.str; else if (token == NUMBER) ptr->dri_group = xf86_lex_val.num; else Error(GROUP_MSG); break; case MODE: if (xf86getSubToken(&(ptr->dri_comment)) != NUMBER) Error(NUMBER_MSG, "Mode"); if (xf86_lex_val.numType != PARSE_OCTAL) Error(MUST_BE_OCTAL_MSG, xf86_lex_val.num); ptr->dri_mode = xf86_lex_val.num; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; case COMMENT: ptr->dri_comment = xf86addComment(ptr->dri_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG ErrorF("DRI section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printDRISection(FILE * cf, XF86ConfDRIPtr ptr) { if (ptr == NULL) return; fprintf(cf, "Section \"DRI\"\n"); if (ptr->dri_comment) fprintf(cf, "%s", ptr->dri_comment); if (ptr->dri_group_name) fprintf(cf, "\tGroup \"%s\"\n", ptr->dri_group_name); else if (ptr->dri_group >= 0) fprintf(cf, "\tGroup %d\n", ptr->dri_group); if (ptr->dri_mode) fprintf(cf, "\tMode 0%o\n", ptr->dri_mode); fprintf(cf, "EndSection\n\n"); } void xf86freeDRI(XF86ConfDRIPtr ptr) { if (ptr == NULL) return; TestFree(ptr->dri_comment); free(ptr); } xorg-server-21.1.16/hw/xfree86/parser/Extensions.c0000644000175000017500000000572714757411105015352 /* * Copyright 2004 Red Hat Inc., Raleigh, North Carolina. * * All Rights Reserved. * * 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 on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS * 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. */ /* * Authors: * Kevin E. Martin * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" static const xf86ConfigSymTabRec ExtensionsTab[] = { {ENDSECTION, "endsection"}, {OPTION, "option"}, {-1, ""}, }; #define CLEANUP xf86freeExtensions XF86ConfExtensionsPtr xf86parseExtensionsSection(void) { int token; parsePrologue(XF86ConfExtensionsPtr, XF86ConfExtensionsRec); while ((token = xf86getToken(ExtensionsTab)) != ENDSECTION) { switch (token) { case OPTION: ptr->ext_option_lst = xf86parseOption(ptr->ext_option_lst); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); break; case COMMENT: ptr->extensions_comment = xf86addComment(ptr->extensions_comment, xf86_lex_val.str); free(xf86_lex_val.str); xf86_lex_val.str = NULL; break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); break; } } #ifdef DEBUG ErrorF("Extensions section parsed\n"); #endif return ptr; } #undef CLEANUP void xf86printExtensionsSection(FILE * cf, XF86ConfExtensionsPtr ptr) { XF86OptionPtr p; if (ptr == NULL || ptr->ext_option_lst == NULL) return; p = ptr->ext_option_lst; fprintf(cf, "Section \"Extensions\"\n"); if (ptr->extensions_comment) fprintf(cf, "%s", ptr->extensions_comment); xf86printOptionList(cf, p, 1); fprintf(cf, "EndSection\n\n"); } void xf86freeExtensions(XF86ConfExtensionsPtr ptr) { if (ptr == NULL) return; xf86optionListFree(ptr->ext_option_lst); TestFree(ptr->extensions_comment); free(ptr); } xorg-server-21.1.16/hw/xfree86/parser/Configint.h0000644000175000017500000001745414757411105015140 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2002 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* * These definitions are used through out the configuration file parser, but * they should not be visible outside of the parser. */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _Configint_h_ #define _Configint_h_ #include #include #include #include #include "xf86Parser.h" typedef enum { PARSE_DECIMAL, PARSE_OCTAL, PARSE_HEX } ParserNumType; typedef struct { int num; /* returned number */ char *str; /* private copy of the return-string */ double realnum; /* returned number as a real */ ParserNumType numType; /* used to enforce correct number formatting */ } LexRec, *LexPtr; extern LexRec xf86_lex_val; #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif #include "configProcs.h" #include #define TestFree(a) if (a) { free ((void *) a); a = NULL; } #define parsePrologue(typeptr,typerec) typeptr ptr; \ if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return NULL; } #define HANDLE_RETURN(f,func)\ if ((ptr->f=func) == NULL)\ {\ CLEANUP (ptr);\ return NULL;\ } #define HANDLE_LIST(field,func,type)\ {\ type p = func ();\ if (p == NULL)\ {\ CLEANUP (ptr);\ return NULL;\ }\ else\ {\ ptr->field = (type) xf86addListItem ((glp) ptr->field, (glp) p);\ }\ } #define Error(...) do { \ xf86parseError (__VA_ARGS__); CLEANUP (ptr); return NULL; \ } while (0) /* * These are defines for error messages to promote consistency. * Error messages are preceded by the line number, section and file name, * so these messages should be about the specific keyword and syntax in error. * To help limit namespace pollution, end each with _MSG. * Limit messages to 70 characters if possible. */ #define BAD_OPTION_MSG \ "The Option keyword requires 1 or 2 quoted strings to follow it." #define INVALID_KEYWORD_MSG \ "\"%s\" is not a valid keyword in this section." #define INVALID_SECTION_MSG \ "\"%s\" is not a valid section name." #define UNEXPECTED_EOF_MSG \ "Unexpected EOF. Missing EndSection keyword?" #define QUOTE_MSG \ "The %s keyword requires a quoted string to follow it." #define NUMBER_MSG \ "The %s keyword requires a number to follow it." #define POSITIVE_INT_MSG \ "The %s keyword requires a positive integer to follow it." #define BOOL_MSG \ "The %s keyword requires a boolean to follow it." #define ZAXISMAPPING_MSG \ "The ZAxisMapping keyword requires 2 positive numbers or X or Y to follow it." #define DACSPEED_MSG \ "The DacSpeed keyword must be followed by a list of up to %d numbers." #define DISPLAYSIZE_MSG \ "The DisplaySize keyword must be followed by the width and height in mm." #define HORIZSYNC_MSG \ "The HorizSync keyword must be followed by a list of numbers or ranges." #define VERTREFRESH_MSG \ "The VertRefresh keyword must be followed by a list of numbers or ranges." #define VIEWPORT_MSG \ "The Viewport keyword must be followed by an X and Y value." #define VIRTUAL_MSG \ "The Virtual keyword must be followed by a width and height value." #define WEIGHT_MSG \ "The Weight keyword must be followed by red, green and blue values." #define BLACK_MSG \ "The Black keyword must be followed by red, green and blue values." #define WHITE_MSG \ "The White keyword must be followed by red, green and blue values." #define SCREEN_MSG \ "The Screen keyword must be followed by an optional number, a screen name\n" \ "\tin quotes, and optional position/layout information." #define INVALID_SCR_MSG \ "Invalid Screen line." #define INPUTDEV_MSG \ "The InputDevice keyword must be followed by an input device name in quotes." #define INACTIVE_MSG \ "The Inactive keyword must be followed by a Device name in quotes." #define UNDEFINED_SCREEN_MSG \ "Undefined Screen \"%s\" referenced by ServerLayout \"%s\"." #define UNDEFINED_MODES_MSG \ "Undefined Modes Section \"%s\" referenced by Monitor \"%s\"." #define UNDEFINED_DEVICE_MSG \ "Undefined Device \"%s\" referenced by Screen \"%s\"." #define UNDEFINED_ADAPTOR_MSG \ "Undefined VideoAdaptor \"%s\" referenced by Screen \"%s\"." #define ADAPTOR_REF_TWICE_MSG \ "VideoAdaptor \"%s\" already referenced by Screen \"%s\"." #define UNDEFINED_DEVICE_LAY_MSG \ "Undefined Device \"%s\" referenced by ServerLayout \"%s\"." #define UNDEFINED_INPUT_MSG \ "Undefined InputDevice \"%s\" referenced by ServerLayout \"%s\"." #define NO_IDENT_MSG \ "This section must have an Identifier line." #define ONLY_ONE_MSG \ "This section must have only one of either %s line." #define UNDEFINED_INPUTDRIVER_MSG \ "InputDevice section \"%s\" must have a Driver line." #define INVALID_GAMMA_MSG \ "gamma correction value(s) expected\n either one value or three r/g/b values." #define GROUP_MSG \ "The Group keyword must be followed by either a group name in quotes or\n" \ "\ta numerical group id." #define MULTIPLE_MSG \ "Multiple \"%s\" lines." #define MUST_BE_OCTAL_MSG \ "The number \"%d\" given in this section must be in octal (0xxx) format." #define GPU_DEVICE_TOO_MANY \ "More than %d GPU devices defined." /* Warning messages */ #define OBSOLETE_MSG \ "Ignoring obsolete keyword \"%s\"." #endif /* _Configint_h_ */ xorg-server-21.1.16/hw/xfree86/parser/configProcs.h0000644000175000017500000001241114757411105015460 /* * Copyright (c) 1997-2001 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* Private procs. Public procs are in xf86Parser.h and xf86Optrec.h */ /* exported functions are/were used by the X Server */ /* Device.c */ XF86ConfDevicePtr xf86parseDeviceSection(void); void xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr); void xf86freeDeviceList(XF86ConfDevicePtr ptr); int xf86validateDevice(XF86ConfigPtr p); /* Files.c */ XF86ConfFilesPtr xf86parseFilesSection(void); void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); void xf86freeFiles(XF86ConfFilesPtr p); /* Flags.c */ XF86ConfFlagsPtr xf86parseFlagsSection(void); void xf86printServerFlagsSection(FILE * f, XF86ConfFlagsPtr flags); void xf86freeFlags(XF86ConfFlagsPtr flags); /* Input.c */ XF86ConfInputPtr xf86parseInputSection(void); void xf86printInputSection(FILE * f, XF86ConfInputPtr ptr); void xf86freeInputList(XF86ConfInputPtr ptr); int xf86validateInput(XF86ConfigPtr p); /* InputClass.c */ XF86ConfInputClassPtr xf86parseInputClassSection(void); void xf86printInputClassSection(FILE * f, XF86ConfInputClassPtr ptr); /* OutputClass.c */ XF86ConfOutputClassPtr xf86parseOutputClassSection(void); void xf86printOutputClassSection(FILE * f, XF86ConfOutputClassPtr ptr); /* Layout.c */ XF86ConfLayoutPtr xf86parseLayoutSection(void); void xf86printLayoutSection(FILE * cf, XF86ConfLayoutPtr ptr); void xf86freeLayoutList(XF86ConfLayoutPtr ptr); int xf86validateLayout(XF86ConfigPtr p); /* Module.c */ XF86ConfModulePtr xf86parseModuleSection(void); void xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr); extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type, XF86OptionPtr opts); void xf86freeModules(XF86ConfModulePtr ptr); /* Monitor.c */ XF86ConfMonitorPtr xf86parseMonitorSection(void); XF86ConfModesPtr xf86parseModesSection(void); void xf86printMonitorSection(FILE * cf, XF86ConfMonitorPtr ptr); void xf86printModesSection(FILE * cf, XF86ConfModesPtr ptr); extern _X_EXPORT void xf86freeMonitorList(XF86ConfMonitorPtr ptr); void xf86freeModesList(XF86ConfModesPtr ptr); int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen); /* Pointer.c */ XF86ConfInputPtr xf86parsePointerSection(void); /* Screen.c */ XF86ConfScreenPtr xf86parseScreenSection(void); void xf86printScreenSection(FILE * cf, XF86ConfScreenPtr ptr); extern _X_EXPORT void xf86freeScreenList(XF86ConfScreenPtr ptr); int xf86validateScreen(XF86ConfigPtr p); /* Vendor.c */ XF86ConfVendorPtr xf86parseVendorSection(void); void xf86freeVendorList(XF86ConfVendorPtr p); void xf86printVendorSection(FILE * cf, XF86ConfVendorPtr ptr); /* Video.c */ XF86ConfVideoAdaptorPtr xf86parseVideoAdaptorSection(void); void xf86printVideoAdaptorSection(FILE * cf, XF86ConfVideoAdaptorPtr ptr); void xf86freeVideoAdaptorList(XF86ConfVideoAdaptorPtr ptr); /* scan.c */ int xf86getToken(const xf86ConfigSymTabRec * tab); int xf86getSubToken(char **comment); int xf86getSubTokenWithTab(char **comment, const xf86ConfigSymTabRec * tab); void xf86unGetToken(int token); char *xf86tokenString(void); void xf86parseError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); void xf86validationError(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); void xf86setSection(const char *section); int xf86getStringToken(const xf86ConfigSymTabRec * tab); /* write.c */ /* DRI.c */ XF86ConfDRIPtr xf86parseDRISection(void); void xf86printDRISection(FILE * cf, XF86ConfDRIPtr ptr); void xf86freeDRI(XF86ConfDRIPtr ptr); /* Extensions.c */ XF86ConfExtensionsPtr xf86parseExtensionsSection(void); void xf86printExtensionsSection(FILE * cf, XF86ConfExtensionsPtr ptr); void xf86freeExtensions(XF86ConfExtensionsPtr ptr); #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef HAVE_XORG_CONFIG_H /* Externally provided functions */ void ErrorF(const char *f, ...); void VErrorF(const char *f, va_list args); #endif xorg-server-21.1.16/hw/xfree86/parser/xf86tokens.h0000644000175000017500000001507314757411105015232 /* * * Copyright (c) 1997 Metro Link Incorporated * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 X CONSORTIUM 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 Metro Link shall not be * used in advertising or otherwise to promote the sale, use or other dealings * in this Software without prior written authorization from Metro Link. * */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _xf86_tokens_h #define _xf86_tokens_h /* Undefine symbols that some OSs might define */ #undef IOBASE /* * Each token should have a unique value regardless of the section * it is used in. */ typedef enum { /* errno-style tokens */ OBSOLETE_TOKEN = -5, EOF_TOKEN = -4, LOCK_TOKEN = -3, ERROR_TOKEN = -2, /* value type tokens */ NUMBER = 1, STRING, /* Tokens that can appear in many sections */ SECTION, SUBSECTION, ENDSECTION, ENDSUBSECTION, IDENTIFIER, VENDOR, DASH, COMMA, MATCHSEAT, OPTION, COMMENT, /* Frequency units */ HRZ, KHZ, MHZ, /* File tokens */ FONTPATH, MODULEPATH, LOGFILEPATH, XKBDIR, /* Server Flag tokens. These are deprecated in favour of generic Options */ DONTZAP, DONTZOOM, DISABLEVIDMODE, ALLOWNONLOCAL, DISABLEMODINDEV, MODINDEVALLOWNONLOCAL, ALLOWMOUSEOPENFAIL, BLANKTIME, STANDBYTIME, SUSPENDTIME, OFFTIME, DEFAULTLAYOUT, /* Monitor tokens */ MODEL, MODELINE, DISPLAYSIZE, HORIZSYNC, VERTREFRESH, MODE, GAMMA, USEMODES, /* Modes tokens */ /* no new ones */ /* Mode tokens */ DOTCLOCK, HTIMINGS, VTIMINGS, FLAGS, HSKEW, BCAST, VSCAN, ENDMODE, /* Screen tokens */ OBSDRIVER, MDEVICE, GDEVICE, MONITOR, SCREENNO, DEFAULTDEPTH, DEFAULTBPP, DEFAULTFBBPP, /* VideoAdaptor tokens */ VIDEOADAPTOR, /* Mode timing tokens */ TT_INTERLACE, TT_PHSYNC, TT_NHSYNC, TT_PVSYNC, TT_NVSYNC, TT_CSYNC, TT_PCSYNC, TT_NCSYNC, TT_DBLSCAN, TT_HSKEW, TT_BCAST, TT_VSCAN, /* Module tokens */ LOAD, LOAD_DRIVER, DISABLE, /* Device tokens */ DRIVER, CHIPSET, CLOCKS, VIDEORAM, BOARD, IOBASE, RAMDAC, DACSPEED, BIOSBASE, MEMBASE, CLOCKCHIP, CHIPID, CHIPREV, CARD, BUSID, IRQ, /* Keyboard tokens */ AUTOREPEAT, XLEDS, KPROTOCOL, XKBKEYMAP, XKBCOMPAT, XKBTYPES, XKBKEYCODES, XKBGEOMETRY, XKBSYMBOLS, XKBDISABLE, PANIX106, XKBRULES, XKBMODEL, XKBLAYOUT, XKBVARIANT, XKBOPTIONS, /* Obsolete keyboard tokens */ SERVERNUM, LEFTALT, RIGHTALT, SCROLLLOCK_TOK, RIGHTCTL, /* arguments for the above obsolete tokens */ CONF_KM_META, CONF_KM_COMPOSE, CONF_KM_MODESHIFT, CONF_KM_MODELOCK, CONF_KM_SCROLLLOCK, CONF_KM_CONTROL, /* Pointer tokens */ EMULATE3, BAUDRATE, SAMPLERATE, PRESOLUTION, CLEARDTR, CLEARRTS, CHORDMIDDLE, PROTOCOL, PDEVICE, EM3TIMEOUT, DEVICE_NAME, ALWAYSCORE, PBUTTONS, ZAXISMAPPING, /* Pointer Z axis mapping tokens */ XAXIS, YAXIS, /* Display tokens */ MODES, VIEWPORT, VIRTUAL, VISUAL, BLACK_TOK, WHITE_TOK, DEPTH, BPP, WEIGHT, /* Layout Tokens */ SCREEN, INACTIVE, INPUTDEVICE, /* Adjaceny Tokens */ RIGHTOF, LEFTOF, ABOVE, BELOW, RELATIVE, ABSOLUTE, /* Vendor Tokens */ VENDORNAME, /* DRI Tokens */ GROUP, /* InputClass Tokens */ MATCH_PRODUCT, MATCH_VENDOR, MATCH_DEVICE_PATH, MATCH_OS, MATCH_PNPID, MATCH_USBID, MATCH_DRIVER, MATCH_TAG, MATCH_LAYOUT, MATCH_IS_KEYBOARD, MATCH_IS_POINTER, MATCH_IS_JOYSTICK, MATCH_IS_TABLET, MATCH_IS_TABLET_PAD, MATCH_IS_TOUCHPAD, MATCH_IS_TOUCHSCREEN, NOMATCH_PRODUCT, NOMATCH_VENDOR, NOMATCH_DEVICE_PATH, NOMATCH_OS, NOMATCH_PNPID, NOMATCH_USBID, NOMATCH_DRIVER, NOMATCH_TAG, NOMATCH_LAYOUT, } ParserTokens; #endif /* _xf86_tokens_h */ xorg-server-21.1.16/hw/xfree86/ramdac/0000755000175000017500000000000014757411134013051 5xorg-server-21.1.16/hw/xfree86/ramdac/meson.build0000644000175000017500000000047214757411105015134 srcs_xorg_ramdac = [ 'xf86CursorRD.c', 'xf86HWCurs.c', ] xorg_ramdac = static_library('xorg_ramdac', srcs_xorg_ramdac, include_directories: [inc, xorg_inc], dependencies: common_dep, c_args: xorg_c_args, ) install_data( [ 'xf86Cursor.h', ], install_dir: xorgsdkdir, ) xorg-server-21.1.16/hw/xfree86/ramdac/Makefile.am0000644000175000017500000000034314757411105015023 noinst_LTLIBRARIES = libramdac.la libramdac_la_SOURCES = xf86CursorRD.c xf86HWCurs.c sdk_HEADERS = xf86Cursor.h EXTRA_DIST = xf86CursorPriv.h CURSOR.NOTES AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) xorg-server-21.1.16/hw/xfree86/ramdac/xf86Cursor.h0000644000175000017500000000664314757411105015142 #ifndef _XF86CURSOR_H #define _XF86CURSOR_H #include "xf86str.h" #include "mipointer.h" typedef struct _xf86CursorInfoRec { ScrnInfoPtr pScrn; int Flags; int MaxWidth; int MaxHeight; void (*SetCursorColors) (ScrnInfoPtr pScrn, int bg, int fg); void (*SetCursorPosition) (ScrnInfoPtr pScrn, int x, int y); void (*LoadCursorImage) (ScrnInfoPtr pScrn, unsigned char *bits); Bool (*LoadCursorImageCheck) (ScrnInfoPtr pScrn, unsigned char *bits); void (*HideCursor) (ScrnInfoPtr pScrn); void (*ShowCursor) (ScrnInfoPtr pScrn); Bool (*ShowCursorCheck) (ScrnInfoPtr pScrn); unsigned char *(*RealizeCursor) (struct _xf86CursorInfoRec *, CursorPtr); Bool (*UseHWCursor) (ScreenPtr, CursorPtr); Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr); void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr); Bool (*LoadCursorARGBCheck) (ScrnInfoPtr, CursorPtr); } xf86CursorInfoRec, *xf86CursorInfoPtr; static inline Bool xf86DriverHasLoadCursorImage(xf86CursorInfoPtr infoPtr) { return infoPtr->LoadCursorImageCheck || infoPtr->LoadCursorImage; } static inline Bool xf86DriverLoadCursorImage(xf86CursorInfoPtr infoPtr, unsigned char *bits) { if(infoPtr->LoadCursorImageCheck) return infoPtr->LoadCursorImageCheck(infoPtr->pScrn, bits); infoPtr->LoadCursorImage(infoPtr->pScrn, bits); return TRUE; } static inline Bool xf86DriverHasShowCursor(xf86CursorInfoPtr infoPtr) { return infoPtr->ShowCursorCheck || infoPtr->ShowCursor; } static inline Bool xf86DriverShowCursor(xf86CursorInfoPtr infoPtr) { if(infoPtr->ShowCursorCheck) return infoPtr->ShowCursorCheck(infoPtr->pScrn); infoPtr->ShowCursor(infoPtr->pScrn); return TRUE; } static inline Bool xf86DriverHasLoadCursorARGB(xf86CursorInfoPtr infoPtr) { return infoPtr->LoadCursorARGBCheck || infoPtr->LoadCursorARGB; } static inline Bool xf86DriverLoadCursorARGB(xf86CursorInfoPtr infoPtr, CursorPtr pCursor) { if(infoPtr->LoadCursorARGBCheck) return infoPtr->LoadCursorARGBCheck(infoPtr->pScrn, pCursor); infoPtr->LoadCursorARGB(infoPtr->pScrn, pCursor); return TRUE; } extern _X_EXPORT Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); extern _X_EXPORT xf86CursorInfoPtr xf86CreateCursorInfoRec(void); extern _X_EXPORT void xf86DestroyCursorInfoRec(xf86CursorInfoPtr); extern _X_EXPORT void xf86CursorResetCursor(ScreenPtr pScreen); extern _X_EXPORT void xf86ForceHWCursor(ScreenPtr pScreen, Bool on); extern _X_EXPORT CursorPtr xf86CurrentCursor(ScreenPtr pScreen); #define HARDWARE_CURSOR_INVERT_MASK 0x00000001 #define HARDWARE_CURSOR_AND_SOURCE_WITH_MASK 0x00000002 #define HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK 0x00000004 #define HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED 0x00000008 #define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 0x00000010 #define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 0x00000020 #define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 0x00000040 #define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 0x00000080 #define HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 0x00000100 #define HARDWARE_CURSOR_TRUECOLOR_AT_8BPP 0x00000200 #define HARDWARE_CURSOR_BIT_ORDER_MSBFIRST 0x00000400 #define HARDWARE_CURSOR_NIBBLE_SWAPPED 0x00000800 #define HARDWARE_CURSOR_SHOW_TRANSPARENT 0x00001000 #define HARDWARE_CURSOR_UPDATE_UNHIDDEN 0x00002000 #define HARDWARE_CURSOR_ARGB 0x00004000 #endif /* _XF86CURSOR_H */ xorg-server-21.1.16/hw/xfree86/ramdac/Makefile.in0000644000175000017500000006564414757411115015054 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/ramdac ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libramdac_la_LIBADD = am_libramdac_la_OBJECTS = xf86CursorRD.lo xf86HWCurs.lo libramdac_la_OBJECTS = $(am_libramdac_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xf86CursorRD.Plo \ ./$(DEPDIR)/xf86HWCurs.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libramdac_la_SOURCES) DIST_SOURCES = $(libramdac_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libramdac.la libramdac_la_SOURCES = xf86CursorRD.c xf86HWCurs.c sdk_HEADERS = xf86Cursor.h EXTRA_DIST = xf86CursorPriv.h CURSOR.NOTES AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) AM_CPPFLAGS = $(XORG_INCS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/ramdac/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/ramdac/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libramdac.la: $(libramdac_la_OBJECTS) $(libramdac_la_DEPENDENCIES) $(EXTRA_libramdac_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libramdac_la_OBJECTS) $(libramdac_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86CursorRD.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86HWCurs.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xf86CursorRD.Plo -rm -f ./$(DEPDIR)/xf86HWCurs.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xf86CursorRD.Plo -rm -f ./$(DEPDIR)/xf86HWCurs.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/ramdac/xf86CursorRD.c0000644000175000017500000004141314757411105015355 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86.h" #include "xf86CursorPriv.h" #include "colormapst.h" #include "cursorstr.h" /* FIXME: This was added with the ABI change of the miPointerSpriteFuncs for * MPX. * inputInfo is needed to pass the core pointer as the default argument into * the cursor functions. * * Externing inputInfo is not the nice way to do it but it works. */ #include "inputstr.h" DevPrivateKeyRec xf86CursorScreenKeyRec; /* sprite functions */ static Bool xf86CursorRealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); static Bool xf86CursorUnrealizeCursor(DeviceIntPtr, ScreenPtr, CursorPtr); static void xf86CursorSetCursor(DeviceIntPtr, ScreenPtr, CursorPtr, int, int); static void xf86CursorMoveCursor(DeviceIntPtr, ScreenPtr, int, int); static Bool xf86DeviceCursorInitialize(DeviceIntPtr, ScreenPtr); static void xf86DeviceCursorCleanup(DeviceIntPtr, ScreenPtr); static miPointerSpriteFuncRec xf86CursorSpriteFuncs = { xf86CursorRealizeCursor, xf86CursorUnrealizeCursor, xf86CursorSetCursor, xf86CursorMoveCursor, xf86DeviceCursorInitialize, xf86DeviceCursorCleanup }; /* Screen functions */ static void xf86CursorInstallColormap(ColormapPtr); static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr, CursorPtr, Bool); static Bool xf86CursorCloseScreen(ScreenPtr); static void xf86CursorQueryBestSize(int, unsigned short *, unsigned short *, ScreenPtr); /* ScrnInfoRec functions */ static void xf86CursorEnableDisableFBAccess(ScrnInfoPtr, Bool); static Bool xf86CursorSwitchMode(ScrnInfoPtr, DisplayModePtr); Bool xf86InitCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CursorScreenPtr ScreenPriv; miPointerScreenPtr PointPriv; if (!xf86InitHardwareCursor(pScreen, infoPtr)) return FALSE; if (!dixRegisterPrivateKey(&xf86CursorScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; ScreenPriv = calloc(1, sizeof(xf86CursorScreenRec)); if (!ScreenPriv) return FALSE; dixSetPrivate(&pScreen->devPrivates, xf86CursorScreenKey, ScreenPriv); ScreenPriv->SWCursor = TRUE; ScreenPriv->isUp = FALSE; ScreenPriv->CurrentCursor = NULL; ScreenPriv->CursorInfoPtr = infoPtr; ScreenPriv->PalettedCursor = FALSE; ScreenPriv->pInstalledMap = NULL; ScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86CursorCloseScreen; ScreenPriv->QueryBestSize = pScreen->QueryBestSize; pScreen->QueryBestSize = xf86CursorQueryBestSize; ScreenPriv->RecolorCursor = pScreen->RecolorCursor; pScreen->RecolorCursor = xf86CursorRecolorCursor; if ((infoPtr->pScrn->bitsPerPixel == 8) && !(infoPtr->Flags & HARDWARE_CURSOR_TRUECOLOR_AT_8BPP)) { ScreenPriv->InstallColormap = pScreen->InstallColormap; pScreen->InstallColormap = xf86CursorInstallColormap; ScreenPriv->PalettedCursor = TRUE; } PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->showTransparent = PointPriv->showTransparent; if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) PointPriv->showTransparent = TRUE; else PointPriv->showTransparent = FALSE; ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs = &xf86CursorSpriteFuncs; ScreenPriv->EnableDisableFBAccess = pScrn->EnableDisableFBAccess; ScreenPriv->SwitchMode = pScrn->SwitchMode; ScreenPriv->ForceHWCursorCount = 0; ScreenPriv->HWCursorForced = FALSE; pScrn->EnableDisableFBAccess = xf86CursorEnableDisableFBAccess; if (pScrn->SwitchMode) pScrn->SwitchMode = xf86CursorSwitchMode; return TRUE; } /***** Screen functions *****/ static Bool xf86CursorCloseScreen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); miPointerScreenPtr PointPriv = (miPointerScreenPtr) dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (ScreenPriv->isUp && pScrn->vtSema) xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); if (ScreenPriv->CurrentCursor) FreeCursor(ScreenPriv->CurrentCursor, None); pScreen->CloseScreen = ScreenPriv->CloseScreen; pScreen->QueryBestSize = ScreenPriv->QueryBestSize; pScreen->RecolorCursor = ScreenPriv->RecolorCursor; if (ScreenPriv->InstallColormap) pScreen->InstallColormap = ScreenPriv->InstallColormap; PointPriv->spriteFuncs = ScreenPriv->spriteFuncs; PointPriv->showTransparent = ScreenPriv->showTransparent; pScrn->EnableDisableFBAccess = ScreenPriv->EnableDisableFBAccess; pScrn->SwitchMode = ScreenPriv->SwitchMode; free(ScreenPriv->transparentData); free(ScreenPriv); return (*pScreen->CloseScreen) (pScreen); } static void xf86CursorQueryBestSize(int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (class == CursorShape) { if (*width > ScreenPriv->CursorInfoPtr->MaxWidth) *width = ScreenPriv->CursorInfoPtr->MaxWidth; if (*height > ScreenPriv->CursorInfoPtr->MaxHeight) *height = ScreenPriv->CursorInfoPtr->MaxHeight; } else (*ScreenPriv->QueryBestSize) (class, width, height, pScreen); } static void xf86CursorInstallColormap(ColormapPtr pMap) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pMap->pScreen->devPrivates, xf86CursorScreenKey); ScreenPriv->pInstalledMap = pMap; (*ScreenPriv->InstallColormap) (pMap); } static void xf86CursorRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (!displayed) return; if (ScreenPriv->SWCursor) (*ScreenPriv->RecolorCursor) (pDev, pScreen, pCurs, displayed); else xf86RecolorCursor(pScreen, pCurs, displayed); } /***** ScrnInfoRec functions *********/ static void xf86CursorEnableDisableFBAccess(ScrnInfoPtr pScrn, Bool enable) { DeviceIntPtr pDev = inputInfo.pointer; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (!enable && ScreenPriv->CurrentCursor != NullCursor) { CursorPtr currentCursor = RefCursor(ScreenPriv->CurrentCursor); xf86CursorSetCursor(pDev, pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); ScreenPriv->isUp = FALSE; ScreenPriv->SWCursor = TRUE; ScreenPriv->SavedCursor = currentCursor; } if (ScreenPriv->EnableDisableFBAccess) (*ScreenPriv->EnableDisableFBAccess) (pScrn, enable); if (enable && ScreenPriv->SavedCursor) { /* * Re-set current cursor so drivers can react to FB access having been * temporarily disabled. */ xf86CursorSetCursor(pDev, pScreen, ScreenPriv->SavedCursor, ScreenPriv->x, ScreenPriv->y); UnrefCursor(ScreenPriv->SavedCursor); ScreenPriv->SavedCursor = NULL; } } static Bool xf86CursorSwitchMode(ScrnInfoPtr pScrn, DisplayModePtr mode) { Bool ret; ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); ScreenPriv->isUp = FALSE; } ret = (*ScreenPriv->SwitchMode) (pScrn, mode); /* * Cannot restore cursor here because the new frame[XY][01] haven't been * calculated yet. However, because the hardware cursor was removed above, * ensure the cursor is repainted by miPointerWarpCursor(). */ ScreenPriv->CursorToRestore = ScreenPriv->CurrentCursor; miPointerSetWaitForUpdate(pScreen, FALSE); /* Force cursor repaint */ return ret; } /****** miPointerSpriteFunctions *******/ static Bool xf86CursorRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (CursorRefCount(pCurs) <= 1) dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, NULL); return (*ScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCurs); } static Bool xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (CursorRefCount(pCurs) <= 1) { free(dixLookupScreenPrivate (&pCurs->devPrivates, CursorScreenKey, pScreen)); dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, NULL); } return (*ScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCurs); } static void xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ if (ScreenPriv->SWCursor || !(GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer)) (*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, NullCursor, x, y); else if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; } if (ScreenPriv->CurrentCursor) FreeCursor(ScreenPriv->CurrentCursor, None); ScreenPriv->CurrentCursor = NullCursor; return; } /* only update for VCP, otherwise we get cursor jumps when removing a sprite. The second cursor is never HW rendered anyway. */ if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer) { CursorPtr cursor = RefCursor(pCurs); if (ScreenPriv->CurrentCursor) FreeCursor(ScreenPriv->CurrentCursor, None); ScreenPriv->CurrentCursor = cursor; ScreenPriv->x = x; ScreenPriv->y = y; ScreenPriv->CursorToRestore = NULL; ScreenPriv->HotX = cursor->bits->xhot; ScreenPriv->HotY = cursor->bits->yhot; if (!infoPtr->pScrn->vtSema) { cursor = RefCursor(cursor); if (ScreenPriv->SavedCursor) FreeCursor(ScreenPriv->SavedCursor, None); ScreenPriv->SavedCursor = cursor; return; } if (infoPtr->pScrn->vtSema && (ScreenPriv->ForceHWCursorCount || xf86CheckHWCursor(pScreen, cursor, infoPtr))) { if (ScreenPriv->SWCursor) /* remove the SW cursor */ (*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, NullCursor, x, y); if (xf86SetCursor(pScreen, cursor, x, y)) { ScreenPriv->SWCursor = FALSE; ScreenPriv->isUp = TRUE; miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse); return; } } miPointerSetWaitForUpdate(pScreen, TRUE); if (ScreenPriv->isUp) { /* Remove the HW cursor, or make it transparent */ if (infoPtr->Flags & HARDWARE_CURSOR_SHOW_TRANSPARENT) { xf86SetTransparentCursor(pScreen); } else { xf86SetCursor(pScreen, NullCursor, x, y); ScreenPriv->isUp = FALSE; } } if (!ScreenPriv->SWCursor) ScreenPriv->SWCursor = TRUE; } if (pCurs->bits->emptyMask && !ScreenPriv->showTransparent) pCurs = NullCursor; (*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCurs, x, y); } /* Re-set the current cursor. This will switch between hardware and software * cursor depending on whether hardware cursor is currently supported * according to the driver. */ void xf86CursorResetCursor(ScreenPtr pScreen) { xf86CursorScreenPtr ScreenPriv; if (!inputInfo.pointer) return; if (!dixPrivateKeyRegistered(xf86CursorScreenKey)) return; ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (!ScreenPriv) return; xf86CursorSetCursor(inputInfo.pointer, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } static void xf86CursorMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); /* only update coordinate state for first sprite, otherwise we get jumps when removing a sprite. The second sprite is never HW rendered anyway */ if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer) { ScreenPriv->x = x; ScreenPriv->y = y; if (ScreenPriv->CursorToRestore) xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CursorToRestore, x, y); else if (ScreenPriv->SWCursor) (*ScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); else if (ScreenPriv->isUp) xf86MoveCursor(pScreen, x, y); } else (*ScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } void xf86ForceHWCursor(ScreenPtr pScreen, Bool on) { DeviceIntPtr pDev = inputInfo.pointer; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); if (on) { if (ScreenPriv->ForceHWCursorCount++ == 0) { if (ScreenPriv->SWCursor && ScreenPriv->CurrentCursor) { ScreenPriv->HWCursorForced = TRUE; xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } else ScreenPriv->HWCursorForced = FALSE; } } else { if (--ScreenPriv->ForceHWCursorCount == 0) { if (ScreenPriv->HWCursorForced && ScreenPriv->CurrentCursor) xf86CursorSetCursor(pDev, pScreen, ScreenPriv->CurrentCursor, ScreenPriv->x, ScreenPriv->y); } } } CursorPtr xf86CurrentCursor(ScreenPtr pScreen) { xf86CursorScreenPtr ScreenPriv; if (pScreen->is_output_secondary) pScreen = pScreen->current_primary; ScreenPriv = dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); return ScreenPriv->CurrentCursor; } xf86CursorInfoPtr xf86CreateCursorInfoRec(void) { return calloc(1, sizeof(xf86CursorInfoRec)); } void xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr) { free(infoPtr); } /** * New cursor has been created. Do your initalizations here. */ static Bool xf86DeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { int ret; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); /* Init SW cursor */ ret = (*ScreenPriv->spriteFuncs->DeviceCursorInitialize) (pDev, pScreen); return ret; } /** * Cursor has been removed. Clean up after yourself. */ static void xf86DeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); /* Clean up SW cursor */ (*ScreenPriv->spriteFuncs->DeviceCursorCleanup) (pDev, pScreen); } xorg-server-21.1.16/hw/xfree86/ramdac/xf86HWCurs.c0000644000175000017500000004632714757411105015036 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "xf86str.h" #include "cursorstr.h" #include "mi.h" #include "mipointer.h" #include "randrstr.h" #include "xf86CursorPriv.h" #include "servermd.h" static void xf86RecolorCursor_locked(xf86CursorScreenPtr ScreenPriv, CursorPtr pCurs); static CARD32 xf86ReverseBitOrder(CARD32 v) { return (((0x01010101 & v) << 7) | ((0x02020202 & v) << 5) | ((0x04040404 & v) << 3) | ((0x08080808 & v) << 1) | ((0x10101010 & v) >> 1) | ((0x20202020 & v) >> 3) | ((0x40404040 & v) >> 5) | ((0x80808080 & v) >> 7)); } #if BITMAP_SCANLINE_PAD == 64 #if 1 /* Cursors might be only 32 wide. Give'em a chance */ #define SCANLINE CARD32 #define CUR_BITMAP_SCANLINE_PAD 32 #define CUR_LOG2_BITMAP_PAD 5 #define REVERSE_BIT_ORDER(w) xf86ReverseBitOrder(w) #else #define SCANLINE CARD64 #define CUR_BITMAP_SCANLINE_PAD BITMAP_SCANLINE_PAD #define CUR_LOG2_BITMAP_PAD LOG2_BITMAP_PAD #define REVERSE_BIT_ORDER(w) xf86CARD64ReverseBits(w) static CARD64 xf86CARD64ReverseBits(CARD64 w); static CARD64 xf86CARD64ReverseBits(CARD64 w) { unsigned char *p = (unsigned char *) &w; p[0] = byte_reversed[p[0]]; p[1] = byte_reversed[p[1]]; p[2] = byte_reversed[p[2]]; p[3] = byte_reversed[p[3]]; p[4] = byte_reversed[p[4]]; p[5] = byte_reversed[p[5]]; p[6] = byte_reversed[p[6]]; p[7] = byte_reversed[p[7]]; return w; } #endif #else #define SCANLINE CARD32 #define CUR_BITMAP_SCANLINE_PAD BITMAP_SCANLINE_PAD #define CUR_LOG2_BITMAP_PAD LOG2_BITMAP_PAD #define REVERSE_BIT_ORDER(w) xf86ReverseBitOrder(w) #endif /* BITMAP_SCANLINE_PAD == 64 */ static unsigned char *RealizeCursorInterleave0(xf86CursorInfoPtr, CursorPtr); static unsigned char *RealizeCursorInterleave1(xf86CursorInfoPtr, CursorPtr); static unsigned char *RealizeCursorInterleave8(xf86CursorInfoPtr, CursorPtr); static unsigned char *RealizeCursorInterleave16(xf86CursorInfoPtr, CursorPtr); static unsigned char *RealizeCursorInterleave32(xf86CursorInfoPtr, CursorPtr); static unsigned char *RealizeCursorInterleave64(xf86CursorInfoPtr, CursorPtr); Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) { if ((infoPtr->MaxWidth <= 0) || (infoPtr->MaxHeight <= 0)) return FALSE; /* These are required for now */ if (!infoPtr->SetCursorPosition || !xf86DriverHasLoadCursorImage(infoPtr) || !infoPtr->HideCursor || !xf86DriverHasShowCursor(infoPtr) || !infoPtr->SetCursorColors) return FALSE; if (infoPtr->RealizeCursor) { /* Don't overwrite a driver provided Realize Cursor function */ } else if (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 & infoPtr->Flags) { infoPtr->RealizeCursor = RealizeCursorInterleave1; } else if (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 & infoPtr->Flags) { infoPtr->RealizeCursor = RealizeCursorInterleave8; } else if (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 & infoPtr->Flags) { infoPtr->RealizeCursor = RealizeCursorInterleave16; } else if (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 & infoPtr->Flags) { infoPtr->RealizeCursor = RealizeCursorInterleave32; } else if (HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 & infoPtr->Flags) { infoPtr->RealizeCursor = RealizeCursorInterleave64; } else { /* not interleaved */ infoPtr->RealizeCursor = RealizeCursorInterleave0; } infoPtr->pScrn = xf86ScreenToScrn(pScreen); return TRUE; } static Bool xf86ScreenCheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr) { return (cursor->bits->argb && infoPtr->UseHWCursorARGB && infoPtr->UseHWCursorARGB(pScreen, cursor)) || (cursor->bits->argb == 0 && cursor->bits->height <= infoPtr->MaxHeight && cursor->bits->width <= infoPtr->MaxWidth && (!infoPtr->UseHWCursor || infoPtr->UseHWCursor(pScreen, cursor))); } Bool xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr) { ScreenPtr pSlave; Bool use_hw_cursor = TRUE; input_lock(); if (!xf86ScreenCheckHWCursor(pScreen, cursor, infoPtr)) { use_hw_cursor = FALSE; goto unlock; } /* ask each driver consuming a pixmap if it can support HW cursor */ xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) { xf86CursorScreenPtr sPriv; if (!RRHasScanoutPixmap(pSlave)) continue; sPriv = dixLookupPrivate(&pSlave->devPrivates, xf86CursorScreenKey); if (!sPriv) { /* NULL if Option "SWCursor", possibly other conditions */ use_hw_cursor = FALSE; break; } /* FALSE if HWCursor not supported by secondary */ if (!xf86ScreenCheckHWCursor(pSlave, cursor, sPriv->CursorInfoPtr)) { use_hw_cursor = FALSE; break; } } unlock: input_unlock(); return use_hw_cursor; } static Bool xf86ScreenSetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr; unsigned char *bits; if (!ScreenPriv) { /* NULL if Option "SWCursor" */ return (pCurs == NullCursor); } infoPtr = ScreenPriv->CursorInfoPtr; if (pCurs == NullCursor) { (*infoPtr->HideCursor) (infoPtr->pScrn); return TRUE; } /* * Hot plugged GPU's do not have a CursorScreenKey, force sw cursor. * This check can be removed once dix/privates.c gets relocation code for * PRIVATE_CURSOR. Also see the related comment in AddGPUScreen(). */ if (!_dixGetScreenPrivateKey(CursorScreenKey, pScreen)) return FALSE; bits = dixLookupScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen); x -= infoPtr->pScrn->frameX0; y -= infoPtr->pScrn->frameY0; if (!pCurs->bits->argb || !xf86DriverHasLoadCursorARGB(infoPtr)) if (!bits) { bits = (*infoPtr->RealizeCursor) (infoPtr, pCurs); dixSetScreenPrivate(&pCurs->devPrivates, CursorScreenKey, pScreen, bits); } if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) (*infoPtr->HideCursor) (infoPtr->pScrn); if (pCurs->bits->argb && xf86DriverHasLoadCursorARGB(infoPtr)) { if (!xf86DriverLoadCursorARGB (infoPtr, pCurs)) return FALSE; } else if (bits) if (!xf86DriverLoadCursorImage (infoPtr, bits)) return FALSE; xf86RecolorCursor_locked (ScreenPriv, pCurs); (*infoPtr->SetCursorPosition) (infoPtr->pScrn, x, y); return xf86DriverShowCursor(infoPtr); } Bool xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); ScreenPtr pSlave; Bool ret = FALSE; input_lock(); x -= ScreenPriv->HotX; y -= ScreenPriv->HotY; if (!xf86ScreenSetCursor(pScreen, pCurs, x, y)) goto out; /* ask each secondary driver to set the cursor. */ xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) { if (!RRHasScanoutPixmap(pSlave)) continue; if (!xf86ScreenSetCursor(pSlave, pCurs, x, y)) { /* * hide the primary (and successfully set secondary) cursors, * otherwise both the hw and sw cursor will show. */ xf86SetCursor(pScreen, NullCursor, x, y); goto out; } } ret = TRUE; out: input_unlock(); return ret; } void xf86SetTransparentCursor(ScreenPtr pScreen) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; input_lock(); if (!ScreenPriv->transparentData) ScreenPriv->transparentData = (*infoPtr->RealizeCursor) (infoPtr, NullCursor); if (!(infoPtr->Flags & HARDWARE_CURSOR_UPDATE_UNHIDDEN)) (*infoPtr->HideCursor) (infoPtr->pScrn); if (ScreenPriv->transparentData) xf86DriverLoadCursorImage (infoPtr, ScreenPriv->transparentData); xf86DriverShowCursor(infoPtr); input_unlock(); } static void xf86ScreenMoveCursor(ScreenPtr pScreen, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; x -= infoPtr->pScrn->frameX0; y -= infoPtr->pScrn->frameY0; (*infoPtr->SetCursorPosition) (infoPtr->pScrn, x, y); } void xf86MoveCursor(ScreenPtr pScreen, int x, int y) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); ScreenPtr pSlave; input_lock(); x -= ScreenPriv->HotX; y -= ScreenPriv->HotY; xf86ScreenMoveCursor(pScreen, x, y); /* ask each secondary driver to move the cursor */ xorg_list_for_each_entry(pSlave, &pScreen->secondary_list, secondary_head) { if (!RRHasScanoutPixmap(pSlave)) continue; xf86ScreenMoveCursor(pSlave, x, y); } input_unlock(); } static void xf86RecolorCursor_locked(xf86CursorScreenPtr ScreenPriv, CursorPtr pCurs) { xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; /* recoloring isn't applicable to ARGB cursors and drivers shouldn't have to ignore SetCursorColors requests */ if (pCurs->bits->argb) return; if (ScreenPriv->PalettedCursor) { xColorItem sourceColor, maskColor; ColormapPtr pmap = ScreenPriv->pInstalledMap; if (!pmap) return; sourceColor.red = pCurs->foreRed; sourceColor.green = pCurs->foreGreen; sourceColor.blue = pCurs->foreBlue; FakeAllocColor(pmap, &sourceColor); maskColor.red = pCurs->backRed; maskColor.green = pCurs->backGreen; maskColor.blue = pCurs->backBlue; FakeAllocColor(pmap, &maskColor); FakeFreeColor(pmap, sourceColor.pixel); FakeFreeColor(pmap, maskColor.pixel); (*infoPtr->SetCursorColors) (infoPtr->pScrn, maskColor.pixel, sourceColor.pixel); } else { /* Pass colors in 8-8-8 RGB format */ (*infoPtr->SetCursorColors) (infoPtr->pScrn, (pCurs->backBlue >> 8) | ((pCurs->backGreen >> 8) << 8) | ((pCurs->backRed >> 8) << 16), (pCurs->foreBlue >> 8) | ((pCurs->foreGreen >> 8) << 8) | ((pCurs->foreRed >> 8) << 16) ); } } void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed) { xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CursorScreenKey); input_lock(); xf86RecolorCursor_locked (ScreenPriv, pCurs); input_unlock(); } /* These functions assume that MaxWidth is a multiple of 32 */ static unsigned char * RealizeCursorInterleave0(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { SCANLINE *SrcS, *SrcM, *DstS, *DstM; SCANLINE *pSrc, *pMsk; unsigned char *mem; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; int SrcPitch, DstPitch, Pitch, y, x; /* how many words are in the source or mask */ int words = size / (CUR_BITMAP_SCANLINE_PAD / 4); if (!(mem = calloc(1, size))) return NULL; if (pCurs == NullCursor) { if (infoPtr->Flags & HARDWARE_CURSOR_INVERT_MASK) { DstM = (SCANLINE *) mem; if (!(infoPtr->Flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK)) DstM += words; memset(DstM, -1, words * sizeof(SCANLINE)); } return mem; } /* SrcPitch == the number of scanlines wide the cursor image is */ SrcPitch = (pCurs->bits->width + (BITMAP_SCANLINE_PAD - 1)) >> CUR_LOG2_BITMAP_PAD; /* DstPitch is the width of the hw cursor in scanlines */ DstPitch = infoPtr->MaxWidth >> CUR_LOG2_BITMAP_PAD; Pitch = SrcPitch < DstPitch ? SrcPitch : DstPitch; SrcS = (SCANLINE *) pCurs->bits->source; SrcM = (SCANLINE *) pCurs->bits->mask; DstS = (SCANLINE *) mem; DstM = DstS + words; if (infoPtr->Flags & HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK) { SCANLINE *tmp; tmp = DstS; DstS = DstM; DstM = tmp; } if (infoPtr->Flags & HARDWARE_CURSOR_AND_SOURCE_WITH_MASK) { for (y = pCurs->bits->height, pSrc = DstS, pMsk = DstM; y--; pSrc += DstPitch, pMsk += DstPitch, SrcS += SrcPitch, SrcM += SrcPitch) { for (x = 0; x < Pitch; x++) { pSrc[x] = SrcS[x] & SrcM[x]; pMsk[x] = SrcM[x]; } } } else { for (y = pCurs->bits->height, pSrc = DstS, pMsk = DstM; y--; pSrc += DstPitch, pMsk += DstPitch, SrcS += SrcPitch, SrcM += SrcPitch) { for (x = 0; x < Pitch; x++) { pSrc[x] = SrcS[x]; pMsk[x] = SrcM[x]; } } } if (infoPtr->Flags & HARDWARE_CURSOR_NIBBLE_SWAPPED) { int count = size; unsigned char *pntr1 = (unsigned char *) DstS; unsigned char *pntr2 = (unsigned char *) DstM; unsigned char a, b; while (count) { a = *pntr1; b = *pntr2; *pntr1 = ((a & 0xF0) >> 4) | ((a & 0x0F) << 4); *pntr2 = ((b & 0xF0) >> 4) | ((b & 0x0F) << 4); pntr1++; pntr2++; count -= 2; } } /* * Must be _after_ HARDWARE_CURSOR_AND_SOURCE_WITH_MASK to avoid wiping * out entire source mask. */ if (infoPtr->Flags & HARDWARE_CURSOR_INVERT_MASK) { int count = words; SCANLINE *pntr = DstM; while (count--) { *pntr = ~(*pntr); pntr++; } } if (infoPtr->Flags & HARDWARE_CURSOR_BIT_ORDER_MSBFIRST) { for (y = pCurs->bits->height, pSrc = DstS, pMsk = DstM; y--; pSrc += DstPitch, pMsk += DstPitch) { for (x = 0; x < Pitch; x++) { pSrc[x] = REVERSE_BIT_ORDER(pSrc[x]); pMsk[x] = REVERSE_BIT_ORDER(pMsk[x]); } } } return mem; } static unsigned char * RealizeCursorInterleave1(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { unsigned char *DstS, *DstM; unsigned char *pntr; unsigned char *mem, *mem2; int count; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; /* Realize the cursor without interleaving */ if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; if (!(mem = calloc(1, size))) { free(mem2); return NULL; } /* 1 bit interleave */ DstS = mem2; DstM = DstS + (size >> 1); pntr = mem; count = size; while (count) { *pntr++ = ((*DstS & 0x01)) | ((*DstM & 0x01) << 1) | ((*DstS & 0x02) << 1) | ((*DstM & 0x02) << 2) | ((*DstS & 0x04) << 2) | ((*DstM & 0x04) << 3) | ((*DstS & 0x08) << 3) | ((*DstM & 0x08) << 4); *pntr++ = ((*DstS & 0x10) >> 4) | ((*DstM & 0x10) >> 3) | ((*DstS & 0x20) >> 3) | ((*DstM & 0x20) >> 2) | ((*DstS & 0x40) >> 2) | ((*DstM & 0x40) >> 1) | ((*DstS & 0x80) >> 1) | ((*DstM & 0x80)); DstS++; DstM++; count -= 2; } /* Free the uninterleaved cursor */ free(mem2); return mem; } static unsigned char * RealizeCursorInterleave8(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { unsigned char *DstS, *DstM; unsigned char *pntr; unsigned char *mem, *mem2; int count; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; /* Realize the cursor without interleaving */ if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; if (!(mem = calloc(1, size))) { free(mem2); return NULL; } /* 8 bit interleave */ DstS = mem2; DstM = DstS + (size >> 1); pntr = mem; count = size; while (count) { *pntr++ = *DstS++; *pntr++ = *DstM++; count -= 2; } /* Free the uninterleaved cursor */ free(mem2); return mem; } static unsigned char * RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { unsigned short *DstS, *DstM; unsigned short *pntr; unsigned char *mem, *mem2; int count; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; /* Realize the cursor without interleaving */ if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; if (!(mem = calloc(1, size))) { free(mem2); return NULL; } /* 16 bit interleave */ DstS = (void *) mem2; DstM = DstS + (size >> 2); pntr = (void *) mem; count = (size >> 1); while (count) { *pntr++ = *DstS++; *pntr++ = *DstM++; count -= 2; } /* Free the uninterleaved cursor */ free(mem2); return mem; } static unsigned char * RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { CARD32 *DstS, *DstM; CARD32 *pntr; unsigned char *mem, *mem2; int count; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; /* Realize the cursor without interleaving */ if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; if (!(mem = calloc(1, size))) { free(mem2); return NULL; } /* 32 bit interleave */ DstS = (void *) mem2; DstM = DstS + (size >> 3); pntr = (void *) mem; count = (size >> 2); while (count) { *pntr++ = *DstS++; *pntr++ = *DstM++; count -= 2; } /* Free the uninterleaved cursor */ free(mem2); return mem; } static unsigned char * RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) { CARD32 *DstS, *DstM; CARD32 *pntr; unsigned char *mem, *mem2; int count; int size = (infoPtr->MaxWidth * infoPtr->MaxHeight) >> 2; /* Realize the cursor without interleaving */ if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; if (!(mem = calloc(1, size))) { free(mem2); return NULL; } /* 64 bit interleave */ DstS = (void *) mem2; DstM = DstS + (size >> 3); pntr = (void *) mem; count = (size >> 2); while (count) { *pntr++ = *DstS++; *pntr++ = *DstS++; *pntr++ = *DstM++; *pntr++ = *DstM++; count -= 4; } /* Free the uninterleaved cursor */ free(mem2); return mem; } xorg-server-21.1.16/hw/xfree86/ramdac/xf86CursorPriv.h0000644000175000017500000000277714757411105016007 #ifdef HAVE_XORG_CONFIG_H #include #endif #ifndef _XF86CURSORPRIV_H #define _XF86CURSORPRIV_H #include "xf86Cursor.h" #include "mipointrst.h" typedef struct { Bool SWCursor; Bool isUp; Bool showTransparent; short HotX; short HotY; short x; short y; CursorPtr CurrentCursor, CursorToRestore; xf86CursorInfoPtr CursorInfoPtr; CloseScreenProcPtr CloseScreen; RecolorCursorProcPtr RecolorCursor; InstallColormapProcPtr InstallColormap; QueryBestSizeProcPtr QueryBestSize; miPointerSpriteFuncPtr spriteFuncs; Bool PalettedCursor; ColormapPtr pInstalledMap; Bool (*SwitchMode) (ScrnInfoPtr, DisplayModePtr); xf86EnableDisableFBAccessProc *EnableDisableFBAccess; CursorPtr SavedCursor; /* Number of requests to force HW cursor */ int ForceHWCursorCount; Bool HWCursorForced; void *transparentData; } xf86CursorScreenRec, *xf86CursorScreenPtr; Bool xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y); void xf86SetTransparentCursor(ScreenPtr pScreen); void xf86MoveCursor(ScreenPtr pScreen, int x, int y); void xf86RecolorCursor(ScreenPtr pScreen, CursorPtr pCurs, Bool displayed); Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); Bool xf86CheckHWCursor(ScreenPtr pScreen, CursorPtr cursor, xf86CursorInfoPtr infoPtr); extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec; #define xf86CursorScreenKey (&xf86CursorScreenKeyRec) #endif /* _XF86CURSORPRIV_H */ xorg-server-21.1.16/hw/xfree86/ramdac/CURSOR.NOTES0000644000175000017500000001532014757411105014617 CURSOR.NOTES This file describes how to add hardware cursor support to a chipset driver. Though the cursor support itself is in the ramdac module, cursor management is separate from the rest of the module. 1) CURSOR INITIALIZATION AND SHUTDOWN All relevant prototypes and defines are in xf86Cursor.h. To initialize the cursor, the driver should allocate an xf86CursorInfoRec via xf86CreateCursorInfoRec(), fill it out as described later in this document and pass it to xf86InitCursor(). xf86InitCursor() must be called _after_ the software cursor initialization (usually miDCInitialize). When shutting down, the driver should free the xf86CursorInfoRec structure in its CloseScreen function via xf86DestroyCursorInfoRec(). 2) FILLING OUT THE xf86CursorInfoRec The driver informs the ramdac module of its hardware cursor capabilities by filling out an xf86CursorInfoRec structure and passing it to xf86InitCursor(). The xf86CursorInfoRec contains the following function pointers: /**** These functions are required ****/ void ShowCursor(ScrnInfoPtr pScrn) ShowCursor should display the current cursor. void HideCursor(ScrnInfoPtr pScrn) HideCursor should hide the current cursor. void SetCursorPosition(ScrnInfoPtr pScrn, int x, int y) Set the cursor position to (x,y). X and/or y may be negative indicating that the cursor image is partially offscreen on the left and/or top edges of the screen. It is up to the driver to trap for this and deal with that situation. void SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) Set the cursor foreground and background colors. In 8bpp, fg and bg are indices into the current colormap unless the HARDWARE_CURSOR_TRUECOLOR_AT_8BPP flag is set. In that case and in all other bpps the fg and bg are in 8-8-8 RGB format. void LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *bits) LoadCursorImage is how the hardware cursor bits computed by the RealizeCursor function will be passed to the driver when the cursor shape needs to be changed. /**** These functions are optional ****/ unsigned char* RealizeCursor(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) If RealizeCursor is not provided by the driver, one will be provided for you based on the Flags field described below. The driver must provide this function if the hardware cursor format is not one of the common ones supported by this module. Bool UseHWCursor(ScreenPtr pScreen, CursorPtr pCurs) If the driver is unable to use a hardware cursor for reasons other than the cursor being larger than the maximum specified in the MaxWidth or MaxHeight field below, it can supply the UseHWCursor function. If UseHWCursor is provided by the driver, it will be called whenever the cursor shape changes or the video mode changes. This is useful for when the hardware cursor cannot be used in interlaced or doublescan modes. /**** The following fields are required ****/ MaxWidth MaxHeight These indicate the largest sized cursor that can be a hardware cursor. It will fall back to a software cursor when a cursor exceeding this size needs to be used. Flags /* Color related flags */ HARDWARE_CURSOR_TRUECOLOR_AT_8BPP This indicates that the colors passed to the SetCursorColors function should not be in 8-8-8 RGB format in 8bpp but rather, they should be the pixel values from the current colormap. /* Cursor data loading flags */ HARDWARE_CURSOR_SHOW_TRANSPARENT The HideCursor entry will normally be called instead of displaying a completely transparent cursor, or when a switch to a software cursor needs to occur. This flag prevents this behaviour, thus causing the LoadCursorImage entry to be called with transparent cursor data. NOTE: If you use this flag and provide your own RealizeCursor() entry, ensure this entry returns transparent cursor data when called with a NULL pCurs parameter. HARDWARE_CURSOR_UPDATE_UNHIDDEN This flag prevents the HideCursor call that would normally occur just before the LoadCursorImage entry is to be called to load a new hardware cursor image. /* Cursor data packing flags */ Hardware cursor data consists of two pieces, a source and a mask. The mask is a bitmap indicating which parts of the cursor are transparent and which parts are drawn. The source is a bitmap indicating which parts of the non-transparent portion of the the cursor should be painted in the foreground color and which should be painted in the background color. HARDWARE_CURSOR_INVERT_MASK By default, set bits indicate the opaque part of the mask bitmap and clear bits indicate the transparent part. If your hardware wants this the opposite way, this flag will invert the mask. HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK By default, RealizeCursor will store the source first and then the mask. If the hardware needs this order reversed then this flag should be set. HARDWARE_CURSOR_AND_SOURCE_WITH_MASK This flag will have the module logical AND the source with the mask to make sure there are no source bits set if the corresponding mask bits aren't set. Some hardware will not care if source bits are set where there are supposed to be transparent areas, but some hardware will interpret this as a third cursor color or similar. That type of hardware will need this flag set. HARDWARE_CURSOR_BIT_ORDER_MSBFIRST By default, it is assumed that the least significant bit in each byte corresponds to the leftmost pixel on the screen. If your hardware has this reversed you should set this flag. HARDWARE_CURSOR_NIBBLE_SWAPPED If your hardware requires byte swapping of the hardware cursor, enable this option. /* Source-Mask interleaving flags */ By default the source and mask data are inlined (source first unless the HARDWARE_CURSOR_SWAP_SOURCE_AND_MASK flag is set). Some hardware will require the source and mask to be interleaved, that is, X number of source bits should packed and then X number of mask bits repeating until the entire pattern is stored. The following flags describe the bit interleave. HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED This one is the default. The following are for interleaved cursors. HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_8 HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_16 HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_32 HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_64 And once again, if your hardware requires something different than these packing styles, your driver can supply its own RealizeCursor function. $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/CURSOR.NOTES,v 1.4tsi Exp $ xorg-server-21.1.16/hw/xfree86/shadowfb/0000755000175000017500000000000014757411134013417 5xorg-server-21.1.16/hw/xfree86/shadowfb/meson.build0000644000175000017500000000043214757411105015476 shared_module('shadowfb', [ 'shadowfb.c', 'sfbmodule.c'], include_directories: [ inc, xorg_inc ], dependencies: common_dep, c_args: xorg_c_args, install: true, install_dir: module_dir, link_with: e, ) install_data('shadowfb.h', install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/shadowfb/Makefile.am0000644000175000017500000000044314757411105015372 module_LTLIBRARIES = libshadowfb.la libshadowfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libshadowfb_la_SOURCES = sfbmodule.c shadowfb.c libshadowfb_la_LIBADD = $(PIXMAN_LIBS) sdk_HEADERS = shadowfb.h AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) xorg-server-21.1.16/hw/xfree86/shadowfb/shadowfb.h0000644000175000017500000000231714757411105015306 #ifndef _SHADOWFB_H #define _SHADOWFB_H #include "xf86str.h" /* * User defined callback function. Passed a pointer to the ScrnInfo struct, * the number of dirty rectangles, and a pointer to the first dirty rectangle * in the array. */ typedef void (*RefreshAreaFuncPtr) (ScrnInfoPtr, int, BoxPtr); /* * ShadowFBInit initializes the shadowfb subsystem. refreshArea is a pointer * to a user supplied callback function. This function will be called after * any operation that modifies the framebuffer. The newly dirtied rectangles * are passed to the callback. * * Returns FALSE in the event of an error. */ extern _X_EXPORT Bool ShadowFBInit(ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea); /* * ShadowFBInit2 is a more featureful refinement of the original shadowfb. * ShadowFBInit2 allows you to specify two callbacks, one to be called * immediately before an operation that modifies the framebuffer, and another * to be called immediately after. * * Returns FALSE in the event of an error */ extern _X_EXPORT Bool ShadowFBInit2(ScreenPtr pScreen, RefreshAreaFuncPtr preRefreshArea, RefreshAreaFuncPtr postRefreshArea); #endif /* _SHADOWFB_H */ xorg-server-21.1.16/hw/xfree86/shadowfb/Makefile.in0000644000175000017500000007064414757411115015416 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/shadowfb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(module_LTLIBRARIES) am__DEPENDENCIES_1 = libshadowfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libshadowfb_la_OBJECTS = sfbmodule.lo shadowfb.lo libshadowfb_la_OBJECTS = $(am_libshadowfb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libshadowfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libshadowfb_la_LDFLAGS) $(LDFLAGS) -o \ $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/sfbmodule.Plo \ ./$(DEPDIR)/shadowfb.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libshadowfb_la_SOURCES) DIST_SOURCES = $(libshadowfb_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ module_LTLIBRARIES = libshadowfb.la libshadowfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libshadowfb_la_SOURCES = sfbmodule.c shadowfb.c libshadowfb_la_LIBADD = $(PIXMAN_LIBS) sdk_HEADERS = shadowfb.h AM_CPPFLAGS = $(XORG_INCS) AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/shadowfb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/shadowfb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libshadowfb.la: $(libshadowfb_la_OBJECTS) $(libshadowfb_la_DEPENDENCIES) $(EXTRA_libshadowfb_la_DEPENDENCIES) $(AM_V_CCLD)$(libshadowfb_la_LINK) -rpath $(moduledir) $(libshadowfb_la_OBJECTS) $(libshadowfb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sfbmodule.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadowfb.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/sfbmodule.Plo -rm -f ./$(DEPDIR)/shadowfb.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/sfbmodule.Plo -rm -f ./$(DEPDIR)/shadowfb.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-moduleLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/shadowfb/sfbmodule.c0000644000175000017500000000100214757411105015452 #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Module.h" static XF86ModuleVersionInfo VersRec = { "shadowfb", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 1, 0, 0, ABI_CLASS_ANSIC, /* Only need the ansic layer */ ABI_ANSIC_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} /* signature, to be patched into the file by a tool */ }; _X_EXPORT XF86ModuleData shadowfbModuleData = { &VersRec, NULL, NULL }; xorg-server-21.1.16/hw/xfree86/shadowfb/shadowfb.c0000644000175000017500000001071514757411105015302 /* Copyright (C) 1999. The XFree86 Project Inc. Copyright 2014 Red Hat, Inc. Written by Mark Vojkovich (mvojkovi@ucsd.edu) Pre-fb-write callbacks and RENDER support - Nolan Leake (nolan@vmware.com) */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "misc.h" #include "pixmapstr.h" #include "input.h" #include #include "mi.h" #include "scrnintstr.h" #include "windowstr.h" #include "gcstruct.h" #include "dixfontstr.h" #include #include "xf86.h" #include "xf86str.h" #include "shadowfb.h" #include "picturestr.h" static Bool ShadowCloseScreen(ScreenPtr pScreen); static Bool ShadowCreateRootWindow(WindowPtr pWin); typedef struct { ScrnInfoPtr pScrn; RefreshAreaFuncPtr preRefresh; RefreshAreaFuncPtr postRefresh; CloseScreenProcPtr CloseScreen; CreateWindowProcPtr CreateWindow; } ShadowScreenRec, *ShadowScreenPtr; static DevPrivateKeyRec ShadowScreenKeyRec; static ShadowScreenPtr shadowfbGetScreenPrivate(ScreenPtr pScreen) { return dixLookupPrivate(&(pScreen)->devPrivates, &ShadowScreenKeyRec); } Bool ShadowFBInit2(ScreenPtr pScreen, RefreshAreaFuncPtr preRefreshArea, RefreshAreaFuncPtr postRefreshArea) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ShadowScreenPtr pPriv; if (!preRefreshArea && !postRefreshArea) return FALSE; if (!dixRegisterPrivateKey(&ShadowScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!(pPriv = (ShadowScreenPtr) malloc(sizeof(ShadowScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, &ShadowScreenKeyRec, pPriv); pPriv->pScrn = pScrn; pPriv->preRefresh = preRefreshArea; pPriv->postRefresh = postRefreshArea; pPriv->CloseScreen = pScreen->CloseScreen; pPriv->CreateWindow = pScreen->CreateWindow; pScreen->CloseScreen = ShadowCloseScreen; pScreen->CreateWindow = ShadowCreateRootWindow; return TRUE; } Bool ShadowFBInit(ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea) { return ShadowFBInit2(pScreen, NULL, refreshArea); } /* * Note that we don't do DamageEmpty, or indeed look at the region inside the * DamagePtr at all. This is an optimization, believe it or not. The * incoming RegionPtr is the new damage, and if we were to empty the region * miext/damage would just have to waste time reallocating and re-unioning * it every time, whereas if we leave it around the union gets fast-pathed * away. */ static void shadowfbReportPre(DamagePtr damage, RegionPtr reg, void *closure) { ShadowScreenPtr pPriv = closure; if (!pPriv->pScrn->vtSema) return; pPriv->preRefresh(pPriv->pScrn, RegionNumRects(reg), RegionRects(reg)); } static void shadowfbReportPost(DamagePtr damage, RegionPtr reg, void *closure) { ShadowScreenPtr pPriv = closure; if (!pPriv->pScrn->vtSema) return; pPriv->postRefresh(pPriv->pScrn, RegionNumRects(reg), RegionRects(reg)); } static Bool ShadowCreateRootWindow(WindowPtr pWin) { Bool ret; ScreenPtr pScreen = pWin->drawable.pScreen; ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen); /* paranoia */ if (pWin != pScreen->root) ErrorF("ShadowCreateRootWindow called unexpectedly\n"); /* call down, but don't hook ourselves back in; we know the first time * we're called it's for the root window. */ pScreen->CreateWindow = pPriv->CreateWindow; ret = pScreen->CreateWindow(pWin); /* this might look like it leaks, but the damage code reaps listeners * when their drawable disappears. */ if (ret) { DamagePtr damage; if (pPriv->preRefresh) { damage = DamageCreate(shadowfbReportPre, NULL, DamageReportRawRegion, TRUE, pScreen, pPriv); DamageRegister(&pWin->drawable, damage); } if (pPriv->postRefresh) { damage = DamageCreate(shadowfbReportPost, NULL, DamageReportRawRegion, TRUE, pScreen, pPriv); DamageSetReportAfterOp(damage, TRUE); DamageRegister(&pWin->drawable, damage); } } return ret; } static Bool ShadowCloseScreen(ScreenPtr pScreen) { ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen); pScreen->CloseScreen = pPriv->CloseScreen; free(pPriv); return (*pScreen->CloseScreen) (pScreen); } xorg-server-21.1.16/hw/xfree86/vgahw/0000755000175000017500000000000014757411134012736 5xorg-server-21.1.16/hw/xfree86/vgahw/meson.build0000644000175000017500000000040114757411105015011 shared_module('vgahw', [ 'vgaHW.c', 'vgaHWmodule.c'], include_directories: [ inc, xorg_inc ], dependencies: common_dep, c_args: xorg_c_args, install: true, install_dir: module_dir, ) install_data('vgaHW.h', install_dir: xorgsdkdir) xorg-server-21.1.16/hw/xfree86/vgahw/Makefile.am0000644000175000017500000000043214757411105014707 module_LTLIBRARIES = libvgahw.la libvgahw_la_LDFLAGS = -avoid-version libvgahw_la_LIBADD = $(PCIACCESS_LIBS) libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = vgaHW.h xorg-server-21.1.16/hw/xfree86/vgahw/vgaHW.h0000644000175000017500000002237314757411105014050 /* * Copyright (c) 1997,1998 The XFree86 Project, Inc. * * Loosely based on code bearing the following copyright: * * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * * Author: Dirk Hohndel */ #ifndef _VGAHW_H #define _VGAHW_H #include #include "misc.h" #include "input.h" #include "scrnintstr.h" #include "colormapst.h" #include "xf86str.h" #include "xf86Pci.h" #include "xf86DDC.h" #include "globals.h" #include extern _X_EXPORT int vgaHWGetIndex(void); /* * access macro */ #define VGAHWPTR(p) ((vgaHWPtr)((p)->privates[vgaHWGetIndex()].ptr)) /* Standard VGA registers */ #define VGA_ATTR_INDEX 0x3C0 #define VGA_ATTR_DATA_W 0x3C0 #define VGA_ATTR_DATA_R 0x3C1 #define VGA_IN_STAT_0 0x3C2 /* read */ #define VGA_MISC_OUT_W 0x3C2 /* write */ #define VGA_ENABLE 0x3C3 #define VGA_SEQ_INDEX 0x3C4 #define VGA_SEQ_DATA 0x3C5 #define VGA_DAC_MASK 0x3C6 #define VGA_DAC_READ_ADDR 0x3C7 #define VGA_DAC_WRITE_ADDR 0x3C8 #define VGA_DAC_DATA 0x3C9 #define VGA_FEATURE_R 0x3CA /* read */ #define VGA_MISC_OUT_R 0x3CC /* read */ #define VGA_GRAPH_INDEX 0x3CE #define VGA_GRAPH_DATA 0x3CF #define VGA_IOBASE_MONO 0x3B0 #define VGA_IOBASE_COLOR 0x3D0 #define VGA_CRTC_INDEX_OFFSET 0x04 #define VGA_CRTC_DATA_OFFSET 0x05 #define VGA_IN_STAT_1_OFFSET 0x0A /* read */ #define VGA_FEATURE_W_OFFSET 0x0A /* write */ /* default number of VGA registers stored internally */ #define VGA_NUM_CRTC 25 #define VGA_NUM_SEQ 5 #define VGA_NUM_GFX 9 #define VGA_NUM_ATTR 21 /* Flags for vgaHWSave() and vgaHWRestore() */ #define VGA_SR_MODE 0x01 #define VGA_SR_FONTS 0x02 #define VGA_SR_CMAP 0x04 #define VGA_SR_ALL (VGA_SR_MODE | VGA_SR_FONTS | VGA_SR_CMAP) /* Defaults for the VGA memory window */ #define VGA_DEFAULT_PHYS_ADDR 0xA0000 #define VGA_DEFAULT_MEM_SIZE (64 * 1024) /* * vgaRegRec contains settings of standard VGA registers. */ typedef struct { unsigned char MiscOutReg; /* */ unsigned char *CRTC; /* Crtc Controller */ unsigned char *Sequencer; /* Video Sequencer */ unsigned char *Graphics; /* Video Graphics */ unsigned char *Attribute; /* Video Attribute */ unsigned char DAC[768]; /* Internal Colorlookuptable */ unsigned char numCRTC; /* number of CRTC registers, def=VGA_NUM_CRTC */ unsigned char numSequencer; /* number of seq registers, def=VGA_NUM_SEQ */ unsigned char numGraphics; /* number of gfx registers, def=VGA_NUM_GFX */ unsigned char numAttribute; /* number of attr registers, def=VGA_NUM_ATTR */ } vgaRegRec, *vgaRegPtr; typedef struct _vgaHWRec *vgaHWPtr; typedef void (*vgaHWWriteIndexProcPtr) (vgaHWPtr hwp, CARD8 indx, CARD8 value); typedef CARD8 (*vgaHWReadIndexProcPtr) (vgaHWPtr hwp, CARD8 indx); typedef void (*vgaHWWriteProcPtr) (vgaHWPtr hwp, CARD8 value); typedef CARD8 (*vgaHWReadProcPtr) (vgaHWPtr hwp); typedef void (*vgaHWMiscProcPtr) (vgaHWPtr hwp); /* * vgaHWRec contains per-screen information required by the vgahw module. * * Note, the palette referred to by the paletteEnabled, enablePalette and * disablePalette is the 16-entry (+overscan) EGA-compatible palette accessed * via the first 17 attribute registers and not the main 8-bit palette. */ typedef struct _vgaHWRec { void *Base; /* Address of "VGA" memory */ int MapSize; /* Size of "VGA" memory */ unsigned long MapPhys; /* phys location of VGA mem */ int IOBase; /* I/O Base address */ CARD8 *MMIOBase; /* Pointer to MMIO start */ int MMIOOffset; /* base + offset + vgareg = mmioreg */ void *FontInfo1; /* save area for fonts in plane 2 */ void *FontInfo2; /* save area for fonts in plane 3 */ void *TextInfo; /* save area for text */ vgaRegRec SavedReg; /* saved registers */ vgaRegRec ModeReg; /* register settings for current mode */ Bool ShowOverscan; Bool paletteEnabled; Bool cmapSaved; ScrnInfoPtr pScrn; vgaHWWriteIndexProcPtr writeCrtc; vgaHWReadIndexProcPtr readCrtc; vgaHWWriteIndexProcPtr writeGr; vgaHWReadIndexProcPtr readGr; vgaHWReadProcPtr readST00; vgaHWReadProcPtr readST01; vgaHWReadProcPtr readFCR; vgaHWWriteProcPtr writeFCR; vgaHWWriteIndexProcPtr writeAttr; vgaHWReadIndexProcPtr readAttr; vgaHWWriteIndexProcPtr writeSeq; vgaHWReadIndexProcPtr readSeq; vgaHWWriteProcPtr writeMiscOut; vgaHWReadProcPtr readMiscOut; vgaHWMiscProcPtr enablePalette; vgaHWMiscProcPtr disablePalette; vgaHWWriteProcPtr writeDacMask; vgaHWReadProcPtr readDacMask; vgaHWWriteProcPtr writeDacWriteAddr; vgaHWWriteProcPtr writeDacReadAddr; vgaHWWriteProcPtr writeDacData; vgaHWReadProcPtr readDacData; void *ddc; struct pci_io_handle *io; vgaHWReadProcPtr readEnable; vgaHWWriteProcPtr writeEnable; struct pci_device *dev; } vgaHWRec; /* Some macros that VGA drivers can use in their ChipProbe() function */ #define OVERSCAN 0x11 /* Index of OverScan register */ /* Flags that define how overscan correction should take place */ #define KGA_FIX_OVERSCAN 1 /* overcan correction required */ #define KGA_ENABLE_ON_ZERO 2 /* if possible enable display at beginning */ /* of next scanline/frame */ #define KGA_BE_TOT_DEC 4 /* always fix problem by setting blank end */ /* to total - 1 */ #define BIT_PLANE 3 /* Which plane we write to in mono mode */ #define BITS_PER_GUN 6 #define COLORMAP_SIZE 256 #define DACDelay(hw) \ do { \ (hw)->readST01((hw)); \ (hw)->readST01((hw)); \ } while (0) /* Function Prototypes */ /* vgaHW.c */ typedef void vgaHWProtectProc(ScrnInfoPtr, Bool); typedef void vgaHWBlankScreenProc(ScrnInfoPtr, Bool); extern _X_EXPORT void vgaHWSetStdFuncs(vgaHWPtr hwp); extern _X_EXPORT void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); extern _X_EXPORT void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); extern _X_EXPORT vgaHWProtectProc *vgaHWProtectWeak(void); extern _X_EXPORT Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); extern _X_EXPORT void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); extern _X_EXPORT vgaHWBlankScreenProc *vgaHWBlankScreenWeak(void); extern _X_EXPORT void vgaHWSeqReset(vgaHWPtr hwp, Bool start); extern _X_EXPORT void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore); extern _X_EXPORT void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore); extern _X_EXPORT void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore); extern _X_EXPORT void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags); extern _X_EXPORT void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save); extern _X_EXPORT void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save); extern _X_EXPORT void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save); extern _X_EXPORT void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags); extern _X_EXPORT Bool vgaHWInit(ScrnInfoPtr scrnp, DisplayModePtr mode); extern _X_EXPORT Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, int numGraphics, int numAttribute); extern _X_EXPORT Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); extern _X_EXPORT Bool vgaHWGetHWRec(ScrnInfoPtr scrp); extern _X_EXPORT void vgaHWFreeHWRec(ScrnInfoPtr scrp); extern _X_EXPORT Bool vgaHWMapMem(ScrnInfoPtr scrp); extern _X_EXPORT void vgaHWUnmapMem(ScrnInfoPtr scrp); extern _X_EXPORT void vgaHWGetIOBase(vgaHWPtr hwp); extern _X_EXPORT void vgaHWLock(vgaHWPtr hwp); extern _X_EXPORT void vgaHWUnlock(vgaHWPtr hwp); extern _X_EXPORT void vgaHWEnable(vgaHWPtr hwp); extern _X_EXPORT void vgaHWDisable(vgaHWPtr hwp); extern _X_EXPORT void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags); extern _X_EXPORT Bool vgaHWHandleColormaps(ScreenPtr pScreen); extern _X_EXPORT void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed); extern _X_EXPORT CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); extern _X_EXPORT CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags); extern _X_EXPORT Bool vgaHWAllocDefaultRegs(vgaRegPtr regp); extern _X_EXPORT DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void); extern _X_EXPORT SaveScreenProcPtr vgaHWSaveScreenWeak(void); extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc) (ScrnInfoPtr, int), void (*ProtectRegs) (ScrnInfoPtr, Bool), void (*BlankScreen) (ScrnInfoPtr, Bool), unsigned long vertsyncreg, int maskval, int knownclkindex, int knownclkvalue); #endif /* _VGAHW_H */ xorg-server-21.1.16/hw/xfree86/vgahw/Makefile.in0000644000175000017500000007053714757411115014736 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/vgahw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(module_LTLIBRARIES) am__DEPENDENCIES_1 = libvgahw_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libvgahw_la_OBJECTS = vgaHW.lo vgaHWmodule.lo libvgahw_la_OBJECTS = $(am_libvgahw_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libvgahw_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libvgahw_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/vgaHW.Plo \ ./$(DEPDIR)/vgaHWmodule.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libvgahw_la_SOURCES) DIST_SOURCES = $(libvgahw_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ module_LTLIBRARIES = libvgahw.la libvgahw_la_LDFLAGS = -avoid-version libvgahw_la_LIBADD = $(PCIACCESS_LIBS) libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) sdk_HEADERS = vgaHW.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/vgahw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/vgahw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(moduledir)'"; \ $(MKDIR_P) "$(DESTDIR)$(moduledir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(moduledir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(moduledir)"; \ } uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(module_LTLIBRARIES)'; test -n "$(moduledir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$f"; \ done clean-moduleLTLIBRARIES: -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) @list='$(module_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libvgahw.la: $(libvgahw_la_OBJECTS) $(libvgahw_la_DEPENDENCIES) $(EXTRA_libvgahw_la_DEPENDENCIES) $(AM_V_CCLD)$(libvgahw_la_LINK) -rpath $(moduledir) $(libvgahw_la_OBJECTS) $(libvgahw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaHW.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vgaHWmodule.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/vgaHW.Plo -rm -f ./$(DEPDIR)/vgaHWmodule.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-moduleLTLIBRARIES install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/vgaHW.Plo -rm -f ./$(DEPDIR)/vgaHWmodule.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-moduleLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-moduleLTLIBRARIES install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am \ uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/vgahw/vgaHW.c0000644000175000017500000016012314757411105014037 /* * * Copyright 1991-1999 by The XFree86 Project, Inc. * * Loosely based on code bearing the following copyright: * * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * */ #define _NEED_SYSI86 #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "misc.h" #include "xf86.h" #include "xf86_OSproc.h" #include "vgaHW.h" #include "compiler.h" #include "xf86cmap.h" #include "Pci.h" #ifndef SAVE_FONT1 #define SAVE_FONT1 1 #endif /* * These used to be OS-specific, which made this module have an undesirable * OS dependency. Define them by default for all platforms. */ #ifndef NEED_SAVED_CMAP #define NEED_SAVED_CMAP #endif #ifndef SAVE_TEXT #define SAVE_TEXT 1 #endif #ifndef SAVE_FONT2 #define SAVE_FONT2 1 #endif /* bytes per plane to save for text */ #define TEXT_AMOUNT 16384 /* bytes per plane to save for font data */ #define FONT_AMOUNT (8*8192) #if 0 /* Override all of these for now */ #undef SAVE_FONT1 #define SAVE_FONT1 1 #undef SAVE_FONT2 #define SAVE_FONT2 1 #undef SAVE_TEST #define SAVE_TEST 1 #undef FONT_AMOUNT #define FONT_AMOUNT 65536 #undef TEXT_AMOUNT #define TEXT_AMOUNT 65536 #endif /* DAC indices for white and black */ #define WHITE_VALUE 0x3F #define BLACK_VALUE 0x00 #define OVERSCAN_VALUE 0x01 /* Use a private definition of this here */ #undef VGAHWPTR #define VGAHWPTRLVAL(p) (p)->privates[vgaHWPrivateIndex].ptr #define VGAHWPTR(p) ((vgaHWPtr)(VGAHWPTRLVAL(p))) static int vgaHWPrivateIndex = -1; #define DAC_TEST_MASK 0x3F #ifdef NEED_SAVED_CMAP /* This default colourmap is used only when it can't be read from the VGA */ static CARD8 defaultDAC[768] = { 0, 0, 0, 0, 0, 42, 0, 42, 0, 0, 42, 42, 42, 0, 0, 42, 0, 42, 42, 21, 0, 42, 42, 42, 21, 21, 21, 21, 21, 63, 21, 63, 21, 21, 63, 63, 63, 21, 21, 63, 21, 63, 63, 63, 21, 63, 63, 63, 0, 0, 0, 5, 5, 5, 8, 8, 8, 11, 11, 11, 14, 14, 14, 17, 17, 17, 20, 20, 20, 24, 24, 24, 28, 28, 28, 32, 32, 32, 36, 36, 36, 40, 40, 40, 45, 45, 45, 50, 50, 50, 56, 56, 56, 63, 63, 63, 0, 0, 63, 16, 0, 63, 31, 0, 63, 47, 0, 63, 63, 0, 63, 63, 0, 47, 63, 0, 31, 63, 0, 16, 63, 0, 0, 63, 16, 0, 63, 31, 0, 63, 47, 0, 63, 63, 0, 47, 63, 0, 31, 63, 0, 16, 63, 0, 0, 63, 0, 0, 63, 16, 0, 63, 31, 0, 63, 47, 0, 63, 63, 0, 47, 63, 0, 31, 63, 0, 16, 63, 31, 31, 63, 39, 31, 63, 47, 31, 63, 55, 31, 63, 63, 31, 63, 63, 31, 55, 63, 31, 47, 63, 31, 39, 63, 31, 31, 63, 39, 31, 63, 47, 31, 63, 55, 31, 63, 63, 31, 55, 63, 31, 47, 63, 31, 39, 63, 31, 31, 63, 31, 31, 63, 39, 31, 63, 47, 31, 63, 55, 31, 63, 63, 31, 55, 63, 31, 47, 63, 31, 39, 63, 45, 45, 63, 49, 45, 63, 54, 45, 63, 58, 45, 63, 63, 45, 63, 63, 45, 58, 63, 45, 54, 63, 45, 49, 63, 45, 45, 63, 49, 45, 63, 54, 45, 63, 58, 45, 63, 63, 45, 58, 63, 45, 54, 63, 45, 49, 63, 45, 45, 63, 45, 45, 63, 49, 45, 63, 54, 45, 63, 58, 45, 63, 63, 45, 58, 63, 45, 54, 63, 45, 49, 63, 0, 0, 28, 7, 0, 28, 14, 0, 28, 21, 0, 28, 28, 0, 28, 28, 0, 21, 28, 0, 14, 28, 0, 7, 28, 0, 0, 28, 7, 0, 28, 14, 0, 28, 21, 0, 28, 28, 0, 21, 28, 0, 14, 28, 0, 7, 28, 0, 0, 28, 0, 0, 28, 7, 0, 28, 14, 0, 28, 21, 0, 28, 28, 0, 21, 28, 0, 14, 28, 0, 7, 28, 14, 14, 28, 17, 14, 28, 21, 14, 28, 24, 14, 28, 28, 14, 28, 28, 14, 24, 28, 14, 21, 28, 14, 17, 28, 14, 14, 28, 17, 14, 28, 21, 14, 28, 24, 14, 28, 28, 14, 24, 28, 14, 21, 28, 14, 17, 28, 14, 14, 28, 14, 14, 28, 17, 14, 28, 21, 14, 28, 24, 14, 28, 28, 14, 24, 28, 14, 21, 28, 14, 17, 28, 20, 20, 28, 22, 20, 28, 24, 20, 28, 26, 20, 28, 28, 20, 28, 28, 20, 26, 28, 20, 24, 28, 20, 22, 28, 20, 20, 28, 22, 20, 28, 24, 20, 28, 26, 20, 28, 28, 20, 26, 28, 20, 24, 28, 20, 22, 28, 20, 20, 28, 20, 20, 28, 22, 20, 28, 24, 20, 28, 26, 20, 28, 28, 20, 26, 28, 20, 24, 28, 20, 22, 28, 0, 0, 16, 4, 0, 16, 8, 0, 16, 12, 0, 16, 16, 0, 16, 16, 0, 12, 16, 0, 8, 16, 0, 4, 16, 0, 0, 16, 4, 0, 16, 8, 0, 16, 12, 0, 16, 16, 0, 12, 16, 0, 8, 16, 0, 4, 16, 0, 0, 16, 0, 0, 16, 4, 0, 16, 8, 0, 16, 12, 0, 16, 16, 0, 12, 16, 0, 8, 16, 0, 4, 16, 8, 8, 16, 10, 8, 16, 12, 8, 16, 14, 8, 16, 16, 8, 16, 16, 8, 14, 16, 8, 12, 16, 8, 10, 16, 8, 8, 16, 10, 8, 16, 12, 8, 16, 14, 8, 16, 16, 8, 14, 16, 8, 12, 16, 8, 10, 16, 8, 8, 16, 8, 8, 16, 10, 8, 16, 12, 8, 16, 14, 8, 16, 16, 8, 14, 16, 8, 12, 16, 8, 10, 16, 11, 11, 16, 12, 11, 16, 13, 11, 16, 15, 11, 16, 16, 11, 16, 16, 11, 15, 16, 11, 13, 16, 11, 12, 16, 11, 11, 16, 12, 11, 16, 13, 11, 16, 15, 11, 16, 16, 11, 15, 16, 11, 13, 16, 11, 12, 16, 11, 11, 16, 11, 11, 16, 12, 11, 16, 13, 11, 16, 15, 11, 16, 16, 11, 15, 16, 11, 13, 16, 11, 12, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #endif /* NEED_SAVED_CMAP */ /* * Standard VGA versions of the register access functions. */ static void stdWriteCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value) { pci_io_write8(hwp->io, hwp->IOBase + VGA_CRTC_INDEX_OFFSET, index); pci_io_write8(hwp->io, hwp->IOBase + VGA_CRTC_DATA_OFFSET, value); } static CARD8 stdReadCrtc(vgaHWPtr hwp, CARD8 index) { pci_io_write8(hwp->io, hwp->IOBase + VGA_CRTC_INDEX_OFFSET, index); return pci_io_read8(hwp->io, hwp->IOBase + VGA_CRTC_DATA_OFFSET); } static void stdWriteGr(vgaHWPtr hwp, CARD8 index, CARD8 value) { pci_io_write8(hwp->io, VGA_GRAPH_INDEX, index); pci_io_write8(hwp->io, VGA_GRAPH_DATA, value); } static CARD8 stdReadGr(vgaHWPtr hwp, CARD8 index) { pci_io_write8(hwp->io, VGA_GRAPH_INDEX, index); return pci_io_read8(hwp->io, VGA_GRAPH_DATA); } static void stdWriteSeq(vgaHWPtr hwp, CARD8 index, CARD8 value) { pci_io_write8(hwp->io, VGA_SEQ_INDEX, index); pci_io_write8(hwp->io, VGA_SEQ_DATA, value); } static CARD8 stdReadSeq(vgaHWPtr hwp, CARD8 index) { pci_io_write8(hwp->io, VGA_SEQ_INDEX, index); return pci_io_read8(hwp->io, VGA_SEQ_DATA); } static CARD8 stdReadST00(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_IN_STAT_0); } static CARD8 stdReadST01(vgaHWPtr hwp) { return pci_io_read8(hwp->io, hwp->IOBase + VGA_IN_STAT_1_OFFSET); } static CARD8 stdReadFCR(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_FEATURE_R); } static void stdWriteFCR(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, hwp->IOBase + VGA_FEATURE_W_OFFSET, value); } static void stdWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value) { if (hwp->paletteEnabled) index &= ~0x20; else index |= 0x20; (void) pci_io_read8(hwp->io, hwp->IOBase + VGA_IN_STAT_1_OFFSET); pci_io_write8(hwp->io, VGA_ATTR_INDEX, index); pci_io_write8(hwp->io, VGA_ATTR_DATA_W, value); } static CARD8 stdReadAttr(vgaHWPtr hwp, CARD8 index) { if (hwp->paletteEnabled) index &= ~0x20; else index |= 0x20; (void) pci_io_read8(hwp->io, hwp->IOBase + VGA_IN_STAT_1_OFFSET); pci_io_write8(hwp->io, VGA_ATTR_INDEX, index); return pci_io_read8(hwp->io, VGA_ATTR_DATA_R); } static void stdWriteMiscOut(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_MISC_OUT_W, value); } static CARD8 stdReadMiscOut(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_MISC_OUT_R); } static void stdEnablePalette(vgaHWPtr hwp) { (void) pci_io_read8(hwp->io, hwp->IOBase + VGA_IN_STAT_1_OFFSET); pci_io_write8(hwp->io, VGA_ATTR_INDEX, 0x00); hwp->paletteEnabled = TRUE; } static void stdDisablePalette(vgaHWPtr hwp) { (void) pci_io_read8(hwp->io, hwp->IOBase + VGA_IN_STAT_1_OFFSET); pci_io_write8(hwp->io, VGA_ATTR_INDEX, 0x20); hwp->paletteEnabled = FALSE; } static void stdWriteDacMask(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_DAC_MASK, value); } static CARD8 stdReadDacMask(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_DAC_MASK); } static void stdWriteDacReadAddr(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_DAC_READ_ADDR, value); } static void stdWriteDacWriteAddr(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_DAC_WRITE_ADDR, value); } static void stdWriteDacData(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_DAC_DATA, value); } static CARD8 stdReadDacData(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_DAC_DATA); } static CARD8 stdReadEnable(vgaHWPtr hwp) { return pci_io_read8(hwp->io, VGA_ENABLE); } static void stdWriteEnable(vgaHWPtr hwp, CARD8 value) { pci_io_write8(hwp->io, VGA_ENABLE, value); } void vgaHWSetStdFuncs(vgaHWPtr hwp) { hwp->writeCrtc = stdWriteCrtc; hwp->readCrtc = stdReadCrtc; hwp->writeGr = stdWriteGr; hwp->readGr = stdReadGr; hwp->readST00 = stdReadST00; hwp->readST01 = stdReadST01; hwp->readFCR = stdReadFCR; hwp->writeFCR = stdWriteFCR; hwp->writeAttr = stdWriteAttr; hwp->readAttr = stdReadAttr; hwp->writeSeq = stdWriteSeq; hwp->readSeq = stdReadSeq; hwp->writeMiscOut = stdWriteMiscOut; hwp->readMiscOut = stdReadMiscOut; hwp->enablePalette = stdEnablePalette; hwp->disablePalette = stdDisablePalette; hwp->writeDacMask = stdWriteDacMask; hwp->readDacMask = stdReadDacMask; hwp->writeDacWriteAddr = stdWriteDacWriteAddr; hwp->writeDacReadAddr = stdWriteDacReadAddr; hwp->writeDacData = stdWriteDacData; hwp->readDacData = stdReadDacData; hwp->readEnable = stdReadEnable; hwp->writeEnable = stdWriteEnable; hwp->io = pci_legacy_open_io(hwp->dev, 0, 64 * 1024); } /* * MMIO versions of the register access functions. These require * hwp->MemBase to be set in such a way that when the standard VGA port * adderss is added the correct memory address results. */ #define minb(p) MMIO_IN8(hwp->MMIOBase, (hwp->MMIOOffset + (p))) #define moutb(p,v) MMIO_OUT8(hwp->MMIOBase, (hwp->MMIOOffset + (p)),(v)) static void mmioWriteCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value) { moutb(hwp->IOBase + VGA_CRTC_INDEX_OFFSET, index); moutb(hwp->IOBase + VGA_CRTC_DATA_OFFSET, value); } static CARD8 mmioReadCrtc(vgaHWPtr hwp, CARD8 index) { moutb(hwp->IOBase + VGA_CRTC_INDEX_OFFSET, index); return minb(hwp->IOBase + VGA_CRTC_DATA_OFFSET); } static void mmioWriteGr(vgaHWPtr hwp, CARD8 index, CARD8 value) { moutb(VGA_GRAPH_INDEX, index); moutb(VGA_GRAPH_DATA, value); } static CARD8 mmioReadGr(vgaHWPtr hwp, CARD8 index) { moutb(VGA_GRAPH_INDEX, index); return minb(VGA_GRAPH_DATA); } static void mmioWriteSeq(vgaHWPtr hwp, CARD8 index, CARD8 value) { moutb(VGA_SEQ_INDEX, index); moutb(VGA_SEQ_DATA, value); } static CARD8 mmioReadSeq(vgaHWPtr hwp, CARD8 index) { moutb(VGA_SEQ_INDEX, index); return minb(VGA_SEQ_DATA); } static CARD8 mmioReadST00(vgaHWPtr hwp) { return minb(VGA_IN_STAT_0); } static CARD8 mmioReadST01(vgaHWPtr hwp) { return minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET); } static CARD8 mmioReadFCR(vgaHWPtr hwp) { return minb(VGA_FEATURE_R); } static void mmioWriteFCR(vgaHWPtr hwp, CARD8 value) { moutb(hwp->IOBase + VGA_FEATURE_W_OFFSET, value); } static void mmioWriteAttr(vgaHWPtr hwp, CARD8 index, CARD8 value) { if (hwp->paletteEnabled) index &= ~0x20; else index |= 0x20; (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET); moutb(VGA_ATTR_INDEX, index); moutb(VGA_ATTR_DATA_W, value); } static CARD8 mmioReadAttr(vgaHWPtr hwp, CARD8 index) { if (hwp->paletteEnabled) index &= ~0x20; else index |= 0x20; (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET); moutb(VGA_ATTR_INDEX, index); return minb(VGA_ATTR_DATA_R); } static void mmioWriteMiscOut(vgaHWPtr hwp, CARD8 value) { moutb(VGA_MISC_OUT_W, value); } static CARD8 mmioReadMiscOut(vgaHWPtr hwp) { return minb(VGA_MISC_OUT_R); } static void mmioEnablePalette(vgaHWPtr hwp) { (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET); moutb(VGA_ATTR_INDEX, 0x00); hwp->paletteEnabled = TRUE; } static void mmioDisablePalette(vgaHWPtr hwp) { (void) minb(hwp->IOBase + VGA_IN_STAT_1_OFFSET); moutb(VGA_ATTR_INDEX, 0x20); hwp->paletteEnabled = FALSE; } static void mmioWriteDacMask(vgaHWPtr hwp, CARD8 value) { moutb(VGA_DAC_MASK, value); } static CARD8 mmioReadDacMask(vgaHWPtr hwp) { return minb(VGA_DAC_MASK); } static void mmioWriteDacReadAddr(vgaHWPtr hwp, CARD8 value) { moutb(VGA_DAC_READ_ADDR, value); } static void mmioWriteDacWriteAddr(vgaHWPtr hwp, CARD8 value) { moutb(VGA_DAC_WRITE_ADDR, value); } static void mmioWriteDacData(vgaHWPtr hwp, CARD8 value) { moutb(VGA_DAC_DATA, value); } static CARD8 mmioReadDacData(vgaHWPtr hwp) { return minb(VGA_DAC_DATA); } static CARD8 mmioReadEnable(vgaHWPtr hwp) { return minb(VGA_ENABLE); } static void mmioWriteEnable(vgaHWPtr hwp, CARD8 value) { moutb(VGA_ENABLE, value); } void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset) { hwp->writeCrtc = mmioWriteCrtc; hwp->readCrtc = mmioReadCrtc; hwp->writeGr = mmioWriteGr; hwp->readGr = mmioReadGr; hwp->readST00 = mmioReadST00; hwp->readST01 = mmioReadST01; hwp->readFCR = mmioReadFCR; hwp->writeFCR = mmioWriteFCR; hwp->writeAttr = mmioWriteAttr; hwp->readAttr = mmioReadAttr; hwp->writeSeq = mmioWriteSeq; hwp->readSeq = mmioReadSeq; hwp->writeMiscOut = mmioWriteMiscOut; hwp->readMiscOut = mmioReadMiscOut; hwp->enablePalette = mmioEnablePalette; hwp->disablePalette = mmioDisablePalette; hwp->writeDacMask = mmioWriteDacMask; hwp->readDacMask = mmioReadDacMask; hwp->writeDacWriteAddr = mmioWriteDacWriteAddr; hwp->writeDacReadAddr = mmioWriteDacReadAddr; hwp->writeDacData = mmioWriteDacData; hwp->readDacData = mmioReadDacData; hwp->MMIOBase = base; hwp->MMIOOffset = offset; hwp->readEnable = mmioReadEnable; hwp->writeEnable = mmioWriteEnable; } /* * vgaHWProtect -- * Protect VGA registers and memory from corruption during loads. */ void vgaHWProtect(ScrnInfoPtr pScrn, Bool on) { vgaHWPtr hwp = VGAHWPTR(pScrn); unsigned char tmp; if (pScrn->vtSema) { if (on) { /* * Turn off screen and disable sequencer. */ tmp = hwp->readSeq(hwp, 0x01); vgaHWSeqReset(hwp, TRUE); /* start synchronous reset */ hwp->writeSeq(hwp, 0x01, tmp | 0x20); /* disable the display */ hwp->enablePalette(hwp); } else { /* * Re-enable sequencer, then turn on screen. */ tmp = hwp->readSeq(hwp, 0x01); hwp->writeSeq(hwp, 0x01, tmp & ~0x20); /* re-enable display */ vgaHWSeqReset(hwp, FALSE); /* clear synchronousreset */ hwp->disablePalette(hwp); } } } vgaHWProtectProc * vgaHWProtectWeak(void) { return vgaHWProtect; } /* * vgaHWBlankScreen -- blank the screen. */ void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on) { vgaHWPtr hwp = VGAHWPTR(pScrn); unsigned char scrn; scrn = hwp->readSeq(hwp, 0x01); if (on) { scrn &= ~0x20; /* enable screen */ } else { scrn |= 0x20; /* blank screen */ } vgaHWSeqReset(hwp, TRUE); hwp->writeSeq(hwp, 0x01, scrn); /* change mode */ vgaHWSeqReset(hwp, FALSE); } vgaHWBlankScreenProc * vgaHWBlankScreenWeak(void) { return vgaHWBlankScreen; } /* * vgaHWSaveScreen -- blank the screen. */ Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = NULL; Bool on; if (pScreen != NULL) pScrn = xf86ScreenToScrn(pScreen); on = xf86IsUnblank(mode); #if 0 if (on) SetTimeSinceLastInputEvent(); #endif if ((pScrn != NULL) && pScrn->vtSema) { vgaHWBlankScreen(pScrn, on); } return TRUE; } /* * vgaHWDPMSSet -- Sets VESA Display Power Management Signaling (DPMS) Mode * * This generic VGA function can only set the Off and On modes. If the * Standby and Suspend modes are to be supported, a chip specific replacement * for this function must be written. */ void vgaHWDPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags) { unsigned char seq1 = 0, crtc17 = 0; vgaHWPtr hwp = VGAHWPTR(pScrn); if (!pScrn->vtSema) return; switch (PowerManagementMode) { case DPMSModeOn: /* Screen: On; HSync: On, VSync: On */ seq1 = 0x00; crtc17 = 0x80; break; case DPMSModeStandby: /* Screen: Off; HSync: Off, VSync: On -- Not Supported */ seq1 = 0x20; crtc17 = 0x80; break; case DPMSModeSuspend: /* Screen: Off; HSync: On, VSync: Off -- Not Supported */ seq1 = 0x20; crtc17 = 0x80; break; case DPMSModeOff: /* Screen: Off; HSync: Off, VSync: Off */ seq1 = 0x20; crtc17 = 0x00; break; } hwp->writeSeq(hwp, 0x00, 0x01); /* Synchronous Reset */ seq1 |= hwp->readSeq(hwp, 0x01) & ~0x20; hwp->writeSeq(hwp, 0x01, seq1); crtc17 |= hwp->readCrtc(hwp, 0x17) & ~0x80; usleep(10000); hwp->writeCrtc(hwp, 0x17, crtc17); hwp->writeSeq(hwp, 0x00, 0x03); /* End Reset */ } /* * vgaHWSeqReset * perform a sequencer reset. */ void vgaHWSeqReset(vgaHWPtr hwp, Bool start) { if (start) hwp->writeSeq(hwp, 0x00, 0x01); /* Synchronous Reset */ else hwp->writeSeq(hwp, 0x00, 0x03); /* End Reset */ } void vgaHWRestoreFonts(ScrnInfoPtr scrninfp, vgaRegPtr restore) { #if SAVE_TEXT || SAVE_FONT1 || SAVE_FONT2 vgaHWPtr hwp = VGAHWPTR(scrninfp); int savedIOBase; unsigned char miscOut, attr10, gr1, gr3, gr4, gr5, gr6, gr8, seq2, seq4; Bool doMap = FALSE; /* If nothing to do, return now */ if (!hwp->FontInfo1 && !hwp->FontInfo2 && !hwp->TextInfo) return; if (hwp->Base == NULL) { doMap = TRUE; if (!vgaHWMapMem(scrninfp)) { xf86DrvMsg(scrninfp->scrnIndex, X_ERROR, "vgaHWRestoreFonts: vgaHWMapMem() failed\n"); return; } } /* save the registers that are needed here */ miscOut = hwp->readMiscOut(hwp); attr10 = hwp->readAttr(hwp, 0x10); gr1 = hwp->readGr(hwp, 0x01); gr3 = hwp->readGr(hwp, 0x03); gr4 = hwp->readGr(hwp, 0x04); gr5 = hwp->readGr(hwp, 0x05); gr6 = hwp->readGr(hwp, 0x06); gr8 = hwp->readGr(hwp, 0x08); seq2 = hwp->readSeq(hwp, 0x02); seq4 = hwp->readSeq(hwp, 0x04); /* save hwp->IOBase and temporarily set it for colour mode */ savedIOBase = hwp->IOBase; hwp->IOBase = VGA_IOBASE_COLOR; /* Force into colour mode */ hwp->writeMiscOut(hwp, miscOut | 0x01); vgaHWBlankScreen(scrninfp, FALSE); /* * here we temporarily switch to 16 colour planar mode, to simply * copy the font-info and saved text. * * BUG ALERT: The (S)VGA's segment-select register MUST be set correctly! */ #if 0 hwp->writeAttr(hwp, 0x10, 0x01); /* graphics mode */ #endif hwp->writeSeq(hwp, 0x04, 0x06); /* enable plane graphics */ hwp->writeGr(hwp, 0x05, 0x00); /* write mode 0, read mode 0 */ hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */ if (scrninfp->depth == 4) { /* GJA */ hwp->writeGr(hwp, 0x03, 0x00); /* don't rotate, write unmodified */ hwp->writeGr(hwp, 0x08, 0xFF); /* write all bits in a byte */ hwp->writeGr(hwp, 0x01, 0x00); /* all planes come from CPU */ } #if SAVE_FONT1 if (hwp->FontInfo1) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ slowbcopy_tobus(hwp->FontInfo1, hwp->Base, FONT_AMOUNT); } #endif #if SAVE_FONT2 if (hwp->FontInfo2) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ slowbcopy_tobus(hwp->FontInfo2, hwp->Base, FONT_AMOUNT); } #endif #if SAVE_TEXT if (hwp->TextInfo) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ slowbcopy_tobus(hwp->TextInfo, hwp->Base, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ slowbcopy_tobus((unsigned char *) hwp->TextInfo + TEXT_AMOUNT, hwp->Base, TEXT_AMOUNT); } #endif vgaHWBlankScreen(scrninfp, TRUE); /* restore the registers that were changed */ hwp->writeMiscOut(hwp, miscOut); hwp->writeAttr(hwp, 0x10, attr10); hwp->writeGr(hwp, 0x01, gr1); hwp->writeGr(hwp, 0x03, gr3); hwp->writeGr(hwp, 0x04, gr4); hwp->writeGr(hwp, 0x05, gr5); hwp->writeGr(hwp, 0x06, gr6); hwp->writeGr(hwp, 0x08, gr8); hwp->writeSeq(hwp, 0x02, seq2); hwp->writeSeq(hwp, 0x04, seq4); hwp->IOBase = savedIOBase; if (doMap) vgaHWUnmapMem(scrninfp); #endif /* SAVE_TEXT || SAVE_FONT1 || SAVE_FONT2 */ } void vgaHWRestoreMode(ScrnInfoPtr scrninfp, vgaRegPtr restore) { vgaHWPtr hwp = VGAHWPTR(scrninfp); int i; if (restore->MiscOutReg & 0x01) hwp->IOBase = VGA_IOBASE_COLOR; else hwp->IOBase = VGA_IOBASE_MONO; hwp->writeMiscOut(hwp, restore->MiscOutReg); for (i = 1; i < restore->numSequencer; i++) hwp->writeSeq(hwp, i, restore->Sequencer[i]); /* Ensure CRTC registers 0-7 are unlocked by clearing bit 7 of CRTC[17] */ hwp->writeCrtc(hwp, 17, restore->CRTC[17] & ~0x80); for (i = 0; i < restore->numCRTC; i++) hwp->writeCrtc(hwp, i, restore->CRTC[i]); for (i = 0; i < restore->numGraphics; i++) hwp->writeGr(hwp, i, restore->Graphics[i]); hwp->enablePalette(hwp); for (i = 0; i < restore->numAttribute; i++) hwp->writeAttr(hwp, i, restore->Attribute[i]); hwp->disablePalette(hwp); } void vgaHWRestoreColormap(ScrnInfoPtr scrninfp, vgaRegPtr restore) { vgaHWPtr hwp = VGAHWPTR(scrninfp); int i; #if 0 hwp->enablePalette(hwp); #endif hwp->writeDacMask(hwp, 0xFF); hwp->writeDacWriteAddr(hwp, 0x00); for (i = 0; i < 768; i++) { hwp->writeDacData(hwp, restore->DAC[i]); DACDelay(hwp); } hwp->disablePalette(hwp); } /* * vgaHWRestore -- * restore the VGA state */ void vgaHWRestore(ScrnInfoPtr scrninfp, vgaRegPtr restore, int flags) { if (flags & VGA_SR_MODE) vgaHWRestoreMode(scrninfp, restore); if (flags & VGA_SR_FONTS) vgaHWRestoreFonts(scrninfp, restore); if (flags & VGA_SR_CMAP) vgaHWRestoreColormap(scrninfp, restore); } void vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save) { #if SAVE_TEXT || SAVE_FONT1 || SAVE_FONT2 vgaHWPtr hwp = VGAHWPTR(scrninfp); int savedIOBase; unsigned char miscOut, attr10, gr4, gr5, gr6, seq2, seq4; Bool doMap = FALSE; if (hwp->Base == NULL) { doMap = TRUE; if (!vgaHWMapMem(scrninfp)) { xf86DrvMsg(scrninfp->scrnIndex, X_ERROR, "vgaHWSaveFonts: vgaHWMapMem() failed\n"); return; } } /* If in graphics mode, don't save anything */ attr10 = hwp->readAttr(hwp, 0x10); if (attr10 & 0x01) return; /* save the registers that are needed here */ miscOut = hwp->readMiscOut(hwp); gr4 = hwp->readGr(hwp, 0x04); gr5 = hwp->readGr(hwp, 0x05); gr6 = hwp->readGr(hwp, 0x06); seq2 = hwp->readSeq(hwp, 0x02); seq4 = hwp->readSeq(hwp, 0x04); /* save hwp->IOBase and temporarily set it for colour mode */ savedIOBase = hwp->IOBase; hwp->IOBase = VGA_IOBASE_COLOR; /* Force into colour mode */ hwp->writeMiscOut(hwp, miscOut | 0x01); vgaHWBlankScreen(scrninfp, FALSE); /* * get the character sets, and text screen if required */ /* * Here we temporarily switch to 16 colour planar mode, to simply * copy the font-info * * BUG ALERT: The (S)VGA's segment-select register MUST be set correctly! */ #if 0 hwp->writeAttr(hwp, 0x10, 0x01); /* graphics mode */ #endif hwp->writeSeq(hwp, 0x04, 0x06); /* enable plane graphics */ hwp->writeGr(hwp, 0x05, 0x00); /* write mode 0, read mode 0 */ hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */ #if SAVE_FONT1 if (hwp->FontInfo1 || (hwp->FontInfo1 = malloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); } #endif /* SAVE_FONT1 */ #if SAVE_FONT2 if (hwp->FontInfo2 || (hwp->FontInfo2 = malloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); } #endif /* SAVE_FONT2 */ #if SAVE_TEXT if (hwp->TextInfo || (hwp->TextInfo = malloc(2 * TEXT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); hwp->writeSeq(hwp, 0x02, 0x02); /* write to plane 1 */ hwp->writeGr(hwp, 0x04, 0x01); /* read plane 1 */ slowbcopy_frombus(hwp->Base, (unsigned char *) hwp->TextInfo + TEXT_AMOUNT, TEXT_AMOUNT); } #endif /* SAVE_TEXT */ /* Restore clobbered registers */ hwp->writeAttr(hwp, 0x10, attr10); hwp->writeSeq(hwp, 0x02, seq2); hwp->writeSeq(hwp, 0x04, seq4); hwp->writeGr(hwp, 0x04, gr4); hwp->writeGr(hwp, 0x05, gr5); hwp->writeGr(hwp, 0x06, gr6); hwp->writeMiscOut(hwp, miscOut); hwp->IOBase = savedIOBase; vgaHWBlankScreen(scrninfp, TRUE); if (doMap) vgaHWUnmapMem(scrninfp); #endif /* SAVE_TEXT || SAVE_FONT1 || SAVE_FONT2 */ } void vgaHWSaveMode(ScrnInfoPtr scrninfp, vgaRegPtr save) { vgaHWPtr hwp = VGAHWPTR(scrninfp); int i; save->MiscOutReg = hwp->readMiscOut(hwp); if (save->MiscOutReg & 0x01) hwp->IOBase = VGA_IOBASE_COLOR; else hwp->IOBase = VGA_IOBASE_MONO; for (i = 0; i < save->numCRTC; i++) { save->CRTC[i] = hwp->readCrtc(hwp, i); DebugF("CRTC[0x%02x] = 0x%02x\n", i, save->CRTC[i]); } hwp->enablePalette(hwp); for (i = 0; i < save->numAttribute; i++) { save->Attribute[i] = hwp->readAttr(hwp, i); DebugF("Attribute[0x%02x] = 0x%02x\n", i, save->Attribute[i]); } hwp->disablePalette(hwp); for (i = 0; i < save->numGraphics; i++) { save->Graphics[i] = hwp->readGr(hwp, i); DebugF("Graphics[0x%02x] = 0x%02x\n", i, save->Graphics[i]); } for (i = 1; i < save->numSequencer; i++) { save->Sequencer[i] = hwp->readSeq(hwp, i); DebugF("Sequencer[0x%02x] = 0x%02x\n", i, save->Sequencer[i]); } } void vgaHWSaveColormap(ScrnInfoPtr scrninfp, vgaRegPtr save) { vgaHWPtr hwp = VGAHWPTR(scrninfp); Bool readError = FALSE; int i; #ifdef NEED_SAVED_CMAP /* * Some ET4000 chips from 1991 have a HW bug that prevents the reading * of the color lookup table. Mask rev 9042EAI is known to have this bug. * * If the colourmap is not readable, we set the saved map to a default * map (taken from Ferraro's "Programmer's Guide to the EGA and VGA * Cards" 2nd ed). */ /* Only save it once */ if (hwp->cmapSaved) return; #if 0 hwp->enablePalette(hwp); #endif hwp->writeDacMask(hwp, 0xFF); /* * check if we can read the lookup table */ hwp->writeDacReadAddr(hwp, 0x00); for (i = 0; i < 6; i++) { save->DAC[i] = hwp->readDacData(hwp); switch (i % 3) { case 0: DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: DebugF("0x%02x, ", save->DAC[i]); break; case 2: DebugF("0x%02x\n", save->DAC[i]); } } /* * Check if we can read the palette - * use foreground color to prevent flashing. */ hwp->writeDacWriteAddr(hwp, 0x01); for (i = 3; i < 6; i++) hwp->writeDacData(hwp, ~save->DAC[i] & DAC_TEST_MASK); hwp->writeDacReadAddr(hwp, 0x01); for (i = 3; i < 6; i++) { if (hwp->readDacData(hwp) != (~save->DAC[i] & DAC_TEST_MASK)) readError = TRUE; } hwp->writeDacWriteAddr(hwp, 0x01); for (i = 3; i < 6; i++) hwp->writeDacData(hwp, save->DAC[i]); if (readError) { /* * save the default lookup table */ memmove(save->DAC, defaultDAC, 768); xf86DrvMsg(scrninfp->scrnIndex, X_WARNING, "Cannot read colourmap from VGA. Will restore with default\n"); } else { /* save the colourmap */ hwp->writeDacReadAddr(hwp, 0x02); for (i = 6; i < 768; i++) { save->DAC[i] = hwp->readDacData(hwp); DACDelay(hwp); switch (i % 3) { case 0: DebugF("DAC[0x%02x] = 0x%02x, ", i / 3, save->DAC[i]); break; case 1: DebugF("0x%02x, ", save->DAC[i]); break; case 2: DebugF("0x%02x\n", save->DAC[i]); } } } hwp->disablePalette(hwp); hwp->cmapSaved = TRUE; #endif } /* * vgaHWSave -- * save the current VGA state */ void vgaHWSave(ScrnInfoPtr scrninfp, vgaRegPtr save, int flags) { if (save == NULL) return; if (flags & VGA_SR_CMAP) vgaHWSaveColormap(scrninfp, save); if (flags & VGA_SR_MODE) vgaHWSaveMode(scrninfp, save); if (flags & VGA_SR_FONTS) vgaHWSaveFonts(scrninfp, save); } /* * vgaHWInit -- * Handle the initialization, etc. of a screen. * Return FALSE on failure. */ Bool vgaHWInit(ScrnInfoPtr scrninfp, DisplayModePtr mode) { unsigned int i; vgaHWPtr hwp; vgaRegPtr regp; int depth = scrninfp->depth; /* * make sure the vgaHWRec is allocated */ if (!vgaHWGetHWRec(scrninfp)) return FALSE; hwp = VGAHWPTR(scrninfp); regp = &hwp->ModeReg; /* * compute correct Hsync & Vsync polarity */ if ((mode->Flags & (V_PHSYNC | V_NHSYNC)) && (mode->Flags & (V_PVSYNC | V_NVSYNC))) { regp->MiscOutReg = 0x23; if (mode->Flags & V_NHSYNC) regp->MiscOutReg |= 0x40; if (mode->Flags & V_NVSYNC) regp->MiscOutReg |= 0x80; } else { int VDisplay = mode->VDisplay; if (mode->Flags & V_DBLSCAN) VDisplay *= 2; if (mode->VScan > 1) VDisplay *= mode->VScan; if (VDisplay < 400) regp->MiscOutReg = 0xA3; /* +hsync -vsync */ else if (VDisplay < 480) regp->MiscOutReg = 0x63; /* -hsync +vsync */ else if (VDisplay < 768) regp->MiscOutReg = 0xE3; /* -hsync -vsync */ else regp->MiscOutReg = 0x23; /* +hsync +vsync */ } regp->MiscOutReg |= (mode->ClockIndex & 0x03) << 2; /* * Time Sequencer */ if (depth == 4) regp->Sequencer[0] = 0x02; else regp->Sequencer[0] = 0x00; if (mode->Flags & V_CLKDIV2) regp->Sequencer[1] = 0x09; else regp->Sequencer[1] = 0x01; if (depth == 1) regp->Sequencer[2] = 1 << BIT_PLANE; else regp->Sequencer[2] = 0x0F; regp->Sequencer[3] = 0x00; /* Font select */ if (depth < 8) regp->Sequencer[4] = 0x06; /* Misc */ else regp->Sequencer[4] = 0x0E; /* Misc */ /* * CRTC Controller */ regp->CRTC[0] = (mode->CrtcHTotal >> 3) - 5; regp->CRTC[1] = (mode->CrtcHDisplay >> 3) - 1; regp->CRTC[2] = (mode->CrtcHBlankStart >> 3) - 1; regp->CRTC[3] = (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F) | 0x80; i = (((mode->CrtcHSkew << 2) + 0x10) & ~0x1F); if (i < 0x80) regp->CRTC[3] |= i; regp->CRTC[4] = (mode->CrtcHSyncStart >> 3); regp->CRTC[5] = ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2) | (((mode->CrtcHSyncEnd >> 3)) & 0x1F); regp->CRTC[6] = (mode->CrtcVTotal - 2) & 0xFF; regp->CRTC[7] = (((mode->CrtcVTotal - 2) & 0x100) >> 8) | (((mode->CrtcVDisplay - 1) & 0x100) >> 7) | ((mode->CrtcVSyncStart & 0x100) >> 6) | (((mode->CrtcVBlankStart - 1) & 0x100) >> 5) | 0x10 | (((mode->CrtcVTotal - 2) & 0x200) >> 4) | (((mode->CrtcVDisplay - 1) & 0x200) >> 3) | ((mode->CrtcVSyncStart & 0x200) >> 2); regp->CRTC[8] = 0x00; regp->CRTC[9] = (((mode->CrtcVBlankStart - 1) & 0x200) >> 4) | 0x40; if (mode->Flags & V_DBLSCAN) regp->CRTC[9] |= 0x80; if (mode->VScan >= 32) regp->CRTC[9] |= 0x1F; else if (mode->VScan > 1) regp->CRTC[9] |= mode->VScan - 1; regp->CRTC[10] = 0x00; regp->CRTC[11] = 0x00; regp->CRTC[12] = 0x00; regp->CRTC[13] = 0x00; regp->CRTC[14] = 0x00; regp->CRTC[15] = 0x00; regp->CRTC[16] = mode->CrtcVSyncStart & 0xFF; regp->CRTC[17] = (mode->CrtcVSyncEnd & 0x0F) | 0x20; regp->CRTC[18] = (mode->CrtcVDisplay - 1) & 0xFF; regp->CRTC[19] = scrninfp->displayWidth >> 4; /* just a guess */ regp->CRTC[20] = 0x00; regp->CRTC[21] = (mode->CrtcVBlankStart - 1) & 0xFF; regp->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF; if (depth < 8) regp->CRTC[23] = 0xE3; else regp->CRTC[23] = 0xC3; regp->CRTC[24] = 0xFF; vgaHWHBlankKGA(mode, regp, 0, KGA_FIX_OVERSCAN | KGA_ENABLE_ON_ZERO); vgaHWVBlankKGA(mode, regp, 0, KGA_FIX_OVERSCAN | KGA_ENABLE_ON_ZERO); /* * Theory resumes here.... */ /* * Graphics Display Controller */ regp->Graphics[0] = 0x00; regp->Graphics[1] = 0x00; regp->Graphics[2] = 0x00; regp->Graphics[3] = 0x00; if (depth == 1) { regp->Graphics[4] = BIT_PLANE; regp->Graphics[5] = 0x00; } else { regp->Graphics[4] = 0x00; if (depth == 4) regp->Graphics[5] = 0x02; else regp->Graphics[5] = 0x40; } regp->Graphics[6] = 0x05; /* only map 64k VGA memory !!!! */ regp->Graphics[7] = 0x0F; regp->Graphics[8] = 0xFF; if (depth == 1) { /* Initialise the Mono map according to which bit-plane gets used */ for (i = 0; i < 16; i++) if ((i & (1 << BIT_PLANE)) != 0) regp->Attribute[i] = WHITE_VALUE; else regp->Attribute[i] = BLACK_VALUE; regp->Attribute[16] = 0x01; /* -VGA2- *//* wrong for the ET4000 */ if (!hwp->ShowOverscan) regp->Attribute[OVERSCAN] = OVERSCAN_VALUE; /* -VGA2- */ } else { regp->Attribute[0] = 0x00; /* standard colormap translation */ regp->Attribute[1] = 0x01; regp->Attribute[2] = 0x02; regp->Attribute[3] = 0x03; regp->Attribute[4] = 0x04; regp->Attribute[5] = 0x05; regp->Attribute[6] = 0x06; regp->Attribute[7] = 0x07; regp->Attribute[8] = 0x08; regp->Attribute[9] = 0x09; regp->Attribute[10] = 0x0A; regp->Attribute[11] = 0x0B; regp->Attribute[12] = 0x0C; regp->Attribute[13] = 0x0D; regp->Attribute[14] = 0x0E; regp->Attribute[15] = 0x0F; if (depth == 4) regp->Attribute[16] = 0x81; /* wrong for the ET4000 */ else regp->Attribute[16] = 0x41; /* wrong for the ET4000 */ /* Attribute[17] (overscan) initialised in vgaHWGetHWRec() */ } regp->Attribute[18] = 0x0F; regp->Attribute[19] = 0x00; regp->Attribute[20] = 0x00; return TRUE; } /* * OK, so much for theory. Now, let's deal with the >real< world... * * The above CRTC settings are precise in theory, except that many, if not * most, VGA clones fail to reset the blanking signal when the character or * line counter reaches [HV]Total. In this case, the signal is only * unblanked when the counter reaches [HV]BlankEnd (mod 64, 128 or 256 as * the case may be) at the start of the >next< scanline or frame, which * means only part of the screen shows. This affects how null overscans * are to be implemented on such adapters. * * Henceforth, VGA cores that implement this broken, but unfortunately * common, behaviour are to be designated as KGA's, in honour of Koen * Gadeyne, whose zeal to eliminate overscans (read: fury) set in motion * a series of events that led to the discovery of this problem. * * Some VGA's are KGA's only in the horizontal, or only in the vertical, * some in both, others in neither. Don't let anyone tell you there is * such a thing as a VGA "standard"... And, thank the Creator for the fact * that Hilbert spaces are not yet implemented in this industry. * * The following implements a trick suggested by David Dawes. This sets * [HV]BlankEnd to zero if the blanking interval does not already contain a * 0-point, and decrements it by one otherwise. In the latter case, this * will produce a left and/or top overscan which the colourmap code will * (still) need to ensure is as close to black as possible. This will make * the behaviour consistent across all chipsets, while allowing all * chipsets to display the entire screen. Non-KGA drivers can ignore the * following in their own copy of this code. * * -- TSI @ UQV, 1998.08.21 */ CARD32 vgaHWHBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags) { int nExtBits = (nBits < 6) ? 0 : nBits - 6; CARD32 ExtBits; CARD32 ExtBitMask = ((1 << nExtBits) - 1) << 6; regp->CRTC[3] = (regp->CRTC[3] & ~0x1F) | (((mode->CrtcHBlankEnd >> 3) - 1) & 0x1F); regp->CRTC[5] = (regp->CRTC[5] & ~0x80) | ((((mode->CrtcHBlankEnd >> 3) - 1) & 0x20) << 2); ExtBits = ((mode->CrtcHBlankEnd >> 3) - 1) & ExtBitMask; /* First the horizontal case */ if ((Flags & KGA_FIX_OVERSCAN) && ((mode->CrtcHBlankEnd >> 3) == (mode->CrtcHTotal >> 3))) { int i = (regp->CRTC[3] & 0x1F) | ((regp->CRTC[5] & 0x80) >> 2) | ExtBits; if (Flags & KGA_ENABLE_ON_ZERO) { if ((i-- > (((mode->CrtcHBlankStart >> 3) - 1) & (0x3F | ExtBitMask))) && (mode->CrtcHBlankEnd == mode->CrtcHTotal)) i = 0; } else if (Flags & KGA_BE_TOT_DEC) i--; regp->CRTC[3] = (regp->CRTC[3] & ~0x1F) | (i & 0x1F); regp->CRTC[5] = (regp->CRTC[5] & ~0x80) | ((i << 2) & 0x80); ExtBits = i & ExtBitMask; } return ExtBits >> 6; } /* * The vertical case is a little trickier. Some VGA's ignore bit 0x80 of * CRTC[22]. Also, in some cases, a zero CRTC[22] will still blank the * very first scanline in a double- or multi-scanned mode. This last case * needs further investigation. */ CARD32 vgaHWVBlankKGA(DisplayModePtr mode, vgaRegPtr regp, int nBits, unsigned int Flags) { CARD32 ExtBits; CARD32 nExtBits = (nBits < 8) ? 0 : (nBits - 8); CARD32 ExtBitMask = ((1 << nExtBits) - 1) << 8; /* If width is not known nBits should be 0. In this * case BitMask is set to 0 so we can check for it. */ CARD32 BitMask = (nBits < 7) ? 0 : ((1 << nExtBits) - 1); int VBlankStart = (mode->CrtcVBlankStart - 1) & 0xFF; regp->CRTC[22] = (mode->CrtcVBlankEnd - 1) & 0xFF; ExtBits = (mode->CrtcVBlankEnd - 1) & ExtBitMask; if ((Flags & KGA_FIX_OVERSCAN) && (mode->CrtcVBlankEnd == mode->CrtcVTotal)) /* Null top overscan */ { int i = regp->CRTC[22] | ExtBits; if (Flags & KGA_ENABLE_ON_ZERO) { if (((BitMask && ((i & BitMask) > (VBlankStart & BitMask))) || ((i > VBlankStart) && /* 8-bit case */ ((i & 0x7F) > (VBlankStart & 0x7F)))) && /* 7-bit case */ !(regp->CRTC[9] & 0x9F)) /* 1 scanline/row */ i = 0; else i = (i - 1); } else if (Flags & KGA_BE_TOT_DEC) i = (i - 1); regp->CRTC[22] = i & 0xFF; ExtBits = i & 0xFF00; } return ExtBits >> 8; } /* * these are some more hardware specific helpers, formerly in vga.c */ static void vgaHWGetHWRecPrivate(void) { if (vgaHWPrivateIndex < 0) vgaHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); return; } static void vgaHWFreeRegs(vgaRegPtr regp) { free(regp->CRTC); regp->CRTC = regp->Sequencer = regp->Graphics = regp->Attribute = NULL; regp->numCRTC = regp->numSequencer = regp->numGraphics = regp->numAttribute = 0; } static Bool vgaHWAllocRegs(vgaRegPtr regp) { unsigned char *buf; if ((regp->numCRTC + regp->numSequencer + regp->numGraphics + regp->numAttribute) == 0) return FALSE; buf = calloc(regp->numCRTC + regp->numSequencer + regp->numGraphics + regp->numAttribute, 1); if (!buf) return FALSE; regp->CRTC = buf; regp->Sequencer = regp->CRTC + regp->numCRTC; regp->Graphics = regp->Sequencer + regp->numSequencer; regp->Attribute = regp->Graphics + regp->numGraphics; return TRUE; } Bool vgaHWAllocDefaultRegs(vgaRegPtr regp) { regp->numCRTC = VGA_NUM_CRTC; regp->numSequencer = VGA_NUM_SEQ; regp->numGraphics = VGA_NUM_GFX; regp->numAttribute = VGA_NUM_ATTR; return vgaHWAllocRegs(regp); } Bool vgaHWSetRegCounts(ScrnInfoPtr scrp, int numCRTC, int numSequencer, int numGraphics, int numAttribute) { #define VGAHWMINNUM(regtype) \ ((newMode.num##regtype < regp->num##regtype) ? \ (newMode.num##regtype) : (regp->num##regtype)) #define VGAHWCOPYREGSET(regtype) \ memcpy (newMode.regtype, regp->regtype, VGAHWMINNUM(regtype)) vgaRegRec newMode, newSaved; vgaRegPtr regp; regp = &VGAHWPTR(scrp)->ModeReg; memcpy(&newMode, regp, sizeof(vgaRegRec)); /* allocate space for new registers */ regp = &newMode; regp->numCRTC = numCRTC; regp->numSequencer = numSequencer; regp->numGraphics = numGraphics; regp->numAttribute = numAttribute; if (!vgaHWAllocRegs(regp)) return FALSE; regp = &VGAHWPTR(scrp)->SavedReg; memcpy(&newSaved, regp, sizeof(vgaRegRec)); regp = &newSaved; regp->numCRTC = numCRTC; regp->numSequencer = numSequencer; regp->numGraphics = numGraphics; regp->numAttribute = numAttribute; if (!vgaHWAllocRegs(regp)) { vgaHWFreeRegs(&newMode); return FALSE; } /* allocations succeeded, copy register data into new space */ regp = &VGAHWPTR(scrp)->ModeReg; VGAHWCOPYREGSET(CRTC); VGAHWCOPYREGSET(Sequencer); VGAHWCOPYREGSET(Graphics); VGAHWCOPYREGSET(Attribute); regp = &VGAHWPTR(scrp)->SavedReg; VGAHWCOPYREGSET(CRTC); VGAHWCOPYREGSET(Sequencer); VGAHWCOPYREGSET(Graphics); VGAHWCOPYREGSET(Attribute); /* free old register arrays */ regp = &VGAHWPTR(scrp)->ModeReg; vgaHWFreeRegs(regp); memcpy(regp, &newMode, sizeof(vgaRegRec)); regp = &VGAHWPTR(scrp)->SavedReg; vgaHWFreeRegs(regp); memcpy(regp, &newSaved, sizeof(vgaRegRec)); return TRUE; #undef VGAHWMINNUM #undef VGAHWCOPYREGSET } Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src) { vgaHWFreeRegs(dst); memcpy(dst, src, sizeof(vgaRegRec)); if (!vgaHWAllocRegs(dst)) return FALSE; memcpy(dst->CRTC, src->CRTC, src->numCRTC); memcpy(dst->Sequencer, src->Sequencer, src->numSequencer); memcpy(dst->Graphics, src->Graphics, src->numGraphics); memcpy(dst->Attribute, src->Attribute, src->numAttribute); return TRUE; } Bool vgaHWGetHWRec(ScrnInfoPtr scrp) { vgaRegPtr regp; vgaHWPtr hwp; int i; /* * Let's make sure that the private exists and allocate one. */ vgaHWGetHWRecPrivate(); /* * New privates are always set to NULL, so we can check if the allocation * has already been done. */ if (VGAHWPTR(scrp)) return TRUE; hwp = VGAHWPTRLVAL(scrp) = xnfcalloc(sizeof(vgaHWRec), 1); regp = &VGAHWPTR(scrp)->ModeReg; if ((!vgaHWAllocDefaultRegs(&VGAHWPTR(scrp)->SavedReg)) || (!vgaHWAllocDefaultRegs(&VGAHWPTR(scrp)->ModeReg))) { free(hwp); return FALSE; } if (scrp->bitsPerPixel == 1) { rgb blackColour = scrp->display->blackColour, whiteColour = scrp->display->whiteColour; if (blackColour.red > 0x3F) blackColour.red = 0x3F; if (blackColour.green > 0x3F) blackColour.green = 0x3F; if (blackColour.blue > 0x3F) blackColour.blue = 0x3F; if (whiteColour.red > 0x3F) whiteColour.red = 0x3F; if (whiteColour.green > 0x3F) whiteColour.green = 0x3F; if (whiteColour.blue > 0x3F) whiteColour.blue = 0x3F; if ((blackColour.red == whiteColour.red) && (blackColour.green == whiteColour.green) && (blackColour.blue == whiteColour.blue)) { blackColour.red ^= 0x3F; blackColour.green ^= 0x3F; blackColour.blue ^= 0x3F; } /* * initialize default colormap for monochrome */ for (i = 0; i < 3; i++) regp->DAC[i] = 0x00; for (i = 3; i < 768; i++) regp->DAC[i] = 0x3F; i = BLACK_VALUE * 3; regp->DAC[i++] = blackColour.red; regp->DAC[i++] = blackColour.green; regp->DAC[i] = blackColour.blue; i = WHITE_VALUE * 3; regp->DAC[i++] = whiteColour.red; regp->DAC[i++] = whiteColour.green; regp->DAC[i] = whiteColour.blue; i = OVERSCAN_VALUE * 3; regp->DAC[i++] = 0x00; regp->DAC[i++] = 0x00; regp->DAC[i] = 0x00; } else { /* Set all colours to black */ for (i = 0; i < 768; i++) regp->DAC[i] = 0x00; /* ... and the overscan */ if (scrp->depth >= 4) regp->Attribute[OVERSCAN] = 0xFF; } if (xf86FindOption(scrp->confScreen->options, "ShowOverscan")) { xf86MarkOptionUsedByName(scrp->confScreen->options, "ShowOverscan"); xf86DrvMsg(scrp->scrnIndex, X_CONFIG, "Showing overscan area\n"); regp->DAC[765] = 0x3F; regp->DAC[766] = 0x00; regp->DAC[767] = 0x3F; regp->Attribute[OVERSCAN] = 0xFF; hwp->ShowOverscan = TRUE; } else hwp->ShowOverscan = FALSE; hwp->paletteEnabled = FALSE; hwp->cmapSaved = FALSE; hwp->MapSize = 0; hwp->pScrn = scrp; hwp->dev = xf86GetPciInfoForEntity(scrp->entityList[0]); return TRUE; } void vgaHWFreeHWRec(ScrnInfoPtr scrp) { if (vgaHWPrivateIndex >= 0) { vgaHWPtr hwp = VGAHWPTR(scrp); if (!hwp) return; pci_device_close_io(hwp->dev, hwp->io); free(hwp->FontInfo1); free(hwp->FontInfo2); free(hwp->TextInfo); vgaHWFreeRegs(&hwp->ModeReg); vgaHWFreeRegs(&hwp->SavedReg); free(hwp); VGAHWPTRLVAL(scrp) = NULL; } } Bool vgaHWMapMem(ScrnInfoPtr scrp) { vgaHWPtr hwp = VGAHWPTR(scrp); if (hwp->Base) return TRUE; /* If not set, initialise with the defaults */ if (hwp->MapSize == 0) hwp->MapSize = VGA_DEFAULT_MEM_SIZE; if (hwp->MapPhys == 0) hwp->MapPhys = VGA_DEFAULT_PHYS_ADDR; /* * Map as VIDMEM_MMIO_32BIT because WC * is bad when there is page flipping. * XXX This is not correct but we do it * for now. */ DebugF("Mapping VGAMem\n"); pci_device_map_legacy(hwp->dev, hwp->MapPhys, hwp->MapSize, PCI_DEV_MAP_FLAG_WRITABLE, &hwp->Base); return hwp->Base != NULL; } void vgaHWUnmapMem(ScrnInfoPtr scrp) { vgaHWPtr hwp = VGAHWPTR(scrp); if (hwp->Base == NULL) return; DebugF("Unmapping VGAMem\n"); pci_device_unmap_legacy(hwp->dev, hwp->Base, hwp->MapSize); hwp->Base = NULL; } int vgaHWGetIndex(void) { return vgaHWPrivateIndex; } void vgaHWGetIOBase(vgaHWPtr hwp) { hwp->IOBase = (hwp->readMiscOut(hwp) & 0x01) ? VGA_IOBASE_COLOR : VGA_IOBASE_MONO; xf86DrvMsgVerb(hwp->pScrn->scrnIndex, X_INFO, 3, "vgaHWGetIOBase: hwp->IOBase is 0x%04x\n", hwp->IOBase); } void vgaHWLock(vgaHWPtr hwp) { /* Protect CRTC[0-7] */ hwp->writeCrtc(hwp, 0x11, hwp->readCrtc(hwp, 0x11) | 0x80); } void vgaHWUnlock(vgaHWPtr hwp) { /* Unprotect CRTC[0-7] */ hwp->writeCrtc(hwp, 0x11, hwp->readCrtc(hwp, 0x11) & ~0x80); } void vgaHWEnable(vgaHWPtr hwp) { hwp->writeEnable(hwp, hwp->readEnable(hwp) | 0x01); } void vgaHWDisable(vgaHWPtr hwp) { hwp->writeEnable(hwp, hwp->readEnable(hwp) & ~0x01); } static void vgaHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO * colors, VisualPtr pVisual) { vgaHWPtr hwp = VGAHWPTR(pScrn); int i, index; for (i = 0; i < numColors; i++) { index = indices[i]; hwp->writeDacWriteAddr(hwp, index); DACDelay(hwp); hwp->writeDacData(hwp, colors[index].red); DACDelay(hwp); hwp->writeDacData(hwp, colors[index].green); DACDelay(hwp); hwp->writeDacData(hwp, colors[index].blue); DACDelay(hwp); } /* This shouldn't be necessary, but we'll play safe. */ hwp->disablePalette(hwp); } static void vgaHWSetOverscan(ScrnInfoPtr pScrn, int overscan) { vgaHWPtr hwp = VGAHWPTR(pScrn); if (overscan < 0 || overscan > 255) return; hwp->enablePalette(hwp); hwp->writeAttr(hwp, OVERSCAN, overscan); #ifdef DEBUGOVERSCAN { int ov = hwp->readAttr(hwp, OVERSCAN); int red, green, blue; hwp->writeDacReadAddr(hwp, ov); red = hwp->readDacData(hwp); green = hwp->readDacData(hwp); blue = hwp->readDacData(hwp); ErrorF("Overscan index is 0x%02x, colours are #%02x%02x%02x\n", ov, red, green, blue); } #endif hwp->disablePalette(hwp); } Bool vgaHWHandleColormaps(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); if (pScrn->depth > 1 && pScrn->depth <= 8) { return xf86HandleColormaps(pScreen, 1 << pScrn->depth, pScrn->rgbBits, vgaHWLoadPalette, pScrn->depth > 4 ? vgaHWSetOverscan : NULL, CMAP_RELOAD_ON_MODE_SWITCH); } return TRUE; } /* ----------------------- DDC support ------------------------*/ /* * Adjust v_active, v_blank, v_sync, v_sync_end, v_blank_end, v_total * to read out EDID at a faster rate. Allowed maximum is 25kHz with * 20 usec v_sync active. Set positive v_sync polarity, turn off lightpen * readback, enable access to cr00-cr07. */ /* vertical timings */ #define DISPLAY_END 0x04 #define BLANK_START DISPLAY_END #define SYNC_START BLANK_START #define SYNC_END 0x09 #define BLANK_END SYNC_END #define V_TOTAL BLANK_END /* this function doesn't have to be reentrant for our purposes */ struct _vgaDdcSave { unsigned char cr03; unsigned char cr06; unsigned char cr07; unsigned char cr09; unsigned char cr10; unsigned char cr11; unsigned char cr12; unsigned char cr15; unsigned char cr16; unsigned char msr; }; void vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) { vgaHWPtr hwp = VGAHWPTR(pScrn); unsigned char tmp; struct _vgaDdcSave *save; switch (speed) { case DDC_FAST: if (hwp->ddc != NULL) break; hwp->ddc = xnfcalloc(sizeof(struct _vgaDdcSave), 1); save = (struct _vgaDdcSave *) hwp->ddc; /* Lightpen register disable - allow access to cr10 & 11; just in case */ save->cr03 = hwp->readCrtc(hwp, 0x03); hwp->writeCrtc(hwp, 0x03, (save->cr03 | 0x80)); save->cr12 = hwp->readCrtc(hwp, 0x12); hwp->writeCrtc(hwp, 0x12, DISPLAY_END); save->cr15 = hwp->readCrtc(hwp, 0x15); hwp->writeCrtc(hwp, 0x15, BLANK_START); save->cr10 = hwp->readCrtc(hwp, 0x10); hwp->writeCrtc(hwp, 0x10, SYNC_START); save->cr11 = hwp->readCrtc(hwp, 0x11); /* unprotect group 1 registers; just in case ... */ hwp->writeCrtc(hwp, 0x11, ((save->cr11 & 0x70) | SYNC_END)); save->cr16 = hwp->readCrtc(hwp, 0x16); hwp->writeCrtc(hwp, 0x16, BLANK_END); save->cr06 = hwp->readCrtc(hwp, 0x06); hwp->writeCrtc(hwp, 0x06, V_TOTAL); /* all values have less than 8 bit - mask out 9th and 10th bits */ save->cr09 = hwp->readCrtc(hwp, 0x09); hwp->writeCrtc(hwp, 0x09, (save->cr09 & 0xDF)); save->cr07 = hwp->readCrtc(hwp, 0x07); hwp->writeCrtc(hwp, 0x07, (save->cr07 & 0x10)); /* vsync polarity negative & ensure a 25MHz clock */ save->msr = hwp->readMiscOut(hwp); hwp->writeMiscOut(hwp, ((save->msr & 0xF3) | 0x80)); break; case DDC_SLOW: if (hwp->ddc == NULL) break; save = (struct _vgaDdcSave *) hwp->ddc; hwp->writeMiscOut(hwp, save->msr); hwp->writeCrtc(hwp, 0x07, save->cr07); tmp = hwp->readCrtc(hwp, 0x09); hwp->writeCrtc(hwp, 0x09, ((save->cr09 & 0x20) | (tmp & 0xDF))); hwp->writeCrtc(hwp, 0x06, save->cr06); hwp->writeCrtc(hwp, 0x16, save->cr16); hwp->writeCrtc(hwp, 0x11, save->cr11); hwp->writeCrtc(hwp, 0x10, save->cr10); hwp->writeCrtc(hwp, 0x15, save->cr15); hwp->writeCrtc(hwp, 0x12, save->cr12); hwp->writeCrtc(hwp, 0x03, save->cr03); free(save); hwp->ddc = NULL; break; default: break; } } DDC1SetSpeedProc vgaHWddc1SetSpeedWeak(void) { return vgaHWddc1SetSpeed; } SaveScreenProcPtr vgaHWSaveScreenWeak(void) { return vgaHWSaveScreen; } /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc) (ScrnInfoPtr, int), void (*ProtectRegs) (ScrnInfoPtr, Bool), void (*BlankScreen) (ScrnInfoPtr, Bool), unsigned long vertsyncreg, int maskval, int knownclkindex, int knownclkvalue) { register int status = vertsyncreg; unsigned long i, cnt, rcnt, sync; vgaHWPtr hwp = VGAHWPTR(pScrn); /* First save registers that get written on */ (*ClockFunc) (pScrn, CLK_REG_SAVE); if (num > MAXCLOCKS) num = MAXCLOCKS; for (i = 0; i < num; i++) { if (ProtectRegs) (*ProtectRegs) (pScrn, TRUE); if (!(*ClockFunc) (pScrn, i)) { pScrn->clock[i] = -1; continue; } if (ProtectRegs) (*ProtectRegs) (pScrn, FALSE); if (BlankScreen) (*BlankScreen) (pScrn, FALSE); usleep(50000); /* let VCO stabilise */ cnt = 0; sync = 200000; while ((pci_io_read8(hwp->io, status) & maskval) == 0x00) if (sync-- == 0) goto finish; /* Something appears to be happening, so reset sync count */ sync = 200000; while ((pci_io_read8(hwp->io, status) & maskval) == maskval) if (sync-- == 0) goto finish; /* Something appears to be happening, so reset sync count */ sync = 200000; while ((pci_io_read8(hwp->io, status) & maskval) == 0x00) if (sync-- == 0) goto finish; for (rcnt = 0; rcnt < 5; rcnt++) { while (!(pci_io_read8(hwp->io, status) & maskval)) cnt++; while ((pci_io_read8(hwp->io, status) & maskval)) cnt++; } finish: pScrn->clock[i] = cnt ? cnt : -1; if (BlankScreen) (*BlankScreen) (pScrn, TRUE); } for (i = 0; i < num; i++) { if (i != knownclkindex) { if (pScrn->clock[i] == -1) { pScrn->clock[i] = 0; } else { pScrn->clock[i] = (int) (0.5 + (((float) knownclkvalue) * pScrn->clock[knownclkindex]) / (pScrn->clock[i])); /* Round to nearest 10KHz */ pScrn->clock[i] += 5; pScrn->clock[i] /= 10; pScrn->clock[i] *= 10; } } } pScrn->clock[knownclkindex] = knownclkvalue; pScrn->numClocks = num; /* Restore registers that were written on */ (*ClockFunc) (pScrn, CLK_REG_RESTORE); } xorg-server-21.1.16/hw/xfree86/vgahw/vgaHWmodule.c0000644000175000017500000000070714757411105015246 /* * Copyright 1998 by The XFree86 Project, Inc */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include "xf86Module.h" static XF86ModuleVersionInfo VersRec = { "vgahw", MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, 0, 1, 0, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_NONE, {0, 0, 0, 0} }; _X_EXPORT XF86ModuleData vgahwModuleData = { &VersRec, NULL, NULL }; xorg-server-21.1.16/hw/xfree86/x86emu/0000755000175000017500000000000014757411134012756 5xorg-server-21.1.16/hw/xfree86/x86emu/meson.build0000644000175000017500000000040514757411105015035 srcs_xorg_x86emu = [ 'debug.c', 'decode.c', 'fpu.c', 'ops2.c', 'ops.c', 'prim_ops.c', 'sys.c', ] xorg_x86emu = static_library('x86emu', srcs_xorg_x86emu, include_directories: [inc, xorg_inc], dependencies: common_dep, ) xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/0000755000175000017500000000000014757411134014112 5xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/debug.h0000644000175000017500000001706114757411105015274 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for debug definitions. * ****************************************************************************/ #ifndef __X86EMU_DEBUG_H #define __X86EMU_DEBUG_H /*---------------------- Macros and type definitions ----------------------*/ /* checks to be enabled for "runtime" */ #define CHECK_IP_FETCH_F 0x1 #define CHECK_SP_ACCESS_F 0x2 #define CHECK_MEM_ACCESS_F 0x4 /*using regular linear pointer */ #define CHECK_DATA_ACCESS_F 0x8 /*using segment:offset */ #ifdef DEBUG #define CHECK_IP_FETCH() (M.x86.check & CHECK_IP_FETCH_F) #define CHECK_SP_ACCESS() (M.x86.check & CHECK_SP_ACCESS_F) #define CHECK_MEM_ACCESS() (M.x86.check & CHECK_MEM_ACCESS_F) #define CHECK_DATA_ACCESS() (M.x86.check & CHECK_DATA_ACCESS_F) #else #define CHECK_IP_FETCH() #define CHECK_SP_ACCESS() #define CHECK_MEM_ACCESS() #define CHECK_DATA_ACCESS() #endif #ifdef DEBUG #define DEBUG_INSTRUMENT() (M.x86.debug & DEBUG_INSTRUMENT_F) #define DEBUG_DECODE() (M.x86.debug & DEBUG_DECODE_F) #define DEBUG_TRACE() (M.x86.debug & DEBUG_TRACE_F) #define DEBUG_STEP() (M.x86.debug & DEBUG_STEP_F) #define DEBUG_DISASSEMBLE() (M.x86.debug & DEBUG_DISASSEMBLE_F) #define DEBUG_BREAK() (M.x86.debug & DEBUG_BREAK_F) #define DEBUG_SVC() (M.x86.debug & DEBUG_SVC_F) #define DEBUG_SAVE_IP_CS() (M.x86.debug & DEBUG_SAVE_IP_CS_F) #define DEBUG_FS() (M.x86.debug & DEBUG_FS_F) #define DEBUG_PROC() (M.x86.debug & DEBUG_PROC_F) #define DEBUG_SYSINT() (M.x86.debug & DEBUG_SYSINT_F) #define DEBUG_TRACECALL() (M.x86.debug & DEBUG_TRACECALL_F) #define DEBUG_TRACECALLREGS() (M.x86.debug & DEBUG_TRACECALL_REGS_F) #define DEBUG_SYS() (M.x86.debug & DEBUG_SYS_F) #define DEBUG_MEM_TRACE() (M.x86.debug & DEBUG_MEM_TRACE_F) #define DEBUG_IO_TRACE() (M.x86.debug & DEBUG_IO_TRACE_F) #define DEBUG_DECODE_NOPRINT() (M.x86.debug & DEBUG_DECODE_NOPRINT_F) #else #define DEBUG_INSTRUMENT() 0 #define DEBUG_DECODE() 0 #define DEBUG_TRACE() 0 #define DEBUG_STEP() 0 #define DEBUG_DISASSEMBLE() 0 #define DEBUG_BREAK() 0 #define DEBUG_SVC() 0 #define DEBUG_SAVE_IP_CS() 0 #define DEBUG_FS() 0 #define DEBUG_PROC() 0 #define DEBUG_SYSINT() 0 #define DEBUG_TRACECALL() 0 #define DEBUG_TRACECALLREGS() 0 #define DEBUG_SYS() 0 #define DEBUG_MEM_TRACE() 0 #define DEBUG_IO_TRACE() 0 #define DEBUG_DECODE_NOPRINT() 0 #endif #ifdef DEBUG #define DECODE_PRINTF(x) if (DEBUG_DECODE()) \ x86emu_decode_printf("%s",x) #define DECODE_PRINTF2(x,y) if (DEBUG_DECODE()) \ x86emu_decode_printf(x,y) /* * The following allows us to look at the bytes of an instruction. The * first INCR_INSTRN_LEN, is called every time bytes are consumed in * the decoding process. The SAVE_IP_CS is called initially when the * major opcode of the instruction is accessed. */ #define INC_DECODED_INST_LEN(x) \ if (DEBUG_DECODE()) \ x86emu_inc_decoded_inst_len(x) #define SAVE_IP_CS(x,y) \ if (DEBUG_DECODE() | DEBUG_TRACECALL() | DEBUG_BREAK() \ | DEBUG_IO_TRACE() | DEBUG_SAVE_IP_CS()) { \ M.x86.saved_cs = x; \ M.x86.saved_ip = y; \ } #else #define INC_DECODED_INST_LEN(x) #define DECODE_PRINTF(x) #define DECODE_PRINTF2(x,y) #define SAVE_IP_CS(x,y) #endif #ifdef DEBUG #define TRACE_REGS() \ if (DEBUG_DISASSEMBLE()) { \ x86emu_just_disassemble(); \ goto EndOfTheInstructionProcedure; \ } \ if (DEBUG_TRACE() || DEBUG_DECODE()) X86EMU_trace_regs() #else #define TRACE_REGS() #endif #ifdef DEBUG #define SINGLE_STEP() if (DEBUG_STEP()) x86emu_single_step() #else #define SINGLE_STEP() #endif #define TRACE_AND_STEP() \ TRACE_REGS(); \ SINGLE_STEP() #ifdef DEBUG #define START_OF_INSTR() #define END_OF_INSTR() EndOfTheInstructionProcedure: x86emu_end_instr(); #define END_OF_INSTR_NO_TRACE() x86emu_end_instr(); #else #define START_OF_INSTR() #define END_OF_INSTR() #define END_OF_INSTR_NO_TRACE() #endif #ifdef DEBUG #define CALL_TRACE(u,v,w,x,s) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: CALL %s%04x:%04x\n", u , v, s, w, x); #define RETURN_TRACE(n,u,v) \ if (DEBUG_TRACECALLREGS()) \ x86emu_dump_regs(); \ if (DEBUG_TRACECALL()) \ printk("%04x:%04x: %s\n",u,v,n); #else #define CALL_TRACE(u,v,w,x,s) #define RETURN_TRACE(n,u,v) #endif #ifdef DEBUG #define DB(x) x #else #define DB(x) #endif /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif extern void x86emu_inc_decoded_inst_len(int x); extern void x86emu_decode_printf(const char *x, ...) _X_ATTRIBUTE_PRINTF(1,2); extern void x86emu_just_disassemble(void); extern void x86emu_single_step(void); extern void x86emu_end_instr(void); extern void x86emu_dump_regs(void); extern void x86emu_dump_xregs(void); extern void x86emu_print_int_vect(u16 iv); extern void x86emu_instrument_instruction(void); extern void x86emu_check_ip_access(void); extern void x86emu_check_sp_access(void); extern void x86emu_check_mem_access(u32 p); extern void x86emu_check_data_access(uint s, uint o); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_DEBUG_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/decode.h0000644000175000017500000000721414757411105015430 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for instruction decoding logic. * ****************************************************************************/ #ifndef __X86EMU_DECODE_H #define __X86EMU_DECODE_H /*---------------------- Macros and type definitions ----------------------*/ /* Instruction Decoding Stuff */ #define FETCH_DECODE_MODRM(mod,rh,rl) fetch_decode_modrm(&mod,&rh,&rl) #define DECODE_RM_BYTE_REGISTER(r) decode_rm_byte_register(r) #define DECODE_RM_WORD_REGISTER(r) decode_rm_word_register(r) #define DECODE_RM_LONG_REGISTER(r) decode_rm_long_register(r) #define DECODE_CLEAR_SEGOVR() M.x86.mode &= ~SYSMODE_CLRMASK /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif void x86emu_intr_raise(u8 type); void fetch_decode_modrm(int *mod, int *regh, int *regl); u8 fetch_byte_imm(void); u16 fetch_word_imm(void); u32 fetch_long_imm(void); u8 fetch_data_byte(uint offset); u8 fetch_data_byte_abs(uint segment, uint offset); u16 fetch_data_word(uint offset); u16 fetch_data_word_abs(uint segment, uint offset); u32 fetch_data_long(uint offset); u32 fetch_data_long_abs(uint segment, uint offset); void store_data_byte(uint offset, u8 val); void store_data_byte_abs(uint segment, uint offset, u8 val); void store_data_word(uint offset, u16 val); void store_data_word_abs(uint segment, uint offset, u16 val); void store_data_long(uint offset, u32 val); void store_data_long_abs(uint segment, uint offset, u32 val); u8 *decode_rm_byte_register(int reg); u16 *decode_rm_word_register(int reg); u32 *decode_rm_long_register(int reg); u16 *decode_rm_seg_register(int reg); u32 decode_rm00_address(int rm); u32 decode_rm01_address(int rm); u32 decode_rm10_address(int rm); u32 decode_sib_address(int sib, int mod); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_DECODE_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/fpu.h0000644000175000017500000000474014757411105015000 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for FPU instruction decoding. * ****************************************************************************/ #ifndef __X86EMU_FPU_H #define __X86EMU_FPU_H #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* these have to be defined, whether 8087 support compiled in or not. */ extern void x86emuOp_esc_coprocess_d8(u8 op1); extern void x86emuOp_esc_coprocess_d9(u8 op1); extern void x86emuOp_esc_coprocess_da(u8 op1); extern void x86emuOp_esc_coprocess_db(u8 op1); extern void x86emuOp_esc_coprocess_dc(u8 op1); extern void x86emuOp_esc_coprocess_dd(u8 op1); extern void x86emuOp_esc_coprocess_de(u8 op1); extern void x86emuOp_esc_coprocess_df(u8 op1); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_FPU_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/fpu_regs.h0000644000175000017500000000731114757411105016015 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for FPU register definitions. * ****************************************************************************/ #ifndef __X86EMU_FPU_REGS_H #define __X86EMU_FPU_REGS_H #ifdef X86_FPU_SUPPORT #ifdef PACK #pragma PACK #endif /* Basic 8087 register can hold any of the following values: */ union x86_fpu_reg_u { s8 tenbytes[10]; double dval; float fval; s16 sval; s32 lval; }; struct x86_fpu_reg { union x86_fpu_reg_u reg; char tag; }; /* * Since we are not going to worry about the problems of aliasing * registers, every time a register is modified, its result type is * set in the tag fields for that register. If some operation * attempts to access the type in a way inconsistent with its current * storage format, then we flag the operation. If common, we'll * attempt the conversion. */ #define X86_FPU_VALID 0x80 #define X86_FPU_REGTYP(r) ((r) & 0x7F) #define X86_FPU_WORD 0x0 #define X86_FPU_SHORT 0x1 #define X86_FPU_LONG 0x2 #define X86_FPU_FLOAT 0x3 #define X86_FPU_DOUBLE 0x4 #define X86_FPU_LDBL 0x5 #define X86_FPU_BSD 0x6 #define X86_FPU_STKTOP 0 struct x86_fpu_registers { struct x86_fpu_reg x86_fpu_stack[8]; int x86_fpu_flags; int x86_fpu_config; /* rounding modes, etc. */ short x86_fpu_tos, x86_fpu_bos; }; #ifdef END_PACK #pragma END_PACK #endif /* * There are two versions of the following macro. * * One version is for opcode D9, for which there are more than 32 * instructions encoded in the second byte of the opcode. * * The other version, deals with all the other 7 i87 opcodes, for * which there are only 32 strings needed to describe the * instructions. */ #endif /* X86_FPU_SUPPORT */ #ifdef DEBUG #define DECODE_PRINTINSTR32(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<3)+(rh)]); #define DECODE_PRINTINSTR256(t,mod,rh,rl) \ DECODE_PRINTF(t[(mod<<6)+(rh<<3)+(rl)]); #else #define DECODE_PRINTINSTR32(t,mod,rh,rl) #define DECODE_PRINTINSTR256(t,mod,rh,rl) #endif #endif /* __X86EMU_FPU_REGS_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/ops.h0000644000175000017500000000362214757411105015005 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for operand decoding functions. * ****************************************************************************/ #ifndef __X86EMU_OPS_H #define __X86EMU_OPS_H extern void (*x86emu_optab[0x100]) (u8 op1); extern void (*x86emu_optab2[0x100]) (u8 op2); #endif /* __X86EMU_OPS_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/prim_asm.h0000644000175000017500000007147014757411105016021 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: Watcom C++ 10.6 or later * Environment: Any * Developer: Kendall Bennett * * Description: Inline assembler versions of the primitive operand * functions for faster performance. At the moment this is * x86 inline assembler, but these functions could be replaced * with native inline assembler for each supported processor * platform. * ****************************************************************************/ #ifndef __X86EMU_PRIM_ASM_H #define __X86EMU_PRIM_ASM_H #ifdef __WATCOMC__ #ifndef VALIDATE #define __HAVE_INLINE_ASSEMBLER__ #endif u32 get_flags_asm(void); #pragma aux get_flags_asm = \ "pushf" \ "pop eax" \ value [eax] \ modify exact [eax]; u16 aaa_word_asm(u32 * flags, u16 d); #pragma aux aaa_word_asm = \ "push [edi]" \ "popf" \ "aaa" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u16 aas_word_asm(u32 * flags, u16 d); #pragma aux aas_word_asm = \ "push [edi]" \ "popf" \ "aas" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u16 aad_word_asm(u32 * flags, u16 d); #pragma aux aad_word_asm = \ "push [edi]" \ "popf" \ "aad" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u16 aam_word_asm(u32 * flags, u8 d); #pragma aux aam_word_asm = \ "push [edi]" \ "popf" \ "aam" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [ax] \ modify exact [ax]; u8 adc_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux adc_byte_asm = \ "push [edi]" \ "popf" \ "adc al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 adc_word_asm(u32 * flags, u16 d, u16 s); #pragma aux adc_word_asm = \ "push [edi]" \ "popf" \ "adc ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 adc_long_asm(u32 * flags, u32 d, u32 s); #pragma aux adc_long_asm = \ "push [edi]" \ "popf" \ "adc eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 add_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux add_byte_asm = \ "push [edi]" \ "popf" \ "add al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 add_word_asm(u32 * flags, u16 d, u16 s); #pragma aux add_word_asm = \ "push [edi]" \ "popf" \ "add ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 add_long_asm(u32 * flags, u32 d, u32 s); #pragma aux add_long_asm = \ "push [edi]" \ "popf" \ "add eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 and_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux and_byte_asm = \ "push [edi]" \ "popf" \ "and al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 and_word_asm(u32 * flags, u16 d, u16 s); #pragma aux and_word_asm = \ "push [edi]" \ "popf" \ "and ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 and_long_asm(u32 * flags, u32 d, u32 s); #pragma aux and_long_asm = \ "push [edi]" \ "popf" \ "and eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 cmp_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux cmp_byte_asm = \ "push [edi]" \ "popf" \ "cmp al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 cmp_word_asm(u32 * flags, u16 d, u16 s); #pragma aux cmp_word_asm = \ "push [edi]" \ "popf" \ "cmp ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 cmp_long_asm(u32 * flags, u32 d, u32 s); #pragma aux cmp_long_asm = \ "push [edi]" \ "popf" \ "cmp eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 daa_byte_asm(u32 * flags, u8 d); #pragma aux daa_byte_asm = \ "push [edi]" \ "popf" \ "daa" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u8 das_byte_asm(u32 * flags, u8 d); #pragma aux das_byte_asm = \ "push [edi]" \ "popf" \ "das" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u8 dec_byte_asm(u32 * flags, u8 d); #pragma aux dec_byte_asm = \ "push [edi]" \ "popf" \ "dec al" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u16 dec_word_asm(u32 * flags, u16 d); #pragma aux dec_word_asm = \ "push [edi]" \ "popf" \ "dec ax" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u32 dec_long_asm(u32 * flags, u32 d); #pragma aux dec_long_asm = \ "push [edi]" \ "popf" \ "dec eax" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] \ value [eax] \ modify exact [eax]; u8 inc_byte_asm(u32 * flags, u8 d); #pragma aux inc_byte_asm = \ "push [edi]" \ "popf" \ "inc al" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u16 inc_word_asm(u32 * flags, u16 d); #pragma aux inc_word_asm = \ "push [edi]" \ "popf" \ "inc ax" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u32 inc_long_asm(u32 * flags, u32 d); #pragma aux inc_long_asm = \ "push [edi]" \ "popf" \ "inc eax" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] \ value [eax] \ modify exact [eax]; u8 or_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux or_byte_asm = \ "push [edi]" \ "popf" \ "or al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 or_word_asm(u32 * flags, u16 d, u16 s); #pragma aux or_word_asm = \ "push [edi]" \ "popf" \ "or ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 or_long_asm(u32 * flags, u32 d, u32 s); #pragma aux or_long_asm = \ "push [edi]" \ "popf" \ "or eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 neg_byte_asm(u32 * flags, u8 d); #pragma aux neg_byte_asm = \ "push [edi]" \ "popf" \ "neg al" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u16 neg_word_asm(u32 * flags, u16 d); #pragma aux neg_word_asm = \ "push [edi]" \ "popf" \ "neg ax" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u32 neg_long_asm(u32 * flags, u32 d); #pragma aux neg_long_asm = \ "push [edi]" \ "popf" \ "neg eax" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] \ value [eax] \ modify exact [eax]; u8 not_byte_asm(u32 * flags, u8 d); #pragma aux not_byte_asm = \ "push [edi]" \ "popf" \ "not al" \ "pushf" \ "pop [edi]" \ parm [edi] [al] \ value [al] \ modify exact [al]; u16 not_word_asm(u32 * flags, u16 d); #pragma aux not_word_asm = \ "push [edi]" \ "popf" \ "not ax" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] \ value [ax] \ modify exact [ax]; u32 not_long_asm(u32 * flags, u32 d); #pragma aux not_long_asm = \ "push [edi]" \ "popf" \ "not eax" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] \ value [eax] \ modify exact [eax]; u8 rcl_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux rcl_byte_asm = \ "push [edi]" \ "popf" \ "rcl al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 rcl_word_asm(u32 * flags, u16 d, u8 s); #pragma aux rcl_word_asm = \ "push [edi]" \ "popf" \ "rcl ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 rcl_long_asm(u32 * flags, u32 d, u8 s); #pragma aux rcl_long_asm = \ "push [edi]" \ "popf" \ "rcl eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 rcr_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux rcr_byte_asm = \ "push [edi]" \ "popf" \ "rcr al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 rcr_word_asm(u32 * flags, u16 d, u8 s); #pragma aux rcr_word_asm = \ "push [edi]" \ "popf" \ "rcr ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 rcr_long_asm(u32 * flags, u32 d, u8 s); #pragma aux rcr_long_asm = \ "push [edi]" \ "popf" \ "rcr eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 rol_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux rol_byte_asm = \ "push [edi]" \ "popf" \ "rol al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 rol_word_asm(u32 * flags, u16 d, u8 s); #pragma aux rol_word_asm = \ "push [edi]" \ "popf" \ "rol ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 rol_long_asm(u32 * flags, u32 d, u8 s); #pragma aux rol_long_asm = \ "push [edi]" \ "popf" \ "rol eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 ror_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux ror_byte_asm = \ "push [edi]" \ "popf" \ "ror al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 ror_word_asm(u32 * flags, u16 d, u8 s); #pragma aux ror_word_asm = \ "push [edi]" \ "popf" \ "ror ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 ror_long_asm(u32 * flags, u32 d, u8 s); #pragma aux ror_long_asm = \ "push [edi]" \ "popf" \ "ror eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 shl_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux shl_byte_asm = \ "push [edi]" \ "popf" \ "shl al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 shl_word_asm(u32 * flags, u16 d, u8 s); #pragma aux shl_word_asm = \ "push [edi]" \ "popf" \ "shl ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 shl_long_asm(u32 * flags, u32 d, u8 s); #pragma aux shl_long_asm = \ "push [edi]" \ "popf" \ "shl eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 shr_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux shr_byte_asm = \ "push [edi]" \ "popf" \ "shr al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 shr_word_asm(u32 * flags, u16 d, u8 s); #pragma aux shr_word_asm = \ "push [edi]" \ "popf" \ "shr ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 shr_long_asm(u32 * flags, u32 d, u8 s); #pragma aux shr_long_asm = \ "push [edi]" \ "popf" \ "shr eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u8 sar_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux sar_byte_asm = \ "push [edi]" \ "popf" \ "sar al,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [cl] \ value [al] \ modify exact [al cl]; u16 sar_word_asm(u32 * flags, u16 d, u8 s); #pragma aux sar_word_asm = \ "push [edi]" \ "popf" \ "sar ax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [cl] \ value [ax] \ modify exact [ax cl]; u32 sar_long_asm(u32 * flags, u32 d, u8 s); #pragma aux sar_long_asm = \ "push [edi]" \ "popf" \ "sar eax,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [cl] \ value [eax] \ modify exact [eax cl]; u16 shld_word_asm(u32 * flags, u16 d, u16 fill, u8 s); #pragma aux shld_word_asm = \ "push [edi]" \ "popf" \ "shld ax,dx,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [dx] [cl] \ value [ax] \ modify exact [ax dx cl]; u32 shld_long_asm(u32 * flags, u32 d, u32 fill, u8 s); #pragma aux shld_long_asm = \ "push [edi]" \ "popf" \ "shld eax,edx,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [edx] [cl] \ value [eax] \ modify exact [eax edx cl]; u16 shrd_word_asm(u32 * flags, u16 d, u16 fill, u8 s); #pragma aux shrd_word_asm = \ "push [edi]" \ "popf" \ "shrd ax,dx,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [dx] [cl] \ value [ax] \ modify exact [ax dx cl]; u32 shrd_long_asm(u32 * flags, u32 d, u32 fill, u8 s); #pragma aux shrd_long_asm = \ "push [edi]" \ "popf" \ "shrd eax,edx,cl" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [edx] [cl] \ value [eax] \ modify exact [eax edx cl]; u8 sbb_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux sbb_byte_asm = \ "push [edi]" \ "popf" \ "sbb al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 sbb_word_asm(u32 * flags, u16 d, u16 s); #pragma aux sbb_word_asm = \ "push [edi]" \ "popf" \ "sbb ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 sbb_long_asm(u32 * flags, u32 d, u32 s); #pragma aux sbb_long_asm = \ "push [edi]" \ "popf" \ "sbb eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; u8 sub_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux sub_byte_asm = \ "push [edi]" \ "popf" \ "sub al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 sub_word_asm(u32 * flags, u16 d, u16 s); #pragma aux sub_word_asm = \ "push [edi]" \ "popf" \ "sub ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 sub_long_asm(u32 * flags, u32 d, u32 s); #pragma aux sub_long_asm = \ "push [edi]" \ "popf" \ "sub eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; void test_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux test_byte_asm = \ "push [edi]" \ "popf" \ "test al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ modify exact [al bl]; void test_word_asm(u32 * flags, u16 d, u16 s); #pragma aux test_word_asm = \ "push [edi]" \ "popf" \ "test ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ modify exact [ax bx]; void test_long_asm(u32 * flags, u32 d, u32 s); #pragma aux test_long_asm = \ "push [edi]" \ "popf" \ "test eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ modify exact [eax ebx]; u8 xor_byte_asm(u32 * flags, u8 d, u8 s); #pragma aux xor_byte_asm = \ "push [edi]" \ "popf" \ "xor al,bl" \ "pushf" \ "pop [edi]" \ parm [edi] [al] [bl] \ value [al] \ modify exact [al bl]; u16 xor_word_asm(u32 * flags, u16 d, u16 s); #pragma aux xor_word_asm = \ "push [edi]" \ "popf" \ "xor ax,bx" \ "pushf" \ "pop [edi]" \ parm [edi] [ax] [bx] \ value [ax] \ modify exact [ax bx]; u32 xor_long_asm(u32 * flags, u32 d, u32 s); #pragma aux xor_long_asm = \ "push [edi]" \ "popf" \ "xor eax,ebx" \ "pushf" \ "pop [edi]" \ parm [edi] [eax] [ebx] \ value [eax] \ modify exact [eax ebx]; void imul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); #pragma aux imul_byte_asm = \ "push [edi]" \ "popf" \ "imul bl" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; void imul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); #pragma aux imul_word_asm = \ "push [edi]" \ "popf" \ "imul bx" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ "mov [ecx],dx" \ parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; void imul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); #pragma aux imul_long_asm = \ "push [edi]" \ "popf" \ "imul ebx" \ "pushf" \ "pop [edi]" \ "mov [esi],eax" \ "mov [ecx],edx" \ parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; void mul_byte_asm(u32 * flags, u16 * ax, u8 d, u8 s); #pragma aux mul_byte_asm = \ "push [edi]" \ "popf" \ "mul bl" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ parm [edi] [esi] [al] [bl] \ modify exact [esi ax bl]; void mul_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 d, u16 s); #pragma aux mul_word_asm = \ "push [edi]" \ "popf" \ "mul bx" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ "mov [ecx],dx" \ parm [edi] [esi] [ecx] [ax] [bx]\ modify exact [esi edi ax bx dx]; void mul_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 d, u32 s); #pragma aux mul_long_asm = \ "push [edi]" \ "popf" \ "mul ebx" \ "pushf" \ "pop [edi]" \ "mov [esi],eax" \ "mov [ecx],edx" \ parm [edi] [esi] [ecx] [eax] [ebx] \ modify exact [esi edi eax ebx edx]; void idiv_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); #pragma aux idiv_byte_asm = \ "push [edi]" \ "popf" \ "idiv bl" \ "pushf" \ "pop [edi]" \ "mov [esi],al" \ "mov [ecx],ah" \ parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; void idiv_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); #pragma aux idiv_word_asm = \ "push [edi]" \ "popf" \ "idiv bx" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ "mov [ecx],dx" \ parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; void idiv_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); #pragma aux idiv_long_asm = \ "push [edi]" \ "popf" \ "idiv ebx" \ "pushf" \ "pop [edi]" \ "mov [esi],eax" \ "mov [ecx],edx" \ parm [edi] [esi] [ecx] [eax] [edx] [ebx]\ modify exact [esi edi eax edx ebx]; void div_byte_asm(u32 * flags, u8 * al, u8 * ah, u16 d, u8 s); #pragma aux div_byte_asm = \ "push [edi]" \ "popf" \ "div bl" \ "pushf" \ "pop [edi]" \ "mov [esi],al" \ "mov [ecx],ah" \ parm [edi] [esi] [ecx] [ax] [bl]\ modify exact [esi edi ax bl]; void div_word_asm(u32 * flags, u16 * ax, u16 * dx, u16 dlo, u16 dhi, u16 s); #pragma aux div_word_asm = \ "push [edi]" \ "popf" \ "div bx" \ "pushf" \ "pop [edi]" \ "mov [esi],ax" \ "mov [ecx],dx" \ parm [edi] [esi] [ecx] [ax] [dx] [bx]\ modify exact [esi edi ax dx bx]; void div_long_asm(u32 * flags, u32 * eax, u32 * edx, u32 dlo, u32 dhi, u32 s); #pragma aux div_long_asm = \ "push [edi]" \ "popf" \ "div ebx" \ "pushf" \ "pop [edi]" \ "mov [esi],eax" \ "mov [ecx],edx" \ parm [edi] [esi] [ecx] [eax] [edx] [ebx]\ modify exact [esi edi eax edx ebx]; #endif #endif /* __X86EMU_PRIM_ASM_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/prim_ops.h0000644000175000017500000001120414757411105016027 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for primitive operation functions. * ****************************************************************************/ #ifndef __X86EMU_PRIM_OPS_H #define __X86EMU_PRIM_OPS_H #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif u16 aaa_word(u16 d); u16 aas_word(u16 d); u16 aad_word(u16 d); u16 aam_word(u8 d); u8 adc_byte(u8 d, u8 s); u16 adc_word(u16 d, u16 s); u32 adc_long(u32 d, u32 s); u8 add_byte(u8 d, u8 s); u16 add_word(u16 d, u16 s); u32 add_long(u32 d, u32 s); u8 and_byte(u8 d, u8 s); u16 and_word(u16 d, u16 s); u32 and_long(u32 d, u32 s); u8 cmp_byte(u8 d, u8 s); u16 cmp_word(u16 d, u16 s); u32 cmp_long(u32 d, u32 s); u8 daa_byte(u8 d); u8 das_byte(u8 d); u8 dec_byte(u8 d); u16 dec_word(u16 d); u32 dec_long(u32 d); u8 inc_byte(u8 d); u16 inc_word(u16 d); u32 inc_long(u32 d); u8 or_byte(u8 d, u8 s); u16 or_word(u16 d, u16 s); u32 or_long(u32 d, u32 s); u8 neg_byte(u8 s); u16 neg_word(u16 s); u32 neg_long(u32 s); u8 not_byte(u8 s); u16 not_word(u16 s); u32 not_long(u32 s); u8 rcl_byte(u8 d, u8 s); u16 rcl_word(u16 d, u8 s); u32 rcl_long(u32 d, u8 s); u8 rcr_byte(u8 d, u8 s); u16 rcr_word(u16 d, u8 s); u32 rcr_long(u32 d, u8 s); u8 rol_byte(u8 d, u8 s); u16 rol_word(u16 d, u8 s); u32 rol_long(u32 d, u8 s); u8 ror_byte(u8 d, u8 s); u16 ror_word(u16 d, u8 s); u32 ror_long(u32 d, u8 s); u8 shl_byte(u8 d, u8 s); u16 shl_word(u16 d, u8 s); u32 shl_long(u32 d, u8 s); u8 shr_byte(u8 d, u8 s); u16 shr_word(u16 d, u8 s); u32 shr_long(u32 d, u8 s); u8 sar_byte(u8 d, u8 s); u16 sar_word(u16 d, u8 s); u32 sar_long(u32 d, u8 s); u16 shld_word(u16 d, u16 fill, u8 s); u32 shld_long(u32 d, u32 fill, u8 s); u16 shrd_word(u16 d, u16 fill, u8 s); u32 shrd_long(u32 d, u32 fill, u8 s); u8 sbb_byte(u8 d, u8 s); u16 sbb_word(u16 d, u16 s); u32 sbb_long(u32 d, u32 s); u8 sub_byte(u8 d, u8 s); u16 sub_word(u16 d, u16 s); u32 sub_long(u32 d, u32 s); void test_byte(u8 d, u8 s); void test_word(u16 d, u16 s); void test_long(u32 d, u32 s); u8 xor_byte(u8 d, u8 s); u16 xor_word(u16 d, u16 s); u32 xor_long(u32 d, u32 s); void imul_byte(u8 s); void imul_word(u16 s); void imul_long(u32 s); void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s); void mul_byte(u8 s); void mul_word(u16 s); void mul_long(u32 s); void idiv_byte(u8 s); void idiv_word(u16 s); void idiv_long(u32 s); void div_byte(u8 s); void div_word(u16 s); void div_long(u32 s); void ins(int size); void outs(int size); u16 mem_access_word(int addr); void push_word(u16 w); void push_long(u32 w); u16 pop_word(void); u32 pop_long(void); void cpuid(void); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_PRIM_OPS_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/prim_x86_gcc.h0000644000175000017500000000603714757411105016477 /**************************************************************************** * * Inline helpers for x86emu * * Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: GNU C * Environment: GCC on i386 or x86-64 * Developer: Bart Trojanowski * * Description: This file defines a few x86 macros that can be used by the * emulator to execute native instructions. * * For PIC vs non-PIC code refer to: * http://sam.zoy.org/blog/2007-04-13-shlib-with-non-pic-code-have-inline-assembly-and-pic-mix-well * ****************************************************************************/ #ifndef __X86EMU_PRIM_X86_GCC_H #define __X86EMU_PRIM_X86_GCC_H #include "x86emu/types.h" #if !defined(__GNUC__) || !(defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__)) #error This file is intended to be used by gcc on i386 or x86-64 system #endif #if defined(__PIC__) && defined(__i386__) #define X86EMU_HAS_HW_CPUID 1 static inline void hw_cpuid(u32 * a, u32 * b, u32 * c, u32 * d) { __asm__ __volatile__("pushl %%ebx \n\t" "cpuid \n\t" "movl %%ebx, %1 \n\t" "popl %%ebx \n\t":"=a"(*a), "=r"(*b), "=c"(*c), "=d"(*d) :"a"(*a), "c"(*c) :"cc"); } #else /* ! (__PIC__ && __i386__) */ #define x86EMU_HAS_HW_CPUID 1 static inline void hw_cpuid(u32 * a, u32 * b, u32 * c, u32 * d) { __asm__ __volatile__("cpuid":"=a"(*a), "=b"(*b), "=c"(*c), "=d"(*d) :"a"(*a), "c"(*c) :"cc"); } #endif /* __PIC__ && __i386__ */ #endif /* __X86EMU_PRIM_X86_GCC_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/regs.h0000644000175000017500000002402014757411105015137 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for x86 register definitions. * ****************************************************************************/ #ifndef __X86EMU_REGS_H #define __X86EMU_REGS_H #include /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK #pragma PACK #endif /* * General EAX, EBX, ECX, EDX type registers. Note that for * portability, and speed, the issue of byte swapping is not addressed * in the registers. All registers are stored in the default format * available on the host machine. The only critical issue is that the * registers should line up EXACTLY in the same manner as they do in * the 386. That is: * * EAX & 0xff === AL * EAX & 0xffff == AX * * etc. The result is that a lot of the calculations can then be * done using the native instruction set fully. */ #ifdef __BIG_ENDIAN__ typedef struct { u32 e_reg; } I32_reg_t; typedef struct { u16 filler0, x_reg; } I16_reg_t; typedef struct { u8 filler0, filler1, h_reg, l_reg; } I8_reg_t; #else /* !__BIG_ENDIAN__ */ typedef struct { u32 e_reg; } I32_reg_t; typedef struct { u16 x_reg; } I16_reg_t; typedef struct { u8 l_reg, h_reg; } I8_reg_t; #endif /* BIG_ENDIAN */ typedef union { I32_reg_t I32_reg; I16_reg_t I16_reg; I8_reg_t I8_reg; } i386_general_register; struct i386_general_regs { i386_general_register A, B, C, D; }; typedef struct i386_general_regs Gen_reg_t; struct i386_special_regs { i386_general_register SP, BP, SI, DI, IP; u32 FLAGS; }; /* * Segment registers here represent the 16 bit quantities * CS, DS, ES, SS. */ #if defined(__sun) && defined(CS) /* avoid conflicts with Solaris sys/regset.h */ # undef CS # undef DS # undef SS # undef ES # undef FS # undef GS #endif struct i386_segment_regs { u16 CS, DS, SS, ES, FS, GS; }; /* 8 bit registers */ #define R_AH gen.A.I8_reg.h_reg #define R_AL gen.A.I8_reg.l_reg #define R_BH gen.B.I8_reg.h_reg #define R_BL gen.B.I8_reg.l_reg #define R_CH gen.C.I8_reg.h_reg #define R_CL gen.C.I8_reg.l_reg #define R_DH gen.D.I8_reg.h_reg #define R_DL gen.D.I8_reg.l_reg /* 16 bit registers */ #define R_AX gen.A.I16_reg.x_reg #define R_BX gen.B.I16_reg.x_reg #define R_CX gen.C.I16_reg.x_reg #define R_DX gen.D.I16_reg.x_reg /* 32 bit extended registers */ #define R_EAX gen.A.I32_reg.e_reg #define R_EBX gen.B.I32_reg.e_reg #define R_ECX gen.C.I32_reg.e_reg #define R_EDX gen.D.I32_reg.e_reg /* special registers */ #define R_SP spc.SP.I16_reg.x_reg #define R_BP spc.BP.I16_reg.x_reg #define R_SI spc.SI.I16_reg.x_reg #define R_DI spc.DI.I16_reg.x_reg #define R_IP spc.IP.I16_reg.x_reg #define R_FLG spc.FLAGS /* special registers */ #define R_ESP spc.SP.I32_reg.e_reg #define R_EBP spc.BP.I32_reg.e_reg #define R_ESI spc.SI.I32_reg.e_reg #define R_EDI spc.DI.I32_reg.e_reg #define R_EIP spc.IP.I32_reg.e_reg #define R_EFLG spc.FLAGS /* segment registers */ #define R_CS seg.CS #define R_DS seg.DS #define R_SS seg.SS #define R_ES seg.ES #define R_FS seg.FS #define R_GS seg.GS /* flag conditions */ #define FB_CF 0x0001 /* CARRY flag */ #define FB_PF 0x0004 /* PARITY flag */ #define FB_AF 0x0010 /* AUX flag */ #define FB_ZF 0x0040 /* ZERO flag */ #define FB_SF 0x0080 /* SIGN flag */ #define FB_TF 0x0100 /* TRAP flag */ #define FB_IF 0x0200 /* INTERRUPT ENABLE flag */ #define FB_DF 0x0400 /* DIR flag */ #define FB_OF 0x0800 /* OVERFLOW flag */ /* 80286 and above always have bit#1 set */ #define F_ALWAYS_ON (0x0002) /* flag bits always on */ /* * Define a mask for only those flag bits we will ever pass back * (via PUSHF) */ #define F_MSK (FB_CF|FB_PF|FB_AF|FB_ZF|FB_SF|FB_TF|FB_IF|FB_DF|FB_OF) /* following bits masked in to a 16bit quantity */ #define F_CF 0x0001 /* CARRY flag */ #define F_PF 0x0004 /* PARITY flag */ #define F_AF 0x0010 /* AUX flag */ #define F_ZF 0x0040 /* ZERO flag */ #define F_SF 0x0080 /* SIGN flag */ #define F_TF 0x0100 /* TRAP flag */ #define F_IF 0x0200 /* INTERRUPT ENABLE flag */ #define F_DF 0x0400 /* DIR flag */ #define F_OF 0x0800 /* OVERFLOW flag */ #define TOGGLE_FLAG(flag) (M.x86.R_FLG ^= (flag)) #define SET_FLAG(flag) (M.x86.R_FLG |= (flag)) #define CLEAR_FLAG(flag) (M.x86.R_FLG &= ~(flag)) #define ACCESS_FLAG(flag) (M.x86.R_FLG & (flag)) #define CLEARALL_FLAG(m) (M.x86.R_FLG = 0) #define CONDITIONAL_SET_FLAG(COND,FLAG) \ if (COND) SET_FLAG(FLAG); else CLEAR_FLAG(FLAG) #define F_PF_CALC 0x010000 /* PARITY flag has been calced */ #define F_ZF_CALC 0x020000 /* ZERO flag has been calced */ #define F_SF_CALC 0x040000 /* SIGN flag has been calced */ #define F_ALL_CALC 0xff0000 /* All have been calced */ /* * Emulator machine state. * Segment usage control. */ #define SYSMODE_SEG_DS_SS 0x00000001 #define SYSMODE_SEGOVR_CS 0x00000002 #define SYSMODE_SEGOVR_DS 0x00000004 #define SYSMODE_SEGOVR_ES 0x00000008 #define SYSMODE_SEGOVR_FS 0x00000010 #define SYSMODE_SEGOVR_GS 0x00000020 #define SYSMODE_SEGOVR_SS 0x00000040 #define SYSMODE_PREFIX_REPE 0x00000080 #define SYSMODE_PREFIX_REPNE 0x00000100 #define SYSMODE_PREFIX_DATA 0x00000200 #define SYSMODE_PREFIX_ADDR 0x00000400 #define SYSMODE_INTR_PENDING 0x10000000 #define SYSMODE_EXTRN_INTR 0x20000000 #define SYSMODE_HALTED 0x40000000 #define SYSMODE_SEGMASK (SYSMODE_SEG_DS_SS | \ SYSMODE_SEGOVR_CS | \ SYSMODE_SEGOVR_DS | \ SYSMODE_SEGOVR_ES | \ SYSMODE_SEGOVR_FS | \ SYSMODE_SEGOVR_GS | \ SYSMODE_SEGOVR_SS) #define SYSMODE_CLRMASK (SYSMODE_SEG_DS_SS | \ SYSMODE_SEGOVR_CS | \ SYSMODE_SEGOVR_DS | \ SYSMODE_SEGOVR_ES | \ SYSMODE_SEGOVR_FS | \ SYSMODE_SEGOVR_GS | \ SYSMODE_SEGOVR_SS | \ SYSMODE_PREFIX_DATA | \ SYSMODE_PREFIX_ADDR) #define INTR_SYNCH 0x1 #define INTR_ASYNCH 0x2 #define INTR_HALTED 0x4 typedef struct { struct i386_general_regs gen; struct i386_special_regs spc; struct i386_segment_regs seg; /* * MODE contains information on: * REPE prefix 2 bits repe,repne * SEGMENT overrides 5 bits normal,DS,SS,CS,ES * Delayed flag set 3 bits (zero, signed, parity) * reserved 6 bits * interrupt # 8 bits instruction raised interrupt * BIOS video segregs 4 bits * Interrupt Pending 1 bits * Extern interrupt 1 bits * Halted 1 bits */ u32 mode; volatile int intr; /* mask of pending interrupts */ int debug; #ifdef DEBUG int check; u16 saved_ip; u16 saved_cs; int enc_pos; int enc_str_pos; char decode_buf[32]; /* encoded byte stream */ char decoded_buf[256]; /* disassembled strings */ #endif u8 intno; u8 __pad[3]; } X86EMU_regs; /**************************************************************************** REMARKS: Structure maintaining the emulator machine state. MEMBERS: mem_base - Base real mode memory for the emulator mem_size - Size of the real mode memory block for the emulator private - private data pointer x86 - X86 registers ****************************************************************************/ typedef struct { unsigned long mem_base; unsigned long mem_size; void *private; X86EMU_regs x86; } X86EMU_sysEnv; #ifdef END_PACK #pragma END_PACK #endif /*----------------------------- Global Variables --------------------------*/ #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif /* Global emulator machine state. * * We keep it global to avoid pointer dereferences in the code for speed. */ extern X86EMU_sysEnv _X86EMU_env; #define M _X86EMU_env /*-------------------------- Function Prototypes --------------------------*/ /* Function to log information at runtime */ void printk(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1, 2); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_REGS_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/types.h0000644000175000017500000000506014757411105015346 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for x86 emulator type definitions. * ****************************************************************************/ #ifndef __X86EMU_TYPES_H #define __X86EMU_TYPES_H #ifndef NO_SYS_HEADERS #include #endif /* * The following kludge is an attempt to work around typedef conflicts with * . */ #define u8 x86emuu8 #define u16 x86emuu16 #define u32 x86emuu32 #define u64 x86emuu64 #define s8 x86emus8 #define s16 x86emus16 #define s32 x86emus32 #define s64 x86emus64 #define uint x86emuuint #define sint x86emusint /*---------------------- Macros and type definitions ----------------------*/ #include #include typedef uint8_t u8; typedef uint16_t u16; typedef uint32_t u32; typedef uint64_t u64; typedef int8_t s8; typedef int16_t s16; typedef int32_t s32; typedef int64_t s64; typedef unsigned int uint; typedef int sint; typedef u16 X86EMU_pioAddr; #endif /* __X86EMU_TYPES_H */ xorg-server-21.1.16/hw/xfree86/x86emu/x86emu/x86emui.h0000644000175000017500000000734014757411105015512 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for system specific functions. These functions * are always compiled and linked in the OS dependent libraries, * and never in a binary portable driver. * ****************************************************************************/ #ifndef __X86EMU_X86EMUI_H #define __X86EMU_X86EMUI_H /* If we are compiling in C++ mode, we can compile some functions as * inline to increase performance (however the code size increases quite * dramatically in this case). */ #if defined(__cplusplus) #define _INLINE inline #else #define _INLINE static #endif /* Get rid of unused parameters in C++ compilation mode */ #ifdef __cplusplus #define X86EMU_UNUSED(v) #else #define X86EMU_UNUSED(v) v #endif #include "x86emu.h" #include "x86emu/regs.h" #include "x86emu/debug.h" #include "x86emu/decode.h" #include "x86emu/ops.h" #include "x86emu/prim_ops.h" #include "x86emu/fpu.h" #include "x86emu/fpu_regs.h" #ifndef NO_SYS_HEADERS #include #include #include /* avoid conflicts with Solaris sys/regset.h */ # if defined(__sun) && defined(CS) # undef CS # undef DS # undef SS # undef ES # undef FS # undef GS # endif #endif /* NO_SYS_HEADERS */ /*--------------------------- Inline Functions ----------------------------*/ #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif extern u8(X86APIP sys_rdb) (u32 addr); extern u16(X86APIP sys_rdw) (u32 addr); extern u32(X86APIP sys_rdl) (u32 addr); extern void (X86APIP sys_wrb) (u32 addr, u8 val); extern void (X86APIP sys_wrw) (u32 addr, u16 val); extern void (X86APIP sys_wrl) (u32 addr, u32 val); extern u8(X86APIP sys_inb) (X86EMU_pioAddr addr); extern u16(X86APIP sys_inw) (X86EMU_pioAddr addr); extern u32(X86APIP sys_inl) (X86EMU_pioAddr addr); extern void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val); extern void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val); extern void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_X86EMUI_H */ xorg-server-21.1.16/hw/xfree86/x86emu/Makefile.am0000644000175000017500000000133214757411105014727 if INT10_X86EMU noinst_LTLIBRARIES = libx86emu.la endif libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ ops.c \ prim_ops.c \ sys.c \ x86emu.h AM_CPPFLAGS = AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = validate.c \ x86emu/debug.h \ x86emu/decode.h \ x86emu/fpu.h \ x86emu/fpu_regs.h \ x86emu/ops.h \ x86emu/prim_asm.h \ x86emu/prim_ops.h \ x86emu/prim_x86_gcc.h \ x86emu/regs.h \ x86emu/types.h \ x86emu/x86emui.h xorg-server-21.1.16/hw/xfree86/x86emu/Makefile.in0000644000175000017500000006417114757411115014753 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/x86emu ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libx86emu_la_LIBADD = am_libx86emu_la_OBJECTS = debug.lo decode.lo fpu.lo ops2.lo ops.lo \ prim_ops.lo sys.lo libx86emu_la_OBJECTS = $(am_libx86emu_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @INT10_X86EMU_TRUE@am_libx86emu_la_rpath = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/debug.Plo ./$(DEPDIR)/decode.Plo \ ./$(DEPDIR)/fpu.Plo ./$(DEPDIR)/ops.Plo ./$(DEPDIR)/ops2.Plo \ ./$(DEPDIR)/prim_ops.Plo ./$(DEPDIR)/sys.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libx86emu_la_SOURCES) DIST_SOURCES = $(libx86emu_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @INT10_X86EMU_TRUE@noinst_LTLIBRARIES = libx86emu.la libx86emu_la_SOURCES = debug.c \ decode.c \ fpu.c \ ops2.c \ ops.c \ prim_ops.c \ sys.c \ x86emu.h AM_CPPFLAGS = AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) EXTRA_DIST = validate.c \ x86emu/debug.h \ x86emu/decode.h \ x86emu/fpu.h \ x86emu/fpu_regs.h \ x86emu/ops.h \ x86emu/prim_asm.h \ x86emu/prim_ops.h \ x86emu/prim_x86_gcc.h \ x86emu/regs.h \ x86emu/types.h \ x86emu/x86emui.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/x86emu/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/x86emu/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libx86emu.la: $(libx86emu_la_OBJECTS) $(libx86emu_la_DEPENDENCIES) $(EXTRA_libx86emu_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(am_libx86emu_la_rpath) $(libx86emu_la_OBJECTS) $(libx86emu_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpu.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ops2.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prim_ops.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sys.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/debug.Plo -rm -f ./$(DEPDIR)/decode.Plo -rm -f ./$(DEPDIR)/fpu.Plo -rm -f ./$(DEPDIR)/ops.Plo -rm -f ./$(DEPDIR)/ops2.Plo -rm -f ./$(DEPDIR)/prim_ops.Plo -rm -f ./$(DEPDIR)/sys.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/debug.Plo -rm -f ./$(DEPDIR)/decode.Plo -rm -f ./$(DEPDIR)/fpu.Plo -rm -f ./$(DEPDIR)/ops.Plo -rm -f ./$(DEPDIR)/ops2.Plo -rm -f ./$(DEPDIR)/prim_ops.Plo -rm -f ./$(DEPDIR)/sys.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/x86emu/debug.c0000644000175000017500000003006314757411105014130 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file contains the code to handle debugging of the * emulator. * ****************************************************************************/ #include "x86emu/x86emui.h" #include #include #include #ifndef NO_SYS_HEADERS #include #endif /*----------------------------- Implementation ----------------------------*/ #ifdef DEBUG static void print_encoded_bytes(u16 s, u16 o); static void print_decoded_instruction(void); static int parse_line(char *s, int *ps, int *n); /* should look something like debug's output. */ void X86EMU_trace_regs(void) { if (DEBUG_TRACE()) { x86emu_dump_regs(); } if (DEBUG_DECODE() && !DEBUG_DECODE_NOPRINT()) { printk("%04x:%04x ", M.x86.saved_cs, M.x86.saved_ip); print_encoded_bytes(M.x86.saved_cs, M.x86.saved_ip); print_decoded_instruction(); } } void X86EMU_trace_xregs(void) { if (DEBUG_TRACE()) { x86emu_dump_xregs(); } } void x86emu_just_disassemble(void) { /* * This routine called if the flag DEBUG_DISASSEMBLE is set kind * of a hack! */ printk("%04x:%04x ", M.x86.saved_cs, M.x86.saved_ip); print_encoded_bytes(M.x86.saved_cs, M.x86.saved_ip); print_decoded_instruction(); } static void disassemble_forward(u16 seg, u16 off, int n) { X86EMU_sysEnv tregs; int i; u8 op1; /* * hack, hack, hack. What we do is use the exact machinery set up * for execution, except that now there is an additional state * flag associated with the "execution", and we are using a copy * of the register struct. All the major opcodes, once fully * decoded, have the following two steps: TRACE_REGS(r,m); * SINGLE_STEP(r,m); which disappear if DEBUG is not defined to * the preprocessor. The TRACE_REGS macro expands to: * * if (debug&DEBUG_DISASSEMBLE) * {just_disassemble(); goto EndOfInstruction;} * if (debug&DEBUG_TRACE) trace_regs(r,m); * * ...... and at the last line of the routine. * * EndOfInstruction: end_instr(); * * Up to the point where TRACE_REG is expanded, NO modifications * are done to any register EXCEPT the IP register, for fetch and * decoding purposes. * * This was done for an entirely different reason, but makes a * nice way to get the system to help debug codes. */ tregs = M; tregs.x86.R_IP = off; tregs.x86.R_CS = seg; /* reset the decoding buffers */ tregs.x86.enc_str_pos = 0; tregs.x86.enc_pos = 0; /* turn on the "disassemble only, no execute" flag */ tregs.x86.debug |= DEBUG_DISASSEMBLE_F; /* DUMP NEXT n instructions to screen in straight_line fashion */ /* * This looks like the regular instruction fetch stream, except * that when this occurs, each fetched opcode, upon seeing the * DEBUG_DISASSEMBLE flag set, exits immediately after decoding * the instruction. XXX --- CHECK THAT MEM IS NOT AFFECTED!!! * Note the use of a copy of the register structure... */ for (i = 0; i < n; i++) { op1 = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); (x86emu_optab[op1]) (op1); } /* end major hack mode. */ } void x86emu_check_ip_access(void) { /* NULL as of now */ } void x86emu_check_sp_access(void) { } void x86emu_check_mem_access(u32 dummy) { /* check bounds, etc */ } void x86emu_check_data_access(uint dummy1, uint dummy2) { /* check bounds, etc */ } void x86emu_inc_decoded_inst_len(int x) { M.x86.enc_pos += x; } void x86emu_decode_printf(const char *x, ...) { va_list ap; char temp[100]; va_start(ap, x); vsnprintf(temp, sizeof(temp), x, ap); va_end(ap); sprintf(M.x86.decoded_buf + M.x86.enc_str_pos, "%s", temp); M.x86.enc_str_pos += strlen(temp); } void x86emu_end_instr(void) { M.x86.enc_str_pos = 0; M.x86.enc_pos = 0; } static void print_encoded_bytes(u16 s, u16 o) { int i; char buf1[64]; for (i = 0; i < M.x86.enc_pos; i++) { sprintf(buf1 + 2 * i, "%02x", fetch_data_byte_abs(s, o + i)); } printk("%-20s", buf1); } static void print_decoded_instruction(void) { printk("%s", M.x86.decoded_buf); } void x86emu_print_int_vect(u16 iv) { u16 seg, off; if (iv > 256) return; seg = fetch_data_word_abs(0, iv * 4); off = fetch_data_word_abs(0, iv * 4 + 2); printk("%04x:%04x ", seg, off); } void X86EMU_dump_memory(u16 seg, u16 off, u32 amt) { u32 start = off & 0xfffffff0; u32 end = (off + 16) & 0xfffffff0; u32 i; while (end <= off + amt) { printk("%04x:%04x ", seg, start); for (i = start; i < off; i++) printk(" "); for (; i < end; i++) printk("%02x ", fetch_data_byte_abs(seg, i)); printk("\n"); start = end; end = start + 16; } } void x86emu_single_step(void) { char s[1024]; int ps[10]; int ntok; int cmd; int done; int segment; int offset; static int breakpoint; static int noDecode = 1; if (DEBUG_BREAK()) { if (M.x86.saved_ip != breakpoint) { return; } else { M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F; M.x86.debug |= DEBUG_TRACE_F; M.x86.debug &= ~DEBUG_BREAK_F; print_decoded_instruction(); X86EMU_trace_regs(); } } done = 0; offset = M.x86.saved_ip; while (!done) { printk("-"); (void)fgets(s, 1023, stdin); cmd = parse_line(s, ps, &ntok); switch (cmd) { case 'u': disassemble_forward(M.x86.saved_cs, (u16) offset, 10); break; case 'd': if (ntok == 2) { segment = M.x86.saved_cs; offset = ps[1]; X86EMU_dump_memory(segment, (u16) offset, 16); offset += 16; } else if (ntok == 3) { segment = ps[1]; offset = ps[2]; X86EMU_dump_memory(segment, (u16) offset, 16); offset += 16; } else { segment = M.x86.saved_cs; X86EMU_dump_memory(segment, (u16) offset, 16); offset += 16; } break; case 'c': M.x86.debug ^= DEBUG_TRACECALL_F; break; case 's': M.x86.debug ^= DEBUG_SVC_F | DEBUG_SYS_F | DEBUG_SYSINT_F; break; case 'r': X86EMU_trace_regs(); break; case 'x': X86EMU_trace_xregs(); break; case 'g': if (ntok == 2) { breakpoint = ps[1]; if (noDecode) { M.x86.debug |= DEBUG_DECODE_NOPRINT_F; } else { M.x86.debug &= ~DEBUG_DECODE_NOPRINT_F; } M.x86.debug &= ~DEBUG_TRACE_F; M.x86.debug |= DEBUG_BREAK_F; done = 1; } break; case 'q': M.x86.debug |= DEBUG_EXIT; return; case 'P': noDecode = (noDecode) ? 0 : 1; printk("Toggled decoding to %s\n", (noDecode) ? "FALSE" : "TRUE"); break; case 't': case 0: done = 1; break; } } } int X86EMU_trace_on(void) { return M.x86.debug |= DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F; } int X86EMU_trace_off(void) { return M.x86.debug &= ~(DEBUG_STEP_F | DEBUG_DECODE_F | DEBUG_TRACE_F); } static int parse_line(char *s, int *ps, int *n) { int cmd; *n = 0; while (*s == ' ' || *s == '\t') s++; ps[*n] = *s; switch (*s) { case '\n': *n += 1; return 0; default: cmd = *s; *n += 1; } while (1) { while (*s != ' ' && *s != '\t' && *s != '\n') s++; if (*s == '\n') return cmd; while (*s == ' ' || *s == '\t') s++; sscanf(s, "%x", &ps[*n]); *n += 1; } } #endif /* DEBUG */ void x86emu_dump_regs(void) { printk("\tAX=%04x ", M.x86.R_AX); printk("BX=%04x ", M.x86.R_BX); printk("CX=%04x ", M.x86.R_CX); printk("DX=%04x ", M.x86.R_DX); printk("SP=%04x ", M.x86.R_SP); printk("BP=%04x ", M.x86.R_BP); printk("SI=%04x ", M.x86.R_SI); printk("DI=%04x\n", M.x86.R_DI); printk("\tDS=%04x ", M.x86.R_DS); printk("ES=%04x ", M.x86.R_ES); printk("SS=%04x ", M.x86.R_SS); printk("CS=%04x ", M.x86.R_CS); printk("IP=%04x ", M.x86.R_IP); if (ACCESS_FLAG(F_OF)) printk("OV "); /* CHECKED... */ else printk("NV "); if (ACCESS_FLAG(F_DF)) printk("DN "); else printk("UP "); if (ACCESS_FLAG(F_IF)) printk("EI "); else printk("DI "); if (ACCESS_FLAG(F_SF)) printk("NG "); else printk("PL "); if (ACCESS_FLAG(F_ZF)) printk("ZR "); else printk("NZ "); if (ACCESS_FLAG(F_AF)) printk("AC "); else printk("NA "); if (ACCESS_FLAG(F_PF)) printk("PE "); else printk("PO "); if (ACCESS_FLAG(F_CF)) printk("CY "); else printk("NC "); printk("\n"); } void x86emu_dump_xregs(void) { printk("\tEAX=%08x ", M.x86.R_EAX); printk("EBX=%08x ", M.x86.R_EBX); printk("ECX=%08x ", M.x86.R_ECX); printk("EDX=%08x \n", M.x86.R_EDX); printk("\tESP=%08x ", M.x86.R_ESP); printk("EBP=%08x ", M.x86.R_EBP); printk("ESI=%08x ", M.x86.R_ESI); printk("EDI=%08x\n", M.x86.R_EDI); printk("\tDS=%04x ", M.x86.R_DS); printk("ES=%04x ", M.x86.R_ES); printk("SS=%04x ", M.x86.R_SS); printk("CS=%04x ", M.x86.R_CS); printk("EIP=%08x\n\t", M.x86.R_EIP); if (ACCESS_FLAG(F_OF)) printk("OV "); /* CHECKED... */ else printk("NV "); if (ACCESS_FLAG(F_DF)) printk("DN "); else printk("UP "); if (ACCESS_FLAG(F_IF)) printk("EI "); else printk("DI "); if (ACCESS_FLAG(F_SF)) printk("NG "); else printk("PL "); if (ACCESS_FLAG(F_ZF)) printk("ZR "); else printk("NZ "); if (ACCESS_FLAG(F_AF)) printk("AC "); else printk("NA "); if (ACCESS_FLAG(F_PF)) printk("PE "); else printk("PO "); if (ACCESS_FLAG(F_CF)) printk("CY "); else printk("NC "); printk("\n"); } xorg-server-21.1.16/hw/xfree86/x86emu/decode.c0000644000175000017500000007747314757411105014305 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file includes subroutines which are related to * instruction decoding and accessess of immediate data via IP. etc. * ****************************************************************************/ #include #if defined(__sun) && defined(CS) /* avoid conflicts with Solaris sys/regset.h */ # undef CS # undef DS # undef SS # undef ES # undef FS # undef GS #endif #include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** REMARKS: Handles any pending asychronous interrupts. ****************************************************************************/ static void x86emu_intr_handle(void) { u8 intno; if (M.x86.intr & INTR_SYNCH) { intno = M.x86.intno; if (_X86EMU_intrTab[intno]) { (*_X86EMU_intrTab[intno]) (intno); } else { push_word((u16) M.x86.R_FLG); CLEAR_FLAG(F_IF); CLEAR_FLAG(F_TF); push_word(M.x86.R_CS); M.x86.R_CS = mem_access_word(intno * 4 + 2); push_word(M.x86.R_IP); M.x86.R_IP = mem_access_word(intno * 4); M.x86.intr = 0; } } } /**************************************************************************** PARAMETERS: intrnum - Interrupt number to raise REMARKS: Raise the specified interrupt to be handled before the execution of the next instruction. ****************************************************************************/ void x86emu_intr_raise(u8 intrnum) { M.x86.intno = intrnum; M.x86.intr |= INTR_SYNCH; } /**************************************************************************** REMARKS: Main execution loop for the emulator. We return from here when the system halts, which is normally caused by a stack fault when we return from the original real mode call. ****************************************************************************/ void X86EMU_exec(void) { u8 op1; M.x86.intr = 0; DB(x86emu_end_instr(); ) for (;;) { DB(if (CHECK_IP_FETCH()) x86emu_check_ip_access();) /* If debugging, save the IP and CS values. */ SAVE_IP_CS(M.x86.R_CS, M.x86.R_IP); INC_DECODED_INST_LEN(1); if (M.x86.intr) { if (M.x86.intr & INTR_HALTED) { DB(if (M.x86.R_SP != 0) { printk("halted\n"); X86EMU_trace_regs();} else { if (M.x86.debug) printk("Service completed successfully\n");} ) return; } if (((M.x86.intr & INTR_SYNCH) && (M.x86.intno == 0 || M.x86.intno == 2)) || !ACCESS_FLAG(F_IF)) { x86emu_intr_handle(); } } op1 = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); (*x86emu_optab[op1]) (op1); if (M.x86.debug & DEBUG_EXIT) { M.x86.debug &= ~DEBUG_EXIT; return; } } } /**************************************************************************** REMARKS: Halts the system by setting the halted system flag. ****************************************************************************/ void X86EMU_halt_sys(void) { M.x86.intr |= INTR_HALTED; } /**************************************************************************** PARAMETERS: mod - Mod value from decoded byte regh - Reg h value from decoded byte regl - Reg l value from decoded byte REMARKS: Raise the specified interrupt to be handled before the execution of the next instruction. NOTE: Do not inline this function, as (*sys_rdb) is already inline! ****************************************************************************/ void fetch_decode_modrm(int *mod, int *regh, int *regl) { int fetched; DB(if (CHECK_IP_FETCH()) x86emu_check_ip_access();) fetched = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); INC_DECODED_INST_LEN(1); *mod = (fetched >> 6) & 0x03; *regh = (fetched >> 3) & 0x07; *regl = (fetched >> 0) & 0x07; } /**************************************************************************** RETURNS: Immediate byte value read from instruction queue REMARKS: This function returns the immediate byte from the instruction queue, and moves the instruction pointer to the next value. NOTE: Do not inline this function, as (*sys_rdb) is already inline! ****************************************************************************/ u8 fetch_byte_imm(void) { u8 fetched; DB(if (CHECK_IP_FETCH()) x86emu_check_ip_access();) fetched = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); INC_DECODED_INST_LEN(1); return fetched; } /**************************************************************************** RETURNS: Immediate word value read from instruction queue REMARKS: This function returns the immediate byte from the instruction queue, and moves the instruction pointer to the next value. NOTE: Do not inline this function, as (*sys_rdw) is already inline! ****************************************************************************/ u16 fetch_word_imm(void) { u16 fetched; DB(if (CHECK_IP_FETCH()) x86emu_check_ip_access();) fetched = (*sys_rdw) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP)); M.x86.R_IP += 2; INC_DECODED_INST_LEN(2); return fetched; } /**************************************************************************** RETURNS: Immediate lone value read from instruction queue REMARKS: This function returns the immediate byte from the instruction queue, and moves the instruction pointer to the next value. NOTE: Do not inline this function, as (*sys_rdw) is already inline! ****************************************************************************/ u32 fetch_long_imm(void) { u32 fetched; DB(if (CHECK_IP_FETCH()) x86emu_check_ip_access();) fetched = (*sys_rdl) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP)); M.x86.R_IP += 4; INC_DECODED_INST_LEN(4); return fetched; } /**************************************************************************** RETURNS: Value of the default data segment REMARKS: Inline function that returns the default data segment for the current instruction. On the x86 processor, the default segment is not always DS if there is no segment override. Address modes such as -3[BP] or 10[BP+SI] all refer to addresses relative to SS (ie: on the stack). So, at the minimum, all decodings of addressing modes would have to set/clear a bit describing whether the access is relative to DS or SS. That is the function of the cpu-state-varible M.x86.mode. There are several potential states: repe prefix seen (handled elsewhere) repne prefix seen (ditto) cs segment override ds segment override es segment override fs segment override gs segment override ss segment override ds/ss select (in absence of override) Each of the above 7 items are handled with a bit in the mode field. ****************************************************************************/ _INLINE u32 get_data_segment(void) { #define GET_SEGMENT(segment) switch (M.x86.mode & SYSMODE_SEGMASK) { case 0: /* default case: use ds register */ case SYSMODE_SEGOVR_DS: case SYSMODE_SEGOVR_DS | SYSMODE_SEG_DS_SS: return M.x86.R_DS; case SYSMODE_SEG_DS_SS: /* non-overridden, use ss register */ return M.x86.R_SS; case SYSMODE_SEGOVR_CS: case SYSMODE_SEGOVR_CS | SYSMODE_SEG_DS_SS: return M.x86.R_CS; case SYSMODE_SEGOVR_ES: case SYSMODE_SEGOVR_ES | SYSMODE_SEG_DS_SS: return M.x86.R_ES; case SYSMODE_SEGOVR_FS: case SYSMODE_SEGOVR_FS | SYSMODE_SEG_DS_SS: return M.x86.R_FS; case SYSMODE_SEGOVR_GS: case SYSMODE_SEGOVR_GS | SYSMODE_SEG_DS_SS: return M.x86.R_GS; case SYSMODE_SEGOVR_SS: case SYSMODE_SEGOVR_SS | SYSMODE_SEG_DS_SS: return M.x86.R_SS; default: #ifdef DEBUG printk("error: should not happen: multiple overrides.\n"); #endif HALT_SYS(); return 0; } } /**************************************************************************** PARAMETERS: offset - Offset to load data from RETURNS: Byte value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u8 fetch_data_byte(uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif return (*sys_rdb) ((get_data_segment() << 4) + offset); } /**************************************************************************** PARAMETERS: offset - Offset to load data from RETURNS: Word value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u16 fetch_data_word(uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif return (*sys_rdw) ((get_data_segment() << 4) + offset); } /**************************************************************************** PARAMETERS: offset - Offset to load data from RETURNS: Long value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u32 fetch_data_long(uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif return (*sys_rdl) ((get_data_segment() << 4) + offset); } /**************************************************************************** PARAMETERS: segment - Segment to load data from offset - Offset to load data from RETURNS: Byte value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u8 fetch_data_byte_abs(uint segment, uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif return (*sys_rdb) (((u32) segment << 4) + offset); } /**************************************************************************** PARAMETERS: segment - Segment to load data from offset - Offset to load data from RETURNS: Word value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u16 fetch_data_word_abs(uint segment, uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif return (*sys_rdw) (((u32) segment << 4) + offset); } /**************************************************************************** PARAMETERS: segment - Segment to load data from offset - Offset to load data from RETURNS: Long value read from the absolute memory location. NOTE: Do not inline this function as (*sys_rdX) is already inline! ****************************************************************************/ u32 fetch_data_long_abs(uint segment, uint offset) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif return (*sys_rdl) (((u32) segment << 4) + offset); } /**************************************************************************** PARAMETERS: offset - Offset to store data at val - Value to store REMARKS: Writes a word value to an segmented memory location. The segment used is the current 'default' segment, which may have been overridden. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_byte(uint offset, u8 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif (*sys_wrb) ((get_data_segment() << 4) + offset, val); } /**************************************************************************** PARAMETERS: offset - Offset to store data at val - Value to store REMARKS: Writes a word value to an segmented memory location. The segment used is the current 'default' segment, which may have been overridden. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_word(uint offset, u16 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif (*sys_wrw) ((get_data_segment() << 4) + offset, val); } /**************************************************************************** PARAMETERS: offset - Offset to store data at val - Value to store REMARKS: Writes a long value to an segmented memory location. The segment used is the current 'default' segment, which may have been overridden. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_long(uint offset, u32 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access((u16) get_data_segment(), offset); #endif (*sys_wrl) ((get_data_segment() << 4) + offset, val); } /**************************************************************************** PARAMETERS: segment - Segment to store data at offset - Offset to store data at val - Value to store REMARKS: Writes a byte value to an absolute memory location. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_byte_abs(uint segment, uint offset, u8 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif (*sys_wrb) (((u32) segment << 4) + offset, val); } /**************************************************************************** PARAMETERS: segment - Segment to store data at offset - Offset to store data at val - Value to store REMARKS: Writes a word value to an absolute memory location. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_word_abs(uint segment, uint offset, u16 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif (*sys_wrw) (((u32) segment << 4) + offset, val); } /**************************************************************************** PARAMETERS: segment - Segment to store data at offset - Offset to store data at val - Value to store REMARKS: Writes a long value to an absolute memory location. NOTE: Do not inline this function as (*sys_wrX) is already inline! ****************************************************************************/ void store_data_long_abs(uint segment, uint offset, u32 val) { #ifdef DEBUG if (CHECK_DATA_ACCESS()) x86emu_check_data_access(segment, offset); #endif (*sys_wrl) (((u32) segment << 4) + offset, val); } /**************************************************************************** PARAMETERS: reg - Register to decode RETURNS: Pointer to the appropriate register REMARKS: Return a pointer to the register given by the R/RM field of the modrm byte, for byte operands. Also enables the decoding of instructions. ****************************************************************************/ u8 * decode_rm_byte_register(int reg) { switch (reg) { case 0: DECODE_PRINTF("AL"); return &M.x86.R_AL; case 1: DECODE_PRINTF("CL"); return &M.x86.R_CL; case 2: DECODE_PRINTF("DL"); return &M.x86.R_DL; case 3: DECODE_PRINTF("BL"); return &M.x86.R_BL; case 4: DECODE_PRINTF("AH"); return &M.x86.R_AH; case 5: DECODE_PRINTF("CH"); return &M.x86.R_CH; case 6: DECODE_PRINTF("DH"); return &M.x86.R_DH; case 7: DECODE_PRINTF("BH"); return &M.x86.R_BH; } HALT_SYS(); return NULL; /* NOT REACHED OR REACHED ON ERROR */ } /**************************************************************************** PARAMETERS: reg - Register to decode RETURNS: Pointer to the appropriate register REMARKS: Return a pointer to the register given by the R/RM field of the modrm byte, for word operands. Also enables the decoding of instructions. ****************************************************************************/ u16 * decode_rm_word_register(int reg) { switch (reg) { case 0: DECODE_PRINTF("AX"); return &M.x86.R_AX; case 1: DECODE_PRINTF("CX"); return &M.x86.R_CX; case 2: DECODE_PRINTF("DX"); return &M.x86.R_DX; case 3: DECODE_PRINTF("BX"); return &M.x86.R_BX; case 4: DECODE_PRINTF("SP"); return &M.x86.R_SP; case 5: DECODE_PRINTF("BP"); return &M.x86.R_BP; case 6: DECODE_PRINTF("SI"); return &M.x86.R_SI; case 7: DECODE_PRINTF("DI"); return &M.x86.R_DI; } HALT_SYS(); return NULL; /* NOTREACHED OR REACHED ON ERROR */ } /**************************************************************************** PARAMETERS: reg - Register to decode RETURNS: Pointer to the appropriate register REMARKS: Return a pointer to the register given by the R/RM field of the modrm byte, for dword operands. Also enables the decoding of instructions. ****************************************************************************/ u32 * decode_rm_long_register(int reg) { switch (reg) { case 0: DECODE_PRINTF("EAX"); return &M.x86.R_EAX; case 1: DECODE_PRINTF("ECX"); return &M.x86.R_ECX; case 2: DECODE_PRINTF("EDX"); return &M.x86.R_EDX; case 3: DECODE_PRINTF("EBX"); return &M.x86.R_EBX; case 4: DECODE_PRINTF("ESP"); return &M.x86.R_ESP; case 5: DECODE_PRINTF("EBP"); return &M.x86.R_EBP; case 6: DECODE_PRINTF("ESI"); return &M.x86.R_ESI; case 7: DECODE_PRINTF("EDI"); return &M.x86.R_EDI; } HALT_SYS(); return NULL; /* NOTREACHED OR REACHED ON ERROR */ } /**************************************************************************** PARAMETERS: reg - Register to decode RETURNS: Pointer to the appropriate register REMARKS: Return a pointer to the register given by the R/RM field of the modrm byte, for word operands, modified from above for the weirdo special case of segreg operands. Also enables the decoding of instructions. ****************************************************************************/ u16 * decode_rm_seg_register(int reg) { switch (reg) { case 0: DECODE_PRINTF("ES"); return &M.x86.R_ES; case 1: DECODE_PRINTF("CS"); return &M.x86.R_CS; case 2: DECODE_PRINTF("SS"); return &M.x86.R_SS; case 3: DECODE_PRINTF("DS"); return &M.x86.R_DS; case 4: DECODE_PRINTF("FS"); return &M.x86.R_FS; case 5: DECODE_PRINTF("GS"); return &M.x86.R_GS; case 6: case 7: DECODE_PRINTF("ILLEGAL SEGREG"); break; } HALT_SYS(); return NULL; /* NOT REACHED OR REACHED ON ERROR */ } /* * * return offset from the SIB Byte */ u32 decode_sib_address(int sib, int mod) { u32 base = 0, i = 0, scale = 1; switch (sib & 0x07) { case 0: DECODE_PRINTF("[EAX]"); base = M.x86.R_EAX; break; case 1: DECODE_PRINTF("[ECX]"); base = M.x86.R_ECX; break; case 2: DECODE_PRINTF("[EDX]"); base = M.x86.R_EDX; break; case 3: DECODE_PRINTF("[EBX]"); base = M.x86.R_EBX; break; case 4: DECODE_PRINTF("[ESP]"); base = M.x86.R_ESP; M.x86.mode |= SYSMODE_SEG_DS_SS; break; case 5: if (mod == 0) { base = fetch_long_imm(); DECODE_PRINTF2("%08x", base); } else { DECODE_PRINTF("[EBP]"); base = M.x86.R_ESP; M.x86.mode |= SYSMODE_SEG_DS_SS; } break; case 6: DECODE_PRINTF("[ESI]"); base = M.x86.R_ESI; break; case 7: DECODE_PRINTF("[EDI]"); base = M.x86.R_EDI; break; } switch ((sib >> 3) & 0x07) { case 0: DECODE_PRINTF("[EAX"); i = M.x86.R_EAX; break; case 1: DECODE_PRINTF("[ECX"); i = M.x86.R_ECX; break; case 2: DECODE_PRINTF("[EDX"); i = M.x86.R_EDX; break; case 3: DECODE_PRINTF("[EBX"); i = M.x86.R_EBX; break; case 4: i = 0; break; case 5: DECODE_PRINTF("[EBP"); i = M.x86.R_EBP; break; case 6: DECODE_PRINTF("[ESI"); i = M.x86.R_ESI; break; case 7: DECODE_PRINTF("[EDI"); i = M.x86.R_EDI; break; } scale = 1 << ((sib >> 6) & 0x03); if (((sib >> 3) & 0x07) != 4) { if (scale == 1) { DECODE_PRINTF("]"); } else { DECODE_PRINTF2("*%d]", scale); } } return base + (i * scale); } /**************************************************************************** PARAMETERS: rm - RM value to decode RETURNS: Offset in memory for the address decoding REMARKS: Return the offset given by mod=00 addressing. Also enables the decoding of instructions. NOTE: The code which specifies the corresponding segment (ds vs ss) below in the case of [BP+..]. The assumption here is that at the point that this subroutine is called, the bit corresponding to SYSMODE_SEG_DS_SS will be zero. After every instruction except the segment override instructions, this bit (as well as any bits indicating segment overrides) will be clear. So if a SS access is needed, set this bit. Otherwise, DS access occurs (unless any of the segment override bits are set). ****************************************************************************/ u32 decode_rm00_address(int rm) { u32 offset; int sib; if (M.x86.mode & SYSMODE_PREFIX_ADDR) { /* 32-bit addressing */ switch (rm) { case 0: DECODE_PRINTF("[EAX]"); return M.x86.R_EAX; case 1: DECODE_PRINTF("[ECX]"); return M.x86.R_ECX; case 2: DECODE_PRINTF("[EDX]"); return M.x86.R_EDX; case 3: DECODE_PRINTF("[EBX]"); return M.x86.R_EBX; case 4: sib = fetch_byte_imm(); return decode_sib_address(sib, 0); case 5: offset = fetch_long_imm(); DECODE_PRINTF2("[%08x]", offset); return offset; case 6: DECODE_PRINTF("[ESI]"); return M.x86.R_ESI; case 7: DECODE_PRINTF("[EDI]"); return M.x86.R_EDI; } HALT_SYS(); } else { /* 16-bit addressing */ switch (rm) { case 0: DECODE_PRINTF("[BX+SI]"); return (M.x86.R_BX + M.x86.R_SI) & 0xffff; case 1: DECODE_PRINTF("[BX+DI]"); return (M.x86.R_BX + M.x86.R_DI) & 0xffff; case 2: DECODE_PRINTF("[BP+SI]"); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_SI) & 0xffff; case 3: DECODE_PRINTF("[BP+DI]"); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_DI) & 0xffff; case 4: DECODE_PRINTF("[SI]"); return M.x86.R_SI; case 5: DECODE_PRINTF("[DI]"); return M.x86.R_DI; case 6: offset = fetch_word_imm(); DECODE_PRINTF2("[%04x]", offset); return offset; case 7: DECODE_PRINTF("[BX]"); return M.x86.R_BX; } HALT_SYS(); } return 0; } /**************************************************************************** PARAMETERS: rm - RM value to decode RETURNS: Offset in memory for the address decoding REMARKS: Return the offset given by mod=01 addressing. Also enables the decoding of instructions. ****************************************************************************/ u32 decode_rm01_address(int rm) { int displacement = 0; int sib; /* Fetch disp8 if no SIB byte */ if (!((M.x86.mode & SYSMODE_PREFIX_ADDR) && (rm == 4))) displacement = (s8) fetch_byte_imm(); if (M.x86.mode & SYSMODE_PREFIX_ADDR) { /* 32-bit addressing */ switch (rm) { case 0: DECODE_PRINTF2("%d[EAX]", displacement); return M.x86.R_EAX + displacement; case 1: DECODE_PRINTF2("%d[ECX]", displacement); return M.x86.R_ECX + displacement; case 2: DECODE_PRINTF2("%d[EDX]", displacement); return M.x86.R_EDX + displacement; case 3: DECODE_PRINTF2("%d[EBX]", displacement); return M.x86.R_EBX + displacement; case 4: sib = fetch_byte_imm(); displacement = (s8) fetch_byte_imm(); DECODE_PRINTF2("%d", displacement); return decode_sib_address(sib, 1) + displacement; case 5: DECODE_PRINTF2("%d[EBP]", displacement); return M.x86.R_EBP + displacement; case 6: DECODE_PRINTF2("%d[ESI]", displacement); return M.x86.R_ESI + displacement; case 7: DECODE_PRINTF2("%d[EDI]", displacement); return M.x86.R_EDI + displacement; } HALT_SYS(); } else { /* 16-bit addressing */ switch (rm) { case 0: DECODE_PRINTF2("%d[BX+SI]", displacement); return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; case 1: DECODE_PRINTF2("%d[BX+DI]", displacement); return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; case 2: DECODE_PRINTF2("%d[BP+SI]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; case 3: DECODE_PRINTF2("%d[BP+DI]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; case 4: DECODE_PRINTF2("%d[SI]", displacement); return (M.x86.R_SI + displacement) & 0xffff; case 5: DECODE_PRINTF2("%d[DI]", displacement); return (M.x86.R_DI + displacement) & 0xffff; case 6: DECODE_PRINTF2("%d[BP]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + displacement) & 0xffff; case 7: DECODE_PRINTF2("%d[BX]", displacement); return (M.x86.R_BX + displacement) & 0xffff; } HALT_SYS(); } return 0; /* SHOULD NOT HAPPEN */ } /**************************************************************************** PARAMETERS: rm - RM value to decode RETURNS: Offset in memory for the address decoding REMARKS: Return the offset given by mod=10 addressing. Also enables the decoding of instructions. ****************************************************************************/ u32 decode_rm10_address(int rm) { u32 displacement = 0; int sib; /* Fetch disp16 if 16-bit addr mode */ if (!(M.x86.mode & SYSMODE_PREFIX_ADDR)) displacement = (u16) fetch_word_imm(); else { /* Fetch disp32 if no SIB byte */ if (rm != 4) displacement = (u32) fetch_long_imm(); } if (M.x86.mode & SYSMODE_PREFIX_ADDR) { /* 32-bit addressing */ switch (rm) { case 0: DECODE_PRINTF2("%08x[EAX]", displacement); return M.x86.R_EAX + displacement; case 1: DECODE_PRINTF2("%08x[ECX]", displacement); return M.x86.R_ECX + displacement; case 2: DECODE_PRINTF2("%08x[EDX]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return M.x86.R_EDX + displacement; case 3: DECODE_PRINTF2("%08x[EBX]", displacement); return M.x86.R_EBX + displacement; case 4: sib = fetch_byte_imm(); displacement = (u32) fetch_long_imm(); DECODE_PRINTF2("%08x", displacement); return decode_sib_address(sib, 2) + displacement; break; case 5: DECODE_PRINTF2("%08x[EBP]", displacement); return M.x86.R_EBP + displacement; case 6: DECODE_PRINTF2("%08x[ESI]", displacement); return M.x86.R_ESI + displacement; case 7: DECODE_PRINTF2("%08x[EDI]", displacement); return M.x86.R_EDI + displacement; } HALT_SYS(); } else { /* 16-bit addressing */ switch (rm) { case 0: DECODE_PRINTF2("%04x[BX+SI]", displacement); return (M.x86.R_BX + M.x86.R_SI + displacement) & 0xffff; case 1: DECODE_PRINTF2("%04x[BX+DI]", displacement); return (M.x86.R_BX + M.x86.R_DI + displacement) & 0xffff; case 2: DECODE_PRINTF2("%04x[BP+SI]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_SI + displacement) & 0xffff; case 3: DECODE_PRINTF2("%04x[BP+DI]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + M.x86.R_DI + displacement) & 0xffff; case 4: DECODE_PRINTF2("%04x[SI]", displacement); return (M.x86.R_SI + displacement) & 0xffff; case 5: DECODE_PRINTF2("%04x[DI]", displacement); return (M.x86.R_DI + displacement) & 0xffff; case 6: DECODE_PRINTF2("%04x[BP]", displacement); M.x86.mode |= SYSMODE_SEG_DS_SS; return (M.x86.R_BP + displacement) & 0xffff; case 7: DECODE_PRINTF2("%04x[BX]", displacement); return (M.x86.R_BX + displacement) & 0xffff; } HALT_SYS(); } return 0; /*NOTREACHED */ } xorg-server-21.1.16/hw/xfree86/x86emu/fpu.c0000644000175000017500000006476114757411105013650 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file contains the code to implement the decoding and * emulation of the FPU instructions. * ****************************************************************************/ #include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/ /* opcode=0xd8 */ void x86emuOp_esc_coprocess_d8(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("ESC D8\n"); DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_d9_tab[] = { "FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ", "FLDENV\t", "FLDCW\t", "FSTENV\t", "FSTCW\t", "FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ", "FLDENV\t", "FLDCW\t", "FSTENV\t", "FSTCW\t", "FLD\tDWORD PTR ", "ESC_D9\t", "FST\tDWORD PTR ", "FSTP\tDWORD PTR ", "FLDENV\t", "FLDCW\t", "FSTENV\t", "FSTCW\t", }; static const char *x86emu_fpu_op_d9_tab1[] = { "FLD\t", "FLD\t", "FLD\t", "FLD\t", "FLD\t", "FLD\t", "FLD\t", "FLD\t", "FXCH\t", "FXCH\t", "FXCH\t", "FXCH\t", "FXCH\t", "FXCH\t", "FXCH\t", "FXCH\t", "FNOP", "ESC_D9", "ESC_D9", "ESC_D9", "ESC_D9", "ESC_D9", "ESC_D9", "ESC_D9", "FSTP\t", "FSTP\t", "FSTP\t", "FSTP\t", "FSTP\t", "FSTP\t", "FSTP\t", "FSTP\t", "FCHS", "FABS", "ESC_D9", "ESC_D9", "FTST", "FXAM", "ESC_D9", "ESC_D9", "FLD1", "FLDL2T", "FLDL2E", "FLDPI", "FLDLG2", "FLDLN2", "FLDZ", "ESC_D9", "F2XM1", "FYL2X", "FPTAN", "FPATAN", "FXTRACT", "ESC_D9", "FDECSTP", "FINCSTP", "FPREM", "FYL2XP1", "FSQRT", "ESC_D9", "FRNDINT", "FSCALE", "ESC_D9", "ESC_D9", }; #endif /* DEBUG */ /* opcode=0xd9 */ void x86emuOp_esc_coprocess_d9(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (mod != 3) { DECODE_PRINTINSTR32(x86emu_fpu_op_d9_tab, mod, rh, rl); } else { DECODE_PRINTF(x86emu_fpu_op_d9_tab1[(rh << 3) + rl]); } #endif switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; if (rh < 4) { DECODE_PRINTF2("ST(%d)\n", stkelem); } else { DECODE_PRINTF("\n"); } break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { case 3: switch (rh) { case 0: x86emu_fpu_R_fld(X86EMU_FPU_STKTOP, stkelem); break; case 1: x86emu_fpu_R_fxch(X86EMU_FPU_STKTOP, stkelem); break; case 2: switch (rl) { case 0: x86emu_fpu_R_nop(); break; default: x86emu_fpu_illegal(); break; } case 3: x86emu_fpu_R_fstp(X86EMU_FPU_STKTOP, stkelem); break; case 4: switch (rl) { case 0: x86emu_fpu_R_fchs(X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fabs(X86EMU_FPU_STKTOP); break; case 4: x86emu_fpu_R_ftst(X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_R_fxam(X86EMU_FPU_STKTOP); break; default: /* 2,3,6,7 */ x86emu_fpu_illegal(); break; } break; case 5: switch (rl) { case 0: x86emu_fpu_R_fld1(X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fldl2t(X86EMU_FPU_STKTOP); break; case 2: x86emu_fpu_R_fldl2e(X86EMU_FPU_STKTOP); break; case 3: x86emu_fpu_R_fldpi(X86EMU_FPU_STKTOP); break; case 4: x86emu_fpu_R_fldlg2(X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_R_fldln2(X86EMU_FPU_STKTOP); break; case 6: x86emu_fpu_R_fldz(X86EMU_FPU_STKTOP); break; default: /* 7 */ x86emu_fpu_illegal(); break; } break; case 6: switch (rl) { case 0: x86emu_fpu_R_f2xm1(X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fyl2x(X86EMU_FPU_STKTOP); break; case 2: x86emu_fpu_R_fptan(X86EMU_FPU_STKTOP); break; case 3: x86emu_fpu_R_fpatan(X86EMU_FPU_STKTOP); break; case 4: x86emu_fpu_R_fxtract(X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_illegal(); break; case 6: x86emu_fpu_R_decstp(); break; case 7: x86emu_fpu_R_incstp(); break; } break; case 7: switch (rl) { case 0: x86emu_fpu_R_fprem(X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fyl2xp1(X86EMU_FPU_STKTOP); break; case 2: x86emu_fpu_R_fsqrt(X86EMU_FPU_STKTOP); break; case 3: x86emu_fpu_illegal(); break; case 4: x86emu_fpu_R_frndint(X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_R_fscale(X86EMU_FPU_STKTOP); break; case 6: case 7: default: x86emu_fpu_illegal(); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fld(X86EMU_FPU_FLOAT, destoffset); break; case 1: x86emu_fpu_illegal(); break; case 2: x86emu_fpu_M_fst(X86EMU_FPU_FLOAT, destoffset); break; case 3: x86emu_fpu_M_fstp(X86EMU_FPU_FLOAT, destoffset); break; case 4: x86emu_fpu_M_fldenv(X86EMU_FPU_WORD, destoffset); break; case 5: x86emu_fpu_M_fldcw(X86EMU_FPU_WORD, destoffset); break; case 6: x86emu_fpu_M_fstenv(X86EMU_FPU_WORD, destoffset); break; case 7: x86emu_fpu_M_fstcw(X86EMU_FPU_WORD, destoffset); break; } } } #else (void) destoffset; (void) stkelem; #endif /* X86EMU_FPU_PRESENT */ DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_da_tab[] = { "FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ", "FICOMP\tDWORD PTR ", "FISUB\tDWORD PTR ", "FISUBR\tDWORD PTR ", "FIDIV\tDWORD PTR ", "FIDIVR\tDWORD PTR ", "FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ", "FICOMP\tDWORD PTR ", "FISUB\tDWORD PTR ", "FISUBR\tDWORD PTR ", "FIDIV\tDWORD PTR ", "FIDIVR\tDWORD PTR ", "FIADD\tDWORD PTR ", "FIMUL\tDWORD PTR ", "FICOM\tDWORD PTR ", "FICOMP\tDWORD PTR ", "FISUB\tDWORD PTR ", "FISUBR\tDWORD PTR ", "FIDIV\tDWORD PTR ", "FIDIVR\tDWORD PTR ", "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", "ESC_DA ", }; #endif /* DEBUG */ /* opcode=0xda */ void x86emuOp_esc_coprocess_da(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_da_tab, mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { case 3: x86emu_fpu_illegal(); break; default: switch (rh) { case 0: x86emu_fpu_M_iadd(X86EMU_FPU_SHORT, destoffset); break; case 1: x86emu_fpu_M_imul(X86EMU_FPU_SHORT, destoffset); break; case 2: x86emu_fpu_M_icom(X86EMU_FPU_SHORT, destoffset); break; case 3: x86emu_fpu_M_icomp(X86EMU_FPU_SHORT, destoffset); break; case 4: x86emu_fpu_M_isub(X86EMU_FPU_SHORT, destoffset); break; case 5: x86emu_fpu_M_isubr(X86EMU_FPU_SHORT, destoffset); break; case 6: x86emu_fpu_M_idiv(X86EMU_FPU_SHORT, destoffset); break; case 7: x86emu_fpu_M_idivr(X86EMU_FPU_SHORT, destoffset); break; } } #else (void) destoffset; (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_db_tab[] = { "FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ", "ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ", "FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ", "ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ", "FILD\tDWORD PTR ", "ESC_DB\t19", "FIST\tDWORD PTR ", "FISTP\tDWORD PTR ", "ESC_DB\t1C", "FLD\tTBYTE PTR ", "ESC_DB\t1E", "FSTP\tTBYTE PTR ", }; #endif /* DEBUG */ /* opcode=0xdb */ void x86emuOp_esc_coprocess_db(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (mod != 3) { DECODE_PRINTINSTR32(x86emu_fpu_op_db_tab, mod, rh, rl); } else if (rh == 4) { /* === 11 10 0 nnn */ switch (rl) { case 0: DECODE_PRINTF("FENI\n"); break; case 1: DECODE_PRINTF("FDISI\n"); break; case 2: DECODE_PRINTF("FCLEX\n"); break; case 3: DECODE_PRINTF("FINIT\n"); break; } } else { DECODE_PRINTF2("ESC_DB %0x\n", (mod << 6) + (rh << 3) + (rl)); } #endif /* DEBUG */ switch (mod) { case 0: destoffset = decode_rm00_address(rl); break; case 1: destoffset = decode_rm01_address(rl); break; case 2: destoffset = decode_rm10_address(rl); break; case 3: /* register to register */ break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { case 3: switch (rh) { case 4: switch (rl) { case 0: x86emu_fpu_R_feni(); break; case 1: x86emu_fpu_R_fdisi(); break; case 2: x86emu_fpu_R_fclex(); break; case 3: x86emu_fpu_R_finit(); break; default: x86emu_fpu_illegal(); break; } break; default: x86emu_fpu_illegal(); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fild(X86EMU_FPU_SHORT, destoffset); break; case 1: x86emu_fpu_illegal(); break; case 2: x86emu_fpu_M_fist(X86EMU_FPU_SHORT, destoffset); break; case 3: x86emu_fpu_M_fistp(X86EMU_FPU_SHORT, destoffset); break; case 4: x86emu_fpu_illegal(); break; case 5: x86emu_fpu_M_fld(X86EMU_FPU_LDBL, destoffset); break; case 6: x86emu_fpu_illegal(); break; case 7: x86emu_fpu_M_fstp(X86EMU_FPU_LDBL, destoffset); break; } } #else (void) destoffset; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_dc_tab[] = { "FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ", "FCOMP\tQWORD PTR ", "FSUB\tQWORD PTR ", "FSUBR\tQWORD PTR ", "FDIV\tQWORD PTR ", "FDIVR\tQWORD PTR ", "FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ", "FCOMP\tQWORD PTR ", "FSUB\tQWORD PTR ", "FSUBR\tQWORD PTR ", "FDIV\tQWORD PTR ", "FDIVR\tQWORD PTR ", "FADD\tQWORD PTR ", "FMUL\tQWORD PTR ", "FCOM\tQWORD PTR ", "FCOMP\tQWORD PTR ", "FSUB\tQWORD PTR ", "FSUBR\tQWORD PTR ", "FDIV\tQWORD PTR ", "FDIVR\tQWORD PTR ", "FADD\t", "FMUL\t", "FCOM\t", "FCOMP\t", "FSUBR\t", "FSUB\t", "FDIVR\t", "FDIV\t", }; #endif /* DEBUG */ /* opcode=0xdc */ void x86emuOp_esc_coprocess_dc(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_dc_tab, mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT /* execute */ switch (mod) { case 3: switch (rh) { case 0: x86emu_fpu_R_fadd(stkelem, X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fmul(stkelem, X86EMU_FPU_STKTOP); break; case 2: x86emu_fpu_R_fcom(stkelem, X86EMU_FPU_STKTOP); break; case 3: x86emu_fpu_R_fcomp(stkelem, X86EMU_FPU_STKTOP); break; case 4: x86emu_fpu_R_fsubr(stkelem, X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_R_fsub(stkelem, X86EMU_FPU_STKTOP); break; case 6: x86emu_fpu_R_fdivr(stkelem, X86EMU_FPU_STKTOP); break; case 7: x86emu_fpu_R_fdiv(stkelem, X86EMU_FPU_STKTOP); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fadd(X86EMU_FPU_DOUBLE, destoffset); break; case 1: x86emu_fpu_M_fmul(X86EMU_FPU_DOUBLE, destoffset); break; case 2: x86emu_fpu_M_fcom(X86EMU_FPU_DOUBLE, destoffset); break; case 3: x86emu_fpu_M_fcomp(X86EMU_FPU_DOUBLE, destoffset); break; case 4: x86emu_fpu_M_fsub(X86EMU_FPU_DOUBLE, destoffset); break; case 5: x86emu_fpu_M_fsubr(X86EMU_FPU_DOUBLE, destoffset); break; case 6: x86emu_fpu_M_fdiv(X86EMU_FPU_DOUBLE, destoffset); break; case 7: x86emu_fpu_M_fdivr(X86EMU_FPU_DOUBLE, destoffset); break; } } #else (void) destoffset; (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_dd_tab[] = { "FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ", "FRSTOR\t", "ESC_DD\t2D,", "FSAVE\t", "FSTSW\t", "FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ", "FRSTOR\t", "ESC_DD\t2D,", "FSAVE\t", "FSTSW\t", "FLD\tQWORD PTR ", "ESC_DD\t29,", "FST\tQWORD PTR ", "FSTP\tQWORD PTR ", "FRSTOR\t", "ESC_DD\t2D,", "FSAVE\t", "FSTSW\t", "FFREE\t", "FXCH\t", "FST\t", "FSTP\t", "ESC_DD\t2C,", "ESC_DD\t2D,", "ESC_DD\t2E,", "ESC_DD\t2F,", }; #endif /* DEBUG */ /* opcode=0xdd */ void x86emuOp_esc_coprocess_dd(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_dd_tab, mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { case 3: switch (rh) { case 0: x86emu_fpu_R_ffree(stkelem); break; case 1: x86emu_fpu_R_fxch(stkelem); break; case 2: x86emu_fpu_R_fst(stkelem); /* register version */ break; case 3: x86emu_fpu_R_fstp(stkelem); /* register version */ break; default: x86emu_fpu_illegal(); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fld(X86EMU_FPU_DOUBLE, destoffset); break; case 1: x86emu_fpu_illegal(); break; case 2: x86emu_fpu_M_fst(X86EMU_FPU_DOUBLE, destoffset); break; case 3: x86emu_fpu_M_fstp(X86EMU_FPU_DOUBLE, destoffset); break; case 4: x86emu_fpu_M_frstor(X86EMU_FPU_WORD, destoffset); break; case 5: x86emu_fpu_illegal(); break; case 6: x86emu_fpu_M_fsave(X86EMU_FPU_WORD, destoffset); break; case 7: x86emu_fpu_M_fstsw(X86EMU_FPU_WORD, destoffset); break; } } #else (void) destoffset; (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_de_tab[] = { "FIADD\tWORD PTR ", "FIMUL\tWORD PTR ", "FICOM\tWORD PTR ", "FICOMP\tWORD PTR ", "FISUB\tWORD PTR ", "FISUBR\tWORD PTR ", "FIDIV\tWORD PTR ", "FIDIVR\tWORD PTR ", "FIADD\tWORD PTR ", "FIMUL\tWORD PTR ", "FICOM\tWORD PTR ", "FICOMP\tWORD PTR ", "FISUB\tWORD PTR ", "FISUBR\tWORD PTR ", "FIDIV\tWORD PTR ", "FIDIVR\tWORD PTR ", "FIADD\tWORD PTR ", "FIMUL\tWORD PTR ", "FICOM\tWORD PTR ", "FICOMP\tWORD PTR ", "FISUB\tWORD PTR ", "FISUBR\tWORD PTR ", "FIDIV\tWORD PTR ", "FIDIVR\tWORD PTR ", "FADDP\t", "FMULP\t", "FCOMP\t", "FCOMPP\t", "FSUBRP\t", "FSUBP\t", "FDIVRP\t", "FDIVP\t", }; #endif /* DEBUG */ /* opcode=0xde */ void x86emuOp_esc_coprocess_de(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_de_tab, mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d),ST\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { case 3: switch (rh) { case 0: x86emu_fpu_R_faddp(stkelem, X86EMU_FPU_STKTOP); break; case 1: x86emu_fpu_R_fmulp(stkelem, X86EMU_FPU_STKTOP); break; case 2: x86emu_fpu_R_fcomp(stkelem, X86EMU_FPU_STKTOP); break; case 3: if (stkelem == 1) x86emu_fpu_R_fcompp(stkelem, X86EMU_FPU_STKTOP); else x86emu_fpu_illegal(); break; case 4: x86emu_fpu_R_fsubrp(stkelem, X86EMU_FPU_STKTOP); break; case 5: x86emu_fpu_R_fsubp(stkelem, X86EMU_FPU_STKTOP); break; case 6: x86emu_fpu_R_fdivrp(stkelem, X86EMU_FPU_STKTOP); break; case 7: x86emu_fpu_R_fdivp(stkelem, X86EMU_FPU_STKTOP); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fiadd(X86EMU_FPU_WORD, destoffset); break; case 1: x86emu_fpu_M_fimul(X86EMU_FPU_WORD, destoffset); break; case 2: x86emu_fpu_M_ficom(X86EMU_FPU_WORD, destoffset); break; case 3: x86emu_fpu_M_ficomp(X86EMU_FPU_WORD, destoffset); break; case 4: x86emu_fpu_M_fisub(X86EMU_FPU_WORD, destoffset); break; case 5: x86emu_fpu_M_fisubr(X86EMU_FPU_WORD, destoffset); break; case 6: x86emu_fpu_M_fidiv(X86EMU_FPU_WORD, destoffset); break; case 7: x86emu_fpu_M_fidivr(X86EMU_FPU_WORD, destoffset); break; } } #else (void) destoffset; (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } #ifdef DEBUG static const char *x86emu_fpu_op_df_tab[] = { /* mod == 00 */ "FILD\tWORD PTR ", "ESC_DF\t39\n", "FIST\tWORD PTR ", "FISTP\tWORD PTR ", "FBLD\tTBYTE PTR ", "FILD\tQWORD PTR ", "FBSTP\tTBYTE PTR ", "FISTP\tQWORD PTR ", /* mod == 01 */ "FILD\tWORD PTR ", "ESC_DF\t39 ", "FIST\tWORD PTR ", "FISTP\tWORD PTR ", "FBLD\tTBYTE PTR ", "FILD\tQWORD PTR ", "FBSTP\tTBYTE PTR ", "FISTP\tQWORD PTR ", /* mod == 10 */ "FILD\tWORD PTR ", "ESC_DF\t39 ", "FIST\tWORD PTR ", "FISTP\tWORD PTR ", "FBLD\tTBYTE PTR ", "FILD\tQWORD PTR ", "FBSTP\tTBYTE PTR ", "FISTP\tQWORD PTR ", /* mod == 11 */ "FFREE\t", "FXCH\t", "FST\t", "FSTP\t", "ESC_DF\t3C,", "ESC_DF\t3D,", "ESC_DF\t3E,", "ESC_DF\t3F," }; #endif /* DEBUG */ /* opcode=0xdf */ void x86emuOp_esc_coprocess_df(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset = 0; u8 stkelem = 0; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); DECODE_PRINTINSTR32(x86emu_fpu_op_df_tab, mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); break; case 3: /* register to register */ stkelem = (u8) rl; DECODE_PRINTF2("\tST(%d)\n", stkelem); break; } #ifdef X86EMU_FPU_PRESENT switch (mod) { case 3: switch (rh) { case 0: x86emu_fpu_R_ffree(stkelem); break; case 1: x86emu_fpu_R_fxch(stkelem); break; case 2: x86emu_fpu_R_fst(stkelem); /* register version */ break; case 3: x86emu_fpu_R_fstp(stkelem); /* register version */ break; default: x86emu_fpu_illegal(); break; } break; default: switch (rh) { case 0: x86emu_fpu_M_fild(X86EMU_FPU_WORD, destoffset); break; case 1: x86emu_fpu_illegal(); break; case 2: x86emu_fpu_M_fist(X86EMU_FPU_WORD, destoffset); break; case 3: x86emu_fpu_M_fistp(X86EMU_FPU_WORD, destoffset); break; case 4: x86emu_fpu_M_fbld(X86EMU_FPU_BSD, destoffset); break; case 5: x86emu_fpu_M_fild(X86EMU_FPU_LONG, destoffset); break; case 6: x86emu_fpu_M_fbstp(X86EMU_FPU_BSD, destoffset); break; case 7: x86emu_fpu_M_fistp(X86EMU_FPU_LONG, destoffset); break; } } #else (void) destoffset; (void) stkelem; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR_NO_TRACE(); } xorg-server-21.1.16/hw/xfree86/x86emu/ops2.c0000644000175000017500000027104114757411105013730 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file includes subroutines to implement the decoding * and emulation of all the x86 extended two-byte processor * instructions. * ****************************************************************************/ #include "x86emu/x86emui.h" #undef bswap_32 #define bswap_32(x) (((x & 0xff000000) >> 24) | \ ((x & 0x00ff0000) >> 8) | \ ((x & 0x0000ff00) << 8) | \ ((x & 0x000000ff) << 24)) /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** PARAMETERS: op1 - Instruction op code REMARKS: Handles illegal opcodes. ****************************************************************************/ static void x86emuOp2_illegal_op(u8 op2) { START_OF_INSTR(); DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n"); TRACE_REGS(); printk("%04x:%04x: %02X ILLEGAL EXTENDED X86 OPCODE!\n", M.x86.R_CS, M.x86.R_IP - 2, op2); HALT_SYS(); END_OF_INSTR(); } #define xorl(a,b) ((a) && !(b)) || (!(a) && (b)) /**************************************************************************** REMARKS: Handles opcode 0x0f,0x31 ****************************************************************************/ static void x86emuOp2_rdtsc(u8 X86EMU_UNUSED(op2)) { #ifdef __HAS_LONG_LONG__ static u64 counter = 0; #else static u32 counter = 0; #endif counter += 0x10000; /* read timestamp counter */ /* * Note that instead of actually trying to accurately measure this, we just * increase the counter by a fixed amount every time we hit one of these * instructions. Feel free to come up with a better method. */ START_OF_INSTR(); DECODE_PRINTF("RDTSC\n"); TRACE_AND_STEP(); #ifdef __HAS_LONG_LONG__ M.x86.R_EAX = counter & 0xffffffff; M.x86.R_EDX = counter >> 32; #else M.x86.R_EAX = counter; M.x86.R_EDX = 0; #endif DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0x80-0x8F ****************************************************************************/ static void x86emuOp2_long_jump(u8 op2) { s32 target; const char *name = NULL; int cond = 0; /* conditional jump to word offset. */ START_OF_INSTR(); switch (op2) { case 0x80: name = "JO\t"; cond = ACCESS_FLAG(F_OF); break; case 0x81: name = "JNO\t"; cond = !ACCESS_FLAG(F_OF); break; case 0x82: name = "JB\t"; cond = ACCESS_FLAG(F_CF); break; case 0x83: name = "JNB\t"; cond = !ACCESS_FLAG(F_CF); break; case 0x84: name = "JZ\t"; cond = ACCESS_FLAG(F_ZF); break; case 0x85: name = "JNZ\t"; cond = !ACCESS_FLAG(F_ZF); break; case 0x86: name = "JBE\t"; cond = ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF); break; case 0x87: name = "JNBE\t"; cond = !(ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF)); break; case 0x88: name = "JS\t"; cond = ACCESS_FLAG(F_SF); break; case 0x89: name = "JNS\t"; cond = !ACCESS_FLAG(F_SF); break; case 0x8a: name = "JP\t"; cond = ACCESS_FLAG(F_PF); break; case 0x8b: name = "JNP\t"; cond = !ACCESS_FLAG(F_PF); break; case 0x8c: name = "JL\t"; cond = xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)); break; case 0x8d: name = "JNL\t"; cond = !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF))); break; case 0x8e: name = "JLE\t"; cond = (xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)); break; case 0x8f: name = "JNLE\t"; cond = !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)); break; } DECODE_PRINTF(name); (void) name; target = (s16) fetch_word_imm(); target += (s16) M.x86.R_IP; DECODE_PRINTF2("%04x\n", target); TRACE_AND_STEP(); if (cond) M.x86.R_IP = (u16) target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0x90-0x9F ****************************************************************************/ static void x86emuOp2_set_byte(u8 op2) { int mod, rl, rh; uint destoffset; u8 *destreg; const char *name = NULL; int cond = 0; START_OF_INSTR(); switch (op2) { case 0x90: name = "SETO\t"; cond = ACCESS_FLAG(F_OF); break; case 0x91: name = "SETNO\t"; cond = !ACCESS_FLAG(F_OF); break; case 0x92: name = "SETB\t"; cond = ACCESS_FLAG(F_CF); break; case 0x93: name = "SETNB\t"; cond = !ACCESS_FLAG(F_CF); break; case 0x94: name = "SETZ\t"; cond = ACCESS_FLAG(F_ZF); break; case 0x95: name = "SETNZ\t"; cond = !ACCESS_FLAG(F_ZF); break; case 0x96: name = "SETBE\t"; cond = ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF); break; case 0x97: name = "SETNBE\t"; cond = !(ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF)); break; case 0x98: name = "SETS\t"; cond = ACCESS_FLAG(F_SF); break; case 0x99: name = "SETNS\t"; cond = !ACCESS_FLAG(F_SF); break; case 0x9a: name = "SETP\t"; cond = ACCESS_FLAG(F_PF); break; case 0x9b: name = "SETNP\t"; cond = !ACCESS_FLAG(F_PF); break; case 0x9c: name = "SETL\t"; cond = xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)); break; case 0x9d: name = "SETNL\t"; cond = xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)); break; case 0x9e: name = "SETLE\t"; cond = (xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)); break; case 0x9f: name = "SETNLE\t"; cond = !(xorl(ACCESS_FLAG(F_SF), ACCESS_FLAG(F_OF)) || ACCESS_FLAG(F_ZF)); break; } DECODE_PRINTF(name); (void) name; FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); TRACE_AND_STEP(); store_data_byte(destoffset, cond ? 0x01 : 0x00); break; case 1: destoffset = decode_rm01_address(rl); TRACE_AND_STEP(); store_data_byte(destoffset, cond ? 0x01 : 0x00); break; case 2: destoffset = decode_rm10_address(rl); TRACE_AND_STEP(); store_data_byte(destoffset, cond ? 0x01 : 0x00); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); TRACE_AND_STEP(); *destreg = cond ? 0x01 : 0x00; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa0 ****************************************************************************/ static void x86emuOp2_push_FS(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tFS\n"); TRACE_AND_STEP(); push_word(M.x86.R_FS); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa1 ****************************************************************************/ static void x86emuOp2_pop_FS(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("POP\tFS\n"); TRACE_AND_STEP(); M.x86.R_FS = pop_word(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output Handles opcode 0x0f,0xa2 ****************************************************************************/ static void x86emuOp2_cpuid(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("CPUID\n"); TRACE_AND_STEP(); cpuid(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa3 ****************************************************************************/ static void x86emuOp2_bt_R(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; int bit, disp; START_OF_INSTR(); DECODE_PRINTF("BT\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval; u32 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } else { u16 srcval; u16 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval; u32 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } else { u16 srcval; u16 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval; u32 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } else { u16 srcval; u16 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); CONDITIONAL_SET_FLAG(srcval & (0x1 << bit), F_CF); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg, *shiftreg; srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; CONDITIONAL_SET_FLAG(*srcreg & (0x1 << bit), F_CF); } else { u16 *srcreg, *shiftreg; srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; CONDITIONAL_SET_FLAG(*srcreg & (0x1 << bit), F_CF); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa4 ****************************************************************************/ static void x86emuOp2_shld_IMM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint destoffset; u8 shift; START_OF_INSTR(); DECODE_PRINTF("SHLD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *shiftreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); *destreg = shld_long(*destreg, *shiftreg, shift); } else { u16 *destreg, *shiftreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); *destreg = shld_word(*destreg, *shiftreg, shift); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa5 ****************************************************************************/ static void x86emuOp2_shld_CL(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("SHLD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shld_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shld_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *shiftreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = shld_long(*destreg, *shiftreg, M.x86.R_CL); } else { u16 *destreg, *shiftreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = shld_word(*destreg, *shiftreg, M.x86.R_CL); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa8 ****************************************************************************/ static void x86emuOp2_push_GS(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tGS\n"); TRACE_AND_STEP(); push_word(M.x86.R_GS); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xa9 ****************************************************************************/ static void x86emuOp2_pop_GS(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("POP\tGS\n"); TRACE_AND_STEP(); M.x86.R_GS = pop_word(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xab ****************************************************************************/ static void x86emuOp2_bts_R(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; int bit, disp; START_OF_INSTR(); DECODE_PRINTF("BTS\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval | mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, srcval | mask); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval | mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, srcval | mask); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval | mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, srcval | mask); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg, *shiftreg; u32 mask; srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; mask = (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg |= mask; } else { u16 *srcreg, *shiftreg; u16 mask; srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg |= mask; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xac ****************************************************************************/ static void x86emuOp2_shrd_IMM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint destoffset; u8 shift; START_OF_INSTR(); DECODE_PRINTF("SHLD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, shift); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, shift); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *shiftreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); *destreg = shrd_long(*destreg, *shiftreg, shift); } else { u16 *destreg, *shiftreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); shift = fetch_byte_imm(); DECODE_PRINTF2("%d\n", shift); TRACE_AND_STEP(); *destreg = shrd_word(*destreg, *shiftreg, shift); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xad ****************************************************************************/ static void x86emuOp2_shrd_CL(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("SHLD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_long(destoffset); destval = shrd_long(destval, *shiftreg, M.x86.R_CL); store_data_long(destoffset, destval); } else { u16 destval; u16 *shiftreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = fetch_data_word(destoffset); destval = shrd_word(destval, *shiftreg, M.x86.R_CL); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *shiftreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = shrd_long(*destreg, *shiftreg, M.x86.R_CL); } else { u16 *destreg, *shiftreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = shrd_word(*destreg, *shiftreg, M.x86.R_CL); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xaf ****************************************************************************/ static void x86emuOp2_imul_R_RM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("IMUL\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * destreg, (s32) srcval); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); TRACE_AND_STEP(); res = (s16) * destreg * (s16) srcval; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * destreg, (s32) srcval); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); TRACE_AND_STEP(); res = (s16) * destreg * (s16) srcval; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * destreg, (s32) srcval); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); TRACE_AND_STEP(); res = (s16) * destreg * (s16) srcval; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * destreg, (s32) * srcreg); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg, *srcreg; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); res = (s16) * destreg * (s16) * srcreg; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb2 ****************************************************************************/ static void x86emuOp2_lss_R_IMM(u8 X86EMU_UNUSED(op2)) { int mod, rh, rl; u16 *dstreg; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("LSS\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_SS = fetch_data_word(srcoffset + 2); break; case 1: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_SS = fetch_data_word(srcoffset + 2); break; case 2: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_SS = fetch_data_word(srcoffset + 2); break; case 3: /* register to register */ /* UNDEFINED! */ TRACE_AND_STEP(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb3 ****************************************************************************/ static void x86emuOp2_btr_R(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; int bit, disp; START_OF_INSTR(); DECODE_PRINTF("BTR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval & ~mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval & ~mask)); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval & ~mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval & ~mask)); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval & ~mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval & ~mask)); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg, *shiftreg; u32 mask; srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; mask = (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg &= ~mask; } else { u16 *srcreg, *shiftreg; u16 mask; srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg &= ~mask; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb4 ****************************************************************************/ static void x86emuOp2_lfs_R_IMM(u8 X86EMU_UNUSED(op2)) { int mod, rh, rl; u16 *dstreg; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("LFS\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_FS = fetch_data_word(srcoffset + 2); break; case 1: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_FS = fetch_data_word(srcoffset + 2); break; case 2: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_FS = fetch_data_word(srcoffset + 2); break; case 3: /* register to register */ /* UNDEFINED! */ TRACE_AND_STEP(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb5 ****************************************************************************/ static void x86emuOp2_lgs_R_IMM(u8 X86EMU_UNUSED(op2)) { int mod, rh, rl; u16 *dstreg; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("LGS\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_GS = fetch_data_word(srcoffset + 2); break; case 1: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_GS = fetch_data_word(srcoffset + 2); break; case 2: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_GS = fetch_data_word(srcoffset + 2); break; case 3: /* register to register */ /* UNDEFINED! */ TRACE_AND_STEP(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb6 ****************************************************************************/ static void x86emuOp2_movzx_byte_R_RM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("MOVZX\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u8 *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } else { u16 *destreg; u8 *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xb7 ****************************************************************************/ static void x86emuOp2_movzx_word_R_RM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; u32 *destreg; u32 srcval; u16 *srcreg; START_OF_INSTR(); DECODE_PRINTF("MOVZX\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 1: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 2: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 3: /* register to register */ destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xba ****************************************************************************/ static void x86emuOp2_btX_I(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; int bit; START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); switch (rh) { case 4: DECODE_PRINTF("BT\t"); break; case 5: DECODE_PRINTF("BTS\t"); break; case 6: DECODE_PRINTF("BTR\t"); break; case 7: DECODE_PRINTF("BTC\t"); break; default: DECODE_PRINTF("ILLEGAL EXTENDED X86 OPCODE\n"); TRACE_REGS(); printk("%04x:%04x: %02X%02X ILLEGAL EXTENDED X86 OPCODE EXTENSION!\n", M.x86.R_CS, M.x86.R_IP - 3, op2, (mod << 6) | (rh << 3) | rl); HALT_SYS(); } switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u8 shift; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0x1F; srcval = fetch_data_long(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_long(srcoffset, srcval | mask); break; case 6: store_data_long(srcoffset, srcval & ~mask); break; case 7: store_data_long(srcoffset, srcval ^ mask); break; default: break; } } else { u16 srcval, mask; u8 shift; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0xF; srcval = fetch_data_word(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_word(srcoffset, srcval | mask); break; case 6: store_data_word(srcoffset, srcval & ~mask); break; case 7: store_data_word(srcoffset, srcval ^ mask); break; default: break; } } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u8 shift; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0x1F; srcval = fetch_data_long(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_long(srcoffset, srcval | mask); break; case 6: store_data_long(srcoffset, srcval & ~mask); break; case 7: store_data_long(srcoffset, srcval ^ mask); break; default: break; } } else { u16 srcval, mask; u8 shift; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0xF; srcval = fetch_data_word(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_word(srcoffset, srcval | mask); break; case 6: store_data_word(srcoffset, srcval & ~mask); break; case 7: store_data_word(srcoffset, srcval ^ mask); break; default: break; } } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u8 shift; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0x1F; srcval = fetch_data_long(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_long(srcoffset, srcval | mask); break; case 6: store_data_long(srcoffset, srcval & ~mask); break; case 7: store_data_long(srcoffset, srcval ^ mask); break; default: break; } } else { u16 srcval, mask; u8 shift; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0xF; srcval = fetch_data_word(srcoffset); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); switch (rh) { case 5: store_data_word(srcoffset, srcval | mask); break; case 6: store_data_word(srcoffset, srcval & ~mask); break; case 7: store_data_word(srcoffset, srcval ^ mask); break; default: break; } } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; u32 mask; u8 shift; srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0x1F; mask = (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); switch (rh) { case 5: *srcreg |= mask; break; case 6: *srcreg &= ~mask; break; case 7: *srcreg ^= mask; break; default: break; } } else { u16 *srcreg; u16 mask; u8 shift; srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shift = fetch_byte_imm(); TRACE_AND_STEP(); bit = shift & 0xF; mask = (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); switch (rh) { case 5: *srcreg |= mask; break; case 6: *srcreg &= ~mask; break; case 7: *srcreg ^= mask; break; default: break; } } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xbb ****************************************************************************/ static void x86emuOp2_btc_R(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; int bit, disp; START_OF_INSTR(); DECODE_PRINTF("BTC\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval ^ mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval ^ mask)); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval ^ mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval ^ mask)); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, mask; u32 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; disp = (s16) * shiftreg >> 5; srcval = fetch_data_long(srcoffset + disp); mask = (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_long(srcoffset + disp, srcval ^ mask); } else { u16 srcval, mask; u16 *shiftreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; disp = (s16) * shiftreg >> 4; srcval = fetch_data_word(srcoffset + disp); mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(srcval & mask, F_CF); store_data_word(srcoffset + disp, (u16) (srcval ^ mask)); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg, *shiftreg; u32 mask; srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0x1F; mask = (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg ^= mask; } else { u16 *srcreg, *shiftreg; u16 mask; srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); shiftreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); bit = *shiftreg & 0xF; mask = (u16) (0x1 << bit); CONDITIONAL_SET_FLAG(*srcreg & mask, F_CF); *srcreg ^= mask; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xbc ****************************************************************************/ static void x86emuOp2_bsf(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("BSF\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 32; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 16; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 32; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 16; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 32; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 16; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcval = *DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 32; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcval = *DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 0; *dstreg < 16; (*dstreg)++) if ((srcval >> *dstreg) & 1) break; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xbd ****************************************************************************/ static void x86emuOp2_bsr(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("BSR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 31; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm00_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 15; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 31; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm01_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 15; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_long(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 31; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcoffset = decode_rm10_address(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); srcval = fetch_data_word(srcoffset); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 15; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 srcval, *dstreg; srcval = *DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_LONG_REGISTER(rh); TRACE_AND_STEP(); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 31; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } else { u16 srcval, *dstreg; srcval = *DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); dstreg = DECODE_RM_WORD_REGISTER(rh); TRACE_AND_STEP(); CONDITIONAL_SET_FLAG(srcval == 0, F_ZF); for (*dstreg = 15; *dstreg > 0; (*dstreg)--) if ((srcval >> *dstreg) & 1) break; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xbe ****************************************************************************/ static void x86emuOp2_movsx_byte_R_RM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("MOVSX\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = (s32) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = (s16) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = (s32) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = (s16) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = (s32) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = (s16) ((s8) fetch_data_byte(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u8 *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = (s32) ((s8) * srcreg); } else { u16 *destreg; u8 *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = (s16) ((s8) * srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f,0xbf ****************************************************************************/ static void x86emuOp2_movsx_word_R_RM(u8 X86EMU_UNUSED(op2)) { int mod, rl, rh; uint srcoffset; u32 *destreg; u32 srcval; u16 *srcreg; START_OF_INSTR(); DECODE_PRINTF("MOVSX\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = (s32) ((s16) fetch_data_word(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 1: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = (s32) ((s16) fetch_data_word(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 2: destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = (s32) ((s16) fetch_data_word(srcoffset)); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 3: /* register to register */ destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = (s32) ((s16) * srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /* Handles opcodes 0xc8-0xcf */ static void x86emuOp2_bswap(u8 X86EMU_UNUSED(op2)) { START_OF_INSTR(); DECODE_PRINTF("BSWAP\n"); TRACE_AND_STEP(); switch (op2) { case 0xc8: M.x86.R_EAX = bswap_32(M.x86.R_EAX); break; case 0xc9: M.x86.R_ECX = bswap_32(M.x86.R_ECX); break; case 0xca: M.x86.R_EDX = bswap_32(M.x86.R_EDX); break; case 0xcb: M.x86.R_EBX = bswap_32(M.x86.R_EBX); break; case 0xcc: M.x86.R_ESP = bswap_32(M.x86.R_ESP); break; case 0xcd: M.x86.R_EBP = bswap_32(M.x86.R_EBP); break; case 0xce: M.x86.R_ESI = bswap_32(M.x86.R_ESI); break; case 0xcf: M.x86.R_EDI = bswap_32(M.x86.R_EDI); break; default: /* can't happen */ break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /*************************************************************************** * Double byte operation code table: **************************************************************************/ void (*x86emu_optab2[256]) (u8) = { /* 0x00 */ x86emuOp2_illegal_op, /* Group F (ring 0 PM) */ /* 0x01 */ x86emuOp2_illegal_op, /* Group G (ring 0 PM) */ /* 0x02 */ x86emuOp2_illegal_op, /* lar (ring 0 PM) */ /* 0x03 */ x86emuOp2_illegal_op, /* lsl (ring 0 PM) */ /* 0x04 */ x86emuOp2_illegal_op, /* 0x05 */ x86emuOp2_illegal_op, /* loadall (undocumented) */ /* 0x06 */ x86emuOp2_illegal_op, /* clts (ring 0 PM) */ /* 0x07 */ x86emuOp2_illegal_op, /* loadall (undocumented) */ /* 0x08 */ x86emuOp2_illegal_op, /* invd (ring 0 PM) */ /* 0x09 */ x86emuOp2_illegal_op, /* wbinvd (ring 0 PM) */ /* 0x0a */ x86emuOp2_illegal_op, /* 0x0b */ x86emuOp2_illegal_op, /* 0x0c */ x86emuOp2_illegal_op, /* 0x0d */ x86emuOp2_illegal_op, /* 0x0e */ x86emuOp2_illegal_op, /* 0x0f */ x86emuOp2_illegal_op, /* 0x10 */ x86emuOp2_illegal_op, /* 0x11 */ x86emuOp2_illegal_op, /* 0x12 */ x86emuOp2_illegal_op, /* 0x13 */ x86emuOp2_illegal_op, /* 0x14 */ x86emuOp2_illegal_op, /* 0x15 */ x86emuOp2_illegal_op, /* 0x16 */ x86emuOp2_illegal_op, /* 0x17 */ x86emuOp2_illegal_op, /* 0x18 */ x86emuOp2_illegal_op, /* 0x19 */ x86emuOp2_illegal_op, /* 0x1a */ x86emuOp2_illegal_op, /* 0x1b */ x86emuOp2_illegal_op, /* 0x1c */ x86emuOp2_illegal_op, /* 0x1d */ x86emuOp2_illegal_op, /* 0x1e */ x86emuOp2_illegal_op, /* 0x1f */ x86emuOp2_illegal_op, /* 0x20 */ x86emuOp2_illegal_op, /* mov reg32,creg (ring 0 PM) */ /* 0x21 */ x86emuOp2_illegal_op, /* mov reg32,dreg (ring 0 PM) */ /* 0x22 */ x86emuOp2_illegal_op, /* mov creg,reg32 (ring 0 PM) */ /* 0x23 */ x86emuOp2_illegal_op, /* mov dreg,reg32 (ring 0 PM) */ /* 0x24 */ x86emuOp2_illegal_op, /* mov reg32,treg (ring 0 PM) */ /* 0x25 */ x86emuOp2_illegal_op, /* 0x26 */ x86emuOp2_illegal_op, /* mov treg,reg32 (ring 0 PM) */ /* 0x27 */ x86emuOp2_illegal_op, /* 0x28 */ x86emuOp2_illegal_op, /* 0x29 */ x86emuOp2_illegal_op, /* 0x2a */ x86emuOp2_illegal_op, /* 0x2b */ x86emuOp2_illegal_op, /* 0x2c */ x86emuOp2_illegal_op, /* 0x2d */ x86emuOp2_illegal_op, /* 0x2e */ x86emuOp2_illegal_op, /* 0x2f */ x86emuOp2_illegal_op, /* 0x30 */ x86emuOp2_illegal_op, /* 0x31 */ x86emuOp2_rdtsc, /* 0x32 */ x86emuOp2_illegal_op, /* 0x33 */ x86emuOp2_illegal_op, /* 0x34 */ x86emuOp2_illegal_op, /* 0x35 */ x86emuOp2_illegal_op, /* 0x36 */ x86emuOp2_illegal_op, /* 0x37 */ x86emuOp2_illegal_op, /* 0x38 */ x86emuOp2_illegal_op, /* 0x39 */ x86emuOp2_illegal_op, /* 0x3a */ x86emuOp2_illegal_op, /* 0x3b */ x86emuOp2_illegal_op, /* 0x3c */ x86emuOp2_illegal_op, /* 0x3d */ x86emuOp2_illegal_op, /* 0x3e */ x86emuOp2_illegal_op, /* 0x3f */ x86emuOp2_illegal_op, /* 0x40 */ x86emuOp2_illegal_op, /* 0x41 */ x86emuOp2_illegal_op, /* 0x42 */ x86emuOp2_illegal_op, /* 0x43 */ x86emuOp2_illegal_op, /* 0x44 */ x86emuOp2_illegal_op, /* 0x45 */ x86emuOp2_illegal_op, /* 0x46 */ x86emuOp2_illegal_op, /* 0x47 */ x86emuOp2_illegal_op, /* 0x48 */ x86emuOp2_illegal_op, /* 0x49 */ x86emuOp2_illegal_op, /* 0x4a */ x86emuOp2_illegal_op, /* 0x4b */ x86emuOp2_illegal_op, /* 0x4c */ x86emuOp2_illegal_op, /* 0x4d */ x86emuOp2_illegal_op, /* 0x4e */ x86emuOp2_illegal_op, /* 0x4f */ x86emuOp2_illegal_op, /* 0x50 */ x86emuOp2_illegal_op, /* 0x51 */ x86emuOp2_illegal_op, /* 0x52 */ x86emuOp2_illegal_op, /* 0x53 */ x86emuOp2_illegal_op, /* 0x54 */ x86emuOp2_illegal_op, /* 0x55 */ x86emuOp2_illegal_op, /* 0x56 */ x86emuOp2_illegal_op, /* 0x57 */ x86emuOp2_illegal_op, /* 0x58 */ x86emuOp2_illegal_op, /* 0x59 */ x86emuOp2_illegal_op, /* 0x5a */ x86emuOp2_illegal_op, /* 0x5b */ x86emuOp2_illegal_op, /* 0x5c */ x86emuOp2_illegal_op, /* 0x5d */ x86emuOp2_illegal_op, /* 0x5e */ x86emuOp2_illegal_op, /* 0x5f */ x86emuOp2_illegal_op, /* 0x60 */ x86emuOp2_illegal_op, /* 0x61 */ x86emuOp2_illegal_op, /* 0x62 */ x86emuOp2_illegal_op, /* 0x63 */ x86emuOp2_illegal_op, /* 0x64 */ x86emuOp2_illegal_op, /* 0x65 */ x86emuOp2_illegal_op, /* 0x66 */ x86emuOp2_illegal_op, /* 0x67 */ x86emuOp2_illegal_op, /* 0x68 */ x86emuOp2_illegal_op, /* 0x69 */ x86emuOp2_illegal_op, /* 0x6a */ x86emuOp2_illegal_op, /* 0x6b */ x86emuOp2_illegal_op, /* 0x6c */ x86emuOp2_illegal_op, /* 0x6d */ x86emuOp2_illegal_op, /* 0x6e */ x86emuOp2_illegal_op, /* 0x6f */ x86emuOp2_illegal_op, /* 0x70 */ x86emuOp2_illegal_op, /* 0x71 */ x86emuOp2_illegal_op, /* 0x72 */ x86emuOp2_illegal_op, /* 0x73 */ x86emuOp2_illegal_op, /* 0x74 */ x86emuOp2_illegal_op, /* 0x75 */ x86emuOp2_illegal_op, /* 0x76 */ x86emuOp2_illegal_op, /* 0x77 */ x86emuOp2_illegal_op, /* 0x78 */ x86emuOp2_illegal_op, /* 0x79 */ x86emuOp2_illegal_op, /* 0x7a */ x86emuOp2_illegal_op, /* 0x7b */ x86emuOp2_illegal_op, /* 0x7c */ x86emuOp2_illegal_op, /* 0x7d */ x86emuOp2_illegal_op, /* 0x7e */ x86emuOp2_illegal_op, /* 0x7f */ x86emuOp2_illegal_op, /* 0x80 */ x86emuOp2_long_jump, /* 0x81 */ x86emuOp2_long_jump, /* 0x82 */ x86emuOp2_long_jump, /* 0x83 */ x86emuOp2_long_jump, /* 0x84 */ x86emuOp2_long_jump, /* 0x85 */ x86emuOp2_long_jump, /* 0x86 */ x86emuOp2_long_jump, /* 0x87 */ x86emuOp2_long_jump, /* 0x88 */ x86emuOp2_long_jump, /* 0x89 */ x86emuOp2_long_jump, /* 0x8a */ x86emuOp2_long_jump, /* 0x8b */ x86emuOp2_long_jump, /* 0x8c */ x86emuOp2_long_jump, /* 0x8d */ x86emuOp2_long_jump, /* 0x8e */ x86emuOp2_long_jump, /* 0x8f */ x86emuOp2_long_jump, /* 0x90 */ x86emuOp2_set_byte, /* 0x91 */ x86emuOp2_set_byte, /* 0x92 */ x86emuOp2_set_byte, /* 0x93 */ x86emuOp2_set_byte, /* 0x94 */ x86emuOp2_set_byte, /* 0x95 */ x86emuOp2_set_byte, /* 0x96 */ x86emuOp2_set_byte, /* 0x97 */ x86emuOp2_set_byte, /* 0x98 */ x86emuOp2_set_byte, /* 0x99 */ x86emuOp2_set_byte, /* 0x9a */ x86emuOp2_set_byte, /* 0x9b */ x86emuOp2_set_byte, /* 0x9c */ x86emuOp2_set_byte, /* 0x9d */ x86emuOp2_set_byte, /* 0x9e */ x86emuOp2_set_byte, /* 0x9f */ x86emuOp2_set_byte, /* 0xa0 */ x86emuOp2_push_FS, /* 0xa1 */ x86emuOp2_pop_FS, /* 0xa2 */ x86emuOp2_cpuid, /* 0xa3 */ x86emuOp2_bt_R, /* 0xa4 */ x86emuOp2_shld_IMM, /* 0xa5 */ x86emuOp2_shld_CL, /* 0xa6 */ x86emuOp2_illegal_op, /* 0xa7 */ x86emuOp2_illegal_op, /* 0xa8 */ x86emuOp2_push_GS, /* 0xa9 */ x86emuOp2_pop_GS, /* 0xaa */ x86emuOp2_illegal_op, /* 0xab */ x86emuOp2_bts_R, /* 0xac */ x86emuOp2_shrd_IMM, /* 0xad */ x86emuOp2_shrd_CL, /* 0xae */ x86emuOp2_illegal_op, /* 0xaf */ x86emuOp2_imul_R_RM, /* 0xb0 */ x86emuOp2_illegal_op, /* TODO: cmpxchg */ /* 0xb1 */ x86emuOp2_illegal_op, /* TODO: cmpxchg */ /* 0xb2 */ x86emuOp2_lss_R_IMM, /* 0xb3 */ x86emuOp2_btr_R, /* 0xb4 */ x86emuOp2_lfs_R_IMM, /* 0xb5 */ x86emuOp2_lgs_R_IMM, /* 0xb6 */ x86emuOp2_movzx_byte_R_RM, /* 0xb7 */ x86emuOp2_movzx_word_R_RM, /* 0xb8 */ x86emuOp2_illegal_op, /* 0xb9 */ x86emuOp2_illegal_op, /* 0xba */ x86emuOp2_btX_I, /* 0xbb */ x86emuOp2_btc_R, /* 0xbc */ x86emuOp2_bsf, /* 0xbd */ x86emuOp2_bsr, /* 0xbe */ x86emuOp2_movsx_byte_R_RM, /* 0xbf */ x86emuOp2_movsx_word_R_RM, /* 0xc0 */ x86emuOp2_illegal_op, /* TODO: xadd */ /* 0xc1 */ x86emuOp2_illegal_op, /* TODO: xadd */ /* 0xc2 */ x86emuOp2_illegal_op, /* 0xc3 */ x86emuOp2_illegal_op, /* 0xc4 */ x86emuOp2_illegal_op, /* 0xc5 */ x86emuOp2_illegal_op, /* 0xc6 */ x86emuOp2_illegal_op, /* 0xc7 */ x86emuOp2_illegal_op, /* 0xc8 */ x86emuOp2_bswap, /* 0xc9 */ x86emuOp2_bswap, /* 0xca */ x86emuOp2_bswap, /* 0xcb */ x86emuOp2_bswap, /* 0xcc */ x86emuOp2_bswap, /* 0xcd */ x86emuOp2_bswap, /* 0xce */ x86emuOp2_bswap, /* 0xcf */ x86emuOp2_bswap, /* 0xd0 */ x86emuOp2_illegal_op, /* 0xd1 */ x86emuOp2_illegal_op, /* 0xd2 */ x86emuOp2_illegal_op, /* 0xd3 */ x86emuOp2_illegal_op, /* 0xd4 */ x86emuOp2_illegal_op, /* 0xd5 */ x86emuOp2_illegal_op, /* 0xd6 */ x86emuOp2_illegal_op, /* 0xd7 */ x86emuOp2_illegal_op, /* 0xd8 */ x86emuOp2_illegal_op, /* 0xd9 */ x86emuOp2_illegal_op, /* 0xda */ x86emuOp2_illegal_op, /* 0xdb */ x86emuOp2_illegal_op, /* 0xdc */ x86emuOp2_illegal_op, /* 0xdd */ x86emuOp2_illegal_op, /* 0xde */ x86emuOp2_illegal_op, /* 0xdf */ x86emuOp2_illegal_op, /* 0xe0 */ x86emuOp2_illegal_op, /* 0xe1 */ x86emuOp2_illegal_op, /* 0xe2 */ x86emuOp2_illegal_op, /* 0xe3 */ x86emuOp2_illegal_op, /* 0xe4 */ x86emuOp2_illegal_op, /* 0xe5 */ x86emuOp2_illegal_op, /* 0xe6 */ x86emuOp2_illegal_op, /* 0xe7 */ x86emuOp2_illegal_op, /* 0xe8 */ x86emuOp2_illegal_op, /* 0xe9 */ x86emuOp2_illegal_op, /* 0xea */ x86emuOp2_illegal_op, /* 0xeb */ x86emuOp2_illegal_op, /* 0xec */ x86emuOp2_illegal_op, /* 0xed */ x86emuOp2_illegal_op, /* 0xee */ x86emuOp2_illegal_op, /* 0xef */ x86emuOp2_illegal_op, /* 0xf0 */ x86emuOp2_illegal_op, /* 0xf1 */ x86emuOp2_illegal_op, /* 0xf2 */ x86emuOp2_illegal_op, /* 0xf3 */ x86emuOp2_illegal_op, /* 0xf4 */ x86emuOp2_illegal_op, /* 0xf5 */ x86emuOp2_illegal_op, /* 0xf6 */ x86emuOp2_illegal_op, /* 0xf7 */ x86emuOp2_illegal_op, /* 0xf8 */ x86emuOp2_illegal_op, /* 0xf9 */ x86emuOp2_illegal_op, /* 0xfa */ x86emuOp2_illegal_op, /* 0xfb */ x86emuOp2_illegal_op, /* 0xfc */ x86emuOp2_illegal_op, /* 0xfd */ x86emuOp2_illegal_op, /* 0xfe */ x86emuOp2_illegal_op, /* 0xff */ x86emuOp2_illegal_op, }; xorg-server-21.1.16/hw/xfree86/x86emu/ops.c0000644000175000017500000130471414757411105013653 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file includes subroutines to implement the decoding * and emulation of all the x86 processor instructions. * * There are approximately 250 subroutines in here, which correspond * to the 256 byte-"opcodes" found on the 8086. The table which * dispatches this is found in the files optab.[ch]. * * Each opcode proc has a comment preceding it which gives its table * address. Several opcodes are missing (undefined) in the table. * * Each proc includes information for decoding (DECODE_PRINTF and * DECODE_PRINTF2), debugging (TRACE_REGS, SINGLE_STEP), and misc * functions (START_OF_INSTR, END_OF_INSTR). * * Many of the procedures are *VERY* similar in coding. This has * allowed for a very large amount of code to be generated in a fairly * short amount of time (i.e. cut, paste, and modify). The result is * that much of the code below could have been folded into subroutines * for a large reduction in size of this file. The downside would be * that there would be a penalty in execution speed. The file could * also have been *MUCH* larger by inlining certain functions which * were called. This could have resulted even faster execution. The * prime directive I used to decide whether to inline the code or to * modularize it, was basically: 1) no unnecessary subroutine calls, * 2) no routines more than about 200 lines in size, and 3) modularize * any code that I might not get right the first time. The fetch_* * subroutines fall into the latter category. The The decode_* fall * into the second category. The coding of the "switch(mod){ .... }" * in many of the subroutines below falls into the first category. * Especially, the coding of {add,and,or,sub,...}_{byte,word} * subroutines are an especially glaring case of the third guideline. * Since so much of the code is cloned from other modules (compare * opcode #00 to opcode #01), making the basic operations subroutine * calls is especially important; otherwise mistakes in coding an * "add" would represent a nightmare in maintenance. * ****************************************************************************/ #include "x86emu/x86emui.h" /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** PARAMETERS: op1 - Instruction op code REMARKS: Handles illegal opcodes. ****************************************************************************/ static void x86emuOp_illegal_op(u8 op1) { START_OF_INSTR(); if (M.x86.R_SP != 0) { DECODE_PRINTF("ILLEGAL X86 OPCODE\n"); TRACE_REGS(); DB(printk("%04x:%04x: %02X ILLEGAL X86 OPCODE!\n", M.x86.R_CS, M.x86.R_IP - 1, op1)); HALT_SYS(); } else { /* If we get here, it means the stack pointer is back to zero * so we are just returning from an emulator service call * so therte is no need to display an error message. We trap * the emulator with an 0xF1 opcode to finish the service * call. */ X86EMU_halt_sys(); } END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x00 ****************************************************************************/ static void x86emuOp_add_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; u8 *destreg, *srcreg; u8 destval; START_OF_INSTR(); DECODE_PRINTF("ADD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x01 ****************************************************************************/ static void x86emuOp_add_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("ADD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = add_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x02 ****************************************************************************/ static void x86emuOp_add_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("ADD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x03 ****************************************************************************/ static void x86emuOp_add_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("ADD\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = add_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x04 ****************************************************************************/ static void x86emuOp_add_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("ADD\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = add_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x05 ****************************************************************************/ static void x86emuOp_add_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("ADD\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("ADD\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = add_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = add_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x06 ****************************************************************************/ static void x86emuOp_push_ES(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tES\n"); TRACE_AND_STEP(); push_word(M.x86.R_ES); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x07 ****************************************************************************/ static void x86emuOp_pop_ES(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("POP\tES\n"); TRACE_AND_STEP(); M.x86.R_ES = pop_word(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x08 ****************************************************************************/ static void x86emuOp_or_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("OR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x09 ****************************************************************************/ static void x86emuOp_or_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("OR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = or_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0a ****************************************************************************/ static void x86emuOp_or_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("OR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0b ****************************************************************************/ static void x86emuOp_or_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("OR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = or_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0c ****************************************************************************/ static void x86emuOp_or_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("OR\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = or_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0d ****************************************************************************/ static void x86emuOp_or_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("OR\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("OR\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = or_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = or_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0e ****************************************************************************/ static void x86emuOp_push_CS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tCS\n"); TRACE_AND_STEP(); push_word(M.x86.R_CS); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x0f. Escape for two-byte opcode (286 or better) ****************************************************************************/ static void x86emuOp_two_byte(u8 X86EMU_UNUSED(op1)) { u8 op2 = (*sys_rdb) (((u32) M.x86.R_CS << 4) + (M.x86.R_IP++)); INC_DECODED_INST_LEN(1); (*x86emu_optab2[op2]) (op2); } /**************************************************************************** REMARKS: Handles opcode 0x10 ****************************************************************************/ static void x86emuOp_adc_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("ADC\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x11 ****************************************************************************/ static void x86emuOp_adc_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("ADC\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = adc_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x12 ****************************************************************************/ static void x86emuOp_adc_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("ADC\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x13 ****************************************************************************/ static void x86emuOp_adc_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("ADC\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = adc_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x14 ****************************************************************************/ static void x86emuOp_adc_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("ADC\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = adc_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x15 ****************************************************************************/ static void x86emuOp_adc_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("ADC\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("ADC\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = adc_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = adc_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x16 ****************************************************************************/ static void x86emuOp_push_SS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tSS\n"); TRACE_AND_STEP(); push_word(M.x86.R_SS); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x17 ****************************************************************************/ static void x86emuOp_pop_SS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("POP\tSS\n"); TRACE_AND_STEP(); M.x86.R_SS = pop_word(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x18 ****************************************************************************/ static void x86emuOp_sbb_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("SBB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x19 ****************************************************************************/ static void x86emuOp_sbb_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("SBB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sbb_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1a ****************************************************************************/ static void x86emuOp_sbb_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("SBB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1b ****************************************************************************/ static void x86emuOp_sbb_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("SBB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sbb_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1c ****************************************************************************/ static void x86emuOp_sbb_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("SBB\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = sbb_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1d ****************************************************************************/ static void x86emuOp_sbb_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("SBB\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("SBB\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = sbb_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = sbb_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1e ****************************************************************************/ static void x86emuOp_push_DS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("PUSH\tDS\n"); TRACE_AND_STEP(); push_word(M.x86.R_DS); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x1f ****************************************************************************/ static void x86emuOp_pop_DS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("POP\tDS\n"); TRACE_AND_STEP(); M.x86.R_DS = pop_word(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x20 ****************************************************************************/ static void x86emuOp_and_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("AND\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x21 ****************************************************************************/ static void x86emuOp_and_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("AND\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = and_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x22 ****************************************************************************/ static void x86emuOp_and_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("AND\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x23 ****************************************************************************/ static void x86emuOp_and_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("AND\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_long(*destreg, srcval); break; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_word(*destreg, srcval); break; } case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = and_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x24 ****************************************************************************/ static void x86emuOp_and_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("AND\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = and_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x25 ****************************************************************************/ static void x86emuOp_and_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("AND\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("AND\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = and_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = and_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x26 ****************************************************************************/ static void x86emuOp_segovr_ES(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("ES:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_ES; /* * note the lack of DECODE_CLEAR_SEGOVR(r) since, here is one of 4 * opcode subroutines we do not want to do this. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x27 ****************************************************************************/ static void x86emuOp_daa(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("DAA\n"); TRACE_AND_STEP(); M.x86.R_AL = daa_byte(M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x28 ****************************************************************************/ static void x86emuOp_sub_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("SUB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x29 ****************************************************************************/ static void x86emuOp_sub_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("SUB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = sub_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2a ****************************************************************************/ static void x86emuOp_sub_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("SUB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2b ****************************************************************************/ static void x86emuOp_sub_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("SUB\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = sub_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2c ****************************************************************************/ static void x86emuOp_sub_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("SUB\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = sub_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2d ****************************************************************************/ static void x86emuOp_sub_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("SUB\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("SUB\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = sub_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = sub_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2e ****************************************************************************/ static void x86emuOp_segovr_CS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("CS:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_CS; /* note no DECODE_CLEAR_SEGOVR here. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x2f ****************************************************************************/ static void x86emuOp_das(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("DAS\n"); TRACE_AND_STEP(); M.x86.R_AL = das_byte(M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x30 ****************************************************************************/ static void x86emuOp_xor_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("XOR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_byte(destval, *srcreg); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x31 ****************************************************************************/ static void x86emuOp_xor_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("XOR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_long(destval, *srcreg); store_data_long(destoffset, destval); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = xor_word(destval, *srcreg); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x32 ****************************************************************************/ static void x86emuOp_xor_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("XOR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x33 ****************************************************************************/ static void x86emuOp_xor_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("XOR\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = xor_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x34 ****************************************************************************/ static void x86emuOp_xor_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("XOR\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); M.x86.R_AL = xor_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x35 ****************************************************************************/ static void x86emuOp_xor_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XOR\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("XOR\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = xor_long(M.x86.R_EAX, srcval); } else { M.x86.R_AX = xor_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x36 ****************************************************************************/ static void x86emuOp_segovr_SS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("SS:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_SS; /* no DECODE_CLEAR_SEGOVR ! */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x37 ****************************************************************************/ static void x86emuOp_aaa(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("AAA\n"); TRACE_AND_STEP(); M.x86.R_AX = aaa_word(M.x86.R_AX); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x38 ****************************************************************************/ static void x86emuOp_cmp_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; u8 *destreg, *srcreg; u8 destval; START_OF_INSTR(); DECODE_PRINTF("CMP\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(destval, *srcreg); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(destval, *srcreg); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(destval, *srcreg); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x39 ****************************************************************************/ static void x86emuOp_cmp_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("CMP\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(destval, *srcreg); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(destval, *srcreg); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(destval, *srcreg); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3a ****************************************************************************/ static void x86emuOp_cmp_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("CMP\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(*destreg, srcval); break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(*destreg, srcval); break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(*destreg, srcval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3b ****************************************************************************/ static void x86emuOp_cmp_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("CMP\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(*destreg, srcval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(*destreg, srcval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(*destreg, srcval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); cmp_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3c ****************************************************************************/ static void x86emuOp_cmp_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 srcval; START_OF_INSTR(); DECODE_PRINTF("CMP\tAL,"); srcval = fetch_byte_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); cmp_byte(M.x86.R_AL, srcval); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3d ****************************************************************************/ static void x86emuOp_cmp_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("CMP\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("CMP\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { cmp_long(M.x86.R_EAX, srcval); } else { cmp_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3e ****************************************************************************/ static void x86emuOp_segovr_DS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("DS:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_DS; /* NO DECODE_CLEAR_SEGOVR! */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x3f ****************************************************************************/ static void x86emuOp_aas(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("AAS\n"); TRACE_AND_STEP(); M.x86.R_AX = aas_word(M.x86.R_AX); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x40 ****************************************************************************/ static void x86emuOp_inc_AX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tEAX\n"); } else { DECODE_PRINTF("INC\tAX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = inc_long(M.x86.R_EAX); } else { M.x86.R_AX = inc_word(M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x41 ****************************************************************************/ static void x86emuOp_inc_CX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tECX\n"); } else { DECODE_PRINTF("INC\tCX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = inc_long(M.x86.R_ECX); } else { M.x86.R_CX = inc_word(M.x86.R_CX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x42 ****************************************************************************/ static void x86emuOp_inc_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tEDX\n"); } else { DECODE_PRINTF("INC\tDX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDX = inc_long(M.x86.R_EDX); } else { M.x86.R_DX = inc_word(M.x86.R_DX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x43 ****************************************************************************/ static void x86emuOp_inc_BX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tEBX\n"); } else { DECODE_PRINTF("INC\tBX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBX = inc_long(M.x86.R_EBX); } else { M.x86.R_BX = inc_word(M.x86.R_BX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x44 ****************************************************************************/ static void x86emuOp_inc_SP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tESP\n"); } else { DECODE_PRINTF("INC\tSP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESP = inc_long(M.x86.R_ESP); } else { M.x86.R_SP = inc_word(M.x86.R_SP); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x45 ****************************************************************************/ static void x86emuOp_inc_BP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tEBP\n"); } else { DECODE_PRINTF("INC\tBP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBP = inc_long(M.x86.R_EBP); } else { M.x86.R_BP = inc_word(M.x86.R_BP); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x46 ****************************************************************************/ static void x86emuOp_inc_SI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tESI\n"); } else { DECODE_PRINTF("INC\tSI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESI = inc_long(M.x86.R_ESI); } else { M.x86.R_SI = inc_word(M.x86.R_SI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x47 ****************************************************************************/ static void x86emuOp_inc_DI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tEDI\n"); } else { DECODE_PRINTF("INC\tDI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDI = inc_long(M.x86.R_EDI); } else { M.x86.R_DI = inc_word(M.x86.R_DI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x48 ****************************************************************************/ static void x86emuOp_dec_AX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tEAX\n"); } else { DECODE_PRINTF("DEC\tAX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = dec_long(M.x86.R_EAX); } else { M.x86.R_AX = dec_word(M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x49 ****************************************************************************/ static void x86emuOp_dec_CX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tECX\n"); } else { DECODE_PRINTF("DEC\tCX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = dec_long(M.x86.R_ECX); } else { M.x86.R_CX = dec_word(M.x86.R_CX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4a ****************************************************************************/ static void x86emuOp_dec_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tEDX\n"); } else { DECODE_PRINTF("DEC\tDX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDX = dec_long(M.x86.R_EDX); } else { M.x86.R_DX = dec_word(M.x86.R_DX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4b ****************************************************************************/ static void x86emuOp_dec_BX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tEBX\n"); } else { DECODE_PRINTF("DEC\tBX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBX = dec_long(M.x86.R_EBX); } else { M.x86.R_BX = dec_word(M.x86.R_BX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4c ****************************************************************************/ static void x86emuOp_dec_SP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tESP\n"); } else { DECODE_PRINTF("DEC\tSP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESP = dec_long(M.x86.R_ESP); } else { M.x86.R_SP = dec_word(M.x86.R_SP); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4d ****************************************************************************/ static void x86emuOp_dec_BP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tEBP\n"); } else { DECODE_PRINTF("DEC\tBP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBP = dec_long(M.x86.R_EBP); } else { M.x86.R_BP = dec_word(M.x86.R_BP); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4e ****************************************************************************/ static void x86emuOp_dec_SI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tESI\n"); } else { DECODE_PRINTF("DEC\tSI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESI = dec_long(M.x86.R_ESI); } else { M.x86.R_SI = dec_word(M.x86.R_SI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x4f ****************************************************************************/ static void x86emuOp_dec_DI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tEDI\n"); } else { DECODE_PRINTF("DEC\tDI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDI = dec_long(M.x86.R_EDI); } else { M.x86.R_DI = dec_word(M.x86.R_DI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x50 ****************************************************************************/ static void x86emuOp_push_AX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tEAX\n"); } else { DECODE_PRINTF("PUSH\tAX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EAX); } else { push_word(M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x51 ****************************************************************************/ static void x86emuOp_push_CX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tECX\n"); } else { DECODE_PRINTF("PUSH\tCX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_ECX); } else { push_word(M.x86.R_CX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x52 ****************************************************************************/ static void x86emuOp_push_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tEDX\n"); } else { DECODE_PRINTF("PUSH\tDX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EDX); } else { push_word(M.x86.R_DX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x53 ****************************************************************************/ static void x86emuOp_push_BX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tEBX\n"); } else { DECODE_PRINTF("PUSH\tBX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EBX); } else { push_word(M.x86.R_BX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x54 ****************************************************************************/ static void x86emuOp_push_SP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tESP\n"); } else { DECODE_PRINTF("PUSH\tSP\n"); } TRACE_AND_STEP(); /* Always push (E)SP, since we are emulating an i386 and above * processor. This is necessary as some BIOS'es use this to check * what type of processor is in the system. */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_ESP); } else { push_word((u16) (M.x86.R_SP)); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x55 ****************************************************************************/ static void x86emuOp_push_BP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tEBP\n"); } else { DECODE_PRINTF("PUSH\tBP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EBP); } else { push_word(M.x86.R_BP); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x56 ****************************************************************************/ static void x86emuOp_push_SI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tESI\n"); } else { DECODE_PRINTF("PUSH\tSI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_ESI); } else { push_word(M.x86.R_SI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x57 ****************************************************************************/ static void x86emuOp_push_DI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSH\tEDI\n"); } else { DECODE_PRINTF("PUSH\tDI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EDI); } else { push_word(M.x86.R_DI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x58 ****************************************************************************/ static void x86emuOp_pop_AX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tEAX\n"); } else { DECODE_PRINTF("POP\tAX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = pop_long(); } else { M.x86.R_AX = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x59 ****************************************************************************/ static void x86emuOp_pop_CX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tECX\n"); } else { DECODE_PRINTF("POP\tCX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = pop_long(); } else { M.x86.R_CX = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5a ****************************************************************************/ static void x86emuOp_pop_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tEDX\n"); } else { DECODE_PRINTF("POP\tDX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDX = pop_long(); } else { M.x86.R_DX = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5b ****************************************************************************/ static void x86emuOp_pop_BX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tEBX\n"); } else { DECODE_PRINTF("POP\tBX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBX = pop_long(); } else { M.x86.R_BX = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5c ****************************************************************************/ static void x86emuOp_pop_SP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tESP\n"); } else { DECODE_PRINTF("POP\tSP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESP = pop_long(); } else { M.x86.R_SP = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5d ****************************************************************************/ static void x86emuOp_pop_BP(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tEBP\n"); } else { DECODE_PRINTF("POP\tBP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBP = pop_long(); } else { M.x86.R_BP = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5e ****************************************************************************/ static void x86emuOp_pop_SI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tESI\n"); } else { DECODE_PRINTF("POP\tSI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESI = pop_long(); } else { M.x86.R_SI = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x5f ****************************************************************************/ static void x86emuOp_pop_DI(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POP\tEDI\n"); } else { DECODE_PRINTF("POP\tDI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDI = pop_long(); } else { M.x86.R_DI = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x60 ****************************************************************************/ static void x86emuOp_push_all(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSHAD\n"); } else { DECODE_PRINTF("PUSHA\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 old_sp = M.x86.R_ESP; push_long(M.x86.R_EAX); push_long(M.x86.R_ECX); push_long(M.x86.R_EDX); push_long(M.x86.R_EBX); push_long(old_sp); push_long(M.x86.R_EBP); push_long(M.x86.R_ESI); push_long(M.x86.R_EDI); } else { u16 old_sp = M.x86.R_SP; push_word(M.x86.R_AX); push_word(M.x86.R_CX); push_word(M.x86.R_DX); push_word(M.x86.R_BX); push_word(old_sp); push_word(M.x86.R_BP); push_word(M.x86.R_SI); push_word(M.x86.R_DI); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x61 ****************************************************************************/ static void x86emuOp_pop_all(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POPAD\n"); } else { DECODE_PRINTF("POPA\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDI = pop_long(); M.x86.R_ESI = pop_long(); M.x86.R_EBP = pop_long(); M.x86.R_ESP += 4; /* skip ESP */ M.x86.R_EBX = pop_long(); M.x86.R_EDX = pop_long(); M.x86.R_ECX = pop_long(); M.x86.R_EAX = pop_long(); } else { M.x86.R_DI = pop_word(); M.x86.R_SI = pop_word(); M.x86.R_BP = pop_word(); M.x86.R_SP += 2; /* skip SP */ M.x86.R_BX = pop_word(); M.x86.R_DX = pop_word(); M.x86.R_CX = pop_word(); M.x86.R_AX = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /*opcode 0x62 ILLEGAL OP, calls x86emuOp_illegal_op() */ /*opcode 0x63 ILLEGAL OP, calls x86emuOp_illegal_op() */ /**************************************************************************** REMARKS: Handles opcode 0x64 ****************************************************************************/ static void x86emuOp_segovr_FS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("FS:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_FS; /* * note the lack of DECODE_CLEAR_SEGOVR(r) since, here is one of 4 * opcode subroutines we do not want to do this. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x65 ****************************************************************************/ static void x86emuOp_segovr_GS(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("GS:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_SEGOVR_GS; /* * note the lack of DECODE_CLEAR_SEGOVR(r) since, here is one of 4 * opcode subroutines we do not want to do this. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x66 - prefix for 32-bit register ****************************************************************************/ static void x86emuOp_prefix_data(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("DATA:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_PREFIX_DATA; /* note no DECODE_CLEAR_SEGOVR here. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x67 - prefix for 32-bit address ****************************************************************************/ static void x86emuOp_prefix_addr(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("ADDR:\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_PREFIX_ADDR; /* note no DECODE_CLEAR_SEGOVR here. */ END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x68 ****************************************************************************/ static void x86emuOp_push_word_IMM(u8 X86EMU_UNUSED(op1)) { u32 imm; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { imm = fetch_long_imm(); } else { imm = fetch_word_imm(); } DECODE_PRINTF2("PUSH\t%x\n", imm); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(imm); } else { push_word((u16) imm); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x69 ****************************************************************************/ static void x86emuOp_imul_word_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("IMUL\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; s32 imm; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_long_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; s16 imm; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_word_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; s32 imm; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_long_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; s16 imm; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_word_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; s32 imm; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_long_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; s16 imm; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_word_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; u32 res_lo, res_hi; s32 imm; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); imm = fetch_long_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * srcreg, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg, *srcreg; u32 res; s16 imm; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); imm = fetch_word_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); res = (s16) * srcreg * (s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6a ****************************************************************************/ static void x86emuOp_push_byte_IMM(u8 X86EMU_UNUSED(op1)) { s16 imm; START_OF_INSTR(); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2("PUSH\t%d\n", imm); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long((s32) imm); } else { push_word(imm); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6b ****************************************************************************/ static void x86emuOp_imul_byte_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; s8 imm; START_OF_INSTR(); DECODE_PRINTF("IMUL\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) srcval, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg; u16 srcval; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); res = (s16) srcval *(s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; u32 res_lo, res_hi; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); TRACE_AND_STEP(); imul_long_direct(&res_lo, &res_hi, (s32) * srcreg, (s32) imm); if (res_hi != 0) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u32) res_lo; } else { u16 *destreg, *srcreg; u32 res; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%d\n", (s32) imm); res = (s16) * srcreg * (s16) imm; if (res > 0xFFFF) { SET_FLAG(F_CF); SET_FLAG(F_OF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } *destreg = (u16) res; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6c ****************************************************************************/ static void x86emuOp_ins_byte(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("INSB\n"); ins(1); TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6d ****************************************************************************/ static void x86emuOp_ins_word(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INSD\n"); ins(4); } else { DECODE_PRINTF("INSW\n"); ins(2); } TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6e ****************************************************************************/ static void x86emuOp_outs_byte(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("OUTSB\n"); outs(1); TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x6f ****************************************************************************/ static void x86emuOp_outs_word(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("OUTSD\n"); outs(4); } else { DECODE_PRINTF("OUTSW\n"); outs(2); } TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x70 ****************************************************************************/ static void x86emuOp_jump_near_O(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if overflow flag is set */ START_OF_INSTR(); DECODE_PRINTF("JO\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_OF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x71 ****************************************************************************/ static void x86emuOp_jump_near_NO(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if overflow is not set */ START_OF_INSTR(); DECODE_PRINTF("JNO\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!ACCESS_FLAG(F_OF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x72 ****************************************************************************/ static void x86emuOp_jump_near_B(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if carry flag is set. */ START_OF_INSTR(); DECODE_PRINTF("JB\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_CF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x73 ****************************************************************************/ static void x86emuOp_jump_near_NB(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if carry flag is clear. */ START_OF_INSTR(); DECODE_PRINTF("JNB\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!ACCESS_FLAG(F_CF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x74 ****************************************************************************/ static void x86emuOp_jump_near_Z(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if zero flag is set. */ START_OF_INSTR(); DECODE_PRINTF("JZ\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_ZF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x75 ****************************************************************************/ static void x86emuOp_jump_near_NZ(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if zero flag is clear. */ START_OF_INSTR(); DECODE_PRINTF("JNZ\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!ACCESS_FLAG(F_ZF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x76 ****************************************************************************/ static void x86emuOp_jump_near_BE(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if carry flag is set or if the zero flag is set. */ START_OF_INSTR(); DECODE_PRINTF("JBE\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x77 ****************************************************************************/ static void x86emuOp_jump_near_NBE(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if carry flag is clear and if the zero flag is clear */ START_OF_INSTR(); DECODE_PRINTF("JNBE\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!(ACCESS_FLAG(F_CF) || ACCESS_FLAG(F_ZF))) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x78 ****************************************************************************/ static void x86emuOp_jump_near_S(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if sign flag is set */ START_OF_INSTR(); DECODE_PRINTF("JS\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_SF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x79 ****************************************************************************/ static void x86emuOp_jump_near_NS(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if sign flag is clear */ START_OF_INSTR(); DECODE_PRINTF("JNS\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!ACCESS_FLAG(F_SF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7a ****************************************************************************/ static void x86emuOp_jump_near_P(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if parity flag is set (even parity) */ START_OF_INSTR(); DECODE_PRINTF("JP\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (ACCESS_FLAG(F_PF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7b ****************************************************************************/ static void x86emuOp_jump_near_NP(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; /* jump to byte offset if parity flag is clear (odd parity) */ START_OF_INSTR(); DECODE_PRINTF("JNP\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (!ACCESS_FLAG(F_PF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7c ****************************************************************************/ static void x86emuOp_jump_near_L(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; int sf, of; /* jump to byte offset if sign flag not equal to overflow flag. */ START_OF_INSTR(); DECODE_PRINTF("JL\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); sf = ACCESS_FLAG(F_SF) != 0; of = ACCESS_FLAG(F_OF) != 0; if (sf ^ of) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7d ****************************************************************************/ static void x86emuOp_jump_near_NL(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; int sf, of; /* jump to byte offset if sign flag not equal to overflow flag. */ START_OF_INSTR(); DECODE_PRINTF("JNL\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); sf = ACCESS_FLAG(F_SF) != 0; of = ACCESS_FLAG(F_OF) != 0; /* note: inverse of above, but using == instead of xor. */ if (sf == of) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7e ****************************************************************************/ static void x86emuOp_jump_near_LE(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; int sf, of; /* jump to byte offset if sign flag not equal to overflow flag or the zero flag is set */ START_OF_INSTR(); DECODE_PRINTF("JLE\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); sf = ACCESS_FLAG(F_SF) != 0; of = ACCESS_FLAG(F_OF) != 0; if ((sf ^ of) || ACCESS_FLAG(F_ZF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x7f ****************************************************************************/ static void x86emuOp_jump_near_NLE(u8 X86EMU_UNUSED(op1)) { s8 offset; u16 target; int sf, of; /* jump to byte offset if sign flag equal to overflow flag. and the zero flag is clear */ START_OF_INSTR(); DECODE_PRINTF("JNLE\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + (s16) offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); sf = ACCESS_FLAG(F_SF) != 0; of = ACCESS_FLAG(F_OF) != 0; if ((sf == of) && !ACCESS_FLAG(F_ZF)) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } static u8(*opc80_byte_operation[]) (u8 d, u8 s) = { add_byte, /* 00 */ or_byte, /* 01 */ adc_byte, /* 02 */ sbb_byte, /* 03 */ and_byte, /* 04 */ sub_byte, /* 05 */ xor_byte, /* 06 */ cmp_byte, /* 07 */ }; /**************************************************************************** REMARKS: Handles opcode 0x80 ****************************************************************************/ static void x86emuOp_opc80_byte_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 imm; u8 destval; /* * Weirdo special case instruction format. Part of the opcode * held below in "RH". Doubly nested case would result, except * that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ADD\t"); break; case 1: DECODE_PRINTF("OR\t"); break; case 2: DECODE_PRINTF("ADC\t"); break; case 3: DECODE_PRINTF("SBB\t"); break; case 4: DECODE_PRINTF("AND\t"); break; case 5: DECODE_PRINTF("SUB\t"); break; case 6: DECODE_PRINTF("XOR\t"); break; case 7: DECODE_PRINTF("CMP\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc80_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc80_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc80_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc80_byte_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } static u16(*opc81_word_operation[]) (u16 d, u16 s) = { add_word, /*00 */ or_word, /*01 */ adc_word, /*02 */ sbb_word, /*03 */ and_word, /*04 */ sub_word, /*05 */ xor_word, /*06 */ cmp_word, /*07 */ }; static u32(*opc81_long_operation[]) (u32 d, u32 s) = { add_long, /*00 */ or_long, /*01 */ adc_long, /*02 */ sbb_long, /*03 */ and_long, /*04 */ sub_long, /*05 */ xor_long, /*06 */ cmp_long, /*07 */ }; /**************************************************************************** REMARKS: Handles opcode 0x81 ****************************************************************************/ static void x86emuOp_opc81_word_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; /* * Weirdo special case instruction format. Part of the opcode * held below in "RH". Doubly nested case would result, except * that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ADD\t"); break; case 1: DECODE_PRINTF("OR\t"); break; case 2: DECODE_PRINTF("ADC\t"); break; case 3: DECODE_PRINTF("SBB\t"); break; case 4: DECODE_PRINTF("AND\t"); break; case 5: DECODE_PRINTF("SUB\t"); break; case 6: DECODE_PRINTF("XOR\t"); break; case 7: DECODE_PRINTF("CMP\t"); break; } } #endif /* * Know operation, decode the mod byte to find the addressing * mode. */ switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); imm = fetch_long_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); imm = fetch_long_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); imm = fetch_long_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 destval, imm; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); imm = fetch_long_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_long_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; } else { u16 *destreg; u16 destval, imm; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); destval = (*opc81_word_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } static u8(*opc82_byte_operation[]) (u8 s, u8 d) = { add_byte, /*00 */ or_byte, /*01 *//*YYY UNUSED ???? */ adc_byte, /*02 */ sbb_byte, /*03 */ and_byte, /*04 *//*YYY UNUSED ???? */ sub_byte, /*05 */ xor_byte, /*06 *//*YYY UNUSED ???? */ cmp_byte, /*07 */ }; /**************************************************************************** REMARKS: Handles opcode 0x82 ****************************************************************************/ static void x86emuOp_opc82_byte_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 imm; u8 destval; /* * Weirdo special case instruction format. Part of the opcode * held below in "RH". Doubly nested case would result, except * that the decoded instruction Similar to opcode 81, except that * the immediate byte is sign extended to a word length. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ADD\t"); break; case 1: DECODE_PRINTF("OR\t"); break; case 2: DECODE_PRINTF("ADC\t"); break; case 3: DECODE_PRINTF("SBB\t"); break; case 4: DECODE_PRINTF("AND\t"); break; case 5: DECODE_PRINTF("SUB\t"); break; case 6: DECODE_PRINTF("XOR\t"); break; case 7: DECODE_PRINTF("CMP\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc82_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc82_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); destval = fetch_data_byte(destoffset); imm = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc82_byte_operation[rh]) (destval, imm); if (rh != 7) store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc82_byte_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } static u16(*opc83_word_operation[]) (u16 s, u16 d) = { add_word, /*00 */ or_word, /*01 *//*YYY UNUSED ???? */ adc_word, /*02 */ sbb_word, /*03 */ and_word, /*04 *//*YYY UNUSED ???? */ sub_word, /*05 */ xor_word, /*06 *//*YYY UNUSED ???? */ cmp_word, /*07 */ }; static u32(*opc83_long_operation[]) (u32 s, u32 d) = { add_long, /*00 */ or_long, /*01 *//*YYY UNUSED ???? */ adc_long, /*02 */ sbb_long, /*03 */ and_long, /*04 *//*YYY UNUSED ???? */ sub_long, /*05 */ xor_long, /*06 *//*YYY UNUSED ???? */ cmp_long, /*07 */ }; /**************************************************************************** REMARKS: Handles opcode 0x83 ****************************************************************************/ static void x86emuOp_opc83_word_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; /* * Weirdo special case instruction format. Part of the opcode * held below in "RH". Doubly nested case would result, except * that the decoded instruction Similar to opcode 81, except that * the immediate byte is sign extended to a word length. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ADD\t"); break; case 1: DECODE_PRINTF("OR\t"); break; case 2: DECODE_PRINTF("ADC\t"); break; case 3: DECODE_PRINTF("SBB\t"); break; case 4: DECODE_PRINTF("AND\t"); break; case 5: DECODE_PRINTF("SUB\t"); break; case 6: DECODE_PRINTF("XOR\t"); break; case 7: DECODE_PRINTF("CMP\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); destval = fetch_data_long(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); destval = fetch_data_word(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); destval = fetch_data_long(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); destval = fetch_data_word(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); destval = fetch_data_long(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_long_operation[rh]) (destval, imm); if (rh != 7) store_data_long(destoffset, destval); } else { u16 destval, imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm10_address(rl); destval = fetch_data_word(destoffset); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_word_operation[rh]) (destval, imm); if (rh != 7) store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 destval, imm; destreg = DECODE_RM_LONG_REGISTER(rl); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_long_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; } else { u16 *destreg; u16 destval, imm; destreg = DECODE_RM_WORD_REGISTER(rl); imm = (s8) fetch_byte_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); destval = (*opc83_word_operation[rh]) (*destreg, imm); if (rh != 7) *destreg = destval; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x84 ****************************************************************************/ static void x86emuOp_test_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; START_OF_INSTR(); DECODE_PRINTF("TEST\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_byte(destval, *srcreg); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_byte(destval, *srcreg); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_byte(destval, *srcreg); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_byte(*destreg, *srcreg); break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x85 ****************************************************************************/ static void x86emuOp_test_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("TEST\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_word(destval, *srcreg); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_word(destval, *srcreg); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_long(destval, *srcreg); } else { u16 destval; u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_word(destval, *srcreg); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_long(*destreg, *srcreg); } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); test_word(*destreg, *srcreg); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x86 ****************************************************************************/ static void x86emuOp_xchg_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; u8 destval; u8 tmp; START_OF_INSTR(); DECODE_PRINTF("XCHG\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_byte(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_byte(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_byte(destoffset); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = *destreg; *destreg = tmp; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x87 ****************************************************************************/ static void x86emuOp_xchg_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("XCHG\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; u32 destval, tmp; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_long(destoffset, destval); } else { u16 *srcreg; u16 destval, tmp; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; u32 destval, tmp; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_long(destoffset, destval); } else { u16 *srcreg; u16 destval, tmp; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; u32 destval, tmp; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_long(destoffset); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_long(destoffset, destval); } else { u16 *srcreg; u16 destval, tmp; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); destval = fetch_data_word(destoffset); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = destval; destval = tmp; store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; u32 tmp; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = *destreg; *destreg = tmp; } else { u16 *destreg, *srcreg; u16 tmp; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); tmp = *srcreg; *srcreg = *destreg; *destreg = tmp; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x88 ****************************************************************************/ static void x86emuOp_mov_byte_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_byte(destoffset, *srcreg); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_byte(destoffset, *srcreg); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_byte(destoffset, *srcreg); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x89 ****************************************************************************/ static void x86emuOp_mov_word_RM_R(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u32 destoffset; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_long(destoffset, *srcreg); } else { u16 *srcreg; destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_word(destoffset, *srcreg); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_long(destoffset, *srcreg); } else { u16 *srcreg; destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_word(destoffset, *srcreg); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_long(destoffset, *srcreg); } else { u16 *srcreg; destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); store_data_word(destoffset, *srcreg); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8a ****************************************************************************/ static void x86emuOp_mov_byte_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg, *srcreg; uint srcoffset; u8 srcval; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 1: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 2: destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_byte(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8b ****************************************************************************/ static void x86emuOp_mov_word_R_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_long(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } else { u16 *destreg; u16 srcval; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg, *srcreg; destreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } else { u16 *destreg, *srcreg; destreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8c ****************************************************************************/ static void x86emuOp_mov_word_RM_SR(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u16 *destreg, *srcreg; uint destoffset; u16 destval; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcreg = decode_rm_seg_register(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = *srcreg; store_data_word(destoffset, destval); break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcreg = decode_rm_seg_register(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = *srcreg; store_data_word(destoffset, destval); break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcreg = decode_rm_seg_register(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = *srcreg; store_data_word(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcreg = decode_rm_seg_register(rh); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8d ****************************************************************************/ static void x86emuOp_lea_word_R_M(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("LEA\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_ADDR) { u32 *srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u32) destoffset; } else { u16 *srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u16) destoffset; } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_ADDR) { u32 *srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u32) destoffset; } else { u16 *srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u16) destoffset; } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_ADDR) { u32 *srcreg = DECODE_RM_LONG_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u32) destoffset; } else { u16 *srcreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *srcreg = (u16) destoffset; } break; case 3: /* register to register */ /* undefined. Do nothing. */ break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8e ****************************************************************************/ static void x86emuOp_mov_word_SR_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u16 *destreg, *srcreg; uint srcoffset; u16 srcval; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: destreg = decode_rm_seg_register(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 1: destreg = decode_rm_seg_register(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 2: destreg = decode_rm_seg_register(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); srcval = fetch_data_word(srcoffset); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = srcval; break; case 3: /* register to register */ destreg = decode_rm_seg_register(rh); DECODE_PRINTF(","); srcreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = *srcreg; break; } /* * Clean up, and reset all the R_xSP pointers to the correct * locations. This is about 3x too much overhead (doing all the * segreg ptrs when only one is needed, but this instruction * *cannot* be that common, and this isn't too much work anyway. */ DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x8f ****************************************************************************/ static void x86emuOp_pop_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("POP\t"); FETCH_DECODE_MODRM(mod, rh, rl); if (rh != 0) { DECODE_PRINTF("ILLEGAL DECODE OF OPCODE 8F\n"); HALT_SYS(); } switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_long(); store_data_long(destoffset, destval); } else { u16 destval; destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_word(); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_long(); store_data_long(destoffset, destval); } else { u16 destval; destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_word(); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_long(); store_data_long(destoffset, destval); } else { u16 destval; destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); destval = pop_word(); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = pop_long(); } else { u16 *destreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = pop_word(); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x90 ****************************************************************************/ static void x86emuOp_nop(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("NOP\n"); TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x91 ****************************************************************************/ static void x86emuOp_xchg_word_AX_CX(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,ECX\n"); } else { DECODE_PRINTF("XCHG\tAX,CX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_ECX; M.x86.R_ECX = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_CX; M.x86.R_CX = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x92 ****************************************************************************/ static void x86emuOp_xchg_word_AX_DX(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,EDX\n"); } else { DECODE_PRINTF("XCHG\tAX,DX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_EDX; M.x86.R_EDX = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_DX; M.x86.R_DX = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x93 ****************************************************************************/ static void x86emuOp_xchg_word_AX_BX(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,EBX\n"); } else { DECODE_PRINTF("XCHG\tAX,BX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_EBX; M.x86.R_EBX = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_BX; M.x86.R_BX = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x94 ****************************************************************************/ static void x86emuOp_xchg_word_AX_SP(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,ESP\n"); } else { DECODE_PRINTF("XCHG\tAX,SP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_ESP; M.x86.R_ESP = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_SP; M.x86.R_SP = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x95 ****************************************************************************/ static void x86emuOp_xchg_word_AX_BP(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,EBP\n"); } else { DECODE_PRINTF("XCHG\tAX,BP\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_EBP; M.x86.R_EBP = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_BP; M.x86.R_BP = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x96 ****************************************************************************/ static void x86emuOp_xchg_word_AX_SI(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,ESI\n"); } else { DECODE_PRINTF("XCHG\tAX,SI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_ESI; M.x86.R_ESI = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_SI; M.x86.R_SI = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x97 ****************************************************************************/ static void x86emuOp_xchg_word_AX_DI(u8 X86EMU_UNUSED(op1)) { u32 tmp; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("XCHG\tEAX,EDI\n"); } else { DECODE_PRINTF("XCHG\tAX,DI\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { tmp = M.x86.R_EAX; M.x86.R_EAX = M.x86.R_EDI; M.x86.R_EDI = tmp; } else { tmp = M.x86.R_AX; M.x86.R_AX = M.x86.R_DI; M.x86.R_DI = (u16) tmp; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x98 ****************************************************************************/ static void x86emuOp_cbw(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("CWDE\n"); } else { DECODE_PRINTF("CBW\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { if (M.x86.R_AX & 0x8000) { M.x86.R_EAX |= 0xffff0000; } else { M.x86.R_EAX &= 0x0000ffff; } } else { if (M.x86.R_AL & 0x80) { M.x86.R_AH = 0xff; } else { M.x86.R_AH = 0x0; } } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x99 ****************************************************************************/ static void x86emuOp_cwd(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("CDQ\n"); } else { DECODE_PRINTF("CWD\n"); } DECODE_PRINTF("CWD\n"); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { if (M.x86.R_EAX & 0x80000000) { M.x86.R_EDX = 0xffffffff; } else { M.x86.R_EDX = 0x0; } } else { if (M.x86.R_AX & 0x8000) { M.x86.R_DX = 0xffff; } else { M.x86.R_DX = 0x0; } } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9a ****************************************************************************/ static void x86emuOp_call_far_IMM(u8 X86EMU_UNUSED(op1)) { u32 farseg, faroff; START_OF_INSTR(); DECODE_PRINTF("CALL\t"); if (M.x86.mode & SYSMODE_PREFIX_DATA) { faroff = fetch_long_imm(); farseg = fetch_word_imm(); } else { faroff = fetch_word_imm(); farseg = fetch_word_imm(); } DECODE_PRINTF2("%04x:", farseg); DECODE_PRINTF2("%04x\n", faroff); CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, farseg, faroff, "FAR "); /* XXX * * Hooked interrupt vectors calling into our "BIOS" will cause * problems unless all intersegment stuff is checked for BIOS * access. Check needed here. For moment, let it alone. */ TRACE_AND_STEP(); push_word(M.x86.R_CS); M.x86.R_CS = farseg; if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EIP); } else { push_word(M.x86.R_IP); } M.x86.R_EIP = faroff & 0xffff; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9b ****************************************************************************/ static void x86emuOp_wait(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("WAIT"); TRACE_AND_STEP(); /* NADA. */ DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9c ****************************************************************************/ static void x86emuOp_pushf_word(u8 X86EMU_UNUSED(op1)) { u32 flags; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("PUSHFD\n"); } else { DECODE_PRINTF("PUSHF\n"); } TRACE_AND_STEP(); /* clear out *all* bits not representing flags, and turn on real bits */ flags = (M.x86.R_EFLG & F_MSK) | F_ALWAYS_ON; if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(flags); } else { push_word((u16) flags); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9d ****************************************************************************/ static void x86emuOp_popf_word(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("POPFD\n"); } else { DECODE_PRINTF("POPF\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EFLG = pop_long(); } else { M.x86.R_FLG = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9e ****************************************************************************/ static void x86emuOp_sahf(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("SAHF\n"); TRACE_AND_STEP(); /* clear the lower bits of the flag register */ M.x86.R_FLG &= 0xffffff00; /* or in the AH register into the flags register */ M.x86.R_FLG |= M.x86.R_AH; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0x9f ****************************************************************************/ static void x86emuOp_lahf(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("LAHF\n"); TRACE_AND_STEP(); M.x86.R_AH = (u8) (M.x86.R_FLG & 0xff); /* Undocumented TC++ behavior??? Nope. It's documented, but you have to look real hard to notice it. */ M.x86.R_AH |= 0x2; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa0 ****************************************************************************/ static void x86emuOp_mov_AL_M_IMM(u8 X86EMU_UNUSED(op1)) { u16 offset; START_OF_INSTR(); DECODE_PRINTF("MOV\tAL,"); offset = fetch_word_imm(); DECODE_PRINTF2("[%04x]\n", offset); TRACE_AND_STEP(); M.x86.R_AL = fetch_data_byte(offset); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa1 ****************************************************************************/ static void x86emuOp_mov_AX_M_IMM(u8 X86EMU_UNUSED(op1)) { u16 offset; START_OF_INSTR(); offset = fetch_word_imm(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF2("MOV\tEAX,[%04x]\n", offset); } else { DECODE_PRINTF2("MOV\tAX,[%04x]\n", offset); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = fetch_data_long(offset); } else { M.x86.R_AX = fetch_data_word(offset); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa2 ****************************************************************************/ static void x86emuOp_mov_M_AL_IMM(u8 X86EMU_UNUSED(op1)) { u16 offset; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); offset = fetch_word_imm(); DECODE_PRINTF2("[%04x],AL\n", offset); TRACE_AND_STEP(); store_data_byte(offset, M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa3 ****************************************************************************/ static void x86emuOp_mov_M_AX_IMM(u8 X86EMU_UNUSED(op1)) { u16 offset; START_OF_INSTR(); offset = fetch_word_imm(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF2("MOV\t[%04x],EAX\n", offset); } else { DECODE_PRINTF2("MOV\t[%04x],AX\n", offset); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { store_data_long(offset, M.x86.R_EAX); } else { store_data_word(offset, M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa4 ****************************************************************************/ static void x86emuOp_movs_byte(u8 X86EMU_UNUSED(op1)) { u8 val; u32 count; int inc; START_OF_INSTR(); DECODE_PRINTF("MOVS\tBYTE\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -1; else inc = 1; TRACE_AND_STEP(); count = 1; if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ count = M.x86.R_CX; M.x86.R_CX = 0; M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } while (count--) { val = fetch_data_byte(M.x86.R_SI); store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, val); M.x86.R_SI += inc; M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa5 ****************************************************************************/ static void x86emuOp_movs_word(u8 X86EMU_UNUSED(op1)) { u32 val; int inc; u32 count; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOVS\tDWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -4; else inc = 4; } else { DECODE_PRINTF("MOVS\tWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -2; else inc = 2; } TRACE_AND_STEP(); count = 1; if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ count = M.x86.R_CX; M.x86.R_CX = 0; M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } while (count--) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val = fetch_data_long(M.x86.R_SI); store_data_long_abs(M.x86.R_ES, M.x86.R_DI, val); } else { val = fetch_data_word(M.x86.R_SI); store_data_word_abs(M.x86.R_ES, M.x86.R_DI, (u16) val); } M.x86.R_SI += inc; M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa6 ****************************************************************************/ static void x86emuOp_cmps_byte(u8 X86EMU_UNUSED(op1)) { s8 val1, val2; int inc; START_OF_INSTR(); DECODE_PRINTF("CMPS\tBYTE\n"); TRACE_AND_STEP(); if (ACCESS_FLAG(F_DF)) /* down */ inc = -1; else inc = 1; if (M.x86.mode & SYSMODE_PREFIX_REPE) { /* REPE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { val1 = fetch_data_byte(M.x86.R_SI); val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(val1, val2); M.x86.R_CX -= 1; M.x86.R_SI += inc; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF) == 0) break; } M.x86.mode &= ~SYSMODE_PREFIX_REPE; } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { /* REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { val1 = fetch_data_byte(M.x86.R_SI); val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(val1, val2); M.x86.R_CX -= 1; M.x86.R_SI += inc; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF)) break; /* zero flag set means equal */ } M.x86.mode &= ~SYSMODE_PREFIX_REPNE; } else { val1 = fetch_data_byte(M.x86.R_SI); val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(val1, val2); M.x86.R_SI += inc; M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa7 ****************************************************************************/ static void x86emuOp_cmps_word(u8 X86EMU_UNUSED(op1)) { u32 val1, val2; int inc; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("CMPS\tDWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -4; else inc = 4; } else { DECODE_PRINTF("CMPS\tWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -2; else inc = 2; } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_REPE) { /* REPE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val1 = fetch_data_long(M.x86.R_SI); val2 = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(val1, val2); } else { val1 = fetch_data_word(M.x86.R_SI); val2 = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word((u16) val1, (u16) val2); } M.x86.R_CX -= 1; M.x86.R_SI += inc; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF) == 0) break; } M.x86.mode &= ~SYSMODE_PREFIX_REPE; } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { /* REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val1 = fetch_data_long(M.x86.R_SI); val2 = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(val1, val2); } else { val1 = fetch_data_word(M.x86.R_SI); val2 = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word((u16) val1, (u16) val2); } M.x86.R_CX -= 1; M.x86.R_SI += inc; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF)) break; /* zero flag set means equal */ } M.x86.mode &= ~SYSMODE_PREFIX_REPNE; } else { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val1 = fetch_data_long(M.x86.R_SI); val2 = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(val1, val2); } else { val1 = fetch_data_word(M.x86.R_SI); val2 = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word((u16) val1, (u16) val2); } M.x86.R_SI += inc; M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa8 ****************************************************************************/ static void x86emuOp_test_AL_IMM(u8 X86EMU_UNUSED(op1)) { int imm; START_OF_INSTR(); DECODE_PRINTF("TEST\tAL,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%04x\n", imm); TRACE_AND_STEP(); test_byte(M.x86.R_AL, (u8) imm); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xa9 ****************************************************************************/ static void x86emuOp_test_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("TEST\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("TEST\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { test_long(M.x86.R_EAX, srcval); } else { test_word(M.x86.R_AX, (u16) srcval); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xaa ****************************************************************************/ static void x86emuOp_stos_byte(u8 X86EMU_UNUSED(op1)) { int inc; START_OF_INSTR(); DECODE_PRINTF("STOS\tBYTE\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -1; else inc = 1; TRACE_AND_STEP(); if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AL); M.x86.R_CX -= 1; M.x86.R_DI += inc; } M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } else { store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AL); M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xab ****************************************************************************/ static void x86emuOp_stos_word(u8 X86EMU_UNUSED(op1)) { int inc; u32 count; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("STOS\tDWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -4; else inc = 4; } else { DECODE_PRINTF("STOS\tWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -2; else inc = 2; } TRACE_AND_STEP(); count = 1; if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ count = M.x86.R_CX; M.x86.R_CX = 0; M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } while (count--) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { store_data_long_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_EAX); } else { store_data_word_abs(M.x86.R_ES, M.x86.R_DI, M.x86.R_AX); } M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xac ****************************************************************************/ static void x86emuOp_lods_byte(u8 X86EMU_UNUSED(op1)) { int inc; START_OF_INSTR(); DECODE_PRINTF("LODS\tBYTE\n"); TRACE_AND_STEP(); if (ACCESS_FLAG(F_DF)) /* down */ inc = -1; else inc = 1; if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { M.x86.R_AL = fetch_data_byte(M.x86.R_SI); M.x86.R_CX -= 1; M.x86.R_SI += inc; } M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } else { M.x86.R_AL = fetch_data_byte(M.x86.R_SI); M.x86.R_SI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xad ****************************************************************************/ static void x86emuOp_lods_word(u8 X86EMU_UNUSED(op1)) { int inc; u32 count; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("LODS\tDWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -4; else inc = 4; } else { DECODE_PRINTF("LODS\tWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -2; else inc = 2; } TRACE_AND_STEP(); count = 1; if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* move them until CX is ZERO. */ count = M.x86.R_CX; M.x86.R_CX = 0; M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } while (count--) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = fetch_data_long(M.x86.R_SI); } else { M.x86.R_AX = fetch_data_word(M.x86.R_SI); } M.x86.R_SI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xae ****************************************************************************/ static void x86emuOp_scas_byte(u8 X86EMU_UNUSED(op1)) { s8 val2; int inc; START_OF_INSTR(); DECODE_PRINTF("SCAS\tBYTE\n"); TRACE_AND_STEP(); if (ACCESS_FLAG(F_DF)) /* down */ inc = -1; else inc = 1; if (M.x86.mode & SYSMODE_PREFIX_REPE) { /* REPE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(M.x86.R_AL, val2); M.x86.R_CX -= 1; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF) == 0) break; } M.x86.mode &= ~SYSMODE_PREFIX_REPE; } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { /* REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(M.x86.R_AL, val2); M.x86.R_CX -= 1; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF)) break; /* zero flag set means equal */ } M.x86.mode &= ~SYSMODE_PREFIX_REPNE; } else { val2 = fetch_data_byte_abs(M.x86.R_ES, M.x86.R_DI); cmp_byte(M.x86.R_AL, val2); M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xaf ****************************************************************************/ static void x86emuOp_scas_word(u8 X86EMU_UNUSED(op1)) { int inc; u32 val; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("SCAS\tDWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -4; else inc = 4; } else { DECODE_PRINTF("SCAS\tWORD\n"); if (ACCESS_FLAG(F_DF)) /* down */ inc = -2; else inc = 2; } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_REPE) { /* REPE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(M.x86.R_EAX, val); } else { val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word(M.x86.R_AX, (u16) val); } M.x86.R_CX -= 1; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF) == 0) break; } M.x86.mode &= ~SYSMODE_PREFIX_REPE; } else if (M.x86.mode & SYSMODE_PREFIX_REPNE) { /* REPNE */ /* move them until CX is ZERO. */ while (M.x86.R_CX != 0) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(M.x86.R_EAX, val); } else { val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word(M.x86.R_AX, (u16) val); } M.x86.R_CX -= 1; M.x86.R_DI += inc; if (ACCESS_FLAG(F_ZF)) break; /* zero flag set means equal */ } M.x86.mode &= ~SYSMODE_PREFIX_REPNE; } else { if (M.x86.mode & SYSMODE_PREFIX_DATA) { val = fetch_data_long_abs(M.x86.R_ES, M.x86.R_DI); cmp_long(M.x86.R_EAX, val); } else { val = fetch_data_word_abs(M.x86.R_ES, M.x86.R_DI); cmp_word(M.x86.R_AX, (u16) val); } M.x86.R_DI += inc; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb0 ****************************************************************************/ static void x86emuOp_mov_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tAL,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_AL = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb1 ****************************************************************************/ static void x86emuOp_mov_byte_CL_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tCL,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_CL = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb2 ****************************************************************************/ static void x86emuOp_mov_byte_DL_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tDL,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_DL = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb3 ****************************************************************************/ static void x86emuOp_mov_byte_BL_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tBL,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_BL = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb4 ****************************************************************************/ static void x86emuOp_mov_byte_AH_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tAH,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_AH = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb5 ****************************************************************************/ static void x86emuOp_mov_byte_CH_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tCH,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_CH = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb6 ****************************************************************************/ static void x86emuOp_mov_byte_DH_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tDH,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_DH = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb7 ****************************************************************************/ static void x86emuOp_mov_byte_BH_IMM(u8 X86EMU_UNUSED(op1)) { u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\tBH,"); imm = fetch_byte_imm(); DECODE_PRINTF2("%x\n", imm); TRACE_AND_STEP(); M.x86.R_BH = imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb8 ****************************************************************************/ static void x86emuOp_mov_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tEAX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tAX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = srcval; } else { M.x86.R_AX = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xb9 ****************************************************************************/ static void x86emuOp_mov_word_CX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tECX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tCX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = srcval; } else { M.x86.R_CX = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xba ****************************************************************************/ static void x86emuOp_mov_word_DX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tEDX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tDX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDX = srcval; } else { M.x86.R_DX = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xbb ****************************************************************************/ static void x86emuOp_mov_word_BX_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tEBX,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tBX,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBX = srcval; } else { M.x86.R_BX = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xbc ****************************************************************************/ static void x86emuOp_mov_word_SP_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tESP,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tSP,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESP = srcval; } else { M.x86.R_SP = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xbd ****************************************************************************/ static void x86emuOp_mov_word_BP_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tEBP,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tBP,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBP = srcval; } else { M.x86.R_BP = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xbe ****************************************************************************/ static void x86emuOp_mov_word_SI_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tESI,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tSI,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ESI = srcval; } else { M.x86.R_SI = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xbf ****************************************************************************/ static void x86emuOp_mov_word_DI_IMM(u8 X86EMU_UNUSED(op1)) { u32 srcval; START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("MOV\tEDI,"); srcval = fetch_long_imm(); } else { DECODE_PRINTF("MOV\tDI,"); srcval = fetch_word_imm(); } DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EDI = srcval; } else { M.x86.R_DI = (u16) srcval; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /* used by opcodes c0, d0, and d2. */ static u8(*opcD0_byte_operation[]) (u8 d, u8 s) = { rol_byte, ror_byte, rcl_byte, rcr_byte, shl_byte, shr_byte, shl_byte, /* sal_byte === shl_byte by definition */ sar_byte,}; /**************************************************************************** REMARKS: Handles opcode 0xc0 ****************************************************************************/ static void x86emuOp_opcC0_byte_RM_MEM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 destval; u8 amt; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (*destreg, amt); *destreg = destval; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /* used by opcodes c1, d1, and d3. */ static u16(*opcD1_word_operation[]) (u16 s, u8 d) = { rol_word, ror_word, rcl_word, rcr_word, shl_word, shr_word, shl_word, /* sal_byte === shl_byte by definition */ sar_word,}; /* used by opcodes c1, d1, and d3. */ static u32(*opcD1_long_operation[]) (u32 s, u8 d) = { rol_long, ror_long, rcl_long, rcr_long, shl_long, shr_long, shl_long, /* sal_byte === shl_byte by definition */ sar_long,}; /**************************************************************************** REMARKS: Handles opcode 0xc1 ****************************************************************************/ static void x86emuOp_opcC1_word_RM_MEM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; u8 amt; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm10_address(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; destreg = DECODE_RM_LONG_REGISTER(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); TRACE_AND_STEP(); *destreg = (*opcD1_long_operation[rh]) (*destreg, amt); } else { u16 *destreg; destreg = DECODE_RM_WORD_REGISTER(rl); amt = fetch_byte_imm(); DECODE_PRINTF2(",%x\n", amt); TRACE_AND_STEP(); *destreg = (*opcD1_word_operation[rh]) (*destreg, amt); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc2 ****************************************************************************/ static void x86emuOp_ret_near_IMM(u8 X86EMU_UNUSED(op1)) { u16 imm; START_OF_INSTR(); DECODE_PRINTF("RET\t"); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); RETURN_TRACE("RET", M.x86.saved_cs, M.x86.saved_ip); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EIP = pop_long(); } else { M.x86.R_IP = pop_word(); } M.x86.R_SP += imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc3 ****************************************************************************/ static void x86emuOp_ret_near(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("RET\n"); RETURN_TRACE("RET", M.x86.saved_cs, M.x86.saved_ip); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EIP = pop_long(); } else { M.x86.R_IP = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc4 ****************************************************************************/ static void x86emuOp_les_R_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rh, rl; u16 *dstreg; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("LES\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_ES = fetch_data_word(srcoffset + 2); break; case 1: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_ES = fetch_data_word(srcoffset + 2); break; case 2: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_ES = fetch_data_word(srcoffset + 2); break; case 3: /* register to register */ /* UNDEFINED! */ TRACE_AND_STEP(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc5 ****************************************************************************/ static void x86emuOp_lds_R_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rh, rl; u16 *dstreg; uint srcoffset; START_OF_INSTR(); DECODE_PRINTF("LDS\t"); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_DS = fetch_data_word(srcoffset + 2); break; case 1: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_DS = fetch_data_word(srcoffset + 2); break; case 2: dstreg = DECODE_RM_WORD_REGISTER(rh); DECODE_PRINTF(","); srcoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *dstreg = fetch_data_word(srcoffset); M.x86.R_DS = fetch_data_word(srcoffset + 2); break; case 3: /* register to register */ /* UNDEFINED! */ TRACE_AND_STEP(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc6 ****************************************************************************/ static void x86emuOp_mov_byte_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 imm; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); if (rh != 0) { DECODE_PRINTF("ILLEGAL DECODE OF OPCODE c6\n"); HALT_SYS(); } switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%2x\n", imm); TRACE_AND_STEP(); store_data_byte(destoffset, imm); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%2x\n", imm); TRACE_AND_STEP(); store_data_byte(destoffset, imm); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%2x\n", imm); TRACE_AND_STEP(); store_data_byte(destoffset, imm); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); imm = fetch_byte_imm(); DECODE_PRINTF2(",%2x\n", imm); TRACE_AND_STEP(); *destreg = imm; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc7 ****************************************************************************/ static void x86emuOp_mov_word_RM_IMM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; START_OF_INSTR(); DECODE_PRINTF("MOV\t"); FETCH_DECODE_MODRM(mod, rh, rl); if (rh != 0) { DECODE_PRINTF("ILLEGAL DECODE OF OPCODE 8F\n"); HALT_SYS(); } switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); imm = fetch_long_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_long(destoffset, imm); } else { u16 imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); imm = fetch_word_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_word(destoffset, imm); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); imm = fetch_long_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_long(destoffset, imm); } else { u16 imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); imm = fetch_word_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_word(destoffset, imm); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 imm; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); imm = fetch_long_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_long(destoffset, imm); } else { u16 imm; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm10_address(rl); imm = fetch_word_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); store_data_word(destoffset, imm); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 imm; destreg = DECODE_RM_LONG_REGISTER(rl); imm = fetch_long_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); *destreg = imm; } else { u16 *destreg; u16 imm; destreg = DECODE_RM_WORD_REGISTER(rl); imm = fetch_word_imm(); DECODE_PRINTF2(",%x\n", imm); TRACE_AND_STEP(); *destreg = imm; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc8 ****************************************************************************/ static void x86emuOp_enter(u8 X86EMU_UNUSED(op1)) { u16 local, frame_pointer; u8 nesting; int i; START_OF_INSTR(); local = fetch_word_imm(); nesting = fetch_byte_imm(); DECODE_PRINTF2("ENTER %x\n", local); DECODE_PRINTF2(",%x\n", nesting); TRACE_AND_STEP(); push_word(M.x86.R_BP); frame_pointer = M.x86.R_SP; if (nesting > 0) { for (i = 1; i < nesting; i++) { if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_BP -= 4; push_long(fetch_data_long_abs(M.x86.R_SS, M.x86.R_BP)); } else { M.x86.R_BP -= 2; push_word(fetch_data_word_abs(M.x86.R_SS, M.x86.R_BP)); } } push_word(frame_pointer); } M.x86.R_BP = frame_pointer; M.x86.R_SP = (u16) (M.x86.R_SP - local); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xc9 ****************************************************************************/ static void x86emuOp_leave(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("LEAVE\n"); TRACE_AND_STEP(); M.x86.R_SP = M.x86.R_BP; if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EBP = pop_long(); } else { M.x86.R_BP = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xca ****************************************************************************/ static void x86emuOp_ret_far_IMM(u8 X86EMU_UNUSED(op1)) { u16 imm; START_OF_INSTR(); DECODE_PRINTF("RETF\t"); imm = fetch_word_imm(); DECODE_PRINTF2("%x\n", imm); RETURN_TRACE("RETF", M.x86.saved_cs, M.x86.saved_ip); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EIP = pop_long(); M.x86.R_CS = pop_long() & 0xffff; } else { M.x86.R_IP = pop_word(); M.x86.R_CS = pop_word(); } M.x86.R_SP += imm; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xcb ****************************************************************************/ static void x86emuOp_ret_far(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("RETF\n"); RETURN_TRACE("RETF", M.x86.saved_cs, M.x86.saved_ip); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EIP = pop_long(); M.x86.R_CS = pop_long() & 0xffff; } else { M.x86.R_IP = pop_word(); M.x86.R_CS = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xcc ****************************************************************************/ static void x86emuOp_int3(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("INT 3\n"); TRACE_AND_STEP(); if (_X86EMU_intrTab[3]) { (*_X86EMU_intrTab[3]) (3); } else { push_word((u16) M.x86.R_FLG); CLEAR_FLAG(F_IF); CLEAR_FLAG(F_TF); push_word(M.x86.R_CS); M.x86.R_CS = mem_access_word(3 * 4 + 2); push_word(M.x86.R_IP); M.x86.R_IP = mem_access_word(3 * 4); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xcd ****************************************************************************/ static void x86emuOp_int_IMM(u8 X86EMU_UNUSED(op1)) { u8 intnum; START_OF_INSTR(); DECODE_PRINTF("INT\t"); intnum = fetch_byte_imm(); DECODE_PRINTF2("%x\n", intnum); TRACE_AND_STEP(); if (_X86EMU_intrTab[intnum]) { (*_X86EMU_intrTab[intnum]) (intnum); } else { push_word((u16) M.x86.R_FLG); CLEAR_FLAG(F_IF); CLEAR_FLAG(F_TF); push_word(M.x86.R_CS); M.x86.R_CS = mem_access_word(intnum * 4 + 2); push_word(M.x86.R_IP); M.x86.R_IP = mem_access_word(intnum * 4); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xce ****************************************************************************/ static void x86emuOp_into(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("INTO\n"); TRACE_AND_STEP(); if (ACCESS_FLAG(F_OF)) { if (_X86EMU_intrTab[4]) { (*_X86EMU_intrTab[4]) (4); } else { push_word((u16) M.x86.R_FLG); CLEAR_FLAG(F_IF); CLEAR_FLAG(F_TF); push_word(M.x86.R_CS); M.x86.R_CS = mem_access_word(4 * 4 + 2); push_word(M.x86.R_IP); M.x86.R_IP = mem_access_word(4 * 4); } } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xcf ****************************************************************************/ static void x86emuOp_iret(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("IRET\n"); TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EIP = pop_long(); M.x86.R_CS = pop_long() & 0xffff; M.x86.R_EFLG = (pop_long() & 0x257FD5) | (M.x86.R_EFLG & 0x1A0000); } else { M.x86.R_IP = pop_word(); M.x86.R_CS = pop_word(); M.x86.R_FLG = pop_word(); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd0 ****************************************************************************/ static void x86emuOp_opcD0_byte_RM_1(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 destval; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, 1); store_data_byte(destoffset, destval); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, 1); store_data_byte(destoffset, destval); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, 1); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(",1\n"); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (*destreg, 1); *destreg = destval; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd1 ****************************************************************************/ static void x86emuOp_opcD1_word_RM_1(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, 1); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, 1); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, 1); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, 1); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, 1); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",1\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, 1); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; u32 *destreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(",1\n"); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (*destreg, 1); *destreg = destval; } else { u16 destval; u16 *destreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(",1\n"); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (*destreg, 1); *destreg = destval; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd2 ****************************************************************************/ static void x86emuOp_opcD2_byte_RM_CL(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 destval; u8 amt; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ amt = M.x86.R_CL; switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (destval, amt); store_data_byte(destoffset, destval); break; case 3: /* register to register */ destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); destval = (*opcD0_byte_operation[rh]) (*destreg, amt); *destreg = destval; break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd3 ****************************************************************************/ static void x86emuOp_opcD3_word_RM_CL(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; u8 amt; /* * Yet another weirdo special case instruction format. Part of * the opcode held below in "RH". Doubly nested case would * result, except that the decoded instruction */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("ROL\t"); break; case 1: DECODE_PRINTF("ROR\t"); break; case 2: DECODE_PRINTF("RCL\t"); break; case 3: DECODE_PRINTF("RCR\t"); break; case 4: DECODE_PRINTF("SHL\t"); break; case 5: DECODE_PRINTF("SHR\t"); break; case 6: DECODE_PRINTF("SAL\t"); break; case 7: DECODE_PRINTF("SAR\t"); break; } } #endif /* know operation, decode the mod byte to find the addressing mode. */ amt = M.x86.R_CL; switch (mod) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = (*opcD1_long_operation[rh]) (destval, amt); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("WORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(",CL\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = (*opcD1_word_operation[rh]) (destval, amt); store_data_word(destoffset, destval); } break; case 3: /* register to register */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = (*opcD1_long_operation[rh]) (*destreg, amt); } else { u16 *destreg; destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(",CL\n"); TRACE_AND_STEP(); *destreg = (*opcD1_word_operation[rh]) (*destreg, amt); } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd4 ****************************************************************************/ static void x86emuOp_aam(u8 X86EMU_UNUSED(op1)) { u8 a; START_OF_INSTR(); DECODE_PRINTF("AAM\n"); a = fetch_byte_imm(); /* this is a stupid encoding. */ if (a != 10) { /* fix: add base decoding aam_word(u8 val, int base a) */ DECODE_PRINTF("ERROR DECODING AAM\n"); TRACE_REGS(); HALT_SYS(); } TRACE_AND_STEP(); /* note the type change here --- returning AL and AH in AX. */ M.x86.R_AX = aam_word(M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xd5 ****************************************************************************/ static void x86emuOp_aad(u8 X86EMU_UNUSED(op1)) { u8 a; START_OF_INSTR(); DECODE_PRINTF("AAD\n"); a = fetch_byte_imm(); if (a != 10) { /* fix: add base decoding aad_word(u16 val, int base a) */ DECODE_PRINTF("ERROR DECODING AAM\n"); TRACE_REGS(); HALT_SYS(); } TRACE_AND_STEP(); M.x86.R_AX = aad_word(M.x86.R_AX); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /* opcode 0xd6 ILLEGAL OPCODE */ /**************************************************************************** REMARKS: Handles opcode 0xd7 ****************************************************************************/ static void x86emuOp_xlat(u8 X86EMU_UNUSED(op1)) { u16 addr; START_OF_INSTR(); DECODE_PRINTF("XLAT\n"); TRACE_AND_STEP(); addr = (u16) (M.x86.R_BX + (u8) M.x86.R_AL); M.x86.R_AL = fetch_data_byte(addr); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /* instuctions D8 .. DF are in i87_ops.c */ /**************************************************************************** REMARKS: Handles opcode 0xe0 ****************************************************************************/ static void x86emuOp_loopne(u8 X86EMU_UNUSED(op1)) { s16 ip; START_OF_INSTR(); DECODE_PRINTF("LOOPNE\t"); ip = (s8) fetch_byte_imm(); ip += (s16) M.x86.R_IP; DECODE_PRINTF2("%04x\n", ip); TRACE_AND_STEP(); M.x86.R_CX -= 1; if (M.x86.R_CX != 0 && !ACCESS_FLAG(F_ZF)) /* CX != 0 and !ZF */ M.x86.R_IP = ip; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe1 ****************************************************************************/ static void x86emuOp_loope(u8 X86EMU_UNUSED(op1)) { s16 ip; START_OF_INSTR(); DECODE_PRINTF("LOOPE\t"); ip = (s8) fetch_byte_imm(); ip += (s16) M.x86.R_IP; DECODE_PRINTF2("%04x\n", ip); TRACE_AND_STEP(); M.x86.R_CX -= 1; if (M.x86.R_CX != 0 && ACCESS_FLAG(F_ZF)) /* CX != 0 and ZF */ M.x86.R_IP = ip; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe2 ****************************************************************************/ static void x86emuOp_loop(u8 X86EMU_UNUSED(op1)) { s16 ip; START_OF_INSTR(); DECODE_PRINTF("LOOP\t"); ip = (s8) fetch_byte_imm(); ip += (s16) M.x86.R_IP; DECODE_PRINTF2("%04x\n", ip); TRACE_AND_STEP(); M.x86.R_CX -= 1; if (M.x86.R_CX != 0) M.x86.R_IP = ip; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe3 ****************************************************************************/ static void x86emuOp_jcxz(u8 X86EMU_UNUSED(op1)) { u16 target; s8 offset; /* jump to byte offset if overflow flag is set */ START_OF_INSTR(); DECODE_PRINTF("JCXZ\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); if (M.x86.R_CX == 0) M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe4 ****************************************************************************/ static void x86emuOp_in_byte_AL_IMM(u8 X86EMU_UNUSED(op1)) { u8 port; START_OF_INSTR(); DECODE_PRINTF("IN\t"); port = (u8) fetch_byte_imm(); DECODE_PRINTF2("%x,AL\n", port); TRACE_AND_STEP(); M.x86.R_AL = (*sys_inb) (port); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe5 ****************************************************************************/ static void x86emuOp_in_word_AX_IMM(u8 X86EMU_UNUSED(op1)) { u8 port; START_OF_INSTR(); DECODE_PRINTF("IN\t"); port = (u8) fetch_byte_imm(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF2("EAX,%x\n", port); } else { DECODE_PRINTF2("AX,%x\n", port); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = (*sys_inl) (port); } else { M.x86.R_AX = (*sys_inw) (port); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe6 ****************************************************************************/ static void x86emuOp_out_byte_IMM_AL(u8 X86EMU_UNUSED(op1)) { u8 port; START_OF_INSTR(); DECODE_PRINTF("OUT\t"); port = (u8) fetch_byte_imm(); DECODE_PRINTF2("%x,AL\n", port); TRACE_AND_STEP(); (*sys_outb) (port, M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe7 ****************************************************************************/ static void x86emuOp_out_word_IMM_AX(u8 X86EMU_UNUSED(op1)) { u8 port; START_OF_INSTR(); DECODE_PRINTF("OUT\t"); port = (u8) fetch_byte_imm(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF2("%x,EAX\n", port); } else { DECODE_PRINTF2("%x,AX\n", port); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { (*sys_outl) (port, M.x86.R_EAX); } else { (*sys_outw) (port, M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe8 ****************************************************************************/ static void x86emuOp_call_near_IMM(u8 X86EMU_UNUSED(op1)) { s16 ip16 = 0; s32 ip32 = 0; START_OF_INSTR(); DECODE_PRINTF("CALL\t"); if (M.x86.mode & SYSMODE_PREFIX_DATA) { ip32 = (s32) fetch_long_imm(); ip32 += (s16) M.x86.R_IP; /* CHECK SIGN */ DECODE_PRINTF2("%04x\n", (u16) ip32); CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip32, ""); } else { ip16 = (s16) fetch_word_imm(); ip16 += (s16) M.x86.R_IP; /* CHECK SIGN */ DECODE_PRINTF2("%04x\n", (u16) ip16); CALL_TRACE(M.x86.saved_cs, M.x86.saved_ip, M.x86.R_CS, ip16, ""); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { push_long(M.x86.R_EIP); M.x86.R_EIP = ip32 & 0xffff; } else { push_word(M.x86.R_IP); M.x86.R_EIP = ip16; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xe9 ****************************************************************************/ static void x86emuOp_jump_near_IMM(u8 X86EMU_UNUSED(op1)) { u32 ip; START_OF_INSTR(); DECODE_PRINTF("JMP\t"); if (M.x86.mode & SYSMODE_PREFIX_DATA) { ip = (u32) fetch_long_imm(); ip += (u32) M.x86.R_EIP; DECODE_PRINTF2("%08x\n", (u32) ip); TRACE_AND_STEP(); M.x86.R_EIP = (u32) ip; } else { ip = (s16) fetch_word_imm(); ip += (s16) M.x86.R_IP; DECODE_PRINTF2("%04x\n", (u16) ip); TRACE_AND_STEP(); M.x86.R_IP = (u16) ip; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xea ****************************************************************************/ static void x86emuOp_jump_far_IMM(u8 X86EMU_UNUSED(op1)) { u16 cs; u32 ip; START_OF_INSTR(); DECODE_PRINTF("JMP\tFAR "); if (M.x86.mode & SYSMODE_PREFIX_DATA) { ip = fetch_long_imm(); } else { ip = fetch_word_imm(); } cs = fetch_word_imm(); DECODE_PRINTF2("%04x:", cs); DECODE_PRINTF2("%04x\n", ip); TRACE_AND_STEP(); M.x86.R_EIP = ip & 0xffff; M.x86.R_CS = cs; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xeb ****************************************************************************/ static void x86emuOp_jump_byte_IMM(u8 X86EMU_UNUSED(op1)) { u16 target; s8 offset; START_OF_INSTR(); DECODE_PRINTF("JMP\t"); offset = (s8) fetch_byte_imm(); target = (u16) (M.x86.R_IP + offset); DECODE_PRINTF2("%x\n", target); TRACE_AND_STEP(); M.x86.R_IP = target; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xec ****************************************************************************/ static void x86emuOp_in_byte_AL_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("IN\tAL,DX\n"); TRACE_AND_STEP(); M.x86.R_AL = (*sys_inb) (M.x86.R_DX); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xed ****************************************************************************/ static void x86emuOp_in_word_AX_DX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("IN\tEAX,DX\n"); } else { DECODE_PRINTF("IN\tAX,DX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_EAX = (*sys_inl) (M.x86.R_DX); } else { M.x86.R_AX = (*sys_inw) (M.x86.R_DX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xee ****************************************************************************/ static void x86emuOp_out_byte_DX_AL(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("OUT\tDX,AL\n"); TRACE_AND_STEP(); (*sys_outb) (M.x86.R_DX, M.x86.R_AL); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xef ****************************************************************************/ static void x86emuOp_out_word_DX_AX(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("OUT\tDX,EAX\n"); } else { DECODE_PRINTF("OUT\tDX,AX\n"); } TRACE_AND_STEP(); if (M.x86.mode & SYSMODE_PREFIX_DATA) { (*sys_outl) (M.x86.R_DX, M.x86.R_EAX); } else { (*sys_outw) (M.x86.R_DX, M.x86.R_AX); } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf0 ****************************************************************************/ static void x86emuOp_lock(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("LOCK:\n"); TRACE_AND_STEP(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /*opcode 0xf1 ILLEGAL OPERATION */ /**************************************************************************** REMARKS: Handles opcode 0xf2 ****************************************************************************/ static void x86emuOp_repne(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("REPNE\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_PREFIX_REPNE; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf3 ****************************************************************************/ static void x86emuOp_repe(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("REPE\n"); TRACE_AND_STEP(); M.x86.mode |= SYSMODE_PREFIX_REPE; DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf4 ****************************************************************************/ static void x86emuOp_halt(u8 X86EMU_UNUSED(op1)) { START_OF_INSTR(); DECODE_PRINTF("HALT\n"); TRACE_AND_STEP(); HALT_SYS(); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf5 ****************************************************************************/ static void x86emuOp_cmc(u8 X86EMU_UNUSED(op1)) { /* complement the carry flag. */ START_OF_INSTR(); DECODE_PRINTF("CMC\n"); TRACE_AND_STEP(); TOGGLE_FLAG(F_CF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf6 ****************************************************************************/ static void x86emuOp_opcF6_byte_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; u8 *destreg; uint destoffset; u8 destval, srcval; /* long, drawn out code follows. Double switch for a total of 32 cases. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: /* mod=00 */ switch (rh) { case 0: /* test byte imm */ DECODE_PRINTF("TEST\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcval = fetch_byte_imm(); DECODE_PRINTF2("%02x\n", srcval); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); test_byte(destval, srcval); break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=00 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: DECODE_PRINTF("NOT\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = not_byte(destval); store_data_byte(destoffset, destval); break; case 3: DECODE_PRINTF("NEG\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = neg_byte(destval); store_data_byte(destoffset, destval); break; case 4: DECODE_PRINTF("MUL\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); mul_byte(destval); break; case 5: DECODE_PRINTF("IMUL\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); imul_byte(destval); break; case 6: DECODE_PRINTF("DIV\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); div_byte(destval); break; case 7: DECODE_PRINTF("IDIV\tBYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); idiv_byte(destval); break; } break; /* end mod==00 */ case 1: /* mod=01 */ switch (rh) { case 0: /* test byte imm */ DECODE_PRINTF("TEST\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcval = fetch_byte_imm(); DECODE_PRINTF2("%02x\n", srcval); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); test_byte(destval, srcval); break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=01 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: DECODE_PRINTF("NOT\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = not_byte(destval); store_data_byte(destoffset, destval); break; case 3: DECODE_PRINTF("NEG\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = neg_byte(destval); store_data_byte(destoffset, destval); break; case 4: DECODE_PRINTF("MUL\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); mul_byte(destval); break; case 5: DECODE_PRINTF("IMUL\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); imul_byte(destval); break; case 6: DECODE_PRINTF("DIV\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); div_byte(destval); break; case 7: DECODE_PRINTF("IDIV\tBYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); idiv_byte(destval); break; } break; /* end mod==01 */ case 2: /* mod=10 */ switch (rh) { case 0: /* test byte imm */ DECODE_PRINTF("TEST\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcval = fetch_byte_imm(); DECODE_PRINTF2("%02x\n", srcval); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); test_byte(destval, srcval); break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=10 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: DECODE_PRINTF("NOT\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = not_byte(destval); store_data_byte(destoffset, destval); break; case 3: DECODE_PRINTF("NEG\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = neg_byte(destval); store_data_byte(destoffset, destval); break; case 4: DECODE_PRINTF("MUL\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); mul_byte(destval); break; case 5: DECODE_PRINTF("IMUL\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); imul_byte(destval); break; case 6: DECODE_PRINTF("DIV\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); div_byte(destval); break; case 7: DECODE_PRINTF("IDIV\tBYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); idiv_byte(destval); break; } break; /* end mod==10 */ case 3: /* mod=11 */ switch (rh) { case 0: /* test byte imm */ DECODE_PRINTF("TEST\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF(","); srcval = fetch_byte_imm(); DECODE_PRINTF2("%02x\n", srcval); TRACE_AND_STEP(); test_byte(*destreg, srcval); break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=00 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: DECODE_PRINTF("NOT\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = not_byte(*destreg); break; case 3: DECODE_PRINTF("NEG\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = neg_byte(*destreg); break; case 4: DECODE_PRINTF("MUL\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); mul_byte(*destreg); /*!!! */ break; case 5: DECODE_PRINTF("IMUL\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); imul_byte(*destreg); break; case 6: DECODE_PRINTF("DIV\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); div_byte(*destreg); break; case 7: DECODE_PRINTF("IDIV\t"); destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); idiv_byte(*destreg); break; } break; /* end mod==11 */ } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf7 ****************************************************************************/ static void x86emuOp_opcF7_word_RM(u8 X86EMU_UNUSED(op1)) { int mod, rl, rh; uint destoffset; /* long, drawn out code follows. Double switch for a total of 32 cases. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); switch (mod) { case 0: /* mod=00 */ switch (rh) { case 0: /* test word imm */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, srcval; DECODE_PRINTF("TEST\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcval = fetch_long_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); test_long(destval, srcval); } else { u16 destval, srcval; DECODE_PRINTF("TEST\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF(","); srcval = fetch_word_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); test_word(destval, srcval); } break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=00 RH=01 OP=F7\n"); HALT_SYS(); break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NOT\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = not_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NOT\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = not_word(destval); store_data_word(destoffset, destval); } break; case 3: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NEG\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = neg_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NEG\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = neg_word(destval); store_data_word(destoffset, destval); } break; case 4: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("MUL\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); mul_long(destval); } else { u16 destval; DECODE_PRINTF("MUL\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); mul_word(destval); } break; case 5: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IMUL\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); imul_long(destval); } else { u16 destval; DECODE_PRINTF("IMUL\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); imul_word(destval); } break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DIV\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); div_long(destval); } else { u16 destval; DECODE_PRINTF("DIV\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); div_word(destval); } break; case 7: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IDIV\tDWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); idiv_long(destval); } else { u16 destval; DECODE_PRINTF("IDIV\tWORD PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); idiv_word(destval); } break; } break; /* end mod==00 */ case 1: /* mod=01 */ switch (rh) { case 0: /* test word imm */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, srcval; DECODE_PRINTF("TEST\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcval = fetch_long_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); test_long(destval, srcval); } else { u16 destval, srcval; DECODE_PRINTF("TEST\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF(","); srcval = fetch_word_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); test_word(destval, srcval); } break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=01 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NOT\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = not_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NOT\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = not_word(destval); store_data_word(destoffset, destval); } break; case 3: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NEG\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = neg_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NEG\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = neg_word(destval); store_data_word(destoffset, destval); } break; case 4: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("MUL\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); mul_long(destval); } else { u16 destval; DECODE_PRINTF("MUL\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); mul_word(destval); } break; case 5: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IMUL\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); imul_long(destval); } else { u16 destval; DECODE_PRINTF("IMUL\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); imul_word(destval); } break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DIV\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); div_long(destval); } else { u16 destval; DECODE_PRINTF("DIV\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); div_word(destval); } break; case 7: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IDIV\tDWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); idiv_long(destval); } else { u16 destval; DECODE_PRINTF("IDIV\tWORD PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); idiv_word(destval); } break; } break; /* end mod==01 */ case 2: /* mod=10 */ switch (rh) { case 0: /* test word imm */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval, srcval; DECODE_PRINTF("TEST\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcval = fetch_long_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); test_long(destval, srcval); } else { u16 destval, srcval; DECODE_PRINTF("TEST\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF(","); srcval = fetch_word_imm(); DECODE_PRINTF2("%x\n", srcval); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); test_word(destval, srcval); } break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=10 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NOT\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = not_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NOT\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = not_word(destval); store_data_word(destoffset, destval); } break; case 3: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("NEG\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); destval = neg_long(destval); store_data_long(destoffset, destval); } else { u16 destval; DECODE_PRINTF("NEG\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); destval = neg_word(destval); store_data_word(destoffset, destval); } break; case 4: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("MUL\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); mul_long(destval); } else { u16 destval; DECODE_PRINTF("MUL\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); mul_word(destval); } break; case 5: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IMUL\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); imul_long(destval); } else { u16 destval; DECODE_PRINTF("IMUL\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); imul_word(destval); } break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("DIV\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); div_long(destval); } else { u16 destval; DECODE_PRINTF("DIV\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); div_word(destval); } break; case 7: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval; DECODE_PRINTF("IDIV\tDWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_long(destoffset); TRACE_AND_STEP(); idiv_long(destval); } else { u16 destval; DECODE_PRINTF("IDIV\tWORD PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); destval = fetch_data_word(destoffset); TRACE_AND_STEP(); idiv_word(destval); } break; } break; /* end mod==10 */ case 3: /* mod=11 */ switch (rh) { case 0: /* test word imm */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; u32 srcval; DECODE_PRINTF("TEST\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF(","); srcval = fetch_long_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); test_long(*destreg, srcval); } else { u16 *destreg; u16 srcval; DECODE_PRINTF("TEST\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF(","); srcval = fetch_word_imm(); DECODE_PRINTF2("%x\n", srcval); TRACE_AND_STEP(); test_word(*destreg, srcval); } break; case 1: DECODE_PRINTF("ILLEGAL OP MOD=00 RH=01 OP=F6\n"); HALT_SYS(); break; case 2: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("NOT\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = not_long(*destreg); } else { u16 *destreg; DECODE_PRINTF("NOT\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = not_word(*destreg); } break; case 3: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("NEG\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = neg_long(*destreg); } else { u16 *destreg; DECODE_PRINTF("NEG\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg = neg_word(*destreg); } break; case 4: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("MUL\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); mul_long(*destreg); /*!!! */ } else { u16 *destreg; DECODE_PRINTF("MUL\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); mul_word(*destreg); /*!!! */ } break; case 5: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("IMUL\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); imul_long(*destreg); } else { u16 *destreg; DECODE_PRINTF("IMUL\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); imul_word(*destreg); } break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("DIV\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); div_long(*destreg); } else { u16 *destreg; DECODE_PRINTF("DIV\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); div_word(*destreg); } break; case 7: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg; DECODE_PRINTF("IDIV\t"); destreg = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); idiv_long(*destreg); } else { u16 *destreg; DECODE_PRINTF("IDIV\t"); destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); idiv_word(*destreg); } break; } break; /* end mod==11 */ } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf8 ****************************************************************************/ static void x86emuOp_clc(u8 X86EMU_UNUSED(op1)) { /* clear the carry flag. */ START_OF_INSTR(); DECODE_PRINTF("CLC\n"); TRACE_AND_STEP(); CLEAR_FLAG(F_CF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xf9 ****************************************************************************/ static void x86emuOp_stc(u8 X86EMU_UNUSED(op1)) { /* set the carry flag. */ START_OF_INSTR(); DECODE_PRINTF("STC\n"); TRACE_AND_STEP(); SET_FLAG(F_CF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xfa ****************************************************************************/ static void x86emuOp_cli(u8 X86EMU_UNUSED(op1)) { /* clear interrupts. */ START_OF_INSTR(); DECODE_PRINTF("CLI\n"); TRACE_AND_STEP(); CLEAR_FLAG(F_IF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xfb ****************************************************************************/ static void x86emuOp_sti(u8 X86EMU_UNUSED(op1)) { /* enable interrupts. */ START_OF_INSTR(); DECODE_PRINTF("STI\n"); TRACE_AND_STEP(); SET_FLAG(F_IF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xfc ****************************************************************************/ static void x86emuOp_cld(u8 X86EMU_UNUSED(op1)) { /* clear interrupts. */ START_OF_INSTR(); DECODE_PRINTF("CLD\n"); TRACE_AND_STEP(); CLEAR_FLAG(F_DF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xfd ****************************************************************************/ static void x86emuOp_std(u8 X86EMU_UNUSED(op1)) { /* clear interrupts. */ START_OF_INSTR(); DECODE_PRINTF("STD\n"); TRACE_AND_STEP(); SET_FLAG(F_DF); DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xfe ****************************************************************************/ static void x86emuOp_opcFE_byte_RM(u8 X86EMU_UNUSED(op1)) { int mod, rh, rl; u8 destval; uint destoffset; u8 *destreg; /* Yet another special case instruction. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: DECODE_PRINTF("INC\t"); break; case 1: DECODE_PRINTF("DEC\t"); break; case 2: case 3: case 4: case 5: case 6: case 7: DECODE_PRINTF2("ILLEGAL OP MAJOR OP 0xFE MINOR OP %x \n", mod); HALT_SYS(); break; } } #endif switch (mod) { case 0: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: /* inc word ptr ... */ destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = inc_byte(destval); store_data_byte(destoffset, destval); break; case 1: /* dec word ptr ... */ destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = dec_byte(destval); store_data_byte(destoffset, destval); break; } break; case 1: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = inc_byte(destval); store_data_byte(destoffset, destval); break; case 1: destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = dec_byte(destval); store_data_byte(destoffset, destval); break; } break; case 2: DECODE_PRINTF("BYTE PTR "); destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = inc_byte(destval); store_data_byte(destoffset, destval); break; case 1: destval = fetch_data_byte(destoffset); TRACE_AND_STEP(); destval = dec_byte(destval); store_data_byte(destoffset, destval); break; } break; case 3: destreg = DECODE_RM_BYTE_REGISTER(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: TRACE_AND_STEP(); *destreg = inc_byte(*destreg); break; case 1: TRACE_AND_STEP(); *destreg = dec_byte(*destreg); break; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /**************************************************************************** REMARKS: Handles opcode 0xff ****************************************************************************/ static void x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) { int mod, rh, rl; uint destoffset = 0; u16 *destreg; u16 destval, destval2; /* Yet another special case instruction. */ START_OF_INSTR(); FETCH_DECODE_MODRM(mod, rh, rl); #ifdef DEBUG if (DEBUG_DECODE()) { /* XXX DECODE_PRINTF may be changed to something more general, so that it is important to leave the strings in the same format, even though the result is that the above test is done twice. */ switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("INC\tDWORD PTR "); } else { DECODE_PRINTF("INC\tWORD PTR "); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { DECODE_PRINTF("DEC\tDWORD PTR "); } else { DECODE_PRINTF("DEC\tWORD PTR "); } break; case 2: DECODE_PRINTF("CALL\t"); break; case 3: DECODE_PRINTF("CALL\tFAR "); break; case 4: DECODE_PRINTF("JMP\t"); break; case 5: DECODE_PRINTF("JMP\tFAR "); break; case 6: DECODE_PRINTF("PUSH\t"); break; case 7: DECODE_PRINTF("ILLEGAL DECODING OF OPCODE FF\t"); HALT_SYS(); break; } } #endif switch (mod) { case 0: destoffset = decode_rm00_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: /* inc word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = inc_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = inc_word(destval16); store_data_word(destoffset, destval16); } break; case 1: /* dec word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = dec_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = dec_word(destval16); store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 3: /* call far ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); destval2 = fetch_data_word(destoffset + 4); TRACE_AND_STEP(); push_long(M.x86.R_CS); M.x86.R_CS = destval2; push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); push_word(M.x86.R_CS); M.x86.R_CS = destval2; push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 4: /* jmp word ptr ... */ destval = fetch_data_word(destoffset); TRACE_AND_STEP(); M.x86.R_IP = destval; break; case 5: /* jmp far ptr ... */ destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); M.x86.R_IP = destval; M.x86.R_CS = destval2; break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(destval16); } break; } break; case 1: destoffset = decode_rm01_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = inc_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = inc_word(destval16); store_data_word(destoffset, destval16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = dec_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = dec_word(destval16); store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 3: /* call far ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); destval2 = fetch_data_word(destoffset + 4); TRACE_AND_STEP(); push_long(M.x86.R_CS); M.x86.R_CS = destval2; push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); push_word(M.x86.R_CS); M.x86.R_CS = destval2; push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 4: /* jmp word ptr ... */ destval = fetch_data_word(destoffset); TRACE_AND_STEP(); M.x86.R_IP = destval; break; case 5: /* jmp far ptr ... */ destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); M.x86.R_IP = destval; M.x86.R_CS = destval2; break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(destval16); } break; } break; case 2: destoffset = decode_rm10_address(rl); DECODE_PRINTF("\n"); switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = inc_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = inc_word(destval16); store_data_word(destoffset, destval16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); destval32 = dec_long(destval32); store_data_long(destoffset, destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); destval16 = dec_word(destval16); store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 3: /* call far ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destval = fetch_data_long(destoffset); destval2 = fetch_data_word(destoffset + 4); TRACE_AND_STEP(); push_long(M.x86.R_CS); M.x86.R_CS = destval2; push_long(M.x86.R_EIP); M.x86.R_EIP = destval; } else { destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); push_word(M.x86.R_CS); M.x86.R_CS = destval2; push_word(M.x86.R_IP); M.x86.R_IP = destval; } break; case 4: /* jmp word ptr ... */ destval = fetch_data_word(destoffset); TRACE_AND_STEP(); M.x86.R_IP = destval; break; case 5: /* jmp far ptr ... */ destval = fetch_data_word(destoffset); destval2 = fetch_data_word(destoffset + 2); TRACE_AND_STEP(); M.x86.R_IP = destval; M.x86.R_CS = destval2; break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 destval32; destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); push_long(destval32); } else { u16 destval16; destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); push_word(destval16); } break; } break; case 3: switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg32; destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg32 = inc_long(*destreg32); } else { u16 *destreg16; destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg16 = inc_word(*destreg16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg32; destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg32 = dec_long(*destreg32); } else { u16 *destreg16; destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); *destreg16 = dec_word(*destreg16); } break; case 2: /* call word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { destreg = (u16 *)DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); push_long(M.x86.R_EIP); M.x86.R_EIP = *destreg; } else { destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); push_word(M.x86.R_IP); M.x86.R_IP = *destreg; } break; case 3: /* jmp far ptr ... */ DECODE_PRINTF("OPERATION UNDEFINED 0XFF \n"); TRACE_AND_STEP(); HALT_SYS(); break; case 4: /* jmp ... */ destreg = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); M.x86.R_IP = (u16) (*destreg); break; case 5: /* jmp far ptr ... */ DECODE_PRINTF("OPERATION UNDEFINED 0XFF \n"); TRACE_AND_STEP(); HALT_SYS(); break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { u32 *destreg32; destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); push_long(*destreg32); } else { u16 *destreg16; destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); push_word(*destreg16); } break; } break; } DECODE_CLEAR_SEGOVR(); END_OF_INSTR(); } /*************************************************************************** * Single byte operation code table: **************************************************************************/ void (*x86emu_optab[256]) (u8) = { /* 0x00 */ x86emuOp_add_byte_RM_R, /* 0x01 */ x86emuOp_add_word_RM_R, /* 0x02 */ x86emuOp_add_byte_R_RM, /* 0x03 */ x86emuOp_add_word_R_RM, /* 0x04 */ x86emuOp_add_byte_AL_IMM, /* 0x05 */ x86emuOp_add_word_AX_IMM, /* 0x06 */ x86emuOp_push_ES, /* 0x07 */ x86emuOp_pop_ES, /* 0x08 */ x86emuOp_or_byte_RM_R, /* 0x09 */ x86emuOp_or_word_RM_R, /* 0x0a */ x86emuOp_or_byte_R_RM, /* 0x0b */ x86emuOp_or_word_R_RM, /* 0x0c */ x86emuOp_or_byte_AL_IMM, /* 0x0d */ x86emuOp_or_word_AX_IMM, /* 0x0e */ x86emuOp_push_CS, /* 0x0f */ x86emuOp_two_byte, /* 0x10 */ x86emuOp_adc_byte_RM_R, /* 0x11 */ x86emuOp_adc_word_RM_R, /* 0x12 */ x86emuOp_adc_byte_R_RM, /* 0x13 */ x86emuOp_adc_word_R_RM, /* 0x14 */ x86emuOp_adc_byte_AL_IMM, /* 0x15 */ x86emuOp_adc_word_AX_IMM, /* 0x16 */ x86emuOp_push_SS, /* 0x17 */ x86emuOp_pop_SS, /* 0x18 */ x86emuOp_sbb_byte_RM_R, /* 0x19 */ x86emuOp_sbb_word_RM_R, /* 0x1a */ x86emuOp_sbb_byte_R_RM, /* 0x1b */ x86emuOp_sbb_word_R_RM, /* 0x1c */ x86emuOp_sbb_byte_AL_IMM, /* 0x1d */ x86emuOp_sbb_word_AX_IMM, /* 0x1e */ x86emuOp_push_DS, /* 0x1f */ x86emuOp_pop_DS, /* 0x20 */ x86emuOp_and_byte_RM_R, /* 0x21 */ x86emuOp_and_word_RM_R, /* 0x22 */ x86emuOp_and_byte_R_RM, /* 0x23 */ x86emuOp_and_word_R_RM, /* 0x24 */ x86emuOp_and_byte_AL_IMM, /* 0x25 */ x86emuOp_and_word_AX_IMM, /* 0x26 */ x86emuOp_segovr_ES, /* 0x27 */ x86emuOp_daa, /* 0x28 */ x86emuOp_sub_byte_RM_R, /* 0x29 */ x86emuOp_sub_word_RM_R, /* 0x2a */ x86emuOp_sub_byte_R_RM, /* 0x2b */ x86emuOp_sub_word_R_RM, /* 0x2c */ x86emuOp_sub_byte_AL_IMM, /* 0x2d */ x86emuOp_sub_word_AX_IMM, /* 0x2e */ x86emuOp_segovr_CS, /* 0x2f */ x86emuOp_das, /* 0x30 */ x86emuOp_xor_byte_RM_R, /* 0x31 */ x86emuOp_xor_word_RM_R, /* 0x32 */ x86emuOp_xor_byte_R_RM, /* 0x33 */ x86emuOp_xor_word_R_RM, /* 0x34 */ x86emuOp_xor_byte_AL_IMM, /* 0x35 */ x86emuOp_xor_word_AX_IMM, /* 0x36 */ x86emuOp_segovr_SS, /* 0x37 */ x86emuOp_aaa, /* 0x38 */ x86emuOp_cmp_byte_RM_R, /* 0x39 */ x86emuOp_cmp_word_RM_R, /* 0x3a */ x86emuOp_cmp_byte_R_RM, /* 0x3b */ x86emuOp_cmp_word_R_RM, /* 0x3c */ x86emuOp_cmp_byte_AL_IMM, /* 0x3d */ x86emuOp_cmp_word_AX_IMM, /* 0x3e */ x86emuOp_segovr_DS, /* 0x3f */ x86emuOp_aas, /* 0x40 */ x86emuOp_inc_AX, /* 0x41 */ x86emuOp_inc_CX, /* 0x42 */ x86emuOp_inc_DX, /* 0x43 */ x86emuOp_inc_BX, /* 0x44 */ x86emuOp_inc_SP, /* 0x45 */ x86emuOp_inc_BP, /* 0x46 */ x86emuOp_inc_SI, /* 0x47 */ x86emuOp_inc_DI, /* 0x48 */ x86emuOp_dec_AX, /* 0x49 */ x86emuOp_dec_CX, /* 0x4a */ x86emuOp_dec_DX, /* 0x4b */ x86emuOp_dec_BX, /* 0x4c */ x86emuOp_dec_SP, /* 0x4d */ x86emuOp_dec_BP, /* 0x4e */ x86emuOp_dec_SI, /* 0x4f */ x86emuOp_dec_DI, /* 0x50 */ x86emuOp_push_AX, /* 0x51 */ x86emuOp_push_CX, /* 0x52 */ x86emuOp_push_DX, /* 0x53 */ x86emuOp_push_BX, /* 0x54 */ x86emuOp_push_SP, /* 0x55 */ x86emuOp_push_BP, /* 0x56 */ x86emuOp_push_SI, /* 0x57 */ x86emuOp_push_DI, /* 0x58 */ x86emuOp_pop_AX, /* 0x59 */ x86emuOp_pop_CX, /* 0x5a */ x86emuOp_pop_DX, /* 0x5b */ x86emuOp_pop_BX, /* 0x5c */ x86emuOp_pop_SP, /* 0x5d */ x86emuOp_pop_BP, /* 0x5e */ x86emuOp_pop_SI, /* 0x5f */ x86emuOp_pop_DI, /* 0x60 */ x86emuOp_push_all, /* 0x61 */ x86emuOp_pop_all, /* 0x62 */ x86emuOp_illegal_op, /* bound */ /* 0x63 */ x86emuOp_illegal_op, /* arpl */ /* 0x64 */ x86emuOp_segovr_FS, /* 0x65 */ x86emuOp_segovr_GS, /* 0x66 */ x86emuOp_prefix_data, /* 0x67 */ x86emuOp_prefix_addr, /* 0x68 */ x86emuOp_push_word_IMM, /* 0x69 */ x86emuOp_imul_word_IMM, /* 0x6a */ x86emuOp_push_byte_IMM, /* 0x6b */ x86emuOp_imul_byte_IMM, /* 0x6c */ x86emuOp_ins_byte, /* 0x6d */ x86emuOp_ins_word, /* 0x6e */ x86emuOp_outs_byte, /* 0x6f */ x86emuOp_outs_word, /* 0x70 */ x86emuOp_jump_near_O, /* 0x71 */ x86emuOp_jump_near_NO, /* 0x72 */ x86emuOp_jump_near_B, /* 0x73 */ x86emuOp_jump_near_NB, /* 0x74 */ x86emuOp_jump_near_Z, /* 0x75 */ x86emuOp_jump_near_NZ, /* 0x76 */ x86emuOp_jump_near_BE, /* 0x77 */ x86emuOp_jump_near_NBE, /* 0x78 */ x86emuOp_jump_near_S, /* 0x79 */ x86emuOp_jump_near_NS, /* 0x7a */ x86emuOp_jump_near_P, /* 0x7b */ x86emuOp_jump_near_NP, /* 0x7c */ x86emuOp_jump_near_L, /* 0x7d */ x86emuOp_jump_near_NL, /* 0x7e */ x86emuOp_jump_near_LE, /* 0x7f */ x86emuOp_jump_near_NLE, /* 0x80 */ x86emuOp_opc80_byte_RM_IMM, /* 0x81 */ x86emuOp_opc81_word_RM_IMM, /* 0x82 */ x86emuOp_opc82_byte_RM_IMM, /* 0x83 */ x86emuOp_opc83_word_RM_IMM, /* 0x84 */ x86emuOp_test_byte_RM_R, /* 0x85 */ x86emuOp_test_word_RM_R, /* 0x86 */ x86emuOp_xchg_byte_RM_R, /* 0x87 */ x86emuOp_xchg_word_RM_R, /* 0x88 */ x86emuOp_mov_byte_RM_R, /* 0x89 */ x86emuOp_mov_word_RM_R, /* 0x8a */ x86emuOp_mov_byte_R_RM, /* 0x8b */ x86emuOp_mov_word_R_RM, /* 0x8c */ x86emuOp_mov_word_RM_SR, /* 0x8d */ x86emuOp_lea_word_R_M, /* 0x8e */ x86emuOp_mov_word_SR_RM, /* 0x8f */ x86emuOp_pop_RM, /* 0x90 */ x86emuOp_nop, /* 0x91 */ x86emuOp_xchg_word_AX_CX, /* 0x92 */ x86emuOp_xchg_word_AX_DX, /* 0x93 */ x86emuOp_xchg_word_AX_BX, /* 0x94 */ x86emuOp_xchg_word_AX_SP, /* 0x95 */ x86emuOp_xchg_word_AX_BP, /* 0x96 */ x86emuOp_xchg_word_AX_SI, /* 0x97 */ x86emuOp_xchg_word_AX_DI, /* 0x98 */ x86emuOp_cbw, /* 0x99 */ x86emuOp_cwd, /* 0x9a */ x86emuOp_call_far_IMM, /* 0x9b */ x86emuOp_wait, /* 0x9c */ x86emuOp_pushf_word, /* 0x9d */ x86emuOp_popf_word, /* 0x9e */ x86emuOp_sahf, /* 0x9f */ x86emuOp_lahf, /* 0xa0 */ x86emuOp_mov_AL_M_IMM, /* 0xa1 */ x86emuOp_mov_AX_M_IMM, /* 0xa2 */ x86emuOp_mov_M_AL_IMM, /* 0xa3 */ x86emuOp_mov_M_AX_IMM, /* 0xa4 */ x86emuOp_movs_byte, /* 0xa5 */ x86emuOp_movs_word, /* 0xa6 */ x86emuOp_cmps_byte, /* 0xa7 */ x86emuOp_cmps_word, /* 0xa8 */ x86emuOp_test_AL_IMM, /* 0xa9 */ x86emuOp_test_AX_IMM, /* 0xaa */ x86emuOp_stos_byte, /* 0xab */ x86emuOp_stos_word, /* 0xac */ x86emuOp_lods_byte, /* 0xad */ x86emuOp_lods_word, /* 0xac */ x86emuOp_scas_byte, /* 0xad */ x86emuOp_scas_word, /* 0xb0 */ x86emuOp_mov_byte_AL_IMM, /* 0xb1 */ x86emuOp_mov_byte_CL_IMM, /* 0xb2 */ x86emuOp_mov_byte_DL_IMM, /* 0xb3 */ x86emuOp_mov_byte_BL_IMM, /* 0xb4 */ x86emuOp_mov_byte_AH_IMM, /* 0xb5 */ x86emuOp_mov_byte_CH_IMM, /* 0xb6 */ x86emuOp_mov_byte_DH_IMM, /* 0xb7 */ x86emuOp_mov_byte_BH_IMM, /* 0xb8 */ x86emuOp_mov_word_AX_IMM, /* 0xb9 */ x86emuOp_mov_word_CX_IMM, /* 0xba */ x86emuOp_mov_word_DX_IMM, /* 0xbb */ x86emuOp_mov_word_BX_IMM, /* 0xbc */ x86emuOp_mov_word_SP_IMM, /* 0xbd */ x86emuOp_mov_word_BP_IMM, /* 0xbe */ x86emuOp_mov_word_SI_IMM, /* 0xbf */ x86emuOp_mov_word_DI_IMM, /* 0xc0 */ x86emuOp_opcC0_byte_RM_MEM, /* 0xc1 */ x86emuOp_opcC1_word_RM_MEM, /* 0xc2 */ x86emuOp_ret_near_IMM, /* 0xc3 */ x86emuOp_ret_near, /* 0xc4 */ x86emuOp_les_R_IMM, /* 0xc5 */ x86emuOp_lds_R_IMM, /* 0xc6 */ x86emuOp_mov_byte_RM_IMM, /* 0xc7 */ x86emuOp_mov_word_RM_IMM, /* 0xc8 */ x86emuOp_enter, /* 0xc9 */ x86emuOp_leave, /* 0xca */ x86emuOp_ret_far_IMM, /* 0xcb */ x86emuOp_ret_far, /* 0xcc */ x86emuOp_int3, /* 0xcd */ x86emuOp_int_IMM, /* 0xce */ x86emuOp_into, /* 0xcf */ x86emuOp_iret, /* 0xd0 */ x86emuOp_opcD0_byte_RM_1, /* 0xd1 */ x86emuOp_opcD1_word_RM_1, /* 0xd2 */ x86emuOp_opcD2_byte_RM_CL, /* 0xd3 */ x86emuOp_opcD3_word_RM_CL, /* 0xd4 */ x86emuOp_aam, /* 0xd5 */ x86emuOp_aad, /* 0xd6 */ x86emuOp_illegal_op, /* Undocumented SETALC instruction */ /* 0xd7 */ x86emuOp_xlat, /* 0xd8 */ x86emuOp_esc_coprocess_d8, /* 0xd9 */ x86emuOp_esc_coprocess_d9, /* 0xda */ x86emuOp_esc_coprocess_da, /* 0xdb */ x86emuOp_esc_coprocess_db, /* 0xdc */ x86emuOp_esc_coprocess_dc, /* 0xdd */ x86emuOp_esc_coprocess_dd, /* 0xde */ x86emuOp_esc_coprocess_de, /* 0xdf */ x86emuOp_esc_coprocess_df, /* 0xe0 */ x86emuOp_loopne, /* 0xe1 */ x86emuOp_loope, /* 0xe2 */ x86emuOp_loop, /* 0xe3 */ x86emuOp_jcxz, /* 0xe4 */ x86emuOp_in_byte_AL_IMM, /* 0xe5 */ x86emuOp_in_word_AX_IMM, /* 0xe6 */ x86emuOp_out_byte_IMM_AL, /* 0xe7 */ x86emuOp_out_word_IMM_AX, /* 0xe8 */ x86emuOp_call_near_IMM, /* 0xe9 */ x86emuOp_jump_near_IMM, /* 0xea */ x86emuOp_jump_far_IMM, /* 0xeb */ x86emuOp_jump_byte_IMM, /* 0xec */ x86emuOp_in_byte_AL_DX, /* 0xed */ x86emuOp_in_word_AX_DX, /* 0xee */ x86emuOp_out_byte_DX_AL, /* 0xef */ x86emuOp_out_word_DX_AX, /* 0xf0 */ x86emuOp_lock, /* 0xf1 */ x86emuOp_illegal_op, /* 0xf2 */ x86emuOp_repne, /* 0xf3 */ x86emuOp_repe, /* 0xf4 */ x86emuOp_halt, /* 0xf5 */ x86emuOp_cmc, /* 0xf6 */ x86emuOp_opcF6_byte_RM, /* 0xf7 */ x86emuOp_opcF7_word_RM, /* 0xf8 */ x86emuOp_clc, /* 0xf9 */ x86emuOp_stc, /* 0xfa */ x86emuOp_cli, /* 0xfb */ x86emuOp_sti, /* 0xfc */ x86emuOp_cld, /* 0xfd */ x86emuOp_std, /* 0xfe */ x86emuOp_opcFE_byte_RM, /* 0xff */ x86emuOp_opcFF_word_RM, }; xorg-server-21.1.16/hw/xfree86/x86emu/prim_ops.c0000644000175000017500000024157514757411105014706 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file contains the code to implement the primitive * machine operations used by the emulation code in ops.c * * Carry Chain Calculation * * This represents a somewhat expensive calculation which is * apparently required to emulate the setting of the OF and AF flag. * The latter is not so important, but the former is. The overflow * flag is the XOR of the top two bits of the carry chain for an * addition (similar for subtraction). Since we do not want to * simulate the addition in a bitwise manner, we try to calculate the * carry chain given the two operands and the result. * * So, given the following table, which represents the addition of two * bits, we can derive a formula for the carry chain. * * a b cin r cout * 0 0 0 0 0 * 0 0 1 1 0 * 0 1 0 1 0 * 0 1 1 0 1 * 1 0 0 1 0 * 1 0 1 0 1 * 1 1 0 0 1 * 1 1 1 1 1 * * Construction of table for cout: * * ab * r \ 00 01 11 10 * |------------------ * 0 | 0 1 1 1 * 1 | 0 0 1 0 * * By inspection, one gets: cc = ab + r'(a + b) * * That represents a lot of operations, but NO CHOICE.... * * Borrow Chain Calculation. * * The following table represents the subtraction of two bits, from * which we can derive a formula for the borrow chain. * * a b bin r bout * 0 0 0 0 0 * 0 0 1 1 1 * 0 1 0 1 1 * 0 1 1 0 1 * 1 0 0 1 0 * 1 0 1 0 0 * 1 1 0 0 0 * 1 1 1 1 1 * * Construction of table for cout: * * ab * r \ 00 01 11 10 * |------------------ * 0 | 0 1 0 0 * 1 | 1 1 1 0 * * By inspection, one gets: bc = a'b + r(a' + b) * ****************************************************************************/ #include #define PRIM_OPS_NO_REDEFINE_ASM #include "x86emu/x86emui.h" #if defined(__GNUC__) #if defined (__i386__) || defined(__i386) || defined(__AMD64__) || defined(__amd64__) #include "x86emu/prim_x86_gcc.h" #endif #endif /*------------------------- Global Variables ------------------------------*/ static u32 x86emu_parity_tab[8] = { 0x96696996, 0x69969669, 0x69969669, 0x96696996, 0x69969669, 0x96696996, 0x96696996, 0x69969669, }; #define PARITY(x) (((x86emu_parity_tab[(x) / 32] >> ((x) % 32)) & 1) == 0) #define XOR2(x) (((x) ^ ((x)>>1)) & 0x1) /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** REMARKS: Implements the AAA instruction and side effects. ****************************************************************************/ u16 aaa_word(u16 d) { u16 res; if ((d & 0xf) > 0x9 || ACCESS_FLAG(F_AF)) { d += 0x6; d += 0x100; SET_FLAG(F_AF); SET_FLAG(F_CF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); } res = (u16) (d & 0xFF0F); CLEAR_FLAG(F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the AAA instruction and side effects. ****************************************************************************/ u16 aas_word(u16 d) { u16 res; if ((d & 0xf) > 0x9 || ACCESS_FLAG(F_AF)) { d -= 0x6; d -= 0x100; SET_FLAG(F_AF); SET_FLAG(F_CF); } else { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); } res = (u16) (d & 0xFF0F); CLEAR_FLAG(F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the AAD instruction and side effects. ****************************************************************************/ u16 aad_word(u16 d) { u16 l; u8 hb, lb; hb = (u8) ((d >> 8) & 0xff); lb = (u8) ((d & 0xff)); l = (u16) ((lb + 10 * hb) & 0xFF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(l & 0x80, F_SF); CONDITIONAL_SET_FLAG(l == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(l & 0xff), F_PF); return l; } /**************************************************************************** REMARKS: Implements the AAM instruction and side effects. ****************************************************************************/ u16 aam_word(u8 d) { u16 h, l; h = (u16) (d / 10); l = (u16) (d % 10); l |= (u16) (h << 8); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(l & 0x80, F_SF); CONDITIONAL_SET_FLAG(l == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(l & 0xff), F_PF); return l; } /**************************************************************************** REMARKS: Implements the ADC instruction and side effects. ****************************************************************************/ u8 adc_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ register u32 cc; if (ACCESS_FLAG(F_CF)) res = 1 + d + s; else res = d + s; CONDITIONAL_SET_FLAG(res & 0x100, F_CF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 6), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the ADC instruction and side effects. ****************************************************************************/ u16 adc_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ register u32 cc; if (ACCESS_FLAG(F_CF)) res = 1 + d + s; else res = d + s; CONDITIONAL_SET_FLAG(res & 0x10000, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 14), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the ADC instruction and side effects. ****************************************************************************/ u32 adc_long(u32 d, u32 s) { register u32 lo; /* all operands in native machine order */ register u32 hi; register u32 res; register u32 cc; if (ACCESS_FLAG(F_CF)) { lo = 1 + (d & 0xFFFF) + (s & 0xFFFF); res = 1 + d + s; } else { lo = (d & 0xFFFF) + (s & 0xFFFF); res = d + s; } hi = (lo >> 16) + (d >> 16) + (s >> 16); CONDITIONAL_SET_FLAG(hi & 0x10000, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 30), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the ADD instruction and side effects. ****************************************************************************/ u8 add_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ register u32 cc; res = d + s; CONDITIONAL_SET_FLAG(res & 0x100, F_CF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 6), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the ADD instruction and side effects. ****************************************************************************/ u16 add_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ register u32 cc; res = d + s; CONDITIONAL_SET_FLAG(res & 0x10000, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 14), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the ADD instruction and side effects. ****************************************************************************/ u32 add_long(u32 d, u32 s) { register u32 lo; /* all operands in native machine order */ register u32 hi; register u32 res; register u32 cc; lo = (d & 0xFFFF) + (s & 0xFFFF); res = d + s; hi = (lo >> 16) + (d >> 16) + (s >> 16); CONDITIONAL_SET_FLAG(hi & 0x10000, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (s & d) | ((~res) & (s | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 30), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the AND instruction and side effects. ****************************************************************************/ u8 and_byte(u8 d, u8 s) { register u8 res; /* all operands in native machine order */ res = d & s; /* set the flags */ CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res), F_PF); return res; } /**************************************************************************** REMARKS: Implements the AND instruction and side effects. ****************************************************************************/ u16 and_word(u16 d, u16 s) { register u16 res; /* all operands in native machine order */ res = d & s; /* set the flags */ CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the AND instruction and side effects. ****************************************************************************/ u32 and_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ res = d & s; /* set the flags */ CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the CMP instruction and side effects. ****************************************************************************/ u8 cmp_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CLEAR_FLAG(F_CF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 6), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return d; } /**************************************************************************** REMARKS: Implements the CMP instruction and side effects. ****************************************************************************/ u16 cmp_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x8000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 14), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return d; } /**************************************************************************** REMARKS: Implements the CMP instruction and side effects. ****************************************************************************/ u32 cmp_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80000000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 30), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return d; } /**************************************************************************** REMARKS: Implements the DAA instruction and side effects. ****************************************************************************/ u8 daa_byte(u8 d) { u32 res = d; if ((d & 0xf) > 9 || ACCESS_FLAG(F_AF)) { res += 6; SET_FLAG(F_AF); } if (res > 0x9F || ACCESS_FLAG(F_CF)) { res += 0x60; SET_FLAG(F_CF); } CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG((res & 0xFF) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return (u8) res; } /**************************************************************************** REMARKS: Implements the DAS instruction and side effects. ****************************************************************************/ u8 das_byte(u8 d) { if ((d & 0xf) > 9 || ACCESS_FLAG(F_AF)) { d -= 6; SET_FLAG(F_AF); } if (d > 0x9F || ACCESS_FLAG(F_CF)) { d -= 0x60; SET_FLAG(F_CF); } CONDITIONAL_SET_FLAG(d & 0x80, F_SF); CONDITIONAL_SET_FLAG(d == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(d & 0xff), F_PF); return d; } /**************************************************************************** REMARKS: Implements the DEC instruction and side effects. ****************************************************************************/ u8 dec_byte(u8 d) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - 1; CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ /* based on sub_byte, uses s==1. */ bc = (res & (~d | 1)) | (~d & 1); /* carry flag unchanged */ CONDITIONAL_SET_FLAG(XOR2(bc >> 6), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the DEC instruction and side effects. ****************************************************************************/ u16 dec_word(u16 d) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - 1; CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ /* based on the sub_byte routine, with s==1 */ bc = (res & (~d | 1)) | (~d & 1); /* carry flag unchanged */ CONDITIONAL_SET_FLAG(XOR2(bc >> 14), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the DEC instruction and side effects. ****************************************************************************/ u32 dec_long(u32 d) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - 1; CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | 1)) | (~d & 1); /* carry flag unchanged */ CONDITIONAL_SET_FLAG(XOR2(bc >> 30), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the INC instruction and side effects. ****************************************************************************/ u8 inc_byte(u8 d) { register u32 res; /* all operands in native machine order */ register u32 cc; res = d + 1; CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = ((1 & d) | (~res)) & (1 | d); CONDITIONAL_SET_FLAG(XOR2(cc >> 6), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the INC instruction and side effects. ****************************************************************************/ u16 inc_word(u16 d) { register u32 res; /* all operands in native machine order */ register u32 cc; res = d + 1; CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (1 & d) | ((~res) & (1 | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 14), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the INC instruction and side effects. ****************************************************************************/ u32 inc_long(u32 d) { register u32 res; /* all operands in native machine order */ register u32 cc; res = d + 1; CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the carry chain SEE NOTE AT TOP. */ cc = (1 & d) | ((~res) & (1 | d)); CONDITIONAL_SET_FLAG(XOR2(cc >> 30), F_OF); CONDITIONAL_SET_FLAG(cc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u8 or_byte(u8 d, u8 s) { register u8 res; /* all operands in native machine order */ res = d | s; CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res), F_PF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u16 or_word(u16 d, u16 s) { register u16 res; /* all operands in native machine order */ res = d | s; /* set the carry flag to be bit 8 */ CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u32 or_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ res = d | s; /* set the carry flag to be bit 8 */ CLEAR_FLAG(F_OF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u8 neg_byte(u8 s) { register u8 res; register u8 bc; CONDITIONAL_SET_FLAG(s != 0, F_CF); res = (u8) - s; CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res), F_PF); /* calculate the borrow chain --- modified such that d=0. substitutiing d=0 into bc= res&(~d|s)|(~d&s); (the one used for sub) and simplifying, since ~d=0xff..., ~d|s == 0xffff..., and res&0xfff... == res. Similarly ~d&s == s. So the simplified result is: */ bc = res | s; CONDITIONAL_SET_FLAG(XOR2(bc >> 6), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u16 neg_word(u16 s) { register u16 res; register u16 bc; CONDITIONAL_SET_FLAG(s != 0, F_CF); res = (u16) - s; CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain --- modified such that d=0. substitutiing d=0 into bc= res&(~d|s)|(~d&s); (the one used for sub) and simplifying, since ~d=0xff..., ~d|s == 0xffff..., and res&0xfff... == res. Similarly ~d&s == s. So the simplified result is: */ bc = res | s; CONDITIONAL_SET_FLAG(XOR2(bc >> 14), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the OR instruction and side effects. ****************************************************************************/ u32 neg_long(u32 s) { register u32 res; register u32 bc; CONDITIONAL_SET_FLAG(s != 0, F_CF); res = (u32) - s; CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain --- modified such that d=0. substitutiing d=0 into bc= res&(~d|s)|(~d&s); (the one used for sub) and simplifying, since ~d=0xff..., ~d|s == 0xffff..., and res&0xfff... == res. Similarly ~d&s == s. So the simplified result is: */ bc = res | s; CONDITIONAL_SET_FLAG(XOR2(bc >> 30), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the NOT instruction and side effects. ****************************************************************************/ u8 not_byte(u8 s) { return ~s; } /**************************************************************************** REMARKS: Implements the NOT instruction and side effects. ****************************************************************************/ u16 not_word(u16 s) { return ~s; } /**************************************************************************** REMARKS: Implements the NOT instruction and side effects. ****************************************************************************/ u32 not_long(u32 s) { return ~s; } /**************************************************************************** REMARKS: Implements the RCL instruction and side effects. ****************************************************************************/ u8 rcl_byte(u8 d, u8 s) { register unsigned int res, cnt, mask, cf; /* s is the rotate distance. It varies from 0 - 8. */ /* have CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0 want to rotate through the carry by "s" bits. We could loop, but that's inefficient. So the width is 9, and we split into three parts: The new carry flag (was B_n) the stuff in B_n-1 .. B_0 the stuff in B_7 .. B_n+1 The new rotate is done mod 9, and given this, for a rotation of n bits (mod 9) the new carry flag is then located n bits from the MSB. The low part is then shifted up cnt bits, and the high part is or'd in. Using CAPS for new values, and lowercase for the original values, this can be expressed as: IF n > 0 1) CF <- b_(8-n) 2) B_(7) .. B_(n) <- b_(8-(n+1)) .. b_0 3) B_(n-1) <- cf 4) B_(n-2) .. B_0 <- b_7 .. b_(8-(n-1)) */ res = d; if ((cnt = s % 9) != 0) { /* extract the new CARRY FLAG. */ /* CF <- b_(8-n) */ cf = (d >> (8 - cnt)) & 0x1; /* get the low stuff which rotated into the range B_7 .. B_cnt */ /* B_(7) .. B_(n) <- b_(8-(n+1)) .. b_0 */ /* note that the right hand side done by the mask */ res = (d << cnt) & 0xff; /* now the high stuff which rotated around into the positions B_cnt-2 .. B_0 */ /* B_(n-2) .. B_0 <- b_7 .. b_(8-(n-1)) */ /* shift it downward, 7-(n-2) = 9-n positions. and mask off the result before or'ing in. */ mask = (1 << (cnt - 1)) - 1; res |= (d >> (9 - cnt)) & mask; /* if the carry flag was set, or it in. */ if (ACCESS_FLAG(F_CF)) { /* carry flag is set */ /* B_(n-1) <- cf */ res |= 1 << (cnt - 1); } /* set the new carry flag, based on the variable "cf" */ CONDITIONAL_SET_FLAG(cf, F_CF); /* OVERFLOW is set *IFF* cnt==1, then it is the xor of CF and the most significant bit. Blecck. */ /* parenthesized this expression since it appears to be causing OF to be misset */ CONDITIONAL_SET_FLAG(cnt == 1 && XOR2(cf + ((res >> 6) & 0x2)), F_OF); } return (u8) res; } /**************************************************************************** REMARKS: Implements the RCL instruction and side effects. ****************************************************************************/ u16 rcl_word(u16 d, u8 s) { register unsigned int res, cnt, mask, cf; res = d; if ((cnt = s % 17) != 0) { cf = (d >> (16 - cnt)) & 0x1; res = (d << cnt) & 0xffff; mask = (1 << (cnt - 1)) - 1; res |= (d >> (17 - cnt)) & mask; if (ACCESS_FLAG(F_CF)) { res |= 1 << (cnt - 1); } CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG(cnt == 1 && XOR2(cf + ((res >> 14) & 0x2)), F_OF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the RCL instruction and side effects. ****************************************************************************/ u32 rcl_long(u32 d, u8 s) { register u32 res, cnt, mask, cf; res = d; if ((cnt = s % 33) != 0) { cf = (d >> (32 - cnt)) & 0x1; res = (d << cnt) & 0xffffffff; mask = (1 << (cnt - 1)) - 1; res |= (d >> (33 - cnt)) & mask; if (ACCESS_FLAG(F_CF)) { /* carry flag is set */ res |= 1 << (cnt - 1); } CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG(cnt == 1 && XOR2(cf + ((res >> 30) & 0x2)), F_OF); } return res; } /**************************************************************************** REMARKS: Implements the RCR instruction and side effects. ****************************************************************************/ u8 rcr_byte(u8 d, u8 s) { u32 res, cnt; u32 mask, cf, ocf = 0; /* rotate right through carry */ /* s is the rotate distance. It varies from 0 - 8. d is the byte object rotated. have CF B_7 B_6 B_5 B_4 B_3 B_2 B_1 B_0 The new rotate is done mod 9, and given this, for a rotation of n bits (mod 9) the new carry flag is then located n bits from the LSB. The low part is then shifted up cnt bits, and the high part is or'd in. Using CAPS for new values, and lowercase for the original values, this can be expressed as: IF n > 0 1) CF <- b_(n-1) 2) B_(8-(n+1)) .. B_(0) <- b_(7) .. b_(n) 3) B_(8-n) <- cf 4) B_(7) .. B_(8-(n-1)) <- b_(n-2) .. b_(0) */ res = d; if ((cnt = s % 9) != 0) { /* extract the new CARRY FLAG. */ /* CF <- b_(n-1) */ if (cnt == 1) { cf = d & 0x1; /* note hackery here. Access_flag(..) evaluates to either 0 if flag not set non-zero if flag is set. doing access_flag(..) != 0 casts that into either 0..1 in any representation of the flags register (i.e. packed bit array or unpacked.) */ ocf = ACCESS_FLAG(F_CF) != 0; } else cf = (d >> (cnt - 1)) & 0x1; /* B_(8-(n+1)) .. B_(0) <- b_(7) .. b_n */ /* note that the right hand side done by the mask This is effectively done by shifting the object to the right. The result must be masked, in case the object came in and was treated as a negative number. Needed??? */ mask = (1 << (8 - cnt)) - 1; res = (d >> cnt) & mask; /* now the high stuff which rotated around into the positions B_cnt-2 .. B_0 */ /* B_(7) .. B_(8-(n-1)) <- b_(n-2) .. b_(0) */ /* shift it downward, 7-(n-2) = 9-n positions. and mask off the result before or'ing in. */ res |= (d << (9 - cnt)); /* if the carry flag was set, or it in. */ if (ACCESS_FLAG(F_CF)) { /* carry flag is set */ /* B_(8-n) <- cf */ res |= 1 << (8 - cnt); } /* set the new carry flag, based on the variable "cf" */ CONDITIONAL_SET_FLAG(cf, F_CF); /* OVERFLOW is set *IFF* cnt==1, then it is the xor of CF and the most significant bit. Blecck. */ /* parenthesized... */ if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(ocf + ((d >> 6) & 0x2)), F_OF); } } return (u8) res; } /**************************************************************************** REMARKS: Implements the RCR instruction and side effects. ****************************************************************************/ u16 rcr_word(u16 d, u8 s) { u32 res, cnt; u32 mask, cf, ocf = 0; /* rotate right through carry */ res = d; if ((cnt = s % 17) != 0) { if (cnt == 1) { cf = d & 0x1; ocf = ACCESS_FLAG(F_CF) != 0; } else cf = (d >> (cnt - 1)) & 0x1; mask = (1 << (16 - cnt)) - 1; res = (d >> cnt) & mask; res |= (d << (17 - cnt)); if (ACCESS_FLAG(F_CF)) { res |= 1 << (16 - cnt); } CONDITIONAL_SET_FLAG(cf, F_CF); if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(ocf + ((d >> 14) & 0x2)), F_OF); } } return (u16) res; } /**************************************************************************** REMARKS: Implements the RCR instruction and side effects. ****************************************************************************/ u32 rcr_long(u32 d, u8 s) { u32 res, cnt; u32 mask, cf, ocf = 0; /* rotate right through carry */ res = d; if ((cnt = s % 33) != 0) { if (cnt == 1) { cf = d & 0x1; ocf = ACCESS_FLAG(F_CF) != 0; } else cf = (d >> (cnt - 1)) & 0x1; mask = (1 << (32 - cnt)) - 1; res = (d >> cnt) & mask; if (cnt != 1) res |= (d << (33 - cnt)); if (ACCESS_FLAG(F_CF)) { /* carry flag is set */ res |= 1 << (32 - cnt); } CONDITIONAL_SET_FLAG(cf, F_CF); if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(ocf + ((d >> 30) & 0x2)), F_OF); } } return res; } /**************************************************************************** REMARKS: Implements the ROL instruction and side effects. ****************************************************************************/ u8 rol_byte(u8 d, u8 s) { register unsigned int res, cnt, mask; /* rotate left */ /* s is the rotate distance. It varies from 0 - 8. d is the byte object rotated. have CF B_7 ... B_0 The new rotate is done mod 8. Much simpler than the "rcl" or "rcr" operations. IF n > 0 1) B_(7) .. B_(n) <- b_(8-(n+1)) .. b_(0) 2) B_(n-1) .. B_(0) <- b_(7) .. b_(8-n) */ res = d; if ((cnt = s % 8) != 0) { /* B_(7) .. B_(n) <- b_(8-(n+1)) .. b_(0) */ res = (d << cnt); /* B_(n-1) .. B_(0) <- b_(7) .. b_(8-n) */ mask = (1 << cnt) - 1; res |= (d >> (8 - cnt)) & mask; /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); /* OVERFLOW is set *IFF* s==1, then it is the xor of CF and the most significant bit. Blecck. */ CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 6) & 0x2)), F_OF); } if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); } return (u8) res; } /**************************************************************************** REMARKS: Implements the ROL instruction and side effects. ****************************************************************************/ u16 rol_word(u16 d, u8 s) { register unsigned int res, cnt, mask; res = d; if ((cnt = s % 16) != 0) { res = (d << cnt); mask = (1 << cnt) - 1; res |= (d >> (16 - cnt)) & mask; CONDITIONAL_SET_FLAG(res & 0x1, F_CF); CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 14) & 0x2)), F_OF); } if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the ROL instruction and side effects. ****************************************************************************/ u32 rol_long(u32 d, u8 s) { register u32 res, cnt, mask; res = d; if ((cnt = s % 32) != 0) { res = (d << cnt); mask = (1 << cnt) - 1; res |= (d >> (32 - cnt)) & mask; CONDITIONAL_SET_FLAG(res & 0x1, F_CF); CONDITIONAL_SET_FLAG(s == 1 && XOR2((res & 0x1) + ((res >> 30) & 0x2)), F_OF); } if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x1, F_CF); } return res; } /**************************************************************************** REMARKS: Implements the ROR instruction and side effects. ****************************************************************************/ u8 ror_byte(u8 d, u8 s) { register unsigned int res, cnt, mask; /* rotate right */ /* s is the rotate distance. It varies from 0 - 8. d is the byte object rotated. have B_7 ... B_0 The rotate is done mod 8. IF n > 0 1) B_(8-(n+1)) .. B_(0) <- b_(7) .. b_(n) 2) B_(7) .. B_(8-n) <- b_(n-1) .. b_(0) */ res = d; if ((cnt = s % 8) != 0) { /* not a typo, do nada if cnt==0 */ /* B_(7) .. B_(8-n) <- b_(n-1) .. b_(0) */ res = (d << (8 - cnt)); /* B_(8-(n+1)) .. B_(0) <- b_(7) .. b_(n) */ mask = (1 << (8 - cnt)) - 1; res |= (d >> (cnt)) & mask; /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x80, F_CF); /* OVERFLOW is set *IFF* s==1, then it is the xor of the two most significant bits. Blecck. */ CONDITIONAL_SET_FLAG(s == 1 && XOR2(res >> 6), F_OF); } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x80, F_CF); } return (u8) res; } /**************************************************************************** REMARKS: Implements the ROR instruction and side effects. ****************************************************************************/ u16 ror_word(u16 d, u8 s) { register unsigned int res, cnt, mask; res = d; if ((cnt = s % 16) != 0) { res = (d << (16 - cnt)); mask = (1 << (16 - cnt)) - 1; res |= (d >> (cnt)) & mask; CONDITIONAL_SET_FLAG(res & 0x8000, F_CF); CONDITIONAL_SET_FLAG(s == 1 && XOR2(res >> 14), F_OF); } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x8000, F_CF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the ROR instruction and side effects. ****************************************************************************/ u32 ror_long(u32 d, u8 s) { register u32 res, cnt, mask; res = d; if ((cnt = s % 32) != 0) { res = (d << (32 - cnt)); mask = (1 << (32 - cnt)) - 1; res |= (d >> (cnt)) & mask; CONDITIONAL_SET_FLAG(res & 0x80000000, F_CF); CONDITIONAL_SET_FLAG(s == 1 && XOR2(res >> 30), F_OF); } else if (s != 0) { /* set the new carry flag, Note that it is the low order bit of the result!!! */ CONDITIONAL_SET_FLAG(res & 0x80000000, F_CF); } return res; } /**************************************************************************** REMARKS: Implements the SHL instruction and side effects. ****************************************************************************/ u8 shl_byte(u8 d, u8 s) { unsigned int cnt, res, cf; if (s < 8) { cnt = s % 8; /* last bit shifted out goes into carry flag */ if (cnt > 0) { res = d << cnt; cf = d & (1 << (8 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = (u8) d; } if (cnt == 1) { /* Needs simplification. */ CONDITIONAL_SET_FLAG((((res & 0x80) == 0x80) ^ (ACCESS_FLAG(F_CF) != 0)), /* was (M.x86.R_FLG&F_CF)==F_CF)), */ F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d << (s - 1)) & 0x80, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return (u8) res; } /**************************************************************************** REMARKS: Implements the SHL instruction and side effects. ****************************************************************************/ u16 shl_word(u16 d, u8 s) { unsigned int cnt, res, cf; if (s < 16) { cnt = s % 16; if (cnt > 0) { res = d << cnt; cf = d & (1 << (16 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = (u16) d; } if (cnt == 1) { CONDITIONAL_SET_FLAG((((res & 0x8000) == 0x8000) ^ (ACCESS_FLAG(F_CF) != 0)), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d << (s - 1)) & 0x8000, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the SHL instruction and side effects. ****************************************************************************/ u32 shl_long(u32 d, u8 s) { unsigned int cnt, res, cf; if (s < 32) { cnt = s % 32; if (cnt > 0) { res = d << cnt; cf = d & (1 << (32 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000) ^ (ACCESS_FLAG(F_CF) != 0)), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d << (s - 1)) & 0x80000000, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return res; } /**************************************************************************** REMARKS: Implements the SHR instruction and side effects. ****************************************************************************/ u8 shr_byte(u8 d, u8 s) { unsigned int cnt, res, cf; if (s < 8) { cnt = s % 8; if (cnt > 0) { cf = d & (1 << (cnt - 1)); res = d >> cnt; CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = (u8) d; } if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(res >> 6), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d >> (s - 1)) & 0x1, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return (u8) res; } /**************************************************************************** REMARKS: Implements the SHR instruction and side effects. ****************************************************************************/ u16 shr_word(u16 d, u8 s) { unsigned int cnt, res, cf; if (s < 16) { cnt = s % 16; if (cnt > 0) { cf = d & (1 << (cnt - 1)); res = d >> cnt; CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(res >> 14), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the SHR instruction and side effects. ****************************************************************************/ u32 shr_long(u32 d, u8 s) { unsigned int cnt, res, cf; if (s < 32) { cnt = s % 32; if (cnt > 0) { cf = d & (1 << (cnt - 1)); res = d >> cnt; CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(res >> 30), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } return res; } /**************************************************************************** REMARKS: Implements the SAR instruction and side effects. ****************************************************************************/ u8 sar_byte(u8 d, u8 s) { unsigned int cnt, res, cf, mask, sf; res = d; sf = d & 0x80; cnt = s % 8; if (cnt > 0 && cnt < 8) { mask = (1 << (8 - cnt)) - 1; cf = d & (1 << (cnt - 1)); res = (d >> cnt) & mask; CONDITIONAL_SET_FLAG(cf, F_CF); if (sf) { res |= ~mask; } CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); } else if (cnt >= 8) { if (sf) { res = 0xff; SET_FLAG(F_CF); CLEAR_FLAG(F_ZF); SET_FLAG(F_SF); SET_FLAG(F_PF); } else { res = 0; CLEAR_FLAG(F_CF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } } return (u8) res; } /**************************************************************************** REMARKS: Implements the SAR instruction and side effects. ****************************************************************************/ u16 sar_word(u16 d, u8 s) { unsigned int cnt, res, cf, mask, sf; sf = d & 0x8000; cnt = s % 16; res = d; if (cnt > 0 && cnt < 16) { mask = (1 << (16 - cnt)) - 1; cf = d & (1 << (cnt - 1)); res = (d >> cnt) & mask; CONDITIONAL_SET_FLAG(cf, F_CF); if (sf) { res |= ~mask; } CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else if (cnt >= 16) { if (sf) { res = 0xffff; SET_FLAG(F_CF); CLEAR_FLAG(F_ZF); SET_FLAG(F_SF); SET_FLAG(F_PF); } else { res = 0; CLEAR_FLAG(F_CF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } } return (u16) res; } /**************************************************************************** REMARKS: Implements the SAR instruction and side effects. ****************************************************************************/ u32 sar_long(u32 d, u8 s) { u32 cnt, res, cf, mask, sf; sf = d & 0x80000000; cnt = s % 32; res = d; if (cnt > 0 && cnt < 32) { mask = (1 << (32 - cnt)) - 1; cf = d & (1 << (cnt - 1)); res = (d >> cnt) & mask; CONDITIONAL_SET_FLAG(cf, F_CF); if (sf) { res |= ~mask; } CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else if (cnt >= 32) { if (sf) { res = 0xffffffff; SET_FLAG(F_CF); CLEAR_FLAG(F_ZF); SET_FLAG(F_SF); SET_FLAG(F_PF); } else { res = 0; CLEAR_FLAG(F_CF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } } return res; } /**************************************************************************** REMARKS: Implements the SHLD instruction and side effects. ****************************************************************************/ u16 shld_word(u16 d, u16 fill, u8 s) { unsigned int cnt, res, cf; if (s < 16) { cnt = s % 16; if (cnt > 0) { res = (d << cnt) | (fill >> (16 - cnt)); cf = d & (1 << (16 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG((((res & 0x8000) == 0x8000) ^ (ACCESS_FLAG(F_CF) != 0)), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d << (s - 1)) & 0x8000, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the SHLD instruction and side effects. ****************************************************************************/ u32 shld_long(u32 d, u32 fill, u8 s) { unsigned int cnt, res, cf; if (s < 32) { cnt = s % 32; if (cnt > 0) { res = (d << cnt) | (fill >> (32 - cnt)); cf = d & (1 << (32 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG((((res & 0x80000000) == 0x80000000) ^ (ACCESS_FLAG(F_CF) != 0)), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CONDITIONAL_SET_FLAG((d << (s - 1)) & 0x80000000, F_CF); CLEAR_FLAG(F_OF); CLEAR_FLAG(F_SF); SET_FLAG(F_PF); SET_FLAG(F_ZF); } return res; } /**************************************************************************** REMARKS: Implements the SHRD instruction and side effects. ****************************************************************************/ u16 shrd_word(u16 d, u16 fill, u8 s) { unsigned int cnt, res, cf; if (s < 16) { cnt = s % 16; if (cnt > 0) { cf = d & (1 << (cnt - 1)); res = (d >> cnt) | (fill << (16 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(res >> 14), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } return (u16) res; } /**************************************************************************** REMARKS: Implements the SHRD instruction and side effects. ****************************************************************************/ u32 shrd_long(u32 d, u32 fill, u8 s) { unsigned int cnt, res, cf; if (s < 32) { cnt = s % 32; if (cnt > 0) { cf = d & (1 << (cnt - 1)); res = (d >> cnt) | (fill << (32 - cnt)); CONDITIONAL_SET_FLAG(cf, F_CF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); } else { res = d; } if (cnt == 1) { CONDITIONAL_SET_FLAG(XOR2(res >> 30), F_OF); } else { CLEAR_FLAG(F_OF); } } else { res = 0; CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); SET_FLAG(F_ZF); CLEAR_FLAG(F_SF); CLEAR_FLAG(F_PF); } return res; } /**************************************************************************** REMARKS: Implements the SBB instruction and side effects. ****************************************************************************/ u8 sbb_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ register u32 bc; if (ACCESS_FLAG(F_CF)) res = d - s - 1; else res = d - s; CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 6), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the SBB instruction and side effects. ****************************************************************************/ u16 sbb_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ register u32 bc; if (ACCESS_FLAG(F_CF)) res = d - s - 1; else res = d - s; CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x8000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 14), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the SBB instruction and side effects. ****************************************************************************/ u32 sbb_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ register u32 bc; if (ACCESS_FLAG(F_CF)) res = d - s - 1; else res = d - s; CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80000000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 30), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the SUB instruction and side effects. ****************************************************************************/ u8 sub_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG((res & 0xff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 6), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u8) res; } /**************************************************************************** REMARKS: Implements the SUB instruction and side effects. ****************************************************************************/ u16 sub_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x8000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 14), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return (u16) res; } /**************************************************************************** REMARKS: Implements the SUB instruction and side effects. ****************************************************************************/ u32 sub_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ register u32 bc; res = d - s; CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG((res & 0xffffffff) == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* calculate the borrow chain. See note at top */ bc = (res & (~d | s)) | (~d & s); CONDITIONAL_SET_FLAG(bc & 0x80000000, F_CF); CONDITIONAL_SET_FLAG(XOR2(bc >> 30), F_OF); CONDITIONAL_SET_FLAG(bc & 0x8, F_AF); return res; } /**************************************************************************** REMARKS: Implements the TEST instruction and side effects. ****************************************************************************/ void test_byte(u8 d, u8 s) { register u32 res; /* all operands in native machine order */ res = d & s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* AF == don't care */ CLEAR_FLAG(F_CF); } /**************************************************************************** REMARKS: Implements the TEST instruction and side effects. ****************************************************************************/ void test_word(u16 d, u16 s) { register u32 res; /* all operands in native machine order */ res = d & s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* AF == don't care */ CLEAR_FLAG(F_CF); } /**************************************************************************** REMARKS: Implements the TEST instruction and side effects. ****************************************************************************/ void test_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ res = d & s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); /* AF == don't care */ CLEAR_FLAG(F_CF); } /**************************************************************************** REMARKS: Implements the XOR instruction and side effects. ****************************************************************************/ u8 xor_byte(u8 d, u8 s) { register u8 res; /* all operands in native machine order */ res = d ^ s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x80, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res), F_PF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); return res; } /**************************************************************************** REMARKS: Implements the XOR instruction and side effects. ****************************************************************************/ u16 xor_word(u16 d, u16 s) { register u16 res; /* all operands in native machine order */ res = d ^ s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x8000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); return res; } /**************************************************************************** REMARKS: Implements the XOR instruction and side effects. ****************************************************************************/ u32 xor_long(u32 d, u32 s) { register u32 res; /* all operands in native machine order */ res = d ^ s; CLEAR_FLAG(F_OF); CONDITIONAL_SET_FLAG(res & 0x80000000, F_SF); CONDITIONAL_SET_FLAG(res == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(res & 0xff), F_PF); CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); return res; } /**************************************************************************** REMARKS: Implements the IMUL instruction and side effects. ****************************************************************************/ void imul_byte(u8 s) { s16 res = (s16) ((s8) M.x86.R_AL * (s8) s); M.x86.R_AX = res; if (((M.x86.R_AL & 0x80) == 0 && M.x86.R_AH == 0x00) || ((M.x86.R_AL & 0x80) != 0 && M.x86.R_AH == 0xFF)) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the IMUL instruction and side effects. ****************************************************************************/ void imul_word(u16 s) { s32 res = (s16) M.x86.R_AX * (s16) s; M.x86.R_AX = (u16) res; M.x86.R_DX = (u16) (res >> 16); if (((M.x86.R_AX & 0x8000) == 0 && M.x86.R_DX == 0x00) || ((M.x86.R_AX & 0x8000) != 0 && M.x86.R_DX == 0xFF)) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the IMUL instruction and side effects. ****************************************************************************/ void imul_long_direct(u32 * res_lo, u32 * res_hi, u32 d, u32 s) { #ifdef __HAS_LONG_LONG__ s64 res = (s64) (s32) d * (s32) s; *res_lo = (u32) res; *res_hi = (u32) (res >> 32); #else u32 d_lo, d_hi, d_sign; u32 s_lo, s_hi, s_sign; u32 rlo_lo, rlo_hi, rhi_lo; if ((d_sign = d & 0x80000000) != 0) d = -d; d_lo = d & 0xFFFF; d_hi = d >> 16; if ((s_sign = s & 0x80000000) != 0) s = -s; s_lo = s & 0xFFFF; s_hi = s >> 16; rlo_lo = d_lo * s_lo; rlo_hi = (d_hi * s_lo + d_lo * s_hi) + (rlo_lo >> 16); rhi_lo = d_hi * s_hi + (rlo_hi >> 16); *res_lo = (rlo_hi << 16) | (rlo_lo & 0xFFFF); *res_hi = rhi_lo; if (d_sign != s_sign) { d = ~*res_lo; s = (((d & 0xFFFF) + 1) >> 16) + (d >> 16); *res_lo = ~*res_lo + 1; *res_hi = ~*res_hi + (s >> 16); } #endif } /**************************************************************************** REMARKS: Implements the IMUL instruction and side effects. ****************************************************************************/ void imul_long(u32 s) { imul_long_direct(&M.x86.R_EAX, &M.x86.R_EDX, M.x86.R_EAX, s); if (((M.x86.R_EAX & 0x80000000) == 0 && M.x86.R_EDX == 0x00) || ((M.x86.R_EAX & 0x80000000) != 0 && M.x86.R_EDX == 0xFF)) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the MUL instruction and side effects. ****************************************************************************/ void mul_byte(u8 s) { u16 res = (u16) (M.x86.R_AL * s); M.x86.R_AX = res; if (M.x86.R_AH == 0) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the MUL instruction and side effects. ****************************************************************************/ void mul_word(u16 s) { u32 res = M.x86.R_AX * s; M.x86.R_AX = (u16) res; M.x86.R_DX = (u16) (res >> 16); if (M.x86.R_DX == 0) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the MUL instruction and side effects. ****************************************************************************/ void mul_long(u32 s) { #ifdef __HAS_LONG_LONG__ u64 res = (u64) M.x86.R_EAX * s; M.x86.R_EAX = (u32) res; M.x86.R_EDX = (u32) (res >> 32); #else u32 a, a_lo, a_hi; u32 s_lo, s_hi; u32 rlo_lo, rlo_hi, rhi_lo; a = M.x86.R_EAX; a_lo = a & 0xFFFF; a_hi = a >> 16; s_lo = s & 0xFFFF; s_hi = s >> 16; rlo_lo = a_lo * s_lo; rlo_hi = (a_hi * s_lo + a_lo * s_hi) + (rlo_lo >> 16); rhi_lo = a_hi * s_hi + (rlo_hi >> 16); M.x86.R_EAX = (rlo_hi << 16) | (rlo_lo & 0xFFFF); M.x86.R_EDX = rhi_lo; #endif if (M.x86.R_EDX == 0) { CLEAR_FLAG(F_CF); CLEAR_FLAG(F_OF); } else { SET_FLAG(F_CF); SET_FLAG(F_OF); } } /**************************************************************************** REMARKS: Implements the IDIV instruction and side effects. ****************************************************************************/ void idiv_byte(u8 s) { s32 dvd, div, mod; dvd = (s16) M.x86.R_AX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (s8) s; mod = dvd % (s8) s; if (abs(div) > 0x7f) { x86emu_intr_raise(0); return; } M.x86.R_AL = (s8) div; M.x86.R_AH = (s8) mod; } /**************************************************************************** REMARKS: Implements the IDIV instruction and side effects. ****************************************************************************/ void idiv_word(u16 s) { s32 dvd, div, mod; dvd = (((s32) M.x86.R_DX) << 16) | M.x86.R_AX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (s16) s; mod = dvd % (s16) s; if (abs(div) > 0x7fff) { x86emu_intr_raise(0); return; } CLEAR_FLAG(F_CF); CLEAR_FLAG(F_SF); CONDITIONAL_SET_FLAG(div == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(mod & 0xff), F_PF); M.x86.R_AX = (u16) div; M.x86.R_DX = (u16) mod; } /**************************************************************************** REMARKS: Implements the IDIV instruction and side effects. ****************************************************************************/ void idiv_long(u32 s) { #ifdef __HAS_LONG_LONG__ s64 dvd, div, mod; dvd = (((s64) M.x86.R_EDX) << 32) | M.x86.R_EAX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (s32) s; mod = dvd % (s32) s; if (abs(div) > 0x7fffffff) { x86emu_intr_raise(0); return; } #else s32 div = 0, mod; s32 h_dvd = M.x86.R_EDX; u32 l_dvd = M.x86.R_EAX; u32 abs_s = s & 0x7FFFFFFF; u32 abs_h_dvd = h_dvd & 0x7FFFFFFF; u32 h_s = abs_s >> 1; u32 l_s = abs_s << 31; int counter = 31; int carry; if (s == 0) { x86emu_intr_raise(0); return; } do { div <<= 1; carry = (l_dvd >= l_s) ? 0 : 1; if (abs_h_dvd < (h_s + carry)) { h_s >>= 1; l_s = abs_s << (--counter); continue; } else { abs_h_dvd -= (h_s + carry); l_dvd = carry ? ((0xFFFFFFFF - l_s) + l_dvd + 1) : (l_dvd - l_s); h_s >>= 1; l_s = abs_s << (--counter); div |= 1; continue; } } while (counter > -1); /* overflow */ if (abs_h_dvd || (l_dvd > abs_s)) { x86emu_intr_raise(0); return; } /* sign */ div |= ((h_dvd & 0x10000000) ^ (s & 0x10000000)); mod = l_dvd; #endif CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CLEAR_FLAG(F_SF); SET_FLAG(F_ZF); CONDITIONAL_SET_FLAG(PARITY(mod & 0xff), F_PF); M.x86.R_EAX = (u32) div; M.x86.R_EDX = (u32) mod; } /**************************************************************************** REMARKS: Implements the DIV instruction and side effects. ****************************************************************************/ void div_byte(u8 s) { u32 dvd, div, mod; dvd = M.x86.R_AX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (u8) s; mod = dvd % (u8) s; if (abs(div) > 0xff) { x86emu_intr_raise(0); return; } M.x86.R_AL = (u8) div; M.x86.R_AH = (u8) mod; } /**************************************************************************** REMARKS: Implements the DIV instruction and side effects. ****************************************************************************/ void div_word(u16 s) { u32 dvd, div, mod; dvd = (((u32) M.x86.R_DX) << 16) | M.x86.R_AX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (u16) s; mod = dvd % (u16) s; if (abs(div) > 0xffff) { x86emu_intr_raise(0); return; } CLEAR_FLAG(F_CF); CLEAR_FLAG(F_SF); CONDITIONAL_SET_FLAG(div == 0, F_ZF); CONDITIONAL_SET_FLAG(PARITY(mod & 0xff), F_PF); M.x86.R_AX = (u16) div; M.x86.R_DX = (u16) mod; } /**************************************************************************** REMARKS: Implements the DIV instruction and side effects. ****************************************************************************/ void div_long(u32 s) { #ifdef __HAS_LONG_LONG__ u64 dvd, div, mod; dvd = (((u64) M.x86.R_EDX) << 32) | M.x86.R_EAX; if (s == 0) { x86emu_intr_raise(0); return; } div = dvd / (u32) s; mod = dvd % (u32) s; if (abs(div) > 0xffffffff) { x86emu_intr_raise(0); return; } #else s32 div = 0, mod; s32 h_dvd = M.x86.R_EDX; u32 l_dvd = M.x86.R_EAX; u32 h_s = s; u32 l_s = 0; int counter = 32; int carry; if (s == 0) { x86emu_intr_raise(0); return; } do { div <<= 1; carry = (l_dvd >= l_s) ? 0 : 1; if (h_dvd < (h_s + carry)) { h_s >>= 1; l_s = s << (--counter); continue; } else { h_dvd -= (h_s + carry); l_dvd = carry ? ((0xFFFFFFFF - l_s) + l_dvd + 1) : (l_dvd - l_s); h_s >>= 1; l_s = s << (--counter); div |= 1; continue; } } while (counter > -1); /* overflow */ if (h_dvd || (l_dvd > s)) { x86emu_intr_raise(0); return; } mod = l_dvd; #endif CLEAR_FLAG(F_CF); CLEAR_FLAG(F_AF); CLEAR_FLAG(F_SF); SET_FLAG(F_ZF); CONDITIONAL_SET_FLAG(PARITY(mod & 0xff), F_PF); M.x86.R_EAX = (u32) div; M.x86.R_EDX = (u32) mod; } /**************************************************************************** REMARKS: Implements the IN string instruction and side effects. ****************************************************************************/ void ins(int size) { int inc = size; if (ACCESS_FLAG(F_DF)) { inc = -size; } if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* in until CX is ZERO. */ u32 count = ((M.x86.mode & SYSMODE_PREFIX_DATA) ? M.x86.R_ECX : M.x86.R_CX); switch (size) { case 1: while (count--) { store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inb) (M.x86.R_DX)); M.x86.R_DI += inc; } break; case 2: while (count--) { store_data_word_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inw) (M.x86.R_DX)); M.x86.R_DI += inc; } break; case 4: while (count--) { store_data_long_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inl) (M.x86.R_DX)); M.x86.R_DI += inc; break; } } M.x86.R_CX = 0; if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = 0; } M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } else { switch (size) { case 1: store_data_byte_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inb) (M.x86.R_DX)); break; case 2: store_data_word_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inw) (M.x86.R_DX)); break; case 4: store_data_long_abs(M.x86.R_ES, M.x86.R_DI, (*sys_inl) (M.x86.R_DX)); break; } M.x86.R_DI += inc; } } /**************************************************************************** REMARKS: Implements the OUT string instruction and side effects. ****************************************************************************/ void outs(int size) { int inc = size; if (ACCESS_FLAG(F_DF)) { inc = -size; } if (M.x86.mode & (SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE)) { /* don't care whether REPE or REPNE */ /* out until CX is ZERO. */ u32 count = ((M.x86.mode & SYSMODE_PREFIX_DATA) ? M.x86.R_ECX : M.x86.R_CX); switch (size) { case 1: while (count--) { (*sys_outb) (M.x86.R_DX, fetch_data_byte_abs(M.x86.R_ES, M.x86.R_SI)); M.x86.R_SI += inc; } break; case 2: while (count--) { (*sys_outw) (M.x86.R_DX, fetch_data_word_abs(M.x86.R_ES, M.x86.R_SI)); M.x86.R_SI += inc; } break; case 4: while (count--) { (*sys_outl) (M.x86.R_DX, fetch_data_long_abs(M.x86.R_ES, M.x86.R_SI)); M.x86.R_SI += inc; break; } } M.x86.R_CX = 0; if (M.x86.mode & SYSMODE_PREFIX_DATA) { M.x86.R_ECX = 0; } M.x86.mode &= ~(SYSMODE_PREFIX_REPE | SYSMODE_PREFIX_REPNE); } else { switch (size) { case 1: (*sys_outb) (M.x86.R_DX, fetch_data_byte_abs(M.x86.R_ES, M.x86.R_SI)); break; case 2: (*sys_outw) (M.x86.R_DX, fetch_data_word_abs(M.x86.R_ES, M.x86.R_SI)); break; case 4: (*sys_outl) (M.x86.R_DX, fetch_data_long_abs(M.x86.R_ES, M.x86.R_SI)); break; } M.x86.R_SI += inc; } } /**************************************************************************** PARAMETERS: addr - Address to fetch word from REMARKS: Fetches a word from emulator memory using an absolute address. ****************************************************************************/ u16 mem_access_word(int addr) { DB(if (CHECK_MEM_ACCESS()) x86emu_check_mem_access(addr);) return (*sys_rdw) (addr); } /**************************************************************************** REMARKS: Pushes a word onto the stack. NOTE: Do not inline this, as (*sys_wrX) is already inline! ****************************************************************************/ void push_word(u16 w) { DB(if (CHECK_SP_ACCESS()) x86emu_check_sp_access();) M.x86.R_SP -= 2; (*sys_wrw) (((u32) M.x86.R_SS << 4) + M.x86.R_SP, w); } /**************************************************************************** REMARKS: Pushes a long onto the stack. NOTE: Do not inline this, as (*sys_wrX) is already inline! ****************************************************************************/ void push_long(u32 w) { DB(if (CHECK_SP_ACCESS()) x86emu_check_sp_access();) M.x86.R_SP -= 4; (*sys_wrl) (((u32) M.x86.R_SS << 4) + M.x86.R_SP, w); } /**************************************************************************** REMARKS: Pops a word from the stack. NOTE: Do not inline this, as (*sys_rdX) is already inline! ****************************************************************************/ u16 pop_word(void) { register u16 res; DB(if (CHECK_SP_ACCESS()) x86emu_check_sp_access();) res = (*sys_rdw) (((u32) M.x86.R_SS << 4) + M.x86.R_SP); M.x86.R_SP += 2; return res; } /**************************************************************************** REMARKS: Pops a long from the stack. NOTE: Do not inline this, as (*sys_rdX) is already inline! ****************************************************************************/ u32 pop_long(void) { register u32 res; DB(if (CHECK_SP_ACCESS()) x86emu_check_sp_access();) res = (*sys_rdl) (((u32) M.x86.R_SS << 4) + M.x86.R_SP); M.x86.R_SP += 4; return res; } /**************************************************************************** REMARKS: CPUID takes EAX/ECX as inputs, writes EAX/EBX/ECX/EDX as output ****************************************************************************/ void cpuid(void) { u32 feature = M.x86.R_EAX; #ifdef X86EMU_HAS_HW_CPUID /* If the platform allows it, we will base our values on the real * results from the CPUID instruction. We limit support to the * first two features, and the results of those are sanitized. */ if (feature <= 1) hw_cpuid(&M.x86.R_EAX, &M.x86.R_EBX, &M.x86.R_ECX, &M.x86.R_EDX); #endif switch (feature) { case 0: /* Regardless if we have real data from the hardware, the emulator * will only support up to feature 1, which we set in register EAX. * Registers EBX:EDX:ECX contain a string identifying the CPU. */ M.x86.R_EAX = 1; #ifndef X86EMU_HAS_HW_CPUID /* EBX:EDX:ECX = "GenuineIntel" */ M.x86.R_EBX = 0x756e6547; M.x86.R_EDX = 0x49656e69; M.x86.R_ECX = 0x6c65746e; #endif break; case 1: #ifndef X86EMU_HAS_HW_CPUID /* If we don't have x86 compatible hardware, we return values from an * Intel 486dx4; which was one of the first processors to have CPUID. */ M.x86.R_EAX = 0x00000480; M.x86.R_EBX = 0x00000000; M.x86.R_ECX = 0x00000000; M.x86.R_EDX = 0x00000002; /* VME */ #else /* In the case that we have hardware CPUID instruction, we make sure * that the features reported are limited to TSC and VME. */ M.x86.R_EDX &= 0x00000012; #endif break; default: /* Finally, we don't support any additional features. Most CPUs * return all zeros when queried for invalid or unsupported feature * numbers. */ M.x86.R_EAX = 0; M.x86.R_EBX = 0; M.x86.R_ECX = 0; M.x86.R_EDX = 0; break; } } xorg-server-21.1.16/hw/xfree86/x86emu/sys.c0000644000175000017500000003606114757411105013664 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: This file includes subroutines which are related to * programmed I/O and memory access. Included in this module * are default functions with limited usefulness. For real * uses these functions will most likely be overridden by the * user library. * ****************************************************************************/ #include "x86emu.h" #include "x86emu/x86emui.h" #include "x86emu/regs.h" #include "x86emu/debug.h" #include "x86emu/prim_ops.h" #ifndef NO_SYS_HEADERS #include #endif #ifdef __GNUC__ /* Define some packed structures to use with unaligned accesses */ struct __una_u64 { u64 x __attribute__ ((packed)); }; struct __una_u32 { u32 x __attribute__ ((packed)); }; struct __una_u16 { u16 x __attribute__ ((packed)); }; /* Elemental unaligned loads */ static __inline__ u64 ldq_u(u64 * p) { const struct __una_u64 *ptr = (const struct __una_u64 *) p; return ptr->x; } static __inline__ u32 ldl_u(u32 * p) { const struct __una_u32 *ptr = (const struct __una_u32 *) p; return ptr->x; } static __inline__ u16 ldw_u(u16 * p) { const struct __una_u16 *ptr = (const struct __una_u16 *) p; return ptr->x; } /* Elemental unaligned stores */ static __inline__ void stq_u(u64 val, u64 * p) { struct __una_u64 *ptr = (struct __una_u64 *) p; ptr->x = val; } static __inline__ void stl_u(u32 val, u32 * p) { struct __una_u32 *ptr = (struct __una_u32 *) p; ptr->x = val; } static __inline__ void stw_u(u16 val, u16 * p) { struct __una_u16 *ptr = (struct __una_u16 *) p; ptr->x = val; } #else /* !__GNUC__ */ static __inline__ u64 ldq_u(u64 * p) { u64 ret; memmove(&ret, p, sizeof(*p)); return ret; } static __inline__ u32 ldl_u(u32 * p) { u32 ret; memmove(&ret, p, sizeof(*p)); return ret; } static __inline__ u16 ldw_u(u16 * p) { u16 ret; memmove(&ret, p, sizeof(*p)); return ret; } static __inline__ void stq_u(u64 val, u64 * p) { u64 tmp = val; memmove(p, &tmp, sizeof(*p)); } static __inline__ void stl_u(u32 val, u32 * p) { u32 tmp = val; memmove(p, &tmp, sizeof(*p)); } static __inline__ void stw_u(u16 val, u16 * p) { u16 tmp = val; memmove(p, &tmp, sizeof(*p)); } #endif /* __GNUC__ */ /*------------------------- Global Variables ------------------------------*/ X86EMU_sysEnv _X86EMU_env; /* Global emulator machine state */ X86EMU_intrFuncs _X86EMU_intrTab[256]; /*----------------------------- Implementation ----------------------------*/ /**************************************************************************** PARAMETERS: addr - Emulator memory address to read RETURNS: Byte value read from emulator memory. REMARKS: Reads a byte value from the emulator memory. ****************************************************************************/ u8 X86API rdb(u32 addr) { u8 val; if (addr > M.mem_size - 1) { DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr); ) HALT_SYS(); } val = *(u8 *) (M.mem_base + addr); DB(if (DEBUG_MEM_TRACE()) printk("%#08x 1 -> %#x\n", addr, val);) return val; } /**************************************************************************** PARAMETERS: addr - Emulator memory address to read RETURNS: Word value read from emulator memory. REMARKS: Reads a word value from the emulator memory. ****************************************************************************/ u16 X86API rdw(u32 addr) { u16 val = 0; if (addr > M.mem_size - 2) { DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr); ) HALT_SYS(); } #ifdef __BIG_ENDIAN__ if (addr & 0x1) { val = (*(u8 *) (M.mem_base + addr) | (*(u8 *) (M.mem_base + addr + 1) << 8)); } else #endif val = ldw_u((u16 *) (M.mem_base + addr)); DB(if (DEBUG_MEM_TRACE()) printk("%#08x 2 -> %#x\n", addr, val);) return val; } /**************************************************************************** PARAMETERS: addr - Emulator memory address to read RETURNS: Long value read from emulator memory. REMARKS: Reads a long value from the emulator memory. ****************************************************************************/ u32 X86API rdl(u32 addr) { u32 val = 0; if (addr > M.mem_size - 4) { DB(printk("mem_read: address %#" PRIx32 " out of range!\n", addr); ) HALT_SYS(); } #ifdef __BIG_ENDIAN__ if (addr & 0x3) { val = (*(u8 *) (M.mem_base + addr + 0) | (*(u8 *) (M.mem_base + addr + 1) << 8) | (*(u8 *) (M.mem_base + addr + 2) << 16) | (*(u8 *) (M.mem_base + addr + 3) << 24)); } else #endif val = ldl_u((u32 *) (M.mem_base + addr)); DB(if (DEBUG_MEM_TRACE()) printk("%#08x 4 -> %#x\n", addr, val);) return val; } /**************************************************************************** PARAMETERS: addr - Emulator memory address to read val - Value to store REMARKS: Writes a byte value to emulator memory. ****************************************************************************/ void X86API wrb(u32 addr, u8 val) { DB(if (DEBUG_MEM_TRACE()) printk("%#08x 1 <- %#x\n", addr, val);) if (addr > M.mem_size - 1) { DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr); ) HALT_SYS(); } *(u8 *) (M.mem_base + addr) = val; } /**************************************************************************** PARAMETERS: addr - Emulator memory address to read val - Value to store REMARKS: Writes a word value to emulator memory. ****************************************************************************/ void X86API wrw(u32 addr, u16 val) { DB(if (DEBUG_MEM_TRACE()) printk("%#08x 2 <- %#x\n", addr, val);) if (addr > M.mem_size - 2) { DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr); ) HALT_SYS(); } #ifdef __BIG_ENDIAN__ if (addr & 0x1) { *(u8 *) (M.mem_base + addr + 0) = (val >> 0) & 0xff; *(u8 *) (M.mem_base + addr + 1) = (val >> 8) & 0xff; } else #endif stw_u(val, (u16 *) (M.mem_base + addr)); } /**************************************************************************** PARAMETERS: addr - Emulator memory address to read val - Value to store REMARKS: Writes a long value to emulator memory. ****************************************************************************/ void X86API wrl(u32 addr, u32 val) { DB(if (DEBUG_MEM_TRACE()) printk("%#08x 4 <- %#x\n", addr, val);) if (addr > M.mem_size - 4) { DB(printk("mem_write: address %#" PRIx32 " out of range!\n",addr); ) HALT_SYS(); } #ifdef __BIG_ENDIAN__ if (addr & 0x1) { *(u8 *) (M.mem_base + addr + 0) = (val >> 0) & 0xff; *(u8 *) (M.mem_base + addr + 1) = (val >> 8) & 0xff; *(u8 *) (M.mem_base + addr + 2) = (val >> 16) & 0xff; *(u8 *) (M.mem_base + addr + 3) = (val >> 24) & 0xff; } else #endif stl_u(val, (u32 *) (M.mem_base + addr)); } /**************************************************************************** PARAMETERS: addr - PIO address to read RETURN: 0 REMARKS: Default PIO byte read function. Doesn't perform real inb. ****************************************************************************/ static u8 X86API p_inb(X86EMU_pioAddr addr) { DB(if (DEBUG_IO_TRACE()) printk("inb %#04x \n", addr);) return 0; } /**************************************************************************** PARAMETERS: addr - PIO address to read RETURN: 0 REMARKS: Default PIO word read function. Doesn't perform real inw. ****************************************************************************/ static u16 X86API p_inw(X86EMU_pioAddr addr) { DB(if (DEBUG_IO_TRACE()) printk("inw %#04x \n", addr);) return 0; } /**************************************************************************** PARAMETERS: addr - PIO address to read RETURN: 0 REMARKS: Default PIO long read function. Doesn't perform real inl. ****************************************************************************/ static u32 X86API p_inl(X86EMU_pioAddr addr) { DB(if (DEBUG_IO_TRACE()) printk("inl %#04x \n", addr);) return 0; } /**************************************************************************** PARAMETERS: addr - PIO address to write val - Value to store REMARKS: Default PIO byte write function. Doesn't perform real outb. ****************************************************************************/ static void X86API p_outb(X86EMU_pioAddr addr, u8 val) { DB(if (DEBUG_IO_TRACE()) printk("outb %#02x -> %#04x \n", val, addr);) return; } /**************************************************************************** PARAMETERS: addr - PIO address to write val - Value to store REMARKS: Default PIO word write function. Doesn't perform real outw. ****************************************************************************/ static void X86API p_outw(X86EMU_pioAddr addr, u16 val) { DB(if (DEBUG_IO_TRACE()) printk("outw %#04x -> %#04x \n", val, addr);) return; } /**************************************************************************** PARAMETERS: addr - PIO address to write val - Value to store REMARKS: Default PIO ;ong write function. Doesn't perform real outl. ****************************************************************************/ static void X86API p_outl(X86EMU_pioAddr addr, u32 val) { DB(if (DEBUG_IO_TRACE()) printk("outl %#08x -> %#04x \n", val, addr);) return; } /*------------------------- Global Variables ------------------------------*/ u8(X86APIP sys_rdb) (u32 addr) = rdb; u16(X86APIP sys_rdw) (u32 addr) = rdw; u32(X86APIP sys_rdl) (u32 addr) = rdl; void (X86APIP sys_wrb) (u32 addr, u8 val) = wrb; void (X86APIP sys_wrw) (u32 addr, u16 val) = wrw; void (X86APIP sys_wrl) (u32 addr, u32 val) = wrl; u8(X86APIP sys_inb) (X86EMU_pioAddr addr) = p_inb; u16(X86APIP sys_inw) (X86EMU_pioAddr addr) = p_inw; u32(X86APIP sys_inl) (X86EMU_pioAddr addr) = p_inl; void (X86APIP sys_outb) (X86EMU_pioAddr addr, u8 val) = p_outb; void (X86APIP sys_outw) (X86EMU_pioAddr addr, u16 val) = p_outw; void (X86APIP sys_outl) (X86EMU_pioAddr addr, u32 val) = p_outl; /*----------------------------- Setup -------------------------------------*/ /**************************************************************************** PARAMETERS: funcs - New memory function pointers to make active REMARKS: This function is used to set the pointers to functions which access memory space, allowing the user application to override these functions and hook them out as necessary for their application. ****************************************************************************/ void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs) { sys_rdb = funcs->rdb; sys_rdw = funcs->rdw; sys_rdl = funcs->rdl; sys_wrb = funcs->wrb; sys_wrw = funcs->wrw; sys_wrl = funcs->wrl; } /**************************************************************************** PARAMETERS: funcs - New programmed I/O function pointers to make active REMARKS: This function is used to set the pointers to functions which access I/O space, allowing the user application to override these functions and hook them out as necessary for their application. ****************************************************************************/ void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs) { sys_inb = funcs->inb; sys_inw = funcs->inw; sys_inl = funcs->inl; sys_outb = funcs->outb; sys_outw = funcs->outw; sys_outl = funcs->outl; } /**************************************************************************** PARAMETERS: funcs - New interrupt vector table to make active REMARKS: This function is used to set the pointers to functions which handle interrupt processing in the emulator, allowing the user application to hook interrupts as necessary for their application. Any interrupts that are not hooked by the user application, and reflected and handled internally in the emulator via the interrupt vector table. This allows the application to get control when the code being emulated executes specific software interrupts. ****************************************************************************/ void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]) { int i; for (i = 0; i < 256; i++) _X86EMU_intrTab[i] = NULL; if (funcs) { for (i = 0; i < 256; i++) _X86EMU_intrTab[i] = funcs[i]; } } /**************************************************************************** PARAMETERS: int - New software interrupt to prepare for REMARKS: This function is used to set up the emulator state to execute a software interrupt. This can be used by the user application code to allow an interrupt to be hooked, examined and then reflected back to the emulator so that the code in the emulator will continue processing the software interrupt as per normal. This essentially allows system code to actively hook and handle certain software interrupts as necessary. ****************************************************************************/ void X86EMU_prepareForInt(int num) { push_word((u16) M.x86.R_FLG); CLEAR_FLAG(F_IF); CLEAR_FLAG(F_TF); push_word(M.x86.R_CS); M.x86.R_CS = mem_access_word(num * 4 + 2); push_word(M.x86.R_IP); M.x86.R_IP = mem_access_word(num * 4); M.x86.intr = 0; } xorg-server-21.1.16/hw/xfree86/x86emu/x86emu.h0000644000175000017500000001635414757411105014212 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: ANSI C * Environment: Any * Developer: Kendall Bennett * * Description: Header file for public specific functions. * Any application linking against us should only * include this header * ****************************************************************************/ #ifndef __X86EMU_X86EMU_H #define __X86EMU_X86EMU_H #ifdef SCITECH #include "scitech.h" #define X86API _ASMAPI #define X86APIP _ASMAPIP typedef int X86EMU_pioAddr; #else #include "x86emu/types.h" #define X86API #define X86APIP * #endif #include "x86emu/regs.h" /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK #pragma PACK /* Don't pack structs with function pointers! */ #endif /**************************************************************************** REMARKS: Data structure containing ponters to programmed I/O functions used by the emulator. This is used so that the user program can hook all programmed I/O for the emulator to handled as necessary by the user program. By default the emulator contains simple functions that do not do access the hardware in any way. To allow the emualtor access the hardware, you will need to override the programmed I/O functions using the X86EMU_setupPioFuncs function. HEADER: x86emu.h MEMBERS: inb - Function to read a byte from an I/O port inw - Function to read a word from an I/O port inl - Function to read a dword from an I/O port outb - Function to write a byte to an I/O port outw - Function to write a word to an I/O port outl - Function to write a dword to an I/O port ****************************************************************************/ typedef struct { u8(X86APIP inb) (X86EMU_pioAddr addr); u16(X86APIP inw) (X86EMU_pioAddr addr); u32(X86APIP inl) (X86EMU_pioAddr addr); void (X86APIP outb) (X86EMU_pioAddr addr, u8 val); void (X86APIP outw) (X86EMU_pioAddr addr, u16 val); void (X86APIP outl) (X86EMU_pioAddr addr, u32 val); } X86EMU_pioFuncs; /**************************************************************************** REMARKS: Data structure containing ponters to memory access functions used by the emulator. This is used so that the user program can hook all memory access functions as necessary for the emulator. By default the emulator contains simple functions that only access the internal memory of the emulator. If you need specialised functions to handle access to different types of memory (ie: hardware framebuffer accesses and BIOS memory access etc), you will need to override this using the X86EMU_setupMemFuncs function. HEADER: x86emu.h MEMBERS: rdb - Function to read a byte from an address rdw - Function to read a word from an address rdl - Function to read a dword from an address wrb - Function to write a byte to an address wrw - Function to write a word to an address wrl - Function to write a dword to an address ****************************************************************************/ typedef struct { u8(X86APIP rdb) (u32 addr); u16(X86APIP rdw) (u32 addr); u32(X86APIP rdl) (u32 addr); void (X86APIP wrb) (u32 addr, u8 val); void (X86APIP wrw) (u32 addr, u16 val); void (X86APIP wrl) (u32 addr, u32 val); } X86EMU_memFuncs; /**************************************************************************** Here are the default memory read and write function in case they are needed as fallbacks. ***************************************************************************/ extern u8 X86API rdb(u32 addr); extern u16 X86API rdw(u32 addr); extern u32 X86API rdl(u32 addr); extern void X86API wrb(u32 addr, u8 val); extern void X86API wrw(u32 addr, u16 val); extern void X86API wrl(u32 addr, u32 val); #ifdef END_PACK #pragma END_PACK #endif /*--------------------- type definitions -----------------------------------*/ typedef void (X86APIP X86EMU_intrFuncs) (int num); extern X86EMU_intrFuncs _X86EMU_intrTab[256]; /*-------------------------- Function Prototypes --------------------------*/ #ifdef __cplusplus extern "C" { /* Use "C" linkage when in C++ mode */ #endif void X86EMU_setupMemFuncs(X86EMU_memFuncs * funcs); void X86EMU_setupPioFuncs(X86EMU_pioFuncs * funcs); void X86EMU_setupIntrFuncs(X86EMU_intrFuncs funcs[]); void X86EMU_prepareForInt(int num); /* decode.c */ void X86EMU_exec(void); void X86EMU_halt_sys(void); #ifdef DEBUG #define HALT_SYS() \ printk("halt_sys: file %s, line %d\n", __FILE__, __LINE__), \ X86EMU_halt_sys() #else #define HALT_SYS() X86EMU_halt_sys() #endif /* Debug options */ #define DEBUG_DECODE_F 0x000001 /* print decoded instruction */ #define DEBUG_TRACE_F 0x000002 /* dump regs before/after execution */ #define DEBUG_STEP_F 0x000004 #define DEBUG_DISASSEMBLE_F 0x000008 #define DEBUG_BREAK_F 0x000010 #define DEBUG_SVC_F 0x000020 #define DEBUG_SAVE_IP_CS_F 0x000040 #define DEBUG_FS_F 0x000080 #define DEBUG_PROC_F 0x000100 #define DEBUG_SYSINT_F 0x000200 /* bios system interrupts. */ #define DEBUG_TRACECALL_F 0x000400 #define DEBUG_INSTRUMENT_F 0x000800 #define DEBUG_MEM_TRACE_F 0x001000 #define DEBUG_IO_TRACE_F 0x002000 #define DEBUG_TRACECALL_REGS_F 0x004000 #define DEBUG_DECODE_NOPRINT_F 0x008000 #define DEBUG_EXIT 0x010000 #define DEBUG_SYS_F (DEBUG_SVC_F|DEBUG_FS_F|DEBUG_PROC_F) void X86EMU_trace_regs(void); void X86EMU_trace_xregs(void); void X86EMU_dump_memory(u16 seg, u16 off, u32 amt); int X86EMU_trace_on(void); int X86EMU_trace_off(void); #ifdef __cplusplus } /* End of "C" linkage for C++ */ #endif #endif /* __X86EMU_X86EMU_H */ xorg-server-21.1.16/hw/xfree86/x86emu/validate.c0000644000175000017500000012415014757411105014634 /**************************************************************************** * * Realmode X86 Emulator Library * * Copyright (C) 1996-1999 SciTech Software, Inc. * Copyright (C) David Mosberger-Tang * Copyright (C) 1999 Egbert Eich * * ======================================================================== * * 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 the authors not be used * in advertising or publicity pertaining to distribution of the software * without specific, written prior permission. The authors makes no * representations about the suitability of this software for any purpose. * It is provided "as is" without express or implied warranty. * * THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE AUTHORS 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. * * ======================================================================== * * Language: Watcom C 10.6 or later * Environment: 32-bit DOS * Developer: Kendall Bennett * * Description: Program to validate the x86 emulator library for * correctness. We run the emulator primitive operations * functions against the real x86 CPU, and compare the result * and flags to ensure correctness. * * We use inline assembler to compile and build this program. * ****************************************************************************/ #include #include #include #include #include "x86emu.h" #include "x86emu/prim_asm.h" /*-------------------------- Implementation -------------------------------*/ #define true 1 #define false 0 #define ALL_FLAGS (F_CF | F_PF | F_AF | F_ZF | F_SF | F_OF) #define VAL_START_BINARY(parm_type,res_type,dmax,smax,dincr,sincr) \ { \ parm_type d,s; \ res_type r,r_asm; \ ulong flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < dmax; d += dincr) { \ for (s = 0; s < smax; s += sincr) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { #define VAL_TEST_BINARY(name) \ r_asm = name##_asm(&flags,d,s); \ r = name(d,s); \ if (r != r_asm || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { #define VAL_TEST_BINARY_VOID(name) \ name##_asm(&flags,d,s); \ name(d,s); \ r = r_asm = 0; \ if (M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { #define VAL_FAIL_BYTE_BYTE_BINARY(name) \ if (failed) \ printk("fail\n"); \ printk("0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \ r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%02X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_FAIL_WORD_WORD_BINARY(name) \ if (failed) \ printk("fail\n"); \ printk("0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \ r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_FAIL_LONG_LONG_BINARY(name) \ if (failed) \ printk("fail\n"); \ printk("0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \ r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_END_BINARY() \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_BYTE_BYTE_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u8,u8,0xFF,0xFF,1,1) \ VAL_TEST_BINARY(name) \ VAL_FAIL_BYTE_BYTE_BINARY(name) \ VAL_END_BINARY() #define VAL_WORD_WORD_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u16,u16,0xFF00,0xFF00,0x100,0x100) \ VAL_TEST_BINARY(name) \ VAL_FAIL_WORD_WORD_BINARY(name) \ VAL_END_BINARY() #define VAL_LONG_LONG_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000) \ VAL_TEST_BINARY(name) \ VAL_FAIL_LONG_LONG_BINARY(name) \ VAL_END_BINARY() #define VAL_VOID_BYTE_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u8,u8,0xFF,0xFF,1,1) \ VAL_TEST_BINARY_VOID(name) \ VAL_FAIL_BYTE_BYTE_BINARY(name) \ VAL_END_BINARY() #define VAL_VOID_WORD_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u16,u16,0xFF00,0xFF00,0x100,0x100) \ VAL_TEST_BINARY_VOID(name) \ VAL_FAIL_WORD_WORD_BINARY(name) \ VAL_END_BINARY() #define VAL_VOID_LONG_BINARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000) \ VAL_TEST_BINARY_VOID(name) \ VAL_FAIL_LONG_LONG_BINARY(name) \ VAL_END_BINARY() #define VAL_BYTE_ROTATE(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u8,u8,0xFF,8,1,1) \ VAL_TEST_BINARY(name) \ VAL_FAIL_BYTE_BYTE_BINARY(name) \ VAL_END_BINARY() #define VAL_WORD_ROTATE(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u16,u16,0xFF00,16,0x100,1) \ VAL_TEST_BINARY(name) \ VAL_FAIL_WORD_WORD_BINARY(name) \ VAL_END_BINARY() #define VAL_LONG_ROTATE(name) \ printk("Validating %s ... ", #name); \ VAL_START_BINARY(u32,u32,0xFF000000,32,0x1000000,1) \ VAL_TEST_BINARY(name) \ VAL_FAIL_LONG_LONG_BINARY(name) \ VAL_END_BINARY() #define VAL_START_TERNARY(parm_type,res_type,dmax,smax,dincr,sincr,maxshift)\ { \ parm_type d,s; \ res_type r,r_asm; \ u8 shift; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < dmax; d += dincr) { \ for (s = 0; s < smax; s += sincr) { \ for (shift = 0; shift < maxshift; shift += 1) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { #define VAL_TEST_TERNARY(name) \ r_asm = name##_asm(&flags,d,s,shift); \ r = name(d,s,shift); \ if (r != r_asm || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { #define VAL_FAIL_WORD_WORD_TERNARY(name) \ if (failed) \ printk("fail\n"); \ printk("0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", \ r, #name, d, s, shift, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X = %-15s(0x%04X,0x%04X,%d), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, shift, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_FAIL_LONG_LONG_TERNARY(name) \ if (failed) \ printk("fail\n"); \ printk("0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", \ r, #name, d, s, shift, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%08X = %-15s(0x%08X,0x%08X,%d), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, shift, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_END_TERNARY() \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_WORD_ROTATE_DBL(name) \ printk("Validating %s ... ", #name); \ VAL_START_TERNARY(u16,u16,0xFF00,0xFF00,0x100,0x100,16) \ VAL_TEST_TERNARY(name) \ VAL_FAIL_WORD_WORD_TERNARY(name) \ VAL_END_TERNARY() #define VAL_LONG_ROTATE_DBL(name) \ printk("Validating %s ... ", #name); \ VAL_START_TERNARY(u32,u32,0xFF000000,0xFF000000,0x1000000,0x1000000,32) \ VAL_TEST_TERNARY(name) \ VAL_FAIL_LONG_LONG_TERNARY(name) \ VAL_END_TERNARY() #define VAL_START_UNARY(parm_type,max,incr) \ { \ parm_type d,r,r_asm; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < max; d += incr) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { #define VAL_TEST_UNARY(name) \ r_asm = name##_asm(&flags,d); \ r = name(d); \ if (r != r_asm || M.x86.R_EFLG != flags) { \ failed = true; #define VAL_FAIL_BYTE_UNARY(name) \ printk("fail\n"); \ printk("0x%02X = %-15s(0x%02X), flags = %s -> %s\n", \ r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%02X = %-15s(0x%02X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_FAIL_WORD_UNARY(name) \ printk("fail\n"); \ printk("0x%04X = %-15s(0x%04X), flags = %s -> %s\n", \ r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X = %-15s(0x%04X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_FAIL_LONG_UNARY(name) \ printk("fail\n"); \ printk("0x%08X = %-15s(0x%08X), flags = %s -> %s\n", \ r, #name, d, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%08X = %-15s(0x%08X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, print_flags(buf1,inflags), print_flags(buf2,flags)); #define VAL_END_UNARY() \ } \ M.x86.R_EFLG = inflags = flags = def_flags | ALL_FLAGS; \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_BYTE_UNARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_UNARY(u8,0xFF,0x1) \ VAL_TEST_UNARY(name) \ VAL_FAIL_BYTE_UNARY(name) \ VAL_END_UNARY() #define VAL_WORD_UNARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_UNARY(u16,0xFF00,0x100) \ VAL_TEST_UNARY(name) \ VAL_FAIL_WORD_UNARY(name) \ VAL_END_UNARY() #define VAL_WORD_BYTE_UNARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_UNARY(u16,0xFF,0x1) \ VAL_TEST_UNARY(name) \ VAL_FAIL_WORD_UNARY(name) \ VAL_END_UNARY() #define VAL_LONG_UNARY(name) \ printk("Validating %s ... ", #name); \ VAL_START_UNARY(u32,0xFF000000,0x1000000) \ VAL_TEST_UNARY(name) \ VAL_FAIL_LONG_UNARY(name) \ VAL_END_UNARY() #define VAL_BYTE_MUL(name) \ printk("Validating %s ... ", #name); \ { \ u8 d,s; \ u16 r,r_asm; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF; d += 1) { \ for (s = 0; s < 0xFF; s += 1) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ name##_asm(&flags,&r_asm,d,s); \ M.x86.R_AL = d; \ name(s); \ r = M.x86.R_AX; \ if (r != r_asm || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \ r, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X = %-15s(0x%02X,0x%02X), flags = %s -> %s\n", \ r_asm, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_WORD_MUL(name) \ printk("Validating %s ... ", #name); \ { \ u16 d,s; \ u16 r_lo,r_asm_lo; \ u16 r_hi,r_asm_hi; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF00; d += 0x100) { \ for (s = 0; s < 0xFF00; s += 0x100) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ name##_asm(&flags,&r_asm_lo,&r_asm_hi,d,s); \ M.x86.R_AX = d; \ name(s); \ r_lo = M.x86.R_AX; \ r_hi = M.x86.R_DX; \ if (r_lo != r_asm_lo || r_hi != r_asm_hi || M.x86.R_EFLG != flags)\ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \ r_hi,r_lo, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X:0x%04X = %-15s(0x%04X,0x%04X), flags = %s -> %s\n", \ r_asm_hi,r_asm_lo, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_LONG_MUL(name) \ printk("Validating %s ... ", #name); \ { \ u32 d,s; \ u32 r_lo,r_asm_lo; \ u32 r_hi,r_asm_hi; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF000000; d += 0x1000000) { \ for (s = 0; s < 0xFF000000; s += 0x1000000) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ name##_asm(&flags,&r_asm_lo,&r_asm_hi,d,s); \ M.x86.R_EAX = d; \ name(s); \ r_lo = M.x86.R_EAX; \ r_hi = M.x86.R_EDX; \ if (r_lo != r_asm_lo || r_hi != r_asm_hi || M.x86.R_EFLG != flags)\ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \ r_hi,r_lo, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%08X:0x%08X = %-15s(0x%08X,0x%08X), flags = %s -> %s\n", \ r_asm_hi,r_asm_lo, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_BYTE_DIV(name) \ printk("Validating %s ... ", #name); \ { \ u16 d,s; \ u8 r_quot,r_rem,r_asm_quot,r_asm_rem; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF00; d += 0x100) { \ for (s = 1; s < 0xFF; s += 1) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ M.x86.intr = 0; \ M.x86.R_AX = d; \ name(s); \ r_quot = M.x86.R_AL; \ r_rem = M.x86.R_AH; \ if (M.x86.intr & INTR_SYNCH) \ continue; \ name##_asm(&flags,&r_asm_quot,&r_asm_rem,d,s); \ if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = %s -> %s\n", \ r_quot, r_rem, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%02X:0x%02X = %-15s(0x%04X,0x%02X), flags = %s -> %s\n", \ r_asm_quot, r_asm_rem, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_WORD_DIV(name) \ printk("Validating %s ... ", #name); \ { \ u32 d,s; \ u16 r_quot,r_rem,r_asm_quot,r_asm_rem; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF000000; d += 0x1000000) { \ for (s = 0x100; s < 0xFF00; s += 0x100) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ M.x86.intr = 0; \ M.x86.R_AX = d & 0xFFFF; \ M.x86.R_DX = d >> 16; \ name(s); \ r_quot = M.x86.R_AX; \ r_rem = M.x86.R_DX; \ if (M.x86.intr & INTR_SYNCH) \ continue; \ name##_asm(&flags,&r_asm_quot,&r_asm_rem,d & 0xFFFF,d >> 16,s);\ if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = %s -> %s\n", \ r_quot, r_rem, #name, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%04X:0x%04X = %-15s(0x%08X,0x%04X), flags = %s -> %s\n", \ r_asm_quot, r_asm_rem, #name"_asm", d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } #define VAL_LONG_DIV(name) \ printk("Validating %s ... ", #name); \ { \ u32 d,s; \ u32 r_quot,r_rem,r_asm_quot,r_asm_rem; \ u32 flags,inflags; \ int f,failed = false; \ char buf1[80],buf2[80]; \ for (d = 0; d < 0xFF000000; d += 0x1000000) { \ for (s = 0x100; s < 0xFF00; s += 0x100) { \ M.x86.R_EFLG = inflags = flags = def_flags; \ for (f = 0; f < 2; f++) { \ M.x86.intr = 0; \ M.x86.R_EAX = d; \ M.x86.R_EDX = 0; \ name(s); \ r_quot = M.x86.R_EAX; \ r_rem = M.x86.R_EDX; \ if (M.x86.intr & INTR_SYNCH) \ continue; \ name##_asm(&flags,&r_asm_quot,&r_asm_rem,d,0,s); \ if (r_quot != r_asm_quot || r_rem != r_asm_rem || M.x86.R_EFLG != flags) \ failed = true; \ if (failed || trace) { \ if (failed) \ printk("fail\n"); \ printk("0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), flags = %s -> %s\n", \ r_quot, r_rem, #name, 0, d, s, print_flags(buf1,inflags), print_flags(buf2,M.x86.R_EFLG)); \ printk("0x%08X:0x%08X = %-15s(0x%08X:0x%08X,0x%08X), flags = %s -> %s\n", \ r_asm_quot, r_asm_rem, #name"_asm", 0, d, s, print_flags(buf1,inflags), print_flags(buf2,flags)); \ } \ M.x86.R_EFLG = inflags = flags = def_flags | (ALL_FLAGS & ~F_OF); \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (failed) \ break; \ } \ if (!failed) \ printk("passed\n"); \ } void printk(const char *fmt, ...) { va_list argptr; va_start(argptr, fmt); vfprintf(stdout, fmt, argptr); fflush(stdout); va_end(argptr); } char * print_flags(char *buf, ulong flags) { char *separator = ""; buf[0] = 0; if (flags & F_CF) { strcat(buf, separator); strcat(buf, "CF"); separator = ","; } if (flags & F_PF) { strcat(buf, separator); strcat(buf, "PF"); separator = ","; } if (flags & F_AF) { strcat(buf, separator); strcat(buf, "AF"); separator = ","; } if (flags & F_ZF) { strcat(buf, separator); strcat(buf, "ZF"); separator = ","; } if (flags & F_SF) { strcat(buf, separator); strcat(buf, "SF"); separator = ","; } if (flags & F_OF) { strcat(buf, separator); strcat(buf, "OF"); separator = ","; } if (separator[0] == 0) strcpy(buf, "None"); return buf; } int main(int argc) { ulong def_flags; int trace = false; if (argc > 1) trace = true; memset(&M, 0, sizeof(M)); def_flags = get_flags_asm() & ~ALL_FLAGS; VAL_WORD_UNARY(aaa_word); VAL_WORD_UNARY(aas_word); VAL_WORD_UNARY(aad_word); VAL_WORD_UNARY(aam_word); VAL_BYTE_BYTE_BINARY(adc_byte); VAL_WORD_WORD_BINARY(adc_word); VAL_LONG_LONG_BINARY(adc_long); VAL_BYTE_BYTE_BINARY(add_byte); VAL_WORD_WORD_BINARY(add_word); VAL_LONG_LONG_BINARY(add_long); VAL_BYTE_BYTE_BINARY(and_byte); VAL_WORD_WORD_BINARY(and_word); VAL_LONG_LONG_BINARY(and_long); VAL_BYTE_BYTE_BINARY(cmp_byte); VAL_WORD_WORD_BINARY(cmp_word); VAL_LONG_LONG_BINARY(cmp_long); VAL_BYTE_UNARY(daa_byte); VAL_BYTE_UNARY(das_byte); /* Fails for 0x9A (out of range anyway) */ VAL_BYTE_UNARY(dec_byte); VAL_WORD_UNARY(dec_word); VAL_LONG_UNARY(dec_long); VAL_BYTE_UNARY(inc_byte); VAL_WORD_UNARY(inc_word); VAL_LONG_UNARY(inc_long); VAL_BYTE_BYTE_BINARY(or_byte); VAL_WORD_WORD_BINARY(or_word); VAL_LONG_LONG_BINARY(or_long); VAL_BYTE_UNARY(neg_byte); VAL_WORD_UNARY(neg_word); VAL_LONG_UNARY(neg_long); VAL_BYTE_UNARY(not_byte); VAL_WORD_UNARY(not_word); VAL_LONG_UNARY(not_long); VAL_BYTE_ROTATE(rcl_byte); VAL_WORD_ROTATE(rcl_word); VAL_LONG_ROTATE(rcl_long); VAL_BYTE_ROTATE(rcr_byte); VAL_WORD_ROTATE(rcr_word); VAL_LONG_ROTATE(rcr_long); VAL_BYTE_ROTATE(rol_byte); VAL_WORD_ROTATE(rol_word); VAL_LONG_ROTATE(rol_long); VAL_BYTE_ROTATE(ror_byte); VAL_WORD_ROTATE(ror_word); VAL_LONG_ROTATE(ror_long); VAL_BYTE_ROTATE(shl_byte); VAL_WORD_ROTATE(shl_word); VAL_LONG_ROTATE(shl_long); VAL_BYTE_ROTATE(shr_byte); VAL_WORD_ROTATE(shr_word); VAL_LONG_ROTATE(shr_long); VAL_BYTE_ROTATE(sar_byte); VAL_WORD_ROTATE(sar_word); VAL_LONG_ROTATE(sar_long); VAL_WORD_ROTATE_DBL(shld_word); VAL_LONG_ROTATE_DBL(shld_long); VAL_WORD_ROTATE_DBL(shrd_word); VAL_LONG_ROTATE_DBL(shrd_long); VAL_BYTE_BYTE_BINARY(sbb_byte); VAL_WORD_WORD_BINARY(sbb_word); VAL_LONG_LONG_BINARY(sbb_long); VAL_BYTE_BYTE_BINARY(sub_byte); VAL_WORD_WORD_BINARY(sub_word); VAL_LONG_LONG_BINARY(sub_long); VAL_BYTE_BYTE_BINARY(xor_byte); VAL_WORD_WORD_BINARY(xor_word); VAL_LONG_LONG_BINARY(xor_long); VAL_VOID_BYTE_BINARY(test_byte); VAL_VOID_WORD_BINARY(test_word); VAL_VOID_LONG_BINARY(test_long); VAL_BYTE_MUL(imul_byte); VAL_WORD_MUL(imul_word); VAL_LONG_MUL(imul_long); VAL_BYTE_MUL(mul_byte); VAL_WORD_MUL(mul_word); VAL_LONG_MUL(mul_long); VAL_BYTE_DIV(idiv_byte); VAL_WORD_DIV(idiv_word); VAL_LONG_DIV(idiv_long); VAL_BYTE_DIV(div_byte); VAL_WORD_DIV(div_word); VAL_LONG_DIV(div_long); return 0; } xorg-server-21.1.16/hw/xfree86/xkb/0000755000175000017500000000000014757411134012406 5xorg-server-21.1.16/hw/xfree86/xkb/meson.build0000644000175000017500000000035014757411105014464 srcs_xorg_xkb = [ 'xkbVT.c', 'xkbPrivate.c', 'xkbKillSrv.c', ] xorg_xkb = static_library('xorg_xkb', srcs_xorg_xkb, include_directories: [inc, xorg_inc], dependencies: common_dep, c_args: xorg_c_args, ) xorg-server-21.1.16/hw/xfree86/xkb/Makefile.am0000644000175000017500000000024014757411105014354 noinst_LTLIBRARIES = libxorgxkb.la AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_INCS@ libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c xorg-server-21.1.16/hw/xfree86/xkb/Makefile.in0000644000175000017500000006154514757411115014405 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/xkb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxorgxkb_la_LIBADD = am_libxorgxkb_la_OBJECTS = xkbVT.lo xkbPrivate.lo xkbKillSrv.lo libxorgxkb_la_OBJECTS = $(am_libxorgxkb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/xkbKillSrv.Plo \ ./$(DEPDIR)/xkbPrivate.Plo ./$(DEPDIR)/xkbVT.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxorgxkb_la_SOURCES) DIST_SOURCES = $(libxorgxkb_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxorgxkb.la AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ AM_CPPFLAGS = @XORG_INCS@ libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/xkb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/xkb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxorgxkb.la: $(libxorgxkb_la_OBJECTS) $(libxorgxkb_la_DEPENDENCIES) $(EXTRA_libxorgxkb_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxorgxkb_la_OBJECTS) $(libxorgxkb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbKillSrv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbPrivate.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbVT.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/xkbKillSrv.Plo -rm -f ./$(DEPDIR)/xkbPrivate.Plo -rm -f ./$(DEPDIR)/xkbVT.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/xkbKillSrv.Plo -rm -f ./$(DEPDIR)/xkbPrivate.Plo -rm -f ./$(DEPDIR)/xkbVT.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/xkb/xkbVT.c0000644000175000017500000000417114757411105013531 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include #include #include "xf86.h" int XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act) { int scrnnum = XkbSAScreen(&act->screen); if (act->screen.flags & XkbSA_SwitchApplication) { if (act->screen.flags & XkbSA_SwitchAbsolute) xf86ProcessActionEvent(ACTION_SWITCHSCREEN, (void *) &scrnnum); else { if (scrnnum < 0) xf86ProcessActionEvent(ACTION_SWITCHSCREEN_PREV, NULL); else xf86ProcessActionEvent(ACTION_SWITCHSCREEN_NEXT, NULL); } } return 1; } xorg-server-21.1.16/hw/xfree86/xkb/xkbPrivate.c0000644000175000017500000000150414757411105014607 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "dixgrabs.h" #include "os.h" #include "xf86.h" int XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act) { XkbAnyAction *xf86act = &(act->any); char msgbuf[XkbAnyActionDataSize + 1]; if (xf86act->type == XkbSA_XFree86Private) { memcpy(msgbuf, xf86act->data, XkbAnyActionDataSize); msgbuf[XkbAnyActionDataSize] = '\0'; if (strcasecmp(msgbuf, "-vmode") == 0) xf86ProcessActionEvent(ACTION_PREV_MODE, NULL); else if (strcasecmp(msgbuf, "+vmode") == 0) xf86ProcessActionEvent(ACTION_NEXT_MODE, NULL); } return 0; } xorg-server-21.1.16/hw/xfree86/xkb/xkbKillSrv.c0000644000175000017500000000342314757411105014565 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include #include #include "xf86.h" int XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act) { if (dev != inputInfo.keyboard) xf86ProcessActionEvent(ACTION_TERMINATE, NULL); return 0; } xorg-server-21.1.16/hw/xfree86/meson.build0000644000175000017500000001164214757411105013706 xorg_inc = include_directories( 'common', 'ddc', 'dri2', 'i2c', 'int10', 'loader', 'modes', 'os-support', 'os-support/bus', 'parser', 'ramdac', 'vgahw', ) xorg_c_args = [] xorg_c_args += '-DHAVE_XORG_CONFIG_H' xorg_c_args += '-DXORG_NO_SDKSYMS' pciaccess_dep = [] if get_option('pciaccess') pciaccess_dep = dependency('pciaccess', version: '>= 0.12.901') endif # subdirs for convenience libraries statically linked into Xorg subdir('common') subdir('ddc') if build_dri1 subdir('dri') endif if build_dri2 subdir('dri2') endif subdir('i2c') subdir('loader') subdir('modes') subdir('os-support') subdir('parser') subdir('ramdac') subdir('xkb') srcs_xorg = [ '../../mi/miinitext.c', '../../mi/miinitext.h', ] # Extract all the objects so that all symbols get brought into the # server. This prevents us from needing a global table of all symbols # that should be exported to Xorg modules, at the expense of all # symbols being included and public xorg_link = [ libxserver, libglxvnd, xorg_common, xorg_loader, xorg_ddc, xorg_xkb, xorg_i2c, xorg_modes, xorg_os_support, xorg_parser, xorg_ramdac, libxserver_fb, libxserver_xext_vidmode, libxserver_main, libxserver_config, ] if build_dri1 xorg_link += xorg_dri endif if build_dri2 xorg_link += xorg_dri2 endif if host_machine.system() == 'cygwin' or host_machine.system() == 'windows' linker_export_flags = '-Wl,--export-all-symbols' elif host_machine.system() == 'sunos' or host_machine.system() == 'darwin' linker_export_flags = [] else linker_export_flags = '-Wl,--export-dynamic' endif xorg_deps = [ pixman_dep, m_dep, dl_dep, pciaccess_dep, sha1_dep, dependency('xau'), xdmcp_dep, xfont2_dep, xshmfence_dep, config_dep, libdrm_dep, ] if get_option('suid_wrapper') xorg_install_dir = get_option('libexecdir') else xorg_install_dir = get_option('bindir') endif e = executable( 'Xorg', srcs_xorg, include_directories: [inc, xorg_inc], link_whole: xorg_link, dependencies: xorg_deps, link_args: linker_export_flags, c_args: xorg_c_args, install: true, install_dir: xorg_install_dir, implib: true, ) # subdirs for modules loadable by Xorg subdir('dixmods') subdir('exa') subdir('fbdevhw') if gbm_dep.found() subdir('glamor_egl') endif if int10 != 'false' if int10 == 'x86emu' subdir('x86emu') endif subdir('int10') endif subdir('shadowfb') if build_vgahw subdir('vgahw') endif if build_modesetting subdir('drivers/modesetting') endif if get_option('xf86-input-inputtest') subdir('drivers/inputtest') endif meson.add_install_script( 'sh', '-c', 'ln -fs Xorg @0@@1@'.format( '${DESTDIR}', join_paths(get_option('prefix'), get_option('bindir'), 'X'))) if get_option('suid_wrapper') executable('Xorg.wrap', 'xorg-wrapper.c', include_directories: [inc, xorg_inc], dependencies: xorg_deps, c_args: xorg_c_args, install: true, install_dir: get_option('libexecdir'), install_mode: ['r-sr-xr-x', 0, 0], ) # meson gets confused when there are two targets of the same name # within the same directory, so we use a different intermediate name. xorg_sh = configure_file( input: 'Xorg.sh.in', output: 'Xorg.sh', configuration: conf_data, ) install_data( xorg_sh, install_mode: 'rwxr-xr-x', install_dir: join_paths(get_option('prefix'), get_option('bindir')), rename: ['Xorg'] ) endif executable('gtf', 'utils/gtf/gtf.c', include_directories: [inc, xorg_inc], dependencies: xorg_deps, c_args: xorg_c_args, install: true, ) # For symbol presence testing only xorgserver_lib = shared_library( 'xorgserver', srcs_xorg, include_directories: [inc, xorg_inc], link_whole: xorg_link, dependencies: xorg_deps, link_args: linker_export_flags, c_args: xorg_c_args, install: false, ) xorgserver_dep = declare_dependency(link_with: xorgserver_lib) install_man(configure_file( input: 'man/Xorg.man', output: 'Xorg.1', configuration: manpage_config, )) if get_option('suid_wrapper') install_man(configure_file( input: 'man/Xorg.wrap.man', output: 'Xorg.wrap.1', configuration: manpage_config, )) install_man(configure_file( input: 'man/Xwrapper.config.man', output: 'Xwrapper.config.5', configuration: manpage_config, )) endif install_man(configure_file( input: 'man/xorg.conf.man', output: 'xorg.conf.5', configuration: manpage_config, )) install_man(configure_file( input: 'man/xorg.conf.d.man', output: 'xorg.conf.d.5', configuration: manpage_config, )) install_man(configure_file( input: 'utils/man/gtf.man', output: 'gtf.1', configuration: manpage_config, )) subdir('doc') xorg-server-21.1.16/hw/xfree86/Makefile.am0000644000175000017500000000772314757411105013605 if DRI DRI_SUBDIR = dri DRI_LIB = dri/libdri.la endif if DRI2 DRI2_SUBDIR = dri2 DRI2_LIB = dri2/libdri2.la endif if DRI3 DRI3_BUILDDIR = $(top_builddir)/dri3 DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la endif if GLX GLXVND_LIB = $(top_builddir)/glx/libglxvnd.la endif if GLAMOR_EGL GLAMOR_EGL_SUBDIR = glamor_egl endif if XF86UTILS XF86UTILS_SUBDIR = utils endif if VGAHW VGAHW_SUBDIR = vgahw endif if INT10MODULE INT10_SUBDIR = int10 endif SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ $(DRI2_SUBDIR) . i2c dixmods xkb \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ $(GLAMOR_EGL_SUBDIR) drivers DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vgahw \ loader dixmods xkb dri dri2 exa modes \ utils doc man glamor_egl drivers bin_PROGRAMS = Xorg nodist_Xorg_SOURCES = sdksyms.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/parser \ -I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \ -I$(srcdir)/dri -I$(srcdir)/dri2 -I$(top_srcdir)/dri3 LOCAL_LIBS = \ $(MAIN_LIB) \ $(XSERVER_LIBS) \ loader/libloader.la \ common/libcommon.la \ os-support/libxorgos.la \ parser/libxf86config.la \ dixmods/libdixmods.la \ modes/libxf86modes.la \ ramdac/libramdac.la \ ddc/libddc.la \ i2c/libi2c.la \ $(XORG_LIBS) \ xkb/libxorgxkb.la \ $(DRI_LIB) \ $(DRI2_LIB) \ $(DRI3_LIB) \ $(GLXVND_LIB) \ $(top_builddir)/fb/libfb.la \ $(top_builddir)/miext/sync/libsync.la \ $(top_builddir)/mi/libmi.la \ $(top_builddir)/os/libos.la \ $(top_builddir)/Xext/libXvidmode.la Xorg_LDADD = \ $(LOCAL_LIBS) \ $(XORG_SYS_LIBS) \ $(XSERVER_SYS_LIBS) Xorg_DEPENDENCIES = $(LOCAL_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) if SUID_WRAPPER wrapexecdir = $(SUID_WRAPPER_DIR) wrapexec_PROGRAMS = Xorg.wrap Xorg_wrap_SOURCES = xorg-wrapper.c endif BUILT_SOURCES = xorg.conf.example DISTCLEANFILES = xorg.conf.example EXTRA_DIST = xorgconf.cpp # Without logdir, X will post an error on the terminal and will not start install-data-local: $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir) if CYGWIN $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a endif install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg$(EXEEXT) X) if INSTALL_SETUID chown 0 $(DESTDIR)$(bindir)/Xorg chmod u+s $(DESTDIR)$(bindir)/Xorg endif if SUID_WRAPPER $(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR) mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap endif uninstall-local: if CYGWIN $(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXorg.exe.a endif uninstall-hook: $(AM_V_at)rm -f $(DESTDIR)$(bindir)/X # Use variables from XORG_MANPAGE_SECTIONS and X Server configuration # Do not include manpages.am as values are not appropriate for rc files CONF_SUBSTS = -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ -e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \ -e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g' xorg.conf.example: xorgconf.cpp $(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@ relink: $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT) CLEANFILES = sdksyms.c sdksyms.dep Xorg.sh EXTRA_DIST += sdksyms.sh sdksyms.dep sdksyms.c: sdksyms.sh $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) SDKSYMS_DEP = sdksyms.dep -include $(SDKSYMS_DEP) i2c/libi2c.la: $(AM_V_at)cd i2c && $(MAKE) libi2c.la dixmods/libdixmods.la: $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la xkb/libxorgxkb.la: $(AM_V_at)cd xkb && $(MAKE) libxorgxkb.la xorg-server-21.1.16/hw/xfree86/Makefile.in0000644000175000017500000011477514757411115013625 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xorg$(EXEEXT) @SUID_WRAPPER_TRUE@wrapexec_PROGRAMS = Xorg.wrap$(EXEEXT) subdir = hw/xfree86 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = Xorg.sh CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(wrapexecdir)" PROGRAMS = $(bin_PROGRAMS) $(wrapexec_PROGRAMS) nodist_Xorg_OBJECTS = sdksyms.$(OBJEXT) Xorg_OBJECTS = $(nodist_Xorg_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ loader/libloader.la common/libcommon.la \ os-support/libxorgos.la parser/libxf86config.la \ dixmods/libdixmods.la modes/libxf86modes.la \ ramdac/libramdac.la ddc/libddc.la i2c/libi2c.la \ $(am__DEPENDENCIES_1) xkb/libxorgxkb.la $(DRI_LIB) $(DRI2_LIB) \ $(DRI3_LIB) $(GLXVND_LIB) $(top_builddir)/fb/libfb.la \ $(top_builddir)/miext/sync/libsync.la \ $(top_builddir)/mi/libmi.la $(top_builddir)/os/libos.la \ $(top_builddir)/Xext/libXvidmode.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = Xorg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(Xorg_LDFLAGS) $(LDFLAGS) -o $@ am__Xorg_wrap_SOURCES_DIST = xorg-wrapper.c @SUID_WRAPPER_TRUE@am_Xorg_wrap_OBJECTS = xorg-wrapper.$(OBJEXT) Xorg_wrap_OBJECTS = $(am_Xorg_wrap_OBJECTS) Xorg_wrap_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/sdksyms.Po \ ./$(DEPDIR)/xorg-wrapper.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(nodist_Xorg_SOURCES) $(Xorg_wrap_SOURCES) DIST_SOURCES = $(am__Xorg_wrap_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Xorg.sh.in \ $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @DRI_TRUE@DRI_SUBDIR = dri @DRI_TRUE@DRI_LIB = dri/libdri.la @DRI2_TRUE@DRI2_SUBDIR = dri2 @DRI2_TRUE@DRI2_LIB = dri2/libdri2.la @DRI3_TRUE@DRI3_BUILDDIR = $(top_builddir)/dri3 @DRI3_TRUE@DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la @GLX_TRUE@GLXVND_LIB = $(top_builddir)/glx/libglxvnd.la @GLAMOR_EGL_TRUE@GLAMOR_EGL_SUBDIR = glamor_egl @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils @VGAHW_TRUE@VGAHW_SUBDIR = vgahw @INT10MODULE_TRUE@INT10_SUBDIR = int10 SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ $(DRI2_SUBDIR) . i2c dixmods xkb \ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ $(GLAMOR_EGL_SUBDIR) drivers DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vgahw \ loader dixmods xkb dri dri2 exa modes \ utils doc man glamor_egl drivers nodist_Xorg_SOURCES = sdksyms.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir)/parser \ -I$(srcdir)/ddc -I$(srcdir)/i2c -I$(srcdir)/modes -I$(srcdir)/ramdac \ -I$(srcdir)/dri -I$(srcdir)/dri2 -I$(top_srcdir)/dri3 LOCAL_LIBS = \ $(MAIN_LIB) \ $(XSERVER_LIBS) \ loader/libloader.la \ common/libcommon.la \ os-support/libxorgos.la \ parser/libxf86config.la \ dixmods/libdixmods.la \ modes/libxf86modes.la \ ramdac/libramdac.la \ ddc/libddc.la \ i2c/libi2c.la \ $(XORG_LIBS) \ xkb/libxorgxkb.la \ $(DRI_LIB) \ $(DRI2_LIB) \ $(DRI3_LIB) \ $(GLXVND_LIB) \ $(top_builddir)/fb/libfb.la \ $(top_builddir)/miext/sync/libsync.la \ $(top_builddir)/mi/libmi.la \ $(top_builddir)/os/libos.la \ $(top_builddir)/Xext/libXvidmode.la Xorg_LDADD = \ $(LOCAL_LIBS) \ $(XORG_SYS_LIBS) \ $(XSERVER_SYS_LIBS) Xorg_DEPENDENCIES = $(LOCAL_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @SUID_WRAPPER_TRUE@wrapexecdir = $(SUID_WRAPPER_DIR) @SUID_WRAPPER_TRUE@Xorg_wrap_SOURCES = xorg-wrapper.c BUILT_SOURCES = xorg.conf.example DISTCLEANFILES = xorg.conf.example EXTRA_DIST = xorgconf.cpp sdksyms.sh # Use variables from XORG_MANPAGE_SECTIONS and X Server configuration # Do not include manpages.am as values are not appropriate for rc files CONF_SUBSTS = -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ -e 's|MODULEPATH|$(DEFAULT_MODULE_PATH)|g' \ -e 's|DEFAULTFONTPATH|$(COMPILEDDEFAULTFONTPATH)|g' CLEANFILES = sdksyms.c sdksyms.dep Xorg.sh SDKSYMS_DEP = sdksyms.dep all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): Xorg.sh: $(top_builddir)/config.status $(srcdir)/Xorg.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-wrapexecPROGRAMS: $(wrapexec_PROGRAMS) @$(NORMAL_INSTALL) @list='$(wrapexec_PROGRAMS)'; test -n "$(wrapexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(wrapexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(wrapexecdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(wrapexecdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(wrapexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-wrapexecPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(wrapexec_PROGRAMS)'; test -n "$(wrapexecdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(wrapexecdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(wrapexecdir)" && rm -f $$files clean-wrapexecPROGRAMS: @list='$(wrapexec_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list Xorg$(EXEEXT): $(Xorg_OBJECTS) $(Xorg_DEPENDENCIES) $(EXTRA_Xorg_DEPENDENCIES) @rm -f Xorg$(EXEEXT) $(AM_V_CCLD)$(Xorg_LINK) $(Xorg_OBJECTS) $(Xorg_LDADD) $(LIBS) Xorg.wrap$(EXEEXT): $(Xorg_wrap_OBJECTS) $(Xorg_wrap_DEPENDENCIES) $(EXTRA_Xorg_wrap_DEPENDENCIES) @rm -f Xorg.wrap$(EXEEXT) $(AM_V_CCLD)$(LINK) $(Xorg_wrap_OBJECTS) $(Xorg_wrap_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdksyms.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg-wrapper.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(wrapexecdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-wrapexecPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/sdksyms.Po -rm -f ./$(DEPDIR)/xorg-wrapper.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-wrapexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/sdksyms.Po -rm -f ./$(DEPDIR)/xorg-wrapper.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-local \ uninstall-wrapexecPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-exec-am install-strip uninstall-am .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-wrapexecPROGRAMS \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ install-wrapexecPROGRAMS installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-hook uninstall-local uninstall-wrapexecPROGRAMS .PRECIOUS: Makefile # Without logdir, X will post an error on the terminal and will not start install-data-local: $(AM_V_GEN)$(MKDIR_P) $(DESTDIR)$(logdir) @CYGWIN_TRUE@ $(INSTALL_DATA) libXorg.exe.a $(DESTDIR)$(libdir)/libXorg.exe.a install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg$(EXEEXT) X) @INSTALL_SETUID_TRUE@ chown 0 $(DESTDIR)$(bindir)/Xorg @INSTALL_SETUID_TRUE@ chmod u+s $(DESTDIR)$(bindir)/Xorg @SUID_WRAPPER_TRUE@ $(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR) @SUID_WRAPPER_TRUE@ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg @SUID_WRAPPER_TRUE@ ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg @SUID_WRAPPER_TRUE@ -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap uninstall-local: @CYGWIN_TRUE@ $(AM_V_at)rm -f $(DESTDIR)$(libdir)/libXorg.exe.a uninstall-hook: $(AM_V_at)rm -f $(DESTDIR)$(bindir)/X xorg.conf.example: xorgconf.cpp $(AM_V_GEN)$(SED) $(CONF_SUBSTS) < $(srcdir)/xorgconf.cpp > $@ relink: $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT) sdksyms.dep sdksyms.c: sdksyms.sh $(AM_V_GEN)CPP='$(CPP)' AWK='$(AWK)' $(SHELL) $(srcdir)/sdksyms.sh $(top_srcdir) $(CFLAGS) $(AM_CFLAGS) $(AM_CPPFLAGS) -include $(SDKSYMS_DEP) i2c/libi2c.la: $(AM_V_at)cd i2c && $(MAKE) libi2c.la dixmods/libdixmods.la: $(AM_V_at)cd dixmods && $(MAKE) libdixmods.la xkb/libxorgxkb.la: $(AM_V_at)cd xkb && $(MAKE) libxorgxkb.la # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/Xorg.sh.in0000644000175000017500000000042714757411105013423 #!/bin/sh # # Execute Xorg.wrap if it exists otherwise execute Xorg directly. # This allows distros to put the suid wrapper in a separate package. basedir=@SUID_WRAPPER_DIR@ if [ -x "$basedir"/Xorg.wrap ]; then exec "$basedir"/Xorg.wrap "$@" else exec "$basedir"/Xorg "$@" fi xorg-server-21.1.16/hw/xfree86/xorg-wrapper.c0000644000175000017500000002041414757411105014342 /* * Copyright © 2014 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Hans de Goede */ #include "dix-config.h" #include "xorg-config.h" #include #include #include #include #include #include #include #include #include #ifdef HAVE_SYS_SYSMACROS_H #include #endif #include #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #endif #include #ifdef WITH_LIBDRM #include #include /* For DRM_DEV_NAME */ #endif #include "misc.h" #define CONFIG_FILE SYSCONFDIR "/X11/Xwrapper.config" static const char *progname; enum { ROOT_ONLY, CONSOLE_ONLY, ANYBODY }; /* KISS non locale / LANG parsing isspace version */ static int is_space(char c) { return c == ' ' || c == '\t' || c == '\n'; } static char *strip(char *s) { int i; /* Strip leading whitespace */ while (s[0] && is_space(s[0])) s++; /* Strip trailing whitespace */ i = strlen(s) - 1; while (i >= 0 && is_space(s[i])) { s[i] = 0; i--; } return s; } static void parse_config(int *allowed, int *needs_root_rights) { FILE *f; char buf[1024]; char *stripped, *equals, *key, *value; int line = 0; f = fopen(CONFIG_FILE, "r"); if (!f) return; while (fgets(buf, sizeof(buf), f)) { line++; /* Skip comments and empty lines */ stripped = strip(buf); if (stripped[0] == '#' || stripped[0] == 0) continue; /* Split in a key + value pair */ equals = strchr(stripped, '='); if (!equals) { fprintf(stderr, "%s: Syntax error at %s line %d\n", progname, CONFIG_FILE, line); exit(1); } *equals = 0; key = strip(stripped); /* To remove trailing whitespace from key */ value = strip(equals + 1); /* To remove leading whitespace from val */ if (!key[0]) { fprintf(stderr, "%s: Missing key at %s line %d\n", progname, CONFIG_FILE, line); exit(1); } if (!value[0]) { fprintf(stderr, "%s: Missing value at %s line %d\n", progname, CONFIG_FILE, line); exit(1); } /* And finally process */ if (strcmp(key, "allowed_users") == 0) { if (strcmp(value, "rootonly") == 0) *allowed = ROOT_ONLY; else if (strcmp(value, "console") == 0) *allowed = CONSOLE_ONLY; else if (strcmp(value, "anybody") == 0) *allowed = ANYBODY; else { fprintf(stderr, "%s: Invalid value '%s' for 'allowed_users' at %s line %d\n", progname, value, CONFIG_FILE, line); exit(1); } } else if (strcmp(key, "needs_root_rights") == 0) { if (strcmp(value, "yes") == 0) *needs_root_rights = 1; else if (strcmp(value, "no") == 0) *needs_root_rights = 0; else if (strcmp(value, "auto") == 0) *needs_root_rights = -1; else { fprintf(stderr, "%s: Invalid value '%s' for 'needs_root_rights' at %s line %d\n", progname, value, CONFIG_FILE, line); exit(1); } } else if (strcmp(key, "nice_value") == 0) { /* Backward compatibility with older Debian Xwrapper, ignore */ } else { fprintf(stderr, "%s: Invalid key '%s' at %s line %d\n", key, progname, CONFIG_FILE, line); exit(1); } } fclose(f); } static int on_console(int fd) { #if defined(__linux__) struct stat st; int r; r = fstat(fd, &st); if (r == 0 && S_ISCHR(st.st_mode) && major(st.st_rdev) == 4) return 1; #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) int idx; if (ioctl(fd, VT_GETINDEX, &idx) != -1) return 1; #else #warning This program needs porting to your kernel. static int seen; if (!seen) { fprintf(stderr, "%s: Unable to determine if running on a console\n", progname); seen = 1; } #endif return 0; } int main(int argc, char *argv[]) { #ifdef WITH_LIBDRM struct drm_mode_card_res res; #endif char buf[PATH_MAX]; int i, r, fd; int kms_cards = 0; int total_cards = 0; int allowed = CONSOLE_ONLY; int needs_root_rights = -1; char *const empty_envp[1] = { NULL, }; progname = argv[0]; parse_config(&allowed, &needs_root_rights); /* For non root users check if they are allowed to run the X server */ if (getuid() != 0) { switch (allowed) { case ROOT_ONLY: /* Already checked above */ fprintf(stderr, "%s: Only root is allowed to run the X server\n", argv[0]); exit(1); break; case CONSOLE_ONLY: /* Some of stdin / stdout / stderr maybe redirected to a file */ for (i = STDIN_FILENO; i <= STDERR_FILENO; i++) { if (on_console(i)) break; } if (i > STDERR_FILENO) { fprintf(stderr, "%s: Only console users are allowed to run the X server\n", argv[0]); exit(1); } break; case ANYBODY: break; } } #ifdef WITH_LIBDRM /* Detect if we need root rights, except when overridden by the config */ if (needs_root_rights == -1) { for (i = 0; i < 16; i++) { snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, i); fd = open(buf, O_RDWR); if (fd == -1) continue; total_cards++; memset(&res, 0, sizeof(struct drm_mode_card_res)); r = ioctl(fd, DRM_IOCTL_MODE_GETRESOURCES, &res); if (r == 0) kms_cards++; close(fd); } } #endif /* If we've found cards, and all cards support kms, drop root rights */ if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) { gid_t realgid = getgid(); uid_t realuid = getuid(); if (setresgid(-1, realgid, realgid) != 0) { fprintf(stderr, "%s: Could not drop setgid privileges: %s\n", progname, strerror(errno)); exit(1); } if (setresuid(-1, realuid, realuid) != 0) { fprintf(stderr, "%s: Could not drop setuid privileges: %s\n", progname, strerror(errno)); exit(1); } } snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR); /* Check if the server is executable by our real uid */ if (access(buf, X_OK) != 0) { fprintf(stderr, "%s: Missing execute permissions for %s: %s\n", progname, buf, strerror(errno)); exit(1); } argv[0] = buf; if (getuid() == geteuid()) (void) execv(argv[0], argv); else (void) execve(argv[0], argv, empty_envp); fprintf(stderr, "%s: Failed to execute %s: %s\n", progname, buf, strerror(errno)); exit(1); } xorg-server-21.1.16/hw/xfree86/xorgconf.cpp0000644000175000017500000004054214757411105014076 # # Copyright (c) 1994-1998 by The XFree86 Project, Inc. # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # 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 XFREE86 PROJECT 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 XFree86 Project 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 # XFree86 Project. # # $XConsortium: XF86Conf.cpp /main/22 1996/10/23 11:43:51 kaleb $ # ********************************************************************** # This is a sample configuration file only, intended to illustrate # what a config file might look like. Refer to the xorg.conf(__filemansuffix__) # man page for details about the format of this file. # ********************************************************************** # The ordering of sections is not important in XFree86 4.0 and later, # nor in any Xorg release. # ********************************************************************** # Files section. This allows default font and module paths to be set # ********************************************************************** Section "Files" # Multiple FontPath entries are allowed (which are concatenated together), # as well as specifying multiple comma-separated entries in one FontPath # command (or a combination of both methods). # The default path is shown here. # FontPath DEFAULTFONTPATH # ModulePath can be used to set a search path for the X server modules. # The default path is shown here. # ModulePath MODULEPATH EndSection # ********************************************************************** # Module section -- this is an optional section which is used to specify # which run-time loadable modules to load when the X server starts up. # ********************************************************************** Section "Module" # This loads the DBE extension module. Load "dbe" # This loads the miscellaneous extensions module, and disables # initialisation of the XFree86-DGA extension within that module. SubSection "extmod" Option "omit xfree86-dga" EndSubSection EndSection # ********************************************************************** # Server flags section. This contains various server-wide Options. # ********************************************************************** Section "ServerFlags" # Uncomment this to disable the VT switch sequence # (where n is 1 through 12). This allows clients to receive these key # events. # Option "DontVTSwitch" # Uncomment this to disable the server abort sequence # This allows clients to receive this key event. # Option "DontZap" "true" # Uncomment this to disable the / mode switching # sequences. This allows clients to receive these key events. # Option "DontZoom" # Uncomment this to disable tuning with the xvidtune client. With # it the client can still run and fetch card and monitor attributes, # but it will not be allowed to change them. If it tries it will # receive a protocol error. # Option "DisableVidModeExtension" # Uncomment this to enable the use of a non-local xvidtune client. # Option "AllowNonLocalXvidtune" # Set the basic blanking screen saver timeout. Option "BlankTime" "10" # 10 minutes # Set the DPMS timeouts. These are set here because they are global # rather than screen-specific. These settings alone don't enable DPMS. # It is enabled per-screen (or per-monitor), and even then only when # the driver supports it. Option "StandbyTime" "10" # 10 minutes Option "SuspendTime" "10" # 10 minutes Option "OffTime" "10" # 10 minutes EndSection # ********************************************************************** # Input devices # ********************************************************************** # ********************************************************************** # Core keyboard's InputDevice section # ********************************************************************** Section "InputDevice" Identifier "Keyboard1" Driver "kbd" # Set the keyboard auto repeat parameters. Not all platforms implement # this. Option "AutoRepeat" "500 5" # Specify which keyboard LEDs can be user-controlled (eg, with xset(1)). # Option "Xleds" "1 2 3" # To customise the XKB settings to suit your keyboard, modify the # lines below (which are the defaults). For example, for a European # keyboard, you will probably want to use one of: # # Option "XkbModel" "pc102" # Option "XkbModel" "pc105" # # If you have a Microsoft Natural keyboard, you can use: # # Option "XkbModel" "microsoft" # # If you have a US "windows" keyboard you will want: # # Option "XkbModel" "pc104" # # Then to change the language, change the Layout setting. # For example, a german layout can be obtained with: # # Option "XkbLayout" "de" # # or: # # Option "XkbLayout" "de" # Option "XkbVariant" "nodeadkeys" # # If you'd like to switch the positions of your capslock and # control keys, use: # # Option "XkbOptions" "ctrl:swapcaps" # These are the default XKB settings for xorg # # Option "XkbRules" "xorg" # Option "XkbModel" "pc105" # Option "XkbLayout" "us" # Option "XkbVariant" "" # Option "XkbOptions" "" EndSection # ********************************************************************** # Core Pointer's InputDevice section # ********************************************************************** Section "InputDevice" # Identifier and driver Identifier "Mouse1" Driver "mouse" # The mouse protocol and device. The device is normally set to /dev/mouse, # which is usually a symbolic link to the real device. Option "Protocol" "Microsoft" Option "Device" "/dev/mouse" # On platforms where PnP mouse detection is supported the following # protocol setting can be used when using a newer PnP mouse: # Option "Protocol" "Auto" # When using mouse connected to a PS/2 port (aka "MousePort"), set the # the protocol as follows. On some platforms some other settings may # be available. # Option "Protocol" "PS/2" # Baudrate and SampleRate are only for some older Logitech mice. In # almost every case these lines should be omitted. # Option "BaudRate" "9600" # Option "SampleRate" "150" # Emulate3Buttons is an option for 2-button mice # Emulate3Timeout is the timeout in milliseconds (default is 50ms) # Option "Emulate3Buttons" # Option "Emulate3Timeout" "50" # ChordMiddle is an option for some 3-button Logitech mice, or any # 3-button mouse where the middle button generates left+right button # events. # Option "ChordMiddle" EndSection Section "InputDevice" Identifier "Mouse2" Driver "mouse" Option "Protocol" "MouseMan" Option "Device" "/dev/mouse2" EndSection # Some examples of extended input devices # Section "InputDevice" # Identifier "spaceball" # Driver "magellan" # Option "Device" "/dev/cua0" # EndSection # # Section "InputDevice" # Identifier "spaceball2" # Driver "spaceorb" # Option "Device" "/dev/cua0" # EndSection # # Section "InputDevice" # Identifier "touchscreen0" # Driver "microtouch" # Option "Device" "/dev/ttyS0" # Option "MinX" "1412" # Option "MaxX" "15184" # Option "MinY" "15372" # Option "MaxY" "1230" # Option "ScreenNumber" "0" # Option "ReportingMode" "Scaled" # Option "ButtonNumber" "1" # Option "SendCoreEvents" # EndSection # # Section "InputDevice" # Identifier "touchscreen1" # Driver "elo2300" # Option "Device" "/dev/ttyS0" # Option "MinX" "231" # Option "MaxX" "3868" # Option "MinY" "3858" # Option "MaxY" "272" # Option "ScreenNumber" "0" # Option "ReportingMode" "Scaled" # Option "ButtonThreshold" "17" # Option "ButtonNumber" "1" # Option "SendCoreEvents" # EndSection # ********************************************************************** # Monitor section # ********************************************************************** # Any number of monitor sections may be present Section "Monitor" # The identifier line must be present. Identifier "Generic Monitor" # HorizSync is in kHz unless units are specified. # HorizSync may be a comma separated list of discrete values, or a # comma separated list of ranges of values. # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S # USER MANUAL FOR THE CORRECT NUMBERS. # HorizSync 31.5 # typical for a single frequency fixed-sync monitor # HorizSync 30-64 # multisync # HorizSync 31.5, 35.2 # multiple fixed sync frequencies # HorizSync 15-25, 30-50 # multiple ranges of sync frequencies # VertRefresh is in Hz unless units are specified. # VertRefresh may be a comma separated list of discrete values, or a # comma separated list of ranges of values. # NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S # USER MANUAL FOR THE CORRECT NUMBERS. # VertRefresh 60 # typical for a single frequency fixed-sync monitor # VertRefresh 50-100 # multisync # VertRefresh 60, 65 # multiple fixed sync frequencies # VertRefresh 40-50, 80-100 # multiple ranges of sync frequencies # Modes can be specified in two formats. A compact one-line format, or # a multi-line format. # A generic VGA 640x480 mode (hsync = 31.5kHz, refresh = 60Hz) # These two are equivalent # ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525 Mode "640x480" DotClock 25.175 HTimings 640 664 760 800 VTimings 480 491 493 525 EndMode # These two are equivalent # ModeLine "1024x768i" 45 1024 1048 1208 1264 768 776 784 817 Interlace # Mode "1024x768i" # DotClock 45 # HTimings 1024 1048 1208 1264 # VTimings 768 776 784 817 # Flags "Interlace" # EndMode # If a monitor has DPMS support, that can be indicated here. This will # enable DPMS when the monitor is used with drivers that support it. # Option "dpms" # If a monitor requires that the sync signals be superimposed on the # green signal, the following option will enable this when used with # drivers that support it. Only a relatively small range of hardware # (and drivers) actually support this. # Option "sync on green" EndSection # ********************************************************************** # Graphics device section # ********************************************************************** # Any number of graphics device sections may be present Section "Device" # The Identifier must be present. Identifier "Generic VESA" # The Driver line must be present. When using run-time loadable driver # modules, this line instructs the server to load the specified driver # module. Even when not using loadable driver modules, this line # indicates which driver should interpret the information in this section. Driver "vesa" # The chipset line is optional in most cases. It can be used to override # the driver's chipset detection, and should not normally be specified. # Chipset "generic" # Various other lines can be specified to override the driver's automatic # detection code. In most cases they are not needed. # VideoRam 256 # Clocks 25.2 28.3 # The BusID line is used to specify which of possibly multiple devices # this section is intended for. When this line isn't present, a device # section can only match up with the primary video device. For PCI # devices a line like the following could be used. This line should not # normally be included unless there is more than one video device # intalled. # BusID "PCI:0:10:0" # Various option lines can be added here as required. Some options # are more appropriate in Screen sections, Display subsections or even # Monitor sections. # Option "hw cursor" "off" EndSection Section "Device" Identifier "any supported Trident chip" Driver "trident" EndSection Section "Device" Identifier "MGA Millennium I" Driver "mga" Option "hw cursor" "off" BusID "PCI:0:10:0" EndSection Section "Device" Identifier "MGA G200 AGP" Driver "mga" BusID "PCI:1:0:0" Option "pci retry" EndSection # ********************************************************************** # Screen sections. # ********************************************************************** # Any number of screen sections may be present. Each describes # the configuration of a single screen. A single specific screen section # may be specified from the X server command line with the "-screen" # option. Section "Screen" # The Identifier, Device and Monitor lines must be present Identifier "Screen 1" Device "Generic VESA" Monitor "Generic Monitor" # The favoured Depth and/or Bpp may be specified here DefaultDepth 8 SubSection "Display" Depth 8 Modes "640x480" ViewPort 0 0 Virtual 800 600 EndSubsection SubSection "Display" Depth 4 Modes "640x480" EndSubSection SubSection "Display" Depth 1 Modes "640x480" EndSubSection EndSection Section "Screen" Identifier "Screen MGA1" Device "MGA Millennium I" Monitor "Generic Monitor" Option "no accel" DefaultDepth 16 # DefaultDepth 24 SubSection "Display" Depth 8 Modes "1280x1024" Option "rgb bits" "8" Visual "StaticColor" EndSubSection SubSection "Display" Depth 16 Modes "1280x1024" EndSubSection SubSection "Display" Depth 24 Modes "1280x1024" EndSubSection EndSection Section "Screen" Identifier "Screen MGA2" Device "MGA G200 AGP" Monitor "Generic Monitor" DefaultDepth 8 SubSection "Display" Depth 8 Modes "1280x1024" Option "rgb bits" "8" Visual "StaticColor" EndSubSection EndSection # ********************************************************************** # ServerLayout sections. # ********************************************************************** # Any number of ServerLayout sections may be present. Each describes # the way multiple screens are organised. A specific ServerLayout # section may be specified from the X server command line with the # "-layout" option. In the absence of this, the first section is used. # When now ServerLayout section is present, the first Screen section # is used alone. Section "ServerLayout" # The Identifier line must be present Identifier "Main Layout" # Each Screen line specifies a Screen section name, and optionally # the relative position of other screens. The four names after # primary screen name are the screens to the top, bottom, left and right # of the primary screen. In this example, screen 2 is located to the # right of screen 1. Screen "Screen MGA 1" "" "" "" "Screen MGA 2" Screen "Screen MGA 2" "" "" "Screen MGA 1" "" # Each InputDevice line specifies an InputDevice section name and # optionally some options to specify the way the device is to be # used. Those options include "CorePointer", "CoreKeyboard" and # "SendCoreEvents". In this example, "Mouse1" is the core pointer, # and "Mouse2" is an extended input device that also generates core # pointer events (i.e., both mice will move the standard pointer). InputDevice "Mouse1" "CorePointer" InputDevice "Mouse2" "SendCoreEvents" InputDevice "Keyboard1" "CoreKeyboard" EndSection Section "ServerLayout" Identifier "another layout" Screen "Screen 1" Screen "Screen MGA 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection Section "ServerLayout" Identifier "simple layout" Screen "Screen 1" InputDevice "Mouse1" "CorePointer" InputDevice "Keyboard1" "CoreKeyboard" EndSection xorg-server-21.1.16/hw/xfree86/sdksyms.sh0000755000175000017500000002044314757411105013577 #!/bin/sh cat > sdksyms.c << EOF /* This file is automatically generated by sdksyms.sh. */ #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #ifdef HAVE_XORG_CONFIG_H #include #endif /* These must be included first */ #include "misc.h" #include "miscstruct.h" /* render/Makefile.am */ #include "picture.h" #include "mipict.h" #include "glyphstr.h" #include "picturestr.h" /* fb/Makefile.am */ #include "fb.h" #include "fbrop.h" #include "fboverlay.h" #include "fbpict.h" /* wfb is still a module #include "wfbrename.h" */ /* miext/shadow/Makefile.am -- module */ /* #include "shadow.h" */ /* miext/damage/Makefile.am */ #include "damage.h" #include "damagestr.h" /* miext/sync/Makefile.am */ #include "misync.h" #include "misyncstr.h" #if HAVE_XSHMFENCE #include "misyncshm.h" #endif /* Xext/Makefile.am -- half is module, half is builtin */ #ifdef XV #include "xvdix.h" #include "xvmcext.h" #endif #include "geext.h" #ifdef MITSHM #include "shmint.h" #endif #include "syncsdk.h" #ifdef XINERAMA # include "panoramiXsrv.h" # include "panoramiX.h" #endif /* glx/Makefile.am */ #ifdef GLX #include "vndserver.h" #endif /* hw/xfree86/int10/Makefile.am -- module */ /* #include "xf86int10.h" #include "vbe.h" #include "vbeModes.h" */ /* hw/xfree86/i2c/Makefile.am -- "mostly" modules */ #include "xf86i2c.h" /* #include "bt829.h" #include "fi1236.h" #include "msp3430.h" #include "tda8425.h" #include "tda9850.h" #include "tda9885.h" #include "uda1380.h" #include "i2c_def.h" */ /* hw/xfree86/modes/Makefile.am */ #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86RandR12.h" /* #include "xf86Rename.h" */ /* hw/xfree86/ddc/Makefile.am */ #include "edid.h" #include "xf86DDC.h" /* hw/xfree86/dri2/Makefile.am -- module */ #ifdef DRI2 # include "dri2.h" #endif # include "dri3.h" /* hw/xfree86/vgahw/Makefile.am -- module */ /* #include "vgaHW.h" */ /* hw/xfree86/fbdevhw/Makefile.am -- module */ /* #include "fbdevhw.h" */ /* hw/xfree86/common/Makefile.am */ #include "compiler.h" #include "xf86.h" #include "xf86Module.h" #include "xf86Opt.h" #ifdef XSERVER_LIBPCIACCESS #include "xf86VGAarbiter.h" #endif #include "xf86Priv.h" #include "xf86Privstr.h" #include "xf86cmap.h" #include "xf86fbman.h" #include "xf86str.h" #include "xf86Xinput.h" #include "xisb.h" #ifdef XV # include "xf86xv.h" # include "xf86xvmc.h" # include "xf86xvpriv.h" #endif #include "xorgVersion.h" #if defined(__sparc__) || defined(__sparc) # include "xf86sbusBus.h" #endif /* hw/xfree86/ramdac/Makefile.am */ #include "xf86Cursor.h" /* hw/xfree86/shadowfb/Makefile.am -- module */ /* #include "shadowfb.h" */ /* hw/xfree86/os-support/solaris/Makefile.am */ #if defined(sun386) # include "agpgart.h" #endif /* hw/xfree86/os-support/Makefile.am */ #include "xf86_OSproc.h" #include "xf86_OSlib.h" /* hw/xfree86/os-support/bus/Makefile.am */ #ifdef XSERVER_LIBPCIACCESS # include "xf86Pci.h" #endif #if defined(__sparc__) || defined(__sparc) # include "xf86Sbus.h" #endif /* hw/xfree86/parser/Makefile.am */ #include "xf86Parser.h" #include "xf86Optrec.h" /* hw/xfree86/dri/Makefile.am -- module */ #ifdef XF86DRI # include "dri.h" # include "sarea.h" # include "dristruct.h" #endif /* mi/Makefile.am */ #include "micmap.h" #include "miline.h" #include "mipointer.h" #include "mi.h" #include "migc.h" #include "mipointrst.h" #include "mizerarc.h" #include "micoord.h" #include "mifillarc.h" #include "mistruct.h" #include "mioverlay.h" /* randr/Makefile.am */ #include "randrstr.h" #include "rrtransform.h" /* dbe/Makefile.am -- module */ #ifdef DBE #include "dbestruct.h" #endif /* exa/Makefile.am -- module */ /* #include "exa.h" */ #ifdef COMPOSITE #include "compositeext.h" #endif /* xfixes/Makefile.am */ #include "xfixes.h" /* include/Makefile.am */ #include "XIstubs.h" #include "Xprintf.h" #include "closestr.h" #include "closure.h" #include "colormap.h" #include "colormapst.h" #include "hotplug.h" #include "client.h" #include "cursor.h" #include "cursorstr.h" #include "dix.h" #include "dixaccess.h" #include "dixevents.h" #define _FONTPROTO_H #include "dixfont.h" #include "dixfontstr.h" #include "dixgrabs.h" #include "dixstruct.h" #include "exevents.h" #include "extension.h" #include "extnsionst.h" #include "fourcc.h" #include "gc.h" #include "gcstruct.h" #include "globals.h" #include "input.h" #include "inputstr.h" /* already included */ /* #include "misc.h" #include "miscstruct.h" */ #include "opaque.h" #include "os.h" #include "pixmap.h" #include "pixmapstr.h" #include "privates.h" #include "property.h" #include "propertyst.h" #include "ptrveloc.h" #include "region.h" #include "regionstr.h" #include "registry.h" #include "resource.h" #include "rgb.h" #include "screenint.h" #include "scrnintstr.h" #include "selection.h" #include "servermd.h" #include "validate.h" #include "window.h" #include "windowstr.h" #include "xace.h" #include "xkbfile.h" #include "xkbsrv.h" #include "xkbstr.h" #include "xkbrules.h" #include "xserver-properties.h" EOF topdir=$(readlink -f $1) shift LC_ALL=C export LC_ALL ${CPP:-cpp} "$@" sdksyms.c > /dev/null || exit $? ${CPP:-cpp} "$@" sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' function basename(file) { sub(".*/", "", file) return file } BEGIN { sdk = 0; print("/*"); print(" * These symbols are referenced to ensure they"); print(" * will be available in the X Server binary."); print(" */"); print("_X_HIDDEN void *xorg_symbols[] = {"); printf("sdksyms.c:") > "sdksyms.dep"; } /^# [0-9]+ "/ { # Match preprocessor linemarkers which have the form: # # linenum "filename" flags # # Only process text for sdk exports where the linemarker filename has a # relative path, or an absolute path matching $top_srcdir. # # canonicalize filename if ($3 in canonicalized) { c = canonicalized[$3] } else { cmd = "readlink -f " $3 cmd | getline c close(cmd) canonicalized[$3] = c } # note that index() starts at 1; 0 means no match. sdk = $3 !~ /^"\// || index(c, topdir) == 1; if (sdk && $3 ~ /\.h"$/) { # remove quotes gsub(/"/, "", $3); line = $2; header = basename($3); if (! headers[$3]) { printf(" \\\n %s", $3) >> "sdksyms.dep"; headers[$3] = 1; } } next; } /^extern[ ]/ { if (sdk) { n = 3; # skip line numbers GCC 5 adds before __attribute__ while ($n == "" || $0 ~ /^# [0-9]+ "/) { getline; n = 1; } # skip attribute, if any while ($n ~ /^(__attribute__|__global)/ || # skip modifiers, if any $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ || # skip pointer $n ~ /^[a-zA-Z0-9_]*\*$/) { n++; # skip line numbers GCC 5 adds after __attribute__ while ($n == "" || $0 ~ /^# [0-9]+ "/) { getline; n = 1; } } # hack: pid_t becomes __pid_t on NetBSD, same for uint32_t -> __uint32_t. # GCC 5 inserts additional lines around this. if (($1 == "__pid_t" || $1 == "__uint32_t") && NF == 1) { getline; n++; # skip line numbers GCC 5 adds (after typedef return type?) while ($n == "" || $0 ~ /^# [0-9]+ "/) { getline; n = 1; } } # type specifier may not be set, as in # extern _X_EXPORT unsigned name(...) if ($n !~ /[^a-zA-Z0-9_]/) n++; # go back if we are at the parameter list already if ($n ~ /^[(]([^*].*)?$/) n--; # match # extern _X_EXPORT type (* name[])(...) if ($n ~ /^[^a-zA-Z0-9_]+$/) n++; # match # extern _X_EXPORT const name *const ... if ($n ~ /^([^a-zA-Z0-9_]+)?const$/) n++; # actual name may be in the next line, as in # extern _X_EXPORT type # possibly ending with a * # name(...) if ($n == "" || $n ~ /^\*+$/) { getline; n = 1; # indent may have inserted a blank link if ($0 == "") getline; } # dont modify $0 or $n symbol = $n; # remove starting non word chars sub(/^[^a-zA-Z0-9_]+/, "",symbol); # remove from first non word to end of line sub(/[^a-zA-Z0-9_].*/, "", symbol); #print; if (symbol != "") printf(" (void *) &%-50s /* %s:%s */\n", symbol ",", header, line); } } { line++; } END { print("};"); print("") >> "sdksyms.dep"; }' > _sdksyms.c STATUS=$? cat _sdksyms.c >> sdksyms.c rm _sdksyms.c [ $? != 0 ] && exit $? exit $STATUS xorg-server-21.1.16/hw/xfree86/utils/0000755000175000017500000000000014757411135012763 5xorg-server-21.1.16/hw/xfree86/utils/Makefile.am0000644000175000017500000000003014757411105014725 SUBDIRS = \ gtf \ man xorg-server-21.1.16/hw/xfree86/utils/Makefile.in0000644000175000017500000006201714757411115014754 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/utils ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ gtf \ man all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/utils/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/utils/gtf/0000755000175000017500000000000014757411135013543 5xorg-server-21.1.16/hw/xfree86/utils/gtf/Makefile.am0000644000175000017500000000234414757411105015517 # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. # bin_PROGRAMS = gtf gtf_SOURCES = gtf.c gtf_CFLAGS = $(XORG_CFLAGS) gtf_LDADD = -lm xorg-server-21.1.16/hw/xfree86/utils/gtf/Makefile.in0000644000175000017500000007166114757411115015541 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. # # 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, and to permit persons to whom the # Software is furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice (including the next # paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. # VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = gtf$(EXEEXT) subdir = hw/xfree86/utils/gtf ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_gtf_OBJECTS = gtf-gtf.$(OBJEXT) gtf_OBJECTS = $(am_gtf_OBJECTS) gtf_DEPENDENCIES = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = gtf_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(gtf_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/gtf-gtf.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(gtf_SOURCES) DIST_SOURCES = $(gtf_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ gtf_SOURCES = gtf.c gtf_CFLAGS = $(XORG_CFLAGS) gtf_LDADD = -lm all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/gtf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/utils/gtf/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list gtf$(EXEEXT): $(gtf_OBJECTS) $(gtf_DEPENDENCIES) $(EXTRA_gtf_DEPENDENCIES) @rm -f gtf$(EXEEXT) $(AM_V_CCLD)$(gtf_LINK) $(gtf_OBJECTS) $(gtf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtf-gtf.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< gtf-gtf.o: gtf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtf_CFLAGS) $(CFLAGS) -MT gtf-gtf.o -MD -MP -MF $(DEPDIR)/gtf-gtf.Tpo -c -o gtf-gtf.o `test -f 'gtf.c' || echo '$(srcdir)/'`gtf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtf-gtf.Tpo $(DEPDIR)/gtf-gtf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtf.c' object='gtf-gtf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtf_CFLAGS) $(CFLAGS) -c -o gtf-gtf.o `test -f 'gtf.c' || echo '$(srcdir)/'`gtf.c gtf-gtf.obj: gtf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtf_CFLAGS) $(CFLAGS) -MT gtf-gtf.obj -MD -MP -MF $(DEPDIR)/gtf-gtf.Tpo -c -o gtf-gtf.obj `if test -f 'gtf.c'; then $(CYGPATH_W) 'gtf.c'; else $(CYGPATH_W) '$(srcdir)/gtf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gtf-gtf.Tpo $(DEPDIR)/gtf-gtf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtf.c' object='gtf-gtf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gtf_CFLAGS) $(CFLAGS) -c -o gtf-gtf.obj `if test -f 'gtf.c'; then $(CYGPATH_W) 'gtf.c'; else $(CYGPATH_W) '$(srcdir)/gtf.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/gtf-gtf.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/gtf-gtf.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/utils/gtf/gtf.c0000644000175000017500000005270614757411105014416 /* gtf.c Generate mode timings using the GTF Timing Standard * * gcc gtf.c -o gtf -lm -Wall * * Copyright (c) 2001, Andy Ritger aritger@nvidia.com * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * o Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * o Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer * in the documentation and/or other materials provided with the * distribution. * o Neither the name of NVIDIA nor the names of its contributors * may be used to endorse or promote products derived from this * software without specific prior written permission. * * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * * * This program is based on the Generalized Timing Formula(GTF TM) * Standard Version: 1.0, Revision: 1.0 * * The GTF Document contains the following Copyright information: * * Copyright (c) 1994, 1995, 1996 - Video Electronics Standards * Association. Duplication of this document within VESA member * companies for review purposes is permitted. All other rights * reserved. * * While every precaution has been taken in the preparation * of this standard, the Video Electronics Standards Association and * its contributors assume no responsibility for errors or omissions, * and make no warranties, expressed or implied, of functionality * of suitability for any purpose. The sample code contained within * this standard may be used without restriction. * * * * The GTF EXCEL(TM) SPREADSHEET, a sample (and the definitive) * implementation of the GTF Timing Standard, is available at: * * ftp://ftp.vesa.org/pub/GTF/GTF_V1R1.xls * * * * This program takes a desired resolution and vertical refresh rate, * and computes mode timings according to the GTF Timing Standard. * These mode timings can then be formatted as an XServer modeline * or a mode description for use by fbset(8). * * * * NOTES: * * The GTF allows for computation of "margins" (the visible border * surrounding the addressable video); on most non-overscan type * systems, the margin period is zero. I've implemented the margin * computations but not enabled it because 1) I don't really have * any experience with this, and 2) neither XServer modelines nor * fbset fb.modes provide an obvious way for margin timings to be * included in their mode descriptions (needs more investigation). * * The GTF provides for computation of interlaced mode timings; * I've implemented the computations but not enabled them, yet. * I should probably enable and test this at some point. * * * * TODO: * * o Add support for interlaced modes. * * o Implement the other portions of the GTF: compute mode timings * given either the desired pixel clock or the desired horizontal * frequency. * * o It would be nice if this were more general purpose to do things * outside the scope of the GTF: like generate double scan mode * timings, for example. * * o Printing digits to the right of the decimal point when the * digits are 0 annoys me. * * o Error checking. * */ #ifdef HAVE_XORG_CONFIG_H #include #endif #include #include #include #include #define MARGIN_PERCENT 1.8 /* % of active vertical image */ #define CELL_GRAN 8.0 /* assumed character cell granularity */ #define MIN_PORCH 1 /* minimum front porch */ #define V_SYNC_RQD 3 /* width of vsync in lines */ #define H_SYNC_PERCENT 8.0 /* width of hsync as % of total line */ #define MIN_VSYNC_PLUS_BP 550.0 /* min time of vsync + back porch (microsec) */ #define M 600.0 /* blanking formula gradient */ #define C 40.0 /* blanking formula offset */ #define K 128.0 /* blanking formula scaling factor */ #define J 20.0 /* blanking formula scaling factor */ /* C' and M' are part of the Blanking Duty Cycle computation */ #define C_PRIME (((C - J) * K/256.0) + J) #define M_PRIME (K/256.0 * M) /* struct definitions */ typedef struct __mode { int hr, hss, hse, hfl; int vr, vss, vse, vfl; float pclk, h_freq, v_freq; } mode; typedef struct __options { int x, y; int xorgmode, fbmode; float v_freq; } options; /* prototypes */ void print_value(int n, const char *name, float val); void print_xf86_mode(mode * m); void print_fb_mode(mode * m); mode *vert_refresh(int h_pixels, int v_lines, float freq, int interlaced, int margins); options *parse_command_line(int argc, char *argv[]); /* * print_value() - print the result of the named computation; this is * useful when comparing against the GTF EXCEL spreadsheet. */ int global_verbose = 0; void print_value(int n, const char *name, float val) { if (global_verbose) { printf("%2d: %-27s: %15f\n", n, name, val); } } /* print_xf86_mode() - print the XServer modeline, given mode timings. */ void print_xf86_mode(mode * m) { printf("\n"); printf(" # %dx%d @ %.2f Hz (GTF) hsync: %.2f kHz; pclk: %.2f MHz\n", m->hr, m->vr, m->v_freq, m->h_freq, m->pclk); printf(" Modeline \"%dx%d_%.2f\" %.2f" " %d %d %d %d" " %d %d %d %d" " -HSync +Vsync\n\n", m->hr, m->vr, m->v_freq, m->pclk, m->hr, m->hss, m->hse, m->hfl, m->vr, m->vss, m->vse, m->vfl); } /* * print_fb_mode() - print a mode description in fbset(8) format; * see the fb.modes(8) manpage. The timing description used in * this is rather odd; they use "left and right margin" to refer * to the portion of the hblank before and after the sync pulse * by conceptually wrapping the portion of the blank after the pulse * to infront of the visible region; ie: * * * Timing description I'm accustomed to: * * * * <--------1--------> <--2--> <--3--> <--4--> * _________ * |-------------------|_______| |_______ * * R SS SE FL * * 1: visible image * 2: blank before sync (aka front porch) * 3: sync pulse * 4: blank after sync (aka back porch) * R: Resolution * SS: Sync Start * SE: Sync End * FL: Frame Length * * * But the fb.modes format is: * * * <--4--> <--------1--------> <--2--> <--3--> * _________ * _______|-------------------|_______| | * * The fb.modes(8) manpage refers to <4> and <2> as the left and * right "margin" (as well as upper and lower margin in the vertical * direction) -- note that this has nothing to do with the term * "margin" used in the GTF Timing Standard. * * XXX always prints the 32 bit mode -- should I provide a command * line option to specify the bpp? It's simple enough for a user * to edit the mode description after it's generated. */ void print_fb_mode(mode * m) { printf("\n"); printf("mode \"%dx%d %.2fHz 32bit (GTF)\"\n", m->hr, m->vr, m->v_freq); printf(" # PCLK: %.2f MHz, H: %.2f kHz, V: %.2f Hz\n", m->pclk, m->h_freq, m->v_freq); printf(" geometry %d %d %d %d 32\n", m->hr, m->vr, m->hr, m->vr); printf(" timings %d %d %d %d %d %d %d\n", (int)lrint(1000000.0 / m->pclk), /* pixclock in picoseconds */ m->hfl - m->hse, /* left margin (in pixels) */ m->hss - m->hr, /* right margin (in pixels) */ m->vfl - m->vse, /* upper margin (in pixel lines) */ m->vss - m->vr, /* lower margin (in pixel lines) */ m->hse - m->hss, /* horizontal sync length (pixels) */ m->vse - m->vss); /* vert sync length (pixel lines) */ printf(" hsync low\n"); printf(" vsync high\n"); printf("endmode\n\n"); } /* * vert_refresh() - as defined by the GTF Timing Standard, compute the * Stage 1 Parameters using the vertical refresh frequency. In other * words: input a desired resolution and desired refresh rate, and * output the GTF mode timings. * * XXX All the code is in place to compute interlaced modes, but I don't * feel like testing it right now. * * XXX margin computations are implemented but not tested (nor used by * XServer of fbset mode descriptions, from what I can tell). */ mode * vert_refresh(int h_pixels, int v_lines, float freq, int interlaced, int margins) { float h_pixels_rnd; float v_lines_rnd; float v_field_rate_rqd; float top_margin; float bottom_margin; float interlace; float h_period_est; float vsync_plus_bp; float v_back_porch; float total_v_lines; float v_field_rate_est; float h_period; float v_field_rate; float v_frame_rate; float left_margin; float right_margin; float total_active_pixels; float ideal_duty_cycle; float h_blank; float total_pixels; float pixel_freq; float h_freq; float h_sync; float h_front_porch; float v_odd_front_porch_lines; mode *m = (mode *) malloc(sizeof(mode)); /* 1. In order to give correct results, the number of horizontal * pixels requested is first processed to ensure that it is divisible * by the character size, by rounding it to the nearest character * cell boundary: * * [H PIXELS RND] = ((ROUND([H PIXELS]/[CELL GRAN RND],0))*[CELLGRAN RND]) */ h_pixels_rnd = rint((float) h_pixels / CELL_GRAN) * CELL_GRAN; print_value(1, "[H PIXELS RND]", h_pixels_rnd); /* 2. If interlace is requested, the number of vertical lines assumed * by the calculation must be halved, as the computation calculates * the number of vertical lines per field. In either case, the * number of lines is rounded to the nearest integer. * * [V LINES RND] = IF([INT RQD?]="y", ROUND([V LINES]/2,0), * ROUND([V LINES],0)) */ v_lines_rnd = interlaced ? rint((float) v_lines) / 2.0 : rint((float) v_lines); print_value(2, "[V LINES RND]", v_lines_rnd); /* 3. Find the frame rate required: * * [V FIELD RATE RQD] = IF([INT RQD?]="y", [I/P FREQ RQD]*2, * [I/P FREQ RQD]) */ v_field_rate_rqd = interlaced ? (freq * 2.0) : (freq); print_value(3, "[V FIELD RATE RQD]", v_field_rate_rqd); /* 4. Find number of lines in Top margin: * * [TOP MARGIN (LINES)] = IF([MARGINS RQD?]="Y", * ROUND(([MARGIN%]/100*[V LINES RND]),0), * 0) */ top_margin = margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0); print_value(4, "[TOP MARGIN (LINES)]", top_margin); /* 5. Find number of lines in Bottom margin: * * [BOT MARGIN (LINES)] = IF([MARGINS RQD?]="Y", * ROUND(([MARGIN%]/100*[V LINES RND]),0), * 0) */ bottom_margin = margins ? rint(MARGIN_PERCENT / 100.0 * v_lines_rnd) : (0.0); print_value(5, "[BOT MARGIN (LINES)]", bottom_margin); /* 6. If interlace is required, then set variable [INTERLACE]=0.5: * * [INTERLACE]=(IF([INT RQD?]="y",0.5,0)) */ interlace = interlaced ? 0.5 : 0.0; print_value(6, "[INTERLACE]", interlace); /* 7. Estimate the Horizontal period * * [H PERIOD EST] = ((1/[V FIELD RATE RQD]) - [MIN VSYNC+BP]/1000000) / * ([V LINES RND] + (2*[TOP MARGIN (LINES)]) + * [MIN PORCH RND]+[INTERLACE]) * 1000000 */ h_period_est = (((1.0 / v_field_rate_rqd) - (MIN_VSYNC_PLUS_BP / 1000000.0)) / (v_lines_rnd + (2 * top_margin) + MIN_PORCH + interlace) * 1000000.0); print_value(7, "[H PERIOD EST]", h_period_est); /* 8. Find the number of lines in V sync + back porch: * * [V SYNC+BP] = ROUND(([MIN VSYNC+BP]/[H PERIOD EST]),0) */ vsync_plus_bp = rint(MIN_VSYNC_PLUS_BP / h_period_est); print_value(8, "[V SYNC+BP]", vsync_plus_bp); /* 9. Find the number of lines in V back porch alone: * * [V BACK PORCH] = [V SYNC+BP] - [V SYNC RND] * * XXX is "[V SYNC RND]" a typo? should be [V SYNC RQD]? */ v_back_porch = vsync_plus_bp - V_SYNC_RQD; print_value(9, "[V BACK PORCH]", v_back_porch); /* 10. Find the total number of lines in Vertical field period: * * [TOTAL V LINES] = [V LINES RND] + [TOP MARGIN (LINES)] + * [BOT MARGIN (LINES)] + [V SYNC+BP] + [INTERLACE] + * [MIN PORCH RND] */ total_v_lines = v_lines_rnd + top_margin + bottom_margin + vsync_plus_bp + interlace + MIN_PORCH; print_value(10, "[TOTAL V LINES]", total_v_lines); /* 11. Estimate the Vertical field frequency: * * [V FIELD RATE EST] = 1 / [H PERIOD EST] / [TOTAL V LINES] * 1000000 */ v_field_rate_est = 1.0 / h_period_est / total_v_lines * 1000000.0; print_value(11, "[V FIELD RATE EST]", v_field_rate_est); /* 12. Find the actual horizontal period: * * [H PERIOD] = [H PERIOD EST] / ([V FIELD RATE RQD] / [V FIELD RATE EST]) */ h_period = h_period_est / (v_field_rate_rqd / v_field_rate_est); print_value(12, "[H PERIOD]", h_period); /* 13. Find the actual Vertical field frequency: * * [V FIELD RATE] = 1 / [H PERIOD] / [TOTAL V LINES] * 1000000 */ v_field_rate = 1.0 / h_period / total_v_lines * 1000000.0; print_value(13, "[V FIELD RATE]", v_field_rate); /* 14. Find the Vertical frame frequency: * * [V FRAME RATE] = (IF([INT RQD?]="y", [V FIELD RATE]/2, [V FIELD RATE])) */ v_frame_rate = interlaced ? v_field_rate / 2.0 : v_field_rate; print_value(14, "[V FRAME RATE]", v_frame_rate); /* 15. Find number of pixels in left margin: * * [LEFT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y", * (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 / * [CELL GRAN RND]),0)) * [CELL GRAN RND], * 0)) */ left_margin = margins ? rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN : 0.0; print_value(15, "[LEFT MARGIN (PIXELS)]", left_margin); /* 16. Find number of pixels in right margin: * * [RIGHT MARGIN (PIXELS)] = (IF( [MARGINS RQD?]="Y", * (ROUND( ([H PIXELS RND] * [MARGIN%] / 100 / * [CELL GRAN RND]),0)) * [CELL GRAN RND], * 0)) */ right_margin = margins ? rint(h_pixels_rnd * MARGIN_PERCENT / 100.0 / CELL_GRAN) * CELL_GRAN : 0.0; print_value(16, "[RIGHT MARGIN (PIXELS)]", right_margin); /* 17. Find total number of active pixels in image and left and right * margins: * * [TOTAL ACTIVE PIXELS] = [H PIXELS RND] + [LEFT MARGIN (PIXELS)] + * [RIGHT MARGIN (PIXELS)] */ total_active_pixels = h_pixels_rnd + left_margin + right_margin; print_value(17, "[TOTAL ACTIVE PIXELS]", total_active_pixels); /* 18. Find the ideal blanking duty cycle from the blanking duty cycle * equation: * * [IDEAL DUTY CYCLE] = [C'] - ([M']*[H PERIOD]/1000) */ ideal_duty_cycle = C_PRIME - (M_PRIME * h_period / 1000.0); print_value(18, "[IDEAL DUTY CYCLE]", ideal_duty_cycle); /* 19. Find the number of pixels in the blanking time to the nearest * double character cell: * * [H BLANK (PIXELS)] = (ROUND(([TOTAL ACTIVE PIXELS] * * [IDEAL DUTY CYCLE] / * (100-[IDEAL DUTY CYCLE]) / * (2*[CELL GRAN RND])), 0)) * * (2*[CELL GRAN RND]) */ h_blank = rint(total_active_pixels * ideal_duty_cycle / (100.0 - ideal_duty_cycle) / (2.0 * CELL_GRAN)) * (2.0 * CELL_GRAN); print_value(19, "[H BLANK (PIXELS)]", h_blank); /* 20. Find total number of pixels: * * [TOTAL PIXELS] = [TOTAL ACTIVE PIXELS] + [H BLANK (PIXELS)] */ total_pixels = total_active_pixels + h_blank; print_value(20, "[TOTAL PIXELS]", total_pixels); /* 21. Find pixel clock frequency: * * [PIXEL FREQ] = [TOTAL PIXELS] / [H PERIOD] */ pixel_freq = total_pixels / h_period; print_value(21, "[PIXEL FREQ]", pixel_freq); /* 22. Find horizontal frequency: * * [H FREQ] = 1000 / [H PERIOD] */ h_freq = 1000.0 / h_period; print_value(22, "[H FREQ]", h_freq); /* Stage 1 computations are now complete; I should really pass the results to another function and do the Stage 2 computations, but I only need a few more values so I'll just append the computations here for now */ /* 17. Find the number of pixels in the horizontal sync period: * * [H SYNC (PIXELS)] =(ROUND(([H SYNC%] / 100 * [TOTAL PIXELS] / * [CELL GRAN RND]),0))*[CELL GRAN RND] */ h_sync = rint(H_SYNC_PERCENT / 100.0 * total_pixels / CELL_GRAN) * CELL_GRAN; print_value(17, "[H SYNC (PIXELS)]", h_sync); /* 18. Find the number of pixels in the horizontal front porch period: * * [H FRONT PORCH (PIXELS)] = ([H BLANK (PIXELS)]/2)-[H SYNC (PIXELS)] */ h_front_porch = (h_blank / 2.0) - h_sync; print_value(18, "[H FRONT PORCH (PIXELS)]", h_front_porch); /* 36. Find the number of lines in the odd front porch period: * * [V ODD FRONT PORCH(LINES)]=([MIN PORCH RND]+[INTERLACE]) */ v_odd_front_porch_lines = MIN_PORCH + interlace; print_value(36, "[V ODD FRONT PORCH(LINES)]", v_odd_front_porch_lines); /* finally, pack the results in the mode struct */ m->hr = (int) (h_pixels_rnd); m->hss = (int) (h_pixels_rnd + h_front_porch); m->hse = (int) (h_pixels_rnd + h_front_porch + h_sync); m->hfl = (int) (total_pixels); m->vr = (int) (v_lines_rnd); m->vss = (int) (v_lines_rnd + v_odd_front_porch_lines); m->vse = (int) (int) (v_lines_rnd + v_odd_front_porch_lines + V_SYNC_RQD); m->vfl = (int) (total_v_lines); m->pclk = pixel_freq; m->h_freq = h_freq; m->v_freq = freq; return m; } /* * parse_command_line() - parse the command line and return an * alloced structure containing the results. On error print usage * and return NULL. */ options * parse_command_line(int argc, char *argv[]) { int n; options *o = (options *) calloc(1, sizeof(options)); if (argc < 4) goto bad_option; o->x = atoi(argv[1]); o->y = atoi(argv[2]); o->v_freq = atof(argv[3]); /* XXX should check for errors in the above */ n = 4; while (n < argc) { if ((strcmp(argv[n], "-v") == 0) || (strcmp(argv[n], "--verbose") == 0)) { global_verbose = 1; } else if ((strcmp(argv[n], "-f") == 0) || (strcmp(argv[n], "--fbmode") == 0)) { o->fbmode = 1; } else if ((strcmp(argv[n], "-x") == 0) || (strcmp(argv[n], "--xorgmode") == 0) || (strcmp(argv[n], "--xf86mode") == 0)) { o->xorgmode = 1; } else { goto bad_option; } n++; } /* if neither xorgmode nor fbmode were requested, default to xorgmode */ if (!o->fbmode && !o->xorgmode) o->xorgmode = 1; return o; bad_option: fprintf(stderr, "\n"); fprintf(stderr, "usage: %s x y refresh [-v|--verbose] " "[-f|--fbmode] [-x|--xorgmode]\n", argv[0]); fprintf(stderr, "\n"); fprintf(stderr, " x : the desired horizontal " "resolution (required)\n"); fprintf(stderr, " y : the desired vertical " "resolution (required)\n"); fprintf(stderr, " refresh : the desired refresh " "rate (required)\n"); fprintf(stderr, " -v|--verbose : enable verbose printouts " "(traces each step of the computation)\n"); fprintf(stderr, " -f|--fbmode : output an fbset(8)-style mode " "description\n"); fprintf(stderr, " -x|--xorgmode : output an " __XSERVERNAME__ "-style mode " "description (this is the default\n" " if no mode description is requested)\n"); fprintf(stderr, "\n"); free(o); return NULL; } int main(int argc, char *argv[]) { mode *m; options *o; o = parse_command_line(argc, argv); if (!o) exit(1); m = vert_refresh(o->x, o->y, o->v_freq, 0, 0); if (!m) exit(1); if (o->xorgmode) print_xf86_mode(m); if (o->fbmode) print_fb_mode(m); free(m); return 0; } xorg-server-21.1.16/hw/xfree86/utils/man/0000755000175000017500000000000014757411135013536 5xorg-server-21.1.16/hw/xfree86/utils/man/Makefile.am0000644000175000017500000000006714757411105015512 include $(top_srcdir)/manpages.am appman_PRE = gtf.man xorg-server-21.1.16/hw/xfree86/utils/man/Makefile.in0000644000175000017500000006311214757411115015524 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xfree86/utils/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = gtf.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/utils/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/utils/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/utils/man/gtf.man0000644000175000017500000000236614757411105014737 .TH GTF 1 @vendorversion@ .SH NAME gtf - calculate VESA GTF mode lines .SH SYNOPSIS .B gtf .I h-resolution .I v-resolution .I refresh .RB [ \-v | \-\-verbose ] .RB [ \-f | \-\-fbmode ] .RB [ \-x | \-\-xorgmode ] .SH DESCRIPTION .I Gtf is a utility for calculating VESA GTF modes. Given the desired horizontal and vertical resolutions and refresh rate (in Hz), the parameters for a matching VESA GTF mode are printed out. Two output formats are supported: mode lines suitable for the Xorg .B xorg.conf(@filemansuffix@) file, and mode parameters suitable for the Linux .B fbset(8) utility. .SH OPTIONS .TP 8 .BR \-v | \-\-verbose Enable verbose printouts This shows a trace for each step of the computation. .TP 8 .BR \-x | \-\-xorgmode Print the mode parameters as Xorg-style mode lines. This is the default format. .TP 8 .BR \-f | \-\-fbset Print the mode parameters in a format suitable for .BR fbset(8) . .SH "SEE ALSO" xorg.conf(@filemansuffix@), cvt(@appmansuffix@) .SH AUTHOR Andy Ritger. .PP This program is based on the Generalized Timing Formula (GTF(TM)) Standard Version: 1.0, Revision: 1.0. The GTF Excel(TM) spreadsheet, a sample (and the definitive) implementation of the GTF Timing Standard is available at . xorg-server-21.1.16/hw/xfree86/man/0000755000175000017500000000000014757411135012376 5xorg-server-21.1.16/hw/xfree86/man/Makefile.am0000644000175000017500000000035714757411105014354 include $(top_srcdir)/manpages.am appman_PRE = Xorg.man fileman_PRE = xorg.conf.man xorg.conf.d.man if SUID_WRAPPER appman_PRE += Xorg.wrap.man fileman_PRE += Xwrapper.config.man else EXTRA_DIST += Xorg.wrap.man Xwrapper.config.man endif xorg-server-21.1.16/hw/xfree86/man/Makefile.in0000644000175000017500000006350314757411115014370 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @SUID_WRAPPER_TRUE@am__append_1 = Xorg.wrap.man @SUID_WRAPPER_TRUE@am__append_2 = Xwrapper.config.man @SUID_WRAPPER_FALSE@am__append_3 = Xorg.wrap.man Xwrapper.config.man subdir = hw/xfree86/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) \ $(am__append_3) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xorg.man $(am__append_1) fileman_PRE = xorg.conf.man xorg.conf.d.man $(am__append_2) all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xfree86/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xfree86/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xfree86/man/Xorg.man0000644000175000017500000004652614757411105013744 .\" $XdotOrg: xserver/xorg/hw/xfree86/doc/man/Xorg.man.pre,v 1.3 2005/07/04 18:41:01 ajax Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH Xorg @appmansuffix@ @vendorversion@ .SH NAME Xorg - X11R7 X server .SH SYNOPSIS .B Xorg .RI [\fB:\fP display ] .RI [ option .IR ... ] .SH DESCRIPTION .B Xorg is a full featured X server that was originally designed for UNIX and UNIX-like operating systems running on Intel x86 hardware. It now runs on a wider range of hardware and OS platforms. .PP This work was derived by the X.Org Foundation from the XFree86 Project's .I "XFree86\ 4.4rc2" release. The XFree86 release was originally derived from .I "X386\ 1.2" by Thomas Roell which was contributed to X11R5 by Snitily Graphics Consulting Service. .SH PLATFORMS .PP .B Xorg operates under a wide range of operating systems and hardware platforms. The Intel x86 (IA32) architecture is the most widely supported hardware platform. Other hardware platforms include Compaq Alpha, Intel IA64, AMD64, SPARC and PowerPC. The most widely supported operating systems are the free/OpenSource UNIX-like systems such as Linux, FreeBSD, NetBSD, OpenBSD, and Solaris. Commercial UNIX operating systems such as UnixWare are also supported. Other supported operating systems include GNU Hurd. Mac OS X is supported with the Xquartz(@appmansuffix@) X server. Win32/Cygwin is supported with the XWin(@appmansuffix@) X server. .PP .SH "NETWORK CONNECTIONS" .B Xorg supports connections made using the following reliable byte-streams: .TP 4 .I "Local" On most platforms, the "Local" connection type is a UNIX-domain socket. On some System V platforms, the "local" connection types also include STREAMS pipes, named pipes, and some other mechanisms. See the "LOCAL CONNECTIONS" section of X(@miscmansuffix@) for details. .TP 4 .I TCP/IP .B Xorg listens on port .RI 6000+ n , where .I n is the display number. This connection type is usually disabled by default, but may be enabled with the .B \-listen option (see the Xserver(1) man page for details). .SH OPTIONS .B Xorg supports several mechanisms for supplying/obtaining configuration and run-time parameters: command line options, environment variables, the xorg.conf(@filemansuffix@) configuration files, auto-detection, and fallback defaults. When the same information is supplied in more than one way, the highest precedence mechanism is used. The list of mechanisms is ordered from highest precedence to lowest. Note that not all parameters can be supplied via all methods. The available command line options and environment variables (and some defaults) are described here and in the Xserver(@appmansuffix@) manual page. Most configuration file parameters, with their defaults, are described in the xorg.conf(@filemansuffix@) manual page. Driver and module specific configuration parameters are described in the relevant driver or module manual page. .PP In addition to the normal server options described in the Xserver(@appmansuffix@) manual page, .B Xorg accepts the following command line switches: .TP 8 .BI vt XX .I XX specifies the Virtual Terminal device number which .B Xorg will use. Without this option, .B Xorg will pick the first available Virtual Terminal that it can locate. This option applies only to platforms that have virtual terminal support, such as Linux, BSD, OpenSolaris, SVR3, and SVR4. .TP .B \-allowMouseOpenFail Allow the server to start up even if the mouse device can't be opened or initialised. This is equivalent to the .B AllowMouseOpenFail xorg.conf(@filemansuffix@) file option. .TP 8 .B \-allowNonLocalXvidtune Make the VidMode extension available to remote clients. This allows the xvidtune client to connect from another host. This is equivalent to the .B AllowNonLocalXvidtune xorg.conf(@filemansuffix@) file option. By default non-local connections are not allowed. .TP 8 .BI \-bgamma " value" Set the blue gamma correction. .I value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the .BR \-gamma , .BR \-rgamma , and .B \-ggamma options. .TP 8 .BI \-bpp " n" No longer supported. Use .B \-depth to set the color depth, and use .B \-fbbpp if you really need to force a non-default framebuffer (hardware) pixel format. .TP 8 .BI \-config " file" Read the server configuration from .IR file . This option will work for any file when the server is run as root (i.e, with real-uid 0), or for files relative to a directory in the config search path for all other users. .TP 8 .BI \-configdir " directory" Read the server configuration files from .IR directory . This option will work for any directory when the server is run as root (i.e, with real-uid 0), or for directories relative to a directory in the config directory search path for all other users. .TP 8 .B \-configure When this option is specified, the .B Xorg server loads all video driver modules, probes for available hardware, and writes out an initial xorg.conf(@filemansuffix@) file based on what was detected. This option currently has some problems on some platforms, but in most cases it is a good way to bootstrap the configuration process. This option is only available when the server is run as root (i.e, with real-uid 0). .TP 8 .BI "\-crt /dev/tty" XX SCO only. This is the same as the .B vt option, and is provided for compatibility with the native SCO X server. .TP 8 .BI \-depth " n" Sets the default color depth. Legal values are 1, 4, 8, 15, 16, and 24. Not all drivers support all values. .TP 8 .B \-disableVidMode Disable the parts of the VidMode extension (used by the xvidtune client) that can be used to change the video modes. This is equivalent to the .B DisableVidModeExtension xorg.conf(@filemansuffix@) file option. .TP 8 .B \-fbbpp \fIn\fP Sets the number of framebuffer bits per pixel. You should only set this if you're sure it's necessary; normally the server can deduce the correct value from .B \-depth above. Useful if you want to run a depth 24 configuration with a 24 bpp framebuffer rather than the (possibly default) 32 bpp framebuffer (or vice versa). Legal values are 1, 8, 16, 24, 32. Not all drivers support all values. .TP 8 .BI \-gamma " value" Set the gamma correction. .I value must be between 0.1 and 10. The default is 1.0. This value is applied equally to the R, G and B values. Those values can be set independently with the .BR \-rgamma , .BR \-bgamma , and .B \-ggamma options. Not all drivers support this. .TP 8 .BI \-ggamma " value" Set the green gamma correction. .I value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the .BR \-gamma , .BR \-rgamma , and .B \-bgamma options. .TP 8 .B \-ignoreABI The .B Xorg server checks the ABI revision levels of each module that it loads. It will normally refuse to load modules with ABI revisions that are newer than the server's. This is because such modules might use interfaces that the server does not have. When this option is specified, mismatches like this are downgraded from fatal errors to warnings. This option should be used with care. .TP 8 .B \-isolateDevice \fIbus\-id\fP Restrict device resets to the device at .IR bus\-id . The .I bus\-id string has the form .IB bustype : bus : device : function (e.g., \(oqPCI:1:0:0\(cq). At present, only isolation of PCI devices is supported; i.e., this option is ignored if .I bustype is anything other than \(oqPCI\(cq. .TP 8 .B \-keeptty Prevent the server from detaching its initial controlling terminal. If you want to use systemd-logind integration you must specify this option. Not all platforms support (or can use) this option. .TP 8 .BI \-keyboard " keyboard-name" Use the xorg.conf(@filemansuffix@) file .B InputDevice section called .I keyboard-name as the core keyboard. This option is ignored when the .B Layout section specifies a core keyboard. In the absence of both a Layout section and this option, the first relevant .B InputDevice section is used for the core keyboard. .TP 8 .BI \-layout " layout-name" Use the xorg.conf(@filemansuffix@) file .B Layout section called .IR layout-name . By default the first .B Layout section is used. .TP 8 .BI \-logfile " filename" Use the file called .I filename as the .B Xorg server log file. The default log file when running as root is .BI @logdir@/Xorg. n .log and for non root it is .BI $XDG_DATA_HOME/xorg/Xorg. n .log where .I n is the display number of the .B Xorg server. The default may be in a different directory on some platforms. This option is only available when the server is run as root (i.e, with real-uid 0). .TP 8 .BR \-logverbose " [\fIn\fP]" Sets the verbosity level for information printed to the .B Xorg server log file. If the .I n value isn't supplied, each occurrence of this option increments the log file verbosity level. When the .I n value is supplied, the log file verbosity level is set to that value. The default log file verbosity level is 3. .TP 8 .BI \-modulepath " searchpath" Set the module search path to .IR searchpath . .I searchpath is a comma separated list of directories to search for .B Xorg server modules. This option is only available when the server is run as root (i.e, with real-uid 0). .TP 8 .B \-noautoBindGPU Disable automatically setting secondary GPUs up as output sinks and offload sources. This is equivalent to setting the .B AutoBindGPU xorg.conf(__filemansuffix__) file option. To .B false. .TP 8 .B \-nosilk Disable Silken Mouse support. .TP 8 .B \-novtswitch Disable the automatic switching on X server reset and shutdown to the VT that was active when the server started, if supported by the OS. .TP 8 .BI \-pointer " pointer-name" Use the xorg.conf(@filemansuffix@) file .B InputDevice section called .I pointer-name as the core pointer. This option is ignored when the .B Layout section specifies a core pointer. In the absence of both a Layout section and this option, the first relevant .B InputDevice section is used for the core pointer. .TP 8 .B \-quiet Suppress most informational messages at startup. The verbosity level is set to zero. .TP 8 .BI \-rgamma " value" Set the red gamma correction. .I value must be between 0.1 and 10. The default is 1.0. Not all drivers support this. See also the .BR \-gamma , .BR \-bgamma , and .B \-ggamma options. .TP 8 .B \-sharevts Share virtual terminals with another X server, if supported by the OS. .TP 8 .BI \-screen " screen-name" Use the xorg.conf(@filemansuffix@) file .B Screen section called .IR screen-name . By default the screens referenced by the default .B Layout section are used, or the first .B Screen section when there are no .B Layout sections. .TP 8 .B \-showconfig This is the same as the .B \-version option, and is included for compatibility reasons. It may be removed in a future release, so the .B \-version option should be used instead. .TP 8 .B \-showDefaultModulePath Print out the default module path the server was compiled with. .TP 8 .B \-showDefaultLibPath Print out the path libraries should be installed to. .TP 8 .B \-showopts For each driver module installed, print out the list of options and their argument types. .TP 8 .BI \-weight " nnn" Set RGB weighting at 16 bpp. The default is 565. This applies only to those drivers which support 16 bpp. .TP 8 .BR \-verbose " [\fIn\fP]" Sets the verbosity level for information printed on stderr. If the .I n value isn't supplied, each occurrence of this option increments the verbosity level. When the .I n value is supplied, the verbosity level is set to that value. The default verbosity level is 0. .TP 8 .B \-version Print out the server version, patchlevel, release date, the operating system/platform it was built on, and whether it includes module loader support. .SH "KEYBOARD" .PP The .B Xorg server is normally configured to recognize various special combinations of key presses that instruct the server to perform some action, rather than just sending the key press event to a client application. These actions depend on the XKB keymap loaded by a particular keyboard device and may or may not be available on a given configuration. .PP The following key combinations are commonly part of the default XKEYBOARD keymap. .TP 8 .B Ctrl+Alt+Backspace Immediately kills the server -- no questions asked. It can be disabled by setting the .B DontZap xorg.conf(@filemansuffix@) file option to a TRUE value. .PP .RS 8 It should be noted that zapping is triggered by the .B Terminate_Server action in the keyboard map. This action is not part of the default keymaps but can be enabled with the XKB option .B \*qterminate:ctrl_alt_bksp\*q. .RE .TP 8 .B Ctrl+Alt+Keypad-Plus Change video mode to next one specified in the configuration file. This can be disabled with the .B DontZoom xorg.conf(@filemansuffix@) file option. .TP 8 .B Ctrl+Alt+Keypad-Minus Change video mode to previous one specified in the configuration file. This can be disabled with the .B DontZoom xorg.conf(@filemansuffix@) file option. .TP 8 .B Ctrl+Alt+F1...F12 For systems with virtual terminal support, these keystroke combinations are used to switch to virtual terminals 1 through 12, respectively. This can be disabled with the .B DontVTSwitch xorg.conf(@filemansuffix@) file option. .SH CONFIGURATION .B Xorg typically uses a configuration file called .B xorg.conf and configuration files with the suffix .I .conf in a directory called .B @xconfigdir@ for its initial setup. Refer to the xorg.conf(@filemansuffix@) manual page for information about the format of this file. .PP .B Xorg has a mechanism for automatically generating a built-in configuration at run-time when no .B xorg.conf file or .B @xconfigdir@ files are present. The current version of this automatic configuration mechanism works in two ways. .PP The first is via enhancements that have made many components of the .B xorg.conf file optional. This means that information that can be probed or reasonably deduced doesn't need to be specified explicitly, greatly reducing the amount of built-in configuration information that needs to be generated at run-time. .PP The second is to have "safe" fallbacks for most configuration information. This maximises the likelihood that the .B Xorg server will start up in some usable configuration even when information about the specific hardware is not available. .PP The automatic configuration support for Xorg is work in progress. It is currently aimed at the most popular hardware and software platforms supported by Xorg. Enhancements are planned for future releases. .SH FILES The .B Xorg server config files can be found in a range of locations. These are documented fully in the xorg.conf(@filemansuffix@) manual page. The most commonly used locations are shown here. .TP 30 .B /etc/X11/xorg.conf Server configuration file. .TP 30 .B /etc/X11/xorg.conf-4 Server configuration file. .TP 30 .B /etc/xorg.conf Server configuration file. .TP 30 .B @projectroot@/etc/xorg.conf Server configuration file. .TP 30 .B @projectroot@/lib/X11/xorg.conf Server configuration file. .TP 30 .B /etc/X11/@xconfigdir@ Server configuration directory. .TP 30 .B /etc/X11/@xconfigdir@-4 Server configuration directory. .TP 30 .B /etc/@xconfigdir@ Server configuration directory. .TP 30 .B @projectroot@/etc/@xconfigdir@ Server configuration directory. .TP 30 .B @projectroot@/lib/X11/@xconfigdir@ Server configuration directory. .TP 30 .BI @logdir@/Xorg. n .log Server log file for display .IR n . .TP 30 .B @projectroot@/bin/\(** Client binaries. .TP 30 .B @projectroot@/include/\(** Header files. .TP 30 .B @projectroot@/lib/\(** Libraries. .TP 30 .B @datadir@/fonts/X11/\(** Fonts. .TP 30 .B @projectroot@/share/X11/XErrorDB Client error message database. .TP 30 .B @projectroot@/lib/X11/app-defaults/\(** Client resource specifications. .TP 30 .B @mandir@/man?/\(** Manual pages. .TP 30 .BI /etc/X n .hosts Initial access control list for display .IR n . .SH "SEE ALSO" X(@miscmansuffix@), Xserver(@appmansuffix@), xdm(@appmansuffix@), xinit(@appmansuffix@), xorg.conf(@filemansuffix@), xvidtune(@appmansuffix@), xkeyboard-config (@miscmansuffix@), apm(@drivermansuffix@), ati(@drivermansuffix@), chips(@drivermansuffix@), cirrus(@drivermansuffix@), cyrix(@drivermansuffix@), fbdev(@drivermansuffix@), glide(@drivermansuffix@), glint(@drivermansuffix@), i128(@drivermansuffix@), i740(@drivermansuffix@), imstt(@drivermansuffix@), intel(@drivermansuffix@), mga(@drivermansuffix@), neomagic(@drivermansuffix@), nsc(@drivermansuffix@), nv(@drivermansuffix@), openchrome (@drivermansuffix@), r128(@drivermansuffix@), rendition(@drivermansuffix@), s3virge(@drivermansuffix@), siliconmotion(@drivermansuffix@), sis(@drivermansuffix@), sunbw2(@drivermansuffix@), suncg14(@drivermansuffix@), suncg3(@drivermansuffix@), suncg6(@drivermansuffix@), sunffb(@drivermansuffix@), sunleo(@drivermansuffix@), suntcx(@drivermansuffix@), tdfx(@drivermansuffix@), tga(@drivermansuffix@), trident(@drivermansuffix@), tseng(@drivermansuffix@), v4l(@drivermansuffix@), vesa(@drivermansuffix@), vmware(@drivermansuffix@), .br Web site .IR . .SH AUTHORS Xorg has many contributors world wide. The names of most of them can be found in the documentation, ChangeLog files in the source tree, and in the actual source code. .PP Xorg was originally based on XFree86 4.4rc2. That was originally based on \fIX386 1.2\fP by Thomas Roell, which was contributed to the then X Consortium's X11R5 distribution by SGCS. .PP Xorg is released by the X.Org Foundation. .PP The project that became XFree86 was originally founded in 1992 by David Dawes, Glenn Lai, Jim Tsillas and David Wexelblat. .PP XFree86 was later integrated in the then X Consortium's X11R6 release by a group of dedicated XFree86 developers, including the following: .PP .RS 4 .nf Stuart Anderson \fIanderson@metrolink.com\fP Doug Anson \fIdanson@lgc.com\fP Gertjan Akkerman \fIakkerman@dutiba.twi.tudelft.nl\fP Mike Bernson \fImike@mbsun.mlb.org\fP Robin Cutshaw \fIrobin@XFree86.org\fP David Dawes \fIdawes@XFree86.org\fP Marc Evans \fImarc@XFree86.org\fP Pascal Haible \fIhaible@izfm.uni-stuttgart.de\fP Matthieu Herrb \fIMatthieu.Herrb@laas.fr\fP Dirk Hohndel \fIhohndel@XFree86.org\fP David Holland \fIdavidh@use.com\fP Alan Hourihane \fIalanh@fairlite.demon.co.uk\fP Jeffrey Hsu \fIhsu@soda.berkeley.edu\fP Glenn Lai \fIglenn@cs.utexas.edu\fP Ted Lemon \fImellon@ncd.com\fP Rich Murphey \fIrich@XFree86.org\fP Hans Nasten \fInasten@everyware.se\fP Mark Snitily \fImark@sgcs.com\fP Randy Terbush \fIrandyt@cse.unl.edu\fP Jon Tombs \fItombs@XFree86.org\fP Kees Verstoep \fIversto@cs.vu.nl\fP Paul Vixie \fIpaul@vix.com\fP Mark Weaver \fIMark_Weaver@brown.edu\fP David Wexelblat \fIdwex@XFree86.org\fP Philip Wheatley \fIPhilip.Wheatley@ColumbiaSC.NCR.COM\fP Thomas Wolfram \fIwolf@prz.tu-berlin.de\fP Orest Zborowski \fIorestz@eskimo.com\fP .fi .RE .PP Xorg source is available from the FTP server \fI\fP, and from the X.Org server \fI\fP. Documentation and other information can be found from the X.Org web site \fI\fP. .SH LEGAL .PP .B Xorg is copyright software, provided under licenses that permit modification and redistribution in source and binary form without fee. .B Xorg is copyright by numerous authors and contributors from around the world. Licensing information can be found at .IR . Refer to the source code for specific copyright notices. .PP .B XFree86(TM) is a trademark of The XFree86 Project, Inc. .PP .B X11(TM) and .B X Window System(TM) are trademarks of The Open Group. xorg-server-21.1.16/hw/xfree86/man/xorg.conf.man0000644000175000017500000022744614757411105014732 .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH xorg.conf @filemansuffix@ @vendorversion@ .SH NAME xorg.conf, @xconfigdir@ \- configuration files for Xorg X server .SH INTRODUCTION .B Xorg supports several mechanisms for supplying/obtaining configuration and run-time parameters: command line options, environment variables, the xorg.conf and @xconfigdir@ configuration files, auto-detection, and fallback defaults. When the same information is supplied in more than one way, the highest precedence mechanism is used. The list of mechanisms is ordered from highest precedence to lowest. Note that not all parameters can be supplied via all methods. The available command line options and environment variables (and some defaults) are described in the Xserver(@appmansuffix@) and Xorg(@appmansuffix@) manual pages. Most configuration file parameters, with their defaults, are described below. Driver and module specific configuration parameters are described in the relevant driver or module manual page. .SH DESCRIPTION .B Xorg uses a configuration file called .I xorg.conf and files ending in the suffix .I .conf from the directory .I @xconfigdir@ for its initial setup. The .I xorg.conf configuration file is searched for in the following places when the server is started as a normal user: .PP .RS 4 .nf .IR /etc/X11/ .IR @projectroot@/etc/X11/ .IB /etc/X11/ $XORGCONFIG .IB @projectroot@/etc/X11/ $XORGCONFIG .I /etc/X11/xorg.conf .I /etc/xorg.conf .IR @projectroot@/etc/X11/xorg.conf. .I @projectroot@/etc/X11/xorg.conf .IR @projectroot@/lib/X11/xorg.conf. .I @projectroot@/lib/X11/xorg.conf .fi .RE .PP where .I is a relative path (with no \(lq..\(rq components) specified with the .B \-config command line option, .B $XORGCONFIG is the relative path (with no \(lq..\(rq components) specified by that environment variable, and .I is the machine's hostname as reported by .BR gethostname (@libmansuffix@). .PP When the Xorg server is started by the \(lqroot\(rq user, the config file search locations are as follows: .PP .RS 4 .nf .IR /etc/X11/ .IR @projectroot@/etc/X11/ .B $XORGCONFIG .IB /etc/X11/ $XORGCONFIG .IB @projectroot@/etc/X11/ $XORGCONFIG .I /etc/X11/xorg.conf .I /etc/xorg.conf .IR @projectroot@/etc/X11/xorg.conf. .I @projectroot@/etc/X11/xorg.conf .IR @projectroot@/lib/X11/xorg.conf. .I @projectroot@/lib/X11/xorg.conf .fi .RE .PP where .I is the path specified with the .B \-config command line option (which may be absolute or relative), .B $XORGCONFIG is the path specified by that environment variable (absolute or relative), .B $HOME is the path specified by that environment variable (usually the home directory), and .I is the machine's hostname as reported by .BR gethostname (@libmansuffix@). .PP Additional configuration files are searched for in the following directories when the server is started as a normal user: .PP .RS 4 .nf .IR /etc/X11/ .IR @sysconfdir@/X11/ .I /etc/X11/@xconfigdir@ .I @sysconfdir@/X11/@xconfigdir@ .fi .RE .PP where .I is a relative path (with no \(lq..\(rq components) specified with the .B \-configdir command line option. .PP When the Xorg server is started by the \(lqroot\(rq user, the config directory search locations are as follows: .PP .RS 4 .nf .IR /etc/X11/ .IR @sysconfdir@/X11/ .I /etc/X11/@xconfigdir@ .I @sysconfdir@/X11/@xconfigdir@ .fi .RE .PP where .I is the path specified with the .B \-configdir command line option (which may be absolute or relative). .PP Finally, configuration files will also be searched for in a directory reserved for system use. This is to separate configuration files from the vendor or 3rd party packages from those of local administration. These files are found in the following directory: .PP .RS 4 .nf .I @datadir@/X11/@xconfigdir@ .fi .RE .PP The .I xorg.conf and .I @xconfigdir@ files are composed of a number of sections which may be present in any order, or omitted to use default configuration values. Each section has the form: .PP .RS 4 .nf .BI "Section \*q" SectionName \*q .RI " " SectionEntry ... .B EndSection .fi .RE .PP The section names are: .PP .RS 4 .nf .BR "Files " "File pathnames" .BR "ServerFlags " "Server flags" .BR "Module " "Dynamic module loading" .BR "Extensions " "Extension enabling" .BR "InputDevice " "Input device description" .BR "InputClass " "Input class description" .BR "OutputClass " "Output class description" .BR "Device " "Graphics device description" .BR "VideoAdaptor " "Xv video adaptor description" .BR "Monitor " "Monitor description" .BR "Modes " "Video modes descriptions" .BR "Screen " "Screen configuration" .BR "ServerLayout " "Overall layout" .BR "DRI " "DRI\-specific configuration" .BR "Vendor " "Vendor\-specific configuration" .fi .RE .PP The following obsolete section names are still recognised for compatibility purposes. In new config files, the .B InputDevice section should be used instead. .PP .RS 4 .nf .BR "Keyboard " "Keyboard configuration" .BR "Pointer " "Pointer/mouse configuration" .fi .RE .PP The old .B XInput section is no longer recognised. .PP The .B ServerLayout sections are at the highest level. They bind together the input and output devices that will be used in a session. The input devices are described in the .B InputDevice sections. Output devices usually consist of multiple independent components (e.g., a graphics board and a monitor). These multiple components are bound together in the .B Screen sections, and it is these that are referenced by the .B ServerLayout section. Each .B Screen section binds together a graphics board and a monitor. The graphics boards are described in the .B Device sections, and the monitors are described in the .B Monitor sections. .PP Config file keywords are case\-insensitive, and \(lq_\(rq characters are ignored. Most strings (including .B Option names) are also case-insensitive, and insensitive to white space and \(lq_\(rq characters. .PP Each config file entry usually takes up a single line in the file. They consist of a keyword, which is possibly followed by one or more arguments, with the number and types of the arguments depending on the keyword. The argument types are: .PP .RS 4 .nf .BR "Integer " "an integer number in decimal, hex or octal" .BR "Real " "a floating point number" .BR "String " "a string enclosed in double quote marks (\*q)" .fi .RE .PP Note: hex integer values must be prefixed with \(lq0x\(rq, and octal values with \(lq0\(rq. .PP A special keyword called .B Option may be used to provide free\-form data to various components of the server. The .B Option keyword takes either one or two string arguments. The first is the option name, and the optional second argument is the option value. Some commonly used option value types include: .PP .RS 4 .nf .BR "Integer " "an integer number in decimal, hex or octal" .BR "Real " "a floating point number" .BR "String " "a sequence of characters" .BR "Boolean " "a boolean value (see below)" .BR "Frequency " "a frequency value (see below)" .fi .RE .PP Note that .I all .B Option values, not just strings, must be enclosed in quotes. .PP Boolean options may optionally have a value specified. When no value is specified, the option's value is .BR TRUE . The following boolean option values are recognised as .BR TRUE : .PP .RS 4 .BR 1 , .BR on , .BR true , .B yes .RE .PP and the following boolean option values are recognised as .BR FALSE : .PP .RS 4 .BR 0 , .BR off , .BR false , .B no .RE .PP If an option name is prefixed with .RB \*q No \*q, then the option value is negated. .PP Example: the following option entries are equivalent: .PP .RS 4 .nf .B "Option \*qAccel\*q \*qOff\*q" .B "Option \*qNoAccel\*q" .B "Option \*qNoAccel\*q \*qOn\*q" .B "Option \*qAccel\*q \*qfalse\*q" .B "Option \*qAccel\*q \*qno\*q" .fi .RE .PP Frequency option values consist of a real number that is optionally followed by one of the following frequency units: .PP .RS 4 .BR Hz , .BR k , .BR kHz , .BR M , .B MHz .RE .PP When the unit name is omitted, the correct units will be determined from the value and the expectations of the appropriate range of the value. It is recommended that the units always be specified when using frequency option values to avoid any errors in determining the value. .SH "FILES SECTION" The .B Files section is used to specify some path names required by the server. Some of these paths can also be set from the command line (see .BR Xserver (@appmansuffix@) and .BR Xorg (@appmansuffix@)). The command line settings override the values specified in the config file. The .B Files section is optional, as are all of the entries that may appear in it. .PP The entries that can appear in this section are: .TP 7 .BI "FontPath \*q" path \*q sets the search path for fonts. This path is a comma separated list of font path elements which the Xorg server searches for font databases. Multiple .B FontPath entries may be specified, and they will be concatenated to build up the fontpath used by the server. Font path elements can be absolute directory paths, catalogue directories or a font server identifier. The formats of the later two are explained below: .PP .RS 7 Catalogue directories: .PP .RS 4 Catalogue directories can be specified using the prefix \fBcatalogue:\fR before the directory name. The directory can then be populated with symlinks pointing to the real font directories, using the following syntax in the symlink name: .PP .RS 4 .IR : [attribute]: pri= .RE .PP where .I is an alphanumeric identifier, .I [attribute] is an attribute which will be passed to the underlying FPE and .I is a number used to order the fontfile FPEs. Examples: .PP .RS 4 .nf .I 75dpi:unscaled:pri=20 -> /usr/share/X11/fonts/75dpi .I gscript:pri=60 -> /usr/share/fonts/default/ghostscript .I misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc .fi .PP .RE .RE .RE .PP .RS 7 Font server identifiers: .PP .RS 4 Font server identifiers have the form: .RS 4 .PP .IR / : .RE .PP where .I is the transport type to use to connect to the font server (e.g., .B unix for UNIX\-domain sockets or .B tcp for a TCP/IP connection), .I is the hostname of the machine running the font server, and .I is the port number that the font server is listening on (usually 7100). .RE .PP When this entry is not specified in the config file, the server falls back to the compiled\-in default font path, which contains the following font path elements (which can be set inside a catalogue directory): .PP .RS 4 .nf .I @datadir@/fonts/X11/misc/ .I @datadir@/fonts/X11/TTF/ .I @datadir@/fonts/X11/OTF/ .I @datadir@/fonts/X11/Type1/ .I @datadir@/fonts/X11/100dpi/ .I @datadir@/fonts/X11/75dpi/ .fi .RE .PP Font path elements that are found to be invalid are removed from the font path when the server starts up. .RE .TP 7 .BI "ModulePath \*q" path \*q sets the search path for loadable Xorg server modules. This path is a comma separated list of directories which the Xorg server searches for loadable modules loading in the order specified. Multiple .B ModulePath entries may be specified, and they will be concatenated to build the module search path used by the server. The default module path is .PP .RS 11 @modulepath@ .RE .\" The LogFile keyword is not currently implemented .ig .TP 7 .BI "LogFile \*q" path \*q sets the name of the Xorg server log file. The default log file name when running as root is .PP .RS 11 .RI @logdir@/Xorg. .log .RE and for non root it is .RS 11 .RI $XDG_DATA_HOME/xorg/Xorg. .log .RE .PP .RS 7 where .I is the display number for the Xorg server. .. .TP 7 .BI "XkbDir \*q" path \*q sets the base directory for keyboard layout files. The .B \-xkbdir command line option can be used to override this. The default directory is .PP .RS 11 @xkbdir@ .RE .SH "SERVERFLAGS SECTION" In addition to options specific to this section (described below), the .B ServerFlags section is used to specify some global Xorg server options. All of the entries in this section are .BR Options , although for compatibility purposes some of the old style entries are still recognised. Those old style entries are not documented here, and using them is discouraged. The .B ServerFlags section is optional, as are the entries that may be specified in it. .PP .B Options specified in this section (with the exception of the .B \*qDefaultServerLayout\*q .BR Option ) may be overridden by .B Options specified in the active .B ServerLayout section. Options with command line equivalents are overridden when their command line equivalent is used. The options recognised by this section are: .TP 7 .BI "Option \*qDebug\*q \*q" string \*q This comma-separated list provides a way to control various debugging switches from the config file. At the moment the only defined value is .B dmabuf_capable which instructs glamor to enable some unstable buffer management code. .TP 7 .BI "Option \*qDefaultServerLayout\*q \*q" layout\-id \*q This specifies the default .B ServerLayout section to use in the absence of the .B \-layout command line option. .TP 7 .BI "Option \*qDontVTSwitch\*q \*q" boolean \*q This disallows the use of the .BI Ctrl+Alt+F n sequence (where .RI F n refers to one of the numbered function keys). That sequence is normally used to switch to another \*qvirtual terminal\*q on operating systems that have this feature. When this option is enabled, that key sequence has no special meaning and is passed to clients. Default: off. .TP 7 .BI "Option \*qDontZap\*q \*q" boolean \*q This disallows the use of the .B Terminate_Server XKB action (usually on Ctrl+Alt+Backspace, depending on XKB options). This action is normally used to terminate the Xorg server. When this option is enabled, the action has no effect. Default: off. .TP 7 .BI "Option \*qDontZoom\*q \*q" boolean \*q This disallows the use of the .B Ctrl+Alt+Keypad\-Plus and .B Ctrl+Alt+Keypad\-Minus sequences. These sequences allows you to switch between video modes. When this option is enabled, those key sequences have no special meaning and are passed to clients. Default: off. .TP 7 .BI "Option \*qDisableVidModeExtension\*q \*q" boolean \*q This disables the parts of the VidMode extension used by the xvidtune client that can be used to change the video modes. Default: the VidMode extension is enabled. .TP 7 .BI "Option \*qAllowNonLocalXvidtune\*q \*q" boolean \*q This allows the xvidtune client (and other clients that use the VidMode extension) to connect from another host. Default: off. .TP 7 .BI "Option \*qAllowMouseOpenFail\*q \*q" boolean \*q This tells the mousedrv(@drivermansuffix@) and vmmouse(@drivermansuffix@) drivers to not report failure if the mouse device can't be opened/initialised. It has no effect on the evdev(@drivermansuffix@) or other drivers. Default: false. .TP 7 .BI "Option \*qBlankTime\*q \*q" time \*q sets the inactivity timeout for the .B blank phase of the screensaver. .I time is in minutes. This is equivalent to the Xorg server's .B \-s flag, and the value can be changed at run\-time with .BR xset(@appmansuffix@). Default: 10 minutes. .TP 7 .BI "Option \*qStandbyTime\*q \*q" time \*q sets the inactivity timeout for the .B standby phase of DPMS mode. .I time is in minutes, and the value can be changed at run\-time with .BR xset(@appmansuffix@). Default: 10 minutes. This is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. It is only enabled for screens that have the .B \*qDPMS\*q option set (see the MONITOR section below). .TP 7 .BI "Option \*qSuspendTime\*q \*q" time \*q sets the inactivity timeout for the .B suspend phase of DPMS mode. .I time is in minutes, and the value can be changed at run\-time with .BR xset(@appmansuffix@). Default: 10 minutes. This is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. It is only enabled for screens that have the .B \*qDPMS\*q option set (see the MONITOR section below). .TP 7 .BI "Option \*qOffTime\*q \*q" time \*q sets the inactivity timeout for the .B off phase of DPMS mode. .I time is in minutes, and the value can be changed at run\-time with .BR xset(@appmansuffix@). Default: 10 minutes. This is only suitable for VESA DPMS compatible monitors, and may not be supported by all video drivers. It is only enabled for screens that have the .B \*qDPMS\*q option set (see the MONITOR section below). .TP 7 .BI "Option \*qMaxClients\*q \*q" integer \*q Set the maximum number of clients allowed to connect to the X server. Acceptable values are 64, 128, 256 or 512. .TP 7 .BI "Option \*qNoPM\*q \*q" boolean \*q Disables something to do with power management events. Default: PM enabled on platforms that support it. .TP 7 .BI "Option \*qXinerama\*q \*q" boolean \*q enable or disable XINERAMA extension. Default is disabled. .TP 7 .BI "Option \*qIndirectGLX\*q \*q" boolean \*q enable or disable indirect GLX contexts. Indirect GLX contexts are disabled by default. .TP 7 .BI "Option \*qDRI2\*q \*q" boolean \*q enable or disable DRI2. DRI2 is disabled by default. .TP 7 .BI "Option \*qGlxVisuals\*q \*q" string \*q This option controls how many GLX visuals the GLX modules sets up. The default value is .BR "typical" , which will setup up a typical subset of the GLXFBConfigs provided by the driver as GLX visuals. Other options are .BR "minimal" , which will set up the minimal set allowed by the GLX specification and .BR "all" which will setup GLX visuals for all GLXFBConfigs. .TP 7 .BI "Option \*qUseDefaultFontPath\*q \*q" boolean \*q Include the default font path even if other paths are specified in xorg.conf. If enabled, other font paths are included as well. Enabled by default. .TP 7 .BI "Option \*qIgnoreABI\*q \*q" boolean \*q Allow modules built for a different, potentially incompatible version of the X server to load. Disabled by default. .TP 7 .BI "Option \*qAutoAddDevices\*q \*q" boolean \*q If this option is disabled, then no devices will be added from the HAL or udev backends. Enabled by default. .TP 7 .BI "Option \*qAutoEnableDevices\*q \*q" boolean \*q If this option is disabled, then the devices will be added (and the DevicePresenceNotify event sent), but not enabled, thus leaving policy up to the client. Enabled by default. .TP 7 .BI "Option \*qAutoAddGPU\*q \*q" boolean \*q If this option is disabled, then no GPU devices will be added from the udev backend. Enabled by default. (May need to be disabled to setup Xinerama). .TP 7 .BI "Option \*qAutoBindGPU\*q \*q" boolean \*q If enabled then secondary GPUs will be automatically set up as output-sinks and offload-sources. Making e.g. laptop outputs connected only to the secondary GPU directly available for use without needing to run "xrandr --setprovideroutputsource". Enabled by default. .TP 7 .BI "Option \*qLog\*q \*q" string \*q This option controls whether the log is flushed and/or synced to disk after each message. Possible values are .B flush or .BR sync . Unset by default. .TP 7 .BI "Option \*qAllowByteSwappedClients\*q \*q" boolean \*q Allow clients with a different byte-order than the server. Enabled by default. .SH "MODULE SECTION" The .B Module section is used to specify which Xorg server modules should be loaded. This section is ignored when the Xorg server is built in static form. The type of modules normally loaded in this section are Xorg server extension modules. Most other module types are loaded automatically when they are needed via other mechanisms. The .B Module section is optional, as are all of the entries that may be specified in it. .PP Entries in this section may be in two forms. The first and most commonly used form is an entry that uses the .B Load keyword, as described here: .TP 7 .BI "Load \*q" modulename \*q This instructs the server to load the module called .IR modulename . The module name given should be the module's standard name, not the module file name. The standard name is case\-sensitive, and does not include the \(lqlib\(rq or \(lqcyg\(rq prefixes, or the \(lq.so\(rq or \(lq.dll\(rq suffixes. .PP .RS 7 Example: the DRI extension module can be loaded with the following entry: .PP .RS 4 .B "Load \*qdri\*q" .RE .RE .TP 7 .BI "Disable \*q" modulename \*q This instructs the server to not load the module called .IR modulename . Some modules are loaded by default in the server, and this overrides that default. If a .B Load instruction is given for the same module, it overrides the .B Disable instruction and the module is loaded. The module name given should be the module's standard name, not the module file name. As with the .B Load instruction, the standard name is case-sensitive, and does not include the "lib" prefix, or the ".a", ".o", or ".so" suffixes. .PP The second form of entry is a .BR SubSection, with the subsection name being the module name, and the contents of the .B SubSection being .B Options that are passed to the module when it is loaded. .PP Example: the extmod module (which contains a miscellaneous group of server extensions) can be loaded, with the XFree86\-DGA extension disabled by using the following entry: .PP .RS 4 .nf .B "SubSection \*qextmod\*q" .B " Option \*qomit XFree86\-DGA\*q" .B EndSubSection .fi .RE .PP Modules are searched for in each directory specified in the .B ModulePath search path, and in the drivers, extensions, input, internal, and multimedia subdirectories of each of those directories. In addition to this, operating system specific subdirectories of all the above are searched first if they exist. .PP To see what extension modules are available, check the extensions subdirectory under: .PP .RS 4 .nf @modulepath@ .fi .RE .PP The \(lqextmod\(rq, \(lqdbe\(rq, \(lqdri\(rq, \(lqdri2\(rq, \(lqglx\(rq, and \(lqrecord\(rq extension modules are loaded automatically, if they are present, unless disabled with \*qDisable\*q entries. It is recommended that at very least the \(lqextmod\(rq extension module be loaded. If it isn't, some commonly used server extensions (like the SHAPE extension) will not be available. .SH "EXTENSIONS SECTION" The .B Extensions section is used to specify which X11 protocol extensions should be enabled or disabled. The .B Extensions section is optional, as are all of the entries that may be specified in it. .PP Entries in this section are listed as Option statements with the name of the extension as the first argument, and a boolean value as the second. The extension name is case\-sensitive, and matches the form shown in the output of \*qXorg -extension ?\*q. .PP .RS 7 Example: the MIT-SHM extension can be disabled with the following entry: .PP .RS 4 .nf .B "Section \*qExtensions\*q" .B " Option \*qMIT-SHM\*q \*qDisable\*q" .B "EndSection" .fi .RE .RE .SH "INPUTDEVICE SECTION" The config file may have multiple .B InputDevice sections. Recent X servers employ HAL or udev backends for input device enumeration and input hotplugging. It is usually not necessary to provide .B InputDevice sections in the xorg.conf if hotplugging is in use (i.e. AutoAddDevices is enabled). If hotplugging is enabled, .B InputDevice sections using the .B mouse, kbd and .B vmmouse driver will be ignored. .PP If hotplugging is disabled, there will normally be at least two: one for the core (primary) keyboard and one for the core pointer. If either of these two is missing, a default configuration for the missing ones will be used. In the absence of an explicitly specified core input device, the first .B InputDevice marked as .B CorePointer (or .BR CoreKeyboard ) is used. If there is no match there, the first .B InputDevice that uses the \(lqmouse\(rq (or \(lqkbd\(rq) driver is used. The final fallback is to use built\-in default configurations. Currently the default configuration may not work as expected on all platforms. .PP .B InputDevice sections have the following format: .PP .RS 4 .nf .B "Section \*qInputDevice\*q" .BI " Identifier \*q" name \*q .BI " Driver \*q" inputdriver \*q .I " options" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier and .B Driver entries are required in all .B InputDevice sections. All other entries are optional. .PP The .B Identifier entry specifies the unique name for this input device. The .B Driver entry specifies the name of the driver to use for this input device. When using the loadable server, the input driver module .RI \*q inputdriver \*q will be loaded for each active .B InputDevice section. An .B InputDevice section is considered active if it is referenced by an active .B ServerLayout section, if it is referenced by the .B \-keyboard or .B \-pointer command line options, or if it is selected implicitly as the core pointer or keyboard device in the absence of such explicit references. The most commonly used input drivers are .BR evdev (@drivermansuffix@) on Linux systems, and .BR kbd (@drivermansuffix@) and .BR mousedrv (@drivermansuffix@) on other platforms. .PP .PP .B InputDevice sections recognise some driver\-independent .BR Options , which are described here. See the individual input driver manual pages for a description of the device\-specific options. .TP 7 .BI "Option \*qAutoServerLayout\*q \*q" boolean \*q Always add the device to the ServerLayout section used by this instance of the server. This affects implied layouts as well as explicit layouts specified in the configuration and/or on the command line. .TP 7 .BI "Option \*qCorePointer\*q" Deprecated, see .B Floating .TP 7 .BI "Option \*qCoreKeyboard\*q" Deprecated, see .B Floating .TP 7 .BI "Option \*qAlwaysCore\*q \*q" boolean \*q Deprecated, see .B Floating .TP 7 .BI "Option \*qSendCoreEvents\*q \*q" boolean \*q Deprecated, see .B Floating .TP 7 .BI "Option \*qFloating\*q \*q" boolean \*q When enabled, the input device is set up floating and does not report events through any master device or control a cursor. The device is only available to clients using the X Input Extension API. This option is disabled by default. The options .B CorePointer, .B CoreKeyboard, .B AlwaysCore, and .B SendCoreEvents, are the inverse of option .B Floating (i.e. .B SendCoreEvents \*qon\*q is equivalent to .B Floating \*qoff\*q ). This option controls the startup behavior only, a device may be reattached or set floating at runtime. .TP 7 .BI "Option \*qTransformationMatrix\*q \*q" a " " b " " c " " d " " e " " f " " g " " h " " i \*q Specifies the 3x3 transformation matrix for absolute input devices. The input device will be bound to the area given in the matrix. In most configurations, "a" and "e" specify the width and height of the area the device is bound to, and "c" and "f" specify the x and y offset of the area. The value range is 0 to 1, where 1 represents the width or height of all root windows together, 0.5 represents half the area, etc. The values represent a 3x3 matrix, with the first, second and third group of three values representing the first, second and third row of the matrix, respectively. The identity matrix is "1 0 0 0 1 0 0 0 1". .SS POINTER ACCELERATION For pointing devices, the following options control how the pointer is accelerated or decelerated with respect to physical device motion. Most of these can be adjusted at runtime, see the xinput(1) man page for details. Only the most important acceleration options are discussed here. .TP 7 .BI "Option \*qAccelerationProfile\*q \*q" integer \*q Select the profile. In layman's terms, the profile constitutes the "feeling" of the acceleration. More formally, it defines how the transfer function (actual acceleration as a function of current device velocity and acceleration controls) is constructed. This is mainly a matter of personal preference. .PP .RS 6 .nf .B " 0 classic (mostly compatible)" .B "-1 none (only constant deceleration is applied)" .B " 1 device-dependent" .B " 2 polynomial (polynomial function)" .B " 3 smooth linear (soft knee, then linear)" .B " 4 simple (normal when slow, otherwise accelerated)" .B " 5 power (power function)" .B " 6 linear (more speed, more acceleration)" .B " 7 limited (like linear, but maxes out at threshold)" .fi .RE .TP 7 .BI "Option \*qConstantDeceleration\*q \*q" real \*q Makes the pointer go .B deceleration times slower than normal. Most useful for high-resolution devices. A value between 0 and 1 will speed up the pointer. .TP 7 .BI "Option \*qAdaptiveDeceleration\*q \*q" real \*q Allows to actually decelerate the pointer when going slow. At most, it will be .B adaptive deceleration times slower. Enables precise pointer placement without sacrificing speed. .TP 7 .BI "Option \*qAccelerationScheme\*q \*q" string \*q Selects the scheme, which is the underlying algorithm. .PP .RS 7 .nf .B "predictable default algorithm (behaving more predictable)" .B "lightweight old acceleration code (as specified in the X protocol spec)" .B "none no acceleration or deceleration" .fi .RE .TP 7 .BI "Option \*qAccelerationNumerator\*q \*q" integer \*q .TP 7 .BI "Option \*qAccelerationDenominator\*q \*q" integer \*q Set numerator and denominator of the acceleration factor. The acceleration factor is a rational which, together with threshold, can be used to tweak profiles to suit the users needs. The .B simple and .B limited profiles use it directly (i.e. they accelerate by the factor), for other profiles it should hold that a higher acceleration factor leads to a faster pointer. Typically, 1 is unaccelerated and values up to 5 are sensible. .TP 7 .BI "Option \*qAccelerationThreshold\*q \*q" integer \*q Set the threshold, which is roughly the velocity (usually device units per 10 ms) required for acceleration to become effective. The precise effect varies with the profile however. .SH "INPUTCLASS SECTION" The config file may have multiple .B InputClass sections. These sections are optional and are used to provide configuration for a class of input devices as they are automatically added. An input device can match more than one .B InputClass section. Each class can override settings from a previous class, so it is best to arrange the sections with the most generic matches first. .PP .B InputClass sections have the following format: .PP .RS 4 .nf .B "Section \*qInputClass\*q" .BI " Identifier \*q" name \*q .I " entries" .I " ..." .I " options" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier entry is required in all .B InputClass sections. All other entries are optional. .PP The .B Identifier entry specifies the unique name for this input class. The .B Driver entry specifies the name of the driver to use for this input device. After all classes have been examined, the .RI \*q inputdriver \*q module from the first .B Driver entry will be enabled when using the loadable server. .PP When an input device is automatically added, its characteristics are checked against all .B InputClass sections. Each section can contain optional entries to narrow the match of the class. If none of the optional entries appear, the .B InputClass section is generic and will match any input device. If more than one of these entries appear, they all must match for the configuration to apply. .PP There are two types of match entries used in .B InputClass sections. The first allows various tokens to be matched against attributes of the device. An entry can be constructed to match attributes from different devices by separating arguments with a '|' character. Multiple entries of the same type may be supplied to add multiple matching conditions on the same attribute. For example: .PP .RS 4 .nf .B "Section \*qInputClass\*q" .B " Identifier \*qMy Class\*q" .B " # product string must contain example and .B " # either gizmo or gadget .B " MatchProduct \*qexample\*q .B " MatchProduct \*qgizmo|gadget\*q .B " NoMatchDriver \*qdrivername\*q .I " ..." .B "EndSection" .fi .RE .TP 7 .BI "MatchProduct \*q" matchproduct \*q This entry can be used to check if the substring .RI \*q matchproduct \*q occurs in the device's product name. .TP 7 .BI "MatchVendor \*q" matchvendor \*q This entry can be used to check if the substring .RI \*q matchvendor \*q occurs in the device's vendor name. .TP 7 .BI "MatchDevicePath \*q" matchdevice \*q This entry can be used to check if the device file matches the .RI \*q matchdevice \*q pathname pattern. .TP 7 .BI "MatchOS \*q" matchos \*q This entry can be used to check if the operating system matches the case-insensitive .RI \*q matchos \*q string. This entry is only supported on platforms providing the .BR uname (2) system call. .TP 7 .BI "MatchPnPID \*q" matchpnp \*q The device's Plug and Play (PnP) ID can be checked against the .RI \*q matchpnp \*q shell wildcard pattern. .TP 7 .BI "MatchUSBID \*q" matchusb \*q The device's USB ID can be checked against the .RI \*q matchusb \*q shell wildcard pattern. The ID is constructed as lowercase hexadecimal numbers separated by a ':'. This is the same format as the .BR lsusb (8) program. .TP 7 .BI "MatchDriver \*q" matchdriver \*q Check the case-sensitive string .RI \*q matchdriver \*q against the currently configured driver of the device. Ordering of sections using this entry is important since it will not match unless the driver has been set by the config backend or a previous .B InputClass section. .TP 7 .BI "MatchTag \*q" matchtag \*q This entry can be used to check if tags assigned by the config backend matches the .RI \*q matchtag \*q pattern. A match is found if at least one of the tags given in .RI \*q matchtag \*q matches at least one of the tags assigned by the backend. .TP 7 .BI "MatchLayout \*q" matchlayout \*q Check the case-sensitive string .RI \*q matchlayout \*q against the currently active .B ServerLayout section. The empty string "" matches an implicit layout which appears if no named .B ServerLayout sections have been found. .PP The above directives have equivalents for negative matching with the .B NoMatchProduct, .B NoMatchVendor, .B NoMatchDevicePath, .B NoMatchOS, .B NoMatchPnPID, .B NoMatchUSBID, .B NoMatchDriver, .B NoMatchTag, and .B NoMatchLayout directives. These NoMatch directives match if the subsequent match is not met by the device. .PP The second type of entry is used to match device types. These entries take a boolean argument similar to .B Option entries. .TP 7 .BI "MatchIsKeyboard \*q" bool \*q .TP 7 .BI "MatchIsPointer \*q" bool \*q .TP 7 .BI "MatchIsJoystick \*q" bool \*q .TP 7 .BI "MatchIsTablet \*q" bool \*q .TP 7 .BI "MatchIsTabletPad \*q" bool \*q .TP 7 .BI "MatchIsTouchpad \*q" bool \*q .TP 7 .BI "MatchIsTouchscreen \*q" bool \*q .PP When an input device has been matched to the .B InputClass section, any .B Option entries are applied to the device. One .B InputClass specific .B Option is recognized. See the .B InputDevice section above for a description of the remaining .B Option entries. .TP 7 .BI "Option \*qIgnore\*q \*q" boolean \*q This optional entry specifies that the device should be ignored entirely, and not added to the server. This can be useful when the device is handled by another program and no X events should be generated. .SH "OUTPUTCLASS SECTION" The config file may have multiple .B OutputClass sections. These sections are optional and are used to provide configuration for a class of output devices as they are automatically added. An output device can match more than one .B OutputClass section. Each class can override settings from a previous class, so it is best to arrange the sections with the most generic matches first. .PP .B OutputClass sections have the following format: .PP .RS 4 .nf .B "Section \*qOutputClass\*q" .BI " Identifier \*q" name \*q .I " entries" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier entry is required in all .B OutputClass sections. All other entries are optional. .PP The .B Identifier entry specifies the unique name for this output class. The .B Driver entry specifies the name of the driver to use for this output device. After all classes have been examined, the .RI \*q outputdriver \*q module from the first .B Driver entry will be enabled when using the loadable server. .PP When an output device is automatically added, its characteristics are checked against all .B OutputClass sections. Each section can contain optional entries to narrow the match of the class. If none of the optional entries appear, the .B OutputClass section is generic and will match any output device. If more than one of these entries appear, they all must match for the configuration to apply. .PP The following list of tokens can be matched against attributes of the device. An entry can be constructed to match attributes from different devices by separating arguments with a '|' character. .PP For example: .PP .RS 4 .nf .B "Section \*qOutputClass\*q" .B " Identifier \*qMy Class\*q" .B " # kernel driver must be either foo or bar .B " MatchDriver \*qfoo|bar\*q .I " ..." .B "EndSection" .fi .RE .TP 7 .BI "MatchDriver \*q" matchdriver \*q Check the case-sensitive string .RI \*q matchdriver \*q against the kernel driver of the device. .PP When an output device has been matched to the .B OutputClass section, any .B Option entries are applied to the device. One .B OutputClass specific .B Option is recognized. See the .B Device section below for a description of the remaining .B Option entries. .TP 7 .BI "Option \*qPrimaryGPU\*q \*q" boolean \*q This option specifies that the matched device should be treated as the primary GPU, replacing the selection of the GPU used as output by the firmware. If multiple output devices match an OutputClass section with the PrimaryGPU option set, the first one enumerated becomes the primary GPU. .PP A .B OutputClass Section may contain .B ModulePath entries. When an output device matches an .B OutputClass section, any .B ModulePath entries in that .B OutputClass are pre-pended to the search path for loadable Xorg server modules. See .B ModulePath in the .B Files section for more info. .SH "DEVICE SECTION" The config file may have multiple .B Device sections. There must be at least one, for the video card being used. .PP .B Device sections have the following format: .PP .RS 4 .nf .B "Section \*qDevice\*q" .BI " Identifier \*q" name \*q .BI " Driver \*q" driver \*q .I " entries" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier and .B Driver entries are required in all .B Device sections. All other entries are optional. .PP The .B Identifier entry specifies the unique name for this graphics device. The .B Driver entry specifies the name of the driver to use for this graphics device. When using the loadable server, the driver module .RI \*q driver \*q will be loaded for each active .B Device section. A .B Device section is considered active if it is referenced by an active .B Screen section. .PP .B Device sections recognise some driver\-independent entries and .BR Options , which are described here. Not all drivers make use of these driver\-independent entries, and many of those that do don't require them to be specified because the information is auto\-detected. See the individual graphics driver manual pages for further information about this, and for a description of the device\-specific options. Note that most of the .B Options listed here (but not the other entries) may be specified in the .B Screen section instead of here in the .B Device section. .TP 7 .BI "BusID \*q" bus\-id \*q This specifies the bus location of the graphics card. For PCI/AGP cards, the .I bus\-id string has the form .BI PCI: bus @ domain : device : function (e.g., \(lqPCI:1@0:0:0\(rq might be appropriate for an AGP card). The "@domain" part can be left out for PCI domain 0. This field is usually optional in single-head configurations when using the primary graphics card. In multi-head configurations, or when using a secondary graphics card in a single-head configuration, this entry is mandatory. Its main purpose is to make an unambiguous connection between the device section and the hardware it is representing. This information can usually be found by running the pciaccess tool scanpci. .TP 7 .BI "Screen " number This option is mandatory for cards where a single PCI entity can drive more than one display (i.e., multiple CRTCs sharing a single graphics accelerator and video memory). One .B Device section is required for each head, and this parameter determines which head each of the .B Device sections applies to. The legal values of .I number range from 0 to one less than the total number of heads per entity. Most drivers require that the primary screen (0) be present. .TP 7 .BI "Chipset \*q" chipset \*q This usually optional entry specifies the chipset used on the graphics board. In most cases this entry is not required because the drivers will probe the hardware to determine the chipset type. Don't specify it unless the driver-specific documentation recommends that you do. .TP 7 .BI "Ramdac \*q" ramdac\-type \*q This optional entry specifies the type of RAMDAC used on the graphics board. This is only used by a few of the drivers, and in most cases it is not required because the drivers will probe the hardware to determine the RAMDAC type where possible. Don't specify it unless the driver-specific documentation recommends that you do. .TP 7 .BI "DacSpeed " speed .TP 7 .BI "DacSpeed " "speed\-8 speed\-16 speed\-24 speed\-32" This optional entry specifies the RAMDAC speed rating (which is usually printed on the RAMDAC chip). The speed is in MHz. When one value is given, it applies to all framebuffer pixel sizes. When multiple values are given, they apply to the framebuffer pixel sizes 8, 16, 24 and 32 respectively. This is not used by many drivers, and only needs to be specified when the speed rating of the RAMDAC is different from the defaults built in to driver, or when the driver can't auto-detect the correct defaults. Don't specify it unless the driver-specific documentation recommends that you do. .TP 7 .BI "Clocks " "clock ..." specifies the pixel that are on your graphics board. The clocks are in MHz, and may be specified as a floating point number. The value is stored internally to the nearest kHz. The ordering of the clocks is important. It must match the order in which they are selected on the graphics board. Multiple .B Clocks lines may be specified, and each is concatenated to form the list. Most drivers do not use this entry, and it is only required for some older boards with non-programmable clocks. Don't specify this entry unless the driver-specific documentation explicitly recommends that you do. .TP .BI "ClockChip \*q" clockchip\-type \*q This optional entry is used to specify the clock chip type on graphics boards which have a programmable clock generator. Only a few Xorg drivers support programmable clock chips. For details, see the appropriate driver manual page. .TP 7 .BI "VideoRam " "mem" This optional entry specifies the amount of video ram that is installed on the graphics board. This is measured in kBytes. In most cases this is not required because the Xorg server probes the graphics board to determine this quantity. The driver-specific documentation should indicate when it might be needed. .TP 7 .BI "MemBase " "baseaddress" This optional entry specifies the memory base address of a graphics board's linear frame buffer. This entry is not used by many drivers, and it should only be specified if the driver-specific documentation recommends it. .TP 7 .BI "IOBase " "baseaddress" This optional entry specifies the IO base address. This entry is not used by many drivers, and it should only be specified if the driver-specific documentation recommends it. .TP 7 .BI "ChipID " "id" This optional entry specifies a numerical ID representing the chip type. For PCI cards, it is usually the device ID. This can be used to override the auto-detection, but that should only be done when the driver-specific documentation recommends it. .TP 7 .BI "ChipRev " "rev" This optional entry specifies the chip revision number. This can be used to override the auto-detection, but that should only be done when the driver-specific documentation recommends it. .TP 7 .BI "MatchSeat " "seat\-id" Only apply this .B Device section if X server was started with .B -seat .I seat\-id option. .TP 7 .BI "Option \*qModeDebug\*q \*q" boolean \*q Enable printing of additional debugging information about modesetting to the server log. .TP 7 .BI "Option \*qNoOutputInitialSize\*q \*q" width " " height \*q Normally, the X server infers the initial screen size based on any connected outputs. However, if no outputs are connected, the X server picks a default screen size of 1024 x 768. This option overrides the default screen size to use when no outputs are connected. In contrast to the \*qVirtual\*q Display SubSection entry, which applies unconditionally, \*qNoOutputInitialSize\*q is only used if no outputs are detected when the X server starts. .TP 7 .BI "Option \*qPreferCloneMode\*q \*q" boolean \*q If enabled, bring up monitors of a screen in clone mode instead of horizontal extended layout by default. (Defaults to off; the video driver can change the default value, but this option can always override it) .ig .TP 7 This optional entry allows an IRQ number to be specified. .. .TP 7 .B Options Option flags may be specified in the .B Device sections. These include driver\-specific options and driver\-independent options. The former are described in the driver\-specific documentation. Some of the latter are described below in the section about the .B Screen section, and they may also be included here. .SH "VIDEOADAPTOR SECTION" Nobody wants to say how this works. Maybe nobody knows ... .SH "MONITOR SECTION" The config file may have multiple .B Monitor sections. There should normally be at least one, for the monitor being used, but a default configuration will be created when one isn't specified. .PP .B Monitor sections have the following format: .PP .RS 4 .nf .B "Section \*qMonitor\*q" .BI " Identifier \*q" name \*q .I " entries" .I " ..." .B "EndSection" .fi .RE .PP The only mandatory entry in a .B Monitor section is the .B Identifier entry. .PP The .B Identifier entry specifies the unique name for this monitor. The .B Monitor section may be used to provide information about the specifications of the monitor, monitor-specific .BR Options , and information about the video modes to use with the monitor. .PP With RandR 1.2-enabled drivers, monitor sections may be tied to specific outputs of the video card. Using the name of the output defined by the video driver plus the identifier of a monitor section, one associates a monitor section with an output by adding an option to the Device section in the following format: .BI "Option \*qMonitor-" outputname "\*q \*q" monitorsection \*q (for example, .B Option \*qMonitor-VGA\*q \*qVGA monitor\*q for a VGA output) .PP In the absence of specific association of monitor sections to outputs, if a monitor section is present the server will associate it with an output to preserve compatibility for previous single-head configurations. .PP Specifying video modes is optional because the server will use the DDC or other information provided by the monitor to automatically configure the list of modes available. When modes are specified explicitly in the .B Monitor section (with the .BR Mode , .BR ModeLine , or .B UseModes keywords), built-in modes with the same names are not included. Built-in modes with different names are, however, still implicitly included, when they meet the requirements of the monitor. .PP The entries that may be used in .B Monitor sections are described below. .TP 7 .BI "VendorName \*q" vendor \*q This optional entry specifies the monitor's manufacturer. .TP 7 .BI "ModelName \*q" model \*q This optional entry specifies the monitor's model. .TP 7 .BI "HorizSync " "horizsync\-range" gives the range(s) of horizontal sync frequencies supported by the monitor. .I horizsync\-range may be a comma separated list of either discrete values or ranges of values. A range of values is two values separated by a dash. By default the values are in units of kHz. They may be specified in MHz or Hz if .B MHz or .B Hz is added to the end of the line. The data given here is used by the Xorg server to determine if video modes are within the specifications of the monitor. This information should be available in the monitor's handbook. If this entry is omitted, a default range of 28\-33kHz is used. .TP 7 .BI "VertRefresh " "vertrefresh\-range" gives the range(s) of vertical refresh frequencies supported by the monitor. .I vertrefresh\-range may be a comma separated list of either discrete values or ranges of values. A range of values is two values separated by a dash. By default the values are in units of Hz. They may be specified in MHz or kHz if .B MHz or .B kHz is added to the end of the line. The data given here is used by the Xorg server to determine if video modes are within the specifications of the monitor. This information should be available in the monitor's handbook. If this entry is omitted, a default range of 43\-72Hz is used. .TP 7 .BI "DisplaySize " "width height" This optional entry gives the width and height, in millimetres, of the picture area of the monitor. If given this is used to calculate the horizontal and vertical pitch (DPI) of the screen. .TP 7 .BI "Gamma " "gamma\-value" .TP 7 .BI "Gamma " "red\-gamma green\-gamma blue\-gamma" This is an optional entry that can be used to specify the gamma correction for the monitor. It may be specified as either a single value or as three separate RGB values. The values should be in the range 0.1 to 10.0, and the default is 1.0. Not all drivers are capable of using this information. .TP 7 .BI "UseModes \*q" modesection\-id \*q Include the set of modes listed in the .B Modes section called .IR modesection\-id. This makes all of the modes defined in that section available for use by this monitor. .TP 7 .BI "Mode \*q" name \*q This is an optional multi-line entry that can be used to provide definitions for video modes for the monitor. In most cases this isn't necessary because the built-in set of VESA standard modes will be sufficient. The .B Mode keyword indicates the start of a multi-line video mode description. The mode description is terminated with the .B EndMode keyword. The mode description consists of the following entries: .RS 7 .TP 4 .BI "DotClock " clock is the dot (pixel) clock rate to be used for the mode. .TP 4 .BI "HTimings " "hdisp hsyncstart hsyncend htotal" specifies the horizontal timings for the mode. .TP 4 .BI "VTimings " "vdisp vsyncstart vsyncend vtotal" specifies the vertical timings for the mode. .TP 4 .BI "Flags \*q" flag \*q " ..." specifies an optional set of mode flags, each of which is a separate string in double quotes. .B \*qInterlace\*q indicates that the mode is interlaced. .B \*qDoubleScan\*q indicates a mode where each scanline is doubled. .B \*q+HSync\*q and .B \*q\-HSync\*q can be used to select the polarity of the HSync signal. .B \*q+VSync\*q and .B \*q\-VSync\*q can be used to select the polarity of the VSync signal. .B \*qComposite\*q can be used to specify composite sync on hardware where this is supported. Additionally, on some hardware, .B \*q+CSync\*q and .B \*q\-CSync\*q may be used to select the composite sync polarity. .TP 4 .BI "HSkew " hskew specifies the number of pixels (towards the right edge of the screen) by which the display enable signal is to be skewed. Not all drivers use this information. This option might become necessary to override the default value supplied by the server (if any). \(lqRoving\(rq horizontal lines indicate this value needs to be increased. If the last few pixels on a scan line appear on the left of the screen, this value should be decreased. .TP 4 .BI "VScan " vscan specifies the number of times each scanline is painted on the screen. Not all drivers use this information. Values less than 1 are treated as 1, which is the default. Generally, the .B \*qDoubleScan\*q .B Flag mentioned above doubles this value. .RE .TP 7 .BI "ModeLine \*q" name \*q " mode\-description" This entry is a more compact version of the .B Mode entry, and it also can be used to specify video modes for the monitor. This is a single line format for specifying video modes. In most cases this isn't necessary because the built\-in set of VESA standard modes will be sufficient. .PP .RS 7 The .I mode\-description is in four sections, the first three of which are mandatory. The first is the dot (pixel) clock. This is a single number specifying the pixel clock rate for the mode in MHz. The second section is a list of four numbers specifying the horizontal timings. These numbers are the .IR hdisp , .IR hsyncstart , .IR hsyncend , and .I htotal values. The third section is a list of four numbers specifying the vertical timings. These numbers are the .IR vdisp , .IR vsyncstart , .IR vsyncend , and .I vtotal values. The final section is a list of flags specifying other characteristics of the mode. .B Interlace indicates that the mode is interlaced. .B DoubleScan indicates a mode where each scanline is doubled. .B +HSync and .B \-HSync can be used to select the polarity of the HSync signal. .B +VSync and .B \-VSync can be used to select the polarity of the VSync signal. .B Composite can be used to specify composite sync on hardware where this is supported. Additionally, on some hardware, .B +CSync and .B \-CSync may be used to select the composite sync polarity. The .B HSkew and .B VScan options mentioned above in the .B Mode entry description can also be used here. .RE .TP 7 .BI "Option \*qDPMS\*q \*q" bool \*q This option controls whether the server should enable the DPMS extension for power management for this screen. The default is to enable the extension. .TP 7 .BI "Option \*qSyncOnGreen\*q \*q" bool \*q This option controls whether the video card should drive the sync signal on the green color pin. Not all cards support this option, and most monitors do not require it. The default is off. .TP 7 .BI "Option \*qPrimary\*q \*q" bool \*q This optional entry specifies that the monitor should be treated as the primary monitor. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qPreferredMode\*q \*q" name \*q This optional entry specifies a mode to be marked as the preferred initial mode of the monitor. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qZoomModes\*q \*q" name " " name " " ... \*q This optional entry specifies modes to be marked as zoom modes. It is possible to switch to the next and previous mode via .BR Ctrl+Alt+Keypad\-Plus " and " Ctrl+Alt+Keypad\-Minus . All these keypad available modes are selected from the screen mode list. This list is a copy of the compatibility output monitor mode list. Since this output is the output connected to the lowest dot-area monitor, as determined from its largest size mode, that monitor defines the available zoom modes. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qPosition\*q \*q" x " " y \*q This optional entry specifies the position of the monitor within the X screen. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qLeftOf\*q \*q" output \*q This optional entry specifies that the monitor should be positioned to the left of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qRightOf\*q \*q" output \*q This optional entry specifies that the monitor should be positioned to the right of the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qAbove\*q \*q" output \*q This optional entry specifies that the monitor should be positioned above the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qBelow\*q \*q" output \*q This optional entry specifies that the monitor should be positioned below the output (not monitor) of the given name. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qEnable\*q \*q" bool \*q This optional entry specifies whether the monitor should be turned on at startup. By default, the server will attempt to enable all connected monitors. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qDefaultModes\*q \*q" bool \*q This optional entry specifies whether the server should add supported default modes to the list of modes offered on this monitor. By default, the server will add default modes; you should only disable this if you can guarantee that EDID will be available at all times, or if you have added custom modelines which the server can use. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qMinClock\*q \*q" frequency \*q This optional entry specifies the minimum dot clock, in kHz, that is supported by the monitor. .TP 7 .BI "Option \*qMaxClock\*q \*q" frequency \*q This optional entry specifies the maximum dot clock, in kHz, that is supported by the monitor. .TP 7 .BI "Option \*qIgnore\*q \*q" bool \*q This optional entry specifies that the monitor should be ignored entirely, and not reported through RandR. This is useful if the hardware reports the presence of outputs that don't exist. (RandR 1.2-supporting drivers only) .TP 7 .BI "Option \*qRotate\*q \*q" rotation \*q This optional entry specifies the initial rotation of the given monitor. Valid values for rotation are \*qnormal\*q, \*qleft\*q, \*qright\*q, and \*qinverted\*q. (RandR 1.2-supporting drivers only) .SH "MODES SECTION" The config file may have multiple .B Modes sections, or none. These sections provide a way of defining sets of video modes independently of the .B Monitor sections. .B Monitor sections may include the definitions provided in these sections by using the .B UseModes keyword. In most cases the .B Modes sections are not necessary because the built\-in set of VESA standard modes will be sufficient. .PP .B Modes sections have the following format: .PP .RS 4 .nf .B "Section \*qModes\*q" .BI " Identifier \*q" name \*q .I " entries" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier entry specifies the unique name for this set of mode descriptions. The other entries permitted in .B Modes sections are the .B Mode and .B ModeLine entries that are described above in the .B Monitor section. .SH "SCREEN SECTION" The config file may have multiple .B Screen sections. There must be at least one, for the \(lqscreen\(rq being used. A \(lqscreen\(rq represents the binding of a graphics device .RB ( Device section) and a monitor .RB ( Monitor section). A .B Screen section is considered \(lqactive\(rq if it is referenced by an active .B ServerLayout section or by the .B \-screen command line option. If neither of those is present, the first .B Screen section found in the config file is considered the active one. .PP .B Screen sections have the following format: .PP .RS 4 .nf .B "Section \*qScreen\*q" .BI " Identifier \*q" name \*q .BI " Device \*q" devid \*q .BI " GPUDevice \*q" devid \*q .BI " Monitor \*q" monid \*q .I " entries" .I " ..." .BI " SubSection \*qDisplay\*q" .I " entries" .I " ... .B " EndSubSection" .I " ..." .B "EndSection" .fi .RE .PP The .B Identifier entry is mandatory. All others are optional. .PP The .B Identifier entry specifies the unique name for this screen. The .B Screen section provides information specific to the whole screen, including screen\-specific .BR Options . In multi\-head configurations, there will be multiple active .B Screen sections, one for each head. The entries available for this section are: .TP 7 .BI "Device \*q" device\-id \*q This entry specifies the .B Device section to be used for this screen. When multiple graphics cards are present, this is what ties a specific card to a screen. The .I device\-id must match the .B Identifier of a .B Device section in the config file. .TP 7 .BI "GPUDevice \*q" device\-id \*q This entry specifies the .B Device section to be used as a secondary GPU device for this screen. When multiple graphics cards are present, this is what ties a specific secondary card to a screen. The .I device\-id must match the .B Identifier of a .B Device section in the config file. This can be specified up to 4 times for a single screen. .TP 7 .BI "Monitor \*q" monitor\-id \*q specifies which monitor description is to be used for this screen. If a .B Monitor name is not specified, a default configuration is used. Currently the default configuration may not function as expected on all platforms. .TP 7 .BI "VideoAdaptor \*q" xv\-id \*q specifies an optional Xv video adaptor description to be used with this screen. .TP 7 .BI "DefaultDepth " depth specifies which color depth the server should use by default. The .B \-depth command line option can be used to override this. If neither is specified, the default depth is driver\-specific, but in most cases is 8. .TP 7 .BI "DefaultFbBpp " bpp specifies which framebuffer layout to use by default. The .B \-fbbpp command line option can be used to override this. In most cases the driver will chose the best default value for this. The only case where there is even a choice in this value is for depth 24, where some hardware supports both a packed 24 bit framebuffer layout and a sparse 32 bit framebuffer layout. .TP 7 .BI "MatchSeat " "seat\-id" Only apply this .B Screen section if X server was started with .B -seat .I seat\-id option. .TP 7 .B Options Various .B Option flags may be specified in the .B Screen section. Some are driver\-specific and are described in the driver documentation. Others are driver\-independent, and will eventually be described here. .\" XXX These should really be in an xaa man page. .TP 7 .BI "Option \*qAccel\*q" Enables 2D hardware acceleration. This option is on by default, but it may be necessary to turn it off if there are bugs in the driver. There are many options to disable specific accelerated operations, listed below. Note that disabling an operation will have no effect if the operation is not accelerated (whether due to lack of support in the hardware or in the driver). .TP 7 .BI "Option \*qGlxVendorLibrary\*q \*q" string \*q This option specifies a space-separated list of OpenGL vendor libraries to use for the screen. This may be used to select an alternate implementation for development, debugging, or alternate feature sets. Default: mesa. .TP 7 .BI "Option \*qInitPrimary\*q \*q" boolean \*q Use the Int10 module to initialize the primary graphics card. Normally, only secondary cards are soft-booted using the Int10 module, as the primary card has already been initialized by the BIOS at boot time. Default: false. .TP 7 .BI "Option \*qNoInt10\*q \*q" boolean \*q Disables the Int10 module, a module that uses the int10 call to the BIOS of the graphics card to initialize it. Default: false. .PP Each .B Screen section may optionally contain one or more .B Display subsections. Those subsections provide depth/fbbpp specific configuration information, and the one chosen depends on the depth and/or fbbpp that is being used for the screen. The .B Display subsection format is described in the section below. .SH "DISPLAY SUBSECTION" Each .B Screen section may have multiple .B Display subsections. The \(lqactive\(rq .B Display subsection is the first that matches the depth and/or fbbpp values being used, or failing that, the first that has neither a depth or fbbpp value specified. The .B Display subsections are optional. When there isn't one that matches the depth and/or fbbpp values being used, all the parameters that can be specified here fall back to their defaults. .PP .B Display subsections have the following format: .PP .RS 4 .nf .B " SubSection \*qDisplay\*q" .BI " Depth " depth .I " entries" .I " ..." .B " EndSubSection" .fi .RE .TP 7 .BI "Depth " depth This entry specifies what colour depth the .B Display subsection is to be used for. This entry is usually specified, but it may be omitted to create a match\-all .B Display subsection or when wishing to match only against the .B FbBpp parameter. The range of .I depth values that are allowed depends on the driver. Most drivers support 8, 15, 16 and 24. Some also support 1 and/or 4, and some may support other values (like 30). Note: .I depth means the number of bits in a pixel that are actually used to determine the pixel colour. 32 is not a valid .I depth value. Most hardware that uses 32 bits per pixel only uses 24 of them to hold the colour information, which means that the colour depth is 24, not 32. .TP 7 .BI "FbBpp " bpp This entry specifies the framebuffer format this .B Display subsection is to be used for. This entry is only needed when providing depth 24 configurations that allow a choice between a 24 bpp packed framebuffer format and a 32bpp sparse framebuffer format. In most cases this entry should not be used. .TP 7 .BI "Weight " "red\-weight green\-weight blue\-weight" This optional entry specifies the relative RGB weighting to be used for a screen is being used at depth 16 for drivers that allow multiple formats. This may also be specified from the command line with the .B \-weight option (see .BR Xorg(@appmansuffix@)). .TP 7 .BI "Virtual " "xdim ydim" This optional entry specifies the virtual screen resolution to be used. .I xdim must be a multiple of either 8 or 16 for most drivers, and a multiple of 32 when running in monochrome mode. The given value will be rounded down if this is not the case. Video modes which are too large for the specified virtual size will be rejected. If this entry is not present, the virtual screen resolution will be set to accommodate all the valid video modes given in the .B Modes entry. Some drivers/hardware combinations do not support virtual screens. Refer to the appropriate driver\-specific documentation for details. .TP 7 .BI "ViewPort " "x0 y0" This optional entry sets the upper left corner of the initial display. This is only relevant when the virtual screen resolution is different from the resolution of the initial video mode. If this entry is not given, then the initial display will be centered in the virtual display area. .TP 7 .BI "Modes \*q" mode\-name \*q " ..." This optional entry specifies the list of video modes to use. Each .I mode\-name specified must be in double quotes. They must correspond to those specified or referenced in the appropriate .B Monitor section (including implicitly referenced built\-in VESA standard modes). The server will delete modes from this list which don't satisfy various requirements. The first valid mode in this list will be the default display mode for startup. The list of valid modes is converted internally into a circular list. It is possible to switch to the next mode with .B Ctrl+Alt+Keypad\-Plus and to the previous mode with .BR Ctrl+Alt+Keypad\-Minus . When this entry is omitted, the valid modes referenced by the appropriate .B Monitor section will be used. If the .B Monitor section contains no modes, then the selection will be taken from the built-in VESA standard modes. .TP 7 .BI "Visual \*q" visual\-name \*q This optional entry sets the default root visual type. This may also be specified from the command line (see the .BR Xserver(@appmansuffix@) man page). The visual types available for depth 8 are (default is .BR PseudoColor ): .PP .RS 11 .nf .B StaticGray .B GrayScale .B StaticColor .B PseudoColor .B TrueColor .B DirectColor .fi .RE .PP .RS 7 The visual type available for the depths 15, 16 and 24 are (default is .BR TrueColor ): .PP .RS 4 .nf .B TrueColor .B DirectColor .fi .RE .PP Not all drivers support .B DirectColor at these depths. .PP The visual types available for the depth 4 are (default is .BR StaticColor ): .PP .RS 4 .nf .B StaticGray .B GrayScale .B StaticColor .B PseudoColor .fi .RE .PP The visual type available for the depth 1 (monochrome) is .BR StaticGray . .RE .TP 7 .BI "Black " "red green blue" This optional entry allows the \(lqblack\(rq colour to be specified. This is only supported at depth 1. The default is black. .TP 7 .BI "White " "red green blue" This optional entry allows the \(lqwhite\(rq colour to be specified. This is only supported at depth 1. The default is white. .TP 7 .B Options Option flags may be specified in the .B Display subsections. These may include driver\-specific options and driver\-independent options. The former are described in the driver\-specific documentation. Some of the latter are described above in the section about the .B Screen section, and they may also be included here. .SH "SERVERLAYOUT SECTION" The config file may have multiple .B ServerLayout sections. A \(lqserver layout\(rq represents the binding of one or more screens .RB ( Screen sections) and one or more input devices .RB ( InputDevice sections) to form a complete configuration. In multi\-head configurations, it also specifies the relative layout of the heads. A .B ServerLayout section is considered \(lqactive\(rq if it is referenced by the .B \-layout command line option or by an .B "Option \*qDefaultServerLayout\*q" entry in the .B ServerFlags section (the former takes precedence over the latter). If those options are not used, the first .B ServerLayout section found in the config file is considered the active one. If no .B ServerLayout sections are present, the single active screen and two active (core) input devices are selected as described in the relevant sections above. .PP .B ServerLayout sections have the following format: .PP .RS 4 .nf .B "Section \*qServerLayout\*q" .BI " Identifier \*q" name \*q .BI " Screen \*q" screen\-id \*q .I " ..." .BI " InputDevice \*q" idev\-id \*q .I " ..." .I " options" .I " ..." .B "EndSection" .fi .RE .PP Each .B ServerLayout section must have an .B Identifier entry and at least one .B Screen entry. .PP The .B Identifier entry specifies the unique name for this server layout. The .B ServerLayout section provides information specific to the whole session, including session\-specific .BR Options . The .B ServerFlags options (described above) may be specified here, and ones given here override those given in the .B ServerFlags section. .PP The entries that may be used in this section are described here. .TP 7 .BI "Screen " "screen\-num" " \*qscreen\-id\*q " "position\-information" One of these entries must be given for each screen being used in a session. The .I screen\-id field is mandatory, and specifies the .B Screen section being referenced. The .I screen\-num field is optional, and may be used to specify the screen number in multi\-head configurations. When this field is omitted, the screens will be numbered in the order that they are listed in. The numbering starts from 0, and must be consecutive. The .I position\-information field describes the way multiple screens are positioned. There are a number of different ways that this information can be provided: .RS 7 .TP 4 .I "x y" .TP 4 .BI "Absolute " "x y" These both specify that the upper left corner's coordinates are .RI ( x , y ). The .B Absolute keyword is optional. Some older versions of XFree86 (4.2 and earlier) don't recognise the .B Absolute keyword, so it's safest to just specify the coordinates without it. .TP 4 .BI "RightOf \*q" screen\-id \*q .TP 4 .BI "LeftOf \*q" screen\-id \*q .TP 4 .BI "Above \*q" screen\-id \*q .TP 4 .BI "Below \*q" screen\-id \*q .TP 4 .BI "Relative \*q" screen\-id \*q " x y" These give the screen's location relative to another screen. The first four position the screen immediately to the right, left, above or below the other screen. When positioning to the right or left, the top edges are aligned. When positioning above or below, the left edges are aligned. The .B Relative form specifies the offset of the screen's origin (upper left corner) relative to the origin of another screen. .RE .TP 7 .BI "InputDevice \*q" idev\-id "\*q \*q" option \*q " ..." One of these entries should be given for each input device being used in a session. Normally at least two are required, one each for the core pointer and keyboard devices. If either of those is missing, suitable .B InputDevice entries are searched for using the method described above in the .B INPUTDEVICE section. The .I idev\-id field is mandatory, and specifies the name of the .B InputDevice section being referenced. Multiple .I option fields may be specified, each in double quotes. The options permitted here are any that may also be given in the .B InputDevice sections. Normally only session\-specific input device options would be used here. The most commonly used options are: .PP .RS 11 .nf .B \*qCorePointer\*q .B \*qCoreKeyboard\*q .B \*qSendCoreEvents\*q .fi .RE .PP .RS 7 and the first two should normally be used to indicate the core pointer and core keyboard devices respectively. .RE .TP 7 .BI "MatchSeat " "seat\-id" Only apply this .B ServerLayout section if X server was started with .B -seat .I seat\-id option. .TP 7 .B Options In addition to the following, any option permitted in the .B ServerFlags section may also be specified here. When the same option appears in both places, the value given here overrides the one given in the .B ServerFlags section. .TP 7 .BI "Option \*qIsolateDevice\*q \*q" bus\-id \*q Restrict device resets to the specified .IR bus\-id . See the .B BusID option (described in .BR "DEVICE SECTION" , above) for the format of the .I bus\-id parameter. This option overrides .BR SingleCard , if specified. At present, only PCI devices can be isolated in this manner. .TP 7 .BI "Option \*qSingleCard\*q \*q" boolean \*q As .BR IsolateDevice , except that the bus ID of the first device in the layout is used. .PP Here is an example of a .B ServerLayout section for a dual headed configuration with two mice: .PP .RS 4 .nf .B "Section \*qServerLayout\*q" .B " Identifier \*qLayout 1\*q" .B " Screen \*qMGA 1\*q" .B " Screen \*qMGA 2\*q RightOf \*qMGA 1\*q" .B " InputDevice \*qKeyboard 1\*q \*qCoreKeyboard\*q" .B " InputDevice \*qMouse 1\*q \*qCorePointer\*q" .B " InputDevice \*qMouse 2\*q \*qSendCoreEvents\*q" .B " Option \*qBlankTime\*q \*q5\*q" .B "EndSection" .fi .RE .SH "DRI SECTION" This optional section is used to provide some information for the Direct Rendering Infrastructure. Details about the format of this section can be found on-line at .IR . .SH "VENDOR SECTION" The optional .B Vendor section may be used to provide vendor\-specific configuration information. Multiple .B Vendor sections may be present, and they may contain an .B Identifier entry and multiple .B Option flags. The data therein is not used in this release. .PP .SH "SEE ALSO" General: .BR X (@miscmansuffix@), .BR Xserver (@appmansuffix@), .BR Xorg (@appmansuffix@), .BR cvt (@appmansuffix@), .BR gtf (@appmansuffix@). .PP .B "Not all modules or interfaces are available on all platforms." .PP Display drivers: .BR apm (@drivermansuffix@), .BR ati (@drivermansuffix@), .BR chips (@drivermansuffix@), .BR cirrus (@drivermansuffix@), .BR cyrix (@drivermansuffix@), .BR fbdev (@drivermansuffix@), .BR glide (@drivermansuffix@), .BR glint (@drivermansuffix@), .BR i128 (@drivermansuffix@), .BR i740 (@drivermansuffix@), .BR imstt (@drivermansuffix@), .BR intel (@drivermansuffix@), .BR mga (@drivermansuffix@), .BR neomagic (@drivermansuffix@), .BR nv (@drivermansuffix@), .BR openchrome (@drivermansuffix@), .BR r128 (@drivermansuffix@), .BR radeon (@drivermansuffix@), .BR rendition (@drivermansuffix@), .BR savage (@drivermansuffix@), .BR s3virge (@drivermansuffix@), .BR siliconmotion (@drivermansuffix@), .BR sis (@drivermansuffix@), .BR sisusb (@drivermansuffix@), .BR sunbw2 (@drivermansuffix@), .BR suncg14 (@drivermansuffix@), .BR suncg3 (@drivermansuffix@), .BR suncg6 (@drivermansuffix@), .BR sunffb (@drivermansuffix@), .BR sunleo (@drivermansuffix@), .BR suntcx (@drivermansuffix@), .BR tdfx (@drivermansuffix@), .\" .BR tga (@drivermansuffix@), .BR trident (@drivermansuffix@), .BR tseng (@drivermansuffix@), .BR vesa (@drivermansuffix@), .BR vmware (@drivermansuffix@), .BR voodoo (@drivermansuffix@), .BR wsfb (@drivermansuffix@), .BR xgi (@drivermansuffix@), .BR xgixp (@drivermansuffix@). .PP Input drivers: .BR acecad (@drivermansuffix@), .BR citron (@drivermansuffix@), .BR elographics (@drivermansuffix@), .BR evdev (@drivermansuffix@), .BR fpit (@drivermansuffix@), .BR joystick (@drivermansuffix@), .BR kbd (@drivermansuffix@), .BR libinput (@drivermansuffix@), .BR mousedrv (@drivermansuffix@), .BR mutouch (@drivermansuffix@), .BR penmount (@drivermansuffix@), .BR synaptics (@drivermansuffix@), .BR vmmouse (@drivermansuffix@), .BR void (@drivermansuffix@), .BR wacom (@drivermansuffix@). .PP Other modules and interfaces: .BR exa (@drivermansuffix@), .BR fbdevhw (@drivermansuffix@), .\" .BR shadowfb (@drivermansuffix@), .BR v4l (@drivermansuffix@). .br .SH AUTHORS This manual page was largely rewritten by David Dawes .IR . xorg-server-21.1.16/hw/xfree86/man/xorg.conf.d.man0000644000175000017500000000006114757411105015132 .so man@filemansuffix@/xorg.conf.@filemansuffix@ xorg-server-21.1.16/hw/xfree86/man/Xorg.wrap.man0000644000175000017500000000624314757411105014704 .\" Xwrapper.wrap.@appmansuffix@ .\" .\" Copyright 2014 Red Hat, Inc. .\" .\" 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. .\" .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH Xorg.wrap @appmansuffix@ @xorgversion@ .SH NAME Xorg.wrap \- Xorg X server binary wrapper .SH DESCRIPTION The Xorg X server may need root rights to function properly. To start the Xorg X server with these rights your system is using a suid root wrapper installed as @suid_wrapper_dir@/Xorg.wrap which will execute the real X server which is installed as @suid_wrapper_dir@/Xorg. .PP By default Xorg.wrap will autodetect if root rights are necessary, and if not it will drop its elevated rights before starting the real X server. By default Xorg.wrap will only allow executing the real X server from login sessions on a physical console. .SH CONFIG FILE Xorg.wrap's default behavior can be overridden from the \fI@sysconfdir@/X11/Xwrapper.config\fP config file. Lines starting with a \fB#\fP in Xwrapper.config are considered comments and will be ignored. Any other non empty lines must take the form of \fBkey\fP = \fIvalue\fP. .TP 8 \fBallowed_users\fP = \fIrootonly\fP|\fIconsole\fP|\fIanybody\fP Specify which users may start the X server through the wrapper. Use \fIrootonly\fP to only allow root, use \fIconsole\fP to only allow users logged into a physical console, and use \fIanybody\fP to allow anybody. The default is \fIconsole\fP. .TP 8 \fBneeds_root_rights\fP = \fIyes\fP|\fIno\fP|\fIauto\fP Configure if the wrapper should drop its elevated (root) rights before starting the X server. Use \fIyes\fP to force execution as root, \fIno\fP to force execution with all suid rights dropped, and \fIauto\fP to let the wrapper auto-detect. The default is \fIauto\fP. .PP When auto-detecting the wrapper will drop rights if kms graphics are available and not drop them if no kms graphics are detected. If a system has multiple graphics cards and some are not kms capable auto-detection may fail, in this case manual configuration should be used. .SH "SEE ALSO" Xorg X server information: \fIXorg\fP(1) xorg-server-21.1.16/hw/xfree86/man/Xwrapper.config.man0000644000175000017500000000005714757411105016066 .so man@appmansuffix@/Xorg.wrap.@appmansuffix@ xorg-server-21.1.16/hw/xnest/0000755000175000017500000000000014757411135011475 5xorg-server-21.1.16/hw/xnest/meson.build0000644000175000017500000000136114757411105013555 srcs = [ 'Args.c', 'Color.c', 'Cursor.c', 'Display.c', 'Events.c', 'Font.c', 'GC.c', 'GCOps.c', 'Handlers.c', 'Init.c', 'Keyboard.c', 'Pixmap.c', 'Pointer.c', 'Screen.c', 'Visual.c', 'Window.c', '../../mi/miinitext.c', '../../mi/miinitext.h', ] executable( 'Xnest', srcs, include_directories: inc, dependencies: [ common_dep, xnest_dep, ], link_with: [ libxserver_main, libxserver, libxserver_xi_stubs, libxserver_xkb_stubs, ], c_args: '-DHAVE_XNEST_CONFIG_H', install: true, ) install_man(configure_file( input: 'man/Xnest.man', output: 'Xnest.1', configuration: manpage_config, )) xorg-server-21.1.16/hw/xnest/Makefile.am0000644000175000017500000000173114757411105013450 SUBDIRS = man bin_PROGRAMS = Xnest AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \ $(DIX_CFLAGS) \ $(XNESTMODULES_CFLAGS) SRCS = Args.c \ Args.h \ Color.c \ Color.h \ Cursor.c \ Display.c \ Display.h \ Drawable.h \ Events.c \ Events.h \ Font.c \ GC.c \ GCOps.c \ GCOps.h \ Handlers.c \ Handlers.h \ Init.c \ Init.h \ Keyboard.c \ Keyboard.h \ Pixmap.c \ Pointer.c \ Pointer.h \ Screen.c \ Screen.h \ Visual.c \ Visual.h \ Window.c \ XNCursor.h \ Xnest.h \ XNFont.h \ XNGC.h \ XNPixmap.h \ XNWindow.h \ xnest-config.h \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h XNEST_LIBS = \ @XNEST_LIBS@ \ $(top_builddir)/Xi/libXistubs.la Xnest_SOURCES = $(SRCS) Xnest_DEPENDENCIES = $(XNEST_LIBS) Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS) Xnest_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) EXTRA_DIST = icon \ screensaver relink: $(AM_V_at)rm -f Xnest$(EXEEXT) && $(MAKE) Xnest$(EXEEXT) xorg-server-21.1.16/hw/xnest/Makefile.in0000644000175000017500000011044414757411115013464 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xnest$(EXEEXT) subdir = hw/xnest ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = Args.$(OBJEXT) Color.$(OBJEXT) Cursor.$(OBJEXT) \ Display.$(OBJEXT) Events.$(OBJEXT) Font.$(OBJEXT) GC.$(OBJEXT) \ GCOps.$(OBJEXT) Handlers.$(OBJEXT) Init.$(OBJEXT) \ Keyboard.$(OBJEXT) Pixmap.$(OBJEXT) Pointer.$(OBJEXT) \ Screen.$(OBJEXT) Visual.$(OBJEXT) Window.$(OBJEXT) \ miinitext.$(OBJEXT) am_Xnest_OBJECTS = $(am__objects_1) Xnest_OBJECTS = $(am_Xnest_OBJECTS) am__DEPENDENCIES_1 = $(top_builddir)/Xi/libXistubs.la am__DEPENDENCIES_2 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = Xnest_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(Xnest_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/Args.Po ./$(DEPDIR)/Color.Po \ ./$(DEPDIR)/Cursor.Po ./$(DEPDIR)/Display.Po \ ./$(DEPDIR)/Events.Po ./$(DEPDIR)/Font.Po ./$(DEPDIR)/GC.Po \ ./$(DEPDIR)/GCOps.Po ./$(DEPDIR)/Handlers.Po \ ./$(DEPDIR)/Init.Po ./$(DEPDIR)/Keyboard.Po \ ./$(DEPDIR)/Pixmap.Po ./$(DEPDIR)/Pointer.Po \ ./$(DEPDIR)/Screen.Po ./$(DEPDIR)/Visual.Po \ ./$(DEPDIR)/Window.Po ./$(DEPDIR)/miinitext.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(Xnest_SOURCES) DIST_SOURCES = $(Xnest_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = \ @XNEST_LIBS@ \ $(top_builddir)/Xi/libXistubs.la XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \ $(DIX_CFLAGS) \ $(XNESTMODULES_CFLAGS) SRCS = Args.c \ Args.h \ Color.c \ Color.h \ Cursor.c \ Display.c \ Display.h \ Drawable.h \ Events.c \ Events.h \ Font.c \ GC.c \ GCOps.c \ GCOps.h \ Handlers.c \ Handlers.h \ Init.c \ Init.h \ Keyboard.c \ Keyboard.h \ Pixmap.c \ Pointer.c \ Pointer.h \ Screen.c \ Screen.h \ Visual.c \ Visual.h \ Window.c \ XNCursor.h \ Xnest.h \ XNFont.h \ XNGC.h \ XNPixmap.h \ XNWindow.h \ xnest-config.h \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h Xnest_SOURCES = $(SRCS) Xnest_DEPENDENCIES = $(XNEST_LIBS) Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS) Xnest_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) EXTRA_DIST = icon \ screensaver all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xnest/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xnest/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list Xnest$(EXEEXT): $(Xnest_OBJECTS) $(Xnest_DEPENDENCIES) $(EXTRA_Xnest_DEPENDENCIES) @rm -f Xnest$(EXEEXT) $(AM_V_CCLD)$(Xnest_LINK) $(Xnest_OBJECTS) $(Xnest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Args.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Color.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cursor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Display.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Events.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Font.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GC.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/GCOps.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Handlers.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Init.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Keyboard.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pixmap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Visual.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Window.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< miinitext.o: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c miinitext.obj: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/Args.Po -rm -f ./$(DEPDIR)/Color.Po -rm -f ./$(DEPDIR)/Cursor.Po -rm -f ./$(DEPDIR)/Display.Po -rm -f ./$(DEPDIR)/Events.Po -rm -f ./$(DEPDIR)/Font.Po -rm -f ./$(DEPDIR)/GC.Po -rm -f ./$(DEPDIR)/GCOps.Po -rm -f ./$(DEPDIR)/Handlers.Po -rm -f ./$(DEPDIR)/Init.Po -rm -f ./$(DEPDIR)/Keyboard.Po -rm -f ./$(DEPDIR)/Pixmap.Po -rm -f ./$(DEPDIR)/Pointer.Po -rm -f ./$(DEPDIR)/Screen.Po -rm -f ./$(DEPDIR)/Visual.Po -rm -f ./$(DEPDIR)/Window.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/Args.Po -rm -f ./$(DEPDIR)/Color.Po -rm -f ./$(DEPDIR)/Cursor.Po -rm -f ./$(DEPDIR)/Display.Po -rm -f ./$(DEPDIR)/Events.Po -rm -f ./$(DEPDIR)/Font.Po -rm -f ./$(DEPDIR)/GC.Po -rm -f ./$(DEPDIR)/GCOps.Po -rm -f ./$(DEPDIR)/Handlers.Po -rm -f ./$(DEPDIR)/Init.Po -rm -f ./$(DEPDIR)/Keyboard.Po -rm -f ./$(DEPDIR)/Pixmap.Po -rm -f ./$(DEPDIR)/Pointer.Po -rm -f ./$(DEPDIR)/Screen.Po -rm -f ./$(DEPDIR)/Visual.Po -rm -f ./$(DEPDIR)/Window.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS .PRECIOUS: Makefile relink: $(AM_V_at)rm -f Xnest$(EXEEXT) && $(MAKE) Xnest$(EXEEXT) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xnest/Args.c0000644000175000017500000001340614757411105012456 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" #include "Xnest.h" #include "Display.h" #include "Args.h" char *xnestDisplayName = NULL; Bool xnestSynchronize = False; Bool xnestFullGeneration = False; int xnestDefaultClass; Bool xnestUserDefaultClass = False; int xnestDefaultDepth; Bool xnestUserDefaultDepth = False; Bool xnestSoftwareScreenSaver = False; int xnestX; int xnestY; unsigned int xnestWidth; unsigned int xnestHeight; int xnestUserGeometry = 0; int xnestBorderWidth; Bool xnestUserBorderWidth = False; char *xnestWindowName = NULL; int xnestNumScreens = 0; Bool xnestDoDirectColormaps = False; Window xnestParentWindow = 0; int ddxProcessArgument(int argc, char *argv[], int i) { if (!strcmp(argv[i], "-display")) { if (++i < argc) { xnestDisplayName = argv[i]; return 2; } return 0; } if (!strcmp(argv[i], "-sync")) { xnestSynchronize = True; return 1; } if (!strcmp(argv[i], "-full")) { xnestFullGeneration = True; return 1; } if (!strcmp(argv[i], "-class")) { if (++i < argc) { if (!strcmp(argv[i], "StaticGray")) { xnestDefaultClass = StaticGray; xnestUserDefaultClass = True; return 2; } else if (!strcmp(argv[i], "GrayScale")) { xnestDefaultClass = GrayScale; xnestUserDefaultClass = True; return 2; } else if (!strcmp(argv[i], "StaticColor")) { xnestDefaultClass = StaticColor; xnestUserDefaultClass = True; return 2; } else if (!strcmp(argv[i], "PseudoColor")) { xnestDefaultClass = PseudoColor; xnestUserDefaultClass = True; return 2; } else if (!strcmp(argv[i], "TrueColor")) { xnestDefaultClass = TrueColor; xnestUserDefaultClass = True; return 2; } else if (!strcmp(argv[i], "DirectColor")) { xnestDefaultClass = DirectColor; xnestUserDefaultClass = True; return 2; } } return 0; } if (!strcmp(argv[i], "-cc")) { if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultClass) == 1) { if (xnestDefaultClass >= 0 && xnestDefaultClass <= 5) { xnestUserDefaultClass = True; /* lex the OS layer process it as well, so return 0 */ } } return 0; } if (!strcmp(argv[i], "-depth")) { if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultDepth) == 1) { if (xnestDefaultDepth > 0) { xnestUserDefaultDepth = True; return 2; } } return 0; } if (!strcmp(argv[i], "-sss")) { xnestSoftwareScreenSaver = True; return 1; } if (!strcmp(argv[i], "-geometry")) { if (++i < argc) { xnestUserGeometry = XParseGeometry(argv[i], &xnestX, &xnestY, &xnestWidth, &xnestHeight); if (xnestUserGeometry) return 2; } return 0; } if (!strcmp(argv[i], "-bw")) { if (++i < argc && sscanf(argv[i], "%i", &xnestBorderWidth) == 1) { if (xnestBorderWidth >= 0) { xnestUserBorderWidth = True; return 2; } } return 0; } if (!strcmp(argv[i], "-name")) { if (++i < argc) { xnestWindowName = argv[i]; return 2; } return 0; } if (!strcmp(argv[i], "-scrns")) { if (++i < argc && sscanf(argv[i], "%i", &xnestNumScreens) == 1) { if (xnestNumScreens > 0) { if (xnestNumScreens > MAXSCREENS) { ErrorF("Maximum number of screens is %d.\n", MAXSCREENS); xnestNumScreens = MAXSCREENS; } return 2; } } return 0; } if (!strcmp(argv[i], "-install")) { xnestDoDirectColormaps = True; return 1; } if (!strcmp(argv[i], "-parent")) { if (++i < argc) { xnestParentWindow = (XID) strtol(argv[i], (char **) NULL, 0); return 2; } } return 0; } void ddxUseMsg(void) { ErrorF("-display string display name of the real server\n"); ErrorF("-sync sinchronize with the real server\n"); ErrorF("-full utilize full regeneration\n"); ErrorF("-class string default visual class\n"); ErrorF("-depth int default depth\n"); ErrorF("-sss use software screen saver\n"); ErrorF("-geometry WxH+X+Y window size and position\n"); ErrorF("-bw int window border width\n"); ErrorF("-name string window name\n"); ErrorF("-scrns int number of screens to generate\n"); ErrorF("-install install colormaps directly\n"); } xorg-server-21.1.16/hw/xnest/Args.h0000644000175000017500000000222214757411105012455 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTARGS_H #define XNESTARGS_H extern char *xnestDisplayName; extern Bool xnestSynchronize; extern Bool xnestFullGeneration; extern int xnestDefaultClass; extern Bool xnestUserDefaultClass; extern int xnestDefaultDepth; extern Bool xnestUserDefaultDepth; extern Bool xnestSoftwareScreenSaver; extern int xnestX; extern int xnestY; extern unsigned int xnestWidth; extern unsigned int xnestHeight; extern int xnestUserGeometry; extern int xnestBorderWidth; extern Bool xnestUserBorderWidth; extern char *xnestWindowName; extern int xnestNumScreens; extern Bool xnestDoDirectColormaps; extern Window xnestParentWindow; #endif /* XNESTARGS_H */ xorg-server-21.1.16/hw/xnest/Color.c0000644000175000017500000003527214757411105012645 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "window.h" #include "windowstr.h" #include "colormapst.h" #include "resource.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "Color.h" #include "Visual.h" #include "XNWindow.h" #include "Args.h" DevPrivateKeyRec xnestColormapPrivateKeyRec; static DevPrivateKeyRec cmapScrPrivateKeyRec; #define cmapScrPrivateKey (&cmapScrPrivateKeyRec) #define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey)) #define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c)) Bool xnestCreateColormap(ColormapPtr pCmap) { VisualPtr pVisual; XColor *colors; int i, ncolors; Pixel red, green, blue; Pixel redInc, greenInc, blueInc; pVisual = pCmap->pVisual; ncolors = pVisual->ColormapEntries; xnestColormapPriv(pCmap)->colormap = XCreateColormap(xnestDisplay, xnestDefaultWindows[pCmap->pScreen->myNum], xnestVisual(pVisual), (pVisual->class & DynamicClass) ? AllocAll : AllocNone); switch (pVisual->class) { case StaticGray: /* read only */ colors = xallocarray(ncolors, sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(xnestDisplay, xnestColormap(pCmap), colors, ncolors); for (i = 0; i < ncolors; i++) { pCmap->red[i].co.local.red = colors[i].red; pCmap->red[i].co.local.green = colors[i].red; pCmap->red[i].co.local.blue = colors[i].red; } free(colors); break; case StaticColor: /* read only */ colors = xallocarray(ncolors, sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(xnestDisplay, xnestColormap(pCmap), colors, ncolors); for (i = 0; i < ncolors; i++) { pCmap->red[i].co.local.red = colors[i].red; pCmap->red[i].co.local.green = colors[i].green; pCmap->red[i].co.local.blue = colors[i].blue; } free(colors); break; case TrueColor: /* read only */ colors = xallocarray(ncolors, sizeof(XColor)); red = green = blue = 0L; redInc = lowbit(pVisual->redMask); greenInc = lowbit(pVisual->greenMask); blueInc = lowbit(pVisual->blueMask); for (i = 0; i < ncolors; i++) { colors[i].pixel = red | green | blue; red += redInc; if (red > pVisual->redMask) red = 0L; green += greenInc; if (green > pVisual->greenMask) green = 0L; blue += blueInc; if (blue > pVisual->blueMask) blue = 0L; } XQueryColors(xnestDisplay, xnestColormap(pCmap), colors, ncolors); for (i = 0; i < ncolors; i++) { pCmap->red[i].co.local.red = colors[i].red; pCmap->green[i].co.local.green = colors[i].green; pCmap->blue[i].co.local.blue = colors[i].blue; } free(colors); break; case GrayScale: /* read and write */ break; case PseudoColor: /* read and write */ break; case DirectColor: /* read and write */ break; } return True; } void xnestDestroyColormap(ColormapPtr pCmap) { XFreeColormap(xnestDisplay, xnestColormap(pCmap)); } #define SEARCH_PREDICATE \ (xnestWindow(pWin) != None && wColormap(pWin) == icws->cmapIDs[i]) static int xnestCountInstalledColormapWindows(WindowPtr pWin, void *ptr) { xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *) ptr; int i; for (i = 0; i < icws->numCmapIDs; i++) if (SEARCH_PREDICATE) { icws->numWindows++; return WT_DONTWALKCHILDREN; } return WT_WALKCHILDREN; } static int xnestGetInstalledColormapWindows(WindowPtr pWin, void *ptr) { xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *) ptr; int i; for (i = 0; i < icws->numCmapIDs; i++) if (SEARCH_PREDICATE) { icws->windows[icws->index++] = xnestWindow(pWin); return WT_DONTWALKCHILDREN; } return WT_WALKCHILDREN; } static Window *xnestOldInstalledColormapWindows = NULL; static int xnestNumOldInstalledColormapWindows = 0; static Bool xnestSameInstalledColormapWindows(Window *windows, int numWindows) { if (xnestNumOldInstalledColormapWindows != numWindows) return False; if (xnestOldInstalledColormapWindows == windows) return True; if (xnestOldInstalledColormapWindows == NULL || windows == NULL) return False; if (memcmp(xnestOldInstalledColormapWindows, windows, numWindows * sizeof(Window))) return False; return True; } void xnestSetInstalledColormapWindows(ScreenPtr pScreen) { xnestInstalledColormapWindows icws; int numWindows; icws.cmapIDs = xallocarray(pScreen->maxInstalledCmaps, sizeof(Colormap)); icws.numCmapIDs = xnestListInstalledColormaps(pScreen, icws.cmapIDs); icws.numWindows = 0; WalkTree(pScreen, xnestCountInstalledColormapWindows, (void *) &icws); if (icws.numWindows) { icws.windows = xallocarray(icws.numWindows + 1, sizeof(Window)); icws.index = 0; WalkTree(pScreen, xnestGetInstalledColormapWindows, (void *) &icws); icws.windows[icws.numWindows] = xnestDefaultWindows[pScreen->myNum]; numWindows = icws.numWindows + 1; } else { icws.windows = NULL; numWindows = 0; } free(icws.cmapIDs); if (!xnestSameInstalledColormapWindows(icws.windows, icws.numWindows)) { free(xnestOldInstalledColormapWindows); #ifdef _XSERVER64 { int i; Window64 *windows = xallocarray(numWindows, sizeof(Window64)); for (i = 0; i < numWindows; ++i) windows[i] = icws.windows[i]; XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], windows, numWindows); free(windows); } #else XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], icws.windows, numWindows); #endif xnestOldInstalledColormapWindows = icws.windows; xnestNumOldInstalledColormapWindows = icws.numWindows; #ifdef DUMB_WINDOW_MANAGERS /* This code is for dumb window managers. This will only work with default local visual colormaps. */ if (icws.numWindows) { WindowPtr pWin; Visual *visual; ColormapPtr pCmap; pWin = xnestWindowPtr(icws.windows[0]); visual = xnestVisualFromID(pScreen, wVisual(pWin)); if (visual == xnestDefaultVisual(pScreen)) dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); else dixLookupResourceByType((void **) &pCmap, pScreen->defColormap, RT_COLORMAP, serverClient, DixUseAccess); XSetWindowColormap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], xnestColormap(pCmap)); } #endif /* DUMB_WINDOW_MANAGERS */ } else free(icws.windows); } void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen) { free(xnestOldInstalledColormapWindows); #ifdef _XSERVER64 { Window64 window; window = xnestScreenSaverWindows[pScreen->myNum]; XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], &window, 1); xnestScreenSaverWindows[pScreen->myNum] = window; } #else XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], &xnestScreenSaverWindows[pScreen->myNum], 1); #endif /* _XSERVER64 */ xnestOldInstalledColormapWindows = NULL; xnestNumOldInstalledColormapWindows = 0; xnestDirectUninstallColormaps(pScreen); } void xnestDirectInstallColormaps(ScreenPtr pScreen) { int i, n; Colormap pCmapIDs[MAXCMAPS]; if (!xnestDoDirectColormaps) return; n = (*pScreen->ListInstalledColormaps) (pScreen, pCmapIDs); for (i = 0; i < n; i++) { ColormapPtr pCmap; dixLookupResourceByType((void **) &pCmap, pCmapIDs[i], RT_COLORMAP, serverClient, DixInstallAccess); if (pCmap) XInstallColormap(xnestDisplay, xnestColormap(pCmap)); } } void xnestDirectUninstallColormaps(ScreenPtr pScreen) { int i, n; Colormap pCmapIDs[MAXCMAPS]; if (!xnestDoDirectColormaps) return; n = (*pScreen->ListInstalledColormaps) (pScreen, pCmapIDs); for (i = 0; i < n; i++) { ColormapPtr pCmap; dixLookupResourceByType((void **) &pCmap, pCmapIDs[i], RT_COLORMAP, serverClient, DixUninstallAccess); if (pCmap) XUninstallColormap(xnestDisplay, xnestColormap(pCmap)); } } void xnestInstallColormap(ColormapPtr pCmap) { ColormapPtr pOldCmap = GetInstalledColormap(pCmap->pScreen); if (pCmap != pOldCmap) { xnestDirectUninstallColormaps(pCmap->pScreen); /* Uninstall pInstalledMap. Notify all interested parties. */ if (pOldCmap != (ColormapPtr) None) WalkTree(pCmap->pScreen, TellLostMap, (void *) &pOldCmap->mid); SetInstalledColormap(pCmap->pScreen, pCmap); WalkTree(pCmap->pScreen, TellGainedMap, (void *) &pCmap->mid); xnestSetInstalledColormapWindows(pCmap->pScreen); xnestDirectInstallColormaps(pCmap->pScreen); } } void xnestUninstallColormap(ColormapPtr pCmap) { ColormapPtr pCurCmap = GetInstalledColormap(pCmap->pScreen); if (pCmap == pCurCmap) { if (pCmap->mid != pCmap->pScreen->defColormap) { dixLookupResourceByType((void **) &pCurCmap, pCmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); (*pCmap->pScreen->InstallColormap) (pCurCmap); } } } static Bool xnestInstalledDefaultColormap = False; int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs) { if (xnestInstalledDefaultColormap) { *pCmapIDs = GetInstalledColormap(pScreen)->mid; return 1; } else return 0; } void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors) { if (pCmap->pVisual->class & DynamicClass) #ifdef _XSERVER64 { int i; XColor *pColors64 = xallocarray(nColors, sizeof(XColor)); for (i = 0; i < nColors; ++i) { pColors64[i].pixel = pColors[i].pixel; pColors64[i].red = pColors[i].red; pColors64[i].green = pColors[i].green; pColors64[i].blue = pColors[i].blue; pColors64[i].flags = pColors[i].flags; } XStoreColors(xnestDisplay, xnestColormap(pCmap), pColors64, nColors); free(pColors64); } #else XStoreColors(xnestDisplay, xnestColormap(pCmap), (XColor *) pColors, nColors); #endif } void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen, unsigned short *pBlue, VisualPtr pVisual) { int shift; unsigned int lim; shift = 16 - pVisual->bitsPerRGBValue; lim = (1 << pVisual->bitsPerRGBValue) - 1; if ((pVisual->class == PseudoColor) || (pVisual->class == DirectColor)) { /* rescale to rgb bits */ *pRed = ((*pRed >> shift) * 65535) / lim; *pGreen = ((*pGreen >> shift) * 65535) / lim; *pBlue = ((*pBlue >> shift) * 65535) / lim; } else if (pVisual->class == GrayScale) { /* rescale to gray then rgb bits */ *pRed = (30L * *pRed + 59L * *pGreen + 11L * *pBlue) / 100; *pBlue = *pGreen = *pRed = ((*pRed >> shift) * 65535) / lim; } else if (pVisual->class == StaticGray) { unsigned int limg; limg = pVisual->ColormapEntries - 1; /* rescale to gray then [0..limg] then [0..65535] then rgb bits */ *pRed = (30L * *pRed + 59L * *pGreen + 11L * *pBlue) / 100; *pRed = ((((*pRed * (limg + 1))) >> 16) * 65535) / limg; *pBlue = *pGreen = *pRed = ((*pRed >> shift) * 65535) / lim; } else { unsigned limr, limg, limb; limr = pVisual->redMask >> pVisual->offsetRed; limg = pVisual->greenMask >> pVisual->offsetGreen; limb = pVisual->blueMask >> pVisual->offsetBlue; /* rescale to [0..limN] then [0..65535] then rgb bits */ *pRed = ((((((*pRed * (limr + 1)) >> 16) * 65535) / limr) >> shift) * 65535) / lim; *pGreen = ((((((*pGreen * (limg + 1)) >> 16) * 65535) / limg) >> shift) * 65535) / lim; *pBlue = ((((((*pBlue * (limb + 1)) >> 16) * 65535) / limb) >> shift) * 65535) / lim; } } Bool xnestCreateDefaultColormap(ScreenPtr pScreen) { VisualPtr pVisual; ColormapPtr pCmap; unsigned short zero = 0, ones = 0xFFFF; Pixel wp, bp; if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++); if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &pCmap, (pVisual->class & DynamicClass) ? AllocNone : AllocAll, 0) != Success) return False; wp = pScreen->whitePixel; bp = pScreen->blackPixel; if ((AllocColor(pCmap, &ones, &ones, &ones, &wp, 0) != Success) || (AllocColor(pCmap, &zero, &zero, &zero, &bp, 0) != Success)) return FALSE; pScreen->whitePixel = wp; pScreen->blackPixel = bp; (*pScreen->InstallColormap) (pCmap); xnestInstalledDefaultColormap = True; return True; } xorg-server-21.1.16/hw/xnest/Color.h0000644000175000017500000000355614757411105012652 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTCOLOR_H #define XNESTCOLOR_H #define DUMB_WINDOW_MANAGERS #define MAXCMAPS 1 #define MINCMAPS 1 typedef struct { Colormap colormap; } xnestPrivColormap; typedef struct { int numCmapIDs; Colormap *cmapIDs; int numWindows; Window *windows; int index; } xnestInstalledColormapWindows; extern DevPrivateKeyRec xnestColormapPrivateKeyRec; #define xnestColormapPriv(pCmap) \ ((xnestPrivColormap *) dixLookupPrivate(&(pCmap)->devPrivates, &xnestColormapPrivateKeyRec)) #define xnestColormap(pCmap) (xnestColormapPriv(pCmap)->colormap) #define xnestPixel(pixel) (pixel) Bool xnestCreateColormap(ColormapPtr pCmap); void xnestDestroyColormap(ColormapPtr pCmap); void xnestSetInstalledColormapWindows(ScreenPtr pScreen); void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen); void xnestDirectInstallColormaps(ScreenPtr pScreen); void xnestDirectUninstallColormaps(ScreenPtr pScreen); void xnestInstallColormap(ColormapPtr pCmap); void xnestUninstallColormap(ColormapPtr pCmap); int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap * pCmapIDs); void xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors); void xnestResolveColor(unsigned short *pRed, unsigned short *pGreen, unsigned short *pBlue, VisualPtr pVisual); Bool xnestCreateDefaultColormap(ScreenPtr pScreen); #endif /* XNESTCOLOR_H */ xorg-server-21.1.16/hw/xnest/Cursor.c0000644000175000017500000001161514757411105013037 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "cursor.h" #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" #include "mipointrst.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "XNCursor.h" #include "Visual.h" #include "Keyboard.h" #include "Args.h" xnestCursorFuncRec xnestCursorFuncs = { NULL }; Bool xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { XImage *ximage; Pixmap source, mask; XColor fg_color, bg_color; unsigned long valuemask; XGCValues values; valuemask = GCFunction | GCPlaneMask | GCForeground | GCBackground | GCClipMask; values.function = GXcopy; values.plane_mask = AllPlanes; values.foreground = 1L; values.background = 0L; values.clip_mask = None; XChangeGC(xnestDisplay, xnestBitmapGC, valuemask, &values); source = XCreatePixmap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], pCursor->bits->width, pCursor->bits->height, 1); mask = XCreatePixmap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], pCursor->bits->width, pCursor->bits->height, 1); ximage = XCreateImage(xnestDisplay, xnestDefaultVisual(pScreen), 1, XYBitmap, 0, (char *) pCursor->bits->source, pCursor->bits->width, pCursor->bits->height, BitmapPad(xnestDisplay), 0); XPutImage(xnestDisplay, source, xnestBitmapGC, ximage, 0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height); XFree(ximage); ximage = XCreateImage(xnestDisplay, xnestDefaultVisual(pScreen), 1, XYBitmap, 0, (char *) pCursor->bits->mask, pCursor->bits->width, pCursor->bits->height, BitmapPad(xnestDisplay), 0); XPutImage(xnestDisplay, mask, xnestBitmapGC, ximage, 0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height); XFree(ximage); fg_color.red = pCursor->foreRed; fg_color.green = pCursor->foreGreen; fg_color.blue = pCursor->foreBlue; bg_color.red = pCursor->backRed; bg_color.green = pCursor->backGreen; bg_color.blue = pCursor->backBlue; xnestSetCursorPriv(pCursor, pScreen, calloc(1, sizeof(xnestPrivCursor))); xnestCursor(pCursor, pScreen) = XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color, pCursor->bits->xhot, pCursor->bits->yhot); XFreePixmap(xnestDisplay, source); XFreePixmap(xnestDisplay, mask); return True; } Bool xnestUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen)); free(xnestGetCursorPriv(pCursor, pScreen)); return True; } void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed) { XColor fg_color, bg_color; fg_color.red = pCursor->foreRed; fg_color.green = pCursor->foreGreen; fg_color.blue = pCursor->foreBlue; bg_color.red = pCursor->backRed; bg_color.green = pCursor->backGreen; bg_color.blue = pCursor->backBlue; XRecolorCursor(xnestDisplay, xnestCursor(pCursor, pScreen), &fg_color, &bg_color); } void xnestSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { if (pCursor) { XDefineCursor(xnestDisplay, xnestDefaultWindows[pScreen->myNum], xnestCursor(pCursor, pScreen)); } } void xnestMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { } Bool xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { xnestCursorFuncPtr pScreenPriv; pScreenPriv = (xnestCursorFuncPtr) dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey); return pScreenPriv->spriteFuncs->DeviceCursorInitialize(pDev, pScreen); } void xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { xnestCursorFuncPtr pScreenPriv; pScreenPriv = (xnestCursorFuncPtr) dixLookupPrivate(&pScreen->devPrivates, xnestCursorScreenKey); pScreenPriv->spriteFuncs->DeviceCursorCleanup(pDev, pScreen); } xorg-server-21.1.16/hw/xnest/Display.c0000644000175000017500000001536614757411105013176 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" #include "Xnest.h" #include "Display.h" #include "Init.h" #include "Args.h" #include "icon" #include "screensaver" Display *xnestDisplay = NULL; XVisualInfo *xnestVisuals; int xnestNumVisuals; int xnestDefaultVisualIndex; Colormap *xnestDefaultColormaps; static unsigned int xnestNumDefaultColormaps; int *xnestDepths; int xnestNumDepths; XPixmapFormatValues *xnestPixmapFormats; int xnestNumPixmapFormats; Pixel xnestBlackPixel; Pixel xnestWhitePixel; Drawable xnestDefaultDrawables[MAXDEPTH + 1]; Pixmap xnestIconBitmap; Pixmap xnestScreenSaverPixmap; XlibGC xnestBitmapGC; unsigned long xnestEventMask; #ifdef __SUNPRO_C /* prevent "Function has no return statement" error for x_io_error_handler */ #pragma does_not_return(exit) #endif static int _X_NORETURN x_io_error_handler(Display * dpy) { ErrorF("Lost connection to X server: %s\n", strerror(errno)); CloseWellKnownConnections(); OsCleanup(1); exit(1); } void xnestOpenDisplay(int argc, char *argv[]) { XVisualInfo vi; long mask; int i, j; if (!xnestDoFullGeneration) return; XSetIOErrorHandler(x_io_error_handler); xnestCloseDisplay(); xnestDisplay = XOpenDisplay(xnestDisplayName); if (xnestDisplay == NULL) FatalError("Unable to open display \"%s\".\n", XDisplayName(xnestDisplayName)); if (xnestSynchronize) XSynchronize(xnestDisplay, True); mask = VisualScreenMask; vi.screen = DefaultScreen(xnestDisplay); xnestVisuals = XGetVisualInfo(xnestDisplay, mask, &vi, &xnestNumVisuals); if (xnestNumVisuals == 0 || xnestVisuals == NULL) FatalError("Unable to find any visuals.\n"); if (xnestUserDefaultClass || xnestUserDefaultDepth) { xnestDefaultVisualIndex = UNDEFINED; for (i = 0; i < xnestNumVisuals; i++) if ((!xnestUserDefaultClass || xnestVisuals[i].class == xnestDefaultClass) && (!xnestUserDefaultDepth || xnestVisuals[i].depth == xnestDefaultDepth)) { xnestDefaultVisualIndex = i; break; } if (xnestDefaultVisualIndex == UNDEFINED) FatalError("Unable to find desired default visual.\n"); } else { vi.visualid = XVisualIDFromVisual(DefaultVisual(xnestDisplay, DefaultScreen (xnestDisplay))); xnestDefaultVisualIndex = 0; for (i = 0; i < xnestNumVisuals; i++) if (vi.visualid == xnestVisuals[i].visualid) xnestDefaultVisualIndex = i; } xnestNumDefaultColormaps = xnestNumVisuals; xnestDefaultColormaps = xallocarray(xnestNumDefaultColormaps, sizeof(Colormap)); for (i = 0; i < xnestNumDefaultColormaps; i++) xnestDefaultColormaps[i] = XCreateColormap(xnestDisplay, DefaultRootWindow (xnestDisplay), xnestVisuals[i].visual, AllocNone); xnestDepths = XListDepths(xnestDisplay, DefaultScreen(xnestDisplay), &xnestNumDepths); xnestPixmapFormats = XListPixmapFormats(xnestDisplay, &xnestNumPixmapFormats); xnestBlackPixel = BlackPixel(xnestDisplay, DefaultScreen(xnestDisplay)); xnestWhitePixel = WhitePixel(xnestDisplay, DefaultScreen(xnestDisplay)); if (xnestParentWindow != (Window) 0) xnestEventMask = StructureNotifyMask; else xnestEventMask = 0L; for (i = 0; i <= MAXDEPTH; i++) xnestDefaultDrawables[i] = None; for (i = 0; i < xnestNumPixmapFormats; i++) for (j = 0; j < xnestNumDepths; j++) if (xnestPixmapFormats[i].depth == 1 || xnestPixmapFormats[i].depth == xnestDepths[j]) { xnestDefaultDrawables[xnestPixmapFormats[i].depth] = XCreatePixmap(xnestDisplay, DefaultRootWindow(xnestDisplay), 1, 1, xnestPixmapFormats[i].depth); } xnestBitmapGC = XCreateGC(xnestDisplay, xnestDefaultDrawables[1], 0L, NULL); if (!(xnestUserGeometry & XValue)) xnestX = 0; if (!(xnestUserGeometry & YValue)) xnestY = 0; if (xnestParentWindow == 0) { if (!(xnestUserGeometry & WidthValue)) xnestWidth = 3 * DisplayWidth(xnestDisplay, DefaultScreen(xnestDisplay)) / 4; if (!(xnestUserGeometry & HeightValue)) xnestHeight = 3 * DisplayHeight(xnestDisplay, DefaultScreen(xnestDisplay)) / 4; } if (!xnestUserBorderWidth) xnestBorderWidth = 1; xnestIconBitmap = XCreateBitmapFromData(xnestDisplay, DefaultRootWindow(xnestDisplay), (char *) icon_bits, icon_width, icon_height); xnestScreenSaverPixmap = XCreatePixmapFromBitmapData(xnestDisplay, DefaultRootWindow(xnestDisplay), (char *) screensaver_bits, screensaver_width, screensaver_height, xnestWhitePixel, xnestBlackPixel, DefaultDepth(xnestDisplay, DefaultScreen(xnestDisplay))); } void xnestCloseDisplay(void) { if (!xnestDoFullGeneration || !xnestDisplay) return; /* If xnestDoFullGeneration all x resources will be destroyed upon closing the display connection. There is no need to generate extra protocol. */ free(xnestDefaultColormaps); XFree(xnestVisuals); XFree(xnestDepths); XFree(xnestPixmapFormats); XCloseDisplay(xnestDisplay); } xorg-server-21.1.16/hw/xnest/Display.h0000644000175000017500000000246114757411105013173 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTCOMMON_H #define XNESTCOMMON_H #define UNDEFINED -1 #define MAXDEPTH 32 #define MAXVISUALSPERDEPTH 256 extern Display *xnestDisplay; extern XVisualInfo *xnestVisuals; extern int xnestNumVisuals; extern int xnestDefaultVisualIndex; extern Colormap *xnestDefaultColormaps; extern int xnestNumDefaultClormaps; extern int *xnestDepths; extern int xnestNumDepths; extern XPixmapFormatValues *xnestPixmapFormats; extern int xnestNumPixmapFormats; extern Pixel xnestBlackPixel; extern Pixel xnestWhitePixel; extern Drawable xnestDefaultDrawables[MAXDEPTH + 1]; extern Pixmap xnestIconBitmap; extern Pixmap xnestScreenSaverPixmap; extern XlibGC xnestBitmapGC; extern unsigned long xnestEventMask; void xnestOpenDisplay(int argc, char *argv[]); void xnestCloseDisplay(void); #endif /* XNESTCOMMON_H */ xorg-server-21.1.16/hw/xnest/Drawable.h0000644000175000017500000000143514757411105013307 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTDRAWABLE_H #define XNESTDRAWABLE_H #include "XNWindow.h" #include "XNPixmap.h" #define xnestDrawable(pDrawable) \ (WindowDrawable((pDrawable)->type) ? \ xnestWindow((WindowPtr)pDrawable) : \ xnestPixmap((PixmapPtr)pDrawable)) #endif /* XNESTDRAWABLE_H */ xorg-server-21.1.16/hw/xnest/Events.c0000644000175000017500000001373014757411105013026 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #include "inputstr.h" #include "inpututils.h" #include "mi.h" #include "Xnest.h" #include "Args.h" #include "Color.h" #include "Display.h" #include "Screen.h" #include "XNWindow.h" #include "Events.h" #include "Keyboard.h" #include "Pointer.h" #include "mipointer.h" CARD32 lastEventTime = 0; void ProcessInputEvents(void) { mieqProcessInputEvents(); } int TimeSinceLastInputEvent(void) { if (lastEventTime == 0) lastEventTime = GetTimeInMillis(); return GetTimeInMillis() - lastEventTime; } void SetTimeSinceLastInputEvent(void) { lastEventTime = GetTimeInMillis(); } static Bool xnestExposurePredicate(Display * dpy, XEvent * event, char *args) { return event->type == Expose || event->type == ProcessedExpose; } static Bool xnestNotExposurePredicate(Display * dpy, XEvent * event, char *args) { return !xnestExposurePredicate(dpy, event, args); } void xnestCollectExposures(void) { XEvent X; WindowPtr pWin; RegionRec Rgn; BoxRec Box; while (XCheckIfEvent(xnestDisplay, &X, xnestExposurePredicate, NULL)) { pWin = xnestWindowPtr(X.xexpose.window); if (pWin && X.xexpose.width && X.xexpose.height) { Box.x1 = pWin->drawable.x + wBorderWidth(pWin) + X.xexpose.x; Box.y1 = pWin->drawable.y + wBorderWidth(pWin) + X.xexpose.y; Box.x2 = Box.x1 + X.xexpose.width; Box.y2 = Box.y1 + X.xexpose.height; RegionInit(&Rgn, &Box, 1); miSendExposures(pWin, &Rgn, Box.x1, Box.y1); } } } void xnestQueueKeyEvent(int type, unsigned int keycode) { lastEventTime = GetTimeInMillis(); QueueKeyboardEvents(xnestKeyboardDevice, type, keycode); } void xnestCollectEvents(void) { XEvent X; int valuators[2]; ValuatorMask mask; ScreenPtr pScreen; while (XCheckIfEvent(xnestDisplay, &X, xnestNotExposurePredicate, NULL)) { switch (X.type) { case KeyPress: xnestUpdateModifierState(X.xkey.state); xnestQueueKeyEvent(KeyPress, X.xkey.keycode); break; case KeyRelease: xnestUpdateModifierState(X.xkey.state); xnestQueueKeyEvent(KeyRelease, X.xkey.keycode); break; case ButtonPress: valuator_mask_set_range(&mask, 0, 0, NULL); xnestUpdateModifierState(X.xkey.state); lastEventTime = GetTimeInMillis(); QueuePointerEvents(xnestPointerDevice, ButtonPress, X.xbutton.button, POINTER_RELATIVE, &mask); break; case ButtonRelease: valuator_mask_set_range(&mask, 0, 0, NULL); xnestUpdateModifierState(X.xkey.state); lastEventTime = GetTimeInMillis(); QueuePointerEvents(xnestPointerDevice, ButtonRelease, X.xbutton.button, POINTER_RELATIVE, &mask); break; case MotionNotify: valuators[0] = X.xmotion.x; valuators[1] = X.xmotion.y; valuator_mask_set_range(&mask, 0, 2, valuators); lastEventTime = GetTimeInMillis(); QueuePointerEvents(xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask); break; case FocusIn: if (X.xfocus.detail != NotifyInferior) { pScreen = xnestScreen(X.xfocus.window); if (pScreen) xnestDirectInstallColormaps(pScreen); } break; case FocusOut: if (X.xfocus.detail != NotifyInferior) { pScreen = xnestScreen(X.xfocus.window); if (pScreen) xnestDirectUninstallColormaps(pScreen); } break; case KeymapNotify: break; case EnterNotify: if (X.xcrossing.detail != NotifyInferior) { pScreen = xnestScreen(X.xcrossing.window); if (pScreen) { NewCurrentScreen(inputInfo.pointer, pScreen, X.xcrossing.x, X.xcrossing.y); valuators[0] = X.xcrossing.x; valuators[1] = X.xcrossing.y; valuator_mask_set_range(&mask, 0, 2, valuators); lastEventTime = GetTimeInMillis(); QueuePointerEvents(xnestPointerDevice, MotionNotify, 0, POINTER_ABSOLUTE, &mask); xnestDirectInstallColormaps(pScreen); } } break; case LeaveNotify: if (X.xcrossing.detail != NotifyInferior) { pScreen = xnestScreen(X.xcrossing.window); if (pScreen) { xnestDirectUninstallColormaps(pScreen); } } break; case DestroyNotify: if (xnestParentWindow != (Window) 0 && X.xdestroywindow.window == xnestParentWindow) exit(0); break; case CirculateNotify: case ConfigureNotify: case GravityNotify: case MapNotify: case ReparentNotify: case UnmapNotify: break; default: ErrorF("xnest warning: unhandled event\n"); break; } } } xorg-server-21.1.16/hw/xnest/Events.h0000644000175000017500000000151514757411105013031 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTEVENTS_H #define XNESTEVENTS_H #include #define ProcessedExpose (LASTEvent + 1) extern CARD32 lastEventTime; void SetTimeSinceLastInputEvent(void); void xnestCollectExposures(void); void xnestCollectEvents(void); void xnestQueueKeyEvent(int type, unsigned int keycode); #endif /* XNESTEVENTS_H */ xorg-server-21.1.16/hw/xnest/Font.c0000644000175000017500000000405314757411105012466 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "regionstr.h" #include #include #include "dixfontstr.h" #include "scrnintstr.h" #include "Xnest.h" #include "Display.h" #include "XNFont.h" int xnestFontPrivateIndex; Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) { void *priv; Atom name_atom, value_atom; int nprops; FontPropPtr props; int i; const char *name; xfont2_font_set_private(pFont, xnestFontPrivateIndex, NULL); name_atom = MakeAtom("FONT", 4, True); value_atom = 0L; nprops = pFont->info.nprops; props = pFont->info.props; for (i = 0; i < nprops; i++) if (props[i].name == name_atom) { value_atom = props[i].value; break; } if (!value_atom) return False; name = NameForAtom(value_atom); if (!name) return False; priv = (void *) malloc(sizeof(xnestPrivFont)); xfont2_font_set_private(pFont, xnestFontPrivateIndex, priv); xnestFontPriv(pFont)->font_struct = XLoadQueryFont(xnestDisplay, name); if (!xnestFontStruct(pFont)) return False; return True; } Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) { if (xnestFontPriv(pFont)) { if (xnestFontStruct(pFont)) XFreeFont(xnestDisplay, xnestFontStruct(pFont)); free(xnestFontPriv(pFont)); xfont2_font_set_private(pFont, xnestFontPrivateIndex, NULL); } return True; } xorg-server-21.1.16/hw/xnest/GC.c0000644000175000017500000001626014757411105012054 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "gcstruct.h" #include "windowstr.h" #include "pixmapstr.h" #include "scrnintstr.h" #include #include "mistruct.h" #include "region.h" #include "Xnest.h" #include "Display.h" #include "XNGC.h" #include "GCOps.h" #include "Drawable.h" #include "XNFont.h" #include "Color.h" DevPrivateKeyRec xnestGCPrivateKeyRec; static GCFuncs xnestFuncs = { xnestValidateGC, xnestChangeGC, xnestCopyGC, xnestDestroyGC, xnestChangeClip, xnestDestroyClip, xnestCopyClip, }; static GCOps xnestOps = { xnestFillSpans, xnestSetSpans, xnestPutImage, xnestCopyArea, xnestCopyPlane, xnestPolyPoint, xnestPolylines, xnestPolySegment, xnestPolyRectangle, xnestPolyArc, xnestFillPolygon, xnestPolyFillRect, xnestPolyFillArc, xnestPolyText8, xnestPolyText16, xnestImageText8, xnestImageText16, xnestImageGlyphBlt, xnestPolyGlyphBlt, xnestPushPixels }; Bool xnestCreateGC(GCPtr pGC) { pGC->funcs = &xnestFuncs; pGC->ops = &xnestOps; pGC->miTranslate = 1; xnestGCPriv(pGC)->gc = XCreateGC(xnestDisplay, xnestDefaultDrawables[pGC->depth], 0L, NULL); return True; } void xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { } void xnestChangeGC(GCPtr pGC, unsigned long mask) { XGCValues values; if (mask & GCFunction) values.function = pGC->alu; if (mask & GCPlaneMask) values.plane_mask = pGC->planemask; if (mask & GCForeground) values.foreground = xnestPixel(pGC->fgPixel); if (mask & GCBackground) values.background = xnestPixel(pGC->bgPixel); if (mask & GCLineWidth) values.line_width = pGC->lineWidth; if (mask & GCLineStyle) values.line_style = pGC->lineStyle; if (mask & GCCapStyle) values.cap_style = pGC->capStyle; if (mask & GCJoinStyle) values.join_style = pGC->joinStyle; if (mask & GCFillStyle) values.fill_style = pGC->fillStyle; if (mask & GCFillRule) values.fill_rule = pGC->fillRule; if (mask & GCTile) { if (pGC->tileIsPixel) mask &= ~GCTile; else values.tile = xnestPixmap(pGC->tile.pixmap); } if (mask & GCStipple) values.stipple = xnestPixmap(pGC->stipple); if (mask & GCTileStipXOrigin) values.ts_x_origin = pGC->patOrg.x; if (mask & GCTileStipYOrigin) values.ts_y_origin = pGC->patOrg.y; if (mask & GCFont) values.font = xnestFont(pGC->font); if (mask & GCSubwindowMode) values.subwindow_mode = pGC->subWindowMode; if (mask & GCGraphicsExposures) values.graphics_exposures = pGC->graphicsExposures; if (mask & GCClipXOrigin) values.clip_x_origin = pGC->clipOrg.x; if (mask & GCClipYOrigin) values.clip_y_origin = pGC->clipOrg.y; if (mask & GCClipMask) /* this is handled in change clip */ mask &= ~GCClipMask; if (mask & GCDashOffset) values.dash_offset = pGC->dashOffset; if (mask & GCDashList) { mask &= ~GCDashList; XSetDashes(xnestDisplay, xnestGC(pGC), pGC->dashOffset, (char *) pGC->dash, pGC->numInDashList); } if (mask & GCArcMode) values.arc_mode = pGC->arcMode; if (mask) XChangeGC(xnestDisplay, xnestGC(pGC), mask, &values); } void xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { XCopyGC(xnestDisplay, xnestGC(pGCSrc), mask, xnestGC(pGCDst)); } void xnestDestroyGC(GCPtr pGC) { XFreeGC(xnestDisplay, xnestGC(pGC)); } void xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) { int i; BoxPtr pBox; XRectangle *pRects; xnestDestroyClip(pGC); switch (type) { case CT_NONE: XSetClipMask(xnestDisplay, xnestGC(pGC), None); pValue = NULL; break; case CT_REGION: nRects = RegionNumRects((RegionPtr) pValue); pRects = xallocarray(nRects, sizeof(*pRects)); pBox = RegionRects((RegionPtr) pValue); for (i = nRects; i-- > 0;) { pRects[i].x = pBox[i].x1; pRects[i].y = pBox[i].y1; pRects[i].width = pBox[i].x2 - pBox[i].x1; pRects[i].height = pBox[i].y2 - pBox[i].y1; } XSetClipRectangles(xnestDisplay, xnestGC(pGC), 0, 0, pRects, nRects, Unsorted); free((char *) pRects); break; case CT_PIXMAP: XSetClipMask(xnestDisplay, xnestGC(pGC), xnestPixmap((PixmapPtr) pValue)); /* * Need to change into region, so subsequent uses are with * current pixmap contents. */ pGC->clientClip = (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue); (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) pValue); pValue = pGC->clientClip; break; case CT_UNSORTED: XSetClipRectangles(xnestDisplay, xnestGC(pGC), pGC->clipOrg.x, pGC->clipOrg.y, (XRectangle *) pValue, nRects, Unsorted); break; case CT_YSORTED: XSetClipRectangles(xnestDisplay, xnestGC(pGC), pGC->clipOrg.x, pGC->clipOrg.y, (XRectangle *) pValue, nRects, YSorted); break; case CT_YXSORTED: XSetClipRectangles(xnestDisplay, xnestGC(pGC), pGC->clipOrg.x, pGC->clipOrg.y, (XRectangle *) pValue, nRects, YXSorted); break; case CT_YXBANDED: XSetClipRectangles(xnestDisplay, xnestGC(pGC), pGC->clipOrg.x, pGC->clipOrg.y, (XRectangle *) pValue, nRects, YXBanded); break; } switch (type) { default: break; case CT_UNSORTED: case CT_YSORTED: case CT_YXSORTED: case CT_YXBANDED: /* server clip representation is a region */ pGC->clientClip = RegionFromRects(nRects, (xRectangle *) pValue, type); free(pValue); pValue = pGC->clientClip; break; } pGC->clientClip = pValue; } void xnestDestroyClip(GCPtr pGC) { if (pGC->clientClip) { RegionDestroy(pGC->clientClip); XSetClipMask(xnestDisplay, xnestGC(pGC), None); pGC->clientClip = NULL; } } void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc) { if (pGCSrc->clientClip) { RegionPtr pRgn = RegionCreate(NULL, 1); RegionCopy(pRgn, pGCSrc->clientClip); xnestChangeClip(pGCDst, CT_REGION, pRgn, 0); } else { xnestDestroyClip(pGCDst); } } xorg-server-21.1.16/hw/xnest/GCOps.c0000644000175000017500000002326614757411105012542 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "regionstr.h" #include #include "gcstruct.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "region.h" #include "servermd.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "XNGC.h" #include "XNFont.h" #include "GCOps.h" #include "Drawable.h" #include "Visual.h" void xnestFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans, xPoint * pPoints, int *pWidths, int fSorted) { ErrorF("xnest warning: function xnestFillSpans not implemented\n"); } void xnestSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc, xPoint * pPoints, int *pWidths, int nSpans, int fSorted) { ErrorF("xnest warning: function xnestSetSpans not implemented\n"); } void xnestGetSpans(DrawablePtr pDrawable, int maxWidth, DDXPointPtr pPoints, int *pWidths, int nSpans, char *pBuffer) { ErrorF("xnest warning: function xnestGetSpans not implemented\n"); } void xnestQueryBestSize(int class, unsigned short *pWidth, unsigned short *pHeight, ScreenPtr pScreen) { unsigned int width, height; width = *pWidth; height = *pHeight; XQueryBestSize(xnestDisplay, class, xnestDefaultWindows[pScreen->myNum], width, height, &width, &height); *pWidth = width; *pHeight = height; } void xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { XImage *ximage; ximage = XCreateImage(xnestDisplay, xnestDefaultVisual(pDrawable->pScreen), depth, format, leftPad, (char *) pImage, w, h, BitmapPad(xnestDisplay), (format == ZPixmap) ? PixmapBytePad(w, depth) : BitmapBytePad(w + leftPad)); if (ximage) { XPutImage(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), ximage, 0, 0, x, y, w, h); XFree(ximage); } } static int xnestIgnoreErrorHandler (Display *dpy, XErrorEvent *event) { return False; /* return value is ignored */ } void xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *pImage) { XImage *ximage; int length; int (*old_handler)(Display*, XErrorEvent*); /* we may get BadMatch error when xnest window is minimized */ XSync(xnestDisplay, False); old_handler = XSetErrorHandler (xnestIgnoreErrorHandler); ximage = XGetImage(xnestDisplay, xnestDrawable(pDrawable), x, y, w, h, planeMask, format); XSetErrorHandler(old_handler); if (ximage) { length = ximage->bytes_per_line * ximage->height; memmove(pImage, ximage->data, length); XDestroyImage(ximage); } } static Bool xnestBitBlitPredicate(Display * dpy, XEvent * event, char *args) { return event->type == GraphicsExpose || event->type == NoExpose; } static RegionPtr xnestBitBlitHelper(GCPtr pGC) { if (!pGC->graphicsExposures) return NullRegion; else { XEvent event; RegionPtr pReg, pTmpReg; BoxRec Box; Bool pending, overlap; pReg = RegionCreate(NULL, 1); pTmpReg = RegionCreate(NULL, 1); if (!pReg || !pTmpReg) return NullRegion; pending = True; while (pending) { XIfEvent(xnestDisplay, &event, xnestBitBlitPredicate, NULL); switch (event.type) { case NoExpose: pending = False; break; case GraphicsExpose: Box.x1 = event.xgraphicsexpose.x; Box.y1 = event.xgraphicsexpose.y; Box.x2 = event.xgraphicsexpose.x + event.xgraphicsexpose.width; Box.y2 = event.xgraphicsexpose.y + event.xgraphicsexpose.height; RegionReset(pTmpReg, &Box); RegionAppend(pReg, pTmpReg); pending = event.xgraphicsexpose.count; break; } } RegionDestroy(pTmpReg); RegionValidate(pReg, &overlap); return pReg; } } RegionPtr xnestCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { XCopyArea(xnestDisplay, xnestDrawable(pSrcDrawable), xnestDrawable(pDstDrawable), xnestGC(pGC), srcx, srcy, width, height, dstx, dsty); return xnestBitBlitHelper(pGC); } RegionPtr xnestCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long plane) { XCopyPlane(xnestDisplay, xnestDrawable(pSrcDrawable), xnestDrawable(pDstDrawable), xnestGC(pGC), srcx, srcy, width, height, dstx, dsty, plane); return xnestBitBlitHelper(pGC); } void xnestPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints, DDXPointPtr pPoints) { XDrawPoints(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XPoint *) pPoints, nPoints, mode); } void xnestPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints, DDXPointPtr pPoints) { XDrawLines(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XPoint *) pPoints, nPoints, mode); } void xnestPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments, xSegment * pSegments) { XDrawSegments(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XSegment *) pSegments, nSegments); } void xnestPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRectangles, xRectangle *pRectangles) { XDrawRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XRectangle *) pRectangles, nRectangles); } void xnestPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs) { XDrawArcs(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XArc *) pArcs, nArcs); } void xnestFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode, int nPoints, DDXPointPtr pPoints) { XFillPolygon(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XPoint *) pPoints, nPoints, shape, mode); } void xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles, xRectangle *pRectangles) { XFillRectangles(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XRectangle *) pRectangles, nRectangles); } void xnestPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs) { XFillArcs(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), (XArc *) pArcs, nArcs); } int xnestPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *string) { int width; XDrawString(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), x, y, string, count); width = XTextWidth(xnestFontStruct(pGC->font), string, count); return width + x; } int xnestPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *string) { int width; XDrawString16(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), x, y, (XChar2b *) string, count); width = XTextWidth16(xnestFontStruct(pGC->font), (XChar2b *) string, count); return width + x; } void xnestImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *string) { XDrawImageString(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), x, y, string, count); } void xnestImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *string) { XDrawImageString16(xnestDisplay, xnestDrawable(pDrawable), xnestGC(pGC), x, y, (XChar2b *) string, count); } void xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, void *pGlyphBase) { ErrorF("xnest warning: function xnestImageGlyphBlt not implemented\n"); } void xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, void *pGlyphBase) { ErrorF("xnest warning: function xnestPolyGlyphBlt not implemented\n"); } void xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDst, int width, int height, int x, int y) { /* only works for solid bitmaps */ if (pGC->fillStyle == FillSolid) { XSetStipple(xnestDisplay, xnestGC(pGC), xnestPixmap(pBitmap)); XSetTSOrigin(xnestDisplay, xnestGC(pGC), x, y); XSetFillStyle(xnestDisplay, xnestGC(pGC), FillStippled); XFillRectangle(xnestDisplay, xnestDrawable(pDst), xnestGC(pGC), x, y, width, height); XSetFillStyle(xnestDisplay, xnestGC(pGC), FillSolid); } else ErrorF("xnest warning: function xnestPushPixels not implemented\n"); } xorg-server-21.1.16/hw/xnest/GCOps.h0000644000175000017500000000724714757411105012550 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTGCOPS_H #define XNESTGCOPS_H void xnestFillSpans(DrawablePtr pDrawable, GCPtr pGC, int nSpans, xPoint * pPoints, int *pWidths, int fSorted); void xnestSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pSrc, xPoint * pPoints, int *pWidths, int nSpans, int fSorted); void xnestGetSpans(DrawablePtr pDrawable, int maxWidth, DDXPointPtr pPoints, int *pWidths, int nSpans, char *pBuffer); void xnestQueryBestSize(int class, unsigned short *pWidth, unsigned short *pHeight, ScreenPtr pScreen); void xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage); void xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int format, unsigned long planeMask, char *pImage); RegionPtr xnestCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty); RegionPtr xnestCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long plane); void xnestPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints, DDXPointPtr pPoints); void xnestPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int nPoints, DDXPointPtr pPoints); void xnestPolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSegments, xSegment * pSegments); void xnestPolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRectangles, xRectangle *pRectangles); void xnestPolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs); void xnestFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode, int nPoints, DDXPointPtr pPoints); void xnestPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRectangles, xRectangle *pRectangles); void xnestPolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs); int xnestPolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *string); int xnestPolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *string); void xnestImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *string); void xnestImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *string); void xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, void *pGlyphBase); void xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, void *pGlyphBase); void xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int width, int height, int x, int y); #endif /* XNESTGCOPS_H */ xorg-server-21.1.16/hw/xnest/Handlers.c0000644000175000017500000000176114757411105013323 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #include "Xnest.h" #include "Display.h" #include "Events.h" #include "Handlers.h" void xnestBlockHandler(void *blockData, void *timeout) { xnestCollectExposures(); XFlush(xnestDisplay); } void xnestWakeupHandler(void *blockData, int result) { xnestCollectEvents(); } xorg-server-21.1.16/hw/xnest/Handlers.h0000644000175000017500000000130314757411105013320 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTHANDLERS_H #define XNESTHANDLERS_H void xnestBlockHandler(void *blockData, void *timeout); void xnestWakeupHandler(void *blockData, int result); #endif /* XNESTHANDLERS_H */ xorg-server-21.1.16/hw/xnest/Init.c0000644000175000017500000000735214757411105012470 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #include "mi.h" #include #include "dixfontstr.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "Pointer.h" #include "Keyboard.h" #include "Handlers.h" #include "Events.h" #include "Init.h" #include "Args.h" #include "Drawable.h" #include "XNGC.h" #include "XNFont.h" #ifdef DPMSExtension #include "dpmsproc.h" #endif Bool xnestDoFullGeneration = True; #ifdef GLXEXT void GlxExtensionInit(void) { } #endif void InitOutput(ScreenInfo * screen_info, int argc, char *argv[]) { int i, j; xnestOpenDisplay(argc, argv); screen_info->imageByteOrder = ImageByteOrder(xnestDisplay); screen_info->bitmapScanlineUnit = BitmapUnit(xnestDisplay); screen_info->bitmapScanlinePad = BitmapPad(xnestDisplay); screen_info->bitmapBitOrder = BitmapBitOrder(xnestDisplay); screen_info->numPixmapFormats = 0; for (i = 0; i < xnestNumPixmapFormats; i++) for (j = 0; j < xnestNumDepths; j++) if ((xnestPixmapFormats[i].depth == 1) || (xnestPixmapFormats[i].depth == xnestDepths[j])) { screen_info->formats[screen_info->numPixmapFormats].depth = xnestPixmapFormats[i].depth; screen_info->formats[screen_info->numPixmapFormats].bitsPerPixel = xnestPixmapFormats[i].bits_per_pixel; screen_info->formats[screen_info->numPixmapFormats].scanlinePad = xnestPixmapFormats[i].scanline_pad; screen_info->numPixmapFormats++; break; } xnestFontPrivateIndex = xfont2_allocate_font_private_index(); if (!xnestNumScreens) xnestNumScreens = 1; for (i = 0; i < xnestNumScreens; i++) AddScreen(xnestOpenScreen, argc, argv); xnestNumScreens = screen_info->numScreens; xnestDoFullGeneration = xnestFullGeneration; } static void xnestNotifyConnection(int fd, int ready, void *data) { xnestCollectEvents(); } void InitInput(int argc, char *argv[]) { int rc; rc = AllocDevicePair(serverClient, "Xnest", &xnestPointerDevice, &xnestKeyboardDevice, xnestPointerProc, xnestKeyboardProc, FALSE); if (rc != Success) FatalError("Failed to init Xnest default devices.\n"); mieqInit(); SetNotifyFd(XConnectionNumber(xnestDisplay), xnestNotifyConnection, X_NOTIFY_READ, NULL); RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL); } void CloseInput(void) { mieqFini(); } void ddxGiveUp(enum ExitCode error) { xnestDoFullGeneration = True; xnestCloseDisplay(); } #ifdef __APPLE__ void DarwinHandleGUI(int argc, char *argv[]) { } #endif void OsVendorInit(void) { return; } void OsVendorFatalError(const char *f, va_list args) { return; } #if defined(DDXBEFORERESET) void ddxBeforeReset(void) { return; } #endif #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { } #endif xorg-server-21.1.16/hw/xnest/Init.h0000644000175000017500000000115414757411105012467 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTINIT_H #define XNESTINIT_H extern Bool xnestDoFullGeneration; #endif /* XNESTINIT_H */ xorg-server-21.1.16/hw/xnest/Keyboard.c0000644000175000017500000001775314757411105013333 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #include #include "screenint.h" #include "inputstr.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "Keyboard.h" #include "Args.h" #include "Events.h" #include #include "xkbsrv.h" #include extern Bool XkbQueryExtension(Display * /* dpy */ , int * /* opcodeReturn */ , int * /* eventBaseReturn */ , int * /* errorBaseReturn */ , int * /* majorRtrn */ , int * /* minorRtrn */ ); extern XkbDescPtr XkbGetKeyboard(Display * /* dpy */ , unsigned int /* which */ , unsigned int /* deviceSpec */ ); extern Status XkbGetControls(Display * /* dpy */ , unsigned long /* which */ , XkbDescPtr /* desc */ ); DeviceIntPtr xnestKeyboardDevice = NULL; void xnestBell(int volume, DeviceIntPtr pDev, void *ctrl, int cls) { XBell(xnestDisplay, volume); } void DDXRingBell(int volume, int pitch, int duration) { XBell(xnestDisplay, volume); } void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl) { #if 0 unsigned long value_mask; XKeyboardControl values; int i; value_mask = KBKeyClickPercent | KBBellPercent | KBBellPitch | KBBellDuration | KBAutoRepeatMode; values.key_click_percent = ctrl->click; values.bell_percent = ctrl->bell; values.bell_pitch = ctrl->bell_pitch; values.bell_duration = ctrl->bell_duration; values.auto_repeat_mode = ctrl->autoRepeat ? AutoRepeatModeOn : AutoRepeatModeOff; XChangeKeyboardControl(xnestDisplay, value_mask, &values); /* value_mask = KBKey | KBAutoRepeatMode; At this point, we need to walk through the vector and compare it to the current server vector. If there are differences, report them. */ value_mask = KBLed | KBLedMode; for (i = 1; i <= 32; i++) { values.led = i; values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn : LedModeOff; XChangeKeyboardControl(xnestDisplay, value_mask, &values); } #endif } int xnestKeyboardProc(DeviceIntPtr pDev, int onoff) { XModifierKeymap *modifier_keymap; KeySym *keymap; int mapWidth; int min_keycode, max_keycode; KeySymsRec keySyms; CARD8 modmap[MAP_LENGTH]; int i, j; XKeyboardState values; XkbDescPtr xkb; int op, event, error, major, minor; switch (onoff) { case DEVICE_INIT: XDisplayKeycodes(xnestDisplay, &min_keycode, &max_keycode); #ifdef _XSERVER64 { KeySym64 *keymap64; int len; keymap64 = XGetKeyboardMapping(xnestDisplay, min_keycode, max_keycode - min_keycode + 1, &mapWidth); len = (max_keycode - min_keycode + 1) * mapWidth; keymap = xallocarray(len, sizeof(KeySym)); for (i = 0; i < len; ++i) keymap[i] = keymap64[i]; XFree(keymap64); } #else keymap = XGetKeyboardMapping(xnestDisplay, min_keycode, max_keycode - min_keycode + 1, &mapWidth); #endif memset(modmap, 0, sizeof(modmap)); modifier_keymap = XGetModifierMapping(xnestDisplay); for (j = 0; j < 8; j++) for (i = 0; i < modifier_keymap->max_keypermod; i++) { CARD8 keycode; if ((keycode = modifier_keymap->modifiermap[j * modifier_keymap-> max_keypermod + i])) modmap[keycode] |= 1 << j; } XFreeModifiermap(modifier_keymap); keySyms.minKeyCode = min_keycode; keySyms.maxKeyCode = max_keycode; keySyms.mapWidth = mapWidth; keySyms.map = keymap; if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) { ErrorF("Unable to initialize XKEYBOARD extension.\n"); goto XkbError; } xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd); if (xkb == NULL || xkb->geom == NULL) { ErrorF("Couldn't get keyboard.\n"); goto XkbError; } XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb); InitKeyboardDeviceStruct(pDev, NULL, xnestBell, xnestChangeKeyboardControl); XkbApplyMappingChange(pDev, &keySyms, keySyms.minKeyCode, keySyms.maxKeyCode - keySyms.minKeyCode + 1, modmap, serverClient); XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); XkbFreeKeyboard(xkb, 0, False); free(keymap); break; case DEVICE_ON: xnestEventMask |= XNEST_KEYBOARD_EVENT_MASK; for (i = 0; i < xnestNumScreens; i++) XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); break; case DEVICE_OFF: xnestEventMask &= ~XNEST_KEYBOARD_EVENT_MASK; for (i = 0; i < xnestNumScreens; i++) XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); break; case DEVICE_CLOSE: break; } return Success; XkbError: XGetKeyboardControl(xnestDisplay, &values); memmove((char *) defaultKeyboardControl.autoRepeats, (char *) values.auto_repeats, sizeof(values.auto_repeats)); InitKeyboardDeviceStruct(pDev, NULL, xnestBell, xnestChangeKeyboardControl); free(keymap); return Success; } void xnestUpdateModifierState(unsigned int state) { DeviceIntPtr pDev = xnestKeyboardDevice; KeyClassPtr keyc = pDev->key; int i; CARD8 mask; int xkb_state; if (!pDev) return; xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state); state = state & 0xff; if (xkb_state == state) return; for (i = 0, mask = 1; i < 8; i++, mask <<= 1) { int key; /* Modifier is down, but shouldn't be */ if ((xkb_state & mask) && !(state & mask)) { int count = keyc->modifierKeyCount[i]; for (key = 0; key < MAP_LENGTH; key++) if (keyc->xkbInfo->desc->map->modmap[key] & mask) { if (mask == LockMask) { xnestQueueKeyEvent(KeyPress, key); xnestQueueKeyEvent(KeyRelease, key); } else if (key_is_down(pDev, key, KEY_PROCESSED)) xnestQueueKeyEvent(KeyRelease, key); if (--count == 0) break; } } /* Modifier should be down, but isn't */ if (!(xkb_state & mask) && (state & mask)) for (key = 0; key < MAP_LENGTH; key++) if (keyc->xkbInfo->desc->map->modmap[key] & mask) { xnestQueueKeyEvent(KeyPress, key); if (mask == LockMask) xnestQueueKeyEvent(KeyRelease, key); break; } } } xorg-server-21.1.16/hw/xnest/Keyboard.h0000644000175000017500000000174214757411105013327 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTKEYBOARD_H #define XNESTKEYBOARD_H #define XNEST_KEYBOARD_EVENT_MASK \ (KeyPressMask | KeyReleaseMask | FocusChangeMask | KeymapStateMask) extern DeviceIntPtr xnestKeyboardDevice; void xnestBell(int volume, DeviceIntPtr pDev, void *ctrl, int cls); void xnestChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl * ctrl); int xnestKeyboardProc(DeviceIntPtr pDev, int onoff); void xnestUpdateModifierState(unsigned int state); #endif /* XNESTKEYBOARD_H */ xorg-server-21.1.16/hw/xnest/Pixmap.c0000644000175000017500000001034014757411105013012 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "regionstr.h" #include "pixmapstr.h" #include "scrnintstr.h" #include "gc.h" #include "servermd.h" #include "privates.h" #include "mi.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "XNPixmap.h" DevPrivateKeyRec xnestPixmapPrivateKeyRec; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint) { PixmapPtr pPixmap; pPixmap = AllocatePixmap(pScreen, 0); if (!pPixmap) return NullPixmap; pPixmap->drawable.type = DRAWABLE_PIXMAP; pPixmap->drawable.class = 0; pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = depth; pPixmap->drawable.id = 0; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->drawable.pScreen = pScreen; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->refcnt = 1; pPixmap->devKind = PixmapBytePad(width, depth); pPixmap->usage_hint = usage_hint; if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, xnestDefaultWindows[pScreen->myNum], width, height, depth); else xnestPixmapPriv(pPixmap)->pixmap = 0; return pPixmap; } Bool xnestDestroyPixmap(PixmapPtr pPixmap) { if (--pPixmap->refcnt) return TRUE; XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); FreePixmap(pPixmap); return TRUE; } Bool xnestModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { if(!xnestPixmapPriv(pPixmap)->pixmap && width > 0 && height > 0) { xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, xnestDefaultWindows[pPixmap->drawable.pScreen->myNum], width, height, depth); } return miModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); } RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap) { XImage *ximage; register RegionPtr pReg, pTmpReg; register int x, y; unsigned long previousPixel, currentPixel; BoxRec Box = { 0, 0, 0, 0 }; Bool overlap; ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0, pPixmap->drawable.width, pPixmap->drawable.height, 1, XYPixmap); pReg = RegionCreate(NULL, 1); pTmpReg = RegionCreate(NULL, 1); if (!pReg || !pTmpReg) { XDestroyImage(ximage); return NullRegion; } for (y = 0; y < pPixmap->drawable.height; y++) { Box.y1 = y; Box.y2 = y + 1; previousPixel = 0L; for (x = 0; x < pPixmap->drawable.width; x++) { currentPixel = XGetPixel(ximage, x, y); if (previousPixel != currentPixel) { if (previousPixel == 0L) { /* left edge */ Box.x1 = x; } else if (currentPixel == 0L) { /* right edge */ Box.x2 = x; RegionReset(pTmpReg, &Box); RegionAppend(pReg, pTmpReg); } previousPixel = currentPixel; } } if (previousPixel != 0L) { /* right edge because of the end of pixmap */ Box.x2 = pPixmap->drawable.width; RegionReset(pTmpReg, &Box); RegionAppend(pReg, pTmpReg); } } RegionDestroy(pTmpReg); XDestroyImage(ximage); RegionValidate(pReg, &overlap); return pReg; } xorg-server-21.1.16/hw/xnest/Pointer.c0000644000175000017500000000610214757411105013175 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "screenint.h" #include "inputstr.h" #include "input.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" #include "mipointer.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "Pointer.h" #include "Args.h" #include "xserver-properties.h" #include "exevents.h" /* For XIGetKnownProperty */ DeviceIntPtr xnestPointerDevice = NULL; void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl) { XChangePointerControl(xnestDisplay, True, True, ctrl->num, ctrl->den, ctrl->threshold); } int xnestPointerProc(DeviceIntPtr pDev, int onoff) { CARD8 map[MAXBUTTONS]; Atom btn_labels[MAXBUTTONS] = { 0 }; Atom axes_labels[2] = { 0 }; int nmap; int i; switch (onoff) { case DEVICE_INIT: nmap = XGetPointerMapping(xnestDisplay, map, MAXBUTTONS); for (i = 0; i <= nmap; i++) map[i] = i; /* buttons are already mapped */ btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); XGetPointerControl(xnestDisplay, &defaultPointerControl.num, &defaultPointerControl.den, &defaultPointerControl.threshold); InitPointerDeviceStruct(&pDev->public, map, nmap, btn_labels, xnestChangePointerControl, GetMotionHistorySize(), 2, axes_labels); break; case DEVICE_ON: xnestEventMask |= XNEST_POINTER_EVENT_MASK; for (i = 0; i < xnestNumScreens; i++) XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); break; case DEVICE_OFF: xnestEventMask &= ~XNEST_POINTER_EVENT_MASK; for (i = 0; i < xnestNumScreens; i++) XSelectInput(xnestDisplay, xnestDefaultWindows[i], xnestEventMask); break; case DEVICE_CLOSE: break; } return Success; } xorg-server-21.1.16/hw/xnest/Pointer.h0000644000175000017500000000163014757411105013203 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTPOINTER_H #define XNESTPOINTER_H #define MAXBUTTONS 256 #define XNEST_POINTER_EVENT_MASK \ (ButtonPressMask | ButtonReleaseMask | PointerMotionMask | \ EnterWindowMask | LeaveWindowMask) extern DeviceIntPtr xnestPointerDevice; void xnestChangePointerControl(DeviceIntPtr pDev, PtrCtrl * ctrl); int xnestPointerProc(DeviceIntPtr pDev, int onoff); #endif /* XNESTPOINTER_H */ xorg-server-21.1.16/hw/xnest/Screen.c0000644000175000017500000003367414757411105013012 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "dix.h" #include "mi.h" #include "micmap.h" #include "colormapst.h" #include "resource.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "XNGC.h" #include "GCOps.h" #include "Drawable.h" #include "XNFont.h" #include "Color.h" #include "XNCursor.h" #include "Visual.h" #include "Events.h" #include "Init.h" #include "mipointer.h" #include "Args.h" #include "mipointrst.h" Window xnestDefaultWindows[MAXSCREENS]; Window xnestScreenSaverWindows[MAXSCREENS]; DevPrivateKeyRec xnestCursorScreenKeyRec; ScreenPtr xnestScreen(Window window) { int i; for (i = 0; i < xnestNumScreens; i++) if (xnestDefaultWindows[i] == window) return screenInfo.screens[i]; return NULL; } static int offset(unsigned long mask) { int count; for (count = 0; !(mask & 1) && count < 32; count++) mask >>= 1; return count; } static Bool xnestSaveScreen(ScreenPtr pScreen, int what) { if (xnestSoftwareScreenSaver) return False; else { switch (what) { case SCREEN_SAVER_ON: XMapRaised(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]); xnestSetScreenSaverColormapWindow(pScreen); break; case SCREEN_SAVER_OFF: XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]); xnestSetInstalledColormapWindows(pScreen); break; case SCREEN_SAVER_FORCER: lastEventTime = GetTimeInMillis(); XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]); xnestSetInstalledColormapWindows(pScreen); break; case SCREEN_SAVER_CYCLE: XUnmapWindow(xnestDisplay, xnestScreenSaverWindows[pScreen->myNum]); xnestSetInstalledColormapWindows(pScreen); break; } return True; } } static Bool xnestCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { return FALSE; } static void xnestCrossScreen(ScreenPtr pScreen, Bool entering) { } static miPointerScreenFuncRec xnestPointerCursorFuncs = { xnestCursorOffScreen, xnestCrossScreen, miPointerWarpCursor }; static miPointerSpriteFuncRec xnestPointerSpriteFuncs = { xnestRealizeCursor, xnestUnrealizeCursor, xnestSetCursor, xnestMoveCursor, xnestDeviceCursorInitialize, xnestDeviceCursorCleanup }; Bool xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) { VisualPtr visuals; DepthPtr depths; int numVisuals, numDepths; int i, j, depthIndex; unsigned long valuemask; XSetWindowAttributes attributes; XWindowAttributes gattributes; XSizeHints sizeHints; VisualID defaultVisual; int rootDepth; miPointerScreenPtr PointPriv; if (!dixRegisterPrivateKey (&xnestWindowPrivateKeyRec, PRIVATE_WINDOW, sizeof(xnestPrivWin))) return FALSE; if (!dixRegisterPrivateKey (&xnestGCPrivateKeyRec, PRIVATE_GC, sizeof(xnestPrivGC))) return FALSE; if (!dixRegisterPrivateKey (&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(xnestPrivPixmap))) return FALSE; if (!dixRegisterPrivateKey (&xnestColormapPrivateKeyRec, PRIVATE_COLORMAP, sizeof(xnestPrivColormap))) return FALSE; if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; visuals = xallocarray(xnestNumVisuals, sizeof(VisualRec)); numVisuals = 0; depths = (DepthPtr) malloc(MAXDEPTH * sizeof(DepthRec)); depths[0].depth = 1; depths[0].numVids = 0; depths[0].vids = (VisualID *) malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); numDepths = 1; for (i = 0; i < xnestNumVisuals; i++) { visuals[numVisuals].class = xnestVisuals[i].class; visuals[numVisuals].bitsPerRGBValue = xnestVisuals[i].bits_per_rgb; visuals[numVisuals].ColormapEntries = xnestVisuals[i].colormap_size; visuals[numVisuals].nplanes = xnestVisuals[i].depth; visuals[numVisuals].redMask = xnestVisuals[i].red_mask; visuals[numVisuals].greenMask = xnestVisuals[i].green_mask; visuals[numVisuals].blueMask = xnestVisuals[i].blue_mask; visuals[numVisuals].offsetRed = offset(xnestVisuals[i].red_mask); visuals[numVisuals].offsetGreen = offset(xnestVisuals[i].green_mask); visuals[numVisuals].offsetBlue = offset(xnestVisuals[i].blue_mask); /* Check for and remove duplicates. */ for (j = 0; j < numVisuals; j++) { if (visuals[numVisuals].class == visuals[j].class && visuals[numVisuals].bitsPerRGBValue == visuals[j].bitsPerRGBValue && visuals[numVisuals].ColormapEntries == visuals[j].ColormapEntries && visuals[numVisuals].nplanes == visuals[j].nplanes && visuals[numVisuals].redMask == visuals[j].redMask && visuals[numVisuals].greenMask == visuals[j].greenMask && visuals[numVisuals].blueMask == visuals[j].blueMask && visuals[numVisuals].offsetRed == visuals[j].offsetRed && visuals[numVisuals].offsetGreen == visuals[j].offsetGreen && visuals[numVisuals].offsetBlue == visuals[j].offsetBlue) break; } if (j < numVisuals) break; visuals[numVisuals].vid = FakeClientID(0); depthIndex = UNDEFINED; for (j = 0; j < numDepths; j++) if (depths[j].depth == xnestVisuals[i].depth) { depthIndex = j; break; } if (depthIndex == UNDEFINED) { depthIndex = numDepths; depths[depthIndex].depth = xnestVisuals[i].depth; depths[depthIndex].numVids = 0; depths[depthIndex].vids = (VisualID *) malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); numDepths++; } if (depths[depthIndex].numVids >= MAXVISUALSPERDEPTH) { FatalError("Visual table overflow"); } depths[depthIndex].vids[depths[depthIndex].numVids] = visuals[numVisuals].vid; depths[depthIndex].numVids++; numVisuals++; } visuals = reallocarray(visuals, numVisuals, sizeof(VisualRec)); defaultVisual = visuals[xnestDefaultVisualIndex].vid; rootDepth = visuals[xnestDefaultVisualIndex].nplanes; if (xnestParentWindow != 0) { XGetWindowAttributes(xnestDisplay, xnestParentWindow, &gattributes); xnestWidth = gattributes.width; xnestHeight = gattributes.height; } /* myNum */ /* id */ miScreenInit(pScreen, NULL, xnestWidth, xnestHeight, 1, 1, xnestWidth, rootDepth, numDepths, depths, defaultVisual, /* root visual */ numVisuals, visuals); pScreen->defColormap = (Colormap) FakeClientID(0); pScreen->minInstalledCmaps = MINCMAPS; pScreen->maxInstalledCmaps = MAXCMAPS; pScreen->backingStoreSupport = NotUseful; pScreen->saveUnderSupport = NotUseful; pScreen->whitePixel = xnestWhitePixel; pScreen->blackPixel = xnestBlackPixel; /* GCperDepth */ /* defaultStipple */ pScreen->devPrivate = NULL; /* WindowPrivateLen */ /* WindowPrivateSizes */ /* totalWindowSize */ /* GCPrivateLen */ /* GCPrivateSizes */ /* totalGCSize */ /* Random screen procedures */ pScreen->QueryBestSize = xnestQueryBestSize; pScreen->SaveScreen = xnestSaveScreen; pScreen->GetImage = xnestGetImage; pScreen->GetSpans = xnestGetSpans; /* Window Procedures */ pScreen->CreateWindow = xnestCreateWindow; pScreen->DestroyWindow = xnestDestroyWindow; pScreen->PositionWindow = xnestPositionWindow; pScreen->ChangeWindowAttributes = xnestChangeWindowAttributes; pScreen->RealizeWindow = xnestRealizeWindow; pScreen->UnrealizeWindow = xnestUnrealizeWindow; pScreen->PostValidateTree = NULL; pScreen->WindowExposures = xnestWindowExposures; pScreen->CopyWindow = xnestCopyWindow; pScreen->ClipNotify = xnestClipNotify; /* Pixmap procedures */ pScreen->CreatePixmap = xnestCreatePixmap; pScreen->DestroyPixmap = xnestDestroyPixmap; pScreen->ModifyPixmapHeader = xnestModifyPixmapHeader; /* Font procedures */ pScreen->RealizeFont = xnestRealizeFont; pScreen->UnrealizeFont = xnestUnrealizeFont; /* GC procedures */ pScreen->CreateGC = xnestCreateGC; /* Colormap procedures */ pScreen->CreateColormap = xnestCreateColormap; pScreen->DestroyColormap = xnestDestroyColormap; pScreen->InstallColormap = xnestInstallColormap; pScreen->UninstallColormap = xnestUninstallColormap; pScreen->ListInstalledColormaps = xnestListInstalledColormaps; pScreen->StoreColors = xnestStoreColors; pScreen->ResolveColor = xnestResolveColor; pScreen->BitmapToRegion = xnestPixmapToRegion; /* OS layer procedures */ pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA; pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA; miDCInitialize(pScreen, &xnestPointerCursorFuncs); /* init SW rendering */ PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); xnestCursorFuncs.spriteFuncs = PointPriv->spriteFuncs; dixSetPrivate(&pScreen->devPrivates, xnestCursorScreenKey, &xnestCursorFuncs); PointPriv->spriteFuncs = &xnestPointerSpriteFuncs; pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay, DefaultScreen(xnestDisplay)) / DisplayWidth(xnestDisplay, DefaultScreen(xnestDisplay)); pScreen->mmHeight = xnestHeight * DisplayHeightMM(xnestDisplay, DefaultScreen(xnestDisplay)) / DisplayHeight(xnestDisplay, DefaultScreen(xnestDisplay)); /* overwrite miCloseScreen with our own */ pScreen->CloseScreen = xnestCloseScreen; if (!miScreenDevPrivateInit(pScreen, xnestWidth, NULL)) return FALSE; /* overwrite miSetShape with our own */ pScreen->SetShape = xnestSetShape; /* devPrivates */ #define POSITION_OFFSET (pScreen->myNum * (xnestWidth + xnestHeight) / 32) if (xnestDoFullGeneration) { valuemask = CWBackPixel | CWEventMask | CWColormap; attributes.background_pixel = xnestWhitePixel; attributes.event_mask = xnestEventMask; attributes.colormap = xnestDefaultVisualColormap(xnestDefaultVisual(pScreen)); if (xnestParentWindow != 0) { xnestDefaultWindows[pScreen->myNum] = xnestParentWindow; XSelectInput(xnestDisplay, xnestDefaultWindows[pScreen->myNum], xnestEventMask); } else xnestDefaultWindows[pScreen->myNum] = XCreateWindow(xnestDisplay, DefaultRootWindow(xnestDisplay), xnestX + POSITION_OFFSET, xnestY + POSITION_OFFSET, xnestWidth, xnestHeight, xnestBorderWidth, pScreen->rootDepth, InputOutput, xnestDefaultVisual(pScreen), valuemask, &attributes); if (!xnestWindowName) xnestWindowName = argv[0]; sizeHints.flags = PPosition | PSize | PMaxSize; sizeHints.x = xnestX + POSITION_OFFSET; sizeHints.y = xnestY + POSITION_OFFSET; sizeHints.width = sizeHints.max_width = xnestWidth; sizeHints.height = sizeHints.max_height = xnestHeight; if (xnestUserGeometry & XValue || xnestUserGeometry & YValue) sizeHints.flags |= USPosition; if (xnestUserGeometry & WidthValue || xnestUserGeometry & HeightValue) sizeHints.flags |= USSize; XSetStandardProperties(xnestDisplay, xnestDefaultWindows[pScreen->myNum], xnestWindowName, xnestWindowName, xnestIconBitmap, argv, argc, &sizeHints); XMapWindow(xnestDisplay, xnestDefaultWindows[pScreen->myNum]); valuemask = CWBackPixmap | CWColormap; attributes.background_pixmap = xnestScreenSaverPixmap; attributes.colormap = DefaultColormap(xnestDisplay, DefaultScreen(xnestDisplay)); xnestScreenSaverWindows[pScreen->myNum] = XCreateWindow(xnestDisplay, xnestDefaultWindows[pScreen->myNum], 0, 0, xnestWidth, xnestHeight, 0, DefaultDepth(xnestDisplay, DefaultScreen(xnestDisplay)), InputOutput, DefaultVisual(xnestDisplay, DefaultScreen (xnestDisplay)), valuemask, &attributes); } if (!xnestCreateDefaultColormap(pScreen)) return False; return True; } Bool xnestCloseScreen(ScreenPtr pScreen) { int i; for (i = 0; i < pScreen->numDepths; i++) free(pScreen->allowedDepths[i].vids); free(pScreen->allowedDepths); free(pScreen->visuals); free(pScreen->devPrivate); /* If xnestDoFullGeneration all x resources will be destroyed upon closing the display connection. There is no need to generate extra protocol. */ return True; } xorg-server-21.1.16/hw/xnest/Screen.h0000644000175000017500000000150314757411105013001 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTSCREEN_H #define XNESTSCREEN_H extern Window xnestDefaultWindows[MAXSCREENS]; extern Window xnestScreenSaverWindows[MAXSCREENS]; ScreenPtr xnestScreen(Window window); Bool xnestOpenScreen(ScreenPtr pScreen, int argc, char *argv[]); Bool xnestCloseScreen(ScreenPtr pScreen); #endif /* XNESTSCREEN_H */ xorg-server-21.1.16/hw/xnest/Visual.c0000644000175000017500000000336614757411105013031 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "dix.h" #include "mi.h" #include "Xnest.h" #include "Display.h" #include "Visual.h" Visual * xnestVisual(VisualPtr pVisual) { int i; for (i = 0; i < xnestNumVisuals; i++) if (pVisual->class == xnestVisuals[i].class && pVisual->bitsPerRGBValue == xnestVisuals[i].bits_per_rgb && pVisual->ColormapEntries == xnestVisuals[i].colormap_size && pVisual->nplanes == xnestVisuals[i].depth && pVisual->redMask == xnestVisuals[i].red_mask && pVisual->greenMask == xnestVisuals[i].green_mask && pVisual->blueMask == xnestVisuals[i].blue_mask) return xnestVisuals[i].visual; return NULL; } Visual * xnestVisualFromID(ScreenPtr pScreen, VisualID visual) { int i; for (i = 0; i < pScreen->numVisuals; i++) if (pScreen->visuals[i].vid == visual) return xnestVisual(&pScreen->visuals[i]); return NULL; } Colormap xnestDefaultVisualColormap(Visual * visual) { int i; for (i = 0; i < xnestNumVisuals; i++) if (xnestVisuals[i].visual == visual) return xnestDefaultColormaps[i]; return None; } xorg-server-21.1.16/hw/xnest/Visual.h0000644000175000017500000000151114757411105013024 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTVISUAL_H #define XNESTVISUAL_H Visual *xnestVisual(VisualPtr pVisual); Visual *xnestVisualFromID(ScreenPtr pScreen, VisualID visual); Colormap xnestDefaultVisualColormap(Visual * visual); #define xnestDefaultVisual(pScreen) \ xnestVisualFromID((pScreen), (pScreen)->rootVisual) #endif /* XNESTVISUAL_H */ xorg-server-21.1.16/hw/xnest/Window.c0000644000175000017500000003645114757411105013036 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifdef HAVE_XNEST_CONFIG_H #include #endif #include #include #include "gcstruct.h" #include "window.h" #include "windowstr.h" #include "pixmapstr.h" #include "colormapst.h" #include "scrnintstr.h" #include "region.h" #include "mi.h" #include "Xnest.h" #include "Display.h" #include "Screen.h" #include "XNGC.h" #include "Drawable.h" #include "Color.h" #include "Visual.h" #include "Events.h" #include "Args.h" DevPrivateKeyRec xnestWindowPrivateKeyRec; static int xnestFindWindowMatch(WindowPtr pWin, void *ptr) { xnestWindowMatch *wm = (xnestWindowMatch *) ptr; if (wm->window == xnestWindow(pWin)) { wm->pWin = pWin; return WT_STOPWALKING; } else return WT_WALKCHILDREN; } WindowPtr xnestWindowPtr(Window window) { xnestWindowMatch wm; int i; wm.pWin = NullWindow; wm.window = window; for (i = 0; i < xnestNumScreens; i++) { WalkTree(screenInfo.screens[i], xnestFindWindowMatch, (void *) &wm); if (wm.pWin) break; } return wm.pWin; } Bool xnestCreateWindow(WindowPtr pWin) { unsigned long mask; XSetWindowAttributes attributes; Visual *visual; ColormapPtr pCmap; if (pWin->drawable.class == InputOnly) { mask = 0L; visual = CopyFromParent; } else { mask = CWEventMask | CWBackingStore; attributes.event_mask = ExposureMask; attributes.backing_store = NotUseful; if (pWin->parent) { if (pWin->optional && pWin->optional->visual != wVisual(pWin->parent)) { visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; if (pWin->optional->colormap) { dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); } else attributes.colormap = xnestDefaultVisualColormap(visual); } else visual = CopyFromParent; } else { /* root windows have their own colormaps at creation time */ visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); mask |= CWColormap; attributes.colormap = xnestColormap(pCmap); } } xnestWindowPriv(pWin)->window = XCreateWindow(xnestDisplay, xnestWindowParent(pWin), pWin->origin.x - wBorderWidth(pWin), pWin->origin.y - wBorderWidth(pWin), pWin->drawable.width, pWin->drawable.height, pWin->borderWidth, pWin->drawable.depth, pWin->drawable.class, visual, mask, &attributes); xnestWindowPriv(pWin)->parent = xnestWindowParent(pWin); xnestWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); xnestWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin); xnestWindowPriv(pWin)->width = pWin->drawable.width; xnestWindowPriv(pWin)->height = pWin->drawable.height; xnestWindowPriv(pWin)->border_width = pWin->borderWidth; xnestWindowPriv(pWin)->sibling_above = None; if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin); xnestWindowPriv(pWin)->bounding_shape = RegionCreate(NULL, 1); xnestWindowPriv(pWin)->clip_shape = RegionCreate(NULL, 1); if (!pWin->parent) /* only the root window will have the right colormap */ xnestSetInstalledColormapWindows(pWin->drawable.pScreen); return True; } Bool xnestDestroyWindow(WindowPtr pWin) { if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindowPriv(pWin)->sibling_above; RegionDestroy(xnestWindowPriv(pWin)->bounding_shape); RegionDestroy(xnestWindowPriv(pWin)->clip_shape); XDestroyWindow(xnestDisplay, xnestWindow(pWin)); xnestWindowPriv(pWin)->window = None; if (pWin->optional && pWin->optional->colormap && pWin->parent) xnestSetInstalledColormapWindows(pWin->drawable.pScreen); return True; } Bool xnestPositionWindow(WindowPtr pWin, int x, int y) { xnestConfigureWindow(pWin, CWParent | CWX | CWY | CWWidth | CWHeight | CWBorderWidth); return True; } void xnestConfigureWindow(WindowPtr pWin, unsigned int mask) { unsigned int valuemask; XWindowChanges values; if (mask & CWParent && xnestWindowPriv(pWin)->parent != xnestWindowParent(pWin)) { XReparentWindow(xnestDisplay, xnestWindow(pWin), xnestWindowParent(pWin), pWin->origin.x - wBorderWidth(pWin), pWin->origin.y - wBorderWidth(pWin)); xnestWindowPriv(pWin)->parent = xnestWindowParent(pWin); xnestWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); xnestWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin); xnestWindowPriv(pWin)->sibling_above = None; if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin); } valuemask = 0; if (mask & CWX && xnestWindowPriv(pWin)->x != pWin->origin.x - wBorderWidth(pWin)) { valuemask |= CWX; values.x = xnestWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); } if (mask & CWY && xnestWindowPriv(pWin)->y != pWin->origin.y - wBorderWidth(pWin)) { valuemask |= CWY; values.y = xnestWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin); } if (mask & CWWidth && xnestWindowPriv(pWin)->width != pWin->drawable.width) { valuemask |= CWWidth; values.width = xnestWindowPriv(pWin)->width = pWin->drawable.width; } if (mask & CWHeight && xnestWindowPriv(pWin)->height != pWin->drawable.height) { valuemask |= CWHeight; values.height = xnestWindowPriv(pWin)->height = pWin->drawable.height; } if (mask & CWBorderWidth && xnestWindowPriv(pWin)->border_width != pWin->borderWidth) { valuemask |= CWBorderWidth; values.border_width = xnestWindowPriv(pWin)->border_width = pWin->borderWidth; } if (valuemask) XConfigureWindow(xnestDisplay, xnestWindow(pWin), valuemask, &values); if (mask & CWStackingOrder && xnestWindowPriv(pWin)->sibling_above != xnestWindowSiblingAbove(pWin)) { WindowPtr pSib; /* find the top sibling */ for (pSib = pWin; pSib->prevSib != NullWindow; pSib = pSib->prevSib); /* the top sibling */ valuemask = CWStackMode; values.stack_mode = Above; XConfigureWindow(xnestDisplay, xnestWindow(pSib), valuemask, &values); xnestWindowPriv(pSib)->sibling_above = None; /* the rest of siblings */ for (pSib = pSib->nextSib; pSib != NullWindow; pSib = pSib->nextSib) { valuemask = CWSibling | CWStackMode; values.sibling = xnestWindowSiblingAbove(pSib); values.stack_mode = Below; XConfigureWindow(xnestDisplay, xnestWindow(pSib), valuemask, &values); xnestWindowPriv(pSib)->sibling_above = xnestWindowSiblingAbove(pSib); } } } Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { XSetWindowAttributes attributes; if (mask & CWBackPixmap) switch (pWin->backgroundState) { case None: attributes.background_pixmap = None; break; case ParentRelative: attributes.background_pixmap = ParentRelative; break; case BackgroundPixmap: attributes.background_pixmap = xnestPixmap(pWin->background.pixmap); break; case BackgroundPixel: mask &= ~CWBackPixmap; break; } if (mask & CWBackPixel) { if (pWin->backgroundState == BackgroundPixel) attributes.background_pixel = xnestPixel(pWin->background.pixel); else mask &= ~CWBackPixel; } if (mask & CWBorderPixmap) { if (pWin->borderIsPixel) mask &= ~CWBorderPixmap; else attributes.border_pixmap = xnestPixmap(pWin->border.pixmap); } if (mask & CWBorderPixel) { if (pWin->borderIsPixel) attributes.border_pixel = xnestPixel(pWin->border.pixel); else mask &= ~CWBorderPixel; } if (mask & CWBitGravity) attributes.bit_gravity = pWin->bitGravity; if (mask & CWWinGravity) /* dix does this for us */ mask &= ~CWWinGravity; if (mask & CWBackingStore) /* this is really not useful */ mask &= ~CWBackingStore; if (mask & CWBackingPlanes) /* this is really not useful */ mask &= ~CWBackingPlanes; if (mask & CWBackingPixel) /* this is really not useful */ mask &= ~CWBackingPixel; if (mask & CWOverrideRedirect) attributes.override_redirect = pWin->overrideRedirect; if (mask & CWSaveUnder) /* this is really not useful */ mask &= ~CWSaveUnder; if (mask & CWEventMask) /* events are handled elsewhere */ mask &= ~CWEventMask; if (mask & CWDontPropagate) /* events are handled elsewhere */ mask &= ~CWDontPropagate; if (mask & CWColormap) { ColormapPtr pCmap; dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); xnestSetInstalledColormapWindows(pWin->drawable.pScreen); } if (mask & CWCursor) /* this is handled in cursor code */ mask &= ~CWCursor; if (mask) XChangeWindowAttributes(xnestDisplay, xnestWindow(pWin), mask, &attributes); return True; } Bool xnestRealizeWindow(WindowPtr pWin) { xnestConfigureWindow(pWin, CWStackingOrder); xnestShapeWindow(pWin); XMapWindow(xnestDisplay, xnestWindow(pWin)); return True; } Bool xnestUnrealizeWindow(WindowPtr pWin) { XUnmapWindow(xnestDisplay, xnestWindow(pWin)); return True; } void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion) { } void xnestClipNotify(WindowPtr pWin, int dx, int dy) { xnestConfigureWindow(pWin, CWStackingOrder); xnestShapeWindow(pWin); } static Bool xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr) { return (event->type == Expose && event->xexpose.window == *(Window *) ptr); } void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn) { XEvent event; Window window; BoxRec Box; XSync(xnestDisplay, False); window = xnestWindow(pWin); while (XCheckIfEvent(xnestDisplay, &event, xnestWindowExposurePredicate, (char *) &window)) { Box.x1 = pWin->drawable.x + wBorderWidth(pWin) + event.xexpose.x; Box.y1 = pWin->drawable.y + wBorderWidth(pWin) + event.xexpose.y; Box.x2 = Box.x1 + event.xexpose.width; Box.y2 = Box.y1 + event.xexpose.height; event.xexpose.type = ProcessedExpose; if (RegionContainsRect(pRgn, &Box) != rgnIN) XPutBackEvent(xnestDisplay, &event); } miWindowExposures(pWin, pRgn); } void xnestSetShape(WindowPtr pWin, int kind) { xnestShapeWindow(pWin); miSetShape(pWin, kind); } static Bool xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2) { BoxPtr pBox1, pBox2; unsigned int n1, n2; if (pReg1 == pReg2) return True; if (pReg1 == NullRegion || pReg2 == NullRegion) return False; pBox1 = RegionRects(pReg1); n1 = RegionNumRects(pReg1); pBox2 = RegionRects(pReg2); n2 = RegionNumRects(pReg2); if (n1 != n2) return False; if (pBox1 == pBox2) return True; if (memcmp(pBox1, pBox2, n1 * sizeof(BoxRec))) return False; return True; } void xnestShapeWindow(WindowPtr pWin) { Region reg; BoxPtr pBox; XRectangle rect; int i; if (!xnestRegionEqual(xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin))) { if (wBoundingShape(pWin)) { RegionCopy(xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin)); reg = XCreateRegion(); pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape); for (i = 0; i < RegionNumRects(xnestWindowPriv(pWin)->bounding_shape); i++) { rect.x = pBox[i].x1; rect.y = pBox[i].y1; rect.width = pBox[i].x2 - pBox[i].x1; rect.height = pBox[i].y2 - pBox[i].y1; XUnionRectWithRegion(&rect, reg, reg); } XShapeCombineRegion(xnestDisplay, xnestWindow(pWin), ShapeBounding, 0, 0, reg, ShapeSet); XDestroyRegion(reg); } else { RegionEmpty(xnestWindowPriv(pWin)->bounding_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), ShapeBounding, 0, 0, None, ShapeSet); } } if (!xnestRegionEqual(xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin))) { if (wClipShape(pWin)) { RegionCopy(xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin)); reg = XCreateRegion(); pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape); for (i = 0; i < RegionNumRects(xnestWindowPriv(pWin)->clip_shape); i++) { rect.x = pBox[i].x1; rect.y = pBox[i].y1; rect.width = pBox[i].x2 - pBox[i].x1; rect.height = pBox[i].y2 - pBox[i].y1; XUnionRectWithRegion(&rect, reg, reg); } XShapeCombineRegion(xnestDisplay, xnestWindow(pWin), ShapeClip, 0, 0, reg, ShapeSet); XDestroyRegion(reg); } else { RegionEmpty(xnestWindowPriv(pWin)->clip_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), ShapeClip, 0, 0, None, ShapeSet); } } } xorg-server-21.1.16/hw/xnest/XNCursor.h0000644000175000017500000000357014757411105013313 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTCURSOR_H #define XNESTCURSOR_H #include "mipointrst.h" typedef struct { miPointerSpriteFuncPtr spriteFuncs; } xnestCursorFuncRec, *xnestCursorFuncPtr; extern DevPrivateKeyRec xnestCursorScreenKeyRec; #define xnestCursorScreenKey (&xnestCursorScreenKeyRec) extern xnestCursorFuncRec xnestCursorFuncs; typedef struct { Cursor cursor; } xnestPrivCursor; #define xnestGetCursorPriv(pCursor, pScreen) ((xnestPrivCursor *) \ dixLookupScreenPrivate(&(pCursor)->devPrivates, CursorScreenKey, pScreen)) #define xnestSetCursorPriv(pCursor, pScreen, v) \ dixSetScreenPrivate(&(pCursor)->devPrivates, CursorScreenKey, pScreen, v) #define xnestCursor(pCursor, pScreen) \ (xnestGetCursorPriv(pCursor, pScreen)->cursor) Bool xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); Bool xnestUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); void xnestRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor, Bool displayed); void xnestSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y); void xnestMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); Bool xnestDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); void xnestDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); #endif /* XNESTCURSOR_H */ xorg-server-21.1.16/hw/xnest/Xnest.h0000644000175000017500000000502314757411105012664 /* Copyright (c) 1995 X Consortium 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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 X Consortium 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 X Consortium. */ /* ** Machines with a 64 bit library interface and a 32 bit server require ** name changes to protect the guilty. */ #ifdef _XSERVER64 #define _XSERVER64_tmp #undef _XSERVER64 typedef unsigned long XID64; typedef unsigned long Mask64; typedef unsigned long Atom64; typedef unsigned long VisualID64; typedef unsigned long Time64; #define XID XID64 #define Mask Mask64 #define Atom Atom64 #define VisualID VisualID64 #define Time Time64 typedef XID Window64; typedef XID Drawable64; typedef XID Font64; typedef XID Pixmap64; typedef XID Cursor64; typedef XID Colormap64; typedef XID GContext64; typedef XID KeySym64; #define Window Window64 #define Drawable Drawable64 #define Font Font64 #define Pixmap Pixmap64 #define Cursor Cursor64 #define Colormap Colormap64 #define GContext GContext64 #define KeySym KeySym64 #endif /*_XSERVER64*/ #define GC XlibGC #include #include #include #undef GC #ifdef _XSERVER64_tmp #define _XSERVER64 #undef _XSERVER64_tmp #undef XID #undef Mask #undef Atom #undef VisualID #undef Time #undef Window #undef Drawable #undef Font #undef Pixmap #undef Cursor #undef Colormap #undef GContext #undef KeySym #endif /*_XSERVER64_tmp*/ xorg-server-21.1.16/hw/xnest/XNFont.h0000644000175000017500000000177714757411105012753 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTFONT_H #define XNESTFONT_H typedef struct { XFontStruct *font_struct; } xnestPrivFont; extern int xnestFontPrivateIndex; #define xnestFontPriv(pFont) \ ((xnestPrivFont *)FontGetPrivate(pFont, xnestFontPrivateIndex)) #define xnestFontStruct(pFont) (xnestFontPriv(pFont)->font_struct) #define xnestFont(pFont) (xnestFontStruct(pFont)->fid) Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont); Bool xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont); #endif /* XNESTFONT_H */ xorg-server-21.1.16/hw/xnest/XNGC.h0000644000175000017500000000250614757411105012325 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTGC_H #define XNESTGC_H /* This file uses the GC definition form Xlib.h as XlibGC. */ typedef struct { XlibGC gc; } xnestPrivGC; extern DevPrivateKeyRec xnestGCPrivateKeyRec; #define xnestGCPrivateKey (&xnestGCPrivateKeyRec) #define xnestGCPriv(pGC) ((xnestPrivGC *) \ dixLookupPrivate(&(pGC)->devPrivates, xnestGCPrivateKey)) #define xnestGC(pGC) (xnestGCPriv(pGC)->gc) Bool xnestCreateGC(GCPtr pGC); void xnestValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); void xnestChangeGC(GCPtr pGC, unsigned long mask); void xnestCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); void xnestDestroyGC(GCPtr pGC); void xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects); void xnestDestroyClip(GCPtr pGC); void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc); #endif /* XNESTGC_H */ xorg-server-21.1.16/hw/xnest/XNPixmap.h0000644000175000017500000000255614757411105013277 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTPIXMAP_H #define XNESTPIXMAP_H extern DevPrivateKeyRec xnestPixmapPrivateKeyRec; #define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec) typedef struct { Pixmap pixmap; } xnestPrivPixmap; #define xnestPixmapPriv(pPixmap) ((xnestPrivPixmap *) \ dixLookupPrivate(&(pPixmap)->devPrivates, xnestPixmapPrivateKey)) #define xnestPixmap(pPixmap) (xnestPixmapPriv(pPixmap)->pixmap) #define xnestSharePixmap(pPixmap) ((pPixmap)->refcnt++) PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint); Bool xnestDestroyPixmap(PixmapPtr pPixmap); Bool xnestModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap); #endif /* XNESTPIXMAP_H */ xorg-server-21.1.16/hw/xnest/XNWindow.h0000644000175000017500000000436114757411105013304 /* Copyright 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. */ #ifndef XNESTWINDOW_H #define XNESTWINDOW_H typedef struct { Window window; Window parent; int x; int y; unsigned int width; unsigned int height; unsigned int border_width; Window sibling_above; RegionPtr bounding_shape; RegionPtr clip_shape; } xnestPrivWin; typedef struct { WindowPtr pWin; Window window; } xnestWindowMatch; extern DevPrivateKeyRec xnestWindowPrivateKeyRec; #define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec) #define xnestWindowPriv(pWin) ((xnestPrivWin *) \ dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) #define xnestWindow(pWin) (xnestWindowPriv(pWin)->window) #define xnestWindowParent(pWin) \ ((pWin)->parent ? \ xnestWindow((pWin)->parent) : \ xnestDefaultWindows[pWin->drawable.pScreen->myNum]) #define xnestWindowSiblingAbove(pWin) \ ((pWin)->prevSib ? xnestWindow((pWin)->prevSib) : None) #define xnestWindowSiblingBelow(pWin) \ ((pWin)->nextSib ? xnestWindow((pWin)->nextSib) : None) #define CWParent CWSibling #define CWStackingOrder CWStackMode WindowPtr xnestWindowPtr(Window window); Bool xnestCreateWindow(WindowPtr pWin); Bool xnestDestroyWindow(WindowPtr pWin); Bool xnestPositionWindow(WindowPtr pWin, int x, int y); void xnestConfigureWindow(WindowPtr pWin, unsigned int mask); Bool xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask); Bool xnestRealizeWindow(WindowPtr pWin); Bool xnestUnrealizeWindow(WindowPtr pWin); void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn); void xnestSetShape(WindowPtr pWin, int kind); void xnestShapeWindow(WindowPtr pWin); #endif /* XNESTWINDOW_H */ xorg-server-21.1.16/hw/xnest/xnest-config.h0000644000175000017500000000253614757411105014175 /* * Copyright 2005 Red Hat Inc., Raleigh, North Carolina. * * All Rights Reserved. * * 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 on the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS * 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. */ #ifndef XNEST_CONFIG_H #define XNEST_CONFIG_H #include #include #undef MITSHM #endif /* XNEST_CONFIG_H */ xorg-server-21.1.16/hw/xnest/icon0000644000175000017500000000156414757411105012273 #define icon_width 32 #define icon_height 32 static unsigned char icon_bits[] = { 0xff, 0x00, 0x00, 0xc0, 0xfe, 0x01, 0x00, 0xc0, 0xfc, 0x03, 0x00, 0x60, 0xf8, 0x07, 0x00, 0x30, 0xf8, 0x07, 0x00, 0x18, 0xf0, 0x0f, 0x00, 0x0c, 0xe0, 0x1f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x06, 0xc0, 0x3f, 0x00, 0x03, 0x80, 0x7f, 0x80, 0x01, 0x00, 0xff, 0xc0, 0x00, 0x00, 0xfe, 0x61, 0x00, 0x00, 0xfe, 0x31, 0x00, 0x00, 0xfc, 0x33, 0x00, 0x00, 0xf8, 0x1b, 0x00, 0x00, 0xf0, 0x0d, 0x00, 0x00, 0xf0, 0x0e, 0x00, 0x00, 0x60, 0x1f, 0x00, 0x00, 0xb0, 0x3f, 0x00, 0x00, 0x98, 0x7f, 0x00, 0x00, 0x98, 0x7f, 0x00, 0x00, 0x0c, 0xff, 0x00, 0x00, 0x06, 0xfe, 0x01, 0x00, 0x03, 0xfc, 0x03, 0x80, 0x01, 0xfc, 0x03, 0xc0, 0x00, 0xf8, 0x07, 0xc0, 0x00, 0xf0, 0x0f, 0x60, 0x00, 0xe0, 0x1f, 0x30, 0x00, 0xe0, 0x1f, 0x18, 0x00, 0xc0, 0x3f, 0x0c, 0x00, 0x80, 0x7f, 0x06, 0x00, 0x00, 0xff}; xorg-server-21.1.16/hw/xnest/screensaver0000644000175000017500000014415314757411105013665 #define screensaver_width 256 #define screensaver_height 256 static unsigned char screensaver_bits[] = { 0xa8, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x00, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x80, 0x02, 0x80, 0xaa, 0xaa, 0x82, 0x0a, 0xa8, 0x28, 0x80, 0x8a, 0x80, 0x2a, 0x80, 0x80, 0x8a, 0xa2, 0x82, 0x0a, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x80, 0x82, 0x41, 0x40, 0x00, 0x50, 0x55, 0x41, 0x00, 0x00, 0x04, 0x00, 0x54, 0x40, 0x10, 0x00, 0x40, 0x00, 0x51, 0x55, 0x00, 0x15, 0x00, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x00, 0x10, 0x14, 0x00, 0x00, 0x00, 0xa8, 0x8a, 0x02, 0x00, 0x02, 0x00, 0x20, 0xa2, 0x00, 0x80, 0x00, 0x08, 0x00, 0xaa, 0x2a, 0x00, 0x2a, 0x08, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x01, 0x00, 0x01, 0x50, 0x45, 0x05, 0x00, 0x01, 0x10, 0x10, 0x40, 0x11, 0x40, 0x00, 0x44, 0x00, 0x50, 0x15, 0x01, 0x15, 0x04, 0x00, 0x40, 0x00, 0x05, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x50, 0x20, 0x00, 0x00, 0xa2, 0xaa, 0x2a, 0x00, 0x00, 0x02, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa2, 0xaa, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x01, 0x40, 0x44, 0x15, 0x10, 0x01, 0x10, 0x10, 0x40, 0x01, 0x40, 0x00, 0x00, 0x00, 0x54, 0x55, 0x41, 0x45, 0x04, 0x00, 0x40, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x54, 0x20, 0x80, 0x00, 0x82, 0xaa, 0x0a, 0x00, 0x00, 0x22, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x82, 0x00, 0xa0, 0x8a, 0x22, 0x02, 0x00, 0x08, 0x20, 0x00, 0xa8, 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x2a, 0x10, 0x40, 0x00, 0x01, 0x54, 0x45, 0x10, 0x00, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x01, 0x00, 0x50, 0x45, 0x05, 0x41, 0x00, 0x04, 0x10, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x28, 0x00, 0xaa, 0xaa, 0x0a, 0x0a, 0x00, 0x20, 0x08, 0x00, 0x20, 0x00, 0x00, 0x80, 0x00, 0xa8, 0xa2, 0x22, 0x2a, 0x00, 0x00, 0x0a, 0x00, 0xa8, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0a, 0x50, 0x05, 0x00, 0x01, 0x55, 0x45, 0x00, 0x00, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x40, 0x55, 0x11, 0x00, 0x00, 0x54, 0x01, 0x00, 0x44, 0x01, 0x00, 0x00, 0x05, 0x40, 0x00, 0x05, 0x00, 0x08, 0x00, 0x80, 0xaa, 0xaa, 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x80, 0x00, 0x80, 0xaa, 0x28, 0x20, 0x00, 0x00, 0x02, 0x00, 0x80, 0x02, 0x00, 0x00, 0x28, 0x00, 0x80, 0x02, 0x10, 0x10, 0x00, 0x01, 0x54, 0x45, 0x01, 0x00, 0x41, 0x00, 0x00, 0x00, 0x10, 0x40, 0x00, 0x00, 0x10, 0x55, 0x14, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x01, 0x00, 0x00, 0x40, 0x40, 0x40, 0x01, 0x08, 0x00, 0x80, 0x00, 0xa8, 0xa2, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x20, 0xa0, 0xaa, 0x00, 0x80, 0x28, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x80, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x10, 0x14, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x08, 0x20, 0x80, 0x00, 0x08, 0x08, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x8a, 0x00, 0x02, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x10, 0x10, 0x00, 0x01, 0x10, 0x45, 0x55, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x04, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x02, 0x00, 0x08, 0x00, 0x00, 0x20, 0xa2, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80, 0x00, 0x02, 0x04, 0x00, 0x40, 0x00, 0x04, 0x04, 0x40, 0x40, 0x00, 0x01, 0x00, 0x04, 0x04, 0x00, 0x00, 0x01, 0x00, 0x51, 0x45, 0x05, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x45, 0x01, 0x2a, 0x80, 0xaa, 0xaa, 0x82, 0xaa, 0x2a, 0xa0, 0x02, 0x02, 0x80, 0xa8, 0x00, 0x2a, 0xa0, 0x02, 0x80, 0xa2, 0x00, 0xa0, 0xa0, 0x0a, 0xa0, 0x00, 0x00, 0x00, 0x80, 0x88, 0x02, 0x00, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x41, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x05, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2a, 0x20, 0x00, 0x00, 0x41, 0x05, 0x55, 0x54, 0x11, 0x04, 0x00, 0x14, 0x40, 0x10, 0x44, 0x15, 0x15, 0x00, 0x00, 0x50, 0x01, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x10, 0x50, 0x40, 0x82, 0x08, 0x02, 0x08, 0x20, 0x08, 0x00, 0x22, 0xa0, 0x20, 0x88, 0x00, 0x22, 0x00, 0x00, 0xa8, 0x2a, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x88, 0x20, 0x44, 0x10, 0x01, 0x04, 0x50, 0x04, 0x00, 0x41, 0x10, 0x11, 0x44, 0x00, 0x41, 0x00, 0x00, 0x54, 0x41, 0x00, 0x40, 0x55, 0x15, 0x00, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x54, 0x11, 0x04, 0x11, 0x80, 0x20, 0x02, 0x08, 0xa0, 0x08, 0x00, 0x02, 0x88, 0x20, 0x88, 0x00, 0x82, 0x00, 0x00, 0x2a, 0x22, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x20, 0x08, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x08, 0x20, 0x40, 0x10, 0x01, 0x04, 0x50, 0x04, 0x00, 0x01, 0x04, 0x41, 0x44, 0x00, 0x41, 0x00, 0x00, 0x15, 0x05, 0x14, 0x15, 0x50, 0x10, 0x05, 0x40, 0x41, 0x41, 0x10, 0x45, 0x05, 0x50, 0x04, 0x04, 0x10, 0x80, 0x20, 0x02, 0x08, 0xa0, 0x08, 0x00, 0x02, 0x08, 0x22, 0x82, 0x00, 0x82, 0x00, 0x00, 0x0a, 0x2a, 0x22, 0x8a, 0x22, 0x22, 0x08, 0x80, 0x22, 0x22, 0x88, 0x88, 0x02, 0x28, 0x02, 0x08, 0x20, 0x40, 0x10, 0x15, 0x54, 0x10, 0x05, 0x00, 0x14, 0x04, 0x41, 0x44, 0x05, 0x41, 0x00, 0x00, 0x05, 0x50, 0x01, 0x41, 0x04, 0x05, 0x11, 0x00, 0x05, 0x44, 0x44, 0x50, 0x00, 0x10, 0x05, 0x50, 0x10, 0x80, 0x0a, 0x02, 0x08, 0x20, 0x0a, 0x00, 0x20, 0xa8, 0x82, 0x82, 0x00, 0x2a, 0x00, 0x80, 0x02, 0x22, 0x02, 0x82, 0x20, 0x20, 0x08, 0x20, 0x88, 0x82, 0x88, 0x8a, 0x00, 0x88, 0x0a, 0x80, 0x20, 0x40, 0x04, 0x01, 0x04, 0x10, 0x05, 0x00, 0x40, 0x04, 0x41, 0x41, 0x00, 0x11, 0x00, 0x40, 0x01, 0x41, 0x41, 0x41, 0x14, 0x15, 0x11, 0x40, 0x44, 0x04, 0x44, 0x40, 0x00, 0x44, 0x15, 0x00, 0x11, 0x80, 0x08, 0x02, 0x08, 0x20, 0x0a, 0x00, 0x80, 0x08, 0x82, 0x82, 0x00, 0x22, 0x00, 0xa0, 0x00, 0x22, 0x22, 0x82, 0x20, 0x22, 0x0a, 0x20, 0x28, 0x82, 0x82, 0x88, 0x00, 0x88, 0x2a, 0x00, 0x22, 0x44, 0x10, 0x01, 0x04, 0x10, 0x04, 0x00, 0x41, 0x04, 0x01, 0x41, 0x00, 0x41, 0x00, 0x50, 0x01, 0x14, 0x14, 0x01, 0x55, 0x10, 0x15, 0x40, 0x45, 0x05, 0x01, 0x45, 0x00, 0x04, 0x55, 0x04, 0x11, 0x82, 0x20, 0x02, 0x08, 0x20, 0x08, 0x00, 0x22, 0x08, 0x82, 0x80, 0x00, 0x82, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xaa, 0x88, 0x20, 0x41, 0x10, 0x55, 0x54, 0x11, 0x04, 0x00, 0x14, 0x04, 0x01, 0x41, 0x15, 0x41, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x54, 0x51, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x54, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0xa8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x50, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x80, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x05, 0x14, 0x40, 0x01, 0x41, 0x40, 0x01, 0x14, 0x10, 0x01, 0x00, 0x40, 0x01, 0x04, 0x14, 0x14, 0x14, 0x10, 0x04, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xaa, 0x00, 0x00, 0x00, 0x80, 0x82, 0xa0, 0x20, 0x82, 0xa2, 0x20, 0x02, 0x22, 0x28, 0x02, 0x00, 0x08, 0x8a, 0x22, 0x08, 0x08, 0x22, 0x28, 0x0a, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x44, 0x54, 0x01, 0x00, 0x00, 0x40, 0x41, 0x40, 0x10, 0x04, 0x11, 0x11, 0x04, 0x41, 0x10, 0x04, 0x00, 0x04, 0x04, 0x40, 0x10, 0x00, 0x41, 0x10, 0x11, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xaa, 0x02, 0x00, 0x00, 0xa0, 0x82, 0x80, 0x08, 0x08, 0x02, 0x08, 0x88, 0x80, 0x08, 0x08, 0x00, 0x08, 0x08, 0x20, 0x20, 0x80, 0x80, 0x20, 0x00, 0x00, 0x10, 0x50, 0x14, 0x14, 0x45, 0x05, 0x40, 0x05, 0x41, 0x14, 0x15, 0x50, 0x41, 0x01, 0x04, 0x00, 0x01, 0x04, 0x50, 0x00, 0x11, 0x04, 0x00, 0x14, 0x00, 0x40, 0x10, 0x44, 0x00, 0x11, 0x00, 0x00, 0xa0, 0x88, 0x22, 0xa2, 0x88, 0x08, 0x00, 0x2a, 0x82, 0x22, 0x22, 0xa8, 0x80, 0x0a, 0x08, 0x00, 0x02, 0xa8, 0x8a, 0xaa, 0x08, 0x08, 0x00, 0xa8, 0x00, 0x2a, 0x20, 0x80, 0xaa, 0x20, 0x00, 0x00, 0x00, 0x05, 0x04, 0x15, 0x55, 0x04, 0x40, 0x04, 0x50, 0x54, 0x01, 0x54, 0x00, 0x54, 0x04, 0x00, 0x01, 0x04, 0x40, 0x00, 0x10, 0x04, 0x00, 0x40, 0x05, 0x41, 0x40, 0x40, 0x00, 0x10, 0x00, 0x00, 0x80, 0x08, 0x02, 0x82, 0x80, 0x08, 0x80, 0x20, 0x02, 0x02, 0x02, 0x2a, 0x00, 0xa0, 0x08, 0x00, 0x02, 0x08, 0x80, 0x00, 0x08, 0x08, 0x00, 0x00, 0x8a, 0x20, 0x20, 0x82, 0x00, 0x20, 0x00, 0x00, 0x10, 0x45, 0x04, 0x11, 0x51, 0x04, 0x50, 0x44, 0x44, 0x44, 0x01, 0x15, 0x00, 0x40, 0x05, 0x00, 0x01, 0x04, 0x40, 0x00, 0x10, 0x04, 0x00, 0x00, 0x54, 0x40, 0x40, 0x41, 0x00, 0x10, 0x00, 0x00, 0xa0, 0x28, 0x02, 0x0a, 0x8a, 0x08, 0x20, 0x0a, 0x0a, 0x28, 0x02, 0x0a, 0x00, 0x80, 0x08, 0x00, 0x02, 0x08, 0x80, 0x00, 0x08, 0x08, 0x00, 0x00, 0x88, 0x20, 0x80, 0x80, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x05, 0x40, 0x00, 0x11, 0x00, 0x01, 0x10, 0x10, 0x01, 0x11, 0x04, 0x00, 0x04, 0x50, 0x40, 0x41, 0x01, 0x01, 0x11, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x80, 0x02, 0x80, 0x80, 0x20, 0x02, 0x02, 0x20, 0x08, 0x82, 0x08, 0x08, 0x00, 0x08, 0x88, 0x20, 0x80, 0x00, 0x82, 0x20, 0x00, 0x00, 0x00, 0x40, 0x01, 0x10, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x40, 0x01, 0x40, 0x14, 0x40, 0x41, 0x05, 0x40, 0x01, 0x14, 0x14, 0x14, 0x00, 0x44, 0x01, 0x45, 0x00, 0x00, 0x14, 0x54, 0x00, 0x00, 0x00, 0x80, 0x02, 0x08, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x04, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x8a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x02, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x50, 0x00, 0x50, 0x40, 0x45, 0x11, 0x00, 0x50, 0x40, 0x41, 0x01, 0x00, 0x14, 0x00, 0x51, 0x40, 0x40, 0x00, 0x05, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0a, 0x88, 0x02, 0xaa, 0xa8, 0x80, 0x00, 0x00, 0xaa, 0xa8, 0xa2, 0x02, 0x00, 0xa2, 0xa0, 0x22, 0xa8, 0xa0, 0xa0, 0x8a, 0x2a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x14, 0x04, 0x01, 0x45, 0x51, 0x04, 0x40, 0x00, 0x45, 0x41, 0x51, 0x01, 0x00, 0x41, 0x50, 0x54, 0x50, 0x50, 0x50, 0x14, 0x14, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x82, 0xa2, 0xa0, 0x02, 0xa0, 0x88, 0x82, 0xa0, 0x88, 0x02, 0x80, 0x82, 0x28, 0x28, 0xa0, 0x20, 0x28, 0x08, 0x8a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x51, 0x45, 0x54, 0x00, 0x14, 0x40, 0x41, 0x50, 0x05, 0x51, 0x10, 0x41, 0x41, 0x41, 0x01, 0x00, 0x05, 0x14, 0x10, 0x50, 0x40, 0x10, 0x14, 0x54, 0x04, 0x00, 0x41, 0x55, 0x04, 0x45, 0x01, 0x04, 0x20, 0x02, 0x08, 0x00, 0x2a, 0xa0, 0x00, 0xa0, 0x8a, 0x20, 0xa8, 0xa2, 0xa0, 0xa0, 0x00, 0x80, 0x0a, 0x28, 0x28, 0xa0, 0x20, 0x28, 0x0a, 0x2a, 0x00, 0x00, 0x22, 0x0a, 0x80, 0x88, 0x02, 0x88, 0x04, 0x50, 0x01, 0x00, 0x54, 0x40, 0x01, 0x50, 0x15, 0x10, 0x14, 0x51, 0x40, 0x41, 0x01, 0x00, 0x15, 0x14, 0x14, 0x40, 0x11, 0x14, 0x05, 0x14, 0x00, 0x40, 0x10, 0x00, 0x15, 0x45, 0x04, 0x01, 0x00, 0x00, 0x08, 0x00, 0xa8, 0xa0, 0x00, 0x28, 0x8a, 0x08, 0x0a, 0x28, 0xa0, 0xa0, 0x00, 0x00, 0x2a, 0x0a, 0x28, 0xa0, 0x08, 0x8a, 0x02, 0x0a, 0x00, 0x80, 0x00, 0x08, 0x80, 0x00, 0x00, 0x82, 0x44, 0x11, 0x00, 0x00, 0x50, 0x50, 0x00, 0x10, 0x05, 0x40, 0x15, 0x05, 0x50, 0x50, 0x00, 0x00, 0x14, 0x14, 0x14, 0x40, 0x11, 0x54, 0x00, 0x05, 0x00, 0x00, 0x11, 0x00, 0x01, 0x40, 0x04, 0x44, 0x80, 0x20, 0x0a, 0x00, 0xa0, 0xa0, 0x00, 0x88, 0x82, 0xa8, 0x0a, 0x00, 0xa0, 0xa0, 0x00, 0x00, 0x28, 0x0a, 0x0a, 0xa0, 0x08, 0x0a, 0x00, 0x0a, 0x00, 0x00, 0x22, 0x0a, 0xa2, 0x00, 0x00, 0x88, 0x01, 0x40, 0x15, 0x00, 0x50, 0x51, 0x40, 0x00, 0x01, 0x51, 0x15, 0x00, 0x50, 0x50, 0x00, 0x00, 0x54, 0x14, 0x54, 0x40, 0x05, 0x14, 0x00, 0x05, 0x00, 0x40, 0x41, 0x15, 0x14, 0x45, 0x04, 0x05, 0x00, 0x00, 0x00, 0x80, 0xa0, 0xa0, 0x20, 0x88, 0x80, 0xaa, 0x08, 0x82, 0x28, 0x28, 0x02, 0x20, 0x28, 0x0a, 0x2a, 0xa0, 0x02, 0x0a, 0x88, 0xa2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 0x40, 0x11, 0x44, 0x00, 0x55, 0x14, 0x44, 0x50, 0x50, 0x01, 0x40, 0x10, 0x54, 0x15, 0x40, 0x01, 0x14, 0x04, 0x45, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x22, 0xa0, 0x0a, 0x00, 0x00, 0x0a, 0x2a, 0x20, 0x28, 0xa8, 0x00, 0xa0, 0x08, 0xa8, 0x08, 0xa0, 0x00, 0xa8, 0x82, 0x82, 0x02, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x05, 0x00, 0x00, 0x54, 0x55, 0x10, 0x50, 0x50, 0x00, 0x00, 0x05, 0x50, 0x04, 0x40, 0x00, 0x50, 0x40, 0x05, 0x05, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x01, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x82, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x55, 0x50, 0x15, 0x55, 0x11, 0x55, 0x00, 0x15, 0x00, 0x54, 0x01, 0x00, 0x54, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x20, 0x82, 0x20, 0x08, 0x82, 0x00, 0x22, 0x80, 0x08, 0x08, 0x28, 0xa2, 0x28, 0x20, 0x08, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xa2, 0x00, 0x04, 0x41, 0x10, 0x04, 0x11, 0x00, 0x40, 0x10, 0x14, 0x10, 0x54, 0x54, 0x11, 0x10, 0x00, 0x01, 0x00, 0x50, 0x14, 0x15, 0x05, 0x45, 0x01, 0x50, 0x50, 0x44, 0x14, 0x05, 0x00, 0x04, 0x40, 0x20, 0x02, 0x22, 0x02, 0x22, 0x08, 0x20, 0x20, 0x00, 0x08, 0x20, 0xa8, 0x28, 0x22, 0x08, 0x80, 0x02, 0x00, 0x88, 0x22, 0xa2, 0x88, 0x28, 0x02, 0x88, 0x80, 0x22, 0xa2, 0x08, 0x00, 0x08, 0x22, 0x00, 0x04, 0x41, 0x00, 0x04, 0x00, 0x01, 0x40, 0x00, 0x10, 0x40, 0x04, 0x11, 0x10, 0x04, 0x10, 0x05, 0x00, 0x10, 0x04, 0x01, 0x55, 0x45, 0x04, 0x10, 0x50, 0x44, 0x15, 0x01, 0x00, 0x14, 0x10, 0x00, 0x2a, 0xa0, 0x02, 0x2a, 0x20, 0x22, 0x80, 0x02, 0x22, 0x20, 0x02, 0x0a, 0xa0, 0x02, 0x08, 0x0a, 0x00, 0x20, 0x02, 0x82, 0x80, 0x20, 0x02, 0x80, 0x88, 0x28, 0x82, 0x00, 0x00, 0xa8, 0x20, 0x00, 0x44, 0x40, 0x01, 0x14, 0x00, 0x04, 0x00, 0x05, 0x10, 0x40, 0x00, 0x11, 0x10, 0x05, 0x04, 0x14, 0x00, 0x44, 0x44, 0x01, 0x51, 0x44, 0x04, 0x10, 0x45, 0x14, 0x11, 0x01, 0x00, 0x50, 0x11, 0x00, 0x82, 0x20, 0x02, 0x22, 0x20, 0x28, 0x20, 0x08, 0x2a, 0x80, 0x02, 0x02, 0x20, 0x08, 0x00, 0x00, 0x00, 0x28, 0x28, 0x02, 0x8a, 0x22, 0x02, 0xa0, 0xa8, 0x08, 0x8a, 0x00, 0x00, 0x80, 0x22, 0x00, 0x04, 0x41, 0x10, 0x04, 0x01, 0x10, 0x00, 0x10, 0x41, 0x40, 0x01, 0x11, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x51, 0x20, 0x82, 0x20, 0x00, 0x02, 0x20, 0x28, 0x20, 0x88, 0x20, 0x80, 0x00, 0x82, 0x20, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x10, 0x04, 0x45, 0x10, 0x04, 0x01, 0x10, 0x40, 0x04, 0x40, 0x00, 0x00, 0x41, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x41, 0x8a, 0x0a, 0xaa, 0x8a, 0xaa, 0xa8, 0x20, 0xa0, 0x82, 0xa2, 0x80, 0x80, 0xaa, 0xa8, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xa2, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x10, 0x50, 0x41, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0xa0, 0x80, 0x02, 0xa8, 0x28, 0x0a, 0xa0, 0x02, 0xa8, 0x00, 0x8a, 0x02, 0x28, 0x00, 0x00, 0x00, 0x0a, 0x28, 0x80, 0x2a, 0x80, 0x22, 0x80, 0x0a, 0x00, 0xa8, 0x00, 0x28, 0x2a, 0x00, 0x05, 0x00, 0x50, 0x00, 0x00, 0x55, 0x51, 0x14, 0x14, 0x54, 0x54, 0x01, 0x54, 0x01, 0x50, 0x50, 0x05, 0x00, 0x05, 0x00, 0x50, 0x55, 0x40, 0x51, 0x50, 0x15, 0x00, 0x54, 0x05, 0x14, 0x55, 0x00, 0x0a, 0x00, 0xa0, 0x00, 0x80, 0xaa, 0x2a, 0x2a, 0x08, 0x2a, 0xa8, 0x02, 0xaa, 0x02, 0xa0, 0xa0, 0x02, 0x00, 0x0a, 0x00, 0xa8, 0xaa, 0x80, 0x2a, 0xa8, 0x2a, 0x80, 0xaa, 0x0a, 0xa8, 0xaa, 0x01, 0x05, 0x00, 0x50, 0x05, 0x40, 0x55, 0x55, 0x14, 0x00, 0x14, 0x50, 0x05, 0x54, 0x01, 0x40, 0x51, 0x01, 0x00, 0x55, 0x00, 0x54, 0x55, 0x41, 0x15, 0x54, 0x55, 0x40, 0x55, 0x15, 0x54, 0x55, 0x02, 0x0a, 0x00, 0xa0, 0x0a, 0xa0, 0x02, 0x2a, 0x2a, 0x00, 0x0a, 0x88, 0x0a, 0x2a, 0x00, 0x80, 0xaa, 0x00, 0x00, 0xaa, 0x00, 0xaa, 0xa0, 0xa2, 0x0a, 0x2a, 0xa8, 0xa0, 0x0a, 0x0a, 0xaa, 0xa0, 0x01, 0x14, 0x01, 0x40, 0x55, 0x50, 0x01, 0x14, 0x14, 0x00, 0x05, 0x04, 0x15, 0x15, 0x00, 0x00, 0x51, 0x00, 0x00, 0x54, 0x05, 0x14, 0x40, 0x45, 0x05, 0x15, 0x50, 0x41, 0x01, 0x14, 0x54, 0x40, 0x02, 0xa8, 0x00, 0x80, 0xaa, 0xa8, 0x00, 0x2a, 0x28, 0x88, 0x02, 0x0a, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x0a, 0x0a, 0xa0, 0xa2, 0x82, 0x0a, 0xa0, 0xa0, 0x00, 0x28, 0x2a, 0xa0, 0x01, 0x50, 0x00, 0x00, 0x55, 0x50, 0x00, 0x14, 0x54, 0x54, 0x05, 0x15, 0x14, 0x15, 0x00, 0x00, 0x11, 0x00, 0x00, 0x50, 0x05, 0x15, 0x00, 0x40, 0x01, 0x05, 0x40, 0x51, 0x00, 0x14, 0x14, 0x40, 0x00, 0xa8, 0x00, 0x00, 0xa8, 0x28, 0x00, 0x28, 0x28, 0xa8, 0x02, 0x80, 0x0a, 0x0a, 0x00, 0x80, 0x08, 0x00, 0x00, 0x80, 0x8a, 0x0a, 0x00, 0xa0, 0x80, 0xaa, 0xaa, 0xa8, 0xaa, 0x2a, 0x0a, 0xa0, 0x01, 0x44, 0x01, 0x00, 0x50, 0x55, 0x00, 0x14, 0x50, 0x14, 0x01, 0x00, 0x15, 0x05, 0x00, 0x40, 0x15, 0x00, 0x00, 0x00, 0x15, 0x05, 0x00, 0x50, 0x41, 0x55, 0x55, 0x51, 0x55, 0x15, 0x15, 0x40, 0x00, 0x80, 0x02, 0x00, 0xa0, 0x28, 0x00, 0x0a, 0x28, 0x0a, 0x02, 0x00, 0x8a, 0x0a, 0x00, 0xa0, 0x2a, 0x00, 0x00, 0x00, 0x8a, 0x0a, 0x00, 0xa0, 0x80, 0xaa, 0xaa, 0xa8, 0xaa, 0x2a, 0x0a, 0xa0, 0x01, 0x40, 0x01, 0x00, 0x50, 0x55, 0x00, 0x14, 0x50, 0x05, 0x00, 0x00, 0x14, 0x05, 0x00, 0x50, 0x50, 0x00, 0x00, 0x00, 0x15, 0x05, 0x00, 0x50, 0x40, 0x55, 0x55, 0x51, 0x55, 0x15, 0x05, 0x50, 0x00, 0x80, 0x02, 0x2a, 0xa8, 0x28, 0x00, 0x0a, 0xa8, 0x0a, 0x80, 0xaa, 0x82, 0x02, 0x00, 0x20, 0xa0, 0x00, 0xa0, 0x82, 0x8a, 0x0a, 0x00, 0xa0, 0x80, 0x02, 0x00, 0x28, 0x00, 0x00, 0x0a, 0xa0, 0x00, 0x00, 0x05, 0x14, 0x50, 0x54, 0x00, 0x15, 0x50, 0x05, 0x40, 0x55, 0x01, 0x05, 0x00, 0x10, 0x40, 0x01, 0x40, 0x01, 0x05, 0x15, 0x50, 0x51, 0x40, 0x01, 0x00, 0x50, 0x00, 0x00, 0x05, 0x50, 0x00, 0x00, 0x0a, 0x2a, 0xa8, 0xa8, 0x80, 0x0a, 0xa0, 0x02, 0x80, 0x0a, 0x80, 0x02, 0x00, 0x08, 0x80, 0x02, 0xa0, 0x82, 0x0a, 0x2a, 0xa8, 0xa0, 0x80, 0x02, 0x2a, 0xa8, 0x80, 0x8a, 0x0a, 0xa0, 0x00, 0x00, 0x00, 0x54, 0x55, 0x50, 0x55, 0x05, 0x50, 0x01, 0x00, 0x00, 0x44, 0x05, 0x00, 0x04, 0x00, 0x05, 0x40, 0x55, 0x05, 0x54, 0x55, 0x50, 0x00, 0x55, 0x15, 0x50, 0x55, 0x05, 0x05, 0x50, 0x00, 0x00, 0x00, 0xa8, 0x2a, 0xa0, 0xaa, 0x0a, 0xa0, 0x00, 0x08, 0x00, 0x8a, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x80, 0xaa, 0x02, 0xaa, 0x2a, 0x28, 0x80, 0xaa, 0x0a, 0xa0, 0xaa, 0x82, 0x02, 0x28, 0x00, 0x00, 0x00, 0x50, 0x15, 0x40, 0x55, 0x05, 0x40, 0x01, 0x10, 0x00, 0x55, 0x01, 0x00, 0x05, 0x00, 0x00, 0x00, 0x55, 0x01, 0x54, 0x15, 0x50, 0x00, 0x55, 0x05, 0x40, 0x55, 0x01, 0x05, 0x50, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x80, 0x0a, 0x0a, 0xa0, 0x00, 0x00, 0xa0, 0xaa, 0x02, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x2a, 0x00, 0xa0, 0x0a, 0x28, 0x00, 0xa8, 0x00, 0x80, 0x2a, 0x80, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x50, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0xa8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x8a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x45, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x22, 0xa0, 0x22, 0xa8, 0x0a, 0xa8, 0x00, 0xa8, 0xa0, 0x28, 0x80, 0xaa, 0x22, 0x28, 0xa0, 0x02, 0x2a, 0x2a, 0xa0, 0x02, 0x8a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x50, 0x15, 0x54, 0x15, 0x54, 0x01, 0x55, 0x41, 0x55, 0x00, 0x55, 0x11, 0x54, 0x50, 0x05, 0x54, 0x54, 0x54, 0x05, 0x54, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x08, 0x08, 0x08, 0x20, 0x08, 0x02, 0x82, 0x82, 0x82, 0x82, 0x00, 0xaa, 0x08, 0x20, 0x20, 0x08, 0x08, 0x08, 0x0a, 0x0a, 0x28, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10, 0x04, 0x10, 0x10, 0x00, 0x01, 0x04, 0x01, 0x01, 0x01, 0x01, 0x54, 0x14, 0x11, 0x00, 0x10, 0x10, 0x04, 0x04, 0x04, 0x10, 0x00, 0x14, 0x51, 0x10, 0x44, 0x01, 0x50, 0x44, 0x44, 0x14, 0xa0, 0x00, 0x02, 0x08, 0x08, 0x80, 0x00, 0x82, 0x00, 0x82, 0x80, 0x00, 0xa8, 0x28, 0x00, 0xa0, 0x0a, 0x20, 0x08, 0x02, 0x08, 0x08, 0x00, 0x00, 0x20, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x08, 0x40, 0x05, 0x04, 0x00, 0x10, 0x00, 0x55, 0x45, 0x55, 0x41, 0x40, 0x00, 0x54, 0x54, 0x00, 0x50, 0x05, 0x10, 0x04, 0x55, 0x05, 0x04, 0x00, 0x44, 0x10, 0x14, 0x45, 0x04, 0x10, 0x54, 0x54, 0x04, 0x00, 0x0a, 0x02, 0x00, 0x08, 0x80, 0xaa, 0x82, 0xaa, 0x82, 0x80, 0x00, 0x2a, 0xaa, 0x00, 0x08, 0x08, 0x20, 0x02, 0xaa, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x10, 0x14, 0x04, 0x00, 0x04, 0x00, 0x01, 0x40, 0x00, 0x40, 0x40, 0x00, 0x15, 0x45, 0x15, 0x04, 0x04, 0x10, 0x01, 0x01, 0x00, 0x04, 0x00, 0x05, 0x15, 0x10, 0x44, 0x04, 0x14, 0x14, 0x41, 0x04, 0x08, 0x08, 0x0a, 0x08, 0x08, 0x80, 0x02, 0x82, 0x80, 0x20, 0x20, 0x80, 0x8a, 0x8a, 0x22, 0x02, 0x02, 0xa0, 0x00, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x05, 0x54, 0x15, 0x55, 0x01, 0x55, 0x01, 0x55, 0x51, 0x51, 0x01, 0x45, 0x05, 0x00, 0x54, 0x15, 0x40, 0x00, 0x54, 0x45, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 0xa8, 0x82, 0xaa, 0x00, 0xaa, 0x00, 0x2a, 0xa8, 0xa8, 0x80, 0x82, 0x22, 0x20, 0xa8, 0x0a, 0x20, 0x00, 0xa8, 0x80, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x55, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x15, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x54, 0x55, 0x01, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0xa8, 0xaa, 0x02, 0x00, 0x80, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0a, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x14, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x28, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x02, 0x08, 0x00, 0x10, 0x50, 0x50, 0x50, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x50, 0x00, 0x50, 0x00, 0x05, 0x04, 0x01, 0x05, 0x50, 0x40, 0x54, 0x05, 0x04, 0x05, 0x8a, 0x20, 0x20, 0x88, 0xa0, 0x28, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x20, 0x00, 0x82, 0x82, 0x08, 0x8a, 0x82, 0x08, 0x88, 0xa0, 0xa8, 0x0a, 0x22, 0x28, 0x00, 0x41, 0x00, 0x04, 0x41, 0x44, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x10, 0x00, 0x01, 0x41, 0x10, 0x44, 0x44, 0x10, 0x04, 0x41, 0x50, 0x15, 0x11, 0x10, 0x80, 0x80, 0x00, 0x02, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x80, 0x00, 0x02, 0x22, 0x20, 0x08, 0x20, 0x20, 0x02, 0x22, 0xa0, 0x2a, 0x22, 0x20, 0x00, 0x41, 0x10, 0x01, 0x44, 0x00, 0x00, 0x40, 0x41, 0x51, 0x04, 0x14, 0x15, 0x00, 0x11, 0x44, 0x50, 0x54, 0x40, 0x01, 0x05, 0x10, 0x00, 0x04, 0x10, 0x40, 0x01, 0x44, 0x10, 0x15, 0x51, 0x00, 0xa8, 0x80, 0x00, 0xaa, 0x82, 0x00, 0x00, 0x20, 0x22, 0x8a, 0xa2, 0x22, 0x22, 0x80, 0xa0, 0x88, 0x88, 0x88, 0x88, 0x02, 0x2a, 0x20, 0x00, 0x08, 0xa0, 0x2a, 0xaa, 0x22, 0x20, 0x8a, 0xa0, 0x02, 0x04, 0x01, 0x01, 0x01, 0x40, 0x00, 0x00, 0x40, 0x10, 0x10, 0x41, 0x54, 0x11, 0x00, 0x11, 0x40, 0x54, 0x05, 0x04, 0x05, 0x50, 0x11, 0x00, 0x04, 0x10, 0x00, 0x01, 0x40, 0x10, 0x45, 0x00, 0x15, 0x82, 0x80, 0x08, 0x02, 0x80, 0x00, 0x00, 0x00, 0x22, 0x88, 0x02, 0x02, 0x22, 0x00, 0x82, 0x08, 0x02, 0x08, 0x02, 0x0a, 0x80, 0x22, 0x00, 0x08, 0x20, 0x00, 0x02, 0x20, 0x20, 0xa2, 0x00, 0x28, 0x01, 0x01, 0x05, 0x01, 0x40, 0x00, 0x00, 0x40, 0x14, 0x51, 0x41, 0x44, 0x11, 0x40, 0x04, 0x11, 0x04, 0x05, 0x01, 0x14, 0x00, 0x15, 0x00, 0x04, 0x10, 0x00, 0x01, 0x40, 0x10, 0x51, 0x01, 0x50, 0x82, 0x00, 0x02, 0x02, 0x80, 0x00, 0x00, 0x80, 0xa2, 0x88, 0x2a, 0x28, 0x22, 0x80, 0x02, 0x28, 0x8a, 0x88, 0x00, 0x28, 0x00, 0x22, 0x00, 0x08, 0x20, 0x00, 0x02, 0x20, 0xa0, 0xa8, 0x02, 0x20, 0x01, 0x05, 0x05, 0x04, 0x44, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x00, 0x00, 0x00, 0x01, 0x44, 0x00, 0x04, 0x40, 0x40, 0x04, 0x44, 0x10, 0x51, 0x15, 0x40, 0x82, 0x00, 0x02, 0x08, 0x82, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x00, 0x00, 0x00, 0x02, 0x82, 0x08, 0x08, 0x80, 0x20, 0x08, 0x22, 0xa0, 0xa0, 0x2a, 0x20, 0x14, 0x01, 0x00, 0x50, 0x50, 0x01, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x00, 0x51, 0x00, 0x05, 0x15, 0x00, 0x05, 0x50, 0x50, 0x50, 0x40, 0x15, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x80, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x40, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x80, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xa8, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x15, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x2a, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x15, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0xa2, 0x00, 0x80, 0x02, 0x0a, 0xa2, 0x82, 0x02, 0x0a, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0xa8, 0xa0, 0x80, 0x82, 0xa0, 0x11, 0x01, 0x00, 0x04, 0x11, 0x50, 0x41, 0x04, 0x11, 0x10, 0x00, 0x14, 0x44, 0x40, 0x00, 0x41, 0x11, 0x00, 0x14, 0x00, 0x44, 0x05, 0x05, 0x04, 0x45, 0x00, 0x10, 0x44, 0x11, 0x11, 0x04, 0x44, 0xa2, 0x02, 0x20, 0x80, 0x20, 0x28, 0x20, 0x08, 0x02, 0x20, 0x80, 0x22, 0xa8, 0xa8, 0xa0, 0x82, 0x28, 0x00, 0x28, 0x80, 0x22, 0x08, 0x82, 0x0a, 0x22, 0x80, 0x00, 0x82, 0x20, 0x00, 0x88, 0x8a, 0x51, 0x05, 0x50, 0x00, 0x10, 0x11, 0x11, 0x10, 0x01, 0x50, 0x40, 0x10, 0x54, 0x04, 0x11, 0x04, 0x41, 0x00, 0x50, 0x40, 0x10, 0x04, 0x44, 0x10, 0x44, 0x40, 0x01, 0x01, 0x10, 0x10, 0x44, 0x14, 0xa2, 0x00, 0xa0, 0x00, 0xa8, 0x02, 0xa0, 0x0a, 0x02, 0xa0, 0xa0, 0x00, 0x0a, 0x82, 0x08, 0x82, 0x20, 0x00, 0xa0, 0x20, 0x20, 0x08, 0x22, 0x08, 0x02, 0x80, 0x02, 0x02, 0x20, 0xa8, 0x8a, 0x82, 0x51, 0x01, 0x40, 0x01, 0x55, 0x01, 0x10, 0x00, 0x01, 0x40, 0x41, 0x00, 0x04, 0x54, 0x50, 0x41, 0x40, 0x00, 0x40, 0x10, 0x10, 0x04, 0x41, 0x05, 0x01, 0x00, 0x05, 0x01, 0x10, 0x10, 0x40, 0x50, 0xa2, 0x08, 0x80, 0x82, 0xa0, 0x8a, 0x20, 0x00, 0x02, 0x80, 0x22, 0x00, 0x02, 0x0a, 0x28, 0x80, 0x20, 0x00, 0x80, 0x20, 0x08, 0x88, 0xa0, 0x00, 0x02, 0x00, 0x0a, 0x02, 0x20, 0x08, 0x80, 0xa0, 0x51, 0x01, 0x00, 0x44, 0x50, 0x11, 0x10, 0x00, 0x01, 0x00, 0x11, 0x00, 0x01, 0x01, 0x04, 0x40, 0x10, 0x00, 0x40, 0x11, 0x10, 0x10, 0x11, 0x00, 0x01, 0x00, 0x10, 0x01, 0x10, 0x10, 0x40, 0x50, 0xa2, 0x08, 0x00, 0x88, 0x80, 0x08, 0x20, 0x00, 0x02, 0x02, 0x22, 0x00, 0x02, 0x02, 0x08, 0x20, 0x20, 0x00, 0x80, 0x08, 0x08, 0x88, 0x20, 0x80, 0x00, 0x00, 0x20, 0x02, 0x20, 0x28, 0x80, 0xa0, 0x51, 0x11, 0x10, 0x44, 0x40, 0x50, 0x40, 0x10, 0x01, 0x00, 0x11, 0x00, 0x01, 0x01, 0x04, 0x40, 0x10, 0x00, 0x01, 0x11, 0x04, 0x50, 0x10, 0x00, 0x01, 0x40, 0x10, 0x04, 0x11, 0x50, 0x00, 0x01, 0xa2, 0x28, 0x20, 0x82, 0x0a, 0x20, 0xa0, 0x0a, 0x02, 0x02, 0x22, 0x88, 0x00, 0x82, 0x08, 0x22, 0x08, 0x80, 0x80, 0x28, 0x08, 0x28, 0x20, 0x88, 0x00, 0x80, 0x08, 0xaa, 0x20, 0xa0, 0x82, 0xaa, 0x41, 0x50, 0x50, 0x01, 0x55, 0x00, 0x00, 0x05, 0x05, 0x05, 0x51, 0x04, 0x01, 0x45, 0x14, 0x11, 0x50, 0x00, 0x41, 0x50, 0x04, 0x10, 0x50, 0x44, 0x00, 0x40, 0x05, 0x50, 0x50, 0x40, 0x01, 0x14, 0xaa, 0xaa, 0x00, 0x00, 0x2a, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xa0, 0x82, 0x00, 0x2a, 0xa8, 0x20, 0x28, 0x80, 0x2a, 0x20, 0x08, 0x08, 0xa0, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0x80, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0xaa, 0x02, 0xa0, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55, 0x05, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x2a, 0x2a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x15, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0xaa, 0x8a, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x45, 0x45, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x88, 0xa2, 0x22, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x80, 0xaa, 0x2a, 0x0a, 0x00, 0x0a, 0x08, 0x02, 0x22, 0xa0, 0x80, 0x08, 0x00, 0xa0, 0x00, 0x20, 0xa0, 0xa0, 0xa0, 0x41, 0x01, 0x51, 0x45, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x55, 0x55, 0x14, 0x00, 0x11, 0x14, 0x05, 0x45, 0x10, 0x41, 0x11, 0x00, 0x40, 0x01, 0x14, 0x41, 0x40, 0x10, 0x82, 0x28, 0xa2, 0xaa, 0x80, 0xa2, 0xa2, 0xa0, 0xa8, 0x00, 0x28, 0x28, 0x08, 0xa2, 0x02, 0xaa, 0xa8, 0x80, 0x20, 0x88, 0x88, 0x0a, 0x08, 0x82, 0x20, 0x00, 0x80, 0x0a, 0x00, 0x82, 0x00, 0x08, 0x04, 0x51, 0x51, 0x55, 0x45, 0x44, 0x11, 0x11, 0x11, 0x01, 0x50, 0x44, 0x04, 0x11, 0x05, 0x55, 0x41, 0x41, 0x40, 0x10, 0x40, 0x55, 0x04, 0x44, 0x40, 0x00, 0x00, 0x14, 0x00, 0x01, 0x01, 0x04, 0x88, 0xa8, 0xa8, 0x2a, 0x2a, 0x20, 0x08, 0x0a, 0x0a, 0x02, 0xa0, 0x80, 0x88, 0x08, 0xa2, 0xaa, 0x02, 0x22, 0x00, 0x08, 0xa0, 0x8a, 0x02, 0x88, 0x20, 0x00, 0x00, 0x20, 0x00, 0x82, 0x20, 0x02, 0x05, 0x55, 0x54, 0x55, 0x44, 0x40, 0x50, 0x51, 0x11, 0x01, 0x04, 0x51, 0x10, 0x51, 0x41, 0x55, 0x05, 0x44, 0x00, 0x10, 0x00, 0x50, 0x54, 0x45, 0x40, 0x00, 0x00, 0x40, 0x50, 0x01, 0x01, 0x54, 0x80, 0x2a, 0xaa, 0x0a, 0x28, 0x28, 0x08, 0x08, 0x08, 0x02, 0x88, 0x88, 0x80, 0x08, 0xa8, 0xaa, 0x0a, 0x28, 0x00, 0x08, 0xa0, 0x02, 0x02, 0x80, 0x20, 0x00, 0x00, 0x80, 0x08, 0x02, 0x02, 0x02, 0x00, 0x15, 0x55, 0x15, 0x44, 0x44, 0x10, 0x11, 0x11, 0x01, 0x04, 0x45, 0x50, 0x10, 0x51, 0x55, 0x15, 0x44, 0x00, 0x10, 0x00, 0x01, 0x04, 0x40, 0x40, 0x00, 0x00, 0x40, 0x04, 0x01, 0x11, 0x04, 0x80, 0x0a, 0xaa, 0x2a, 0x82, 0x22, 0xa0, 0xa0, 0x08, 0x02, 0xa8, 0xa8, 0x20, 0xa0, 0xa8, 0xaa, 0x0a, 0x28, 0x00, 0x08, 0x80, 0x00, 0x02, 0x80, 0x20, 0x00, 0x00, 0x80, 0x02, 0x02, 0x0a, 0x02, 0x00, 0x04, 0x54, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x55, 0x15, 0x44, 0x00, 0x10, 0x10, 0x00, 0x04, 0x40, 0x40, 0x00, 0x00, 0x40, 0x04, 0x01, 0x04, 0x04, 0x08, 0x02, 0xa8, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x28, 0x82, 0x00, 0x08, 0xa8, 0x80, 0x08, 0x88, 0x20, 0x00, 0x20, 0x20, 0x02, 0x0a, 0x0a, 0x08, 0x44, 0x00, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x51, 0x01, 0x11, 0x10, 0x54, 0x41, 0x10, 0x44, 0x40, 0x00, 0x40, 0x10, 0x04, 0x01, 0x04, 0x10, 0x00, 0x00, 0xa0, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x08, 0x00, 0x00, 0x00, 0xaa, 0x08, 0x00, 0x0a, 0x2a, 0x2a, 0x0a, 0xa0, 0xa0, 0xa0, 0x00, 0x20, 0x0a, 0x28, 0x02, 0x00, 0xa0, 0x50, 0x01, 0x50, 0x55, 0x05, 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x54, 0x55, 0x01, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; xorg-server-21.1.16/hw/xnest/man/0000755000175000017500000000000014757411135012250 5xorg-server-21.1.16/hw/xnest/man/Makefile.am0000644000175000017500000000007114757411105014217 include $(top_srcdir)/manpages.am appman_PRE = Xnest.man xorg-server-21.1.16/hw/xnest/man/Makefile.in0000644000175000017500000006306414757411115014244 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xnest/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xnest.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xnest/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xnest/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xnest/man/Xnest.man0000644000175000017500000003413014757411105013764 .\" $Xorg: Xnest.man,v 1.3 2000/08/17 19:53:28 cpqbld Exp $ .\" Copyright (c) 1993, 1994 X Consortium .\" .\" 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, and to .\" permit persons to whom the Software is furnished to do so, subject to .\" the following conditions: .\" .\" 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 X CONSORTIUM 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 X Consortium 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 X Consortium. .\" .\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $ .\" .TH Xnest @appmansuffix@ @xorgversion@ .SH NAME Xnest \- a nested X server .SH SYNOPSIS .B Xnest [ .I options ] .SH DESCRIPTION .B Xnest is both an X client and an X server. .B Xnest is a client of the real server which manages windows and graphics requests on its behalf. .B Xnest is a server to its own clients. .B Xnest manages windows and graphics requests on their behalf. To these clients, .B Xnest appears to be a conventional server. .SH OPTIONS .B Xnest supports all standard options of the sample server implementation. For more details, please see .BR Xserver (@appmansuffix@). The following additional arguments are supported as well. .TP .BI "\-display " string This option specifies the display name of the real server that .B Xnest should try to connect to. If it is not provided on the command line, .B Xnest will read the .I DISPLAY environment variable in order to find out this information. .TP .B \-sync This option tells .B Xnest to synchronize its window and graphics operations with the real server. This is a useful option for debugging, but it will slow down .BR Xnest 's performance considerably. It should not be used unless absolutely necessary. .TP .B \-full This option tells .B Xnest to utilize full regeneration of real server objects and reopen a new connection to the real server each time the nested server regenerates. The sample server implementation regenerates all objects in the server when the last client of this server terminates. When this happens, .B Xnest by default maintains the same top-level window and the same real server connection in each new generation. If the user selects full regeneration, even the top-level window and the connection to the real server will be regenerated for each server generation. .TP .BI "\-class " string This option specifies the default visual class of the nested server. It is similar to the .B \-cc option from the set of standard options except that it will accept a string rather than a number for the visual class specification. The .I string must be one of the following six values: .BR StaticGray , .BR GrayScale , .BR StaticColor , .BR PseudoColor , .BR TrueColor , or .BR DirectColor . If both the .B \-class and .B \-cc options are specified, the last instance of either option takes precedence. The class of the default visual of the nested server need not be the same as the class of the default visual of the real server, but it must be supported by the real server. Use .BR xdpyinfo (@appmansuffix@) to obtain a list of supported visual classes on the real server before starting .BR Xnest . If the user chooses a static class, all the colors in the default color map will be preallocated. If the user chooses a dynamic class, colors in the default color map will be available to individual clients for allocation. .TP .BI "\-depth " int This option specifies the default visual depth of the nested server. The depth of the default visual of the nested server need not be the same as the depth of the default visual of the real server, but it must be supported by the real server. Use .BR xdpyinfo (@appmansuffix@) to obtain a list of supported visual depths on the real server before starting .BR Xnest . .TP .B \-sss This option tells .B Xnest to use the software screen saver. By default, .B Xnest will use the screen saver that corresponds to the hardware screen saver in the real server. Of course, even this screen saver is software-generated since .B Xnest does not control any actual hardware. However, it is treated as a hardware screen saver within the sample server code. .TP .B \-geometry \fIW\fBx\fIH\fB+\fIX\fB+\fIY\fP This option specifies the geometry parameters for the top-level .B Xnest window. See \(lqGEOMETRY SPECIFICATIONS\(rq in .BR X (@miscmansuffix@) for a discussion of this option's syntax. This window corresponds to the root window of the nested server. The width .I W and height .I H specified with this option will be the maximum width and height of each top-level .B Xnest window. .B Xnest will allow the user to make any top-level window smaller, but it will not actually change the size of the nested server root window. .B Xnest does not yet support the RANDR extension for resizing, rotation, and reflection of the root window. If this option is not specified, .B Xnest will choose .I W and .I H to be 3/4ths the dimensions of the root window of the real server. .TP .BI "\-bw " int This option specifies the border width of the top-level .B Xnest window. The integer parameter .I int must be positive. The default border width is 1. .TP .BI "\-name " string This option specifies the name of the top-level .B Xnest window as .IR string . The default value is the program name. .TP .BI "\-scrns " int This option specifies the number of screens to create in the nested server. For each screen, .B Xnest will create a separate top-level window. Each screen is referenced by the number after the dot in the client display name specification. For example, .B xterm \-display :1.1 will open an .BR xterm (@appmansuffix@) client in the nested server with the display number .B :1 on the second screen. The number of screens is limited by the hard-coded constant in the server sample code, which is usually 3. .TP .B \-install This option tells .B Xnest to do its own color map installation by bypassing the real window manager. For it to work properly, the user will probably have to temporarily quit the real window manager. By default, .B Xnest will keep the nested client window whose color map should be installed in the real server in the .I WM_COLORMAP_WINDOWS property of the top-level .B Xnest window. If this color map is of the same visual type as the root window of the nested server, .B Xnest will associate this color map with the top-level .B Xnest window as well. Since this does not have to be the case, window managers should look primarily at the .I WM_COLORMAP_WINDOWS property rather than the color map associated with the top-level .B Xnest window. .\" Is the following still true? This sentence is several years old. Unfortunately, window managers are not very good at doing that yet so this option might come in handy. .TP .BI "\-parent " window_id This option tells .B Xnest to use .I window_id as the root window instead of creating a window. .\" XRX is dead, dead, dead. .\" This option is used by the xrx xnestplugin. .SH "EXTENDED DESCRIPTION" Starting up .B Xnest is just as simple as starting up .BR xclock (@appmansuffix@) from a terminal emulator. If a user wishes to run .B Xnest on the same workstation as the real server, it is important that the nested server is given its own listening socket address. Therefore, if there is a server already running on the user's workstation, .B Xnest will have to be started up with a new display number. Since there is usually no more than one server running on a workstation, specifying .RB \(oq "Xnest :1" \(cq on the command line will be sufficient for most users. For each server running on the workstation, the display number needs to be incremented by one. Thus, if you wish to start another .BR Xnest , you will need to type .RB \(oq "Xnest :2" \(cq on the command line. .PP To run clients in the nested server, each client needs to be given the same display number as the nested server. For example, .RB \(oq "xterm \-display :1" \(cq will start up an .B xterm process in the first nested server and .RB \(oq "xterm \-display :2" \(cq will start an .B xterm in the second nested server from the example above. Additional clients can be started from these .BR xterm s in each nested server. .SS "Xnest as a client" .B Xnest behaves and looks to the real server and other real clients as another real client. It is a rather demanding client, however, since almost any window or graphics request from a nested client will result in a window or graphics request from .B Xnest to the real server. Therefore, it is desirable that .B Xnest and the real server are on a local network, or even better, on the same machine. .B Xnest assumes that the real server supports the SHAPE extension. There is no way to turn off this assumption dynamically. .B Xnest can be compiled without the SHAPE extension built in, in which case the real server need not support it. Dynamic SHAPE extension selection support may be considered in further development of .BR Xnest . .PP Since .B Xnest need not use the same default visual as the the real server, the top-level window of the .B Xnest client always has its own color map. This implies that other windows' colors will not be displayed properly while the keyboard or pointer focus is in the .B Xnest window, unless the real server has support for more than one installed color map at any time. The color map associated with the top window of the .B Xnest client need not be the appropriate color map that the nested server wants installed in the real server. In the case that a nested client attempts to install a color map of a different visual from the default visual of the nested server, .B Xnest will put the top window of this nested client and all other top windows of the nested clients that use the same color map into the .I WM_COLORMAP_WINDOWS property of the top-level .B Xnest window on the real server. Thus, it is important that the real window manager that manages the .B Xnest top-level window looks at the .I WM_COLORMAP_WINDOWS property rather than the color map associated with the top-level .B Xnest window. Since most window managers don't yet appear to implement this convention properly, .B Xnest can optionally do direct installation of color maps into the real server bypassing the real window manager. If the user chooses this option, it is usually necessary to temporarily disable the real window manager since it will interfere with the .B Xnest scheme of color map installation. .PP Keyboard and pointer control procedures of the nested server change the keyboard and pointer control parameters of the real server. Therefore, after .B Xnest is started up, it will change the keyboard and pointer controls of the real server to its own internal defaults. .SS "Xnest as a server" .B Xnest as a server looks exactly like a real server to its own clients. For the clients, there is no way of telling if they are running on a real or a nested server. .PP As already mentioned, .B Xnest is a very user-friendly server when it comes to customization. .B Xnest will pick up a number of command-line arguments that can configure its default visual class and depth, number of screens, etc. .PP The only apparent intricacy from the users' perspective about using .B Xnest as a server is the selection of fonts. .B Xnest manages fonts by loading them locally and then passing the font name to the real server and asking it to load that font remotely. This approach avoids the overload of sending the glyph bits across the network for every text operation, although it is really a bug. The consequence of this approach is that the user will have to worry about two different font paths \(em a local one for the nested server and a remote one for the real server \(em since .B Xnest does not propagate its font path to the real server. The reason for this is because real and nested servers need not run on the same file system which makes the two font paths mutually incompatible. Thus, if there is a font in the local font path of the nested server, there is no guarantee that this font exists in the remote font path of the real server. The .BR xlsfonts (@appmansuffix@) client, if run on the nested server, will list fonts in the local font path and, if run on the real server, will list fonts in the remote font path. Before a font can be successfully opened by the nested server, it has to exist in local and remote font paths. It is the users' responsibility to make sure that this is the case. .SH "FUTURE DIRECTIONS" Make dynamic the requirement for the SHAPE extension in the real server, rather than having to recompile .B Xnest to turn this requirement on and off. .PP Perhaps there should be a command-line option to tell .B Xnest to inherit the keyboard and pointer control parameters from the real server rather than imposing its own. .PP .B Xnest should read a customization input file to provide even greater freedom and simplicity in selecting the desired layout. .PP There is no support for backing store and save unders, but this should also be considered. .PP .\" Is the following still true now that client-side font rendering is .\" considered the way to go? The proper implementation of fonts should be moved into the .I os layer. .SH BUGS Doesn't run well on servers supporting different visual depths. .PP Still crashes randomly. .PP Probably has some memory leaks. .SH AUTHOR Davor Matic, MIT X Consortium .SH "SEE ALSO" .BR Xserver (@appmansuffix@), .BR xdpyinfo (@appmansuffix@), .BR X (@miscmansuffix@) xorg-server-21.1.16/hw/xquartz/0000755000175000017500000000000014757411136012053 5xorg-server-21.1.16/hw/xquartz/bundle/0000755000175000017500000000000014757411135013323 5xorg-server-21.1.16/hw/xquartz/bundle/meson.build0000644000175000017500000000372614757411105015412 # generate Info.plist # https://github.com/mesonbuild/meson/issues/8434 #cpp = find_program('cpp') cpp = '/usr/bin/cpp' cpp_defs = [ '-DAPPLE_APPLICATION_NAME=@0@'.format(apple_application_name), '-DBUNDLE_ID_PREFIX=@0@'.format(bundle_id_prefix), '-DBUNDLE_VERSION=@0@'.format(bundle_version), '-DBUNDLE_VERSION_STRING=@0@'.format(bundle_version_string), ] if build_sparkle cpp_defs += sparkle_defs endif # bundle data localities = [ 'Dutch', 'English', 'French', 'German', 'Italian', 'Japanese', 'Spanish', 'ar','ca','cs','da','el','fi','he','hr','hu','ko','no','pl','pt','pt_PT', 'ro','ru','sk','sv','th','tr','uk','zh_CN','zh_TW' ] foreach lang : localities install_data(join_paths('Resources', lang + '.lproj', 'Localizable.strings'), install_dir: join_paths(bundle_root, 'Contents/Resources', lang + '.lproj'), install_mode: 'rw-r--r--') install_data(join_paths('Resources', lang + '.lproj', 'main.nib/keyedobjects.nib'), install_dir: join_paths(bundle_root, 'Contents/Resources', lang + '.lproj', 'main.nib'), install_mode: 'rw-r--r--') endforeach install_data('Resources/English.lproj/main.nib/designable.nib', install_dir: join_paths(bundle_root, 'Contents/Resources/English.lproj/main.nib'), install_mode: 'rw-r--r--') install_data('Resources/X11.icns', install_dir: join_paths(bundle_root, 'Contents/Resources'), install_mode: 'rw-r--r--') custom_target('Info.plist', command: [cpp, '-P', cpp_defs, '@INPUT@'], capture: true, input: 'Info.plist.cpp', output: 'Info.plist', install: true, install_dir: join_paths(bundle_root, 'Contents'), install_mode: 'rw-r--r--', build_by_default: true, ) install_data('PkgInfo', install_dir: join_paths(bundle_root, 'Contents'), install_mode: 'rw-r--r--') install_data('X11.sh', install_dir: join_paths(bundle_root, 'Contents/MacOS'), install_mode: 'rwxr-xr-x') meson.add_install_script('chown-bundle.sh', bundle_root) xorg-server-21.1.16/hw/xquartz/bundle/Resources/0000755000175000017500000000000014757411136015276 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/0000755000175000017500000000000014757411135017024 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/main.nib/0000755000175000017500000000000014757411135020517 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib0000644000175000017500000021640214757411105023230 يؤدي بدء تشغيل X11 إلى إنشاء مفاتيح تحكم في وصول Xauthority. في حالة تغيير عنوان IP للنظام، تصبح هذه المفاتيح غير صالحة، مما قد يؤدي إلى الحيلولة دون بدء تشغيل تطبيقات X11. في حالة التمكين، يجب أيضًا تمكين مصادقة الاتصالات للتأكد من تأمين النظام. وفي حالة التعطيل، لا يتم السماح بالاتصالات من تطبيقات بعيدة. اضغط مع الاستمرار على مفتاح الاختيار أو مفتاح الأوامر أثناء النقر لتنشيط زر الماوس الأوسط أو الأيمن. xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects.nib0000644000175000017500000013460614757411105023613 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX "'(-23 8<=CS\]stxy| -89NVWX^mnvwx~!"#)89ABCIXYabcixy!"#*+,./7?@CKLUefmn~ !019:IJRScdkl}~    & ' . / ? @ G H W X ` a q r y z         " # ' ( - . 3 4 9 K T U _ ` a f v w ~          # $ ) * / 0      * + , 0 ; < A C F G H I J  \ f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+17ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*eB'&E)1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "i'D*7(JB'*P^submenuAction:$%*g*7(JB'*1&')#   #!(f*.5J5 &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5g-HD X112XY287j*A6JD'*...Q,22  2kkm2!<<;"e./E'*stu*>=?e./E'*1x)__NSServicesMenu22  22CBo*(/JD ED! 'D4'4)Qa22  2UNSTag2G*Fi%.A'! X11Qh22GIl%.A'! 'D#.1I22!Kj%8G'1 'DCD22  22ONi%FG'! X11Qq\_NSAppleMenu-!SSR"i'D*7(JB'*TU*g*7(JB'*1؀VW)S  S!Xh*.5J5...-![[Z"e*-1J1\]*e*-1J11^)[`_cF3.Qc  -!ccb"eF'A0)*edxeF'A0)1 !"filnoruv) ()chge%:D'BQw 12ckje*5:J1Qm ;c!mk*C(J1/*5:J1 c   KLcqpo*/HJ1 9(1 'DFH'A0Q` RUVctso9C3 'D*/HJ1 9(1 'DFH'A0Q~ c   hc!wo%-6'1 'DCD %DI 'D#E'E^_NSWindowsMenuqqs-!{{z"fE3'9/)xy|}*fE3'9/)1}~~)q{!jE3'9/) X11[_NSMainMenuTmenu V^apps_separator Ȁ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ǀR@#@À#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@e'D'3EmnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView0AYText Cellmnptu#@*XB1_controlTextColor+,ۤ/+,]NSTableColumn/LMNOPQRSWXY #@X#@D_`abcdefijg'D#H'E1XM0.3333329856_`abcʀLMNOPQRSWXY #@Q#@$_`abcdefijlEA*'- '.*5'1  [headerColorXB1C1 1_`abc_NSDrawsBackground mnptu#@($&_controlBackgroundColor)*XL0.602715373N0.6666666667 1/1ĀYgridColor45XM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ʀԀDHJLMHVNSCellˀ ̀̀ UWXb MU_{{17, 245}, {402, 18}}^__`acbac`defghkl@nXpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH(Q !πʀ΀o'DFB1 .D'D 'DFH'A0 :J1 'DF47)uvw[NSImageNameЀXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through ^ր^copy_menu_item ؀DȀـ ڀۀ W M_{{253, 235}, {128, 26}}d__^c`ae`cXpf _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀mnptu WNSStateހۀ!*mEF 4'4) 'D916__popUpItemAction:ZOtherViews1׀݀)ހ!ibef DHFK'ހ!d"D'Aހ!fED'JJF+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!J%&!, 0W225 LM??A_{{18, 243}, {402, 18}}:;D<=!CEF!LM_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth  BC #@w^__`acbac`defghklSXpqr!πoE5'/B) 'D'*5'D'*[enable_auth[\ DJfgȀـ _{{11, 182}, {409, 23}}^__`acbac`defghkl[sXpqr!πnH69 ED! 'D4'4)_enable_fullscreen{| DJȀـ  _{{-8, 116}, {409, 23}}^__`acbac`defghkl{Xpqr!ρo1'D3E'- ('DH5HD %DI 41J7 'DBH'&E AJ H69 ED! 'D4'4)_enable_fullscreen_menu :;D<=C ـ  #@v`_{{22, 79}, {362, 31}}Z{250, 750}_`abcg   @oU3J5(- 41J7 'DBH'&E E1&J'K 9F/ H69 E$41 'DE'H3 AJ 'D,2! 'D9DHJ EF 4'4) 'D916 'D#3'3J).mnpqtu &\controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJȀ  W M_{{18, 130}, {402, 18}}^__`acbac`defghklXpqr!ρo*ECJF EC'A&'* 'DEA'*J- AJ X11_enable_keyequivsM D!J!  _{{18, 166}, {402, 18}}:;D<=!C!L  EG F^__`acbac`defghklMXpqr!ρo!'D3E'- ('D'*5'D'* EF 9ED'! 'D4(C)Zenable_tcp&'  $DJ12Ȁ !" _{{18, 243}, {402, 18}}^__`acbac`defghkl&>Xpqr!ρ #oE6'G') E'H3 +D'+J 'D#21'1\fake_buttonsFG &*DHJQRHȀˀ '( _{{17, 184}, {402, 18}}^__`acbac`defghklF^Xpqr!ρ&)o'D*1CJ2 *(9K' DEH69 E$41 'DE'H3_focus_follows_mousefg ,0DHJqrHȀˀ -. _{{17, 140}, {402, 18}}^__`acbac`defghklf~Xpqr!ρ,/o'D*1CJ2 9DI 'DFH'A0 'D,/J/)_focus_on_new_window 26DJȀ 34 _{{18, 69}, {402, 18}}^__`acbac`defghklXpqr!ρ25o)EA'*J- 'D'.*J'1 *BHE (%13'D Alt_L H Alt_R_option_sends_alt 8X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_{{266, 364}, {484, 342}}k*A6JD'* X11WNSPanelZ{320, 240}WـM >12?)!_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsPO N== @ 1!)1M,F)_{{17, 195}, {385, 42}}_`abcg,  DoJ$/J (/! *4:JD X11 %DI %F4'! EA'*J- *-CE AJ H5HD Xauthority. AJ -'D) *:JJ1 9FH'F IP DDF8'E *5(- G0G 'DEA'*J- :J1 5'D-) EE' B/ J$/J %DI 'D-JDHD) /HF (/! *4:JD *7(JB'* X11._{{17, 118}, {385, 42}}:;D<=!C!2  IJ #@y?_`abcg  HoAJ -'D) 'D*ECJF J,( #J6K' *ECJF E5'/B) 'D'*5'D'* DD*#C/ EF *#EJF 'DF8'E. HAJ -'D) 'D*97JD D' J*E 'D3E'- ('D'*5'D'* EF *7(JB'* (9J/)._{{17, 17}, {404, 14}}_`abcg(F  Ko7J*E *FAJ0 G0G 'D.J'1'* AJ 'DE1) 'D*'DJ) D(/! *4:JD X11._{{10, 33}, {438, 280}}+,-/_{{13, 10}, {458, 326}}102345PSd)89:!<2VNSViewYNSTabViewRQ? f'D#E'F+,AB]NSTabViewItemA/89D:HH2J\NSIdentifier Rˁc?TQ21M@OFQfSʁV&Z,^):;D<=HC^_HL ˀ WX _{{19, 208}, {385, 31}}_`abcgOkV  Yoi9F/ *ECJFG 3J$/J 'DFB1 9DI F'A0) :J1 F47) %DI E1H1 FB1) 'DE'H3 G0G 9(1 G0G 'DF'A0) ('D%6'A) %DI *F4J7G'.:;D<=HCwxHL ˀ [\ _{{19, 161}, {385, 17}}_`abcgQZ  ]o<J*(9 *1CJ2 F'A0) X11 EH69 'DE$41 HDG0' (96 'D"+'1 'D3D(J).:;D<=HCHL ˀ _` _{{19, 106}, {385, 28}}_`abcgS^  ao~9F/ *ECJFG 3J$/J %F4'! F'A0) X11 ,/J/) %DI 'F*B'D *7(JB X11.app %DI 'DEB/E) ((/D'K EF Finder.app #H Terminal.app HE' %DI 0DC)_{{10, 33}, {438, 279}}g'DFH'A089D:2J Re?TW Mf1gkosw{)DJȀe hi e_{{11, 255}, {409, 23}}^__`acbac`defghklXpqr!ρgjn*ECJF 'DE2'EF):;D<=CL e lm e_{{17, 221}, {385, 28}}_`abcgk  nopJBHE (*ECJF 9F51 'DB'&E) "F3." HJ3E- ('DE2'EF) (JF DH-) 'DD5B AJ OSX H-'A8) X11 H0'C1'* 'D*.2JF 'DE$B* 'D#3'3J).DJȀe pq e_{{-5, 129}, {409, 23}}^__`acbac`defghklXpqr!ρoro.*-/J+ 'D-'A8) 9F/ %,1'! *:JJ1'* 9DI DH-) 'DD5BDJȀe tu e_{{-5, 104}, {409, 23}}^__`acbac`defghklXpqr!ρsvoJ*-/J+ 'D0'C1) 'D#3'3J) (FB1 ('D21 'D#H37) 9F/ %,1'! *:JJ1'* 9DI DH-) 'DD5BDJ)*Ȁe xy e_{{-5, 79}, {409, 23}}^__`acbac`defghkl6Xpqr!ρwzo,*-/J+ DH-) 'DD5B 9DI 'DAH1 9F/ *-/J/ F5 ,/J/DJBCȀe |} e_{{-5, 192}, {409, 23}}^__`acbac`defghklOXpqr!ρ{~o.*-/J+ DH-) 'DD5B 9F/ %,1'! *:JJ1'* 9DI 'D-'A8):;D<=C\]L e  e_{{2, 158}, {385, 28}}_`abcgi  odBE (*97JD G0' 'D.J'1 %0' CF* *1:( AJ '3*./'E xclipboard #Hklipper #H #J) #/') #.1I D%/'1) -'A8) X11.:;D<=Cuv| e  e#@v_{{17, 47}, {370, 28}}_`abcg  oTF81K' DDBJH/ 'DEH,H/) AJ (1H*HCHD X11 B/ D' J9ED G0' 'D.J'1 /HEK' AJ (96 'D*7(JB'*._{{10, 33}, {438, 279}}jDH-) 'DD5B89D:2J Rف?T1[{؁):;D<=C ـ  #@I_{{383, 238}, {55, 20}}_`abcg @h'D#DH'F::;D<=Cā ـ  #@x@_{{10, 216}, {392, 14}}_`abcg  o5J*E *FAJ0 G0' 'D.J'1 AJ 'DE1) 'D*'DJ) D(/! *4:JD X11.:;D<=CL ـ  _{{17, 145}, {385, 31}}_`abcg  oX*ECJF F'A0) X11 root. '3*./E 6:7 EA'*J- 'D#H'E1-'D'.*J'1-A D/.HD HE:'/1) H69 ED! 'D4'4)._{{10, 33}, {438, 279}}g'D%.1',89D:2 R?Q11& 2):;D<=C  L   _{{17, 93}, {385, 31}}_`abcg   ocAJ -'D) 'D*ECJF B/ **/'.D EC'A&'* EA'*J- 41J7 'DB'&E) E9 *7(JB'* X11 'D*J *3*./E EA*'- *9/JD Meta.:;D<=C  L   _{{17, 195}, {385, 42}}_`abcg ,  oe'6:7 E9 'D'3*E1'1 9DI EA*'- 'D'.*J'1 #H EA*'- 'D#H'E1 #+F'! 'DFB1 D*F4J7 21 'DE'H3 'D#H37 #H 'D#JEF. :;D<=C 8 9L   _{{17, 159}, {385, 14}}_`abcg E  oB'D3E'- D*:JJ1'* B'&E) 'D%/.'D ('DC*'() AHB E.77 EA'*J- X11 'D-'DJ.DJ P QȀ  _{{18, 179}, {402, 18}}^__`acbac`defghkl ]Xpqr!ρo'*('9 *5EJE DH-) EA'*J- 'DF8'E:;D<=C j kL   _{{17, 32}, {385, 31}}_`abcg w  o_9F/ *ECJFG' *BHE EA'*J- 'D'.*J'1 (%13'D 9D'E'* 'DEA*'- Alt_L H Alt_R X11 (/DK' EF Mode_switch.DJ  Ȁ  _{{2, 8}, {418, 18}}^__`acbac`defghkl Xpqr!ρo#'D*E1J1 /'&EK' AJ '*,'G -1C) 'D%5(9_{{10, 33}, {438, 280}}g'D%/.'D+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel _scroll_in_device_direction {€_sync_clipboard_to_pasteboard Ā[sync_keymap gƀ_sync_pasteboard oȀ_sync_pasteboard_to_clipboard sʀ_sync_pasteboard_to_primary ẁ_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D AҀ_toggle_fullscreen_item? 4Ԁ^x11_about_item" v ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F  E߁Uhide:J  MZterminate:G  H_hideOtherApplications:H J_unhideAllApplications: % ^Ucopy: + f ]close_window: 1 l \zoom_window: 5 7  D : ;/J  C D/=_NSHuggingPriority    W O SM 6K_{{14, 191}, {100, 32}}^__`acac`defg V Y 5 [ \qp@ !Ҁe*C1'1_apps_table_duplicate: b d  D : ;/J  n o/=   _{{14, 159}, {100, 32}}^__`acac`defg V Y b { \qp!Ҁe%2'D)_apps_table_delete: W _apps_table_show:  D : ;/J   /=   _{{14, 223}, {100, 32}}^__`acac`def V Y \qp!Ҁj%6'A) 9F51_apps_table_new:&  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ^prefs_changed:M   ^prefs_changed: ؀  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:[ _enable_fullscreen_changed:D A _toggle_fullscreen:@ ʀ ^prefs_changed:F & ^prefs_changed:f , ^prefs_changed:  g  ^prefs_changed: o "^prefs_changed:  s $^prefs_changed:  { &^prefs_changed:  w (^prefs_changed:{ !  *^prefs_changed: ' 2 ,^prefs_changed: -  .^prefs_changed:1 1 ʯ 2'2?@ABkCDEFGHIJ()*  !"+q~2!&M,F2H@MO_FRQxfrS3*C]v4[g{5&2   9 Q k / 5 D b oGUHI-7 0-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 8=?PCGFJSˀʀ́VX&(Z\,.^`degikmoqsuwy{}ـ؀ۀހ݀  "242>B#&'I& (1]NSApplication /    34MN L5;! _{{302, 440}, {454, 271}}oB'&E) *7(JB'* X11Z{320, 240}1 5 b 􀍁)1 -7>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $     _NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller ;/    #  A C@@_{{302, 29}, {15, 186}}_{{116, 20}, {318, 231}}1 - ʡ .FI 1 2 3 4 5 6 7   :_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, = >_NSPanGestureRecognizer ? @/_NSPanGestureRecognizer_NSGestureRecognizer+, B/+, D E\NSScrollView D/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 K ʯ'2222B22222222()*        +q2!!M!,!!22H@HOHFHQHfHS2324[{25& / 5/ b/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{8=?PF?SˀʀˁVˁ&ˁZˁ,ˁ^?degekeoesewe{ee?ـ؀ۀހހހހففـففف? 22##I1 ʯ 2'2?@ABkCDEFGHIJ()*  !"+q~2!&M,F2H@MO_FRQxfrS3*C]v4[g{5&2   9 Q k / 5 D b oGUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 8=?PCGFJSˀʀ́VX&(Z\,.^`degikmoqsuwy{}ـ؀ۀހ݀  "242>B#&' ,ɀՀ׀%+17ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ʯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ʠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   * 2 Z \ ^ ` b d m o q        ! # L Z a u  ) 7 9 ; = ? A C K ] j u   + 0 ] f p y { }   <>@BDFHU^mt|/13579;=?AEVXZ\^g?ACDFHIKMz|~   138:<>@Beg 2WY[]_acx+-/13579;=P]_acr{(*,.02468:ERTVXcloqs   13579;=?ACdfhjlnp{}$&()+-.02SUWY[]_ "CEGIKMO|(*,.024IUZoqsuwyJW`y9E^"@Tpz"1K_r0:CQ[cm !"$&()+-/13lmoqtwy{}~   s       ! & ) 2 4 = > A D G I K N a j l o ! !!&!5!=!H!I!K!M!V!X!Z![!d!m!o!!!!!!!!!!!!!!!"""&"-"6"8":"<">"S"\"y"{"}""""""""""""""####0#5#>#Q#V#i#r#y#~#############$$$$$$ $5$B$W$Z$^$`$b$s$x$~$$$$$6.676D6I6V6_6s6~66666666666666777777%7(7*7?7A7C7E7G7Z7c7l7u77777777777777777888"8$8I8K8M8O8Q8S8U8~888888888888888888889999#9%9'9P9d9f9h9j9k9m9o9q9999999999999999::::::$:9:G:M:O:Q:Z:f:q:{:::::::;;; ; ; ; ;;;;;;;;;;;F;H;K;L;O;R;T;V;X;q;;;;;<< <2>>>>">%>'>)>+>E>>>>>>?? ? ??????? ?"?$?&?(?9??@?q?y?{?}????????????????????@@!@#@%@'@)@+@-@/@1@D@q@s@u@w@y@{@}@@@@@@@@@@@@@@@@@AAAA(A5A;APARATAVAXAZAiA~AAAAAAAAAAAAAAAAAAABGBIBJBKBMBOBQBRBTBVBXBYB[B\B]B_BBBBBBBBBBBBC,CHCpCCCCCCCCCCCCCCCCCCCCCCCCCDD$D0DEDGDIDKDMDODDDDDDDDDDDDDDDDEEEEE E"E$E&ECEWElEnEpEsEvExEEEEEEEEEEEEEEEFFCFEFGFIFLFOFQFSFFFFFFFFGYG\G^G_G`GbGdGgGhGkGnGpGqGsGtGuG~GGGGGGGGGGHHHHHHHHHHHHHHI II I"I%I(I*IIIIIIIIIIIIIIIIIIIIIIIIIJ2J4J6J8J;J>J@JBJJJJJJJJKKKKKKKKK K#K%K&K(K)K*K-KFKKKKKKKKKKKKKKKKKLLLLLLLLLdLoLLLLLLLLLLLLLLLLLMMMMMM]M_MaMcMfMiMkMmMMMMMMMMN+N-N.N/N1N3N5N6N9NN?NANBNCN\NNNNNNNNNOOOOOO!O#O~OOOOOOOOOOOOOOOOOOOOOOOP7PMPbPdPfPiPlPnPPPPPPPPPPPPPPPPQ:QQ@QCQFQHQJQQQQQQQQR"R/ROR]RgRtR~RRRRRS SS'S5SASTShSkSmSpSsSvSyS|S}SSSSSSSSSSSSSTTT T TTTTTT!T$T'T)TtTTTTTTTTTTTTTTTTTTTTTTTTUUUUU UUU)UNUPURUUUXU[U]VVWf@fBfEfHfJfLfggggg g g ggggggggg5gtgvgxgzg}gggghJhMhOhPhQhThVhYhZh]h`hbhchfhghhhhhhhhhhiiiiiiiiiiiiijjjjjj&jKjNjPjSjVjYj[kkk4kMkPkSkUkXk[k^kgkvkxk{k~kkkkkkkkkkkklllll l l l lll0lUlXlZl\l_lbldlilzllllllllllllllllmmmDmGmImLmOmRmTmn(n+n-n.n/n1n3n6n7n:n=n?n@nBnCnDn]nnnnnnnoEo^omoooooooooooooooooooop:p=p?p@pApDpFpIpJpMpPpRpSpVpWpXpppppppppqnqqqqqqqqqqqqqqqqr r1r4r6r9ruAuCuEuuuuuuuuuuuvvvvvv v!vFvIvKvNvQvTvVwwrwtwuwvwyw{w}w~wwwwwwwwwwwwwwwwx:xSxbxkxux~xxxxxxxxyyy#y%y'y*y-y/yLyaycyeyhykymyyyyyyyyyyyyyyyzzzzz z z,zAzCzEzHzKzMzjzzzzzzzzzzzzzzzzzzzzz{{{{{{{7{L{N{P{R{U{W{f{w{y{{{~{{{{{{{{{{{{| | | |||3|D|F|H|K|N|Z|k|m|o|r|u|{|||||||||||||||||} }}}}}$}5}7}9}<}?}M}^}`}b}e}h}u}}}}}}~~~ ~ ~ ~~~~~~~~~~ ~!~$~M~O~R~S~V~X~Z~\~_~x~~~~~~~~~~~~ mopqtvxy| "%8ILNQT€ŀǀȀˀ̀̀Ѐ"+-/2579N`qtvy|ǁʁ́ρҁ !$'6GIKNQ`qsux{ĂƂȂ˂΂ۂ !$ARTVY\qƃ׃ڃ܃߃ -0258GX[]`crȄل܄ބ /247:IR†ĆƆȆʆ̆ΆІ҆Ն؆ۆކ "%(+.147:=@CFILORUX[]_acegiknqtwy{~ÇƇɇ̇χ҇Շ؇ۇ݇߇ &uxz}  "$'),.7:<>Unw*<>@ABDFHKLOQSVWX[s !:T]`cf،ADGJMPSVY\_behknqtwz}–ŖȖ˖ΖіԖזږݖ "%(+.147:=@CFILORUX[^adgjmpsvy|ėǗʗ͗Зӗ֗ٗܗߗ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~™ęƙșʙ̙ΙЙҙԙؙ֙ڙܙޙ  )*,569BQVxorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013455514757411105024335 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI\ijtuyoV   %&+01 6:;AR[\rswx{~,78MUVW]lmuvw} !"(78@ABHWX`abhwx !")*+-.6>?BJKTdelm}~ /089HIQRbcjk|}   % & - . > ? F G V W _ ` p q x y         ! " & ' , - 2 3 8 J S T ^ _ ` e u v } ~          " # ( ) . /     ) * + / : ; @ B E F G H I H [ e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+17ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*eB'&E)1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "i'D*7(JB'*P^submenuAction:$%*g*7(JB'*1&')#   #!(f*.5J5 &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5g-HD X112XY287j*A6JD'*...Q,22  2kkm2!<<;"e./E'*stu*>=?e./E'*1x)__NSServicesMenu22  22CBo*(/JD ED! 'D4'4)Qa22  2UNSTag2G*Fi%.A'! X11Qh22GIl%.A'! 'D#.1I22!Kj%8G'1 'DCD22  22ONi%FG'! X11Qq\_NSAppleMenu-!SSR"i'D*7(JB'*TU*g*7(JB'*1؀VW)S  S!Xh*.5J5...-![[Z"e*-1J1\]*e*-1J11^)[`_cF3.Qc  -!ccb"eF'A0)*edxeF'A0)1 !"filnoruv) ()chge%:D'BQw 12ckje*5:J1Qm ;c!mk*C(J1/*5:J1 c   KLcqpo*/HJ1 9(1 'DFH'A0Q` RUVctso9C3 'D*/HJ1 9(1 'DFH'A0Q~ c   hc!wo%-6'1 'DCD %DI 'D#E'E^_NSWindowsMenuqqs-!{{z"fE3'9/)xy|}*fE3'9/)1}~~)q{!jE3'9/) X11[_NSMainMenuTmenu V^apps_separator Ȁ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ǀR #@À#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@e'D'3EklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0AYText Cellklnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghg'D#H'E1VM0.3333329856]^_`aȀJKLMNOPQUVW #@M#@$]^_`abcdghlEA*'- '.*5'1  [headerColorVB1C1 1]^_`a_NSDrawsBackground klnrs#@("$_controlBackgroundColor'(VL0.602715373N0.6666666667 1-/ĀYgridColor23VM0.4246723652E0.5 1+,78[NSTableView79/YNSControlZapps_table>? ʀԀBFHIKLFVNSCellˀ ̀̀ TVWb MU_{{17, 245}, {402, 18}}]]^_`aa_b^cdefgjk>mVopq_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH(Q !πʀ΀o'DFB1 .D'D 'DFH'A0 :J1 'DF47)tuv[NSImageNameЀXNSSwitch+,yz_NSButtonImageSourcey/+,|}\NSButtonCell|/+,XNSButton9/]click_through ^ր^copy_menu_item ؀BHǀـ ڀۀ V M_{{253, 235}, {128, 26}}c^]]a_`d^bVoe _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀klnrs WNSStateހۀ!*mEF 4'4) 'D916__popUpItemAction:ZOtherViews1ր݀)ހ!ibef DHFK'ހ!d"D'Aހ!fED'JJF+,_NSPopUpButtonCell|/^NSMenuItemCell+,]NSPopUpButton9/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator B HI$% + /V114 LM??A_{{18, 243}, {402, 18}}9:B;< HBDE KL_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth  BC #@w]]^_`aa_b^cdefgjkRVopq!πoE5'/B) 'D'*5'D'*[enable_authZ[ BHIefǀـ _{{11, 182}, {409, 23}}]]^_`aa_b^cdefgjkZrVopq!πnH69 ED! 'D4'4)_enable_fullscreenz{ BHIǀـ  _{{-8, 116}, {409, 23}}]]^_`aa_b^cdefgjkzVopq!ρo1'D3E'- ('DH5HD %DI 41J7 'DBH'&E AJ H69 ED! 'D4'4)_enable_fullscreen_menu 9:B;<HB ـ  #@v`_{{22, 79}, {362, 31}}Z{250, 750}]^_`af   @oU3J5(- 41J7 'DBH'&E E1&J'K 9F/ H69 E$41 'DE'H3 AJ 'D,2! 'D9DHJ EF 4'4) 'D916 'D#3'3J).klnors $\controlColor+,[NSTextField9/_enable_fullscreen_menu_text BHIǀ  V M_{{18, 130}, {402, 18}}]]^_`aa_b^cdefgjkVopq!ρo*ECJF EC'A&'* 'DEA'*J- AJ X11_enable_keyequivsL B HI   _{{18, 166}, {402, 18}}9:B;< HB K  EG F]]^_`aa_b^cdefgjkLVopq!ρo!'D3E'- ('D'*5'D'* EF 9ED'! 'D4(C)Zenable_tcp%&  $BHI01ǀ !" _{{18, 243}, {402, 18}}]]^_`aa_b^cdefgjk%=Vopq!ρ #oE6'G') E'H3 +D'+J 'D#21'1\fake_buttonsEF &*BFHIPQFǀˀ '( _{{17, 184}, {402, 18}}]]^_`aa_b^cdefgjkE]Vopq!ρ&)o'D*1CJ2 *(9K' DEH69 E$41 'DE'H3_focus_follows_mouseef ,0BFHIpqFǀˀ -. _{{17, 140}, {402, 18}}]]^_`aa_b^cdefgjke}Vopq!ρ,/o'D*1CJ2 9DI 'DFH'A0 'D,/J/)_focus_on_new_window 26BHIǀ 34 _{{18, 69}, {402, 18}}]]^_`aa_b^cdefgjkVopq!ρ25o)EA'*J- 'D'.*J'1 *BHE (%13'D Alt_L H Alt_R_option_sends_alt 8V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_{{266, 364}, {484, 342}}k*A6JD'* X11WNSPanelZ{320, 240}V؀M >11?) _NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsPO N== @ 1 )1L+F)_{{17, 195}, {385, 42}}]^_`af+  DoJ$/J (/! *4:JD X11 %DI %F4'! EA'*J- *-CE AJ H5HD Xauthority. AJ -'D) *:JJ1 9FH'F IP DDF8'E *5(- G0G 'DEA'*J- :J1 5'D-) EE' B/ J$/J %DI 'D-JDHD) /HF (/! *4:JD *7(JB'* X11._{{17, 118}, {385, 42}}9:B;< HB 1  IJ #@y?]^_`af  HoAJ -'D) 'D*ECJF J,( #J6K' *ECJF E5'/B) 'D'*5'D'* DD*#C/ EF *#EJF 'DF8'E. HAJ -'D) 'D*97JD D' J*E 'D3E'- ('D'*5'D'* EF *7(JB'* (9J/)._{{17, 17}, {404, 14}}]^_`af'F  Ko7J*E *FAJ0 G0G 'D.J'1'* AJ 'DE1) 'D*'DJ) D(/! *4:JD X11._{{10, 33}, {438, 280}}+,,/_{{13, 10}, {458, 326}}1/1234PSd)789 ;1VNSViewYNSTabViewRQ? f'D#E'F+,@A]NSTabViewItem@/78C9FG1I\NSIdentifier Rˁc?TQ21L>NEPeRʁV&Z,^)9:B;<FHB]^FK ˀ WX _{{19, 208}, {385, 31}}]^_`afNjV  Yoi9F/ *ECJFG 3J$/J 'DFB1 9DI F'A0) :J1 F47) %DI E1H1 FB1) 'DE'H3 G0G 9(1 G0G 'DF'A0) ('D%6'A) %DI *F4J7G'.9:B;<FHBvwFK ˀ [\ _{{19, 161}, {385, 17}}]^_`afPZ  ]o<J*(9 *1CJ2 F'A0) X11 EH69 'DE$41 HDG0' (96 'D"+'1 'D3D(J).9:B;<FHBFK ˀ _` _{{19, 106}, {385, 28}}]^_`afR^  ao~9F/ *ECJFG 3J$/J %F4'! F'A0) X11 ,/J/) %DI 'F*B'D *7(JB X11.app %DI 'DEB/E) ((/D'K EF Finder.app #H Terminal.app HE' %DI 0DC)_{{10, 33}, {438, 279}}g'DFH'A078C91I Re?TV Mf1gkosw{)BHIǀe hi e_{{11, 255}, {409, 23}}]]^_`aa_b^cdefgjkVopq!ρgjn*ECJF 'DE2'EF)9:B;<HBK e lm e_{{17, 221}, {385, 28}}]^_`afk  nopJBHE (*ECJF 9F51 'DB'&E) "F3." HJ3E- ('DE2'EF) (JF DH-) 'DD5B AJ OSX H-'A8) X11 H0'C1'* 'D*.2JF 'DE$B* 'D#3'3J).BHIǀe pq e_{{-5, 129}, {409, 23}}]]^_`aa_b^cdefgjkVopq!ρoro.*-/J+ 'D-'A8) 9F/ %,1'! *:JJ1'* 9DI DH-) 'DD5BBHIǀe tu e_{{-5, 104}, {409, 23}}]]^_`aa_b^cdefgjkVopq!ρsvoJ*-/J+ 'D0'C1) 'D#3'3J) (FB1 ('D21 'D#H37) 9F/ %,1'! *:JJ1'* 9DI DH-) 'DD5BBHI()ǀe xy e_{{-5, 79}, {409, 23}}]]^_`aa_b^cdefgjk5Vopq!ρwzo,*-/J+ DH-) 'DD5B 9DI 'DAH1 9F/ *-/J/ F5 ,/J/BHIABǀe |} e_{{-5, 192}, {409, 23}}]]^_`aa_b^cdefgjkNVopq!ρ{~o.*-/J+ DH-) 'DD5B 9F/ %,1'! *:JJ1'* 9DI 'D-'A8)9:B;<HB[\K e  e_{{2, 158}, {385, 28}}]^_`afh  odBE (*97JD G0' 'D.J'1 %0' CF* *1:( AJ '3*./'E xclipboard #Hklipper #H #J) #/') #.1I D%/'1) -'A8) X11.9:B;<HBtu{ e  e#@v_{{17, 47}, {370, 28}}]^_`af  oTF81K' DDBJH/ 'DEH,H/) AJ (1H*HCHD X11 B/ D' J9ED G0' 'D.J'1 /HEK' AJ (96 'D*7(JB'*._{{10, 33}, {438, 279}}jDH-) 'DD5B78C91I Rف?T1Zz؁)9:B;<HB ـ  #@I_{{383, 238}, {55, 20}}]^_`af @h'D#DH'F:9:B;<HBÁ ـ  #@x@_{{10, 216}, {392, 14}}]^_`af  o5J*E *FAJ0 G0' 'D.J'1 AJ 'DE1) 'D*'DJ) D(/! *4:JD X11.9:B;<HBK ـ  _{{17, 145}, {385, 31}}]^_`af  oX*ECJF F'A0) X11 root. '3*./E 6:7 EA'*J- 'D#H'E1-'D'.*J'1-A D/.HD HE:'/1) H69 ED! 'D4'4)._{{10, 33}, {438, 279}}g'D%.1',78C91 R?Q11% 2)9:B;<HB  K   _{{17, 93}, {385, 31}}]^_`af   ocAJ -'D) 'D*ECJF B/ **/'.D EC'A&'* EA'*J- 41J7 'DB'&E) E9 *7(JB'* X11 'D*J *3*./E EA*'- *9/JD Meta.9:B;<HB  K   _{{17, 195}, {385, 42}}]^_`af +  oe'6:7 E9 'D'3*E1'1 9DI EA*'- 'D'.*J'1 #H EA*'- 'D#H'E1 #+F'! 'DFB1 D*F4J7 21 'DE'H3 'D#H37 #H 'D#JEF. 9:B;<HB 7 8K   _{{17, 159}, {385, 14}}]^_`af D  oB'D3E'- D*:JJ1'* B'&E) 'D%/.'D ('DC*'() AHB E.77 EA'*J- X11 'D-'DJ.BHI O Pǀ  _{{18, 179}, {402, 18}}]]^_`aa_b^cdefgjk \Vopq!ρo'*('9 *5EJE DH-) EA'*J- 'DF8'E9:B;<HB i jK   _{{17, 32}, {385, 31}}]^_`af v  o_9F/ *ECJFG' *BHE EA'*J- 'D'.*J'1 (%13'D 9D'E'* 'DEA*'- Alt_L H Alt_R X11 (/DK' EF Mode_switch.BHI  ǀ  _{{2, 8}, {418, 18}}]]^_`aa_b^cdefgjk Vopq!ρo#'D*E1J1 /'&EK' AJ '*,'G -1C) 'D%5(9_{{10, 33}, {438, 280}}g'D%/.'D+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel _scroll_in_device_direction {€_sync_clipboard_to_pasteboard Ā[sync_keymap gƀ_sync_pasteboard oȀ_sync_pasteboard_to_clipboard sʀ_sync_pasteboard_to_primary ẁ_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D AҀ_toggle_fullscreen_item? 4Ԁ^x11_about_item" v ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F E߁Uhide:J  MZterminate:G  H_hideOtherApplications:H  J_unhideAllApplications: $ ^Ucopy: * f ]close_window: 0 l \zoom_window: 4 6  B 9 :-HI  B C-<_NSHuggingPriority    V N RM 6K_{{14, 191}, {100, 32}}]]^_`a_b^cdef U X 4 Z [po@ !Ҁe*C1'1_apps_table_duplicate: a c  B 9 :-HI  m n-<   _{{14, 159}, {100, 32}}]]^_`a_b^cdef U X a z [po!Ҁe%2'D)_apps_table_delete: W _apps_table_show:  B 9 :-HI   -<   _{{14, 223}, {100, 32}}]]^_`a_b^cde U X [po!Ҁj%6'A) 9F51_apps_table_new:%  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ^prefs_changed:L   ^prefs_changed: ؀  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:Z _enable_fullscreen_changed:D A _toggle_fullscreen:> ʀ ^prefs_changed:E & ^prefs_changed:e , ^prefs_changed:  g  ^prefs_changed:  o "^prefs_changed:  s $^prefs_changed:  { &^prefs_changed:  w (^prefs_changed:z  *^prefs_changed: & 2 ,^prefs_changed: ,  .^prefs_changed:1 0 ɯ 1'2?@ABkCDEFGHIJ()*  !"+q~1 %L+E1F>LN^EQPweqR2)B\u3Zfz4%1   8 P j - 4 C a nESFG+5 0-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 8=?PCGFJSˀʀ́VX&(Z\,.^`degikmoqsuwy{}ـ؀ۀހ݀  "242>B#&'I& (1]NSApplication -    ߁34MN L5;! _{{302, 440}, {454, 271}}oB'&E) *7(JB'* X11Z{320, 240}1 4 a 􀍁)1 +5>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " H    _NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 9/  H  "  A C@@_{{302, 29}, {15, 186}}_{{116, 20}, {318, 231}}1 , ɡ -FI 0 1 2 3 4 5 6   9_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, < =_NSPanGestureRecognizer > ?/_NSPanGestureRecognizer_NSGestureRecognizer+, A/+, C D\NSScrollView C/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 J ɯ'2222B22222222()*        +q1  L +  11F>FNFEFPFeFR1213Zz14% - 4- a-EFG- -02222:22222222-QSS-Y[-acccccccc-y{8=?PF?SˀʀˁVˁ&ˁZˁ,ˁ^?degekeoesewe{ee?ـ؀ۀހހހހففـففف? 22##I1 ɯ 1'2?@ABkCDEFGHIJ()*  !"+q~1 %L+E1F>LN^EQPweqR2)B\u3Zfz4%1   8 P j - 4 C a nESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 8=?PCGFJSˀʀ́VX&(Z\,.^`degikmoqsuwy{}ـ؀ۀހ݀  "242>B#&' ,ɀՀ׀%+17ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ɯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ɠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   * 2 Z \ ^ ` b d m o q        ! # L Z a u  ) 7 9 ; = ? A C K ] j u   + 0 ] f p y { }   <>@BDFHU^mt|/13579;=?AEVXZ\^g?ACDFHIKMz|~   138:<>@Beg 2WY[]_acx+-/13579;=P]_acr{(*,.02468:ERTVXcloqs   13579;=?ACdfhjlnp{}$&()+-.02SUWY[]_ "CEGIKMO|(*,.024IUZoqsuwyFS\u5AZ{<Plv-G[~!*8BJTz   STVX[^`bdehjlvZht}        $ % ( + . 0 2 5 H Q S V m v ! !!$!/!0!2!4!=!?!A!B!K!T!V!w!!!!!!!!!!!!!!!!" """"!"#"%":"C"`"b"d"q"y""""""""""""## ###%#8#=#P#Y#`#e#r#z################$$$)$>$A$E$G$I$Z$_$e$m$o$q$s$u666+606=6F6Z6e6w6666666666666666667 777&7(7*7,7.7A7J7S7\7j7o777777777777777778 8 80828486888:8<8e8f8h8j8l8m8v888888888888888999 9 9979K9M9O9Q9R9T9V9X9i9r9u9w9y999999999999999:: : :.:4:6:8:A:M:X:b:m::::::::::::::::::;;;;;;/;1;4;5;8;;;=;?;A;Z;;;;;;< <<*<,<1<6<8<:>>>> >>>>>.>>>>>>>>>>?????? ? ? ???"?%?'?)?Z?b?d?f?h?j?l?n?p?r??????????????@@ @ @@@@@@@@-@Z@\@^@`@b@d@f@h@j@l@u@@@@@@@@@@@@@@@AAAA$A9A;A=A?AAACARAgAiAkAmAoAqA{AAAAAAAAAAAAAB0B2B3B4B6B8B:B;B=B?BABBBDBEBFBHByBzB|BBBBBBBBBCC1CYCuCxCzC{C|C~CCCCCCCCCCCCCCCCCCCCD DD.D0D2D4D6D8DDDDDDDDDDDDDDDDEEEEE E E EE,E@EUEWEYE\E_EaEEEEEEEEEEEEEEEEF,F.F0F2F5F8F:FUAUDUFVVW%W(W*W+W,W.W0W3W4W7W:W[A[D[F\\\\\\\\\\\\\\\\\\\\\\\\\]g]]]]]]]]]]]]]]]]^^(^+^-^0^3^6^8_7_P___x_{_~________________________`T`V`W`X`[`]`_```c`f`h`i`l`m`n``````````aZa]a_a`aaadafaiajamaparasavawaxaaaaaaaabccccc c cccccccccc7cvcxczc|cccccd@dBdCdDdGdIdKdLdOdRdTdUdXdYdZdsddddddddeYeeeeeeeeeeeeeeeef%f'f)f+f.f1f3f5ffffffffffffgggggg]g_gagcgfgigkgmgh3h6h8h9h:h=h?hBhChFhIhKhLhOhPhQhihhhhhhhiiiiiiiiiiiiiiiiiiijj4j7j9jkAkDkGkPk_kakdkgkiklkokrktkkkkkkkkkkkkkkkklll>lAlClElHlKlMlRlclllllllllllllllllmm-m0m2m5m8m;m=mnnnnnnnnn n#n&n(n)n+n,n-nFnknnnpnsnvnyn{o.oGoVooorouoxo{o~oooooooooooooop#p&p(p)p*p-p/p2p3p6p9p;p{@{O{`{b{d{g{j{|{{{{{{{{{{{{{{{||-|/|1|4|7|C|T|V|X|[|^|d|u|w|y|||||||||||||||||}}}} }} }"}%}(}6}G}I}K}N}Q}^}o}r}t}w}z}}}}}}}}}}}~~~~~ ~ ~ ~6~8~;~<~?~A~C~E~H~a~~~~~~~~~~~~~~~~~VXYZ]_abehjknops !257:=ҁ  "7IZ]_betʁہ݁߁ 0247:IZ\^adnĂՂׂق܂߂ *;=?BEZkmoruÃŃȃ˃ڃ!0ADFIL[loqtw„ńDŽʄ̈́܄ #2;nqsuwy{}ĆdžɆˆ͆ІӆՆ؆ۆކ  #&),/258;>ADFHJLNPRTWZ]`bdgjmpsvy|ćƇȇʇ̇·Ї҇ԇևه܇އ^acfilorsvy|ˈֈ߈  #%'>W`kt}%')*+-/1458:@BEGJLNPSUXZ]`cfilorux{~ÏƏɏˏ͏ϏяӏՏ؏ᑤÑőǑɑˑ͑ϑёӑՑבّۑݑߑ !#%(+.147:=@CFILORUX[^adgjmpsvy|~Òƒɒ̒ϒҒՒؒےޒ  "$&(*,.02468:<>@BEHKNQTWZ]`cfilorux{~ÓƓɓ̓ϓғՓؓۓޓ•ŕǕʕ͕Еӕٕ֕ܕߕ !$'*-0369ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^acegikmoqsuwy{}ØŘǘɘ˘͘ϘјӘ՘ט٘ۘݘߘ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÙřǙə˙͙ϙљәՙיٙۙݙߙ "+:?xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/Localizable.strings0000644000175000017500000001013614757411105022576 /* Dialog title when quitting */ "Do you really want to quit X11?" = "GD *1:( -BK' AJ %FG'! X11"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "3J*E %JB'A #J) *7(JB'* X11 EA*H-) 9DI 'DAH1 H3J*E AB/ #J) *:JJ1'* DE J*E -A8G'."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "'D/.HD %DI H69 RandR"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "J7D( *7(JB EF X11 *:JJ1 /B) 4'4) 'D916. 3JBHE X11 ('3*9'/) -'D) 4'4) 'D916 'D3'(B) 9F/ 7D( 'D*7(JB 'DE7'D( 'D9H/) %DI 'D-'D) 'D3'(B). HC(/JD D0DC JECFC '3*./'E *3D3D 'DEA'*J- #%#A DA16 '3*9'/) X11 'D-'D) 'D3'(B)."; /* No comment provided by engineer. */ "Allow" = "'D3E'-"; /* No comment provided by engineer. */ "Always Allow" = "'D3E'- /HEK'"; /* No comment provided by engineer. */ "Cancel" = "%D:'!"; /* No comment provided by engineer. */ "Mac Help" = "E3'9/) Mac"; /* No comment provided by engineer. */ "Quit" = "%FG'!"; /* No */ "No" = "D'"; /* Yes */ "Yes" = "F9E"; /* Terminal */ "Terminal" = "'DH-/) 'D71AJ)"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "JH,/ D/JC EDA ~/.xinitrc.\n\n1(E' D' *-*HJ 'DFH'A0 'D*J *916G' *7(JB'* X11 9DI #417) 9F'HJF, #H B/ *(/H E.*DA) 9F 'DFH'A0 'D*J *916G' 'D*7(JB'* 'D#5DJ).\n\nGD *1:( AJ '3*(9'/ 'DEDA 'DEH,H/ H'3*./'E (J&) X11 'DBJ'3J) 9F/ (/! *4:JD X11 AJ 'DE1) 'D*'DJ)"; /* window item modifiers */ "window item modifiers" = "'D#H'E1"; /* Updates menu title & */ "Check for X11 Updates..." = "'D*-BB EF H,H/ *-/J+'* X11..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist0000644000175000017500000000061014757411105022176 LprojCompatibleVersion 106.3 LprojLocale ar LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/0000755000175000017500000000000014757411135017005 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/main.nib/0000755000175000017500000000000014757411135020500 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/main.nib/designable.nib0000644000175000017500000020654414757411105023217 Quan aquesta opció està activada, els equivalents de teclat de la barra de menús poden interferir amb les aplicacions d’X11 que fan servir el modificador Meta. Manteniu premudes les tecles Opció o Ordre al fer clic per activar el botó central o dret del ratolí. Activa la finestra arrel d’X11. Feu servir la combinació de tecles Ordre + Opció + A per entrar o sortir del mode de pantalla completa. Activa l’ítem de menú “copiar” i permet sincronitzar el porta-retalls d’OSX amb les memòries intermèdies CLIPBOARD i PRIMARY d’X11. Quan aquesta opció està activada, un clic del ratolí en una finestra inactiva fa que el clic passi a aquesta finestra, a més d’activar-la. Quan aquesta opció està activada, la creació d’una nova finestra d’X11 farà que X11.app es traslladi a primer pla (per damunt de Finder.app, Terminal.app, etc.) A l’iniciar X11 es crearan claus de control d’accés Xauthority. Si l’adreça IP del sistema canvia, aquestes claus deixaran de ser vàlides i això pot impedir que s’executin aplicacions d’X11. Si aquesta opció està activada, també ho ha d’estar l’opció “Autenticar les connexions” per garantir la seguretat del sistema. Si està desactivada, les connexions d’aplicacions remotes no estaran permeses. xorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/main.nib/keyedobjects.nib0000644000175000017500000013646614757411105023602 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}>?BH[histxnU  $%*/0 59:@PYZoptux{~  (12:;<BQRZ[\bqrz{|   #$6>?@FUV^_`fuv~,34FGNOPXYZjqrs{|} #$,-=>EFUV^_nowx     " # 3 4 ; < = > D L \ ] d e u v } ~         ! " ' ( , - 2 3 8 9 > P Y Z d e f k { |         " # ( ) . / 4 5        / 0 1 5 @ A F H K L M N O  a c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[AplicacionsP^submenuAction:$%*[Aplicacions1&')#   #!(nPersonalitzar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5YSobre X112XY287mPreferncies &Q,22  2kkm2!<<;"WServeissmu*=;>1w)__NSServicesMenu22  22BA_)Activar o desactivar la pantalla completaQa22  2UNSTag2F*E[Ocultar X11Qh22FH_Ocultar la resta22!J^Mostrar-ho tot22  22NMlSortir d X11Qq\_NSAppleMenu-!RRQ"[AplicacionsST*[Aplicacions1׀UV)R  R!WnPersonalitzar &-!ZZY"VEditarY[*1\)Z^]VCopiarQc   -!aa`"VWindow*cbvXFinestra1 dgjlmpst) &'afeVTancarQw /0aihZMinimitzarQm 9a!kTZoom a   IJaonoRecrrer les finestresQ` PSTarqoRecrrer les finestres al revsQ~ a   fa!u_Portar-ho tot a primer pla^_NSWindowsMenuooq-!yyx"UAjudaqwxz*1z{{)oy!|YAjuda X11[_NSMainMenuTmenu U^apps_separator ŀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ĀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@RH#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@SNomjklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView0AYText Celljkmqr#@*UB1_controlTextColor+,ؤ/+,]NSTableColumn/IJKLMNOPTUV #@\m#@D\]^_`abcfgUOrdreUM0.3333329856\]^_`ǀIJKLMNOPTUV #@Y}#@$\]^_`abcfg_Drecera de teclat [headerColor UB1C1 1\]^_`_NSDrawsBackground jkmqr#@(!#_controlBackgroundColor&'UL0.602715373N0.6666666667 1,.YgridColor12UM0.4246723652E0.5 1+,67[NSTableView68/YNSControlZapps_table=> ǀрAEGIJEVNSCellȀ ɀʀ RTU V_{{15, 245}, {402, 18}}[\\]^`_^`]abcdeh=jUlmn_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀo-Fer clic per recrrer les finestres inactivesqrs[NSImageNamèXNSSwitch+,vw_NSButtonImageSourcev/+,yz\NSButtonCelly/+,|}XNSButton|8/]click_through \Ӏ^copy_menu_item ՀAŀր ׀؀ Tl V__{{67, 235}, {128, 26}}a\\[`]^b]`Ulc _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـjkmqr WNSState݀ۀ؀!ހ߀*^De la pantalla__popUpItemAction:ZOtherViews1Ӏڀ)ۀ!݀Z256 colorsۀ!݀VMilersۀ!݀WMilions+,_NSPopUpButtonCelly/^NSMenuItemCell+,]NSPopUpButton|8/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator AG!"ŀ *T- V_{{18, 243}, {402, 18}}[\\]^`_^`]abcdeh7Ulmn!̀􀪀_Autenticar les connexions[enable_auth?@ AGJKŀր _{{17, 182}, {409, 23}}[\\]^`_^`]abcdeh?WUlmn!̀_Mode de pantalla completa_enable_fullscreen_` AGjkŀր _{{36, 121}, {465, 18}}[\\]^`_^`]abcdeh_wUlmn!̀oDPermetre l accs a la barra de mens en el mode de pantalla completa_enable_fullscreen_menu  A_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@v`_{{53, 84}, {362, 31}}Z{250, 750}\]^_`d @ooLa barra de mens ser visible quan el cursor del ratol se situ en la part superior de la pantalla principal.jkmnqr # \controlColor+,[NSTextField8/_enable_fullscreen_menu_text AGĀ  T UV==?_{{18, 134}, {402, 18}}A @A #@}/[\\]^`_^`]abcdehUlmn!́_(Activar els equivalents de teclat en X11_enable_keyequivs AGŀ  _{{18, 166}, {402, 18}}[\\]^`_^`]abcdehUlmn!́_*Permetre connexions de clients de la xarxaZenable_tcp !AG"  _{{18, 243}, {402, 18}}A-.45 CE #@}`D[\\]^`_^`]abcdeh;Ulmn!́ o Simular un ratol de tres botons\fake_buttonsCD #'AEGNOEŀȀ $% _{{15, 184}, {402, 18}}[\\]^`_^`]abcdehC[Ulmn!́#&oEnfocar la posici del ratol_focus_follows_mousecd )-AEGnoEŀȀ *+ _{{15, 140}, {402, 18}}[\\]^`_^`]abcdehc{Ulmn!́),_Enfocar les finestres noves_focus_on_new_window /4AG 02 1_{{18, 75}, {402, 18}}A NP #@{0OYO[\\]^`_^`]abcdehUlmn!́/3o%Les tecles Opci envien Alt_L i Alt_R_option_sends_alt 6U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_'{{266, 364.03906000000001}, {575, 341}}oPreferncies d X11WNSPanelZ{320, 240}TV <1ʁ=)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1)1" 5GD1/O)_{{36, 103}, {478.5, 28}}\]^_`d BoQuan aquesta opci est activada, els equivalents de teclat de la barra de mens poden interferir amb les aplicacions d X11 que fan servir el modificador Meta._{{36, 210}, {474, 30}}AG$%  KL G\]^_`d"1 FofManteniu premudes les tecles Opci o Ordre al fer clic per activar el bot central o dret del ratol. A=>D HI #@}_{{36, 162}, {479, 17}}\]^_`d LG JoZPermet que els canvis al men de teclat substitueixin l assignaci de tecles actual d X11._{{18, 182}, {402, 18}}[\\]^`_^`]abcdeh5UUlmn!́DMo*Seguir la disposici de teclat del sistema_${{36, 41}, {436.94922000000003, 31}}AGbcʀ RS =\]^_`do1 QoxSi aquesta opci est activada, les tecles Opci envien els smbols de tecla d X11 Alt_L i Alt_R en lloc de Mode_switch._{{18, 13}, {418, 18}}[\\]^`_^`]abcdehxUlmn!́OTo2Desplaar sempre en el sentit del moviment del dit_{{10, 33}, {529, 279}}+,~/_{{13, 10}, {549, 325}}1Y]n)VNSViewYNSTabView\NSIdentifier \[=ZQ1WEntrada+,]NSTabViewItem/ \ցm=^Q21?_Ձ`dh)Aր ab #@F_{{16, 241}, {49, 17}}\]^_`d` cWColors:AӁր ef #@x@_{{35, 216}, {392, 14}}\]^_`dd go?Aquesta opci ser efectiva la propera vegada que s inici X11.Aր ij #@w_{{35, 145}, {385, 31}}\]^_`dh koActiva la finestra arrel d X11. Feu servir la combinaci de tecles Ordre + Opci + A per entrar o sortir del mode de pantalla completa._{{10, 33}, {529, 279}}WSortida \o=^T Vp1    quy})AGŀo rs o_{{18, 245}, {402, 18}}[\\]^`_^`]abcdeh )Ulmn!́qtoActivar la sincronitzaciA67o vw o_{{36, 211}, {385, 28}}\]^_`d Cu xoActiva l tem de men copiar  i permet sincronitzar el porta-retalls d OSX amb les memries intermdies CLIPBOARD i PRIMARY d X11.AGNOŀo z{ o_{{34, 119}, {409, 23}}[\\]^`_^`]abcdeh [Ulmn!́y|o2Actualitzar CLIPBOARD quan el porta-retalls canviAGghŀo ~ o_{{34, 99}, {486, 18}}[\\]^`_^`]abcdehtUlmn!́}oKActualitzar PRIMARY (clic amb el bot central) quan el porta-retalls canviAGŀo  o_{{34, 74}, {469, 18}}[\\]^`_^`]abcdehUlmn!́_FActualitzar el porta-retalls immediatament quan se seleccioni text nouAGŀo  o_{{34, 182}, {409, 23}}[\\]^`_^`]abcdehUlmn!́o2Actualitzar el porta-retalls quan CLIPBOARD canviAo  o_{{48, 148}, {385, 28}}\]^_`d opDesactiveu aquesta opci si voleu utilitzar xclipboard, klipper o qualsevol altre gestor de porta-retalls d X11.AӁo  o#@v_{{48, 42}, {370, 28}}\]^_`d osA causa de les limitacions del protocol d X11, pot ser que aquesta opci no funcioni sempre en algunes aplicacions._{{10, 33}, {529, 279}}]Porta-retallsE \ȁ=^1=Ccǁ#))AEEȀ  #@}_{{33, 208}, {482, 31}}\]^_`d  oQuan aquesta opci est activada, un clic del ratol en una finestra inactiva fa que el clic passi a aquesta finestra, a ms d activar-la.AE  E Ȁ  #@~ _{{33, 161}, {486, 17}}\]^_`d  oZEl punt d enfocament de la finestra d X11 segueix el cursor. Aix t alguns inconvenients.AE , -EȀ  _{{33, 92}, {482, 42}}\]^_`d 9 oQuan aquesta opci est activada, la creaci d una nova finestra d X11 far que X11.app es traslladi a primer pla (per damunt de Finder.app, Terminal.app, etc.)_{{10, 33}, {529, 279}}WWindows A\= 1 E H I J)A U VD  _{{36, 195}, {479, 42}}\]^_`d H b oA l iniciar X11 es crearan claus de control d accs Xauthority. Si l adrea IP del sistema canvia, aquestes claus deixaran de ser vlides i aix pot impedir que s executin aplicacions d X11.A n oD  _{{36, 104}, {479, 56}}\]^_`d I { oSi aquesta opci est activada, tamb ho ha d estar l opci Autenticar les connexions  per garantir la seguretat del sistema. Si est desactivada, les connexions d aplicacions remotes no estaran permeses.A     #@y_{{17, 17}, {404, 14}}\]^_`d J  oDAquestes opcions seran efectives la propera vegada que s inici X11._{{10, 33}, {529, 279}}YSeguretat+, YNSTabView /Z{575, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard5 D[sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2D @π_toggle_fullscreen_item? 4р^x11_about_item t Ӂ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  g ց_minimize_window:?  4؁_orderFrontStandardAboutPanel:@ 6 ځ[prefs_show:F  D܁Uhide:J  LށZterminate:G  G_hideOtherApplications:H % I_unhideAllApplications: * \Ucopy: 0 d ]close_window: 6 j \zoom_window: : <  A ? @,G  H I,_NSHuggingPriority   T T XV 3H_{{340, 191}, {111, 32}}[\\]^`^`]abcd [ ^ : ` aml@ !πXDuplicar_apps_table_duplicate: g i  A ? @,G  s t,  _{{340, 159}, {111, 32}}[\\]^`^`]abcd [ ^ g aml!πXEliminar_apps_table_delete: V _apps_table_show:  A ? @,G   ,  _{{340, 223}, {111, 32}}[\\]^`^`]abc [ ^ aml!πkAfegir tem_apps_table_new:  ^prefs_changed:  ^prefs_changed:5 D ^prefs_changed: ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:{ {  Yx11_help: '  _apps_table_show: m \next_window: p _previous_window:? _enable_fullscreen_changed:D @ _toggle_fullscreen:= ǀ ^prefs_changed:C # ^prefs_changed:c  ) ^prefs_changed:  q ^prefs_changed:  y ^prefs_changed:  } !^prefs_changed:   #^prefs_changed:  %^prefs_changed:_ & '^prefs_changed: , / )^prefs_changed: 2 O +^prefs_changed:1 6 ϯ 7'2?@ABkCDEFGHIJ()*  +o{". >5%c?K_k  7 OhE=JCO co -" H V I o J , : I g tDREF*4 --02469: <==_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 8/    (  > @==_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 2 ϡ 3CF 6 7 8 9 : ; <   ?_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, B C_NSPanGestureRecognizer D E/_NSPanGestureRecognizer_NSGestureRecognizer+, G/+, I J\NSScrollView I/Z{464, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 P ϯ'2222B22222222()*        +o" 5?_   E=EECEEcE H I J , :, g,DEF, -02222:22222222-PRR-XZ-_aaaaaaaa-wy6;=YGD1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀊##F1 ϯ 7'2?@ABkCDEFGHIJ()*  +o{". >5%c?K_k  7 OhE=JCO co -" H V I o J , : I g tDREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~--02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ϠF+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x       C Q X l z  . 0 2 4 6 8 : B T a l w y { }      " ' T ] g p r t v x z | ~ )+-/135R[jqy,.02468:<>BSUWY[d}=?ABDFGIKxz|~!#(*,.02^`  CEGIKMO^!#%')5BDFHT]bdfh "$&(/<>@BKNPRsuwy{}  =?ACEGIPRsuwy{} "QStv{} "$&(*,IX!#%'6KMOQSU'5Dmz -O]o{(Ba{  CEHJLNOQRTU^`bcegijkmrt} ALNQRTVY[^`ceghkmoz"%')+,/13=FZcw~!/;DYl     4 = K T ] d f h j l !!!! !!!!>!J!T!_!k!x!}!!!!!!!!!!!!!!!!!!""" """/"7">"@"B"D"K"M"O"Q"S"i"""""""""######0#8#E#S#U#^#f#k###############$$$$$$#$+$-$/$1$355555666#656B6I6n6|666666666666666666666667777&7+7T7U7W7Y7[7\7e7n7p77777777777777777888888 8)82848U8W8Y8[8]8_8s8888888888888888999999 9#9%9'9<9>9@9B9D9]9r99999999999999999::::0:2:4:6:8:::::::::::::::::::::::::::;;E;Z;h;~;;;;;;;;;;;;;;;;;G>Y>g>|>>>>>>>>>>>>>>>>>>>>? ?(?*?,?.?0?2?4?6?8?E?G?I?K?Z?n?y??????????????????@ @@@@@@@@@@%@R@T@V@X@Z@\@^@`@b@d@l@u@@@@@@@@@@@@@@AAAAAAA&A;A=A?AAACAEA]ArAtAvAxAzA|AAAAAAAAAAAAAAABBBBBB"B$B&B(BABBBBBBBBBBBBBBBBC0C2C3C4C6C8C:C;C=C?CACBCDCECFC_CCCCCCCCCCCCCCCCDWDYDZD[D]D_DaDbDdDfDhDiDkDlDmDDDDDDDDDE_ExEEEEEEFFFDF`FcFeFfFgFiFkFnFoFrFuFwFxFzF{F|FFFFFFFFFFFGGGGGGGGGGHHHH&HDHYH[H]H`HcHeHHHHHHHHHHHHHHHHIIIIIII"I$I'I)I+IDIIIIIIIIIIIIIIIIIIJJJJJ!J$J&J(JSJfJ{J}JJJJJJJJJJJJJJJJJJJKKRKTKVKXK[K^K`KbKKKKKKKKLLLLL!L#L%L&L)L,L.L/L2L3L4L7LPLLLLLLLLLLLLLLLLLLM$M&M(M*M-M0M2M4MwMMMMMMMNNNNNNN N NNNNNNNN1NpNrNtNvNyN|N~NNNNNNNNNOOOQOROSOUOWOYOZO]O`ObOcOeOfOgOOOOOOOOOOPPPPPP"P$PPPPPPPPPPPPPPPPPQ#Q&Q(Q)Q*Q-Q/Q2Q3Q6Q9Q;QU?UBUDUFUGUPUSUVUXUaUtUwUzU}UUUUUUUUUUUUUUUW"W;WWWWWWWWWWWWWWWWWWWWWWWXY&Y)Y+Y,Y-Y0Y2Y5Y6Y9YY?YBYCYDYMYPYiYYYYYYYZUZnZZZZZZZZ[[;[[[[[[[[[[[[[[[[[[[[[[[\\]6]8]:]<]?]B]D]F]]]]]]^^^ ^ ^^^^-^4^>^K^N^Q^T^W^Z^]^_^g^p^~^^^^^^^^^^^^^^^^^^^_B_E_G_H_I_K_M_P_Q_T_W_Y_Z_\_]_^_g_________`"`%`'`(`)`+`-`0`1`4`7`9`:`<`=`>`G`````````aa}aaaaaaaaaaaaaaaaaaaaaaaaccc"c;c>cAcDcGcJcMcvcxc{c|ccccccccccccccccdddddd d"d#d&d)d+d,d/d0d1dJddddddddde5e8e:e;ep?pApBpCpLpepppppppqrrrrrr!r#r&r'r*r-r/r0r2r3r4r=rVr{r~rrrrrsBssssssssssssssssstttt t ttuUunuvuuuuuuuuuuuuuuv$v'v)v*v+v-v/v2v3v6v9v;vv?v@vYv~vvvvvvx xtxwxyxzx{x}xxxxxxxxxxxxxxxxxxz{zzzzzzzzzzzzzzzz{{{D{G{I{L{O{R{T{{|| |||)|B|M|p|z||||||||||||}}}}} } },}A}C}E}H}K}M}Y}n}p}r}u}x}z}}}}}}}}}}}}}}~ ~~!~#~&~)~+~F~[~]~_~b~e~g~r~~~~~~~~~~~~~~~~~~~~!3<T[j{} ,.036ARTVY\uĀՀ׀ـ܀߀&)+.1āR[]_dgjlnpy  !$%&)C|~ÃփQSTUXZ\]`cefijknʄ̄΄фԄք؄,=@BEHWhkmps…Ņȅׅ&79;>ATegilo|†ņ#%'*-ORTWZiz|~ψ҈Ԉ׈ڈ%(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprux{~ŠĊƊȊʊ͊Њӊ֊؊ڊ܊ފ  #%'),/258;>ADGJLNPSVY\_behknqtwz|~Ō"%(),/258;=?A\Ɍˌ͌ЌҌՌ׌ +4=@BDZӍ)2=HŽŎƎǎʎ +\ŏ (1JQjѐܐ!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmorux{~ÒŒǒʒ̒ϒђӒՒגْܒޒ !#&(+-0257:=@BDFIKNPSUXZ]`cfilnprtvxz|~cehjlnprtvxz|~ĕǕʕ͕Еӕٕ֕ܕߕ !$'*-0369ADGJMPSVY\_behknqtwz}|Ùƙə̙ϙҙՙؙۙޙ  #&),/258;>ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|ěǛʛ͛Лӛ֛ٛܛߛ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~œĜƜȜʜ̜ΜМҜԜ֜؜ڜܜޜ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ĝƝϝНҝ۝ܝߝxorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013643514757411105024315 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}  <=@FYfgqrvlS  "#(-. 378>OXYnostwz}~  '019:;APQYZ[apqyz{   "#5=>?ETU]^_etu}~+23EFMNOWXYipqrz{|~"#+,<=DETU]^mnvw     ! " 2 3 : ; < = C K [ \ c d t u | }          ! & ' + , 1 2 7 8 = O X Y c d e j z {         ! " ' ( - . 3 4       . / 0 4 ? @ E G J K L M N E ` b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[AplicacionsP^submenuAction:$%*[Aplicacions1&')#   #!(nPersonalitzar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5YSobre X112XY287mPreferncies &Q,22  2kkm2!<<;"WServeissmu*=;>1w)__NSServicesMenu22  22BA_)Activar o desactivar la pantalla completaQa22  2UNSTag2F*E[Ocultar X11Qh22FH_Ocultar la resta22!J^Mostrar-ho tot22  22NMlSortir d X11Qq\_NSAppleMenu-!RRQ"[AplicacionsST*[Aplicacions1׀UV)R  R!WnPersonalitzar &-!ZZY"VEditarY[*1\)Z^]VCopiarQc   -!aa`"VWindow*cbvXFinestra1 dgjlmpst) &'afeVTancarQw /0aihZMinimitzarQm 9a!kTZoom a   IJaonoRecrrer les finestresQ` PSTarqoRecrrer les finestres al revsQ~ a   fa!u_Portar-ho tot a primer pla^_NSWindowsMenuooq-!yyx"UAjudaqwxz*1z{{)oy!|YAjuda X11[_NSMainMenuTmenu U^apps_separator ŀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ĀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@O#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@SNomhijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView0AYText Cellhikop#@*SB1_controlTextColor+,֤/+,]NSTableColumn/GHIJKLMNRST #@YM#@DZ[\]^_`adeUOrdreSM0.3333329856Z[\]^ŀGHIJKLMNRST #@V]#@$Z[\]^_`ade_Drecera de teclat[headerColor  SB1C1 1Z[\]^_NSDrawsBackground hikop#@(!_controlBackgroundColor$%SL0.602715373N0.6666666667 1*,YgridColor/0SM0.4246723652E0.5 1+,45[NSTableView46/YNSControlZapps_table;< ǀр?CEFHICVNSCellȀ ɀʀ QST V_{{15, 245}, {402, 18}}ZZ[\]^^\_[`abcdg;iSklm_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀo-Fer clic per recrrer les finestres inactivespqr[NSImageNamèXNSSwitch+,uv_NSButtonImageSourceu/+,xy\NSButtonCellx/+,{|XNSButton{6/]click_through \Ӏ^copy_menu_item Հ?EĀր ׀؀ Sl V__{{67, 235}, {128, 26}}`[ZZ^\]a[_Skb _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـhikop WNSState݀ۀ؀!ހ߀*^De la pantalla__popUpItemAction:ZOtherViews1Ҁڀ)ۀ!݀Z256 colorsۀ!݀VMilersۀ!݀WMilions+,_NSPopUpButtonCellx/^NSMenuItemCell+,]NSPopUpButton{6/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator ?EF !Ā )S, V_{{18, 243}, {402, 18}}ZZ[\]^^\_[`abcdg6Sklm!̀􀪀_Autenticar les connexions[enable_auth>? ?EFIJĀր _{{17, 182}, {409, 23}}ZZ[\]^^\_[`abcdg>VSklm!̀_Mode de pantalla completa_enable_fullscreen^_ ?EFijĀր _{{36, 121}, {465, 18}}ZZ[\]^^\_[`abcdg^vSklm!̀oDPermetre l accs a la barra de mens en el mode de pantalla completa_enable_fullscreen_menu~  ?E_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@v`_{{53, 84}, {362, 31}}Z{250, 750}Z[\]^c~ @ooLa barra de mens ser visible quan el cursor del ratol se situ en la part superior de la pantalla principal.hiklop ! \controlColor+,[NSTextField6/_enable_fullscreen_menu_text ?EFÀ  S UV==?_{{18, 134}, {402, 18}}?E @A #@}/ZZ[\]^^\_[`abcdgSklm!́_(Activar els equivalents de teclat en X11_enable_keyequivs ?EFĀ  _{{18, 166}, {402, 18}}ZZ[\]^^\_[`abcdgSklm!́_*Permetre connexions de clients de la xarxaZenable_tcp !?EF!  _{{18, 243}, {402, 18}}?E,-34 CE #@}`DZZ[\]^^\_[`abcdg:Sklm!́ o Simular un ratol de tres botons\fake_buttonsBC #'?CEFMNCĀȀ $% _{{15, 184}, {402, 18}}ZZ[\]^^\_[`abcdgBZSklm!́#&oEnfocar la posici del ratol_focus_follows_mousebc )-?CEFmnCĀȀ *+ _{{15, 140}, {402, 18}}ZZ[\]^^\_[`abcdgbzSklm!́),_Enfocar les finestres noves_focus_on_new_window /4?EF 02 1_{{18, 75}, {402, 18}}?E NP #@{0OYOZZ[\]^^\_[`abcdgSklm!́/3o%Les tecles Opci envien Alt_L i Alt_R_option_sends_alt 6S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_'{{266, 364.03906000000001}, {575, 341}}oPreferncies d X11WNSPanelZ{320, 240}SV <1Ɂ=)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1)1! 4GD1/O)_{{36, 103}, {478.5, 28}}Z[\]^c BoQuan aquesta opci est activada, els equivalents de teclat de la barra de mens poden interferir amb les aplicacions d X11 que fan servir el modificador Meta._{{36, 210}, {474, 30}}?EF#$  KL GZ[\]^c!0 FofManteniu premudes les tecles Opci o Ordre al fer clic per activar el bot central o dret del ratol. ?E<=C HI #@}_{{36, 162}, {479, 17}}Z[\]^c KG JoZPermet que els canvis al men de teclat substitueixin l assignaci de tecles actual d X11._{{18, 182}, {402, 18}}ZZ[\]^^\_[`abcdg4TSklm!́DMo*Seguir la disposici de teclat del sistema_${{36, 41}, {436.94922000000003, 31}}?EFabɀ RS =Z[\]^cn1 QoxSi aquesta opci est activada, les tecles Opci envien els smbols de tecla d X11 Alt_L i Alt_R en lloc de Mode_switch._{{18, 13}, {418, 18}}ZZ[\]^^\_[`abcdgwSklm!́OTo2Desplaar sempre en el sentit del moviment del dit_{{10, 33}, {529, 279}}+,}/_{{13, 10}, {549, 325}}1Y]n)VNSViewYNSTabView\NSIdentifier \[=ZQ1WEntrada+,]NSTabViewItem/ \ցm=^Q21>^~Ձ`dh)?Eր ab #@F_{{16, 241}, {49, 17}}Z[\]^c` cWColors:?Eҁր ef #@x@_{{35, 216}, {392, 14}}Z[\]^cd go?Aquesta opci ser efectiva la propera vegada que s inici X11.?Eր ij #@w_{{35, 145}, {385, 31}}Z[\]^ch koActiva la finestra arrel d X11. Feu servir la combinaci de tecles Ordre + Opci + A per entrar o sortir del mode de pantalla completa._{{10, 33}, {529, 279}}WSortida \o=^S Vp1     quy})?EFĀo rs o_{{18, 245}, {402, 18}}ZZ[\]^^\_[`abcdg (Sklm!́qtoActivar la sincronitzaci?E56o vw o_{{36, 211}, {385, 28}}Z[\]^c Bu xoActiva l tem de men copiar  i permet sincronitzar el porta-retalls d OSX amb les memries intermdies CLIPBOARD i PRIMARY d X11.?EFMNĀo z{ o_{{34, 119}, {409, 23}}ZZ[\]^^\_[`abcdg ZSklm!́y|o2Actualitzar CLIPBOARD quan el porta-retalls canvi?EFfgĀo ~ o_{{34, 99}, {486, 18}}ZZ[\]^^\_[`abcdg sSklm!́}oKActualitzar PRIMARY (clic amb el bot central) quan el porta-retalls canvi?EFĀo  o_{{34, 74}, {469, 18}}ZZ[\]^^\_[`abcdgSklm!́_FActualitzar el porta-retalls immediatament quan se seleccioni text nou?EFĀo  o_{{34, 182}, {409, 23}}ZZ[\]^^\_[`abcdgSklm!́o2Actualitzar el porta-retalls quan CLIPBOARD canvi?Eo  o_{{48, 148}, {385, 28}}Z[\]^c opDesactiveu aquesta opci si voleu utilitzar xclipboard, klipper o qualsevol altre gestor de porta-retalls d X11.?Eҁo  o#@v_{{48, 42}, {370, 28}}Z[\]^c osA causa de les limitacions del protocol d X11, pot ser que aquesta opci no funcioni sempre en algunes aplicacions._{{10, 33}, {529, 279}}]Porta-retallsC \ȁ=^1;Bbǁ#))?CECȀ  #@}_{{33, 208}, {482, 31}}Z[\]^c  oQuan aquesta opci est activada, un clic del ratol en una finestra inactiva fa que el clic passi a aquesta finestra, a ms d activar-la.?CE  C Ȁ  #@~ _{{33, 161}, {486, 17}}Z[\]^c  oZEl punt d enfocament de la finestra d X11 segueix el cursor. Aix t alguns inconvenients.?CE + ,CȀ  _{{33, 92}, {482, 42}}Z[\]^c 8 oQuan aquesta opci est activada, la creaci d una nova finestra d X11 far que X11.app es traslladi a primer pla (per damunt de Finder.app, Terminal.app, etc.)_{{10, 33}, {529, 279}}WWindows @\= 1 D G H I)?E T UC  _{{36, 195}, {479, 42}}Z[\]^c G a oA l iniciar X11 es crearan claus de control d accs Xauthority. Si l adrea IP del sistema canvia, aquestes claus deixaran de ser vlides i aix pot impedir que s executin aplicacions d X11.?E m nC  _{{36, 104}, {479, 56}}Z[\]^c H z oSi aquesta opci est activada, tamb ho ha d estar l opci Autenticar les connexions  per garantir la seguretat del sistema. Si est desactivada, les connexions d aplicacions remotes no estaran permeses.?E     #@y_{{17, 17}, {404, 14}}Z[\]^c I  oDAquestes opcions seran efectives la propera vegada que s inici X11._{{10, 33}, {529, 279}}YSeguretat+, YNSTabView /Z{575, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard4 D[sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2D @π_toggle_fullscreen_item? 4р^x11_about_item t Ӂ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector g ց_minimize_window:?  4؁_orderFrontStandardAboutPanel:@ 6 ځ[prefs_show:F  D܁Uhide:J  LށZterminate:G  G_hideOtherApplications:H $ I_unhideAllApplications: ) \Ucopy: / d ]close_window: 5 j \zoom_window: 9 ;  ? > ?*EF  G H*_NSHuggingPriority   S S WV 3H_{{340, 191}, {111, 32}}ZZ[\]^\_[`abc Z ] 9 _ `lk@ !πXDuplicar_apps_table_duplicate: f h  ? > ?*EF  r s*  _{{340, 159}, {111, 32}}ZZ[\]^\_[`abc Z ] f  `lk!πXEliminar_apps_table_delete: V _apps_table_show:  ? > ?*EF   *  _{{340, 223}, {111, 32}}ZZ[\]^\_[`ab Z ] `lk!πkAfegir tem_apps_table_new:  ^prefs_changed:  ^prefs_changed:4 D ^prefs_changed: ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:{ {  Yx11_help: '  _apps_table_show: m \next_window: p _previous_window:> _enable_fullscreen_changed:D @ _toggle_fullscreen:; ǀ ^prefs_changed:B # ^prefs_changed:b  ) ^prefs_changed:  q ^prefs_changed: y ^prefs_changed:  } !^prefs_changed:   #^prefs_changed:   %^prefs_changed:^ % '^prefs_changed: + / )^prefs_changed: 1 O +^prefs_changed:1 5 ί 6'2?@ABkCDEFGHIJ()*  +o{!- =4$b>J^j~  6 N gC;IBN bn ,! G U H n I * 9 H f sBPCD(2 --02469: <==_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 6/  E  '  > @==_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 1 Ρ 2CF 5 6 7 8 9 : ;   >_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, A B_NSPanGestureRecognizer C D/_NSPanGestureRecognizer_NSGestureRecognizer+, F/+, H I\NSScrollView H/Z{464, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 O ί'2222B22222222()*        +o! 4>^~    C;CCBCCbC G H I * 9* f*BCD* -02222:22222222-PRR-XZ-_aaaaaaaa-wy6;=YGD1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀊##F1 ί 6'2?@ABkCDEFGHIJ()*  +o{!- =4$b>J^j~  6 N gC;IBN bn ,! G U H n I * 9 H f sBPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~--02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ΠF+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x       C Q X l z  . 0 2 4 6 8 : B T a l w y { }      " ' T ] g p r t v x z | ~ )+-/135R[jqy,.02468:<>BSUWY[d}=?ABDFGIKxz|~!#(*,.02^`  CEGIKMO^!#%')5BDFHT]bdfh "$&(/<>@BKNPRsuwy{}  =?ACEGIPRsuwy{} "QStv{} "$&(*,IX!#%'6KMOQSU #1@iv)KYkw$>]w ,.13578:;=>GIKLNPRSTV[]foqs|}~(3589;=@BEGJLNORTVa  $-AJ^eq"+@Sht    $ 2 ; D K M O Q S | !!!%!1!;!F!R!_!d!f!h!j!l!n!q!u!!!!!!!!!!!!""" """%"'")"+"2"4"6"8":"P"k""""""""""## ###,#:#<#E#M#R#g#s#################$$ $$$$$55555556 66)606U6c6h6j6l6n6p6r6t6w6666666666666666667 77;7<7>7@7B7C7L7U7W7x7z7|7~77777777777777888888888<8>8@8B8D8F8Z8o8q8s8u8w888888888888888899 9 99#9%9'9)9+9D9Y9f9u9w9y999999999999999:::::::!:|::::::::::::::::::::::::::;.;C;Q;g;y;;;;;;;;;;;;;;;;<;0>B>P>e>>>>>>>>>>>>>>>>>>>>? ?????????!?.?0?2?4?C?W?b?k?t?v?x?z?|?~?????????????????@@@@@@;@=@?@A@C@E@G@I@K@M@U@^@r@@@@@@@@@@@@@@@@AAAAA$A&A(A*A,A.AFA[A]A_AaAcAeAAAAAAAAAAAAAAAABBBBB B BBB*BiBkBmBoBqBsBuBwBBBBBBBBCCCCCC!C#C$C&C(C*C+C-C.C/CHCCCCCCCCCCCCCCCCD@DBDCDDDFDHDJDKDMDODQDRDTDUDVDoDDDDDDDDEHEaEvExEzE}EEEFF-FIFLFNFOFPFRFTFWFXF[F^F`FaFcFdFeFnFFFFFFFFFFGGGGGGGGGGGGHHH-HBHDHFHIHLHNHHHHHHHHHHHHHHHHHHHIIII I IIII-IIIIIIIIIIIIIIIIIIJJJJJ J JJJO@OBOCOFOIOKOLONOOOPOiOOOOOOOOOOPPPPP P PlPnPoPpPsPuPwPxP{P~PPPPPPPQ QQQQQQQQQQ"Q$Q%Q(Q)Q*Q3Q6QuQwQyQ{Q~QQQQQQQQRRRRURbRRRRRRRRSS%S>SPSZShStSSSSSSSSSSSSSSSSSSSSTT$T/TXTZT]T^TaTcTeTgTjTsTvTyT{TTTTU UUUUUUUU"U%U'U(U+U-U/U0U9UZWZZZZZZZZZ[$[[[[[[[[[[[[[[[[[[[[[[[\\]]!]#]%](]+]-]/]]]]]]]]]]]]]^^^'^4^7^:^=^@^C^F^H^P^Y^g^l^^^^^^^^^^^^^^^^^^_+_._0_1_2_4_6_9_:_=_@_B_C_E_F_G_P_h________` `````````` `"`#`%`&`'`0`I`n`q`s`v`y`|`~`afaiakalamaoaqatauaxa{a}a~aaaaaaaaaaaabcc c$c'c*c-c0c3c6c_cacdcechckcmcocqczccccccccccdddddd d d dddddddd3drdtdvdxd{d~dddee!e#e$e%e(e*e-e.e1e4e6e7e:e;ehAhDhFhGhJhKhLhdhhhhhhhhiLiiiiiiiiiiiiiiiijjjjj!j$j&j(jqjjjjjjjjjjjjjjjjk>k@kBkDkGkJkLkNklll!l"l#l&l(l+l,l/l2l4l5l8l9l:lSlxl{l}llllmkmmmmmmmmmmmmmmmmmnn6n9n;n>nAnDnFo/oHoVooorouowozo}oooooooooopppppppppp"p%p'p(p*p+p,p5pNpspvpxp{p~ppqrrrrrr r rrrrrrrrrr&r?rdrgrirlrorrrts+ssssssssssssssssssssssssu>uWu_utuwuyu|uuuuuuuuuuv vvvvvvvvvv"v$v%v'v(v)vBvgvjvlvovrvuvwwx]x`xbxcxdxfxhxkxlxoxrxtxuxwxxxyxxxxxxxxzdzzzzzzzzzzzzzzzzz{{-{0{2{5{8{;{={{{{{|||+|6|Y|c|j|s||||||||||||||||}}*},}.}1}4}6}B}W}Y}[}^}a}c}u}}}}}}}}}}}}}}~~ ~ ~~~~/~D~F~H~K~N~P~[~p~r~t~w~z~|~~~~~~~~~~~~~~~ %=DSdfhkn*;=?BE^oqsvy€ŀȀրyց؁ہ܁߁;DFHMPSUWYbz ,egiloqs|ЃӃՃ؃ۄ:<=>ACEFILNORSTWq؄&)+.1@QTVY\k|~хӅՅ؅ۅ "$'*=NPRUXevxz}ˆ܆ކ %69;>APadfil{‡ч '8;=@CRcegjm|È҈ۊ!#%')+-/13579;=?ACEGIKMOQSUWY[^adgjmpsvy|ÊŊNJʊ͊Њӊ֊ي܊ߊ !$'*-03579@BDFHJLNPRTVX[^adgjmpsvy|’Œǒʒ͒ВӒْ֒ܒߒ  #&)+-/2479<>ACFILORUWY[]_acegiknqsuwy{}LNQSUWY[]_acegikmoqsuwy{}•ŕȕ˕Εѕԕוڕݕ "%(+.147:=@CFILNPRUX[^adgjmpsuwy|ÖŖǖɖ˖͖ϖіӖՖזٖۖݖߖ !$'*-0369ADGJMPSVY\_behknqtwz}›śț˛Λћԛכڛݛ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ĝŝȝѝxorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/Localizable.strings0000644000175000017500000001063214757411105022560 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Confirmeu que voleu sortir d X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Les aplicacions X11 obertes es tancaran immediatament i perdreu tots els canvis no desats."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Voleu activar el mode RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Una aplicaci ha sollicitat a X11 que canvi la resoluci de la vostra pantalla. X11 restaurar aquesta pantalla al seu estat anterior quan l aplicaci esmentada solliciti tornar a aquest estat. Tamb podeu utilitzar la seqncia de tecles #%#A per forar X11 a tornar a l estat anterior."; /* No comment provided by engineer. */ "Allow" = "Permetre"; /* No comment provided by engineer. */ "Always Allow" = "Permetre-ho sempre"; /* No comment provided by engineer. */ "Cancel" = "Cancellar"; /* No comment provided by engineer. */ "Mac Help" = "Ajuda Mac"; /* No comment provided by engineer. */ "Quit" = "Sortir"; /* No */ "No" = "No"; /* Yes */ "Yes" = "S"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Ja hi ha un arxiu ~/.xinitrc.\n\nLes finestres mostrades per les aplicacions d X11 pot ser que no tinguin barra de ttol o que presentin un aspecte diferent al de les finestres de les aplicacions natives.\n\nVoleu ometre l arxiu existent i utilitzar l entorn X11 estndard la propera vegada que obriu X11?"; /* window item modifiers */ "window item modifiers" = "ordre"; /* Updates menu title & */ "Check for X11 Updates..." = "Buscar actualitzacions d X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/ca.lproj/locversion.plist0000644000175000017500000000061014757411105022157 LprojCompatibleVersion 106.5 LprojLocale ca LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/0000755000175000017500000000000014757411135017027 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/main.nib/0000755000175000017500000000000014757411135020522 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/main.nib/designable.nib0000644000175000017500000020573014757411105023235 Je-li tato volba povolena, mohou vznikat konflikty mezi klávesovými ekvivalenty řádku nabídek a aplikacemi X11, které používají modifikátor Meta. Prostřední a pravé tlačítko myši aktivujete přidržením klávesy Alt nebo Cmd při kliknutí. Povoluje položku nabídky „Kopírovat“ a umožňuje synchronizaci mezi schránkou systému OS X a buffery CLIPBOARD a PRIMARY prostředí X11. Je-li tato volba povolena, při kliknutí na neaktivní okno nebude toto okno pouze aktivováno, ale kliknutí mu navíc bude předáno. Je-li tato volba povolena, při vytvoření nového okna prostředí X11 se do popředí dostane proces X11.app (nikoli Finder.app, Terminal.app apod.). Spuštěním prostředí X11 vytvoříte klíče řízení přístupu Xauthority. Změní-li se IP adresa systému, tyto klíče přestanou platit, což může zabránit spuštění aplikací prostředí X11. Je-li tato volba povolena, je třeba v zájmu bezpečnosti systému povolit také ověřování připojení. Je-li zakázána, není vzdáleným aplikacím umožněno připojit se. xorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/main.nib/keyedobjects.nib0000644000175000017500000013606014757411105023612 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048#$,67<KRSZ[\eopuvyz '()0129:CJKLTUV_fghrswx| =>AGZghrswmT  #$)./ 489?OXYnostwz}~  '019:;APQYZ[apqyz{   "#3;<=CRS[\]crs{|}();BCDKLMUVWgnopxyz|} ()9:ABQRZ[jkst       / 0 7 8 9 : @ H X Y ` a q r y z         # $ ( ) . / 4 5 : L U V ` a b g w x           $ % * + 0 1       + , - 1 < = B D G H I J K  ] b      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +~ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)gNabdka1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XAplikaceP^submenuAction: $)1%&(#   #!'hVlastn &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,} !"VNSName).-|XMainMenu1%&'()*/PV^u(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4oO prostYed X111WX176jPYedvolby &Q,11  1jjl1!;;:"fSlu~byrst)=<>fSlu~by1w(__NSServicesMenu11  11BAnCel obrazovkaQa11  1UNSTag1F*EoSkrt prostYed X11Qh11FHmSkrt ostatn11!JlZobrazit vae11  11NMoUkon it prostYed X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UhVlastn &,!XXW"WUpravitYZ)fpravy1[(X]\iKoprovatQc   ,!``_"TOkno )a_t1behjknqr( $%`dcfZavYtQw -.`gf]MinimalizovatQm 7`!ioPYepnout velikost `   GH`mlnProchzet oknyQ` NQR`pooProchzet okny v opa nm poYadQ~ `   d`!soPYevst vae do popYed^_NSWindowsMenummo,!wwv"hNpovdatuxy)hNpovda1yzz(mw!{oNpovda pro X11[_NSMainMenuTmenu S^apps_separator Ā(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ÀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  97 8Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE(HIJKLMNOQRSTUWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@eNzevijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_]NSControlView0AYText Cellijlpq#@*TB1_controlTextColor+,פ/+,]NSTableColumn/HIJKLMNOSTU #@X#@D[\]^_`abeffPYkazTM0.3333329856[\]^_ƀHIJKLMNOSTU #@Q#@$[\]^_`abefWZkratka [headerColor  TB1C1 1[\]^__NSDrawsBackground ijlpq#@( "_controlBackgroundColor%&TL0.602715373N0.6666666667 1+-YgridColor01TM0.4246723652E0.5 1+,56[NSTableView57/YNSControlZapps_table<= ƀЀ@DFHIDVNSCellǀ Ȁɀ QST U_{{15, 245}, {402, 18}}Z[[\]_^]_\`abcdg<iTklm_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀoProklikvac neaktivn oknapqr[NSImageNamèXNSSwitch+,uv_NSButtonImageSourceu/+,xy\NSButtonCellx/+,{|XNSButton{7/]click_through [Ҁ^copy_menu_item Ԁ@ĀՀ ր׀ Sk U^_{{64, 235}, {128, 26}}`[[Z_\]a\_Tkb _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀ijlpq WNSState܀ڀ׀!݀ހ)ZZ monitoru__popUpItemAction:ZOtherViews1Ҁـ߀(ڀ!܀Y256 barevڀ!܀fTisceڀ!܀gMiliny+,_NSPopUpButtonCellx/^NSMenuItemCell+,]NSPopUpButton{7/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator @F !Ā )S, U_{{18, 243}, {402, 18}}Z[[\]_^]_\`abcdg6Tklm!ˀ󀩀oOvYit pYipojen[enable_auth>? @FIJĀՀ _{{18, 182}, {409, 23}}Z[[\]_^]_\`abcdg>VTklm!ˀoRe~im cel obrazovky_enable_fullscreen^_ @FijĀՀ _{{37, 116}, {409, 23}}Z[[\]_^]_\`abcdg^vTklm!ˀo7Povolit pYstup k Ydku nabdek v re~imu cel obrazovky_enable_fullscreen_menu~  @_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}[\]^_c~@oXXdek nabdek se objev pYi pYesunut ukazatele myai na horn okraj primrnho monitoru.ijlmpq " \controlColor+,[NSTextField7/_enable_fullscreen_menu_text  @FÀ  S TU<<>_{{18, 141}, {402, 18}}@ ?@ #@w.Z[[\]_^]_\`abcdgTklm!ˁ o-Povolit v prostYed X11 klvesov ekvivalenty_enable_keyequivs @FĀ  _{{18, 166}, {402, 18}}Z[[\]_^]_\`abcdgTklm!ˁo"Povolit pYipojen seovch klientoZenable_tcp  @F!  _{{18, 263}, {402, 18}}@F+,2 JK BZ[[\]_^]_\`abcdg8Tklm!ˁoEmulovat tYtla tkovou mya\fake_buttons@A "&@DFKLDĀǀ #$ _{{15, 184}, {402, 18}}Z[[\]_^]_\`abcdg@XTklm!ˁ"%oZamYen sleduje mya_focus_follows_mouse`a (,@DFklDĀǀ )* _{{15, 126}, {402, 18}}Z[[\]_^]_\`abcdg`xTklm!ˁ(+oZamYovat na nov okna_focus_on_new_window .3@F /1 0_{{18, 70}, {402, 18}}@ MO NZ[[\]_^]_\`abcdgTklm!ˁ.2o+Klvesy Alt odeslaj signly Alt_L a Alt_R_option_sends_alt 5T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_{{266, 364}, {484, 356}}oPYedvolby prostYed X11WNSPanelZ{320, 240}SU ;1Ɂ<(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1(12!B D0.N(_{{36, 93}, {385, 42}}[\]^_cAoJe-li tato volba povolena, mohou vznikat konflikty mezi klvesovmi ekvivalenty Ydku nabdek a aplikacemi X11, kter pou~vaj modifiktor Meta.@ ! CE D_{{36, 215}, {385, 42}}@239 GH #@v [\]^_c2@BFoZProstYedn a prav tla tko myai aktivujete pYidr~enm klvesy Alt nebo Cmd pYi kliknut. _{{36, 165}, {371, 28}}[\]^_cIDIoOUmo~Huje mnit vstupn nabdku a pYepisovat aktuln mapu klves prostYed X11._{{18, 199}, {402, 18}}Z[[\]_^]_\`abcdg!RTklm!ˁLo*Xdit se systmovm uspoYdnm klvesnice_{{36, 33}, {385, 31}}@F_`ɀ QR <[\]^_cl0PowJe-li tato volba povolena, klvesy Alt odeslaj symboly klves prostYed X11 Alt_L a Alt_R, nikoli signl Mode_switch._{{18, 9}, {418, 18}}Z[[\]_^]_\`abcdguTklm!ˁNSo#V~dy posouvat ve smru pohybu prstu_{{10, 33}, {438, 294}}+,{/_{{13, 10}, {458, 340}}1~X\m(VNSViewYNSTabView\NSIdentifier[Z<YQ1UVstup+,]NSTabViewItem/[Ձl<]Q21>^~ԁ_cg(@Հ `a #@I_{{17, 238}, {55, 20}}[\]^_c_bVBarvy:@ЁՀ de #@x@_{{36, 216}, {392, 14}}[\]^_ccfo8Tato volba se uplatn pYi dalam spuatn prostYed X11.@Հ hi _{{36, 145}, {385, 31}}[\]^_cgjokPovoluje koYenov okno prostYed X11. Do re~imu cel obrazovky a zpt mo~ete pYechzet kombinac Cmd-Alt-A._{{10, 33}, {438, 294}}fVstup[n<]S Uo1     ptx|(@FĀn qr n_{{18, 255}, {409, 23}}Z[[\]_^]_\`abcdg%Tklm!ˁps_Povolit synchronizaci@23Ёn uv n_{{36, 207}, {392, 42}}[\]^_c?twoPovoluje polo~ku nabdky Koprovat  a umo~Huje synchronizaci mezi schrnkou systmu OS X a buffery CLIPBOARD a PRIMARY prostYed X11.@FJKĀn yz n_{{34, 114}, {409, 23}}Z[[\]_^]_\`abcdg WTklm!ˁx{o0PYi zmn schrnky aktualizovat buffer CLIPBOARD@FcdĀn }~ n_%{{34, 78.308593999999999}, {364, 34}}Z[[\]_^]_\`abcdg pTklm!ˁ|oPPYi zmn schrnky aktualizovat buffer PRIMARY (kliknut prostYednm tla tkem)@F|}Ān  n_{{34, 49}, {409, 23}}Z[[\]_^]_\`abcdg Tklm!ˁo8Aktualizovat schrnku ihned, jakmile je vybrn nov text@FĀn  n_{{34, 177}, {409, 23}}Z[[\]_^]_\`abcdg Tklm!ˁo1PYi zmn bufferu CLIPBOARD aktualizovat schrnku@n  n_{{48, 143}, {385, 28}}[\]^_c otTuto volbu zaka~te, pokud chcete pou~vat xclipboard, klipper nebo jakhokoli jinho sprvce schrnky prostYed X11.@ρn  n#@v_{{48, 17}, {370, 28}}[\]^_coYVzhledem k omezenm protokolu X11 nemus bt tato volba v~dy funk n ve vaech aplikacch._{{10, 33}, {438, 294}}hSchrnkaD[ǁ<]1<@`Ɓ"((@DDǀ  _{{23, 208}, {385, 31}}[\]^_c oJe-li tato volba povolena, pYi kliknut na neaktivn okno nebude toto okno pouze aktivovno, ale kliknut mu navc bude pYedno.@D  D ǀ  #@v_{{23, 150}, {369, 28}}[\]^_c o]ZamYen oken v prostYed X11 sleduje ukazatel. Toto nastaven m nkter ne~douc dosledky.@D ' (D .ǀ  #@w@_{{23, 78}, {376, 42}}[\]^_c 5oJe-li tato volba povolena, pYi vytvoYen novho okna prostYed X11 se do popYed dostane proces X11.app (nikoli Finder.app, Terminal.app apod.)._{{10, 33}, {438, 294}}WWindows =[<1 A D E F(@ Q R  _{{36, 195}, {385, 42}}[\]^_c D ^oSpuatnm prostYed X11 vytvoYte kl e Yzen pYstupu Xauthority. Zmn-li se IP adresa systmu, tyto kl e pYestanou platit, co~ mo~e zabrnit spuatn aplikac prostYed X11.@ j k  _{{36, 118}, {385, 42}}[\]^_c E woJe-li tato volba povolena, je tYeba v zjmu bezpe nosti systmu povolit tak ovYovn pYipojen. Je-li zakzna, nen vzdlenm aplikacm umo~nno pYipojit se.@     #@y_{{17, 17}, {404, 14}}[\]^_c F o9Tyto volby se uplatn pYi pYatm spuatn prostYed X11._{{10, 33}, {438, 294}}kZabezpe en+, YNSTabView /Z{484, 356}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel N_scroll_in_device_direction _sync_clipboard_to_pasteboard! [sync_keymap p€_sync_pasteboard xĀ_sync_pasteboard_to_clipboard |ƀ_sync_pasteboard_to_primary Ȁ_sync_primary_immediately ʀZsync_text1 ̀Zsync_text2C @΀_toggle_fullscreen_item> 3Ѐ^x11_about_item r ҁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector e Ձ_minimize_window:>  3ׁ_orderFrontStandardAboutPanel:? 5 ف[prefs_show:E  DہUhide:I  L݁Zterminate:F  G߁_hideOtherApplications:G ! I_unhideAllApplications: & [Ucopy: , b ]close_window: 2 h \zoom_window: 6 8  @ ; <+F  D E+_NSHuggingPriority   S P TU 2G_{{340, 191}, {132, 32}}Z[[\]_]_\`abc W Z 6 \ ]lk@ !΀ZDuplikovat_apps_table_duplicate: c e  @ ; <+F  o p+  _{{340, 159}, {132, 32}}Z[[\]_]_\`abc W Z c | ]lk!΀YOdstranit_apps_table_delete: T _apps_table_show:  @ ; <+F   +  _{{340, 223}, {132, 32}}Z[[\]_]_\`ab W Z ]lk!΀nPYidat polo~ku_apps_table_new:  ^prefs_changed:  ^prefs_changed:!  ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:z z  Yx11_help: &  _apps_table_show: k \next_window: n _previous_window:> _enable_fullscreen_changed:C @ _toggle_fullscreen:< ƀ ^prefs_changed:@ " ^prefs_changed:` ( ^prefs_changed:  p ^prefs_changed: x ^prefs_changed:  |  ^prefs_changed:   "^prefs_changed:   $^prefs_changed:^ " &^prefs_changed: ( . (^prefs_changed: . N *^prefs_changed:1 2 ˯ 3&1>?@AjBCDEFGHI'() *mz2!3!,`>J^j~3 K d }  D<I@L `l (! D R E k F + 6 E c pCQDE)3 ,,/13589;?@CDGIKLPQSTVX[^`behjknqruwz 5:<X@BE DHK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀉀:>#%&E& (-]NSApplication +    /0IJ H18! _{{302, 440}, {484, 271}}oNabdka aplikace X11Z{320, 240}1 6 c (1 )3:>(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Ԁ(_{{1, 1}, {301, 28}}       _NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 7/    $  = ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 . ˡ /BE 2 3 4 5 6 7 8   ;_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, > ?_NSPanGestureRecognizer @ A/_NSPanGestureRecognizer_NSGestureRecognizer+, C/+, E F\NSScrollView E/Z{484, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 L ˯&1111A11111111'()        *m2!>^~     D<DD@DD`D D E F + 6+ c+CDE+ ,/1111911111111,PQQ,VX,^````````,uw5:<XB D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀉ##E1 ˯ 3&1>?@AjBCDEFGHI'() *mz2!3!,`>J^j~3 K d }  D<I@L `l (! D R E k F + 6 E c pCQDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,,/13589;?@CDGIKLPQSTVX[^`behjknqruwz 5:<X@BE DHK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀉀:>#%& +~ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1 ˯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ˠE+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v       G U \ p ~  $ 2 4 6 8 : < > F X e p { }      & + X a k t v x z | ~  "$&(*;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ 79;<>@ACErtvxz|~  -/468:<>[]!#%@egikmoq*WY[]_acegivxz|2468:<>@BDLY[]_luxz|$579;=?ACEGhjlnprt;=?@BDEGIjlnprtv 3578:<=?Abdfhjln    ),.0QSUWY[]#?Up|>Yw)3Yh gqz4@XY[]_`bdfhj<>@ACEGIK  - : L N Q S V X ] ` i k t u x { ~ !!+!6!C!N!]!l!t!!!!!!!!!!!!!!!!"""" " """""3":"C"["b"k"m"o"q"s"""""""""""""""""##4#O#X#e#j#s##############$$$*$2$4$6$8$:$<$C$U$j$w$$$$$$$$$$$$$6c6l6y6~666666667 77777777 7*7;7D7G7I7K7X7[7]7r7t7v7x7z7777777777777788!8#8%8'8)8+888E8S8U8z8|8~88888888888888888888999999'9<9?9C9E9G9p99999999999999999999: ::::2:4:6:8:::D:Y:g:m:o:q:z::::::::::; ;';);*;+;-;/;1;2;4;6;8;9;;;<;=;f;h;k;l;o;r;t;v;x;;;;< <<.<@>>>>>>0>2>5>6>9><>>>@>B>[>>>>?? ???!?&?/?1?2?3?4?6?8?:??O?R?T?V????????????????????????@%@'@)@+@-@/@1@3@5@7@A@n@p@r@t@v@x@z@|@~@@@@@@@@@@@@@@@AAAA+A8A>ASAUAWAYA[A]AlAAAAAAAAAAAAAAAAAAAABFBHBIBJBLBNBPBQBSBUBWBXBZB[B\BBBBBBBBBBBBBBBBBBC C,CACCCECGCICKCCCCCCCCCCCCCCCCDDDDDDD D"DMDaDvDxDzD|DDDDDDDDDDDDDDDDDE EJELENEPERETEVEXEEEEEEFFFjFFFFFFFFFFFFFFFFFFFGGG7G:GLALCLLLLLLLLLLLLLLLLLM7M9M:M;M>M@MBMCMFMIMKMLMOMPMQMTMMMMMMMMMMMNNNNN NeNgNhNiNkNmNoNpNsNvNxNyN{N|N}NNNNNNNNNOO&O;O=O?OBOEOGOOOOOOOOOOOOOOOOPPPPPPP P"PQPgP|P~PPPPPPPPPPPPPPPPPQQQQQQQQQQQQQQQQQQQQQQQQQQQQQRPRcRxRzR|RRRRRSSSS%S/SES\SySSSSSSSTTTTT!T$T'T*T-T.T1T4T7T:T=TBTETGTITdTTTTTTTTTTTTTTTTU?UWUfUmUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUV V0V3V5V8V;V>V@WeWWWWWWWWWWWWWWWWWX XuXxXzX{X|XXXXXXXXXXXXXXXXXXXXYYYYYYYYYZzZZZZZZZZZ[9[Q[[[[[[[[[[[[[[[[[[[[[\\\] ]I]K]M]O]R]U]W]Y]]]]]]]]]^^^^ ^"^)^3^@^C^F^I^L^O^R^T^Z^c^q^v^^^^^^^^^^^^^^^^^^_5_8_:_;_<_>_@_C_D_G_J_L_M_O_P_Q_Z_r________````````"`#`&`)`+`,`.`/`0`9`R`w`z`|`````aaadafagahajalaoapasavaxaya{a|a}aaaaaaaabbbbbbbbbbcc c#c$c'c*c,c.c0c9cJcMcPcScVcYc\c_cbcdccccccccccccccccd1d3d5d7d:d=d?dAdYdddddddddddddddddeee!e$e'e*e,f;ffffffffffffffffgg g gggggg{ggggggggggggggghhWhYh[h]h`hchehgi ieigihiiilinipiqitiwiyizi}i~iiiiiiiiiijYjjjjjjjjjjjjjjjjk&k(k*k,k/k2k4k6klllll l llllllllll l9l^lalclflilllnmYmmmmmmmmmmmmmmmmmmn$n'n)n,n/n2n4nooo,o/o2o4o7o:o=oFoSoUoXo[o^oaodofoooooooooooooooopp'p*p,p/p2p5p7q:qqqqqqqqqqqqqqqqqqrrr r rrrrs8s;s=s>s?sAsCsFsGsJsMsOsPsRsSsTs]sussssssstttuuuu uuuu%u'u*u-u0u3u5uuuuuuuuuuuuuuuuuuuuuvvvwmwwwwwwwwwwwwwwwwx x.x1x3x6x9xyyyyyyyyyyyyyzzzzz z%zJzMzOzRzUzXzZzzz{{{{&{?{J{m{w{~{{{{{{{{{{{{||||| |)|>|@|B|E|H|J|V|k|m|o|r|u|w||||||||||||||}}}} }#}&}(}C}X}Z}\}_}b}d}o}}}}}}}}}}}}}}}}}}}}~~~~~~~0~9~Q~X~g~x~z~|~~~~~~~~~~~~~~~  )+-03>OQSVYr#&(+.OXZ\adgikmx  #$%(B{}ÂւQSTUXZ\]`cefijknʃ̃΃уԃփ؃ #2CFHKN]nqsvyÄƄȄ˄΄݄",=?ADGZkmoruÅŅȅ˅)+-03BSVX[^m~ÆԆ׆ن܆߆ *-/25DUXZ]`oćՇ؇ڇ݇+.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvx{~‰ĉƉȉʉ̉ΉЉӉ։ى܉މ  #&)+-/258;>ADGJMPRTVY\_behknqtwz}ˋ"%(+./258;>ACEGbˋ͋ϋҋԋ׋ً"-6?BDF\ÌՌ+4?JčǍȍɍ̍ -^ǎ *3LSlӏޏ#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqtwz}ÑőǑɑ̑ΑёӑՑבّۑޑ !#%(*-/2479ADGJMPSVY\_begiknqtwz}•ĕƕȕʕ̕Εѕԕٕ֕ܕޕ "%(+.147:=@CFILORUX[^adgjmpsvy|~˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ęǙʙ͙Йә֙ٙܙߙ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~›ěƛțʛ̛ΛЛқԛ֛؛ڛܛޛ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~œĜƜȜќҜԜݜޜxorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013602714757411105024334 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048#$,67<KRSZ[\eopuvyz '()0129:CJKLTUV_fghrswx|  ;<?EXefpqukR !"',- 267=NWXmnrsvy|}  &/089:@OPXYZ`opxyz   !"2:;<BQRZ[\bqrz{| '(:ABCJKLTUVfmnowxy{|'(89@APQYZijrs       . / 6 7 8 9 ? G W X _ ` p q x y         " # ' ( - . 3 4 9 K T U _ ` a f v w ~          # $ ) * / 0      * + , 0 ; < A C F G H I J D \ a      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +~ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)gNabdka1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XAplikaceP^submenuAction: $)1%&(#   #!'hVlastn &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,} !"VNSName).-|XMainMenu1%&'()*/PV^u(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4oO prostYed X111WX176jPYedvolby &Q,11  1jjl1!;;:"fSlu~byrst)=<>fSlu~by1w(__NSServicesMenu11  11BAnCel obrazovkaQa11  1UNSTag1F*EoSkrt prostYed X11Qh11FHmSkrt ostatn11!JlZobrazit vae11  11NMoUkon it prostYed X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UhVlastn &,!XXW"WUpravitYZ)fpravy1[(X]\iKoprovatQc   ,!``_"TOkno )a_t1behjknqr( $%`dcfZavYtQw -.`gf]MinimalizovatQm 7`!ioPYepnout velikost `   GH`mlnProchzet oknyQ` NQR`pooProchzet okny v opa nm poYadQ~ `   d`!soPYevst vae do popYed^_NSWindowsMenummo,!wwv"hNpovdatuxy)hNpovda1yzz(mw!{oNpovda pro X11[_NSMainMenuTmenu S^apps_separator Ā'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ÀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  97 8Y{301, 17}+, _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%')+,-/123)78:]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,=>]_NSCornerView=/1@ABC(FGHIJKLMOPQRSUV\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`YZ[\]^_`abcd[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@eNzevghijklmnoVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontrst_NSFontDescriptorAttributesv1w{WNS.keysxyz|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/RWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorR\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellYZ[\]]NSControlView0AYText Cellghjno#@*RB1_controlTextColor+,դ/+,]NSTableColumn/FGHIJKLMQRS #@U#@DYZ[\]^_`cdfPYkazRM0.3333329856YZ[\]ĀFGHIJKLMQRS #@M@#@$YZ[\]^_`cdWZkratka[headerColor  RB1C1 1YZ[\]_NSDrawsBackground ghjno#@( _controlBackgroundColor#$RL0.602715373N0.6666666667 1)+YgridColor./RM0.4246723652E0.5 1+,34[NSTableView35/YNSControlZapps_table:; ƀЀ>BDEGHBVNSCellǀ Ȁɀ PRS U_{{15, 245}, {402, 18}}YYZ[\]][^Z_`abcf:hRjkl_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀoProklikvac neaktivn oknaopq[NSImageNamèXNSSwitch+,tu_NSButtonImageSourcet/+,wx\NSButtonCellw/+,z{XNSButtonz5/]click_through [Ҁ^copy_menu_item Ԁ>DÀՀ ր׀ Rk U^_{{64, 235}, {128, 26}}_ZYY][\`Z^Rja _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀ghjno WNSState܀ڀ׀!݀ހ)ZZ monitoru__popUpItemAction:ZOtherViews1рـ߀(ڀ!܀Y256 barevڀ!܀fTisceڀ!܀gMiliny+,_NSPopUpButtonCellw/^NSMenuItemCell+,]NSPopUpButtonz5/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator >DE À (R+ U_{{18, 243}, {402, 18}}YYZ[\]][^Z_`abcf5Rjkl!ˀ󀩀oOvYit pYipojen[enable_auth=> >DEHIÀՀ _{{18, 182}, {409, 23}}YYZ[\]][^Z_`abcf=URjkl!ˀoRe~im cel obrazovky_enable_fullscreen]^ >DEhiÀՀ _{{37, 116}, {409, 23}}YYZ[\]][^Z_`abcf]uRjkl!ˀo7Povolit pYstup k Ydku nabdek v re~imu cel obrazovky_enable_fullscreen_menu}~  >D_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}YZ[\]b}@oXXdek nabdek se objev pYi pYesunut ukazatele myai na horn okraj primrnho monitoru.ghjkno   \controlColor+,[NSTextField5/_enable_fullscreen_menu_text  >DE€  R TU<<>_{{18, 141}, {402, 18}}>D ?@ #@w.YYZ[\]][^Z_`abcfRjkl!ˁ o-Povolit v prostYed X11 klvesov ekvivalenty_enable_keyequivs >DEÀ  _{{18, 166}, {402, 18}}YYZ[\]][^Z_`abcfRjkl!ˁo"Povolit pYipojen seovch klientoZenable_tcp  >DE   _{{18, 263}, {402, 18}}>DE*+1 JK BYYZ[\]][^Z_`abcf7Rjkl!ˁoEmulovat tYtla tkovou mya\fake_buttons?@ "&>BDEJKBÀǀ #$ _{{15, 184}, {402, 18}}YYZ[\]][^Z_`abcf?WRjkl!ˁ"%oZamYen sleduje mya_focus_follows_mouse_` (,>BDEjkBÀǀ )* _{{15, 126}, {402, 18}}YYZ[\]][^Z_`abcf_wRjkl!ˁ(+oZamYovat na nov okna_focus_on_new_window .3>DE /1 0_{{18, 70}, {402, 18}}>D MO NYYZ[\]][^Z_`abcfRjkl!ˁ.2o+Klvesy Alt odeslaj signly Alt_L a Alt_R_option_sends_alt 5R\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_{{266, 364}, {484, 356}}oPYedvolby prostYed X11WNSPanelZ{320, 240}RU ;1ȁ<(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1(11 B D0.N(_{{36, 93}, {385, 42}}YZ[\]bAoJe-li tato volba povolena, mohou vznikat konflikty mezi klvesovmi ekvivalenty Ydku nabdek a aplikacemi X11, kter pou~vaj modifiktor Meta.>D  CE D_{{36, 215}, {385, 42}}>D128 GH #@v YZ[\]b1?BFoZProstYedn a prav tla tko myai aktivujete pYidr~enm klvesy Alt nebo Cmd pYi kliknut. _{{36, 165}, {371, 28}}YZ[\]bHDIoOUmo~Huje mnit vstupn nabdku a pYepisovat aktuln mapu klves prostYed X11._{{18, 199}, {402, 18}}YYZ[\]][^Z_`abcf QRjkl!ˁLo*Xdit se systmovm uspoYdnm klvesnice_{{36, 33}, {385, 31}}>DE^_Ȁ QR <YZ[\]bk0PowJe-li tato volba povolena, klvesy Alt odeslaj symboly klves prostYed X11 Alt_L a Alt_R, nikoli signl Mode_switch._{{18, 9}, {418, 18}}YYZ[\]][^Z_`abcftRjkl!ˁNSo#V~dy posouvat ve smru pohybu prstu_{{10, 33}, {438, 294}}+,z/_{{13, 10}, {458, 340}}1}X\m(VNSViewYNSTabView\NSIdentifier[Z<YQ1UVstup+,]NSTabViewItem/[Ձl<]Q21=]}ԁ_cg(>DՀ `a #@I_{{17, 238}, {55, 20}}YZ[\]b_bVBarvy:>DρՀ de #@x@_{{36, 216}, {392, 14}}YZ[\]bcfo8Tato volba se uplatn pYi dalam spuatn prostYed X11.>D߁Հ hi _{{36, 145}, {385, 31}}YZ[\]bgjokPovoluje koYenov okno prostYed X11. Do re~imu cel obrazovky a zpt mo~ete pYechzet kombinac Cmd-Alt-A._{{10, 33}, {438, 294}}fVstup[n<]R Uo1     ptx|(>DEÀn qr n_{{18, 255}, {409, 23}}YYZ[\]][^Z_`abcf$Rjkl!ˁps_Povolit synchronizaci>D12ρn uv n_{{36, 207}, {392, 42}}YZ[\]b>twoPovoluje polo~ku nabdky Koprovat  a umo~Huje synchronizaci mezi schrnkou systmu OS X a buffery CLIPBOARD a PRIMARY prostYed X11.>DEIJÀn yz n_{{34, 114}, {409, 23}}YYZ[\]][^Z_`abcfVRjkl!ˁx{o0PYi zmn schrnky aktualizovat buffer CLIPBOARD>DEbcÀn }~ n_%{{34, 78.308593999999999}, {364, 34}}YYZ[\]][^Z_`abcf oRjkl!ˁ|oPPYi zmn schrnky aktualizovat buffer PRIMARY (kliknut prostYednm tla tkem)>DE{|Àn  n_{{34, 49}, {409, 23}}YYZ[\]][^Z_`abcf Rjkl!ˁo8Aktualizovat schrnku ihned, jakmile je vybrn nov text>DEÀn  n_{{34, 177}, {409, 23}}YYZ[\]][^Z_`abcf Rjkl!ˁo1PYi zmn bufferu CLIPBOARD aktualizovat schrnku>D߁n  n_{{48, 143}, {385, 28}}YZ[\]b otTuto volbu zaka~te, pokud chcete pou~vat xclipboard, klipper nebo jakhokoli jinho sprvce schrnky prostYed X11.>D΁n  n#@v_{{48, 17}, {370, 28}}YZ[\]b oYVzhledem k omezenm protokolu X11 nemus bt tato volba v~dy funk n ve vaech aplikacch._{{10, 33}, {438, 294}}hSchrnkaB[ǁ<]1:?_Ɓ"((>BDB߁ǀ  _{{23, 208}, {385, 31}}YZ[\]b oJe-li tato volba povolena, pYi kliknut na neaktivn okno nebude toto okno pouze aktivovno, ale kliknut mu navc bude pYedno.>BD  B ǀ  #@v_{{23, 150}, {369, 28}}YZ[\]b o]ZamYen oken v prostYed X11 sleduje ukazatel. Toto nastaven m nkter ne~douc dosledky.>BD & 'B -ǀ  #@w@_{{23, 78}, {376, 42}}YZ[\]b 4oJe-li tato volba povolena, pYi vytvoYen novho okna prostYed X11 se do popYed dostane proces X11.app (nikoli Finder.app, Terminal.app apod.)._{{10, 33}, {438, 294}}WWindows <[<1 @ C D E(>D P Q߁  _{{36, 195}, {385, 42}}YZ[\]b C ]oSpuatnm prostYed X11 vytvoYte kl e Yzen pYstupu Xauthority. Zmn-li se IP adresa systmu, tyto kl e pYestanou platit, co~ mo~e zabrnit spuatn aplikac prostYed X11.>D i j߁  _{{36, 118}, {385, 42}}YZ[\]b D voJe-li tato volba povolena, je tYeba v zjmu bezpe nosti systmu povolit tak ovYovn pYipojen. Je-li zakzna, nen vzdlenm aplikacm umo~nno pYipojit se.>D     #@y_{{17, 17}, {404, 14}}YZ[\]b E o9Tyto volby se uplatn pYi pYatm spuatn prostYed X11._{{10, 33}, {438, 294}}kZabezpe en+, YNSTabView /Z{484, 356}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel N_scroll_in_device_direction _sync_clipboard_to_pasteboard [sync_keymap p€_sync_pasteboard xĀ_sync_pasteboard_to_clipboard |ƀ_sync_pasteboard_to_primary Ȁ_sync_primary_immediately ʀZsync_text1 ̀Zsync_text2C @΀_toggle_fullscreen_item> 3Ѐ^x11_about_item r ҁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector e Ձ_minimize_window:>  3ׁ_orderFrontStandardAboutPanel:?  5 ف[prefs_show:E  DہUhide:I  L݁Zterminate:F  G߁_hideOtherApplications:G I_unhideAllApplications: % [Ucopy: + b ]close_window: 1 h \zoom_window: 5 7  > : ;)DE  C D)_NSHuggingPriority   R O SU 2G_{{340, 191}, {132, 32}}YYZ[\][^Z_`ab V Y 5 [ \kj@ !΀ZDuplikovat_apps_table_duplicate: b d  > : ;)DE  n o)  _{{340, 159}, {132, 32}}YYZ[\][^Z_`ab V Y b { \kj!΀YOdstranit_apps_table_delete: T _apps_table_show:  > : ;)DE   )  _{{340, 223}, {132, 32}}YYZ[\][^Z_`a V Y \kj!΀nPYidat polo~ku_apps_table_new:  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:z z  Yx11_help: &  _apps_table_show: k \next_window: n _previous_window:= _enable_fullscreen_changed:C @ _toggle_fullscreen:: ƀ ^prefs_changed:? " ^prefs_changed:_ ( ^prefs_changed:  p ^prefs_changed: x ^prefs_changed:  |  ^prefs_changed:   "^prefs_changed:   $^prefs_changed:] ! &^prefs_changed: ' . (^prefs_changed: - N *^prefs_changed:1 1 ʯ 2&1>?@AjBCDEFGHI'() *mz1 2 +_=I]i}2J c |   B:H?K _k '  C Q D j E ) 5 D b oAOBC'1 ,,/13589;?@CDGIKLPQSTVX[^`behjknqruwz 5:<X@BE DHK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀉀:>#%&E& (-]NSApplication )    /0IJ H18! _{{302, 440}, {484, 271}}oNabdka aplikace X11Z{320, 240}1 5 b (1 '1:>(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Ӏ(_{{1, 1}, {301, 28}}  D    _NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 5/  D  #  = ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 - ʡ .BE 1 2 3 4 5 6 7   :_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, = >_NSPanGestureRecognizer ? @/_NSPanGestureRecognizer_NSGestureRecognizer+, B/+, D E\NSScrollView D/Z{484, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 K ʯ&1111A11111111'()        *m1 =]}     B:BB?BB_B C D E ) 5) b)ABC) ,/1111911111111,PQQ,VX,^````````,uw5:<XB D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀉ##E1 ʯ 2&1>?@AjBCDEFGHI'() *mz1 2 +_=I]i}2J c |   B:H?K _k '  C Q D j E ) 5 D b oAOBC'1 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,,/13589;?@CDGIKLPQSTVX[^`behjknqruwz 5:<X@BE DHK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀉀:>#%& +~ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1 ʯ ~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ʠE+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v       G U \ p ~  $ 2 4 6 8 : < > F X e p { }      & + X a k t v x z | ~  "$&(*;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ 79;<>@ACErtvxz|~  -/468:<>[]!#%@egikmoq*WY[]_acegivxz|2468:<>@BDLY[]_luxz|$579;=?ACEGhjlnprt;=?@BDEGIjlnprtv 3578:<=?Abdfhjln    ),.0QSUWY[]};Qlx:Us %/Ud~NXaoy'?@BDFGIKMOQ#%'(*,.02  ! 3 5 8 : = ? D G P R [ \ _ b e g i l  !!!!*!5!D!S![!f!g!i!k!t!v!x!y!!!!!!!!!!!!!!!!"""!"*"B"I"R"T"V"X"Z"o"x""""""""""""""""##6#?#L#Q#Z#m#r#############$$$$$$$!$#$*$<$Q$^$s$v$z$|$~$$$$$$$$6J6S6`6e6r6{66666666666777777"7+7.70727?7B7D7Y7[7]7_7a7t7}777777777777788 8 88888,8:8<8a8c8e8g8i8k8m88888888888888888889999#9&9*9,9.9W9k9m9o9q9r9t9v9x9999999999999::::::::!:+:@:N:T:V:X:a:m:x::::::::;;;;;;;;;;;;;!;";$;%;&;O;Q;T;U;X;[;];_;a;z;;;;<<<)<;>>>>">%>'>)>+>D>>>>>>??? ????????!?#?%?'?8?;?=???p?x?z?|?~???????????????????@@@@@@@@@@ @*@W@Y@[@]@_@a@c@e@g@i@v@@@@@@@@@@@@@@@AAA!A'AA@ABADAFAUAjAlAnApArAtA~AAAAAAAAAAAAAB/B1B2B3B5B7B9B:BB@BABCBDBEBnBpBsBtBwBzB|B~BBBBBBBBBBC CC*C,C.C0C2C4CCCCCCCCCCCCCCCCCCDDDDD D D6DJD_DaDcDeDhDjDDDDDDDDDDDDDDDDE3E5E7E9E;E=E?EAEEEEEEEEFSFoFFFFFFFFFFFFFFFFFFFFG G#G%G(G+G.G0G5GGGGHHHHHHH+H4H@HKHiH~HHHHHHHHHHHHHHHHHIIIII7I8I;I>IAIDIGIIILINIPIiIIIIIIIIIIIIIIIIIIJ=J?JAJCJFJIJKJMJJJJJJJJK9K;K]@]B]]]]]]]]]]]]]^ ^^^)^,^/^2^5^8^;^=^C^L^Z^_^x^{^~^^^^^^^^^^^^^^^__!_#_$_%_'_)_,_-_0_3_5_6_8_9_:_C_[_________``````` ` ````````"`;```c`e`h`k`n`p`aJaMaOaPaQaSaUaXaYa\a_aaabadaeafaaaaaaaabbbbbbbbbbcc c c cccccc"c3c6c9coAoDoGoJoMoOoooooooooooooooooppppppp q#qqqqqqqqqqqqqqqqqqqqqqqqqrs!s$s&s's(s*s,s/s0s3s6s8s9s;szAzCzzzzz{{{({3{V{`{g{p{{{{{{{{{{{{{{{{||'|)|+|.|1|3|?|T|V|X|[|^|`|r||||||||||||||}}} } }}},}A}C}E}H}K}M}X}m}o}q}t}w}y}}}}}}}}}}}}}}}}}~~~~~"~:~A~P~a~c~e~h~k~~~~~~~~~~~~~~~~~~~'8:<?B[lnpsv vӀՀ؀ـ܀ހ8ACEJMPRTVay +dfhknpr|ЂӂՂ؂ۃ:<=>ACEFILNORSTWqރ ,/147FWZ\_bqƄׄلۄބ &(*-0CTVX[^k|~х+ACFIXikmpsÇƇɇ؇!#%')+-/13579;=?ACEGIKMOQSUWY[]_adgjmpsvy|‰ʼnljɉˉ͉ЉӉ։ى܉߉ !$'*-0369;=?BEHKNQTWZ]`cfikmoqsuwy{~ !$'*,.0Kv‹ˋ΋Ћҋ (+-/EЌҌԌՌ֌،ڌ܌ߌ(3΍Gkώ5@BDFHJLNPRTVXZ]`cfilorux{~‘đǑɑ̑ϑґՑؑۑޑ  "%(+-/1469;>@CEHKNQTWY[]_acegikmpsuwy{}NPSUWY[]_acegikmoqsuwy{}Ĕǔʔ͔ДӔ֔ٔܔߔ !$'*-0369ADGJMPSVY\_behknqtwz}gjmorux{~ØƘɘ̘ϘҘ՘ؘۘޘ  #&),/258;>ADGJMPSVY\_behknqtwz}™řș˙Ιљԙיڙݙ "%(+.147:=@CFILORUX[^adgjmpsvy|Ěǚʚ͚КӚ֚ٚܚߚ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÛśǛɛ˛͛ϛћӛ՛כٛۛݛߛ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ƜǜʜӜxorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/Localizable.strings0000644000175000017500000001044214757411105022601 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Skute n chcete prostYed X11 ukon it?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Vaechny otevYen aplikace prostYed X11 budou ihned zastaveny a ztratte vaechny neulo~en zmny."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "PYejt do re~imu RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Aplikace po~dala prostYed X11 o zmnu rozliaen monitoru. ProstYed X11 obnov povodn stav monitoru, a~ o nvrat do pYedchozho stavu po~d ~adatelsk aplikace. Alternativn mo~ete pYechod prostYed X11 do pYedchozho stavu vynutit kombinac klves #%#A."; /* No comment provided by engineer. */ "Allow" = "Povolit"; /* No comment provided by engineer. */ "Always Allow" = "V~dy povolit"; /* No comment provided by engineer. */ "Cancel" = "Zruait"; /* No comment provided by engineer. */ "Mac Help" = "Mac Help"; /* No comment provided by engineer. */ "Quit" = "Ukon it"; /* No */ "No" = "Ne"; /* Yes */ "Yes" = "Ano"; /* Terminal */ "Terminal" = "Terminl"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Byl nalezen existujc soubor ~/.xinitrc.\n\nOkna zobrazen aplikacemi prostYed X11 nemus mt zhlav nebo mohou vypadat jinak ne~ okna zobrazen nativnmi aplikacemi.\n\nChcete pYi pYatm spuatn prostYed X11 existujc soubor ignorovat a pou~t standardn prostYed X11?"; /* window item modifiers */ "window item modifiers" = "cmd"; /* Updates menu title & */ "Check for X11 Updates..." = "Hledn aktualizac prostYed X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/cs.lproj/locversion.plist0000644000175000017500000000061014757411105022201 LprojCompatibleVersion 106.5 LprojLocale cs LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/0000755000175000017500000000000014757411135017006 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/main.nib/0000755000175000017500000000000014757411135020501 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib0000644000175000017500000021031414757411105023206 Hold Alternativ- eller Kommandotasten nede, mens du klikker, for at aktivere den midterste eller den højre knap på musen. Slår kommandoen "kopier" til og gør det muligt at synkronisere mellem OSX-opslagstavlen og X11-UDKLIPSHOLDEREN og de PRIMÆRE buffere. Slå denne indstilling fra, hvis du ikke vil bruge xclipboard, klipper eller andre X11-værktøjer til administration af udklipsholderen. Når denne mulighed er slået til, vil musen, når du klikker på et passivt vindue, klikke igennem vinduet ud over at gøre det aktivt. Når denne mulighed er slået til, vil programmet X11, når der oprettes et nyt X11-vindue, anbringes forrest (i stedet for Finder, Terminal osv.). Når X11 startes, oprettes Xauthority-taster til adgangskontrol. Hvis systemets IP-adresse ændres, bliver disse taster ugyldige, og det kan forhindre X11-programmer i at starte. Hvis de er slået til, skal Godkend forbindelser også slås til for at sikre systemets sikkerhed. Når de er slået fra, tillades forbindelser fra eksterne programmer ikke. xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects.nib0000644000175000017500000013502514757411105023571 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata2 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUVW`ghistxy}>?BH[histxnU  $)*/45 :>?EU^_tuyz}  -67?@AGVW_`agvw()9ABCIXYabcixy 01BJKLTUV^_`pwxy ,-56FGNO^_ghwx    ! " ) * : ; B C D E K S d e m n          ! " ' ( - . 3 4 8 9 > ? D E J \ e f p q r w         " # ( ) . / 4 5 : ; @ A     % & ' * ; < = A L M R T W X Y Z [  m h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZProgrammerP^submenuAction:$%*ZProgrammer1&')#   #!(hIndstil &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_v)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5VOm X112XY287_Indstillinger...Q,22  2kkm2!<<;"YTjenestersmu*=;>1w)__NSServicesMenu22  22BAoSl Fuld skrm til og fraQa22  2UNSTag2F*EYSkjul X11Qh22FH[Skjul andre22!JXVis alle22  22NMXSlut X11Qq\_NSAppleMenu-!RRQ"ZProgrammerST*ZProgrammer1׀UV)R  R!WYTilpas...-!ZZY"WRedigerY[*1\)Z^]VKopierQc   -!aa`"VVindue *b`u1cfiklors) %&aedSLukQw ./ahgWMinimerQm 8a!jTZoom a   HIanmoGennemg vinduerQ< ORSaqpoGennemg vinduer modsatQ> a   ea!t_Anbring alle forrest^_NSWindowsMenunnp-!xxw"eHjlpuvyz*eHjlp1z{{)nx!|iX11-hjlp[_NSMainMenuTmenu U^apps_separator ƀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ŀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNavnjklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView_NSPlaceholderString0AYText Celljkmqr#@*PUB1_controlTextColor+,ۤ/+,]NSTableColumn/IJKLMNOPTUV #@Y#@D\]^_`abcfgXKommandoUK0.33333299\]^_`ɀIJKLMNOPTUV #@Q`#@$\]^_`abcfgVGenvej [headerColorUB1C1 1\]^_`_NSDrawsBackground jkm !qr#@(&(_controlBackgroundColor+,UL0.602715373N0.6666666667 113€YgridColor67UM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ȀҀFJLNOJVNSCellɀ ʀˀ WYZ W_{{15, 245}, {402, 18}}`\abc`d^e]fghijmBoUqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀_Klik igennem passive vinduervwx[NSImageName΀XNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton=/]click_through \Ԁ^copy_menu_item րFŀ׀ ؀ـ Ym W`_{{69, 234}, {128, 26}}fa\``bcg]eUqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀjkmqr WNSStateހ܀ـ!߀*iFra skrm__popUpItemAction:ZOtherViews1؀ۀ)܀!ހZ256 farver܀!ހXTusinder܀!ހYMillioner+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F"L&'"ŀ /Y2 W_{{18, 243}, {402, 18}}`\abc`d^e]fghijm<Uqrs!̀_Godkend forbindelser[enable_authDE FLOPŀ׀ _{{18, 182}, {409, 23}}`\abc`d^e]fghijmD\Uqrs!̀jFuld skrm_enable_fullscreende FLopŀ׀  _{{37, 116}, {383, 23}}`\abc`d^e]fghijmd|Uqrs!̀o+Tillad adgang til menulinjen ved fuld skrm_enable_fullscreen_menu  F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@v`_{{54, 79}, {362, 31}}Z{250, 750}\]^_`i  @oRMenulinjen bliver synlig, nr musens markr anbringes verst p den primre skrm.jkmnqr ( \controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLɀ  Y VW>>@_{{18, 130}, {402, 18}}F AB #@u0`\abc`d^e]fghijmUqrs!́o!Sl tastaturgenveje til under X11_enable_keyequivs F"L"ŀ  _{{18, 166}, {402, 18}}`\abc`d^e]fghijm Uqrs!́o(Tillad forbindelser fra netvrksklienterZenable_tcp "FL !'  _{{18, 243}, {402, 18}}FL128 LM D`\abc`d^e]fghijm>Uqrs!́!_Emuler mus med tre knapper\fake_buttonsFG $(FJLQRJŀɀ %& _{{15, 184}, {402, 18}}`\abc`d^e]fghijmF^Uqrs!́$'oFokus flger musen_focus_follows_mousefg *.FJLqrJŀɀ +, _{{15, 140}, {402, 18}}`\abc`d^e]fghijmf~Uqrs!́*-oFokus p nye vinduer_focus_on_new_window 05FL 13 2_{{18, 69}, {402, 18}}F OQ #@wP`\abc`d^e]fghijmUqrs!́04_&Alternativtaster sender Alt_L og Alt_R_option_sends_alt 7U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_{{319, 328}, {484, 342}}_X11-indstillingerWNSPanelZ{320, 240}YW =1ρ>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)1 8'DF20P)_{{36, 96}, {355, 28}}\]^_`i C owNr tastaturgenveje p menulinjen er slet til, kan de hindre X11-programmer, der bruger "Meta modifier", i at fungere.F() EG F_{{36, 195}, {385, 42}}F:; IJ \]^_`i8GD H ozHold Alternativ- eller Kommandotasten nede, mens du klikker, for at aktivere den midterste eller den hjre knap p musen. _{{36, 159}, {385, 14}}\]^_`iQF K oBSikrer, at ndringer kan overskrive den aktuelle X11-tastoversigt._{{18, 179}, {402, 18}}`\abc`d^e]fghijm'[Uqrs!́NoFlg systemets tastaturlayout_{{36, 32}, {385, 31}}FLhiπ ST >\]^_`iu2  RojNr det er slet til, sender Alternativtasterne Alt_L og Alt_R X11-nglesymboler i stedet for Mode_switch._{{18, 8}, {418, 18}}`\abc`d^e]fghijm~Uqrs!́PUo5Rul altid i den samme retning som fingerens bevgelse_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1[Indtastning+,]NSTabViewItem/ ]ׁn>_Q21Ddցaei)F׀ bc #@I_{{17, 238}, {55, 20}}\]^_`iad WFarver:Fځ׀ fg #@x@_{{36, 216}, {392, 14}}\]^_`ie h o7Denne indstilling trder i kraft, nr X11 startes igen.F׀ jk #@u_{{36, 148}, {351, 28}}\]^_`ii l obSlr X11 root-vinduet til. Brug Kommando-Alternativ-A til at sl funktionen fuld skrm til og fra._{{10, 33}, {438, 279}}XResultat ]p>_ Y Wq1rvz~)FL%&ŀp st p_{{13, 255}, {409, 23}}`\abc`d^e]fghijm2Uqrs!́ruoSl synkronisering tilF?@ځp wx p_{{31, 221}, {392, 28}}\]^_`iLv  yoSlr kommandoen "kopier" til og gr det muligt at synkronisere mellem OSX-opslagstavlen og X11-UDKLIPSHOLDEREN og de PRIMRE buffere.FLWXŀp {| p_{{29, 129}, {398, 23}}`\abc`d^e]fghijmdUqrs!́z}o+Opdater CLIPBOARD, nr opslagstavlen ndresFLpqŀp  p_{{29, 104}, {400, 23}}`\abc`d^e]fghijm}Uqrs!́~o9Opdater PRIMARY (klik i midten), nr opslagstavlen ndresFLŀp  p_{{29, 84}, {404, 18}}`\abc`d^e]fghijmUqrs!́o:Opdater opslagstavlen med det samme, nr ny tekst er valgtFLŀp  p_{{29, 192}, {398, 23}}`\abc`d^e]fghijmUqrs!́o+Opdater opslagstavlen, nr CLIPBOARD ndresFp  p_{{43, 158}, {385, 28}}\]^_`i  oSl denne indstilling fra, hvis du ikke vil bruge xclipboard, klipper eller andre X11-vrktjer til administration af udklipsholderen.Fp  p_{{43, 47}, {385, 28}}\]^_`i  o\Pga. begrnsninger i X11-protokollen virker denne indstilling mske ikke i nogle programmer._{{10, 33}, {438, 279}}\OpslagstavleJ ]Ɂ>_1BFfȁ$*)FJ  J ɀ  #@x _{{23, 208}, {390, 31}}\]^_`i   oNr denne mulighed er slet til, vil musen, nr du klikker p et passivt vindue, klikke igennem vinduet ud over at gre det aktivt.FJ  Jɀ  _{{23, 161}, {385, 17}}\]^_`i '  o$Fokus i X11-vinduet flger markren.FJ 3 4J ɀ  _{{23, 92}, {390, 42}}\]^_`i @  oNr denne mulighed er slet til, vil programmet X11, nr der oprettes et nyt X11-vindue, anbringes forrest (i stedet for Finder, Terminal osv.)._{{10, 33}, {438, 279}}WVinduer" H]> 1 L O P Q)F" \ ]" c  #@wp_{{36, 195}, {379, 42}}\]^_`i O j  oNr X11 startes, oprettes Xauthority-taster til adgangskontrol. Hvis systemets IP-adresse ndres, bliver disse taster ugyldige, og det kan forhindre X11-programmer i at starte.F" w x" ~  #@w_{{36, 118}, {380, 42}}\]^_`i P   oHvis de er slet til, skal Godkend forbindelser ogs sls til for at sikre systemets sikkerhed. Nr de er slet fra, tillades forbindelser fra eksterne programmer ikke.F"  "   #@y_{{17, 17}, {404, 14}}\]^_`i Q   o9Disse indstillinger trder i kraft, nr X11 startes igen._{{10, 33}, {438, 279}}YSikkerhed+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard' €[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D @Ѐ_toggle_fullscreen_item? 4Ҁ^x11_about_item  s ԁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector f ׁ_minimize_window:?  4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  D݁Uhide:J % L߁Zterminate:G + G_hideOtherApplications:H 1 I_unhideAllApplications: 6 \Ucopy: < c ]close_window: B i \zoom_window: F H  F K L,L  T U,_NSHuggingPriority   Y ` dW 4I_{{340, 191}, {112, 32}}`\abc`^e]fghi g j F l mrq@ !ЀVDubler_apps_table_duplicate: s u  F K L,L   ,  _{{340, 159}, {112, 32}}`\abc`^e]fghi g j s mrq!ЀUFjern_apps_table_delete: V _apps_table_show:  F K L,L   ,  _{{340, 223}, {112, 32}}`\abc`^e]fgh g j mrq!ЀkTilfj emne_apps_table_new:  ^prefs_changed:  ^prefs_changed:'  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: l \next_window: o _previous_window:D  _enable_fullscreen_changed:D @ _toggle_fullscreen:B  Ȁ ^prefs_changed:F  $ ^prefs_changed:f  * ^prefs_changed:  r ^prefs_changed:  z  ^prefs_changed: ~ "^prefs_changed: &  $^prefs_changed: ,  &^prefs_changed:d 2  (^prefs_changed: 8 0 *^prefs_changed: > P ,^prefs_changed:1 B ۯ C'2?@ABkCDEFGHIJ()* +n{!8);'2iDPdp&@XqJBO FR fr 4"' O ] P x Q , F U s DREF*4 .-02469:Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&'G& (/]NSApplication ,    12KL J3:! _{{360, 400}, {454, 271}}_X11-programmenuZ{320, 240}1 F s 򀊁)1 *4<@)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Հ)_{{1, 1}, {301, 28}} !    ! !_NSControlTarget_NSControlAction? =>>_{{1, 215}, {301, 15}}\_doScroller:+, ( )ZNSScroller (=/    4 ! !? A>>_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 > ۡ ?DG B C D E F G H   K_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, N O_NSPanGestureRecognizer P Q/_NSPanGestureRecognizer_NSGestureRecognizer+, S/+, U V\NSScrollView U/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 \ ۯ'2222B22222222()*        +n8'DdJBJJFJJfJ""" O" P" Q , F, s,DEF, -02222:22222222-PRR-XZ-_aaaaaaaa-vx7<>ZDF20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀊##G1 ۯ C'2?@ABkCDEFGHIJ()* +n{!8);'2iDPdp&@XqJBO FR fr 4"' O ] P x Q , F U s DREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 ۯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ۠G+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~ %')+-/1BKZairy~ "$&(*,.2CEGIKTmoqsuwy{}"$&')+,.0]_acegikmoy NPy{}~*,.0246?hjlmoqrtv#,1357`bdegijln  02468:<CErtvxz|~$&(*,.08:[]_acegl!#%'XZ!#.;=?ALUXZ\}4?[q 9Zu ,9EOu  "+-/89;<   P\tuwy{|~#/XZ\]_aceg&2IVhjmorty|    : G R _ j y !!!!"!$!&!(!*!,!/!4!I!P!Y!q!x!!!!!!!!!!!!!!!!!!!!!""*"J"e"n"{"""""""""""""## ##$#0#>#F#H#J#L#N#P#W#i#~##############5w555555555566$6:6?6A6C6E6G6I6K6M6P6Z6k6t6w6y6{6|666666666666667777777&7/717R7T7V7X7Z7\7e7r7~777777777777777777888!8#8%8'8.8C8E8G8I8K8W8l8o8s8u8w888888888888888889999939@9O9Q9S9h9j9l9n9p9z9999999999999999:V:]:_:`:a:c:e:g:h:j:l:n:o:q:r:s::::::::::;;;);?;Q;d;v;;;;;;;;;;;;;;;;;;;;<<<<$<1<:>'>9>;>=>B>K>M>N>O>P>R>T>V>X>Z>k>n>p>r>>>>>>>>>>>>>>>>?? ???????I?K?M?O?Q?S?U?W?Y?[?f??????????????????????@@@!@0@9@G@T@Z@o@q@s@u@w@y@@@@@@@@@@@@@@@@@AAAAAbAdAeAfAhAjAlAmAoAqAsAtAvAwAxAAAAAAAAAAB B BBBBBBB0BP?PBPEPGPHPKPLPMPVPYPPPPPPPPPPPPPQQQQTQaQQQQQQQQRR$R=RORYRgRsRRRRRRRRRRRRRRRRRRRRRSS S5S7S:S;S>S@SBSDSGSPSSSVSXSSSSSSSSSSSSSTTTTT T T TTTTT'T:T=T@TCTFTITLTOTRTUTWToTTTTTTTTUVV V V V VVVVVVVVV"V#V$V'V@VVVVVVVVVVVVVVVVVVVVVVWWWWXX@XCXEXHXJXMXPXRXXY1Y3Y5Y7Y:Y=Y?YAY~YYYYYYYZZZZZ Z Z ZZZZ7Z:ZfAfCfEfFfIfLfNfOfRfSfTfmffffffffg1gggggggggggggggggghhhh h h hhhhhhhhhhhhhhhhiiQiSiUiWiZi]i_iaij!j$j&j'j(j+j-j0j1j4j7j9j:j=j>j?jXj}jjjjjjkllll l l lllllllll l!l9l^lalclflilllnm)mBmOmhmkmnmpmsmvmymmmmmmmmmn n nnnnnnnnnn n!n#n$n%n.nGnlnonqntnwnzn|oooooooooooppppppp!pFpIpKpNpQpTpVpqq q qqqqqqqqqq q"q#q$q?BEGHKLMPjс"$'*9JMORUduwy|ʂ̂΂тԂ #6GIKNQ^oqsvyăՃ׃ك܃߃ /247:IZ]_betʄۄބ  1469@BDFHJLNPRTWZ]`cfilorux{~ćLJʇ͇ЇӇևه܇߇ !$'*-/1369ADGJMPSVY\_behknqtwz}ŏȏˏΏяԏ׏ڏݏ  #&),/2468:<>@BDFHKNPRTVXZ]f)+.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvx{~’ĒƒȒʒ̒ΒВӒْ֒ܒޒ !$'*,.0369ADGJMPSVY\_behknqtwCFIKNQTWZ]`cfilorux{~ÖƖɖ̖ϖҖՖؖۖޖ  #&),/258;>ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÙřǙə˙͙ϙљәՙיٙۙݙߙ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013477414757411105024322 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata2 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUVW`ghistxy}  <=@FYfgqrvlS "'(-23 8<=CT]^stxy| ,56>?@FUV^_`fuv~'(8@ABHWX`abhwx/0AIJKSTU]^_ovwx+,45EFMN]^fgvw     ! ( ) 9 : A B C D J R c d l m ~          ! & ' , - 2 3 7 8 = > C D I [ d e o p q v         ! " ' ( - . 3 4 9 : ? @      $ % & ) : ; < @ K L Q S V W X Y Z J l g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZProgrammerP^submenuAction:$%*ZProgrammer1&')#   #!(hIndstil &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_v)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5VOm X112XY287_Indstillinger...Q,22  2kkm2!<<;"YTjenestersmu*=;>1w)__NSServicesMenu22  22BAoSl Fuld skrm til og fraQa22  2UNSTag2F*EYSkjul X11Qh22FH[Skjul andre22!JXVis alle22  22NMXSlut X11Qq\_NSAppleMenu-!RRQ"ZProgrammerST*ZProgrammer1׀UV)R  R!WYTilpas...-!ZZY"WRedigerY[*1\)Z^]VKopierQc   -!aa`"VVindue *b`u1cfiklors) %&aedSLukQw ./ahgWMinimerQm 8a!jTZoom a   HIanmoGennemg vinduerQ< ORSaqpoGennemg vinduer modsatQ> a   ea!t_Anbring alle forrest^_NSWindowsMenunnp-!xxw"eHjlpuvyz*eHjlp1z{{)nx!|iX11-hjlp[_NSMainMenuTmenu U^apps_separator ƀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ŀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNavnhijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView_NSPlaceholderString0AYText Cellhikop#@*PSB1_controlTextColor+,٤/+,]NSTableColumn/GHIJKLMNRST #@U#@DZ[\]^_`adeXKommandoSK0.33333299Z[\]^ǀGHIJKLMNRST #@L#@$Z[\]^_`adeVGenvej  [headerColorSB1C1 1Z[\]^_NSDrawsBackground hikop#@($&_controlBackgroundColor)*SL0.602715373N0.6666666667 1/1€YgridColor45SM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ȀҀDHJKMNHVNSCellɀ ʀˀ VXY W_{{15, 245}, {402, 18}}_Z`ab^c\d[efghil@nSpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀_Klik igennem passive vindueruvw[NSImageName΀XNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through \Ԁ^copy_menu_item րDJĀ׀ ؀ـ Xm W`_{{69, 234}, {128, 26}}e`Z_^abf[dSpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀhikop WNSStateހ܀ـ!߀*iFra skrm__popUpItemAction:ZOtherViews1׀ۀ)܀!ހZ256 farver܀!ހXTusinder܀!ހYMillioner+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!JK%&!Ā .X1 W_{{18, 243}, {402, 18}}_Z`ab^c\d[efghil;Spqr!̀_Godkend forbindelser[enable_authCD DJKNOĀ׀ _{{18, 182}, {409, 23}}_Z`ab^c\d[efghilC[Spqr!̀jFuld skrm_enable_fullscreencd DJKnoĀ׀  _{{37, 116}, {383, 23}}_Z`ab^c\d[efghilc{Spqr!̀o+Tillad adgang til menulinjen ved fuld skrm_enable_fullscreen_menu  DJ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@v`_{{54, 79}, {362, 31}}Z{250, 750}Z[\]^h  @oRMenulinjen bliver synlig, nr musens markr anbringes verst p den primre skrm.hiklop & \controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKȀ  X VW>>@_{{18, 130}, {402, 18}}DJ AB #@u0_Z`ab^c\d[efghilSpqr!́o!Sl tastaturgenveje til under X11_enable_keyequivs D!JK!Ā  _{{18, 166}, {402, 18}}_Z`ab^c\d[efghil Spqr!́o(Tillad forbindelser fra netvrksklienterZenable_tcp "DJK &  _{{18, 243}, {402, 18}}DJK017 LM D_Z`ab^c\d[efghil=Spqr!́!_Emuler mus med tre knapper\fake_buttonsEF $(DHJKPQHĀɀ %& _{{15, 184}, {402, 18}}_Z`ab^c\d[efghilE]Spqr!́$'oFokus flger musen_focus_follows_mouseef *.DHJKpqHĀɀ +, _{{15, 140}, {402, 18}}_Z`ab^c\d[efghile}Spqr!́*-oFokus p nye vinduer_focus_on_new_window 05DJK 13 2_{{18, 69}, {402, 18}}DJ OQ #@wP_Z`ab^c\d[efghilSpqr!́04_&Alternativtaster sender Alt_L og Alt_R_option_sends_alt 7S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_{{319, 328}, {484, 342}}_X11-indstillingerWNSPanelZ{320, 240}XW =1΁>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)1 7&DF20P)_{{36, 96}, {355, 28}}Z[\]^h C owNr tastaturgenveje p menulinjen er slet til, kan de hindre X11-programmer, der bruger "Meta modifier", i at fungere.DJ'( EG F_{{36, 195}, {385, 42}}DJ9: IJ Z[\]^h7FD H ozHold Alternativ- eller Kommandotasten nede, mens du klikker, for at aktivere den midterste eller den hjre knap p musen. _{{36, 159}, {385, 14}}Z[\]^hPF K oBSikrer, at ndringer kan overskrive den aktuelle X11-tastoversigt._{{18, 179}, {402, 18}}_Z`ab^c\d[efghil&ZSpqr!́NoFlg systemets tastaturlayout_{{36, 32}, {385, 31}}DJKgh΀ ST >Z[\]^ht2  RojNr det er slet til, sender Alternativtasterne Alt_L og Alt_R X11-nglesymboler i stedet for Mode_switch._{{18, 8}, {418, 18}}_Z`ab^c\d[efghil}Spqr!́PUo5Rul altid i den samme retning som fingerens bevgelse_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1[Indtastning+,]NSTabViewItem/ ]ׁn>_Q21Ccցaei)DJ׀ bc #@I_{{17, 238}, {55, 20}}Z[\]^had WFarver:DJف׀ fg #@x@_{{36, 216}, {392, 14}}Z[\]^he h o7Denne indstilling trder i kraft, nr X11 startes igen.DJ׀ jk #@u_{{36, 148}, {351, 28}}Z[\]^hi l obSlr X11 root-vinduet til. Brug Kommando-Alternativ-A til at sl funktionen fuld skrm til og fra._{{10, 33}, {438, 279}}XResultat ]p>_ X  Wq1rvz~)DJK$%Āp st p_{{13, 255}, {409, 23}}_Z`ab^c\d[efghil1Spqr!́ruoSl synkronisering tilDJ>?فp wx p_{{31, 221}, {392, 28}}Z[\]^hKv  yoSlr kommandoen "kopier" til og gr det muligt at synkronisere mellem OSX-opslagstavlen og X11-UDKLIPSHOLDEREN og de PRIMRE buffere.DJKVWĀp {| p_{{29, 129}, {398, 23}}_Z`ab^c\d[efghilcSpqr!́z}o+Opdater CLIPBOARD, nr opslagstavlen ndresDJKopĀp  p_{{29, 104}, {400, 23}}_Z`ab^c\d[efghil|Spqr!́~o9Opdater PRIMARY (klik i midten), nr opslagstavlen ndresDJKĀp  p_{{29, 84}, {404, 18}}_Z`ab^c\d[efghilSpqr!́o:Opdater opslagstavlen med det samme, nr ny tekst er valgtDJKĀp  p_{{29, 192}, {398, 23}}_Z`ab^c\d[efghilSpqr!́o+Opdater opslagstavlen, nr CLIPBOARD ndresDJp  p_{{43, 158}, {385, 28}}Z[\]^h  oSl denne indstilling fra, hvis du ikke vil bruge xclipboard, klipper eller andre X11-vrktjer til administration af udklipsholderen.DJp  p_{{43, 47}, {385, 28}}Z[\]^h  o\Pga. begrnsninger i X11-protokollen virker denne indstilling mske ikke i nogle programmer._{{10, 33}, {438, 279}}\OpslagstavleH ]Ɂ>_1@Eeȁ$*)DHJ H ɀ  #@x _{{23, 208}, {390, 31}}Z[\]^h   oNr denne mulighed er slet til, vil musen, nr du klikker p et passivt vindue, klikke igennem vinduet ud over at gre det aktivt.DHJ  Hɀ  _{{23, 161}, {385, 17}}Z[\]^h &  o$Fokus i X11-vinduet flger markren.DHJ 2 3H ɀ  _{{23, 92}, {390, 42}}Z[\]^h ?  oNr denne mulighed er slet til, vil programmet X11, nr der oprettes et nyt X11-vindue, anbringes forrest (i stedet for Finder, Terminal osv.)._{{10, 33}, {438, 279}}WVinduer! G]> 1 K N O P)D!J [ \! b  #@wp_{{36, 195}, {379, 42}}Z[\]^h N i  oNr X11 startes, oprettes Xauthority-taster til adgangskontrol. Hvis systemets IP-adresse ndres, bliver disse taster ugyldige, og det kan forhindre X11-programmer i at starte.D!J v w! }  #@w_{{36, 118}, {380, 42}}Z[\]^h O   oHvis de er slet til, skal Godkend forbindelser ogs sls til for at sikre systemets sikkerhed. Nr de er slet fra, tillades forbindelser fra eksterne programmer ikke.D!J  !   #@y_{{17, 17}, {404, 14}}Z[\]^h P   o9Disse indstillinger trder i kraft, nr X11 startes igen._{{10, 33}, {438, 279}}YSikkerhed+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard& €[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D @Ѐ_toggle_fullscreen_item? 4Ҁ^x11_about_item  s ԁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector f ׁ_minimize_window:?  4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  D݁Uhide:J $ L߁Zterminate:G * G_hideOtherApplications:H 0 I_unhideAllApplications: 5 \Ucopy: ; c ]close_window: A i \zoom_window: E G  D J K*JK  S T*_NSHuggingPriority   X _ cW 4I_{{340, 191}, {112, 32}}_Z`ab^\d[efgh f i E k lqp@ !ЀVDubler_apps_table_duplicate: r t  D J K*JK  ~ *  _{{340, 159}, {112, 32}}_Z`ab^\d[efgh f i r lqp!ЀUFjern_apps_table_delete: V _apps_table_show:  D J K*JK   *  _{{340, 223}, {112, 32}}_Z`ab^\d[efg f i lqp!ЀkTilfj emne_apps_table_new:  ^prefs_changed:  ^prefs_changed:&  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: l \next_window: o _previous_window:C  _enable_fullscreen_changed:D @ _toggle_fullscreen:@  Ȁ ^prefs_changed:E  $ ^prefs_changed:e * ^prefs_changed:  r ^prefs_changed:  z  ^prefs_changed:  ~ "^prefs_changed: %  $^prefs_changed: +  &^prefs_changed:c 1  (^prefs_changed: 7 0 *^prefs_changed: = P ,^prefs_changed:1 A گ B'2?@ABkCDEFGHIJ()* +n{ 7(:&1hCOco%?WpH@N EQ eq 3!& N \ O w P * E T r BPCD(2 .-02469:Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&'G& (/]NSApplication *    12KL J3:! _{{360, 400}, {454, 271}}_X11-programmenuZ{320, 240}1 E r 򀊁)1 (2<@)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Ԁ)_{{1, 1}, {301, 28}}  J    _NSControlTarget_NSControlAction? =>>_{{1, 215}, {301, 15}}\_doScroller:+, ' (ZNSScroller ';/  J  3  ? A>>_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 = ڡ >DG A B C D E F G   J_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, M N_NSPanGestureRecognizer O P/_NSPanGestureRecognizer_NSGestureRecognizer+, R/+, T U\NSScrollView T/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 [ گ'2222B22222222()*        +n7&CcH@HHEHHeH!!! N! O! P * E* r*BCD* -02222:22222222-PRR-XZ-_aaaaaaaa-vx7<>ZDF20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀊##G1 گ B'2?@ABkCDEFGHIJ()* +n{ 7(:&1hCOco%?WpH@N EQ eq 3!& N \ O w P * E T r BPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 گ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ڠG+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~ %')+-/1BKZairy~ "$&(*,.2CEGIKTmoqsuwy{}"$&')+,.0]_acegikmoy NPy{}~*,.0246?hjlmoqrtv#,1357`bdegijln  02468:<CErtvxz|~$&(*,.08:[]_acegl!#%'XZ!#.;=?ALUXZ\}0;Wm5Vq(5AKq !"#jt}7C[\^`bcegikm ?ACDFHJLN 0=OQTVY[`clnwx{~ ! . 9 F Q ` o w !! ! ! !!!!!!0!7!@!X!_!h!j!l!n!p!!!!!!!!!!!!!!!!!""1"L"U"b"g"p""""""""""""""# ##%#-#/#1#3#5#7#>#P#e#r#############5^5g5t5y555555556 6!6&6(6*6,6.606264676A6R6[6^6`6b6c6p6s6u666666666666667777 77797;7=7?7A7C7L7Y7e7g777777777777777778888 8 888*8,8.80828>8S8V8Z8\8^88888888888888888888999'96989:9O9Q9S9U9W9a9v999999999999999:=:D:F:G:H:J:L:N:P:Q:S:U:W:X:Z:[:\:::::::::::;;;(;:;M;_;q;;;;;;;;;;;;;;;;;;;;;<< <<#<,<5<@=A=C=E=G=`====>>>">$>&>+>4>6>7>8>9>;>=>?>A>C>T>W>Y>[>>>>>>>>>>>>>>>>>>>>>????2?4?6?8?:??@?B?D?O?|?~??????????????????????@ @@"@0@=@C@X@Z@\@^@`@b@q@@@@@@@@@@@@@@@@@@@@AKAMANAOAQASAUAVAXAZA\A]A_A`AaAAAAAAAAAAAAAAAABBBB%B:BB@BBBDBBBBBBBBBBBBBBBBC CCCCCCCC0CDCYC[C]C_CbCdCCCCCCCCCCCCCCCCD.D0D2D4D6D9D;D=DDDDDDDDE7ESE{EEEEEEEEEEEEEEEEEEEFFF F FFFFFFFFFFFFFFGG GG#GAGVGXGZG]G`GbGGGGGGGGGGGGGGGGHHHHHHHH!H$H&H(HAHHHHHHHHHHHHHHHHHHIIIIII!I#I%IjI}IIIIIIIIIIIJJJJJ J J JJJJ*JiJkJmJoJrJuJwJyJJJJJJJJKWKYKZK[K^K`KbKcKfKiKkKlKoKpKqKtKKKKKKKKKKKLLLLLL LHLJLLLNLQLTLVLXLuLLLLLLLLMMMMMMM M MMMMMMM/MnMpMrMtMwMzM|M~MMMMMMMMN7N9N:N;N=N?NANBNENHNJNKNMNNNONhNNNNNNNNNNO OOOOOOxOzO{O|OOOOOOOOOOOOOPPPPPP"P$P'P(P+P.P0P1P4P5P6P?PBPPPPPPPPPPPPPPPPQ=QJQjQxQQQQQQQR R&R8RBRPR\RoRRRRRRRRRRRRRRRRRRRRRRSS S#S$S'S)S+S-S0S9ST@TXTTTTTTTTUUUUUUUUUUVVVVV V V VV)VVVVVVVVVVVVVVVVVVVVVVVVVWXX)X,X.X1X3X6X9X;XXYYYY Y#Y&Y(Y*YgYYYYYYYYYYYYYYYYYZ Z#Z%Z(Z+Z.Z0[[[][_[a[c[f[i[k[m[[[\\\%\0\3\6\9\<\?\A\Z\a\k\x\{\~\\\\\\\\\\\\\\\\\\\\\]]]]] ] ]s]v]x]y]z]|]~]]]]]]]]]]]]]]]]]]]]^Y^\^^^_^`^b^d^g^h^k^n^p^q^s^t^u^~^^^^^^^^^_C__________________```````!`#`aa a%a(a+a.a1a4a7a`abaeafaialanapara{aaaaaaaaaabbbbbb b b bbbbbbbb4bsbubwbyb|bbbbccccc c#c%c(c)c,c/c1c2c5c6c7cPcucxczc}cccdddddddddddeeeeee e_eaeceeehekemeoef#f%f&f'f*f,f.f/f2f5f7f8f;fi@iCiFiHiJij j jjjjjjjjj j"j#j&j'j(jAjfjijkjnjqjtjvkkkkkkkkkkklllll l l"lGlJlLlOlRlUlWmm+m8mQmTmWmYm\m_mbmkmxmzm}mmmmmmmmmmmmnnnnn n n n nnn0nUnXnZn]n`ncneonoooooooooooooooop p/p2p4p7p:p=p?pppppppppqqqqq q q q q%qJqMqOqRqUqXqZr}rrrrrrrrrrrrrrrrsLsOsQsRsSsUsWsZs[s^sascsdsfsgshsqsssssssssu(uuuuuuuuuuuuuuuuuuuuuuvvvvw[wwwwwwwwwwwwwwwwwwx(x+x-x0x2x5x8x:xxxxxxxyyy@yJyQyZymyry~yyyyyyyyyyyyyyzzzzzzz)z>z@zBzEzHzJz\zqzszuzxz{z}zzzzzzzzzzzzzz{{+{-{/{2{5{7{B{W{Y{[{^{a{c{n{{{{{{{{{{{{{{{{{{{|| |$|+|:|K|M|O|R|U|h|y|{|}|||||||||||||||||}}}}}"}$}&})},}E}V}X}Z}]}`}y}}}}}}}}}}}}}}}}}}}}}~~`~t~w~y~z~{~~~~~~~~~~~~~~~~~~~~~~~"+-/47:<>@G_psux{JLNQTVX^s #%'(+.014569Ś݁ "368;>M^`behŵ݂߂ 0247:GXZ\_buƒŃȃ݃ #2CFHKN]nqsvyĄDŽɄ̄τބ "%4EGILO^ortwz !#%')+-/13579;=@CFILORUX[^adgjmpsvy|‡Ňȇˇ·чԇׇڇ݇ "%(+.147:=@CFHJLNPRTVX[^`cfhjlnpru~ (:ENWZ]_bdmxz|Ɖωډ pˊ؊Z\^_`bdfijmoqtuvyڌ /Wt׌/8=FS\gЎҎԎ֎؎ڎ܎ގ !$'*-0369@CFILORUX[^adgjlnprtvxz|ēǓʓ͓Гӓ֓ٓܓߓ !$'*-0369ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘИҘԘؘ֘ژܘޘ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~™ęƙșʙ̙ΙЙҙԙؙ֙ڙܙޙ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/Localizable.strings0000644000175000017500000001055614757411105022566 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Vil du virkelig slutte X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Evt. bne X11-programmer slutter med det samme, og du vil miste ndringer, du ikke har arkiveret."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Start RandR-funktion?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Et program har anmodet at X11 ndrer oplsningen p skrmen. X11 gendanner skrmen til dens forrige tilstand, nr programmet som anmodningen kommer fra, anmoder om at g tilbage til forrige tilstand. Du kan eventuelt bruge tastsekvensen #%#A til at tvinge X11 til at g tilbage til forrige tilstand."; /* No comment provided by engineer. */ "Allow" = "Tillad"; /* No comment provided by engineer. */ "Always Allow" = "Tillad altid"; /* No comment provided by engineer. */ "Cancel" = "Annuller"; /* No comment provided by engineer. */ "Mac Help" = "Mac-hjlp"; /* No comment provided by engineer. */ "Quit" = "Slut"; /* No */ "No" = "Nej"; /* Yes */ "Yes" = "Ja"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Du har et eksisterende ~/.xinitrc-arkiv.\n\nVinduer, der vises af X11-programmer, har evt. ingen titellinje eller har et andet udseende end de vinduer, der vises af originale programmer.\n\nVil du tilsidestte det eksisterende arkiv og bruge X11-standardmiljet, nste gang du starter X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Sg efter X11-opdateringer..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/da.lproj/locversion.plist0000644000175000017500000000061014757411105022160 LprojCompatibleVersion 106.3 LprojLocale da LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/0000755000175000017500000000000014757411135017471 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/0000755000175000017500000000000014757411135021164 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib0000644000175000017500000021111614757411105023672 Als u deze optie inschakelt, kan het gebruik van toetscombinaties voor menucommado's conflicteren met X11-programma's die de Meta-modifier gebruiken. Houd tijdens het klikken de Option- of Command-toets ingedrukt om de middelste muisknop of de rechtermuisknop te activeren. Schakelt het X11-rootvenster in. Gebruik de toetscombinatie Command + Option + A om de schermvullende weergave te starten en te stoppen. Schakelt het menuonderdeel 'kopieer' in en maakt synchronisatie mogelijk tussen het klembord van OS X en de CLIPBOARD- en PRIMARY-buffer van X11. Indien ingeschakeld, wordt bij aanmaak van een nieuw X11-venster X11.app op de voorgrond geplaatst (in plaats van Finder.app, Terminal.app, enz.). Wanneer u X11 start, worden er Xauthority-toegangscontrolesleutels aangemaakt. Als het IP-adres van het systeem wordt gewijzigd, worden deze toetsen ongeldig waardoor het mogelijk is dat X11-programma's niet kunnen worden gestart. Als u deze optie inschakelt, moet 'Voer identiteitscontrole uit voor verbindingen' ook worden ingeschakeld ter beveiliging van het systeem. Als deze optie is uitgeschakeld, worden verbindingen van externe programma's niet toegestaan. xorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/keyedobjects.nib0000644000175000017500000013132314757411105024251 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata2 %)*048$%-78=LST[\]fpqvwz{")*+234;<ELMNVWXahijtuy}>?BH[histxnU  $)*/45 :>?EU^_tuyz}  -67?@AGVW_`agvw();CDEKZ[cdekz{  !19:KLTUV^_`pwxy+,45FGNO^_ghwx   " # * + ; < C D E F L T d e m n ~          ! & ' , - 2 3 7 8 = > C D I [ d e o p q v         ! " ' ( - . 3 4 9 : ? @      $ % & ) : ; < @ K L Q S V W X Y Z  l h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[Programma'sP^submenuAction:$%*[Programma's1&')#   #!(hPas aan &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0QY`w)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5XOver X112XY287]Voorkeuren...Q,22  2kkm2!<<;"]Voorzieningenstu*>=?]Voorzieningen1x)__NSServicesMenu22  22CB_Schermvullende weergave aan/uitQa22  2UNSTag2G*F[Verberg X11Qh22GI^Verberg andere22!KZToon alles22  22ONXStop X11Qq\_NSAppleMenu-!SSR"[Programma'sTU*[Programma's1؀VW)S  S!XZPas aan...-![[Z"VWijzigZ\*1])[_^WKopieerQc  -!bba"WVenster*cav1 dgjlmpst) &'bfeUSluitQw /0bih\MinimaliseerQm 9b!k_Vergroot/verklein b   IJbon_Blader door venstersQ` PSTbrq_Blader omgekeerd door venstersQ~ b   fb!u_Alles op voorgrond^_NSWindowsMenuooq-!yyx"THelpqwxz*1z{{)oy!|XX11 Help[_NSMainMenuTmenu V^apps_separator ƀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ŀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNaamjklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView_NSPlaceholderString0AXTekstceljkmqr#@*PUB1_controlTextColor+,ۤ/+,]NSTableColumn/IJKLMNOPTUV #@X#@D\]^_`abcfgXCommandoUK0.33333299\]^_`ɀIJKLMNOPTUV #@Q#@$\]^_`abcfgWToetsen [headerColorUB1C1 1\]^_`_NSDrawsBackground jkm !qr#@(&(_controlBackgroundColor+,UL0.602715373N0.6666666667 113€YgridColor67UM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ȀҀFJLNOJVNSCellɀ ʀˀ WYZ W_{{15, 245}, {402, 18}}`\abc`d^e]fghijmBoUqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀_Klik in inactieve venstersvwx[NSImageName΀XNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton=/]click_through ]Ԁ^copy_menu_item րFŀ׀ ؀ـ Ym W`_{{77, 234}, {168, 26}}fa\``bcg]eUqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀjkmqr WNSStateހ܀ـ!߀*_Van beeldscherm__popUpItemAction:ZOtherViews1؀ۀ)܀!ހ[256 kleuren܀!ހYDuizenden܀!ހYMiljoenen+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F"L&'"ŀ /Y2 W_{{18, 243}, {402, 18}}`\abc`d^e]fghijm<Uqrs!̀_.Voer identiteitscontrole uit voor verbindingen[enable_authDE FLOPŀ׀ _{{18, 182}, {409, 23}}`\abc`d^e]fghijmD\Uqrs!̀_Schermvullende weergave_enable_fullscreende FLopŀ׀  _{{37, 116}, {409, 23}}`\abc`d^e]fghijmd|Uqrs!̀_5Maak menubalk toegankelijk in schermvullende weergave_enable_fullscreen_menu  F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@v`_{{54, 81}, {362, 31}}Z{250, 750}\]^_`i  @_fDe menubalk wordt zichtbaar als de muis aan de bovenkant van het primaire beeldscherm wordt geplaatst.jkmnqr ( \controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLɀ  Y VW>>@_{{18, 127}, {402, 18}}F AB #@}0`\abc`d^e]fghijmUqrs!́_#Activeer toetscombinaties onder X11_enable_keyequivs F"L"ŀ  _{{18, 168}, {402, 18}}`\abc`d^e]fghijm Uqrs!́_'Sta verbindingen van netwerkclients toeZenable_tcp "FL !'  _{{18, 243}, {402, 18}}F239: DF #@}E`\abc`d^e]fghijm@Uqrs!́!_Emuleer drieknopsmuis\fake_buttonsHI $(FJLSTJŀɀ %& _{{15, 186}, {402, 18}}`\abc`d^e]fghijmH`Uqrs!́$'_Focus volgt muis_focus_follows_mousehi *.FJLstJŀɀ +, _{{15, 142}, {402, 18}}`\abc`d^e]fghijmhUqrs!́*-_Focus op nieuwe vensters_focus_on_new_window 05FL 13 2_{{18, 69}, {402, 18}}F9 OQ P`\abc`d^e]fghijmUqrs!́04_'Option-toetsen versturen Alt_L en Alt_R_option_sends_alt 7U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_ {{266, 364.0390625}, {564, 341}}^X11-voorkeurenWNSPanelZ{320, 240}YW =1ρ>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)1 ':HE20P)_{{36, 93}, {480, 30}}\]^_`i C _Als u deze optie inschakelt, kan het gebruik van toetscombinaties voor menucommado's conflicteren met X11-programma's die de Meta-modifier gebruiken._{{36, 209}, {468, 30}}FL)* LM H\]^_`i'6 G _|Houd tijdens het klikken de Option- of Command-toets ingedrukt om de middelste muisknop of de rechtermuisknop te activeren. FCD9 IJ _{{36, 151}, {468, 30}}\]^_`iQH K _^Maakt het mogelijk dat wijzigingen in het invoermenu de X11-toetsenbordindeling overschrijven._{{18, 185}, {402, 18}}`\abc`d^e]fghijm:[Uqrs!́EN_$Volg toetsenbordindeling van systeem_{{36, 35}, {468, 30}}FLhiπ ST >\]^_`iu2  R_zIndien ingeschakeld, worden met de Option-toetsen de X11-toetssymbolen Alt_L en Alt_R verstuurd in plaats van Mode_switch._{{18, 11}, {418, 18}}`\abc`d^e]fghijm~Uqrs!́PU_1Scrol altijd in de richting van de vingerbeweging_{{10, 33}, {518, 279}}+,/_{{13, 10}, {538, 325}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1VInvoer+,]NSTabViewItem/ ]ׁn>_Q21Ddցaei)F׀ bc #@K_{{17, 238}, {58, 20}}\]^_`iad XKleuren:Fځ׀ fg #@x@_{{36, 216}, {392, 14}}\]^_`ie h _?Deze instelling wordt actief wanneer X11 opnieuw wordt gestart.F9׀ jk _{{36, 147}, {468, 31}}\]^_`ii l _Schakelt het X11-rootvenster in. Gebruik de toetscombinatie Command + Option + A om de schermvullende weergave te starten en te stoppen._{{10, 33}, {518, 279}}WUitvoer ]p>_ Y  Wq1rvz~)FL$%ŀp st p_{{18, 255}, {409, 23}}`\abc`d^e]fghijm1Uqrs!́ru_Schakel synchronisatie inF>?Ep wx p#@}P_{{36, 207}, {473, 42}}\]^_`iLv  y_Schakelt het menuonderdeel 'kopieer' in en maakt synchronisatie mogelijk tussen het klembord van OS X en de CLIPBOARD- en PRIMARY-buffer van X11.FLWXŀp {| p_{{34, 129}, {409, 23}}`\abc`d^e]fghijmdUqrs!́z}_/Werk CLIPBOARD bij als plakbord wordt gewijzigdFLpqŀp  p_{{34, 104}, {409, 23}}`\abc`d^e]fghijm}Uqrs!́~_:Werk PRIMARY (middenklik) bij als plakbord wordt gewijzigdFLŀp  p_{{34, 79}, {486, 18}}`\abc`d^e]fghijmUqrs!́_FWerk plakbord onmiddellijk bij wanneer nieuwe tekst wordt geselecteerdFLŀp  p_{{34, 192}, {409, 23}}`\abc`d^e]fghijmUqrs!́_/Werk plakbord bij als CLIPBOARD wordt gewijzigdFÁp  p#@|_{{48, 158}, {461, 28}}\]^_`i  _oSchakel deze optie uit als u xclipboard, klipper of een ander programma voor X11-klembordbeheer wilt gebruiken.FÁp  p_{{48, 47}, {461, 28}}\]^_`i  _bVanwege beperkingen in het X11-protocol werkt deze optie mogelijk niet altijd in alle programma's._{{10, 33}, {518, 279}}XPlakbordJ ]Ɂ>_1BHhȁ$*)FJ  J ɀ  #@}_{{33, 210}, {481, 31}}\]^_`i   _zIndien ingeschakeld, wordt een muisklik in een inactief venster toegepast in dat venster en wordt het venster geactiveerd.FJ  J ɀ  _{{33, 166}, {481, 16}}\]^_`i (  _LFocus van het X11-venster volgt de aanwijzer. Dit heeft ongewenste effecten.FJ 4 5J ɀ  _{{33, 96}, {481, 42}}\]^_`i A  _Indien ingeschakeld, wordt bij aanmaak van een nieuw X11-venster X11.app op de voorgrond geplaatst (in plaats van Finder.app, Terminal.app, enz.)._{{10, 33}, {518, 279}}XVensters" I]> 1 M P Q R)F" ] ^"9  _{{36, 183}, {468, 56}}\]^_`i P j  _Wanneer u X11 start, worden er Xauthority-toegangscontrolesleutels aangemaakt. Als het IP-adres van het systeem wordt gewijzigd, worden deze toetsen ongeldig waardoor het mogelijk is dat X11-programma's niet kunnen worden gestart.F" w x"9  _{{36, 107}, {468, 56}}\]^_`i Q   _Als u deze optie inschakelt, moet 'Voer identiteitscontrole uit voor verbindingen' ook worden ingeschakeld ter beveiliging van het systeem. Als deze optie is uitgeschakeld, worden verbindingen van externe programma's niet toegestaan.F"  "   #@y_{{17, 17}, {404, 14}}\]^_`i R   _BDeze instellingen worden actief wanneer X11 opnieuw wordt gestart._{{10, 33}, {518, 279}}[Beveiliging+, YNSTabView /Z{564, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard: E€[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D AЀ_toggle_fullscreen_item? 4Ҁ^x11_about_item  t ԁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector g ׁ_minimize_window:?  4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  E݁Uhide:J $ M߁Zterminate:G * H_hideOtherApplications:H 0 J_unhideAllApplications: 5 ]Ucopy: ; d ]close_window: A j \zoom_window: E G  F J K,L  S T,_NSHuggingPriority   Y _ cW 4I_{{340, 191}, {100, 32}}`\abc`^e]fghi f i E k lrq@ !ЀYDupliceer_apps_table_duplicate: r t  F J K,L  ~ ,  _{{340, 159}, {100, 32}}`\abc`^e]fghi f i r lrq!ЀYVerwijder_apps_table_delete: W _apps_table_show:  F J K,L   ,  _{{340, 223}, {100, 32}}`\abc`^e]fgh f i lrq!ЀXVoeg toe_apps_table_new:  ^prefs_changed:  ^prefs_changed:: E ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:D  _enable_fullscreen_changed:D A _toggle_fullscreen:B  Ȁ ^prefs_changed:H  $ ^prefs_changed:h * ^prefs_changed:  r ^prefs_changed:  z  ^prefs_changed:  ~ "^prefs_changed: %  $^prefs_changed: +  &^prefs_changed:d 1  (^prefs_changed: 7 0 *^prefs_changed: = P ,^prefs_changed:1 A گ B'2?@ABkCDEFGHIJ()*  +o{!'3D:*iDPdp%?XqJBO HT ht 5"' P ^ Q x R , E T r DREF*4 .-02469:<@ADEHJLMQSVWY[]`bdgjlmpstwy{ 7<>Z BFHJEM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&'G& (/]NSApplication ,    12KL J3:! _{{302, 440}, {454, 271}}_X11-programmamenuZ{320, 240}1 E r 򀊁)1 *4<@)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Հ)_{{1, 1}, {301, 28}} !     _NSControlTarget_NSControlAction? =>>_{{1, 215}, {301, 15}}\_doScroller:+, ' (ZNSScroller '=/    3  ? A>>_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 = ڡ >DG A B C D E F G   J_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, M N_NSPanGestureRecognizer O P/_NSPanGestureRecognizer_NSGestureRecognizer+, R/+, T U\NSScrollView T/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 [ گ'2222B22222222()*        +o':DdJBJJHJJhJ""" P" Q" R , E, r,DEF, -02222:22222222-QSS-Y[-`bbbbbbbb-wy7<>ZHE20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀊##G1 گ B'2?@ABkCDEFGHIJ()*  +o{!'3D:*iDPdp%?XqJBO HT ht 5"' P ^ Q x R , E T r DREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:<@ADEHJLMQSVWY[]`bdgjlmpstwy{ 7<>Z BFHJEM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 گ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ڠG+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~ ')+-/13DM\ckt{ "$&(*,.04EGIKMVoqsuwy{}!#%&(*+-/\^`bdfhjln| "$&(*LNwy{|~-/13579Dmoqrtvwy{ *38:<>giklnpqsu79;=?ACKMz|~ /13579;HJkmoqsuw)+02468:[] "$)68:<EHJLmoqsuwy%AWr~@[y+5[j!"is|6BZ[]_abdfhjl >@BCEGIKM /<NPSUXZ_bkmvwz} - 8 E P _ n v !!! ! !!!!!!/!6!?!W!^!g!i!k!m!o!!!!!!!!!!!!!!!!!""0"K"T"a"f"o""""""""""""""# ##$#,#.#0#2#4#6#=#O#d#q#############5]5f5s5x555555556 6 6%6'6)6+6-6/6163666?6P6Y6\6^6`6a6n6q6s666666666666666777 7777797;7=7?7A7J7W7c7e7777777777777777788888 8 88)8+8-8/818=8R8U8Y8[8]88888888888888888888999&9597999N9P9R9T9V9`9u999999999999999:<:C:E:F:G:I:K:M:N:P:R:T:U:W:X:Y:::::::::::;;;%;7;J;\;n;};;;;;;;;;;;;;;;;;;;;;<<<<'<0<;=@=B=[====>> >>>!>&>/>1>2>3>4>6>8>:><>>>O>R>T>V>>>>>>>>>>>>>>>>>>>>>>>>?,?.?0?2?4?6?8?:??J?w?y?{?}????????????????????@@@@,@9@?@T@V@X@Z@\@^@m@@@@@@@@@@@@@@@@@@@@AGAIAJAKAMAOAQARATAVAXAYA[A\A]AAAAAAAAAAAAAAAAAAB/B;BPBRBTBVBXBZBBBBBBBBBBBBBBBBC#C%C'C)C+C-C/C1CKC_CtCvCxCzC}CCCCCCCCCCCCCCCCD DIDKDMDODQDTDVDXDDDDDDDDE1EMEuEEEEEEEEEEEEEEEEEEEEFFFF F FFF|FFFFFFFFFFFFFFGGGGGGG}GGGGGGGGGGGGGGGGGGGGGGGGGGGHhHkHmHnHoHrHtHwHxH{H~HHHHHHHHHHHHHHHIII/I1I3I6I9I;IIIIIIIIIIIIIIIIJJJ J JJJJJ@JKJ`JbJdJgJjJlJJJJJJJJJJJJJJJJKKlKoKqKrKsKvKxK{K|KKKKKKKKKKKKKKKKKKL LL!L#L&L)L+LLLLLLLLLLLLLLLLLLLLLMMMMM/MDMFMHMKMNMPMMMMMMMMMMMMMMMMNNNN!N$N'N)N+NFN\NqNsNuNxN{N}NNNNNNNNNNNNNNNNOO|OOOOOOOOOOOOOOOOOOOOOOOOPP)P>P@PBPEPHPJPPPPPPPQ Q"Q?QLQiQQQQQQQQQQQQQQQQQQRRRR R RR2RARIRTR}RRRRRRRRRRRRRSSSS2S5S8S9S]?]A]B]C]\]]]]]]]]^"^;^C^\^_^b^e^h^k^n^^^^^^^^^^^^^^^^^^^^_8_:_;_<_?_A_C_D_G_J_L_M_P_Q_R_k_________`=`@`B`C`D`G`I`L`M`P`S`U`V`Y`Z`[`d`}```````aFaaaaaaaaaaaaaaaabbbbbbb!b#bUbbbbbbbbbbbbbbbbc"c$c&c(c+c.c0c2coccccccccccccccccd;d=d?dAdDdGdIdKddddddddddeeeeee e"eaeceeegejemeoeqef f fffffffff f"f#f&f'f(f1fJfofrftfwfzf}ffgXg[g]g^g_gbgdggghgkgngpgqgtgugvggggggggh(hAhJhchfhihkhnhqhth}hhhhhhhhiii i i i iiiiiiiiii i)iBigijilioiriuiwij[j^j`jajbjdjfjijjjmjpjrjsjujvjwjjjjjjjjkk{k~kkkkkkkkkkkkkkkkkkkkkklyllllllllllllllllmImLmNmOmPmRmTmWmXm[m^m`mamcmdmem~mmmmmmmmno o oooooooooo o!o#o$o%o>ogojoloooqotowoypepppppppppppppppppq q2q5q7q:qxOxRxTxWxZxxxxxxxxxxxxxxxxxy)y+y-y0y3y5y7yAyVygyiykynyqyyyyyyyzzzzzz z zzzzzzzzz6zozxzzz|zzzzzzzzzzzzzzzzzz{{ { {{{"{3{5{7{:{={L{]{`{b{e{h{w{{{{{{{{{{{{{{{{{{||| | |||-|/|1|4|7|J|[|]|_|b|e||||||||||||||||||}}}}} }#}2}C}F}H}K}N}]}n}q}s}v}y}}}}}}}}}}}}}}}}}}~ ~~~~!~$~3~D~G~I~L~O~^~o~r~t~w~z~~ !$'*-0369WbktÇŇLJɇˇ͇χчӇՇׇهۇ݇߇ "%(+.147:=?ACEGIKMPRUWY[]_bdgjmpsvy|ÈƈȈʈ̈ψшԈֈوۈވ &  "$&(*,.02468;>ADGJMPSVY\_behknqtwz}ËƋɋ̋ϋҋՋ؋ۋދ  #&),/258;>ACEGIKMOQSVY[^acegikmoqsuwy{}ŒŌȌˌΌьԌ׌ڌ݌ "%(+.147@  #&),/258;>ADGJMPSVY\_behknqtwz}ŏȏˏΏяԏ׏ڏݏ "%(+.147:=@CFILORUX[^adgjmpsvy|Đǐʐ͐АӐ֐ِܐߐ !$'*-0369?@FUV^_`fuv~'(:BCDJYZbcdjyz  089JKSTU]^_ovwx*+34EFMN]^fgvw    ! " ) * : ; B C D E K S c d l m } ~          % & + , 1 2 6 7 < = B C H Z c d n o p u          ! & ' , - 2 3 8 9 > ?       # $ % ( 9 : ; ? J K P R U V W X Y J k g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[Programma'sP^submenuAction:$%*[Programma's1&')#   #!(hPas aan &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0QY`w)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5XOver X112XY287]Voorkeuren...Q,22  2kkm2!<<;"]Voorzieningenstu*>=?]Voorzieningen1x)__NSServicesMenu22  22CB_Schermvullende weergave aan/uitQa22  2UNSTag2G*F[Verberg X11Qh22GI^Verberg andere22!KZToon alles22  22ONXStop X11Qq\_NSAppleMenu-!SSR"[Programma'sTU*[Programma's1؀VW)S  S!XZPas aan...-![[Z"VWijzigZ\*1])[_^WKopieerQc  -!bba"WVenster*cav1 dgjlmpst) &'bfeUSluitQw /0bih\MinimaliseerQm 9b!k_Vergroot/verklein b   IJbon_Blader door venstersQ` PSTbrq_Blader omgekeerd door venstersQ~ b   fb!u_Alles op voorgrond^_NSWindowsMenuooq-!yyx"THelpqwxz*1z{{)oy!|XX11 Help[_NSMainMenuTmenu V^apps_separator ƀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ŀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNaamhijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView_NSPlaceholderString0AXTekstcelhikop#@*PSB1_controlTextColor+,٤/+,]NSTableColumn/GHIJKLMNRST #@U#@DZ[\]^_`adeXCommandoSK0.33333299Z[\]^ǀGHIJKLMNRST #@M@#@$Z[\]^_`adeWToetsen  [headerColorSB1C1 1Z[\]^_NSDrawsBackground hikop#@($&_controlBackgroundColor)*SL0.602715373N0.6666666667 1/1€YgridColor45SM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ȀҀDHJKMNHVNSCellɀ ʀˀ VXY W_{{15, 245}, {402, 18}}_Z`ab^c\d[efghil@nSpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀_Klik in inactieve venstersuvw[NSImageName΀XNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through ]Ԁ^copy_menu_item րDJĀ׀ ؀ـ Xm W`_{{77, 234}, {168, 26}}e`Z_^abf[dSpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀhikop WNSStateހ܀ـ!߀*_Van beeldscherm__popUpItemAction:ZOtherViews1׀ۀ)܀!ހ[256 kleuren܀!ހYDuizenden܀!ހYMiljoenen+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!JK%&!Ā .X1 W_{{18, 243}, {402, 18}}_Z`ab^c\d[efghil;Spqr!̀_.Voer identiteitscontrole uit voor verbindingen[enable_authCD DJKNOĀ׀ _{{18, 182}, {409, 23}}_Z`ab^c\d[efghilC[Spqr!̀_Schermvullende weergave_enable_fullscreencd DJKnoĀ׀  _{{37, 116}, {409, 23}}_Z`ab^c\d[efghilc{Spqr!̀_5Maak menubalk toegankelijk in schermvullende weergave_enable_fullscreen_menu  DJ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@v`_{{54, 81}, {362, 31}}Z{250, 750}Z[\]^h  @_fDe menubalk wordt zichtbaar als de muis aan de bovenkant van het primaire beeldscherm wordt geplaatst.hiklop & \controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKȀ  X VW>>@_{{18, 127}, {402, 18}}DJ AB #@}0_Z`ab^c\d[efghilSpqr!́_#Activeer toetscombinaties onder X11_enable_keyequivs D!JK!Ā  _{{18, 168}, {402, 18}}_Z`ab^c\d[efghil Spqr!́_'Sta verbindingen van netwerkclients toeZenable_tcp "DJK &  _{{18, 243}, {402, 18}}DJ1289 DF #@}E_Z`ab^c\d[efghil?Spqr!́!_Emuleer drieknopsmuis\fake_buttonsGH $(DHJKRSHĀɀ %& _{{15, 186}, {402, 18}}_Z`ab^c\d[efghilG_Spqr!́$'_Focus volgt muis_focus_follows_mousegh *.DHJKrsHĀɀ +, _{{15, 142}, {402, 18}}_Z`ab^c\d[efghilgSpqr!́*-_Focus op nieuwe vensters_focus_on_new_window 05DJK 13 2_{{18, 69}, {402, 18}}DJ8 OQ P_Z`ab^c\d[efghilSpqr!́04_'Option-toetsen versturen Alt_L en Alt_R_option_sends_alt 7S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_ {{266, 364.0390625}, {564, 341}}^X11-voorkeurenWNSPanelZ{320, 240}XW =1΁>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)1 &9HE20P)_{{36, 93}, {480, 30}}Z[\]^h C _Als u deze optie inschakelt, kan het gebruik van toetscombinaties voor menucommado's conflicteren met X11-programma's die de Meta-modifier gebruiken._{{36, 209}, {468, 30}}DJK() LM HZ[\]^h&5 G _|Houd tijdens het klikken de Option- of Command-toets ingedrukt om de middelste muisknop of de rechtermuisknop te activeren. DJBC8 IJ _{{36, 151}, {468, 30}}Z[\]^hPH K _^Maakt het mogelijk dat wijzigingen in het invoermenu de X11-toetsenbordindeling overschrijven._{{18, 185}, {402, 18}}_Z`ab^c\d[efghil9ZSpqr!́EN_$Volg toetsenbordindeling van systeem_{{36, 35}, {468, 30}}DJKgh΀ ST >Z[\]^ht2  R_zIndien ingeschakeld, worden met de Option-toetsen de X11-toetssymbolen Alt_L en Alt_R verstuurd in plaats van Mode_switch._{{18, 11}, {418, 18}}_Z`ab^c\d[efghil}Spqr!́PU_1Scrol altijd in de richting van de vingerbeweging_{{10, 33}, {518, 279}}+,/_{{13, 10}, {538, 325}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1VInvoer+,]NSTabViewItem/ ]ׁn>_Q21Ccցaei)DJ׀ bc #@K_{{17, 238}, {58, 20}}Z[\]^had XKleuren:DJف׀ fg #@x@_{{36, 216}, {392, 14}}Z[\]^he h _?Deze instelling wordt actief wanneer X11 opnieuw wordt gestart.DJ8׀ jk _{{36, 147}, {468, 31}}Z[\]^hi l _Schakelt het X11-rootvenster in. Gebruik de toetscombinatie Command + Option + A om de schermvullende weergave te starten en te stoppen._{{10, 33}, {518, 279}}WUitvoer ]p>_ X  Wq1rvz~)DJK#$Āp st p_{{18, 255}, {409, 23}}_Z`ab^c\d[efghil0Spqr!́ru_Schakel synchronisatie inDJ=>Dp wx p#@}P_{{36, 207}, {473, 42}}Z[\]^hKv  y_Schakelt het menuonderdeel 'kopieer' in en maakt synchronisatie mogelijk tussen het klembord van OS X en de CLIPBOARD- en PRIMARY-buffer van X11.DJKVWĀp {| p_{{34, 129}, {409, 23}}_Z`ab^c\d[efghilcSpqr!́z}_/Werk CLIPBOARD bij als plakbord wordt gewijzigdDJKopĀp  p_{{34, 104}, {409, 23}}_Z`ab^c\d[efghil|Spqr!́~_:Werk PRIMARY (middenklik) bij als plakbord wordt gewijzigdDJKĀp  p_{{34, 79}, {486, 18}}_Z`ab^c\d[efghilSpqr!́_FWerk plakbord onmiddellijk bij wanneer nieuwe tekst wordt geselecteerdDJKĀp  p_{{34, 192}, {409, 23}}_Z`ab^c\d[efghilSpqr!́_/Werk plakbord bij als CLIPBOARD wordt gewijzigdDJp  p#@|_{{48, 158}, {461, 28}}Z[\]^h  _oSchakel deze optie uit als u xclipboard, klipper of een ander programma voor X11-klembordbeheer wilt gebruiken.DJp  p_{{48, 47}, {461, 28}}Z[\]^h  _bVanwege beperkingen in het X11-protocol werkt deze optie mogelijk niet altijd in alle programma's._{{10, 33}, {518, 279}}XPlakbordH ]Ɂ>_1@Ggȁ$*)DHJ  H ɀ  #@}_{{33, 210}, {481, 31}}Z[\]^h   _zIndien ingeschakeld, wordt een muisklik in een inactief venster toegepast in dat venster en wordt het venster geactiveerd.DHJ  H ɀ  _{{33, 166}, {481, 16}}Z[\]^h '  _LFocus van het X11-venster volgt de aanwijzer. Dit heeft ongewenste effecten.DHJ 3 4H ɀ  _{{33, 96}, {481, 42}}Z[\]^h @  _Indien ingeschakeld, wordt bij aanmaak van een nieuw X11-venster X11.app op de voorgrond geplaatst (in plaats van Finder.app, Terminal.app, enz.)._{{10, 33}, {518, 279}}XVensters! H]> 1 L O P Q)D!J \ ]!8  _{{36, 183}, {468, 56}}Z[\]^h O i  _Wanneer u X11 start, worden er Xauthority-toegangscontrolesleutels aangemaakt. Als het IP-adres van het systeem wordt gewijzigd, worden deze toetsen ongeldig waardoor het mogelijk is dat X11-programma's niet kunnen worden gestart.D!J v w!8  _{{36, 107}, {468, 56}}Z[\]^h P   _Als u deze optie inschakelt, moet 'Voer identiteitscontrole uit voor verbindingen' ook worden ingeschakeld ter beveiliging van het systeem. Als deze optie is uitgeschakeld, worden verbindingen van externe programma's niet toegestaan.D!J  !   #@y_{{17, 17}, {404, 14}}Z[\]^h Q   _BDeze instellingen worden actief wanneer X11 opnieuw wordt gestart._{{10, 33}, {518, 279}}[Beveiliging+, YNSTabView /Z{564, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard9 E€[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D AЀ_toggle_fullscreen_item? 4Ҁ^x11_about_item  t ԁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector g ׁ_minimize_window:?  4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  E݁Uhide:J # M߁Zterminate:G ) H_hideOtherApplications:H / J_unhideAllApplications: 4 ]Ucopy: : d ]close_window: @ j \zoom_window: D F  D I J*JK  R S*_NSHuggingPriority   X ^ bW 4I_{{340, 191}, {100, 32}}_Z`ab^\d[efgh e h D j kqp@ !ЀYDupliceer_apps_table_duplicate: q s  D I J*JK  } ~*  _{{340, 159}, {100, 32}}_Z`ab^\d[efgh e h q kqp!ЀYVerwijder_apps_table_delete: W _apps_table_show:  D I J*JK   *  _{{340, 223}, {100, 32}}_Z`ab^\d[efg e h kqp!ЀXVoeg toe_apps_table_new:  ^prefs_changed:  ^prefs_changed:9 E ^prefs_changed:  ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:C  _enable_fullscreen_changed:D A _toggle_fullscreen:@ Ȁ ^prefs_changed:G  $ ^prefs_changed:g * ^prefs_changed:  r ^prefs_changed:  z  ^prefs_changed:  ~ "^prefs_changed: $  $^prefs_changed: *  &^prefs_changed:c 0  (^prefs_changed: 6 0 *^prefs_changed: < P ,^prefs_changed:1 @ ٯ A'2?@ABkCDEFGHIJ()*  +o{ &2C9)hCOco$>WpH@N GS gs 4!& O ] P w Q * D S q ~BPCD(2 .-02469:<@ADEHJLMQSVWY[]`bdgjlmpstwy{ 7<>Z BFHJEM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&'G& (/]NSApplication *    12KL J3:! _{{302, 440}, {454, 271}}_X11-programmamenuZ{320, 240}1 D q 򀊁)1 (2<@)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Ԁ)_{{1, 1}, {301, 28}}  J    _NSControlTarget_NSControlAction? =>>_{{1, 215}, {301, 15}}\_doScroller:+, & 'ZNSScroller &;/  J  2  ? A>>_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 < ١ =DG @ A B C D E F   I_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, L M_NSPanGestureRecognizer N O/_NSPanGestureRecognizer_NSGestureRecognizer+, Q/+, S T\NSScrollView S/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 Z ٯ'2222B22222222()*        +o&9CcH@HHGHHgH!!! O! P! Q * D* q*BCD* -02222:22222222-QSS-Y[-`bbbbbbbb-wy7<>ZHE20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀊##G1 ٯ A'2?@ABkCDEFGHIJ()*  +o{ &2C9)hCOco$>WpH@N GS gs 4!& O ] P w Q * D S q ~BPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:<@ADEHJLMQSVWY[]`bdgjlmpstwy{ 7<>Z BFHJEM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀊀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 ٯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ٠G+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~ ')+-/13DM\ckt{ "$&(*,.04EGIKMVoqsuwy{}!#%&(*+-/\^`bdfhjln| "$&(*LNwy{|~-/13579Dmoqrtvwy{ *38:<>giklnpqsu79;=?ACKMz|~ /13579;HJkmoqsuw)+02468:[] "$)68:<EHJLmoqsuwy!=Snz<Wu'1Wf PZcq{)ABDFHIKMOQS%')*,.024#57:<?AFIRT]^adgikn    , 7 F U ] h i k m v x z { !!!!&!>!E!N!P!R!T!V!k!t!!!!!!!!!!!!!!!!""2";"H"M"V"i"n""""""""""""""# #######$#6#K#X#m#p#t#v#x########5D5M5Z5_5l5u555555566 666666666&676@6C6E6G6H6U6X6Z6o6q6s6u6w66666666666666677 7"7$7&7(717>7J7L7u7w7y7{7}7777777777777777777888888$898<8@8B8D8q8888888888888888888899 999 9597999;9=9G9\9j9p9r9t9}9999999999:#:*:,:-:.:0:2:4:6:7:9:;:=:>:@:A:B:k:m:p:q:t:w:y:{:}::::;; ;3;E;W;f;h;m;r;t;v;x;z;|;~;;;;;;;;;;;;;;<<<<$<2>> >>>>>>>>!>#>%>'>8>;>=>?>p>x>z>|>~>>>>>>>>>>>>>>>>>>>???????!?#?%?'?3?`?b?d?f?h?j?l?n?p?r?|???????????????@@@"@(@=@?@A@C@E@G@V@k@m@o@q@s@u@@@@@@@@@@@@@@A0A2A3A4A6A8A:A;A=A?AAABADAEAFAoAqAtAuAxA{A}AAAAAAAAAAABB$B9B;B=B?BABCBBBBBBBBBBBBBBBBC CCCCCCCC4CHC]C_CaCcCfChCCCCCCCCCCCCCCCCD2D4D6D8D:D=D?DADyDDDDDDDEE6E^EzE}EEEEEEEEEEEEEEEEEEEEEEEEEFeFvFyF{F}FFFFFFFFFFFFFGGGGfGhGiGjGmGoGqGrGuGxGzG{G~GGGGGGGGGGGGGGGHQHTHVHWHXH[H]H`HaHdHgHiHjHmHnHoHxH{HHHHHHHHHIIIIII"I$IIIIIIIIIIIIIIIIIIIIIIIIJ)J4JIJKJMJPJSJUJJJJJJJJJJJJJJJJJKUKXKZK[K\K_KaKdKeKhKkKmKnKqKrKsK|KKKKKKKKKKKLL L LLLLoLqLrLsLuLwLyLzL}LLLLLLLLLLLLLLLMMM-M/M1M4M7M9MMMMMMMMMMMMMMMMNNNN N NNNN/NENZN\N^NaNdNfNNNNNNNNNNNNNNNNNOeOhOjOkOlOoOqOtOuOxO{O}O~OOOOOOOOOOOOOPP'P)P+P.P1P3PPPPPPPPQ Q(Q5QRQkQ}QQQQQQQQQQQQQQQQQQQQQQRR*R2R=RfRhRkRlRoRqRsRuRxRRRRRRRSSSS!S"S%S(S*S-S0S3S5S6S9S;S=S>SGSJSMSOSXSkSnSqStSwSzS}SSSSSSSSSSSSSTsTTTTTTTTTTTTUUUUUU1U4U6U9U;U>UAUCUV-V0V2V3V4V7V9V`?`B`C`D`M`f```````a/aaaaaaaaaaaaaaaaaabbbbb b b>bbbbbbbbbbbbbbbbc c cccccccXccccccccccccccccd$d&d(d*d-d0d2d4d}ddddddddddddddde eJeLeNePeSeVeXeZeeeeeeeeffff f f fffff3fXf[f]f`fcfffhfgAgDgFgGgHgKgMgPgQgTgWgYgZg]g^g_gwggggggghh*h3hLhOhRhThWhZh]hfhshuhxh{h~hhhhhhhhhhhhhiiiiii ii+iPiSiUiXi[i^i`ijDjGjIjJjKjMjOjRjSjVjYj[j\j^j_j`jyjjjjjjjjkdkgkikjkkkmkokrkskvkyk{k|k~kkkkkkkkkklbl{lllllllllllllllm2m5m7m8m9m;m=m@mAmDmGmImJmLmMmNmgmmmmmmmmnnnnnnnnooooo o o o oo'oPoSoUoXoZo]o`obpNppppppppppppppppppqqq q#q%q(q+q-qrqqqqqqqqrrrrr2r7rCrXrZr\r_rbrdrrrrrrrrrrrrrrrssss s ss!s6s8s:s=s@sBsasvsxszs}sssssssssssssssstttt t#t&t(t3tHtJtLtNtQtStltttttttttttttttttuuuuuu-u>u@uBuEuHuhuyu{u}uuuuuuuuuuuuuuuuuuuuv vvvv"v%v>vKvMvPvSvYvjvlvnvqvtvvvvvvvvvvvvw%w9ww?w@wCwEwGwHwKwNwPwQwTwUwVwYwwwwwwwwwwwwwwwwwxxxxx'x8x;x=x@xCxxxxxxxxxxxxxxxxxyyyyyyy y*y?yPyRyTyWyZymy~yyyyyyyyyyyyyyyyzzzzzzXzazczezhzkzmzozxzzzzzzzzzzzzzzzzzz{ {{{ {#{&{5{F{I{K{N{Q{`{q{s{u{x{{{{{{{{{{{{{{{{{{{{|||||| |3|D|F|H|K|N|k|||~||||||||||||||||}}}} } }},}/}1}4}7}F}W}Z}\}_}b}q}}}}}}}}}}}}}}}}}}~~~~ ~ ~~-~0~2~5~8~G~X~[~]~`~c~r~{ "%(+.147:=@CEGIKMOQSVY\_acehknqtwz}€ŀȀˀ΀рԀր؀ڀ݀ !$&(*,.03@BDFHKMPSVY\_behknqtwz}ˆĈLjɈ̈ψ҈Ո؈ۈ݈߈ҊԊ׊يۊ݊ߊ !$'*-0369ADGJMPSVY\_behknqtwz}ŐȐːΐѐԐאڐݐ "%(+.147:=@CFILORUX[^adgjmpsvy|‘đƑȑʑ̑ΑБґԑ֑ؑڑܑޑ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~’ĒƒȒʒ̒ΒВҒԒ֒ؒڒܒޒ  "$&(*,.0246?@BKLOXglxorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/Localizable.strings0000644000175000017500000001072014757411105023242 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Weet u zeker dat u wilt stoppen met X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Alle geopende X11-programma's worden onmiddellijk gestopt en alle niet-bewaarde wijzigingen gaan verloren."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "RandR-modus activeren?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Een programma heeft X11 verzocht om de resolutie van uw beeldscherm te wijzigen. X11 herstelt de vorige staat van het beeldscherm wanneer het programma dat om de wijziging heeft gevraagd verzoekt om de vorige staat te herstellen. U kunt ook de toetscombinatie #%#A gebruiken om X11 te vorige staat te laten herstellen."; /* No comment provided by engineer. */ "Allow" = "Sta toe"; /* No comment provided by engineer. */ "Always Allow" = "Sta altijd toe"; /* No comment provided by engineer. */ "Cancel" = "Annuleer"; /* No comment provided by engineer. */ "Mac Help" = "Mac Help"; /* No comment provided by engineer. */ "Quit" = "Stop"; /* No */ "No" = "Nee"; /* Yes */ "Yes" = "Ja"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Het bestand ~/.xinitrc bestaat al.\n\nVensters die door X11-programma's worden weergegeven hebben mogelijk geen titelbalken of kunnen er anders uitzien dan systeemeigen programma's.\n\nWilt u het bestaande bestand negeren en de standaard-X11-omgeving gebruiken als u X11 de eerstvolgende keer start?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Zoek naar X11-updates..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist0000644000175000017500000000061014757411105022643 LprojCompatibleVersion 106.3 LprojLocale nl LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/0000755000175000017500000000000014757411135017022 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/main.nib/0000755000175000017500000000000014757411135020515 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/main.nib/designable.nib0000644000175000017500000021660314757411105023231 Όταν ενεργοποιηθεί, τα ισοδύναμα πλήκτρα της γραμμής μενού ίσως να παρεμβαίνουν με εφαρμογές X11 που χρησιμοποιούν τον μετατροποποιητή. Πατήστε παρατεταμένα το πλήκτρο Option ή Command ενώ κάνετε κλικ για να ενεργοποιήσετε το μεσαίο ή το δεξιό κουμπί του ποντικιού. Ενεργοποιεί το παράθυρο ρίζας X11. Χρησιμοποιήστε την κίνηση πλήκτρων Command-Option-A για να εισέλθετε και να εξέλθετε από τη λειτουργία πλήρους οθόνης. Ενεργοποιεί το στοιχείο μενού «αντιγραφή» και επιτρέπει το συγχρονισμό μεταξύ του Πίνακα επικόλλησης OSX και των ενδιάμεσων μνημών CLIPBOARD και PRIMARY του X11. Απενεργοποιήστε αυτή την επιλογή αν θέλετε να χρησιμοποιήσετε xclipboard, klipper ή οποιονδήποτε άλλο διαχειριστή πρόχειρου X11. Όταν ενεργοποιηθεί, αν κάνετε κλικ σε μη ενεργό παράθυρο, θα προκαλέσει αυτό το κλικ ποντικιού να διαβιβαστεί στο συγκεκριμένο παράθυρο επιπλέον της ενεργοποίησής του. Όταν ενεργοποιηθεί, η δημιουργία νέου παραθύρου X11 θα μετακινήσει το X11.app στο προσκήνιο (αντί για το Finder.app, Terminal.app, κτλ.) Η εκκίνηση X11 θα δημιουργήσει πλήκτρα ελέγχου πρόσβασης Xauthority. Αν αλλάξει η διεύθυνση IP του συστήματος, αυτά τα πλήκτρα καθίστανται μη έγκυρα, γεγονός που ίσως να αποτρέψει την εκκίνηση των εφαρμογών X11. Αν ενεργοποιηθεί, πρέπει επίσης να ενεργοποιηθούν οι συνδέσεις ελέγχου ταυτότητας για να διασφαλιστεί η ασφάλεια συστήματος. Όταν απενεργοποιηθούν, δεν επιτρέπονται οι συνδέσεις από απομακρυσμένες εφαρμογές. xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/main.nib/keyedobjects.nib0000644000175000017500000014041514757411105023604 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  $)*/45 :>?EU^_tuyz}  -67?@AGVW_`agvw();CDEKZ[cdekz{  078JKRST\]^nuvw &'/0@AHIXYabqrz{     % & 6 7 > ? @ A G O _ ` g h y z          % & + , 0 1 6 7 < = B T ] ^ h i j o           ! & ' , - 2 3 8 9       " 3 4 5 9 D E J L O P Q R S  e h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*e1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iP^submenuAction:$%*i1&')#   #!(k &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5o   X112XY287n...Q,22  2kkm2!<<;"istu*>=?i1x)__NSServicesMenu22  22CBo  Qa22  2UNSTag2G*Fl X11Qh22GIn 22!Km 22  22ONo X11Qq\_NSAppleMenu-!SSR"iTU*i1؀VW)S  S!Xk &-![[Z"k\]*k1^)[`_iQc  -!ccb"h*edxh1 !"filnoruv) ()chghQw 12ckjnQm ;c!md c   KLcqpo   Q` RUVctso*    Q~ c   hc!wo    ^_NSWindowsMenuqqs-!{{z"gxy|}*g1}~~)q{!o   X11[_NSMainMenuTmenu V^apps_separator ʀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ɀR@#@ŀ#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@emnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView0Am mnptu#@*XB1_controlTextColor+,ۤ/+,]NSTableColumn/LMNOPQRSWXY #@X#@D_`abcdefijWCommandXK0.33333299_`abcʀm LMNOPQRSWXY #@Q#@$_`abcdefijj [headerColorXB1C1 1_`abc_NSDrawsBackground €m mnp !tu#@(&(À_controlBackgroundColor+,XL0.602715373N0.6666666667 113ƀYgridColor67XM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ̀րFJLNOJVNSCell̀ ΀π WYZ [_{{15, 245}, {402, 18}}`_abccdae`fghijmBoXqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo#    vwx[NSImageNameҀXNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton=/]click_through ^؀^copy_menu_item ڀFȀۀ ܀݀ Yq [d_{{89, 233}, {175, 26}}fa_`cbcg`eXqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހmnptu WNSState݀!*o  __popUpItemAction:ZOtherViews1؀߀)!k256 !h!k+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F"L&'"Ȁ /Y2 [_{{18, 243}, {402, 18}}`_abccdae`fghijm<Xqrs!рo  [enable_authDE FLOPȀۀ _{{18, 182}, {409, 23}}`_abccdae`fghijmD\Xqrs!рo  _enable_fullscreende FLopȀۀ  _{{37, 94}, {552, 34}}`_abccdae`fghijmd|Xqrs!сoH          _enable_fullscreen_menu F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@_{{54, 57}, {543, 31}}Z{250, 750}_`abci  @ol                 .mnpqtu (\controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLɀ  Y !Z[BBD_{{18, 129}, {402, 18}}F  EF #@4`_abccdae`fghijmXqrs!сo+     X11_enable_keyequivs F"L"Ȁ  _{{18, 166}, {402, 18}}`_abccdae`fghijm Xqrs!сo-     Zenable_tcp !&FL !' "$ #_{{18, 243}, {402, 18}}F239:  HJ #@I`_abccdae`fghijm@Xqrs!с!%o$   \fake_buttonsHI (,FJLSTJȀ̀ )* _{{15, 187}, {402, 18}}`_abccdae`fghijmH`Xqrs!с(+o  _focus_follows_mousehi .2FJLstJȀ̀ /0 _{{15, 143}, {402, 18}}`_abccdae`fghijmhXqrs!с.1o   _focus_on_new_window 49FL 57 6_{{18, 71}, {402, 18}}F  SU T`_abccdae`fghijmXqrs!с48o+ Alt_L  Alt_R   Option_option_sends_alt ;X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask<=@ ?@x>!_ {{266, 364.0390625}, {640, 341}}o X11WNSPanelZ{320, 240}Y[ A1ρB)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \@@ C 1)1 ':!#LI64T)_{{35, 95}, {545, 28}}_`abci Go ,            X11    ._{{36, 209}, {544, 28}}FL() PQ L_`abci'5# Ko    Option  Command              . FABH  MN #@@_{{35, 153}, {544.53125, 28}}_`abciPL Oo]       X11     ._{{18, 187}, {402, 18}}`_abccdae`fghijm:YXqrs!сIRo+   _{{35, 34}, {545, 31}}FLfgπ WX B_`abcis6 Vol ,   Option     X11 Alt_L  Alt_R   Mode_switch._{{18, 10}, {527.0390625, 18}}`_abccdae`fghijm|Xqrs!сTYoD          _{{10, 33}, {594, 279}}+,/_{{13, 10}, {614, 325}}1^bs)VNSViewYNSTabView\NSIdentifiera`B_Q1g+,]NSTabViewItem/aہrBcQ21Ddځeim)F ۀ fg #@P_{{17, 238}, {70, 17}}_`abciehh:Fׁ ۀ jk #@x@_{{36, 216}, {392, 14}}_`abcii lo4         X11.F ۀ no _{{36, 134}, {543, 42}}_`abcim po    X11.     Command-Option-A           ._{{10, 33}, {594, 279}}fatBcY [u1 vz~)FL Ȁt wx t_{{18, 255}, {409, 23}}`_abccdae`fghijm,Xqrs!сvyo F9: t {| t_{{36, 221}, {543, 28}}_`abciFz }o             OSX     CLIPBOARD  PRIMARY  X11.FLQRȀt  t_{{34, 139}, {421, 18}}`_abccdae`fghijm^Xqrs!с~o6 CLIPBOARD     FLjkȀt  t_{{34, 117}, {493, 18}}`_abccdae`fghijmwXqrs!сoB PRIMARY ( )     FLȀt  t_{{34, 92}, {458, 18}}`_abccdae`fghijmXqrs!сo=       FLȀt  t_{{34, 197}, {420, 18}}`_abccdae`fghijmXqrs!сo6      CLIPBOARDF t  t#@x_{{48, 163}, {531, 28}}_`abci o        xclipboard, klipper      X11.Fׁ t  t#@_{{48, 60}, {536, 28}}_`abci ok    X11,           ._{{10, 33}, {594, 279}}o JáBc1BHh́(.)FJJ  ̀  #@H_{{23, 211}, {557, 28}}_`abci  o ,       ,               .FJ  J  ̀  _{{23, 167}, {557, 14}}_`abci # oW   X11   .     .FJ / 0J  ̀  _{{23, 109}, {557, 28}}_`abci < o ,     X11    X11.app   (   Finder.app, Terminal.app, .)_{{10, 33}, {594, 279}}h" DaB1 H K L M)F" X Y"   _{{36, 181}, {543, 56}}_`abci K e o  X11      Xauthority.     IP  ,      ,          X11.F" q r" x   #@_{{36, 104}, {537, 56}}_`abci L  o ,              .  ,       .F"  "    #@{_{{17, 17}, {436, 14}}_`abci M  oJ            X11._{{10, 33}, {594, 279}}h+, YNSTabView /Z{640, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard: Iƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ہ_minimize_window:? 4݁_orderFrontStandardAboutPanel:@  6 ߁[prefs_show:F  EUhide:J  MZterminate:G # H_hideOtherApplications:H ) J_unhideAllApplications: . ^Ucopy: 4 f ]close_window: : l \zoom_window: > @  F C D/L  L M/_NSHuggingPriority    Y X \[ 8M_{{344, 191}, {172, 32}}`_abccae`fghi _ b > d erq@ !Ԁi_apps_table_duplicate: k m  F C D/L  w x/   _{{344, 159}, {172, 32}}`_abccae`fghi _ b k erq!Ԁh_apps_table_delete: W _apps_table_show:  F C D/L   /   _{{344, 223}, {172, 32}}`_abccae`fgh _ b erq!Ԁo _apps_table_new: ! ^prefs_changed:  ^prefs_changed:: I ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:D _enable_fullscreen_changed:D A _toggle_fullscreen:B ̀ ^prefs_changed:H ( ^prefs_changed:h  .  ^prefs_changed: v "^prefs_changed:  ~ $^prefs_changed:   &^prefs_changed:   (^prefs_changed: $  *^prefs_changed:d *  ,^prefs_changed: 0 4 .^prefs_changed: 6 T 0^prefs_changed:1 : ӯ ;'2?@ABkCDEFGHIJ()*  !"+q~!'3B:)gDPdp :RkJBOHT ht 0"' K Y L r M / > M k xGUHI-7 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$F#JLNIQ6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication /    56OP N7>! _{{302, 440}, {530, 271}}o  X11Z{320, 240}1 > k )1 -7@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $     _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+, !ZNSScroller =/    ,  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 6 ӡ 7HK : ; < = > ? @   C_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, F G_NSPanGestureRecognizer H I/_NSPanGestureRecognizer_NSGestureRecognizer+, K/+, M N\NSScrollView M/Z{530, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 T ӯ'2222B22222222()*        +q':DdJBJJHJJhJ""" K" L" M / >/ k/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{;@B^!#LI64TBbۀڀ݀ہeہiۀہہmہBstvtzt~tttttB̀̀́́(́́.́B4##K1 ӯ ;'2?@ABkCDEFGHIJ()*  !"+q~!'3B:)gDPdp :RkJBOHT ht 0"' K Y L r M / > M k xGUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$F#JLNIQ6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ӯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ӠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u       ! # % ' P ^ e y   - ; = ? A C E G O a n y      $ / 4 a j t }  !#DFHJLNPgp  ACEGIKMOQSWhjlnpy%')+-/1NPy{}~#LNPQSUVXZ{}!#%')+-/HJkmoqsuw   8:<>@BDegt)+-.02357XZ\^`bd{  ,.02468KMz|~ 13TVXZ\^`} Z\}?ACEGIK68:<>@Biuzjw (>Ye~'B`tBQk PZcq{)ABDFHIKMOQS % ' ) * , . 0 2 4 !!#!5!7!:!;M;O;Q;f;h;j;l;n;x;;;;;;;;;;;;;;;;>>>>>(>>>C>L>Y>b>k>t>>>>>>>>>>>>>>>?5?7?8?9?;?=???@?B?D?F?G?I?J?K?t?v?y?z?}??????@@@'@D@O@a@c@e@j@s@u@v@w@x@z@|@~@@@@@@@@@@@@@@@@@@@@AA+A6A?AHAJALANAPARAAAAAAAAAAAAAAAAAAAAAAB%B'B)B+B-B/B1B3B5B7BNBWBkBxBBBBBBBBBBBBBBBBBBCCCC!C#C%C'C?CTCVCXCZC\C^CCCCCCCCCCCCCCCCCCCDDDDD D#DbDdDfDhDjDlDnDpDDDDDDDDE2E4E5E6E8E:ELALDLFLHLLLLLLLLM0M2M3M4M6M8M:M;M>MAMCMDMFMGMHMaMMMMMMMMN NN-N/N1N4N7N9NNNNNNNNNNNNNNNNNO9OO?O@OCOEOHOIOLOOOQOROUOVOWO`OcOOOOOOOOOP PP!P#P&P)P+PPPPPPPPPPPPPPPPPPPPPQQQQ;QQQfQhQjQmQpQrQQQQQQQQQQQQQQQQR=R?RARCRFRIRKRMR~RRRRRRRSSSSSSSS S#S&S(S)S,S-S.S1SISSSSSSSSSSSSSSSSSTTTTTT T"T$T}TTTTTTTUU U-U;UEURU\UrUUUUUUVVVV2VFVIVKVNVQVTVWVZV[V^VaVdVgVjVoVrVtVvVVVVVVVVVWWWWWWWWWdW|WWWWWWWWWWWWWWWWWWWWWWWWWXXXX X XXXXX0XUXXXZX]X`XcXeYvYYYYYYYYYYZZZZZZZ Z0Z3Z5Z8Z;Z>Z@[G[[[[[[[[[[[[[[[[[[[\ \#\%\(\+\.\0\]]E]G]I]K]N]Q]S]U]]^%^'^(^)^,^.^0^1^4^7^9^:^=^>^?^B^g^j^l^o^r^u^w_R_r________`L`e`n`u````````````````````a aa$a)aBaEaHaJaMaPaSaUa^amaoarauawaza}aaaaaaaaaaaaabbbbbbb&bKbNbPbRbUbXbZbkbbbbbbbbbbbbbbbbbcc5c8c:c=c@cCcEcdddddd d"d%d&d)d,d.d/d1d2d3dLdqdtdvdyd|ddeeeeeeeffff0f2f5f6f9ff@fBfKf\f_fbfefhfkfnfqftfvfffffffffffffffggCgEgGgIgLgOgQgSgggggggggghhhhh h h h&hKhNhPhShVhYh[iiiiijjjjj j jjjjjj.jmjojqjsjvjyj{j}jkGkIkJkKkNkPkRkSkVkYk[k\k_k`kakzkkkkkkkklPllllllllllllllllmmm m"m%m(m*m,mnnnnn n nnnnnnnnnn7nvnxnzn|nnnnno\o_oaobocofohokolooorotouoxoyozooooooooopq;q>q@qAqBqEqGqJqKqNqQqSqTqWqXqYqbqzqqqqqqqrrrrrrrrrrrs s sssssssssssssssssssssssssssssssuHuuuuuuuuuuuuuuuuuv v vvvvvvw1w4w6w7w8w:w|c|f|h|k|n|q|s~~{~~~~~~~~~~~~~~~~~~~~~~~~~&-6INZoqsvy{؀!$&8MOQTWYxˁ́ρҁՁׁ 357:=?J_acehjÂłǂʂ͂߂')+.1DUWY\_ǃ؃ڃ܃߃!2469@Qfwy{~!#$'(),Fψ %69;>APacehkzω "357:=J[]_bexÊŊȊˊ  #&5FIKNQ`qtvy|Njʋ̋ϋҋ  "%(7HKMPSbsvx{~ !#%')+-/13579;=?ADGJMPSVY\_behknqtwz}Ďǎʎ͎Ўӎ֎َ܎ߎ !$'*-0369@BDFHJLNQTVXZ\^`cl/1468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~Ùƙșʙ̙ΙЙҙԙ֙ٙܙߙ "%(+.1357:=@CFILORUXZ\^adgjmpsvy|šĚƚȚʚ̚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|KNQSVY\_behknqtwz}ŝȝ˝Νѝԝםڝݝ "%(+.147:=@CFILORUX[^adgjmpsvy|ĞǞʞ͞ОӞ֞ٞܞߞ !$'*-0369GNOPXYZcjklvw{|?@CI\ijtuyoV "'(-23 8<=CT]^stxy| ,56>?@FUV^_`fuv~'(:BCDJYZbcdjyz /67IJQRS[\]mtuv~ %&./?@GHWX`apqyz     $ % 5 6 = > ? @ F N ^ _ f g x y          $ % * + / 0 5 6 ; < A S \ ] g h i n ~            % & + , 1 2 7 8       ! 2 3 4 8 C D I K N O P Q R J d g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*e1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iP^submenuAction:$%*i1&')#   #!(k &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5o   X112XY287n...Q,22  2kkm2!<<;"istu*>=?i1x)__NSServicesMenu22  22CBo  Qa22  2UNSTag2G*Fl X11Qh22GIn 22!Km 22  22ONo X11Qq\_NSAppleMenu-!SSR"iTU*i1؀VW)S  S!Xk &-![[Z"k\]*k1^)[`_iQc  -!ccb"h*edxh1 !"filnoruv) ()chghQw 12ckjnQm ;c!md c   KLcqpo   Q` RUVctso*    Q~ c   hc!wo    ^_NSWindowsMenuqqs-!{{z"gxy|}*g1}~~)q{!o   X11[_NSMainMenuTmenu V^apps_separator ʀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ɀR #@ŀ#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@eklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0Am klnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghWCommandVK0.33333299]^_`aȀm JKLMNOPQUVW #@M@#@$]^_`abcdghj  [headerColorVB1C1 1]^_`a_NSDrawsBackground €m klnrs#@($&À_controlBackgroundColor)*VL0.602715373N0.6666666667 1/1ƀYgridColor45VM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ̀րDHJKMNHVNSCell̀ ΀π VXY [_{{15, 245}, {402, 18}}_]`abac_d^efghil@nVpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo#    uvw[NSImageNameҀXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through ^؀^copy_menu_item ڀDJǀۀ ܀݀ Xq [d_{{89, 233}, {175, 26}}e`]_aabf^dVpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހklnrs WNSState݀!*o  __popUpItemAction:ZOtherViews1׀߀)!k256 !h!k+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!JK%&!ǀ .X1 [_{{18, 243}, {402, 18}}_]`abac_d^efghil;Vpqr!рo  [enable_authCD DJKNOǀۀ _{{18, 182}, {409, 23}}_]`abac_d^efghilC[Vpqr!рo  _enable_fullscreencd DJKnoǀۀ  _{{37, 94}, {552, 34}}_]`abac_d^efghilc{Vpqr!сoH          _enable_fullscreen_menu DJ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@_{{54, 57}, {543, 31}}Z{250, 750}]^_`ah  @ol                 .klnors &\controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKȀ  X !Z[BBD_{{18, 129}, {402, 18}}DJ  EF #@4_]`abac_d^efghilVpqr!сo+     X11_enable_keyequivs D!JK!ǀ  _{{18, 166}, {402, 18}}_]`abac_d^efghil Vpqr!сo-     Zenable_tcp !&DJK & "$ #_{{18, 243}, {402, 18}}DJ1289  HJ #@I_]`abac_d^efghil?Vpqr!с!%o$   \fake_buttonsGH (,DHJKRSHǀ̀ )* _{{15, 187}, {402, 18}}_]`abac_d^efghilG_Vpqr!с(+o  _focus_follows_mousegh .2DHJKrsHǀ̀ /0 _{{15, 143}, {402, 18}}_]`abac_d^efghilgVpqr!с.1o   _focus_on_new_window 49DJK 57 6_{{18, 71}, {402, 18}}DJ  SU T_]`abac_d^efghilVpqr!с48o+ Alt_L  Alt_R   Option_option_sends_alt ;V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask<=@ ?@x>!_ {{266, 364.0390625}, {640, 341}}o X11WNSPanelZ{320, 240}X[ A1΁B)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \@@ C 1)1 &9!#LI64T)_{{35, 95}, {545, 28}}]^_`ah Go ,            X11    ._{{36, 209}, {544, 28}}DJK'( PQ L]^_`ah&4# Ko    Option  Command              . DJ@AG  MN #@@_{{35, 153}, {544.53125, 28}}]^_`ahOL Oo]       X11     ._{{18, 187}, {402, 18}}_]`abac_d^efghil9XVpqr!сIRo+   _{{35, 34}, {545, 31}}DJKef΀ WX B]^_`ahr6 Vol ,   Option     X11 Alt_L  Alt_R   Mode_switch._{{18, 10}, {527.0390625, 18}}_]`abac_d^efghil{Vpqr!сTYoD          _{{10, 33}, {594, 279}}+,/_{{13, 10}, {614, 325}}1^bs)VNSViewYNSTabView\NSIdentifiera`B_Q1g+,]NSTabViewItem/aہrBcQ21Ccځeim)DJ ۀ fg #@P_{{17, 238}, {70, 17}}]^_`ahehh:DJց ۀ jk #@x@_{{36, 216}, {392, 14}}]^_`ahi lo4         X11.DJ ۀ no _{{36, 134}, {543, 42}}]^_`ahm po    X11.     Command-Option-A           ._{{10, 33}, {594, 279}}fatBcX [u1  vz~)DJKǀt wx t_{{18, 255}, {409, 23}}_]`abac_d^efghil +Vpqr!сvyo DJ89 t {| t_{{36, 221}, {543, 28}}]^_`ahEz }o             OSX     CLIPBOARD  PRIMARY  X11.DJKPQǀt  t_{{34, 139}, {421, 18}}_]`abac_d^efghil]Vpqr!с~o6 CLIPBOARD     DJKijǀt  t_{{34, 117}, {493, 18}}_]`abac_d^efghilvVpqr!сoB PRIMARY ( )     DJKǀt  t_{{34, 92}, {458, 18}}_]`abac_d^efghilVpqr!сo=       DJKǀt  t_{{34, 197}, {420, 18}}_]`abac_d^efghilVpqr!сo6      CLIPBOARDDJ t  t#@x_{{48, 163}, {531, 28}}]^_`ah o        xclipboard, klipper      X11.DJց t  t#@_{{48, 60}, {536, 28}}]^_`ah ok    X11,           ._{{10, 33}, {594, 279}}o HáBc1@Gǵ(.)DHJH  ̀  #@H_{{23, 211}, {557, 28}}]^_`ah  o ,       ,               .DHJ  H  ̀  _{{23, 167}, {557, 14}}]^_`ah " oW   X11   .     .DHJ . /H  ̀  _{{23, 109}, {557, 28}}]^_`ah ; o ,     X11    X11.app   (   Finder.app, Terminal.app, .)_{{10, 33}, {594, 279}}h! CaB1 G J K L)D!J W X!   _{{36, 181}, {543, 56}}]^_`ah J d o  X11      Xauthority.     IP  ,      ,          X11.D!J p q! w   #@_{{36, 104}, {537, 56}}]^_`ah K ~ o ,              .  ,       .D!J  !    #@{_{{17, 17}, {436, 14}}]^_`ah L  oJ            X11._{{10, 33}, {594, 279}}h+, YNSTabView /Z{640, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard9 Iƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ہ_minimize_window:? 4݁_orderFrontStandardAboutPanel:@  6 ߁[prefs_show:F  EUhide:J  MZterminate:G " H_hideOtherApplications:H ( J_unhideAllApplications: - ^Ucopy: 3 f ]close_window: 9 l \zoom_window: = ?  D B C-JK  K L-_NSHuggingPriority    X W [[ 8M_{{344, 191}, {172, 32}}_]`aba_d^efgh ^ a = c dqp@ !Ԁi_apps_table_duplicate: j l  D B C-JK  v w-   _{{344, 159}, {172, 32}}_]`aba_d^efgh ^ a j dqp!Ԁh_apps_table_delete: W _apps_table_show:  D B C-JK   -   _{{344, 223}, {172, 32}}_]`aba_d^efg ^ a dqp!Ԁo _apps_table_new: ! ^prefs_changed:  ^prefs_changed:9 I ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:C _enable_fullscreen_changed:D A _toggle_fullscreen:@ ̀ ^prefs_changed:G ( ^prefs_changed:g  .  ^prefs_changed: v "^prefs_changed:  ~ $^prefs_changed:   &^prefs_changed:   (^prefs_changed: #  *^prefs_changed:c )  ,^prefs_changed: / 4 .^prefs_changed: 5 T 0^prefs_changed:1 9 ү :'2?@ABkCDEFGHIJ()*  !"+q~ &2A9(fCOco 9QjH@NGS gs /!& J X K q L - = L j wESFG+5 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$F#JLNIQ6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication -    56OP N7>! _{{302, 440}, {530, 271}}o  X11Z{320, 240}1 = j )1 +5@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " J    _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller ;/  J  +  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 5 ҡ 6HK 9 : ; < = > ?   B_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, E F_NSPanGestureRecognizer G H/_NSPanGestureRecognizer_NSGestureRecognizer+, J/+, L M\NSScrollView L/Z{530, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 S ү'2222B22222222()*        +q&9Cc H@HHGHHgH!!! J! K! L - =- j-EFG- -02222:22222222-QSS-Y[-acccccccc-y{;@B^!#LI64TBbۀڀ݀ہeہiۀہہmہBstvtzt~tttttB̀̀́́(́́.́B4##K1 ү :'2?@ABkCDEFGHIJ()*  !"+q~ &2A9(fCOco 9QjH@NGS gs /!& J X K q L - = L j wESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$F#JLNIQ6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ү        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ҠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u       ! # % ' P ^ e y   - ; = ? A C E G O a n y      $ / 4 a j t }  !#DFHJLNPgp  ACEGIKMOQSWhjlnpy%')+-/1NPy{}~#LNPQSUVXZ{}!#%')+-/HJkmoqsuw   8:<>@BDegt)+-.02357XZ\^`bd{  ,.02468KMz|~ 13TVXZ\^`} Z\}?ACEGIK68:<>@Biuzfs|$:Uaz#>\p>Mg{7AJXbjt()+-/02468:stvx{~         z ! !!!!!#!&!(!-!0!9!;!D!E!H!K!N!P!R!U!h!q!s!v!!!!!!!!!!!!""""-"<"D"O"P"R"T"]"_"a"b"k"t"v""""""""""""""## ##+#2#;#=#?#A#C#X#a#~###############$$$($5$:$C$V$[$n$w$~$$$$$$$$$$$$%%%%%% %%#%8%E%Z%]%a%c%e%v%{%%%%%%717:7G7L7Y7b7v777777777777778 88#8&8(8*878:8<8Q8S8U8W8Y8l8u8~888888888888999999 999+9-9R9T9V9X9Z9\9^9y9999999999999999::::::':<:?:C:E:G:p:::::::::::::::::::;;;%;4;6;8;M;O;Q;S;U;_;t;;;;;;;;;;;;;;;<;>>'>,>5>B>K>T>]>h>v>>>>>>>>>>>>>?? ?!?"?$?&?(?)?+?-?/?0?2?3?4?]?_?b?c?f?i?k?m?o????@@-@8@J@L@N@S@\@^@_@`@a@c@e@g@i@k@|@@@@@@@@@@@@@@@@@AAAA(A1A3A5A7A9A;AhAjAlAnApArAtAvAxAzAAAAAAAAAAAABBBBBBBBBB B7B@BTBaBpByBBBBBBBBBBBBBBBBBCCC C CCC(C=C?CACCCECGCCCCCCCCCCCCCCCCCCCCCCCCD DKDMDODQDSDUDWDYDDDDDDDDEEEEE!E#E%E&E(E*E,E-E/E0E1EJEEEEEEEEEEEEEEEFF\F^F_F`FbFdFfFgFjFmFoFpFrFsFtFFFFFFFFFGnGGGGGGGHH+HSHoHrHtHuHvHxHzH}H~HHHHHHHHHHHHHHHHHHIIIIIIIIJJJJJ$J/JMJbJdJfJiJlJnJJJJJJJJJJJJJJJJKKKK"K%K(K+K-K0K2K4KMKKKKKKKKKKKKKKKKKKL!L#L%L'L*L-L/L1LLLLLLLLMMMMMM!M#M$M'M*M,M-M/M0M1MJMMMMMMMMMNNNNNN N"NNNNNNNNNNNNNNNNNO"O%O'O(O)O,O.O1O2O5O8O:O;O>O?O@OIOLOOOOOOOOOOPP P PPPPoPqPrPsPuPwPyPzP}PPPPPPPPPPPPPPPQ$Q:QOQQQSQVQYQ[QQQQQQQQQQQQQQQQR&R(R*R,R/R2R4R6RgR}RRRRRRRRSSSSSS S SSSSSSSS2SSSSSSSSSSSSSSSSSSSTTTT T T TfTyTTTTTTTTUU$U.U;UEU[UrUUUUUUUVVV/V2V4V7V:V=V@VCVDVGVJVMVPVSVXV[V]V_VVVVVVVVVVVVVVVWWWMWeWtW{WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWXXX>XAXCXFXIXLXNY_YxYYYYYYYYYYYYYYYYZZZZ!Z$Z'Z)[0[[[[[[[[[[[[[[[[[[[\ \ \\\\\\\].]0]2]4]7]:]<]>]]^^^^^^^^^^ ^"^#^&^'^(^+^P^S^U^X^[^^^`_;_[________`5`N`W`^`w`````````````````````a aa+a.a1a3a6a9aaGaVaXa[a^a`acafaiakaaaaaaaaaaaaaaaaabb4b7b9b;b>bAbCbTbbbbbbbbbbbbbbbbbbcc!c#c&c)c,c.cdddddd d dddddddddd5dZd]d_dbdedhdjeeeeeeeeeefffff"f%f'f)f+f4fEfHfKfNfQfTfWfZf]f_ffffffffffffffffg,g.g0g2g5g8g:g@BEHhy{}ÃŃȃ˃փ "%>KMPSYjlnqtÄƅ%9<>?@CEGHKNPQTUVY0ADFILÆĆņȆ"%'):O`bdgj} /hqsux{}Ɉ̈ΈшԈ"$'*9JLNQTctwy|ɉˉ͉ЉӉ݉  #&3DFHKNartvy|Ɋڊ܊ފ /247:IZ]_betʋۋދ  1469@BDFILNQTVXZ\^`cloqΏяӏ֏ُ܏ߏ?JS\_bdgir}ːԐߐuБݑ_acdegiknortvyz{~’ߓ4\yܓ4=BKXalՕוٕەݕߕ !#&),/258;>ADGJMPSVY\_behkmoqsuwy{~ÖƖɖ̖ϖҖԖ֖ؖۖݖ !#%')+-/1357:=?ACEGILU!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegjmpsvy|™řș˙͙ϙҙՙؙۙޙ  #&),/258;>ACEGJMPSVY\_behknqsuwy{}Úƚɚ̚ϚҚ՚ؚۚޚ  #&),/258;>ADGJMPSVY\_behq47:ADGJMPSVY\_behknqtwz}žŞȞ˞ΞўԞמڞݞ "%(+.147:=@CFILORUX[^adgjmpsvy|ğǟʟ͟Пӟ֟؟ڟܟޟ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ ĠƠȠʠ̠ΠРҠԠ֠ؠڠܠޠ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/Localizable.strings0000644000175000017500000001135414757411105022577 /* Dialog title when quitting */ "Do you really want to quit X11?" = "       X11;"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "   X11           ."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "     RandR;"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "      X11       .  X11                 . ,     #%#A     X11     ."; /* No comment provided by engineer. */ "Allow" = " "; /* No comment provided by engineer. */ "Always Allow" = "  "; /* No comment provided by engineer. */ "Cancel" = ""; /* No comment provided by engineer. */ "Mac Help" = " Mac"; /* No comment provided by engineer. */ "Quit" = ""; /* No */ "No" = ""; /* Yes */ "Yes" = ""; /* Terminal */ "Terminal" = ""; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "   ~/.xinitrc.\n\n       11                    .\n\n            X11         X11;"; /* window item modifiers */ "window item modifiers" = ""; /* Updates menu title & */ "Check for X11 Updates..." = "   X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/el.lproj/locversion.plist0000644000175000017500000000061014757411105022174 LprojCompatibleVersion 106.5 LprojLocale el LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/0000755000175000017500000000000014757411135020013 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/main.nib/0000755000175000017500000000000014757411135021506 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/main.nib/designable.nib0000644000175000017500000017761314757411105024231 Hold Option or Command while clicking to activate the middle or right mouse buttons. When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it. When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.) Launching X11 will create Xauthority access-control keys. If the system's IP address changes, these keys become invalid which may prevent X11 applications from launching. If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed. xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects.nib0000644000175000017500000012542614757411105024602 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata %)*048   !)349HOPWXYblmruv  "#$+,-45>EFGOPQZabcmnrv}~78;ATablmq|}~gN #() .239IRShimnqtwx~  !*+345;JKSTU[jkstu{ %&'-<=EFGM]^owxy"#$,-.5679:BLMNQXYbst{| &'/0?@HIXYabrsz{      + , 3 4 E F M N O P S T U V W X Y \ ] c d j k q r x y       * + 2 3 4 9 : ? O P X Y Z _ ` e f k l q r w x } ~ u x y g C DE FGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~\     U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeys<:;&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19~D:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} +{}€΀Ѐ &ŁǁɁˁ́ρсӁՁׁف  (XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMenu1~(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/À_NSMenuMixedStateˀW{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\ApplicationsP^submenuAction: $)1~%&(#   #!'jCustomize &+, ^NSMutableArray /WNSArray+,VNSMenu/XdockMenu ,zVNSName).-yXMainMenu1"~#$%&'/OU\s(..0,!110"SX11608)20N1:~;<=>?@ABCDEF3589>?BCFHJK(.M1!4YAbout X11.TU176^Preferences...Q,.1  .ggi1!;;:"XServicesoiq)<:=1s~(__NSServicesMenu.1  .1A@_Toggle Full ScreenQa.1  .UNSTag1E*DXHide X11Qh.1EG[Hide Others.1!IXShow All.1  .1MLXQuit X11Qq\_NSAppleMenu,!PP " Q)1~рRS(P  P!T\Customize...,!WWV"TEditVX)1~Y(W[ZTCopyQc,!^^]"VWindow )_]r1~`cfhilop( ^baUCloseQw()^edXMinimizeQm2^!gTZoom^  BC^kj_Cycle Through WindowsQ`ILM^nm_Reverse Cycle Through WindowsQ~^  _^!q_Bring All to Front^_NSWindowsMenuhhj,!uut"THelpjptv)1s~tw(h{u!xXX11 Help[_NSMainMenuTmenu R|^apps_separator ~(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@R@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews% ~~$& #Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  (& 'Y{301, 17}+,  _NSTableHeaderView   /_NSTableHeaderViewVNSView[NSResponder  !#%'()+-./%346]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification)ۀ25#@#? -0/OA A AA#?"_{{302, 1}, {16, 28}}+,9:]_NSCornerView9  /1<~=>?(BCDEFGHIKLMNOQR\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^nȴ9X#@O]hr!~UVWXYZ[\]^_`[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNamecdefghijkVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontnop_NSFontDescriptorAttributesr1sw{WNS.keystuvxyz_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/NWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorN\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellUVWXY]NSControlView0A~YText Cellcdfjk#@*NB1_controlTextColor+,Ѥ/+,]NSTableColumn/BCDEFGHIMNO #@X#@D~UVWXYZ[\_`WCommandNK0.33333299UVWXY~BCDEFGHIMNO #@Q#@$~UVWXYZ[\_`XShortcut[headerColorNB1C1 1UV WXY_NSDrawsBackground~ cdfjk#@(_controlBackgroundColor NL0.602715373N0.6666666667 1%'YgridColor*+NM0.4246723652E0.5 1+,/0[NSTableView/1  /YNSControlZapps_table67 À̀:>@BC>VNSCellĀ ŀƀ KMN H_{{15, 212}, {402, 18}}TUUVWYXWYVZ[\]^a6cNefg_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ȀÀǀ_Click-through Inactive Windowsjkl[NSImageNameɀXNSSwitch+,op_NSButtonImageSourceo/+,rs\NSButtonCellr/+,uvXNSButtonu1  /]click_through| Yπ^copy_menu_item р:Ҁ ӀԀ M^ HQ_{{74, 202}, {128, 26}}ZUUTYVW[VYNe\ _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionр@ @@ !Հcdfjk WNSStateـ׀Ԁ!ڀۀ)\From Display__popUpItemAction:ZOtherViews1~̀ր܀ހ(׀!݀ـZ256 Colors׀!߀ـYThousands׀!ـXMillions+,_NSPopUpButtonCellr/^NSMenuItemCell+,]NSPopUpButtonu1  /Udepth #^dock_apps_menu Ydock_menu _dock_window_separator :@ #M& H_{{18, 210}, {402, 18}}TUUVWYXWYVZ[\]^a0Nefg!Ȁ_Authenticate connections[enable_auth89 :@CDҀ _{{18, 149}, {409, 23}}TUUVWYXWYVZ[\]^a8PNefg!Ȁ_Full-screen mode_enable_fullscreenXY :@cdҀ _{{37, 83}, {409, 23}}TUUVWYXWYVZ[\]^aXpNefg!Ȁ_&Auto-show menu bar in full-screen mode_enable_fullscreen_menuxy :@  M  GH..0_{{18, 97}, {402, 18}}:_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth28 13 #@w TUUVWYXWYVZ[\]^axNefg!Ȁ_ Enable key equivalents under X11_enable_keyequivs  :@  _{{18, 133}, {402, 18}}TUUVWYXWYVZ[\]^aNefg!ȁ _&Allow connections from network clientsZenable_tcp  :@  _{{18, 210}, {402, 18}}:@ AB 9TUUVWYXWYVZ[\]^aNefg!ȁ _Emulate three button mouse\fake_buttons  :>@>Ā  _{{15, 151}, {402, 18}}TUUVWYXWYVZ[\]^a "Nefg!ȁ_Focus Follows Mouse_focus_follows_mouse*+ :>@56>Ā  _{{15, 107}, {402, 18}}TUUVWYXWYVZ[\]^a*BNefg!ȁ_Focus On New Windows_focus_on_new_windowK  %:@UV\ !# "_{{18, 36}, {402, 18}}:gh28 DE .TUUVWYXWYVZ[\]^atNefg!ȁ $_ Option keys send Alt_L and Alt_R_option_sends_alt|} 'N\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask(), +@x*!_{{266, 364}, {484, 308}}_X11 PreferencesWNSPanelZ{320, 240}MH -1~.( _NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsKJ I,, / 1~(1~x\ 9;" (_{{36, 60}, {385, 31}}Z{250, 750}UVWXY]564@_fWhen enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.cdfgjk 7\controlColor+,[NSTextField1  /:ҁ28 :< ;_{{36, 162}, {385, 42}}:  x28 >? UVWXY]956=_UHold Option or Command while clicking to activate the middle or right mouse buttons. _{{36, 126}, {385, 14}}UVWXY] ;56@_>Allows input menu changes to overwrite the current X11 keymap._{{18, 146}, {402, 18}}TUUVWYXWYVZ[\]^a)Nefg!ȁC_Follow system keyboard layout_{{36, -1}, {385, 31}}UVWXY]\3"56F_ZWhen enabled, the option keys send Alt_L and Alt_R X11 key symbols instead of Mode_switch._{{10, 33}, {438, 246}}+, 8  /_{{13, 10}, {458, 292}}1;~=>?@KO`(CDEGIKVNSViewYNSTabView\NSIdentifier6NM.LQ1UInput+,OP]NSTabViewItemO/CDEGUW6Nҁ_.PQ21Z~\]8X`сRVZ(:klr2Ҁ8 ST #@I_{{17, 205}, {55, 20}}UVWXY]\yR6UWColors::2Ҁ8 WX #@x@_{{36, 183}, {392, 14}}UVWXY]]V56Y_4This option takes effect when X11 is launched again.:2Ҁ8 [\ _{{36, 112}, {385, 31}}UVWXY]`Z56]_dEnables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode._{{10, 33}, {438, 246}}VOutputCDEGW6Na.PM Hb1~ʁcgkosw{(:@a de a_{{18, 222}, {409, 23}}TUUVWYXWYVZ[\]^aNefg!ȁcf^Enable syncing:2a8 hi a_{{36, 188}, {385, 28}}UVWXY]g56j_yEnables the "copy" menu item and allows for syncing between the OSX Pasteboard and the X11 CLIPBOARD and PRIMARY buffers.:@a lm a_{{34, 96}, {409, 23}}TUUVWYXWYVZ[\]^aNefg!ȁkn_(Update CLIPBOARD when Pasteboard changes:@ a pq a_{{34, 71}, {409, 23}}TUUVWYXWYVZ[\]^a,Nefg!ȁor_5Update PRIMARY (middle-click) when Pasteboard changes:@89a tu a_{{34, 46}, {409, 23}}TUUVWYXWYVZ[\]^aENefg!ȁsv_7Update Pasteboard immediately when new text is selected:@QRa xy a_{{34, 159}, {409, 23}}TUUVWYXWYVZ[\]^a^Nefg!ȁwz_(Update Pasteboard when CLIPBOARD changes:kl2a8 |} a_{{48, 125}, {385, 28}}UVWXY]x{56~__Disable this option if you want to use xclipboard, klipper, or any other X11 clipboard manager.:2a8  a#@v_{{48, 14}, {370, 28}}UVWXY]56_]Due to limitations in the X11 protocol, this option may not always work in some applications._{{10, 33}, {438, 246}}ZPasteboardCDEG>W6Nā.P1~6 *Á(:>>2Ā8  _{{23, 175}, {385, 31}}UVWXY]56_When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.:>>2Ā8  _{{23, 128}, {385, 17}}UVWXY]56_DX11 window focus follows the cursor. This has some adverse effects.:>>2Ā8  _{{23, 73}, {385, 28}}UVWXY]56_When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.)_{{10, 33}, {438, 246}}WWindowsCDG݁N.61~ (:  28  _{{36, 162}, {385, 42}}UVWXY] 56_Launching X11 will create Xauthority access-control keys. If the system's IP address changes, these keys become invalid which may prevent X11 applications from launching.: $ %28  _{{36, 85}, {385, 42}}UVWXY] 156_If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.: = > D28  #@y_{{20, -16}, {404, 14}}UVWXY]  K56_4These options take effect when X11 is next launched._{{10, 33}, {438, 246}}XSecurity+, Q RYNSTabView Q  /Z{484, 308}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, Z [_NSWindowTemplate Z/[prefs_panel a w_sync_clipboard_to_pasteboard h [sync_keymap o c_sync_pasteboard v k_sync_pasteboard_to_clipboard } o_sync_pasteboard_to_primary s_sync_primary_immediately {Zsync_text1 Zsync_text2@ ?_toggle_fullscreen_item; 3^x11_about_item p Á_bring_to_front:+, _NSNibControlConnector /^NSNibConnector c Ɓ_minimize_window:; 3ȁ_orderFrontStandardAboutPanel:< 5 ʁ[prefs_show:B ĆUhide:F K΁Zterminate:C FЁ_hideOtherApplications:D Hҁ_unhideAllApplications: YԁUcopy: ` ց]close_window: f ؁\zoom_window: ڀ ߁: %@   %_NSHuggingPriority ۀ ܁݀ 2M  H !6_{{340, 191}, {100, 32}}TUUVWYWYVZ[\]   fe@ !ځˀYDuplicate_apps_table_duplicate:    : %@  " #%ۀ  2_{{340, 159}, {100, 32}}TUUVWYWYVZ[\]   / fe!ˀVRemove_apps_table_delete: 7 S _apps_table_show: ; =  : %@  G H%ۀ  2_{{340, 223}, {100, 32}}TUUVWYWYVZ[\ Q  ; U fe!ˀXAdd Item_apps_table_new: ]  ^prefs_changed:x c ^prefs_changed: i  ^prefs_changed: o ^prefs_changed: u  ^prefs_changed: { р ^prefs_changed:t w Yx11_help: & _apps_table_show: i \next_window: l _previous_window:8 _enable_fullscreen_changed:@ ? _toggle_fullscreen:6 À ^prefs_changed:   ^prefs_changed:*   ^prefs_changed: c  ^prefs_changed: k ^prefs_changed: o ^prefs_changed: w ^prefs_changed: s ^prefs_changed:X ^prefs_changed:  ^prefs_changed:1 t #.;<=>g?@ABCDEF$%&'ht|x \hV=\l]8DXd`> 9Rl?>6C *6@  % > Z%  #=K>?#- ; H,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw ',.K 39<;?B"E #OҀрԀ׀ր܀ހRTVXZ\`acegikmoqsuwy{}ĀÀƁ ہځ݁〆~)-#%&4& v(]NSApplication z |%     ہ89 7 *! _{{302, 440}, {454, 271}}_X11 Application MenuZ{320, 240}1 ~  ;ځဆ(1 ~#-)-(1 ~~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView   /1 ~΀(_{{1, 1}, {301, 28}}      _NSControlTarget_NSControlAction, *++_{{1, 215}, {301, 15}}\_doScroller:+, ZNSScroller 1  /      , .++_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 t ؁14   _.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.action32__panWithGestureRecognizer:+, _NSPanGestureRecognizer /_NSPanGestureRecognizer_NSGestureRecognizer+, /+, \NSScrollView   /Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 t#....>........$%&'h|x\=\]8X`>?>6>> >>*>@  Z% % %=>?% ;,/1111911111111,OPP,UW,\^^^^^^^^,su',.K 9;" .OҀрԀ׀׀׀׀ҁRҁVҀҀҁZ.`acagakaoasawa{a.ĀÀāāāāā.ہځہۀ~~~ہ##41 t #.;<=>g?@ABCDEF$%&'ht|x \hV=\l]8DXd`> 9Rl?>6C *6@  % > Z%  #=K>?#- ; H:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|},/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw ',.K 39<;?B"E #OҀрԀ׀ր܀ހRTVXZ\`acegikmoqsuwy{}ĀÀƁ ہځ݁〆~)-#%& +{}€΀Ѐ &ŁǁɁˁ́ρсӁՁׁف  41 h t i jz l m n o p q r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@A=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁     4     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1~(1 t4+,^NSIBObjectData/",1:?QZw$2Na{ (1<=?HU\bk            # & ) , / 2 5 8 ; > A D G J M P S V Y \ _ b e h k n q t w z }       $ & ( 6 ? H _ f u  & 4 > I V c h j o q r t v w y { |   & 1 3 5 7 @ I Q V _ r w   ! * , . 0 2 4 6 8 : < I J Y f h j l u z | ~  )05>SUWY[]nuwy{} $&(*,.02468:<>[]_acegq!#%.?ACEGPQSeAGIKMOQSU^` +-/1357@BO|~ &SUWY[]_acejwy{} ):<>@BDFHJLmoqsuwy "CEGIKMOgi!6Ertvxz|~  !68:<>@ /Xez:HZf -Lfr .03579:<=?@IKMNPRTUVX]_hqsu~,79<=?ADFIKNPRSVXZe  (1ENbiu &/DWlx(6?HOQSUW   ) 5 ? J V c h j l n p r u z ! ! !!!#!*!,!.!0!7!9!;!=!?!U!p!!!!!!!!!"" """$"1"="?"H"P"U"j"v""""""""""""""""### #####44444455 55,535X5f5k5m5o5q5s5u5w5z555555555555555556666>6?6A6C6E6F6O6X6Z6{6}66666666666666677777 7 7777?7A7C7E7G7I7R7g7i7k7m7o7{77777777777777778888888!8#8<8Q8^8m8o8q88888888888888889999999t9{9}9~9999999999999999999999:$:9:G:]:o::::::::::::::::::; ; ;;; ;6;;;D;Q;Z;c;l;w;;;;;;;;;;;;;;<->>#>,>.>0>2>4>6>c>e>g>i>k>m>o>q>s>u>>>>>>>>>>>>>>>>>????????.?;?J?S?a?n?t????????????????????@@@@@@@!@|@~@@@@@@@@@@@@@@@@@@@@@@@A%A'A)A+A-A/A1A3ANAZAoAqAsAuAwAyAAAAAAAAAAAAAAABBBBDBFBHBJBLBNBPBcBwBBBBBBBBBBBBBBBCCCCCCCC^C`CbCdCfChCjClCCCCCCCCD-D/D0D1D4D6D8D9DFAFDFFFFFFFFFFFFFFFFFFGGGGGGGG!GJGUGjGlGnGqGtGvGGGGGGGGGGGGGGGGH HjHlHmHnHqHsHuHvHyH|H~HHHHHHHHHHHHHHIIIIIII!I|I~IIIIIIIIIIIIIIIIIIIIIIJJ(J=J?JAJDJGJIJJJJJJJJJJJJJJJJKKKKKK K"K$K;KQKfKhKjKmKpKrKKKKKKKKKKKKKKKKLLqLtLvLwLxL{L}LLLLLLLLLLLLLLLLLLMMM,M.M0M3M6M8MMMMMMMMNN-N:NWNpNNNNNNNNNNNNNNNNNNNNNNNOO*O2O=OfOhOkOlOoOqOsOuOxOOOOOOOPPPP!P"P%P(P*P-P0P3P5P6P9P;P=P>PGPJPMPOPXPiPlPoPrPtPwPzP}PPPPPPPPPPPPQHQYQ\Q^Q`QuQwQzQ|Q~QQQQRRRRRR R"R%R&R)R,R.R/R2R3R4R7RPRRRRRRRRRRRRRRRRRSSSSS SSShSSSSSSSSSTTOTQTSTUTXT[T]T_TTTTTTTTTU)UBUKURUkUtUUUUUUUUUUUUUUUUUUUUUUVVVVV!V$V'V)V2V?VAVDVGVIVKVNVPVVVVVVVVVVVVVVVVVVWWWW W#W&W(W0WWWWWWWWWWWWWWWWWWWWWXXXX XAXXXXXXXXXXXXXXXXXYYYY Y YYYyYYYYYYYYYYYYYYYYYYZZZZZ"Z%Z(Z+Z.Z1Z3ZZZZZZZZZZZZZZZZ[[[[[ [ [[[[[[[[[[[[[[[[[[[[[[[[[[[\n\\\\\\\\\\\\\\\\]:]<]>]@]C]F]H]J]u]]]]]]]]]]]]]]]^^A^C^E^G^J^M^O^Q^^^^^^^^^^^^^^^^__U_W_Y_[_^_a_c_e_____````` ` ``````-`l`n`p`r`u`x`z`|`aaaaaaaaaa!a$a&a'a*a+a,aEajamaoarauaxazabCbFbHbIbJbMbObRbSbVbYb[b\b_b`babjbbbbbbbbcc0c;cTcWcZc\c_cbcecnc{c}ccccccccccccddddd d d dddd*dOdRdTdWdZd]d_deNeQeSeTeUeWeYe\e]e`eceeefeheiejeeeeeeeeefffifkflfmfofqftfufxf{f}f~fffffffffffgUgngvggggggggggggggh$h'h)h*h+h-h/h2h3h6h9h;hh?h@hYh~hhhhhhi;iiiiiiiiiiiiiiiiiiijjjj j jkkkkkkkkkk k#k%k&k(k)k*k3kLkqktkvkyk|kkkkkkkklll%lHlRlYlblulzlllllllllllllllmm m mmmm&m;m=m?mBmEmGmfm{m}mmmmmmmmmmmmmmmmmnn n!n#n%n(n+n-n8nMnOnQnSnVnXnqnnnnnnnnnnnnnnnnooooooo2oCoEoGoJoMomo~oooooooooooooooooooooopp p"p$p'p*pCpPpRpUpXp^popqpspvpyppppppppppppq*q>qAqCqDqEqHqJqLqMqPqSqUqVqYqZq[q^qqqqqqqqqqqqqqqrrrrr rr,r=r@rBrErHrrrrrrrrrrrrrrrrrsssss!s#s%s,sAsRsTsVsYs\sosssssssssssssssssttttt!tZtctetgtjtmtotqtzttttttttttttttttttu uuu!u$u'u6uGuJuLuOuRuaurutuvuyu|uuuuuuuuuuuuuuuuuuvvvvvv!v4vEvGvIvLvOvlv}vvvvvvvvvvvvvvvvvwwww w ww-w0w2w5w8wGwXw[w]w`wcwrwwwwwwwwwwwwwwwwwwxxxx xxx.x1x3x6x9xHxQy|yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzz z zzzzzzzzz z#z&z(z*z,z.z1z4z7z:z=z@zCzFzIzLzOzRzUzXz[z^zazdzgzjzmzozqzszvzyz|zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz{{{^{a{c{f{i{l{o{r{s{v{y{|{{{{{{{{{{{{{{{{{{{{|||| |||||0|I|R|]|f|o|r|t|v||}}}}}}}}!}#}&}'}*},}.}1}2}3}6}N}[}d}o}z}}}}}}}}}}}}}}}}}~~.~7~:~=~@~]~~~~368:=Zc| KMOQSUWY[]_acegikmoqsuwy{}Łȁˁ΁сԁׁځ܁ށ  #&),/258;=?ADFIKNPSUX[^`bdgilnqsvx{~suxz|~„ńȄ˄΄фԄׄڄ݄ !#%'*-0369ADGJMPSVY\_behknqtwz}‰ʼnȉˉΉщԉ׉ډ݉ "%(+.147:=@CFILORUX[^adgjmpsvy|ĊNJʊ͊Њӊ֊ي܊ߊ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~‹ċƋȋʋ̋΋Ћҋԋ֋؋ڋ܋ދ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000012537514757411105025324 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata %)*048   !)349HOPWXYblmruv  "#$+,-45>EFGOPQZabcmnrv}~ 569?R_`jkoz{|e}L~!&' ,017HQRghlmpsvw}~   )*234:IJRSTZijrstz $%&,;<DEFL\]nvwx~!"#+,-45689AKLMPWXarsz{  %&./>?GHWX`aqryz      * + 2 3 D E L M N O R S T U V W X [ \ b c i j p q w x ~        ) * 1 2 3 8 9 > N O W X Y ^ _ d e j k p q v w | } t w x f >B CD EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~[     U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeys<:;&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19~D:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|} +{}€΀Ѐ &ŁǁɁˁ́ρсӁՁׁف  (XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMenu1~(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/À_NSMenuMixedStateˀW{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\ApplicationsP^submenuAction: $)1~%&(#   #!'jCustomize &+, ^NSMutableArray /WNSArray+,VNSMenu/XdockMenu ,zVNSName).-yXMainMenu1"~#$%&'/OU\s(..0,!110"SX11608)20N1:~;<=>?@ABCDEF3589>?BCFHJK(.M1!4YAbout X11.TU176^Preferences...Q,.1  .ggi1!;;:"XServicesoiq)<:=1s~(__NSServicesMenu.1  .1A@_Toggle Full ScreenQa.1  .UNSTag1E*DXHide X11Qh.1EG[Hide Others.1!IXShow All.1  .1MLXQuit X11Qq\_NSAppleMenu,!PP " Q)1~рRS(P  P!T\Customize...,!WWV"TEditVX)1~Y(W[ZTCopyQc,!^^]"VWindow )_]r1~`cfhilop( ^baUCloseQw()^edXMinimizeQm2^!gTZoom^  BC^kj_Cycle Through WindowsQ`ILM^nm_Reverse Cycle Through WindowsQ~^  _^!q_Bring All to Front^_NSWindowsMenuhhj,!uut"THelpjptv)1s~tw(h{u!xXX11 Help[_NSMainMenuTmenu R|^apps_separator ~'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@R #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews% ~~$& #Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  (& 'Y{301, 17}+,_NSTableHeaderView   /_NSTableHeaderViewVNSView[NSResponder !#%&')+,-#124]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification)ۀ25#@#? -0/OA A AA#?"_{{302, 1}, {16, 28}}+,78]_NSCornerView7  /1:~;<=(@ABCDEFGIJKLMOP\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[Nȴ9X#@O]hr!~STUVWXYZ[\]^[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNameabcdefghiVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontlmn_NSFontDescriptorAttributesp1quyWNS.keysrstvwx_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/LWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorL\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellSTUVW]NSControlView0A~YText Cellabdhi#@*LB1_controlTextColor+,Ϥ/+,]NSTableColumn/@ABCDEFGKLM #@U#@D~STUVWXYZ]^WCommandLK0.33333299STUVW~@ABCDEFGKLM #@M@#@$~STUVWXYZ]^XShortcut[headerColorLB1C1 1ST UVW _NSDrawsBackground~ abdhi#@(_controlBackgroundColorLL0.602715373N0.6666666667 1#%YgridColor()LM0.4246723652E0.5 1+,-.[NSTableView-/  /YNSControlZapps_table45 À̀8<>?AB<VNSCellĀ ŀƀ JLM H_{{15, 212}, {402, 18}}SSTUVWWUXTYZ[\]`4bLdef_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ȀÀǀ_Click-through Inactive Windowsijk[NSImageNameɀXNSSwitch+,no_NSButtonImageSourcen/+,qr\NSButtonCellq/+,tuXNSButtont/  /]click_through{ Yπ^copy_menu_item р8>Ҁ ӀԀ L^ HQ_{{74, 202}, {128, 26}}YTSSWUVZTXLd[ _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionр@ @@ !Հabdhi WNSStateـ׀Ԁ!ڀۀ)\From Display__popUpItemAction:ZOtherViews1~ˀր܀ހ(׀!݀ـZ256 Colors׀!߀ـYThousands׀!ـXMillions+,_NSPopUpButtonCellq/^NSMenuItemCell+,]NSPopUpButtont/  /Udepth #^dock_apps_menu Ydock_menu _dock_window_separator 8>? "L% H_{{18, 210}, {402, 18}}SSTUVWWUXTYZ[\]`/Ldef!Ȁ_Authenticate connections[enable_auth78 8>?BCҀ _{{18, 149}, {409, 23}}SSTUVWWUXTYZ[\]`7OLdef!Ȁ_Full-screen mode_enable_fullscreenWX 8>?bcҀ _{{37, 83}, {409, 23}}SSTUVWWUXTYZ[\]`WoLdef!Ȁ_&Auto-show menu bar in full-screen mode_enable_fullscreen_menuwx 8~>?~  L  GH..0_{{18, 97}, {402, 18}}8~>~_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth28 13 #@w SSTUVWWUXTYZ[\]`wLdef!Ȁ_ Enable key equivalents under X11_enable_keyequivs  8>?  _{{18, 133}, {402, 18}}SSTUVWWUXTYZ[\]`Ldef!ȁ _&Allow connections from network clientsZenable_tcp  8~>?~  _{{18, 210}, {402, 18}}8~>?~ AB 9SSTUVWWUXTYZ[\]`Ldef!ȁ _Emulate three button mouse\fake_buttons  8<>?<Ā  _{{15, 151}, {402, 18}}SSTUVWWUXTYZ[\]` !Ldef!ȁ_Focus Follows Mouse_focus_follows_mouse)* 8<>?45<Ā  _{{15, 107}, {402, 18}}SSTUVWWUXTYZ[\]`)ALdef!ȁ_Focus On New Windows_focus_on_new_windowJ  %8~>?TU~[ !# "_{{18, 36}, {402, 18}}8~>fg~28 DE .SSTUVWWUXTYZ[\]`sLdef!ȁ $_ Option keys send Alt_L and Alt_R_option_sends_alt{| 'L\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask(), +@x*!_{{266, 364}, {484, 308}}_X11 PreferencesWNSPanelZ{320, 240}LH -1~.( ~_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsKJ I,, / 1~~(1~w[ 9;" (_{{36, 60}, {385, 31}}Z{250, 750}STUVW\߁564@_fWhen enabled, menu bar key equivalents may interfere with X11 applications that use the Meta modifier.abdehi 7\controlColor+,[NSTextField/  /8~>~с28 :< ;_{{36, 162}, {385, 42}}8~>  ~w28 >? STUVW\߁956=_UHold Option or Command while clicking to activate the middle or right mouse buttons. _{{36, 126}, {385, 14}}STUVW\߁;56@_>Allows input menu changes to overwrite the current X11 keymap._{{18, 146}, {402, 18}}SSTUVWWUXTYZ[\]`(Ldef!ȁC_Follow system keyboard layout_{{36, -1}, {385, 31}}STUVW\[2߁"56F_ZWhen enabled, the option keys send Alt_L and Alt_R X11 key symbols instead of Mode_switch._{{10, 33}, {438, 246}}+, 7  /_{{13, 10}, {458, 292}}1:~<=>?KO`(BCDF~HJVNSViewYNSTabView\NSIdentifier6NM.LQ1UInput+,NO]NSTabViewItemN/BCDFTV6Nҁ_.PQ21Y~[\7W_сRVZ(8>jkq2Ҁ8 ST #@I_{{17, 205}, {55, 20}}STUVW\[x߁R6UWColors:8>2Ҁ8 WX #@x@_{{36, 183}, {392, 14}}STUVW\\߁V56Y_4This option takes effect when X11 is launched again.8>2Ҁ8 [\ _{{36, 112}, {385, 31}}STUVW\_߁Z56]_dEnables the X11 root window. Use the Command-Option-A keystroke to enter and leave full screen mode._{{10, 33}, {438, 246}}VOutputBCDFV6Na.PL Hb1~Ɂcgkosw{(8>?a de a_{{18, 222}, {409, 23}}SSTUVWWUXTYZ[\]`Ldef!ȁcf^Enable syncing8>2a8 hi a_{{36, 188}, {385, 28}}STUVW\߁g56j_yEnables the "copy" menu item and allows for syncing between the OSX Pasteboard and the X11 CLIPBOARD and PRIMARY buffers.8>?a lm a_{{34, 96}, {409, 23}}SSTUVWWUXTYZ[\]`Ldef!ȁkn_(Update CLIPBOARD when Pasteboard changes8>?a pq a_{{34, 71}, {409, 23}}SSTUVWWUXTYZ[\]`+Ldef!ȁor_5Update PRIMARY (middle-click) when Pasteboard changes8>?78a tu a_{{34, 46}, {409, 23}}SSTUVWWUXTYZ[\]`DLdef!ȁsv_7Update Pasteboard immediately when new text is selected8>?PQa xy a_{{34, 159}, {409, 23}}SSTUVWWUXTYZ[\]`]Ldef!ȁwz_(Update Pasteboard when CLIPBOARD changes8>jk2a8 |} a_{{48, 125}, {385, 28}}STUVW\w߁{56~__Disable this option if you want to use xclipboard, klipper, or any other X11 clipboard manager.8>2a8  a#@v_{{48, 14}, {370, 28}}STUVW\߁56_]Due to limitations in the X11 protocol, this option may not always work in some applications._{{10, 33}, {438, 246}}ZPasteboardBCDF<V6Nā.P1~4 )Á(8<><2Ā8  _{{23, 175}, {385, 31}}STUVW\߁56_When enabled, clicking on an inactive window will cause that mouse click to pass through to that window in addition to activating it.8<><2Ā8  _{{23, 128}, {385, 17}}STUVW\߁56_DX11 window focus follows the cursor. This has some adverse effects.8<><2Ā8  _{{23, 73}, {385, 28}}STUVW\߁56_When enabled, creation of a new X11 window will cause X11.app to move to the foreground (instead of Finder.app, Terminal.app, etc.)_{{10, 33}, {438, 246}}WWindowsBCF܁N.61~(8>  28  _{{36, 162}, {385, 42}}STUVW\ ߁56_Launching X11 will create Xauthority access-control keys. If the system's IP address changes, these keys become invalid which may prevent X11 applications from launching.8> # $28  _{{36, 85}, {385, 42}}STUVW\ 0߁56_If enabled, Authenticate connections must also be enabled to ensure system security. When disabled, connections from remote applications are not allowed.8> < = C28  #@y_{{20, -16}, {404, 14}}STUVW\ J߁56_4These options take effect when X11 is next launched._{{10, 33}, {438, 246}}XSecurity+, P QYNSTabView P  /Z{484, 308}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, Y Z_NSWindowTemplate Y/[prefs_panel ` w_sync_clipboard_to_pasteboard g [sync_keymap n c_sync_pasteboard u k_sync_pasteboard_to_clipboard | o_sync_pasteboard_to_primary s_sync_primary_immediately {Zsync_text1 Zsync_text2@ ?_toggle_fullscreen_item; 3^x11_about_item p Á_bring_to_front:+, _NSNibControlConnector /^NSNibConnector c Ɓ_minimize_window:; 3ȁ_orderFrontStandardAboutPanel:< 5 ʁ[prefs_show:B ĆUhide:F K΁Zterminate:C FЁ_hideOtherApplications:D Hҁ_unhideAllApplications: YԁUcopy: ` ց]close_window: f ؁\zoom_window: ڀ ߁8 #>?   #_NSHuggingPriority ۀ ܁݀ 2L  H !6_{{340, 191}, {100, 32}}SSTUVWUXTYZ[\   ed@ !ځˀYDuplicate_apps_table_duplicate:    8 #>?  ! "#ۀ  2_{{340, 159}, {100, 32}}SSTUVWUXTYZ[\   . ed!ˀVRemove_apps_table_delete: 6 S _apps_table_show: : <  8 #>?  F G#ۀ  2_{{340, 223}, {100, 32}}SSTUVWUXTYZ[ P  : T ed!ˀXAdd Item_apps_table_new: \  ^prefs_changed:w b ^prefs_changed: h  ^prefs_changed: n ^prefs_changed: t  ^prefs_changed: z р ^prefs_changed:t w Yx11_help: & _apps_table_show: i \next_window: l _previous_window:7 _enable_fullscreen_changed:@ ? _toggle_fullscreen:4 À ^prefs_changed:   ^prefs_changed:)   ^prefs_changed: c  ^prefs_changed: k ^prefs_changed: o ^prefs_changed: w ^prefs_changed: s ^prefs_changed:W ^prefs_changed:  ^prefs_changed:1 s #.;<=>g?@ABCDEF$%&'ht{~w [gU<[k\7CWc_=8Qk><4B )5?  $ = Y#  ";I<=!+ : G,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw ',.K 39<;?B"E #OҀрԀ׀ր܀ހRTVXZ\`acegikmoqsuwy{}ĀÀƁ ہځ݁〆~)-#%&4& u(]NSApplication y {# ~    ہ89 7 *! _{{302, 440}, {454, 271}}_X11 Application MenuZ{320, 240}1 ~  :ځဆ(1 ~!+)-(1 ~~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView   /1 ~̀(_{{1, 1}, {301, 28}}  >    _NSControlTarget_NSControlAction, *++_{{1, 215}, {301, 15}}\_doScroller:+, ZNSScroller /  /  >    , .++_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 s ׁ14   _.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.action32__panWithGestureRecognizer:+, _NSPanGestureRecognizer /_NSPanGestureRecognizer_NSGestureRecognizer+, /+, \NSScrollView   /Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 s#....>........$%&'h{~~~~w~~~[~<[\7W_=><4<< <<)<? Y# # #;<=# :,/1111911111111,OPP,UW,\^^^^^^^^,su',.K 9;" .OҀрԀ׀׀׀׀ҁRҁVҀҀҁZ.`acagakaoasawa{a.ĀÀāāāāā.ہځہۀ~~~ہ##41 s #.;<=>g?@ABCDEF$%&'ht{~w [gU<[k\7CWc_=8Qk><4B )5?  $ = Y#  ";I<=!+ : G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|},/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw ',.K 39<;?B"E #OҀрԀ׀ր܀ހRTVXZ\`acegikmoqsuwy{}ĀÀƁ ہځ݁〆~)-#%& +{}€΀Ѐ &ŁǁɁˁ́ρсӁՁׁف  41 g s h ix k l m n o p q r s t u v w x y z { | } ~        !"#$%&'()*+,-./0123456789:;<=>?@=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁     4     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1~(1 s4+,^NSIBObjectData/",1:?QZw$2Na{ (1<=?HU\bk            # & ) , / 2 5 8 ; > A D G J M P S V Y \ _ b e h k n q t w z }       $ & ( 6 ? H _ f u  & 4 > I V c h j o q r t v w y { |   & 1 3 5 7 @ I Q V _ r w   ! * , . 0 2 4 6 8 : < I J Y f h j l u z | ~  )05>SUWY[]nuwy{} $&(*,.02468:<>[]_acegq!#%.?ACEGPQSeAGIKMOQSU^` +-/1357@BO|~ &SUWY[]_acejwy{} ):<>@BDFHJLmoqsuwy "CEGIKMOgi!6Ertvxz|~  !68:<>@+Tav6DVb{)Hbn{ "#%&()24679;=>?AFHQZ\^ghi #$&(+-02579:=?AL},5IP\ +>S_v&/68:<>gt   & 1 = J O Q S U W Y \ a v } !! !!!!!! !"!$!&!> >>>>>>>L>N>P>R>T>V>X>Z>\>^>i>>>>>>>>>>>>>>>>>>>>>>???$?3?GSGUGWGZG]G_GGGGGGGGGGGGGGGGGHSHUHVHWHZH\H^H_HbHeHgHhHkHlHmHpHHHHHHHHHHHIIIII IeIgIhIiIkImIoIpIsIvIxIyI{I|I}IIIIIIIIIIJJ&J(J*J-J0J2JJJJJJJJJJJJJJJJJJKKKK K K K$K:KOKQKSKVKYK[KKKKKKKKKKKKKKKKKLZL]L_L`LaLdLfLiLjLmLpLrLsLvLwLxL{LLLLLLLLLMMMMMMM!MpM}MMMMMMMNN#N@NYNkNuNNNNNNNNNNNNNNNNNNNNNOOOO&OOOQOTOUOXOZO\O^OaOjOmOpOrOOOOPPP P PPPPPPPPP"P$P&P'P0P3P6P8PAPRPUPXP[P]P`PcPfPiPkPPPPPPPPPPQ1QBQEQGQIQ^Q`QcQeQgQtQ}QQQRRRRR R RRRRRRRRRR R9RRRRRRRRRRRRRRRRRRRRRRRRSQSjSSSSSSSSST8T:TTATDTFTHThTTTTTTTTUU+U4U;UTU]UhUkUnUqUtUwUyUUUUUUUUUUUUUUUUVVVV V VVVV(V*V-V0V2V4V7V9VVVVVVVVVVVVVVVVVVWWWW W WWWWWWWWWWWWWWWWWWWWWWWWWWWWX*XXXXXXXXXXXXXXXXXXXXXXXXYbY{YYYYYYYYYYYYYYYYYYZZZZ ZZZZZZZwZyZzZ{Z~ZZZZZZZZZZZZZZZZZZZ[[o[r[t[u[v[y[{[~[[[[[[[[[[[[[[[[\W\\\\\\\\\\\\\\\\]#]%]'])],]/]1]3]^]]]]]]]]]]]]]]]]^*^,^.^0^3^6^8^:^r^^^^^^^^^^^^^^^^_>_@_B_D_G_J_L_N________________``U`W`Y`[`^`a`c`e``````aaaaa a aaaaaa.aSaVaXa[a^aaacab,b/b1b2b3b6b8b;be@eBeEeFeIeLeNeOeQeReSeleeeeeeeefOfRfTfUfVfXfZf]f^fafdfffgfifjfkffffffffg>gWg_gtgwgyg|ggggggggggh hhhhhhhhhh"h$h%h'h(h)hBhghjhlhohrhuhwi$iiiiiiiiiiiiiiiiiiiiiiiijjjjjjkkkkk k kkkkkkk5kZk]k_kbkekhkjkkkkkkklll1l;lBlKl^lclollllllllllllllllllllmm$m&m(m+m.m0mOmdmfmhmkmnmpmmmmmmmmmmmmmmmn n nnnnn!n6n8n:npApGpXpZp\p_pbpppppppppppppqq'q*q,q-q.q1q3q5q6q9qq?qBqCqDqGqpqrquqvqyq{q}qqqqqqqqqqqqqqrr&r)r+r.r1rrrrrrrrrrrrrrrrrsssss s sss*s;s=s?sBsEsXsislsnsqstsssssssssssssssst tCtLtNtPtStVtXtZtctuttttttttttttttttttuuu u uuu0u3u5u8u;uJu[u]u_ubueutuuuuuuuuuuuuuuuuuuvvvvv vv.v0v2v5v8vUvfvhvjvmvpvvvvvvvvvvvvvvvvvvwwwwww!w0wAwDwFwIwLw[wlwowqwtwwwwwwwwwwwwwwwwwwwwxxxxxx"x1x:yeyhyjylynypyrytyvyxyzy|y~yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzz z zzzzzzzz z#z&z)z,z/z2z5z8z;z>zAzDzGzJzMzPzSzVzXzZz\z_zbzezhzkznzqztzwzzz}zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz{G{J{L{O{R{U{X{[{\{_{b{e{h{k{n{p{r{t{{{{{{{{{{{{{{{{{{{{||||2|;|F|O|X|[|]|_|u||}}}}}}} } }}}}}}}}}}7}D}M}X}c}}}}}}}}}}}}}}}}}}~~ ~#~&~)~F~w~~~~!#&CLel 468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ÁŁǁɁˁ́ρсӁց؁ہ݁߁ !$&(*-/2479<>ADGIKMPRUWZ\_adgjmpsuwy{}\^acegikmoqsuwy{}ÄƄɄ̄΄фԄׄڄ݄ "%(+.147:=@CFILOQSUX[^adgjmpsvxz|Åƅȅʅ̅΅Ѕ҅ԅօ؅څ܅ޅ  #&),/258;>ADGJMPSVY\_behknqtwz}PSVX[^adgjmpsvy|ĈLjʈ͈Јӈֈو܈߈ !$'*-0369ADGJMPSVY\_behknqtwz}ŠŊȊˊΊъԊ׊ڊ݊ߊ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ËŋNjɋˋ͋ϋыӋՋ׋ًۋ݋ߋ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwxorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/Localizable.strings0000644000175000017500000001251614757411105023571 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Do you really want to quit X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Any open X11 applications will stop immediately, and you will lose any unsaved changes."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Enter RandR mode?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the %##A key sequence to force X11 to return to the previous state." = "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the %##A key sequence to force X11 to return to the previous state."; /* No comment provided by engineer. */ "Allow" = "Allow"; /* No comment provided by engineer. */ "Always Allow" = "Always Allow"; /* No comment provided by engineer. */ "Cancel" = "Cancel"; /* No comment provided by engineer. */ "Mac Help" = "Mac Help"; /* No comment provided by engineer. */ "Quit" = "Quit"; /* No */ "No" = "No"; /* Yes */ "Yes" = "Yes"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Check for X11 Updates..."; /* Dialog title when encountering a fatal error */ "The application X11 could not be opened." = "The application X11 could not be opened."; /* Dialog when encountering a fatal error */ "An error occurred while starting the X11 server: \"%s\"\n\nClick Quit to quit X11. Click Report to see more details or send a report to Apple." = "An error occurred while starting the X11 server: \"%s\"\n\nClick Quit to quit X11. Click Report to see more details or send a report to Apple."; /* Report... */ "Report..." = "Report& "; xorg-server-21.1.16/hw/xquartz/bundle/Resources/English.lproj/locversion.plist0000644000175000017500000000060414757411105023170 LprojCompatibleVersion 105 LprojLocale en LprojRevisionLevel 1 LprojVersion 105 xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/0000755000175000017500000000000014757411135017020 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/main.nib/0000755000175000017500000000000014757411135020513 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib0000644000175000017500000021040114757411105023215 Aktivoi hiiren keski- tai oikea painike pitämällä Optio- tai Komento-näppäimiä painettuna osoitettaessa. Ottaa käyttöön Kopioi-valikkokohteen ja mahdollistaa synkronoinnin Mac OS X:n leikepöydän ja X11:n leikepöydän ja ensisijaisen valinnan puskurin välillä. X11:n avaaminen luo Xauthority-pääsynhallinta-avaimia. Jos järjestelmän IP-osoite muuttuu, näistä avaimista tulee virheellisiä, mikä saattaa estää X11-ohjelmia avautumasta. Jos tämä otetaan käyttöön, ”Todenna yhteydet” pitää myös ottaa käyttöön järjestelmän turvallisuuden varmistamiseksi. Kun tämä on pois käytöstä, yhteyksiä etäohjelmista ei sallita. xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects.nib0000644000175000017500000013540014757411105023600 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata. %)*048#$,67<KRSZ[\eopuxy %&'./078AHIJRST]defpquy  :;>DWdeoptjQ   %&+01 6:;AQZ[pquvy|  )23;<=CRS[\]crs{|}  $%5=>?ETU]^_etu}~+,>FGHPQRZ[\lstu}~()12CDKL[\detu}~     ' ( 8 9 @ A B C I Q a b j k { |          # $ ) * / 0 4 5 : ; @ A F X a b l m n s          $ % * + 0 1 6 7 < =     ! " # & 7 8 9 = H I N P S T U V W  i d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysKI),,+-J&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +{}Àπр %+2ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)WValikko1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XOhjelmatP^submenuAction: $)1%&(#   #!'hMuokkaa &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,z !"VNSName).-yXMainMenu1%&'()*/OU\s(113,!110"SX1193;)20N1=>?@ABCDEFGHI3589>?BCFHJK(1P1!4\Tietoja: X111WX176\Asetukset...Q,11  1jjl1!;;:"XPalvelutrlt)<:=1v(__NSServicesMenu11  11A@oVaihda koko nytn tilaQa11  1UNSTag1E*DiKtke X11Qh11EGjKtke muut11!IlNyt kaikki11  11MLZLopeta X11Qq\_NSAppleMenu,!PP " Q)1ԀRS(P  P!TZMuokkaa...,!WWV"WMuokkaaVX)1Y(W[ZVKopioiQc ,!^^]"VIkkuna )_]r1`cfhilop("#^baUSuljeQw+,^edhPienennQm5^!gVZoomaa^  EF^kjoKy ikkunoita lpiQ<LOP^nmo.Ky ikkunoita lpi knteisess jrjestyksessQ>^  b^!q_Tuo kaikki eteen^_NSWindowsMenukkm,!uut"TOhjemstv)1vww(k~u!xXX11-ohje[_NSMainMenuTmenu R|^apps_separator ~€(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@R@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews4 ~~35 2Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  75 6Y{301, 17}+,  _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$&(*+,.012(679]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification82D#@#? <?>OA A AA#?1_{{302, 1}, {16, 28}}+,<=]_NSCornerView</1?@AB(EFGHIJKLNOPQRTU\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`~XYZ[\]^_`abc[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNimifghijklmnVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontqrs_NSFontDescriptorAttributesu1vz~WNS.keyswxy{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/QWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorQ\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellXYZ[\]NSControlView_NSPlaceholderString0A~YText Cellfgimn#@*PQB1_controlTextColor+,פ/+,]NSTableColumn/EFGHIJKLPQR #@X#@D~XYZ[\]^_bcWKomentoQM0.3333329856XYZ[\ŀ~EFGHIJKLPQR #@Q#@$~XYZ[\]^_bcWOikotie [headerColor QB1C1 1XYZ[\_NSDrawsBackground~ fgimn#@("$_controlBackgroundColor'(QL0.602715373N0.6666666667 1-/YgridColor23QM0.4246723652E0.5 1+,78[NSTableView79/YNSControlZapps_table>? Ā΀BFHJKFVNSCellŀ ƀǀ SUV S_{{15, 245}, {318, 18}}\X]^_\`ZaYbcdefi>kQmno_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ɀĀȀ_,Huomioi osoitukset ei-aktiivisiin ikkunoihinrst[NSImageNameʀXNSSwitch+,wx_NSButtonImageSourcew/+,z{\NSButtonCellz/+,}~XNSButton}9/]click_through YЀ^copy_menu_item ҀBӀ ԀՀ Ui S\_{{58, 234}, {118, 26}}b]X\\^_cYaQmd _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionҀ@ @@ !րfgimn WNSStateڀ؀Հ!ۀ܀)hNytlt__popUpItemAction:ZOtherViews1Ԁ׀݀߀(؀!ހڀi256 vri؀!ڀXTuhansia؀!ڀYMiljoonia+,_NSPopUpButtonCellz/^NSMenuItemCell+,]NSPopUpButton}9/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator BH"# +U. S_{{18, 243}, {402, 18}}\X]^_\`ZaYbcdefi8Qmno!ɀ񀦀_Todenna yhteydet[enable_auth@A BHKLӀ _{{18, 182}, {409, 23}}\X]^_\`ZaYbcdefi@XQmno!ɀoKoko nytn tila_enable_fullscreen`a BHklӀ _{{37, 116}, {409, 23}}\X]^_\`ZaYbcdefi`xQmno!ɀo-Salli valikkorivin kytt koko nytn tilassa_enable_fullscreen_menu  B_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthӀ  #@_{{54, 79}, {511, 31}}Z{250, 750}XYZ[\e@oPValikkorivi tulee nkyviin, kun hiiren osoitin on ensisijaisen nytn ylosassa.fgijmn $\controlColor+,[NSTextField9/_enable_fullscreen_menu_text  BHŀ    U RS::<_{{18, 130}, {402, 18}}B  =>  #@,\X]^_\`ZaYbcdefiQmno!Ɂ o%Ota kyttn nppinvastineet X11:ss_enable_keyequivs BH  _{{18, 166}, {402, 18}}\X]^_\`ZaYbcdefi Qmno!Ɂ_ Salli yhteydet verkkoasiakkailtaZenable_tcp BH#   _{{18, 243}, {402, 18}}BH-.4 HI  @\X]^_\`ZaYbcdefi:Qmno!ɁoEmuloi kolmenppimist hiirt\fake_buttonsBC  $BFHMNFŀ !" _{{15, 184}, {402, 18}}\X]^_\`ZaYbcdefiBZQmno!Ɂ #oKohdistus seuraa hiirt_focus_follows_mousebc &*BFHmnFŀ '( _{{15, 140}, {402, 18}}\X]^_\`ZaYbcdefibzQmno!Ɂ&)_Kohdista uusiin ikkunoihin_focus_on_new_window ,1BH -/  ._{{18, 69}, {402, 18}}B  KM  L\X]^_\`ZaYbcdefiQmno!Ɂ,0o-Optio-nppimet lhettvt Alt_L:n ja Alt_R:n_option_sends_alt 3Q\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask458 7@x6!_'{{266, 349.03906000000001}, {625, 341}}]X11-asetuksetWNSPanelZ{320, 240}US 91ˁ:(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsVU  T88 ; 1 (14 #@ B.,L(_{{36, 96}, {540, 28}}XYZ[\e?oqKun kytss, valikkorivin nppinvastineet saattavat hirit X11-ohjelmia, jotka kyttvt Meta-muuntonppint.B#$   AC  B_{{36, 195}, {540, 42}}B56<  EF  #@w XYZ[\e4C@DoiAktivoi hiiren keski- tai oikea painike pitmll Optio- tai Komento-nppimi painettuna osoitettaessa. _{{36, 159}, {385, 14}}XYZ[\e MBGoASalli syttvalikon muutosten korvata nykyinen X11-nppinkartta._{{18, 179}, {402, 18}}\X]^_\`ZaYbcdefi#WQmno!ɁJo%Noudata jrjestelmn nppinasettelua_{{36, 32}, {540, 31}}BHdeˀ OP  :XYZ[\eq.NodKun kytss, Optio-nppimet lhettvt X11:n Alt_L- ja Alt_R-nppinsymbolit Mode_switchin sijaan._{{18, 8}, {418, 18}}\X]^_\`ZaYbcdefizQmno!ɁLQo&Vierit aina sormen kulkemaan suuntaan_{{10, 33}, {579, 279}}+,/_{{13, 10}, {599, 325}}1VZk(VNSViewYNSTabView\NSIdentifierY X:WQ1eSyte+,]NSTabViewItem/YӁj:[Q21@`ҁ]ae(BӀ ^_ #@D_{{17, 238}, {45, 20}}XYZ[\e]`fVrit:BցӀ bc #@x@_{{36, 216}, {392, 14}}XYZ[\eado=Tm valinta tulee voimaan, kun X11 avataan seuraavan kerran.BӀ fg #@h_{{36, 148}, {529, 28}}XYZ[\eehomOttaa kyttn X11:n juuri-ikkunan. Voit siirty koko nytn tilaan ja siit pois painamalla Komento-Optio-A._{{10, 33}, {579, 279}}WTulosteYl:[U  Sm1nrvz~(BH!"l op l_{{3, 255}, {409, 23}}\X]^_\`ZaYbcdefi.Qmno!ɁnqoOta synkronointi kyttnB;<Bl st l#@0_{{21, 213}, {554, 42}}XYZ[\eIruoOttaa kyttn Kopioi-valikkokohteen ja mahdollistaa synkronoinnin Mac OS X:n leikepydn ja X11:n leikepydn ja ensisijaisen valinnan puskurin vlill.BHTUl wx l_{{19, 129}, {410, 18}}\X]^_\`ZaYbcdefiaQmno!Ɂvyo;Pivit X11:n leikepyt, kun Mac OS X:n leikepyt muuttuuBHmnl {| l_{{19, 88}, {555, 34}}\X]^_\`ZaYbcdefizQmno!Ɂz}oTPivit X11:n ensisijainen valinta (keskiosoitus), kun Mac OS X:n leikepyt muuttuuBHl  l_{{19, 61}, {409, 23}}\X]^_\`ZaYbcdefiQmno!Ɂ~o>Pivit Mac OS X:n leikepyt heti, kun uutta teksti valitaanBHl  l_{{19, 192}, {438, 18}}\X]^_\`ZaYbcdefiQmno!Ɂo;Pivit Mac OS X:n leikepyt, kun X11:n leikepyt muuttuuBl  l#@_{{33, 158}, {542, 28}}XYZ[\eojPoista tm valinta kytst, jos haluat kytt xclipboardia, klipperi tai muuta X11-leikepytohjelmaa.Bl  l_{{33, 29}, {542, 28}}XYZ[\eo^X11-protokollan rajoitusten vuoksi tm valinta ei vlttmtt aina toimi kaikissa ohjelmissa._{{10, 33}, {579, 279}}jLeikepytFYŁ:[1>Bbā &(BFFŀ  _{{23, 208}, {542, 31}}XYZ[\e oKun kytss, ei-aktiivisen ikkunan osoittaminen saa hiiren osoituksen kulkemaan kyseiselle ikkunalle sen aktivoimisen lisksi.BF  F ŀ  #@y0_{{23, 161}, {407, 17}}XYZ[\e %oLX11:n ikkunakohdistus seuraa osoitinta. Tll on joitakin haittavaikutuksia.BF 1 2Fŀ  _{{23, 106}, {542, 28}}XYZ[\e >ouKun kytss, uuden X11-ikkunan luominen saa X11.appin siirtymn etualalle (Finder.appin, Pte.appin jne. sijasta)._{{10, 33}, {579, 279}}WIkkunat FY:1 J M N O(B Z [  _{{36, 195}, {529, 42}}XYZ[\e M goX11:n avaaminen luo Xauthority-psynhallinta-avaimia. Jos jrjestelmn IP-osoite muuttuu, nist avaimista tulee virheellisi, mik saattaa est X11-ohjelmia avautumasta.B t u  _{{36, 118}, {529, 42}}XYZ[\e N oJos tm otetaan kyttn, Todenna yhteydet  pit mys ottaa kyttn jrjestelmn turvallisuuden varmistamiseksi. Kun tm on pois kytst, yhteyksi etohjelmista ei sallita.B     #@vp_{{17, 17}, {363, 17}}XYZ[\e O o@Nm valinnat tulevat voimaan, kun X11 avataan seuraavan kerran._{{10, 33}, {579, 279}}WSuojaus+, YNSTabView /Z{625, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel L_scroll_in_device_direction _sync_clipboard_to_pasteboard# [sync_keymap n_sync_pasteboard v€_sync_pasteboard_to_clipboard zĀ_sync_pasteboard_to_primary ~ƀ_sync_primary_immediately ȀZsync_text1 ʀZsync_text2C ?̀_toggle_fullscreen_item> 3΀^x11_about_item p Ё_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector c Ӂ_minimize_window:>  3Ձ_orderFrontStandardAboutPanel:?  5 ׁ[prefs_show:E  CفUhide:I ! KہZterminate:F ' F݁_hideOtherApplications:G - H߁_unhideAllApplications: 2 YUcopy: 8 ` ]close_window: > f \zoom_window: B D  B G H(H  P Q(_NSHuggingPriority   U \ `S 0E_{{340, 191}, {115, 32}}\X]^_\ZaYbcde c f B h inm@ !̀WMonista_apps_table_duplicate: o q  B G H(H  { |(  _{{340, 159}, {115, 32}}\X]^_\ZaYbcde c f o inm!̀VPoista_apps_table_delete: S _apps_table_show:  B G H(H   (  _{{340, 223}, {115, 32}}\X]^_\ZaYbcd c f inm!̀kLis kohde_apps_table_new:  ^prefs_changed:  ^prefs_changed:#  ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ҁ ^prefs_changed:w w Yx11_help: &  _apps_table_show: i  \next_window: l _previous_window:@ _enable_fullscreen_changed:C ? _toggle_fullscreen:> Ā ^prefs_changed:B   ^prefs_changed:b & ^prefs_changed:  n ^prefs_changed:  v ^prefs_changed:  z ^prefs_changed: "   ^prefs_changed: ( ~ "^prefs_changed:` . $^prefs_changed: 4 , &^prefs_changed: : L (^prefs_changed:1 > ׯ ?&1>?@AjBCDEFGHI'()*kw4$ 6#.e@L`l"<UnF>KBN bn 2# M [ N u O ( B Q o |@NAB&0 *,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw 38:V >@C BFI.M,/LPZӀҀՀ؀׀݀߀]_acegklnprtvxz|~ŀĀǁ "&(,~8<#%&C& (+]NSApplication (    -.GH F/6! _{{302, 440}, {469, 271}}_X11-ohjelmavalikkoZ{450, 240}1 B o (1 &08<(1 ~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 р(_{{1, 1}, {301, 28}}      _NSControlTarget_NSControlAction; 9::_{{1, 215}, {301, 15}}\_doScroller:+, $ %ZNSScroller $9/    0  ; =::_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 : ס ;@C > ? @ A B C D   G_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionBA__panWithGestureRecognizer:+, J K_NSPanGestureRecognizer L M/_NSPanGestureRecognizer_NSGestureRecognizer+, O/+, Q R\NSScrollView Q/Z{469, 271}_{{0, 0}, {1680, 1025}}Z{450, 268}Xx11_apps1 X ׯ&1111A11111111'()*k4 #@`F>FFBFFbF M N O ( B( o(@AB( ,/1111911111111,OPP,UW,\^^^^^^^^,su38:V   @   B  . , L:ZӀҀՀ؀؀؀؀Ӂ]ӁaӀӀӁeӁ:klnlrlvlzl~lll:ŀĀŁŁ ŁŁ&Ł:,耆~~~##C1 ׯ ?&1>?@AjBCDEFGHI'()*kw4$ 6#.e@L`l"<UnF>KBN bn 2# M [ N u O ( B Q o |@NAB&0 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw 38:V >@C BFI.M,/LPZӀҀՀ؀׀݀߀]_acegklnprtvxz|~ŀĀǁ "&(,~8<#%& +{}Àπр %+2ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'C1 ׯ }       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*C     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 נC+,^NSIBObjectData/",1:?QZw#1>P^z  #.7FKT]hikt ( * , . 0 2 4 6 8 : < > @ B D F I L O R U X [ ^ a d g j m p s v y |     $ L N P R T V _ a c q z     ; I P d r |  & ( * , . 0 2 : L Y d o q s u ~     L U _ h j l n p r t v x z /8GNV_fkt   02468AZ\^`bdfhjlnprtJLNPRTVXZ\evxz|~68acefhjkmo$&(*,.0Irtvwy{|~"')+-VXZ[]_`bd')+-/13:<ikmoqsuwy{!#%'):<]_acegip %')+-/CEGIKMOQSUZgikmvy{}   )6KVr +7Pq7CP\f   !#%&').09BDFOPRS  !#$')+6gs3:Foqstvxz|~(=I`m    " $ & ( Q ^ i v !!!!'!4!9!;!=!?!A!C!F!K!`!g!p!!!!!!!!!!!!!!!!!""" " """&"A"a"|""""""""""""#######(#=#I#W#_#a#c#e#g#i#p################555555555566/6=6S6X6Z6\6^6`6b6d6f6i6s666666666666666666777.7/717375767?7H7J7k7m7o7q7s7u7}777777777777777888 8887898;8=8?8A8I8^8`8b8d8f8r8888888888888888889999999 999N9[9j9l9n9999999999999999: ::::::q:x:z:{:|:~::::::::::::::::::::;!;6;D;Z;l;;;;;;;;;;;;;;;;<< <<<<"<+=@=B=C=E=G=I=J=L=M=N=w=y=|=}=======>>>*>G>R>d>f>h>m>v>x>y>z>{>}>>>>>>>>>>>>>>>>>>>>>>? ??)?2?;?=???A?C?E?r?t?v?x?z?|?~???????????????@ @@@@@@@@@@(@1@E@R@a@j@x@@@@@@@@@@@@@@@@@@@@@AAA.A0A2A4A6A8AAAAAAAAAAAAAAAAAAAAAAAAABB@BBBDBFBHBJB]BiB~BBBBBBBBBBBBBBBBBBBBCCQCSCUCWCYC[C]C_CCCCCCCCDDDDDDDDDDD!D"D$D%D&D?D~DDDDDDDDEEEEEE!E#EEEEEEEEEEEEEEFFFFFFF'F2FWFZF\F_FbFeFgFlGG G#G%G'GGAGCGEGRG[GgGrGGGGGGGHHHHHHHHHH"H$H%H(H)H*H-H^H_HbHeHhHkHnHpHsHuHwHHHIIIIII I IIIIIIII"I%IdIfIhIjImIpIrItIIIIIIIIJPJRJSJTJVJXJZJ[J^JaJcJdJfJgJhJJJJJJJJJJJKKKKKKK~KKKKKKKKKKKKKKKKLLLLLLLLL"L%L'L(L+L,L-L0LoLqLsLuLxL{L}LLLLLLLLLMGMIMJMKMMMOMQMRMUMXMZM[M]M^M_MxMMMMMMMMMNN#N%N'N*N-N/NNNNNNNNNNNNNNNNNNNOOOOO O'O=OROTOVOYO\O^OOOOOOOOOOOOOOOOOP]P`PbPcPdPgPiPlPmPpPsPuPvPyPzP{P~PPPPPPPPQ*Q=QRQTQVQYQ\Q^QQQQQQR RR6RSR`R}RRRRRRRRRRRSSSSS SSSSSSS!S#SMS[ScSnSSSSSSSSSSSSSTTT,T3TLTOTRTSTVTYT[T^TaTdTfTgTjTlTnToTxT{T~TTTTTTTTTTTTTTTTTUUUU U UV\V_VaVbVcVfVhVkVlVoVrVtVuVxVyVzV}VWWWWWW W WWWWWWWWWW(W+WTWWWYW\W^WaWdWfX;XTX}XXXXXXXYY-YlYnYpYrYuYxYzY|YYZ@ZBZCZDZGZIZKZLZOZRZTZUZXZYZZZ]ZZZZZZZ[][t[[[[[[[[\\+\4\;\T\]\h\k\n\q\t\w\y\\\\\\\\\\\\\\\]]] ] ]]]]] ]/]1]4]7]9];]>]A]C]]]]]]]]]]]]]]]]]]^^^^^^^^!^.^^^^^^^^^^^^^^^^^^^^____ _ _________````` ` ` ` ```0`Y`\`^`a`c`f`i`kaHaaaiaaaaaaaaaaaaaaaaaaaaaaaaabbb^b`babbbebgbibjbmbpbrbsbvbwbxbbbbbbbbbcc{c~ccccccccccccccccccccccce%eeeeeeeeeeeeeeeeeeeeeefff{fffffffffffffffggGgIgKgMgPgSgUgWhh]h_h`hahdhfhhhihlhohqhrhuhvhwhhhhhhhhhi]iiiiiiiiiiiiiiiij*j,j.j0j3j6j8j:jkkkk k!k$k&k)k*k-k0k2k3k6k7k8kAkZkkkkkkklfllllllllllllllllmm(m+m-m0m3m6m8mnn%n>nAnDnFnInLnOnXnengnjnmnpnsnvnxnnnnnnnnnnnnnnnnoo9ooAoDoGoIpJppppppppppppppppppqqqqqq"q$qr&r)r+r,r-r/r1r4r5r8r;r=r>r@rArBr[rrrrrrrs}sssssssssssssssstLtOtQtRtStUtWtZt[t^tatctdtftgthtttttttttvv~vvvvvvvvvvvvvvvvvvvvvvvvxWxxxxxxxxxxxxxxxxxxy$y'y)y,y.y1y4y6yyyyyyzzz%zHzRzYzbzuzzzzzzzzzzzzzzzz{{{{{ {#{%{1{F{H{J{M{P{R{d{y{{{}{{{{{{{{{{{{{{{||||3|5|7|:|=|?|J|_|a|c|f|i|k|v|||||||||||||||||||} }},}3}B}S}U}W}Z}]}p}}}}}}}}}}}}}}}}}}~~~~ ~~~*~,~.~1~4~M~^~`~b~e~h~~~~~~~~~~~~~~~~~~~ h|*357?@C]Ăւ,=@BEHWhjlorăǃփ ):<>ADQbdfilȄʄ̄τ҄"%'*-OQSVYhy|~LJ !#%')+-/13579;=?ACEGJMPSVY\_behknqtwz}ˆňȈˈΈшԈ׈ڈ݈ !#%(+.147:=@CFILOQSUWY[]_adgiloqsuwy{~ 1FQZcfiknpyҊۊ|׋fhjklnpruvy{}ÌƌɌ;cÍƍ %;DIR_hs܏ޏ  "$&(*-0369ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013534714757411105024331 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata. %)*048#$,67<KRSZ[\eopuxy %&'./078AHIJRST]defpquy 89<BUbcmnr}~hO  #$)./ 489?PYZoptux{~  (12:;<BQRZ[\bqrz{|   #$4<=>DST\]^dst|}~*+=EFGOPQYZ[krst|}~ '(01BCJKZ[cdst|}     & ' 7 8 ? @ A B H P ` a i j z {         " # ( ) . / 3 4 9 : ? @ E W ` a k l m r         # $ ) * / 0 5 6 ; <     ! " % 6 7 8 < G H M O R S T U V F h c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysKI),,+-J&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +{}Àπр %+2ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)WValikko1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XOhjelmatP^submenuAction: $)1%&(#   #!'hMuokkaa &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,z !"VNSName).-yXMainMenu1%&'()*/OU\s(113,!110"SX1193;)20N1=>?@ABCDEFGHI3589>?BCFHJK(1P1!4\Tietoja: X111WX176\Asetukset...Q,11  1jjl1!;;:"XPalvelutrlt)<:=1v(__NSServicesMenu11  11A@oVaihda koko nytn tilaQa11  1UNSTag1E*DiKtke X11Qh11EGjKtke muut11!IlNyt kaikki11  11MLZLopeta X11Qq\_NSAppleMenu,!PP " Q)1ԀRS(P  P!TZMuokkaa...,!WWV"WMuokkaaVX)1Y(W[ZVKopioiQc ,!^^]"VIkkuna )_]r1`cfhilop("#^baUSuljeQw+,^edhPienennQm5^!gVZoomaa^  EF^kjoKy ikkunoita lpiQ<LOP^nmo.Ky ikkunoita lpi knteisess jrjestyksessQ>^  b^!q_Tuo kaikki eteen^_NSWindowsMenukkm,!uut"TOhjemstv)1vww(k~u!xXX11-ohje[_NSMainMenuTmenu R|^apps_separator ~€'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@R #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews4 ~~35 2Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  75 6Y{301, 17}+,  _NSTableHeaderView  /_NSTableHeaderViewVNSView[NSResponder  !"$&()*,./0&457]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification82D#@#? <?>OA A AA#?1_{{302, 1}, {16, 28}}+,:;]_NSCornerView: /1=>?@(CDEFGHIJLMNOPRS\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`~VWXYZ[\]^_`a[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNimidefghijklVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontopq_NSFontDescriptorAttributess1tx|WNS.keysuvwyz{_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/OWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorO\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellVWXYZ]NSControlView_NSPlaceholderString0A~YText Celldegkl#@*POB1_controlTextColor+,դ/+,]NSTableColumn/CDEFGHIJNOP #@U#@D~VWXYZ[\]`aWKomentoOM0.3333329856VWXYZÀ~CDEFGHIJNOP #@M@#@$~VWXYZ[\]`aWOikotie[headerColor  OB1C1 1VWXYZ_NSDrawsBackground~ degkl#@( "_controlBackgroundColor%&OL0.602715373N0.6666666667 1+-YgridColor01OM0.4246723652E0.5 1+,56[NSTableView57 /YNSControlZapps_table<= Ā΀@DFGIJDVNSCellŀ ƀǀ RTU S_{{15, 245}, {318, 18}}[V\]^Z_X`Wabcdeh<jOlmn_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ɀĀȀ_,Huomioi osoitukset ei-aktiivisiin ikkunoihinqrs[NSImageNameʀXNSSwitch+,vw_NSButtonImageSourcev/+,yz\NSButtonCelly/+,|}XNSButton|7 /]click_through YЀ^copy_menu_item Ҁ@FӀ ԀՀ Ti S\_{{58, 234}, {118, 26}}a\V[Z]^bW`Olc _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionҀ@ @@ !րdegkl WNSStateڀ؀Հ!ۀ܀)hNytlt__popUpItemAction:ZOtherViews1Ӏ׀݀߀(؀!ހڀi256 vri؀!ڀXTuhansia؀!ڀYMiljoonia+,_NSPopUpButtonCelly/^NSMenuItemCell+,]NSPopUpButton|7 /Udepth #^dock_apps_menu Ydock_menu _dock_window_separator @FG!" *T- S_{{18, 243}, {402, 18}}[V\]^Z_X`Wabcdeh7Olmn!ɀ񀦀_Todenna yhteydet[enable_auth?@ @FGJKӀ _{{18, 182}, {409, 23}}[V\]^Z_X`Wabcdeh?WOlmn!ɀoKoko nytn tila_enable_fullscreen_` @FGjkӀ _{{37, 116}, {409, 23}}[V\]^Z_X`Wabcdeh_wOlmn!ɀo-Salli valikkorivin kytt koko nytn tilassa_enable_fullscreen_menu  @F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthӀ  #@_{{54, 79}, {511, 31}}Z{250, 750}VWXYZd@oPValikkorivi tulee nkyviin, kun hiiren osoitin on ensisijaisen nytn ylosassa.deghkl "\controlColor+,[NSTextField7 /_enable_fullscreen_menu_text  @FGĀ    T RS::<_{{18, 130}, {402, 18}}@F  =>  #@,[V\]^Z_X`WabcdehOlmn!Ɂ o%Ota kyttn nppinvastineet X11:ss_enable_keyequivs @FG  _{{18, 166}, {402, 18}}[V\]^Z_X`WabcdehOlmn!Ɂ_ Salli yhteydet verkkoasiakkailtaZenable_tcp @FG"   _{{18, 243}, {402, 18}}@FG,-3 HI  @[V\]^Z_X`Wabcdeh9Olmn!ɁoEmuloi kolmenppimist hiirt\fake_buttonsAB  $@DFGLMDŀ !" _{{15, 184}, {402, 18}}[V\]^Z_X`WabcdehAYOlmn!Ɂ #oKohdistus seuraa hiirt_focus_follows_mouseab &*@DFGlmDŀ '( _{{15, 140}, {402, 18}}[V\]^Z_X`WabcdehayOlmn!Ɂ&)_Kohdista uusiin ikkunoihin_focus_on_new_window ,1@FG -/  ._{{18, 69}, {402, 18}}@F  KM  L[V\]^Z_X`WabcdehOlmn!Ɂ,0o-Optio-nppimet lhettvt Alt_L:n ja Alt_R:n_option_sends_alt 3O\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask458 7@x6!_'{{266, 349.03906000000001}, {625, 341}}]X11-asetuksetWNSPanelZ{320, 240}TS 91ʁ:(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsVU  T88 ; 1 (13 "@ B.,L(_{{36, 96}, {540, 28}}VWXYZd?oqKun kytss, valikkorivin nppinvastineet saattavat hirit X11-ohjelmia, jotka kyttvt Meta-muuntonppint.@F"#   AC  B_{{36, 195}, {540, 42}}@F45;  EF  #@w VWXYZd3B@DoiAktivoi hiiren keski- tai oikea painike pitmll Optio- tai Komento-nppimi painettuna osoitettaessa. _{{36, 159}, {385, 14}}VWXYZd LBGoASalli syttvalikon muutosten korvata nykyinen X11-nppinkartta._{{18, 179}, {402, 18}}[V\]^Z_X`Wabcdeh"VOlmn!ɁJo%Noudata jrjestelmn nppinasettelua_{{36, 32}, {540, 31}}@FGcdʀ OP  :VWXYZdp.NodKun kytss, Optio-nppimet lhettvt X11:n Alt_L- ja Alt_R-nppinsymbolit Mode_switchin sijaan._{{18, 8}, {418, 18}}[V\]^Z_X`WabcdehyOlmn!ɁLQo&Vierit aina sormen kulkemaan suuntaan_{{10, 33}, {579, 279}}+,  /_{{13, 10}, {599, 325}}1VZk(VNSViewYNSTabView\NSIdentifierY X:WQ1eSyte+,]NSTabViewItem/YӁj:[Q21?_ҁ]ae(@FӀ ^_ #@D_{{17, 238}, {45, 20}}VWXYZd]`fVrit:@FՁӀ bc #@x@_{{36, 216}, {392, 14}}VWXYZdado=Tm valinta tulee voimaan, kun X11 avataan seuraavan kerran.@FӀ fg #@h_{{36, 148}, {529, 28}}VWXYZdehomOttaa kyttn X11:n juuri-ikkunan. Voit siirty koko nytn tilaan ja siit pois painamalla Komento-Optio-A._{{10, 33}, {579, 279}}WTulosteYl:[T  Sm1nrvz~(@FG !l op l_{{3, 255}, {409, 23}}[V\]^Z_X`Wabcdeh-Olmn!ɁnqoOta synkronointi kyttn@F:;Al st l#@0_{{21, 213}, {554, 42}}VWXYZdHruoOttaa kyttn Kopioi-valikkokohteen ja mahdollistaa synkronoinnin Mac OS X:n leikepydn ja X11:n leikepydn ja ensisijaisen valinnan puskurin vlill.@FGSTl wx l_{{19, 129}, {410, 18}}[V\]^Z_X`Wabcdeh`Olmn!Ɂvyo;Pivit X11:n leikepyt, kun Mac OS X:n leikepyt muuttuu@FGlml {| l_{{19, 88}, {555, 34}}[V\]^Z_X`WabcdehyOlmn!Ɂz}oTPivit X11:n ensisijainen valinta (keskiosoitus), kun Mac OS X:n leikepyt muuttuu@FGl  l_{{19, 61}, {409, 23}}[V\]^Z_X`WabcdehOlmn!Ɂ~o>Pivit Mac OS X:n leikepyt heti, kun uutta teksti valitaan@FGl  l_{{19, 192}, {438, 18}}[V\]^Z_X`WabcdehOlmn!Ɂo;Pivit Mac OS X:n leikepyt, kun X11:n leikepyt muuttuu@Fl  l#@_{{33, 158}, {542, 28}}VWXYZdojPoista tm valinta kytst, jos haluat kytt xclipboardia, klipperi tai muuta X11-leikepytohjelmaa.@Fl  l_{{33, 29}, {542, 28}}VWXYZdo^X11-protokollan rajoitusten vuoksi tm valinta ei vlttmtt aina toimi kaikissa ohjelmissa._{{10, 33}, {579, 279}}jLeikepytDYŁ:[1<Aaā &(@DFDŀ  _{{23, 208}, {542, 31}}VWXYZd oKun kytss, ei-aktiivisen ikkunan osoittaminen saa hiiren osoituksen kulkemaan kyseiselle ikkunalle sen aktivoimisen lisksi.@DF  D ŀ  #@y0_{{23, 161}, {407, 17}}VWXYZd $oLX11:n ikkunakohdistus seuraa osoitinta. Tll on joitakin haittavaikutuksia.@DF 0 1Dŀ  _{{23, 106}, {542, 28}}VWXYZd =ouKun kytss, uuden X11-ikkunan luominen saa X11.appin siirtymn etualalle (Finder.appin, Pte.appin jne. sijasta)._{{10, 33}, {579, 279}}WIkkunat EY:1 I L M N(@F Y Z  _{{36, 195}, {529, 42}}VWXYZd L foX11:n avaaminen luo Xauthority-psynhallinta-avaimia. Jos jrjestelmn IP-osoite muuttuu, nist avaimista tulee virheellisi, mik saattaa est X11-ohjelmia avautumasta.@F s t  _{{36, 118}, {529, 42}}VWXYZd M oJos tm otetaan kyttn, Todenna yhteydet  pit mys ottaa kyttn jrjestelmn turvallisuuden varmistamiseksi. Kun tm on pois kytst, yhteyksi etohjelmista ei sallita.@F     #@vp_{{17, 17}, {363, 17}}VWXYZd N o@Nm valinnat tulevat voimaan, kun X11 avataan seuraavan kerran._{{10, 33}, {579, 279}}WSuojaus+, YNSTabView  /Z{625, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel L_scroll_in_device_direction _sync_clipboard_to_pasteboard" [sync_keymap n_sync_pasteboard v€_sync_pasteboard_to_clipboard zĀ_sync_pasteboard_to_primary ~ƀ_sync_primary_immediately ȀZsync_text1 ʀZsync_text2C ?̀_toggle_fullscreen_item> 3΀^x11_about_item p Ё_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  c Ӂ_minimize_window:>  3Ձ_orderFrontStandardAboutPanel:?  5 ׁ[prefs_show:E  CفUhide:I KہZterminate:F & F݁_hideOtherApplications:G , H߁_unhideAllApplications: 1 YUcopy: 7 ` ]close_window: = f \zoom_window: A C  @ F G&FG  O P&_NSHuggingPriority   T [ _S 0E_{{340, 191}, {115, 32}}[V\]^ZX`Wabcd b e A g hml@ !̀WMonista_apps_table_duplicate: n p  @ F G&FG  z {&  _{{340, 159}, {115, 32}}[V\]^ZX`Wabcd b e n hml!̀VPoista_apps_table_delete: S _apps_table_show:  @ F G&FG   &  _{{340, 223}, {115, 32}}[V\]^ZX`Wabc b e hml!̀kLis kohde_apps_table_new:  ^prefs_changed:  ^prefs_changed:"  ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ҁ ^prefs_changed:w w Yx11_help: &  _apps_table_show: i  \next_window: l _previous_window:? _enable_fullscreen_changed:C ? _toggle_fullscreen:< Ā ^prefs_changed:A   ^prefs_changed:a & ^prefs_changed:  n ^prefs_changed:  v ^prefs_changed:  z ^prefs_changed: !   ^prefs_changed: ' ~ "^prefs_changed:_ - $^prefs_changed: 3 , &^prefs_changed: 9 L (^prefs_changed:1 = ֯ >&1>?@AjBCDEFGHI'()*kw3# 5"-d?K_k!;TmD<JAM am 1" L Z M t N & A P n {>L?@$. *,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw 38:V >@C BFI.M,/LPZӀҀՀ؀׀݀߀]_acegklnprtvxz|~ŀĀǁ "&(,~8<#%&C& (+]NSApplication &    -.GH F/6! _{{302, 440}, {469, 271}}_X11-ohjelmavalikkoZ{450, 240}1 A n (1 $.8<(1 ~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView  /1 Ѐ(_{{1, 1}, {301, 28}}  F    _NSControlTarget_NSControlAction; 9::_{{1, 215}, {301, 15}}\_doScroller:+, # $ZNSScroller #7 /  F  /  ; =::_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 9 ֡ :@C = > ? @ A B C   F_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionBA__panWithGestureRecognizer:+, I J_NSPanGestureRecognizer K L/_NSPanGestureRecognizer_NSGestureRecognizer+, N/+, P Q\NSScrollView P /Z{469, 271}_{{0, 0}, {1680, 1025}}Z{450, 268}Xx11_apps1 W ֯&1111A11111111'()*k3 "?_D<DDADDaD L M N & A& n&>?@& ,/1111911111111,OPP,UW,\^^^^^^^^,su38:V   @   B  . , L:ZӀҀՀ؀؀؀؀Ӂ]ӁaӀӀӁeӁ:klnlrlvlzl~lll:ŀĀŁŁ ŁŁ&Ł:,耆~~~##C1 ֯ >&1>?@AjBCDEFGHI'()*kw3# 5"-d?K_k!;TmD<JAM am 1" L Z M t N & A P n {>L?@$. :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*,/13589;>?BCFHJKOPRSUWY\^`cfhilopsuw 38:V >@C BFI.M,/LPZӀҀՀ؀׀݀߀]_acegklnprtvxz|~ŀĀǁ "&(,~8<#%& +{}Àπр %+2ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'C1 ֯ {       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*C     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ֠C+,^NSIBObjectData/",1:?QZw#1>P^z  #.7FKT]hikt ( * , . 0 2 4 6 8 : < > @ B D F I L O R U X [ ^ a d g j m p s v y |     $ L N P R T V _ a c q z     ; I P d r |  & ( * , . 0 2 : L Y d o q s u ~     L U _ h j l n p r t v x z /8GNV_fkt   02468AZ\^`bdfhjlnprtJLNPRTVXZ\evxz|~68acefhjkmo$&(*,.0Irtvwy{|~"')+-VXZ[]_`bd')+-/13:<ikmoqsuwy{!#%'):<]_acegip %')+-/CEGIKMOQSUZgikmvy{}   %2GRn'3Lm3?LXb  "+-/89:  NZrsuwyz|~!-VXZ[]_ace$0GTfhkmprwz   8 E P ] h w !!!! !"!$!&!(!*!-!2!G!N!W!o!v!!!!!!!!!!!!!!!!!!!!!" "("H"c"l"y"~""""""""""""## ##$#0#>#F#H#J#L#N#P#W#i#~##############5w555555555566$6:6?6A6C6E6G6I6K6M6P6Z6k6t6w6y6{6|666666666666667777777&7/717R7T7V7X7Z7\7d7q777777777777777777788 8"8$8&8(808E8G8I8K8M8Y8n8q8u8w8y888888888888888899999 959B9Q9S9U9j9l9n9p9r9|9999999999999999:X:_:a:b:c:e:g:i:k:l:n:p:r:s:u:v:w::::::::::; ;;-;C;U;h;z;;;;;;;;;;;;;;;;;<<< <<*>0>;>M>O>Q>V>_>a>b>c>d>f>h>j>l>n>>>>>>>>>>>>>>>>>>>????$?&?(?*?,?.?[?]?_?a?c?e?g?i?k?m??????????????????@@@@@@@.@;@J@S@a@n@t@@@@@@@@@@@@@@@@@@@@AAAAAAA!A|A~AAAAAAAAAAAAAAAAAAAAAAAB%B'B)B+B-B/B1B3BFBRBgBiBkBmBoBqBBBBBBBBBBBBBBBBC:CC@CBCDCFCHCkCCCCCCCCCCCCDDDDDD D D DDD(DgDiDkDmDoDqDsDuDDEEEEE E EsEEEEEEEEEEEEEEEEEEEFFF@FCFEFHFKFNFPFUFG G GGG%G'G*G,G.G;GDGPG[GyGGGGGGGGGGHHHHHH H HHHHHHGHHHKHNHQHTHWHYH\H^H`HyHHHHHHHHHHHHHIIII IIMIOIQISIVIYI[I]IIIIIIIIJ9J;JMAMCMDMFMGMHMaMMMMMMMMMMN NNNNNNsNuNvNwNyN{N}N~NNNNNNNNNNNNNNNNOO&O;O=O?OBOEOGOOOOOOOOOOOOOOOOOPFPIPKPLPMPPPRPUPVPYP\P^P_PbPcPdPgPPPPPPPPQQ&Q;Q=Q?QBQEQGQQQQQQQRRRZAZBZCZFZkZnZpZsZvZyZ{[F[][[[[[[[[[\\\$\=\F\Q\T\W\Z\]\`\b\{\\\\\\\\\\\\\\\\\\\\\]] ]]]] ]"]$]']*],]]]]]]]]]]]]]]]]]]]]]^^^^^ ^^~^^^^^^^^^^^^^^^^^^^^^^^^^_t________________```B`E`G`J`L`O`R`Ta1aJaRakanaqatawaza}aaaaaaaaaaaaaaaaaaaabGbIbJbKbNbPbRbSbVbYb[b\b_b`babybbbbbbbbbcdcgcicjckcncpcsctcwczc|c}cccccccccccceeiekelemepereteuexe{e}e~eeeeeeeeeeeefdffffffffffffffffg0g2g4g6g9gg@ghFhHhIhJhMhOhQhRhUhXhZh[h^h_h`hxhhhhhhhhiFiiiiiiiiiiiiiiiijjjjjjj!j#jkkkk k k kkkkkkkkk k!k*kCkhkkkmkpkskvkxlOlllllllllllllllllmmmmmmm!mmnn'n*n-n/n2n5n8nAnNnPnSnVnYn\n_nannnnnnnnnnnnnnnnno"o%o'o*o-o0o2p3pppppppppppppppppppqqqqq q qrrrrrrrrrr!r$r&r'r)r*r+rDrirlrnrqrtrwrysfsssssssssssssssst5t8t:t;tt@tCtDtGtJtLtMtOtPtQtjttttttttvvgvjvlvmvnvpvrvuvvvyv|v~vvvvvvvvvvvvvx@xxxxxxxxxxxxxxxxxxy yyyyyyyyyyyyyyzzz1z;zBzKz^zczozzzzzzzzzzzzzz{{{{ { {{{/{1{3{6{9{;{M{b{d{f{i{l{n{{{{{{{{{{{{{{|||| |#|&|(|3|H|J|L|O|R|T|_|t|v|x|z|}||||||||||||||||}}}+}<}>}@}C}F}Y}j}l}n}q}t}}}}}}}}}}}}}}}}}}~~~~~~~6~G~I~K~N~Q~j~w~y~|~~~~~~~~~~~~~~~~~~~Qehjkloqstwz|}ڀ %(+-/19Qbegjm̀΀πЀӀՀ׀؀ۀހ<>@CFHJQfwy{~!#$'(),FЂӂՂ؂ۂ&)+.1@QSUX[j{~Ѓ҃ԃ׃ڃ#%'*-:KMORUhy{}Є %69;>APadfil{…х '8:@BDFHJMPRUXZ\^`bdgpsu҉Չ׉ډ݉/:CLORTWYbmoqtvy{Ċϊ؊ew͋֋OQSTUWY[^_bdfijknύ$Li̍Ս$-2;HQ\uŏǏɏˏ͏ϏяӏՏ׏ُۏݏߏ "%(+.147:=@CFILORUX[]_acegiknpsuwy{}ÐŐǐʐ̐ϐѐԐ֐ِېސ  "$&),.02468;D  "$&(*,.02468:<>@BDFHJLNPRTVY\_behknqtwz}“œȓ˓Γѓԓדړݓ "%(+.0247:=@CFILORUX[^`bdfhjlnpsvx{~ÔƔɔ̔ϔҔՔؔ۔ޔ  #&),/258;>ADGJMPS\"%'*-0369ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ÙřǙə˙͙ϙљәՙיٙۙݙߙ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÚŚǚɚ˚͚ϚњӚ՚ךٚۚݚߚ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegirsu~xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/Localizable.strings0000644000175000017500000001045014757411105022571 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Haluatko varmasti lopettaa X11:n?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Kaikki avoimet X11-ohjelmat lopetetaan vlittmsti ja tallentamattomat muutokset menetetn."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Siirrytnk RandR-tilaan?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Ohjelma on pyytnyt X11:t muuttamaan nytn tarkkuutta. X11 palauttaa nytn edelliseen tilaan, kun pyytv ohjelma pyyt palaamaan edelliseen tilaan. Voit mys pakottaa X11:n palaamaan edelliseen tilaan nppinyhdistelm #%#A kytten."; /* No comment provided by engineer. */ "Allow" = "Salli"; /* No comment provided by engineer. */ "Always Allow" = "Salli aina"; /* No comment provided by engineer. */ "Cancel" = "Kumoa"; /* No comment provided by engineer. */ "Mac Help" = "Mac-ohje"; /* No comment provided by engineer. */ "Quit" = "Lopeta"; /* No */ "No" = "Ei"; /* Yes */ "Yes" = "Kyll"; /* Terminal */ "Terminal" = "Pte"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Sinulla on jo ~/.xinitrc-tiedosto.\n\nX11-ohjelmien nyttmiss ikkunoissa ei vlttmtt ole otsikkopalkkeja tai ne saattavat nytt erilaisilta kuin natiiviohjelmien nyttmt ikkunat.\n\nHaluatko siirt olemassa olevan tiedoston syrjn ja kytt standardia X11-ymprist, kun seuraavan kerran kynnistt X11:n?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Etsi X11-pivityksi..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/fi.lproj/locversion.plist0000644000175000017500000000061014757411105022172 LprojCompatibleVersion 106.3 LprojLocale fi LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/0000755000175000017500000000000014757411135017627 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/main.nib/0000755000175000017500000000000014757411135021322 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib0000644000175000017500000021367114757411105024040 Quand cette option est activée, les raccourcis système (ex. ⌘Q) qui gênent parfois les applications X11 ne sont pas interprétés localement, mais transmis en l'état à X11. Maintenez la touche Option ou Commande enfoncée tout en cliquant pour activer le bouton droit ou central de la souris. Quand cette option est activée, les modifications du menu d’entrée pour remplacer la disposition des touches du clavier à prise en compte par X11. Active la commande de menu « Copier » et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mémoires tampons principales (PRIMARY). En cas d’activation de cette option, si vous cliquez sur une fenêtre inactive, celle-ci deviendra active et le clic sera effectif. Lorsque cette option est activée, la création d’une nouvelle fenêtre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.) Le lancement d’X11 créera des touches de contrôle d’accès Xauthority. Si l’adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d’empêcher le lancement des applications X11. En cas d’activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d’applications distantes sont interdites. xorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects.nib0000644000175000017500000013302414757411105024407 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata# %)*048   %4;<CDENXY^abkstu~ "#,345=>GNOPZ[_cjklmstz#&/018@AEKXYabefinoqt~   #29<=Q[_`abist~ !"*+0569:@NWXhpqrx&'(.PQRST[_qu  #$,-<=EFTU]^_`gny*+2345<ETU]^lmuv        & ' - . 4 5 ; < B C H I M R S X Y ^ _ d e j k p q v w { |         ! " ' ( - . 3 4 9 : ? @ E F K L Q R W X ] ^ c d i j o p u v { | # & ' 8 9 : ; B _ f j k l o s t V 9 - , o 7 !z"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeys?=!! ">&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ &wyր؀ڀ܀"āƁȁʁ́΁Ёҁԁցށ  #XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector %WNSTitle[NSMenuItems$TMenu1#]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P[NSClassName^NSResourceNameWNSImage_NSMenuCheckmark+,_NSCustomResource/ɀ_NSMenuMixedState+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction\ApplicationsP^submenuAction:$1 !#  "nPersonnaliser &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu 'v   VNSName$)(uXMainMenu1*JPXo#',,+SX11"$$-+I1&'()*+,-./012.0349:=>ACEF#9,/n propos d X11@A,21lPrfrences &Q,,  SSU,665XServices[U]$7581_#__NSServicesMenu,  mpq,<;oBasculer en mode plein cranQa,  UNSTag,@*?[Masquer X11Qhm,@B_Masquer les autres,D]Tout afficher,  ,HG[Quitter X11Qq\_NSAppleMenu'KKL$1MN#K  KOnPersonnaliser &'RRQgditionST$gdition1U#RWVVCopierQc'ZZYgFentre$\[ngFentre1]`cefikl# Z_^VFermerQwZba_Placer dans le DockQm ZdoRduire/agrandirZ  01ZhgoFaire dfiler les fentresQ`70;Zhjo*Faire dfiler les fentres en sens inverseZ  LZm_Tout ramener au premier plan^_NSWindowsMenuUUW'qqpTAideW]pr$1`as#UhqtXAide X11[_NSMainMenuTmenuq Mx^apps_separatorwx z#{|}~  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor_#NSTableViewDraggingDestinationStyle\NSHeaderView[NSRowHeightYNSEnabled_NSControlSendActionMask_ NSControlAllowsExpansionToolTips #@{{|R #@}#@1 |~wwYNSBGColorXNSBoundsYNScvFlags]NSNextKeyViewWNSFrameYNSDocView_#NSAutomaticallyAdjustsContentInsetsZNSSubviews( z'z)$$ &Z{348, 202}~|w_NSViewIsLayerTreeHost[NSTableView ~~ z~|)+ *$$}} Y{348, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder~|ʀ X{15, 20}+,]_NSCornerView/1#    w\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@a#@O]`z[NSCellFlags[NSTextColor\NSCellFlags2ZNSContents@SNom ! "WNSWhite\NSColorSpaceM0.3333329856+,$%WNSColor$/' ()"+,-.[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColor2 345 6"\NSComponents_NSCustomColorSpaceB0C0 19:;<=>?TNSIDUNSICCWNSModel OhhapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt $#wtpt HkTRC \ descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK8caES8viVN@"ptBRJbukUA,frFU>huHU4zhTWJnbNO:hcsCZ(heIL$itITNroRO*plPLJruRU:FenUS<arEG,Vaeobecn siv gama 2,2Generisk gr 2,2 gammaprofilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^ 2.2 r_icϏGenerisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Profilo grigio generico della gamma 2,2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2| ֌  2.2 \ |fnpp^|ep 2.2 cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,21I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 Profile:'E' 2.2 DHF 1E'/J 9'EtextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,BC\NSColorSpaceD/\NSColorSpace+,FG_NSTableHeaderCellFHIJ/_NSTextFieldCell\NSActionCellVNSCellLMNOwQRTUVW]NSControlViewYNSSupport_NSPlaceholderString0AzYText CellZ[\]^_`VNSSizeXNSfFlagsVNSName#@*_.AppleSystemUIFont+,cdVNSFontc/P g "B1' ()"k,-._controlTextColor+,HpHIJ/+,rs]NSTableColumnr/vw   {|w #@U#@DzXCommande  "M0.3333329856LMNOwQRTUVWz   w #@L@#@$zYRaccourci' ()",-[headerColor2 3 6"B1C1 1LMNOwQUVW_NSDrawsBackgroundz Z[\_`#@( ' ()",-_controlBackgroundColor2 3 6"L0.602715373N0.6666666667 1' ()",-ȀYgridColor2 3 6"M0.4246723652E0.5 1+,[NSTableView/YNSControlZapps_table |}~VNSCell |~C _{{15, 245}, {402, 18}}LM> R_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q o,Activation des fentres inactives en un clic  [NSImageNameXNSSwitch+, _NSButtonImageSource /+,\NSButtonCellIJ/+,XNSButton/]click_through U^copy_menu_item ! €Հ|}~&())-.1 ƀĀ|~46CY L1:#_{{90, 234}, {128, 26}}>?L@MABC DEG WKR OP_NSPreferredEdgeZNSMenuItem_NSMenuItemRespectAlignment_NSUsesItemFromMenu]NSAltersState_NSArrowPosition@@ǀ@  Ȁ RS K(ZWNSStateʀȀƀ\]ˀ̀$[du moniteur__popUpItemAction:ZOtherViews1cEefgǀ̀πр#K(opSȀ΀ʀ\256 couleursK(z{SȀЀʀXmilliersK(SȀҀʀXmillions+,_NSPopUpButtonCellIJ/^NSMenuItemCell+,]NSPopUpButton/Udepth ׀^dock_apps_menu ـYdock_menu ۀ_dock_window_separator ݀|}~ ހ|~C _{{18, 243}, {402, 18}}LM> R݀ြ_Authentifier les connexions[enable_auth |}~)) À_{{18, 182}, {409, 23}}LM> R瀼oMode plein cran_enable_fullscreen |}~)) À_{{37, 116}, {468, 18}}LM> R퀼o;Autoriser un accs la barre des menus en mode plein cran_enable_fullscreen_menu  |}~-))_%NSTextFieldAlignmentRectInsetsVersion_NSAntiCompressionPriority_NSPreferredMaxLayoutWidthÀ #@|_{{54, 79}, {466, 31}}Z{250, 750}LM Q%&V()@olLa barre des menus sera visible lorsque le curseur de souris est plac en haut de votre affichage principal.Z[\,-_`#@& ' ()"2,-\controlColor+,78[NSTextField7/_enable_fullscreen_menu_text=> |}~CDFHH ~|PRSSUCB ,** _{{18, 126}, {456, 18}}|}~-H_`Heg -. #@~LM>=m RoFEchappe les raccourcis systme et envoi les touches quivalentes X11_enable_keyequivsuv |}~{} ހ_{{18, 166}, {402, 18}}LM>u Ro*Autoriser les connexions de clients rseauZenable_tcpU  |}~HH    _{{18, 243}, {402, 18}}|}~-HHe 02 1LM>U R  o!muler une souris trois boutons\fake_buttons |}~ _{{15, 184}, {402, 18}}LM> Ro/Activation des fentres survoles par la souris_focus_follows_mouse |}~ _{{15, 140}, {402, 18}}LM> Ro!Activation des nouvelles fentres_focus_on_new_windowg !|}~HH _{{18, 69}, {402, 18}}|}~-HHe 8: 9LM>g# R _*Les touches option envoient Alt_L et Alt_R_option_sends_alt+, #/0123456789:;<=>?@BCDEFHIHKL-MN \NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowStyleMask$%( '@x&_'{{414, 417.03906000000001}, {580, 341}}oPrfrences d X11WNSPanelZ{320, 240}|~WZC )1\S*#`ab|c~deHhRDk>Do_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsFE D(( +1rH#1vUC=g  195#_{{36, 96}, {461, 28}}LMNCQ%&V)/oQuand cette option est active, les raccourcis systme (ex. #Q) qui gnent parfois les applications X11 ne sont pas interprts localement, mais transmis en l'tat X11._{{36, 205}, {484, 34}}|}~HH 546LMNQ%&V) 3owMaintenez la touche Option ou Commande enfonce tout en cliquant pour activer le bouton droit ou central de la souris. _{{18, 179}, {402, 18}}|}~-HHe= ?@ LM> R17o7Suivre la disposition des touches du clavier du systme_{{36, 37}, {484, 28}}|}~SHH *<=LMQ%&V);obUne fois actives, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch._{{18, 8}, {418, 18}}LM> R9>o;Faire toujours dfiler dans le sens du mouvement des doigts_{{36, 150}, {484, 29}}LMNQ%&V)5AoQuand cette option est active, les modifications du menu d entre pour remplacer la disposition des touches du clavier prise en compte par X11._{{10, 33}, {534, 279}}+,/_{{13, 10}, {554, 325}}1dFJ[#)&HSVNSViewYNSTabView\NSIdentifierIH*GQ1fEntre+,]NSTabViewItem/)&)SIÁZ*KQ21    MQU#|}~-))!À NO #@P_{{17, 238}, {71, 20}}LMN QR&*V)MPjCouleurs:|}~-)45):À RS #@x@_{{36, 216}, {392, 14}}LMNQ%&CV)QTo5Cette option prend effet au prochain lancement d X11.|}~-)MN)eÀ VW _{{36, 145}, {484, 31}}LMNQ%&[V)UXozActive la fentre root X11. Utilisez le raccourci clavier Commande+ Option+ A pour ouvrir et fermer le mode plein cran._{{10, 33}, {534, 279}}VSortie)&cdSI\*K|~ikC~ ]1opqrstuvw^bfjnrvz#|}~|~cc _`\\_{{18, 255}, {409, 23}}LM>p R^a_Activer la synchronisation|}~-cc\ cd \#@~_{{36, 207}, {494, 42}}LMqQ%&V)beoActive la commande de menu Copier et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mmoires tampons principales (PRIMARY).|}~cc gh\\_{{34, 129}, {458, 18}}LM>r Rfio=Mettre jour CLIPBOARD lorsque le presse-papiers est modifi|}~cc kl\\_{{34, 104}, {495, 18}}LM>s RjmoJMettre jour PRIMARY (clic central) lorsque le presse-papiers est modifi|}~cc op\\_{{34, 79}, {437, 18}}LM>t RnqoAMettre jour le presse-papiers ds la slection de nouveau texte|}~cc st\\_{{34, 192}, {474, 18}}LM>u Rruo=Mettre jour le presse-papiers lorsque CLIPBOARD est modifi|}~-c  c\ wx \#@}_{{48, 158}, {482, 28}}LMvQ%&V)vyovDsactivez cette option si vous voulez utiliser xclipboard, klipper, ou tout autre gestionnaire de presse-papiers X11.|}~-c#$c\ {| \_{{48, 47}, {482, 28}}LMwQ%&V1)z}_qEn raison de limitations du protocole X11, cette option ne fonctionnera pas toujours dans certaines applications._{{10, 33}, {534, 279}}^Presse-papiers)&9SI*K1=?AC#|}~-LMR  #@P_{{23, 208}, {505, 31}}LMN?Q%&[V)oEn cas d activation de cette option, si vous cliquez sur une fentre inactive, celle-ci deviendra active et le clic sera effectif.|}~-efR  _{{23, 150}, {505, 28}}LMNAQ%&sV)oQL activation des fentres X11 suit le curseur. Ceci comporte des effets adverses.|}~-}~R  _{{23, 92}, {505, 42}}LMNCQ%&V)oLorsque cette option est active, la cration d une nouvelle fentre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.)_{{10, 33}, {534, 279}}hFentres)S&Iށ*1u݁#|}~-eހ  _{{36, 195}, {484, 42}}LMNQ%&V)oLe lancement d X11 crera des touches de contrle d accs Xauthority. Si l adresse IP du systme change, ces touches ne seront plus valides, ce qui risquera d empcher le lancement des applications X11.|}~-eހ  _{{36, 104}, {484, 56}}LMNQ%&V)oEn cas d activation de cette option, Authentifier les connexions doit aussi tre active pour garantir la scurit du systme. En cas de dsactivation, les connexions partir d applications distantes sont interdites.|}~-ހ  #@y_{{17, 17}, {404, 14}}LMNQ%&V)o7Ces options prennent effet au prochain lancement d X11._{{10, 33}, {534, 279}}hScurit+,YNSTabView/Z{580, 341}_{{0, 0}, {2560, 1417}}Z{320, 262}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+,_NSWindowTemplate/[prefs_panel 9_scroll_in_device_directionu  r_sync_clipboard_to_pasteboard  1[sync_keymapp  ^_sync_pasteboardr  f_sync_pasteboard_to_clipboards  j_sync_pasteboard_to_primaryt $ n_sync_primary_immediatelyv + vZsync_text1w 2 zZsync_text2, 9 :_toggle_fullscreen_item' @ .^x11_about_item F Gl _bring_to_front:+, J K_NSNibControlConnector J L/^NSNibConnector P G` Á_minimize_window:' V G.Ł_orderFrontStandardAboutPanel:( \ G0 ǁ[prefs_show:. b G>ɁUhide:2 h GFˁZterminate:/ n GÁ_hideOtherApplications:0 t GCρ_unhideAllApplications: y GUсUcopy:  G] Ӂ]close_window: Gc Ձ\zoom_window: G׀ ݁|}~   -  _NSHuggingPriority ؀ ځۀ |~  C #91 #_{{372, 191}, {162, 32}}LM RP@ ׁ܀YDupliquer_apps_table_duplicate: G߀ |}~   -  ؀  1 #_{{372, 159}, {162, 32}}LM RP߁〼YSupprimer_apps_table_delete: GN _apps_table_show: G |}~   -  ؀  1 #_{{372, 223}, {162, 32}}LM RP쀼oAjouter un lment_apps_table_new:U  G ^prefs_changed:=  G ^prefs_changed: G1 ^prefs_changed:  G݀ ^prefs_changed:u  G ^prefs_changed:  G€ ^prefs_changed:a % Gs Yx11_help: + G! _apps_table_show: 1 Gf \next_window: 7 Gi _previous_window: = G _enable_fullscreen_changed:, C G: _toggle_fullscreen: I G ^prefs_changed: O G  ^prefs_changed: U G  ^prefs_changed:p [ G^  ^prefs_changed:r a Gf ^prefs_changed:s g Gj ^prefs_changed:u m Gr ^prefs_changed:t s Gn ^prefs_changed: y G ^prefs_changed:g  G ^prefs_changed: G9 ^prefs_changed:1 " '()*S+,-./012Ua+DSdHUC`=Fg) (KEefg 5N cp~qrstuv w$?MAfC~u}  wv   '*,.03469:=>ACEFJKMNPRUXZ]`cefikloqs #(*F  . 216:9=5@JÀ€ƀȀǀ̀πсMOQSUW[\^`bdfhjlnprtvxz|ހ݀؁ׁہ߁${z,0} !7& $(]NSApplication/0123456789:;<=>? ( *C - .H 1HK 4-MN 7 !؁;< :"& _{{302, 440}, {548, 271}}oMenu de l application X11Z{320, 240}1 <  ׁ݁߁$# C D E F G| H I J K~ L M N Q R T    Y Z [  ^_NSMaxMagnification_NSMagnificationXNSsFlags]NSContentView[NSVScroller_NSHeaderClipView\NSScrollAmts_NSMinMagnification[NSHScroller_NSGestureRecognizers#@#? {22{80؁؀~OA A AA#?%,31 `  {~,0#1 gwz#_{{1, 0}, {348, 230}}_{{0, -28}, {348, 230}}+, m nZNSClipView m/1 p}#_{{1, 0}, {348, 28}}| u E}~ vP |   _NSControlTarget_NSControlAction$$$/ -$.._{{1, 214}, {348, 16}}\_doScroller:+, ZNSScroller /| u}~ v |   $$$/ 1$.._{{333, 28}, {16, 202}}_{{20, 20}, {350, 231}}1 " 47   _.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.action6$$5__panWithGestureRecognizer:+, _NSPanGestureRecognizer /_NSPanGestureRecognizer_NSGestureRecognizer+, /+, \NSScrollView /Z{548, 271}_{{0, 0}, {2560, 1417}}Z{320, 262}Xx11_apps1 "*U+DSdHUHCHH=HHHgHHS) (KKKK) ))))) ScpcqcrcsctcucvcwS?ACSu  www ր'*,,,,4,,,,,,,,'JKK'PR'XZZZZZZZZ'oq#(*F  195*JÀ€ƀȀȀȀȀÁMÁQÀÀÁUÀ*[\^\b\f\j\n\r\v\z**ހ݀ށށށށ؁ׁ؁߁؁${zzz$$$؁71 W " '()*S+,-./012Ua+DSdHUC`=Fg) (KEefg 5N cp~qrstuv w$?MAfC~u}  wv   :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~'*,.03469:=>ACEFJKMNPRUXZ]`cefikloqs #(*F  . 216:9=5@JÀ€ƀȀǀ̀πсMOQSUW[\^`bdfhjlnprtvxz|ހ݀؁ׁہ߁${z,0} ! &wyր؀ڀ܀"āƁȁʁ́΁Ёҁԁցށ  71 : " ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~       @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁     7     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1#1 "7+,^NSIBObjectData/",1:?QZw (:Hdw !05>GRSU^krx        " $ & ( * , . 0 2 5 8 ; > A D G J M P S V Y \ _ b e h k n q t w z }  5 7 9 ; = ? H J L Z c l ! / 6 J X b m z      / 8 C H u ~          ? A C E G I K h q    BDFHJLNPRTXikmoqz 9;dfhikmnpr!#$&(IKPRTVXZ68:<>@BW|~BDFHJLNPRTacegpuwy{)+-/13579;JWY[]luxz|(1BDFHJLNPRTuwy{}HJLMOQRTVwy{}Enprsuwxz|  (*,.7:<>_acegiktanw5P\} >Rnx CEHJLNOQRTU^`aceghikpy-8:=>@BEGJMPSTWYd &/CJVoqstvx %4FNYZ\^giklnw"'<HV^`bdfho1[1d1q1v11111111222$2)2+2-2/212325272:2D2U2\2e2l2u2x2z2|22222222222222223333D3E3G3I3K3L3N3W3`3b3{3}3333333333333334 4 4 444444%4'4@4B4D4F4H4R4g4i4k4m4o4{44444444444444445555555!5#5%5>5S5`5o5q5s55555555555555556666666f6m6n6o6q6r6t6u6w6y6z6|6~6666666666677!777I7\7n777777777777778 888 8"8+848J8O8X8e8n8w8888888888888888959697999:9<9>9?9A9B9D9F9H9I9K9h9k9n9o9r9t9v999999::$:9:G:Y:b:d:f:k:m:o:p:r:t:u:v:x:z::::::::::::::::;; ;;;;;;;J;L;N;P;R;T;V;X;Z;\;i;;;;;;;;;;;;;;;;;;;;;;<<<#<2<;>>0>2>4>6>8>:>>>>>>>>>>>>>>>>>>>>>>??.?C?E?G?I?K?M????????????????@@@@@@ @@@@@@@@AA:AVArAtAuAvAxAzA{A}AAAAAAAAAAAAAAAAABBBBBBBBBBBC CCC*CHC]C_CaCcCfChCCCCCCCCCCCCCCCCCCCCDDDDDyD{D|D}DDDDDDDDDDDDDDDDDDDDErEEEEEEEEEEEEEEEEFFFFFFWFYF[F]F`FcFeFgFFFFFFFFG9G:G;G>GAGBGEGFGHGJGKGMGOGPGiGGGGGGGGGGGGGGGHHHHHH"H$H&HkHxHHHHHHHHHHHHHHHHHHHIIJILINIPISIVIXIZIIIIIIIIJ=J>J?JBJCJFJGJIJKJLJNJPJQJjJJJJJJJJJKK#K%K'K*K-K/K~KKKKKKKKKKKKKKLL L L LLLLLLLLLLL!LZL\L^L`LcLfLhLjLLLLLLLLMM#MCMQM[MhMrMMMMMMNNN)N5NINLNNNQNTNWNZN]N^NaNdNgNjNmNrNuNwNNNNNNNNNOOO OOOOTOlO{OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOPPP=P?PAPCPEPGPJPLQQR R R RRRRRRRRRR!R"RGRJRLRNRPRRRURWSHSaSSSSSSSSSSSSSSST TTTTTTTTTTTTTTTUUUUUU U U U-U0U2U4U6U8U;VVVRVTVVVXV[V^V`VbVVWWWW W"W$W'W)XPXiXrXyXXXXXXXXXXXXXXXXXXXYY YY$Y)YBYDYGYIYLYOYRYTY]YlYnYqYtYvYxY{Y}YYYYYYYYYYYYYYYYZ Z2Z5Z7Z9Z;Z=Z@ZBZWZZZZZZZZZZZZZZZZ[ [[[[[[[[[[[[[[[[[[[[[[\\3\6\8\:\<\>\A\C]:]S]Z]s]u]x]{]~]]]]]]]]]]]]]]]]]]]]^.^/^0^3^4^7^8^;^>^?^A^C^D^]^^^^^^^^^_____!_#_$_'_*_,_-_0_1_:_;_T_u_x_z_|_~__`a%a&a'a*a+a.a/a2a5a6a8a:a;aTaaaaaaaabbebfbgbjbkbnbobrbubvbxbzb{bbbbbbbbbctccccccccccccccd&d(d*d,d/d2d4d6deeee e eeeeeeeee5enepereteweze|e~efRfTfUfVfYf[f\f_fbfdfefhfifrfsffffffffghhhhhh h hhhhhhhh1hRhUhWhYh[h]h`hhhiiiiii"i%i.i;i=i@iCiFiIiLiNiiiiiiiiiiiiiiiijjjj j j jjkkpkrksktkvkxkyk|kkkkkkkkkkkkkkklylllllllllllllllm#m&m(m*m,m.m1m3nfnnnnnnnnnnnnnnnno-o/o0o1o3o5o6o9oo?oAoBoCo\ooooooooq(qqqqqqqqqqqqqqqqqqqqqqqsssssssttttt t t ttt.tStVtXtZt\t^tatctttuuuu%u>uIuluvu}uuuuuuuuuuuuuvvvv v(v=v?vAvDvGvIvUvjvlvnvqvtvvvvvvvvvvvvvvvvwwwww"w%w'wBwWwYw[w^wawcwnwwwwwwwwwwwwwwwwwwwwxxxxxxx/x8xPxWxfxwxyx{x~xxxxxxxxxxxxxxyy y yyyy(y*y,y/y2y=yNyPyRyUyXyqyyyyyyyyyyyyyyyyyyyyzzzz"z%z'z*z-zzzzzzzzzzzzzzzzzzzzzzzzzzz{{8{A{C{E{J{L{O{R{T{V{`{x{{{{{{{{{{{{{{{{{{{|| | ||(|]|_|a|d|g|i|k|u||||||||||||}'}(})},}.}/}2}5}7}8};}<}=}?}B}K}L}N}h}}}}}}}}}}}~~~~ ~~)~+~-~0~3~B~S~V~X~[~^~m~~~~~~~~~~~~~~~~~~~~~"$&),?PRTWZgxz|'8;=@CRcfhkn}ĀӀ):=?BETegilo~Łԁ݃!#%')+-/13579;=?ACEGIKMOQSUWY[]`cfiknqsvy|~ÃŃȃ˃̓σ҃Ճ؃ۃރ  #&),/1358;>ADGJMPSVY\_bdfhjlnpruxz} !ADGJMPSVY\_behknqtwz}”ŔȔ˔ΔєԔהڔݔ "%(+.147:=@CFILORUX[^adgjmpsvy|ĕǕʕ͕Еӕٕ֕ܕߕ !$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~–ĖƖȖʖ̖ΖЖҖԖ֖ؖږܖޖ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~—ėƗȗʗ̗՗֗ؗxorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013733014757411105025132 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata/ %)*048#$,67<KRSZ[\eopuxy '()0129:CJKLTU^efgqrvz  9:=CXefpqukQ #().34 9=>DU^_tuyz}  -67?@AGVW_`agvw():BCDJYZbcdjyz '/01AIJKSTU]^_ovwx*+34EFMN]^fgvw    " # + , < = E F G H N V f g o p          " # ( ) . / 4 5 9 : ? @ E F K ] f g q r s x         # $ ) * / 0 5 6 ; < A B     & ' ( + < = > B M N S U X Y Z [ \ K n h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysLJ*--,.K&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +|~ĀЀҀ  &,3āƁȁʁ́΁ЁӁՁׁفہ݁߁   "$&((XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMenu1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\ApplicationsP^submenuAction: $)1%&(#   #!'nPersonnaliser &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,{ !"VNSName).-zXMainMenu1%&'()*/OU]t(113,!110"SX1193;)20N1=>?@ABCDEFGHI3589>?BCFHJK(1P1!4n propos d X111WX176lPrfrences &Q,11  1jjl1!;;:"XServicesrlt)<:=1v(__NSServicesMenu11  11A@oBasculer en mode plein cranQa11  1UNSTag1E*D[Masquer X11Qh11EG_Masquer les autres11!I]Tout afficher11  11ML[Quitter X11Qq\_NSAppleMenu,!PP " Q)1ԀRS(P  P!TnPersonnaliser &,!WWV"gditionXY)gdition1Z(W\[VCopierQc   ,!__^"gFentre)a`sgFentre1behjknpq( $%_dcVFermerQw -._gf_Placer dans le DockQm 7_!ioRduire/agrandir _   GH_mloFaire dfiler les fentresQ` NGR_moo*Faire dfiler les fentres en sens inverse _   c_!r_Tout ramener au premier plan^_NSWindowsMenulln,!vvu"TAidentuw)1wxx(lv!yXAide X11[_NSMainMenuTmenu R}^apps_separator À'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@€R #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews5 46 3Z{333, 186}[NSTableView_NSViewIsLayerTreeHost   86 7Y{333, 17}+,  _NSTableHeaderView /_NSTableHeaderViewVNSView[NSResponder  !"#%')*+-/01'568]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification92E#@#? =@?OA A AA#?2_{{334, 1}, {16, 28}}+,;<]_NSCornerView;/1>?@A(DEFGHIJKLNOPQRTUV\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@a#@O]`YZ[\]^_`abcd[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@SNomghijklmnoVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontrst_NSFontDescriptorAttributesv1w{WNS.keysxyz|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/QWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorQ\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellYZ[\]T]NSControlView_NSPlaceholderString0AYText Cellghjno#@*PQB1_controlTextColor+,ؤ/+,]NSTableColumn/DEFGHIJKLPQRT #@U#@DYZ[\]^_`cdXCommandeQM0.3333329856YZ[\]TƀDEFGHIJKLPQRT #@L@#@$YZ[\]^_`cdYRaccourci  [headerColorQB1C1 1YZ[\]T_NSDrawsBackground ghj no#@(%'_controlBackgroundColor*+QL0.602715373N0.6666666667 102YgridColor56QM0.4246723652E0.5 1+,:;[NSTableView:</YNSControlZapps_tableAB ŀπEIKLNOIVNSCellƀ ǀȀ WYZ T_{{15, 245}, {402, 18}}`Yabc]d[eZfghijmAoQqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ʀŀɀo,Activation des fentres inactives en un clicvwx[NSImageNameˀXNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton</]click_through Zр^copy_menu_item ӀEKԀ Հր Yj T]_{{90, 234}, {128, 26}}faY`]bcgZeQqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionӀ@ @@ !׀ghjno WNSStateۀـր!܀݀)[du moniteur__popUpItemAction:ZOtherViews1؀؀ހ(ـ!߀ۀ\256 couleursـ!ۀXmilliersـ!ۀXmillions+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton</Udepth #^dock_apps_menu Ydock_menu _dock_window_separator E"KL&'" /Y2 T_{{18, 243}, {402, 18}}`Yabc]d[eZfghijm<Qqrs!ʀ򀧀_Authentifier les connexions[enable_authDE EKLOPԀ _{{18, 182}, {409, 23}}`Yabc]d[eZfghijmD\Qqrs!ʀoMode plein cran_enable_fullscreende EKLopԀ _{{37, 116}, {468, 18}}`Yabc]d[eZfghijmd|Qqrs!ʀo;Autoriser un accs la barre des menus en mode plein cran_enable_fullscreen_menu  EK_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthԀ  #@|_{{54, 79}, {466, 31}}Z{250, 750}YZ[\]i@olLa barre des menus sera visible lorsque le curseur de souris est plac en haut de votre affichage principal.ghjkno '\controlColor+,[NSTextField</_enable_fullscreen_menu_text  EKLɀ   Y ST;;=_{{18, 130}, {402, 18}}EK  FG  #@~-`Yabc]d[eZfghijmQqrs!ʁ o)Activer les touches quivalentes sous X11_enable_keyequivs E"KL"  _{{18, 166}, {402, 18}}`Yabc]d[eZfghijm Qqrs!ʁo*Autoriser les connexions de clients rseauZenable_tcp EKL !'   _{{18, 243}, {402, 18}}EK239  BD  C`Yabc]d[eZfghijm?Qqrs!ʁo!muler une souris trois boutons\fake_buttonsGH !%EIKLRSIƀ "# _{{15, 184}, {402, 18}}`Yabc]d[eZfghijmG_Qqrs!ʁ!$o/Activation des fentres survoles par la souris_focus_follows_mousegh '+EIKLrsIƀ () _{{15, 140}, {402, 18}}`Yabc]d[eZfghijmgQqrs!ʁ'*o!Activation des nouvelles fentres_focus_on_new_window -2EKL .0  /_{{18, 69}, {402, 18}}EK  >@  ?`Yabc]d[eZfghijmQqrs!ʁ-1_*Les touches option envoient Alt_L et Alt_R_option_sends_alt 4Q\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask569 8@x7!_'{{414, 417.03906000000001}, {580, 341}}oPrfrences d X11WNSPanelZ{320, 240}YT :1ρ;(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsWV  U99 < 1 (1 '9/ C?-M(_{{36, 82}, {484, 42}}EK   LN  MYZ[\]iT,/AoQuand cette option est active, les touches quivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d instructions virtuelles._{{36, 203}, {484, 34}}EKL9: IJ   YZ[\]i'TFEowMaintenez la touche Option ou Commande enfonce tout en cliquant pour activer le bouton droit ou central de la souris. _{{36, 144}, {484, 29}}YZ[\]iTPHoeAutorise les modifications du menu d entre pour remplacer la disposition des touches du clavier X11._{{18, 179}, {402, 18}}`Yabc]d[eZfghijm9ZQqrs!ʁCKo9Utiliser la disposition des touches du clavier du systme_{{36, 35}, {484, 28}}EKLghπ PQ  ;YZ[\]it?OobUne fois actives, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch._{{18, 8}, {418, 18}}`Yabc]d[eZfghijm}Qqrs!ʁMRo;Faire toujours dfiler dans le sens du mouvement des doigts_{{10, 33}, {534, 279}}+,/_{{13, 10}, {554, 325}}1W[l(VNSViewYNSTabView\NSIdentifierZ Y;XQ1fEntre+,]NSTabViewItem/Zԁk;\Q21DdӁ^bf(EKԀ _` #@P_{{17, 238}, {71, 20}}YZ[\]iT^ajCouleurs:EKفԀ cd #@x@_{{36, 216}, {392, 14}}YZ[\]iTbeo5Cette option prend effet au prochain lancement d X11.EKԀ gh _{{36, 145}, {484, 31}}YZ[\]iTfiozActive la fentre root X11. Utilisez le raccourci clavier Commande+ Option+ A pour ouvrir et fermer le mode plein cran._{{10, 33}, {534, 279}}VSortieZm;\ Y  Tn1osw{(EKL#$m pq m_{{18, 255}, {409, 23}}`Yabc]d[eZfghijm0Qqrs!ʁor_Activer la synchronisationEK=>Dm tu m#@~_{{36, 207}, {494, 42}}YZ[\]iKsvoActive la commande de menu Copier et permet la synchronisation entre le presse-papiers de OSX, celui de X11 (CLIPBOARD) et les mmoires tampons principales (PRIMARY).EKLVWm xy m_{{34, 129}, {458, 18}}`Yabc]d[eZfghijmcQqrs!ʁwzo=Mettre jour CLIPBOARD lorsque le presse-papiers est modifiEKLopm |} m_{{34, 104}, {495, 18}}`Yabc]d[eZfghijm|Qqrs!ʁ{~oJMettre jour PRIMARY (clic central) lorsque le presse-papiers est modifiEKLm  m_{{34, 79}, {437, 18}}`Yabc]d[eZfghijmQqrs!ʁoAMettre jour le presse-papiers ds la slection de nouveau texteEKLm  m_{{34, 192}, {474, 18}}`Yabc]d[eZfghijmQqrs!ʁo=Mettre jour le presse-papiers lorsque CLIPBOARD est modifiEKm  m#@}_{{48, 158}, {482, 28}}YZ[\]iovDsactivez cette option si vous voulez utiliser xclipboard, klipper, ou tout autre gestionnaire de presse-papiers X11.EKm  m_{{48, 47}, {482, 28}}YZ[\]i_qEn raison de limitations du protocole X11, cette option ne fonctionnera pas toujours dans certaines applications._{{10, 33}, {534, 279}}^Presse-papiersIZƁ;\1AGgŁ!'(EIK  I ƀ  #@P_{{23, 208}, {505, 31}}YZ[\]iT oEn cas d activation de cette option, si vous cliquez sur une fentre inactive, celle-ci deviendra active et le clic sera effectif.EIK  I ƀ  _{{23, 150}, {505, 28}}YZ[\]iT (oQL activation des fentres X11 suit le curseur. Ceci comporte des effets adverses.EIK 5 6I ƀ  _{{23, 92}, {505, 42}}YZ[\]iT BoLorsque cette option est active, la cration d une nouvelle fentre X11 fait passer X11.app au premier plan (au lieu de Finder.app, Terminal.app, etc.)_{{10, 33}, {534, 279}}hFentres" KZ;1 O R S T(E"K _ `"  _{{36, 195}, {484, 42}}YZ[\]i RT loLe lancement d X11 crera des touches de contrle d accs Xauthority. Si l adresse IP du systme change, ces touches ne seront plus valides, ce qui risquera d empcher le lancement des applications X11.E"K y z"  _{{36, 104}, {484, 56}}YZ[\]i ST oEn cas d activation de cette option, Authentifier les connexions doit aussi tre active pour garantir la scurit du systme. En cas de dsactivation, les connexions partir d applications distantes sont interdites.E"K  "   #@y_{{17, 17}, {404, 14}}YZ[\]i TT o7Ces options prennent effet au prochain lancement d X11._{{10, 33}, {534, 279}}hScurit+, YNSTabView /Z{580, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel M_scroll_in_device_direction _sync_clipboard_to_pasteboard9 C[sync_keymap o_sync_pasteboard wÀ_sync_pasteboard_to_clipboard {ŀ_sync_pasteboard_to_primary ǀ_sync_primary_immediately ɀZsync_text1 ˀZsync_text2C ?̀_toggle_fullscreen_item> 3π^x11_about_item  q с_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  e ԁ_minimize_window:>  3ց_orderFrontStandardAboutPanel:?  5 ؁[prefs_show:E CځUhide:I & K܁Zterminate:F , Fށ_hideOtherApplications:G 2 H_unhideAllApplications: 7 ZUcopy: = b ]close_window: C h \zoom_window: G I  E L M'KL  U V'_NSHuggingPriority   Y a eT 1F_{{372, 191}, {162, 32}}`Yabc][eZfghi h k G m nrq@ !̀YDupliquer_apps_table_duplicate: t v  E L M'KL   '  _{{372, 159}, {162, 32}}`Yabc][eZfghi h k t nrq!̀YSupprimer_apps_table_delete: S _apps_table_show:  E L M'KL   '  _{{372, 223}, {162, 32}}`Yabc][eZfgh h k nrq!̀oAjouter un lment_apps_table_new:  ^prefs_changed:  ^prefs_changed:9 C ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Ӏ ^prefs_changed:x x  Yx11_help: &  _apps_table_show: k  \next_window: n _previous_window:D  _enable_fullscreen_changed:C ? _toggle_fullscreen:A  ŀ ^prefs_changed:G ! ^prefs_changed:g  ' ^prefs_changed:  o ^prefs_changed:  w ^prefs_changed: ! { ^prefs_changed: '  !^prefs_changed: -  #^prefs_changed:d 3  %^prefs_changed: 9 - '^prefs_changed: ? M )^prefs_changed:1 C ܯ D&1>?@AjBCDEFGHI'() *lx!'39: hDPdp$>WpIAO GS gs 6"' R ` S z T ' G V t ?N@A%/ +,/13589;>?BCFHJKOPRSUWZ]_behjknpqtvx 49;W /@D GCJ?N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#')-񀇀9=#%&D& (,]NSApplication '    ./HI G07! _{{302, 440}, {548, 271}}oMenu de l application X11Z{320, 240}1 G t (1 %/9=(1 (_{{1, 1}, {333, 214}}_{{0, -28}, {333, 214}}+, ZNSClipView /1 р(_{{1, 1}, {333, 28}}  K   " "_NSControlTarget_NSControlAction< :;;_{{1, 215}, {333, 15}}\_doScroller:+, ) *ZNSScroller )</  K  5 " "< >;;_{{334, 29}, {15, 186}}_{{20, 20}, {350, 231}}1 ? ܡ @AD C D E F G H I   L_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionCB__panWithGestureRecognizer:+, O P_NSPanGestureRecognizer Q R/_NSPanGestureRecognizer_NSGestureRecognizer+, T/+, V W\NSScrollView V/Z{548, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ] ܯ&1111A11111111'()        *l'9DdIAIIGIIgI""" R" S" T ' G' t'?@A' ,/1111911111111,OPP,UW,]________,tv49;W  /     C ? - M;[ԀӀրــــԁ^ԁbԀԀԁfԁ;lmomsmwm{mmmm;ƀŀƁƁ!ƁƁ'Ɓ;-逇##D1 ܯ D&1>?@AjBCDEFGHI'() *lx!'39: hDPdp$>WpIAO GS gs 6"' R ` S z T ' G V t ?N@A%/ :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~+,/13589;>?BCFHJKOPRSUWZ]_behjknpqtvx 49;W /@D GCJ?N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#')-񀇀9=#%& +|~ĀЀҀ  &,3āƁȁʁ́΁ЁӁՁׁفہ݁߁   "$&(D1 ܯ ~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~MNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+D     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ܠD+,^NSIBObjectData/",1:?QZw%3@R`|  %09HMV_jkmv * , . 0 2 4 6 8 : < > @ B D F I L O R U X [ ^ a d g j m p s v y |     ' O Q S U W Y b d f t }     ; I P d r |  & ( * , . 0 2 : L Y d o q s u ~     L U _ h j l n p r t v x z  "?HW^fov{!#%')+/@BDFHQjlnprtvxz|~;=?@BDEGIvxz|~ "')+-/1ln .SUWY[]_m!#%')+8:<>GLNPR{}  !.024CLOQStvxz|~!#%')+LNPRTVX_a!#$&()+-NPRTVXZEGIJLNOQStvxz|~68:<>@BKW\qsuwy{HU^w7C\} >Rnx /I]#,:DLV|   UVXZ]`bdfgjlnx\jv        & ' * - 0 2 4 7 J S U X o x !!!"!4! > >>>>>>>>>>>> >!>J>L>O>P>S>V>X>Z>\>u>>>>??%?7?9?;?@?I?K?L?M?N?P?R?T?V?X?i?l?n?p?????????????????@@ @ @ @@@@@@B@D@F@H@J@L@N@P@R@_@@@@@@@@@@@@@@@@@@@@@@@A AA(A1A?ALARAgAiAkAmAoAqAAAAAAAAAAAAAAAAAAAAABZB\B]B^B`BbBdBeBgBiBkBlBnBoBpBBBBBBBBBBCCCC C C CCC/C;CPCRCTCVCXCZCCCCCCCCCCCCCCCCD#D%D'D)D+D-D/D1DTDhD}DDDDDDDDDDDDDDDDDDDDEEPERETEVEXEZE\E^EEFFF F FFFxFFFFFFFFFFFFFFFFFFFGG GEGHGJGMGPGSGUGZH5HFHIHKHMHbHdHgHiHkHxHHHHHHHHHHI6I8I9I:I=I?IAIBIEIHIJIKINIOIPISIIIIIIIIIIIIJ!J$J&J'J(J+J-J0J1J4J7J9J:J=J>J?JHJKJJJJJJJJJKKKKKK!K#K~KKKKKKKKKKKKKKKKKKKKKKKLUL`LuLwLyL|LLLLLLLLLLLLLLLLLLMMMMMMMMMMMMMMMMMMMMMMMMMMN6NCNXNZN\N_NbNdNNNNNNNNNNNNNNNNO/O1O3O5O8O;O=O?OOOOOOOOP2P4P5P6P8P:PY?Y@YCYlYoYqYtYvYyY|Y~ZoZZZZZZZZZ[[[[[[[[[[\m\\\\\\\\\\\\\\\\]]&])]+].]1]4]6]^^S^U^W^Y^\^_^a^c^^^___'_2_5_8_;_>_A_C_\_c_m_z_}_____________________````` ` ``v`y`{`|`}`````````````````````aaialanaoaparatawaxa{a~aaaaaaaaaaaaaaabObbbbbbbbbbbbbbbbbcccccc!c$c&dd6d=dVdYd\d_dbdedhdddddddddddddddddddde2e4e5e6e9e;e=e>eAeDeFeGeJeKeLeeeeeeeeeeef8f;f=f>f?fBfDfGfHfKfNfPfQfTfUfVf_fxfffffffhh_hahbhchfhhhjhkhnhqhshthwhxhyhhhhhhhhhi^iiiiiiiiiiiiiiiij+j-j/j1j4j7j9j;jk-k/k0k1k4k6k8k9k@CFHJq†Ćdžʆن.?BDGJYjlnqtÇև,=?ADGduwy|ψ҈Ԉ׈ڈ%(*-0?PSUX[j{~щԉ։ى܉&)+.1@QTVY\kt‹ċƋȋʋ̋΋Ћҋԋ֋؋ڋ܋ދ !$'*-0369<>@BDFHJLORUXZ\^`cfilorux{~ÌƌɌ̌ΌЌҌՌ،یތ  "$&(+479GÍގ'0368;=FQSUXZ]_hkmoŎȎʎ̎I[moqrsuwy|}ŏА35789;=?BCFHJMNORk0Mlґّ,5@YdmvÓœǓɓ˓͓ϓѓӓՓדٓۓݓߓ !$'*-0369ADGJMPSVY\_behknqtwz}œŜȜ˜ΜќԜלڜݜ "%(+.147:=@CFILORUX[^adgjmpsvy|ĝƝȝʝ̝ΝНҝԝ֝؝ڝܝޝ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~žĞƞȞʞ̞ΞОҞԞ֞؞ڞܞޞ  "$&(*,.02468:<>@BDFHJLNWXZcdgpxorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/Localizable.strings0000644000175000017500000001067014757411105023404 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Dsirez-vous rellement quitter X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Toute application X11 en cours s arrtera immdiatement et toute modification non enregistre sera perdue."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Passer en mode RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Une application a demand X11 de changer la rsolution de votre cran. X11 rtablira l tat prcdent de l cran lorsque les applications en feront la requte. Vous pouvez galement forcer X11 de revenir l tat prcdent en appuyant sur #%#A."; /* No comment provided by engineer. */ "Allow" = "Autoriser"; /* No comment provided by engineer. */ "Always Allow" = "Toujours autoriser"; /* No comment provided by engineer. */ "Cancel" = "Annuler"; /* No comment provided by engineer. */ "Mac Help" = "Aide Mac"; /* No comment provided by engineer. */ "Quit" = "Quitter"; /* No */ "No" = "Non"; /* Yes */ "Yes" = "Oui"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Un fichier ~/.xinitrc existe dj.\n\nLes fentres affiches par les applications X11 peuvent tre sans barre de titre, ou peuvent prsenter une apparence diffrente des fentres affiches par les applications natives.\n\nVoulez-vous mettre de ct le fichier existant, et utiliser l environnement X11 standard au prochain dmarrage de X11?"; /* window item modifiers */ "window item modifiers" = "command alt"; /* Updates menu title & */ "Check for X11 Updates..." = "Rechercher les mises jour X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/French.lproj/locversion.plist0000644000175000017500000000060414757411105023004 LprojCompatibleVersion 106 LprojLocale fr LprojRevisionLevel 1 LprojVersion 106 xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/0000755000175000017500000000000014757411135017633 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/main.nib/0000755000175000017500000000000014757411135021326 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib0000644000175000017500000020647514757411105024050 Halten Sie beim Klicken die Wahltaste oder die Befehlstaste gedrückt, um die mittlere oder die rechte Maustaste zu aktivieren. Hiermit wird das X11-Hauptfenster aktiviert. Verwenden Sie die Tastenkombination Befehl+Wahl+A, um den Vollbildmodus ein- oder auszuschalten. Aktiviert das Menüobjekt „Kopieren“ und ermöglicht die Synchronisierung zwischen dem „OSX Pasteboard“ und den Pufferspeichern „CLIPBOARD“ und „PRIMARY“ von X11. Deaktivieren Sie diese Option, wenn Sie „xclipboard“, „klipper“ oder einen beliebigen anderen X11-Zwischenablage-Manager verwenden möchten. Bei Aktivierung wird beim Erzeugen eines neuen X11-Fensters das „X11.app“ in den Vordergrund gebracht (anstelle von „Finder.app“, „Terminal.app“ usw.). Beim Starten von X11 werden Xauthority-Schlüssel zur Zugriffskontrolle erstellt. Wenn sich die IP-Adresse des Systems ändert, sind diese Schlüssel nicht mehr gültig. Möglicherweise können die X11-Programme dann nicht mehr gestartet werden. Bei Aktivierung muss „Verbindungen authentifizieren“ ebenfalls aktiviert sein, damit die Sicherheit des System gewährleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt. xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/main.nib/keyedobjects.nib0000644000175000017500000013554514757411105024425 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata. %)*048#$,67<KRSZ[\eopuxy&'(/0189BIJKSTU^efgqrvz  ;<?EXefpqukR  !&',12 7;<BR[\qrvwz} *34<=>DST\]^dst|}~ %&7?@AGVW_`agvw-56GHPQRZ[\lstu}~ '(01BCJKZ[cdst|}     ! ( ) 9 : A B C I Q b c k l | }          $ % * + 0 1 5 6 ; < A B G Y b c m n o t           % & + , 1 2 7 8 = >       " # $ ' 8 9 : > I J O Q T U V W X  j e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysKI),,+-J&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +|~ĀЀҀ  &,3ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)dMen1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "YProgrammeP^submenuAction: $)1%&(#   #!'jAnpassen &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,{ !"VNSName).-zXMainMenu1%&'()*/OU]t(113,!110"SX1193;)20N1=>?@ABCDEFGHI3589>?BCFHJK(1P1!4hber X111WX176oEinstellungen &Q,11  1jjl1!;;:"WDiensterlt)<:=1v(__NSServicesMenu11  11A@_Vollbildmodus ein-/ausschaltenQa11  1UNSTag1E*D^X11 ausblendenQh11EG_Andere ausblenden11!I_Alle einblenden11  11ML[X11 beendenQq\_NSAppleMenu,!PP " Q)1ԀRS(P  P!TjAnpassen &,!WWV"ZBearbeitenXY)ZBearbeiten1Z(W\[XKopierenQc   ,!__^"WFenster )`^s1adgijmpq( #$_cbiSchlieenQw ,-_fe_Im Dock ablegenQm 6_!hVZoomen _   FG_lkoVorwrts bltternQ< MPQ_onoRckwrts bltternQ> _   c_!r_Alle nach vorne bringen^_NSWindowsMenulln,!vvu"UHilfentuw)1wxx(lv!yYX11 Hilfe[_NSMainMenuTmenu R}^apps_separator À(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@€R@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews4 35 2Z{301, 186}[NSTableView_NSViewIsLayerTreeHost   75 6Y{301, 17}+, _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%')+,-/123)78:]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification82D#@#? <?>OA A AA#?1_{{302, 1}, {16, 28}}+,=>]_NSCornerView=/1@ABC(FGHIJKLMOPQRSUV\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^#@O]`YZ[\]^_`abcd[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNameghijklmnoVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontrst_NSFontDescriptorAttributesv1w{WNS.keysxyz|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/RWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorR\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellYZ[\]]NSControlView_NSPlaceholderString0AYTextzelleghjno#@*PRB1_controlTextColor+,ؤ/+,]NSTableColumn/FGHIJKLMQRS #@Y#@DYZ[\]^_`cdVBefehlRM0.3333329856YZ[\]ƀFGHIJKLMQRS #@Q@#@$YZ[\]^_`cdZKurzbefehl  [headerColorRB1C1 1YZ[\]_NSDrawsBackground ghjno#@(#%_controlBackgroundColor()RL0.602715373N0.6666666667 1.0YgridColor34RM0.4246723652E0.5 1+,89[NSTableView8:/YNSControlZapps_table?@ ŀπCGIKLGVNSCellƀ ǀȀ TVW T_{{15, 245}, {213, 18}}]Y^_`]a[bZcdefgj?lRnop_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ʀŀɀ_Durch inaktive Fenster klickenstu[NSImageNameˀXNSSwitch+,xy_NSButtonImageSourcex/+,{|\NSButtonCell{/+,~XNSButton~:/]click_through Zр^copy_menu_item ӀC€Ԁ Հր Vj T]_{{74, 235}, {197, 26}}c^Y]]_`dZbRne _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionӀ@ @@ !׀ghjno WNSStateۀـր!܀݀)[Vom Monitor__popUpItemAction:ZOtherViews1Հ؀ހ(ـ!߀ۀZ256 Farbenـ!ۀ\32768 Farbenـ!ۀ_16,7 Millionen Farben+,_NSPopUpButtonCell{/^NSMenuItemCell+,]NSPopUpButton~:/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator CI#$€ ,V/ T_{{18, 243}, {215, 18}}]Y^_`]a[bZcdefgj9Rnop!ʀ򀧀_Verbindungen authentifizieren[enable_authAB CILM€Ԁ _{{18, 182}, {409, 23}}]Y^_`]a[bZcdefgjAYRnop!ʀ]Vollbildmodus_enable_fullscreenab CIlm€Ԁ _{{37, 116}, {409, 23}}]Y^_`]a[bZcdefgjayRnop!ʀo0Zugriff auf Menleiste im Vollbildmodus erlauben_enable_fullscreen_menu  C_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthԀ  #@{_{{54, 79}, {436, 31}}Z{250, 750}YZ[\]f@omDie Menleiste wird sichtbar, sobald Sie den Mauszeiger in den oberen Bereich Ihres primren Display bewegen.ghjkno %\controlColor+,[NSTextField:/_enable_fullscreen_menu_text  CIƀ   V ST;;=_{{18, 127}, {402, 18}}C  >?  #@|-]Y^_`]a[bZcdefgjRnop!ʁ _)Tastenentsprechungen unter X11 aktivieren_enable_keyequivs CI€  _{{18, 166}, {312, 18}}]Y^_`]a[bZcdefgj Rnop!ʁ_*Verbindungen von Netzwerk-Clients erlaubenZenable_tcp CI$   _{{18, 243}, {402, 18}}C/06  AC  B]Y^_`]a[bZcdefgj<Rnop!ʁ_Drei Maustasten nachbilden\fake_buttonsDE !%CGIOPG€ƀ "# _{{15, 184}, {155, 18}}]Y^_`]a[bZcdefgjD\Rnop!ʁ!$_Fokus folgt der Maus_focus_follows_mousede '+CGIopG€ƀ () _{{15, 140}, {402, 18}}]Y^_`]a[bZcdefgjd|Rnop!ʁ'*_Fokus auf neuem Fenster_focus_on_new_window -2CI .0  /_{{18, 69}, {402, 18}}C  LN  M]Y^_`]a[bZcdefgjRnop!ʁ-1_&Wahltasten entsprechen Alt_L und Alt_R_option_sends_alt 4R\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask569 8@x7!_{{2350, 1291.0391}, {550, 341}}_X11 EinstellungenWNSPanelZ{320, 240}VT :1́;(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsWV  U99 < 1 (1$ 6 EB/-M(_{{36, 93}, {461, 28}}YZ[\]f@o}Bei Aktivierung knnen die Tastenentsprechungen fr die Menleiste die X11-Programme stren, die Meta-Sondertasten verwenden._{{36, 203}, {461, 34}}CI%&  IJ  EYZ[\]f$2DoHalten Sie beim Klicken die Wahltaste oder die Befehlstaste gedrckt, um die mittlere oder die rechte Maustaste zu aktivieren. C?@  FG   _{{36, 151}, {461, 28}}YZ[\]f MEHofBei Aktivierung kann Ihre aktuelle X11-Keymap durch nderungen des Tastaturmens berschrieben werden._{{18, 185}, {402, 18}}]Y^_`]a[bZcdefgj6WRnop!ʁBK_&Tastaturbelegung des Systems verwenden_{{36, 32}, {461, 31}}CIdè PQ  ;YZ[\]fq/OodBei Aktivierung entsprechen die Wahltasten Alt_L und Alt_R X11-Tastensymbolen anstatt Mode_switch ._{{18, 8}, {418, 18}}]Y^_`]a[bZcdefgjzRnop!ʁMR_.Immer in Bewegungsrichtung der Finger scrollen_{{10, 33}, {504, 279}}+,/_{{13, 10}, {524, 325}}1W[l(VNSViewYNSTabView\NSIdentifierZ Y;XQ1WEingabe+,]NSTabViewItem/Zԁk;\Q21AaӁ^bf(CԀ _` #@I_{{17, 238}, {55, 20}}YZ[\]f^aWFarben:CցԀ cd #@x@_{{36, 216}, {392, 14}}YZ[\]fbeo6Diese Option wird beim nchsten Start von X11 wirksam.CԀ gh _{{36, 145}, {461, 42}}YZ[\]ffi_Hiermit wird das X11-Hauptfenster aktiviert. Verwenden Sie die Tastenkombination Befehl+Wahl+A, um den Vollbildmodus ein- oder auszuschalten._{{10, 33}, {504, 279}}WAusgabeZm;\V  Tn1osw{(CI !€m pq m_{{11, 255}, {409, 23}}]Y^_`]a[bZcdefgj-Rnop!ʁor_Synchronisierung aktivierenC:;Am tu m#@|_{{29, 221}, {464, 28}}YZ[\]fHsvoAktiviert das Menobjekt Kopieren  und ermglicht die Synchronisierung zwischen dem OSX Pasteboard  und den Pufferspeichern CLIPBOARD  und PRIMARY  von X11.CIST€m xy m_{{27, 129}, {436, 18}}]Y^_`]a[bZcdefgj`Rnop!ʁwzo6CLIPBOARD aktualisieren, wenn Pasteboard gendert wirdCIlm€m |} m_{{27, 104}, {463, 18}}]Y^_`]a[bZcdefgjyRnop!ʁ{~oCPRIMARY (Mittel-Klick) aktualisieren, wenn Pasteboard gendert wirdCI€m  m_{{27, 81}, {498, 18}}]Y^_`]a[bZcdefgjRnop!ʁo:Pasteboard sofort aktualisieren, wenn Text ausgewhlt wirdCI€m  m_{{27, 192}, {438, 18}}]Y^_`]a[bZcdefgjRnop!ʁo6Pasteboard aktualisieren, wenn CLIPBOARD gendert wirdCm  m#@|_{{41, 158}, {452, 28}}YZ[\]foDeaktivieren Sie diese Option, wenn Sie xclipboard , klipper  oder einen beliebigen anderen X11-Zwischenablage-Manager verwenden mchten.Cفm  m#@{_{{41, 47}, {450, 28}}YZ[\]fopAufgrund von Einschrnkungen im X11-Protokoll funktioniert diese Option in manchen Programmen u. U. nicht immer._{{10, 33}, {504, 279}}^ZwischenablageG Zƀ^;\1?DdŁ!'(CGG ƀ  #@|@_{{23, 211}, {456, 28}}YZ[\]f ouBei Aktivierung wird beim Klicken auf ein inaktives Fenster der Mausklick zustzlich an dieses Fenster weitergegeben.CG  G ƀ  #@{`_{{23, 161}, {442, 17}}YZ[\]f &_QDer Fokus des X11-Fensters folgt dem Cursor. Dies hat einige nachteilige Effekte.CG 2 3G ƀ  _{{23, 92}, {456, 42}}YZ[\]f ?oBei Aktivierung wird beim Erzeugen eines neuen X11-Fensters das X11.app  in den Vordergrund gebracht (anstelle von Finder.app , Terminal.app  usw.)._{{10, 33}, {504, 279}} FZ;1 J M N O(C Z [ a  #@|_{{36, 189}, {463, 48}}YZ[\]f M hoBeim Starten von X11 werden Xauthority-Schlssel zur Zugriffskontrolle erstellt. Wenn sich die IP-Adresse des Systems ndert, sind diese Schlssel nicht mehr gltig. Mglicherweise knnen die X11-Programme dann nicht mehr gestartet werden.C u v a  _{{36, 104}, {463, 56}}YZ[\]f N oBei Aktivierung muss Verbindungen authentifizieren  ebenfalls aktiviert sein, damit die Sicherheit des System gewhrleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt.C     #@y_{{17, 17}, {404, 14}}YZ[\]f O o:Diese Optionen werden beim nchsten Start von X11 wirksam._{{10, 33}, {504, 279}}ZSicherheit+, YNSTabView /Z{550, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel M_scroll_in_device_direction _sync_clipboard_to_pasteboard6 B[sync_keymap o_sync_pasteboard w€_sync_pasteboard_to_clipboard {Ā_sync_pasteboard_to_primary ƀ_sync_primary_immediately ȀZsync_text1 ʀZsync_text2C ?̀_toggle_fullscreen_item> 3΀^x11_about_item q Ё_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector d Ӂ_minimize_window:>  3Ձ_orderFrontStandardAboutPanel:?  5 ׁ[prefs_show:E  CفUhide:I " KہZterminate:F ( F݁_hideOtherApplications:G . H߁_unhideAllApplications: 3 ZUcopy: 9 a ]close_window: ? g \zoom_window: C E  C H I)I  Q R)_NSHuggingPriority   V ] aT 0E_{{340, 191}, {158, 32}}]Y^_`][bZcdef d g C i jon@ !̀[Duplizieren_apps_table_duplicate: p r  C H I)I  | })  _{{340, 159}, {158, 32}}]Y^_`][bZcdef d g p jon!̀YEntfernen_apps_table_delete: S _apps_table_show:  C H I)I   )  _{{340, 223}, {158, 32}}]Y^_`][bZcde d g jon!̀oObjekt hinzufgen_apps_table_new:  ^prefs_changed:  ^prefs_changed:6 B ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Ӏ ^prefs_changed:x x Yx11_help: &  _apps_table_show: j  \next_window: m _previous_window:A  _enable_fullscreen_changed:C ? _toggle_fullscreen:? ŀ ^prefs_changed:D  ! ^prefs_changed:d ' ^prefs_changed:  o ^prefs_changed:  w ^prefs_changed:  { ^prefs_changed: #   ^prefs_changed: )  "^prefs_changed:a /  $^prefs_changed: 5 - &^prefs_changed: ; M (^prefs_changed:1 ? د @&1>?@AjBCDEFGHI'() *lx$0 @6&eAMam!;TmG?LDP dp 3$ M [ N v O ) C R p }AOBC'1 *,/13589;>?BCFHJKOPRSUWZ]_adgijmpqtvx 49;W ?C EGBJ/N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#'),8<#%&C& (+]NSApplication )    -.GH F/7! _{{360, 400}, {512, 271}}oX11-ProgrammmenZ{512, 240}1 C p (1 '18<(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ҁ(_{{1, 1}, {301, 28}}      _NSControlTarget_NSControlAction; 9::_{{1, 215}, {301, 15}}\_doScroller:+, % &ZNSScroller %:/    1  ; =::_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 ; ء <@C ? @ A B C D E   H_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionBA__panWithGestureRecognizer:+, K L_NSPanGestureRecognizer M N/_NSPanGestureRecognizer_NSGestureRecognizer+, P/+, R S\NSScrollView R/Z{512, 271}_{{0, 0}, {1680, 1025}}Z{512, 268}Xx11_apps1 Y د&1111A11111111'()        *l$ 6AaG?GGDGGdG M N O ) C) p)ABC) ,/1111911111111,OPP,UW,]________,tv49;W      E B / - M;[ԀӀրــــԁ^ԁbԀԀԁfԁ;lmomsmwm{mmmm;ƀŀƁƁ!ƁƁ'Ɓ;,耇##C1 د @&1>?@AjBCDEFGHI'() *lx$0 @6&eAMam!;TmG?LDP dp 3$ M [ N v O ) C R p }AOBC'1 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*,/13589;>?BCFHJKOPRSUWZ]_adgijmpqtvx 49;W ?C EGBJ/N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#'),8<#%& +|~ĀЀҀ  &,3ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'C1 د ~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*C     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ؠC+,^NSIBObjectData/",1:?QZw#1>P^z  #.7FKT]hikt ( * , . 0 2 4 6 8 : < > @ B D G J M P S V Y \ _ b e h k n q t w z }    % M O Q S U W ` b d r {     = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z | !6?NU]fmr{ "&79;=?Hacegikmoqsuwy{.023578:<ikmoqsuwy{!#DFoqstvxy{}-/13579Ktvxy{}~ %*,.0Y[]^`bceg!BDFHJLNWY  %'HJLNPRTfh%'HJOQSUWY<>@BDFHJLNTacegpsuw  $1FQm&2Kl2>KWa    !"$)+4=?AJKMN   "$&1bn.5Ajlnoqsuwy#8D[hz|      ! # L Y d q | !! !!"!/!4!6!8!:!!A!F![!b!k!!!!!!!!!!!!!!!!!!"""" " "!"<"\"w"""""""""""""# # #####8#D#R#Z#\#^#`#b#d#k#}###############555555555566*686N6S6U6W6Y6[6]6_6a6d6n666666666666666666677)7*7,7.70717:7C7E7f7h7j7l7n7p7w7777777777777777788881838587898;8F8[8]8_8a8c8o8888888888888888888999999969K9X9g9i9k9999999999999999: : : ::::n:u:w:x:y:{:}:::::::::::::::::::;;3;A;W;i;|;;;;;;;;;;;;;;;;;<<<<<<0<5<>>>6>A>S>U>W>\>e>g>h>i>j>l>n>p>r>t>>>>>>>>>>>>>>>>>>>????%?'?)?+?-?/?\?^?`?b?d?f?h?j?l?n?y??????????????????@@@@@%@9@F@U@^@l@y@@@@@@@@@@@@@@@@@@@@@A A"A$A&A(A*A,AAAAAAAAAAAAAAAAAAAAAAAAAB0B2B4B6B8B:BB^BjBBBBBBBBBBBBBBBBBBBBBCCRCTCVCXCZC\C^C`CnCCCCCCCCCCDDDDDD D D DDDDD+DjDlDnDpDrDtDvDxDDE E E EEEE|EEEEEEEEEEEEEEEEEEFFF$FIFLFNFQFTFWFYF^G;GLGOGQGSGhGjGmGoGqG~GGGGGGGGGGHH?H@HCHEHGHHHKHNHPHQHTHUHVHYHHHHHHHHHHHHI'I*I,I-I.I1I3I6I7I:I=I?I@ICIDIEINIQIIIIIIIIIIIIIIIJJ[J]J^J_JaJcJeJfJiJlJnJoJqJrJsJJJJJJJJJKKK(K*K,K/K2K4KKKKKKKKKKKKKKKKKL4L7L9L:L;L>L@LCLDLGLJLLLMLPLQLRLULLLLLLLLLLLLLLLLMJMLMMMNMPMRMTMUMXM[M]M^M`MaMbM{MMMMMMMMMMN NNNNNNsNuNvNwNyN{N}N~NNNNNNNNNNNNNNNNO O#O8O:Of?fBfDfFfGfJfMfOfPfSfTfUfnffffffffgFgggggggggggggggghhhhhhh h"hhhhhhhhiiiii i i ii'ifihijilioiritivijLjOjQjRjSjVjXj[j\j_jbjdjejhjijjjsjjjjjjjjklAlDlFlGlHlKlMlPlQlTlWlYlZl]l^l_lhllllllllmmmmmmmmmmmmnnnn n nnnyn|n~nnnnnnnnnnnnnnnnnnnnnnop@pCpEpFpGpIpKpNpOpRpUpWpXpZp[p\pep~pppppppqqnqqqsqtquqwqyq|q}qqqqqqqqqqqqqqqss!s6s9s;s>sAsDsMsXsZs]s`scsfshssssssssssssssssst t6t9t;t>t@tCtFtHv)vvvvvvvvvvvvvvvvvvvvvvvvwxyy y y y yyyyyyyyy y!y"y+yCylyoyqytyvyyy|y~yzzz"z,z5z@zYzdzzzzzzzzzzzzz{{{{{{"{${C{X{Z{\{_{b{d{p{{{{{{{{{{{{{{{{{{|||!|6|8|:|=|@|B|]|r|t|v|y|||~|||||||||||||||}}}} } }}}.}0}2}5}8}J}S}k}r}}}}}}}}}}}}}}}}~~~~"~$~&~)~,~2~C~E~G~J~M~X~i~k~m~p~s~~~~~~~~~~~~~~~~~,=@BEHۀ 0irtv{~Āǁ&()*-/1258:;>?@C]Áԁց؁ہށ lnopsuwx{~܂*;>@CFUfiknqÃƃՃ*;=?BEO`bdgj}ӄ  #&;LNPSVevy{~̅υхԅׅ"%'*-@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ŐȐːΐѐԐ֐ؐڐܐސ "%(+.147:<>@CEHJMORTWZ]_acfhkmpruwz}ÓœǓɓ˓͓ϓғՓؓۓޓ !#%'*-03579;>ADGJMPSVY\_behknqtwz}”ŔȔ˔ΔєԔהٔ۔ݔߔ "%(+.147:=@CFILORUX[^adgjmpsvy|ĕǕʕ͕֗—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !$'*-0369?@FUV^_`fuv~,45FGOPQYZ[krst|}~ &'/0ABIJYZbcrs{|     ' ( 8 9 @ A B H P a b j k { |          # $ ) * / 0 4 5 : ; @ A F X a b l m n s          $ % * + 0 1 6 7 < =     ! " # & 7 8 9 = H I N P S T U V W G i d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysKI),,+-J&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +|~ĀЀҀ  &,3ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)dMen1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "YProgrammeP^submenuAction: $)1%&(#   #!'jAnpassen &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,{ !"VNSName).-zXMainMenu1%&'()*/OU]t(113,!110"SX1193;)20N1=>?@ABCDEFGHI3589>?BCFHJK(1P1!4hber X111WX176oEinstellungen &Q,11  1jjl1!;;:"WDiensterlt)<:=1v(__NSServicesMenu11  11A@_Vollbildmodus ein-/ausschaltenQa11  1UNSTag1E*D^X11 ausblendenQh11EG_Andere ausblenden11!I_Alle einblenden11  11ML[X11 beendenQq\_NSAppleMenu,!PP " Q)1ԀRS(P  P!TjAnpassen &,!WWV"ZBearbeitenXY)ZBearbeiten1Z(W\[XKopierenQc   ,!__^"WFenster )`^s1adgijmpq( #$_cbiSchlieenQw ,-_fe_Im Dock ablegenQm 6_!hVZoomen _   FG_lkoVorwrts bltternQ< MPQ_onoRckwrts bltternQ> _   c_!r_Alle nach vorne bringen^_NSWindowsMenulln,!vvu"UHilfentuw)1wxx(lv!yYX11 Hilfe[_NSMainMenuTmenu R}^apps_separator À'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@€R #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews4 35 2Z{301, 186}[NSTableView_NSViewIsLayerTreeHost   75 6Y{301, 17}+,  _NSTableHeaderView /_NSTableHeaderViewVNSView[NSResponder  !"#%')*+-/01'568]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification82D#@#? <?>OA A AA#?1_{{302, 1}, {16, 28}}+,;<]_NSCornerView;/1>?@A(DEFGHIJKMNOPQST\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[#@O]`WXYZ[\]^_`ab[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNameefghijklmVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontpqr_NSFontDescriptorAttributest1uy}WNS.keysvwxz{|_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/PWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorP\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellWXYZ[]NSControlView_NSPlaceholderString0AYTextzelleefhlm#@*PPB1_controlTextColor+,֤/+,]NSTableColumn/DEFGHIJKOPQ #@U#@DWXYZ[\]^abVBefehlPM0.3333329856WXYZ[ĀDEFGHIJKOPQ #@L@#@$WXYZ[\]^abZKurzbefehl [headerColor  PB1C1 1WXYZ[_NSDrawsBackground efhlm#@(!#_controlBackgroundColor&'PL0.602715373N0.6666666667 1,.YgridColor12PM0.4246723652E0.5 1+,67[NSTableView68/YNSControlZapps_table=> ŀπAEGHJKEVNSCellƀ ǀȀ SUV T_{{15, 245}, {213, 18}}\W]^_[`YaXbcdefi=kPmno_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ʀŀɀ_Durch inaktive Fenster klickenrst[NSImageNameˀXNSSwitch+,wx_NSButtonImageSourcew/+,z{\NSButtonCellz/+,}~XNSButton}8/]click_through Zр^copy_menu_item ӀAGԀ Հր Uj T]_{{74, 235}, {197, 26}}b]W\[^_cXaPmd _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionӀ@ @@ !׀efhlm WNSStateۀـր!܀݀)[Vom Monitor__popUpItemAction:ZOtherViews1Ԁ؀ހ(ـ!߀ۀZ256 Farbenـ!ۀ\32768 Farbenـ!ۀ_16,7 Millionen Farben+,_NSPopUpButtonCellz/^NSMenuItemCell+,]NSPopUpButton}8/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator AGH"# +U. T_{{18, 243}, {215, 18}}\W]^_[`YaXbcdefi8Pmno!ʀ򀧀_Verbindungen authentifizieren[enable_auth@A AGHKLԀ _{{18, 182}, {409, 23}}\W]^_[`YaXbcdefi@XPmno!ʀ]Vollbildmodus_enable_fullscreen`a AGHklԀ _{{37, 116}, {409, 23}}\W]^_[`YaXbcdefi`xPmno!ʀo0Zugriff auf Menleiste im Vollbildmodus erlauben_enable_fullscreen_menu  AG_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthԀ  #@{_{{54, 79}, {436, 31}}Z{250, 750}WXYZ[e@omDie Menleiste wird sichtbar, sobald Sie den Mauszeiger in den oberen Bereich Ihres primren Display bewegen.efhilm #\controlColor+,[NSTextField8/_enable_fullscreen_menu_text  AGHŀ   U ST;;=_{{18, 127}, {402, 18}}AG  >?  #@|-\W]^_[`YaXbcdefiPmno!ʁ _)Tastenentsprechungen unter X11 aktivieren_enable_keyequivs AGH  _{{18, 166}, {312, 18}}\W]^_[`YaXbcdefi Pmno!ʁ_*Verbindungen von Netzwerk-Clients erlaubenZenable_tcp AGH#   _{{18, 243}, {402, 18}}AG./5  AC  B\W]^_[`YaXbcdefi;Pmno!ʁ_Drei Maustasten nachbilden\fake_buttonsCD !%AEGHNOEƀ "# _{{15, 184}, {155, 18}}\W]^_[`YaXbcdefiC[Pmno!ʁ!$_Fokus folgt der Maus_focus_follows_mousecd '+AEGHnoEƀ () _{{15, 140}, {402, 18}}\W]^_[`YaXbcdefic{Pmno!ʁ'*_Fokus auf neuem Fenster_focus_on_new_window -2AGH .0  /_{{18, 69}, {402, 18}}AG  LN  M\W]^_[`YaXbcdefiPmno!ʁ-1_&Wahltasten entsprechen Alt_L und Alt_R_option_sends_alt 4P\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask569 8@x7!_{{2350, 1291.0391}, {550, 341}}_X11 EinstellungenWNSPanelZ{320, 240}UT :1ˁ;(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsWV  U99 < 1 (1# 5 EB/-M(_{{36, 93}, {461, 28}}WXYZ[e@o}Bei Aktivierung knnen die Tastenentsprechungen fr die Menleiste die X11-Programme stren, die Meta-Sondertasten verwenden._{{36, 203}, {461, 34}}AGH$%  IJ  EWXYZ[e#1DoHalten Sie beim Klicken die Wahltaste oder die Befehlstaste gedrckt, um die mittlere oder die rechte Maustaste zu aktivieren. AG>?  FG   _{{36, 151}, {461, 28}}WXYZ[e LEHofBei Aktivierung kann Ihre aktuelle X11-Keymap durch nderungen des Tastaturmens berschrieben werden._{{18, 185}, {402, 18}}\W]^_[`YaXbcdefi5VPmno!ʁBK_&Tastaturbelegung des Systems verwenden_{{36, 32}, {461, 31}}AGHcdˀ PQ  ;WXYZ[ep/OodBei Aktivierung entsprechen die Wahltasten Alt_L und Alt_R X11-Tastensymbolen anstatt Mode_switch ._{{18, 8}, {418, 18}}\W]^_[`YaXbcdefiyPmno!ʁMR_.Immer in Bewegungsrichtung der Finger scrollen_{{10, 33}, {504, 279}}+,/_{{13, 10}, {524, 325}}1W[l(VNSViewYNSTabView\NSIdentifierZ Y;XQ1WEingabe+,]NSTabViewItem/Zԁk;\Q21@`Ӂ^bf(AGԀ _` #@I_{{17, 238}, {55, 20}}WXYZ[e^aWFarben:AGՁԀ cd #@x@_{{36, 216}, {392, 14}}WXYZ[ebeo6Diese Option wird beim nchsten Start von X11 wirksam.AGԀ gh _{{36, 145}, {461, 42}}WXYZ[efi_Hiermit wird das X11-Hauptfenster aktiviert. Verwenden Sie die Tastenkombination Befehl+Wahl+A, um den Vollbildmodus ein- oder auszuschalten._{{10, 33}, {504, 279}}WAusgabeZm;\U Tn1 osw{(AGH m pq m_{{11, 255}, {409, 23}}\W]^_[`YaXbcdefi,Pmno!ʁor_Synchronisierung aktivierenAG9:@m tu m#@|_{{29, 221}, {464, 28}}WXYZ[eGsvoAktiviert das Menobjekt Kopieren  und ermglicht die Synchronisierung zwischen dem OSX Pasteboard  und den Pufferspeichern CLIPBOARD  und PRIMARY  von X11.AGHRSm xy m_{{27, 129}, {436, 18}}\W]^_[`YaXbcdefi_Pmno!ʁwzo6CLIPBOARD aktualisieren, wenn Pasteboard gendert wirdAGHklm |} m_{{27, 104}, {463, 18}}\W]^_[`YaXbcdefixPmno!ʁ{~oCPRIMARY (Mittel-Klick) aktualisieren, wenn Pasteboard gendert wirdAGHm  m_{{27, 81}, {498, 18}}\W]^_[`YaXbcdefiPmno!ʁo:Pasteboard sofort aktualisieren, wenn Text ausgewhlt wirdAGHm  m_{{27, 192}, {438, 18}}\W]^_[`YaXbcdefiPmno!ʁo6Pasteboard aktualisieren, wenn CLIPBOARD gendert wirdAGm  m#@|_{{41, 158}, {452, 28}}WXYZ[eoDeaktivieren Sie diese Option, wenn Sie xclipboard , klipper  oder einen beliebigen anderen X11-Zwischenablage-Manager verwenden mchten.AG؁m  m#@{_{{41, 47}, {450, 28}}WXYZ[eopAufgrund von Einschrnkungen im X11-Protokoll funktioniert diese Option in manchen Programmen u. U. nicht immer._{{10, 33}, {504, 279}}^ZwischenablageE Zƀ^;\1=CcŁ!'(AEGE ƀ  #@|@_{{23, 211}, {456, 28}}WXYZ[e ouBei Aktivierung wird beim Klicken auf ein inaktives Fenster der Mausklick zustzlich an dieses Fenster weitergegeben.AEG  E ƀ  #@{`_{{23, 161}, {442, 17}}WXYZ[e %_QDer Fokus des X11-Fensters folgt dem Cursor. Dies hat einige nachteilige Effekte.AEG 1 2E ƀ  _{{23, 92}, {456, 42}}WXYZ[e >oBei Aktivierung wird beim Erzeugen eines neuen X11-Fensters das X11.app  in den Vordergrund gebracht (anstelle von Finder.app , Terminal.app  usw.)._{{10, 33}, {504, 279}} EZ;1 I L M N(AG Y Z `  #@|_{{36, 189}, {463, 48}}WXYZ[e L goBeim Starten von X11 werden Xauthority-Schlssel zur Zugriffskontrolle erstellt. Wenn sich die IP-Adresse des Systems ndert, sind diese Schlssel nicht mehr gltig. Mglicherweise knnen die X11-Programme dann nicht mehr gestartet werden.AG t u `  _{{36, 104}, {463, 56}}WXYZ[e M oBei Aktivierung muss Verbindungen authentifizieren  ebenfalls aktiviert sein, damit die Sicherheit des System gewhrleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt.AG     #@y_{{17, 17}, {404, 14}}WXYZ[e N o:Diese Optionen werden beim nchsten Start von X11 wirksam._{{10, 33}, {504, 279}}ZSicherheit+, YNSTabView /Z{550, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel M_scroll_in_device_direction _sync_clipboard_to_pasteboard5 B[sync_keymap o_sync_pasteboard w€_sync_pasteboard_to_clipboard {Ā_sync_pasteboard_to_primary ƀ_sync_primary_immediately ȀZsync_text1 ʀZsync_text2C ?̀_toggle_fullscreen_item> 3΀^x11_about_item q Ё_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector d Ӂ_minimize_window:>  3Ձ_orderFrontStandardAboutPanel:?  5 ׁ[prefs_show:E  CفUhide:I ! KہZterminate:F ' F݁_hideOtherApplications:G - H߁_unhideAllApplications: 2 ZUcopy: 8 a ]close_window: > g \zoom_window: B D  A G H'GH  P Q'_NSHuggingPriority   U \ `T 0E_{{340, 191}, {158, 32}}\W]^_[YaXbcde c f B h inm@ !̀[Duplizieren_apps_table_duplicate: o q  A G H'GH  { |'  _{{340, 159}, {158, 32}}\W]^_[YaXbcde c f o inm!̀YEntfernen_apps_table_delete: S _apps_table_show:  A G H'GH   '  _{{340, 223}, {158, 32}}\W]^_[YaXbcd c f inm!̀oObjekt hinzufgen_apps_table_new:  ^prefs_changed:  ^prefs_changed:5 B ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ӏ ^prefs_changed:x x Yx11_help: &  _apps_table_show: j  \next_window: m _previous_window:@ _enable_fullscreen_changed:C ? _toggle_fullscreen:= ŀ ^prefs_changed:C  ! ^prefs_changed:c ' ^prefs_changed:  o ^prefs_changed:  w ^prefs_changed:  { ^prefs_changed: "   ^prefs_changed: (  "^prefs_changed:` . $^prefs_changed: 4 - &^prefs_changed: : M (^prefs_changed:1 > ׯ ?&1>?@AjBCDEFGHI'() *lx#/ ?5%d@L`l :SlE=KCO co 2# L Z M u N ' B Q o |?M@A%/ *,/13589;>?BCFHJKOPRSUWZ]_adgijmpqtvx 49;W ?C EGBJ/N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#'),8<#%&C& (+]NSApplication '    -.GH F/7! _{{360, 400}, {512, 271}}oX11-ProgrammmenZ{512, 240}1 B o (1 %/8<(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 р(_{{1, 1}, {301, 28}}  G    _NSControlTarget_NSControlAction; 9::_{{1, 215}, {301, 15}}\_doScroller:+, $ %ZNSScroller $8/  G  0  ; =::_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 : ס ;@C > ? @ A B C D   G_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionBA__panWithGestureRecognizer:+, J K_NSPanGestureRecognizer L M/_NSPanGestureRecognizer_NSGestureRecognizer+, O/+, Q R\NSScrollView Q/Z{512, 271}_{{0, 0}, {1680, 1025}}Z{512, 268}Xx11_apps1 X ׯ&1111A11111111'()        *l# 5@`E=EECEEcE L M N ' B' o'?@A' ,/1111911111111,OPP,UW,]________,tv49;W      E B / - M;[ԀӀրــــԁ^ԁbԀԀԁfԁ;lmomsmwm{mmmm;ƀŀƁƁ!ƁƁ'Ɓ;,耇##C1 ׯ ?&1>?@AjBCDEFGHI'() *lx#/ ?5%d@L`l :SlE=KCO co 2# L Z M u N ' B Q o |?M@A%/ :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*,/13589;>?BCFHJKOPRSUWZ]_adgijmpqtvx 49;W ?C EGBJ/N-0MQ[ԀӀրـ؀ހ^`bdfhlmoqsuwy{}ƀŀȁ!#'),8<#%& +|~ĀЀҀ  &,3ÁŁǁɁˁ́ρҁԁց؁ځ܁ށ   !#%'C1 ׯ |       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*C     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 נC+,^NSIBObjectData/",1:?QZw#1>P^z  #.7FKT]hikt ( * , . 0 2 4 6 8 : < > @ B D G J M P S V Y \ _ b e h k n q t w z }    % M O Q S U W ` b d r {     = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z | !6?NU]fmr{ "&79;=?Hacegikmoqsuwy{.023578:<ikmoqsuwy{!#DFoqstvxy{}-/13579Ktvxy{}~ %*,.0Y[]^`bceg!BDFHJLNWY  %'HJLNPRTfh%'HJOQSUWY<>@BDFHJLNTacegpsuw   -BMi".Gh.:GS]    &(*345|   IUmnprtuwy{}(QSUVXZ\^` +BOacfhkmru~     3 @ K X c r ! !!!!!!!#!%!(!-!B!I!R!j!q!z!|!~!!!!!!!!!!!!!!!!!!""#"C"^"g"t"y"""""""""""""## ##+#9#A#C#E#G#I#K#R#d#y##############5r5{55555555566656:6<6>6@6B6D6F6H6K6U6f6o6r6t6v6w666666666666667777777!7*7,7M7O7Q7S7U7W7^7k7y7{7777777777777777788888 8"8-8B8D8F8H8J8V8k8n8r8t8v888888888888888889999929?9N9P9R9g9i9k9m9o9y9999999999999999:U:\:^:_:`:b:d:f:h:i:k:m:o:p:r:s:t::::::::::;;;*;@;R;e;w;;;;;;;;;;;;;;;;;;;;<<<<'<4<=>>*><>>>@>E>N>P>Q>R>S>U>W>Y>[>]>n>q>s>u>>>>>>>>>>>>>>>>>????????E?G?I?K?M?O?Q?S?U?W?b?????????????????????@@@"@/@>@G@U@b@h@}@@@@@@@@@@@@@@@@@@@@A A AAAAApArAsAtAvAxAzA{A}AAAAAAAAAAAAAAAABBBBB!B#B%B'BGBSBhBjBlBnBpBrBBBBBBBBBBBBBBBBC;C=C?CACCCECGCICWCkCCCCCCCCCCCCCCCCCCCCCDDSDUDWDYD[D]D_DaDDDDDDDDEeEEEEEEEEEEEEEEEEEEEFF F2F5F7F:F=F@FBFGG$G5G8G:GH?HBHsHtHwHzH}HHHHHHHIIIIIIIII I#I&I(I)I,I-I.I7I:IyI{I}IIIIIIIIIIIIIJDJFJGJHJJJLJNJOJRJUJWJXJZJ[J\JuJJJJJJJJJJKKKKKKK|K~KKKKKKKKKKKKKKKLL L"L#L$L'L)L,L-L0L3L5L6L9L:L;L>L}LLLLLLLLLLLLLLLM3M5M6M7M9M;M=M>MAMDMFMGMIMJMKMdMMMMMMMMMMMMMMMNN\N^N_N`NbNdNfNgNjNmNoNpNrNsNtNNNNNNNNNNO O!O#O%O(O+O-OOOOOOOOOOOOOOOOOP,P/P1P2P3P6P8P;PTATDTGTJTMTPTRTjTTTTTTTTUUVVVVV!V#V%V&V)V,V.V/V2V3V4V7V`VcVeVhVjVmVpVrWsWWWWWWWWWWWWWWWWWXXAXDXFXIXKXNXQXSY"Y;YzY|Y~YYYYYYYZ*Z,Z-Z.Z1Z3Z5Z6Z9ZZ?ZBZCZDZGZlZoZqZtZwZzZ|[G[^[[[[[[[[[[\\\ \)\4\7\:\=\@\C\E\^\e\o\|\\\\\\\\\\\\\\\\\\\\\\\]]]]] ] ]s]v]x]y]z]|]~]]]]]]]]]]]]]]]]]]]]^Y^\^^^_^`^b^d^g^h^k^n^p^q^s^t^u^~^^^^^^^^^_A_________________`` ` ```````````````aaa"a#a&a)a+a-a/a8aIaLaOaRaUaXa[a^aaacaaaaaaaaaaaaaaaab0b2b4b6b9bb@b^bbbbbbbbbbbbbbbbbcc*c-c/c2c5c8c:d}ddddddddddddddde eJeLeNePeSeVeXeZef$f&f'f(f+f-f/f0f3f6f8f9ffWffffffffg/ggggggggggggggggggghhhh h hhhhhhhhhhhhhhhhiiOiQiSiUiXi[i]i_ij5j8j:j;jp@pApCpDpEpNpgppppppppqWqZq\q]q^q`qbqeqfqiqlqnqoqqqrqsqqqqqqqqrs ss"s$s's*s-s6sAsCsFsIsLsOsQsssssssssssssssssstt"t$t't)t,t/t1vvyv|v~vvvvvvvvvvvvvvvvvvvvvvxxxxxxxxxxyyyyy y y yy,yUyXyZy]y_ybyeygyyzz zzz)zBzMzpzzzzzzzzzzzzzz{{{{{ { {,{A{C{E{H{K{M{Y{n{p{r{u{x{z{{{{{{{{{{{{{{| ||!|#|&|)|+|F|[|]|_|b|e|g|r||||||||||||||||||||}}}}}}!}3}<}T}[}j}{}}}}}}}}}}}}}}}}}}~ ~ ~~~~~,~.~0~3~6~A~R~T~V~Y~\~u~~~~~~~~~~~~~~~~~~&)+.1R[]_dgjlnp|!#$'(),FāǁځUWXY\^`adgijmnorł΂Ђ҂Ղ؂ڂ܃$'),/>ORTWZiz}σ҃ԃ׃ڃ$&(+.8IKMPSfwy{~̈́τфԄׄ $579APadfil{І7:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ÈƈɈ̈ΈЈ҈Ԉֈ؈ڈ܈߈  #&),/2579;>ADGJMPSVY\^`behknqtwz}ĉljɉ׊&)+.147:;>ADGJMOQSnĊϊъӊ֊؊ۊ݊&1:CFHJ`Njً "/8CNČƌȌˌ̌͌Ќ 1bˍ .7PWp׎')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsux{~ÐŐǐɐː͐АҐՐאِېݐߐ  #%'),.1368;=@CFHJLOQTVY[^`cfilortvxz|~iknprtvxz|~ēǓʓ͓Гӓ֓ٓܓߓ  "$'*-0369ADGJMPSVY\_behknqtwz}×Ɨɗ̗ϗҗ՗ؗۗޗ  #&),/258;>ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ęǙʙ͙Йә֙ٙܙߙ !$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~›ěƛțʛ̛՛֛؛xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/Localizable.strings0000644000175000017500000001075614757411105023415 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Mchten Sie X11 wirklich beenden?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Alle aktiven X11-Programme werden sofort gestoppt und alle ungesicherten nderungen gehen dann verloren."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "RandR-Modus aktivieren?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Ein Programm hat X11 aufgefordert die Auflsung Ihres Bildschirmes zu ndern. X11 wird die vorherige Anordnung wiederherstellen, sobald das Programm die Anfrage zur Rckkehr zum vorherigen Status startet. Alternativ knnen Sie die Tastenkombination #%#A  drcken, um X11 zur Rckkehr zum vorherigen Status zu zwingen."; /* No comment provided by engineer. */ "Allow" = "Erlauben"; /* No comment provided by engineer. */ "Always Allow" = "Immer erlauben"; /* No comment provided by engineer. */ "Cancel" = "Abbrechen"; /* No comment provided by engineer. */ "Mac Help" = "Mac-Hilfe"; /* No comment provided by engineer. */ "Quit" = "Beenden"; /* No */ "No" = "Nein"; /* Yes */ "Yes" = "Ja"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Es gibt bereits eine Datei ~/.xinitrc .\n\nVon X11-Programmen angezeigte Fenster haben u. U. keine Titelleiste oder sehen etwas anders aus als die Fenster von nativen Programmen.\n\nMchten Sie die vorhandene Datei entfernen und die standardmige X11-Umgebung verwenden, wenn Sie X11 das nchste Mal starten?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Nach Updates fr X11 suchen &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/German.lproj/locversion.plist0000644000175000017500000000060414757411105023010 LprojCompatibleVersion 106 LprojLocale de LprojRevisionLevel 1 LprojVersion 106 xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/0000755000175000017500000000000014757411135017016 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/main.nib/0000755000175000017500000000000014757411135020511 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/main.nib/designable.nib0000644000175000017500000021517714757411105023232 הפעלה של X11 תיצור מקשי בקרת גישה של Xauthority. אם כתובת ה-IP של המערכת משתנה, מקשים אלו הופכים לבלתי תקינים. דבר זה עלול למנוע הפעלה של יישומי X11. כאשר התכונה פעילה, יש להפעיל גם אימות חיבורים כדי להבטיח את אבטחת המערכת. כאשר התכונה מבוטלת, חיבורים מיישומים מרוחקים אינם מורשים. החזק/י את מקש Option או Command תוך כדי לחיצה כדי להפעיל את כפתור העכבר האמצעי או הימני. xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/main.nib/keyedobjects.nib0000644000175000017500000013371114757411105023601 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  #$'./45 :>?EU^_uvz{~  /:;PXYZ`opxyz  #$%+:;CDEKZ[cdekz{  #$%,-.019ABEMNWghop  "#23;<KLTUefmn     ' ( / 0 @ A H I X Y a b r s z {         # $ ( ) . / 4 5 : L U V ` a b g w x           $ % * + 0 1       + , - 1 < = B D G H I J K  ] h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ!'-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*f 1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h P^submenuAction:$%*h 1&')#   #!(m   &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5i X112XY287i...Q,22  2kkm2!<<;"gstu*>=?g1x)__NSServicesMenu22  22CBo/  Qa22  2UNSTag2G*Fk  X11Qh22GIj 22!Kg 22  22ONk  X11Qq\_NSAppleMenu-!SSR"h TU*h 1؀VW)S  S!Xn ...-![[Z"d\]*d1^)[`_dQc  -!ccb"d*edxd1 !"filnoruv) ()chgdQw 12ckjdQm ;c!mTZoom c   KLcqpo  Q` RUVctso    Q~ c   hc!wn  ^_NSWindowsMenuqqs-!{{z"dxy|}*d1}~~)q{!n  X11[_NSMainMenuTmenu V^apps_separator ʀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ɀR@#@ŀ#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@Q#@$_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@f mnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/[NSColorName\NSColorSpace]NSCatalogNameWNSColorVSystem[headerColorXWNSWhite\NSComponents_NSCustomColorSpaceB1C1 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,WNSColor/_headerTextColorXB0C0 1+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView_NSDrawsBackground0A f mnptu#@(߀_controlBackgroundColorXL0.602715373N0.6666666667 1_controlTextColor+,/+,]NSTableColumn/LMNOPQRSWXY #@X#@D_`abcdefijh CommandXK0.33333299_`abc Ԁf mnp tu#@*XB1LMNOPQRSWXY À #@^n#@O]`_`abcdef !ij€c %XK0.33333299_`abc,ԀĀf 13ƀYgridColor67XM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ̀րFJLNOJVNSCell̀ ΀π WYZd OW_{{21, 245}, {402, 18}}`_abccdae`fghijmnBpXrst_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH(Q !р̀Ѐo     wxy[NSImageNameҀXNSSwitch+,|}_NSButtonImageSource|/+,\NSButtonCell/+,XNSButton=/]click_through ^؀^copy_menu_item ڀFȀۀ ܀݀ Y O_{{246, 235}, {128, 26}}fa_`cbcg`eXrh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހmnp tu WNSState݀!*d__popUpItemAction:ZOtherViews1ـ߀)!n -? ,256 . ,!f !i +,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F#L'(#. 2Y447 NOAAC_{{18, 243}, {402, 18}}<=F>?#EGH#NO_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth  DE #@w`_abccdae`fghijmnUXrst!рk [enable_auth]^ FLhiȀۀ _{{11, 182}, {409, 23}}`_abccdae`fghijmn]uXrst!рk  _enable_fullscreen}~ FLȀۀ  _{{-8, 116}, {409, 23}}`_abccdae`fghijmn}Xrst!сo+       ._enable_fullscreen_menu  <=F>?E ۀ   #@wp_{{5, 79}, {379, 31}}Z{250, 750}_`abci  @o@           .mnpqtu ߀\controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLȀ  Y O_{{18, 130}, {402, 18}}`_abccdae`fghijmnXrst!сo      X11_enable_keyequivsO  F#L#  _{{18, 166}, {402, 18}}<=F>?#E#N  GI H`_abccdae`fghijmnO Xrst!сo   Zenable_tcp() "&FL34Ȁ #$ _{{18, 243}, {402, 18}}`_abccdae`fghijmn(@Xrst!с"%o    \fake_buttonsHI (,FJLSTJȀ̀ )* _{{21, 184}, {402, 18}}`_abccdae`fghijmnH`Xrst!с(+o -_focus_follows_mousehi .2FJLstJȀ̀ /0 _{{21, 140}, {402, 18}}`_abccdae`fghijmnhXrst!с.1o  _focus_on_new_window 48FLȀ 56 _{{18, 69}, {402, 18}}`_abccdae`fghijmnXrst!с47o  Option  Alt_L -Alt_R_option_sends_alt :X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{266, 364}, {484, 342}}j X11WNSPanelZ{320, 240}YۀO @14A)#_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsRQ P?? B 1#)1O.H)_{{17, 195}, {385, 42}}_`abci.Fo  X11      Xauthority.   -IP   ,     .        X11._{{17, 118}, {385, 42}}<=F>?#E#4  KL #@yA_`abci!Jo  ,          .   ,     ._{{11, 17}, {404, 14}}_`abci*HMo.       X11._{{10, 33}, {438, 280}}+,//_{{13, 10}, {458, 326}}124567RUf):;<#>4VNSViewYNSTabViewTSAe+,CD]NSTabViewItemC/:;F<JJ4L\NSIdentifierT́eAVQ21OBQHShÚX(\.`)<=F>?JE`aJN ̀ YZ _{{30, 208}, {385, 31}}_`abciQmX[od   ,              .<=F>?JEyzJN ̀ ]^ _{{30, 161}, {385, 17}}_`abciS\_oC   X11   .      .<=F>?JEJN ̀ ab _{{30, 106}, {385, 28}}_`abciU`coq   ,    X11   -X11.app   ( Finder.app, Terminal.app )._{{10, 33}, {438, 279}}h Windows:;F<4LTgAVY Oh1imquy})FLȀg jk g_{{25, 255}, {409, 23}}`_abccdae`fghijmnXrst!сill <=F>?EN g no g_{{37, 221}, {385, 28}}_`abcimpoi           OSX    X11 CLIPBOARD -PRIMARY.FLȀg rs g_{{15, 129}, {409, 23}}`_abccdae`fghijmnXrst!сqto'  CLIPBOARD    FLȀg vw g_{{1, 109}, {423, 18}}`_abccdae`fghijmnXrst!сuxo9  PRIMARY (  )    FL+,Ȁg z{ g_{{15, 79}, {409, 23}}`_abccdae`fghijmn8Xrst!сy|o1         FLDEȀg ~ g_{{15, 192}, {409, 23}}`_abccdae`fghijmnQXrst!с}o'     CLIPBOARD <=F>?E^_N g  g_{{25, 158}, {385, 28}}_`abcikoU/      -xclipboard, -klipper,       X11.<=F>?Ewx~ g  g#@v_{{40, 47}, {370, 28}}_`abcioH   X11,        ._{{10, 33}, {438, 279}}i :;F<4LTہAV1]}ځ )<=F>?E ۀ  #@D_{{376, 238}, {45, 20}}_`abcif:<=F>?EŁ ۀ  #@x@_{{10, 216}, {392, 14}}_`abcio*       X11.<=F>?EN ۀ  _{{17, 145}, {385, 31}}_`abciod     X11. /    Command-Option-A      ._{{10, 33}, {438, 279}}c:;F<4TAQ11("4)<=F>?E  N   _{{17, 93}, {385, 31}}_`abci oh   ,          X11     .<=F>?E  !N   _{{17, 195}, {385, 42}}_`abci -oY/   Option  Command           . <=F>?E 9 :N   _{{17, 159}, {385, 14}}_`abci Fo;          X11.FL Q RȀ  _{{18, 179}, {402, 18}}`_abccdae`fghijmn ^Xrst!сo    <=F>?E k lN   _{{17, 32}, {385, 31}}_`abci xoQ  ,  Option     Alt_L -Alt_R  Mode_switch.FL  Ȁ  _{{2, 8}, {418, 18}}`_abccdae`fghijmn Xrst!сo    _{{10, 33}, {438, 280}}c+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel €_scroll_in_device_direction }Ā_sync_clipboard_to_pasteboard ƀ[sync_keymap iȀ_sync_pasteboard qʀ_sync_pasteboard_to_clipboard ù_sync_pasteboard_to_primary y΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ہ_minimize_window:?  4݁_orderFrontStandardAboutPanel:@ 6 ߁[prefs_show:F  EUhide:J  MZterminate:G  H_hideOtherApplications:H ! J_unhideAllApplications: & ^Ucopy: , f ]close_window: 2 l \zoom_window: 6 8  F ; </L  D E/?_NSHuggingPriority    Y P TO 8M_{{14, 191}, {100, 32}}`_abccae`fghi W Z 6 \ ]sr@ !Ԁd_apps_table_duplicate: c e  F ; </L  o p/?   _{{14, 159}, {100, 32}}`_abccae`fghi W Z c | ]sr!Ԁc_apps_table_delete: W _apps_table_show:  F ; </L   /?   _{{14, 223}, {100, 32}}`_abccae`fgh W Z ]sr!Ԁi _apps_table_new:( " ^prefs_changed:  ^prefs_changed:  ^prefs_changed:  ^prefs_changed:O   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:] _enable_fullscreen_changed:D A _toggle_fullscreen:B ̀ ^prefs_changed:H ( ^prefs_changed:h .  ^prefs_changed:  i "^prefs_changed: q $^prefs_changed:  u &^prefs_changed:  } (^prefs_changed:  y *^prefs_changed:} "  ,^prefs_changed: ( 4 .^prefs_changed: .  0^prefs_changed:1 2 ˯ 3'2?@ABkCDEFGHIJ()*  !"+q~4#(O.H4JBOQaHTSzhtU5,E_x6]i}7(4  ! : R l / 6 E c pGUHI-7 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?AREIHLÙ̀ρXZ(*\^.0`bfgikmoqsuwy{}ۀڀ݀߀  "$464Á@D#&'K& (3]NSApplication /    56OP N7=! _{{302, 440}, {454, 271}}o   X11Z{320, 240}1 6 c )1 -7@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $     _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller =/    $  C EBB_{{302, 29}, {15, 186}}_{{116, 20}, {318, 231}}1 . ˡ /HK 2 3 4 5 6 7 8   ;_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, > ?_NSPanGestureRecognizer @ A/_NSPanGestureRecognizer_NSGestureRecognizer+, C/+, E F\NSScrollView E/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 L ˯'2222B22222222()*        +q4##O#.##44JBJQJHJSJhJU4546]}47( / 6/ c/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{:?ARHAÙ̀́X́(́\́.́`Afgigmgqgugyg}ggAۀڀ݀ہہۀہہہ A"44##K1 ˯ 3'2?@ABkCDEFGHIJ()*  !"+q~4#(O.H4JBOQaHTSzhtU5,E_x6]i}7(4  ! : R l / 6 E c pGUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?AREIHLÙ̀ρXZ(*\^.0`bfgikmoqsuwy{}ۀڀ݀߀  "$464Á@D#&' ,ˀ׀ـ!'-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ˯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ˠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u       # % ' ) R ` g {  / = ? A C E G I Q c p {      & 1 6 c l v  !BDFHJLNir  CEGIKMOQSUYjlnpr{  *,UWYZ\^_ac "$%')*,.OQVXZ\^` /13579;Puwy{}  GIKMOQSUWYjwy{}#PRTVXZ\^`bkxz|~  (*,.09BSUWY[]_ace024579:<>_acegik "$%')*,.OQSUWY[x "$&(EQVkmoqsuFS\u5AZ{<Plv-G[n,6?MW_i "$%')+-/hikmpsuwyz}  o}       " % . 0 9 : = @ C E G J ] f h k !!!"!1!9!D!E!G!I!R!T!V!W!`!i!k!!!!!!!!!!!!!!!"" "$"+"4"6"8":"<"Q"Z"w"y"{""""""""""""""##!#.#3#<#O#T#g#p#w#|##############$$$$#$%$'$8$=$C$K$M$O$Q$S556 666$6,616F6H6J6L6N6`6u6x6|6~666666667777 7"7$7%7'7)7+707=7N7W7Z7\7^7s7u7w7y7{77777777777788 88"8'8P8Q8S8U8W8X8a8j8l8888888888888888899999 9"9/92949]9^9`9b9d9e9n9w9y99999999999999999::::::!:+:@:N:T:V:X:a:m:x::::::::;;;;;;;;;;;;; ;";#;$;M;O;R;S;V;Y;[;];_;x;;;;<<<'<9$>&>)>*>->0>2>4>6>P>>>>>??????$?&?'?(?)?+?-?/?1?3?D?G?I?K?|???????????????????????@@@@@ @"@$@&@(@*@G@t@v@x@z@|@~@@@@@@@@@@@@@@@@@AAAA'A5ABAHA]A_AaAcAeAgAvAAAAAAAAAAAAAAAAAAAABTBVBWBXBZB\B^B_BaBcBeBfBhBiBjBlBBBBBBBBBBBBC9CUC}CCCCCCCCCCCCCCCCCCDDDDDD D DD%D1DFDHDJDLDODQDDDDDDDDDDDDDDDDEEEE E"E%E'E)E@ETEiEkEmEpEsEuEEEEEEEEEEEEEEEFF@FBFDFFFIFLFNFPFFFFFFFFGJGMGOGPGQGSGUGXGYG\G_GaGbGdGeGfGoGGGGGGGGGGHNH_HbHdHfH{H}HHHHHHHHHHHHHHIKIMINIOIRITIVIWIZI]I_I`IcIdIeIIIIIIIIIIIIIIJJJJJIJ\JqJsJuJxJ{J}JJJJJJJJJJJJJJJJKK{K~KKKKKKKKKKKKKKKKKKKKKKKLL)L>L@LBLELHLJLLLLLLLLLLLLLLLLMMMMM M#M%M'MhMuMMMMMMMMMMMMMMMNNNNNN N"NaNcNeNgNjNmNoNqNNNNNNNNO$O&O'O(O*O,O.O/O2O5O7O8O:O;OXAXCXXXXXXXXXYYYY YY%Y/Y2Y4Y7Y:Y=YHYQY_YdY}YYYYYYYYYYYYYYYYYZ-Z0Z2Z3Z4Z6Z8Z;Z]?]X]}]]]]]]^r^^^^^^^^^^^^^^^^___ ___"_%_(_+_._1_4_6________________```` ` ````,````````````````````````ab/b1b2b3b6b8b:b;b>bAbCbDbGbHbIbbbbbbbbbbcc]c_c`cacdcfchciclcocqcrcucvcwcccccccccdSddddddddddddddddee!e#e%e(e+e-e/eeeeeeeeeeffffff f"fafcfefgfjfmfofqfg)g,g.g/g0g3g5g8g9gppxp{p}p~ppppppppppppppppppppqrrrrrr r rrrrrrrrrr7r\r_rardrgrjrlrs@sBsCsDsGsIsKsLsOsRsTsUsXsYsZssssssssssst`tctetftgtjtltotptstvtxtyt|t}t~ttttttttupuuuuuuuuuuuuuuuuv:vv@vCvFvHvJvvvvvvvvvwww$w-w@wEwQwfwhwjwmwpwrwwwwwwwwwwwwwwwxxxxxxx/xDxFxHxKxNxPxoxxxxxxxxxxxxxxxyyyyy yy*y,y.y1y4y6yAyVyXyZy\y_yayzyyyyyyyyyyyyyyyyz zz z"z%z(z;zLzNzPzSzVzvzzzzzzzzzzzzzzzzzzzzzzz{{){+{-{0{3{L{Y{[{^{a{g{x{z{|{{{{{{{{{{{{{{|3|G|J|L|M|N|Q|S|U|V|Y|\|^|_|b|c|d|g|||||||||||||}}} } }}}}}3}D}G}I}L}O}}}}}}}}}}}}}}}}}~~~!~$~'~)~+~2~G~X~Z~\~_~b~u~~~~~~~~~~~~~~   &_hjlortv -/147FWZ\_bqрӀՀ؀ۀ ')+.1DUWY\_|āǁց,=@BEHWhkmpsÂƂɂ؂.?BDGJYjmoruÄńDŽɄ˄̈́τфӄՄׄلۄ݄߄ "%'*-0369;=?BEHKNQTWZ]`cfilorux{~…Ņȅ˅΅хԅׅڅ݅  "$&(+.0368:<>@BENQSaĆņȆˆΆцԆ׆نۆ݆#.7@CFHKMVacehjmox{}Ç̇Շ؇ڇ܇Yk}ʈՈCEGHIKMORSVXZ]^_b{ĉA^}ʊ"'0=FQju~ŒČƌȌʌ̌ΌЌҌԌ֌،ڌ܌ތ !#&(+.1357:ADGJMPSVY\_behknqtwz}ÖŖǖɖ˖͖ϖіӖՖזٖۖݖߖ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}×ŗǗɗ˗͗ϗїӗ՗חٗۗݗߗ !#%')+-/13579;=?ACEGIKMOQSUWY[]_ajkmvwzxorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013366014757411105024323 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI\ijtuyoV  !"%,-23 8<=CT]^tuyz}  .9:OWXY_nowxy "#$*9:BCDJYZbcdjyz "#$+,-/08@ADLMVfgno !"12:;JKSTdelm~    & ' . / ? @ G H W X ` a q r y z         " # ' ( - . 3 4 9 K T U _ ` a f v w ~          # $ ) * / 0      * + , 0 ; < A C F G H I J J \ g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ!'-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*f 1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h P^submenuAction:$%*h 1&')#   #!(m   &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5i X112XY287i...Q,22  2kkm2!<<;"gstu*>=?g1x)__NSServicesMenu22  22CBo/  Qa22  2UNSTag2G*Fk  X11Qh22GIj 22!Kg 22  22ONk  X11Qq\_NSAppleMenu-!SSR"h TU*h 1؀VW)S  S!Xn ...-![[Z"d\]*d1^)[`_dQc  -!ccb"d*edxd1 !"filnoruv) ()chgdQw 12ckjdQm ;c!mTZoom c   KLcqpo  Q` RUVctso    Q~ c   hc!wn  ^_NSWindowsMenuqqs-!{{z"dxy|}*d1}~~)q{!n  X11[_NSMainMenuTmenu V^apps_separator ʀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ɀR #@ŀ#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@M@#@$]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@f klmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/[NSColorName\NSColorSpace]NSCatalogNameWNSColorVSystem[headerColorVWNSWhite\NSComponents_NSCustomColorSpaceB1C1 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,WNSColor/_headerTextColorVB0C0 1+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView_NSDrawsBackground0A f klnrs#@(݀_controlBackgroundColorVL0.602715373N0.6666666667 1_controlTextColor+,/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghh CommandVK0.33333299]^_`aҀf kln  rs#@*VB1JKLMNOPQUVW À #@[N#@O]`]^_`abcdgh€c #VK0.33333299]^_`a*ҀĀf /1ƀYgridColor45VM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ̀րDHJKMNHVNSCell̀ ΀π VXYd OW_{{21, 245}, {402, 18}}_]`abac_d^efghilm@oVqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH(Q !р̀Ѐo     vwx[NSImageNameҀXNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton;/]click_through ^؀^copy_menu_item ڀDJǀۀ ܀݀ X O_{{246, 235}, {128, 26}}e`]_aabf^dVqg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހkln rs WNSState݀!*d__popUpItemAction:ZOtherViews1؀߀)!n -? ,256 . ,!f !i +,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D"JK&'"- 1X336 NOAAC_{{18, 243}, {402, 18}};<D=>"JDFG"MN_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth  DE #@w_]`abac_d^efghilmTVqrs!рk [enable_auth\] DJKghǀۀ _{{11, 182}, {409, 23}}_]`abac_d^efghilm\tVqrs!рk  _enable_fullscreen|} DJKǀۀ  _{{-8, 116}, {409, 23}}_]`abac_d^efghilm|Vqrs!сo+       ._enable_fullscreen_menu  ;<D=>JD ۀ   #@wp_{{5, 79}, {379, 31}}Z{250, 750}]^_`ah  @o@           .klnors ݀\controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKǀ  X O_{{18, 130}, {402, 18}}_]`abac_d^efghilmVqrs!сo      X11_enable_keyequivsN  D"JK"  _{{18, 166}, {402, 18}};<D=>"JD"M  GI H_]`abac_d^efghilmNVqrs!сo   Zenable_tcp'( "&DJK23ǀ #$ _{{18, 243}, {402, 18}}_]`abac_d^efghilm'?Vqrs!с"%o    \fake_buttonsGH (,DHJKRSHǀ̀ )* _{{21, 184}, {402, 18}}_]`abac_d^efghilmG_Vqrs!с(+o -_focus_follows_mousegh .2DHJKrsHǀ̀ /0 _{{21, 140}, {402, 18}}_]`abac_d^efghilmgVqrs!с.1o  _focus_on_new_window 48DJKǀ 56 _{{18, 69}, {402, 18}}_]`abac_d^efghilmVqrs!с47o  Option  Alt_L -Alt_R_option_sends_alt :V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{266, 364}, {484, 342}}j X11WNSPanelZ{320, 240}XڀO @13A)"_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsRQ P?? B 1")1N-H)_{{17, 195}, {385, 42}}]^_`ah-Fo  X11      Xauthority.   -IP   ,     .        X11._{{17, 118}, {385, 42}};<D=>"JD"3  KL #@yA]^_`ah Jo  ,          .   ,     ._{{11, 17}, {404, 14}}]^_`ah)HMo.       X11._{{10, 33}, {438, 280}}+,./_{{13, 10}, {458, 326}}113456RUf)9:;"=3VNSViewYNSTabViewTSAe+,BC]NSTabViewItemB/9:E;HI3K\NSIdentifierT́eAVQ21N@PGRgT́X(\.`);<D=>HJD_`HM ̀ YZ _{{30, 208}, {385, 31}}]^_`ahPlX[od   ,              .;<D=>HJDxyHM ̀ ]^ _{{30, 161}, {385, 17}}]^_`ahR\_oC   X11   .      .;<D=>HJDHM ̀ ab _{{30, 106}, {385, 28}}]^_`ahT`coq   ,    X11   -X11.app   ( Finder.app, Terminal.app )._{{10, 33}, {438, 279}}h Windows9:E;3KTgAVX Oh1imquy})DJKǀg jk g_{{25, 255}, {409, 23}}_]`abac_d^efghilmVqrs!сill ;<D=>JDM g no g_{{37, 221}, {385, 28}}]^_`ahmpoi           OSX    X11 CLIPBOARD -PRIMARY.DJKǀg rs g_{{15, 129}, {409, 23}}_]`abac_d^efghilmVqrs!сqto'  CLIPBOARD    DJKǀg vw g_{{1, 109}, {423, 18}}_]`abac_d^efghilmVqrs!сuxo9  PRIMARY (  )    DJK*+ǀg z{ g_{{15, 79}, {409, 23}}_]`abac_d^efghilm7Vqrs!сy|o1         DJKCDǀg ~ g_{{15, 192}, {409, 23}}_]`abac_d^efghilmPVqrs!с}o'     CLIPBOARD ;<D=>JD]^M g  g_{{25, 158}, {385, 28}}]^_`ahjoU/      -xclipboard, -klipper,       X11.;<D=>JDvw} g  g#@v_{{40, 47}, {370, 28}}]^_`ahoH   X11,        ._{{10, 33}, {438, 279}}i 9:E;3KTہAV1\|ځ );<D=>JD ۀ  #@D_{{376, 238}, {45, 20}}]^_`ahf:;<D=>JDā ۀ  #@x@_{{10, 216}, {392, 14}}]^_`aho*       X11.;<D=>JDM ۀ  _{{17, 145}, {385, 31}}]^_`ahod     X11. /    Command-Option-A      ._{{10, 33}, {438, 279}}c9:E;3TAQ11'"4);<D=>JD  M   _{{17, 93}, {385, 31}}]^_`ah oh   ,          X11     .;<D=>JD  M   _{{17, 195}, {385, 42}}]^_`ah ,oY/   Option  Command           . ;<D=>JD 8 9M   _{{17, 159}, {385, 14}}]^_`ah Eo;          X11.DJK P Qǀ  _{{18, 179}, {402, 18}}_]`abac_d^efghilm ]Vqrs!сo    ;<D=>JD j kM   _{{17, 32}, {385, 31}}]^_`ah woQ  ,  Option     Alt_L -Alt_R  Mode_switch.DJK  ǀ  _{{2, 8}, {418, 18}}_]`abac_d^efghilm Vqrs!сo    _{{10, 33}, {438, 280}}c+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel €_scroll_in_device_direction }Ā_sync_clipboard_to_pasteboard ƀ[sync_keymap iȀ_sync_pasteboard qʀ_sync_pasteboard_to_clipboard ù_sync_pasteboard_to_primary y΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ہ_minimize_window:?  4݁_orderFrontStandardAboutPanel:@  6 ߁[prefs_show:F  EUhide:J  MZterminate:G  H_hideOtherApplications:H J_unhideAllApplications: % ^Ucopy: + f ]close_window: 1 l \zoom_window: 5 7  D : ;-JK  C D->_NSHuggingPriority    X O SO 8M_{{14, 191}, {100, 32}}_]`aba_d^efgh V Y 5 [ \rq@ !Ԁd_apps_table_duplicate: b d  D : ;-JK  n o->   _{{14, 159}, {100, 32}}_]`aba_d^efgh V Y b { \rq!Ԁc_apps_table_delete: W _apps_table_show:  D : ;-JK   ->   _{{14, 223}, {100, 32}}_]`aba_d^efg V Y \rq!Ԁi _apps_table_new:' " ^prefs_changed:  ^prefs_changed:  ^prefs_changed:  ^prefs_changed:N   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:\ _enable_fullscreen_changed:D A _toggle_fullscreen:@ ̀ ^prefs_changed:G ( ^prefs_changed:g .  ^prefs_changed:  i "^prefs_changed: q $^prefs_changed:  u &^prefs_changed:  } (^prefs_changed:  y *^prefs_changed:| !  ,^prefs_changed: ' 4 .^prefs_changed: -  0^prefs_changed:1 1 ʯ 2'2?@ABkCDEFGHIJ()*  !"+q~3"'N-G3H@NP`GSRygsT4+D^w5\h|6'3   9 Q k - 5 D b oESFG+5 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?AREIHLÙ̀ρXZ(*\^.0`bfgikmoqsuwy{}ۀڀ݀߀  "$464Á@D#&'K& (3]NSApplication -    56OP N7=! _{{302, 440}, {454, 271}}o   X11Z{320, 240}1 5 b )1 +5@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " J    _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller ;/  J  #  C EBB_{{302, 29}, {15, 186}}_{{116, 20}, {318, 231}}1 - ʡ .HK 1 2 3 4 5 6 7   :_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, = >_NSPanGestureRecognizer ? @/_NSPanGestureRecognizer_NSGestureRecognizer+, B/+, D E\NSScrollView D/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 K ʯ'2222B22222222()*        +q3""N"-""33H@HPHGHRHgHT3435\|36' - 5- b-EFG- -02222:22222222-QSS-Y[-acccccccc-y{:?ARHAÙ̀́X́(́\́.́`Afgigmgqgugyg}ggAۀڀ݀ہہۀہہہ A"44##K1 ʯ 2'2?@ABkCDEFGHIJ()*  !"+q~3"'N-G3H@NP`GSRygsT4+D^w5\h|6'3   9 Q k - 5 D b oESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?AREIHLÙ̀ρXZ(*\^.0`bfgikmoqsuwy{}ۀڀ݀߀  "$464Á@D#&' ,ˀ׀ـ!'-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ʯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ʠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u       # % ' ) R ` g {  / = ? A C E G I Q c p {      & 1 6 c l v  !BDFHJLNir  CEGIKMOQSUYjlnpr{  *,UWYZ\^_ac "$%')*,.OQVXZ\^` /13579;Puwy{}  GIKMOQSUWYjwy{}#PRTVXZ\^`bkxz|~  (*,.09BSUWY[]_ace024579:<>_acegik "$%')*,.OQSUWY[x "$&(EQVkmoqsuBOXq1=Vw8Lhr)CWz|&4>FPv   OPRTWZ\^`adfhr{Vdpy     ! $ ' * , . 1 D M O R i r ! !! !+!,!.!0!9!;!=!>!G!P!R!s!!!!!!!!!!!!!!!!" """""!"#"8"A"^"`"b"o"w"~""""""""""""######6#;#N#W#^#c#x##############$$$ $ $$$$$*$2$4$6$8$:555566 666-6/6163656G6\6_6c6e6g6p66666667777 7 7 77777$757>7A7C7E7Z7\7^7`7b7{777777777777778 887888:8<8>8?8H8Q8S8t8v8x8z8|8~88888888888889999 9999D9E9G9I9K9L9U9^9`999999999999999999:::::::':5:;:=:?:H:T:_:i:t::::::::::::::;;;;;; ; ; ; ;6;8;;;<;?;B;D;F;H;a;;;;;;<<"<1<3<8<= >>>>>>>>>9>>>>>>>>>?? ??????????-?0?2?4?e?m?o?q?s?u?w?y?{?}??????????????@@@@@ @ @ @@@@0@]@_@a@c@e@g@i@k@m@o@|@@@@@@@@@@@@@@AAAA+A1AFAHAJALANAPA_AtAvAxAzA|A~AAAAAAAAAAAAAAB=B?B@BABCBEBGBHBJBLBNBOBQBRBSBUBBBBBBBBBBBBC"C>CfCCCCCCCCCCCCCCCCCCCCCCCCCCDDD/D1D3D5D8D:DDDDDDDDDDDDDDDDEEEE E EEEE)E=ERETEVEYE\E^EEEEEEEEEEEEEEEEF)F+F-F/F2F5F7F9FFFFFFFFG3G6G8G9G:GGAGBGEGHGJGKGMGNGOGXGoGzGGGGGGGGH7HHHKHMHOHdHfHiHkHmHzHHHHHHHHHHI4I6I7I8I;I=I?I@ICIFIHIIILIMINIwIyI|I}IIIIIIIIIIIIIIJ2JEJZJ\J^JaJdJfJJJJJJJJJJJJJJJJJKdKgKiKjKkKmKoKrKsKvKyK{K|K~KKKKKKKKKKKLLL'L)L+L.L1L3LLLLLLLLLLLLLLLLMMMMM M MMMQM^MsMuMwMzM}MMMMMMMMMMMMMMMMN NJNLNNNPNSNVNXNZN{NNNNNNNO OOOOOOOOOO O!O#O$O%O>O}OOOOOOOOOOOOOOOPHPJPKPLPOPQPSPTPWPZP\P]P`PaPbPzPPPPPPPPQ QQ4Q6Q8Q;Q>Q@QQQQQQQRRR5RBR_RxRRRRRRRRRRRRRRRRRRRRSSSS S5S=SHSqSsSvSwSzS|S~SSSSSSSSTT T&T)T,T-T/T2T4T7T:T=T?T@TCTETGTHTQTTTVTXTaTlTnTqTsTvTyT{TTTTTTTTUVVyV|V~VVVVVVVVVVVVVVVVVVVVVVWWXXX!X$X'X*X,XXXXXXXXXXXXXYYYYYY Y#Y&Y1Y:YHYMYfYsYvYyY{Y~YYYYYYYYYYYYZZZZZZZ!Z$Z%Z(Z+Z-Z.Z0Z1Z2ZKZpZsZuZxZ{Z~Z[K[[[[[[[[[[[[[[[[[\ \\\\\\\] ]]]]]]]]]]!]#]$]&]'](]A]f]i]k]n]q]t]v^[^t^^^^^^^^^^^^^^^^^^___ ________z_|_}_~____________________``|```````````````````````abbbbbb!b#b$b'b*b,b-b0b1b2bKbbbbbbbbbcFcHcIcJcMcOcQcRcUcXcZc[c^c_c`cxccccccccdnAnDnGnJnMnPnSnUnnnnnnnnnnnnnnnnnooooo"o%o'opapdpfpgphpkpmpppqptpwpypzp}p~pppppppppqqqqqqqqqqqqrrrrrr rErHrJrMrPrSrUrs)s+s,s-s0s2s4s5s8s;s=s>sAsBsCs\ssssssssstItLtNtOtPtStUtXtYt\t_tatbtetftgttttttttuYuuuuuuuuuuuuuuuuv#v%v'v)v,v/v1v3vnvvvvvvvvvww ww)w.w:wOwQwSwVwYw[wxwwwwwwwwwwwwwwwwwxxxxx-x/x1x4x7x9xXxmxoxqxtxwxyxxxxxxxxxxxxxxxyyyyyyy*y?yAyCyEyHyJycyxyzy|y~yyyyyyyyyyyyyzz z zzz$z5z7z9z|?|B|E|G|H|K|L|M|P|y|{|~|||||||||||||||||}}}-}0}2}5}8}}}}}}}}}}}}}}}}}~~~ ~ ~~~~~0~A~C~E~H~K~^~o~r~t~w~z~~~~~~~~~~~~~~~~HQSUX[]_r /@CEHKZkmoruĀ׀->@BEHevxz}ЁӁՁ؁ہ&)+.1@QTVY\k|҂Ղׂڂ݂(+-03BSVX[^mv„ĄƄȄʄ̄΄Є҄Ԅք؄ڄ܄ބ "$&(+.147:=@CFILORUX[^adgjmpsvy|ÅƅɅ̅υ҅Յ؅ۅޅ !#%')+.7:ADGJMPSVY\_behknqtwz}”ŔȔ˔ΔєԔהڔݔ "%(+.147:=@CFILORUX[^adgjmpsvy|ĕǕʕ͕Еӕٕ֕ܕߕ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~—ėƗȗʗ̗ΗЗҗԗ֗ؗڗܗޗ  "$&(*,.02468:<>@BDFHJSTV_`cl{xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/Localizable.strings0000644000175000017500000000776614757411105022607 /* Dialog title when quitting */ "Do you really want to quit X11?" = "  /    X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "    X11       ."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "  RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "  -X11     . X11             . ,     #%#A    X11   ."; /* No comment provided by engineer. */ "Allow" = ""; /* No comment provided by engineer. */ "Always Allow" = "  "; /* No comment provided by engineer. */ "Cancel" = ""; /* No comment provided by engineer. */ "Mac Help" = "  Mac"; /* No comment provided by engineer. */ "Quit" = ""; /* No */ "No" = ""; /* Yes */ "Yes" = ""; /* Terminal */ "Terminal" = ""; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "  ~/.xinitrc .\n\n   -   X11    ,       -  .\n\n         X11     X11 ?"; /* window item modifiers */ "window item modifiers" = ""; /* Updates menu title & */ "Check for X11 Updates..." = "    X11..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/he.lproj/locversion.plist0000644000175000017500000000061014757411105022170 LprojCompatibleVersion 106.5 LprojLocale he LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/0000755000175000017500000000000014757411135017033 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/main.nib/0000755000175000017500000000000014757411135020526 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/main.nib/designable.nib0000644000175000017500000021021714757411105023235 Držite pritisnutu tipku Option ili Command tijekom klikanja kako biste aktivirali srednju ili desnu tipku miša. Omogućava X11 korijenski prozor. Koristite kombinaciju tipaka Command-Option-A za uključenje i isključenje prikaza preko cijelog zaslona. Omogućava stavku izbornika "kopiraj" i dozvoljava sinkronizaciju između OSX memorijskog pretinca i X11 MEMORIJSKOG PRETINCA i PRIMARNIH međumemorija. Onemogućite ovu opciju ako želite koristiti xclipboard, klipper ili bilo koji drugi alat za upravljanje X11 memorijskim pretincem. Kad je omogućeno, izradom novog X11 prozora, aplikacija X11.app premjestit će se u prvi plan (umjesto Finder.app, Terminal.app, itd.) Pokrenete li X11, izradit će se Xauthority tipke za kontrolu pristupa. Promijeni li se IP adresa sustava, ove tipke postat će nevažeće i to može spriječiti pokretanje X11 aplikacija. Omogućite li ovu opciju, također trebate omogućiti autorizaciju povezivanja kako bi se osigurala zaštita sustava. Kad je onemogućeno, povezivanja iz udaljenih aplikacija nisu dozvoljena. xorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/main.nib/keyedobjects.nib0000644000175000017500000013534214757411105023620 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata3 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUVW`ghistxy}>?BH[histxnU  !&',12 7;<BR[\qrvwz} *34<=>DST\]^dst|}~ %&6>?@FUV^_`fuv~+,>EFGNOPXYZjqrs{|} #$,->?FGVW_`opxy     $ % 5 6 = > ? @ F N _ ` g h x y          $ % * + / 0 5 6 ; < A S \ ] g h i n ~            % & + , 1 2 7 8       ! 2 3 4 8 C D I K N O P Q R  d e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysPN.1102O&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ȀԀր$*07āƁȁʁ́΁Ёҁԁׁفہ݁߁   "$&(*,)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*XIzbornik1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZAplikacijeP^submenuAction:$%*ZAplikacije1&')#   #!(gPodesi &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_v)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5oViae o aplikaciji X112XY287[Postavke...Q,22  2kkm2!<<;"VUslugesmu*=;>1w)__NSServicesMenu22  22BAo-Uklju i/isklju i prikaz preko cijelog zaslonaQa22  2UNSTag2F*EZSakrij X11Qh22FH]Sakrij ostalo22!JkPrika~i sve22  22NM[Zatvori X11Qq\_NSAppleMenu-!RRQ"ZAplikacijeST*ZAplikacije1׀UV)R  R!WgPodesi &-!ZZY"UUrediY[*1\)Z^]WKopirajQc   -!aa`"VProzor *b`u1cfiklors) %&aedWZatvoriQw ./ahgVSmanjiQm 8a!jWZumiraj a   HIanmoCikli ka izmjena prozoraQ` ORSaqpo Obrnuta cikli ka izmjena prozoraQ~ a   ea!t_Postavi sve naprijed^_NSWindowsMenunnp-!xxw"ePomouvyz*ePomo1z{{)nx!|lPomo za X11[_NSMainMenuTmenu U^apps_separator ǀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ƀR@#@€#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews9 8: 7Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  <: ;Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification=2I#@#? ADCOA A AA#?6_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@SImejklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView0A\Polje tekstajkmqr#@*UB1_controlTextColor+,ؤ/+,]NSTableColumn/IJKLMNOPTUV #@X#@D\]^_`abcfgWNaredbaUK0.33333299\]^_`ǀ\Polje tekstaIJKLMNOPTUV #@Q#@$\]^_`abcfgfPre ac  [headerColorUB1C1 1\]^_`_NSDrawsBackground \Polje tekstajkmqr#@(#%_controlBackgroundColor()UL0.602715373N0.6666666667 1.0ÀYgridColor34UM0.4246723652E0.5 1+,89[NSTableView8:/YNSControlZapps_table?@ ɀӀCGIKLGVNSCellʀ ˀ̀ TVW X_{{15, 245}, {402, 18}}]\^_``a^b]cdefgj?lUnop_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !΀ɀ̀_Klikanje kroz neaktivne prozorestu[NSImageNameπXNSSwitch+,xy_NSButtonImageSourcex/+,{|\NSButtonCell{/+,~XNSButton~:/]click_through \Հ^copy_menu_item ׀Cŀ؀ ـڀ Vn Xa_{{60, 234}, {128, 26}}c^\]`_`d]bUne _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition׀@ @@ !ۀjkmqr WNSState߀݀ڀ!*ZOd zaslona__popUpItemAction:ZOtherViews1Հ܀)݀!߀X256 boja݀!߀fTisue݀!߀XMilijuni+,_NSPopUpButtonCell{/^NSMenuItemCell+,]NSPopUpButton~:/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator CI#$ŀ ,V/ X_{{18, 243}, {402, 18}}]\^_``a^b]cdefgj9Unop!΀_Autoriziraj povezivanja[enable_authAB CILMŀ؀ _{{18, 182}, {409, 23}}]\^_``a^b]cdefgjAYUnop!΀_Prikaz preko cijelog zaslona_enable_fullscreenab CIlmŀ؀  _{{37, 116}, {482, 18}}]\^_``a^b]cdefgjayUnop!΀_HDozvoli pristup traci s izbornicima u modu prikaza preko cijelog zaslona_enable_fullscreen_menu C_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth؀  #@v`_{{54, 79}, {362, 31}}Z{250, 750}\]^_`f   @o^Traka s izbornicima postat se vidljiva kad stavite kursor miaa na vrh vaaeg primarnog zaslona.jkmnqr % \controlColor+,[NSTextField:/_enable_fullscreen_menu_text CIƀ  V WX??A_{{18, 130}, {402, 18}}C BC #@|1]\^_``a^b]cdefgjUnop!΁o%Omogui ekvivalentne tipke unutar X11_enable_keyequivs CIŀ  _{{18, 166}, {402, 18}}]\^_``a^b]cdefgj Unop!΁o!Dozvoli veze od mre~nih klijenataZenable_tcp #CI$ !  _{{18, 243}, {402, 18}}CI./5 MN E]\^_``a^b]cdefgj;Unop!΁"oEmuliraj mia s tri tipke\fake_buttonsCD %)CGINOGŀʀ &' _{{15, 184}, {402, 18}}]\^_``a^b]cdefgjC[Unop!΁%(oFokus slijedi miaa_focus_follows_mousecd +/CGInoGŀʀ ,- _{{15, 140}, {402, 18}}]\^_``a^b]cdefgjc{Unop!΁+._Fokus na nove prozore_focus_on_new_window 16CI 24 3_{{18, 69}, {402, 18}}C PR Q]\^_``a^b]cdefgjUnop!΁15o Tipke Option aalju Alt_L i Alt_R_option_sends_alt 8U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_ {{266, 364.0390625}, {570, 341}}\X11 postavkeWNSPanelZ{320, 240}VX >1́?)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels[Z Y== @ 1)15 $EG 31Q)_{{36, 93}, {453, 31}}\]^_`f  DooKad je omogueno, ekvivalentne tipke trake izbornika mogu ometati X11 aplikacije koje koriste meta modifikator.C#$  FH G_{{36, 195}, {453, 42}}C56< JK #@}0\]^_`f5CE  IopDr~ite pritisnutu tipku Option ili Command tijekom klikanja kako biste aktivirali srednju ili desnu tipku miaa. _{{36, 159}, {471, 14}}\]^_`f LG  L_RDozvoljava promjene izbornika unosa kojima se presnimava trenutna X11 mapa tipaka._{{18, 179}, {402, 18}}]\^_``a^b]cdefgj$UUnop!΁ O_%Slijedi sistemski raspored tipkovnice_{{36, 32}, {453, 31}}CIbc̀ TU ?\]^_`fo3  So[Kad je omogueno, tipke Option aalju Alt_L i Alt_R simbole X11 tipke umjesto mod_preklopke._{{18, 8}, {418, 18}}]\^_``a^b]cdefgjxUnop!΁QV_&Uvijek listaj u smjeru pomicanja prsta_{{10, 33}, {524, 279}}+,~/_{{13, 10}, {544, 325}}1[_p)VNSViewYNSTabView\NSIdentifier ^]?\Q1TUlaz+,]NSTabViewItem/ ^؁o?`Q21Aaׁbfj)C؀ cd #@B_{{17, 238}, {41, 20}}\]^_`fb eUBoje:CӁ؀ gh #@x@_{{36, 216}, {392, 14}}\]^_`ff  io8Ova opcija stupit e na snagu kad ponovno pokrenete X11.C؀ kl #@|_${{36, 141.671875}, {464, 33.328125}}\]^_`fj  moOmoguava X11 korijenski prozor. Koristite kombinaciju tipaka Command-Option-A za uklju enje i isklju enje prikaza preko cijelog zaslona._{{10, 33}, {524, 279}}UIzlaz ^q?`V Xr1    sw{)CIŀq tu q_{{18, 255}, {409, 23}}]\^_``a^b]cdefgj )Unop!΁svoOmogui sinkronizacijuC67=q xy q#@}_{{36, 221}, {469, 28}}\]^_`f Dw  zoOmoguava stavku izbornika "kopiraj" i dozvoljava sinkronizaciju izmeu OSX memorijskog pretinca i X11 MEMORIJSKOG PRETINCA i PRIMARNIH meumemorija.CIOPŀq |} q_{{34, 129}, {457, 18}}]\^_``a^b]cdefgj \Unop!΁{~oAA~uriraj MEMORIJSKI PRETINAC kad se memorijski pretinac promijeniCIhiŀq  q_{{34, 104}, {470, 18}}]\^_``a^b]cdefgjuUnop!΁oFA~uriraj PRIMARNO (srednji klik) kad se memorijski pretinac promijeni CIŀq  q_{{34, 79}, {430, 18}}]\^_``a^b]cdefgjUnop!΁o=A~uriraj memorijski pretinac odmah nakon odabira novog tekstaCIŀq  q_{{34, 192}, {457, 18}}]\^_``a^b]cdefgjUnop!΁oAA~uriraj memorijski pretinac kad se MEMORIJSKI PRETINAC promijeniCq  q#@|_{{48, 158}, {462, 28}}\]^_`f  oOnemoguite ovu opciju ako ~elite koristiti xclipboard, klipper ili bilo koji drugi alat za upravljanje X11 memorijskim pretincem.CՁq  q#@|P_{{48, 47}, {457, 28}}\]^_`f  oYZbog ograni enja X11 protokola, ova opcija mo~da nee uvijek raditi u nekim aplikacijama._{{10, 33}, {524, 279}}_Memorijski pretinacG ^ʁ?`1?CcɁ%+)CGG ʀ  #@}_{{23, 208}, {482, 31}}\]^_`f   ohKad je omogueno, klikanjem na neaktivni prozor e taj klik miaem proi do tog prozora te ga aktivirati.CG  G ʀ  #@}_{{23, 164}, {477, 14}}\]^_`f "  oGFokus X11 prozora slijedi kursor. To mo~e imate neke negativne u inke.CG . /G ʀ  _{{23, 106}, {477, 28}}\]^_`f ;  oKad je omogueno, izradom novog X11 prozora, aplikacija X11.app premjestit e se u prvi plan (umjesto Finder.app, Terminal.app, itd.)_{{10, 33}, {524, 279}}WProzori C^? 1 G J K L)C W X ^  #@}@_{{36, 195}, {472, 42}}\]^_`f J e  oPokrenete li X11, izradit e se Xauthority tipke za kontrolu pristupa. Promijeni li se IP adresa sustava, ove tipke postat e neva~ee i to mo~e sprije iti pokretanje X11 aplikacija.C q r  _{{36, 118}, {464, 42}}\]^_`f K ~  oOmoguite li ovu opciju, takoer trebate omoguiti autorizaciju povezivanja kako bi se osigurala zaatita sustava. Kad je onemogueno, povezivanja iz udaljenih aplikacija nisu dozvoljena.C     #@y_{{17, 17}, {404, 14}}\]^_`f L   o:Ove promjene stupit e na snagu kad ponovno pokrenete X11._{{10, 33}, {524, 279}}YSigurnost+, YNSTabView /Z{570, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel Q_scroll_in_device_direction _sync_clipboard_to_pasteboard$  À[sync_keymap sŀ_sync_pasteboard {ǀ_sync_pasteboard_to_clipboard ɀ_sync_pasteboard_to_primary ˀ_sync_primary_immediately ̀Zsync_text1 πZsync_text2D @р_toggle_fullscreen_item? 4Ӏ^x11_about_item s Ձ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  f ؁_minimize_window:? 4ځ_orderFrontStandardAboutPanel:@  6 ܁[prefs_show:F  DށUhide:J  LZterminate:G " G_hideOtherApplications:H ( I_unhideAllApplications: - \Ucopy: 3 c ]close_window: 9 i \zoom_window: = ?  C B C,I  K L,_NSHuggingPriority   V W [X 5J_{{343, 191}, {123, 32}}]\^_``^b]cdef ^ a = c don@ !рZDupliciraj_apps_table_duplicate: j l  C B C,I  v w,  _{{343, 159}, {123, 32}}]\^_``^b]cdef ^ a j don!рVUkloni_apps_table_delete: V _apps_table_show:  C B C,I   ,  _{{343, 223}, {123, 32}}]\^_``^b]cde ^ a don!р\Dodaj stavku_apps_table_new:  ^prefs_changed:  ^prefs_changed:$  ^prefs_changed: ^prefs_changed:   ^prefs_changed: ׀  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: l \next_window: o _previous_window:A _enable_fullscreen_changed:D @ _toggle_fullscreen:? ɀ ^prefs_changed:C % ^prefs_changed:c  + ^prefs_changed: s ^prefs_changed:  { !^prefs_changed:   #^prefs_changed:   %^prefs_changed: #  '^prefs_changed:a ) )^prefs_changed: / 1 +^prefs_changed: 5 Q -^prefs_changed:1 9 ү :'2?@ABkCDEFGHIJ()* +n{5$ 6$/cAMam  7 PiG?LCO co /$ J X K r L , = L j wDREF*4 /-02469:??_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller :/    +  @ B??_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 5 ҡ 6EH 9 : ; < = > ?   B_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionGF__panWithGestureRecognizer:+, E F_NSPanGestureRecognizer G H/_NSPanGestureRecognizer_NSGestureRecognizer+, J/+, L M\NSScrollView L/Z{480, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 S ү'2222B22222222()*        +n5 $Aa   G?GGCGGcG J K L , =, j,DEF, -02222:22222222-PRR-XZ-_aaaaaaaa-vx8=?[EG 31Q?_؀׀ڀ݀݀݀݀؁b؁f؀؀؁j؁?pqsqwq{qqqqq?ʀɀʁʁ%ʁʁ+ʁ?1퀊##H1 ү :'2?@ABkCDEFGHIJ()* +n{5$ 6$/cAMam  7 PiG?LCO co /$ J X K r L , = L j wDREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/-02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./H     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ҠH+,^NSIBObjectData/",1:?QZw&-;HZh$-8APU^grsu~ 2 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   ' / W Y [ ] _ a j l n |       G U \ p ~  $ 2 4 6 8 : < > F X e p { }      & + X a k t v x z | ~  +-/1357FO^emv} "$&(*,.026GIKMOXqsuwy{}  EGIJLNOQS(*/1357968:<>@BPuwy{} DFHJLNPRTVanprt3579;=?ACEKXZ\^gjln  "$&(*,.0QSUWY[]eg *,.0246ik  :<>@BDF]l   *6;PRTVXZi~+8AZhw&?`!5Q[u,@Svx{}$2<DNt   MNPRUXZ\^_bdfpyTbnw       " % ( * , / B K M P g p ~ !!!!)!*!,!.!7!9!;!9@9M9^9g9j9l9n9999999999999999:::#:):+:-:6:B:M:W:b:w:y:{:}::::::::::::::::::;";$;';(;+;.;0;2;4;M;;;;;;;<<<<$<)<+<->S>e>s>>>>>>>>>>>>>>>>>>>>>?,?4?6?8?:??@?B?D?Q?S?U?W?b?v???????????????????@@@@@@@@ @"@$@1@^@`@b@d@f@h@j@l@n@p@y@@@@@@@@@@@@@@A AA!A#A%A'A)A3AHAJALANAPARAjAAAAAAAAAAAAAAAAAAAAAB#B%B(B)B,B/B1B3B5BNBBBBBBBBBBBBBBBBC;C=C>C?CACCCECFCHCJCLCMCOCPCQCjCCCCCCCCCCCDDDDD DeDgDhDiDkDmDoDpDsDvDxDyD{D|D}DDDDDDDDDE/EHE]E_EaEdEgEiEEFF0F3F5F6F7F9F;F>F?FBFEFGFHFJFKFLFUFmFxFFFFFFFFGqGGGGGGGGGGGGGGHH H HHHHrHtHuHvHyH{H}H~HHHHHHHHHHHHHHHHHHHHI]I`IbIcIdIgIiIlImIpIsIuIvIyIzI{IIIIIIIIIIJ#J6JKJMJOJRJUJWJJJJJJJJJJJJJJJJK"K$K&K(K+K.K0K2KwKKKKKKKLLLLL L L LLLLLLLLLL8LLLLLLLLLLLLLLLLLLLLLLMMM6MCMXMZM\M_MbMdMMMMMMMMMMMMMMMMN/N1N3N5N8N;N=N?NfN|NNNNNNNNNNNOOOOO O O OOOO)OhOjOlOnOqOtOvOxOOOOOOOOP&P(P)P*P-P/P1P2P5P8P:P;P>P?P@PCP[PPPPPPPPPPPPPPPPPQ&Q(Q*Q,Q/Q2Q4Q6QyQQQQQQQQR R)R7RARNRXRnRRRRRRSSSS.SBSESGSJSMSPSSSVSWSZS]S`ScSfSkSnSpSrSSSSSSSSSSSSSSSSTTLTdTsTzTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUUU=U@UBUEUHUKUMV.VVVVVVVVVVVVVVVVVVW>WAWCWDWEWHWJWMWNWQWTWVWWWZW[W\WeWhWWWWWWWXXXXXXXXXY#YZ?ZBZCZDZGZlZoZqZtZwZzZ|[5[L[[[[[[[[[[[[\\\\\ \#\&\)\+\D\K\U\b\e\h\k\n\q\t\v\{\\\\\\\\\\\\\\\\\\\\\]V]Y][]\]]]_]a]d]e]h]k]m]n]p]q]r]{]]]]]]]]]^4^7^9^:^;^=^?^B^C^F^I^K^L^N^O^P^Y^r^^^^^^^________________________``aa0a6aOaRaUaXa[a^aaaaaaaaaaaaaaaaaaaaaab+b-b.b/b2b4b6b7b:b=b?b@bCbDbEb^bbbbbbbbbcCcFcHcIcJcMcOcRcScVcYc[c\c_c`cacjccccccccde@eBeCeDeGeIeKeLeOeReTeUeXeYeZeseeeeeeeefGffffffffffffffffgggggg g"g$ghhhhhhhhhh h"h#h&h'h(h@hhhhhhhhi igiiijikinipirisiviyi{i|iiiiiiiiiiiijnjjjjjjjjjjjjjjjjjkk:k=k?kBkEkHkJlQllllllllllllllllllmmm!m$m'm*m,mmnn)n,n/n1n4n7n:nCnPnRnUnXn[n^nancnnnnnnnnnnnnnnnnnoo-o0o2o5o8o;o=ppwpzp|p}p~ppppppppppppppppppppq{qqqqqqqqqqqqqqqqrr}@}B}E}H}[}l}n}p}s}v}}}}}}}}}}}}}}}}}}~~~~~~~8~I~K~M~P~S~l~y~{~~~~~~~~~~~~~~~~~~~~~Sgjlmnqsuvy|~܀ "'*-/13>VgjlorрӀԀՀ؀ڀ܀݀ACEHKMOVk|~ #&(),-.1K˂΂Ђӂւ!$&),;LNPSVevy{~˃̓σ҃Ճ߃  "%(5FHJMPctvx{~˄܄ބ  1469@BDFILNQTVXZ\^`cloqΉщӉ։ى܉߉0;DMPSUXZcnpruwz|ŊЊيfx΋׋PRTUVXZ\_`cegjkloЍ%Mj͍֍%.3ADGJMPSVY\^`bdfhjloqtvxz|~ĐƐȐː͐АҐՐאڐܐߐ !#%'*-/13579ADGJMPSV_"%(*-0369ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ęƙșʙ̙ΙЙҙԙؙ֙ڙܙޙ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjluvxxorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013531114757411105024333 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata3 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUVW`ghistxy}  <=@FYfgqrvlS  $%*/0 59:@QZ[pquvy|  )23;<=CRS[\]crs{|}  $%5=>?ETU]^_etu}~*+=DEFMNOWXYipqrz{|~"#+,=>EFUV^_nowx     # $ 4 5 < = > ? E M ^ _ f g w x          # $ ) * . / 4 5 : ; @ R [ \ f g h m } ~          $ % * + 0 1 6 7       1 2 3 7 B C H J M N O P Q G c d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysPN.1102O&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ȀԀր$*07āƁȁʁ́΁Ёҁԁׁفہ݁߁   "$&(*,)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*XIzbornik1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZAplikacijeP^submenuAction:$%*ZAplikacije1&')#   #!(gPodesi &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_v)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5oViae o aplikaciji X112XY287[Postavke...Q,22  2kkm2!<<;"VUslugesmu*=;>1w)__NSServicesMenu22  22BAo-Uklju i/isklju i prikaz preko cijelog zaslonaQa22  2UNSTag2F*EZSakrij X11Qh22FH]Sakrij ostalo22!JkPrika~i sve22  22NM[Zatvori X11Qq\_NSAppleMenu-!RRQ"ZAplikacijeST*ZAplikacije1׀UV)R  R!WgPodesi &-!ZZY"UUrediY[*1\)Z^]WKopirajQc   -!aa`"VProzor *b`u1cfiklors) %&aedWZatvoriQw ./ahgVSmanjiQm 8a!jWZumiraj a   HIanmoCikli ka izmjena prozoraQ` ORSaqpo Obrnuta cikli ka izmjena prozoraQ~ a   ea!t_Postavi sve naprijed^_NSWindowsMenunnp-!xxw"ePomouvyz*ePomo1z{{)nx!|lPomo za X11[_NSMainMenuTmenu U^apps_separator ǀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ƀR #@€#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews9 8: 7Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  <: ;Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification=2I#@#? ADCOA A AA#?6_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@SImehijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView0A\Polje tekstahikop#@*SB1_controlTextColor+,֤/+,]NSTableColumn/GHIJKLMNRST #@U#@DZ[\]^_`adeWNaredbaSK0.33333299Z[\]^ŀ\Polje tekstaGHIJKLMNRST #@M#@$Z[\]^_`adefPre ac [headerColor  SB1C1 1Z[\]^_NSDrawsBackground \Polje tekstahikop#@(!#_controlBackgroundColor&'SL0.602715373N0.6666666667 1,.ÀYgridColor12SM0.4246723652E0.5 1+,67[NSTableView68/YNSControlZapps_table=> ɀӀAEGHJKEVNSCellʀ ˀ̀ SUV X_{{15, 245}, {402, 18}}\Z]^_^`\a[bcdefi=kSmno_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !΀ɀ̀_Klikanje kroz neaktivne prozorerst[NSImageNameπXNSSwitch+,wx_NSButtonImageSourcew/+,z{\NSButtonCellz/+,}~XNSButton}8/]click_through \Հ^copy_menu_item ׀AGĀ؀ ـڀ Un Xa_{{60, 234}, {128, 26}}b]Z\^^_c[aSmd _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition׀@ @@ !ۀhikop WNSState߀݀ڀ!*ZOd zaslona__popUpItemAction:ZOtherViews1Ԁ܀)݀!߀X256 boja݀!߀fTisue݀!߀XMilijuni+,_NSPopUpButtonCellz/^NSMenuItemCell+,]NSPopUpButton}8/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator AGH"#Ā +U. X_{{18, 243}, {402, 18}}\Z]^_^`\a[bcdefi8Smno!΀_Autoriziraj povezivanja[enable_auth@A AGHKLĀ؀ _{{18, 182}, {409, 23}}\Z]^_^`\a[bcdefi@XSmno!΀_Prikaz preko cijelog zaslona_enable_fullscreen`a AGHklĀ؀  _{{37, 116}, {482, 18}}\Z]^_^`\a[bcdefi`xSmno!΀_HDozvoli pristup traci s izbornicima u modu prikaza preko cijelog zaslona_enable_fullscreen_menu AG_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth؀  #@v`_{{54, 79}, {362, 31}}Z{250, 750}Z[\]^e   @o^Traka s izbornicima postat se vidljiva kad stavite kursor miaa na vrh vaaeg primarnog zaslona.hiklop # \controlColor+,[NSTextField8/_enable_fullscreen_menu_text AGHŀ  U WX??A_{{18, 130}, {402, 18}}AG BC #@|1\Z]^_^`\a[bcdefiSmno!΁o%Omogui ekvivalentne tipke unutar X11_enable_keyequivs AGHĀ  _{{18, 166}, {402, 18}}\Z]^_^`\a[bcdefi Smno!΁o!Dozvoli veze od mre~nih klijenataZenable_tcp #AGH# !  _{{18, 243}, {402, 18}}AGH-.4 MN E\Z]^_^`\a[bcdefi:Smno!΁"oEmuliraj mia s tri tipke\fake_buttonsBC %)AEGHMNEĀʀ &' _{{15, 184}, {402, 18}}\Z]^_^`\a[bcdefiBZSmno!΁%(oFokus slijedi miaa_focus_follows_mousebc +/AEGHmnEĀʀ ,- _{{15, 140}, {402, 18}}\Z]^_^`\a[bcdefibzSmno!΁+._Fokus na nove prozore_focus_on_new_window 16AGH 24 3_{{18, 69}, {402, 18}}AG PR Q\Z]^_^`\a[bcdefiSmno!΁15o Tipke Option aalju Alt_L i Alt_R_option_sends_alt 8S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_ {{266, 364.0390625}, {570, 341}}\X11 postavkeWNSPanelZ{320, 240}UX >1ˁ?)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels[Z Y== @ 1)14 #EG 31Q)_{{36, 93}, {453, 31}}Z[\]^e  DooKad je omogueno, ekvivalentne tipke trake izbornika mogu ometati X11 aplikacije koje koriste meta modifikator.AG"#  FH G_{{36, 195}, {453, 42}}AG45; JK #@}0Z[\]^e4BE  IopDr~ite pritisnutu tipku Option ili Command tijekom klikanja kako biste aktivirali srednju ili desnu tipku miaa. _{{36, 159}, {471, 14}}Z[\]^e KG  L_RDozvoljava promjene izbornika unosa kojima se presnimava trenutna X11 mapa tipaka._{{18, 179}, {402, 18}}\Z]^_^`\a[bcdefi#TSmno!΁ O_%Slijedi sistemski raspored tipkovnice_{{36, 32}, {453, 31}}AGHabˀ TU ?Z[\]^en3  So[Kad je omogueno, tipke Option aalju Alt_L i Alt_R simbole X11 tipke umjesto mod_preklopke._{{18, 8}, {418, 18}}\Z]^_^`\a[bcdefiwSmno!΁QV_&Uvijek listaj u smjeru pomicanja prsta_{{10, 33}, {524, 279}}+,}/_{{13, 10}, {544, 325}}1[_p)VNSViewYNSTabView\NSIdentifier ^]?\Q1TUlaz+,]NSTabViewItem/ ^؁o?`Q21@`ׁbfj)AG؀ cd #@B_{{17, 238}, {41, 20}}Z[\]^eb eUBoje:AGҁ؀ gh #@x@_{{36, 216}, {392, 14}}Z[\]^ef  io8Ova opcija stupit e na snagu kad ponovno pokrenete X11.AG؀ kl #@|_${{36, 141.671875}, {464, 33.328125}}Z[\]^ej  moOmoguava X11 korijenski prozor. Koristite kombinaciju tipaka Command-Option-A za uklju enje i isklju enje prikaza preko cijelog zaslona._{{10, 33}, {524, 279}}UIzlaz ^q?`U Xr1     sw{)AGHĀq tu q_{{18, 255}, {409, 23}}\Z]^_^`\a[bcdefi (Smno!΁svoOmogui sinkronizacijuAG56<q xy q#@}_{{36, 221}, {469, 28}}Z[\]^e Cw  zoOmoguava stavku izbornika "kopiraj" i dozvoljava sinkronizaciju izmeu OSX memorijskog pretinca i X11 MEMORIJSKOG PRETINCA i PRIMARNIH meumemorija.AGHNOĀq |} q_{{34, 129}, {457, 18}}\Z]^_^`\a[bcdefi [Smno!΁{~oAA~uriraj MEMORIJSKI PRETINAC kad se memorijski pretinac promijeniAGHghĀq  q_{{34, 104}, {470, 18}}\Z]^_^`\a[bcdefi tSmno!΁oFA~uriraj PRIMARNO (srednji klik) kad se memorijski pretinac promijeni AGHĀq  q_{{34, 79}, {430, 18}}\Z]^_^`\a[bcdefiSmno!΁o=A~uriraj memorijski pretinac odmah nakon odabira novog tekstaAGHĀq  q_{{34, 192}, {457, 18}}\Z]^_^`\a[bcdefiSmno!΁oAA~uriraj memorijski pretinac kad se MEMORIJSKI PRETINAC promijeniAGq  q#@|_{{48, 158}, {462, 28}}Z[\]^e  oOnemoguite ovu opciju ako ~elite koristiti xclipboard, klipper ili bilo koji drugi alat za upravljanje X11 memorijskim pretincem.AGԁq  q#@|P_{{48, 47}, {457, 28}}Z[\]^e  oYZbog ograni enja X11 protokola, ova opcija mo~da nee uvijek raditi u nekim aplikacijama._{{10, 33}, {524, 279}}_Memorijski pretinacE ^ʁ?`1=BbɁ%+)AEGE ʀ  #@}_{{23, 208}, {482, 31}}Z[\]^e   ohKad je omogueno, klikanjem na neaktivni prozor e taj klik miaem proi do tog prozora te ga aktivirati.AEG  E ʀ  #@}_{{23, 164}, {477, 14}}Z[\]^e !  oGFokus X11 prozora slijedi kursor. To mo~e imate neke negativne u inke.AEG - .E ʀ  _{{23, 106}, {477, 28}}Z[\]^e :  oKad je omogueno, izradom novog X11 prozora, aplikacija X11.app premjestit e se u prvi plan (umjesto Finder.app, Terminal.app, itd.)_{{10, 33}, {524, 279}}WProzori B^? 1 F I J K)AG V W ]  #@}@_{{36, 195}, {472, 42}}Z[\]^e I d  oPokrenete li X11, izradit e se Xauthority tipke za kontrolu pristupa. Promijeni li se IP adresa sustava, ove tipke postat e neva~ee i to mo~e sprije iti pokretanje X11 aplikacija.AG p q  _{{36, 118}, {464, 42}}Z[\]^e J }  oOmoguite li ovu opciju, takoer trebate omoguiti autorizaciju povezivanja kako bi se osigurala zaatita sustava. Kad je onemogueno, povezivanja iz udaljenih aplikacija nisu dozvoljena.AG     #@y_{{17, 17}, {404, 14}}Z[\]^e K   o:Ove promjene stupit e na snagu kad ponovno pokrenete X11._{{10, 33}, {524, 279}}YSigurnost+, YNSTabView /Z{570, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel Q_scroll_in_device_direction _sync_clipboard_to_pasteboard#  À[sync_keymap sŀ_sync_pasteboard {ǀ_sync_pasteboard_to_clipboard ɀ_sync_pasteboard_to_primary ˀ_sync_primary_immediately ̀Zsync_text1 πZsync_text2D @р_toggle_fullscreen_item? 4Ӏ^x11_about_item s Ձ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  f ؁_minimize_window:? 4ځ_orderFrontStandardAboutPanel:@  6 ܁[prefs_show:F  DށUhide:J  LZterminate:G ! G_hideOtherApplications:H ' I_unhideAllApplications: , \Ucopy: 2 c ]close_window: 8 i \zoom_window: < >  A A B*GH  J K*_NSHuggingPriority   U V ZX 5J_{{343, 191}, {123, 32}}\Z]^_^\a[bcde ] ` < b cnm@ !рZDupliciraj_apps_table_duplicate: i k  A A B*GH  u v*  _{{343, 159}, {123, 32}}\Z]^_^\a[bcde ] ` i cnm!рVUkloni_apps_table_delete: V _apps_table_show:  A A B*GH   *  _{{343, 223}, {123, 32}}\Z]^_^\a[bcd ] ` cnm!р\Dodaj stavku_apps_table_new:  ^prefs_changed:  ^prefs_changed:#  ^prefs_changed: ^prefs_changed:   ^prefs_changed: ׀  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: l \next_window: o _previous_window:@ _enable_fullscreen_changed:D @ _toggle_fullscreen:= ɀ ^prefs_changed:B % ^prefs_changed:b  + ^prefs_changed: s ^prefs_changed:  { !^prefs_changed:   #^prefs_changed:   %^prefs_changed: "  '^prefs_changed:` ( )^prefs_changed: . 1 +^prefs_changed: 4 Q -^prefs_changed:1 8 ѯ 9'2?@ABkCDEFGHIJ()* +n{4# 5#.b@L`l  6 O hE=KBN bn .# I W J q K * < K i vBPCD(2 /-02469:??_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 8/  G  *  @ B??_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 4 ѡ 5EH 8 9 : ; < = >   A_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionGF__panWithGestureRecognizer:+, D E_NSPanGestureRecognizer F G/_NSPanGestureRecognizer_NSGestureRecognizer+, I/+, K L\NSScrollView K/Z{480, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 R ѯ'2222B22222222()*        +n4 #@`    E=EEBEEbE I J K * <* i*BCD* -02222:22222222-PRR-XZ-_aaaaaaaa-vx8=?[EG 31Q?_؀׀ڀ݀݀݀݀؁b؁f؀؀؁j؁?pqsqwq{qqqqq?ʀɀʁʁ%ʁʁ+ʁ?1퀊##H1 ѯ 9'2?@ABkCDEFGHIJ()* +n{4# 5#.b@L`l  6 O hE=KBN bn .# I W J q K * < K i vBPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/-02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./H     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ѠH+,^NSIBObjectData/",1:?QZw&-;HZh$-8APU^grsu~ 2 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   ' / W Y [ ] _ a j l n |       G U \ p ~  $ 2 4 6 8 : < > F X e p { }      & + X a k t v x z | ~  +-/1357FO^emv} "$&(*,.026GIKMOXqsuwy{}  EGIJLNOQS(*/1357968:<>@BPuwy{} DFHJLNPRTVanprt3579;=?ACEKXZ\^gjln  "$&(*,.0QSUWY[]eg *,.0246ik  :<>@BDF]l   *6;PRTVXZi~'4=Vds";\~1MWq(<_adfhjkmnpqz|~ #+5[fhklnpsuxz}4579<?ACEFIKMW`t};IU^s       ) 2 4 7 N W e n w ~ !!!!!!! !"!#!,!5!7!X!d!n!y!!!!!!!!!!!!!!!!!!!!"""8":"<"I"Q"X"Z"\"^"e"g"i"k"m""""""""###(#1#8#=#J#R#_#k#m#v#~##############$$$$$$0$5$;$C$E$G$I$K556666606;6M6Z6a66666666666666666666677777!7*737A7F7o7p7r7t7v7w77777777777777888888 88@8A8C8E8G8H8Q8Z8\8}8888888888888888899999 9!9#9%9'949E9N9Q9S9U9j9l9n9p9r9999999999999: :::::):4:>:I:^:`:b:d:f:h:::::::::::::::::; ; ;;;;;;;;6;u;;;;;;;<<< <<<<<<<<>N>\>q>>>>>>>>>>>>>>>>>>>>????!?#?%?'?)?+?-?:??@?K?_?j?s?|?~??????????????????@@@@@ @ @ @@G@I@K@M@O@Q@S@U@W@Y@b@k@@@@@@@@@@@@@@AA A AAAAA1A3A5A7A9A;ASAhAjAlAnApArAAAAAAAAAAAAAAAB BBBBBBBBB7BvBxBzB|B~BBBBBBBBBBBC$C&C'C(C*C,C.C/C1C3C5C6C8C9C:CSCCCCCCCCCCCCCCCCDNDPDQDRDTDVDXDYD\D_DaDbDdDeDfDDDDDDDDDEE1EFEHEJEMEPEREEEFFFFF F"F$F'F(F+F.F0F1F3F4F5F>FVFaFFFFFFFFGZGkGnGpGrGGGGGGGGGGGGGGGGH[H]H^H_HbHdHfHgHjHmHoHpHsHtHuHxHHHHHHHHHHHHIFIIIKILIMIPIRIUIVIYI\I^I_IbIcIdImIpIIIIIIIIJ JJ4J6J8J;J>J@JJJJJJJJJJJJJJJJK K KKKKKKK`KkKKKKKKKKKKKKKKKKKLLLLLL!LLLLLLLLLLLLLLLLLLLLLLLLMM,MAMCMEMHMKMMMMMMMMMMMMMMMMMMNNNNN!N$N&N(NONeNzN|N~NNNNNNNNNNNNNNNNNNOOQOSOUOWOZO]O_OaOyOOOOOOOPPPPPPPPPP!P#P$P'P(P)P,PDPPPPPPPPPPPPPPPPPQQQQQQQQQbQuQQQQQQQQRR R*R7RARWRnRRRRRRRSSS+S.S0S3S6S9S\K\N\Q\T\W\Z\]\_\d\m\{\\\\\\\\\\\\\\\\\\\]?]B]D]E]F]H]J]M]N]Q]T]V]W]Y]Z][]d]|]]]]]]]]^^ ^"^#^$^&^(^+^,^/^2^4^5^7^8^9^B^[^^^^^^^__j_m_o_p_q_s_u_x_y_|_______________aaaa8a;a>aAaDaGaJasauaxaya|aaaaaaaaaaaaaaabbbbbbbb b#b&b(b)b,b-b.bGbbbbbbbbbc,c/c1c2c3c6c8c;ceAeBeCe\eeeeeeeef0ffffffffffffffffffgggg g g gggggghhhhh h h hhhh)hhhjhlhnhqhthvhxhiPiRiSiTiWiYi[i\i_ibidieihiiijiiiiiiiiijWjjjjjjjjjjjjjjjjjjk#k&k(k+k.k1k3l:llllllllllllllllllmmm m mmmmmmnnnnnn n#n,n9n;n>nAnDnGnJnLnnnnnnnnnnnnnnnnnnooooo!o$o&op`pcpepfpgpipkpnpoprpupwpxpzp{p|pppppppppqdqqqqqqqqqqqqqqqqrr%r(r*r-r0r3r5sBs[scsxs{s}sssssssssssttttttttt t#t&t(t)t+t,t-t6tOtttwtyt|tttuvZv]v_v`vavcvevhvivlvovqvrvtvuvvvvvvvvvvx;xxxxxxxxxxxxxxxxxxyyy y yyyyyyyyyyyyzz&z-z6zIzNzZzozqzszvzyz{zzzzzzzzzzzzzz{{{{{!{${&{8{M{O{Q{T{W{Y{x{{{{{{{{{{{{{{|| | |||||3|5|7|:|=|?|J|_|a|c|e|h|j|||||||||||||||}}}}'})}+}.}1}D}U}W}Y}\}_}}}}}}}}}}}}}}}}}}}}~~~~~!~2~4~6~9~<~U~b~d~g~j~p~~~~~~~~~~~~~~~~~<PSUVWZ\^_beghklmp '?PSUX[Àŀƀɀ̀΀πҀӀԀ׀*,.1468?Tegilo 4mvxz}΂߂ $579ADGJMPSVY\^`bdfhjloruxz|~ÈƈȈʈ̈ψ҈Ո؈ۈވ !#%')+-/257:=?ACEGILUXZh‰ʼnȉˉ̉ω҉Չ؉ۉމ$-69<>ACLWY[^`cenqsuŠˊΊЊҊOasuwxy{}ˋ֌9;=>?ACEHILNPSTUXq6Sr؍ߍ%2;F_js|ÏŏǏɏˏ͏ϏяӏՏ׏ُۏݏߏ !$'*-0369@CFILORUX[^adgjmpsvy|“œȓ˓Γѓԓדړݓ "%(+.147:=@CFIKMOQSUWY[^acfikmoqsuwy{}Ĕǔʔ͔ДӔ֔ٔܔߔ !$'*-0369ADGJMPSVY\_behknqtwz}ÙřǙə˙͙ϙљәՙיٙۙݙߙ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÚŚǚɚ˚͚ϚњӚ՚ךٚۚݚߚ !#%')+-/13579;=?ACEGIKMOQSU^_ajknwxorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/Localizable.strings0000644000175000017500000001061014757411105022602 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Sigurno ~elite zatvoriti X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Sve otvorene X11 aplikacije odmah e se zaustaviti i izgubit ete sve nepohranjene promjene."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Prijelaz u RandR mod?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Aplikacija je zatra~ila od X11 da promijeni razlu ivost vaaeg zaslona. X11 e obnoviti prethodno stanje zaslona kad aplikacija koja je podnijela zahtjev zatra~i povratak na prethodno stanje. U suprotnom, mo~ete upotrijebiti kombinaciju tipaka #%#A kako bi X11 prisilno vratio zaslon na prethodno stanje."; /* No comment provided by engineer. */ "Allow" = "Dozvoli"; /* No comment provided by engineer. */ "Always Allow" = "Uvijek dozvoli"; /* No comment provided by engineer. */ "Cancel" = "Odustani"; /* No comment provided by engineer. */ "Mac Help" = "Mac pomo"; /* No comment provided by engineer. */ "Quit" = "Zatvori"; /* No */ "No" = "Ne"; /* Yes */ "Yes" = "Da"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Posjedujete datoteku ~/.xinitrc.\n\nProzori koje prikazuju X11 aplikacije mo~da nee sadr~avati trake naslova ili e mo~da izgledati druga ije od prozora koje prikazuju izvorne aplikacije.\n\n}elite li zanemariti postojeu datoteku i koristiti standardno X11 okru~enje sljedei put kad pokrenete X11?"; /* window item modifiers */ "window item modifiers" = "naredba"; /* Updates menu title & */ "Check for X11 Updates..." = "Potra~i X11 a~uriranja &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/hr.lproj/locversion.plist0000644000175000017500000000061014757411105022205 LprojCompatibleVersion 106.5 LprojLocale hr LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/0000755000175000017500000000000014757411135017036 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/main.nib/0000755000175000017500000000000014757411135020531 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/main.nib/designable.nib0000644000175000017500000020620114757411105023236 Kattintás közben tartsa lenyomva az Alt vagy a Command billentyűt a középső vagy a jobb oldali egérgomb aktiválásához. Engedélyezi az X11 gyökérablakát. A teljes képernyős módba lépéshez, illetve az abból való kilépéshez nyomja le a Command-Alt-A billentyűket. Engedélyezi a "másolás" menüelemet, és lehetővé teszi az OSX illesztőlap, illetve az X11 VÁGÓLAP és az ELSŐDLEGES pufferek közötti szinkronizálást. Ha engedélyezve van, egy új X11 ablak létrehozása az X11.app ablak előtérbe helyezését eredményezi (a Finder.app, Terminal.app stb. helyett) Az X11 elindítása Xauthority hozzáférés-vezérlő billentyűket hoz létre. Ha a rendszer IP-címe módosul, ezek a billentyűk érvénytelenné válnak, és így az X11 alkalmazások sem indulnak el. Ha engedélyezve van, a Kapcsolatok hitelesítése funkciót szintén engedélyezni kell a rendszerbiztonság érdekében. Ha le van tiltva, a távoli alkalmazásokról származó kapcsolatok nincsenek engedélyezve. xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/main.nib/keyedobjects.nib0000644000175000017500000013730214757411105023621 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{#*+,345<=FMNOWXYbijkuvz{ @ADJ]jkuvzpW #().34 9=>DT]^stxy| ,56>?@FUV^_`fuv~'(:BCDJYZbcdjyz /67IJQRS[\]mtuv~ &'/0@AHIXYabqrz{     % & 6 7 > ? @ A G O ` a h i y z          % & + , 0 1 6 7 < = B T ] ^ h i j o           ! & ' , - 2 3 8 9       " 3 4 5 9 D E J L O P Q R S  e g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "lAlkalmazsokP^submenuAction:$%*lAlkalmazsok1&')#   #!(mTestreszabs &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5oAz X11 nvjegye2XY287nBelltsok...Q,22  2kkm2!<<;"nSzolgltatsokstu*>=?nSzolgltatsok1x)__NSServicesMenu22  22CBoVlts teljes kpernyQreQa22  2UNSTag2G*FmX11 elrejtseQh22GIoTbbi elrejtse22!Kosszes megjelentse22  22ONoKilps innen: X11Qq\_NSAppleMenu-!SSR"lAlkalmazsokTU*lAlkalmazsok1؀VW)S  S!XoTestreszabs...-![[Z"kSzerkeszts\]*kSzerkeszts1^)[`_gMsolsQc  -!ccb"UAblak*dbw1 !ehkmnqtu) '(cgfgBezrsQw 01cjimMinimalizlsQm :c!liMretezs c   JKcpooLpkeds az ablakokonQ` QTUcsro Visszafel lpkeds az ablakokonQ~ c   gc!vosszest az elQtrbe^_NSWindowsMenuppr-!zzy"dSgwx{|*dSg1|}})pz!~hX11 sg[_NSMainMenuTmenu V^apps_separator ɀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ȀR@#@Ā#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder !"#$%&'()*,.0124678.<=?]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,BC]_NSCornerViewB/1EFGH)KLMNOPQRTUVWXZ[\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`^_`abcdefghi[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@cNvlmnopqrstVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontwxy_NSFontDescriptorAttributes{1|WNS.keys}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/WWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorW\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell^_`ab]NSControlView0AkSzvegcellalmost#@*WB1_controlTextColor+,ڤ/+,]NSTableColumn/KLMNOPQRVWX #@S#@D^_`abcdehiWParancsWM0.3333329856^_`abɀjSzvegmezQKLMNOPQRVWX #@V#@$^_`abcdehioBillentyqparancs  [headerColorWB1C1 1^_`ab_NSDrawsBackground jSzvegmezQlmo st#@(%'€_controlBackgroundColor*+WL0.602715373N0.6666666667 102ŀYgridColor56WM0.4246723652E0.5 1+,:;[NSTableView:</YNSControlZapps_tableAB ˀՀEIKMNIVNSCell̀ ̀΀ VXY Z_{{15, 245}, {402, 18}}_^`abbc`d_efghilAnWpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ЀˀπoInaktv ablakok tkattintsauvw[NSImageNameрXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton</]click_through ^׀^copy_menu_item ـEǀڀ ۀ܀ Xp Zc_{{74, 235}, {128, 26}}e`^_babf_dWpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀lmost WNSState߀܀!*lA kijelzQrQl__popUpItemAction:ZOtherViews1׀ހ)߀!h256 szn߀!iTbb ezer߀!kTbb milli+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton</Udepth #^dock_apps_menu Ydock_menu _dock_window_separator E!K%&!ǀ .X1 Z_{{33, 243}, {402, 18}}_^`abbc`d_efghil;Wpqr!ЀoKapcsolatok hitelestse[enable_authCD EKNOǀڀ _{{18, 182}, {409, 23}}_^`abbc`d_efghilC[Wpqr!ЀoTeljes kpernyQs md_enable_fullscreencd EKnoǀڀ  _{{37, 116}, {409, 23}}_^`abbc`d_efghilc{Wpqr!Ёo8Mensor elrsnek engedlyezse teljes kpernyQs mdban_enable_fullscreen_menu E_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}^_`abh   @oTA mensor az egrmutatnak az elsQdleges kijelzQ tetejre helyezsekor lesz lthat.lmopst '\controlColor+,[NSTextField</_enable_fullscreen_menu_text EKȀ  X  YZAAC_{{18, 130}, {402, 18}}E  DE #@z`3_^`abbc`d_efghilWpqr!Ёo0Billentyqmegfelelsek engedlyezse az X11 alatt_enable_keyequivs E!K!ǀ  _{{33, 166}, {402, 18}}_^`abbc`d_efghil Wpqr!Ёo0Kapcsolds engedlyezse a hlzati kliensekrQlZenable_tcp  %EK & !# "_{{18, 252}, {402, 18}}E1289  GI #@zH_^`abbc`d_efghil?Wpqr!Ё $oHromgombos egr emullsa\fake_buttonsGH '+EIKRSIǀ̀ () _{{15, 184}, {402, 18}}_^`abbc`d_efghilG_Wpqr!Ё'*oA fkusz kveti az egeret_focus_follows_mousegh -1EIKrsIǀ̀ ./ _{{15, 140}, {402, 18}}_^`abbc`d_efghilgWpqr!Ё-0oFkusz az j ablakokon_focus_on_new_window 38EK 46 5_{{18, 69}, {443, 18}}E  RT S_^`abbc`d_efghilWpqr!Ё37oBAz Option billentyqk bal s jobb oldali Alt billentyqknt mqkdnek_option_sends_alt :W\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_'{{266, 364.03906000000001}, {524, 341}}oX11-belltsokWNSPanelZ{320, 240}XZ @1΁A)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1)1 &9 "KH53S)_{{36, 93}, {426, 31}}^_`abh  ForHa engedlyezve van, a mensor billentyqzetmegfelelsei tkzhetnek a Meta mdostt hasznl X11 alkalmazsokkal._{{36, 212}, {428, 34}}EK'( OP K^_`abh&4"  JowKattints kzben tartsa lenyomva az Alt vagy a Command billentyqt a kzpsQ vagy a jobb oldali egrgomb aktivlshoz. E@AG  LM #@zT]_%{{36, 154}, {425.30858999999998, 28}}^_`abhOK  No\Engedlyezi a beviteli men mdostsait az aktulis X11-billentyqzetkioszts fellrshoz._{{18, 188}, {402, 18}}_^`abbc`d_efghil9XWpqr!ЁHQo&Rendszerbillentyqzet-kioszts kvetse_{{36, 32}, {426, 31}}EKef΀ VW A^_`abhr5  UomHa engedlyezve van, az Option billentyqk bal s jobb oldali Alt billentyqknt mqkdnek Md kapcsol helyett._{{18, 8}, {418, 18}}_^`abbc`d_efghil{Wpqr!ЁSXo&Mindig az ujjmozgs irnyba grgessen_{{10, 33}, {478, 279}}+,/_{{13, 10}, {498, 325}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1WBemenet+,]NSTabViewItem/ `ځqAbQ21Ccفdhl)E ڀ ef #@I_{{17, 238}, {55, 20}}^_`abhd ggSznek:Eց ڀ ij #@x@_{{36, 216}, {392, 14}}^_`abhh  ko8Ez a bellts az X11 jbli elindtsakor lp rvnybe.E ڀ mn #@yp_{{36, 145}, {411, 31}}^_`abhl  ooEngedlyezi az X11 gykrablakt. A teljes kpernyQs mdba lpshez, illetve az abbl val kilpshez nyomja le a Command-Alt-A billentyqket._{{10, 33}, {478, 279}}WKimenet `sAbX Zt1 uy})EK ǀs vw s_{{18, 255}, {409, 23}}_^`abbc`d_efghil,Wpqr!ЁuxoSzinkronizls engedlyezseE9:8 s z{ s_{{36, 221}, {428, 28}}^_`abhFy  |oEngedlyezi a "msols" menelemet, s lehetQv teszi az OSX illesztQlap, illetve az X11 VGLAP s az ELSPDLEGES pufferek kztti szinkronizlst.EKQRǀs ~ s_{{34, 129}, {409, 23}}_^`abbc`d_efghil^Wpqr!Ё}o/VGLAP frisstse az illesztQlap mdosulsakorEKjkǀs  s_{{34, 93}, {409, 34}}_^`abbc`d_efghilwWpqr!ЁoQAz ELSPDLEGES puffer frisstse (kzpsQ kattints) az illesztQlap mdosulsakorEKǀs  s_{{34, 68}, {409, 23}}_^`abbc`d_efghilWpqr!Ёo:j szveg kijellsekor azonnal frisstse az illesztQlapotEKǀs  s_{{34, 192}, {409, 23}}_^`abbc`d_efghilWpqr!Ёo.IllesztQlap frisstse a VGLAP mdosulsakorE s  s#@y_{{48, 158}, {416, 28}}^_`abh  omTiltsa le ezt a pontot, ha az xclipboardot, a klippert vagy ms vglapkezelQt szeretne hasznlni az X11-ben.E s  s_{{48, 36}, {416, 28}}^_`abh  oZAz X11 protokoll korltozsai miatt ez a lehetQsg nem minden alkalmazs esetben mqkdik._{{10, 33}, {478, 279}}kIllesztQlapI `́Ab1AGgˁ'-)EII  ̀  #@z_{{23, 208}, {433, 31}}^_`abh   oHa engedlyezve van, egy inaktv ablakra kattints az aktivls mellett az adott ablakon val keresztlhaladst is eredmnyezi.EI  I  ̀  #@zp_{{23, 161}, {427, 17}}^_`abh #  oLAz X11 ablakfkusz a kurzort kveti. Ennek negatv kvetkezmnyei is vannak.EI / 0I  ̀  _{{23, 92}, {427, 42}}^_`abh <  oHa engedlyezve van, egy j X11 ablak ltrehozsa az X11.app ablak elQtrbe helyezst eredmnyezi (a Finder.app, Terminal.app stb. helyett)_{{10, 33}, {478, 279}}WWindows! D`A 1 H K L M)E! X Y! _   #@x_{{51, 195}, {398, 42}}^_`abh K f  oAz X11 elindtsa Xauthority hozzfrs-vezrlQ billentyqket hoz ltre. Ha a rendszer IP-cme mdosul, ezek a billentyqk rvnytelenn vlnak, s gy az X11 alkalmazsok sem indulnak el.E! r s! _   _{{51, 118}, {398, 42}}^_`abh L   oHa engedlyezve van, a Kapcsolatok hitelestse funkcit szintn engedlyezni kell a rendszerbiztonsg rdekben. Ha le van tiltva, a tvoli alkalmazsokrl szrmaz kapcsolatok nincsenek engedlyezve.E!  !    #@y_{{17, 17}, {404, 14}}^_`abh M   oBEzek a belltsok az X11 kvetkezQ elindtsakor lpnek rvnybe._{{10, 33}, {478, 279}}iBiztonsg+, YNSTabView /Z{524, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard9 Hŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item! u ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ځ_minimize_window:? 4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F  EUhide:J  MZterminate:G # H_hideOtherApplications:H ) J_unhideAllApplications: . ^Ucopy: 4 e ]close_window: : k \zoom_window: > @  E C D.K  L M._NSHuggingPriority    X X \Z 7L_{{340, 191}, {149, 32}}_^`abb`d_efgh _ b > d eqp@ !ӀgMsolat_apps_table_duplicate: k m  E C D.K  w x.   _{{340, 159}, {149, 32}}_^`abb`d_efgh _ b k eqp!ӀkEltvolts_apps_table_delete: W _apps_table_show:  E C D.K   .   _{{340, 223}, {149, 32}}_^`abb`d_efg _ b eqp!ӀoElem hozzadsa_apps_table_new:  ^prefs_changed:  ^prefs_changed:9 H ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:} } Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:C _enable_fullscreen_changed:D A _toggle_fullscreen:A ˀ ^prefs_changed:G ' ^prefs_changed:g  - ^prefs_changed: u !^prefs_changed:  } #^prefs_changed:   %^prefs_changed:   '^prefs_changed: $  )^prefs_changed:c *  +^prefs_changed: 0 3 -^prefs_changed: 6 S /^prefs_changed:1 : ӯ ;'2?@ABkCDEFGHIJ()*  !+p} &2A9(fCOco :RkIANGS gs 0!& K Y L s M . > M k xFTGH,6 1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz} :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication .    45NO M6=! _{{302, 440}, {504, 271}}oX11 alkalmazsmenZ{320, 240}1 > k )1 ,6?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} #     _NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, !ZNSScroller </    ,  B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 6 ӡ 7GJ : ; < = > ? @   C_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, F G_NSPanGestureRecognizer H I/_NSPanGestureRecognizer_NSGestureRecognizer+, K/+, M N\NSScrollView M/Z{504, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 T ӯ'2222B22222222()*        +p&9CcIAIIGIIgI!!! K! L! M . >. k.FGH. -02222:22222222-QSS-Y[-acccccccc-xz:?A] "KH53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ӯ ;'2?@ABkCDEFGHIJ()*  !+p} &2A9(fCOco :RkIANGS gs 0!& K Y L s M . > M k xFTGH,6 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz} :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ӯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ӠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s        ! # L Z a u  ) 7 9 ; = ? A C K ] j u   + 0 ] f p y { }  !"$&')+LNPRTVXs|  MOQSUWY[]_ctvxz|#%')+-/LNwy{|~ !#5^`bceghjl /579;=?AC^` 3578:<=?Abdfhjln   (168:<egijlnoqs$&(*AJMOQrtvxz|~   :<>@BDFUWxz|~  9;=?ACErt "CEGIKMOx "$&(9EJ_acegix:GPiw)5No0D`j!;Ob *3AKS]!#\]_adgikmnqsu   c q } !!! ! !!!!!"!$!-!.!1!4!7!9!;!>!Q!Z!\!_!v!!!!!!!!!!!!!"""%"-"8"9";"="F"H"J"K"T"]"_"""""""""""""""""### #"#$#&#(#=#F#c#e#g#t#|############$$ $$$($;$@$S$\$c$h$u$}$$$$$$$$$$$$$$$$% %%,%A%D%H%J%L%]%b%h%p%r%t%v%x77!7.737@7I7]7h7z7777777777777788 8 8 8888486888:8<8O8X8a8j8x8}888888888888888899997999;9=9?9A9C9X9999999999999999:::::::):,:0:2:4:]:q:s:u:w:x:z:|:~:::::::::::::; ;;;;4;6;8;:;<;F;[;i;o;q;s;|;;;;;;;;;;<"<)<+<,<-> >>">+>4>?>M>b>d>f>h>j>l>{>>>>>>>>>>>>>?????? ? ? ?4?6?9?:?=?@?B?D?F?_????@@@!@#@%@*@3@5@6@7@8@:@<@>@@@B@S@V@X@Z@@@@@@@@@@@@@@@@@@AAAAAA A7A9A;A=A?AAACAEAGAIAZAAAAAAAAAAAAAAAAAAAAABB BB,B;BDBRB_BeBzB|B~BBBBBBBBBBBBBBBBBBCC C CCCCmCoCpCqCsCuCwCxCzC|C~CCCCCCCCCCCCCCDDDDDD D"D$DWDcDxDzD|D~DDDDDDDDDDDDDDDDDE EKEMEOEQESEUEWEYEEEEEEEEFFFFFFFFF"F%F'F(F*F+F,FEFFFFFFFFGG G5G7G9GK?KHKKKKKKKKKKKLL%L'L)L,L/L1LLLLLLLLLLLLLLLLLLMMMMM M MoMzMMMMMMMMMMNNNNN N NNNNNNN0NNNNNNNNNNNNNNNNNNOOOO O OOOOKOXOmOoOqOtOwOyOOOOOOOOOOOOOOOPPDPFPHPJPMPPPRPTPPPPPPPPQQQQQ!Q#Q%Q&Q)Q,Q.Q/Q1Q2Q3QLQQQQQQQQQQQQQQQRR`RbRcRdRgRiRkRlRoRrRtRuRxRyRzR}RSSSSSS S SSSSSSSSSS!S`SbSdSfSiSlSnSpST TT!T#T&T)T+TzTTTTTTTUU U-UJUcUuUUUUUUUUUUUUUUUUUUUUUUVV;VCVNVwVyV|V}VVVVVVVVVVVW WW,W/W2W3W6W9W;W>WAWDWFWGWJWLWNWOWXW[W^W`WiW|WWWWWWWWWWWWWWWWWWXXYEYGYHYIYLYNYPYQYTYWYYYZY]Y^Y_YbYYYYYYYZZZZZZZZ[[[[ [ [ [[[[[[E[j[m[o[r[u[x[z\5\N\\\\\\\\\]]c]e]f]g]j]l]n]o]r]u]w]x]{]|]}]]]]]]]]^^^^^^^^^^_G_`_i_p____________________`` ```6`9`<`>`A`D`G`I`R`a`c`f`i`k`n`q`t`v````````````````aaa?aBaDaFaIaLaNa]aaaaaaaaaaaaaaaaabb'b*b,b/b2b5b7bccccccccc c#c&c(c)c+c,c-c6cOctcwcyc|cccddddddddddeeeeee"e$e&e(e1eBeEeHeKeNeQeTeWeZe\eeeeeeeeeeeeeeeef)f+f-f/f2f5f7f9ftffffffffffffffffgg7g:gnAnBnCnLnennnnnnnowoooooooooooooooopp9p

pApDpGpIqqq0qIqLqOqQqTqWqZqcqpqrquqxq{q~qqqqqqqqqqqqqrrrrrrr(rMrPrRrUrXr[r]s^ssssssssssssssssstt(t+t-t0t3t6t8tu:u=u?u@uAuCuEuHuIuLuOuQuRuTuUuVunuuuuuuuvvvvvvvvww wwwww!w$w&wwwwwwwwwwwwwwwwwwwwwwwwxywyyyyyyyyyyyyyyyyzz8z;z=z@zCzFzH{|D|G|I|J|K|M|O|R|S|V|Y|[|\|^|_|`|i||||||||}=}V}i}r}|}}}}}}}}~~ ~~*~,~.~1~4~6~S~h~j~l~o~r~t~~~~~~~~~~~~~~~  3HJLORTq #%>SUWY\^m~€р:KMORUartvy|Á܁"%+<>@CFTegilo|  "#&'(+TVYZ]_acfƒăƃ˃΃уӃՃ׃y{|}#468;>Qbegjm̅΅υЅӅՅׅ؅ۅޅIKMPRUW`ceg~ŽĎڏASegijkmoqtuxz|Ȑ+-/01357:;>@BEFGJc|ܑ(Edʑё $-8Q\enÓœǓɓ˓͓ϓѓӓՓדٓۓݓߓ "%(+.1479;=?ACEGJLOQSUXZ]_behknqtwz}ÔŔǔʔ̔ϔєԔ֔ٔ۔ޔ ! !#%')+-/1369ADGJMPSVY\_behknqtwz}›śț˛Λћԛכڛݛ "%(+.147:=@CFILORUX[^adgjmpsvy|Ĝǜʜ͜МӜٜ֜ܜߜ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~žĞƞȞʞ̞ΞОҞԞ֞؞ڞܞޞ  "$&(*,.02468:<>@BDFHJSTV_`cl{xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013725114757411105024343 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{#*+,345<=FMNOWXYbijkuvz{>?BH[histxnU  !&',12 7;<BS\]rswx{~+45=>?ETU]^_etu}~&'9ABCIXYabcixy.56HIPQRZ[\lstu}~ %&./?@GHWX`apqyz     $ % 5 6 = > ? @ F N _ ` g h x y          $ % * + / 0 5 6 ; < A S \ ] g h i n ~            % & + , 1 2 7 8       ! 2 3 4 8 C D I K N O P Q R I d f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "lAlkalmazsokP^submenuAction:$%*lAlkalmazsok1&')#   #!(mTestreszabs &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5oAz X11 nvjegye2XY287nBelltsok...Q,22  2kkm2!<<;"nSzolgltatsokstu*>=?nSzolgltatsok1x)__NSServicesMenu22  22CBoVlts teljes kpernyQreQa22  2UNSTag2G*FmX11 elrejtseQh22GIoTbbi elrejtse22!Kosszes megjelentse22  22ONoKilps innen: X11Qq\_NSAppleMenu-!SSR"lAlkalmazsokTU*lAlkalmazsok1؀VW)S  S!XoTestreszabs...-![[Z"kSzerkeszts\]*kSzerkeszts1^)[`_gMsolsQc  -!ccb"UAblak*dbw1 !ehkmnqtu) '(cgfgBezrsQw 01cjimMinimalizlsQm :c!liMretezs c   JKcpooLpkeds az ablakokonQ` QTUcsro Visszafel lpkeds az ablakokonQ~ c   gc!vosszest az elQtrbe^_NSWindowsMenuppr-!zzy"dSgwx{|*dSg1|}})pz!~hX11 sg[_NSMainMenuTmenu V^apps_separator ɀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ȀR #@Ā#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@cNvjklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView0AkSzvegcellajkmqr#@*UB1_controlTextColor+,ؤ/+,]NSTableColumn/IJKLMNOPTUV #@P#@D\]^_`abcfgWParancsUM0.3333329856\]^_`ǀjSzvegmezQIJKLMNOPTUV #@S#@$\]^_`abcfgoBillentyqparancs  [headerColorUB1C1 1\]^_`_NSDrawsBackground jSzvegmezQjkmqr#@(#%€_controlBackgroundColor()UL0.602715373N0.6666666667 1.0ŀYgridColor34UM0.4246723652E0.5 1+,89[NSTableView8:/YNSControlZapps_table?@ ˀՀCGIJLMGVNSCell̀ ̀΀ UWX Z_{{15, 245}, {402, 18}}^\_`a`b^c]defghk?mUopq_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ЀˀπoInaktv ablakok tkattintsatuv[NSImageNameрXNSSwitch+,yz_NSButtonImageSourcey/+,|}\NSButtonCell|/+,XNSButton:/]click_through ^׀^copy_menu_item ـCIƀڀ ۀ܀ Wp Zc_{{74, 235}, {128, 26}}d_\^``ae]cUof _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀jkmqr WNSState߀܀!*lA kijelzQrQl__popUpItemAction:ZOtherViews1րހ)߀!h256 szn߀!iTbb ezer߀!kTbb milli+,_NSPopUpButtonCell|/^NSMenuItemCell+,]NSPopUpButton:/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator C IJ$% ƀ -W0 Z_{{33, 243}, {402, 18}}^\_`a`b^c]defghk:Uopq!ЀoKapcsolatok hitelestse[enable_authBC CIJMNƀڀ _{{18, 182}, {409, 23}}^\_`a`b^c]defghkBZUopq!ЀoTeljes kpernyQs md_enable_fullscreenbc CIJmnƀڀ  _{{37, 116}, {409, 23}}^\_`a`b^c]defghkbzUopq!Ёo8Mensor elrsnek engedlyezse teljes kpernyQs mdban_enable_fullscreen_menu CI_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}\]^_`g   @oTA mensor az egrmutatnak az elsQdleges kijelzQ tetejre helyezsekor lesz lthat.jkmnqr %\controlColor+,[NSTextField:/_enable_fullscreen_menu_text CIJǀ  W  YZAAC_{{18, 130}, {402, 18}}CI  DE #@z`3^\_`a`b^c]defghkUopq!Ёo0Billentyqmegfelelsek engedlyezse az X11 alatt_enable_keyequivs C IJ ƀ  _{{33, 166}, {402, 18}}^\_`a`b^c]defghk Uopq!Ёo0Kapcsolds engedlyezse a hlzati kliensekrQlZenable_tcp  %CIJ% !# "_{{18, 252}, {402, 18}}CI0178  GI #@zH^\_`a`b^c]defghk>Uopq!Ё $oHromgombos egr emullsa\fake_buttonsFG '+CGIJQRGƀ̀ () _{{15, 184}, {402, 18}}^\_`a`b^c]defghkF^Uopq!Ё'*oA fkusz kveti az egeret_focus_follows_mousefg -1CGIJqrGƀ̀ ./ _{{15, 140}, {402, 18}}^\_`a`b^c]defghkf~Uopq!Ё-0oFkusz az j ablakokon_focus_on_new_window 38CIJ 46 5_{{18, 69}, {443, 18}}CI  RT S^\_`a`b^c]defghkUopq!Ё37oBAz Option billentyqk bal s jobb oldali Alt billentyqknt mqkdnek_option_sends_alt :U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_'{{266, 364.03906000000001}, {524, 341}}oX11-belltsokWNSPanelZ{320, 240}WZ @1́A)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1)1 %8 "KH53S)_{{36, 93}, {426, 31}}\]^_`g  ForHa engedlyezve van, a mensor billentyqzetmegfelelsei tkzhetnek a Meta mdostt hasznl X11 alkalmazsokkal._{{36, 212}, {428, 34}}CIJ&' OP K\]^_`g%3"  JowKattints kzben tartsa lenyomva az Alt vagy a Command billentyqt a kzpsQ vagy a jobb oldali egrgomb aktivlshoz. CI?@F  LM #@zT]_%{{36, 154}, {425.30858999999998, 28}}\]^_`gNK  No\Engedlyezi a beviteli men mdostsait az aktulis X11-billentyqzetkioszts fellrshoz._{{18, 188}, {402, 18}}^\_`a`b^c]defghk8WUopq!ЁHQo&Rendszerbillentyqzet-kioszts kvetse_{{36, 32}, {426, 31}}CIJdè VW A\]^_`gq5  UomHa engedlyezve van, az Option billentyqk bal s jobb oldali Alt billentyqknt mqkdnek Md kapcsol helyett._{{18, 8}, {418, 18}}^\_`a`b^c]defghkzUopq!ЁSXo&Mindig az ujjmozgs irnyba grgessen_{{10, 33}, {478, 279}}+,/_{{13, 10}, {498, 325}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1WBemenet+,]NSTabViewItem/ `ځqAbQ21Bbفdhl)CI ڀ ef #@I_{{17, 238}, {55, 20}}\]^_`gd ggSznek:CIՁ ڀ ij #@x@_{{36, 216}, {392, 14}}\]^_`gh  ko8Ez a bellts az X11 jbli elindtsakor lp rvnybe.CI ڀ mn #@yp_{{36, 145}, {411, 31}}\]^_`gl  ooEngedlyezi az X11 gykrablakt. A teljes kpernyQs mdba lpshez, illetve az abbl val kilpshez nyomja le a Command-Alt-A billentyqket._{{10, 33}, {478, 279}}WKimenet `sAbW Zt1  uy})CIJƀs vw s_{{18, 255}, {409, 23}}^\_`a`b^c]defghk +Uopq!ЁuxoSzinkronizls engedlyezseCI897 s z{ s_{{36, 221}, {428, 28}}\]^_`gEy  |oEngedlyezi a "msols" menelemet, s lehetQv teszi az OSX illesztQlap, illetve az X11 VGLAP s az ELSPDLEGES pufferek kztti szinkronizlst.CIJPQƀs ~ s_{{34, 129}, {409, 23}}^\_`a`b^c]defghk]Uopq!Ё}o/VGLAP frisstse az illesztQlap mdosulsakorCIJijƀs  s_{{34, 93}, {409, 34}}^\_`a`b^c]defghkvUopq!ЁoQAz ELSPDLEGES puffer frisstse (kzpsQ kattints) az illesztQlap mdosulsakorCIJƀs  s_{{34, 68}, {409, 23}}^\_`a`b^c]defghkUopq!Ёo:j szveg kijellsekor azonnal frisstse az illesztQlapotCIJƀs  s_{{34, 192}, {409, 23}}^\_`a`b^c]defghkUopq!Ёo.IllesztQlap frisstse a VGLAP mdosulsakorCI s  s#@y_{{48, 158}, {416, 28}}\]^_`g  omTiltsa le ezt a pontot, ha az xclipboardot, a klippert vagy ms vglapkezelQt szeretne hasznlni az X11-ben.CI s  s_{{48, 36}, {416, 28}}\]^_`g  oZAz X11 protokoll korltozsai miatt ez a lehetQsg nem minden alkalmazs esetben mqkdik._{{10, 33}, {478, 279}}kIllesztQlapG `́Ab1?Ffˁ'-)CGIG  ̀  #@z_{{23, 208}, {433, 31}}\]^_`g   oHa engedlyezve van, egy inaktv ablakra kattints az aktivls mellett az adott ablakon val keresztlhaladst is eredmnyezi.CGI  G  ̀  #@zp_{{23, 161}, {427, 17}}\]^_`g "  oLAz X11 ablakfkusz a kurzort kveti. Ennek negatv kvetkezmnyei is vannak.CGI . /G  ̀  _{{23, 92}, {427, 42}}\]^_`g ;  oHa engedlyezve van, egy j X11 ablak ltrehozsa az X11.app ablak elQtrbe helyezst eredmnyezi (a Finder.app, Terminal.app stb. helyett)_{{10, 33}, {478, 279}}WWindows C`A 1 G J K L)C I W X  ^   #@x_{{51, 195}, {398, 42}}\]^_`g J e  oAz X11 elindtsa Xauthority hozzfrs-vezrlQ billentyqket hoz ltre. Ha a rendszer IP-cme mdosul, ezek a billentyqk rvnytelenn vlnak, s gy az X11 alkalmazsok sem indulnak el.C I q r  ^   _{{51, 118}, {398, 42}}\]^_`g K ~  oHa engedlyezve van, a Kapcsolatok hitelestse funkcit szintn engedlyezni kell a rendszerbiztonsg rdekben. Ha le van tiltva, a tvoli alkalmazsokrl szrmaz kapcsolatok nincsenek engedlyezve.C I       #@y_{{17, 17}, {404, 14}}\]^_`g L   oBEzek a belltsok az X11 kvetkezQ elindtsakor lpnek rvnybe._{{10, 33}, {478, 279}}iBiztonsg+, YNSTabView /Z{524, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard8 Hŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item! u ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ځ_minimize_window:? 4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F  EUhide:J  MZterminate:G " H_hideOtherApplications:H ( J_unhideAllApplications: - ^Ucopy: 3 e ]close_window: 9 k \zoom_window: = ?  C B C,IJ  K L,_NSHuggingPriority    W W [Z 7L_{{340, 191}, {149, 32}}^\_`a`^c]defg ^ a = c dpo@ !ӀgMsolat_apps_table_duplicate: j l  C B C,IJ  v w,   _{{340, 159}, {149, 32}}^\_`a`^c]defg ^ a j dpo!ӀkEltvolts_apps_table_delete: W _apps_table_show:  C B C,IJ   ,   _{{340, 223}, {149, 32}}^\_`a`^c]def ^ a dpo!ӀoElem hozzadsa_apps_table_new:  ^prefs_changed:  ^prefs_changed:8 H ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:} } Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:B _enable_fullscreen_changed:D A _toggle_fullscreen:? ˀ ^prefs_changed:F ' ^prefs_changed:f  - ^prefs_changed: u !^prefs_changed:  } #^prefs_changed:   %^prefs_changed:   '^prefs_changed: #  )^prefs_changed:b )  +^prefs_changed: / 3 -^prefs_changed: 5 S /^prefs_changed:1 9 ү :'2?@ABkCDEFGHIJ()*  !+p}%1@8'eBNbn 9QjG?MFR fr / % J X K r L , = L j wDREF*4 1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz} :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication ,    45NO M6=! _{{302, 440}, {504, 271}}oX11 alkalmazsmenZ{320, 240}1 = j )1 *4?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ր)_{{1, 1}, {301, 28}} ! I    _NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller :/  I  +  B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 5 ҡ 6GJ 9 : ; < = > ?   B_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, E F_NSPanGestureRecognizer G H/_NSPanGestureRecognizer_NSGestureRecognizer+, J/+, L M\NSScrollView L/Z{504, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 S ү'2222B22222222()*        +p%8Bb G?GGFGGfG   J K L , =, j,DEF, -02222:22222222-QSS-Y[-acccccccc-xz:?A] "KH53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ү :'2?@ABkCDEFGHIJ()*  !+p}%1@8'eBNbn 9QjG?MFR fr / % J X K r L , = L j wDREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz} :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ү        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ҠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s        ! # L Z a u  ) 7 9 ; = ? A C K ] j u   + 0 ] f p y { }  !"$&')+LNPRTVXs|  MOQSUWY[]_ctvxz|#%')+-/LNwy{|~ !#5^`bceghjl /579;=?AC^` 3578:<=?Abdfhjln   (168:<egijlnoqs$&(*AJMOQrtvxz|~   :<>@BDFUWxz|~  9;=?ACErt "CEGIKMOx "$&(9EJ_acegix6CLes %1Jk,@\f7Knpsuwyz|}(2:Djuwz{} CDFHKNPRTUXZ\fo J X d m !! ! !!!!!! !"!%!8!A!C!F!]!f!t!}!!!!!!!!!!!!" """ """$"-"/"1"2";"D"F"g"s"}""""""""""""""""## # # ##$#-#J#L#N#[#c#j#l#n#p#w#y#{#}######$$$$"$'$:$C$J$O$\$d$q$$$$$$$$$$$$$$$$%%%(%+%/%1%3%D%I%O%W%Y%[%]%_67777'707D7O7a7n7u77777777777777778888888!8#868?8H8Q8_8d888888888888888888899 9"9$9&9(9*9?9h9i9k9m9o9p9y999999999999999::::::D:X:Z:\:^:_:a:c:e:z:::::::::::::;;;;;;;!;#;-;B;P;V;X;Z;c;o;z;;;;;;;;< <<<<<<<<<<> >>>(>6>K>M>O>Q>S>U>d>y>{>}>>>>>>>>>>>>>>>>>>???"?#?&?)?+?-?/?H??????@ @ @@@@@@ @!@#@%@'@)@+@<@?@A@C@t@|@~@@@@@@@@@@@@@@@@@@@@@A A"A$A&A(A*A,A.A0A2ACApArAtAvAxAzA|A~AAAAAAAAAAAAAAABBB$B-B;BHBNBcBeBgBiBkBmB|BBBBBBBBBBBBBBBBBBBBCVCXCYCZC\C^C`CaCcCeCgChCjCkClCCCCCCCCCCCDDDDD D D D@DLDaDcDeDgDiDkDDDDDDDDDDDDDDDDE4E6E8E:EE@EBEmEEEEEEEEEFFFFFFF FFFFFFF.FmFoFqFsFvFyF{F}FG GG G"G%G(G*GGGGGGGGGGGHHHHH H H H HH.H9H^HaHcHfHiHlHnHsII/I2I4I6IKIMIPIRITIaIjIvIIIIIIIIJJ!J"J#J&J(J*J+J.J1J3J4J7J8J9JmAmDmFmHmnnnnnnnnnn!n$n&n'n*n+n,n5nNnsnvnxn{n~nno`ooooooooooooooooop"p%p'p*p-p0p2pqqq2q5q8q:q=q@qCqLqYq[q^qaqdqgqjqlqqqqqqqqqqqqqqqqqrr6r9r;r>rArDrFsGssssssssssssssssssttttttt!tu#u&u(u)u*u,u.u1u2u5u8u:u;u=u>u?uWu|uuuuuuvvvvvvvvvvvwwww w wwvwyw{w|w}wwwwwwwwwwwwwwwwwwwwy`yyyyyyyyyyyyyyyyyz!z$z&z)z,z/z1{|-|0|2|3|4|6|8|;|<|?|B|D|E|G|H|I|R|j|||||||}&}?}R}[}e}n}y}}}}}}}}}~~~~~~~<~Q~S~U~X~[~]~|~~~~~~~~~~~~~~~~~~~~1358;=Zoqsvy{ '<>@BEGVgiknqˀ̀πҀՀ#468;>J[]_bek|~Łց؁ځ݁ %'),/=NPRUXevy{~ =?BCFHJLOiσbdefikmnqtvwz{|҄Ԅքل܄ބ !$':KNPSVąDžɅʅͅ΅υ҅%.0258:<]oņֆنۆކ +.036EVXZ]`o‡ӇՇׇڇ݇)+-03PacehkÈƈՈ+ACFIXaËŋNjɋˋ͋ϋыӋՋ׋ًۋ݋ߋ  #&)+-/13579@ILNPgÏ*ACFHKNQTWZ]`cfilorux{~”Ĕǔʔ͔ДӔ֔ؔڔܔޔ ͖ϖҖԖ֖ؖږܖޖ "%(+.147:=@CFILORUX[^adfhjlnprtwz}×Ɨɗ̗ϗїӗ՗ؗۗޗ  #&(*,.02468;>@CFHJLNPRTVXZ\^`bdfhjlorux{~ØƘɘ̘ϘҘ՘ؘۘޘ & !$'*-0369ADGJMPSVY\_behknqtwz}œŜȜ˜ΜќԜלڜݜ "%(+.147:=@CFILORUX[^adgjmpsvy|Ýŝǝɝ˝͝ϝѝӝ՝םٝ۝ݝߝ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÞŞǞɞ˞͞ϞўӞ՞מٞ۞ݞߞ !#%')+-/13<=?HILUdixorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/Localizable.strings0000644000175000017500000001067614757411105022621 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Biztosan kilp az X11-bQl?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Minden megnyitott X11 alkalmazs azonnal lell, s minden nem mentett mdosts elvsz."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Belps RandR mdba?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Egy alkalmazs a kpernyQfelbonts mdostst krelmezte az X11-tQl. Az X11 visszalltja a kpernyQt az elQzQ llapotba, amint a krelmezQ alkalmazs az elQzQ llapot visszalltst kri. Msklnben a #%#A billentyqsorozat lenyomsval knyszertheti az X11-et, hogy trjen vissza az elQzQ llapothoz."; /* No comment provided by engineer. */ "Allow" = "Engedlyezs"; /* No comment provided by engineer. */ "Always Allow" = "Engedlyezs mindig"; /* No comment provided by engineer. */ "Cancel" = "Mgsem"; /* No comment provided by engineer. */ "Mac Help" = "Mac sg"; /* No comment provided by engineer. */ "Quit" = "Kilps"; /* No */ "No" = "Nem"; /* Yes */ "Yes" = "Igen"; /* Terminal */ "Terminal" = "Terminl"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "n rendelkezik egy mr ltezQ ~/.xinitrc fjllal.\n\nAz X11 alkalmazsok ltal megjelentett ablakok nem felttlenl rendelkeznek cmsorral, vagy eltrnek a natv alkalmazsok ltal megjelentett ablakoktl.\n\n Kvnja flretolni a ltezQ fjlt, s az X11 kvetkezQ elindtsakor a hagyomnyos X11 krnyezetet hasznlni?"; /* window item modifiers */ "window item modifiers" = "parancs"; /* Updates menu title & */ "Check for X11 Updates..." = "X11-frisstsek keresse &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/hu.lproj/locversion.plist0000644000175000017500000000061014757411105022210 LprojCompatibleVersion 106.5 LprojLocale hu LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/0000755000175000017500000000000014757411135020003 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/0000755000175000017500000000000014757411135021476 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib0000644000175000017500000021140214757411105024202

Se abilitati, gli equivalenti da tastiera della barra dei menu potrebbero interferire con le applicazioni X11 che utilizzano il modificatore Meta. Per attivare il pulsante destro o quello centrale del mouse, fai clic tenendo premuto il pulsante Opzione o il pulsante Comando. Abilita la finestra root di X11. Utilizza la combinazione di tasti Comando-Opzione-A per attivare e disattivare la modalità a tutto schermo. La barra dei menu diventa visibile quando il cursore del mouse viene posizionato nella parte superiore dello schermo principale. Quando il riquadro è attivato, la creazione di una nuova finestra di X11 farà spostare X11.app in primo piano (invece di Finder.app, Terminal.app, etc.) All'avvio di X11 verranno create le chiavi Xauthority per il controllo d'accesso. Se l'indirizzo IP del sistema cambia, tali chiavi non sono più valide. Questa situazione potrebbe bloccare l'avvio delle applicazioni X11. Se possibile, per garantire la sicurezza del sistema deve essere inoltre abilitata la funzione Autentica connessioni. Quando questa funzione non è attiva, non sono consentite le connessioni dalle applicazioni remote. xorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects.nib0000644000175000017500000013431414757411105024566 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}>?BH]jkuvzpV$%*/05:; @DEK[dez{ $3<=EFGM\]efgm|} ./?GHIO^_ghio~ $%67IQRS[\]efgw~ $34<=NOVWfgop     + , 3 4 D E L M N O U ] n o w x           $ % * + 0 1 6 7 < = A B G H M N S e n o y z {           % & + , 1 2 7 8 = > C D I J        . / 0 3 D E F J U V [ ] ` a b c d  v n      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\ApplicazioniP^submenuAction:$%*\Applicazioni1&')#   #!(mPersonalizza &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5_Informazioni su X112XY287]Preferenze...Q,22  2kkm2!<<;"WServizismu*=;>1w)__NSServicesMenu22  22BA_Alterna A tutto schermoQa22  2UNSTag2F*E\Nascondi X11Qh22FH^Nascondi altre22!J\Mostra tutte22  22NM[Esci da X11Qq\_NSAppleMenu-!RRQ"\ApplicazioniST*\Applicazioni1׀UV)R  R!W_Personalizza...-!ZZY"\Composizione[\*\Composizione1])Z_^UCopiaQc  -!bba"XFinestra*cav1 dgjlmpst) &'bfeVChiudiQw /0bihWContraiQm 9b!k\Ridimensiona b   IJbon_Naviga tra le finestreQ< PSTbrq_#Inverti navigazione tra le finestreQ> b   fb!u_Porta tutto in primo piano^_NSWindowsMenuooq-!yyx"UAiutoqwxz*1z{{)oy!|YAiuto X11[_NSMainMenuTmenu U^apps_separator Ȁ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ǀR@#@À#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{333, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{333, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{334, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPQSTUVWYZ[\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@`d`#@O]`^_`abcdefghi[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomelmnopqrstVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontwxy_NSFontDescriptorAttributes{1|WNS.keys}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell^_`abY]NSControlView_NSPlaceholderString0A^Cella di testolmost#@*PVB1_controlTextColor+,ݤ/+,]NSTableColumn/IJKLMNOPQUVWY #@[#@D^_`abcdehiWComandoVM0.3333329856^_`abYˀ^Cella di testoIJKLMNOPQUVWY #@T@#@$^_`abcde  hi]Abbreviazione[headerColorVB1C1 1^_`abY!_NSDrawsBackground ^Cella di testolmo&'st#@(,._controlBackgroundColor12VL0.602715373N0.6666666667 179ĀYgridColor<=VM0.4246723652E0.5 1+,AB[NSTableViewAC/YNSControlZapps_tableHI ʀԀLPRTUPVNSCellˀ ̀̀ ]_` Y_{{15, 245}, {402, 18}}f^ghibj`k_lmnopsHuVwxy_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀_Clic finestre inattive|}~[NSImageNameЀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonC/]click_through ]ր^copy_menu_item ؀Lŀـ ڀۀ _o Yb_{{70, 234}, {128, 26}}lg^fbhim_kVwn _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀lmost WNSStateހۀ!*[Dal monitor__popUpItemAction:ZOtherViews1ހ݀)ހ!Z256 Coloriހ!XMigliaiaހ!WMilioni+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonC/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator!" L(R,-(ŀ 5_8 Y_{{18, 243}, {402, 18}}f^ghibj`k_lmnops!BVwxy!π_Autentica connessioni[enable_authJK LRUVŀـ _{{18, 182}, {409, 23}}f^ghibj`k_lmnopsJbVwxy!πoModalit a tutto schermo_enable_fullscreenjk LRuvŀـ  _{{37, 116}, {474, 18}}f^ghibj`k_lmnopsjVwxy!ρo@Consenti accesso alla barra dei menu in modalit a tutto schermo_enable_fullscreen_menu L_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~p_{{54, 79}, {491, 31}}Z{250, 750}^_`abo   @_La barra dei menu diventa visibile quando il cursore del mouse viene posizionato nella parte superiore dello schermo principale.lmopst . \controlColor+,[NSTextFieldC/_enable_fullscreen_menu_text LRπ  _ XY@@B_{{18, 130}, {402, 18}}L CD #@2f^ghibj`k_lmnopsVwxy!ρ_'Abilita equivalenti da tastiera con X11_enable_keyequivs L(R(ŀ  _{{18, 166}, {402, 18}}f^ghibj`k_lmnopsVwxy!ρ_)Consente le connessioni da client networkZenable_tcp $LR&'-  " !_{{18, 243}, {402, 18}}LR78> NO Ff^ghibj`k_lmnopsDVwxy!ρ#_Emula mouse a tre pulsanti\fake_buttonsLM &*LPRWXPŀˀ '( _{{15, 184}, {402, 18}}f^ghibj`k_lmnopsLdVwxy!ρ&)_Messa a fuoco mediante il mouse_focus_follows_mouselm ,0LPRwxPŀˀ -. _{{15, 125}, {402, 18}}f^ghibj`k_lmnopslVwxy!ρ,/_"Messa a fuoco sulle nuove finestre_focus_on_new_window 27LR 35 4_{{18, 69}, {402, 18}}L QS #@~Rf^ghibj`k_lmnopsVwxy!ρ26_%I tasti Opzione inviano Alt_L e Alt_R_option_sends_alt 9V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{345, 450.03906000000001}, {600, 341}}^Preferenze X11WNSPanelZ{320, 240}_Y ?1Ձ@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1 ā)1>-FH!42R)_{{36, 93}, {511, 31}}^_`aboY! E _Se abilitati, gli equivalenti da tastiera della barra dei menu potrebbero interferire con le applicazioni X11 che utilizzano il modificatore Meta.L./ GI H_{{36, 195}, {511, 42}}L@AG KL #@|^_`abo>YNF J _Per attivare il pulsante destro o quello centrale del mouse, fai clic tenendo premuto il pulsante Opzione o il pulsante Comando. _{{36, 155}, {453, 17}}^_`aboYXH M _UConsente le modifiche del menu tastiera per riscrivere l'attuale mappa dei tasti X11._{{18, 179}, {402, 18}}f^ghibj`k_lmnops-bVwxy!ρ!P_#Segui layout di tastiera di sistema_{{36, 46}, {497, 17}}LRopՀ UV @^_`abo|4  To`Se abilitati, i tasti Opzione inviano i simboli dei tasti X11 Alt_L e Alt_R anzich Mode_switch._{{18, 23}, {435, 18}}f^ghibj`k_lmnopsVwxy!ρRW_@Scorri sempre contenuto nella direzione del movimento delle dita_{{10, 33}, {554, 279}}+,/_{{13, 10}, {574, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1XIngresso+,]NSTabViewItem/ _فp@aQ21Jj؁cgk)LƁـ de #@G_{{17, 238}, {51, 20}}^_`aboYcf WColori:Lـ hi #@x@_{{36, 216}, {392, 14}}^_`aboYg j _CQueste opzioni diventeranno effettive al successivo riavvio di X11.Lـ lm #@@_{{36, 145}, {504, 31}}^_`aboYk n oAbilita la finestra root di X11. Utilizza la combinazione di tasti Comando-Opzione-A per attivare e disattivare la modalit a tutto schermo._{{10, 33}, {554, 279}}VUscita   _r@a_ Ys1 !"tx|)L R,- ŀr uv r_{{18, 255}, {409, 23}}f^ghibj`k_lmnops9Vwxy!ρtw_Abilita sincronizzazioneL FG Mr yz r#@_{{36, 221}, {512, 28}}^_`aboTx  {o~Abilita l'elemento copia  del menu e consenti la sincronizzazione degli appunti di OSX e i buffer CLIPBOARD e PRIMARY di X11.L R_` ŀr }~ r_{{34, 129}, {409, 23}}f^ghibj`k_lmnopslVwxy!ρ|_.Aggiorna CLIPBOARD quando gli appunti cambianoL Rxy ŀr  r_{{34, 104}, {513, 23}}f^ghibj`k_lmnopsVwxy!ρ_LAggiorna PRIMARY (clic con il pulsante centrale) quando gli appunti cambianoL R ŀr  r_{{34, 79}, {470, 18}}f^ghibj`k_lmnopsVwxy!ρ_CAggiorna immediatamente gli appunti quando si seleziona nuovo testoL R ŀr  r_{{34, 192}, {409, 23}}f^ghibj`k_lmnops Vwxy!ρ_,Aggiorna gli appunti quando CLIPBOARD cambiaL  ˁr  r#@_{{50, 158}, {500, 28}}^_`abo!  _rSe desideri utilizzare xclipboard, klipper o qualsiasi altro gestore di appunti di X11, disabilita questa opzione.L  ˁr  r_{{48, 47}, {500, 28}}^_`abo"  _vA causa delle limitazioni del protocollo di X11, questa opzione in alcune applicazioni potrebbe non funzionare sempre._{{10, 33}, {554, 279}}WAppuntiP _ˁ@a1HLlʁ&,)LP  P ˀ  #@_{{23, 208}, {517, 31}}^_`abo   o~Quando il riquadro attivato, facendo clic su una finestra inattiva, il clic del mouse passer a tale finestra e la attiver.LP # $P *ˀ  #@8_{{23, 150}, {523, 28}}^_`abo 1  onLa messa a fuoco della finestra di X11 avviene mediante il cursore. Questo pu avere effetti controproducenti.LP = >P ˀ  _{{23, 77}, {517, 42}}^_`abo J  oQuando il riquadro attivato, la creazione di una nuova finestra di X11 far spostare X11.app in primo piano (invece di Finder.app, Terminal.app, etc.)_{{10, 33}, {554, 279}}XFinestre( R_@ 1 V! Y Z [)L( f g( m  #@_{{36, 181}, {510, 56}}^_`abo YY t  oAll'avvio di X11 verranno create le chiavi Xauthority per il controllo d'accesso. Se l'indirizzo IP del sistema cambia, tali chiavi non sono pi valide. Questa situazione potrebbe bloccare l'avvio delle applicazioni X11.L(  ( m  _{{36, 104}, {510, 56}}^_`abo ZY   oSe possibile, per garantire la sicurezza del sistema deve essere inoltre abilitata la funzione Autentica connessioni. Quando questa funzione non attiva, non sono consentite le connessioni dalle applicazioni remote.L(  (   #@y_{{17, 17}, {404, 14}}^_`abo [Y   _CQueste opzioni diventeranno effettive al successivo riavvio di X11._{{10, 33}, {554, 279}}ZProtezione+, YNSTabView /Z{600, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard- !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately! ΀Zsync_text1" ЀZsync_text2D @Ҁ_toggle_fullscreen_item?  4Ԁ^x11_about_item t ց_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  g ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@ " 6 ݁[prefs_show:F ( D߁Uhide:J . LZterminate:G 4 G_hideOtherApplications:H : I_unhideAllApplications: ? ]Ucopy: E d ]close_window: K j \zoom_window: O Q  L T U,R  ] ^,_NSHuggingPriority   _ i mY 6K_{{372, 191}, {160, 32}}f^ghib`k_lmno p s O u vxw@ !ҀWDuplica_apps_table_duplicate: | ~  L T U,R   ,  _{{372, 159}, {160, 32}}f^ghib`k_lmno p s | vxw!ҀWRimuovi_apps_table_delete: V _apps_table_show:  L T U,R   ,  _{{372, 223}, {160, 32}}f^ghib`k_lmn p s vxw!Ҁ_Aggiungi elemento_apps_table_new:  ^prefs_changed:  ^prefs_changed:- ! ^prefs_changed:! ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:{ { Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:J _enable_fullscreen_changed:D  @ _toggle_fullscreen:H ʀ ^prefs_changed:L  & ^prefs_changed:l  , ^prefs_changed:  t  ^prefs_changed: # | "^prefs_changed: )  $^prefs_changed: /  &^prefs_changed: 5  (^prefs_changed:j ;  *^prefs_changed: A 2 ,^prefs_changed: G R .^prefs_changed:1 K  L'2?@ABkCDEFGHIJ()*  +o{'>/A-8pJVjv -G`y !"PHU LX $lx >(!- Y g Z [ , O ^ | DSEF*4 0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication ,    34MN L5<! _{{302, 440}, {546, 271}}_Menu applicazioni X11Z{320, 240}1 O | 􀊁)1 *4>B)1 )_{{1, 1}, {333, 214}}_{{0, -28}, {333, 214}}+,  ZNSClipView /1 Հ)_{{1, 1}, {333, 28}} !  % ' * *_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {333, 15}}\_doScroller:+, 1 2ZNSScroller 1C/   % = * *A C@@_{{334, 29}, {15, 186}}_{{20, 20}, {350, 231}}1 G HFI K L M N O P Q   T_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, W X_NSPanGestureRecognizer Y Z/_NSPanGestureRecognizer_NSGestureRecognizer+, \/+, ^ _\NSScrollView ^/Z{546, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 e '2222B22222222()*        +o>-Jj        ! "PHPPLPPlP(!(( Y( Z( [ , O, |,DEF, -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1  L'2?@ABkCDEFGHIJ()*  +o{'>/A-8pJVjv -G`y !"PHU LX $lx >(!- Y g Z [ , O ^ | DSEF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 䠁I+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~         E S Z n |  " 0 2 4 6 8 : < D V c n y { }       $ ) V _ i r t v x z | ~   -/13579T]ls{.02468:<>@DUWY[]f>@BCEGHJLy{}"$)+-/13MOxz|} /13579;Hqsuvxz{} "$&3<ACEGprtuwyz|~ )2579Z\^`bdfln "$&(/1RTVXZ\^fh!BDIKMOQSy{ 8:<>@BDFHJP]_acloqs -BMi".Gh.:GS] %'09;=FGIJ   "-^j *1=fhjkmoqsu 4@Wdvx{}        L Y d q | ! !!!*!6!C!H!J!L!N!P!R!U!Z!o!v!!!!!!!!!!!!!!"" " """"""""5"P"p""""""""""""####!#*#2#7#L#X#f#n#p#r#t#v#x#################555555556666>6L6b6g6i6k6m6o6q6s6u6x6666666666666666667777F7G7I7K7M7N7P7Y7b7d77777777777777777778'8(8*8,8.8/818:8C8E8f8h8j8l8n8p8~88888888888899 9 9999999&979@9C9E9G9\9^9`9b9d9}9999999999999::::::&:0:;:P:R:T:V:X:Z::::::::::::::::::;;;;; ; ; ;&;e;z;;;;;;;;;<<<<< < <<<<<.<7#>5>C>X>u>>>>>>>>>>>>>>>>>>>>???? ? ?????!?#?%?'?3?G?R?[?d?f?h?j?l?n?????????????????????@@-@/@1@3@5@7@9@;@=@?@G@P@d@q@@@@@@@@@@@@@@@@@@AAAAAAA A8AMAOAQASAUAWAAAAAAAAAAAAAAAAAAAAAABBBB[B]B_BaBcBeBgBiBBBBBBBBCC C C C CCCCCCCCCCC6CuCwCyC{C}CCCCCCCCCCCDFDHDIDJDLDNDPDQDTDWDYDZD\D]D^DwDDDDDDDDEIEbEwEyE{E~EEEFF.FJFMFOFPFQFSFUFXFYF\F_FaFbFdFeFfFoFFFFFFFFFFGOG`GcGeGgG|G~GGGGGGGGGGGGGGHPHRHSHTHWHYH[H\H_HbHdHeHhHiHjHmHHHHHHHHHHHHI;I>I@IAIBIEIGIJIKINIQISITIWIXIYIbIeIIIIIIIIIIJJJ J JJJmJoJpJqJsJuJwJxJ{J~JJJJJJJJJJJJJJKK$K9K;K=K@KCKEKKKKKKKKKKKKKKKKKL9L;LT@TATJTMTPTRT[TnTqTtTwTzT}TTTTTTTTTTTTTTUsUUUUUUUUUUUUUUUUUVVVVVVVVVVVVVVVVVVVVVVVVVVVWlWWWWWWWWWXX1XpXrXtXvXyX|X~XXXYYY Y!Y$Y&Y(Y)Y,Y/Y1Y2Y5Y6Y7Y:Y_YbYdYgYjYmYoZ2ZJZZZZZZZZZZZ[[['[2[5[8[;[>[A[C[\[c[m[z[}[[[[[[[[[[[[[[[[[[[[[[[\\\\ \ \s\v\x\y\z\|\~\\\\\\\\\\\\\\\\\\\\]Y]\]^]_]`]b]d]g]h]k]n]p]q]s]t]u]~]]]]]]]]]^^^^^^^^^^^^^^^^^^^^^^^^^^^``,`3`L`O`R`U`X`[`^````````````````````a(a*a+a,a/a1a3a4a7a:af@fAfDfGfIfJfMfNfOfgfffffffffgWgYgZg[g^g`gbgcgfgigkglgogpgqggggggggghhohrhthuhvhyh{h~hhhhhhhhhhhhhhhhhiYiiiiiiiiiiiiiiiiijjj j#j&j)j+jjjjjjjjjjjkkk k kkkkkkkkkkkkkkkkkkkkkkkkkkkkklmXm[m]m^m_mamcmfmgmjmmmompmrmsmtm}mmmmmmmmnooooooooo o#o&o(o)o+o,o-oEojomooorouoxozppppppppppqqq qqqqq}qqqqqqqqqqqqqqqqqqqqqqqqqstttttt!t#t&t't*t-t/t0t2t3t4tMtvtyt{t~ttttv;vvvvvvvvvvvvvvvvvvww w wwwwww`wywwwwwwwwwxx xx$x0xExGxIxLxOxQxnxxxxxxxxxxxxxxxxxxxxyy#y%y'y*y-y/yNycyeygyjymyoyyyyyyyyyyyyyyyz z z zzzz z5z7z9z;z>z@zYznzpzrztzwzyzzzzzzzzzzzzz{{{{{+{-{/{2{5{U{f{h{j{m{p{|{{{{{{{{{{{{{{{{{{|| | |||+|8|:|=|@|F|W|Y|[|^|a|o|||||||||||}}&})}+},}-}0}2}4}5}8};}=}>}A}B}C}F}o}q}t}u}x}z}|}~}}}}}}}}}}}}}~~#~&~(~+~.~~~~~~~~~~~~~~~~~~~  (9;=@CVgjlorAJLNQTVXl~€ŀԀ):=?BETegilo~с '8:@BDFHKNQTVX[^adgjmpsvy|Ćdžʆ̆ΆІӆֆن܆߆  "$&)257E܇'2469;>@ILNPgÉ*ACFHKNQTWZ]`cfilorux{~ŽĎǎʎ͎Ўӎ֎؎ڎ܎ގ ͐ϐҐԐ֐ؐڐܐސ "%(+.147:=@CFILORUX[^adfhjlnprtwz}ÑƑɑ̑ϑёӑՑؑۑޑ  #&(*,.02468;>@CFHJLNPRTVXZ\^`bdfhjlnqtwz}’ŒȒ˒ΒђԒגڒݒ %  #&),/258;>ADGJMPSVY\_behknqtwz}•ŕȕ˕Εѕԕוڕݕ "%(+.147:=@CFILORUX[^adgjmpsvy|Ėǖʖ͖ЖӖ֖ٖܖߖ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~˜ĘƘȘʘ̘ΘИҘԘؘ֘ژܘޘ  "$&(*,.02;<>GHKTchxorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013426314757411105025310 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}  <=@F[histxnT  "#(-.389 >BCIZcdyz~#2;<DEFL[\defl{|  -.>FGHN]^fghn}~ #$56HPQRZ[\defv}~#23;<MNUVefno~     * + 2 3 C D K L M N T \ m n v w          # $ ) * / 0 5 6 ; < @ A F G L M R d m n x y z           $ % * + 0 1 6 7 < = B C H I        - . / 2 C D E I T U Z \ _ ` a b c P u m      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\ApplicazioniP^submenuAction:$%*\Applicazioni1&')#   #!(mPersonalizza &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5_Informazioni su X112XY287]Preferenze...Q,22  2kkm2!<<;"WServizismu*=;>1w)__NSServicesMenu22  22BA_Alterna A tutto schermoQa22  2UNSTag2F*E\Nascondi X11Qh22FH^Nascondi altre22!J\Mostra tutte22  22NM[Esci da X11Qq\_NSAppleMenu-!RRQ"\ApplicazioniST*\Applicazioni1׀UV)R  R!W_Personalizza...-!ZZY"\Composizione[\*\Composizione1])Z_^UCopiaQc  -!bba"XFinestra*cav1 dgjlmpst) &'bfeVChiudiQw /0bihWContraiQm 9b!k\Ridimensiona b   IJbon_Naviga tra le finestreQ< PSTbrq_#Inverti navigazione tra le finestreQ> b   fb!u_Porta tutto in primo piano^_NSWindowsMenuooq-!yyx"UAiutoqwxz*1z{{)oy!|YAiuto X11[_NSMainMenuTmenu U^apps_separator Ȁ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ǀR #@À#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{333, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{333, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{334, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNOQRSTUWXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@^#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomejklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`W]NSControlView_NSPlaceholderString0A^Cella di testojkmqr#@*PTB1_controlTextColor+,ۤ/+,]NSTableColumn/GHIJKLMNOSTUW #@X`#@D\]^_`abcfgWComandoTM0.3333329856\]^_`Wɀ^Cella di testoGHIJKLMNOSTUW #@Q #@$\]^_`abc  fg]Abbreviazione[headerColorTB1C1 1\]^_`W_NSDrawsBackground ^Cella di testojkm$%qr#@(*,_controlBackgroundColor/0TL0.602715373N0.6666666667 157ĀYgridColor:;TM0.4246723652E0.5 1+,?@[NSTableView?A/YNSControlZapps_tableFG ʀԀJNPQSTNVNSCellˀ ̀̀ \^_ Y_{{15, 245}, {402, 18}}e\fgh`i^j]klmnorFtTvwx_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀_Clic finestre inattive{|}[NSImageNameЀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonA/]click_through ]ր^copy_menu_item ؀JPĀـ ڀۀ ^o Yb_{{70, 234}, {128, 26}}kf\e`ghl]jTvm _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀jkmqr WNSStateހۀ!*[Dal monitor__popUpItemAction:ZOtherViews1݀݀)ހ!Z256 Coloriހ!XMigliaiaހ!WMilioni+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonA/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator ! J'PQ+,'Ā 4^7 Y_{{18, 243}, {402, 18}}e\fgh`i^j]klmnor ATvwx!π_Autentica connessioni[enable_authIJ JPQTUĀـ _{{18, 182}, {409, 23}}e\fgh`i^j]klmnorIaTvwx!πoModalit a tutto schermo_enable_fullscreenij JPQtuĀـ  _{{37, 116}, {474, 18}}e\fgh`i^j]klmnoriTvwx!ρo@Consenti accesso alla barra dei menu in modalit a tutto schermo_enable_fullscreen_menu JP_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~p_{{54, 79}, {491, 31}}Z{250, 750}\]^_`n   @_La barra dei menu diventa visibile quando il cursore del mouse viene posizionato nella parte superiore dello schermo principale.jkmnqr , \controlColor+,[NSTextFieldA/_enable_fullscreen_menu_text JPQ΀  ^ XY@@B_{{18, 130}, {402, 18}}JP CD #@2e\fgh`i^j]klmnorTvwx!ρ_'Abilita equivalenti da tastiera con X11_enable_keyequivs J'PQ'Ā  _{{18, 166}, {402, 18}}e\fgh`i^j]klmnorTvwx!ρ_)Consente le connessioni da client networkZenable_tcp $JPQ%&,  " !_{{18, 243}, {402, 18}}JPQ67= NO Fe\fgh`i^j]klmnorCTvwx!ρ#_Emula mouse a tre pulsanti\fake_buttonsKL &*JNPQVWNĀˀ '( _{{15, 184}, {402, 18}}e\fgh`i^j]klmnorKcTvwx!ρ&)_Messa a fuoco mediante il mouse_focus_follows_mousekl ,0JNPQvwNĀˀ -. _{{15, 125}, {402, 18}}e\fgh`i^j]klmnorkTvwx!ρ,/_"Messa a fuoco sulle nuove finestre_focus_on_new_window 27JPQ 35 4_{{18, 69}, {402, 18}}JP QS #@~Re\fgh`i^j]klmnorTvwx!ρ26_%I tasti Opzione inviano Alt_L e Alt_R_option_sends_alt 9T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{345, 450.03906000000001}, {600, 341}}^Preferenze X11WNSPanelZ{320, 240}^Y ?1ԁ@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1 Á)1=,FH!42R)_{{36, 93}, {511, 31}}\]^_`nW  E _Se abilitati, gli equivalenti da tastiera della barra dei menu potrebbero interferire con le applicazioni X11 che utilizzano il modificatore Meta.JP-. GI H_{{36, 195}, {511, 42}}JP?@F KL #@|\]^_`n=WMF J _Per attivare il pulsante destro o quello centrale del mouse, fai clic tenendo premuto il pulsante Opzione o il pulsante Comando. _{{36, 155}, {453, 17}}\]^_`nWWH M _UConsente le modifiche del menu tastiera per riscrivere l'attuale mappa dei tasti X11._{{18, 179}, {402, 18}}e\fgh`i^j]klmnor,aTvwx!ρ!P_#Segui layout di tastiera di sistema_{{36, 46}, {497, 17}}JPQnoԀ UV @\]^_`n{4  To`Se abilitati, i tasti Opzione inviano i simboli dei tasti X11 Alt_L e Alt_R anzich Mode_switch._{{18, 23}, {435, 18}}e\fgh`i^j]klmnorTvwx!ρRW_@Scorri sempre contenuto nella direzione del movimento delle dita_{{10, 33}, {554, 279}}+,/_{{13, 10}, {574, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1XIngresso+,]NSTabViewItem/ _فp@aQ21Ii؁cgk)JPŁـ de #@G_{{17, 238}, {51, 20}}\]^_`nWcf WColori:JPـ hi #@x@_{{36, 216}, {392, 14}}\]^_`nWg j _CQueste opzioni diventeranno effettive al successivo riavvio di X11.JPـ lm #@@_{{36, 145}, {504, 31}}\]^_`nWk n oAbilita la finestra root di X11. Utilizza la combinazione di tasti Comando-Opzione-A per attivare e disattivare la modalit a tutto schermo._{{10, 33}, {554, 279}}VUscita   _r@a^ Ys1 !tx|)J PQ+, Ār uv r_{{18, 255}, {409, 23}}e\fgh`i^j]klmnor8Tvwx!ρtw_Abilita sincronizzazioneJ PEF Lr yz r#@_{{36, 221}, {512, 28}}\]^_`nSx  {o~Abilita l'elemento copia  del menu e consenti la sincronizzazione degli appunti di OSX e i buffer CLIPBOARD e PRIMARY di X11.J PQ^_ Ār }~ r_{{34, 129}, {409, 23}}e\fgh`i^j]klmnorkTvwx!ρ|_.Aggiorna CLIPBOARD quando gli appunti cambianoJ PQwx Ār  r_{{34, 104}, {513, 23}}e\fgh`i^j]klmnorTvwx!ρ_LAggiorna PRIMARY (clic con il pulsante centrale) quando gli appunti cambianoJ PQ Ār  r_{{34, 79}, {470, 18}}e\fgh`i^j]klmnorTvwx!ρ_CAggiorna immediatamente gli appunti quando si seleziona nuovo testoJ PQ Ār  r_{{34, 192}, {409, 23}}e\fgh`i^j]klmnorTvwx!ρ_,Aggiorna gli appunti quando CLIPBOARD cambiaJ P ʁr  r#@_{{50, 158}, {500, 28}}\]^_`n   _rSe desideri utilizzare xclipboard, klipper o qualsiasi altro gestore di appunti di X11, disabilita questa opzione.J P ʁr  r_{{48, 47}, {500, 28}}\]^_`n!  _vA causa delle limitazioni del protocollo di X11, questa opzione in alcune applicazioni potrebbe non funzionare sempre._{{10, 33}, {554, 279}}WAppuntiN _ˁ@a1FKkʁ&,)JNP  N ˀ  #@_{{23, 208}, {517, 31}}\]^_`n   o~Quando il riquadro attivato, facendo clic su una finestra inattiva, il clic del mouse passer a tale finestra e la attiver.JNP " #N )ˀ  #@8_{{23, 150}, {523, 28}}\]^_`n 0  onLa messa a fuoco della finestra di X11 avviene mediante il cursore. Questo pu avere effetti controproducenti.JNP < =N ˀ  _{{23, 77}, {517, 42}}\]^_`n I  oQuando il riquadro attivato, la creazione di una nuova finestra di X11 far spostare X11.app in primo piano (invece di Finder.app, Terminal.app, etc.)_{{10, 33}, {554, 279}}XFinestre' Q_@ 1 U  X Y Z)J'P e f' l  #@_{{36, 181}, {510, 56}}\]^_`n XW s  oAll'avvio di X11 verranno create le chiavi Xauthority per il controllo d'accesso. Se l'indirizzo IP del sistema cambia, tali chiavi non sono pi valide. Questa situazione potrebbe bloccare l'avvio delle applicazioni X11.J'P  ' l  _{{36, 104}, {510, 56}}\]^_`n YW   oSe possibile, per garantire la sicurezza del sistema deve essere inoltre abilitata la funzione Autentica connessioni. Quando questa funzione non attiva, non sono consentite le connessioni dalle applicazioni remote.J'P  '   #@y_{{17, 17}, {404, 14}}\]^_`n ZW   _CQueste opzioni diventeranno effettive al successivo riavvio di X11._{{10, 33}, {554, 279}}ZProtezione+, YNSTabView /Z{600, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard, !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1! ЀZsync_text2D @Ҁ_toggle_fullscreen_item?  4Ԁ^x11_about_item t ց_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  g ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@ ! 6 ݁[prefs_show:F ' D߁Uhide:J - LZterminate:G 3 G_hideOtherApplications:H 9 I_unhideAllApplications: > ]Ucopy: D d ]close_window: J j \zoom_window: N P  J S T*PQ  \ ]*_NSHuggingPriority   ^ h lY 6K_{{372, 191}, {160, 32}}e\fgh`^j]klmn o r N t uwv@ !ҀWDuplica_apps_table_duplicate: { }  J S T*PQ   *  _{{372, 159}, {160, 32}}e\fgh`^j]klmn o r { uwv!ҀWRimuovi_apps_table_delete: V _apps_table_show:  J S T*PQ   *  _{{372, 223}, {160, 32}}e\fgh`^j]klm o r uwv!Ҁ_Aggiungi elemento_apps_table_new:  ^prefs_changed:  ^prefs_changed:, ! ^prefs_changed: ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:{ { Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:I _enable_fullscreen_changed:D  @ _toggle_fullscreen:F ʀ ^prefs_changed:K  & ^prefs_changed:k  , ^prefs_changed:  t  ^prefs_changed: " | "^prefs_changed: (  $^prefs_changed: .  &^prefs_changed: 4  (^prefs_changed:i :  *^prefs_changed: @ 2 ,^prefs_changed: F R .^prefs_changed:1 J  K'2?@ABkCDEFGHIJ()*  +o{&=.@,7oIUiu ,F_x !NFT KW #kw =' , X f Y Z * N ] { BQCD(2 0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication *    34MN L5<! _{{302, 440}, {546, 271}}_Menu applicazioni X11Z{320, 240}1 N { 􀊁)1 (2>B)1 )_{{1, 1}, {333, 214}}_{{0, -28}, {333, 214}}+,  ZNSClipView /1 Ԁ)_{{1, 1}, {333, 28}}  P $ & ) )_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {333, 15}}\_doScroller:+, 0 1ZNSScroller 0A/  P $ < ) )A C@@_{{334, 29}, {15, 186}}_{{20, 20}, {350, 231}}1 F GFI J K L M N O P   S_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, V W_NSPanGestureRecognizer X Y/_NSPanGestureRecognizer_NSGestureRecognizer+, [/+, ] ^\NSScrollView ]/Z{546, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 d '2222B22222222()*        +o=,Ii         !NFNNKNNkN' '' X' Y' Z * N* {*BCD* -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1  K'2?@ABkCDEFGHIJ()*  +o{&=.@,7oIUiu ,F_x !NFT KW #kw =' , X f Y Z * N ] { BQCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 㠁I+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~         E S Z n |  " 0 2 4 6 8 : < D V c n y { }       $ ) V _ i r t v x z | ~   -/13579T]ls{.02468:<>@DUWY[]f>@BCEGHJLy{}"$)+-/13MOxz|} /13579;Hqsuvxz{} "$&3<ACEGprtuwyz|~ )2579Z\^`bdfln "$&(/1RTVXZ\^fh!BDIKMOQSy{ 8:<>@BDFHJP]_acloqs)>Ie{ *Cd*6COY "$&/01x EQijlnpqsuwy{$MOQRTVXZ\'>K]_bdginqz|    3 @ K X c r !!!!*!/!1!3!5!7!9! >>,>A>^>i>{>}>>>>>>>>>>>>>>>>>>>>>>>>>>? ? ????0?;?D?M?O?Q?S?U?W??????????????????????@@@@@@ @"@$@&@(@0@9@M@Z@i@r@@@@@@@@@@@@@@@@@@AAAAA A!A6A8A:AA@AAAAAAAAAAAAAAAAAAAAAAAABBDBFBHBJBLBNBPBRBjBvBBBBBBBBBBBBBBBBCCCCCCC^C`CbCdCfChCjClCCCCCCCCD/D1D2D3D5D7D9D:D=D@DBDCDEDFDGD`DDDDDDDDE2EKE`EbEdEgEjElEEFF3F6F8F9F:FFAFBFEFHFJFKFMFNFOFXFpF{FFFFFFFFG8GIGLGNGPGeGgGjGlGnG{GGGGGGGGGGH9H;HM?MBMEMGMHMJMKMLMeMMMMMMMMMMNNNNN N NhNjNkNlNnNpNrNsNvNyN{N|N~NNNNNNNNNNNO O#O8O:O`A`D`G`p`r`u`v`y`|`~`````````````aaaaaaaaa a#a%a&a)a*a+aDaaaaaaaaabbbbbbb!b$b%b(b+b-b.b1b2b3b{O{Q{S{V{Y{e{v{x{z{}{{{{{{{{{{{{{{{{{{{||!|#|&|)|/|@|B|D|G|J|X|i|k|m|p|s|||||||}}}}}}}}}}!}$}&}'}*}+},}/}X}Z}]}^}a}c}e}g}j}}}}}}}}}}}}}~ ~~~~~v~x~y~z~}~~~~~~~~~~~~~~~~~~~~"$&),?PSUX[*357:=?AUgx{}΀рӀրـ#&(+.=NPRUXgxz|ˁ́ρҁՁ!#%(+HY[]`cx͂ނ #479APYÅŅDžɅ˅ͅυхӅՅׅم܅߅ !#%')+-/147:=?ADGJMPSVY\_behknqtwz}†ņȆˆΆцԆ׆چ݆  .}Ň݇"$')2579Pir}%79;<=?ACFGJLNQRSVn{ 5NWZ]`}Ҋ6SVXZ]zҋۋ #.7@suwy{}čǍʍ͍ЍӍ֍ٍ܍ߍ !#%'*,/147:=@CFILORUX[^adgjmprtvy{~ÎŎǎɎˎ͎ώюӎՎ؎ێݎߎ󐶐ÐŐǐɐː͐ϐѐӐՐאِېݐߐ  #&),/258;>ADGJMOQSUWY[]`cfikmpsvy|đǑʑ͑Бӑّܑ֑ߑ !$'),/13579;=?ACEGIKMOQSUWZ]`cfilorux{~Òƒɒ̒ϒҒՒؒےޒєԔהٔܔߔ !$'*-0369ADGJMPSVY\_behknqtwz}–ŖȖ˖ΖіԖזږݖ "%(+.147:=@CFILORUX[^adgjmpsuwy{}×ŗǗɗ˗͗ϗїӗ՗חٗۗݗߗ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ØŘǘɘ˘͘ϘјӘ՘ט٘ۘݘߘ $%'014=LQxorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/Localizable.strings0000644000175000017500000001103214757411105023551 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Sei sicuro di voler uscire da X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Tutte le applicazioni X11 verranno chiuse immediatamente e perderai tutte le modifiche non salvate."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Vuoi entrare in modalit RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Un'applicazione ha richiesto a X11 di cambiare la risoluzione del tuo monitor. X11 ripristiner lo stato precedente del monitor quando l'applicazione che ha avanzato la richiesta di modifica richieda il ritorno allo stato precedente. Altrimenti, puoi utilizzare la sequenza di tasti #%#A per forzare X11 a ripristinare lo stato precedente."; /* No comment provided by engineer. */ "Allow" = "Consenti"; /* No comment provided by engineer. */ "Always Allow" = "Consenti sempre"; /* No comment provided by engineer. */ "Cancel" = "Annulla"; /* No comment provided by engineer. */ "Mac Help" = "Aiuto Mac"; /* No comment provided by engineer. */ "Quit" = "Esci"; /* No */ "No" = "No"; /* Yes */ "Yes" = "S"; /* Terminal */ "Terminal" = "Terminale"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Hai un documento ~/.xinitrc.\n\nLe finestre mostrate dalle applicazioni di X11 potrebbero non avere la barra del titolo o potrebbero apparire diverse dalle finestre mostrate dalle applicazioni native.\n\nLa prossima volta che avvii X11, desideri ignorare tale documento e utilizzare l'ambiente standard di X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Cerca aggiornamenti per X11..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist0000644000175000017500000000061014757411105023155 LprojCompatibleVersion 106.3 LprojLocale it LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/0000755000175000017500000000000014757411135020150 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/0000755000175000017500000000000014757411135021643 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib0000644000175000017500000020762714757411105024365 Option キーを押したままクリックするとマウスの中ボタン操作になり、Command キーを押したままクリックするとマウスの右ボタン操作になります。 xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects.nib0000644000175000017500000013166014757411105024734 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata7 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK`mnxy}sY '(-238=> CGHN^gh}~   !'6?@HIJP_`hijp!12CKLMSbcklms'()9ABST\]^fghx $34<=MNUVefno~     ) * 2 3 C D L M N O U ] m n v w          # $ ) * / 0 5 6 ; < @ A F G L M R d m n x y z           $ % * + 0 1 6 7 < = B C H I        - . / 2 C D E I T U Z \ _ ` a b c  u q      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysTR25546S&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,̀؀ڀ!(.4;āƁȁʁ́΁Ёҁԁց؁ہ݁߁   "$&(*,.0)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d00001)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h00000000P^submenuAction:$%*h000000001&')#   #!(i000000...+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5hX11 0k0d0D0f2XY287gtX-[...Q,22  2kkm2!<<;"d0000stu*>=?d00001x)__NSServicesMenu22  22CBm00000000R0f0H0Qa22  2UNSTag2G*FgX11 00YQh22GIe0{0K00Y22!Kf0Y0y0f0hy:22  22ONgX11 0}BNQq\_NSAppleMenu-!SSR"h00000000TU*h000000001؀VW)S  S!Xi000000...-![[Z"b}\]*b}1^)[`_c000Qc  -!ccb"e00000*edxe000001 !"filnoruv) ()chgc0X0Qw 12ckjc0W0~0FQm ;c!mebY'~.\ c   KLcqph000000]Va RUVctsl000000eT0k]Va c   hc!wi0Y0y0f0bKRM0kyR^_NSWindowsMenuqqs-!{{z"c000xy|}*c0001}~~)q{!gX11 000[_NSMainMenuTmenu V^apps_separator ˀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ʀR@#@ƀ#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviewsÁ= <> ;Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  @> ?Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnificationA2M#@#? EHGOA A AA#?:_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSTVWXYZ\]^\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@Y#@Eabcdefghijkl[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT RMopqrstuvwVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontz{|_NSFontDescriptorAttributes~1WNS.keys_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/YWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorY\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellabcde\]NSControlView_NSPlaceholderString0Af000000oprvw#@*PYB1_controlTextColor+,/+,]NSTableColumn/LMNOPQRSTXYZ\ #@Y#@Dabcdefghkld0000YM0.3333329856abcde\΀f000000LMNOPQRSTXYZ\  #@V@#@>abcdefghklg0000000[headerColorYB1C1 1abcde!\$_NSDrawsBackground Àf000000opr)*vw#@(/1Ā_controlBackgroundColor45YL0.602715373N0.6666666667 1:<ǀYgridColor?@YM0.4246723652E0.5 1+,DE[NSTableViewDF/YNSControlZapps_tableKL ̀׀OSUWXSVNSCell΀ πЀ `bc \_{{15, 245}, {508, 18}}iajklemcnbopqrsvKxYz{|_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ҁ̀рoxb0U00f0D0j0D000000vc0000[NSImageNameӀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonF/]click_through ^ـ^copy_menu_item ۀOȀ܀ ݀ހ br \e_{{75, 234}, {163, 26}}ojaieklpbnYzq _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionۀ@ @@ !߀oprvw WNSStateހ!*h0000000K0__popUpItemAction:ZOtherViews1)!e256 r!i} 32000 r!i} 1670 Nr+,_NSPopUpButtonCell/^NSMenuItemCell+,  ]NSPopUpButton F/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator$% O+U/0+Ȁ 8b; \_{{18, 243}, {482, 18}}iajklemcnbopqrsv$EYz{|!Ҁec}0<[enable_authMN OUXYȀ܀ _{{18, 182}, {505, 23}}iajklemcnbopqrsvMeYz{|!Ҁj0000000000_enable_fullscreenmn OUxyȀ܀  _{{37, 118}, {492, 23}}iajklemcnbopqrsvmYz{|!ҁo0000000000fB0n0000000x0n000001S_enable_fullscreen_menu  O_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ܀   #@}_{{54, 70}, {476, 42}}Z{250, 750}abcder  @o)00000000LN;0000000nNujN 0kn0K00_0h0M0k0000000Lhy:0U00~0Y0oprsvw 1\controlColor+,[NSTextFieldF/_enable_fullscreen_menu_text OUҀ  b "[\CCE_{{18, 130}, {505, 18}}O  FG #@~@5iajklemcnbopqrsvYz{|!ҁoX11 0nNf000g R0k0Y0_enable_keyequivs  O+U  +Ȁ  _{{18, 180}, {402, 18}}iajklemcnbopqrsvYz{|!ҁo00000000000000K00nc}01SZenable_tcp "'OU)*0 #% $_{{18, 243}, {505, 18}}O;<B  IK JiajklemcnbopqrsvHYz{|!ҁ"&o3 0000000000000\fake_buttonsPQ )-OSU[\SȀ΀ *+ _{{15, 184}, {508, 18}}iajklemcnbopqrsvPhYz{|!ҁ),o0000000000hN}0kyR_focus_follows_mousepq /3OSU{|SȀ΀ 01 _{{15, 140}, {508, 18}}iajklemcnbopqrsvpYz{|!ҁ/2me000000k00000_focus_on_new_window 5:OU 68 7_{{18, 69}, {505, 18}}O  TV UiajklemcnbopqrsvYz{|!ҁ59oOption 000g Alt_L 0h Alt_R 0O_option_sends_alt <Y\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask=>A @@x?!_'{{319, 328.03906000000001}, {584, 341}}iX11 0ntX-[WNSPanelZ{320, 240}b\ B1؁C) _NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels_^ ]AA D 1ǁ)10B"$MJ75U)_{{36, 96}, {488, 28}}abcder\$Ho;g R0k0Y00h00000000nNf000k00c0f X11 000000000n00O000Ou(0g0M0j0O0j0X4T0L0B00~0Y0_{{36, 209}, {488, 28}}OU12 QR Mabcder0\>$LoLOption 000b0W0_0~0~00000Y00h0000nN-000dO\0k0j00Command 000b0W0_0~0~00000Y00h0000nS000dO\0k0j00~0Y0 OKL  NO _{{36, 156}, {488, 17}}abcder\YMPo'QeR00000Y f0W0fsW(0n X11 000000N f0M0Y00S0h01S0W0~0Y0_{{18, 179}, {505, 18}}iajklemcnbopqrsvBcYz{|!ҁJSo00000n00000000000k_0F_{{36, 32}, {488, 31}}OUpq؀ XY Cabcder}7WoHg R0k0Y00h0option 00 0g Mode_switch 0nN000k X11 0000000n Alt_L 0h Alt_R 0LO0U00~0Y0 _{{18, 8}, {505, 18}}iajklemcnbopqrsvYz{|!ҁUZo^80kc0R0K0W0_eT0k00000_{{10, 33}, {538, 279}}+,/_{{13, 10}, {558, 325}}1_ct)VNSViewYNSTabView\NSIdentifierbaC`Q1bQeR+,]NSTabViewItem/b܁sCdQ21Mmہfjn )Oǁ ܀ gh #@J_{{17, 238}, {56, 19}}abcder\fid000O ܀ kl _{{36, 216}, {488, 14}}abcder\jmo 0S0n000000o0k!V X11 0wR0W0_0h0M0kg R0k0j00~0Y0O ܀ op #@~_{{36, 147}, {494, 28}}abcder\nqoTX11 0n000000000g R0k0W0~0Y000000000000kR0f0H0_0000000000000}BN0Y00h0M0o00000 + Option + A 000b0W0~0Y0_{{10, 33}, {538, 279}}bQR  buCdb \v1 !"w{)O U,- Ȁu xy u_{{18, 255}, {505, 23}}iajklemcnbopqrsv9Yz{|!ҁwzhT g0g R0k0Y0O FG  u |} u_{{36, 221}, {488, 28}}abcderS{~oQ 000 0000v0g R0k0W0f0OSX 0n00000000h X11 0n CLIPBOARD 00000J00s PRIMARY 00000T g0g0M000F0k0W0~0Y0O U^_ Ȁu  u_{{34, 129}, {489, 18}}iajklemcnbopqrsvkYz{|!ҁo"00000000LY f0U00_0h0M0k CLIPBOARD 0000000O Uwx Ȁu  u_{{34, 104}, {489, 18}}iajklemcnbopqrsvYz{|!ҁo'00000000LY f0U00_0h0M0k PRIMARY N-0000 0000000O U Ȁu  u_{{34, 79}, {489, 18}}iajklemcnbopqrsvYz{|!ҁo e0W0D00000Lxb0U00_000Y0P0k00000000000000O U Ȁu  u_{{34, 192}, {489, 18}}iajklemcnbopqrsv Yz{|!ҁo!CLIPBOARD 0LY f0U00_0h0M0k00000000000000O   u  u_{{48, 158}, {476, 28}}abcder!oDxclipboard0klipper00]0nN0n X11 0000000000000Ou(0W0_0DX4T0o00S0n000000q!R0k0W0f0O0`0U0D0O   u  u_{{48, 47}, {476, 28}}abcder"o2X11 000000nR6P0k0000S0n000000o0N0n000000000gj_0W0j0DX4T0L0B00~0Y0_{{10, 33}, {538, 279}}g0000000Sb΁Cd1KPṕ)/)OS  S  ΀  #@_{{23, 211}, {501, 28}}abcder\ oKg R0k0W0_X4T0xb0U00f0D0j0D00000000000W0_0h0M0k00]0n000000NujbKRM0khy:0Y00`0Q0g0j0O000000Q0nv0vc00000W0~0Y0OS " #S  ΀  _{{23, 164}, {501, 14}}abcder\ /o,X11 000000n000000L00000hN}0kyR0W0~0Y0Rg0k0j0X4T00B00~0Y0OS < =S  ΀  _{{23, 106}, {501, 28}}abcder\ IoMg R0k0W0_X4T0e0W0D X11 000000O\b0Y00h0Finder.app 0 00000.app 0j0i0nN000k0X11.app 0LRMb0kyR0W0~0Y0_{{10, 33}, {538, 279}}e00000+ RbC1 V$ Y Z [)O+ f g+   _{{36, 209}, {488, 28}}abcder Y\ sobX11 0nwRfB0k0Xauthority 0000R6_000O\b0W0~0Y000000n IP 00000LY f0U000h00S000n000Lq!R0k0j00X11 000000000LwR0W0j0O0j00S0h0L0B00~0Y0O+  +   _{{36, 132}, {488, 42}}abcder Z\ oOg R0k0Y0X4T0o000000n0000000}c0Y00_00k0 c}0< 0g R0k0W0f0O0`0U0D0q!R0k0Y00h00000000000000K00nc}0obT&0U00~0Y0O+  +    #@y_{{17, 17}, {404, 14}}abcder [\ o"0S000n000000o0k!V X11 0wR0W0_0h0M0kg R0k0j00~0Y0_{{10, 33}, {538, 279}}f000000+, YNSTabView /Z{584, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel UÀ_scroll_in_device_direction ŀ_sync_clipboard_to_pasteboardB Jǀ[sync_keymap wɀ_sync_pasteboard ˀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary π_sync_primary_immediately! рZsync_text1" ӀZsync_text2D AՀ_toggle_fullscreen_item?  4׀^x11_about_item" v ف_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  i ܁_minimize_window:?  4ށ_orderFrontStandardAboutPanel:@ ! 6 [prefs_show:F ' EUhide:J - MZterminate:G 3 H_hideOtherApplications:H 9 J_unhideAllApplications: > ^Ucopy: D f ]close_window: J l \zoom_window: N P  O S T/U  \ ]/_NSHuggingPriority    b h l\ 9N_{{340, 191}, {105, 32}}iajklecnbopqr o r N t u{z@ !Հb_apps_table_duplicate: { }  O S T/U   /   _{{340, 159}, {105, 32}}iajklecnbopqr o r { u{zĀ!ՀbRJd_apps_table_delete: W _apps_table_show:  O S T/U   /   _{{340, 223}, {105, 32}}iajklecnbopq o r u{z!Հev0R_apps_table_new: " ^prefs_changed:  ^prefs_changed:B J  ^prefs_changed:$  ^prefs_changed:   ^prefs_changed: ۀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:M _enable_fullscreen_changed:D  A _toggle_fullscreen:K ̀ ^prefs_changed:P  ) ^prefs_changed:p  / !^prefs_changed:  w #^prefs_changed: "  %^prefs_changed: (  '^prefs_changed: .  )^prefs_changed: 4  +^prefs_changed:m :  -^prefs_changed: @ 5 /^prefs_changed: F U 1^prefs_changed:1 J  K'2?@ABkCDEFGHIJ()*  !"+q~*0<LB2qMYmy -G_x !"SKX P\ #p| =+$0 Y g Z [ / N ] { GVHI-7 3-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ <AC_"%G$KMOJR7V58UYc܀ۀހfhjlnp  tuwy{}΀̀Ё)+/15AE#&'L& (4]NSApplication /    67PQ O8?! _{{360, 402}, {454, 271}}oX11 000000000000Z{454, 271}1 N { )1 -7AE)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $  $ & ) )_NSControlTarget_NSControlActionD BCC_{{1, 215}, {301, 15}}\_doScroller:+, 0 1ZNSScroller 0F/   $ < ) )D FCC_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 F GIL J K L M N O P   S_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionKJ__panWithGestureRecognizer:+, V W_NSPanGestureRecognizer X Y/_NSPanGestureRecognizer_NSGestureRecognizer+, [/+, ] ^\NSScrollView ]/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{454, 299}Xx11_apps1 d '2222B22222222()*        +q0BMm        ! "SKSSPSSpS+$++ Y+ Z+ [ / N/ {/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{<AC_"$MJ75UCc܀ۀހ܁f܁j܀܁܁n܁ Ctuwu{uuuuuuC΀̀΁΁)΁΁/΁C5񀍀##L1  K'2?@ABkCDEFGHIJ()*  !"+q~*0<LB2qMYmy -G_x !"SKX P\ #p| =+$0 Y g Z [ / N ] { GVHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ <AC_"%G$KMOJR7V58UYc܀ۀހfhjlnp  tuwy{}΀̀Ё)+/15AE#&' ,̀؀ڀ!(.4;āƁȁʁ́΁Ёҁԁց؁ہ݁߁   "$&(*,.0L1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0123L     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 㠁L+,^NSIBObjectData/",1:?QZw.5CPbp,5@IX]foz{} : < > @ B D F H J L N P R T W Z ] ` c f i l o r u x { ~    " 0 8 ` b d f h j s u w      ! # % ' P ^ e y   - ; = ? A C E G O a n y      $ / 4 a j t }  @BDFHJL_hw~  9;=?ACEGIKO`bdfhq  EGIJLNOQS   35:<>@BD_a   ?ACEGIKX   *79;=NW\^`b  *,.05>ACEfhjlnpry{   68:<>@BIKlnprtvx.1RTY[]_ac|2468:<>@BDKXZ\^enqsu   '4ITp )5No5ANZd   !#$%',.7@BDMNPQ  !"%')4eq18Dmoqrtvxz|&;G^k}     " $ & S ` k x !!!&!1!=!J!O!Q!S!U!W!Y!\!a!v!}!!!!!!!!!!!!!"" """""" """$"&"<"W"w"""""""""""## ##&#(#1#9#>#S#_#m#u#w#y#{#}##############$$$$555555556666E6S6i6n6p6r6t6v6x6z6|66666666666666666677 777K7L7N7P7R7S7U7^7g7i77777777777777777778+8,8.808283858>8G8I8j8l8n8p8r8t88888888888889 999999999)9:9C9F9H9J9_9a9c9e9g99999999999999::: :::):3:>:S:U:W:Y:[:]:::::::::::::::::;;;;; ; ;;;);h;};;;;;;;;<<<< < < <<<<<8>J>X>m>>>>>>>>>>>>>>>>>>>>??????!?#?%?'?)?6?8?:?C?C@CYCCCCCCCCCCCCCCCCDLDNDODPDRDTDVDWDZD]D_D`DbDcDdD}DDDDDDDDEEE3E5E7E:E=E?EEEFF F F F FFFFFFFFF F!F"F+FCFNFsFvFxF{F~FFFFFFFFG G GGGG G)G5G@G^GsGuGwGzG}GGGGGGGGGGGGGGGGGH,H-H0H3H6H9HHAHCHEH^HHHHHHHHHHHHHHHHHHI2I4I6I8I;I>I@IBIcIvIIIIIIIIIIIIIIJJJJJJ J J#JbJdJfJhJkJnJpJrJJJJJJJJK*K,K-K.K1K3K5K6K9KK?KBKCKDKGK`KKKKKKKKKKKKKKKKKL+L-L/L1L4L7L9L;L^LkLLLLLLLLLLLLLLLLLLLLLMMWMYM[M]M`McMeMgMMMMMMMMNNNNN N"N$N%N(N+N-N.N0N1N2NKNNNNNNNNNNNNNNNNOKOMONOOOROTOVOWOZO]O_O`OcOdOeOhOOOOOOOOOOOPPPPPP P PKPMPOPQPTPWPYP[PPPPPPPPQQ&QFQTQ^QkQuQQQQQRRRR,R8RKR_RbRdRgRjRmRpRsRtRwRzR}RRRRRRRRRRSS S SSSSSSS#S&S)S+SvSSSSSSSSSSSSSSSSSSSSSSSST TTTTTTT"T%T(T*TBTkTnTpTsTuTxT{T}TUUnUpUqUrUuUwUyUzU}UUUUUUUUUUUUUUUVaVVVVVVVVVVVVVVVVVWW/W2W4W7W9W_@_B_K_\___b_e_h_k_n_q_t_v_______________``C`E`G`I`L`O`Q`S`d````````````````aa'a*a,a/a2a5a7ab7b9b:b;b>b@bBbCbFbIbKbLbObPbQbjbbbbbbbbcc[c]c^c_cbcdcfcgcjcmcocpcsctcucccccccccd.dddddddddddddddddddeeeee eMeeeeeeeeeeeeeeeeffff f#f&f(f*foffffffffffffffffg g2g5g7g:g=g@gBgh4h7h9h:h;h>h@hChDhGhJhLhMhPhQhRhjhhhhhhhiii.iGiJiMiOiRiUiXiainipisiviyi|iiiiiiiiiiiiiijjjjj j&jOjRjTjWjYj\j_jajkakdkfkgkhkjklkokpkskvkxkyk{k|k}kkkkkkkkkl,lllllllllllllllllllllllmmmmmmmmmmmmmmnnnn n nrnunwnxnyn{n}nnnnnnnnnnnnnnnnnnopppppppppp"p%p'p(p*p+p,pEpnpqpspvpxp{p~pq!qqqqqqqqqqqqqqqqqqqqqqqqqrrGr`rmrvrrrrrrrrrss ss.s0s2s5s8s:sWslsnspsssvsxssssssssssssssst tttttt7tLtNtPtStVtXtuttttttttttttttttttttu uu u"u$u'u)uBuWuYu[u]u`ubuquuuuuuuuuuuuuuuvvvvvvv>vOvQvSvVvYvevvvxvzv}vvvvvvvvvvvvvvvvvvvww!w#w&w)w/w@wBwDwGwJwXwiwkwmwpwswwwwwwwxxxxxxxxxx!x$x&x'x*x+x,x/xXxZx]x^xaxcxexgxjxxxxxxxxxxxxxy y yyyysyuyvywyzy|y~yyyyyyyyyyyyyyyyyyz zzz z#z&z9zJzMzOzRzUzzzzzzzzzzzzzzzzz{${-{/{1{4{7{9{;{F{X{i{l{n{q{t{{{{{{{{{{{{{{{{{{|||||||.|?|A|C|F|I|X|i|k|m|p|s|}|||||||||||||||||}}}}}}}9}J}L}N}Q}T}i}z}|}~}}}}}}}}}}}}}}}}}}~~~~%~(~*~-~0~?~P~S~U~X~[~j~{~~~~~~~~~~~~~~~~~~~~'*,/2AJ}€ĀƀȀʀ̀ЀӀրـ܀߀  "%(+.0258;>ADGJMPSVY\_behknqtwz}Łȁˁ΁сԁց؁ځ܁ށ nqsvy|ق  #%.135Leny!35789;=?BCFHJMNORjw 1JSVY\y΅2ORTVYvΆ׆܆*3ADGJMPSVY\_behknqtwz}‘őȑˑΑёԑבڑݑ "%(+.147:=@CFILORUX[^adgjmprtvxz|~’ĒƒȒʒ̒ΒВҒԒ֒ؒڒܒޒ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~“ēƓȓʓ̓ΓГғԓ֓ؓړܓޓ !"$-.1:INxorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013162714757411105025456 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata7 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI^klvw{qW %&+016;< AEFL]fg|}   &5>?GHIO^_ghio~ 01BJKLRabjklr &'(8@ARS[\]efgw~#23;<LMTUdemn}~     ( ) 1 2 B C K L M N T \ l m u v        " # ( ) . / 4 5 : ; ? @ E F K L Q c l m w x y ~         # $ ) * / 0 5 6 ; < A B G H        , - . 1 B C D H S T Y [ ^ _ ` a b S t p      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysTR25546S&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,̀؀ڀ!(.4;āƁȁʁ́΁Ёҁԁց؁ہ݁߁   "$&(*,.0)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d00001)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h00000000P^submenuAction:$%*h000000001&')#   #!(i000000...+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5hX11 0k0d0D0f2XY287gtX-[...Q,22  2kkm2!<<;"d0000stu*>=?d00001x)__NSServicesMenu22  22CBm00000000R0f0H0Qa22  2UNSTag2G*FgX11 00YQh22GIe0{0K00Y22!Kf0Y0y0f0hy:22  22ONgX11 0}BNQq\_NSAppleMenu-!SSR"h00000000TU*h000000001؀VW)S  S!Xi000000...-![[Z"b}\]*b}1^)[`_c000Qc  -!ccb"e00000*edxe000001 !"filnoruv) ()chgc0X0Qw 12ckjc0W0~0FQm ;c!mebY'~.\ c   KLcqph000000]Va RUVctsl000000eT0k]Va c   hc!wi0Y0y0f0bKRM0kyR^_NSWindowsMenuqqs-!{{z"c000xy|}*c0001}~~)q{!gX11 000[_NSMainMenuTmenu V^apps_separator ˀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ʀR #@ƀ#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviewsÁ= <> ;Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  @> ?Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnificationA2M#@#? EHGOA A AA#?:_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQRTUVWXZ[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@V#@E_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT RMmnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/WWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorW\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abcZ]NSControlView_NSPlaceholderString0Af000000mnptu#@*PWB1_controlTextColor+,ޤ/+,]NSTableColumn/JKLMNOPQRVWXZ #@U#@D_`abcdefijd0000WM0.3333329856_`abcZ̀f000000JKLMNOPQRVWXZ #@S #@>_`abcdef  ijg0000000[headerColorWB1C1 1_`abcZ"_NSDrawsBackground Àf000000mnp'(tu#@(-/Ā_controlBackgroundColor23WL0.602715373N0.6666666667 18:ǀYgridColor=>WM0.4246723652E0.5 1+,BC[NSTableViewBD/YNSControlZapps_tableIJ ̀׀MQSTVWQVNSCell΀ πЀ _ab \_{{15, 245}, {508, 18}}h_ijkclam`nopqruIwWyz{_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ҁ̀рoxb0U00f0D0j0D000000vc0000~[NSImageNameӀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonD/]click_through ^ـ^copy_menu_item ۀMSǀ܀ ݀ހ ar \e_{{75, 234}, {163, 26}}ni_hcjko`mWyp _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionۀ@ @@ !߀mnptu WNSStateހ!*h0000000K0__popUpItemAction:ZOtherViews1)!e256 r!i} 32000 r!i} 1670 Nr+,_NSPopUpButtonCell/^NSMenuItemCell+, ]NSPopUpButtonD/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator#$ M*ST./*ǀ 7a: \_{{18, 243}, {482, 18}}h_ijkclam`nopqru#DWyz{!Ҁec}0<[enable_authLM MSTWXǀ܀ _{{18, 182}, {505, 23}}h_ijkclam`nopqruLdWyz{!Ҁj0000000000_enable_fullscreenlm MSTwxǀ܀  _{{37, 118}, {492, 23}}h_ijkclam`nopqrulWyz{!ҁo0000000000fB0n0000000x0n000001S_enable_fullscreen_menu  MS_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ܀   #@}_{{54, 70}, {476, 42}}Z{250, 750}_`abcq  @o)00000000LN;0000000nNujN 0kn0K00_0h0M0k0000000Lhy:0U00~0Y0mnpqtu /\controlColor+,[NSTextFieldD/_enable_fullscreen_menu_text MSTр  a "[\CCE_{{18, 130}, {505, 18}}MS  FG #@~@5h_ijkclam`nopqruWyz{!ҁoX11 0nNf000g R0k0Y0_enable_keyequivs  M*ST *ǀ  _{{18, 180}, {402, 18}}h_ijkclam`nopqruWyz{!ҁo00000000000000K00nc}01SZenable_tcp "'MST()/ #% $_{{18, 243}, {505, 18}}MS:;A  IK Jh_ijkclam`nopqruGWyz{!ҁ"&o3 0000000000000\fake_buttonsOP )-MQSTZ[Qǀ΀ *+ _{{15, 184}, {508, 18}}h_ijkclam`nopqruOgWyz{!ҁ),o0000000000hN}0kyR_focus_follows_mouseop /3MQSTz{Qǀ΀ 01 _{{15, 140}, {508, 18}}h_ijkclam`nopqruoWyz{!ҁ/2me000000k00000_focus_on_new_window 5:MST 68 7_{{18, 69}, {505, 18}}MS  TV Uh_ijkclam`nopqruWyz{!ҁ59oOption 000g Alt_L 0h Alt_R 0O_option_sends_alt <W\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask=>A @@x?!_'{{319, 328.03906000000001}, {584, 341}}iX11 0ntX-[WNSPanelZ{320, 240}a\ B1ׁC) _NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels_^ ]AA D 1Ɓ)1/A"$MJ75U)_{{36, 96}, {488, 28}}_`abcqZ#Ho;g R0k0Y00h00000000nNf000k00c0f X11 000000000n00O000Ou(0g0M0j0O0j0X4T0L0B00~0Y0_{{36, 209}, {488, 28}}MST01 QR M_`abcq/Z=$LoLOption 000b0W0_0~0~00000Y00h0000nN-000dO\0k0j00Command 000b0W0_0~0~00000Y00h0000nS000dO\0k0j00~0Y0 MSJK  NO _{{36, 156}, {488, 17}}_`abcqZXMPo'QeR00000Y f0W0fsW(0n X11 000000N f0M0Y00S0h01S0W0~0Y0_{{18, 179}, {505, 18}}h_ijkclam`nopqruAbWyz{!ҁJSo00000n00000000000k_0F_{{36, 32}, {488, 31}}MSTop׀ XY C_`abcq|7WoHg R0k0Y00h0option 00 0g Mode_switch 0nN000k X11 0000000n Alt_L 0h Alt_R 0LO0U00~0Y0 _{{18, 8}, {505, 18}}h_ijkclam`nopqruWyz{!ҁUZo^80kc0R0K0W0_eT0k00000_{{10, 33}, {538, 279}}+,/_{{13, 10}, {558, 325}}1_ct)VNSViewYNSTabView\NSIdentifierbaC`Q1bQeR+,]NSTabViewItem/b܁sCdQ21Llہfjn )MSƁ ܀ gh #@J_{{17, 238}, {56, 19}}_`abcqZfid000MS ܀ kl _{{36, 216}, {488, 14}}_`abcqZjmo 0S0n000000o0k!V X11 0wR0W0_0h0M0kg R0k0j00~0Y0MS ܀ op #@~_{{36, 147}, {494, 28}}_`abcqZnqoTX11 0n000000000g R0k0W0~0Y000000000000kR0f0H0_0000000000000}BN0Y00h0M0o00000 + Option + A 000b0W0~0Y0_{{10, 33}, {538, 279}}bQR  buCda \v1 !w{)M ST+, ǀu xy u_{{18, 255}, {505, 23}}h_ijkclam`nopqru8Wyz{!ҁwzhT g0g R0k0Y0M SEF  u |} u_{{36, 221}, {488, 28}}_`abcqR{~oQ 000 0000v0g R0k0W0f0OSX 0n00000000h X11 0n CLIPBOARD 00000J00s PRIMARY 00000T g0g0M000F0k0W0~0Y0M ST]^ ǀu  u_{{34, 129}, {489, 18}}h_ijkclam`nopqrujWyz{!ҁo"00000000LY f0U00_0h0M0k CLIPBOARD 0000000M STvw ǀu  u_{{34, 104}, {489, 18}}h_ijkclam`nopqruWyz{!ҁo'00000000LY f0U00_0h0M0k PRIMARY N-0000 0000000M ST ǀu  u_{{34, 79}, {489, 18}}h_ijkclam`nopqruWyz{!ҁo e0W0D00000Lxb0U00_000Y0P0k00000000000000M ST ǀu  u_{{34, 192}, {489, 18}}h_ijkclam`nopqruWyz{!ҁo!CLIPBOARD 0LY f0U00_0h0M0k00000000000000M S  u  u_{{48, 158}, {476, 28}}_`abcq oDxclipboard0klipper00]0nN0n X11 0000000000000Ou(0W0_0DX4T0o00S0n000000q!R0k0W0f0O0`0U0D0M S  u  u_{{48, 47}, {476, 28}}_`abcq!o2X11 000000nR6P0k0000S0n000000o0N0n000000000gj_0W0j0DX4T0L0B00~0Y0_{{10, 33}, {538, 279}}g0000000Qb΁Cd1IOó)/)MQS  Q  ΀  #@_{{23, 211}, {501, 28}}_`abcqZ oKg R0k0W0_X4T0xb0U00f0D0j0D00000000000W0_0h0M0k00]0n000000NujbKRM0khy:0Y00`0Q0g0j0O000000Q0nv0vc00000W0~0Y0MQS ! "Q  ΀  _{{23, 164}, {501, 14}}_`abcqZ .o,X11 000000n000000L00000hN}0kyR0W0~0Y0Rg0k0j0X4T00B00~0Y0MQS ; <Q  ΀  _{{23, 106}, {501, 28}}_`abcqZ HoMg R0k0W0_X4T0e0W0D X11 000000O\b0Y00h0Finder.app 0 00000.app 0j0i0nN000k0X11.app 0LRMb0kyR0W0~0Y0_{{10, 33}, {538, 279}}e00000* QbC1 U# X Y Z)M*S e f*   _{{36, 209}, {488, 28}}_`abcq XZ robX11 0nwRfB0k0Xauthority 0000R6_000O\b0W0~0Y000000n IP 00000LY f0U000h00S000n000Lq!R0k0j00X11 000000000LwR0W0j0O0j00S0h0L0B00~0Y0M*S  *   _{{36, 132}, {488, 42}}_`abcq YZ oOg R0k0Y0X4T0o000000n0000000}c0Y00_00k0 c}0< 0g R0k0W0f0O0`0U0D0q!R0k0Y00h00000000000000K00nc}0obT&0U00~0Y0M*S  *    #@y_{{17, 17}, {404, 14}}_`abcq ZZ o"0S000n000000o0k!V X11 0wR0W0_0h0M0kg R0k0j00~0Y0_{{10, 33}, {538, 279}}f000000+, YNSTabView /Z{584, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel UÀ_scroll_in_device_direction ŀ_sync_clipboard_to_pasteboardA Jǀ[sync_keymap wɀ_sync_pasteboard ˀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary π_sync_primary_immediately рZsync_text1! ӀZsync_text2D AՀ_toggle_fullscreen_item?  4׀^x11_about_item" v ف_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  i ܁_minimize_window:?  4ށ_orderFrontStandardAboutPanel:@ 6 [prefs_show:F & EUhide:J , MZterminate:G 2 H_hideOtherApplications:H 8 J_unhideAllApplications: = ^Ucopy: C f ]close_window: I l \zoom_window: M O  M R S-ST  [ \-_NSHuggingPriority    a g k\ 9N_{{340, 191}, {105, 32}}h_ijkcam`nopq n q M s tzy@ !Հb_apps_table_duplicate: z |  M R S-ST   -   _{{340, 159}, {105, 32}}h_ijkcam`nopq n q z tzyÀ!ՀbRJd_apps_table_delete: W _apps_table_show:  M R S-ST   -   _{{340, 223}, {105, 32}}h_ijkcam`nop n q tzy!Հev0R_apps_table_new: " ^prefs_changed:  ^prefs_changed:A J  ^prefs_changed:#  ^prefs_changed:   ^prefs_changed: ۀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:L _enable_fullscreen_changed:D  A _toggle_fullscreen:I ̀ ^prefs_changed:O  ) ^prefs_changed:o  / !^prefs_changed:  w #^prefs_changed: !  %^prefs_changed: '  '^prefs_changed: -  )^prefs_changed: 3  +^prefs_changed:l 9  -^prefs_changed: ? 5 /^prefs_changed: E U 1^prefs_changed:1 I  J'2?@ABkCDEFGHIJ()*  !"+q~)/;KA1pLXlx ,F^w !QIW O[ "o{ <*#/ X f Y Z - M \ z ETFG+5 3-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ <AC_"%G$KMOJR7V58UYc܀ۀހfhjlnp  tuwy{}΀̀Ё)+/15AE#&'L& (4]NSApplication -    67PQ O8?! _{{360, 402}, {454, 271}}oX11 000000000000Z{454, 271}1 M z )1 +5AE)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " S # % ( (_NSControlTarget_NSControlActionD BCC_{{1, 215}, {301, 15}}\_doScroller:+, / 0ZNSScroller /D/  S # ; ( (D FCC_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 E FIL I J K L M N O   R_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionKJ__panWithGestureRecognizer:+, U V_NSPanGestureRecognizer W X/_NSPanGestureRecognizer_NSGestureRecognizer+, Z/+, \ ]\NSScrollView \/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{454, 299}Xx11_apps1 c '2222B22222222()*        +q/ALl         !QIQQOQQoQ*#** X* Y* Z - M- z-EFG- -02222:22222222-QSS-Y[-acccccccc-y{<AC_"$MJ75UCc܀ۀހ܁f܁j܀܁܁n܁ Ctuwu{uuuuuuC΀̀΁΁)΁΁/΁C5񀍀##L1  J'2?@ABkCDEFGHIJ()*  !"+q~)/;KA1pLXlx ,F^w !QIW O[ "o{ <*#/ X f Y Z - M \ z ETFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~3-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ <AC_"%G$KMOJR7V58UYc܀ۀހfhjlnp  tuwy{}΀̀Ё)+/15AE#&' ,̀؀ڀ!(.4;āƁȁʁ́΁Ёҁԁց؁ہ݁߁   "$&(*,.0L1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~UVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0123L     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ⠁L+,^NSIBObjectData/",1:?QZw.5CPbp,5@IX]foz{} : < > @ B D F H J L N P R T W Z ] ` c f i l o r u x { ~    " 0 8 ` b d f h j s u w      ! # % ' P ^ e y   - ; = ? A C E G O a n y      $ / 4 a j t }  @BDFHJL_hw~  9;=?ACEGIKO`bdfhq  EGIJLNOQS   35:<>@BD_a   ?ACEGIKX   *79;=NW\^`b  *,.05>ACEfhjlnpry{   68:<>@BIKlnprtvx.1RTY[]_ac|2468:<>@BDKXZ\^enqsu   #0EPl%1Jk1=JV`    )+-678  LXpqsuwxz|~+TVXY[]_ac ".ERdfiknpux   : G R _ j y !! !!$!1!6!8!:!!@!C!H!]!d!m!!!!!!!!!!!!!!!!!!""" " " "#">"^"y"""""""""""""# ### #%#:#F#T#\#^#`#b#d#f#m################555555555566,6:6P6U6W6Y6[6]6_6a6c6f6s6666666666666666667772737577797:7<7E7N7P7q7s7u7w7y7{777777777777788888888%8.808Q8S8U8W8Y8[8j88888888888888888889999!9*9-9/919F9H9J9L9N9g9|9999999999999999::::%:::<:>:@:B:D::::::::::::::::::::::::::;;Q;f;t;;;;;;;;;;;;;;;;;<<,<5!>3>A>V>s>~>>>>>>>>>>>>>>>>>>>????? ? ?????!?#?%?6?J?U?^?g?i?k?m?o?q?????????????????????@ @:@<@>@@@B@D@F@H@J@L@_@h@|@@@@@@@@@@@@@AAA A A AAA.A0A2A4A6A8APAeAgAiAkAmAoAAAAAAAAAAAAAAAB B BBBBBBBB4BsBuBwByB{B}BBBBBBBBBBCCCCCCCCC C"C$C%C'C(C)CBCCCCCCCCCCCCCCCCD5D7D8D9D;D=D?D@DCDFDHDIDKDLDMDfDDDDDDDDDEEEE E#E&E(EEEEEEEEEEEEFFFFF F F FF,F7F\F_FaFdFgFjFlFqFFFFFFFFFFG GGG)GGG\G^G`GcGfGhGGGGGGGGGGGGGGGGHHHHHH"H%H'H*H,H.HGHHHHHHHHHHHHHHHHHHIIII!I$I'I)I+ILI_ItIvIxI{I~IIIIIIIIIIIIIIIIJ JKJMJOJQJTJWJYJ[JJJJJJJJKKKKKKKKK"K%K'K(K+K,K-K0KIKKKKKKKKKKKKKKKKKLLLLLL L"L$LGLTLiLkLmLpLsLuLLLLLLLLLLLLLLLMM@MBMDMFMIMLMNMPMqMMMMMMMNNNNN N N NNNNNNNNN4NsNuNwNyN|NNNNNNNNNNNO4O6O7O8O;O=O?O@OCOFOHOIOLOMONOQOiOOOOOOOOOOOOOOOOOP4P6P8P:P=P@PBPDPPPPPPPPQQQ/Q=QGQTQ^QtQQQQQQRRR!R4RHRKRMRPRSRVRYR\R]R`RcRfRiRlRqRtRvRxRRRRRRRRRRRSSS SSSS_SwSSSSSSSSSSSSSSSSSSSSSSSSSSSTTTT TTTT+TTTWTYT\T^TaTdTfTTUWUYUZU[U^U`UbUcUfUiUkUlUoUpUqUtUUUUUUUUVJVVVVVVVVVVVVVVVVVVWWWW W"W%W(W*W{WWWWWWWWWX X"XXXXXXXXXXXXXXXXXXXXXXXYfY}YYYYYYYYYZZZZ1Z:ZEZHZKZNZQZTZVZoZvZZZZZZZZZZZZZZZZZZZZZZ[[[ [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[\\i\l\n\o\p\r\t\w\x\{\~\\\\\\\\\\\\\\]]]]]]]]]]]]]]]]]]]]]]]]]]]^^^^^^^^^^_____"_%_'_)_+_4_E_H_K_N_Q_T_W_Z_]__________________`,`.`0`2`5`8`:`<`M`````````````````aaaaaaa ab b"b#b$b'b)b+b,b/b2b4b5b8b9b:bSbbbbbbbbbcDcFcGcHcKcMcOcPcScVcXcYc\c]c^cwccccccccddrdtdudvdyd{d}d~dddddddddddddddde6eeeeeeeeeeeeeeeeffff f ffffXfffffffffffffffffggg g#g&g)g+ghh h"h#h$h'h)h,h-h0h3h5h6h9h:h;hShxh{h}hhhhhiii0i3i6i8i;i>iAiJiWiYi\i_ibieihijiiiiiiiiiiiiiiiiijj8j;j=j@jBjEjHjJjkJkMkOkPkQkSkUkXkYk\k_kakbkdkekfkkkkkkkkkll|llllllllllllllllllllllllmmmmmmmmmmmmmmmmmn[n^n`nanbndnfninjnmnpnrnsnunvnwnnnnnnnnnooooopppppp ppppppp.pWpZp\p_papdpgpiq qqqtqvqwqxqzq|qqqqqqqqqqqqqqqqqqqr0rIrVr_rirrr}rrrrrrrrssssss!s#s@sUsWsYs\s_sasssssssssssssssssssstt t5t7t9tzzzzzzzzzzzzzzzzz{ {{{{{ {"{${/{A{R{U{W{Z{]{l{}{{{{{{{{{{{{{{{{{{||||||(|*|,|/|2|A|R|T|V|Y|\|f|w|y|{|~|||||||||||||||||}}}"}3}5}7}:}=}R}c}e}g}j}m}|}}}}}}}}}}}}}}}}}}~~~~~~(~9~<~>~A~D~S~d~g~i~l~o~~~~~~~~~~~~~~~~~~~~*3fikmoqsuwy{}€ŀȀˀ΀рԀ׀ڀ݀ !$'*-0369@BEHKNPRUX[^adgjmpsvy|ČƌȌʌ͌Ќӌ֌ٌ܌ߌ  "$&(*,.02468:=@CFILORUX[^adgjmpsvy|čǍʍ͍ЍӍ֍ٍ܍ߍ􏷏ŏȏˏΏяԏ׏ڏݏ "%(+.147:=@CFILORUX[^adgjmpsvy|Đǐʐ͐АӐ֐ِܐߐ !$'*-0369ADGJMPSVY[]_acegikmoqsuwy{}ÒŒǒɒ˒͒ϒђӒՒגْےݒߒ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÓœǓɓ˓͓ϓѓӓՓדٓۓݓߓ #27xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/Localizable.strings0000644000175000017500000000715014757411105023724 /* Dialog title when quitting */ "Do you really want to quit X11?" = "X11 0}BN0W0f0000W0D0g0Y0K"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "0D0f0D00Y0y0f0n X11 000000000o0Y0P0kP\kb0W0O[X0W0f0D0j0DY f0o0Y0y0fY1000~0Y0"; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "RandR 0000k0W0~0Y0K"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "X11 0k[0W0f0000000nP^0Y f0Y00S0h0lB0W0f0D0000000000L0B00~0Y00]0n000000000K00000000RM0nraK0kb;0Y0S0h0lB0U00_X4T0o00000000RM0nraK0k_QC0W0~0Y0#%#A 00000000O0c0f_7R6v0kRM0nraK0kb;0Y0S0h00g0M0~0Y0"; /* No comment provided by engineer. */ "Allow" = "1S"; /* No comment provided by engineer. */ "Always Allow" = "^80k1S"; /* No comment provided by engineer. */ "Cancel" = "00000"; /* No comment provided by engineer. */ "Mac Help" = "Mac 000"; /* No comment provided by engineer. */ "Quit" = "}BN"; /* No */ "No" = "0D0D0H"; /* Yes */ "Yes" = "0o0D"; /* Terminal */ "Terminal" = "00000"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "e[X0n ~/.xinitrc 00000L0B00~0Y0\n\nX11 000000000k00hy:0U00000000k0000000L0j0D0K000000000000000k00c0fhy:0U00000000h0o0_v0Lup0j0S`'0L0B00~0Y0\n\ne[X0n00000yR0W0f0k!0k X11 0wR0W0_0h0M0kjnv0j X11 tX0Ou(0W0~0Y0K"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "X11 0000000x..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist0000644000175000017500000000061014757411105023322 LprojCompatibleVersion 106.3 LprojLocale ja LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/0000755000175000017500000000000014757411135017033 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/main.nib/0000755000175000017500000000000014757411135020526 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib0000644000175000017500000020606314757411105023241 마우스 중간 또는 오른쪽 버튼을 활성화하려면, 클릭하는 동안 Option 또는 Command 키를 함께 누르고 있으십시오. xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects.nib0000644000175000017500000013101414757411105023610 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  "',-278 =ABHXabwx|}  !09:BCDJYZbcdjyz  +,<DEFL[\defl{| !"34EMNOWXYabcsz{|  /089IJQRabjkz{   % & - . > ? F G H I O W g h p q          $ % * + 0 1 6 7 ; < A B G H M _ h i s t u z           % & + , 1 2 7 8 = > C D     ( ) * - > ? @ D O P U W Z [ \ ] ^  p k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bTt1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "gQƩ \P^submenuAction:$%*gQƩ \1&')#   #!(eƩǐT &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5hX11 X2XY287gX$...Q,22  2kkm2!<<;"cD¤stu*>=?cD¤1x)__NSServicesMenu22  22CBh̴ Tt ѠQa22  2UNSTag2G*FgX11 0Qh22GIf0 022!KeP 022  22ONfX11 ȅQq\_NSAppleMenu-!SSR"gQƩ \TU*gQƩ \1؀VW)S  S!XgƩǐT...-![[Z"bӸ\]*bӸ1^)[`_dX0Qc  -!ccb"cư*edxcư1 !"filnoruv) ()chgb0Qw 12ckjc\TQm ;c!meU/͕ c   KLcqpfư XQ` RUVctsgư XQ~ c   hc!wkP ^<\ 8$0^_NSWindowsMenuqqs-!{{z"cxy|}*c1}~~)q{!gX11 [_NSMainMenuTmenu V^apps_separator ɀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ȀR@#@Ā#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@btmnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView_NSPlaceholderString0AYText Cellmnptu#@*PXB1_controlTextColor+,ޤ/+,]NSTableColumn/LMNOPQRSWXY #@X#@D_`abcdefijb9XK0.33333299_`abc̀LMNOPQRSWXY #@Q#@$_`abcdef  ijc͕Ф[headerColorXB1C1 1_`abc_NSDrawsBackground mnp#$tu#@()+€_controlBackgroundColor./XL0.602715373N0.6666666667 146ŀYgridColor9:XM0.4246723652E0.5 1+,>?[NSTableView>@/YNSControlZapps_tableEF ˀՀIMOQRMVNSCell̀ ̀΀ Z\] Z_{{15, 245}, {402, 18}}c_defcgah`ijklmpErXtuv_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ЀˀπjD\1 ư tyz{[NSImageNameрXNSSwitch+,~_NSButtonImageSource~/+,\NSButtonCell/+,XNSButton@/]click_through ^׀^copy_menu_item ـIȀڀ ۀ܀ \p Zc_{{58, 235}, {129, 26}}id_ccefj`hXtk _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀mnptu WNSState߀܀!*e0__popUpItemAction:ZOtherViews1ۀހ)߀!f256 ߀!e ߀!f1 +,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton@/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator I%O)*%Ȁ 2\5 Z_{{18, 243}, {402, 18}}c_defcgah`ijklmp?Xtuv!Ѐe xɝ[enable_authGH IORSȀڀ _{{18, 182}, {409, 23}}c_defcgah`ijklmpG_Xtuv!Ѐh̴ Tt _enable_fullscreengh IOrsȀڀ  _{{37, 116}, {409, 23}}c_defcgah`ijklmpgXtuv!Ёo̴ Tt  Tt ɳ  ƩX0_enable_fullscreen_menu I_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}_`abcl   @o$ư¤  0 LjD L Tt ɳ \ܴ)Ȳ.mnpqtu +\controlColor+,[NSTextField@/_enable_fullscreen_menu_text IÒ  \  YZAAC_{{18, 130}, {402, 18}}I  DE #@w3c_defcgah`ijklmpXtuv!ЁoX11 ٴ\ Ф \1TX0_enable_keyequivs I%O%Ȁ  _{{18, 166}, {402, 18}}c_defcgah`ijklmpXtuv!Ёo$Ҹl t|tŸҸX D ƩZenable_tcp  %IO#$* !# "_{{18, 243}, {402, 18}}IO45; OP Gc_defcgah`ijklmpAXtuv!Ё $o3 Ҽ ư¤ Ǒ )X0\fake_buttonsIJ '+IMOTUMȀ̀ () _{{15, 184}, {402, 18}}c_defcgah`ijklmpIaXtuv!Ё'*mư¤| 0|  t_focus_follows_mouseij -1IMOtuMȀ̀ ./ _{{15, 140}, {402, 18}}c_defcgah`ijklmpiXtuv!Ё-0nȸ\ƴ ư  P0_focus_on_new_window 38IO 46 5_{{18, 69}, {402, 18}}I  RT #@wSc_defcgah`ijklmpXtuv!Ё37oOption Ф\ Alt_L  Alt_R 0_option_sends_alt :X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{266, 364}, {484, 342}}hX11 X$WNSPanelZ{320, 240}\Z @1ҁA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1 )1 ;* GI"53S)_{{36, 96}, {383, 28}}_`abcl F o9\1Tt, Tt ɳ@ ٴ\ Ф T piD ƩX X11 QƩ \ -`  LjµȲ.I+,  HJ I_{{36, 195}, {385, 42}}I=>  LM _`abcl;JG K oEư¤   $xʽ ҼD \1TX$t, tX H Option  Command Ф| h t Lj<$. _{{36, 159}, {385, 14}}_`abclTI N o#Dž% Tt mt Ǭ X11 ФD nŴĸ] ƩiȲ._{{18, 179}, {402, 18}}c_defcgah`ijklmp*^Xtuv!Ё"Qo¤\ Ф tD 0t0_{{36, 32}, {385, 31}}IOklҀ VW A_`abclx5  Uo>\1TXt, Option Ф Mode_switch Alt_L  Alt_R X11 Ф 08| ŲȲ._{{18, 8}, {418, 18}}c_defcgah`ijklmpXtuv!ЁSXom }t t )ե<\ ¤ldX0_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1bDž%+,]NSTabViewItem/ `ځqAbQ21Ggفdhl)I ڀ ef #@A_{{17, 238}, {39, 20}}_`abcldg c:I݁ ڀ ij #@x@_{{36, 216}, {392, 14}}_`abclh k ot 5X@ X11D ՉXt Ʃ)Ȳ.I ڀ mn #@v_{{36, 145}, {357, 28}}_`abcll o oFX11 Ҹ ư| \1TiȲ. ̴ Tt ܹ| ǑXp ȅX$t, Command-Option-A Ф| ƩX$._{{10, 33}, {438, 279}}b͜%  `sAb\ Zt1uy})IO()Ȁs vw s_{{18, 255}, {409, 23}}c_defcgah`ijklmp5Xtuv!Ёuxgٮ0T \1TIBC s z{ s_{{36, 221}, {385, 28}}_`abclOy  |oD"X0" Tt mD \1TX OSX t0 , X11 t  PRIMARY | X ٮ0T| ƩiȲ.IOZ[Ȁs ~ s_{{34, 129}, {409, 23}}c_defcgah`ijklmpgXtuv!Ё}ot0 ܬ t CLIPBOARD ųptҸIOstȀs  s_{{34, 104}, {409, 23}}c_defcgah`ijklmpXtuv!Ёo t0 ܬ t PRIMARY( t) ųptҸIOȀs  s_{{34, 79}, {409, 23}}c_defcgah`ijklmpXtuv!Ёoȸ\ƴ M¤Ҹ ݴt \ t0 ųptҸIOȀs  s_{{34, 192}, {409, 23}}c_defcgah`ijklmpXtuv!ЁoCLIPBOARD t t0 ųptҸI s  s_{{48, 158}, {385, 28}}_`abcl  o@xclipboard, klipper  0 x X11 t ǐ| ƩX$t t 5XD D\1TX$.I߁ s  s#@v_{{48, 47}, {370, 28}}_`abcl  o7X11 \Ѡ\ \ L8 t 5X@ | QƩ \ m ǑX JD  LjµȲ. _{{10, 33}, {438, 279}}ft0 M `́Ab1EIiˁ'-)IM  M ̀  _{{23, 208}, {385, 31}}_`abcl   oD\1TD L D\1 ư| tXt ư¤ tt D\1 ư\ ѵ й Dȷ| D\1 ư \1T)Ȳ.IM  M $ ̀  #@y_{{23, 161}, {412, 17}}_`abcl +  o/X11 ư @ t | 0Ȳ. t@ | 0D LjµȲ.IM 7 8M ̀  _{{23, 106}, {385, 28}}_`abcl D  oL\1TD L ȸ\ƴ X11 ư| 1Xt (Finder.app  0.app ) X11.appt ^<\ tٴ)Ȳ._{{10, 33}, {438, 279}}cư% L`A 1 P S T U)I% ` a%   _{{36, 195}, {385, 42}}_`abcl S m  odX11D ՉXt Xauthority Ŵ Ф| 1iȲ. ¤\X IP | Xt, t Фt ֨X J Ŵ X11 QƩ \t Չ JD  LjµȲ.I% z {%    #@w_{{36, 132}, {380, 28}}_`abcl T   oK\1Tt, ¤\ HD UxX0 t xɝ \1TŴ| iȲ. D\1Tt, Ь QƩ \ t Ʃ JµȲ.I%  %    #@y_{{17, 17}, {404, 14}}_`abcl U   ot 5X@ X11D L ՉXt Ʃ)Ȳ._{{10, 33}, {438, 279}}bH+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard* "ŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item"  v ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F " EUhide:J ( MZterminate:G . H_hideOtherApplications:H 4 J_unhideAllApplications: 9 ^Ucopy: ? f ]close_window: E l \zoom_window: I K  I N O/O  W X/_NSHuggingPriority    \ c gZ 7L_{{340, 191}, {100, 32}}c_defcah`ijkl j m I o put@ !Ӏb_apps_table_duplicate: v x  I N O/O   /   _{{340, 159}, {100, 32}}c_defcah`ijkl j m v put!Ӏbp_apps_table_delete: W _apps_table_show:  I N O/O   /   _{{340, 223}, {100, 32}}c_defcah`ijk j m put!Ӏem ͔_apps_table_new:  ^prefs_changed:  ^prefs_changed:* " ^prefs_changed:   ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:G  _enable_fullscreen_changed:D A _toggle_fullscreen:E  ˀ ^prefs_changed:I ' ^prefs_changed:i  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: #  %^prefs_changed: )  '^prefs_changed: /  )^prefs_changed:g 5  +^prefs_changed: ; 3 -^prefs_changed: A S /^prefs_changed:1 E ޯ F'2?@ABkCDEFGHIJ()*  !"+q~$;,>*5lGSgs)C[tMER IU iu 8%* S a T { U / I X v GUHI-7 1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication /    45NO M6=! _{{302, 440}, {454, 271}}nX11 QƩ \ TtZ{320, 240}1 I v )1 -7?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $   ! $ $_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, + ,ZNSScroller +@/    7 $ $B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 A ޡ BGJ E F G H I J K   N_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, Q R_NSPanGestureRecognizer S T/_NSPanGestureRecognizer_NSGestureRecognizer+, V/+, X Y\NSScrollView X/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 _ ޯ'2222B22222222()*        +q;*GgMEMMIMMiM%%% S% T% U / I/ v/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{:?A] GI"53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ޯ F'2?@ABkCDEFGHIJ()*  !"+q~$;,>*5lGSgs)C[tMER IU iu 8%* S a T { U / I X v GUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ޯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ޠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }     468:<>@KTcjr{%')+-/1357;LNPRT]vxz|~13568:;=?lnprtvxz|~"$&(*,=?hjlmoqrtv!#%')+6_acdfhikm&/468:ceghjlmoq :<>@BDFOQ~  8:<>@BDKMnprtvxz "$&(*9;dfhikmnpr %.135VXZ\^`bq}r 0Fam/Jh|$JYs Xbky%1IJLNPQSUWY[-/12468:<+=?BDGINQZ\efiloqsv   ' 4 ? N ] e p q s u ~ !!! !!%!.!F!M!V!X!Z!\!^!s!|!!!!!!!!!!!!!!!!"":"C"P"U"^"q"v"""""""""""""######!###%#,#>#S#`#u#x#|#~#########5L5U5b5g5t5}555555566666666 6"6%6/6@6I6L6N6P6Q6^6a6c6x6z6|6~66666666666666777'7)7+7-7/71767C7O7Q7z7|7~777777777777777777777888888(8=8@8D8F8H8u88888888888888888888999 9"9$999;9=9?9A9K9`9n9t9v9x99999999999:':.:0:1:2:4:6:8:9:;:=:?:@:B:C:D:m:o:r:s:v:y:{:}:::::;;";5;G;Y;h;j;o;t;v;x;z;|;~;;;;;;;;;;;;;;;<< <<<,======>>>> >>>>>>>>>>!>2>5>7>9>j>r>t>v>x>z>|>~>>>>>>>>>>>>>>>>?? ? ????????'?T?V?X?Z?\?^?`?b?d?f?q????????????????@ @@ @5@7@9@;@=@?@N@c@e@g@i@k@m@w@@@@@@@@@@@@@A(A*A+A,A.A0A2A3A5A7A9A:AAgAiAlAmApAsAuAwAyAAAAAAAAAAAB B BBBBBpBrBsBtBvBxBzB{B}BBBBBBBBBBBBBBBBCC&C(C*C-C0C2CCCCCCCCCCCCCCCCCCDDDD D D D@DYDnDpDrDuDxDzDDE%EAEDEFEGEHEJELEOEPESEVEXEYE[E\E]EfE~EEEEEEEEEFFF"F$F&F;F=F@FBFDFQFZFfFqFFFFFFFGGGGGGGGGG!G#G$G'G(G)G,G]G^GaGdGgGjGmGoGrGtGvGGGGHHHHH H H HHHHHHH!H$HcHeHgHiHlHoHqHsHHHHHHHHI'I)I*I+I-I/I1I2I5I8I:I;I=I>I?IXIIIIIIIIIIIIIIIIJ]J_J`JaJdJfJhJiJlJoJqJrJuJvJwJzJJJJJJJJJKKKKK K K KKNKPKRKTKWKZK\K^KKKKKKKKL LLLLLLLLLLL L"L#L$L=L|L~LLLLLLLLLLLLLLM9M;MsIs^s`sbseshsjsussssssssssssssssssst tt+t2tAtRtTtVtYt\tottttttttttttttttttuuuu u uu)u+u-u0u3uLu]u_uauduguuuuuuuuuuuuuuuuuuuvvvvvgv{v~vvvvvvvvvvvvvvvvvvvvvvvvvw)w2w4w6w;w>wAwCwEwGwLwdwuwxwzw}wwwwwwwwwwwwwwwwwxxOxQxSxVxYx[x]xbxwxxxxxxxxxxxy y"y#y$y'y)y+y,y/y2y4y5y8y9y:y=yWyyyyyyyyyyyyyyyyzzzzz zz+z.z0z3z6zEzVzXzZz]z`zozzzzzzzzzzzzzzzzzzzzz{{{{({*{,{/{2{?{P{R{T{W{Z{m{~{{{{{{{{{{{{{{{{{||||||*|;|>|@|C|F|U|f|i|k|n|q||||||||||||||||||}}}}}}},}=}@}B}E}H}W}h}k}m}p}s}}}}}}}}~~~~~~~~~~~   "$&(*,.02469<?BEHKNQTWZ]`cfilorux{~ "%(+.147:=@BDFHJLNPRUXZ]`bdfhjlox{}ڀ݀߀"?JS\_bdgir}ˁԁ߁uЂ݂_acdegiknortvyz{~ƒ߄4\y܄4=BKXalՆ׆نۆ݆߆ !#&),/258;>ADGJMPSVY\_behkmoqsuwy{~ÇƇɇ̇χ҇ԇև؇ۇ݇ !#%')+-/1357:=?ACEGILU!#%')+-/13579;=?ACEGIKMOQSUWY[]_acegjmpsvy|ŠŊȊˊ͊ϊҊՊ؊ۊފ  #&),/258;>ACEGJMPSVY\_behknqsuwy{}ËƋɋ̋ϋҋՋ؋ۋދ  #&),/258;>ADGJMPSVY\_behq47:ADGJMPSVY\_behknqtwz}ŏȏˏΏяԏ׏ڏݏ "%(+.147:=@CFILORUX[^adgjmpsvy|Đǐʐ͐АӐ֐ؐڐܐސ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~‘đƑȑʑ̑ΑБґԑ֑ؑڑܑޑ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013076314757411105024341 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI\ijtuyoV   %*+056 ;?@FW`avw{|   /89ABCIXYabcixy  *+;CDEKZ[cdekz{  !23DLMNVWX`abryz{ ./78HIPQ`aijyz   $ % , - = > E F G H N V f g o p           # $ ) * / 0 5 6 : ; @ A F G L ^ g h r s t y          $ % * + 0 1 6 7 < = B C     ' ( ) , = > ? C N O T V Y Z [ \ ] M o j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bTt1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "gQƩ \P^submenuAction:$%*gQƩ \1&')#   #!(eƩǐT &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5hX11 X2XY287gX$...Q,22  2kkm2!<<;"cD¤stu*>=?cD¤1x)__NSServicesMenu22  22CBh̴ Tt ѠQa22  2UNSTag2G*FgX11 0Qh22GIf0 022!KeP 022  22ONfX11 ȅQq\_NSAppleMenu-!SSR"gQƩ \TU*gQƩ \1؀VW)S  S!XgƩǐT...-![[Z"bӸ\]*bӸ1^)[`_dX0Qc  -!ccb"cư*edxcư1 !"filnoruv) ()chgb0Qw 12ckjc\TQm ;c!meU/͕ c   KLcqpfư XQ` RUVctsgư XQ~ c   hc!wkP ^<\ 8$0^_NSWindowsMenuqqs-!{{z"cxy|}*c1}~~)q{!gX11 [_NSMainMenuTmenu V^apps_separator ɀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ȀR #@Ā#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@btklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView_NSPlaceholderString0AYText Cellklnrs#@*PVB1_controlTextColor+,ܤ/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghb9VK0.33333299]^_`aʀJKLMNOPQUVW #@M@#@$]^_`abcdghc͕Ф [headerColorVB1C1 1]^_`a_NSDrawsBackground kln!"rs#@(')€_controlBackgroundColor,-VL0.602715373N0.6666666667 124ŀYgridColor78VM0.4246723652E0.5 1+,<=[NSTableView<>/YNSControlZapps_tableCD ˀՀGKMNPQKVNSCell̀ ̀΀ Y[\ Z_{{15, 245}, {402, 18}}b]cdeaf_g^hijkloCqVstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ЀˀπjD\1 ư txyz[NSImageNameрXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton>/]click_through ^׀^copy_menu_item ـGMǀڀ ۀ܀ [p Zc_{{58, 235}, {129, 26}}hc]badei^gVsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀klnrs WNSState߀܀!*e0__popUpItemAction:ZOtherViews1ڀހ)߀!f256 ߀!e ߀!f1 +,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton>/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator G$MN()$ǀ 1[4 Z_{{18, 243}, {402, 18}}b]cdeaf_g^hijklo>Vstu!Ѐe xɝ[enable_authFG GMNQRǀڀ _{{18, 182}, {409, 23}}b]cdeaf_g^hijkloF^Vstu!Ѐh̴ Tt _enable_fullscreenfg GMNqrǀڀ  _{{37, 116}, {409, 23}}b]cdeaf_g^hijklof~Vstu!Ёo̴ Tt  Tt ɳ  ƩX0_enable_fullscreen_menu GM_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}]^_`ak   @o$ư¤  0 LjD L Tt ɳ \ܴ)Ȳ.klnors )\controlColor+,[NSTextField>/_enable_fullscreen_menu_text GMNˀ  [  YZAAC_{{18, 130}, {402, 18}}GM  DE #@w3b]cdeaf_g^hijkloVstu!ЁoX11 ٴ\ Ф \1TX0_enable_keyequivs G$MN$ǀ  _{{18, 166}, {402, 18}}b]cdeaf_g^hijkloVstu!Ёo$Ҹl t|tŸҸX D ƩZenable_tcp  %GMN"#) !# "_{{18, 243}, {402, 18}}GMN34: OP Gb]cdeaf_g^hijklo@Vstu!Ё $o3 Ҽ ư¤ Ǒ )X0\fake_buttonsHI '+GKMNSTKǀ̀ () _{{15, 184}, {402, 18}}b]cdeaf_g^hijkloH`Vstu!Ё'*mư¤| 0|  t_focus_follows_mousehi -1GKMNstKǀ̀ ./ _{{15, 140}, {402, 18}}b]cdeaf_g^hijklohVstu!Ё-0nȸ\ƴ ư  P0_focus_on_new_window 38GMN 46 5_{{18, 69}, {402, 18}}GM  RT #@wSb]cdeaf_g^hijkloVstu!Ё37oOption Ф\ Alt_L  Alt_R 0_option_sends_alt :V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{266, 364}, {484, 342}}hX11 X$WNSPanelZ{320, 240}[Z @1сA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1)1 :) GI"53S)_{{36, 96}, {383, 28}}]^_`ak F o9\1Tt, Tt ɳ@ ٴ\ Ф T piD ƩX X11 QƩ \ -`  LjµȲ.GM*+  HJ I_{{36, 195}, {385, 42}}GM<=  LM ]^_`ak:IG K oEư¤   $xʽ ҼD \1TX$t, tX H Option  Command Ф| h t Lj<$. _{{36, 159}, {385, 14}}]^_`akSI N o#Dž% Tt mt Ǭ X11 ФD nŴĸ] ƩiȲ._{{18, 179}, {402, 18}}b]cdeaf_g^hijklo)]Vstu!Ё"Qo¤\ Ф tD 0t0_{{36, 32}, {385, 31}}GMNjkр VW A]^_`akw5  Uo>\1TXt, Option Ф Mode_switch Alt_L  Alt_R X11 Ф 08| ŲȲ._{{18, 8}, {418, 18}}b]cdeaf_g^hijkloVstu!ЁSXom }t t )ե<\ ¤ldX0_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1bDž%+,]NSTabViewItem/ `ځqAbQ21Ffفdhl)GM ڀ ef #@A_{{17, 238}, {39, 20}}]^_`akdg c:GM܁ ڀ ij #@x@_{{36, 216}, {392, 14}}]^_`akh k ot 5X@ X11D ՉXt Ʃ)Ȳ.GM ڀ mn #@v_{{36, 145}, {357, 28}}]^_`akl o oFX11 Ҹ ư| \1TiȲ. ̴ Tt ܹ| ǑXp ȅX$t, Command-Option-A Ф| ƩX$._{{10, 33}, {438, 279}}b͜% `sAb [ Zt1uy})GMN'(ǀs vw s_{{18, 255}, {409, 23}}b]cdeaf_g^hijklo4Vstu!Ёuxgٮ0T \1TGMAB s z{ s_{{36, 221}, {385, 28}}]^_`akNy  |oD"X0" Tt mD \1TX OSX t0 , X11 t  PRIMARY | X ٮ0T| ƩiȲ.GMNYZǀs ~ s_{{34, 129}, {409, 23}}b]cdeaf_g^hijklofVstu!Ё}ot0 ܬ t CLIPBOARD ųptҸGMNrsǀs  s_{{34, 104}, {409, 23}}b]cdeaf_g^hijkloVstu!Ёo t0 ܬ t PRIMARY( t) ųptҸGMNǀs  s_{{34, 79}, {409, 23}}b]cdeaf_g^hijkloVstu!Ёoȸ\ƴ M¤Ҹ ݴt \ t0 ųptҸGMNǀs  s_{{34, 192}, {409, 23}}b]cdeaf_g^hijkloVstu!ЁoCLIPBOARD t t0 ųptҸGM s  s_{{48, 158}, {385, 28}}]^_`ak  o@xclipboard, klipper  0 x X11 t ǐ| ƩX$t t 5XD D\1TX$.GMށ s  s#@v_{{48, 47}, {370, 28}}]^_`ak  o7X11 \Ѡ\ \ L8 t 5X@ | QƩ \ m ǑX JD  LjµȲ. _{{10, 33}, {438, 279}}ft0 K `́Ab1CHhˁ'-)GKM  K ̀  _{{23, 208}, {385, 31}}]^_`ak   oD\1TD L D\1 ư| tXt ư¤ tt D\1 ư\ ѵ й Dȷ| D\1 ư \1T)Ȳ.GKM  K # ̀  #@y_{{23, 161}, {412, 17}}]^_`ak *  o/X11 ư @ t | 0Ȳ. t@ | 0D LjµȲ.GKM 6 7K ̀  _{{23, 106}, {385, 28}}]^_`ak C  oL\1TD L ȸ\ƴ X11 ư| 1Xt (Finder.app  0.app ) X11.appt ^<\ tٴ)Ȳ._{{10, 33}, {438, 279}}cư$ K`A 1 O R S T)G$M _ `$   _{{36, 195}, {385, 42}}]^_`ak R l  odX11D ՉXt Xauthority Ŵ Ф| 1iȲ. ¤\X IP | Xt, t Фt ֨X J Ŵ X11 QƩ \t Չ JD  LjµȲ.G$M y z$    #@w_{{36, 132}, {380, 28}}]^_`ak S   oK\1Tt, ¤\ HD UxX0 t xɝ \1TŴ| iȲ. D\1Tt, Ь QƩ \ t Ʃ JµȲ.G$M  $    #@y_{{17, 17}, {404, 14}}]^_`ak T   ot 5X@ X11D L ՉXt Ʃ)Ȳ._{{10, 33}, {438, 279}}bH+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard) "ŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item"  v ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F ! EUhide:J ' MZterminate:G - H_hideOtherApplications:H 3 J_unhideAllApplications: 8 ^Ucopy: > f ]close_window: D l \zoom_window: H J  G M N-MN  V W-_NSHuggingPriority    [ b fZ 7L_{{340, 191}, {100, 32}}b]cdea_g^hijk i l H n ots@ !Ӏb_apps_table_duplicate: u w  G M N-MN   -   _{{340, 159}, {100, 32}}b]cdea_g^hijk i l u ots!Ӏbp_apps_table_delete: W _apps_table_show:  G M N-MN   -   _{{340, 223}, {100, 32}}b]cdea_g^hij i l ots!Ӏem ͔_apps_table_new:  ^prefs_changed:  ^prefs_changed:) " ^prefs_changed:   ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:F  _enable_fullscreen_changed:D A _toggle_fullscreen:C  ˀ ^prefs_changed:H ' ^prefs_changed:h  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: "  %^prefs_changed: (  '^prefs_changed: .  )^prefs_changed:f 4  +^prefs_changed: : 3 -^prefs_changed: @ S /^prefs_changed:1 D ݯ E'2?@ABkCDEFGHIJ()*  !"+q~#:+=)4kFRfr(BZsKCQ HT ht 7$) R ` S z T - H W u ESFG+5 1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication -    45NO M6=! _{{302, 440}, {454, 271}}nX11 QƩ \ TtZ{320, 240}1 H u )1 +5?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " M   # #_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, * +ZNSScroller *>/  M  6 # #B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 @ ݡ AGJ D E F G H I J   M_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, P Q_NSPanGestureRecognizer R S/_NSPanGestureRecognizer_NSGestureRecognizer+, U/+, W X\NSScrollView W/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ^ ݯ'2222B22222222()*        +q:)FfKCKKHKKhK$$$ R$ S$ T - H- u-EFG- -02222:22222222-QSS-Y[-acccccccc-y{:?A] GI"53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ݯ E'2?@ABkCDEFGHIJ()*  !"+q~#:+=)4kFRfr(BZsKCQ HT ht 7$) R ` S z T - H W u ESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ݯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ݠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }     468:<>@KTcjr{%')+-/1357;LNPRT]vxz|~13568:;=?lnprtvxz|~"$&(*,=?hjlmoqrtv!#%')+6_acdfhikm&/468:ceghjlmoq :<>@BDFOQ~  8:<>@BDKMnprtvxz "$&(*9;dfhikmnpr %.135VXZ\^`bq}n{,B]i +Fdx  FUo?IR`jr| 013578:<>@B{|~!#$&)+.058ACLMPSVXZ]py{~    & 5 D L W X Z \ e g i j s | ~ !! !!-!4!=!?!A!C!E!Z!c!!!!!!!!!!!!!!!!""!"*"7"<"E"X"]"p"y"""""""""""""##### # ##%#:#G#\#_#c#e#g#x#}######535<5I5N5[5d5x555555555566666 6 66'60636567686E6H6J6_6a6c6e6g6z6666666666666677777777*76787a7c7e7g7i7k7m7o77777777777777777778888$8'8+8-8/8\8p8r8t8v8w8y8{8}8888888888888899 9 9 9"9$9&9(929G9U9[9]9_9h9t999999999:::::::::!:":$:&:(:):+:,:-:V:X:[:\:_:b:d:f:h:::::; ;;0;B;Q;S;X;];_;a;c;e;g;i;l;n;p;;;;;;;;;;;;;;<<<*<,<.<0<2<4>>>>> >>> >">S>[>]>_>a>c>e>g>i>k>x>z>|>~>>>>>>>>>>>>>>>>>>????=???A?C?E?G?I?K?M?O?Z?????????????????@@ @@ @"@$@&@(@7@L@N@P@R@T@V@`@u@w@y@{@}@@@@@@@@AAAAAAAAAA A"A#A%A&A'APARAUAVAYA\A^A`AbA{AAAAAAAAAAAAAAAABYB[B\B]B_BaBcBdBfBhBjBkBmBnBoBBBBBBBBBBBCCCCCCCvCxCyCzC|C~CCCCCCCCCCCCCCCCCCD)DBDWDYD[D^DaDcDDEE*E-E/E0E1E3E5E8E9Em@mCmFmHnnzn}nnnnnnnnnnnnnnnnnnnnnnnnooooooooppppp p p pppp0pYp\p^papcpfpipkpppppppqq q0q:qAqJq]qbqnqqqqqqqqqqqqqqrrrrr r rr.r0r2r5r8r:rLrarcrerhrkrmrrrrrrrrrrrrrrsssss"s%s's2sGsIsKsNsQsSs^sssuswsys|s~sssssssssssssssttt*t;t=t?tBtEtXtitktmtptsttttttttttttttttttuuuuuuu5uFuHuJuMuPuiuvuxu{u~uuuuuuuuuuuuuuuuuuvPvdvgvivjvkvnvpvrvsvvvyv{v|vvvvvvvvvvvvvvwwwww$w'w*w,w.w0w5wMw^wawcwfwiwwwwwwwwwwwwwwwwwx8x:x|O|R|T|W|Z|i|z|}||||||||||||||||||}}}}}&})}+}.}1}@}Q}T}V}Y}\}k}|}}}}}}~~~~~~~~~~~~~~~~~~~~~~~   "%(+.147:=@CFILORUX[^adgikmoqsuwz}  #&)+-/13579;>ACFIKMOQSUXadftÀƀȀˀ΀рԀ׀؀ۀހ (3  "$&(*,.02468:<>@BDFHJLNPSVY\_behknqtwz}ĊNJʊ͊Њӊ֊ي܊ߊ !$'*,.0369ADGJMPSVY\_behknqtwz}ÐŐǐɐː͐ϐѐӐՐאِېݐߐ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÑőǑɑˑ͑ϑёӑՑבّۑݑߑ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegpqs|}xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/Localizable.strings0000644000175000017500000000716214757411105022612 /* Dialog title when quitting */ "Do you really want to quit X11?" = "X11D ȅXµȮL?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "$ Lj X11 QƩ \t ɉ p ǥX J@ mt )Ȳ."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "RandR ܹ| ǑiȮL?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "X11Ь ƩǐX 0 tĹ| Xĸ] Ɣ̭\ QƩ \t LjµȲ. Ɣ̭ QƩ \t t ܸ\ Dĸ] Ɣ̭Xt, X11@ 0| t ܸ\ iȲ. t #%#A Ф piD ƩX t ܸ\ Dĸ] X11D `  LjµȲ."; /* No comment provided by engineer. */ "Allow" = "Ʃ"; /* No comment provided by engineer. */ "Always Allow" = "m Ʃ"; /* No comment provided by engineer. */ "Cancel" = ""; /* No comment provided by engineer. */ "Mac Help" = "Mac "; /* No comment provided by engineer. */ "Quit" = "ȅ"; /* No */ "No" = "DƔ"; /* Yes */ "Yes" = ""; /* Terminal */ "Terminal" = "0"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "t ~/.xinitrc |D LjµȲ.\n\nX11 QƩ \ \ܴ ư  ɳ| Lj Jp з \ \ܴX t |  LjµȲ.\n\nL X11D Ǒ` L \ X11 XD ƩXĸ] 0t |D .PµȮL?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "X11 ųptҸ Ux..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/ko.lproj/locversion.plist0000644000175000017500000000061014757411105022205 LprojCompatibleVersion 106.3 LprojLocale ko LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/no.lproj/0000755000175000017500000000000014757411135017036 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/no.lproj/main.nib/0000755000175000017500000000000014757411135020531 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib0000644000175000017500000020476414757411105023252 Hold nede Tilvalg- eller Kommando-tasten mens du klikker for å aktivere den midtre eller høyre museknappen. Når denne funksjonen er aktivert, registreres museklikk i inaktive vinduer når du klikker i dem, i tillegg til at vinduene aktiveres. Når denne funksjonen er aktivert, legges X11.app øverst (i stedet for Finder.app, Terminal.app osv.) når du oppretter et nytt X11-vindu. Når du starter X11, opprettes det Xauthority-tilgangskontrolltaster. Hvis maskinens IP-adresse endres, kan ikke disse tastene brukes, noe som kan hindre X11-programmer fra å starte. Hvis dette er aktivert, må du for å sikre systemet, også aktivere Godkjenn tilkoblinger. Når dette ikke er aktivert, er tilkoblinger fra eksterne programmer ikke tillatt. xorg-server-21.1.16/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects.nib0000644000175000017500000013405614757411105023624 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUV_fghrsw{  <=@FYfgqrvlS "'(-23 8<=CS\]rswx{~+45=>?ETU]^_etu}~&'7?@AGVW_`agvw-.?GHIQRS[\]mtuv~)*23CDKL[\detu}~      & ' 7 8 ? @ A B H P a b j k | }          $ % * + 0 1 5 6 ; < A B G Y b c m n o t           % & + , 1 2 7 8 = >       " # $ ' 8 9 : > I J O Q T U V W X  j f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%'))XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMeny1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZProgrammerP^submenuAction:$%*ZProgrammer1&')#   #!(hTilpass &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -|!"#VNSName*/.{XMainMenu1&'()*+0PX_u)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5VOm X112XY287WValg...Q,22  2kkm2!<<;"YTjenestersmu*=;>1w)__NSServicesMenu22  22BAoSl fullskjermmodus p/avQa22  2UNSTag2F*EYSkjul X11Qh22FH[Skjul andre22!JXVis alle22  22NM[Avslutt X11Qq\_NSAppleMenu-!RRQ"ZProgrammerST*ZProgrammer1׀UV)R  R!WZTilpass...-!ZZY"WRedigerY[*1\)Z^]VKopierQc   -!aa`"UVindu *b`t1cfikloqr) %&aedTLukkQw ./ahgWMinimerQm 8a!jTZoom a   HIanm_Bla gjennom vinduerQ< OHSanp_Bla baklengs gjennom vinduer a   da!soLegg alle verst^_NSWindowsMenummo-!wwv"UHjelpouvx*1xyy)mw!zYX11-hjelp[_NSMainMenuTmenu U~^apps_separator Ā(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ÀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  97 8Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNavnhijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView_NSPlaceholderString0AYTekstrutehikop#@*PSB1_controlTextColor+,٤/+,]NSTableColumn/GHIJKLMNRST #@X#@DZ[\]^_`adeXKommandoSK0.33333299Z[\]^ǀGHIJKLMNRST #@Q#@$Z[\]^_`adeWSnarvei  [headerColorSB1C1 1Z[\]^_NSDrawsBackground hikop#@($&_controlBackgroundColor)*SL0.602715373N0.6666666667 1/1YgridColor45SM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ƀЀDHJLMHVNSCellǀ Ȁɀ UWX U_{{15, 245}, {402, 18}}^Z_`a^b\c[defghk@mSopq_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀ_"Registrer klikk i inaktive vinduertuv[NSImageNamèXNSSwitch+,yz_NSButtonImageSourcey/+,|}\NSButtonCell|/+,XNSButton;/]click_through \Ҁ^copy_menu_item ԀDÀՀ ր׀ Wk U^_{{68, 235}, {134, 26}}d_Z^^`ae[cSof _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀hikop WNSState܀ڀ׀!݀ހ*ZFra skjerm__popUpItemAction:ZOtherViews1րـ߀)ڀ!܀Z256 fargerڀ!܀WTusenerڀ!܀YMillioner+,_NSPopUpButtonCell|/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D J$% À -W0 U_{{18, 243}, {402, 18}}^Z_`a^b\c[defghk:Sopq!ˀ󀨀_Godkjenn tilkoblinger[enable_authBC DJMNÀՀ _{{18, 182}, {409, 23}}^Z_`a^b\c[defghkBZSopq!ˀ_Fullskjermmodus_enable_fullscreenbc DJmnÀՀ _{{37, 116}, {373, 23}}^Z_`a^b\c[defghkbzSopq!ˀ_+Gi tilgang til menylinjen i fullskjermmodus_enable_fullscreen_menu  D_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}Z[\]^g@oJMenylinjen blir synlig nr musemarkren plasseres verst p hovedskjermen.hiklop & \controlColor+,[NSTextField;/_enable_fullscreen_menu_text  DJǀ  W TU<<>_{{18, 127}, {402, 18}}D ?@ #@w.^Z_`a^b\c[defghkSopq!ˁ _ Aktiver tastaturkommandoer i X11_enable_keyequivs D J À  _{{18, 166}, {402, 18}}^Z_`a^b\c[defghk Sopq!ˁ_)Tillat tilkoblinger fra nettverksklienterZenable_tcp  DJ%  _{{18, 243}, {402, 18}}DJ/06 JK B^Z_`a^b\c[defghk<Sopq!ˁ_Emuler mus med tre knapper\fake_buttonsDE "&DHJOPHÀǀ #$ _{{15, 184}, {402, 18}}^Z_`a^b\c[defghkD\Sopq!ˁ"%oFokus flger musen_focus_follows_mousede (,DHJopHÀǀ )* _{{15, 140}, {402, 18}}^Z_`a^b\c[defghkd|Sopq!ˁ(+oFokuser p nye vinduer_focus_on_new_window .3DJ /1 0_{{18, 69}, {402, 18}}D MO N^Z_`a^b\c[defghkSopq!ˁ.2_%Tilvalg-tastene sender Alt_L og Alt_R_option_sends_alt 5S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_{{266, 364}, {484, 342}}XX11-valgWNSPanelZ{320, 240}WU ;1́<)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1)16 %B D0.N)_{{36, 93}, {385, 28}}Z[\]^gAonNr aktivert, kan tastaturkommandoer for menylinjen komme i konflikt med X11-programmer som bruker metatasten.D%&  CE D_{{36, 195}, {385, 42}}D78 GH  Z[\]^g6DBFolHold nede Tilvalg- eller Kommando-tasten mens du klikker for aktivere den midtre eller hyre museknappen. _{{36, 151}, {385, 28}}Z[\]^g NDIobGir deg mulighet til legge inn menyendringer som overskriver den nvrende X11-tastaturlayouten._{{18, 185}, {402, 18}}^Z_`a^b\c[defghk%XSopq!ˁLoFlg systemets tastaturlayout_{{36, 32}, {385, 31}}DJef̀ QR <Z[\]^gr0PoiNr dette er aktivert, sender Tilvalg-tastene Alt_L og Alt_R X11-nkkelsymboler i stedet for Mode_switch._{{18, 8}, {418, 18}}^Z_`a^b\c[defghk{Sopq!ˁNS_1Rull alltid i samme retning som fingerbevegelsene_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1X\m)VNSViewYNSTabView\NSIdentifier[Z<YQ1WInndata+,]NSTabViewItem/[Ձl<]Q21Bbԁ_cg)DՀ `a #@F_{{17, 241}, {49, 17}}Z[\]^g_bWFarger:DׁՀ de #@x@_{{36, 216}, {392, 14}}Z[\]^gcf_8Denne innstillingen trer i kraft neste gang X11 startes.DՀ hi #@w0_{{36, 148}, {375, 28}}Z[\]^ggjocAktiverer X11-rotvinduet. Sl fullskjermmodus p og av ved trykke p Kommando-Tilvalg-A samtidig._{{10, 33}, {438, 279}}VUtdata[n<]W  Uo1ptx|)DJ"#Àn qr n_{{18, 255}, {409, 23}}^Z_`a^b\c[defghk/Sopq!ˁps_Aktiver synkroniseringD<=n uv n_{{36, 221}, {385, 28}}Z[\]^gItwo{Aktiverer kopier-menyobjektet og gjr det mulig synkronisere mellom bufrene i OSX Pasteboard, X11 CLIPBOARD og PRIMARY.DJTUÀn yz n_{{34, 129}, {383, 23}}^Z_`a^b\c[defghkaSopq!ˁx{o%Oppdater CLIPBOARD nr Utklipp endresDJmnÀn }~ n_{{34, 104}, {383, 23}}^Z_`a^b\c[defghkzSopq!ˁ|o/Oppdater PRIMARY (midtklikk) nr Utklipp endresDJÀn  n_{{34, 79}, {383, 23}}^Z_`a^b\c[defghkSopq!ˁo2Oppdater Utklipp umiddelbart nr ny tekst markeresDJÀn  n_{{34, 192}, {383, 23}}^Z_`a^b\c[defghkSopq!ˁo%Oppdater Utklipp nr CLIPBOARD endresDn  n#@v_{{48, 158}, {370, 28}}Z[\]^go`Deaktiver dette valget hvis du vil bruke xclipboard, klipper eller andre X11-utklippshndterere.Dn  n_{{48, 47}, {370, 28}}Z[\]^gojP grunn av begrensninger i X11-protokollen, er det mulig at dette valget ikke fungerer i alle programmer._{{10, 33}, {438, 279}}WUtklippH[ǁ<]1@DdƁ"()DHHǀ  _{{23, 208}, {385, 31}}Z[\]^g oNr denne funksjonen er aktivert, registreres museklikk i inaktive vinduer nr du klikker i dem, i tillegg til at vinduene aktiveres.DH  Hǀ  _{{23, 161}, {385, 17}}Z[\]^g $o:X11-vindufokus flger markren. Kan vre upraktisk i bruk.DH 0 1Hǀ  _{{23, 106}, {385, 28}}Z[\]^g =oNr denne funksjonen er aktivert, legges X11.app verst (i stedet for Finder.app, Terminal.app osv.) nr du oppretter et nytt X11-vindu._{{10, 33}, {438, 279}}WVinduer E[<1 I L M N)D  Y Z  `  #@w_{{36, 195}, {383, 42}}Z[\]^g L goNr du starter X11, opprettes det Xauthority-tilgangskontrolltaster. Hvis maskinens IP-adresse endres, kan ikke disse tastene brukes, noe som kan hindre X11-programmer fra starte.D  t u  {  #@v_{{36, 118}, {364, 42}}Z[\]^g M oHvis dette er aktivert, m du for sikre systemet, ogs aktivere Godkjenn tilkoblinger. Nr dette ikke er aktivert, er tilkoblinger fra eksterne programmer ikke tillatt.D       #@y_{{17, 17}, {404, 14}}Z[\]^g N _9Disse innstillingene trer i kraft neste gang X11 startes._{{10, 33}, {438, 279}}YSikkerhet+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel N_scroll_in_device_direction _sync_clipboard_to_pasteboard% [sync_keymap p€_sync_pasteboard xĀ_sync_pasteboard_to_clipboard |ƀ_sync_pasteboard_to_primary Ȁ_sync_primary_immediately ʀZsync_text1 ̀Zsync_text2D @΀_toggle_fullscreen_item? 4Ѐ^x11_about_item r ҁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector f Ձ_minimize_window:?  4ׁ_orderFrontStandardAboutPanel:@  6 ف[prefs_show:F  DہUhide:J " L݁Zterminate:G ( G߁_hideOtherApplications:H . I_unhideAllApplications: 3 \Ucopy: 9 c ]close_window: ? i \zoom_window: C E  D H I*J  Q R*_NSHuggingPriority   W ] aU 2G_{{340, 191}, {131, 32}}^Z_`a^\c[defg d g C i jpo@ !΀XDupliser_apps_table_duplicate: p r  D H I*J  | }*  _{{340, 159}, {131, 32}}^Z_`a^\c[defg d g p jpo!΀UFjern_apps_table_delete: V _apps_table_show:  D H I*J   *  _{{340, 223}, {131, 32}}^Z_`a^\c[def d g jpo!΀_Legg til objekt_apps_table_new:  ^prefs_changed:  ^prefs_changed:%  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:y y  Yx11_help: '  _apps_table_show: l \next_window: o _previous_window:B  _enable_fullscreen_changed:D @ _toggle_fullscreen:@ ƀ ^prefs_changed:D  " ^prefs_changed:d ( ^prefs_changed:  p ^prefs_changed:  x ^prefs_changed:  |  ^prefs_changed: #  "^prefs_changed: )  $^prefs_changed:b /  &^prefs_changed: 5 . (^prefs_changed: ; N *^prefs_changed:1 ? د @'2?@ABkCDEFGHIJ()* +my6& 8%0fBNbn#=UnH@MDP dp 1 % L Z M u N * C R p }BPCD(2 ,-02469:#&'E& (-]NSApplication *    /0IJ H18! _{{302, 440}, {485, 271}}_X11-programmenyZ{320, 240}1 C p )1 (2:>)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ӏ)_{{1, 1}, {301, 28}}      _NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+, % &ZNSScroller %;/    1  = ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 ; ء <BE ? @ A B C D E   H_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, K L_NSPanGestureRecognizer M N/_NSPanGestureRecognizer_NSGestureRecognizer+, P/+, R S\NSScrollView R/Z{485, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 Y د'2222B22222222()*        +m6 %BbH@HHDHHdH   L M N * C* p*BCD* -02222:22222222-PRR-XZ-_aaaaaaaa-uw5:<XB D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀈ##E1 د @'2?@ABkCDEFGHIJ()* +my6& 8%0fBNbn#=UnH@MDP dp 1 % L Z M u N * C R p }BPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,-02469:#&' ,}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1 د        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ؠE+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v      = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z | !#%')+->GV]enuz "$&(*.?ACEGPikmoqsuwy{}!NPRTVXZ\^`j{} ?Ajlnoqstvx!#%'0Y[]^`bceg   %')+TVXY[]^`b%')+-/18:gikmoqsuwy!#%-/PRTVXZ\a   .WY[\^`ace %(*,MOQSUWYcotdqz"8S_x!<Zn <KeyJT]ku}#;<>@BCEGIKM!#$&(*,./1469;@CLNWX[^aceh{    & 1 @ O W b c e g p r t u ~ !!! !8!?!H!J!L!N!P!e!n!!!!!!!!!!!!!!!!"","5"B"G"P"c"h"{"""""""""""""## #######0#E#R#g#j#n#p#r########5>5G5T5Y5f5o55555556666 6 666666!626;6>6@6B6C6P6S6U6j6l6n6p6r66666666666666677777!7#7,797E7G7p7r7t7v7x7z7|7~77777777777777778 8 888884878;8=8?8l888888888888888888888999990929496989B9W9e9k9m9o9x9999999999::%:':(:):+:-:/:0:2:4:6:7:9:::;:d:f:i:j:m:p:r:t:v::::;;;,;>;P;_;a;f;k;m;o;q;s;u;w;z;|;~;;;;;;;;;;;<<<<%<3> > >>>>>>> >">$>&>(>9><>>>@>q>y>{>}>>>>>>>>>>>>>>>>>>>>??????????!?,?Y?[?]?_?a?c?e?g?i?k?s????????????????@ @@@4@6@8@:@<@>@M@b@d@f@h@j@l@v@@@@@@@@@@@@@A'A)A*A+A-A/A1A2A4A6A8A9A;ACCCCCCCCCCCCCCCCDD D D DDDDDCD\DqDsDuDxD{D}DEE(EDEGEIEJEKEMEOERESEVEYE[E\E^E_E`EiEEEEEEEEEEF]FnFqFsFuFFFFFFFFFFFFFFFFG^G`GaGbGeGgGiGjGmGpGrGsGvGwGxG{GGGGGGGGGGGGHIHLHNHOHPHSHUHXHYH\H_HaHbHeHfHgHpHsHHHHHHHHHHI IIIIIItIvIwIxIzI|I~IIIIIIIIIIIIIIIIIJ J+J@JBJDJGJJJLJJJJJJJJJJJJJJJJJK@KBKCKDKGKIKKKLKOKRKTKUKXKYKZK]KKKKKKKKKKKKKKKKLRLTLULVLXLZL\L]L`LcLeLfLhLiLjLLLLLLLLLLMM$M&M(M+M.M0MMMMMMMMMMMMMMMMMMMNNNN N N:NPNeNgNiNlNoNqNNNNNNNNNNNNNNNNOOpOsOuOvOwOzO|OOOOOOOOOOOOOOOOOOPPP0P2P4P7P:PQ[QtQQQQQQQQQQQQQQQQQQQQQQRRR%R-R8RaRcRfRgRjRlRnRpRsR|RRRRRRRSSSSS S#S%S(S+S.S0S1S4S6S8S9SBSESHSJSSSfSiSlSoSrSuSxS{S~SSSSSSSSSSSTU U#U%U&U'U*U,U/U0U3U6U8U9UUAUZUUUUUUUUUUUUUUUUUVVVVVVVV!VWW>WAWCWFWHWKWNWPXX0XoXqXsXuXxX{X}XXXY3Y5Y6Y7Y:YY?YBYEYGYHYKYLYMYPYuYxYzY}YYYZZZqZZZZZZZZZ[ [[[6[?[J[M[P[S[V[Y[[[t[{[[[[[[[[[[[[[[[[[[[[[[\\\\\\\\ \"\\\\\\\\\\\\\\\\\\\\\\\\\]]]o]r]t]u]v]x]z]}]~]]]]]]]]]]]]]]]]]^#^^^^^^^^^^^^^^^^^^^^^^^^_____``` `````@`B`E`F`I`L`N`P`R`[`l`o`r`u`x`{`~``````````````````aaSaUaWaYa\a_aaaca|aaaaaaaaaaaaaabbbb?bBbDbGbJbMbOcHccccccccccccccccdddddd!d#d%drdddddddddddddddee?eAeCeEeHeKeMeOef f ffffffffff f#f$f%f=f|f~fffffffgNgPgQgRgUgWgYgZg]g`gbgcgfggghggggggggghhhhhhhhhhhhhhhhhhhhhhhhhhij#j&j(j)j*j-j/j2j3j6j9j;jzGz_zfzuzzzzzzzzzzzzzzzzz{{{{{{ {&{7{9{;{>{A{L{]{_{a{d{g{{{{{{{{{{{{{{{{{{| | | ||| |1|4|6|9|<||||||||||||||||||||||}}}}} }$}]}f}h}j}o}r}u}w}y}{}}}}}}}~~~~~~ ~"~#~&~)~+~,~/~0~1~4~N~~~~~~~~~~~~~~~~~~~~Y[\]`bdehkmnqrsv /@CEHKZknpsvÀŀȀˀڀ):<>ADWhjlorŁȁ&(*-0?PSUX[j{~тԂւق܂'*,/2ARUWZ]l}҃Ճ׃ڃ݃(+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsux{~ÅŅDžɅ˅ͅЅӅօمۅ݅߅  #&(*,/258;>ADGJMOQSVY\_behknqtwz}ȇ"%(+,/258;>@BD_q|Ƈɇˇ͇#&(*@ˈ͈ψЈшӈՈ׈ڈۈވ#.ɉBfʊ07Pfot}‹ˋԍ !#%')+-/13579;=?ACEGIKMOQSUX[^adgjmpsvy|čǍʍ͍ЍӍ֍ٍ܍ߍ  #&(*,/1469;>@CFILORTVXZ\^`bdfhknprtvxz}IKNPRTVXZ\^`bdfhjlnprtvxz|~ŐȐːΐѐԐאڐݐ "%(+.147:=@CFIKMORUX[^adgjmprtvy|‘đƑȑʑ̑ΑБґԑ֑ؑڑܑޑ !$'*-0369ADGJMPSVY\_behknqtwz}–ŖȖ˖ΖіԖזږݖ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~—ėƗȗʗ̗ΗЗҗԗ֗ؗڗܗޗ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~˜ŘΘxorg-server-21.1.16/hw/xquartz/bundle/Resources/no.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013402514757411105024337 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048$%-78=LST[\]fpqvyz!()*123:;DKLMUV_fghrsw{  :;>DWdeoptjQ   %&+01 6:;AR[\qrvwz} *34<=>DST\]^dst|}~ %&6>?@FUV^_`fuv~,->FGHPQRZ[\lstu}~()12BCJKZ[cdst|}     % & 6 7 > ? @ A G O ` a i j { |          # $ ) * / 0 4 5 : ; @ A F X a b l m n s          $ % * + 0 1 6 7 < =     ! " # & 7 8 9 = H I N P S T U V W H i e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%'))XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMeny1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "ZProgrammerP^submenuAction:$%*ZProgrammer1&')#   #!(hTilpass &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -|!"#VNSName*/.{XMainMenu1&'()*+0PX_u)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5VOm X112XY287WValg...Q,22  2kkm2!<<;"YTjenestersmu*=;>1w)__NSServicesMenu22  22BAoSl fullskjermmodus p/avQa22  2UNSTag2F*EYSkjul X11Qh22FH[Skjul andre22!JXVis alle22  22NM[Avslutt X11Qq\_NSAppleMenu-!RRQ"ZProgrammerST*ZProgrammer1׀UV)R  R!WZTilpass...-!ZZY"WRedigerY[*1\)Z^]VKopierQc   -!aa`"UVindu *b`t1cfikloqr) %&aedTLukkQw ./ahgWMinimerQm 8a!jTZoom a   HIanm_Bla gjennom vinduerQ< OHSanp_Bla baklengs gjennom vinduer a   da!soLegg alle verst^_NSWindowsMenummo-!wwv"UHjelpouvx*1xyy)mw!zYX11-hjelp[_NSMainMenuTmenu U~^apps_separator Ā'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ÀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  97 8Y{301, 17}+,  _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$&(*+,.012(679]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,<=]_NSCornerView</1?@AB)EFGHIJKLNOPQRTU\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`XYZ[\]^_`abc[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNavnfghijklmnVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontqrs_NSFontDescriptorAttributesu1vz~WNS.keyswxy{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/QWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorQ\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellXYZ[\]NSControlView_NSPlaceholderString0AYTekstrutefgimn#@*PQB1_controlTextColor+,פ/+,]NSTableColumn/EFGHIJKLPQR #@U#@DXYZ[\]^_bcXKommandoQK0.33333299XYZ[\ŀEFGHIJKLPQR #@M@#@$XYZ[\]^_bcWSnarvei [headerColor QB1C1 1XYZ[\_NSDrawsBackground fgimn#@("$_controlBackgroundColor'(QL0.602715373N0.6666666667 1-/YgridColor23QM0.4246723652E0.5 1+,78[NSTableView79/YNSControlZapps_table>? ƀЀBFHIKLFVNSCellǀ Ȁɀ TVW U_{{15, 245}, {402, 18}}]X^_`\aZbYcdefgj>lQnop_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀ_"Registrer klikk i inaktive vinduerstu[NSImageNamèXNSSwitch+,xy_NSButtonImageSourcex/+,{|\NSButtonCell{/+,~XNSButton~9/]click_through \Ҁ^copy_menu_item ԀBH€Հ ր׀ Vk U^_{{68, 235}, {134, 26}}c^X]\_`dYbQne _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀fgimn WNSState܀ڀ׀!݀ހ*ZFra skjerm__popUpItemAction:ZOtherViews1Հـ߀)ڀ!܀Z256 fargerڀ!܀WTusenerڀ!܀YMillioner+,_NSPopUpButtonCell{/^NSMenuItemCell+,]NSPopUpButton~9/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator BHI#$€ ,V/ U_{{18, 243}, {402, 18}}]X^_`\aZbYcdefgj9Qnop!ˀ󀨀_Godkjenn tilkoblinger[enable_authAB BHILM€Հ _{{18, 182}, {409, 23}}]X^_`\aZbYcdefgjAYQnop!ˀ_Fullskjermmodus_enable_fullscreenab BHIlm€Հ _{{37, 116}, {373, 23}}]X^_`\aZbYcdefgjayQnop!ˀ_+Gi tilgang til menylinjen i fullskjermmodus_enable_fullscreen_menu  BH_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}XYZ[\f@oJMenylinjen blir synlig nr musemarkren plasseres verst p hovedskjermen.fgijmn $ \controlColor+,[NSTextField9/_enable_fullscreen_menu_text  BHIƀ  V TU<<>_{{18, 127}, {402, 18}}BH ?@ #@w.]X^_`\aZbYcdefgjQnop!ˁ _ Aktiver tastaturkommandoer i X11_enable_keyequivs BHI€  _{{18, 166}, {402, 18}}]X^_`\aZbYcdefgj Qnop!ˁ_)Tillat tilkoblinger fra nettverksklienterZenable_tcp  BHI$  _{{18, 243}, {402, 18}}BHI./5 JK B]X^_`\aZbYcdefgj;Qnop!ˁ_Emuler mus med tre knapper\fake_buttonsCD "&BFHINOF€ǀ #$ _{{15, 184}, {402, 18}}]X^_`\aZbYcdefgjC[Qnop!ˁ"%oFokus flger musen_focus_follows_mousecd (,BFHInoF€ǀ )* _{{15, 140}, {402, 18}}]X^_`\aZbYcdefgjc{Qnop!ˁ(+oFokuser p nye vinduer_focus_on_new_window .3BHI /1 0_{{18, 69}, {402, 18}}BH MO N]X^_`\aZbYcdefgjQnop!ˁ.2_%Tilvalg-tastene sender Alt_L og Alt_R_option_sends_alt 5Q\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_{{266, 364}, {484, 342}}XX11-valgWNSPanelZ{320, 240}VU ;1́<)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1)15 $B D0.N)_{{36, 93}, {385, 28}}XYZ[\fAonNr aktivert, kan tastaturkommandoer for menylinjen komme i konflikt med X11-programmer som bruker metatasten.BH$%  CE D_{{36, 195}, {385, 42}}BH67 GH  XYZ[\f5CBFolHold nede Tilvalg- eller Kommando-tasten mens du klikker for aktivere den midtre eller hyre museknappen. _{{36, 151}, {385, 28}}XYZ[\f MDIobGir deg mulighet til legge inn menyendringer som overskriver den nvrende X11-tastaturlayouten._{{18, 185}, {402, 18}}]X^_`\aZbYcdefgj$WQnop!ˁLoFlg systemets tastaturlayout_{{36, 32}, {385, 31}}BHIdè QR <XYZ[\fq0PoiNr dette er aktivert, sender Tilvalg-tastene Alt_L og Alt_R X11-nkkelsymboler i stedet for Mode_switch._{{18, 8}, {418, 18}}]X^_`\aZbYcdefgjzQnop!ˁNS_1Rull alltid i samme retning som fingerbevegelsene_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1X\m)VNSViewYNSTabView\NSIdentifier[Z<YQ1WInndata+,]NSTabViewItem/[Ձl<]Q21Aaԁ_cg)BHՀ `a #@F_{{17, 241}, {49, 17}}XYZ[\f_bWFarger:BHցՀ de #@x@_{{36, 216}, {392, 14}}XYZ[\fcf_8Denne innstillingen trer i kraft neste gang X11 startes.BHՀ hi #@w0_{{36, 148}, {375, 28}}XYZ[\fgjocAktiverer X11-rotvinduet. Sl fullskjermmodus p og av ved trykke p Kommando-Tilvalg-A samtidig._{{10, 33}, {438, 279}}VUtdata[n<]V  Uo1ptx|)BHI!"€n qr n_{{18, 255}, {409, 23}}]X^_`\aZbYcdefgj.Qnop!ˁps_Aktiver synkroniseringBH;<n uv n_{{36, 221}, {385, 28}}XYZ[\fHtwo{Aktiverer kopier-menyobjektet og gjr det mulig synkronisere mellom bufrene i OSX Pasteboard, X11 CLIPBOARD og PRIMARY.BHIST€n yz n_{{34, 129}, {383, 23}}]X^_`\aZbYcdefgj`Qnop!ˁx{o%Oppdater CLIPBOARD nr Utklipp endresBHIlm€n }~ n_{{34, 104}, {383, 23}}]X^_`\aZbYcdefgjyQnop!ˁ|o/Oppdater PRIMARY (midtklikk) nr Utklipp endresBHI€n  n_{{34, 79}, {383, 23}}]X^_`\aZbYcdefgjQnop!ˁo2Oppdater Utklipp umiddelbart nr ny tekst markeresBHI€n  n_{{34, 192}, {383, 23}}]X^_`\aZbYcdefgjQnop!ˁo%Oppdater Utklipp nr CLIPBOARD endresBHn  n#@v_{{48, 158}, {370, 28}}XYZ[\fo`Deaktiver dette valget hvis du vil bruke xclipboard, klipper eller andre X11-utklippshndterere.BHn  n_{{48, 47}, {370, 28}}XYZ[\fojP grunn av begrensninger i X11-protokollen, er det mulig at dette valget ikke fungerer i alle programmer._{{10, 33}, {438, 279}}WUtklippF[ǁ<]1>CcƁ"()BFHFǀ  _{{23, 208}, {385, 31}}XYZ[\f oNr denne funksjonen er aktivert, registreres museklikk i inaktive vinduer nr du klikker i dem, i tillegg til at vinduene aktiveres.BFH  Fǀ  _{{23, 161}, {385, 17}}XYZ[\f #o:X11-vindufokus flger markren. Kan vre upraktisk i bruk.BFH / 0Fǀ  _{{23, 106}, {385, 28}}XYZ[\f <oNr denne funksjonen er aktivert, legges X11.app verst (i stedet for Finder.app, Terminal.app osv.) nr du oppretter et nytt X11-vindu._{{10, 33}, {438, 279}}WVinduer D[<1 H K L M)BH X Y _  #@w_{{36, 195}, {383, 42}}XYZ[\f K foNr du starter X11, opprettes det Xauthority-tilgangskontrolltaster. Hvis maskinens IP-adresse endres, kan ikke disse tastene brukes, noe som kan hindre X11-programmer fra starte.BH s t z  #@v_{{36, 118}, {364, 42}}XYZ[\f L oHvis dette er aktivert, m du for sikre systemet, ogs aktivere Godkjenn tilkoblinger. Nr dette ikke er aktivert, er tilkoblinger fra eksterne programmer ikke tillatt.BH     #@y_{{17, 17}, {404, 14}}XYZ[\f M _9Disse innstillingene trer i kraft neste gang X11 startes._{{10, 33}, {438, 279}}YSikkerhet+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel N_scroll_in_device_direction _sync_clipboard_to_pasteboard$ [sync_keymap p€_sync_pasteboard xĀ_sync_pasteboard_to_clipboard |ƀ_sync_pasteboard_to_primary Ȁ_sync_primary_immediately ʀZsync_text1 ̀Zsync_text2D @΀_toggle_fullscreen_item? 4Ѐ^x11_about_item r ҁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector f Ձ_minimize_window:?  4ׁ_orderFrontStandardAboutPanel:@  6 ف[prefs_show:F  DہUhide:J ! L݁Zterminate:G ' G߁_hideOtherApplications:H - I_unhideAllApplications: 2 \Ucopy: 8 c ]close_window: > i \zoom_window: B D  B G H(HI  P Q(_NSHuggingPriority   V \ `U 2G_{{340, 191}, {131, 32}}]X^_`\ZbYcdef c f B h ion@ !΀XDupliser_apps_table_duplicate: o q  B G H(HI  { |(  _{{340, 159}, {131, 32}}]X^_`\ZbYcdef c f o ion!΀UFjern_apps_table_delete: V _apps_table_show:  B G H(HI   (  _{{340, 223}, {131, 32}}]X^_`\ZbYcde c f ion!΀_Legg til objekt_apps_table_new:  ^prefs_changed:  ^prefs_changed:$  ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:y y  Yx11_help: '  _apps_table_show: l \next_window: o _previous_window:A _enable_fullscreen_changed:D @ _toggle_fullscreen:> ƀ ^prefs_changed:C  " ^prefs_changed:c ( ^prefs_changed:  p ^prefs_changed:  x ^prefs_changed:  |  ^prefs_changed: "  "^prefs_changed: (  $^prefs_changed:a . &^prefs_changed: 4 . (^prefs_changed: : N *^prefs_changed:1 > ׯ ?'2?@ABkCDEFGHIJ()* +my5% 7$/eAMam"<TmF>LCO co 0$ K Y L t M ( B Q o |@NAB&0 ,-02469:#&'E& (-]NSApplication (    /0IJ H18! _{{302, 440}, {485, 271}}_X11-programmenyZ{320, 240}1 B o )1 &0:>)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ҁ)_{{1, 1}, {301, 28}}  H    _NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+, $ %ZNSScroller $9/  H  0  = ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 : ס ;BE > ? @ A B C D   G_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, J K_NSPanGestureRecognizer L M/_NSPanGestureRecognizer_NSGestureRecognizer+, O/+, Q R\NSScrollView Q/Z{485, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 X ׯ'2222B22222222()*        +m5 $AaF>FFCFFcF K L M ( B( o(@AB( -02222:22222222-PRR-XZ-_aaaaaaaa-uw5:<XB D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀈ##E1 ׯ ?'2?@ABkCDEFGHIJ()* +my5% 7$/eAMam"<TmF>LCO co 0$ K Y L t M ( B Q o |@NAB&0 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,-02469:#&' ,}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1 ׯ }       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 נE+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v      = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z | !#%')+->GV]enuz "$&(*.?ACEGPikmoqsuwy{}!NPRTVXZ\^`j{} ?Ajlnoqstvx!#%'0Y[]^`bceg   %')+TVXY[]^`b%')+-/18:gikmoqsuwy!#%-/PRTVXZ\a   .WY[\^`ace %(*,MOQSUWYcot`mv4O[t8Vj8Gau1;DR\dn "#%')*,.024mnpruxz|~   t "'*35>?BEHJLObkmp  ' 6 > I J L N W Y [ \ e n p !!!&!/!1!3!5!7!L!U!r!t!v!!!!!!!!!!!!!!""")"."7"J"O"b"k"r"w"""""""""""""""""###,#9#N#Q#U#W#Y#j#o#u#}####5%5.5;5@5M5V5j5u555555555555555666"6%6'6)6*676:6<6Q6S6U6W6Y6l6u6~666666666666777777 77 7,7.7W7Y7[7]7_7a7c7e7777777777777777777778888"8$8&8S8g8i8k8m8n8p8r8t8v8888888888888899999999)9>9L9R9T9V9_9k9v99999999:: :::::::::::: :":#:$:M:O:R:S:V:Y:[:]:_:x::::;;;';9;H;J;O;T;V;X;Z;\;^;`;c;e;g;;;;;;;;;;;;;<<<<1<3<5<7<9<;>>>>> > > >>>">%>'>)>Z>b>d>f>h>j>l>n>p>r>>>>>>>>>>>>>>>>>>?????? ??B?D?F?H?J?L?N?P?R?T?\?????????????????@@@@@!@#@%@'@6@K@M@O@Q@S@U@_@t@v@x@z@|@~@@@@@@@AAAAAAAAAAA!A"A$A%A&AOAQATAUAXA[A]A_AaAzAAAAAAAAAABBBBBB BeBgBhBiBkBmBoBpBrBtBvBwByBzB{BBBBBBBBBBCCCC C"C%C'CCCCCCCCCCCCCCCCCCCCCCCCD,DEDZD\D^DaDdDfDDEE-E0E2E3E4E6E8E;EHAHBHEHHHJHKHNHOHPHYH\HHHHHHHHHHHHHHIII]I_I`IaIcIeIgIhIkInIpIqIsItIuIIIIIIIIIJ JJ)J+J-J0J3J5JJJJJJJJJJJJJJJJJK)K+K,K-K0K2K4K5K8K;K=K>KAKBKCKFKKKKKKKKKKKKKKKKL;L=L>L?LALCLELFLILLLNLOLQLRLSLlLLLLLLLLLLM MMMMMMtMvMwMxMzM|M~MMMMMMMMMMMMMMMMMN#N9NNNPNRNUNXNZNNNNNNNNNNNNNNNNNOYO\O^O_O`OcOeOhOiOlOoOqOrOuOvOwOzOOOOOOOOOPPPPP P#P%PtPPPPPPPPQQ'QDQ]QoQyQQQQQQQQQQQQQQQQQQQQQRRRR!RJRLRORPRSRURWRYR\ReRhRkRmRRRRRSSSS S SSSSSSSSS!S"S+S.S1S3Sa@aBaEaHaJaLaeaaaaaaaaaaaaaaaabb(b+b-b0b3b6b8c1cccccccccccccccccddddd d dd[dddddddddddddddde(e*e,e.e1e4e6e8eeeeeeeefffff f f ff&fefgfifkfnfqfsfufg7g9g:g;g>g@gBgCgFgIgKgLgOgPgQgjgggggggghhmhphrhshthwhyh|h}hhhhhhhhhhhhhhhhij jjjjjjjjjj"j$j%j(j)j*jBjgjjjljojrjujwkNkgkokkkkkkkkkkkkkkkkl)l,l.l/l0l2l4l7l8l;l>l@lAlClDlEl^lllllllmnn n n nnnnnnnnnn!n"n#nADSdgilo~‚łԂ*;>@CFUfhjmpÃƃՃޅ "$&(*,.02468:<>@BDFHJLNPRTVXZ\^adgjmpsvy|…ąƅȅʅͅЅӅօم܅߅ !$'*-0368:ADGJMPSVY\_behknqtwz}ōȍˍ΍эԍ׍ڍݍ "$'),/258;=?ACEGIKMOQTWY[]_acfo2479;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÐƐɐː͐ϐѐӐՐאِܐߐ  #&),/2468;>ADGJMPSVY[]_behknqtwz}ÑőǑɑˑ͑ϑёԑבڑݑ "%(+.147:=@CFILORUX[^adgjmpsvy|KNQSVY\_behknqtwz}”ŔȔ˔ΔєԔהڔݔ "%(+.147:=@CFILORUX[^adgjmpsvy|ĕǕʕ͕Еӕٕ֕ܕߕ !$'*-0369 LprojCompatibleVersion 106.3 LprojLocale no LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/0000755000175000017500000000000014757411135017035 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/main.nib/0000755000175000017500000000000014757411135020530 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib0000644000175000017500000021016014757411105023234 Kliknięcie z przytrzymanym klawiszem Opcja lub Command emuluje środkowy lub prawy przycisk myszy. Uruchomienie X11 utworzy klucze kontroli dostępu Xauthority. Jeśli adres IP systemu zmieni się, klucze te stracą ważność, co może uniemożliwić uruchamianie programów X11. Gdy pole jest zaznaczone, dla bezpieczeństwa włączona musi być także opcja Uwierzytelniaj połączenia. Gdy pole nie jest zaznaczone, połączenia ze zdalnych programów nie są dozwolone. xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects.nib0000644000175000017500000013527014757411105023622 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048#$,67<KRSZ[\eopuvyz&'(/0189BIJKST]defpquy  :;>DYfgqrvlR   !&+,167 <@AGW`avw{|   /89ABCIXYabcixy  *+<DEFL[\defl{| ()123CKLMUVW_`aqxyz -.67HIPQ`aijyz   ' ( 0 1 A B J K L M S [ l m u v          # $ ) * / 0 5 6 ; < @ A F G L M R d m n x y z           $ % * + 0 1 6 7 < = B C H I        - . / 2 C D E I T U Z \ _ ` a b c  u j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +{}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMenu1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XProgramyP^submenuAction: $)1%&(#   #!'iDostosuj &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,z !"VNSName).-yXMainMenu1%&'()*/PV]s(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4dX11 &1WX176lPreferencje &Q,11  1jjl1!;;:"fUsBugirst)=<>fUsBugi1w(__NSServicesMenu11  11BAoPrzeBczaj peBny ekranQa11  1UNSTag1F*EYUkryj X11Qh11FHoUkryj pozostaBe11!JoPoka| wszystkie11  11NMkZakoDcz X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UiDostosuj &,!XXW"VEdycjaWY)1Z(X\[VKopiujQc   ,!__^"TOkno )`^r1adgijmop( #$_cbWZamknijQw ,-_fe_Minimalizuj oknoQm 6_!hTZoom _   FG_lkoPrzeBczaj midzy oknamiQ` MFQ_lno!PrzeBczaj wstecz pomidzy oknami _   b_!qoUmie[ wszystko na wierzchu^_NSWindowsMenukkm,!uut"UPomocmstv)1vww(k~u!xYPomoc X11[_NSMainMenuTmenu S|^apps_separator ~Ā(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ÀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 ~~57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  97 8Y{301, 17}+,  _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$&(*+,.012(679]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,<=]_NSCornerView</1?@AB(EFGHIJKLMOPQRSUVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@^#@O]`~Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@UNazwahijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/RWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorR\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^U]NSControlView_NSPlaceholderString0A~oKomrka tekstowahikop#@*PRB1_controlTextColor+,٤/+,]NSTableColumn/EFGHIJKLMQRSU #@Y#@D~Z[\]^_`adeYPolecenieRM0.3333329856Z[\]^Uǀ~oKomrka tekstowaEFGHIJKLMQRSU #@Q`#@$~Z[\]^_`adeeSkrt [headerColorRB1C1 1Z[\]^U_NSDrawsBackground~ oKomrka tekstowahik"#op#@((*_controlBackgroundColor-.RL0.602715373N0.6666666667 135YgridColor89RM0.4246723652E0.5 1+,=>[NSTableView=?/YNSControlZapps_tableDE ƀЀHLNPQLVNSCellǀ Ȁɀ Y[\ U_{{15, 245}, {402, 18}}bZcde^f\g[hijkloDqRstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀo,Fokus w nieaktywnym oknie jednym klikniciemxyz[NSImageNamèXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton?/]click_through ZҀ^copy_menu_item ԀHՀ ր׀ [k U^_{{74, 235}, {128, 26}}hcZb^dei[gRsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀hikop WNSState܀ڀ׀!݀ހ)ZZ monitora__popUpItemAction:ZOtherViews1ڀـ߀(ڀ!܀k256 kolorwڀ!܀gTysiceڀ!܀WMiliony+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton?/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator H$N()$ 1[4 U_{{18, 243}, {402, 18}}bZcde^f\g[hijklo>Rstu!ˀ󀦀oUwierzytelniaj poBczenia[enable_authFG HNQRՀ _{{18, 182}, {409, 23}}bZcde^f\g[hijkloF^Rstu!ˀoTryb peBnego ekranu_enable_fullscreenfg HNqrՀ _{{37, 116}, {390, 23}}bZcde^f\g[hijklof~Rstu!ˀo1WBcz dostp z paska menu w trybie peBnoekranowym_enable_fullscreen_menu  H_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@}_{{54, 79}, {468, 31}}Z{250, 750}Z[\]^k@oWPasek menu bdzie pojawiaB si, gdy kursor myszy znajdzie si u gry gBwnego monitora.hiklop * \controlColor+,[NSTextField?/_enable_fullscreen_menu_text  HNˀ  [ TU<<>_{{18, 130}, {402, 18}}H GH #@~?bZcde^f\g[hijkloRstu!ˁ o.WBcz rwnowa|niki klawiszowe w [rodowisku X11_enable_keyequivs H$N$  _{{18, 166}, {402, 18}}bZcde^f\g[hijkloRstu!ˁo-Pozwalaj na poBczenia od klientw sieciowychZenable_tcp  HN"#)  _{{18, 243}, {402, 18}}H45; CE DbZcde^f\g[hijkloARstu!ˁ_ Emuluj mysz z trzema przyciskami\fake_buttonsIJ "&HLNTULǀ #$ _{{15, 184}, {402, 18}}bZcde^f\g[hijkloIaRstu!ˁ"%oFokus pod|a za mysz_focus_follows_mouseij (,HLNtuLǀ )* _{{15, 140}, {402, 18}}bZcde^f\g[hijkloiRstu!ˁ(+_Fokus w nowych oknach_focus_on_new_window .3HN /1 0_{{18, 69}, {402, 18}}H MO NbZcde^f\g[hijkloRstu!ˁ.2o4Klawisze Opcja dziaBaj jak prawy i lewy klawisz Alt_option_sends_alt 5R\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_'{{288, 302.03906000000001}, {600, 341}}_Preferencje X11WNSPanelZ{320, 240}[U ;1с<(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1(1 );? D0.N(H ! @A ._{{36, 93}, {495, 31}}Z[\]^kU.?BogRwnowa|niki klawiszowe paska menu bd mogBy kolidowa z programami X11 u|ywajcymi modyfikatora Meta._{{36, 203}, {495, 34}}HN;< JK  Z[\]^k)UHFobKliknicie z przytrzymanym klawiszem Opcja lub Command emuluje [rodkowy lub prawy przycisk myszy. _{{36, 144}, {495, 31}}Z[\]^kURIoIUmo|liwia zastpienie bie|cej mapy klawiszy X11 zmianami w menu wej[cia._{{18, 179}, {402, 18}}bZcde^f\g[hijklo;\Rstu!ˁDLo!Stosuj systemowy ukBad klawiatury_{{36, 32}, {495, 31}}HNijр QR <Z[\]^kv0PohNaci[nicie klawisza Opcja spowoduje wysBanie symboli klawiszy X11 Alt_L i Alt_R X11, a nie Mode_switch._{{18, 8}, {418, 18}}bZcde^f\g[hijkloRstu!ˁNS_1Zawsze przewijaj zgodnie z kierunkiem ruchu palca_{{10, 33}, {554, 279}}+,/_{{13, 10}, {574, 325}}1X\m(VNSViewYNSTabView\NSIdentifier[Z<YQ1gWej[cie+,]NSTabViewItem/[Ձl<]Q21Ffԁ_cg(HՀ `a #@I_{{17, 238}, {55, 20}}Z[\]^kU_bWKolory:HہՀ de #@v_{{36, 216}, {369, 14}}Z[\]^kUcfo2Opcja bdzie aktywna po ponownym uruchomieniu X11.HՀ hi #@~ _{{36, 145}, {486, 31}}Z[\]^kUgjofWBcza okno gBwne X11. Do wBczania i wyBczania trybu peBnego ekranu sBu| klawisze Command-Opcja-A._{{10, 33}, {554, 279}}gWyj[cie[n<] [ Uo1ptx|(HN&'n qr n_{{18, 255}, {409, 23}}bZcde^f\g[hijklo3Rstu!ˁpsoWBcz synchronizacjH@AGn uv n#@}_{{40, 221}, {483, 28}}Z[\]^kNtwohAktywuje menu kopiowania i umo|liwia synchronizowanie schowka OSX z buforami X11 (CLIPBOARD i PRIMARY).HNYZn yz n_{{38, 129}, {409, 23}}bZcde^f\g[hijklofRstu!ˁx{_,Uaktualniaj bufor CLIPBOARD zmianami SchowkaHNrsn }~ n_{{38, 104}, {489, 18}}bZcde^f\g[hijkloRstu!ˁ|oDUaktualniaj bufor PRIMARY ([rodkowy przycisk myszy) zmianami SchowkaHNn  n_{{38, 79}, {432, 18}}bZcde^f\g[hijkloRstu!ˁ_  3Ѐ^x11_about_item p ҁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  d Ձ_minimize_window:>  3ׁ_orderFrontStandardAboutPanel:? ! 5 ف[prefs_show:E ' DہUhide:I - L݁Zterminate:F 3 G߁_hideOtherApplications:G 9 I_unhideAllApplications: > ZUcopy: D a ]close_window: J g \zoom_window: N P  H S T(N  \ ](_NSHuggingPriority   [ h lU 2G_{{340, 191}, {104, 32}}bZcde^\g[hijk o r N t uts@ !΀VPowiel_apps_table_duplicate: { }  H S T(N   (  _{{340, 159}, {104, 32}}bZcde^\g[hijk o r { uts!΀dUsuD_apps_table_delete: T _apps_table_show:  H S T(N   (  _{{340, 223}, {104, 32}}bZcde^\g[hij o r uts!΀[Dodaj rzecz_apps_table_new:  ^prefs_changed:  ^prefs_changed:; D ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:w w  Yx11_help: &  _apps_table_show: j \next_window: m _previous_window:F _enable_fullscreen_changed:C  @ _toggle_fullscreen:D ƀ ^prefs_changed:I  " ^prefs_changed:i  ( ^prefs_changed:  p ^prefs_changed: " x ^prefs_changed: ( |  ^prefs_changed: .  "^prefs_changed: 4  $^prefs_changed:f : &^prefs_changed: @ . (^prefs_changed: F N *^prefs_changed:1 J  K&1>?@AjBCDEFGHI'() *kw#!)5;<jFRfr'AZsLDQ IU iu ;$) W e X Y ( N ] { @OAB&0 ,,/13589;?@CDGIKLPQSTVXZ]_adgijmopsuw 5:<X?AE HDK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀆀~:>#%&E& (-]NSApplication (    /0IJ H18! _{{333, 380}, {454, 271}}oMenu programw X11Z{320, 240}1 N { (1 &0:>(1 ~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 р(_{{1, 1}, {301, 28}}   $ & ) )_NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+, 0 1ZNSScroller 0?/   $ < ) )= ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 F GBE J K L M N O P   S_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, V W_NSPanGestureRecognizer X Y/_NSPanGestureRecognizer_NSGestureRecognizer+, [/+, ] ^\NSScrollView ]/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 d &1111A11111111'()        *k);FfLDLLILLiL$$$ W$ X$ Y ( N( {(@AB( ,/1111911111111,PQQ,VX,]________,su5:<X? D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀆ~~~##E1  K&1>?@AjBCDEFGHI'() *kw#!)5;<jFRfr'AZsLDQ IU iu ;$) W e X Y ( N ] { @OAB&0 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,,/13589;?@CDGIKLPQSTVXZ]_adgijmopsuw 5:<X?AE HDK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀆀~:>#%& +{}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 㠁E+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v      = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z |  3<KRZcjox #468:<E^`bdfhjlnprtvx "$%')VXZ\^`bdfhu "QS|~BDFHJLNo&(*,.02468EGIKTY[]_   )+-/8;=?`bdfhjlsu!#%')+35VXZ\^`buw   @BcejlnprtVe*,.024CXZ\^`b4BQz:\j|+5On-PRUWY[\^_abkmoprtvwxz (NY[^_acfhkmprtuxz|'(*,/24689<>@JSgp.<HQfy     % ' * A J X a j q s u w y !!!!!!!'!)!+!,!.!7!@!B!c!o!y!!!!!!!!!!!!!!!!""""" ""("E"G"I"V"^"e"g"i"k"r"t"v"x"z""""""## ##"#5#>#E#J#W#_#l#z#|##############$$$#$&$*$,$.$?$D$J$R$T$V$X$Z56666"6+6?6J6\6i6p66666666666667777777%7(7*7?7A7C7E7G7Z7c7l7u777777777777777777888#8%8N8P8R8T8V8X8Z8\888888888888888889999999)9>9A9E9G9I9v99999999999999999999::(:5:D:F:H:]:_:a:c:e:o::::::::::::::::;K;R;T;U;V;X;Z;\;];_;a;c;d;f;g;h;;;;;;;;;;;<<<4>>@>A>B>D>F>H>I>K>M>O>P>R>S>T>}>>>>>>>>>>? ??0?M?X?j?l?n?s?|?~??????????????????????????@ @@)@2@;@=@?@A@C@E@r@t@v@x@z@|@~@@@@@@@@@@@@@@@AAAAAA A"A$A&A(A0A9AMAZAiArAAAAAAAAAAAAAAAAAABBBBB B!B6B8B:BB@BBBBBBBBBBBBBBBBBBBBBBBBCCDCFCHCJCLCNCPCRCCCCCCCCD DDDDDDDDDDDD!D"D#DG?GHG`GkGGGGGGGGHVHgHjHlHnHHHHHHHHHHHHHHHHIWIYIZI[I^I`IbIcIfIiIkIlIoIpIqItIIIIIIIIIIIIJBJEJGJHJIJLJNJQJRJUJXJZJ[J^J_J`JiJlJJJJJJJJKK-KBKDKFKIKLKNKKKKKKKKKKKKKKKKLLLLL"L%L'L)LLLLLLLLMMMMMMMMM M#M%M&M)M*M+M.MGMMMMMMMMMMMMMMMMMNNNNNNN N"NENRNgNiNkNnNqNsNNNNNNNNNNNNNNNNO>O@OBODOGOJOLONO{OOOOOOOP PPPPPPPPPP P!P#P$P%P>P}PPPPPPPPPPPPPPPQ;Q=Q>Q?QBQDQFQGQJQMQOQPQSQTQUQXQpQQQQQQQQQQQQQQQQQR;R=R?RARDRGRIRKRRRRRRRRS9SFSfStS~SSSSSST T"T4T>TLTXTkTTTTTTTTTTTTTTTTTTTTTTU'U)U,U-U0U2U4U6U9UBUEUHUJUUUUUUUUUUUUUUUUUUUUVV VVVV,V/V2V5V8V;V>VAVDVGVIVVVVVVVVVVVVVVVVVVWWWWW W#W&W(WXXqXsXtXuXxXzX|X}XXXXXXXXXXXXXXXXYYYYYYYYYYZyZZZZZZZZZ[&[>[[[[[[[[[[[[[[[[[[[[[[[\\]]]]]!]$]&](]\]u]~]]]]]]]]]]]]]]]^^^^ ^ ^^^&^4^9^R^U^X^Z^]^`^c^e^n^}^^^^^^^^^^^^^_____ _ _______5_^_a_c_e_g_j_m_o_w________________```E`H`J`M`O`R`U`W`a%a(a*a+a,a.a0a3a4a7a:ap@pApBpDpFpIpJpMpPpRpSpUpVpWp`pyppppppppqAqqqqqqqqqqqqqqqqqrrr r rrrrss-s2sGsJsLsOsRsUs^sisksnsqstswsysssssssssssssssstttGtJtLtOtQtTtWtYuvvvvvv v"v%v&v)v,v.v/v1v2v3vz[zpzrztzwzzz|zzzzzzzzzzzzzzz{{{{{{{;{P{R{T{W{Z{\{y{{{{{{{{{{{{{{{{{{||| |"|$|&|(|+|-|F|[|]|_|a|d|f|u|||||||||||||||}}}}}}"}B}S}U}W}Z}]}i}z}|}~}}}}}}}}}}}}}}}}}}}}~~%~'~*~-~3~D~F~H~K~N~\~m~o~q~t~w~~~~~~~!"%(*+./03\^abegikny{|}&(*-0CTWY\_ŁǁɁʁ́ЁҁӁցׁ؁ہ.79;>ACEQctwy|ʂ͂ς҂Ղ"$'*9JLNQTctvx{~ǃɃ˃΃уރ !$'DUWY\_tɄڄ݄߄ 0358;J[^`cfu˅܅ޅ  1469@CFILORUX[^adgjmpsvy|ĈLjʈ͈Јӈֈو܈ވ 'vy{~ #%'*,/1:=?AXqz-?ACDEGIKNORTVYZ[^v  !$=V_behڍ>[^`bečڍ+6?H{}ÏŏǏɏ̏ϏҏՏ؏ۏޏ !$&)+-/1368;>ADGJMPSVY\_behknqtwy{}ÐƐȐʐ̐ΐАҐԐ֐ؐڐܐߐ’ĒƒȒʒ̒ΒВҒԒ֒ؒڒܒޒ !$'*-0369@BDFHJLNPRTVXZ\_behknqtwz}”ŔȔ˔ΔєԔהڔݔ ֖ٖܖޖ  #&),/258;>ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ  )*,569BQVxorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013523714757411105024344 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata0 %)*048#$,67<KRSZ[\eopuvyz&'(/0189BIJKST]defpquy 89<BWdeoptjP $)*/45 :>?EV_`uvz{~  .78@ABHWX`abhwx )*;CDEKZ[cdekz{ '(012BJKLTUV^_`pwxy ,-56GHOP_`hixy   & ' / 0 @ A I J K L R Z k l t u        " # ( ) . / 4 5 : ; ? @ E F K L Q c l m w x y ~         # $ ) * / 0 5 6 ; < A B G H        , - . 1 B C D H S T Y [ ^ _ ` a b L t i      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysMK+..-/L&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +{}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMenu1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "XProgramyP^submenuAction: $)1%&(#   #!'iDostosuj &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,z !"VNSName).-yXMainMenu1%&'()*/PV]s(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4dX11 &1WX176lPreferencje &Q,11  1jjl1!;;:"fUsBugirst)=<>fUsBugi1w(__NSServicesMenu11  11BAoPrzeBczaj peBny ekranQa11  1UNSTag1F*EYUkryj X11Qh11FHoUkryj pozostaBe11!JoPoka| wszystkie11  11NMkZakoDcz X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UiDostosuj &,!XXW"VEdycjaWY)1Z(X\[VKopiujQc   ,!__^"TOkno )`^r1adgijmop( #$_cbWZamknijQw ,-_fe_Minimalizuj oknoQm 6_!hTZoom _   FG_lkoPrzeBczaj midzy oknamiQ` MFQ_lno!PrzeBczaj wstecz pomidzy oknami _   b_!qoUmie[ wszystko na wierzchu^_NSWindowsMenukkm,!uut"UPomocmstv)1vww(k~u!xYPomoc X11[_NSMainMenuTmenu S|^apps_separator ~Ā'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ÀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews6 ~~57 4Z{301, 186}[NSTableView_NSViewIsLayerTreeHost ~  97 8Y{301, 17}+,  _NSTableHeaderView  /_NSTableHeaderViewVNSView[NSResponder  !"$&()*,./0&457]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification:2F#@#? >A@OA A AA#?3_{{302, 1}, {16, 28}}+,:;]_NSCornerView: /1=>?@(CDEFGHIJKMNOPQSTU\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@[#@O]`~XYZ[\]^_`abc[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@UNazwafghijklmnVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontqrs_NSFontDescriptorAttributesu1vz~WNS.keyswxy{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/PWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorP\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellXYZ[\S]NSControlView_NSPlaceholderString0A~oKomrka tekstowafgimn#@*PPB1_controlTextColor+,פ/+,]NSTableColumn/CDEFGHIJKOPQS #@U#@D~XYZ[\]^_bcYPoleceniePM0.3333329856XYZ[\Sŀ~oKomrka tekstowaCDEFGHIJKOPQS #@L#@$~XYZ[\]^_bceSkrt  [headerColorPB1C1 1XYZ[\S_NSDrawsBackground~ oKomrka tekstowafgi !mn#@(&(_controlBackgroundColor+,PL0.602715373N0.6666666667 113YgridColor67PM0.4246723652E0.5 1+,;<[NSTableView;= /YNSControlZapps_tableBC ƀЀFJLMOPJVNSCellǀ Ȁɀ XZ[ U_{{15, 245}, {402, 18}}aXbcd\eZfYghijknBpPrst_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !ˀƀʀo,Fokus w nieaktywnym oknie jednym klikniciemwxy[NSImageNamèXNSSwitch+,|}_NSButtonImageSource|/+,\NSButtonCell/+,XNSButton= /]click_through ZҀ^copy_menu_item ԀFLՀ ր׀ Zk U^_{{74, 235}, {128, 26}}gbXa\cdhYfPri _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionԀ@ @@ !؀fgimn WNSState܀ڀ׀!݀ހ)ZZ monitora__popUpItemAction:ZOtherViews1ــ߀(ڀ!܀k256 kolorwڀ!܀gTysiceڀ!܀WMiliony+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton= /Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F#LM'(# 0Z3 U_{{18, 243}, {402, 18}}aXbcd\eZfYghijkn=Prst!ˀ󀦀oUwierzytelniaj poBczenia[enable_authEF FLMPQՀ _{{18, 182}, {409, 23}}aXbcd\eZfYghijknE]Prst!ˀoTryb peBnego ekranu_enable_fullscreenef FLMpqՀ _{{37, 116}, {390, 23}}aXbcd\eZfYghijkne}Prst!ˀo1WBcz dostp z paska menu w trybie peBnoekranowym_enable_fullscreen_menu  FL_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthՀ  #@}_{{54, 79}, {468, 31}}Z{250, 750}XYZ[\j@oWPasek menu bdzie pojawiaB si, gdy kursor myszy znajdzie si u gry gBwnego monitora.fgijmn ( \controlColor+,[NSTextField= /_enable_fullscreen_menu_text  FLMʀ  Z TU<<>_{{18, 130}, {402, 18}}FL GH #@~?aXbcd\eZfYghijknPrst!ˁ o.WBcz rwnowa|niki klawiszowe w [rodowisku X11_enable_keyequivs F#LM#  _{{18, 166}, {402, 18}}aXbcd\eZfYghijknPrst!ˁo-Pozwalaj na poBczenia od klientw sieciowychZenable_tcp  FLM!"(  _{{18, 243}, {402, 18}}FL34: CE DaXbcd\eZfYghijkn@Prst!ˁ_ Emuluj mysz z trzema przyciskami\fake_buttonsHI "&FJLMSTJǀ #$ _{{15, 184}, {402, 18}}aXbcd\eZfYghijknH`Prst!ˁ"%oFokus pod|a za mysz_focus_follows_mousehi (,FJLMstJǀ )* _{{15, 140}, {402, 18}}aXbcd\eZfYghijknhPrst!ˁ(+_Fokus w nowych oknach_focus_on_new_window .3FLM /1 0_{{18, 69}, {402, 18}}FL MO NaXbcd\eZfYghijknPrst!ˁ.2o4Klawisze Opcja dziaBaj jak prawy i lewy klawisz Alt_option_sends_alt 5P\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask67: 9@x8!_'{{288, 302.03906000000001}, {600, 341}}_Preferencje X11WNSPanelZ{320, 240}ZU ;1Ё<(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsXW V:: = 1(1 (:? D0.N(FL  @A ._{{36, 93}, {495, 31}}XYZ[\jS-?BogRwnowa|niki klawiszowe paska menu bd mogBy kolidowa z programami X11 u|ywajcymi modyfikatora Meta._{{36, 203}, {495, 34}}FLM:; JK  XYZ[\j(SGFobKliknicie z przytrzymanym klawiszem Opcja lub Command emuluje [rodkowy lub prawy przycisk myszy. _{{36, 144}, {495, 31}}XYZ[\jSQIoIUmo|liwia zastpienie bie|cej mapy klawiszy X11 zmianami w menu wej[cia._{{18, 179}, {402, 18}}aXbcd\eZfYghijkn:[Prst!ˁDLo!Stosuj systemowy ukBad klawiatury_{{36, 32}, {495, 31}}FLMhiЀ QR <XYZ[\ju0PohNaci[nicie klawisza Opcja spowoduje wysBanie symboli klawiszy X11 Alt_L i Alt_R X11, a nie Mode_switch._{{18, 8}, {418, 18}}aXbcd\eZfYghijkn~Prst!ˁNS_1Zawsze przewijaj zgodnie z kierunkiem ruchu palca_{{10, 33}, {554, 279}}+,  /_{{13, 10}, {574, 325}}1X\m(VNSViewYNSTabView\NSIdentifier[Z<YQ1gWej[cie+,]NSTabViewItem/[Ձl<]Q21Eeԁ_cg(FLՀ `a #@I_{{17, 238}, {55, 20}}XYZ[\jS_bWKolory:FLځՀ de #@v_{{36, 216}, {369, 14}}XYZ[\jScfo2Opcja bdzie aktywna po ponownym uruchomieniu X11.FLՀ hi #@~ _{{36, 145}, {486, 31}}XYZ[\jSgjofWBcza okno gBwne X11. Do wBczania i wyBczania trybu peBnego ekranu sBu| klawisze Command-Opcja-A._{{10, 33}, {554, 279}}gWyj[cie[n<] Z Uo1ptx|(FLM%&n qr n_{{18, 255}, {409, 23}}aXbcd\eZfYghijkn2Prst!ˁpsoWBcz synchronizacjFL?@Fn uv n#@}_{{40, 221}, {483, 28}}XYZ[\jMtwohAktywuje menu kopiowania i umo|liwia synchronizowanie schowka OSX z buforami X11 (CLIPBOARD i PRIMARY).FLMXYn yz n_{{38, 129}, {409, 23}}aXbcd\eZfYghijknePrst!ˁx{_,Uaktualniaj bufor CLIPBOARD zmianami SchowkaFLMqrn }~ n_{{38, 104}, {489, 18}}aXbcd\eZfYghijkn~Prst!ˁ|oDUaktualniaj bufor PRIMARY ([rodkowy przycisk myszy) zmianami SchowkaFLMn  n_{{38, 79}, {432, 18}}aXbcd\eZfYghijknPrst!ˁ_  3Ѐ^x11_about_item p ҁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  d Ձ_minimize_window:>  3ׁ_orderFrontStandardAboutPanel:? 5 ف[prefs_show:E & DہUhide:I , L݁Zterminate:F 2 G߁_hideOtherApplications:G 8 I_unhideAllApplications: = ZUcopy: C a ]close_window: I g \zoom_window: M O  F R S&LM  [ \&_NSHuggingPriority   Z g kU 2G_{{340, 191}, {104, 32}}aXbcd\ZfYghij n q M s tsr@ !΀VPowiel_apps_table_duplicate: z |  F R S&LM   &  _{{340, 159}, {104, 32}}aXbcd\ZfYghij n q z tsr!΀dUsuD_apps_table_delete: T _apps_table_show:  F R S&LM   &  _{{340, 223}, {104, 32}}aXbcd\ZfYghi n q tsr!΀[Dodaj rzecz_apps_table_new:  ^prefs_changed:  ^prefs_changed:: D ^prefs_changed: ^prefs_changed:  ^prefs_changed: Ԁ ^prefs_changed:w w  Yx11_help: &  _apps_table_show: j \next_window: m _previous_window:E _enable_fullscreen_changed:C  @ _toggle_fullscreen:B ƀ ^prefs_changed:H  " ^prefs_changed:h  ( ^prefs_changed:  p ^prefs_changed: ! x ^prefs_changed: ' |  ^prefs_changed: -  "^prefs_changed: 3  $^prefs_changed:e 9 &^prefs_changed: ? . (^prefs_changed: E N *^prefs_changed:1 I  J&1>?@AjBCDEFGHI'() *kw" (4:;iEQeq&@YrJBP HT ht :#( V d W  X & M \ z >M?@$. ,,/13589;?@CDGIKLPQSTVXZ]_adgijmopsuw 5:<X?AE HDK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀆀~:>#%&E& (-]NSApplication &    /0IJ H18! _{{333, 380}, {454, 271}}oMenu programw X11Z{320, 240}1 M z (1 $.:>(1 ~(_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView  /1 Ѐ(_{{1, 1}, {301, 28}}  L # % ( (_NSControlTarget_NSControlAction= ;<<_{{1, 215}, {301, 15}}\_doScroller:+, / 0ZNSScroller /= /  L # ; ( (= ?<<_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 E FBE I J K L M N O   R_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionDC__panWithGestureRecognizer:+, U V_NSPanGestureRecognizer W X/_NSPanGestureRecognizer_NSGestureRecognizer+, Z/+, \ ]\NSScrollView \ /Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 c &1111A11111111'()        *k(:EeJBJJHJJhJ### V# W# X & M& z&>?@& ,/1111911111111,PQQ,VX,]________,su5:<X? D0.N<\ՀԀ׀ڀڀڀڀՁ_ՁcՀՀՁgՁ<mnpntnxn|nnnn<ǀƀǁǁ"ǁǁ(ǁ<.ꀆ~~~##E1  J&1>?@AjBCDEFGHI'() *kw" (4:;iEQeq&@YrJBP HT ht :#( V d W  X & M \ z >M?@$. :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~,,/13589;?@CDGIKLPQSTVXZ]_adgijmopsuw 5:<X?AE HDK0O.1NR\ՀԀ׀ڀـ߀_acegimnprtvxz|~ǀƀɁ"$(*.򀆀~:>#%& +{}ŀрӀ !'-4ÁŁǁɁˁ́ρсԁց؁ځ܁ށ   !#%')E1  }       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~NOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,E     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ⠁E+,^NSIBObjectData/",1:?QZw '5BTb~ '2;JOXalmox , . 0 2 4 6 8 : < > @ B D F H K N Q T W Z ] ` c f i l o r u x { ~  ! ) Q S U W Y [ d f h v      = K R f t ~  ( * , . 0 2 4 < N [ f q s u w    ! N W a j l n p r t v x z |  3<KRZcjox #468:<E^`bdfhjlnprtvx "$%')VXZ\^`bdfhu "QS|~BDFHJLNo&(*,.02468EGIKTY[]_   )+-/8;=?`bdfhjlsu!#%')+35VXZ\^`buw   @BcejlnprtVe*,.024CXZ\^`b0>Mv6Xfx '1Kj9;>@BDEGHJKTVXY[]_`achjs|~5@BEFHJMORTWY[\_acn #%'1:NWkr~#/8M`u    ( 1 ? H Q X Z \ ^ ` !!!!!!!!!!!'!)!J!V!`!k!w!!!!!!!!!!!!!!!!!!!""","."0"="E"L"N"P"R"Y"["]"_"a"w"""""""## ##%#,#1#>#F#S#a#c#l#t#y#############$ $ $$$$&$+$1$9$;$=$?$A55556 66&616C6P6W66666666666666666667 777&7(7*7,7.7A7J7S7\7j7o7777777777777777778 8 8587898;8=8?8A8C8f888888888888888888899999%9(9,9.909]9q9s9u9w9x9z9|9~9999999999999:::+:-:/:D:F:H:J:L:V:k:y::::::::::::::;2;9;;;<;=;?;A;C;E;F;H;J;L;M;O;P;Q;z;|;;;;;;;;;;<<=K=T=]=f=q==============>'>)>*>+>->/>1>2>4>6>8>9>;><>=>f>h>k>l>o>r>t>v>x>>>???6?A?S?U?W?\?e?g?h?i?j?l?n?p?r?t???????????????????@@@@$@&@(@*@,@.@[@]@_@a@c@e@g@i@k@m@@@@@@@@@@@@@AAAAA A A AAAA"A6ACARA[AiAvA|AAAAAAAAAAAAAAAAAAAAB BB!B#B%B'B)BBBBBBBBBBBBBBBBBBBBBBBBBC-C/C1C3C5C7C9C;CpC|CCCCCCCCCCCCDDDDDDD D D D%DdDfDhDjDlDnDpDrDDDDDDDDE*E,E-E.E0E2E4E5E7E9E;EE?E@EYEEEEEEEEF F$F9F;F=F@FCFEFFFG GGGGGGGGGG!G#G$G&G'G(G1GIGTGyG|G~GGGGGH?HPHSHUHWHlHnHqHsHuHHHHHHHHHHHI@IBICIDIGIIIKILIOIRITIUIXIYIZI]IIIIIIIIIIIIJ+J.J0J1J2J5J7J:J;J>JAJCJDJGJHJIJRJUJJJJJJJJKKK+K-K/K2K5K7KKKKKKKKKKKKKKKKLLLLL LLLLoLzLLLLLLLLLLMMMMM M MMMMMMM0MMMMMMMMMMMMMMMMMMMMNNNN N N.N;NPNRNTNWNZN\NNNNNNNNNNNNNNNNO'O)O+O-O0O3O5O7OdOzOOOOOOOOOOOOPPPPP P P P PP'PfPhPjPlPoPrPtPvPPPPPPPPQ$Q&Q'Q(Q+Q-Q/Q0Q3Q6Q8Q9QQAQYQQQQQQQQQQQQQQQQQR$R&R(R*R-R0R2R4RRRRRRRRS"S/SOS]SgStS~SSSSST TT'T5TATTThTkTmTpTsTvTyT|T}TTTTTTTTTTTTTUUUUUUUUU"U+U.U1U3U~UUUUUUUUUUUUUUUUUUUUUUUVVVVVV!V$V'V*V-V0V2VVVVVVVVVVVVVVVVVVVWWWW W WWWWXZX\X]X^XaXcXeXfXiXlXnXoXrXsXtXwXXXXXXXXYyYYYYYYYYYZbZ{ZZZZZZZZ[['[[[[[[[[[[[[[[[[[[[[[[[\\]]]]] ] ]]]E]^]g]n]]]]]]]]]]]]]]]]]]]]^^^^"^;^>^A^C^F^I^L^N^W^f^h^k^n^p^r^u^x^z^^^^^^^^^^^^^^^^___G_J_L_N_P_S_V_X_`_________________``.`1`3`6`8`;`>`@`aaaaaaaaaa a#a%a&a(a)a*a3aLauaxaza}aaaabVbob~bbbbbbbbbbbbbbbbbbcccc c cccccscucvcwczc|c~cccccccccccccccccd dddddddddddddddddddddddddef*f,f-f.f1f3f5f6f9ff?fBfCfDf]fffffffffg6g8g9g:g=g?gAgBgEgHgJgKgNgOgPgigggggggghChhhhhhhhhhhhhhhhiiiiiiiii^iiiiiiiiiiiiiiiij+j-j/j1j4j7j9j;jkjjjjjjjjjjjjjjjjjkk7k:kp?p@pIpbppppppppq*qqqqqqqqqqqqqqqqqqqqqqqqrrsss0s3s5s8s;s>sGsRsTsWsZs]s`sbssssssssssssssssstt0t3t5t8t:t=t@tBuvvvvvv v vvvvvvvvvv%v>vgvjvlvovqvtvwvywxOxRxTxUxVxXxZx]x^xaxdxfxgxixjxkxtxxxxxxxxxy2yKyZycymyvyyyyyyyyyzzzzz"z%z'zDzYz[z]z`zczezzzzzzzzzzzzzzzzzz{{{{${9{;{={@{C{E{b{w{y{{{~{{{{{{{{{{{{{{{{{| | |||||/|D|F|H|J|M|O|^|o|q|s|v|y|||||||||||}}}}} }+}<}>}@}C}F}R}c}e}g}j}m}s}}}}}}}}}}}}}}}}}~~~~~~~-~/~1~4~7~E~V~X~Z~]~`~m~~~~~~~~~  EGJKNPRTWqbdefikmnqtvwz{|ҀԀրـ܀ހ,=@BEHāނ "$'*,.:L]`behw͂ނ "357:=L]_adgqǃ؃ڃ܃߃ ->@BEH]npruxÄƄȄ˄΄݄!$3DGILO^ortwzŅDžɅ̅υޅ "%4=psuwy{}ÇƇɇ̇χ҇Շ؇ۇއ !#%'),/258;>ADGJMPSVY\_behknprtwz}ˆňLjɈˈ͈ψшӈՈ׈ڈ݈߈_bdgjmpstwz}Ήى #&(*AZcnw(*,-.02478;=?BCDG_lu &?HKNQnÌ'DGIKNktÍ̍эڍ(1dfhjlnprtvxz|~ďǏʏ͏Џӏ֏ُ܏ߏ !$'*-0369ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^acegikmoqsuwy{}ÙřǙə˙͙ϙљәՙיٙۙݙߙ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÚŚǚɚ˚͚ϚњӚ՚ךٚۚݚߚ "+:?xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/Localizable.strings0000644000175000017500000001021014757411105022600 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Czy na pewno chcesz zakoDczy X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Wszystkie otwarte programy X11 zostan natychmiast zatrzymane, a niezachowane zmiany utracone."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Przej[ do trybu RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Program za|daB od X11 zmiany rozdzielczo[ci ekranu. X11 przywrci poprzedni stan ekranu, gdy ten sam program tego za|da. Mo|esz tak|e wymusi przywrcenie przez X11 poprzedniego stanu, u|ywajc klawiszy #%#A."; /* No comment provided by engineer. */ "Allow" = "Pozwl"; /* No comment provided by engineer. */ "Always Allow" = "Zawsze pozwalaj"; /* No comment provided by engineer. */ "Cancel" = "Anuluj"; /* No comment provided by engineer. */ "Mac Help" = "Pomoc Maca"; /* No comment provided by engineer. */ "Quit" = "ZakoDcz"; /* No */ "No" = "Nie"; /* Yes */ "Yes" = "Tak"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Masz ju| plik ~/.xinitrc.\n\nOkna wy[wietlane przez programy X11 mog nie mie paskw tytuBowych lub wyglda inaczej ni| okna programw rdzennych.\n\nCzy chcesz porzuci istniejcy plik i u|y standardowego [rodowiska X11 przy kolejnym uruchomieniu X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Sprawdz uaktualnienia X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist0000644000175000017500000000061014757411105022207 LprojCompatibleVersion 106.3 LprojLocale pl LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt.lproj/0000755000175000017500000000000014757411136017046 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt.lproj/main.nib/0000755000175000017500000000000014757411136020541 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib0000644000175000017500000021100114757411105023237 Mantenha pressionadas as teclas Opção ou Comando ao clicar para ativar o botão da direita ou o botão central do mouse. Ativa o item de menu "copiar" e permite a sincronização entre a Área de Colagem do OSX e a ÁREA DE TRANSFERÊNCIA e os buffers PRINCIPAIS do X11. Quando esta opção está selecionada, a ação de clicar em uma janela inativa faz com que o clique do mouse seja ativado para essa janela, a qual também é ativada. Quando esta opção está ativada, a criação de uma nova janela do X11 move o X11.app para o segundo plano (em vez do Finder.app, Terminal.app, etc.) A execução do X11 criará as chaves de controle de acesso Xauthority. Se mudar o endereço de IP do sistema, essas chaves tornam-se inválidas, o que pode impedir a execução dos aplicativos do X11. Se ativadas, as conexões Autenticar também podem ser ativadas para garantir a segurança do sistema. Se desativadas, as conexões dos aplicativos remotos não são permitidas. xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects.nib0000644000175000017500000013603614757411105023633 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048$%-78=LST[\]fpqvwz{")*+234;<ELMNVW`ghistx| =>AGZghrswmT #().34 9=>DT]^stxy| ,56>?@FUV^_`fuv~'(9ABCIXYabcixy/78IJRST\]^nuvw*+34EFMN]^fgvw   # $ + , < = D E F G M U f g o p          " # ( ) . / 4 5 9 : ? @ E F K ] f g q r s x         # $ ) * / 0 5 6 ; < A B     & ' ( + < = > B M N S U X Y Z [ \  n g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[AplicativosP^submenuAction:$%*[Aplicativos1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -}!"#VNSName*/.|XMainMenu1&'()*+0QY`v)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5[Sobre o X112XY287oPreferncias...Q,22  2kkm2!<<;"hServiosstu*>=?hServios1x)__NSServicesMenu22  22CB_Alternar Tela CheiaQa22  2UNSTag2G*F[Ocultar X11Qh22GI^Ocultar Outros22!K\Mostrar Tudo22  22ON\Encerrar X11Qq\_NSAppleMenu-!SSR"[AplicativosTU*[Aplicativos1؀VW)S  S!X_Personalizar...-![[Z"VEditarZ\*1])[_^VCopiarQc  -!bba"VJanela*cau1 dgjlmprs) &'bfeVFecharQw /0bihYMinimizarQm 9b!k_Reduzir/Ampliar b   IJbon_Percorrer JanelasQ` PITboq_$Percorrer Janelas no Sentido Inverso b   eb!t_Trazer Todas Para a Frente^_NSWindowsMenunnp-!xxw"UAjudapvwy*1yzz)nx!{YAjuda X11[_NSMainMenuTmenu V^apps_separator ŀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ĀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{333, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{333, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{334, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE)HIJKLMNOQRSTUWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@`d`#@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomeijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_]NSControlView_NSPlaceholderString0AYText Cellijlpq#@*PTB1_controlTextColor+,ڤ/+,]NSTableColumn/HIJKLMNOSTU #@[#@D[\]^_`abefWComandoTK0.33333299[\]^_ȀHIJKLMNOSTU #@T@#@$[\]^_`abefVAtalho  [headerColorTB1C1 1[\]^__NSDrawsBackground ijl pq#@(%'_controlBackgroundColor*+TL0.602715373N0.6666666667 102YgridColor56TM0.4246723652E0.5 1+,:;[NSTableView:</YNSControlZapps_tableAB ǀрEIKMNIVNSCellȀ ɀʀ VXY V_{{15, 245}, {402, 18}}_[`ab_c]d\efghilAnTpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀ_Clicar em Janelas Inativasuvw[NSImageNamèXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton</]click_through ]Ӏ^copy_menu_item ՀEĀր ׀؀ Xl V__{{64, 241}, {128, 26}}e`[__abf\dTpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـijlpq WNSState݀ۀ؀!ހ߀*WDa Tela__popUpItemAction:ZOtherViews1׀ڀ)ۀ!݀Y256 Coresۀ!݀XMilharesۀ!݀gMilhes+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton</Udepth #^dock_apps_menu Ydock_menu _dock_window_separator E!K%&!Ā .X1 V_{{18, 243}, {402, 18}}_[`ab_c]d\efghil;Tpqr!̀􀩀oAutenticar conexes[enable_authCD EKNOĀր _{{18, 182}, {409, 23}}_[`ab_c]d\efghilC[Tpqr!̀_Modo de tela cheia_enable_fullscreencd EKnoĀր _{{37, 116}, {409, 23}}_[`ab_c]d\efghilc{Tpqr!̀o3Permitir acesso barra de menus no modo tela cheia_enable_fullscreen_menu  E_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@H_{{54, 79}, {525, 31}}Z{250, 750}[\]^_h @odA barra de menus ficar visvel quando o cursor do mouse for posicionado sobre a sua tela principal.ijlmpq ' \controlColor+,[NSTextField</_enable_fullscreen_menu_text EKȀ  X UV==?_{{18, 130}, {402, 18}}E @A #@8/_[`ab_c]d\efghilTpqr!́_%Ativar as teclas equivalentes sob X11_enable_keyequivs E!K!Ā  _{{18, 166}, {402, 18}}_[`ab_c]d\efghil Tpqr!́o%Permitir conexes de clientes da redeZenable_tcp !EK &  _{{18, 253}, {402, 18}}E128 CE D_[`ab_c]d\efghil>Tpqr!́ oEmular mouse de trs botes\fake_buttonsFG #'EIKQRIĀȀ $% _{{15, 184}, {402, 18}}_[`ab_c]d\efghilF^Tpqr!́#&_O Foco Segue o Mouse_focus_follows_mousefg )-EIKqrIĀȀ *+ _{{15, 140}, {402, 18}}_[`ab_c]d\efghilf~Tpqr!́),_Foco nas Novas Janelas_focus_on_new_window /4EK 02 1_{{18, 69}, {402, 18}}E NP O_[`ab_c]d\efghilTpqr!́/3o$As teclas Opo enviam Alt_L e Alt_R_option_sends_alt 6T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_ {{266, 364.0390625}, {644, 341}}oPreferncias X11WNSPanelZ{320, 240}XV <1΁=)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1)1 &8GD1/O)_{{36, 93}, {555, 31}}[\]^_hB _}Se ativadas, as teclas equivalentes da barra de menus podem interferir com os aplicativos do X11 que usem o modificador Meta._{{36, 205}, {555, 42}}EK'( KL G[\]^_h&4F owMantenha pressionadas as teclas Opo ou Comando ao clicar para ativar o boto da direita ou o boto central do mouse. EAB HI _{{36, 153}, {555, 28}}[\]^_hOGJ olPermite que as alteraes feitas no menu de leiautes de teclado sobrescrevam o mapa de teclado atual do X11._{{18, 184}, {402, 18}}_[`ab_c]d\efghil8YTpqr!́DM_&Seguir o leiaute de teclado do sistema_{{36, 32}, {555, 31}}EKfg΀ RS =[\]^_hs1 QowQuando esta opo est marcada, as teclas opo enviam os smbolos de tecla do X11 Alt_L e Alt_R em vez de Mode_switch._{{18, 8}, {418, 18}}_[`ab_c]d\efghil|Tpqr!́OTo,Sempre rolar na direo do movimento do dedo_{{10, 33}, {598, 279}}+,/_{{13, 10}, {618, 325}}1Y]n)VNSViewYNSTabView\NSIdentifier \[=ZQ1WEntrada+,]NSTabViewItem/ \ցm=^Q21CcՁ`dh)Eր ab #@D_{{17, 244}, {45, 20}}[\]^_h`c VCores:E؁ր ef #@x@_{{36, 216}, {392, 14}}[\]^_hdg o@Esta opo passa a funcionar quando o X11 executado novamente.Eր ij #@_{{36, 145}, {543, 34}}[\]^_hhk o`Ativa a janela raiz do X11. Usar o toque Comando-Opo-A para digitar e sair do modo tela cheia._{{10, 33}, {598, 279}}eSada \o=^ X  Vp1quy})EK#$Āo rs o_{{18, 255}, {409, 23}}_[`ab_c]d\efghil0Tpqr!́qtoAtivar sincronizaoE=>Do vw o#@_{{36, 207}, {548, 42}}[\]^_hKu xoAtiva o item de menu "copiar" e permite a sincronizao entre a rea de Colagem do OSX e a REA DE TRANSFERNCIA e os buffers PRINCIPAIS do X11.EKVWĀo z{ o_{{34, 115}, {511, 23}}_[`ab_c]d\efghilcTpqr!́y|oGAtualizar a REA DE TRANSFERNCIA quando a rea de Colagem for alteradaEKopĀo ~ o_{{34, 90}, {501, 23}}_[`ab_c]d\efghil|Tpqr!́}oJAtualizar PRINCIPAL (clique central) quando a rea de Colagem for alteradaEKĀo  o_{{34, 65}, {553, 23}}_[`ab_c]d\efghilTpqr!́oNAtualizar a rea de Colagem imediatamente quando um novo texto for selecionadoEKĀo  o_{{18, 178}, {511, 23}}_[`ab_c]d\efghilTpqr!́oGAtualizar a rea de Colagem quando a REA DE TRANSFERNCIA for alteradaEo  o#@h_{{48, 144}, {529, 28}}[\]^_h o}Desative esta opo quando quiser usar o xclipboard, o klipper ou qualquer outro gerenciador de rea de transferncia do X11.E܁o  o#@P_{{48, 33}, {526, 28}}[\]^_h oeDevido a limitaes no protocolo do X11, talvez esta opo nem sempre funcione em alguns aplicativos._{{10, 33}, {598, 279}}orea de ColagemI \ȁ=^1AFfǁ#))EI  I Ȁ  #@_{{23, 208}, {542, 31}}[\]^_h  oQuando esta opo est selecionada, a ao de clicar em uma janela inativa faz com que o clique do mouse seja ativado para essa janela, a qual tambm ativada.EI  I "Ȁ  #@{P_{{23, 161}, {441, 17}}[\]^_h ) oMO foco da janela do X11 segue o cursor. Esta opo tem alguns inconvenientes.EI 5 6I Ȁ  _{{23, 106}, {542, 28}}[\]^_h B oQuando esta opo est ativada, a criao de uma nova janela do X11 move o X11.app para o segundo plano (em vez do Finder.app, Terminal.app, etc.)_{{10, 33}, {598, 279}}WJanelas! J\= 1 N Q R S)E! ^ _! e  #@_{{36, 195}, {539, 35}}[\]^_h Q l oA execuo do X11 criar as chaves de controle de acesso Xauthority. Se mudar o endereo de IP do sistema, essas chaves tornam-se invlidas, o que pode impedir a execuo dos aplicativos do X11.E! y z!  _{{36, 118}, {555, 42}}[\]^_h R  oSe ativadas, as conexes Autenticar tambm podem ser ativadas para garantir a segurana do sistema. Se desativadas, as conexes dos aplicativos remotos no so permitidas.E!  !   #@y_{{17, 17}, {404, 14}}[\]^_h S  oDEstas opes passam a funcionar quanto o X11 executado em seguida._{{10, 33}, {598, 279}}iSegurana+, YNSTabView /Z{644, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard8 D[sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2D Aπ_toggle_fullscreen_item? 4р^x11_about_item  s Ӂ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  g ց_minimize_window:?  4؁_orderFrontStandardAboutPanel:@  6 ځ[prefs_show:F E܁Uhide:J & MށZterminate:G , H_hideOtherApplications:H 2 J_unhideAllApplications: 7 ]Ucopy: = d ]close_window: C j \zoom_window: G I  E L M+K  U V+_NSHuggingPriority   X a eV 3H_{{372, 191}, {132, 32}}_[`ab_]d\efgh h k G m nqp@ !πXDuplicar_apps_table_duplicate: t v  E L M+K   +  _{{372, 159}, {132, 32}}_[`ab_]d\efgh h k t nqp!πWRemover_apps_table_delete: W _apps_table_show:  E L M+K   +  _{{372, 223}, {132, 32}}_[`ab_]d\efg h k nqp!π^Adicionar Item_apps_table_new:  ^prefs_changed:  ^prefs_changed:8 D ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:z z  Yx11_help: '  _apps_table_show: m \next_window: p _previous_window:C  _enable_fullscreen_changed:D A _toggle_fullscreen:A  ǀ ^prefs_changed:F # ^prefs_changed:f  ) ^prefs_changed:  q ^prefs_changed:  y ^prefs_changed: ! } !^prefs_changed: '  #^prefs_changed: -  %^prefs_changed:c 3  '^prefs_changed: 9 / )^prefs_changed: ? O +^prefs_changed:1 C ܯ D'2?@ABkCDEFGHIJ()*  +nz &2B8(gCOco$>WpIAN FR fr 6!& Q _ R z S + G V t CQDE)3 --02469:<@ADEHJLMQSVWY[]`bdgjlmprsvxz 6;=YAEGIDL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#&'F& (.]NSApplication +    01JK I29! _{{302, 440}, {519, 271}}_Menu de Aplicativos do X11Z{320, 240}1 G t 񀉁)1 )3;?)1 )_{{1, 1}, {333, 214}}_{{0, -28}, {333, 214}}+, ZNSClipView /1 Ԁ)_{{1, 1}, {333, 28}}      " "_NSControlTarget_NSControlAction> <==_{{1, 215}, {333, 15}}\_doScroller:+, ) *ZNSScroller )</    5 " "> @==_{{334, 29}, {15, 186}}_{{20, 20}, {350, 231}}1 ? ܡ @CF C D E F G H I   L_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, O P_NSPanGestureRecognizer Q R/_NSPanGestureRecognizer_NSGestureRecognizer+, T/+, V W\NSScrollView V/Z{519, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ] ܯ'2222B22222222()*        +n&8CcIAIIFIIfI!!! Q! R! S + G+ t+CDE+ -02222:22222222-QSS-Y[-`bbbbbbbb-vx6;=YGD1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀉##F1 ܯ D'2?@ABkCDEFGHIJ()*  +nz &2B8(gCOco$>WpIAN FR fr 6!& Q _ R z S + G V t CQDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~--02469:<@ADEHJLMQSVWY[]`bdgjlmprsvxz 6;=YAEGIDL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#&' ,~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*F1 ܯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ܠF+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x      ? M T h v  * , . 0 2 4 6 > P ] h s u w y    # P Y c l n p r t v x z | ~ %')+-/1LUdks|&(*,.02468<MOQSU^wy{}?ACDFHIKMz|~=?DFHJLNdf    EGIKMOQ^  )68:<HQVXZ\   %')+479;\^`bdfhoq!#%')02SUWY[]_ik  "$EGLNPRTV} :<>@BDFHJLR_acenqsu "/DOk$0Ij0<IU_   "')2;=?HIKL   "$/`l,3?hjlmoqsuw!6BYfxz}      ! J W b o z ! !! !-!2!4!6!8!:! >)>4>F>H>J>O>X>Z>[>\>]>_>a>c>e>g>x>{>}>>>>>>>>>>>>>>>>>?? ???????K?M?O?Q?S?U?W?Y?[?]?g??????????????????????@@@'@6@?@M@Z@`@u@w@y@{@}@@@@@@@@@@@@@@@@AAAA A A AhAjAkAlAnApArAsAuAwAyAzA|A}A~AAAAAAAAAABBBBBBBBBHBTBiBkBmBoBqBsBBBBBBBBBBBBBBBBCC@CBCDCFCHCJC_CsCCCCCCCCCCCCCCCCCDDDDDD\D^D`DbDdDgDiDkDDEEEE E EEuEEEEEEEEEEEEEEEEEEEFFFBFEFGFJFMFPFRFWG"G3G6G8G:GOGQGTGVGXGeGnGzGGGGGGGGH#H%H&H'H*H,H.H/H2H5H7H8H;HJ@JAJBJDJFJHJIJLJOJQJRJTJUJVJoJJJJJJJJK KK+K-K/K2K5K7KKKKKKKKKKKKKKKKKL7L:LLALCLFLGLJLMLOLPLSLTLULXLLLLLLLLLLMMMM M MMiMkMlMmMoMqMsMtMwMzM|M}MMMMMMMMMMMMNNN+N-N/N2N5N7NNNNNNNNNNNNNNNNOOOOO OOOO+OAOVOXOZO]O`ObOOOOOOOOOOOOOOOOOPaPdPfPgPhPkPmPpPqPtPwPyPzP}P~PPPPPPPPPPQQ/QDQFQHQKQNQPQQQQQQQRR(RERRRoRRRRRRRRRRRRRRRRSSSS SSSSS8S[ScSnSSSSSSSSSSSSSTTT,T3TLTOTRTSTVTYT[T^TaTdTfTgTjTlTnToTxT{T~TTTTTTTTTTTTTTTTTUUUU U UUVVVVV V VVVVVVVVVV!VJVMVOVRVTVWVZV\WMWWWWWWWWWWWWWWWWWWXXX X#X%X(X+X-YY!Y`YbYdYfYiYlYnYpYYZZZZZZZZZZ"Z$Z%Z(Z)Z*Z-ZRZUZWZZZ]Z`Zb[S[j[[[[[[[[\\-\6\=\V\_\j\m\p\s\v\y\{\\\\\\\\\\\\\\\]]] ] ]]]]]].]0]3]6]8]:]=]@]B]]]]]]]]]]]]]]]]]]^^^^^^^^ ^'^^^^^^^^^^^^^^^^^^^^^^^____________````` ` ` ` ``/`X`[`]```b`e`h`ja-aFaQajamapasavaya|aaaaaaaaaaaaaaaaaaaabFbHbIbJbMbObQbRbUbXbZb[b^b_b`bybbbbbbbbbcZc]c_c`cacdcfcicjcmcpcrcscvcwcxcccccccccdeMeOePeQeTeVeXeYe\e_eaebeeefegeeeeeeeeef`ffffffffffffffffg,g.g0g2g5g8g:g@BDFHJLNPRUX[^adgjmpsvy|ĉljʉ͉ЉӉ։ى܉߉ !$'*,.0369@BDFHJLNPSVXZ\^`ben1368:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~”ŔȔʔ̔ΔДҔԔ֔ؔ۔ޔ "%(+.1357:=@CFILORUXZ\^adgjmpsvy|•ĕƕȕʕ̕ΕЕӕٕ֕ܕߕ !$'*-0369ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~›ěƛțʛ̛ΛЛқԛ֛؛ڛܛޛ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013600514757411105024346 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048$%-78=LST[\]fpqvwz{")*+234;<ELMNVW`ghistx|  ;<?EXefpqukR  !&',12 7;<BS\]rswx{~+45=>?ETU]^_etu}~&'8@ABHWX`abhwx.67HIQRS[\]mtuv~)*23DELM\]efuv~    " # * + ; < C D E F L T e f n o          ! " ' ( - . 3 4 8 9 > ? D E J \ e f p q r w         " # ( ) . / 4 5 : ; @ A     % & ' * ; < = A L M R T W X Y Z [ I m f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[AplicativosP^submenuAction:$%*[Aplicativos1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -}!"#VNSName*/.|XMainMenu1&'()*+0QY`v)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5[Sobre o X112XY287oPreferncias...Q,22  2kkm2!<<;"hServiosstu*>=?hServios1x)__NSServicesMenu22  22CB_Alternar Tela CheiaQa22  2UNSTag2G*F[Ocultar X11Qh22GI^Ocultar Outros22!K\Mostrar Tudo22  22ON\Encerrar X11Qq\_NSAppleMenu-!SSR"[AplicativosTU*[Aplicativos1؀VW)S  S!X_Personalizar...-![[Z"VEditarZ\*1])[_^VCopiarQc  -!bba"VJanela*cau1 dgjlmprs) &'bfeVFecharQw /0bihYMinimizarQm 9b!k_Reduzir/Ampliar b   IJbon_Percorrer JanelasQ` PITboq_$Percorrer Janelas no Sentido Inverso b   eb!t_Trazer Todas Para a Frente^_NSWindowsMenunnp-!xxw"UAjudapvwy*1yzz)nx!{YAjuda X11[_NSMainMenuTmenu V^apps_separator ŀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ĀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{333, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{333, 17}+, _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%')+,-/123)78:]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{334, 1}, {16, 28}}+,=>]_NSCornerView=/1@ABC)FGHIJKLMOPQRSUV\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^#@O]`YZ[\]^_`abcd[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomeghijklmnoVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontrst_NSFontDescriptorAttributesv1w{WNS.keysxyz|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/RWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorR\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellYZ[\]]NSControlView_NSPlaceholderString0AYText Cellghjno#@*PRB1_controlTextColor+,ؤ/+,]NSTableColumn/FGHIJKLMQRS #@X`#@DYZ[\]^_`cdWComandoRK0.33333299YZ[\]ƀFGHIJKLMQRS #@Q #@$YZ[\]^_`cdVAtalho  [headerColorRB1C1 1YZ[\]_NSDrawsBackground ghjno#@(#%_controlBackgroundColor()RL0.602715373N0.6666666667 1.0YgridColor34RM0.4246723652E0.5 1+,89[NSTableView8:/YNSControlZapps_table?@ ǀрCGIJLMGVNSCellȀ ɀʀ UWX V_{{15, 245}, {402, 18}}^Y_`a]b[cZdefghk?mRopq_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀ_Clicar em Janelas Inativastuv[NSImageNamèXNSSwitch+,yz_NSButtonImageSourcey/+,|}\NSButtonCell|/+,XNSButton:/]click_through ]Ӏ^copy_menu_item ՀCIÀր ׀؀ Wl V__{{64, 241}, {128, 26}}d_Y^]`aeZcRof _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـghjno WNSState݀ۀ؀!ހ߀*WDa Tela__popUpItemAction:ZOtherViews1րڀ)ۀ!݀Y256 Coresۀ!݀XMilharesۀ!݀gMilhes+,_NSPopUpButtonCell|/^NSMenuItemCell+,]NSPopUpButton:/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator C IJ$% À -W0 V_{{18, 243}, {402, 18}}^Y_`a]b[cZdefghk:Ropq!̀􀩀oAutenticar conexes[enable_authBC CIJMNÀր _{{18, 182}, {409, 23}}^Y_`a]b[cZdefghkBZRopq!̀_Modo de tela cheia_enable_fullscreenbc CIJmnÀր _{{37, 116}, {409, 23}}^Y_`a]b[cZdefghkbzRopq!̀o3Permitir acesso barra de menus no modo tela cheia_enable_fullscreen_menu  CI_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@H_{{54, 79}, {525, 31}}Z{250, 750}YZ[\]g @odA barra de menus ficar visvel quando o cursor do mouse for posicionado sobre a sua tela principal.ghjkno % \controlColor+,[NSTextField:/_enable_fullscreen_menu_text CIJǀ  W UV==?_{{18, 130}, {402, 18}}CI @A #@8/^Y_`a]b[cZdefghkRopq!́_%Ativar as teclas equivalentes sob X11_enable_keyequivs C IJ À  _{{18, 166}, {402, 18}}^Y_`a]b[cZdefghk Ropq!́o%Permitir conexes de clientes da redeZenable_tcp !CIJ%  _{{18, 253}, {402, 18}}CI017 CE D^Y_`a]b[cZdefghk=Ropq!́ oEmular mouse de trs botes\fake_buttonsEF #'CGIJPQGÀȀ $% _{{15, 184}, {402, 18}}^Y_`a]b[cZdefghkE]Ropq!́#&_O Foco Segue o Mouse_focus_follows_mouseef )-CGIJpqGÀȀ *+ _{{15, 140}, {402, 18}}^Y_`a]b[cZdefghke}Ropq!́),_Foco nas Novas Janelas_focus_on_new_window /4CIJ 02 1_{{18, 69}, {402, 18}}CI NP O^Y_`a]b[cZdefghkRopq!́/3o$As teclas Opo enviam Alt_L e Alt_R_option_sends_alt 6R\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_ {{266, 364.0390625}, {644, 341}}oPreferncias X11WNSPanelZ{320, 240}WV <1́=)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1)1% 7GD1/O)_{{36, 93}, {555, 31}}YZ[\]gB _}Se ativadas, as teclas equivalentes da barra de menus podem interferir com os aplicativos do X11 que usem o modificador Meta._{{36, 205}, {555, 42}}CIJ&'  KL GYZ[\]g%3F owMantenha pressionadas as teclas Opo ou Comando ao clicar para ativar o boto da direita ou o boto central do mouse. CI@A HI _{{36, 153}, {555, 28}}YZ[\]g NGJ olPermite que as alteraes feitas no menu de leiautes de teclado sobrescrevam o mapa de teclado atual do X11._{{18, 184}, {402, 18}}^Y_`a]b[cZdefghk7XRopq!́DM_&Seguir o leiaute de teclado do sistema_{{36, 32}, {555, 31}}CIJef̀ RS =YZ[\]gr1 QowQuando esta opo est marcada, as teclas opo enviam os smbolos de tecla do X11 Alt_L e Alt_R em vez de Mode_switch._{{18, 8}, {418, 18}}^Y_`a]b[cZdefghk{Ropq!́OTo,Sempre rolar na direo do movimento do dedo_{{10, 33}, {598, 279}}+,/_{{13, 10}, {618, 325}}1Y]n)VNSViewYNSTabView\NSIdentifier \[=ZQ1WEntrada+,]NSTabViewItem/ \ցm=^Q21BbՁ`dh)CIր ab #@D_{{17, 244}, {45, 20}}YZ[\]g`c VCores:CIׁր ef #@x@_{{36, 216}, {392, 14}}YZ[\]gdg o@Esta opo passa a funcionar quando o X11 executado novamente.CIր ij #@_{{36, 145}, {543, 34}}YZ[\]ghk o`Ativa a janela raiz do X11. Usar o toque Comando-Opo-A para digitar e sair do modo tela cheia._{{10, 33}, {598, 279}}eSada \o=^W  Vp1quy})CIJ"#Ào rs o_{{18, 255}, {409, 23}}^Y_`a]b[cZdefghk/Ropq!́qtoAtivar sincronizaoCI<=Co vw o#@_{{36, 207}, {548, 42}}YZ[\]gJu xoAtiva o item de menu "copiar" e permite a sincronizao entre a rea de Colagem do OSX e a REA DE TRANSFERNCIA e os buffers PRINCIPAIS do X11.CIJUVÀo z{ o_{{34, 115}, {511, 23}}^Y_`a]b[cZdefghkbRopq!́y|oGAtualizar a REA DE TRANSFERNCIA quando a rea de Colagem for alteradaCIJnoÀo ~ o_{{34, 90}, {501, 23}}^Y_`a]b[cZdefghk{Ropq!́}oJAtualizar PRINCIPAL (clique central) quando a rea de Colagem for alteradaCIJÀo  o_{{34, 65}, {553, 23}}^Y_`a]b[cZdefghkRopq!́oNAtualizar a rea de Colagem imediatamente quando um novo texto for selecionadoCIJÀo  o_{{18, 178}, {511, 23}}^Y_`a]b[cZdefghkRopq!́oGAtualizar a rea de Colagem quando a REA DE TRANSFERNCIA for alteradaCIo  o#@h_{{48, 144}, {529, 28}}YZ[\]g o}Desative esta opo quando quiser usar o xclipboard, o klipper ou qualquer outro gerenciador de rea de transferncia do X11.CIہo  o#@P_{{48, 33}, {526, 28}}YZ[\]g oeDevido a limitaes no protocolo do X11, talvez esta opo nem sempre funcione em alguns aplicativos._{{10, 33}, {598, 279}}orea de ColagemG \ȁ=^1?Eeǁ#))CGI  G Ȁ  #@_{{23, 208}, {542, 31}}YZ[\]g  oQuando esta opo est selecionada, a ao de clicar em uma janela inativa faz com que o clique do mouse seja ativado para essa janela, a qual tambm ativada.CGI  G !Ȁ  #@{P_{{23, 161}, {441, 17}}YZ[\]g ( oMO foco da janela do X11 segue o cursor. Esta opo tem alguns inconvenientes.CGI 4 5G Ȁ  _{{23, 106}, {542, 28}}YZ[\]g A oQuando esta opo est ativada, a criao de uma nova janela do X11 move o X11.app para o segundo plano (em vez do Finder.app, Terminal.app, etc.)_{{10, 33}, {598, 279}}WJanelas I\= 1 M P Q R)C I ] ^  d  #@_{{36, 195}, {539, 35}}YZ[\]g P k oA execuo do X11 criar as chaves de controle de acesso Xauthority. Se mudar o endereo de IP do sistema, essas chaves tornam-se invlidas, o que pode impedir a execuo dos aplicativos do X11.C I x y   _{{36, 118}, {555, 42}}YZ[\]g Q  oSe ativadas, as conexes Autenticar tambm podem ser ativadas para garantir a segurana do sistema. Se desativadas, as conexes dos aplicativos remotos no so permitidas.C I      #@y_{{17, 17}, {404, 14}}YZ[\]g R  oDEstas opes passam a funcionar quanto o X11 executado em seguida._{{10, 33}, {598, 279}}iSegurana+, YNSTabView /Z{644, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard7 D[sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2D Aπ_toggle_fullscreen_item? 4р^x11_about_item  s Ӂ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector g ց_minimize_window:?  4؁_orderFrontStandardAboutPanel:@  6 ځ[prefs_show:F  E܁Uhide:J % MށZterminate:G + H_hideOtherApplications:H 1 J_unhideAllApplications: 6 ]Ucopy: < d ]close_window: B j \zoom_window: F H  C K L)IJ  T U)_NSHuggingPriority   W ` dV 3H_{{372, 191}, {132, 32}}^Y_`a][cZdefg g j F l mpo@ !πXDuplicar_apps_table_duplicate: s u  C K L)IJ   )  _{{372, 159}, {132, 32}}^Y_`a][cZdefg g j s mpo!πWRemover_apps_table_delete: W _apps_table_show:  C K L)IJ   )  _{{372, 223}, {132, 32}}^Y_`a][cZdef g j mpo!π^Adicionar Item_apps_table_new:  ^prefs_changed:  ^prefs_changed:7 D ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:z z  Yx11_help: '  _apps_table_show: m \next_window: p _previous_window:B  _enable_fullscreen_changed:D A _toggle_fullscreen:?  ǀ ^prefs_changed:E  # ^prefs_changed:e  ) ^prefs_changed:  q ^prefs_changed:  y ^prefs_changed: } !^prefs_changed: &  #^prefs_changed: ,  %^prefs_changed:b 2  '^prefs_changed: 8 / )^prefs_changed: > O +^prefs_changed:1 B ۯ C'2?@ABkCDEFGHIJ()*  +nz%1 A7'fBNbn#=VoG?M EQ eq 5 % P ^ Q y R ) F U s AOBC'1 --02469:<@ADEHJLMQSVWY[]`bdgjlmprsvxz 6;=YAEGIDL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#&'F& (.]NSApplication )    01JK I29! _{{302, 440}, {519, 271}}_Menu de Aplicativos do X11Z{320, 240}1 F s 񀉁)1 '1;?)1 )_{{1, 1}, {333, 214}}_{{0, -28}, {333, 214}}+, ZNSClipView /1 Ӏ)_{{1, 1}, {333, 28}}  I   ! !_NSControlTarget_NSControlAction> <==_{{1, 215}, {333, 15}}\_doScroller:+, ( )ZNSScroller (:/  I  4 ! !> @==_{{334, 29}, {15, 186}}_{{20, 20}, {350, 231}}1 > ۡ ?CF B C D E F G H   K_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, N O_NSPanGestureRecognizer P Q/_NSPanGestureRecognizer_NSGestureRecognizer+, S/+, U V\NSScrollView U/Z{519, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 \ ۯ'2222B22222222()*        +n% 7BbG?GGEGGeG   P Q R ) F) s)ABC) -02222:22222222-QSS-Y[-`bbbbbbbb-vx6;=YGD1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀉##F1 ۯ C'2?@ABkCDEFGHIJ()*  +nz%1 A7'fBNbn#=VoG?M EQ eq 5 % P ^ Q y R ) F U s AOBC'1 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~--02469:<@ADEHJLMQSVWY[]`bdgjlmprsvxz 6;=YAEGIDL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#&' ,~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*F1 ۯ ~       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ۠F+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x      ? M T h v  * , . 0 2 4 6 > P ] h s u w y    # P Y c l n p r t v x z | ~ %')+-/1LUdks|&(*,.02468<MOQSU^wy{}?ACDFHIKMz|~=?DFHJLNdf    EGIKMOQ^  )68:<HQVXZ\   %')+479;\^`bdfhoq!#%')02SUWY[]_ik  "$EGLNPRTV} :<>@BDFHJLR_acenqsu +@Kg} ,Ef,8EQ[  $&(123z  GSklnprsuwy{}&OQSTVXZ\^)@M_adfikps|~     1 > I V a p  !!!!!!!!!#!&!+!@!G!P!h!o!x!z!|!~!!!!!!!!!!!!!!!!!""!"A"\"e"r"w"""""""""""""####'#5#=#?#A#C#E#G#N#`#u##############5n5w5555555556 66166686:6<6>6@6B6D6G6Q6b6k6n6p6r6s666666666666667 7 777777&7(7I7K7M7O7Q7S7[7h7t7v777777777777777778888888$898;8=8?8A8M8b8e8i8k8m8888888888888888888899)969E9G9I9^9`9b9d9f9p9999999999999999:L:S:U:V:W:Y:[:]:_:`:b:d:f:g:i:j:k:::::::::::;;!;7;I;\;n;;;;;;;;;;;;;;;;;;;;;< <<<'<0<9>>/>1>3>8>A>C>D>E>F>H>J>L>N>P>a>d>f>h>>>>>>>>>>>>>>>>>>>>?????4?6?8?:??@?B?D?F?P?}??????????????????????@@@@(@6@C@I@^@`@b@d@f@h@w@@@@@@@@@@@@@@@@@@@@AQASATAUAWAYA[A\A^A`AbAcAeAfAgAAAAAAAAAAAAABBBBBB1B=BRBTBVBXBZB\BBBBBBBBBBBBBBBBC%C'C)C+C-C/C1C3CHC\CqCsCuCwCzC|CCCCCCCCCCCCCCCDDEDGDIDKDMDPDRDTDDDDDDDDE^EzEEEEEEEEEEEEEEEEEEEFF+F.F0F3F6F9F;F@G GGG!G#G8G:G=G?GAGNGWGcGnGGGGGGGH HHHHHHHHHH H!H$H%H&H)HZH[H^HaHdHgHjHlHoHqHsHHHHHHIIIII I IIIIIII!I`IbIdIfIiIlInIpIIIIIIIIJ'J)J*J+J-J/J1J2J5J8J:J;J=J>J?JXJJJJJJJJJJKKKKKK KKKKKKKKKKKKKKKKKL L#L%L&L'L*L,L/L0L3L6L8L9LLALLLLLLLLLLLLLLLLMRMTMUMVMXMZM\M]M`McMeMfMhMiMjMMMMMMMMMMMNNNNNN N{N}N~NNNNNNNNNNNNNNNNNNNNNOO*O?OAOCOFOIOKOOOOOOOOOOOOOOOOOPJPMPOPPPQPTPVPYPZP]P`PbPcPfPgPhPkPPPPPPPPQQQ-Q/Q1Q4Q7Q9QQQQQQQQRR.R;RXRqRRRRRRRRRRRRRRRRRRRRRRRS!SDSLSWSSSSSSSSSSSSSSTTTT5T8T;TZ@ZCZFZIZK[<[S[[[[[[[[[\\\&\?\H\S\V\Y\\\_\b\d\}\\\\\\\\\\\\\\\\\\\\\\]]]]]]!]#]&])]+]]]]]]]]]]]]]]]]]]]]]]^^^^ ^^w^z^|^}^~^^^^^^^^^^^^^^^^^^^^^_s_________________``A`D`F`I`K`N`Q`Saa/a:aSaVaYa\a_abaeaaaaaaaaaaaaaaaaaaaab/b1b2b3b6b8b:b;b>bAbCbDbGbHbIbbbbbbbbbbbcCcFcHcIcJcMcOcRcScVcYc[c\c_c`cacjccccccccde6e8e9e:e=e?eAeBeEeHeJeKeNeOePeieeeeeeeefIffffffffffffffffgggggg!g#g%ghhhhhh h"h#h&h)h+h,h/h0h1hIhhhhhhhhi7iiiiiiiiiiiiiiiijjjj j jjjjk kkkkkkkkkk"k$k%k(k)k*k3kLkqktkvkyk|kkl~lllllllllllllmmmm m$mImLmNmQmTmWmYn&n?n`nyn|nnnnnnnnnnnnnnoooo o!o#o%o(o)o,o/o1o2o4o5o6o?oXo}oooooopq7q:qq@qBqEqFqIqLqNqOqQqRqSq\quqqqqqqqrGrrrrrrrrrrrrrrrrrss s sssst?tXt`tutxtzt}ttttttttttuuuuuuuuuu u#u%u&u(u)u*u3uLuuuxuzu}uuuuwwuwxwzw{w|w~wwwwwwwwwwwwwwwwwwwy>yyyyyyyyyyyyyyyyyyz zzzzzzzzzzzzzz{{{B{L{S{\{o{t{{{{{{{{{{{{{{{|||||||+|@|B|D|G|J|L|^|s|u|w|z|}|||||||||||||||}}-}/}1}4}7}9}D}Y}[}]}`}c}e}p}}}}}}}}}}}}}}}}}}}~~~&~-~<~M~O~Q~T~W~j~{~}~~~~~~~~~~~~~~~~~$&(+.GXZ\_b{bvy{|}ĀŀȀʀ̀΀р$-/169<>@BKctwy|ށNPRUXZ\dyÃ"$%&)+-.1467:;ADGJMPSVY\_behknqtwz}‰ʼnȉˉΉщԉ׉ډ݉ "%(+.147:=@CEGIKMOQSUX[]`cegikmor{~݊ %BMV_begjlu΋׋xӌbdfghjlnqruwy|}~ō7_|Žߎ!7@EN[doؐڐܐސ  "$&),/258;>ADGJMPSVY\_behknprtvxz|~‘őȑˑΑёԑ֑ؑڑݑߑ  #%')+-/13579ACEGJMPSVY\_behknqsuwy{}•ŕȕ˕Εѕԕוڕݕ "%(+.147:=@CFILORUX[^adgp369;>ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ęǙʙ͙Йә֙ٙܙߙ !$'*-0369 LprojCompatibleVersion 106.3 LprojLocale pt LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/0000755000175000017500000000000014757411136017451 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/0000755000175000017500000000000014757411136021144 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib0000644000175000017500000021075414757411105023660 Se estiverem activas, as teclas equivalentes da barra de menus podem interferir nas aplicações X11 que utilizam o modificador Meta. Ao clicar, mantenha premidas as teclas Opção ou Comando para activar os botões central ou direito do rato. Activa o elemento de menu "copiar" e permite a sincronização entre a área de colagem do OS X e os buffers CLIPBOARD e PRIMARY do X11. Se assinalar esta opção, ao clicar numa janela inactiva, o clique não só a traz para a frente como activa a janela completamente. Lançar o X11 cria chaves Xauthority de controlo de acesso. Se o endereço IP do sistema for alterado, estas chaves perdem a validade, podendo, assim, impossibilitar a execução das aplicações X11. Se activar esta opção, precisa igualmente de activar a opção “Autenticar ligações” para garantir a segurança do sistema. Se não activar esta opção, não são permitidas ligações a partir de aplicações remotas. xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects.nib0000644000175000017500000013640614757411105024237 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{#*+,345<=FMNOWXYbijkuvz~?@CI\ijtuyoV  !"',-278 =ABHXabwx|}  !09:BCDJYZbcdjyz  +,=EFGM\]efgm|} !"#3;<MNVWX`abryz{ ./78IJQRabjkz{    ' ( / 0 A B I J K L R Z j k s t        ! & ' , - 2 3 8 9 = > C D I J O a j k u v w |         ! " ' ( - . 3 4 9 : ? @ E F       * + , / @ A B F Q R W Y \ ] ^ _ `  r k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "jAplicaesP^submenuAction:$%*jAplicaes1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5]Acerca do X112XY287oPreferncias...Q,22  2kkm2!<<;"hServiosstu*>=?hServios1x)__NSServicesMenu22  22CBoAlternar ecr completoQa22  2UNSTag2G*F]Ocultar o X11Qh22GIoOcultar outras aplicaes22!K\Mostrar tudo22  22ON[Sair do X11Qq\_NSAppleMenu-!SSR"jAplicaesTU*jAplicaes1؀VW)S  S!X_Personalizar...-![[Z"fEdio\]*fEdio1^)[`_VCopiarQc  -!ccb"VJanela*dbw1 !ehkmnqtu) '(cgfVFecharQw 01cjiYMinimizarQm :c!lWAmpliar c   JKcpo_Percorrer janelasQ) QTUcsr_$Percorrer janelas no sentido inversoQ( c   gc!v_Passar tudo para a frente^_NSWindowsMenuppr-!zzy"UAjudarxy{*1{||)pz!}\Ajuda do X11[_NSMainMenuTmenu V^apps_separator ɀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ȀR@#@Ā#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{279, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{279, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{280, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@X#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomeklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView_NSPlaceholderString0AoClula de textoklnrs#@*PVB1_controlTextColor+,ܤ/+,]NSTableColumn/JKLMNOPQUVW #@Y@#@D]^_`abcdghWComandoVK0.33333299]^_`aʀoClula de textoJKLMNOPQUVW #@Q@#@$]^_`abcd ghVAtalho[headerColorVB1C1 1]^_`a_NSDrawsBackground oClula de textokln#$rs#@()+€_controlBackgroundColor./VL0.602715373N0.6666666667 146ŀYgridColor9:VM0.4246723652E0.5 1+,>?[NSTableView>@/YNSControlZapps_tableEF ˀՀIMOQRMVNSCell̀ ̀΀ Z\] Z_{{15, 245}, {402, 18}}c]defag_h^ijklmpErVtuv_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπ_"Clique atravessa janelas inactivasyz{[NSImageNameрXNSSwitch+,~_NSButtonImageSource~/+,\NSButtonCell/+,XNSButton@/]click_through ^׀^copy_menu_item ـIƀڀ ۀ܀ \p Zc_{{69, 235}, {131, 26}}id]caefj^hVtk _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀klnrs WNSState߀܀!*ZDo monitor__popUpItemAction:ZOtherViews1ۀހ)߀!Y256 cores߀!XMilhares߀!gMilhes+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton@/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator I%O)*%ƀ 2\5 Z_{{18, 243}, {402, 18}}c]defag_h^ijklmp?Vtuv!ЀoAutenticar ligaes[enable_authGH IORSƀڀ _{{18, 182}, {409, 23}}c]defag_h^ijklmpG_Vtuv!ЀoModo ecr completo_enable_fullscreengh IOrsƀڀ  _{{37, 116}, {476, 18}}c]defag_h^ijklmpgVtuv!Ёo9Permitir acesso barra de menus em modo de ecr completo_enable_fullscreen_menu I_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@(_{{54, 79}, {521, 31}}Z{250, 750}]^_`al   @olA barra de menus ficar visvel quando o cursor do rato for colocado na parte superior do monitor principal.klnors +\controlColor+,[NSTextField@/_enable_fullscreen_menu_text IÒ  \  YZAAC_{{18, 127}, {402, 18}}I  DE #@3c]defag_h^ijklmpVtuv!Ёo,Activar as equivalncias de teclado para X11_enable_keyequivs I%O%ƀ  _{{18, 166}, {402, 18}}c]defag_h^ijklmpVtuv!Ёo%Permitir ligaes de clientes da redeZenable_tcp  %IO#$* !# "_{{18, 243}, {402, 18}}I56<  GI Hc]defag_h^ijklmpBVtuv!Ё $oSimular rato de trs botes\fake_buttonsJK '+IMOUVMƀ̀ () _{{15, 184}, {402, 18}}c]defag_h^ijklmpJbVtuv!Ё'*_Foco segue o rato_focus_follows_mousejk -1IMOuvMƀ̀ ./ _{{15, 137}, {402, 18}}c]defag_h^ijklmpjVtuv!Ё-0_Foco em janelas novas_focus_on_new_window 38IO 46 5_{{18, 69}, {402, 18}}I  RT Sc]defag_h^ijklmpVtuv!Ё37o'As teclas de opo enviam Alt_L e Alt_R_option_sends_alt :V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_ {{319, 328.0390625}, {660, 341}}oPreferncias do X11WNSPanelZ{320, 240}\Z @1ҁA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1 )1 *< "KH53S)_{{36, 93}, {564, 28}}]^_`al F oSe estiverem activas, as teclas equivalentes da barra de menus podem interferir nas aplicaes X11 que utilizam o modificador Meta._{{36, 195}, {564, 42}}IO+, OP K]^_`al*8" J okAo clicar, mantenha premidas as teclas Opo ou Comando para activar os botes central ou direito do rato. IEF  LM _{{36, 151}, {564, 19}}]^_`alSK N oYPermite que alteraes do menu de entrada se sobreponham ao actual mapa de teclas do X11._{{18, 176}, {402, 18}}c]defag_h^ijklmp<]Vtuv!ЁHQo)Seguir a disposio do teclado do sistema_{{36, 32}, {564, 31}}IOjkҀ VW A]^_`alw5  UoiQuando activadas, as teclas de opo enviam smbolos de teclas X11 Alt_L e Alt_R em vez de alternar_modo._{{18, 8}, {418, 18}}c]defag_h^ijklmpVtuv!ЁSXo4Permitir deslocao na direco do movimento do dedo_{{10, 33}, {614, 279}}+,/_{{13, 10}, {634, 325}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1WEntrada+,]NSTabViewItem/ `ځqAbQ21Ggفdhl)I ڀ ef #@F_{{17, 238}, {48, 20}}]^_`aldg VCores:I܁ ڀ ij #@x@_{{36, 216}, {392, 14}}]^_`alh k o3Esta opo ter efeito quando voltar a abrir o X11.I ڀ mn #@_{{36, 148}, {539, 28}}]^_`all o oxActiva a janela raiz do X11. Utilize a combinao de teclas Comando-Opo-A para entrar e sair do modo de ecr completo._{{10, 33}, {614, 279}}eSada `sAb \ Zt1uy})IO'(ƀs vw s_{{18, 255}, {409, 23}}c]defag_h^ijklmp4Vtuv!ЁuxoActivar sincronizaoIABH s z{ s#@_{{36, 221}, {540, 28}}]^_`alOy  |oActiva o elemento de menu "copiar" e permite a sincronizao entre a rea de colagem do OS X e os buffers CLIPBOARD e PRIMARY do X11.IOZ[ƀs ~ s_{{34, 129}, {409, 23}}c]defag_h^ijklmpgVtuv!Ё}o:Actualizar CLIPBOARD quando a rea de colagem for alteradaIOstƀs  s_{{34, 104}, {560, 18}}c]defag_h^ijklmpVtuv!ЁoRActualizar PRIMARY (clique no boto do meio) quando a rea de colagem for alteradaIOƀs  s_{{34, 79}, {544, 22}}c]defag_h^ijklmpVtuv!Ёo@Actualizar rea de colagem assim que for seleccionado novo textoIOƀs  s_{{34, 192}, {410, 18}}c]defag_h^ijklmpVtuv!Ёo:Actualizar a rea de colagem quando CLIPBOARD for alteradoIƁ s  s#@_{{48, 158}, {509, 28}}]^_`al  omDesactive esta opo se pretender utilizar o xclipboard, o klipper ou qualquer outro gestor de clipboard X11.I s  s#@_{{48, 47}, {534, 28}}]^_`al  o]Devido a limitaes do protocolo X11, esta opo nem sempre funcionar em algumas aplicaes._{{10, 33}, {614, 279}}orea de colagemM `́Ab1EJjˁ'-)IM  M  ̀  #@H_{{23, 208}, {557, 31}}]^_`al   oSe assinalar esta opo, ao clicar numa janela inactiva, o clique no s a traz para a frente como activa a janela completamente. IM  M & ̀  #@~`_{{23, 158}, {490, 20}}]^_`al -  _IO foco da janela do X11 segue o cursor. Isto tem alguns efeitos adversos.IM 9 :M @ ̀  #@_{{23, 103}, {577, 28}}]^_`al G  ozA criao de uma nova janela X11 faz com que X11.app venha para primeiro plano (em vez de Finder.app, Terminal.app, etc.)._{{10, 33}, {614, 279}}WJanelas% O`A 1 S V W X)I% c d%   _{{36, 195}, {564, 42}}]^_`al V p  oLanar o X11 cria chaves Xauthority de controlo de acesso. Se o endereo IP do sistema for alterado, estas chaves perdem a validade, podendo, assim, impossibilitar a execuo das aplicaes X11.I% } ~%   _{{36, 104}, {564, 56}}]^_`al W   oSe activar esta opo, precisa igualmente de activar a opo Autenticar ligaes  para garantir a segurana do sistema. Se no activar esta opo, no so permitidas ligaes a partir de aplicaes remotas.I%  %    #@y_{{17, 17}, {404, 14}}]^_`al X   o9Estas opes tero efeito da prxima vez que abrir o X11._{{10, 33}, {614, 279}}iSegurana+, YNSTabView /Z{660, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard< Hŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item?  4Հ^x11_about_item!  u ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F $ EUhide:J * MZterminate:G 0 H_hideOtherApplications:H 6 J_unhideAllApplications: ; ^Ucopy: A e ]close_window: G k \zoom_window: K M  I P Q-O  Y Z-_NSHuggingPriority    \ e iZ 7L_{{318, 191}, {155, 32}}c]defa_h^ijkl l o K q rut@ !ӀXDuplicar_apps_table_duplicate: x z  I P Q-O   -   _{{318, 159}, {155, 32}}c]defa_h^ijkl l o x rut!ӀWRemover_apps_table_delete: W _apps_table_show:  I P Q-O   -   _{{318, 223}, {155, 32}}c]defa_h^ijk l o rut!Ӏ_Adicionar elemento_apps_table_new:  ^prefs_changed:  ^prefs_changed:< H ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:| | Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:G _enable_fullscreen_changed:D  A _toggle_fullscreen:E  ˀ ^prefs_changed:J ' ^prefs_changed:j  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: %  %^prefs_changed: +  '^prefs_changed: 1  )^prefs_changed:g 7  +^prefs_changed: = 3 -^prefs_changed: C S /^prefs_changed:1 G  H'2?@ABkCDEFGHIJ()*  !+p|$*6F<,kGSgs(B[tMER JV jv :%* V d W ~ X - K Z x ESFG+5 1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz| :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication -    45NO M6=! _{{360, 400}, {477, 271}}oMenu Aplicao do X11Z{320, 240}1 K x )1 +5?C)1 )_{{1, 1}, {279, 214}}_{{0, -28}, {279, 214}}+,  ZNSClipView /1 ր)_{{1, 1}, {279, 28}} "  ! # & &_NSControlTarget_NSControlActionB @AA_{{1, 215}, {279, 15}}\_doScroller:+, - .ZNSScroller -@/   ! 9 & &B DAA_{{280, 29}, {15, 186}}_{{20, 20}, {296, 231}}1 C DGJ G H I J K L M   P_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, S T_NSPanGestureRecognizer U V/_NSPanGestureRecognizer_NSGestureRecognizer+, X/+, Z [\NSScrollView Z/Z{477, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 a '2222B22222222()*        +p*<GgMEMMJMMjM%%% V% W% X - K- x-EFG- -02222:22222222-QSS-Y[-acccccccc-xz:?A] "KH53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1  H'2?@ABkCDEFGHIJ()*  !+p|$*6F<,kGSgs(B[tMER JV jv :%* V d W ~ X - K Z x ESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz| :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ࠁJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  @BDFHJLgp  ACEGIKMOQSWhjlnpy  13\^`acefhj+-/024579Z\acegik  =?ACEGI~ ,.;hjlnprtvxz#%')+-/Anprtvxz|~ "$&(*,.029JLNPR[lnprtvxz|~"KMOPRTUWYz|~ "$%')*,.OQSUWY[w(49NPRTVXg|~)6?Xfu$=^3OYs*>Qtvy{}"0:BLr}  KLNPSVXZ\]`bdnwR`lu       # & ( * - @ I K N e n | !!!!'!(!*!,!5!7!9!:!C!L!N!o!{!!!!!!!!!!!!!!!!"" """""*"3"P"R"T"a"i"p"r"t"v"}"""""""""## ##(#-#@#I#P#U#b#j#w################$ $$,$/$3$5$7$H$M$S$[$]$_$a$c66 666+646H6S6e6r6y66666666666667777777,7/717F7H7J7L7N7a7j7s7|77777777777777777888 8"8K8M8O8Q8S8U8W8Y8z8888888888888888999 9 999/9296989:9g9{9}999999999999999999:::$:3:5:7:L:N:P:R:T:^:s:::::::::::::::;:;A;C;D;E;G;I;K;L;N;P;R;S;U;V;W;;;;;;;;;;;;< <#<5>>>>> > > > >6>8>;><>?>B>D>F>H>a>>>>???#?%?'?,?5?7?8?9?:??@?B?D?U?X?Z?\????????????????????????@+@-@/@1@3@5@7@9@;@=@G@t@v@x@z@|@~@@@@@@@@@@@@@@@@@@AAAA-A:A@AUAWAYA[A]A_AnAAAAAAAAAAAAAAAAAAAABHBJBKBLBNBPBRBSBUBWBYBZB\B]B^BBBBBBBBBBBBBBBBBBC(C4CICKCMCOCQCSCCCCCCCCCCCCCCCCDDD D"D$D&D(D*DQDeDzD|D~DDDDDDDDDDDDDDDDDDEEQESEUEWEZE]E_EaEEFFFF FFFwFFFFFFFFFFFFFFFFFFFGGGDGGGIGLGOGRGTGYH4HEHHHJHLHaHcHfHhHjHwHHHHHHHHHHI5I7I8I9II@IAIDIGIIIJIMINIOIRIIIIIIIIIIIIJ J#J%J&J'J*J,J/J0J3J6J8J9JJGJJJJJJJJJJJKKKK K#K&K(KKKKKKKKKKKKKKKKKKKKKKLLLPL[LpLrLtLwLzL|LLLLLLLLLLLLLLLLMM|MMMMMMMMMMMMMMMMMMMMMMMMN%N2NGNINKNNNQNSNNNNNNNNNNNNNNNNOO O"O$O'O*O,O.OBOXOmOoOqOtOwOyOOOOOOOOOOOOOOOPPDPFPHPJPMPPPRPTPlPPPPPPPQQQQQ Q Q QQQQQQQQQQ7QQQQQQQQQQQQQQQQQRRRRR RRRRcRvRRRRRRRRSS!S+S8SBSXSoSSSSSSSTTT,T/T1T4T7T:T=T@TATDTGTJTMTPTUTXTZT\TTTTTTTTTTTTTTUUUURUjUyUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVGVJVLVOVQVTVWVYWbW{WWWWWWWWWWWWWWWWX X#X%X(X*X-X0X2Y YvYyY{Y|Y}YYYYYYYYYYYYYYYYYYYYYZZZZZZ[[[[[][u[[[[[[[[[[[[[[[[\\\\\!\$\&\]]Q]S]U]W]Z]]]_]a]]]]^^^"^%^(^+^.^1^3^L^S^]^j^m^p^s^v^y^|^~^^^^^^^^^^^^^^^^^^^^^^_b_e_g_h_i_k_m_p_q_t_w_y_z_|_}_~___________`G`J`L`M`N`P`R`U`V`Y`\`^`_`a`b`c`l`````````a)aaaaaaaaaaaaaaaaaaaaaabbbb bcc c9ceAeCeDeGeHeIeRekeeeeeeefgg g g ggggggggg g!g"g;gzg|g~ggggghh\h^h_h`hchehghhhkhnhphqhthuhvhhhhhhhhhiiiiiiiiiiiiiiiijjQjSjUjWjZj]j_jajk?kAkBkCkFkHkJkKkNkQkSkTkWkXkYkrkkkkkkkkl8llllllllllllllllllmmm m mmmmnXn[n]n^n_nbndngnhnknnnpnqntnunvnnnnnnnnnooooooooooopppp ppppp}ppppppppppppppppppppppppqr^rarcrdrergrirlrmrprsrurvrxryrzrrrrrrrrrsssssssssssssssssssssssssstuuu$u'u)u,u/u2u;uFuHuKuNuQuTuVuuuuuuuuuuuuuuuuuvvv v#v%v(v+v-wxx x"x#x$x&x(x+x,x/x2x4x5x7x8x9xRx{x~xxxxxxz.zzzzzzzzzzzzzzzzzzzz{{{{{ { {{{{{{{{{||&|-|6|I|N|Z|o|q|s|v|y|{||||||||||||||}}}}}!}$}&}8}M}O}Q}T}W}Y}x}}}}}}}}}}}}}}~~ ~ ~~~~~3~5~7~:~=~?~J~_~a~c~e~h~j~~~~~~~~~~~~~~~')+.1DUWY\_!2469Sdfhkn 3luwy|ÄƄՄ+<>@CFUfiknq…Ņυ%68:=@Sdfhkn̆ΆІӆֆ!$&),;LOQTWfwz|͇Ї҇Շ؇#&(+.=NQSVYhy|~ω҉ԉ։؉ډ܉މ "%(+.147:=@CFILORUX[^adfhjlnprtwz}ÊƊɊ̊ϊъӊՊ؊ۊފ  #&(*,.02468;>@CFHJLNPRU^acqËŋȋˋ΋ыԋՋ؋ۋދ5@IRUXZ]_hsuwz|ʌՌތk}ƍӍ܍UWYZ[]_adehjlopqtՏ*Roҏۏ*38ANWb{ˑ͑ϑёӑՑבّۑݑߑ "%(+.147:=@CFILORUX[^acegikmoqtvy{}’ŒȒʒ̒ΒђӒ֒ؒےݒ !#%')+-03579;=?BK!#%')+-/13579;=?ACEGIKMOQSUWY[]`cfilorux{~Õŕȕ˕Εѕԕוڕݕ "%(+.1479;=@CFILORUX[^adgikmoqsuwy|–ŖȖ˖ΖіԖזږݖ "%(+.147:=@CFILORUX[^g*-0258;>ADGJMPSVY\_behknqtwz}™řș˙Ιљԙיڙݙ "%(+.147:=@CFILORUX[^adgjmpsvy|Ěǚʚ͚КӚ֚ٚܚߚ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~œĜƜȜʜ̜ΜМҜԜ֜؜ڜܜޜ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprt}~xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013635514757411105024761 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{#*+,345<=FMNOWXYbijkuvz~ =>AGZghrswmT   %*+056 ;?@FW`avw{|   /89ABCIXYabcixy  *+<DEFL[\defl{|  !"2:;LMUVW_`aqxyz -.67HIPQ`aijyz   & ' . / @ A H I J K Q Y i j r s         % & + , 1 2 7 8 < = B C H I N ` i j t u v {          ! & ' , - 2 3 8 9 > ? D E      ) * + . ? @ A E P Q V X [ \ ] ^ _ M q j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "jAplicaesP^submenuAction:$%*jAplicaes1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5]Acerca do X112XY287oPreferncias...Q,22  2kkm2!<<;"hServiosstu*>=?hServios1x)__NSServicesMenu22  22CBoAlternar ecr completoQa22  2UNSTag2G*F]Ocultar o X11Qh22GIoOcultar outras aplicaes22!K\Mostrar tudo22  22ON[Sair do X11Qq\_NSAppleMenu-!SSR"jAplicaesTU*jAplicaes1؀VW)S  S!X_Personalizar...-![[Z"fEdio\]*fEdio1^)[`_VCopiarQc  -!ccb"VJanela*dbw1 !ehkmnqtu) '(cgfVFecharQw 01cjiYMinimizarQm :c!lWAmpliar c   JKcpo_Percorrer janelasQ) QTUcsr_$Percorrer janelas no sentido inversoQ( c   gc!v_Passar tudo para a frente^_NSWindowsMenuppr-!zzy"UAjudarxy{*1{||)pz!}\Ajuda do X11[_NSMainMenuTmenu V^apps_separator ɀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ȀR #@Ā#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{279, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{279, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{280, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE)HIJKLMNOQRSTUWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@U#@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNomeijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_]NSControlView_NSPlaceholderString0AoClula de textoijlpq#@*PTB1_controlTextColor+,ڤ/+,]NSTableColumn/HIJKLMNOSTU #@V #@D[\]^_`abefWComandoTK0.33333299[\]^_ȀoClula de textoHIJKLMNOSTU #@L@#@$[\]^_`abefVAtalho [headerColorTB1C1 1[\]^__NSDrawsBackground oClula de textoijl!"pq#@(')€_controlBackgroundColor,-TL0.602715373N0.6666666667 124ŀYgridColor78TM0.4246723652E0.5 1+,<=[NSTableView<>/YNSControlZapps_tableCD ˀՀGKMNPQKVNSCell̀ ̀΀ Y[\ Z_{{15, 245}, {402, 18}}b[cde_f]g\hijkloCqTstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπ_"Clique atravessa janelas inactivasxyz[NSImageNameрXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton>/]click_through ^׀^copy_menu_item ـGMŀڀ ۀ܀ [p Zc_{{69, 235}, {131, 26}}hc[b_dei\gTsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀ijlpq WNSState߀܀!*ZDo monitor__popUpItemAction:ZOtherViews1ڀހ)߀!Y256 cores߀!XMilhares߀!gMilhes+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton>/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator G$MN()$ŀ 1[4 Z_{{18, 243}, {402, 18}}b[cde_f]g\hijklo>Tstu!ЀoAutenticar ligaes[enable_authFG GMNQRŀڀ _{{18, 182}, {409, 23}}b[cde_f]g\hijkloF^Tstu!ЀoModo ecr completo_enable_fullscreenfg GMNqrŀڀ  _{{37, 116}, {476, 18}}b[cde_f]g\hijklof~Tstu!Ёo9Permitir acesso barra de menus em modo de ecr completo_enable_fullscreen_menu GM_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@(_{{54, 79}, {521, 31}}Z{250, 750}[\]^_k   @olA barra de menus ficar visvel quando o cursor do rato for colocado na parte superior do monitor principal.ijlmpq )\controlColor+,[NSTextField>/_enable_fullscreen_menu_text GMNˀ  [  YZAAC_{{18, 127}, {402, 18}}GM  DE #@3b[cde_f]g\hijkloTstu!Ёo,Activar as equivalncias de teclado para X11_enable_keyequivs G$MN$ŀ  _{{18, 166}, {402, 18}}b[cde_f]g\hijkloTstu!Ёo%Permitir ligaes de clientes da redeZenable_tcp  %GMN"#) !# "_{{18, 243}, {402, 18}}GM45;  GI Hb[cde_f]g\hijkloATstu!Ё $oSimular rato de trs botes\fake_buttonsIJ '+GKMNTUKŀ̀ () _{{15, 184}, {402, 18}}b[cde_f]g\hijkloIaTstu!Ё'*_Foco segue o rato_focus_follows_mouseij -1GKMNtuKŀ̀ ./ _{{15, 137}, {402, 18}}b[cde_f]g\hijkloiTstu!Ё-0_Foco em janelas novas_focus_on_new_window 38GMN 46 5_{{18, 69}, {402, 18}}GM  RT Sb[cde_f]g\hijkloTstu!Ё37o'As teclas de opo enviam Alt_L e Alt_R_option_sends_alt :T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_ {{319, 328.0390625}, {660, 341}}oPreferncias do X11WNSPanelZ{320, 240}[Z @1сA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1)1 ); "KH53S)_{{36, 93}, {564, 28}}[\]^_k F oSe estiverem activas, as teclas equivalentes da barra de menus podem interferir nas aplicaes X11 que utilizam o modificador Meta._{{36, 195}, {564, 42}}GMN*+ OP K[\]^_k)7" J okAo clicar, mantenha premidas as teclas Opo ou Comando para activar os botes central ou direito do rato. GMDE  LM _{{36, 151}, {564, 19}}[\]^_kRK N oYPermite que alteraes do menu de entrada se sobreponham ao actual mapa de teclas do X11._{{18, 176}, {402, 18}}b[cde_f]g\hijklo;\Tstu!ЁHQo)Seguir a disposio do teclado do sistema_{{36, 32}, {564, 31}}GMNijр VW A[\]^_kv5  UoiQuando activadas, as teclas de opo enviam smbolos de teclas X11 Alt_L e Alt_R em vez de alternar_modo._{{18, 8}, {418, 18}}b[cde_f]g\hijkloTstu!ЁSXo4Permitir deslocao na direco do movimento do dedo_{{10, 33}, {614, 279}}+,/_{{13, 10}, {634, 325}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1WEntrada+,]NSTabViewItem/ `ځqAbQ21Ffفdhl)GM ڀ ef #@F_{{17, 238}, {48, 20}}[\]^_kdg VCores:GMہ ڀ ij #@x@_{{36, 216}, {392, 14}}[\]^_kh k o3Esta opo ter efeito quando voltar a abrir o X11.GM ڀ mn #@_{{36, 148}, {539, 28}}[\]^_kl o oxActiva a janela raiz do X11. Utilize a combinao de teclas Comando-Opo-A para entrar e sair do modo de ecr completo._{{10, 33}, {614, 279}}eSada `sAb [ Zt1uy})GMN&'ŀs vw s_{{18, 255}, {409, 23}}b[cde_f]g\hijklo3Tstu!ЁuxoActivar sincronizaoGM@AG s z{ s#@_{{36, 221}, {540, 28}}[\]^_kNy  |oActiva o elemento de menu "copiar" e permite a sincronizao entre a rea de colagem do OS X e os buffers CLIPBOARD e PRIMARY do X11.GMNYZŀs ~ s_{{34, 129}, {409, 23}}b[cde_f]g\hijklofTstu!Ё}o:Actualizar CLIPBOARD quando a rea de colagem for alteradaGMNrsŀs  s_{{34, 104}, {560, 18}}b[cde_f]g\hijkloTstu!ЁoRActualizar PRIMARY (clique no boto do meio) quando a rea de colagem for alteradaGMNŀs  s_{{34, 79}, {544, 22}}b[cde_f]g\hijkloTstu!Ёo@Actualizar rea de colagem assim que for seleccionado novo textoGMNŀs  s_{{34, 192}, {410, 18}}b[cde_f]g\hijkloTstu!Ёo:Actualizar a rea de colagem quando CLIPBOARD for alteradoGMŁ s  s#@_{{48, 158}, {509, 28}}[\]^_k  omDesactive esta opo se pretender utilizar o xclipboard, o klipper ou qualquer outro gestor de clipboard X11.GM߁ s  s#@_{{48, 47}, {534, 28}}[\]^_k  o]Devido a limitaes do protocolo X11, esta opo nem sempre funcionar em algumas aplicaes._{{10, 33}, {614, 279}}orea de colagemK `́Ab1CIiˁ'-)GKM  K  ̀  #@H_{{23, 208}, {557, 31}}[\]^_k   oSe assinalar esta opo, ao clicar numa janela inactiva, o clique no s a traz para a frente como activa a janela completamente. GKM  K % ̀  #@~`_{{23, 158}, {490, 20}}[\]^_k ,  _IO foco da janela do X11 segue o cursor. Isto tem alguns efeitos adversos.GKM 8 9K ? ̀  #@_{{23, 103}, {577, 28}}[\]^_k F  ozA criao de uma nova janela X11 faz com que X11.app venha para primeiro plano (em vez de Finder.app, Terminal.app, etc.)._{{10, 33}, {614, 279}}WJanelas$ N`A 1 R U V W)G$M b c$   _{{36, 195}, {564, 42}}[\]^_k U o  oLanar o X11 cria chaves Xauthority de controlo de acesso. Se o endereo IP do sistema for alterado, estas chaves perdem a validade, podendo, assim, impossibilitar a execuo das aplicaes X11.G$M | }$   _{{36, 104}, {564, 56}}[\]^_k V   oSe activar esta opo, precisa igualmente de activar a opo Autenticar ligaes  para garantir a segurana do sistema. Se no activar esta opo, no so permitidas ligaes a partir de aplicaes remotas.G$M  $    #@y_{{17, 17}, {404, 14}}[\]^_k W   o9Estas opes tero efeito da prxima vez que abrir o X11._{{10, 33}, {614, 279}}iSegurana+, YNSTabView /Z{660, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard; Hŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item?  4Հ^x11_about_item!  u ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F # EUhide:J ) MZterminate:G / H_hideOtherApplications:H 5 J_unhideAllApplications: : ^Ucopy: @ e ]close_window: F k \zoom_window: J L  G O P+MN  X Y+_NSHuggingPriority    [ d hZ 7L_{{318, 191}, {155, 32}}b[cde_]g\hijk k n J p qts@ !ӀXDuplicar_apps_table_duplicate: w y  G O P+MN   +   _{{318, 159}, {155, 32}}b[cde_]g\hijk k n w qts!ӀWRemover_apps_table_delete: W _apps_table_show:  G O P+MN   +   _{{318, 223}, {155, 32}}b[cde_]g\hij k n qts!Ӏ_Adicionar elemento_apps_table_new:  ^prefs_changed:  ^prefs_changed:; H ^prefs_changed:   ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:| | Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:F  _enable_fullscreen_changed:D A _toggle_fullscreen:C  ˀ ^prefs_changed:I ' ^prefs_changed:i  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: $  %^prefs_changed: *  '^prefs_changed: 0  )^prefs_changed:f 6  +^prefs_changed: < 3 -^prefs_changed: B S /^prefs_changed:1 F ߯ G'2?@ABkCDEFGHIJ()*  !+p|#)5E;+jFRfr'AZsKCQ IU iu 9$) U c V } W + J Y w CQDE)3 1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz| :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication +    45NO M6=! _{{360, 400}, {477, 271}}oMenu Aplicao do X11Z{320, 240}1 J w )1 )3?C)1 )_{{1, 1}, {279, 214}}_{{0, -28}, {279, 214}}+,  ZNSClipView /1 Հ)_{{1, 1}, {279, 28}}   M  " % %_NSControlTarget_NSControlActionB @AA_{{1, 215}, {279, 15}}\_doScroller:+, , -ZNSScroller ,>/  M  8 % %B DAA_{{280, 29}, {15, 186}}_{{20, 20}, {296, 231}}1 B ߡ CGJ F G H I J K L   O_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, R S_NSPanGestureRecognizer T U/_NSPanGestureRecognizer_NSGestureRecognizer+, W/+, Y Z\NSScrollView Y/Z{477, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ` ߯'2222B22222222()*        +p);FfKCKKIKKiK$$$ U$ V$ W + J+ w+CDE+ -02222:22222222-QSS-Y[-acccccccc-xz:?A] "KH53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ߯ G'2?@ABkCDEFGHIJ()*  !+p|#)5E;+jFRfr'AZsKCQ IU iu 9$) U c V } W + J Y w CQDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acehkmnqtuxz| :?A] #E"IKMHP5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ߯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ߠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  @BDFHJLgp  ACEGIKMOQSWhjlnpy  13\^`acefhj+-/024579Z\acegik  =?ACEGI~ ,.;hjlnprtvxz#%')+-/Anprtvxz|~ "$&(*,.029JLNPR[lnprtvxz|~"KMOPRTUWYz|~ "$%')*,.OQSUWY[w(49NPRTVXg|~%2;Tbq 9Z|/KUo &:]_bdfhiklnoxz|} !)3Ydfijlnqsvx{}2357:=?ACDGIKU^r{9GS\q       ' 0 2 5 L U c l u | ~ !!!!!!!! !!!*!3!5!V!b!l!w!!!!!!!!!!!!!!!!!!!!"""7"9";"H"P"W"Y"["]"d"f"h"j"l""""""""###'#0#7#<#I#Q#^#j#l#u#}##############$$$$$$/$4$:$B$D$F$H$J5566666/6:6L6Y6`66666666666666677777777-7/7173757H7Q7Z7c7q7v7777777777777777788 828486888:8<8>8@8a888888888888888888888999999!9N9b9d9f9h9i9k9m9o9q9999999999999: ::::3:5:7:9:;:E:Z:h:n:p:r:{::::::::::;!;(;*;+;,;.;0;2;4;5;7;9;;;<;>;?;@;i;k;n;o;r;u;w;y;{;;;;< <<1>!>$>%>(>+>->/>1>J>>>>>>? ????? ?!?"?#?%?'?)?+?-?>?A?C?E?v?~??????????????????????@@@@@@@ @"@$@&@0@]@_@a@c@e@g@i@k@m@o@x@@@@@@@@@@@@@@@AAA#A)A>A@ABADAFAHAWAlAnApArAtAvAAAAAAAAAAAAAAB1B3B4B5B7B9B;BB@BBBCBEBFBGBpBrBuBvByB|B~BBBBBBBBBBBCCC2C4C6C8C:CE@ECEFEHEJEEEEEEEEF`F|FFFFFFFFFFFFFFFFFFFGG-G0G2G5G8G;G=GBHH.H1H3H5HJHLHOHQHSH`HiHuHHHHHHHHII I!I"I%I'I)I*I-I0I2I3I6I7I8I;IlImIpIsIvIyI|I~IIIIJ J JJJJJJJJJJ!J"J%J&J'J0J3JrJtJvJxJ{J~JJJJKKK K KKKlKnKoKpKrKtKvKwKzK}KKKKKKKKKKKKKKL9LDLYL[L]L`LcLeLLLLLLLLLLLLLLLLLMeMhMjMkMlMoMqMtMuMxM{M}M~MMMMMMMMMMMMNNN0N2N4N7N:NTATCTEThTTTTTTTTTTTTTTTTU;USUbUiUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVV0V3V5V8V:V=V@VBWKWdWWWWWWWWWWWWWWWWX X XXXXXXXY_YbYdYeYfYiYkYnYoYrYuYwYxY{Y|Y}YYYYYYYYYYZZZZZZZZZZ[F[^[[[[[[[[[[[[[[[[[\\\\ \ \\\]:]<]>]@]C]F]H]J]]]]]^^ ^^^^^^^5^<^F^S^V^Y^\^_^b^e^g^o^x^^^^^^^^^^^^^^^^^^^^_K_N_P_Q_R_T_V_Y_Z_]_`_b_c_e_f_g_p__________`0`3`5`6`7`9`;`>`?`B`E`G`H`J`K`L`U`n````````aaya|a~aaaaaaaaaaaaaaaaaaaaaaabbc c"c%c(c+c.c1c4c]c_cbcccfcickcmcocxcccccccccccdddddd d d ddddddd1dpdrdtdvdyd|d~ddeeeeeee e#e$e'e*e,e-e0e1e2e;eTeye|e~eeeefffffffffggggg g g g$gcgegggiglgogqgsghEhGhHhIhLhNhPhQhThWhYhZh]h^h_hxhhhhhhhhiniiiiiiiiiiiiiiiij:jj@jCjFjHjJjk(k*k+k,k/k1k3k4k7k:k@BEHhy{} "%>KMPSYjlnqtÀƁ%9<>?@CEGHKNPQTUVY&7:ORTWZiz|~Ʌ˅ͅЅӅ!#&)ADGJMOQSUWY[]`cfikmpsvy|ĊNJʊ͊Њӊ֊ي܊ߊ !$'),/13579;>GJLZċNjʋ͋Ћҋԋ֋)2;>ACFHQ\^`cehjsvxznjЌӌՌ׌Tfxz|}~ōЍێ>@BCDFHJMNQSUXYZ]v;Xwďݏ!*7@Kdox‘đƑȑʑ̑ΑБґԑ֑ؑڑܑޑ  #&),/258;>ADGJLNPRTVXZ]_bdfhkmprux{~Ēƒɒ˒ΒђԒ֒ؒڒݒߒ  "$&(+4  "$&(*,.02468:<>@BDFILORUX[^adgjmpsvy|Õƕɕ̕ϕҕՕؕەޕ  "$&),/258;>ADGJMPRTVXZ\^`behjmprtvxz|~ÖƖɖ̖ϖҖՖؖۖޖ  #&),/258;>ADGP!$'*-0369ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|ÛśǛɛ˛͛ϛћӛ՛כٛۛݛߛ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579;=?ACEGIKMOQSUWY[]fgirsvxorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/Localizable.strings0000644000175000017500000001052414757411105023223 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Pretende realmente sair do X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Todas as aplicaes X11 que estejam abertas param imediatamente, e perder quaisquer alteraes no guardadas."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Entrar em modo RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Uma aplicao pediu ao X11 para alterar a resoluo do ecr. O X11 restaurar o estado anterior do ecr quando a aplicao pea para voltar resoluo anterior. Pode igualmente usar a sequncia de teclas #%#A para forar o X11 a voltar ao estado anterior."; /* No comment provided by engineer. */ "Allow" = "Permitir"; /* No comment provided by engineer. */ "Always Allow" = "Permitir sempre"; /* No comment provided by engineer. */ "Cancel" = "Cancelar"; /* No comment provided by engineer. */ "Mac Help" = "Ajuda Mac"; /* No comment provided by engineer. */ "Quit" = "Sair"; /* No */ "No" = "No"; /* Yes */ "Yes" = "Sim"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Tem um ficheiro ~/.xinitrc.\n\nAs janelas apresentadas por aplicaes X11 podem no ter barras de ttulo, ou podem ter um aspecto diferente do das janelas apresentadas por aplicaes nativas.\n\nDeseja ignorar o ficheiro existente e usar o ambiente X11 padro da prxima vez que iniciar o X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Procurar actualizaes para X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist0000644000175000017500000000061314757411105022625 LprojCompatibleVersion 106.3 LprojLocale pt_PT LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/0000755000175000017500000000000014757411136017043 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/main.nib/0000755000175000017500000000000014757411136020536 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/main.nib/designable.nib0000644000175000017500000020620514757411105023246 Când opțiunea este activată, echivalentele tastelor barei de meniu pot interfera cu aplicații X11 care utilizează modificatorul Meta. Apăsați Opțiune sau Comandă în timp ce faceți clic pentru a activa butonul de mijloc sau de dreapta al mausului. Activează fereastra rădăcină X11. Utilizați combinția de taste Comandă-Opțiune-A pentru intarea și ieșirea din modul de afișare pe tot ecranul. Activează articolul de meniu "copiază" și permite sincronizarea între pasteboardul OSX și CLIPBOARDUL și tampoanele PRINCIPALE X11. Când opțiunea este activată, clicul pe o fereastră inactivă va determina trecerea clicului de maus prin fereastra respectivă, pe lângă activarea acesteia. Când opțiunea este activată, crearea unei ferestre X11 noi va determina aducerea X11.app în primplan (în locul Finder.app, Terminal.app etc.) Lansarea X11 va crea cheile de control al accesului Xauthority. Dacă adresa de IP a sistemului se schimbă, aceste chei devin nevalide, ceea ce poate împiedica lansarea aplicațiilor X11. Dacă opțiunea este activată, trebuie să fie activată și opțiunea “Efectuează autentificarea conexiunilor” pentru a asigura securitatea sistemului. Când opțiunea este dezactivată, nu sunt permise conexiunile din partea aplicațiilor de la distanță. xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/main.nib/keyedobjects.nib0000644000175000017500000013732414757411105023631 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata3 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}>?BH[histxnU  !&',12 7;<BR[\qrvwz} *34<=>DST\]^dst|}~ %&7?@AGVW_`agvw,34EFMNOWXYipqrz{|~"#+,=>EFUV^_nowx     ! " 2 3 : ; < = C K [ \ c d t u | }          ! & ' + , 1 2 7 8 = O X Y c d e j z {         ! " ' ( - . 3 4       . / 0 4 ? @ E G J K L M N  ` e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysPN.1102O&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ȀԀր$*07āƁȁʁ́΁Ёҁԁׁفہ݁߁   "$&(*,)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*UMeniu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iAplicaiiP^submenuAction:$%*iAplicaii1&')#   #!(nPersonalizare &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5ZDespre X112XY287mPreferine...Q,22  2kkm2!<<;"XServiciismu*=;>1w)__NSServicesMenu22  22BAoComut afiarea pe tot ecranulQa22  2UNSTag2F*E[Ascunde X11Qh22FH^Ascunde restul22!JlAfieaz tot22  22NMkTermin X11Qq\_NSAppleMenu-!RRQ"iAplicaiiST*iAplicaii1׀UV)R  R!W_Personalizare...-!ZZY"WEditareY[*1\)Z^]gCopiazQc   -!aa`"iFereastr*cbviFereastr1 dgjlmpst) &'afegnchideQw /0aihkMinimizeazQm 9a!kTZoom a   IJaonoCircul prin ferestreQ` PSTarqoCircul invers prin ferestreQ~ a   fa!uoAdu tot n fa^_NSWindowsMenuooq-!yyx"VAjutorqwxz*1z{{)oy!|ZAjutor X11[_NSMainMenuTmenu U^apps_separator ǀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ƀR@#@€#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews9 8: 7Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  <: ;Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification=2I#@#? ADCOA A AA#?6_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@].#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNumejklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView0AnCelul de textjkmqr#@*UB1_controlTextColor+,ؤ/+,]NSTableColumn/IJKLMNOPTUV #@Y#@D\]^_`abcfggComandUM0.3333329856\]^_`ǀnCelul de textIJKLMNOPTUV #@R#@$\]^_`abcfgjScurttur  [headerColorUB1C1 1\]^_`_NSDrawsBackground nCelul de textjkmqr#@(#%_controlBackgroundColor()UL0.602715373N0.6666666667 1.0ÀYgridColor34UM0.4246723652E0.5 1+,89[NSTableView8:/YNSControlZapps_table?@ ɀӀCGIKLGVNSCellʀ ˀ̀ TVW X_{{15, 245}, {402, 18}}]\^_``a^b]cdefgj?lUnop_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !΀ɀ̀_Clic prin ferestrele inactivestu[NSImageNameπXNSSwitch+,xy_NSButtonImageSourcex/+,{|\NSButtonCell{/+,~XNSButton~:/]click_through \Հ^copy_menu_item ׀Cŀ؀ ـڀ Vn Xa_{{57, 235}, {128, 26}}c^\]`_`d]bUne _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition׀@ @@ !ۀjkmqr WNSState߀݀ڀ!*lDe la afiaj__popUpItemAction:ZOtherViews1Հ܀)݀!߀Z256 culori݀!߀SMii݀!߀XMilioane+,_NSPopUpButtonCell{/^NSMenuItemCell+,]NSPopUpButton~:/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator CI#$ŀ ,V/ X_{{18, 243}, {402, 18}}]\^_``a^b]cdefgj9Unop!΀o&Efectueaz autentificarea conexiunilor[enable_authAB CILMŀ؀ _{{10, 182}, {409, 23}}]\^_``a^b]cdefgjAYUnop!΀oMod de afiare pe tot ecranul_enable_fullscreenab CIlmŀ؀  _{{29, 123}, {448, 18}}]\^_``a^b]cdefgjayUnop!΀oCPermite accesul la bara de meniu n modul de afiare pe tot ecranul_enable_fullscreen_menu C_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth؀  #@z_{{46, 86}, {428, 31}}Z{250, 750}\]^_`f   @oxBara de meniu va deveni vizibil atunci cnd cursorul mausului este plasat n partea de sus a afiajului dvs. principal.jkmnqr % \controlColor+,[NSTextField:/_enable_fullscreen_menu_text CIƀ  V WX??A_{{18, 130}, {402, 18}}C BC #@{ 1]\^_``a^b]cdefgjUnop!΁o(Activeaz echivalentele tastelor sub X11_enable_keyequivs CIŀ  _{{18, 166}, {402, 23}}]\^_``a^b]cdefgj Unop!΁o)Permite conexiuni de la clieni din reeaZenable_tcp #CI$ !  _{{18, 252}, {402, 18}}C/06 EG F]\^_``a^b]cdefgj<Unop!΁"o Emuleaz un maus cu trei butoane\fake_buttonsDE %)CGIOPGŀʀ &' _{{15, 184}, {402, 18}}]\^_``a^b]cdefgjD\Unop!΁%(oFocalizarea urmrete mausul_focus_follows_mousede +/CGIopGŀʀ ,- _{{15, 140}, {402, 18}}]\^_``a^b]cdefgjd|Unop!΁+.oFocalizeaz pe ferestrele noi_focus_on_new_window 16CI 24 3_{{18, 69}, {402, 18}}C PR Q]\^_``a^b]cdefgjUnop!΁15o%Tastele Opiune trimit Alt_L i Alt_R_option_sends_alt 8U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_'{{266, 364.03906000000001}, {537, 341}}nPreferine X11WNSPanelZ{320, 240}VX >1́?)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels[Z Y== @ 1)1$ 6 IF31Q)_{{36, 93}, {438, 31}}\]^_`f  DoCnd opiunea este activat, echivalentele tastelor barei de meniu pot interfera cu aplicaii X11 care utilizeaz modificatorul Meta._{{36, 212}, {438, 34}}CI$%  MN I\]^_`f$1   HoqApsai Opiune sau Comand n timp ce facei clic pentru a activa butonul de mijloc sau de dreapta al mausului. C=> JK _{{36, 154}, {438, 28}}\]^_`f KI  LogPermite modificri ale meniului de introducere pentru suprascrierea maprii curente a tastelor n X11. _{{18, 188}, {402, 18}}]\^_``a^b]cdefgj6TUnop!΁FOo0Respect aranjamentul de tastatur al sistemului_{{36, 32}, {438, 31}}CIab̀ TU ?\]^_`fn3  SoiCnd este activat, tastele Opiune trimit simbolurile tastelor Alt_L i Alt_R X11 n loc de Mode_switch._{{18, 8}, {418, 18}}]\^_``a^b]cdefgjwUnop!΁QVo4Deruleaz ntotdeauna n direcia micrii degetului_{{10, 33}, {491, 279}}+,}/_{{13, 10}, {511, 325}}1[_p)VNSViewYNSTabView\NSIdentifier ^]?\Q1WIntrare+,]NSTabViewItem/ ^؁o?`Q21Aaׁbfj)C؀ cd #@E_{{9, 238}, {46, 20}}\]^_`fb eWCulori:Cҁ؀ gh #@x@_{{28, 216}, {392, 19}}\]^_`ff  io=Aceste opiuni intr n vigoare cnd X11 este lansat din nou.C؀ kl #@{_{{28, 145}, {446, 31}}\]^_`fj  moActiveaz fereastra rdcin X11. Utilizai combinia de taste Comand-Opiune-A pentru intarea i ieirea din modul de afiare pe tot ecranul._{{10, 33}, {491, 279}}fIeire ^q?`V Xr1     sw{)CIŀq tu q_{{18, 255}, {409, 23}}]\^_``a^b]cdefgj (Unop!΁svoActiveaz sincronizareaC56<q xy q#@{_{{36, 216}, {436, 33}}\]^_`f Cw  zoActiveaz articolul de meniu "copiaz" i permite sincronizarea ntre pasteboardul OSX i CLIPBOARDUL i tampoanele PRINCIPALE X11.CINOŀq |} q_{{34, 129}, {409, 23}}]\^_``a^b]cdefgj [Unop!΁{~o4Actualizeaz CLIPBOARD la modificarea pasteboarduluiCIghŀq  q_{{34, 107}, {458, 18}}]\^_``a^b]cdefgj tUnop!΁oEActualizeaz PRINCIPAL (clic de mijloc) la modificarea pasteboarduluiCIŀq  q_{{34, 80}, {409, 23}}]\^_``a^b]cdefgjUnop!΁o;Actualizeaz pasteboardul imediat la selectarea de text nouCIŀq  q_{{34, 192}, {409, 23}}]\^_``a^b]cdefgjUnop!΁o6Actualizeaz pasteboardul la modificarea CLIPBOARDULUICq  q#@z@_{{48, 158}, {424, 28}}\]^_`f  ovDezactivai aceast opiune dac dorii s utilizai xclipboard, klipper sau orice alt gestionar de clipboard din X11.Cq  q_{{48, 46}, {424, 28}}\]^_`f  oDin cauza unor limitri ale protocolului X11, este posibil ca aceast opiune s nu funcioneze ntotdeauna n unele aplicaii._{{10, 33}, {491, 279}}ZPasteboardG ^ʁ?`1?DdɁ%+)CGGʀ  #@{_{{23, 197}, {451, 42}}\]^_`f   oCnd opiunea este activat, clicul pe o fereastr inactiv va determina trecerea clicului de maus prin fereastra respectiv, pe lng activarea acesteia. CG  Gʀ  _{{23, 164}, {451, 14}}\]^_`f   oQFocalizarea ferestrei X11 urmrete cursorul. Aceasta are cteva efecte adverse.CG + ,Gʀ  _{{23, 106}, {451, 28}}\]^_`f 8  oCnd opiunea este activat, crearea unei ferestre X11 noi va determina aducerea X11.app n primplan (n locul Finder.app, Terminal.app etc.)_{{10, 33}, {491, 279}}XFerestre @^? 1 D G H I)C T U  _{{36, 190}, {438, 47}}\]^_`f G a  oLansarea X11 va crea cheile de control al accesului Xauthority. Dac adresa de IP a sistemului se schimb, aceste chei devin nevalide, ceea ce poate mpiedica lansarea aplicaiilor X11.C m n  _{{36, 104}, {438, 56}}\]^_`f H z  oDac opiunea este activat, trebuie s fie activat i opiunea Efectueaz autentificarea conexiunilor  pentru a asigura securitatea sistemului. Cnd opiunea este dezactivat, nu sunt permise conexiunile din partea aplicaiilor de la distan.C     #@y_{{17, 17}, {404, 14}}\]^_`f I   o:Aceste opiuni intr n vigoare la urmtoarea lansare X11._{{10, 33}, {491, 279}}ZSecuritate+, YNSTabView /Z{537, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel Q_scroll_in_device_direction _sync_clipboard_to_pasteboard6 FÀ[sync_keymap sŀ_sync_pasteboard {ǀ_sync_pasteboard_to_clipboard ɀ_sync_pasteboard_to_primary ˀ_sync_primary_immediately ̀Zsync_text1 πZsync_text2D @р_toggle_fullscreen_item? 4Ӏ^x11_about_item t Ձ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector g ؁_minimize_window:?  4ځ_orderFrontStandardAboutPanel:@ 6 ܁[prefs_show:F  DށUhide:J  LZterminate:G  G_hideOtherApplications:H $ I_unhideAllApplications: ) \Ucopy: / d ]close_window: 5 j \zoom_window: 9 ;  C > ?,I  G H,_NSHuggingPriority   V S WX 5J_{{342, 191}, {134, 32}}]\^_``^b]cdef Z ] 9 _ `on@ !рgDuplic_apps_table_duplicate: f h  C > ?,I  r s,  _{{342, 159}, {134, 32}}]\^_``^b]cdef Z ] f  `on!рgElimin_apps_table_delete: V _apps_table_show:  C > ?,I   ,  _{{334, 223}, {152, 32}}]\^_``^b]cde Z ] `on!рoAdaug un articol_apps_table_new:  ^prefs_changed:  ^prefs_changed:6 F ^prefs_changed: ^prefs_changed:   ^prefs_changed: ׀  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:A _enable_fullscreen_changed:D @ _toggle_fullscreen:? ɀ ^prefs_changed:D % ^prefs_changed:d  + ^prefs_changed:  s ^prefs_changed: { !^prefs_changed:   #^prefs_changed:   %^prefs_changed:   '^prefs_changed:a % )^prefs_changed: + 1 +^prefs_changed: 1 Q -^prefs_changed:1 5 ί 6'2?@ABkCDEFGHIJ()*  +o{$0 >6%bAMam  6 O hG?LDP dp ,$ G U H n I , 9 H f sDREF*4 /-02469:??_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller :/    '  @ B??_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 1 Ρ 2EH 5 6 7 8 9 : ;   >_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionGF__panWithGestureRecognizer:+, A B_NSPanGestureRecognizer C D/_NSPanGestureRecognizer_NSGestureRecognizer+, F/+, H I\NSScrollView H/Z{490, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 O ί'2222B22222222()*        +o$ 6Aa    G?GGDGGdG G H I , 9, f,DEF, -02222:22222222-PRR-XZ-_aaaaaaaa-wy8=?[ IF31Q?_؀׀ڀ݀݀݀݀؁b؁f؀؀؁j؁?pqsqwq{qqqqq?ʀɀʁʁ%ʁʁ+ʁ?1퀊##H1 ί 6'2?@ABkCDEFGHIJ()*  +o{$0 >6%bAMam  6 O hG?LDP dp ,$ G U H n I , 9 H f sDREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/-02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./H     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ΠH+,^NSIBObjectData/",1:?QZw&-;HZh$-8APU^grsu~ 2 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   ' / W Y [ ] _ a j l n |        D R Y m {  ! / 1 3 5 7 9 ; C U b m x z | ~      # ( U ^ h q s u w y { }     8:<>@BDajy  ;=?ACEGIKMQbdfhjs"$MOQRTVWY[   249;=?AC#%')+-/>cegikmo?ACEGIKMOQdqsuwBDFHJLNPRT\ikmox{} "$&(;DUWY[]_aceg FHJKMOPRTuwy{}HJLMOQRTVwy{}  =?ACEGIT`ez|~Ubk)DPi-K_{-<Vj};EN\fnx,-/13468:<>wxz|~   " % ' * , 1 4 = ? H I L O R T V Y l u w z ! !!"!1!@!H!S!T!V!X!a!c!e!f!o!x!z!!!!!!!!!!!!!!"""")"0"9";"="?"A"V"_"|"~""""""""""""""####8#A#T#Y#l#u#|############$$$$$$ $$#$8$E$Z$]$a$c$e$v${$$$$$$616:6G6L6Y6b6v666666666666667 77%7(7*7,797<7>7S7U7W7Y7[7n7w777777777777788888 8 88(86888]8_8a8c8e8g8i88888888888888889 9 9"9$9&9(949I9L9P9R9T9}9999999999999999999::':4:C:E:G:\:^:`:b:d:n::::::::::::::::;J;Q;S;T;U;W;Y;[;\;^;`;b;c;e;f;g;;;;;;;;;;;<<<3>>>>> > > >>>>>>>>A>C>F>G>J>M>O>Q>S>l>>>>???.?0?2?7?@?B?C?D?E?G?I?K?M?O?`?c?e?g?????????????????@@ @@@@@@D@F@H@J@L@N@P@R@T@V@a@@@@@@@@@@@@@@@@@@@@@@@A AA%A.AE?EAEBECE\EEEEEEEEF3FLFaFcFeFhFkFmFFGG4G7G9G:G;G=G?GBGCGFGIGKGLGNGOGPGYGqG|GGGGGGGGHHHHHHHHHHHHII I*I?IAICIFIIIKIIIIIIIIIIIIIIIIIIIIJJJJ J JJJ*JJJJJJJJJJJJJJJJJJJKKKKK K KKaKtKKKKKKKKKKKKKKKLLLLLLL!L`LbLdLfLiLlLnLpLLLLLLLLMPMRMSMTMWMYM[M\M_MbMdMeMhMiMjMmMMMMMMMMNNNNN N N NNNNQNSNUNWNZN]N_NaNNNNNNNNO-O/O0O1O3O5O7O8O;O>O@OAOCODOEO^OOOOOOOOOOPPPPPPPzP|P}P~PPPPPPPPPPPPPPPPPPPPQ7QMQbQdQfQiQlQnQQQQQQQQQQQQQQQQRRmRpRrRsRtRwRyR|R}RRRRRRRRRRRRRRRRS*S=SRSTSVSYS\S^SSSSSST TT6TST`T}TTTTTTTTTTTUUUUU UUUUUUU!U#UMUjUrU}UUUUUUUUUUUUUVV,V;VBV[V^VaVbVeVhVjVmVpVsVuVvVyV{V}V~VVVVVVVVVVVVVVVVVWWW W WWWX"X;XXXXXXXXXXXXXXXXXXXXXXXYZh?hXhhhhhhhhiimioipiqitivixiyi|iiiiiiiiiiiiiiij|jjjjjjjjjjjjjjjk kHkJkLkNkQkTkVkXkl,l.l/l0l3l5l7l8l;l>l@lAlDlElFl_llllllllmmmmmmmmmmmmmmmmmmmmmmmmmmnoOoRoToUoVoYo[o^o_oboeogohokolomooooooooppppppqqqq qqq!q$q'q*q-q0q2qqqqqqqqqqqqqqqqqqqqrrrr r sEssssssssssssssssstt t tttttu"u%u'u(u)u+u-u0u1u4u7u9u:uuWu|uuuuuuvvvvvvvvvvwwww w wwwyw|w~wwwwwwwwwwwwwwwwwwwwwyXyyyyyyyyyyyyyyyyyzzzz!z$z'z)||||||||||||||||||||||||||}h}}}}}}}}}~~ ~~'~,~8~M~O~Q~T~W~Y~v~~~~~~~~~~~~~~~~~~+-/257Vkmoruw(=?ACFHavxz|ƀހ "357:=]npruxˁ܁ށ3@BEHN_acfiw.13458:<=@CEFIJKNwy|}܃ !257:=Ӆ )>OQSVYl}W`bdgjlnІ &79;>APadfil{ʇۇ݇߇  1358;N_acfiLjɈˈΈш !$'6GJLORaruwz}ȉˉ͉ЉӉ  "%(7HKMPSbsvx{~ɋ̋΋Ћҋԋ֋؋ڋ܋ދ "%(+.147:=@CFILORUX[^`bdfhjlnqtwz|~ŒŌȌʌ̌ΌьԌ׌ڌ݌ !#%')+-/1479GJMORT]hjloqtvʎӎ܎ߎ`rȏя܏JLNOPRTVYZ]_adefiʐGdǑБ (-6CLWp{“ēƓȓʓ̓ΓГғԓ֓ؓړܓޓ  #&),/258;>ADGJMPSVXZ\^`bdfiknprtvx{}”Ŕǔʔ̔ϔєԔ֔ٔܔߔ !$')+-/136? !#%')+-/13579;=?ACEGIKMOQTWZ]`cfilorux{~ėǗʗ͗Зӗ֗ٗܗߗ !$'*,.0369ADGJMPY"$'*-0369ADGJMPSVY\_behknqtwz}œŜȜ˜ΜќԜלڜݜ "%(+.147:=@CFILORUX[^adgjmpsvy|ĝƝȝʝ̝ΝНҝԝ֝؝ڝܝޝ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~žĞƞȞʞ̞ΞОҞԞ֞؞ڞܞޞ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfopr{|xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013727314757411105024353 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata3 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}  <=@FYfgqrvlS  $%*/0 59:@QZ[pquvy|  )23;<=CRS[\]crs{|}  $%6>?@FUV^_`fuv~+23DELMNVWXhopqyz{}~!"*+<=DETU]^mnvw     ! 1 2 9 : ; < B J Z [ b c s t { |           % & * + 0 1 6 7 < N W X b c d i y z          ! & ' , - 2 3       - . / 3 > ? D F I J K L M G _ d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysPN.1102O&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ȀԀր$*07āƁȁʁ́΁Ёҁԁׁفہ݁߁   "$&(*,)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*UMeniu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iAplicaiiP^submenuAction:$%*iAplicaii1&')#   #!(nPersonalizare &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX_w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5ZDespre X112XY287mPreferine...Q,22  2kkm2!<<;"XServiciismu*=;>1w)__NSServicesMenu22  22BAoComut afiarea pe tot ecranulQa22  2UNSTag2F*E[Ascunde X11Qh22FH^Ascunde restul22!JlAfieaz tot22  22NMkTermin X11Qq\_NSAppleMenu-!RRQ"iAplicaiiST*iAplicaii1׀UV)R  R!W_Personalizare...-!ZZY"WEditareY[*1\)Z^]gCopiazQc   -!aa`"iFereastr*cbviFereastr1 dgjlmpst) &'afegnchideQw /0aihkMinimizeazQm 9a!kTZoom a   IJaonoCircul prin ferestreQ` PSTarqoCircul invers prin ferestreQ~ a   fa!uoAdu tot n fa^_NSWindowsMenuooq-!yyx"VAjutorqwxz*1z{{)oy!|ZAjutor X11[_NSMainMenuTmenu U^apps_separator ǀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ƀR #@€#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews9 8: 7Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  <: ;Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification=2I#@#? ADCOA A AA#?6_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNPQRSTVW\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@Z#@O]`Z[\]^_`abcde[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNumehijklmnopVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontstu_NSFontDescriptorAttributesw1x|WNS.keysyz{}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellZ[\]^]NSControlView0AnCelul de texthikop#@*SB1_controlTextColor+,֤/+,]NSTableColumn/GHIJKLMNRST #@U#@DZ[\]^_`adegComandSM0.3333329856Z[\]^ŀnCelul de textGHIJKLMNRST #@O#@$Z[\]^_`adejScurttur [headerColor  SB1C1 1Z[\]^_NSDrawsBackground nCelul de texthikop#@(!#_controlBackgroundColor&'SL0.602715373N0.6666666667 1,.ÀYgridColor12SM0.4246723652E0.5 1+,67[NSTableView68/YNSControlZapps_table=> ɀӀAEGHJKEVNSCellʀ ˀ̀ SUV X_{{15, 245}, {402, 18}}\Z]^_^`\a[bcdefi=kSmno_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !΀ɀ̀_Clic prin ferestrele inactiverst[NSImageNameπXNSSwitch+,wx_NSButtonImageSourcew/+,z{\NSButtonCellz/+,}~XNSButton}8/]click_through \Հ^copy_menu_item ׀AGĀ؀ ـڀ Un Xa_{{57, 235}, {128, 26}}b]Z\^^_c[aSmd _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition׀@ @@ !ۀhikop WNSState߀݀ڀ!*lDe la afiaj__popUpItemAction:ZOtherViews1Ԁ܀)݀!߀Z256 culori݀!߀SMii݀!߀XMilioane+,_NSPopUpButtonCellz/^NSMenuItemCell+,]NSPopUpButton}8/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator AGH"#Ā +U. X_{{18, 243}, {402, 18}}\Z]^_^`\a[bcdefi8Smno!΀o&Efectueaz autentificarea conexiunilor[enable_auth@A AGHKLĀ؀ _{{10, 182}, {409, 23}}\Z]^_^`\a[bcdefi@XSmno!΀oMod de afiare pe tot ecranul_enable_fullscreen`a AGHklĀ؀  _{{29, 123}, {448, 18}}\Z]^_^`\a[bcdefi`xSmno!΀oCPermite accesul la bara de meniu n modul de afiare pe tot ecranul_enable_fullscreen_menu AG_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth؀  #@z_{{46, 86}, {428, 31}}Z{250, 750}Z[\]^e   @oxBara de meniu va deveni vizibil atunci cnd cursorul mausului este plasat n partea de sus a afiajului dvs. principal.hiklop # \controlColor+,[NSTextField8/_enable_fullscreen_menu_text AGHŀ  U WX??A_{{18, 130}, {402, 18}}AG BC #@{ 1\Z]^_^`\a[bcdefiSmno!΁o(Activeaz echivalentele tastelor sub X11_enable_keyequivs AGHĀ  _{{18, 166}, {402, 23}}\Z]^_^`\a[bcdefi Smno!΁o)Permite conexiuni de la clieni din reeaZenable_tcp #AGH# !  _{{18, 252}, {402, 18}}AG./5 EG F\Z]^_^`\a[bcdefi;Smno!΁"o Emuleaz un maus cu trei butoane\fake_buttonsCD %)AEGHNOEĀʀ &' _{{15, 184}, {402, 18}}\Z]^_^`\a[bcdefiC[Smno!΁%(oFocalizarea urmrete mausul_focus_follows_mousecd +/AEGHnoEĀʀ ,- _{{15, 140}, {402, 18}}\Z]^_^`\a[bcdefic{Smno!΁+.oFocalizeaz pe ferestrele noi_focus_on_new_window 16AGH 24 3_{{18, 69}, {402, 18}}AG PR Q\Z]^_^`\a[bcdefiSmno!΁15o%Tastele Opiune trimit Alt_L i Alt_R_option_sends_alt 8S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask9:= <@x;!_'{{266, 364.03906000000001}, {537, 341}}nPreferine X11WNSPanelZ{320, 240}UX >1ˁ?)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels[Z Y== @ 1)1# 5 IF31Q)_{{36, 93}, {438, 31}}Z[\]^e  DoCnd opiunea este activat, echivalentele tastelor barei de meniu pot interfera cu aplicaii X11 care utilizeaz modificatorul Meta._{{36, 212}, {438, 34}}AGH#$  MN IZ[\]^e#0   HoqApsai Opiune sau Comand n timp ce facei clic pentru a activa butonul de mijloc sau de dreapta al mausului. AG<= JK _{{36, 154}, {438, 28}}Z[\]^e JI  LogPermite modificri ale meniului de introducere pentru suprascrierea maprii curente a tastelor n X11. _{{18, 188}, {402, 18}}\Z]^_^`\a[bcdefi5SSmno!΁FOo0Respect aranjamentul de tastatur al sistemului_{{36, 32}, {438, 31}}AGH`aˀ TU ?Z[\]^em3  SoiCnd este activat, tastele Opiune trimit simbolurile tastelor Alt_L i Alt_R X11 n loc de Mode_switch._{{18, 8}, {418, 18}}\Z]^_^`\a[bcdefivSmno!΁QVo4Deruleaz ntotdeauna n direcia micrii degetului_{{10, 33}, {491, 279}}+,|/_{{13, 10}, {511, 325}}1[_p)VNSViewYNSTabView\NSIdentifier ^]?\Q1WIntrare+,]NSTabViewItem/ ^؁o?`Q21@`ׁbfj)AG؀ cd #@E_{{9, 238}, {46, 20}}Z[\]^eb eWCulori:AGс؀ gh #@x@_{{28, 216}, {392, 19}}Z[\]^ef  io=Aceste opiuni intr n vigoare cnd X11 este lansat din nou.AG؀ kl #@{_{{28, 145}, {446, 31}}Z[\]^ej  moActiveaz fereastra rdcin X11. Utilizai combinia de taste Comand-Opiune-A pentru intarea i ieirea din modul de afiare pe tot ecranul._{{10, 33}, {491, 279}}fIeire ^q?`U Xr1     sw{)AGHĀq tu q_{{18, 255}, {409, 23}}\Z]^_^`\a[bcdefi 'Smno!΁svoActiveaz sincronizareaAG45;q xy q#@{_{{36, 216}, {436, 33}}Z[\]^e Bw  zoActiveaz articolul de meniu "copiaz" i permite sincronizarea ntre pasteboardul OSX i CLIPBOARDUL i tampoanele PRINCIPALE X11.AGHMNĀq |} q_{{34, 129}, {409, 23}}\Z]^_^`\a[bcdefi ZSmno!΁{~o4Actualizeaz CLIPBOARD la modificarea pasteboarduluiAGHfgĀq  q_{{34, 107}, {458, 18}}\Z]^_^`\a[bcdefi sSmno!΁oEActualizeaz PRINCIPAL (clic de mijloc) la modificarea pasteboarduluiAGHĀq  q_{{34, 80}, {409, 23}}\Z]^_^`\a[bcdefi Smno!΁o;Actualizeaz pasteboardul imediat la selectarea de text nouAGHĀq  q_{{34, 192}, {409, 23}}\Z]^_^`\a[bcdefiSmno!΁o6Actualizeaz pasteboardul la modificarea CLIPBOARDULUIAGq  q#@z@_{{48, 158}, {424, 28}}Z[\]^e  ovDezactivai aceast opiune dac dorii s utilizai xclipboard, klipper sau orice alt gestionar de clipboard din X11.AGq  q_{{48, 46}, {424, 28}}Z[\]^e  oDin cauza unor limitri ale protocolului X11, este posibil ca aceast opiune s nu funcioneze ntotdeauna n unele aplicaii._{{10, 33}, {491, 279}}ZPasteboardE ^ʁ?`1=CcɁ%+)AEGEʀ  #@{_{{23, 197}, {451, 42}}Z[\]^e   oCnd opiunea este activat, clicul pe o fereastr inactiv va determina trecerea clicului de maus prin fereastra respectiv, pe lng activarea acesteia. AEG  Eʀ  _{{23, 164}, {451, 14}}Z[\]^e   oQFocalizarea ferestrei X11 urmrete cursorul. Aceasta are cteva efecte adverse.AEG * +Eʀ  _{{23, 106}, {451, 28}}Z[\]^e 7  oCnd opiunea este activat, crearea unei ferestre X11 noi va determina aducerea X11.app n primplan (n locul Finder.app, Terminal.app etc.)_{{10, 33}, {491, 279}}XFerestre ?^? 1 C F G H)AG S T  _{{36, 190}, {438, 47}}Z[\]^e F `  oLansarea X11 va crea cheile de control al accesului Xauthority. Dac adresa de IP a sistemului se schimb, aceste chei devin nevalide, ceea ce poate mpiedica lansarea aplicaiilor X11.AG l m  _{{36, 104}, {438, 56}}Z[\]^e G y  oDac opiunea este activat, trebuie s fie activat i opiunea Efectueaz autentificarea conexiunilor  pentru a asigura securitatea sistemului. Cnd opiunea este dezactivat, nu sunt permise conexiunile din partea aplicaiilor de la distan.AG     #@y_{{17, 17}, {404, 14}}Z[\]^e H   o:Aceste opiuni intr n vigoare la urmtoarea lansare X11._{{10, 33}, {491, 279}}ZSecuritate+, YNSTabView /Z{537, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel Q_scroll_in_device_direction _sync_clipboard_to_pasteboard5 FÀ[sync_keymap sŀ_sync_pasteboard {ǀ_sync_pasteboard_to_clipboard ɀ_sync_pasteboard_to_primary ˀ_sync_primary_immediately ̀Zsync_text1 πZsync_text2D @р_toggle_fullscreen_item? 4Ӏ^x11_about_item t Ձ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector g ؁_minimize_window:?  4ځ_orderFrontStandardAboutPanel:@ 6 ܁[prefs_show:F  DށUhide:J  LZterminate:G  G_hideOtherApplications:H # I_unhideAllApplications: ( \Ucopy: . d ]close_window: 4 j \zoom_window: 8 :  A = >*GH  F G*_NSHuggingPriority   U R VX 5J_{{342, 191}, {134, 32}}\Z]^_^\a[bcde Y \ 8 ^ _nm@ !рgDuplic_apps_table_duplicate: e g  A = >*GH  q r*  _{{342, 159}, {134, 32}}\Z]^_^\a[bcde Y \ e ~ _nm!рgElimin_apps_table_delete: V _apps_table_show:  A = >*GH   *  _{{334, 223}, {152, 32}}\Z]^_^\a[bcd Y \ _nm!рoAdaug un articol_apps_table_new:  ^prefs_changed:  ^prefs_changed:5 F ^prefs_changed: ^prefs_changed:   ^prefs_changed: ׀  ^prefs_changed:{ {  Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:@ _enable_fullscreen_changed:D @ _toggle_fullscreen:= ɀ ^prefs_changed:C % ^prefs_changed:c + ^prefs_changed:  s ^prefs_changed: { !^prefs_changed:   #^prefs_changed:   %^prefs_changed:   '^prefs_changed:` $ )^prefs_changed: * 1 +^prefs_changed: 0 Q -^prefs_changed:1 4 ͯ 5'2?@ABkCDEFGHIJ()*  +o{#/ =5$a@L`l  5 N g E=KCO co +# F T G m H * 8 G e rBPCD(2 /-02469:??_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 8/  G  &  @ B??_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 0 ͡ 1EH 4 5 6 7 8 9 :   =_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionGF__panWithGestureRecognizer:+, @ A_NSPanGestureRecognizer B C/_NSPanGestureRecognizer_NSGestureRecognizer+, E/+, G H\NSScrollView G/Z{490, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 N ͯ'2222B22222222()*        +o# 5@`     E=EECEEcE F G H * 8* e*BCD* -02222:22222222-PRR-XZ-_aaaaaaaa-wy8=?[ IF31Q?_؀׀ڀ݀݀݀݀؁b؁f؀؀؁j؁?pqsqwq{qqqqq?ʀɀʁʁ%ʁʁ+ʁ?1퀊##H1 ͯ 5'2?@ABkCDEFGHIJ()*  +o{#/ =5$a@L`l  5 N g E=KCO co +# F T G m H * 8 G e rBPCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~/-02469:?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~QRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./H     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ͠H+,^NSIBObjectData/",1:?QZw&-;HZh$-8APU^grsu~ 2 4 6 8 : < > @ B D F H J L N Q T W Z ] ` c f i l o r u x { ~   ' / W Y [ ] _ a j l n |        D R Y m {  ! / 1 3 5 7 9 ; C U b m x z | ~      # ( U ^ h q s u w y { }     8:<>@BDajy  ;=?ACEGIKMQbdfhjs"$MOQRTVWY[   249;=?AC#%')+-/>cegikmo?ACEGIKMOQdqsuwBDFHJLNPRT\ikmox{} "$&(;DUWY[]_aceg FHJKMOPRTuwy{}HJLMOQRTVwy{}  =?ACEGIT`ez|~Q^g%@Le)G[w)8Rf",5CMU_!#%^_acfikmopsuwes       $ & / 0 3 6 9 ; = @ S \ ^ a x ! !!'!/!:!;!=!?!H!J!L!M!V!_!a!!!!!!!!!!!!!!!!!""" """$"&"("="F"c"e"g"t"|""""""""""""## ###(#;#@#S#\#c#h#u#}################$ $$,$A$D$H$J$L$]$b$h$p$r$t$v$x66!6.636@6I6]6h6z666666666666677 7777 7#7%7:7<7>7@7B7U7^7g7p7~777777777777777788888D8F8H8J8L8N8P8m888888888888888899 9 9 99909397999;9d9x9z9|9~9999999999999999:::*:,:.:C:E:G:I:K:U:j:x:~:::::::::::::;1;8;:;;;<;>;@;B;D;E;G;I;K;L;N;O;P;y;{;~;;;;;;;;;<<<.>>*>,>/>0>3>6>8>:><>U>>>>>????? ?)?+?,?-?.?0?2?4?6?8?I?L?N?P???????????????????????@@-@/@1@3@5@7@9@;@=@?@J@w@y@{@}@@@@@@@@@@@@@@@@@@@@@AAA%A2A8AMAOAQASAUAWAfA{A}AAAAAAAAAAAAAAAAAAB@BBBCBDBFBHBJBKBMBOBQBRBTBUBVBBBBBBBBBBBBBBBBBBCFCRCgCiCkCmCoCqCCCCCCCCCCCCCCCCD:DD@DBDDDFDHDDDDDDDDEEEEEEEEE"E%E'E(E*E+E,EEEEEEEEEEFF5FJFLFNFQFTFVFFGGG G"G#G$G&G(G+G,G/G2G4G5G7G8G9GBGZGeGGGGGGGGHHHHHHHHHHHHHHII(I*I,I/I2I4IIIIIIIIIIIIIIIIIIIIIIIIIIIJJ~JJJJJJJJJJJJJJJJJJJJJJJJJKJK]KrKtKvKyK|K~KKKKKKKKKKKKKKKL LILKLMLOLRLULWLYLLLLLLLLM9M;MN@NCNFNHNJNNNNNNNNOOOOOOO O!O$O'O)O*O,O-O.OGOOOOOOOOOOOOPPPPPcPePfPgPiPkPmPnPqPtPvPwPyPzP{PPPPPPPPPQ Q6QKQMQOQRQUQWQQQQQQQQQQQQQQQQQRVRYR[R\R]R`RbReRfRiRlRnRoRrRsRtRwRRRRRRRRSS&S;S=S?SBSESGSSSSSSSTTTZAZBZCZFZ_ZZZZZZZ[e[~[[[[[[[[\0\H\\\\\\\\\\\\\\\\\\\\\\\]]^$^&^(^*^-^0^2^4^^^^^^^^^^_____&_0_=_@_C_F_I_L_O_Q_Y_b_p_u__________________`4`7`9`:`;`=`?`B`C`F`I`K`L`N`O`P`Y`p````````aaaaaaaa!a"a%a(a*a+a-a.a/a8aQavaya{a~aaabbjbmbobpbqbsbubxbyb|bbbbbbbbbbbbbbbcdd$d=d@dCdFdIdLdOdxdzd}d~ddddddddddddddddeeeee e"e$e%e(e+e-e.e1e2e3eLeeeeeeeeef3f6f8f9f:f=f?fBfCfFfIfKfLfOfPfQfZfsfffffffghhhhhhhhhh h"h#h&h'h(hAhhhhhhhhhiViXiYiZi]i_iaibieihijikinioipiiiiiiiiijejjjjjjjjjjjjjjjjk1k3k5k7k:k=k?kAklllllll l!l$l'l)l*l-l.l/lHllllllllmmmmpmrmsmtmwmym|m}mmmmmmmmmmmmmmmmno8o;o=o>o?oBoDoGoHoKoNoPoQoToUoVonooooooopppppppppppqq q qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqs.sssssssssssssssssssssssstu uuuuuuuuuu u"u#u%u&u'u@ueuhujumupusuuvvvvvvvvvvvvvvvvvwbwewgwhwiwkwmwpwqwtwwwywzw|w}w~wwwwwwwwyAyyyyyyyyyyyyyyyyyzzzz z zz||h|k|m|n|o|q|s|v|w|z|}||||||||||||||}Q}j}u}~}}}}}}}}}~~~!~6~8~:~=~@~B~_~t~v~x~{~~~~~~~~~~~~~~~~~~ ?TVX[^`}&(*,/1J_acehjyǀ΀݀  #&FWY[^am~ŁǁɁ́ρ)+.17HJLOR`qsux{!#%&),./2347`befikmorŃ΃Ѓ҃׃ڃ݃߃  #&'8:ADGIKMOQSUWZ]`cegilorux{~ÌƌɌ̌όҌՌ،ڌ܌ތ  "%(*,.0247@CESÍƍɍˍ͍ύ'0368;=FQSUXZ]_hkmoŎȎʎ̎I[moqrsuwy|}ŏА35789;=?BCFHJMNORk0Mlґّ,5@YdmvÓœǓɓ˓͓ϓѓӓՓדٓۓݓߓ !$'*-0369ADGJMPSVY\_behknqtwz}Ýŝǝɝ˝͝ϝѝӝ՝םٝ۝ݝߝ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÞŞǞɞ˞͞ϞўӞ՞מٞ۞ݞߞ !#%')+-/13579;=?ACEGIKMOXY[dehqxorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/Localizable.strings0000644000175000017500000001060614757411105022616 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Sigur dorii s terminai X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Toate aplicaiile X11 deschise se vor opri imediat, iar dvs. vei pierde orice modificri nesalvate."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Intrai n modul RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "O aplicaie a solicitat ca X11 s schimbe rezoluia ecranului dvs. X11 va restaura ecranul la starea sa precedent atunci cnd aplicaia respectiv va solicita revenirea la starea anterioar. Alternativ, putei utiliza secvena de taste #%#A pentru a fora revenirea X11 la starea anterioar."; /* No comment provided by engineer. */ "Allow" = "Permite"; /* No comment provided by engineer. */ "Always Allow" = "Permite ntotdeauna"; /* No comment provided by engineer. */ "Cancel" = "Renun"; /* No comment provided by engineer. */ "Mac Help" = "Ajutor Mac"; /* No comment provided by engineer. */ "Quit" = "Termin"; /* No */ "No" = "Nu"; /* Yes */ "Yes" = "Da"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Avei un fiier ~/.xinitrc existent.\n\nEste posibil ca ferestrele afiate de aplicaiile X11 s nu aib bare de titlu sau s arate diferit de ferestrele afiate de aplicaiile native.\n\nDorii s ndeprtai fiierul existent i s utilizai mediul X11 standard data viitoare cnd pornii X11?"; /* window item modifiers */ "window item modifiers" = "comand"; /* Updates menu title & */ "Check for X11 Updates..." = "Caut actualizri X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/ro.lproj/locversion.plist0000644000175000017500000000061014757411105022214 LprojCompatibleVersion 106.5 LprojLocale ro LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/0000755000175000017500000000000014757411136017051 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/main.nib/0000755000175000017500000000000014757411136020544 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib0000644000175000017500000021530614757411105023256 Если включено, эквиваленты клавиш строки меню могут пересекаться с эквивалентами в программах X11, использующих мета-модификатор. Удерживайте нажатыми кнопки Option или Command при активации средней или правой кнопок мыши. Если включено, создание нового окна X11 повлечет за собой перемещение на передний план X11.app (вместо Finder.app, Terminal.app и т. д.) Запуск X11 создаст ключи доступа-контроля Xauthority. Если системный IP-адрес изменяется, эти ключи становятся недействительными, что может препятствовать запуску программ X11. Если включено, проверка аутентификации подключений должна быть также включена для гарантии работы системы безопасности. Если выключено, подключения из удаленных программ недоступны. xorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects.nib0000644000175000017500000013667414757411105023646 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYbijkuvz{ @ADJ]jkuvzpW  !&+,167 <@AGW`avw{|   /89ABCIXYabcixy  *+;CDEKZ[cdekz{  23DLMNVWX`abryz{ -.67HIPQ`aijyz   $ % , - = > E F G H N V f g o p          " # ( ) . / 4 5 9 : ? @ E F K ] f g q r s x         # $ ) * / 0 5 6 ; < A B     & ' ( + < = > B M N S U X Y Z [ \  n j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d5=N1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "i@>3@0<<KP^submenuAction:$%*i@>3@0<<K1&')#   #!(j0AB@>8BL &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5o ?@>3@0<<5 X112XY287j0AB@>9:8 &Q,22  2kkm2!<<;"f!;C61Kstu*>=?f!;C61K1x)__NSServicesMenu22  22CBo"5@5:;NG5=85 ?>;=>M:@0==>3> @568<0Qa22  2UNSTag2G*Fj!:@KBL X11Qh22GIo!:@KBL >AB0;L=K522!Kl>:070BL 2A522  22ONm025@H8BL X11Qq\_NSAppleMenu-!SSR"i@>3@0<<KTU*i@>3@0<<K1؀VW)S  S!Xj0AB@>8BL &-![[Z"f@02:0\]*f@02:01^)[`_j>?8@>20BLQc  -!ccb"d:=>*edwd:=>1 !"filnortu) ()chgg0:@KBLQw 12ckjm#1@0BL 2 DockQm ;c!mo7<5=8BL <0AHB01 c   KLcqpo@C3>2>5 ?5@5:;NG5=85 >:>=Q` RKVcqso#1@0B=>5 :@C3>2>5 ?5@5:;NG5=85 >:>= c   gc!voA5 >:=0  =0 ?5@54=89 ?;0=^_NSWindowsMenuppr-!zzy"g!?@02:0wx{|*g!?@02:01|}})pz!~k!?@02:0 X11[_NSMainMenuTmenu V^apps_separator Ȁ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ǀR@#@À#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{351, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{351, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder !"#$%&'()*,.0124678.<=?]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{352, 1}, {16, 28}}+,BC]_NSCornerViewB/1EFGH)KLMNOPQRTUVWXZ[\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@aWd#@O]`^_`abcdefghi[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@c<OlmnopqrstVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontwxy_NSFontDescriptorAttributes{1|WNS.keys}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/WWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorW\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell^_`ab]NSControlView_NSPlaceholderString0AYText Celllmost#@*PWB1_controlTextColor+,ݤ/+,]NSTableColumn/KLMNOPQRVWX #@]#@D^_`abcdehig><0=40WK0.33333299^_`abˀKLMNOPQRVWX #@U#@$^_`abcde hih!>G. :;.[headerColorWB1C1 1^_`ab_NSDrawsBackground lmo"#st#@((*_controlBackgroundColor-.WL0.602715373N0.6666666667 135ĀYgridColor89WM0.4246723652E0.5 1+,=>[NSTableView=?/YNSControlZapps_tableDE ʀԀHLNPQLVNSCellˀ ̀̀ Y[\ Y_{{17, 245}, {402, 18}}b^cdebf`g_hijkloDqWstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀o !:2>7=>5 =060B85 =50:B82=KE >:>=xyz[NSImageNameЀXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton?/]click_through ^ր^copy_menu_item ؀Hǀـ ڀۀ [o Yb_{{57, 234}, {132, 26}}hc^bbdei_gWsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀lmost WNSStateހۀ!*h! M:@0=0__popUpItemAction:ZOtherViews1ڀ݀)ހ!j256 F25B>2ހ!f"KAOG8ހ!h8;;8>=K+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton?/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator H$N()$ǀ 1[4 Y_{{15, 243}, {402, 18}}b^cdebf`g_hijklo>Wstu!πo$@>25@OBL 0CB5=B8D8:0F88 ?>4:;NG5=89[enable_authFG HNQRǀـ _{{15, 182}, {409, 23}}b^cdebf`g_hijkloF^Wstu!πo>;=>M:@0==K9 @568<_enable_fullscreenfg HNqrǀـ  _{{15, 103}, {338, 34}}b^cdebf`g_hijklof~Wstu!ρoC 07@5H8BL 02B><0B8G5A:8 4>ABC? : AB@>:5 <5=N 2 ?>;=>M:@0==>< @568<5_enable_fullscreen_menu H_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~0_{{33, 66}, {487, 31}}Z{250, 750}^_`abk   @o\!B@>:0 <5=N 1C45B 2848<>9, :>340 C:070B5;L <KH8 ?5@52545= 2 25@E=NN G0ABL ?5@28G=>3> M:@0=0.lmopst * \controlColor+,[NSTextField?/_enable_fullscreen_menu_text HNˀ  [ XY@@B_{{15, 137}, {402, 18}}H CD #@@2b^cdebf`g_hijkloWstu!ρo!:;NG8BL M:2820;5=BK :;028H 2 X11_enable_keyequivs H$N$ǀ  _{{15, 166}, {402, 18}}b^cdebf`g_hijkloWstu!ρo) 07@5H0BL ?>4:;NG5=8O 87 :;85=BA:8E A5B59Zenable_tcp $HN"#)  " !_{{15, 243}, {402, 18}}HN34: NO Fb^cdebf`g_hijklo@Wstu!ρ#o-<C;8@>20BL B@5E:=>?>G=CN <KHL\fake_buttonsHI &*HLNSTLǀˀ '( _{{17, 179}, {402, 18}}b^cdebf`g_hijkloH`Wstu!ρ&)o$>:CA A;54C5B 70 <KHLN_focus_follows_mousehi ,0HLNstLǀˀ -. _{{15, 116}, {402, 18}}b^cdebf`g_hijklohWstu!ρ,/o$>:CA  =0 =>2K5 >:=0_focus_on_new_window 27HN 35 4_{{15, 76}, {402, 18}}H QS Rb^cdebf`g_hijkloWstu!ρ26o';028H8 Option >B?@02;ONB Alt_L 8 Alt_R_option_sends_alt 9W\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_ {{266, 364.0390625}, {600, 341}}m0AB@>9:8 X11WNSPanelZ{320, 240}[Y ?1с@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1)1 :)FH!42R)_{{33, 105}, {504, 28}}^_`abk E oA;8 2:;NG5=>, M:2820;5=BK :;028H AB@>:8 <5=N <>3CB ?5@5A5:0BLAO A M:2820;5=B0<8 2 ?@>3@0<<0E X11, 8A?>;L7CNI8E <5B0-<>48D8:0B>@.H)*0 GI #@~H_{{33, 200}, {495, 42}}H<= KL ^_`abk:IF J o]#45@68209B5 =060BK<8 :=>?:8 Option 8;8 Command ?@8 0:B820F88 A@54=59 8;8 ?@02>9 :=>?>: <KH8. _{{33, 166}, {504, 14}}^_`abkSH M oG 07@5H0BL 87<5=5=8O <5=N 22>40 4;O ?5@570?8A8 B5:CI59 X11-:0@BK :;NG59._{{15, 184}, {402, 18}}b^cdebf`g_hijklo)]Wstu!ρ!Po(!;54>20BL A8AB5<=>9 @0A:;04:5 :;0280BC@K_{{33, 41}, {504, 31}}HNjkр UV @^_`abkw4  TobA;8 2:;NG5=>, :;028H8 Option >B?@02;ONB A8<2>;K X11 :;028H Alt_L 8 Alt_R X11, 2<5AB> Mode_switch._{{15, 12}, {418, 18}}b^cdebf`g_hijkloWstu!ρRWo-A5340 ?@>:@CG820BL 2 AB>@>=C 42865=8O ?0;LF0_{{10, 33}, {554, 279}}+,/_{{13, 10}, {574, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1dE>4+,]NSTabViewItem/ _فp@aQ21Ff؁cgk)Hـ de #@E_{{9, 241}, {46, 17}}^_`abkcf f&25B0:H܁ـ hi #@x@_{{33, 216}, {392, 14}}^_`abkg j o7-B>B ?0@0<5B@ 2ABC?8B 2 A8;C ?@8 A;54CNI5< 70?CA:5 X11.Hـ lm _{{33, 148}, {487, 28}}^_`abkk n o}:;NG05B :>@=52>5 >:=> X11. A?>;L7C9B5 A>G5B0=85 :;028H Command-Option-A 4;O 2:;NG5=8O 8 2K:;NG5=8O ?>;=>M:@0==>3> @568<0._{{10, 33}, {554, 279}}eKE>4 _r@a [ Ys1tx|)HN&'ǀr uv r_{{2, 255}, {409, 23}}b^cdebf`g_hijklo3Wstu!ρtwo:;NG8BL A8=E@>=870F8NH@AGr yz r#@0_{{20, 221}, {522, 28}}^_`abkNx  {ow:;NG05B >1J5:B <5=N >?8@>20BL 8 @07@5H05B A8=E@>=870F8N <564C 1CD5@>< >1<5=0 OS X 8 1CD5@0<8 X11 CLIPBOARD/PRIMARY.HNYZǀr }~ r_{{21, 129}, {409, 23}}b^cdebf`g_hijklofWstu!ρ|o21=>2;OBL CLIPBOARD ?@8 87<5=5=8OE 2 1CD5@5 >1<5=0HNrsǀr  r_{{21, 102}, {539, 23}}b^cdebf`g_hijkloWstu!ρoF1=>2;OBL PRIMARY (A@54=OO :=>?:0 <KH8) ?@8 87<5=5=8OE 2 1CD5@5 >1<5=0HNǀr  r_{{21, 80}, {419, 18}}b^cdebf`g_hijkloWstu!ρo71=>2;OBL 1CD5@ >1<5=0 A@07C ?>A;5 2K1>@0 =>2>3> B5:AB0HNǀr  r_{{21, 192}, {409, 23}}b^cdebf`g_hijkloWstu!ρo11=>2;OBL 1CD5@ >1<5=0 ?@8 87<5=5=8OE 2 CLIPBOARDHŁr  r#@_{{36, 158}, {501, 28}}^_`abk  o{B:;NG8B5 MB>B ?0@0<5B@, 5A;8 E>B8B5 8A?>;L7>20BL xclipboard, klipper 8;8 8=CN 4@C3CN ?@>3@0<<C-<5=5465@ 1CD5@0 >1<5=0 X11.HŁr  r_{{36, 31}, {501, 43}}^_`abk  oq A2O78 A >3@0=8G5=8O<8 2 ?@>B>:>;5 X11 MB>B ?0@0<5B@, 2>7<>6=>, 2 =5:>B>@KE ?@>3@0<<0E 8=>340 @01>B0BL =5 1C45B._{{10, 33}, {554, 279}}lCD5@ >1<5=0L _ˁ@a1DHhʁ&,)HL  L ˀ  #@~p_{{35, 208}, {491, 31}}^_`abk   oA;8 2:;NG5=>, =060B85 =50:B82=>3> >:=0 ?>2;5G5B 70 A>1>9 =5 B>;L:> 53> 0:B820F8N, => 8 A:2>7=>5 ?@>E>645=85 <KH8 : MB><C >:=C.HL  L ˀ  _{{35, 145}, {491, 28}}^_`abk *  o[$>:CA >:=0 X11 A;54C5B 70 42865=85< :C@A>@0, GB> 8<55B =5:>B>@K5 >B@8F0B5;L=K5 ?>A;54AB28O.HL 6 7L ˀ  _{{35, 68}, {491, 42}}^_`abk C  oA;8 2:;NG5=>, A>740=85 =>2>3> >:=0 X11 ?>2;5G5B 70 A>1>9 ?5@5<5I5=85 =0 ?5@54=89 ?;0= X11.app (2<5AB> Finder.app, Terminal.app 8 B.4.)_{{10, 33}, {554, 279}}d:=0$ K_@ 1 O R S T)H$ _ `$  _{{33, 195}, {504, 42}}^_`abk R l  o0?CA: X11 A>740AB :;NG8 4>ABC?0-:>=B@>;O Xauthority. A;8 A8AB5<=K9 IP-04@5A 87<5=O5BAO, MB8 :;NG8 AB0=>2OBAO =5459AB28B5;L=K<8, GB> <>65B ?@5?OBAB2>20BL 70?CA:C ?@>3@0<< X11.H$ y z$  _{{33, 112}, {504, 48}}^_`abk S   oA;8 2:;NG5=>, ?@>25@:0 0CB5=B8D8:0F88 ?>4:;NG5=89 4>;6=0 1KBL B0:65 2:;NG5=0 4;O 30@0=B88 @01>BK A8AB5<K 157>?0A=>AB8. A;8 2K:;NG5=>, ?>4:;NG5=8O 87 C40;5==KE ?@>3@0<< =54>ABC?=K.H$  $   #@y_{{17, 17}, {404, 14}}^_`abk T   o7-B8 ?0@0<5B@K 2ABC?OB 2 A8;C ?@8 A;54CNI5< 70?CA:5 X11._{{10, 33}, {554, 279}}l57>?0A=>ABL+, YNSTabView /Z{600, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard) !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D AҀ_toggle_fullscreen_item? 4Ԁ^x11_about_item"  u ց_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  i ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F E߁Uhide:J & MZterminate:G , H_hideOtherApplications:H 2 J_unhideAllApplications: 7 ^Ucopy: = f ]close_window: C l \zoom_window: G I  H L M.N  U V._NSHuggingPriority   [ a eY 6K_{{380, 191}, {118, 32}}b^cdeb`g_hijk h k G m nts@ !ҀkC1;8@>20BL_apps_table_duplicate: t v  H L M.N   .  _{{380, 159}, {118, 32}}b^cdeb`g_hijk h k t nts!Ҁg#40;8BL_apps_table_delete: W _apps_table_show:  H L M.N   .  _{{380, 223}, {118, 32}}b^cdeb`g_hij h k nts!Ҁk>1. >1J5:B_apps_table_new:  ^prefs_changed:  ^prefs_changed:) ! ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:} } Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:F  _enable_fullscreen_changed:D A _toggle_fullscreen:D  ʀ ^prefs_changed:H & ^prefs_changed:h  , ^prefs_changed:  t  ^prefs_changed:  | "^prefs_changed: !  $^prefs_changed: '  &^prefs_changed: -  (^prefs_changed:f 3  *^prefs_changed: 9 2 ,^prefs_changed: ? R .^prefs_changed:1 C ܯ D'2?@ABkCDEFGHIJ()*  !"+p}#:*=)4kFRfr'AZsLDQ HT ht 7$) R ` S z T . G V t FTGH,6 0-02469:<@ADEHJLMQSVWY[^acfilnortuxz} 9>@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication .    34MN L5<! _{{302, 440}, {504, 271}}o@>3@0<<=>5 <5=N X11Z{320, 240}1 G t 􀌁)1 ,6>B)1 )_{{1, 1}, {351, 214}}_{{0, -28}, {351, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {351, 28}} #    " "_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {351, 15}}\_doScroller:+, ) *ZNSScroller )?/    5 " "A C@@_{{352, 29}, {15, 186}}_{{10, 20}, {368, 231}}1 ? ܡ @FI C D E F G H I   L_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, O P_NSPanGestureRecognizer Q R/_NSPanGestureRecognizer_NSGestureRecognizer+, T/+, V W\NSScrollView V/Z{504, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ] ܯ'2222B22222222()*        +p:)FfLDLLHLLhL$$$ R$ S$ T . G. t.FGH. -02222:22222222-QSS-Y[-acccccccc-xz9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 ܯ D'2?@ABkCDEFGHIJ()*  !"+p}#:*=)4kFRfr'AZsLDQ HT ht 7$) R ` S z T . G V t FTGH,6 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:<@ADEHJLMQSVWY[^acfilnortuxz} 9>@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ܯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ܠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~ =?ACEGI^gv}  8:<>@BDFHJN_acegp/1Z\^_acdfh!#%&(*+-/PRWY[]_a /1RTVXZ\^#%')+-/JLY=?ACEGI^KMOQSUWY[]fwy{}:<]_acegi')JLQSUWY[AP} %:<>@BDShjlnpr"+DRa)Jlz ;E_~*=`begiklnoqr{}&.8^iknoqsvx{}78:<?BDFHILNPZcw > L X a v !! ! !!!!!!,!5!7!:!Q!Z!h!q!z!!!!!!!!!!!"""""""!"#"%"&"/"8":"["g"q"|""""""""""""""""""####!#>#@#B#O#W#^#`#b#d#k#m#o#q#s#######$$$$.$7$>$C$P$X$e$q$s$|$$$$$$$$$$$$$$%%%%!%#%%%6%;%A%I%K%M%O%Q6677 77"767A7S7`7g7777777777777777777888888!8#8%888A8J8S8a8f88888888888888888899)9+9-9/919395979`9a9c9e9g9h9q9z9|99999999999999999::.:B:D:F:H:I:K:M:O:Q:b:k:n:p:r::::::::::::::::;;;';-;/;1;:;F;Q;[;f;{;};;;;;;;;;;;;;;;;;;;;<&<(<+<,=@==============>>>(>*>,>.>0>2>A>V>X>Z>\>^>`>>>>>>>>>>>>>>>>>>????? ? ?%?x??????????????@@@@@@@@@ @Q@Y@[@]@_@a@c@e@g@i@v@x@z@|@@@@@@@@@@@@@@@@AAAAAAIAKAMAOAQASAUAWAYA[AhAAAAAAAAAAAAAAAABBBB0B2B4B6B8B:BIB^B`BbBdBfBhBrBBBBBBBBBBBBBC#C%C&C'C)C+C-C.C0C2C4C5C7C8C9CbCdCgChCkCnCpCrCtCCCCCCCCCD%D1DFDHDJDLDNDPDDDDDDDDDDDDDDDDEEEEE!E#E%E'EPEdEyE{E}EEEEEEEEEEEEEEEEEEFFPFRFTFVFYF\F^F`FGGGGGG!G#GGGGGGGGGGGGGGHHHHHHH'H2HWHZH\H_HbHeHgHlI'I8I;I=I?ITIVIYI[I]IjIsIIIIIIIIIJ(J*J+J,J/J1J3J4J7J:JQ@QCQFQHQJQwQQQQQQQR RRRRRRRRRR!R"R%R&R'R*RBRRRRRRRRRRRRRRRRRS SSSSSSSSnSSSSSSSSSTT,T6TCTMTcTzTTTTTTUUU#U7U:U`U`~````````aaaa a a aaaaaaaaaaa(aAajamaoaratawaza|abTbWbYbZb[b]b_bbbcbfbibkblbnbobpbbbbbbbbbccccdddd d dd9d;d>d?dBdEdGdIdKdTdedhdkdndqdtdwdzd}dddddddddddddddde eKeMeOeQeTeWeYe[eeeeeeeefffff f f ffff1fVfYf[f^fafdffgWggggggggggggggggh$h&h(h*h-h0h2h4hhhhhhhiiiii i iiii)ihijiliniqitivixjjbjdjejfjijkjmjnjqjtjvjwjzj{j|jjjjjjjjjkTkkkkkkkkkkkkkkkkl!l#l%l'l*l-l/l1llmmmmmm m m mmmmmmmm$m=mbmemgmjmmmpmrnknnnnnnnnnnnnnnnnoo-o0o2o5o8o;o=p"p;pTpmpppspupxp{p~pppppppppqqqqqqqqqq q#q%q&q(q)q*q3qLqqqtqvqyq|qqrrrrrrrrrrrrsssssssCsFsHsKsNsQsSt tstvtxtytzt|t~tttttttttttttttttuvvv&v)v+v.v1v4v=vHvJvMvPvSvVvXvvvvvvvvvvvvvvvvvww w"w%w'w*w-w/xxxxxyyyyyy yyyyyyy.yWyZy\y_yaydygyiz{={@{B{C{D{F{H{K{L{O{R{T{U{W{X{Y{b{z{{{{{{{{|&|?|X|a|k|t|||||||||}}}}} }#}%}B}W}Y}[}^}a}c}}}}}}}}}}}}}}}}}}}~~~"~7~9~;~>~A~C~`~u~w~y~|~~~~~~~~~~~~~~~~~   -BDFHKM\moqtw ):<>ADPacehkqˀ܀ހ +-/25CTVX[^k| CEHILNPRUo‚ĂƂ݂ prstwy{|#%'*-@QTVY\„ĄƄDŽʄ̈́τЄӄԄՄ؄+468;>@BYk|҅Յׅڅ݅'*,/2ARTVY\k|~φцӆֆن%'),/L]_adg|‡ч '8;=@CRcfhkn}Ĉӈ):=?BET]ÊŊNJɊˊ͊ϊъӊՊ׊يۊ݊ "%')+-/1358;>ACEHKNQTWZ]`cfilorux{~ËƋɋ̋ϋҋՋ؋ۋދ "$2Ɍ'2469;>@ILNPgÎ*ACFHKNQTWZ]`cfilorux{~“ēǓʓ͓Гӓ֓ؓړܓޓ ͕ϕҕԕ֕ؕڕܕޕ "%(+.147:=@CFILORUX[^adfhjlnprtwz}ÖƖɖ̖ϖіӖՖؖۖޖ  #&(*,.02468;>@CFHJLNPRTVXZ\^`bdfhjlnqtwz}—ŗȗ˗Ηїԗחڗݗ %  #&),/258;>ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|ěǛʛ͛Лӛ֛ٛܛߛ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ĝƝȝʝ̝ΝНҝԝ֝؝ڝܝޝ  "$&(*,.02;<>GHKTchxorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013664314757411105024361 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYbijkuvz{>?BH[histxnU  $)*/45 :>?EV_`uvz{~  .78@ABHWX`abhwx )*:BCDJYZbcdjyz 12CKLMUVW_`aqxyz ,-56GHOP_`hixy   # $ + , < = D E F G M U e f n o          ! " ' ( - . 3 4 8 9 > ? D E J \ e f p q r w         " # ( ) . / 4 5 : ; @ A     % & ' * ; < = A L M R T W X Y Z [ L m i      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d5=N1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "i@>3@0<<KP^submenuAction:$%*i@>3@0<<K1&')#   #!(j0AB@>8BL &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYax)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5o ?@>3@0<<5 X112XY287j0AB@>9:8 &Q,22  2kkm2!<<;"f!;C61Kstu*>=?f!;C61K1x)__NSServicesMenu22  22CBo"5@5:;NG5=85 ?>;=>M:@0==>3> @568<0Qa22  2UNSTag2G*Fj!:@KBL X11Qh22GIo!:@KBL >AB0;L=K522!Kl>:070BL 2A522  22ONm025@H8BL X11Qq\_NSAppleMenu-!SSR"i@>3@0<<KTU*i@>3@0<<K1؀VW)S  S!Xj0AB@>8BL &-![[Z"f@02:0\]*f@02:01^)[`_j>?8@>20BLQc  -!ccb"d:=>*edwd:=>1 !"filnortu) ()chgg0:@KBLQw 12ckjm#1@0BL 2 DockQm ;c!mo7<5=8BL <0AHB01 c   KLcqpo@C3>2>5 ?5@5:;NG5=85 >:>=Q` RKVcqso#1@0B=>5 :@C3>2>5 ?5@5:;NG5=85 >:>= c   gc!voA5 >:=0  =0 ?5@54=89 ?;0=^_NSWindowsMenuppr-!zzy"g!?@02:0wx{|*g!?@02:01|}})pz!~k!?@02:0 X11[_NSMainMenuTmenu V^apps_separator Ȁ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ǀR #@À#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{351, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{351, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{352, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPRSTUVXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@_#@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@c<OjklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`]NSControlView_NSPlaceholderString0AYText Celljkmqr#@*PUB1_controlTextColor+,ۤ/+,]NSTableColumn/IJKLMNOPTUV #@Y#@D\]^_`abcfgg><0=40UK0.33333299\]^_`ɀIJKLMNOPTUV #@R#@$\]^_`abcfgh!>G. :;. [headerColorUB1C1 1\]^_`_NSDrawsBackground jkm !qr#@(&(_controlBackgroundColor+,UL0.602715373N0.6666666667 113ĀYgridColor67UM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ʀԀFJLMOPJVNSCellˀ ̀̀ XZ[ Y_{{17, 245}, {402, 18}}a\bcd`e^f]ghijknBpUrst_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀o !:2>7=>5 =060B85 =50:B82=KE >:>=wxy[NSImageNameЀXNSSwitch+,|}_NSButtonImageSource|/+,\NSButtonCell/+,XNSButton=/]click_through ^ր^copy_menu_item ؀FLƀـ ڀۀ Zo Yb_{{57, 234}, {132, 26}}gb\a`cdh]fUri _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀jkmqr WNSStateހۀ!*h! M:@0=0__popUpItemAction:ZOtherViews1ـ݀)ހ!j256 F25B>2ހ!f"KAOG8ހ!h8;;8>=K+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F#LM'(#ƀ 0Z3 Y_{{15, 243}, {402, 18}}a\bcd`e^f]ghijkn=Urst!πo$@>25@OBL 0CB5=B8D8:0F88 ?>4:;NG5=89[enable_authEF FLMPQƀـ _{{15, 182}, {409, 23}}a\bcd`e^f]ghijknE]Urst!πo>;=>M:@0==K9 @568<_enable_fullscreenef FLMpqƀـ  _{{15, 103}, {338, 34}}a\bcd`e^f]ghijkne}Urst!ρoC 07@5H8BL 02B><0B8G5A:8 4>ABC? : AB@>:5 <5=N 2 ?>;=>M:@0==>< @568<5_enable_fullscreen_menu FL_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~0_{{33, 66}, {487, 31}}Z{250, 750}\]^_`j   @o\!B@>:0 <5=N 1C45B 2848<>9, :>340 C:070B5;L <KH8 ?5@52545= 2 25@E=NN G0ABL ?5@28G=>3> M:@0=0.jkmnqr ( \controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLMʀ  Z XY@@B_{{15, 137}, {402, 18}}FL CD #@@2a\bcd`e^f]ghijknUrst!ρo!:;NG8BL M:2820;5=BK :;028H 2 X11_enable_keyequivs F#LM#ƀ  _{{15, 166}, {402, 18}}a\bcd`e^f]ghijknUrst!ρo) 07@5H0BL ?>4:;NG5=8O 87 :;85=BA:8E A5B59Zenable_tcp $FLM!"(  " !_{{15, 243}, {402, 18}}FLM239 NO Fa\bcd`e^f]ghijkn?Urst!ρ#o-<C;8@>20BL B@5E:=>?>G=CN <KHL\fake_buttonsGH &*FJLMRSJƀˀ '( _{{17, 179}, {402, 18}}a\bcd`e^f]ghijknG_Urst!ρ&)o$>:CA A;54C5B 70 <KHLN_focus_follows_mousegh ,0FJLMrsJƀˀ -. _{{15, 116}, {402, 18}}a\bcd`e^f]ghijkngUrst!ρ,/o$>:CA  =0 =>2K5 >:=0_focus_on_new_window 27FLM 35 4_{{15, 76}, {402, 18}}FL QS Ra\bcd`e^f]ghijknUrst!ρ26o';028H8 Option >B?@02;ONB Alt_L 8 Alt_R_option_sends_alt 9U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_ {{266, 364.0390625}, {600, 341}}m0AB@>9:8 X11WNSPanelZ{320, 240}ZY ?1Ё@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1)1 9(FH!42R)_{{33, 105}, {504, 28}}\]^_`j E oA;8 2:;NG5=>, M:2820;5=BK :;028H AB@>:8 <5=N <>3CB ?5@5A5:0BLAO A M:2820;5=B0<8 2 ?@>3@0<<0E X11, 8A?>;L7CNI8E <5B0-<>48D8:0B>@.FL()/ GI #@~H_{{33, 200}, {495, 42}}FL;< KL \]^_`j9HF J o]#45@68209B5 =060BK<8 :=>?:8 Option 8;8 Command ?@8 0:B820F88 A@54=59 8;8 ?@02>9 :=>?>: <KH8. _{{33, 166}, {504, 14}}\]^_`jRH M oG 07@5H0BL 87<5=5=8O <5=N 22>40 4;O ?5@570?8A8 B5:CI59 X11-:0@BK :;NG59._{{15, 184}, {402, 18}}a\bcd`e^f]ghijkn(\Urst!ρ!Po(!;54>20BL A8AB5<=>9 @0A:;04:5 :;0280BC@K_{{33, 41}, {504, 31}}FLMijЀ UV @\]^_`jv4  TobA;8 2:;NG5=>, :;028H8 Option >B?@02;ONB A8<2>;K X11 :;028H Alt_L 8 Alt_R X11, 2<5AB> Mode_switch._{{15, 12}, {418, 18}}a\bcd`e^f]ghijknUrst!ρRWo-A5340 ?@>:@CG820BL 2 AB>@>=C 42865=8O ?0;LF0_{{10, 33}, {554, 279}}+,/_{{13, 10}, {574, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1dE>4+,]NSTabViewItem/ _فp@aQ21Ee؁cgk)FLـ de #@E_{{9, 241}, {46, 17}}\]^_`jcf f&25B0:FLہـ hi #@x@_{{33, 216}, {392, 14}}\]^_`jg j o7-B>B ?0@0<5B@ 2ABC?8B 2 A8;C ?@8 A;54CNI5< 70?CA:5 X11.FLـ lm _{{33, 148}, {487, 28}}\]^_`jk n o}:;NG05B :>@=52>5 >:=> X11. A?>;L7C9B5 A>G5B0=85 :;028H Command-Option-A 4;O 2:;NG5=8O 8 2K:;NG5=8O ?>;=>M:@0==>3> @568<0._{{10, 33}, {554, 279}}eKE>4 _r@a Z Ys1tx|)FLM%&ƀr uv r_{{2, 255}, {409, 23}}a\bcd`e^f]ghijkn2Urst!ρtwo:;NG8BL A8=E@>=870F8NFL?@Fr yz r#@0_{{20, 221}, {522, 28}}\]^_`jMx  {ow:;NG05B >1J5:B <5=N >?8@>20BL 8 @07@5H05B A8=E@>=870F8N <564C 1CD5@>< >1<5=0 OS X 8 1CD5@0<8 X11 CLIPBOARD/PRIMARY.FLMXYƀr }~ r_{{21, 129}, {409, 23}}a\bcd`e^f]ghijkneUrst!ρ|o21=>2;OBL CLIPBOARD ?@8 87<5=5=8OE 2 1CD5@5 >1<5=0FLMqrƀr  r_{{21, 102}, {539, 23}}a\bcd`e^f]ghijkn~Urst!ρoF1=>2;OBL PRIMARY (A@54=OO :=>?:0 <KH8) ?@8 87<5=5=8OE 2 1CD5@5 >1<5=0FLMƀr  r_{{21, 80}, {419, 18}}a\bcd`e^f]ghijknUrst!ρo71=>2;OBL 1CD5@ >1<5=0 A@07C ?>A;5 2K1>@0 =>2>3> B5:AB0FLMƀr  r_{{21, 192}, {409, 23}}a\bcd`e^f]ghijknUrst!ρo11=>2;OBL 1CD5@ >1<5=0 ?@8 87<5=5=8OE 2 CLIPBOARDFLār  r#@_{{36, 158}, {501, 28}}\]^_`j  o{B:;NG8B5 MB>B ?0@0<5B@, 5A;8 E>B8B5 8A?>;L7>20BL xclipboard, klipper 8;8 8=CN 4@C3CN ?@>3@0<<C-<5=5465@ 1CD5@0 >1<5=0 X11.FLār  r_{{36, 31}, {501, 43}}\]^_`j  oq A2O78 A >3@0=8G5=8O<8 2 ?@>B>:>;5 X11 MB>B ?0@0<5B@, 2>7<>6=>, 2 =5:>B>@KE ?@>3@0<<0E 8=>340 @01>B0BL =5 1C45B._{{10, 33}, {554, 279}}lCD5@ >1<5=0J _ˁ@a1BGgʁ&,)FJL  J ˀ  #@~p_{{35, 208}, {491, 31}}\]^_`j   oA;8 2:;NG5=>, =060B85 =50:B82=>3> >:=0 ?>2;5G5B 70 A>1>9 =5 B>;L:> 53> 0:B820F8N, => 8 A:2>7=>5 ?@>E>645=85 <KH8 : MB><C >:=C.FJL  J ˀ  _{{35, 145}, {491, 28}}\]^_`j )  o[$>:CA >:=0 X11 A;54C5B 70 42865=85< :C@A>@0, GB> 8<55B =5:>B>@K5 >B@8F0B5;L=K5 ?>A;54AB28O.FJL 5 6J ˀ  _{{35, 68}, {491, 42}}\]^_`j B  oA;8 2:;NG5=>, A>740=85 =>2>3> >:=0 X11 ?>2;5G5B 70 A>1>9 ?5@5<5I5=85 =0 ?5@54=89 ?;0= X11.app (2<5AB> Finder.app, Terminal.app 8 B.4.)_{{10, 33}, {554, 279}}d:=0# J_@ 1 N Q R S)F#L ^ _#  _{{33, 195}, {504, 42}}\]^_`j Q k  o0?CA: X11 A>740AB :;NG8 4>ABC?0-:>=B@>;O Xauthority. A;8 A8AB5<=K9 IP-04@5A 87<5=O5BAO, MB8 :;NG8 AB0=>2OBAO =5459AB28B5;L=K<8, GB> <>65B ?@5?OBAB2>20BL 70?CA:C ?@>3@0<< X11.F#L x y#  _{{33, 112}, {504, 48}}\]^_`j R   oA;8 2:;NG5=>, ?@>25@:0 0CB5=B8D8:0F88 ?>4:;NG5=89 4>;6=0 1KBL B0:65 2:;NG5=0 4;O 30@0=B88 @01>BK A8AB5<K 157>?0A=>AB8. A;8 2K:;NG5=>, ?>4:;NG5=8O 87 C40;5==KE ?@>3@0<< =54>ABC?=K.F#L  #   #@y_{{17, 17}, {404, 14}}\]^_`j S   o7-B8 ?0@0<5B@K 2ABC?OB 2 A8;C ?@8 A;54CNI5< 70?CA:5 X11._{{10, 33}, {554, 279}}l57>?0A=>ABL+, YNSTabView /Z{600, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard( !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D AҀ_toggle_fullscreen_item? 4Ԁ^x11_about_item"  u ց_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector i ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F  E߁Uhide:J % MZterminate:G + H_hideOtherApplications:H 1 J_unhideAllApplications: 6 ^Ucopy: < f ]close_window: B l \zoom_window: F H  F K L,LM  T U,_NSHuggingPriority   Z ` dY 6K_{{380, 191}, {118, 32}}a\bcd`^f]ghij g j F l msr@ !ҀkC1;8@>20BL_apps_table_duplicate: s u  F K L,LM   ,  _{{380, 159}, {118, 32}}a\bcd`^f]ghij g j s msr!Ҁg#40;8BL_apps_table_delete: W _apps_table_show:  F K L,LM   ,  _{{380, 223}, {118, 32}}a\bcd`^f]ghi g j msr!Ҁk>1. >1J5:B_apps_table_new:  ^prefs_changed:  ^prefs_changed:( ! ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:} } Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:E  _enable_fullscreen_changed:D A _toggle_fullscreen:B  ʀ ^prefs_changed:G  & ^prefs_changed:g  , ^prefs_changed:  t  ^prefs_changed:  | "^prefs_changed:  $^prefs_changed: &  &^prefs_changed: ,  (^prefs_changed:e 2  *^prefs_changed: 8 2 ,^prefs_changed: > R .^prefs_changed:1 B ۯ C'2?@ABkCDEFGHIJ()*  !"+p}"9)<(3jEQeq&@YrJBP GS gs 6#( Q _ R y S , F U s DREF*4 0-02469:<@ADEHJLMQSVWY[^acfilnortuxz} 9>@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication ,    34MN L5<! _{{302, 440}, {504, 271}}o@>3@0<<=>5 <5=N X11Z{320, 240}1 F s 􀌁)1 *4>B)1 )_{{1, 1}, {351, 214}}_{{0, -28}, {351, 214}}+, ZNSClipView /1 ր)_{{1, 1}, {351, 28}} ! L   ! !_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {351, 15}}\_doScroller:+, ( )ZNSScroller (=/  L  4 ! !A C@@_{{352, 29}, {15, 186}}_{{10, 20}, {368, 231}}1 > ۡ ?FI B C D E F G H   K_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, N O_NSPanGestureRecognizer P Q/_NSPanGestureRecognizer_NSGestureRecognizer+, S/+, U V\NSScrollView U/Z{504, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 \ ۯ'2222B22222222()*        +p9(EeJBJJGJJgJ### Q# R# S , F, s,DEF, -02222:22222222-QSS-Y[-acccccccc-xz9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 ۯ C'2?@ABkCDEFGHIJ()*  !"+p}"9)<(3jEQeq&@YrJBP GS gs 6#( Q _ R y S , F U s DREF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:<@ADEHJLMQSVWY[^acfilnortuxz} 9>@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ۯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ۠I+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~ =?ACEGI^gv}  8:<>@BDFHJN_acegp/1Z\^_acdfh!#%&(*+-/PRWY[]_a /1RTVXZ\^#%')+-/JLY=?ACEGI^KMOQSUWY[]fwy{}:<]_acegi')JLQSUWY[AP} %:<>@BDShjlnpr'@N] %Fhv7A[z&IKNPRTUWXZ[dfhikmopqsxz EPRUVXZ]_bdgikloqs~!#&)+-/0357AJ^g{ % 3 ? H ] p !!!!!!!8!A!O!X!a!h!j!l!n!p!!!!!!!!!!!!"" " " """!"B"N"X"c"o"|"""""""""""""""""""##%#'#)#6#>#E#G#I#K#R#T#V#X#Z#p########$$$$%$*$7$?$L$X$Z$c$k$p$$$$$$$$$$$$$%%%% % %%"%(%0%2%4%6%8666677 77(7:7G7N7w7777777777777777777778888 8 88(818:8H8M8v8w8y8{8}8~8888888888888999999999G9H9J9L9N9O9X9a9c999999999999999999::):+:-:/:0:2:4:6:8:I:R:U:W:Y:n:p:r:t:v::::::::::::;;;;;;!;-;8;B;M;b;d;f;h;j;l;;;;;;;;;;;;;;;;;<<<<<<<<>>>>>>*>?>A>C>E>G>I>>>>>>>>>>>>>>>>>>>>>>>>??a?s??????????????????@@@@ @:@B@D@F@H@J@L@N@P@R@_@a@c@e@v@@@@@@@@@@@@@@@@@@@AA2A4A6A8A:AA@ABADAQA~AAAAAAAAAAAAAAAAABBBBBB!B#B2BGBIBKBMBOBQB[BpBrBtBvBxBzBBBBBBBC CCCCCCCCCCCC C!C"CKCMCPCQCTCWCYC[C]CvCCCCCCCCDDD/D1D3D5D7D9DDDDDDDDDDDDDDDDEEEEE E EEE9EMEbEdEfEiElEnEEEEEEEEEEEEEEEEF9F;F=F?FBFEFGFIFFGGGGG G GsGGGGGGGGGGGGGGGGGGGHHH@HCHEHHHKHNHPHUII!I$I&I(I=I?IBIDIFISI\IhIsIIIIIIIJJJJJJJJJ J#J%J&J)J*J+J.J_J`JcJfJiJlJoJqJtJvJxJJJKKKKKK K KKKKKKKK#K&KeKgKiKkKnKqKsKuKKKKKKKKLILKLLLMLOLQLSLTLWLZL\L]L_L`LaLzLLLLLLLLMM)M>M@MBMEMHMJMMMMMMMMMMMMMMMMMN>N@NANBNENGNINJNMNPNRNSNVNWNXN[NNNNNNNNNNO O OOOOOrOtOuOvOxOzO|O}OOOOOOOOOOOOOOOOP!P7PLPNPPPSPVPXPPPPPPPPPPPPPPPPQ#Q%Q'Q)Q,Q/Q1Q3Q`QvQQQQQQQQQQQQRRRRR R RRRRR+RRRRRRRRRRRRRRRRRRRRRRSSSSWSjSSSSSSSSTTTT,T6TLTcTTTTTTTTU U U#U%U(U+U.U1U4U5U8U;U>UAUDUIULUNUPUsUUUUUUUUUUUUUUUUV8VPV_VfVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVWW.W1W3W6W8W;W>W@XEXXXXXXXXXXXXXXXXXXXY^YaYcYdYeYhYjYmYnYqYtYvYwYzY{Y|YYYYYYYYYZwZZZZZZZZZ[\[u[[[[[[[[\\/\\\\\\\\\\\\\\\\\\\\\\\]]]^^^^^ ^ ^^k^^^^^^^^^^^^^^^_ _ _______&_/_=_B_[_^_a_c_f_i_l_n_w_________````` ` ` ``````````'`>`g`j`l`n`p`s`v`x```````````aaaaaaaa*aSaVaXa[a]a`acaeab=b@bBbCbDbFbHbKbLbObRbTbUbWbXbYbrbbbbbbbbccccccccccd"d$d'd(d+d.d0d2d4d=dNdQdTdWdZd]d`dcdfdhdddddddddddddddde4e6e8e:e=e@eBeDeseeeeeeeeeeeeeeeefff?fBfDfGfJfMfOg@ggggggggggggggggh hhhhhhhhhhhhhhhhhhhhhhhiiQiSiUiWiZi]i_iaijKjMjNjOjRjTjVjWjZj]j_j`jcjdjej}jjjjjjjjk=kkkkkkkkkkkkkkkkl l llllllllllllllllllllmmmm m&mKmNmPmSmVmYm[nTnnnnnnnnnnnnnnnnnooooo!o$o&p p$p=pVpYp\p^papdpgppp}ppppppppppppqqqqq q qqqqqqq5qZq]q_qbqeqhqjrkrrrrrrrrrrrrrrrrss,s/s1s4s7s:s{@{A{B{K{c{{{{{{{{||(|A|J|T|]|h|||||||||}}}} } }}+}@}B}D}G}J}L}k}}}}}}}}}}}}}}}}}}}}~ ~ ~"~$~'~*~,~I~^~`~b~e~h~j~~~~~~~~~~~~~~~~~~~~~+-/146EVXZ]`r{#%'*-9JLNQTZkmoruŀǀɀ̀π,=?ADGTehjmpρ,.12579;>XƂނY[\]`bdehkmnqrsvɃ˃̓ЃӃՃ׃ ):=?BEۅ!$')+BTehjmpÅƅՅ*;=?BETegiloy†φ5FHJMPevxz}ˇ·ЇӇև!$&),;LOQTWfwz|͈Ј҈Ո؈#&(+.=Fy|~ŠĊƊɊ̊ϊҊՊ؊ۊފ !$'*,.147:=@CFILORUX[^adgjmpsvy{}ċNjʋ͋Ћҋԋ֋؋ڋ܋ދ jmorux{~݌"$')2579Pir}%79;<=?ACFGJLNQRSVn{ 5NWZ]`}ҏ6SVXZ]zҐې #.7@suwy{}Ēǒʒ͒ВӒْ֒ܒߒ !#%'*,/147:=@CFILORUX[^adgjmprtvy{~ÓœǓɓ˓͓ϓѓӓՓؓۓݓߓ󕶕ÕŕǕɕ˕͕ϕѕӕՕוٕەݕߕ  #&),/258;>ADGJMOQSUWY[]`cfikmpsvy|Ėǖʖ͖ЖӖ֖ٖܖߖ !$'),/13579;=?ACEGIKMOQSUWZ]`cfilorux{~×Ɨɗ̗ϗҗ՗ؗۗޗљԙיٙܙߙ !$'*-0369ADGJMPSVY\_behknqtwz}›śț˛Λћԛכڛݛ "%(+.147:=@CFILORUX[^adgjmpsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}Ýŝǝɝ˝͝ϝѝӝ՝םٝ۝ݝߝ $%'014=LQxorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/Localizable.strings0000644000175000017500000001074614757411105022631 /* Dialog title when quitting */ "Do you really want to quit X11?" = "K 459AB28B5;L=> E>B8B5 7025@H8BL X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "A5 >B:@KBK5 ?@>3@0<<K X11 =5<54;5==> ?@5:@0BOB @01>BC, 0 K ?>B5@O5B5 2A5 =5A>E@0=5==K5 87<5=5=8O."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "5@59B8 2 @568< RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "@>3@0<<0 70?@>A8;0 X11 87<5=8BL @07@5H5=85 0H53> M:@0=0. X11 2>AAB0=>28B =0AB@>9:8 M:@0=0 2 53> ?@54K4CI5< A>AB>O=88 ?@8 70?@>A5 70?@0H820NI59 ?@>3@0<<>9 2>72@0I5=8O : ?@54K4CI5<C A>AB>O=8N.  :0G5AB25 0;LB5@=0B82K K <>65B5 8A?>;L7>20BL A>G5B0=85 :;028H #%#A, GB>1K ?@8=C48BL X11 25@=CBLAO : ?@54K4CI5<C A>AB>O=8N."; /* No comment provided by engineer. */ "Allow" = " 07@5H8BL"; /* No comment provided by engineer. */ "Always Allow" = " 07@5H0BL 2A5340"; /* No comment provided by engineer. */ "Cancel" = "B<5=8BL"; /* No comment provided by engineer. */ "Mac Help" = "!?@02:0 Mac"; /* No comment provided by engineer. */ "Quit" = "025@H8BL"; /* No */ "No" = "5B"; /* Yes */ "Yes" = "0"; /* Terminal */ "Terminal" = ""5@<8=0;"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "# 0A 5ABL ACI5AB2CNI89 D09; ~/.xinitrc.\n\n >:=0E, >B>1@0605<KE ?@>3@0<<0<8 X11, <>3CB >BACBAB2>20BL AB@>:8 =0720=8O. -B8 >:=0 B0:65 <>3CB >B;8G0BLAO >B >:>=, >B>1@0605<KE HB0B=K<8 ?@>3@0<<0<8.\n\n%>B8B5 >AB028BL ACI5AB2CNI89 D09; 8 8A?>;L7>20BL AB0=40@B=>5 >:@C65=85 X11 ?@8 A;54CNI5< 70?CA:5 CB8;8BK X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "@>25@:0 >1=>2;5=89 X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/ru.lproj/locversion.plist0000644000175000017500000000061014757411105022222 LprojCompatibleVersion 106.3 LprojLocale ru LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/0000755000175000017500000000000014757411136017040 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/main.nib/0000755000175000017500000000000014757411136020533 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/main.nib/designable.nib0000644000175000017500000020526214757411105023245 Podržte počas kliknutia Option alebo Command pre aktiváciu stredného alebo pravého tlačidla myši. Povoľuje X11 koreňové okno. Použite klávesovú sekvenciu Command-Option-A pre aktivovanie a deaktivovanie režimu celej obrazovky. Spustenie X11 vytvorí klávesy ochrany prístupu Xautority. Tieto klávesy sa stanú neplatnými ak sa zmení systémová IP adresa, čo môže zabrániť spusteniu X11 aplikácií. Ak je povolené, musí byť povolená aj funkcia Autentifikácia spojení, aby bola zaistená bezpečnosť systému. Ak nie je povolené, pripojenia zo vzdialených aplikácií nie sú povolené. xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/main.nib/keyedobjects.nib0000644000175000017500000013550314757411105023623 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata2 %)*048$%-78=LST[\]fpqvwz{#*+,345<=FMNOWXahijtuyz~?@CI\ijtuyoV   %&+01 6:;AQZ[pquvy|  )23;<=CRS[\]crs{|}  $%5=>?ETU]^_etu}~,-?FGHOPQYZ[krst|}~ #$,->?FGVW_`opxy     $ % 6 7 > ? @ A G O ` a h i y z          % & + , 0 1 6 7 < = B T ] ^ h i j o           ! & ' , - 2 3 8 9       " 3 4 5 9 D E J L O P Q R S  e d      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iAplikcieP^submenuAction:$%*iAplikcie1&')#   #!(lPrispsobie &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0QYaw)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5UO X112XY287kNastavenia &Q,22  2kkm2!<<;"fSlu~bystu*>=?fSlu~by1x)__NSServicesMenu22  22CBoPrepne cel obrazovkuQa22  2UNSTag2G*FiSkrye X11Qh22GImSkrye ostatn22!KoZobrazie vaetko22  22ONjZruaie X11Qq\_NSAppleMenu-!SSR"iAplikcieTU*iAplikcie1؀VW)S  S!XnPrispsobie...-![[Z"gUpravie\]*gUpravie1^)[`_iKoprovaeQc  -!ccb"TOkno*dbv1 !ehkmnqst) '(cgfhZatvorieQw 01cjimMinimalizovaeQm :c!lgZv aie c   JKcpooPrechdzae oknamiQ` QJUcproPrechdzae oknami smerom dozadu c   fc!uoPresune vaetky do popredia^_NSWindowsMenuooq-!yyx"hPomocnkvwz{*hPomocnk1{||)oy!}oPomocnk pre X11[_NSMainMenuTmenu V^apps_separator ƀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ŀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{285, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{285, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{286, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@W-#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TMenoklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0AYText Cellklnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@S#@D]^_`abcdghWCommandVM0.3333329856]^_`aȀJKLMNOPQUVW #@Y#@$]^_`abcdghoKlvesov skratka  [headerColorVB1C1 1]^_`a_NSDrawsBackground klnrs#@("$_controlBackgroundColor'(VL0.602715373N0.6666666667 1-/€YgridColor23VM0.4246723652E0.5 1+,78[NSTableView79/YNSControlZapps_table>? ȀҀBFHJKFVNSCellɀ ʀˀ SUV W_{{18, 250}, {402, 18}}\]]^_a`_a^bcdefi>kVmno_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀oPreklikae neaktvne oknrst[NSImageName΀XNSSwitch+,wx_NSButtonImageSourcew/+,z{\NSButtonCellz/+,}~XNSButton}9/]click_through ^Ԁ^copy_menu_item րBƀ׀ ؀ـ Um W`_{{63, 243}, {128, 26}}b]]\a^_c^aVmd _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀklnrs WNSStateހ܀ـ!߀*ZZ displeja__popUpItemAction:ZOtherViews1Ԁۀ)܀!ހZ256 farieb܀!ހfTisce܀!ހgMiliny+,_NSPopUpButtonCellz/^NSMenuItemCell+,]NSPopUpButton}9/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator BH"#ƀ +U. W_{{18, 250}, {402, 18}}\]]^_a`_a^bcdefi8Vmno!̀oAutentifikovae spojenia[enable_auth@A BHKLƀ׀ _{{18, 189}, {409, 23}}\]]^_a`_a^bcdefi@XVmno!̀oRe~im celej obrazovky_enable_fullscreen`a BHklƀ׀  _{{37, 123}, {409, 23}}\]]^_a`_a^bcdefi`xVmno!̀o7Povolie prstup na liatu v zobrazen na celej obrazovke_enable_fullscreen_menu  B_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@w _{{54, 86}, {374, 31}}Z{250, 750}]^_`ae  @oQLiata sa zobraz po umiestnen kurzora myai do vrchnej  asti primrneho displeja.klnors $ \controlColor+,[NSTextField9/_enable_fullscreen_menu_text BHŀ  U VW>>@_{{18, 137}, {402, 18}}B AB #@zp0\]]^_a`_a^bcdefiVmno!́o!Povolie ekvivalenty klvesu s X11_enable_keyequivs BHƀ  _{{18, 173}, {402, 18}}\]]^_a`_a^bcdefi Vmno!́o(Povolie pripojenia od sieeovch klientovZenable_tcp "BH#  _{{18, 250}, {402, 18}}BH-.4 LM D\]]^_a`_a^bcdefi:Vmno!́!oEmulovae mya s troma tla idlami\fake_buttonsBC $(BFHMNFƀɀ %& _{{18, 186}, {402, 18}}\]]^_a`_a^bcdefiBZVmno!́$'oSledovanie myai_focus_follows_mousebc *.BFHmnFƀɀ +, _{{18, 137}, {402, 18}}\]]^_a`_a^bcdefibzVmno!́*-oSstredie sa na nov okn_focus_on_new_window 05BH 13 2_{{18, 76}, {402, 18}}B OQ #@yP\]]^_a`_a^bcdefiVmno!́04o(Klvesy mo~nosti posielaj Alt_L a Alt_R_option_sends_alt 7V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_{{266, 364}, {542, 348}}^Nastavenie X11WNSPanelZ{320, 240}UW =1ˁ>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)14 #DF20P)_{{36, 100}, {427, 31}}]^_`ae  Co^Po povolen m~u klvesov ekvivalenty liaty naruaie X11 aplikcie u~vajce Meta modifiktor.B#$*  EG #@{F_{{36, 202}, {436, 42}}B67= IJ #@{]^_`ae4DD  HobPodr~te po as kliknutia Option alebo Command pre aktivciu strednho alebo pravho tla idla myai. _{{36, 166}, {451, 14}}]^_`ae MF  KoNPovo>uje zmeny vstupnho menu, ktor prepau aktulnu mapu klves serveru X11._{{18, 186}, {402, 18}}\]]^_a`_a^bcdefi#VVmno!́No*Riadie sa systmovm rozlo~enm klvesnice_{{36, 39}, {419, 31}}BHcdˀ ST >]^_`aep2  RodKe je povolen, klvesy mo~nosti posielaj symboly klvesov Alt_L a Alt_R X11 namiesto Mode_switch._{{18, 15}, {418, 18}}\]]^_a`_a^bcdefiyVmno!́PUo!V~dy rolovae v smere pohybu prsta_{{10, 33}, {496, 286}}+,/_{{13, 10}, {516, 332}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1UVstup+,]NSTabViewItem/ ]ׁn>_Q21@`ցaei)B׀ bc #@C_{{19, 249}, {43, 17}}]^_`aea dVFarby:Bԁ׀ fg #@x@_{{36, 223}, {392, 14}}]^_`aee  ho3Tto mo~nose bude zaveden pri alaom spusten X11.B*׀ jk _{{36, 152}, {436, 31}}]^_`aei  loPovo>uje X11 koreHov okno. Pou~ite klvesov sekvenciu Command-Option-A pre aktivovanie a deaktivovanie re~imu celej obrazovky._{{10, 33}, {496, 286}}fVstup ]p>_U Wq1    rvz~)BHƀp st p_{{18, 247}, {354, 23}}\]]^_a`_a^bcdefi )Vmno!́ruoPovolie synchronizciuB67=p wx p#@z_{{36, 216}, {435, 28}}]^_`ae Dv  yoqPovo>uje polo~ku menu koprovae  a povo>uje synchronizciu Pasteboardu OSX s X11 SCHRNKOU a PRIMRNYM bufferom.BHOPƀp {| p_{{34, 124}, {346, 23}}\]]^_a`_a^bcdefi \Vmno!́z}o-Aktualizovae SCHRNKU pri zmench PasteboarduBHhiƀp  p_{{34, 86}, {436, 34}}\]]^_a`_a^bcdefiuVmno!́~oFAktualizovae PRIMRNY buffer (stredn kliknutie) pri (zmene PasteboarduBHƀp  p_{{34, 50}, {353, 23}}\]]^_a`_a^bcdefiVmno!́o1Aktualizovae Pasteboard okam~ite po vybrat textuBHƀp  p_{{18, 183}, {338, 23}}\]]^_a`_a^bcdefiVmno!́o,Aktualizovae Pasteboard pri zmench SCHRNKYBp  p#@z_{{36, 152}, {420, 28}}]^_`ae  o\Zak~te tto mo~nose ak chcete pou~ie xschrnku, klipper, alebo inho X11 mana~ra schrnky.BՁp  p#@y_{{48, 16}, {417, 28}}]^_`ae  o_Kvli obmedzeniam v X11 protokole, tto mo~nose mo~no nebude fungovae v niektorch aplikcich._{{10, 33}, {496, 286}}ZPasteboardF ]Ɂ>_1>Bbȁ$*)BFF ɀ  #@{_{{36, 213}, {437, 31}}]^_`ae   oaKe je povolen, kliknutm na neaktvne okno posunie kliknutie myai do danho okna a aktivuje ho.BF  F ɀ  #@z_{{36, 166}, {429, 14}}]^_`ae "  oFAktvne okno sa nachdza pod kurzorom myai. Toto m ne~iadce  inky.BF . /F 5ɀ  #@y_{{36, 103}, {415, 28}}]^_`ae <  o{Ke je povolen, vytvorenie novho X11 okna spsob posunutie X11.app do popredia (namiesto Finder.app, Terminal.app, at.)_{{10, 33}, {496, 286}}dOkn D]> 1 H K L M)B X Y _  #@{_{{36, 202}, {446, 42}}]^_`ae K f  oSpustenie X11 vytvor klvesy ochrany prstupu Xautority. Tieto klvesy sa stan neplatnmi ak sa zmen systmov IP adresa,  o m~e zabrnie spusteniu X11 aplikci.B r s _  _{{36, 125}, {446, 42}}]^_`ae L   oAk je povolen, mus bye povolen aj funkcia Autentifikcia spojen, aby bola zaisten bezpe nose systmu. Ak nie je povolen, pripojenia zo vzdialench aplikci nie s povolen.B     #@y_{{17, 24}, {404, 14}}]^_`ae M   o<Zmeny tchto mo~nost bud zaveden pri alaom spusten X11._{{10, 33}, {496, 286}}lZabezpe enie+, YNSTabView /Z{542, 348}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard# €[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D AЀ_toggle_fullscreen_item? 4Ҁ^x11_about_item! t ԁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ׁ_minimize_window:? 4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  E݁Uhide:J  M߁Zterminate:G # H_hideOtherApplications:H ) J_unhideAllApplications: . ^Ucopy: 4 e ]close_window: : k \zoom_window: > @  B C D-H  L M-_NSHuggingPriority   U X \W 4I_{{324, 191}, {124, 32}}\]]^_a_a^bcde _ b > d enm@ !ЀjDuplikovae_apps_table_duplicate: k m  B C D-H  w x-  _{{324, 159}, {124, 32}}\]]^_a_a^bcde _ b k enm!ЀiOdstrnie_apps_table_delete: W _apps_table_show:  B C D-H   -  _{{324, 223}, {124, 32}}\]]^_a_a^bcd _ b enm!ЀnPridae polo~ku_apps_table_new:  ^prefs_changed:  ^prefs_changed:#  ^prefs_changed: ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:| |  Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:@ _enable_fullscreen_changed:D A _toggle_fullscreen:> Ȁ ^prefs_changed:B $ ^prefs_changed:b  * ^prefs_changed: r ^prefs_changed:  z  ^prefs_changed:  ~ "^prefs_changed:   $^prefs_changed: $  &^prefs_changed:` * (^prefs_changed: 0 0 *^prefs_changed: 6 P ,^prefs_changed:1 : ӯ ;'2?@ABkCDEFGHIJ()*  !+o|4$ 7#.d@L`l  7 PiF>KBN bn /# K Y L s M - > M k xESFG+5 .-02469:<@ADEHJLMQSVWY[^acehkmnqstwy| 7<>Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀋀<@#&'G& (/]NSApplication -    12KL J3:! _{{302, 440}, {454, 271}}oAplika n menu X11Z{320, 240}1 > k 򀋁)1 +5<@)1 )_{{1, 1}, {285, 214}}_{{0, -28}, {285, 214}}+,  ZNSClipView /1 ր)_{{1, 1}, {285, 28}} "     _NSControlTarget_NSControlAction? =>>_{{1, 215}, {285, 15}}\_doScroller:+, !ZNSScroller 9/    ,  ? A>>_{{286, 29}, {15, 186}}_{{20, 20}, {302, 231}}1 6 ӡ 7DG : ; < = > ? @   C_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, F G_NSPanGestureRecognizer H I/_NSPanGestureRecognizer_NSGestureRecognizer+, K/+, M N\NSScrollView M/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 T ӯ'2222B22222222()*        +o4 #@`   F>FFBFFbF K L M - >- k-EFG- -02222:22222222-QSS-Y[-acccccccc-wy7<>ZDF20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀋##G1 ӯ ;'2?@ABkCDEFGHIJ()*  !+o|4$ 7#.d@L`l  7 PiF>KBN bn /# K Y L s M - > M k xESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:<@ADEHJLMQSVWY[^acehkmnqstwy| 7<>Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀋀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 ӯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ӠG+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~    579;=?AZcry468:<>@BDFJ[]_acl=?ABDFGIKxz|~   35:<>@BDsu!#%'Bgikmoqs IKMOQSUWY[n{}  )VXZ\^`bdfhw "$&(*/@BDFHQbdfhjlnprt!#%')+:ceghjlmoq8acefhjkmo!#4ACEGXadfh .;P[w0<Uv"<HUak   !#$&(*+,.35>GIKTUWX !$&(),.0;lx$8?Ktvxy{}   - B N e r ! !!!%!'!)!+!-!V!c!n!{!!!!!!!!!!!!!!!!" "" ","9">"@"B"D"F"H"K"P"e"l"u""""""""""""""##### #####+#F#f#############$$$$ $($-$B$N$\$d$f$h$j$l$n$u$$$$$$$$$$$$$$$$66666666677 707>7C7E7G7I7K7M7O7R7\7m7v7y7{7}777777777777778888888'80828S8U8W8Y8[8]8e8r88888888888888888899999!9#9H9]9_9a9c9e9q9999999999999999999::::::2:G:T:c:e:g:|:~::::::::::::::;;; ; ; ;;j;q;s;t;u;w;y;{;|;~;;;;;;;;;;;;;;;;<=C=L=Y=b=k=t===============>5>7>8>9>;>=>?>@>B>D>F>G>I>J>K>t>v>y>z>}>>>>>>???'?D?O?a?c?e?j?s?u?v?w?x?z?|?~????????????????????@@@ @)@2@4@6@8@:@<@i@k@m@o@q@s@u@w@y@{@@@@@@@@@@@@@AAAAA A A AAA A)A=AJAYAbApA}AAAAAAAAAAAAAAAAAAAAABB&B(B*B,B.B0BBBBBBBBBBBBBBBBBBBBBBBBBC4C6C8C:CC@CBCsCCCCCCCCCCCCDDDDDD D D DDD(DgDiDkDmDoDqDsDuDDDDDDDDE1E3E4E5E7E9E;EEAECEDEFEGEHEaEEEEEEEEF F9FNFPFRFUFXFZFFGG!G$G&G'G(G*G,G/G0G3G6G8G9G;GJ@JCJDJGJJJLJMJPJQJRJ[J^JJJJJJJJJKKKKK!K$K&KKKKKKKKKKKKKKKKKKKKKKKLLTL_LtLvLxL{L~LLLLLLLLLLLLLLLLLMMtMvMwMxM{M}MMMMMMMMMMMMMMMMMMN!N.NCNENGNJNMNONNNNNNNNNNNNNNNNOOOO O#O&O(O*OKOaOvOxOzO}OOOOOOOOOOOOOOOOOPPMPOPQPSPVPYP[P]PPPPPPPPQ(Q*Q+Q,Q/Q1Q3Q4Q7Q:QX@XAXBXEXGXJXKXNXQXSXTXWXXXYXbXeXXXXXXXYaYzYYYYYYYZNZgZZZZZZZZ[ [%[[[[[[[[[[[[[[[[[[[[[[[\\\\\\]]]]]M]f]o]v]]]]]]]]]]]]]]]]]]]]^^^^!^:^=^@^B^E^H^K^M^V^e^g^j^m^o^q^t^w^y^^^^^^^^^^^^^^^^___B_E_G_I_L_O_Q_X__________________`"`%`'`*`-`0`2`aaaaa a a aaaaaaaaaa7a\a_aaadagajalbobbbbbbbbbbbbbbbbbbcccccc!c$c'c*c-c/ccccccccccccccccccddddd d d;ddddddddddddddddddee e eeeeefWfYfZf[f^f`fbfcfffifkflfofpfqfffffffffg6gggggggggggggggghhhhh hhhhhhhiiiiii iiiiiii.imioiqisiviyi{i}ij=j?j@jAjDjFjHjIjLjOjQjRjUjVjWjpjjjjjjjjkkkkkkkkkkkkkkkkkkkkkkkkkklmmmmmm"m$m'm(m+m.m0m1m4m5m6m?mWm|mmmmmmnMnfnqnnnnnnnnnnnnnnnno+o.o0o1o2o4o6o9o:o=o@oBoCoEoFoGoPoiooooooopcpppppppppppppppppqq-q0q2q5q8q;q=qr3r6r8r9r:rrArBrErHrJrKrMrNrOrXrqrrrrrrrssssssssssssstttttotrtttutvtxtzt}t~ttttttttttttttttv1vvvvvvvvvvvvvvvvvvvvvvwwxkxxxxxxxxxxxxxxxxxyy4y7y9ywy{~ŁȁہVXYZ]_abehjknopsƂςтӂւقۂ݂  "%(7HKMPSbsvx{~ȃ˃̓ЃӃ !$'1BDFIL_prtwzƄȄʄ̈́Є.0258GX[]`crȅم܅ޅ /247:IZ]_betɆچ݆߆03579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ˆňLjɈˈ͈ψшӈՈ؈ۈވ  #&),/1358;>ADGJMPSVXZ\_behknqtwz}Éъ #%(+.1458;>ADGIKMhŠ͊ϊъԊ֊يۊ$/8ADFH^ŋ׋ -6ALŒČƌɌʌˌΌ /`ɍ ,5NUnՎ%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsvy|ÐŐǐɐːΐАӐՐאِېݐ !#%'*,/1469;>ADFHJMORTWY\^adgjmprtvxz|~gilnprtvxz|~“œȓ˓Γѓԓדړݓ  #&),/258;>ADGJMPSVY\_behjlnqtwz}ÔŔǔɔ˔͔ϔєԔהٔܔߔ "%(+.147:=@CFILORUX[^adgjmpsvy|—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !$'*-0369AGZghrswmT  #$)./ 489?PYZoptux{~  (12:;<BQRZ[\bqrz{|   #$4<=>DST\]^dst|}~+,>EFGNOPXYZjqrs{|}"#+,=>EFUV^_nowx     # $ 5 6 = > ? @ F N _ ` g h x y          $ % * + / 0 5 6 ; < A S \ ] g h i n ~            % & + , 1 2 7 8       ! 2 3 4 8 C D I K N O P Q R F d c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysOM-00/1N&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*TMenu1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "iAplikcieP^submenuAction:$%*iAplikcie1&')#   #!(lPrispsobie &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0QYaw)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5UO X112XY287kNastavenia &Q,22  2kkm2!<<;"fSlu~bystu*>=?fSlu~by1x)__NSServicesMenu22  22CBoPrepne cel obrazovkuQa22  2UNSTag2G*FiSkrye X11Qh22GImSkrye ostatn22!KoZobrazie vaetko22  22ONjZruaie X11Qq\_NSAppleMenu-!SSR"iAplikcieTU*iAplikcie1؀VW)S  S!XnPrispsobie...-![[Z"gUpravie\]*gUpravie1^)[`_iKoprovaeQc  -!ccb"TOkno*dbv1 !ehkmnqst) '(cgfhZatvorieQw 01cjimMinimalizovaeQm :c!lgZv aie c   JKcpooPrechdzae oknamiQ` QJUcproPrechdzae oknami smerom dozadu c   fc!uoPresune vaetky do popredia^_NSWindowsMenuooq-!yyx"hPomocnkvwz{*hPomocnk1{||)oy!}oPomocnk pre X11[_NSMainMenuTmenu V^apps_separator ƀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ŀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews8 79 6Z{285, 186}[NSTableView_NSViewIsLayerTreeHost  ;9 :Y{285, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification<2H#@#? @CBOA A AA#?5_{{286, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE)HIJKLMNOQRSTUWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@T #@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TMenoijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_]NSControlView0AYText Cellijlpq#@*TB1_controlTextColor+,פ/+,]NSTableColumn/HIJKLMNOSTU #@P#@D[\]^_`abefWCommandTM0.3333329856[\]^_ƀHIJKLMNOSTU #@V#@$[\]^_`abefoKlvesov skratka [headerColor  TB1C1 1[\]^__NSDrawsBackground ijlpq#@( "_controlBackgroundColor%&TL0.602715373N0.6666666667 1+-€YgridColor01TM0.4246723652E0.5 1+,56[NSTableView57/YNSControlZapps_table<= ȀҀ@DFGIJDVNSCellɀ ʀˀ RTU W_{{18, 250}, {402, 18}}[[\]^__]`\abcdeh<jTlmn_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀Ȁ̀oPreklikae neaktvne oknqrs[NSImageName΀XNSSwitch+,vw_NSButtonImageSourcev/+,yz\NSButtonCelly/+,|}XNSButton|7/]click_through ^Ԁ^copy_menu_item ր@Fŀ׀ ؀ـ Tm W`_{{63, 243}, {128, 26}}a\[[_]^b\`Tlc _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionր@ @@ !ڀijlpq WNSStateހ܀ـ!߀*ZZ displeja__popUpItemAction:ZOtherViews1Ӏۀ)܀!ހZ256 farieb܀!ހfTisce܀!ހgMiliny+,_NSPopUpButtonCelly/^NSMenuItemCell+,]NSPopUpButton|7/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator @FG!"ŀ *T- W_{{18, 250}, {402, 18}}[[\]^__]`\abcdeh7Tlmn!̀oAutentifikovae spojenia[enable_auth?@ @FGJKŀ׀ _{{18, 189}, {409, 23}}[[\]^__]`\abcdeh?WTlmn!̀oRe~im celej obrazovky_enable_fullscreen_` @FGjkŀ׀  _{{37, 123}, {409, 23}}[[\]^__]`\abcdeh_wTlmn!̀o7Povolie prstup na liatu v zobrazen na celej obrazovke_enable_fullscreen_menu  @F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth׀  #@w _{{54, 86}, {374, 31}}Z{250, 750}[\]^_d  @oQLiata sa zobraz po umiestnen kurzora myai do vrchnej  asti primrneho displeja.ijlmpq " \controlColor+,[NSTextField7/_enable_fullscreen_menu_text @FGĀ  T VW>>@_{{18, 137}, {402, 18}}@F AB #@zp0[[\]^__]`\abcdehTlmn!́o!Povolie ekvivalenty klvesu s X11_enable_keyequivs @FGŀ  _{{18, 173}, {402, 18}}[[\]^__]`\abcdehTlmn!́o(Povolie pripojenia od sieeovch klientovZenable_tcp "@FG"  _{{18, 250}, {402, 18}}@FG,-3 LM D[[\]^__]`\abcdeh9Tlmn!́!oEmulovae mya s troma tla idlami\fake_buttonsAB $(@DFGLMDŀɀ %& _{{18, 186}, {402, 18}}[[\]^__]`\abcdehAYTlmn!́$'oSledovanie myai_focus_follows_mouseab *.@DFGlmDŀɀ +, _{{18, 137}, {402, 18}}[[\]^__]`\abcdehayTlmn!́*-oSstredie sa na nov okn_focus_on_new_window 05@FG 13 2_{{18, 76}, {402, 18}}@F OQ #@yP[[\]^__]`\abcdehTlmn!́04o(Klvesy mo~nosti posielaj Alt_L a Alt_R_option_sends_alt 7T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask89< ;@x:!_{{266, 364}, {542, 348}}^Nastavenie X11WNSPanelZ{320, 240}TW =1ʁ>)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsZY X<< ? 1)13 "DF20P)_{{36, 100}, {427, 31}}[\]^_d  Co^Po povolen m~u klvesov ekvivalenty liaty naruaie X11 aplikcie u~vajce Meta modifiktor.@F"#)  EG #@{F_{{36, 202}, {436, 42}}@F56< IJ #@{[\]^_d3CD  HobPodr~te po as kliknutia Option alebo Command pre aktivciu strednho alebo pravho tla idla myai. _{{36, 166}, {451, 14}}[\]^_d LF  KoNPovo>uje zmeny vstupnho menu, ktor prepau aktulnu mapu klves serveru X11._{{18, 186}, {402, 18}}[[\]^__]`\abcdeh"UTlmn!́No*Riadie sa systmovm rozlo~enm klvesnice_{{36, 39}, {419, 31}}@FGbcʀ ST >[\]^_do2  RodKe je povolen, klvesy mo~nosti posielaj symboly klvesov Alt_L a Alt_R X11 namiesto Mode_switch._{{18, 15}, {418, 18}}[[\]^__]`\abcdehxTlmn!́PUo!V~dy rolovae v smere pohybu prsta_{{10, 33}, {496, 286}}+,~/_{{13, 10}, {516, 332}}1Z^o)VNSViewYNSTabView\NSIdentifier ]\>[Q1UVstup+,]NSTabViewItem/ ]ׁn>_Q21?_ցaei)@F׀ bc #@C_{{19, 249}, {43, 17}}[\]^_da dVFarby:@FӁ׀ fg #@x@_{{36, 223}, {392, 14}}[\]^_de  ho3Tto mo~nose bude zaveden pri alaom spusten X11.@F)׀ jk _{{36, 152}, {436, 31}}[\]^_di  loPovo>uje X11 koreHov okno. Pou~ite klvesov sekvenciu Command-Option-A pre aktivovanie a deaktivovanie re~imu celej obrazovky._{{10, 33}, {496, 286}}fVstup ]p>_T Wq1     rvz~)@FGŀp st p_{{18, 247}, {354, 23}}[[\]^__]`\abcdeh (Tlmn!́ruoPovolie synchronizciu@F56<p wx p#@z_{{36, 216}, {435, 28}}[\]^_d Cv  yoqPovo>uje polo~ku menu koprovae  a povo>uje synchronizciu Pasteboardu OSX s X11 SCHRNKOU a PRIMRNYM bufferom.@FGNOŀp {| p_{{34, 124}, {346, 23}}[[\]^__]`\abcdeh [Tlmn!́z}o-Aktualizovae SCHRNKU pri zmench Pasteboardu@FGghŀp  p_{{34, 86}, {436, 34}}[[\]^__]`\abcdeh tTlmn!́~oFAktualizovae PRIMRNY buffer (stredn kliknutie) pri (zmene Pasteboardu@FGŀp  p_{{34, 50}, {353, 23}}[[\]^__]`\abcdehTlmn!́o1Aktualizovae Pasteboard okam~ite po vybrat textu@FGŀp  p_{{18, 183}, {338, 23}}[[\]^__]`\abcdehTlmn!́o,Aktualizovae Pasteboard pri zmench SCHRNKY@Fp  p#@z_{{36, 152}, {420, 28}}[\]^_d  o\Zak~te tto mo~nose ak chcete pou~ie xschrnku, klipper, alebo inho X11 mana~ra schrnky.@Fԁp  p#@y_{{48, 16}, {417, 28}}[\]^_d  o_Kvli obmedzeniam v X11 protokole, tto mo~nose mo~no nebude fungovae v niektorch aplikcich._{{10, 33}, {496, 286}}ZPasteboardD ]Ɂ>_1<Aaȁ$*)@DFD ɀ  #@{_{{36, 213}, {437, 31}}[\]^_d   oaKe je povolen, kliknutm na neaktvne okno posunie kliknutie myai do danho okna a aktivuje ho.@DF  D ɀ  #@z_{{36, 166}, {429, 14}}[\]^_d !  oFAktvne okno sa nachdza pod kurzorom myai. Toto m ne~iadce  inky.@DF - .D 4ɀ  #@y_{{36, 103}, {415, 28}}[\]^_d ;  o{Ke je povolen, vytvorenie novho X11 okna spsob posunutie X11.app do popredia (namiesto Finder.app, Terminal.app, at.)_{{10, 33}, {496, 286}}dOkn C]> 1 G J K L)@F W X ^  #@{_{{36, 202}, {446, 42}}[\]^_d J e  oSpustenie X11 vytvor klvesy ochrany prstupu Xautority. Tieto klvesy sa stan neplatnmi ak sa zmen systmov IP adresa,  o m~e zabrnie spusteniu X11 aplikci.@F q r ^  _{{36, 125}, {446, 42}}[\]^_d K ~  oAk je povolen, mus bye povolen aj funkcia Autentifikcia spojen, aby bola zaisten bezpe nose systmu. Ak nie je povolen, pripojenia zo vzdialench aplikci nie s povolen.@F     #@y_{{17, 24}, {404, 14}}[\]^_d L   o<Zmeny tchto mo~nost bud zaveden pri alaom spusten X11._{{10, 33}, {496, 286}}lZabezpe enie+, YNSTabView /Z{542, 348}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel P_scroll_in_device_direction _sync_clipboard_to_pasteboard" €[sync_keymap rĀ_sync_pasteboard zƀ_sync_pasteboard_to_clipboard ~Ȁ_sync_pasteboard_to_primary ʀ_sync_primary_immediately ̀Zsync_text1 ΀Zsync_text2D AЀ_toggle_fullscreen_item? 4Ҁ^x11_about_item! t ԁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  h ׁ_minimize_window:? 4ف_orderFrontStandardAboutPanel:@  6 ہ[prefs_show:F  E݁Uhide:J  M߁Zterminate:G " H_hideOtherApplications:H ( J_unhideAllApplications: - ^Ucopy: 3 e ]close_window: 9 k \zoom_window: = ?  @ B C+FG  K L+_NSHuggingPriority   T W [W 4I_{{324, 191}, {124, 32}}[[\]^_]`\abcd ^ a = c dml@ !ЀjDuplikovae_apps_table_duplicate: j l  @ B C+FG  v w+  _{{324, 159}, {124, 32}}[[\]^_]`\abcd ^ a j dml!ЀiOdstrnie_apps_table_delete: W _apps_table_show:  @ B C+FG   +  _{{324, 223}, {124, 32}}[[\]^_]`\abc ^ a dml!ЀnPridae polo~ku_apps_table_new:  ^prefs_changed:  ^prefs_changed:"  ^prefs_changed: ^prefs_changed:  ^prefs_changed: ր  ^prefs_changed:| |  Yx11_help: ' _apps_table_show: n \next_window: q _previous_window:? _enable_fullscreen_changed:D A _toggle_fullscreen:< Ȁ ^prefs_changed:A $ ^prefs_changed:a  * ^prefs_changed: r ^prefs_changed:  z  ^prefs_changed:  ~ "^prefs_changed:   $^prefs_changed: #  &^prefs_changed:_ ) (^prefs_changed: / 0 *^prefs_changed: 5 P ,^prefs_changed:1 9 ү :'2?@ABkCDEFGHIJ()*  !+o|3# 6"-c?K_k  6 O hD<JAM am ." J X K r L + = L j wCQDE)3 .-02469:<@ADEHJLMQSVWY[^acehkmnqstwy| 7<>Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀋀<@#&'G& (/]NSApplication +    12KL J3:! _{{302, 440}, {454, 271}}oAplika n menu X11Z{320, 240}1 = j 򀋁)1 )3<@)1 )_{{1, 1}, {285, 214}}_{{0, -28}, {285, 214}}+,  ZNSClipView /1 Հ)_{{1, 1}, {285, 28}}   F    _NSControlTarget_NSControlAction? =>>_{{1, 215}, {285, 15}}\_doScroller:+,  ZNSScroller 7/  F  +  ? A>>_{{286, 29}, {15, 186}}_{{20, 20}, {302, 231}}1 5 ҡ 6DG 9 : ; < = > ?   B_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionFE__panWithGestureRecognizer:+, E F_NSPanGestureRecognizer G H/_NSPanGestureRecognizer_NSGestureRecognizer+, J/+, L M\NSScrollView L/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 S ү'2222B22222222()*        +o3 "?_    D<DDADDaD J K L + =+ j+CDE+ -02222:22222222-QSS-Y[-acccccccc-wy7<>ZDF20P>^׀րـ܀܀܀܀ׁaׁe׀׀ׁiׁ>oprpvpzp~pppp>ɀȀɁɁ$ɁɁ*Ɂ>0쀋##G1 ү :'2?@ABkCDEFGHIJ()*  !+o|3# 6"-c?K_k  6 O hD<JAM am ." J X K r L + = L j wCQDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.-02469:<@ADEHJLMQSVWY[^acehkmnqstwy| 7<>Z BDGFJM2Q03PT^׀րـ܀ۀacegikoprtvxz|~ɀȀˁ$&*,0􀋀<@#&' ,ǀӀՀ#)/6ÁŁǁɁˁ́ρсӁց؁ځ܁ށ   !#%')+G1 ү        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~PQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-.G     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ҠG+,^NSIBObjectData/",1:?QZw$+9FXf"+6?NS\epqs| 0 2 4 6 8 : < > @ B D F H J L O R U X [ ^ a d g j m p s v y |    % - U W Y [ ] _ h j l z      A O V j x   , . 0 2 4 6 8 @ R _ j u w y {    % R [ e n p r t v x z | ~    579;=?AZcry468:<>@BDFJ[]_acl=?ABDFGIKxz|~   35:<>@BDsu!#%'Bgikmoqs IKMOQSUWY[n{}  )VXZ\^`bdfhw "$&(*/@BDFHQbdfhjlnprt!#%')+:ceghjlmoq8acefhjkmo!#4ACEGXadfh *7LWs ,8Qr8DQ]g   '024=>?  "S_wxz|~ &2[]_`bdfhj   ) 5 L Y k m p r u w |  !! !!!!!=!J!U!b!m!|!!!!!!!!!!!!!!!!""" "%"'")"+"-"/"2"7"L"S"\"t"{"""""""""""""""""""""##-#M#h#q#~#############$$$$)$5$C$K$M$O$Q$S$U$\$n$$$$$$$$$$$$$$$6|666666666677%7*7,7.70727476797C7T7]7`7b7d7q7t7v777777777777788888888:8<8>8@8B8D8L8Y8g8i8888888888888888999999 9/9D9F9H9J9L9X9m9p9t9v9x999999999999999999:::.:;:J:L:N:c:e:g:i:k:u::::::::::::::::;Q;X;Z;[;\;^;`;b;d;e;g;i;k;l;n;o;p;;;;;;;;;;<<<&<<> >!>">$>&>(>)>+>->/>0>2>3>4>]>_>b>c>f>i>k>m>o>>>>??-?8?J?L?N?S?\?^?_?`?a?c?e?g?i?k?|???????????????????@ @@@@@!@#@%@R@T@V@X@Z@\@^@`@b@d@o@@@@@@@@@@@@@@@@@@@@@A AA&A3ABAKAYAfAlAAAAAAAAAAAAAAAAAAAAABBBBBBBtBvBwBxBzB|B~BBBBBBBBBBBBBBBBBBCCC!C#C%C'C)C+C\ChC}CCCCCCCCCCCCCCCCCCCCDDPDRDTDVDXDZD\D^DDDDDDDDEEEEE E"E$E%E'E*E,E-E/E0E1EJEEEEEEEEF F"F7F9F;F>FAFCFFFG G GGGGGGGGGG!G"G$G%G&G/GGGRGwGzG|GGGGGH1HBHEHGHIH^H`HcHeHgHtH}HHHHHHHHHI2I4I5I6I9I;I=I>IAIDIFIGIJIKILIOIIIIIIIIIIIIJJ J"J#J$J'J)J,J-J0J3J5J6J9J:J;JDJGJJJJJJJJJJKKKK K KKjKlKmKnKpKrKtKuKxK{K}K~KKKKKKKKKKKKL=LHL]L_LaLdLgLiLLLLLLLLLLLLLLLLLM]M_M`MaMdMfMhMiMlMoMqMrMuMvMwMzMMMMMMMMN NN,N.N0N3N6N8NNNNNNNNNNNNNNNNOOOO O OOOO4OJO_OaOcOfOiOkOOOOOOOOOOOOOOOOP6P8P:Pj?j@jYjjjjjjjjkkjkmkokpkqktkvkykzk}kkkkkkkkkkkkkkklmmmmmm m mmmmmmmmmm(m@memhmjmmmpmsmun6nOnZnsnvnyn{n~nnnnnnnnnnnoooooooo"o#o&o)o+o,o.o/o0o9oRowozo|oooopLppppppppppppppppppqqqqq!q$q&qrrr!r"r#r%r'r*r+r.r1r3r4r6r7r8rArZrrrrrrrssssssssssssssssstXt[t]t^t_tatctftgtjtmtotptrtsttt}ttttttttvvvvvvvvvvvvvvvvvvvvvvvvvxTxxxxxxxxxxxxxxxxxxyy y"y%y(y+y-yyyyyyzzz%zHzRzYzbzuzzzzzzzzzzzzzzzz{{{{{ {#{%{1{F{H{J{M{P{R{d{y{{{}{{{{{{{{{{{{{{{||||3|5|7|:|=|?|J|_|a|c|f|i|k|v|||||||||||||||||||} }},}3}B}S}U}W}Z}]}p}}}}}}}}}}}}}}}}}}~~~~ ~~~*~,~.~1~4~M~^~`~b~e~h~~~~~~~~~~~~~~~~~~~ h|*357@BDFHJLNPRTVXZ\^`bdfilorux{~ĈLjʈ̈ΈЈӈֈو܈߈ !$'*-0369Wmv{ɎҎې "$&(*,.02468:<>@BDFHJLNPRTVXZ\_behknqtwz}ĐƐɐːΐѐԐאڐݐ "$'*-/1368;=@BEGJMPSVY[]_acegikmoruwy{}PRUWY[]_acegikmoqsuwy{}ÓƓɓ̓ϓғՓؓۓޓ !$'*-0369ADGJMPSVY\_behknqtwz}jmprux{~×Ɨɗ̗ϗҗ՗ؗۗޗ  #&),/258;>ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=@CFILORUX[^adgjmpsvy|ęǙʙ͙Йә֙ٙܙߙ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ɛʛ֛͛xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/Localizable.strings0000644000175000017500000001040014757411105022603 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Naozaj chcete ukon ie X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Vaetky otvoren X11 aplikcie okam~ite zastan a stratte vaetky neulo~en zmeny."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Vstpie do re~imu RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Aplikcia vy~iadala X11 pre zmenu rozlaenia vaho displeja. X11 obnov displej do jeho predchdzajceho stavu ke ~iadajca aplikcia po~iada o nvrat do predchdzajceho stavu. Prpadne m~ete pou~ie sekvenciu klvesov #%#A a vyntie nvrat X11 do predchdzajceho stavu."; /* No comment provided by engineer. */ "Allow" = "Povolie"; /* No comment provided by engineer. */ "Always Allow" = "V~dy povolie"; /* No comment provided by engineer. */ "Cancel" = "Zruaie"; /* No comment provided by engineer. */ "Mac Help" = "Pomocnk pre Mac"; /* No comment provided by engineer. */ "Quit" = "Ukon ie"; /* No */ "No" = "Nie"; /* Yes */ "Yes" = "no"; /* Terminal */ "Terminal" = "Terminl"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Mte existujci ~/.xinitrc sbor.\n\nOkn zobrazen aplikciou X11 zrejme nemaj liaty s nzvom, alebo m~u vyzerae inak ako okn zobrazen natvnou aplikciou.\n\nChcete odlo~ie existujci sbor a pou~ie pri najbli~aom spusten X11 atandardn prostredie X11? "; /* window item modifiers */ "window item modifiers" = "command "; /* Updates menu title & */ "Check for X11 Updates..." = "Skontrolovae aktualizcie X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/sk.lproj/locversion.plist0000644000175000017500000000061014757411105022211 LprojCompatibleVersion 106.5 LprojLocale sk LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/0000755000175000017500000000000014757411136020030 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/0000755000175000017500000000000014757411136021523 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib0000644000175000017500000021146614757411105024240 Cuando esta opción está activada, puede que los equivalentes de teclado de la barra de menús interfieran con las aplicaciones X11 que usen el modificador Meta. Mantenga pulsadas las teclas Opción o Comando al hacer clic para activar el botón central o derecho del ratón. Activa la ventana raíz de X11. Use la combinación de teclas Comando + Opción + A para entrar o salir de la modalidad de pantalla completa. Cuando está activada, al hacer clic en una ventana inactiva, la ventana se activa y además el clic del ratón se transmite a ella. Cuando está activada, al crear una nueva ventana de X11 el archivo X11.app se sitúa en primer plano (por encima de Finder.app, Terminal.app, etc.) Al iniciar X11 se crearán unas claves de control de acceso Xauthority. Si la dirección IP del sistema cambia, estas claves dejarán de ser válidas, lo que impediría que pudiesen ejecutarse las aplicaciones X11. Si esta opción está activada, la opción “Autenticar conexiones” también debe estarlo para garantizar la seguridad del sistema. Si está desactivada, las conexiones de aplicaciones remotas no están permitidas. xorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects.nib0000644000175000017500000013634014757411105024613 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}>?BH]jkuvzpV$%*/05:; @DEK[dez{ $3<=EFGM\]efgm|} ./@HIJP_`hijp $%&6>?PQYZ[cdeu|}~"12:;KLSTcdlm|}     ' ( / 0 @ A H I J K Q Y i j r s         % & + , 1 2 7 8 < = B C H I N ` i j t u v {          ! & ' , - 2 3 8 9 > ? D E      ) * + . ? @ A E P Q V X [ \ ] ^ _  q n      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\AplicacionesP^submenuAction:$%*\Aplicaciones1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5]Acerca de X112XY287_Preferencias...Q,22  2kkm2!<<;"YServiciossmu*=;>1w)__NSServicesMenu22  22BA_$Activar/desactivar pantalla completaQa22  2UNSTag2F*E[Ocultar X11Qh22FH]Ocultar otros22!J\Mostrar todo22  22NM\Salir de X11Qq\_NSAppleMenu-!RRQ"\AplicacionesST*\Aplicaciones1׀UV)R  R!W_Personalizar...-!ZZY"gEdicin[\*gEdicin1])Z_^VCopiarQc  -!bba"WVentana*cav1 dgjlmpst) &'bfeVCerrarQw /0bihYMinimizarQm 9b!kTZoom b   IJbon_Recorrer ventanasQ< PSTbrqoRecorrer ventanas al revsQ> b   fb!u_Traer todo al frente^_NSWindowsMenuooq-!yyx"UAyudaqwxz*1z{{)oy!|YAyuda X11[_NSMainMenuTmenu U^apps_separator Ȁ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ǀR@#@À#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'(*,./02456,:;=]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,@A]_NSCornerView@/1CDEF)IJKLMNOPQSTUVWYZ[\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@Z@#@O]`^_`abcdefghi[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@VNombrelmnopqrstVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontwxy_NSFontDescriptorAttributes{1|WNS.keys}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell^_`abY]NSControlView_NSPlaceholderString0A^Celda de textolmost#@*PVB1_controlTextColor+,ݤ/+,]NSTableColumn/IJKLMNOPQUVWY #@V#@D^_`abcdehiWComandoVM0.3333329856^_`abYˀ^Celda de textoIJKLMNOPQUVWY #@X#@$^_`abcde  hinFuncin rpida[headerColorVB1C1 1^_`abY!_NSDrawsBackground ^Celda de textolmo&'st#@(,._controlBackgroundColor12VL0.602715373N0.6666666667 179ĀYgridColor<=VM0.4246723652E0.5 1+,AB[NSTableViewAC/YNSControlZapps_tableHI ʀԀLPRTUPVNSCellˀ ̀̀ ]_` Y_{{18, 243}, {402, 18}}f^ghibj`k_lmnopsHuVwxy_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀_4Hacer clic para pasar de una ventana inactiva a otra|}~[NSImageNameЀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonC/]click_through ]ր^copy_menu_item ؀Lŀـ ڀۀ _o Yb_{{77, 234}, {168, 26}}lg^fbhim_kVwn _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀lmost WNSStateހۀ!*^De la pantalla__popUpItemAction:ZOtherViews1ހ݀)ހ![256 coloresހ!UMilesހ!XMillones+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonC/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator!" L(R,-(ŀ 5_8 Y_{{18, 243}, {402, 18}}f^ghibj`k_lmnops!BVwxy!π_Autenticar conexiones[enable_authJK LRUVŀـ _{{18, 182}, {409, 23}}f^ghibj`k_lmnopsJbVwxy!π_Modalidad de pantalla completa_enable_fullscreenjk LRuvŀـ  _{{37, 116}, {533, 18}}f^ghibj`k_lmnopsjVwxy!ρoHPermitir acceso a la barra de mens en la modalidad de pantalla completa_enable_fullscreen_menu L_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~_{{54, 79}, {493, 31}}Z{250, 750}^_`abo   @osLa barra de mens estar visible cuando el cursor del ratn se site en la parte superior de la pantalla principal.lmopst . \controlColor+,[NSTextFieldC/_enable_fullscreen_menu_text LRπ  _ XY@@B_{{18, 127}, {402, 18}}L CD #@2f^ghibj`k_lmnopsVwxy!ρ_&Activar equivalentes de teclado en X11_enable_keyequivs L(R(ŀ  _{{18, 166}, {402, 18}}f^ghibj`k_lmnopsVwxy!ρ_&Permitir conexiones de clientes de redZenable_tcp $LR&'-  " !_{{18, 243}, {402, 18}}L89? FH Gf^ghibj`k_lmnopsEVwxy!ρ#oSimular ratn de tres botones\fake_buttonsMN &*LPRXYPŀˀ '( _{{18, 182}, {402, 18}}f^ghibj`k_lmnopsMeVwxy!ρ&)oEnfocar la posicin del ratn_focus_follows_mousemn ,0LPRxyPŀˀ -. _{{18, 138}, {402, 18}}f^ghibj`k_lmnopsmVwxy!ρ,/_Enfocar las ventanas nuevas_focus_on_new_window 27LR 35 4_{{18, 69}, {402, 18}}L QS Rf^ghibj`k_lmnopsVwxy!ρ26o&Las teclas Opcin envan Alt_L y Alt_R_option_sends_alt 9V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{345, 450.03906000000001}, {619, 341}}_Preferencias de X11WNSPanelZ{320, 240}_Y ?1Ձ@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1 ā)1-?!JG42R)_{{36, 93}, {501, 28}}^_`aboY! E oCuando esta opcin est activada, puede que los equivalentes de teclado de la barra de mens interfieran con las aplicaciones X11 que usen el modificador Meta._{{36, 209}, {501, 28}}LR./ NO J^_`abo-Y;! I ooMantenga pulsadas las teclas Opcin o Comando al hacer clic para activar el botn central o derecho del ratn. LHI KL _{{36, 151}, {501, 28}}^_`aboYVJ M oaPermite que los cambios en el men de teclado reemplacen la distribucin de teclas actual de X11._{{18, 185}, {402, 18}}f^ghibj`k_lmnops?`Vwxy!ρGPo-Seguir la distribucin de teclado del sistema_{{36, 35}, {501, 28}}LRmnՀ UV @^_`aboz4  To|Si esta opcin est seleccionada, las teclas Opcin envan los smbolos de tecla de X11 Alt_L y Alt_R en vez de Mode_switch._{{18, 11}, {459, 18}}f^ghibj`k_lmnopsVwxy!ρRWoCPermitir desplazamiento en la direccin del movimiento de los dedos_{{10, 33}, {573, 279}}+,/_{{13, 10}, {593, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1WEntrada+,]NSTabViewItem/ _فp@aQ21Jj؁cgk)Lāـ de #@K_{{17, 238}, {58, 20}}^_`aboYcf XColores:L߁ـ hi #@x@_{{36, 216}, {392, 14}}^_`aboYg j o;Esta opcin ser efectiva la prxima vez que se inicie X11.Lـ lm #@_{{36, 145}, {511, 31}}^_`aboYk n oActiva la ventana raz de X11. Use la combinacin de teclas Comando + Opcin + A para entrar o salir de la modalidad de pantalla completa._{{10, 33}, {573, 279}}VSalida   _r@a_ Ys1 tx|)L R*+ ŀr uv r_{{18, 238}, {409, 23}}f^ghibj`k_lmnops7Vwxy!ρtwoActivar sincronizacinL DE r yz r_{{36, 204}, {501, 28}}^_`aboQx  {ouActiva el tem de men copiar  y permite sincronizar el portapapeles de OSX y los bfers CLIPBOARD y PRIMARY de X11.L R\] ŀr }~ r_{{34, 112}, {409, 23}}f^ghibj`k_lmnopsiVwxy!ρ|_5Actualizar el CLIPBOARD cuando cambie el portapapelesL Ruv ŀr  r_{{34, 87}, {529, 23}}f^ghibj`k_lmnopsVwxy!ρoOActualizar el PRIMARY (clic con el botn central) cuando cambie el portapapelesL R ŀr  r_{{34, 62}, {495, 18}}f^ghibj`k_lmnopsVwxy!ρ_HActualizar el portapapeles de inmediato cuando se seleccione texto nuevoL R ŀr  r_{{34, 175}, {409, 23}}f^ghibj`k_lmnopsVwxy!ρ_5Actualizar el portapapeles cuando cambie el CLIPBOARDL  ȁr  r#@~_{{48, 141}, {485, 28}}^_`abo  ogDesactive esta opcin si desea usar xclipboard, klipper o cualquier otro gestor de portapapeles de X11.L  ȁr  r_{{48, 30}, {485, 28}}^_`abo   otA causa de las limitaciones del protocolo de X11, puede que esta opcin no funcione siempre en algunas aplicaciones._{{10, 33}, {573, 279}}\PortapapelesP _ˁ@a1HMmʁ&,)LP  P ˀ  #@8_{{26, 206}, {523, 31}}^_`abo   oCuando est activada, al hacer clic en una ventana inactiva, la ventana se activa y adems el clic del ratn se transmite a ella.LP  !P ˀ  _{{26, 162}, {523, 14}}^_`abo -  __El punto de enfoque de la ventana de X11 sigue el cursor. Esto conlleva algunos inconvenientes.LP 9 :P ˀ  _{{26, 90}, {523, 42}}^_`abo F  oCuando est activada, al crear una nueva ventana de X11 el archivo X11.app se sita en primer plano (por encima de Finder.app, Terminal.app, etc.)_{{10, 33}, {573, 279}}XVentanas( N_@ 1 R! U V W)L( b c(  _{{36, 195}, {501, 42}}^_`abo UY o  oAl iniciar X11 se crearn unas claves de control de acceso Xauthority. Si la direccin IP del sistema cambia, estas claves dejarn de ser vlidas, lo que impedira que pudiesen ejecutarse las aplicaciones X11.L( | }(  _{{36, 104}, {501, 56}}^_`abo VY   oSi esta opcin est activada, la opcin Autenticar conexiones  tambin debe estarlo para garantizar la seguridad del sistema. Si est desactivada, las conexiones de aplicaciones remotas no estn permitidas.L(  (   #@y_{{17, 17}, {404, 14}}^_`abo WY   o@Estas opciones sern efectivas la prxima vez que se inicie X11._{{10, 33}, {573, 279}}YSeguridad+, YNSTabView /Z{619, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard? GĀ[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D @Ҁ_toggle_fullscreen_item?  4Ԁ^x11_about_item  t ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  g ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F # D߁Uhide:J ) LZterminate:G / G_hideOtherApplications:H 5 I_unhideAllApplications: : ]Ucopy: @ d ]close_window: F j \zoom_window: J L  L O P,R  X Y,_NSHuggingPriority   _ d hY 6K_{{340, 191}, {110, 32}}f^ghib`k_lmno k n J p qxw@ !ҀXDuplicar_apps_table_duplicate: w y  L O P,R   ,  _{{340, 159}, {110, 32}}f^ghib`k_lmno k n w qxw!ҀXEliminar_apps_table_delete: V _apps_table_show:  L O P,R   ,  _{{340, 223}, {110, 32}}f^ghib`k_lmn k n qxw!ҀkAadir tem_apps_table_new:  ^prefs_changed:  ^prefs_changed:? G ^prefs_changed:!  ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:{ { Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:J  _enable_fullscreen_changed:D @ _toggle_fullscreen:H  ʀ ^prefs_changed:M & ^prefs_changed:m  , ^prefs_changed:  t  ^prefs_changed:  | "^prefs_changed: $  $^prefs_changed: *  &^prefs_changed: 0  (^prefs_changed:j 6  *^prefs_changed: < 2 ,^prefs_changed: B R .^prefs_changed:1 F ߯ G'2?@ABkCDEFGHIJ()*  +o{'-9I?/nJVjv +E]v PHU MY !my :(!- U c V } W , J Y w DSEF*4 0-02469:@\"D!HJLGO4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication ,    34MN L5<! _{{302, 440}, {454, 271}}oMen de aplicaciones X11Z{320, 240}1 J w 􀊁)1 *4>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Հ)_{{1, 1}, {301, 28}} !   " % %_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+, , -ZNSScroller ,C/    8 % %A C@@_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 B ߡ CFI F G H I J K L   O_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, R S_NSPanGestureRecognizer T U/_NSPanGestureRecognizer_NSGestureRecognizer+, W/+, Y Z\NSScrollView Y/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ` ߯'2222B22222222()*        +o-?Jj         PHPPMPPmP(!(( U( V( W , J, w,DEF, -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\!JG42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 ߯ G'2?@ABkCDEFGHIJ()*  +o{'-9I?/nJVjv +E]v PHU MY !my :(!- U c V } W , J Y w DSEF*4 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"D!HJLGO4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ߯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ߠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~    13579;=Xapw2468:<>@BDHY[]_aj>@BCEGHJLy{}$&+-/135\^ <>@BDFHU~  !.024AJOQSU~ &(*,;DGIKlnprtvx   .02468:ACdfhjlnpz|  &(IKPRTVXZJLNPRTVXZ\boqsu~ 2?T_{"4@Yz&@LYeo  #%'(*,./0279BKMOXY[\ #%(*,-024?p| (<COxz|} 1FRiv    " ) + - / 1 ^ k v !!'!1!#F#K#`#l#z#################$$ $ $$$5555555666"6)6R6`6v6{6}666666666666666666666667777(7-7Z7[7]7_7a7b7d7m7v7x77777777777777777788;8<8>8@8B8C8E8N8W8Y8z8|8~88888888888888899+9-9/91929496989:9I9Z9c9f9h9j99999999999999999:::%:':):2:>:I:S:^:s:u:w:y:{:}::::::::::::::::;; ;#;$;';*;,;.;0;I;;;;;;;< <<< <%<'<)<+<->d>v>>>>>>>>>>>>>>>>>>??? ? ?=?E?G?I?K?M?O?Q?S?U?b?d?f?h?w????????????????????@*@,@.@0@2@4@6@8@:@<@B@o@q@s@u@w@y@{@}@@@@@@@@@@@AAAAA A AA0A2A4A6A8A:ADAYA[A]A_AaAcA{AAAAAAAAAAAAABBBBBB B B B4B6B9B:B=B@BBBDBFB_BBBBBBBBBBBBBBBBCJCLCMCNCPCRCTCUCWCYC[C\C^C_C`CyCCCCCCCCCCDDDDDDDwDyDzD{D}DDDDDDDDDDDDDDDDDDDEEEEEEEEF+FGFoFFFFFFFFFFFFFFFFFFFFFFGGGGG GHH H HH#H%H(H*H,H9HBHNHYHwHHHHHHHHHHHIIIII I I IIIIIEIFIIILIOIRIUIWIZI\I^IwIIIIIIIIIIIIIIIJJ J JKJMJOJQJTJWJYJ[JJJJJJJJKKKKKKKKK!K$K&K'K)K*K+KDKKKKKKKKKKKKKKKKLGLILJLKLNLPLRLSLVLYL[L\L_L`LaLdL}LLLLLLLLLLLMMMMMM MHMJMLMNMQMTMVMXMMMMMMMMNN N!N"N$N&N(N)N,N/N1N2N4N5N6NONNNNNNNNNNOOO O OOOmOoOpOqOsOuOwOxO{O~OOOOOOOOOOOOOOP P!P6P8P:P=P@PBPPPPPPPPPPPPPPPPPQAQDQFQGQHQKQMQPQQQTQWQYQZQ]Q^Q_QbQQQQQQQQRRR(R*R,R/R2R4RRRRRRRRS S)S6SSSlS~SSSSSSSSSSSSSSSSSSSSSST#T9TATLTuTwTzT{T~TTTTTTTTTTU UU*U-U0U1U4U7U9U~W~l~n~p~r~u~w~~~~~~~~~~~~~~)+-03Sdfhknz )68;>DUWY\_m~$')*+.02369;ABEGILMNQj/Lkя؏+4?Xclu‘đƑȑʑ̑ΑБґԑ֑ؑڑܑޑ  #&),/258;>@BDFHJLNQSVXZ\_adfilorux{~’ŒȒʒ̒ΒђӒ֒ؒےݒ (  "$&(*,.02468:=@CFILORUX[^adgjmpsvy|Õƕɕ̕ϕҕՕؕەޕ  #&),/258;>ADFHJLNPRTVY\^adfhjlnprtvxz|~–ŖȖ˖ΖіԖזږݖ "%(+.147:C  #&),/258;>ADGJMPSVY\_behknqtwz}™řș˙Ιљԙיڙݙ "%(+.147:=@CFILORUX[^adgjmpsvy|Ěǚʚ͚КӚ֚ٚܚߚ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~œĜƜȜʜ̜ΜМҜԜ֜؜ڜܜޜ  "$&(*,.02468:<>@BDFHJLNPYZ\efirxorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013630714757411105025335 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuy}  <=@F[histxnT  "#(-.389 >BCIZcdyz~#2;<DEFL[\defl{|  -.?GHIO^_ghio~ #$%5=>OPXYZbcdt{|} !019:JKRSbckl{|    & ' . / ? @ G H I J P X h i q r          $ % * + 0 1 6 7 ; < A B G H M _ h i s t u z           % & + , 1 2 7 8 = > C D     ( ) * - > ? @ D O P U W Z [ \ ] ^ P p m      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "\AplicacionesP^submenuAction:$%*\Aplicaciones1&')#   #!(mPersonalizar &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -~!"#VNSName*/.}XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5]Acerca de X112XY287_Preferencias...Q,22  2kkm2!<<;"YServiciossmu*=;>1w)__NSServicesMenu22  22BA_$Activar/desactivar pantalla completaQa22  2UNSTag2F*E[Ocultar X11Qh22FH]Ocultar otros22!J\Mostrar todo22  22NM\Salir de X11Qq\_NSAppleMenu-!RRQ"\AplicacionesST*\Aplicaciones1׀UV)R  R!W_Personalizar...-!ZZY"gEdicin[\*gEdicin1])Z_^VCopiarQc  -!bba"WVentana*cav1 dgjlmpst) &'bfeVCerrarQw /0bihYMinimizarQm 9b!kTZoom b   IJbon_Recorrer ventanasQ< PSTbrqoRecorrer ventanas al revsQ> b   fb!u_Traer todo al frente^_NSWindowsMenuooq-!yyx"UAyudaqwxz*1z{{)oy!|YAyuda X11[_NSMainMenuTmenu U^apps_separator Ȁ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ǀR #@À#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&(*,-.0234*89;]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,>?]_NSCornerView>/1ABCD)GHIJKLMNOQRSTUWXY\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@W #@O]`\]^_`abcdefg[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@VNombrejklmnopqrVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontuvw_NSFontDescriptorAttributesy1z~WNS.keys{|}_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell\]^_`W]NSControlView_NSPlaceholderString0A^Celda de textojkmqr#@*PTB1_controlTextColor+,ۤ/+,]NSTableColumn/GHIJKLMNOSTUW #@R#@D\]^_`abcfgWComandoTM0.3333329856\]^_`Wɀ^Celda de textoGHIJKLMNOSTUW #@U#@$\]^_`abc  fgnFuncin rpida[headerColorTB1C1 1\]^_`W_NSDrawsBackground ^Celda de textojkm$%qr#@(*,_controlBackgroundColor/0TL0.602715373N0.6666666667 157ĀYgridColor:;TM0.4246723652E0.5 1+,?@[NSTableView?A/YNSControlZapps_tableFG ʀԀJNPQSTNVNSCellˀ ̀̀ \^_ Y_{{18, 243}, {402, 18}}e\fgh`i^j]klmnorFtTvwx_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀_4Hacer clic para pasar de una ventana inactiva a otra{|}[NSImageNameЀXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonA/]click_through ]ր^copy_menu_item ؀JPĀـ ڀۀ ^o Yb_{{77, 234}, {168, 26}}kf\e`ghl]jTvm _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀jkmqr WNSStateހۀ!*^De la pantalla__popUpItemAction:ZOtherViews1݀݀)ހ![256 coloresހ!UMilesހ!XMillones+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonA/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator ! J'PQ+,'Ā 4^7 Y_{{18, 243}, {402, 18}}e\fgh`i^j]klmnor ATvwx!π_Autenticar conexiones[enable_authIJ JPQTUĀـ _{{18, 182}, {409, 23}}e\fgh`i^j]klmnorIaTvwx!π_Modalidad de pantalla completa_enable_fullscreenij JPQtuĀـ  _{{37, 116}, {533, 18}}e\fgh`i^j]klmnoriTvwx!ρoHPermitir acceso a la barra de mens en la modalidad de pantalla completa_enable_fullscreen_menu JP_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@~_{{54, 79}, {493, 31}}Z{250, 750}\]^_`n   @osLa barra de mens estar visible cuando el cursor del ratn se site en la parte superior de la pantalla principal.jkmnqr , \controlColor+,[NSTextFieldA/_enable_fullscreen_menu_text JPQ΀  ^ XY@@B_{{18, 127}, {402, 18}}JP CD #@2e\fgh`i^j]klmnorTvwx!ρ_&Activar equivalentes de teclado en X11_enable_keyequivs J'PQ'Ā  _{{18, 166}, {402, 18}}e\fgh`i^j]klmnorTvwx!ρ_&Permitir conexiones de clientes de redZenable_tcp $JPQ%&,  " !_{{18, 243}, {402, 18}}JP78> FH Ge\fgh`i^j]klmnorDTvwx!ρ#oSimular ratn de tres botones\fake_buttonsLM &*JNPQWXNĀˀ '( _{{18, 182}, {402, 18}}e\fgh`i^j]klmnorLdTvwx!ρ&)oEnfocar la posicin del ratn_focus_follows_mouselm ,0JNPQwxNĀˀ -. _{{18, 138}, {402, 18}}e\fgh`i^j]klmnorlTvwx!ρ,/_Enfocar las ventanas nuevas_focus_on_new_window 27JPQ 35 4_{{18, 69}, {402, 18}}JP QS Re\fgh`i^j]klmnorTvwx!ρ26o&Las teclas Opcin envan Alt_L y Alt_R_option_sends_alt 9T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{345, 450.03906000000001}, {619, 341}}_Preferencias de X11WNSPanelZ{320, 240}^Y ?1ԁ@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1 Á)1,>!JG42R)_{{36, 93}, {501, 28}}\]^_`nW  E oCuando esta opcin est activada, puede que los equivalentes de teclado de la barra de mens interfieran con las aplicaciones X11 que usen el modificador Meta._{{36, 209}, {501, 28}}JPQ-. NO J\]^_`n,W:! I ooMantenga pulsadas las teclas Opcin o Comando al hacer clic para activar el botn central o derecho del ratn. JPGH KL _{{36, 151}, {501, 28}}\]^_`nWUJ M oaPermite que los cambios en el men de teclado reemplacen la distribucin de teclas actual de X11._{{18, 185}, {402, 18}}e\fgh`i^j]klmnor>_Tvwx!ρGPo-Seguir la distribucin de teclado del sistema_{{36, 35}, {501, 28}}JPQlmԀ UV @\]^_`ny4  To|Si esta opcin est seleccionada, las teclas Opcin envan los smbolos de tecla de X11 Alt_L y Alt_R en vez de Mode_switch._{{18, 11}, {459, 18}}e\fgh`i^j]klmnorTvwx!ρRWoCPermitir desplazamiento en la direccin del movimiento de los dedos_{{10, 33}, {573, 279}}+,/_{{13, 10}, {593, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1WEntrada+,]NSTabViewItem/ _فp@aQ21Ii؁cgk)JPÁـ de #@K_{{17, 238}, {58, 20}}\]^_`nWcf XColores:JPށـ hi #@x@_{{36, 216}, {392, 14}}\]^_`nWg j o;Esta opcin ser efectiva la prxima vez que se inicie X11.JPـ lm #@_{{36, 145}, {511, 31}}\]^_`nWk n oActiva la ventana raz de X11. Use la combinacin de teclas Comando + Opcin + A para entrar o salir de la modalidad de pantalla completa._{{10, 33}, {573, 279}}VSalida   _r@a^ Ys1tx|)J PQ)* Ār uv r_{{18, 238}, {409, 23}}e\fgh`i^j]klmnor6Tvwx!ρtwoActivar sincronizacinJ PCD r yz r_{{36, 204}, {501, 28}}\]^_`nPx  {ouActiva el tem de men copiar  y permite sincronizar el portapapeles de OSX y los bfers CLIPBOARD y PRIMARY de X11.J PQ[\ Ār }~ r_{{34, 112}, {409, 23}}e\fgh`i^j]klmnorhTvwx!ρ|_5Actualizar el CLIPBOARD cuando cambie el portapapelesJ PQtu Ār  r_{{34, 87}, {529, 23}}e\fgh`i^j]klmnorTvwx!ρoOActualizar el PRIMARY (clic con el botn central) cuando cambie el portapapelesJ PQ Ār  r_{{34, 62}, {495, 18}}e\fgh`i^j]klmnorTvwx!ρ_HActualizar el portapapeles de inmediato cuando se seleccione texto nuevoJ PQ Ār  r_{{34, 175}, {409, 23}}e\fgh`i^j]klmnorTvwx!ρ_5Actualizar el portapapeles cuando cambie el CLIPBOARDJ P ǁr  r#@~_{{48, 141}, {485, 28}}\]^_`n  ogDesactive esta opcin si desea usar xclipboard, klipper o cualquier otro gestor de portapapeles de X11.J P ǁr  r_{{48, 30}, {485, 28}}\]^_`n  otA causa de las limitaciones del protocolo de X11, puede que esta opcin no funcione siempre en algunas aplicaciones._{{10, 33}, {573, 279}}\PortapapelesN _ˁ@a1FLlʁ&,)JNP  N ˀ  #@8_{{26, 206}, {523, 31}}\]^_`n   oCuando est activada, al hacer clic en una ventana inactiva, la ventana se activa y adems el clic del ratn se transmite a ella.JNP  N ˀ  _{{26, 162}, {523, 14}}\]^_`n ,  __El punto de enfoque de la ventana de X11 sigue el cursor. Esto conlleva algunos inconvenientes.JNP 8 9N ˀ  _{{26, 90}, {523, 42}}\]^_`n E  oCuando est activada, al crear una nueva ventana de X11 el archivo X11.app se sita en primer plano (por encima de Finder.app, Terminal.app, etc.)_{{10, 33}, {573, 279}}XVentanas' M_@ 1 Q  T U V)J'P a b'  _{{36, 195}, {501, 42}}\]^_`n TW n  oAl iniciar X11 se crearn unas claves de control de acceso Xauthority. Si la direccin IP del sistema cambia, estas claves dejarn de ser vlidas, lo que impedira que pudiesen ejecutarse las aplicaciones X11.J'P { |'  _{{36, 104}, {501, 56}}\]^_`n UW   oSi esta opcin est activada, la opcin Autenticar conexiones  tambin debe estarlo para garantizar la seguridad del sistema. Si est desactivada, las conexiones de aplicaciones remotas no estn permitidas.J'P  '   #@y_{{17, 17}, {404, 14}}\]^_`n VW   o@Estas opciones sern efectivas la prxima vez que se inicie X11._{{10, 33}, {573, 279}}YSeguridad+, YNSTabView /Z{619, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard> GĀ[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D @Ҁ_toggle_fullscreen_item? 4Ԁ^x11_about_item  t ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  g ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F " D߁Uhide:J ( LZterminate:G . G_hideOtherApplications:H 4 I_unhideAllApplications: 9 ]Ucopy: ? d ]close_window: E j \zoom_window: I K  J N O*PQ  W X*_NSHuggingPriority   ^ c gY 6K_{{340, 191}, {110, 32}}e\fgh`^j]klmn j m I o pwv@ !ҀXDuplicar_apps_table_duplicate: v x  J N O*PQ   *  _{{340, 159}, {110, 32}}e\fgh`^j]klmn j m v pwv!ҀXEliminar_apps_table_delete: V _apps_table_show:  J N O*PQ   *  _{{340, 223}, {110, 32}}e\fgh`^j]klm j m pwv!ҀkAadir tem_apps_table_new:  ^prefs_changed:  ^prefs_changed:> G ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:{ { Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:I  _enable_fullscreen_changed:D @ _toggle_fullscreen:F  ʀ ^prefs_changed:L & ^prefs_changed:l  , ^prefs_changed:  t  ^prefs_changed:  | "^prefs_changed: #  $^prefs_changed: )  &^prefs_changed: /  (^prefs_changed:i 5  *^prefs_changed: ; 2 ,^prefs_changed: A R .^prefs_changed:1 E ޯ F'2?@ABkCDEFGHIJ()*  +o{&,8H>.mIUiu *D\uNFT LX lx 9' , T b U | V * I X v BQCD(2 0-02469:@\"D!HJLGO4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication *    34MN L5<! _{{302, 440}, {454, 271}}oMen de aplicaciones X11Z{320, 240}1 I v 􀊁)1 (2>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ԁ)_{{1, 1}, {301, 28}}  P  ! $ $_NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+, + ,ZNSScroller +A/  P  7 $ $A C@@_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 A ޡ BFI E F G H I J K   N_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, Q R_NSPanGestureRecognizer S T/_NSPanGestureRecognizer_NSGestureRecognizer+, V/+, X Y\NSScrollView X/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 _ ޯ'2222B22222222()*        +o,>Ii        NFNNLNNlN' '' T' U' V * I* v*BCD* -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\!JG42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 ޯ F'2?@ABkCDEFGHIJ()*  +o{&,8H>.mIUiu *D\uNFT LX lx 9' , T b U | V * I X v BQCD(2 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"D!HJLGO4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ޯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ޠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~    13579;=Xapw2468:<>@BDHY[]_aj>@BCEGHJLy{}$&+-/135\^ <>@BDFHU~  !.024AJOQSU~ &(*,;DGIKlnprtvx   .02468:ACdfhjlnpz|  &(IKPRTVXZJLNPRTVXZ\boqsu~.;P[w0<Uv"<HUak  "+468ABC  &Wc{|~#*6_acdfhjln-9P]oqtvy{      E R ] j u !!!!#!/!8@8a8c8e8g8i8k8888888888888999999999!909A9J9M9O9Q9f9h9j9l9n9999999999999:: ::::%:0:::E:Z:\:^:`:b:d:::::::::::::::::;; ; ; ;;;;;;2;q;;;;;;;<<< <<<<<<<<<M>_>m>>>>>>>>>>>>>>>>>>>>>?&?.?0?2?4?6?8?:??K?M?O?Q?`?t???????????????????@@@@@@@@!@#@%@+@X@Z@\@^@`@b@d@f@h@j@s@|@@@@@@@@@@@@@AAAAAA!A#A-ABADAFAHAJALAdAyA{A}AAAAAAAAAAAAAAAAAABBB"B#B&B)B+B-B/BHBBBBBBBBBBBBBBBBC3C5C6C7C9C;C=C>C@CBCDCECGCHCICbCCCCCCCCCCCCCDDDD`DbDcDdDfDhDjDkDnDqDsDtDvDwDxDDDDDDDDDEsEEEEEEEFF0FXFtFwFyFzF{F}FFFFFFFFFFFFFFFFFFFFFGGGGGH HHHHH"H+H7HBH`HuHwHyH|HHHHHHHHHHHHHHHHHHI.I/I2I5I8I;I>I@ICIEIGI`IIIIIIIIIIIIIIIIIIJ4J6J8J:J=J@JBJDJmJJJJJJJJJJKKKKKK K KKKKKK-KlKnKpKrKuKxKzK|KKKKKKKKL0L2L3L4L7L9L;Lg?gBgCgDg]gggggggggh?hAhBhChFhHhJhKhNhQhShThWhXhYhqhhhhhhhhiaiiiiiiiiiiiiiiiij-j/j1j3j6j9j;j=jjjjjjjjjjjjjjjjkkUkWkYk[k^kakckeklll l l lllllllll l!l"l+lDlilllnlqltlwlymJmmmmmmmmmmmmmmmmmn nnnnnnoo o-oFoIoLoNoQoToWo`omooorouoxo{o~oooooooooooooopppp p%pJpMpOpRpUpXpZq_qqqqqqqqqqqqqqqqqr r#r%r(r+r.r0rrrrrssssss sssssss-sRsUsWsZs]s`sbtttttttttttttttttuYu\u^u_u`ubuduguhukunupuqusutuuuuuuuuuuuwnwwwwwwwwwwwwwwwwx x3x6x8x;x=x@xCxEyzMzPzRzSzTzVzXz[z\z_zbzdzezgzhzizrzzzzzzzzz{H{a{k{t{~{{{{{{{{|| ||,|.|0|3|6|8|U|j|l|n|q|t|v|||||||||||||||} } }}}}}5}J}L}N}Q}T}V}s}}}}}}}}}}}}}}}}}}}}~~~~ ~"~%~'~@~U~W~Y~[~^~`~o~~~~~~~~~~~~~~~<MOQTWctvx{~!$'->@BEHVgiknq~ "$%()*-VX[\_acehāƁȁ́ЁӁՁׁف uwxy|~"$&),?PSUX[ÃŃƃɃ̃΃σ҃Ӄԃ׃*357:=?AXj{~фԄքل܄&)+.1@QSUX[j{}΅Ѕ҅Յ؅$&(+.K\^`cf{І &7:ADS\‰ĉƉȉʉ̉ΉЉ҉ԉ։؉ډ܉߉ !$&(*,.0247:=@BDGJMPSVY\_behknqtwz}ŠŊȊˊΊъԊ׊ڊ݊ !#1ȋ #%.9;=@BEGPSUWnʍ1CUWYZ[]_adehjlopqt !#%'*+.02567:Slux{~̎5Tqtvx{ڏ(ALU^ÑőǑɑˑ͑ϑёӑՑבّۑݑߑ !$')+-/1357:ADGJMPSVY\_behkmoqsuwy{~ĕǕʕ͕Еӕ֕ؕڕܕߕ !$'*-/13579;=?BEGJMOQSUWY[]_acegikmoqsux{~ÖƖɖ̖ϖҖՖؖۖޖ  #, !$'*-0369ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|ÛśǛɛ˛͛ϛћӛ՛כٛۛݛߛ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579BCENOR[joxorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/Localizable.strings0000644000175000017500000001054414757411105023604 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Seguro que desea salir de X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Las aplicaciones X11 abiertas se cerrarn inmediatamente y perder los cambios no guardados."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Activar modo RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Una aplicacin ha solicitado a X11 que cambie la resolucin de su pantalla. X11 restaurar el estado anterior de la pantalla cuando dicha aplicacin solicite volver al estado anterior. Tambin puede utilizar la combinacin de teclas #%#A para forzar a X11 a volver al estado anterior."; /* No comment provided by engineer. */ "Allow" = "Permitir"; /* No comment provided by engineer. */ "Always Allow" = "Permitir siempre"; /* No comment provided by engineer. */ "Cancel" = "Cancelar"; /* No comment provided by engineer. */ "Mac Help" = "Ayuda Mac"; /* No comment provided by engineer. */ "Quit" = "Salir"; /* No */ "No" = "No"; /* Yes */ "Yes" = "S"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Ya existe un archivo ~/.xinitrc.\n\nLas ventanas mostradas por las aplicaciones de X11 pueden no tener barras de ttulo o tener un aspecto distinto al de las ventanas de aplicaciones nativas.\n\nDesea reubicar el archivo existente y usar el entorno de X11 estndar la prxima vez que abra X11?"; /* window item modifiers */ "window item modifiers" = "comando"; /* Updates menu title & */ "Check for X11 Updates..." = "Buscar actualizaciones de X11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist0000644000175000017500000000061014757411105023201 LprojCompatibleVersion 106.3 LprojLocale es LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/0000755000175000017500000000000014757411136017053 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/main.nib/0000755000175000017500000000000014757411136020546 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib0000644000175000017500000020531614757411105023260 Håll ned alternativ- eller kommandotangenten när du klickar så aktiveras musens mitt- respektive högerknapp. Aktiverar menyalternativet ”Kopiera” och gör det möjligt att synkronisera mellan urklipp i OSX och CLIPBOARD- och PRIMARY-buffertarna i X11. Med det här alternativet kommer ett klick på ett inaktivt fönster både aktivera fönstret och låta musklicket påverka innehållet. När du öppnar X11 skapas Xauthority-nycklar som kontrollerar åtkomst. Om datorns IP-adress ändras blir nycklarna ogiltiga vilket kan förhindra att X11-program öppnas. Om det är aktiverat måste Autentisera anslutningar också vara aktiverat för att säkerställa säkerheten i systemet. Om det är avaktiverat tillåts inte anslutningar från fjärrprogram. xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects.nib0000644000175000017500000013521414757411105023635 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048#$,67<KRSZ[\eopuvyz '()0129:CJKLTUV_fghrswx| =>AG\ijtuyoU  "',-278 =ABHXabwx|}  !09:BCDJYZbcdjyz  +,<DEFL[\defl{|  !23EMNOWXYabcsz{| ./78IJQRabjkz{   % & . / ? @ H I J K Q Y i j r s         % & + , 1 2 7 8 < = B C H I N ` i j t u v {          ! & ' , - 2 3 8 9 > ? D E      ) * + . ? @ A E P Q V X [ \ ] ^ _  q k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMeny1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "WProgramP^submenuAction: $)1%&(#   #!'hAnpassa &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,} !"VNSName).-|XMainMenu1%&'()*/PV]u(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4VOm X111WX176oInstllningar...Q,11  1jjl1!;;:"hTjnsterrst)=<>hTjnster1w(__NSServicesMenu11  11BAoVxla helskrmslgeQa11  1UNSTag1F*EgGm X11Qh11FHjGm vriga11!JYVisa alla11  11NM[Avsluta X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UZAnpassa...,!XXW"XRedigeraWY)1Z(X\[WKopieraQc   ,!__^"gFnster)a`tgFnster1behjknqr( $%_dceStngQw -._gfXMinimeraQm 7_!iUZooma _   GH_mloBlddra genom fnsterQ< NQR_pooBlddra genom fnster baklngesQ> _   d_!soLgg alla verst^_NSWindowsMenummo,!wwv"eHjlptuxy)eHjlp1yzz(mw!{iX11 Hjlp[_NSMainMenuTmenu S^apps_separator ŀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ĀR@#@#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{302, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE(HIJKLMNOPRSTUVXYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@^#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNamnklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/UWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorU\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`aX]NSControlView_NSPlaceholderString0AYText Cellklnrs#@*PUB1_controlTextColor+,ܤ/+,]NSTableColumn/HIJKLMNOPTUVX #@Y#@D]^_`abcdghXKommandoUK0.33333299]^_`aXʀHIJKLMNOPTUVX #@Q@#@$]^_`abcd  ghXKortkom.[headerColorUB1C1 1]^_`aX_NSDrawsBackground kln#$rs#@()+_controlBackgroundColor./UL0.602715373N0.6666666667 146YgridColor9:UM0.4246723652E0.5 1+,>?[NSTableView>@/YNSControlZapps_tableEF ǀрIMOQRMVNSCellȀ ɀʀ Z\] V_{{15, 245}, {402, 18}}c]defag_h^ijklmpErUtuv_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀoKlicka igenom inaktiva fnsteryz{[NSImageNamèXNSSwitch+,~_NSButtonImageSource~/+,\NSButtonCell/+,XNSButton@/]click_through ZӀ^copy_menu_item ՀIĀր ׀؀ \l V__{{74, 235}, {154, 26}}id]caefj^hUtk _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـklnrs WNSState݀ۀ؀!ހ߀)nFrn bildskrm__popUpItemAction:ZOtherViews1ۀڀ(ۀ!݀j256 frgerۀ!݀YTusentalsۀ!݀ZMiljontals+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton@/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator I%O)*%Ā 2\5 V_{{18, 243}, {402, 18}}c]defag_h^ijklmp?Utuv!̀􀩀_Autentisera anslutningar[enable_authGH IORSĀր _{{18, 182}, {409, 23}}c]defag_h^ijklmpG_Utuv!̀mHelskrmslge_enable_fullscreengh IOrsĀր _{{37, 116}, {409, 23}}c]defag_h^ijklmpgUtuv!̀o-Tillt tkomst till menyraden i helskrmslge_enable_fullscreen_menu  I_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@v`_{{54, 79}, {362, 31}}Z{250, 750}]^_`al @oCMenyraden visas nr musmarkren placeras hgst upp p huvudskrmen.klnors + \controlColor+,[NSTextField@/_enable_fullscreen_menu_text IÒ  \ UV==?_{{18, 124}, {402, 18}}I @A #@w/c]defag_h^ijklmpUtuv!́_$Aktivera tangentmotsvarigheter i X11_enable_keyequivs I%O%Ā  _{{18, 166}, {402, 18}}c]defag_h^ijklmpUtuv!́o)Tillt anslutningar frn ntverksklienterZenable_tcp !IO#$*  _{{18, 243}, {402, 18}}IO45; KL Cc]defag_h^ijklmpAUtuv!́ _Emulera treknappsmus\fake_buttonsIJ #'IMOTUMĀȀ $% _{{15, 184}, {402, 18}}c]defag_h^ijklmpIaUtuv!́#&oFokus fljer mus_focus_follows_mouseij )-IMOtuMĀȀ *+ _{{15, 140}, {402, 18}}c]defag_h^ijklmpiUtuv!́),oFokus p nya fnster_focus_on_new_window /4IO 02 1_{{18, 69}, {402, 18}}I NP Oc]defag_h^ijklmpUtuv!́/3o$Alt-tangenter snder Alt_L och Alt_R_option_sends_alt 6U\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_{{288, 302}, {484, 342}}oX11-instllningarWNSPanelZ{320, 240}\V <1ҁ=(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1(1 ;*CE1/O(_{{36, 89}, {385, 31}}]^_`alXB oyOm de r aktiverade kan tangenter som motsvarar menyraden hamna i konflikt med X11-program som anvnder metamodifieraren.I*+ DF E_{{36, 195}, {385, 42}}I<=C HI #@x]^_`al;XJCG omHll ned alternativ- eller kommandotangenten nr du klickar s aktiveras musens mitt- respektive hgerknapp. _{{36, 149}, {400, 29}}]^_`alXTEJ o\Tillter att ndringar i inmatningsmenyn skriver ver de befintliga X11-tangentkopplingarna._{{18, 182}, {402, 18}}c]defag_h^ijklmp*^Utuv!́MoFlj datorns tangentbordslayout_{{36, 32}, {385, 31}}IOklҀ RS =]^_`alx1 QomNr aktiverad kommer alt-tangenterna att skicka X11-tangentsymboler Alt_L och Alt_R istllet fr Mode_switch._{{18, 8}, {418, 18}}c]defag_h^ijklmpUtuv!́OTo0Rulla alltid i samma riktning som fingerrrelsen_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1Y]n(VNSViewYNSTabView\NSIdentifier \[=ZQ1VIndata+,]NSTabViewItem/ \ցm=^Q21GgՁ`dh(Iր ab #@I_{{17, 238}, {55, 20}}]^_`alX`c gFrger:I݁ր ef #@x@_{{36, 216}, {392, 14}}]^_`alXdg o0Alternativet brjar glla nsta gng X11 ppnas.Iր ij _{{36, 145}, {385, 31}}]^_`alXhk o_Aktiverar X11:s rotfnster. Tryck ned kommando-alt-A fr att vxla till och frn helskrmslge._{{10, 33}, {438, 279}}VUtdata \o=^ \ Vp1quy}(IO'(Āo rs o_{{18, 255}, {409, 23}}c]defag_h^ijklmp4Utuv!́qt_Aktivera synkroniseringIABHo vw o#@x_{{36, 221}, {397, 28}}]^_`alOu xoAktiverar menyalternativet Kopiera  och gr det mjligt att synkronisera mellan urklipp i OSX och CLIPBOARD- och PRIMARY-buffertarna i X11.IOZ[Āo z{ o_{{34, 129}, {409, 23}}c]defag_h^ijklmpgUtuv!́y|o&Uppdatera CLIPBOARD nr urklipp ndrasIOstĀo ~ o_{{34, 104}, {409, 23}}c]defag_h^ijklmpUtuv!́}o2Uppdatera PRIMARY (mellanklick) nr urklipp ndrasIOĀo  o_{{34, 79}, {409, 23}}c]defag_h^ijklmpUtuv!́o+Uppdatera urklipp s snart ny text markerasIOĀo  o_{{34, 192}, {409, 23}}c]defag_h^ijklmpUtuv!́o&Uppdatera urklipp nr CLIPBOARD ndrasIo  o_{{48, 158}, {385, 28}}]^_`al orAvaktivera det hr alternativet om du vill anvnda xclipboard, klipper, eller ngon annan urklippshanterare i X11.I߁o  o#@v_{{48, 47}, {370, 28}}]^_`al ofP grund av begrnsningar i X11-protokollet kanske det hr alternativet inte fungerar i vissa program._{{10, 33}, {438, 279}}WUrklippM \ȁ=^1EIiǁ#)(IM  MȀ  _{{23, 208}, {385, 31}}]^_`alX  oMed det hr alternativet kommer ett klick p ett inaktivt fnster bde aktivera fnstret och lta musklicket pverka innehllet.IM  MȀ  _{{23, 161}, {385, 17}}]^_`alX + o@Fnsterfokus i X11 fljer pekaren. Det hr har ngra bieffekter.IM 8 9MȀ  _{{23, 106}, {385, 28}}]^_`alX E o|Med det hr alternativet kommer skapandet av ett nytt X11-fnster att lgga X11 verst (istllet fr Finder, Terminal, etc.)_{{10, 33}, {438, 279}}gFnster% N\= 1 R U V W(I% b c%  _{{36, 195}, {385, 42}}]^_`al UX o oNr du ppnar X11 skapas Xauthority-nycklar som kontrollerar tkomst. Om datorns IP-adress ndras blir nycklarna ogiltiga vilket kan frhindra att X11-program ppnas.I% | }%  _{{36, 118}, {385, 42}}]^_`al VX  oOm det r aktiverat mste Autentisera anslutningar ocks vara aktiverat fr att skerstlla skerheten i systemet. Om det r avaktiverat tillts inte anslutningar frn fjrrprogram.I%  %   #@y_{{17, 17}, {404, 14}}]^_`al WX  o0Alternativen brjar glla nsta gng X11 ppnas._{{10, 33}, {438, 279}}hSkerhet+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard* [sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2C @π_toggle_fullscreen_item>  3р^x11_about_item  r Ӂ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  e ց_minimize_window:>  3؁_orderFrontStandardAboutPanel:?  5 ځ[prefs_show:E # D܁Uhide:I ) LށZterminate:F / G_hideOtherApplications:G 5 I_unhideAllApplications: : ZUcopy: @ b ]close_window: F h \zoom_window: J L  I O P+O  X Y+_NSHuggingPriority   \ d hV 3H_{{340, 191}, {142, 32}}c]defa_h^ijkl k n J p qut@ !πYDuplicera_apps_table_duplicate: w y  I O P+O   +  _{{340, 159}, {142, 32}}c]defa_h^ijkl k n w qut!πWTa bort_apps_table_delete: T _apps_table_show:  I O P+O   +  _{{340, 223}, {142, 32}}c]defa_h^ijk k n qut!πoLgg till objekt_apps_table_new:  ^prefs_changed:  ^prefs_changed:*  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:z z  Yx11_help: &  _apps_table_show: k \next_window: n _previous_window:G  _enable_fullscreen_changed:C @ _toggle_fullscreen:E  ǀ ^prefs_changed:I # ^prefs_changed:i  ) ^prefs_changed:  q ^prefs_changed:  y ^prefs_changed: $ } !^prefs_changed: *  #^prefs_changed: 0  %^prefs_changed:g 6  '^prefs_changed: < / )^prefs_changed: B O +^prefs_changed:1 F ߯ G&1>?@AjBCDEFGHI'() *mz$;+=*5lGSgs(B[tMER IU iu 9%* U c V } W + J Y w CRDE)3 -,/13589;?@CDGIKLPQSTVXZ]_behjknqruwz 6;=YACFEIL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#%&F& (.]NSApplication +    01JK I29! _{{302, 440}, {496, 271}}_X11 ProgrammenyZ{320, 240}1 J w 񀉁(1 )3;?(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ԁ(_{{1, 1}, {301, 28}}     " % %_NSControlTarget_NSControlAction> <==_{{1, 215}, {301, 15}}\_doScroller:+, , -ZNSScroller ,@/    8 % %> @==_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 B ߡ CCF F G H I J K L   O_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, R S_NSPanGestureRecognizer T U/_NSPanGestureRecognizer_NSGestureRecognizer+, W/+, Y Z\NSScrollView Y/Z{496, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ` ߯&1111A11111111'()        *m;*GgMEMMIMMiM%%% U% V% W + J+ w+CDE+ ,/1111911111111,PQQ,VX,]________,uw6;=YCE1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀉##F1 ߯ G&1>?@AjBCDEFGHI'() *mz$;+=*5lGSgs(B[tMER IU iu 9%* U c V } W + J Y w CRDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~-,/13589;?@CDGIKLPQSTVXZ]_behjknqruwz 6;=YACFEIL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#%& +~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*F1 ߯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ߠF+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x      ? M T h v  * , . 0 2 4 6 > P ] h s u w y    # P Y c l n p r t v x z | ~ !2;JQYbinw "3579;D]_acegikmoqsuw"$&')+,.0]_acegikmo "')+-/1Z\ DFHJLNPZ  %')+49;=?hjlmoqrtv :<>@BDFNP}*,MOQSUWYbd(*KMRTVXZ\&5bdfhjlnprt,ACEGIK+:cp#ESeq8Wq}9;>@BDEGHJKTVXY[]_`achjs|~7BDGHJLOQTVY[]^acep!"%')3<PYmt%1:Obw     * 3 A J S Z \ ^ ` b !!!!!!!!!! !)!+!L!X!b!m!y!!!!!!!!!!!!!!!!!!!"""-"/"1">"F"M"O"Q"S"Z"\"^"`"b"x"""""""## ##&#-#2#?#G#T#`#b#k#s#x#############$ $ $$$$%$*$0$8$:$<$>$@5555666%606B6O6V66666666666666666666667 77777'70797B7P7U7777777777777777777788888 8"8$8&8S8T8V8X8Z8[8]8f8o8q88888888888888888899/91939596989:9<9>9O9X9[9]9_9t9v9x9z9|999999999999::::::':3:>:H:S:h:j:l:n:p:r::::::::::::::::;;;;;;;!;#;%;>;};;;;;;;<<<<<<< <"<$<&<)<+<->a>s>>>>>>>>>>>>>>>>>>???? ?:?B?D?F?H?J?L?N?P?R?_?a?c?e????????????????????@@>@@@B@D@F@H@J@L@N@P@Z@@@@@@@@@@@@@@@@@AAAAA A"A$A&A5AJALANAPARATA^AsAuAwAyA{A}AAAAAAABBBBBBBBBBB B!B#B$B%BNBPBSBTBWBZB\B^B`ByBBBBBBBBBBCCCCC C CgCiCjCkCmCoCqCrCtCvCxCyC{C|C}CCCCCCCCCCDD'D)D+D-D0D2DDDDDDDDDDDDDDDDDDDEEEEE EgEEEEEEEFF$FLFhFkFmFnFoFqFsFvFwFzF}FFFFFFFFFFFFFFFFGsGGGGGGGGGGGGGGH H H HHHHtHvHwHxH{H}HHHHHHHHHHHHHHHHHHHHHHI_IbIdIeIfIiIkInIoIrIuIwIxI{I|I}IIIIIIIIIIIJJ'J)J+J.J1J3JJJJJJJJJJJJJJJJJKKKKK K KKcKnKKKKKKKKKKKKKKKLLLLLLL L$LLLLLLLLLLLLLLLLLLLLLLLLMMM(M*M,M/M2M4MMMMMMMMMMMMMMMMMNNNNN N NN2NHN]N_NaNdNgNiNNNNNNNNNNNNNNNNO4O6O8O:O=O@OBODOoOOOOOOOPPPP P PPPPPPPPPPP"P:PPPPPPPPPPPPPPPPPQQQ Q QQQQQ`QsQQQQQQQQRRR(R5R?RURlRRRRRRRSSS)S,S.S1S4S7S:S=S>SASDSGSJSMSRSUSWSYStSSSSSSSSSSSSSSSSTCT[TjTqTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTUU8U;U=U@UBUEUHUJV?VVVVVVVVVVVVVVVVVVWOWRWTWUWVWYW[W^W_WbWeWgWhWkWlWmWvWyWWWWWWWWXXXXXXXXXXYYYYYYZZZZZIZaZZZZZZZZZZZZZZZZ[[[[ [ [[[\\E\G\I\K\N\Q\S\U\\\\\]]]]]]]]]8]?]I]V]Y]\]_]b]e]h]j]q]z]]]]]]]]]]]]]]]]]]]]^L^O^Q^R^S^U^W^Z^[^^^a^c^d^f^g^h^q^^^^^^^^^^_9_<_>_?_@_B_D_G_H_K_N_P_Q_S_T_U_^_w________``|````````````````````````aaaaaaaaaab!b#b&b'b*b-b/b1b3b|M|^|`|b|e|h|z|||||||||||||||}}+}-}/}2}5}A}R}T}V}Y}\}b}s}u}w}z}}}}}}}}}}}}}}}}}~~~ ~~~ ~#~&~4~E~G~I~L~O~\~m~p~r~u~x~~~~~~~~~~~ 469:=?ACF`TVWX[]_`cfhilmnqĀƀȀˀ΀ЀҀڀ .1369ςBTehjmpÂƂՂ*;=?BETegiloyƒσ5FHJMPevxz}˄΄Єӄք!$&),;LOQTWfwz|ͅυхԅׅ"%'*-ADaތ7:<>A^gč͍ڍ$WY[]_acegikmoqsuwy{}ÏƏɏ̏ϏҏՏ؏ۏޏ  #&),/258;>ADGJMPSUWY\^acfhkmpsvxz|ĐƐȐʐ͐֒’ĒƒȒʒ̒ΒВҒԒ֒ؒڒܒޒ !$'*-02468:<>@CFILNPRTWZ]`cfilorux{~“ēƓɓ̓ϓғՓؓۓޓ  "$&(*,.02468;>ADGJMPSVY\_behknqtwz}”ŔȔ˔ΔєԔהڔݔÖƖɖ̖ϖҖՖؖۖޖ  #&),/258;>ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|Ęǘʘ͘ИӘ֘٘ܘߘ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~šĚƚȚʚ̚ΚКҚԚؚ֚ښܚޚ-2xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013516314757411105024357 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata1 %)*048#$,67<KRSZ[\eopuvyz '()0129:CJKLTUV_fghrswx|  ;<?EZghrswmS   %*+056 ;?@FW`avw{|   /89ABCIXYabcixy  *+;CDEKZ[cdekz{  12DLMNVWX`abryz{ -.67HIPQ`aijyz   $ % - . > ? G H I J P X h i q r          $ % * + 0 1 6 7 ; < A B G H M _ h i s t u z           % & + , 1 2 7 8 = > C D     ( ) * - > ? @ D O P U W Z [ \ ] ^ M p j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysNL,//.0M&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ +~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*(XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector *WNSTitle[NSMenuItems)TMeny1(]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "WProgramP^submenuAction: $)1%&(#   #!'hAnpassa &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu ,} !"VNSName).-|XMainMenu1%&'()*/PV]u(113,!110"SX1193;)20O1=>?@ABCDEFGHI3589?@CDGIKL(1P1!4VOm X111WX176oInstllningar...Q,11  1jjl1!;;:"hTjnsterrst)=<>hTjnster1w(__NSServicesMenu11  11BAoVxla helskrmslgeQa11  1UNSTag1F*EgGm X11Qh11FHjGm vriga11!JYVisa alla11  11NM[Avsluta X11Qq\_NSAppleMenu,!QQ " R)1ՀST(Q  Q!UZAnpassa...,!XXW"XRedigeraWY)1Z(X\[WKopieraQc   ,!__^"gFnster)a`tgFnster1behjknqr( $%_dceStngQw -._gfXMinimeraQm 7_!iUZooma _   GH_mloBlddra genom fnsterQ< NQR_pooBlddra genom fnster baklngesQ> _   d_!soLgg alla verst^_NSWindowsMenummo,!wwv"eHjlptuxy)eHjlp1yzz(mw!{iX11 Hjlp[_NSMainMenuTmenu S^apps_separator ŀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ĀR #@#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews7 68 5Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  :8 9Y{301, 17}+, _NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%')+,-/123)78:]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification;2G#@#? ?BAOA A AA#?4_{{302, 1}, {16, 28}}+,=>]_NSCornerView=/1@ABC(FGHIJKLMNPQRSTVWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@[#@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@TNamnijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/SWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorS\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_V]NSControlView_NSPlaceholderString0AYText Cellijlpq#@*PSB1_controlTextColor+,ڤ/+,]NSTableColumn/FGHIJKLMNRSTV #@U#@D[\]^_`abefXKommandoSK0.33333299[\]^_VȀFGHIJKLMNRSTV #@L@#@$[\]^_`abefXKortkom. [headerColorSB1C1 1[\]^_V_NSDrawsBackground ijl!"pq#@(')_controlBackgroundColor,-SL0.602715373N0.6666666667 124YgridColor78SM0.4246723652E0.5 1+,<=[NSTableView<>/YNSControlZapps_tableCD ǀрGKMNPQKVNSCellȀ ɀʀ Y[\ V_{{15, 245}, {402, 18}}b[cde_f]g\hijkloCqSstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !̀ǀˀoKlicka igenom inaktiva fnsterxyz[NSImageNamèXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton>/]click_through ZӀ^copy_menu_item ՀGMÀր ׀؀ [l V__{{74, 235}, {154, 26}}hc[b_dei\gSsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionՀ@ @@ !ـijlpq WNSState݀ۀ؀!ހ߀)nFrn bildskrm__popUpItemAction:ZOtherViews1ڀڀ(ۀ!݀j256 frgerۀ!݀YTusentalsۀ!݀ZMiljontals+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton>/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator G$MN()$À 1[4 V_{{18, 243}, {402, 18}}b[cde_f]g\hijklo>Sstu!̀􀩀_Autentisera anslutningar[enable_authFG GMNQRÀր _{{18, 182}, {409, 23}}b[cde_f]g\hijkloF^Sstu!̀mHelskrmslge_enable_fullscreenfg GMNqrÀր _{{37, 116}, {409, 23}}b[cde_f]g\hijklof~Sstu!̀o-Tillt tkomst till menyraden i helskrmslge_enable_fullscreen_menu  GM_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthր  #@v`_{{54, 79}, {362, 31}}Z{250, 750}[\]^_k @oCMenyraden visas nr musmarkren placeras hgst upp p huvudskrmen.ijlmpq ) \controlColor+,[NSTextField>/_enable_fullscreen_menu_text GMNˀ  [ UV==?_{{18, 124}, {402, 18}}GM @A #@w/b[cde_f]g\hijkloSstu!́_$Aktivera tangentmotsvarigheter i X11_enable_keyequivs G$MN$À  _{{18, 166}, {402, 18}}b[cde_f]g\hijkloSstu!́o)Tillt anslutningar frn ntverksklienterZenable_tcp !GMN"#)  _{{18, 243}, {402, 18}}GMN34: KL Cb[cde_f]g\hijklo@Sstu!́ _Emulera treknappsmus\fake_buttonsHI #'GKMNSTKÀȀ $% _{{15, 184}, {402, 18}}b[cde_f]g\hijkloH`Sstu!́#&oFokus fljer mus_focus_follows_mousehi )-GKMNstKÀȀ *+ _{{15, 140}, {402, 18}}b[cde_f]g\hijklohSstu!́),oFokus p nya fnster_focus_on_new_window /4GMN 02 1_{{18, 69}, {402, 18}}GM NP Ob[cde_f]g\hijkloSstu!́/3o$Alt-tangenter snder Alt_L och Alt_R_option_sends_alt 6S\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask78; :@x9!_{{288, 302}, {484, 342}}oX11-instllningarWNSPanelZ{320, 240}[V <1с=(_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabelsYX W;; > 1(1 :)CE1/O(_{{36, 89}, {385, 31}}[\]^_kVB oyOm de r aktiverade kan tangenter som motsvarar menyraden hamna i konflikt med X11-program som anvnder metamodifieraren.GM)* DF E_{{36, 195}, {385, 42}}GM;<B HI #@x[\]^_k:VICG omHll ned alternativ- eller kommandotangenten nr du klickar s aktiveras musens mitt- respektive hgerknapp. _{{36, 149}, {400, 29}}[\]^_kVSEJ o\Tillter att ndringar i inmatningsmenyn skriver ver de befintliga X11-tangentkopplingarna._{{18, 182}, {402, 18}}b[cde_f]g\hijklo)]Sstu!́MoFlj datorns tangentbordslayout_{{36, 32}, {385, 31}}GMNjkр RS =[\]^_kw1 QomNr aktiverad kommer alt-tangenterna att skicka X11-tangentsymboler Alt_L och Alt_R istllet fr Mode_switch._{{18, 8}, {418, 18}}b[cde_f]g\hijkloSstu!́OTo0Rulla alltid i samma riktning som fingerrrelsen_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1Y]n(VNSViewYNSTabView\NSIdentifier \[=ZQ1VIndata+,]NSTabViewItem/ \ցm=^Q21FfՁ`dh(GMր ab #@I_{{17, 238}, {55, 20}}[\]^_kV`c gFrger:GM܁ր ef #@x@_{{36, 216}, {392, 14}}[\]^_kVdg o0Alternativet brjar glla nsta gng X11 ppnas.GMր ij _{{36, 145}, {385, 31}}[\]^_kVhk o_Aktiverar X11:s rotfnster. Tryck ned kommando-alt-A fr att vxla till och frn helskrmslge._{{10, 33}, {438, 279}}VUtdata \o=^ [ Vp1quy}(GMN&'Ào rs o_{{18, 255}, {409, 23}}b[cde_f]g\hijklo3Sstu!́qt_Aktivera synkroniseringGM@AGo vw o#@x_{{36, 221}, {397, 28}}[\]^_kNu xoAktiverar menyalternativet Kopiera  och gr det mjligt att synkronisera mellan urklipp i OSX och CLIPBOARD- och PRIMARY-buffertarna i X11.GMNYZÀo z{ o_{{34, 129}, {409, 23}}b[cde_f]g\hijklofSstu!́y|o&Uppdatera CLIPBOARD nr urklipp ndrasGMNrsÀo ~ o_{{34, 104}, {409, 23}}b[cde_f]g\hijkloSstu!́}o2Uppdatera PRIMARY (mellanklick) nr urklipp ndrasGMNÀo  o_{{34, 79}, {409, 23}}b[cde_f]g\hijkloSstu!́o+Uppdatera urklipp s snart ny text markerasGMNÀo  o_{{34, 192}, {409, 23}}b[cde_f]g\hijkloSstu!́o&Uppdatera urklipp nr CLIPBOARD ndrasGMo  o_{{48, 158}, {385, 28}}[\]^_k orAvaktivera det hr alternativet om du vill anvnda xclipboard, klipper, eller ngon annan urklippshanterare i X11.GMށo  o#@v_{{48, 47}, {370, 28}}[\]^_k ofP grund av begrnsningar i X11-protokollet kanske det hr alternativet inte fungerar i vissa program._{{10, 33}, {438, 279}}WUrklippK \ȁ=^1CHhǁ#)(GKM  KȀ  _{{23, 208}, {385, 31}}[\]^_kV  oMed det hr alternativet kommer ett klick p ett inaktivt fnster bde aktivera fnstret och lta musklicket pverka innehllet.GKM  KȀ  _{{23, 161}, {385, 17}}[\]^_kV * o@Fnsterfokus i X11 fljer pekaren. Det hr har ngra bieffekter.GKM 7 8KȀ  _{{23, 106}, {385, 28}}[\]^_kV D o|Med det hr alternativet kommer skapandet av ett nytt X11-fnster att lgga X11 verst (istllet fr Finder, Terminal, etc.)_{{10, 33}, {438, 279}}gFnster$ M\= 1 Q T U V(G$M a b$  _{{36, 195}, {385, 42}}[\]^_k TV n oNr du ppnar X11 skapas Xauthority-nycklar som kontrollerar tkomst. Om datorns IP-adress ndras blir nycklarna ogiltiga vilket kan frhindra att X11-program ppnas.G$M { |$  _{{36, 118}, {385, 42}}[\]^_k UV  oOm det r aktiverat mste Autentisera anslutningar ocks vara aktiverat fr att skerstlla skerheten i systemet. Om det r avaktiverat tillts inte anslutningar frn fjrrprogram.G$M  $   #@y_{{17, 17}, {404, 14}}[\]^_k VV  o0Alternativen brjar glla nsta gng X11 ppnas._{{10, 33}, {438, 279}}hSkerhet+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel O_scroll_in_device_direction _sync_clipboard_to_pasteboard) [sync_keymap qÀ_sync_pasteboard yŀ_sync_pasteboard_to_clipboard }ǀ_sync_pasteboard_to_primary ɀ_sync_primary_immediately ˀZsync_text1 ̀Zsync_text2C @π_toggle_fullscreen_item> 3р^x11_about_item  r Ӂ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  e ց_minimize_window:>  3؁_orderFrontStandardAboutPanel:?  5 ځ[prefs_show:E " D܁Uhide:I ( LށZterminate:F . G_hideOtherApplications:G 4 I_unhideAllApplications: 9 ZUcopy: ? b ]close_window: E h \zoom_window: I K  G N O)MN  W X)_NSHuggingPriority   [ c gV 3H_{{340, 191}, {142, 32}}b[cde_]g\hijk j m I o pts@ !πYDuplicera_apps_table_duplicate: v x  G N O)MN   )  _{{340, 159}, {142, 32}}b[cde_]g\hijk j m v pts!πWTa bort_apps_table_delete: T _apps_table_show:  G N O)MN   )  _{{340, 223}, {142, 32}}b[cde_]g\hij j m pts!πoLgg till objekt_apps_table_new:  ^prefs_changed:  ^prefs_changed:)  ^prefs_changed:  ^prefs_changed:  ^prefs_changed: Հ  ^prefs_changed:z z  Yx11_help: &  _apps_table_show: k \next_window: n _previous_window:F  _enable_fullscreen_changed:C @ _toggle_fullscreen:C  ǀ ^prefs_changed:H # ^prefs_changed:h  ) ^prefs_changed:  q ^prefs_changed:  y ^prefs_changed: # } !^prefs_changed: )  #^prefs_changed: /  %^prefs_changed:f 5  '^prefs_changed: ; / )^prefs_changed: A O +^prefs_changed:1 E ޯ F&1>?@AjBCDEFGHI'() *mz#:*<)4kFRfr'AZsKCQ HT ht 8$) T b U | V ) I X v APBC'1 -,/13589;?@CDGIKLPQSTVXZ]_behjknqruwz 6;=YACFEIL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#%&F& (.]NSApplication )    01JK I29! _{{302, 440}, {496, 271}}_X11 ProgrammenyZ{320, 240}1 I v 񀉁(1 '1;?(1 (_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 Ӏ(_{{1, 1}, {301, 28}}  M  ! $ $_NSControlTarget_NSControlAction> <==_{{1, 215}, {301, 15}}\_doScroller:+, + ,ZNSScroller +>/  M  7 $ $> @==_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 A ޡ BCF E F G H I J K   N_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionED__panWithGestureRecognizer:+, Q R_NSPanGestureRecognizer S T/_NSPanGestureRecognizer_NSGestureRecognizer+, V/+, X Y\NSScrollView X/Z{496, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 _ ޯ&1111A11111111'()        *m:)FfKCKKHKKhK$$$ T$ U$ V ) I) v)ABC) ,/1111911111111,PQQ,VX,]________,uw6;=YCE1/O=]րՀ؀ۀۀۀۀց`ցdրրցhց=noqouoyo}oooo=Ȁǀȁȁ#ȁȁ)ȁ=/뀉##F1 ޯ F&1>?@AjBCDEFGHI'() *mz#:*<)4kFRfr'AZsKCQ HT ht 8$) T b U | V ) I X v APBC'1 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~-,/13589;?@CDGIKLPQSTVXZ]_behjknqruwz 6;=YACFEIL1P/2OS]րՀ؀ۀڀ`bdfhjnoqsuwy{}Ȁǀʁ#%)+/󀉀;?#%& +~ƀҀԀ "(.5āƁȁʁ́΁ЁҁՁׁفہ݁߁   "$&(*F1 ޯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~OPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-F     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1(1 ޠF+,^NSIBObjectData/",1:?QZw")7DVd )4=LQZcnoqz . 0 2 4 6 8 : < > @ B D F H J M P S V Y \ _ b e h k n q t w z }  # + S U W Y [ ] f h j x      ? M T h v  * , . 0 2 4 6 > P ] h s u w y    # P Y c l n p r t v x z | ~ !2;JQYbinw "3579;D]_acegikmoqsuw"$&')+,.0]_acegikmo "')+-/1Z\ DFHJLNPZ  %')+49;=?hjlmoqrtv :<>@BDFNP}*,MOQSUWYbd(*KMRTVXZ\&5bdfhjlnprt,ACEGIK'6_lAOam4Smy"$')+-.0134=?ABDFHIJLQS\egirst)+./1368;=@BDEHJLW  #7@T[g !6I^j   ( 1 : A C E G I v !!!!3!?!I!T!`!m!r!t!v!x!z!|!!!!!!!!!!!!!!""""%"-"4"6"8":"A"C"E"G"I"_"z""""""""## ###&#.#;#G#I#R#Z#_#t#################$ $$$$!$#$%$'5555556 66)666=6f6t6666666666666666666666666777 7)777<7i7j7l7n7p7q7s7|777777777777788888 8 8 8:8;8=8?8A8B8D8M8V8X8y8{8}88888888888888899999999!9#9%969?9B9D9F9[9]9_9a9c9|9999999999999::::::%:/:::O:Q:S:U:W:Y:::::::::::::::::::;;;;; ; ;;';f;{;;;;;;;;;<<<< < < <<<<J>\>j>>>>>>>>>>>>>>>>>>>>>?#?+?-?/?1?3?5?7?9?;?H?J?L?N?k????????????????????@'@)@+@-@/@1@3@5@7@9@C@p@r@t@v@x@z@|@~@@@@@@@@@@@AAA A A AAA3A5A7A9A;A=AGA\A^A`AbAdAfA~AAAAAAAAAAABBBBBB B B B BB7B9BRURrRRRRRRRRSSSSSS S#S&S'S*S-S0S3S6S;S>S@SBS]SSSSSSSSSSSSSSSST,TDTSTZTsTvTyTzT}TTTTTTTTTTTTTTTTTTTTTTTTTTTTU!U$U&U)U+U.U1U3V(VVVVVVVVVVVVVVVVVVW8W;W=W>W?WBWDWGWHWKWNWPWQWTWUWVW_WbWWWWWWWWXzXXXXXXXXXYYYYYYYYYYZ2ZJZZZZZZZZZZZZZZZZZZZZZZZ[[\.\0\2\4\7\:\<\>\\\\\\\\\]]]]]!](]2]?]B]E]H]K]N]Q]S]Z]c]q]v]]]]]]]]]]]]]]]]]]^5^8^:^;^<^>^@^C^D^G^J^L^M^O^P^Q^Z^r^^^^^^^^^_"_%_'_(_)_+_-_0_1_4_7_9_:_<_=_>_G_`_________`e`h`j`k`l`n`p`s`t`w`z`|`}````````````aaaaaaaaaab b bbbbbbbb%b6b9beeeeeeeeeeeeeeeef f fffffffjffffffffffffffffg7g9g;g=g@gCgEgGgh h h h hhhhhhhhh!h"h#h;hzh|h~hhhhhhi>i@iAiBiEiGiIiJiMiPiRiSiViWiXiqiiiiiiiijjvjyj{j|j}jjjjjjjjjjjjjjjjjjjkl0l3l5l6l7l:lADGJMPSVY\_acehknqtwz}ˆĈƈȈˈΈЈӈֈ؈ڈ܈ވPSUX[^adehknqtwy{}ljʉ͉ω҉ԉ݉6?JS\_acy  #;HQ\gʋ̋΋ϋЋҋԋ֋ًڋ݋ߋ$'*-J{nj #%'*GPipÍ̍׍ @BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ďǏʏ͏Џӏ֏؏ڏ܏ޏ !$'*-0369<>@BEGJLOQTVY\_acehjmortwy|ÒŒǒɒ˒͒ϒђԒגڒݒ !#%'),/2579;=@CFILORUX[^adgjmpsvy|ēǓʓ͓Гӓ֓ٓۓݓߓ !$'*-0369ADGJMPSVY\_behknqtwz}˜ŘȘ˘ΘјԘטژݘ "%(+.147:=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÙřǙə˙͙ϙљәՙיٙۙݙߙ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÚŚǚɚ˚͚ϚњӚ՚ךٚۚݚߚxorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/Localizable.strings0000644000175000017500000001037414757411105022630 /* Dialog title when quitting */ "Do you really want to quit X11?" = "r du sker p att du vill avsluta X11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "Alla ppna X11-program kommer att stoppas gonblickligen och alla osparade ndringar frloras."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Aktivera RandR-lge?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Ett program har begrt att X11 ndrar skrmupplsningen. X11 kommer att terstlla skrmen till sitt fregende lge nr detta program begr att det ska terstllas. Du kan ven tvinga X11 att terstlla sitt fregende lge genom att trycka tangentkombinationen #%#A."; /* No comment provided by engineer. */ "Allow" = "Tillt"; /* No comment provided by engineer. */ "Always Allow" = "Tillt alltid"; /* No comment provided by engineer. */ "Cancel" = "Avbryt"; /* No comment provided by engineer. */ "Mac Help" = "Mac Hjlp"; /* No comment provided by engineer. */ "Quit" = "Avsluta"; /* No */ "No" = "Nej"; /* Yes */ "Yes" = "Ja"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "Du har en befintlig ~/.xinitrc-fil.\n\nFnster som visas av X11-program kan sakna namnlist, eller kan se annorlunda ut n vanliga OS X-program.\n\nVill du bortse frn den ursprungliga filen och anvnda den vanliga X11-miljn nsta gng du startar X11?"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "Leta efter X11-uppdateringar..."; xorg-server-21.1.16/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist0000644000175000017500000000061014757411105022224 LprojCompatibleVersion 106.3 LprojLocale sv LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/th.lproj/0000755000175000017500000000000014757411136017036 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/th.lproj/main.nib/0000755000175000017500000000000014757411136020531 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/th.lproj/main.nib/designable.nib0000644000175000017500000021467314757411105023251 กดปุ่ม Option หรือ Command ค้างไว้ในขณะที่คลิกเพื่อเปิดใช้งานปุ่มเมาส์ขวาหรือปุ่มกลาง เมื่อเปิดใช้งานแล้ว การสร้างหน้าต่าง X11 ใหม่จะส่งผลให้แอปพลิเคชัน X11 ย้ายไปที่พื้นหน้า (แทนที่แอปพลิเคชัน Finder แอปพลิเคชัน Terminal เป็นต้น) การเริ่ม X11 จะสร้างปุ่มควบคุมการเข้าถึง Xauthority ถ้าที่อยู่ IP ของระบบเปลี่ยนแปลง ปุ่มเหล่านี้จะใช้ไม่ได้ซึ่งอาจทำให้เริ่มแอปพลิเคชัน X11 ไม่ได้ เมื่อเปิดใช้งานแล้ว ต้องเปิดใช้งานการรับรองความถูกต้องการเชื่อมต่อด้วยเพื่อให้แน่ใจเรื่องความปลอดภับของระบบ เมื่อปิดใช้งานแล้ว จะไม่อนุญาตให้มีการเชื่อมต่อจากแอปพลิเคชันระยะไกล xorg-server-21.1.16/hw/xquartz/bundle/Resources/th.lproj/main.nib/keyedobjects.nib0000644000175000017500000013466514757411105023631 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  $)*/45 :>?EU^_tuyz}  -67?@AGVW_`agvw()9ABCIXYabcixy./@GHIPQRZ[\lstu}~ $%-.>?FGVW_`opxy     ! " 2 3 : ; < = C K [ \ c d t u | }          ! & ' + , 1 2 7 8 = O X Y c d e j z {         ! " ' ( - . 3 4       . / 0 4 ? @ E G J K L M N  ` h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d@!91)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "kA-%4@ 1P^submenuAction:$%*kA-%4@ 11&')#   #!(i3+@- &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.h@!9+%11&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5m@5H"'1 X112XY287m2#1IH2...Q,22  2kkm2!<<;"f#42#stu*>=?f#42#1x)__NSServicesMenu22  22CBo*%1@GA@G!+I2-Qa22  2UNSTag2G*Fh H- X11Qh22GIi H--7HF22!KkA*1I+!22  22ONj--2 X11Qq\_NSAppleMenu-!SSR"kA-%4@ 1TU*kA-%4@ 11؀VW)S  S!Xk3+@-...-![[Z"eAID\]*eAID1^)[`_f1%-Qc  -!ccb"h+I2H2*edxh+I2H21 !"filnoruv) ()chgc4Qw 12ckjj"H-@%G*8Qm ;c!mc 9! c   KLcqpl'9+I2H2Q` RUVctso'%1H2+I2H2Q~ c   hc!wo31I+!!2D'II2+I2^_NSWindowsMenuqqs-!{{z"g'45C Ixy|}*g'45C I1}~~)q{!k'45C I X11[_NSMainMenuTmenu V^apps_separator ʀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ɀR@#@ŀ#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^nȴ9X#@O]hr!_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@d 7H-mnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView0Ak H-I-'2!mnptu#@*XB1_controlTextColor+,ۤ/+,]NSTableColumn/LMNOPQRSWXY #@X#@D_`abcdefijf3*1HXK0.33333299_`abcʀk H-I-'2!LMNOPQRSWXY #@Q#@$_`abcdefijf2%1 [headerColorXB1C1 1_`abc_NSDrawsBackground €k H-I-'2!mnp !tu#@(&(À_controlBackgroundColor+,XL0.602715373N0.6666666667 113ƀYgridColor67XM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ̀րFJLNOJVNSCell̀ ΀π WYZ [_{{15, 245}, {402, 18}}`_abccdae`fghijmBoXqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo %4H2 Windows 5HD!H!54##!vwx[NSImageNameҀXNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton=/]click_through ^؀^copy_menu_item ڀFȀۀ ܀݀ Yq [d_{{36, 235}, {128, 26}}fa_`cbcg`eXqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހmnptu WNSState݀!*k2-A*%__popUpItemAction:k!8!!--7HF1؀߀)!f256 *5!c1!d%I2+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F"L&'"Ȁ /Y2 [_{{18, 243}, {402, 18}}`_abccdae`fghijm<Xqrs!рo 2##1#-'2!9I-2#@ 7H-!H-[enable_authDE FLOPȀۀ _{{18, 182}, {409, 23}}`_abccdae`fghijmD\Xqrs!рnB+!@G!+I2-_enable_fullscreende FLopȀۀ  _{{37, 116}, {409, 23}}`_abccdae`fghijmd|Xqrs!сo'-8 2C+IA@!9@I26CB+!@G!+I2-_enable_fullscreen_menu F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@v`_{{55, 79}, {362, 31}}Z{250, 750}_`abci  @oM0!-@+GA@!9DIGH-@!7H-'2@-#L@ -#L@!2*LD'II2--A*%+%1-8mnpqtu (\controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLɀ  Y !Z[BBD_{{18, 130}, {402, 18}}F  EF #@w4`_abccdae`fghijmXqrs!сo$@4C I22#@5"@H28H! 2"CI X11_enable_keyequivs F"L"Ȁ  _{{18, 166}, {402, 18}}`_abccdae`fghijm Xqrs!сo&-8 2C+I@ 7H-!H-2D%@-L@#7-H2"Zenable_tcp !&FL !' "$ #_{{18, 243}, {402, 18}}FL128 PQ H`_abccdae`fghijm>Xqrs!с!%o3%-@!2*L*2!8H!\fake_buttonsFG (,FJLQRJȀ̀ )* _{{15, 184}, {402, 18}}`_abccdae`fghijmF^Xqrs!с(+mB1*2!@!2*L_focus_follows_mousefg .2FJLqrJȀ̀ /0 _{{15, 140}, {402, 18}}`_abccdae`fghijmf~Xqrs!с.1oB1*5H Windows C+!H_focus_on_new_window 49FL 57 6_{{18, 69}, {402, 18}}F  SU T`_abccdae`fghijmXqrs!с48o8H! Option *H Alt_L A%0 Alt_R_option_sends_alt ;X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask<=@ ?@x>!_{{266, 364}, {484, 342}}n2#1IH2 X11WNSPanelZ{320, 240}Y[ A1ρB)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \@@ C 1)1 8'!HJ#64T)_{{36, 93}, {385, 31}}_`abci Go^@!7H-@4C I2A%I' 2#@5"@H218H!A@!9-2!5%H-A-%4@ 1 X11 5HC I1'#1AH MetaF&'  IK J_{{36, 195}, {385, 42}}F89  MN _`abci8EH LoV8H! Option +#7- Command I2D'IC05H%4@7H-@4C I28H!@!2*L'2+#7-8H!%2 _{{36, 159}, {385, 14}}_`abciNJ Oo<-8 2C+I@%5H"@!9 input @7H-@5"15"LA! X11 181_{{18, 179}, {402, 18}}`_abccdae`fghijm'WXqrs!с#Ro32!#9AAI4!L-#0_{{36, 32}, {385, 31}}FLdeπ WX B_`abciq6 VoV@!7H-@4C I2A%I' 8H!1'@%7-0*H*1 %1)L8H! Alt_L A%0 Alt_R X11 A Mode_switch_{{18, 8}, {418, 18}}`_abccdae`fghijmzXqrs!сTYo)@%7H-D2!4(22#@%7H-5H-4I'@*!-_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1^bs)VNSViewYNSTabView\NSIdentifiera`B_Q1f3@I2+,]NSTabViewItem/aہrBcQ21Ddځeim)F ۀ fg #@0_{{17, 238}, {20, 20}}_`abciehc*5:FՁ ۀ jk #@x@_{{36, 216}, {392, 14}}_`abcii lo(1'@%7-5I0!5%@!7H-@#4H! X11 -5#1IF ۀ no _{{36, 145}, {385, 31}}_`abcim poV@4C I2+I2H2#2 X11 C I2#8H! Command-Option @7H-@I2+#7--2B+!@G!+I2-_{{10, 33}, {438, 279}}e2--atBcY [u1   vz~)FLȀt wx t_{{18, 255}, {409, 23}}`_abccdae`fghijm *Xqrs!сvyo@4C I22# 4LF78 t {| t_{{36, 221}, {385, 28}}_`abci Dz }om@4C I2#2"2#@!9 "copy" A%0-8 2C+I 4L#0+'H2#021I-!9% OSX 1 X11 CLIPBOARD A%01@-#L PRIMARYFLOPȀt  t_{{34, 129}, {409, 23}}`_abccdae`fghijm\Xqrs!с~o0-1@ CLIPBOARD @!7H-#021I-!9%@%5H"A%FLhiȀt  t_{{34, 104}, {409, 23}}`_abccdae`fghijmuXqrs!сo<-1@ PRIMARY (%4#%2) @!7H-#021I-!9%@%5H"A%FLȀt  t_{{34, 79}, {409, 23}}`_abccdae`fghijmXqrs!сo3-1@#021I-!9%15@!7H-@%7-I-'2!C+!HA%I'FLȀt  t_{{34, 192}, {409, 23}}`_abccdae`fghijmXqrs!сo0-1@#021I-!9%@!7H- CLIPBOARD @%5H"A%F t  t_{{52, 158}, {385, 28}}_`abci oY4C I21'@%7-5II28I-2#C I xclipboard, klipper +#7-1'12#%4-#L X11 -7HFFԁ t  t#@v_{{52, 47}, {370, 28}}_`abci oN1'@%7-5ID!H*2!2#32DIC2A-%4@ 1 @7H-!22I-31CB#B-% X11_{{10, 33}, {438, 279}}o#021I-!9%JáBc1BFf́(.)FJJ ̀  _{{33, 208}, {385, 31}}_`abci  ot@!7H-@4C I2A%I' 2#%45H+I2H25HD!H!54##!03C+I2#%4@!2*L1IH2D"1+I2H21%H2'@7H-@4C I2FJ  J ̀  _{{33, 161}, {385, 17}}_`abci  o?2#B1*+I2H2 X11 02!@-#L@ -#L *H%C2#I2!2-"H2FJ + ,J ̀  _{{33, 106}, {385, 28}}_`abci 8 o@!7H-@4C I2A%I' 2#*#I2+I2H2 X11 C+!H0*H%C+IA-%4@ 1 X11 "I2"D5H7I+I2 (A5HA-%4@ 1 Finder A-%4@ 1 Terminal @GI)_{{10, 33}, {438, 279}}h+I2H2" @aB1 D G H I)F" T U"   _{{36, 195}, {385, 42}}_`abci G a o2#@#4H! X11 0*#I28H!'8!2#@I26 Xauthority I25H-"9H IP -#0@%5H"A% 8H!@+%H25I0C ID!HDI 6H-23C+I@#4H!A-%4@ 1 X11 D!HDIF" m n"   _{{36, 118}, {385, 42}}_`abci H z o@!7H-@4C I2A%I' I-@4C I22##1#-'2!9I-2#@ 7H-!H-I'"@7H-C+IAHC@#7H-'2!%- 1-#0 @!7H-4C I2A%I' 0D!H-8 2C+I!52#@ 7H-!H-2A-%4@ 1#0"0D%F"  "    #@y_{{17, 17}, {404, 14}}_`abci I  o11'@%7-@+%H25I0!5%@!7H-@#4H! X11 C#1IH-D_{{10, 33}, {438, 279}}k'2!%- 1"+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard' #ƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ہ_minimize_window:?  4݁_orderFrontStandardAboutPanel:@ 6 ߁[prefs_show:F  EUhide:J  MZterminate:G  H_hideOtherApplications:H $ J_unhideAllApplications: ) ^Ucopy: / f ]close_window: 5 l \zoom_window: 9 ;  F > ?/L  G H/_NSHuggingPriority    Y S W[ 8M_{{340, 191}, {100, 32}}`_abccae`fghi Z ] 9 _ `rq@ !Ԁe3 I3_apps_table_duplicate: f h  F > ?/L  r s/   _{{340, 159}, {100, 32}}`_abccae`fghi Z ] f  `rq!Ԁb%_apps_table_delete: W _apps_table_show:  F > ?/L   /   _{{340, 223}, {100, 32}}`_abccae`fgh Z ] `rq!Ԁk@4H!#2"2#_apps_table_new: ! ^prefs_changed:  ^prefs_changed:' # ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:D _enable_fullscreen_changed:D A _toggle_fullscreen:B ̀ ^prefs_changed:F ( ^prefs_changed:f  .  ^prefs_changed:  v "^prefs_changed: ~ $^prefs_changed:   &^prefs_changed:   (^prefs_changed:   *^prefs_changed:d %  ,^prefs_changed: + 4 .^prefs_changed: 1 T 0^prefs_changed:1 5 ί 6'2?@ABkCDEFGHIJ()*  !"+q~!8'9'2eDPdp  8PiJBOFR fr ,"' G U H n I / 9 H f sGUHI-7 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$FHKJN#Q6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication /    56OP N7>! _{{302, 440}, {454, 271}}o@!9A-%4@ 1 X11Z{320, 240}1 9 f )1 -7@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $     _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller =/    '  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 1 Ρ 2HK 5 6 7 8 9 : ;   >_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, A B_NSPanGestureRecognizer C D/_NSPanGestureRecognizer_NSGestureRecognizer+, F/+, H I\NSScrollView H/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 O ί'2222B22222222()*        +q8'Dd  JBJJFJJfJ""" G" H" I / 9/ f/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{;@B^!HJ#64TBbۀڀ݀ہeہiۀہہmہBstvtzt~tttttB̀̀́́(́́.́B4##K1 ί 6'2?@ABkCDEFGHIJ()*  !"+q~!8'9'2eDPdp  8PiJBOFR fr ,"' G U H n I / 9 H f sGUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$FHKJN#Q6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ί        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ΠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u        ! # % N \ c w  + 9 ; = ? A C E M _ l w    " - 2 _ h r { }   "$%')JLNPRTVirKMOQSUWY[]artvxz!#%'BDmoqrtvwy{ 4689;=>@Bcejlnprt   $&GIKMOQSf  ')6cegikmoqsu"$&(*,.Ertvxz|~&(*,.02468IZ\^`bs|:<>@BDFMvxz{}%'PRTUWYZ\^$&(*9BEGIjlnprtv%0Lb}*Kf*6@fu  )*,-t~AMefhjlmoqsuw  IKMNPRTVX   # : G Y [ ^ ` c e j m v x !!!+!8!C!P![!j!y!!!!!!!!!!!!!!!!""""""""" ")">"E"N"f"m"v"x"z"|"~""""""""""""""""###?#Z#c#p#u#~#############$$$%$3$;$=$?$A$C$E$L$^$s$$$$$$$$$$$$$$6l6u666666666777777 7"7$7&7)7@7Q7Z7]7_7a7n7q7s777777777777777888 8887898;8=8?8A8N8[8g8i88888888888888888999999!9.9C9E9G9I9K9W9l9o9s9u9w999999999999999::::::/:D:Q:`:b:d:y:{:}:::::::::::::;;;;; ; ;g;n;p;q;r;t;v;x;y;{;};;;;;;;;;;;;;;;<<,<:B>D>E>F>H>J>L>M>O>Q>S>T>V>W>X>>>>>>>>>>>???4?Q?\?n?p?r?w??????????????????????????@@@@.@E@N@W@Y@[@]@_@a@@@@@@@@@@@@@@@@@@@@@@A A"A$A&A(A*A,A.A0A2A;ADAXAeAtA}AAAAAAAAAAAAAAAAAB B BBBBB,BABCBEBGBIBKBBBBBBBBBBBBBBBBBBBBBBBBCCOCQCSCUCWCYC[C]CCCCCCCCD'D)D*D+D-D/D1D2D4D6D8D9D;DGGG_GjGGGGGGGGHAHRHUHWHYHnHpHsHuHwHHHHHHHHHHHIBIDIEIFIIIKIMINIQITIVIWIZI[I\I_IIIIIIIIIIIIJ-J0J2J3J4J7J9JX@XCXFXIXKXYY8Y;Y=Y@YCYFYHYYZZZZ!Z$Z'Z)Z+ZdZ|ZZZZZZZZZZZZZZZZ[[ ["[%[([+[-[[\2\4\6\8\;\>\@\B\\\\\\\\\\\\\]]](]5]8];]>]A]D]G]I]V]_]m]r]]]]]]]]]]]]]]]]]]^2^5^7^8^9^;^=^@^A^D^G^I^J^L^M^N^W^o^^^^^^^^_________ _#_&_(_)_+_,_-_6_O_t_w_y_|____`>`A`C`D`E`G`I`L`M`P`S`U`V`X`Y`Z`s```````aWapa{aaaaaaaaaaaaaaaaaaabbbb b bbbbpbrbsbtbwbyb{b|bbbbbbbbbbbbbbbbcccccccccccccccccccccccccde$e&e'e(e+e-e/e0e3e6e8e9eeWeeeeeeeef fdfffgfhfkfmfofpfsfvfxfyf|f}f~fffffffffgaggggggggggggggggh-h/h1h3h6h9h;h=hiiiiii i i iiiiiiii4isiuiwiyi|iiiijMjPjRjSjTjWjYj\j]j`jcjejfjijjjkjjjjjjjjknkkkkkkkkkkkkkkkkkll9llAlDlGlIlmm"m;m>mAmCmFmImLmUmbmdmgmjmmmpmsmummmmmmmmmmmmmmmmnn6n9n;n>nAnDnFo1ooooooooooooooooooooooppppppppppppppqqqqqqqDqGqIqLqOqRqTrwrrrrrrrrrrrrrrrrsOsRsTsUsVsXsZs]s^sasdsfsgsisjsksssssssstuIuLuNuOuPuRuTuWuXu[u^u`uaucudueu~uuuuuuuww}wwwwwwwwwwwwwwwwwwwwwwwwxTxmxxxxxxxxxyy yy$y0yEyGyIyLyOyQynyyyyyyyyyyyyyyyyyyyyzz#z%z'z*z-z/zNzczezgzjzmzozzzzzzzzzzzzzzz{ { { {{{{ {5{7{9{;{>{@{Y{n{p{r{t{w{y{{{{{{{{{{{{{|||||+|-|/|2|5|U|f|h|j|m|p||||||||||||||||||||}} } }}}+}8}:}=}@}F}W}Y}[}^}a}o}}}}}}}}}}}~~&~)~+~,~-~0~2~4~5~8~;~=~>~A~B~C~F~o~q~t~u~x~z~|~~~~~~~~~~~~~~~&)+.1ǀ (9;=@CVgjlorрӀԀՀ؀ڀ܀݀AJLNQTVXoŁȁׁ,=@BEHWhjlorԂ *;=?BEbsuwz}̓Ѓ҃Ճ؃#&(+.=NQSVYhy|~τ҄Ԅׄڄ%(*-0?PSUX[jsÆņdžɆˆ͆φцӆՆ׆نۆ݆߆  #&),/258;=?ACEGIKNQTWY[^adgjmpsvy|ćLJʇ͇χчӇևه܇߇ !#%'),58:HˆĈ߉%(+-02;FHJMORT]`bd{׊>Pbdfghjlnqruwy|}~ŋ(*,-.02478;=?BCDG`yً%Ba~njΌ !*5NYbkŽĎƎȎʎ̎ΎЎҎԎ֎؎ڎ܎ގ "%(+.1468:<>@BDGILNPRUWZ\_behknqtwz}ďǏɏ̏Ώяӏ֏؏ۏޏ   "$&(*,.0369@BDFHJLORTWZ\^`bdfhjlnprtvxz|~“œȓ˓Γѓԓדړݓ "%(+.1:  #&),/258;>ADGJMPSVY\_behknqtwz}–ŖȖ˖ΖіԖזږݖ "%(+.147:=@CFILORUX[^adgjmpsvy|ėǗʗ͗Зӗ֗ٗܗߗ !$'*-0369GNOPXYZcjklvw{|?@CI\ijtuyoV "'(-23 8<=CT]^stxy| ,56>?@FUV^_`fuv~'(8@ABHWX`abhwx-.?FGHOPQYZ[krst|}~ #$,-=>EFUV^_nowx     ! 1 2 9 : ; < B J Z [ b c s t { |           % & * + 0 1 6 7 < N W X b c d i y z          ! & ' , - 2 3       - . / 3 > ? D F I J K L M J _ g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d@!91)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "kA-%4@ 1P^submenuAction:$%*kA-%4@ 11&')#   #!(i3+@- &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.h@!9+%11&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5m@5H"'1 X112XY287m2#1IH2...Q,22  2kkm2!<<;"f#42#stu*>=?f#42#1x)__NSServicesMenu22  22CBo*%1@GA@G!+I2-Qa22  2UNSTag2G*Fh H- X11Qh22GIi H--7HF22!KkA*1I+!22  22ONj--2 X11Qq\_NSAppleMenu-!SSR"kA-%4@ 1TU*kA-%4@ 11؀VW)S  S!Xk3+@-...-![[Z"eAID\]*eAID1^)[`_f1%-Qc  -!ccb"h+I2H2*edxh+I2H21 !"filnoruv) ()chgc4Qw 12ckjj"H-@%G*8Qm ;c!mc 9! c   KLcqpl'9+I2H2Q` RUVctso'%1H2+I2H2Q~ c   hc!wo31I+!!2D'II2+I2^_NSWindowsMenuqqs-!{{z"g'45C Ixy|}*g'45C I1}~~)q{!k'45C I X11[_NSMainMenuTmenu V^apps_separator ʀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ɀR #@ŀ#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[Nȴ9X#@O]hr!]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@d 7H-klmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0Ak H-I-'2!klnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghf3*1HVK0.33333299]^_`aȀk H-I-'2!JKLMNOPQUVW #@M@#@$]^_`abcdghf2%1  [headerColorVB1C1 1]^_`a_NSDrawsBackground €k H-I-'2!klnrs#@($&À_controlBackgroundColor)*VL0.602715373N0.6666666667 1/1ƀYgridColor45VM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ̀րDHJKMNHVNSCell̀ ΀π VXY [_{{15, 245}, {402, 18}}_]`abac_d^efghil@nVpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo %4H2 Windows 5HD!H!54##!uvw[NSImageNameҀXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through ^؀^copy_menu_item ڀDJǀۀ ܀݀ Xq [d_{{36, 235}, {128, 26}}e`]_aabf^dVpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހklnrs WNSState݀!*k2-A*%__popUpItemAction:k!8!!--7HF1׀߀)!f256 *5!c1!d%I2+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!JK%&!ǀ .X1 [_{{18, 243}, {402, 18}}_]`abac_d^efghil;Vpqr!рo 2##1#-'2!9I-2#@ 7H-!H-[enable_authCD DJKNOǀۀ _{{18, 182}, {409, 23}}_]`abac_d^efghilC[Vpqr!рnB+!@G!+I2-_enable_fullscreencd DJKnoǀۀ  _{{37, 116}, {409, 23}}_]`abac_d^efghilc{Vpqr!сo'-8 2C+IA@!9@I26CB+!@G!+I2-_enable_fullscreen_menu DJ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@v`_{{55, 79}, {362, 31}}Z{250, 750}]^_`ah  @oM0!-@+GA@!9DIGH-@!7H-'2@-#L@ -#L@!2*LD'II2--A*%+%1-8klnors &\controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKȀ  X !Z[BBD_{{18, 130}, {402, 18}}DJ  EF #@w4_]`abac_d^efghilVpqr!сo$@4C I22#@5"@H28H! 2"CI X11_enable_keyequivs D!JK!ǀ  _{{18, 166}, {402, 18}}_]`abac_d^efghil Vpqr!сo&-8 2C+I@ 7H-!H-2D%@-L@#7-H2"Zenable_tcp !&DJK & "$ #_{{18, 243}, {402, 18}}DJK017 PQ H_]`abac_d^efghil=Vpqr!с!%o3%-@!2*L*2!8H!\fake_buttonsEF (,DHJKPQHǀ̀ )* _{{15, 184}, {402, 18}}_]`abac_d^efghilE]Vpqr!с(+mB1*2!@!2*L_focus_follows_mouseef .2DHJKpqHǀ̀ /0 _{{15, 140}, {402, 18}}_]`abac_d^efghile}Vpqr!с.1oB1*5H Windows C+!H_focus_on_new_window 49DJK 57 6_{{18, 69}, {402, 18}}DJ  SU T_]`abac_d^efghilVpqr!с48o8H! Option *H Alt_L A%0 Alt_R_option_sends_alt ;V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask<=@ ?@x>!_{{266, 364}, {484, 342}}n2#1IH2 X11WNSPanelZ{320, 240}X[ A1΁B)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \@@ C 1)17 &!HJ#64T)_{{36, 93}, {385, 31}}]^_`ah Go^@!7H-@4C I2A%I' 2#@5"@H218H!A@!9-2!5%H-A-%4@ 1 X11 5HC I1'#1AH MetaDJ%&   IK J_{{36, 195}, {385, 42}}DJ78  MN ]^_`ah7DH LoV8H! Option +#7- Command I2D'IC05H%4@7H-@4C I28H!@!2*L'2+#7-8H!%2 _{{36, 159}, {385, 14}}]^_`ah MJ Oo<-8 2C+I@%5H"@!9 input @7H-@5"15"LA! X11 181_{{18, 179}, {402, 18}}_]`abac_d^efghil&VVpqr!с#Ro32!#9AAI4!L-#0_{{36, 32}, {385, 31}}DJKcd΀ WX B]^_`ahp6 VoV@!7H-@4C I2A%I' 8H!1'@%7-0*H*1 %1)L8H! Alt_L A%0 Alt_R X11 A Mode_switch_{{18, 8}, {418, 18}}_]`abac_d^efghilyVpqr!сTYo)@%7H-D2!4(22#@%7H-5H-4I'@*!-_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1^bs)VNSViewYNSTabView\NSIdentifiera`B_Q1f3@I2+,]NSTabViewItem/aہrBcQ21Ccځeim)DJ ۀ fg #@0_{{17, 238}, {20, 20}}]^_`ahehc*5:DJԁ ۀ jk #@x@_{{36, 216}, {392, 14}}]^_`ahi lo(1'@%7-5I0!5%@!7H-@#4H! X11 -5#1IDJ ۀ no _{{36, 145}, {385, 31}}]^_`ahm poV@4C I2+I2H2#2 X11 C I2#8H! Command-Option @7H-@I2+#7--2B+!@G!+I2-_{{10, 33}, {438, 279}}e2--atBcX [u1    vz~)DJKǀt wx t_{{18, 255}, {409, 23}}_]`abac_d^efghil )Vpqr!сvyo@4C I22# 4LDJ67 t {| t_{{36, 221}, {385, 28}}]^_`ah Cz }om@4C I2#2"2#@!9 "copy" A%0-8 2C+I 4L#0+'H2#021I-!9% OSX 1 X11 CLIPBOARD A%01@-#L PRIMARYDJKNOǀt  t_{{34, 129}, {409, 23}}_]`abac_d^efghil [Vpqr!с~o0-1@ CLIPBOARD @!7H-#021I-!9%@%5H"A%DJKghǀt  t_{{34, 104}, {409, 23}}_]`abac_d^efghiltVpqr!сo<-1@ PRIMARY (%4#%2) @!7H-#021I-!9%@%5H"A%DJKǀt  t_{{34, 79}, {409, 23}}_]`abac_d^efghilVpqr!сo3-1@#021I-!9%15@!7H-@%7-I-'2!C+!HA%I'DJKǀt  t_{{34, 192}, {409, 23}}_]`abac_d^efghilVpqr!сo0-1@#021I-!9%@!7H- CLIPBOARD @%5H"A%DJ t  t_{{52, 158}, {385, 28}}]^_`ah oY4C I21'@%7-5II28I-2#C I xclipboard, klipper +#7-1'12#%4-#L X11 -7HFDJӁ t  t#@v_{{52, 47}, {370, 28}}]^_`ah oN1'@%7-5ID!H*2!2#32DIC2A-%4@ 1 @7H-!22I-31CB#B-% X11_{{10, 33}, {438, 279}}o#021I-!9%HáBc1@Eé(.)DHJH ̀  _{{33, 208}, {385, 31}}]^_`ah  ot@!7H-@4C I2A%I' 2#%45H+I2H25HD!H!54##!03C+I2#%4@!2*L1IH2D"1+I2H21%H2'@7H-@4C I2DHJ  H ̀  _{{33, 161}, {385, 17}}]^_`ah  o?2#B1*+I2H2 X11 02!@-#L@ -#L *H%C2#I2!2-"H2DHJ * +H ̀  _{{33, 106}, {385, 28}}]^_`ah 7 o@!7H-@4C I2A%I' 2#*#I2+I2H2 X11 C+!H0*H%C+IA-%4@ 1 X11 "I2"D5H7I+I2 (A5HA-%4@ 1 Finder A-%4@ 1 Terminal @GI)_{{10, 33}, {438, 279}}h+I2H2! ?aB1 C F G H)D!J S T!   _{{36, 195}, {385, 42}}]^_`ah F ` o2#@#4H! X11 0*#I28H!'8!2#@I26 Xauthority I25H-"9H IP -#0@%5H"A% 8H!@+%H25I0C ID!HDI 6H-23C+I@#4H!A-%4@ 1 X11 D!HDID!J l m!   _{{36, 118}, {385, 42}}]^_`ah G y o@!7H-@4C I2A%I' I-@4C I22##1#-'2!9I-2#@ 7H-!H-I'"@7H-C+IAHC@#7H-'2!%- 1-#0 @!7H-4C I2A%I' 0D!H-8 2C+I!52#@ 7H-!H-2A-%4@ 1#0"0D%D!J  !    #@y_{{17, 17}, {404, 14}}]^_`ah H  o11'@%7-@+%H25I0!5%@!7H-@#4H! X11 C#1IH-D_{{10, 33}, {438, 279}}k'2!%- 1"+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard& #ƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector i ہ_minimize_window:?  4݁_orderFrontStandardAboutPanel:@ 6 ߁[prefs_show:F  EUhide:J  MZterminate:G  H_hideOtherApplications:H # J_unhideAllApplications: ( ^Ucopy: . f ]close_window: 4 l \zoom_window: 8 :  D = >-JK  F G-_NSHuggingPriority    X R V[ 8M_{{340, 191}, {100, 32}}_]`aba_d^efgh Y \ 8 ^ _qp@ !Ԁe3 I3_apps_table_duplicate: e g  D = >-JK  q r-   _{{340, 159}, {100, 32}}_]`aba_d^efgh Y \ e ~ _qp!Ԁb%_apps_table_delete: W _apps_table_show:  D = >-JK   -   _{{340, 223}, {100, 32}}_]`aba_d^efg Y \ _qp!Ԁk@4H!#2"2#_apps_table_new: ! ^prefs_changed:  ^prefs_changed:& # ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:C _enable_fullscreen_changed:D A _toggle_fullscreen:@ ̀ ^prefs_changed:E ( ^prefs_changed:e .  ^prefs_changed:  v "^prefs_changed: ~ $^prefs_changed:   &^prefs_changed:   (^prefs_changed:   *^prefs_changed:c $  ,^prefs_changed: * 4 .^prefs_changed: 0 T 0^prefs_changed:1 4 ͯ 5'2?@ABkCDEFGHIJ()*  !"+q~ 7& 8&1dCOco  7 OhH@NEQ eq +!& F T G m H - 8 G e rESFG+5 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$FHKJN#Q6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication -    56OP N7>! _{{302, 440}, {454, 271}}o@!9A-%4@ 1 X11Z{320, 240}1 8 e )1 +5@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " J    _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller ;/  J  &  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 0 ͡ 1HK 4 5 6 7 8 9 :   =_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, @ A_NSPanGestureRecognizer B C/_NSPanGestureRecognizer_NSGestureRecognizer+, E/+, G H\NSScrollView G/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 N ͯ'2222B22222222()*        +q7 &Cc   H@HHEHHeH!!! F! G! H - 8- e-EFG- -02222:22222222-QSS-Y[-acccccccc-y{;@B^!HJ#64TBbۀڀ݀ہeہiۀہہmہBstvtzt~tttttB̀̀́́(́́.́B4##K1 ͯ 5'2?@ABkCDEFGHIJ()*  !"+q~ 7& 8&1dCOco  7 OhH@NEQ eq +!& F T G m H - 8 G e rESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ ;@B^!$FHKJN#Q6U47TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-3:ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ͯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ͠K+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u        ! # % N \ c w  + 9 ; = ? A C E M _ l w    " - 2 _ h r { }   "$%')JLNPRTVirKMOQSUWY[]artvxz!#%'BDmoqrtvwy{ 4689;=>@Bcejlnprt   $&GIKMOQSf  ')6cegikmoqsu"$&(*,.Ertvxz|~&(*,.02468IZ\^`bs|:<>@BDFMvxz{}%'PRTUWYZ\^$&(*9BEGIjlnprtv !,H^y &Gb &2<bq [en|(4LMOQSTVXZ\^024579;=? ! . @ B E G J L Q T ] _ h i l o r t v y !!!*!7!B!Q!`!h!s!t!v!x!!!!!!!!!!!!!!!!""""""%","5"M"T"]"_"a"c"e"z""""""""""""""""##&#A#J#W#\#e#x#}############$$ $$"$$$&$($*$,$3$E$Z$g$|$$$$$$$$$$$$6S6\6i6n6{6666666677777 7 7 77'787A7D7F7H7U7X7Z7o7q7s7u7w77777777777777788 8"8$8&8(858B8N8P8u8w8y8{8}88888888888889999999*9,9.90929>9S9V9Z9\9^99999999999999999999::+:8:G:I:K:`:b:d:f:h:r::::::::::::::::;N;U;W;X;Y;[;];_;a;b;d;f;h;i;k;l;m;;;;;;;;;;<<<#<9+>->.>/>1>3>5>6>8>:><>=>?>@>A>j>l>o>p>s>v>x>z>|>>>???:?E?W?Y?[?`?i?k?l?m?n?p?r?t?v?x??????????????????@@@.@7@@@B@D@F@H@J@w@y@{@}@@@@@@@@@@@@@@@@@@A A A AAAAAAAA$A-AAANA]AfAtAAAAAAAAAAAAAAAAAAAAAABB*B,B.B0B2B4BBBBBBBBBBBBBBBBBBBBBBBBBC8C:CC@CBCDCFCCCCCCCCDDDDDDDDDDD!D"D$D%D&D?D~DDDDDDDDDDDDDDDE9E;EH@HBHWHYH\H^H`HmHvHHHHHHHHHI+I-I.I/I2I4I6I7I:I=I?I@ICIDIEIHIyIzI}IIIIIIIIIJJJJJJ J"J%J&J)J,J.J/J2J3J4J=J@JJJJJJJJJJKKKK K KKiKkKlKmKoKqKsKtKwKzK|K}KKKKKKKKKKKKL8LCLXLZL\L_LbLdLLLLLLLLLLLLLLLLLMXMZM[M\M_MaMcMdMgMjMlMmMpMqMrMuMMMMMMMMMMN N NNNNNrNtNuNvNxNzN|N}NNNNNNNNNNNNNNNNO O#O8O:OW?W@WCWEWHWIWLWOWQWRWUWVWWWZWsWWWWWWWWWWWWWWWWWX$X'X)X,X/X2X4XXY!Y$Y&Y)Y,Y/Y1YYZZZZ Z ZZZZMZeZZZZZZZZZZZZZZZZ[[ [ [[[[[[\\\\!\$\'\)\+\\\\\\\\\\\\\]]]]]!]$]']*]-]0]2]?]H]V][]t]w]z]|]]]]]]]]]]]]]]^^^ ^!^"^$^&^)^*^-^0^2^3^5^6^7^@^X^}^^^^^^^^^^______ _ ________8_]_`_b_e_h_k_m_`'`*`,`-`.`0`2`5`6`9`<`>`?`A`B`C`\```````a@aYada}aaaaaaaaaaaaaaaaaaaaaaaaaabYb[b\b]b`bbbdbebhbkbmbnbqbrbsbbbbbbbbbcciclcncocpcscucxcyc|ccccccccccccccde eeeeeeeeee!e"e%e&e'e@eeeeeeeeefMfOfPfQfTfVfXfYf\f_fafbfefffgfffffffffgJgggggggggggggggghhhhhh"h$h&hhhhhhhhhhhhhiiiii\i^i`ibieihijilij6j9j;jmKmMmPmSmVmYm\m^mmmmmmmmmmmmmmmmmnn"n$n'n*n-n/oooooooooooooooooooooooooplppppppppppppppppqq-q0q2q5q8q;q=r`ryrrrrrrrrrrrrrrrs8s;s=s>s?sAsCsFsGsJsMsOsPsRsSsTsmssssssstu2u5u7u8u9u;u=u@uAuDuGuIuJuLuMuNuguuuuuuuvwfwiwkwlwmwowqwtwuwxw{w}w~wwwwwwwwwwwwx=xVxmxvxxxxxxxxxyy yy.y0y2y5y8y:yWylynypysyvyxyyyyyyyyyyyyyyyz zzzzzz7zLzNzPzSzVzXzuzzzzzzzzzzzzzzzzzzzz{ {{ {"{${'{){B{W{Y{[{]{`{b{q{{{{{{{{{{{{{{{|||||||>|O|Q|S|V|Y|e|v|x|z|}|||||||||||||||||||}}!}#}&})}/}@}B}D}G}J}X}i}k}m}p}s}}}}}}}~~~~~~~~~~!~$~&~'~*~+~,~/~X~Z~]~^~a~c~e~g~j~~~~~~~~~~~~~y{|}"$&),?PSUX[Àŀƀɀ̀΀πҀӀԀ׀*357:=?AXj{~сԁցف܁&)+.1@QSUX[j{}΂Ђ҂Ղ؂$&(+.K\^`cf{Ѓ &7:ADS\†ĆƆȆʆ̆ΆІ҆Ԇֆ؆چ܆߆ !$&(*,.0247:=@BDGJMPSVY\_behknqtwz}‡Ňȇˇ·чԇׇڇ݇ !#1Ȉ$/1368;=FIKMd}'9KMOPQSUWZ[^`befgj !$&(+,-0Ibknqt‹+JgjlnqЌ 7BKTÎŎǎɎˎ͎ώюӎՎ؎ێގ !#%')+-02579;>@CEHKNQTWZ]`cfilorux{~ďǏʏ͏ЏӏՏ׏ُۏݏߏʑ̑ϑёӑՑבّۑݑߑ "%(+.147:=@CFILORUX[^acegikmoqtwz}Òƒɒ̒ΒВҒՒؒےޒ  #%')+-/1358;=@CEGIKMOQSUWY[]_acegilorux{~ÓƓɓ̓ϓғՓؓۓޓ # !$'*-0369ADGJMPSVY\_behknqtwz}—ŗȗ˗Ηїԗחڗݗ "%(+.147:=@CFILORUX[^adgjmpsvy|˜ĘƘȘʘ̘ΘИҘԘؘ֘ژܘޘ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~™ęƙșʙ̙ΙЙҙԙؙ֙ڙܙޙ  "$&(*,.09: LprojCompatibleVersion 106.5 LprojLocale th LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/0000755000175000017500000000000014757411136017050 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/main.nib/0000755000175000017500000000000014757411136020543 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/main.nib/designable.nib0000644000175000017500000020573214757411105023257 Ortadaki veya sağdaki fare düğmelerini etkinleştirmek için tıklarken Option veya Komut tuşunu basılı tutun. "Kopyala" menü öğesini etkinleştirir ve OSX yapıştırma alanıyla X11 CLIPBOARD ve PRIMARY arabelleklerinin eşzamanlanmasına izin verir. Etkinleştirildiğinde; etkin olmayan bir pencereyi tıklamak, pencerenin etkinleştirilmesinin yanı sıra o fare tıklamasının o pencereye geçirilmesine de neden olacaktır. Etkinleştirildiğinde; yeni bir X11 penceresinin yaratılması, X11.app uygulamasının öne gelmesine (Finder.app, Terminal.app vb. yerine) neden olacaktır. X11’i başlatma, Xauthority erişim denetimi tuşlarını yaratacaktır. Sistemin IP adresi değiştiğinde bu tuşlar geçersiz olur ve bu durum X11 uygulamalarının başlamasını engelleyebilir. Etkinleştirildiğinde, sistem güvenliğini sağlamak için Bağlantılarda kimlik doğrula seçeneğinin de etkinleştirilmesi gerekir. Etkisizleştirildiğinde, uzaktaki uygulamaların bağlantılarına izin verilmez. xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/main.nib/keyedobjects.nib0000644000175000017500000013646614757411105023644 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuyz~?@CI\ijtuyoV "'(-23 8<=CS\]rswx{~+45=>?ETU]^_etu}~&'7?@AGVW_`agvw,-?FGHOPQYZ[krst|}~ #$,-=>EFUV^_nowx     ! " 3 4 ; < = > D L ] ^ e f w x          # $ ) * . / 4 5 : ; @ R [ \ f g h m } ~          $ % * + 0 1 6 7       1 2 3 7 B C H J M N O P Q  c f      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[UygulamalarP^submenuAction:$%*[Uygulamalar1&')#   #!(kzelle_tir &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5lX11 Hakk1nda2XY287\Tercihler...Q,22  2kkm2!<<;"YServislersmu*=;>1w)__NSServicesMenu22  22BAoTam Ekran1 A/KapatQa22  2UNSTag2F*EkX11 i GizleQh22FHoDierlerini Gizle22!JmTmn Gster22  22NMkX11 den 1kQq\_NSAppleMenu-!RRQ"[UygulamalarST*[Uygulamalar1׀UV)R  R!Wmzelle_tir...-!ZZY"eDzen[\*eDzen1])Z_^WKopyalaQc  -!bba"WPencere*cav1 dgjlmpst) &'bfeUKapatQw /0bihoSimge Durumuna KltQm 9b!klByt/Klt b   IJbonoPencereler Aras1nda Dola_Q` PSTbrqo&Pencereler Aras1nda Geriye Doru Dola_Q~ b   fb!uoTmn ne Getir^_NSWindowsMenuooq-!yyx"fYard1mvwz{*fYard1m1{||)oy!}jX11 Yard1m[_NSMainMenuTmenu U^apps_separator Ȁ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ǀR@#@À#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^n#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@RAdklmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0AmMetin Hcresiklnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@X#@D]^_`abcdghUKomutVM0.3333329856]^_`aȀmMetin HcresiJKLMNOPQUVW #@Q#@$]^_`abcdghXKestirme  [headerColorVB1C1 1]^_`a_NSDrawsBackground mMetin Hcresiklnrs#@($&_controlBackgroundColor)*VL0.602715373N0.6666666667 1/1ĀYgridColor45VM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ʀԀDHJLMHVNSCellˀ ̀̀ UWX Y_{{15, 245}, {402, 18}}^]_`aab_c^defghk@mVopq_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀o(Etkin Olmayan Pencerelere T1klayarak Getuv[NSImageNameЀXNSSwitch+,yz_NSButtonImageSourcey/+,|}\NSButtonCell|/+,XNSButton;/]click_through ]ր^copy_menu_item ؀Dƀـ ڀۀ Wo Yb_{{71, 227}, {128, 26}}d_]^a`ae^cVof _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀klnrs WNSStateހۀ!*XEkrandan__popUpItemAction:ZOtherViews1ր݀)ހ!X256 Renkހ!XBinlerceހ![Milyonlarca+,_NSPopUpButtonCell|/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D J$% ƀ -W0 Y_{{18, 243}, {402, 18}}^]_`aab_c^defghk:Vopq!πoBalant1larda kimlik dorula[enable_authBC DJMNƀـ _{{18, 182}, {409, 23}}^]_`aab_c^defghkBZVopq!π^Tam ekran modu_enable_fullscreenbc DJmnƀـ  _{{37, 116}, {409, 23}}^]_`aab_c^defghkbzVopq!ρo0Tam ekran modunda men ubuu eri_imine izin ver_enable_fullscreen_menu D_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}]^_`ag   @o\Fare imleci birincil ekran1n1z1n en stne yerle_tirildiinde men ubuu grnr olacakt1r.klnors & \controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJǀ  W XY@@B_{{18, 130}, {402, 18}}D CD #@w2^]_`aab_c^defghkVopq!ρo*X11 alt1nda tu_ kar_1l1klar1n1 etkinle_tir_enable_keyequivs D J ƀ  _{{18, 166}, {402, 18}}^]_`aab_c^defghk Vopq!ρo)A istemcilerinin balant1lar1na izin verZenable_tcp $DJ%  " !_{{18, 243}, {402, 18}}DJ/06 NO F^]_`aab_c^defghk<Vopq!ρ#o dmeli fareye ykn\fake_buttonsDE &*DHJOPHƀˀ '( _{{15, 184}, {402, 18}}^]_`aab_c^defghkD\Vopq!ρ&)_Odak Fareyi Takip Eder_focus_follows_mousede ,0DHJopHƀˀ -. _{{15, 140}, {402, 18}}^]_`aab_c^defghkd|Vopq!ρ,/_Yeni Pencerelere Odaklan_focus_on_new_window 27DJ 35 4_{{18, 69}, {402, 18}}D QS R^]_`aab_c^defghkVopq!ρ26o&Option tu_lar1 Alt_L ve Alt_R gnderir_option_sends_alt 9V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{266, 365.03906000000001}, {599, 340}}^X11 TercihleriWNSPanelZ{320, 240}WY ?1́@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1)16 %FH!42R)_{{36, 93}, {385, 31}}]^_`ag  EopEtkinle_tirildiinde, men ubuu tu_ kar_1l1klar1 Meta niteleyicisini kullanan X11 uygulamalar1yla eli_ebilir.D$%  GI H_{{36, 195}, {385, 42}}D67= KL #@|]^_`ag6DF  JolOrtadaki veya sadaki fare dmelerini etkinle_tirmek iin t1klarken Option veya Komut tu_unu bas1l1 tutun. _{{36, 159}, {461, 14}}]^_`ag MH  MoVGiri_ mens dei_ikliklerinin _u anki X11 tu_ e_leminin zerine yazmas1na izin verir._{{18, 179}, {402, 18}}^]_`aab_c^defghk%VVopq!ρ!Po$Sistemin klavye yerle_imini takip et_{{36, 32}, {385, 31}}DJcd̀ UV @]^_`agp4  ToeEtkinle_tirildiinde, Option tu_lar1 Mode_switch yerine Alt_L ve Alt_R X11 tu_ sembollerini gnderir._{{18, 8}, {418, 18}}^]_`aab_c^defghkyVopq!ρRWo)Her zaman parma1n hareket ynnde kayd1r_{{10, 33}, {553, 279}}+,/_{{13, 9}, {573, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1eGiri_+,]NSTabViewItem/ _فp@aQ21Bb؁cgk)Dـ de #@N_{{17, 231}, {64, 20}}]^_`agc fXRenkler:Dԁـ hi #@x@_{{36, 212}, {392, 14}}]^_`agg  jo8Bu seenek X11 yeniden ba_lat1ld11nda etkili olacakt1r.Dـ lm _{{36, 145}, {385, 31}}]^_`agk  noX11 kk penceresini etkinle_tirir. Tam ekran moduna gemek ve tam ekran modundan 1kmak iin Komut-Option-A tu_lar1n1 kullan1n._{{10, 33}, {553.21875, 279}}e1k1_ _r@aW Ys1    tx|)DJƀr uv r_{{18, 255}, {409, 23}}^]_`aab_c^defghk )Vopq!ρtwoE_zamanlamay1 etkinle_tirD67r yz r_{{36, 221}, {385, 28}}]^_`ag Cx  {o"Kopyala" men esini etkinle_tirir ve OSX yap1_t1rma alan1yla X11 CLIPBOARD ve PRIMARY arabelleklerinin e_zamanlanmas1na izin verir.DJNOƀr }~ r_{{34, 129}, {409, 23}}^]_`aab_c^defghk [Vopq!ρ|o2Yap1_t1rma alan1 dei_tiinde CLIPBOARD u gncelleDJghƀr  r_{{34, 109}, {511, 18}}^]_`aab_c^defghktVopq!ρoLYap1_t1rma alan1 dei_tiinde PRIMARY yi (ortadaki dmeyi t1klama) gncelleDJƀr  r_{{34, 79}, {409, 23}}^]_`aab_c^defghkVopq!ρo:Yeni metin seildiinde Yap1_t1rma Alan1 n1 hemen gncelleDJƀr  r_{{34, 192}, {409, 23}}^]_`aab_c^defghkVopq!ρo3CLIPBOARD dei_tiinde Yap1_t1rma Alan1 n1 gncelleDr  r_{{48, 158}, {385, 28}}]^_`ag  opxclipboard u, klipper 1 veya ba_ka bir X11 pano yneticisini kullanmak istiyorsan1z bu seenei etkisizle_tirin.DӁr  r#@v_{{48, 47}, {370, 28}}]^_`ag  obX11 protokolndeki s1n1rlamalardan dolay1, bu seenek baz1 uygulamalarda her zaman al1_mayabilir._{{10, 33}, {553.21875, 279}}oYap1_t1rma Alan1H _ˁ@a1@Ddʁ&,)DHHˀ  #@}_{{23, 197}, {480, 42}}]^_`ag   oEtkinle_tirildiinde; etkin olmayan bir pencereyi t1klamak, pencerenin etkinle_tirilmesinin yan1 s1ra o fare t1klamas1n1n o pencereye geirilmesine de neden olacakt1r.DH  Hˀ  _{{23, 161}, {385, 17}}]^_`ag   oGX11 pencere oda1 imleci takip eder. Bunun baz1 yan etkileri olabilir.DH + ,H 2ˀ  #@v_{{23, 92}, {367, 42}}]^_`ag 9  oEtkinle_tirildiinde; yeni bir X11 penceresinin yarat1lmas1, X11.app uygulamas1n1n ne gelmesine (Finder.app, Terminal.app vb. yerine) neden olacakt1r._{{10, 33}, {553.21875, 279}}ZPencereler A_@ 1 E H I J)D  U V  \  #@|t_%{{36, 195}, {463.73827999999997, 42}}]^_`ag H c  oX11 i ba_latma, Xauthority eri_im denetimi tu_lar1n1 yaratacakt1r. Sistemin IP adresi dei_tiinde bu tu_lar geersiz olur ve bu durum X11 uygulamalar1n1n ba_lamas1n1 engelleyebilir.D  o p  v  #@{_{{36, 104}, {449, 56}}]^_`ag I }  oEtkinle_tirildiinde, sistem gvenliini salamak iin Balant1larda kimlik dorula seeneinin de etkinle_tirilmesi gerekir. Etkisizle_tirildiinde, uzaktaki uygulamalar1n balant1lar1na izin verilmez.D       #@y_{{17, 17}, {404, 14}}]^_`ag J   oABu seenekler X11 in bir sonraki ba_lat1l1_1nda etkili olacakt1r._{{10, 33}, {553, 279}}hGvenlik+, YNSTabView /Z{599, 340}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard% !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D @Ҁ_toggle_fullscreen_item? 4Ԁ^x11_about_item t ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  g ف_minimize_window:? 4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F  D߁Uhide:J  LZterminate:G ! G_hideOtherApplications:H ' I_unhideAllApplications: , ]Ucopy: 2 d ]close_window: 8 j \zoom_window: < >  D A B-J  J K-_NSHuggingPriority   W V ZY 6K_{{340, 191}, {100, 32}}^]_`aa_c^defg ] ` < b cpo@ !Ҁfoalt_apps_table_duplicate: i k  D A B-J  u v-  _{{340, 159}, {100, 32}}^]_`aa_c^defg ] ` i cpo!ҀSSil_apps_table_delete: V _apps_table_show:  D A B-J   -  _{{340, 223}, {100, 32}}^]_`aa_c^def ] ` cpo!Ҁhe Ekle_apps_table_new:  ^prefs_changed:  ^prefs_changed:% ! ^prefs_changed: ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:| | Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:B _enable_fullscreen_changed:D @ _toggle_fullscreen:@ ʀ ^prefs_changed:D & ^prefs_changed:d  , ^prefs_changed: t  ^prefs_changed:  | "^prefs_changed:   $^prefs_changed:   &^prefs_changed: "  (^prefs_changed:b (  *^prefs_changed: . 2 ,^prefs_changed: 4 R .^prefs_changed:1 8 ѯ 9'2?@ABkCDEFGHIJ()*  +o|6% 7%0dBNbn  7 OhH@MDP dp , % H V I p J - < K i vESFG+5 0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication -    34MN L5<! _{{302, 440}, {454, 271}}oX11 Uygulama MensZ{320, 240}1 < i 􀋁)1 +5>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ր)_{{1, 1}, {301, 28}} "     _NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller ;/    *  A C@@_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 4 ѡ 5FI 8 9 : ; < = >   A_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, D E_NSPanGestureRecognizer F G/_NSPanGestureRecognizer_NSGestureRecognizer+, I/+, K L\NSScrollView K/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 R ѯ'2222B22222222()*        +o6 %Bb   H@HHDHHdH   H I J - <- i-EFG- -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 ѯ 9'2?@ABkCDEFGHIJ()*  +o|6% 7%0dBNbn  7 OhH@MDP dp , % H V I p J - < K i vESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 ѯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ѠI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~    /13579;R[jqy,.02468:<>BSUWY[d}>@BCEGHJLy{}$&+-/135^`  ;`bdfhjl>@BDFHJLNP\ikmo{;=?ACEGIKMXegikv&79;=?ACEGIjlnprtv|~ IKMNPRSUWxz|~<>giklnpqsu    -/13@ILNPqsuwy{}*5Qg /Pk"/;Ekz !#%./12y FRjkmoqrtvxz|%NPRSUWY[]   ( ? L ^ ` c e h j o r { } !!!!!0!=!H!U!`!o!~!!!!!!!!!!!!!!!!""""""" """%"("="D"M"e"l"u"w"y"{"}""""""""""""""""###>#Y#b#o#t#}############$$$$&$4$<$>$@$B$D$F$M$_$t$$$$$$$$$$$$$$6m6v666666666777777!7#7%7'7*7E7V7_7b7d7f7s7v7x777777777777888888888<8>8@8B8D8F8L8Y8g8i888888888888888889999!9#9%9.9C9E9G9I9K9W9l9o9s9u9w999999999999999::::::3:H:U:d:f:h:}:::::::::::::::;;; ; ;;;k;r;t;u;v;x;z;|;};;;;;;;;;;;;;;;;;<<0<>V>X>Y>Z>\>^>`>a>c>e>g>h>j>k>l>>>>>>>>>>??%?3?H?e?p?????????????????????????@@@@@@@@ @4@?@H@Q@S@U@W@Y@[@@@@@@@@@@@@@@@@@@@@@@AAAAA A"A$A&A(A*A6A?ASA`AoAxAAAAAAAAAAAAAAAAABBB B B BB'BB@BBBDBFBBBBBBBBBBBBBBBBBBBBBBBBC CJCLCNCPCRCTCVCXCCCCCCCCDDDDDD!D#D$D&D(D*D+D-D.D/DHDDDDDDDDDDDDDDDDE4E6E7E8E:EE?EBEEEGEHEJEKELEeEEEEEEEEFF0FEFGFIFLFOFQFFFGGGGGG!G#G&G'G*G-G/G0G2G3G4G=GUG`GGGGGGGGHUHfHiHkHmHHHHHHHHHHHHHHHHIVIXIYIZI]I_IaIbIeIhIjIkInIoIpIsIIIIIIIIIIIIJAJDJFJGJHJKJMJPJQJTJWJYJZJ]J^J_JhJkJJJJJJJJKK$K9K;K=K@KCKEKKKKKKKKKKKKKKKKLLLLLLLL LuLLLLLLLMMMMMM M M MMMMMMMMM6MMMMMMMMMMMMMMMMMMMMMMMNN2N?NTNVNXN[N^N`NNNNNNNNNNNNNNNNO+O-O/O1O4O7O9O;OTOjOOOOOOOOOOOOOOOOOOOOOPPVPXPZP\P_PbPdPfPPPPPPPPQQQQQQ Q"Q#Q&Q)Q+Q,Q/Q0Q1Q4QLQQQQQQQQQQQQQQQQQRRRRR R#R%R'RvRRRRRRRRSS&S4S>SKSUSkSSSSSSST TT+T?TBTDTGTJTMTPTSTTTWTZT]T`TcThTkTmToTTTTTTTTTTTTTTUUUURUjUyUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUVVVVVCVFVHVKVNVQVSW6WWWWWWWWWWWWWWWWWWXFXIXKXLXMXPXRXUXVXYX\X^X_XbXcXdXmXpXXXXXXXYYYYYYYYYZ}ZZZZZZZZZ[0[H[[[[[[[[[[[[[[[[[[[[[[[\\]]] ]"]%](]*],]]]]]]]]]]]]]^^^^^!^$^'^*^-^0^2^=^F^T^Y^r^u^x^z^}^^^^^^^^^^^^^_____ _"_$_'_(_+_._0_1_3_4_5_>_V_{_~_________`````` ` ````````8`]```b`e`h`k`m`aGaJaLaMaNaPaRaUaVaYa\a^a_aaabaca|aaaaaaabbbbbbbcccc0c2c5c6c9cc@cBcKc\c_cbcechckcncqctcvcccccccccccccccddCdEdGdIdLdOdQdSddddddddddeeeee e e e&eKeNePeSeVeYe[fjffffffffffffffffg7g9g;g=g@gCgEgGgh h h h hhhhhhhhh!h"h#hl?lBlClDl]lllllllmummmmmmmmmmmmmmmmnnn@nCnEnHnKnNnPoo6oYorouoxozo}ooooooooooopppppppp!p"p%p(p*p+p-p.p/p8pQpvpyp{p~pppqr>rArCrDrErGrIrLrMrPrSrUrVrXrYrZrsrrrrrrrs9sssssssssssssssssstttt t ttuCubumuuuuuuuuuuuuuuvvv v!v"v$v&v)v*v-v0v2v3v5v6v7v@vhvvvvvvvx xsxvxxxyxzx|x~xxxxxxxxxxxxxxxxxxz}zzzzzzzzzzzzzzz{{ {!{F{I{K{N{Q{T{V{{||||!|,|E|P|s|}||||||||||||}}}} }}}/}D}F}H}K}N}P}\}q}s}u}x}{}}}}}}}}}}}}}}}}~ ~"~$~&~)~,~.~I~^~`~b~e~h~j~u~~~~~~~~~~~~~~~~~~~~ !$6?W^m~/1369DUWY\_xǀ؀ڀ܀߀ ),.14ÁāǁU^`bgjmoqs"%'(+,-0JƒŃ؃SUVWZ\^_beghklmpǞ΄Єӄք؄ڄ(9<>ADSdgilo~ąӅ"357:=Pacehkxކ!#&)8ILNQTctwy|ʇ͇χ҇Շ #%(+:KNPSVevy{~̈ψшԈ׈"%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmorux{~ÊŊNJʊ͊ЊӊՊ׊ڊ݊ "$&(+.147:=@CFIKMORUX[^adgjmpsvy{}Č!$'(+.147:<>@[ŒČƌɌˌΌЌٌ܌ތ$-69;=S̍ލ"+6AÎ܎$Uyݏ!*CJcyʐՐސ "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhknqtwz}ÒŒȒʒ̒ΒђӒ֒ؒےޒ  "%'*,/147:<>@CEHJMORTWZ]`cfhjlnprtvxz|]_bdfhjlnprtvxz|~ĕǕʕ͕Еӕٕ֕ܕߕ  #&),/258;>ADGJMPSVY\_acehknqtwz}–ĖƖȖ˖ΖЖӖ֖ؖږܖޖ "%(+.147:=@CFILORUX[^adgjmpsvy|x{~™řș˙Ιљԙיڙݙ "%(+.147:=@CFILORUX[^adgjmpsvy|Ěǚʚ͚КӚ֚ٚܚߚ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~œĜƜȜʜ̜ΜМҜԜ֜؜ڜܜޜ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~˝̝Νם؝۝xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013643514757411105024357 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata4 %)*048$%-78=LST[\]fpqvyz")*+234;<ELMNVWXahijtuyz~ =>AGZghrswmT   %&+01 6:;AR[\qrvwz} *34<=>DST\]^dst|}~ %&6>?@FUV^_`fuv~+,>EFGNOPXYZjqrs{|}"#+,<=DETU]^mnvw     ! 2 3 : ; < = C K \ ] d e v w ~          " # ( ) - . 3 4 9 : ? Q Z [ e f g l | }         # $ ) * / 0 5 6        0 1 2 6 A B G I L M N O P H b e      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysQO/2213P&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*dMen1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "[UygulamalarP^submenuAction:$%*[Uygulamalar1&')#   #!(kzelle_tir &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.~XMainMenu1&'()*+0PX`w)224-!221"SX11:4<*31O1>?@ABCDEFGHIJ469:?@CDGIKL)2Q2!5lX11 Hakk1nda2XY287\Tercihler...Q,22  2kkm2!<<;"YServislersmu*=;>1w)__NSServicesMenu22  22BAoTam Ekran1 A/KapatQa22  2UNSTag2F*EkX11 i GizleQh22FHoDierlerini Gizle22!JmTmn Gster22  22NMkX11 den 1kQq\_NSAppleMenu-!RRQ"[UygulamalarST*[Uygulamalar1׀UV)R  R!Wmzelle_tir...-!ZZY"eDzen[\*eDzen1])Z_^WKopyalaQc  -!bba"WPencere*cav1 dgjlmpst) &'bfeUKapatQw /0bihoSimge Durumuna KltQm 9b!klByt/Klt b   IJbonoPencereler Aras1nda Dola_Q` PSTbrqo&Pencereler Aras1nda Geriye Doru Dola_Q~ b   fb!uoTmn ne Getir^_NSWindowsMenuooq-!yyx"fYard1mvwz{*fYard1m1{||)oy!}jX11 Yard1m[_NSMainMenuTmenu U^apps_separator Ȁ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ǀR #@À#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews: 9; 8Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  =; <Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&')+-./1345+9:<]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification>2J#@#? BEDOA A AA#?7_{{302, 1}, {16, 28}}+,?@]_NSCornerView?/1BCDE)HIJKLMNOQRSTUWX\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[N#@O]`[\]^_`abcdef[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@RAdijklmnopqVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFonttuv_NSFontDescriptorAttributesx1y}WNS.keysz{|~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/TWNSWhite\NSColorSpaceM0.3333329856+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorT\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell[\]^_]NSControlView0AmMetin Hcresiijlpq#@*TB1_controlTextColor+,פ/+,]NSTableColumn/HIJKLMNOSTU #@U#@D[\]^_`abefUKomutTM0.3333329856[\]^_ƀmMetin HcresiHIJKLMNOSTU #@M#@$[\]^_`abefXKestirme [headerColor TB1C1 1[\]^__NSDrawsBackground mMetin Hcresiijlpq#@("$_controlBackgroundColor'(TL0.602715373N0.6666666667 1-/ĀYgridColor23TM0.4246723652E0.5 1+,78[NSTableView79/YNSControlZapps_table>? ʀԀBFHIKLFVNSCellˀ ̀̀ TVW Y_{{15, 245}, {402, 18}}][^_`_a]b\cdefgj>lTnop_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !πʀ΀o(Etkin Olmayan Pencerelere T1klayarak Gestu[NSImageNameЀXNSSwitch+,xy_NSButtonImageSourcex/+,{|\NSButtonCell{/+,~XNSButton~9/]click_through ]ր^copy_menu_item ؀BHŀـ ڀۀ Vo Yb_{{71, 227}, {128, 26}}c^[]__`d\bTne _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPosition؀@ @@ !܀ijlpq WNSStateހۀ!*XEkrandan__popUpItemAction:ZOtherViews1Հ݀)ހ!X256 Renkހ!XBinlerceހ![Milyonlarca+,_NSPopUpButtonCell{/^NSMenuItemCell+,]NSPopUpButton~9/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator BHI#$ŀ ,V/ Y_{{18, 243}, {402, 18}}][^_`_a]b\cdefgj9Tnop!πoBalant1larda kimlik dorula[enable_authAB BHILMŀـ _{{18, 182}, {409, 23}}][^_`_a]b\cdefgjAYTnop!π^Tam ekran modu_enable_fullscreenab BHIlmŀـ  _{{37, 116}, {409, 23}}][^_`_a]b\cdefgjayTnop!ρo0Tam ekran modunda men ubuu eri_imine izin ver_enable_fullscreen_menu BH_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidthـ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}[\]^_f   @o\Fare imleci birincil ekran1n1z1n en stne yerle_tirildiinde men ubuu grnr olacakt1r.ijlmpq $ \controlColor+,[NSTextField9/_enable_fullscreen_menu_text BHIƀ  V XY@@B_{{18, 130}, {402, 18}}BH CD #@w2][^_`_a]b\cdefgjTnop!ρo*X11 alt1nda tu_ kar_1l1klar1n1 etkinle_tir_enable_keyequivs BHIŀ  _{{18, 166}, {402, 18}}][^_`_a]b\cdefgj Tnop!ρo)A istemcilerinin balant1lar1na izin verZenable_tcp $BHI$  " !_{{18, 243}, {402, 18}}BHI./5 NO F][^_`_a]b\cdefgj;Tnop!ρ#o dmeli fareye ykn\fake_buttonsCD &*BFHINOFŀˀ '( _{{15, 184}, {402, 18}}][^_`_a]b\cdefgjC[Tnop!ρ&)_Odak Fareyi Takip Eder_focus_follows_mousecd ,0BFHInoFŀˀ -. _{{15, 140}, {402, 18}}][^_`_a]b\cdefgjc{Tnop!ρ,/_Yeni Pencerelere Odaklan_focus_on_new_window 27BHI 35 4_{{18, 69}, {402, 18}}BH QS R][^_`_a]b\cdefgjTnop!ρ26o&Option tu_lar1 Alt_L ve Alt_R gnderir_option_sends_alt 9T\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_'{{266, 365.03906000000001}, {599, 340}}^X11 TercihleriWNSPanelZ{320, 240}VY ?1́@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels\[ Z>> A 1)15 $FH!42R)_{{36, 93}, {385, 31}}[\]^_f  EopEtkinle_tirildiinde, men ubuu tu_ kar_1l1klar1 Meta niteleyicisini kullanan X11 uygulamalar1yla eli_ebilir.BH#$  GI H_{{36, 195}, {385, 42}}BH56< KL #@|[\]^_f5CF  JolOrtadaki veya sadaki fare dmelerini etkinle_tirmek iin t1klarken Option veya Komut tu_unu bas1l1 tutun. _{{36, 159}, {461, 14}}[\]^_f LH  MoVGiri_ mens dei_ikliklerinin _u anki X11 tu_ e_leminin zerine yazmas1na izin verir._{{18, 179}, {402, 18}}][^_`_a]b\cdefgj$UTnop!ρ!Po$Sistemin klavye yerle_imini takip et_{{36, 32}, {385, 31}}BHIbc̀ UV @[\]^_fo4  ToeEtkinle_tirildiinde, Option tu_lar1 Mode_switch yerine Alt_L ve Alt_R X11 tu_ sembollerini gnderir._{{18, 8}, {418, 18}}][^_`_a]b\cdefgjxTnop!ρRWo)Her zaman parma1n hareket ynnde kayd1r_{{10, 33}, {553, 279}}+,~/_{{13, 9}, {573, 325}}1\`q)VNSViewYNSTabView\NSIdentifier _^@]Q1eGiri_+,]NSTabViewItem/ _فp@aQ21Aa؁cgk)BHـ de #@N_{{17, 231}, {64, 20}}[\]^_fc fXRenkler:BHӁـ hi #@x@_{{36, 212}, {392, 14}}[\]^_fg  jo8Bu seenek X11 yeniden ba_lat1ld11nda etkili olacakt1r.BHـ lm _{{36, 145}, {385, 31}}[\]^_fk  noX11 kk penceresini etkinle_tirir. Tam ekran moduna gemek ve tam ekran modundan 1kmak iin Komut-Option-A tu_lar1n1 kullan1n._{{10, 33}, {553.21875, 279}}e1k1_ _r@aV Ys1     tx|)BHIŀr uv r_{{18, 255}, {409, 23}}][^_`_a]b\cdefgj (Tnop!ρtwoE_zamanlamay1 etkinle_tirBH56r yz r_{{36, 221}, {385, 28}}[\]^_f Bx  {o"Kopyala" men esini etkinle_tirir ve OSX yap1_t1rma alan1yla X11 CLIPBOARD ve PRIMARY arabelleklerinin e_zamanlanmas1na izin verir.BHIMNŀr }~ r_{{34, 129}, {409, 23}}][^_`_a]b\cdefgj ZTnop!ρ|o2Yap1_t1rma alan1 dei_tiinde CLIPBOARD u gncelleBHIfgŀr  r_{{34, 109}, {511, 18}}][^_`_a]b\cdefgj sTnop!ρoLYap1_t1rma alan1 dei_tiinde PRIMARY yi (ortadaki dmeyi t1klama) gncelleBHIŀr  r_{{34, 79}, {409, 23}}][^_`_a]b\cdefgjTnop!ρo:Yeni metin seildiinde Yap1_t1rma Alan1 n1 hemen gncelleBHIŀr  r_{{34, 192}, {409, 23}}][^_`_a]b\cdefgjTnop!ρo3CLIPBOARD dei_tiinde Yap1_t1rma Alan1 n1 gncelleBHr  r_{{48, 158}, {385, 28}}[\]^_f  opxclipboard u, klipper 1 veya ba_ka bir X11 pano yneticisini kullanmak istiyorsan1z bu seenei etkisizle_tirin.BHҁr  r#@v_{{48, 47}, {370, 28}}[\]^_f  obX11 protokolndeki s1n1rlamalardan dolay1, bu seenek baz1 uygulamalarda her zaman al1_mayabilir._{{10, 33}, {553.21875, 279}}oYap1_t1rma Alan1F _ˁ@a1>Ccʁ&,)BFHFˀ  #@}_{{23, 197}, {480, 42}}[\]^_f   oEtkinle_tirildiinde; etkin olmayan bir pencereyi t1klamak, pencerenin etkinle_tirilmesinin yan1 s1ra o fare t1klamas1n1n o pencereye geirilmesine de neden olacakt1r.BFH  Fˀ  _{{23, 161}, {385, 17}}[\]^_f   oGX11 pencere oda1 imleci takip eder. Bunun baz1 yan etkileri olabilir.BFH * +F 1ˀ  #@v_{{23, 92}, {367, 42}}[\]^_f 8  oEtkinle_tirildiinde; yeni bir X11 penceresinin yarat1lmas1, X11.app uygulamas1n1n ne gelmesine (Finder.app, Terminal.app vb. yerine) neden olacakt1r._{{10, 33}, {553.21875, 279}}ZPencereler @_@ 1 D G H I)BH T U [  #@|t_%{{36, 195}, {463.73827999999997, 42}}[\]^_f G b  oX11 i ba_latma, Xauthority eri_im denetimi tu_lar1n1 yaratacakt1r. Sistemin IP adresi dei_tiinde bu tu_lar geersiz olur ve bu durum X11 uygulamalar1n1n ba_lamas1n1 engelleyebilir.BH n o u  #@{_{{36, 104}, {449, 56}}[\]^_f H |  oEtkinle_tirildiinde, sistem gvenliini salamak iin Balant1larda kimlik dorula seeneinin de etkinle_tirilmesi gerekir. Etkisizle_tirildiinde, uzaktaki uygulamalar1n balant1lar1na izin verilmez.BH     #@y_{{17, 17}, {404, 14}}[\]^_f I   oABu seenekler X11 in bir sonraki ba_lat1l1_1nda etkili olacakt1r._{{10, 33}, {553, 279}}hGvenlik+, YNSTabView /Z{599, 340}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel R_scroll_in_device_direction €_sync_clipboard_to_pasteboard$ !Ā[sync_keymap tƀ_sync_pasteboard |Ȁ_sync_pasteboard_to_clipboard ʀ_sync_pasteboard_to_primary ̀_sync_primary_immediately ΀Zsync_text1 ЀZsync_text2D @Ҁ_toggle_fullscreen_item? 4Ԁ^x11_about_item t ց_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  g ف_minimize_window:?  4ہ_orderFrontStandardAboutPanel:@  6 ݁[prefs_show:F  D߁Uhide:J  LZterminate:G G_hideOtherApplications:H & I_unhideAllApplications: + ]Ucopy: 1 d ]close_window: 7 j \zoom_window: ; =  B @ A+HI  I J+_NSHuggingPriority   V U YY 6K_{{340, 191}, {100, 32}}][^_`_]b\cdef \ _ ; a bon@ !Ҁfoalt_apps_table_duplicate: h j  B @ A+HI  t u+  _{{340, 159}, {100, 32}}][^_`_]b\cdef \ _ h bon!ҀSSil_apps_table_delete: V _apps_table_show:  B @ A+HI   +  _{{340, 223}, {100, 32}}][^_`_]b\cde \ _ bon!Ҁhe Ekle_apps_table_new:  ^prefs_changed:  ^prefs_changed:$ ! ^prefs_changed: ^prefs_changed:   ^prefs_changed: ؀  ^prefs_changed:| | Yx11_help: ' _apps_table_show: m \next_window: p _previous_window:A _enable_fullscreen_changed:D @ _toggle_fullscreen:> ʀ ^prefs_changed:C & ^prefs_changed:c  , ^prefs_changed: t  ^prefs_changed:  | "^prefs_changed:   $^prefs_changed:   &^prefs_changed: !  (^prefs_changed:a '  *^prefs_changed: - 2 ,^prefs_changed: 3 R .^prefs_changed:1 7 Я 8'2?@ABkCDEFGHIJ()*  +o|5$ 6$/cAMam  6 N gF>LCO co +$ G U H o I + ; J h uCQDE)3 0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&'I& (1]NSApplication +    34MN L5<! _{{302, 440}, {454, 271}}oX11 Uygulama MensZ{320, 240}1 ; h 􀋁)1 )3>B)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 Հ)_{{1, 1}, {301, 28}}   H    _NSControlTarget_NSControlActionA ?@@_{{1, 215}, {301, 15}}\_doScroller:+,  ZNSScroller 9/  H  )  A C@@_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 3 С 4FI 7 8 9 : ; < =   @_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionHG__panWithGestureRecognizer:+, C D_NSPanGestureRecognizer E F/_NSPanGestureRecognizer_NSGestureRecognizer+, H/+, J K\NSScrollView J/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 Q Я'2222B22222222()*        +o5 $Aa    F>FFCFFcF G H I + ;+ h+CDE+ -02222:22222222-PRR-XZ-`bbbbbbbb-wy9>@\FH!42R@`ـ؀ۀހހހހفcفgـففkف@qrtrxr|rrrrr@ˀʀˁˁ&ˁˁ,ˁ@2##I1 Я 8'2?@ABkCDEFGHIJ()*  +o|5$ 6$/cAMam  6 N gF>LCO co +$ G U H o I + ; J h uCQDE)3 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~0-02469:@\"DFIHL!O4S25RV`ـ؀ۀހ݀cegikm qrtvxz|~ˀʀ́&(,.2>B#&' ,ɀՀ׀%+18ÁŁǁɁˁ́ρсӁՁ؁ځ܁ށ   !#%')+-I1 Я        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~RSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./0I     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 РI+,^NSIBObjectData/",1:?QZw(/=J\j&/:CRW`ituw 4 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   ) 1 Y [ ] _ a c l n p ~       I W ^ r  & 4 6 8 : < > @ H Z g r }     ( - Z c m v x z | ~    /13579;R[jqy,.02468:<>BSUWY[d}>@BCEGHJLy{}$&+-/135^`  ;`bdfhjl>@BDFHJLNP\ikmo{;=?ACEGIKMXegikv&79;=?ACEGIjlnprtv|~ IKMNPRSUWxz|~<>giklnpqsu    -/13@ILNPqsuwy{}&1Mc~+Lg+7Agv  `js-9QRTVXY[]_ac 579:<>@BD   & 3 E G J L O Q V Y b d m n q t w y { ~ !!$!/!9S9V9Z9\9^9999999999999999999:::/:<:K:M:O:d:f:h:j:l:v::::::::::::::::;R;Y;[;\;];_;a;c;e;f;h;j;l;m;o;p;q;;;;;;;;;;<<<'<=?>A>B>C>E>G>I>J>L>N>P>Q>S>T>U>~>>>>>>>>>>???1?N?Y?k?m?o?t?}??????????????????????????@@ @@(@1@:@<@>@@@B@D@q@s@u@w@y@{@}@@@@@@@@@@@@@@@AAAAA A A AAAAA(AGIGnGqGsGvGyG|G~GH>HOHRHTHVHkHmHpHrHtHHHHHHHHHHHI?IAIBICIFIHIJIKINIQISITIWIXIYI\IIIIIIIIIIIIJ*J-J/J0J1J4J6J9J:J=J@JBJCJFJGJHJQJTJJJJJJJJJK K"K$K&K)K,K.KKKKKKKKKKKKKKKKKKKKLLLL L^LiL~LLLLLLLLLLLLLLLLLMMMMMM~MMMMMMMMMMMMMMMMMMMMMMMNN(N=N?NANDNGNINNNNNNNNNNNNNNNNOOOOOO O"O$O=OSOhOjOlOoOrOtOOOOOOOOOOOOOOOPP?PAPCPEPHPKPMPOPjPPPPPPPQQQQQQ Q Q QQQQQQQQQ5QQQQQQQQQQQQQQQQQRRRRR R RRR_RrRRRRRRRRSSS'S4S>STSkSSSSSSSTTT(T+T-T0T3T6T9TX?XBXEXGXHXKXLXMXVXYX~XXXXXXYiYYYYYYYYZfZZZZZZZZZ[[1[[[[[[[[[[[[[[[[[[[[[[[\\]]] ] ]]]]]j]]]]]]]]]]]]]]]^^ ^ ^^^^^^&^/^=^B^[^^^a^c^f^i^l^n^w^^^^^^^^^_____ _ _ __________'_?_d_g_i_k_n_q_s_|________________``!`F`I`K`N`Q`T`V`a0a3a5a6a7a9a;a>a?aBaEaGaHaJaKaLaeaaaaaaabbbbbbbbbbccccc"c%c'c)c+c4cEcHcKcNcQcTcWcZc]c_ccccccccccccccccd,d.d0d2d5d8d:dr?rArBrCr\rrrrrrrs"sssssssssssssssssssssssssu,uKuVukunupusuvuyuuuuuuuuvvv v v v vvvvvvvvvv v)vQvvvyv{v~vvvwx\x_xaxbxcxexgxjxkxnxqxsxtxvxwxxxxxxxxxxxzfzzzzzzzzzzzzzzzzz{ {/{2{4{7{:{={?{{{{|| ||.|9|\|f|m|v||||||||||||||||}}-}/}1}4}7}9}E}Z}\}^}a}d}f}x}}}}}}}}}}}}}}~ ~ ~~~~~2~G~I~K~N~Q~S~^~s~u~w~z~}~~~~~~~~~~~~~~~~  (@GVgiknq"->@BEHartvy|ÀŀȀˀـ|فہށ߁>GIKPSVXZ\i 3lnpsvxz~҃Ճ׃ڃ݄<>?@CEGHKNPQTUVYsÄԄ"%'*-@BDFHJLNPRTVX[^adgjmpsvy|ÊƊɊ̊ϊҊՊ؊ۊފ  #&),/2468;>ADGJMPSVY\_bdfhjlnprtwz|  #%')DmxŒŌnjɌ "$&<Ǎɍˍ͍̍ύэӍ֍׍ڍ܍ލ *Ŏގ >bƏ ,3LbkpyǐВ !#%')+-/13579;=?ACEGIKMOQTWZ]`cfilorux{~Ēǒʒ͒ВӒْ֒ܒߒ  #%'),.1368;=@CFILOQSUWY[]_acehkmoqsuwzFHKMOQSUWY[]_acegikmoqsuwy{}•ŕȕ˕Εѕԕוڕݕߕ !$'*-0369ADGJMPSVY\_behknqtwz}adgilorux{~Ùƙə̙ϙҙՙؙۙޙ  #&),/258;>ADGJMPSVY\_behknqtwz}šŚȚ˚ΚњԚךښݚ "%(+.147:=@CFILORUX[^adgjmpsvy|ěǛʛ͛Лӛ֛ٛܛߛ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ĝ͝xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/Localizable.strings0000644000175000017500000001065614757411105022630 /* Dialog title when quitting */ "Do you really want to quit X11?" = "Gerekten X11 den 1kmak istiyor musunuz?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "A1k X11 uygulamalar1 hemen durdurulacak ve kaydedilmemi_ dei_iklikleriniz kaybolacakt1r."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "RandR moduna geilsin mi?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "Bir uygulama X11 in ekran1n1z1n znrln dei_tirmesini istedi. 0stei yapan uygulama nceki duruma dndrmeyi istediinde, X11 ekran1 nceki durumuna dndrecektir. Bunun yerine, X11 i nceki duruma dndrmeye zorlamak iin #%#A tu_ birle_imini de kullanabilirsiniz."; /* No comment provided by engineer. */ "Allow" = "0zin Ver"; /* No comment provided by engineer. */ "Always Allow" = "Her Zaman 0zin Ver"; /* No comment provided by engineer. */ "Cancel" = "Vazge"; /* No comment provided by engineer. */ "Mac Help" = "Mac Yard1m"; /* No comment provided by engineer. */ "Quit" = "1k"; /* No */ "No" = "Hay1r"; /* Yes */ "Yes" = "Evet"; /* Terminal */ "Terminal" = "Terminal"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "nceden bir ~/.xinitrc dosyan1z var.\n\nX11 uygulamalar1 taraf1ndan grntlenen pencereler ba_l1k ubuklar1na sahip olmayabilir veya zgn uygulamalar taraf1ndan grntlenen pencerelerden farkl1 grnebilir.\n\nX11 i bir sonraki ba_lat1_1n1zda var olan dosyay1 bir kenara ay1r1p standart X11 ortam1n1 kullanmak ister misiniz?"; /* window item modifiers */ "window item modifiers" = "komut"; /* Updates menu title & */ "Check for X11 Updates..." = "X11 Gncellemelerini Denetle &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/tr.lproj/locversion.plist0000644000175000017500000000061014757411105022221 LprojCompatibleVersion 106.5 LprojLocale tr LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/0000755000175000017500000000000014757411136017042 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/main.nib/0000755000175000017500000000000014757411136020535 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/main.nib/designable.nib0000644000175000017500000021212614757411105023244 Якщо увімкнено, то клавіатурні скорочення смуги меню можуть заважати скороченням програм Х11, в яких використовується Meta-клавіша. Утримуйте клавіші Option і Command під час клацання, щоб активувати середню чи праву кнопки мишки. Активує елемент меню «копіювати» та дозволяє синхронізацію між компонуванням OS X і буфером обміну Х11, а також первинними буферами. Якщо цю функцію ввімкнено, то створення нового вікна Х11 в активному режимі призведе до того, що програма Х11 переміститься на передній план (замість програм Finder, «Термінал »тощо) Запуск X11 створить ключі контролю доступу Xauthority. У разі змінення ІР-адреси системи ці ключі втратять дійсність, що завадить запуску програм Х11. У разі ввімкнення цього параметру необхідно також увімкнути параметр «Аутентифікація з’єднань», щоб забезпечити захист системи. Якщо цей параметр вимкнено, під’єднання віддалених програм заборонені. xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/main.nib/keyedobjects.nib0000644000175000017500000013664614757411105023636 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  $)*/45 :>?EU^_tuyz}  -67?@AGVW_`agvw&'7?@AGVW_`agvw01BIJKRST\]^nuvw '(01BCJKZ[cdst|}      & ' 7 8 ? @ A B H P a b i j { |        ! " ' ( - . 2 3 8 9 > ? D V _ ` j k l q         " # ( ) . / 4 5 : ;      ! $ 5 6 7 ; F G L N Q R S T U  g h      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d5=N1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h@>3@0<8P^submenuAction:$%*h@>3@0<81&')#   #!(h<V=8B8 &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5g@> %112XY287j0@0<5B@8 &Q,22  2kkm2!<<;"g!5@2VA8stu*>=?g!5@2VA81x)__NSServicesMenu22  22CBo&#2V<:=CB8/28<:=CB8 ?>2=>5:@0==89 @56820B8 %11Qh22GIm!E>20B8 @5HBC22!Kl>:070B8 2AV22  22ONm025@H8B8 %11Qq\_NSAppleMenu-!SSR"h@>3@0<8TU*h@>3@0<81؀VW)S  S!Xj0AB@>WB8 &-![[Z"k 5403C20==O\]*k 5403C20==O1^)[`_j!:>?VN20B8Qc  -!ccb"eV:=>*edxeV:=>1 !"filnoruv) ()chgg0:@8B8Qw 12ckjh3>@=CB8Qm ;c!ml?B8<V7C20B8 c   KLcqpn0ABC?=5 2V:=>Q` RUVctso>?5@54=T 2V:=>Q~ c   hc!wkAV =0?5@54^_NSWindowsMenuqqs-!{{z"g>2V4:0xy|}*g>2V4:01}~~)q{!k>2V4:0 %11[_NSMainMenuTmenu V^apps_separator ʀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ɀR@#@ŀ#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@\#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@e0720mnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView0Ao"5:AB>20 :;VB8=:0mnptu#@*XB1_controlTextColor+,ۤ/+,]NSTableColumn/LMNOPQRSWXY #@Y@#@D_`abcdefijg><0=40XK0.33333299_`abcʀo"5:AB>20 :;VB8=:0LMNOPQRSWXY #@S #@$_`abcdefijj!:>@>G5==O [headerColorXB1C1 1_`abc_NSDrawsBackground €o"5:AB>20 :;VB8=:0mnp !tu#@(&(À_controlBackgroundColor+,XL0.602715373N0.6666666667 113ƀYgridColor67XM0.4246723652E0.5 1+,;<[NSTableView;=/YNSControlZapps_tableBC ̀րFJLNOJVNSCell̀ ΀π WYZ [_{{15, 245}, {402, 18}}`_abccdae`fghijmBoXqrs_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo0B8A:0==O =50:B82=8E 2V:>=vwx[NSImageNameҀXNSSwitch+,{|_NSButtonImageSource{/+,~\NSButtonCell~/+,XNSButton=/]click_through ^؀^copy_menu_item ڀFȀۀ ܀݀ Yq [d_{{85, 234}, {128, 26}}fa_`cbcg`eXqh _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހmnptu WNSState݀!*lO: C 48A?;5O__popUpItemAction:ZOtherViews1؀߀)!l256 :>;L>@V2!fB8AOGV!h<V;L9>=8+,_NSPopUpButtonCell~/^NSMenuItemCell+,]NSPopUpButton=/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator F"L&'"Ȁ /Y2 [_{{18, 243}, {402, 18}}`_abccdae`fghijm<Xqrs!рoCB5=B8DV:0FVO 7 T4=0=L[enable_authDE FLOPȀۀ _{{18, 182}, {409, 23}}`_abccdae`fghijmD\Xqrs!рo>2=>5:@0==89 @568<_enable_fullscreende FLopȀۀ  _{{37, 121}, {418, 18}}`_abccdae`fghijmd|Xqrs!сo6>72>;8B8 4>ABC? 4> A<C38 <5=N 2 ?>2=>5:@0==><C @568<V_enable_fullscreen_menu F_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@v`_{{54, 84}, {362, 31}}Z{250, 750}_`abci  @oY!<C30 <5=N AB0T 2848<>N, :>;8 :C@A>@ <8H:8 @>7<VI5=> C 25@E=V9 G0AB8=V >A=>2=>3> 48A?;5O.mnpqtu (\controlColor+,[NSTextField=/_enable_fullscreen_menu_text FLɀ  Y !Z[AAC_{{18, 130}, {402, 18}}FL 46 5`_abccdae`fghijmXqrs!сo&#2V<:=CB8 :;02V0BC@=V A:>@>G5==O 2 X11_enable_keyequivs F"L"Ȁ  _{{18, 166}, {402, 18}}`_abccdae`fghijm Xqrs!сo(>72>;8B8 ?V4 T4=0==O <5@56528E :;VT=BV2Zenable_tcp !&FL% "$ #_{{18, 243}, {402, 18}}FL/06 PQ H`_abccdae`fghijm<Xqrs!с!%o <C;OFVO <8H:8 7 B@L><0 :=>?:0<8\fake_buttonsDE (,FJLOPJȀ̀ )* _{{15, 184}, {402, 18}}`_abccdae`fghijmD\Xqrs!с(+o$>:CA ?@O<CT 70 :C@A>@>< <8H:8_focus_follows_mousede .2FJLopJȀ̀ /0 _{{15, 140}, {402, 18}}`_abccdae`fghijmd|Xqrs!с.1o$>:CAC20==O =0 =>28E 2V:=0E_focus_on_new_window 8_{{18, 69}, {402, 18}}F  DF #@z E`_abccdae`fghijmXqrs!с7o0;02VHV Option =04A8;0NBL :><0=48 Alt_L B0 Alt_R_option_sends_alt :X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_ {{266, 364.0390625}, {545, 341}}m0@0<5B@8 %11WNSPanelZ{320, 240}Yڀ[ @1ρA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \?? B 1)16%!5HJ#ET)_{{36, 82}, {422, 42}}F   SU #@zT_`abci5 Go/:I> C2V<:=5=>, B> :;02V0BC@=V A:>@>G5==O A<C38 <5=N <>6CBL 702060B8 A:>@>G5==O< ?@>3@0< %11, 2 O:8E 28:>@8AB>2CTBLAO Meta-:;02VH0.F'(.  IK #@{J_{{36, 195}, {444, 42}}F:;.  MN _`abci6GH Loc#B@8<C9B5 :;02VHV Option V Command ?V4 G0A :;0F0==O, I>1 0:B82C20B8 A5@54=N G8 ?@02C :=>?:8 <8H:8. _{{36, 159}, {444, 14}}_`abciPJ OoL#2V<:=VBL, I>1 7<V=8 2 <5=N :;02V0BC@ 7<V=N20;8 :;02V0BC@=C @>7:;04:C 2 %11._{{18, 179}, {402, 18}}`_abccdae`fghijm%YXqrs!с#Ro+0AB>A>2C20B8 A8AB5<=C @>7:;04:C :;02V0BC@8_{{36, 32}, {431, 31}}FLfgπ WX A_`abcisE Von/:I> FN DC=:FVN 22V<:=5=>, :;02VHV Option =04A8;0B8<CBL A8<2>;8 :;02VH Alt_L B0 Alt_R %11 70<VABL Mode_switch._{{18, 8}, {418, 18}}`_abccdae`fghijm|Xqrs!сTYo*02648 ?@>:@CGC20B8 2 =0?@O<:C @CEC ?0;LFO_{{10, 33}, {499, 279}}+,/_{{13, 10}, {519, 325}}1^bs)VNSViewYNSTabView\NSIdentifiera`A_Q1h2545==O+,]NSTabViewItem/aہrAcQ21Ddځeim)F ۀ fg #@O_{{17, 238}, {66, 20}}_`abciehh>;L>@8:Fׁ ۀ jk #@x@_{{36, 216}, {392, 14}}_`abcii lo:&59 ?0@0<5B@ =015@5 G8==>ABV ?VA;O =0ABC?=>3> 70?CA:C %11.F ۀ no #@yp_{{36, 145}, {411, 42}}_`abcim poy<8:0T :>@5=525 2V:=> %11. ;O C2V<:=5==O/28<:=5==O ?>2=>5:@0==>3> @568<C 28:>@8AB>2C9B5 :><1V=0FVN :;02VH Command-Alt-A._{{10, 33}, {499, 279}}i82545==OatAcY  [u1vz~)FL !Ȁt wx t_{{18, 255}, {409, 23}}`_abccdae`fghijm-Xqrs!сvyo#2V<:=CB8 A8=E@>=V70FVNF:;A t {| t#@z`_{{36, 221}, {426, 28}}_`abciHz }o:B82CT 5;5<5=B <5=N :>?VN20B8 B0 4>72>;OT A8=E@>=V70FVN <V6 :><?>=C20==O< OS X V 1CD5@>< >1<V=C %11, 0 B0:>6 ?5@28==8<8 1CD5@0<8.FLSTȀt  t_{{34, 135}, {457, 18}}`_abccdae`fghijm`Xqrs!с~o==>2;N20B8 1CD5@ >1<V=C ?V4 G0A 2=5A5==O 7<V= 4> :><?>=C20==OFLlmȀt  t_{{34, 97}, {380, 34}}`_abccdae`fghijmyXqrs!сoG=>2;N20B8 ?5@28==89 1CD5@ >1<V=C ?V4 G0A 2=5A5==O 7<V= 4> :><?>=C20==OFLȀt  t_{{34, 75}, {434, 18}}`_abccdae`fghijmXqrs!сo9=>2;N20B8 :><?>=C20==O, I>9=> =>289 B5:AB 1C45 284V;5=>.FLȀt  t_{{34, 195}, {447, 18}}`_abccdae`fghijmXqrs!сo<=>2;N20B8 :><?>=C20==O ?V4 G0A 2=5A5==O 7<V= C 1CD5@ >1<V=CF t  t#@z_{{48, 161}, {434, 28}}_`abci ou8<:=VBL FN >?FVN, O:I> 28 E>G5B5 28:>@8AB>2C20B8 Eclipboard, klipper 01> 1C4L-O:89 V=H89 <5=5465@ 1CD5@C >1<V=C %11.F t  t_{{48, 41}, {434, 28}}_`abci oN'5@57 >1<565==O 2 ?@>B>:>;V %11 FO >?FVO <>65 =5 ?@0FN20B8 2 45O:8E ?@>3@0<0E._{{10, 33}, {499, 279}}l><?>=C20==OJáAc1BDd́(.)FJJ  ̀  #@{_{{23, 208}, {437, 31}}_`abci  ob/:I> =0B8A=CB8 =50:B82=5 2V:=> 2 0:B82=><C @568<V, B> <8H:0 ?@>945 G5@57 F5 2V:=> B0 0:B82CT 9>3>.FJ  J. ̀  _{{23, 150}, {444, 28}}_`abci $ oJ$>:CA 2V:=0 %11 ?@O<CT 70 :C@A>@><. &5 <>65 <0B8 45O:V =530B82=V =0A;V4:8.FJ 0 1J  ̀  _{{23, 78}, {437, 56}}_`abci = o/:I> FN DC=:FVN 22V<:=5=>, B> AB2>@5==O =>2>3> 2V:=0 %11 2 0:B82=><C @568<V ?@872545 4> B>3>, I> ?@>3@0<0 %11 ?5@5<VAB8BLAO =0 ?5@54=V9 ?;0= (70<VABL ?@>3@0< Finder, "5@<V=0; B>I>)_{{10, 33}, {499, 279}}eV:=0" EaA1 I L M N)F" Y Z" `   #@z@_{{36, 195}, {424, 42}}_`abci L g o0?CA: X11 AB2>@8BL :;NGV :>=B@>;N 4>ABC?C Xauthority. # @07V 7<V=5==O  -04@5A8 A8AB5<8 FV :;NGV 2B@0BOBL 4V9A=VABL, I> 702048BL 70?CA:C ?@>3@0< %11.F" s t" z   #@y_{{36, 104}, {416, 56}}_`abci M  o# @07V 22V<:=5==O FL>3> ?0@0<5B@C =5>1EV4=> B0:>6 C2V<:=CB8 ?0@0<5B@ CB5=B8DV:0FVO 7 T4=0=L, I>1 70157?5G8B8 70E8AB A8AB5<8. /:I> F59 ?0@0<5B@ 28<:=5=>, ?V4 T4=0==O 2V440;5=8E ?@>3@0< 701>@>=5=V.F"  "    #@y_{{17, 17}, {404, 14}}_`abci N  o<&V ?0@0<5B@8 =015@CBL G8==>ABV ?VA;O =0ABC?=>3> 70?CA:C %11._{{10, 33}, {499, 279}}k"8? 70E8ABC+, YNSTabView /Z{545, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard% #ƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  i ہ_minimize_window:? 4݁_orderFrontStandardAboutPanel:@  6 ߁[prefs_show:F  EUhide:J  MZterminate:G % H_hideOtherApplications:H + J_unhideAllApplications: 0 ^Ucopy: 6 f ]close_window: < l \zoom_window: @ B  F E F/L  N O/_NSHuggingPriority    Y Z ^[ 8M_{{347, 191}, {139, 32}}`_abccae`fghi a d @ f grq@ !ԀiC1;N20B8_apps_table_duplicate: m o  F E F/L  y z/   _{{347, 159}, {139, 32}}`_abccae`fghi a d m grq!Ԁh840;8B8_apps_table_delete: W _apps_table_show:  F E F/L   /   _{{347, 223}, {139, 32}}`_abccae`fgh a d grq!Ԁn>40B8 5;5<5=B_apps_table_new: ! ^prefs_changed:  ^prefs_changed:% # ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:D _enable_fullscreen_changed:D A _toggle_fullscreen:B ̀ ^prefs_changed:D  ( ^prefs_changed:d  .  ^prefs_changed:  v "^prefs_changed:  ~ $^prefs_changed:   &^prefs_changed:  (^prefs_changed: &  *^prefs_changed:d ,  ,^prefs_changed: 2  .^prefs_changed: 8 T 0^prefs_changed:1 < կ ='2?@ABkCDEFGHIJ()*  !"+q~6(;%0gDPdp!;TmJBODP dp 1"' L Z M t N / @ O m zGUHI-7 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A^!$5FHKJN#QEU6TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication /    56OP N7=! _{{302, 440}, {500, 271}}o5=N ?@>3@0< %11Z{320, 240}1 @ m )1 -7@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $     _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+, " #ZNSScroller "=/    .  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 8 ա 9HK < = > ? @ A B   E_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, H I_NSPanGestureRecognizer J K/_NSPanGestureRecognizer_NSGestureRecognizer+, M/+, O P\NSScrollView O/Z{500, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 V կ'2222B22222222()*        +q6%DdJBJJDJJdJ""" L" M" N / @/ m/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{:?A^!5HJ#ETAbۀڀ݀ہeہiۀہہmہAstvtzt~tttttÀ̀́́(́́.́A4##K1 կ ='2?@ABkCDEFGHIJ()*  !"+q~6(;%0gDPdp!;TmJBODP dp 1"' L Z M t N / @ O m zGUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A^!$5FHKJN#QEU6TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 կ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ՠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u        ! # % N \ c w  + 9 ; = ? A C E M _ l w    " - 2 _ h r { }  >@BDFHJ[dsz579;=?ACEGK\^`bdmEGIJLNOQS?AFHJLNP   (*KMOQSUWr ;=Jwy{} *,.0246Kxz|~LNPRTVXZ\^iz|~ "$57XZ\^`bd}!#(*,.02SU~ -:<>@OX[]_&;Fbx '@a| '3@LV|   )246?@BC  &Wc{|~#*6_acdfhjln   - 9 P ] o q t v y { !! !!!!!!A!N!Y!f!q!!!!!!!!!!!!!!!!"" ""$")"+"-"/"1"3"6"A"V"]"f"~""""""""""""""""""######7#W#r#{############$$$$$$1$=$K$S$U$W$Y$[$]$d$v$$$$$$$$$$$$$$$6666666666677-727476787:7<7>7A7f7w7777777777777777778 8!8#8%8'8(818:8<8]8_8a8c8e8g8v888888888889999999!9*9,9M9O9Q9S9U9W9l99999999999999999999:$:5:>:A:C:E:Z:\:^:`:b:{:::::::::::::;;;; ;;$;.;9;N;P;R;T;V;X;;;;;;;;;;;;;;;;;;;;<<<< < <$ >>!>#>%>'>)>>>>>>>>>>>>>>>>>>>>>>>>>?A?S?a?v????????????????????@@"@$@&@(@*@,@.@0@2@?@A@C@E@^@r@}@@@@@@@@@@@@@@@@@@AA A"A$A&A(A*A,A.A0A=AjAlAnApArAtAvAxAzA|AAAAAAAAABBB B B BBB3B5B7B9B;B=BGB\B^B`BbBdBfB~BBBBBBBBBBBCCCCCC C C C CC7C9CN@NBNENHNJNLNNNNNNNNOOOOOO O"O#O&O)O+O,O.O/O0OIOOOOOOOOOOPPPP P PPiPkPlPmPoPqPsPtPwPzP|P}PPPPPPPPPPPPQ"Q8QMQOQQQTQWQYQqQQQQQQQQQQQQQQQQRRRERGRIRKRNRQRSRURRRRRRRRS;SHShSvSSSSSSST T$T6T@TNTZTmTTTTTTTTTTTTTTTTTTTTTUU+U-U0U1U4U6U8U:U=UFUIULUNUUUUUUUUUUUUUUUUUVVVV VVVVV0V3V6V9VpWpppspvpxp{p~ppppppppppqqqqqqqqq q#q&q(q)q+q,q-q6qOqtqwqyq|qqqrKrrrrrrrrrrrrrrrrrs ssssssstttt t!t#t%t(t)t,t/t1t2t4t5t6tNtstvtxt{t~ttuv vv+v.v0v3v6v9vBvMvOvRvUvXv[v]vvvvvvvvvvvvvvvvvww'w*w,w/w2w5w7xfxxxxxxxxxxxxxxxxxy y0y3y5y8y;y>y@z{6{9{;{<{={?{A{D{E{H{K{M{N{P{Q{R{[{s{{{{{{{|#|<|S|\|f|o|z|||||||||}}}}}} }=}R}T}V}Y}\}^}}}}}}}}}}}}}}}}}}}}}}~~2~4~6~9~<~>~[~p~r~t~w~z~|~~~~~~~~~~~~~~~  (=?ACFHWhjlor$579OQSVYfwz| >@CDGIKMPjԂgijknprsvy{|׃كۃރ  #&9JMORUÄƄȄɄ̄̈́΄ф$-/1479;Xj{~хԅօم܅&)+.1@QSUX[j{}ΆІ҆Ն؆$&(+.K\^`cf{Ї &7:ADS\ŠĊƊȊʊ̊ΊЊҊԊ֊؊ڊ܊ߊ !$&(*,.0247:=@BDGJMPSVY\_behknqtwz}‹ŋȋˋ΋ыԋ׋ڋ݋ !#1Ȍ )+-0257@CEG^w!3EGIJKMOQTUXZ\_`ad|  "%&'*C\ehkn%Dadfhkʐ 1ADGJMPSVY\_behknqtwz}›śț˛Λћԛכڛݛ "%(+.147:=@CFILORUX[^adgjmpsvy|œĜƜȜʜ̜ΜМҜԜ֜؜ڜܜޜ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ĝƝȝʝ̝ΝНҝԝ֝؝ڝܝޝ  "$&(*346?@CL[`xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000013661514757411105024351 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata6 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI\ijtuyoV "'(-23 8<=CT]^stxy| ,56>?@FUV^_`fuv~ %&6>?@FUV^_`fuv~/0AHIJQRS[\]mtuv~ &'/0ABIJYZbcrs{|     % & 6 7 > ? @ A G O ` a h i z {         ! & ' , - 1 2 7 8 = > C U ^ _ i j k p         ! " ' ( - . 3 4 9 :       # 4 5 6 : E F K M P Q R S T J f g      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysSQ14435R&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ˀ׀ـ '-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*d5=N1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "h@>3@0<8P^submenuAction:$%*h@>3@0<81&')#   #!(h<V=8B8 &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5g@> %112XY287j0@0<5B@8 &Q,22  2kkm2!<<;"g!5@2VA8stu*>=?g!5@2VA81x)__NSServicesMenu22  22CBo&#2V<:=CB8/28<:=CB8 ?>2=>5:@0==89 @56820B8 %11Qh22GIm!E>20B8 @5HBC22!Kl>:070B8 2AV22  22ONm025@H8B8 %11Qq\_NSAppleMenu-!SSR"h@>3@0<8TU*h@>3@0<81؀VW)S  S!Xj0AB@>WB8 &-![[Z"k 5403C20==O\]*k 5403C20==O1^)[`_j!:>?VN20B8Qc  -!ccb"eV:=>*edxeV:=>1 !"filnoruv) ()chgg0:@8B8Qw 12ckjh3>@=CB8Qm ;c!ml?B8<V7C20B8 c   KLcqpn0ABC?=5 2V:=>Q` RUVctso>?5@54=T 2V:=>Q~ c   hc!wkAV =0?5@54^_NSWindowsMenuqqs-!{{z"g>2V4:0xy|}*g>2V4:01}~~)q{!k>2V4:0 %11[_NSMainMenuTmenu V^apps_separator ʀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ɀR #@ŀ#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews< ;= :Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  ?= >Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification@2L#@#? DGFOA A AA#?9_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@Y#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@e0720klmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView0Ao"5:AB>20 :;VB8=:0klnrs#@*VB1_controlTextColor+,٤/+,]NSTableColumn/JKLMNOPQUVW #@V #@D]^_`abcdghg><0=40VK0.33333299]^_`aȀo"5:AB>20 :;VB8=:0JKLMNOPQUVW #@P#@$]^_`abcdghj!:>@>G5==O  [headerColorVB1C1 1]^_`a_NSDrawsBackground €o"5:AB>20 :;VB8=:0klnrs#@($&À_controlBackgroundColor)*VL0.602715373N0.6666666667 1/1ƀYgridColor45VM0.4246723652E0.5 1+,9:[NSTableView9;/YNSControlZapps_table@A ̀րDHJKMNHVNSCell̀ ΀π VXY [_{{15, 245}, {402, 18}}_]`abac_d^efghil@nVpqr_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !р̀Ѐo0B8A:0==O =50:B82=8E 2V:>=uvw[NSImageNameҀXNSSwitch+,z{_NSButtonImageSourcez/+,}~\NSButtonCell}/+,XNSButton;/]click_through ^؀^copy_menu_item ڀDJǀۀ ܀݀ Xq [d_{{85, 234}, {128, 26}}e`]_aabf^dVpg _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionڀ@ @@ !ހklnrs WNSState݀!*lO: C 48A?;5O__popUpItemAction:ZOtherViews1׀߀)!l256 :>;L>@V2!fB8AOGV!h<V;L9>=8+,_NSPopUpButtonCell}/^NSMenuItemCell+,]NSPopUpButton;/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator D!JK%&!ǀ .X1 [_{{18, 243}, {402, 18}}_]`abac_d^efghil;Vpqr!рoCB5=B8DV:0FVO 7 T4=0=L[enable_authCD DJKNOǀۀ _{{18, 182}, {409, 23}}_]`abac_d^efghilC[Vpqr!рo>2=>5:@0==89 @568<_enable_fullscreencd DJKnoǀۀ  _{{37, 121}, {418, 18}}_]`abac_d^efghilc{Vpqr!сo6>72>;8B8 4>ABC? 4> A<C38 <5=N 2 ?>2=>5:@0==><C @568<V_enable_fullscreen_menu DJ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ۀ   #@v`_{{54, 84}, {362, 31}}Z{250, 750}]^_`ah  @oY!<C30 <5=N AB0T 2848<>N, :>;8 :C@A>@ <8H:8 @>7<VI5=> C 25@E=V9 G0AB8=V >A=>2=>3> 48A?;5O.klnors &\controlColor+,[NSTextField;/_enable_fullscreen_menu_text DJKȀ  X !Z[AAC_{{18, 130}, {402, 18}}DJK 46 5_]`abac_d^efghilVpqr!сo&#2V<:=CB8 :;02V0BC@=V A:>@>G5==O 2 X11_enable_keyequivs D!JK!ǀ  _{{18, 166}, {402, 18}}_]`abac_d^efghil Vpqr!сo(>72>;8B8 ?V4 T4=0==O <5@56528E :;VT=BV2Zenable_tcp !&DJK$ "$ #_{{18, 243}, {402, 18}}DJK./5 PQ H_]`abac_d^efghil;Vpqr!с!%o <C;OFVO <8H:8 7 B@L><0 :=>?:0<8\fake_buttonsCD (,DHJKNOHǀ̀ )* _{{15, 184}, {402, 18}}_]`abac_d^efghilC[Vpqr!с(+o$>:CA ?@O<CT 70 :C@A>@>< <8H:8_focus_follows_mousecd .2DHJKnoHǀ̀ /0 _{{15, 140}, {402, 18}}_]`abac_d^efghilc{Vpqr!с.1o$>:CAC20==O =0 =>28E 2V:=0E_focus_on_new_window 8_{{18, 69}, {402, 18}}DJ  DF #@z E_]`abac_d^efghilVpqr!с7o0;02VHV Option =04A8;0NBL :><0=48 Alt_L B0 Alt_R_option_sends_alt :V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_ {{266, 364.0390625}, {545, 341}}m0@0<5B@8 %11WNSPanelZ{320, 240}Xـ[ @1΁A)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels^] \?? B 1)15$!5HJ#ET)_{{36, 82}, {422, 42}}DJ    SU #@zT]^_`ah5 Go/:I> C2V<:=5=>, B> :;02V0BC@=V A:>@>G5==O A<C38 <5=N <>6CBL 702060B8 A:>@>G5==O< ?@>3@0< %11, 2 O:8E 28:>@8AB>2CTBLAO Meta-:;02VH0.DJ&'-  IK #@{J_{{36, 195}, {444, 42}}DJ9:-  MN ]^_`ah5FH Loc#B@8<C9B5 :;02VHV Option V Command ?V4 G0A :;0F0==O, I>1 0:B82C20B8 A5@54=N G8 ?@02C :=>?:8 <8H:8. _{{36, 159}, {444, 14}}]^_`ahOJ OoL#2V<:=VBL, I>1 7<V=8 2 <5=N :;02V0BC@ 7<V=N20;8 :;02V0BC@=C @>7:;04:C 2 %11._{{18, 179}, {402, 18}}_]`abac_d^efghil$XVpqr!с#Ro+0AB>A>2C20B8 A8AB5<=C @>7:;04:C :;02V0BC@8_{{36, 32}, {431, 31}}DJKef΀ WX A]^_`ahrE Von/:I> FN DC=:FVN 22V<:=5=>, :;02VHV Option =04A8;0B8<CBL A8<2>;8 :;02VH Alt_L B0 Alt_R %11 70<VABL Mode_switch._{{18, 8}, {418, 18}}_]`abac_d^efghil{Vpqr!сTYo*02648 ?@>:@CGC20B8 2 =0?@O<:C @CEC ?0;LFO_{{10, 33}, {499, 279}}+,/_{{13, 10}, {519, 325}}1^bs)VNSViewYNSTabView\NSIdentifiera`A_Q1h2545==O+,]NSTabViewItem/aہrAcQ21Ccځeim)DJ ۀ fg #@O_{{17, 238}, {66, 20}}]^_`ahehh>;L>@8:DJց ۀ jk #@x@_{{36, 216}, {392, 14}}]^_`ahi lo:&59 ?0@0<5B@ =015@5 G8==>ABV ?VA;O =0ABC?=>3> 70?CA:C %11.DJ ۀ no #@yp_{{36, 145}, {411, 42}}]^_`ahm poy<8:0T :>@5=525 2V:=> %11. ;O C2V<:=5==O/28<:=5==O ?>2=>5:@0==>3> @568<C 28:>@8AB>2C9B5 :><1V=0FVN :;02VH Command-Alt-A._{{10, 33}, {499, 279}}i82545==OatAcX [u1 vz~)DJK ǀt wx t_{{18, 255}, {409, 23}}_]`abac_d^efghil,Vpqr!сvyo#2V<:=CB8 A8=E@>=V70FVNDJ9:@ t {| t#@z`_{{36, 221}, {426, 28}}]^_`ahGz }o:B82CT 5;5<5=B <5=N :>?VN20B8 B0 4>72>;OT A8=E@>=V70FVN <V6 :><?>=C20==O< OS X V 1CD5@>< >1<V=C %11, 0 B0:>6 ?5@28==8<8 1CD5@0<8.DJKRSǀt  t_{{34, 135}, {457, 18}}_]`abac_d^efghil_Vpqr!с~o==>2;N20B8 1CD5@ >1<V=C ?V4 G0A 2=5A5==O 7<V= 4> :><?>=C20==ODJKklǀt  t_{{34, 97}, {380, 34}}_]`abac_d^efghilxVpqr!сoG=>2;N20B8 ?5@28==89 1CD5@ >1<V=C ?V4 G0A 2=5A5==O 7<V= 4> :><?>=C20==ODJKǀt  t_{{34, 75}, {434, 18}}_]`abac_d^efghilVpqr!сo9=>2;N20B8 :><?>=C20==O, I>9=> =>289 B5:AB 1C45 284V;5=>.DJKǀt  t_{{34, 195}, {447, 18}}_]`abac_d^efghilVpqr!сo<=>2;N20B8 :><?>=C20==O ?V4 G0A 2=5A5==O 7<V= C 1CD5@ >1<V=CDJ t  t#@z_{{48, 161}, {434, 28}}]^_`ah ou8<:=VBL FN >?FVN, O:I> 28 E>G5B5 28:>@8AB>2C20B8 Eclipboard, klipper 01> 1C4L-O:89 V=H89 <5=5465@ 1CD5@C >1<V=C %11.DJ t  t_{{48, 41}, {434, 28}}]^_`ah oN'5@57 >1<565==O 2 ?@>B>:>;V %11 FO >?FVO <>65 =5 ?@0FN20B8 2 45O:8E ?@>3@0<0E._{{10, 33}, {499, 279}}l><?>=C20==OHáAc1@Cć(.)DHJH  ̀  #@{_{{23, 208}, {437, 31}}]^_`ah  ob/:I> =0B8A=CB8 =50:B82=5 2V:=> 2 0:B82=><C @568<V, B> <8H:0 ?@>945 G5@57 F5 2V:=> B0 0:B82CT 9>3>.DHJ  H- ̀  _{{23, 150}, {444, 28}}]^_`ah # oJ$>:CA 2V:=0 %11 ?@O<CT 70 :C@A>@><. &5 <>65 <0B8 45O:V =530B82=V =0A;V4:8.DHJ / 0H  ̀  _{{23, 78}, {437, 56}}]^_`ah < o/:I> FN DC=:FVN 22V<:=5=>, B> AB2>@5==O =>2>3> 2V:=0 %11 2 0:B82=><C @568<V ?@872545 4> B>3>, I> ?@>3@0<0 %11 ?5@5<VAB8BLAO =0 ?5@54=V9 ?;0= (70<VABL ?@>3@0< Finder, "5@<V=0; B>I>)_{{10, 33}, {499, 279}}eV:=0! DaA1 H K L M)D!J X Y! _   #@z@_{{36, 195}, {424, 42}}]^_`ah K f o0?CA: X11 AB2>@8BL :;NGV :>=B@>;N 4>ABC?C Xauthority. # @07V 7<V=5==O  -04@5A8 A8AB5<8 FV :;NGV 2B@0BOBL 4V9A=VABL, I> 702048BL 70?CA:C ?@>3@0< %11.D!J r s! y   #@y_{{36, 104}, {416, 56}}]^_`ah L  o# @07V 22V<:=5==O FL>3> ?0@0<5B@C =5>1EV4=> B0:>6 C2V<:=CB8 ?0@0<5B@ CB5=B8DV:0FVO 7 T4=0=L, I>1 70157?5G8B8 70E8AB A8AB5<8. /:I> F59 ?0@0<5B@ 28<:=5=>, ?V4 T4=0==O 2V440;5=8E ?@>3@0< 701>@>=5=V.D!J  !    #@y_{{17, 17}, {404, 14}}]^_`ah M  o<&V ?0@0<5B@8 =015@CBL G8==>ABV ?VA;O =0ABC?=>3> 70?CA:C %11._{{10, 33}, {499, 279}}k"8? 70E8ABC+, YNSTabView /Z{545, 341}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel T€_scroll_in_device_direction Ā_sync_clipboard_to_pasteboard$ #ƀ[sync_keymap vȀ_sync_pasteboard ~ʀ_sync_pasteboard_to_clipboard ̀_sync_pasteboard_to_primary ΀_sync_primary_immediately ЀZsync_text1 ҀZsync_text2D AԀ_toggle_fullscreen_item? 4ր^x11_about_item" v ؁_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ہ_minimize_window:? 4݁_orderFrontStandardAboutPanel:@  6 ߁[prefs_show:F  EUhide:J  MZterminate:G $ H_hideOtherApplications:H * J_unhideAllApplications: / ^Ucopy: 5 f ]close_window: ; l \zoom_window: ? A  D D E-JK  M N-_NSHuggingPriority    X Y ][ 8M_{{347, 191}, {139, 32}}_]`aba_d^efgh ` c ? e fqp@ !ԀiC1;N20B8_apps_table_duplicate: l n  D D E-JK  x y-   _{{347, 159}, {139, 32}}_]`aba_d^efgh ` c l fqp!Ԁh840;8B8_apps_table_delete: W _apps_table_show:  D D E-JK   -   _{{347, 223}, {139, 32}}_]`aba_d^efg ` c fqp!Ԁn>40B8 5;5<5=B_apps_table_new: ! ^prefs_changed:  ^prefs_changed:$ # ^prefs_changed:  ^prefs_changed:   ^prefs_changed: ڀ ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:C _enable_fullscreen_changed:D A _toggle_fullscreen:@ ̀ ^prefs_changed:C  ( ^prefs_changed:c  .  ^prefs_changed: v "^prefs_changed:  ~ $^prefs_changed:   &^prefs_changed:   (^prefs_changed: %  *^prefs_changed:c +  ,^prefs_changed: 1  .^prefs_changed: 7 T 0^prefs_changed:1 ; ԯ <'2?@ABkCDEFGHIJ()*  !"+q~5':$/ fCOco :SlH@NCO co 0!& K Y L s M - ? N l yESFG+5 2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A^!$5FHKJN#QEU6TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&'K& (3]NSApplication -    56OP N7=! _{{302, 440}, {500, 271}}o5=N ?@>3@0< %11Z{320, 240}1 ? l )1 +5@D)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " J    _NSControlTarget_NSControlActionC ABB_{{1, 215}, {301, 15}}\_doScroller:+, ! "ZNSScroller !;/  J  -  C EBB_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 7 ԡ 8HK ; < = > ? @ A   D_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionJI__panWithGestureRecognizer:+, G H_NSPanGestureRecognizer I J/_NSPanGestureRecognizer_NSGestureRecognizer+, L/+, N O\NSScrollView N/Z{500, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 U ԯ'2222B22222222()*        +q5$CcH@HHCHHcH!!! K! L! M - ?- l-EFG- -02222:22222222-QSS-Y[-acccccccc-y{:?A^!5HJ#ETAbۀڀ݀ہeہiۀہہmہAstvtzt~tttttÀ̀́́(́́.́A4##K1 ԯ <'2?@ABkCDEFGHIJ()*  !"+q~5':$/ fCOco :SlH@NCO co 0!& K Y L s M - ? N l yESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~2-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A^!$5FHKJN#QEU6TXbۀڀ݀߀egikmo stvxz|~̀̀ρ(*.04@D#&' ,ˀ׀ـ '-39ÁŁǁɁˁ́ρсӁՁׁځ܁ށ   !#%')+-/K1 ԯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~TUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./012K     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ԠK+,^NSIBObjectData/",1:?QZw,3AN`n *3>GV[dmxy{ 8 : < > @ B D F H J L N P R U X [ ^ a d g j m p s v y |    . 6 ^ ` b d f h q s u        ! # % N \ c w  + 9 ; = ? A C E M _ l w    " - 2 _ h r { }  >@BDFHJ[dsz579;=?ACEGK\^`bdmEGIJLNOQS?AFHJLNP   (*KMOQSUWr ;=Jwy{} *,.0246Kxz|~LNPRTVXZ\^iz|~ "$57XZ\^`bd}!#(*,.02SU~ -:<>@OX[]_"7B^t#<]x #/<HRx ()*q{ >Jbcegijlnprt FHJKMOQSU  7 D V X [ ] ` b g j s u ~  !(!5!@!M!X!g!v!~!!!!!!!!!!!!!!!!" """"""""("="D"M"e"l"u"w"y"{"}""""""""""""""""###>#Y#b#o#t#}#############$$$$$2$:$<$>$@$B$D$K$]$r$$$$$$$$$$$$$$6k6t6666666667777777!7#7%7(7M7^7g7j7l7n7{7~777777777777888 8 8888!8#8D8F8H8J8L8N8]8j8v8x888888888888889999496989:9<9>9S9h9j9l9n9p9|99999999999999: ::%:(:*:,:A:C:E:G:I:b:w::::::::::::::::;; ;; ;5;7;9;;;=;?;;;;;;;;;;;;;;;;;;;;;;;;;;< =J=L=N=W=`=v={==============>> > >>>>m>o>p>q>s>u>w>x>z>|>~>>>>>>>>>>>>>>?*?RRRRRRRRS$S1SQS_SiSvSSSSSST TT)T7TCTVTjTmToTrTuTxT{T~TTTTTTTTTTTTTTUUUUUUU!U#U&U/U2U5U7UUUUUUUUUUUUUUUUUUUUUUUUVVVVV"V%V(V+V.V1V4V6VNVVVVVVVVVVVVVVVVVVWW W WWWWX!XXXXXXXXXXXXXXXXXXXY:Y=Y?Y@YAYDYFYIYJYMYPYRYSYVYWYXY[YYYYYYYZYZrZZZZZZZ[B[[[[[[[[[[\\\z\|\}\~\\\\\\\\\\\\\\\\\\\]]^^^^^ ^ ^^^h^^^^^^^^^^^^^^^__ _ ______+_4_B_G_`_c_f_h_k_n_q_s_|_________`` ` ` ``````````!`"`#`,`D`i`l`n`p`s`v`x``````````aaaaa a a aa.aSaVaXa[a^aaacabAbDbFbGbHbJbLbObPbSbVbXbYb[b\b]bfbbbbbbbbcccccccccdd)d+d.d/d2d5d7d9d;dDdUdXd[d^dadddgdjdmdoddddddddddddddddee@eBeEeHeJeLe}eeeeeeeeeeeeeffff f$fIfLfNfQfTfWfYgdggggggggggggggggh1h3h5h7h:h=h?hAhiiiii i"i$i%i(i+i-i.i1i2i3iKiiiiiiiij+jjjjjjjjjjjjjjjjjjjjkkkkk|kkkkkkkkkkkkkkkl lIlKlMlOlRlUlWlYlm;m>m@mAmBmEmGmJmKmNmQmSmTmWmXmYmbm{mmmmmmmnooo o o ooooooooo o!o"o:o_obodogojomoopp'p@pYp\p_papdpgpjpspppppppppppqqqqqq q qqqqqqqq8q]q`qbqeqhqkqmr4rrrrrrrrrrrrrrrrrrrrrsssstttt t t ttttttttttt7t\t_tatdtgtjtluuuvvvvvv"v+v6v8v;v>vAvDvFvvvvvvvvvvvvvvvvvvwwwwwww xOxxxxxxxxxxxxxxxxxxyyyy!y$y'y)z{{"{${%{&{({*{-{.{1{4{6{7{9{:{;{D{\{{{{{{{| |%|<|E|O|X|c||||||||||||}}}} }&};}=}?}B}E}G}f}{}}}}}}}}}}}}}}}}}}}}~~~~~"~%~'~D~Y~[~]~`~c~e~~~~~~~~~~~~~~~~~~~~~&(*,/1@QSUX[mv  "%(4EGILOUfhjmp{€Āǀʀ'8:ԅ  "$ASdgilo~…Ņԅ):<>ADSdfhknxΆ߆ 4EGILOduwy|ʇ͇χ҇Շ #%(+:KNPSVevy{~̈ψшԈ׈"%'*-ACEHIJMer{ ,ENQTWtɏ-JMOQTqzɐҐא%.7jlnprtvxz|~Ēǒʒ͒ВӒْ֒ܒߒ !#&(+.147:=@CFILORUX[^adgikmpruwz|“ēƓȓʓ̓ϓғԓ֓ؓړܓޓꕭ•ĕƕȕʕ̕ΕЕҕԕ֕ؕڕܕޕ  #&),/258;>ADFHJLNPRTWZ]`bdgjmpsvy|Ėǖʖ͖ЖӖ֖ؖږܖߖ  #&(*,.02468:<>@BDFHJLORUX[^adgjmpsvy|ėǗʗ͗Зӗ֗ٗܗߗə̙ϙљԙיڙݙ "%(+.147:=@CFILORUX[^adgjmpsvy|Ěǚʚ͚КӚ֚ٚܚߚ !$'*-0369ADGJMPSVY\_behkmoqsuwy{}ÜŜǜɜ˜͜ϜќӜ՜לٜۜݜߜ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}Ýŝǝɝ˝͝ϝѝӝ՝םٝ۝ݝߝ (),5DIxorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/Localizable.strings0000644000175000017500000001056214757411105022616 /* Dialog title when quitting */ "Do you really want to quit X11?" = "8 A?@024V E>G5B5 7025@H8B8 %11?"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "C4L-O:0 ?@>3@0<0 %11 1C45 =5309=> 7C?8=5=0, V 28 2B@0B8B5 2AV =5715@565=V 7<V=8."; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "#2V9B8 4> @568<C RandR?"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "@>3@0<0 =04VA;0;0 70?8B %11 =0 7<V=5==O @>74V;L=>ABV 20H>3> 48A?;5O. %11 2V4=>28BL 48A?;59 4> ?>?5@54=L>3> AB0=C, :>;8 ?@>3@0<0, I> =04A8;0T 70?8B, 28<030B8<5 ?>25@=5==O 4> ?>?5@54=L>3> AB0=C. 8 <>65B5 28:>@8AB>2C20B8 :><1V=0FVN :;02VH #%#A, I>1 ?@8<CA8B8 %11 ?>25@=CB8AO 4> ?>?5@54=L>3> AB0=C."; /* No comment provided by engineer. */ "Allow" = ">72>;8B8"; /* No comment provided by engineer. */ "Always Allow" = ">72>;OB8 702648"; /* No comment provided by engineer. */ "Cancel" = "!:0AC20B8"; /* No comment provided by engineer. */ "Mac Help" = ">2V4:0 Mac OS"; /* No comment provided by engineer. */ "Quit" = "025@H8B8"; /* No */ "No" = "V"; /* Yes */ "Yes" = ""0:"; /* Terminal */ "Terminal" = ""5@<V=0;"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "# 20A T D09; ~/.xinitrc.\n\nV:=0, I> 2V4>1@060NBLAO =0 48A?;5W ?@>3@0<0<8 %11, <>6CBL =5 <0B8 @O4:0 703>;>2:0 01> <>6CBL 2V4>1@060B8AO V=0:H5, =V6 C 2V4?>2V4=8E ?@>3@0<0E.\n\n%>G5B5 70<V=8B8 =0O2=89 D09; V 28:>@8AB0B8 AB0=40@B=5 A5@54>28I5 %11 ?V4 G0A =0ABC?=>3> 70?CA:C %11?"; /* window item modifiers */ "window item modifiers" = ":><0=40"; /* Updates menu title & */ "Check for X11 Updates..." = "5@52V@8B8 =0O2=VABL >=>2;5=L 4;O %11 &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/uk.lproj/locversion.plist0000644000175000017500000000061014757411105022213 LprojCompatibleVersion 106.5 LprojLocale uk LprojRevisionLevel 1 LprojVersion 106.5 xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/0000755000175000017500000000000014757411136017424 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/0000755000175000017500000000000014757411136021117 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib0000644000175000017500000020374614757411105023636 请按住 Option 或 Command 点按以激活中间或右边的鼠标按键。 xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects.nib0000644000175000017500000012715414757411105024212 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK`mnxy}sY &+016;< AEFL\ef{|  %4=>FGHN]^fghn}~  -.>FGHN]^fghn}~  $%67HPQRZ[\defv}~#23;<LMTUdemn}~     ' ( / 0 A B I J K L R Z j k s t        ! & ' , - 2 3 8 9 = > C D I J O a j k u v w |         ! " ' ( - . 3 4 9 : ? @ E F       * + , / @ A B F Q R W Y \ ] ^ _ `  r o      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,28āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bSU1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "d^u(z ^P^submenuAction:$%*d^u(z ^1&')#   #!(c[ &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5fQsN X112XY287ePOY}n &Q,22  2kkm2!<<;"bg Rstu*>=?bg R1x)__NSServicesMenu22  22CBe_QsQh\O^UQa22  2UNSTag2G*Ff X11Qh22GIdQvN22!KdQhf>y:22  22ONfQ X11Qq\_NSAppleMenu-!SSR"d^u(z ^TU*d^u(z ^1؀VW)S  S!Xc[ &-![[Z"b\]*b1^)[`_bbQc  -!ccb"bzS*edxbzS1 !"filnoruv) ()chgbQsQw 12ckjcg\SQm ;c!mb)e> c   KLcqpf_sf>y:zSQ` RUVctshST_sf>y:zSQ~ c   hc!wfRMnQhzS^_NSWindowsMenuqqs-!{{z"b^.Rxy|}*b^.R1}~~)q{!fX11 ^.R[_NSMainMenuTmenu V^apps_separator ɀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ȀR@#@Ā#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSTVWXYZ\]^\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@^n#@O]`abcdefghijkl[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT yopqrstuvwVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontz{|_NSFontDescriptorAttributes~1WNS.keys_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/YWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorY\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCellabcde\]NSControlView_NSPlaceholderString0AYText Celloprvw#@*PYB1_controlTextColor+,/+,]NSTableColumn/LMNOPQRSTXYZ\ #@X#@DabcdefghklbT}NYK0.33333299abcde\΀LMNOPQRSTXYZ\ #@Q#@$abcdefgh klb_cw[headerColorYB1C1 1abcde \_NSDrawsBackground opr'(vw#@(-/€_controlBackgroundColor23YL0.602715373N0.6666666667 18:ŀYgridColor=>YM0.4246723652E0.5 1+,BC[NSTableViewBD/YNSControlZapps_tableIJ ˀՀMQSUVQVNSCell̀ ̀΀ ^`a Z_{{15, 245}, {402, 18}}gahijekclbmnopqtIvYxyz_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπipc TN*N m;zS}~[NSImageNameрXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonD/]click_through ^׀^copy_menu_item ـMȀڀ ۀ܀ `p Zc_{{59, 235}, {128, 26}}mhageijnblYxo _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀oprvw WNSState߀܀!*egef>y:Vh__popUpItemAction:ZOtherViews1߀ހ)߀!g256 y͘r߀!cN Ny߀!dN SCNy+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonD/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator"# M)S-.)Ȁ 6`9 Z_{{18, 243}, {402, 18}}gahijekclbmnopqt"CYxyz!Ѐdt[c[enable_authKL MSVWȀڀ _{{18, 182}, {409, 23}}gahijekclbmnopqtKcYxyz!ЀeQh\O^Uj!__enable_fullscreenkl MSvwȀڀ  _{{37, 116}, {409, 23}}gahijekclbmnopqtkYxyz!ЁnQAW(Qh\O^Uj!_N SUh_enable_fullscreen_menu M_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}abcdep   @o_S hQIhnNN;f>y:Vhve\f>y:SUh0oprsvw /\controlColor+,[NSTextFieldD/_enable_fullscreen_menu_text MSЀ  `  YZ@@B_{{18, 115}, {402, 18}}MS 35 4gahijekclbmnopqtYxyz!ЁnW( X11 sXN T/u({IeH._enable_keyequivs M)S)Ȁ  _{{18, 166}, {402, 18}}gahijekclbmnopqtYxyz!ЁjQANQ~[b7zcZenable_tcp  %MS%&, !# "_{{18, 243}, {402, 18}}MS67= OP GgahijekclbmnopqtCYxyz!Ё $gj!bN c . h\fake_buttonsKL '+MQSVWQȀ̀ () _{{15, 184}, {402, 18}}gahijekclbmnopqtKcYxyz!Ё'*fq&pߖ h_focus_follows_mousekl -1MQSvwQȀ̀ ./ _{{15, 140}, {402, 18}}gahijekclbmnopqtkYxyz!Ё-0eZq&ezS_focus_on_new_window 7_{{18, 69}, {402, 18}}M  CE #@wDgahijekclbmnopqtYxyz!Ё6oOption .OSѐ Alt_L T Alt_R_option_sends_alt 9Y\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_{{240, 335}, {484, 342}}hX11 POY}nWNSPanelZ{320, 240}`Z ?1ց@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [>> A 1Ł)1=, 4GI"DS)_{{36, 78}, {385, 31}}M  RT Sabcdep\!4 F o T/u(e SUh{IeH.SO^rbpOu(QCOp.v X11 ^u(z ^0M./  HJ I_{{36, 195}, {385, 42}}M@A  LM abcdep=\MG K o&c OO Option b Command pc Nom;N-bSv hc .0 _{{36, 159}, {385, 14}}abcdep\WI N oQAۈLQeSUfe9N剆v_SRMv X11 .vf \0_{{18, 179}, {402, 18}}gahijekclbmnopqt,aYxyz!Ё"QhOqg|~ߕ.v^\@_{{36, 32}, {385, 31}}MSnoր VW @abcdep{D  Uo@] #4EGJIM"PDT5SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication /    45NO M6<! _{{279, 416}, {454, 271}}jX11 ^u(z ^SUZ{320, 240}1 K x )1 -7?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $  ! # & &_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, - .ZNSScroller -D/   ! 9 & &B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 C DGJ G H I J K L M   P_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, S T_NSPanGestureRecognizer U V/_NSPanGestureRecognizer_NSGestureRecognizer+, X/+, Z [\NSScrollView Z/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 a '2222B22222222()*        +q=,Kk         !QIQQKQQkQ)")) V) W) X / K/ x/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{9>@] 4GI"DS@aڀـ܀߀߀߀߀ځdځhڀځځlځ@rsusys}sssss@̀ˀ́́'́́-́@3##J1  H'2?@ABkCDEFGHIJ()*  !"+q~&=/A,7oKWkw ,F^w !QIV KW !kw :)". V d W ~ X / K Z x GVHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 9>@] #4EGJIM"PDT5SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,28āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1         !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ࠁJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  (*,.024;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ "#%'TVXZ\^`bdfk|~  FHJKMOPRTy 579:<>?ACdfhjlnp}-/124679;\^`bdfho <>@BDFHJLNSdfhjlqz(*,.0249bdfgiklnp!#$&(IKMOQSUbq #(=?ACEGVkmoqsu%.GUd,Mo}">Hb-@cehjlnoqrtu~)1;alnqrtvy{~:;=?BEGIKLOQS]fzAO[dy  /8:=T]kt}   ! , - / 1 : < > ? A J S U v !! !!!!!!1!:!W!Y![!h!p!w!y!{!}!!!!!!!!!"""""/"4"G"P"W"\"i"q"~""""""""""""""""###3#6#:#<#>#O#T#Z#b#d#f#h#j5 55 5%525;5O5Z5l5y55555555555555566 6 66666!66686:6<6>6Q6Z6c6l6z6666666666666666667777>7@7B7D7F7H7J7L7y7z7|7~7777777777777777777888 888=8Q8S8U8W8X8Z8\8^8`8q8z8}888888888888899999 99(969<9>9@9I9U9`9j9u9999999999999::::::: : : :5:7:::;:>:A:C:E:G:`::::::;;!;0;2;7;<;>;@;B;D;F;H;K;M;O;b;k;w;y;{;;;;;;;;;;;<< < < <<< <5<7<9<;<=0>8>:><>>>@>B>D>F>H>U>W>Y>[>f>z>>>>>>>>>>>>>>>>>>>??? ?"?$?&?(?*?,?.?5?b?d?f?h?j?l?n?p?r?t?}??????????????@@#@%@'@)@+@-@7@L@N@P@R@T@V@n@@@@@@@@@@@@@@@@@@@@@A'A)A,A-A0A3A5A7A9ARAAAAAAAAAAAAAAAAB.B0B1B2B4B6B8B9B;B=B?B@BBBCBDB]BBBBBBBBBBBBBBBBCECGCHCICKCMCOCPCSCVCXCYC[C\C]CvCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDDEE E+EPESEUEXE[E^E`EeEEEEEEEEEEEEEEFF*F,F.F1F4F6FFFFFFFFFFFFFFFFFFFFFFFFFFFGGtGvGwGxG{G}GGGGGGGGGGGGGGGGGGGHH%H'H)H,H/H1HHHHHHHHHHHHHHHHHHIIIII I I!I,IAICIEIHIKIMIIIIIIIIIIIIIIIIIJAJCJDJEJHJJJLJMJPJSJUJVJYJZJ[J^JJJJJJJJJJJJJJJJKEKGKHKIKKKMKOKPKSKVKXKYK[K\K]KvKKKKKKKKKKKKLLLL LdLfLgLhLjLlLnLoLrLuLwLxLzL{L|LLLLLLLLLLMMMMM!M$M&M>MMMMMMMMMMMMMMMMMMNNNNNNN N"NWNjNNNNNNNNOOOO,O6OLOcOOOOOOOOP P P#P%P(P+P.P1P4P5P8P;P>PAPDPIPLPNPPPkP|PPPPPPPPPPPPPPPQ&Q>QMQTQmQpQsQtQwQzQ|QQQQQQQQQQQQQQQQQQQQQQQQQQR]R`RbRcRdRgRiRlRmRpRsRuRvRyRzR{R~RRRRRRRRRSgSjSlSmSnSqSsSvSwSzS}SSSSSSST TTTTTTTTTT"T$T%T(T)T*T-TVTYT[T^T`TcTfThTTTTTUUUU U UBU[UUUUUUUUUUV2V4V5V6V9V;V=V>VAVDVFVGVJVKVLVOVtVwVyV|VVVVWWUWWWYW[W^WaWcWeW|WWWWWWWWWWWWWXX XXX X#X&X)X,X.X3XaVaaaaaaaaabbbbb"b$b&b'b*b-b/b0b3b4b5bNbbbbbbbbbc+c.c0c1c2c5c7c:c;c>cAcCcDcGcHcIcbcccccccddidldndodpdsdudxdyd|ddddddddddddddde e9e@eYe\e_eaedegejeseeeeeeeeeeeffffff f fffffff/fTfWfYf\f_fbfdfgggggg!g#g&g'g*g-g/g0g2g3g4gMgrgugwgzg}ggghh!h#h$h%h'h)h,h-h0h3h5h6h8h9h:hCh\hhhhhhhii1i6iKiNiPiSiViYibimioiriuixi{i}iiiiiiiiiiiiiiijjjBjEjGjJjLjOjRjTjkPkSkUkVkWkYk[k^k_kbkekgkhkjkkklkkkkkkkkkll|lllllllllllllllllllllllllmm8m?mHmRm[mfmmmmmmmmmnnnnn n n)n>n@nBnEnHnJnin~nnnnnnnnnnnnnnnnnnno oo o"o%o(o*oGo\o^o`ocofohooooooooooooooooooooopp)p+p-p/p2p4pCpTpVpXp[p^pppyppppppppppppppqq!q#q%q(q+q7qHqJqLqOqRqXqiqkqmqpqsq~qqqqqqqqqqqqqqqqrrrrrrr*r;r=r?rBrErRrcrfrhrkrnrrrrrrrrrrrrrrrrrss*s,s/s0s3s5s7s9svAvDvSvdvgvivlvov~vvvvvvvvvvvvvvvvvvwwwwww(w9w;w=w@wCwMw^w`wbwewhw{wwwwwwwwwwwwwwwwwx xxxx!x$x9xJxLxNxQxTxcxtxwxyx|xxxxxxxxxxxxxxxxxxyyy y#y%y(y+y:yKyNyPySyVyeyvyyy{y~yyyyyyyyyyyyyyyyyyzzz{M{P{R{T{V{X{Z{\{^{`{b{d{f{h{j{l{n{p{r{t{v{x{z{|{~{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{||||| ||||||| |#|&|)|,|/|2|5|8|;|>|A|D|G|J|M|O|Q|S|V|Y|\|_|b|e|h|k|n|q|t|v|x|z|}||||||||||||||||||||||||||||||||||||||}>}A}C}F}I}L}O}R}S}V}Y}\}_}b}e}g}i}k}}}}}}}}}}}}}}}}}}}}}}~~'~0~;~D~M~P~R~T~j~~~~~~~~~  ,9BMX ;lՀ8AZazȁ13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ăǃɃ˃̓σуӃՃ׃ڃ܃߃ "%(+.02479<>ACFHKNQSUWZ\_adfiknqtwz}tvy{}ÆƆɆ̆φ҆Ն؆ۆކ !$')+.147:=@CFILORUX[^adgjmpsvxz|ćLJʇ͇χчӇՇׇهۇ݇߇ "%(+.147:=@CFILORUX[^adgjmpsvy|Ĉ͊ŠŊȊˊΊъԊ׊ڊ݊ "%(+.147:=@CFILORUX[^adgjmpsvy|ċNjʋ͋ЋӋ֋ً܋ߋ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~čƍȍʍ̍΍Ѝҍԍ֍؍ڍ܍ލ  "$&(*,.02468:<>@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ŽĎƎȎʎ̎ΎЎҎԎ֎؎ڎ xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/keyedobjects-110000.nib0000644000175000017500000012712314757411105024725 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|?@CI^klvw{qW$)./49: ?CDJ[dez{ $3<=EFGM\]efgm|}  ,-=EFGM\]efgm|}  #$56GOPQYZ[cdeu|}~"12:;KLSTcdlm|}    & ' . / @ A H I J K Q Y i j r s         % & + , 1 2 7 8 < = B C H I N ` i j t u v {          ! & ' , - 2 3 8 9 > ? D E      ) * + . ? @ A E P Q V X [ \ ] ^ _ Q q n      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,28āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bSU1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "d^u(z ^P^submenuAction:$%*d^u(z ^1&')#   #!(c[ &+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5fQsN X112XY287ePOY}n &Q,22  2kkm2!<<;"bg Rstu*>=?bg R1x)__NSServicesMenu22  22CBe_QsQh\O^UQa22  2UNSTag2G*Ff X11Qh22GIdQvN22!KdQhf>y:22  22ONfQ X11Qq\_NSAppleMenu-!SSR"d^u(z ^TU*d^u(z ^1؀VW)S  S!Xc[ &-![[Z"b\]*b1^)[`_bbQc  -!ccb"bzS*edxbzS1 !"filnoruv) ()chgbQsQw 12ckjcg\SQm ;c!mb)e> c   KLcqpf_sf>y:zSQ` RUVctshST_sf>y:zSQ~ c   hc!wfRMnQhzS^_NSWindowsMenuqqs-!{{z"b^.Rxy|}*b^.R1}~~)q{!fX11 ^.R[_NSMainMenuTmenu V^apps_separator ɀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ȀR #@Ā#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQRTUVWXZ[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeable_NSHeaderToolTipWNSWidthZNSMinWidth #@@ #@[N#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT ymnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/WWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorW\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abcZ]NSControlView_NSPlaceholderString0AYText Cellmnptu#@*PWB1_controlTextColor+,ޤ/+,]NSTableColumn/JKLMNOPQRVWXZ #@U#@D_`abcdefijbT}NWK0.33333299_`abcZ̀JKLMNOPQRVWXZ #@M@#@$_`abcdef  ijb_cw[headerColorWB1C1 1_`abcZ_NSDrawsBackground mnp%&tu#@(+-€_controlBackgroundColor01WL0.602715373N0.6666666667 168ŀYgridColor;<WM0.4246723652E0.5 1+,@A[NSTableView@B/YNSControlZapps_tableGH ˀՀKOQRTUOVNSCell̀ ̀΀ ]_` Z_{{15, 245}, {402, 18}}f_ghicjak`lmnopsGuWwxy_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπipc TN*N m;zS|}~[NSImageNameрXNSSwitch+,_NSButtonImageSource/+,\NSButtonCell/+,XNSButtonB/]click_through ^׀^copy_menu_item ـKQǀڀ ۀ܀ _p Zc_{{59, 235}, {128, 26}}lg_fchim`kWwn _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀mnptu WNSState߀܀!*egef>y:Vh__popUpItemAction:ZOtherViews1ހހ)߀!g256 y͘r߀!cN Ny߀!dN SCNy+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButtonB/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator!" K(QR,-(ǀ 5_8 Z_{{18, 243}, {402, 18}}f_ghicjak`lmnops!BWwxy!Ѐdt[c[enable_authJK KQRUVǀڀ _{{18, 182}, {409, 23}}f_ghicjak`lmnopsJbWwxy!ЀeQh\O^Uj!__enable_fullscreenjk KQRuvǀڀ  _{{37, 116}, {409, 23}}f_ghicjak`lmnopsjWwxy!ЁnQAW(Qh\O^Uj!_N SUh_enable_fullscreen_menu KQ_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}_`abco   @o_S hQIhnNN;f>y:Vhve\f>y:SUh0mnpqtu -\controlColor+,[NSTextFieldB/_enable_fullscreen_menu_text KQRπ  _  YZ@@B_{{18, 115}, {402, 18}}KQR 35 4f_ghicjak`lmnopsWwxy!ЁnW( X11 sXN T/u({IeH._enable_keyequivs K(QR(ǀ  _{{18, 166}, {402, 18}}f_ghicjak`lmnopsWwxy!ЁjQANQ~[b7zcZenable_tcp  %KQR$%+ !# "_{{18, 243}, {402, 18}}KQR56< OP Gf_ghicjak`lmnopsBWwxy!Ё $gj!bN c . h\fake_buttonsJK '+KOQRUVOǀ̀ () _{{15, 184}, {402, 18}}f_ghicjak`lmnopsJbWwxy!Ё'*fq&pߖ h_focus_follows_mousejk -1KOQRuvOǀ̀ ./ _{{15, 140}, {402, 18}}f_ghicjak`lmnopsjWwxy!Ё-0eZq&ezS_focus_on_new_window 7_{{18, 69}, {402, 18}}KQ  CE #@wDf_ghicjak`lmnopsWwxy!Ё6oOption .OSѐ Alt_L T Alt_R_option_sends_alt 9W\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask:;> =@x<!_{{240, 335}, {484, 342}}hX11 POY}nWNSPanelZ{320, 240}_Z ?1Ձ@)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [>> A 1ā)1<+ 4GI"DS)_{{36, 78}, {385, 31}}KQ  RT S_`abcoZ 4 F o T/u(e SUh{IeH.SO^rbpOu(QCOp.v X11 ^u(z ^0KQ-.  HJ I_{{36, 195}, {385, 42}}KQ?@  LM _`abco<ZLG K o&c OO Option b Command pc Nom;N-bSv hc .0 _{{36, 159}, {385, 14}}_`abcoZVI N oQAۈLQeSUfe9N剆v_SRMv X11 .vf \0_{{18, 179}, {402, 18}}f_ghicjak`lmnops+`Wwxy!Ё"QhOqg|~ߕ.v^\@_{{36, 32}, {385, 31}}KQRmnՀ VW @_`abcozD  Uo@] #4EGJIM"PDT5SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication -    45NO M6<! _{{279, 416}, {454, 271}}jX11 ^u(z ^SUZ{320, 240}1 J w )1 +5?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+,  ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " Q  " % %_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, , -ZNSScroller ,B/  Q  8 % %B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 B ߡ CGJ F G H I J K L   O_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, R S_NSPanGestureRecognizer T U/_NSPanGestureRecognizer_NSGestureRecognizer+, W/+, Y Z\NSScrollView Y/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ` ߯'2222B22222222()*        +q<+Jj         OGOOJOOjO(!(( U( V( W - J- w-EFG- -02222:22222222-QSS-Y[-acccccccc-y{9>@] 4GI"DS@aڀـ܀߀߀߀߀ځdځhڀځځlځ@rsusys}sssss@̀ˀ́́'́́-́@3##J1 ߯ G'2?@ABkCDEFGHIJ()*  !"+q~%<.@+6nJVjv +E]v OGU JV jv 9(!- U c V } W - J Y w ETFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ 9>@] #4EGJIM"PDT5SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,28āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ߯        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ߠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  (*,.024;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ "#%'TVXZ\^`bdfk|~  FHJKMOPRTy 579:<>?ACdfhjlnp}-/124679;\^`bdfho <>@BDFHJLNSdfhjlqz(*,.0249bdfgiklnp!#$&(IKMOQSUbq #(=?ACEGVkmoqsu!*CQ`(Iky :D^})LNQSUWXZ[]^giklnprstv{}"HSUXY[]`begjlnortv!"$&),.02368:DMaj~(6BK`s!$;DR[dkmoqs      ! # % & ( 1 : < ] i s ~ !!!!!!>!@!B!O!W!^!`!b!d!k!m!o!q!s!!!!!!!""""."7">"C"P"X"e"q"s"|""""""""""""""####!###%#6#;#A#I#K#M#O#Q4455 55"565A5S5`5g5555555555555555555666666!6#6%686A6J6S6a6f666666666666666666667%7'7)7+7-7/71737`7a7c7e7g7h7j7s7|7~7777777777777777778$888:8<8>8?8A8C8E8G8X8a8d8f8h8}8888888888888888999#9%9'909<9G9Q9\9q9s9u9w9y9{99999999999999999:: :#:$:':*:,:.:0:I:::::::; ;;; ;%;';);+;-;/;1;4;6;8;K;T;`;b;d;m;v;;;;;;;;;;;;;;;< << <"<$<&<(<<<<<<<<<<<<<<<<<<<<<<<<<=@=R=`=u====================>>!>#>%>'>)>+>->/>1>>>@>B>D>O>c>n>w>>>>>>>>>>>>>>>>>??? ? ? ???????K?M?O?Q?S?U?W?Y?[?]?f?o??????????????@ @@@@@@ @5@7@9@;@=@?@W@l@n@p@r@t@v@@@@@@@@@@@@@@@AAAAAAAA A"A;AzA|A~AAAAAAAAAAAAABBBBBBB!B"B$B&B(B)B+B,B-BFBBBBBBBBBBBBBBBBC.C0C1C2C4C6C8C9CEAEDEGEIENE}EEEEEEEEEEEEEEFFFFFFF~FFFFFFFFFFFFFFFFFFFFFFFFFFFG]G_G`GaGdGfGhGiGlGoGqGrGuGvGwGzGGGGGGGGGGHHHHHHHuHwHxHyH{H}HHHHHHHHHHHHHHHHHHI II*I,I.I1I4I6IIIIIIIIIIIIIIIIIJ*J,J-J.J1J3J5J6J9JJ?JBJCJDJGJJJJJJJJJJJJJJJJK.K0K1K2K4K6K8K9KW@WBWDWGWJWLWNWeW~WWWWWWWWWWWWWWXXX X XXXXXX%X3X8XQXTXWXYX\X_XbXdXmX|X~XXXXXXXXXXXXYYYYY Y YYYYYYY5Y^YaYcYeYgYjYmYoYvYYYYYYYYYYYYYYYYZZZDZGZIZLZNZQZTZVZ}ZZZZZZZZZZZZZZZ[[ ["[K[N[P[S[U[X[[[][[[[[[[[\\\,\.\1\2\5\8\:\<\>\G\X\[\^\a\d\g\j\m\p\r\\\\\\\\\\\\\\\]]?]A]C]E]H]K]M]O]X]]]]]]]]]]]]]]]]]^^^ ^#^&^)^+^^^^^^_____ _ _ ____*_i_k_m_o_r_u_w_y_____````` ` ``````.`m`o`q`s`v`y`{`}`a aaaaaaaaaa!a"a%a&a'a?a~aaaaaaaabbbbb b bbbbbbbbbb7bvbxbzb|bbbbbccccccc c#c$c'c*c,c-c0c1c2cKcpcscucxc{c~ccdRdUdWdXdYd\d^dadbdedhdjdkdndodpdydddddddde e"e)eBeEeHeJeMePeSe\eiekeneqeteweze|eeeeeeeeeeeeeeeeff=f@fBfEfHfKfMfgggggg g gggggggggg6g[g^g`gcgfgigkghh h h hhhhhhhhhh!h"h#h,hEhjhmhohrhuhxhziiii4i7i9ik?k@kBkDkGkHkKkNkPkQkSkTkUknkkkkkkkkklelhljlklllnlplsltlwlzl|l}lllllllllllllmm!m(m1m;mDmOmhmsmmmmmmmmmmmmmnn'n)n+n.n1n3nRngninknnnqnsnnnnnnnnnnnnnnnoo o oooo0oEoGoIoLoOoQoloooooooooooooooooooooppppppp,p=p?pApDpGpYpbpzppppppppppppppq q qqqq q1q3q5q8q;qAqRqTqVqYq\qgqxqzq|qqqqqqqqqqqqqqqqqrrrr$r&r(r+r.r;rLrOrQrTrWrrrrrrrrrrrrrrrrrrsssssss s"s%s?sxsssssssssssssssst.t0t1t2t5t7t9t:t=t@tBtCtFtGtHtKtetttttttttttttttuuu u uuouqurusuvuxuzu{u~uuuuuuuuuuuuuuuuuvv"v%v'v*v-v@BDFHJLNPRTVXZ\^`bdfhknqtwz}ÃŃȃʃ̃΃уӃփ؃ۃރ  "%'*,/147:<>@CEHJMORTWZ]`cfhjlnprtvxz|]_bdfhjlnprtvxz|~Ćdžʆ͆Іӆֆن܆߆  #&),/258;>ADGJMPSVY\_acehknqtwz}‡ćƇȇˇ·ЇӇև؇ڇ܇އ  #&),/258;>ADGJMPSVY\_behknqtwz}y|ÊƊɊ̊ϊҊՊ؊ۊފ  #&),/258;>ADGJMPSVY\_behknqtwz}‹ŋȋˋ΋ыԋ׋ڋ݋ "%(+.147:=@CFILORUX[^adgjmpsvy|Čnjʌ͌Ќӌ֌ٌ܌ߌ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÍōǍɍˍ͍ύэӍՍ׍ٍۍݍߍ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}Î͎̎ώ؎َ܎xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/Localizable.strings0000644000175000017500000000653414757411105023204 /* Dialog title when quitting */ "Do you really want to quit X11?" = "`xn[Q X11 T"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "NOUbS_v X11 ^u(z ^WG\zSsP\kbЈL `\N"Y1NOUg*[XPvfe90"; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "Qe RandR j!_T"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "^u(z ^]lB X11 fe9f>y:VhvRs0_SSQlBv^u(z ^lBVR0NRMvr`e X11 O\f>y:Vh`bY R0NRMvr`0kdY `N_SNOu( #%#A .ge_:R6 X11 VR0NRMvr`0"; /* No comment provided by engineer. */ "Allow" = "QA"; /* No comment provided by engineer. */ "Always Allow" = "`;f/QA"; /* No comment provided by engineer. */ "Cancel" = "Sm"; /* No comment provided by engineer. */ "Mac Help" = "Mac ^.R"; /* No comment provided by engineer. */ "Quit" = "Q"; /* No */ "No" = "T&"; /* Yes */ "Yes" = "f/"; /* Terminal */ "Terminal" = "~z"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "g s[Xv ~/.xinitrc eN0\n\nX11 ^u(z ^f>y:vzSSlg hh bSw wgeNSu^u(z ^f>y:vzSN T 0\n\n``\sg eNyR0N^vW(N k!T/R X11 eOu(hQ X11 sXT"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "hg X11 fe &"; xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist0000644000175000017500000000061314757411105022600 LprojCompatibleVersion 106.3 LprojLocale zh_CN LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/0000755000175000017500000000000014757411136017456 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/0000755000175000017500000000000014757411136021151 5xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib0000644000175000017500000020405114757411105023656 按住 Option 或 Command 的同時按一下,以啟用滑鼠的中間或右邊按鈕。 xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/keyedobjects.nib0000644000175000017500000012726214757411105024244 bplist00 X$versionY$archiverT$topX$objects_NSKeyedArchiver _IB.systemFontUpdateVersion]IB.objectdata5 %)*048$%-78=LST[\]fpqvwz{$+,-456=>GNOPXYZcjklvw{|!ABEK^klvw{qX  "',-278 =ABHXabwx|}  !09:BCDJYZbcdjyz  +,<DEFL[\defl{| !"34EMNOWXYabcsz{| ./78HIPQ`aijyz   # $ + , = > E F G H N V f g o p           # $ ) * / 0 5 6 : ; @ A F G L ^ g h r s t y          $ % * + 0 1 6 7 < = B C     ' ( ) , = > ? C N O T V Y Z [ \ ]  o k      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bxU1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "dau(z _P^submenuAction:$%*dau(z _1&')#   #!(c["+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5fe X112XY287ePOY}-["Q,22  2kkm2!<<;"bg Rstu*>=?bg R1x)__NSServicesMenu22  22CBeRcQh^UQa22  2UNSTag2G*Ff X11Qh22GIdQvN22!Kdoy:Qh22  22ONf}Pg_ X11Qq\_NSAppleMenu-!SSR"dau(z _TU*dau(z _1؀VW)S  S!Xc["-![[Z"b}/\]*b}/1^)[`_bbQc  -!ccb"bz*edxbz1 !"filnoruv) ()chgbܕQw 12ckjd~.R0g\Qm ;c!mb~.e> c   KLcqpf_tjzQ` RUVctshST_tjzQ~ c   hc!wl\kdz _b@g zygRM^_NSWindowsMenuqqs-!{{z"dRfxy|}*dRf1}~~)q{!hX11 Rf[_NSMainMenuTmenu V^apps_separator ɀ(  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_NSTableViewStyle_ NSControlAllowsExpansionToolTips #@ȀR@#@Ā#@1  YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder "#$%&'()*+-/1235789/=>@]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,CD]_NSCornerViewC/1FGHI)LMNOPQRSUVWXY[\\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@^#@O]`_`abcdefghij[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT z1mnopqrstuVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontxyz_NSFontDescriptorAttributes|1}WNS.keys~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/XWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorX\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell_`abc]NSControlView_NSPlaceholderString0AYText Cellmnptu#@*PXB1_controlTextColor+,ޤ/+,]NSTableColumn/LMNOPQRSWXY #@Y#@D_`abcdefijbcNXK0.33333299_`abc̀LMNOPQRSWXY #@Q@#@$_`abcdef  ijc_u[headerColorXB1C1 1_`abc_NSDrawsBackground mnp#$tu#@()+€_controlBackgroundColor./XL0.602715373N0.6666666667 146ŀYgridColor9:XM0.4246723652E0.5 1+,>?[NSTableView>@/YNSControlZapps_tableEF ˀՀIMOQRMVNSCell̀ ̀΀ Z\] Z_{{15, 245}, {402, 18}}c_defcgah`ijklmpErXtuv_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπizg*U_u(vzyz{[NSImageNameрXNSSwitch+,~_NSButtonImageSource~/+,\NSButtonCell/+,XNSButton@/]click_through ^׀^copy_menu_item ـIȀڀ ۀ܀ \p Zc_{{55, 235}, {136, 26}}id_ccefj`hXtk _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀mnptu WNSState߀܀!*dOꇢ^U__popUpItemAction:ZOtherViews1ۀހ)߀!g256 z.Or߀!eex,z.Or߀!eSC,z.Or+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton@/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator I%O)*%Ȁ 2\5 Z_{{18, 243}, {402, 18}}c_defcgah`ijklmp?Xtuv!ЀdI#}[enable_authGH IORSȀڀ _{{18, 182}, {409, 23}}c_defcgah`ijklmpG_Xtuv!ЀeQh^Uj!__enable_fullscreengh IOrsȀڀ  _{{37, 116}, {409, 23}}c_defcgah`ijklmpgXtuv!ЁnQA1W(Qh^Uj!_N-Su(xUR_enable_fullscreen_menu I_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}_`abcl   @o\nџ n8jneN;oy:VhvN efB\oy:xUR0mnpqtu +\controlColor+,[NSTextField@/_enable_fullscreen_menu_text IÒ  \  YZAAC_{{18, 145}, {402, 18}}I  DE #@x3c_defcgah`ijklmpXtuv!ЁnU_u( X11 N vc u\ aɓu_enable_keyequivs I%O%Ȁ  _{{18, 166}, {402, 18}}c_defcgah`ijklmpXtuv!ЁjQA1_}u(b6z#}Zenable_tcp  %IO#$* !# "_{{18, 243}, {402, 18}}IO45; OP Gc_defcgah`ijklmpAXtuv!Ё $fj!dN unџ \fake_buttonsIJ '+IMOTUMȀ̀ () _{{15, 184}, {402, 18}}c_defcgah`ijklmpIaXtuv!Ё'*hq&ޖWnџ yR_focus_follows_mouseij -1IMOtuMȀ̀ ./ _{{15, 123}, {402, 18}}c_defcgah`ijklmpiXtuv!Ё-0hezS_q&_focus_on_new_window 38IO 46 5_{{18, 96}, {402, 18}}I  RT #@wSc_defcgah`ijklmpXtuv!Ё37o Option uP Alt_L T Alt_R_option_sends_alt :X\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{319, 329}, {484, 342}}hX11 POY}-[WNSPanelZ{320, 240}\Z @1ҁA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1 )1 ;* GI"53S)_{{36, 125}, {399, 14}}_`abcl F o)uvU_u(fB xURc uv\ aɓuSg;yOu( Meta fuv X11 au(z _0I+,  HJ I_{{36, 209}, {385, 28}}I=>  LM _`abcl;JG K o*c OO Option b Command vT fBc NN NU_u(nџ vN-bSc 0 _{{36, 174}, {385, 14}}_`abclTI N oQA18QelՐxUvfRՉ[vRMv X11 c u\ a0_{{18, 194}, {402, 18}}c_defcgah`ijklmp*^Xtuv!Ё"QhOqg|}quvOH\@_{{36, 59}, {385, 31}}IOklҀ VW A_`abclx5  Uo8uvU_u(fB option ugP Alt_L T Alt_R X11 c u{&_ N f/ Mode_switch0_{{18, 35}, {418, 18}}c_defcgah`ijklmpXtuv!ЁSXml8`OqgbKcyRveTcr_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1b8Qe+,]NSTabViewItem/ `ځqAbQ21Ggفdhl)I ڀ ef _{{17, 238}, {44, 20}}_`abcldg cOrI܁ ڀ ij #@x@_{{36, 216}, {392, 14}}_`abclh k okdx\gW( X11 Qk!U_R_ueH0I ڀ mn #@w_{{36, 148}, {382, 28}}_`abcll o o7U_u( X11 root z0Ou( Command + Option + A uv}DTO2QeT╋Qh^Uj!_0_{{10, 33}, {438, 279}}b8Q `sAb \ Zt1uy})IO'(Ȁs vw s_{{18, 255}, {409, 23}}c_defcgah`ijklmp4Xtuv!ЁuxfU_u(T keRIAB s z{ s_{{36, 221}, {385, 28}}_`abclNy  |o;U_u( b xUv N&QA1 OSX Rjg  X11 CLIPBOARD NKvT ke NS PRIMARY }]0IOYZȀs ~ s_{{34, 129}, {409, 23}}c_defcgah`ijklmpfXtuv!Ё}ouv Rjg fe9fBfe CLIPBOARDIOrsȀs  s_{{34, 104}, {409, 23}}c_defcgah`ijklmpXtuv!Ёouv Rjg fe9fBfe PRIMARYN-c IOȀs  s_{{34, 79}, {409, 23}}c_defcgah`ijklmpXtuv!ЁouvxSee[WfB zSsfe Rjg IOȀs  s_{{34, 192}, {409, 23}}c_defcgah`ijklmpXtuv!Ёouv CLIPBOARD fe9fBfe Rjg I s  s_{{48, 158}, {385, 28}}_`abcl  o2``Ou( xclipboard0klipper bNOUQvN X11 Rjg{tz _ P\u(kdx0Iށ s  s#@v_{{48, 47}, {370, 28}}_`abcl  o!u1e X11  ST[vPR6 kdxSq!lW(gNau(z _Ou(0_{{10, 33}, {438, 279}}cRjgM `́Ab1EIiˁ'-)IM  M ̀  _{{23, 208}, {385, 31}}_`abcl   o!uvU_u(fB c NN g*U_u(vz\gOnџ c uzrzN&\QvU_u(0IM  M ̀  _{{23, 161}, {385, 17}}_`abcl )  oX11 zq&gߖn8jyR0j#gg NNvSveHg0IM 5 6M < ̀  #@yP_{{23, 89}, {409, 28}}_`abcl C  o9uvU_u(fB eXv X11 z\gO X11.app N f/ Finder.app0}Bzj_.app {I ygRM0_{{10, 33}, {438, 279}}bz% K`A 1 O R S T)I% _ `%   _{{36, 209}, {385, 28}}_`abcl R l  oFU_R X11 \gO\ Xauthority Su(cR6c u0|}qv IP OMW@fR Nu\gq!eH SgN X11 au(z _q!lU_R0I% y z%    #@x_{{36, 132}, {388, 28}}_`abcl S   o-U_u( I#} _ŘN_U_u(OxO|}q[Qh0uvP\u(fB N gQA1O`zau(z _v#}0I%  %    #@y_{{17, 17}, {404, 14}}_`abcl T   oNx\gW( X11 N k!U_R_ueH0_{{10, 33}, {438, 279}}c[Qh`'+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard* "ŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item"  v ׁ_bring_to_front:+, _NSNibControlConnector /^NSNibConnector  i ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F ! EUhide:J ' MZterminate:G - H_hideOtherApplications:H 3 J_unhideAllApplications: 8 ^Ucopy: > f ]close_window: D l \zoom_window: H J  I M N/O  V W/_NSHuggingPriority    \ b fZ 7L_{{340, 191}, {100, 32}}c_defcah`ijkl i l H n out@ !Ӏb_apps_table_duplicate: u w  I M N/O   /   _{{340, 159}, {100, 32}}c_defcah`ijkl i l u out!Ӏbyd_apps_table_delete: W _apps_table_show:  I M N/O   /   _{{340, 223}, {100, 32}}c_defcah`ijk i l out!ӀdRQev_apps_table_new:  ^prefs_changed:  ^prefs_changed:* " ^prefs_changed:   ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:G  _enable_fullscreen_changed:D A _toggle_fullscreen:E  ˀ ^prefs_changed:I ' ^prefs_changed:i  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: "  %^prefs_changed: (  '^prefs_changed: .  )^prefs_changed:g 4  +^prefs_changed: : 3 -^prefs_changed: @ S /^prefs_changed:1 D ݯ E'2?@ABkCDEFGHIJ()*  !"+q~$;,>*5lGSgs(BZsMER IU iu 6%* R ` S z T / H W u GUHI-7 1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication /    45NO M6=! _{{360, 400}, {454, 271}}jX11 au(z _xUZ{320, 240}1 H u )1 -7?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ؀)_{{1, 1}, {301, 28}} $    # #_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, * +ZNSScroller *@/    6 # #B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 @ ݡ AGJ D E F G H I J   M_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, P Q_NSPanGestureRecognizer R S/_NSPanGestureRecognizer_NSGestureRecognizer+, U/+, W X\NSScrollView W/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ^ ݯ'2222B22222222()*        +q;*GgMEMMIMMiM%%% R% S% T / H/ u/GHI/ -02222:22222222-QSS-Y[-acccccccc-y{:?A] GI"53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ݯ E'2?@ABkCDEFGHIJ()*  !"+q~$;,>*5lGSgs(BZsMER IU iu 6%* R ` S z T / H W u GUHI-7 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ݯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ݠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  (*,.024;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ "#%'TVXZ\^`bdfk|~  FHJKMOPRTy 579:<>?ACdfhjlnp}-/124679;\^`bdfho <>@BDFHJLNSdfhjlqz *,.0246;dfhikmnpr !#%&(*KMOQSUWp 1=BWY[]_ap2?Hao~!-Fg (<Xb| 3GZ}"+9CKU{   TUWY\_acefikmw[iu~ %&),/136IRTWnw   % 0 1 3 5 > @ B C L U W x !! !!!!!!3!#@#Q#V#\#d#f#h#j#l5 55"5'545=5Q5\5n5{5555555555555566 6 66666!6#686:6<6>6@6S6\6e6n6|666666666666666667777:7<7>7@7B7D7F7H7q7r7t7v7x7y777777777777777778888858I8K8M8O8P8R8T8V8X8i8r8u8w8y88888888888888899 9 9.9496989A9M9X9b9m999999999999999999:::::-:/:2:3:6:9:;:=:?:X::::::;;;(;*;/;4;6;8;:;<;>;@;C;E;G;Z;c;o;q;s;|;;;;;;;;;;;<<<<< <<-(>0>2>4>6>8>:><>>>@>M>O>Q>S>\>p>{>>>>>>>>>>>>>>>>>>???????? ?"?$?/?\?^?`?b?d?f?h?j?l?n?y??????????????@ @@!@#@%@'@)@3@H@J@L@N@P@R@j@@@@@@@@@@@@@@@@@@@@@A#A%A(A)A,A/A1A3A5ANAAAAAAAAAAAAAAAAB*B,B-B.B0B2B4B5B7B9B;BB?B@BYBBBBBBBBBBBBBBBBCACCCDCECGCICKCLCOCRCTCUCWCXCYCrCCCCCCCCCCD DDDDDDDDDDDDDDDDDDDDDDDDEEE'ELEOEQETEWEZE\EaEEEEEEEEEEEEEEFF(F*F,F/F2F4FFFFFFFFFFFFFFFFFFFFFFFFFFFGG~GGGGGGGGGGGGGGGGGGGGGGGGGHH'HH@HCHFHHHHHHHHHHHHHHHHHHIIIIIII!I#I8ICIXIZI\I_IbIdIIIIIIIIIIIIIIIIIJXJZJ[J\J_JaJcJdJgJjJlJmJpJqJrJuJJJJJJJJJJJJJJJJKZK\K]K^K`KbKdKeKhKkKmKnKpKqKrKKKKKKKKKKLLLLLL L"L}LLLLLLLLLLLLLLLLLLLLLLLMM$M9M;M=M@MCMEMMMMMMMMMMMMMMMMMNDNGNINJNKNNNPNSNTNWNZN\N]N`NaNbNkNnNNNNNNNNNOOOO O#O&O(OwOOOOOOOPPP*PGP`PrP|PPPPPPPPPPPPPPPPPPPPPQQQ!Q,QUQWQZQ[Q^Q`QbQdQgQpQsQvQxQQQQR R RRRRRRRR"R$R%R(R*R,R-R6R9RRGRZR]R`RcRfRiRlRoRrRuRwRRRRRRRRRS SSSSSSSSSSSSSSSSSST0T3T5T6T7T:Tm@mkmmmmmmmmmnn nn&n+n7nLnNnPnSnVnXnunnnnnnnnnnnnnnnnnnoooo*o,o.o1o4o6oUojolonoqotovoooooooooooooooppppppp'p

p@pBpEpGp`pupwpyp{p~ppppppppppppqqqq qq!q2q4q6q9quAuDuWuhukumupusuuuuuuuuuuuuuuuuv vBvKvMvOvRvUvWvYvbvtvvvvvvvvvvvvvvvvvvwww w www0w3w5w8w;wJw[w]w_wbwewtwwwwwwwwwwwwwwwwwwxxxxx xx.x0x2x5x8xUxfxhxjxmxpxxxxxxxxxxxxxxxxxxyyyyyy!y0yAyDyFyIyLy[ylyoyqytywyyyyyyyyyyyyyyyyyyzzzzz z#z2zCzFzHzKzNz]zf{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{|||| | |||||||"|%|(|+|.|0|2|4|6|8|:|<|>|A|D|G|J|L|N|Q|T|W|Z|]|`|c|f|i|l|o|r|u|x|{|~|||||||||||||||||||||||||||||||||||||||||||||||}}}}} } }}}}}}}}}(}+}-};}}}}}}}}}}}}}}}}}}}}}}~~~ ~ ~~~~%~'~)~,~.~1~3~<~?~A~C~Z~s~|~~~~~~~/ACEFGIKMPQTVX[\]`x !"#&?Xadgj܁!@]`bdgƁ܁ -8AJ}ÃŃǃɃ˃΃уԃ׃ڃ݃ !#&(+-/1469;>ADGJMPSVY\_behknqtwz|~ÄƄɄ˄̈́τфӄՄׄلۄ݄߄†ņdžɆˆ͆φцӆՆ׆نۆ݆߆ !$'*-0369ADGJMPSVY\_behknqtwz}‹ŋȋˋ΋ыԋ׋ڋ݋ "%(+.147:=@CFILORUX[^adgjmpsvy|Čnjʌ͌Ќӌ֌ٌ܌ߌ !$'*-0369@BDFHJLNPRTVXZ\^`bdfhjlnprtvxz|~ŽĎƎȎʎ̎ΎЎҎԎ֎؎ڎ܎ގ  "$&/02;GNOPXYZcjklvw{|?@CI\ijtuyoV   %*+056 ;?@FW`avw{|   /89ABCIXYabcixy  *+;CDEKZ[cdekz{  !23DLMNVWX`abryz{ -.67GHOP_`hixy   " # * + < = D E F G M U e f n o          " # ( ) . / 4 5 9 : ? @ E F K ] f g q r s x         # $ ) * / 0 5 6 ; < A B     & ' ( + < = > B M N S U X Y Z [ \ M n j      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~U$null "#$VNSRoot]NSConnections\NSOidsValues_NSObjectsValues]NSObjectsKeys_NSAccessibilityOidsValues_NSVisibleWindows_NSAccessibilityOidsKeys_NSAccessibilityConnectorsV$classZNSOidsKeysRP03324Q&'([NSClassName]NSApplication+,-.Z$classnameX$classes^NSCustomObject-/XNSObject123ZNS.objects+,56\NSMutableSet57/UNSSet19G:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.)XNSSource]NSDestinationWNSLabel_%NSChildControllerCreationSelectorName  &( ]X11ControllerXdelegate+,_NSNibOutletConnector/^NSNibConnector +WNSTitle[NSMenuItems*bxU1)]NSMnemonicLocVNSMenu_NSKeyEquivModMask]NSIsSeparatorYNSOnImageZNSKeyEquiv\NSIsDisabled\NSMixedImage  P\IBDesignSize[NSClassName_IBDesignImageConfiguration^NSResourceName]IBNamespaceIDWNSImage_NSMenuCheckmarkZNS.sizevalZNS.specialX{14, 13}+,WNSValue/+,_NSCustomResource/ƀ_NSMenuMixedState΀W{14, 4}+,ZNSMenuItem/XNSTargetYNSSubmenuXNSAction!## "dau(z _P^submenuAction:$%*dau(z _1&')#   #!(c["+,^NSMutableArray/WNSArray+,VNSMenu/XdockMenu -!"#VNSName*/.XMainMenu1&'()*+0QYay)224-!221"SX11:4<*31P1>?@ABCDEFGHIJ469:@ADEHJLM)2Q2!5fe X112XY287ePOY}-["Q,22  2kkm2!<<;"bg Rstu*>=?bg R1x)__NSServicesMenu22  22CBeRcQh^UQa22  2UNSTag2G*Ff X11Qh22GIdQvN22!Kdoy:Qh22  22ONf}Pg_ X11Qq\_NSAppleMenu-!SSR"dau(z _TU*dau(z _1؀VW)S  S!Xc["-![[Z"b}/\]*b}/1^)[`_bbQc  -!ccb"bz*edxbz1 !"filnoruv) ()chgbܕQw 12ckjd~.R0g\Qm ;c!mb~.e> c   KLcqpf_tjzQ` RUVctshST_tjzQ~ c   hc!wl\kdz _b@g zygRM^_NSWindowsMenuqqs-!{{z"dRfxy|}*dRf1}~~)q{!hX11 Rf[_NSMainMenuTmenu V^apps_separator ɀ'  \NSDataSourceXNSvFlags_NSControlLineBreakMode]NSNibTouchBar^NSTableColumns_&NSViewWantsBestResolutionOpenGLSurface\NSCornerView_NSAllowsTypeSelectZNSDelegate_NSControlWritingDirection_NSControlContinuous_NSIntercellSpacingHeight[NSSuperview_IBNSLayoutMarginsGuide_NSAllowsLogicalLayoutDirection_NSDraggingSourceMaskForNonLocal]NSControlSize_NSNextResponder[NSFrameSize_NSControlTextAlignment_NSControlRefusesFirstResponder_NSTableViewGroupRowStyle_NSControlUsesSingleLineMode_NSBackgroundColor_NSColumnAutoresizingStyleYNSTvFlags_IBNSSafeAreaLayoutGuide_NSDraggingSourceMaskForLocal_NSIntercellSpacingWidth[NSGridColor\NSHeaderView[NSRowHeightYNSEnabled_#NSTableViewDraggingDestinationStyle^NSControlSize2_NSControlSendActionMask_IBNSClipsToBounds_ NSControlAllowsExpansionToolTips #@ȀR #@Ā#@1 YNSBGColorXNSBounds]NSNextKeyViewYNSDocViewWNSFrameYNScvFlags_#NSAutomaticallyAdjustsContentInsetsZNSSubviews; :< 9Z{301, 186}[NSTableView_NSViewIsLayerTreeHost  >< =Y{301, 17}+,_NSTableHeaderView/_NSTableHeaderViewVNSView[NSResponder  !"#$%&'()+-/013567-;<>]NSContentView[NSHScrollerXNSsFlags_NSMaxMagnification_NSHeaderClipView_NSMinMagnification[NSVScroller_NSGestureRecognizers\NSScrollAmts_NSMagnification?2K#@#? CFEOA A AA#?8_{{302, 1}, {16, 28}}+,AB]_NSCornerViewA/1DEFG)JKLMNOPQSTUVWYZ\NSIsEditableZNSDataCell\NSHeaderCellZNSMaxWidth^NSResizingMask^NSIsResizeableWNSWidthZNSMinWidth #@@ #@[#@O]`]^_`abcdefgh[NSCellFlagsYNSSupportZNSContents[NSTextColor\NSCellFlags2@bT z1klmnopqrsVNSSizeXNSfFlags_NSTextStyleDescriptorVNSName#@&_.AppleSystemUIFontvwx_NSFontDescriptorAttributesz1{WNS.keys|}~_NSFontSizeAttribute_NSCTFontUIUsageAttribute_NSCTFontSizeCategoryAttribute_UICTFontTextStyleSubhead+,\NSDictionary/+,_NSFontDescriptor/_NSFontDescriptor+,VNSFont/VWNSWhite\NSColorSpaceK0.33333299+,WNSColor/[NSColorName]NSCatalogNameWNSColorVSystem_headerTextColorV\NSComponents_NSCustomColorSpaceB0C0 1TNSIDUNSICCWNSModel OapplmntrGRAYXYZ .acspAPPLnone-appldescydscm<cprt X#wtpt |kTRC  descGeneric Gray Gamma 2.2 Profilemluc skSK.daDK:caES8viVN@$ptBRJdukUA,frFU>huHU4zhTWLkoKR"fnbNO:csCZ(heIL$roRO*deDEN8itITNsvSE8zhCN jaJP&&elGR*LptPORvnlNL@esESLthTH2TtrTR$fiFIFhrHR>plPLJ.arEG,xruRU:enUS<Vaeobecn siv gama 2,2Generisk gr 2,2 gamma-profilGamma de grisos genrica 2.2Cu hnh Mu xm Chung Gamma 2.2Perfil Genrico da Gama de Cinzas 2,2030;L=0 Gray-30<0 2.2Profil gnrique gris gamma 2,2ltalnos szrke gamma 2.2u(ppQI^2.2r_icϏ| ֌  2.2 \ |Generisk gr gamma 2,2-profilObecn aed gama 2.2   2.2Gama gri generic 2,2Allgemeines Graustufen-Profil Gamma 2,2Profilo grigio generico della gamma 2,2Generisk gr 2,2 gammaprofilfnpp^|ep2.2cϏeNN,000000 2.2 000000   2.2Perfil genrico de cinzentos da Gamma 2,2Algemeen grijs gamma 2,2-profielPerfil genrico de gamma de grises 2,2#1*5A!!2@#"L1H'D 2.2Genel Gri Gama 2,2Yleinen harmaan gamma 2,2 -profiiliGeneri ki Gray Gamma 2.2 profilUniwersalny profil szaro[ci gamma 2,2:'E' 2.2 DHF 1E'/J 9'E1I0O A5@0O 30<<0 2,2-?@>D8;LGeneric Gray Gamma 2.2 ProfiletextCopyright Apple Inc., 2012XYZ Qcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Km+,\NSColorSpace/\NSColorSpace+,_NSTableHeaderCell/_NSTextFieldCell\NSActionCellVNSCell]^_`a]NSControlView_NSPlaceholderString0AYText Cellklnrs#@*PVB1_controlTextColor+,ܤ/+,]NSTableColumn/JKLMNOPQUVW #@U#@D]^_`abcdghbcNVK0.33333299]^_`aʀJKLMNOPQUVW #@L@#@$]^_`abcdghc_u [headerColorVB1C1 1]^_`a_NSDrawsBackground kln!"rs#@(')€_controlBackgroundColor,-VL0.602715373N0.6666666667 124ŀYgridColor78VM0.4246723652E0.5 1+,<=[NSTableView<>/YNSControlZapps_tableCD ˀՀGKMNPQKVNSCell̀ ̀΀ Y[\ Z_{{15, 245}, {402, 18}}b]cdeaf_g^hijkloCqVstu_NSPeriodicInterval]NSButtonFlags_NSAlternateContents_NSKeyEquivalent_NSAlternateImage_NSAuxButtonType_NSPeriodicDelay^NSButtonFlags2KH8Q !Ѐˀπizg*U_u(vzxyz[NSImageNameрXNSSwitch+,}~_NSButtonImageSource}/+,\NSButtonCell/+,XNSButton>/]click_through ^׀^copy_menu_item ـGMǀڀ ۀ܀ [p Zc_{{55, 235}, {136, 26}}hc]badei^gVsj _NSPreferredEdge]NSAltersState_NSUsesItemFromMenu_NSMenuItemRespectAlignmentZNSMenuItem_NSArrowPositionـ@ @@ !݀klnrs WNSState߀܀!*dOꇢ^U__popUpItemAction:ZOtherViews1ڀހ)߀!g256 z.Or߀!eex,z.Or߀!eSC,z.Or+,_NSPopUpButtonCell/^NSMenuItemCell+,]NSPopUpButton>/Udepth #^dock_apps_menu Ydock_menu _dock_window_separator G$MN()$ǀ 1[4 Z_{{18, 243}, {402, 18}}b]cdeaf_g^hijklo>Vstu!ЀdI#}[enable_authFG GMNQRǀڀ _{{18, 182}, {409, 23}}b]cdeaf_g^hijkloF^Vstu!ЀeQh^Uj!__enable_fullscreenfg GMNqrǀڀ  _{{37, 116}, {409, 23}}b]cdeaf_g^hijklof~Vstu!ЁnQA1W(Qh^Uj!_N-Su(xUR_enable_fullscreen_menu GM_NSAntiCompressionPriority_%NSTextFieldAlignmentRectInsetsVersion_NSPreferredMaxLayoutWidth ڀ  #@v`_{{54, 79}, {362, 31}}Z{250, 750}]^_`ak   @o\nџ n8jneN;oy:VhvN efB\oy:xUR0klnors )\controlColor+,[NSTextField>/_enable_fullscreen_menu_text GMNˀ  [  YZAAC_{{18, 145}, {402, 18}}GM  DE #@x3b]cdeaf_g^hijkloVstu!ЁnU_u( X11 N vc u\ aɓu_enable_keyequivs G$MN$ǀ  _{{18, 166}, {402, 18}}b]cdeaf_g^hijkloVstu!ЁjQA1_}u(b6z#}Zenable_tcp  %GMN"#) !# "_{{18, 243}, {402, 18}}GMN34: OP Gb]cdeaf_g^hijklo@Vstu!Ё $fj!dN unџ \fake_buttonsHI '+GKMNSTKǀ̀ () _{{15, 184}, {402, 18}}b]cdeaf_g^hijkloH`Vstu!Ё'*hq&ޖWnџ yR_focus_follows_mousehi -1GKMNstKǀ̀ ./ _{{15, 123}, {402, 18}}b]cdeaf_g^hijklohVstu!Ё-0hezS_q&_focus_on_new_window 38GMN 46 5_{{18, 96}, {402, 18}}GM  RT #@wSb]cdeaf_g^hijkloVstu!Ё37o Option uP Alt_L T Alt_R_option_sends_alt :V\NSWindowRect_NSUserInterfaceItemIdentifier]NSWindowTitleYNSMaxSize\NSWindowViewYNSMinSize_NSFrameAutosaveName_NSWindowIsRestorable_NSMinFullScreenContentSize\NSScreenRect_NSMaxFullScreenContentSize_NSWindowContentMinSize_NSWindowBackingYNSWTFlags]NSWindowClass[NSViewClass_NSWindowSubtitle_NSWindowStyleMask;<? >@x=!_{{319, 329}, {484, 342}}hX11 POY}-[WNSPanelZ{320, 240}[Z @1сA)_NSSelectedTabViewItem^NSTabViewItemsVNSFont_NSAllowTruncatedLabels]\ [?? B 1)1 :) GI"53S)_{{36, 125}, {399, 14}}]^_`ak F o)uvU_u(fB xURc uv\ aɓuSg;yOu( Meta fuv X11 au(z _0GM*+  HJ I_{{36, 209}, {385, 28}}GM<=  LM ]^_`ak:IG K o*c OO Option b Command vT fBc NN NU_u(nџ vN-bSc 0 _{{36, 174}, {385, 14}}]^_`akSI N oQA18QelՐxUvfRՉ[vRMv X11 c u\ a0_{{18, 194}, {402, 18}}b]cdeaf_g^hijklo)]Vstu!Ё"QhOqg|}quvOH\@_{{36, 59}, {385, 31}}GMNjkр VW A]^_`akw5  Uo8uvU_u(fB option ugP Alt_L T Alt_R X11 c u{&_ N f/ Mode_switch0_{{18, 35}, {418, 18}}b]cdeaf_g^hijkloVstu!ЁSXml8`OqgbKcyRveTcr_{{10, 33}, {438, 280}}+,/_{{13, 10}, {458, 326}}1]ar)VNSViewYNSTabView\NSIdentifier `_A^Q1b8Qe+,]NSTabViewItem/ `ځqAbQ21Ffفdhl)GM ڀ ef _{{17, 238}, {44, 20}}]^_`akdg cOrGMہ ڀ ij #@x@_{{36, 216}, {392, 14}}]^_`akh k okdx\gW( X11 Qk!U_R_ueH0GM ڀ mn #@w_{{36, 148}, {382, 28}}]^_`akl o o7U_u( X11 root z0Ou( Command + Option + A uv}DTO2QeT╋Qh^Uj!_0_{{10, 33}, {438, 279}}b8Q `sAb [ Zt1uy})GMN&'ǀs vw s_{{18, 255}, {409, 23}}b]cdeaf_g^hijklo3Vstu!ЁuxfU_u(T keRGM@A s z{ s_{{36, 221}, {385, 28}}]^_`akMy  |o;U_u( b xUv N&QA1 OSX Rjg  X11 CLIPBOARD NKvT ke NS PRIMARY }]0GMNXYǀs ~ s_{{34, 129}, {409, 23}}b]cdeaf_g^hijkloeVstu!Ё}ouv Rjg fe9fBfe CLIPBOARDGMNqrǀs  s_{{34, 104}, {409, 23}}b]cdeaf_g^hijklo~Vstu!Ёouv Rjg fe9fBfe PRIMARYN-c GMNǀs  s_{{34, 79}, {409, 23}}b]cdeaf_g^hijkloVstu!ЁouvxSee[WfB zSsfe Rjg GMNǀs  s_{{34, 192}, {409, 23}}b]cdeaf_g^hijkloVstu!Ёouv CLIPBOARD fe9fBfe Rjg GM s  s_{{48, 158}, {385, 28}}]^_`ak  o2``Ou( xclipboard0klipper bNOUQvN X11 Rjg{tz _ P\u(kdx0GM݁ s  s#@v_{{48, 47}, {370, 28}}]^_`ak  o!u1e X11  ST[vPR6 kdxSq!lW(gNau(z _Ou(0_{{10, 33}, {438, 279}}cRjgK `́Ab1CHhˁ'-)GKM  K ̀  _{{23, 208}, {385, 31}}]^_`ak   o!uvU_u(fB c NN g*U_u(vz\gOnџ c uzrzN&\QvU_u(0GKM  K ̀  _{{23, 161}, {385, 17}}]^_`ak (  oX11 zq&gߖn8jyR0j#gg NNvSveHg0GKM 4 5K ; ̀  #@yP_{{23, 89}, {409, 28}}]^_`ak B  o9uvU_u(fB eXv X11 z\gO X11.app N f/ Finder.app0}Bzj_.app {I ygRM0_{{10, 33}, {438, 279}}bz$ J`A 1 N Q R S)G$M ^ _$   _{{36, 209}, {385, 28}}]^_`ak Q k  oFU_R X11 \gO\ Xauthority Su(cR6c u0|}qv IP OMW@fR Nu\gq!eH SgN X11 au(z _q!lU_R0G$M x y$    #@x_{{36, 132}, {388, 28}}]^_`ak R   o-U_u( I#} _ŘN_U_u(OxO|}q[Qh0uvP\u(fB N gQA1O`zau(z _v#}0G$M  $    #@y_{{17, 17}, {404, 14}}]^_`ak S   oNx\gW( X11 N k!U_R_ueH0_{{10, 33}, {438, 279}}c[Qh`'+, YNSTabView /Z{484, 342}_{{0, 0}, {1680, 1025}}Z{320, 268}_ {10000000000000, 10000000000000}Yx11_prefsV{0, 0}+, _NSWindowTemplate /[prefs_panel S_scroll_in_device_direction À_sync_clipboard_to_pasteboard) "ŀ[sync_keymap uǀ_sync_pasteboard }ɀ_sync_pasteboard_to_clipboard ˀ_sync_pasteboard_to_primary ̀_sync_primary_immediately πZsync_text1 рZsync_text2D AӀ_toggle_fullscreen_item? 4Հ^x11_about_item"  v ׁ_bring_to_front:+,  _NSNibControlConnector  /^NSNibConnector  i ځ_minimize_window:?  4܁_orderFrontStandardAboutPanel:@  6 ށ[prefs_show:F EUhide:J & MZterminate:G , H_hideOtherApplications:H 2 J_unhideAllApplications: 7 ^Ucopy: = f ]close_window: C l \zoom_window: G I  G L M-MN  U V-_NSHuggingPriority    [ a eZ 7L_{{340, 191}, {100, 32}}b]cdea_g^hijk h k G m nts@ !Ӏb_apps_table_duplicate: t v  G L M-MN   -   _{{340, 159}, {100, 32}}b]cdea_g^hijk h k t nts!Ӏbyd_apps_table_delete: W _apps_table_show:  G L M-MN   -   _{{340, 223}, {100, 32}}b]cdea_g^hij h k nts!ӀdRQev_apps_table_new:  ^prefs_changed:  ^prefs_changed:) " ^prefs_changed:   ^prefs_changed:   ^prefs_changed: ـ  ^prefs_changed:~ ~ Yx11_help: ' _apps_table_show: o \next_window: r _previous_window:F  _enable_fullscreen_changed:D A _toggle_fullscreen:C  ˀ ^prefs_changed:H ' ^prefs_changed:h  - ^prefs_changed:  u !^prefs_changed:  } #^prefs_changed: !  %^prefs_changed: '  '^prefs_changed: -  )^prefs_changed:f 3  +^prefs_changed: 9 3 -^prefs_changed: ? S /^prefs_changed:1 C ܯ D'2?@ABkCDEFGHIJ()*  !"+q~#:+=)4kFRfr'AYrKCQ HT ht 5$) Q _ R y S - G V t ESFG+5 1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&'J& (2]NSApplication -    45NO M6=! _{{360, 400}, {454, 271}}jX11 au(z _xUZ{320, 240}1 G t )1 +5?C)1 )_{{1, 1}, {301, 214}}_{{0, -28}, {301, 214}}+, ZNSClipView /1 ׀)_{{1, 1}, {301, 28}} " M   " "_NSControlTarget_NSControlActionB @AA_{{1, 215}, {301, 15}}\_doScroller:+, ) *ZNSScroller )>/  M  5 " "B DAA_{{302, 29}, {15, 186}}_{{20, 20}, {318, 231}}1 ? ܡ @GJ C D E F G H I   L_.NSPanGestureRecognizer.numberOfTouchesRequired_!NSPanGestureRecognizer.buttonMask_%NSGestureRecognizer.allowedTouchTypes_NSGestureRecognizer.target_NSGestureRecognizer.delegate_NSGestureRecognizer.actionIH__panWithGestureRecognizer:+, O P_NSPanGestureRecognizer Q R/_NSPanGestureRecognizer_NSGestureRecognizer+, T/+, V W\NSScrollView V/Z{454, 271}_{{0, 0}, {1680, 1025}}Z{320, 268}Xx11_apps1 ] ܯ'2222B22222222()*        +q:)FfKCKKHKKhK$$$ Q$ R$ S - G- t-EFG- -02222:22222222-QSS-Y[-acccccccc-y{:?A] GI"53SAaڀـ܀߀߀߀߀ځdځhڀځځlځArsusys}sssssÀˀ́́'́́-́A3##J1 ܯ D'2?@ABkCDEFGHIJ()*  !"+q~#:+=)4kFRfr'AYrKCQ HT ht 5$) Q _ R y S - G V t ESFG+5 :;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1-02469:<@ADEHJLMQSVWY[^acfilnoruvy{~ :?A] #EGJIM"P5T36SWaڀـ܀߀ހdfhjln rsuwy{}̀ˀ΁')-/3?C#&' ,ʀր؀&,29āƁȁʁ́΁Ёҁԁցفہ݁߁   "$&(*,.J1 ܯ        !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~STUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÁāŁƁǁȁɁʁˁ́́΁ρЁсҁӁԁՁցׁ؁فځہ܁݁ށ߁      !"#$%&'()*+,-./01J     !"#$%&'()+,-./0123456789:;<=>?@ABCDEFGHIJLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~1)1 ܠJ+,^NSIBObjectData/",1:?QZw*1?L^l (1<ETYbkvwy 6 8 : < > @ B D F H J L N P S V Y \ _ b e h k n q t w z }   , 4 \ ^ ` b d f o q s         H V ] q   % 3 5 7 9 ; = ? G Y f q | ~    ' , Y b l u w y { }  (*,.024;DSZbkrw!#%'+<>@BDMfhjlnprtvxz|~ "#%'TVXZ\^`bdfk|~  FHJKMOPRTy 579:<>?ACdfhjlnp}-/124679;\^`bdfho <>@BDFHJLNSdfhjlqz *,.0246;dfhikmnpr !#%&(*KMOQSUWp 1=BWY[]_ap.;D]kz)Bc$8T^x/Cfhkmoqrtuwx  *2<bmorsuwz|;<>@CFHJLMPRT^g{BP\ez  09;>U^lu~      % ' ) * 3 < > _ k u !!!!!#!@!B!D!Q!Y!`!b!d!f!m!o!q!s!u!!!!!!!""""0"9"@"E"R"Z"g"s"u"~""""""""""""""######%#'#8#=#C#K#M#O#Q#S445 555$585C5U5b5i5555555555555555555666 66!6#6%6'6:6C6L6U6c6h66666666666666666667!7#7%7'7)7+7-7/7X7Y7[7]7_7`7i7r7t77777777777777777788082848687898;8=8?8P8Y8\8^8`8u8w8y8{8}888888888888999999(949?9I9T9i9k9m9o9q9s99999999999999999::::::":$:&:(:A:::::::;;;;;;;!;#;%;';);,;.;0;C;L;X;Z;\;e;n;;;;;;;;;;;;;;;<<<<<<< <{<}<~<<<<<<<<<<<<<<<<<<<<<<=8=J=X=m====================>>>>>>!>#>%>'>)>6>8>:><>E>Y>d>m>v>x>z>|>~>>>>>>>>>>>>>>>????? ? ? ??E?G?I?K?M?O?Q?S?U?W?b?k??????????????@@ @ @@@@@1@3@5@7@9@;@S@h@j@l@n@p@r@@@@@@@@@@@@@@@A AAAAAAAAA7AvAxAzA|A~AAAAAAAAAAABBBBBBBBB B"B$B%B'B(B)BBBBBBBBBBBBBBBBBBC*C,C-C.C0C2C4C5C8C;C=C>C@CACBC[CCCCCCCCCCCCCCCDDhDDDDDDDDDDDDDDDDDDDEEE5E8E:E=E@ECEEEJE{EEEEEEEEEEEEEEFFFFFFF|F~FFFFFFFFFFFFFFFFFFFFFFFFFFGgGjGlGmGnGqGsGvGwGzG}GGGGGGGGGGGGGGGGHH%H'H)H,H/H1HHHHHHHHHHHHHHHHHHIIIII I I!I,IAICIEIHIKIMIIIIIIIIIIIIIIIIIJAJCJDJEJHJJJLJMJPJSJUJVJYJZJ[J^JJJJJJJJJJJJJJJJKCKEKFKGKIKKKMKNKQKTKVKWKYKZK[KtKKKKKKKKKKKLLLL L LfLhLiLjLlLnLpLqLtLwLyLzL|L}L~LLLLLLLLLLM M"M$M&M)M,M.MMMMMMMMMMMMMMMMMN-N0N2N3N4N7N9NQ@QCQDQGQIQKQMQPQYQ\Q_QaQQQQQQQQQRRRRR R RRRRRRR"R%R'R0RCRFRIRLRORRRURXR[R^R`RyRRRRRRRRS StSwSySzS{S~SSSSSSSSSSSSTTTTT T#T%T(T)T,T/T1T2T5T6T7T:TcTfThTkTmTpTsTuTTUUUUUUUU UUUnUUUUUUUUUUVEVGVHVIVLVNVPVQVTVWVYVZV]V^V_VbVVVVVVVW W"WaWcWeWgWjWmWoWqWWWWWWWWWWWWWX XXX*X-X0X3X6X9XXCXLXZX_XxX{X~XXXXXXXXXXXXXXXYY"Y$Y%Y&Y(Y*Y-Y.Y1Y4Y6Y7Y9Y:Y;YSY|YYYYYYYYYYZZZZZZ Z Z ZZZZZZZ Z9ZbZeZgZjZlZoZrZtZ[[[ [ [ [ [[[[[[[[[[ [)[B[k[n[p[s[u[x[{[}[\\ \%\(\+\.\1\4\7\`\b\e\f\i\l\n\p\r\{\\\\\\\\\\]]]]]] ] ] ]]]]]]]]4]s]u]w]y]|]]]]]]]]]^^^^^ ^ ^^^^^^.^S^V^X^[^^^a^c^_7_9_:_;_>_@_B_C_F_I_K_L_O_P_Q_j_________`A`C`D`E`H`J`L`M`P`S`U`V`Y`Z`[`t`````````aSaUaVaWaZa\a^a_abaeagahakalamaaaaaaaaaabTbVbWbXb[b]b_b`bcbfbhbiblbmbnbbbbbbbbbcclcocqcrcscvcxc{c|cccccccccccccccd?dddddddddddddddddde e eeeeee_exeeeeeeeeeeeeeeeeef9ff?f@fBfDfGfHfKfNfPfQfSfTfUfnffffffffgOgRgTgUgVgXgZg]g^gagdgfgggigjgkgggggggggh[h^h`hahbhdhfhihjhmhphrhshuhvhwhhhhhhhhhiBi[i`iuixizi}iiiiiiiiiijjjjjjjjjj j#j%j&j(j)j*jCjljojqjtjvjyj|j~k ktkwkykzk{k}kkkkkkkkkkkkkkkkkkkklJllllllllllllllllllmmmmm!m$m'm)mTmmmtm}mmmmmmmmmnnn n5n7n9noSoUoWoZo]o_o|oooooooooooooooooppppp%p'p)p+p.p0pIp^p`pbpdpgpipxpppppppppppppppq qqqq"q%qEqVqXqZq]q`qlq}qqqqqqqqqqqqqqqqqqqqqrrr(r*r-r0r6rGrIrKrNrQr_rprrrtrwrzrrrrrrsssssss s"s$s%s(s+s-s.s1s2s3s6s_sasdseshsjslsnsqsssssssssssssttttttzt|t}t~tttttttttttttttttttttuu#u%u'u*u-u@uQuTuVuYu\uuuuuuuuuuuuuuuuuv+v4v6v8v;v>v@vBvKv]vnvqvsvvvyvvvvvvvvvvvvvvvvvvwwwww!w$w3wDwFwHwKwNw]wnwpwrwuwxwwwwwwwwwwwwwwwwwwxxxxxx!x>xOxQxSxVxYxnxxxxxxxxxxxxxxxxxxxyyyy yy*y-y/y2y5yDyUyXyZy]y`yoyyyyyyyyyyyyyyyyyyzzzz z zz,z/z1z4z7zFzO{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{|||| |||||||||!|#|%|'|*|-|0|3|5|7|:|=|@|C|F|I|L|O|R|U|X|[|^|a|d|g|j|m|p|s|v|y||||||||||||||||||||||||||||||||||||||||||||||||||||}}}}}}}}$}s}v}x}{}~}}}}}}}}}}}}}}}}}}}}}}}~~~~~~~~~%~(~*~,~C~\~e~p~y~~~~~*,./02469:=?ADEFIanw (AJMPSpŀ )FIKMPmvŁ΁Ӂ܁!*3fhjlnprtvxz|~ÃƃɃ̃σ҃Ճ؃ۃރ "$'*-0369@BDFHKNQTWZ]`cfilorux{~ÈƈɈ̈ψ҈Ո؈ۈވŊȊˊ͊Њӊ֊ي܊ߊ !$'*-0369ADGJMPSVY\_behknqtwz}ŒŌȌˌΌьԌ׌ڌ݌ "%(+.147:=@CFILORUX[^adgikmoqsuwy{}ÍōǍɍˍ͍ύэӍՍ׍ٍۍݍߍ !#%')+-/13579;=?ACEGIKMOQSUWY[]_acegikmoqsuwy{}ÎŎǎɎˎ͎ώюӎՎ׎َێݎߎ $%(1@Exorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/Localizable.strings0000644000175000017500000000653014757411105023232 /* Dialog title when quitting */ "Do you really want to quit X11?" = "`x[}Pg_ X11 U"; /* Dialog when quitting */ "Any open X11 applications will stop immediately, and you will lose any unsaved changes." = "NOU]U_v X11 au(z _\gzSsP\kb N`gzY1b@g g*Q2[XvfR0"; /* Dialog title when switching to RandR */ "Enter RandR mode?" = "2Qe RandR j!_U"; /* Dialog when switching to RandR */ "An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the #%#A key sequence to force X11 to return to the previous state." = "au(z _lB X11 fe9oy:Vhvg^0X11 gW(au(z _lBVNKRMraKfBV_oy:Vh0b `N_SOu( #%#A c u^O_7R6 X11 VNKRMraK0"; /* No comment provided by engineer. */ "Allow" = "QA1"; /* No comment provided by engineer. */ "Always Allow" = "~=f/QA1"; /* No comment provided by engineer. */ "Cancel" = "Sm"; /* No comment provided by engineer. */ "Mac Help" = "Mac Rf"; /* No comment provided by engineer. */ "Quit" = "}Pg_"; /* No */ "No" = "T&"; /* Yes */ "Yes" = "f/"; /* Terminal */ "Terminal" = "}Bzj_"; /* Startup xinitrc dialog */ "You have an existing ~/.xinitrc file.\n\nWindows displayed by X11 applications may not have titlebars, or may look different to windows displayed by native applications.\n\nWould you like to move aside the existing file and use the standard X11 environment the next time you start X11?" = "`g NP ][XW(v ~/.xinitrc jhH0\n\nX11 au(z _b@oy:vzSlg ]QwR bSw wOTSg au(z _oy:vzN T 0\n\n`_uesg vjhH N&NW(N k!U_R X11 fBOu(jnv X11 tXU"; /* window item modifiers */ "window item modifiers" = "command"; /* Updates menu title & */ "Check for X11 Updates..." = "jg X11 vfev""; xorg-server-21.1.16/hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist0000644000175000017500000000061314757411105022632 LprojCompatibleVersion 106.3 LprojLocale zh_TW LprojRevisionLevel 1 LprojVersion 106.3 xorg-server-21.1.16/hw/xquartz/bundle/Resources/X11.icns0000644000175000017500000056111214757411105016447 icnsJis32؀¹zE.UHAF C @&XtCK/$}yj ,1  ( *It+`z :cHa h[*<`! !":? uTȲFs'H2ޯHI@@AN^`! QlAD]+wUΪ0K (SJiw3L@ L>CLJKKHIRF?@¹zE.UHGP B$L'YۨyJUe'-KVy`? 4G &# {) F +G3R*z :Ao5,*pa h[3$l_  x ),nEG)UcG^(W *CLN:Q@ KA@FA?ADORE?@s8mk & wprNvǍ/l0< lKv:4N4C`סss-˗pҽ3 0BF<1:<,il32/Ueccj[I>'(0;MJ97?(+4@`׆\=>7)0:JozCD :,+3=LDG+R&-4 C 9w5B*>E/?=ف |X:4ʀ .?3րsA?k~zu9ft-z~ԓ w\-4>tG |9B7bnsvw{{yyw[9>A? Ueccj[I>'(0;MJ97?(+4@`׆\=>7)0:JozBD :,+3=LDG+R&-4 C 9wYQk+5B]ہRPv*сzRQm>Eȁ_YR[ـ/?=Ʊ .oVVX:4ʀo @_`Y_.?3¯'td^iA?k߿b+vgbd79d,xehm|-R]`Ԓ`zy}S \-44d5 |9B7/7;?ADGHJK;8>A?Ueccj[I>'(0;MJ97?)+4@`׆\=>7)0:JozBD :,+3=LEG+R&-4O/Ros4(P$$)-1Xj(?*ozX/03;$&)~'4? #WwY-%5/))#?#R{v-G=!1=$nB#$> C 98o܁z);5B#q` I*uW >>Ek|;)#ʀ/?=_b F hX:4ʀq0;. #.?3]a@ K/".A?k`p(K.#$9 sWm(Q-')A?l8mk]wwwwQ%J7 1ZY(c|woR zswѓp *Zzџ Uhr430q7%.P.P5 ICtm=396=H];Y fY~ ݩ{{5g a F޵ݱ   it32UnfَѽgGE8468;=?BDGILNPSUX^X{7?5229H@CEHJNWQ}|M80*)+;<;,#!"$')+.0358:<>AEJTZ|l32*'(1= ;$! !#&(+-02579<>@DLSk36,()/><3#!!"$')-/1368:=?AFOQ{7;.)),>:,#""$&*,.03579;>@CHTS||G=2+*,:<;)$#$&(+-/2468;=?AEKUb|}k86.+,4A<'$#%(*-.0358:<>@BFOS~79/,-3B74'$$&)+-/2469;=?ACGRR~|9<0,-0C!;.&%%'+-.03579<=@BCJVW||C?4.-0<@=*'$&)+-02468:<>@BDLUj}}c;80-/9E=6)&%'*,.03568;=?@BFNO8:2/06D>1(&&(+-/13579;=?@BGQO}|9=3/05G">.)&'*,.024579;=?@CHRZ||A@4//4?B>,('(*,.024689;=?@CKQq}[>81/2>A;7*''(+-/024689;=>@DNL|:92/09G=1)&')+-/124679;==@EPM}8<3/16G!?,'&'*,-/124679;;=@FLZ =?4//3F"?6)'&'*,-/1245799;=?E>Q=60.1>A>0'%&'),-/0235779;;=A7ݸu47/-.5D$))%$&(*+-.02246689:<;?ؑv{yzyyz{y+6/,--B%&#$%'*+,.002445788;4Y1As)1/+*,!&%#$&((*,-/11234568;-w|7,.*)*S#"#%'(*,,.0013 568/}_$.*('(%*""#%''(*,,-/0022452>-)'' <7́ ! ""$&&')++-../1125(h{"+(&& 5 ?}   "$$%'))*+,. 003# {-((%%"'A!=#V 7 ""$$&''(*++,,-./+}R($$" ;"?|=+ !"#$%'))*++.&Gt'$""5! @׋C#; !"#$&''((),w|&#!!2 BČ8#3 !!"$%%&){#"# #@! ;< -!#$$%$) |D"9" =x< "<!""%Uz g!3" AC#3#~n|. Av6#. ^^>! @ˆ5& 187# <֠4$64] 1# 6/$. 3͓ ,! 29!(  # Cߦ/"; & 4" 5,%.  yS .% :d #'   7Ѕ (" 5:     C|5"3 { 3_%( C5 l?""={ n R}4 { 2yu{ $| }wt|+7S |~vtPFp| |~uu}~¢{ |uv{ 9 }~ux|# .S)q~ ~~vxH-({ ~u~v%%!!'| ~u{"; X ~s| :"%,{ {i}E -$##{ rUl%%< ^,{ "2v~ 2p{ ;"%'{ xU};.$""*| ],c&$"< [ 2b{!!$-{ j2 {>!$${6:|10$@8,Y'%%6y}3B |""%({I1 ?!"".|9. *3%!=_30U(%$- { 5B ##%% A: MA! KŌ@< m3$$7ŒA=z 6?%) B 7q Y##!C[ s!>㓇B5{ m%/,ċ<*f i%% Rs2./^ KŽv ub1t c { ^, _ b %h O  V  Jv{ )Lq-z[ 6!,qqN m3) /5 ;qђE  8HI$<  (GfnquwuĽvwtoh^: 6%  !+ɍ GE9436A,8{mpnlmkd_XNA=*  (:O"/.00224667887676462fَѽgGE8468;=?BDGILNPRVX^X{7?5229H@DFHJNWQ}|M80*)+;<;,#!"$')+.0358:=?AEJTZ|l32)&(1= ;$! !$&(*.02579<>@DLSk36+()/><3#! "%'*,.1368:=?AFOQ{6;.)),>;,#""$')+.02579<>@CHTS||F<1+*,:<;)$##%(*-/2468:=?AEKUb|}k86.+,5A<'$#%')-/13589;>@BFNS~79/,-3B74'$$&(+.02468;=?ACGRR~|8=1,-1C!;.'%%')-/13579;=@BDJUW||C?4.-0<@=+&%&(+-02468:<>@BFLUj}}c;80-/9E=6)%%'*,.02579;=?@BFNO8:2/06E>2(&&(+-/13579;=?@BGQP}|9=3/05G">.)''),.024689;=?@CHRZ||A@4//4?B>,('(*,.024689;=>@DKPq}[>8102?B;7+'&(+-/124689;=>@CNK|9:2/09G>1)''*,-/124679:<=@EPM}8=3/16G!.>,(''),./124679;;=@FK\˛ =?4/03F">6*&&'),-/124668::A?>0'&&(*,-/0244688:<=A7w{y{|{27/-.5D#))%$&(*+-.013556799<;BthWYXYYZ[Z[[]cי*6/,--B%%#$&')+,./13345678;2`z|#0dP[״)1.,),#&Ր$"$%')*,-/01334568;+ƀqo|7,-+))!x(͋v\#"#%'(*,,-/11235568.p}_$.*(&(,uЊ{snY!""#%'')++-//1 2452Au -)(' ;"Y[ޓxrkgdcZʝ! ""$&&(**+,-.0 25'o{",)&& 5 *[T vpidbaab\~k' "$$%'))*+,. /03!Ԃ} {,'(%%"'A!*[Z сphb_a_j-5 ""#$%&'()*, ./.*ː}R(%$" ;"-[l"okb^\\^_`]uZ4+!!"#$%&')+ -%J~t($""5! ,[ ~ݒlf^[ZZ\^]djF.#; !"$%'((),~ƍ|&#!!2 )Uu ~ha[Y[][kb?#3!"$%%&&()ٜ{#"" "@! (o}sg^YWWYY\Xp\5 -!""##$$%#(ߌ |E"9" ,eû~}og]XVVXYZWpV. "< !""%XS g!3" ,aŻ~}mg\WUUVXZVnW. #3 #V|. -cŽ~}td\VTUUWYVkX0 #.^^>! ,gƾ~}~a[USSUUWWaX=& 188# ,x¿^ZTRRTTVXWaK$64] 1$ '~^[SQQSTTWSlW$. 2͓ ,! #Ǿe^SPPRSSUTaY!)  # 3[WP RSSUSeS"; & 4" %ZZPOPQRRUQhU%.  yS .% +ZSOQRRTQk7#'  7Ѕ (" &ÿYYOMOOQQSS]T    3pQTMMOOQRTOl^"3 { !Ϳ{fYOMNOOQRSPi5%(C5 YνTWNMNNPRSRXT""={ n BrQTMLNNPRSOfY { &{TRPMLMOQQSLwC{ $| fܼpHROLLMOQQTK{G|+7S h޼lA~SNLLNPPQTJ}JPFp| h޻j>zSNLLNPPRTJP}~¢{ ji=xSNLMOOPRTIS{ 9 lizSNMNOOQRTSUߍ~v%%!!'| i@}SNMNNPRRTVHӐ{"; X i?}TNMNNPRRTXA| :"%,{ xh9xXOMMOQQRTVOr}E -$##{ ^%gbQMMOQQSSVVS܎l%%< J QoRNNPPQSSUZJ~{ "2v~ μգ%!$${ ػէ'BdcUSUUWYY\Wo}|10$@~⿼"& UvZUSSTVXXY[]V~Y'%%6y}ƺӢ%$aoYVTTVXXY[\_W~ |""%({̸Ͷ9$Aii[WVVXXZZ\^`[ ?!"".|ѷɼ+ Owf\XWWYZZ\^_a]*3%!=_˷͛&  Uzg^YXXY[]]^`b^U(%$-{ ȶП&*T}h_ZYY[]]__ada##%%뿵ҙ^**Y~ia[Z\\]__accdg+A!K޶ҝe-,Wkb\^^`bbcegb13$$7˴Йf/'S~md_]^_`bbcefflT>%) 򱱴͏c3(L|pga`bbdffghleOY##ƇZ,@n{jgcaabdffhhjllrs!>hǴjxE/_qjebceefhhjllnnum%/kɘe-"'Fvxidceeggikklnnpqui%%8zR%& fucedfggikklnnprrts}/^1o}r u0Xfehiklmoqqrttvxw! LvF {%^,+^qrsqonnoqqssuwwxzz|}ֻrE%hO  X|xtr=suwwxzz|~~; Jv{ /1.U}zxvvw,yz{}}~fz[ 6 52Al}}{{|'}}l4 mD3) /5 >5?gc/ 8HI$<=97Jr](fvv ;#99;>TtfNLKJ*'.z {++&> ( &59<>@?JZfnsy|xrmaQGHGEA:$6%  !+ɍ GE9436A,C=?>=><:84/&=*  (:O"/.00224667887676462fَѽgGE8468:=?BDFIKNPSVX]Y{7?5229H@DFHJNWQ}|L80*)+;<;,#""$')+.0358:@DLSk36,()/><3#! "%'*,.1368:=?AFPP{7;.)),>:,#""$')+.02579<>@CHTS||G=1+*,:<;*%##%(*-/2468:=?AEKUb|}k86-+,4A<($#%'),.03579<>@BFNS~79/,-3B74'%$&)+-02468:=?ACGRR~|8=1,-1C!;.&%%'*,.13579;>@ADJUW||C?4.-0<@=*&%&)+-/2468:<>@BEMUi}}c;70./9E=6*&%'*,.12578;=?@BFOP9:2/06E>1(&&(+-/13579;=?@BGQO}|9=3005G">.)''),.024679;=?@CHR[||A?50/4?B>,('(*,.024689;=?ACKQq}[>8101>A;7*('(*-.034689;=>@CNK|:92/19F>0)'')+-/134689;=>@EPM}8=3/16G!0?,'&'*,-/124679;;=@FK]p|xwwvwxxyzz{} =?4//3F">7*&&(*+-/024578:<=?D;_efghihjkmqtQ=6/.1>A>0'&''*,-/0235778:<=A6M\ ]\glb_`bdegjkkjeaacbn17/-.5D"))&%&()+-.01355799:<:ELXWY`R>=>?>?A@ADDLZeT)5/,B%%#%&()+,./13345678;1f_RQf^$F49Ǹ(1-,*+$&“$#$&')+--.02234568;)MCf|7,-*)($fz[(_@K`#"$%'(*,,-/11334678.:k}_$.*('&2Sg\Zew]H=5"!"$$&((*,,.002 451C9Ԑ -)(' :1/TcZeulF=2*(* ! ""$&&(**+,-.0 25%tH{"+(&& 5 -&Md[e C<1*%"$'!DU, !##$&(()*+,. /03 9| {-''%%!'A!'(Sd[e#U=2)$"!!"!.I4!!"#$%&'()*+- /.)U}R(%$" ;""6\\_s!>7*%! !";7+!!"#$%&()+ .$Mm~t'$""5! $JdXd }o;2&! &8'#; !"$%'((),IҐ|&#!!2  =]X^~U7,# /5 #3!"$%%&'')b{#"" #@! 3T^[v|G7)! 52 -!#$&#' |E"9" +Ob[m}|B7( 7/  "< !!""%[3 g!3" *Md\j} |A7(43#3 #?|. *Md]j}|K5'2. #. ^^>! -L`]p}}Y2(%,& 187# 5QY^}q/(.(%64] 1$  DZT^}/,70$. 2͓ ,!  NdU`~9/!(* !(  $ NX\e n,%2,"; & 4"  JbR\-*1*%.  yS .% K[Y\܍]*"6%#(  6Ѕ (" KcP\,)$'      MTZ\ލm!#8;"3 {  RfPTs<)5#%(C5 7gL\i#&&""={n $UOYVڎn"03 {  J^RTtIm"A0{ $| ;lLVT8Z"F5|+7S BrJVI/P#L;PFp| EvIWC,L#TC}~¢{ J{GX~?*J$VE{ 9 JzGX|>)I$Q@|# .S)q~ FwHX|>*J$M<H-({ PPX}?,L#ˑ~v%%!!'| GRX~@-N# {"; X :UWA.P$ | :"%,{ o=UXB (M)C}E -$##{ ^JT\{: >3ǒl%%< CPTej&/A!! z~{ "2v~ BTUrU )K'0ݎ{ ;"%'{ QMSY|==4  }};.$""*| BRTej&2I% 3|c&$"< [ |UMRWvW D1  !o{!!$-{ zCRTbr/1G%{{>!$${ }FOQWuY ?4! 8||10$@|WKPScfC1I("T}Y'%%6y}}gFPQXuU  8?&"o~ |""%({~{COQUma "@8'  " ?!"".|~ENPVegA,K5(  !"w*3%!=_~ENPUasN /N5)! !#lU(%$-{ xEMOV`vS 3O6(! !"#Mۍ##%%bGMOU`xQ) 4O6)" !!"#!/A!KOHLNU`xU) 1P7*"  " ##$#3$$7JIKNT`vQ*  /N9+$! " ##$$' =%) NFJJMT_uL%  (M<.'#!"##$$%(##Y##7OFHKOVboC&CH3,%#""##$$&&'&.gs!>*DGGHKQYlb8 7Q:0(#$& '(&2]m%/ +BF GIPYqR' "HB/'##$&''()),Ii%%4DDEEFFHJ[g< O@%$%%&&''(())+)6X/^,>CEFFM6ck u %%'()(') **++-+6Rw .=BCCDDEEG= {^,(2430+)())*++- ./.9Pg ݯD*<@?@@BCCDDF<%hO  ??@@BCCD6 J"v{ 1" ,QRE>841/.-,.--..//00233445578899::;;==??@??@@BBC?( z#[ 6 =WQGC=9533210/00112334455788::<=@BCDDCB=+mB3) /5  :WXPJFC@<865565543445566889;<=?AABEJOQRROA+ 8HI$<- "AW\VQMHGGFD@<:99::;;==?CHKNPPSY]dhcK<*fvv ;'ARZ]^ZTPKJJKLLNQW[aeeb\I/ +-z {++&> &+5:?DIID?<8." 6%  !+ɍ GE9436A, =*  (:O"/.00224667887676462t8mk@%!""!&DEJJbUk4m u"}O]R'D{#k|BmW p?0< f#]\`|-81^CvypJiLʻyeGB&&qլ{AW^ t| Xm7/3:CH[t!.=y-)jy*SFgJ,Nhe&  rS)bzk?b?<5\S ! wv4E#69@mA4= 0z@>whe<-WB>:i2RLh`ZO}fpgviwo:z0= 1`]8iyM^ ~ _&'^tPX~>w 0=x}x]2Pn' i'(_^y~fz{n6~vG{r{{tL|zuxH~~O 3'Mmbr22}_|s}oWUxo?,/HxID? p~14G~[_j`[[7A/nw'l:w" Rt!vgwEv}@:_i0^~h[ j,$>4M>VdLr Vd|v<7cmm`,_J'eJ3L ~1G  bt0J` e:Wî jZ   K薻*  0s1   "$% Ol    !#%%%)| G<   "$%%&)[EW̘^     "$%%*bm /Zìe<#-   !#(    /8BLWYRMHD7( $%%%%%%%$"$ gC  0FBCA>=0    "$%%%&%%%%Bj``_^\YWVTSSTTTUUVVWP%     !#$%%&%%%$$#!   !!  !#$$$$%%%%%#""    !"""""!!        ic08 jP ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cOQ2R \ PXX`XX`XX`XXXPPXdKakadu-v5.2.1  3n yp>ےeYkO^}sW"&G6yatEa4 ?fVFҺA(P?Qj^&D7Jl?-@JtqH3Z* tc3Mqj*y4JbM;ㆃ-BDHtD5D)5N³w%OqM3;OT& H0؂#:(?4X~]3A3&߱Ω(0%A: \r'E2˜5PGQkΫ&`=:'r?s,~%8&2%ט8/)M YE':e#2&>o([Qa@%*WJM }w/#Ӂo!.|y+bV.coq5E-q2)(1( r6I(SX^ u T {L;ᘔXSTnzIRZoB{h*K #HKtIDz$c[ʦ 6 fW[<״ES 6ArM.yAI[/Zb"ـ~ȸfOƚoBQߥ֨tN9<S߯sf3ۙI!lž,R7,N H6i%A\DŽ \e>.UϭFs!Ǚ 7yr ;0` .vId# }sOfR;>T1xrjw`,Z稿z+FҗA\{-eC /a/!mwcE7dZB{]X쑼04jDi7̅ Sficx|FAi~~.w8ŭQn0pUy}Cd͵Y=?!Gp'6Ov 3/ODJWˋMT3AK5.ìN"8I S | K x5A i$N}1H1U dwN] ;*e1ŠNbo8!U$ #_ s$8'w&i]^ٝ }^ K[C[&Zy~t޲hYU'9=p"W8S%Y_E"\NU0Ȩ|b_t7U4oJF *L iT?ⲖFV~-/o_A7_U=_)&ƢiA\;I8|a$by"P^O1[HPy5u Q5]<^c[X z'%bU0O]O7OhvK(Oϛ71'IVŸ=4 ?g9'JW;=]Dm'D"v/$;΅'#@E"I}+K5hu`mhg/zDsCw=+7)>XƬ737g$*_x@o셓kM~씶 ^ܨ!#'׃}JDKf%plym,fiϺmP6tjy= q+m@x4.{!0[/ ݁[3W)Oʴم߻+PM 'YΉdSqڎ?E=}rU;͠Z@m0S$"?'oLQehjc)KfjG+c;xTXc|]pܱ= y6@BU<4'ppn 򣯣/k嘏8c2{zGBBYd3CPRpRq)P`WҐV|m "gٳkTබTIA\+"fpWXʟ V&- %s fVCQ3:Uiw/]v7vAv-uWa ? b9!9?+~#s7MCZ?UgW]}^Zkˢ6|YIU˝+£+JH 6Vy>I#a2ǑpNțB"h4(SK|KVBv63/B~Q7qd'Xʹta`"10#1`L^+^x)x9Hȹ9JEE/njeRx=ý%;mSn$G5qQn#B֖*r*gX==&۬V([5{:JE_Gal>Ƶ8ᳺiGcD.MW06SKYXcmyd}淚8% wbY(VYQ,8M l>C _1C &55<hl0OY@C4õ = Ix:\T= /)k PJԑ>Ar^E qEހȬn!d`?q(Ml-La @f,3\ĵy kV fgϥ ro]:HH)/h ֦cFQZ~MliADlKZ[39B nRjz Sg>5OsfG!@{,s J2JLc;fQi -w2s{@ R TT)\N^mB 3RiT 3k;+jhqa$*^|<:YcdzVx~'*Ԥ<7&z(vZRwu^gkf@E^`hR1:\+bgIka';YǝSv!0=]kc?w4CK< E6o1]@Z$D\5pB!K\ԍ衟;SR N]cCaėRe|04b@fa_.&iăH#7!i}D(^_XfN%J (#D1?7D\c_HL>(~΋tݢvzk\B eBן s Z; ZM6oO~ShPJClPmWXvC`k>QňX.&3qȳafN P;=s}XWb5cF֞k4Wea Śc0F4"KQd\W@ڙD:/1kzםy]VNoAw\Rß[qQ#d4^ l]Ms|fxؒ]!V\Z-#MfU{]}e"NmbvU$3<MpvA1~yZu=5d8U맆Ihfeٴ M+o|Ոqk:rp]4X6W񈯞.45pM_;;t"-9Clj ۪]Q"Q}.Rʫ9&\HsM@Ȗsc?I^+Kzlɀ#Dx9(i- 0KUk#MwڞS@KMuH͑J@;;13=>x~9vW@ЁBx09g 0%ؐ)*Gd&ail0_hL_o%߶Qgۿ?HЗXa $]Ky =se)$/~鷔U\ӥЊDM5esBqj\(iFC_ vP|O+a/bk9j~W T1{օK:r Qր̊ݡ"NE~&,[Oy0jAɗ!&U$K,eoD\xQӯYB<&m~+& -;T(W|7yd~0ڲ?++U!%N vްH.&bǔS#6}TwL}3uS<,Ё ,qE ~AK|{5[]n[hz*G>Z1ruz RjPL Skf6Г ԧ+ AkzVxx[}5}d0uqjX['ݓ^;4`VRaoQԙkU4O@χ,X.5t=–Zc7*$xUV3ÛR8A}-v&Q5D#%4RL%^r!&R$ !˦g¤a%:DgTm.G;NH74ERC~(Ӷ$??$܅68{L>3ag(S ꒠$4ؾWSɒCr]Ŝ{_Hn4z!|,LwABd)xsY̶; @c3xuVnHrUO8*r[2J<psbc֣G^Ɗʩū!gLohHIFm6x/ 򙣠-1dy7';TpDga!xd9m?+1&|- 6DVͳ9R bc3~*"C`P cArUnB#shg[~ACD"oI_v=C\/!A dvV/ТdmAM Zn>5l K&4@WOoPg¹Hun$[OYtte+>CQ-$t_`KG| c\S9o0unV B?tsUU^ΞxɃ 1FJqi]lP17}W:t!`lB vp|.L-V{:?tX*I R]T_rE 6CU-'|csep9Ey>ZĶɐF.Ü|n>oCM"IiwK aLKH.Q.FXÃ×pY[UHXG^Lmg;^mSE*\;HB6W4Hu^@k'WTȄI;%}Fu1>e刧k{RJuku9!yŻx9^PW sYs_2wg;uJ";C0( P2IϤ:zWrY}9i8<I ~0E\ !0boD),]6+1:Cbp-q4y z +.:uA߰hlE}=%URT@Qo+uN=%_I]'p9LꊭDu3cz]&;GOXIhyzj0c #5^b~xTfqIVV6K5&,?Ryÿ#⼾EЯ/3!uGjWˆoQna@K[^`ϛъɼ2A+(æ ?/pՅij2g8Iܖch{"`JBҹć! VIx!>2XvHhy(>IXlaGCt t_f:Lm MtKiv9pymX%I?46`9+^SiMDN^ U9-?7Is! W$u $,JG3^k>>q6u8 W–cXOzڨQ;T*ޢ,l,z)t{Pdc`|Ykse*p@E`]v}OvޕF\lbc'tKۀ$[%`k`w̫9 73IʣO#91Z^S*a^jB0@f靗%/ i Hq#}Kh2~9Ѓx_.Ky9>p2FO/z-_=?^ vZz;a84^C;1ޝ@:'p{l(Y#,| v9BoKZ0nI%luˢN|" zMV6,<ۓ4$oo'bwP4:}ŷj׎<8Dǀ+e?+&[;oD5r4sjrդ%8c4)C9iJ :Xh}mCn9m09.ޯBm rëa/)bzldѧ xM,eޥJEe3lF|phЎ?oV 2 ӻ=-": 𛦋 [}4lw-"JKu0}FsqWoЄwg9]vs{+LrC2`|̀zV^)- ]7b, Ioւ2s&\G WlWڂM%R(:E GǗKwz%)3- 11Q6#tƛogϳ|Z<3IB]JYc7jkgž-% @{ub.yrtX!,Oa!57TJZ ]d_B(dg٣uy !lYMۜLA',K+K ,Ǝ }8:Kdrs̑.9 F@Z /yYQ".(~]ٛB+& ʰcOQp "wf$H2s9X u Q !&[o)x&]vQu/"+77Xud!a UL~bsw6@F+(X_ hJ _{}̴ cM*o뀅ux%\UҼS jٕ ٰr]eNDFlÔ"ӄ1W|fQs7=d.g:s KF#x2t駑J|9e8ijWn$ⷉFwg:Qd8 }? {{W r<rbg"k9cE#C[qd8A)^up)z ԈNvgW]eS?hcZΑalBL@hWX:g+ >0Q/^ȡYa NI]3kc72S& o\#'qdOWhJ0L;m0&xhF%46hҠ 8ey<۹wz[ avz+@N"ZS͞n;G[3B4B$Az{6)J#شo0NW@d֟o @%:|JC`3#bb{rOB2?`M_Rؘnm@ 6PFlsͿ> uFVH%1p'a(J5MМz%*RgiʂHb#6‚%MOs/=Κn;;62LfɮP1&Np \ߜ6ㅅ\hm; -UcLa1z)K "ft9 "oKz[9RΚ@bcjt{7Z*2 %7FW6X(Llu"ڠs$밓9_,}4*fLB ~ sL)X NUdp b?+dȰѦ9B"桏u[&"]o8EjWY=鬯X- Y!|+SLs(f@@ނghمҷK\N ^zk6]T_ݬ{׌$R` fuIm<76*O 'VrTɱIӱiciA HُrIySPu67SF ^ƹz[TՄ`U(G\|+/ Q~k ?퇅`&db iNֻ}};/EEj`__(mîv.=hBOʒ0'$")(BtGPgw-7&?ȂCTNL"SI y):ڛQWGW4LYHښooD~q5Q\ø#ݲ) kyvQvytԳe b]J!Y>OSsZ(b0/T 6ߧD y*%󤮤+ T$P8XO=IpMF~LO1` Lg]4Ybf1eXg+5S.yiy[fl*Viw dI A$5́qCfsU!4fjQtd+25WIq6=D{Zq碗^qX',':ԒHdJpWž82  CpljhUXS*SH?=H~S`n3d!XP:AGMgkϪU$"@Iu0dh[/iºF41X(!l0OW> ՘Ο8h6[S[ 2". \>p4a}Hi0\n-NƳ7bս7NU:yM@Ӹ WB\NAxE~mfU$##,o7c爟iRL%&ď娷 Jd,p(1oZVFT닉=qrϷM:>9|^^4㳼3I,4 C.z'dѩ`N D#˷;jC5 Y%(i Y  ~E @mkː8)XE~<-f*6YP80|.rE1@e i&hst, uj4BQh,)kHa ?񽿔N/NO/b,g9=4YPOm9`Y+Xd UQc`1z^ {{gN7YhW>XlSFymgCa^*5N7LX ceF)üUX7zƹ·S$qQNyә ~.O74/&fs7L4EQ [MFo*vBBIOB|n\n&ӂ" fO% 쾐AR@S pob\;A.V@t# vv\اV!iM;{G,14!ϭ{*U0 Ky_&R vikY^Y7 ptxSϯ\_}Ѫ:1Gn 6 xh.d E##֐n{ͩ4"k>ػ '4ʕѼ*HvZŭ[16R%1aפ"!ؚo|Dns@@J#51GW8d&YjV'Q<|Dv"{I^׏R5Ԗ{q`epc/4jE[Fې 8GֳaF)BAMX DvƤy yϞ|3(g?TZ~j@ǔ*g;^%F́/nRdV0 һ!F̻4yi@8 ' tOFl2uŕ/0-XAͶK l ЅIV( m>k05@K>h'3D*nÇbhA{PғQeJ f6 M$c:a8œqNSS)A}ϢX*_2@ څ@k#a/PY{ܻmw2i( W Á%^ HznؾÊǯZV?Nm঱> L!O[  x0Iw#@e݁Е4&ƢqY_|Q>亰x:w/ϴ]wj bˤ\Z((lZ\;ڲs#m)ܖ:_Pi u Oh::GS]^I"< h6^Vn)MdA3wgzhkl͏#}/4 %tkbeȢQfM5*{'c IkH|B'r(:| v,+LEV5 U`܀zULա7g@lJYY- !G u[\r} `oX2bxnifخUvS<ޑ`*Bz|É> {g9P/TnԥZ#=ұCIM\.+nrDx6ƥuoӉ2^͠) lIǣSS^4# ^B8mЫ׀g>aSWkVp9\"c[* :kOQ;'9,hu9HU0S#AIl%rv@-DF@8q|ǡC!fἬwΐAIw2a\8Mx@b}H1TQY [ӘGjGsJp\̥Uf,|; ?ɨ'5!riInbCisRsnWLڽDa^ m 8̧pǭ8U`c|˘ĮqNf%ZŸOp}x ucI@4./3 J֜F D$vf Y'>!X1\7a2'Us]hQ ) *x+'ـB#Zۖ?ҳ*0 Ul`\hd벫WVCڞ߄Ґ|༘/ -R!~ ?jːQ#Ɵ"Ig3[..+TD9GAړ rǃł w arNXW^+"G t/Ò@, ŻX4 /TBn&F)n#m)I]xKڝm[¬&ʇ4uDk:Ӎ-ά?DSF Nu[V4Z89ic8I0끖ۅ=M ULs%񕚴sPXEԍcv˃κT|{-5ϫ 17R55߻l"^PKKU*3ڱ-C8^srB&g̏GiH]S8#>B{@n.}C.wH[9ٱwc,]\H^Yv3KV g H3ȭީpPnED=U]eJ.] IN$fQU* 7z_;2ayq;ؿFߚnvv]1WJ@# |8~G+U0gV&:dč"h3`FWq0zL@~MnIO{@ b%*hل"pgCxi:|T׌LE42*@3&??-9\ (Lx̺SV !j!e\7cI~q,Hq]t(Eu(K2eH+lj@OUyF__Ζ5[+;MYؕ-#_RH,/:I.ljf7,pk˿B3@pVrfPloҞ#0j+ Q%:11W)PK d{ e{m# {gw,~ x˶%V"4րrjI ?^gpzW ¼?|iA'Qq) '>8&#|f^*OYb/{-e674e喃p,ٻ#XNc@J1v9r5j⣌ESH4y$ 5p.ț9=& Uqk-sm'sլ->YoJpanVon\l)^B4ItYiqF*Jp%5\A`2=j.6w&3(NW)';Ht!Xu "wLka#hlh Gr1":It_Kos&-G( Khj 9L2gg" "v)Q<'{w~㶸 u GA[m!՗ꬡ}cr|wuqO(滅Z#E}@Y4 Jji=7^pjLR.v;t~!%iq54+Z'h@)A۱l &~ a2xJ[&q7{x\ Lb+/-}HPpfrVrv͙F4yq2[Ʃb9¡s!\~=?gBܨ\ao0}_B Q'.43Xڄ14R걦W{t6 Y]3l̂Q%٥"MI>pDlY;2B&uaO)SE@KS_PdI _1{.g s,8,\*DT-;ߡ=H'RҧUϘ%:2ll3bTW4=:Edơ&V:4'~[3 XIʄZ*5;^4 I~*_ɹdݒ,E.$ MHe/L@>mO$$< Dmܱ4Y$Bqb@ Ñ%24:!}ss &S=Oʊ7*;#=(u40$z}u^ :9dQeSSE[%RnFjߞąգkprX6ձ\h A bhg3ۉYՃѐcx 0ѨT_q`OxH<+r?҈KN(e[8,nE:i+GC8 dr1*8h.xR\)H^̆΢sF8 7G,!L7"#V>Y\ί32Rܮڊ%Ls1GXvP3'iOg?v*2>;W؋DNJQĊms2^gGGWy@R-Ju>ynjrM|zerlŴ8DDo]EȨ%Zg9RRo=lHȯx+ \V'c 3ηi.wmpc^5ooNt[ofg{^$64yz#擤r_.R=簾wOU}} ^' w\ӛ)}E #ze?i-T݇P]>0g>%v8׾NoDWM$Mץ7/7ܭdwp$KؒIYoz8G︤t|-K_.MU !+\vc)AsSznGA7XjR_I\QϾ/7XӬ7 ~s^ǧju0Q0( Ń[d*/QIsl B1KTX ZX&2TQP o͟+[۲_#9/ЯdQ$)){5"W2u]IwT8p'aE zmOK)Gun:y7; NTKhҌF8Pu6 x5kD8)<= Wg9J:ANmd1~NP|eܼoU4z v%jzDFen207k[FiߡW^|%q\B?#y7M6`3G3Tuq>'I$I$I$I$I$I(=\-5P?oL]k 4)竟m*LAɦ@.6|ׅ{0ێPR^N>忣A _Tu*zQ ͷx?0]YԻD'U@fN9}By-'Md/N]^ 'ﷆ,ҹM_|`GCZ~1keJ~3RËلi5w\ڲ U8k(4LM2Mp4q9kujvf.\0Dz^hإҿoa\\/ ulLZu`nɿLMԚ-ZsK 8-FS XsW7 $seP )\ɅU60f:O'PI~Ye7,Af"694>:kJ(S*fj3&,2.sy6Mh!7oz0SXL:}\VBd'*C3{\#ze,&a$q,b|fdjyB$.ZPG &Ƽ+΅@p]+W(Xqb1 sLZ:m٨Xc <((>:k7Ki Gj6'V4Vzqj͟kӂ@&8BJ}rYⴄdTqAV;%.FF?4|~=ƻ?,C>j&7:,B@%]OӚ&u#7NLgkBd^L>J=7?9aHXWc+5vuB9 8ubb\ww§(M+2D3%0ZFq]SD/+@I53\MoNk͸l>ƍ3jƶ Uq <ӟj7M@OB4)!/+}!Ywygٹ[K1+[Fo4%5x U] DVIe;[k+ZLt@Mw(_ѿR4o͡ʘJ5r|;,^.m@{2.Uu k,HI& |3+GRQTwMD@`]sK$ 5\Pݮra4n{P Å4Wq{dW*yE7J~o-pd5CҒ_T/a_o od{R^eoE]te;/y (Mr446KDRz8G_~.>oKQz`@0dAdƔ'nvLWOTr~lB"66o_D ݃NQ"w +:q[: iPEWdkϐܶl(N>tF4sj1Y -^fnD_1]NnpTl<"cij{P՟=oS{9>~#%d@sTays,†lYUzBV_tAVBZMu"X~! KJ\n8Tyf; M/1A ]mʚŕ]X7$*6ڲiVn}&6 iC/YhZzRLy'WgՓzמԠ/IFxS82ػS.ͱXUJa=EVwr:gᩇҦS7x6$Lj іL?\ ,ICGP3,Jv&[s Hx?R ;_\ D1DO #nZצj$w[ŧ(EiqBOG u]R;=toR(GCY\ߵdϛMT< ͠a1d53c潫+(}j kVkȎ[e%>/5׬=Qs:\NTAB~ŔudNuzθW <-i-t=HHtJHcK} }VW˻`{'2f xoj8&[p)9ձMLW|sٙltP MZ( _@FI*,(DS6`c^R~H?}}U.W[Q;$I`ߞ2j%g _U4k'x{qc{]$ DX @)[SY!]cWjO-z9y4K <@`#|T?jY;o)RA @Zm]$:_5KN\/qr *f9jwӒ Uoj*wfRnS<"-T%D*m_Ǧ401XRXF{4k-i_In`#˰'-3ֈ JX<7F3u.ݥFh ̆cib7Z8j;[|"m`ߟZ76c56όMY@T)MteErSm[Hsj fxW(m<)f+EMh@Tץ9:W@9@WY#>_ЛyسMޗuZ[^3O6V}e)5n?g_`R+|;>UFf$m0.DWa|GߛLtp`ȏH{G=tc|dfdK?$V|Zo|\Zz|MZ͂6u C={< : \0^lEC:ևFTg3ao1U_x(DNDh[>FԀnmٍږSrc+ANP׎Arn]"h4l1Ǝ\GM0="jaACD~&Z?n68Nў8!ŝ R׌:ǽIld+&g)ødN /9w.|OJhA}^)|u+2R|U!bUU7k5+{I sAo򠉲k(ۣA(J -0x0_Q+p%mM0nzV.G<3{+vO+™ idcm ժC|<څidUܦɦ5Ș fV3E\' Innt "YQUn{l}A eQn)#u;ɕ* C.4[BUs!t%Y_U2\v8+)p'( mZYwVbG]¡?s\FQ@>)XfaN @; 7( lg rk[$ wB lrxo97Ë!%3_mjx7-!$tns:4eߣI=W(kr_HsҼ}uo)S!NBDߛ3ڞ.s&"zY%˲8]%ɦk}n6(ԥ= (S;`b d _ EnЉ Z@EO+Мu QwޔS# >Zq7:w9ْ+iu{tt! v.ʢ3 QQBt{|\0~ 2z۹t6i1lyiT' QtG{@2v#a|; u/(!&?dr$@ŗo~w crdj\@# "&st=&0ʃr!%8_2H|%q'J``-\p_`BsJm b?nIHg#0 J&+ bz^$oSO6I~b^XCwXXvckœsGc5bB\9Hff0H^eװJӍ|j9ٲC{!I Sb#g̐*X-“&Fx׶r/nU:|`~Nqm.VP7!EFH'@/̛[}Ώvs6TYE?giXIb`)"'Roښ[ãym^VId>qShNqV50 3fV z>_utDŽW,f ~oLs(pBV^@ &7;*xn-Z` 9=zә .W81y6^ѵ ,bEfB4:w8{miѵH 0wN&nkD'ݴpJ*n@\*҃`iNe`mGwY^dv]Hw?Y^ݔ]yY!dsP&sM^&z7KlN_.}v"S~g;a.RRUtߡb,5%^>ܘzYePV +^%n]}T M 4{H-]cG@`E HffDkJR݋Z7Tns #@6>H;#z5U g"{,F9D8fƄN ԧŖ7:c8-b~!q4<&y SHat\̯aaF*Ujz#$^KTxX p֡x?9J:g5])cJ@(gy;*b .%wbՁ+AZ%:-B 1 ލ>(:OJ!N7TD5Uc4T;܇a%qjf_R{2` (ڷDr9=2S?!B޻" +1B%WA' .4Ԋ_X~zV[$yC*6NfLj^+験JBWF=B5}dfnjd9#MApFel#i4 e `9e:, M(@'mwU_zbAAZ0 5L&2U$ZtXC"\84'(8G$WLi*U}x]o51 K`XVߍJ4 SW~#Utn*#B.Du~efJ@X .yj%hsHa^0J%#ǧc?|W`Q"w A?'QzrjX#]7!K ;ÿrd,!Gޙ+SXZcށpc"g]FڐG庀ĉ7 F/}ݧEkΖ 8ׅS8 cE4 >>V32r*6=QpL\\sy m#sܝFG0De~g!Ou )BTg~sD\% C>O]f`'@{υġb3$㚱[V#8U2\!H. i Ś_3ŞBFXy>+[ꏞcfW -cwBI}2JVk)f pY"T~ek nI€ѧ@ Qޕ.CSlFFW U;ڧbqQ'zн! jhC̝{_5%‚*Py(dI*JDV̦s}jYYk6ܻY(Ln$ -Ltzf)6u=_80_7TSd`ߺN˾":~9D=ީc~a6>%ϼYc'Ty1X}vx/zq x 7E'aa%/TIfz~D@o*\nHئ嵔ٗs6z-8 ~3J} @Lly?zoIJNcBgRUUS j1)_&d ųIJSq ,wvAA>_$\~]yŗ= h|Эs]4y=u:! +,k>%J2fU'_Cq-D):.H:.7eΔ d RF[̀=^(ЍU hy@ 9ERd6GVv\"Ll>oC v+:Q"^@HJ&%ݡ$4Eөk{ \}Vdb!;p}@i%*&8&63!H PIqƑf  $ O&8ƎîStYp҂P]7=o}N{ +hO / +chWknmh'FҼ'z1Φ8Hd52_Ϗ=1ߗJd ?!jpą$죞҆}BN %̶ uB3`xdhO iռHqEvu"8ʡԦQZwAD4'$h{3oO  QTPI3Az*rc"Xڥ^G~ ,;HeN׍"57w ?f$ey0ČM"~ݙ1$+}LcJ wOyJoE;IV Y9  \[#/U?4mLAνds%>r/ZD$le@y/&}CkFVS_)[w8 CPVauMXh. y`UC8ki@qP8#:2`?G`0$@PCvm~1lEQ .!҄Apꯨ !6P nmC5I{ﯮg UO\ <|<#vp^W/HůM lUʿ1u[ah^?Ӥm*$sN=ސ%_r&9fVW)^j`BȊ4Io~Uc]b&QR>qjP >-Usu+d%qg"O4PuWjbφVC 5[69n.LI=)$*Aj bI ( 29{_u=a"ԗyZVNkfi +̈́80tlJ\^K Kv<`qjp !`^wnRl|; Ʀo X㎇rRn O iu/Pkǜil4h>lX۬ΕGl/%ZzzeEw"qnwp𠺿!hCђhkީ5FȅxFxظGYC O2'5U\ &Rqܫ&`VGB V+RS4(ڤ)2m!Sވ)駕<=ìG\?Zع$٦EF&v.4PJucv5p1D`T;ܽP!# h]JqNΎ*p8,B!x:dzI# ÖE"|O-d}jMs$*%E T lҭ4TrME+кT;ZLSXCRDi:aʥJ-R9ᏩNd9*`c lLӕlFJASӫu = 0 nlJD*(k#8ث1ḿ sdw*jL<{uRsp\ qaN홋 f%@ '䕾&Qxu Qb3)Y ?L}VW>Liԝe۸eHaq}vi!5tY_cr3{9LR|ii~\5@d2r dP9'"' dQS>TuWfmcjHpʣv䎅o궙uIYP-A94S͉bu1VЀ> IJK `Za F}ej /,4B#Ƭhp$+-د~0G(RuW+Z󆎈B0N1A-_D_:0yvD%z}9ƪ$qfV,?xۣUK}|SkaT^߀%$W_OΟwk=H,ٍfvN8*w3 D`V](ݾZ+h,hE3;&g2y'lzk8v8NIa,W*G-֭nןZ W9AH\uE@W}Lꘑta(U)m2pЁ{IJ Lf"`EQv,ڀ1A)e4v^#u8jиlizs| $s$whsf.p-*{<~ nBzCXG,Y 渦=OqWf=lOOV|Ut}{ϝgoKm=5=g|`6lN܋'AT^yUH-Bp)HW/᦮H p7mtG+R=21HJvju{qؐ29AZ[!f{}nh\&:~<™׃Ijc PXqͼдD3 @S;FH7 ^Do'H{Xi!ř"&9Hyq;}'H31LEż+߈ZO9~bp +^Gtr !-hjm!XH'n/^']hhzDщ5t\q oODj^}9:6l[\ g}s@958 J͌ʶ£|DƄ`WoAN$, f~ s2LF6pT \Ƶh.ɓO@"v•7!!-Cj~'D+סL|`>.Vߚux࿬/ٲS(T.s#zGxs e {r}r1 Ig;>3#2h8\pN_+s$Q[\:=I'Z*dZw? B& v?K =hԎ_)՗AbTmZUČ͋ "Rp1F\z!8k D =e;~VB4}RXSsv#^7]LC("Kf&œtLھq͉J溝z(r3sڠj:kAŁd1($Bc`b,AOVmgWmzf⯙CdBhtu]@hZAP@%^#:!/_Up ࿀X24ZcZE?_X1L ߬g,ft&'s,QO]tz+۟ɖAjPoE{$mRSHi?P~)\$ѻpC7yCSœHWEE j[mٝRIkH68.(?/wU∜tSdWcEK}ԕ8OW AEE?5N6cEQ9&T iE)l̬۹rC8k 7qhndK^沗%&Q>2#Yr#̣"& Hj?GЄ= Z`уvH_,ze{5;lK"`r@Q(>-}1wXu "9MQ7gdzc/[6U 9_L?K[To3GAʆؗ՗N75r`߻RH@.sDX&A)PVأ+鳺q!+eͻ>0ynW I0ɕAzd<2U{jvhqsmm#T#{NlChTL Pa|Ww. Xufk j]xy6vq39@ Dka;<ӵyw+,`C׭]uI@YPf+T - ͐0U 2QzGƥ(^|JZiu~T@xtLpݜgD—wE1&X3 PdlmG*hF3*,qX]ZֽvpZF@̙,[| "[Eb]?O9 #.>tFj󥗂ld{Ȳ[6HEcy/W2)5B?~M hUYW JX Z]dX@ڍmYkjJib(GX +wX_OAV܋RʔN=i _x۩'%36N,&(fPOS Y _^ܝ=G٫rՖPp& m h>[<6̠jFadr붬f%xw\'~0IqL]?~-a6I.t"fxmT \FJFNO|bMwT-^6E'0(LSܙD"Px.:IJӻ^uO92IM?Jјcs fe8=#Qܬnx{\w?TM*| ) as*H#fkI=5o44 2RyIA%b4}V҈ #<ϒY,H48("KXkNldyzƎ`ia QyZ'َx?lO5V#haNStO&͎[O {3mBMͅj\+-.D<ǖfi k@j @=DwU.rZQ5roSA۝)G<1ϹPtc%)ARr𸿨 ²׆`L \+L~2b>*K8)ThҔ+@3L6 ӐJYZ:kRrz%.{/> nuVP=@4ȡ3rkNꈪ-( upK2᪂\Z A^7]o`> ,'o„6ݑvy?c@kmWu`n|D]׈GY>/h0p!&gCu̎nk]Fo݆GiW O1lo' Q}JG ҞA_06R\[{HCYlָo˅dKrͭE4:`*L'?x=&M}ʲcf͵=oTU!Ap%KmWUܸTtK꒣w{ Cuj)-偻{QAie '\9҅4kQ]Bo+ _uXAj4JϯS7PϔKge.S V|r,(=sة^ELZ | _+V^ _)#I]Ӝ#99g#vvf1֠I3'U|M s(f4 DHmy.k'ɒHg4c9=b)te@?xђM)!`:,{D!NzJCP:U&u`AIe8>{bC$]}!rz^P!b)He ]q؇ b>qT(k4J'Lr=T9>Rm'Amol S_#%l4!me=3!vKxy@prJA m:Nv_@vӖiz: W1i{Uuf[8j|KjBzѦ% >>Ô@t"[&ZcՔŏUx5#c&p \RB(=:\YNkMy,1);yl&.:^$p s 0%|y/|;(ː7p$%%}:OO{0Bc"OA>q+m^v,]׋=B/>>~&.Ў釺GɤH.r -_I%8m2fwhUQn4zk V >Q{Hbڦ0mEx >"H &2#1]fFƆ|-ܔ>TOH uL1X&R7'F.^LNuW6Hj5y.JmsK^bo,r*{p3a|r s&xh,33RZ.B[ 9LlWVuտAYRAx'6:L2Rfo{r* 4/`-^AndNr%XEo+6]3xX7<2Y^h+E8vxT{/ MNJ}5th6hw+H0R઎4UǐjA^8-łbzޠqhG%Nt:+6MjI =Ւ%ƝiL&ȠqD1ƠLi}֙mM' uvL1:m97_]>SyDӈh%c ic09 jP ftypjp2 jp2 Ojp2hihdrcolr"cdefjp2cOQ2R \ PXX`XX`XX`XXXPPXdKakadu-v5.2.1 @ ]'@ݲ1 2r9H_7}|!eQ͟s5EͭojrKAe>"y9Ro9f_0f s.#bG$Q5kVQIߩ8,iTti!pS_(T*XB:q,7bR8[1wl~uϨE0KJNAvLg줤sԡ>/r{h?2JBYmZH.qvsD?BF[d !ûX SۃHT72WӝW@LPp2货n?5gZcJX~gx[ q\vpVH 'KUW g=%6'_%%uo12Q@qM^(]݊73pj@Zsfz'BV(M^KBOA4ҥ|>У.yk8eb9jnd&Ao=*ҙB =91;+rx~/}QAjOOΘtpPͶ(Q5_rXtTD rD 4M*Pwkn.2W<On$$ǰ&--X^oȡjYQ{CʅXv/Tw 6.|Z~{7-yH-Y ǣG+Z֏†)w@-',7ތ>$PE`͝tQ#,0 $e_Ub{o )׎u]Y0-]/f_+Sω<.X\S2%B^}B1A/R yh RODffs0c'k}UO RPw- i=y̙& ٦H(}Y_Mlq2ٱc`l2wy>\3}` \2>Jn *Vl6W7])gpC;e &H7HnWWJCN8m(#Ҁ6˼268Rd$ `4$nJ$lhtvhEz=ŧM0_\K%t:}4-!,H^J]bRƛ_3z)P浕krO gvX_;NfhKI2>]֘@{w :r< )"(dڶᤈ(񞟘4I׸r֏,w,8.? Ԉ)Ms>o;~1r_8q˷2)鈐 ZZf:O,`{?_Ϳc]x/Kx{4ySKF[)quK8?H!_-D6{uh_on-F- __?MvbMUUC 1 $*15=^p'+Oi8N/ m%#r|h3=Éxijqr\B]7qȃ{}M-T8'$rW[6,cO=dpE02iA{ȲENTO4ѢmlMM mrn_M<մmCZ4S9aPPޭ߯4vJP_H3YA[ΐc+$7Gq]zEvUUj Fqؑ  WxN̟ V& ~h=֤V\NmgʭIRi{{PnBC9#R3{LG+Ig.ˈǩL@möedӧxf]M,VxfژȂٻo ;gӝ\Gkc<Q9h4(:]cO*PIOHfW:.%ڬ_tNVEEn|l6^sRc$ tDw1>Ɖ{'E`&2^cQho{]2u(Xc~,hI)4M p~&_׊TYkʞI=mn:>5:j0ݝ*p8y1> ,ތA7csJҕ톳-wtRt GM$p&z<<, GjKۺ,Z>:g2e2wZO"ieqsV@No,owXJ z:xp9GfJ[G6քA}pm|$ug-[uÒee8p#0+vTgGڱ^(4ԣ[1tS|… PZ!N-ӥ-}$:W&^r(GL9}ɝD SC%h d>H=RH_`7i>K֬AfQd].NKPF罺WJlŷʑ%BD`j" %eb6%G3"/Q{\EЇC>O~={yq:H=,tXj> kN^·UH4Ѫ_j&hq~\eq!à~2f.\l\ś .^]'#YT~ kooq $}7̥ ]M/)j ncI)y ;c7-w̯Ï A$H!$[U\X_z?eF}#yXؚ(}g5.(o {:|^?ݵ1 Qo(Fj X~=95s*,H7P Ĵ@2cIխr@Z}\!y]d:(7_=Ζ53ѡOXb;<#ӾLTTh: 9XW`m 4h}EwV-d5G:ri} >cիz(Z$+_|$%v!a+{ <}y{NKN;Os>oG{4˩yZͤtYrTUɝ_-\~p_ J|ұTem#5ƛimW ̳+Û\Yo9BxgPJDm^:@u)`Koph xbl'P!Wܒ$spZ o]L1 =:}tw+%5/3A7A]"y '9Q"4$T I^,rŒ;OJQDEP*}p~lŢSūBE]Ug\ `]D̕nc]o.z][qp~] Mf0]O'flg-חuR1 4 Qԅ9cecJeXE'_<^@b.J ctgJPB15rb҃4V>mL:8Co0#2q_+}3im===WQ4gGm%އ(8"C8j$kݻhCWBO+/&ذ9g7,ӢaSG5ɵpbG^Z2qA@l۱];AΪ=T9]xi,Ӥէٞ$Wv~e-DB!E^kF-sRO[yt fd,ҹZIkiiU5Ԇdy7--r5/~b8 I`fF\0JiՎg$|F 'e_ r@TS~0t3q"'DBWI.X]C%P=6&< %22Z>k gXQeqFbìFQ' ?t9{>:S+2TK|*oB ;i9 j㮖`n/ <|,j/&b@椆Q+ȽKwfvWAWeQh4 l!$!Wq6 ozzؓ]Tԅ,R;~R~@q ӡgD)GXw. } ByCAߢϠ8:0ϡЁBpA2_E  24KWq[qca/>P $N?UHy y@^4Bn$饘38o' s:_>BBlFe70 T?@%m)US"TWkfΨOM{͈ զ+d0VX2lk{,KCr⼦L`O=sНS dY<2XOQ]@4eB4 d|q/Yen'b :,A!c{CfrSj "b_XS@3,]͝$YM1 c M3x;{YO"¡(Ѻv,.E4x8gEpi(Ȑ8pT~y֥iP31}g}i%m3FڒϷ}⣜6j|zZ`?Qs%JYA<lDTM-I#a{Nvbt´ivzVVBJq/hmf [bJlTrBK`䨏u0V(+汜}Y? r|*C $u@jR'C!¬n(./ȝ]pu/ %*ԇ\]ȏE%ԇC[酻߈o  67ZI q=?B\lc>Et?n5} nņg O*,"Q͹  :nr ,#[adII,F=m@cLf4&d&kq}a{w& ZJ${/JԬm~ l]R28~sݷ Uv>A|׏P&YIkQO| cSCZbhO⛑VaWT2Ӛ {);`-u߹(LT`XR5 %CaΜ};DZVCQK8/>QN֣J_r~J,_akGUR]xDKz14pTPt Ԗ6\rBR.a[&PoKhcHR,(d{cLq5ků sbg~: _fN@f+ @SUIæ90Hx6@VEyͰ3~a nvɵML!3?vG_ #Fz 0BP+ ՒÆY( g/t-LlsUŲU1X2϶:bZF“{s_)23D[pYiҟRgd̉0+? |9}9ZBHe%,m !9*(g`54dUF3 ڕihr_PV݊MHk@g7*ݍM2S%9c齄t)z]uL6kQqhɡVf (6,!u|LJݭc{TYuا6Lf) [?\xN qJMbm_N3ݻzd4vOX"UD3Q>K "BƐYgH7$="2Dr+u_9j1w`^%3Q|9_㥫=>u{fA_8>Y>qI|ma Q3{[1_ RdB3r4SGަ1")/ο}H:=xz#̟A7vZH g` S$z 4T1* eP*- ӋI=\K'WcԭbnIDJV'j'.'ib&(<-=ْ-ڥFnrq^S8yrx:YZdBPwqZsR>cT0C] ZNhQm8lQp)mZYdpFZʒ9Οb‘!Y \‹Āh!Xa^{ C13+v2< :_FQyр<8$[\n\m+q嚇Ijz_Ck^?&LF#Qn_2նG{"Q?0WPb9+0ILץ7z"8jVqNAOplxrKJe*s$ 1lt9SDukdуx5L N?d&_=I 0kϊv)6pgmS5$GdS^*Mj˨T=SڒOKvǷ 8=s'=Äd<U ^d=3kz+Œ)=P. ǣi&(o &9ŖS(<]HFVEc˔I 󈯀uXpQ osatm0W"|$Wa?rxH/#-0Q"MhTB6HʱcYcŏ $E=c12|xTKQ[3j&a]^< 4׊ p1p}{7ഠvbkRz.2J [<8<a$w=ķJ_f{ q%`E|sRFAIT*e"KElfi2VwmݧoOFQO9l30X'}ew89|e9ֈ B{Q_ܕyQÍ-vAv>U u| uq;ĵW[ b? B7k6NDO@+* 8Q) c3kM{P@487&uq4#|g["T=,9[("4yxbKgA[Ů ]=,|& ,xVZzdo=H'P 7?S$7VFO:G t0=ŹtO澂cOduVPtMǢcIʵ^JW{`D"!veb6_Cpf~{BݙT_tFN42 u<;2C~jE̎~{.}I *@.n)Y/qYj[Š+OZb'(va Y 5Ǻw,C/@Desŷ>nzXG)L=Ǝ34hޡ"g+<,<$e Y(c@Q&\@ W;He=w5 n TN) 60O^3?MXmħki$lF׀#ɵ։23ʣSQ{F6mYE6.a!WfWJt KfkۛD=JT7+E/ei TvF3R:J ؛"4r`1;I(Kݽf϶zs>4];V-]Tpr$\9*Y8,M ֊l-#* K:ؓ̄ktHȃ}cpTP- XͻvBS6Ԁ6[Laf}ċ46'0h6c!G׬uz.KXIwM.bAn#(TҎzebn"rޭt]ϗM\nYI>'I$I$I$I$I$I$ iQ#7z lIjaV}%Z:u g8M6e c KwS9}~$Wu(6z2q?p{ȣk-%;յ}Y//)T2g&>>dk!' Eڇk!<6F+ha[ɖ!|3gl L";/A%3<-[>o1'Xi/=]`/s1%\{o7 c JQߠf9G ңwfl9km70 bEڧSG'Uǯ2% g2bg@U$I/CRv-=E.qv՚4XNTxp}S6kUE>I&9VM̹?A $+Wڽ,G-tKfY:Eb[i-Dģc`IѺb yhs׵iPII턷ׯKGp"xQtlwxiNƾɔ|hTr}>>J~ڜLH}W3_J"wLYg}n#i,~u5^FFH^5;G^o"(gE\BT@:DL (>P~g>mCR1ȱɡigs>XW傢.FoG0}#<l=ތ5a߷bD՞&b> x0#8j`6dZ<Lq$$FiPshv8  +kqVg.6t ۪(a&^ :1I{#_t*fvo + BMzɩqzLrndw?wvZ`_q@gw׃];z)mj(5M} J>B2/x 4UI3.\ C-кI#YZ!AJ巆fMf|{픛PЭ5o>Eb`cӕs_ b15D` %}<&G]e.hX7gNDޡ,yXx$3GUxz_sNBzVڴ}E?9s?gDlb%#xhG㈄PҐ{s [P:\'-2ѩ+Ҍ̊i>0 3H1Kz]w`yL7Pϋr?ْdeA y߲(qFVsuʜ;[:C)!#4*Ḛ[7ʷo'P]JID"Gt]'oI}- 2U-̹ .Fh&T(2rg-KiS樧FBwP8vs9µg@FsFCwϪ[K?Asj"I $o|iڦo"[k?`h\r3Aʗ6_#7[.J/64>r .!$Hsc [,zEN{KQ9֔eJ}F?gFq +m. J۵ǎCݴQNOhpֳ˅$9)Yݺ?2ƛv:fOLc}sFx+|R6=YnRj9c 59(D++3J+/&)G9dё.q.<-*5b$r褙 2RZDDT(.Tv7ܰG2h9rg??;}2ZYsLub𔩆.GwI;*i lZ)`G9Q\; :C͌3b l#WзBoӭjE3Z>YX:})*:v"hib[l0Rq1prVHnLErS:fd=Y VwUN6,k6Sm<ڮ=aT+) 7oBaЬ۶/$mypC2[v]!sW&vPx؋5w!znX%E|dbCNdЭ?07 9rFsдD= Jt Qit[9Vo!ژ"`񀑕%ឰCSjήF; BЏ/׍ʿJfc$ ߗs-eȆF|_3[ɾ:PoTux>>8ESͰֆg [/omDmhwB:B2a{O𬹴cВ/8"C5q;×"im *S$S§Ȼ&;\mЍs:&n|ujm%gd$ —!PRJϓa0 Q,*q.TX^*Z ؃p`mP9g-Q #/ϔHqEjX;5FGy6,ԭ]Cd)DQmZ(3f00tSk1 3!M,^=dn K](V K7'7"(@/?T~~H)N0a@H~]]VqW k% Q<)-Y`J 螼w(h[Az0`x<|0WG6#f+GzaO-*i#RjlDdWb\MRL4E&N# zEh1#@/1ttd!Z^3`B_LH |dƬ{?-~S}b}DOT$k)r"u;i,\P954|g' @ 9+~(Q6׹عW#G黑f뒞)Ty4,5680r̂[wEShbW7Ə\az6l\m|z@kB.2qwv;d MR6RAo䕌{X:F ddy(=hRdTsZ([Y9ߟYʂ5F[ҪtpBaCb8IJ٣_Sl>0^tUȚLE$Oy[%qA3g!\I{ufUyYFRF^ԖSz1,VbmxJEpSL_} _4",4y ۦ[WTsJFLt{Dpql^|( ˉѶĹ/}d;<OS.9=cfvdA3`0|\:`s+1=-ڍ[ x=JUɚKzX"o&pKcYꙙW+ŧO=rnjYe@);NV噤 iې'S0}ehz8U+"lqԺ5HІ{'߸`a=sC9y3k[QB}fl7.#\$Y_:HH P7ɠ4jut\B; Euryk0%oȢSH0L4|xq'[')6/m4Z:,xpkA) T !'2Ph[@!_M"zƌCt Ѩ`NwCf2nXiueu w}*<;"\5`GH<6j6hJ-g&⡂md] |n;_^;Q~pvۏTH$%\VULjeYpLYv5Qh3Vf+Aʙ6O(dF΄2w'b&΋2D Ř ^v1b2Nhz׶IF K[yt6PQv7h&ˊzEU[>}un1&D:(op[īnL2)jq ͟JU r+MR`*{(iwi[ <N?'azR Pi{>)5a ~2t%o;^KŬ@1[.<]aWtc`quǶڽ 7`Oj+RSWȖ;z`;Ȝۯ&kٜn+ T7U,B8HDHCɮh!nSRbxs'0ݾFl8rםK-2M.4CM_2tax 93WACeI6U `ʹ+F/>*WK i.䄮8}#I`]-$$eą8 0 |XːYZUѲ1KZLn>?t}JJl˦\uWz&~{b(y1I<D G )>Z¸?IR^P.b[VH4QN?__6[äNhcD(*6ZQiNƊm0fh/wĶv_c"\ LZsK/Ca!_q>0`ߘ)NAo7/b+k+$\Oxvm]ON'qvMYYe(Ei` s<ɯ&%xj)5?G0)f5]gs+*ά؏gό#7wg/:QJxύ;qs[k~^$ĀO\Uo\3 1|Na5bN>]Sr"*tDg_=>}|f5Ѐ(_y9aP1~, oU.YӕHѰ+ߘ$3tsFvM4cJn )|y7Kx潾W ~Pz?ͅRGnJ3*#gn7I V:_| jo&6XS0YT3 D-])\LBK[#\H$#YC_'墖u(Ii!]N :0yt\W[W:r@ dmQ r; ۯï|ѿpù/._cgv~y.ەӨNy]nxkJ?վA1st"aFHQf:*+4*kA) "HC/P V7Ή(SDX$R܂Z\_#oSL fʧMSX`ƼI0RXy4V6k&OwyW\_Jt@ Qڙ% 7r'v+H -h#KVC+oZ>{ Ȃ൮ Clj(©vk7cX0T@<ΓQ}=8a4nZ@\+sꫨ(o0 l"ZٓE8H_9y~J֩l%s&dW)m@~5I507S~Ύ⁵kE !L a6b)x)yhpB`6يqHjFE$`E]#!Dԡ%[yWO${ǁAypT ޠͬ='IGWv8QљHkΌ3 ?{NG>RHPSZϢ,[&K=jQ; ˘Tc {vZ[Gi&?]E "Iա~ƫA`%MojVu/ygM@l$& 9R22$LM9W_G8nrj(]Tvf_{ նbC j5ݼ [S~Xgj{|/zoE+FGtȤ{qӱ#+ӯ-&\BHHN"SP?Q+abKY@2$ (XLJb->94ATQMePڤϭYpQ|q)X \Р _4"28~tY!^cAhΊĿ~8$MIFz/d1կҰiY@?#b¬/坈6(Tܵ0J Yf=X^ \o^^nh@h_ε/>hA[ҟM4sI}zJ~!ؤF;l"DDz. |C(6+qSрn!>lEI/|A|4;eC;jɣ9:  SKa:.s,&3nÞ_9Q‘>; 6jzN"c-UK7[CV *o&'|a҉#ftbh`yE8 ].`Z{:,w٘ZaYş_ ̟Zhq`)Q7;ACd$IʹڡZk ,'\~--*s%] R[sl$Bo8jBGLiȦsPA$m:2ۊ \2;tfH(F%ފk1Qb!zP=`1r="əXBP܄[`$ʑ4ewoc I!inssT(;_R>2S2'N*x Xcҷ5cL=H$ *A:X]mTlr 2#31* Mzb/۟ă:s F&(,ΉpXm M:2e a1&3YWL`N^<)F{+X?HT6"Nx!< &âQY&ݘ˫6hbHxovRWI]s}Kg@|Q:OŇc,Fp0SWDtEþݢC[.qŽ^y$i*^j+a?VK` I}db+*!ཹ}uM5Ļ N.5 @aց_܁B&A~;;=ӬK^vmijW[[RZXӐ$\z2[G GRr =NO7*[{v@fDl?U* иIzUk  ﺚQ#D/OH=󮒛;07Q>͚sh>q"{F'#q`wF_aNa~CaB?̭Z!`/B•?Oܖ'N$Y3TS=5$z+R R [Aۙa61X7ۖF?Y.]:U{ԌW@?9ˍ|wc t؜x?`ۙwA&*7:&(>{q=ZQB<*5G iAbW}X *H=Aw c9 (IN`jS$tܹQ҈O癅f"d*~Q~1z!^phqfeh4m/΁KAd%=8՗y6}Ky3A&M4ùbOn:!{س9^F]E4z_Ez` $%Zp+?yOJ MEoWRcnKz`$W~p3p3~oZ%潘uy>ƙn.8~; r|`S Mn{D6/Ϟ,$vmh^ºѻ29Ls0uAa?iI6^[ gJxGlna>ʲ)0dnffIog*Jg#~X_0Dl>p qEq ]i;@N)ҢE>Kq#fb o?WB C`׊"Un ɘN36mYejܡG ake !|` X~QA!uy 3!, j|8qOVXْe-!Y޺m!#V4ben諺ѴY DJ*%8| *ɒl5Pxqpw4i1\z.v9,z^z#1/vc p@ $$ xS;|vz@8ih0R+'e!w}_a6 ! N3ڗi*\;5S5?h⢇czVEb/z}m"M_W /c\/KaPH|aU=:c6*ᤤsa0"5ɩTL⍈\Q} OQ>RW;)R4$XN3c~ 똋^uۺݭFJ*U\dD/Y.xf5#R^fӱҝĉލ&Cw,~F vxbtx,4Um] o ) 5\~y@6vt3(qD˛wاUjxAMood)'}*hHRfoK ;LTBo8otBc-w}@MvibEvNtBݕʰiρQd-!e^vPP__T6{_L'f^lX qDJw{}gE]|ït 4*[0#N(LtI=+~\ C#dm_g䢕4Db/$>kD-(+}?9+lPbAص/n)P 92 Ppcƻpc?vZ$sP$o~5͌\ e׹LԆf p믛` K:¸pgBfYuɡ..e,[qLDCPaZ zk*7&)ȱM3 @*O;3 6(Q _\]QMpjI /AG2CQ ]ax:?9;_=p1\k[@8aВ𗈗)>q؊׵"qgw*؁/Sok0j$< A=_K3lQ{{cPEyj" m tm0?⚐C1HF'7/r ~ LoF.("0-#&qy*dK5YK+f43pMbLgJd8x0T6QkX(*\S7?44 Y`"SQ15I?Ms a>ޅu.I qxyNHb$OKD~wX_Fy[$8qr^v*ЪՓJ*BsU)8>>F;|V@5l) ĸ~.6NCs1?Vk;M$)~"a%!%P^; u ӾSLW!^zUݬ4p@kq o`1 _l`G%ctaUW+>jմ8f lvB<3F:`bqd[u$|Nr+H Hʋ&aDv5kv'bړW~ȍ߅%2F fa;7GìWA'=”2;m O.w#|~f ՙ'`p4p%^/Te] #$,vfz𓦈OtI Oly;y{"_h%y_T\-Ձ:m2S!gXr H}yaRSJS(X%k㑶3`P}BP#ûl`uvᓍ4K' ȇQ~AwpQ&K[*'b?:FyNa/UA}t\0/@/r>aZ&GȨ5_wT_K2` ׶$R{cK! ]b!خrU?TySLzDIPojy4 鎵blc>|Wh 䚲B5%'#kgb1-~~`~cO6Hatx??<}ЊIyqLinYRKXsM=KBϸ1[ٸeLN//%nۓlA$fq"D!11u<8+EW3E\˖Ύ+~i4'C8,=ҴE խ/1R~hlcVz\ڴ!Y xRt8T_Rɰ], (w0FNshof9`˧Z;!,RˊRDw"*qH-I鞂? ($R8laY`RP et-^aʍQ4Qhg6m6 O1 9}ϹE%#ikӾ|L0FL zU_IsڿuNzwE E%AHy _Ջ}~;XFntvyǭ!c aA(tԃ!:&!vcQrPlA |Ѡ~h H>{^}ԑ^}OD28PNJ8#L&WŸA{ C¿2=[iϚ`+!~ .\|x[)fD? ,"F2Օ YHɄzQ"}c1M)zP9ISyK[JW?&ah[Y_#iU⸿& C'gj:ȍvX1y#邋׷^6HWխ_a+OmNz|yq1ւY3x;go/luZxܫ,=-/3͐zI P&Ҿ!XjCsM$7]ݷŨ=ć:2HkD>k?x6j!X^^(pJ9Zraa~lLGyRh):)G [yf௢$!wMuW(7u+X|bla?Z3|\J(816:eH a@jV#ܻT8XƸ>. ,h H0?D& <03p!\I]klɒ*#|z2|^ %#O,}ikmFKT~ovϤ$@ 7n\!< 8=cq+$ DDXwv#$tn\ : Af>H~sˊT11Wh V+:*k_҃`rujfɸj-3!(E?vxNμvXag ʳ0CʻFAz©"Bq^"_ܮӫ3dkvt!9_Eucj· /B ~~a|%Dejխ_V Cőnp rKL46]ҫh ۊߝqށ2||u?1Id[F5=" ;_%Bh~a=ߚ~E;rO79F,c7=)޷qꞍ%Bao[rI7l]^4Lء+G\$&?O,[fGpS?`={J<E8WJ5g\s$ 4bXSHњXY:͌2B/A 0`vh|㝝s+t,)NwU a\{9 {bLFD%><~1ҊpWY& 8-+;v*3:m1LFXY ,ES-nnۼ^V>_d[/ (Ofss'Ӝ3G>ǙCFojjq W%] WQtҫ hwmnxDSG{EӔLc@g&G?9Xϭ0R]ovjbb]Pef)o]g6ƺ5Jj eV}diՓj즶XIsf[f<H`43ƒ#k],!V(`K3+*A/vP#+ qtEE֮W{!jlqI[SOT5\2NLG|a1ig-nLcNtW〥XWmdmBDmLoYC2:M}YBԜW!͉kS,zghsn]JUa;8ۜ #5l>wBjtXaɈ.s {6.]]?E)ws,~I\_Ak-hM7xt*Y&E0]Aω" %I:^H?DEUˎelO bE\o9SmZ0chb룊|] h'.l@ݩb|ح$-a'BoSXM-ThtЀގtgccDbtl7QG2#^a/|IMQ4֬-{F@g@ڮ-v_5`*2dUk4w6GD'(=j=fd:zacc<\L@.)d鮘B(XR12݊r*zdKG }`{u^s}fc_k7c ohsli35w}.PhWDWƾs\'M]55^%":kPu=`tqMmfT=6xϓimwCWA+H ]FAt/;T 㒱;EdC2?%m}>=% 4l/Hj _!UCg}2꟏s SA{Xmg,-epwY[Tma9\"o_vDfm-N `ҳo8d OipEH.1?O/,Uf!m(VG?`DHzv!^+"+|~䍖o5㦗c%޽*# RRƔ*]*D *XZT 1HQT+> 4^~晷T=d)(VqÌ*A&ڇ6{Ӌw,Xg4>pZVK6y(-$FwQA(iv)Y*m$dHRfsL,@=R ;#qa3jz?k2xHoȖ}&HYY_l4`-;}>{l;VٟR26(9޹j-!0 2Ithn Y*^nqxt9AMB-gNAf$K'i 'YX$vZ׿̞ v=>j#);綐P[kJ|>|c8 3W &Ud&G, -bЌ56FУAeԌdF9L${_lR į*dz}lO@YR;uk㾛]f#2pit, aYKԅ&?S˔"F/!"%}]颩iު%97q1i8I~:Xjȑt5-#}=-mW+;m"x깙Jڷs1Yb0]sJ'̐[' D t8O U7ڴzEBӒ;q̱O̧eSltA|-5cèv~D.MI~M:dUvE,Z==1,FS ʑ7 N` ԔBl6oiU(Ry9tTpު2i8Ygh$|$ӱW=pQod${ 2󟲧[z?T>@r3T"#gv9 iuLH"Z5V7dr?_Avp@ F@Z@9QIƄ6U*_m|e~o>Z>[:4𾓓QSIlSF ! l#`(گ,7%i5%Á*>W`[{5uib,>Hp0?Cv2w] #l*ǝy)ѡ˛3c0D ":nWgHP}͖=T} &`AP)3uux_d4OxW{SF;O~퇁_*=dz)}ʲ$ *I2:1 ~?yZ5'0:=}Nqt(HDCKeTлr{5d%]pHqS>IjnYQOؓ`?D #'sh"iHG2*l xK{3{qeLzf/4lخJv6+4]o4*8 #€ڥ* POf }.Po;w_gKQD4q ԎZ) מgPeKgyB!6&1=@Pհ'xW2_QdaRTeR s}|(݄ Q]\9JK L.rߣqIJ Ww[>l<.89 T Ir ZkD~o@BUۨ08P؟VU[<3.O ,W~Uo_]Rocq(yu{tZk}¥`ׇN3ΏdF1>Q6T59g&A bs >qǼVd$k!#u-o恊I<\/%I}Iqm'  %z!ݦ*V.dQMMO" $!ĊV3q =ȢͰ2$bO' qT?r6d(mݑ M@Gey2hc(կܒ @ٿYaS@o{,h?B <s ;u(’42zw%O֋d=wޕ}8>!*]Hu]νdq&WVc ίM|=-̬Dtޕ<| eb捄ڬ ƅlhLőUEZ hKMaz%+#*LsWFs=`}P䌷H^\ȄFE5kOo*-|mb}n4VW5nM/,U{_`TUR-mV/+7K["#ЃG&'#5!%Ij r=gK6D5Dhku|dz FxGTXdj2ġLM3F%"MjMʫKqN;nWn&_#|9V~1^ bLR%NNUM؛fan9B}3dݵz)yG>S1ՉV(^N\,Op&1 𝄧Pǹ\o?7G͏4bs -E9ߦ2(4ZSڛ%)W=u Jx.Ljsw-k =}2&(St=4/SG7 'DI0YA pt s'e"w*bz" >1 stLӌĻW~mjH'\9` /.L_x>\'pLB<ֶ㉥-/wv &xP_:$MwkO ?6l͟$B67a]9Syh Up͘ 3qx+r.$I_Vc1≈NK'N׀fC® OVMM}ޓz%4?s~z4ԼT<jD.XH 3?sb,pJmԎǡﲋӅV>|(G}mb"Q+ +}2VuZZfZ֋Ճgfeo瓢NbЄ8bԀf\`t&GzmܬFR)15_y&$(A8QeX"A(L/}W W(+0?>~o@-:C}X'߫Kg SB\ZKPjCbǯ|':CkaOtY~`ԛ4Áy3ړHI.A'Iu)t6CЄ]suY[-rދ 2 1_;Ay%X@"IHɩZ+a)+iAݬWk314_V)%yXx[C#ͫ'W6BՓ$CT#;jZ*N9l #!SJ g0_sӗhE0"=%t/Sg)DZHo::6ՅȀ/ϡёqU'EW=VU1[vɁϼC%{Xٚ^ !]GY&;HFm z:oRh @}uJH@> 4 ?E#C儫af礄ve;ujc cMR,:Ee*P`{jGaۍ\Bzѥ ۓxEYqYz)gO႐mɕ^ަsEOzD1v?Oz^y~GO+)njuD;AQ-}_cS{Vuk28pȶFj\*v4duiA4y Ļ/_c zĜ.Oֳx^cp R zr.\ CŽDa-)baC|N1x5>ʘ5Y1Θ%VFzQPYvN}yObl[[*,_=Pac맰B/j4TV$r |͛|"%Lϑb?ZW:lM,#1 "L+N1ܵ(ReAW?'#IWTP=xt,-?S$: &Ƥ|y|yN ٕ&@Q:a)֌|/Q:4$]AV@@k`2'ɊR]Q +Mlʏk?<#hY [RvMtex7L9(bfVUuO)i_i~m|ojac uEn={,E>Fmc]I+ؘm,kPbC1FQ<$F0]Y2o 5\jJKr! ؁rds2:>DPlj4KdJUBht◢rUbZmX&vPxxrsJX@; `9K'%2ǎ ̗ &Vj6ile,#eޣY5)̖Z/v`<\'A2L ZKpC),r5aIifg)hh$:'ǙR6;s0 !w"mRғ^7g3Inh/F<"kI|M;P MEY.cޥ&Mf::>wNB=ڃ;2x 6rPnq.Jƚ%Ѩ(+Is,^ A3 z㖜Ux[JNG)W̯WyuP>l/S yV|iyC* Lp c4$ EN bbEǨ| "lF`5p/ţ'7JssQ/ɉ~؟߿ZiM4 kD/Xȶ c鉸1jy/> ¯1rQ5HACDrka}aOۢ M_v# ([uCVKp"z&XEDO†{Dv*M4 /b a֥"Rcp~9l]gW#X>7q WӥvqH`+Ǩ m2R ^!l)]`ܑE pp6;QOEDb$= ow:8_*9BWE 05&Yġ:cI+4FRAZq+5xՈT~Ϸ+Pm}M8fl@0zcoJ#8SzgFje N4eW,ךBl<\p(l9>(lOK,|Q.Xau)߃u k><B k2\.L96*T`-P$PAvwOڨۍ91p b|\<,ߺ2p/@hV8l"FAw{}.0Dnծ\F/sLgK3:.ޜC V6g}}@>j R<NEΧOiJI#$j IV$[Dh3!^ˤ:mn3VLy[ \^ʻƸʂ7+v(Ϛȉw$ʹ2fs ۖ`v{je{T4,dph7E!Z<텼'$Oj pm8 <[(VB, $,IWj5طjeYSU:%<'ybUٳam%\8DW`U<&ӲB  }`)1 o!-0'ui@sT޶&\t}@޳gߌƉޠMKUY&/psbuG8L̐ G{9/w}m kmvbhvz+X=}s~y&O3M)t v [Q%o=|^X<pׇ$vtgbag,v>ݧO N\Г&0M &y`J^B5k|J_DH  Gj]\Jc5:hكIqa fN/<9LzVbD?@t0@?ˁD)=݀6p0o^^n\{׻ u{6=5~ZM!͝h^*'*"Ur>5(foȞw8]*ʚwo=,\?~ 5D ɻ'!5,iIG@/`}u.I+y zF#cW,OjPpah#X8unEyJ"`u|$W[3\ɒ85(뽭sV#Qɂ`R-[~Nw^;xt =+f':%)UvP'TV3(QbfUo,!; Z'kh,ȖXSs_޻&; cLTfD77d4z(xVRbq6{ A?%ȭXW]ufɤfFxA0J5ޢ""U,Pd?_g)J/˃!H'ªlٹfNae{2)Yk^QݹF[68փ6{sg[a6cN 8WvX\AXwJ> V@!{ s_:EЂUIwa&<qsL @uݱ`;M < ౷B#d btxI5:+ M;k"C@3P8_u뎋BehHїVӮ1_`xzuTID߂{dխ?)zr|X]mV詘Z?wtB5Lf F4`Bm",xԐO ᥳhS!,So${F-4IVAf%,D@Y_ݶV=ڊ1遱2dg}VKsN\G T4=矕A)=,huqJoW\FGti3TZXԊ 7U Fp"rw:<64礮-vR6B#_(̺ ӺC %B0'hM;[ߌ.Z?Ҙ4 `ը<`Oy< }{'23X`p5ѥ*߳C^ڽY7ዛFYx(.̳I61] \/*htr6w[HR^'@A,y QX ; GsDk Sp-?ڌ3g/'Z^ L؛`ب^+,.cBq)xLR w9#.p mzD{Ũ O;I1 ] Z͑ʵ.TCKG~%2J1NNGfo8|кGL纺2=,]ȚU5+Mg\I4t?m;RP '9DD,qf|hd ,i{-[vq{ڱH&#W"R:ł16f*ԹueAl kx sQWh˾qߠ '7B QKY Aq D@;, oMR×ڱWqiu&&RyN@Ģ:t# h'vjiL2>ۚ+Ȭ*sqG}0]P#'TSUz%0#qSX#?lpI$7%kvR3C`E+sq5* ""Yg7-k c*c&A` .'?7 +Cȶ. :"h4D )|3-)rIrgS d_Zg/ Tut.9 =[o,qdksKN 1oOYM l5LlC["yH}HH$Cz*peQU S+ت<b gATh@-#)j/\*QLOZ-va0H*F cu?(ƸOϥ&<6ăU\,y蛇r'?/BE9rl ޹4D2o%zۤւ'D가Z1-}h Y|s5&xɨL*NDhg&$5\+SzEC?p&A,t~dX5 Ԋx5m'f*߉K>c Ǹd F9y3Io(rYC#4IK\ :İN'<@CGkRyq4mJX֎kx ZknYKىfWW]$wK9V+NnI$q^4Erc8 ڴ#%^X9jj?/^1jQgq  w,tP`fPR"SuGCk YGgFYU+!+`]X6#6>+5DMR2wd3` + KڬKt`I0vng]B\{bk2{b_Cg8Î15rL_ Ʃ/ KyY:VæxAJ f Zi=jdd-GN*'ǖZ;}$i M 0?jKCG dfvgzV=(bjz_fEQd)ᣟ|OܧA}Hðt9:B:uZm5˾گ__oC?56w_;hDm;4Grm7{vCDàn_nCɒI(9ؒX끍u*&qىZAQ)o[~AմL y*Q=Ŧ{ =먂 ®3S%c38˰HPv՛W7JvT!RqW 5X;a'-!(}Ĥ,s$8$ٝ2;C%3:ܜqQA`J,=|FL<=Fz`0KtI>΅†fZ$c=Y,'oUj&nَ~b27xLkM{lY&sh'4"x.:T_o:n0p}죣3DI.'Y 8JC^?̩τQ&]Mq j~(&Շl[4E0 ]m]1ȏȐG>IN]11]S8Ix>5:47]oڹ+0D?z?*G4ޟOk ݹoHCt ];R=yLOzZ,7O(uUYd\7TiE_T˹QoV嗹^!FT$EXBv5耮]݇kδ8:>F8&s*99]&CXHb ?2-6N) 194p(0%HQI v†^mP+s=N|b4QҘ'kNx ()šeJULa( `oǤ8׬: 0*WyUa!٧C啻a)bt0VlRQ0,"v__T-5lߚaZj s=^eI칬,Mrڟ ^ lp;`XdH YYwW.Z|a)w(h_QWDghj^-`T/ ;> :fDfeokmpU\>(hW A$VD0? sn!-}B<#Dk@눚Nk6G{߯ύXҨJu$/yCO0 (Xo=U_F~ajK<7~} u`L bcѧ/v <׿q5˞pȤ n0[Mi&M'vίX$k#DBm /ɳ(ޗMgHO xUH(V7$Ed(fHAI>}bf̤/B]0=zzأ$.K@)qӫIEvA=kA& 8Pm/lЯ{TEя*tC&) $9 @56Aj]v*ihX[{{My Ff}?;W!xEzsmrm7 1 {+cjǹTTϹƈ F*Dpy)0<ڦZbK|7"u 3.RVYxtIo{j%Q?5PTKބW{/9S _J{*QdLkE\o4N2{N _TC-X40|Ô ߺ$BJA}W K' Zv=8yNNANve錿"l\2%HO>@,zs2=2PB&tx7Lv?^g@AeLDTa2[1~60Gm'{2$TКxtj7XgV\ћbwpuK IiUOjU5 )8tG'~O&TW25B^ xp  J4Bb"?S2eh@_M8f-t[GXuAepM6FF"~nBUW%?e^E'~Wy'њ5? F9;xa9$29+1xw)t,s]Ǻ$NoV ٻX 0(_;\RF]RХq©]kFcdӠHgSdUӋTEkkLr~XqF$V Mzk i uȝ!d&)D([6(* "PYh$a(ڧ`щ?A!Op' _c$ Od-`|]O]Ӻˊǀ=]L>òÿ셐yo4}QLV2UHX}TE/nY@1)$hq.:8pTjY/C5~R?io@sX,J!LCn6+Z'Ndk 2QBgDD>?[Be!w_T 1 (K3敁+u`:[:^%C?ێ?8=fB2;0}v(g Fծ&JȌVñ&ڮF;\u4tחgJ$ @dFءΏ P&UctoJnU(ycxxXZ7wJpi5]%N&2Val@pĠ HKfgZVh{vҿ^7K``j I>.n&'W*E#5(r\ͫM@И9k_a2TRTq沆 Pl XoRA'DIqOB}ġFj͢,}nd2A\}ǰO tk吮2!YNǪBa{gRXFX9eTxJ c;ƻG v[zƤJ4Ҭ#DX(`/V»,>$:iq[ՁhnUF{hWS>zc vHy*2/TJ'0mNOCgrlhR!۪Ju0Elly~67k#j#EPYCE O+.VEe{_.OuvutY(1ţ*Up(DDz@`h~7@J 7OAjޘ_o߇bJe2iNwJ]LNy6y#3")ӂ>y1,1=iCإӔ}fI]M\FL;OL{9a7Aܪ-H"@\.=IݵAإapN|MnͫdB;qc(lv*EN9k[5bUmi5(*y"Zs9́ 4&R,p=J$IQ,@l~GW3a VsX+4{a{{2[ 5!-sh9ބonxIB!s!O8+6dfp&ӒglM~K0?:>fA>?/ u|CS9_Z[A|ˏ3?HCRM 8ZLa{A$]EJ:O!P6F:WH 4B= C~ NJ^YЮݹ<=Ky: &Z8E}*.:=r^yT}P$G _V ?T`Ј|bwX!<1*I)!c:X+obӰFʥq\,9lpI<#n*d@#1<9cnWg h{<`ٙ3a63YӉdqlJnewu"D2? \j0D5裶,ɥ >s3I(%0[ 6E?lVF*neb cPv|meBC=p湎%1QQ[iRyD.":큟% `*!/uT_}kO=կ0 _Gt2b:/'\%pP,2mc Qf8i9ҩ'3prMpDW8d`nXѐ][ZL%D~6ʼ) _ *8C5Ҍ ,p𢎒u$g'Yvê L  .%)[O O]ɥ Щul&<$EC;*?ZR758td>-C򸏘6fDij[ NF8`kkGH8Af4S, $5 v @Nśaݭ*\kU5ם)n-Nc<&ڵoW;sa>YHo}RFEJ`Zn5e5nӄ/ 8Ua 3=BlFAE%od}cYmWbRK#;e~}a0_-<7q&D mz$R%_4 2Ix֜i BݨppRwD!U`_kmw*)_MwP&>8 5JGD>Ȇ0կ=aڒ T~q >K.K~5|㏜> Q) N֖zd*F[0{>"qQ'M tA m"gE649`+o ;ʷJu8E /'ozbWFzePR>6Rw`)L#q: Ju $8VOx vWk@P]Hے5B ʚ!\4&HESn?):g$[Zm3}-d6י46l꠫/$JEs7Dn &*|j]n[]w^ot$tZֹ˩!A签4nưndkb]RQEYV 뵪á\n=E.33T~7 dydtml;CI{S4LwE&h'Q|IB7z!Y9,鹦=eOynh\<8XEn_YԂV]z-߼"3&=]HO1Gb$ 7ny&F}u5XU??$e}Vt^7BK͢4)WHA^DԿ,\lB![Y9i+((3GOi5tD{o0DMv9ZG",]S)R 8D ;,~ ˯S]};@H2%4hG=sI82|*ɿл[u 0-=?8=]ǒn" xڈ}3ZﰕoĘnUV}T,T*+* K۠#^,EFWm$3!'adpeAtEkf@@aϊ6ߜ*D[nˋ^X@i"aڄ ]߅TkyzA28oOk0vD"9Lo'S~F:<1c8Q.[< 8DaY|t*ԣNt!{y Th,.{`{?h9jb-eXK<'Wb1*"i,IS>a*]7گ&*GTxl3ǹ̆C\Q%[c 4i^cO#We?z jz'R68d%k=5f2,uޗ͆PbLvk$lA[6X';x<`ND|2 }uhM/M/;df<qb,Tڮ[Œ@<E3o: :|ù (ǭ!#Xn环HajTncBg{¼pyzѫ:/Qt!$l=Nς W{.p2]rL `|FIJ _D߁;NAYГ{P>.4>DB>71 |ޤxhZv/rFk={ \5g]ɒ4n)> ]lTmD#(RsѮkB_Bpyn۝(1,q^<0tݰtIHH~Vq`~D,Opj}O` QR$tgS,K'^;XZ${1JsDߤ&FE6}{qAGoW<:p,+xV{@o*8|1XN1Dbz6REJe Ig:R!S@MP]z,(T()Q-L[W2AyVh9t[):ܪVoF+9kbVAgǨ(tFkD@~,8F5 WMDcye*]ྍNS&O)X4p"8בbdnrc %=EٿcdCU>OB` (~L-.H83x!RPعvaK WOdR G7|\6ڪJ5W䱤 X'H|;|nu\<%}UH(7Ū'rwছ4?~&UTiRUoQAN{4T4UKv腬G3# '$Hy} Ԙq8[o(rV. 5JEtc^X;*? ja+4G`a@p 󃸍Xhvrpȝd0[g W) 8c;DmlT~}YZcvq]v? 35-ͳquD+=%ƿ1ܟvԈ_%H 22p(F-4ktA7]Ok4&iBnTS[c? ߳΁\6gSw-}H;֊/@uH&ėъ1ugC~-Iz/m%"@i,qj /-gdà-K :Sw %0wȘG(_o{B(e9 ֔iNWuo'.(2Wө;̑lQe~L-;"1eJUZS7 5zcO[~)Qܙa_"v}:^pq8Z!`fjg}{X>]*vgb$Ҷ …Ve6&a6h~+~/2$﷬mQrf&LϯXe##bG[tx| ހmPzlv6E#S,*=kw93Ǡރӊ.JpY(x?(pEяϙcOmGy oާXqZ8<5Q(#CG U>:kZGbi̅f^:UX{53 1g8'[mm[I;:$Fqt7u`&đA|&jmQA 0sM|-~!]@?_nym]Zg^Vp42*zrs\%ـ0w&~glx?#.!ڝd`~ (Q8)b4Lzt;;A*7_ AdUp`!!5x-..] 8Mn) )C,7Lb3i#W(صέ0Mz}ܮ%5jK~/j*"-SNPO[84lpXEgRd{aA˙D&J2#"5P2GT^ˁٶ07;~QT J_a$)Cf|=P4KL1e,C`MZ/xk")jO^OdȈi[yQ6VP⺟[LJRHR7pHPp4Aސ~vaG&Ya["4$=8@S]]X?11q1wC@ΨE#B,?e௱Å-0 zڑEF8~^i lG&,(}τzXFi':QЖ:eh#=u[.(.'{*Dylpo+|/VGO ښau阛Jv~2YO-u#c\ " czQ_͢ooάc 6ad@]wM !i5G_^Ԕ7#4Oy.K+울aƃ_}t|PO#,rYοܦ0& z)!]I ,(qg!jjg7ly%ꦍN?ڣR{ѳ1$I&~\hjkb)爐TC&>JO+fL8A? P.yҨ0^#bWcPR9j1~qDaA$3N~AOc|_$\ Ycn;\& }Li^Xŀ]zc&UY-u2%X9J2 i'aGo9W)5cઈX`zx0.h|塍Q ՌtB$;gW=5o+Rٍ@-cxH\m&D1Q%Z>tO1p[W;#`&˽#wt >}DZs`&%WOoVJ@XXJ,]tgjRvM~cyw#qiJ-*OW=,R pt2! ?w[ W0sQ.١֚ 736xƭ^!24>tQ }/[|LSBʜYԨcEG*XrGNIzLe85\"VP_k EC_&56Q"؊6nD|Tr 9 c]TmǸ81<=æ%/|J & mdJ Vh}aY Q?myd_¿aWhm/<~7WUjꞽY#r(3ܦSyt7}-˾ G_VSjc*'{eɥSrv|qqDrȂVQm +(Zf'JnaY/$וN/s}/3-t@+DF 4O{;C|F> W`eW?a9b`T Fpv0'K$FvygnXݡ9 CI̡X #*00qLj _GDQ&"FL9$QEC#_ u&~LMC _G͓|u_&6|v}Y`NF?Xl 4Nj niMkTwªzeB6Cii`#j!渉mKM?n70q7*|&/ӆd ë_|wHzK-\8$)p۟&s:E(gEi5oy<*p;;j 184a`:<8H^+JIy /-+N62>ew &1n-#]Qx{Xs =cu'{u&` :B$Z T+G݃EM˃uۗ)۹t.'[m2iu/FF+ذk ť9m|X{ *~^ D|l>, nU#"~n^&osDZhOXf#!ha&MiLsvp{#!-C}!O/_-H 4&Y"Etg2н$滊ʂ759rY1ԡZ9&UBѲQsU9dG2wMwyaaN#U3r<=%0瓁` o eզ2qHMGBR r0J[=E X!" {јV#xd@"co㬙D Kv bwxd~U瞜ZjL3k-$^Q@-YHi~$Y?q%"JkX 0Y_)9:kOTˑ K34 y0ٸ=^wa@ lf*p(G.!#%\DV9ěKw u8j׏F5^^:G6ڼ?Q!!ẋh2|56x|.r*t~Xn@v*7~lV)tb$h ru$w_P:cw(% fƮ_ut"h#ه˱y~rЙԍ#~ֱ5Fړꌤq q72UH?a>t|K, ^9 %d9Q*̪9K,niSsV?ZɕDX11w }`mvĘG8F]<L?' VDVfk >Jg<⧅b<7MKrf=;ټ4Ƃ,-U@ᴈػ6Lr'yTͩ4fAϴEH'x ;xn0{B!;Zc9p 7éHI?cNNYx%E8]I%ykp ,-bO1h L-怤[lF%D̛I'?Xeu$h̢ߋ9ד9|77q幓f=ޤqS2 C0CГГ'SKVmz١vzrF^$RZy%{&zAMB/~% +?1 d_h_Hf>LT oG` mZCJ;3}O[y|}ۮkg&N"2gyZka˸uLnABQ ?⁉[ r] je*R<í(!Rv/TR·ϻ X&4t1mD}tǴ1OBXR,[ lgœI5}7yH_g!D]m!Ⱥ./!;DaC똼! $R wɍr!;869r$jB]ak3;I@>?^dnQ˥ksB3&7~rrWNQhdIZx&cyj>}U$˾5p!h&촸23 ukym -ttIVAۅ.TɯmNo7iҒ? jYּoӜ#!M&kZو·)"|%F.;FixGuRZSύUȂqگ}zO+Qsn4ˇzsƠn3pbu FA[D"At*ޥ -Yh˥ l.Cdp?ކ`m"=97e+i6%5Ȕqk7M'Ht@+KSy#5f{ d}+Y" @~z <*/o;C4QڋYѾ!CQʥXZrF!4޴1W_`̑J4/sgioyF dwk "ATeizDŽQeSbݱ4$ ]։؈o8E̬1|R,fn,K.2.Y\v]sPR/m)1 yFԷ~B$ch2@ό1@|6omLD" S"ex(n6}naR)>D6TM;lL$^UQ@Guhuox ƅӵw3xiDAHCO,p&% oºH! -@r@q4DlQZ>s,U9/[#eQG%ie^dK•#79n۶ `LZgY\W 305)Rw B‚ {$H(iq0!gO2G ?!jtokiϖ$t.B:ؑbZ0ge2)rr_aP=Q]]+1/ߌZZ<Qy?.jeF٘Zv Z3;@l9WtX6֡o:M뾬I9*c z"0iyg &Kkk0@`5 KD EQŬ(} ^h4i5GOHS8j3/J4:X煦yx/{}v1#Etg]?#43Pz2;*P<84|2$t,ʍe\RGOdJҌ CѲD>}WgeD\}jTr~ Jϫ+ &ESX=cI077NEkdV3P93p*B ݺB,Ÿ </Њ7$ @> qAЩSLx %@N ,Ӡ3efYkkhG@+T \ECCe/0w6^0(I巓JJZ̆`'}+Ȩp+hGY粜9w+*@W[M2G@?}YNCWM/UpEfPI߆G*lv î}Vt&烮еGԌ9IǪgF\[)\ WK .Dfu>:L˞GZ h:Mؼ~-wV%9`WwzpvƇM؋UW2®7Z) NeN?jKD0 KKŎ *nE,&ރ ku3mׁ/ok r*rW_n(#[^O]gzo3 oU"=jiy4ݟab+qx~!.s͏}!\y!^N&Ќ]F2xit"#"?J+&@Eg7:FӇ͑ VFo9vd?'m;W 57_Dx`բC{=թmTRѲm8©E1Jk92Xx!={gS'$Nrnʭo{ ǡǴLJ]V>oZt#ESskpb7nd2O,S@'4 SapTȫ""Yv7*c7Ń'9OFF #sʨc_Nfqkzv8 |+gnS+ + ,}YGP{=⦄ִɡ7>hΊU EHC߳$y^2Vokql`/îlHqT?a ='Ek:N@#fjk\o1x2%^c^(Ă)rsmI Q9'6Ha<t.kI&x8!y涃kPwr/@oI8߫Ub*x{&W',"8KDPHR| {ma;t@xjAA6 Cwu`BLl1-WU,fC4vIG3_QsYHj" m ]5(pMI"c趄:GkܷfـY$ tֳzK}ꡆS-X 6[QIe"m+imW>86n)`)Y3Sw䰶5Kam)Sge{XK?zUm[}NoYq<'}&`-[}yr >V¾_r H}O|XB86i7JPĞ2d:k# (! &^H>zLЦ"kS;P< t0gGb9]l> XDN[n.C]l@̄u΋sݾ3K'8nl+rC$C9?3u2/k& t`})N| Нۄ̬UYɯ{UbCF^+|$5j Pޅŝ{Ң{O+.oهK";cbEiJ+l28#\\fD.k澋+ޖ`;k/cpEIp6Ӡ b9n)r}{<éȖ%3ߞk%OF(6mZ9*) 㙸O>^`(8XhWD1*KEhx句;*O>ւR]i( J~d2}hXZ< tU;x#}mJR8BN0X?ZUXɡ/cĎNI4{0j+墨Qb`bg<8޼:-'ئmqɌdžZ4M7W͚"{0aa]3?Z0OrJ\{ݣE)s/j[$\&G(,xzᙋ'܇H֮O_α5 uZƥ^:&s|7uZ+t5zY ©>@u .?4]l;̯o0%%"/j U߶Ҫqf|մ`gWv3Bՙyfa:ٟrHg}r]&?<zyz,͘/ KxK~Pu{uV}P4 1rgzCj.0DRbXS١.g0pƀ=W/O^ȆcO)o,%e*] o ~u:Z-0]gF<8*29#) `P,>54'%d~,~,‡im4C,5 lCj*JpT,R=e?^ W}|L-X嶔2rDZ+6v5p=> vnpb9l!,n}ߌn5bWvōI䂠?c`(%\mvC{Md'{yTpQz\ 6K{b /{ 1AP`s㕇Ož xN_g )'PfBxFUXkiy]NdfTIpF`T,]x¶JϚ;ƀmz y  $ܰ=*ړfܵT3-sy-"W|ET{ ?@(D` wsIפiRY?&\jܺ6RђqVPJ[DAz VjLX 6IJVHl臰g~SYI vL<|$"3+HG'%Fb5p·[ͼ f@n+E^d_s|n{y9#஢EKƹ{cfH_ttZ?JvM bKyvP/@(]{)K=s%oPmI+fQFR 8!e}@R2|!vq{AڏӿދOۤz>J> շ?>N;(wBzA{&gV~_=o۲7kipVNƾ[wF_mEZj5/ VoC5| 1JaG8Wd%^?@lBDunЖ ʈV}bR a .W7lܯ-xJVZ9fr^E$s$hC*| ,>¿XPg^ C@2sgM&툊%)zd5Ԓm"'.2_ܤx{VX;]M%,o8<`mK}, _PwwB0sA[g%#$]6ѝꀭYY+Z෧u'v-Be2;".COi@1FjHFk),64k䂚z{U{ooOa ˂#E#U+\`Ar׬ "<LzG`N2%gr‹+^}ՓX[:N9, zn: L?_\ِ?ju9m<&R)okK.faљ8Rdž`xٱ$ދɋy. I8l"!Eu(& JX"FTPJb_ęTNҀ^ , Tc)kn/C|BU,Ql[vbc~"ZtG|Lk\\Gk%Sgzg1~m 2 IR2WS(M>wqzt!|ٮ!&H=c Q>`Keh엽fc4f)7ڋӮ_C€cV`*Hur"yĿ4w?,2ǁ*`F3 Vs=X_f_]4}/❰əjWkqZ &.5euHՉKlyS9R<2_}.1xe<6DcqZ&%:,OQ*b,!逯ytУ]w0/IwMi%ydYϹBRvYZS'63 e~ " x4K=*D5#+B:A@fQwN3l<&*pׄDIb8k[7O6y0rw)+p F%߽qv;dNO)11=R-AiW<n5>j(=ݲkm>̖A p#7I@2LWc.XA 2퍹571,~9-{"3]=cJ!S& &Tf|sANhJe z3nQή kLNlĥ AɧWQdJ\ ZGL)4] *ߣH\ZNw(<]_C>\BoKliN3΃%w Q&ݞz &EQ^چ~C樚"t!@6Rە2xHD8Ȍ\GSO% ,{n#.fA`8g1ڽmm(epgVkሔx}%B&m ";wA#~lq9`(Pxvȴq$1"_j$Nxn9Νw#y_dbO즿cy ,cBU\6|6b_g [=/vGq@+Wb&UY`]U?moWe`V+~yےQ㴹U4ȲJE=_nA`vHM՝ Y8.]'`+ jTz+%A˰Ǹoa9]tYQ()e4?#"1Jwl0YOьj5*z]7F.9!!}]/pYɿl'ʯTsijeK⧋M]j}@oi{OO dWyl6xo7*8 /"#idNCCj1 D @ u$M* ^v˿5jKR֊n;x!sGH=qU}:SV~|zB֒w7\/:cl0&Nd9̪CYɛ;*{*c h~&4 (!DS{ 8p󔩀ߜI !5_uI\ٌwSAmz3҅.rM1G0op Uh R_+~2-IJ7>QY& `IΊycd-z?`T ݠTpGг"-V#O1_Ea{u57=$[c)?Q{w,:wvUGϭ߆Ƒ)q!\>i L6|p{_\] o@/^_T\`_ 8ѵ&nOYULcF+91|_ʀ}(0 >;0 @8/-^qyVcQ.QQfLkiV48_$4 5 Tֽ#SuLjll@J&.r 5Ru|5%v 01S&.Vl@f ;p*i;5pP]E`l>YdiRkL|k15qgiuet/,E bdW+/ 0N-u:B7KAT&}/p2Տmld=p˨1;J&zyk2l2eXwt-Eu Qq:swpoUWOHQ7w:e)$߃l?>u׹x}鎦hxt΋3Ţγ%ehEk *l 0 yqk̋Ns*zw˧l* Z/$pQ8;[]RZ'O 6 n6O2Lፎh ޲LУALh I z [ז2 L:&X}epT؁g.U Os@]o(F4ݕkHr 櫅Lvx3BMD#4o 3e? t3#]]:g H V&29+ruv8԰4eyHu!PPjׯ%\bó"VN_{fToZ2dZgab7'O35eD},UőF^ޟk>H3߮(g(p {PɈ Gު9'D О"5qzIJWwVq+p7'8|*~` ӟ&FŌZyjbҿsP C{dL: \㉠ AP l*ij3RN!J41@9<0"h] vCrvߎ_ee]eRoj(%G;e2EWE Rn!E7P >"Tv&~`c@A𔓕) Y[4_F?T8OHa}Ra7M^么r!YwCSKiH.&Wf0则굮ږЦd@aܣ|c#{db n]i 2L{ t3o/l+Ӕ tލ<9ƻk 3TE|ޞSR׳EqT Ʉ2z,a )[u2A'_28YgmoM}TraWe!=e[*<ÕdY}z\8P;_U)HP|R%k'_sr/7ٰH[n@c[J@)kp +W1MKZIE^ѱbXmZKxWvXD<=lΩXمs6z g-H40t|60LFV1:E_HWIR" B)ѳw2;D;OH'jǔvvZhT arEu/j!+Q-B,n$|Mؕ66zb=_cm''4!Ad KTit/4$'ͪ[6$\*4P4m?e:NDP4 `6#n_X&~ : _dq@UbY\m25f 6ҳ?5$?2N;0/f6~~F a|kpwȾ$ ъyOO72Dt'4 3q竖o[ `0Q_6T4|KQdґ-/> ؓȋI%C h(렠Bhs~^݈~ Үx-׈|zV?.30'Oai(, `7+!_ Ȩg4i$ŊmU:O/EoFTZorU}Ssv{TDۓLB F^B&>w JVuDMĹ ݠtk)ww^}%FTp ZdH^0kePFXɢQ}q|F[fĥ=#Nr: #2La8sEa npނExT,njl\P7,ȶ) .;dMต5̽94&3TRWEgE@ᆣ?*5Jp_gH[^',9;ّZGRqD ׀UuU[eX;6PR'MDYP oz`ANEB/6-N"x~vV ic!y.ζukО'Rbs8ܟ4-ydD7G Y<Rq}(EVa ū (~~j &>x!17m/q%X/ gX3U~4t>-w_ %˛ej>;:qԪkC4m1NWJ1s鳃[I˯_ uY{ Cd; HH{pGn<{XapFҞ2:e1u0Ug$p9Y a088[}KT{fTS`#t,]ѮQ%Q a+Zg{| b6o9ؤ~5 Q4ފdFH#*RhG%H|~N 6ؑ KUkO&t"#U9cm+1P8U?3)ؘ{$2RN豴%&:1"COGM.&'ھCT5ى!;eקXEockQ-ݙӄѾ.Oa"If_Gg2ObA8ӟ;Z| @6$|@oQ?ZE]1$ُMyDWN#.hp?^ꠄV6sc(C&Nov7WŎہ~aO18hGPӿ=۝J zT@$">!9ΖƊ(FU!!hp^GWsK^997M9k IƵ;/}qOFgs3feèt-77A{18)Z6]#,3r])hGT^iP(5AOS},mbXw?}۳aa; v兺"|c\wH4cҶ[SvB؞%O<./6_j(J݁_^AfV/\53qc#g(U!~WKrHPռ!.{uItD4QfVƅ'_$E=XG_e冝FٗÿZV M\=DJ u>ֲT:WAQ >SDoU(;}XTvm9\_ hM) ;LP,dYmV=W>8) 6m+gJ m<ݎgCs.}!̏TUQWbjᤲ:u$2Q&FHWc_eA%Vh inQEZFQZa{' 4ly G@=Z\bFN@p~8u148 ܭ6,4}4@u1o%sIn ` m!ϙ;o0F9{tϸ66}\4Pdsy=J (t2T1CPT'߭DvOfwl4Ȱx>tuuc`g?.;N-J3H7wH;#Xh@#懡}1o?yKULsu\L1< yvpK;@_RAuIPBqRj\ ߱}&aZꔐoI,8pH wԂd^췄4ř44Y =9̪:fS]@Sт TS0wV?刈e6yHS0D7ԪZrf<HJްr([1~ϗjyh-ifNwB 0?+)2\5j n*D1W9EfƘP0cp}&t$ĔP\䨃fN TI2|M0Ȗ9cKnY `X̻L$FY; 89;!'{m}nْ%1c ڝJrJ͌[~da [gCX@*b `;+|“)A]vּY"#ۮ|M:^@G$l'Fe`~`_`wiEhx µRȜ<SɯrcQe%1%PÜϘ zԓfUÎXQomEN\4#ȅrfSdZKe#&K@Z[~]phS>^ZDP(L ep iYts IƛZjW`&%Qbɶ= >`xΫwr;*u )mfS(*f'zGOn_s7.Q8?lrjwܡAƳ5(@EfMP;'x2.6MIEnVE2UѺ<8m劧ޤZYDBZCXS=kŒ~ۑ~qNaV0tmAf!pͳ:(DJnVMr/ھPAr.I]놸m*Ļ ;Heo DaŠOTQ@$t7 :FCN ? y{7/P b0$/`6w )/6d=$⃒N$d'9c=ǎZDF]Z{/iuPrY|6"|tYz.hc.7/`]^o\*`:BV3PnɠhڑϬa:٫cRqIjKЫUڋ8b~#Hd`@7C܍ZD5Iz$Jd9F#*A8Y(uъFlv1c_[&"h&M srphջ)Z;[%^eE g6?ז֌Gh9EjYE++R\pf~7,SlM!ԫ@  ֭`{[me&q7X$tڡEe-!ޠ[И ז;H1})Gu,'l|n HuF 4Tq}26(Ž⼏Z ןD-Ǵ{J7brWǝ }j$-hms=x--߿'ڬog=' m!S4} #~#2x Ty҈ =jN$+X0m^z *[h"PdC C4QA_qf R3Ji^P^@" !,sb7wн*myCǤafD qf5B Ş֢$WFېj4 7q/%BJdi~J.e ׫4v0ЄC{DO[r v 3d:ϠN,/ }Pai0Y8':)t\i[sg`5gהݒ#qaҝzO[._ѧ8)ߐB[2R%ȃݎQ=@/>q@9D<0Pu9dW0R (h0F6yx5f`BK`߸+OգPTP9}6|ïJjd홪j }sw9mķb4</+!kG蝬g87_K6VЖ\\q r95TJbd kGF(XGwBS]qAtrz)"~AtY=Jyo$'#nۨ`0ŎՈA}nPվ_L1vilJSrYCɔf_8/Zc G)>Xu+5'сiԚZi|VǦ6,HD5.y Zѕ/л8o `6)[23-s+.Š7nҞ1"B_3Dpm6nPfozSy7;aNv.$\ߧJ3`T-Tf:KxZu D %C=.`}eu%h@Sd9kR MU{KKH@}2N~̾=ձS^U]xgfPȘaM Y/ 0+%MoQꦦOh#Mmd;vr G*\* V'̖hE[o!2yX8${yybE(Wy鿯Aa篡 f0zs9N֝A|`CCȰ?1Q9y@xFqs' +7JqXo %o >q(-'tML 0Gm^!2 (ꥮ9VT%[^Т#LI{ N4 c)﫧ڔ;ЇD&N*LXӞ vZn_+'U}\^%{=zIeeWϧuXMa,>F4_3b8 h8(c *U;=(I`Ώ,]޴eE#-Rc ǦvJ۩ ^4Q ^`,g&U  @I#`71U^kߗ`6@7ͯ0}%_Pszq#r< DRӚ>:XPΠ|Gtܶ籱?"tBe TCI?_iՠjxRZH.s.)OXy5p*F4wZx&e/|9Rؾ2/ òJtߢvc_$5\O4,CbAaup&<_fӉ& "~yZ[fD<88p@8©s۽|QKqPl. 6h>Qv̆~ Mũ\Y͎ihW3$O2m2잭kwEq[@:vk 9nNhׁYMoS#~(g_'r1 /KS\O7E454!Wj}aZLNr!#MA#x Og-0T< JF*@{X v7>3{f#F"dpTuD, H~RQ*S{+MmICJ0%~i BkYK=9s |\a)+85UoG|'#mx- `NFxfm,16hWIp l(i|}H&]jL"dąJ8Xs8sEaVC,'4mYrdBtPu4jR%l(o!d?_aJ~1moz⠢,12#2^L(tRq [Zo1I̓Ci\YTlVrđMU`&gڵ H<\4Ljfi˒p/< @JUJcI.=-l[0lSK ioY0ҁG@Ϥ ?pMCcn09*n2"%bu/]-@pB=H[sL ;`%bѶ6q98t¦+1@J\\L0OW"] ^DTn웡Aa뜜S Au?2hyMԛ_9bm݃Y@TտL9^?lX*ßrz^t~'x1Oj~ =y"ݛ}/JL0; ]i>Z:ǎ so2g_(Uz" /3\ m Ґ"y;{v:muqW$u3J\YqlZ& 'v|yg*P#×]C`6Nr$iSހfQP߱Vn8Fy}k%Vp#z$$r6ព중p ߑG}WsilN;U4~p6G2 M8]>PQu -N_&GU8E\EKYdJfŽp{o0=V,d䗏Z/]G?y9.(VSOK\&U*ZV/?M*KBY4anq4D݉2z=Nro+̧˽Ϯ`3sxI6Ppcgg^;}:ˊvݠ_3=% A!`<*dOń!;2@Gh2YӓAKj7o[d_ W`-. WDZ' ",(̹=|2#.%Ai5rԬ;@_QVec/ N.!ƛ| k):s  ?3P&9rz"'?@P"iR+0%i@TOMsb[U<}¼,ar*Ws!fƏVᔞ=A.ZpG lf:l X/ڪ"_eP? mJCijtcxf+j`Z}Eшc?Q 2J§yA8/nkFG~ÃQW!FWIQ%Z8kd\^.%a'SAJhГ(;[x4T/_C+v dAЃF^ `rKQ'Bh(֖JxE/O;l+]VqZ#[g4XPV`#UekD嘿Y& Is<7S\7͉'QbVm}5Cdzz e.{>zN([t]0bBHߡ8 }>g8ӥ$J #v_3S~ju<A>1D#a؞cC(JB|mS:,pD#I-˦T^\lqD` vٮ:oVęh-ZRTI|v%H*:Kk,]be8[no=BZxf67bp6u( >1v-y_Sg(v=}2vn8 PQ$1UZȅ8G?J)n #JQLN:oC]*N_os--i(aY6--{ۋkZz< z±}k>t# [ +|Oר{ZMEޱ!0 KMȟQw&aYN[_M񯫨G@~][kk٧3 -)]x{mSH$Tq4*p/ס$Eȟ $2Z&XnNj\o*c%tyRCD bm@#^!$ V6ƊAkQI¤aO|"/q9V ܄v;/匿N6]"!=A7po]#Hދ<_Ţ+Z*Qۈx y39nz 9"#ߘ<@X|*/}kTla싀=5x[ @QovsCz2լAH0'56W2wrUrB,z=0EPVLjBNJpJ<JkOvf 4~MxuJZ7׶qqڶ$OneSRxHKy޼!yr~UoSPXh>1i87̨Tm*wq>]gv gccJd!|ezȨns.t%Ď:;4a3 w,_"TRFL6E nҩ+ 3,rؚͿ;{eWYLK7G6.0ϏFV<'Ǵ?hn Ʃ"gnĉW$>G{mwCGlw/닜dzg\ݙJp,ڹtAڑhI2I7vtcyf?qG `'!Ԩg2]fm(^F|XbQ\'5sa!ŭ٨vo}fTNX`]lָb%ʰ7ړHI7c)!sc6Xh1Un! 0{E"ukQ"<(r'WZ{ ^#K6UN}Szi *)RF5:b ,xW؁ଗ OJӠTHt9ιګ K37%< `5KòD6yYKWF/.-磉+hG ;j#LGun3$:dbP{y+ +'eYmLKk5 a(0>#3ZO2~vE_ǧ]׏ %-xHJ_GE>QI½Na( .Id7yHȶ Lвr)'X"~x+?.GS c'0|qLzC>T5@Lx@X "BntSa9@39vl!wjj@8w,0,yHPanŸJ:S0!榺{TZiNB\.g.Ikq yUu$(:) fpW)_9O,(9J6>0jw/.;jASdkw6uO=Gaj4.R"0 dAZ {}=aRR$*Ɍ宇/Raգ]}9 ׸QbHX@GiAo<-n |}YKRޘM7JڊS)~ͳ+kIqnmʝl-15pZHSdQ?CԈ @4{/\=;qzCs4d ǥ]DLss>L>FXyq! t~S4[EjuJ\̜XMR&I|JG4e))PZ9}p3YfŪ 2~ Ѧbå@<[IܸYU>jsa=gct&5bNU7o)zWD; o_Bkmč0j}=rh)ʄشU)CO KnXh hΎ%o2K&_1_Ul̿?~v{~YH՛] ?E+)֏ʐ~fyعbP,"K@8S?V"GAG -6pckSЁn؈ރ7L b.{QcZض\- D0u+wVĭP__ӽkLT]~?Ac2<%!HHsFeP oDR8zвdvBoL T ?޾Py4q[Vd 47F vWŭȚjMIi~I7{ߩRdgpOMFBΉ=n$.\vt2Box@~E%pXZEJR/c1Cg@";s+Qu;vNCetF`QRq4eҧz]˔"NVr9蹮 1]2 >_޼uXCcq63d~nDIaP yVGD;'f"mB]{DtFw0ă:8_+oK"c>Pfc( ;>s$R 9OlC>!x`ɥSDpr-Ehw*ܤ9Y:r|W!Xڇs>ش[U)~jEw"@0-Tr$fYBgdp^йte#ư8W{h7XO'd7KhK"O=Ipʖ x)owzDŽq2A 6צɴ僘T9Y#(䀑i%)rK۾RF3< T4~:p#HCȯBԗ\icT)+G~]wïBWHdjpcS UQҍX7۸lSA*XhENSfal~KxMoLWh<ݢt*ﱱQXFVK1B[@ ͻg0BW*}ŜLdla&0Ⱥ> ϺI[t#Cٹb|&tOILPnKH˘Y3LdŶS:8r SC EGlo1#VU `A3R^lE [':r谧W>*v5d-pI,Am'ލNDk ]a [<$8ǖTx Q6Gh-/c 0Yn?z8CH*< Ϡ70cu ^5w\=="^gi^]/u <vLz5(^Mwgd0av_^A7g( O~;hjA=-L`71tLy@ñ u=1 eK R:4\3{C.0~`p? YP?,UprKu#a5co*.E-tcJP=T>UfMc(%cBR5V*2 L#j0[rnALA:ZMR|1՘3,&/ҠܔxGU.Q8@#E?u0xN/F(SE[iApSx,$#%MpJ~[ޞȄ uA(\iuSb4?A`.f,.}j]ۢ_cU?K?7ۺ=/Cɾ/ϩ2j+î+>t:wk_V~M/u'}]p/ᮟé?ᣝgۯh-?}!ʴ1pp*}2xed/h~0@ O%ҺzF0$A%۵){&6%iz831`1D,;V] 1ѡoTA °2Pњsw[O)!Rq2k_VB԰)w$o%"`B* ķb=4b7X_Pex>d'>KGK"g-Ȧ<6{TOc˥{NWdaML G QW~M:6Ll;ab Y`"5uW@/i-١^+n9B/q"FREa~-$3m" .V0PƋIx[=鑪ߙ:wY}(7%p _b ;X9.'%p5!|+n ) @FGog`xYj5Y +|-L=40Lf0FC7-L[a.-ZV!gEuA1=L} {SZR͘.u} #Κ&T#6qklWR=MECC h"U_6>`^6W#^G",5hO̟:(É*Jpѥ4L:Y86,Vj l@yMoZ.*|Y]k sS9Ԫ5e<5tܛ~j\^y>1KtCIw|)PqnK36R H(hA &?JU~\t4Z\H`/qvj*@D*&I0*Ozp et ~펙zm:np5ݒutEd 4طZޠQK w\5Fn[}]Aq&D .(xtFNp)WS gZH ӁiiVE)&'Sr+|$`t3r͸Gx!?oROٛ=rgKjŠ"?v AĦ(uh.'9`f^ߖġNB-CYAuj/cck S Tza8ޡc.΂p~s7qVEߑ ENUY d߳e)go)>KW)5sRA8w\U@dSiq·N0"p] kixQOh)E%́ tYrJB)*lddr麶MF,K6o3{z,l \X:[I^UjߚgvnS}u4NM8%p U0Hqd g]BLs5]R|vE)Pfh+, VBhM_27o״  owq+~),Æ, ^0.PG^&GhFgd^JEBݤ{'FRn(T}zdۤfX(M8Jk~<$fAB $BK$Ĭ4;J8pw0Q`UZWE8?#v;)g\k̟%E Ni\e\>IPM-9RL󧐴n wX0I®ɿs }@BŎ_eTBn)"= BjX*V`U` j M +|f^nmTEȊaN\BpB:~еUfjA#Q,^X$;otI҇Dj/36"}H/ERR(haGh:|JkK!C)fF9z1Y}#vB8?n/)sjtb9h@wVڳ0goUoqjpoW 'V)@B~]T D2S;,mp^I ^MD!)I }daǩ?aUmq~: ~ mXi9NFp\ھh.BXOE\fer&J3R/}~[6 ̮tݙ.<;`5Jxtڷ|q>Z`lV9_ Z03^p㇅Q:H0#Z|[avBf=c͎o]k;=PA-6.WrhO|Y~rg”,wY%l̋gl Ep#43j9HbMD\bZv<2JBpR+;<>0ƭl_|@YK39!D8a$4A2:7]rdhnΨs- 4z0¤2:VS!aLǨ]i{!dL8:Z7*ټ UuD iZ )tJ,U+#HaRйޅݷXw ؍=6~S.kϟ߫p0W{uNM?1vFNMezTnLíX5~,'r(L_ͯE0_]8,hlŭ\^[)vUo*cH9or_%<v*` c_|azvgl~u9V񑂠Eo0=^ g[rb5nObJq`N d{L5=xŸo5ck prPOOQOGg8|Gp H#kn:t-)څ) !YbVR3UèXh@k'#w'ꤚ"u\J/Oi?V,_n4.Fb[Y&z>$ S|s1׷T `ޓ>~_8]r+wU}e<}iQ;˜qwfq2wtZuTf~o2|ItE3*rBAɿ\d%{PpyËt앯졜F.LKhESApg:[6!'[/vw; n JǷ?vu&$m־loѩ"{Zʤ9VOjXy~/7\L)v,tF<>jJ/v=sRDsؿt.!q9@g'@PFdktHTIqultҾ5z#A^fd#+')vn31(Zᕼmué';3@uV)Ę>}C6d0 --& Zô~p,).~!5HYa/$!ֵ)fg?W'56tbhȫzHJY )&J?A2 Uߗg9( #(Rd< u DţI0Lsj&_S"fP-yҳZdph|Q5ocax2hmp4yQݡPEMXՅnJޭvQJb:C1˫@a1?aeDhEUUEP4o]//k'vLPn]_J; @S0(HΎ&:T>46?O2u%@z@>$uXݝ SQVFgۜV~&16WdjY<2Ha-w y/l7z9qn^Vc2>*3"YoQC [c95*~Y{6{ʨU$ Iɡ1V:{wK4&oӅISӡ~*{!z96<3G-]5 I_G$/Uσ.~$LZVP.4SM*7 yAǬQf9=eax̢WkDf.,HԠ.m+:׎b|" Sc6HkVi~K?~N"YQAs> |v>>رÂ2-T‡1df* NuO[)])>{O oˁ÷^^SIfݫ_WaW̥ )j^:ˮ (5/9L Z<03Q%goxVuS`UOԏrd zj80V,vѯN`0l?;Î71"L\_+F"w^bZ>]\nO1wr6"쪨k\q00@ɻLb`9Թs]}ܼ/ dW"{X({ |Dwyo=KcGHDӑec( I:Z#ډ}4ٵL cf2:KU!oCmZ~{z Ze#ҭ5ŀ @D0J4~;hy?as"ݧ4OPN-[qVwIˆT[`$dMEj+-J/Nr) ֈƛ ]t]IQ~%.Rl!L2VDa=TVm/LE; S1sѤOZ^RcLzfBFAK$o 8Yh We!:)ha21sԅ{Q+"D|\AC?:2-5'=,N_1V0ACI8h |&TPB$Wp>Ka'S5X ޓV"ryV叨vSE]CB.tw,D{+geBb>L.MS[+wG#77}Wi7!+!heJ *EѣN7.)Z*wp5 lVAжlo|cൾni-a׳MQzG_b"h>>I3ѓcUFefQns_1 u&~X59 &L >lgEN;_g{P:+R'HJ'Y\jM$Lsߥ,XD6嶣*'>X@j-yNfO &i󋟡ϫ[j\xT9}1Tc!ݣDVK"ϻܳVkձmFr T vވ]-tuM6j5 /34s2ND3\Dĸkg8r&nt ;l:d,Ob@'ĦutPn"kHU^xy;"WN`6JR .-Eլ) N)p0 Y\jFBbֵ2u)}~p:tM~"OW׽NA7ockOU TL9w\oGUy i^-Zj;j;yopjk3K/L:fzm+6妿UIA'];h%(}McDQKRZ| (URmU z%T]I#1Hou.kbz?&$e*տ£D++T,mM'1șPhh>;ʟڵz? I%' 8Ƽix[z;,+.q10FVk~{kcI{qӯeχY3 ʾ(plXk0vKř6N9"MvKjqvQ-Ee_yAME\ 1Xsa[ɷmM ˾ʝcUSw+,~Zt-EXaEpxlZfB0@ ۆiyj$R^#a>J'b2Eݐ6X6 E<='EZpDZht!3~TOv_UYU:&@pYLēpsSO?Wl0!fN0b/˧.^aH=9FޗT8ڹTWP66׷QŽJzMxߗk1A5g/O_nSyqEl>E mqp c 9o޾AE2 :KhSGhuXb#6A v` A2lӬ!_ =>:$,&?2>|Nbg18Z1yǂoH$e@/A/^f-yCR)6r!32^ijm!k4"^TAd/Qf,[DHѵb*2lW{c*ntd3?/oU~|3 BMVx.J!RzLc #g3ܠ0[./3mY.UM,O/Λ$[ VEY 8LuF/_zDJi'"rdwT7 xvN7rW^8l୎ ucZT-w3y$JA jQߋ,M4XkQHƂjhUQ~x"!jcC[!+Z 8N"=PrAΟs5a67rD&>L\^pPV^Fjw+ќr1khqNnS!Kw&Lڡv` ,)xʲksYX5`Jî÷NeA 2=֎|bu21eZۓ+[B'e[܉h 64O IDs'nl;9޿1'h$O0حGJs$7f&u:OXjTd\Ebg6$Fϑwumpt 1B\WBkH9+iRG8fEf+ xc.:K8uRM`B9Bao9ix*: /&\FK4VRg2cm)n'Wki/T,0l\zP /;Bj;oGO^Ï8Nm,-?y`, yNOpQ5l Do"& ]J-4/oRu`δ<$UIZ}y\Dӷ)IΊ\6>py :k8xIVmMA9Ҽ;/z*-duZI\CV=JԿ/

4_N$ܞQܒ%RlN:Di:xA80vh5-kimx x:?]NhǾsddve*;ўD+7QW:j75؛Ukƞ>MuW;m/q aIb:o:/J.ˣ34Oj>Cah)-| $L374/Iءgj{q%9^Yyg/ ]"tO`dw@RaA7=-c |V?')&(ݏ.avβ^yW,T "Cλ9\V)%d ɑP@$]VpXq F5vO:e){eWKUk|ibv;ED|3hrZ^$jE*-,x} :E!p=^X p$t Դk8;ND}.noV3{ %Qp;%Tĸ׺'+E͐ j4Ȝ6{\?ƞ5l>nmUNQ0ܼqeM+iY)xz/qNj@Qq nyѝRxK&u8f^˭h>cT#|  W_bMeoqyP7Fe;onS6$. ~:i >(Úi:W}/ N˴!Cۍ/ - PECQsnItXn"?glFHphBD*Ox:~fRoou/oQ%QR6A>{X~Y^Is@՚T3մ'jp%O\ dWw~EK!?& %AU!fY5vypApL1Ƿ}%AV␽鮏.?{`qf(5V&ʫ%VS?R~y4(_u Wv*^mIĒ6v ,eIPb%L`8QΑ[K7rw(zK}4G6}1 R͌ :w=1Y^ʩ&*J+ݺARsVF2zqjKњvZ9a6ߺͪc i˃ %Mcf0F:<.+"߭ li2t A[@,ztXfTcT,e h!UXU;NxwyguBI!ƨB/!'& QT;Ka*"%F]"bAd[(߮z Մ  AMפ %$Y@rF%>'+@Ũ!=&ao/qIn%. R~*zNJ`+`Y:Ch?u?H f_#Jq3: %A2gO5~<7CҒtь]6B ,a(R,dqzjscBѐVn[ JtJW2n+ ƌR^^p=$VXh[ރDŠP;~Ze g!ALuzTv (NwIA ȳUY,[8ɑH]q iK|!bd"zH bŷ" $=Y w0]6i~d p^Nm-N1x/yVZlRP/_2;fua<1ϡ]7V1L Y3! ]XL-CG 1zb+v Q O0 r6UiؓLOڦB0}gZQf͹Do*IenmҰ" vg#}YC^₿׽ ~aA?ᕜFþ}`uE)ܳaJ[n毕ӾwHLt^43k,$<68ճ 8ޤ"gN+&SHjqwEzVzrV”fMNjT/b]Ų iNf?oJ-![U"[3ٹ'ߨ$O70#ZaUc7b{X_qO:lrgrz5ӑb}" aASk*nd¡Qg}; 1%5%xf`MPH?w-,dRjKQ (!i4wKn\ce.0'N/LqBicnV Bxorg-server-21.1.16/hw/xquartz/bundle/Makefile.am0000644000175000017500000001770614757411105015307 include cpprules.in CPP_FILES_FLAGS = \ -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)" \ -DBUNDLE_ID_PREFIX="$(BUNDLE_ID_PREFIX)" \ -DBUNDLE_VERSION="$(BUNDLE_VERSION)" \ -DBUNDLE_VERSION_STRING="$(BUNDLE_VERSION_STRING)" if XQUARTZ_SPARKLE CPP_FILES_FLAGS += -DXQUARTZ_SPARKLE -DXQUARTZ_SPARKLE_FEED_URL="$(XQUARTZ_SPARKLE_FEED_URL)" endif install-data-hook: $(srcdir)/mk_bundke.sh $(srcdir) $(builddir) $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app install uninstall-hook: $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Resources $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Info.plist $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/PkgInfo noinst_PRE = Info.plist.cpp noinst_DATA = $(noinst_PRE:plist.cpp=plist) CLEANFILES = $(noinst_DATA) EXTRA_DIST = \ chown-bundle.sh \ mk_bundke.sh \ X11.sh \ Info.plist.cpp \ PkgInfo \ $(resource_DATA) \ Resources/ar.lproj/Localizable.strings \ Resources/ar.lproj/locversion.plist \ Resources/ar.lproj/main.nib/designable.nib \ Resources/ar.lproj/main.nib/keyedobjects.nib \ Resources/ar.lproj/main.nib/keyedobjects-110000.nib \ Resources/ca.lproj/Localizable.strings \ Resources/ca.lproj/locversion.plist \ Resources/ca.lproj/main.nib/designable.nib \ Resources/ca.lproj/main.nib/keyedobjects.nib \ Resources/ca.lproj/main.nib/keyedobjects-110000.nib \ Resources/cs.lproj/Localizable.strings \ Resources/cs.lproj/locversion.plist \ Resources/cs.lproj/main.nib/designable.nib \ Resources/cs.lproj/main.nib/keyedobjects.nib \ Resources/cs.lproj/main.nib/keyedobjects-110000.nib \ Resources/da.lproj/Localizable.strings \ Resources/da.lproj/locversion.plist \ Resources/da.lproj/main.nib/designable.nib \ Resources/da.lproj/main.nib/keyedobjects.nib \ Resources/da.lproj/main.nib/keyedobjects-110000.nib \ Resources/Dutch.lproj/Localizable.strings \ Resources/Dutch.lproj/locversion.plist \ Resources/Dutch.lproj/main.nib/designable.nib \ Resources/Dutch.lproj/main.nib/keyedobjects.nib \ Resources/Dutch.lproj/main.nib/keyedobjects-110000.nib \ Resources/el.lproj/Localizable.strings \ Resources/el.lproj/locversion.plist \ Resources/el.lproj/main.nib/designable.nib \ Resources/el.lproj/main.nib/keyedobjects.nib \ Resources/el.lproj/main.nib/keyedobjects-110000.nib \ Resources/English.lproj/Localizable.strings \ Resources/English.lproj/locversion.plist \ Resources/English.lproj/main.nib/designable.nib \ Resources/English.lproj/main.nib/keyedobjects.nib \ Resources/English.lproj/main.nib/keyedobjects-110000.nib \ Resources/fi.lproj/Localizable.strings \ Resources/fi.lproj/locversion.plist \ Resources/fi.lproj/main.nib/designable.nib \ Resources/fi.lproj/main.nib/keyedobjects.nib \ Resources/fi.lproj/main.nib/keyedobjects-110000.nib \ Resources/French.lproj/Localizable.strings \ Resources/French.lproj/locversion.plist \ Resources/French.lproj/main.nib/designable.nib \ Resources/French.lproj/main.nib/keyedobjects.nib \ Resources/French.lproj/main.nib/keyedobjects-110000.nib \ Resources/German.lproj/Localizable.strings \ Resources/German.lproj/locversion.plist \ Resources/German.lproj/main.nib/designable.nib \ Resources/German.lproj/main.nib/keyedobjects.nib \ Resources/German.lproj/main.nib/keyedobjects-110000.nib \ Resources/he.lproj/Localizable.strings \ Resources/he.lproj/locversion.plist \ Resources/he.lproj/main.nib/designable.nib \ Resources/he.lproj/main.nib/keyedobjects.nib \ Resources/he.lproj/main.nib/keyedobjects-110000.nib \ Resources/hr.lproj/Localizable.strings \ Resources/hr.lproj/locversion.plist \ Resources/hr.lproj/main.nib/designable.nib \ Resources/hr.lproj/main.nib/keyedobjects.nib \ Resources/hr.lproj/main.nib/keyedobjects-110000.nib \ Resources/hu.lproj/Localizable.strings \ Resources/hu.lproj/locversion.plist \ Resources/hu.lproj/main.nib/designable.nib \ Resources/hu.lproj/main.nib/keyedobjects.nib \ Resources/hu.lproj/main.nib/keyedobjects-110000.nib \ Resources/Italian.lproj/Localizable.strings \ Resources/Italian.lproj/locversion.plist \ Resources/Italian.lproj/main.nib/designable.nib \ Resources/Italian.lproj/main.nib/keyedobjects.nib \ Resources/Italian.lproj/main.nib/keyedobjects-110000.nib \ Resources/Japanese.lproj/Localizable.strings \ Resources/Japanese.lproj/locversion.plist \ Resources/Japanese.lproj/main.nib/designable.nib \ Resources/Japanese.lproj/main.nib/keyedobjects.nib \ Resources/Japanese.lproj/main.nib/keyedobjects-110000.nib \ Resources/ko.lproj/Localizable.strings \ Resources/ko.lproj/locversion.plist \ Resources/ko.lproj/main.nib/designable.nib \ Resources/ko.lproj/main.nib/keyedobjects.nib \ Resources/ko.lproj/main.nib/keyedobjects-110000.nib \ Resources/no.lproj/Localizable.strings \ Resources/no.lproj/locversion.plist \ Resources/no.lproj/main.nib/designable.nib \ Resources/no.lproj/main.nib/keyedobjects.nib \ Resources/no.lproj/main.nib/keyedobjects-110000.nib \ Resources/pl.lproj/Localizable.strings \ Resources/pl.lproj/locversion.plist \ Resources/pl.lproj/main.nib/designable.nib \ Resources/pl.lproj/main.nib/keyedobjects.nib \ Resources/pl.lproj/main.nib/keyedobjects-110000.nib \ Resources/pt.lproj/Localizable.strings \ Resources/pt.lproj/locversion.plist \ Resources/pt.lproj/main.nib/designable.nib \ Resources/pt.lproj/main.nib/keyedobjects.nib \ Resources/pt.lproj/main.nib/keyedobjects-110000.nib \ Resources/pt_PT.lproj/Localizable.strings \ Resources/pt_PT.lproj/locversion.plist \ Resources/pt_PT.lproj/main.nib/designable.nib \ Resources/pt_PT.lproj/main.nib/keyedobjects.nib \ Resources/pt_PT.lproj/main.nib/keyedobjects-110000.nib \ Resources/ro.lproj/Localizable.strings \ Resources/ro.lproj/locversion.plist \ Resources/ro.lproj/main.nib/designable.nib \ Resources/ro.lproj/main.nib/keyedobjects.nib \ Resources/ro.lproj/main.nib/keyedobjects-110000.nib \ Resources/ru.lproj/Localizable.strings \ Resources/ru.lproj/locversion.plist \ Resources/ru.lproj/main.nib/designable.nib \ Resources/ru.lproj/main.nib/keyedobjects.nib \ Resources/ru.lproj/main.nib/keyedobjects-110000.nib \ Resources/sk.lproj/Localizable.strings \ Resources/sk.lproj/locversion.plist \ Resources/sk.lproj/main.nib/designable.nib \ Resources/sk.lproj/main.nib/keyedobjects.nib \ Resources/sk.lproj/main.nib/keyedobjects-110000.nib \ Resources/Spanish.lproj/Localizable.strings \ Resources/Spanish.lproj/locversion.plist \ Resources/Spanish.lproj/main.nib/designable.nib \ Resources/Spanish.lproj/main.nib/keyedobjects.nib \ Resources/Spanish.lproj/main.nib/keyedobjects-110000.nib \ Resources/sv.lproj/Localizable.strings \ Resources/sv.lproj/locversion.plist \ Resources/sv.lproj/main.nib/designable.nib \ Resources/sv.lproj/main.nib/keyedobjects.nib \ Resources/sv.lproj/main.nib/keyedobjects-110000.nib \ Resources/th.lproj/Localizable.strings \ Resources/th.lproj/locversion.plist \ Resources/th.lproj/main.nib/designable.nib \ Resources/th.lproj/main.nib/keyedobjects.nib \ Resources/th.lproj/main.nib/keyedobjects-110000.nib \ Resources/tr.lproj/Localizable.strings \ Resources/tr.lproj/locversion.plist \ Resources/tr.lproj/main.nib/designable.nib \ Resources/tr.lproj/main.nib/keyedobjects.nib \ Resources/tr.lproj/main.nib/keyedobjects-110000.nib \ Resources/uk.lproj/Localizable.strings \ Resources/uk.lproj/locversion.plist \ Resources/uk.lproj/main.nib/designable.nib \ Resources/uk.lproj/main.nib/keyedobjects.nib \ Resources/uk.lproj/main.nib/keyedobjects-110000.nib \ Resources/X11.icns \ Resources/zh_CN.lproj/Localizable.strings \ Resources/zh_CN.lproj/locversion.plist \ Resources/zh_CN.lproj/main.nib/designable.nib \ Resources/zh_CN.lproj/main.nib/keyedobjects.nib \ Resources/zh_CN.lproj/main.nib/keyedobjects-110000.nib \ Resources/zh_TW.lproj/Localizable.strings \ Resources/zh_TW.lproj/locversion.plist \ Resources/zh_TW.lproj/main.nib/designable.nib \ Resources/zh_TW.lproj/main.nib/keyedobjects.nib \ Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib xorg-server-21.1.16/hw/xquartz/bundle/Makefile.in0000644000175000017500000006775014757411115015325 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM # to cpp, because that trick does not work on all ANSI C preprocessors. # Delete line numbers from the cpp output (-P is not portable, I guess). # Allow XCOMM to be preceded by whitespace and provide a means of generating # output lines with trailing backslashes. # Allow XHASH to always be substituted, even in cases where XCOMM isn't. VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XQUARTZ_SPARKLE_TRUE@am__append_1 = -DXQUARTZ_SPARKLE -DXQUARTZ_SPARKLE_FEED_URL="$(XQUARTZ_SPARKLE_FEED_URL)" subdir = hw/xquartz/bundle ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/cpprules.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^\#line *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ -e '/^[ ]*XHASH/s/XHASH/\#/' \ -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ -e '/\@\@$$/s/\@\@$$/\\/' SUFFIXES = .cpp CPP_FILES_FLAGS = \ -DAPPLE_APPLICATION_NAME="$(APPLE_APPLICATION_NAME)" \ -DBUNDLE_ID_PREFIX="$(BUNDLE_ID_PREFIX)" \ -DBUNDLE_VERSION="$(BUNDLE_VERSION)" \ -DBUNDLE_VERSION_STRING="$(BUNDLE_VERSION_STRING)" \ $(am__append_1) noinst_PRE = Info.plist.cpp noinst_DATA = $(noinst_PRE:plist.cpp=plist) CLEANFILES = $(noinst_DATA) EXTRA_DIST = \ chown-bundle.sh \ mk_bundke.sh \ X11.sh \ Info.plist.cpp \ PkgInfo \ $(resource_DATA) \ Resources/ar.lproj/Localizable.strings \ Resources/ar.lproj/locversion.plist \ Resources/ar.lproj/main.nib/designable.nib \ Resources/ar.lproj/main.nib/keyedobjects.nib \ Resources/ar.lproj/main.nib/keyedobjects-110000.nib \ Resources/ca.lproj/Localizable.strings \ Resources/ca.lproj/locversion.plist \ Resources/ca.lproj/main.nib/designable.nib \ Resources/ca.lproj/main.nib/keyedobjects.nib \ Resources/ca.lproj/main.nib/keyedobjects-110000.nib \ Resources/cs.lproj/Localizable.strings \ Resources/cs.lproj/locversion.plist \ Resources/cs.lproj/main.nib/designable.nib \ Resources/cs.lproj/main.nib/keyedobjects.nib \ Resources/cs.lproj/main.nib/keyedobjects-110000.nib \ Resources/da.lproj/Localizable.strings \ Resources/da.lproj/locversion.plist \ Resources/da.lproj/main.nib/designable.nib \ Resources/da.lproj/main.nib/keyedobjects.nib \ Resources/da.lproj/main.nib/keyedobjects-110000.nib \ Resources/Dutch.lproj/Localizable.strings \ Resources/Dutch.lproj/locversion.plist \ Resources/Dutch.lproj/main.nib/designable.nib \ Resources/Dutch.lproj/main.nib/keyedobjects.nib \ Resources/Dutch.lproj/main.nib/keyedobjects-110000.nib \ Resources/el.lproj/Localizable.strings \ Resources/el.lproj/locversion.plist \ Resources/el.lproj/main.nib/designable.nib \ Resources/el.lproj/main.nib/keyedobjects.nib \ Resources/el.lproj/main.nib/keyedobjects-110000.nib \ Resources/English.lproj/Localizable.strings \ Resources/English.lproj/locversion.plist \ Resources/English.lproj/main.nib/designable.nib \ Resources/English.lproj/main.nib/keyedobjects.nib \ Resources/English.lproj/main.nib/keyedobjects-110000.nib \ Resources/fi.lproj/Localizable.strings \ Resources/fi.lproj/locversion.plist \ Resources/fi.lproj/main.nib/designable.nib \ Resources/fi.lproj/main.nib/keyedobjects.nib \ Resources/fi.lproj/main.nib/keyedobjects-110000.nib \ Resources/French.lproj/Localizable.strings \ Resources/French.lproj/locversion.plist \ Resources/French.lproj/main.nib/designable.nib \ Resources/French.lproj/main.nib/keyedobjects.nib \ Resources/French.lproj/main.nib/keyedobjects-110000.nib \ Resources/German.lproj/Localizable.strings \ Resources/German.lproj/locversion.plist \ Resources/German.lproj/main.nib/designable.nib \ Resources/German.lproj/main.nib/keyedobjects.nib \ Resources/German.lproj/main.nib/keyedobjects-110000.nib \ Resources/he.lproj/Localizable.strings \ Resources/he.lproj/locversion.plist \ Resources/he.lproj/main.nib/designable.nib \ Resources/he.lproj/main.nib/keyedobjects.nib \ Resources/he.lproj/main.nib/keyedobjects-110000.nib \ Resources/hr.lproj/Localizable.strings \ Resources/hr.lproj/locversion.plist \ Resources/hr.lproj/main.nib/designable.nib \ Resources/hr.lproj/main.nib/keyedobjects.nib \ Resources/hr.lproj/main.nib/keyedobjects-110000.nib \ Resources/hu.lproj/Localizable.strings \ Resources/hu.lproj/locversion.plist \ Resources/hu.lproj/main.nib/designable.nib \ Resources/hu.lproj/main.nib/keyedobjects.nib \ Resources/hu.lproj/main.nib/keyedobjects-110000.nib \ Resources/Italian.lproj/Localizable.strings \ Resources/Italian.lproj/locversion.plist \ Resources/Italian.lproj/main.nib/designable.nib \ Resources/Italian.lproj/main.nib/keyedobjects.nib \ Resources/Italian.lproj/main.nib/keyedobjects-110000.nib \ Resources/Japanese.lproj/Localizable.strings \ Resources/Japanese.lproj/locversion.plist \ Resources/Japanese.lproj/main.nib/designable.nib \ Resources/Japanese.lproj/main.nib/keyedobjects.nib \ Resources/Japanese.lproj/main.nib/keyedobjects-110000.nib \ Resources/ko.lproj/Localizable.strings \ Resources/ko.lproj/locversion.plist \ Resources/ko.lproj/main.nib/designable.nib \ Resources/ko.lproj/main.nib/keyedobjects.nib \ Resources/ko.lproj/main.nib/keyedobjects-110000.nib \ Resources/no.lproj/Localizable.strings \ Resources/no.lproj/locversion.plist \ Resources/no.lproj/main.nib/designable.nib \ Resources/no.lproj/main.nib/keyedobjects.nib \ Resources/no.lproj/main.nib/keyedobjects-110000.nib \ Resources/pl.lproj/Localizable.strings \ Resources/pl.lproj/locversion.plist \ Resources/pl.lproj/main.nib/designable.nib \ Resources/pl.lproj/main.nib/keyedobjects.nib \ Resources/pl.lproj/main.nib/keyedobjects-110000.nib \ Resources/pt.lproj/Localizable.strings \ Resources/pt.lproj/locversion.plist \ Resources/pt.lproj/main.nib/designable.nib \ Resources/pt.lproj/main.nib/keyedobjects.nib \ Resources/pt.lproj/main.nib/keyedobjects-110000.nib \ Resources/pt_PT.lproj/Localizable.strings \ Resources/pt_PT.lproj/locversion.plist \ Resources/pt_PT.lproj/main.nib/designable.nib \ Resources/pt_PT.lproj/main.nib/keyedobjects.nib \ Resources/pt_PT.lproj/main.nib/keyedobjects-110000.nib \ Resources/ro.lproj/Localizable.strings \ Resources/ro.lproj/locversion.plist \ Resources/ro.lproj/main.nib/designable.nib \ Resources/ro.lproj/main.nib/keyedobjects.nib \ Resources/ro.lproj/main.nib/keyedobjects-110000.nib \ Resources/ru.lproj/Localizable.strings \ Resources/ru.lproj/locversion.plist \ Resources/ru.lproj/main.nib/designable.nib \ Resources/ru.lproj/main.nib/keyedobjects.nib \ Resources/ru.lproj/main.nib/keyedobjects-110000.nib \ Resources/sk.lproj/Localizable.strings \ Resources/sk.lproj/locversion.plist \ Resources/sk.lproj/main.nib/designable.nib \ Resources/sk.lproj/main.nib/keyedobjects.nib \ Resources/sk.lproj/main.nib/keyedobjects-110000.nib \ Resources/Spanish.lproj/Localizable.strings \ Resources/Spanish.lproj/locversion.plist \ Resources/Spanish.lproj/main.nib/designable.nib \ Resources/Spanish.lproj/main.nib/keyedobjects.nib \ Resources/Spanish.lproj/main.nib/keyedobjects-110000.nib \ Resources/sv.lproj/Localizable.strings \ Resources/sv.lproj/locversion.plist \ Resources/sv.lproj/main.nib/designable.nib \ Resources/sv.lproj/main.nib/keyedobjects.nib \ Resources/sv.lproj/main.nib/keyedobjects-110000.nib \ Resources/th.lproj/Localizable.strings \ Resources/th.lproj/locversion.plist \ Resources/th.lproj/main.nib/designable.nib \ Resources/th.lproj/main.nib/keyedobjects.nib \ Resources/th.lproj/main.nib/keyedobjects-110000.nib \ Resources/tr.lproj/Localizable.strings \ Resources/tr.lproj/locversion.plist \ Resources/tr.lproj/main.nib/designable.nib \ Resources/tr.lproj/main.nib/keyedobjects.nib \ Resources/tr.lproj/main.nib/keyedobjects-110000.nib \ Resources/uk.lproj/Localizable.strings \ Resources/uk.lproj/locversion.plist \ Resources/uk.lproj/main.nib/designable.nib \ Resources/uk.lproj/main.nib/keyedobjects.nib \ Resources/uk.lproj/main.nib/keyedobjects-110000.nib \ Resources/X11.icns \ Resources/zh_CN.lproj/Localizable.strings \ Resources/zh_CN.lproj/locversion.plist \ Resources/zh_CN.lproj/main.nib/designable.nib \ Resources/zh_CN.lproj/main.nib/keyedobjects.nib \ Resources/zh_CN.lproj/main.nib/keyedobjects-110000.nib \ Resources/zh_TW.lproj/Localizable.strings \ Resources/zh_TW.lproj/locversion.plist \ Resources/zh_TW.lproj/main.nib/designable.nib \ Resources/zh_TW.lproj/main.nib/keyedobjects.nib \ Resources/zh_TW.lproj/main.nib/keyedobjects-110000.nib all: all-am .SUFFIXES: .SUFFIXES: .cpp $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/cpprules.in $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/bundle/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/bundle/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(srcdir)/cpprules.in $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-data-am install-strip uninstall-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-hook install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-hook .PRECIOUS: Makefile .cpp: $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ install-data-hook: $(srcdir)/mk_bundke.sh $(srcdir) $(builddir) $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app install uninstall-hook: $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Resources $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/Info.plist $(RM) -rf $(DESTDIR)$(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/PkgInfo # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/bundle/cpprules.in0000644000175000017500000000164714757411105015435 # Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM # to cpp, because that trick does not work on all ANSI C preprocessors. # Delete line numbers from the cpp output (-P is not portable, I guess). # Allow XCOMM to be preceded by whitespace and provide a means of generating # output lines with trailing backslashes. # Allow XHASH to always be substituted, even in cases where XCOMM isn't. CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ -e '/^\#line *[0-9][0-9]* *.*$$/d' \ -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ -e '/^[ ]*XHASH/s/XHASH/\#/' \ -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ -e '/\@\@$$/s/\@\@$$/\\/' SUFFIXES = .cpp .cpp: $(AM_V_GEN)$(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ xorg-server-21.1.16/hw/xquartz/bundle/chown-bundle.sh0000755000175000017500000000014014757411105016157 #!/bin/sh BUNDLE_ROOT=$1 if [[ $(id -u) == 0 ]] ; then chown -R root:admin ${BUNDLE_ROOT} fi xorg-server-21.1.16/hw/xquartz/bundle/mk_bundke.sh0000755000175000017500000000235214757411105015540 #!/bin/sh # # 'Cause xcodebuild is hard to deal with SRCDIR=$1 BUILDDIR=$2 BUNDLE_ROOT=$3 localities="Dutch English French German Italian Japanese Spanish ar ca cs da el fi he hr hu ko no pl pt pt_PT ro ru sk sv th tr uk zh_CN zh_TW" for lang in ${localities} ; do [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj ] && rm -rf ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj mkdir -p ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib [ -d ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/main.nib ] || exit 1 for f in Localizable.strings main.nib/keyedobjects.nib main.nib/keyedobjects-110000.nib ; do install -m 644 ${SRCDIR}/Resources/${lang}.lproj/$f ${BUNDLE_ROOT}/Contents/Resources/${lang}.lproj/${f} done done install -m 644 ${SRCDIR}/Resources/English.lproj/main.nib/designable.nib ${BUNDLE_ROOT}/Contents/Resources/English.lproj/main.nib install -m 644 ${SRCDIR}/Resources/X11.icns ${BUNDLE_ROOT}/Contents/Resources install -m 644 ${BUILDDIR}/Info.plist ${BUNDLE_ROOT}/Contents install -m 644 ${SRCDIR}/PkgInfo ${BUNDLE_ROOT}/Contents mkdir -p ${BUNDLE_ROOT}/Contents/MacOS install -m 755 ${SRCDIR}/X11.sh ${BUNDLE_ROOT}/Contents/MacOS if [[ $(id -u) == 0 ]] ; then chown -R root:admin ${BUNDLE_ROOT} fi xorg-server-21.1.16/hw/xquartz/bundle/X11.sh0000755000175000017500000000066214757411105014154 #!/bin/bash set "$(dirname "$0")"/X11.bin "${@}" if [ -x ~/.x11run ]; then exec ~/.x11run "${@}" fi case $(basename "${SHELL}") in bash) exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;; ksh|sh|zsh) exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;; csh|tcsh) exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;; es|rc) exec -l "${SHELL}" -l -c 'exec $*' "${@}" ;; *) exec "${@}" ;; esac xorg-server-21.1.16/hw/xquartz/bundle/Info.plist.cpp0000644000175000017500000000606114757411105015774 CFBundleDevelopmentRegion English CFBundleExecutable X11 CFBundleGetInfoString BUNDLE_ID_PREFIX.X11 CFBundleIconFile X11.icns CFBundleIdentifier BUNDLE_ID_PREFIX.X11 CFBundleInfoDictionaryVersion 6.0 CFBundleName APPLE_APPLICATION_NAME CFBundlePackageType APPL CFBundleShortVersionString BUNDLE_VERSION_STRING CFBundleVersion BUNDLE_VERSION CFBundleSignature x11a CSResourcesFileMapped NSSupportsAutomaticGraphicsSwitching NSAppleEventsUsageDescription A process launched by APPLE_APPLICATION_NAME wants to use AppleScript. NSCalendarsUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your calendar data. NSCameraUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your camera. NSContactsUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your contacts. NSLocationAlwaysUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your location information, even when not in use. NSLocationUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your location information. NSLocationWhenInUseUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your location information when in use. NSMicrophoneUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your microphone. NSRemindersUsageDescription A process launched by APPLE_APPLICATION_NAME wants access to your reminders. NSSystemAdministrationUsageDescription A process launched by APPLE_APPLICATION_NAME wants admin privileges. #ifdef XQUARTZ_SPARKLE SUEnableAutomaticChecks SUPublicEDKey XQUARTZ_SPARKLE_PUBLIC_EDKEY SUFeedURL XQUARTZ_SPARKLE_FEED_URL #endif LSApplicationCategoryType public.app-category.utilities NSHumanReadableCopyright © 2003-2023 Apple Inc. © 2003 XFree86 Project, Inc. © 2003-2023 X.org Foundation, Inc. NSMainNibFile main NSPrincipalClass X11Application xorg-server-21.1.16/hw/xquartz/bundle/PkgInfo0000644000175000017500000000001014757411105014507 APPLx11axorg-server-21.1.16/hw/xquartz/GL/0000755000175000017500000000000014757411136012355 5xorg-server-21.1.16/hw/xquartz/GL/meson.build0000644000175000017500000000031214757411105014427 libcglcore = static_library('CGLCore', ['indirect.c', 'capabilities.c', 'visualConfigs.c'], include_directories: [inc, glx_inc, '..', '../xpr'], dependencies: [xproto_dep, pixman_dep], ) xorg-server-21.1.16/hw/xquartz/GL/Makefile.am0000644000175000017500000000054114757411105014325 noinst_LTLIBRARIES = libCGLCore.la AM_CFLAGS = $(DIX_CFLAGS) $(GL_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/glx \ -I$(top_srcdir)/hw/xquartz \ -I$(top_srcdir)/hw/xquartz/xpr \ -I$(top_srcdir)/miext/damage libCGLCore_la_SOURCES = \ indirect.c \ capabilities.c \ visualConfigs.c EXTRA_DIST = \ capabilities.h \ visualConfigs.h xorg-server-21.1.16/hw/xquartz/GL/Makefile.in0000644000175000017500000006212114757411115014341 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xquartz/GL ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libCGLCore_la_LIBADD = am_libCGLCore_la_OBJECTS = indirect.lo capabilities.lo \ visualConfigs.lo libCGLCore_la_OBJECTS = $(am_libCGLCore_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/capabilities.Plo \ ./$(DEPDIR)/indirect.Plo ./$(DEPDIR)/visualConfigs.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libCGLCore_la_SOURCES) DIST_SOURCES = $(libCGLCore_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libCGLCore.la AM_CFLAGS = $(DIX_CFLAGS) $(GL_CFLAGS) AM_CPPFLAGS = \ -I$(top_srcdir) \ -I$(top_srcdir)/glx \ -I$(top_srcdir)/hw/xquartz \ -I$(top_srcdir)/hw/xquartz/xpr \ -I$(top_srcdir)/miext/damage libCGLCore_la_SOURCES = \ indirect.c \ capabilities.c \ visualConfigs.c EXTRA_DIST = \ capabilities.h \ visualConfigs.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/GL/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/GL/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libCGLCore.la: $(libCGLCore_la_OBJECTS) $(libCGLCore_la_DEPENDENCIES) $(EXTRA_libCGLCore_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libCGLCore_la_OBJECTS) $(libCGLCore_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capabilities.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/visualConfigs.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/capabilities.Plo -rm -f ./$(DEPDIR)/indirect.Plo -rm -f ./$(DEPDIR)/visualConfigs.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/capabilities.Plo -rm -f ./$(DEPDIR)/indirect.Plo -rm -f ./$(DEPDIR)/visualConfigs.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/GL/indirect.c0000644000175000017500000004437214757411105014250 /* * GLX implementation that uses Apple's OpenGL.framework * (Indirect rendering path -- it's also used for some direct mode code too) * * Copyright (c) 2007-2012 Apple Inc. * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Greg Parker. All Rights Reserved. * * Portions of this file are copied from Mesa's xf86glx.c, * which contains the following copyright: * * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include /* Just to prevent glxserver.h from loading mesa's and colliding with OpenGL.h */ #include #include #include #include #include "x-hash.h" #include "visualConfigs.h" #include "dri.h" #include "extension_string.h" #include "darwin.h" #define GLAQUA_DEBUG_MSG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "GLXAqua", \ msg, \ ## args) __GLXprovider * GlxGetDRISWrastProvider(void); static void setup_dispatch_table(void); GLuint __glFloorLog2(GLuint val); void warn_func(void * p1, char *format, ...); // some prototypes static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen); static __GLXdrawable * __glXAquaScreenCreateDrawable(ClientPtr client, __GLXscreen *screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig *conf); static void __glXAquaContextDestroy(__GLXcontext *baseContext); static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext); static int __glXAquaContextLoseCurrent(__GLXcontext *baseContext); static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, unsigned long mask); static CGLPixelFormatObj makeFormat(__GLXconfig *conf); __GLXprovider __glXDRISWRastProvider = { __glXAquaScreenProbe, "Core OpenGL", NULL }; typedef struct __GLXAquaScreen __GLXAquaScreen; typedef struct __GLXAquaContext __GLXAquaContext; typedef struct __GLXAquaDrawable __GLXAquaDrawable; /* * The following structs must keep the base as the first member. * It's used to treat the start of the struct as a different struct * in GLX. * * Note: these structs should be initialized with xcalloc or memset * prior to usage, and some of them require initializing * the base with function pointers. */ struct __GLXAquaScreen { __GLXscreen base; }; struct __GLXAquaContext { __GLXcontext base; CGLContextObj ctx; CGLPixelFormatObj pixelFormat; xp_surface_id sid; unsigned isAttached : 1; }; struct __GLXAquaDrawable { __GLXdrawable base; DrawablePtr pDraw; xp_surface_id sid; __GLXAquaContext *context; }; static __GLXcontext * __glXAquaScreenCreateContext(__GLXscreen *screen, __GLXconfig *conf, __GLXcontext *baseShareContext, unsigned num_attribs, const uint32_t *attribs, int *error) { __GLXAquaContext *context; __GLXAquaContext *shareContext = (__GLXAquaContext *)baseShareContext; CGLError gl_err; /* Unused (for now?) */ (void)num_attribs; (void)attribs; (void)error; GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n"); context = calloc(1, sizeof(__GLXAquaContext)); if (context == NULL) return NULL; memset(context, 0, sizeof *context); context->base.pGlxScreen = screen; context->base.config = conf; context->base.destroy = __glXAquaContextDestroy; context->base.makeCurrent = __glXAquaContextMakeCurrent; context->base.loseCurrent = __glXAquaContextLoseCurrent; context->base.copy = __glXAquaContextCopy; /*FIXME verify that the context->base is fully initialized. */ context->pixelFormat = makeFormat(conf); if (!context->pixelFormat) { free(context); return NULL; } context->ctx = NULL; gl_err = CGLCreateContext(context->pixelFormat, shareContext ? shareContext->ctx : NULL, &context->ctx); if (gl_err != 0) { ErrorF("CGLCreateContext error: %s\n", CGLErrorString(gl_err)); CGLDestroyPixelFormat(context->pixelFormat); free(context); return NULL; } setup_dispatch_table(); GLAQUA_DEBUG_MSG("glAquaCreateContext done\n"); return &context->base; } /* maps from surface id -> list of __GLcontext */ static x_hash_table *surface_hash; static void __glXAquaContextDestroy(__GLXcontext *baseContext) { x_list *lst; __GLXAquaContext *context = (__GLXAquaContext *)baseContext; GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx %p)\n", baseContext); if (context != NULL) { if (context->sid != 0 && surface_hash != NULL) { lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr( context->sid), NULL); lst = x_list_remove(lst, context); x_hash_table_insert(surface_hash, x_cvt_uint_to_vptr( context->sid), lst); } if (context->ctx != NULL) CGLDestroyContext(context->ctx); if (context->pixelFormat != NULL) CGLDestroyPixelFormat(context->pixelFormat); free(context); } } static int __glXAquaContextLoseCurrent(__GLXcontext *baseContext) { CGLError gl_err; GLAQUA_DEBUG_MSG("glAquaLoseCurrent (ctx 0x%p)\n", baseContext); gl_err = CGLSetCurrentContext(NULL); if (gl_err != 0) ErrorF("CGLSetCurrentContext error: %s\n", CGLErrorString(gl_err)); /* * There should be no need to set __glXLastContext to NULL here, because * glxcmds.c does it as part of the context cache flush after calling * this. */ return GL_TRUE; } /* Called when a surface is destroyed as a side effect of destroying the window it's attached to. */ static void surface_notify(void *_arg, void *data) { DRISurfaceNotifyArg *arg = (DRISurfaceNotifyArg *)_arg; __GLXAquaDrawable *draw = (__GLXAquaDrawable *)data; __GLXAquaContext *context; x_list *lst; if (_arg == NULL || data == NULL) { ErrorF("surface_notify called with bad params"); return; } GLAQUA_DEBUG_MSG("surface_notify(%p, %p)\n", _arg, data); switch (arg->kind) { case AppleDRISurfaceNotifyDestroyed: if (surface_hash != NULL) x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(arg->id)); draw->pDraw = NULL; draw->sid = 0; break; case AppleDRISurfaceNotifyChanged: if (surface_hash != NULL) { lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr( arg->id), NULL); for (; lst != NULL; lst = lst->next) { context = lst->data; xp_update_gl_context(context->ctx); } } break; default: ErrorF("surface_notify: unknown kind %d\n", arg->kind); break; } } static BOOL attach(__GLXAquaContext *context, __GLXAquaDrawable *draw) { DrawablePtr pDraw; GLAQUA_DEBUG_MSG("attach(%p, %p)\n", context, draw); if (NULL == context || NULL == draw) return TRUE; pDraw = draw->base.pDraw; if (NULL == pDraw) { ErrorF("%s:%s() pDraw is NULL!\n", __FILE__, __func__); return TRUE; } if (draw->sid == 0) { //if (!quartzProcs->CreateSurface(pDraw->pScreen, pDraw->id, pDraw, if (!DRICreateSurface(pDraw->pScreen, pDraw->id, pDraw, 0, &draw->sid, NULL, surface_notify, draw)) return TRUE; draw->pDraw = pDraw; } if (!context->isAttached || context->sid != draw->sid) { x_list *lst; if (xp_attach_gl_context(context->ctx, draw->sid) != Success) { //quartzProcs->DestroySurface(pDraw->pScreen, pDraw->id, pDraw, DRIDestroySurface(pDraw->pScreen, pDraw->id, pDraw, surface_notify, draw); if (surface_hash != NULL) x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(draw->sid)); draw->sid = 0; return TRUE; } context->isAttached = TRUE; context->sid = draw->sid; if (surface_hash == NULL) surface_hash = x_hash_table_new(NULL, NULL, NULL, NULL); lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr( context->sid), NULL); if (x_list_find(lst, context) == NULL) { lst = x_list_prepend(lst, context); x_hash_table_insert(surface_hash, x_cvt_uint_to_vptr( context->sid), lst); } GLAQUA_DEBUG_MSG("attached 0x%x to 0x%x\n", (unsigned int)pDraw->id, (unsigned int)draw->sid); } draw->context = context; return FALSE; } #if 0 // unused static void unattach(__GLXAquaContext *context) { x_list *lst; GLAQUA_DEBUG_MSG("unattach\n"); if (context == NULL) { ErrorF("Tried to unattach a null context\n"); return; } if (context->isAttached) { GLAQUA_DEBUG_MSG("unattaching\n"); if (surface_hash != NULL) { lst = x_hash_table_lookup(surface_hash, (void *)context->sid, NULL); lst = x_list_remove(lst, context); x_hash_table_insert(surface_hash, (void *)context->sid, lst); } CGLClearDrawable(context->ctx); context->isAttached = FALSE; context->sid = 0; } } #endif static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext) { CGLError gl_err; __GLXAquaContext *context = (__GLXAquaContext *)baseContext; __GLXAquaDrawable *drawPriv = (__GLXAquaDrawable *)context->base.drawPriv; GLAQUA_DEBUG_MSG("glAquaMakeCurrent (ctx 0x%p)\n", baseContext); if (context->base.drawPriv != context->base.readPriv) return 0; if (attach(context, drawPriv)) return /*error*/ 0; gl_err = CGLSetCurrentContext(context->ctx); if (gl_err != 0) ErrorF("CGLSetCurrentContext error: %s\n", CGLErrorString(gl_err)); return gl_err == 0; } static int __glXAquaContextCopy(__GLXcontext *baseDst, __GLXcontext *baseSrc, unsigned long mask) { CGLError gl_err; __GLXAquaContext *dst = (__GLXAquaContext *)baseDst; __GLXAquaContext *src = (__GLXAquaContext *)baseSrc; GLAQUA_DEBUG_MSG("GLXAquaContextCopy\n"); gl_err = CGLCopyContext(src->ctx, dst->ctx, mask); if (gl_err != 0) ErrorF("CGLCopyContext error: %s\n", CGLErrorString(gl_err)); return gl_err == 0; } /* Drawing surface notification callbacks */ static GLboolean __glXAquaDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base) { CGLError err; __GLXAquaDrawable *drawable; // GLAQUA_DEBUG_MSG("glAquaDrawableSwapBuffers(%p)\n",base); if (!base) { ErrorF("%s passed NULL\n", __func__); return GL_FALSE; } drawable = (__GLXAquaDrawable *)base; if (NULL == drawable->context) { ErrorF("%s called with a NULL->context for drawable %p!\n", __func__, (void *)drawable); return GL_FALSE; } err = CGLFlushDrawable(drawable->context->ctx); if (kCGLNoError != err) { ErrorF("CGLFlushDrawable error: %s in %s\n", CGLErrorString(err), __func__); return GL_FALSE; } return GL_TRUE; } static CGLPixelFormatObj makeFormat(__GLXconfig *conf) { CGLPixelFormatAttribute attr[64]; CGLPixelFormatObj fobj; GLint formats; CGLError error; int i = 0; if (conf->doubleBufferMode) attr[i++] = kCGLPFADoubleBuffer; if (conf->stereoMode) attr[i++] = kCGLPFAStereo; attr[i++] = kCGLPFAColorSize; attr[i++] = conf->redBits + conf->greenBits + conf->blueBits; attr[i++] = kCGLPFAAlphaSize; attr[i++] = conf->alphaBits; if ((conf->accumRedBits + conf->accumGreenBits + conf->accumBlueBits + conf->accumAlphaBits) > 0) { attr[i++] = kCGLPFAAccumSize; attr[i++] = conf->accumRedBits + conf->accumGreenBits + conf->accumBlueBits + conf->accumAlphaBits; } attr[i++] = kCGLPFADepthSize; attr[i++] = conf->depthBits; if (conf->stencilBits) { attr[i++] = kCGLPFAStencilSize; attr[i++] = conf->stencilBits; } if (conf->numAuxBuffers > 0) { attr[i++] = kCGLPFAAuxBuffers; attr[i++] = conf->numAuxBuffers; } if (conf->sampleBuffers > 0) { attr[i++] = kCGLPFASampleBuffers; attr[i++] = conf->sampleBuffers; attr[i++] = kCGLPFASamples; attr[i++] = conf->samples; } attr[i] = 0; error = CGLChoosePixelFormat(attr, &fobj, &formats); if (error) { ErrorF("error: creating pixel format %s\n", CGLErrorString(error)); return NULL; } return fobj; } static void __glXAquaScreenDestroy(__GLXscreen *screen) { GLAQUA_DEBUG_MSG("glXAquaScreenDestroy(%p)\n", screen); __glXScreenDestroy(screen); free(screen); } /* This is called by __glXInitScreens(). */ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { __GLXAquaScreen *screen; GLAQUA_DEBUG_MSG("glXAquaScreenProbe\n"); if (pScreen == NULL) return NULL; screen = calloc(1, sizeof *screen); if (NULL == screen) return NULL; screen->base.destroy = __glXAquaScreenDestroy; screen->base.createContext = __glXAquaScreenCreateContext; screen->base.createDrawable = __glXAquaScreenCreateDrawable; screen->base.swapInterval = /*FIXME*/ NULL; screen->base.pScreen = pScreen; screen->base.fbconfigs = __glXAquaCreateVisualConfigs( &screen->base.numFBConfigs, pScreen->myNum); __glXInitExtensionEnableBits(screen->base.glx_enable_bits); __glXScreenInit(&screen->base, pScreen); return &screen->base; } #if 0 // unused static void __glXAquaDrawableCopySubBuffer(__GLXdrawable *drawable, int x, int y, int w, int h) { /*TODO finish me*/ } #endif static void __glXAquaDrawableDestroy(__GLXdrawable *base) { /* gstaplin: base is the head of the structure, so it's at the same * offset in memory. * Is this safe with strict aliasing? I noticed that the other dri code * does this too... */ __GLXAquaDrawable *glxPriv = (__GLXAquaDrawable *)base; GLAQUA_DEBUG_MSG("TRACE"); /* It doesn't work to call DRIDestroySurface here, the drawable's already gone.. But dri.c notices the window destruction and frees the surface itself. */ /*gstaplin: verify the statement above. The surface destroy *messages weren't making it through, and may still not be. *We need a good test case for surface creation and destruction. *We also need a good way to enable introspection on the server *to validate the test, beyond using gdb with print. */ free(glxPriv); } static __GLXdrawable * __glXAquaScreenCreateDrawable(ClientPtr client, __GLXscreen *screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig *conf) { __GLXAquaDrawable *glxPriv; glxPriv = malloc(sizeof *glxPriv); if (glxPriv == NULL) return NULL; memset(glxPriv, 0, sizeof *glxPriv); if (!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) { free(glxPriv); return NULL; } glxPriv->base.destroy = __glXAquaDrawableDestroy; glxPriv->base.swapBuffers = __glXAquaDrawableSwapBuffers; glxPriv->base.copySubBuffer = NULL; /* __glXAquaDrawableCopySubBuffer; */ glxPriv->pDraw = pDraw; glxPriv->sid = 0; glxPriv->context = NULL; return &glxPriv->base; } // Extra goodies for glx GLuint __glFloorLog2(GLuint val) { int c = 0; while (val > 1) { c++; val >>= 1; } return c; } #ifndef OPENGL_FRAMEWORK_PATH #define OPENGL_FRAMEWORK_PATH \ "/System/Library/Frameworks/OpenGL.framework/OpenGL" #endif static void *opengl_framework_handle; static glx_func_ptr get_proc_address(const char *sym) { return (glx_func_ptr) dlsym(opengl_framework_handle, sym); } static void setup_dispatch_table(void) { const char *opengl_framework_path; if (opengl_framework_handle) { return; } opengl_framework_path = getenv("OPENGL_FRAMEWORK_PATH"); if (!opengl_framework_path) { opengl_framework_path = OPENGL_FRAMEWORK_PATH; } (void)dlerror(); /*drain dlerror */ opengl_framework_handle = dlopen(opengl_framework_path, RTLD_LOCAL); if (!opengl_framework_handle) { ErrorF("unable to dlopen %s : %s, using RTLD_DEFAULT\n", opengl_framework_path, dlerror()); opengl_framework_handle = RTLD_DEFAULT; } __glXsetGetProcAddress(get_proc_address); } xorg-server-21.1.16/hw/xquartz/GL/capabilities.c0000644000175000017500000003244214757411105015073 /* * Copyright (c) 2008-2012 Apple Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #define Cursor Mac_Cursor #define BOOL Mac_BOOL #include #include #include #include #include #undef Cursor #undef BOOL #include "capabilities.h" #include "os.h" static void handleBufferModes(struct glCapabilitiesConfig *c, GLint bufferModes) { if (bufferModes & kCGLStereoscopicBit) { c->stereo = true; } if (bufferModes & kCGLDoubleBufferBit) { c->buffers = 2; } else { c->buffers = 1; } } static void handleStencilModes(struct glCapabilitiesConfig *c, GLint smodes) { int offset = 0; if (kCGL0Bit & smodes) c->stencil_bit_depths[offset++] = 0; if (kCGL1Bit & smodes) c->stencil_bit_depths[offset++] = 1; if (kCGL2Bit & smodes) c->stencil_bit_depths[offset++] = 2; if (kCGL3Bit & smodes) c->stencil_bit_depths[offset++] = 3; if (kCGL4Bit & smodes) c->stencil_bit_depths[offset++] = 4; if (kCGL5Bit & smodes) c->stencil_bit_depths[offset++] = 5; if (kCGL6Bit & smodes) c->stencil_bit_depths[offset++] = 6; if (kCGL8Bit & smodes) c->stencil_bit_depths[offset++] = 8; if (kCGL10Bit & smodes) c->stencil_bit_depths[offset++] = 10; if (kCGL12Bit & smodes) c->stencil_bit_depths[offset++] = 12; if (kCGL16Bit & smodes) c->stencil_bit_depths[offset++] = 16; if (kCGL24Bit & smodes) c->stencil_bit_depths[offset++] = 24; if (kCGL32Bit & smodes) c->stencil_bit_depths[offset++] = 32; if (kCGL48Bit & smodes) c->stencil_bit_depths[offset++] = 48; if (kCGL64Bit & smodes) c->stencil_bit_depths[offset++] = 64; if (kCGL96Bit & smodes) c->stencil_bit_depths[offset++] = 96; if (kCGL128Bit & smodes) c->stencil_bit_depths[offset++] = 128; assert(offset < GLCAPS_STENCIL_BIT_DEPTH_BUFFERS); c->total_stencil_bit_depths = offset; } static int handleColorAndAccumulation(struct glColorBufCapabilities *c, GLint cmodes, int forAccum) { int offset = 0; /*1*/ if (kCGLRGB444Bit & cmodes) { c[offset].r = 4; c[offset].g = 4; c[offset].b = 4; ++offset; } /*2*/ if (kCGLARGB4444Bit & cmodes) { c[offset].a = 4; c[offset].r = 4; c[offset].g = 4; c[offset].b = 4; c[offset].is_argb = true; ++offset; } /*3*/ if (kCGLRGB444A8Bit & cmodes) { c[offset].r = 4; c[offset].g = 4; c[offset].b = 4; c[offset].a = 8; ++offset; } /*4*/ if (kCGLRGB555Bit & cmodes) { c[offset].r = 5; c[offset].g = 5; c[offset].b = 5; ++offset; } /*5*/ if (kCGLARGB1555Bit & cmodes) { c[offset].a = 1; c[offset].r = 5; c[offset].g = 5; c[offset].b = 5; c[offset].is_argb = true; ++offset; } /*6*/ if (kCGLRGB555A8Bit & cmodes) { c[offset].r = 5; c[offset].g = 5; c[offset].b = 5; c[offset].a = 8; ++offset; } /*7*/ if (kCGLRGB565Bit & cmodes) { c[offset].r = 5; c[offset].g = 6; c[offset].b = 5; ++offset; } /*8*/ if (kCGLRGB565A8Bit & cmodes) { c[offset].r = 5; c[offset].g = 6; c[offset].b = 5; c[offset].a = 8; ++offset; } /*9*/ if (kCGLRGB888Bit & cmodes) { c[offset].r = 8; c[offset].g = 8; c[offset].b = 8; ++offset; } /*10*/ if (kCGLARGB8888Bit & cmodes) { c[offset].a = 8; c[offset].r = 8; c[offset].g = 8; c[offset].b = 8; c[offset].is_argb = true; ++offset; } /*11*/ if (kCGLRGB888A8Bit & cmodes) { c[offset].r = 8; c[offset].g = 8; c[offset].b = 8; c[offset].a = 8; ++offset; } if (forAccum) { //#if 0 /* FIXME * Disable this path, because some part of libGL, X, or Xplugin * doesn't work with sizes greater than 8. * When this is enabled and visuals are chosen using depths * such as 16, the result is that the windows don't redraw * and are often white, until a resize. */ /*12*/ if (kCGLRGB101010Bit & cmodes) { c[offset].r = 10; c[offset].g = 10; c[offset].b = 10; ++offset; } /*13*/ if (kCGLARGB2101010Bit & cmodes) { c[offset].a = 2; c[offset].r = 10; c[offset].g = 10; c[offset].b = 10; c[offset].is_argb = true; ++offset; } /*14*/ if (kCGLRGB101010_A8Bit & cmodes) { c[offset].r = 10; c[offset].g = 10; c[offset].b = 10; c[offset].a = 8; ++offset; } /*15*/ if (kCGLRGB121212Bit & cmodes) { c[offset].r = 12; c[offset].g = 12; c[offset].b = 12; ++offset; } /*16*/ if (kCGLARGB12121212Bit & cmodes) { c[offset].a = 12; c[offset].r = 12; c[offset].g = 12; c[offset].b = 12; c[offset].is_argb = true; ++offset; } /*17*/ if (kCGLRGB161616Bit & cmodes) { c[offset].r = 16; c[offset].g = 16; c[offset].b = 16; ++offset; } /*18*/ if (kCGLRGBA16161616Bit & cmodes) { c[offset].r = 16; c[offset].g = 16; c[offset].b = 16; c[offset].a = 16; ++offset; } } //#endif /* FIXME should we handle the floating point color modes, and if so, how? */ return offset; } static void handleColorModes(struct glCapabilitiesConfig *c, GLint cmodes) { c->total_color_buffers = handleColorAndAccumulation(c->color_buffers, cmodes, 0); assert(c->total_color_buffers < GLCAPS_COLOR_BUFFERS); } static void handleAccumulationModes(struct glCapabilitiesConfig *c, GLint cmodes) { c->total_accum_buffers = handleColorAndAccumulation(c->accum_buffers, cmodes, 1); assert(c->total_accum_buffers < GLCAPS_COLOR_BUFFERS); } static void handleDepthModes(struct glCapabilitiesConfig *c, GLint dmodes) { int offset = 0; #define DEPTH(flag, value) do { \ if (dmodes & flag) { \ c->depth_buffers[offset++] = value; \ } \ } while (0) /*1*/ DEPTH(kCGL0Bit, 0); /*2*/ DEPTH(kCGL1Bit, 1); /*3*/ DEPTH(kCGL2Bit, 2); /*4*/ DEPTH(kCGL3Bit, 3); /*5*/ DEPTH(kCGL4Bit, 4); /*6*/ DEPTH(kCGL5Bit, 5); /*7*/ DEPTH(kCGL6Bit, 6); /*8*/ DEPTH(kCGL8Bit, 8); /*9*/ DEPTH(kCGL10Bit, 10); /*10*/ DEPTH(kCGL12Bit, 12); /*11*/ DEPTH(kCGL16Bit, 16); /*12*/ DEPTH(kCGL24Bit, 24); /*13*/ DEPTH(kCGL32Bit, 32); /*14*/ DEPTH(kCGL48Bit, 48); /*15*/ DEPTH(kCGL64Bit, 64); /*16*/ DEPTH(kCGL96Bit, 96); /*17*/ DEPTH(kCGL128Bit, 128); #undef DEPTH c->total_depth_buffer_depths = offset; assert(c->total_depth_buffer_depths < GLCAPS_DEPTH_BUFFERS); } /* Return non-zero if an error occurred. */ static CGLError handleRendererDescriptions(CGLRendererInfoObj info, GLint r, struct glCapabilitiesConfig *c) { CGLError err; GLint accelerated = 0, flags = 0, aux = 0, samplebufs = 0, samples = 0; err = CGLDescribeRenderer(info, r, kCGLRPAccelerated, &accelerated); if (err) return err; c->accelerated = accelerated; /* Buffering modes: single/double, stereo */ err = CGLDescribeRenderer(info, r, kCGLRPBufferModes, &flags); if (err) return err; handleBufferModes(c, flags); /* AUX buffers */ err = CGLDescribeRenderer(info, r, kCGLRPMaxAuxBuffers, &aux); if (err) return err; c->aux_buffers = aux; /* Depth buffer size */ err = CGLDescribeRenderer(info, r, kCGLRPDepthModes, &flags); if (err) return err; handleDepthModes(c, flags); /* Multisample buffers */ err = CGLDescribeRenderer(info, r, kCGLRPMaxSampleBuffers, &samplebufs); if (err) return err; c->multisample_buffers = samplebufs; /* Multisample samples per multisample buffer */ err = CGLDescribeRenderer(info, r, kCGLRPMaxSamples, &samples); if (err) return err; c->multisample_samples = samples; /* Stencil bit depths */ err = CGLDescribeRenderer(info, r, kCGLRPStencilModes, &flags); if (err) return err; handleStencilModes(c, flags); /* Color modes (RGB/RGBA depths supported */ err = CGLDescribeRenderer(info, r, kCGLRPColorModes, &flags); if (err) return err; handleColorModes(c, flags); err = CGLDescribeRenderer(info, r, kCGLRPAccumModes, &flags); if (err) return err; handleAccumulationModes(c, flags); return kCGLNoError; } static void initCapabilities(struct glCapabilities *cap) { cap->configurations = NULL; cap->total_configurations = 0; } static void initConfig(struct glCapabilitiesConfig *c) { int i; c->accelerated = false; c->stereo = false; c->aux_buffers = 0; c->buffers = 0; c->total_depth_buffer_depths = 0; for (i = 0; i < GLCAPS_DEPTH_BUFFERS; ++i) { c->depth_buffers[i] = GLCAPS_INVALID_DEPTH_VALUE; } c->multisample_buffers = 0; c->multisample_samples = 0; c->total_stencil_bit_depths = 0; for (i = 0; i < GLCAPS_STENCIL_BIT_DEPTH_BUFFERS; ++i) { c->stencil_bit_depths[i] = GLCAPS_INVALID_STENCIL_DEPTH; } c->total_color_buffers = 0; for (i = 0; i < GLCAPS_COLOR_BUFFERS; ++i) { c->color_buffers[i].r = c->color_buffers[i].g = c->color_buffers[i].b = c->color_buffers[i].a = GLCAPS_COLOR_BUF_INVALID_VALUE; c->color_buffers[i].is_argb = false; } c->total_accum_buffers = 0; for (i = 0; i < GLCAPS_COLOR_BUFFERS; ++i) { c->accum_buffers[i].r = c->accum_buffers[i].g = c->accum_buffers[i].b = c->accum_buffers[i].a = GLCAPS_COLOR_BUF_INVALID_VALUE; c->accum_buffers[i].is_argb = false; } c->next = NULL; } void freeGlCapabilities(struct glCapabilities *cap) { struct glCapabilitiesConfig *conf, *next; conf = cap->configurations; while (conf) { next = conf->next; free(conf); conf = next; } cap->configurations = NULL; } /* Return true if an error occurred. */ bool getGlCapabilities(struct glCapabilities *cap) { CGLRendererInfoObj info; CGLError err; GLint numRenderers = 0, r; initCapabilities(cap); err = CGLQueryRendererInfo((GLuint) - 1, &info, &numRenderers); if (err) { ErrorF("CGLQueryRendererInfo error: %s\n", CGLErrorString(err)); return err; } for (r = 0; r < numRenderers; r++) { struct glCapabilitiesConfig tmpconf, *conf; initConfig(&tmpconf); err = handleRendererDescriptions(info, r, &tmpconf); if (err) { ErrorF("handleRendererDescriptions returned error: %s\n", CGLErrorString( err)); ErrorF("trying to continue...\n"); continue; } conf = malloc(sizeof(*conf)); if (NULL == conf) { FatalError("Unable to allocate memory for OpenGL capabilities\n"); } /* Copy the struct. */ *conf = tmpconf; /* Now link the configuration into the list. */ conf->next = cap->configurations; cap->configurations = conf; } CGLDestroyRendererInfo(info); /* No error occurred. We are done. */ return kCGLNoError; } xorg-server-21.1.16/hw/xquartz/GL/visualConfigs.c0000644000175000017500000003123314757411105015253 /* * Copyright (c) 2007, 2008 Apple Inc. * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Greg Parker. All Rights Reserved. * * Portions of this file are copied from Mesa's xf86glx.c, * which contains the following copyright: * * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "dri.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "capabilities.h" #include "visualConfigs.h" #include "darwinfb.h" /* Based originally on code from indirect.c which was based on code from i830_dri.c. */ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) { int numConfigs = 0; __GLXconfig *visualConfigs, *c, *l; struct glCapabilities caps; struct glCapabilitiesConfig *conf; int stereo, depth, aux, buffers, stencil, accum, color, msample; if(getGlCapabilities(&caps)) { ErrorF("error from getGlCapabilities()!\n"); return NULL; } /* conf->stereo is 0 or 1, but we need at least 1 iteration of the loop, so we treat a true conf->stereo as 2. The depth size is 0 or 24. Thus we do 2 iterations for that. conf->aux_buffers (when available/non-zero) result in 2 iterations instead of 1. conf->buffers indicates whether we have single or double buffering. conf->total_stencil_bit_depths conf->total_color_buffers indicates the RGB/RGBA color depths. conf->total_accum_buffers iterations for accum (with at least 1 if equal to 0) conf->total_depth_buffer_depths conf->multisample_buffers iterations (with at least 1 if equal to 0). We add 1 for the 0 multisampling config. */ assert(NULL != caps.configurations); numConfigs = 0; for(conf = caps.configurations; conf; conf = conf->next) { if(conf->total_color_buffers <= 0) continue; numConfigs += (conf->stereo ? 2 : 1) * (conf->aux_buffers ? 2 : 1) * conf->buffers * ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1) * conf->total_color_buffers * ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1) * conf->total_depth_buffer_depths * (conf->multisample_buffers + 1); } if(numConfigsPtr) *numConfigsPtr = numConfigs; /* Note that as of 1.20.0, we cannot allocate all the configs at once. * __glXScreenDestroy now walks all the fbconfigs and frees them one at a time. * See 4b0a3cbab131eb453e2b3fc0337121969258a7be. */ visualConfigs = calloc(sizeof(*visualConfigs), 1); l = NULL; c = visualConfigs; /* current buffer */ for(conf = caps.configurations; conf; conf = conf->next) { for(stereo = 0; stereo < (conf->stereo ? 2 : 1); ++stereo) { for(aux = 0; aux < (conf->aux_buffers ? 2 : 1); ++aux) { for(buffers = 0; buffers < conf->buffers; ++buffers) { for(stencil = 0; stencil < ((conf->total_stencil_bit_depths > 0) ? conf->total_stencil_bit_depths : 1); ++stencil) { for(color = 0; color < conf->total_color_buffers; ++color) { for(accum = 0; accum < ((conf->total_accum_buffers > 0) ? conf->total_accum_buffers : 1); ++accum) { for(depth = 0; depth < conf->total_depth_buffer_depths; ++depth) { for(msample = 0; msample < (conf->multisample_buffers + 1); ++msample) { // Global c->visualID = -1; c->visualType = GLX_TRUE_COLOR; c->next = calloc(sizeof(*visualConfigs), 1); assert(c->next); c->level = 0; c->indexBits = 0; if(conf->accelerated) { c->visualRating = GLX_NONE; } else { c->visualRating = GLX_SLOW_VISUAL_EXT; } c->transparentPixel = GLX_NONE; c->transparentRed = GLX_NONE; c->transparentGreen = GLX_NONE; c->transparentBlue = GLX_NONE; c->transparentAlpha = GLX_NONE; c->transparentIndex = GLX_NONE; c->visualSelectGroup = 0; c->swapMethod = GLX_SWAP_UNDEFINED_OML; // Stereo c->stereoMode = stereo ? TRUE : FALSE; // Aux buffers c->numAuxBuffers = aux ? conf->aux_buffers : 0; // Double Buffered c->doubleBufferMode = buffers ? TRUE : FALSE; // Stencil Buffer if(conf->total_stencil_bit_depths > 0) { c->stencilBits = conf->stencil_bit_depths[stencil]; } else { c->stencilBits = 0; } // Color if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->color_buffers[color].a) { c->alphaBits = conf->color_buffers[color].a; } else { c->alphaBits = 0; } c->redBits = conf->color_buffers[color].r; c->greenBits = conf->color_buffers[color].g; c->blueBits = conf->color_buffers[color].b; c->rgbBits = c->alphaBits + c->redBits + c->greenBits + c->blueBits; c->alphaMask = AM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); c->redMask = RM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); c->greenMask = GM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); c->blueMask = BM_ARGB(c->alphaBits, c->redBits, c->greenBits, c->blueBits); // Accumulation Buffers if(conf->total_accum_buffers > 0) { c->accumRedBits = conf->accum_buffers[accum].r; c->accumGreenBits = conf->accum_buffers[accum].g; c->accumBlueBits = conf->accum_buffers[accum].b; if(GLCAPS_COLOR_BUF_INVALID_VALUE != conf->accum_buffers[accum].a) { c->accumAlphaBits = conf->accum_buffers[accum].a; } else { c->accumAlphaBits = 0; } } else { c->accumRedBits = 0; c->accumGreenBits = 0; c->accumBlueBits = 0; c->accumAlphaBits = 0; } // Depth c->depthBits = conf->depth_buffers[depth]; // MultiSample if(msample > 0) { c->samples = conf->multisample_samples; c->sampleBuffers = conf->multisample_buffers; } else { c->samples = 0; c->sampleBuffers = 0; } /* * The Apple libGL supports GLXPixmaps and * GLXPbuffers in direct mode. */ /* SGIX_fbconfig / GLX 1.3 */ c->drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT | GLX_PBUFFER_BIT; c->renderType = GLX_RGBA_BIT; c->fbconfigID = -1; /* SGIX_pbuffer / GLX 1.3 */ /* * The CGL layer provides a way of retrieving * the maximum pbuffer width/height, but only * if we create a context and call glGetIntegerv. * * The following values are from a test program * that does so. */ c->maxPbufferWidth = 8192; c->maxPbufferHeight = 8192; c->maxPbufferPixels = /*Do we need this?*/ 0; /* * There is no introspection for this sort of thing * with CGL. What should we do realistically? */ c->optimalPbufferWidth = 0; c->optimalPbufferHeight = 0; /* EXT_texture_from_pixmap */ c->bindToTextureRgb = 0; c->bindToTextureRgba = 0; c->bindToMipmapTexture = 0; c->bindToTextureTargets = 0; c->yInverted = 0; /* EXT_framebuffer_sRGB */ c->sRGBCapable = GL_FALSE; l = c; c = c->next; } } } } } } } } } free(c); l->next = NULL; freeGlCapabilities(&caps); return visualConfigs; } xorg-server-21.1.16/hw/xquartz/GL/capabilities.h0000644000175000017500000000442614757411105015101 /* * Copyright (c) 2008-2012 Apple Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifndef CAPABILITIES_H #define CAPABILITIES_H #include enum { GLCAPS_INVALID_STENCIL_DEPTH = -1 }; enum { GLCAPS_COLOR_BUF_INVALID_VALUE = -1 }; enum { GLCAPS_COLOR_BUFFERS = 20 }; enum { GLCAPS_STENCIL_BIT_DEPTH_BUFFERS = 20 }; enum { GLCAPS_DEPTH_BUFFERS = 20 }; enum { GLCAPS_INVALID_DEPTH_VALUE = 1 }; struct glColorBufCapabilities { char r, g, b, a; bool is_argb; }; struct glCapabilitiesConfig { bool accelerated; bool stereo; int aux_buffers; int buffers; int total_depth_buffer_depths; int depth_buffers[GLCAPS_DEPTH_BUFFERS]; int multisample_buffers; int multisample_samples; int total_stencil_bit_depths; char stencil_bit_depths[GLCAPS_STENCIL_BIT_DEPTH_BUFFERS]; int total_color_buffers; struct glColorBufCapabilities color_buffers[GLCAPS_COLOR_BUFFERS]; int total_accum_buffers; struct glColorBufCapabilities accum_buffers[GLCAPS_COLOR_BUFFERS]; struct glCapabilitiesConfig *next; }; struct glCapabilities { struct glCapabilitiesConfig *configurations; int total_configurations; }; bool getGlCapabilities(struct glCapabilities *cap); void freeGlCapabilities(struct glCapabilities *cap); #endif xorg-server-21.1.16/hw/xquartz/GL/visualConfigs.h0000644000175000017500000000235514757411105015263 /* * Copyright (c) 2008 Apple Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifndef VISUAL_CONFIGS_H #define VISUAL_CONFIGS_H __GLXconfig * __glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber); #endif xorg-server-21.1.16/hw/xquartz/mach-startup/0000755000175000017500000000000014757411136014463 5xorg-server-21.1.16/hw/xquartz/mach-startup/meson.build0000644000175000017500000000445114757411105016545 # mach interface mig = find_program('mig') mach_startup = custom_target('mach_startup', command: [mig, '-sheader', '@OUTPUT0@', '-header', '@OUTPUT2@', '-server', '@OUTPUT1@', '-user', '@OUTPUT3@', '@INPUT@'], input: 'mach_startup.defs', output: ['mach_startupServer.h', 'mach_startupServer.c', 'mach_startup.h', 'mach_startupUser.c'], ) mach_startup_dep = declare_dependency( sources: mach_startup[2] # mach_startup.h ) # common defines xquartz_defs = [ bundle_id_def, '-DXSERVER_VERSION="@0@"'.format(meson.project_version()), '-DX11BINDIR="@0@"'.format(join_paths(get_option('prefix'), get_option('bindir'))), ] # X11.bin x11appdir = join_paths(bundle_root, 'Contents/MacOS') x11_bin_deps = [ meson.get_compiler('c').find_library('Xplugin'), dependency('Carbon', method: 'extraframework'), cocoa, dependency('CoreAudio', method: 'extraframework'), dependency('IOKit', method: 'extraframework') ] if build_glx x11_bin_deps += [dependency('OpenGL', method: 'extraframework')] endif if build_sparkle x11_bin_deps += sparkle endif x11_bin_libs = [ libXquartz, libXquartzXpr, libxpbproxy, libxserver_fb, libxserver, libxserver_xkb_stubs, ] if build_glx x11_bin_libs += [libcglcore, libxserver_glx, libglxvnd] endif x11_bin = executable('X11.bin', [ 'bundle-main.c', mach_startup[1], # mach_startupServer.c mach_startup[3], # mach_startupUser.c ], link_with: x11_bin_libs, dependencies: [xproto_dep, x11_bin_deps, mach_startup_dep], include_directories: [inc, '..', top_dir_inc], c_args: xquartz_defs, link_args: ['-Objc'], install: true, install_dir: x11appdir, ) # X11 (Bundle trampoline) x11 = executable('X11', [ 'bundle_trampoline.c', ], c_args: xquartz_defs, link_args: ['-Objc'], install: true, install_dir: x11appdir, ) # Xquartz xquartz_deps = [ dependency('CoreServices', method: 'extraframework'), ] xquartz = executable('Xquartz', [ 'stub.c', 'launchd_fd.c', mach_startup[3], # mach_startupUser.c ], include_directories: inc, c_args: xquartz_defs, dependencies: [xquartz_deps, mach_startup_dep], install: true, ) xorg-server-21.1.16/hw/xquartz/mach-startup/Makefile.am0000644000175000017500000000361014757411105016433 AM_CPPFLAGS = \ -I$(srcdir)/.. \ -I$(top_builddir) \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DX11BINDIR=\"$(bindir)\" AM_CFLAGS = $(DIX_CFLAGS) x11appdir = $(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/MacOS x11app_PROGRAMS = X11.bin X11 dist_X11_bin_SOURCES = \ bundle-main.c dist_X11_SOURCES = \ bundle_trampoline.c nodist_X11_bin_SOURCES = \ mach_startupServer.c \ mach_startupUser.c X11_bin_DEPENDENCIES = \ $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ $(XQUARTZ_LIBS) $(XSERVER_LIBS) # $(XSERVER_SYS_LIBS) is placed here in order to set command line ordering # to work around build issues on Tiger. X11_bin_LDADD = $(X11_bin_DEPENDENCIES) $(XSERVER_SYS_LIBS) X11_bin_LDFLAGS = \ -lXplugin \ -XCClinker -Objc \ -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon \ -Wl,-framework,Cocoa \ -Wl,-framework,CoreAudio \ -Wl,-framework,IOKit if GLX X11_bin_DEPENDENCIES += \ $(top_builddir)/hw/xquartz/GL/libCGLCore.la \ $(top_builddir)/glx/libglxvnd.la \ $(top_builddir)/glx/libglx.la X11_bin_LDFLAGS += \ -Wl,-framework,OpenGL endif if XQUARTZ_SPARKLE X11_bin_LDFLAGS += \ -Wl,-framework,Sparkle endif if RECORD X11_bin_DEPENDENCIES += \ $(top_builddir)/record/librecord.la endif bin_PROGRAMS = Xquartz dist_Xquartz_SOURCES = \ stub.c \ launchd_fd.c nodist_Xquartz_SOURCES = \ mach_startupUser.c Xquartz_LDFLAGS = \ -Wl,-framework,CoreServices if XQUARTZ BUILT_SOURCES = \ mach_startupServer.c \ mach_startupUser.c \ mach_startupServer.h \ mach_startup.h CLEANFILES = \ $(BUILT_SOURCES) $(BUILT_SOURCES): $(srcdir)/mach_startup.defs mig -sheader mach_startupServer.h $(srcdir)/mach_startup.defs endif EXTRA_DIST = \ launchd_fd.h \ mach_startup.defs \ mach_startup_types.h xorg-server-21.1.16/hw/xquartz/mach-startup/Makefile.in0000644000175000017500000010230314757411115016444 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ x11app_PROGRAMS = X11.bin$(EXEEXT) X11$(EXEEXT) @GLX_TRUE@am__append_1 = \ @GLX_TRUE@ $(top_builddir)/hw/xquartz/GL/libCGLCore.la \ @GLX_TRUE@ $(top_builddir)/glx/libglxvnd.la \ @GLX_TRUE@ $(top_builddir)/glx/libglx.la @GLX_TRUE@am__append_2 = \ @GLX_TRUE@ -Wl,-framework,OpenGL @XQUARTZ_SPARKLE_TRUE@am__append_3 = \ @XQUARTZ_SPARKLE_TRUE@ -Wl,-framework,Sparkle @RECORD_TRUE@am__append_4 = \ @RECORD_TRUE@ $(top_builddir)/record/librecord.la bin_PROGRAMS = Xquartz$(EXEEXT) subdir = hw/xquartz/mach-startup ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(x11appdir)" PROGRAMS = $(bin_PROGRAMS) $(x11app_PROGRAMS) dist_X11_OBJECTS = bundle_trampoline.$(OBJEXT) X11_OBJECTS = $(dist_X11_OBJECTS) X11_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = dist_X11_bin_OBJECTS = bundle-main.$(OBJEXT) nodist_X11_bin_OBJECTS = mach_startupServer.$(OBJEXT) \ mach_startupUser.$(OBJEXT) X11_bin_OBJECTS = $(dist_X11_bin_OBJECTS) $(nodist_X11_bin_OBJECTS) am__DEPENDENCIES_1 = am__DEPENDENCIES_2 = $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) $(am__append_1) \ $(am__append_4) X11_bin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(X11_bin_LDFLAGS) $(LDFLAGS) -o $@ dist_Xquartz_OBJECTS = stub.$(OBJEXT) launchd_fd.$(OBJEXT) nodist_Xquartz_OBJECTS = mach_startupUser.$(OBJEXT) Xquartz_OBJECTS = $(dist_Xquartz_OBJECTS) $(nodist_Xquartz_OBJECTS) Xquartz_LDADD = $(LDADD) Xquartz_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(Xquartz_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/bundle-main.Po \ ./$(DEPDIR)/bundle_trampoline.Po ./$(DEPDIR)/launchd_fd.Po \ ./$(DEPDIR)/mach_startupServer.Po \ ./$(DEPDIR)/mach_startupUser.Po ./$(DEPDIR)/stub.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(dist_X11_SOURCES) $(dist_X11_bin_SOURCES) \ $(nodist_X11_bin_SOURCES) $(dist_Xquartz_SOURCES) \ $(nodist_Xquartz_SOURCES) DIST_SOURCES = $(dist_X11_SOURCES) $(dist_X11_bin_SOURCES) \ $(dist_Xquartz_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = \ -I$(srcdir)/.. \ -I$(top_builddir) \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DX11BINDIR=\"$(bindir)\" AM_CFLAGS = $(DIX_CFLAGS) x11appdir = $(APPLE_APPLICATIONS_DIR)/$(APPLE_APPLICATION_NAME).app/Contents/MacOS dist_X11_bin_SOURCES = \ bundle-main.c dist_X11_SOURCES = \ bundle_trampoline.c nodist_X11_bin_SOURCES = \ mach_startupServer.c \ mach_startupUser.c X11_bin_DEPENDENCIES = $(top_builddir)/hw/xquartz/libXquartz.la \ $(top_builddir)/hw/xquartz/xpr/libXquartzXpr.la \ $(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \ $(XQUARTZ_LIBS) $(XSERVER_LIBS) $(am__append_1) \ $(am__append_4) # $(XSERVER_SYS_LIBS) is placed here in order to set command line ordering # to work around build issues on Tiger. X11_bin_LDADD = $(X11_bin_DEPENDENCIES) $(XSERVER_SYS_LIBS) X11_bin_LDFLAGS = -lXplugin -XCClinker -Objc -Wl,-u,_miDCInitialize \ -Wl,-framework,Carbon -Wl,-framework,Cocoa \ -Wl,-framework,CoreAudio -Wl,-framework,IOKit $(am__append_2) \ $(am__append_3) dist_Xquartz_SOURCES = \ stub.c \ launchd_fd.c nodist_Xquartz_SOURCES = \ mach_startupUser.c Xquartz_LDFLAGS = \ -Wl,-framework,CoreServices @XQUARTZ_TRUE@BUILT_SOURCES = \ @XQUARTZ_TRUE@ mach_startupServer.c \ @XQUARTZ_TRUE@ mach_startupUser.c \ @XQUARTZ_TRUE@ mach_startupServer.h \ @XQUARTZ_TRUE@ mach_startup.h @XQUARTZ_TRUE@CLEANFILES = \ @XQUARTZ_TRUE@ $(BUILT_SOURCES) EXTRA_DIST = \ launchd_fd.h \ mach_startup.defs \ mach_startup_types.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/mach-startup/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/mach-startup/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list install-x11appPROGRAMS: $(x11app_PROGRAMS) @$(NORMAL_INSTALL) @list='$(x11app_PROGRAMS)'; test -n "$(x11appdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(x11appdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(x11appdir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(x11appdir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(x11appdir)$$dir" || exit $$?; \ } \ ; done uninstall-x11appPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(x11app_PROGRAMS)'; test -n "$(x11appdir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(x11appdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(x11appdir)" && rm -f $$files clean-x11appPROGRAMS: @list='$(x11app_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list X11$(EXEEXT): $(X11_OBJECTS) $(X11_DEPENDENCIES) $(EXTRA_X11_DEPENDENCIES) @rm -f X11$(EXEEXT) $(AM_V_CCLD)$(LINK) $(X11_OBJECTS) $(X11_LDADD) $(LIBS) X11.bin$(EXEEXT): $(X11_bin_OBJECTS) $(X11_bin_DEPENDENCIES) $(EXTRA_X11_bin_DEPENDENCIES) @rm -f X11.bin$(EXEEXT) $(AM_V_CCLD)$(X11_bin_LINK) $(X11_bin_OBJECTS) $(X11_bin_LDADD) $(LIBS) Xquartz$(EXEEXT): $(Xquartz_OBJECTS) $(Xquartz_DEPENDENCIES) $(EXTRA_Xquartz_DEPENDENCIES) @rm -f Xquartz$(EXEEXT) $(AM_V_CCLD)$(Xquartz_LINK) $(Xquartz_OBJECTS) $(Xquartz_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bundle-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bundle_trampoline.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launchd_fd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach_startupServer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mach_startupUser.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stub.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(x11appdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-x11appPROGRAMS mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/bundle-main.Po -rm -f ./$(DEPDIR)/bundle_trampoline.Po -rm -f ./$(DEPDIR)/launchd_fd.Po -rm -f ./$(DEPDIR)/mach_startupServer.Po -rm -f ./$(DEPDIR)/mach_startupUser.Po -rm -f ./$(DEPDIR)/stub.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-x11appPROGRAMS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/bundle-main.Po -rm -f ./$(DEPDIR)/bundle_trampoline.Po -rm -f ./$(DEPDIR)/launchd_fd.Po -rm -f ./$(DEPDIR)/mach_startupServer.Po -rm -f ./$(DEPDIR)/mach_startupUser.Po -rm -f ./$(DEPDIR)/stub.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-x11appPROGRAMS .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-x11appPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip install-x11appPROGRAMS \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-x11appPROGRAMS .PRECIOUS: Makefile @XQUARTZ_TRUE@$(BUILT_SOURCES): $(srcdir)/mach_startup.defs @XQUARTZ_TRUE@ mig -sheader mach_startupServer.h $(srcdir)/mach_startup.defs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/mach-startup/bundle_trampoline.c0000644000175000017500000000650114757411105020250 /* Copyright (c) 2021 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include #include #include #include #include #include #include #include /* We wnt XQuartz.app to inherit a login shell environment. This is handled by the X11.sh * script which re-execs the main binary from a login shell environment. However, recent * versions of macOS require that the main executable of an app be Mach-O for full system * fidelity. * * Failure to do so results in two problems: * 1) bash is seen as the responsible executable for Security & Privacy, and the user doesn't * get prompted to allow filesystem access (https://github.com/XQuartz/XQuartz/issues/6). * 2) The process is launched under Rosetta for compatability, which results in * the subsequent spawn of the real executable under Rosetta rather than natively. * * This trampoline provides the mach-o needed by LaunchServices and TCC to satisfy those * needs and simply execs the startup script which then execs the main binary. */ static char *executable_path() { uint32_t bufsize = PATH_MAX; char *buf = calloc(1, bufsize); if (_NSGetExecutablePath(buf, &bufsize) == -1) { free(buf); buf = calloc(1, bufsize); assert(_NSGetExecutablePath(buf, &bufsize) == 0); } return buf; } int main(int argc, char **argv, char **envp) { char const * const executable_directory = dirname(executable_path()); char *executable = NULL; asprintf(&executable, "%s/X11.sh", executable_directory); if (access(executable, X_OK) == -1) { free(executable); asprintf(&executable, "%s/X11", executable_directory); } assert(access(executable, X_OK) == 0); argv[0] = executable; posix_spawnattr_t attr; assert(posix_spawnattr_init(&attr) == 0); assert(posix_spawnattr_setflags(&attr, POSIX_SPAWN_SETEXEC) == 0); pid_t child_pid; assert(posix_spawn(&child_pid, executable, NULL, &attr, argv, envp) == 0); return EXIT_FAILURE; } xorg-server-21.1.16/hw/xquartz/mach-startup/bundle-main.c0000644000175000017500000005540014757411105016742 /* main.c -- X application launcher * Copyright (c) 2007 Jeremy Huddleston * Copyright (c) 2007-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "mach_startup.h" #include "mach_startupServer.h" #include /* From darwinEvents.c ... but don't want to pull in all the server cruft */ void DarwinListenOnOpenFD(int fd); extern aslclient aslc; /* Ditto, from os/log.c */ extern void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_NORETURN; extern int noPanoramiXExtension; #ifdef COMPOSITE extern Bool noCompositeExtension; #endif #define DEFAULT_CLIENT X11BINDIR "/xterm" #define DEFAULT_STARTX X11BINDIR "/startx -- " X11BINDIR "/Xquartz" #define DEFAULT_SHELL "/bin/sh" #define _STRINGIZE(s) #s #define STRINGIZE(s) _STRINGIZE(s) #ifndef XSERVER_VERSION #define XSERVER_VERSION "?" #endif static char __crashreporter_info_buff__[4096] = { 0 }; static const char *__crashreporter_info__ __attribute__((__used__)) = &__crashreporter_info_buff__[0]; // This line just tells the linker to never strip this symbol (such as for space optimization) asm (".desc ___crashreporter_info__, 0x10"); static const char *__crashreporter_info__base = "X.Org X Server " XSERVER_VERSION; char *bundle_id_prefix = NULL; static char *server_bootstrap_name = NULL; #define DEBUG 1 /* This is in quartzStartup.c */ int server_main(int argc, char **argv, char **envp); static int execute(const char *command); static char * command_from_prefs(const char *key, const char *default_value); static char *pref_app_to_run; static char *pref_login_shell; static char *pref_startx_script; /*** Mach-O IPC Stuffs ***/ union MaxMsgSize { union __RequestUnion__mach_startup_subsystem req; union __ReplyUnion__mach_startup_subsystem rep; }; static mach_port_t checkin_or_register(char *bname) { kern_return_t kr; mach_port_t mp; /* If we're started by launchd or the old mach_init */ kr = bootstrap_check_in(bootstrap_port, bname, &mp); if (kr == KERN_SUCCESS) return mp; /* We probably were not started by launchd or the old mach_init */ kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp); if (kr != KERN_SUCCESS) { ErrorF("mach_port_allocate(): %s\n", mach_error_string(kr)); exit(EXIT_FAILURE); } kr = mach_port_insert_right( mach_task_self(), mp, mp, MACH_MSG_TYPE_MAKE_SEND); if (kr != KERN_SUCCESS) { ErrorF("mach_port_insert_right(): %s\n", mach_error_string(kr)); exit(EXIT_FAILURE); } #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // bootstrap_register #endif kr = bootstrap_register(bootstrap_port, bname, mp); #ifdef __clang__ #pragma clang diagnostic pop #endif if (kr != KERN_SUCCESS) { ErrorF("bootstrap_register(): %s\n", mach_error_string(kr)); exit(EXIT_FAILURE); } return mp; } /*** $DISPLAY handoff ***/ static int accept_fd_handoff(int connected_fd) { int launchd_fd; char databuf[] = "display"; struct iovec iov[1]; union { struct cmsghdr hdr; char bytes[CMSG_SPACE(sizeof(int))]; } buf; struct msghdr msg; struct cmsghdr *cmsg; iov[0].iov_base = databuf; iov[0].iov_len = sizeof(databuf); msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = buf.bytes; msg.msg_controllen = sizeof(buf); msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_flags = 0; cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); msg.msg_controllen = cmsg->cmsg_len; *((int *)CMSG_DATA(cmsg)) = -1; if (recvmsg(connected_fd, &msg, 0) < 0) { ErrorF( "X11.app: Error receiving $DISPLAY file descriptor. recvmsg() error: %s\n", strerror(errno)); return -1; } launchd_fd = *((int *)CMSG_DATA(cmsg)); return launchd_fd; } typedef struct { int fd; string_t filename; } socket_handoff_t; /* This thread accepts an incoming connection and hands off the file * descriptor for the new connection to accept_fd_handoff() */ static void socket_handoff(socket_handoff_t *handoff_data) { int launchd_fd = -1; int connected_fd; /* Now actually get the passed file descriptor from this connection * If we encounter an error, keep listening. */ while (launchd_fd == -1) { connected_fd = accept(handoff_data->fd, NULL, NULL); if (connected_fd == -1) { ErrorF( "X11.app: Failed to accept incoming connection on socket (fd=%d): %s\n", handoff_data->fd, strerror(errno)); sleep(2); continue; } launchd_fd = accept_fd_handoff(connected_fd); if (launchd_fd == -1) ErrorF( "X11.app: Error receiving $DISPLAY file descriptor, no descriptor received? Waiting for another connection.\n"); close(connected_fd); } close(handoff_data->fd); unlink(handoff_data->filename); free(handoff_data); ErrorF( "X11.app Handing off fd to server thread via DarwinListenOnOpenFD(%d)\n", launchd_fd); DarwinListenOnOpenFD(launchd_fd); } static int create_socket(char *filename_out) { struct sockaddr_un servaddr_un; struct sockaddr *servaddr; socklen_t servaddr_len; int ret_fd; size_t try, try_max; for (try = 0, try_max = 5; try < try_max; try++) { tmpnam(filename_out); /* Setup servaddr_un */ memset(&servaddr_un, 0, sizeof(struct sockaddr_un)); servaddr_un.sun_family = AF_UNIX; strlcpy(servaddr_un.sun_path, filename_out, sizeof(servaddr_un.sun_path)); servaddr = (struct sockaddr *)&servaddr_un; servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(filename_out); ret_fd = socket(PF_UNIX, SOCK_STREAM, 0); if (ret_fd == -1) { ErrorF( "X11.app: Failed to create socket (try %d / %d): %s - %s\n", (int)try + 1, (int)try_max, filename_out, strerror(errno)); continue; } if (bind(ret_fd, servaddr, servaddr_len) != 0) { ErrorF("X11.app: Failed to bind socket: %d - %s\n", errno, strerror( errno)); close(ret_fd); return 0; } if (listen(ret_fd, 10) != 0) { ErrorF("X11.app: Failed to listen to socket: %s - %d - %s\n", filename_out, errno, strerror( errno)); close(ret_fd); return 0; } #ifdef DEBUG ErrorF("X11.app: Listening on socket for fd handoff: (%d) %s\n", ret_fd, filename_out); #endif return ret_fd; } return 0; } static int launchd_socket_handed_off = 0; kern_return_t do_request_fd_handoff_socket(mach_port_t port, string_t filename) { socket_handoff_t *handoff_data; launchd_socket_handed_off = 1; handoff_data = (socket_handoff_t *)calloc(1, sizeof(socket_handoff_t)); if (!handoff_data) { ErrorF("X11.app: Error allocating memory for handoff_data\n"); return KERN_FAILURE; } handoff_data->fd = create_socket(handoff_data->filename); if (!handoff_data->fd) { free(handoff_data); return KERN_FAILURE; } strlcpy(filename, handoff_data->filename, STRING_T_SIZE); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ { socket_handoff(handoff_data); }); #ifdef DEBUG ErrorF( "X11.app: Thread created for handoff. Returning success to tell caller to connect and push the fd.\n"); #endif return KERN_SUCCESS; } kern_return_t do_request_pid(mach_port_t port, int *my_pid) { *my_pid = getpid(); return KERN_SUCCESS; } /*** Server Startup ***/ kern_return_t do_start_x11_server(mach_port_t port, string_array_t argv, mach_msg_type_number_t argvCnt, string_array_t envp, mach_msg_type_number_t envpCnt) { /* And now back to char ** */ char **_argv = alloca((argvCnt + 1) * sizeof(char *)); char **_envp = alloca((envpCnt + 1) * sizeof(char *)); size_t i; /* If we didn't get handed a launchd DISPLAY socket, we should * unset DISPLAY or we can run into problems with pbproxy */ if (!launchd_socket_handed_off) { ErrorF("X11.app: No launchd socket handed off, unsetting DISPLAY\n"); unsetenv("DISPLAY"); } if (!_argv || !_envp) { return KERN_FAILURE; } ErrorF("X11.app: do_start_x11_server(): argc=%d\n", argvCnt); for (i = 0; i < argvCnt; i++) { _argv[i] = argv[i]; ErrorF("\targv[%u] = %s\n", (unsigned)i, argv[i]); } _argv[argvCnt] = NULL; for (i = 0; i < envpCnt; i++) { _envp[i] = envp[i]; } _envp[envpCnt] = NULL; if (server_main(argvCnt, _argv, _envp) == 0) return KERN_SUCCESS; else return KERN_FAILURE; } static int startup_trigger(int argc, char **argv, char **envp) { Display *display; const char *s; /* Take care of the case where we're called like a normal DDX */ if (argc > 1 && argv[1][0] == ':') { size_t i; kern_return_t kr; mach_port_t mp; string_array_t newenvp; string_array_t newargv; /* We need to count envp */ int envpc; for (envpc = 0; envp[envpc]; envpc++) ; /* We have fixed-size string lengths due to limitations in IPC, * so we need to copy our argv and envp. */ newargv = (string_array_t)alloca(argc * sizeof(string_t)); newenvp = (string_array_t)alloca(envpc * sizeof(string_t)); if (!newargv || !newenvp) { ErrorF("Memory allocation failure\n"); exit(EXIT_FAILURE); } for (i = 0; i < argc; i++) { strlcpy(newargv[i], argv[i], STRING_T_SIZE); } for (i = 0; i < envpc; i++) { strlcpy(newenvp[i], envp[i], STRING_T_SIZE); } kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp); if (kr != KERN_SUCCESS) { ErrorF("bootstrap_look_up(%s): %s\n", server_bootstrap_name, bootstrap_strerror( kr)); exit(EXIT_FAILURE); } kr = start_x11_server(mp, newargv, argc, newenvp, envpc); if (kr != KERN_SUCCESS) { ErrorF("start_x11_server: %s\n", mach_error_string(kr)); exit(EXIT_FAILURE); } exit(EXIT_SUCCESS); } /* If we have a process serial number and it's our only arg, act as if * the user double clicked the app bundle: launch app_to_run if possible */ if (argc == 1 || (argc == 2 && !strncmp(argv[1], "-psn_", 5))) { /* Now, try to open a display, if so, run the launcher */ display = XOpenDisplay(NULL); if (display) { /* Could open the display, start the launcher */ XCloseDisplay(display); return execute(pref_app_to_run); } } /* Start the server */ if ((s = getenv("DISPLAY"))) { ErrorF( "X11.app: Could not connect to server (DISPLAY=\"%s\", unsetting). Starting X server.\n", s); unsetenv("DISPLAY"); } else { ErrorF( "X11.app: Could not connect to server (DISPLAY is not set). Starting X server.\n"); } return execute(pref_startx_script); } /** Setup the environment we want our child processes to inherit */ static void ensure_path(const char *dir) { char buf[1024], *temp; /* Make sure /usr/X11/bin is in the $PATH */ temp = getenv("PATH"); if (temp == NULL || temp[0] == 0) { snprintf(buf, sizeof(buf), "/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:%s", dir); setenv("PATH", buf, TRUE); } else if (strnstr(temp, X11BINDIR, sizeof(temp)) == NULL) { snprintf(buf, sizeof(buf), "%s:%s", temp, dir); setenv("PATH", buf, TRUE); } } static void setup_console_redirect(const char *bundle_id) { char *asl_sender; char *asl_facility; asprintf(&asl_sender, "%s.server", bundle_id); assert(asl_sender); asl_facility = strdup(bundle_id); assert(asl_facility); if (strcmp(asl_facility + strlen(asl_facility) - 4, ".X11") == 0) asl_facility[strlen(asl_facility) - 4] = '\0'; assert(aslc = asl_open(asl_sender, asl_facility, ASL_OPT_NO_DELAY)); free(asl_sender); free(asl_facility); asl_set_filter(aslc, ASL_FILTER_MASK_UPTO(ASL_LEVEL_WARNING)); asl_log_descriptor(aslc, NULL, ASL_LEVEL_INFO, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); asl_log_descriptor(aslc, NULL, ASL_LEVEL_NOTICE, STDERR_FILENO, ASL_LOG_DESCRIPTOR_WRITE); } static void setup_env(void) { char *temp; const char *pds = NULL; const char *disp = getenv("DISPLAY"); size_t len; /* Pass on our prefs domain to startx and its inheritors (mainly for * quartz-wm and the Xquartz stub's MachIPC) */ CFBundleRef bundle = CFBundleGetMainBundle(); if (bundle) { CFStringRef pd = CFBundleGetIdentifier(bundle); if (pd) { pds = CFStringGetCStringPtr(pd, 0); } } /* fallback to hardcoded value if we can't discover it */ if (!pds) { pds = BUNDLE_ID_PREFIX ".X11"; } setup_console_redirect(pds); server_bootstrap_name = strdup(pds); if (!server_bootstrap_name) { ErrorF("X11.app: Memory allocation error.\n"); exit(1); } setenv("X11_PREFS_DOMAIN", server_bootstrap_name, 1); len = strlen(server_bootstrap_name); bundle_id_prefix = malloc(sizeof(char) * (len - 3)); if (!bundle_id_prefix) { ErrorF("X11.app: Memory allocation error.\n"); exit(1); } strlcpy(bundle_id_prefix, server_bootstrap_name, len - 3); /* We need to unset DISPLAY if it is not our socket */ if (disp) { /* s = basename(disp) */ const char *d, *s; for (s = NULL, d = disp; *d; d++) { if (*d == '/') s = d + 1; } if (s && *s) { if (strcmp(bundle_id_prefix, "org.x") == 0 && strcmp(s, ":0") == 0) { ErrorF( "X11.app: Detected old style launchd DISPLAY, please update xinit.\n"); } else { temp = (char *)malloc(sizeof(char) * len); if (!temp) { ErrorF( "X11.app: Memory allocation error creating space for socket name test.\n"); exit(1); } strlcpy(temp, bundle_id_prefix, len); strlcat(temp, ":0", len); if (strcmp(temp, s) != 0) { /* If we don't have a match, unset it. */ ErrorF( "X11.app: DISPLAY (\"%s\") does not match our id (\"%s\"), unsetting.\n", disp, bundle_id_prefix); unsetenv("DISPLAY"); } free(temp); } } else { /* The DISPLAY environment variable is not formatted like a launchd socket, so reset. */ ErrorF( "X11.app: DISPLAY does not look like a launchd set variable, unsetting.\n"); unsetenv("DISPLAY"); } } /* Make sure PATH is right */ ensure_path(X11BINDIR); /* cd $HOME */ temp = getenv("HOME"); if (temp != NULL && temp[0] != '\0') chdir(temp); } /*** Main ***/ int main(int argc, char **argv, char **envp) { Bool listenOnly = FALSE; int i; mach_msg_size_t mxmsgsz = sizeof(union MaxMsgSize) + MAX_TRAILER_SIZE; mach_port_t mp; kern_return_t kr; /* Ignore SIGPIPE */ signal(SIGPIPE, SIG_IGN); /* Setup our environment for our children */ setup_env(); /* The server must not run the PanoramiX operations. */ noPanoramiXExtension = TRUE; #ifdef COMPOSITE /* https://gitlab.freedesktop.org/xorg/xserver/-/issues/1409 */ noCompositeExtension = TRUE; #endif /* Setup the initial crasherporter info */ strlcpy(__crashreporter_info_buff__, __crashreporter_info__base, sizeof(__crashreporter_info_buff__)); ErrorF("X11.app: main(): argc=%d\n", argc); for (i = 0; i < argc; i++) { ErrorF("\targv[%u] = %s\n", (unsigned)i, argv[i]); if (!strcmp(argv[i], "--listenonly")) { listenOnly = TRUE; } } mp = checkin_or_register(server_bootstrap_name); if (mp == MACH_PORT_NULL) { ErrorF("NULL mach service: %s", server_bootstrap_name); return EXIT_FAILURE; } /* Check if we need to do something other than listen, and make another * thread handle it. */ if (!listenOnly) { pid_t child1, child2; int status; pref_app_to_run = command_from_prefs("app_to_run", DEFAULT_CLIENT); assert(pref_app_to_run); pref_login_shell = command_from_prefs("login_shell", DEFAULT_SHELL); assert(pref_login_shell); pref_startx_script = command_from_prefs("startx_script", DEFAULT_STARTX); assert(pref_startx_script); /* Do the fork-twice trick to avoid having to reap zombies */ child1 = fork(); switch (child1) { case -1: /* error */ FatalError("fork() failed: %s\n", strerror(errno)); case 0: /* child1 */ child2 = fork(); switch (child2) { int max_files; case -1: /* error */ FatalError("fork() failed: %s\n", strerror(errno)); case 0: /* child2 */ /* close all open files except for standard streams */ max_files = sysconf(_SC_OPEN_MAX); for (i = 3; i < max_files; i++) close(i); /* ensure stdin is on /dev/null */ close(0); open("/dev/null", O_RDONLY); return startup_trigger(argc, argv, envp); default: /* parent (child1) */ _exit(0); } break; default: /* parent */ waitpid(child1, &status, 0); } free(pref_app_to_run); free(pref_login_shell); free(pref_startx_script); } /* Main event loop */ ErrorF("Waiting for startup parameters via Mach IPC.\n"); kr = mach_msg_server(mach_startup_server, mxmsgsz, mp, 0); if (kr != KERN_SUCCESS) { ErrorF("%s.X11(mp): %s\n", BUNDLE_ID_PREFIX, mach_error_string(kr)); return EXIT_FAILURE; } return EXIT_SUCCESS; } static int execute(const char *command) { const char *newargv[4]; const char **p; newargv[0] = pref_login_shell; newargv[1] = "-c"; newargv[2] = command; newargv[3] = NULL; ErrorF("X11.app: Launching %s:\n", command); for (p = newargv; *p; p++) { ErrorF("\targv[%ld] = %s\n", (long int)(p - newargv), *p); } execvp(newargv[0], (char *const *)newargv); perror("X11.app: Couldn't exec."); return 1; } static char * command_from_prefs(const char *key, const char *default_value) { char *command = NULL; CFStringRef cfKey; CFPropertyListRef PlistRef; if (!key) return NULL; cfKey = CFStringCreateWithCString(NULL, key, kCFStringEncodingASCII); if (!cfKey) return NULL; PlistRef = CFPreferencesCopyAppValue(cfKey, kCFPreferencesCurrentApplication); if ((PlistRef == NULL) || (CFGetTypeID(PlistRef) != CFStringGetTypeID())) { CFStringRef cfDefaultValue = CFStringCreateWithCString( NULL, default_value, kCFStringEncodingASCII); int len = strlen(default_value) + 1; if (!cfDefaultValue) goto command_from_prefs_out; CFPreferencesSetAppValue(cfKey, cfDefaultValue, kCFPreferencesCurrentApplication); CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication); CFRelease(cfDefaultValue); command = (char *)malloc(len * sizeof(char)); if (!command) goto command_from_prefs_out; strcpy(command, default_value); } else { int len = CFStringGetLength((CFStringRef)PlistRef) + 1; command = (char *)malloc(len * sizeof(char)); if (!command) goto command_from_prefs_out; CFStringGetCString((CFStringRef)PlistRef, command, len, kCFStringEncodingASCII); } command_from_prefs_out: if (PlistRef) CFRelease(PlistRef); if (cfKey) CFRelease(cfKey); return command; } xorg-server-21.1.16/hw/xquartz/mach-startup/stub.c0000644000175000017500000002507014757411105015524 /* Copyright (c) 2008-2012 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #define kX11AppBundleId BUNDLE_ID_PREFIX ".X11" #define kX11AppBundlePath "/Contents/MacOS/X11" #include #include #include #include "mach_startup.h" #include #include "launchd_fd.h" static CFURLRef x11appURL; static FSRef x11_appRef; static pid_t x11app_pid = 0; aslclient aslc; static void set_x11_path(void) { OSStatus osstatus = LSFindApplicationForInfo(kLSUnknownCreator, CFSTR(kX11AppBundleId), nil, &x11_appRef, &x11appURL); switch (osstatus) { case noErr: if (x11appURL == NULL) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Invalid response from LSFindApplicationForInfo(%s)", kX11AppBundleId); exit(1); } break; case kLSApplicationNotFoundErr: asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Unable to find application for %s", kX11AppBundleId); exit(10); default: asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Unable to find application for %s, error code = %d", kX11AppBundleId, (int)osstatus); exit(11); } } static int connect_to_socket(const char *filename) { struct sockaddr_un servaddr_un; struct sockaddr *servaddr; socklen_t servaddr_len; int ret_fd; /* Setup servaddr_un */ memset(&servaddr_un, 0, sizeof(struct sockaddr_un)); servaddr_un.sun_family = AF_UNIX; strlcpy(servaddr_un.sun_path, filename, sizeof(servaddr_un.sun_path)); servaddr = (struct sockaddr *)&servaddr_un; servaddr_len = sizeof(struct sockaddr_un) - sizeof(servaddr_un.sun_path) + strlen(filename); ret_fd = socket(PF_UNIX, SOCK_STREAM, 0); if (ret_fd == -1) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Failed to create socket: %s - %d - %s", filename, errno, strerror(errno)); return -1; } if (connect(ret_fd, servaddr, servaddr_len) < 0) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Failed to connect to socket: %s - %d - %s", filename, errno, strerror(errno)); close(ret_fd); return -1; } return ret_fd; } static void send_fd_handoff(int connected_fd, int launchd_fd) { char databuf[] = "display"; struct iovec iov[1]; union { struct cmsghdr hdr; char bytes[CMSG_SPACE(sizeof(int))]; } buf; struct msghdr msg; struct cmsghdr *cmsg; iov[0].iov_base = databuf; iov[0].iov_len = sizeof(databuf); msg.msg_iov = iov; msg.msg_iovlen = 1; msg.msg_control = buf.bytes; msg.msg_controllen = sizeof(buf); msg.msg_name = 0; msg.msg_namelen = 0; msg.msg_flags = 0; cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); msg.msg_controllen = cmsg->cmsg_len; *((int *)CMSG_DATA(cmsg)) = launchd_fd; if (sendmsg(connected_fd, &msg, 0) < 0) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Error sending $DISPLAY file descriptor over fd %d: %d -- %s", connected_fd, errno, strerror(errno)); return; } asl_log(aslc, NULL, ASL_LEVEL_DEBUG, "Xquartz: Message sent. Closing handoff fd."); close(connected_fd); } __attribute__((__noreturn__)) static void signal_handler(int sig) { if (x11app_pid) kill(x11app_pid, sig); _exit(0); } int main(int argc, char **argv, char **envp) { int envpc; kern_return_t kr; mach_port_t mp; string_array_t newenvp; string_array_t newargv; size_t i; int launchd_fd; string_t handoff_socket_filename; sig_t handler; char *asl_sender; char *asl_facility; char *server_bootstrap_name = kX11AppBundleId; if (getenv("X11_PREFS_DOMAIN")) server_bootstrap_name = getenv("X11_PREFS_DOMAIN"); asprintf(&asl_sender, "%s.stub", server_bootstrap_name); assert(asl_sender); asl_facility = strdup(server_bootstrap_name); assert(asl_facility); if (strcmp(asl_facility + strlen(asl_facility) - 4, ".X11") == 0) asl_facility[strlen(asl_facility) - 4] = '\0'; assert(aslc = asl_open(asl_sender, asl_facility, ASL_OPT_NO_DELAY)); free(asl_sender); free(asl_facility); /* We don't have a mechanism in place to handle this interrupt driven * server-start notification, so just send the signal now, so xinit doesn't * time out waiting for it and will just poll for the server. */ handler = signal(SIGUSR1, SIG_IGN); if (handler == SIG_IGN) kill(getppid(), SIGUSR1); signal(SIGUSR1, handler); /* Pass on SIGs to X11.app */ signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); /* Get the $DISPLAY FD */ launchd_fd = launchd_display_fd(); kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp); if (kr != KERN_SUCCESS) { pid_t child; asl_log(aslc, NULL, ASL_LEVEL_WARNING, "Xquartz: Unable to locate waiting server: %s", server_bootstrap_name); set_x11_path(); char *listenOnlyArg = "--listenonly"; CFStringRef silentLaunchArg = CFStringCreateWithCString(NULL, listenOnlyArg, kCFStringEncodingUTF8); CFStringRef args[] = { silentLaunchArg }; CFArrayRef passArgv = CFArrayCreate(NULL, (const void**) args, 1, NULL); LSApplicationParameters params = { 0, /* CFIndex version == 0 */ kLSLaunchDefaults, /* LSLaunchFlags flags */ &x11_appRef, /* FSRef application */ NULL, /* void* asyncLaunchRefCon*/ NULL, /* CFDictionaryRef environment */ passArgv, /* CFArrayRef arguments */ NULL /* AppleEvent* initialEvent */ }; OSStatus status = LSOpenApplication(¶ms, NULL); if (status != noErr) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Unable to launch: %d", (int)status); return EXIT_FAILURE; } /* Try connecting for 10 seconds */ for (i = 0; i < 80; i++) { usleep(250000); kr = bootstrap_look_up(bootstrap_port, server_bootstrap_name, &mp); if (kr == KERN_SUCCESS) break; } if (kr != KERN_SUCCESS) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: bootstrap_look_up(): %s", bootstrap_strerror(kr)); return EXIT_FAILURE; } } /* Get X11.app's pid */ request_pid(mp, &x11app_pid); /* Handoff the $DISPLAY FD */ if (launchd_fd != -1) { size_t try, try_max; int handoff_fd = -1; for (try = 0, try_max = 5; try < try_max; try++) { if (request_fd_handoff_socket(mp, handoff_socket_filename) != KERN_SUCCESS) { asl_log(aslc, NULL, ASL_LEVEL_INFO, "Xquartz: Failed to request a socket from the server to send the $DISPLAY fd over (try %d of %d)", (int)try + 1, (int)try_max); continue; } handoff_fd = connect_to_socket(handoff_socket_filename); if (handoff_fd == -1) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Failed to connect to socket (try %d of %d)", (int)try + 1, (int)try_max); continue; } asl_log(aslc, NULL, ASL_LEVEL_INFO, "Xquartz: Handoff connection established (try %d of %d) on fd %d, \"%s\". Sending message.", (int)try + 1, (int)try_max, handoff_fd, handoff_socket_filename); send_fd_handoff(handoff_fd, launchd_fd); close(handoff_fd); break; } } /* Count envp */ for (envpc = 0; envp[envpc]; envpc++) ; /* We have fixed-size string lengths due to limitations in IPC, * so we need to copy our argv and envp. */ newargv = (string_array_t)calloc((1 + argc), sizeof(string_t)); newenvp = (string_array_t)calloc((1 + envpc), sizeof(string_t)); if (!newargv || !newenvp) { /* Silence the clang static analyzer */ free(newargv); free(newenvp); asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: Memory allocation failure"); return EXIT_FAILURE; } for (i = 0; i < argc; i++) { strlcpy(newargv[i], argv[i], STRING_T_SIZE); } for (i = 0; i < envpc; i++) { strlcpy(newenvp[i], envp[i], STRING_T_SIZE); } kr = start_x11_server(mp, newargv, argc, newenvp, envpc); free(newargv); free(newenvp); if (kr != KERN_SUCCESS) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "Xquartz: start_x11_server: %s", mach_error_string(kr)); return EXIT_FAILURE; } return EXIT_SUCCESS; } xorg-server-21.1.16/hw/xquartz/mach-startup/launchd_fd.c0000644000175000017500000001016314757411105016633 /* Copyright (c) 2008-2012 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "launchd_fd.h" extern aslclient aslc; int launchd_display_fd(void) { launch_data_t sockets_dict, checkin_request, checkin_response; launch_data_t listening_fd_array, listening_fd; /* Get launchd fd */ if ((checkin_request = launch_data_new_string(LAUNCH_KEY_CHECKIN)) == NULL) { asl_log( aslc, NULL, ASL_LEVEL_ERR, "launch_data_new_string(\"" LAUNCH_KEY_CHECKIN "\") Unable to create string.\n"); return ERROR_FD; } if ((checkin_response = launch_msg(checkin_request)) == NULL) { asl_log(aslc, NULL, ASL_LEVEL_WARNING, "launch_msg(\"" LAUNCH_KEY_CHECKIN "\") IPC failure: %s\n", strerror( errno)); return ERROR_FD; } if (LAUNCH_DATA_ERRNO == launch_data_get_type(checkin_response)) { // ignore EACCES, which is common if we weren't started by launchd if (launch_data_get_errno(checkin_response) != EACCES) asl_log(aslc, NULL, ASL_LEVEL_ERR, "launchd check-in failed: %s\n", strerror(launch_data_get_errno( checkin_response))); return ERROR_FD; } sockets_dict = launch_data_dict_lookup(checkin_response, LAUNCH_JOBKEY_SOCKETS); if (NULL == sockets_dict) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "launchd check-in: no sockets found to answer requests on!\n"); return ERROR_FD; } if (launch_data_dict_get_count(sockets_dict) > 1) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "launchd check-in: some sockets will be ignored!\n"); return ERROR_FD; } listening_fd_array = launch_data_dict_lookup(sockets_dict, BUNDLE_ID_PREFIX ":0"); if (NULL == listening_fd_array) { listening_fd_array = launch_data_dict_lookup(sockets_dict, ":0"); if (NULL == listening_fd_array) { asl_log( aslc, NULL, ASL_LEVEL_ERR, "launchd check-in: No known sockets found to answer requests on! \"%s:0\" and \":0\" failed.\n", BUNDLE_ID_PREFIX); return ERROR_FD; } } if (launch_data_array_get_count(listening_fd_array) != 1) { asl_log(aslc, NULL, ASL_LEVEL_ERR, "launchd check-in: Expected 1 socket from launchd, got %u)\n", (unsigned)launch_data_array_get_count( listening_fd_array)); return ERROR_FD; } listening_fd = launch_data_array_get_index(listening_fd_array, 0); return launch_data_get_fd(listening_fd); } xorg-server-21.1.16/hw/xquartz/mach-startup/launchd_fd.h0000644000175000017500000000275514757411105016650 /* Copyright (c) 2008-2012 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef _XQUARTZ_LAUNCHD_FD_H_ #define _XQUARTZ_LAUNCHD_FD_H_ #define ERROR_FD -1 int launchd_display_fd(void); #endif /* _XQUARTZ_LAUNCHD_FD_H_ */ xorg-server-21.1.16/hw/xquartz/mach-startup/mach_startup.defs0000644000175000017500000000353114757411105017736 /* Copyright (c) 2008 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include #include import "mach_startup_types.h"; subsystem mach_startup 1000; serverprefix do_; type string_t = c_string[1024]; type string_array_t = array[] of string_t; routine start_x11_server( port : mach_port_t; argv : string_array_t; envp : string_array_t); routine request_fd_handoff_socket ( port : mach_port_t; out socket_filename : string_t); routine request_pid ( port : mach_port_t; out pid : int); xorg-server-21.1.16/hw/xquartz/mach-startup/mach_startup_types.h0000644000175000017500000000025414757411105020467 #ifndef _MACH_STARTUP_TYPES_H_ #define _MACH_STARTUP_TYPES_H_ #define STRING_T_SIZE 1024 typedef char string_t[STRING_T_SIZE]; typedef string_t * string_array_t; #endif xorg-server-21.1.16/hw/xquartz/pbproxy/0000755000175000017500000000000014757411136013556 5xorg-server-21.1.16/hw/xquartz/pbproxy/meson.build0000644000175000017500000000157114757411105015640 build_standalone_pbproxy = get_option('xpbproxy') pbproxy_defs = [ '-DXQUARTZ_DATA_DIR="@0@"'.format(xquartz_data_dir), bundle_id_def ] if build_standalone_pbproxy pbproxy_defs += ['-DSTANDALONE_XPBPROXY'] endif libapplewm_dep = dependency('applewm', version: '>=1.4') libxpbproxy = static_library('xpbproxy', ['../NSUserDefaults+XQuartzDefaults.m', 'main.m', 'x-input.m', 'x-selection.m'], include_directories: ['..'], dependencies: [applewmproto_dep, libapplewm_dep, dependency('xfixes'), dependency('x11')], objc_args: pbproxy_defs, ) cocoa = dependency('Cocoa', method: 'extraframework') # standalone xpbproxy if build_standalone_pbproxy executable('xpbproxy', 'app-main.m', link_with: libxpbproxy, dependencies: [cocoa, dependency('x11')], objc_args: pbproxy_defs, install: true, ) endif xorg-server-21.1.16/hw/xquartz/pbproxy/Makefile.am0000644000175000017500000000106514757411105015530 AM_CPPFLAGS=-I.. -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" AM_CFLAGS=$(XPBPROXY_CFLAGS) AM_OBJCFLAGS=$(XPBPROXY_CFLAGS) noinst_LTLIBRARIES = libxpbproxy.la libxpbproxy_la_SOURCES = \ trick_autotools.c \ main.m \ x-input.m \ x-selection.m libxpbproxy_la_LDFLAGS=$(XPBPROXY_LIBS) if STANDALONE_XPBPROXY bin_PROGRAMS = xpbproxy xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m xpbproxy_LDADD = libxpbproxy.la xpbproxy_LDFLAGS = -Wl,-framework,Cocoa AM_CPPFLAGS += -DSTANDALONE_XPBPROXY endif EXTRA_DIST = \ pbproxy.h \ x-selection.h xorg-server-21.1.16/hw/xquartz/pbproxy/Makefile.in0000644000175000017500000010277114757411116015551 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @STANDALONE_XPBPROXY_TRUE@bin_PROGRAMS = xpbproxy$(EXEEXT) @STANDALONE_XPBPROXY_TRUE@am__append_1 = -DSTANDALONE_XPBPROXY subdir = hw/xquartz/pbproxy ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) LTLIBRARIES = $(noinst_LTLIBRARIES) libxpbproxy_la_LIBADD = am_libxpbproxy_la_OBJECTS = trick_autotools.lo main.lo x-input.lo \ x-selection.lo libxpbproxy_la_OBJECTS = $(am_libxpbproxy_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libxpbproxy_la_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ $(OBJCFLAGS) $(libxpbproxy_la_LDFLAGS) $(LDFLAGS) -o $@ am__xpbproxy_SOURCES_DIST = app-main.m \ ../NSUserDefaults+XQuartzDefaults.m @STANDALONE_XPBPROXY_TRUE@am_xpbproxy_OBJECTS = app-main.$(OBJEXT) \ @STANDALONE_XPBPROXY_TRUE@ NSUserDefaults+XQuartzDefaults.$(OBJEXT) xpbproxy_OBJECTS = $(am_xpbproxy_OBJECTS) @STANDALONE_XPBPROXY_TRUE@xpbproxy_DEPENDENCIES = libxpbproxy.la xpbproxy_LINK = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(OBJCLD) $(AM_OBJCFLAGS) \ $(OBJCFLAGS) $(xpbproxy_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po \ ./$(DEPDIR)/app-main.Po ./$(DEPDIR)/main.Plo \ ./$(DEPDIR)/trick_autotools.Plo ./$(DEPDIR)/x-input.Plo \ ./$(DEPDIR)/x-selection.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_OBJCFLAGS) $(OBJCFLAGS) AM_V_OBJC = $(am__v_OBJC_@AM_V@) am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@) am__v_OBJC_0 = @echo " OBJC " $@; am__v_OBJC_1 = OBJCLD = $(OBJC) AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@) am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@) am__v_OBJCLD_0 = @echo " OBJCLD " $@; am__v_OBJCLD_1 = SOURCES = $(libxpbproxy_la_SOURCES) $(xpbproxy_SOURCES) DIST_SOURCES = $(libxpbproxy_la_SOURCES) $(am__xpbproxy_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CPPFLAGS = -I.. -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \ $(am__append_1) AM_CFLAGS = $(XPBPROXY_CFLAGS) AM_OBJCFLAGS = $(XPBPROXY_CFLAGS) noinst_LTLIBRARIES = libxpbproxy.la libxpbproxy_la_SOURCES = \ trick_autotools.c \ main.m \ x-input.m \ x-selection.m libxpbproxy_la_LDFLAGS = $(XPBPROXY_LIBS) @STANDALONE_XPBPROXY_TRUE@xpbproxy_SOURCES = app-main.m ../NSUserDefaults+XQuartzDefaults.m @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDADD = libxpbproxy.la @STANDALONE_XPBPROXY_TRUE@xpbproxy_LDFLAGS = -Wl,-framework,Cocoa EXTRA_DIST = \ pbproxy.h \ x-selection.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .m .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/pbproxy/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/pbproxy/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxpbproxy.la: $(libxpbproxy_la_OBJECTS) $(libxpbproxy_la_DEPENDENCIES) $(EXTRA_libxpbproxy_la_DEPENDENCIES) $(AM_V_OBJCLD)$(libxpbproxy_la_LINK) $(libxpbproxy_la_OBJECTS) $(libxpbproxy_la_LIBADD) $(LIBS) xpbproxy$(EXEEXT): $(xpbproxy_OBJECTS) $(xpbproxy_DEPENDENCIES) $(EXTRA_xpbproxy_DEPENDENCIES) @rm -f xpbproxy$(EXEEXT) $(AM_V_OBJCLD)$(xpbproxy_LINK) $(xpbproxy_OBJECTS) $(xpbproxy_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/app-main.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trick_autotools.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-input.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-selection.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .m.o: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ $< .m.obj: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .m.lo: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $< NSUserDefaults+XQuartzDefaults.o: ../NSUserDefaults+XQuartzDefaults.m @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.o -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.o `test -f '../NSUserDefaults+XQuartzDefaults.m' || echo '$(srcdir)/'`../NSUserDefaults+XQuartzDefaults.m NSUserDefaults+XQuartzDefaults.obj: ../NSUserDefaults+XQuartzDefaults.m @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -MT NSUserDefaults+XQuartzDefaults.obj -MD -MP -MF $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Tpo $(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='../NSUserDefaults+XQuartzDefaults.m' object='NSUserDefaults+XQuartzDefaults.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) -c -o NSUserDefaults+XQuartzDefaults.obj `if test -f '../NSUserDefaults+XQuartzDefaults.m'; then $(CYGPATH_W) '../NSUserDefaults+XQuartzDefaults.m'; else $(CYGPATH_W) '$(srcdir)/../NSUserDefaults+XQuartzDefaults.m'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po -rm -f ./$(DEPDIR)/app-main.Po -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/trick_autotools.Plo -rm -f ./$(DEPDIR)/x-input.Plo -rm -f ./$(DEPDIR)/x-selection.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Po -rm -f ./$(DEPDIR)/app-main.Po -rm -f ./$(DEPDIR)/main.Plo -rm -f ./$(DEPDIR)/trick_autotools.Plo -rm -f ./$(DEPDIR)/x-input.Plo -rm -f ./$(DEPDIR)/x-selection.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/pbproxy/trick_autotools.c0000644000175000017500000000010014757411105017052 int this_is_just_here_to_make_automake_work() { return 0; } xorg-server-21.1.16/hw/xquartz/pbproxy/main.m0000644000175000017500000000772414757411105014606 /* main.m * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "pbproxy.h" #import "x-selection.h" #include #include #include Display *xpbproxy_dpy; int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base; int xpbproxy_xfixes_event_base, xpbproxy_xfixes_error_base; BOOL xpbproxy_have_xfixes; extern char *display; #ifdef STANDALONE_XPBPROXY BOOL xpbproxy_is_standalone = NO; #endif x_selection *_selection_object; static int x_io_error_handler(Display *dpy) { /* We lost our connection to the server. */ TRACE(); /* trigger the thread to restart? * NO - this would be to a "deeper" problem, and restarts would just * make things worse... */ #ifdef STANDALONE_XPBPROXY if (xpbproxy_is_standalone) exit(EXIT_FAILURE); #endif /* Prevent _XIOError from calling exit() */ pthread_exit(NULL); return 0; } static int x_error_handler(Display *dpy, XErrorEvent *errevent) { return 0; } int xpbproxy_run(void) { @autoreleasepool { size_t i; for (i = 0, xpbproxy_dpy = NULL; !xpbproxy_dpy && i < 5; i++) { xpbproxy_dpy = XOpenDisplay(NULL); if (!xpbproxy_dpy && display) { char _display[32]; snprintf(_display, sizeof(_display), ":%s", display); setenv("DISPLAY", _display, TRUE); xpbproxy_dpy = XOpenDisplay(_display); } if (!xpbproxy_dpy) sleep(1); } if (xpbproxy_dpy == NULL) { ErrorF("xpbproxy: can't open default display\n"); return EXIT_FAILURE; } XSetIOErrorHandler(x_io_error_handler); XSetErrorHandler(x_error_handler); if (!XAppleWMQueryExtension(xpbproxy_dpy, &xpbproxy_apple_wm_event_base, &xpbproxy_apple_wm_error_base)) { ErrorF("xpbproxy: can't open AppleWM server extension\n"); return EXIT_FAILURE; } xpbproxy_have_xfixes = XFixesQueryExtension(xpbproxy_dpy, &xpbproxy_xfixes_event_base, &xpbproxy_xfixes_error_base); XAppleWMSelectInput(xpbproxy_dpy, AppleWMActivationNotifyMask | AppleWMPasteboardNotifyMask); _selection_object = [x_selection new]; if (!xpbproxy_input_register()) { return EXIT_FAILURE; } } CFRunLoopRun(); return EXIT_SUCCESS; } id xpbproxy_selection_object(void) { return _selection_object; } Time xpbproxy_current_timestamp(void) { /* FIXME: may want to fetch a timestamp from the server.. */ return CurrentTime; } xorg-server-21.1.16/hw/xquartz/pbproxy/x-input.m0000644000175000017500000001255014757411105015257 /* x-input.m -- event handling * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "pbproxy.h" #import "x-selection.h" #include #include #include #include #include #include static CFRunLoopSourceRef xpbproxy_dpy_source; #ifdef STANDALONE_XPBPROXY BOOL xpbproxy_prefs_reload = NO; #endif /* Timestamp when the X server last told us it's active */ static Time last_activation_time; static void x_event_apple_wm_notify(XAppleWMNotifyEvent *e) { int type = e->type - xpbproxy_apple_wm_event_base; int kind = e->kind; /* We want to reload prefs even if we're not active */ if (type == AppleWMActivationNotify && kind == AppleWMReloadPreferences) [xpbproxy_selection_object ()reload_preferences]; if (![xpbproxy_selection_object ()is_active]) return; switch (type) { case AppleWMActivationNotify: switch (kind) { case AppleWMIsActive: last_activation_time = e->time; [xpbproxy_selection_object () x_active:e->time]; break; case AppleWMIsInactive: [xpbproxy_selection_object () x_inactive:e->time]; break; } break; case AppleWMPasteboardNotify: switch (kind) { case AppleWMCopyToPasteboard: [xpbproxy_selection_object () x_copy:e->time]; } break; } } static void xpbproxy_process_xevents(void) { while (XPending(xpbproxy_dpy) != 0) { @autoreleasepool { XEvent e; XNextEvent(xpbproxy_dpy, &e); switch (e.type) { case SelectionClear: if ([xpbproxy_selection_object ()is_active]) [xpbproxy_selection_object () clear_event:&e.xselectionclear]; break; case SelectionRequest: [xpbproxy_selection_object () request_event:&e.xselectionrequest]; break; case SelectionNotify: [xpbproxy_selection_object () notify_event:&e.xselection]; break; case PropertyNotify: [xpbproxy_selection_object () property_event:&e.xproperty]; break; default: if (e.type >= xpbproxy_apple_wm_event_base && e.type < xpbproxy_apple_wm_event_base + AppleWMNumberEvents) { x_event_apple_wm_notify((XAppleWMNotifyEvent *)&e); } else if (e.type == xpbproxy_xfixes_event_base + XFixesSelectionNotify) { [xpbproxy_selection_object () xfixes_selection_notify:( XFixesSelectionNotifyEvent *)&e]; } break; } XFlush(xpbproxy_dpy); }} } static BOOL add_input_socket(int sock, CFOptionFlags callback_types, CFSocketCallBack callback, const CFSocketContext *ctx, CFRunLoopSourceRef *cf_source) { CFSocketRef cf_sock; cf_sock = CFSocketCreateWithNative(kCFAllocatorDefault, sock, callback_types, callback, ctx); if (cf_sock == NULL) { close(sock); return FALSE; } *cf_source = CFSocketCreateRunLoopSource(kCFAllocatorDefault, cf_sock, 0); CFRelease(cf_sock); if (*cf_source == NULL) return FALSE; CFRunLoopAddSource(CFRunLoopGetCurrent(), *cf_source, kCFRunLoopDefaultMode); return TRUE; } static void x_input_callback(CFSocketRef sock, CFSocketCallBackType type, CFDataRef address, const void *data, void *info) { #ifdef STANDALONE_XPBPROXY if (xpbproxy_prefs_reload) { [xpbproxy_selection_object ()reload_preferences]; xpbproxy_prefs_reload = NO; } #endif xpbproxy_process_xevents(); } BOOL xpbproxy_input_register(void) { return add_input_socket(ConnectionNumber( xpbproxy_dpy), kCFSocketReadCallBack, x_input_callback, NULL, &xpbproxy_dpy_source); } xorg-server-21.1.16/hw/xquartz/pbproxy/x-selection.m0000644000175000017500000012312214757411105016103 /* x-selection.m -- proxies between NSPasteboard and X11 selections * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #import "x-selection.h" #include #include #include #include #import #import #import #import "NSUserDefaults+XQuartzDefaults.h" /* * The basic design of the pbproxy code is as follows. * * When a client selects text, say from an xterm - we only copy it when the * X11 Edit->Copy menu item is pressed or the shortcut activated. In this * case we take the PRIMARY selection, and set it as the NSPasteboard data. * * When an X11 client copies something to the CLIPBOARD, pbproxy greedily grabs * the data, sets it as the NSPasteboard data, and finally sets itself as * owner of the CLIPBOARD. * * When an X11 window is activated we check to see if the NSPasteboard has * changed. If the NSPasteboard has changed, then we set pbproxy as owner * of the PRIMARY and CLIPBOARD and respond to requests for text and images. * * The behavior is now dynamic since the information above was written. * The behavior is now dependent on the pbproxy_prefs below. */ /* * TODO: * 1. handle MULTIPLE - I need to study the ICCCM further, and find a test app. * 2. Handle NSPasteboard updates immediately, not on active/inactive * - Open xterm, run 'cat readme.txt | pbcopy' */ static struct { BOOL active; BOOL primary_on_grab; /* This is provided as an option for people who * want it and has issues that won't ever be * addressed to make it *always* work. */ BOOL clipboard_to_pasteboard; BOOL pasteboard_to_primary; BOOL pasteboard_to_clipboard; } pbproxy_prefs = { YES, NO, YES, YES, YES }; @implementation x_selection static struct propdata null_propdata = { NULL, 0, 0 }; #ifdef DEBUG static void dump_prefs() { ErrorF("pbproxy preferences:\n" "\tactive %u\n" "\tprimary_on_grab %u\n" "\tclipboard_to_pasteboard %u\n" "\tpasteboard_to_primary %u\n" "\tpasteboard_to_clipboard %u\n", pbproxy_prefs.active, pbproxy_prefs.primary_on_grab, pbproxy_prefs.clipboard_to_pasteboard, pbproxy_prefs.pasteboard_to_primary, pbproxy_prefs.pasteboard_to_clipboard); } #endif static void init_propdata(struct propdata *pdata) { *pdata = null_propdata; } static void free_propdata(struct propdata *pdata) { free(pdata->data); *pdata = null_propdata; } /* * Return True if an error occurs. Return False if pdata has data * and we finished. * The property is only deleted when bytesleft is 0 if delete is True. */ static Bool get_property(Window win, Atom property, struct propdata *pdata, Bool delete, Atom *type) { long offset = 0; unsigned long numitems, bytesleft = 0; #ifdef TEST /* This is used to test the growth handling. */ unsigned long length = 4UL; #else unsigned long length = (100000UL + 3) / 4; #endif unsigned char *buf = NULL, *chunk = NULL; size_t buflen = 0, chunkbytesize = 0; int format; TRACE(); if (None == property) return True; do { unsigned long newbuflen = 0; unsigned char *newbuf = NULL; #ifdef TEST ErrorF("bytesleft %lu\n", bytesleft); #endif if (Success != XGetWindowProperty(xpbproxy_dpy, win, property, offset, length, delete, AnyPropertyType, type, &format, &numitems, &bytesleft, &chunk)) { DebugF("Error while getting window property.\n"); *pdata = null_propdata; free(buf); return True; } #ifdef TEST ErrorF("format %d numitems %lu bytesleft %lu\n", format, numitems, bytesleft); ErrorF("type %s\n", XGetAtomName(xpbproxy_dpy, *type)); #endif /* Format is the number of bits. */ if (format == 8) chunkbytesize = numitems; else if (format == 16) chunkbytesize = numitems * sizeof(short); else if (format == 32) chunkbytesize = numitems * sizeof(long); #ifdef TEST ErrorF("chunkbytesize %zu\n", chunkbytesize); #endif newbuflen = buflen + chunkbytesize; if (newbuflen > 0) { newbuf = realloc(buf, newbuflen); if (NULL == newbuf) { XFree(chunk); free(buf); return True; } memcpy(newbuf + buflen, chunk, chunkbytesize); XFree(chunk); buf = newbuf; buflen = newbuflen; /* offset is a multiple of 32 bits*/ offset += chunkbytesize / 4; } else { if (chunk) XFree(chunk); } #ifdef TEST ErrorF("bytesleft %lu\n", bytesleft); #endif } while (bytesleft > 0); pdata->data = buf; pdata->length = buflen; pdata->format = format; return /*success*/ False; } /* Implementation methods */ /* This finds the preferred type from a TARGETS list.*/ - (Atom) find_preferred:(struct propdata *)pdata { Atom a = None; size_t i, step; Bool png = False, jpeg = False, utf8 = False, string = False; TRACE(); if (pdata->format != 32) { ErrorF( "Atom list is expected to be formatted as an array of 32bit values.\n"); return None; } for (i = 0, step = sizeof(long); i < pdata->length; i += step) { a = (Atom) * (long *)(pdata->data + i); if (a == atoms->image_png) { png = True; } else if (a == atoms->image_jpeg) { jpeg = True; } else if (a == atoms->utf8_string) { utf8 = True; } else if (a == atoms->string) { string = True; } else { char *type = XGetAtomName(xpbproxy_dpy, a); if (type) { DebugF("Unhandled X11 mime type: %s", type); XFree(type); } } } /*We prefer PNG over strings, and UTF8 over a Latin-1 string.*/ if (png) return atoms->image_png; if (jpeg) return atoms->image_jpeg; if (utf8) return atoms->utf8_string; if (string) return atoms->string; /* This is evidently something we don't know how to handle.*/ return None; } /* Return True if this is an INCR-style transfer. */ - (Bool) is_incr_type:(XSelectionEvent *)e { Atom seltype; int format; unsigned long numitems = 0UL, bytesleft = 0UL; unsigned char *chunk; TRACE(); if (Success != XGetWindowProperty(xpbproxy_dpy, e->requestor, e->property, /*offset*/ 0L, /*length*/ 4UL, /*Delete*/ False, AnyPropertyType, &seltype, &format, &numitems, &bytesleft, &chunk)) { return False; } if (chunk) XFree(chunk); return (seltype == atoms->incr) ? True : False; } /* * This should be called after a selection has been copied, * or when the selection is unfinished before a transfer completes. */ - (void) release_pending { TRACE(); free_propdata(&pending.propdata); pending.requestor = None; pending.selection = None; } /* Return True if an error occurs during an append.*/ /* Return False if the append succeeds. */ - (Bool) append_to_pending:(struct propdata *)pdata requestor:(Window) requestor { unsigned char *newdata; size_t newlength; TRACE(); if (requestor != pending.requestor) { [self release_pending]; pending.requestor = requestor; } newlength = pending.propdata.length + pdata->length; newdata = realloc(pending.propdata.data, newlength); if (NULL == newdata) { perror("realloc propdata"); [self release_pending]; return True; } memcpy(newdata + pending.propdata.length, pdata->data, pdata->length); pending.propdata.data = newdata; pending.propdata.length = newlength; return False; } /* Called when X11 becomes active (i.e. has key focus) */ - (void) x_active:(Time)timestamp { static NSInteger changeCount; NSInteger countNow; NSPasteboard *pb; TRACE(); pb = [NSPasteboard generalPasteboard]; if (nil == pb) return; countNow = [pb changeCount]; if (countNow != changeCount) { DebugF("changed pasteboard!\n"); changeCount = countNow; if (pbproxy_prefs.pasteboard_to_primary) { XSetSelectionOwner(xpbproxy_dpy, atoms->primary, _selection_window, CurrentTime); } if (pbproxy_prefs.pasteboard_to_clipboard) { [self own_clipboard]; } } #if 0 /*gstaplin: we should perhaps investigate something like this branch above...*/ if ([_pasteboard availableTypeFromArray: _known_types] != nil) { /* Pasteboard has data we should proxy; I think it makes sense to put it on both CLIPBOARD and PRIMARY */ XSetSelectionOwner(xpbproxy_dpy, atoms->clipboard, _selection_window, timestamp); XSetSelectionOwner(xpbproxy_dpy, atoms->primary, _selection_window, timestamp); } #endif } /* Called when X11 loses key focus */ - (void) x_inactive:(Time)timestamp { TRACE(); } /* This requests the TARGETS list from the PRIMARY selection owner. */ - (void) x_copy_request_targets { TRACE(); request_atom = atoms->targets; XConvertSelection(xpbproxy_dpy, atoms->primary, atoms->targets, atoms->primary, _selection_window, CurrentTime); } /* Called when the Edit/Copy item on the main X11 menubar is selected * and no appkit window claims it. */ - (void) x_copy:(Time)timestamp { Window w; TRACE(); w = XGetSelectionOwner(xpbproxy_dpy, atoms->primary); if (None != w) { ++pending_copy; if (1 == pending_copy) { /* * There are no other copy operations in progress, so we * can proceed safely. Otherwise the copy_completed method * will see that the pending_copy is > 1, and do another copy. */ [self x_copy_request_targets]; } } } /* Set pbproxy as owner of the SELECTION_MANAGER selection. * This prevents tools like xclipboard from causing havoc. * Returns TRUE on success */ - (BOOL) set_clipboard_manager_status:(BOOL)value { TRACE(); Window owner = XGetSelectionOwner(xpbproxy_dpy, atoms->clipboard_manager); if (value) { if (owner == _selection_window) return TRUE; if (owner != None) { ErrorF( "A clipboard manager using window 0x%lx already owns the clipboard selection. " "pbproxy will not sync clipboard to pasteboard.\n", owner); return FALSE; } XSetSelectionOwner(xpbproxy_dpy, atoms->clipboard_manager, _selection_window, CurrentTime); return (_selection_window == XGetSelectionOwner(xpbproxy_dpy, atoms->clipboard_manager)); } else { if (owner != _selection_window) return TRUE; XSetSelectionOwner(xpbproxy_dpy, atoms->clipboard_manager, None, CurrentTime); return (None == XGetSelectionOwner(xpbproxy_dpy, atoms->clipboard_manager)); } return FALSE; } /* * This occurs when we previously owned a selection, * and then lost it from another client. */ - (void) clear_event:(XSelectionClearEvent *)e { TRACE(); DebugF("e->selection %s\n", XGetAtomName(xpbproxy_dpy, e->selection)); if (e->selection == atoms->clipboard) { /* * We lost ownership of the CLIPBOARD. */ ++pending_clipboard; if (1 == pending_clipboard) { /* Claim the clipboard contents from the new owner. */ [self claim_clipboard]; } } else if (e->selection == atoms->clipboard_manager) { if (pbproxy_prefs.clipboard_to_pasteboard) { /* Another CLIPBOARD_MANAGER has set itself as owner. Disable syncing * to avoid a race. */ ErrorF("Another clipboard manager was started! " "xpbproxy is disabling syncing with clipboard.\n"); pbproxy_prefs.clipboard_to_pasteboard = NO; } } } /* * We greedily acquire the clipboard after it changes, and on startup. */ - (void) claim_clipboard { Window owner; TRACE(); if (!pbproxy_prefs.clipboard_to_pasteboard) return; owner = XGetSelectionOwner(xpbproxy_dpy, atoms->clipboard); if (None == owner) { /* * The owner probably died or we are just starting up pbproxy. * Set pbproxy's _selection_window as the owner, and continue. */ DebugF("No clipboard owner.\n"); [self copy_completed:atoms->clipboard]; return; } else if (owner == _selection_window) { [self copy_completed:atoms->clipboard]; return; } DebugF("requesting targets\n"); request_atom = atoms->targets; XConvertSelection(xpbproxy_dpy, atoms->clipboard, atoms->targets, atoms->clipboard, _selection_window, CurrentTime); XFlush(xpbproxy_dpy); /* Now we will get a SelectionNotify event in the future. */ } /* Greedily acquire the clipboard. */ - (void) own_clipboard { TRACE(); /* We should perhaps have a boundary limit on the number of iterations... */ do { XSetSelectionOwner(xpbproxy_dpy, atoms->clipboard, _selection_window, CurrentTime); } while (_selection_window != XGetSelectionOwner(xpbproxy_dpy, atoms->clipboard)); } - (void) init_reply:(XEvent *)reply request:(XSelectionRequestEvent *)e { reply->xselection.type = SelectionNotify; reply->xselection.selection = e->selection; reply->xselection.target = e->target; reply->xselection.requestor = e->requestor; reply->xselection.time = e->time; reply->xselection.property = None; } - (void) send_reply:(XEvent *)reply { /* * We are supposed to use an empty event mask, and not propagate * the event, according to the ICCCM. */ DebugF("reply->xselection.requestor 0x%lx\n", reply->xselection.requestor); XSendEvent(xpbproxy_dpy, reply->xselection.requestor, False, 0, reply); XFlush(xpbproxy_dpy); } /* * This responds to a TARGETS request. * The result is a list of a ATOMs that correspond to the types available * for a selection. * For instance an application might provide a UTF8_STRING and a STRING * (in Latin-1 encoding). The requestor can then make the choice based on * the list. */ - (void) send_targets:(XSelectionRequestEvent *)e pasteboard:(NSPasteboard *) pb { XEvent reply; NSArray *pbtypes; [self init_reply:&reply request:e]; pbtypes = [pb types]; if (pbtypes) { long list[7]; /* Don't forget to increase this if we handle more types! */ long count = 0; /* * I'm not sure if this is needed, but some toolkits/clients list * TARGETS in response to targets. */ list[count] = atoms->targets; ++count; if ([pbtypes containsObject:NSStringPboardType]) { /* We have a string type that we can convert to UTF8, or Latin-1... */ DebugF("NSStringPboardType\n"); list[count] = atoms->utf8_string; ++count; list[count] = atoms->string; ++count; list[count] = atoms->compound_text; ++count; } /* TODO add the NSPICTPboardType back again, once we have conversion * functionality in send_image. */ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType #endif if ([pbtypes containsObject:NSPICTPboardType] || [pbtypes containsObject:NSTIFFPboardType]) { /* We can convert a TIFF to a PNG or JPEG. */ DebugF("NSTIFFPboardType\n"); list[count] = atoms->image_png; ++count; list[count] = atoms->image_jpeg; ++count; } #ifdef __clang__ #pragma clang diagnostic pop #endif if (count) { /* We have a list of ATOMs to send. */ XChangeProperty(xpbproxy_dpy, e->requestor, e->property, atoms->atom, 32, PropModeReplace, (unsigned char *)list, count); reply.xselection.property = e->property; } } [self send_reply:&reply]; } - (void) send_string:(XSelectionRequestEvent *)e utf8:(BOOL)utf8 pasteboard:( NSPasteboard *)pb { XEvent reply; NSArray *pbtypes; NSString *data; const char *bytes; NSUInteger length; TRACE(); [self init_reply:&reply request:e]; pbtypes = [pb types]; if (![pbtypes containsObject:NSStringPboardType]) { [self send_reply:&reply]; return; } DebugF("pbtypes retainCount after containsObject: %lu\n", [pbtypes retainCount]); data = [pb stringForType:NSStringPboardType]; if (nil == data) { [self send_reply:&reply]; return; } if (utf8) { bytes = [data UTF8String]; /* * We don't want the UTF-8 string length here. * We want the length in bytes. */ length = strlen(bytes); if (length < 50) { DebugF("UTF-8: %s\n", bytes); DebugF("UTF-8 length: %lu\n", length); } } else { DebugF("Latin-1\n"); bytes = [data cStringUsingEncoding:NSISOLatin1StringEncoding]; /*WARNING: bytes is not NUL-terminated. */ length = [data lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding]; } DebugF("e->target %s\n", XGetAtomName(xpbproxy_dpy, e->target)); XChangeProperty(xpbproxy_dpy, e->requestor, e->property, e->target, 8, PropModeReplace, (unsigned char *)bytes, length); reply.xselection.property = e->property; [self send_reply:&reply]; } - (void) send_compound_text:(XSelectionRequestEvent *)e pasteboard:( NSPasteboard *)pb { XEvent reply; NSArray *pbtypes; TRACE(); [self init_reply:&reply request:e]; pbtypes = [pb types]; if ([pbtypes containsObject: NSStringPboardType]) { NSString *data = [pb stringForType:NSStringPboardType]; if (nil != data) { /* * Cast to (void *) to avoid a const warning. * AFAIK Xutf8TextListToTextProperty does not modify the input memory. */ void *utf8 = (void *)[data UTF8String]; char *list[] = { utf8, NULL }; XTextProperty textprop; textprop.value = NULL; if (Success == Xutf8TextListToTextProperty(xpbproxy_dpy, list, 1, XCompoundTextStyle, &textprop)) { if (8 != textprop.format) DebugF( "textprop.format is unexpectedly not 8 - it's %d instead\n", textprop.format); XChangeProperty(xpbproxy_dpy, e->requestor, e->property, atoms->compound_text, textprop.format, PropModeReplace, textprop.value, textprop.nitems); reply.xselection.property = e->property; } if (textprop.value) XFree(textprop.value); } } [self send_reply:&reply]; } /* Finding a test application that uses MULTIPLE has proven to be difficult. */ - (void) send_multiple:(XSelectionRequestEvent *)e { XEvent reply; TRACE(); [self init_reply:&reply request:e]; if (None != e->property) {} [self send_reply:&reply]; } /* Return nil if an error occurred. */ /* DO NOT retain the encdata for longer than the length of an event response. * The autorelease pool will reuse/free it. */ - (NSData *) encode_image_data:(NSData *)data type:(NSBitmapImageFileType) enctype { NSBitmapImageRep *bmimage = nil; NSData *encdata = nil; NSDictionary *dict = nil; bmimage = [[NSBitmapImageRep alloc] initWithData:data]; if (nil == bmimage) return nil; dict = [[NSDictionary alloc] init]; encdata = [bmimage representationUsingType:enctype properties:dict]; if (nil == encdata) { [dict autorelease]; [bmimage autorelease]; return nil; } [dict autorelease]; [bmimage autorelease]; return encdata; } /* Return YES when an error has occurred when trying to send the PICT. */ /* The caller should send a default response with a property of None when an error occurs. */ - (BOOL) send_image_pict_reply:(XSelectionRequestEvent *)e pasteboard:(NSPasteboard *)pb type:(NSBitmapImageFileType)imagetype { XEvent reply; NSImage *img = nil; NSData *data = nil, *encdata = nil; NSUInteger length; const void *bytes = NULL; img = [[NSImage alloc] initWithPasteboard:pb]; if (nil == img) { return YES; } data = [img TIFFRepresentation]; if (nil == data) { [img autorelease]; ErrorF("unable to convert PICT to TIFF!\n"); return YES; } encdata = [self encode_image_data:data type:imagetype]; if (nil == encdata) { [img autorelease]; return YES; } [self init_reply:&reply request:e]; length = [encdata length]; bytes = [encdata bytes]; XChangeProperty(xpbproxy_dpy, e->requestor, e->property, e->target, 8, PropModeReplace, bytes, length); reply.xselection.property = e->property; [self send_reply:&reply]; [img autorelease]; return NO; /*no error*/ } /* Return YES if an error occurred. */ /* The caller should send a reply with a property of None when an error occurs. */ - (BOOL) send_image_tiff_reply:(XSelectionRequestEvent *)e pasteboard:(NSPasteboard *)pb type:(NSBitmapImageFileType)imagetype { XEvent reply; NSData *data = nil; NSData *encdata = nil; NSUInteger length; const void *bytes = NULL; data = [pb dataForType:NSTIFFPboardType]; if (nil == data) return YES; encdata = [self encode_image_data:data type:imagetype]; if (nil == encdata) return YES; [self init_reply:&reply request:e]; length = [encdata length]; bytes = [encdata bytes]; XChangeProperty(xpbproxy_dpy, e->requestor, e->property, e->target, 8, PropModeReplace, bytes, length); reply.xselection.property = e->property; [self send_reply:&reply]; return NO; /*no error*/ } - (void) send_image:(XSelectionRequestEvent *)e pasteboard:(NSPasteboard *)pb { NSArray *pbtypes = nil; NSBitmapImageFileType imagetype = NSPNGFileType; TRACE(); if (e->target == atoms->image_png) imagetype = NSPNGFileType; else if (e->target == atoms->image_jpeg) imagetype = NSJPEGFileType; else { ErrorF( "internal failure in xpbproxy! imagetype being sent isn't PNG or JPEG.\n"); } pbtypes = [pb types]; if (pbtypes) { if ([pbtypes containsObject:NSTIFFPboardType]) { if (NO == [self send_image_tiff_reply:e pasteboard:pb type:imagetype]) return; } #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" // NSPICTPboardType #endif else if ([pbtypes containsObject:NSPICTPboardType]) #ifdef __clang__ #pragma clang diagnostic pop #endif { if (NO == [self send_image_pict_reply:e pasteboard:pb type:imagetype]) return; /* Fall through intentionally to the send_none: */ } } [self send_none:e]; } - (void)send_none:(XSelectionRequestEvent *)e { XEvent reply; TRACE(); [self init_reply:&reply request:e]; [self send_reply:&reply]; } /* Another client requested the data or targets of data available from the clipboard. */ - (void)request_event:(XSelectionRequestEvent *)e { NSPasteboard *pb; TRACE(); /* TODO We should also keep track of the time of the selection, and * according to the ICCCM "refuse the request" if the event timestamp * is before we owned it. * What should we base the time on? How can we get the current time just * before an XSetSelectionOwner? Is it the server's time, or the clients? * According to the XSelectionRequestEvent manual page, the Time value * may be set to CurrentTime or a time, so that makes it a bit different. * Perhaps we should just punt and ignore races. */ /*TODO we need a COMPOUND_TEXT test app*/ /*TODO we need a MULTIPLE test app*/ pb = [NSPasteboard generalPasteboard]; if (nil == pb) { [self send_none:e]; return; } if (None != e->target) DebugF("e->target %s\n", XGetAtomName(xpbproxy_dpy, e->target)); if (e->target == atoms->targets) { /* The paste requestor wants to know what TARGETS we support. */ [self send_targets:e pasteboard:pb]; } else if (e->target == atoms->multiple) { /* * This isn't finished, and may never be, unless I can find * a good test app. */ [self send_multiple:e]; } else if (e->target == atoms->utf8_string) { [self send_string:e utf8:YES pasteboard:pb]; } else if (e->target == atoms->string) { [self send_string:e utf8:NO pasteboard:pb]; } else if (e->target == atoms->compound_text) { [self send_compound_text:e pasteboard:pb]; } else if (e->target == atoms->multiple) { [self send_multiple:e]; } else if (e->target == atoms->image_png || e->target == atoms->image_jpeg) { [self send_image:e pasteboard:pb]; } else { [self send_none:e]; } } /* This handles the events resulting from an XConvertSelection request. */ - (void) notify_event:(XSelectionEvent *)e { Atom type; struct propdata pdata; TRACE(); [self release_pending]; if (None == e->property) { DebugF("e->property is None.\n"); [self copy_completed:e->selection]; /* Nothing is selected. */ return; } #if 0 ErrorF("e->selection %s\n", XGetAtomName(xpbproxy_dpy, e->selection)); ErrorF("e->property %s\n", XGetAtomName(xpbproxy_dpy, e->property)); #endif if ([self is_incr_type:e]) { /* * This is an INCR-style transfer, which means that we * will get the data after a series of PropertyNotify events. */ DebugF("is INCR\n"); if (get_property(e->requestor, e->property, &pdata, /*Delete*/ True, &type)) { /* * An error occurred, so we should invoke the copy_completed:, but * not handle_selection:type:propdata: */ [self copy_completed:e->selection]; return; } free_propdata(&pdata); pending.requestor = e->requestor; pending.selection = e->selection; DebugF("set pending.requestor to 0x%lx\n", pending.requestor); } else { if (get_property(e->requestor, e->property, &pdata, /*Delete*/ True, &type)) { [self copy_completed:e->selection]; return; } /* We have the complete selection data.*/ [self handle_selection:e->selection type:type propdata:&pdata]; DebugF("handled selection with the first notify_event\n"); } } /* This is used for INCR transfers. See the ICCCM for the details. */ /* This is used to retrieve PRIMARY and CLIPBOARD selections. */ - (void) property_event:(XPropertyEvent *)e { struct propdata pdata; Atom type; TRACE(); if (None != e->atom) { #ifdef DEBUG char *name = XGetAtomName(xpbproxy_dpy, e->atom); if (name) { DebugF("e->atom %s\n", name); XFree(name); } #endif } if (None != pending.requestor && PropertyNewValue == e->state) { DebugF("pending.requestor 0x%lx\n", pending.requestor); if (get_property(e->window, e->atom, &pdata, /*Delete*/ True, &type)) { [self copy_completed:pending.selection]; [self release_pending]; return; } if (0 == pdata.length) { /* * We completed the transfer. * handle_selection will call copy_completed: for us. */ [self handle_selection:pending.selection type:type propdata:& pending.propdata]; free_propdata(&pdata); pending.propdata = null_propdata; pending.requestor = None; pending.selection = None; } else { [self append_to_pending:&pdata requestor:e->window]; free_propdata(&pdata); } } } - (void) xfixes_selection_notify:(XFixesSelectionNotifyEvent *)e { if (!pbproxy_prefs.active) return; switch (e->subtype) { case XFixesSetSelectionOwnerNotify: if (e->selection == atoms->primary && pbproxy_prefs.primary_on_grab) [self x_copy:e->timestamp]; break; case XFixesSelectionWindowDestroyNotify: case XFixesSelectionClientCloseNotify: default: ErrorF("Unhandled XFixesSelectionNotifyEvent: subtype=%d\n", e->subtype); break; } } - (void) handle_targets: (Atom)selection propdata:(struct propdata *)pdata { /* Find a type we can handle and prefer from the list of ATOMs. */ Atom preferred; char *name; TRACE(); preferred = [self find_preferred:pdata]; if (None == preferred) { /* * This isn't required by the ICCCM, but some apps apparently * don't respond to TARGETS properly. */ preferred = atoms->string; } (void)name; /* Avoid a warning with non-debug compiles. */ #ifdef DEBUG name = XGetAtomName(xpbproxy_dpy, preferred); if (name) { DebugF("requesting %s\n", name); } #endif request_atom = preferred; XConvertSelection(xpbproxy_dpy, selection, preferred, selection, _selection_window, CurrentTime); } /* This handles the image type of selection (typically in CLIPBOARD). */ /* We convert to a TIFF, so that other applications can paste more easily. */ - (void) handle_image: (struct propdata *)pdata pasteboard:(NSPasteboard *)pb { NSArray *pbtypes; NSUInteger length; NSData *data, *tiff; NSBitmapImageRep *bmimage; TRACE(); length = pdata->length; data = [[NSData alloc] initWithBytes:pdata->data length:length]; if (nil == data) { DebugF("unable to create NSData object!\n"); return; } DebugF("data retainCount before NSBitmapImageRep initWithData: %lu\n", [data retainCount]); bmimage = [[NSBitmapImageRep alloc] initWithData:data]; if (nil == bmimage) { [data autorelease]; DebugF("unable to create NSBitmapImageRep!\n"); return; } DebugF("data retainCount after NSBitmapImageRep initWithData: %lu\n", [data retainCount]); @try { tiff = [bmimage TIFFRepresentation]; } @catch (NSException *e) { DebugF("NSTIFFException!\n"); [data autorelease]; [bmimage autorelease]; return; } DebugF("bmimage retainCount after TIFFRepresentation %lu\n", [bmimage retainCount]); pbtypes = [NSArray arrayWithObjects:NSTIFFPboardType, nil]; if (nil == pbtypes) { [data autorelease]; [bmimage autorelease]; return; } [pb declareTypes:pbtypes owner:nil]; if (YES != [pb setData:tiff forType:NSTIFFPboardType]) { DebugF("writing pasteboard data failed!\n"); } [data autorelease]; DebugF("bmimage retainCount before release %lu\n", [bmimage retainCount]); [bmimage autorelease]; } /* This handles the UTF8_STRING type of selection. */ - (void) handle_utf8_string:(struct propdata *)pdata pasteboard:(NSPasteboard *)pb { NSString *string; NSArray *pbtypes; TRACE(); string = [[NSString alloc] initWithBytes:pdata->data length:pdata->length encoding: NSUTF8StringEncoding]; if (nil == string) return; pbtypes = [NSArray arrayWithObjects:NSStringPboardType, nil]; if (nil == pbtypes) { [string autorelease]; return; } [pb declareTypes:pbtypes owner:nil]; if (YES != [pb setString:string forType:NSStringPboardType]) { ErrorF("pasteboard setString:forType: failed!\n"); } [string autorelease]; DebugF("done handling utf8 string\n"); } /* This handles the STRING type, which should be in Latin-1. */ - (void) handle_string: (struct propdata *)pdata pasteboard:(NSPasteboard *) pb { NSString *string; NSArray *pbtypes; TRACE(); string = [[NSString alloc] initWithBytes:pdata->data length:pdata->length encoding: NSISOLatin1StringEncoding]; if (nil == string) return; pbtypes = [NSArray arrayWithObjects:NSStringPboardType, nil]; if (nil == pbtypes) { [string autorelease]; return; } [pb declareTypes:pbtypes owner:nil]; if (YES != [pb setString:string forType:NSStringPboardType]) { ErrorF("pasteboard setString:forType failed in handle_string!\n"); } [string autorelease]; } /* This is called when the selection is completely retrieved from another client. */ /* Warning: this frees the propdata. */ - (void) handle_selection:(Atom)selection type:(Atom)type propdata:(struct propdata *)pdata { NSPasteboard *pb; TRACE(); pb = [NSPasteboard generalPasteboard]; if (nil == pb) { [self copy_completed:selection]; free_propdata(pdata); return; } /* * Some apps it seems set the type to TARGETS instead of ATOM, such as Eterm. * These aren't ICCCM compliant apps, but we need these to work... */ if (request_atom == atoms->targets && (type == atoms->atom || type == atoms->targets)) { [self handle_targets:selection propdata:pdata]; free_propdata(pdata); return; } else if (type == atoms->image_png) { [self handle_image:pdata pasteboard:pb]; } else if (type == atoms->image_jpeg) { [self handle_image:pdata pasteboard:pb]; } else if (type == atoms->utf8_string) { [self handle_utf8_string:pdata pasteboard:pb]; } else if (type == atoms->string) { [self handle_string:pdata pasteboard:pb]; } free_propdata(pdata); [self copy_completed:selection]; } - (void) copy_completed:(Atom)selection { TRACE(); char *name; (void)name; /* Avoid warning with non-debug compiles. */ #ifdef DEBUG name = XGetAtomName(xpbproxy_dpy, selection); if (name) { DebugF("copy_completed: %s\n", name); XFree(name); } #endif if (selection == atoms->primary && pending_copy > 0) { --pending_copy; if (pending_copy > 0) { /* Copy PRIMARY again. */ [self x_copy_request_targets]; return; } } else if (selection == atoms->clipboard && pending_clipboard > 0) { --pending_clipboard; if (pending_clipboard > 0) { /* Copy CLIPBOARD. */ [self claim_clipboard]; return; } else { /* We got the final data. Now set pbproxy as the owner. */ [self own_clipboard]; return; } } /* * We had 1 or more primary in progress, and the clipboard arrived * while we were busy. */ if (pending_clipboard > 0) { [self claim_clipboard]; } } - (void) reload_preferences { NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; #ifdef STANDALONE_XPBPROXY if (xpbproxy_is_standalone) pbproxy_prefs.active = YES; else #endif pbproxy_prefs.active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard]; pbproxy_prefs.primary_on_grab = [defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect]; pbproxy_prefs.clipboard_to_pasteboard = [defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard]; pbproxy_prefs.pasteboard_to_primary = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary]; pbproxy_prefs.pasteboard_to_clipboard = [defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard]; /* This is used for debugging. */ //dump_prefs(); if (pbproxy_prefs.active && pbproxy_prefs.primary_on_grab && !xpbproxy_have_xfixes) { ErrorF( "Disabling sync_primary_on_select functionality due to missing XFixes extension.\n"); pbproxy_prefs.primary_on_grab = NO; } /* Claim or release the CLIPBOARD_MANAGER atom */ if (![self set_clipboard_manager_status:(pbproxy_prefs.active && pbproxy_prefs. clipboard_to_pasteboard)]) pbproxy_prefs.clipboard_to_pasteboard = NO; if (pbproxy_prefs.active && pbproxy_prefs.clipboard_to_pasteboard) [self claim_clipboard]; } - (BOOL) is_active { return pbproxy_prefs.active; } /* NSPasteboard-required methods */ - (void) paste:(id)sender { TRACE(); } - (void) pasteboard:(NSPasteboard *)pb provideDataForType:(NSString *)type { TRACE(); } - (void) pasteboardChangedOwner:(NSPasteboard *)pb { TRACE(); /* Right now we don't care with this. */ } /* Allocation */ - (id) init { unsigned long pixel; self = [super init]; if (self == nil) return nil; atoms->primary = XInternAtom(xpbproxy_dpy, "PRIMARY", False); atoms->clipboard = XInternAtom(xpbproxy_dpy, "CLIPBOARD", False); atoms->text = XInternAtom(xpbproxy_dpy, "TEXT", False); atoms->utf8_string = XInternAtom(xpbproxy_dpy, "UTF8_STRING", False); atoms->string = XInternAtom(xpbproxy_dpy, "STRING", False); atoms->targets = XInternAtom(xpbproxy_dpy, "TARGETS", False); atoms->multiple = XInternAtom(xpbproxy_dpy, "MULTIPLE", False); atoms->cstring = XInternAtom(xpbproxy_dpy, "CSTRING", False); atoms->image_png = XInternAtom(xpbproxy_dpy, "image/png", False); atoms->image_jpeg = XInternAtom(xpbproxy_dpy, "image/jpeg", False); atoms->incr = XInternAtom(xpbproxy_dpy, "INCR", False); atoms->atom = XInternAtom(xpbproxy_dpy, "ATOM", False); atoms->clipboard_manager = XInternAtom(xpbproxy_dpy, "CLIPBOARD_MANAGER", False); atoms->compound_text = XInternAtom(xpbproxy_dpy, "COMPOUND_TEXT", False); atoms->atom_pair = XInternAtom(xpbproxy_dpy, "ATOM_PAIR", False); pixel = BlackPixel(xpbproxy_dpy, DefaultScreen(xpbproxy_dpy)); _selection_window = XCreateSimpleWindow(xpbproxy_dpy, DefaultRootWindow(xpbproxy_dpy), 0, 0, 1, 1, 0, pixel, pixel); /* This is used to get PropertyNotify events when doing INCR transfers. */ XSelectInput(xpbproxy_dpy, _selection_window, PropertyChangeMask); request_atom = None; init_propdata(&pending.propdata); pending.requestor = None; pending.selection = None; pending_copy = 0; pending_clipboard = 0; if (xpbproxy_have_xfixes) XFixesSelectSelectionInput(xpbproxy_dpy, _selection_window, atoms->primary, XFixesSetSelectionOwnerNotifyMask); [self reload_preferences]; return self; } - (void) dealloc { if (None != _selection_window) { XDestroyWindow(xpbproxy_dpy, _selection_window); _selection_window = None; } free_propdata(&pending.propdata); [super dealloc]; } @end xorg-server-21.1.16/hw/xquartz/pbproxy/app-main.m0000644000175000017500000000444714757411105015363 /* app-main.m * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "pbproxy.h" #import "x-selection.h" /* Stubs */ char *display = NULL; static void signal_handler(int sig) { switch (sig) { case SIGHUP: xpbproxy_prefs_reload = YES; break; default: _exit(EXIT_SUCCESS); } } void ErrorF(const char * f, ...) { va_list args; va_start(args, f); vfprintf(stderr, f, args); va_end(args); } /* TODO: Have this actually log to ASL */ void xq_asl_log(int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...) { #ifdef DEBUG va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); #endif } int main(int argc, const char *argv[]) { xpbproxy_is_standalone = YES; signal(SIGINT, signal_handler); signal(SIGTERM, signal_handler); signal(SIGHUP, signal_handler); signal(SIGPIPE, SIG_IGN); return xpbproxy_run(); } xorg-server-21.1.16/hw/xquartz/pbproxy/pbproxy.h0000644000175000017500000000701414757411105015350 /* pbproxy.h * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef PBPROXY_H #define PBPROXY_H 1 #import #include #define Cursor X_Cursor #undef _SHAPE_H_ #include #include #undef Cursor #ifdef STANDALONE_XPBPROXY /* Just used for the standalone to respond to SIGHUP to reload prefs */ extern BOOL xpbproxy_prefs_reload; /* Setting this to YES (for the standalone app) causes us to ignore the * 'sync_pasteboard' defaults preference since we assume it to be on... this is * mainly useful for debugging/developing xpbproxy with XQuartz still running. * Just disable the one in the server with X11's preference pane, then run * the standalone app. */ extern BOOL xpbproxy_is_standalone; #endif /* from main.m */ extern void xpbproxy_set_is_active(BOOL state); extern BOOL xpbproxy_get_is_active(void); extern id xpbproxy_selection_object(void); extern Time xpbproxy_current_timestamp(void); extern int xpbproxy_run(void); extern Display *xpbproxy_dpy; extern int xpbproxy_apple_wm_event_base, xpbproxy_apple_wm_error_base; extern int xpbproxy_xfixes_event_base, xpbproxy_xfixes_error_base; extern BOOL xpbproxy_have_xfixes; /* from x-input.m */ extern BOOL xpbproxy_input_register(void); /* os/log.c or app-main.m */ extern void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); /* from darwin.h */ _X_ATTRIBUTE_PRINTF(6, 7) extern void xq_asl_log(int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...); #define ASL_LOG(level, subsystem, msg, args ...) xq_asl_log(level, subsystem, \ __FILE__, \ __FUNCTION__, \ __LINE__, msg, \ ## args) #define DebugF(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, \ "xpbproxy", msg, \ ## args) #define TRACE() DebugF("TRACE") #endif /* PBPROXY_H */ xorg-server-21.1.16/hw/xquartz/pbproxy/x-selection.h0000644000175000017500000000676114757411105016107 /* x-selection.h -- proxies between NSPasteboard and X11 selections * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X_SELECTION_H #define X_SELECTION_H 1 #include "pbproxy.h" #define Cursor X_Cursor #include #undef Cursor #include /* This stores image data or text. */ struct propdata { unsigned char *data; size_t length; int format; }; struct atom_list { Atom primary, clipboard, text, utf8_string, string, targets, multiple, cstring, image_png, image_jpeg, incr, atom, clipboard_manager, compound_text, atom_pair; }; @interface x_selection : NSObject { @private /* The unmapped window we use for fetching selections. */ Window _selection_window; Atom request_atom; struct { struct propdata propdata; Window requestor; Atom selection; } pending; /* * This is the number of times the user has requested a copy. * Once the copy is completed, we --pending_copy, and if the * pending_copy is > 0 we do it again. */ int pending_copy; /* * This is used for the same purpose as pending_copy, but for the * CLIPBOARD. It also prevents a race with INCR transfers. */ int pending_clipboard; struct atom_list atoms[1]; } - (void)x_active:(Time)timestamp; - (void)x_inactive:(Time)timestamp; - (void)x_copy:(Time)timestamp; - (void)clear_event:(XSelectionClearEvent *)e; - (void)request_event:(XSelectionRequestEvent *)e; - (void)notify_event:(XSelectionEvent *)e; - (void)property_event:(XPropertyEvent *)e; - (void)xfixes_selection_notify:(XFixesSelectionNotifyEvent *)e; - (void)handle_selection:(Atom) selection type:(Atom) type propdata:(struct propdata *)pdata; - (void)claim_clipboard; - (BOOL)set_clipboard_manager_status:(BOOL)value; - (void)own_clipboard; - (void)copy_completed:(Atom)selection; - (void)reload_preferences; - (BOOL)is_active; - (void)send_none:(XSelectionRequestEvent *)e; @end /* main.m */ extern x_selection * _selection_object; #endif /* X_SELECTION_H */ xorg-server-21.1.16/hw/xquartz/xpr/0000755000175000017500000000000014757411136012664 5xorg-server-21.1.16/hw/xquartz/xpr/meson.build0000644000175000017500000000066414757411105014750 libXquartzXpr = static_library('XquartzXpr', [ 'appledri.c', 'dri.c', 'driWrap.c', 'xprAppleWM.c', 'xprCursor.c', 'xprEvent.c', 'xprFrame.c', 'xprScreen.c', 'x-hash.c', 'x-hook.c', 'x-list.c', ], include_directories: [inc, '..', '../../../pseudoramiX', '../../../miext/rootless'], c_args: [bundle_id_def, '-DXQUARTZ'], dependencies: [xproto_dep, pixman_dep], ) xorg-server-21.1.16/hw/xquartz/xpr/Makefile.am0000644000175000017500000000100514757411105014630 noinst_LTLIBRARIES = libXquartzXpr.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(srcdir) -I$(srcdir)/.. \ -I$(top_builddir)/pseudoramiX \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ driWrap.c \ xprAppleWM.c \ xprCursor.c \ xprEvent.c \ xprFrame.c \ xprScreen.c \ x-hash.c \ x-hook.c \ x-list.c EXTRA_DIST = \ dri.h \ driWrap.h \ dristruct.h \ appledri.h \ appledristr.h \ x-hash.h \ x-hook.h \ x-list.h \ xpr.h \ xprEvent.h xorg-server-21.1.16/hw/xquartz/xpr/Makefile.in0000644000175000017500000006537414757411116014666 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xquartz/xpr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXquartzXpr_la_LIBADD = am_libXquartzXpr_la_OBJECTS = appledri.lo dri.lo driWrap.lo \ xprAppleWM.lo xprCursor.lo xprEvent.lo xprFrame.lo \ xprScreen.lo x-hash.lo x-hook.lo x-list.lo libXquartzXpr_la_OBJECTS = $(am_libXquartzXpr_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/appledri.Plo ./$(DEPDIR)/dri.Plo \ ./$(DEPDIR)/driWrap.Plo ./$(DEPDIR)/x-hash.Plo \ ./$(DEPDIR)/x-hook.Plo ./$(DEPDIR)/x-list.Plo \ ./$(DEPDIR)/xprAppleWM.Plo ./$(DEPDIR)/xprCursor.Plo \ ./$(DEPDIR)/xprEvent.Plo ./$(DEPDIR)/xprFrame.Plo \ ./$(DEPDIR)/xprScreen.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libXquartzXpr_la_SOURCES) DIST_SOURCES = $(libXquartzXpr_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXquartzXpr.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -I$(srcdir) -I$(srcdir)/.. \ -I$(top_builddir)/pseudoramiX \ -I$(top_srcdir)/miext \ -I$(top_srcdir)/miext/rootless libXquartzXpr_la_SOURCES = \ appledri.c \ dri.c \ driWrap.c \ xprAppleWM.c \ xprCursor.c \ xprEvent.c \ xprFrame.c \ xprScreen.c \ x-hash.c \ x-hook.c \ x-list.c EXTRA_DIST = \ dri.h \ driWrap.h \ dristruct.h \ appledri.h \ appledristr.h \ x-hash.h \ x-hook.h \ x-list.h \ xpr.h \ xprEvent.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/xpr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/xpr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXquartzXpr.la: $(libXquartzXpr_la_OBJECTS) $(libXquartzXpr_la_DEPENDENCIES) $(EXTRA_libXquartzXpr_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXquartzXpr_la_OBJECTS) $(libXquartzXpr_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/appledri.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/driWrap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-hook.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x-list.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprAppleWM.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprCursor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprEvent.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprFrame.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprScreen.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/appledri.Plo -rm -f ./$(DEPDIR)/dri.Plo -rm -f ./$(DEPDIR)/driWrap.Plo -rm -f ./$(DEPDIR)/x-hash.Plo -rm -f ./$(DEPDIR)/x-hook.Plo -rm -f ./$(DEPDIR)/x-list.Plo -rm -f ./$(DEPDIR)/xprAppleWM.Plo -rm -f ./$(DEPDIR)/xprCursor.Plo -rm -f ./$(DEPDIR)/xprEvent.Plo -rm -f ./$(DEPDIR)/xprFrame.Plo -rm -f ./$(DEPDIR)/xprScreen.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/appledri.Plo -rm -f ./$(DEPDIR)/dri.Plo -rm -f ./$(DEPDIR)/driWrap.Plo -rm -f ./$(DEPDIR)/x-hash.Plo -rm -f ./$(DEPDIR)/x-hook.Plo -rm -f ./$(DEPDIR)/x-list.Plo -rm -f ./$(DEPDIR)/xprAppleWM.Plo -rm -f ./$(DEPDIR)/xprCursor.Plo -rm -f ./$(DEPDIR)/xprEvent.Plo -rm -f ./$(DEPDIR)/xprFrame.Plo -rm -f ./$(DEPDIR)/xprScreen.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/xpr/appledri.c0000644000175000017500000003357514757411105014561 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. Copyright (c) 2002, 2009-2012 Apple Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Kevin E. Martin * Jens Owen * Rickard E. (Rik) Faith * Jeremy Huddleston * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "servermd.h" #define _APPLEDRI_SERVER_ #include "appledristr.h" #include "swaprep.h" #include "dri.h" #include "dristruct.h" #include "xpr.h" #include "x-hash.h" #include "protocol-versions.h" static int DRIErrorBase = 0; static void AppleDRIResetProc(ExtensionEntry* extEntry); static int ProcAppleDRICreatePixmap(ClientPtr client); static unsigned char DRIReqCode = 0; static int DRIEventBase = 0; static void SNotifyEvent(xAppleDRINotifyEvent *from, xAppleDRINotifyEvent *to); typedef struct _DRIEvent *DRIEventPtr; typedef struct _DRIEvent { DRIEventPtr next; ClientPtr client; XID clientResource; unsigned int mask; } DRIEventRec; /*ARGSUSED*/ static void AppleDRIResetProc(ExtensionEntry* extEntry) { DRIReset(); } static int ProcAppleDRIQueryVersion(register ClientPtr client) { xAppleDRIQueryVersionReply rep; REQUEST_SIZE_MATCH(xAppleDRIQueryVersionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.majorVersion = SERVER_APPLEDRI_MAJOR_VERSION; rep.minorVersion = SERVER_APPLEDRI_MINOR_VERSION; rep.patchVersion = SERVER_APPLEDRI_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); swapl(&rep.patchVersion); } WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), &rep); return Success; } /* surfaces */ static int ProcAppleDRIQueryDirectRenderingCapable(register ClientPtr client) { xAppleDRIQueryDirectRenderingCapableReply rep; Bool isCapable; REQUEST(xAppleDRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (stuff->screen >= screenInfo.numScreens) { return BadValue; } if (!DRIQueryDirectRenderingCapable(screenInfo.screens[stuff->screen], &isCapable)) { return BadValue; } rep.isCapable = isCapable; if (!client->local) rep.isCapable = 0; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xAppleDRIQueryDirectRenderingCapableReply), &rep); return Success; } static int ProcAppleDRIAuthConnection(register ClientPtr client) { xAppleDRIAuthConnectionReply rep; REQUEST(xAppleDRIAuthConnectionReq); REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.authenticated = 1; if (!DRIAuthConnection(screenInfo.screens[stuff->screen], stuff->magic)) { ErrorF("Failed to authenticate %u\n", (unsigned int)stuff->magic); rep.authenticated = 0; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.authenticated); /* Yes, this is a CARD32 ... sigh */ } WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), &rep); return Success; } static void surface_notify(void *_arg, void *data) { DRISurfaceNotifyArg *arg = _arg; int client_index = (int)x_cvt_vptr_to_uint(data); xAppleDRINotifyEvent se; if (client_index < 0 || client_index >= currentMaxClients) return; se.type = DRIEventBase + AppleDRISurfaceNotify; se.kind = arg->kind; se.arg = arg->id; se.time = currentTime.milliseconds; WriteEventsToClient(clients[client_index], 1, (xEvent *)&se); } static int ProcAppleDRICreateSurface(ClientPtr client) { xAppleDRICreateSurfaceReply rep; DrawablePtr pDrawable; xp_surface_id sid; unsigned int key[2]; int rc; REQUEST(xAppleDRICreateSurfaceReq); REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; rep.key_0 = rep.key_1 = rep.uid = 0; if (!DRICreateSurface(screenInfo.screens[stuff->screen], (Drawable)stuff->drawable, pDrawable, stuff->client_id, &sid, key, surface_notify, x_cvt_uint_to_vptr(client->index))) { return BadValue; } rep.key_0 = key[0]; rep.key_1 = key[1]; rep.uid = sid; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.key_0); swapl(&rep.key_1); swapl(&rep.uid); } WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), &rep); return Success; } static int ProcAppleDRIDestroySurface(register ClientPtr client) { int rc; REQUEST(xAppleDRIDestroySurfaceReq); DrawablePtr pDrawable; REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!DRIDestroySurface(screenInfo.screens[stuff->screen], (Drawable)stuff->drawable, pDrawable, NULL, NULL)) { return BadValue; } return Success; } static int ProcAppleDRICreatePixmap(ClientPtr client) { REQUEST(xAppleDRICreatePixmapReq); DrawablePtr pDrawable; int rc; char path[PATH_MAX]; xAppleDRICreatePixmapReply rep; int width, height, pitch, bpp; void *ptr; CARD32 stringLength; REQUEST_SIZE_MATCH(xAppleDRICreatePixmapReq); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!DRICreatePixmap(screenInfo.screens[stuff->screen], (Drawable)stuff->drawable, pDrawable, path, PATH_MAX)) { return BadValue; } if (!DRIGetPixmapData(pDrawable, &width, &height, &pitch, &bpp, &ptr)) { return BadValue; } rep.stringLength = strlen(path) + 1; rep.type = X_Reply; rep.length = bytes_to_int32(rep.stringLength); rep.sequenceNumber = client->sequence; rep.width = width; rep.height = height; rep.pitch = pitch; rep.bpp = bpp; rep.size = pitch * height; if (sizeof(rep) != sz_xAppleDRICreatePixmapReply) ErrorF("error sizeof(rep) is %zu\n", sizeof(rep)); stringLength = rep.stringLength; /* save unswapped value */ if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.stringLength); swapl(&rep.width); swapl(&rep.height); swapl(&rep.pitch); swapl(&rep.bpp); swapl(&rep.size); } WriteToClient(client, sizeof(rep), &rep); WriteToClient(client, stringLength, path); return Success; } static int ProcAppleDRIDestroyPixmap(ClientPtr client) { DrawablePtr pDrawable; int rc; REQUEST(xAppleDRIDestroyPixmapReq); REQUEST_SIZE_MATCH(xAppleDRIDestroyPixmapReq); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; DRIDestroyPixmap(pDrawable); return Success; } /* dispatch */ static int ProcAppleDRIDispatch(register ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_AppleDRIQueryVersion: return ProcAppleDRIQueryVersion(client); case X_AppleDRIQueryDirectRenderingCapable: return ProcAppleDRIQueryDirectRenderingCapable(client); } if (!client->local) return DRIErrorBase + AppleDRIClientNotLocal; switch (stuff->data) { case X_AppleDRIAuthConnection: return ProcAppleDRIAuthConnection(client); case X_AppleDRICreateSurface: return ProcAppleDRICreateSurface(client); case X_AppleDRIDestroySurface: return ProcAppleDRIDestroySurface(client); case X_AppleDRICreatePixmap: return ProcAppleDRICreatePixmap(client); case X_AppleDRIDestroyPixmap: return ProcAppleDRIDestroyPixmap(client); default: return BadRequest; } } static void SNotifyEvent(xAppleDRINotifyEvent *from, xAppleDRINotifyEvent *to) { to->type = from->type; to->kind = from->kind; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->time, to->time); cpswapl(from->arg, to->arg); } static int SProcAppleDRIQueryVersion(register ClientPtr client) { REQUEST(xAppleDRIQueryVersionReq); swaps(&stuff->length); return ProcAppleDRIQueryVersion(client); } static int SProcAppleDRIQueryDirectRenderingCapable(register ClientPtr client) { REQUEST(xAppleDRIQueryDirectRenderingCapableReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRIQueryDirectRenderingCapableReq); swapl(&stuff->screen); return ProcAppleDRIQueryDirectRenderingCapable(client); } static int SProcAppleDRIAuthConnection(register ClientPtr client) { REQUEST(xAppleDRIAuthConnectionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRIAuthConnectionReq); swapl(&stuff->screen); swapl(&stuff->magic); return ProcAppleDRIAuthConnection(client); } static int SProcAppleDRICreateSurface(register ClientPtr client) { REQUEST(xAppleDRICreateSurfaceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); swapl(&stuff->screen); swapl(&stuff->drawable); swapl(&stuff->client_id); return ProcAppleDRICreateSurface(client); } static int SProcAppleDRIDestroySurface(register ClientPtr client) { REQUEST(xAppleDRIDestroySurfaceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); swapl(&stuff->screen); swapl(&stuff->drawable); return ProcAppleDRIDestroySurface(client); } static int SProcAppleDRICreatePixmap(register ClientPtr client) { REQUEST(xAppleDRICreatePixmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRICreatePixmapReq); swapl(&stuff->screen); swapl(&stuff->drawable); return ProcAppleDRICreatePixmap(client); } static int SProcAppleDRIDestroyPixmap(register ClientPtr client) { REQUEST(xAppleDRIDestroyPixmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAppleDRIDestroyPixmapReq); swapl(&stuff->drawable); return ProcAppleDRIDestroyPixmap(client); } static int SProcAppleDRIDispatch(register ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_AppleDRIQueryVersion: return SProcAppleDRIQueryVersion(client); case X_AppleDRIQueryDirectRenderingCapable: return SProcAppleDRIQueryDirectRenderingCapable(client); } if (!client->local) return DRIErrorBase + AppleDRIClientNotLocal; switch (stuff->data) { case X_AppleDRIAuthConnection: return SProcAppleDRIAuthConnection(client); case X_AppleDRICreateSurface: return SProcAppleDRICreateSurface(client); case X_AppleDRIDestroySurface: return SProcAppleDRIDestroySurface(client); case X_AppleDRICreatePixmap: return SProcAppleDRICreatePixmap(client); case X_AppleDRIDestroyPixmap: return SProcAppleDRIDestroyPixmap(client); default: return BadRequest; } } void AppleDRIExtensionInit(void) { ExtensionEntry* extEntry; if (DRIExtensionInit() && (extEntry = AddExtension(APPLEDRINAME, AppleDRINumberEvents, AppleDRINumberErrors, ProcAppleDRIDispatch, SProcAppleDRIDispatch, AppleDRIResetProc, StandardMinorOpcode))) { size_t i; DRIReqCode = (unsigned char)extEntry->base; DRIErrorBase = extEntry->errorBase; DRIEventBase = extEntry->eventBase; for (i = 0; i < AppleDRINumberEvents; i++) EventSwapVector[DRIEventBase + i] = (EventSwapPtr)SNotifyEvent; } } xorg-server-21.1.16/hw/xquartz/xpr/dri.c0000644000175000017500000005564314757411105013537 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * Rickard E. (Rik) Faith * Jeremy Huddleston */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "extinit.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #define _APPLEDRI_SERVER_ #include "appledristr.h" #include "swaprep.h" #include "dri.h" #include "dristruct.h" #include "mi.h" #include "mipointer.h" #include "rootless.h" #include "rootlessCommon.h" #include "x-hash.h" #include "x-hook.h" #include "driWrap.h" static DevPrivateKeyRec DRIScreenPrivKeyRec; #define DRIScreenPrivKey (&DRIScreenPrivKeyRec) static DevPrivateKeyRec DRIWindowPrivKeyRec; #define DRIWindowPrivKey (&DRIWindowPrivKeyRec) static DevPrivateKeyRec DRIPixmapPrivKeyRec; #define DRIPixmapPrivKey (&DRIPixmapPrivKeyRec) static DevPrivateKeyRec DRIPixmapBufferPrivKeyRec; #define DRIPixmapBufferPrivKey (&DRIPixmapBufferPrivKeyRec) static RESTYPE DRIDrawablePrivResType; static x_hash_table *surface_hash; /* maps surface ids -> drawablePrivs */ static Bool DRIFreePixmapImp(DrawablePtr pDrawable); typedef struct { DrawablePtr pDrawable; int refCount; int bytesPerPixel; int width; int height; char shmPath[PATH_MAX]; int fd; /* From shm_open (for now) */ size_t length; /* length of buffer */ void *buffer; } DRIPixmapBuffer, *DRIPixmapBufferPtr; Bool DRIScreenInit(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv; int i; if (!dixRegisterPrivateKey(&DRIScreenPrivKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&DRIWindowPrivKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey(&DRIPixmapPrivKeyRec, PRIVATE_PIXMAP, 0)) return FALSE; if (!dixRegisterPrivateKey(&DRIPixmapBufferPrivKeyRec, PRIVATE_PIXMAP, 0)) return FALSE; pDRIPriv = (DRIScreenPrivPtr)calloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); return FALSE; } dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, pDRIPriv); pDRIPriv->directRenderingSupport = TRUE; pDRIPriv->nrWindows = 0; /* Initialize drawable tables */ for (i = 0; i < DRI_MAX_DRAWABLES; i++) { pDRIPriv->DRIDrawables[i] = NULL; } return TRUE; } Bool DRIFinishScreenInit(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); /* Wrap DRI support */ pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = DRICopyWindow; pDRIPriv->wrap.ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = DRIClipNotify; // ErrorF("[DRI] screen %d installation complete\n", pScreen->myNum); return DRIWrapInit(pScreen); } void DRICloseScreen(ScreenPtr pScreen) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv && pDRIPriv->directRenderingSupport) { free(pDRIPriv); dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); } } Bool DRIExtensionInit(void) { DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete, "DRIDrawable"); return DRIDrawablePrivResType != 0; } void DRIReset(void) { /* * This stub routine is called when the X Server recycles, resources * allocated by DRIExtensionInit need to be managed here. * * Currently this routine is a stub because all the interesting resources * are managed via the screen init process. */ } Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv) *isCapable = pDRIPriv->directRenderingSupport; else *isCapable = FALSE; return TRUE; } Bool DRIAuthConnection(ScreenPtr pScreen, unsigned int magic) { #if 0 /* FIXME: something? */ DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (drmAuthMagic(pDRIPriv->drmFD, magic)) return FALSE; #endif return TRUE; } static void DRIUpdateSurface(DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw) { xp_window_changes wc; unsigned int flags = 0; if (pDRIDrawablePriv->sid == 0) return; wc.depth = (pDraw->bitsPerPixel == 32 ? XP_DEPTH_ARGB8888 : pDraw->bitsPerPixel == 16 ? XP_DEPTH_RGB555 : XP_DEPTH_NIL); if (wc.depth != XP_DEPTH_NIL) flags |= XP_DEPTH; if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDraw; WindowPtr pTopWin = TopLevelParent(pWin); wc.x = pWin->drawable.x - (pTopWin->drawable.x - pTopWin->borderWidth); wc.y = pWin->drawable.y - (pTopWin->drawable.y - pTopWin->borderWidth); wc.width = pWin->drawable.width + 2 * pWin->borderWidth; wc.height = pWin->drawable.height + 2 * pWin->borderWidth; wc.bit_gravity = XP_GRAVITY_NONE; wc.shape_nrects = RegionNumRects(&pWin->clipList); wc.shape_rects = RegionRects(&pWin->clipList); wc.shape_tx = -(pTopWin->drawable.x - pTopWin->borderWidth); wc.shape_ty = -(pTopWin->drawable.y - pTopWin->borderWidth); flags |= XP_BOUNDS | XP_SHAPE; } else if (pDraw->type == DRAWABLE_PIXMAP) { wc.x = 0; wc.y = 0; wc.width = pDraw->width; wc.height = pDraw->height; wc.bit_gravity = XP_GRAVITY_NONE; flags |= XP_BOUNDS; } xp_configure_surface(pDRIDrawablePriv->sid, flags, &wc); } /* Return NULL if an error occurs. */ static DRIDrawablePrivPtr CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) { DRIDrawablePrivPtr pDRIDrawablePriv; xp_window_id wid = 0; *widPtr = 0; pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv == NULL) { xp_error err; xp_window_changes wc; /* allocate a DRI Window Private record */ if (!(pDRIDrawablePriv = malloc(sizeof(*pDRIDrawablePriv)))) { return NULL; } pDRIDrawablePriv->pDraw = (DrawablePtr)pWin; pDRIDrawablePriv->pScreen = pScreen; pDRIDrawablePriv->refCount = 0; pDRIDrawablePriv->drawableIndex = -1; pDRIDrawablePriv->notifiers = NULL; /* find the physical window */ wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWin, TRUE)); if (wid == 0) { free(pDRIDrawablePriv); return NULL; } /* allocate the physical surface */ err = xp_create_surface(wid, &pDRIDrawablePriv->sid); if (err != Success) { free(pDRIDrawablePriv); return NULL; } /* Make it visible */ wc.stack_mode = XP_MAPPED_ABOVE; wc.sibling = 0; err = xp_configure_surface(pDRIDrawablePriv->sid, XP_STACKING, &wc); if (err != Success) { xp_destroy_surface(pDRIDrawablePriv->sid); free(pDRIDrawablePriv); return NULL; } /* save private off of preallocated index */ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, pDRIDrawablePriv); } *widPtr = wid; return pDRIDrawablePriv; } /* Return NULL if an error occurs. */ static DRIDrawablePrivPtr CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { DRIDrawablePrivPtr pDRIDrawablePriv; pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); if (pDRIDrawablePriv == NULL) { xp_error err; /* allocate a DRI Window Private record */ if (!(pDRIDrawablePriv = calloc(1, sizeof(*pDRIDrawablePriv)))) { return NULL; } pDRIDrawablePriv->pDraw = (DrawablePtr)pPix; pDRIDrawablePriv->pScreen = pScreen; pDRIDrawablePriv->refCount = 0; pDRIDrawablePriv->drawableIndex = -1; pDRIDrawablePriv->notifiers = NULL; /* Passing a null window id to Xplugin in 10.3+ asks for an accelerated offscreen surface. */ err = xp_create_surface(0, &pDRIDrawablePriv->sid); if (err != Success) { free(pDRIDrawablePriv); return NULL; } /* * The DRIUpdateSurface will be called to resize the surface * after this function, if the export is successful. */ /* save private off of preallocated index */ dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, pDRIDrawablePriv); } return pDRIDrawablePriv; } Bool DRICreateSurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, xp_client_id client_id, xp_surface_id *surface_id, unsigned int ret_key[2], void (*notify)(void *arg, void *data), void *notify_data) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); xp_window_id wid = 0; DRIDrawablePrivPtr pDRIDrawablePriv; if (pDrawable->type == DRAWABLE_WINDOW) { /* * http://bugs.winehq.org/show_bug.cgi?id=31751 */ RootlessStopDrawing((WindowPtr)pDrawable, FALSE); pDRIDrawablePriv = CreateSurfaceForWindow(pScreen, (WindowPtr)pDrawable, &wid); if (NULL == pDRIDrawablePriv) return FALSE; /*error*/ } else if (pDrawable->type == DRAWABLE_PIXMAP) { pDRIDrawablePriv = CreateSurfaceForPixmap(pScreen, (PixmapPtr)pDrawable); if (NULL == pDRIDrawablePriv) return FALSE; /*error*/ } else { /* We handle GLXPbuffers in a different way (via CGL). */ return FALSE; } /* Finish initialization of new surfaces */ if (pDRIDrawablePriv->refCount == 0) { unsigned int key[2] = { 0 }; xp_error err; /* try to give the client access to the surface */ if (client_id != 0) { /* * Xplugin accepts a 0 wid if the surface id is offscreen, such * as for a pixmap. */ err = xp_export_surface(wid, pDRIDrawablePriv->sid, client_id, key); if (err != Success) { xp_destroy_surface(pDRIDrawablePriv->sid); free(pDRIDrawablePriv); /* * Now set the dix privates to NULL that were previously set. * This prevents reusing an invalid pointer. */ if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDrawable; dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } else if (pDrawable->type == DRAWABLE_PIXMAP) { PixmapPtr pPix = (PixmapPtr)pDrawable; dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, NULL); } return FALSE; } } pDRIDrawablePriv->key[0] = key[0]; pDRIDrawablePriv->key[1] = key[1]; ++pDRIPriv->nrWindows; /* and stash it by surface id */ if (surface_hash == NULL) surface_hash = x_hash_table_new(NULL, NULL, NULL, NULL); x_hash_table_insert(surface_hash, x_cvt_uint_to_vptr( pDRIDrawablePriv->sid), pDRIDrawablePriv); /* track this in case this window is destroyed */ AddResource(id, DRIDrawablePrivResType, (void *)pDrawable); /* Initialize shape */ DRIUpdateSurface(pDRIDrawablePriv, pDrawable); } pDRIDrawablePriv->refCount++; *surface_id = pDRIDrawablePriv->sid; if (ret_key != NULL) { ret_key[0] = pDRIDrawablePriv->key[0]; ret_key[1] = pDRIDrawablePriv->key[1]; } if (notify != NULL) { pDRIDrawablePriv->notifiers = x_hook_add(pDRIDrawablePriv->notifiers, notify, notify_data); } return TRUE; } Bool DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, void (*notify)(void *, void *), void *notify_data) { DRIDrawablePrivPtr pDRIDrawablePriv; if (pDrawable->type == DRAWABLE_WINDOW) { pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW((WindowPtr)pDrawable); } else if (pDrawable->type == DRAWABLE_PIXMAP) { pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP((PixmapPtr)pDrawable); } else { return FALSE; } if (pDRIDrawablePriv != NULL) { /* * This doesn't seem to be used, because notify is NULL in all callers. */ if (notify != NULL) { pDRIDrawablePriv->notifiers = x_hook_remove( pDRIDrawablePriv->notifiers, notify, notify_data); } --pDRIDrawablePriv->refCount; /* * Check if the drawable privates still have a reference to the * surface. */ if (pDRIDrawablePriv->refCount <= 0) { /* * This calls back to DRIDrawablePrivDelete which * frees the private area and dispatches events, if needed. */ FreeResourceByType(id, DRIDrawablePrivResType, FALSE); } } return TRUE; } /* * The assumption is that this is called when the refCount of a surface * drops to <= 0, or the window/pixmap is destroyed. */ Bool DRIDrawablePrivDelete(void *pResource, XID id) { DrawablePtr pDrawable = (DrawablePtr)pResource; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen); DRIDrawablePrivPtr pDRIDrawablePriv = NULL; WindowPtr pWin = NULL; PixmapPtr pPix = NULL; if (pDrawable->type == DRAWABLE_WINDOW) { pWin = (WindowPtr)pDrawable; pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); } else if (pDrawable->type == DRAWABLE_PIXMAP) { pPix = (PixmapPtr)pDrawable; pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix); } if (pDRIDrawablePriv == NULL) { /* * We reuse __func__ and the resource type for the GLXPixmap code. * Attempt to free a pixmap buffer associated with the resource * if possible. */ return DRIFreePixmapImp(pDrawable); } if (pDRIDrawablePriv->drawableIndex != -1) { /* release drawable table entry */ pDRIPriv->DRIDrawables[pDRIDrawablePriv->drawableIndex] = NULL; } if (pDRIDrawablePriv->sid != 0) { DRISurfaceNotify(pDRIDrawablePriv->sid, AppleDRISurfaceNotifyDestroyed); } if (pDRIDrawablePriv->notifiers != NULL) x_hook_free(pDRIDrawablePriv->notifiers); free(pDRIDrawablePriv); if (pDrawable->type == DRAWABLE_WINDOW) { dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } else if (pDrawable->type == DRAWABLE_PIXMAP) { dixSetPrivate(&pPix->devPrivates, DRIPixmapPrivKey, NULL); } --pDRIPriv->nrWindows; return TRUE; } void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; if (pDRIPriv->nrWindows > 0) { pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); if (pDRIDrawablePriv != NULL) { DRIUpdateSurface(pDRIDrawablePriv, &pWin->drawable); } } /* unwrap */ pScreen->CopyWindow = pDRIPriv->wrap.CopyWindow; /* call lower layers */ (*pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); /* rewrap */ pScreen->CopyWindow = DRICopyWindow; } void DRIClipNotify(WindowPtr pWin, int dx, int dy) { ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); DRIDrawablePrivPtr pDRIDrawablePriv; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { DRIUpdateSurface(pDRIDrawablePriv, &pWin->drawable); } if (pDRIPriv->wrap.ClipNotify) { pScreen->ClipNotify = pDRIPriv->wrap.ClipNotify; (*pScreen->ClipNotify)(pWin, dx, dy); pScreen->ClipNotify = DRIClipNotify; } } /* This lets us get at the unwrapped functions so that they can correctly * call the lower level functions, and choose whether they will be * called at every level of recursion (eg in validatetree). */ DRIWrappedFuncsRec * DRIGetWrappedFuncs(ScreenPtr pScreen) { return &(DRI_SCREEN_PRIV(pScreen)->wrap); } void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion) { *majorVersion = APPLE_DRI_MAJOR_VERSION; *minorVersion = APPLE_DRI_MINOR_VERSION; *patchVersion = APPLE_DRI_PATCH_VERSION; } /* * Note: this also cleans up the hash table in addition to notifying clients. * The sid/surface-id should not be used after this, because it will be * invalid. */ void DRISurfaceNotify(xp_surface_id id, int kind) { DRIDrawablePrivPtr pDRIDrawablePriv = NULL; DRISurfaceNotifyArg arg; arg.id = id; arg.kind = kind; if (surface_hash != NULL) { pDRIDrawablePriv = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr(id), NULL); } if (pDRIDrawablePriv == NULL) return; if (kind == AppleDRISurfaceNotifyDestroyed) { x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(id)); } x_hook_run(pDRIDrawablePriv->notifiers, &arg); if (kind == AppleDRISurfaceNotifyDestroyed) { xp_error error; error = xp_destroy_surface(pDRIDrawablePriv->sid); if (error) ErrorF("%s: xp_destroy_surface failed: %d\n", __func__, error); /* Guard against reuse, even though we are freeing after this. */ pDRIDrawablePriv->sid = 0; FreeResourceByType(pDRIDrawablePriv->pDraw->id, DRIDrawablePrivResType, FALSE); } } /* * This creates a shared memory buffer for use with GLXPixmaps * and AppleSGLX. */ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, char *path, size_t pathmax) { DRIPixmapBufferPtr shared; PixmapPtr pPix; if (pDrawable->type != DRAWABLE_PIXMAP) return FALSE; pPix = (PixmapPtr)pDrawable; shared = malloc(sizeof(*shared)); if (NULL == shared) { FatalError("failed to allocate DRIPixmapBuffer in %s\n", __func__); } shared->pDrawable = pDrawable; shared->refCount = 1; if (pDrawable->bitsPerPixel >= 24) { shared->bytesPerPixel = 4; } else if (pDrawable->bitsPerPixel <= 16) { shared->bytesPerPixel = 2; } shared->width = pDrawable->width; shared->height = pDrawable->height; if (-1 == snprintf(shared->shmPath, sizeof(shared->shmPath), "%d_0x%lx", getpid(), (unsigned long)id)) { FatalError("buffer overflow in %s\n", __func__); } shared->fd = shm_open(shared->shmPath, O_RDWR | O_EXCL | O_CREAT, S_IRUSR | S_IWUSR | S_IROTH | S_IWOTH); if (-1 == shared->fd) { free(shared); return FALSE; } shared->length = shared->width * shared->height * shared->bytesPerPixel; if (-1 == ftruncate(shared->fd, shared->length)) { ErrorF("failed to ftruncate (extend) file."); shm_unlink(shared->shmPath); close(shared->fd); free(shared); return FALSE; } shared->buffer = mmap(NULL, shared->length, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, shared->fd, 0); if (MAP_FAILED == shared->buffer) { ErrorF("failed to mmap shared memory."); shm_unlink(shared->shmPath); close(shared->fd); free(shared); return FALSE; } strlcpy(path, shared->shmPath, pathmax); dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, shared); AddResource(id, DRIDrawablePrivResType, (void *)pDrawable); return TRUE; } Bool DRIGetPixmapData(DrawablePtr pDrawable, int *width, int *height, int *pitch, int *bpp, void **ptr) { PixmapPtr pPix; DRIPixmapBufferPtr shared; if (pDrawable->type != DRAWABLE_PIXMAP) return FALSE; pPix = (PixmapPtr)pDrawable; shared = dixLookupPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey); if (NULL == shared) return FALSE; assert(pDrawable->width == shared->width); assert(pDrawable->height == shared->height); *width = shared->width; *height = shared->height; *bpp = shared->bytesPerPixel; *pitch = shared->width * shared->bytesPerPixel; *ptr = shared->buffer; return TRUE; } static Bool DRIFreePixmapImp(DrawablePtr pDrawable) { DRIPixmapBufferPtr shared; PixmapPtr pPix; if (pDrawable->type != DRAWABLE_PIXMAP) return FALSE; pPix = (PixmapPtr)pDrawable; shared = dixLookupPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey); if (NULL == shared) return FALSE; close(shared->fd); munmap(shared->buffer, shared->length); shm_unlink(shared->shmPath); free(shared); dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, (void *)NULL); return TRUE; } void DRIDestroyPixmap(DrawablePtr pDrawable) { if (DRIFreePixmapImp(pDrawable)) FreeResourceByType(pDrawable->id, DRIDrawablePrivResType, FALSE); } xorg-server-21.1.16/hw/xquartz/xpr/driWrap.c0000644000175000017500000003073514757411105014364 /* * Copyright (c) 2009-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "mi.h" #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "dixfontstr.h" #include "mivalidate.h" #include "driWrap.h" #include "dri.h" #include typedef struct { GCOps const *originalOps; } DRIGCRec; typedef struct { GCOps *originalOps; CreateGCProcPtr CreateGC; } DRIWrapScreenRec; typedef struct { Bool didSave; int devKind; DevUnion devPrivate; } DRISavedDrawableState; static DevPrivateKeyRec driGCKeyRec; #define driGCKey (&driGCKeyRec) static DevPrivateKeyRec driWrapScreenKeyRec; #define driWrapScreenKey (&driWrapScreenKeyRec) static GCOps driGCOps; #define wrap(priv, real, member, func) { \ priv->member = real->member; \ real->member = func; \ } #define unwrap(priv, real, member) { \ real->member = priv->member; \ } static DRIGCRec * DRIGetGCPriv(GCPtr pGC) { return dixLookupPrivate(&pGC->devPrivates, driGCKey); } static void DRIUnwrapGC(GCPtr pGC) { DRIGCRec *pGCPriv = DRIGetGCPriv(pGC); pGC->ops = pGCPriv->originalOps; } static void DRIWrapGC(GCPtr pGC) { pGC->ops = &driGCOps; } static void DRISurfaceSetDrawable(DrawablePtr pDraw, DRISavedDrawableState *saved) { saved->didSave = FALSE; if (pDraw->type == DRAWABLE_PIXMAP) { int pitch, width, height, bpp; void *buffer; if (DRIGetPixmapData(pDraw, &width, &height, &pitch, &bpp, &buffer)) { PixmapPtr pPix = (PixmapPtr)pDraw; saved->devKind = pPix->devKind; saved->devPrivate.ptr = pPix->devPrivate.ptr; saved->didSave = TRUE; pPix->devKind = pitch; pPix->devPrivate.ptr = buffer; } } } static void DRISurfaceRestoreDrawable(DrawablePtr pDraw, DRISavedDrawableState *saved) { PixmapPtr pPix = (PixmapPtr)pDraw; if (!saved->didSave) return; pPix->devKind = saved->devKind; pPix->devPrivate.ptr = saved->devPrivate.ptr; } static void DRIFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int sorted) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRISetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, DDXPointPtr pptInit, int *pwidthInit, int nspans, int sorted) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, nspans, sorted); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPutImage(DrawablePtr dst, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pBits) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PutImage(dst, pGC, depth, x, y, w, h, leftPad, format, pBits); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static RegionPtr DRICopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty) { RegionPtr pReg; DRISavedDrawableState pSrcSaved, dstSaved; DRISurfaceSetDrawable(pSrc, &pSrcSaved); DRISurfaceSetDrawable(dst, &dstSaved); DRIUnwrapGC(pGC); pReg = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(pSrc, &pSrcSaved); DRISurfaceRestoreDrawable(dst, &dstSaved); return pReg; } static RegionPtr DRICopyPlane(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long plane) { RegionPtr pReg; DRISavedDrawableState pSrcSaved, dstSaved; DRISurfaceSetDrawable(pSrc, &pSrcSaved); DRISurfaceSetDrawable(dst, &dstSaved); DRIUnwrapGC(pGC); pReg = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty, plane); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(pSrc, &pSrcSaved); DRISurfaceRestoreDrawable(dst, &dstSaved); return pReg; } static void DRIPolyPoint(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolylines(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment *pSeg) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolySegment(dst, pGC, nseg, pSeg); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolyRectangle(DrawablePtr dst, GCPtr pGC, int nRects, xRectangle *pRects) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc *parcs) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyArc(dst, pGC, narcs, parcs); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIFillPolygon(DrawablePtr dst, GCPtr pGC, int shape, int mode, int count, DDXPointPtr pptInit) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolyFillRect(DrawablePtr dst, GCPtr pGC, int nRectsInit, xRectangle *pRectsInit) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolyFillArc(DrawablePtr dst, GCPtr pGC, int narcsInit, xArc *parcsInit) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyFillArc(dst, pGC, narcsInit, parcsInit); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static int DRIPolyText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars) { int ret; DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); ret = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); return ret; } static int DRIPolyText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars) { int ret; DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); ret = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); return ret; } static void DRIImageText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->ImageText8(dst, pGC, x, y, count, chars); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIImageText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->ImageText16(dst, pGC, x, y, count, chars); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIImageGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyphInit, CharInfoPtr *ppciInit, void *unused) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyphInit, ppciInit, unused); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase) { DRISavedDrawableState saved; DRISurfaceSetDrawable(dst, &saved); DRIUnwrapGC(pGC); pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(dst, &saved); } static void DRIPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, int dx, int dy, int xOrg, int yOrg) { DRISavedDrawableState bitMapSaved, dstSaved; DRISurfaceSetDrawable(&pBitMap->drawable, &bitMapSaved); DRISurfaceSetDrawable(dst, &dstSaved); DRIUnwrapGC(pGC); pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); DRIWrapGC(pGC); DRISurfaceRestoreDrawable(&pBitMap->drawable, &bitMapSaved); DRISurfaceRestoreDrawable(dst, &dstSaved); } static GCOps driGCOps = { DRIFillSpans, DRISetSpans, DRIPutImage, DRICopyArea, DRICopyPlane, DRIPolyPoint, DRIPolylines, DRIPolySegment, DRIPolyRectangle, DRIPolyArc, DRIFillPolygon, DRIPolyFillRect, DRIPolyFillArc, DRIPolyText8, DRIPolyText16, DRIImageText8, DRIImageText16, DRIImageGlyphBlt, DRIPolyGlyphBlt, DRIPushPixels }; static Bool DRICreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; DRIWrapScreenRec *pScreenPriv; DRIGCRec *pGCPriv; Bool ret; pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, driWrapScreenKey); pGCPriv = DRIGetGCPriv(pGC); unwrap(pScreenPriv, pScreen, CreateGC); ret = pScreen->CreateGC(pGC); if (ret) { pGCPriv->originalOps = pGC->ops; pGC->ops = &driGCOps; } wrap(pScreenPriv, pScreen, CreateGC, DRICreateGC); return ret; } /* Return false if an error occurred. */ Bool DRIWrapInit(ScreenPtr pScreen) { DRIWrapScreenRec *pScreenPriv; if (!dixRegisterPrivateKey(&driGCKeyRec, PRIVATE_GC, sizeof(DRIGCRec))) return FALSE; if (!dixRegisterPrivateKey(&driWrapScreenKeyRec, PRIVATE_SCREEN, sizeof(DRIWrapScreenRec))) return FALSE; pScreenPriv = dixGetPrivateAddr(&pScreen->devPrivates, &driWrapScreenKeyRec); pScreenPriv->CreateGC = pScreen->CreateGC; pScreen->CreateGC = DRICreateGC; return TRUE; } xorg-server-21.1.16/hw/xquartz/xpr/xprAppleWM.c0000644000175000017500000001036614757411105015011 /* * Xplugin rootless implementation functions for AppleWM extension * * Copyright (c) 2002-2012 Apple Computer, Inc. All rights reserved. * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "xpr.h" #include #include "applewmExt.h" #include "rootless.h" #include "rootlessCommon.h" #include #include #include "quartz.h" #include "x-hash.h" static int xprSetWindowLevel(WindowPtr pWin, int level) { xp_window_id wid; xp_window_changes wc; RootlessWindowRec *winRec; // AppleWMNumWindowLevels is allowed, but is only set by the server // for the root window. if (level < 0 || level >= AppleWMNumWindowLevels) { return BadValue; } wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWin, TRUE)); if (wid == 0) return BadWindow; RootlessStopDrawing(pWin, FALSE); winRec = WINREC(pWin); if (!winRec) return BadWindow; if (XQuartzIsRootless) wc.window_level = normal_window_levels[level]; else if (XQuartzShieldingWindowLevel) wc.window_level = XQuartzShieldingWindowLevel + 1; else wc.window_level = rooted_window_levels[level]; if (xp_configure_window(wid, XP_WINDOW_LEVEL, &wc) != Success) { return BadValue; } winRec->level = level; return Success; } static int xprAttachTransient(WindowPtr pWinChild, WindowPtr pWinParent) { xp_window_id child_wid, parent_wid; xp_window_changes wc; child_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinChild, TRUE)); if (child_wid == 0) return BadWindow; if (pWinParent) { parent_wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWinParent, TRUE)); if (parent_wid == 0) return BadWindow; } else { parent_wid = 0; } wc.transient_for = parent_wid; RootlessStopDrawing(pWinChild, FALSE); if (xp_configure_window(child_wid, XP_ATTACH_TRANSIENT, &wc) != Success) { return BadValue; } return Success; } static int xprFrameDraw(WindowPtr pWin, xp_frame_class class, xp_frame_attr attr, const BoxRec *outer, const BoxRec *inner, unsigned int title_len, const unsigned char *title_bytes) { xp_window_id wid; wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWin, FALSE)); if (wid == 0) return BadWindow; if (xp_frame_draw(wid, class, attr, outer, inner, title_len, title_bytes) != Success) { return BadValue; } return Success; } static AppleWMProcsRec xprAppleWMProcs = { xp_disable_update, xp_reenable_update, xprSetWindowLevel, xp_frame_get_rect, xp_frame_hit_test, xprFrameDraw, xp_set_dock_proxy, xprAttachTransient }; void xprAppleWMInit(void) { AppleWMExtensionInit(&xprAppleWMProcs); } xorg-server-21.1.16/hw/xquartz/xpr/xprCursor.c0000644000175000017500000002541014757411105014755 /************************************************************** * * Xplugin cursor support * * Copyright (c) 2001 Torrey T. Lyons and Greg Parker. * Copyright (c) 2002 Apple Computer, Inc. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include "quartz.h" #include "xpr.h" #include "darwinEvents.h" #include #include "mi.h" #include "scrnintstr.h" #include "cursorstr.h" #include "mipointrst.h" #include "windowstr.h" #include "globals.h" #include "servermd.h" #include "dixevents.h" #include "x-hash.h" typedef struct { int cursorVisible; QueryBestSizeProcPtr QueryBestSize; miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; static DevPrivateKeyRec darwinCursorScreenKeyRec; #define darwinCursorScreenKey (&darwinCursorScreenKeyRec) #define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ dixLookupPrivate(&pScreen->devPrivates, \ darwinCursorScreenKey)) static Bool load_cursor(CursorPtr src, int screen) { uint32_t *data; Bool free_data = FALSE; uint32_t rowbytes; int width, height; int hot_x, hot_y; uint32_t fg_color, bg_color; uint8_t *srow, *sptr; uint8_t *mrow, *mptr; uint32_t *drow, *dptr; unsigned xcount, ycount; xp_error err; width = src->bits->width; height = src->bits->height; hot_x = src->bits->xhot; hot_y = src->bits->yhot; if (src->bits->argb != NULL) { #if BITMAP_BIT_ORDER == MSBFirst rowbytes = src->bits->width * sizeof(CARD32); data = (uint32_t *)src->bits->argb; #else const uint32_t *be_data = (uint32_t *)src->bits->argb; unsigned i; rowbytes = src->bits->width * sizeof(CARD32); data = malloc(rowbytes * src->bits->height); free_data = TRUE; if (!data) { FatalError("Failed to allocate memory in %s\n", __func__); } for (i = 0; i < (src->bits->width * src->bits->height); i++) data[i] = ntohl(be_data[i]); #endif } else { fg_color = 0xFF00 | (src->foreRed >> 8); fg_color <<= 16; fg_color |= src->foreGreen & 0xFF00; fg_color |= src->foreBlue >> 8; bg_color = 0xFF00 | (src->backRed >> 8); bg_color <<= 16; bg_color |= src->backGreen & 0xFF00; bg_color |= src->backBlue >> 8; fg_color = htonl(fg_color); bg_color = htonl(bg_color); /* round up to 8 pixel boundary so we can convert whole bytes */ rowbytes = ((src->bits->width * 4) + 31) & ~31; data = malloc(rowbytes * src->bits->height); free_data = TRUE; if (!data) { FatalError("Failed to allocate memory in %s\n", __func__); } if (!src->bits->emptyMask) { ycount = src->bits->height; srow = src->bits->source; mrow = src->bits->mask; drow = data; while (ycount-- > 0) { xcount = bits_to_bytes(src->bits->width); sptr = srow; mptr = mrow; dptr = drow; while (xcount-- > 0) { uint8_t s, m; int i; s = *sptr++; m = *mptr++; for (i = 0; i < 8; i++) { #if BITMAP_BIT_ORDER == MSBFirst if (m & 128) *dptr++ = (s & 128) ? fg_color : bg_color; else *dptr++ = 0; s <<= 1; m <<= 1; #else if (m & 1) *dptr++ = (s & 1) ? fg_color : bg_color; else *dptr++ = 0; s >>= 1; m >>= 1; #endif } } srow += BitmapBytePad(src->bits->width); mrow += BitmapBytePad(src->bits->width); drow = (uint32_t *)((char *)drow + rowbytes); } } else { memset(data, 0, src->bits->height * rowbytes); } } err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes); if (free_data) free(data); return err == Success; } /* =========================================================================== Pointer sprite functions =========================================================================== */ /* * QuartzRealizeCursor * Convert the X cursor representation to native format if possible. */ static Bool QuartzRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { if (pCursor == NULL || pCursor->bits == NULL) return FALSE; /* FIXME: cache ARGB8888 representation? */ return TRUE; } /* * QuartzUnrealizeCursor * Free the storage space associated with a realized cursor. */ static Bool QuartzUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } /* * QuartzSetCursor * Set the cursor sprite and position. */ static void QuartzSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); if (!XQuartzServerVisible) return; if (pCursor == NULL) { if (ScreenPriv->cursorVisible) { xp_hide_cursor(); ScreenPriv->cursorVisible = FALSE; } } else { load_cursor(pCursor, pScreen->myNum); if (!ScreenPriv->cursorVisible) { xp_show_cursor(); ScreenPriv->cursorVisible = TRUE; } } } /* * QuartzMoveCursor * Move the cursor. This is a noop for us. */ static void QuartzMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) {} /* =========================================================================== Pointer screen functions =========================================================================== */ /* * QuartzCursorOffScreen */ static Bool QuartzCursorOffScreen(ScreenPtr *pScreen, int *x, int *y) { return FALSE; } /* * QuartzCrossScreen */ static void QuartzCrossScreen(ScreenPtr pScreen, Bool entering) { return; } /* * QuartzWarpCursor * Change the cursor position without generating an event or motion history. * The input coordinates (x,y) are in pScreen-local X11 coordinates. * */ static void QuartzWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { if (XQuartzServerVisible) { int sx, sy; sx = pScreen->x + darwinMainScreenX; sy = pScreen->y + darwinMainScreenY; CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y)); } miPointerWarpCursor(pDev, pScreen, x, y); miPointerUpdateSprite(pDev); } static miPointerScreenFuncRec quartzScreenFuncsRec = { QuartzCursorOffScreen, QuartzCrossScreen, QuartzWarpCursor, }; /* =========================================================================== Other screen functions =========================================================================== */ /* * QuartzCursorQueryBestSize * Handle queries for best cursor size */ static void QuartzCursorQueryBestSize(int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen) { QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); if (class == CursorShape) { /* FIXME: query window server? */ *width = 32; *height = 32; } else { (*ScreenPriv->QueryBestSize)(class, width, height, pScreen); } } /* * QuartzInitCursor * Initialize cursor support */ Bool QuartzInitCursor(ScreenPtr pScreen) { QuartzCursorScreenPtr ScreenPriv; miPointerScreenPtr PointPriv; /* initialize software cursor handling (always needed as backup) */ if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) return FALSE; if (!dixRegisterPrivateKey(&darwinCursorScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; ScreenPriv = calloc(1, sizeof(QuartzCursorScreenRec)); if (ScreenPriv == NULL) return FALSE; /* CURSOR_PRIV(pScreen) = ScreenPriv; */ dixSetPrivate(&pScreen->devPrivates, darwinCursorScreenKey, ScreenPriv); /* override some screen procedures */ ScreenPriv->QueryBestSize = pScreen->QueryBestSize; pScreen->QueryBestSize = QuartzCursorQueryBestSize; PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); ScreenPriv->spriteFuncs = PointPriv->spriteFuncs; PointPriv->spriteFuncs->RealizeCursor = QuartzRealizeCursor; PointPriv->spriteFuncs->UnrealizeCursor = QuartzUnrealizeCursor; PointPriv->spriteFuncs->SetCursor = QuartzSetCursor; PointPriv->spriteFuncs->MoveCursor = QuartzMoveCursor; ScreenPriv->cursorVisible = TRUE; return TRUE; } /* * QuartzSuspendXCursor * X server is hiding. Restore the Aqua cursor. */ void QuartzSuspendXCursor(ScreenPtr pScreen) { xp_show_cursor(); } /* * QuartzResumeXCursor * X server is showing. Restore the X cursor. */ void QuartzResumeXCursor(ScreenPtr pScreen) { WindowPtr pWin; CursorPtr pCursor; /* TODO: Tablet? */ pWin = GetSpriteWindow(darwinPointer); if (pWin->drawable.pScreen != pScreen) return; pCursor = GetSpriteCursor(darwinPointer); if (pCursor == NULL) return; QuartzSetCursor(darwinPointer, pScreen, pCursor, /* x */ 0, /* y */ 0); } xorg-server-21.1.16/hw/xquartz/xpr/xprEvent.c0000644000175000017500000000521114757411105014556 /* Copyright (c) 2008-2012 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "xpr.h" #include #include #include #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" #include "inputstr.h" #include "eventstr.h" #include "mi.h" #include "scrnintstr.h" #include "mipointer.h" #include "quartz.h" #include "quartzKeyboard.h" #include "darwinEvents.h" #include #include #include #include #include "rootlessWindow.h" #include "xprEvent.h" Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev) { switch (e->subtype) { case kXquartzWindowState: DEBUG_LOG("kXquartzWindowState\n"); RootlessNativeWindowStateChanged(xprGetXWindow(e->data[0]), e->data[1]); return TRUE; case kXquartzWindowMoved: DEBUG_LOG("kXquartzWindowMoved\n"); RootlessNativeWindowMoved(xprGetXWindow(e->data[0])); return TRUE; case kXquartzBringAllToFront: DEBUG_LOG("kXquartzBringAllToFront\n"); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ xp_window_bring_all_to_front(); }); return TRUE; default: return FALSE; } } xorg-server-21.1.16/hw/xquartz/xpr/xprFrame.c0000644000175000017500000004001014757411105014523 /* * Xplugin rootless implementation frame functions * * Copyright (c) 2002-2012 Apple Computer, Inc. All rights reserved. * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "xpr.h" #include "rootlessCommon.h" #include #include "x-hash.h" #include "applewmExt.h" #include "propertyst.h" #include "dix.h" #include #include "windowstr.h" #include "quartz.h" #include #define DEFINE_ATOM_HELPER(func, atom_name) \ static Atom func(void) { \ static int generation; \ static Atom atom; \ if (generation != serverGeneration) { \ generation = serverGeneration; \ atom = MakeAtom(atom_name, strlen(atom_name), TRUE); \ } \ return atom; \ } DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID") /* Maps xp_window_id -> RootlessWindowRec */ static x_hash_table * window_hash; /* Need to guard window_hash since xprIsX11Window can be called from any thread. */ static dispatch_queue_t window_hash_serial_q; /* Prototypes for static functions */ static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY, RegionPtr pShape); static void xprDestroyFrame(RootlessFrameID wid); static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY); static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int gravity); static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid); static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape); static void xprUnmapFrame(RootlessFrameID wid); static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow); static void xprStopDrawing(RootlessFrameID wid, Bool flush); static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage); static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, int shift_x, int shift_y); static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin); static Bool xprDoReorderWindow(RootlessWindowPtr pFrame); static void xprHideWindow(RootlessFrameID wid); static void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen); static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects, int dx, int dy); static inline xp_error xprConfigureWindow(xp_window_id id, unsigned int mask, const xp_window_changes *values) { return xp_configure_window(id, mask, values); } static void xprSetNativeProperty(RootlessWindowPtr pFrame) { xp_error err; unsigned int native_id; long data; err = xp_get_native_window(x_cvt_vptr_to_uint(pFrame->wid), &native_id); if (err == Success) { /* FIXME: move this to AppleWM extension */ data = native_id; dixChangeWindowProperty(serverClient, pFrame->win, xa_native_window_id(), XA_INTEGER, 32, PropModeReplace, 1, &data, TRUE); } } static xp_error xprColormapCallback(void *data, int first_color, int n_colors, uint32_t *colors) { return (RootlessResolveColormap(data, first_color, n_colors, colors) ? XP_Success : XP_BadMatch); } /* * Create and display a new frame. */ static Bool xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY, RegionPtr pShape) { WindowPtr pWin = pFrame->win; xp_window_changes wc; unsigned int mask = 0; xp_error err; wc.x = newX; wc.y = newY; wc.width = pFrame->width; wc.height = pFrame->height; wc.bit_gravity = XP_GRAVITY_NONE; mask |= XP_BOUNDS; if (pWin->drawable.depth == 8) { wc.depth = XP_DEPTH_INDEX8; wc.colormap = xprColormapCallback; wc.colormap_data = pScreen; mask |= XP_COLORMAP; } else if (pWin->drawable.depth == 15) wc.depth = XP_DEPTH_RGB555; else if (pWin->drawable.depth == 24) wc.depth = XP_DEPTH_ARGB8888; else wc.depth = XP_DEPTH_NIL; mask |= XP_DEPTH; if (pShape != NULL) { wc.shape_nrects = RegionNumRects(pShape); wc.shape_rects = RegionRects(pShape); wc.shape_tx = wc.shape_ty = 0; mask |= XP_SHAPE; } pFrame->level = !IsRoot(pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels; if (XQuartzIsRootless) wc.window_level = normal_window_levels[pFrame->level]; else if (XQuartzShieldingWindowLevel) wc.window_level = XQuartzShieldingWindowLevel + 1; else wc.window_level = rooted_window_levels[pFrame->level]; mask |= XP_WINDOW_LEVEL; err = xp_create_window(mask, &wc, (xp_window_id *)&pFrame->wid); if (err != Success) { return FALSE; } dispatch_async(window_hash_serial_q, ^ { x_hash_table_insert(window_hash, pFrame->wid, pFrame); }); xprSetNativeProperty(pFrame); return TRUE; } /* * Destroy a frame. */ static void xprDestroyFrame(RootlessFrameID wid) { xp_error err; dispatch_async(window_hash_serial_q, ^ { x_hash_table_remove(window_hash, wid); }); err = xp_destroy_window(x_cvt_vptr_to_uint(wid)); if (err != Success) FatalError("Could not destroy window %d (%d).", (int)x_cvt_vptr_to_uint( wid), (int)err); } /* * Move a frame on screen. */ static void xprMoveFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY) { xp_window_changes wc; wc.x = newX; wc.y = newY; // ErrorF("xprMoveFrame(%d, %p, %d, %d)\n", wid, pScreen, newX, newY); xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_ORIGIN, &wc); } /* * Resize and move a frame. */ static void xprResizeFrame(RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int gravity) { xp_window_changes wc; wc.x = newX; wc.y = newY; wc.width = newW; wc.height = newH; wc.bit_gravity = gravity; /* It's unlikely that being async will save us anything here. But it can't hurt. */ xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_BOUNDS, &wc); } /* * Change frame stacking. */ static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) { xp_window_changes wc; unsigned int mask = XP_STACKING; __block RootlessWindowRec * winRec; /* Stack frame below nextWid it if it exists, or raise frame above everything otherwise. */ if (nextWid == NULL) { wc.stack_mode = XP_MAPPED_ABOVE; wc.sibling = 0; } else { wc.stack_mode = XP_MAPPED_BELOW; wc.sibling = x_cvt_vptr_to_uint(nextWid); } dispatch_sync(window_hash_serial_q, ^ { winRec = x_hash_table_lookup(window_hash, wid, NULL); }); if (winRec) { if (XQuartzIsRootless) wc.window_level = normal_window_levels[winRec->level]; else if (XQuartzShieldingWindowLevel) wc.window_level = XQuartzShieldingWindowLevel + 1; else wc.window_level = rooted_window_levels[winRec->level]; mask |= XP_WINDOW_LEVEL; } xprConfigureWindow(x_cvt_vptr_to_uint(wid), mask, &wc); } /* * Change the frame's shape. */ static void xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape) { xp_window_changes wc; if (pShape != NULL) { wc.shape_nrects = RegionNumRects(pShape); wc.shape_rects = RegionRects(pShape); } else { wc.shape_nrects = -1; wc.shape_rects = NULL; } wc.shape_tx = wc.shape_ty = 0; xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_SHAPE, &wc); } /* * Unmap a frame. */ static void xprUnmapFrame(RootlessFrameID wid) { xp_window_changes wc; wc.stack_mode = XP_UNMAPPED; wc.sibling = 0; xprConfigureWindow(x_cvt_vptr_to_uint(wid), XP_STACKING, &wc); } /* * Start drawing to a frame. * Prepare for direct access to its backing buffer. */ static void xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) { void *data[2]; unsigned int rowbytes[2]; xp_error err; #ifdef DEBUG_XP_LOCK_WINDOW ErrorF("=== LOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid)); xorg_backtrace(); #endif err = xp_lock_window(x_cvt_vptr_to_uint( wid), NULL, NULL, data, rowbytes, NULL); if (err != Success) FatalError("Could not lock window %d for drawing (%d).", (int)x_cvt_vptr_to_uint( wid), (int)err); #ifdef DEBUG_XP_LOCK_WINDOW ErrorF(" bits: %p\n", *data); #endif *pixelData = data[0]; *bytesPerRow = rowbytes[0]; } /* * Stop drawing to a frame. */ static void xprStopDrawing(RootlessFrameID wid, Bool flush) { xp_error err; #ifdef DEBUG_XP_LOCK_WINDOW ErrorF("=== UNLOCK %d ===\n", (int)x_cvt_vptr_to_uint(wid)); xorg_backtrace(); #endif err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush); /* This should be a FatalError, but we started tripping over it. Make it a * FatalError after http://xquartz.macosforge.org/trac/ticket/482 is fixed. */ if (err != Success) ErrorF("Could not unlock window %d after drawing (%d).", (int)x_cvt_vptr_to_uint( wid), (int)err); } /* * Flush drawing updates to the screen. */ static void xprUpdateRegion(RootlessFrameID wid, RegionPtr pDamage) { xp_flush_window(x_cvt_vptr_to_uint(wid)); } /* * Mark damaged rectangles as requiring redisplay to screen. */ static void xprDamageRects(RootlessFrameID wid, int nrects, const BoxRec *rects, int shift_x, int shift_y) { xp_mark_window(x_cvt_vptr_to_uint(wid), nrects, rects, shift_x, shift_y); } /* * Called after the window associated with a frame has been switched * to a new top-level parent. */ static void xprSwitchWindow(RootlessWindowPtr pFrame, WindowPtr oldWin) { DeleteProperty(serverClient, oldWin, xa_native_window_id()); xprSetNativeProperty(pFrame); } /* * Called to check if the frame should be reordered when it is restacked. */ static Bool xprDoReorderWindow(RootlessWindowPtr pFrame) { WindowPtr pWin = pFrame->win; return AppleWMDoReorderWindow(pWin); } /* * Copy area in frame to another part of frame. * Used to accelerate scrolling. */ static void xprCopyWindow(RootlessFrameID wid, int dstNrects, const BoxRec *dstRects, int dx, int dy) { xp_copy_window(x_cvt_vptr_to_uint(wid), x_cvt_vptr_to_uint(wid), dstNrects, dstRects, dx, dy); } static RootlessFrameProcsRec xprRootlessProcs = { xprCreateFrame, xprDestroyFrame, xprMoveFrame, xprResizeFrame, xprRestackFrame, xprReshapeFrame, xprUnmapFrame, xprStartDrawing, xprStopDrawing, xprUpdateRegion, xprDamageRects, xprSwitchWindow, xprDoReorderWindow, xprHideWindow, xprUpdateColormap, xp_copy_bytes, xprCopyWindow }; /* * Initialize XPR implementation */ Bool xprInit(ScreenPtr pScreen) { RootlessInit(pScreen, &xprRootlessProcs); rootless_CopyBytes_threshold = xp_copy_bytes_threshold; rootless_CopyWindow_threshold = xp_scroll_area_threshold; assert((window_hash = x_hash_table_new(NULL, NULL, NULL, NULL))); assert((window_hash_serial_q = dispatch_queue_create(BUNDLE_ID_PREFIX ".X11.xpr_window_hash", NULL))); return TRUE; } /* * Given the id of a physical window, try to find the top-level (or root) * X window that it represents. */ WindowPtr xprGetXWindow(xp_window_id wid) { RootlessWindowRec *winRec __block; dispatch_sync(window_hash_serial_q, ^ { winRec = x_hash_table_lookup(window_hash, x_cvt_uint_to_vptr(wid), NULL); }); return winRec != NULL ? winRec->win : NULL; } /* * The windowNumber is an AppKit window number. Returns TRUE if xpr is * displaying a window with that number. */ Bool xprIsX11Window(int windowNumber) { Bool ret; xp_window_id wid; if (xp_lookup_native_window(windowNumber, &wid)) ret = xprGetXWindow(wid) != NULL; else ret = FALSE; return ret; } /* * xprHideWindows * Hide or unhide all top level windows. This is called for application hide/ * unhide events if the window manager is not Apple-WM aware. Xplugin windows * do not hide or unhide themselves. */ void xprHideWindows(Bool hide) { int screen; WindowPtr pRoot, pWin; for (screen = 0; screen < screenInfo.numScreens; screen++) { RootlessFrameID prevWid = NULL; pRoot = screenInfo.screens[screen]->root; for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { RootlessWindowRec *winRec = WINREC(pWin); if (winRec != NULL) { if (hide) { xprUnmapFrame(winRec->wid); } else { BoxRec box; xprRestackFrame(winRec->wid, prevWid); prevWid = winRec->wid; box.x1 = 0; box.y1 = 0; box.x2 = winRec->width; box.y2 = winRec->height; xprDamageRects(winRec->wid, 1, &box, 0, 0); RootlessQueueRedisplay(screenInfo.screens[screen]); } } } } } // XXX: identical to x_cvt_vptr_to_uint ? #define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x))) Bool no_configure_window; static inline int configure_window(xp_window_id id, unsigned int mask, const xp_window_changes *values) { if (!no_configure_window) return xp_configure_window(id, mask, values); else return XP_Success; } static void xprUpdateColormap(RootlessFrameID wid, ScreenPtr pScreen) { /* This is how we tell xp that the colormap may have changed. */ xp_window_changes wc; wc.colormap = xprColormapCallback; wc.colormap_data = pScreen; configure_window(MAKE_WINDOW_ID(wid), XP_COLORMAP, &wc); } static void xprHideWindow(RootlessFrameID wid) { xp_window_changes wc; wc.stack_mode = XP_UNMAPPED; wc.sibling = 0; configure_window(MAKE_WINDOW_ID(wid), XP_STACKING, &wc); } xorg-server-21.1.16/hw/xquartz/xpr/xprScreen.c0000644000175000017500000003521414757411105014722 /* * Xplugin rootless implementation screen functions * * Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include "quartz.h" #include "quartzRandR.h" #include "xpr.h" #include "xprEvent.h" #include "pseudoramiX.h" #include "darwinEvents.h" #include "rootless.h" #include "dri.h" #include "globals.h" #include #include "applewmExt.h" #include "micmap.h" #include "rootlessCommon.h" #ifdef DAMAGE #include "damage.h" #endif #include "nonsdk_extinit.h" /* 10.4's deferred update makes X slower.. have to live with the tearing * for now.. */ #define XP_NO_DEFERRED_UPDATES 8 // Name of GLX bundle for native OpenGL static const char *xprOpenGLBundle = "glxCGL.bundle"; /* * eventHandler * Callback handler for Xplugin events. */ static void eventHandler(unsigned int type, const void *arg, unsigned int arg_size, void *data) { switch (type) { case XP_EVENT_DISPLAY_CHANGED: DEBUG_LOG("XP_EVENT_DISPLAY_CHANGED\n"); DarwinSendDDXEvent(kXquartzDisplayChanged, 0); break; case XP_EVENT_WINDOW_STATE_CHANGED: if (arg_size >= sizeof(xp_window_state_event)) { const xp_window_state_event *ws_arg = arg; DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: id=%d, state=%d\n", ws_arg->id, ws_arg->state); DarwinSendDDXEvent(kXquartzWindowState, 2, ws_arg->id, ws_arg->state); } else { DEBUG_LOG("XP_EVENT_WINDOW_STATE_CHANGED: ignored\n"); } break; case XP_EVENT_WINDOW_MOVED: DEBUG_LOG("XP_EVENT_WINDOW_MOVED\n"); if (arg_size == sizeof(xp_window_id)) { xp_window_id id = *(xp_window_id *)arg; DarwinSendDDXEvent(kXquartzWindowMoved, 1, id); } break; case XP_EVENT_SURFACE_DESTROYED: DEBUG_LOG("XP_EVENT_SURFACE_DESTROYED\n"); case XP_EVENT_SURFACE_CHANGED: DEBUG_LOG("XP_EVENT_SURFACE_CHANGED\n"); if (arg_size == sizeof(xp_surface_id)) { int kind; if (type == XP_EVENT_SURFACE_DESTROYED) kind = AppleDRISurfaceNotifyDestroyed; else kind = AppleDRISurfaceNotifyChanged; DRISurfaceNotify(*(xp_surface_id *)arg, kind); } break; #ifdef XP_EVENT_SPACE_CHANGED case XP_EVENT_SPACE_CHANGED: DEBUG_LOG("XP_EVENT_SPACE_CHANGED\n"); if (arg_size == sizeof(uint32_t)) { uint32_t space_id = *(uint32_t *)arg; DarwinSendDDXEvent(kXquartzSpaceChanged, 1, space_id); } break; #endif default: ErrorF("Unknown XP_EVENT type (%d) in xprScreen:eventHandler\n", type); } } /* * displayAtIndex * Return the display ID for a particular display index. */ static CGDirectDisplayID displayAtIndex(int index) { CGError err; CGDisplayCount cnt; CGDirectDisplayID dpy[index + 1]; err = CGGetActiveDisplayList(index + 1, dpy, &cnt); if (err == kCGErrorSuccess && cnt == index + 1) return dpy[index]; else return kCGNullDirectDisplay; } /* * displayScreenBounds * Return the bounds of a particular display. */ static CGRect displayScreenBounds(CGDirectDisplayID id) { CGRect frame; frame = CGDisplayBounds(id); DEBUG_LOG(" %dx%d @ (%d,%d).\n", (int)frame.size.width, (int)frame.size.height, (int)frame.origin.x, (int)frame.origin.y); Boolean spacePerDisplay = false; Boolean ok; (void)CFPreferencesAppSynchronize(CFSTR("com.apple.spaces")); spacePerDisplay = ! CFPreferencesGetAppBooleanValue(CFSTR("spans-displays"), CFSTR("com.apple.spaces"), &ok); if (!ok) spacePerDisplay = true; /* Remove menubar to help standard X11 window managers. * On Mavericks and later, the menu bar is on all displays when spans-displays is false or unset. */ if (XQuartzIsRootless && (spacePerDisplay || (frame.origin.x == 0 && frame.origin.y == 0))) { frame.origin.y += aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight; } DEBUG_LOG(" %dx%d @ (%d,%d).\n", (int)frame.size.width, (int)frame.size.height, (int)frame.origin.x, (int)frame.origin.y); return frame; } /* * xprAddPseudoramiXScreens * Add a single virtual screen encompassing all the physical screens * with PseudoramiX. */ static void xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScreen) { CGDisplayCount i, displayCount; CGDirectDisplayID *displayList = NULL; CGRect unionRect = CGRectNull, frame; // Find all the CoreGraphics displays CGGetActiveDisplayList(0, NULL, &displayCount); DEBUG_LOG("displayCount: %d\n", (int)displayCount); if (!displayCount) { ErrorF( "CoreGraphics has reported no connected displays. Creating a stub 800x600 display.\n"); *x = *y = 0; *width = 800; *height = 600; PseudoramiXAddScreen(*x, *y, *width, *height); QuartzCopyDisplayIDs(pScreen, 0, NULL); return; } /* If the displays are captured, we are in a RandR game mode * on the primary display, so we only want to include the first * display. The others are covered by the shield window. */ if (CGDisplayIsCaptured(kCGDirectMainDisplay)) displayCount = 1; displayList = malloc(displayCount * sizeof(CGDirectDisplayID)); if (!displayList) FatalError("Unable to allocate memory for list of displays.\n"); CGGetActiveDisplayList(displayCount, displayList, &displayCount); QuartzCopyDisplayIDs(pScreen, displayCount, displayList); /* Get the union of all screens */ for (i = 0; i < displayCount; i++) { CGDirectDisplayID dpy = displayList[i]; frame = displayScreenBounds(dpy); unionRect = CGRectUnion(unionRect, frame); } /* Use unionRect as the screen size for the X server. */ *x = unionRect.origin.x; *y = unionRect.origin.y; *width = unionRect.size.width; *height = unionRect.size.height; DEBUG_LOG(" screen union origin: (%d,%d) size: (%d,%d).\n", *x, *y, *width, *height); /* Tell PseudoramiX about the real screens. */ for (i = 0; i < displayCount; i++) { CGDirectDisplayID dpy = displayList[i]; frame = displayScreenBounds(dpy); frame.origin.x -= unionRect.origin.x; frame.origin.y -= unionRect.origin.y; DEBUG_LOG(" placed at X11 coordinate (%d,%d).\n", (int)frame.origin.x, (int)frame.origin.y); PseudoramiXAddScreen(frame.origin.x, frame.origin.y, frame.size.width, frame.size.height); } free(displayList); } /* * xprDisplayInit * Find number of CoreGraphics displays and initialize Xplugin. */ static void xprDisplayInit(void) { CGDisplayCount displayCount; TRACE(); CGGetActiveDisplayList(0, NULL, &displayCount); /* With PseudoramiX, the X server only sees one screen; only PseudoramiX itself knows about all of the screens. */ if (noPseudoramiXExtension) { darwinScreensFound = displayCount; } else { PseudoramiXExtensionInit(); darwinScreensFound = 1; } if (xp_init(XP_BACKGROUND_EVENTS | XP_NO_DEFERRED_UPDATES) != Success) FatalError("Could not initialize the Xplugin library."); xp_select_events(XP_EVENT_DISPLAY_CHANGED | XP_EVENT_WINDOW_STATE_CHANGED | XP_EVENT_WINDOW_MOVED #ifdef XP_EVENT_SPACE_CHANGED | XP_EVENT_SPACE_CHANGED #endif | XP_EVENT_SURFACE_CHANGED | XP_EVENT_SURFACE_DESTROYED, eventHandler, NULL); AppleDRIExtensionInit(); xprAppleWMInit(); XQuartzIsRootless = XQuartzRootlessDefault; if (!XQuartzIsRootless) RootlessHideAllWindows(); } /* * xprAddScreen * Init the framebuffer and record pixmap parameters for the screen. */ static Bool xprAddScreen(int index, ScreenPtr pScreen) { DarwinFramebufferPtr dfb = SCREEN_PRIV(pScreen); int depth = darwinDesiredDepth; DEBUG_LOG("index=%d depth=%d\n", index, depth); if (depth == -1) { CGDisplayModeRef modeRef; CFStringRef encStrRef; modeRef = CGDisplayCopyDisplayMode(kCGDirectMainDisplay); if (!modeRef) goto have_depth; encStrRef = CGDisplayModeCopyPixelEncoding(modeRef); CFRelease(modeRef); if (!encStrRef) goto have_depth; if (CFStringCompare(encStrRef, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { depth = 24; } else if (CFStringCompare(encStrRef, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { depth = 15; } else if (CFStringCompare(encStrRef, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { depth = 8; } CFRelease(encStrRef); } have_depth: switch (depth) { case 8: // pseudo-working dfb->visuals = PseudoColorMask; dfb->preferredCVC = PseudoColor; dfb->depth = 8; dfb->bitsPerRGB = 8; dfb->bitsPerPixel = 8; dfb->redMask = 0; dfb->greenMask = 0; dfb->blueMask = 0; break; #if 0 // Removed because Mountain Lion removed support for // 15bit backing stores. We can possibly re-add // this once libXplugin is updated to work around it. case 15: dfb->visuals = TrueColorMask; //LARGE_VISUALS; dfb->preferredCVC = TrueColor; dfb->depth = 15; dfb->bitsPerRGB = 5; dfb->bitsPerPixel = 16; dfb->redMask = RM_ARGB(0, 5, 5, 5); dfb->greenMask = GM_ARGB(0, 5, 5, 5); dfb->blueMask = BM_ARGB(0, 5, 5, 5); break; #endif // case 24: default: if (depth != 24) ErrorF( "Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d)\n", depth, darwinDesiredDepth); dfb->visuals = TrueColorMask; //LARGE_VISUALS; dfb->preferredCVC = TrueColor; dfb->depth = 24; dfb->bitsPerRGB = 8; dfb->bitsPerPixel = 32; dfb->redMask = RM_ARGB(0, 8, 8, 8); dfb->greenMask = GM_ARGB(0, 8, 8, 8); dfb->blueMask = BM_ARGB(0, 8, 8, 8); break; } if (noPseudoramiXExtension) { CGDirectDisplayID dpy; CGRect frame; ErrorF("Warning: noPseudoramiXExtension!\n"); dpy = displayAtIndex(index); QuartzCopyDisplayIDs(pScreen, 1, &dpy); frame = displayScreenBounds(dpy); dfb->x = frame.origin.x; dfb->y = frame.origin.y; dfb->width = frame.size.width; dfb->height = frame.size.height; } else { xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height, pScreen); } /* Passing zero width (pitch) makes miCreateScreenResources set the screen pixmap to the framebuffer pointer, i.e. NULL. The generic rootless code takes care of making this work. */ dfb->pitch = 0; dfb->framebuffer = NULL; DRIScreenInit(pScreen); return TRUE; } /* * xprSetupScreen * Setup the screen for rootless access. */ static Bool xprSetupScreen(int index, ScreenPtr pScreen) { #ifdef DAMAGE // The Damage extension needs to wrap underneath the // generic rootless layer, so do it now. if (!DamageSetup(pScreen)) return FALSE; #endif // Initialize generic rootless code if (!xprInit(pScreen)) return FALSE; return DRIFinishScreenInit(pScreen); } /* * xprUpdateScreen * Update screen after configuration change. */ static void xprUpdateScreen(ScreenPtr pScreen) { rootlessGlobalOffsetX = darwinMainScreenX; rootlessGlobalOffsetY = darwinMainScreenY; AppleWMSetScreenOrigin(pScreen->root); RootlessRepositionWindows(pScreen); RootlessUpdateScreenPixmap(pScreen); } /* * xprInitInput * Finalize xpr specific setup. */ static void xprInitInput(int argc, char **argv) { int i; rootlessGlobalOffsetX = darwinMainScreenX; rootlessGlobalOffsetY = darwinMainScreenY; for (i = 0; i < screenInfo.numScreens; i++) AppleWMSetScreenOrigin(screenInfo.screens[i]->root); } /* * Quartz display mode function list. */ static QuartzModeProcsRec xprModeProcs = { xprDisplayInit, xprAddScreen, xprSetupScreen, xprInitInput, QuartzInitCursor, QuartzSuspendXCursor, QuartzResumeXCursor, xprAddPseudoramiXScreens, xprUpdateScreen, xprIsX11Window, xprHideWindows, RootlessFrameForWindow, TopLevelParent, DRICreateSurface, DRIDestroySurface }; /* * QuartzModeBundleInit * Initialize the display mode bundle after loading. */ Bool QuartzModeBundleInit(void) { quartzProcs = &xprModeProcs; quartzOpenGLBundle = xprOpenGLBundle; return TRUE; } xorg-server-21.1.16/hw/xquartz/xpr/x-hash.c0000644000175000017500000002025014757411105014133 /* x-hash.c - basic hash tables * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "x-hash.h" #include "x-list.h" #include #include #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) struct x_hash_table_struct { unsigned int bucket_index; unsigned int total_keys; x_list **buckets; x_hash_fun *hash_key; x_compare_fun *compare_keys; x_destroy_fun *destroy_key; x_destroy_fun *destroy_value; }; #define ITEM_NEW(k, v) X_PFX(list_prepend) ((x_list *)(k), v) #define ITEM_FREE(i) X_PFX(list_free_1) (i) #define ITEM_KEY(i) ((void *)(i)->next) #define ITEM_VALUE(i) ((i)->data) #define SPLIT_THRESHOLD_FACTOR 2 /* http://planetmath.org/?op=getobj&from=objects&name=GoodHashTablePrimes */ static const unsigned int bucket_sizes[] = { 29, 53, 97, 193, 389, 769, 1543, 3079, 6151, 12289, 24593, 49157, 98317, 196613, 393241, 786433, 1572869, 3145739, 6291469, 12582917, 25165843, 50331653, 100663319, 201326611, 402653189, 805306457, 1610612741 }; static inline unsigned int hash_table_total_buckets(x_hash_table *h) { return bucket_sizes[h->bucket_index]; } static inline void hash_table_destroy_item(x_hash_table *h, void *k, void *v) { if (h->destroy_key != 0) (*h->destroy_key)(k); if (h->destroy_value != 0) (*h->destroy_value)(v); } static inline size_t hash_table_hash_key(x_hash_table *h, void *k) { if (h->hash_key != 0) return (*h->hash_key)(k); else return (size_t)k; } static inline int hash_table_compare_keys(x_hash_table *h, void *k1, void *k2) { if (h->compare_keys == 0) return k1 == k2; else return (*h->compare_keys)(k1, k2) == 0; } static void hash_table_split(x_hash_table *h) { x_list **new, **old; x_list *node, *item, *next; int new_size, old_size; size_t b; int i; if (h->bucket_index == ARRAY_SIZE(bucket_sizes) - 1) return; old_size = hash_table_total_buckets(h); old = h->buckets; h->bucket_index++; new_size = hash_table_total_buckets(h); new = calloc(new_size, sizeof(x_list *)); if (new == 0) { h->bucket_index--; return; } for (i = 0; i < old_size; i++) { for (node = old[i]; node != 0; node = next) { next = node->next; item = node->data; b = hash_table_hash_key(h, ITEM_KEY(item)) % new_size; node->next = new[b]; new[b] = node; } } h->buckets = new; free(old); } X_EXTERN x_hash_table * X_PFX(hash_table_new) (x_hash_fun * hash, x_compare_fun * compare, x_destroy_fun * key_destroy, x_destroy_fun * value_destroy) { x_hash_table *h; h = calloc(1, sizeof(x_hash_table)); if (h == 0) return 0; h->bucket_index = 0; h->buckets = calloc(hash_table_total_buckets(h), sizeof(x_list *)); if (h->buckets == 0) { free(h); return 0; } h->hash_key = hash; h->compare_keys = compare; h->destroy_key = key_destroy; h->destroy_value = value_destroy; return h; } X_EXTERN void X_PFX(hash_table_free) (x_hash_table * h) { int n, i; x_list *node, *item; assert(h != NULL); n = hash_table_total_buckets(h); for (i = 0; i < n; i++) { for (node = h->buckets[i]; node != 0; node = node->next) { item = node->data; hash_table_destroy_item(h, ITEM_KEY(item), ITEM_VALUE(item)); ITEM_FREE(item); } X_PFX(list_free) (h->buckets[i]); } free(h->buckets); free(h); } X_EXTERN unsigned int X_PFX(hash_table_size) (x_hash_table * h) { assert(h != NULL); return h->total_keys; } static void hash_table_modify(x_hash_table *h, void *k, void *v, int replace) { size_t hash_value; x_list *node, *item; assert(h != NULL); hash_value = hash_table_hash_key(h, k); for (node = h->buckets[hash_value % hash_table_total_buckets(h)]; node != 0; node = node->next) { item = node->data; if (hash_table_compare_keys(h, ITEM_KEY(item), k)) { if (replace) { hash_table_destroy_item(h, ITEM_KEY(item), ITEM_VALUE(item)); item->next = k; ITEM_VALUE(item) = v; } else { hash_table_destroy_item(h, k, ITEM_VALUE(item)); ITEM_VALUE(item) = v; } return; } } /* Key isn't already in the table. Insert it. */ if (h->total_keys + 1 > hash_table_total_buckets(h) * SPLIT_THRESHOLD_FACTOR) { hash_table_split(h); } hash_value = hash_value % hash_table_total_buckets(h); h->buckets[hash_value] = X_PFX(list_prepend) (h->buckets[hash_value], ITEM_NEW(k, v)); h->total_keys++; } X_EXTERN void X_PFX(hash_table_insert) (x_hash_table * h, void *k, void *v) { hash_table_modify(h, k, v, 0); } X_EXTERN void X_PFX(hash_table_replace) (x_hash_table * h, void *k, void *v) { hash_table_modify(h, k, v, 1); } X_EXTERN void X_PFX(hash_table_remove) (x_hash_table * h, void *k) { size_t hash_value; x_list **ptr, *item; assert(h != NULL); hash_value = hash_table_hash_key(h, k); for (ptr = &h->buckets[hash_value % hash_table_total_buckets(h)]; *ptr != 0; ptr = &((*ptr)->next)) { item = (*ptr)->data; if (hash_table_compare_keys(h, ITEM_KEY(item), k)) { hash_table_destroy_item(h, ITEM_KEY(item), ITEM_VALUE(item)); ITEM_FREE(item); item = *ptr; *ptr = item->next; X_PFX(list_free_1) (item); h->total_keys--; return; } } } X_EXTERN void * X_PFX(hash_table_lookup) (x_hash_table * h, void *k, void **k_ret) { size_t hash_value; x_list *node, *item; assert(h != NULL); hash_value = hash_table_hash_key(h, k); for (node = h->buckets[hash_value % hash_table_total_buckets(h)]; node != 0; node = node->next) { item = node->data; if (hash_table_compare_keys(h, ITEM_KEY(item), k)) { if (k_ret != 0) *k_ret = ITEM_KEY(item); return ITEM_VALUE(item); } } if (k_ret != 0) *k_ret = 0; return 0; } X_EXTERN void X_PFX(hash_table_foreach) (x_hash_table * h, x_hash_foreach_fun * fun, void *data) { int i, n; x_list *node, *item; assert(h != NULL); n = hash_table_total_buckets(h); for (i = 0; i < n; i++) { for (node = h->buckets[i]; node != 0; node = node->next) { item = node->data; (*fun)(ITEM_KEY(item), ITEM_VALUE(item), data); } } } xorg-server-21.1.16/hw/xquartz/xpr/x-hook.c0000644000175000017500000000564314757411105014161 /* x-hook.c * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "x-hook.h" #include #include #include "os.h" #define CELL_NEW(f, d) X_PFX(list_prepend) ((x_list *)(f), (d)) #define CELL_FREE(c) X_PFX(list_free_1) (c) #define CELL_FUN(c) ((x_hook_function *)((c)->next)) #define CELL_DATA(c) ((c)->data) X_EXTERN x_list * X_PFX(hook_add) (x_list * lst, x_hook_function * fun, void *data) { return X_PFX(list_prepend) (lst, CELL_NEW(fun, data)); } X_EXTERN x_list * X_PFX(hook_remove) (x_list * lst, x_hook_function * fun, void *data) { x_list *node, *cell; x_list *to_delete = NULL; for (node = lst; node != NULL; node = node->next) { cell = node->data; if (CELL_FUN(cell) == fun && CELL_DATA(cell) == data) to_delete = X_PFX(list_prepend) (to_delete, cell); } for (node = to_delete; node != NULL; node = node->next) { cell = node->data; lst = X_PFX(list_remove) (lst, cell); CELL_FREE(cell); } X_PFX(list_free) (to_delete); return lst; } X_EXTERN void X_PFX(hook_run) (x_list * lst, void *arg) { x_list *node; if (!lst) return; for (node = lst; node != NULL; node = node->next) { x_list *cell = node->data; x_hook_function *fun = CELL_FUN(cell); void *data = CELL_DATA(cell); (*fun)(arg, data); } } X_EXTERN void X_PFX(hook_free) (x_list * lst) { x_list *node; for (node = lst; node != NULL; node = node->next) { CELL_FREE(node->data); } X_PFX(list_free) (lst); } xorg-server-21.1.16/hw/xquartz/xpr/x-list.c0000644000175000017500000001567314757411105014200 /* x-list.c * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "x-list.h" #include #include #include /* Allocate in ~4k blocks */ #define NODES_PER_BLOCK 508 typedef struct x_list_block_struct x_list_block; struct x_list_block_struct { x_list l[NODES_PER_BLOCK]; }; static x_list *freelist; static pthread_mutex_t freelist_lock = PTHREAD_MUTEX_INITIALIZER; static inline void list_free_1(x_list *node) { node->next = freelist; freelist = node; } X_EXTERN void X_PFX(list_free_1) (x_list * node) { assert(node != NULL); pthread_mutex_lock(&freelist_lock); list_free_1(node); pthread_mutex_unlock(&freelist_lock); } X_EXTERN void X_PFX(list_free) (x_list * lst) { x_list *next; pthread_mutex_lock(&freelist_lock); for (; lst != NULL; lst = next) { next = lst->next; list_free_1(lst); } pthread_mutex_unlock(&freelist_lock); } X_EXTERN x_list * X_PFX(list_prepend) (x_list * lst, void *data) { x_list *node; pthread_mutex_lock(&freelist_lock); if (freelist == NULL) { x_list_block *b; int i; b = malloc(sizeof(x_list_block)); assert(b != NULL); for (i = 0; i < NODES_PER_BLOCK - 1; i++) b->l[i].next = &(b->l[i + 1]); b->l[i].next = NULL; freelist = b->l; } node = freelist; freelist = node->next; pthread_mutex_unlock(&freelist_lock); node->next = lst; node->data = data; return node; } X_EXTERN x_list * X_PFX(list_append) (x_list * lst, void *data) { x_list *head = lst; if (lst == NULL) return X_PFX(list_prepend) (NULL, data); while (lst->next != NULL) lst = lst->next; lst->next = X_PFX(list_prepend) (NULL, data); return head; } X_EXTERN x_list * X_PFX(list_reverse) (x_list * lst) { x_list *head = NULL, *next; while (lst != NULL) { next = lst->next; lst->next = head; head = lst; lst = next; } return head; } X_EXTERN x_list * X_PFX(list_find) (x_list * lst, void *data) { for (; lst != NULL; lst = lst->next) { if (lst->data == data) return lst; } return NULL; } X_EXTERN x_list * X_PFX(list_nth) (x_list * lst, int n) { while (n-- > 0 && lst != NULL) lst = lst->next; return lst; } X_EXTERN x_list * X_PFX(list_pop) (x_list * lst, void **data_ret) { void *data = NULL; if (lst != NULL) { x_list *tem = lst; data = lst->data; lst = lst->next; X_PFX(list_free_1) (tem); } if (data_ret != NULL) *data_ret = data; return lst; } X_EXTERN x_list * X_PFX(list_filter) (x_list * lst, int (*pred)(void *item, void *data), void *data) { x_list *ret = NULL, *node; for (node = lst; node != NULL; node = node->next) { if ((*pred)(node->data, data)) ret = X_PFX(list_prepend) (ret, node->data); } return X_PFX(list_reverse) (ret); } X_EXTERN x_list * X_PFX(list_map) (x_list * lst, void *(*fun)(void *item, void *data), void *data) { x_list *ret = NULL, *node; for (node = lst; node != NULL; node = node->next) { X_PFX(list_prepend) (ret, fun(node->data, data)); } return X_PFX(list_reverse) (ret); } X_EXTERN x_list * X_PFX(list_copy) (x_list * lst) { x_list *copy = NULL; for (; lst != NULL; lst = lst->next) { copy = X_PFX(list_prepend) (copy, lst->data); } return X_PFX(list_reverse) (copy); } X_EXTERN x_list * X_PFX(list_remove) (x_list * lst, void *data) { x_list **ptr, *node; for (ptr = &lst; *ptr != NULL;) { node = *ptr; if (node->data == data) { *ptr = node->next; X_PFX(list_free_1) (node); } else ptr = &((*ptr)->next); } return lst; } X_EXTERN unsigned int X_PFX(list_length) (x_list * lst) { unsigned int n; n = 0; for (; lst != NULL; lst = lst->next) n++; return n; } X_EXTERN void X_PFX(list_foreach) (x_list * lst, void (*fun)(void *data, void *user_data), void *user_data) { for (; lst != NULL; lst = lst->next) { (*fun)(lst->data, user_data); } } static x_list * list_sort_1(x_list *lst, int length, int (*less)(const void *, const void *)) { x_list *mid, *ptr; x_list *out_head, *out; int mid_point, i; /* This is a standard (stable) list merge sort */ if (length < 2) return lst; /* Calculate the halfway point. Split the list into two sub-lists. */ mid_point = length / 2; ptr = lst; for (i = mid_point - 1; i > 0; i--) ptr = ptr->next; mid = ptr->next; ptr->next = NULL; /* Sort each sub-list. */ lst = list_sort_1(lst, mid_point, less); mid = list_sort_1(mid, length - mid_point, less); /* Then merge them back together. */ assert(lst != NULL); assert(mid != NULL); if ((*less)(mid->data, lst->data)) out = out_head = mid, mid = mid->next; else out = out_head = lst, lst = lst->next; while (lst != NULL && mid != NULL) { if ((*less)(mid->data, lst->data)) out = out->next = mid, mid = mid->next; else out = out->next = lst, lst = lst->next; } if (lst != NULL) out->next = lst; else out->next = mid; return out_head; } X_EXTERN x_list * X_PFX(list_sort) (x_list * lst, int (*less)(const void *, const void *)) { int length; length = X_PFX(list_length) (lst); return list_sort_1(lst, length, less); } xorg-server-21.1.16/hw/xquartz/xpr/dri.h0000644000175000017500000000753214757411105013536 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * Jeremy Huddleston */ /* Prototypes for AppleDRI functions */ #ifndef _DRI_H_ #define _DRI_H_ #include #include "scrnintstr.h" #define _APPLEDRI_SERVER_ #include "appledri.h" #include typedef void (*ClipNotifyPtr)(WindowPtr, int, int); /* * These functions can be wrapped by the DRI. Each of these have * generic default funcs (initialized in DRICreateInfoRec) and can be * overridden by the driver in its [driver]DRIScreenInit function. */ typedef struct { CopyWindowProcPtr CopyWindow; ClipNotifyProcPtr ClipNotify; } DRIWrappedFuncsRec, *DRIWrappedFuncsPtr; typedef struct { xp_surface_id id; int kind; } DRISurfaceNotifyArg; extern Bool DRIScreenInit(ScreenPtr pScreen); extern Bool DRIFinishScreenInit(ScreenPtr pScreen); extern void DRICloseScreen(ScreenPtr pScreen); extern Bool DRIExtensionInit(void); extern void DRIReset(void); extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool *isCapable); extern Bool DRIAuthConnection(ScreenPtr pScreen, unsigned int magic); extern Bool DRICreateSurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, xp_client_id client_id, xp_surface_id * surface_id, unsigned int key[2], void (*notify)(void *arg, void *data), void *notify_data); extern Bool DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, void (*notify)(void *arg, void *data), void *notify_data); extern Bool DRIDrawablePrivDelete(void *pResource, XID id); extern DRIWrappedFuncsRec * DRIGetWrappedFuncs(ScreenPtr pScreen); extern void DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); extern void DRIClipNotify(WindowPtr pWin, int dx, int dy); extern void DRISurfaceNotify(xp_surface_id id, int kind); extern void DRIQueryVersion(int *majorVersion, int *minorVersion, int *patchVersion); extern Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, char *path, size_t pathmax); extern Bool DRIGetPixmapData(DrawablePtr pDrawable, int *width, int *height, int *pitch, int *bpp, void **ptr); extern void DRIDestroyPixmap(DrawablePtr pDrawable); #endif xorg-server-21.1.16/hw/xquartz/xpr/driWrap.h0000644000175000017500000000272414757411105014366 /* * Copyright (c) 2009-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef DRIWRAP_H #include "scrnintstr.h" Bool DRIWrapInit(ScreenPtr pScreen); #endif /*DRIWRAP_H*/ xorg-server-21.1.16/hw/xquartz/xpr/dristruct.h0000644000175000017500000000713514757411105015002 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Jens Owen * Jeremy Huddleston */ #ifndef DRI_STRUCT_H #define DRI_STRUCT_H #include "dri.h" #include "x-list.h" #define DRI_MAX_DRAWABLES 256 #define DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin) ((DRIDrawablePrivPtr) \ dixLookupPrivate(&(pWin)-> \ devPrivates, \ DRIWindowPrivKey)) #define DRI_DRAWABLE_PRIV_FROM_PIXMAP(pPix) ((DRIDrawablePrivPtr) \ dixLookupPrivate(&(pPix)-> \ devPrivates, \ DRIPixmapPrivKey)) typedef struct _DRIDrawablePrivRec { xp_surface_id sid; int drawableIndex; DrawablePtr pDraw; ScreenPtr pScreen; int refCount; unsigned int key[2]; x_list *notifiers; /* list of (FUN . DATA) */ } DRIDrawablePrivRec, *DRIDrawablePrivPtr; #define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \ dixLookupPrivate(&(pScreen) \ -> \ devPrivates, \ DRIScreenPrivKey)) #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ dixLookupPrivate(&screenInfo \ .screens[ \ screenIndex \ ]-> \ devPrivates, \ DRIScreenPrivKey)) typedef struct _DRIScreenPrivRec { Bool directRenderingSupport; int nrWindows; DRIWrappedFuncsRec wrap; DrawablePtr DRIDrawables[DRI_MAX_DRAWABLES]; } DRIScreenPrivRec, *DRIScreenPrivPtr; #endif /* DRI_STRUCT_H */ xorg-server-21.1.16/hw/xquartz/xpr/appledri.h0000644000175000017500000001133514757411105014554 /* $XFree86: xc/lib/GL/dri/xf86dri.h,v 1.7 2000/12/07 20:26:02 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Kevin E. Martin * Jens Owen * Rickard E. (Rik) Faith * Jeremy Huddleston * */ #ifndef _APPLEDRI_H_ #define _APPLEDRI_H_ #include #define X_AppleDRIQueryVersion 0 #define X_AppleDRIQueryDirectRenderingCapable 1 #define X_AppleDRICreateSurface 2 #define X_AppleDRIDestroySurface 3 #define X_AppleDRIAuthConnection 4 #define X_AppleDRICreateSharedBuffer 5 #define X_AppleDRISwapBuffers 6 #define X_AppleDRICreatePixmap 7 #define X_AppleDRIDestroyPixmap 8 /* Requests up to and including 18 were used in a previous version */ /* Events */ #define AppleDRIObsoleteEvent1 0 #define AppleDRIObsoleteEvent2 1 #define AppleDRIObsoleteEvent3 2 #define AppleDRISurfaceNotify 3 #define AppleDRINumberEvents 4 /* Errors */ #define AppleDRIClientNotLocal 0 #define AppleDRIOperationNotSupported 1 #define AppleDRINumberErrors (AppleDRIOperationNotSupported + 1) /* Kinds of SurfaceNotify events: */ #define AppleDRISurfaceNotifyChanged 0 #define AppleDRISurfaceNotifyDestroyed 1 #ifndef _APPLEDRI_SERVER_ typedef struct { int type; /* of event */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came frome a SendEvent request */ Display *display; /* Display the event was read from */ Window window; /* window of event */ Time time; /* server timestamp when event happened */ int kind; /* subtype of event */ int arg; } XAppleDRINotifyEvent; _XFUNCPROTOBEGIN Bool XAppleDRIQueryExtension(Display *dpy, int *event_base, int *error_base); Bool XAppleDRIQueryVersion(Display *dpy, int *majorVersion, int *minorVersion, int *patchVersion); Bool XAppleDRIQueryDirectRenderingCapable(Display *dpy, int screen, Bool *isCapable); void * XAppleDRISetSurfaceNotifyHandler(void (*fun)(Display *dpy, unsigned uid, int kind)); Bool XAppleDRIAuthConnection(Display *dpy, int screen, unsigned int magic); Bool XAppleDRICreateSurface(Display * dpy, int screen, Drawable drawable, unsigned int client_id, unsigned int key[2], unsigned int* uid); Bool XAppleDRIDestroySurface(Display *dpy, int screen, Drawable drawable); Bool XAppleDRISynchronizeSurfaces(Display *dpy); Bool XAppleDRICreateSharedBuffer(Display *dpy, int screen, Drawable drawable, Bool doubleSwap, char *path, size_t pathlen, int *width, int *height); Bool XAppleDRISwapBuffers(Display *dpy, int screen, Drawable drawable); Bool XAppleDRICreatePixmap(Display *dpy, int screen, Drawable drawable, int *width, int *height, int *pitch, int *bpp, size_t *size, char *bufname, size_t bufnamesize); Bool XAppleDRIDestroyPixmap(Display *dpy, Pixmap pixmap); _XFUNCPROTOEND #endif /* _APPLEDRI_SERVER_ */ #endif /* _APPLEDRI_H_ */ xorg-server-21.1.16/hw/xquartz/xpr/appledristr.h0000644000175000017500000001602714757411105015310 /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. Copyright (c) 2002-2012 Apple Computer, Inc. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. **************************************************************************/ /* * Authors: * Kevin E. Martin * Jens Owen * Rickard E. (Rik) Fiath * Jeremy Huddleston * */ #ifndef _APPLEDRISTR_H_ #define _APPLEDRISTR_H_ #include "appledri.h" #define APPLEDRINAME "Apple-DRI" #define APPLE_DRI_MAJOR_VERSION 1 /* current version numbers */ #define APPLE_DRI_MINOR_VERSION 0 #define APPLE_DRI_PATCH_VERSION 0 typedef struct _AppleDRIQueryVersion { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIQueryVersion */ CARD16 length; } xAppleDRIQueryVersionReq; #define sz_xAppleDRIQueryVersionReq 4 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD16 majorVersion; /* major version of DRI protocol */ CARD16 minorVersion; /* minor version of DRI protocol */ CARD32 patchVersion; /* patch version of DRI protocol */ CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xAppleDRIQueryVersionReply; #define sz_xAppleDRIQueryVersionReply 32 typedef struct _AppleDRIQueryDirectRenderingCapable { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* X_DRIQueryDirectRenderingCapable */ CARD16 length; CARD32 screen; } xAppleDRIQueryDirectRenderingCapableReq; #define sz_xAppleDRIQueryDirectRenderingCapableReq 8 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; BOOL isCapable; BOOL pad2; BOOL pad3; BOOL pad4; CARD32 pad5; CARD32 pad6; CARD32 pad7; CARD32 pad8; CARD32 pad9; } xAppleDRIQueryDirectRenderingCapableReply; #define sz_xAppleDRIQueryDirectRenderingCapableReply 32 typedef struct _AppleDRIAuthConnection { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICloseConnection */ CARD16 length; CARD32 screen; CARD32 magic; } xAppleDRIAuthConnectionReq; #define sz_xAppleDRIAuthConnectionReq 12 typedef struct { BYTE type; BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 authenticated; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xAppleDRIAuthConnectionReply; #define zx_xAppleDRIAuthConnectionReply 32 typedef struct _AppleDRICreateSurface { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRICreateSurface */ CARD16 length; CARD32 screen; CARD32 drawable; CARD32 client_id; } xAppleDRICreateSurfaceReq; #define sz_xAppleDRICreateSurfaceReq 16 typedef struct { BYTE type; /* X_Reply */ BOOL pad1; CARD16 sequenceNumber; CARD32 length; CARD32 key_0; CARD32 key_1; CARD32 uid; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xAppleDRICreateSurfaceReply; #define sz_xAppleDRICreateSurfaceReply 32 typedef struct _AppleDRIDestroySurface { CARD8 reqType; /* always DRIReqCode */ CARD8 driReqType; /* always X_DRIDestroySurface */ CARD16 length; CARD32 screen; CARD32 drawable; } xAppleDRIDestroySurfaceReq; #define sz_xAppleDRIDestroySurfaceReq 12 typedef struct _AppleDRINotify { BYTE type; /* always eventBase + event type */ BYTE kind; CARD16 sequenceNumber; CARD32 time; /* time of change */ CARD32 pad1; CARD32 arg; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } xAppleDRINotifyEvent; #define sz_xAppleDRINotifyEvent 32 typedef struct { CARD8 reqType; CARD8 driReqType; CARD16 length; CARD32 screen; CARD32 drawable; BOOL doubleSwap; CARD8 pad1, pad2, pad3; } xAppleDRICreateSharedBufferReq; #define sz_xAppleDRICreateSharedBufferReq 16 typedef struct { BYTE type; BYTE data1; CARD16 sequenceNumber; CARD32 length; CARD32 stringLength; /* 0 on error */ CARD32 width; CARD32 height; CARD32 pad1; CARD32 pad2; CARD32 pad3; } xAppleDRICreateSharedBufferReply; #define sz_xAppleDRICreateSharedBufferReply 32 typedef struct { CARD8 reqType; CARD8 driReqType; CARD16 length; CARD32 screen; CARD32 drawable; } xAppleDRISwapBuffersReq; #define sz_xAppleDRISwapBuffersReq 12 typedef struct { CARD8 reqType; /*1 */ CARD8 driReqType; /*2 */ CARD16 length; /*4 */ CARD32 screen; /*8 */ CARD32 drawable; /*12 */ } xAppleDRICreatePixmapReq; #define sz_xAppleDRICreatePixmapReq 12 typedef struct { BYTE type; /*1 */ BOOL pad1; /*2 */ CARD16 sequenceNumber; /*4 */ CARD32 length; /*8 */ CARD32 width; /*12 */ CARD32 height; /*16 */ CARD32 pitch; /*20 */ CARD32 bpp; /*24 */ CARD32 size; /*28 */ CARD32 stringLength; /*32 */ } xAppleDRICreatePixmapReply; #define sz_xAppleDRICreatePixmapReply 32 typedef struct { CARD8 reqType; /*1 */ CARD8 driReqType; /*2 */ CARD16 length; /*4 */ CARD32 drawable; /*8 */ } xAppleDRIDestroyPixmapReq; #define sz_xAppleDRIDestroyPixmapReq 8 #ifdef _APPLEDRI_SERVER_ void AppleDRISendEvent( #if NeedFunctionPrototypes int /* type */, unsigned int /* mask */, int /* which */, int /* arg */ #endif ); #endif /* _APPLEDRI_SERVER_ */ #endif /* _APPLEDRISTR_H_ */ xorg-server-21.1.16/hw/xquartz/xpr/x-hash.h0000644000175000017500000000670014757411105014144 /* x-hash.h -- basic hash table class * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X_HASH_H #define X_HASH_H 1 #include #include typedef struct x_hash_table_struct x_hash_table; typedef int (x_compare_fun)(const void *a, const void *b); typedef unsigned int (x_hash_fun)(const void *k); typedef void (x_destroy_fun)(void *x); typedef void (x_hash_foreach_fun)(void *k, void *v, void *data); /* for X_PFX and X_EXTERN */ #include "x-list.h" X_EXTERN x_hash_table *X_PFX(hash_table_new) (x_hash_fun * hash, x_compare_fun * compare, x_destroy_fun * key_destroy, x_destroy_fun * value_destroy); X_EXTERN void X_PFX(hash_table_free) (x_hash_table * h); X_EXTERN unsigned int X_PFX(hash_table_size) (x_hash_table * h); X_EXTERN void X_PFX(hash_table_insert) (x_hash_table * h, void *k, void *v); X_EXTERN void X_PFX(hash_table_replace) (x_hash_table * h, void *k, void *v); X_EXTERN void X_PFX(hash_table_remove) (x_hash_table * h, void *k); X_EXTERN void *X_PFX(hash_table_lookup) (x_hash_table * h, void *k, void **k_ret); X_EXTERN void X_PFX(hash_table_foreach) (x_hash_table * h, x_hash_foreach_fun * fun, void *data); /* Conversion between unsigned int (e.g. xp_resource_id) and void pointer */ /* Forward declarations */ static __inline__ void * X_PFX(cvt_uint_to_vptr) (unsigned int val) __attribute__((always_inline)); static __inline__ unsigned int X_PFX(cvt_vptr_to_uint) (void * val) __attribute__((always_inline)); /* Implementations */ static __inline__ void * X_PFX(cvt_uint_to_vptr) (unsigned int val) { return (void *)((unsigned long)(val)); } static __inline__ unsigned int X_PFX(cvt_vptr_to_uint) (void * val) { size_t sv = (size_t)val; unsigned int uv = (unsigned int)sv; /* If this assert fails, chances are val actually is a pointer, or there's been memory corruption */ assert(sv == uv); return uv; } #endif /* X_HASH_H */ xorg-server-21.1.16/hw/xquartz/xpr/x-hook.h0000644000175000017500000000360514757411105014162 /* x-hook.h -- lists of function,data pairs to call. * * Copyright (c) 2003-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X_HOOK_H #define X_HOOK_H 1 #include "x-list.h" typedef void x_hook_function (void *arg, void *data); X_EXTERN x_list *X_PFX(hook_add) (x_list * lst, x_hook_function * fun, void *data); X_EXTERN x_list *X_PFX(hook_remove) (x_list * lst, x_hook_function * fun, void *data); X_EXTERN void X_PFX(hook_run) (x_list * lst, void *arg); X_EXTERN void X_PFX(hook_free) (x_list * lst); #endif /* X_HOOK_H */ xorg-server-21.1.16/hw/xquartz/xpr/x-list.h0000644000175000017500000000567314757411105014204 /* x-list.h -- simple list type * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X_LIST_H #define X_LIST_H 1 /* This is just a cons. */ typedef struct x_list_struct x_list; struct x_list_struct { void *data; x_list *next; }; #ifndef X_PFX #define X_PFX(x) x_ ## x #endif #ifndef X_EXTERN #define X_EXTERN __private_extern__ #endif X_EXTERN void X_PFX(list_free_1) (x_list * node); X_EXTERN x_list *X_PFX(list_prepend) (x_list * lst, void *data); X_EXTERN x_list *X_PFX(list_append) (x_list * lst, void *data); X_EXTERN x_list *X_PFX(list_remove) (x_list * lst, void *data); X_EXTERN void X_PFX(list_free) (x_list * lst); X_EXTERN x_list *X_PFX(list_pop) (x_list * lst, void **data_ret); X_EXTERN x_list *X_PFX(list_copy) (x_list * lst); X_EXTERN x_list *X_PFX(list_reverse) (x_list * lst); X_EXTERN x_list *X_PFX(list_find) (x_list * lst, void *data); X_EXTERN x_list *X_PFX(list_nth) (x_list * lst, int n); X_EXTERN x_list *X_PFX(list_filter) (x_list * src, int (*pred)(void *item, void *data), void *data); X_EXTERN x_list *X_PFX(list_map) (x_list * src, void *(*fun)(void *item, void *data), void *data); X_EXTERN unsigned int X_PFX(list_length) (x_list * lst); X_EXTERN void X_PFX(list_foreach) (x_list * lst, void (*fun) (void *data, void *user_data), void *user_data); X_EXTERN x_list *X_PFX(list_sort) (x_list * lst, int (*less)(const void *, const void *)); #endif /* X_LIST_H */ xorg-server-21.1.16/hw/xquartz/xpr/xpr.h0000644000175000017500000000504614757411105013567 /* * Xplugin rootless implementation * * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef XPR_H #define XPR_H #include "windowstr.h" #include "screenint.h" #include #include "darwin.h" #undef DEBUG_LOG #define DEBUG_LOG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, "xpr", msg, ## args) Bool QuartzModeBundleInit(void); void AppleDRIExtensionInit(void); void xprAppleWMInit(void); Bool xprInit(ScreenPtr pScreen); Bool xprIsX11Window(int windowNumber); WindowPtr xprGetXWindow(xp_window_id wid); void xprHideWindows(Bool hide); Bool QuartzInitCursor(ScreenPtr pScreen); void QuartzSuspendXCursor(ScreenPtr pScreen); void QuartzResumeXCursor(ScreenPtr pScreen); /* If we are rooted, we need the root window and desktop levels to be below * the menubar (24) but above native windows. Normal window level is 0. * Floating window level is 3. The rest are filled in as appropriate. * See CGWindowLevel.h */ #include static const int normal_window_levels[AppleWMNumWindowLevels + 1] = { 0, 3, 4, 5, INT_MIN + 30, INT_MIN + 29, }; static const int rooted_window_levels[AppleWMNumWindowLevels + 1] = { 20, 21, 22, 23, 19, 18, }; #endif /* XPR_H */ xorg-server-21.1.16/hw/xquartz/xpr/xprEvent.h0000644000175000017500000000273614757411105014574 /* Copyright (c) 2008-2012 Apple Inc. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef __XPR_EVENT_H__ #define __XPR_EVENT_H__ Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev); #endif xorg-server-21.1.16/hw/xquartz/meson.build0000644000175000017500000000560014757411105014132 add_languages('objc') apple_applications_dir = get_option('apple-applications-dir') apple_application_name = get_option('apple-application-name') bundle_id_prefix = get_option('bundle-id-prefix') xquartz_sparkle_feed_url = get_option('sparkle-feed-url') xquartz_sparkle_public_edkey = get_option('sparkle-public-edkey') bundle_version_string = get_option('bundle-version-string') # CFBundleShortVersionString if bundle_version_string == 'auto' bundle_version_string = meson.project_version() endif bundle_version = get_option('bundle-version') # CFBundleVersion if bundle_version == 'auto' version_arr = bundle_version_string.split('.') version_major = version_arr[0].to_int() version_minor = version_arr[1].to_int() version_tiny = version_arr[2].to_int() bundle_version = '@0@.@1@.@2@'.format(version_major, version_minor, version_tiny) endif bundle_id_def = '-DBUNDLE_ID_PREFIX="@0@"'.format(bundle_id_prefix) bundle_root = join_paths(apple_applications_dir, apple_application_name + '.app') xquartz_data_dir = join_paths(get_option('prefix'), get_option('datadir'),'X11', 'XQuartz') # using sparkle update framework? build_sparkle = xquartz_sparkle_feed_url != '' and xquartz_sparkle_public_edkey != '' if build_sparkle sparkle = dependency('Sparkle', method: 'extraframework') sparkle_defs = [ '-DXQUARTZ_SPARKLE', '-DXQUARTZ_SPARKLE_FEED_URL=@0@'.format(xquartz_sparkle_feed_url), '-DXQUARTZ_SPARKLE_PUBLIC_EDKEY=@0@'.format(xquartz_sparkle_public_edkey), ] else sparkle_defs = [] endif # libxquartz srcs_libxquartz = [ 'NSUserDefaults+XQuartzDefaults.m', 'X11Application.m', 'X11Controller.m', 'applewm.c', 'darwin.c', 'darwinEvents.c', 'darwinXinput.c', 'keysym2ucs.c', 'quartz.c', 'quartzKeyboard.c', 'quartzStartup.c', 'quartzRandR.c', '../../mi/miinitext.c', '../../mi/miinitext.h', ] libxquartz_defs = [ '-DUSE_NEW_CLUT', '-DXFree86Server', '-DXQUARTZ', '-DXQUARTZ_DATA_DIR="@0@"'.format(xquartz_data_dir), '-DXSERVER_VERSION="@0@"'.format(meson.project_version()), bundle_id_def, sparkle_defs, ] if cc.has_function('dispatch_async') libxquartz_defs += '-DHAVE_LIBDISPATCH' endif libXquartz = static_library('Xquartz', srcs_libxquartz, c_args: libxquartz_defs, objc_args: libxquartz_defs, include_directories: [inc, '../../pseudoramiX', '../../miext/rootless', top_dir_inc], dependencies: [xproto_dep, pixman_dep], link_with: [libxserver_pseudoramix, libxserver_miext_rootless], ) subdir('bundle') if build_glx subdir('GL') endif subdir('pbproxy') subdir('xpr') subdir('mach-startup') # manpage xquartz_man = configure_file( input: 'man/Xquartz.man', output: 'Xquartz.1', configuration: manpage_config, ) install_man(xquartz_man) install_data('defaults.plist', install_dir: xquartz_data_dir, install_mode: 'rw-r--r--') xorg-server-21.1.16/hw/xquartz/Makefile.am0000644000175000017500000000220214757411105014017 noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(DIX_CFLAGS) AM_OBJCFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless \ -I$(top_builddir)/pseudoramiX \ -I$(top_builddir) if GLX GL_DIR = GL endif SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man libXquartz_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ NSUserDefaults+XQuartzDefaults.m \ X11Application.m \ X11Controller.m \ applewm.c \ darwin.c \ darwinEvents.c \ darwinXinput.c \ keysym2ucs.c \ quartz.c \ quartzKeyboard.c \ quartzStartup.c \ quartzRandR.c libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la EXTRA_DIST = \ NSUserDefaults+XQuartzDefaults.h \ X11Application.h \ X11Controller.h \ applewmExt.h \ darwin.h \ darwinfb.h \ darwinEvents.h \ defaults.plist \ keysym2ucs.h \ quartz.h \ quartzKeyboard.h \ quartzRandR.h \ sanitizedCarbon.h \ sanitizedCocoa.h xorg-server-21.1.16/hw/xquartz/Makefile.in0000644000175000017500000010643514757411115014046 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xquartz ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXquartz_la_DEPENDENCIES = \ $(top_builddir)/pseudoramiX/libPseudoramiX.la am_libXquartz_la_OBJECTS = miinitext.lo \ NSUserDefaults+XQuartzDefaults.lo X11Application.lo \ X11Controller.lo applewm.lo darwin.lo darwinEvents.lo \ darwinXinput.lo keysym2ucs.lo quartz.lo quartzKeyboard.lo \ quartzStartup.lo quartzRandR.lo libXquartz_la_OBJECTS = $(am_libXquartz_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo \ ./$(DEPDIR)/X11Application.Plo ./$(DEPDIR)/X11Controller.Plo \ ./$(DEPDIR)/applewm.Plo ./$(DEPDIR)/darwin.Plo \ ./$(DEPDIR)/darwinEvents.Plo ./$(DEPDIR)/darwinXinput.Plo \ ./$(DEPDIR)/keysym2ucs.Plo ./$(DEPDIR)/miinitext.Plo \ ./$(DEPDIR)/quartz.Plo ./$(DEPDIR)/quartzKeyboard.Plo \ ./$(DEPDIR)/quartzRandR.Plo ./$(DEPDIR)/quartzStartup.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = OBJCCOMPILE = $(OBJC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS) LTOBJCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(OBJC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_OBJCFLAGS) $(OBJCFLAGS) AM_V_OBJC = $(am__v_OBJC_@AM_V@) am__v_OBJC_ = $(am__v_OBJC_@AM_DEFAULT_V@) am__v_OBJC_0 = @echo " OBJC " $@; am__v_OBJC_1 = OBJCLD = $(OBJC) AM_V_OBJCLD = $(am__v_OBJCLD_@AM_V@) am__v_OBJCLD_ = $(am__v_OBJCLD_@AM_DEFAULT_V@) am__v_OBJCLD_0 = @echo " OBJCLD " $@; am__v_OBJCLD_1 = SOURCES = $(libXquartz_la_SOURCES) DIST_SOURCES = $(libXquartz_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXquartz.la AM_CFLAGS = $(DIX_CFLAGS) AM_OBJCFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = \ -DXQUARTZ_DATA_DIR=\"$(datadir)/X11/XQuartz\" \ -DXSERVER_VERSION=\"$(VERSION)\" \ -DBUNDLE_ID_PREFIX=\"$(BUNDLE_ID_PREFIX)\" \ -DUSE_NEW_CLUT \ -DXFree86Server \ -I$(top_srcdir)/miext/rootless \ -I$(top_builddir)/pseudoramiX \ -I$(top_builddir) @GLX_TRUE@GL_DIR = GL SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man libXquartz_la_SOURCES = \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ NSUserDefaults+XQuartzDefaults.m \ X11Application.m \ X11Controller.m \ applewm.c \ darwin.c \ darwinEvents.c \ darwinXinput.c \ keysym2ucs.c \ quartz.c \ quartzKeyboard.c \ quartzStartup.c \ quartzRandR.c libXquartz_la_LIBADD = $(top_builddir)/pseudoramiX/libPseudoramiX.la EXTRA_DIST = \ NSUserDefaults+XQuartzDefaults.h \ X11Application.h \ X11Controller.h \ applewmExt.h \ darwin.h \ darwinfb.h \ darwinEvents.h \ defaults.plist \ keysym2ucs.h \ quartz.h \ quartzKeyboard.h \ quartzRandR.h \ sanitizedCarbon.h \ sanitizedCocoa.h all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .m .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXquartz.la: $(libXquartz_la_OBJECTS) $(libXquartz_la_DEPENDENCIES) $(EXTRA_libXquartz_la_DEPENDENCIES) $(AM_V_OBJCLD)$(OBJCLINK) $(libXquartz_la_OBJECTS) $(libXquartz_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Application.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/X11Controller.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/applewm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwin.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinEvents.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinXinput.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keysym2ucs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartz.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzKeyboard.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzRandR.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzStartup.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< miinitext.lo: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.lo -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.lo `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c .m.o: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ $< .m.obj: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(OBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(OBJCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .m.lo: @am__fastdepOBJC_TRUE@ $(AM_V_OBJC)$(LTOBJCCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepOBJC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ $(AM_V_OBJC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepOBJC_FALSE@ DEPDIR=$(DEPDIR) $(OBJCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepOBJC_FALSE@ $(AM_V_OBJC@am__nodep@)$(LTOBJCCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo -rm -f ./$(DEPDIR)/X11Application.Plo -rm -f ./$(DEPDIR)/X11Controller.Plo -rm -f ./$(DEPDIR)/applewm.Plo -rm -f ./$(DEPDIR)/darwin.Plo -rm -f ./$(DEPDIR)/darwinEvents.Plo -rm -f ./$(DEPDIR)/darwinXinput.Plo -rm -f ./$(DEPDIR)/keysym2ucs.Plo -rm -f ./$(DEPDIR)/miinitext.Plo -rm -f ./$(DEPDIR)/quartz.Plo -rm -f ./$(DEPDIR)/quartzKeyboard.Plo -rm -f ./$(DEPDIR)/quartzRandR.Plo -rm -f ./$(DEPDIR)/quartzStartup.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/NSUserDefaults+XQuartzDefaults.Plo -rm -f ./$(DEPDIR)/X11Application.Plo -rm -f ./$(DEPDIR)/X11Controller.Plo -rm -f ./$(DEPDIR)/applewm.Plo -rm -f ./$(DEPDIR)/darwin.Plo -rm -f ./$(DEPDIR)/darwinEvents.Plo -rm -f ./$(DEPDIR)/darwinXinput.Plo -rm -f ./$(DEPDIR)/keysym2ucs.Plo -rm -f ./$(DEPDIR)/miinitext.Plo -rm -f ./$(DEPDIR)/quartz.Plo -rm -f ./$(DEPDIR)/quartzKeyboard.Plo -rm -f ./$(DEPDIR)/quartzRandR.Plo -rm -f ./$(DEPDIR)/quartzStartup.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/NSUserDefaults+XQuartzDefaults.m0000644000175000017500000001432414757411105020122 // // NSUserDefaults+XQuartzDefaults.m // XQuartz // // Created by Jeremy Huddleston Sequoia on 2021.02.19. // Copyright (c) 2021 Apple Inc. All rights reserved. // #import "NSUserDefaults+XQuartzDefaults.h" #import NSString * const XQuartzPrefKeyAppsMenu = @"apps_menu"; NSString * const XQuartzPrefKeyFakeButtons = @"enable_fake_buttons"; NSString * const XQuartzPrefKeyFakeButton2 = @"fake_button2"; NSString * const XQuartzPrefKeyFakeButton3 = @"fake_button3"; NSString * const XQuartzPrefKeyKeyEquivs = @"enable_key_equivalents"; NSString * const XQuartzPrefKeyFullscreenHotkeys = @"fullscreen_hotkeys"; NSString * const XQuartzPrefKeyFullscreenMenu = @"fullscreen_menu"; NSString * const XQuartzPrefKeySyncKeymap = @"sync_keymap"; NSString * const XQuartzPrefKeyDepth = @"depth"; NSString * const XQuartzPrefKeyNoAuth = @"no_auth"; NSString * const XQuartzPrefKeyNoTCP = @"nolisten_tcp"; NSString * const XQuartzPrefKeyDoneXinitCheck = @"done_xinit_check"; NSString * const XQuartzPrefKeyNoQuitAlert = @"no_quit_alert"; NSString * const XQuartzPrefKeyNoRANDRAlert = @"no_randr_alert"; NSString * const XQuartzPrefKeyOptionSendsAlt = @"option_sends_alt"; NSString * const XQuartzPrefKeyAppKitModifiers = @"appkit_modifiers"; NSString * const XQuartzPrefKeyWindowItemModifiers = @"window_item_modifiers"; NSString * const XQuartzPrefKeyRootless = @"rootless"; NSString * const XQuartzPrefKeyRENDERExtension = @"enable_render_extension"; NSString * const XQuartzPrefKeyTESTExtension = @"enable_test_extensions"; NSString * const XQuartzPrefKeyLoginShell = @"login_shell"; NSString * const XQuartzPrefKeyUpdateFeed = @"update_feed"; NSString * const XQuartzPrefKeyClickThrough = @"wm_click_through"; NSString * const XQuartzPrefKeyFocusFollowsMouse = @"wm_ffm"; NSString * const XQuartzPrefKeyFocusOnNewWindow = @"wm_focus_on_new_window"; NSString * const XQuartzPrefKeyScrollInDeviceDirection = @"scroll_in_device_direction"; NSString * const XQuartzPrefKeySyncPasteboard = @"sync_pasteboard"; NSString * const XQuartzPrefKeySyncPasteboardToClipboard = @"sync_pasteboard_to_clipboard"; NSString * const XQuartzPrefKeySyncPasteboardToPrimary = @"sync_pasteboard_to_primary"; NSString * const XQuartzPrefKeySyncClipboardToPasteBoard = @"sync_clipboard_to_pasteboard"; NSString * const XQuartzPrefKeySyncPrimaryOnSelect = @"sync_primary_on_select"; @implementation NSUserDefaults (XQuartzDefaults) + (NSUserDefaults *)globalDefaults { static dispatch_once_t once; static NSUserDefaults *defaults; dispatch_once(&once, ^{ NSString * const defaultsDomain = @".GlobalPreferences"; defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; NSDictionary * const defaultDefaultsDict = @{ @"AppleSpacesSwitchOnActivate" : @(YES), }; [defaults registerDefaults:defaultDefaultsDict]; }); return defaults; } + (NSUserDefaults *)dockDefaults { static dispatch_once_t once; static NSUserDefaults *defaults; dispatch_once(&once, ^{ NSString * const defaultsDomain = @"com.apple.dock"; defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; NSDictionary * const defaultDefaultsDict = @{ @"workspaces" : @(NO), }; [defaults registerDefaults:defaultDefaultsDict]; }); return defaults; } + (NSUserDefaults *)xquartzDefaults { static dispatch_once_t once; static NSUserDefaults *defaults; dispatch_once(&once, ^{ NSString * const defaultsDomain = @(BUNDLE_ID_PREFIX ".X11"); NSString * const defaultDefaultsDomain = NSBundle.mainBundle.bundleIdentifier; if ([defaultsDomain isEqualToString:defaultDefaultsDomain]) { defaults = [NSUserDefaults.standardUserDefaults retain]; } else { defaults = [[[NSUserDefaults alloc] initWithSuiteName:defaultsDomain] retain]; } NSString *defaultWindowItemModifiers = @"command"; NSString * const defaultWindowItemModifiersLocalized = NSLocalizedString(@"window item modifiers", @"window item modifiers"); if (![defaultWindowItemModifiersLocalized isEqualToString:@"window item modifiers"]) { defaultWindowItemModifiers = defaultWindowItemModifiersLocalized; } NSDictionary * const defaultDefaultsDict = @{ XQuartzPrefKeyFakeButtons : @(NO), // XQuartzPrefKeyFakeButton2 nil default // XQuartzPrefKeyFakeButton3 nil default XQuartzPrefKeyKeyEquivs : @(YES), XQuartzPrefKeyFullscreenHotkeys : @(NO), XQuartzPrefKeyFullscreenMenu : @(NO), XQuartzPrefKeySyncKeymap : @(NO), XQuartzPrefKeyDepth : @(-1), XQuartzPrefKeyNoAuth : @(NO), XQuartzPrefKeyNoTCP : @(NO), XQuartzPrefKeyDoneXinitCheck : @(NO), XQuartzPrefKeyNoQuitAlert : @(NO), XQuartzPrefKeyNoRANDRAlert : @(NO), XQuartzPrefKeyOptionSendsAlt : @(NO), // XQuartzPrefKeyAppKitModifiers nil default XQuartzPrefKeyWindowItemModifiers : defaultWindowItemModifiers, XQuartzPrefKeyRootless : @(YES), XQuartzPrefKeyRENDERExtension : @(YES), XQuartzPrefKeyTESTExtension : @(NO), XQuartzPrefKeyLoginShell : @"/bin/sh", XQuartzPrefKeyClickThrough : @(NO), XQuartzPrefKeyFocusFollowsMouse : @(NO), XQuartzPrefKeyFocusOnNewWindow : @(YES), XQuartzPrefKeyScrollInDeviceDirection : @(NO), XQuartzPrefKeySyncPasteboard : @(YES), XQuartzPrefKeySyncPasteboardToClipboard : @(YES), XQuartzPrefKeySyncPasteboardToPrimary : @(YES), XQuartzPrefKeySyncClipboardToPasteBoard : @(YES), XQuartzPrefKeySyncPrimaryOnSelect : @(NO), }; [defaults registerDefaults:defaultDefaultsDict]; NSString * const systemDefaultsPlistPath = [@(XQUARTZ_DATA_DIR) stringByAppendingPathComponent:@"defaults.plist"]; NSDictionary * const systemDefaultsDict = [NSDictionary dictionaryWithContentsOfFile:systemDefaultsPlistPath]; [defaults registerDefaults:systemDefaultsDict]; }); return defaults; } @end xorg-server-21.1.16/hw/xquartz/X11Application.m0000644000175000017500000013111714757411105014706 /* X11Application.m -- subclass of NSApplication to multiplex events * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #import "X11Application.h" #import "NSUserDefaults+XQuartzDefaults.h" #include "darwin.h" #include "quartz.h" #include "darwinEvents.h" #include "quartzKeyboard.h" #include #include "micmap.h" #include "exglobals.h" #include #include #include #include // pbproxy/pbproxy.h extern int xpbproxy_run(void); #ifndef XSERVER_VERSION #define XSERVER_VERSION "?" #endif #include static dispatch_queue_t eventTranslationQueue; #ifndef __has_feature #define __has_feature(x) 0 #endif #ifndef CF_RETURNS_RETAINED #if __has_feature(attribute_cf_returns_retained) #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) #else #define CF_RETURNS_RETAINED #endif #endif #ifndef APPKIT_APPFLAGS_HACK #define APPKIT_APPFLAGS_HACK 1 #endif extern Bool noTestExtensions; extern Bool noRenderExtension; static TISInputSourceRef last_key_layout; /* This preference is only tested on Lion or later as it's not relevant to * earlier OS versions. */ Bool XQuartzScrollInDeviceDirection = FALSE; extern int darwinFakeButtons; /* Store the mouse location while in the background, and update X11's pointer * location when we become the foreground application */ static NSPoint bgMouseLocation; static BOOL bgMouseLocationUpdated = FALSE; X11Application *X11App; #define ALL_KEY_MASKS (NSShiftKeyMask | NSControlKeyMask | \ NSAlternateKeyMask | NSCommandKeyMask) #if APPKIT_APPFLAGS_HACK && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500 // This was removed from the SDK in 10.15 @interface NSApplication () { @protected /* All instance variables are private */ short _running; struct __appFlags { unsigned int _hidden:1; unsigned int _appleEventActivationInProgress:1; unsigned int _active:1; unsigned int _hasBeenRun:1; unsigned int _doingUnhide:1; unsigned int _delegateReturnsValidRequestor:1; unsigned int _deactPending:1; unsigned int _invalidState:1; unsigned int _invalidEvent:1; unsigned int _postedWindowsNeedUpdateNote:1; unsigned int _wantsToActivate:1; unsigned int _doingHide:1; unsigned int _dontSendShouldTerminate:1; unsigned int _ignoresFullScreen:1; unsigned int _finishedLaunching:1; unsigned int _hasEventDelegate:1; unsigned int _appTerminating:1; unsigned int _didNSOpenOrPrint:1; unsigned int _inDealloc:1; unsigned int _pendingDidFinish:1; unsigned int _hasKeyFocus:1; unsigned int _panelsNonactivating:1; unsigned int _hiddenOnLaunch:1; unsigned int _openStatus:2; unsigned int _batchOrdering:1; unsigned int _waitingForTerminationReply:1; unsigned int _unused:1; unsigned int _enumeratingMemoryPressureHandlers:1; unsigned int _didTryRestoringPersistentState:1; unsigned int _windowDragging:1; unsigned int _mightBeSwitching:1; } _appFlags; id _mainMenu; } @end #endif @interface NSApplication (Internal) - (void)_setKeyWindow:(id)window; - (void)_setMainWindow:(id)window; @end @interface X11Application (Private) - (void) sendX11NSEvent:(NSEvent *)e; @end @interface X11Application () @property (nonatomic, readwrite, assign) OSX_BOOL x_active; @end @implementation X11Application typedef struct message_struct message; struct message_struct { mach_msg_header_t hdr; SEL selector; NSObject *arg; }; /* Quartz mode initialization routine. This is often dynamically loaded but is statically linked into this X server. */ Bool QuartzModeBundleInit(void); - (void) dealloc { self.controller = nil; [super dealloc]; } - (void) orderFrontStandardAboutPanel: (id) sender { NSMutableDictionary *dict; NSDictionary *infoDict; NSString *tem; dict = [NSMutableDictionary dictionaryWithCapacity:3]; infoDict = [[NSBundle mainBundle] infoDictionary]; [dict setObject: NSLocalizedString(@"The X Window System", @"About panel") forKey:@"ApplicationName"]; tem = [infoDict objectForKey:@"CFBundleShortVersionString"]; [dict setObject:[NSString stringWithFormat:@"XQuartz %@", tem] forKey:@"ApplicationVersion"]; [dict setObject:[NSString stringWithFormat:@"xorg-server %s", XSERVER_VERSION] forKey:@"Version"]; [self orderFrontStandardAboutPanelWithOptions: dict]; } - (void) activateX:(OSX_BOOL)state { OSX_BOOL const x_active = self.x_active; if (x_active == state) return; DEBUG_LOG("state=%d, x_active=%d, \n", state, x_active); if (state) { if (bgMouseLocationUpdated) { DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, bgMouseLocation.x, bgMouseLocation.y, 0.0, 0.0); bgMouseLocationUpdated = FALSE; } DarwinSendDDXEvent(kXquartzActivate, 0); } else { if (darwin_all_modifier_flags) DarwinUpdateModKeys(0); DarwinInputReleaseButtonsAndKeys(darwinKeyboard); DarwinInputReleaseButtonsAndKeys(darwinPointer); DarwinInputReleaseButtonsAndKeys(darwinTabletCursor); DarwinInputReleaseButtonsAndKeys(darwinTabletStylus); DarwinInputReleaseButtonsAndKeys(darwinTabletEraser); DarwinSendDDXEvent(kXquartzDeactivate, 0); } self.x_active = state; } - (void) became_key:(NSWindow *)win { [self activateX:NO]; } - (void) sendEvent:(NSEvent *)e { /* Don't try sending to X if we haven't initialized. This can happen if AppKit takes over * (eg: uncaught exception) early in launch. */ if (!eventTranslationQueue) { [super sendEvent:e]; return; } OSX_BOOL for_appkit, for_x; OSX_BOOL const x_active = self.x_active; /* By default pass down the responder chain and to X. */ for_appkit = YES; for_x = YES; switch ([e type]) { case NSLeftMouseDown: case NSRightMouseDown: case NSOtherMouseDown: case NSLeftMouseUp: case NSRightMouseUp: case NSOtherMouseUp: case NSScrollWheel: if ([e window] != nil) { /* Pointer event has an (AppKit) window. Probably something for the kit. */ for_x = NO; if (x_active) [self activateX:NO]; } else if ([self modalWindow] == nil) { /* Must be an X window. Tell appkit windows to resign main/key */ for_appkit = NO; if (!x_active && quartzProcs->IsX11Window([e windowNumber])) { if ([self respondsToSelector:@selector(_setKeyWindow:)] && [self respondsToSelector:@selector(_setMainWindow:)]) { NSWindow *keyWindow = [self keyWindow]; if (keyWindow) { [self _setKeyWindow:nil]; [keyWindow resignKeyWindow]; } NSWindow *mainWindow = [self mainWindow]; if (mainWindow) { [self _setMainWindow:nil]; [mainWindow resignMainWindow]; } } else { /* This has a side effect of causing background apps to steal focus from XQuartz. * Unfortunately, there is no public and stable API to do what we want, but this * is a decent fallback in the off chance that the above selectors get dropped * in the future. */ [self deactivate]; } [self activateX:YES]; } } /* We want to force sending to appkit if we're over the menu bar */ if (!for_appkit) { NSPoint NSlocation = [e locationInWindow]; NSWindow *window = [e window]; NSRect NSframe, NSvisibleFrame; CGRect CGframe, CGvisibleFrame; CGPoint CGlocation; if (window != nil) { NSRect frame = [window frame]; NSlocation.x += frame.origin.x; NSlocation.y += frame.origin.y; } NSframe = [[NSScreen mainScreen] frame]; NSvisibleFrame = [[NSScreen mainScreen] visibleFrame]; CGframe = CGRectMake(NSframe.origin.x, NSframe.origin.y, NSframe.size.width, NSframe.size.height); CGvisibleFrame = CGRectMake(NSvisibleFrame.origin.x, NSvisibleFrame.origin.y, NSvisibleFrame.size.width, NSvisibleFrame.size.height); CGlocation = CGPointMake(NSlocation.x, NSlocation.y); if (CGRectContainsPoint(CGframe, CGlocation) && !CGRectContainsPoint(CGvisibleFrame, CGlocation)) for_appkit = YES; } break; case NSKeyDown: case NSKeyUp: if (_x_active) { static BOOL do_swallow = NO; static int swallow_keycode; if ([e type] == NSKeyDown) { /* Before that though, see if there are any global * shortcuts bound to it. */ if (darwinAppKitModMask &[e modifierFlags]) { /* Override to force sending to Appkit */ swallow_keycode = [e keyCode]; do_swallow = YES; for_x = NO; } else if (XQuartzEnableKeyEquivalents && xp_is_symbolic_hotkey_event([e eventRef])) { swallow_keycode = [e keyCode]; do_swallow = YES; for_x = NO; } else if (XQuartzEnableKeyEquivalents && [[self mainMenu] performKeyEquivalent:e]) { swallow_keycode = [e keyCode]; do_swallow = YES; for_appkit = NO; for_x = NO; } else if (!XQuartzIsRootless && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask) && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) { /* We have this here to force processing fullscreen * toggle even if XQuartzEnableKeyEquivalents is disabled */ swallow_keycode = [e keyCode]; do_swallow = YES; for_x = NO; for_appkit = NO; DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); } else { /* No kit window is focused, so send it to X. */ for_appkit = NO; /* Reset our swallow state if we're seeing the same keyCode again. * This can happen if we become !_x_active when the keyCode we * intended to swallow is delivered. See: * https://bugs.freedesktop.org/show_bug.cgi?id=92648 */ if ([e keyCode] == swallow_keycode) { do_swallow = NO; } } } else { /* KeyUp */ /* If we saw a key equivalent on the down, don't pass * the up through to X. */ if (do_swallow && [e keyCode] == swallow_keycode) { do_swallow = NO; for_x = NO; } } } else { /* !_x_active */ for_x = NO; } break; case NSFlagsChanged: /* Don't tell X11 about modifiers changing while it's not active */ if (!_x_active) for_x = NO; break; case NSAppKitDefined: switch ([e subtype]) { static BOOL x_was_active = NO; case NSApplicationActivatedEventType: for_x = NO; if ([e window] == nil && x_was_active) { BOOL order_all_windows = YES; for_appkit = NO; #if APPKIT_APPFLAGS_HACK /* FIXME: This is a hack to avoid passing the event to AppKit which * would result in it raising one of its windows. */ _appFlags._active = YES; #endif [self set_front_process:nil]; /* Get the Spaces preference for SwitchOnActivate */ BOOL const workspaces = [NSUserDefaults.dockDefaults boolForKey:@"workspaces"]; if (workspaces) { order_all_windows = [NSUserDefaults.globalDefaults boolForKey:@"AppleSpacesSwitchOnActivate"]; } /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered * correctly, but we need to activate the top window on this space if there is * none active. * * If there are no active windows, and there are minimized windows, we should * be restoring one of them. */ if ([e data2] & 0x10) { // 0x10 (bfCPSOrderAllWindowsForward) is set when we use cmd-tab or the dock icon DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows); } } break; case 18: /* ApplicationDidReactivate */ if (XQuartzFullscreenVisible) for_appkit = NO; break; case NSApplicationDeactivatedEventType: for_x = NO; x_was_active = _x_active; if (_x_active) [self activateX:NO]; break; } break; default: break; /* for gcc */ } if (for_appkit) { [super sendEvent:e]; } if (for_x) { dispatch_async(eventTranslationQueue, ^{ [self sendX11NSEvent:e]; }); } } - (void) set_apps_menu:(NSArray *)list { [self.controller set_apps_menu:list]; } - (void) set_front_process:unused { [NSApp activateIgnoringOtherApps:YES]; if ([self modalWindow] == nil) [self activateX:YES]; } - (void) show_hide_menubar:(NSNumber *)state { /* Also shows/hides the dock */ if ([state boolValue]) SetSystemUIMode(kUIModeNormal, 0); else SetSystemUIMode(kUIModeAllHidden, XQuartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation" } - (void) launch_client:(NSString *)cmd { (void)[self.controller application:self openFile:cmd]; } - (void) read_defaults { NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; XQuartzRootlessDefault = [defaults boolForKey:XQuartzPrefKeyRootless]; XQuartzFullscreenMenu = [defaults boolForKey:XQuartzPrefKeyFullscreenMenu]; XQuartzFullscreenDisableHotkeys = ![defaults boolForKey:XQuartzPrefKeyFullscreenHotkeys]; darwinFakeButtons = [defaults boolForKey:XQuartzPrefKeyFakeButtons]; XQuartzOptionSendsAlt = [defaults boolForKey:XQuartzPrefKeyOptionSendsAlt]; if (darwinFakeButtons) { NSString * const fake2 = [defaults stringForKey:XQuartzPrefKeyFakeButton2]; if (fake2) { darwinFakeMouse2Mask = DarwinParseModifierList(fake2.UTF8String, TRUE); } NSString * const fake3 = [defaults stringForKey:XQuartzPrefKeyFakeButton3]; if (fake3) { darwinFakeMouse3Mask = DarwinParseModifierList(fake3.UTF8String, TRUE); } } NSString * const appKitModifiers = [defaults stringForKey:XQuartzPrefKeyAppKitModifiers]; if (appKitModifiers) { darwinAppKitModMask = DarwinParseModifierList(appKitModifiers.UTF8String, TRUE); } NSString * const windowItemModifiers = [defaults stringForKey:XQuartzPrefKeyWindowItemModifiers]; if (windowItemModifiers) { windowItemModMask = DarwinParseModifierList(windowItemModifiers.UTF8String, FALSE); } XQuartzEnableKeyEquivalents = [defaults boolForKey:XQuartzPrefKeyKeyEquivs]; darwinSyncKeymap = [defaults boolForKey:XQuartzPrefKeySyncKeymap]; darwinDesiredDepth = [defaults integerForKey:XQuartzPrefKeyDepth]; noTestExtensions = ![defaults boolForKey:XQuartzPrefKeyTESTExtension]; noRenderExtension = ![defaults boolForKey:XQuartzPrefKeyRENDERExtension]; XQuartzScrollInDeviceDirection = [defaults boolForKey:XQuartzPrefKeyScrollInDeviceDirection]; } /* This will end up at the end of the responder chain. */ - (void) copy:sender { DarwinSendDDXEvent(kXquartzPasteboardNotify, 1, AppleWMCopyToPasteboard); } @end void X11ApplicationSetWindowMenu(int nitems, const char **items, const char *shortcuts) { @autoreleasepool { NSMutableArray *> * const allMenuItems = [NSMutableArray array]; for (int i = 0; i < nitems; i++) { NSMutableArray * const menuItem = [NSMutableArray array]; [menuItem addObject:@(items[i])]; if (shortcuts[i] == 0) { [menuItem addObject:@""]; } else { [menuItem addObject:[NSString stringWithFormat:@"%d", shortcuts[i]]]; } [allMenuItems addObject:menuItem]; } dispatch_async(dispatch_get_main_queue(), ^{ [X11App.controller set_window_menu:allMenuItems]; }); } } void X11ApplicationSetWindowMenuCheck(int idx) { dispatch_async(dispatch_get_main_queue(), ^{ [X11App.controller set_window_menu_check:@(idx)]; }); } void X11ApplicationSetFrontProcess(void) { dispatch_async(dispatch_get_main_queue(), ^{ [X11App set_front_process:nil]; }); } void X11ApplicationSetCanQuit(int state) { dispatch_async(dispatch_get_main_queue(), ^{ X11App.controller.can_quit = !!state; }); } void X11ApplicationServerReady(void) { dispatch_async(dispatch_get_main_queue(), ^{ [X11App.controller server_ready]; }); } void X11ApplicationShowHideMenubar(int state) { dispatch_async(dispatch_get_main_queue(), ^{ [X11App show_hide_menubar:@(state)]; }); } void X11ApplicationLaunchClient(const char *cmd) { @autoreleasepool { NSString *string = @(cmd); dispatch_async(dispatch_get_main_queue(), ^{ [X11App launch_client:string]; }); } } /* This is a special function in that it is run from the *SERVER* thread and * not the AppKit thread. We want to block entering a screen-capturing RandR * mode until we notify the user about how to get out if the X11 client crashes. */ Bool X11ApplicationCanEnterRandR(void) { NSString *title, *msg; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; if ([defaults boolForKey:XQuartzPrefKeyNoRANDRAlert] || XQuartzShieldingWindowLevel != 0) return TRUE; title = NSLocalizedString(@"Enter RandR mode?", @"Dialog title when switching to RandR"); msg = NSLocalizedString( @"An application has requested X11 to change the resolution of your display. X11 will restore the display to its previous state when the requesting application requests to return to the previous state. Alternatively, you can use the ⌥⌘A key sequence to force X11 to return to the previous state.", @"Dialog when switching to RandR"); if (!XQuartzIsRootless) QuartzShowFullscreen(FALSE); NSInteger __block alert_result; dispatch_sync(dispatch_get_main_queue(), ^{ alert_result = NSRunAlertPanel(title, @"%@", NSLocalizedString(@"Allow", @""), NSLocalizedString(@"Cancel", @""), NSLocalizedString(@"Always Allow", @""), msg); }); switch (alert_result) { case NSAlertOtherReturn: [defaults setBool:YES forKey:XQuartzPrefKeyNoRANDRAlert]; case NSAlertDefaultReturn: return YES; default: return NO; } } static void check_xinitrc(void) { char *tem, buf[1024]; NSString *msg; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; if ([defaults boolForKey:XQuartzPrefKeyDoneXinitCheck]) return; tem = getenv("HOME"); if (tem == NULL) goto done; snprintf(buf, sizeof(buf), "%s/.xinitrc", tem); if (access(buf, F_OK) != 0) goto done; msg = NSLocalizedString( @"You have an existing ~/.xinitrc file.\n\n\ Windows displayed by X11 applications may not have titlebars, or may look \ different to windows displayed by native applications.\n\n\ Would you like to move aside the existing file and use the standard X11 \ environment the next time you start X11?" , @"Startup xinitrc dialog"); if (NSAlertDefaultReturn == NSRunAlertPanel(nil, @"%@", NSLocalizedString(@"Yes", @""), NSLocalizedString(@"No", @""), nil, msg)) { char buf2[1024]; int i = -1; snprintf(buf2, sizeof(buf2), "%s.old", buf); for (i = 1; access(buf2, F_OK) == 0; i++) snprintf(buf2, sizeof(buf2), "%s.old.%d", buf, i); rename(buf, buf2); } done: [defaults setBool:YES forKey:XQuartzPrefKeyDoneXinitCheck]; } static inline pthread_t create_thread(void *(*func)(void *), void *arg) { pthread_attr_t attr; pthread_t tid; pthread_attr_init(&attr); pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&tid, &attr, func, arg); pthread_attr_destroy(&attr); return tid; } static void * xpbproxy_x_thread(void *args) { xpbproxy_run(); ErrorF("xpbproxy thread is terminating unexpectedly.\n"); return NULL; } void X11ApplicationMain(int argc, char **argv, char **envp) { #ifdef DEBUG while (access("/tmp/x11-block", F_OK) == 0) sleep(1); #endif @autoreleasepool { X11App = (X11Application *)[X11Application sharedApplication]; [X11App read_defaults]; [NSBundle loadNibNamed:@"main" owner:NSApp]; [NSNotificationCenter.defaultCenter addObserver:NSApp selector:@selector (became_key:) name:NSWindowDidBecomeKeyNotification object:nil]; /* * The xpr Quartz mode is statically linked into this server. * Initialize all the Quartz functions. */ QuartzModeBundleInit(); /* Calculate the height of the menubar so we can avoid it. */ aquaMenuBarHeight = NSApp.mainMenu.menuBarHeight; if (!aquaMenuBarHeight) { NSScreen* primaryScreen = NSScreen.screens[0]; aquaMenuBarHeight = NSHeight(primaryScreen.frame) - NSMaxY(primaryScreen.visibleFrame); } eventTranslationQueue = dispatch_queue_create(BUNDLE_ID_PREFIX ".X11.NSEventsToX11EventsQueue", NULL); assert(eventTranslationQueue != NULL); /* Set the key layout seed before we start the server */ last_key_layout = TISCopyCurrentKeyboardLayoutInputSource(); if (!last_key_layout) { ErrorF("X11ApplicationMain: Unable to determine TISCopyCurrentKeyboardLayoutInputSource() at startup.\n"); } if (!QuartsResyncKeymap(FALSE)) { ErrorF("X11ApplicationMain: Could not build a valid keymap.\n"); } /* Tell the server thread that it can proceed */ QuartzInitServer(argc, argv, envp); /* This must be done after QuartzInitServer because it can result in * an mieqEnqueue() - */ check_xinitrc(); create_thread(xpbproxy_x_thread, NULL); #if XQUARTZ_SPARKLE [[X11App controller] setup_sparkle]; [[SUUpdater sharedUpdater] resetUpdateCycle]; // [[SUUpdater sharedUpdater] checkForUpdates:X11App]; #endif } [NSApp run]; /* not reached */ } @implementation X11Application (Private) #ifdef NX_DEVICELCMDKEYMASK /* This is to workaround a bug in the VNC server where we sometimes see the L * modifier and sometimes see no "side" */ static inline int ensure_flag(int flags, int device_independent, int device_dependents, int device_dependent_default) { if ((flags & device_independent) && !(flags & device_dependents)) flags |= device_dependent_default; return flags; } #endif #ifdef DEBUG_UNTRUSTED_POINTER_DELTA static const char * untrusted_str(NSEvent *e) { switch ([e type]) { case NSScrollWheel: return "NSScrollWheel"; case NSTabletPoint: return "NSTabletPoint"; case NSOtherMouseDown: return "NSOtherMouseDown"; case NSOtherMouseUp: return "NSOtherMouseUp"; case NSLeftMouseDown: return "NSLeftMouseDown"; case NSLeftMouseUp: return "NSLeftMouseUp"; default: switch ([e subtype]) { case NSTabletPointEventSubtype: return "NSTabletPointEventSubtype"; case NSTabletProximityEventSubtype: return "NSTabletProximityEventSubtype"; default: return "Other"; } } } #endif extern void wait_for_mieq_init(void); - (void) sendX11NSEvent:(NSEvent *)e { NSPoint location = NSZeroPoint; int ev_button, ev_type; static float pressure = 0.0; // static so ProximityOut will have the value from the previous tablet event static NSPoint tilt; // static so ProximityOut will have the value from the previous tablet event static DeviceIntPtr darwinTabletCurrent = NULL; static BOOL needsProximityIn = NO; // Do we do need to handle a pending ProximityIn once we have pressure/tilt? DeviceIntPtr pDev; int modifierFlags; BOOL isMouseOrTabletEvent, isTabletEvent; if (!darwinTabletCurrent) { /* Ensure that the event system is initialized */ wait_for_mieq_init(); assert(darwinTabletStylus); tilt = NSZeroPoint; darwinTabletCurrent = darwinTabletStylus; } isMouseOrTabletEvent = [e type] == NSLeftMouseDown || [e type] == NSOtherMouseDown || [e type] == NSRightMouseDown || [e type] == NSLeftMouseUp || [e type] == NSOtherMouseUp || [e type] == NSRightMouseUp || [e type] == NSLeftMouseDragged || [e type] == NSOtherMouseDragged || [e type] == NSRightMouseDragged || [e type] == NSMouseMoved || [e type] == NSTabletPoint || [e type] == NSScrollWheel; isTabletEvent = ([e type] == NSTabletPoint) || (isMouseOrTabletEvent && ([e subtype] == NSTabletPointEventSubtype || [e subtype] == NSTabletProximityEventSubtype)); if (isMouseOrTabletEvent) { static NSPoint lastpt; NSWindow *window = [e window]; NSRect screen = [[[NSScreen screens] objectAtIndex:0] frame]; BOOL hasUntrustedPointerDelta; // NSEvents for tablets are not consistent wrt deltaXY between events, so we cannot rely on that // Thus tablets will be subject to the warp-pointer bug worked around by the delta, but tablets // are not normally used in cases where that bug would present itself, so this is a fair tradeoff // deltaX and deltaY are incorrect for NSMouseMoved, NSTabletPointEventSubtype // http://xquartz.macosforge.org/trac/ticket/288 hasUntrustedPointerDelta = isTabletEvent; // The deltaXY for middle click events also appear erroneous after fast user switching // deltaX and deltaY are incorrect for NSOtherMouseDown and NSOtherMouseUp after FUS // http://xquartz.macosforge.org/trac/ticket/389 hasUntrustedPointerDelta |= [e type] == NSOtherMouseDown || [e type] == NSOtherMouseUp; // The deltaXY for scroll events correspond to the scroll delta, not the pointer delta // deltaXY for wheel events are being sent as mouse movement hasUntrustedPointerDelta |= [e type] == NSScrollWheel; #ifdef DEBUG_UNTRUSTED_POINTER_DELTA hasUntrustedPointerDelta |= [e type] == NSLeftMouseDown || [e type] == NSLeftMouseUp; #endif if (window != nil) { NSRect frame = [window frame]; location = [e locationInWindow]; location.x += frame.origin.x; location.y += frame.origin.y; lastpt = location; } else if (hasUntrustedPointerDelta) { #ifdef DEBUG_UNTRUSTED_POINTER_DELTA ErrorF("--- Begin Event Debug ---\n"); ErrorF("Event type: %s\n", untrusted_str(e)); ErrorF("old lastpt: (%0.2f, %0.2f)\n", lastpt.x, lastpt.y); ErrorF(" delta: (%0.2f, %0.2f)\n", [e deltaX], -[e deltaY]); ErrorF(" location: (%0.2f, %0.2f)\n", lastpt.x + [e deltaX], lastpt.y - [e deltaY]); ErrorF("workaround: (%0.2f, %0.2f)\n", [e locationInWindow].x, [e locationInWindow].y); ErrorF("--- End Event Debug ---\n"); location.x = lastpt.x + [e deltaX]; location.y = lastpt.y - [e deltaY]; lastpt = [e locationInWindow]; #else location = [e locationInWindow]; lastpt = location; #endif } else { location.x = lastpt.x + [e deltaX]; location.y = lastpt.y - [e deltaY]; lastpt = [e locationInWindow]; } /* Convert coordinate system */ location.y = (screen.origin.y + screen.size.height) - location.y; } modifierFlags = [e modifierFlags]; #ifdef NX_DEVICELCMDKEYMASK /* This is to workaround a bug in the VNC server where we sometimes see the L * modifier and sometimes see no "side" */ modifierFlags = ensure_flag(modifierFlags, NX_CONTROLMASK, NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK, NX_DEVICELCTLKEYMASK); modifierFlags = ensure_flag(modifierFlags, NX_SHIFTMASK, NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK, NX_DEVICELSHIFTKEYMASK); modifierFlags = ensure_flag(modifierFlags, NX_COMMANDMASK, NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK, NX_DEVICELCMDKEYMASK); modifierFlags = ensure_flag(modifierFlags, NX_ALTERNATEMASK, NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK, NX_DEVICELALTKEYMASK); #endif modifierFlags &= darwin_all_modifier_mask; /* We don't receive modifier key events while out of focus, and 3button * emulation mucks this up, so we need to check our modifier flag state * on every event... ugg */ if (darwin_all_modifier_flags != modifierFlags) DarwinUpdateModKeys(modifierFlags); switch ([e type]) { case NSLeftMouseDown: ev_button = 1; ev_type = ButtonPress; goto handle_mouse; case NSOtherMouseDown: // Get the AppKit button number, and convert it from 0-based to 1-based ev_button = [e buttonNumber] + 1; /* Translate middle mouse button (3 in AppKit) to button 2 in X11, * and translate additional mouse buttons (4 and higher in AppKit) * to buttons 8 and higher in X11, to match default behavior of X11 * on other platforms */ ev_button = (ev_button == 3) ? 2 : (ev_button + 4); ev_type = ButtonPress; goto handle_mouse; case NSRightMouseDown: ev_button = 3; ev_type = ButtonPress; goto handle_mouse; case NSLeftMouseUp: ev_button = 1; ev_type = ButtonRelease; goto handle_mouse; case NSOtherMouseUp: // See above comments for NSOtherMouseDown ev_button = [e buttonNumber] + 1; ev_button = (ev_button == 3) ? 2 : (ev_button + 4); ev_type = ButtonRelease; goto handle_mouse; case NSRightMouseUp: ev_button = 3; ev_type = ButtonRelease; goto handle_mouse; case NSLeftMouseDragged: ev_button = 1; ev_type = MotionNotify; goto handle_mouse; case NSOtherMouseDragged: // See above comments for NSOtherMouseDown ev_button = [e buttonNumber] + 1; ev_button = (ev_button == 3) ? 2 : (ev_button + 4); ev_type = MotionNotify; goto handle_mouse; case NSRightMouseDragged: ev_button = 3; ev_type = MotionNotify; goto handle_mouse; case NSMouseMoved: ev_button = 0; ev_type = MotionNotify; goto handle_mouse; case NSTabletPoint: ev_button = 0; ev_type = MotionNotify; goto handle_mouse; handle_mouse: pDev = darwinPointer; /* NSTabletPoint can have no subtype */ if ([e type] != NSTabletPoint && [e subtype] == NSTabletProximityEventSubtype) { switch ([e pointingDeviceType]) { case NSEraserPointingDevice: darwinTabletCurrent = darwinTabletEraser; break; case NSPenPointingDevice: darwinTabletCurrent = darwinTabletStylus; break; case NSCursorPointingDevice: case NSUnknownPointingDevice: default: darwinTabletCurrent = darwinTabletCursor; break; } if ([e isEnteringProximity]) needsProximityIn = YES; else DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0, location.x, location.y, pressure, tilt.x, tilt.y); return; } if ([e type] == NSTabletPoint || [e subtype] == NSTabletPointEventSubtype) { pressure = [e pressure]; tilt = [e tilt]; pDev = darwinTabletCurrent; if (needsProximityIn) { DarwinSendTabletEvents(darwinTabletCurrent, ProximityIn, 0, location.x, location.y, pressure, tilt.x, tilt.y); needsProximityIn = NO; } } if (!XQuartzServerVisible && noTestExtensions) { xp_window_id wid = 0; xp_error err; /* Sigh. Need to check that we're really over one of * our windows. (We need to receive pointer events while * not in the foreground, but we don't want to receive them * when another window is over us or we might show a tooltip) */ err = xp_find_window(location.x, location.y, 0, &wid); if (err != XP_Success || (err == XP_Success && wid == 0)) { bgMouseLocation = location; bgMouseLocationUpdated = TRUE; return; } } if (bgMouseLocationUpdated) { if (!(ev_type == MotionNotify && ev_button == 0)) { DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, location.x, location.y, 0.0, 0.0); } bgMouseLocationUpdated = FALSE; } if (pDev == darwinPointer) { DarwinSendPointerEvents(pDev, ev_type, ev_button, location.x, location.y, [e deltaX], [e deltaY]); } else { DarwinSendTabletEvents(pDev, ev_type, ev_button, location.x, location.y, pressure, tilt.x, tilt.y); } break; case NSTabletProximity: switch ([e pointingDeviceType]) { case NSEraserPointingDevice: darwinTabletCurrent = darwinTabletEraser; break; case NSPenPointingDevice: darwinTabletCurrent = darwinTabletStylus; break; case NSCursorPointingDevice: case NSUnknownPointingDevice: default: darwinTabletCurrent = darwinTabletCursor; break; } if ([e isEnteringProximity]) needsProximityIn = YES; else DarwinSendTabletEvents(darwinTabletCurrent, ProximityOut, 0, location.x, location.y, pressure, tilt.x, tilt.y); break; case NSScrollWheel: { CGFloat deltaX = [e deltaX]; CGFloat deltaY = [e deltaY]; CGEventRef cge = [e CGEvent]; BOOL isContinuous = CGEventGetIntegerValueField(cge, kCGScrollWheelEventIsContinuous); #if 0 /* Scale the scroll value by line height */ CGEventSourceRef source = CGEventCreateSourceFromEvent(cge); if (source) { double lineHeight = CGEventSourceGetPixelsPerLine(source); CFRelease(source); /* There's no real reason for the 1/5 ratio here other than that * it feels like a good ratio after some testing. */ deltaX *= lineHeight / 5.0; deltaY *= lineHeight / 5.0; } #endif if (XQuartzScrollInDeviceDirection && [e isDirectionInvertedFromDevice]) { deltaX *= -1; deltaY *= -1; } /* This hack is in place to better deal with "clicky" scroll wheels: * http://xquartz.macosforge.org/trac/ticket/562 */ if (!isContinuous) { static NSTimeInterval lastScrollTime = 0.0; /* These store how much extra we have already scrolled. * ie, this is how much we ignore on the next event. */ static double deficit_x = 0.0; static double deficit_y = 0.0; /* If we have past a second since the last scroll, wipe the slate * clean */ if ([e timestamp] - lastScrollTime > 1.0) { deficit_x = deficit_y = 0.0; } lastScrollTime = [e timestamp]; if (deltaX != 0.0) { /* If we changed directions, wipe the slate clean */ if ((deficit_x < 0.0 && deltaX > 0.0) || (deficit_x > 0.0 && deltaX < 0.0)) { deficit_x = 0.0; } /* Eat up the deficit, but ensure that something is * always sent */ if (fabs(deltaX) > fabs(deficit_x)) { deltaX -= deficit_x; if (deltaX > 0.0) { deficit_x = ceil(deltaX) - deltaX; deltaX = ceil(deltaX); } else { deficit_x = floor(deltaX) - deltaX; deltaX = floor(deltaX); } } else { deficit_x -= deltaX; if (deltaX > 0.0) { deltaX = 1.0; } else { deltaX = -1.0; } deficit_x += deltaX; } } if (deltaY != 0.0) { /* If we changed directions, wipe the slate clean */ if ((deficit_y < 0.0 && deltaY > 0.0) || (deficit_y > 0.0 && deltaY < 0.0)) { deficit_y = 0.0; } /* Eat up the deficit, but ensure that something is * always sent */ if (fabs(deltaY) > fabs(deficit_y)) { deltaY -= deficit_y; if (deltaY > 0.0) { deficit_y = ceil(deltaY) - deltaY; deltaY = ceil(deltaY); } else { deficit_y = floor(deltaY) - deltaY; deltaY = floor(deltaY); } } else { deficit_y -= deltaY; if (deltaY > 0.0) { deltaY = 1.0; } else { deltaY = -1.0; } deficit_y += deltaY; } } } DarwinSendScrollEvents(deltaX, deltaY); break; } case NSKeyDown: case NSKeyUp: { /* XKB clobbers our keymap at startup, so we need to force it on the first keypress. * TODO: Make this less of a kludge. */ static int force_resync_keymap = YES; if (force_resync_keymap) { DarwinSendDDXEvent(kXquartzReloadKeymap, 0); force_resync_keymap = NO; } } if (darwinSyncKeymap) { __block TISInputSourceRef key_layout; dispatch_block_t copyCurrentKeyboardLayoutInputSource = ^{ key_layout = TISCopyCurrentKeyboardLayoutInputSource(); }; /* This is an ugly ant-pattern, but it is more expedient to address the problem right now. */ if (pthread_main_np()) { copyCurrentKeyboardLayoutInputSource(); } else { dispatch_sync(dispatch_get_main_queue(), copyCurrentKeyboardLayoutInputSource); } TISInputSourceRef clear; if (CFEqual(key_layout, last_key_layout)) { CFRelease(key_layout); } else { /* Swap/free thread-safely */ clear = last_key_layout; last_key_layout = key_layout; CFRelease(clear); /* Update keyInfo */ if (!QuartsResyncKeymap(TRUE)) { ErrorF( "sendX11NSEvent: Could not build a valid keymap.\n"); } } } ev_type = ([e type] == NSKeyDown) ? KeyPress : KeyRelease; DarwinSendKeyboardEvents(ev_type, [e keyCode]); break; default: break; /* for gcc */ } } @end xorg-server-21.1.16/hw/xquartz/X11Controller.m0000644000175000017500000007452114757411105014573 /* X11Controller.m -- connect the IB ui, also the NSApp delegate * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #import "X11Controller.h" #import "X11Application.h" #import "NSUserDefaults+XQuartzDefaults.h" #include "opaque.h" #include "darwin.h" #include "darwinEvents.h" #include "quartz.h" #include "quartzKeyboard.h" #include #include "applewmExt.h" #include #include #include #include #include #include #include extern aslclient aslc; extern char *bundle_id_prefix; @interface X11Controller () #ifdef XQUARTZ_SPARKLE @property (nonatomic, readwrite, strong) NSMenuItem *check_for_updates_item; // Programatically enabled #endif @property (nonatomic, readwrite, strong) NSArray *> *apps; @property (nonatomic, readwrite, strong) NSMutableArray *> *table_apps; @property (nonatomic, readwrite, assign) NSInteger windows_menu_nitems; @property (nonatomic, readwrite, assign) int checked_window_item; @property (nonatomic, readwrite, assign) x_list *pending_apps; @property (nonatomic, readwrite, assign) OSX_BOOL finished_launching; @end @implementation X11Controller - (void) awakeFromNib { X11Application *xapp = NSApp; /* Point X11Application at ourself. */ xapp.controller = self; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; NSArray *appsMenu = [defaults arrayForKey:XQuartzPrefKeyAppsMenu]; if (appsMenu) { int count = appsMenu.count; /* convert from [TITLE1 COMMAND1 TITLE2 COMMAND2 ...] to [[TITLE1 COMMAND1] [TITLE2 COMMAND2] ...] format. */ if (count > 0 && ![appsMenu[0] isKindOfClass:NSArray.class]) { int i; NSMutableArray *copy, *sub; copy = [NSMutableArray arrayWithCapacity:(count / 2)]; for (i = 0; i < count / 2; i++) { sub = [[NSMutableArray alloc] initWithCapacity:3]; [sub addObject:appsMenu[i * 2]]; [sub addObject:appsMenu[i * 2 + 1]]; [sub addObject:@""]; [copy addObject:sub]; [sub release]; } appsMenu = copy; [defaults setObject:appsMenu forKey:XQuartzPrefKeyAppsMenu]; } [self set_apps_menu:appsMenu]; } [NSNotificationCenter.defaultCenter addObserver:self selector:@selector(apps_table_done:) name:NSWindowWillCloseNotification object:self.apps_table.window]; } - (void) item_selected:sender { [NSApp activateIgnoringOtherApps:YES]; DarwinSendDDXEvent(kXquartzControllerNotify, 2, AppleWMWindowMenuItem, [sender tag]); } - (void) remove_apps_menu { NSMenu *menu; NSMenuItem *item; int i; NSMenuItem * const apps_separator = self.apps_separator; NSMenu * const dock_apps_menu = self.dock_apps_menu; if (self.apps == nil || apps_separator == nil) return; menu = [apps_separator menu]; if (menu != nil) { for (i = [menu numberOfItems] - 1; i >= 0; i--) { item = (NSMenuItem *)[menu itemAtIndex:i]; if ([item tag] != 0) [menu removeItemAtIndex:i]; } } if (dock_apps_menu != nil) { for (i = [dock_apps_menu numberOfItems] - 1; i >= 0; i--) { item = (NSMenuItem *)[dock_apps_menu itemAtIndex:i]; if ([item tag] != 0) [dock_apps_menu removeItemAtIndex:i]; } } self.apps = nil; } - (void) prepend_apps_item:(NSArray *> *)list index:(int)i menu:(NSMenu *)menu { NSString *title, *shortcut = @""; NSArray *group; NSMenuItem *item; group = [list objectAtIndex:i]; title = [group objectAtIndex:0]; if ([group count] >= 3) shortcut = [group objectAtIndex:2]; if ([title length] != 0) { item = (NSMenuItem *)[menu insertItemWithTitle:title action:@selector ( app_selected:) keyEquivalent:shortcut atIndex:0]; [item setTarget:self]; [item setEnabled:YES]; } else { item = (NSMenuItem *)[NSMenuItem separatorItem]; [menu insertItem:item atIndex:0]; } [item setTag:i + 1]; /* can't be zero, so add one */ } - (void) install_apps_menu:(NSArray *> *)list { NSMenu *menu; int i, count; count = [list count]; NSMenuItem * const apps_separator = self.apps_separator; NSMenu * const dock_apps_menu = self.dock_apps_menu; if (count == 0 || apps_separator == nil) return; menu = [apps_separator menu]; for (i = count - 1; i >= 0; i--) { if (menu != nil) [self prepend_apps_item:list index:i menu:menu]; if (dock_apps_menu != nil) [self prepend_apps_item:list index:i menu:dock_apps_menu]; } self.apps = list; } - (void) set_window_menu:(NSArray *> *)list { NSMenu * const menu = X11App.windowsMenu; NSMenu * const dock_menu = self.dock_menu; /* First, remove the existing items from the Window Menu */ NSInteger itemsToRemove = self.windows_menu_nitems; if (itemsToRemove > 0) { NSInteger indexForRemoval = menu.numberOfItems - itemsToRemove - 1; /* we also want to remove the separator */ for (NSInteger i = 0 ; i < itemsToRemove + 1 ; i++) { [menu removeItemAtIndex:indexForRemoval]; } for (NSInteger i = 0 ; i < itemsToRemove; i++) { [dock_menu removeItemAtIndex:0]; } } NSInteger const itemsToAdd = list.count; self.windows_menu_nitems = itemsToAdd; if (itemsToAdd > 0) { NSMenuItem *item; // Push a Separator [menu addItem:[NSMenuItem separatorItem]]; for (NSInteger i = 0; i < itemsToAdd; i++) { NSString *name, *shortcut; name = list[i][0]; shortcut = list[i][1]; if (windowItemModMask == 0 || windowItemModMask == -1) shortcut = @""; item = (NSMenuItem *)[menu addItemWithTitle:name action:@selector(item_selected:) keyEquivalent:shortcut]; [item setKeyEquivalentModifierMask:(NSUInteger)windowItemModMask]; [item setTarget:self]; [item setTag:i]; [item setEnabled:YES]; item = (NSMenuItem *)[dock_menu insertItemWithTitle:name action:@selector(item_selected:) keyEquivalent:shortcut atIndex:i]; [item setKeyEquivalentModifierMask:(NSUInteger)windowItemModMask]; [item setTarget:self]; [item setTag:i]; [item setEnabled:YES]; } int const checked_window_item = self.checked_window_item; if (checked_window_item >= 0 && checked_window_item < itemsToAdd) { NSInteger first = menu.numberOfItems - itemsToAdd; item = (NSMenuItem *)[menu itemAtIndex:first + checked_window_item]; [item setState:NSOnState]; item = (NSMenuItem *)[dock_menu itemAtIndex:checked_window_item]; [item setState:NSOnState]; } } DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMWindowMenuNotify); } - (void) set_window_menu_check:(NSNumber *)nn { NSMenu * const menu = X11App.windowsMenu; NSMenu * const dock_menu = self.dock_menu; NSMenuItem *item; int n = nn.intValue; NSInteger const count = self.windows_menu_nitems; NSInteger const first = menu.numberOfItems - count; int const checked_window_item = self.checked_window_item; if (checked_window_item >= 0 && checked_window_item < count) { item = (NSMenuItem *)[menu itemAtIndex:first + checked_window_item]; [item setState:NSOffState]; item = (NSMenuItem *)[dock_menu itemAtIndex:checked_window_item]; [item setState:NSOffState]; } if (n >= 0 && n < count) { item = (NSMenuItem *)[menu itemAtIndex:first + n]; [item setState:NSOnState]; item = (NSMenuItem *)[dock_menu itemAtIndex:n]; [item setState:NSOnState]; } self.checked_window_item = n; } - (void) set_apps_menu:(NSArray *> *)list { [self remove_apps_menu]; [self install_apps_menu:list]; } #ifdef XQUARTZ_SPARKLE - (void) setup_sparkle { if (self.check_for_updates_item) return; // already did it... NSMenu *menu = [self.x11_about_item menu]; NSMenuItem * const check_for_updates_item = [menu insertItemWithTitle:NSLocalizedString(@"Check for X11 Updates...", @"Check for X11 Updates...") action:@selector(checkForUpdates:) keyEquivalent:@"" atIndex:1]; [check_for_updates_item setTarget:[SUUpdater sharedUpdater]]; [check_for_updates_item setEnabled:YES]; self.check_for_updates_item = check_for_updates_item; // Set X11Controller as the delegate for the updater. [[SUUpdater sharedUpdater] setDelegate:self]; } // Sent immediately before installing the specified update. - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)update { //self.can_quit = YES; } #endif - (void) launch_client:(NSString *)filename { int child1, child2 = 0; int status; const char *newargv[4]; char buf[128]; char *s; int stdout_pipe[2]; int stderr_pipe[2]; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; NSString * const shell = [defaults stringForKey:XQuartzPrefKeyLoginShell]; newargv[0] = shell.fileSystemRepresentation; newargv[1] = "-c"; newargv[2] = filename.fileSystemRepresentation; newargv[3] = NULL; s = getenv("DISPLAY"); if (s == NULL || s[0] == 0) { snprintf(buf, sizeof(buf), ":%s", display); setenv("DISPLAY", buf, TRUE); } if (&asl_log_descriptor) { char *asl_sender; aslmsg amsg = asl_new(ASL_TYPE_MSG); assert(amsg); asprintf(&asl_sender, "%s.%s", bundle_id_prefix, newargv[2]); assert(asl_sender); for(s = asl_sender + strlen(bundle_id_prefix) + 1; *s; s++) { if(! ((*s >= 'a' && *s <= 'z') || (*s >= 'A' && *s <= 'Z') || (*s >= '0' && *s <= '9'))) { *s = '_'; } } (void)asl_set(amsg, ASL_KEY_SENDER, asl_sender); free(asl_sender); assert(0 == pipe(stdout_pipe)); fcntl(stdout_pipe[0], F_SETFD, FD_CLOEXEC); fcntl(stdout_pipe[0], F_SETFL, O_NONBLOCK); assert(0 == pipe(stderr_pipe)); fcntl(stderr_pipe[0], F_SETFD, FD_CLOEXEC); fcntl(stderr_pipe[0], F_SETFL, O_NONBLOCK); asl_log_descriptor(aslc, amsg, ASL_LEVEL_INFO, stdout_pipe[0], ASL_LOG_DESCRIPTOR_READ); asl_log_descriptor(aslc, amsg, ASL_LEVEL_NOTICE, stderr_pipe[0], ASL_LOG_DESCRIPTOR_READ); asl_free(amsg); } /* Do the fork-twice trick to avoid having to reap zombies */ child1 = fork(); switch (child1) { case -1: /* error */ break; case 0: /* child1 */ child2 = fork(); switch (child2) { int max_files, i; case -1: /* error */ _exit(1); case 0: /* child2 */ if (&asl_log_descriptor) { /* Replace our stdout/stderr */ dup2(stdout_pipe[1], STDOUT_FILENO); dup2(stderr_pipe[1], STDERR_FILENO); } /* close all open files except for standard streams */ max_files = sysconf(_SC_OPEN_MAX); for (i = 3; i < max_files; i++) close(i); /* ensure stdin is on /dev/null */ close(0); open("/dev/null", O_RDONLY); execvp(newargv[0], (char * *const)newargv); _exit(2); default: /* parent (child1) */ _exit(0); } break; default: /* parent */ waitpid(child1, &status, 0); } if (&asl_log_descriptor) { /* Close the write ends of the pipe */ close(stdout_pipe[1]); close(stderr_pipe[1]); } } - (void) app_selected:sender { int tag; NSString *item; NSArray *> * const apps = self.apps; tag = [sender tag] - 1; if (apps == nil || tag < 0 || tag >= [apps count]) return; item = [[apps objectAtIndex:tag] objectAtIndex:1]; [self launch_client:item]; } - (IBAction) apps_table_show:sender { NSArray *columns; NSMutableArray *> * const oldapps = self.table_apps; NSTableView * const apps_table = self.apps_table; NSMutableArray *> * const table_apps = [[NSMutableArray alloc] initWithCapacity:1]; self.table_apps = table_apps; NSArray *> * const apps = self.apps; if (apps != nil) { for (NSArray * row in apps) { [table_apps addObject:row.mutableCopy]; } } columns = [apps_table tableColumns]; [[columns objectAtIndex:0] setIdentifier:@"0"]; [[columns objectAtIndex:1] setIdentifier:@"1"]; [[columns objectAtIndex:2] setIdentifier:@"2"]; [apps_table setDataSource:self]; [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO]; [[apps_table window] makeKeyAndOrderFront:sender]; [apps_table reloadData]; if (oldapps != nil) [oldapps release]; } - (IBAction) apps_table_done:sender { NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; [apps_table deselectAll:sender]; /* flush edits? */ [self remove_apps_menu]; [self install_apps_menu:table_apps]; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; [defaults setObject:table_apps forKey:XQuartzPrefKeyAppsMenu]; [[apps_table window] orderOut:sender]; self.table_apps = nil; } - (IBAction) apps_table_new:sender { NSMutableArray *item; NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow], i; if (row < 0) row = 0; else row = row + 1; i = row; if (i > [table_apps count]) return; /* avoid exceptions */ [apps_table deselectAll:sender]; item = [[NSMutableArray alloc] initWithCapacity:3]; [item addObject:@""]; [item addObject:@""]; [item addObject:@""]; [table_apps insertObject:item atIndex:i]; [item release]; [apps_table reloadData]; [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; } - (IBAction) apps_table_duplicate:sender { NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow], i; NSMutableArray *item; if (row < 0) { [self apps_table_new:sender]; return; } i = row; if (i > [table_apps count] - 1) return; /* avoid exceptions */ [apps_table deselectAll:sender]; item = [[table_apps objectAtIndex:i] mutableCopy]; [table_apps insertObject:item atIndex:i]; [item release]; [apps_table reloadData]; [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row + 1] byExtendingSelection:NO]; } - (IBAction) apps_table_delete:sender { NSMutableArray *> * const table_apps = self.table_apps; NSTableView * const apps_table = self.apps_table; int row = [apps_table selectedRow]; if (row >= 0) { int i = row; if (i > [table_apps count] - 1) return; /* avoid exceptions */ [apps_table deselectAll:sender]; [table_apps removeObjectAtIndex:i]; } [apps_table reloadData]; row = MIN(row, [table_apps count] - 1); if (row >= 0) [apps_table selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; } - (NSInteger) numberOfRowsInTableView:(NSTableView *)tableView { NSMutableArray *> * const table_apps = self.table_apps; if (table_apps == nil) return 0; return [table_apps count]; } - (id) tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSMutableArray *> * const table_apps = self.table_apps; NSArray *item; int col; if (table_apps == nil) return nil; col = [[tableColumn identifier] intValue]; item = [table_apps objectAtIndex:row]; if ([item count] > col) return [item objectAtIndex:col]; else return @""; } - (void) tableView:(NSTableView *)tableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSMutableArray *> * const table_apps = self.table_apps; NSMutableArray *item; int col; if (table_apps == nil) return; col = [[tableColumn identifier] intValue]; item = [table_apps objectAtIndex:row]; [item replaceObjectAtIndex:col withObject:object]; } - (void) hide_window:sender { if ([X11App x_active]) DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMHideWindow); else NSBeep(); /* FIXME: something here */ } - (IBAction)bring_to_front:sender { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMBringAllToFront); } - (IBAction)close_window:sender { if ([X11App x_active]) DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMCloseWindow); else [[NSApp keyWindow] performClose:sender]; } - (IBAction)minimize_window:sender { if ([X11App x_active]) DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMMinimizeWindow); else [[NSApp keyWindow] performMiniaturize:sender]; } - (IBAction)zoom_window:sender { if ([X11App x_active]) DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMZoomWindow); else [[NSApp keyWindow] performZoom:sender]; } - (IBAction) next_window:sender { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMNextWindow); } - (IBAction) previous_window:sender { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMPreviousWindow); } - (IBAction) enable_fullscreen_changed:sender { XQuartzRootlessDefault = !self.enable_fullscreen.state; [self.enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault]; [self.enable_fullscreen_menu_text setTextColor:XQuartzRootlessDefault ? NSColor.disabledControlTextColor : NSColor.controlTextColor]; DarwinSendDDXEvent(kXquartzSetRootless, 1, XQuartzRootlessDefault); NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; [defaults setBool:XQuartzRootlessDefault forKey:XQuartzPrefKeyRootless]; } - (IBAction) toggle_fullscreen:sender { DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); } - (IBAction)prefs_changed:sender { if (!sender) return; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; if (sender == self.fake_buttons) { darwinFakeButtons = !!self.fake_buttons.state; [defaults setBool:darwinFakeButtons forKey:XQuartzPrefKeyFakeButtons]; } else if (sender == self.enable_keyequivs) { XQuartzEnableKeyEquivalents = !!self.enable_keyequivs.state; [defaults setBool:XQuartzEnableKeyEquivalents forKey:XQuartzPrefKeyKeyEquivs]; } else if (sender == self.sync_keymap) { darwinSyncKeymap = !!self.sync_keymap.state; [defaults setBool:darwinSyncKeymap forKey:XQuartzPrefKeySyncKeymap]; } else if (sender == self.enable_fullscreen_menu) { XQuartzFullscreenMenu = !!self.enable_fullscreen_menu.state; [defaults setBool:XQuartzFullscreenMenu forKey:XQuartzPrefKeyFullscreenMenu]; } else if (sender == self.option_sends_alt) { BOOL prev_opt_sends_alt = XQuartzOptionSendsAlt; XQuartzOptionSendsAlt = !!self.option_sends_alt.state; [defaults setBool:XQuartzOptionSendsAlt forKey:XQuartzPrefKeyOptionSendsAlt]; if (prev_opt_sends_alt != XQuartzOptionSendsAlt) QuartsResyncKeymap(TRUE); } else if (sender == self.click_through) { [defaults setBool:!!self.click_through.state forKey:XQuartzPrefKeyClickThrough]; } else if (sender == self.focus_follows_mouse) { [defaults setBool:!!self.focus_follows_mouse.state forKey:XQuartzPrefKeyFocusFollowsMouse]; } else if (sender == self.focus_on_new_window) { [defaults setBool:!!self.focus_on_new_window.state forKey:XQuartzPrefKeyFocusOnNewWindow]; } else if (sender == self.enable_auth) { [defaults setBool:!self.enable_auth.state forKey:XQuartzPrefKeyNoAuth]; } else if (sender == self.enable_tcp) { [defaults setBool:!self.enable_tcp.state forKey:XQuartzPrefKeyNoTCP]; } else if (sender == self.depth) { [defaults setInteger:self.depth.selectedTag forKey:XQuartzPrefKeyDepth]; } else if (sender == self.sync_pasteboard) { BOOL pbproxy_active = self.sync_pasteboard.intValue; [defaults setBool:pbproxy_active forKey:XQuartzPrefKeySyncPasteboard]; [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active]; [self.sync_pasteboard_to_primary setEnabled:pbproxy_active]; [self.sync_clipboard_to_pasteboard setEnabled:pbproxy_active]; [self.sync_primary_immediately setEnabled:pbproxy_active]; // setEnabled doesn't do this... [self.sync_text1 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; [self.sync_text2 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; } else if (sender == self.sync_pasteboard_to_clipboard) { [defaults setBool:!!self.sync_pasteboard_to_clipboard.state forKey:XQuartzPrefKeySyncPasteboardToClipboard]; } else if (sender == self.sync_pasteboard_to_primary) { [defaults setBool:!!self.sync_pasteboard_to_primary.state forKey:XQuartzPrefKeySyncPasteboardToPrimary]; } else if (sender == self.sync_clipboard_to_pasteboard) { [defaults setBool:!!self.sync_clipboard_to_pasteboard.state forKey:XQuartzPrefKeySyncClipboardToPasteBoard]; } else if (sender == self.sync_primary_immediately) { [defaults setBool:!!self.sync_primary_immediately.state forKey:XQuartzPrefKeySyncPrimaryOnSelect]; } else if (sender == self.scroll_in_device_direction) { XQuartzScrollInDeviceDirection = !!self.scroll_in_device_direction.state; [defaults setBool:XQuartzScrollInDeviceDirection forKey:XQuartzPrefKeyScrollInDeviceDirection]; } DarwinSendDDXEvent(kXquartzReloadPreferences, 0); } - (IBAction) prefs_show:sender { NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; BOOL pbproxy_active = [defaults boolForKey:XQuartzPrefKeySyncPasteboard]; [self.scroll_in_device_direction setIntValue:XQuartzScrollInDeviceDirection]; [self.fake_buttons setIntValue:darwinFakeButtons]; [self.enable_keyequivs setIntValue:XQuartzEnableKeyEquivalents]; [self.sync_keymap setIntValue:darwinSyncKeymap]; [self.option_sends_alt setIntValue:XQuartzOptionSendsAlt]; [self.click_through setIntValue:[defaults boolForKey:XQuartzPrefKeyClickThrough]]; [self.focus_follows_mouse setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusFollowsMouse]]; [self.focus_on_new_window setIntValue:[defaults boolForKey:XQuartzPrefKeyFocusOnNewWindow]]; [self.enable_auth setIntValue:![defaults boolForKey:XQuartzPrefKeyNoAuth]]; [self.enable_tcp setIntValue:![defaults boolForKey:XQuartzPrefKeyNoTCP]]; [self.depth selectItemAtIndex:[self.depth indexOfItemWithTag:[defaults integerForKey:XQuartzPrefKeyDepth]]]; [self.sync_pasteboard setIntValue:pbproxy_active]; [self.sync_pasteboard_to_clipboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToClipboard]]; [self.sync_pasteboard_to_primary setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPasteboardToPrimary]]; [self.sync_clipboard_to_pasteboard setIntValue:[defaults boolForKey:XQuartzPrefKeySyncClipboardToPasteBoard]]; [self.sync_primary_immediately setIntValue:[defaults boolForKey:XQuartzPrefKeySyncPrimaryOnSelect]]; [self.sync_pasteboard_to_clipboard setEnabled:pbproxy_active]; [self.sync_pasteboard_to_primary setEnabled:pbproxy_active]; [self.sync_clipboard_to_pasteboard setEnabled:pbproxy_active]; [self.sync_primary_immediately setEnabled:pbproxy_active]; // setEnabled doesn't do this... [self.sync_text1 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; [self.sync_text2 setTextColor:pbproxy_active ? NSColor.controlTextColor : NSColor.disabledControlTextColor]; [self.enable_fullscreen setIntValue:!XQuartzRootlessDefault]; [self.enable_fullscreen_menu setIntValue:XQuartzFullscreenMenu]; [self.enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault]; [self.enable_fullscreen_menu_text setTextColor:XQuartzRootlessDefault ? NSColor.disabledControlTextColor : NSColor.controlTextColor]; [self.prefs_panel makeKeyAndOrderFront:sender]; } - (IBAction) quit:sender { DarwinSendDDXEvent(kXquartzQuit, 0); } - (IBAction) x11_help:sender { AHLookupAnchor(CFSTR("com.apple.machelp"), CFSTR("mchlp2276")); } - (OSX_BOOL) validateMenuItem:(NSMenuItem *)item { NSMenu *menu = [item menu]; NSMenu * const dock_menu = self.dock_menu; if (item == self.toggle_fullscreen_item) return !XQuartzIsRootless; else if (menu == [X11App windowsMenu] || menu == dock_menu || (menu == [self.x11_about_item menu] && [item tag] == 42)) return (AppleWMSelectedEvents() & AppleWMControllerNotifyMask) != 0; else return TRUE; } - (void) applicationDidHide:(NSNotification *)notify { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMHideAll); /* Toggle off fullscreen mode to leave our non-default video * mode and hide our guard window. */ if (!XQuartzIsRootless && XQuartzFullscreenVisible) { DarwinSendDDXEvent(kXquartzToggleFullscreen, 0); } } - (void) applicationDidUnhide:(NSNotification *)notify { DarwinSendDDXEvent(kXquartzControllerNotify, 1, AppleWMShowAll); } - (NSApplicationTerminateReply) applicationShouldTerminate:sender { NSString *msg; NSString *title; NSUserDefaults * const defaults = NSUserDefaults.xquartzDefaults; if (self.can_quit || [defaults boolForKey:XQuartzPrefKeyNoQuitAlert]) { return NSTerminateNow; } /* Make sure we're frontmost. */ [NSApp activateIgnoringOtherApps:YES]; title = NSLocalizedString(@"Do you really want to quit X11?", @"Dialog title when quitting"); msg = NSLocalizedString( @"Any open X11 applications will stop immediately, and you will lose any unsaved changes.", @"Dialog when quitting"); /* FIXME: safe to run the alert in here? Or should we return Later * and then run the alert on a timer? It seems to work here, so.. */ NSInteger result = NSRunAlertPanel(title, @"%@", NSLocalizedString(@"Quit", @""), NSLocalizedString(@"Cancel", @""), nil, msg); return (result == NSAlertDefaultReturn) ? NSTerminateNow : NSTerminateCancel; } - (void) applicationWillTerminate:(NSNotification *)aNotification _X_NORETURN { /* shutdown the X server, it will exit () for us. */ DarwinSendDDXEvent(kXquartzQuit, 0); /* In case it doesn't, exit anyway after 5s. */ [NSThread sleepForTimeInterval:5.0]; exit(1); } - (void) server_ready { x_list *node; self.finished_launching = YES; for (node = self.pending_apps; node != NULL; node = node->next) { NSString *filename = node->data; [self launch_client:filename]; [filename release]; } x_list_free(self.pending_apps); self.pending_apps = NULL; } - (OSX_BOOL) application:(NSApplication *)app openFile:(NSString *)filename { const char *name = [filename UTF8String]; if (self.finished_launching) [self launch_client:filename]; else if (name[0] != ':') /* ignore display names */ self.pending_apps = x_list_prepend(self.pending_apps, [filename retain]); /* FIXME: report failures. */ return YES; } @end void X11ControllerMain(int argc, char **argv, char **envp) { X11ApplicationMain(argc, argv, envp); } xorg-server-21.1.16/hw/xquartz/applewm.c0000644000175000017500000004631214757411105013606 /* * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include "quartz.h" #include "misc.h" #include "dixstruct.h" #include "globals.h" #include "extnsionst.h" #include "colormapst.h" #include "cursorstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" #include "swaprep.h" #include "propertyst.h" #include #include "darwin.h" #define _APPLEWM_SERVER_ #include #include "applewmExt.h" #include "X11Application.h" #include "protocol-versions.h" #define DEFINE_ATOM_HELPER(func, atom_name) \ static Atom func(void) { \ static int generation; \ static Atom atom; \ if (generation != serverGeneration) { \ generation = serverGeneration; \ atom = MakeAtom(atom_name, strlen(atom_name), TRUE); \ } \ return atom; \ } DEFINE_ATOM_HELPER(xa_native_screen_origin, "_NATIVE_SCREEN_ORIGIN") DEFINE_ATOM_HELPER(xa_apple_no_order_in, "_APPLE_NO_ORDER_IN") static AppleWMProcsPtr appleWMProcs; static int WMErrorBase; static unsigned char WMReqCode = 0; static int WMEventBase = 0; static RESTYPE ClientType, EventType; /* resource types for event masks */ static XID eventResource; /* Currently selected events */ static unsigned int eventMask = 0; static int WMFreeClient(void *data, XID id); static int WMFreeEvents(void *data, XID id); static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to); typedef struct _WMEvent *WMEventPtr; typedef struct _WMEvent { WMEventPtr next; ClientPtr client; XID clientResource; unsigned int mask; } WMEventRec; static inline BoxRec make_box(int x, int y, int w, int h) { BoxRec r; r.x1 = x; r.y1 = y; r.x2 = x + w; r.y2 = y + h; return r; } /* Updates the _NATIVE_SCREEN_ORIGIN property on the given root window. */ void AppleWMSetScreenOrigin(WindowPtr pWin) { int32_t data[2]; data[0] = pWin->drawable.pScreen->x + darwinMainScreenX; data[1] = pWin->drawable.pScreen->y + darwinMainScreenY; dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); } /* Window managers can set the _APPLE_NO_ORDER_IN property on windows that are being genie-restored from the Dock. We want them to be mapped but remain ordered-out until the animation completes (when the Dock will order them in). */ Bool AppleWMDoReorderWindow(WindowPtr pWin) { Atom atom; PropertyPtr prop; int rc; atom = xa_apple_no_order_in(); rc = dixLookupProperty(&prop, pWin, atom, serverClient, DixReadAccess); if (Success == rc && prop->type == atom) return 0; return 1; } static int ProcAppleWMQueryVersion(register ClientPtr client) { xAppleWMQueryVersionReply rep; REQUEST_SIZE_MATCH(xAppleWMQueryVersionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.majorVersion = SERVER_APPLEWM_MAJOR_VERSION; rep.minorVersion = SERVER_APPLEWM_MINOR_VERSION; rep.patchVersion = SERVER_APPLEWM_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xAppleWMQueryVersionReply),&rep); return Success; } /* events */ static inline void updateEventMask(WMEventPtr *pHead) { WMEventPtr pCur; eventMask = 0; for (pCur = *pHead; pCur != NULL; pCur = pCur->next) eventMask |= pCur->mask; } /*ARGSUSED*/ static int WMFreeClient(void *data, XID id) { WMEventPtr pEvent; WMEventPtr *pHead, pCur, pPrev; int i; pEvent = (WMEventPtr)data; i = dixLookupResourceByType( (void **)&pHead, eventResource, EventType, serverClient, DixReadAccess | DixWriteAccess | DixDestroyAccess); if (i == Success && pHead) { pPrev = 0; for (pCur = *pHead; pCur && pCur != pEvent; pCur = pCur->next) pPrev = pCur; if (pCur) { if (pPrev) pPrev->next = pEvent->next; else *pHead = pEvent->next; } updateEventMask(pHead); } free((void *)pEvent); return 1; } /*ARGSUSED*/ static int WMFreeEvents(void *data, XID id) { WMEventPtr *pHead, pCur, pNext; pHead = (WMEventPtr *)data; for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource(pCur->clientResource, ClientType); free((void *)pCur); } free((void *)pHead); eventMask = 0; return 1; } static int ProcAppleWMSelectInput(register ClientPtr client) { REQUEST(xAppleWMSelectInputReq); WMEventPtr pEvent, pNewEvent, *pHead; XID clientResource; int i; REQUEST_SIZE_MATCH(xAppleWMSelectInputReq); i = dixLookupResourceByType((void **)&pHead, eventResource, EventType, client, DixWriteAccess); if (stuff->mask != 0) { if (i == Success && pHead) { /* check for existing entry. */ for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { if (pEvent->client == client) { pEvent->mask = stuff->mask; updateEventMask(pHead); return Success; } } } /* build the entry */ pNewEvent = (WMEventPtr)malloc(sizeof(WMEventRec)); if (!pNewEvent) return BadAlloc; pNewEvent->next = 0; pNewEvent->client = client; pNewEvent->mask = stuff->mask; /* * add a resource that will be deleted when * the client goes away */ clientResource = FakeClientID(client->index); pNewEvent->clientResource = clientResource; if (!AddResource(clientResource, ClientType, (void *)pNewEvent)) return BadAlloc; /* * create a resource to contain a pointer to the list * of clients selecting input. This must be indirect as * the list may be arbitrarily rearranged which cannot be * done through the resource database. */ if (i != Success || !pHead) { pHead = (WMEventPtr *)malloc(sizeof(WMEventPtr)); if (!pHead || !AddResource(eventResource, EventType, (void *)pHead)) { FreeResource(clientResource, RT_NONE); return BadAlloc; } *pHead = 0; } pNewEvent->next = *pHead; *pHead = pNewEvent; updateEventMask(pHead); } else if (stuff->mask == 0) { /* delete the interest */ if (i == Success && pHead) { pNewEvent = 0; for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { if (pEvent->client == client) break; pNewEvent = pEvent; } if (pEvent) { FreeResource(pEvent->clientResource, ClientType); if (pNewEvent) pNewEvent->next = pEvent->next; else *pHead = pEvent->next; free(pEvent); updateEventMask(pHead); } } } else { client->errorValue = stuff->mask; return BadValue; } return Success; } /* * deliver the event */ void AppleWMSendEvent(int type, unsigned int mask, int which, int arg) { WMEventPtr *pHead, pEvent; xAppleWMNotifyEvent se; int i; i = dixLookupResourceByType((void **)&pHead, eventResource, EventType, serverClient, DixReadAccess); if (i != Success || !pHead) return; for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { if ((pEvent->mask & mask) == 0) continue; se.type = type + WMEventBase; se.kind = which; se.arg = arg; se.time = currentTime.milliseconds; WriteEventsToClient(pEvent->client, 1, (xEvent *)&se); } } /* Safe to call from any thread. */ unsigned int AppleWMSelectedEvents(void) { return eventMask; } /* general utility functions */ static int ProcAppleWMDisableUpdate(register ClientPtr client) { REQUEST_SIZE_MATCH(xAppleWMDisableUpdateReq); appleWMProcs->DisableUpdate(); return Success; } static int ProcAppleWMReenableUpdate(register ClientPtr client) { REQUEST_SIZE_MATCH(xAppleWMReenableUpdateReq); appleWMProcs->EnableUpdate(); return Success; } /* window functions */ static int ProcAppleWMSetWindowMenu(register ClientPtr client) { const char *bytes, **items; char *shortcuts; int max_len, nitems, i, j; REQUEST(xAppleWMSetWindowMenuReq); REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); nitems = stuff->nitems; items = malloc(sizeof(char *) * nitems); shortcuts = malloc(sizeof(char) * nitems); if (!items || !shortcuts) { free(items); free(shortcuts); return BadAlloc; } max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); bytes = (char *)&stuff[1]; for (i = j = 0; i < max_len && j < nitems;) { shortcuts[j] = bytes[i++]; items[j++] = bytes + i; while (i < max_len) { if (bytes[i++] == 0) break; } } /* Check if we bailed out of the above loop due to a request that was too long */ if (j < nitems) { free(items); free(shortcuts); return BadRequest; } X11ApplicationSetWindowMenu(nitems, items, shortcuts); free(items); free(shortcuts); return Success; } static int ProcAppleWMSetWindowMenuCheck(register ClientPtr client) { REQUEST(xAppleWMSetWindowMenuCheckReq); REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); X11ApplicationSetWindowMenuCheck(stuff->index); return Success; } static int ProcAppleWMSetFrontProcess(register ClientPtr client) { REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); X11ApplicationSetFrontProcess(); return Success; } static int ProcAppleWMSetWindowLevel(register ClientPtr client) { REQUEST(xAppleWMSetWindowLevelReq); WindowPtr pWin; int err; REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); if (Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess)) return BadValue; if (stuff->level >= AppleWMNumWindowLevels) { return BadValue; } err = appleWMProcs->SetWindowLevel(pWin, stuff->level); if (err != Success) { return err; } return Success; } static int ProcAppleWMSendPSN(register ClientPtr client) { REQUEST(xAppleWMSendPSNReq); int err; REQUEST_SIZE_MATCH(xAppleWMSendPSNReq); if (!appleWMProcs->SendPSN) return BadRequest; err = appleWMProcs->SendPSN(stuff->psn_hi, stuff->psn_lo); if (err != Success) { return err; } return Success; } static int ProcAppleWMAttachTransient(register ClientPtr client) { WindowPtr pWinChild, pWinParent; REQUEST(xAppleWMAttachTransientReq); int err; REQUEST_SIZE_MATCH(xAppleWMAttachTransientReq); if (!appleWMProcs->AttachTransient) return BadRequest; if (Success != dixLookupWindow(&pWinChild, stuff->child, client, DixReadAccess)) return BadValue; if (stuff->parent) { if (Success != dixLookupWindow(&pWinParent, stuff->parent, client, DixReadAccess)) return BadValue; } else { pWinParent = NULL; } err = appleWMProcs->AttachTransient(pWinChild, pWinParent); if (err != Success) { return err; } return Success; } static int ProcAppleWMSetCanQuit(register ClientPtr client) { REQUEST(xAppleWMSetCanQuitReq); REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); X11ApplicationSetCanQuit(stuff->state); return Success; } /* frame functions */ static int ProcAppleWMFrameGetRect(register ClientPtr client) { xAppleWMFrameGetRectReply rep; BoxRec ir, or, rr; REQUEST(xAppleWMFrameGetRectReq); REQUEST_SIZE_MATCH(xAppleWMFrameGetRectReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; ir = make_box(stuff->ix, stuff->iy, stuff->iw, stuff->ih); or = make_box(stuff->ox, stuff->oy, stuff->ow, stuff->oh); if (appleWMProcs->FrameGetRect(stuff->frame_rect, stuff->frame_class, &or, &ir, &rr) != Success) { return BadValue; } rep.x = rr.x1; rep.y = rr.y1; rep.w = rr.x2 - rr.x1; rep.h = rr.y2 - rr.y1; WriteToClient(client, sizeof(xAppleWMFrameGetRectReply),&rep); return Success; } static int ProcAppleWMFrameHitTest(register ClientPtr client) { xAppleWMFrameHitTestReply rep; BoxRec ir, or; int ret; REQUEST(xAppleWMFrameHitTestReq); REQUEST_SIZE_MATCH(xAppleWMFrameHitTestReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; ir = make_box(stuff->ix, stuff->iy, stuff->iw, stuff->ih); or = make_box(stuff->ox, stuff->oy, stuff->ow, stuff->oh); if (appleWMProcs->FrameHitTest(stuff->frame_class, stuff->px, stuff->py, &or, &ir, &ret) != Success) { return BadValue; } rep.ret = ret; WriteToClient(client, sizeof(xAppleWMFrameHitTestReply),&rep); return Success; } static int ProcAppleWMFrameDraw(register ClientPtr client) { BoxRec ir, or; unsigned int title_length, title_max; unsigned char *title_bytes; REQUEST(xAppleWMFrameDrawReq); WindowPtr pWin; REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq); if (Success != dixLookupWindow(&pWin, stuff->window, client, DixReadAccess)) return BadValue; ir = make_box(stuff->ix, stuff->iy, stuff->iw, stuff->ih); or = make_box(stuff->ox, stuff->oy, stuff->ow, stuff->oh); title_length = stuff->title_length; title_max = (stuff->length << 2) - sizeof(xAppleWMFrameDrawReq); if (title_max < title_length) return BadValue; title_bytes = (unsigned char *)&stuff[1]; errno = appleWMProcs->FrameDraw(pWin, stuff->frame_class, stuff->frame_attr, &or, &ir, title_length, title_bytes); if (errno != Success) { return errno; } return Success; } /* dispatch */ static int ProcAppleWMDispatch(register ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_AppleWMQueryVersion: return ProcAppleWMQueryVersion(client); } if (!client->local) return WMErrorBase + AppleWMClientNotLocal; switch (stuff->data) { case X_AppleWMSelectInput: return ProcAppleWMSelectInput(client); case X_AppleWMDisableUpdate: return ProcAppleWMDisableUpdate(client); case X_AppleWMReenableUpdate: return ProcAppleWMReenableUpdate(client); case X_AppleWMSetWindowMenu: return ProcAppleWMSetWindowMenu(client); case X_AppleWMSetWindowMenuCheck: return ProcAppleWMSetWindowMenuCheck(client); case X_AppleWMSetFrontProcess: return ProcAppleWMSetFrontProcess(client); case X_AppleWMSetWindowLevel: return ProcAppleWMSetWindowLevel(client); case X_AppleWMSetCanQuit: return ProcAppleWMSetCanQuit(client); case X_AppleWMFrameGetRect: return ProcAppleWMFrameGetRect(client); case X_AppleWMFrameHitTest: return ProcAppleWMFrameHitTest(client); case X_AppleWMFrameDraw: return ProcAppleWMFrameDraw(client); case X_AppleWMSendPSN: return ProcAppleWMSendPSN(client); case X_AppleWMAttachTransient: return ProcAppleWMAttachTransient(client); default: return BadRequest; } } static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to) { to->type = from->type; to->kind = from->kind; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->time, to->time); cpswapl(from->arg, to->arg); } static int SProcAppleWMQueryVersion(register ClientPtr client) { REQUEST(xAppleWMQueryVersionReq); swaps(&stuff->length); return ProcAppleWMQueryVersion(client); } static int SProcAppleWMDispatch(register ClientPtr client) { REQUEST(xReq); /* It is bound to be non-local when there is byte swapping */ if (!client->local) return WMErrorBase + AppleWMClientNotLocal; /* only local clients are allowed WM access */ switch (stuff->data) { case X_AppleWMQueryVersion: return SProcAppleWMQueryVersion(client); default: return BadRequest; } } void AppleWMExtensionInit(AppleWMProcsPtr procsPtr) { ExtensionEntry* extEntry; ClientType = CreateNewResourceType(WMFreeClient, "WMClient"); EventType = CreateNewResourceType(WMFreeEvents, "WMEvent"); eventResource = FakeClientID(0); if (ClientType && EventType && (extEntry = AddExtension(APPLEWMNAME, AppleWMNumberEvents, AppleWMNumberErrors, ProcAppleWMDispatch, SProcAppleWMDispatch, NULL, StandardMinorOpcode))) { size_t i; WMReqCode = (unsigned char)extEntry->base; WMErrorBase = extEntry->errorBase; WMEventBase = extEntry->eventBase; for (i = 0; i < AppleWMNumberEvents; i++) EventSwapVector[WMEventBase + i] = (EventSwapPtr)SNotifyEvent; appleWMProcs = procsPtr; } } xorg-server-21.1.16/hw/xquartz/darwin.c0000644000175000017500000006262114757411105013426 /************************************************************** * * Xquartz initialization code * * Copyright (c) 2007-2012 Apple Inc. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "os.h" #include "servermd.h" #include "inputstr.h" #include "scrnintstr.h" #include "mipointer.h" // mi software cursor #include "micmap.h" // mi colormap code #include "fb.h" // fb framebuffer code #include "globals.h" #include "dix.h" #include "xkbsrv.h" #include #include #include "exevents.h" #include "extinit.h" #include "glx_extinit.h" #include "xserver-properties.h" #include #include #include #include #include #include #include #include #define HAS_UTSNAME 1 #include #define NO_CFPLUGIN #include #ifdef MITSHM #include "shmint.h" #endif #include "darwin.h" #include "darwinEvents.h" #include "quartzKeyboard.h" #include "quartz.h" #include "X11Application.h" aslclient aslc; void xq_asl_log(int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...) { va_list args; aslmsg msg = asl_new(ASL_TYPE_MSG); if (msg) { char *_line; asl_set(msg, "File", file); asl_set(msg, "Function", function); asprintf(&_line, "%d", line); if (_line) { asl_set(msg, "Line", _line); free(_line); } if (subsystem) asl_set(msg, "Subsystem", subsystem); } va_start(args, fmt); asl_vlog(aslc, msg, level, fmt, args); va_end(args); if (msg) asl_free(msg); } /* * X server shared global variables */ int darwinScreensFound = 0; DevPrivateKeyRec darwinScreenKeyRec; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; // int darwinMouseAccelChange = 1; int darwinFakeButtons = 0; // location of X11's (0,0) point in global screen coordinates int darwinMainScreenX = 0; int darwinMainScreenY = 0; // parameters read from the command line or user preferences int darwinDesiredDepth = -1; int darwinSyncKeymap = FALSE; // modifier masks for faking mouse buttons - ANY of these bits trigger it (not all) #ifdef NX_DEVICELCMDKEYMASK int darwinFakeMouse2Mask = NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK; int darwinFakeMouse3Mask = NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK; #else int darwinFakeMouse2Mask = NX_ALTERNATEMASK; int darwinFakeMouse3Mask = NX_COMMANDMASK; #endif // Modifier mask for overriding event delivery to appkit (might be useful to set this to rcommand for input menu unsigned int darwinAppKitModMask = 0; // Any of these bits // Modifier mask for items in the Window menu (0 and -1 cause shortcuts to be disabled) unsigned int windowItemModMask = NX_COMMANDMASK; // devices DeviceIntPtr darwinKeyboard = NULL; DeviceIntPtr darwinPointer = NULL; DeviceIntPtr darwinTabletStylus = NULL; DeviceIntPtr darwinTabletCursor = NULL; DeviceIntPtr darwinTabletEraser = NULL; // Common pixmap formats static PixmapFormatRec formats[] = { { 1, 1, BITMAP_SCANLINE_PAD }, { 4, 8, BITMAP_SCANLINE_PAD }, { 8, 8, BITMAP_SCANLINE_PAD }, { 15, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, { 24, 32, BITMAP_SCANLINE_PAD }, { 32, 32, BITMAP_SCANLINE_PAD } }; void DarwinPrintBanner(void) { ErrorF("Xquartz starting:\n"); ErrorF("X.Org X Server %s\n", XSERVER_VERSION); } /* * DarwinScreenInit * This is a callback from dix during AddScreen() from InitOutput(). * Initialize the screen and communicate information about it back to dix. */ static Bool DarwinScreenInit(ScreenPtr pScreen, int argc, char **argv) { int dpi; static int foundIndex = 0; Bool ret; DarwinFramebufferPtr dfb; if (!dixRegisterPrivateKey(&darwinScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; // reset index of found screens for each server generation if (pScreen->myNum == 0) { foundIndex = 0; // reset the visual list miClearVisualTypes(); } // allocate space for private per screen storage dfb = malloc(sizeof(DarwinFramebufferRec)); // SCREEN_PRIV(pScreen) = dfb; dixSetPrivate(&pScreen->devPrivates, darwinScreenKey, dfb); // setup hardware/mode specific details ret = QuartzAddScreen(foundIndex, pScreen); foundIndex++; if (!ret) return FALSE; // setup a single visual appropriate for our pixel type if (!miSetVisualTypesAndMasks(dfb->depth, dfb->visuals, dfb->bitsPerRGB, dfb->preferredCVC, dfb->redMask, dfb->greenMask, dfb->blueMask)) { return FALSE; } // TODO: Make PseudoColor visuals not suck in TrueColor mode // if(dfb->depth > 8) // miSetVisualTypesAndMasks(8, PseudoColorMask, 8, PseudoColor, 0, 0, 0); // // TODO: Re-add support for 15bit // if (dfb->depth > 15) // miSetVisualTypesAndMasks(15, TrueColorMask, 5, TrueColor, // RM_ARGB(0, 5, 5, 5), GM_ARGB(0, 5, 5, // 5), // BM_ARGB(0, 5, 5, 5)); if (dfb->depth > 24) miSetVisualTypesAndMasks(24, TrueColorMask, 8, TrueColor, RM_ARGB(0, 8, 8, 8), GM_ARGB(0, 8, 8, 8), BM_ARGB(0, 8, 8, 8)); miSetPixmapDepths(); // machine independent screen init // setup _Screen structure in pScreen if (monitorResolution) dpi = monitorResolution; else dpi = 96; // initialize fb if (!fbScreenInit(pScreen, dfb->framebuffer, // pointer to screen bitmap dfb->width, dfb->height, // screen size in pixels dpi, dpi, // dots per inch dfb->pitch / (dfb->bitsPerPixel / 8), // pixel width of framebuffer dfb->bitsPerPixel)) { // bits per pixel for screen return FALSE; } if (!fbPictureInit(pScreen, 0, 0)) { return FALSE; } #ifdef MITSHM ShmRegisterFbFuncs(pScreen); #endif // finish mode dependent screen setup including cursor support if (!QuartzSetupScreen(pScreen->myNum, pScreen)) { return FALSE; } // create and install the default colormap and // set pScreen->blackPixel / pScreen->white if (!miCreateDefColormap(pScreen)) { return FALSE; } pScreen->x = dfb->x; pScreen->y = dfb->y; /* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", index, dfb->width, dfb->height, dfb->x, dfb->y); */ return TRUE; } /* ============================================================================= mouse and keyboard callbacks ============================================================================= */ static void DarwinInputHandlerNotify(int fd __unused, int ready __unused, void *data __unused) { } /* * DarwinMouseProc: Handle the initialization, etc. of a mouse */ static int DarwinMouseProc(DeviceIntPtr pPointer, int what) { #define NBUTTONS 3 #define NAXES 6 // 3 buttons: left, middle, right CARD8 map[NBUTTONS + 1] = { 0, 1, 2, 3}; Atom btn_labels[NBUTTONS] = { 0 }; Atom axes_labels[NAXES] = { 0 }; switch (what) { case DEVICE_INIT: pPointer->public.on = FALSE; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); axes_labels[4] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_WHEEL); axes_labels[5] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HWHEEL); // Set button map. InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), NAXES, axes_labels); InitValuatorAxisStruct(pPointer, 0, axes_labels[0], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Absolute); InitValuatorAxisStruct(pPointer, 1, axes_labels[1], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Absolute); InitValuatorAxisStruct(pPointer, 2, axes_labels[2], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative); InitValuatorAxisStruct(pPointer, 3, axes_labels[3], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative); InitValuatorAxisStruct(pPointer, 4, axes_labels[4], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative); InitValuatorAxisStruct(pPointer, 5, axes_labels[5], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 1, 0, 1, Relative); SetScrollValuator(pPointer, 4, SCROLL_TYPE_VERTICAL, -1.0, SCROLL_FLAG_PREFERRED); SetScrollValuator(pPointer, 5, SCROLL_TYPE_HORIZONTAL, -1.0, SCROLL_FLAG_NONE); break; case DEVICE_ON: pPointer->public.on = TRUE; SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); return Success; case DEVICE_CLOSE: case DEVICE_OFF: pPointer->public.on = FALSE; RemoveNotifyFd(darwinEventReadFD); return Success; } return Success; #undef NBUTTONS #undef NAXES } static int DarwinTabletProc(DeviceIntPtr pPointer, int what) { #define NBUTTONS 3 #define NAXES 5 CARD8 map[NBUTTONS + 1] = { 0, 1, 2, 3 }; Atom btn_labels[NBUTTONS] = { 0 }; Atom axes_labels[NAXES] = { 0 }; switch (what) { case DEVICE_INIT: pPointer->public.on = FALSE; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); axes_labels[2] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_PRESSURE); axes_labels[3] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_X); axes_labels[4] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_TILT_Y); // Set button map. InitPointerDeviceStruct((DevicePtr)pPointer, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), NAXES, axes_labels); InitProximityClassDeviceStruct(pPointer); InitValuatorAxisStruct(pPointer, 0, axes_labels[0], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute); InitValuatorAxisStruct(pPointer, 1, axes_labels[1], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute); InitValuatorAxisStruct(pPointer, 2, axes_labels[2], 0, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute); InitValuatorAxisStruct(pPointer, 3, axes_labels[3], -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute); InitValuatorAxisStruct(pPointer, 4, axes_labels[4], -XQUARTZ_VALUATOR_LIMIT, XQUARTZ_VALUATOR_LIMIT, 1, 0, 1, Absolute); // pPointer->use = IsXExtensionDevice; break; case DEVICE_ON: pPointer->public.on = TRUE; SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); return Success; case DEVICE_CLOSE: case DEVICE_OFF: pPointer->public.on = FALSE; RemoveNotifyFd(darwinEventReadFD); return Success; } return Success; #undef NBUTTONS #undef NAXES } /* * DarwinKeybdProc * Callback from X */ static int DarwinKeybdProc(DeviceIntPtr pDev, int onoff) { switch (onoff) { case DEVICE_INIT: DarwinKeyboardInit(pDev); break; case DEVICE_ON: pDev->public.on = TRUE; SetNotifyFd(darwinEventReadFD, DarwinInputHandlerNotify, X_NOTIFY_READ, NULL); break; case DEVICE_OFF: pDev->public.on = FALSE; RemoveNotifyFd(darwinEventReadFD); break; case DEVICE_CLOSE: break; } return Success; } /* =========================================================================== Utility routines =========================================================================== */ /* * DarwinParseModifierList * Parse a list of modifier names and return a corresponding modifier mask */ int DarwinParseModifierList(const char *constmodifiers, int separatelr) { int result = 0; if (constmodifiers) { char *modifiers = strdup(constmodifiers); char *modifier; int nxkey; char *p = modifiers; while (p) { modifier = strsep(&p, " ,+&|/"); // allow lots of separators nxkey = DarwinModifierStringToNXMask(modifier, separatelr); if (nxkey) result |= nxkey; else ErrorF("fakebuttons: Unknown modifier \"%s\"\n", modifier); } free(modifiers); } return result; } /* =========================================================================== Functions needed to link against device independent X =========================================================================== */ /* * InitInput * Register the keyboard and mouse devices */ void InitInput(int argc, char **argv) { XkbRMLVOSet rmlvo = { .rules = "base", .model = "empty", .layout = "empty", .variant = NULL, .options = NULL }; /* We need to really have rules... or something... */ XkbSetRulesDflts(&rmlvo); assert(Success == AllocDevicePair(serverClient, "xquartz virtual", &darwinPointer, &darwinKeyboard, DarwinMouseProc, DarwinKeybdProc, FALSE)); /* here's the snippet from the current gdk sources: if (!strcmp (tmp_name, "pointer")) gdkdev->info.source = GDK_SOURCE_MOUSE; else if (!strcmp (tmp_name, "wacom") || !strcmp (tmp_name, "pen")) gdkdev->info.source = GDK_SOURCE_PEN; else if (!strcmp (tmp_name, "eraser")) gdkdev->info.source = GDK_SOURCE_ERASER; else if (!strcmp (tmp_name, "cursor")) gdkdev->info.source = GDK_SOURCE_CURSOR; else gdkdev->info.source = GDK_SOURCE_PEN; */ darwinTabletStylus = AddInputDevice(serverClient, DarwinTabletProc, TRUE); assert(darwinTabletStylus); darwinTabletStylus->name = strdup("pen"); darwinTabletCursor = AddInputDevice(serverClient, DarwinTabletProc, TRUE); assert(darwinTabletCursor); darwinTabletCursor->name = strdup("cursor"); darwinTabletEraser = AddInputDevice(serverClient, DarwinTabletProc, TRUE); assert(darwinTabletEraser); darwinTabletEraser->name = strdup("eraser"); DarwinEQInit(); QuartzInitInput(argc, argv); } void CloseInput(void) { DarwinEQFini(); } /* * DarwinAdjustScreenOrigins * Shift all screens so the X11 (0, 0) coordinate is at the top * left of the global screen coordinates. * * Screens can be arranged so the top left isn't on any screen, so * instead use the top left of the leftmost screen as (0,0). This * may mean some screen space is in -y, but it's better that (0,0) * be onscreen, or else default xterms disappear. It's better that * -y be used than -x, because when popup menus are forced * "onscreen" by dumb window managers like twm, they'll shift the * menus down instead of left, which still looks funny but is an * easier target to hit. */ void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) { int i, left, top; left = pScreenInfo->screens[0]->x; top = pScreenInfo->screens[0]->y; /* Find leftmost screen. If there's a tie, take the topmost of the two. */ for (i = 1; i < pScreenInfo->numScreens; i++) { if (pScreenInfo->screens[i]->x < left || (pScreenInfo->screens[i]->x == left && pScreenInfo->screens[i]->y < top)) { left = pScreenInfo->screens[i]->x; top = pScreenInfo->screens[i]->y; } } darwinMainScreenX = left; darwinMainScreenY = top; DEBUG_LOG("top = %d, left=%d\n", top, left); /* Shift all screens so that there is a screen whose top left * is at X11 (0,0) and at global screen coordinate * (darwinMainScreenX, darwinMainScreenY). */ if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { for (i = 0; i < pScreenInfo->numScreens; i++) { pScreenInfo->screens[i]->x -= darwinMainScreenX; pScreenInfo->screens[i]->y -= darwinMainScreenY; DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n", i, pScreenInfo->screens[i]->x, pScreenInfo->screens[i]->y); } } /* Update screenInfo.x/y */ update_desktop_dimensions(); } /* * InitOutput * Initialize screenInfo for all actually accessible framebuffers. * * The display mode dependent code gets called three times. The mode * specific InitOutput routines are expected to discover the number * of potentially useful screens and cache routes to them internally. * Inside DarwinScreenInit are two other mode specific calls. * A mode specific AddScreen routine is called for each screen to * actually initialize the screen with the ScreenPtr structure. * After other screen setup has been done, a mode specific * SetupScreen function can be called to finalize screen setup. */ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) { int i; pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; // List how we want common pixmap formats to be padded pScreenInfo->numPixmapFormats = ARRAY_SIZE(formats); for (i = 0; i < ARRAY_SIZE(formats); i++) pScreenInfo->formats[i] = formats[i]; // Discover screens and do mode specific initialization QuartzInitOutput(argc, argv); // Add screens for (i = 0; i < darwinScreensFound; i++) { AddScreen(DarwinScreenInit, argc, argv); } xorgGlxCreateVendor(); DarwinAdjustScreenOrigins(pScreenInfo); } /* * OsVendorFatalError */ void OsVendorFatalError(const char *f, va_list args) { } /* * OsVendorInit * Initialization of Darwin OS support. */ void OsVendorInit(void) { if (serverGeneration == 1) { char *lf; char *home = getenv("HOME"); assert(home); assert(0 < asprintf(&lf, "%s/Library/Logs/X11", home)); /* Ignore errors. If EEXIST, we don't care. If anything else, * LogInit will handle it for us. */ (void)mkdir(lf, S_IRWXU | S_IRWXG | S_IRWXO); free(lf); assert(0 < asprintf(&lf, "%s/Library/Logs/X11/%s.log", home, bundle_id_prefix)); LogInit(lf, ".old"); free(lf); DarwinPrintBanner(); } } /* * ddxProcessArgument * Process device-dependent command line args. Returns 0 if argument is * not device dependent, otherwise Count of number of elements of argv * that are part of a device dependent commandline option. */ int ddxProcessArgument(int argc, char *argv[], int i) { // if ( !strcmp( argv[i], "-fullscreen" ) ) { // ErrorF( "Running full screen in parallel with Mac OS X Quartz window server.\n" ); // return 1; // } // if ( !strcmp( argv[i], "-rootless" ) ) { // ErrorF( "Running rootless inside Mac OS X window server.\n" ); // return 1; // } // This command line arg is passed when launched from the Aqua GUI. if (!strncmp(argv[i], "-psn_", 5)) { return 1; } if (!strcmp(argv[i], "-fakebuttons")) { darwinFakeButtons = TRUE; ErrorF("Faking a three button mouse\n"); return 1; } if (!strcmp(argv[i], "-nofakebuttons")) { darwinFakeButtons = FALSE; ErrorF("Not faking a three button mouse\n"); return 1; } if (!strcmp(argv[i], "-fakemouse2")) { if (i == argc - 1) { FatalError("-fakemouse2 must be followed by a modifier list\n"); } if (!strcasecmp(argv[i + 1], "none") || !strcmp(argv[i + 1], "")) darwinFakeMouse2Mask = 0; else darwinFakeMouse2Mask = DarwinParseModifierList(argv[i + 1], 1); ErrorF("Modifier mask to fake mouse button 2 = 0x%x\n", darwinFakeMouse2Mask); return 2; } if (!strcmp(argv[i], "-fakemouse3")) { if (i == argc - 1) { FatalError("-fakemouse3 must be followed by a modifier list\n"); } if (!strcasecmp(argv[i + 1], "none") || !strcmp(argv[i + 1], "")) darwinFakeMouse3Mask = 0; else darwinFakeMouse3Mask = DarwinParseModifierList(argv[i + 1], 1); ErrorF("Modifier mask to fake mouse button 3 = 0x%x\n", darwinFakeMouse3Mask); return 2; } if (!strcmp(argv[i], "+synckeymap")) { darwinSyncKeymap = TRUE; return 1; } if (!strcmp(argv[i], "-synckeymap")) { darwinSyncKeymap = FALSE; return 1; } if (!strcmp(argv[i], "-depth")) { if (i == argc - 1) { FatalError("-depth must be followed by a number\n"); } darwinDesiredDepth = atoi(argv[i + 1]); if (darwinDesiredDepth != -1 && darwinDesiredDepth != 8 && darwinDesiredDepth != 15 && darwinDesiredDepth != 24) { FatalError("Unsupported pixel depth. Use 8, 15, or 24 bits\n"); } ErrorF("Attempting to use pixel depth of %i\n", darwinDesiredDepth); return 2; } if (!strcmp(argv[i], "-showconfig") || !strcmp(argv[i], "-version")) { DarwinPrintBanner(); exit(0); } return 0; } /* * ddxUseMsg -- * Print out correct use of device dependent commandline options. * Maybe the user now knows what really to do ... */ void ddxUseMsg(void) { ErrorF("\n"); ErrorF("\n"); ErrorF("Device Dependent Usage:\n"); ErrorF("\n"); ErrorF("-depth <8,15,24> : use this bit depth.\n"); ErrorF( "-fakebuttons : fake a three button mouse with Command and Option keys.\n"); ErrorF("-nofakebuttons : don't fake a three button mouse.\n"); ErrorF( "-fakemouse2 : fake middle mouse button with modifier keys.\n"); ErrorF( "-fakemouse3 : fake right mouse button with modifier keys.\n"); ErrorF( " ex: -fakemouse2 \"option,shift\" = option-shift-click is middle button.\n"); ErrorF("-version : show the server version.\n"); ErrorF("\n"); } /* * ddxGiveUp -- * Device dependent cleanup. Called by dix before normal server death. */ void ddxGiveUp(enum ExitCode error) { LogClose(error); } #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { } #endif xorg-server-21.1.16/hw/xquartz/darwinEvents.c0000644000175000017500000004462014757411105014612 /* * Darwin event queue and event handling * * Copyright 2007-2008 Apple Inc. * Copyright 2004 Kaleb S. KEITHLEY. All Rights Reserved. * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. * * This file is based on mieq.c by Keith Packard, * which contains the following copyright: * Copyright 1990, 1998 The Open Group * * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" #include "inputstr.h" #include "inpututils.h" #include "eventstr.h" #include "mi.h" #include "scrnintstr.h" #include "mipointer.h" #include "os.h" #include "exglobals.h" #include "darwin.h" #include "quartz.h" #include "quartzKeyboard.h" #include "quartzRandR.h" #include "darwinEvents.h" #include #include #include #include #include #include #include #include #include "applewmExt.h" /* FIXME: Abstract this better */ extern Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev); int darwin_all_modifier_flags = 0; // last known modifier state int darwin_all_modifier_mask = 0; int darwin_x11_modifier_mask = 0; #define FD_ADD_MAX 128 static int fd_add[FD_ADD_MAX]; int fd_add_count = 0; static pthread_mutex_t fd_add_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t fd_add_ready_cond = PTHREAD_COND_INITIALIZER; static pthread_t fd_add_tid = NULL; static BOOL mieqInitialized; static pthread_mutex_t mieqInitializedMutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t mieqInitializedCond = PTHREAD_COND_INITIALIZER; _X_NOTSAN extern inline void wait_for_mieq_init(void) { if (!mieqInitialized) { pthread_mutex_lock(&mieqInitializedMutex); while (!mieqInitialized) { pthread_cond_wait(&mieqInitializedCond, &mieqInitializedMutex); } pthread_mutex_unlock(&mieqInitializedMutex); } } _X_NOTSAN static inline void signal_mieq_init(void) { pthread_mutex_lock(&mieqInitializedMutex); mieqInitialized = TRUE; pthread_cond_broadcast(&mieqInitializedCond); pthread_mutex_unlock(&mieqInitializedMutex); } /*** Pthread Magics ***/ static pthread_t create_thread(void *(*func)(void *), void *arg) { pthread_attr_t attr; pthread_t tid; pthread_attr_init(&attr); pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&tid, &attr, func, arg); pthread_attr_destroy(&attr); return tid; } /* * DarwinPressModifierKey * Press or release the given modifier key (one of NX_MODIFIERKEY_* constants) */ static void DarwinPressModifierKey(int pressed, int key) { int keycode = DarwinModifierNXKeyToNXKeycode(key, 0); if (keycode == 0) { ErrorF("DarwinPressModifierKey bad keycode: key=%d\n", key); return; } DarwinSendKeyboardEvents(pressed, keycode); } /* * DarwinUpdateModifiers * Send events to update the modifier state. */ static int darwin_x11_modifier_mask_list[] = { #ifdef NX_DEVICELCMDKEYMASK NX_DEVICELCTLKEYMASK, NX_DEVICERCTLKEYMASK, NX_DEVICELSHIFTKEYMASK, NX_DEVICERSHIFTKEYMASK, NX_DEVICELCMDKEYMASK, NX_DEVICERCMDKEYMASK, NX_DEVICELALTKEYMASK, NX_DEVICERALTKEYMASK, #else NX_CONTROLMASK, NX_SHIFTMASK, NX_COMMANDMASK, NX_ALTERNATEMASK, #endif NX_ALPHASHIFTMASK, 0 }; static int darwin_all_modifier_mask_additions[] = { NX_SECONDARYFNMASK, 0 }; static void DarwinUpdateModifiers(int pressed, // KeyPress or KeyRelease int flags) // modifier flags that have changed { int *f; int key; /* Capslock is special. This mask is the state of capslock (on/off), * not the state of the button. Hopefully we can find a better solution. */ if (NX_ALPHASHIFTMASK & flags) { DarwinPressModifierKey(KeyPress, NX_MODIFIERKEY_ALPHALOCK); DarwinPressModifierKey(KeyRelease, NX_MODIFIERKEY_ALPHALOCK); } for (f = darwin_x11_modifier_mask_list; *f; f++) if (*f & flags && *f != NX_ALPHASHIFTMASK) { key = DarwinModifierNXMaskToNXKey(*f); if (key == -1) ErrorF("DarwinUpdateModifiers: Unsupported NXMask: 0x%x\n", *f); else DarwinPressModifierKey(pressed, key); } } /* Generic handler for Xquartz-specifc events. When possible, these should be moved into their own individual functions and set as handlers using mieqSetHandler. */ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr dev) { XQuartzEvent *e = &(ie->xquartz_event); switch (e->subtype) { case kXquartzControllerNotify: DEBUG_LOG("kXquartzControllerNotify\n"); AppleWMSendEvent(AppleWMControllerNotify, AppleWMControllerNotifyMask, e->data[0], e->data[1]); break; case kXquartzPasteboardNotify: DEBUG_LOG("kXquartzPasteboardNotify\n"); AppleWMSendEvent(AppleWMPasteboardNotify, AppleWMPasteboardNotifyMask, e->data[0], e->data[1]); break; case kXquartzActivate: DEBUG_LOG("kXquartzActivate\n"); QuartzShow(); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsActive, 0); break; case kXquartzDeactivate: DEBUG_LOG("kXquartzDeactivate\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMIsInactive, 0); QuartzHide(); break; case kXquartzReloadPreferences: DEBUG_LOG("kXquartzReloadPreferences\n"); AppleWMSendEvent(AppleWMActivationNotify, AppleWMActivationNotifyMask, AppleWMReloadPreferences, 0); break; case kXquartzToggleFullscreen: DEBUG_LOG("kXquartzToggleFullscreen\n"); if (XQuartzIsRootless) ErrorF( "Ignoring kXquartzToggleFullscreen because of rootless mode."); else QuartzRandRToggleFullscreen(); break; case kXquartzSetRootless: DEBUG_LOG("kXquartzSetRootless\n"); if (e->data[0]) { QuartzRandRSetFakeRootless(); } else { QuartzRandRSetFakeFullscreen(FALSE); } break; case kXquartzSetRootClip: QuartzSetRootClip(e->data[0]); break; case kXquartzQuit: GiveUp(0); break; case kXquartzSpaceChanged: DEBUG_LOG("kXquartzSpaceChanged\n"); QuartzSpaceChanged(e->data[0]); break; case kXquartzListenOnOpenFD: ErrorF("Calling ListenOnOpenFD() for new fd: %d\n", (int)e->data[0]); ListenOnOpenFD((int)e->data[0], 1); break; case kXquartzReloadKeymap: DarwinKeyboardReloadHandler(); break; case kXquartzDisplayChanged: DEBUG_LOG("kXquartzDisplayChanged\n"); QuartzUpdateScreens(); /* Update our RandR info */ QuartzRandRUpdateFakeModes(TRUE); break; default: if (!QuartzModeEventHandler(screenNum, e, dev)) ErrorF("Unknown application defined event type %d.\n", e->subtype); } } void DarwinListenOnOpenFD(int fd) { ErrorF("DarwinListenOnOpenFD: %d\n", fd); pthread_mutex_lock(&fd_add_lock); if (fd_add_count < FD_ADD_MAX) fd_add[fd_add_count++] = fd; else ErrorF("FD Addition buffer at max. Dropping fd addition request.\n"); pthread_cond_broadcast(&fd_add_ready_cond); pthread_mutex_unlock(&fd_add_lock); } static void * DarwinProcessFDAdditionQueue_thread(void *args) { /* TODO: Possibly adjust this to no longer be a race... maybe trigger this * once a client connects and claims to be the WM. * * From ajax: * There's already an internal callback chain for setting selection [in 1.5] * ownership. See the CallSelectionCallback at the bottom of * ProcSetSelectionOwner, and xfixes/select.c for an example of how to hook * into it. */ struct timespec sleep_for; struct timespec sleep_remaining; sleep_for.tv_sec = 3; sleep_for.tv_nsec = 0; ErrorF( "X11.app: DarwinProcessFDAdditionQueue_thread: Sleeping to allow xinitrc to catchup.\n"); while (nanosleep(&sleep_for, &sleep_remaining) != 0) { sleep_for = sleep_remaining; } pthread_mutex_lock(&fd_add_lock); while (true) { while (fd_add_count) { DarwinSendDDXEvent(kXquartzListenOnOpenFD, 1, fd_add[--fd_add_count]); } pthread_cond_wait(&fd_add_ready_cond, &fd_add_lock); } return NULL; } Bool DarwinEQInit(void) { int *p; for (p = darwin_x11_modifier_mask_list; *p; p++) { darwin_x11_modifier_mask |= *p; } darwin_all_modifier_mask = darwin_x11_modifier_mask; for (p = darwin_all_modifier_mask_additions; *p; p++) { darwin_all_modifier_mask |= *p; } mieqInit(); mieqSetHandler(ET_XQuartz, DarwinEventHandler); if (!fd_add_tid) fd_add_tid = create_thread(DarwinProcessFDAdditionQueue_thread, NULL); signal_mieq_init(); return TRUE; } void DarwinEQFini(void) { mieqFini(); } /* * ProcessInputEvents * Read and process events from the event queue until it is empty. */ void ProcessInputEvents(void) { char nullbyte; int x = sizeof(nullbyte); mieqProcessInputEvents(); // Empty the signaling pipe while (x == sizeof(nullbyte)) { x = read(darwinEventReadFD, &nullbyte, sizeof(nullbyte)); } } /* Sends a null byte down darwinEventWriteFD, which will cause the Dispatch() event loop to check out event queue */ static void DarwinPokeEQ(void) { char nullbyte = 0; // oh, i ... er ... christ. write(darwinEventWriteFD, &nullbyte, sizeof(nullbyte)); } void DarwinInputReleaseButtonsAndKeys(DeviceIntPtr pDev) { input_lock(); { int i; if (pDev->button) { for (i = 0; i < pDev->button->numButtons; i++) { if (BitIsOn(pDev->button->down, i)) { QueuePointerEvents(pDev, ButtonRelease, i, POINTER_ABSOLUTE, NULL); } } } if (pDev->key) { for (i = 0; i < NUM_KEYCODES; i++) { if (BitIsOn(pDev->key->down, i + MIN_KEYCODE)) { QueueKeyboardEvents(pDev, KeyRelease, i + MIN_KEYCODE); } } } DarwinPokeEQ(); } input_unlock(); } void DarwinSendTabletEvents(DeviceIntPtr pDev, int ev_type, int ev_button, double pointer_x, double pointer_y, double pressure, double tilt_x, double tilt_y) { ScreenPtr screen; ValuatorMask valuators; screen = miPointerGetScreen(pDev); if (!screen) { DEBUG_LOG("%s called before screen was initialized\n", __FUNCTION__); return; } /* Fix offset between darwin and X screens */ pointer_x -= darwinMainScreenX + screen->x; pointer_y -= darwinMainScreenY + screen->y; /* Adjust our pointer location to the [0,1] range */ pointer_x = pointer_x / (double)screenInfo.width; pointer_y = pointer_y / (double)screenInfo.height; valuator_mask_zero(&valuators); valuator_mask_set_double(&valuators, 0, XQUARTZ_VALUATOR_LIMIT * pointer_x); valuator_mask_set_double(&valuators, 1, XQUARTZ_VALUATOR_LIMIT * pointer_y); valuator_mask_set_double(&valuators, 2, XQUARTZ_VALUATOR_LIMIT * pressure); valuator_mask_set_double(&valuators, 3, XQUARTZ_VALUATOR_LIMIT * tilt_x); valuator_mask_set_double(&valuators, 4, XQUARTZ_VALUATOR_LIMIT * tilt_y); input_lock(); { if (ev_type == ProximityIn || ev_type == ProximityOut) { QueueProximityEvents(pDev, ev_type, &valuators); } else { QueuePointerEvents(pDev, ev_type, ev_button, POINTER_ABSOLUTE, &valuators); } DarwinPokeEQ(); } input_unlock(); } void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, double pointer_x, double pointer_y, double pointer_dx, double pointer_dy) { static int darwinFakeMouseButtonDown = 0; ScreenPtr screen; ValuatorMask valuators; screen = miPointerGetScreen(pDev); if (!screen) { DEBUG_LOG("%s called before screen was initialized\n", __FUNCTION__); return; } /* Handle fake click */ if (ev_type == ButtonPress && darwinFakeButtons && ev_button == 1) { if (darwinFakeMouseButtonDown != 0) { /* We're currently "down" with another button, so release it first */ DarwinSendPointerEvents(pDev, ButtonRelease, darwinFakeMouseButtonDown, pointer_x, pointer_y, 0.0, 0.0); darwinFakeMouseButtonDown = 0; } if (darwin_all_modifier_flags & darwinFakeMouse2Mask) { ev_button = 2; darwinFakeMouseButtonDown = 2; DarwinUpdateModKeys( darwin_all_modifier_flags & ~darwinFakeMouse2Mask); } else if (darwin_all_modifier_flags & darwinFakeMouse3Mask) { ev_button = 3; darwinFakeMouseButtonDown = 3; DarwinUpdateModKeys( darwin_all_modifier_flags & ~darwinFakeMouse3Mask); } } if (ev_type == ButtonRelease && ev_button == 1) { if (darwinFakeMouseButtonDown) { ev_button = darwinFakeMouseButtonDown; } if (darwinFakeMouseButtonDown == 2) { DarwinUpdateModKeys( darwin_all_modifier_flags & ~darwinFakeMouse2Mask); } else if (darwinFakeMouseButtonDown == 3) { DarwinUpdateModKeys( darwin_all_modifier_flags & ~darwinFakeMouse3Mask); } darwinFakeMouseButtonDown = 0; } /* Fix offset between darwin and X screens */ pointer_x -= darwinMainScreenX + screen->x; pointer_y -= darwinMainScreenY + screen->y; valuator_mask_zero(&valuators); valuator_mask_set_double(&valuators, 0, pointer_x); valuator_mask_set_double(&valuators, 1, pointer_y); if (ev_type == MotionNotify) { if (pointer_dx != 0.0) valuator_mask_set_double(&valuators, 2, pointer_dx); if (pointer_dy != 0.0) valuator_mask_set_double(&valuators, 3, pointer_dy); } input_lock(); { QueuePointerEvents(pDev, ev_type, ev_button, POINTER_ABSOLUTE, &valuators); DarwinPokeEQ(); } input_unlock(); } void DarwinSendKeyboardEvents(int ev_type, int keycode) { input_lock(); { QueueKeyboardEvents(darwinKeyboard, ev_type, keycode + MIN_KEYCODE); DarwinPokeEQ(); } input_unlock(); } /* Send the appropriate number of button clicks to emulate scroll wheel */ void DarwinSendScrollEvents(double scroll_x, double scroll_y) { ScreenPtr screen; ValuatorMask valuators; screen = miPointerGetScreen(darwinPointer); if (!screen) { DEBUG_LOG( "DarwinSendScrollEvents called before screen was initialized\n"); return; } valuator_mask_zero(&valuators); valuator_mask_set_double(&valuators, 4, scroll_y); valuator_mask_set_double(&valuators, 5, scroll_x); input_lock(); { QueuePointerEvents(darwinPointer, MotionNotify, 0, POINTER_RELATIVE, &valuators); DarwinPokeEQ(); } input_unlock(); } /* Send the appropriate KeyPress/KeyRelease events to GetKeyboardEvents to reflect changing modifier flags (alt, control, meta, etc) */ void DarwinUpdateModKeys(int flags) { DarwinUpdateModifiers( KeyRelease, darwin_all_modifier_flags & ~flags & darwin_x11_modifier_mask); DarwinUpdateModifiers( KeyPress, ~darwin_all_modifier_flags & flags & darwin_x11_modifier_mask); darwin_all_modifier_flags = flags; } /* * DarwinSendDDXEvent * Send the X server thread a message by placing it on the event queue. */ void DarwinSendDDXEvent(int type, int argc, ...) { XQuartzEvent e; int i; va_list args; memset(&e, 0, sizeof(e)); e.header = ET_Internal; e.type = ET_XQuartz; e.length = sizeof(e); e.time = GetTimeInMillis(); e.subtype = type; if (argc > 0 && argc < XQUARTZ_EVENT_MAXARGS) { va_start(args, argc); for (i = 0; i < argc; i++) e.data[i] = (uint32_t)va_arg(args, uint32_t); va_end(args); } wait_for_mieq_init(); input_lock(); { mieqEnqueue(NULL, (InternalEvent *)&e); DarwinPokeEQ(); } input_unlock(); } xorg-server-21.1.16/hw/xquartz/darwinXinput.c0000644000175000017500000001273514757411105014637 /* * X server support of the XINPUT extension for xquartz * * This is currently a copy of Xi/stubs.c, but eventually this * should include more complete XINPUT support. */ /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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 #endif #include #include #include "inputstr.h" #include #include #include "XIstubs.h" #include "darwin.h" /**************************************************************************** * * Caller: ProcXSetDeviceMode * * Change the mode of an extension device. * This function is used to change the mode of a device from reporting * relative motion to reporting absolute positional information, and * vice versa. * The default implementation below is that no such devices are supported. * */ int SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) { DEBUG_LOG("SetDeviceMode(%p, %p, %d)\n", client, dev, mode); return BadMatch; } /**************************************************************************** * * Caller: ProcXSetDeviceValuators * * Set the value of valuators on an extension input device. * This function is used to set the initial value of valuators on * those input devices that are capable of reporting either relative * motion or an absolute position, and allow an initial position to be set. * The default implementation below is that no such devices are supported. * */ int SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, int *valuators, int first_valuator, int num_valuators) { DEBUG_LOG("SetDeviceValuators(%p, %p, %p, %d, %d)\n", client, dev, valuators, first_valuator, num_valuators); return BadMatch; } /**************************************************************************** * * Caller: ProcXChangeDeviceControl * * Change the specified device controls on an extension input device. * */ int ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control) { DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control); return BadMatch; } /**************************************************************************** * * Caller: configAddDevice (and others) * * Add a new device with the specified options. * */ int NewInputDeviceRequest(InputOption *options, InputAttributes *attrs, DeviceIntPtr *pdev) { DEBUG_LOG("NewInputDeviceRequest(%p, %p)\n", options, pdev); return BadValue; } /**************************************************************************** * * Caller: configRemoveDevice (and others) * * Remove the specified device previously added. * */ void DeleteInputDeviceRequest(DeviceIntPtr dev) { DEBUG_LOG("DeleteInputDeviceRequest(%p)\n", dev); } /**************************************************************************** * * Caller: configRemoveDevice (and others) * * Remove any traces of the input device specified in config_info. * This is only necessary if the ddx keeps information around beyond * the NewInputDeviceRequest/DeleteInputDeviceRequest * */ void RemoveInputDeviceTraces(const char *config_info) { DEBUG_LOG("RemoveInputDeviceTraces(%s)\n", config_info); } xorg-server-21.1.16/hw/xquartz/keysym2ucs.c0000644000175000017500000005430014757411105014253 /* * * This module converts keysym values into the corresponding ISO 10646 * (UCS, Unicode) values. * * The array keysymtab[] contains pairs of X11 keysym values for graphical * characters and the corresponding Unicode value. The function * keysym2ucs() maps a keysym onto a Unicode value using a binary search, * therefore keysymtab[] must remain SORTED by keysym value. * * The keysym -> UTF-8 conversion will hopefully one day be provided * by Xlib via XmbLookupString() and should ideally not have to be * done in X applications. But we are not there yet. * * We allow to represent any UCS character in the range U-00000000 to * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. * This admittedly does not cover the entire 31-bit space of UCS, but * it does cover all of the characters up to U-10FFFF, which can be * represented by UTF-16, and more, and it is very unlikely that higher * UCS codes will ever be assigned by ISO. So to get Unicode character * U+ABCD you can directly use keysym 0x0100abcd. * * NOTE: The comments in the table below contain the actual character * encoded in UTF-8, so for viewing and editing best use an editor in * UTF-8 mode. * * Author: Markus G. Kuhn , University of Cambridge, April 2001 * * Special thanks to Richard Verhoeven for preparing * an initial draft of the mapping table. * * This software is in the public domain. Share and enjoy! * * AUTOMATICALLY GENERATED FILE, DO NOT EDIT !!! (unicode/convmap.pl) */ #include "keysym2ucs.h" #include #include struct codepair { unsigned short keysym; unsigned short ucs; }; const static struct codepair keysymtab[] = { { 0x01a1, 0x0104 }, { 0x01a2, 0x02d8 }, { 0x01a3, 0x0141 }, { 0x01a5, 0x013d }, { 0x01a6, 0x015a }, { 0x01a9, 0x0160 }, { 0x01aa, 0x015e }, { 0x01ab, 0x0164 }, { 0x01ac, 0x0179 }, { 0x01ae, 0x017d }, { 0x01af, 0x017b }, { 0x01b1, 0x0105 }, { 0x01b2, 0x02db }, { 0x01b3, 0x0142 }, { 0x01b5, 0x013e }, { 0x01b6, 0x015b }, { 0x01b7, 0x02c7 }, { 0x01b9, 0x0161 }, { 0x01ba, 0x015f }, { 0x01bb, 0x0165 }, { 0x01bc, 0x017a }, { 0x01bd, 0x02dd }, { 0x01be, 0x017e }, { 0x01bf, 0x017c }, { 0x01c0, 0x0154 }, { 0x01c3, 0x0102 }, { 0x01c5, 0x0139 }, { 0x01c6, 0x0106 }, { 0x01c8, 0x010c }, { 0x01ca, 0x0118 }, { 0x01cc, 0x011a }, { 0x01cf, 0x010e }, { 0x01d0, 0x0110 }, { 0x01d1, 0x0143 }, { 0x01d2, 0x0147 }, { 0x01d5, 0x0150 }, { 0x01d8, 0x0158 }, { 0x01d9, 0x016e }, { 0x01db, 0x0170 }, { 0x01de, 0x0162 }, { 0x01e0, 0x0155 }, { 0x01e3, 0x0103 }, { 0x01e5, 0x013a }, { 0x01e6, 0x0107 }, { 0x01e8, 0x010d }, { 0x01ea, 0x0119 }, { 0x01ec, 0x011b }, { 0x01ef, 0x010f }, { 0x01f0, 0x0111 }, { 0x01f1, 0x0144 }, { 0x01f2, 0x0148 }, { 0x01f5, 0x0151 }, { 0x01f8, 0x0159 }, { 0x01f9, 0x016f }, { 0x01fb, 0x0171 }, { 0x01fe, 0x0163 }, { 0x01ff, 0x02d9 }, { 0x02a1, 0x0126 }, { 0x02a6, 0x0124 }, { 0x02a9, 0x0130 }, { 0x02ab, 0x011e }, { 0x02ac, 0x0134 }, { 0x02b1, 0x0127 }, { 0x02b6, 0x0125 }, { 0x02b9, 0x0131 }, { 0x02bb, 0x011f }, { 0x02bc, 0x0135 }, { 0x02c5, 0x010a }, { 0x02c6, 0x0108 }, { 0x02d5, 0x0120 }, { 0x02d8, 0x011c }, { 0x02dd, 0x016c }, { 0x02de, 0x015c }, { 0x02e5, 0x010b }, { 0x02e6, 0x0109 }, { 0x02f5, 0x0121 }, { 0x02f8, 0x011d }, { 0x02fd, 0x016d }, { 0x02fe, 0x015d }, { 0x03a2, 0x0138 }, { 0x03a3, 0x0156 }, { 0x03a5, 0x0128 }, { 0x03a6, 0x013b }, { 0x03aa, 0x0112 }, { 0x03ab, 0x0122 }, { 0x03ac, 0x0166 }, { 0x03b3, 0x0157 }, { 0x03b5, 0x0129 }, { 0x03b6, 0x013c }, { 0x03ba, 0x0113 }, { 0x03bb, 0x0123 }, { 0x03bc, 0x0167 }, { 0x03bd, 0x014a }, { 0x03bf, 0x014b }, { 0x03c0, 0x0100 }, { 0x03c7, 0x012e }, { 0x03cc, 0x0116 }, { 0x03cf, 0x012a }, { 0x03d1, 0x0145 }, { 0x03d2, 0x014c }, { 0x03d3, 0x0136 }, { 0x03d9, 0x0172 }, { 0x03dd, 0x0168 }, { 0x03de, 0x016a }, { 0x03e0, 0x0101 }, { 0x03e7, 0x012f }, { 0x03ec, 0x0117 }, { 0x03ef, 0x012b }, { 0x03f1, 0x0146 }, { 0x03f2, 0x014d }, { 0x03f3, 0x0137 }, { 0x03f9, 0x0173 }, { 0x03fd, 0x0169 }, { 0x03fe, 0x016b }, { 0x047e, 0x203e }, { 0x04a1, 0x3002 }, { 0x04a2, 0x300c }, { 0x04a3, 0x300d }, { 0x04a4, 0x3001 }, { 0x04a5, 0x30fb }, { 0x04a6, 0x30f2 }, { 0x04a7, 0x30a1 }, { 0x04a8, 0x30a3 }, { 0x04a9, 0x30a5 }, { 0x04aa, 0x30a7 }, { 0x04ab, 0x30a9 }, { 0x04ac, 0x30e3 }, { 0x04ad, 0x30e5 }, { 0x04ae, 0x30e7 }, { 0x04af, 0x30c3 }, { 0x04b0, 0x30fc }, { 0x04b1, 0x30a2 }, { 0x04b2, 0x30a4 }, { 0x04b3, 0x30a6 }, { 0x04b4, 0x30a8 }, { 0x04b5, 0x30aa }, { 0x04b6, 0x30ab }, { 0x04b7, 0x30ad }, { 0x04b8, 0x30af }, { 0x04b9, 0x30b1 }, { 0x04ba, 0x30b3 }, { 0x04bb, 0x30b5 }, { 0x04bc, 0x30b7 }, { 0x04bd, 0x30b9 }, { 0x04be, 0x30bb }, { 0x04bf, 0x30bd }, { 0x04c0, 0x30bf }, { 0x04c1, 0x30c1 }, { 0x04c2, 0x30c4 }, { 0x04c3, 0x30c6 }, { 0x04c4, 0x30c8 }, { 0x04c5, 0x30ca }, { 0x04c6, 0x30cb }, { 0x04c7, 0x30cc }, { 0x04c8, 0x30cd }, { 0x04c9, 0x30ce }, { 0x04ca, 0x30cf }, { 0x04cb, 0x30d2 }, { 0x04cc, 0x30d5 }, { 0x04cd, 0x30d8 }, { 0x04ce, 0x30db }, { 0x04cf, 0x30de }, { 0x04d0, 0x30df }, { 0x04d1, 0x30e0 }, { 0x04d2, 0x30e1 }, { 0x04d3, 0x30e2 }, { 0x04d4, 0x30e4 }, { 0x04d5, 0x30e6 }, { 0x04d6, 0x30e8 }, { 0x04d7, 0x30e9 }, { 0x04d8, 0x30ea }, { 0x04d9, 0x30eb }, { 0x04da, 0x30ec }, { 0x04db, 0x30ed }, { 0x04dc, 0x30ef }, { 0x04dd, 0x30f3 }, { 0x04de, 0x309b }, { 0x04df, 0x309c }, { 0x05ac, 0x060c }, { 0x05bb, 0x061b }, { 0x05bf, 0x061f }, { 0x05c1, 0x0621 }, { 0x05c2, 0x0622 }, { 0x05c3, 0x0623 }, { 0x05c4, 0x0624 }, { 0x05c5, 0x0625 }, { 0x05c6, 0x0626 }, { 0x05c7, 0x0627 }, { 0x05c8, 0x0628 }, { 0x05c9, 0x0629 }, { 0x05ca, 0x062a }, { 0x05cb, 0x062b }, { 0x05cc, 0x062c }, { 0x05cd, 0x062d }, { 0x05ce, 0x062e }, { 0x05cf, 0x062f }, { 0x05d0, 0x0630 }, { 0x05d1, 0x0631 }, { 0x05d2, 0x0632 }, { 0x05d3, 0x0633 }, { 0x05d4, 0x0634 }, { 0x05d5, 0x0635 }, { 0x05d6, 0x0636 }, { 0x05d7, 0x0637 }, { 0x05d8, 0x0638 }, { 0x05d9, 0x0639 }, { 0x05da, 0x063a }, { 0x05e0, 0x0640 }, { 0x05e1, 0x0641 }, { 0x05e2, 0x0642 }, { 0x05e3, 0x0643 }, { 0x05e4, 0x0644 }, { 0x05e5, 0x0645 }, { 0x05e6, 0x0646 }, { 0x05e7, 0x0647 }, { 0x05e8, 0x0648 }, { 0x05e9, 0x0649 }, { 0x05ea, 0x064a }, { 0x05eb, 0x064b }, { 0x05ec, 0x064c }, { 0x05ed, 0x064d }, { 0x05ee, 0x064e }, { 0x05ef, 0x064f }, { 0x05f0, 0x0650 }, { 0x05f1, 0x0651 }, { 0x05f2, 0x0652 }, { 0x06a1, 0x0452 }, { 0x06a2, 0x0453 }, { 0x06a3, 0x0451 }, { 0x06a4, 0x0454 }, { 0x06a5, 0x0455 }, { 0x06a6, 0x0456 }, { 0x06a7, 0x0457 }, { 0x06a8, 0x0458 }, { 0x06a9, 0x0459 }, { 0x06aa, 0x045a }, { 0x06ab, 0x045b }, { 0x06ac, 0x045c }, { 0x06ae, 0x045e }, { 0x06af, 0x045f }, { 0x06b0, 0x2116 }, { 0x06b1, 0x0402 }, { 0x06b2, 0x0403 }, { 0x06b3, 0x0401 }, { 0x06b4, 0x0404 }, { 0x06b5, 0x0405 }, { 0x06b6, 0x0406 }, { 0x06b7, 0x0407 }, { 0x06b8, 0x0408 }, { 0x06b9, 0x0409 }, { 0x06ba, 0x040a }, { 0x06bb, 0x040b }, { 0x06bc, 0x040c }, { 0x06be, 0x040e }, { 0x06bf, 0x040f }, { 0x06c0, 0x044e }, { 0x06c1, 0x0430 }, { 0x06c2, 0x0431 }, { 0x06c3, 0x0446 }, { 0x06c4, 0x0434 }, { 0x06c5, 0x0435 }, { 0x06c6, 0x0444 }, { 0x06c7, 0x0433 }, { 0x06c8, 0x0445 }, { 0x06c9, 0x0438 }, { 0x06ca, 0x0439 }, { 0x06cb, 0x043a }, { 0x06cc, 0x043b }, { 0x06cd, 0x043c }, { 0x06ce, 0x043d }, { 0x06cf, 0x043e }, { 0x06d0, 0x043f }, { 0x06d1, 0x044f }, { 0x06d2, 0x0440 }, { 0x06d3, 0x0441 }, { 0x06d4, 0x0442 }, { 0x06d5, 0x0443 }, { 0x06d6, 0x0436 }, { 0x06d7, 0x0432 }, { 0x06d8, 0x044c }, { 0x06d9, 0x044b }, { 0x06da, 0x0437 }, { 0x06db, 0x0448 }, { 0x06dc, 0x044d }, { 0x06dd, 0x0449 }, { 0x06de, 0x0447 }, { 0x06df, 0x044a }, { 0x06e0, 0x042e }, { 0x06e1, 0x0410 }, { 0x06e2, 0x0411 }, { 0x06e3, 0x0426 }, { 0x06e4, 0x0414 }, { 0x06e5, 0x0415 }, { 0x06e6, 0x0424 }, { 0x06e7, 0x0413 }, { 0x06e8, 0x0425 }, { 0x06e9, 0x0418 }, { 0x06ea, 0x0419 }, { 0x06eb, 0x041a }, { 0x06ec, 0x041b }, { 0x06ed, 0x041c }, { 0x06ee, 0x041d }, { 0x06ef, 0x041e }, { 0x06f0, 0x041f }, { 0x06f1, 0x042f }, { 0x06f2, 0x0420 }, { 0x06f3, 0x0421 }, { 0x06f4, 0x0422 }, { 0x06f5, 0x0423 }, { 0x06f6, 0x0416 }, { 0x06f7, 0x0412 }, { 0x06f8, 0x042c }, { 0x06f9, 0x042b }, { 0x06fa, 0x0417 }, { 0x06fb, 0x0428 }, { 0x06fc, 0x042d }, { 0x06fd, 0x0429 }, { 0x06fe, 0x0427 }, { 0x06ff, 0x042a }, { 0x07a1, 0x0386 }, { 0x07a2, 0x0388 }, { 0x07a3, 0x0389 }, { 0x07a4, 0x038a }, { 0x07a5, 0x03aa }, { 0x07a7, 0x038c }, { 0x07a8, 0x038e }, { 0x07a9, 0x03ab }, { 0x07ab, 0x038f }, { 0x07ae, 0x0385 }, { 0x07af, 0x2015 }, { 0x07b1, 0x03ac }, { 0x07b2, 0x03ad }, { 0x07b3, 0x03ae }, { 0x07b4, 0x03af }, { 0x07b5, 0x03ca }, { 0x07b6, 0x0390 }, { 0x07b7, 0x03cc }, { 0x07b8, 0x03cd }, { 0x07b9, 0x03cb }, { 0x07ba, 0x03b0 }, { 0x07bb, 0x03ce }, { 0x07c1, 0x0391 }, { 0x07c2, 0x0392 }, { 0x07c3, 0x0393 }, { 0x07c4, 0x0394 }, { 0x07c5, 0x0395 }, { 0x07c6, 0x0396 }, { 0x07c7, 0x0397 }, { 0x07c8, 0x0398 }, { 0x07c9, 0x0399 }, { 0x07ca, 0x039a }, { 0x07cb, 0x039b }, { 0x07cc, 0x039c }, { 0x07cd, 0x039d }, { 0x07ce, 0x039e }, { 0x07cf, 0x039f }, { 0x07d0, 0x03a0 }, { 0x07d1, 0x03a1 }, { 0x07d2, 0x03a3 }, { 0x07d4, 0x03a4 }, { 0x07d5, 0x03a5 }, { 0x07d6, 0x03a6 }, { 0x07d7, 0x03a7 }, { 0x07d8, 0x03a8 }, { 0x07d9, 0x03a9 }, { 0x07e1, 0x03b1 }, { 0x07e2, 0x03b2 }, { 0x07e3, 0x03b3 }, { 0x07e4, 0x03b4 }, { 0x07e5, 0x03b5 }, { 0x07e6, 0x03b6 }, { 0x07e7, 0x03b7 }, { 0x07e8, 0x03b8 }, { 0x07e9, 0x03b9 }, { 0x07ea, 0x03ba }, { 0x07eb, 0x03bb }, { 0x07ec, 0x03bc }, { 0x07ed, 0x03bd }, { 0x07ee, 0x03be }, { 0x07ef, 0x03bf }, { 0x07f0, 0x03c0 }, { 0x07f1, 0x03c1 }, { 0x07f2, 0x03c3 }, { 0x07f3, 0x03c2 }, { 0x07f4, 0x03c4 }, { 0x07f5, 0x03c5 }, { 0x07f6, 0x03c6 }, { 0x07f7, 0x03c7 }, { 0x07f8, 0x03c8 }, { 0x07f9, 0x03c9 }, { 0x08a1, 0x23b7 }, { 0x08a2, 0x250c }, { 0x08a3, 0x2500 }, { 0x08a4, 0x2320 }, { 0x08a5, 0x2321 }, { 0x08a6, 0x2502 }, { 0x08a7, 0x23a1 }, { 0x08a8, 0x23a3 }, { 0x08a9, 0x23a4 }, { 0x08aa, 0x23a6 }, { 0x08ab, 0x239b }, { 0x08ac, 0x239d }, { 0x08ad, 0x239e }, { 0x08ae, 0x23a0 }, { 0x08af, 0x23a8 }, { 0x08b0, 0x23ac }, { 0x08bc, 0x2264 }, { 0x08bd, 0x2260 }, { 0x08be, 0x2265 }, { 0x08bf, 0x222b }, { 0x08c0, 0x2234 }, { 0x08c1, 0x221d }, { 0x08c2, 0x221e }, { 0x08c5, 0x2207 }, { 0x08c8, 0x223c }, { 0x08c9, 0x2243 }, { 0x08cd, 0x21d4 }, { 0x08ce, 0x21d2 }, { 0x08cf, 0x2261 }, { 0x08d6, 0x221a }, { 0x08da, 0x2282 }, { 0x08db, 0x2283 }, { 0x08dc, 0x2229 }, { 0x08dd, 0x222a }, { 0x08de, 0x2227 }, { 0x08df, 0x2228 }, { 0x08ef, 0x2202 }, { 0x08f6, 0x0192 }, { 0x08fb, 0x2190 }, { 0x08fc, 0x2191 }, { 0x08fd, 0x2192 }, { 0x08fe, 0x2193 }, { 0x09e0, 0x25c6 }, { 0x09e1, 0x2592 }, { 0x09e2, 0x2409 }, { 0x09e3, 0x240c }, { 0x09e4, 0x240d }, { 0x09e5, 0x240a }, { 0x09e8, 0x2424 }, { 0x09e9, 0x240b }, { 0x09ea, 0x2518 }, { 0x09eb, 0x2510 }, { 0x09ec, 0x250c }, { 0x09ed, 0x2514 }, { 0x09ee, 0x253c }, { 0x09ef, 0x23ba }, { 0x09f0, 0x23bb }, { 0x09f1, 0x2500 }, { 0x09f2, 0x23bc }, { 0x09f3, 0x23bd }, { 0x09f4, 0x251c }, { 0x09f5, 0x2524 }, { 0x09f6, 0x2534 }, { 0x09f7, 0x252c }, { 0x09f8, 0x2502 }, { 0x0aa1, 0x2003 }, { 0x0aa2, 0x2002 }, { 0x0aa3, 0x2004 }, { 0x0aa4, 0x2005 }, { 0x0aa5, 0x2007 }, { 0x0aa6, 0x2008 }, { 0x0aa7, 0x2009 }, { 0x0aa8, 0x200a }, { 0x0aa9, 0x2014 }, { 0x0aaa, 0x2013 }, { 0x0aae, 0x2026 }, { 0x0aaf, 0x2025 }, { 0x0ab0, 0x2153 }, { 0x0ab1, 0x2154 }, { 0x0ab2, 0x2155 }, { 0x0ab3, 0x2156 }, { 0x0ab4, 0x2157 }, { 0x0ab5, 0x2158 }, { 0x0ab6, 0x2159 }, { 0x0ab7, 0x215a }, { 0x0ab8, 0x2105 }, { 0x0abb, 0x2012 }, { 0x0abc, 0x2329 }, { 0x0abe, 0x232a }, { 0x0ac3, 0x215b }, { 0x0ac4, 0x215c }, { 0x0ac5, 0x215d }, { 0x0ac6, 0x215e }, { 0x0ac9, 0x2122 }, { 0x0aca, 0x2613 }, { 0x0acc, 0x25c1 }, { 0x0acd, 0x25b7 }, { 0x0ace, 0x25cb }, { 0x0acf, 0x25af }, { 0x0ad0, 0x2018 }, { 0x0ad1, 0x2019 }, { 0x0ad2, 0x201c }, { 0x0ad3, 0x201d }, { 0x0ad4, 0x211e }, { 0x0ad6, 0x2032 }, { 0x0ad7, 0x2033 }, { 0x0ad9, 0x271d }, { 0x0adb, 0x25ac }, { 0x0adc, 0x25c0 }, { 0x0add, 0x25b6 }, { 0x0ade, 0x25cf }, { 0x0adf, 0x25ae }, { 0x0ae0, 0x25e6 }, { 0x0ae1, 0x25ab }, { 0x0ae2, 0x25ad }, { 0x0ae3, 0x25b3 }, { 0x0ae4, 0x25bd }, { 0x0ae5, 0x2606 }, { 0x0ae6, 0x2022 }, { 0x0ae7, 0x25aa }, { 0x0ae8, 0x25b2 }, { 0x0ae9, 0x25bc }, { 0x0aea, 0x261c }, { 0x0aeb, 0x261e }, { 0x0aec, 0x2663 }, { 0x0aed, 0x2666 }, { 0x0aee, 0x2665 }, { 0x0af0, 0x2720 }, { 0x0af1, 0x2020 }, { 0x0af2, 0x2021 }, { 0x0af3, 0x2713 }, { 0x0af4, 0x2717 }, { 0x0af5, 0x266f }, { 0x0af6, 0x266d }, { 0x0af7, 0x2642 }, { 0x0af8, 0x2640 }, { 0x0af9, 0x260e }, { 0x0afa, 0x2315 }, { 0x0afb, 0x2117 }, { 0x0afc, 0x2038 }, { 0x0afd, 0x201a }, { 0x0afe, 0x201e }, { 0x0ba3, 0x003c }, { 0x0ba6, 0x003e }, { 0x0ba8, 0x2228 }, { 0x0ba9, 0x2227 }, { 0x0bc0, 0x00af }, { 0x0bc2, 0x22a5 }, { 0x0bc3, 0x2229 }, { 0x0bc4, 0x230a }, { 0x0bc6, 0x005f }, { 0x0bca, 0x2218 }, { 0x0bcc, 0x2395 }, { 0x0bce, 0x22a4 }, { 0x0bcf, 0x25cb }, { 0x0bd3, 0x2308 }, { 0x0bd6, 0x222a }, { 0x0bd8, 0x2283 }, { 0x0bda, 0x2282 }, { 0x0bdc, 0x22a2 }, { 0x0bfc, 0x22a3 }, { 0x0cdf, 0x2017 }, { 0x0ce0, 0x05d0 }, { 0x0ce1, 0x05d1 }, { 0x0ce2, 0x05d2 }, { 0x0ce3, 0x05d3 }, { 0x0ce4, 0x05d4 }, { 0x0ce5, 0x05d5 }, { 0x0ce6, 0x05d6 }, { 0x0ce7, 0x05d7 }, { 0x0ce8, 0x05d8 }, { 0x0ce9, 0x05d9 }, { 0x0cea, 0x05da }, { 0x0ceb, 0x05db }, { 0x0cec, 0x05dc }, { 0x0ced, 0x05dd }, { 0x0cee, 0x05de }, { 0x0cef, 0x05df }, { 0x0cf0, 0x05e0 }, { 0x0cf1, 0x05e1 }, { 0x0cf2, 0x05e2 }, { 0x0cf3, 0x05e3 }, { 0x0cf4, 0x05e4 }, { 0x0cf5, 0x05e5 }, { 0x0cf6, 0x05e6 }, { 0x0cf7, 0x05e7 }, { 0x0cf8, 0x05e8 }, { 0x0cf9, 0x05e9 }, { 0x0cfa, 0x05ea }, { 0x0da1, 0x0e01 }, { 0x0da2, 0x0e02 }, { 0x0da3, 0x0e03 }, { 0x0da4, 0x0e04 }, { 0x0da5, 0x0e05 }, { 0x0da6, 0x0e06 }, { 0x0da7, 0x0e07 }, { 0x0da8, 0x0e08 }, { 0x0da9, 0x0e09 }, { 0x0daa, 0x0e0a }, { 0x0dab, 0x0e0b }, { 0x0dac, 0x0e0c }, { 0x0dad, 0x0e0d }, { 0x0dae, 0x0e0e }, { 0x0daf, 0x0e0f }, { 0x0db0, 0x0e10 }, { 0x0db1, 0x0e11 }, { 0x0db2, 0x0e12 }, { 0x0db3, 0x0e13 }, { 0x0db4, 0x0e14 }, { 0x0db5, 0x0e15 }, { 0x0db6, 0x0e16 }, { 0x0db7, 0x0e17 }, { 0x0db8, 0x0e18 }, { 0x0db9, 0x0e19 }, { 0x0dba, 0x0e1a }, { 0x0dbb, 0x0e1b }, { 0x0dbc, 0x0e1c }, { 0x0dbd, 0x0e1d }, { 0x0dbe, 0x0e1e }, { 0x0dbf, 0x0e1f }, { 0x0dc0, 0x0e20 }, { 0x0dc1, 0x0e21 }, { 0x0dc2, 0x0e22 }, { 0x0dc3, 0x0e23 }, { 0x0dc4, 0x0e24 }, { 0x0dc5, 0x0e25 }, { 0x0dc6, 0x0e26 }, { 0x0dc7, 0x0e27 }, { 0x0dc8, 0x0e28 }, { 0x0dc9, 0x0e29 }, { 0x0dca, 0x0e2a }, { 0x0dcb, 0x0e2b }, { 0x0dcc, 0x0e2c }, { 0x0dcd, 0x0e2d }, { 0x0dce, 0x0e2e }, { 0x0dcf, 0x0e2f }, { 0x0dd0, 0x0e30 }, { 0x0dd1, 0x0e31 }, { 0x0dd2, 0x0e32 }, { 0x0dd3, 0x0e33 }, { 0x0dd4, 0x0e34 }, { 0x0dd5, 0x0e35 }, { 0x0dd6, 0x0e36 }, { 0x0dd7, 0x0e37 }, { 0x0dd8, 0x0e38 }, { 0x0dd9, 0x0e39 }, { 0x0dda, 0x0e3a }, { 0x0ddf, 0x0e3f }, { 0x0de0, 0x0e40 }, { 0x0de1, 0x0e41 }, { 0x0de2, 0x0e42 }, { 0x0de3, 0x0e43 }, { 0x0de4, 0x0e44 }, { 0x0de5, 0x0e45 }, { 0x0de6, 0x0e46 }, { 0x0de7, 0x0e47 }, { 0x0de8, 0x0e48 }, { 0x0de9, 0x0e49 }, { 0x0dea, 0x0e4a }, { 0x0deb, 0x0e4b }, { 0x0dec, 0x0e4c }, { 0x0ded, 0x0e4d }, { 0x0df0, 0x0e50 }, { 0x0df1, 0x0e51 }, { 0x0df2, 0x0e52 }, { 0x0df3, 0x0e53 }, { 0x0df4, 0x0e54 }, { 0x0df5, 0x0e55 }, { 0x0df6, 0x0e56 }, { 0x0df7, 0x0e57 }, { 0x0df8, 0x0e58 }, { 0x0df9, 0x0e59 }, { 0x0ea1, 0x3131 }, { 0x0ea2, 0x3132 }, { 0x0ea3, 0x3133 }, { 0x0ea4, 0x3134 }, { 0x0ea5, 0x3135 }, { 0x0ea6, 0x3136 }, { 0x0ea7, 0x3137 }, { 0x0ea8, 0x3138 }, { 0x0ea9, 0x3139 }, { 0x0eaa, 0x313a }, { 0x0eab, 0x313b }, { 0x0eac, 0x313c }, { 0x0ead, 0x313d }, { 0x0eae, 0x313e }, { 0x0eaf, 0x313f }, { 0x0eb0, 0x3140 }, { 0x0eb1, 0x3141 }, { 0x0eb2, 0x3142 }, { 0x0eb3, 0x3143 }, { 0x0eb4, 0x3144 }, { 0x0eb5, 0x3145 }, { 0x0eb6, 0x3146 }, { 0x0eb7, 0x3147 }, { 0x0eb8, 0x3148 }, { 0x0eb9, 0x3149 }, { 0x0eba, 0x314a }, { 0x0ebb, 0x314b }, { 0x0ebc, 0x314c }, { 0x0ebd, 0x314d }, { 0x0ebe, 0x314e }, { 0x0ebf, 0x314f }, { 0x0ec0, 0x3150 }, { 0x0ec1, 0x3151 }, { 0x0ec2, 0x3152 }, { 0x0ec3, 0x3153 }, { 0x0ec4, 0x3154 }, { 0x0ec5, 0x3155 }, { 0x0ec6, 0x3156 }, { 0x0ec7, 0x3157 }, { 0x0ec8, 0x3158 }, { 0x0ec9, 0x3159 }, { 0x0eca, 0x315a }, { 0x0ecb, 0x315b }, { 0x0ecc, 0x315c }, { 0x0ecd, 0x315d }, { 0x0ece, 0x315e }, { 0x0ecf, 0x315f }, { 0x0ed0, 0x3160 }, { 0x0ed1, 0x3161 }, { 0x0ed2, 0x3162 }, { 0x0ed3, 0x3163 }, { 0x0ed4, 0x11a8 }, { 0x0ed5, 0x11a9 }, { 0x0ed6, 0x11aa }, { 0x0ed7, 0x11ab }, { 0x0ed8, 0x11ac }, { 0x0ed9, 0x11ad }, { 0x0eda, 0x11ae }, { 0x0edb, 0x11af }, { 0x0edc, 0x11b0 }, { 0x0edd, 0x11b1 }, { 0x0ede, 0x11b2 }, { 0x0edf, 0x11b3 }, { 0x0ee0, 0x11b4 }, { 0x0ee1, 0x11b5 }, { 0x0ee2, 0x11b6 }, { 0x0ee3, 0x11b7 }, { 0x0ee4, 0x11b8 }, { 0x0ee5, 0x11b9 }, { 0x0ee6, 0x11ba }, { 0x0ee7, 0x11bb }, { 0x0ee8, 0x11bc }, { 0x0ee9, 0x11bd }, { 0x0eea, 0x11be }, { 0x0eeb, 0x11bf }, { 0x0eec, 0x11c0 }, { 0x0eed, 0x11c1 }, { 0x0eee, 0x11c2 }, { 0x0eef, 0x316d }, { 0x0ef0, 0x3171 }, { 0x0ef1, 0x3178 }, { 0x0ef2, 0x317f }, { 0x0ef3, 0x3181 }, { 0x0ef4, 0x3184 }, { 0x0ef5, 0x3186 }, { 0x0ef6, 0x318d }, { 0x0ef7, 0x318e }, { 0x0ef8, 0x11eb }, { 0x0ef9, 0x11f0 }, { 0x0efa, 0x11f9 }, { 0x0eff, 0x20a9 }, #if 0 /* FIXME: there is no keysym 0x13a4? But 0x20ac is EuroSign in both keysym and Unicode */ { 0x13a4, 0x20ac }, #endif { 0x13bc, 0x0152 }, { 0x13bd, 0x0153 }, { 0x13be, 0x0178 }, { 0x20ac, 0x20ac }, /* Special function keys. */ { 0xff08, 0x0008 }, /* XK_BackSpace */ { 0xff09, 0x0009 }, /* XK_Tab */ { 0xff0a, 0x000a }, /* XK_Linefeed */ { 0xff0d, 0x000d }, /* XK_Return */ { 0xff13, 0x0013 }, /* XK_Pause */ { 0xff1b, 0x001b }, /* XK_Escape */ { 0xff50, 0x0001 }, /* XK_Home */ { 0xff51, 0x001c }, /* XK_Left */ { 0xff52, 0x001e }, /* XK_Up */ { 0xff53, 0x001d }, /* XK_Right */ { 0xff54, 0x001f }, /* XK_Down */ { 0xff55, 0x000b }, /* XK_Prior */ { 0xff56, 0x000c }, /* XK_Next */ { 0xff57, 0x0004 }, /* XK_End */ { 0xff6a, 0x0005 }, /* XK_Help */ { 0xffff, 0x007f }, /* XK_Delete */ }; long keysym2ucs(int keysym) { int min = 0; int max = ARRAY_SIZE(keysymtab) - 1; int mid; /* first check for Latin-1 characters (1:1 mapping) */ if ((keysym >= 0x0020 && keysym <= 0x007e) || (keysym >= 0x00a0 && keysym <= 0x00ff)) return keysym; /* also check for directly encoded 24-bit UCS characters */ if ((keysym & 0xff000000) == 0x01000000) return keysym & 0x00ffffff; /* binary search in table */ while (max >= min) { mid = (min + max) / 2; if (keysymtab[mid].keysym < keysym) min = mid + 1; else if (keysymtab[mid].keysym > keysym) max = mid - 1; else { /* found it */ return keysymtab[mid].ucs; } } /* no matching Unicode value found */ return -1; } static int reverse_compare(const void *a, const void *b) { const struct codepair *ca = a, *cb = b; return ca->ucs - cb->ucs; } int ucs2keysym(long ucs) { static struct codepair *reverse_keysymtab; int min = 0; int max = ARRAY_SIZE(keysymtab) - 1; int mid; if (reverse_keysymtab == NULL) { reverse_keysymtab = malloc(sizeof(keysymtab)); memcpy(reverse_keysymtab, keysymtab, sizeof(keysymtab)); qsort(reverse_keysymtab, ARRAY_SIZE(keysymtab), sizeof(struct codepair), reverse_compare); } /* first check for Latin-1 characters (1:1 mapping) */ if ((ucs >= 0x0020 && ucs <= 0x007e) || (ucs >= 0x00a0 && ucs <= 0x00ff)) return ucs; /* binary search in table */ while (max >= min) { mid = (min + max) / 2; if (reverse_keysymtab[mid].ucs < ucs) min = mid + 1; else if (reverse_keysymtab[mid].ucs > ucs) max = mid - 1; else { /* found it */ return reverse_keysymtab[mid].keysym; } } /* finally, assume a directly encoded 24-bit UCS character */ return ucs | 0x01000000; } xorg-server-21.1.16/hw/xquartz/quartz.c0000644000175000017500000003574014757411105013472 /* * * Quartz-specific support for the Darwin X Server * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include "quartzRandR.h" #include "inputstr.h" #include "quartz.h" #include "darwin.h" #include "darwinEvents.h" #include "pseudoramiX.h" #include "extension.h" #include "nonsdk_extinit.h" #include "glx_extinit.h" #define _APPLEWM_SERVER_ #include "applewmExt.h" #include "X11Application.h" #include // X headers #include "scrnintstr.h" #include "windowstr.h" #include "colormapst.h" #include "globals.h" #include "mi.h" // System headers #include #include #include #include #include #include #include #include #include #include // These are vended by the Objective-C runtime, but they are unfortunately // not available as API in the macOS SDK. We are following suit with swift // and clang in declaring them inline here. They canot be removed or changed // in the OS without major bincompat ramifications. // // These were added in macOS 10.7. void * _Nonnull objc_autoreleasePoolPush(void); void objc_autoreleasePoolPop(void * _Nonnull context); DevPrivateKeyRec quartzScreenKeyRec; int aquaMenuBarHeight = 0; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; /* These are initialized by X11Application with default values set in NSUserDefaults+XQuartzDefaults */ Bool XQuartzFullscreenDisableHotkeys; Bool XQuartzOptionSendsAlt; Bool XQuartzEnableKeyEquivalents; Bool XQuartzFullscreenMenu; Bool XQuartzRootlessDefault; Bool XQuartzFullscreenVisible = FALSE; Bool XQuartzIsRootless = TRUE; Bool XQuartzServerVisible = FALSE; int32_t XQuartzShieldingWindowLevel = 0; /* =========================================================================== Screen functions =========================================================================== */ /* * QuartzAddScreen * Do mode dependent initialization of each screen for Quartz. */ Bool QuartzAddScreen(int index, ScreenPtr pScreen) { // The clang static analyzer thinks we leak displayInfo here #ifndef __clang_analyzer__ // allocate space for private per screen Quartz specific storage QuartzScreenPtr displayInfo = calloc(sizeof(QuartzScreenRec), 1); // QUARTZ_PRIV(pScreen) = displayInfo; dixSetPrivate(&pScreen->devPrivates, quartzScreenKey, displayInfo); #endif /* __clang_analyzer__ */ // do Quartz mode specific initialization return quartzProcs->AddScreen(index, pScreen); } /* * QuartzSetupScreen * Finalize mode specific setup of each screen. */ Bool QuartzSetupScreen(int index, ScreenPtr pScreen) { // do Quartz mode specific setup if (!quartzProcs->SetupScreen(index, pScreen)) return FALSE; // setup cursor support if (!quartzProcs->InitCursor(pScreen)) return FALSE; #if defined(RANDR) if (!QuartzRandRInit(pScreen)) { DEBUG_LOG("Failed to init RandR extension.\n"); return FALSE; } #endif return TRUE; } /* * QuartzBlockHandler * Clean out any autoreleased objects. */ static void QuartzBlockHandler(void *blockData, void *pTimeout) { static void *poolToken = NULL; if (poolToken) { objc_autoreleasePoolPop(poolToken); } poolToken = objc_autoreleasePoolPush(); } /* * QuartzWakeupHandler */ static void QuartzWakeupHandler(void *blockData, int result) { /* nothing here */ } /* * QuartzInitOutput * Quartz display initialization. */ void QuartzInitOutput(int argc, char **argv) { /* For XQuartz, we want to just use the default signal handler to work better with CrashTracer */ signal(SIGSEGV, SIG_DFL); signal(SIGABRT, SIG_DFL); signal(SIGILL, SIG_DFL); #ifdef SIGEMT signal(SIGEMT, SIG_DFL); #endif signal(SIGFPE, SIG_DFL); #ifdef SIGBUS signal(SIGBUS, SIG_DFL); #endif #ifdef SIGSYS signal(SIGSYS, SIG_DFL); #endif #ifdef SIGXCPU signal(SIGXCPU, SIG_DFL); #endif #ifdef SIGXFSZ signal(SIGXFSZ, SIG_DFL); #endif if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler, QuartzWakeupHandler, NULL)) { FatalError("Could not register block and wakeup handlers."); } if (!dixRegisterPrivateKey(&quartzScreenKeyRec, PRIVATE_SCREEN, 0)) FatalError("Failed to alloc quartz screen private.\n"); // Do display mode specific initialization quartzProcs->DisplayInit(); } /* * QuartzInitInput * Inform the main thread the X server is ready to handle events. */ void QuartzInitInput(int argc, char **argv) { X11ApplicationSetCanQuit(0); X11ApplicationServerReady(); // Do final display mode specific initialization before handling events if (quartzProcs->InitInput) quartzProcs->InitInput(argc, argv); } void QuartzUpdateScreens(void) { ScreenPtr pScreen; WindowPtr pRoot; int x, y, width, height, sx, sy; xEvent e; BoxRec bounds; if (noPseudoramiXExtension || screenInfo.numScreens != 1) { /* FIXME: if not using Xinerama, we have multiple screens, and to do this properly may need to add or remove screens. Which isn't possible. So don't do anything. Another reason why we default to running with Xinerama. */ return; } pScreen = screenInfo.screens[0]; PseudoramiXResetScreens(); quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height, pScreen); pScreen->x = x; pScreen->y = y; pScreen->mmWidth = pScreen->mmWidth * ((double)width / pScreen->width); pScreen->mmHeight = pScreen->mmHeight * ((double)height / pScreen->height); pScreen->width = width; pScreen->height = height; DarwinAdjustScreenOrigins(&screenInfo); /* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y, * so use it rather than x/y */ sx = pScreen->x + darwinMainScreenX; sy = pScreen->y + darwinMainScreenY; /* Adjust the root window. */ pRoot = pScreen->root; AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); /* pointer events are clipped to old display region after display reconfiguration * http://xquartz.macosforge.org/trac/ticket/346 */ bounds.x1 = 0; bounds.x2 = width; bounds.y1 = 0; bounds.y2 = height; pScreen->ConstrainCursor(inputInfo.pointer, pScreen, &bounds); inputInfo.pointer->spriteInfo->sprite->physLimits = bounds; inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds; DEBUG_LOG( "Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y); /* Send an event for the root reconfigure */ e.u.u.type = ConfigureNotify; e.u.configureNotify.window = pRoot->drawable.id; e.u.configureNotify.aboveSibling = None; e.u.configureNotify.x = x - sx; e.u.configureNotify.y = y - sy; e.u.configureNotify.width = width; e.u.configureNotify.height = height; e.u.configureNotify.borderWidth = wBorderWidth(pRoot); e.u.configureNotify.override = pRoot->overrideRedirect; DeliverEvents(pRoot, &e, 1, NullWindow); quartzProcs->UpdateScreen(pScreen); /* PaintWindow needs to be called after RootlessUpdateScreenPixmap (from xprUpdateScreen) */ pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); /* Tell RandR about the new size, so new connections get the correct info */ RRScreenSizeNotify(pScreen); } static void pokeActivityCallback(CFRunLoopTimerRef timer, void *info) { UpdateSystemActivity(OverallAct); } static void QuartzScreenSaver(int state) { static CFRunLoopTimerRef pokeActivityTimer = NULL; static CFRunLoopTimerContext pokeActivityContext = { 0, NULL, NULL, NULL, NULL }; static OSSpinLock pokeActivitySpinLock = OS_SPINLOCK_INIT; OSSpinLockLock(&pokeActivitySpinLock); if (state) { if (pokeActivityTimer == NULL) goto QuartzScreenSaverEnd; CFRunLoopTimerInvalidate(pokeActivityTimer); CFRelease(pokeActivityTimer); pokeActivityTimer = NULL; } else { if (pokeActivityTimer != NULL) goto QuartzScreenSaverEnd; pokeActivityTimer = CFRunLoopTimerCreate(NULL, CFAbsoluteTimeGetCurrent(), 30, 0, 0, pokeActivityCallback, &pokeActivityContext); if (pokeActivityTimer == NULL) { ErrorF("Unable to create pokeActivityTimer.\n"); goto QuartzScreenSaverEnd; } CFRunLoopAddTimer( CFRunLoopGetMain(), pokeActivityTimer, kCFRunLoopCommonModes); } QuartzScreenSaverEnd: OSSpinLockUnlock(&pokeActivitySpinLock); } void QuartzShowFullscreen(int state) { int i; DEBUG_LOG("QuartzShowFullscreen: state=%d\n", state); if (XQuartzIsRootless) { ErrorF("QuartzShowFullscreen called while in rootless mode.\n"); return; } QuartzScreenSaver(!state); if (XQuartzFullscreenVisible == state) return; XQuartzFullscreenVisible = state; xp_disable_update(); if (!XQuartzFullscreenVisible) RootlessHideAllWindows(); RootlessUpdateRooted(XQuartzFullscreenVisible); if (XQuartzFullscreenVisible) { RootlessShowAllWindows(); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; RootlessRepositionWindows(pScreen); // JH: I don't think this is necessary, but keeping it here as a reminder //RootlessUpdateScreenPixmap(pScreen); } } /* Somehow the menubar manages to interfere with our event stream * in fullscreen mode, even though it's not visible. */ X11ApplicationShowHideMenubar(!XQuartzFullscreenVisible); xp_reenable_update(); if (XQuartzFullscreenDisableHotkeys) xp_disable_hot_keys(XQuartzFullscreenVisible); } void QuartzSetRootless(Bool state) { DEBUG_LOG("QuartzSetRootless state=%d\n", state); if (XQuartzIsRootless == state) return; if (state) QuartzShowFullscreen(FALSE); XQuartzIsRootless = state; xp_disable_update(); /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */ QuartzUpdateScreens(); if (XQuartzIsRootless) { RootlessShowAllWindows(); } else { RootlessHideAllWindows(); } X11ApplicationShowHideMenubar(TRUE); xp_reenable_update(); xp_disable_hot_keys(FALSE); } /* * QuartzShow * Show the X server on screen. Does nothing if already shown. * Calls mode specific screen resume to restore the X clip regions * (if needed) and the X server cursor state. */ void QuartzShow(void) { int i; if (XQuartzServerVisible) return; XQuartzServerVisible = TRUE; for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i]) { quartzProcs->ResumeScreen(screenInfo.screens[i]); } } if (!XQuartzIsRootless) QuartzShowFullscreen(TRUE); } /* * QuartzHide * Remove the X server display from the screen. Does nothing if already * hidden. Calls mode specific screen suspend to set X clip regions to * prevent drawing (if needed) and restore the Aqua cursor. */ void QuartzHide(void) { int i; if (XQuartzServerVisible) { for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i]) { quartzProcs->SuspendScreen(screenInfo.screens[i]); } } } if (!XQuartzIsRootless) QuartzShowFullscreen(FALSE); XQuartzServerVisible = FALSE; } /* * QuartzSetRootClip * Enable or disable rendering to the X screen. */ void QuartzSetRootClip(int mode) { int i; if (!XQuartzServerVisible) return; for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i]) { SetRootClip(screenInfo.screens[i], mode); } } } /* * QuartzSpaceChanged * Unmap offscreen windows, map onscreen windows */ void QuartzSpaceChanged(uint32_t space_id) { /* Do something special here, so we don't depend on quartz-wm for spaces to work... */ DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id); } /* * QuartzCopyDisplayIDs * Associate an X11 screen with one or more CoreGraphics display IDs by copying * the list into a private array. Free the previously copied array, if present. */ void QuartzCopyDisplayIDs(ScreenPtr pScreen, int displayCount, CGDirectDisplayID *displayIDs) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); free(pQuartzScreen->displayIDs); if (displayCount) { size_t size = displayCount * sizeof(CGDirectDisplayID); pQuartzScreen->displayIDs = malloc(size); memcpy(pQuartzScreen->displayIDs, displayIDs, size); } else { pQuartzScreen->displayIDs = NULL; } pQuartzScreen->displayCount = displayCount; } void NSBeep(void); void DDXRingBell(int volume, // volume is % of max int pitch, // pitch is Hz int duration) // duration is milliseconds { if (volume) NSBeep(); } xorg-server-21.1.16/hw/xquartz/quartzKeyboard.c0000644000175000017500000007234714757411105015157 /* quartzKeyboard.c: Keyboard support for Xquartz Copyright (c) 2003-2012 Apple Inc. Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. Copyright 2004 Kaleb S. KEITHLEY. All Rights Reserved. Copyright (C) 1999,2000 by Eric Sunshine All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #define HACK_MISSING 1 #define HACK_KEYPAD 1 #define HACK_BLACKLIST 1 #include #include #include #include #include #include "quartz.h" #include "darwin.h" #include "darwinEvents.h" #include "quartzKeyboard.h" #include "X11Application.h" #include #include #include "xkbsrv.h" #include "exevents.h" #include "X11/keysym.h" #include "keysym2ucs.h" extern void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); enum { MOD_COMMAND = 256, MOD_SHIFT = 512, MOD_OPTION = 2048, MOD_CONTROL = 4096, }; #define UKEYSYM(u) ((u) | 0x01000000) #if HACK_MISSING /* Table of keycode->keysym mappings we use to fallback on for important keys that are often not in the Unicode mapping. */ const static struct { unsigned short keycode; KeySym keysym; } known_keys[] = { { 55, XK_Meta_L }, { 56, XK_Shift_L }, { 57, XK_Caps_Lock }, { 58, XK_Alt_L }, { 59, XK_Control_L }, { 60, XK_Shift_R }, { 61, XK_Alt_R }, { 62, XK_Control_R }, { 63, XK_Meta_R }, { 110, XK_Menu }, { 122, XK_F1 }, { 120, XK_F2 }, { 99, XK_F3 }, { 118, XK_F4 }, { 96, XK_F5 }, { 97, XK_F6 }, { 98, XK_F7 }, { 100, XK_F8 }, { 101, XK_F9 }, { 109, XK_F10 }, { 103, XK_F11 }, { 111, XK_F12 }, { 105, XK_F13 }, { 107, XK_F14 }, { 113, XK_F15 }, { 106, XK_F16 }, { 64, XK_F17 }, { 79, XK_F18 }, { 80, XK_F19 }, { 90, XK_F20 }, }; #endif #if HACK_KEYPAD /* Table of keycode->old,new-keysym mappings we use to fixup the numeric keypad entries. */ const static struct { unsigned short keycode; KeySym normal, keypad; } known_numeric_keys[] = { { 65, XK_period, XK_KP_Decimal }, { 67, XK_asterisk, XK_KP_Multiply }, { 69, XK_plus, XK_KP_Add }, { 75, XK_slash, XK_KP_Divide }, { 76, 0x01000003, XK_KP_Enter }, { 78, XK_minus, XK_KP_Subtract }, { 81, XK_equal, XK_KP_Equal }, { 82, XK_0, XK_KP_0 }, { 83, XK_1, XK_KP_1 }, { 84, XK_2, XK_KP_2 }, { 85, XK_3, XK_KP_3 }, { 86, XK_4, XK_KP_4 }, { 87, XK_5, XK_KP_5 }, { 88, XK_6, XK_KP_6 }, { 89, XK_7, XK_KP_7 }, { 91, XK_8, XK_KP_8 }, { 92, XK_9, XK_KP_9 }, }; #endif #if HACK_BLACKLIST /* wine notepad produces wrong characters on shift+arrow * http://xquartz.macosforge.org/trac/ticket/295 * http://developer.apple.com/legacy/mac/library/documentation/mac/Text/Text-579.html * * legacy Mac keycodes for arrow keys that shift-modify to math symbols */ const static unsigned short keycode_blacklist[] = { 66, 70, 72, 77 }; #endif /* Table mapping normal keysyms to their dead equivalents. FIXME: all the unicode keysyms (apart from circumflex) were guessed. */ const static struct { KeySym normal, dead; } dead_keys[] = { { XK_grave, XK_dead_grave }, { XK_apostrophe, XK_dead_acute }, /* US:"=" on a Czech keyboard */ { XK_acute, XK_dead_acute }, { UKEYSYM(0x384), XK_dead_acute }, /* US:";" on a Greek keyboard */ // {XK_Greek_accentdieresis, XK_dead_diaeresis}, /* US:"opt+;" on a Greek keyboard ... replace with dead_accentdieresis if there is one */ { XK_asciicircum, XK_dead_circumflex }, { UKEYSYM(0x2c6), XK_dead_circumflex }, /* MODIFIER LETTER CIRCUMFLEX ACCENT */ { XK_asciitilde, XK_dead_tilde }, { UKEYSYM(0x2dc), XK_dead_tilde }, /* SMALL TILDE */ { XK_macron, XK_dead_macron }, { XK_breve, XK_dead_breve }, { XK_abovedot, XK_dead_abovedot }, { XK_diaeresis, XK_dead_diaeresis }, { UKEYSYM(0x2da), XK_dead_abovering }, /* DOT ABOVE */ { XK_doubleacute, XK_dead_doubleacute }, { XK_caron, XK_dead_caron }, { XK_cedilla, XK_dead_cedilla }, { XK_ogonek, XK_dead_ogonek }, { UKEYSYM(0x269), XK_dead_iota }, /* LATIN SMALL LETTER IOTA */ { UKEYSYM(0x2ec), XK_dead_voiced_sound }, /* MODIFIER LETTER VOICING */ /* {XK_semivoiced_sound, XK_dead_semivoiced_sound}, */ { UKEYSYM(0x323), XK_dead_belowdot }, /* COMBINING DOT BELOW */ { UKEYSYM(0x309), XK_dead_hook }, /* COMBINING HOOK ABOVE */ { UKEYSYM(0x31b), XK_dead_horn }, /* COMBINING HORN */ }; typedef struct darwinKeyboardInfo_struct { CARD8 modMap[MAP_LENGTH]; KeySym keyMap[MAP_LENGTH * GLYPHS_PER_KEY]; unsigned char modifierKeycodes[32][2]; } darwinKeyboardInfo; darwinKeyboardInfo keyInfo; pthread_mutex_t keyInfo_mutex = PTHREAD_MUTEX_INITIALIZER; static void DarwinChangeKeyboardControl(DeviceIntPtr device, KeybdCtrl *ctrl) { // FIXME: to be implemented // keyclick, bell volume / pitch, autorepead, LED's } //----------------------------------------------------------------------------- // Utility functions to help parse Darwin keymap //----------------------------------------------------------------------------- /* * DarwinBuildModifierMaps * Use the keyMap field of keyboard info structure to populate * the modMap and modifierKeycodes fields. */ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { int i; KeySym *k; memset(info->modMap, NoSymbol, sizeof(info->modMap)); memset(info->modifierKeycodes, 0, sizeof(info->modifierKeycodes)); for (i = 0; i < NUM_KEYCODES; i++) { k = info->keyMap + i * GLYPHS_PER_KEY; switch (*k) { case XK_Shift_L: info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i; info->modMap[MIN_KEYCODE + i] = ShiftMask; break; case XK_Shift_R: #ifdef NX_MODIFIERKEY_RSHIFT info->modifierKeycodes[NX_MODIFIERKEY_RSHIFT][0] = i; #else info->modifierKeycodes[NX_MODIFIERKEY_SHIFT][0] = i; #endif info->modMap[MIN_KEYCODE + i] = ShiftMask; break; case XK_Control_L: info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][0] = i; info->modMap[MIN_KEYCODE + i] = ControlMask; break; case XK_Control_R: #ifdef NX_MODIFIERKEY_RCONTROL info->modifierKeycodes[NX_MODIFIERKEY_RCONTROL][0] = i; #else info->modifierKeycodes[NX_MODIFIERKEY_CONTROL][0] = i; #endif info->modMap[MIN_KEYCODE + i] = ControlMask; break; case XK_Caps_Lock: info->modifierKeycodes[NX_MODIFIERKEY_ALPHALOCK][0] = i; info->modMap[MIN_KEYCODE + i] = LockMask; break; case XK_Alt_L: info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; info->modMap[MIN_KEYCODE + i] = Mod1Mask; if (!XQuartzOptionSendsAlt) *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. break; case XK_Alt_R: #ifdef NX_MODIFIERKEY_RALTERNATE info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i; #else info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; #endif if (!XQuartzOptionSendsAlt) *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. info->modMap[MIN_KEYCODE + i] = Mod1Mask; break; case XK_Mode_switch: ErrorF( "DarwinBuildModifierMaps: XK_Mode_switch encountered, unable to determine side.\n"); info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; #ifdef NX_MODIFIERKEY_RALTERNATE info->modifierKeycodes[NX_MODIFIERKEY_RALTERNATE][0] = i; #endif info->modMap[MIN_KEYCODE + i] = Mod1Mask; break; case XK_Meta_L: info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][0] = i; info->modMap[MIN_KEYCODE + i] = Mod2Mask; break; case XK_Meta_R: #ifdef NX_MODIFIERKEY_RCOMMAND info->modifierKeycodes[NX_MODIFIERKEY_RCOMMAND][0] = i; #else info->modifierKeycodes[NX_MODIFIERKEY_COMMAND][0] = i; #endif info->modMap[MIN_KEYCODE + i] = Mod2Mask; break; case XK_Num_Lock: info->modMap[MIN_KEYCODE + i] = Mod3Mask; break; } } } /* * DarwinKeyboardInit * Get the Darwin keyboard map and compute an equivalent * X keyboard map and modifier map. Set the new keyboard * device structure. */ void DarwinKeyboardInit(DeviceIntPtr pDev) { // Open a shared connection to the HID System. // Note that the Event Status Driver is really just a wrapper // for a kIOHIDParamConnectType connection. assert(darwinParamConnect = NXOpenEventStatus()); InitKeyboardDeviceStruct(pDev, NULL, NULL, DarwinChangeKeyboardControl); DarwinKeyboardReloadHandler(); CopyKeyClass(pDev, inputInfo.keyboard); } /* Set the repeat rates based on global preferences and keycodes for modifiers. * Precondition: Has the keyInfo_mutex lock. */ static void DarwinKeyboardSetRepeat(DeviceIntPtr pDev, int initialKeyRepeatValue, int keyRepeatValue) { if (initialKeyRepeatValue == 300000) { // off /* Turn off repeats globally */ XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOff); } else { int i; XkbControlsPtr ctrl; XkbControlsRec old; /* Turn on repeats globally */ XkbSetRepeatKeys(pDev, -1, AutoRepeatModeOn); /* Setup the bit mask for individual key repeats */ ctrl = pDev->key->xkbInfo->desc->ctrls; old = *ctrl; ctrl->repeat_delay = initialKeyRepeatValue * 15; ctrl->repeat_interval = keyRepeatValue * 15; /* Turn off key-repeat for modifier keys, on for others */ /* First set them all on */ for (i = 0; i < XkbPerKeyBitArraySize; i++) ctrl->per_key_repeat[i] = -1; /* Now turn off the modifiers */ for (i = 0; i < 32; i++) { unsigned char keycode; keycode = keyInfo.modifierKeycodes[i][0]; if (keycode) ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE); keycode = keyInfo.modifierKeycodes[i][1]; if (keycode) ClearBit(ctrl->per_key_repeat, keycode + MIN_KEYCODE); } /* Hurray for data duplication */ if (pDev->kbdfeed) memcpy(pDev->kbdfeed->ctrl.autoRepeats, ctrl->per_key_repeat, XkbPerKeyBitArraySize); //ErrorF("per_key_repeat =\n"); //for(i=0; i < XkbPerKeyBitArraySize; i++) // ErrorF("%02x%s", ctrl->per_key_repeat[i], (i + 1) & 7 ? "" : "\n"); /* And now we notify the puppies about the changes */ XkbDDXChangeControls(pDev, &old, ctrl); } } void DarwinKeyboardReloadHandler(void) { KeySymsRec keySyms; CFIndex initialKeyRepeatValue, keyRepeatValue; BOOL ok; DeviceIntPtr pDev; const char *xmodmap = PROJECTROOT "/bin/xmodmap"; const char *sysmodmap = PROJECTROOT "/lib/X11/xinit/.Xmodmap"; const char *homedir = getenv("HOME"); char usermodmap[PATH_MAX], cmd[PATH_MAX]; DEBUG_LOG("DarwinKeyboardReloadHandler\n"); /* Get our key repeat settings from GlobalPreferences */ (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences")); initialKeyRepeatValue = CFPreferencesGetAppIntegerValue(CFSTR("InitialKeyRepeat"), CFSTR(".GlobalPreferences"), &ok); if (!ok) initialKeyRepeatValue = 35; keyRepeatValue = CFPreferencesGetAppIntegerValue(CFSTR( "KeyRepeat"), CFSTR( ".GlobalPreferences"), &ok); if (!ok) keyRepeatValue = 6; pthread_mutex_lock(&keyInfo_mutex); { /* Initialize our keySyms */ keySyms.map = keyInfo.keyMap; keySyms.mapWidth = GLYPHS_PER_KEY; keySyms.minKeyCode = MIN_KEYCODE; keySyms.maxKeyCode = MAX_KEYCODE; // TODO: We should build the entire XkbDescRec and use XkbCopyKeymap /* Apply the mappings to darwinKeyboard */ XkbApplyMappingChange(darwinKeyboard, &keySyms, keySyms.minKeyCode, keySyms.maxKeyCode - keySyms.minKeyCode + 1, keyInfo.modMap, serverClient); DarwinKeyboardSetRepeat(darwinKeyboard, initialKeyRepeatValue, keyRepeatValue); /* Apply the mappings to the core keyboard */ for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { XkbApplyMappingChange( pDev, &keySyms, keySyms.minKeyCode, keySyms.maxKeyCode - keySyms.minKeyCode + 1, keyInfo.modMap, serverClient); DarwinKeyboardSetRepeat(pDev, initialKeyRepeatValue, keyRepeatValue); } } } pthread_mutex_unlock(&keyInfo_mutex); /* Modify with xmodmap */ if (access(xmodmap, F_OK) == 0) { /* Check for system .Xmodmap */ if (access(sysmodmap, F_OK) == 0) { if (snprintf(cmd, sizeof(cmd), "%s %s", xmodmap, sysmodmap) < sizeof(cmd)) { X11ApplicationLaunchClient(cmd); } else { ErrorF( "X11.app: Unable to create / execute xmodmap command line"); } } /* Check for user's local .Xmodmap */ if ((homedir != NULL) && (snprintf(usermodmap, sizeof(usermodmap), "%s/.Xmodmap", homedir) < sizeof(usermodmap))) { if (access(usermodmap, F_OK) == 0) { if (snprintf(cmd, sizeof(cmd), "%s %s", xmodmap, usermodmap) < sizeof(cmd)) { X11ApplicationLaunchClient(cmd); } else { ErrorF( "X11.app: Unable to create / execute xmodmap command line"); } } } else { ErrorF("X11.app: Unable to determine path to user's .Xmodmap"); } } } //----------------------------------------------------------------------------- // Modifier translation functions // // There are three different ways to specify a Mac modifier key: // keycode - specifies hardware key, read from keymapping // key - NX_MODIFIERKEY_*, really an index // mask - NX_*MASK, mask for modifier flags in event record // Left and right side have different keycodes but the same key and mask. //----------------------------------------------------------------------------- /* * DarwinModifierNXKeyToNXKeycode * Return the keycode for an NX_MODIFIERKEY_* modifier. * side = 0 for left or 1 for right. * Returns 0 if key+side is not a known modifier. */ int DarwinModifierNXKeyToNXKeycode(int key, int side) { int retval; pthread_mutex_lock(&keyInfo_mutex); retval = keyInfo.modifierKeycodes[key][side]; pthread_mutex_unlock(&keyInfo_mutex); return retval; } /* * DarwinModifierNXKeycodeToNXKey * Returns -1 if keycode+side is not a modifier key * outSide may be NULL, else it gets 0 for left and 1 for right. */ int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide) { int key, side; keycode += MIN_KEYCODE; // search modifierKeycodes for this keycode+side pthread_mutex_lock(&keyInfo_mutex); for (key = 0; key < NX_NUMMODIFIERS; key++) { for (side = 0; side <= 1; side++) { if (keyInfo.modifierKeycodes[key][side] == keycode) break; } } pthread_mutex_unlock(&keyInfo_mutex); if (key == NX_NUMMODIFIERS) { return -1; } if (outSide) *outSide = side; return key; } /* * DarwinModifierNXMaskToNXKey * Returns -1 if mask is not a known modifier mask. */ int DarwinModifierNXMaskToNXKey(int mask) { switch (mask) { case NX_ALPHASHIFTMASK: return NX_MODIFIERKEY_ALPHALOCK; case NX_SHIFTMASK: return NX_MODIFIERKEY_SHIFT; #ifdef NX_DEVICELSHIFTKEYMASK case NX_DEVICELSHIFTKEYMASK: return NX_MODIFIERKEY_SHIFT; case NX_DEVICERSHIFTKEYMASK: return NX_MODIFIERKEY_RSHIFT; #endif case NX_CONTROLMASK: return NX_MODIFIERKEY_CONTROL; #ifdef NX_DEVICELCTLKEYMASK case NX_DEVICELCTLKEYMASK: return NX_MODIFIERKEY_CONTROL; case NX_DEVICERCTLKEYMASK: return NX_MODIFIERKEY_RCONTROL; #endif case NX_ALTERNATEMASK: return NX_MODIFIERKEY_ALTERNATE; #ifdef NX_DEVICELALTKEYMASK case NX_DEVICELALTKEYMASK: return NX_MODIFIERKEY_ALTERNATE; case NX_DEVICERALTKEYMASK: return NX_MODIFIERKEY_RALTERNATE; #endif case NX_COMMANDMASK: return NX_MODIFIERKEY_COMMAND; #ifdef NX_DEVICELCMDKEYMASK case NX_DEVICELCMDKEYMASK: return NX_MODIFIERKEY_COMMAND; case NX_DEVICERCMDKEYMASK: return NX_MODIFIERKEY_RCOMMAND; #endif case NX_NUMERICPADMASK: return NX_MODIFIERKEY_NUMERICPAD; case NX_HELPMASK: return NX_MODIFIERKEY_HELP; case NX_SECONDARYFNMASK: return NX_MODIFIERKEY_SECONDARYFN; } return -1; } /* * DarwinModifierNXKeyToNXMask * Returns 0 if key is not a known modifier key. */ int DarwinModifierNXKeyToNXMask(int key) { switch (key) { case NX_MODIFIERKEY_ALPHALOCK: return NX_ALPHASHIFTMASK; #ifdef NX_DEVICELSHIFTKEYMASK case NX_MODIFIERKEY_SHIFT: return NX_DEVICELSHIFTKEYMASK; case NX_MODIFIERKEY_RSHIFT: return NX_DEVICERSHIFTKEYMASK; case NX_MODIFIERKEY_CONTROL: return NX_DEVICELCTLKEYMASK; case NX_MODIFIERKEY_RCONTROL: return NX_DEVICERCTLKEYMASK; case NX_MODIFIERKEY_ALTERNATE: return NX_DEVICELALTKEYMASK; case NX_MODIFIERKEY_RALTERNATE: return NX_DEVICERALTKEYMASK; case NX_MODIFIERKEY_COMMAND: return NX_DEVICELCMDKEYMASK; case NX_MODIFIERKEY_RCOMMAND: return NX_DEVICERCMDKEYMASK; #else case NX_MODIFIERKEY_SHIFT: return NX_SHIFTMASK; case NX_MODIFIERKEY_CONTROL: return NX_CONTROLMASK; case NX_MODIFIERKEY_ALTERNATE: return NX_ALTERNATEMASK; case NX_MODIFIERKEY_COMMAND: return NX_COMMANDMASK; #endif case NX_MODIFIERKEY_NUMERICPAD: return NX_NUMERICPADMASK; case NX_MODIFIERKEY_HELP: return NX_HELPMASK; case NX_MODIFIERKEY_SECONDARYFN: return NX_SECONDARYFNMASK; } return 0; } /* * DarwinModifierStringToNXMask * Returns 0 if string is not a known modifier. */ int DarwinModifierStringToNXMask(const char *str, int separatelr) { #ifdef NX_DEVICELSHIFTKEYMASK if (separatelr) { if (!strcasecmp(str, "shift")) return NX_DEVICELSHIFTKEYMASK | NX_DEVICERSHIFTKEYMASK; if (!strcasecmp(str, "control")) return NX_DEVICELCTLKEYMASK | NX_DEVICERCTLKEYMASK; if (!strcasecmp(str, "option")) return NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK; if (!strcasecmp(str, "alt")) return NX_DEVICELALTKEYMASK | NX_DEVICERALTKEYMASK; if (!strcasecmp(str, "command")) return NX_DEVICELCMDKEYMASK | NX_DEVICERCMDKEYMASK; if (!strcasecmp(str, "lshift")) return NX_DEVICELSHIFTKEYMASK; if (!strcasecmp(str, "rshift")) return NX_DEVICERSHIFTKEYMASK; if (!strcasecmp(str, "lcontrol")) return NX_DEVICELCTLKEYMASK; if (!strcasecmp(str, "rcontrol")) return NX_DEVICERCTLKEYMASK; if (!strcasecmp(str, "loption")) return NX_DEVICELALTKEYMASK; if (!strcasecmp(str, "roption")) return NX_DEVICERALTKEYMASK; if (!strcasecmp(str, "lalt")) return NX_DEVICELALTKEYMASK; if (!strcasecmp(str, "ralt")) return NX_DEVICERALTKEYMASK; if (!strcasecmp(str, "lcommand")) return NX_DEVICELCMDKEYMASK; if (!strcasecmp(str, "rcommand")) return NX_DEVICERCMDKEYMASK; } else { #endif if (!strcasecmp(str, "shift")) return NX_SHIFTMASK; if (!strcasecmp(str, "control")) return NX_CONTROLMASK; if (!strcasecmp(str, "option")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "alt")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "command")) return NX_COMMANDMASK; if (!strcasecmp(str, "lshift")) return NX_SHIFTMASK; if (!strcasecmp(str, "rshift")) return NX_SHIFTMASK; if (!strcasecmp(str, "lcontrol")) return NX_CONTROLMASK; if (!strcasecmp(str, "rcontrol")) return NX_CONTROLMASK; if (!strcasecmp(str, "loption")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "roption")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "lalt")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "ralt")) return NX_ALTERNATEMASK; if (!strcasecmp(str, "lcommand")) return NX_COMMANDMASK; if (!strcasecmp(str, "rcommand")) return NX_COMMANDMASK; #ifdef NX_DEVICELSHIFTKEYMASK } #endif if (!strcasecmp(str, "lock")) return NX_ALPHASHIFTMASK; if (!strcasecmp(str, "fn")) return NX_SECONDARYFNMASK; if (!strcasecmp(str, "help")) return NX_HELPMASK; if (!strcasecmp(str, "numlock")) return NX_NUMERICPADMASK; return 0; } static KeySym make_dead_key(KeySym in) { int i; for (i = 0; i < ARRAY_SIZE(dead_keys); i++) if (dead_keys[i].normal == in) return dead_keys[i].dead; return in; } static Bool QuartzReadSystemKeymap(darwinKeyboardInfo *info) { __block const void *chr_data = NULL; int num_keycodes = NUM_KEYCODES; __block UInt32 keyboard_type; int i, j; OSStatus err; KeySym *k; dispatch_block_t getKeyboardData = ^{ keyboard_type = LMGetKbdType(); TISInputSourceRef currentKeyLayoutRef = TISCopyCurrentKeyboardLayoutInputSource(); if (currentKeyLayoutRef) { CFDataRef currentKeyLayoutDataRef = (CFDataRef)TISGetInputSourceProperty(currentKeyLayoutRef, kTISPropertyUnicodeKeyLayoutData); if (currentKeyLayoutDataRef) chr_data = CFDataGetBytePtr(currentKeyLayoutDataRef); CFRelease(currentKeyLayoutRef); } }; /* This is an ugly ant-pattern, but it is more expedient to address the problem right now. */ if (pthread_main_np()) { getKeyboardData(); } else { dispatch_sync(dispatch_get_main_queue(), getKeyboardData); } if (chr_data == NULL) { ErrorF("Couldn't get uchr or kchr resource\n"); return FALSE; } /* Scan the keycode range for the Unicode character that each key produces in the four shift states. Then convert that to an X11 keysym (which may just the bit that says "this is Unicode" if it can't find the real symbol.) */ /* KeyTranslate is not available on 64-bit platforms; UCKeyTranslate must be used instead. */ for (i = 0; i < num_keycodes; i++) { static const int mods[4] = { 0, MOD_SHIFT, MOD_OPTION, MOD_OPTION | MOD_SHIFT }; k = info->keyMap + i * GLYPHS_PER_KEY; for (j = 0; j < 4; j++) { UniChar s[8]; UniCharCount len; UInt32 dead_key_state = 0, extra_dead = 0; err = UCKeyTranslate(chr_data, i, kUCKeyActionDown, mods[j] >> 8, keyboard_type, 0, &dead_key_state, 8, &len, s); if (err != noErr) continue; if (len == 0 && dead_key_state != 0) { /* Found a dead key. Work out which one it is, but remembering that it's dead. */ err = UCKeyTranslate(chr_data, i, kUCKeyActionDown, mods[j] >> 8, keyboard_type, kUCKeyTranslateNoDeadKeysMask, &extra_dead, 8, &len, s); if (err != noErr) continue; } /* Not sure why 0x0010 is there. * 0x0000 - 'Unicode Hex Input' ... */ if (len > 0 && s[0] != 0x0010 && s[0] != 0x0000) { k[j] = ucs2keysym(s[0]); if (dead_key_state != 0) k[j] = make_dead_key(k[j]); } } if (k[3] == k[2]) k[3] = NoSymbol; if (k[1] == k[0]) k[1] = NoSymbol; if (k[0] == k[2] && k[1] == k[3]) k[2] = k[3] = NoSymbol; if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] = NoSymbol; } #if HACK_MISSING /* Fix up some things that are normally missing.. */ for (i = 0; i < ARRAY_SIZE(known_keys); i++) { k = info->keyMap + known_keys[i].keycode * GLYPHS_PER_KEY; if (k[0] == NoSymbol && k[1] == NoSymbol && k[2] == NoSymbol && k[3] == NoSymbol) k[0] = known_keys[i].keysym; } #endif #if HACK_KEYPAD /* And some more things. We find the right symbols for the numeric keypad, but not the KP_ keysyms. So try to convert known keycodes. */ for (i = 0; i < ARRAY_SIZE(known_numeric_keys); i++) { k = info->keyMap + known_numeric_keys[i].keycode * GLYPHS_PER_KEY; if (k[0] == known_numeric_keys[i].normal) k[0] = known_numeric_keys[i].keypad; } #endif #if HACK_BLACKLIST for (i = 0; i < ARRAY_SIZE(keycode_blacklist); i++) { k = info->keyMap + keycode_blacklist[i] * GLYPHS_PER_KEY; k[0] = k[1] = k[2] = k[3] = NoSymbol; } #endif DarwinBuildModifierMaps(info); return TRUE; } Bool QuartsResyncKeymap(Bool sendDDXEvent) { Bool retval; /* Update keyInfo */ pthread_mutex_lock(&keyInfo_mutex); memset(keyInfo.keyMap, 0, sizeof(keyInfo.keyMap)); retval = QuartzReadSystemKeymap(&keyInfo); pthread_mutex_unlock(&keyInfo_mutex); /* Tell server thread to deal with new keyInfo */ if (sendDDXEvent) DarwinSendDDXEvent(kXquartzReloadKeymap, 0); return retval; } xorg-server-21.1.16/hw/xquartz/quartzStartup.c0000644000175000017500000000760514757411105015054 /************************************************************** * * Startup code for the Quartz Darwin X Server * Copyright (c) 2008-2012 Apple Inc. All rights reserved. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "X11Controller.h" #include "darwin.h" #include "darwinEvents.h" #include "quartz.h" #include "opaque.h" #include "micmap.h" #include #include int dix_main(int argc, char **argv, char **envp); struct arg { int argc; char **argv; char **envp; }; _X_NORETURN static void server_thread(void *arg) { struct arg args = *((struct arg *)arg); free(arg); exit(dix_main(args.argc, args.argv, args.envp)); } static pthread_t create_thread(void *func, void *arg) { pthread_attr_t attr; pthread_t tid; pthread_attr_init(&attr); pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); pthread_create(&tid, &attr, func, arg); pthread_attr_destroy(&attr); return tid; } void QuartzInitServer(int argc, char **argv, char **envp) { struct arg *args = (struct arg *)malloc(sizeof(struct arg)); if (!args) FatalError("Could not allocate memory.\n"); args->argc = argc; args->argv = argv; args->envp = envp; if (!create_thread(server_thread, args)) { FatalError("can't create secondary thread\n"); } /* Block signals on the AppKit thread that the X11 expects to handle on its thread */ sigset_t set; sigemptyset(&set); sigaddset(&set, SIGALRM); #ifdef BUSFAULT sigaddset(&set, SIGBUS); #endif pthread_sigmask(SIG_BLOCK, &set, NULL); } int server_main(int argc, char **argv, char **envp) { int i; int fd[2]; /* Unset CFProcessPath, so our children don't inherit this kludge we need * to load our nib. If an xterm gets this set, then it fails to * 'open hi.txt' properly. */ unsetenv("CFProcessPath"); // Make a pipe to pass events assert(pipe(fd) == 0); darwinEventReadFD = fd[0]; darwinEventWriteFD = fd[1]; fcntl(darwinEventReadFD, F_SETFL, O_NONBLOCK); for (i = 1; i < argc; i++) { // Display version info without starting Mac OS X UI if requested if (!strcmp(argv[i], "-showconfig") || !strcmp(argv[i], "-version")) { DarwinPrintBanner(); exit(0); } } X11ControllerMain(argc, argv, envp); exit(0); } xorg-server-21.1.16/hw/xquartz/quartzRandR.c0000644000175000017500000003761614757411105014425 /* * Quartz-specific support for the XRandR extension * * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons, * 2010 Jan Hauffa. * 2010-2012 Apple Inc. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #include "sanitizedCarbon.h" #ifdef HAVE_DIX_CONFIG_H #include #endif #include "quartzRandR.h" #include "quartz.h" #include "darwin.h" #include "X11Application.h" #include #include #include /* TODO: UGLY, find a better way! * We want to ignore kXquartzDisplayChanged which are generated by us */ static Bool ignore_next_fake_mode_update = FALSE; #define FAKE_REFRESH_ROOTLESS 1 #define FAKE_REFRESH_FULLSCREEN 2 #define DEFAULT_REFRESH 60 #define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag) #define CALLBACK_SUCCESS 0 #define CALLBACK_CONTINUE 1 #define CALLBACK_ERROR -1 typedef int (*QuartzModeCallback) (ScreenPtr, QuartzModeInfoPtr, void *); static void QuartzRandRGetModeInfo(CGDisplayModeRef modeRef, QuartzModeInfoPtr pMode) { pMode->width = CGDisplayModeGetWidth(modeRef); pMode->height = CGDisplayModeGetHeight(modeRef); pMode->refresh = (int)(CGDisplayModeGetRefreshRate(modeRef) + 0.5); if (pMode->refresh == 0) pMode->refresh = DEFAULT_REFRESH; pMode->ref = NULL; pMode->pSize = NULL; } static Bool QuartzRandRCopyCurrentModeInfo(CGDirectDisplayID screenId, QuartzModeInfoPtr pMode) { CGDisplayModeRef curModeRef = CGDisplayCopyDisplayMode(screenId); if (!curModeRef) return FALSE; QuartzRandRGetModeInfo(curModeRef, pMode); pMode->ref = curModeRef; return TRUE; } static Bool QuartzRandRSetCGMode(CGDirectDisplayID screenId, QuartzModeInfoPtr pMode) { CGDisplayModeRef modeRef = (CGDisplayModeRef)pMode->ref; if (!modeRef) return FALSE; return (CGDisplaySetDisplayMode(screenId, modeRef, NULL) == kCGErrorSuccess); } static Bool QuartzRandREnumerateModes(ScreenPtr pScreen, QuartzModeCallback callback, void *data) { Bool retval = FALSE; QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); /* Just an 800x600 fallback if we have no attached heads */ if (pQuartzScreen->displayIDs) { CGDisplayModeRef curModeRef, modeRef; CFStringRef curPixelEnc, pixelEnc; CFComparisonResult pixelEncEqual; CFArrayRef modes; QuartzModeInfo modeInfo; int i; CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0]; curModeRef = CGDisplayCopyDisplayMode(screenId); if (!curModeRef) return FALSE; curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef); CGDisplayModeRelease(curModeRef); modes = CGDisplayCopyAllDisplayModes(screenId, NULL); if (!modes) { CFRelease(curPixelEnc); return FALSE; } for (i = 0; i < CFArrayGetCount(modes); i++) { int cb; modeRef = (CGDisplayModeRef)CFArrayGetValueAtIndex(modes, i); /* Skip modes that are not usable on the current display or have a different pixel encoding than the current mode. */ if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) != kDisplayModeUsableFlags) continue; pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef); pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0); CFRelease(pixelEnc); if (pixelEncEqual != kCFCompareEqualTo) continue; QuartzRandRGetModeInfo(modeRef, &modeInfo); modeInfo.ref = modeRef; cb = callback(pScreen, &modeInfo, data); if (cb == CALLBACK_CONTINUE) { retval = TRUE; } else if (cb == CALLBACK_SUCCESS) { CFRelease(modes); CFRelease(curPixelEnc); return TRUE; } else if (cb == CALLBACK_ERROR) { CFRelease(modes); CFRelease(curPixelEnc); return FALSE; } } CFRelease(modes); CFRelease(curPixelEnc); } switch (callback(pScreen, &pQuartzScreen->rootlessMode, data)) { case CALLBACK_SUCCESS: return TRUE; case CALLBACK_ERROR: return FALSE; case CALLBACK_CONTINUE: retval = TRUE; default: break; } switch (callback(pScreen, &pQuartzScreen->fullscreenMode, data)) { case CALLBACK_SUCCESS: return TRUE; case CALLBACK_ERROR: return FALSE; case CALLBACK_CONTINUE: retval = TRUE; default: break; } return retval; } static Bool QuartzRandRModesEqual(QuartzModeInfoPtr pMode1, QuartzModeInfoPtr pMode2) { return (pMode1->width == pMode2->width) && (pMode1->height == pMode2->height) && (pMode1->refresh == pMode2->refresh); } static Bool QuartzRandRRegisterMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); Bool isCurrentMode = QuartzRandRModesEqual(&pQuartzScreen->currentMode, pMode); /* TODO: DPI */ pMode->pSize = RRRegisterSize(pScreen, pMode->width, pMode->height, pScreen->mmWidth, pScreen->mmHeight); if (pMode->pSize) { //DEBUG_LOG("registering: %d x %d @ %d %s\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh, isCurrentMode ? "*" : ""); RRRegisterRate(pScreen, pMode->pSize, pMode->refresh); if (isCurrentMode) RRSetCurrentConfig(pScreen, RR_Rotate_0, pMode->refresh, pMode->pSize); return TRUE; } return FALSE; } static int QuartzRandRRegisterModeCallback(ScreenPtr pScreen, QuartzModeInfoPtr pMode, void *data __unused) { if (QuartzRandRRegisterMode(pScreen, pMode)) { return CALLBACK_CONTINUE; } else { return CALLBACK_ERROR; } } static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL doRegister) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); Bool captureDisplay = (pMode->refresh != FAKE_REFRESH_FULLSCREEN && pMode->refresh != FAKE_REFRESH_ROOTLESS); CGDirectDisplayID screenId; if (pQuartzScreen->displayIDs == NULL) return FALSE; screenId = pQuartzScreen->displayIDs[0]; if (XQuartzShieldingWindowLevel == 0 && captureDisplay) { if (!X11ApplicationCanEnterRandR()) return FALSE; CGCaptureAllDisplays(); XQuartzShieldingWindowLevel = CGShieldingWindowLevel(); // 2147483630 DEBUG_LOG("Display captured. ShieldWindowID: %u, Shield level: %d\n", CGShieldingWindowID(screenId), XQuartzShieldingWindowLevel); } if (pQuartzScreen->currentMode.ref && CFEqual(pMode->ref, pQuartzScreen->currentMode.ref)) { DEBUG_LOG("Requested RandR resolution matches current CG mode\n"); } if (QuartzRandRSetCGMode(screenId, pMode)) { ignore_next_fake_mode_update = TRUE; } else { DEBUG_LOG("Error while requesting CG resolution change.\n"); return FALSE; } /* If the client requested the fake rootless mode, switch to rootless. * Otherwise, force fullscreen mode. */ QuartzSetRootless(pMode->refresh == FAKE_REFRESH_ROOTLESS); if (pMode->refresh != FAKE_REFRESH_ROOTLESS) { QuartzShowFullscreen(TRUE); } if (pQuartzScreen->currentMode.ref) CFRelease(pQuartzScreen->currentMode.ref); pQuartzScreen->currentMode = *pMode; if (pQuartzScreen->currentMode.ref) CFRetain(pQuartzScreen->currentMode.ref); if (XQuartzShieldingWindowLevel != 0 && !captureDisplay) { CGReleaseAllDisplays(); XQuartzShieldingWindowLevel = 0; } return TRUE; } static int QuartzRandRSetModeCallback(ScreenPtr pScreen, QuartzModeInfoPtr pMode, void *data) { QuartzModeInfoPtr pReqMode = (QuartzModeInfoPtr)data; if (!QuartzRandRModesEqual(pMode, pReqMode)) return CALLBACK_CONTINUE; /* continue enumeration */ DEBUG_LOG("Found a match for requested RandR resolution (%dx%d@%d).\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh); if (QuartzRandRSetMode(pScreen, pMode, FALSE)) return CALLBACK_SUCCESS; else return CALLBACK_ERROR; } static Bool QuartzRandRGetInfo(ScreenPtr pScreen, Rotation *rotations) { *rotations = RR_Rotate_0; /* TODO: support rotation */ return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL); } static Bool QuartzRandRSetConfig(ScreenPtr pScreen, Rotation randr, int rate, RRScreenSizePtr pSize) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); QuartzModeInfo reqMode; reqMode.width = pSize->width; reqMode.height = pSize->height; reqMode.refresh = rate; /* Do not switch modes if requested mode is equal to current mode. */ if (QuartzRandRModesEqual(&reqMode, &pQuartzScreen->currentMode)) return TRUE; if (QuartzRandREnumerateModes(pScreen, QuartzRandRSetModeCallback, &reqMode)) { return TRUE; } DEBUG_LOG("Unable to find a matching config: %d x %d @ %d\n", (int)reqMode.width, (int)reqMode.height, (int)reqMode.refresh); return FALSE; } static Bool _QuartzRandRUpdateFakeModes(ScreenPtr pScreen) { QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); QuartzModeInfo activeMode; if (pQuartzScreen->displayCount > 0) { if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], &activeMode)) { ErrorF("Unable to determine current display mode.\n"); return FALSE; } } else { memset(&activeMode, 0, sizeof(activeMode)); activeMode.width = 800; activeMode.height = 600; activeMode.refresh = 60; } if (pQuartzScreen->fullscreenMode.ref) CFRelease(pQuartzScreen->fullscreenMode.ref); if (pQuartzScreen->currentMode.ref) CFRelease(pQuartzScreen->currentMode.ref); if (pQuartzScreen->displayCount > 1) { activeMode.width = pScreen->width; activeMode.height = pScreen->height; if (XQuartzIsRootless) activeMode.height += aquaMenuBarHeight; } pQuartzScreen->fullscreenMode = activeMode; pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN; pQuartzScreen->rootlessMode = activeMode; pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS; pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight; if (XQuartzIsRootless) { pQuartzScreen->currentMode = pQuartzScreen->rootlessMode; } else { pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode; } /* This extra retain is for currentMode's copy. * fullscreen and rootless share a retain. */ if (pQuartzScreen->currentMode.ref) CFRetain(pQuartzScreen->currentMode.ref); DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height); DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height); DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height); return TRUE; } Bool QuartzRandRUpdateFakeModes(BOOL force_update) { ScreenPtr pScreen = screenInfo.screens[0]; if (ignore_next_fake_mode_update) { DEBUG_LOG( "Ignoring update request caused by RandR resolution change.\n"); ignore_next_fake_mode_update = FALSE; return TRUE; } if (!_QuartzRandRUpdateFakeModes(pScreen)) return FALSE; if (force_update) RRGetInfo(pScreen, TRUE); return TRUE; } Bool QuartzRandRInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; if (!RRScreenInit(pScreen)) return FALSE; if (!_QuartzRandRUpdateFakeModes(pScreen)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); pScrPriv->rrGetInfo = QuartzRandRGetInfo; pScrPriv->rrSetConfig = QuartzRandRSetConfig; return TRUE; } void QuartzRandRSetFakeRootless(void) { int i; DEBUG_LOG("QuartzRandRSetFakeRootless called.\n"); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); QuartzRandRSetMode(pScreen, &pQuartzScreen->rootlessMode, TRUE); } } void QuartzRandRSetFakeFullscreen(BOOL state) { int i; DEBUG_LOG("QuartzRandRSetFakeFullscreen called.\n"); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); QuartzRandRSetMode(pScreen, &pQuartzScreen->fullscreenMode, TRUE); } QuartzShowFullscreen(state); } /* Toggle fullscreen mode. If "fake" fullscreen is the current mode, * this will just show/hide the X11 windows. If we are in a RandR fullscreen * mode, this will toggles us to the default fake mode and hide windows if * it is fullscreen */ void QuartzRandRToggleFullscreen(void) { ScreenPtr pScreen = screenInfo.screens[0]; QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); if (pQuartzScreen->currentMode.ref == NULL) { ErrorF( "Ignoring QuartzRandRToggleFullscreen because don't have a current mode set.\n"); } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_ROOTLESS) { ErrorF( "Ignoring QuartzRandRToggleFullscreen because we are in rootless mode.\n"); } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_FULLSCREEN) { /* Legacy fullscreen mode. Hide/Show */ QuartzShowFullscreen(!XQuartzFullscreenVisible); } else { /* RandR fullscreen mode. Return to default mode and hide if it is fullscreen. */ if (XQuartzRootlessDefault) { QuartzRandRSetFakeRootless(); } else { QuartzRandRSetFakeFullscreen(FALSE); } } } xorg-server-21.1.16/hw/xquartz/NSUserDefaults+XQuartzDefaults.h0000644000175000017500000000367114757411105020120 // // NSUserDefaults+XQuartzDefaults.h // XQuartz // // Created by Jeremy Huddleston Sequoia on 2021.02.19. // Copyright (c) 2021 Apple Inc. All rights reserved. // #import extern NSString * const XQuartzPrefKeyAppsMenu; extern NSString * const XQuartzPrefKeyFakeButtons; extern NSString * const XQuartzPrefKeyFakeButton2; extern NSString * const XQuartzPrefKeyFakeButton3; extern NSString * const XQuartzPrefKeyKeyEquivs; extern NSString * const XQuartzPrefKeyFullscreenHotkeys; extern NSString * const XQuartzPrefKeyFullscreenMenu; extern NSString * const XQuartzPrefKeySyncKeymap; extern NSString * const XQuartzPrefKeyDepth; extern NSString * const XQuartzPrefKeyNoAuth; extern NSString * const XQuartzPrefKeyNoTCP; extern NSString * const XQuartzPrefKeyDoneXinitCheck; extern NSString * const XQuartzPrefKeyNoQuitAlert; extern NSString * const XQuartzPrefKeyNoRANDRAlert; extern NSString * const XQuartzPrefKeyOptionSendsAlt; extern NSString * const XQuartzPrefKeyAppKitModifiers; extern NSString * const XQuartzPrefKeyWindowItemModifiers; extern NSString * const XQuartzPrefKeyRootless; extern NSString * const XQuartzPrefKeyRENDERExtension; extern NSString * const XQuartzPrefKeyTESTExtension; extern NSString * const XQuartzPrefKeyLoginShell; extern NSString * const XQuartzPrefKeyClickThrough; extern NSString * const XQuartzPrefKeyFocusFollowsMouse; extern NSString * const XQuartzPrefKeyFocusOnNewWindow; extern NSString * const XQuartzPrefKeyScrollInDeviceDirection; extern NSString * const XQuartzPrefKeySyncPasteboard; extern NSString * const XQuartzPrefKeySyncPasteboardToClipboard; extern NSString * const XQuartzPrefKeySyncPasteboardToPrimary; extern NSString * const XQuartzPrefKeySyncClipboardToPasteBoard; extern NSString * const XQuartzPrefKeySyncPrimaryOnSelect; @interface NSUserDefaults (XQuartzDefaults) + (NSUserDefaults *)globalDefaults; + (NSUserDefaults *)dockDefaults; + (NSUserDefaults *)xquartzDefaults; @end xorg-server-21.1.16/hw/xquartz/X11Application.h0000644000175000017500000000450514757411105014701 /* X11Application.h -- subclass of NSApplication to multiplex events * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X11APPLICATION_H #define X11APPLICATION_H 1 #include #if __OBJC__ #import "X11Controller.h" @interface X11Application : NSApplication @property (nonatomic, readwrite, strong) X11Controller *controller; @property (nonatomic, readonly, assign) OSX_BOOL x_active; @end extern X11Application * X11App; #endif /* __OBJC__ */ void X11ApplicationSetWindowMenu(int nitems, const char **items, const char *shortcuts); void X11ApplicationSetWindowMenuCheck(int idx); void X11ApplicationSetFrontProcess(void); void X11ApplicationSetCanQuit(int state); void X11ApplicationServerReady(void); void X11ApplicationShowHideMenubar(int state); void X11ApplicationLaunchClient(const char *cmd); Bool X11ApplicationCanEnterRandR(void); void X11ApplicationMain(int argc, char **argv, char **envp); extern Bool XQuartzScrollInDeviceDirection; #endif /* X11APPLICATION_H */ xorg-server-21.1.16/hw/xquartz/X11Controller.h0000644000175000017500000001234114757411105014556 /* X11Controller.h -- connect the IB ui * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef X11CONTROLLER_H #define X11CONTROLLER_H 1 #ifdef HAVE_DIX_CONFIG_H #include #endif #if __OBJC__ #include "sanitizedCocoa.h" #include "xpr/x-list.h" #ifdef XQUARTZ_SPARKLE #define BOOL OSX_BOOL #include #undef BOOL #endif @interface X11Controller : NSObject @property (nonatomic, readwrite, strong) IBOutlet NSPanel *prefs_panel; @property (nonatomic, readwrite, strong) IBOutlet NSButton *fake_buttons; @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen; @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_fullscreen_menu; @property (nonatomic, readwrite, strong) IBOutlet NSTextField *enable_fullscreen_menu_text; @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_keyequivs; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_keymap; @property (nonatomic, readwrite, strong) IBOutlet NSButton *option_sends_alt; @property (nonatomic, readwrite, strong) IBOutlet NSButton *scroll_in_device_direction; @property (nonatomic, readwrite, strong) IBOutlet NSButton *click_through; @property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_follows_mouse; @property (nonatomic, readwrite, strong) IBOutlet NSButton *focus_on_new_window; @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_auth; @property (nonatomic, readwrite, strong) IBOutlet NSButton *enable_tcp; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_clipboard; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_pasteboard_to_primary; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_clipboard_to_pasteboard; @property (nonatomic, readwrite, strong) IBOutlet NSButton *sync_primary_immediately; @property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text1; @property (nonatomic, readwrite, strong) IBOutlet NSTextField *sync_text2; @property (nonatomic, readwrite, strong) IBOutlet NSPopUpButton *depth; @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *x11_about_item; @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *dock_window_separator; @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *apps_separator; @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *toggle_fullscreen_item; @property (nonatomic, readwrite, strong) IBOutlet NSMenuItem *copy_menu_item; @property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_apps_menu; @property (nonatomic, readwrite, strong) IBOutlet NSTableView *apps_table; @property (nonatomic, readwrite, strong) IBOutlet NSMenu *dock_menu; @property (nonatomic, readwrite, assign) OSX_BOOL can_quit; - (void)set_window_menu:(NSArray *)list; - (void)set_window_menu_check:(NSNumber *)n; - (void)set_apps_menu:(NSArray *)list; #ifdef XQUARTZ_SPARKLE - (void)setup_sparkle; - (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *) update; #endif - (void)server_ready; - (OSX_BOOL)application:(NSApplication *)app openFile:(NSString *)filename; - (IBAction)apps_table_show:(id)sender; - (IBAction)apps_table_done:(id)sender; - (IBAction)apps_table_new:(id)sender; - (IBAction)apps_table_duplicate:(id)sender; - (IBAction)apps_table_delete:(id)sender; - (IBAction)bring_to_front:(id)sender; - (IBAction)close_window:(id)sender; - (IBAction)minimize_window:(id)sender; - (IBAction)zoom_window:(id)sender; - (IBAction)next_window:(id)sender; - (IBAction)previous_window:(id)sender; - (IBAction)enable_fullscreen_changed:(id)sender; - (IBAction)toggle_fullscreen:(id)sender; - (IBAction)prefs_changed:(id)sender; - (IBAction)prefs_show:(id)sender; - (IBAction)quit:(id)sender; - (IBAction)x11_help:(id)sender; @end #endif /* __OBJC__ */ void X11ControllerMain(int argc, char **argv, char **envp); #endif /* X11CONTROLLER_H */ xorg-server-21.1.16/hw/xquartz/applewmExt.h0000644000175000017500000000636314757411105014276 /* External interface for the server's AppleWM support * * Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * * 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, * and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT * HOLDER(S) 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(s) of the above * copyright holders shall not be used in advertising or otherwise to * promote the sale, use or other dealings in this Software without * prior written authorization. */ #ifndef _APPLEWMEXT_H_ #define _APPLEWMEXT_H_ #include "window.h" #include typedef int (*DisableUpdateProc)(void); typedef int (*EnableUpdateProc)(void); typedef int (*SetWindowLevelProc)(WindowPtr pWin, int level); typedef int (*FrameGetRectProc)(xp_frame_rect type, xp_frame_class class, const BoxRec *outer, const BoxRec *inner, BoxRec *ret); typedef int (*FrameHitTestProc)(xp_frame_class class, int x, int y, const BoxRec *outer, const BoxRec *inner, int *ret); typedef int (*FrameDrawProc)(WindowPtr pWin, xp_frame_class class, xp_frame_attr attr, const BoxRec *outer, const BoxRec *inner, unsigned int title_len, const unsigned char *title_bytes); typedef int (*SendPSNProc)(uint32_t hi, uint32_t lo); typedef int (*AttachTransientProc)(WindowPtr pWinChild, WindowPtr pWinParent); /* * AppleWM implementation function list */ typedef struct _AppleWMProcs { DisableUpdateProc DisableUpdate; EnableUpdateProc EnableUpdate; SetWindowLevelProc SetWindowLevel; FrameGetRectProc FrameGetRect; FrameHitTestProc FrameHitTest; FrameDrawProc FrameDraw; SendPSNProc SendPSN; AttachTransientProc AttachTransient; } AppleWMProcsRec, *AppleWMProcsPtr; void AppleWMExtensionInit(AppleWMProcsPtr procsPtr); void AppleWMSetScreenOrigin(WindowPtr pWin); Bool AppleWMDoReorderWindow(WindowPtr pWin); void AppleWMSendEvent(int /* type */, unsigned int /* mask */, int /* which */, int /* arg */ ); unsigned int AppleWMSelectedEvents(void); #endif /* _APPLEWMEXT_H_ */ xorg-server-21.1.16/hw/xquartz/darwin.h0000644000175000017500000000726114757411105013432 /* * Copyright (C) 2008-2012 Apple, Inc. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef _DARWIN_H #define _DARWIN_H #include #include "inputstr.h" #include "scrnintstr.h" #include #include #include "darwinfb.h" // From darwin.c void DarwinPrintBanner(void); int DarwinParseModifierList(const char *constmodifiers, int separatelr); void DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo); #define SCREEN_PRIV(pScreen) ((DarwinFramebufferPtr) \ dixLookupPrivate(&pScreen->devPrivates, \ darwinScreenKey)) /* * Global variables from darwin.c */ extern DevPrivateKeyRec darwinScreenKeyRec; #define darwinScreenKey (&darwinScreenKeyRec) extern int darwinScreensFound; extern io_connect_t darwinParamConnect; extern int darwinEventReadFD; extern int darwinEventWriteFD; extern DeviceIntPtr darwinPointer; extern DeviceIntPtr darwinTabletCursor; extern DeviceIntPtr darwinTabletStylus; extern DeviceIntPtr darwinTabletEraser; extern DeviceIntPtr darwinKeyboard; // User preferences extern int darwinMouseAccelChange; extern int darwinFakeButtons; extern int darwinFakeMouse2Mask; extern int darwinFakeMouse3Mask; extern unsigned int darwinAppKitModMask; extern unsigned int windowItemModMask; extern int darwinSyncKeymap; extern int darwinDesiredDepth; // location of X11's (0,0) point in global screen coordinates extern int darwinMainScreenX; extern int darwinMainScreenY; // bundle-main.c extern char *bundle_id_prefix; _X_ATTRIBUTE_PRINTF(6, 7) extern void xq_asl_log(int level, const char *subsystem, const char *file, const char *function, int line, const char *fmt, ...); #define ASL_LOG(level, subsystem, msg, args ...) xq_asl_log(level, subsystem, \ __FILE__, \ __FUNCTION__, \ __LINE__, msg, \ ## args) #define DEBUG_LOG(msg, args ...) ASL_LOG(ASL_LEVEL_DEBUG, \ "XQuartz", msg, \ ## args) #define TRACE() DEBUG_LOG("TRACE") #endif /* _DARWIN_H */ xorg-server-21.1.16/hw/xquartz/darwinfb.h0000644000175000017500000000422514757411105013737 /* * Copyright (C) 2009 Apple, Inc. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef _DARWIN_FB_H #define _DARWIN_FB_H #include "scrnintstr.h" typedef struct { void *framebuffer; int x; int y; int width; int height; int pitch; int depth; int visuals; int bitsPerRGB; int bitsPerPixel; int preferredCVC; Pixel redMask; Pixel greenMask; Pixel blueMask; } DarwinFramebufferRec, *DarwinFramebufferPtr; #define MASK_LH(l, h) (((1 << (1 + (h) - (l))) - 1) << (l)) #define BM_ARGB(a, r, g, b) MASK_LH(0, (b) - 1) #define GM_ARGB(a, r, g, b) MASK_LH(b, (b) + (g) - 1) #define RM_ARGB(a, r, g, b) MASK_LH((b) + (g), (b) + (g) + (r) - 1) #define AM_ARGB(a, r, g, b) MASK_LH((b) + (g) + (r), \ (b) + (g) + (r) + (a) - 1) #endif /* _DARWIN_FB_H */ xorg-server-21.1.16/hw/xquartz/darwinEvents.h0000644000175000017500000001013214757411105014606 /* * Copyright (c) 2008 Apple, Inc. * Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef _DARWIN_EVENTS_H #define _DARWIN_EVENTS_H /* For extra precision of our cursor and other valuators */ #define XQUARTZ_VALUATOR_LIMIT (1 << 16) Bool DarwinEQInit(void); void DarwinEQFini(void); void DarwinEQEnqueue(const xEventPtr e); void DarwinEQPointerPost(DeviceIntPtr pDev, xEventPtr e); void DarwinEQSwitchScreen(ScreenPtr pScreen, Bool fromDIX); void DarwinInputReleaseButtonsAndKeys(DeviceIntPtr pDev); void DarwinSendTabletEvents(DeviceIntPtr pDev, int ev_type, int ev_button, double pointer_x, double pointer_y, double pressure, double tilt_x, double tilt_y); void DarwinSendPointerEvents(DeviceIntPtr pDev, int ev_type, int ev_button, double pointer_x, double pointer_y, double pointer_dx, double pointer_dy); void DarwinSendKeyboardEvents(int ev_type, int keycode); void DarwinSendScrollEvents(double scroll_x, double scroll_y); void DarwinUpdateModKeys(int flags); void DarwinListenOnOpenFD(int fd); /* * Subtypes for the ET_XQuartz event type */ enum { kXquartzReloadKeymap, // Reload system keymap kXquartzActivate, // restore X drawing and cursor kXquartzDeactivate, // clip X drawing and switch to Aqua cursor kXquartzSetRootClip, // enable or disable drawing to the X screen kXquartzQuit, // kill the X server and release the display kXquartzBringAllToFront, // bring all X windows to front kXquartzToggleFullscreen, // Enable/Disable fullscreen mode kXquartzSetRootless, // Set rootless mode kXquartzSpaceChanged, // Spaces changed kXquartzListenOnOpenFD, // Listen to the launchd fd (passed as arg) /* * AppleWM events */ kXquartzControllerNotify, // send an AppleWMControllerNotify event kXquartzPasteboardNotify, // notify the WM to copy or paste kXquartzReloadPreferences, // send AppleWMReloadPreferences /* * Xplugin notification events */ kXquartzDisplayChanged, // display configuration has changed kXquartzWindowState, // window visibility state has changed kXquartzWindowMoved, // window has moved on screen }; /* Send one of the above events to the server thread. */ void DarwinSendDDXEvent(int type, int argc, ...); /* A mask of the modifiers that are in our X11 keyboard layout: * (Fn for example is just useful for 3button mouse emulation) */ extern int darwin_all_modifier_mask; /* A mask of the modifiers that are in our X11 keyboard layout: * (Fn for example is just useful for 3button mouse emulation) */ extern int darwin_x11_modifier_mask; /* The current state of the above listed modifiers */ extern int darwin_all_modifier_flags; #endif /* _DARWIN_EVENTS_H */ xorg-server-21.1.16/hw/xquartz/defaults.plist0000644000175000017500000000061714757411105014657 apps_menu Terminal xterm n xorg-server-21.1.16/hw/xquartz/keysym2ucs.h0000644000175000017500000000274214757411105014263 /* * This module converts keysym values into the corresponding ISO 10646 * (UCS, Unicode) values. * * The array keysymtab[] contains pairs of X11 keysym values for graphical * characters and the corresponding Unicode value. The function * keysym2ucs() maps a keysym onto a Unicode value using a binary search, * therefore keysymtab[] must remain SORTED by keysym value. * * The keysym -> UTF-8 conversion will hopefully one day be provided * by Xlib via XmbLookupString() and should ideally not have to be * done in X applications. But we are not there yet. * * We allow to represent any UCS character in the range U-00000000 to * U-00FFFFFF by a keysym value in the range 0x01000000 to 0x01ffffff. * This admittedly does not cover the entire 31-bit space of UCS, but * it does cover all of the characters up to U-10FFFF, which can be * represented by UTF-16, and more, and it is very unlikely that higher * UCS codes will ever be assigned by ISO. So to get Unicode character * U+ABCD you can directly use keysym 0x0100abcd. * * Author: Markus G. Kuhn , University of Cambridge, April 2001 * * Special thanks to Richard Verhoeven for preparing * an initial draft of the mapping table. * * This software is in the public domain. Share and enjoy! */ #ifndef KEYSYM2UCS_H #define KEYSYM2UCS_H 1 #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) extern long keysym2ucs(int keysym); extern int ucs2keysym(long ucs); #endif /* KEYSYM2UCS_H */ xorg-server-21.1.16/hw/xquartz/quartz.h0000644000175000017500000001257414757411105013477 /* * quartz.h * * External interface of the Quartz display modes seen by the generic, mode * independent parts of the Darwin X server. * * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * Copyright (c) 2001-2003 Greg Parker and Torrey T. Lyons. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef _QUARTZ_H #define _QUARTZ_H #include #include "privates.h" #include "screenint.h" #include "window.h" #include "pixmap.h" /*------------------------------------------ Quartz display mode function types ------------------------------------------*/ /* * Display mode initialization */ typedef void (*DisplayInitProc)(void); typedef Bool (*AddScreenProc)(int index, ScreenPtr pScreen); typedef Bool (*SetupScreenProc)(int index, ScreenPtr pScreen); typedef void (*InitInputProc)(int argc, char **argv); /* * Cursor functions */ typedef Bool (*InitCursorProc)(ScreenPtr pScreen); /* * Suspend and resume X11 activity */ typedef void (*SuspendScreenProc)(ScreenPtr pScreen); typedef void (*ResumeScreenProc)(ScreenPtr pScreen); /* * Screen state change support */ typedef void (*AddPseudoramiXScreensProc) (int *x, int *y, int *width, int *height, ScreenPtr pScreen); typedef void (*UpdateScreenProc)(ScreenPtr pScreen); /* * Rootless helper functions */ typedef Bool (*IsX11WindowProc)(int windowNumber); typedef void (*HideWindowsProc)(Bool hide); /* * Rootless functions for optional export to GLX layer */ typedef void * (*FrameForWindowProc)(WindowPtr pWin, Bool create); typedef WindowPtr (*TopLevelParentProc)(WindowPtr pWindow); typedef Bool (*CreateSurfaceProc) (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, unsigned int client_id, unsigned int *surface_id, unsigned int key[2], void (*notify)(void *arg, void *data), void *notify_data); typedef Bool (*DestroySurfaceProc) (ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, void (*notify)(void *arg, void *data), void *notify_data); /* * Quartz display mode function list */ typedef struct _QuartzModeProcs { DisplayInitProc DisplayInit; AddScreenProc AddScreen; SetupScreenProc SetupScreen; InitInputProc InitInput; InitCursorProc InitCursor; SuspendScreenProc SuspendScreen; ResumeScreenProc ResumeScreen; AddPseudoramiXScreensProc AddPseudoramiXScreens; UpdateScreenProc UpdateScreen; IsX11WindowProc IsX11Window; HideWindowsProc HideWindows; FrameForWindowProc FrameForWindow; TopLevelParentProc TopLevelParent; CreateSurfaceProc CreateSurface; DestroySurfaceProc DestroySurface; } QuartzModeProcsRec, *QuartzModeProcsPtr; extern QuartzModeProcsPtr quartzProcs; extern Bool XQuartzFullscreenVisible; /* Are the windows visible (predicated on !rootless) */ extern Bool XQuartzServerVisible; /* Is the server visible ... TODO: Refactor to "active" */ extern Bool XQuartzEnableKeyEquivalents; extern Bool XQuartzRootlessDefault; /* Is our default mode rootless? */ extern Bool XQuartzIsRootless; /* Is our current mode rootless (or FS)? */ extern Bool XQuartzFullscreenMenu; /* Show the menu bar (autohide) while in FS */ extern Bool XQuartzFullscreenDisableHotkeys; extern Bool XQuartzOptionSendsAlt; /* Alt or Mode_switch? */ extern int32_t XQuartzShieldingWindowLevel; /* CGShieldingWindowLevel() or 0 */ // Other shared data extern DevPrivateKeyRec quartzScreenKeyRec; #define quartzScreenKey (&quartzScreenKeyRec) extern int aquaMenuBarHeight; // Name of GLX bundle for native OpenGL extern const char *quartzOpenGLBundle; Bool QuartzAddScreen(int index, ScreenPtr pScreen); Bool QuartzSetupScreen(int index, ScreenPtr pScreen); void QuartzInitOutput(int argc, char **argv); void QuartzInitInput(int argc, char **argv); void QuartzInitServer(int argc, char **argv, char **envp); void QuartzGiveUp(void); void QuartzProcessEvent(xEvent *xe); void QuartzUpdateScreens(void); void QuartzShow(void); void QuartzHide(void); void QuartzSetRootClip(int mode); void QuartzSpaceChanged(uint32_t space_id); void QuartzSetRootless(Bool state); void QuartzShowFullscreen(Bool state); int server_main(int argc, char **argv, char **envp); #endif xorg-server-21.1.16/hw/xquartz/quartzKeyboard.h0000644000175000017500000000476214757411105015160 /* * Copyright (c) 2002-2012 Apple Inc. All rights reserved. * Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef QUARTZ_KEYBOARD_H #define QUARTZ_KEYBOARD_H 1 #define XK_TECHNICAL // needed to get XK_Escape #define XK_PUBLISHING #include "X11/keysym.h" #include "inputstr.h" // Each key can generate 4 glyphs. They are, in order: // unshifted, shifted, modeswitch unshifted, modeswitch shifted #define GLYPHS_PER_KEY 4 #define NUM_KEYCODES 248 // NX_NUMKEYCODES might be better #define MIN_KEYCODE XkbMinLegalKeyCode // unfortunately, this isn't 0... #define MAX_KEYCODE NUM_KEYCODES + MIN_KEYCODE - 1 /* These functions need to be implemented by Xquartz, XDarwin, etc. */ Bool QuartsResyncKeymap(Bool sendDDXEvent); /* Provided for darwinEvents.c */ void DarwinKeyboardReloadHandler(void); int DarwinModifierNXKeycodeToNXKey(unsigned char keycode, int *outSide); int DarwinModifierNXKeyToNXKeycode(int key, int side); int DarwinModifierNXKeyToNXMask(int key); int DarwinModifierNXMaskToNXKey(int mask); int DarwinModifierStringToNXMask(const char *string, int separatelr); /* Provided for darwin.c */ void DarwinKeyboardInit(DeviceIntPtr pDev); #endif /* QUARTZ_KEYBOARD_H */ xorg-server-21.1.16/hw/xquartz/quartzRandR.h0000644000175000017500000000616114757411105014421 /* * quartzRandR.h * * Copyright (c) 2010 Jan Hauffa. * 2010-2012 Apple Inc. * All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifndef _QUARTZRANDR_H_ #define _QUARTZRANDR_H_ #include "randrstr.h" typedef struct { size_t width, height; int refresh; RRScreenSizePtr pSize; void *ref; /* CGDisplayModeRef or CFDictionaryRef */ } QuartzModeInfo, *QuartzModeInfoPtr; // Quartz specific per screen storage structure typedef struct { // List of CoreGraphics displays that this X11 screen covers. // This is more than one CG display for video mirroring and // rootless PseudoramiX mode. // No CG display will be covered by more than one X11 screen. int displayCount; CGDirectDisplayID *displayIDs; QuartzModeInfo rootlessMode, fullscreenMode, currentMode; } QuartzScreenRec, *QuartzScreenPtr; #define QUARTZ_PRIV(pScreen) \ ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey)) void QuartzCopyDisplayIDs(ScreenPtr pScreen, int displayCount, CGDirectDisplayID *displayIDs); Bool QuartzRandRUpdateFakeModes(BOOL force_update); Bool QuartzRandRInit(ScreenPtr pScreen); /* These two functions provide functionality expected by the legacy * mode switching. They are equivalent to a client requesting one * of the modes corresponding to these "fake" modes. * QuartzRandRSetFakeFullscreen takes an argument which is used to determine * the visibility of the windows after the change. */ void QuartzRandRSetFakeRootless(void); void QuartzRandRSetFakeFullscreen(BOOL state); /* Toggle fullscreen mode. If "fake" fullscreen is the current mode, * this will just show/hide the X11 windows. If we are in a RandR fullscreen * mode, this will toggles us to the default fake mode and hide windows if * it is fullscreen */ void QuartzRandRToggleFullscreen(void); #endif xorg-server-21.1.16/hw/xquartz/sanitizedCarbon.h0000644000175000017500000000163014757411105015257 /* * Don't #include any of the AppKit, etc stuff directly since it will * pollute the X11 namespace. */ #ifndef _XQ_SANITIZED_CARBON_H_ #define _XQ_SANITIZED_CARBON_H_ // QuickDraw in ApplicationServices has the following conflicts with // the basic X server headers. Use QD_ to use the QuickDraw // definition of any of these symbols, or the normal name for the // X11 definition. #define Cursor QD_Cursor #define WindowPtr QD_WindowPtr #define Picture QD_Picture #define BOOL OSX_BOOL #define EventType HIT_EventType #include #include #include #include #include #include // For the NXSwap* #undef Cursor #undef WindowPtr #undef Picture #undef BOOL #undef EventType #endif /* _XQ_SANITIZED_CARBON_H_ */ xorg-server-21.1.16/hw/xquartz/sanitizedCocoa.h0000644000175000017500000000311714757411105015101 /* * Don't #include any of the AppKit, etc stuff directly since it will * pollute the X11 namespace. */ #ifndef _XQ_SANITIZED_COCOA_H_ #define _XQ_SANITIZED_COCOA_H_ // QuickDraw in ApplicationServices has the following conflicts with // the basic X server headers. Use QD_ to use the QuickDraw // definition of any of these symbols, or the normal name for the // X11 definition. #define Cursor QD_Cursor #define WindowPtr QD_WindowPtr #define Picture QD_Picture #define BOOL OSX_BOOL #define EventType HIT_EventType #import #import #undef Cursor #undef WindowPtr #undef Picture #undef BOOL #undef EventType #ifndef __has_feature #define __has_feature(x) 0 // Compatibility with non-clang compilers. #endif #ifndef NS_RETURNS_RETAINED #if __has_feature(attribute_ns_returns_retained) #define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) #else #define NS_RETURNS_RETAINED #endif #endif #ifndef NS_RETURNS_NOT_RETAINED #if __has_feature(attribute_ns_returns_not_retained) #define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) #else #define NS_RETURNS_NOT_RETAINED #endif #endif #ifndef CF_RETURNS_RETAINED #if __has_feature(attribute_cf_returns_retained) #define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) #else #define CF_RETURNS_RETAINED #endif #endif #ifndef CF_RETURNS_NOT_RETAINED #if __has_feature(attribute_cf_returns_not_retained) #define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) #else #define CF_RETURNS_NOT_RETAINED #endif #endif #endif /* _XQ_SANITIZED_COCOA_H_ */ xorg-server-21.1.16/hw/xquartz/man/0000755000175000017500000000000014757411136012626 5xorg-server-21.1.16/hw/xquartz/man/Makefile.am0000644000175000017500000000007314757411105014576 include $(top_srcdir)/manpages.am appman_PRE = Xquartz.man xorg-server-21.1.16/hw/xquartz/man/Makefile.in0000644000175000017500000006307414757411116014623 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xquartz/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xquartz.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xquartz/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xquartz/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xquartz/man/Xquartz.man0000644000175000017500000002135514757411105014723 .TH XQUARTZ 1 @vendorversion@ .SH NAME Xquartz \- X window system server for Mac OSX .SH SYNOPSIS .B Xquartz [ options ] ... .SH DESCRIPTION .I Xquartz is the X window server for Mac OS X provided by Apple. .I Xquartz runs in parallel with Aqua in rootless mode. In rootless mode, the X window system and Mac OS X share your display. The root window of the X11 display is the size of the screen and contains all the other windows. The X11 root window is not displayed in rootless mode as Mac OS X handles the desktop background. .SH CUSTOMIZATION \fIXquartz\fP can be customized using the defaults(1) command. The available options are: .TP 8 .B defaults write @bundle_id_prefix@.X11 enable_fake_buttons -boolean true Emulates a 3 button mouse using modifier keys. By default, the Command modifier is used to emulate button 2 and Option is used for button 3. Thus, clicking the first mouse button while holding down Command will act like clicking button 2. Holding down Option will simulate button 3. .TP 8 .B defaults write @bundle_id_prefix@.X11 fake_button2 \fImodifiers\fP Change the modifier keys used to emulate the second mouse button. By default, Command is used to emulate the second button. Any combination of the following modifier names may be used: {l,r,}shift, {l,r,}option, {l,r,}control, {l,r,}command, fn .TP 8 .B defaults write @bundle_id_prefix@.X11 fake_button3 \fImodifiers\fP Change the modifier keys used to emulate the second mouse button. By default, Command is used to emulate the second button. Any combination of the following modifier names may be used: {l,r,}shift, {l,r,}option, {l,r,}control, {l,r,}command, fn .TP 8 .B defaults write @bundle_id_prefix@.X11 fullscreen_hotkeys -boolean true Enable OSX hotkeys while in fullscreen .TP 8 .B defaults write @bundle_id_prefix@.X11 fullscreen_menu -boolean true Show the OSX menu while in fullscreen .TP 8 .B defaults write @bundle_id_prefix@.X11 no_quit_alert -boolean true Disables the alert dialog displayed when attempting to quit X11. .TP 8 .B defaults write @bundle_id_prefix@.X11 no_auth -boolean true Stops the X server requiring that clients authenticate themselves when connecting. See Xsecurity(@miscmansuffix@). .TP 8 .B defaults write @bundle_id_prefix@.X11 nolisten_tcp -boolean false This will tell the server to listen and accept TCP connections. Doing this without enabling xauth is a possible security concern. See Xsecurity(@miscmansuffix@). .TP 8 .B defaults write @bundle_id_prefix@.X11 enable_system_beep -boolean false Don't use the standard system beep effect for X11 alerts. .TP 8 .B defaults write @bundle_id_prefix@.X11 enable_key_equivalents -boolean false Disable menu keyboard equivalents while X11 windows are focused. .TP 8 .B defaults write @bundle_id_prefix@.X11 depth \fIdepth\fP Specifies the color bit depth to use. Currently only 15, and 24 color bits per pixel are supported. If not specified, or a value of -1 is specified, defaults to the depth of the main display. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_keymap -boolean true Keep the X11 keymap up to date with the OSX system keymap. .TP 8 .B defaults write @bundle_id_prefix@.X11 option_sends_alt -boolean true The Option key will send Alt_L and Alt_R instead of Mode_switch. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_pasteboard -boolean true Enable syncing between the OSX pasteboard and clipboard/primary selection buffers in X11. This option needs to be true for any of the other pasteboard sync options to have an effect. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_pasteboard_to_clipboard -boolean true Update the X11 CLIPBOARD when the OSX NSPasteboard is updated. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_pasteboard_to_primary -boolean true Update the the X11 PRIMARY buffer when the OSX NSPasteboard is updated. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_clipboard_to_pasteboard -boolean true Update the the OSX NSPasteboard when the X11 CLIPBOARD is updated. Note that enabling this option causes the clipboard synchronization to act as a clipboard manager in X11. This makes it impossible to use xclipboard, klipper, or any other such clipboard managers. If you want to use any of these programs, you must disable this option. .TP 8 .B defaults write @bundle_id_prefix@.X11 sync_primary_on_select -boolean true This option defaults to false and is provided only "for experts." It updates the NSPasteboard whenever a new X11 selection is made (rather than requiring you to hit cmd-c to copy the selection to the NSPasteboard). Since the X11 protocol does not require applications to send notification when they change selection, this might not work in all cases (if you run into this problem, try selecting text in another application first, then selecting the text you want). .TP 8 .B defaults write @bundle_id_prefix@.X11 enable_test_extensions -boolean true This option defaults to false and is only accessible through the command line. Enable this option to turn on the DEC-XTRAP, RECORD, and XTEST extensions in the server. .TP 8 .B defaults write @bundle_id_prefix@.X11 scroll_in_device_direction -boolean true This option defaults to false. Enable this option to ensure that X11 scroll events are always in the direction of the device. This overrides the related option in the Mouse/Trackpad section of System Preferences. .SH OPTIONS .PP In addition to the normal server options described in the \fIXserver(1)\fP manual page, \fIXquartz\fP accepts the following command line switches: .TP 8 .B \-fakebuttons Same as enable_fake_buttons above with value true. .TP 8 .B \-nofakebuttons Same as enable_fake_buttons above with value false. .TP 8 .B "\-fakemouse2 \fImodifiers\fP" Same as fake_button2 above. .TP 8 .B "\-fakemouse3 \fImodifiers\fP" Same as fake_button3 above. .TP 8 .B "\-depth \fIdepth\fP" Same as depth above. .SH LOGGING XQuartz stores a server log at ~/Library/Logs/X11.@bundle_id_prefix@.log which is analogous to /var/log/Xorg.#.log on systems that use the XFree86 DDX such as Linux, BSD, and Solaris. .PP In addition to this server log, XQuartz sends messages to syslogd(8) using asl(3). These logs are sent to the @bundle_id_prefix@ facility, and you can watch these logs using the following syslog(1) command: .TP 8 .B $ syslog -w -k Facility eq @bundle_id_prefix@ .PP or you can include extra information such as the file, line, and function where the message originated: .TP 8 .B $ syslog -w -F '$(Time) $(Sender) <$(Level)> $(File):$(Line) $(Function) :: $(Message)' -k Facility eq @bundle_id_prefix@ .PP By default, XQuartz sets an ASL mask which prevents it from logging messages below the ASL_LEVEL_WARNING level (meaning almost all logging is done strictly to the file referenced above). To force XQuartz to send all log messages to syslogd(8), you can adjust this mask using the following syslog(1) command: .TP 8 .B $ syslog -c X11.bin -d .PP The stdout and stderr messages printed by any process launched by XQuartz will be redirected to this syslog facility with a priority level of ASL_LEVEL_INFO and ASL_LEVEL_NOTICE respectively. In order to see these messages in syslog, you will need to adjust XQuartz's asl mask as above but using -i or -n instead of -d. .SH "SEE ALSO" .PP X(@miscmansuffix@), Xserver(1), xdm(1), xinit(1), syslog(1), syslogd(8) .PP https://www.xquartz.org/ .PP .SH AUTHORS / HISTORY X11 was originally ported to Mac OS X Server by John Carmack. Dave Zarzycki used this as the basis of his port of XFree86 4.0 to Darwin 1.0. Torrey T. Lyons improved and integrated this code into the XFree86 Project's mainline for the 4.0.2 release. .PP The following members of the XonX Team contributed to the following releases (in alphabetical order): .TP 4 XFree86 4.1.0: .br Rob Braun - Darwin x86 support .br Torrey T. Lyons - Project Lead .br Andreas Monitzer - Cocoa version of XDarwin front end .br Gregory Robert Parker - Original Quartz implementation .br Christoph Pfisterer - Dynamic shared X libraries .br Toshimitsu Tanaka - Japanese localization .TP 4 XFree86 4.2.0: .br Rob Braun - Darwin x86 support .br Pablo Di Noto - Spanish localization .br Paul Edens - Dutch localization .br Kyunghwan Kim - Korean localization .br Mario Klebsch - Non-US keyboard support .br Torrey T. Lyons - Project Lead .br Andreas Monitzer - German localization .br Patrik Montgomery - Swedish localization .br Greg Parker - Rootless support .br Toshimitsu Tanaka - Japanese localization .br Olivier Verdier - French localization .PP Code from Apple's X11.app (which was based on XFree86 4.1) was integrated into X.org's XDarwin DDX by Ben Byer for xorg-server-1.2. The XDarwin DDX was renamed Xquartz to more accurately reflect its state (the pure-darwin backend was removed). Jeremy Huddleston took over as project lead and brought the project up to the X.org 1.4 server branch. .PP Jeremy Huddleston is the current maintainer. xorg-server-21.1.16/hw/xwin/0000755000175000017500000000000014757411135011321 5xorg-server-21.1.16/hw/xwin/dri/0000755000175000017500000000000014757411135012077 5xorg-server-21.1.16/hw/xwin/dri/meson.build0000644000175000017500000000042114757411105014153 srcs_windows_dri = [ 'windowsdri.c', 'windowsdri.h', ] xwin_windowsdri = static_library( 'WindowsDRI', srcs_windows_dri, include_directories: [ inc, include_directories('../') ], dependencies: [ windowsdri_dep, pixman_dep, ], ) xorg-server-21.1.16/hw/xwin/dri/Makefile.am0000644000175000017500000000027314757411105014052 noinst_LTLIBRARIES = libWindowsDRI.la libWindowsDRI_la_SOURCES = \ windowsdri.c \ windowsdri.h AM_CFLAGS = $(DIX_CFLAGS) \ @WINDOWSDRI_CFLAGS@ \ -I$(top_srcdir)/hw/xwin/ xorg-server-21.1.16/hw/xwin/dri/Makefile.in0000644000175000017500000006102414757411116014066 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xwin/dri ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libWindowsDRI_la_LIBADD = am_libWindowsDRI_la_OBJECTS = windowsdri.lo libWindowsDRI_la_OBJECTS = $(am_libWindowsDRI_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/windowsdri.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libWindowsDRI_la_SOURCES) DIST_SOURCES = $(libWindowsDRI_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libWindowsDRI.la libWindowsDRI_la_SOURCES = \ windowsdri.c \ windowsdri.h AM_CFLAGS = $(DIX_CFLAGS) \ @WINDOWSDRI_CFLAGS@ \ -I$(top_srcdir)/hw/xwin/ all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwin/dri/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xwin/dri/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libWindowsDRI.la: $(libWindowsDRI_la_OBJECTS) $(libWindowsDRI_la_DEPENDENCIES) $(EXTRA_libWindowsDRI_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libWindowsDRI_la_OBJECTS) $(libWindowsDRI_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowsdri.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/windowsdri.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/windowsdri.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xwin/dri/windowsdri.c0000644000175000017500000001704114757411105014354 /* * Copyright © 2014 Jon Turney * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "dixstruct.h" #include "extnsionst.h" #include "scrnintstr.h" #include "swaprep.h" #include "protocol-versions.h" #include "windowsdri.h" #include "glx/dri_helpers.h" static int WindowsDRIErrorBase = 0; static unsigned char WindowsDRIReqCode = 0; static int WindowsDRIEventBase = 0; static void WindowsDRIResetProc(ExtensionEntry* extEntry) { } static int ProcWindowsDRIQueryVersion(ClientPtr client) { xWindowsDRIQueryVersionReply rep; REQUEST_SIZE_MATCH(xWindowsDRIQueryVersionReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.majorVersion = SERVER_WINDOWSDRI_MAJOR_VERSION; rep.minorVersion = SERVER_WINDOWSDRI_MINOR_VERSION; rep.patchVersion = SERVER_WINDOWSDRI_PATCH_VERSION; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); swapl(&rep.patchVersion); } WriteToClient(client, sizeof(xWindowsDRIQueryVersionReply), &rep); return Success; } static int ProcWindowsDRIQueryDirectRenderingCapable(ClientPtr client) { xWindowsDRIQueryDirectRenderingCapableReply rep; REQUEST(xWindowsDRIQueryDirectRenderingCapableReq); REQUEST_SIZE_MATCH(xWindowsDRIQueryDirectRenderingCapableReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; if (!client->local) rep.isCapable = 0; else rep.isCapable = glxWinGetScreenAiglxIsActive(screenInfo.screens[stuff->screen]); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xWindowsDRIQueryDirectRenderingCapableReply), &rep); return Success; } static int ProcWindowsDRIQueryDrawable(ClientPtr client) { xWindowsDRIQueryDrawableReply rep; int rc; REQUEST(xWindowsDRIQueryDrawableReq); REQUEST_SIZE_MATCH(xWindowsDRIQueryDrawableReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rc = glxWinQueryDrawable(client, stuff->drawable, &(rep.drawable_type), &(rep.handle)); if (rc) return rc; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.handle); swapl(&rep.drawable_type); } WriteToClient(client, sizeof(xWindowsDRIQueryDrawableReply), &rep); return Success; } static int ProcWindowsDRIFBConfigToPixelFormat(ClientPtr client) { xWindowsDRIFBConfigToPixelFormatReply rep; REQUEST(xWindowsDRIFBConfigToPixelFormatReq); REQUEST_SIZE_MATCH(xWindowsDRIFBConfigToPixelFormatReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.pixelFormatIndex = glxWinFBConfigIDToPixelFormatIndex(stuff->screen, stuff->fbConfigID); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.pixelFormatIndex); } WriteToClient(client, sizeof(xWindowsDRIFBConfigToPixelFormatReply), &rep); return Success; } /* dispatch */ static int ProcWindowsDRIDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_WindowsDRIQueryVersion: return ProcWindowsDRIQueryVersion(client); case X_WindowsDRIQueryDirectRenderingCapable: return ProcWindowsDRIQueryDirectRenderingCapable(client); } if (!client->local) return WindowsDRIErrorBase + WindowsDRIClientNotLocal; switch (stuff->data) { case X_WindowsDRIQueryDrawable: return ProcWindowsDRIQueryDrawable(client); case X_WindowsDRIFBConfigToPixelFormat: return ProcWindowsDRIFBConfigToPixelFormat(client); default: return BadRequest; } } static void SNotifyEvent(xWindowsDRINotifyEvent *from, xWindowsDRINotifyEvent *to) { to->type = from->type; to->kind = from->kind; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->time, to->time); } static int SProcWindowsDRIQueryVersion(ClientPtr client) { REQUEST(xWindowsDRIQueryVersionReq); swaps(&stuff->length); return ProcWindowsDRIQueryVersion(client); } static int SProcWindowsDRIQueryDirectRenderingCapable(ClientPtr client) { REQUEST(xWindowsDRIQueryDirectRenderingCapableReq); swaps(&stuff->length); swapl(&stuff->screen); return ProcWindowsDRIQueryDirectRenderingCapable(client); } static int SProcWindowsDRIQueryDrawable(ClientPtr client) { REQUEST(xWindowsDRIQueryDrawableReq); swaps(&stuff->length); swapl(&stuff->screen); swapl(&stuff->drawable); return ProcWindowsDRIQueryDrawable(client); } static int SProcWindowsDRIFBConfigToPixelFormat(ClientPtr client) { REQUEST(xWindowsDRIFBConfigToPixelFormatReq); swaps(&stuff->length); swapl(&stuff->screen); swapl(&stuff->fbConfigID); return ProcWindowsDRIFBConfigToPixelFormat(client); } static int SProcWindowsDRIDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_WindowsDRIQueryVersion: return SProcWindowsDRIQueryVersion(client); case X_WindowsDRIQueryDirectRenderingCapable: return SProcWindowsDRIQueryDirectRenderingCapable(client); } if (!client->local) return WindowsDRIErrorBase + WindowsDRIClientNotLocal; switch (stuff->data) { case X_WindowsDRIQueryDrawable: return SProcWindowsDRIQueryDrawable(client); case X_WindowsDRIFBConfigToPixelFormat: return SProcWindowsDRIFBConfigToPixelFormat(client); default: return BadRequest; } } void WindowsDRIExtensionInit(void) { ExtensionEntry* extEntry; if ((extEntry = AddExtension(WINDOWSDRINAME, WindowsDRINumberEvents, WindowsDRINumberErrors, ProcWindowsDRIDispatch, SProcWindowsDRIDispatch, WindowsDRIResetProc, StandardMinorOpcode))) { size_t i; WindowsDRIReqCode = (unsigned char)extEntry->base; WindowsDRIErrorBase = extEntry->errorBase; WindowsDRIEventBase = extEntry->eventBase; for (i = 0; i < WindowsDRINumberEvents; i++) EventSwapVector[WindowsDRIEventBase + i] = (EventSwapPtr)SNotifyEvent; } } xorg-server-21.1.16/hw/xwin/dri/windowsdri.h0000644000175000017500000000235014757411105014356 /* * Copyright © 2014 Jon Turney * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef windowsdri_h #define windowsdri_h void WindowsDRIExtensionInit(void); #endif /* windowsdri_h */ xorg-server-21.1.16/hw/xwin/glx/0000755000175000017500000000000014757411135012113 5xorg-server-21.1.16/hw/xwin/glx/meson.build0000644000175000017500000000534314757411105014177 python3 = import('python3') # XWin requires OpenGL spec files in order to generate wrapper code for native GL functions py3 = python3.find_python() if run_command(py3, '-c', 'import lxml;').returncode() != 0 error('python3 lxml module not found') endif khronos_spec_dir = dependency('khronos-opengl-registry').get_pkgconfig_variable('specdir') gen_gl_wrappers_opts= ['-nodebug'] gen_gl_wrappers_cmd = ['env', 'PYTHONPATH=' + khronos_spec_dir, py3, files('./gen_gl_wrappers.py'), gen_gl_wrappers_opts] wgl_wrappers = custom_target( 'gen_wgl_wrappers', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-prefix', 'wgl', '-wrapper', '-preresolve', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'wgl.xml'), output: 'generated_wgl_wrappers.ic', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) gl_shim = custom_target( 'gen_gl_shim', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-shim', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'gl.xml'), output: 'generated_gl_shim.ic', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) gl_thunks = custom_target( 'gen_gl_thunks', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunk', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'gl.xml'), output: 'generated_gl_thunks.ic', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) gl_thunks_def = custom_target( 'gen_gl_thunks_def', command: [gen_gl_wrappers_cmd, '-registry', '@INPUT@', '-thunkdefs', '-outfile', '@OUTPUT@'], input: join_paths(khronos_spec_dir, 'gl.xml'), output: 'generated_gl_thunks.def', depend_files: join_paths(khronos_spec_dir, 'reg.py'), ) srcs_windows_glx = [ 'winpriv.c', 'winpriv.h', 'glwindows.h', 'glshim.c', gl_shim, 'indirect.c', 'indirect.h', 'wgl_ext_api.c', wgl_wrappers, 'wgl_ext_api.h', ] if build_windowsdri srcs_windows_glx += [ 'dri_helpers.c', 'dri_helpers.h', ] endif xwin_glx_c_args = [] xwin_glx_c_args += '-DHAVE_XWIN_CONFIG_H' xwin_glx_c_args += '-DXWIN_GLX_WINDOWS' xwin_glx = static_library( 'XwinGLX', srcs_windows_glx, include_directories: [ inc, top_dir_inc, include_directories('../'), ], dependencies: common_dep, c_args: xwin_glx_c_args, ) srcs_wgl_thunk = [ 'glthunk.c', gl_thunks, ] WGLthunk = shared_library( 'nativeGLthunk', srcs_wgl_thunk, include_directories: [ inc, top_dir_inc, ], c_args: xwin_glx_c_args + [ '-Wno-unused-function', '-Wno-missing-prototypes', '-Wno-missing-declarations', ], link_args: ['-lopengl32'], vs_module_defs: gl_thunks_def, install: true, ) xorg-server-21.1.16/hw/xwin/glx/Makefile.am0000644000175000017500000000433314757411105014067 noinst_LTLIBRARIES = libXwinGLX.la lib_LTLIBRARIES = libnativeGLthunk.la libXwinGLX_la_SOURCES = \ winpriv.c \ winpriv.h \ glwindows.h \ glshim.c \ indirect.c \ indirect.h \ wgl_ext_api.c \ wgl_ext_api.h if XWIN_WINDOWS_DRI libXwinGLX_la_SOURCES += \ dri_helpers.c \ dri_helpers.h endif libnativeGLthunk_la_SOURCES = \ glthunk.c if XWIN_GLX_WINDOWS DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS endif DEFS = \ $(DEFS_GLX_WINDOWS) AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/hw/xwin/ libnativeGLthunk_la_CFLAGS = $(AM_CFLAGS) -Wno-unused-function -Wno-missing-prototypes -Wno-missing-declarations libnativeGLthunk_la_LDFLAGS = -shared -no-undefined -avoid-version -lopengl32 -export-symbols generated_gl_thunks.def EXTRA_libnativeGLthunk_la_DEPENDENCIES = generated_gl_thunks.def if XWIN_GLX_WINDOWS if DEBUG GENGLWRAPPERSOPTS="" else GENGLWRAPPERSOPTS="-nodebug" endif generated_wgl_wrappers.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/wgl.xml -prefix wgl -wrapper -preresolve $(GENGLWRAPPERSOPTS) -outfile $@ generated_gl_shim.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -shim $(GENGLWRAPPERSOPTS) -outfile $@ generated_gl_thunks.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunk $(GENGLWRAPPERSOPTS) -outfile $@ generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@ BUILT_SOURCES = generated_gl_shim.ic generated_gl_thunks.ic generated_gl_thunks.def generated_wgl_wrappers.ic CLEANFILES = $(BUILT_SOURCES) endif EXTRA_DIST = gen_gl_wrappers.py xorg-server-21.1.16/hw/xwin/glx/Makefile.in0000644000175000017500000010153314757411116014102 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XWIN_WINDOWS_DRI_TRUE@am__append_1 = \ @XWIN_WINDOWS_DRI_TRUE@ dri_helpers.c \ @XWIN_WINDOWS_DRI_TRUE@ dri_helpers.h subdir = hw/xwin/glx ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libXwinGLX_la_LIBADD = am__libXwinGLX_la_SOURCES_DIST = winpriv.c winpriv.h glwindows.h \ glshim.c indirect.c indirect.h wgl_ext_api.c wgl_ext_api.h \ dri_helpers.c dri_helpers.h @XWIN_WINDOWS_DRI_TRUE@am__objects_1 = dri_helpers.lo am_libXwinGLX_la_OBJECTS = winpriv.lo glshim.lo indirect.lo \ wgl_ext_api.lo $(am__objects_1) libXwinGLX_la_OBJECTS = $(am_libXwinGLX_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libnativeGLthunk_la_LIBADD = am_libnativeGLthunk_la_OBJECTS = libnativeGLthunk_la-glthunk.lo libnativeGLthunk_la_OBJECTS = $(am_libnativeGLthunk_la_OBJECTS) libnativeGLthunk_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libnativeGLthunk_la_CFLAGS) $(CFLAGS) \ $(libnativeGLthunk_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/dri_helpers.Plo \ ./$(DEPDIR)/glshim.Plo ./$(DEPDIR)/indirect.Plo \ ./$(DEPDIR)/libnativeGLthunk_la-glthunk.Plo \ ./$(DEPDIR)/wgl_ext_api.Plo ./$(DEPDIR)/winpriv.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libXwinGLX_la_SOURCES) $(libnativeGLthunk_la_SOURCES) DIST_SOURCES = $(am__libXwinGLX_la_SOURCES_DIST) \ $(libnativeGLthunk_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = \ $(DEFS_GLX_WINDOWS) DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXwinGLX.la lib_LTLIBRARIES = libnativeGLthunk.la libXwinGLX_la_SOURCES = winpriv.c winpriv.h glwindows.h glshim.c \ indirect.c indirect.h wgl_ext_api.c wgl_ext_api.h \ $(am__append_1) libnativeGLthunk_la_SOURCES = \ glthunk.c @XWIN_GLX_WINDOWS_TRUE@DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ -I$(top_srcdir) \ -I$(top_srcdir)/hw/xwin/ libnativeGLthunk_la_CFLAGS = $(AM_CFLAGS) -Wno-unused-function -Wno-missing-prototypes -Wno-missing-declarations libnativeGLthunk_la_LDFLAGS = -shared -no-undefined -avoid-version -lopengl32 -export-symbols generated_gl_thunks.def EXTRA_libnativeGLthunk_la_DEPENDENCIES = generated_gl_thunks.def @DEBUG_FALSE@@XWIN_GLX_WINDOWS_TRUE@GENGLWRAPPERSOPTS = "-nodebug" @DEBUG_TRUE@@XWIN_GLX_WINDOWS_TRUE@GENGLWRAPPERSOPTS = "" @XWIN_GLX_WINDOWS_TRUE@BUILT_SOURCES = generated_gl_shim.ic generated_gl_thunks.ic generated_gl_thunks.def generated_wgl_wrappers.ic @XWIN_GLX_WINDOWS_TRUE@CLEANFILES = $(BUILT_SOURCES) EXTRA_DIST = gen_gl_wrappers.py all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwin/glx/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xwin/glx/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXwinGLX.la: $(libXwinGLX_la_OBJECTS) $(libXwinGLX_la_DEPENDENCIES) $(EXTRA_libXwinGLX_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXwinGLX_la_OBJECTS) $(libXwinGLX_la_LIBADD) $(LIBS) libnativeGLthunk.la: $(libnativeGLthunk_la_OBJECTS) $(libnativeGLthunk_la_DEPENDENCIES) $(EXTRA_libnativeGLthunk_la_DEPENDENCIES) $(AM_V_CCLD)$(libnativeGLthunk_la_LINK) -rpath $(libdir) $(libnativeGLthunk_la_OBJECTS) $(libnativeGLthunk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dri_helpers.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glshim.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indirect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libnativeGLthunk_la-glthunk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wgl_ext_api.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winpriv.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libnativeGLthunk_la-glthunk.lo: glthunk.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnativeGLthunk_la_CFLAGS) $(CFLAGS) -MT libnativeGLthunk_la-glthunk.lo -MD -MP -MF $(DEPDIR)/libnativeGLthunk_la-glthunk.Tpo -c -o libnativeGLthunk_la-glthunk.lo `test -f 'glthunk.c' || echo '$(srcdir)/'`glthunk.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libnativeGLthunk_la-glthunk.Tpo $(DEPDIR)/libnativeGLthunk_la-glthunk.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='glthunk.c' object='libnativeGLthunk_la-glthunk.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libnativeGLthunk_la_CFLAGS) $(CFLAGS) -c -o libnativeGLthunk_la-glthunk.lo `test -f 'glthunk.c' || echo '$(srcdir)/'`glthunk.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/dri_helpers.Plo -rm -f ./$(DEPDIR)/glshim.Plo -rm -f ./$(DEPDIR)/indirect.Plo -rm -f ./$(DEPDIR)/libnativeGLthunk_la-glthunk.Plo -rm -f ./$(DEPDIR)/wgl_ext_api.Plo -rm -f ./$(DEPDIR)/winpriv.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/dri_helpers.Plo -rm -f ./$(DEPDIR)/glshim.Plo -rm -f ./$(DEPDIR)/indirect.Plo -rm -f ./$(DEPDIR)/libnativeGLthunk_la-glthunk.Plo -rm -f ./$(DEPDIR)/wgl_ext_api.Plo -rm -f ./$(DEPDIR)/winpriv.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES .PRECIOUS: Makefile @XWIN_GLX_WINDOWS_TRUE@generated_wgl_wrappers.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/wgl.xml $(KHRONOS_SPEC_DIR)/reg.py @XWIN_GLX_WINDOWS_TRUE@ $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/wgl.xml -prefix wgl -wrapper -preresolve $(GENGLWRAPPERSOPTS) -outfile $@ @XWIN_GLX_WINDOWS_TRUE@generated_gl_shim.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py @XWIN_GLX_WINDOWS_TRUE@ $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -shim $(GENGLWRAPPERSOPTS) -outfile $@ @XWIN_GLX_WINDOWS_TRUE@generated_gl_thunks.ic: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py @XWIN_GLX_WINDOWS_TRUE@ $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunk $(GENGLWRAPPERSOPTS) -outfile $@ @XWIN_GLX_WINDOWS_TRUE@generated_gl_thunks.def: $(srcdir)/gen_gl_wrappers.py $(KHRONOS_SPEC_DIR)/gl.xml $(KHRONOS_SPEC_DIR)/reg.py @XWIN_GLX_WINDOWS_TRUE@ $(AM_V_GEN)PYTHONPATH=$(KHRONOS_SPEC_DIR) $(PYTHON3) $(srcdir)/gen_gl_wrappers.py -registry $(KHRONOS_SPEC_DIR)/gl.xml -thunkdefs $(GENGLWRAPPERSOPTS) -outfile $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xwin/glx/winpriv.c0000644000175000017500000000502614757411105013675 /* * Export window information for the Windows-OpenGL GLX implementation. * * Authors: Alexander Gottwald */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winpriv.h" #include "winwindow.h" void winCreateWindowsWindow(WindowPtr pWin); /** * Return size and handles of a window. * If pWin is NULL, then the information for the root window is requested. */ HWND winGetWindowInfo(WindowPtr pWin) { winTrace("%s: pWin %p XID 0x%x\n", __FUNCTION__, pWin, (unsigned int)pWin->drawable.id); /* a real window was requested */ if (pWin != NULL) { /* Get the window and screen privates */ ScreenPtr pScreen = pWin->drawable.pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); winScreenInfoPtr pScreenInfo = NULL; HWND hwnd = NULL; if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); return NULL; } hwnd = pWinScreen->hwndScreen; pScreenInfo = pWinScreen->pScreenInfo; /* check for multiwindow mode */ if (pScreenInfo->fMultiWindow) { winWindowPriv(pWin); if (pWinPriv == NULL) { ErrorF("winGetWindowInfo: window has no privates\n"); return hwnd; } if (pWinPriv->hWnd == NULL) { winCreateWindowsWindow(pWin); winDebug("winGetWindowInfo: forcing window to exist\n"); } if (pWinPriv->hWnd != NULL) { /* copy window handle */ hwnd = pWinPriv->hWnd; /* mark GLX active on that hwnd */ pWinPriv->fWglUsed = TRUE; } return hwnd; } } else { ScreenPtr pScreen = g_ScreenInfo[0].pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); return NULL; } ErrorF("winGetWindowInfo: returning root window\n"); return pWinScreen->hwndScreen; } return NULL; } Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen) { winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); winScreenInfoPtr pScreenInfo = pWinScreen->pScreenInfo; if (pScreenInfo->fMultiWindow) return TRUE; return FALSE; } void winSetScreenAiglxIsActive(ScreenPtr pScreen) { winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); pWinScreen->fNativeGlActive = TRUE; } xorg-server-21.1.16/hw/xwin/glx/winpriv.h0000644000175000017500000000046614757411105013705 /* * Export window information for the Windows-OpenGL GLX implementation. * * Authors: Alexander Gottwald */ #include #include HWND winGetWindowInfo(WindowPtr pWin); Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen); void winSetScreenAiglxIsActive(ScreenPtr pScreen); xorg-server-21.1.16/hw/xwin/glx/glwindows.h0000644000175000017500000000426614757411105014226 /* * File: glwindows.h * Purpose: Header for GLX implementation using native Windows OpenGL library * * Authors: Alexander Gottwald * Jon TURNEY * * Copyright (c) Jon TURNEY 2009 * Copyright (c) Alexander Gottwald 2004 * * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifndef GLWINDOWS_H #define GLWINDOWS_H #include typedef struct { unsigned int enableDebug:1; unsigned int enableTrace:1; unsigned int dumpPFD:1; unsigned int dumpHWND:1; unsigned int dumpDC:1; unsigned int enableGLcallTrace:1; unsigned int enableWGLcallTrace:1; } glxWinDebugSettingsRec; extern glxWinDebugSettingsRec glxWinDebugSettings; void glxWinPushNativeProvider(void); void glAddSwapHintRectWINWrapper(GLint x, GLint y, GLsizei width, GLsizei height); int glWinSelectImplementation(int native); #if 1 #define GLWIN_TRACE_MSG(msg, args...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ ) #define GLWIN_DEBUG_MSG(msg, args...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ ) #else #define GLWIN_TRACE_MSG(a, ...) #define GLWIN_DEBUG_MSG(a, ...) #endif #endif xorg-server-21.1.16/hw/xwin/glx/glshim.c0000644000175000017500000000756014757411105013467 /* * File: glshim.c * Purpose: GL shim which redirects to a specified DLL * * Copyright (c) Jon TURNEY 2013 * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ /* A GL shim which redirects to a specified DLL XWin is statically linked with this, rather than the system libGL, so that GL calls can be directed to mesa cygGL-1.dll, or cygnativeGLthunk.dll (which contains cdecl-to-stdcall thunks to the native openGL32.dll) */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #define GL_GLEXT_LEGACY #define GL_GLEXT_PROTOTYPES #include #undef GL_ARB_imaging #undef GL_VERSION_1_3 #include #include #include #include "glwindows.h" #include extern void *glXGetProcAddressARB(const char *); static HMODULE hMod = NULL; /* Implement the __glGetProcAddress function by just using GetProcAddress() on the selected DLL */ void *glXGetProcAddressARB(const char *symbol) { void *proc; /* Default to the mesa GL implementation if one hasn't been selected yet */ if (!hMod) glWinSelectImplementation(0); proc = GetProcAddress(hMod, symbol); if (glxWinDebugSettings.enableGLcallTrace) ErrorF("glXGetProcAddressARB: Resolved '%s' in %p to %p\n", symbol, hMod, proc); return proc; } /* Select a GL implementation DLL */ int glWinSelectImplementation(int native) { const char *dllname; if (native) { dllname = "cygnativeGLthunk.dll"; } else { dllname = "cygGL-1.dll"; } hMod = LoadLibraryEx(dllname, NULL, 0); if (hMod == NULL) { ErrorF("glWinSelectGLimplementation: Could not load '%s'\n", dllname); return -1; } ErrorF("glWinSelectGLimplementation: Loaded '%s'\n", dllname); /* Connect __glGetProcAddress() to our implementation of glXGetProcAddressARB() above */ __glXsetGetProcAddress((glx_gpa_proc)glXGetProcAddressARB); return 0; } #define RESOLVE_RET(proctype, symbol, retval) \ proctype proc = (proctype)glXGetProcAddressARB(symbol); \ if (proc == NULL) return retval; #define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) #define RESOLVED_PROC proc /* Include generated shims for direct linkage to GL functions which are in the ABI */ #include "generated_gl_shim.ic" /* Special wrapper for glAddSwapHintRectWIN for copySubBuffers Only used with native GL if the GL_WIN_swap_hint extension is present, so we enable GLX_MESA_copy_sub_buffer */ typedef void (__stdcall * PFNGLADDSWAPHINTRECTWIN) (GLint x, GLint y, GLsizei width, GLsizei height); void glAddSwapHintRectWINWrapper(GLint x, GLint y, GLsizei width, GLsizei height) { RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN"); RESOLVED_PROC(x, y, width, height); } xorg-server-21.1.16/hw/xwin/glx/indirect.c0000644000175000017500000024241714757411105014007 /* * File: indirect.c * Purpose: A GLX implementation that uses Windows OpenGL library * * Authors: Alexander Gottwald * Jon TURNEY * * Copyright (c) Jon TURNEY 2009 * Copyright (c) Alexander Gottwald 2004 * * Portions of this file are copied from GL/apple/indirect.c, * which contains the following copyright: * * Copyright (c) 2007, 2008, 2009 Apple Inc. * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Greg Parker. All Rights Reserved. * * Portions of this file are copied from Mesa's xf86glx.c, * which contains the following copyright: * * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ /* TODO: - hook up remaining unimplemented extensions - research what guarantees glXWaitX, glXWaitGL are supposed to offer, and implement then using GdiFlush and/or glFinish - pbuffer clobbering: we don't get async notification, but can we arrange to emit the event when we notice it's been clobbered? at the very least, check if it's been clobbered before using it? - XGetImage() doesn't work on pixmaps; need to do more work to make the format and location of the native pixmap compatible - implement GLX_EXT_texture_from_pixmap in terms of WGL_ARB_render_texture (not quite straightforward as we will have to create a pbuffer and copy the pixmap texture into it) */ /* Assumptions: - the __GLXConfig * we get handed back ones we are made (so we can extend the structure with privates) and never get created inside the GLX core */ /* MSDN clarifications: It says SetPixelFormat()'s PIXELFORMATDESCRIPTOR pointer argument has no effect except on metafiles, this seems to mean that as it's ok to supply NULL if the DC is not for a metafile wglMakeCurrent ignores the hdc if hglrc is NULL, so wglMakeCurrent(NULL, NULL) is used to make no context current */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "glwindows.h" #include #include #include #include #include #include #include /* Not yet in w32api */ #ifndef PFD_SUPPORT_DIRECTDRAW #define PFD_SUPPORT_DIRECTDRAW 0x00002000 #endif #ifndef PFD_DIRECT3D_ACCELERATED #define PFD_DIRECT3D_ACCELERATED 0x00004000 #endif #ifndef PFD_SUPPORT_COMPOSITION #define PFD_SUPPORT_COMPOSITION 0x00008000 #endif typedef struct { int notOpenGL; int unknownPixelType; int unaccelerated; } PixelFormatRejectStats; /* ---------------------------------------------------------------------- */ /* * Various debug helpers */ #define GLWIN_DEBUG_HWND(hwnd) \ if (glxWinDebugSettings.dumpHWND) { \ char buffer[1024]; \ if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0; \ GLWIN_DEBUG_MSG("Got HWND %p for window '%s'", hwnd, buffer); \ } glxWinDebugSettingsRec glxWinDebugSettings = { 0, 0, 0, 0, 0, 0 }; static void glxWinInitDebugSettings(void) { char *envptr; envptr = getenv("GLWIN_ENABLE_DEBUG"); if (envptr != NULL) glxWinDebugSettings.enableDebug = (atoi(envptr) == 1); envptr = getenv("GLWIN_ENABLE_TRACE"); if (envptr != NULL) glxWinDebugSettings.enableTrace = (atoi(envptr) == 1); envptr = getenv("GLWIN_DUMP_PFD"); if (envptr != NULL) glxWinDebugSettings.dumpPFD = (atoi(envptr) == 1); envptr = getenv("GLWIN_DUMP_HWND"); if (envptr != NULL) glxWinDebugSettings.dumpHWND = (atoi(envptr) == 1); envptr = getenv("GLWIN_DUMP_DC"); if (envptr != NULL) glxWinDebugSettings.dumpDC = (atoi(envptr) == 1); envptr = getenv("GLWIN_ENABLE_GLCALL_TRACE"); if (envptr != NULL) glxWinDebugSettings.enableGLcallTrace = (atoi(envptr) == 1); envptr = getenv("GLWIN_ENABLE_WGLCALL_TRACE"); if (envptr != NULL) glxWinDebugSettings.enableWGLcallTrace = (atoi(envptr) == 1); envptr = getenv("GLWIN_DEBUG_ALL"); if (envptr != NULL) { glxWinDebugSettings.enableDebug = 1; glxWinDebugSettings.enableTrace = 1; glxWinDebugSettings.dumpPFD = 1; glxWinDebugSettings.dumpHWND = 1; glxWinDebugSettings.dumpDC = 1; glxWinDebugSettings.enableGLcallTrace = 1; glxWinDebugSettings.enableWGLcallTrace = 1; } } static const char * glxWinErrorMessage(void) { static char errorbuffer[1024]; unsigned int last_error = GetLastError(); if (!FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_MAX_WIDTH_MASK, NULL, last_error, 0, (LPTSTR) &errorbuffer, sizeof(errorbuffer), NULL)) { snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error"); } if ((errorbuffer[strlen(errorbuffer) - 1] == '\n') || (errorbuffer[strlen(errorbuffer) - 1] == '\r')) errorbuffer[strlen(errorbuffer) - 1] = 0; sprintf(errorbuffer + strlen(errorbuffer), " (%08x)", last_error); return errorbuffer; } static void pfdOut(const PIXELFORMATDESCRIPTOR * pfd); #define DUMP_PFD_FLAG(flag) \ if (pfd->dwFlags & flag) { \ ErrorF("%s%s", pipesym, #flag); \ pipesym = " | "; \ } static void pfdOut(const PIXELFORMATDESCRIPTOR * pfd) { const char *pipesym = ""; /* will be set after first flag dump */ ErrorF("PIXELFORMATDESCRIPTOR:\n"); ErrorF("nSize = %u\n", pfd->nSize); ErrorF("nVersion = %u\n", pfd->nVersion); ErrorF("dwFlags = %u = {", (unsigned int)pfd->dwFlags); DUMP_PFD_FLAG(PFD_DOUBLEBUFFER); DUMP_PFD_FLAG(PFD_STEREO); DUMP_PFD_FLAG(PFD_DRAW_TO_WINDOW); DUMP_PFD_FLAG(PFD_DRAW_TO_BITMAP); DUMP_PFD_FLAG(PFD_SUPPORT_GDI); DUMP_PFD_FLAG(PFD_SUPPORT_OPENGL); DUMP_PFD_FLAG(PFD_GENERIC_FORMAT); DUMP_PFD_FLAG(PFD_NEED_PALETTE); DUMP_PFD_FLAG(PFD_NEED_SYSTEM_PALETTE); DUMP_PFD_FLAG(PFD_SWAP_EXCHANGE); DUMP_PFD_FLAG(PFD_SWAP_COPY); DUMP_PFD_FLAG(PFD_SWAP_LAYER_BUFFERS); DUMP_PFD_FLAG(PFD_GENERIC_ACCELERATED); DUMP_PFD_FLAG(PFD_SUPPORT_DIRECTDRAW); DUMP_PFD_FLAG(PFD_DIRECT3D_ACCELERATED); DUMP_PFD_FLAG(PFD_SUPPORT_COMPOSITION); DUMP_PFD_FLAG(PFD_DEPTH_DONTCARE); DUMP_PFD_FLAG(PFD_DOUBLEBUFFER_DONTCARE); DUMP_PFD_FLAG(PFD_STEREO_DONTCARE); ErrorF("}\n"); ErrorF("iPixelType = %hu = %s\n", pfd->iPixelType, (pfd->iPixelType == PFD_TYPE_RGBA ? "PFD_TYPE_RGBA" : "PFD_TYPE_COLORINDEX")); ErrorF("cColorBits = %hhu\n", pfd->cColorBits); ErrorF("cRedBits = %hhu\n", pfd->cRedBits); ErrorF("cRedShift = %hhu\n", pfd->cRedShift); ErrorF("cGreenBits = %hhu\n", pfd->cGreenBits); ErrorF("cGreenShift = %hhu\n", pfd->cGreenShift); ErrorF("cBlueBits = %hhu\n", pfd->cBlueBits); ErrorF("cBlueShift = %hhu\n", pfd->cBlueShift); ErrorF("cAlphaBits = %hhu\n", pfd->cAlphaBits); ErrorF("cAlphaShift = %hhu\n", pfd->cAlphaShift); ErrorF("cAccumBits = %hhu\n", pfd->cAccumBits); ErrorF("cAccumRedBits = %hhu\n", pfd->cAccumRedBits); ErrorF("cAccumGreenBits = %hhu\n", pfd->cAccumGreenBits); ErrorF("cAccumBlueBits = %hhu\n", pfd->cAccumBlueBits); ErrorF("cAccumAlphaBits = %hhu\n", pfd->cAccumAlphaBits); ErrorF("cDepthBits = %hhu\n", pfd->cDepthBits); ErrorF("cStencilBits = %hhu\n", pfd->cStencilBits); ErrorF("cAuxBuffers = %hhu\n", pfd->cAuxBuffers); ErrorF("iLayerType = %hhu\n", pfd->iLayerType); ErrorF("bReserved = %hhu\n", pfd->bReserved); ErrorF("dwLayerMask = %u\n", (unsigned int)pfd->dwLayerMask); ErrorF("dwVisibleMask = %u\n", (unsigned int)pfd->dwVisibleMask); ErrorF("dwDamageMask = %u\n", (unsigned int)pfd->dwDamageMask); ErrorF("\n"); } static const char * visual_class_name(int cls) { switch (cls) { case GLX_STATIC_COLOR: return "StaticColor"; case GLX_PSEUDO_COLOR: return "PseudoColor"; case GLX_STATIC_GRAY: return "StaticGray"; case GLX_GRAY_SCALE: return "GrayScale"; case GLX_TRUE_COLOR: return "TrueColor"; case GLX_DIRECT_COLOR: return "DirectColor"; default: return "-none-"; } } static const char * swap_method_name(int mthd) { switch (mthd) { case GLX_SWAP_EXCHANGE_OML: return "xchg"; case GLX_SWAP_COPY_OML: return "copy"; case GLX_SWAP_UNDEFINED_OML: return " "; default: return "????"; } } static void fbConfigsDump(unsigned int n, __GLXconfig * c, PixelFormatRejectStats *rejects) { LogMessage(X_INFO, "%d fbConfigs\n", n); LogMessage(X_INFO, "ignored pixel formats: %d not OpenGL, %d unknown pixel type, %d unaccelerated\n", rejects->notOpenGL, rejects->unknownPixelType, rejects->unaccelerated); if (g_iLogVerbose < 3) return; ErrorF ("pxf vis fb render Ste aux accum MS drawable Group/ sRGB\n"); ErrorF ("idx ID ID VisualType Depth Lvl RGB CI DB Swap reo R G B A Z S buf AR AG AB AA bufs num W P Pb Float Trans Caveat cap \n"); ErrorF ("----------------------------------------------------------------------------------------------------------------------------------\n"); while (c != NULL) { unsigned int i = ((GLXWinConfig *) c)->pixelFormatIndex; const char *float_col = "."; if (c->renderType & GLX_RGBA_FLOAT_BIT_ARB) float_col = "s"; if (c->renderType & GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT) float_col = "u"; ErrorF("%3d %3x %3x " "%-11s" " %3d %3d %s %s %s %s %s " "%2d %2d %2d %2d " "%2d %2d " "%2d " "%2d %2d %2d %2d" " %2d %2d" " %s %s %s " " %s " " %s " " %d %s " " %s" "\n", i, c->visualID, c->fbconfigID, visual_class_name(c->visualType), c->rgbBits ? c->rgbBits : c->indexBits, c->level, (c->renderType & GLX_RGBA_BIT) ? "y" : ".", (c->renderType & GLX_COLOR_INDEX_BIT) ? "y" : ".", c->doubleBufferMode ? "y" : ".", swap_method_name(c->swapMethod), c->stereoMode ? "y" : ".", c->redBits, c->greenBits, c->blueBits, c->alphaBits, c->depthBits, c->stencilBits, c->numAuxBuffers, c->accumRedBits, c->accumGreenBits, c->accumBlueBits, c->accumAlphaBits, c->sampleBuffers, c->samples, (c->drawableType & GLX_WINDOW_BIT) ? "y" : ".", (c->drawableType & GLX_PIXMAP_BIT) ? "y" : ".", (c->drawableType & GLX_PBUFFER_BIT) ? "y" : ".", float_col, (c->transparentPixel != GLX_NONE_EXT) ? "y" : ".", c->visualSelectGroup, (c->visualRating == GLX_SLOW_VISUAL_EXT) ? "*" : " ", c->sRGBCapable ? "y" : "."); c = c->next; } } /* ---------------------------------------------------------------------- */ /* * Forward declarations */ static __GLXscreen *glxWinScreenProbe(ScreenPtr pScreen); static __GLXcontext *glxWinCreateContext(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * baseShareContext, unsigned num_attribs, const uint32_t * attribs, int *error); static __GLXdrawable *glxWinCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig * conf); static Bool glxWinRealizeWindow(WindowPtr pWin); static Bool glxWinUnrealizeWindow(WindowPtr pWin); static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); static Bool glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride, __GLXscreen *screen, __GLXconfig *config); static HDC glxWinMakeDC(__GLXWinContext * gc, __GLXWinDrawable * draw, HDC * hdc, HWND * hwnd); static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable * draw); static void glxWinCreateConfigs(HDC dc, glxWinScreen * screen); static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * rejects); static int fbConfigToPixelFormat(__GLXconfig * mode, PIXELFORMATDESCRIPTOR * pfdret, int drawableTypeOverride); static int fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode, int drawableTypeOverride, glxWinScreen * winScreen); /* ---------------------------------------------------------------------- */ /* * The GLX provider */ __GLXprovider __glXWGLProvider = { glxWinScreenProbe, "Win32 native WGL", NULL }; void glxWinPushNativeProvider(void) { GlxPushProvider(&__glXWGLProvider); } /* ---------------------------------------------------------------------- */ /* * Screen functions */ static void glxWinScreenDestroy(__GLXscreen * screen) { GLWIN_DEBUG_MSG("glxWinScreenDestroy(%p)", screen); __glXScreenDestroy(screen); free(screen); } static int glxWinScreenSwapInterval(__GLXdrawable * drawable, int interval) { BOOL ret = wglSwapIntervalEXTWrapper(interval); if (!ret) { ErrorF("wglSwapIntervalEXT interval %d failed:%s\n", interval, glxWinErrorMessage()); } return ret; } /* Report the extensions split and formatted to avoid overflowing a line */ static void glxLogExtensions(const char *prefix, const char *extensions) { int length = 0; const char *strl; char *str = strdup(extensions); if (str == NULL) { ErrorF("glxLogExtensions: xalloc error\n"); return; } strl = strtok(str, " "); if (strl == NULL) strl = ""; ErrorF("%s%s", prefix, strl); length = strlen(prefix) + strlen(strl); while (1) { strl = strtok(NULL, " "); if (strl == NULL) break; if (length + strlen(strl) + 1 > 120) { ErrorF("\n"); ErrorF("%s", prefix); length = strlen(prefix); } else { ErrorF(" "); length++; } ErrorF("%s", strl); length = length + strlen(strl); } ErrorF("\n"); free(str); } /* This is called by GlxExtensionInit() asking the GLX provider if it can handle the screen... */ static __GLXscreen * glxWinScreenProbe(ScreenPtr pScreen) { glxWinScreen *screen; const char *gl_extensions; const char *gl_renderer; const char *wgl_extensions; HWND hwnd; HDC hdc; HGLRC hglrc; PixelFormatRejectStats rejects; GLWIN_DEBUG_MSG("glxWinScreenProbe"); glxWinInitDebugSettings(); if (pScreen == NULL) return NULL; if (!winCheckScreenAiglxIsSupported(pScreen)) { LogMessage(X_ERROR, "AIGLX: No native OpenGL in modes with a root window\n"); return NULL; } screen = calloc(1, sizeof(glxWinScreen)); if (NULL == screen) return NULL; // Select the native GL implementation (WGL) if (glWinSelectImplementation(1)) { free(screen); return NULL; } // create window class #define WIN_GL_TEST_WINDOW_CLASS "XWinGLTest" { static wATOM glTestWndClass = 0; if (glTestWndClass == 0) { WNDCLASSEX wc; wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = DefWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = GetModuleHandle(NULL); wc.hIcon = 0; wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WIN_GL_TEST_WINDOW_CLASS; wc.hIconSm = 0; RegisterClassEx(&wc); } } // create an invisible window for a scratch DC hwnd = CreateWindowExA(0, WIN_GL_TEST_WINDOW_CLASS, "XWin GL Renderer Capabilities Test Window", 0, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); if (hwnd == NULL) LogMessage(X_ERROR, "AIGLX: Couldn't create a window for render capabilities testing\n"); hdc = GetDC(hwnd); // we must set a pixel format before we can create a context, just use the first one... SetPixelFormat(hdc, 1, NULL); hglrc = wglCreateContext(hdc); wglMakeCurrent(hdc, hglrc); // initialize wgl extension proc pointers (don't call them before here...) // (but we need to have a current context for them to be resolvable) wglResolveExtensionProcs(); /* Dump out some useful information about the native renderer */ ErrorF("GL_VERSION: %s\n", glGetString(GL_VERSION)); ErrorF("GL_VENDOR: %s\n", glGetString(GL_VENDOR)); gl_renderer = (const char *) glGetString(GL_RENDERER); ErrorF("GL_RENDERER: %s\n", gl_renderer); gl_extensions = (const char *) glGetString(GL_EXTENSIONS); wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); if (!wgl_extensions) wgl_extensions = ""; if (g_iLogVerbose >= 3) { glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions); } if (strcasecmp(gl_renderer, "GDI Generic") == 0) { free(screen); LogMessage(X_ERROR, "AIGLX: Won't use generic native renderer as it is not accelerated\n"); goto error; } // Can you see the problem here? The extensions string is DC specific // Different DCs for windows on a multimonitor system driven by multiple cards // might have completely different capabilities. Of course, good luck getting // those screens to be accelerated in XP and earlier... { int i; const struct { const char *wglext; const char *glxext; Bool mandatory; } extensionMap[] = { { "WGL_ARB_make_current_read", "GLX_SGI_make_current_read", 1 }, { "WGL_EXT_swap_control", "GLX_SGI_swap_control", 0 }, { "WGL_EXT_swap_control", "GLX_MESA_swap_control", 0 }, // { "WGL_ARB_render_texture", "GLX_EXT_texture_from_pixmap", 0 }, // Sufficiently different that it's not obvious if this can be done... { "WGL_ARB_pbuffer", "GLX_SGIX_pbuffer", 1 }, { "WGL_ARB_multisample", "GLX_ARB_multisample", 1 }, { "WGL_ARB_multisample", "GLX_SGIS_multisample", 0 }, { "WGL_ARB_pixel_format_float", "GLX_ARB_fbconfig_float", 0 }, { "WGL_EXT_pixel_format_packed_float", "GLX_EXT_fbconfig_packed_float", 0 }, { "WGL_ARB_create_context", "GLX_ARB_create_context", 0 }, { "WGL_ARB_create_context_profile", "GLX_ARB_create_context_profile", 0 }, { "WGL_ARB_create_context_robustness", "GLX_ARB_create_context_robustness", 0 }, { "WGL_EXT_create_context_es2_profile", "GLX_EXT_create_context_es2_profile", 0 }, { "WGL_ARB_framebuffer_sRGB", "GLX_ARB_framebuffer_sRGB", 0 }, }; // // Based on the WGL extensions available, enable various GLX extensions // __glXInitExtensionEnableBits(screen->base.glx_enable_bits); for (i = 0; i < sizeof(extensionMap)/sizeof(extensionMap[0]); i++) { if (strstr(wgl_extensions, extensionMap[i].wglext)) { __glXEnableExtension(screen->base.glx_enable_bits, extensionMap[i].glxext); LogMessage(X_INFO, "GLX: enabled %s\n", extensionMap[i].glxext); } else if (extensionMap[i].mandatory) { LogMessage(X_ERROR, "required WGL extension %s is missing\n", extensionMap[i].wglext); } } // Because it pre-dates WGL_EXT_extensions_string, GL_WIN_swap_hint might // only be in GL_EXTENSIONS if (strstr(gl_extensions, "GL_WIN_swap_hint")) { __glXEnableExtension(screen->base.glx_enable_bits, "GLX_MESA_copy_sub_buffer"); LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); } if (strstr(wgl_extensions, "WGL_ARB_make_current_read")) screen->has_WGL_ARB_make_current_read = TRUE; if (strstr(wgl_extensions, "WGL_ARB_pbuffer")) screen->has_WGL_ARB_pbuffer = TRUE; if (strstr(wgl_extensions, "WGL_ARB_multisample")) screen->has_WGL_ARB_multisample = TRUE; if (strstr(wgl_extensions, "WGL_ARB_framebuffer_sRGB")) { screen->has_WGL_ARB_framebuffer_sRGB = TRUE; } screen->base.destroy = glxWinScreenDestroy; screen->base.createContext = glxWinCreateContext; screen->base.createDrawable = glxWinCreateDrawable; screen->base.swapInterval = glxWinScreenSwapInterval; screen->base.pScreen = pScreen; // Creating the fbConfigs initializes screen->base.fbconfigs and screen->base.numFBConfigs memset(&rejects, 0, sizeof(rejects)); if (strstr(wgl_extensions, "WGL_ARB_pixel_format")) { glxWinCreateConfigsExt(hdc, screen, &rejects); /* Some graphics drivers appear to advertise WGL_ARB_pixel_format, but it doesn't work usefully, so we have to be prepared for it to fail and fall back to using DescribePixelFormat() */ if (screen->base.numFBConfigs > 0) { screen->has_WGL_ARB_pixel_format = TRUE; } } if (screen->base.numFBConfigs <= 0) { memset(&rejects, 0, sizeof(rejects)); glxWinCreateConfigs(hdc, screen); screen->has_WGL_ARB_pixel_format = FALSE; } /* If we still didn't get any fbConfigs, we can't provide GLX for this screen */ if (screen->base.numFBConfigs <= 0) { free(screen); LogMessage(X_ERROR, "AIGLX: No fbConfigs could be made from native OpenGL pixel formats\n"); goto error; } /* These will be set by __glXScreenInit */ screen->base.visuals = NULL; screen->base.numVisuals = 0; __glXScreenInit(&screen->base, pScreen); } wglMakeCurrent(NULL, NULL); wglDeleteContext(hglrc); ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); // dump out fbConfigs now fbConfigIds and visualIDs have been assigned fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs, &rejects); /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */ screen->RealizeWindow = pScreen->RealizeWindow; pScreen->RealizeWindow = glxWinRealizeWindow; screen->UnrealizeWindow = pScreen->UnrealizeWindow; pScreen->UnrealizeWindow = glxWinUnrealizeWindow; screen->CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = glxWinCopyWindow; // Note that WGL is active on this screen winSetScreenAiglxIsActive(pScreen); return &screen->base; error: // Something went wrong and we can't use the native GL implementation // so make sure the mesa GL implementation is selected instead glWinSelectImplementation(0); return NULL; } /* ---------------------------------------------------------------------- */ /* * Window functions */ static Bool glxWinRealizeWindow(WindowPtr pWin) { Bool result; ScreenPtr pScreen = pWin->drawable.pScreen; glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen); GLWIN_DEBUG_MSG("glxWinRealizeWindow"); /* Allow the window to be created (RootlessRealizeWindow is inside our wrap) */ pScreen->RealizeWindow = screenPriv->RealizeWindow; result = pScreen->RealizeWindow(pWin); pScreen->RealizeWindow = glxWinRealizeWindow; return result; } static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { __GLXWinDrawable *pGlxDraw; ScreenPtr pScreen = pWindow->drawable.pScreen; glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen); GLWIN_TRACE_MSG("glxWinCopyWindow pWindow %p", pWindow); dixLookupResourceByType((void *) &pGlxDraw, pWindow->drawable.id, __glXDrawableRes, NullClient, DixUnknownAccess); /* Discard any CopyWindow requests if a GL drawing context is pointing at the window For regions which are being drawn by GL, the shadow framebuffer doesn't have the correct bits, so we wish to avoid shadow framebuffer damage occurring, which will cause those incorrect bits to be transferred to the display.... */ if (pGlxDraw && pGlxDraw->drawContext) { GLWIN_DEBUG_MSG("glxWinCopyWindow: discarding"); return; } GLWIN_DEBUG_MSG("glxWinCopyWindow - passing to hw layer"); pScreen->CopyWindow = screenPriv->CopyWindow; pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc); pScreen->CopyWindow = glxWinCopyWindow; } static Bool glxWinUnrealizeWindow(WindowPtr pWin) { Bool result; ScreenPtr pScreen = pWin->drawable.pScreen; glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen); GLWIN_DEBUG_MSG("glxWinUnrealizeWindow"); pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; result = pScreen->UnrealizeWindow(pWin); pScreen->UnrealizeWindow = glxWinUnrealizeWindow; return result; } /* ---------------------------------------------------------------------- */ /* * Drawable functions */ static GLboolean glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable * base) { HDC dc; HWND hwnd; BOOL ret; __GLXWinDrawable *draw = (__GLXWinDrawable *) base; /* Swap buffers on the last active context for drawing on the drawable */ if (draw->drawContext == NULL) { GLWIN_TRACE_MSG("glxWinSwapBuffers - no context for drawable"); return GL_FALSE; } GLWIN_TRACE_MSG ("glxWinSwapBuffers on drawable %p, last context %p (native ctx %p)", base, draw->drawContext, draw->drawContext->ctx); dc = glxWinMakeDC(draw->drawContext, draw, &dc, &hwnd); if (dc == NULL) return GL_FALSE; ret = wglSwapLayerBuffers(dc, WGL_SWAP_MAIN_PLANE); glxWinReleaseDC(hwnd, dc, draw); if (!ret) { ErrorF("wglSwapBuffers failed: %s\n", glxWinErrorMessage()); return GL_FALSE; } return GL_TRUE; } static void glxWinDrawableCopySubBuffer(__GLXdrawable * drawable, int x, int y, int w, int h) { glAddSwapHintRectWINWrapper(x, y, w, h); glxWinDrawableSwapBuffers(NULL, drawable); } static void glxWinDrawableDestroy(__GLXdrawable * base) { __GLXWinDrawable *glxPriv = (__GLXWinDrawable *) base; if (glxPriv->hPbuffer) if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) { ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage()); } if (glxPriv->dibDC) { // restore the default DIB SelectObject(glxPriv->dibDC, glxPriv->hOldDIB); if (!DeleteDC(glxPriv->dibDC)) { ErrorF("DeleteDC failed: %s\n", glxWinErrorMessage()); } } if (glxPriv->hDIB) { if (!CloseHandle(glxPriv->hSection)) { ErrorF("CloseHandle failed: %s\n", glxWinErrorMessage()); } if (!DeleteObject(glxPriv->hDIB)) { ErrorF("DeleteObject failed: %s\n", glxWinErrorMessage()); } ((PixmapPtr) glxPriv->base.pDraw)->devPrivate.ptr = glxPriv->pOldBits; } GLWIN_DEBUG_MSG("glxWinDestroyDrawable"); free(glxPriv); } static __GLXdrawable * glxWinCreateDrawable(ClientPtr client, __GLXscreen * screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig * conf) { __GLXWinDrawable *glxPriv; glxPriv = malloc(sizeof *glxPriv); if (glxPriv == NULL) return NULL; memset(glxPriv, 0, sizeof *glxPriv); if (!__glXDrawableInit (&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) { free(glxPriv); return NULL; } glxPriv->base.destroy = glxWinDrawableDestroy; glxPriv->base.swapBuffers = glxWinDrawableSwapBuffers; glxPriv->base.copySubBuffer = glxWinDrawableCopySubBuffer; // glxPriv->base.waitX what are these for? // glxPriv->base.waitGL GLWIN_DEBUG_MSG("glxWinCreateDrawable %p", glxPriv); return &glxPriv->base; } void glxWinDeferredCreateDrawable(__GLXWinDrawable *draw, __GLXconfig *config) { switch (draw->base.type) { case GLX_DRAWABLE_WINDOW: { WindowPtr pWin = (WindowPtr) draw->base.pDraw; if (!(config->drawableType & GLX_WINDOW_BIT)) { ErrorF ("glxWinDeferredCreateDrawable: tried to create a GLX_DRAWABLE_WINDOW drawable with a fbConfig which doesn't have drawableType GLX_WINDOW_BIT\n"); } if (pWin == NULL) { GLWIN_DEBUG_MSG("Deferring until X window is created"); return; } GLWIN_DEBUG_MSG("glxWinDeferredCreateDrawable: pWin %p", pWin); if (winGetWindowInfo(pWin) == NULL) { GLWIN_DEBUG_MSG("Deferring until native window is created"); return; } } break; case GLX_DRAWABLE_PBUFFER: { if (draw->hPbuffer == NULL) { __GLXscreen *screen; glxWinScreen *winScreen; int pixelFormat; // XXX: which DC are we supposed to use??? HDC screenDC = GetDC(NULL); if (!(config->drawableType & GLX_PBUFFER_BIT)) { ErrorF ("glxWinDeferredCreateDrawable: tried to create a GLX_DRAWABLE_PBUFFER drawable with a fbConfig which doesn't have drawableType GLX_PBUFFER_BIT\n"); } screen = glxGetScreen(screenInfo.screens[draw->base.pDraw->pScreen->myNum]); winScreen = (glxWinScreen *) screen; pixelFormat = fbConfigToPixelFormatIndex(screenDC, config, GLX_PBUFFER_BIT, winScreen); if (pixelFormat == 0) { return; } draw->hPbuffer = wglCreatePbufferARBWrapper(screenDC, pixelFormat, draw->base.pDraw->width, draw->base.pDraw->height, NULL); ReleaseDC(NULL, screenDC); if (draw->hPbuffer == NULL) { ErrorF("wglCreatePbufferARBWrapper error: %s\n", glxWinErrorMessage()); return; } GLWIN_DEBUG_MSG ("glxWinDeferredCreateDrawable: pBuffer %p created for drawable %p", draw->hPbuffer, draw); } } break; case GLX_DRAWABLE_PIXMAP: { if (draw->dibDC == NULL) { BITMAPINFOHEADER bmpHeader; void *pBits; __GLXscreen *screen; DWORD size; char name[MAX_PATH]; memset(&bmpHeader, 0, sizeof(BITMAPINFOHEADER)); bmpHeader.biSize = sizeof(BITMAPINFOHEADER); bmpHeader.biWidth = draw->base.pDraw->width; bmpHeader.biHeight = draw->base.pDraw->height; bmpHeader.biPlanes = 1; bmpHeader.biBitCount = draw->base.pDraw->bitsPerPixel; bmpHeader.biCompression = BI_RGB; if (!(config->drawableType & GLX_PIXMAP_BIT)) { ErrorF ("glxWinDeferredCreateDrawable: tried to create a GLX_DRAWABLE_PIXMAP drawable with a fbConfig which doesn't have drawableType GLX_PIXMAP_BIT\n"); } draw->dibDC = CreateCompatibleDC(NULL); if (draw->dibDC == NULL) { ErrorF("CreateCompatibleDC error: %s\n", glxWinErrorMessage()); return; } #define RASTERWIDTHBYTES(bmi) (((((bmi)->biWidth*(bmi)->biBitCount)+31)&~31)>>3) size = bmpHeader.biHeight * RASTERWIDTHBYTES(&bmpHeader); GLWIN_DEBUG_MSG("shared memory region size %zu + %u\n", sizeof(BITMAPINFOHEADER), (unsigned int)size); // Create unique name for mapping based on XID // // XXX: not quite unique as potentially this name could be used in // another server instance. Not sure how to deal with that. snprintf(name, sizeof(name), "Local\\CYGWINX_WINDOWSDRI_%08x", (unsigned int)draw->base.pDraw->id); GLWIN_DEBUG_MSG("shared memory region name %s\n", name); // Create a file mapping backed by the pagefile draw->hSection = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(BITMAPINFOHEADER) + size, name); if (draw->hSection == NULL) { ErrorF("CreateFileMapping error: %s\n", glxWinErrorMessage()); return; } draw->hDIB = CreateDIBSection(draw->dibDC, (BITMAPINFO *) &bmpHeader, DIB_RGB_COLORS, &pBits, draw->hSection, sizeof(BITMAPINFOHEADER)); if (draw->dibDC == NULL) { ErrorF("CreateDIBSection error: %s\n", glxWinErrorMessage()); return; } // Store a copy of the BITMAPINFOHEADER at the start of the shared // memory for the information of the receiving process { LPVOID pData = MapViewOfFile(draw->hSection, FILE_MAP_WRITE, 0, 0, 0); memcpy(pData, (void *)&bmpHeader, sizeof(BITMAPINFOHEADER)); UnmapViewOfFile(pData); } // XXX: CreateDIBSection insists on allocating the bitmap memory for us, so we're going to // need some jiggery pokery to point the underlying X Drawable's bitmap at the same set of bits // so that they can be read with XGetImage as well as glReadPixels, assuming the formats are // even compatible ... draw->pOldBits = ((PixmapPtr) draw->base.pDraw)->devPrivate.ptr; ((PixmapPtr) draw->base.pDraw)->devPrivate.ptr = pBits; // Select the DIB into the DC draw->hOldDIB = SelectObject(draw->dibDC, draw->hDIB); if (!draw->hOldDIB) { ErrorF("SelectObject error: %s\n", glxWinErrorMessage()); } screen = glxGetScreen(screenInfo.screens[draw->base.pDraw->pScreen->myNum]); // Set the pixel format of the bitmap glxWinSetPixelFormat(draw->dibDC, draw->base.pDraw->bitsPerPixel, GLX_PIXMAP_BIT, screen, config); GLWIN_DEBUG_MSG ("glxWinDeferredCreateDrawable: DIB bitmap %p created for drawable %p", draw->hDIB, draw); } } break; default: { ErrorF ("glxWinDeferredCreateDrawable: tried to attach unhandled drawable type %d\n", draw->base.type); return; } } } /* ---------------------------------------------------------------------- */ /* * Texture functions */ static int glxWinBindTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap) { ErrorF("glxWinBindTexImage: not implemented\n"); return FALSE; } static int glxWinReleaseTexImage(__GLXcontext * baseContext, int buffer, __GLXdrawable * pixmap) { ErrorF(" glxWinReleaseTexImage: not implemented\n"); return FALSE; } /* ---------------------------------------------------------------------- */ /* * Lazy update context implementation * * WGL contexts are created for a specific HDC, so we cannot create the WGL * context in glxWinCreateContext(), we must defer creation until the context * is actually used on a specific drawable which is connected to a native window, * pbuffer or DIB * * The WGL context may be used on other, compatible HDCs, so we don't need to * recreate it for every new native window * * XXX: I wonder why we can't create the WGL context on the screen HDC ? * Basically we assume all HDCs are compatible at the moment: if they are not * we are in a muddle, there was some code in the old implementation to attempt * to transparently migrate a context to a new DC by copying state and sharing * lists with the old one... */ static Bool glxWinSetPixelFormat(HDC hdc, int bppOverride, int drawableTypeOverride, __GLXscreen *screen, __GLXconfig *config) { glxWinScreen *winScreen = (glxWinScreen *) screen; GLXWinConfig *winConfig = (GLXWinConfig *) config; GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex); /* Normally, we can just use the the pixelFormatIndex corresponding to the fbconfig which has been specified by the client */ if (! ((bppOverride && (bppOverride != (config->redBits + config->greenBits + config->blueBits))) || ((config->drawableType & drawableTypeOverride) == 0))) { if (!SetPixelFormat(hdc, winConfig->pixelFormatIndex, NULL)) { ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } return TRUE; } /* However, in certain special cases this pixel format will be incompatible with the use we are going to put it to, so we need to re-evaluate the pixel format to use: 1) When PFD_DRAW_TO_BITMAP is set, ChoosePixelFormat() always returns a format with the cColorBits we asked for, so we need to ensure it matches the bpp of the bitmap 2) Applications may assume that visuals selected with glXChooseVisual() work with pixmap drawables (there is no attribute to explicitly query for pixmap drawable support as there is for glXChooseFBConfig()) (it's arguable this is an error in the application, but we try to make it work) pixmap rendering is always slow for us, so we don't want to choose those visuals by default, but if the actual drawable type we're trying to select the context on (drawableTypeOverride) isn't supported by the selected fbConfig, reconsider and see if we can find a suitable one... */ ErrorF ("glxWinSetPixelFormat: having second thoughts: cColorbits %d, bppOveride %d; config->drawableType %d, drawableTypeOverride %d\n", (config->redBits + config->greenBits + config->blueBits), bppOverride, config->drawableType, drawableTypeOverride); if (winScreen->has_WGL_ARB_pixel_format) { int pixelFormat = fbConfigToPixelFormatIndex(hdc, config, drawableTypeOverride, winScreen); if (pixelFormat != 0) { GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat); ErrorF ("wglChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex); if (!SetPixelFormat(hdc, pixelFormat, NULL)) { ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } } } /* For some drivers, wglChoosePixelFormatARB() can fail when the provided DC doesn't belong to the driver (e.g. it's a compatible DC for a bitmap, so allow fallback to ChoosePixelFormat() */ { PIXELFORMATDESCRIPTOR pfd; int pixelFormat; /* convert fbConfig to PFD */ if (fbConfigToPixelFormat(config, &pfd, drawableTypeOverride)) { ErrorF("glxWinSetPixelFormat: fbConfigToPixelFormat failed\n"); return FALSE; } if (glxWinDebugSettings.dumpPFD) pfdOut(&pfd); if (bppOverride) { GLWIN_DEBUG_MSG("glxWinSetPixelFormat: Forcing bpp from %d to %d\n", pfd.cColorBits, bppOverride); pfd.cColorBits = bppOverride; } pixelFormat = ChoosePixelFormat(hdc, &pfd); if (pixelFormat == 0) { ErrorF("ChoosePixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } GLWIN_DEBUG_MSG("ChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat); ErrorF ("ChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex); if (!SetPixelFormat(hdc, pixelFormat, &pfd)) { ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); return FALSE; } } return TRUE; } static HDC glxWinMakeDC(__GLXWinContext * gc, __GLXWinDrawable * draw, HDC * hdc, HWND * hwnd) { *hdc = NULL; *hwnd = NULL; if (draw == NULL) { GLWIN_TRACE_MSG("No drawable for context %p (native ctx %p)", gc, gc->ctx); return NULL; } switch (draw->base.type) { case GLX_DRAWABLE_WINDOW: { WindowPtr pWin; pWin = (WindowPtr) draw->base.pDraw; if (pWin == NULL) { GLWIN_TRACE_MSG("for drawable %p, no WindowPtr", pWin); return NULL; } *hwnd = winGetWindowInfo(pWin); if (*hwnd == NULL) { ErrorF("No HWND error: %s\n", glxWinErrorMessage()); return NULL; } *hdc = GetDC(*hwnd); if (*hdc == NULL) ErrorF("GetDC error: %s\n", glxWinErrorMessage()); /* Check if the hwnd has changed... */ if (*hwnd != gc->hwnd) { if (glxWinDebugSettings.enableTrace) GLWIN_DEBUG_HWND(*hwnd); GLWIN_TRACE_MSG ("for context %p (native ctx %p), hWnd changed from %p to %p", gc, gc->ctx, gc->hwnd, *hwnd); gc->hwnd = *hwnd; /* We must select a pixelformat, but SetPixelFormat can only be called once for a window... */ if (!glxWinSetPixelFormat(*hdc, 0, GLX_WINDOW_BIT, gc->base.pGlxScreen, gc->base.config)) { ErrorF("glxWinSetPixelFormat error: %s\n", glxWinErrorMessage()); ReleaseDC(*hwnd, *hdc); *hdc = NULL; return NULL; } } } break; case GLX_DRAWABLE_PBUFFER: { *hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer); if (*hdc == NULL) ErrorF("GetDC (pbuffer) error: %s\n", glxWinErrorMessage()); } break; case GLX_DRAWABLE_PIXMAP: { *hdc = draw->dibDC; } break; default: { ErrorF("glxWinMakeDC: tried to makeDC for unhandled drawable type %d\n", draw->base.type); } } if (glxWinDebugSettings.dumpDC) GLWIN_DEBUG_MSG("Got HDC %p", *hdc); return *hdc; } static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable * draw) { switch (draw->base.type) { case GLX_DRAWABLE_WINDOW: { ReleaseDC(hwnd, hdc); } break; case GLX_DRAWABLE_PBUFFER: { if (!wglReleasePbufferDCARBWrapper(draw->hPbuffer, hdc)) { ErrorF("wglReleasePbufferDCARB error: %s\n", glxWinErrorMessage()); } } break; case GLX_DRAWABLE_PIXMAP: { // don't release DC, the memory DC lives as long as the bitmap // We must ensure that all GDI drawing into the bitmap has completed // in case we subsequently access the bits from it GdiFlush(); } break; default: { ErrorF ("glxWinReleaseDC: tried to releaseDC for unhandled drawable type %d\n", draw->base.type); } } } static void glxWinDeferredCreateContext(__GLXWinContext * gc, __GLXWinDrawable * draw) { HDC dc; HWND hwnd; GLWIN_DEBUG_MSG ("glxWinDeferredCreateContext: attach context %p to drawable %p", gc, draw); glxWinDeferredCreateDrawable(draw, gc->base.config); dc = glxWinMakeDC(gc, draw, &dc, &hwnd); gc->ctx = wglCreateContext(dc); glxWinReleaseDC(hwnd, dc, draw); if (gc->ctx == NULL) { ErrorF("wglCreateContext error: %s\n", glxWinErrorMessage()); return; } GLWIN_DEBUG_MSG ("glxWinDeferredCreateContext: attached context %p to native context %p drawable %p", gc, gc->ctx, draw); // if the native context was created successfully, shareLists if needed if (gc->ctx && gc->shareContext) { GLWIN_DEBUG_MSG ("glxWinCreateContextReal shareLists with context %p (native ctx %p)", gc->shareContext, gc->shareContext->ctx); if (!wglShareLists(gc->shareContext->ctx, gc->ctx)) { ErrorF("wglShareLists error: %s\n", glxWinErrorMessage()); } } } /* ---------------------------------------------------------------------- */ /* * Context functions */ /* Context manipulation routines should return TRUE on success, FALSE on failure */ static int glxWinContextMakeCurrent(__GLXcontext * base) { __GLXWinContext *gc = (__GLXWinContext *) base; glxWinScreen *scr = (glxWinScreen *)base->pGlxScreen; BOOL ret; HDC drawDC; HDC readDC = NULL; __GLXdrawable *drawPriv; __GLXdrawable *readPriv = NULL; HWND hDrawWnd; HWND hReadWnd; GLWIN_TRACE_MSG("glxWinContextMakeCurrent context %p (native ctx %p)", gc, gc->ctx); /* Keep a note of the last active context in the drawable */ drawPriv = gc->base.drawPriv; ((__GLXWinDrawable *) drawPriv)->drawContext = gc; if (gc->ctx == NULL) { glxWinDeferredCreateContext(gc, (__GLXWinDrawable *) drawPriv); } if (gc->ctx == NULL) { ErrorF("glxWinContextMakeCurrent: Native context is NULL\n"); return FALSE; } drawDC = glxWinMakeDC(gc, (__GLXWinDrawable *) drawPriv, &drawDC, &hDrawWnd); if (drawDC == NULL) { ErrorF("glxWinMakeDC failed for drawDC\n"); return FALSE; } if ((gc->base.readPriv != NULL) && (gc->base.readPriv != gc->base.drawPriv)) { /* * We enable GLX_SGI_make_current_read unconditionally, but the * renderer might not support it. It's fairly rare to use this * feature so just error out if it can't work. */ if (!scr->has_WGL_ARB_make_current_read) return FALSE; /* If there is a separate read drawable, create a separate read DC, and use the wglMakeContextCurrent extension to make the context current drawing to one DC and reading from the other */ readPriv = gc->base.readPriv; readDC = glxWinMakeDC(gc, (__GLXWinDrawable *) readPriv, &readDC, &hReadWnd); if (readDC == NULL) { ErrorF("glxWinMakeDC failed for readDC\n"); glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *) drawPriv); return FALSE; } ret = wglMakeContextCurrentARBWrapper(drawDC, readDC, gc->ctx); if (!ret) { ErrorF("wglMakeContextCurrentARBWrapper error: %s\n", glxWinErrorMessage()); } } else { /* Otherwise, just use wglMakeCurrent */ ret = wglMakeCurrent(drawDC, gc->ctx); if (!ret) { ErrorF("wglMakeCurrent error: %s\n", glxWinErrorMessage()); } } // apparently make current could fail if the context is current in a different thread, // but that shouldn't be able to happen in the current server... glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *) drawPriv); if (readDC) glxWinReleaseDC(hReadWnd, readDC, (__GLXWinDrawable *) readPriv); return ret; } static int glxWinContextLoseCurrent(__GLXcontext * base) { BOOL ret; __GLXWinContext *gc = (__GLXWinContext *) base; GLWIN_TRACE_MSG("glxWinContextLoseCurrent context %p (native ctx %p)", gc, gc->ctx); /* An error seems to be reported if we try to make no context current if there is already no current context, so avoid doing that... */ if (wglGetCurrentContext() != NULL) { ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */ if (!ret) ErrorF("glxWinContextLoseCurrent error: %s\n", glxWinErrorMessage()); } return TRUE; } static int glxWinContextCopy(__GLXcontext * dst_base, __GLXcontext * src_base, unsigned long mask) { __GLXWinContext *dst = (__GLXWinContext *) dst_base; __GLXWinContext *src = (__GLXWinContext *) src_base; BOOL ret; GLWIN_DEBUG_MSG("glxWinContextCopy"); ret = wglCopyContext(src->ctx, dst->ctx, mask); if (!ret) { ErrorF("wglCopyContext error: %s\n", glxWinErrorMessage()); } return ret; } static void glxWinContextDestroy(__GLXcontext * base) { __GLXWinContext *gc = (__GLXWinContext *) base; if (gc != NULL) { GLWIN_DEBUG_MSG("GLXcontext %p destroyed (native ctx %p)", base, gc->ctx); if (gc->ctx) { /* It's bad style to delete the context while it's still current */ if (wglGetCurrentContext() == gc->ctx) { wglMakeCurrent(NULL, NULL); } { BOOL ret = wglDeleteContext(gc->ctx); if (!ret) ErrorF("wglDeleteContext error: %s\n", glxWinErrorMessage()); } gc->ctx = NULL; } free(gc); } } static __GLXcontext * glxWinCreateContext(__GLXscreen * screen, __GLXconfig * modes, __GLXcontext * baseShareContext, unsigned num_attribs, const uint32_t * attribs, int *error) { __GLXWinContext *context; __GLXWinContext *shareContext = (__GLXWinContext *) baseShareContext; context = calloc(1, sizeof(__GLXWinContext)); if (!context) return NULL; memset(context, 0, sizeof *context); context->base.destroy = glxWinContextDestroy; context->base.makeCurrent = glxWinContextMakeCurrent; context->base.loseCurrent = glxWinContextLoseCurrent; context->base.copy = glxWinContextCopy; context->base.bindTexImage = glxWinBindTexImage; context->base.releaseTexImage = glxWinReleaseTexImage; context->base.config = modes; context->base.pGlxScreen = screen; // actual native GL context creation is deferred until attach() context->ctx = NULL; context->shareContext = shareContext; GLWIN_DEBUG_MSG("GLXcontext %p created", context); return &(context->base); } /* ---------------------------------------------------------------------- */ /* * Utility functions */ static int GetShift(int mask) { int shift = 0; while (mask > 1) { shift++; mask >>=1; } return shift; } static int fbConfigToPixelFormat(__GLXconfig * mode, PIXELFORMATDESCRIPTOR * pfdret, int drawableTypeOverride) { PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), /* size of this pfd */ 1, /* version number */ PFD_SUPPORT_OPENGL, /* support OpenGL */ PFD_TYPE_RGBA, /* RGBA type */ 24, /* 24-bit color depth */ 0, 0, 0, 0, 0, 0, /* color bits ignored */ 0, /* no alpha buffer */ 0, /* shift bit ignored */ 0, /* no accumulation buffer */ 0, 0, 0, 0, /* accum bits ignored */ 32, /* 32-bit z-buffer */ 0, /* no stencil buffer */ 0, /* no auxiliary buffer */ PFD_MAIN_PLANE, /* main layer */ 0, /* reserved */ 0, 0, 0 /* layer masks ignored */ }; if ((mode->drawableType | drawableTypeOverride) & GLX_WINDOW_BIT) pfd.dwFlags |= PFD_DRAW_TO_WINDOW; /* support window */ if ((mode->drawableType | drawableTypeOverride) & GLX_PIXMAP_BIT) pfd.dwFlags |= (PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI); /* supports software rendering to bitmap */ if (mode->stereoMode) { pfd.dwFlags |= PFD_STEREO; } if (mode->doubleBufferMode) { pfd.dwFlags |= PFD_DOUBLEBUFFER; } pfd.cColorBits = mode->redBits + mode->greenBits + mode->blueBits; pfd.cRedBits = mode->redBits; pfd.cRedShift = GetShift(mode->redMask); pfd.cGreenBits = mode->greenBits; pfd.cGreenShift = GetShift(mode->greenMask); pfd.cBlueBits = mode->blueBits; pfd.cBlueShift = GetShift(mode->blueMask); pfd.cAlphaBits = mode->alphaBits; pfd.cAlphaShift = GetShift(mode->alphaMask); if (mode->visualType == GLX_TRUE_COLOR) { pfd.iPixelType = PFD_TYPE_RGBA; pfd.dwVisibleMask = (pfd.cRedBits << pfd.cRedShift) | (pfd.cGreenBits << pfd.cGreenShift) | (pfd.cBlueBits << pfd.cBlueShift) | (pfd.cAlphaBits << pfd.cAlphaShift); } else { pfd.iPixelType = PFD_TYPE_COLORINDEX; pfd.dwVisibleMask = mode->transparentIndex; } pfd.cAccumBits = mode->accumRedBits + mode->accumGreenBits + mode->accumBlueBits + mode->accumAlphaBits; pfd.cAccumRedBits = mode->accumRedBits; pfd.cAccumGreenBits = mode->accumGreenBits; pfd.cAccumBlueBits = mode->accumBlueBits; pfd.cAccumAlphaBits = mode->accumAlphaBits; pfd.cDepthBits = mode->depthBits; pfd.cStencilBits = mode->stencilBits; pfd.cAuxBuffers = mode->numAuxBuffers; /* mode->level ? */ *pfdret = pfd; return 0; } #define SET_ATTR_VALUE(attr, value) { attribList[i++] = attr; attribList[i++] = value; assert(i < ARRAY_SIZE(attribList)); } static int fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig * mode, int drawableTypeOverride, glxWinScreen * winScreen) { UINT numFormats; unsigned int i = 0; /* convert fbConfig to attr-value list */ int attribList[60]; SET_ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, TRUE); switch (mode->renderType) { case GLX_COLOR_INDEX_BIT: case GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT: SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_COLORINDEX_ARB); SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->indexBits); break; default: ErrorF("unexpected renderType %x\n", mode->renderType); /* fall-through */ case GLX_RGBA_BIT: SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB); SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits); break; case GLX_RGBA_FLOAT_BIT_ARB: SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_FLOAT_ARB); SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits); break; case GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT: SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT); SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, mode->rgbBits); break; } SET_ATTR_VALUE(WGL_RED_BITS_ARB, mode->redBits); SET_ATTR_VALUE(WGL_GREEN_BITS_ARB, mode->greenBits); SET_ATTR_VALUE(WGL_BLUE_BITS_ARB, mode->blueBits); SET_ATTR_VALUE(WGL_ALPHA_BITS_ARB, mode->alphaBits); SET_ATTR_VALUE(WGL_ACCUM_RED_BITS_ARB, mode->accumRedBits); SET_ATTR_VALUE(WGL_ACCUM_GREEN_BITS_ARB, mode->accumGreenBits); SET_ATTR_VALUE(WGL_ACCUM_BLUE_BITS_ARB, mode->accumBlueBits); SET_ATTR_VALUE(WGL_ACCUM_ALPHA_BITS_ARB, mode->accumAlphaBits); SET_ATTR_VALUE(WGL_DEPTH_BITS_ARB, mode->depthBits); SET_ATTR_VALUE(WGL_STENCIL_BITS_ARB, mode->stencilBits); SET_ATTR_VALUE(WGL_AUX_BUFFERS_ARB, mode->numAuxBuffers); if (mode->doubleBufferMode) SET_ATTR_VALUE(WGL_DOUBLE_BUFFER_ARB, TRUE); if (mode->stereoMode) SET_ATTR_VALUE(WGL_STEREO_ARB, TRUE); // Some attributes are only added to the list if the value requested is not 'don't care', as exactly matching that is daft.. if (mode->swapMethod == GLX_SWAP_EXCHANGE_OML) SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB); if (mode->swapMethod == GLX_SWAP_COPY_OML) SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_COPY_ARB); // XXX: this should probably be the other way around, but that messes up drawableTypeOverride if (mode->visualRating == GLX_SLOW_VISUAL_EXT) SET_ATTR_VALUE(WGL_ACCELERATION_ARB, WGL_NO_ACCELERATION_ARB); if (winScreen->has_WGL_ARB_multisample) { SET_ATTR_VALUE(WGL_SAMPLE_BUFFERS_ARB, mode->sampleBuffers); SET_ATTR_VALUE(WGL_SAMPLES_ARB, mode->samples); } // must support all the drawable types the mode supports if ((mode->drawableType | drawableTypeOverride) & GLX_WINDOW_BIT) SET_ATTR_VALUE(WGL_DRAW_TO_WINDOW_ARB, TRUE); // XXX: this is a horrible hacky heuristic, in fact this whole drawableTypeOverride thing is a bad idea // try to avoid asking for formats which don't exist (by not asking for all when adjusting the config to include the drawableTypeOverride) if (drawableTypeOverride == GLX_WINDOW_BIT) { if (mode->drawableType & GLX_PIXMAP_BIT) SET_ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, TRUE); if (mode->drawableType & GLX_PBUFFER_BIT) if (winScreen->has_WGL_ARB_pbuffer) SET_ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, TRUE); } else { if (drawableTypeOverride & GLX_PIXMAP_BIT) SET_ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, TRUE); if (drawableTypeOverride & GLX_PBUFFER_BIT) if (winScreen->has_WGL_ARB_pbuffer) SET_ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, TRUE); } if (winScreen->has_WGL_ARB_framebuffer_sRGB) SET_ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, TRUE); SET_ATTR_VALUE(0, 0); // terminator /* choose the first match */ { int pixelFormatIndex; if (!wglChoosePixelFormatARBWrapper (hdc, attribList, NULL, 1, &pixelFormatIndex, &numFormats)) { ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); } else { if (numFormats > 0) { GLWIN_DEBUG_MSG ("wglChoosePixelFormat: chose pixelFormatIndex %d)", pixelFormatIndex); return pixelFormatIndex; } else ErrorF("wglChoosePixelFormat couldn't decide\n"); } } return 0; } /* ---------------------------------------------------------------------- */ #define BITS_AND_SHIFT_TO_MASK(bits,mask) (((1<<(bits))-1) << (mask)) // // Create the GLXconfigs using DescribePixelFormat() // static void glxWinCreateConfigs(HDC hdc, glxWinScreen * screen) { GLXWinConfig *first = NULL, *prev = NULL; int numConfigs = 0; int i = 0; int n = 0; PIXELFORMATDESCRIPTOR pfd; GLWIN_DEBUG_MSG("glxWinCreateConfigs"); screen->base.numFBConfigs = 0; screen->base.fbconfigs = NULL; // get the number of pixelformats numConfigs = DescribePixelFormat(hdc, 1, sizeof(PIXELFORMATDESCRIPTOR), NULL); LogMessage(X_INFO, "%d pixel formats reported by DescribePixelFormat\n", numConfigs); n = 0; /* fill in configs */ for (i = 0; i < numConfigs; i++) { int rc; GLXWinConfig temp; GLXWinConfig *c = &temp; GLXWinConfig *work; memset(c, 0, sizeof(GLXWinConfig)); c->pixelFormatIndex = i + 1; rc = DescribePixelFormat(hdc, i + 1, sizeof(PIXELFORMATDESCRIPTOR), &pfd); if (!rc) { ErrorF("DescribePixelFormat failed for index %d, error %s\n", i + 1, glxWinErrorMessage()); break; } if (glxWinDebugSettings.dumpPFD) pfdOut(&pfd); if (!(pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP)) || !(pfd.dwFlags & PFD_SUPPORT_OPENGL)) { GLWIN_DEBUG_MSG ("pixelFormat %d has unsuitable flags 0x%08x, skipping", i + 1, (unsigned int)pfd.dwFlags); continue; } c->base.doubleBufferMode = (pfd.dwFlags & PFD_DOUBLEBUFFER) ? GL_TRUE : GL_FALSE; c->base.stereoMode = (pfd.dwFlags & PFD_STEREO) ? GL_TRUE : GL_FALSE; c->base.redBits = pfd.cRedBits; c->base.greenBits = pfd.cGreenBits; c->base.blueBits = pfd.cBlueBits; c->base.alphaBits = pfd.cAlphaBits; c->base.redMask = BITS_AND_SHIFT_TO_MASK(pfd.cRedBits, pfd.cRedShift); c->base.greenMask = BITS_AND_SHIFT_TO_MASK(pfd.cGreenBits, pfd.cGreenShift); c->base.blueMask = BITS_AND_SHIFT_TO_MASK(pfd.cBlueBits, pfd.cBlueShift); c->base.alphaMask = BITS_AND_SHIFT_TO_MASK(pfd.cAlphaBits, pfd.cAlphaShift); c->base.rgbBits = pfd.cColorBits; if (pfd.iPixelType == PFD_TYPE_COLORINDEX) { c->base.indexBits = pfd.cColorBits; } else { c->base.indexBits = 0; } c->base.accumRedBits = pfd.cAccumRedBits; c->base.accumGreenBits = pfd.cAccumGreenBits; c->base.accumBlueBits = pfd.cAccumBlueBits; c->base.accumAlphaBits = pfd.cAccumAlphaBits; // pfd.cAccumBits; c->base.depthBits = pfd.cDepthBits; c->base.stencilBits = pfd.cStencilBits; c->base.numAuxBuffers = pfd.cAuxBuffers; // pfd.iLayerType; // ignored c->base.level = 0; // pfd.dwLayerMask; // ignored // pfd.dwDamageMask; // ignored c->base.visualID = -1; // will be set by __glXScreenInit() /* EXT_visual_rating / GLX 1.2 */ if (pfd.dwFlags & PFD_GENERIC_FORMAT) { c->base.visualRating = GLX_SLOW_VISUAL_EXT; GLWIN_DEBUG_MSG("pixelFormat %d is un-accelerated, skipping", i + 1); continue; } else { // PFD_GENERIC_ACCELERATED is not considered, so this may be MCD or ICD accelerated... c->base.visualRating = GLX_NONE_EXT; } /* EXT_visual_info / GLX 1.2 */ if (pfd.iPixelType == PFD_TYPE_COLORINDEX) { c->base.visualType = GLX_STATIC_COLOR; c->base.transparentRed = GLX_NONE; c->base.transparentGreen = GLX_NONE; c->base.transparentBlue = GLX_NONE; c->base.transparentAlpha = GLX_NONE; c->base.transparentIndex = pfd.dwVisibleMask; c->base.transparentPixel = GLX_TRANSPARENT_INDEX; } else { c->base.visualType = GLX_TRUE_COLOR; c->base.transparentRed = (pfd.dwVisibleMask & c->base.redMask) >> pfd.cRedShift; c->base.transparentGreen = (pfd.dwVisibleMask & c->base.greenMask) >> pfd.cGreenShift; c->base.transparentBlue = (pfd.dwVisibleMask & c->base.blueMask) >> pfd.cBlueShift; c->base.transparentAlpha = (pfd.dwVisibleMask & c->base.alphaMask) >> pfd.cAlphaShift; c->base.transparentIndex = GLX_NONE; c->base.transparentPixel = GLX_TRANSPARENT_RGB; } /* ARB_multisample / SGIS_multisample */ c->base.sampleBuffers = 0; c->base.samples = 0; /* SGIX_fbconfig / GLX 1.3 */ c->base.drawableType = (((pfd.dwFlags & PFD_DRAW_TO_WINDOW) ? GLX_WINDOW_BIT : 0) | ((pfd.dwFlags & PFD_DRAW_TO_BITMAP) ? GLX_PIXMAP_BIT : 0)); if (pfd.iPixelType == PFD_TYPE_COLORINDEX) { c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT; } else { c->base.renderType = GLX_RGBA_BIT; } c->base.fbconfigID = -1; // will be set by __glXScreenInit() /* SGIX_pbuffer / GLX 1.3 */ // XXX: How can we find these values out ??? c->base.maxPbufferWidth = -1; c->base.maxPbufferHeight = -1; c->base.maxPbufferPixels = -1; c->base.optimalPbufferWidth = 0; // there is no optimal value c->base.optimalPbufferHeight = 0; /* SGIX_visual_select_group */ // arrange for visuals with the best acceleration to be preferred in selection switch (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) { case 0: c->base.visualSelectGroup = 2; break; case PFD_GENERIC_ACCELERATED: c->base.visualSelectGroup = 1; break; case PFD_GENERIC_FORMAT: c->base.visualSelectGroup = 0; break; default: ; // "can't happen" } /* OML_swap_method */ if (pfd.dwFlags & PFD_SWAP_EXCHANGE) c->base.swapMethod = GLX_SWAP_EXCHANGE_OML; else if (pfd.dwFlags & PFD_SWAP_COPY) c->base.swapMethod = GLX_SWAP_COPY_OML; else c->base.swapMethod = GLX_SWAP_UNDEFINED_OML; /* EXT_texture_from_pixmap */ c->base.bindToTextureRgb = -1; c->base.bindToTextureRgba = -1; c->base.bindToMipmapTexture = -1; c->base.bindToTextureTargets = -1; c->base.yInverted = -1; c->base.sRGBCapable = 0; n++; // allocate and save work = malloc(sizeof(GLXWinConfig)); if (NULL == work) { ErrorF("Failed to allocate GLXWinConfig\n"); break; } *work = temp; // note the first config if (!first) first = work; // update previous config to point to this config if (prev) prev->base.next = &(work->base); prev = work; } GLWIN_DEBUG_MSG ("found %d pixelFormats suitable for conversion to fbConfigs", n); screen->base.numFBConfigs = n; screen->base.fbconfigs = first ? &(first->base) : NULL; } // helper function to access an attribute value from an attribute value array by attribute static int getAttrValue(const int attrs[], int values[], unsigned int num, int attr, int fallback) { unsigned int i; for (i = 0; i < num; i++) { if (attrs[i] == attr) { GLWIN_TRACE_MSG("getAttrValue attr 0x%x, value %d", attr, values[i]); return values[i]; } } ErrorF("getAttrValue failed to find attr 0x%x, using default value %d\n", attr, fallback); return fallback; } // // Create the GLXconfigs using wglGetPixelFormatAttribfvARB() extension // static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen * screen, PixelFormatRejectStats * rejects) { GLXWinConfig *first = NULL, *prev = NULL; int i = 0; int n = 0; const int attr = WGL_NUMBER_PIXEL_FORMATS_ARB; int numConfigs; int attrs[50]; unsigned int num_attrs = 0; GLWIN_DEBUG_MSG("glxWinCreateConfigsExt"); screen->base.numFBConfigs = 0; screen->base.fbconfigs = NULL; if (!wglGetPixelFormatAttribivARBWrapper(hdc, 0, 0, 1, &attr, &numConfigs)) { ErrorF ("wglGetPixelFormatAttribivARB failed for WGL_NUMBER_PIXEL_FORMATS_ARB: %s\n", glxWinErrorMessage()); return; } LogMessage(X_INFO, "%d pixel formats reported by wglGetPixelFormatAttribivARB\n", numConfigs); n = 0; #define ADD_ATTR(a) { attrs[num_attrs++] = a; assert(num_attrs < ARRAY_SIZE(attrs)); } ADD_ATTR(WGL_DRAW_TO_WINDOW_ARB); ADD_ATTR(WGL_DRAW_TO_BITMAP_ARB); ADD_ATTR(WGL_ACCELERATION_ARB); ADD_ATTR(WGL_SWAP_LAYER_BUFFERS_ARB); ADD_ATTR(WGL_NUMBER_OVERLAYS_ARB); ADD_ATTR(WGL_NUMBER_UNDERLAYS_ARB); ADD_ATTR(WGL_TRANSPARENT_ARB); ADD_ATTR(WGL_TRANSPARENT_RED_VALUE_ARB); ADD_ATTR(WGL_TRANSPARENT_GREEN_VALUE_ARB); ADD_ATTR(WGL_TRANSPARENT_GREEN_VALUE_ARB); ADD_ATTR(WGL_TRANSPARENT_ALPHA_VALUE_ARB); ADD_ATTR(WGL_SUPPORT_OPENGL_ARB); ADD_ATTR(WGL_DOUBLE_BUFFER_ARB); ADD_ATTR(WGL_STEREO_ARB); ADD_ATTR(WGL_PIXEL_TYPE_ARB); ADD_ATTR(WGL_COLOR_BITS_ARB); ADD_ATTR(WGL_RED_BITS_ARB); ADD_ATTR(WGL_RED_SHIFT_ARB); ADD_ATTR(WGL_GREEN_BITS_ARB); ADD_ATTR(WGL_GREEN_SHIFT_ARB); ADD_ATTR(WGL_BLUE_BITS_ARB); ADD_ATTR(WGL_BLUE_SHIFT_ARB); ADD_ATTR(WGL_ALPHA_BITS_ARB); ADD_ATTR(WGL_ALPHA_SHIFT_ARB); ADD_ATTR(WGL_ACCUM_RED_BITS_ARB); ADD_ATTR(WGL_ACCUM_GREEN_BITS_ARB); ADD_ATTR(WGL_ACCUM_BLUE_BITS_ARB); ADD_ATTR(WGL_ACCUM_ALPHA_BITS_ARB); ADD_ATTR(WGL_DEPTH_BITS_ARB); ADD_ATTR(WGL_STENCIL_BITS_ARB); ADD_ATTR(WGL_AUX_BUFFERS_ARB); ADD_ATTR(WGL_SWAP_METHOD_ARB); if (screen->has_WGL_ARB_multisample) { // we may not query these attrs if WGL_ARB_multisample is not offered ADD_ATTR(WGL_SAMPLE_BUFFERS_ARB); ADD_ATTR(WGL_SAMPLES_ARB); } if (screen->has_WGL_ARB_render_texture) { // we may not query these attrs if WGL_ARB_render_texture is not offered ADD_ATTR(WGL_BIND_TO_TEXTURE_RGB_ARB); ADD_ATTR(WGL_BIND_TO_TEXTURE_RGBA_ARB); } if (screen->has_WGL_ARB_pbuffer) { // we may not query these attrs if WGL_ARB_pbuffer is not offered ADD_ATTR(WGL_DRAW_TO_PBUFFER_ARB); ADD_ATTR(WGL_MAX_PBUFFER_PIXELS_ARB); ADD_ATTR(WGL_MAX_PBUFFER_WIDTH_ARB); ADD_ATTR(WGL_MAX_PBUFFER_HEIGHT_ARB); } if (screen->has_WGL_ARB_framebuffer_sRGB) { // we may not query these attrs if WGL_ARB_framebuffer_sRGB is not offered ADD_ATTR(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB); } /* fill in configs */ for (i = 0; i < numConfigs; i++) { int values[num_attrs]; GLXWinConfig temp; GLXWinConfig *c = &temp; GLXWinConfig *work; memset(c, 0, sizeof(GLXWinConfig)); c->pixelFormatIndex = i + 1; if (!wglGetPixelFormatAttribivARBWrapper (hdc, i + 1, 0, num_attrs, attrs, values)) { ErrorF ("wglGetPixelFormatAttribivARB failed for index %d, error %s\n", i + 1, glxWinErrorMessage()); break; } #define ATTR_VALUE(a, d) getAttrValue(attrs, values, num_attrs, (a), (d)) if (!ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, 0)) { rejects->notOpenGL++; GLWIN_DEBUG_MSG ("pixelFormat %d isn't WGL_SUPPORT_OPENGL_ARB, skipping", i + 1); continue; } c->base.doubleBufferMode = ATTR_VALUE(WGL_DOUBLE_BUFFER_ARB, 0) ? GL_TRUE : GL_FALSE; c->base.stereoMode = ATTR_VALUE(WGL_STEREO_ARB, 0) ? GL_TRUE : GL_FALSE; c->base.redBits = ATTR_VALUE(WGL_RED_BITS_ARB, 0); c->base.greenBits = ATTR_VALUE(WGL_GREEN_BITS_ARB, 0); c->base.blueBits = ATTR_VALUE(WGL_BLUE_BITS_ARB, 0); c->base.alphaBits = ATTR_VALUE(WGL_ALPHA_BITS_ARB, 0); c->base.redMask = BITS_AND_SHIFT_TO_MASK(c->base.redBits, ATTR_VALUE(WGL_RED_SHIFT_ARB, 0)); c->base.greenMask = BITS_AND_SHIFT_TO_MASK(c->base.greenBits, ATTR_VALUE(WGL_GREEN_SHIFT_ARB, 0)); c->base.blueMask = BITS_AND_SHIFT_TO_MASK(c->base.blueBits, ATTR_VALUE(WGL_BLUE_SHIFT_ARB, 0)); c->base.alphaMask = BITS_AND_SHIFT_TO_MASK(c->base.alphaBits, ATTR_VALUE(WGL_ALPHA_SHIFT_ARB, 0)); switch (ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0)) { case WGL_TYPE_COLORINDEX_ARB: c->base.indexBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); c->base.rgbBits = 0; c->base.visualType = GLX_STATIC_COLOR; c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT; /* Assume RGBA rendering is available on all single-channel visuals (it is specified to render to red component in single-channel visuals, if supported, but there doesn't seem to be any mechanism to check if it is supported) Color index rendering is only supported on single-channel visuals */ break; case WGL_TYPE_RGBA_ARB: c->base.indexBits = 0; c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); c->base.visualType = GLX_TRUE_COLOR; c->base.renderType = GLX_RGBA_BIT; break; case WGL_TYPE_RGBA_FLOAT_ARB: c->base.indexBits = 0; c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); c->base.visualType = GLX_TRUE_COLOR; c->base.renderType = GLX_RGBA_FLOAT_BIT_ARB; // assert pbuffer drawable // assert WGL_ARB_pixel_format_float break; case WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT: c->base.indexBits = 0; c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); c->base.visualType = GLX_TRUE_COLOR; c->base.renderType = GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT; // assert pbuffer drawable // assert WGL_EXT_pixel_format_packed_float break; default: rejects->unknownPixelType++; ErrorF ("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_PIXEL_TYPE_ARB\n", ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0)); continue; } c->base.accumRedBits = ATTR_VALUE(WGL_ACCUM_RED_BITS_ARB, 0); c->base.accumGreenBits = ATTR_VALUE(WGL_ACCUM_GREEN_BITS_ARB, 0); c->base.accumBlueBits = ATTR_VALUE(WGL_ACCUM_BLUE_BITS_ARB, 0); c->base.accumAlphaBits = ATTR_VALUE(WGL_ACCUM_ALPHA_BITS_ARB, 0); c->base.depthBits = ATTR_VALUE(WGL_DEPTH_BITS_ARB, 0); c->base.stencilBits = ATTR_VALUE(WGL_STENCIL_BITS_ARB, 0); c->base.numAuxBuffers = ATTR_VALUE(WGL_AUX_BUFFERS_ARB, 0); { int layers = ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB, 0) + ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0); if (layers > 0) { ErrorF ("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled\n", i, ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB, 0), ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0)); // XXX: need to iterate over layers? } } c->base.level = 0; c->base.visualID = -1; // will be set by __glXScreenInit() /* EXT_visual_rating / GLX 1.2 */ switch (ATTR_VALUE(WGL_ACCELERATION_ARB, 0)) { default: ErrorF ("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_ACCELERATION_ARB\n", ATTR_VALUE(WGL_ACCELERATION_ARB, 0)); case WGL_NO_ACCELERATION_ARB: rejects->unaccelerated++; c->base.visualRating = GLX_SLOW_VISUAL_EXT; GLWIN_DEBUG_MSG("pixelFormat %d is un-accelerated, skipping", i + 1); continue; break; case WGL_GENERIC_ACCELERATION_ARB: case WGL_FULL_ACCELERATION_ARB: c->base.visualRating = GLX_NONE_EXT; break; } /* EXT_visual_info / GLX 1.2 */ // c->base.visualType is set above if (ATTR_VALUE(WGL_TRANSPARENT_ARB, 0)) { c->base.transparentPixel = (c->base.visualType == GLX_TRUE_COLOR) ? GLX_TRANSPARENT_RGB_EXT : GLX_TRANSPARENT_INDEX_EXT; c->base.transparentRed = ATTR_VALUE(WGL_TRANSPARENT_RED_VALUE_ARB, 0); c->base.transparentGreen = ATTR_VALUE(WGL_TRANSPARENT_GREEN_VALUE_ARB, 0); c->base.transparentBlue = ATTR_VALUE(WGL_TRANSPARENT_BLUE_VALUE_ARB, 0); c->base.transparentAlpha = ATTR_VALUE(WGL_TRANSPARENT_ALPHA_VALUE_ARB, 0); c->base.transparentIndex = ATTR_VALUE(WGL_TRANSPARENT_INDEX_VALUE_ARB, 0); } else { c->base.transparentPixel = GLX_NONE_EXT; c->base.transparentRed = GLX_NONE; c->base.transparentGreen = GLX_NONE; c->base.transparentBlue = GLX_NONE; c->base.transparentAlpha = GLX_NONE; c->base.transparentIndex = GLX_NONE; } /* ARB_multisample / SGIS_multisample */ if (screen->has_WGL_ARB_multisample) { c->base.sampleBuffers = ATTR_VALUE(WGL_SAMPLE_BUFFERS_ARB, 0); c->base.samples = ATTR_VALUE(WGL_SAMPLES_ARB, 0); } else { c->base.sampleBuffers = 0; c->base.samples = 0; } /* SGIX_fbconfig / GLX 1.3 */ c->base.drawableType = ((ATTR_VALUE(WGL_DRAW_TO_WINDOW_ARB, 0) ? GLX_WINDOW_BIT : 0) | (ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, 0) ? GLX_PIXMAP_BIT : 0) | (ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, 0) ? GLX_PBUFFER_BIT : 0)); c->base.fbconfigID = -1; // will be set by __glXScreenInit() /* SGIX_pbuffer / GLX 1.3 */ if (screen->has_WGL_ARB_pbuffer) { c->base.maxPbufferWidth = ATTR_VALUE(WGL_MAX_PBUFFER_WIDTH_ARB, -1); c->base.maxPbufferHeight = ATTR_VALUE(WGL_MAX_PBUFFER_HEIGHT_ARB, -1); c->base.maxPbufferPixels = ATTR_VALUE(WGL_MAX_PBUFFER_PIXELS_ARB, -1); } else { c->base.maxPbufferWidth = -1; c->base.maxPbufferHeight = -1; c->base.maxPbufferPixels = -1; } c->base.optimalPbufferWidth = 0; // there is no optimal value c->base.optimalPbufferHeight = 0; /* SGIX_visual_select_group */ // arrange for visuals with the best acceleration to be preferred in selection switch (ATTR_VALUE(WGL_ACCELERATION_ARB, 0)) { case WGL_FULL_ACCELERATION_ARB: c->base.visualSelectGroup = 2; break; case WGL_GENERIC_ACCELERATION_ARB: c->base.visualSelectGroup = 1; break; default: case WGL_NO_ACCELERATION_ARB: c->base.visualSelectGroup = 0; break; } /* OML_swap_method */ switch (ATTR_VALUE(WGL_SWAP_METHOD_ARB, 0)) { case WGL_SWAP_EXCHANGE_ARB: c->base.swapMethod = GLX_SWAP_EXCHANGE_OML; break; case WGL_SWAP_COPY_ARB: c->base.swapMethod = GLX_SWAP_COPY_OML; break; default: ErrorF ("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_SWAP_METHOD_ARB\n", ATTR_VALUE(WGL_SWAP_METHOD_ARB, 0)); case WGL_SWAP_UNDEFINED_ARB: c->base.swapMethod = GLX_SWAP_UNDEFINED_OML; } /* EXT_texture_from_pixmap */ /* Mesa's DRI configs always have bindToTextureRgb/Rgba TRUE (see driCreateConfigs(), so setting bindToTextureRgb/bindToTextureRgba to FALSE means that swrast can't find any fbConfigs to use, so setting these to 0, even if we know bindToTexture isn't available, isn't a good idea... */ if (screen->has_WGL_ARB_render_texture) { c->base.bindToTextureRgb = ATTR_VALUE(WGL_BIND_TO_TEXTURE_RGB_ARB, -1); c->base.bindToTextureRgba = ATTR_VALUE(WGL_BIND_TO_TEXTURE_RGBA_ARB, -1); } else { c->base.bindToTextureRgb = -1; c->base.bindToTextureRgba = -1; } c->base.bindToMipmapTexture = -1; c->base.bindToTextureTargets = GLX_TEXTURE_1D_BIT_EXT | GLX_TEXTURE_2D_BIT_EXT | GLX_TEXTURE_RECTANGLE_BIT_EXT; c->base.yInverted = -1; /* WGL_ARB_framebuffer_sRGB */ if (screen->has_WGL_ARB_framebuffer_sRGB) c->base.sRGBCapable = ATTR_VALUE(WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB, 0); else c->base.sRGBCapable = 0; n++; // allocate and save work = malloc(sizeof(GLXWinConfig)); if (NULL == work) { ErrorF("Failed to allocate GLXWinConfig\n"); break; } *work = temp; // note the first config if (!first) first = work; // update previous config to point to this config if (prev) prev->base.next = &(work->base); prev = work; } screen->base.numFBConfigs = n; screen->base.fbconfigs = first ? &(first->base) : NULL; } xorg-server-21.1.16/hw/xwin/glx/indirect.h0000644000175000017500000000575414757411105014015 /* * Copyright © 2014 Jon TURNEY * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef indirect_h #define indirect_h #include #include #include /* ---------------------------------------------------------------------- */ /* * structure definitions */ typedef struct __GLXWinContext __GLXWinContext; typedef struct __GLXWinDrawable __GLXWinDrawable; typedef struct __GLXWinScreen glxWinScreen; typedef struct __GLXWinConfig GLXWinConfig; struct __GLXWinContext { __GLXcontext base; HGLRC ctx; /* Windows GL Context */ __GLXWinContext *shareContext; /* Context with which we will share display lists and textures */ HWND hwnd; /* For detecting when HWND has changed */ }; struct __GLXWinDrawable { __GLXdrawable base; __GLXWinContext *drawContext; __GLXWinContext *readContext; /* If this drawable is GLX_DRAWABLE_PBUFFER */ HPBUFFERARB hPbuffer; /* If this drawable is GLX_DRAWABLE_PIXMAP */ HDC dibDC; HANDLE hSection; /* file mapping handle */ HBITMAP hDIB; HBITMAP hOldDIB; /* original DIB for DC */ void *pOldBits; /* original pBits for this drawable's pixmap */ }; struct __GLXWinScreen { __GLXscreen base; Bool has_WGL_ARB_multisample; Bool has_WGL_ARB_pixel_format; Bool has_WGL_ARB_pbuffer; Bool has_WGL_ARB_render_texture; Bool has_WGL_ARB_make_current_read; Bool has_WGL_ARB_framebuffer_sRGB; /* wrapped screen functions */ RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; CopyWindowProcPtr CopyWindow; }; struct __GLXWinConfig { __GLXconfig base; int pixelFormatIndex; }; /* ---------------------------------------------------------------------- */ /* * function prototypes */ void glxWinDeferredCreateDrawable(__GLXWinDrawable *draw, __GLXconfig *config); #endif /* indirect_h */ xorg-server-21.1.16/hw/xwin/glx/wgl_ext_api.c0000644000175000017500000000462514757411105014505 /* * File: wgl_ext_api.c * Purpose: Wrapper functions for Win32 OpenGL wgl extension functions * * Authors: Jon TURNEY * * Copyright (c) Jon TURNEY 2009 * * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include #include #include #include #include "glwindows.h" #define RESOLVE_DECL(type) \ static type type##proc = NULL; #define PRERESOLVE(type, symbol) \ type##proc = (type)wglGetProcAddress(symbol); #define RESOLVE_RET(type, symbol, retval) \ if (type##proc == NULL) { \ ErrorF("wglwrap: Can't resolve \"%s\"\n", symbol); \ __glXErrorCallBack(0); \ return retval; \ } #define RESOLVE(procname, symbol) RESOLVE_RET(procname, symbol,) #define RESOLVED_PROC(type) type##proc /* * Include generated cdecl wrappers for stdcall WGL functions * * There are extensions to the wgl*() API as well; again we call * these functions by using wglGetProcAddress() to get a pointer * to the function, and wrapping it for cdecl/stdcall conversion * * We arrange to resolve the functions up front, as they need a * context to work, as we like to use them to be able to select * a context. Again, this assumption fails badly on multimontor * systems... */ #include "generated_wgl_wrappers.ic" xorg-server-21.1.16/hw/xwin/glx/wgl_ext_api.h0000644000175000017500000000635214757411105014511 /* * File: wgl_ext_api.h * Purpose: Wrapper functions for Win32 OpenGL wgl extension functions * * Authors: Jon TURNEY * * Copyright (c) Jon TURNEY 2009 * * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifndef wgl_ext_api_h #define wgl_ext_api_h #include void wglResolveExtensionProcs(void); /* Prototypes for wrapper functions we actually use XXX: should be automatically generated as well */ const char *wglGetExtensionsStringARBWrapper(HDC hdc); BOOL wglMakeContextCurrentARBWrapper(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); HDC wglGetCurrentReadDCARBWrapper(VOID); BOOL wglGetPixelFormatAttribivARBWrapper(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); BOOL wglGetPixelFormatAttribfvARBWrapper(HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT * pfValues); BOOL wglChoosePixelFormatARBWrapper(HDC hdc, const int *piAttribIList, const FLOAT * pfAttribFList, UINT nMaxFormats, int *piFormats, UINT * nNumFormats); HPBUFFERARB wglCreatePbufferARBWrapper(HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); HDC wglGetPbufferDCARBWrapper(HPBUFFERARB hPbuffer); int wglReleasePbufferDCARBWrapper(HPBUFFERARB hPbuffer, HDC hDC); BOOL wglDestroyPbufferARBWrapper(HPBUFFERARB hPbuffer); BOOL wglQueryPbufferARBWrapper(HPBUFFERARB hPbuffer, int iAttribute, int *piValue); BOOL wglSwapIntervalEXTWrapper(int interval); int wglGetSwapIntervalEXTWrapper(void); #endif /* wgl_ext_api_h */ xorg-server-21.1.16/hw/xwin/glx/dri_helpers.c0000644000175000017500000001011014757411105014465 /* * Copyright © 2014 Jon Turney * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include "indirect.h" #include "winpriv.h" #include "dri_helpers.h" #include "win.h" int glxWinQueryDrawable(ClientPtr client, XID drawId, unsigned int *type, unsigned int *handle) { __GLXWinDrawable *pDrawable; int err; if (validGlxDrawable(client, drawId, GLX_DRAWABLE_ANY, DixReadAccess, (__GLXdrawable **)&pDrawable, &err)) { switch (pDrawable->base.type) { case GLX_DRAWABLE_WINDOW: { HWND h = winGetWindowInfo((WindowPtr)(pDrawable->base.pDraw)); *handle = (uintptr_t)h; *type = WindowsDRIDrawableWindow; } break; case GLX_DRAWABLE_PIXMAP: glxWinDeferredCreateDrawable(pDrawable, pDrawable->base.config); *handle = pDrawable->base.pDraw->id; // The XID is used to create a unique name for a file mapping // shared with the requesting process // // XXX: Alternatively, we could use an anonymous file mapping // and use DuplicateHandle to make pDrawable->hSection available // to the requesting process... ? *type = WindowsDRIDrawablePixmap; break; case GLX_DRAWABLE_PBUFFER: glxWinDeferredCreateDrawable(pDrawable, pDrawable->base.config); *handle = (uintptr_t)(pDrawable->hPbuffer); *type = WindowsDRIDrawablePbuffer; break; default: assert(FALSE); *handle = 0; } } else { HWND h; /* The drawId XID doesn't identify a GLX drawable. The only other valid alternative is that it is the XID of a window drawable that is being used by the pre-GLX 1.3 interface */ DrawablePtr pDraw; int rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixGetAttrAccess); if (rc != Success || pDraw->type != DRAWABLE_WINDOW) { return err; } h = winGetWindowInfo((WindowPtr)(pDraw)); *handle = (uintptr_t)h; *type = WindowsDRIDrawableWindow; } winDebug("glxWinQueryDrawable: type %d, handle %p\n", *type, (void *)(uintptr_t)*handle); return Success; } int glxWinFBConfigIDToPixelFormatIndex(int scr, int fbConfigID) { __GLXscreen *screen = glxGetScreen(screenInfo.screens[scr]); __GLXconfig *c; for (c = screen->fbconfigs; c != NULL; c = c->next) { if (c->fbconfigID == fbConfigID) return ((GLXWinConfig *)c)->pixelFormatIndex; } return 0; } Bool glxWinGetScreenAiglxIsActive(ScreenPtr pScreen) { winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); return pWinScreen->fNativeGlActive; } xorg-server-21.1.16/hw/xwin/glx/dri_helpers.h0000644000175000017500000000267114757411105014507 /* * Copyright © 2014 Jon Turney * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef dri_helpers_h #define dri_helpers_h #include "dixstruct.h" int glxWinQueryDrawable(ClientPtr client, XID drawId, unsigned int *type, unsigned int *handle); int glxWinFBConfigIDToPixelFormatIndex(int scr, int fbConfigID); Bool glxWinGetScreenAiglxIsActive(ScreenPtr pScreen); #endif /* dri_helpers_h */ xorg-server-21.1.16/hw/xwin/glx/glthunk.c0000644000175000017500000000530714757411105013655 /* * File: glthunk.c * Purpose: cdecl thunk wrapper library for Win32 stdcall OpenGL library * * Copyright (c) Jon TURNEY 2009,2013 * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ // define USE_OPENGL32 makes gl.h declare gl*() function prototypes with stdcall linkage, // so our generated wrappers will correctly link with the functions in opengl32.dll #define USE_OPENGL32 #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #define GL_GLEXT_LEGACY #include #undef GL_ARB_imaging #undef GL_VERSION_1_3 #include static PROC glWinResolveHelper(PROC * cache, const char *symbol) { PROC proc = NULL; /* If not yet cached, call wglGetProcAddress */ if ((*cache) == NULL) { proc = wglGetProcAddress(symbol); if (proc == NULL) { (*cache) = (PROC) - 1; } else { (*cache) = proc; } } /* Cached wglGetProcAddress failure */ else if ((*cache) == (PROC) - 1) { proc = 0; } /* Cached wglGetProcAddress result */ else { proc = (*cache); } return proc; } #define RESOLVE_RET(proctype, symbol, retval) \ static PROC cache = NULL; \ __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \ if (proc == NULL) { \ return retval; \ } #define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) #define RESOLVED_PROC(proctype) proc /* Include generated cdecl wrappers for stdcall gl*() functions in opengl32.dll OpenGL 1.2 and upward is treated as extensions, function address must found using wglGetProcAddress(), but also stdcall so still need wrappers... */ #include "generated_gl_thunks.ic" xorg-server-21.1.16/hw/xwin/glx/gen_gl_wrappers.py0000755000175000017500000004144214757411105015570 #!/usr/bin/python3 # # python script to generate cdecl to stdcall wrappers for GL functions # adapted from genheaders.py # # Copyright (c) 2013 The Khronos Group Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and/or associated documentation files (the # "Materials"), to deal in the Materials without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Materials, and to # permit persons to whom the Materials are furnished to do so, subject to # the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Materials. # # THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 # MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. import sys, time, pdb, string, cProfile from reg import * # Default input / log files errFilename = None diagFilename = 'diag.txt' regFilename = 'gl.xml' outFilename = 'gen_gl_wrappers.c' protect=True prefix="gl" preresolve=False wrapper=False shim=False thunk=False thunkdefs=False staticwrappers=False nodebug=False # list of WGL extension functions we use used_wgl_ext_fns = {key: 1 for key in [ "wglSwapIntervalEXT", "wglGetExtensionsStringARB", "wglDestroyPbufferARB", "wglGetPbufferDCARB", "wglReleasePbufferDCARB", "wglCreatePbufferARB", "wglMakeContextCurrentARB", "wglChoosePixelFormatARB", "wglGetPixelFormatAttribivARB", "wglGetPixelFormatAttribivARB" ]} if __name__ == '__main__': i = 1 while (i < len(sys.argv)): arg = sys.argv[i] i = i + 1 if (arg == '-noprotect'): print('Disabling inclusion protection in output headers', file=sys.stderr) protect = False elif (arg == '-registry'): regFilename = sys.argv[i] i = i+1 print('Using registry', regFilename, file=sys.stderr) elif (arg == '-outfile'): outFilename = sys.argv[i] i = i+1 elif (arg == '-preresolve'): preresolve=True elif (arg == '-wrapper'): wrapper=True elif (arg == '-shim'): shim=True elif (arg == '-thunk'): thunk=True elif (arg == '-thunkdefs'): thunkdefs=True elif (arg == '-staticwrappers'): staticwrappers=True elif (arg == '-prefix'): prefix = sys.argv[i] i = i+1 elif (arg == '-nodebug'): nodebug = True elif (arg[0:1] == '-'): print('Unrecognized argument:', arg, file=sys.stderr) exit(1) print('Generating', outFilename, file=sys.stderr) # Load & parse registry reg = Registry() tree = etree.parse(regFilename) reg.loadElementTree(tree) if shim: versions = '1\.[012]' else: versions = '.*' genOpts = CGeneratorOptions( apiname = prefix, profile = 'compatibility', versions = versions, emitversions = versions, defaultExtensions = prefix, # Default extensions for GL protectFile = protect, protectFeature = protect, protectProto = protect, ) # create error/warning & diagnostic files if (errFilename): errWarn = open(errFilename,'w') else: errWarn = sys.stderr diag = open(diagFilename, 'w') def ParseCmdRettype(cmd): proto=noneStr(cmd.elem.find('proto')) rettype=noneStr(proto.text) if rettype.lower()!="void ": plist = ([t for t in proto.itertext()]) rettype = ''.join(plist[:-1]) rettype=rettype.strip() return rettype def ParseCmdParams(cmd): params = cmd.elem.findall('param') plist=[] for param in params: # construct the formal parameter definition from ptype and name # elements, also using any text found around these in the # param element, in the order it appears in the document paramtype = '' # also extract the formal parameter name from the name element paramname = '' for t in param.iter(): if t.tag == 'ptype' or t.tag == 'param': paramtype = paramtype + noneStr(t.text) if t.tag == 'name': paramname = t.text + '_' paramtype = paramtype + ' ' + paramname if t.tail is not None: paramtype = paramtype + t.tail.strip() plist.append((paramtype, paramname)) return plist class PreResolveOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) self.wrappers={} def beginFile(self, genOpts): self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): self.outFile.write('\nvoid ' + prefix + 'ResolveExtensionProcs(void)\n{\n') for funcname in self.wrappers.keys(): self.outFile.write( ' PRERESOLVE(PFN' + funcname.upper() + 'PROC, "' + funcname + '");\n') self.outFile.write('}\n\n') def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): OutputGenerator.genType(self, typeinfo, name) def genEnum(self, enuminfo, name): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) if prefix == 'wgl' and not name in used_wgl_ext_fns: return self.outFile.write('RESOLVE_DECL(PFN' + name.upper() + 'PROC);\n') self.wrappers[name]=1 class WrapperOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) def beginFile(self, genOpts): self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): pass def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) self.OldVersion = self.featureName.startswith('GL_VERSION_1_0') or self.featureName.startswith('GL_VERSION_1_1') def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): OutputGenerator.genType(self, typeinfo, name) def genEnum(self, enuminfo, name): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) if prefix == 'wgl' and not name in used_wgl_ext_fns: return rettype=ParseCmdRettype(cmd) if staticwrappers: self.outFile.write("static ") self.outFile.write("%s %sWrapper("%(rettype, name)) plist=ParseCmdParams(cmd) Comma="" if len(plist): for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, ptype)) Comma=", " else: self.outFile.write("void") self.outFile.write(")\n{\n") # for GL 1.0 and 1.1 functions, generate stdcall wrappers which call the function directly if self.OldVersion: if not nodebug: self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) self.outFile.write(" glWinDirectProcCalls++;\n") self.outFile.write("\n") if rettype.lower()=="void": self.outFile.write(" %s( "%(name)) else: self.outFile.write(" return %s( "%(name)) Comma="" for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, pname)) Comma=", " # for GL 1.2+ functions, generate stdcall wrappers which use wglGetProcAddress() else: if rettype.lower()=="void": self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) if not nodebug: self.outFile.write("\n") self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) self.outFile.write("\n") self.outFile.write(" RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) else: self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", FALSE);\n'%(name.upper(), name)) if not nodebug: self.outFile.write("\n") self.outFile.write(' if (glxWinDebugSettings.enable%scallTrace) ErrorF("%s\\n");\n'%(prefix.upper(), name)) self.outFile.write("\n") self.outFile.write(" return RESOLVED_PROC(PFN%sPROC)("%(name.upper())) Comma="" for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, pname)) Comma=", " self.outFile.write(" );\n}\n\n") class ThunkOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) def beginFile(self, genOpts): self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): pass def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) self.OldVersion = (self.featureName in ['GL_VERSION_1_0', 'GL_VERSION_1_1']) def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): OutputGenerator.genType(self, typeinfo, name) def genEnum(self, enuminfo, name): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) rettype=ParseCmdRettype(cmd) self.outFile.write("%s %sWrapper("%(rettype, name)) plist=ParseCmdParams(cmd) Comma="" if len(plist): for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, ptype)) Comma=", " else: self.outFile.write("void") self.outFile.write(")\n{\n") # for GL 1.0 and 1.1 functions, generate stdcall thunk wrappers which call the function directly if self.OldVersion: if rettype.lower()=="void": self.outFile.write(" %s( "%(name)) else: self.outFile.write(" return %s( "%(name)) Comma="" for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, pname)) Comma=", " # for GL 1.2+ functions, generate wrappers which use wglGetProcAddress() else: if rettype.lower()=="void": self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) self.outFile.write(" RESOLVED_PROC(PFN%sPROC)( """%(name.upper())) else: self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", FALSE);\n'%(name.upper(), name)) self.outFile.write(" return RESOLVED_PROC(PFN%sPROC)("%(name.upper())) Comma="" for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, pname)) Comma=", " self.outFile.write(" );\n}\n\n") class ThunkDefsOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) def beginFile(self, genOpts): self.outFile.write("EXPORTS\n"); # this must be the first line for libtool to realize this is a .def file self.outFile.write('; Automatically generated from %s - DO NOT EDIT\n\n'%regFilename) def endFile(self): pass def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): OutputGenerator.genType(self, typeinfo, name) def genEnum(self, enuminfo, name): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) # export the wrapper function with the name of the function it wraps self.outFile.write("%s = %sWrapper\n"%(name, name)) class ShimOutputGenerator(OutputGenerator): def __init__(self, errFile = sys.stderr, warnFile = sys.stderr, diagFile = sys.stdout): OutputGenerator.__init__(self, errFile, warnFile, diagFile) def beginFile(self, genOpts): self.outFile.write('/* Automatically generated from %s - DO NOT EDIT */\n\n'%regFilename) def endFile(self): pass def beginFeature(self, interface, emit): OutputGenerator.beginFeature(self, interface, emit) self.OldVersion = (self.featureName in ['GL_VERSION_1_0', 'GL_VERSION_1_1', 'GL_VERSION_1_2', 'GL_ARB_imaging', 'GL_ARB_multitexture', 'GL_ARB_texture_compression']) def endFeature(self): OutputGenerator.endFeature(self) def genType(self, typeinfo, name): OutputGenerator.genType(self, typeinfo, name) def genEnum(self, enuminfo, name): OutputGenerator.genEnum(self, enuminfo, name) def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) if not self.OldVersion: return # for GL functions which are in the ABI, generate a shim which calls the function via GetProcAddress rettype=ParseCmdRettype(cmd) self.outFile.write("%s %s("%(rettype, name)) plist=ParseCmdParams(cmd) Comma="" if len(plist): for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, ptype)) Comma=", " else: self.outFile.write("void") self.outFile.write(")\n{\n") self.outFile.write(' typedef %s (* PFN%sPROC)(' % (rettype, name.upper())) if len(plist): Comma="" for ptype, pname in plist: self.outFile.write("%s %s"%(Comma, ptype)) Comma=", " else: self.outFile.write("void") self.outFile.write(');\n') if rettype.lower()=="void": self.outFile.write(' RESOLVE(PFN%sPROC, "%s");\n'%(name.upper(), name)) self.outFile.write(' RESOLVED_PROC(') else: self.outFile.write(' RESOLVE_RET(PFN%sPROC, "%s", 0);\n'%(name.upper(), name)) self.outFile.write(' return RESOLVED_PROC(') Comma="" for ptype, pname in plist: self.outFile.write("%s%s"%(Comma, pname)) Comma=", " self.outFile.write(" );\n}\n\n") def genHeaders(): outFile = open(outFilename,"w") if preresolve: gen = PreResolveOutputGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) if wrapper: gen = WrapperOutputGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) if shim: gen = ShimOutputGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) if thunk: gen = ThunkOutputGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) if thunkdefs: gen = ThunkDefsOutputGenerator(errFile=errWarn, warnFile=errWarn, diagFile=diag) gen.outFile=outFile reg.setGenerator(gen) reg.apiGen(genOpts) outFile.close() genHeaders() xorg-server-21.1.16/hw/xwin/winclipboard/0000755000175000017500000000000014757411135013776 5xorg-server-21.1.16/hw/xwin/winclipboard/meson.build0000644000175000017500000000142114757411105016053 srcs_windows_clipboard = [ 'winclipboard.h', 'textconv.c', 'thread.c', 'wndproc.c', 'xevents.c', ] xwin_clipboard = static_library( 'XWinclipboard', srcs_windows_clipboard, include_directories: inc, c_args: '-DHAVE_XWIN_CONFIG_H', dependencies: [ dependency('xcb'), dependency('xcb-aux'), dependency('xcb-icccm'), dependency('xcb-xfixes'), socket_dep, ], ) srcs_xwinclip = [ 'xwinclip.c', 'debug.c', ] executable( 'xwinclip', srcs_xwinclip, link_with: xwin_clipboard, link_args: ['-lgdi32', '-lpthread'], install: true, ) xwinclip_man = configure_file( input: 'xwinclip.man', output: 'xwinclip.1', configuration: manpage_config, ) install_man(xwinclip_man) xorg-server-21.1.16/hw/xwin/winclipboard/Makefile.am0000644000175000017500000000105614757411105015751 noinst_LTLIBRARIES = libXWinclipboard.la libXWinclipboard_la_SOURCES = \ internal.h \ winclipboard.h \ textconv.c \ thread.c \ wndproc.c \ xevents.c libXWinclipboard_la_CFLAGS = -DHAVE_XWIN_CONFIG_H \ $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) libXWinclipboard_la_LDFLAGS = -static -no-undefined bin_PROGRAMS = xwinclip xwinclip_SOURCES = xwinclip.c debug.c xwinclip_CFLAGS = $(XWINMODULES_CFLAGS) xwinclip_LDADD = libXWinclipboard.la $(XWINMODULES_LIBS) -lgdi32 -lpthread include $(top_srcdir)/manpages.am appman_PRE = xwinclip.man xorg-server-21.1.16/hw/xwin/winclipboard/Makefile.in0000644000175000017500000012751114757411116015771 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = xwinclip$(EXEEXT) subdir = hw/xwin/winclipboard ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" \ "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)" PROGRAMS = $(bin_PROGRAMS) LTLIBRARIES = $(noinst_LTLIBRARIES) libXWinclipboard_la_LIBADD = am_libXWinclipboard_la_OBJECTS = libXWinclipboard_la-textconv.lo \ libXWinclipboard_la-thread.lo libXWinclipboard_la-wndproc.lo \ libXWinclipboard_la-xevents.lo libXWinclipboard_la_OBJECTS = $(am_libXWinclipboard_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libXWinclipboard_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libXWinclipboard_la_CFLAGS) $(CFLAGS) \ $(libXWinclipboard_la_LDFLAGS) $(LDFLAGS) -o $@ am_xwinclip_OBJECTS = xwinclip-xwinclip.$(OBJEXT) \ xwinclip-debug.$(OBJEXT) xwinclip_OBJECTS = $(am_xwinclip_OBJECTS) am__DEPENDENCIES_1 = xwinclip_DEPENDENCIES = libXWinclipboard.la $(am__DEPENDENCIES_1) xwinclip_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(xwinclip_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/libXWinclipboard_la-textconv.Plo \ ./$(DEPDIR)/libXWinclipboard_la-thread.Plo \ ./$(DEPDIR)/libXWinclipboard_la-wndproc.Plo \ ./$(DEPDIR)/libXWinclipboard_la-xevents.Plo \ ./$(DEPDIR)/xwinclip-debug.Po ./$(DEPDIR)/xwinclip-xwinclip.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libXWinclipboard_la_SOURCES) $(xwinclip_SOURCES) DIST_SOURCES = $(libXWinclipboard_la_SOURCES) $(xwinclip_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXWinclipboard.la libXWinclipboard_la_SOURCES = \ internal.h \ winclipboard.h \ textconv.c \ thread.c \ wndproc.c \ xevents.c libXWinclipboard_la_CFLAGS = -DHAVE_XWIN_CONFIG_H \ $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) libXWinclipboard_la_LDFLAGS = -static -no-undefined xwinclip_SOURCES = xwinclip.c debug.c xwinclip_CFLAGS = $(XWINMODULES_CFLAGS) xwinclip_LDADD = libXWinclipboard.la $(XWINMODULES_LIBS) -lgdi32 -lpthread appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = xwinclip.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwin/winclipboard/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xwin/winclipboard/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXWinclipboard.la: $(libXWinclipboard_la_OBJECTS) $(libXWinclipboard_la_DEPENDENCIES) $(EXTRA_libXWinclipboard_la_DEPENDENCIES) $(AM_V_CCLD)$(libXWinclipboard_la_LINK) $(libXWinclipboard_la_OBJECTS) $(libXWinclipboard_la_LIBADD) $(LIBS) xwinclip$(EXEEXT): $(xwinclip_OBJECTS) $(xwinclip_DEPENDENCIES) $(EXTRA_xwinclip_DEPENDENCIES) @rm -f xwinclip$(EXEEXT) $(AM_V_CCLD)$(xwinclip_LINK) $(xwinclip_OBJECTS) $(xwinclip_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXWinclipboard_la-textconv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXWinclipboard_la-thread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXWinclipboard_la-wndproc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libXWinclipboard_la-xevents.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xwinclip-debug.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xwinclip-xwinclip.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libXWinclipboard_la-textconv.lo: textconv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -MT libXWinclipboard_la-textconv.lo -MD -MP -MF $(DEPDIR)/libXWinclipboard_la-textconv.Tpo -c -o libXWinclipboard_la-textconv.lo `test -f 'textconv.c' || echo '$(srcdir)/'`textconv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libXWinclipboard_la-textconv.Tpo $(DEPDIR)/libXWinclipboard_la-textconv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='textconv.c' object='libXWinclipboard_la-textconv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -c -o libXWinclipboard_la-textconv.lo `test -f 'textconv.c' || echo '$(srcdir)/'`textconv.c libXWinclipboard_la-thread.lo: thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -MT libXWinclipboard_la-thread.lo -MD -MP -MF $(DEPDIR)/libXWinclipboard_la-thread.Tpo -c -o libXWinclipboard_la-thread.lo `test -f 'thread.c' || echo '$(srcdir)/'`thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libXWinclipboard_la-thread.Tpo $(DEPDIR)/libXWinclipboard_la-thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='thread.c' object='libXWinclipboard_la-thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -c -o libXWinclipboard_la-thread.lo `test -f 'thread.c' || echo '$(srcdir)/'`thread.c libXWinclipboard_la-wndproc.lo: wndproc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -MT libXWinclipboard_la-wndproc.lo -MD -MP -MF $(DEPDIR)/libXWinclipboard_la-wndproc.Tpo -c -o libXWinclipboard_la-wndproc.lo `test -f 'wndproc.c' || echo '$(srcdir)/'`wndproc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libXWinclipboard_la-wndproc.Tpo $(DEPDIR)/libXWinclipboard_la-wndproc.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='wndproc.c' object='libXWinclipboard_la-wndproc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -c -o libXWinclipboard_la-wndproc.lo `test -f 'wndproc.c' || echo '$(srcdir)/'`wndproc.c libXWinclipboard_la-xevents.lo: xevents.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -MT libXWinclipboard_la-xevents.lo -MD -MP -MF $(DEPDIR)/libXWinclipboard_la-xevents.Tpo -c -o libXWinclipboard_la-xevents.lo `test -f 'xevents.c' || echo '$(srcdir)/'`xevents.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libXWinclipboard_la-xevents.Tpo $(DEPDIR)/libXWinclipboard_la-xevents.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xevents.c' object='libXWinclipboard_la-xevents.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libXWinclipboard_la_CFLAGS) $(CFLAGS) -c -o libXWinclipboard_la-xevents.lo `test -f 'xevents.c' || echo '$(srcdir)/'`xevents.c xwinclip-xwinclip.o: xwinclip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -MT xwinclip-xwinclip.o -MD -MP -MF $(DEPDIR)/xwinclip-xwinclip.Tpo -c -o xwinclip-xwinclip.o `test -f 'xwinclip.c' || echo '$(srcdir)/'`xwinclip.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xwinclip-xwinclip.Tpo $(DEPDIR)/xwinclip-xwinclip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwinclip.c' object='xwinclip-xwinclip.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -c -o xwinclip-xwinclip.o `test -f 'xwinclip.c' || echo '$(srcdir)/'`xwinclip.c xwinclip-xwinclip.obj: xwinclip.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -MT xwinclip-xwinclip.obj -MD -MP -MF $(DEPDIR)/xwinclip-xwinclip.Tpo -c -o xwinclip-xwinclip.obj `if test -f 'xwinclip.c'; then $(CYGPATH_W) 'xwinclip.c'; else $(CYGPATH_W) '$(srcdir)/xwinclip.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xwinclip-xwinclip.Tpo $(DEPDIR)/xwinclip-xwinclip.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwinclip.c' object='xwinclip-xwinclip.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -c -o xwinclip-xwinclip.obj `if test -f 'xwinclip.c'; then $(CYGPATH_W) 'xwinclip.c'; else $(CYGPATH_W) '$(srcdir)/xwinclip.c'; fi` xwinclip-debug.o: debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -MT xwinclip-debug.o -MD -MP -MF $(DEPDIR)/xwinclip-debug.Tpo -c -o xwinclip-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xwinclip-debug.Tpo $(DEPDIR)/xwinclip-debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug.c' object='xwinclip-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -c -o xwinclip-debug.o `test -f 'debug.c' || echo '$(srcdir)/'`debug.c xwinclip-debug.obj: debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -MT xwinclip-debug.obj -MD -MP -MF $(DEPDIR)/xwinclip-debug.Tpo -c -o xwinclip-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/xwinclip-debug.Tpo $(DEPDIR)/xwinclip-debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug.c' object='xwinclip-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(xwinclip_CFLAGS) $(CFLAGS) -c -o xwinclip-debug.obj `if test -f 'debug.c'; then $(CYGPATH_W) 'debug.c'; else $(CYGPATH_W) '$(srcdir)/debug.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/libXWinclipboard_la-textconv.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-thread.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-wndproc.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-xevents.Plo -rm -f ./$(DEPDIR)/xwinclip-debug.Po -rm -f ./$(DEPDIR)/xwinclip-xwinclip.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/libXWinclipboard_la-textconv.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-thread.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-wndproc.Plo -rm -f ./$(DEPDIR)/libXWinclipboard_la-xevents.Plo -rm -f ./$(DEPDIR)/xwinclip-debug.Po -rm -f ./$(DEPDIR)/xwinclip-xwinclip.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ uninstall-drivermanDATA uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-binPROGRAMS clean-generic clean-libtool \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-binPROGRAMS \ install-data install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-appmanDATA \ uninstall-binPROGRAMS uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xwin/winclipboard/internal.h0000644000175000017500000000635014757411105015704 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifndef WINCLIPBOARD_INTERNAL_H #define WINCLIPBOARD_INTERNAL_H #include #include // for _X_ATTRIBUTE_PRINTF #include // for BOOL /* Windows headers */ #include #define WIN_XEVENTS_SUCCESS 0 // more like 'CONTINUE' #define WIN_XEVENTS_FAILED 1 #define WIN_XEVENTS_NOTIFY_DATA 3 #define WIN_XEVENTS_NOTIFY_TARGETS 4 #define WM_WM_QUIT (WM_USER + 2) #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) /* * References to external symbols */ extern void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern void ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); /* * winclipboardtextconv.c */ void winClipboardDOStoUNIX(char *pszData, int iLength); void winClipboardUNIXtoDOS(char **ppszData, int iLength); /* * winclipboardthread.c */ typedef struct { xcb_atom_t atomClipboard; xcb_atom_t atomLocalProperty; xcb_atom_t atomUTF8String; xcb_atom_t atomCompoundText; xcb_atom_t atomTargets; xcb_atom_t atomIncr; } ClipboardAtoms; /* * winclipboardwndproc.c */ BOOL winClipboardFlushWindowsMessageQueue(HWND hwnd); LRESULT CALLBACK winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); typedef struct { xcb_connection_t *pClipboardDisplay; xcb_window_t iClipboardWindow; ClipboardAtoms *atoms; } ClipboardWindowCreationParams; /* * winclipboardxevents.c */ typedef struct { xcb_atom_t *targetList; unsigned char *incr; unsigned long int incrsize; } ClipboardConversionData; int winClipboardFlushXEvents(HWND hwnd, xcb_window_t iWindow, xcb_connection_t * pDisplay, ClipboardConversionData *data, ClipboardAtoms *atoms); xcb_atom_t winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms); void winClipboardInitMonitoredSelections(void); #endif xorg-server-21.1.16/hw/xwin/winclipboard/winclipboard.h0000644000175000017500000000275514757411105016552 // // Copyright © Jon TURNEY 2013 // // 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, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice (including the next // paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. // // File: winclipboard.h // Purpose: public interface to winclipboard library // #ifndef WINCLIPBOARD_H #define WINCLIPBOARD_H #include #include // for BOOL type BOOL winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info); void winFixClipboardChain(void); void winClipboardWindowDestroy(void); extern BOOL fPrimarySelection; #endif xorg-server-21.1.16/hw/xwin/winclipboard/textconv.c0000644000175000017500000001004014757411105015724 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include "internal.h" /* * Convert \r\n to \n * * NOTE: This was heavily inspired by, Cygwin's * winsup/cygwin/fhandler.cc/fhandler_base::read () */ void winClipboardDOStoUNIX(char *pszSrc, int iLength) { char *pszDest = pszSrc; char *pszEnd = pszSrc + iLength; /* Loop until the last character */ while (pszSrc < pszEnd) { /* Copy the current source character to current destination character */ *pszDest = *pszSrc; /* Advance to the next source character */ pszSrc++; /* Don't advance the destination character if we need to drop an \r */ if (*pszDest != '\r' || *pszSrc != '\n') pszDest++; } /* Move the terminating null */ *pszDest = '\0'; } /* * Convert \n to \r\n */ void winClipboardUNIXtoDOS(char **ppszData, int iLength) { int iNewlineCount = 0; char *pszSrc = *ppszData; char *pszEnd = pszSrc + iLength; char *pszDest = NULL, *pszDestBegin = NULL; winDebug("UNIXtoDOS () - Original data:'%s'\n", *ppszData); /* Count \n characters without leading \r */ while (pszSrc < pszEnd) { /* Skip ahead two character if found set of \r\n */ if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n') { pszSrc += 2; continue; } /* Increment the count if found naked \n */ if (*pszSrc == '\n') { iNewlineCount++; } pszSrc++; } /* Return if no naked \n's */ if (iNewlineCount == 0) return; /* Allocate a new string */ pszDestBegin = pszDest = malloc(iLength + iNewlineCount + 1); /* Set source pointer to beginning of data string */ pszSrc = *ppszData; /* Loop through all characters in source string */ while (pszSrc < pszEnd) { /* Copy line endings that are already valid */ if (*pszSrc == '\r' && pszSrc + 1 < pszEnd && *(pszSrc + 1) == '\n') { *pszDest = *pszSrc; *(pszDest + 1) = *(pszSrc + 1); pszDest += 2; pszSrc += 2; continue; } /* Add \r to naked \n's */ if (*pszSrc == '\n') { *pszDest = '\r'; *(pszDest + 1) = *pszSrc; pszDest += 2; pszSrc += 1; continue; } /* Copy normal characters */ *pszDest = *pszSrc; pszSrc++; pszDest++; } /* Put terminating null at end of new string */ *pszDest = '\0'; /* Swap string pointers */ free(*ppszData); *ppszData = pszDestBegin; winDebug("UNIXtoDOS () - Final string:'%s'\n", pszDestBegin); } xorg-server-21.1.16/hw/xwin/winclipboard/thread.c0000644000175000017500000003456314757411105015341 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 copyright holder(s) *and author(s) 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 copyright holder(s) and author(s). * * Authors: Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #else #define HAS_WINSOCK 1 #endif #include #include #include #include #include // for MAX() macro #ifdef HAS_WINSOCK #include #else #include #endif #include #include #include #include #include "winclipboard.h" #include "internal.h" #define WIN_CONNECT_RETRIES 40 #define WIN_CONNECT_DELAY 4 #define WIN_CLIPBOARD_WINDOW_CLASS "xwinclip" #define WIN_CLIPBOARD_WINDOW_TITLE "xwinclip" #ifdef HAS_DEVWINDOWS #define WIN_MSG_QUEUE_FNAME "/dev/windows" #endif /* * Global variables */ static HWND g_hwndClipboard = NULL; int xfixes_event_base; int xfixes_error_base; /* * Local function prototypes */ static HWND winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms); static xcb_atom_t intern_atom(xcb_connection_t *conn, const char *atomName) { xcb_intern_atom_reply_t *atom_reply; xcb_intern_atom_cookie_t atom_cookie; xcb_atom_t atom = XCB_ATOM_NONE; atom_cookie = xcb_intern_atom(conn, 0, strlen(atomName), atomName); atom_reply = xcb_intern_atom_reply(conn, atom_cookie, NULL); if (atom_reply) { atom = atom_reply->atom; free(atom_reply); } return atom; } /* * Create X11 and Win32 messaging windows, and run message processing loop * * returns TRUE if shutdown was signalled to loop, FALSE if some error occurred */ BOOL winClipboardProc(char *szDisplay, xcb_auth_info_t *auth_info) { ClipboardAtoms atoms; int iReturn; HWND hwnd = NULL; int iConnectionNumber = 0; #ifdef HAS_DEVWINDOWS int fdMessageQueue = 0; #else struct timeval tvTimeout; #endif fd_set fdsRead; int iMaxDescriptor; xcb_connection_t *conn; xcb_window_t iWindow = XCB_NONE; int iSelectError; BOOL fShutdown = FALSE; ClipboardConversionData data; int screen; winDebug("winClipboardProc - Hello\n"); /* Make sure that the display opened */ conn = xcb_connect_to_display_with_auth_info(szDisplay, auth_info, &screen); if (xcb_connection_has_error(conn)) { ErrorF("winClipboardProc - Failed opening the display, giving up\n"); goto winClipboardProc_Done; } ErrorF("winClipboardProc - xcb_connect () returned and " "successfully opened the display.\n"); /* Get our connection number */ iConnectionNumber = xcb_get_file_descriptor(conn); #ifdef HAS_DEVWINDOWS /* Open a file descriptor for the windows message queue */ fdMessageQueue = open(WIN_MSG_QUEUE_FNAME, O_RDONLY); if (fdMessageQueue == -1) { ErrorF("winClipboardProc - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); goto winClipboardProc_Done; } /* Find max of our file descriptors */ iMaxDescriptor = MAX(fdMessageQueue, iConnectionNumber) + 1; #else iMaxDescriptor = iConnectionNumber + 1; #endif const xcb_query_extension_reply_t *xfixes_query; xfixes_query = xcb_get_extension_data(conn, &xcb_xfixes_id); if (!xfixes_query->present) ErrorF ("winClipboardProc - XFixes extension not present\n"); xfixes_event_base = xfixes_query->first_event; xfixes_error_base = xfixes_query->first_error; /* Must advise server of XFIXES version we require */ xcb_xfixes_query_version_unchecked(conn, 1, 0); /* Create atoms */ atoms.atomClipboard = intern_atom(conn, "CLIPBOARD"); atoms.atomLocalProperty = intern_atom(conn, "CYGX_CUT_BUFFER"); atoms.atomUTF8String = intern_atom(conn, "UTF8_STRING"); atoms.atomCompoundText = intern_atom(conn, "COMPOUND_TEXT"); atoms.atomTargets = intern_atom(conn, "TARGETS"); atoms.atomIncr = intern_atom(conn, "INCR"); xcb_screen_t *root_screen = xcb_aux_get_screen(conn, screen); xcb_window_t root_window_id = root_screen->root; /* Create a messaging window */ iWindow = xcb_generate_id(conn); xcb_void_cookie_t cookie = xcb_create_window_checked(conn, XCB_COPY_FROM_PARENT, iWindow, root_window_id, 1, 1, 500, 500, 0, XCB_WINDOW_CLASS_INPUT_ONLY, XCB_COPY_FROM_PARENT, 0, NULL); xcb_generic_error_t *error; if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardProc - Could not create an X window.\n"); free(error); goto winClipboardProc_Done; } xcb_icccm_set_wm_name(conn, iWindow, XCB_ATOM_STRING, 8, strlen("xwinclip"), "xwinclip"); /* Select event types to watch */ const static uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE }; cookie = xcb_change_window_attributes_checked(conn, iWindow, XCB_CW_EVENT_MASK, values); if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardProc - Could not set event mask on messaging window\n"); free(error); } xcb_xfixes_select_selection_input(conn, iWindow, XCB_ATOM_PRIMARY, XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE); xcb_xfixes_select_selection_input(conn, iWindow, atoms.atomClipboard, XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY | XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE); /* Initialize monitored selection state */ winClipboardInitMonitoredSelections(); /* Create Windows messaging window */ hwnd = winClipboardCreateMessagingWindow(conn, iWindow, &atoms); /* Save copy of HWND */ g_hwndClipboard = hwnd; /* Assert ownership of selections if Win32 clipboard is owned */ if (NULL != GetClipboardOwner()) { /* PRIMARY */ cookie = xcb_set_selection_owner_checked(conn, iWindow, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME); if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardProc - Could not set PRIMARY owner\n"); free(error); goto winClipboardProc_Done; } /* CLIPBOARD */ cookie = xcb_set_selection_owner_checked(conn, iWindow, atoms.atomClipboard, XCB_CURRENT_TIME); if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardProc - Could not set CLIPBOARD owner\n"); free(error); goto winClipboardProc_Done; } } data.incr = NULL; data.incrsize = 0; /* Loop for events */ while (1) { /* Process X events */ winClipboardFlushXEvents(hwnd, iWindow, conn, &data, &atoms); /* Process Windows messages */ if (!winClipboardFlushWindowsMessageQueue(hwnd)) { ErrorF("winClipboardProc - winClipboardFlushWindowsMessageQueue trapped " "WM_QUIT message, exiting main loop.\n"); break; } /* We need to ensure that all pending requests are sent */ xcb_flush(conn); /* Setup the file descriptor set */ /* * NOTE: You have to do this before every call to select * because select modifies the mask to indicate * which descriptors are ready. */ FD_ZERO(&fdsRead); FD_SET(iConnectionNumber, &fdsRead); #ifdef HAS_DEVWINDOWS FD_SET(fdMessageQueue, &fdsRead); #else tvTimeout.tv_sec = 0; tvTimeout.tv_usec = 100; #endif /* Wait for a Windows event or an X event */ iReturn = select(iMaxDescriptor, /* Highest fds number */ &fdsRead, /* Read mask */ NULL, /* No write mask */ NULL, /* No exception mask */ #ifdef HAS_DEVWINDOWS NULL /* No timeout */ #else &tvTimeout /* Set timeout */ #endif ); #ifndef HAS_WINSOCK iSelectError = errno; #else iSelectError = WSAGetLastError(); #endif if (iReturn < 0) { #ifndef HAS_WINSOCK if (iSelectError == EINTR) #else if (iSelectError == WSAEINTR) #endif continue; ErrorF("winClipboardProc - Call to select () failed: %d. " "Bailing.\n", iReturn); break; } if (FD_ISSET(iConnectionNumber, &fdsRead)) { winDebug ("winClipboardProc - X connection ready, pumping X event queue\n"); } #ifdef HAS_DEVWINDOWS /* Check for Windows event ready */ if (FD_ISSET(fdMessageQueue, &fdsRead)) #else if (1) #endif { winDebug ("winClipboardProc - /dev/windows ready, pumping Windows message queue\n"); } #ifdef HAS_DEVWINDOWS if (!(FD_ISSET(iConnectionNumber, &fdsRead)) && !(FD_ISSET(fdMessageQueue, &fdsRead))) { winDebug("winClipboardProc - Spurious wake, select() returned %d\n", iReturn); } #endif } /* broke out of while loop on a shutdown message */ fShutdown = TRUE; winClipboardProc_Done: /* Close our Windows window */ if (g_hwndClipboard) { DestroyWindow(g_hwndClipboard); } /* Close our X window */ if (!xcb_connection_has_error(conn) && iWindow) { cookie = xcb_destroy_window_checked(conn, iWindow); if ((error = xcb_request_check(conn, cookie))) ErrorF("winClipboardProc - XDestroyWindow failed.\n"); else ErrorF("winClipboardProc - XDestroyWindow succeeded.\n"); free(error); } #ifdef HAS_DEVWINDOWS /* Close our Win32 message handle */ if (fdMessageQueue) close(fdMessageQueue); #endif /* * xcb_disconnect() does not sync, so is safe to call even when we are built * into the server. Unlike XCloseDisplay() there will be no deadlock if the * server is in the process of exiting and waiting for this thread to exit. */ if (!xcb_connection_has_error(conn)) { /* Close our X display */ xcb_disconnect(conn); } /* global clipboard variable reset */ g_hwndClipboard = NULL; return fShutdown; } /* * Create the Windows window that we use to receive Windows messages */ static HWND winClipboardCreateMessagingWindow(xcb_connection_t *conn, xcb_window_t iWindow, ClipboardAtoms *atoms) { WNDCLASSEX wc; ClipboardWindowCreationParams cwcp; HWND hwnd; /* Setup our window class */ wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winClipboardWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = GetModuleHandle(NULL); wc.hIcon = 0; wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WIN_CLIPBOARD_WINDOW_CLASS; wc.hIconSm = 0; RegisterClassEx(&wc); /* Information to be passed to WM_CREATE */ cwcp.pClipboardDisplay = conn; cwcp.iClipboardWindow = iWindow; cwcp.atoms = atoms; /* Create the window */ hwnd = CreateWindowExA(0, /* Extended styles */ WIN_CLIPBOARD_WINDOW_CLASS, /* Class name */ WIN_CLIPBOARD_WINDOW_TITLE, /* Window name */ WS_OVERLAPPED, /* Not visible anyway */ CW_USEDEFAULT, /* Horizontal position */ CW_USEDEFAULT, /* Vertical position */ CW_USEDEFAULT, /* Right edge */ CW_USEDEFAULT, /* Bottom edge */ (HWND) NULL, /* No parent or owner window */ (HMENU) NULL, /* No menu */ GetModuleHandle(NULL), /* Instance handle */ &cwcp); /* Creation data */ assert(hwnd != NULL); /* I'm not sure, but we may need to call this to start message processing */ ShowWindow(hwnd, SW_HIDE); /* Similarly, we may need a call to this even though we don't paint */ UpdateWindow(hwnd); return hwnd; } void winClipboardWindowDestroy(void) { if (g_hwndClipboard) { SendMessage(g_hwndClipboard, WM_WM_QUIT, 0, 0); } } xorg-server-21.1.16/hw/xwin/winclipboard/wndproc.c0000644000175000017500000003664214757411105015546 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 copyright holder(s) *and author(s) 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 copyright holder(s) and author(s). * * Authors: Harold L Hunt II * Colin Harrison */ #define WINVER 0x0600 #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include #include #include "internal.h" #include "winclipboard.h" /* * Constants */ #define WIN_POLL_TIMEOUT 1 /* * Process X events up to specified timeout */ static int winProcessXEventsTimeout(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms, int iTimeoutSec) { int iConnNumber; struct timeval tv; int iReturn; winDebug("winProcessXEventsTimeout () - pumping X events, timeout %d seconds\n", iTimeoutSec); /* Get our connection number */ iConnNumber = xcb_get_file_descriptor(conn); /* Loop for X events */ while (1) { fd_set fdsRead; long remainingTime; /* Process X events */ iReturn = winClipboardFlushXEvents(hwnd, iWindow, conn, data, atoms); winDebug("winProcessXEventsTimeout () - winClipboardFlushXEvents returned %d\n", iReturn); if ((WIN_XEVENTS_NOTIFY_DATA == iReturn) || (WIN_XEVENTS_NOTIFY_TARGETS == iReturn) || (WIN_XEVENTS_FAILED == iReturn)) { /* Bail out */ return iReturn; } /* We need to ensure that all pending requests are sent */ xcb_flush(conn); /* Setup the file descriptor set */ FD_ZERO(&fdsRead); FD_SET(iConnNumber, &fdsRead); /* Adjust timeout */ remainingTime = iTimeoutSec * 1000; tv.tv_sec = remainingTime / 1000; tv.tv_usec = (remainingTime % 1000) * 1000; /* Break out if no time left */ if (remainingTime <= 0) return WIN_XEVENTS_SUCCESS; /* Wait for an X event */ iReturn = select(iConnNumber + 1, /* Highest fds number */ &fdsRead, /* Read mask */ NULL, /* No write mask */ NULL, /* No exception mask */ &tv); /* Timeout */ if (iReturn < 0) { ErrorF("winProcessXEventsTimeout - Call to select () failed: %d. " "Bailing.\n", iReturn); break; } if (!FD_ISSET(iConnNumber, &fdsRead)) { winDebug("winProcessXEventsTimeout - Spurious wake, select() returned %d\n", iReturn); } } return WIN_XEVENTS_SUCCESS; } /* * Process a given Windows message */ LRESULT CALLBACK winClipboardWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static xcb_connection_t *conn; static xcb_window_t iWindow; static ClipboardAtoms *atoms; static BOOL fRunning; /* Branch on message type */ switch (message) { case WM_DESTROY: { winDebug("winClipboardWindowProc - WM_DESTROY\n"); /* Remove clipboard listener */ RemoveClipboardFormatListener(hwnd); } return 0; case WM_WM_QUIT: { winDebug("winClipboardWindowProc - WM_WM_QUIT\n"); fRunning = FALSE; PostQuitMessage(0); } return 0; case WM_CREATE: { ClipboardWindowCreationParams *cwcp = (ClipboardWindowCreationParams *)((CREATESTRUCT *)lParam)->lpCreateParams; winDebug("winClipboardWindowProc - WM_CREATE\n"); conn = cwcp->pClipboardDisplay; iWindow = cwcp->iClipboardWindow; atoms = cwcp->atoms; fRunning = TRUE; AddClipboardFormatListener(hwnd); } return 0; case WM_CLIPBOARDUPDATE: { xcb_generic_error_t *error; xcb_void_cookie_t cookie_set; winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Enter\n"); /* * NOTE: We cannot bail out when NULL == GetClipboardOwner () * because some applications deal with the clipboard in a manner * that causes the clipboard owner to be NULL when they are in * fact taking ownership. One example of this is the Win32 * native compile of emacs. */ /* Bail when we still own the clipboard */ if (hwnd == GetClipboardOwner()) { winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "We own the clipboard, returning.\n"); winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n"); return 0; } /* Bail when shutting down */ if (!fRunning) return 0; /* * Do not take ownership of the X11 selections when something * other than CF_TEXT or CF_UNICODETEXT has been copied * into the Win32 clipboard. */ if (!IsClipboardFormatAvailable(CF_TEXT) && !IsClipboardFormatAvailable(CF_UNICODETEXT)) { xcb_get_selection_owner_cookie_t cookie_get; xcb_get_selection_owner_reply_t *reply; winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "Clipboard does not contain CF_TEXT nor " "CF_UNICODETEXT.\n"); /* * We need to make sure that the X Server has processed * previous XSetSelectionOwner messages. */ xcb_aux_sync(conn); winDebug("winClipboardWindowProc - XSync done.\n"); /* Release PRIMARY selection if owned */ cookie_get = xcb_get_selection_owner(conn, XCB_ATOM_PRIMARY); reply = xcb_get_selection_owner_reply(conn, cookie_get, NULL); if (reply) { if (reply->owner == iWindow) { winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "PRIMARY selection is owned by us, releasing.\n"); xcb_set_selection_owner(conn, XCB_NONE, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME); } free(reply); } /* Release CLIPBOARD selection if owned */ cookie_get = xcb_get_selection_owner(conn, atoms->atomClipboard); reply = xcb_get_selection_owner_reply(conn, cookie_get, NULL); if (reply) { if (reply->owner == iWindow) { winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "CLIPBOARD selection is owned by us, releasing\n"); xcb_set_selection_owner(conn, XCB_NONE, atoms->atomClipboard, XCB_CURRENT_TIME); } free(reply); } winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n"); return 0; } /* Reassert ownership of PRIMARY */ cookie_set = xcb_set_selection_owner_checked(conn, iWindow, XCB_ATOM_PRIMARY, XCB_CURRENT_TIME); error = xcb_request_check(conn, cookie_set); if (error) { ErrorF("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "Could not reassert ownership of PRIMARY\n"); free(error); } else { winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "Reasserted ownership of PRIMARY\n"); } /* Reassert ownership of the CLIPBOARD */ cookie_set = xcb_set_selection_owner_checked(conn, iWindow, atoms->atomClipboard, XCB_CURRENT_TIME); error = xcb_request_check(conn, cookie_set); if (error) { ErrorF("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "Could not reassert ownership of CLIPBOARD\n"); free(error); } else { winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE - " "Reasserted ownership of CLIPBOARD\n"); } /* Flush the pending SetSelectionOwner event now */ xcb_flush(conn); } winDebug("winClipboardWindowProc - WM_CLIPBOARDUPDATE: Exit\n"); return 0; case WM_DESTROYCLIPBOARD: /* * NOTE: Intentionally do nothing. * Changes in the Win32 clipboard are handled by WM_CLIPBOARDUPDATE * above. We only process this message to conform to the specs * for delayed clipboard rendering in Win32. You might think * that we need to release ownership of the X11 selections, but * we do not, because a WM_CLIPBOARDUPDATE message will closely * follow this message and reassert ownership of the X11 * selections, handling the issue for us. */ winDebug("winClipboardWindowProc - WM_DESTROYCLIPBOARD - Ignored.\n"); return 0; case WM_RENDERALLFORMATS: winDebug("winClipboardWindowProc - WM_RENDERALLFORMATS - Hello.\n"); /* WM_RENDERALLFORMATS is sent as we are shutting down, to render the clipboard so its contents remains available to other applications. Unfortunately, this can't work without major changes. The server is already waiting for us to stop, so we can't ask for the rendering of clipboard text now. */ return 0; case WM_RENDERFORMAT: { int iReturn; BOOL pasted = FALSE; xcb_atom_t selection; ClipboardConversionData data; int best_target = 0; winDebug("winClipboardWindowProc - WM_RENDERFORMAT %d - Hello.\n", (int)wParam); selection = winClipboardGetLastOwnedSelectionAtom(atoms); if (selection == XCB_NONE) { ErrorF("winClipboardWindowProc - no monitored selection is owned\n"); goto fake_paste; } winDebug("winClipboardWindowProc - requesting targets for selection from owner\n"); /* Request the selection's supported conversion targets */ xcb_convert_selection(conn, iWindow, selection, atoms->atomTargets, atoms->atomLocalProperty, XCB_CURRENT_TIME); /* Process X events */ data.incr = NULL; data.incrsize = 0; iReturn = winProcessXEventsTimeout(hwnd, iWindow, conn, &data, atoms, WIN_POLL_TIMEOUT); if (WIN_XEVENTS_NOTIFY_TARGETS != iReturn) { ErrorF ("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY_TARGETS\n"); goto fake_paste; } /* Choose the most preferred target */ { struct target_priority { xcb_atom_t target; unsigned int priority; }; struct target_priority target_priority_table[] = { { atoms->atomUTF8String, 0 }, // { atoms->atomCompoundText, 1 }, not implemented (yet?) { XCB_ATOM_STRING, 2 }, }; int best_priority = INT_MAX; int i,j; for (i = 0 ; data.targetList[i] != 0; i++) { for (j = 0; j < ARRAY_SIZE(target_priority_table); j ++) { if ((data.targetList[i] == target_priority_table[j].target) && (target_priority_table[j].priority < best_priority)) { best_target = target_priority_table[j].target; best_priority = target_priority_table[j].priority; } } } } free(data.targetList); data.targetList = 0; winDebug("winClipboardWindowProc - best target is %d\n", best_target); /* No useful targets found */ if (best_target == 0) goto fake_paste; winDebug("winClipboardWindowProc - requesting selection from owner\n"); /* Request the selection contents */ xcb_convert_selection(conn, iWindow, selection, best_target, atoms->atomLocalProperty, XCB_CURRENT_TIME); /* Process X events */ iReturn = winProcessXEventsTimeout(hwnd, iWindow, conn, &data, atoms, WIN_POLL_TIMEOUT); /* * winProcessXEventsTimeout had better have seen a notify event, * or else we are dealing with a buggy or old X11 app. */ if (WIN_XEVENTS_NOTIFY_DATA != iReturn) { ErrorF ("winClipboardWindowProc - timed out waiting for WIN_XEVENTS_NOTIFY_DATA\n"); } else { pasted = TRUE; } /* * If we couldn't get the data from the X clipboard, we * have to paste some fake data to the Win32 clipboard to * satisfy the requirement that we write something to it. */ fake_paste: if (!pasted) { /* Paste no data, to satisfy required call to SetClipboardData */ SetClipboardData(CF_UNICODETEXT, NULL); SetClipboardData(CF_TEXT, NULL); } winDebug("winClipboardWindowProc - WM_RENDERFORMAT - Returning.\n"); return 0; } } /* Let Windows perform default processing for unhandled messages */ return DefWindowProc(hwnd, message, wParam, lParam); } /* * Process any pending Windows messages */ BOOL winClipboardFlushWindowsMessageQueue(HWND hwnd) { MSG msg; /* Flush the messaging window queue */ /* NOTE: Do not pass the hwnd of our messaging window to PeekMessage, * as this will filter out many non-window-specific messages that * are sent to our thread, such as WM_QUIT. */ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { /* Dispatch the message if not WM_QUIT */ if (msg.message == WM_QUIT) return FALSE; else DispatchMessage(&msg); } return TRUE; } xorg-server-21.1.16/hw/xwin/winclipboard/xevents.c0000644000175000017500000007721014757411105015562 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 copyright holder(s) *and author(s) 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 copyright holder(s) and author(s). * * Authors: Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include #include "winclipboard.h" #include "internal.h" /* * Constants */ #define CLIP_NUM_SELECTIONS 2 #define CLIP_OWN_NONE -1 #define CLIP_OWN_PRIMARY 0 #define CLIP_OWN_CLIPBOARD 1 #define CP_ISO_8559_1 28591 /* * Global variables */ extern int xfixes_event_base; BOOL fPrimarySelection = TRUE; /* * Local variables */ static xcb_window_t s_iOwners[CLIP_NUM_SELECTIONS] = { XCB_NONE, XCB_NONE }; static const char *szSelectionNames[CLIP_NUM_SELECTIONS] = { "PRIMARY", "CLIPBOARD" }; static unsigned int lastOwnedSelectionIndex = CLIP_OWN_NONE; static void MonitorSelection(xcb_xfixes_selection_notify_event_t * e, unsigned int i) { /* Look for owned -> not owned transition */ if ((XCB_NONE == e->owner) && (XCB_NONE != s_iOwners[i])) { unsigned int other_index; winDebug("MonitorSelection - %s - Going from owned to not owned.\n", szSelectionNames[i]); /* If this selection is not owned, the other monitored selection must be the most recently owned, if it is owned at all */ if (i == CLIP_OWN_PRIMARY) other_index = CLIP_OWN_CLIPBOARD; if (i == CLIP_OWN_CLIPBOARD) other_index = CLIP_OWN_PRIMARY; if (XCB_NONE != s_iOwners[other_index]) lastOwnedSelectionIndex = other_index; else lastOwnedSelectionIndex = CLIP_OWN_NONE; } /* Save last owned selection */ if (XCB_NONE != e->owner) { lastOwnedSelectionIndex = i; } /* Save new selection owner or None */ s_iOwners[i] = e->owner; winDebug("MonitorSelection - %s - Now owned by XID %x\n", szSelectionNames[i], e->owner); } xcb_atom_t winClipboardGetLastOwnedSelectionAtom(ClipboardAtoms *atoms) { if (lastOwnedSelectionIndex == CLIP_OWN_NONE) return XCB_NONE; if (lastOwnedSelectionIndex == CLIP_OWN_PRIMARY) return XCB_ATOM_PRIMARY; if (lastOwnedSelectionIndex == CLIP_OWN_CLIPBOARD) return atoms->atomClipboard; return XCB_NONE; } void winClipboardInitMonitoredSelections(void) { /* Initialize static variables */ int i; for (i = 0; i < CLIP_NUM_SELECTIONS; ++i) s_iOwners[i] = XCB_NONE; lastOwnedSelectionIndex = CLIP_OWN_NONE; } static char *get_atom_name(xcb_connection_t *conn, xcb_atom_t atom) { char *ret; xcb_get_atom_name_cookie_t cookie = xcb_get_atom_name(conn, atom); xcb_get_atom_name_reply_t *reply = xcb_get_atom_name_reply(conn, cookie, NULL); if (!reply) return NULL; ret = malloc(xcb_get_atom_name_name_length(reply) + 1); if (ret) { memcpy(ret, xcb_get_atom_name_name(reply), xcb_get_atom_name_name_length(reply)); ret[xcb_get_atom_name_name_length(reply)] = '\0'; } free(reply); return ret; } static int winClipboardSelectionNotifyTargets(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms) { /* Retrieve the selection data and delete the property */ xcb_get_property_cookie_t cookie = xcb_get_property(conn, TRUE, iWindow, atoms->atomLocalProperty, XCB_GET_PROPERTY_TYPE_ANY, 0, INT_MAX); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL); if (!reply) { ErrorF("winClipboardFlushXEvents - SelectionNotify - " "XGetWindowProperty () failed\n"); } else { xcb_atom_t *prop = xcb_get_property_value(reply); int nitems = xcb_get_property_value_length(reply)/sizeof(xcb_atom_t); int i; data->targetList = malloc((nitems+1)*sizeof(xcb_atom_t)); for (i = 0; i < nitems; i++) { xcb_atom_t atom = prop[i]; char *pszAtomName = get_atom_name(conn, atom); data->targetList[i] = atom; winDebug("winClipboardFlushXEvents - SelectionNotify - target[%d] %d = %s\n", i, atom, pszAtomName); free(pszAtomName); } data->targetList[nitems] = 0; free(reply); } return WIN_XEVENTS_NOTIFY_TARGETS; } static int winClipboardSelectionNotifyData(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms) { xcb_atom_t encoding; int format; unsigned long int nitems; unsigned long int after; unsigned char *value; unsigned char *xtpText_value; xcb_atom_t xtpText_encoding; int xtpText_nitems; BOOL fSetClipboardData = TRUE; char *pszReturnData = NULL; UINT codepage; wchar_t *pwszUnicodeStr = NULL; HGLOBAL hGlobal = NULL; char *pszGlobalData = NULL; /* Retrieve the selection data and delete the property */ xcb_get_property_cookie_t cookie = xcb_get_property(conn, TRUE, iWindow, atoms->atomLocalProperty, XCB_GET_PROPERTY_TYPE_ANY, 0, INT_MAX); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL); if (!reply) { ErrorF("winClipboardFlushXEvents - SelectionNotify - " "XGetWindowProperty () failed\n"); goto winClipboardFlushXEvents_SelectionNotify_Done; } else { nitems = xcb_get_property_value_length(reply); value = xcb_get_property_value(reply); after = reply->bytes_after; encoding = reply->type; format = reply->format; // We assume format == 8 (i.e. data is a sequence of bytes). It's not // clear how anything else should be handled. if (format != 8) ErrorF("SelectionNotify: format is %d, proceeding as if it was 8\n", format); } { char *pszAtomName; winDebug("SelectionNotify - returned data %lu left %lu\n", nitems, after); pszAtomName = get_atom_name(conn, encoding); winDebug("Notify atom name %s\n", pszAtomName); free(pszAtomName); } /* INCR reply indicates the start of a incremental transfer */ if (encoding == atoms->atomIncr) { winDebug("winClipboardSelectionNotifyData: starting INCR, anticipated size %d\n", *(int *)value); data->incrsize = 0; data->incr = malloc(*(int *)value); // XXX: if malloc failed, we have an error return WIN_XEVENTS_SUCCESS; } else if (data->incr) { /* If an INCR transfer is in progress ... */ if (nitems == 0) { winDebug("winClipboardSelectionNotifyData: ending INCR, actual size %ld\n", data->incrsize); /* a zero-length property indicates the end of the data */ xtpText_value = data->incr; xtpText_encoding = encoding; // XXX: The type of the converted selection is the type of the first // partial property. The remaining partial properties must have the // same type. xtpText_nitems = data->incrsize; } else { /* Otherwise, continue appending the INCR data */ winDebug("winClipboardSelectionNotifyData: INCR, %ld bytes\n", nitems); data->incr = realloc(data->incr, data->incrsize + nitems); memcpy(data->incr + data->incrsize, value, nitems); data->incrsize = data->incrsize + nitems; return WIN_XEVENTS_SUCCESS; } } else { /* Otherwise, the data is just contained in the property */ winDebug("winClipboardSelectionNotifyData: non-INCR, %ld bytes\n", nitems); xtpText_value = value; xtpText_encoding = encoding; xtpText_nitems = nitems; } if (xtpText_encoding == atoms->atomUTF8String) { pszReturnData = malloc(xtpText_nitems + 1); memcpy(pszReturnData, xtpText_value, xtpText_nitems); pszReturnData[xtpText_nitems] = 0; codepage = CP_UTF8; // code page identifier for utf8 } else if (xtpText_encoding == XCB_ATOM_STRING) { // STRING encoding is Latin1 (ISO8859-1) plus tab and newline pszReturnData = malloc(xtpText_nitems + 1); memcpy(pszReturnData, xtpText_value, xtpText_nitems); pszReturnData[xtpText_nitems] = 0; codepage = CP_ISO_8559_1; // code page identifier for iso-8559-1 } else if (xtpText_encoding == atoms->atomCompoundText) { // COMPOUND_TEXT is complex, based on ISO 2022 ErrorF("SelectionNotify: data in COMPOUND_TEXT encoding which is not implemented, discarding\n"); pszReturnData = malloc(1); pszReturnData[0] = '\0'; } else { // shouldn't happen as we accept no other encodings pszReturnData = malloc(1); pszReturnData[0] = '\0'; } /* Free the data returned from xcb_get_property */ free(reply); /* Free any INCR data */ if (data->incr) { free(data->incr); data->incr = NULL; data->incrsize = 0; } /* Convert the X clipboard string to DOS format */ winClipboardUNIXtoDOS(&pszReturnData, strlen(pszReturnData)); /* Find out how much space needed when converted to UTF-16 */ int iUnicodeLen = MultiByteToWideChar(codepage, 0, pszReturnData, -1, NULL, 0); /* NOTE: iUnicodeLen includes space for null terminator */ pwszUnicodeStr = malloc(sizeof(wchar_t) * iUnicodeLen); if (!pwszUnicodeStr) { ErrorF("winClipboardFlushXEvents - SelectionNotify " "malloc failed for pwszUnicodeStr, aborting.\n"); /* Abort */ goto winClipboardFlushXEvents_SelectionNotify_Done; } /* Do the actual conversion */ MultiByteToWideChar(codepage, 0, pszReturnData, -1, pwszUnicodeStr, iUnicodeLen); /* Allocate global memory for the X clipboard data */ hGlobal = GlobalAlloc(GMEM_MOVEABLE, sizeof(wchar_t) * iUnicodeLen); free(pszReturnData); /* Check that global memory was allocated */ if (!hGlobal) { ErrorF("winClipboardFlushXEvents - SelectionNotify " "GlobalAlloc failed, aborting: %08x\n", (unsigned int)GetLastError()); /* Abort */ goto winClipboardFlushXEvents_SelectionNotify_Done; } /* Obtain a pointer to the global memory */ pszGlobalData = GlobalLock(hGlobal); if (pszGlobalData == NULL) { ErrorF("winClipboardFlushXEvents - Could not lock global " "memory for clipboard transfer\n"); /* Abort */ goto winClipboardFlushXEvents_SelectionNotify_Done; } /* Copy the returned string into the global memory */ wcscpy((wchar_t *)pszGlobalData, pwszUnicodeStr); free(pwszUnicodeStr); pwszUnicodeStr = NULL; /* Release the pointer to the global memory */ GlobalUnlock(hGlobal); pszGlobalData = NULL; /* Push the selection data to the Windows clipboard */ SetClipboardData(CF_UNICODETEXT, hGlobal); /* Flag that SetClipboardData has been called */ fSetClipboardData = FALSE; /* * NOTE: Do not try to free pszGlobalData, it is owned by * Windows after the call to SetClipboardData (). */ winClipboardFlushXEvents_SelectionNotify_Done: /* Free allocated resources */ free(pwszUnicodeStr); if (hGlobal && pszGlobalData) GlobalUnlock(hGlobal); if (fSetClipboardData) { SetClipboardData(CF_UNICODETEXT, NULL); SetClipboardData(CF_TEXT, NULL); } return WIN_XEVENTS_NOTIFY_DATA; } /* * Process any pending X events */ int winClipboardFlushXEvents(HWND hwnd, xcb_window_t iWindow, xcb_connection_t *conn, ClipboardConversionData *data, ClipboardAtoms *atoms) { xcb_atom_t atomClipboard = atoms->atomClipboard; xcb_atom_t atomUTF8String = atoms->atomUTF8String; xcb_atom_t atomCompoundText = atoms->atomCompoundText; xcb_atom_t atomTargets = atoms->atomTargets; /* Process all pending events */ xcb_generic_event_t *event; while ((event = xcb_poll_for_event(conn))) { const char *pszGlobalData = NULL; HGLOBAL hGlobal = NULL; char *pszConvertData = NULL; BOOL fAbort = FALSE; BOOL fCloseClipboard = FALSE; /* Branch on the event type */ switch (event->response_type & ~0x80) { case XCB_SELECTION_REQUEST: { char *xtpText_value = NULL; int xtpText_nitems; UINT codepage; xcb_selection_request_event_t *selection_request = (xcb_selection_request_event_t *)event; { char *pszAtomName = NULL; winDebug("SelectionRequest - target %d\n", selection_request->target); pszAtomName = get_atom_name(conn, selection_request->target); winDebug("SelectionRequest - Target atom name %s\n", pszAtomName); free(pszAtomName); } /* Abort if invalid target type */ if (selection_request->target != XCB_ATOM_STRING && selection_request->target != atomUTF8String && selection_request->target != atomCompoundText && selection_request->target != atomTargets) { /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } /* Handle targets type of request */ if (selection_request->target == atomTargets) { xcb_atom_t atomTargetArr[] = { atomTargets, atomUTF8String, XCB_ATOM_STRING, // atomCompoundText, not implemented (yet?) }; /* Try to change the property */ xcb_void_cookie_t cookie = xcb_change_property_checked(conn, XCB_PROP_MODE_REPLACE, selection_request->requestor, selection_request->property, XCB_ATOM_ATOM, 32, ARRAY_SIZE(atomTargetArr), (unsigned char *) atomTargetArr); xcb_generic_error_t *error; if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "xcb_change_property failed"); free(error); } /* Setup selection notify xevent */ xcb_selection_notify_event_t eventSelection; eventSelection.response_type = XCB_SELECTION_NOTIFY; eventSelection.requestor = selection_request->requestor; eventSelection.selection = selection_request->selection; eventSelection.target = selection_request->target; eventSelection.property = selection_request->property; eventSelection.time = selection_request->time; /* * Notify the requesting window that * the operation has completed */ cookie = xcb_send_event_checked(conn, FALSE, eventSelection.requestor, 0, (char *) &eventSelection); if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "xcb_send_event() failed\n"); } break; } /* Close clipboard if we have it open already */ if (GetOpenClipboardWindow() == hwnd) { CloseClipboard(); } /* Access the clipboard */ if (!OpenClipboard(hwnd)) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "OpenClipboard () failed: %08x\n", (unsigned int)GetLastError()); /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } /* Indicate that clipboard was opened */ fCloseClipboard = TRUE; /* Check that clipboard format is available */ if (!IsClipboardFormatAvailable(CF_UNICODETEXT)) { static int count; /* Hack to stop acroread spamming the log */ static HWND lasthwnd; /* I've not seen any other client get here repeatedly? */ if (hwnd != lasthwnd) count = 0; count++; if (count < 6) ErrorF("winClipboardFlushXEvents - CF_UNICODETEXT is not " "available from Win32 clipboard. Aborting %d.\n", count); lasthwnd = hwnd; /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } /* Get a pointer to the clipboard text, in desired format */ /* Retrieve clipboard data */ hGlobal = GetClipboardData(CF_UNICODETEXT); if (!hGlobal) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "GetClipboardData () failed: %08x\n", (unsigned int)GetLastError()); /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } pszGlobalData = (char *) GlobalLock(hGlobal); /* Convert to target string style */ if (selection_request->target == XCB_ATOM_STRING) { codepage = CP_ISO_8559_1; // code page identifier for iso-8559-1 } else if (selection_request->target == atomUTF8String) { codepage = CP_UTF8; // code page identifier for utf8 } else if (selection_request->target == atomCompoundText) { // COMPOUND_TEXT is complex, not (yet) implemented pszGlobalData = "COMPOUND_TEXT not implemented"; codepage = CP_UTF8; // code page identifier for utf8 } /* Convert the UTF16 string to required encoding */ int iConvertDataLen = WideCharToMultiByte(codepage, 0, (LPCWSTR) pszGlobalData, -1, NULL, 0, NULL, NULL); /* NOTE: iConvertDataLen includes space for null terminator */ pszConvertData = malloc(iConvertDataLen); WideCharToMultiByte(codepage, 0, (LPCWSTR) pszGlobalData, -1, pszConvertData, iConvertDataLen, NULL, NULL); /* Convert DOS string to UNIX string */ winClipboardDOStoUNIX(pszConvertData, strlen(pszConvertData)); xtpText_value = strdup(pszConvertData); xtpText_nitems = strlen(pszConvertData); /* data will fit into a single X request? (INCR not yet supported) */ { uint32_t maxreqsize = xcb_get_maximum_request_length(conn); /* covert to bytes and allow for allow for X_ChangeProperty request */ maxreqsize = maxreqsize*4 - 24; if (xtpText_nitems > maxreqsize) { ErrorF("winClipboardFlushXEvents - clipboard data size %d greater than maximum %u\n", xtpText_nitems, maxreqsize); /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } } /* Copy the clipboard text to the requesting window */ xcb_void_cookie_t cookie = xcb_change_property_checked(conn, XCB_PROP_MODE_REPLACE, selection_request->requestor, selection_request->property, selection_request->target, 8, xtpText_nitems, xtpText_value); xcb_generic_error_t *error; if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "xcb_change_property failed\n"); /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } /* Free the converted string */ free(pszConvertData); pszConvertData = NULL; /* Release the clipboard data */ GlobalUnlock(hGlobal); pszGlobalData = NULL; fCloseClipboard = FALSE; CloseClipboard(); /* Clean up */ free(xtpText_value); xtpText_value = NULL; /* Setup selection notify event */ xcb_selection_notify_event_t eventSelection; eventSelection.response_type = XCB_SELECTION_NOTIFY; eventSelection.requestor = selection_request->requestor; eventSelection.selection = selection_request->selection; eventSelection.target = selection_request->target; eventSelection.property = selection_request->property; eventSelection.time = selection_request->time; /* Notify the requesting window that the operation has completed */ cookie = xcb_send_event_checked(conn, FALSE, eventSelection.requestor, 0, (char *) &eventSelection); if ((error = xcb_request_check(conn, cookie))) { ErrorF("winClipboardFlushXEvents - SelectionRequest - " "xcb_send_event() failed\n"); /* Abort */ fAbort = TRUE; goto winClipboardFlushXEvents_SelectionRequest_Done; } winClipboardFlushXEvents_SelectionRequest_Done: /* Free allocated resources */ if (xtpText_value) { free(xtpText_value); } if (pszConvertData) free(pszConvertData); if (hGlobal && pszGlobalData) GlobalUnlock(hGlobal); /* * Send a SelectionNotify event to the requesting * client when we abort. */ if (fAbort) { /* Setup selection notify event */ eventSelection.response_type = XCB_SELECTION_NOTIFY; eventSelection.requestor = selection_request->requestor; eventSelection.selection = selection_request->selection; eventSelection.target = selection_request->target; eventSelection.property = XCB_NONE; eventSelection.time = selection_request->time; /* Notify the requesting window that the operation is complete */ cookie = xcb_send_event_checked(conn, FALSE, eventSelection.requestor, 0, (char *) &eventSelection); if ((error = xcb_request_check(conn, cookie))) { /* * Should not be a problem if XSendEvent fails because * the client may simply have exited. */ ErrorF("winClipboardFlushXEvents - SelectionRequest - " "xcb_send_event() failed for abort event.\n"); } } /* Close clipboard if it was opened */ if (fCloseClipboard) { fCloseClipboard = FALSE; CloseClipboard(); } break; } case XCB_SELECTION_NOTIFY: { xcb_selection_notify_event_t *selection_notify = (xcb_selection_notify_event_t *)event; winDebug("winClipboardFlushXEvents - SelectionNotify\n"); { char *pszAtomName; pszAtomName = get_atom_name(conn, selection_notify->selection); winDebug("winClipboardFlushXEvents - SelectionNotify - ATOM: %s\n", pszAtomName); free(pszAtomName); } /* SelectionNotify with property of XCB_NONE indicates either: (i) Generated by the X server if no owner for the specified selection exists (perhaps it's disappeared on us mid-transaction), or (ii) Sent by the selection owner when the requested selection conversion could not be performed or server errors prevented the conversion data being returned */ if (selection_notify->property == XCB_NONE) { ErrorF("winClipboardFlushXEvents - SelectionNotify - " "Conversion to format %d refused.\n", selection_notify->target); return WIN_XEVENTS_FAILED; } if (selection_notify->target == atomTargets) { return winClipboardSelectionNotifyTargets(hwnd, iWindow, conn, data, atoms); } return winClipboardSelectionNotifyData(hwnd, iWindow, conn, data, atoms); } case XCB_SELECTION_CLEAR: winDebug("SelectionClear - doing nothing\n"); break; case XCB_PROPERTY_NOTIFY: { xcb_property_notify_event_t *property_notify = (xcb_property_notify_event_t *)event; /* If INCR is in progress, collect the data */ if (data->incr && (property_notify->atom == atoms->atomLocalProperty) && (property_notify->state == XCB_PROPERTY_NEW_VALUE)) return winClipboardSelectionNotifyData(hwnd, iWindow, conn, data, atoms); break; } case XCB_MAPPING_NOTIFY: break; case 0: /* This is just laziness rather than making sure we used _checked everywhere */ { xcb_generic_error_t *err = (xcb_generic_error_t *)event; ErrorF("winClipboardFlushXEvents - Error code: %i, ID: 0x%08x, " "Major opcode: %i, Minor opcode: %i\n", err->error_code, err->resource_id, err->major_code, err->minor_code); } break; default: if ((event->response_type & ~0x80) == XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER + xfixes_event_base) { xcb_xfixes_selection_notify_event_t *e = (xcb_xfixes_selection_notify_event_t *)event; winDebug("winClipboardFlushXEvents - XFixesSetSelectionOwnerNotify\n"); /* Save selection owners for monitored selections, ignore other selections */ if ((e->selection == XCB_ATOM_PRIMARY) && fPrimarySelection) { MonitorSelection(e, CLIP_OWN_PRIMARY); } else if (e->selection == atomClipboard) { MonitorSelection(e, CLIP_OWN_CLIPBOARD); } else break; /* Selection is being disowned */ if (e->owner == XCB_NONE) { winDebug("winClipboardFlushXEvents - No window, returning.\n"); break; } /* XXX: there are all kinds of wacky edge cases we might need here: - we own windows clipboard, but neither PRIMARY nor CLIPBOARD have an owner, so we should disown it? - root window is taking ownership? */ /* If we are the owner of the most recently owned selection, don't go all recursive :) */ if ((lastOwnedSelectionIndex != CLIP_OWN_NONE) && (s_iOwners[lastOwnedSelectionIndex] == iWindow)) { winDebug("winClipboardFlushXEvents - Ownership changed to us, aborting.\n"); break; } /* Close clipboard if we have it open already (possible? correct??) */ if (GetOpenClipboardWindow() == hwnd) { CloseClipboard(); } /* Access the Windows clipboard */ if (!OpenClipboard(hwnd)) { ErrorF("winClipboardFlushXEvents - OpenClipboard () failed: %08x\n", (int) GetLastError()); break; } /* Take ownership of the Windows clipboard */ if (!EmptyClipboard()) { ErrorF("winClipboardFlushXEvents - EmptyClipboard () failed: %08x\n", (int) GetLastError()); break; } /* Advertise regular text and unicode */ SetClipboardData(CF_UNICODETEXT, NULL); SetClipboardData(CF_TEXT, NULL); /* Release the clipboard */ if (!CloseClipboard()) { ErrorF("winClipboardFlushXEvents - CloseClipboard () failed: %08x\n", (int) GetLastError()); break; } } /* XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY */ /* XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE */ else { ErrorF("winClipboardFlushXEvents - unexpected event type %d\n", event->response_type); } break; } /* I/O errors etc. */ { int e = xcb_connection_has_error(conn); if (e) { ErrorF("winClipboardFlushXEvents - Fatal error %d on xcb connection\n", e); break; } } } return WIN_XEVENTS_SUCCESS; } xorg-server-21.1.16/hw/xwin/winclipboard/xwinclip.c0000644000175000017500000000504214757411105015715 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 AUTHORS OR COPYRIGHT HOLDERS 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 copyright holder(s) *and author(s) 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 copyright holder(s) and author(s). * * Authors: Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include "winclipboard.h" /* * Main function */ int main (int argc, char *argv[]) { int i; char *pszDisplay = NULL; /* Parse command-line parameters */ for (i = 1; i < argc; ++i) { /* Look for -display "display_name" or --display "display_name" */ if (i < argc - 1 && (!strcmp (argv[i], "-display") || !strcmp (argv[i], "--display"))) { /* Grab a pointer to the display parameter */ pszDisplay = argv[i + 1]; /* Skip the display argument */ i++; continue; } /* Look for -noprimary */ if (!strcmp (argv[i], "-noprimary")) { fPrimarySelection = 0; continue; } /* Yack when we find a parameter that we don't know about */ printf ("Unknown parameter: %s\nExiting.\n", argv[i]); exit (1); } winClipboardProc(pszDisplay, NULL /* Use XAUTHORITY for auth data */); return 0; } xorg-server-21.1.16/hw/xwin/winclipboard/debug.c0000644000175000017500000000310614757411105015145 // // Copyright © Jon TURNEY 2013 // // This file is part of xwinclip. // // 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, and to permit persons to whom the // Software is furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice (including the next // paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. // #include #include #if 1 int winDebug(const char *format, ...) { int count; va_list ap; va_start(ap, format); count = fprintf(stderr, "xwinclip: "); count += vfprintf(stderr, format, ap); va_end(ap); return count; } #endif int ErrorF(const char *format, ...) { int count; va_list ap; va_start(ap, format); count = vfprintf(stderr, format, ap); va_end(ap); return count; } xorg-server-21.1.16/hw/xwin/winclipboard/xwinclip.man0000644000175000017500000000531514757411105016251 .TH xwinclip 1 @xorgversion@ .SH NAME xwinclip - An X11 and Windows clipboard integration tool .SH SYNOPSIS .B xwinclip [OPTION]... .SH DESCRIPTION \fIxwinclip\fP is a tool for copying and pasting text between the Windows and X11 clipboard systems. \fIxwinclip\fP watches for updates to either clipboard and copies data between them when either one is updated. \fIxwinclip\fP monitors the X PRIMARY and CLIBPOARD selections for changes in ownership, and makes the contents of the most recent one to change available to paste from the Windows clipboard. It also monitors the contents of the Windows clipboard for changes, taking ownership of the PRIMARY and CLIPBOARD selections, and making the contents of the Windows clipboard available in them. .B Note well: The \fIXWin(1)\fP X server has internal clipboard integration that is enabled by default. Do \fINOT\fP run \fIxwinclip\fP unless \fIXWin(1)\fP has been started with the -noclipboard option. .SH OPTIONS \fIxwinclip\fP accepts the following optional command line switches: .TP 8 .B \-display [display] Specifies the X server display to connect to. .TP 8 .B \-noprimary Do not monitor the PRIMARY selection. .SH "SEE ALSO" XWin(1) .SH BUGS Only text clipboard contents are supported. The INCR (Incremental transfer) clipboard protocol for clipboard contents larger than the maximum size of an X request (approximately 256K) is only supported for X -> Windows clipboard transfers. Some X clients, notably ones written in Tcl/Tk, do not re-assert ownership of the PRIMARY selection or update its timestamp when its contents change, which currently prevents \fIxwinclip\fP from correctly noticing that the PRIMARY selection's contents have changed. Windows clipboard rendering is synchronous in the WM_RENDER*FORMAT message (that is, we must have placed the contents onto the clipboard by the time we return from processing this message), but we must wait for the X client which owns the selection to convert the selection to our requested format. This is currently achieved using a fixed timeout. After requesting conversion of the selection, if no events are received from the X client which owns the selection for one second, the conversion is assumed to have failed. The XWin(1) server should indicate somehow (by placing an atom on the root window?) that it is running with its internal clipboard integration enabled, and xwinclip should notice this and exit with an appropriate error. Probably many other bugs. .SH "CONFORMING TO" ICCCM (Inter-Client Communication Conventions Manual) 2.0 .SH AUTHORS Contributors to xwinclip include Benjamin Riefenstahl, Roland Cassard, Brian Genisio, Colin Harrison, Harold L Hunt II, Matsuzaki Kensuke, Jon Turney, Chris Twiner and Jeremy Wilkins. xorg-server-21.1.16/hw/xwin/meson.build0000644000175000017500000000745314757411105013411 windows = import('windows') windowsdri_dep = dependency('windowsdriproto', required: false) build_windowsdri = windowsdri_dep.found() xwin_sys_libs = [] xwin_sys_libs += '-ldxguid' if host_machine.system() == 'cygwin' server_name = 'XWin' else server_name = 'Xming' xwin_sys_libs += ['-lpthread', '-lws2_32'] endif xwin_c_args = [] xwin_c_args += '-DHAVE_XWIN_CONFIG_H' xwin_c_args += '-Wno-bad-function-cast' srcs_windows = [ 'winclipboardinit.c', 'winclipboardwrappers.c', ] subdir('winclipboard') xwin_glx = [] xwin_windowsdri = [] if build_glx if build_windowsdri xwin_c_args += '-DXWIN_WINDOWS_DRI' subdir('dri') endif xwin_c_args += '-DXWIN_GLX_WINDOWS' xwin_sys_libs += '-lopengl32' subdir('glx') endif srcs_windows += [ 'winmultiwindowshape.c', 'winmultiwindowwindow.c', 'winmultiwindowwm.c', 'winmultiwindowwndproc.c', 'propertystore.h', 'winSetAppUserModelID.c', ] xwin_sys_libs += ['-lshlwapi', '-lole32', '-ldwmapi'] srcs_windows += [ 'winrandr.c', ] srcs_windows += [ 'InitInput.c', 'InitOutput.c', 'winallpriv.c', 'winauth.c', 'winblock.c', 'wincmap.c', 'winconfig.c', 'wincreatewnd.c', 'wincursor.c', 'windialogs.c', 'winengine.c', 'winerror.c', 'winglobals.c', 'winkeybd.c', 'winkeyhook.c', 'winmisc.c', 'winmonitors.c', 'winmouse.c', 'winmsg.c', 'winmsgwindow.c', 'winmultiwindowclass.c', 'winmultiwindowicons.c', 'winos.c', 'winprefs.c', 'winprocarg.c', 'winscrinit.c', 'winshadddnl.c', 'winshadgdi.c', 'wintaskbar.c', 'wintrayicon.c', 'winvalargs.c', 'winwakeup.c', 'winwindow.c', 'winwndproc.c', 'ddraw.h', 'winconfig.h', 'win.h', 'winglobals.h', 'winkeybd.h', 'winkeynames.h', 'winlayouts.h', 'winmessages.h', 'winmonitors.h', 'winmsg.h', 'winms.h', 'winmultiwindowclass.h', 'winmultiwindowicons.h', 'winprefs.h', 'winresource.h', 'winwindow.h', 'windisplay.c', 'windisplay.h', '../../mi/miinitext.c', '../../mi/miinitext.h', ] rsrc = windows.compile_resources('XWin.rc', include_directories: include_directories('../../include/')) srcs_windows += rsrc flex = find_program('flex') bison = find_program('bison') lgen = generator( flex, output : '@PLAINNAME@.yy.c', arguments : ['-i', '-o', '@OUTPUT@', '@INPUT@'] ) lfiles = lgen.process('winprefslex.l') srcs_windows += lfiles pgen = generator( bison, output : ['@BASENAME@.c', '@BASENAME@.h'], arguments : ['@INPUT@', '--defines=@OUTPUT1@', '--output=@OUTPUT0@'] ) pfiles = pgen.process('winprefsyacc.y') srcs_windows += pfiles xwin_dep = [ common_dep, dependency('xcb-aux'), dependency('xcb-image'), dependency('xcb-ewmh'), dependency('xcb-icccm'), dependency('xcb-composite'), ] executable( server_name, srcs_windows, include_directories: [inc, top_dir_inc], dependencies: xwin_dep, link_with: [ xwin_windowsdri, xwin_glx, xwin_clipboard, libxserver_fb, libxserver, libxserver_glx, libglxvnd, libxserver_xkb_stubs, libxserver_miext_shadow, libxserver_pseudoramix, libxserver_xi_stubs, ], link_args: ['-Wl,--disable-stdcall-fixup', '-Wl,--export-all-symbols'] + xwin_sys_libs, c_args: xwin_c_args, gui_app: true, install: true, ) install_data( 'system.XWinrc', install_dir: join_paths(get_option('sysconfdir'), 'X11') ) xwin_man = configure_file( input: 'man/XWin.man', output: 'XWin.1', configuration: manpage_config, ) install_man(xwin_man) xwinrc_man = configure_file( input: 'man/XWinrc.man', output: 'XWinrc.5', configuration: manpage_config, ) install_man(xwinrc_man) xorg-server-21.1.16/hw/xwin/Makefile.am0000644000175000017500000000622314757411105013275 bin_PROGRAMS = XWin SRCS_CLIPBOARD = \ winclipboardinit.c \ winclipboardwrappers.c CLIPBOARD_LIBS = $(top_builddir)/hw/xwin/winclipboard/libXWinclipboard.la if XWIN_GLX_WINDOWS GLX_DIR = DEFS_GLX_WINDOWS = XWIN_GLX_LIBS = if XWIN_WINDOWS_DRI GLX_DIR += dri DEFS_GLX_WINDOWS += -DXWIN_WINDOWS_DRI XWIN_GLX_LIBS += $(top_builddir)/hw/xwin/dri/libWindowsDRI.la endif GLX_DIR += glx DEFS_GLX_WINDOWS += -DXWIN_GLX_WINDOWS XWIN_GLX_LIBS += $(top_builddir)/hw/xwin/glx/libXwinGLX.la XWIN_GLX_SYS_LIBS = -lopengl32 endif SRCS_MULTIWINDOW = \ winmultiwindowshape.c \ winmultiwindowwindow.c \ winmultiwindowwm.c \ winmultiwindowwndproc.c \ propertystore.h \ winSetAppUserModelID.c MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32 -ldwmapi SRCS_RANDR = \ winrandr.c SRCS = InitInput.c \ InitOutput.c \ winallpriv.c \ winauth.c \ winblock.c \ wincmap.c \ winconfig.c \ wincreatewnd.c \ wincursor.c \ windialogs.c \ winengine.c \ winerror.c \ winglobals.c \ winkeybd.c \ winkeyhook.c \ winmisc.c \ winmonitors.c \ winmouse.c \ winmsg.c \ winmsgwindow.c \ winmultiwindowclass.c \ winmultiwindowicons.c \ winos.c \ winprefs.c \ winprefsyacc.y \ winprefslex.l \ winprocarg.c \ winscrinit.c \ winshadddnl.c \ winshadgdi.c \ wintaskbar.c \ wintrayicon.c \ winvalargs.c \ winwakeup.c \ winwindow.c \ winwndproc.c \ ddraw.h \ winconfig.h \ win.h \ winglobals.h \ winkeybd.h \ winkeynames.h \ winlayouts.h \ winmessages.h \ winmonitors.h \ winmsg.h \ winms.h \ winmultiwindowclass.h \ winmultiwindowicons.h \ winprefs.h \ winresource.h \ winwindow.h \ windisplay.c \ windisplay.h \ XWin.rc \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ $(SRCS_CLIPBOARD) \ $(SRCS_MULTIWINDOW) \ $(SRCS_RANDR) DEFS = \ $(DEFS_GLX_WINDOWS) \ $(DEFS_MULTIWINDOWEXTWM) XWin_SOURCES = $(SRCS) XWIN_SYS_LIBS += -ldxguid XWIN_LIBS += \ $(top_builddir)/pseudoramiX/libPseudoramiX.la \ $(top_builddir)/Xi/libXistubs.la XWin_DEPENDENCIES = \ $(XWIN_GLX_LIBS) \ $(XWIN_LIBS) \ $(CLIPBOARD_LIBS) \ $(XSERVER_LIBS) XWin_LDADD = \ $(XWIN_GLX_LIBS) \ $(XWIN_LIBS) \ $(CLIPBOARD_LIBS) \ $(XSERVER_LIBS) \ $(XWIN_GLX_SYS_LIBS) \ $(XSERVER_SYS_LIBS) \ $(XWIN_SYS_LIBS) \ $(MULTIWINDOW_SYS_LIBS) XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG) .rc.o: $(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include XWin.o: XWin.rc XWin.exe.manifest X.ico winprefsyacc.h: winprefsyacc.c winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c CLEANFILES = $(BUILT_SOURCES) AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ -I$(top_srcdir) \ -Wno-bad-function-cast xwinconfigdir = $(sysconfdir)/X11 xwinconfig_DATA = system.XWinrc install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) XWin$(EXEEXT) X) EXTRA_DIST = \ $(xwinconfig_DATA) \ X.ico \ XWin.rc \ XWin.exe.manifest relink: $(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT) SUBDIRS = man $(GLX_DIR) winclipboard . DIST_SUBDIRS = man dri glx winclipboard . xorg-server-21.1.16/hw/xwin/Makefile.in0000644000175000017500000014206414757411116013314 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = XWin$(EXEEXT) @XWIN_GLX_WINDOWS_TRUE@@XWIN_WINDOWS_DRI_TRUE@am__append_1 = dri @XWIN_GLX_WINDOWS_TRUE@@XWIN_WINDOWS_DRI_TRUE@am__append_2 = -DXWIN_WINDOWS_DRI @XWIN_GLX_WINDOWS_TRUE@@XWIN_WINDOWS_DRI_TRUE@am__append_3 = $(top_builddir)/hw/xwin/dri/libWindowsDRI.la subdir = hw/xwin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xwinconfigdir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = winclipboardinit.$(OBJEXT) \ winclipboardwrappers.$(OBJEXT) am__objects_2 = winmultiwindowshape.$(OBJEXT) \ winmultiwindowwindow.$(OBJEXT) winmultiwindowwm.$(OBJEXT) \ winmultiwindowwndproc.$(OBJEXT) winSetAppUserModelID.$(OBJEXT) am__objects_3 = winrandr.$(OBJEXT) am__objects_4 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ winallpriv.$(OBJEXT) winauth.$(OBJEXT) winblock.$(OBJEXT) \ wincmap.$(OBJEXT) winconfig.$(OBJEXT) wincreatewnd.$(OBJEXT) \ wincursor.$(OBJEXT) windialogs.$(OBJEXT) winengine.$(OBJEXT) \ winerror.$(OBJEXT) winglobals.$(OBJEXT) winkeybd.$(OBJEXT) \ winkeyhook.$(OBJEXT) winmisc.$(OBJEXT) winmonitors.$(OBJEXT) \ winmouse.$(OBJEXT) winmsg.$(OBJEXT) winmsgwindow.$(OBJEXT) \ winmultiwindowclass.$(OBJEXT) winmultiwindowicons.$(OBJEXT) \ winos.$(OBJEXT) winprefs.$(OBJEXT) winprefsyacc.$(OBJEXT) \ winprefslex.$(OBJEXT) winprocarg.$(OBJEXT) \ winscrinit.$(OBJEXT) winshadddnl.$(OBJEXT) \ winshadgdi.$(OBJEXT) wintaskbar.$(OBJEXT) \ wintrayicon.$(OBJEXT) winvalargs.$(OBJEXT) winwakeup.$(OBJEXT) \ winwindow.$(OBJEXT) winwndproc.$(OBJEXT) windisplay.$(OBJEXT) \ XWin.$(OBJEXT) miinitext.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) am_XWin_OBJECTS = $(am__objects_4) XWin_OBJECTS = $(am_XWin_OBJECTS) am__DEPENDENCIES_1 = $(top_builddir)/pseudoramiX/libPseudoramiX.la \ $(top_builddir)/Xi/libXistubs.la am__DEPENDENCIES_2 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = XWin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(XWin_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/InitInput.Po \ ./$(DEPDIR)/InitOutput.Po ./$(DEPDIR)/miinitext.Po \ ./$(DEPDIR)/winSetAppUserModelID.Po ./$(DEPDIR)/winallpriv.Po \ ./$(DEPDIR)/winauth.Po ./$(DEPDIR)/winblock.Po \ ./$(DEPDIR)/winclipboardinit.Po \ ./$(DEPDIR)/winclipboardwrappers.Po ./$(DEPDIR)/wincmap.Po \ ./$(DEPDIR)/winconfig.Po ./$(DEPDIR)/wincreatewnd.Po \ ./$(DEPDIR)/wincursor.Po ./$(DEPDIR)/windialogs.Po \ ./$(DEPDIR)/windisplay.Po ./$(DEPDIR)/winengine.Po \ ./$(DEPDIR)/winerror.Po ./$(DEPDIR)/winglobals.Po \ ./$(DEPDIR)/winkeybd.Po ./$(DEPDIR)/winkeyhook.Po \ ./$(DEPDIR)/winmisc.Po ./$(DEPDIR)/winmonitors.Po \ ./$(DEPDIR)/winmouse.Po ./$(DEPDIR)/winmsg.Po \ ./$(DEPDIR)/winmsgwindow.Po ./$(DEPDIR)/winmultiwindowclass.Po \ ./$(DEPDIR)/winmultiwindowicons.Po \ ./$(DEPDIR)/winmultiwindowshape.Po \ ./$(DEPDIR)/winmultiwindowwindow.Po \ ./$(DEPDIR)/winmultiwindowwm.Po \ ./$(DEPDIR)/winmultiwindowwndproc.Po ./$(DEPDIR)/winos.Po \ ./$(DEPDIR)/winprefs.Po ./$(DEPDIR)/winprefslex.Po \ ./$(DEPDIR)/winprefsyacc.Po ./$(DEPDIR)/winprocarg.Po \ ./$(DEPDIR)/winrandr.Po ./$(DEPDIR)/winscrinit.Po \ ./$(DEPDIR)/winshadddnl.Po ./$(DEPDIR)/winshadgdi.Po \ ./$(DEPDIR)/wintaskbar.Po ./$(DEPDIR)/wintrayicon.Po \ ./$(DEPDIR)/winvalargs.Po ./$(DEPDIR)/winwakeup.Po \ ./$(DEPDIR)/winwindow.Po ./$(DEPDIR)/winwndproc.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) AM_V_LEX = $(am__v_LEX_@AM_V@) am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) am__v_LEX_0 = @echo " LEX " $@; am__v_LEX_1 = YLWRAP = $(top_srcdir)/ylwrap am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ -e s/c++$$/h++/ -e s/c$$/h/ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; am__v_YACC_1 = SOURCES = $(XWin_SOURCES) DIST_SOURCES = $(XWin_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(xwinconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/ylwrap winprefslex.c winprefsyacc.c \ winprefsyacc.h DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = \ $(DEFS_GLX_WINDOWS) \ $(DEFS_MULTIWINDOWEXTWM) DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ $(top_builddir)/pseudoramiX/libPseudoramiX.la \ $(top_builddir)/Xi/libXistubs.la XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -ldxguid YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SRCS_CLIPBOARD = \ winclipboardinit.c \ winclipboardwrappers.c CLIPBOARD_LIBS = $(top_builddir)/hw/xwin/winclipboard/libXWinclipboard.la @XWIN_GLX_WINDOWS_TRUE@GLX_DIR = $(am__append_1) glx @XWIN_GLX_WINDOWS_TRUE@DEFS_GLX_WINDOWS = $(am__append_2) \ @XWIN_GLX_WINDOWS_TRUE@ -DXWIN_GLX_WINDOWS @XWIN_GLX_WINDOWS_TRUE@XWIN_GLX_LIBS = $(am__append_3) \ @XWIN_GLX_WINDOWS_TRUE@ $(top_builddir)/hw/xwin/glx/libXwinGLX.la @XWIN_GLX_WINDOWS_TRUE@XWIN_GLX_SYS_LIBS = -lopengl32 SRCS_MULTIWINDOW = \ winmultiwindowshape.c \ winmultiwindowwindow.c \ winmultiwindowwm.c \ winmultiwindowwndproc.c \ propertystore.h \ winSetAppUserModelID.c MULTIWINDOW_SYS_LIBS = -lshlwapi -lole32 -ldwmapi SRCS_RANDR = \ winrandr.c SRCS = InitInput.c \ InitOutput.c \ winallpriv.c \ winauth.c \ winblock.c \ wincmap.c \ winconfig.c \ wincreatewnd.c \ wincursor.c \ windialogs.c \ winengine.c \ winerror.c \ winglobals.c \ winkeybd.c \ winkeyhook.c \ winmisc.c \ winmonitors.c \ winmouse.c \ winmsg.c \ winmsgwindow.c \ winmultiwindowclass.c \ winmultiwindowicons.c \ winos.c \ winprefs.c \ winprefsyacc.y \ winprefslex.l \ winprocarg.c \ winscrinit.c \ winshadddnl.c \ winshadgdi.c \ wintaskbar.c \ wintrayicon.c \ winvalargs.c \ winwakeup.c \ winwindow.c \ winwndproc.c \ ddraw.h \ winconfig.h \ win.h \ winglobals.h \ winkeybd.h \ winkeynames.h \ winlayouts.h \ winmessages.h \ winmonitors.h \ winmsg.h \ winms.h \ winmultiwindowclass.h \ winmultiwindowicons.h \ winprefs.h \ winresource.h \ winwindow.h \ windisplay.c \ windisplay.h \ XWin.rc \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/mi/miinitext.h \ $(SRCS_CLIPBOARD) \ $(SRCS_MULTIWINDOW) \ $(SRCS_RANDR) XWin_SOURCES = $(SRCS) XWin_DEPENDENCIES = \ $(XWIN_GLX_LIBS) \ $(XWIN_LIBS) \ $(CLIPBOARD_LIBS) \ $(XSERVER_LIBS) XWin_LDADD = \ $(XWIN_GLX_LIBS) \ $(XWIN_LIBS) \ $(CLIPBOARD_LIBS) \ $(XSERVER_LIBS) \ $(XWIN_GLX_SYS_LIBS) \ $(XSERVER_SYS_LIBS) \ $(XWIN_SYS_LIBS) \ $(MULTIWINDOW_SYS_LIBS) XWin_LDFLAGS = -mwindows -Wl,--disable-stdcall-fixup $(LD_EXPORT_SYMBOLS_FLAG) BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c CLEANFILES = $(BUILT_SOURCES) AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ -I$(top_srcdir) \ -Wno-bad-function-cast xwinconfigdir = $(sysconfdir)/X11 xwinconfig_DATA = system.XWinrc EXTRA_DIST = \ $(xwinconfig_DATA) \ X.ico \ XWin.rc \ XWin.exe.manifest SUBDIRS = man $(GLX_DIR) winclipboard . DIST_SUBDIRS = man dri glx winclipboard . all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .l .lo .o .obj .rc .y $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwin/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xwin/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list XWin$(EXEEXT): $(XWin_OBJECTS) $(XWin_DEPENDENCIES) $(EXTRA_XWin_DEPENDENCIES) @rm -f XWin$(EXEEXT) $(AM_V_CCLD)$(XWin_LINK) $(XWin_OBJECTS) $(XWin_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitInput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitOutput.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winSetAppUserModelID.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winallpriv.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winauth.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winblock.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winclipboardinit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winclipboardwrappers.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wincmap.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winconfig.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wincreatewnd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wincursor.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windialogs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windisplay.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winengine.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winerror.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winglobals.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winkeybd.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winkeyhook.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmisc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmonitors.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmouse.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmsg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmsgwindow.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowclass.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowicons.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowshape.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowwindow.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowwm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winmultiwindowwndproc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winos.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefslex.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefsyacc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprocarg.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winrandr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winscrinit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winshadddnl.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winshadgdi.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wintaskbar.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wintrayicon.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winvalargs.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwakeup.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwindow.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winwndproc.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< miinitext.o: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.o -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c miinitext.obj: $(top_srcdir)/mi/miinitext.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT miinitext.obj -MD -MP -MF $(DEPDIR)/miinitext.Tpo -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/miinitext.Tpo $(DEPDIR)/miinitext.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='miinitext.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o miinitext.obj `if test -f '$(top_srcdir)/mi/miinitext.c'; then $(CYGPATH_W) '$(top_srcdir)/mi/miinitext.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/mi/miinitext.c'; fi` .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-xwinconfigDATA: $(xwinconfig_DATA) @$(NORMAL_INSTALL) @list='$(xwinconfig_DATA)'; test -n "$(xwinconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(xwinconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(xwinconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xwinconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(xwinconfigdir)" || exit $$?; \ done uninstall-xwinconfigDATA: @$(NORMAL_UNINSTALL) @list='$(xwinconfig_DATA)'; test -n "$(xwinconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(xwinconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(xwinconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f winprefslex.c -rm -f winprefsyacc.c -rm -f winprefsyacc.h -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/InitInput.Po -rm -f ./$(DEPDIR)/InitOutput.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f ./$(DEPDIR)/winSetAppUserModelID.Po -rm -f ./$(DEPDIR)/winallpriv.Po -rm -f ./$(DEPDIR)/winauth.Po -rm -f ./$(DEPDIR)/winblock.Po -rm -f ./$(DEPDIR)/winclipboardinit.Po -rm -f ./$(DEPDIR)/winclipboardwrappers.Po -rm -f ./$(DEPDIR)/wincmap.Po -rm -f ./$(DEPDIR)/winconfig.Po -rm -f ./$(DEPDIR)/wincreatewnd.Po -rm -f ./$(DEPDIR)/wincursor.Po -rm -f ./$(DEPDIR)/windialogs.Po -rm -f ./$(DEPDIR)/windisplay.Po -rm -f ./$(DEPDIR)/winengine.Po -rm -f ./$(DEPDIR)/winerror.Po -rm -f ./$(DEPDIR)/winglobals.Po -rm -f ./$(DEPDIR)/winkeybd.Po -rm -f ./$(DEPDIR)/winkeyhook.Po -rm -f ./$(DEPDIR)/winmisc.Po -rm -f ./$(DEPDIR)/winmonitors.Po -rm -f ./$(DEPDIR)/winmouse.Po -rm -f ./$(DEPDIR)/winmsg.Po -rm -f ./$(DEPDIR)/winmsgwindow.Po -rm -f ./$(DEPDIR)/winmultiwindowclass.Po -rm -f ./$(DEPDIR)/winmultiwindowicons.Po -rm -f ./$(DEPDIR)/winmultiwindowshape.Po -rm -f ./$(DEPDIR)/winmultiwindowwindow.Po -rm -f ./$(DEPDIR)/winmultiwindowwm.Po -rm -f ./$(DEPDIR)/winmultiwindowwndproc.Po -rm -f ./$(DEPDIR)/winos.Po -rm -f ./$(DEPDIR)/winprefs.Po -rm -f ./$(DEPDIR)/winprefslex.Po -rm -f ./$(DEPDIR)/winprefsyacc.Po -rm -f ./$(DEPDIR)/winprocarg.Po -rm -f ./$(DEPDIR)/winrandr.Po -rm -f ./$(DEPDIR)/winscrinit.Po -rm -f ./$(DEPDIR)/winshadddnl.Po -rm -f ./$(DEPDIR)/winshadgdi.Po -rm -f ./$(DEPDIR)/wintaskbar.Po -rm -f ./$(DEPDIR)/wintrayicon.Po -rm -f ./$(DEPDIR)/winvalargs.Po -rm -f ./$(DEPDIR)/winwakeup.Po -rm -f ./$(DEPDIR)/winwindow.Po -rm -f ./$(DEPDIR)/winwndproc.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-xwinconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/InitInput.Po -rm -f ./$(DEPDIR)/InitOutput.Po -rm -f ./$(DEPDIR)/miinitext.Po -rm -f ./$(DEPDIR)/winSetAppUserModelID.Po -rm -f ./$(DEPDIR)/winallpriv.Po -rm -f ./$(DEPDIR)/winauth.Po -rm -f ./$(DEPDIR)/winblock.Po -rm -f ./$(DEPDIR)/winclipboardinit.Po -rm -f ./$(DEPDIR)/winclipboardwrappers.Po -rm -f ./$(DEPDIR)/wincmap.Po -rm -f ./$(DEPDIR)/winconfig.Po -rm -f ./$(DEPDIR)/wincreatewnd.Po -rm -f ./$(DEPDIR)/wincursor.Po -rm -f ./$(DEPDIR)/windialogs.Po -rm -f ./$(DEPDIR)/windisplay.Po -rm -f ./$(DEPDIR)/winengine.Po -rm -f ./$(DEPDIR)/winerror.Po -rm -f ./$(DEPDIR)/winglobals.Po -rm -f ./$(DEPDIR)/winkeybd.Po -rm -f ./$(DEPDIR)/winkeyhook.Po -rm -f ./$(DEPDIR)/winmisc.Po -rm -f ./$(DEPDIR)/winmonitors.Po -rm -f ./$(DEPDIR)/winmouse.Po -rm -f ./$(DEPDIR)/winmsg.Po -rm -f ./$(DEPDIR)/winmsgwindow.Po -rm -f ./$(DEPDIR)/winmultiwindowclass.Po -rm -f ./$(DEPDIR)/winmultiwindowicons.Po -rm -f ./$(DEPDIR)/winmultiwindowshape.Po -rm -f ./$(DEPDIR)/winmultiwindowwindow.Po -rm -f ./$(DEPDIR)/winmultiwindowwm.Po -rm -f ./$(DEPDIR)/winmultiwindowwndproc.Po -rm -f ./$(DEPDIR)/winos.Po -rm -f ./$(DEPDIR)/winprefs.Po -rm -f ./$(DEPDIR)/winprefslex.Po -rm -f ./$(DEPDIR)/winprefsyacc.Po -rm -f ./$(DEPDIR)/winprocarg.Po -rm -f ./$(DEPDIR)/winrandr.Po -rm -f ./$(DEPDIR)/winscrinit.Po -rm -f ./$(DEPDIR)/winshadddnl.Po -rm -f ./$(DEPDIR)/winshadgdi.Po -rm -f ./$(DEPDIR)/wintaskbar.Po -rm -f ./$(DEPDIR)/wintrayicon.Po -rm -f ./$(DEPDIR)/winvalargs.Po -rm -f ./$(DEPDIR)/winwakeup.Po -rm -f ./$(DEPDIR)/winwindow.Po -rm -f ./$(DEPDIR)/winwndproc.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-xwinconfigDATA .MAKE: $(am__recursive_targets) all check install install-am \ install-exec install-exec-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-exec-hook install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-xwinconfigDATA installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-xwinconfigDATA .PRECIOUS: Makefile .rc.o: $(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include XWin.o: XWin.rc XWin.exe.manifest X.ico winprefsyacc.h: winprefsyacc.c winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) XWin$(EXEEXT) X) relink: $(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xwin/winprefslex.c0000644000175000017500000016416014757411135013763 #line 2 "winprefslex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 6 #define YY_FLEX_SUBMINOR_VERSION 4 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #ifndef SIZE_MAX #define SIZE_MAX (~(size_t)0) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ /* begin standard C++ headers. */ /* TODO: this is always defined, so inline it */ #define yyconst const #if defined(__GNUC__) && __GNUC__ >= 3 #define yynoreturn __attribute__((__noreturn__)) #else #define yynoreturn #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an * integer in range [0..255] for use as an array index. */ #define YY_SC_TO_UI(c) ((YY_CHAR) (c)) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE yyrestart( yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif extern int yyleng; extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break * existing scanners that call yyless() from OUTSIDE yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. */ #define YY_LESS_LINENO(n) \ do { \ int yyl;\ for ( yyl = n; yyl < yyleng; ++yyl )\ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) #define YY_LINENO_REWIND_TO(dst) \ do {\ const char *p;\ for ( p = yy_cp-1; p >= (dst); --p)\ if ( *p == '\n' )\ --yylineno;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via yyrestart()), so that the user can continue scanning by * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches * instead of setting up a fresh yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void yyrestart ( FILE *input_file ); void yy_switch_to_buffer ( YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE yy_create_buffer ( FILE *file, int size ); void yy_delete_buffer ( YY_BUFFER_STATE b ); void yy_flush_buffer ( YY_BUFFER_STATE b ); void yypush_buffer_state ( YY_BUFFER_STATE new_buffer ); void yypop_buffer_state ( void ); static void yyensure_buffer_stack ( void ); static void yy_load_buffer_state ( void ); static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file ); #define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER ) YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str ); YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len ); void *yyalloc ( yy_size_t ); void *yyrealloc ( void *, yy_size_t ); void yyfree ( void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ yy_create_buffer( yyin, YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ typedef flex_uint8_t YY_CHAR; FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; extern int yylineno; int yylineno = 1; extern char *yytext; #ifdef yytext_ptr #undef yytext_ptr #endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state ( void ); static yy_state_type yy_try_NUL_trans ( yy_state_type current_state ); static int yy_get_next_buffer ( void ); static void yynoreturn yy_fatal_error ( const char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 34 #define YY_END_OF_BUFFER 35 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static const flex_int16_t yy_accept[195] = { 0, 0, 0, 35, 33, 4, 3, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 30, 31, 33, 4, 33, 0, 33, 0, 1, 1, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 32, 32, 33, 0, 2, 2, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 23, 33, 33, 33, 5, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 22, 33, 33, 25, 33, 33, 33, 8, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 13, 33, 33, 33, 33, 33, 33, 33, 33, 26, 33, 33, 33, 9, 33, 33, 33, 33, 21, 33, 33, 33, 33, 33, 16, 14, 15, 33, 33, 33, 19, 10, 33, 33, 33, 33, 33, 33, 11, 12, 17, 33, 33, 27, 33, 33, 33, 28, 33, 20, 33, 33, 33, 33, 33, 29, 24, 7, 33, 33, 33, 33, 33, 6, 18, 0 } ; static const YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 9, 10, 11, 12, 13, 14, 1, 15, 1, 1, 16, 17, 18, 19, 20, 1, 21, 22, 23, 24, 1, 25, 26, 27, 28, 1, 1, 1, 1, 1, 1, 29, 30, 31, 32, 33, 34, 35, 1, 36, 1, 1, 37, 38, 39, 40, 41, 1, 42, 43, 44, 45, 1, 46, 47, 48, 49, 50, 1, 51, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static const YY_CHAR yy_meta[52] = { 0, 1, 2, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static const flex_int16_t yy_base[202] = { 0, 0, 0, 384, 0, 381, 415, 50, 54, 375, 37, 35, 47, 35, 43, 53, 56, 46, 42, 57, 86, 51, 0, 0, 0, 377, 94, 373, 75, 91, 415, 99, 102, 42, 88, 84, 99, 99, 93, 96, 90, 99, 100, 127, 97, 107, 105, 105, 110, 100, 120, 123, 141, 0, 415, 149, 151, 415, 153, 150, 141, 137, 139, 141, 158, 157, 158, 151, 157, 149, 159, 154, 161, 161, 159, 159, 176, 173, 175, 175, 183, 174, 175, 193, 199, 189, 195, 186, 0, 199, 204, 197, 0, 199, 209, 195, 204, 212, 207, 206, 215, 222, 230, 224, 229, 224, 0, 228, 233, 0, 235, 240, 238, 0, 241, 242, 241, 243, 242, 250, 250, 258, 245, 247, 257, 254, 274, 266, 263, 0, 265, 265, 271, 265, 266, 283, 286, 287, 0, 282, 278, 290, 0, 279, 281, 289, 292, 0, 296, 302, 314, 315, 316, 0, 0, 0, 306, 314, 308, 0, 0, 317, 313, 327, 313, 318, 332, 0, 0, 0, 322, 329, 0, 326, 327, 328, 0, 329, 0, 330, 339, 342, 351, 350, 0, 0, 0, 358, 351, 357, 349, 353, 0, 0, 415, 72, 398, 400, 403, 405, 408, 411 } ; static const flex_int16_t yy_def[202] = { 0, 194, 1, 194, 195, 194, 194, 196, 197, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, 196, 198, 197, 199, 194, 199, 200, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 194, 200, 201, 194, 201, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 195, 0, 194, 194, 194, 194, 194, 194, 194 } ; static const flex_int16_t yy_nxt[467] = { 0, 4, 5, 6, 6, 7, 8, 9, 10, 11, 4, 12, 13, 14, 4, 15, 4, 16, 17, 18, 4, 19, 20, 21, 4, 4, 4, 4, 4, 10, 11, 4, 12, 13, 14, 4, 15, 4, 16, 17, 18, 4, 19, 20, 21, 4, 4, 4, 4, 4, 22, 23, 27, 33, 35, 24, 29, 30, 31, 36, 34, 37, 38, 39, 40, 43, 44, 59, 41, 45, 51, 42, 52, 24, 33, 35, 46, 29, 30, 31, 36, 34, 37, 38, 39, 40, 43, 44, 59, 41, 45, 51, 42, 52, 30, 31, 27, 46, 47, 53, 60, 48, 30, 31, 56, 57, 58, 62, 63, 49, 61, 65, 64, 50, 66, 67, 68, 69, 70, 47, 73, 60, 48, 74, 75, 76, 77, 78, 62, 63, 49, 61, 65, 64, 50, 66, 67, 68, 69, 70, 71, 73, 79, 80, 74, 75, 76, 77, 78, 81, 72, 56, 57, 58, 57, 58, 57, 58, 82, 83, 84, 71, 85, 79, 80, 86, 87, 88, 89, 90, 81, 72, 91, 92, 93, 94, 95, 96, 97, 82, 83, 84, 98, 85, 99, 100, 86, 87, 88, 89, 90, 101, 102, 91, 92, 93, 94, 95, 96, 97, 103, 104, 105, 98, 106, 99, 100, 107, 108, 109, 110, 111, 101, 102, 114, 112, 115, 116, 117, 118, 119, 103, 104, 105, 120, 106, 113, 121, 107, 108, 109, 110, 111, 122, 123, 114, 112, 115, 116, 117, 118, 119, 124, 125, 126, 120, 127, 113, 121, 128, 129, 130, 131, 132, 122, 123, 133, 134, 135, 136, 137, 138, 139, 124, 125, 126, 140, 127, 141, 142, 128, 129, 130, 131, 132, 143, 144, 133, 134, 135, 136, 137, 138, 139, 145, 146, 147, 140, 148, 141, 142, 149, 150, 151, 152, 153, 143, 144, 154, 155, 156, 157, 158, 159, 160, 145, 146, 147, 161, 148, 162, 163, 149, 150, 151, 152, 153, 165, 164, 154, 155, 156, 157, 158, 159, 160, 166, 167, 168, 161, 169, 162, 163, 170, 171, 172, 173, 174, 165, 164, 175, 176, 177, 178, 179, 180, 181, 166, 167, 168, 182, 169, 183, 184, 170, 171, 172, 173, 174, 185, 186, 175, 176, 177, 178, 179, 180, 181, 187, 188, 189, 182, 190, 183, 184, 191, 192, 193, 54, 25, 185, 186, 32, 25, 194, 194, 194, 194, 194, 187, 188, 189, 194, 190, 194, 194, 191, 192, 193, 26, 26, 28, 28, 28, 27, 27, 29, 29, 29, 55, 55, 55, 56, 56, 56, 3, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194 } ; static const flex_int16_t yy_chk[467] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 10, 11, 7, 8, 8, 8, 12, 10, 13, 14, 15, 16, 17, 18, 33, 16, 19, 21, 16, 21, 195, 10, 11, 19, 28, 28, 28, 12, 10, 13, 14, 15, 16, 17, 18, 33, 16, 19, 21, 16, 21, 29, 29, 26, 19, 20, 26, 34, 20, 31, 31, 32, 32, 32, 35, 36, 20, 34, 37, 36, 20, 38, 39, 40, 41, 42, 20, 44, 34, 20, 45, 46, 47, 48, 49, 35, 36, 20, 34, 37, 36, 20, 38, 39, 40, 41, 42, 43, 44, 50, 51, 45, 46, 47, 48, 49, 52, 43, 55, 55, 55, 56, 56, 58, 58, 59, 60, 61, 43, 62, 50, 51, 63, 64, 65, 66, 67, 52, 43, 68, 69, 70, 71, 72, 73, 74, 59, 60, 61, 75, 62, 76, 77, 63, 64, 65, 66, 67, 78, 79, 68, 69, 70, 71, 72, 73, 74, 80, 81, 82, 75, 83, 76, 77, 84, 85, 86, 87, 89, 78, 79, 91, 90, 93, 94, 95, 96, 97, 80, 81, 82, 98, 83, 90, 99, 84, 85, 86, 87, 89, 100, 101, 91, 90, 93, 94, 95, 96, 97, 102, 103, 104, 98, 105, 90, 99, 107, 108, 110, 111, 112, 100, 101, 114, 115, 116, 117, 118, 119, 120, 102, 103, 104, 121, 105, 122, 123, 107, 108, 110, 111, 112, 124, 125, 114, 115, 116, 117, 118, 119, 120, 126, 127, 128, 121, 130, 122, 123, 131, 132, 133, 134, 135, 124, 125, 136, 137, 139, 140, 141, 143, 144, 126, 127, 128, 145, 130, 146, 148, 131, 132, 133, 134, 135, 149, 148, 136, 137, 139, 140, 141, 143, 144, 150, 151, 152, 145, 156, 146, 148, 157, 158, 161, 162, 163, 149, 148, 164, 165, 166, 170, 171, 173, 174, 150, 151, 152, 175, 156, 177, 179, 157, 158, 161, 162, 163, 180, 181, 164, 165, 166, 170, 171, 173, 174, 182, 183, 187, 175, 188, 177, 179, 189, 190, 191, 27, 25, 180, 181, 9, 5, 3, 0, 0, 0, 0, 182, 183, 187, 0, 188, 0, 0, 189, 190, 191, 196, 196, 197, 197, 197, 198, 198, 199, 199, 199, 200, 200, 200, 201, 201, 201, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, 194 } ; /* Table of booleans, true if rule could match eol. */ static const flex_int32_t yy_rule_can_match_eol[35] = { 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int yy_flex_debug; int yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "winprefslex.l" #line 2 "winprefslex.l" /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ /* $XFree86: $ */ #include #include #include #include "winprefsyacc.h" extern void ErrorF (const char* /*f*/, ...); /* Copy the parsed string, must be free()d in yacc parser */ static char *makestr(char *str) { char *ptr; ptr = malloc(strlen(str)+1); if (!ptr) { ErrorF ("winMultiWindowLex:makestr() out of memory\n"); exit (-1); } strcpy(ptr, str); return ptr; } #line 690 "winprefslex.c" #define YY_NO_INPUT 1 #line 692 "winprefslex.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals ( void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int yylex_destroy ( void ); int yyget_debug ( void ); void yyset_debug ( int debug_flag ); YY_EXTRA_TYPE yyget_extra ( void ); void yyset_extra ( YY_EXTRA_TYPE user_defined ); FILE *yyget_in ( void ); void yyset_in ( FILE * _in_str ); FILE *yyget_out ( void ); void yyset_out ( FILE * _out_str ); int yyget_leng ( void ); char *yyget_text ( void ); int yyget_lineno ( void ); void yyset_lineno ( int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int yywrap ( void ); #else extern int yywrap ( void ); #endif #endif #ifndef YY_NO_UNPUT #endif #ifndef yytext_ptr static void yy_flex_strncpy ( char *, const char *, int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen ( const char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput ( void ); #else static int input ( void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int yylex (void); #define YY_DECL int yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { yy_state_type yy_current_state; char *yy_cp, *yy_bp; int yy_act; if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; if ( ! yyout ) yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_load_buffer_state( ); } { #line 63 "winprefslex.l" #line 909 "winprefslex.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } while ( yy_current_state != 194 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_find_action: yy_act = yy_accept[yy_current_state]; YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) yylineno++; ; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: /* rule 1 can match eol */ YY_RULE_SETUP #line 64 "winprefslex.l" { /* comment */ return NEWLINE; } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP #line 65 "winprefslex.l" { /* comment */ return NEWLINE; } YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP #line 66 "winprefslex.l" { return NEWLINE; } YY_BREAK case 4: YY_RULE_SETUP #line 67 "winprefslex.l" { /* ignore whitespace */ } YY_BREAK case 5: YY_RULE_SETUP #line 68 "winprefslex.l" { return MENU; } YY_BREAK case 6: YY_RULE_SETUP #line 69 "winprefslex.l" { return ICONDIRECTORY; } YY_BREAK case 7: YY_RULE_SETUP #line 70 "winprefslex.l" { return DEFAULTICON; } YY_BREAK case 8: YY_RULE_SETUP #line 71 "winprefslex.l" { return ICONS; } YY_BREAK case 9: YY_RULE_SETUP #line 72 "winprefslex.l" { return STYLES; } YY_BREAK case 10: YY_RULE_SETUP #line 73 "winprefslex.l" { return TOPMOST; } YY_BREAK case 11: YY_RULE_SETUP #line 74 "winprefslex.l" { return MAXIMIZE; } YY_BREAK case 12: YY_RULE_SETUP #line 75 "winprefslex.l" { return MINIMIZE; } YY_BREAK case 13: YY_RULE_SETUP #line 76 "winprefslex.l" { return BOTTOM; } YY_BREAK case 14: YY_RULE_SETUP #line 77 "winprefslex.l" { return NOTITLE; } YY_BREAK case 15: YY_RULE_SETUP #line 78 "winprefslex.l" { return OUTLINE; } YY_BREAK case 16: YY_RULE_SETUP #line 79 "winprefslex.l" { return NOFRAME; } YY_BREAK case 17: YY_RULE_SETUP #line 80 "winprefslex.l" { return ROOTMENU; } YY_BREAK case 18: YY_RULE_SETUP #line 81 "winprefslex.l" { return DEFAULTSYSMENU; } YY_BREAK case 19: YY_RULE_SETUP #line 82 "winprefslex.l" { return SYSMENU; } YY_BREAK case 20: YY_RULE_SETUP #line 83 "winprefslex.l" { return SEPARATOR; } YY_BREAK case 21: YY_RULE_SETUP #line 84 "winprefslex.l" { return ATSTART; } YY_BREAK case 22: YY_RULE_SETUP #line 85 "winprefslex.l" { return ATEND; } YY_BREAK case 23: YY_RULE_SETUP #line 86 "winprefslex.l" { return EXEC; } YY_BREAK case 24: YY_RULE_SETUP #line 87 "winprefslex.l" { return ALWAYSONTOP; } YY_BREAK case 25: YY_RULE_SETUP #line 88 "winprefslex.l" { return DEBUGOUTPUT; } YY_BREAK case 26: YY_RULE_SETUP #line 89 "winprefslex.l" { return RELOAD; } YY_BREAK case 27: YY_RULE_SETUP #line 90 "winprefslex.l" { return TRAYICON; } YY_BREAK case 28: YY_RULE_SETUP #line 91 "winprefslex.l" { return FORCEEXIT; } YY_BREAK case 29: YY_RULE_SETUP #line 92 "winprefslex.l" { return SILENTEXIT; } YY_BREAK case 30: YY_RULE_SETUP #line 93 "winprefslex.l" { return LB; } YY_BREAK case 31: YY_RULE_SETUP #line 94 "winprefslex.l" { return RB; } YY_BREAK case 32: YY_RULE_SETUP #line 95 "winprefslex.l" { yylval.sVal = makestr(yytext+1); \ yylval.sVal[strlen(yylval.sVal)-1] = 0; \ return STRING; } YY_BREAK case 33: YY_RULE_SETUP #line 98 "winprefslex.l" { yylval.sVal = makestr(yytext); \ return STRING; } YY_BREAK case 34: YY_RULE_SETUP #line 100 "winprefslex.l" ECHO; YY_BREAK #line 1148 "winprefslex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; char *source = (yytext_ptr); int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr) - 1); for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ yyrealloc( (void *) b->yy_ch_buf, (yy_size_t) (b->yy_buf_size + 2) ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; yyrestart( yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); /* "- 2" to take care of EOB's */ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { yy_state_type yy_current_state; char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { int yy_is_jam; char *yy_cp = (yy_c_buf_p); YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 195 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; yy_is_jam = (yy_current_state == 194); return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_UNPUT #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (int) ((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ yyrestart( yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve yytext */ (yy_hold_char) = *++(yy_c_buf_p); if ( c == '\n' ) yylineno++; ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = yy_create_buffer( yyin, YY_BUF_SIZE ); } yy_init_buffer( YY_CURRENT_BUFFER, input_file ); yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * yypop_buffer_state(); * yypush_buffer_state(new_buffer); */ yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; yy_init_buffer( b, file ); return b; } /** Destroy the buffer. * @param b a buffer created with yy_create_buffer() * */ void yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) yyfree( (void *) b->yy_ch_buf ); yyfree( (void *) b ); } /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. */ static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; yy_flush_buffer( b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then yy_init_buffer was _probably_ * called from yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; yyensure_buffer_stack(); /* This block is copied from yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from yy_switch_to_buffer. */ yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void yyensure_buffer_stack (void) { yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return NULL; b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); b->yy_buf_size = (int) (size - 2); /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; yy_switch_to_buffer( b ); return b; } /** Setup the input buffer state to scan a string. The next call to yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * yy_scan_bytes() instead. */ YY_BUFFER_STATE yy_scan_string (const char * yystr ) { return yy_scan_bytes( yystr, (int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); buf = (char *) yyalloc( n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = yy_scan_buffer( buf, n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yynoreturn yy_fatal_error (const char* msg ) { fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = (yy_hold_char); \ (yy_c_buf_p) = yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int yyget_lineno (void) { return yylineno; } /** Get the input stream. * */ FILE *yyget_in (void) { return yyin; } /** Get the output stream. * */ FILE *yyget_out (void) { return yyout; } /** Get the length of the current token. * */ int yyget_leng (void) { return yyleng; } /** Get the current token. * */ char *yyget_text (void) { return yytext; } /** Set the current line number. * @param _line_number line number * */ void yyset_lineno (int _line_number ) { yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ void yyset_in (FILE * _in_str ) { yyin = _in_str ; } void yyset_out (FILE * _out_str ) { yyout = _out_str ; } int yyget_debug (void) { return yy_flex_debug; } void yyset_debug (int _bdebug ) { yy_flex_debug = _bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from yylex_destroy(), so don't allocate here. */ /* We do not touch yylineno unless the option is enabled. */ yylineno = 1; (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT yyin = stdin; yyout = stdout; #else yyin = NULL; yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by * yylex_init() */ return 0; } /* yylex_destroy is for both reentrant and non-reentrant scanners. */ int yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ yy_delete_buffer( YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; yypop_buffer_state(); } /* Destroy the stack itself. */ yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, const char * s2, int n ) { int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (const char * s ) { int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *yyalloc (yy_size_t size ) { return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return realloc(ptr, size); } void yyfree (void * ptr ) { free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 100 "winprefslex.l" /* * Run-of-the mill requirement for yacc */ int yywrap (void) { return 1; } /* * Run a file through the yacc parser */ int parse_file (FILE *file) { int ret; if (!file) return 1; yylineno = 1; yyin = file; ret = yyparse (); yylex_destroy (); return ret; } xorg-server-21.1.16/hw/xwin/winprefsyacc.c0000644000175000017500000020243014757411135014103 /* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output, and Bison version. */ #define YYBISON 30802 /* Bison version string. */ #define YYBISON_VERSION "3.8.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* First part of user prologue. */ #line 1 "winprefsyacc.y" /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ /* $XFree86: $ */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ #include #include "winprefs.h" /* The following give better error messages in bison at the cost of a few KB */ #define YYERROR_VERBOSE 1 /* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ #define YYLTYPE_IS_TRIVIAL 1 #define YYENABLE_NLS 0 /* The global pref settings */ WINPREFS pref; /* The working menu */ static MENUPARSED menu; /* Functions for parsing the tokens into out structure */ /* Defined at the end section of this file */ static void SetIconDirectory (char *path); static void SetDefaultIcon (char *fname); static void SetRootMenu (char *menu); static void SetDefaultSysMenu (char *menu, int pos); static void SetTrayIcon (char *fname); static void OpenMenu(char *menuname); static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param); static void CloseMenu(void); static void OpenIcons(void); static void AddIconLine(char *matchstr, char *iconfile); static void CloseIcons(void); static void OpenStyles(void); static void AddStyleLine(char *matchstr, unsigned long style); static void CloseStyles(void); static void OpenSysMenu(void); static void AddSysMenuLine(char *matchstr, char *menuname, int pos); static void CloseSysMenu(void); static int yyerror (const char *s); extern char *yytext; extern int yylineno; extern int yylex(void); #line 160 "winprefsyacc.c" # ifndef YY_CAST # ifdef __cplusplus # define YY_CAST(Type, Val) static_cast (Val) # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast (Val) # else # define YY_CAST(Type, Val) ((Type) (Val)) # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val)) # endif # endif # ifndef YY_NULLPTR # if defined __cplusplus # if 201103L <= __cplusplus # define YY_NULLPTR nullptr # else # define YY_NULLPTR 0 # endif # else # define YY_NULLPTR ((void*)0) # endif # endif /* Use api.header.include to #include this header instead of duplicating it here. */ #ifndef YY_YY_WINPREFSYACC_H_INCLUDED # define YY_YY_WINPREFSYACC_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { YYEMPTY = -2, YYEOF = 0, /* "end of file" */ YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ NEWLINE = 258, /* NEWLINE */ MENU = 259, /* MENU */ LB = 260, /* LB */ RB = 261, /* RB */ ICONDIRECTORY = 262, /* ICONDIRECTORY */ DEFAULTICON = 263, /* DEFAULTICON */ ICONS = 264, /* ICONS */ STYLES = 265, /* STYLES */ TOPMOST = 266, /* TOPMOST */ MAXIMIZE = 267, /* MAXIMIZE */ MINIMIZE = 268, /* MINIMIZE */ BOTTOM = 269, /* BOTTOM */ NOTITLE = 270, /* NOTITLE */ OUTLINE = 271, /* OUTLINE */ NOFRAME = 272, /* NOFRAME */ DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ SYSMENU = 274, /* SYSMENU */ ROOTMENU = 275, /* ROOTMENU */ SEPARATOR = 276, /* SEPARATOR */ ATSTART = 277, /* ATSTART */ ATEND = 278, /* ATEND */ EXEC = 279, /* EXEC */ ALWAYSONTOP = 280, /* ALWAYSONTOP */ DEBUGOUTPUT = 281, /* "DEBUG" */ RELOAD = 282, /* RELOAD */ TRAYICON = 283, /* TRAYICON */ FORCEEXIT = 284, /* FORCEEXIT */ SILENTEXIT = 285, /* SILENTEXIT */ STRING = 286 /* STRING */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Token kinds. */ #define YYEMPTY -2 #define YYEOF 0 #define YYerror 256 #define YYUNDEF 257 #define NEWLINE 258 #define MENU 259 #define LB 260 #define RB 261 #define ICONDIRECTORY 262 #define DEFAULTICON 263 #define ICONS 264 #define STYLES 265 #define TOPMOST 266 #define MAXIMIZE 267 #define MINIMIZE 268 #define BOTTOM 269 #define NOTITLE 270 #define OUTLINE 271 #define NOFRAME 272 #define DEFAULTSYSMENU 273 #define SYSMENU 274 #define ROOTMENU 275 #define SEPARATOR 276 #define ATSTART 277 #define ATEND 278 #define EXEC 279 #define ALWAYSONTOP 280 #define DEBUGOUTPUT 281 #define RELOAD 282 #define TRAYICON 283 #define FORCEEXIT 284 #define SILENTEXIT 285 #define STRING 286 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 90 "winprefsyacc.y" char *sVal; unsigned long uVal; int iVal; #line 281 "winprefsyacc.c" }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED */ /* Symbol kind. */ enum yysymbol_kind_t { YYSYMBOL_YYEMPTY = -2, YYSYMBOL_YYEOF = 0, /* "end of file" */ YYSYMBOL_YYerror = 1, /* error */ YYSYMBOL_YYUNDEF = 2, /* "invalid token" */ YYSYMBOL_NEWLINE = 3, /* NEWLINE */ YYSYMBOL_MENU = 4, /* MENU */ YYSYMBOL_LB = 5, /* LB */ YYSYMBOL_RB = 6, /* RB */ YYSYMBOL_ICONDIRECTORY = 7, /* ICONDIRECTORY */ YYSYMBOL_DEFAULTICON = 8, /* DEFAULTICON */ YYSYMBOL_ICONS = 9, /* ICONS */ YYSYMBOL_STYLES = 10, /* STYLES */ YYSYMBOL_TOPMOST = 11, /* TOPMOST */ YYSYMBOL_MAXIMIZE = 12, /* MAXIMIZE */ YYSYMBOL_MINIMIZE = 13, /* MINIMIZE */ YYSYMBOL_BOTTOM = 14, /* BOTTOM */ YYSYMBOL_NOTITLE = 15, /* NOTITLE */ YYSYMBOL_OUTLINE = 16, /* OUTLINE */ YYSYMBOL_NOFRAME = 17, /* NOFRAME */ YYSYMBOL_DEFAULTSYSMENU = 18, /* DEFAULTSYSMENU */ YYSYMBOL_SYSMENU = 19, /* SYSMENU */ YYSYMBOL_ROOTMENU = 20, /* ROOTMENU */ YYSYMBOL_SEPARATOR = 21, /* SEPARATOR */ YYSYMBOL_ATSTART = 22, /* ATSTART */ YYSYMBOL_ATEND = 23, /* ATEND */ YYSYMBOL_EXEC = 24, /* EXEC */ YYSYMBOL_ALWAYSONTOP = 25, /* ALWAYSONTOP */ YYSYMBOL_DEBUGOUTPUT = 26, /* "DEBUG" */ YYSYMBOL_RELOAD = 27, /* RELOAD */ YYSYMBOL_TRAYICON = 28, /* TRAYICON */ YYSYMBOL_FORCEEXIT = 29, /* FORCEEXIT */ YYSYMBOL_SILENTEXIT = 30, /* SILENTEXIT */ YYSYMBOL_STRING = 31, /* STRING */ YYSYMBOL_YYACCEPT = 32, /* $accept */ YYSYMBOL_input = 33, /* input */ YYSYMBOL_line = 34, /* line */ YYSYMBOL_newline_or_nada = 35, /* newline_or_nada */ YYSYMBOL_command = 36, /* command */ YYSYMBOL_trayicon = 37, /* trayicon */ YYSYMBOL_rootmenu = 38, /* rootmenu */ YYSYMBOL_defaultsysmenu = 39, /* defaultsysmenu */ YYSYMBOL_defaulticon = 40, /* defaulticon */ YYSYMBOL_icondirectory = 41, /* icondirectory */ YYSYMBOL_menuline = 42, /* menuline */ YYSYMBOL_menulist = 43, /* menulist */ YYSYMBOL_menu = 44, /* menu */ YYSYMBOL_45_1 = 45, /* $@1 */ YYSYMBOL_iconline = 46, /* iconline */ YYSYMBOL_iconlist = 47, /* iconlist */ YYSYMBOL_icons = 48, /* icons */ YYSYMBOL_49_2 = 49, /* $@2 */ YYSYMBOL_group1 = 50, /* group1 */ YYSYMBOL_group2 = 51, /* group2 */ YYSYMBOL_stylecombo = 52, /* stylecombo */ YYSYMBOL_styleline = 53, /* styleline */ YYSYMBOL_stylelist = 54, /* stylelist */ YYSYMBOL_styles = 55, /* styles */ YYSYMBOL_56_3 = 56, /* $@3 */ YYSYMBOL_atspot = 57, /* atspot */ YYSYMBOL_sysmenuline = 58, /* sysmenuline */ YYSYMBOL_sysmenulist = 59, /* sysmenulist */ YYSYMBOL_sysmenu = 60, /* sysmenu */ YYSYMBOL_61_4 = 61, /* $@4 */ YYSYMBOL_forceexit = 62, /* forceexit */ YYSYMBOL_silentexit = 63, /* silentexit */ YYSYMBOL_debug = 64 /* debug */ }; typedef enum yysymbol_kind_t yysymbol_kind_t; #ifdef short # undef short #endif /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure and (if available) are included so that the code can choose integer types of a good width. */ #ifndef __PTRDIFF_MAX__ # include /* INFRINGES ON USER NAME SPACE */ # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YY_STDINT_H # endif #endif /* Narrow types that promote to a signed type and that can represent a signed or unsigned integer of at least N bits. In tables they can save space and decrease cache pressure. Promoting to a signed type helps avoid bugs in integer arithmetic. */ #ifdef __INT_LEAST8_MAX__ typedef __INT_LEAST8_TYPE__ yytype_int8; #elif defined YY_STDINT_H typedef int_least8_t yytype_int8; #else typedef signed char yytype_int8; #endif #ifdef __INT_LEAST16_MAX__ typedef __INT_LEAST16_TYPE__ yytype_int16; #elif defined YY_STDINT_H typedef int_least16_t yytype_int16; #else typedef short yytype_int16; #endif /* Work around bug in HP-UX 11.23, which defines these macros incorrectly for preprocessor constants. This workaround can likely be removed in 2023, as HPE has promised support for HP-UX 11.23 (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of . */ #ifdef __hpux # undef UINT_LEAST8_MAX # undef UINT_LEAST16_MAX # define UINT_LEAST8_MAX 255 # define UINT_LEAST16_MAX 65535 #endif #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__ typedef __UINT_LEAST8_TYPE__ yytype_uint8; #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \ && UINT_LEAST8_MAX <= INT_MAX) typedef uint_least8_t yytype_uint8; #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX typedef unsigned char yytype_uint8; #else typedef short yytype_uint8; #endif #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__ typedef __UINT_LEAST16_TYPE__ yytype_uint16; #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \ && UINT_LEAST16_MAX <= INT_MAX) typedef uint_least16_t yytype_uint16; #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX typedef unsigned short yytype_uint16; #else typedef int yytype_uint16; #endif #ifndef YYPTRDIFF_T # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__ # define YYPTRDIFF_T __PTRDIFF_TYPE__ # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__ # elif defined PTRDIFF_MAX # ifndef ptrdiff_t # include /* INFRINGES ON USER NAME SPACE */ # endif # define YYPTRDIFF_T ptrdiff_t # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX # else # define YYPTRDIFF_T long # define YYPTRDIFF_MAXIMUM LONG_MAX # endif #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__ # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned # endif #endif #define YYSIZE_MAXIMUM \ YY_CAST (YYPTRDIFF_T, \ (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \ ? YYPTRDIFF_MAXIMUM \ : YY_CAST (YYSIZE_T, -1))) #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X)) /* Stored state numbers (used for stacks). */ typedef yytype_int8 yy_state_t; /* State numbers in computations. */ typedef int yy_state_fast_t; #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ # define YY_(Msgid) Msgid # endif #endif #ifndef YY_ATTRIBUTE_PURE # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__)) # else # define YY_ATTRIBUTE_PURE # endif #endif #ifndef YY_ATTRIBUTE_UNUSED # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__) # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__)) # else # define YY_ATTRIBUTE_UNUSED # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YY_USE(E) ((void) (E)) #else # define YY_USE(E) /* empty */ #endif /* Suppress an incorrect diagnostic about yylval being uninitialized. */ #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__ # if __GNUC__ * 100 + __GNUC_MINOR__ < 407 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") # else # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") # endif # define YY_IGNORE_MAYBE_UNINITIALIZED_END \ _Pragma ("GCC diagnostic pop") #else # define YY_INITIAL_VALUE(Value) Value #endif #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN # define YY_IGNORE_MAYBE_UNINITIALIZED_END #endif #ifndef YY_INITIAL_VALUE # define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__ # define YY_IGNORE_USELESS_CAST_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"") # define YY_IGNORE_USELESS_CAST_END \ _Pragma ("GCC diagnostic pop") #endif #ifndef YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_BEGIN # define YY_IGNORE_USELESS_CAST_END #endif #define YY_ASSERT(E) ((void) (0 && (E))) #if !defined yyoverflow /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's 'empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* !defined yyoverflow */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yy_state_t yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYPTRDIFF_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / YYSIZEOF (*yyptr); \ } \ while (0) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from SRC to DST. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(Dst, Src, Count) \ __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src))) # else # define YYCOPY(Dst, Src, Count) \ do \ { \ YYPTRDIFF_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 98 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 32 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 33 /* YYNRULES -- Number of rules. */ #define YYNRULES 65 /* YYNSTATES -- Number of states. */ #define YYNSTATES 121 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 286 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM as returned by yylex, with out-of-bounds checking. */ #define YYTRANSLATE(YYX) \ (0 <= (YYX) && (YYX) <= YYMAXUTOK \ ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \ : YYSYMBOL_YYUNDEF) /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM as returned by yylex. */ static const yytype_int8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 }; #if YYDEBUG /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 133, 133, 134, 137, 138, 142, 143, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 160, 163, 166, 169, 172, 175, 176, 177, 178, 179, 182, 183, 186, 186, 189, 192, 193, 196, 196, 199, 200, 201, 202, 205, 206, 207, 210, 211, 212, 213, 216, 219, 220, 223, 223, 226, 227, 228, 231, 234, 235, 238, 238, 241, 244, 247 }; #endif /** Accessing symbol of state STATE. */ #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State]) #if YYDEBUG || 0 /* The user-facing name of the symbol whose (internal) number is YYSYMBOL. No bounds checking. */ static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED; /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "\"end of file\"", "error", "\"invalid token\"", "NEWLINE", "MENU", "LB", "RB", "ICONDIRECTORY", "DEFAULTICON", "ICONS", "STYLES", "TOPMOST", "MAXIMIZE", "MINIMIZE", "BOTTOM", "NOTITLE", "OUTLINE", "NOFRAME", "DEFAULTSYSMENU", "SYSMENU", "ROOTMENU", "SEPARATOR", "ATSTART", "ATEND", "EXEC", "ALWAYSONTOP", "\"DEBUG\"", "RELOAD", "TRAYICON", "FORCEEXIT", "SILENTEXIT", "STRING", "$accept", "input", "line", "newline_or_nada", "command", "trayicon", "rootmenu", "defaultsysmenu", "defaulticon", "icondirectory", "menuline", "menulist", "menu", "$@1", "iconline", "iconlist", "icons", "$@2", "group1", "group2", "stylecombo", "styleline", "stylelist", "styles", "$@3", "atspot", "sysmenuline", "sysmenulist", "sysmenu", "$@4", "forceexit", "silentexit", "debug", YY_NULLPTR }; static const char * yysymbol_name (yysymbol_kind_t yysymbol) { return yytname[yysymbol]; } #endif #define YYPACT_NINF (-47) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) #define YYTABLE_NINF (-1) #define yytable_value_is_error(Yyn) \ 0 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ static const yytype_int8 yypact[] = { -47, 7, -47, -47, -1, 0, 1, 18, 29, 15, 42, 17, 19, 20, 46, 50, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, -47, 49, 53, 54, -47, -47, 6, 55, 56, 57, 58, -47, -47, -47, -47, -47, 61, 61, -47, -47, 62, -47, -47, -47, -47, 61, 61, 35, 38, -47, 61, -19, -47, 39, 35, 66, 27, 38, 67, 43, 72, -3, -19, 70, 74, -47, -47, -47, -47, -47, -47, -47, -47, -47, 3, -8, 75, -47, -47, 48, 43, 76, 61, 52, 59, 77, 78, -47, -47, 61, -47, -47, 61, 6, -47, -47, -47, 81, 82, 61, 61, -47, -47, 83, 61, 61, -47, -47, 61, -47, -47, -47 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. Performed when YYTABLE does not specify something else to do. Zero means the default is an error. */ static const yytype_int8 yydefact[] = { 2, 0, 1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 5, 17, 14, 15, 8, 9, 10, 11, 12, 13, 18, 19, 16, 0, 0, 0, 37, 53, 55, 0, 0, 0, 0, 63, 64, 32, 24, 23, 6, 6, 56, 57, 0, 61, 21, 65, 20, 6, 6, 0, 0, 22, 6, 0, 7, 0, 35, 0, 0, 51, 0, 0, 0, 0, 30, 0, 0, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 0, 52, 54, 0, 59, 0, 6, 0, 0, 0, 0, 31, 33, 6, 48, 49, 6, 55, 60, 62, 25, 0, 0, 6, 6, 34, 50, 0, 6, 6, 26, 29, 6, 28, 27, 58 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -47, -47, -47, -46, -47, -47, -47, -47, -47, -47, -47, 16, -47, -47, -47, 25, -47, -47, 5, 8, -47, -47, 26, -47, -47, -9, -47, 9, -47, -47, -47, -47, -47 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { 0, 1, 16, 56, 17, 18, 19, 20, 21, 22, 71, 72, 23, 54, 63, 64, 24, 45, 83, 84, 85, 66, 67, 25, 46, 49, 89, 90, 26, 59, 27, 28, 29 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule whose number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int8 yytable[] = { 57, 92, 69, 76, 77, 78, 79, 2, 60, 61, 3, 4, 70, 68, 5, 6, 7, 8, 80, 81, 82, 93, 94, 33, 95, 9, 10, 11, 47, 48, 30, 31, 32, 12, 34, 13, 14, 15, 76, 77, 78, 79, 80, 81, 82, 105, 35, 36, 37, 40, 38, 39, 110, 41, 42, 111, 43, 44, 50, 51, 52, 53, 115, 116, 55, 58, 62, 118, 119, 65, 73, 120, 75, 87, 88, 91, 97, 98, 101, 102, 108, 109, 104, 106, 113, 114, 117, 96, 74, 100, 107, 99, 86, 112, 0, 0, 0, 0, 103 }; static const yytype_int8 yycheck[] = { 46, 4, 21, 11, 12, 13, 14, 0, 54, 55, 3, 4, 31, 59, 7, 8, 9, 10, 15, 16, 17, 24, 25, 5, 27, 18, 19, 20, 22, 23, 31, 31, 31, 26, 5, 28, 29, 30, 11, 12, 13, 14, 15, 16, 17, 91, 31, 5, 31, 3, 31, 31, 98, 3, 5, 101, 3, 3, 3, 3, 3, 3, 108, 109, 3, 3, 31, 113, 114, 31, 31, 117, 6, 6, 31, 3, 6, 3, 3, 31, 3, 3, 6, 31, 3, 3, 3, 71, 63, 84, 31, 83, 66, 102, -1, -1, -1, -1, 89 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of state STATE-NUM. */ static const yytype_int8 yystos[] = { 0, 33, 0, 3, 4, 7, 8, 9, 10, 18, 19, 20, 26, 28, 29, 30, 34, 36, 37, 38, 39, 40, 41, 44, 48, 55, 60, 62, 63, 64, 31, 31, 31, 5, 5, 31, 5, 31, 31, 31, 3, 3, 5, 3, 3, 49, 56, 22, 23, 57, 3, 3, 3, 3, 45, 3, 35, 35, 3, 61, 35, 35, 31, 46, 47, 31, 53, 54, 35, 21, 31, 42, 43, 31, 47, 6, 11, 12, 13, 14, 15, 16, 17, 50, 51, 52, 54, 6, 31, 58, 59, 3, 4, 24, 25, 27, 43, 6, 3, 51, 50, 3, 31, 59, 6, 35, 31, 31, 3, 3, 35, 35, 57, 3, 3, 35, 35, 3, 35, 35, 35 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ static const yytype_int8 yyr1[] = { 0, 32, 33, 33, 34, 34, 35, 35, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 37, 38, 39, 40, 41, 42, 42, 42, 42, 42, 43, 43, 45, 44, 46, 47, 47, 49, 48, 50, 50, 50, 50, 51, 51, 51, 52, 52, 52, 52, 53, 54, 54, 56, 55, 57, 57, 57, 58, 59, 59, 61, 60, 62, 63, 64 }; /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */ static const yytype_int8 yyr2[] = { 0, 2, 0, 2, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 4, 3, 3, 3, 4, 5, 5, 4, 1, 2, 0, 7, 4, 1, 2, 0, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 4, 1, 2, 0, 6, 0, 1, 1, 5, 1, 2, 0, 7, 2, 2, 3 }; enum { YYENOMEM = -2 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab #define YYNOMEM goto yyexhaustedlab #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (yylen); \ yystate = *yyssp; \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (0) /* Backward compatibility with an undocumented macro. Use YYerror or YYUNDEF. */ #define YYERRCODE YYUNDEF /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (0) # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Kind, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (0) /*-----------------------------------. | Print this symbol's value on YYO. | `-----------------------------------*/ static void yy_symbol_value_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { FILE *yyoutput = yyo; YY_USE (yyoutput); if (!yyvaluep) return; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /*---------------------------. | Print this symbol on YYO. | `---------------------------*/ static void yy_symbol_print (FILE *yyo, yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep) { YYFPRINTF (yyo, "%s %s (", yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind)); yy_symbol_value_print (yyo, yykind, yyvaluep); YYFPRINTF (yyo, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ static void yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop) { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ static void yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule) { int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]), &yyvsp[(yyi + 1) - (yynrhs)]); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyssp, yyvsp, Rule); \ } while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) ((void) 0) # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, YYSTYPE *yyvaluep) { YY_USE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YY_USE (yykind); YY_IGNORE_MAYBE_UNINITIALIZED_END } /* Lookahead token kind. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ int yyparse (void) { yy_state_fast_t yystate = 0; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus = 0; /* Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* Their size. */ YYPTRDIFF_T yystacksize = YYINITDEPTH; /* The state stack: array, bottom, top. */ yy_state_t yyssa[YYINITDEPTH]; yy_state_t *yyss = yyssa; yy_state_t *yyssp = yyss; /* The semantic value stack: array, bottom, top. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs = yyvsa; YYSTYPE *yyvsp = yyvs; int yyn; /* The return value of yyparse. */ int yyresult; /* Lookahead symbol kind. */ yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; YYDPRINTF ((stderr, "Starting parse\n")); yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. | yynewstate -- push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; /*--------------------------------------------------------------------. | yysetstate -- set current state (the top of the stack) to yystate. | `--------------------------------------------------------------------*/ yysetstate: YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YY_ASSERT (0 <= yystate && yystate < YYNSTATES); YY_IGNORE_USELESS_CAST_BEGIN *yyssp = YY_CAST (yy_state_t, yystate); YY_IGNORE_USELESS_CAST_END YY_STACK_PRINT (yyss, yyssp); if (yyss + yystacksize - 1 <= yyssp) #if !defined yyoverflow && !defined YYSTACK_RELOCATE YYNOMEM; #else { /* Get the current used size of the three stacks, in elements. */ YYPTRDIFF_T yysize = yyssp - yyss + 1; # if defined yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ yy_state_t *yyss1 = yyss; YYSTYPE *yyvs1 = yyvs; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * YYSIZEOF (*yyssp), &yyvs1, yysize * YYSIZEOF (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } # else /* defined YYSTACK_RELOCATE */ /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) YYNOMEM; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yy_state_t *yyss1 = yyss; union yyalloc *yyptr = YY_CAST (union yyalloc *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize)))); if (! yyptr) YYNOMEM; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YY_IGNORE_USELESS_CAST_BEGIN YYDPRINTF ((stderr, "Stack size increased to %ld\n", YY_CAST (long, yystacksize))); YY_IGNORE_USELESS_CAST_END if (yyss + yystacksize - 1 <= yyssp) YYABORT; } #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */ if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token\n")); yychar = yylex (); } if (yychar <= YYEOF) { yychar = YYEOF; yytoken = YYSYMBOL_YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else if (yychar == YYerror) { /* The scanner already issued an error message, process directly to error recovery. But do not keep the error token as lookahead, it is too special and may lead us to an endless loop in error recovery. */ yychar = YYUNDEF; yytoken = YYSYMBOL_YYerror; goto yyerrlab1; } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); yystate = yyn; YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Discard the shifted token. */ yychar = YYEMPTY; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 20: /* trayicon: TRAYICON STRING NEWLINE */ #line 160 "winprefsyacc.y" { SetTrayIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1400 "winprefsyacc.c" break; case 21: /* rootmenu: ROOTMENU STRING NEWLINE */ #line 163 "winprefsyacc.y" { SetRootMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1406 "winprefsyacc.c" break; case 22: /* defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE */ #line 166 "winprefsyacc.y" { SetDefaultSysMenu((yyvsp[-2].sVal), (yyvsp[-1].iVal)); free((yyvsp[-2].sVal)); } #line 1412 "winprefsyacc.c" break; case 23: /* defaulticon: DEFAULTICON STRING NEWLINE */ #line 169 "winprefsyacc.y" { SetDefaultIcon((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1418 "winprefsyacc.c" break; case 24: /* icondirectory: ICONDIRECTORY STRING NEWLINE */ #line 172 "winprefsyacc.y" { SetIconDirectory((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1424 "winprefsyacc.c" break; case 25: /* menuline: SEPARATOR NEWLINE newline_or_nada */ #line 175 "winprefsyacc.y" { AddMenuLine("-", CMD_SEPARATOR, ""); } #line 1430 "winprefsyacc.c" break; case 26: /* menuline: STRING ALWAYSONTOP NEWLINE newline_or_nada */ #line 176 "winprefsyacc.y" { AddMenuLine((yyvsp[-3].sVal), CMD_ALWAYSONTOP, ""); free((yyvsp[-3].sVal)); } #line 1436 "winprefsyacc.c" break; case 27: /* menuline: STRING EXEC STRING NEWLINE newline_or_nada */ #line 177 "winprefsyacc.y" { AddMenuLine((yyvsp[-4].sVal), CMD_EXEC, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } #line 1442 "winprefsyacc.c" break; case 28: /* menuline: STRING MENU STRING NEWLINE newline_or_nada */ #line 178 "winprefsyacc.y" { AddMenuLine((yyvsp[-4].sVal), CMD_MENU, (yyvsp[-2].sVal)); free((yyvsp[-4].sVal)); free((yyvsp[-2].sVal)); } #line 1448 "winprefsyacc.c" break; case 29: /* menuline: STRING RELOAD NEWLINE newline_or_nada */ #line 179 "winprefsyacc.y" { AddMenuLine((yyvsp[-3].sVal), CMD_RELOAD, ""); free((yyvsp[-3].sVal)); } #line 1454 "winprefsyacc.c" break; case 32: /* $@1: %empty */ #line 186 "winprefsyacc.y" { OpenMenu((yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1460 "winprefsyacc.c" break; case 33: /* menu: MENU STRING LB $@1 newline_or_nada menulist RB */ #line 186 "winprefsyacc.y" {CloseMenu();} #line 1466 "winprefsyacc.c" break; case 34: /* iconline: STRING STRING NEWLINE newline_or_nada */ #line 189 "winprefsyacc.y" { AddIconLine((yyvsp[-3].sVal), (yyvsp[-2].sVal)); free((yyvsp[-3].sVal)); free((yyvsp[-2].sVal)); } #line 1472 "winprefsyacc.c" break; case 37: /* $@2: %empty */ #line 196 "winprefsyacc.y" {OpenIcons();} #line 1478 "winprefsyacc.c" break; case 38: /* icons: ICONS LB $@2 newline_or_nada iconlist RB */ #line 196 "winprefsyacc.y" {CloseIcons();} #line 1484 "winprefsyacc.c" break; case 39: /* group1: TOPMOST */ #line 199 "winprefsyacc.y" { (yyval.uVal)=STYLE_TOPMOST; } #line 1490 "winprefsyacc.c" break; case 40: /* group1: MAXIMIZE */ #line 200 "winprefsyacc.y" { (yyval.uVal)=STYLE_MAXIMIZE; } #line 1496 "winprefsyacc.c" break; case 41: /* group1: MINIMIZE */ #line 201 "winprefsyacc.y" { (yyval.uVal)=STYLE_MINIMIZE; } #line 1502 "winprefsyacc.c" break; case 42: /* group1: BOTTOM */ #line 202 "winprefsyacc.y" { (yyval.uVal)=STYLE_BOTTOM; } #line 1508 "winprefsyacc.c" break; case 43: /* group2: NOTITLE */ #line 205 "winprefsyacc.y" { (yyval.uVal)=STYLE_NOTITLE; } #line 1514 "winprefsyacc.c" break; case 44: /* group2: OUTLINE */ #line 206 "winprefsyacc.y" { (yyval.uVal)=STYLE_OUTLINE; } #line 1520 "winprefsyacc.c" break; case 45: /* group2: NOFRAME */ #line 207 "winprefsyacc.y" { (yyval.uVal)=STYLE_NOFRAME; } #line 1526 "winprefsyacc.c" break; case 46: /* stylecombo: group1 */ #line 210 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[0].uVal); } #line 1532 "winprefsyacc.c" break; case 47: /* stylecombo: group2 */ #line 211 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[0].uVal); } #line 1538 "winprefsyacc.c" break; case 48: /* stylecombo: group1 group2 */ #line 212 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } #line 1544 "winprefsyacc.c" break; case 49: /* stylecombo: group2 group1 */ #line 213 "winprefsyacc.y" { (yyval.uVal)=(yyvsp[-1].uVal)|(yyvsp[0].uVal); } #line 1550 "winprefsyacc.c" break; case 50: /* styleline: STRING stylecombo NEWLINE newline_or_nada */ #line 216 "winprefsyacc.y" { AddStyleLine((yyvsp[-3].sVal), (yyvsp[-2].uVal)); free((yyvsp[-3].sVal)); } #line 1556 "winprefsyacc.c" break; case 53: /* $@3: %empty */ #line 223 "winprefsyacc.y" {OpenStyles();} #line 1562 "winprefsyacc.c" break; case 54: /* styles: STYLES LB $@3 newline_or_nada stylelist RB */ #line 223 "winprefsyacc.y" {CloseStyles();} #line 1568 "winprefsyacc.c" break; case 55: /* atspot: %empty */ #line 226 "winprefsyacc.y" { (yyval.iVal)=AT_END; } #line 1574 "winprefsyacc.c" break; case 56: /* atspot: ATSTART */ #line 227 "winprefsyacc.y" { (yyval.iVal)=AT_START; } #line 1580 "winprefsyacc.c" break; case 57: /* atspot: ATEND */ #line 228 "winprefsyacc.y" { (yyval.iVal)=AT_END; } #line 1586 "winprefsyacc.c" break; case 58: /* sysmenuline: STRING STRING atspot NEWLINE newline_or_nada */ #line 231 "winprefsyacc.y" { AddSysMenuLine((yyvsp[-4].sVal), (yyvsp[-3].sVal), (yyvsp[-2].iVal)); free((yyvsp[-4].sVal)); free((yyvsp[-3].sVal)); } #line 1592 "winprefsyacc.c" break; case 61: /* $@4: %empty */ #line 238 "winprefsyacc.y" {OpenSysMenu();} #line 1598 "winprefsyacc.c" break; case 62: /* sysmenu: SYSMENU LB NEWLINE $@4 newline_or_nada sysmenulist RB */ #line 238 "winprefsyacc.y" {CloseSysMenu();} #line 1604 "winprefsyacc.c" break; case 63: /* forceexit: FORCEEXIT NEWLINE */ #line 241 "winprefsyacc.y" { pref.fForceExit = TRUE; } #line 1610 "winprefsyacc.c" break; case 64: /* silentexit: SILENTEXIT NEWLINE */ #line 244 "winprefsyacc.y" { pref.fSilentExit = TRUE; } #line 1616 "winprefsyacc.c" break; case 65: /* debug: "DEBUG" STRING NEWLINE */ #line 247 "winprefsyacc.y" { ErrorF("LoadPreferences: %s\n", (yyvsp[-1].sVal)); free((yyvsp[-1].sVal)); } #line 1622 "winprefsyacc.c" break; #line 1626 "winprefsyacc.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; *++yyvsp = yyval; /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ { const int yylhs = yyr1[yyn] - YYNTOKENS; const int yyi = yypgoto[yylhs] + *yyssp; yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp ? yytable[yyi] : yydefgoto[yylhs]); } goto yynewstate; /*--------------------------------------. | yyerrlab -- here on detecting error. | `--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; yyerror (YY_("syntax error")); } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (0) YYERROR; ++yynerrs; /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ /* Pop stack until we find a state that shifts the error token. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYSYMBOL_YYerror; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", YY_ACCESSING_SYMBOL (yystate), yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturnlab; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturnlab; /*-----------------------------------------------------------. | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. | `-----------------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; goto yyreturnlab; /*----------------------------------------------------------. | yyreturnlab -- parsing is finished, clean up and return. | `----------------------------------------------------------*/ yyreturnlab: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", YY_ACCESSING_SYMBOL (+*yyssp), yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif return yyresult; } #line 251 "winprefsyacc.y" /* * Errors in parsing abort and print log messages */ static int yyerror (const char *s) { ErrorF("LoadPreferences: %s line %d\n", s, yylineno); return 1; } /* Miscellaneous functions to store TOKENs into the structure */ static void SetIconDirectory (char *path) { strncpy (pref.iconDirectory, path, PATH_MAX); pref.iconDirectory[PATH_MAX] = 0; } static void SetDefaultIcon (char *fname) { strncpy (pref.defaultIconName, fname, NAME_MAX); pref.defaultIconName[NAME_MAX] = 0; } static void SetTrayIcon (char *fname) { strncpy (pref.trayIconName, fname, NAME_MAX); pref.trayIconName[NAME_MAX] = 0; } static void SetRootMenu (char *menuname) { strncpy (pref.rootMenuName, menuname, MENU_MAX); pref.rootMenuName[MENU_MAX] = 0; } static void SetDefaultSysMenu (char *menuname, int pos) { strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); pref.defaultSysMenuName[MENU_MAX] = 0; pref.defaultSysMenuPos = pos; } static void OpenMenu (char *menuname) { if (menu.menuItem) free(menu.menuItem); menu.menuItem = NULL; strncpy(menu.menuName, menuname, MENU_MAX); menu.menuName[MENU_MAX] = 0; menu.menuItems = 0; } static void AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param) { if (menu.menuItem==NULL) menu.menuItem = malloc(sizeof(MENUITEM)); else menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX); menu.menuItem[menu.menuItems].text[MENU_MAX] = 0; menu.menuItem[menu.menuItems].cmd = cmd; strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX); menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0; menu.menuItem[menu.menuItems].commandID = 0; menu.menuItems++; } static void CloseMenu (void) { if (menu.menuItem==NULL || menu.menuItems==0) { ErrorF("LoadPreferences: Empty menu detected\n"); return; } if (pref.menuItems) pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); else pref.menu = malloc (sizeof(MENUPARSED)); memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); pref.menuItems++; memset (&menu, 0, sizeof(MENUPARSED)); } static void OpenIcons (void) { if (pref.icon != NULL) { ErrorF("LoadPreferences: Redefining icon mappings\n"); free(pref.icon); pref.icon = NULL; } pref.iconItems = 0; } static void AddIconLine (char *matchstr, char *iconfile) { if (pref.icon==NULL) pref.icon = malloc(sizeof(ICONITEM)); else pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX); pref.icon[pref.iconItems].match[MENU_MAX] = 0; strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1); pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0; pref.icon[pref.iconItems].hicon = 0; pref.iconItems++; } static void CloseIcons (void) { } static void OpenStyles (void) { if (pref.style != NULL) { ErrorF("LoadPreferences: Redefining window style\n"); free(pref.style); pref.style = NULL; } pref.styleItems = 0; } static void AddStyleLine (char *matchstr, unsigned long style) { if (pref.style==NULL) pref.style = malloc(sizeof(STYLEITEM)); else pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); pref.style[pref.styleItems].match[MENU_MAX] = 0; pref.style[pref.styleItems].type = style; pref.styleItems++; } static void CloseStyles (void) { } static void OpenSysMenu (void) { if (pref.sysMenu != NULL) { ErrorF("LoadPreferences: Redefining system menu\n"); free(pref.sysMenu); pref.sysMenu = NULL; } pref.sysMenuItems = 0; } static void AddSysMenuLine (char *matchstr, char *menuname, int pos) { if (pref.sysMenu==NULL) pref.sysMenu = malloc(sizeof(SYSMENUITEM)); else pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX); pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0; strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX); pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0; pref.sysMenu[pref.sysMenuItems].menuPos = pos; pref.sysMenuItems++; } static void CloseSysMenu (void) { } xorg-server-21.1.16/hw/xwin/winprefsyacc.h0000644000175000017500000001123514757411135014111 /* A Bison parser, made by GNU Bison 3.8.2. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual, especially those whose name start with YY_ or yy_. They are private implementation details that can be changed or removed. */ #ifndef YY_YY_WINPREFSYACC_H_INCLUDED # define YY_YY_WINPREFSYACC_H_INCLUDED /* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif #if YYDEBUG extern int yydebug; #endif /* Token kinds. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE enum yytokentype { YYEMPTY = -2, YYEOF = 0, /* "end of file" */ YYerror = 256, /* error */ YYUNDEF = 257, /* "invalid token" */ NEWLINE = 258, /* NEWLINE */ MENU = 259, /* MENU */ LB = 260, /* LB */ RB = 261, /* RB */ ICONDIRECTORY = 262, /* ICONDIRECTORY */ DEFAULTICON = 263, /* DEFAULTICON */ ICONS = 264, /* ICONS */ STYLES = 265, /* STYLES */ TOPMOST = 266, /* TOPMOST */ MAXIMIZE = 267, /* MAXIMIZE */ MINIMIZE = 268, /* MINIMIZE */ BOTTOM = 269, /* BOTTOM */ NOTITLE = 270, /* NOTITLE */ OUTLINE = 271, /* OUTLINE */ NOFRAME = 272, /* NOFRAME */ DEFAULTSYSMENU = 273, /* DEFAULTSYSMENU */ SYSMENU = 274, /* SYSMENU */ ROOTMENU = 275, /* ROOTMENU */ SEPARATOR = 276, /* SEPARATOR */ ATSTART = 277, /* ATSTART */ ATEND = 278, /* ATEND */ EXEC = 279, /* EXEC */ ALWAYSONTOP = 280, /* ALWAYSONTOP */ DEBUGOUTPUT = 281, /* "DEBUG" */ RELOAD = 282, /* RELOAD */ TRAYICON = 283, /* TRAYICON */ FORCEEXIT = 284, /* FORCEEXIT */ SILENTEXIT = 285, /* SILENTEXIT */ STRING = 286 /* STRING */ }; typedef enum yytokentype yytoken_kind_t; #endif /* Token kinds. */ #define YYEMPTY -2 #define YYEOF 0 #define YYerror 256 #define YYUNDEF 257 #define NEWLINE 258 #define MENU 259 #define LB 260 #define RB 261 #define ICONDIRECTORY 262 #define DEFAULTICON 263 #define ICONS 264 #define STYLES 265 #define TOPMOST 266 #define MAXIMIZE 267 #define MINIMIZE 268 #define BOTTOM 269 #define NOTITLE 270 #define OUTLINE 271 #define NOFRAME 272 #define DEFAULTSYSMENU 273 #define SYSMENU 274 #define ROOTMENU 275 #define SEPARATOR 276 #define ATSTART 277 #define ATEND 278 #define EXEC 279 #define ALWAYSONTOP 280 #define DEBUGOUTPUT 281 #define RELOAD 282 #define TRAYICON 283 #define FORCEEXIT 284 #define SILENTEXIT 285 #define STRING 286 /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED union YYSTYPE { #line 90 "winprefsyacc.y" char *sVal; unsigned long uVal; int iVal; #line 135 "winprefsyacc.h" }; typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; int yyparse (void); #endif /* !YY_YY_WINPREFSYACC_H_INCLUDED */ xorg-server-21.1.16/hw/xwin/InitInput.c0000644000175000017500000000703114757411105013326 /* Copyright 1993, 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "dixstruct.h" #include "inputstr.h" /* * Local function prototypes */ int winProcEstablishConnection(ClientPtr /* client */ ); /* * Local global declarations */ DeviceIntPtr g_pwinPointer; DeviceIntPtr g_pwinKeyboard; /* Called from dix/dispatch.c */ /* * Run through the Windows message queue(s) one more time. * Tell mi to dequeue the events that we have sent it. */ void ProcessInputEvents(void) { #if 0 ErrorF("ProcessInputEvents\n"); #endif mieqProcessInputEvents(); #if 0 ErrorF("ProcessInputEvents - returning\n"); #endif } void DDXRingBell(int volume, int pitch, int duration) { /* winKeybdBell is used instead */ return; } #ifdef HAS_DEVWINDOWS static void xwinDevWindowsHandlerNotify(int fd, int ready, void *data) { /* This should process Windows messages, but instead all of that is delayed * until the wakeup handler is called. */ ; } #endif /* See Porting Layer Definition - p. 17 */ void InitInput(int argc, char *argv[]) { #if CYGDEBUG winDebug("InitInput\n"); #endif /* * Wrap some functions at every generation of the server. */ if (InitialVector[2] != winProcEstablishConnection) { winProcEstablishConnectionOrig = InitialVector[2]; InitialVector[2] = winProcEstablishConnection; } if (AllocDevicePair(serverClient, "Windows", &g_pwinPointer, &g_pwinKeyboard, winMouseProc, winKeybdProc, FALSE) != Success) FatalError("InitInput - Failed to allocate slave devices.\n"); mieqInit(); /* Initialize the mode key states */ winInitializeModeKeyStates(); #ifdef HAS_DEVWINDOWS /* Only open the windows message queue device once */ if (g_fdMessageQueue == WIN_FD_INVALID) { /* Open a file descriptor for the Windows message queue */ g_fdMessageQueue = open(WIN_MSG_QUEUE_FNAME, O_RDONLY); if (g_fdMessageQueue == -1) { FatalError("InitInput - Failed opening %s\n", WIN_MSG_QUEUE_FNAME); } /* Add the message queue as a device to wait for in WaitForSomething */ SetNotifyFd(g_fdMessageQueue, xwinDevWindowsHandlerNotify, X_NOTIFY_READ, NULL); } #endif #if CYGDEBUG winDebug("InitInput - returning\n"); #endif } void CloseInput(void) { mieqFini(); } xorg-server-21.1.16/hw/xwin/InitOutput.c0000644000175000017500000007511614757411105013540 /* Copyright 1993, 1998 The Open Group Copyright (C) Colin Harrison 2005-2008 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" #include "winconfig.h" #include "winprefs.h" #ifdef DPMSExtension #include "dpmsproc.h" #endif #ifdef __CYGWIN__ #include #endif #if defined(WIN32) #include "xkbsrv.h" #endif #ifdef RELOCATE_PROJECTROOT #pragma push_macro("Status") #undef Status #define Status wStatus #include #pragma pop_macro("Status") typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath); #endif #include "winmonitors.h" #include "nonsdk_extinit.h" #include "pseudoramiX/pseudoramiX.h" #include "glx_extinit.h" #ifdef XWIN_GLX_WINDOWS #include "glx/glwindows.h" #include "dri/windowsdri.h" #endif #include "winauth.h" /* * References to external symbols */ /* * Function prototypes */ void winLogCommandLine(int argc, char *argv[]); void winLogVersionInfo(void); Bool winValidateArgs(void); #ifdef RELOCATE_PROJECTROOT const char *winGetBaseDir(void); #endif /* * For the depth 24 pixmap we default to 32 bits per pixel, but * we change this pixmap format later if we detect that the display * is going to be running at 24 bits per pixel. * * FIXME: On second thought, don't DIBs only support 32 bits per pixel? * DIBs are the underlying bitmap used for DirectDraw surfaces, so it * seems that all pixmap formats with depth 24 would be 32 bits per pixel. * Confirm whether depth 24 DIBs can have 24 bits per pixel, then remove/keep * the bits per pixel adjustment and update this comment to reflect the * situation. Harold Hunt - 2002/07/02 */ static PixmapFormatRec g_PixmapFormats[] = { {1, 1, BITMAP_SCANLINE_PAD}, {4, 8, BITMAP_SCANLINE_PAD}, {8, 8, BITMAP_SCANLINE_PAD}, {15, 16, BITMAP_SCANLINE_PAD}, {16, 16, BITMAP_SCANLINE_PAD}, {24, 32, BITMAP_SCANLINE_PAD}, {32, 32, BITMAP_SCANLINE_PAD} }; static Bool noDriExtension; static const ExtensionModule xwinExtensions[] = { #ifdef GLXEXT #ifdef XWIN_WINDOWS_DRI { WindowsDRIExtensionInit, "Windows-DRI", &noDriExtension }, #endif #endif }; /* * XwinExtensionInit * Initialises Xwin-specific extensions. */ static void XwinExtensionInit(void) { #ifdef XWIN_GLX_WINDOWS if (g_fNativeGl) { /* install the native GL provider */ glxWinPushNativeProvider(); } #endif LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE); } #if defined(DDXBEFORERESET) /* * Called right before KillAllClients when the server is going to reset, * allows us to shutdown our separate threads cleanly. */ void ddxBeforeReset(void) { winDebug("ddxBeforeReset - Hello\n"); winClipboardShutdown(); } #endif #if INPUTTHREAD /** This function is called in Xserver/os/inputthread.c when starting the input thread. */ void ddxInputThreadInit(void) { } #endif int main(int argc, char *argv[], char *envp[]) { int iReturn; /* Create & acquire the termination mutex */ iReturn = pthread_mutex_init(&g_pmTerminating, NULL); if (iReturn != 0) { ErrorF("ddxMain - pthread_mutex_init () failed: %d\n", iReturn); } iReturn = pthread_mutex_lock(&g_pmTerminating); if (iReturn != 0) { ErrorF("ddxMain - pthread_mutex_lock () failed: %d\n", iReturn); } return dix_main(argc, argv, envp); } /* See Porting Layer Definition - p. 57 */ void ddxGiveUp(enum ExitCode error) { int i; #if CYGDEBUG winDebug("ddxGiveUp\n"); #endif /* Perform per-screen deinitialization */ for (i = 0; i < g_iNumScreens; ++i) { /* Delete the tray icon */ if (!g_ScreenInfo[i].fNoTrayIcon && g_ScreenInfo[i].pScreen) winDeleteNotifyIcon(winGetScreenPriv(g_ScreenInfo[i].pScreen)); } /* Unload libraries for taskbar grouping */ winPropertyStoreDestroy(); /* Notify the worker threads we're exiting */ winDeinitMultiWindowWM(); #ifdef HAS_DEVWINDOWS /* Close our handle to our message queue */ if (g_fdMessageQueue != WIN_FD_INVALID) { /* Close /dev/windows */ close(g_fdMessageQueue); /* Set the file handle to invalid */ g_fdMessageQueue = WIN_FD_INVALID; } #endif if (!g_fLogInited) { g_pszLogFile = LogInit(g_pszLogFile, ".old"); g_fLogInited = TRUE; } LogClose(error); /* * At this point we aren't creating any new screens, so * we are guaranteed to not need the DirectDraw functions. */ winReleaseDDProcAddresses(); /* Free concatenated command line */ free(g_pszCommandLine); g_pszCommandLine = NULL; /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL(); /* Tell Windows that we want to end the app */ PostQuitMessage(0); { int iReturn = pthread_mutex_unlock(&g_pmTerminating); winDebug("ddxGiveUp - Releasing termination mutex\n"); if (iReturn != 0) { ErrorF("winMsgWindowProc - pthread_mutex_unlock () failed: %d\n", iReturn); } } winDebug("ddxGiveUp - End\n"); } #ifdef __CYGWIN__ /* hasmntopt is currently not implemented for cygwin */ static const char * winCheckMntOpt(const struct mntent *mnt, const char *opt) { const char *s; size_t len; if (mnt == NULL) return NULL; if (opt == NULL) return NULL; if (mnt->mnt_opts == NULL) return NULL; len = strlen(opt); s = strstr(mnt->mnt_opts, opt); if (s == NULL) return NULL; if ((s == mnt->mnt_opts || *(s - 1) == ',') && (s[len] == 0 || s[len] == ',')) return (char *) opt; return NULL; } static void winCheckMount(void) { FILE *mnt; struct mntent *ent; enum { none = 0, sys_root, user_root, sys_tmp, user_tmp } level = none, curlevel; BOOL binary = TRUE; mnt = setmntent("/etc/mtab", "r"); if (mnt == NULL) { ErrorF("setmntent failed"); return; } while ((ent = getmntent(mnt)) != NULL) { BOOL sys = (winCheckMntOpt(ent, "user") != NULL); BOOL root = (strcmp(ent->mnt_dir, "/") == 0); BOOL tmp = (strcmp(ent->mnt_dir, "/tmp") == 0); if (sys) { if (root) curlevel = sys_root; else if (tmp) curlevel = sys_tmp; else continue; } else { if (root) curlevel = user_root; else if (tmp) curlevel = user_tmp; else continue; } if (curlevel <= level) continue; level = curlevel; if ((winCheckMntOpt(ent, "binary") == NULL) && (winCheckMntOpt(ent, "binmode") == NULL)) binary = FALSE; else binary = TRUE; } if (endmntent(mnt) != 1) { ErrorF("endmntent failed"); return; } if (!binary) winMsg(X_WARNING, "/tmp mounted in textmode\n"); } #else static void winCheckMount(void) { } #endif #ifdef RELOCATE_PROJECTROOT const char * winGetBaseDir(void) { static BOOL inited = FALSE; static char buffer[MAX_PATH]; if (!inited) { char *fendptr; HMODULE module = GetModuleHandle(NULL); DWORD size = GetModuleFileName(module, buffer, sizeof(buffer)); if (sizeof(buffer) > 0) buffer[sizeof(buffer) - 1] = 0; fendptr = buffer + size; while (fendptr > buffer) { if (*fendptr == '\\' || *fendptr == '/') { *fendptr = 0; break; } fendptr--; } inited = TRUE; } return buffer; } #endif static void winFixupPaths(void) { BOOL changed_fontpath = FALSE; MessageType font_from = X_DEFAULT; #ifdef RELOCATE_PROJECTROOT const char *basedir = winGetBaseDir(); size_t basedirlen = strlen(basedir); #endif #ifdef READ_FONTDIRS { /* Open fontpath configuration file */ FILE *fontdirs = fopen(ETCX11DIR "/font-dirs", "rt"); if (fontdirs != NULL) { char buffer[256]; int needs_sep = TRUE; int comment_block = FALSE; /* get default fontpath */ char *fontpath = strdup(defaultFontPath); size_t size = strlen(fontpath); /* read all lines */ while (!feof(fontdirs)) { size_t blen; char *hashchar; char *str; int has_eol = FALSE; /* read one line */ str = fgets(buffer, sizeof(buffer), fontdirs); if (str == NULL) /* stop on error or eof */ break; if (strchr(str, '\n') != NULL) has_eol = TRUE; /* check if block is continued comment */ if (comment_block) { /* ignore all input */ *str = 0; blen = 0; if (has_eol) /* check if line ended in this block */ comment_block = FALSE; } else { /* find comment character. ignore all trailing input */ hashchar = strchr(str, '#'); if (hashchar != NULL) { *hashchar = 0; if (!has_eol) /* mark next block as continued comment */ comment_block = TRUE; } } /* strip whitespaces from beginning */ while (*str == ' ' || *str == '\t') str++; /* get size, strip whitespaces from end */ blen = strlen(str); while (blen > 0 && (str[blen - 1] == ' ' || str[blen - 1] == '\t' || str[blen - 1] == '\n')) { str[--blen] = 0; } /* still something left to add? */ if (blen > 0) { size_t newsize = size + blen; /* reserve one character more for ',' */ if (needs_sep) newsize++; /* allocate memory */ if (fontpath == NULL) fontpath = malloc(newsize + 1); else fontpath = realloc(fontpath, newsize + 1); /* add separator */ if (needs_sep) { fontpath[size] = ','; size++; needs_sep = FALSE; } /* mark next line as new entry */ if (has_eol) needs_sep = TRUE; /* add block */ strncpy(fontpath + size, str, blen); fontpath[newsize] = 0; size = newsize; } } /* cleanup */ fclose(fontdirs); defaultFontPath = strdup(fontpath); free(fontpath); changed_fontpath = TRUE; font_from = X_CONFIG; } } #endif /* READ_FONTDIRS */ #ifdef RELOCATE_PROJECTROOT { const char *libx11dir = PROJECTROOT "/lib/X11"; size_t libx11dir_len = strlen(libx11dir); char *newfp = NULL; size_t newfp_len = 0; const char *endptr, *ptr, *oldptr = defaultFontPath; endptr = oldptr + strlen(oldptr); ptr = strchr(oldptr, ','); if (ptr == NULL) ptr = endptr; while (ptr != NULL) { size_t oldfp_len = (ptr - oldptr); size_t newsize = oldfp_len; char *newpath = malloc(newsize + 1); strncpy(newpath, oldptr, newsize); newpath[newsize] = 0; if (strncmp(libx11dir, newpath, libx11dir_len) == 0) { char *compose; newsize = newsize - libx11dir_len + basedirlen; compose = malloc(newsize + 1); strcpy(compose, basedir); strncat(compose, newpath + libx11dir_len, newsize - basedirlen); compose[newsize] = 0; free(newpath); newpath = compose; } oldfp_len = newfp_len; if (oldfp_len > 0) newfp_len++; /* space for separator */ newfp_len += newsize; if (newfp == NULL) newfp = malloc(newfp_len + 1); else newfp = realloc(newfp, newfp_len + 1); if (oldfp_len > 0) { strcpy(newfp + oldfp_len, ","); oldfp_len++; } strcpy(newfp + oldfp_len, newpath); free(newpath); if (*ptr == 0) { oldptr = ptr; ptr = NULL; } else { oldptr = ptr + 1; ptr = strchr(oldptr, ','); if (ptr == NULL) ptr = endptr; } } defaultFontPath = strdup(newfp); free(newfp); changed_fontpath = TRUE; } #endif /* RELOCATE_PROJECTROOT */ if (changed_fontpath) winMsg(font_from, "FontPath set to \"%s\"\n", defaultFontPath); #ifdef RELOCATE_PROJECTROOT if (getenv("XKEYSYMDB") == NULL) { char buffer[MAX_PATH]; snprintf(buffer, sizeof(buffer), "XKEYSYMDB=%s\\XKeysymDB", basedir); buffer[sizeof(buffer) - 1] = 0; putenv(buffer); } if (getenv("XERRORDB") == NULL) { char buffer[MAX_PATH]; snprintf(buffer, sizeof(buffer), "XERRORDB=%s\\XErrorDB", basedir); buffer[sizeof(buffer) - 1] = 0; putenv(buffer); } if (getenv("XLOCALEDIR") == NULL) { char buffer[MAX_PATH]; snprintf(buffer, sizeof(buffer), "XLOCALEDIR=%s\\locale", basedir); buffer[sizeof(buffer) - 1] = 0; putenv(buffer); } if (getenv("HOME") == NULL) { char buffer[MAX_PATH + 5]; strncpy(buffer, "HOME=", 5); /* query appdata directory */ if (SHGetFolderPathA (NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, buffer + 5) == 0) { putenv(buffer); } else { winMsg(X_ERROR, "Can not determine HOME directory\n"); } } if (!g_fLogFileChanged) { static char buffer[MAX_PATH]; DWORD size = GetTempPath(sizeof(buffer), buffer); if (size && size < sizeof(buffer)) { snprintf(buffer + size, sizeof(buffer) - size, "XWin.%s.log", display); buffer[sizeof(buffer) - 1] = 0; g_pszLogFile = buffer; winMsg(X_DEFAULT, "Logfile set to \"%s\"\n", g_pszLogFile); } } { static char xkbbasedir[MAX_PATH]; snprintf(xkbbasedir, sizeof(xkbbasedir), "%s\\xkb", basedir); if (sizeof(xkbbasedir) > 0) xkbbasedir[sizeof(xkbbasedir) - 1] = 0; XkbBaseDirectory = xkbbasedir; XkbBinDirectory = basedir; } #endif /* RELOCATE_PROJECTROOT */ } void OsVendorInit(void) { /* Re-initialize global variables on server reset */ winInitializeGlobals(); winFixupPaths(); #ifdef DDXOSVERRORF if (!OsVendorVErrorFProc) OsVendorVErrorFProc = OsVendorVErrorF; #endif if (!g_fLogInited) { /* keep this order. If LogInit fails it calls Abort which then calls * ddxGiveUp where LogInit is called again and creates an infinite * recursion. If we set g_fLogInited to TRUE before the init we * avoid the second call */ g_fLogInited = TRUE; g_pszLogFile = LogInit(g_pszLogFile, ".old"); } LogSetParameter(XLOG_FLUSH, 1); LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose); LogSetParameter(XLOG_FILE_VERBOSITY, g_iLogVerbose); /* Log the version information */ if (serverGeneration == 1) winLogVersionInfo(); winCheckMount(); /* Add a default screen if no screens were specified */ if (g_iNumScreens == 0) { winDebug("OsVendorInit - Creating default screen 0\n"); /* * We need to initialize the default screen 0 if no -screen * arguments were processed. * * Add a screen 0 using the defaults set by winInitializeDefaultScreens() * and any additional default screen parameters given */ winInitializeScreens(1); /* We have to flag this as an explicit screen, even though it isn't */ g_ScreenInfo[0].fExplicitScreen = TRUE; } /* Work out what the default emulate3buttons setting should be, and apply it if nothing was explicitly specified */ { int mouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); int j; for (j = 0; j < g_iNumScreens; j++) { if (g_ScreenInfo[j].iE3BTimeout == WIN_E3B_DEFAULT) { if (mouseButtons < 3) { static Bool reportOnce = TRUE; g_ScreenInfo[j].iE3BTimeout = WIN_DEFAULT_E3B_TIME; if (reportOnce) { reportOnce = FALSE; winMsg(X_PROBED, "Windows reports only %d mouse buttons, defaulting to -emulate3buttons\n", mouseButtons); } } else { g_ScreenInfo[j].iE3BTimeout = WIN_E3B_OFF; } } } } /* Work out what the default resize setting should be, and apply it if it was not explicitly specified */ { int j; for (j = 0; j < g_iNumScreens; j++) { if (g_ScreenInfo[j].iResizeMode == resizeDefault) { if (g_ScreenInfo[j].fFullScreen) g_ScreenInfo[j].iResizeMode = resizeNotAllowed; else g_ScreenInfo[j].iResizeMode = resizeWithRandr; } } } } static void winUseMsg(void) { ErrorF("\n"); ErrorF("\n"); ErrorF(EXECUTABLE_NAME " Device Dependent Usage:\n"); ErrorF("\n"); ErrorF("-[no]clipboard\n" "\tEnable [disable] the clipboard integration. Default is enabled.\n"); ErrorF("-clipupdates num_boxes\n" "\tUse a clipping region to constrain shadow update blits to\n" "\tthe updated region when num_boxes, or more, are in the\n" "\tupdated region.\n"); ErrorF("-[no]compositealpha\n" "\tX windows with per-pixel alpha are composited into the Windows desktop.\n"); ErrorF("-[no]compositewm\n" "\tUse the Composite extension to keep a bitmap image of each top-level\n" "\tX window, so window contents which are occluded show correctly in\n" "\ttask bar and task switcher previews.\n"); #ifdef XWIN_XF86CONFIG ErrorF("-config\n" "\tSpecify a configuration file.\n"); ErrorF("-configdir\n" "\tSpecify a configuration directory.\n"); #endif ErrorF("-depth bits_per_pixel\n" "\tSpecify an optional bitdepth to use in fullscreen mode\n" "\twith a DirectDraw engine.\n"); ErrorF("-[no]emulate3buttons [timeout]\n" "\tEmulate 3 button mouse with an optional timeout in\n" "\tmilliseconds.\n"); #ifdef XWIN_EMULATEPSEUDO ErrorF("-emulatepseudo\n" "\tCreate a depth 8 PseudoColor visual when running in\n" "\tdepths 15, 16, 24, or 32, collectively known as TrueColor\n" "\tdepths. The PseudoColor visual does not have correct colors,\n" "\tand it may crash, but it at least allows you to run your\n" "\tapplication in TrueColor modes.\n"); #endif ErrorF("-engine engine_type_id\n" "\tOverride the server's automatically selected engine type:\n" "\t\t1 - Shadow GDI\n" "\t\t4 - Shadow DirectDraw4 Non-Locking\n" ); ErrorF("-fullscreen\n" "\tRun the server in fullscreen mode.\n"); ErrorF("-[no]hostintitle\n" "\tIn multiwindow mode, add remote host names to window titles.\n"); ErrorF("-icon icon_specifier\n" "\tSet screen window icon in windowed mode.\n"); ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n"); #ifdef XWIN_XF86CONFIG ErrorF("-keyboard\n" "\tSpecify a keyboard device from the configuration file.\n"); #endif ErrorF("-[no]keyhook\n" "\tGrab special Windows keypresses like Alt-Tab or the Menu " "key.\n"); ErrorF("-lesspointer\n" "\tHide the windows mouse pointer when it is over any\n" "\t" EXECUTABLE_NAME " window. This prevents ghost cursors appearing when\n" "\tthe Windows cursor is drawn on top of the X cursor\n"); ErrorF("-logfile filename\n" "\tWrite log messages to .\n"); ErrorF("-logverbose verbosity\n" "\tSet the verbosity of log messages. [NOTE: Only a few messages\n" "\trespect the settings yet]\n" "\t\t0 - only print fatal error.\n" "\t\t1 - print additional configuration information.\n" "\t\t2 - print additional runtime information [default].\n" "\t\t3 - print debugging and tracing information.\n"); ErrorF("-[no]multimonitors or -[no]multiplemonitors\n" "\tUse the entire virtual screen if multiple\n" "\tmonitors are present.\n"); ErrorF("-multiwindow\n" "\tRun the server in multi-window mode.\n"); ErrorF("-nodecoration\n" "\tDo not draw a window border, title bar, etc. Windowed\n" "\tmode only.\n"); ErrorF("-[no]primary\n" "\tWhen clipboard integration is enabled, map the X11 PRIMARY selection\n" "\tto the Windows clipboard. Default is enabled.\n"); ErrorF("-refresh rate_in_Hz\n" "\tSpecify an optional refresh rate to use in fullscreen mode\n" "\twith a DirectDraw engine.\n"); ErrorF("-resize=none|scrollbars|randr\n" "\tIn windowed mode, [don't] allow resizing of the window. 'scrollbars'\n" "\tmode gives the window scrollbars as needed, 'randr' mode uses the RANR\n" "\textension to resize the X screen. 'randr' is the default.\n"); ErrorF("-rootless\n" "\tRun the server in rootless mode.\n"); ErrorF("-screen scr_num [width height [x y] | [[WxH[+X+Y]][@m]] ]\n" "\tEnable screen scr_num and optionally specify a width and\n" "\theight and initial position for that screen. Additionally\n" "\ta monitor number can be specified to start the server on,\n" "\tat which point, all coordinates become relative to that\n" "\tmonitor. Examples:\n" "\t -screen 0 800x600+100+100@2 ; 2nd monitor offset 100,100 size 800x600\n" "\t -screen 0 1024x768@3 ; 3rd monitor size 1024x768\n" "\t -screen 0 @1 ; on 1st monitor using its full resolution (the default)\n"); ErrorF("-swcursor\n" "\tDisable the usage of the Windows cursor and use the X11 software\n" "\tcursor instead.\n"); ErrorF("-[no]trayicon\n" "\tDo not create a tray icon. Default is to create one\n" "\ticon per screen. You can globally disable tray icons with\n" "\t-notrayicon, then enable it for specific screens with\n" "\t-trayicon for those screens.\n"); ErrorF("-[no]unixkill\n" "\tCtrl+Alt+Backspace exits the X Server.\n"); #ifdef XWIN_GLX_WINDOWS ErrorF("-[no]wgl\n" "\tEnable the GLX extension to use the native Windows WGL interface for hardware-accelerated OpenGL\n"); #endif ErrorF("-[no]winkill\n" "\tAlt+F4 exits the X Server.\n"); ErrorF("-xkblayout XKBLayout\n" "\tEquivalent to XKBLayout in XF86Config files.\n" "\tFor example: -xkblayout de\n"); ErrorF("-xkbmodel XKBModel\n" "\tEquivalent to XKBModel in XF86Config files.\n"); ErrorF("-xkboptions XKBOptions\n" "\tEquivalent to XKBOptions in XF86Config files.\n"); ErrorF("-xkbrules XKBRules\n" "\tEquivalent to XKBRules in XF86Config files.\n"); ErrorF("-xkbvariant XKBVariant\n" "\tEquivalent to XKBVariant in XF86Config files.\n" "\tFor example: -xkbvariant nodeadkeys\n"); } /* See Porting Layer Definition - p. 57 */ void ddxUseMsg(void) { /* Set a flag so that FatalError won't give duplicate warning message */ g_fSilentFatalError = TRUE; winUseMsg(); /* Log file will not be opened for UseMsg unless we open it now */ if (!g_fLogInited) { g_pszLogFile = LogInit(g_pszLogFile, ".old"); g_fLogInited = TRUE; } LogClose(EXIT_NO_ERROR); /* Notify user where UseMsg text can be found. */ if (!g_fNoHelpMessageBox) winMessageBoxF("The " PROJECT_NAME " help text has been printed to " "%s.\n" "Please open %s to read the help text.\n", MB_ICONINFORMATION, g_pszLogFile, g_pszLogFile); } /* See Porting Layer Definition - p. 20 */ /* * Do any global initialization, then initialize each screen. * * NOTE: We use ddxProcessArgument, so we don't need to touch argc and argv */ void InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[]) { int i; if (serverGeneration == 1) XwinExtensionInit(); /* Log the command line */ winLogCommandLine(argc, argv); #if CYGDEBUG winDebug("InitOutput\n"); #endif /* Validate command-line arguments */ if (serverGeneration == 1 && !winValidateArgs()) { FatalError("InitOutput - Invalid command-line arguments found. " "Exiting.\n"); } #ifdef XWIN_XF86CONFIG /* Try to read the xorg.conf-style configuration file */ if (!winReadConfigfile()) winErrorFVerb(1, "InitOutput - Error reading config file\n"); #else winMsg(X_INFO, "xorg.conf is not supported\n"); winMsg(X_INFO, "See http://x.cygwin.com/docs/faq/cygwin-x-faq.html " "for more information\n"); winConfigFiles(); #endif /* Load preferences from XWinrc file */ LoadPreferences(); /* Setup global screen info parameters */ pScreenInfo->imageByteOrder = IMAGE_BYTE_ORDER; pScreenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; pScreenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; pScreenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; pScreenInfo->numPixmapFormats = ARRAY_SIZE(g_PixmapFormats); /* Describe how we want common pixmap formats padded */ for (i = 0; i < ARRAY_SIZE(g_PixmapFormats); i++) { pScreenInfo->formats[i] = g_PixmapFormats[i]; } /* Load pointers to DirectDraw functions */ winGetDDProcAddresses(); /* Detect supported engines */ winDetectSupportedEngines(); /* Load libraries for taskbar grouping */ winPropertyStoreInit(); /* Store the instance handle */ g_hInstance = GetModuleHandle(NULL); /* Create the messaging window */ if (serverGeneration == 1) winCreateMsgWindowThread(); /* Initialize each screen */ for (i = 0; i < g_iNumScreens; ++i) { /* Initialize the screen */ if (-1 == AddScreen(winScreenInit, argc, argv)) { FatalError("InitOutput - Couldn't add screen %d", i); } } /* Unless full xinerama has been explicitly enabled, register all native screens with pseudoramiX */ if (!noPanoramiXExtension) noPseudoramiXExtension = TRUE; if ((g_ScreenInfo[0].fMultipleMonitors) && !noPseudoramiXExtension) { int pass; PseudoramiXExtensionInit(); /* Add primary monitor on pass 0, other monitors on pass 1, to ensure the primary monitor is first in XINERAMA list */ for (pass = 0; pass < 2; pass++) { int iMonitor; for (iMonitor = 1; ; iMonitor++) { struct GetMonitorInfoData data; if (QueryMonitor(iMonitor, &data)) { MONITORINFO mi; mi.cbSize = sizeof(MONITORINFO); if (GetMonitorInfo(data.monitorHandle, &mi)) { /* pass == 1 XOR primary monitor flags is set */ if ((!(pass == 1)) != (!(mi.dwFlags & MONITORINFOF_PRIMARY))) { /* Note the screen origin in a normalized coordinate space where (0,0) is at the top left of the native virtual desktop area */ data.monitorOffsetX = data.monitorOffsetX - GetSystemMetrics(SM_XVIRTUALSCREEN); data.monitorOffsetY = data.monitorOffsetY - GetSystemMetrics(SM_YVIRTUALSCREEN); winDebug ("InitOutput - screen %d added at virtual desktop coordinate (%d,%d) (pseudoramiX) \n", iMonitor-1, data.monitorOffsetX, data.monitorOffsetY); PseudoramiXAddScreen(data.monitorOffsetX, data.monitorOffsetY, data.monitorWidth, data.monitorHeight); } } } else break; } } } xorgGlxCreateVendor(); /* Generate a cookie used by internal clients for authorization */ if (g_fXdmcpEnabled || g_fAuthEnabled) winGenerateAuthorization(); #if CYGDEBUG || YES winDebug("InitOutput - Returning.\n"); #endif } xorg-server-21.1.16/hw/xwin/winallpriv.c0000644000175000017500000001245314757411105013576 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Keith Packard, MIT X Consortium * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* See Porting Layer Definition - p. 58 */ /* * Allocate indexes for the privates that we use. * Allocate memory directly for the screen privates. * Reserve space in GCs and Pixmaps for our privates. * Colormap privates are handled in winAllocateCmapPrivates () */ Bool winAllocatePrivates(ScreenPtr pScreen) { winPrivScreenPtr pScreenPriv; #if CYGDEBUG winDebug("winAllocateScreenPrivates - g_ulServerGeneration: %lu " "serverGeneration: %lu\n", g_ulServerGeneration, serverGeneration); #endif /* We need a new slot for our privates if the screen gen has changed */ if (g_ulServerGeneration != serverGeneration) { g_ulServerGeneration = serverGeneration; } /* Allocate memory for the screen private structure */ pScreenPriv = malloc(sizeof(winPrivScreenRec)); if (!pScreenPriv) { ErrorF("winAllocateScreenPrivates - malloc () failed\n"); return FALSE; } /* Initialize the memory of the private structure */ ZeroMemory(pScreenPriv, sizeof(winPrivScreenRec)); /* Initialize private structure members */ pScreenPriv->fActive = TRUE; /* Register our screen private */ if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0)) { ErrorF("winAllocatePrivates - AllocateScreenPrivate () failed\n"); return FALSE; } /* Save the screen private pointer */ winSetScreenPriv(pScreen, pScreenPriv); /* Reserve Pixmap memory for our privates */ if (!dixRegisterPrivateKey (g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof(winPrivPixmapRec))) { ErrorF("winAllocatePrivates - AllocatePixmapPrivates () failed\n"); return FALSE; } /* Reserve Window memory for our privates */ if (!dixRegisterPrivateKey (g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof(winPrivWinRec))) { ErrorF("winAllocatePrivates () - AllocateWindowPrivates () failed\n"); return FALSE; } return TRUE; } /* * Colormap privates may be allocated after the default colormap has * already been created for some screens. This initialization procedure * is called for each default colormap that is found. */ Bool winInitCmapPrivates(ColormapPtr pcmap, int i) { #if CYGDEBUG winDebug("winInitCmapPrivates\n"); #endif /* * I see no way that this function can do anything useful * with only a ColormapPtr. We don't have the index for * our dev privates yet, so we can't really initialize * anything. Perhaps I am misunderstanding the purpose * of this function. */ /* That's definitely true. * I therefore changed the API and added the index as argument. */ return TRUE; } /* * Allocate memory for our colormap privates */ Bool winAllocateCmapPrivates(ColormapPtr pCmap) { winPrivCmapPtr pCmapPriv; static unsigned long s_ulPrivateGeneration = 0; #if CYGDEBUG winDebug("winAllocateCmapPrivates\n"); #endif /* Get a new privates index when the server generation changes */ if (s_ulPrivateGeneration != serverGeneration) { /* Save the new server generation */ s_ulPrivateGeneration = serverGeneration; } /* Allocate memory for our private structure */ pCmapPriv = malloc(sizeof(winPrivCmapRec)); if (!pCmapPriv) { ErrorF("winAllocateCmapPrivates - malloc () failed\n"); return FALSE; } /* Initialize the memory of the private structure */ ZeroMemory(pCmapPriv, sizeof(winPrivCmapRec)); /* Register our colourmap private */ if (!dixRegisterPrivateKey(g_iCmapPrivateKey, PRIVATE_COLORMAP, 0)) { ErrorF("winAllocateCmapPrivates - AllocateCmapPrivate () failed\n"); return FALSE; } /* Save the cmap private pointer */ winSetCmapPriv(pCmap, pCmapPriv); #if CYGDEBUG winDebug("winAllocateCmapPrivates - Returning\n"); #endif return TRUE; } xorg-server-21.1.16/hw/xwin/winauth.c0000644000175000017500000001025714757411105013066 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "winauth.h" #include "winmsg.h" /* Includes for authorization */ #include "securitysrv.h" #include "os/osdep.h" #include /* * Constants */ #define AUTH_NAME "MIT-MAGIC-COOKIE-1" /* * Locals */ static XID g_authId = 0; static unsigned int g_uiAuthDataLen = 0; static char *g_pAuthData = NULL; static xcb_auth_info_t auth_info; /* * Code to generate a MIT-MAGIC-COOKIE-1, copied from under XCSECURITY */ #ifndef XCSECURITY static XID GenerateAuthorization(unsigned name_length, const char *name, unsigned data_length, const char *data, unsigned *data_length_return, char **data_return) { return MitGenerateCookie(data_length, data, FakeClientID(0), data_length_return, data_return); } #endif /* * Generate authorization cookie for internal server clients */ BOOL winGenerateAuthorization(void) { #ifdef XCSECURITY SecurityAuthorizationPtr pAuth = NULL; #endif /* Call OS layer to generate authorization key */ g_authId = GenerateAuthorization(strlen(AUTH_NAME), AUTH_NAME, 0, NULL, &g_uiAuthDataLen, &g_pAuthData); if ((XID) ~0L == g_authId) { ErrorF("winGenerateAuthorization - GenerateAuthorization failed\n"); return FALSE; } else { winDebug("winGenerateAuthorization - GenerateAuthorization success!\n" "AuthDataLen: %d AuthData: %s\n", g_uiAuthDataLen, g_pAuthData); } auth_info.name = strdup(AUTH_NAME); auth_info.namelen = strlen(AUTH_NAME); auth_info.data = g_pAuthData; auth_info.datalen = g_uiAuthDataLen; #ifdef XCSECURITY /* Allocate structure for additional auth information */ pAuth = (SecurityAuthorizationPtr) malloc(sizeof(SecurityAuthorizationRec)); if (!(pAuth)) { ErrorF("winGenerateAuthorization - Failed allocating " "SecurityAuthorizationPtr.\n"); return FALSE; } /* Fill in the auth fields */ pAuth->id = g_authId; pAuth->timeout = 0; /* live for x seconds after refcnt == 0 */ pAuth->group = None; pAuth->trustLevel = XSecurityClientTrusted; pAuth->refcnt = 1; /* this auth must stick around */ pAuth->secondsRemaining = 0; pAuth->timer = NULL; pAuth->eventClients = NULL; /* Add the authorization to the server's auth list */ if (!AddResource(g_authId, SecurityAuthorizationResType, pAuth)) { ErrorF("winGenerateAuthorization - AddResource failed for auth.\n"); return FALSE; } #endif return TRUE; } xcb_auth_info_t * winGetXcbAuthInfo(void) { if (g_pAuthData) return &auth_info; return NULL; } xorg-server-21.1.16/hw/xwin/winblock.c0000644000175000017500000000611614757411105013216 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" /* See Porting Layer Definition - p. 6 */ void winBlockHandler(ScreenPtr pScreen, void *pTimeout) { winScreenPriv(pScreen); #ifndef HAS_DEVWINDOWS struct timeval **tvp = pTimeout; if (*tvp != NULL) { if (GetQueueStatus(QS_ALLINPUT | QS_ALLPOSTMESSAGE) != 0) { /* If there are still messages to process on the Windows message queue, make sure select() just polls rather than blocking. */ (*tvp)->tv_sec = 0; (*tvp)->tv_usec = 0; } else { /* Otherwise, lacking /dev/windows, we must wake up again in a reasonable time to check the Windows message queue. without noticeable delay. */ (*tvp)->tv_sec = 0; (*tvp)->tv_usec = 100; } } #endif /* Signal threaded modules to begin */ if (pScreenPriv != NULL && !pScreenPriv->fServerStarted) { int iReturn; winDebug("winBlockHandler - pthread_mutex_unlock()\n"); /* Flag that modules are to be started */ pScreenPriv->fServerStarted = TRUE; /* Unlock the mutex for threaded modules */ iReturn = pthread_mutex_unlock(&pScreenPriv->pmServerStarted); if (iReturn != 0) { ErrorF("winBlockHandler - pthread_mutex_unlock () failed: %d\n", iReturn); } else { winDebug("winBlockHandler - pthread_mutex_unlock () returned\n"); } } /* At least one X client has asked to suspend the screensaver, so reset Windows' display idle timer */ #ifdef SCREENSAVER if (screenSaverSuspended) SetThreadExecutionState(ES_DISPLAY_REQUIRED); #endif } xorg-server-21.1.16/hw/xwin/wincmap.c0000644000175000017500000004430214757411105013043 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * Local prototypes */ static int winListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps); static void winStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs); static void winInstallColormap(ColormapPtr pmap); static void winUninstallColormap(ColormapPtr pmap); static void winResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual); static Bool winCreateColormap(ColormapPtr pmap); static void winDestroyColormap(ColormapPtr pmap); static Bool winGetPaletteDIB(ScreenPtr pScreen, ColormapPtr pcmap); static Bool winGetPaletteDD(ScreenPtr pScreen, ColormapPtr pcmap); /* * Set screen functions for colormaps */ void winSetColormapFunctions(ScreenPtr pScreen) { pScreen->CreateColormap = winCreateColormap; pScreen->DestroyColormap = winDestroyColormap; pScreen->InstallColormap = winInstallColormap; pScreen->UninstallColormap = winUninstallColormap; pScreen->ListInstalledColormaps = winListInstalledColormaps; pScreen->StoreColors = winStoreColors; pScreen->ResolveColor = winResolveColor; } /* See Porting Layer Definition - p. 30 */ /* * Walk the list of installed colormaps, filling the pmaps list * with the resource ids of the installed maps, and return * a count of the total number of installed maps. */ static int winListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps) { winScreenPriv(pScreen); /* * There will only be one installed colormap, so we only need * to return one id, and the count of installed maps will always * be one. */ *pmaps = pScreenPriv->pcmapInstalled->mid; return 1; } /* See Porting Layer Definition - p. 30 */ /* See Programming Windows - p. 663 */ static void winInstallColormap(ColormapPtr pColormap) { ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); ColormapPtr oldpmap = pScreenPriv->pcmapInstalled; #if CYGDEBUG winDebug("winInstallColormap\n"); #endif /* Did the colormap actually change? */ if (pColormap != oldpmap) { #if CYGDEBUG winDebug("winInstallColormap - Colormap has changed, attempt " "to install.\n"); #endif /* Was there a previous colormap? */ if (oldpmap != (ColormapPtr) None) { /* There was a previous colormap; tell clients it is gone */ WalkTree(pColormap->pScreen, TellLostMap, (char *) &oldpmap->mid); } /* Install new colormap */ pScreenPriv->pcmapInstalled = pColormap; WalkTree(pColormap->pScreen, TellGainedMap, (char *) &pColormap->mid); /* Call the engine specific colormap install procedure */ if (!((*pScreenPriv->pwinInstallColormap) (pColormap))) { winErrorFVerb(2, "winInstallColormap - Screen specific colormap install " "procedure failed. Continuing, but colors may be " "messed up from now on.\n"); } } /* Save a pointer to the newly installed colormap */ pScreenPriv->pcmapInstalled = pColormap; } /* See Porting Layer Definition - p. 30 */ static void winUninstallColormap(ColormapPtr pmap) { winScreenPriv(pmap->pScreen); ColormapPtr curpmap = pScreenPriv->pcmapInstalled; #if CYGDEBUG winDebug("winUninstallColormap\n"); #endif /* Is the colormap currently installed? */ if (pmap != curpmap) { /* Colormap not installed, nothing to do */ return; } /* Clear the installed colormap flag */ pScreenPriv->pcmapInstalled = NULL; /* * NOTE: The default colormap does not get "uninstalled" before * it is destroyed. */ /* Install the default cmap in place of the cmap to be uninstalled */ if (pmap->mid != pmap->pScreen->defColormap) { dixLookupResourceByType((void *) &curpmap, pmap->pScreen->defColormap, RT_COLORMAP, NullClient, DixUnknownAccess); (*pmap->pScreen->InstallColormap) (curpmap); } } /* See Porting Layer Definition - p. 30 */ static void winStoreColors(ColormapPtr pmap, int ndef, xColorItem * pdefs) { ScreenPtr pScreen = pmap->pScreen; winScreenPriv(pScreen); winCmapPriv(pmap); int i; unsigned short nRed, nGreen, nBlue; #if CYGDEBUG if (ndef != 1) winDebug("winStoreColors - ndef: %d\n", ndef); #endif /* Save the new colors in the colormap privates */ for (i = 0; i < ndef; ++i) { /* Adjust the colors from the X color spec to the Windows color spec */ nRed = pdefs[i].red >> 8; nGreen = pdefs[i].green >> 8; nBlue = pdefs[i].blue >> 8; /* Copy the colors to a palette entry table */ pCmapPriv->peColors[pdefs[0].pixel + i].peRed = nRed; pCmapPriv->peColors[pdefs[0].pixel + i].peGreen = nGreen; pCmapPriv->peColors[pdefs[0].pixel + i].peBlue = nBlue; /* Copy the colors to a RGBQUAD table */ pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbRed = nRed; pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbGreen = nGreen; pCmapPriv->rgbColors[pdefs[0].pixel + i].rgbBlue = nBlue; #if CYGDEBUG winDebug("winStoreColors - nRed %d nGreen %d nBlue %d\n", nRed, nGreen, nBlue); #endif } /* Call the engine specific store colors procedure */ if (!((pScreenPriv->pwinStoreColors) (pmap, ndef, pdefs))) { winErrorFVerb(2, "winStoreColors - Engine cpecific color storage procedure " "failed. Continuing, but colors may be messed up from now " "on.\n"); } } /* See Porting Layer Definition - p. 30 */ static void winResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual) { #if CYGDEBUG winDebug("winResolveColor ()\n"); #endif miResolveColor(pred, pgreen, pblue, pVisual); } /* See Porting Layer Definition - p. 29 */ static Bool winCreateColormap(ColormapPtr pmap) { winPrivCmapPtr pCmapPriv = NULL; ScreenPtr pScreen = pmap->pScreen; winScreenPriv(pScreen); #if CYGDEBUG winDebug("winCreateColormap\n"); #endif /* Allocate colormap privates */ if (!winAllocateCmapPrivates(pmap)) { ErrorF("winCreateColorma - Couldn't allocate cmap privates\n"); return FALSE; } /* Get a pointer to the newly allocated privates */ pCmapPriv = winGetCmapPriv(pmap); /* * FIXME: This is some evil hackery to help in handling some X clients * that expect the top pixel to be white. This "help" only lasts until * some client overwrites the top colormap entry. * * We don't want to actually allocate the top entry, as that causes * problems with X clients that need 7 planes (128 colors) in the default * colormap, such as Magic 7.1. */ pCmapPriv->rgbColors[WIN_NUM_PALETTE_ENTRIES - 1].rgbRed = 255; pCmapPriv->rgbColors[WIN_NUM_PALETTE_ENTRIES - 1].rgbGreen = 255; pCmapPriv->rgbColors[WIN_NUM_PALETTE_ENTRIES - 1].rgbBlue = 255; pCmapPriv->peColors[WIN_NUM_PALETTE_ENTRIES - 1].peRed = 255; pCmapPriv->peColors[WIN_NUM_PALETTE_ENTRIES - 1].peGreen = 255; pCmapPriv->peColors[WIN_NUM_PALETTE_ENTRIES - 1].peBlue = 255; /* Call the engine specific colormap initialization procedure */ if (!((*pScreenPriv->pwinCreateColormap) (pmap))) { ErrorF("winCreateColormap - Engine specific colormap creation " "procedure failed. Aborting.\n"); return FALSE; } return TRUE; } /* See Porting Layer Definition - p. 29, 30 */ static void winDestroyColormap(ColormapPtr pColormap) { winScreenPriv(pColormap->pScreen); winCmapPriv(pColormap); /* Call the engine specific colormap destruction procedure */ if (!((*pScreenPriv->pwinDestroyColormap) (pColormap))) { winErrorFVerb(2, "winDestroyColormap - Engine specific colormap destruction " "procedure failed. Continuing, but it is possible that memory " "was leaked, or that colors will be messed up from now on.\n"); } /* Free the colormap privates */ free(pCmapPriv); winSetCmapPriv(pColormap, NULL); #if CYGDEBUG winDebug("winDestroyColormap - Returning\n"); #endif } /* * Internal function to load the palette used by the Shadow DIB */ static Bool winGetPaletteDIB(ScreenPtr pScreen, ColormapPtr pcmap) { winScreenPriv(pScreen); int i; Pixel pixel; /* Pixel == CARD32 */ CARD16 nRed, nGreen, nBlue; /* CARD16 == unsigned short */ UINT uiColorsRetrieved = 0; RGBQUAD rgbColors[WIN_NUM_PALETTE_ENTRIES]; /* Get the color table for the screen */ uiColorsRetrieved = GetDIBColorTable(pScreenPriv->hdcScreen, 0, WIN_NUM_PALETTE_ENTRIES, rgbColors); if (uiColorsRetrieved == 0) { ErrorF("winGetPaletteDIB - Could not retrieve screen color table\n"); return FALSE; } #if CYGDEBUG winDebug("winGetPaletteDIB - Retrieved %d colors from DIB\n", uiColorsRetrieved); #endif /* Set the DIB color table to the default screen palette */ if (SetDIBColorTable(pScreenPriv->hdcShadow, 0, uiColorsRetrieved, rgbColors) == 0) { ErrorF("winGetPaletteDIB - SetDIBColorTable () failed\n"); return FALSE; } /* Alloc each color in the DIB color table */ for (i = 0; i < uiColorsRetrieved; ++i) { pixel = i; /* Extract the color values for current palette entry */ nRed = rgbColors[i].rgbRed << 8; nGreen = rgbColors[i].rgbGreen << 8; nBlue = rgbColors[i].rgbBlue << 8; #if CYGDEBUG winDebug("winGetPaletteDIB - Allocating a color: %u; " "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); #endif /* Allocate a entry in the X colormap */ if (AllocColor(pcmap, &nRed, &nGreen, &nBlue, &pixel, 0) != Success) { ErrorF("winGetPaletteDIB - AllocColor () failed, pixel %d\n", i); return FALSE; } if (i != pixel || nRed != rgbColors[i].rgbRed || nGreen != rgbColors[i].rgbGreen || nBlue != rgbColors[i].rgbBlue) { winDebug("winGetPaletteDIB - Got: %d; " "%d %d %d\n", (int) pixel, nRed, nGreen, nBlue); } /* FIXME: Not sure that this bit is needed at all */ pcmap->red[i].co.local.red = nRed; pcmap->red[i].co.local.green = nGreen; pcmap->red[i].co.local.blue = nBlue; } /* System is using a colormap */ /* Set the black and white pixel indices */ pScreen->whitePixel = uiColorsRetrieved - 1; pScreen->blackPixel = 0; return TRUE; } /* * Internal function to load the standard system palette being used by DD */ static Bool winGetPaletteDD(ScreenPtr pScreen, ColormapPtr pcmap) { int i; Pixel pixel; /* Pixel == CARD32 */ CARD16 nRed, nGreen, nBlue; /* CARD16 == unsigned short */ UINT uiSystemPaletteEntries; LPPALETTEENTRY ppeColors = NULL; HDC hdc = NULL; /* Get a DC to obtain the default palette */ hdc = GetDC(NULL); if (hdc == NULL) { ErrorF("winGetPaletteDD - Couldn't get a DC\n"); return FALSE; } /* Get the number of entries in the system palette */ uiSystemPaletteEntries = GetSystemPaletteEntries(hdc, 0, 0, NULL); if (uiSystemPaletteEntries == 0) { ErrorF("winGetPaletteDD - Unable to determine number of " "system palette entries\n"); return FALSE; } #if CYGDEBUG winDebug("winGetPaletteDD - uiSystemPaletteEntries %d\n", uiSystemPaletteEntries); #endif /* Allocate palette entries structure */ ppeColors = malloc(uiSystemPaletteEntries * sizeof(PALETTEENTRY)); if (ppeColors == NULL) { ErrorF("winGetPaletteDD - malloc () for colormap failed\n"); return FALSE; } /* Get system palette entries */ GetSystemPaletteEntries(hdc, 0, uiSystemPaletteEntries, ppeColors); /* Allocate an X colormap entry for every system palette entry */ for (i = 0; i < uiSystemPaletteEntries; ++i) { pixel = i; /* Extract the color values for current palette entry */ nRed = ppeColors[i].peRed << 8; nGreen = ppeColors[i].peGreen << 8; nBlue = ppeColors[i].peBlue << 8; #if CYGDEBUG winDebug("winGetPaletteDD - Allocating a color: %u; " "%d %d %d\n", (unsigned int)pixel, nRed, nGreen, nBlue); #endif if (AllocColor(pcmap, &nRed, &nGreen, &nBlue, &pixel, 0) != Success) { ErrorF("winGetPaletteDD - AllocColor () failed, pixel %d\n", i); free(ppeColors); ppeColors = NULL; return FALSE; } pcmap->red[i].co.local.red = nRed; pcmap->red[i].co.local.green = nGreen; pcmap->red[i].co.local.blue = nBlue; } /* System is using a colormap */ /* Set the black and white pixel indices */ pScreen->whitePixel = uiSystemPaletteEntries - 1; pScreen->blackPixel = 0; /* Free colormap */ free(ppeColors); ppeColors = NULL; /* Free the DC */ if (hdc != NULL) { ReleaseDC(NULL, hdc); hdc = NULL; } return TRUE; } /* * Install the standard fb colormap, or the GDI colormap, * depending on the current screen depth. */ Bool winCreateDefColormap(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; unsigned short zero = 0, ones = 0xFFFF; VisualPtr pVisual = pScreenPriv->pRootVisual; ColormapPtr pcmap = NULL; Pixel wp, bp; #if CYGDEBUG winDebug("winCreateDefColormap\n"); #endif /* Use standard fb colormaps for non palettized color modes */ if (pScreenInfo->dwBPP > 8) { winDebug("winCreateDefColormap - Deferring to " "fbCreateDefColormap ()\n"); return fbCreateDefColormap(pScreen); } /* * AllocAll for non-Dynamic visual classes, * AllocNone for Dynamic visual classes. */ /* * Dynamic visual classes allow the colors of the color map * to be changed by clients. */ #if CYGDEBUG winDebug("winCreateDefColormap - defColormap: %lu\n", pScreen->defColormap); #endif /* Allocate an X colormap, owned by client 0 */ if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &pcmap, (pVisual->class & DynamicClass) ? AllocNone : AllocAll, 0) != Success) { ErrorF("winCreateDefColormap - CreateColormap failed\n"); return FALSE; } if (pcmap == NULL) { ErrorF("winCreateDefColormap - Colormap could not be created\n"); return FALSE; } #if CYGDEBUG winDebug("winCreateDefColormap - Created a colormap\n"); #endif /* Branch on the visual class */ if (!(pVisual->class & DynamicClass)) { /* Branch on engine type */ if (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI) { /* Load the colors being used by the Shadow DIB */ if (!winGetPaletteDIB(pScreen, pcmap)) { ErrorF("winCreateDefColormap - Couldn't get DIB colors\n"); return FALSE; } } else { /* Load the colors from the default system palette */ if (!winGetPaletteDD(pScreen, pcmap)) { ErrorF("winCreateDefColormap - Couldn't get colors " "for DD\n"); return FALSE; } } } else { wp = pScreen->whitePixel; bp = pScreen->blackPixel; /* Allocate a black and white pixel */ if ((AllocColor(pcmap, &ones, &ones, &ones, &wp, 0) != Success) || (AllocColor(pcmap, &zero, &zero, &zero, &bp, 0) != Success)) { ErrorF("winCreateDefColormap - Couldn't allocate bp or wp\n"); return FALSE; } pScreen->whitePixel = wp; pScreen->blackPixel = bp; #if 0 /* Have to reserve first 10 and last ten pixels in DirectDraw windowed */ if (pScreenInfo->dwEngine != WIN_SERVER_SHADOW_GDI) { int k; Pixel p; for (k = 1; k < 10; ++k) { p = k; if (AllocColor(pcmap, &ones, &ones, &ones, &p, 0) != Success) FatalError("Foo!\n"); } for (k = 245; k < 255; ++k) { p = k; if (AllocColor(pcmap, &zero, &zero, &zero, &p, 0) != Success) FatalError("Baz!\n"); } } #endif } /* Install the created colormap */ (*pScreen->InstallColormap) (pcmap); #if CYGDEBUG winDebug("winCreateDefColormap - Returning\n"); #endif return TRUE; } xorg-server-21.1.16/hw/xwin/winconfig.c0000644000175000017500000007255614757411105013404 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Alexander Gottwald */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winconfig.h" #include "winmsg.h" #include "globals.h" #include "xkbsrv.h" #ifdef XWIN_XF86CONFIG #ifndef CONFIGPATH #define CONFIGPATH "%A," "%R," \ "/etc/X11/%R," "%P/etc/X11/%R," \ "%E," "%F," \ "/etc/X11/%F," "%P/etc/X11/%F," \ "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ "%P/lib/X11/%X" #endif #ifndef CONFIGDIRPATH #define CONFIGDIRPATH "/etc/X11/%X-%M," "/etc/X11/%X," "/etc/%X," \ "%P/etc/X11/%X.%H," "%P/etc/X11/%X-%M," \ "%P/etc/X11/%X," \ "%P/lib/X11/%X.%H," "%P/lib/X11/%X-%M," \ "%P/lib/X11/%X" #endif XF86ConfigPtr g_xf86configptr = NULL; #endif WinCmdlineRec g_cmdline = { #ifdef XWIN_XF86CONFIG NULL, /* configFile */ NULL, /* configDir */ #endif NULL, /* fontPath */ #ifdef XWIN_XF86CONFIG NULL, /* keyboard */ #endif NULL, /* xkbRules */ NULL, /* xkbModel */ NULL, /* xkbLayout */ NULL, /* xkbVariant */ NULL, /* xkbOptions */ NULL, /* screenname */ NULL, /* mousename */ FALSE, /* emulate3Buttons */ 0 /* emulate3Timeout */ }; winInfoRec g_winInfo = { { /* keyboard */ 0, /* leds */ 500, /* delay */ 30 /* rate */ } , { /* xkb */ NULL, /* rules */ NULL, /* model */ NULL, /* layout */ NULL, /* variant */ NULL, /* options */ } , { FALSE, 50} }; #define NULL_IF_EMPTY(x) (winNameCompare(x,"")?x:NULL) #ifdef XWIN_XF86CONFIG serverLayoutRec g_winConfigLayout; static Bool ParseOptionValue(int scrnIndex, void *options, OptionInfoPtr p); static Bool configLayout(serverLayoutPtr, XF86ConfLayoutPtr, char *); static Bool configImpliedLayout(serverLayoutPtr, XF86ConfScreenPtr); static Bool GetBoolValue(OptionInfoPtr p, const char *s); Bool winReadConfigfile() { Bool retval = TRUE; char *filename, *dirname; MessageType filefrom = X_DEFAULT; MessageType dirfrom = X_DEFAULT; char *xf86ConfigFile = NULL; char *xf86ConfigDir = NULL; if (g_cmdline.configFile) { filefrom = X_CMDLINE; xf86ConfigFile = g_cmdline.configFile; } if (g_cmdline.configDir) { dirfrom = X_CMDLINE; xf86ConfigDir = g_cmdline.configDir; } /* Parse config file into data structure */ xf86initConfigFiles(); dirname = xf86openConfigDirFiles(CONFIGDIRPATH, xf86ConfigDir, PROJECTROOT); filename = xf86openConfigFile(CONFIGPATH, xf86ConfigFile, PROJECTROOT); /* Hack for backward compatibility */ if (!filename && from == X_DEFAULT) filename = xf86openConfigFile(CONFIGPATH, "XF86Config", PROJECTROOT); if (filename) { winMsg(from, "Using config file: \"%s\"\n", filename); } else { winMsg(X_ERROR, "Unable to locate/open config file"); if (xf86ConfigFile) ErrorF(": \"%s\"", xf86ConfigFile); ErrorF("\n"); } if (dirname) { winMsg(from, "Using config directory: \"%s\"\n", dirname); } else { winMsg(X_ERROR, "Unable to locate/open config directory"); if (xf86ConfigDir) ErrorF(": \"%s\"", xf86ConfigDir); ErrorF("\n"); } if (!filename && !dirname) { return FALSE; } free(filename); free(dirname); if ((g_xf86configptr = xf86readConfigFile()) == NULL) { winMsg(X_ERROR, "Problem parsing the config file\n"); return FALSE; } xf86closeConfigFile(); LogPrintMarkers(); /* set options from data structure */ if (g_xf86configptr->conf_layout_lst == NULL || g_cmdline.screenname != NULL) { if (g_cmdline.screenname == NULL) { winMsg(X_WARNING, "No Layout section. Using the first Screen section.\n"); } if (!configImpliedLayout(&g_winConfigLayout, g_xf86configptr->conf_screen_lst)) { winMsg(X_ERROR, "Unable to determine the screen layout\n"); return FALSE; } } else { /* Check if layout is given in the config file */ if (g_xf86configptr->conf_flags != NULL) { char *dfltlayout = NULL; void *optlist = g_xf86configptr->conf_flags->flg_option_lst; if (optlist && winFindOption(optlist, "defaultserverlayout")) dfltlayout = winSetStrOption(optlist, "defaultserverlayout", NULL); if (!configLayout(&g_winConfigLayout, g_xf86configptr->conf_layout_lst, dfltlayout)) { winMsg(X_ERROR, "Unable to determine the screen layout\n"); return FALSE; } } else { if (!configLayout(&g_winConfigLayout, g_xf86configptr->conf_layout_lst, NULL)) { winMsg(X_ERROR, "Unable to determine the screen layout\n"); return FALSE; } } } /* setup special config files */ winConfigFiles(); return retval; } #endif /* load layout definitions */ #include "winlayouts.h" /* Set the keyboard configuration */ Bool winConfigKeyboard(DeviceIntPtr pDevice) { char layoutName[KL_NAMELENGTH]; unsigned char layoutFriendlyName[256]; unsigned int layoutNum = 0; unsigned int deviceIdentifier = 0; int keyboardType; #ifdef XWIN_XF86CONFIG XF86ConfInputPtr kbd = NULL; XF86ConfInputPtr input_list = NULL; MessageType kbdfrom = X_CONFIG; #endif MessageType from = X_DEFAULT; char *s = NULL; /* Setup defaults */ XkbGetRulesDflts(&g_winInfo.xkb); /* * Query the windows autorepeat settings and change the xserver defaults. */ { int kbd_delay; DWORD kbd_speed; if (SystemParametersInfo(SPI_GETKEYBOARDDELAY, 0, &kbd_delay, 0) && SystemParametersInfo(SPI_GETKEYBOARDSPEED, 0, &kbd_speed, 0)) { switch (kbd_delay) { case 0: g_winInfo.keyboard.delay = 250; break; case 1: g_winInfo.keyboard.delay = 500; break; case 2: g_winInfo.keyboard.delay = 750; break; default: case 3: g_winInfo.keyboard.delay = 1000; break; } g_winInfo.keyboard.rate = (kbd_speed > 0) ? kbd_speed : 1; winMsg(X_PROBED, "Setting autorepeat to delay=%ld, rate=%ld\n", g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); } } keyboardType = GetKeyboardType(0); if (keyboardType > 0 && GetKeyboardLayoutName(layoutName)) { WinKBLayoutPtr pLayout; Bool bfound = FALSE; int pass; layoutNum = strtoul(layoutName, (char **) NULL, 16); if ((layoutNum & 0xffff) == 0x411) { if (keyboardType == 7) { /* Japanese layouts have problems with key event messages such as the lack of WM_KEYUP for Caps Lock key. Loading US layout fixes this problem. */ if (LoadKeyboardLayout("00000409", KLF_ACTIVATE) != NULL) winMsg(X_INFO, "Loading US keyboard layout.\n"); else winMsg(X_ERROR, "LoadKeyboardLayout failed.\n"); } } /* Discover the friendly name of the current layout */ { HKEY regkey = NULL; const char regtempl[] = "SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\"; char *regpath; DWORD namesize = sizeof(layoutFriendlyName); regpath = malloc(sizeof(regtempl) + KL_NAMELENGTH + 1); strcpy(regpath, regtempl); strcat(regpath, layoutName); if (!RegOpenKey(HKEY_LOCAL_MACHINE, regpath, ®key)) RegQueryValueEx(regkey, "Layout Text", 0, NULL, layoutFriendlyName, &namesize); /* Close registry key */ if (regkey) RegCloseKey(regkey); free(regpath); } winMsg(X_PROBED, "Windows keyboard layout: \"%s\" (%08x) \"%s\", type %d\n", layoutName, layoutNum, layoutFriendlyName, keyboardType); deviceIdentifier = layoutNum >> 16; for (pass = 0; pass < 2; pass++) { /* If we didn't find an exact match for the input locale identifier, try to find an match on the language identifier part only */ if (pass == 1) layoutNum = (layoutNum & 0xffff); for (pLayout = winKBLayouts; pLayout->winlayout != -1; pLayout++) { if (pLayout->winlayout != layoutNum) continue; if (pLayout->winkbtype > 0 && pLayout->winkbtype != keyboardType) continue; bfound = TRUE; winMsg(X_PROBED, "Found matching XKB configuration \"%s\"\n", pLayout->layoutname); winMsg(X_PROBED, "Model = \"%s\" Layout = \"%s\"" " Variant = \"%s\" Options = \"%s\"\n", pLayout->xkbmodel ? pLayout->xkbmodel : "none", pLayout->xkblayout ? pLayout->xkblayout : "none", pLayout->xkbvariant ? pLayout->xkbvariant : "none", pLayout->xkboptions ? pLayout->xkboptions : "none"); g_winInfo.xkb.model = pLayout->xkbmodel; g_winInfo.xkb.layout = pLayout->xkblayout; g_winInfo.xkb.variant = pLayout->xkbvariant; g_winInfo.xkb.options = pLayout->xkboptions; if (deviceIdentifier == 0xa000) { winMsg(X_PROBED, "Windows keyboard layout device identifier indicates Macintosh, setting Model = \"macintosh\""); g_winInfo.xkb.model = "macintosh"; } break; } if (bfound) break; } if (!bfound) { winMsg(X_ERROR, "Keyboardlayout \"%s\" (%s) is unknown, using X server default layout\n", layoutFriendlyName, layoutName); } } /* parse the configuration */ #ifdef XWIN_XF86CONFIG if (g_cmdline.keyboard) kbdfrom = X_CMDLINE; /* * Until the layout code is finished, I search for the keyboard * device and configure the server with it. */ if (g_xf86configptr != NULL) input_list = g_xf86configptr->conf_input_lst; while (input_list != NULL) { if (winNameCompare(input_list->inp_driver, "keyboard") == 0) { /* Check if device name matches requested name */ if (g_cmdline.keyboard && winNameCompare(input_list->inp_identifier, g_cmdline.keyboard)) continue; kbd = input_list; } input_list = input_list->list.next; } if (kbd != NULL) { if (kbd->inp_identifier) winMsg(kbdfrom, "Using keyboard \"%s\" as primary keyboard\n", kbd->inp_identifier); if ((s = winSetStrOption(kbd->inp_option_lst, "AutoRepeat", NULL))) { if ((sscanf(s, "%ld %ld", &g_winInfo.keyboard.delay, &g_winInfo.keyboard.rate) != 2) || (g_winInfo.keyboard.delay < 1) || (g_winInfo.keyboard.rate == 0) || (1000 / g_winInfo.keyboard.rate) < 1) { winErrorFVerb(2, "\"%s\" is not a valid AutoRepeat value", s); free(s); return FALSE; } free(s); winMsg(X_CONFIG, "AutoRepeat: %ld %ld\n", g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); } #endif s = NULL; if (g_cmdline.xkbRules) { s = g_cmdline.xkbRules; from = X_CMDLINE; } #ifdef XWIN_XF86CONFIG else { s = winSetStrOption(kbd->inp_option_lst, "XkbRules", NULL); from = X_CONFIG; } #endif if (s) { g_winInfo.xkb.rules = NULL_IF_EMPTY(s); winMsg(from, "XKB: rules: \"%s\"\n", s); } s = NULL; if (g_cmdline.xkbModel) { s = g_cmdline.xkbModel; from = X_CMDLINE; } #ifdef XWIN_XF86CONFIG else { s = winSetStrOption(kbd->inp_option_lst, "XkbModel", NULL); from = X_CONFIG; } #endif if (s) { g_winInfo.xkb.model = NULL_IF_EMPTY(s); winMsg(from, "XKB: model: \"%s\"\n", s); } s = NULL; if (g_cmdline.xkbLayout) { s = g_cmdline.xkbLayout; from = X_CMDLINE; } #ifdef XWIN_XF86CONFIG else { s = winSetStrOption(kbd->inp_option_lst, "XkbLayout", NULL); from = X_CONFIG; } #endif if (s) { g_winInfo.xkb.layout = NULL_IF_EMPTY(s); winMsg(from, "XKB: layout: \"%s\"\n", s); } s = NULL; if (g_cmdline.xkbVariant) { s = g_cmdline.xkbVariant; from = X_CMDLINE; } #ifdef XWIN_XF86CONFIG else { s = winSetStrOption(kbd->inp_option_lst, "XkbVariant", NULL); from = X_CONFIG; } #endif if (s) { g_winInfo.xkb.variant = NULL_IF_EMPTY(s); winMsg(from, "XKB: variant: \"%s\"\n", s); } s = NULL; if (g_cmdline.xkbOptions) { s = g_cmdline.xkbOptions; from = X_CMDLINE; } #ifdef XWIN_XF86CONFIG else { s = winSetStrOption(kbd->inp_option_lst, "XkbOptions", NULL); from = X_CONFIG; } #endif if (s) { g_winInfo.xkb.options = NULL_IF_EMPTY(s); winMsg(from, "XKB: options: \"%s\"\n", s); } #ifdef XWIN_XF86CONFIG } #endif return TRUE; } #ifdef XWIN_XF86CONFIG Bool winConfigMouse(DeviceIntPtr pDevice) { MessageType mousefrom = X_CONFIG; XF86ConfInputPtr mouse = NULL; XF86ConfInputPtr input_list = NULL; if (g_cmdline.mouse) mousefrom = X_CMDLINE; if (g_xf86configptr != NULL) input_list = g_xf86configptr->conf_input_lst; while (input_list != NULL) { if (winNameCompare(input_list->inp_driver, "mouse") == 0) { /* Check if device name matches requested name */ if (g_cmdline.mouse && winNameCompare(input_list->inp_identifier, g_cmdline.mouse)) continue; mouse = input_list; } input_list = input_list->list.next; } if (mouse != NULL) { if (mouse->inp_identifier) winMsg(mousefrom, "Using pointer \"%s\" as primary pointer\n", mouse->inp_identifier); g_winInfo.pointer.emulate3Buttons = winSetBoolOption(mouse->inp_option_lst, "Emulate3Buttons", FALSE); if (g_cmdline.emulate3buttons) g_winInfo.pointer.emulate3Buttons = g_cmdline.emulate3buttons; g_winInfo.pointer.emulate3Timeout = winSetIntOption(mouse->inp_option_lst, "Emulate3Timeout", 50); if (g_cmdline.emulate3timeout) g_winInfo.pointer.emulate3Timeout = g_cmdline.emulate3timeout; } else { winMsg(X_ERROR, "No primary pointer configured\n"); winMsg(X_DEFAULT, "Using compiletime defaults for pointer\n"); } return TRUE; } Bool winConfigFiles() { MessageType from; XF86ConfFilesPtr filesptr = NULL; /* set some shortcuts */ if (g_xf86configptr != NULL) { filesptr = g_xf86configptr->conf_files; } /* Fontpath */ from = X_DEFAULT; if (g_cmdline.fontPath) { from = X_CMDLINE; defaultFontPath = g_cmdline.fontPath; } else if (filesptr != NULL && filesptr->file_fontpath) { from = X_CONFIG; defaultFontPath = strdup(filesptr->file_fontpath); } winMsg(from, "FontPath set to \"%s\"\n", defaultFontPath); return TRUE; } #else Bool winConfigFiles(void) { /* Fontpath */ if (g_cmdline.fontPath) { defaultFontPath = g_cmdline.fontPath; winMsg(X_CMDLINE, "FontPath set to \"%s\"\n", defaultFontPath); } return TRUE; } #endif Bool winConfigOptions(void) { return TRUE; } Bool winConfigScreens(void) { return TRUE; } #ifdef XWIN_XF86CONFIG char * winSetStrOption(void *optlist, const char *name, char *deflt) { OptionInfoRec o; o.name = name; o.type = OPTV_STRING; if (ParseOptionValue(-1, optlist, &o)) deflt = o.value.str; if (deflt) return strdup(deflt); else return NULL; } int winSetBoolOption(void *optlist, const char *name, int deflt) { OptionInfoRec o; o.name = name; o.type = OPTV_BOOLEAN; if (ParseOptionValue(-1, optlist, &o)) deflt = o.value.boolean; return deflt; } int winSetIntOption(void *optlist, const char *name, int deflt) { OptionInfoRec o; o.name = name; o.type = OPTV_INTEGER; if (ParseOptionValue(-1, optlist, &o)) deflt = o.value.num; return deflt; } double winSetRealOption(void *optlist, const char *name, double deflt) { OptionInfoRec o; o.name = name; o.type = OPTV_REAL; if (ParseOptionValue(-1, optlist, &o)) deflt = o.value.realnum; return deflt; } double winSetPercentOption(void *optlist, const char *name, double deflt) { OptionInfoRec o; o.name = name; o.type = OPTV_PERCENT; if (ParseOptionValue(-1, optlist, &o)) deflt = o.value.realnum; return deflt; } #endif /* * Compare two strings for equality. This is caseinsensitive and * The characters '_', ' ' (space) and '\t' (tab) are treated as * not existing. */ int winNameCompare(const char *s1, const char *s2) { char c1, c2; if (!s1 || *s1 == 0) { if (!s2 || *s2 == 0) return 0; else return 1; } while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') s1++; while (*s2 == '_' || *s2 == ' ' || *s2 == '\t') s2++; c1 = (isupper((int) *s1) ? tolower((int) *s1) : *s1); c2 = (isupper((int) *s2) ? tolower((int) *s2) : *s2); while (c1 == c2) { if (c1 == 0) return 0; s1++; s2++; while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') s1++; while (*s2 == '_' || *s2 == ' ' || *s2 == '\t') s2++; c1 = (isupper((int) *s1) ? tolower((int) *s1) : *s1); c2 = (isupper((int) *s2) ? tolower((int) *s2) : *s2); } return c1 - c2; } #ifdef XWIN_XF86CONFIG /* * Find the named option in the list. * @return the pointer to the option record, or NULL if not found. */ XF86OptionPtr winFindOption(XF86OptionPtr list, const char *name) { while (list) { if (winNameCompare(list->opt_name, name) == 0) return list; list = list->list.next; } return NULL; } /* * Find the Value of an named option. * @return The option value or NULL if not found. */ char * winFindOptionValue(XF86OptionPtr list, const char *name) { list = winFindOption(list, name); if (list) { if (list->opt_val) return list->opt_val; else return ""; } return NULL; } /* * Parse the option. */ static Bool ParseOptionValue(int scrnIndex, void *options, OptionInfoPtr p) { char *s, *end; if ((s = winFindOptionValue(options, p->name)) != NULL) { switch (p->type) { case OPTV_INTEGER: if (*s == '\0') { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires an integer value\n", p->name); p->found = FALSE; } else { p->value.num = strtoul(s, &end, 0); if (*end == '\0') { p->found = TRUE; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires an integer value\n", p->name); p->found = FALSE; } } break; case OPTV_STRING: if (*s == '\0') { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a string value\n", p->name); p->found = FALSE; } else { p->value.str = s; p->found = TRUE; } break; case OPTV_ANYSTR: p->value.str = s; p->found = TRUE; break; case OPTV_REAL: if (*s == '\0') { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a floating point value\n", p->name); p->found = FALSE; } else { p->value.realnum = strtod(s, &end); if (*end == '\0') { p->found = TRUE; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a floating point value\n", p->name); p->found = FALSE; } } break; case OPTV_BOOLEAN: if (GetBoolValue(p, s)) { p->found = TRUE; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a boolean value\n", p->name); p->found = FALSE; } break; case OPTV_PERCENT: if (*s == '\0') { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a percent value\n", p->name); p->found = FALSE; } else { double percent = strtod(s, &end); if (end != s && winNameCompare(end, "%")) { p->found = TRUE; p->value.realnum = percent; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } } case OPTV_FREQ: if (*s == '\0') { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } else { double freq = strtod(s, &end); int units = 0; if (end != s) { p->found = TRUE; if (!winNameCompare(end, "Hz")) units = 1; else if (!winNameCompare(end, "kHz") || !winNameCompare(end, "k")) units = 1000; else if (!winNameCompare(end, "MHz") || !winNameCompare(end, "M")) units = 1000000; else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } if (p->found) freq *= (double) units; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a frequency value\n", p->name); p->found = FALSE; } if (p->found) { p->value.freq.freq = freq; p->value.freq.units = units; } } break; case OPTV_NONE: /* Should never get here */ p->found = FALSE; break; } if (p->found) { winDrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", p->name); if (!(p->type == OPTV_BOOLEAN && *s == 0)) { winErrorFVerb(2, " \"%s\"", s); } winErrorFVerb(2, "\n"); } } else if (p->type == OPTV_BOOLEAN) { /* Look for matches with options with or without a "No" prefix. */ char *n, *newn; OptionInfoRec opt; n = winNormalizeName(p->name); if (!n) { p->found = FALSE; return FALSE; } if (strncmp(n, "no", 2) == 0) { newn = n + 2; } else { free(n); n = malloc(strlen(p->name) + 2 + 1); if (!n) { p->found = FALSE; return FALSE; } strcpy(n, "No"); strcat(n, p->name); newn = n; } if ((s = winFindOptionValue(options, newn)) != NULL) { if (GetBoolValue(&opt, s)) { p->value.boolean = !opt.value.boolean; p->found = TRUE; } else { winDrvMsg(scrnIndex, X_WARNING, "Option \"%s\" requires a boolean value\n", newn); p->found = FALSE; } } else { p->found = FALSE; } if (p->found) { winDrvMsgVerb(scrnIndex, X_CONFIG, 2, "Option \"%s\"", newn); if (*s != 0) { winErrorFVerb(2, " \"%s\"", s); } winErrorFVerb(2, "\n"); } free(n); } else { p->found = FALSE; } return p->found; } static Bool configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, char *default_layout) { #if 0 #pragma warn UNIMPLEMENTED #endif return TRUE; } static Bool configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen) { #if 0 #pragma warn UNIMPLEMENTED #endif return TRUE; } static Bool GetBoolValue(OptionInfoPtr p, const char *s) { if (*s == 0) { p->value.boolean = TRUE; } else { if (winNameCompare(s, "1") == 0) p->value.boolean = TRUE; else if (winNameCompare(s, "on") == 0) p->value.boolean = TRUE; else if (winNameCompare(s, "true") == 0) p->value.boolean = TRUE; else if (winNameCompare(s, "yes") == 0) p->value.boolean = TRUE; else if (winNameCompare(s, "0") == 0) p->value.boolean = FALSE; else if (winNameCompare(s, "off") == 0) p->value.boolean = FALSE; else if (winNameCompare(s, "false") == 0) p->value.boolean = FALSE; else if (winNameCompare(s, "no") == 0) p->value.boolean = FALSE; } return TRUE; } #endif char * winNormalizeName(const char *s) { char *ret, *q; const char *p; if (s == NULL) return NULL; ret = malloc(strlen(s) + 1); for (p = s, q = ret; *p != 0; p++) { switch (*p) { case '_': case ' ': case '\t': continue; default: if (isupper((int) *p)) *q++ = tolower((int) *p); else *q++ = *p; } } *q = '\0'; return ret; } xorg-server-21.1.16/hw/xwin/wincreatewnd.c0000644000175000017500000005040614757411105014101 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "shellapi.h" /* * Local function prototypes */ static Bool winGetWorkArea(RECT * prcWorkArea, winScreenInfo * pScreenInfo); static Bool winAdjustForAutoHide(RECT * prcWorkArea, winScreenInfo * pScreenInfo); /* * Create a full screen window */ Bool winCreateBoundingWindowFullScreen(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; int iX = pScreenInfo->dwInitialX; int iY = pScreenInfo->dwInitialY; int iWidth = pScreenInfo->dwWidth; int iHeight = pScreenInfo->dwHeight; HWND *phwnd = &pScreenPriv->hwndScreen; WNDCLASSEX wc; char szTitle[256]; #if CYGDEBUG winDebug("winCreateBoundingWindowFullScreen\n"); #endif /* Setup our window class */ wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; wc.hIcon = pScreenInfo->hIcon; wc.hCursor = 0; wc.hbrBackground = 0; wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; wc.hIconSm = pScreenInfo->hIconSm; RegisterClassEx(&wc); /* Set display and screen-specific tooltip text */ if (g_pszQueryHost != NULL) snprintf(szTitle, sizeof(szTitle), WINDOW_TITLE_XDMCP, g_pszQueryHost, display, (int) pScreenInfo->dwScreen); else snprintf(szTitle, sizeof(szTitle), WINDOW_TITLE, display, (int) pScreenInfo->dwScreen); /* Create the window */ *phwnd = CreateWindowExA(0, /* Extended styles */ WINDOW_CLASS, /* Class name */ szTitle, /* Window name */ WS_POPUP, iX, /* Horizontal position */ iY, /* Vertical position */ iWidth, /* Right edge */ iHeight, /* Bottom edge */ (HWND) NULL, /* No parent or owner window */ (HMENU) NULL, /* No menu */ GetModuleHandle(NULL), /* Instance handle */ pScreenPriv); /* ScreenPrivates */ /* Hide the window */ ShowWindow(*phwnd, SW_SHOWNORMAL); /* Send first paint message */ UpdateWindow(*phwnd); /* Attempt to bring our window to the top of the display */ BringWindowToTop(*phwnd); return TRUE; } /* * Create our primary Windows display window */ Bool winCreateBoundingWindowWindowed(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; int iWidth = pScreenInfo->dwUserWidth; int iHeight = pScreenInfo->dwUserHeight; int iPosX; int iPosY; HWND *phwnd = &pScreenPriv->hwndScreen; WNDCLASSEX wc; RECT rcClient, rcWorkArea; DWORD dwWindowStyle; BOOL fForceShowWindow = FALSE; char szTitle[256]; winDebug("winCreateBoundingWindowWindowed - User w: %d h: %d\n", (int) pScreenInfo->dwUserWidth, (int) pScreenInfo->dwUserHeight); winDebug("winCreateBoundingWindowWindowed - Current w: %d h: %d\n", (int) pScreenInfo->dwWidth, (int) pScreenInfo->dwHeight); /* Set the common window style flags */ dwWindowStyle = WS_OVERLAPPED | WS_SYSMENU | WS_MINIMIZEBOX; /* Decorated or undecorated window */ if (pScreenInfo->fDecoration && !pScreenInfo->fRootless && !pScreenInfo->fMultiWindow ) { /* Try to handle startup via run.exe. run.exe instructs Windows to * hide all created windows. Detect this case and make sure the * window is shown nevertheless */ STARTUPINFO startupInfo; GetStartupInfo(&startupInfo); if (startupInfo.dwFlags & STARTF_USESHOWWINDOW && startupInfo.wShowWindow == SW_HIDE) { fForceShowWindow = TRUE; } dwWindowStyle |= WS_CAPTION; if (pScreenInfo->iResizeMode != resizeNotAllowed) dwWindowStyle |= WS_THICKFRAME | WS_MAXIMIZEBOX; } else dwWindowStyle |= WS_POPUP; /* Setup our window class */ wc.cbSize = sizeof(WNDCLASSEX); wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = winWindowProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = g_hInstance; wc.hIcon = pScreenInfo->hIcon; wc.hCursor = 0; wc.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = WINDOW_CLASS; wc.hIconSm = pScreenInfo->hIconSm; RegisterClassEx(&wc); /* Get size of work area */ winGetWorkArea(&rcWorkArea, pScreenInfo); /* Adjust for auto-hide taskbars */ winAdjustForAutoHide(&rcWorkArea, pScreenInfo); /* Did the user specify a position? */ if (pScreenInfo->fUserGavePosition) { iPosX = pScreenInfo->dwInitialX; iPosY = pScreenInfo->dwInitialY; } else { iPosX = rcWorkArea.left; iPosY = rcWorkArea.top; } /* Clean up the scrollbars flag, if necessary */ if ((!pScreenInfo->fDecoration || pScreenInfo->fRootless || pScreenInfo->fMultiWindow ) && (pScreenInfo->iResizeMode == resizeWithScrollbars)) { /* We cannot have scrollbars if we do not have a window border */ pScreenInfo->iResizeMode = resizeNotAllowed; } /* Did the user specify a height and width? */ if (pScreenInfo->fUserGaveHeightAndWidth) { /* User gave a desired height and width, try to accommodate */ #if CYGDEBUG winDebug("winCreateBoundingWindowWindowed - User gave height " "and width\n"); #endif /* Adjust the window width and height for borders and title bar */ if (pScreenInfo->fDecoration && !pScreenInfo->fRootless && !pScreenInfo->fMultiWindow ) { #if CYGDEBUG winDebug ("winCreateBoundingWindowWindowed - Window has decoration\n"); #endif /* Are we resizable */ if (pScreenInfo->iResizeMode != resizeNotAllowed) { #if CYGDEBUG winDebug ("winCreateBoundingWindowWindowed - Window is resizable\n"); #endif iWidth += 2 * GetSystemMetrics(SM_CXSIZEFRAME); iHeight += 2 * GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CYCAPTION); } else { #if CYGDEBUG winDebug ("winCreateBoundingWindowWindowed - Window is not resizable\n"); #endif iWidth += 2 * GetSystemMetrics(SM_CXFIXEDFRAME); iHeight += 2 * GetSystemMetrics(SM_CYFIXEDFRAME) + GetSystemMetrics(SM_CYCAPTION); } } } else { /* By default, we are creating a window that is as large as possible */ #if CYGDEBUG winDebug("winCreateBoundingWindowWindowed - User did not give " "height and width\n"); #endif /* Defaults are wrong if we have multiple monitors */ if (pScreenInfo->fMultipleMonitors) { iWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); iHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); } } /* Make sure window is no bigger than work area */ if (TRUE && !pScreenInfo->fMultiWindow ) { /* Trim window width to fit work area */ if (iWidth > (rcWorkArea.right - rcWorkArea.left)) iWidth = rcWorkArea.right - rcWorkArea.left; /* Trim window height to fit work area */ if (iHeight >= (rcWorkArea.bottom - rcWorkArea.top)) iHeight = rcWorkArea.bottom - rcWorkArea.top; #if CYGDEBUG winDebug("winCreateBoundingWindowWindowed - Adjusted width: %d " "height: %d\n", iWidth, iHeight); #endif } /* Set display and screen-specific tooltip text */ if (g_pszQueryHost != NULL) snprintf(szTitle, sizeof(szTitle), WINDOW_TITLE_XDMCP, g_pszQueryHost, display, (int) pScreenInfo->dwScreen); else snprintf(szTitle, sizeof(szTitle), WINDOW_TITLE, display, (int) pScreenInfo->dwScreen); /* Create the window */ *phwnd = CreateWindowExA(0, /* Extended styles */ WINDOW_CLASS, /* Class name */ szTitle, /* Window name */ dwWindowStyle, iPosX, /* Horizontal position */ iPosY, /* Vertical position */ iWidth, /* Right edge */ iHeight, /* Bottom edge */ (HWND) NULL, /* No parent or owner window */ (HMENU) NULL, /* No menu */ GetModuleHandle(NULL), /* Instance handle */ pScreenPriv); /* ScreenPrivates */ if (*phwnd == NULL) { ErrorF("winCreateBoundingWindowWindowed - CreateWindowEx () failed\n"); return FALSE; } #if CYGDEBUG winDebug("winCreateBoundingWindowWindowed - CreateWindowEx () returned\n"); #endif if (fForceShowWindow) { ErrorF ("winCreateBoundingWindowWindowed - Setting normal windowstyle\n"); ShowWindow(*phwnd, SW_SHOW); } /* Get the client area coordinates */ if (!GetClientRect(*phwnd, &rcClient)) { ErrorF("winCreateBoundingWindowWindowed - GetClientRect () " "failed\n"); return FALSE; } winDebug("winCreateBoundingWindowWindowed - WindowClient " "w %d h %d r %d l %d b %d t %d\n", (int)(rcClient.right - rcClient.left), (int)(rcClient.bottom - rcClient.top), (int)rcClient.right, (int)rcClient.left, (int)rcClient.bottom, (int)rcClient.top); /* We adjust the visual size if the user did not specify it */ if (! ((pScreenInfo->iResizeMode == resizeWithScrollbars) && pScreenInfo->fUserGaveHeightAndWidth)) { /* * User did not give a height and width with scrollbars enabled, * so we will resize the underlying visual to be as large as * the initial view port (page size). This way scrollbars will * not appear until the user shrinks the window, if they ever do. * * NOTE: We have to store the viewport size here because * the user may have an autohide taskbar, which would * cause the viewport size to be one less in one dimension * than the viewport size that we calculated by subtracting * the size of the borders and caption. */ pScreenInfo->dwWidth = rcClient.right - rcClient.left; pScreenInfo->dwHeight = rcClient.bottom - rcClient.top; } #if 0 /* * NOTE: For the uninitiated, the page size is the number of pixels * that we can display in the x or y direction at a time and the * range is the total number of pixels in the x or y direction that we * have available to display. In other words, the page size is the * size of the window area minus the space the caption, borders, and * scrollbars (if any) occupy, and the range is the size of the * underlying X visual. Notice that, contrary to what some of the * MSDN Library arcticles lead you to believe, the windows * ``client area'' size does not include the scrollbars. In other words, * the whole client area size that is reported to you is drawable by * you; you do not have to subtract the size of the scrollbars from * the client area size, and if you did it would result in the size * of the scrollbars being double counted. */ /* Setup scrollbar page and range, if scrollbars are enabled */ if (pScreenInfo->fScrollbars) { SCROLLINFO si; /* Initialize the scrollbar info structure */ si.cbSize = sizeof(si); si.fMask = SIF_RANGE | SIF_PAGE; si.nMin = 0; /* Setup the width range and page size */ si.nMax = pScreenInfo->dwWidth - 1; si.nPage = rcClient.right - rcClient.left; winDebug("winCreateBoundingWindowWindowed - HORZ nMax: %d nPage :%d\n", si.nMax, si.nPage); SetScrollInfo(*phwnd, SB_HORZ, &si, TRUE); /* Setup the height range and page size */ si.nMax = pScreenInfo->dwHeight - 1; si.nPage = rcClient.bottom - rcClient.top; winDebug("winCreateBoundingWindowWindowed - VERT nMax: %d nPage :%d\n", si.nMax, si.nPage); SetScrollInfo(*phwnd, SB_VERT, &si, TRUE); } #endif /* Show the window */ if (FALSE || pScreenInfo->fMultiWindow ) { pScreenPriv->fRootWindowShown = FALSE; ShowWindow(*phwnd, SW_HIDE); } else ShowWindow(*phwnd, SW_SHOWNORMAL); if (!UpdateWindow(*phwnd)) { ErrorF("winCreateBoundingWindowWindowed - UpdateWindow () failed\n"); return FALSE; } /* Attempt to bring our window to the top of the display */ if (TRUE && !pScreenInfo->fRootless && !pScreenInfo->fMultiWindow ) { if (!BringWindowToTop(*phwnd)) { ErrorF("winCreateBoundingWindowWindowed - BringWindowToTop () " "failed\n"); return FALSE; } } winDebug("winCreateBoundingWindowWindowed - Returning\n"); return TRUE; } /* * Find the work area of all attached monitors */ static Bool winGetWorkArea(RECT * prcWorkArea, winScreenInfo * pScreenInfo) { int iPrimaryWidth, iPrimaryHeight; int iWidth, iHeight; int iLeft, iTop; int iPrimaryNonWorkAreaWidth, iPrimaryNonWorkAreaHeight; /* Use GetMonitorInfo to get work area for monitor */ if (!pScreenInfo->fMultipleMonitors) { MONITORINFO mi; mi.cbSize = sizeof(MONITORINFO); if (GetMonitorInfo(pScreenInfo->hMonitor, &mi)) { *prcWorkArea = mi.rcWork; winDebug("winGetWorkArea - Monitor %d WorkArea: %d %d %d %d\n", pScreenInfo->iMonitor, (int) prcWorkArea->top, (int) prcWorkArea->left, (int) prcWorkArea->bottom, (int) prcWorkArea->right); } else { ErrorF("winGetWorkArea - GetMonitorInfo() failed for monitor %d\n", pScreenInfo->iMonitor); } /* Bail out here if we aren't using multiple monitors */ return TRUE; } /* SPI_GETWORKAREA only gets the work area of the primary screen. */ SystemParametersInfo(SPI_GETWORKAREA, 0, prcWorkArea, 0); winDebug("winGetWorkArea - Primary Monitor WorkArea: %d %d %d %d\n", (int) prcWorkArea->top, (int) prcWorkArea->left, (int) prcWorkArea->bottom, (int) prcWorkArea->right); /* Get size of full virtual screen */ iWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); iHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); winDebug("winGetWorkArea - Virtual screen is %d x %d\n", iWidth, iHeight); /* Get origin of full virtual screen */ iLeft = GetSystemMetrics(SM_XVIRTUALSCREEN); iTop = GetSystemMetrics(SM_YVIRTUALSCREEN); winDebug("winGetWorkArea - Virtual screen origin is %d, %d\n", iLeft, iTop); /* Get size of primary screen */ iPrimaryWidth = GetSystemMetrics(SM_CXSCREEN); iPrimaryHeight = GetSystemMetrics(SM_CYSCREEN); winDebug("winGetWorkArea - Primary screen is %d x %d\n", iPrimaryWidth, iPrimaryHeight); /* Work out how much of the primary screen we aren't using */ iPrimaryNonWorkAreaWidth = iPrimaryWidth - (prcWorkArea->right - prcWorkArea->left); iPrimaryNonWorkAreaHeight = iPrimaryHeight - (prcWorkArea->bottom - prcWorkArea->top); /* Update the rectangle to include all monitors */ if (iLeft < 0) { prcWorkArea->left = iLeft; } if (iTop < 0) { prcWorkArea->top = iTop; } prcWorkArea->right = prcWorkArea->left + iWidth - iPrimaryNonWorkAreaWidth; prcWorkArea->bottom = prcWorkArea->top + iHeight - iPrimaryNonWorkAreaHeight; winDebug("winGetWorkArea - Adjusted WorkArea for multiple " "monitors: %d %d %d %d\n", (int) prcWorkArea->top, (int) prcWorkArea->left, (int) prcWorkArea->bottom, (int) prcWorkArea->right); return TRUE; } static Bool winTaskbarOnScreenEdge(unsigned int uEdge, winScreenInfo * pScreenInfo) { APPBARDATA abd; HWND hwndAutoHide; ZeroMemory(&abd, sizeof(abd)); abd.cbSize = sizeof(abd); abd.uEdge = uEdge; hwndAutoHide = (HWND) SHAppBarMessage(ABM_GETAUTOHIDEBAR, &abd); if (hwndAutoHide != NULL) { /* Found an autohide taskbar on that edge, but is it on the same monitor as the screen window? */ if (pScreenInfo->fMultipleMonitors || (MonitorFromWindow(hwndAutoHide, MONITOR_DEFAULTTONULL) == pScreenInfo->hMonitor)) return TRUE; } return FALSE; } /* * Adjust the client area so that any auto-hide toolbars * will work correctly. */ static Bool winAdjustForAutoHide(RECT * prcWorkArea, winScreenInfo * pScreenInfo) { APPBARDATA abd; winDebug("winAdjustForAutoHide - Original WorkArea: %d %d %d %d\n", (int) prcWorkArea->top, (int) prcWorkArea->left, (int) prcWorkArea->bottom, (int) prcWorkArea->right); /* Find out if the Windows taskbar is set to auto-hide */ ZeroMemory(&abd, sizeof(abd)); abd.cbSize = sizeof(abd); if (SHAppBarMessage(ABM_GETSTATE, &abd) & ABS_AUTOHIDE) winDebug("winAdjustForAutoHide - Taskbar is auto hide\n"); /* Despite the forgoing, we are checking for any AppBar hiding along a monitor edge, not just the Windows TaskBar. */ /* Look for a TOP auto-hide taskbar */ if (winTaskbarOnScreenEdge(ABE_TOP, pScreenInfo)) { winDebug("winAdjustForAutoHide - Found TOP auto-hide taskbar\n"); prcWorkArea->top += 1; } /* Look for a LEFT auto-hide taskbar */ if (winTaskbarOnScreenEdge(ABE_LEFT, pScreenInfo)) { winDebug("winAdjustForAutoHide - Found LEFT auto-hide taskbar\n"); prcWorkArea->left += 1; } /* Look for a BOTTOM auto-hide taskbar */ if (winTaskbarOnScreenEdge(ABE_BOTTOM, pScreenInfo)) { winDebug("winAdjustForAutoHide - Found BOTTOM auto-hide taskbar\n"); prcWorkArea->bottom -= 1; } /* Look for a RIGHT auto-hide taskbar */ if (winTaskbarOnScreenEdge(ABE_RIGHT, pScreenInfo)) { winDebug("winAdjustForAutoHide - Found RIGHT auto-hide taskbar\n"); prcWorkArea->right -= 1; } winDebug("winAdjustForAutoHide - Adjusted WorkArea: %d %d %d %d\n", (int) prcWorkArea->top, (int) prcWorkArea->left, (int) prcWorkArea->bottom, (int) prcWorkArea->right); return TRUE; } xorg-server-21.1.16/hw/xwin/wincursor.c0000644000175000017500000004633514757411105013450 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" #include #include #include #include "misc.h" #define BRIGHTNESS(x) (x##Red * 0.299 + x##Green * 0.587 + x##Blue * 0.114) #if 0 #define WIN_DEBUG_MSG winDebug #else #define WIN_DEBUG_MSG(...) #endif /* * Local function prototypes */ static void winPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static Bool winCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y); static void winCrossScreen(ScreenPtr pScreen, Bool fEntering); miPointerScreenFuncRec g_winPointerCursorFuncs = { winCursorOffScreen, winCrossScreen, winPointerWarpCursor }; static void winPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { winScreenPriv(pScreen); RECT rcClient; static Bool s_fInitialWarp = TRUE; /* Discard first warp call */ if (s_fInitialWarp) { /* First warp moves mouse to center of window, just ignore it */ /* Don't ignore subsequent warps */ s_fInitialWarp = FALSE; winErrorFVerb(2, "winPointerWarpCursor - Discarding first warp: %d %d\n", x, y); return; } /* Only update the Windows cursor position if root window is active, or we are in a rootless mode */ if ((pScreenPriv->hwndScreen == GetForegroundWindow()) || pScreenPriv->pScreenInfo->fRootless || pScreenPriv->pScreenInfo->fMultiWindow ) { /* Get the client area coordinates */ GetClientRect(pScreenPriv->hwndScreen, &rcClient); /* Translate the client area coords to screen coords */ MapWindowPoints(pScreenPriv->hwndScreen, HWND_DESKTOP, (LPPOINT) &rcClient, 2); /* * Update the Windows cursor position so that we don't * immediately warp back to the current position. */ SetCursorPos(rcClient.left + x, rcClient.top + y); } /* Call the mi warp procedure to do the actual warping in X. */ miPointerWarpCursor(pDev, pScreen, x, y); } static Bool winCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { return FALSE; } static void winCrossScreen(ScreenPtr pScreen, Bool fEntering) { } static unsigned char reverse(unsigned char c) { int i; unsigned char ret = 0; for (i = 0; i < 8; ++i) { ret |= ((c >> i) & 1) << (7 - i); } return ret; } /* * Convert X cursor to Windows cursor * FIXME: Perhaps there are more smart code */ static HCURSOR winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) { winScreenPriv(pScreen); HCURSOR hCursor = NULL; unsigned char *pAnd; unsigned char *pXor; int nCX, nCY; int nBytes; double dForeY, dBackY; BOOL fReverse; HBITMAP hAnd, hXor; ICONINFO ii; unsigned char *pCur; unsigned char bit; HDC hDC; BITMAPV4HEADER bi; BITMAPINFO *pbmi; uint32_t *lpBits; WIN_DEBUG_MSG("winLoadCursor: Win32: %dx%d X11: %dx%d hotspot: %d,%d\n", pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy, pCursor->bits->width, pCursor->bits->height, pCursor->bits->xhot, pCursor->bits->yhot); /* We can use only White and Black, so calc brightness of color * Also check if the cursor is inverted */ dForeY = BRIGHTNESS(pCursor->fore); dBackY = BRIGHTNESS(pCursor->back); fReverse = dForeY < dBackY; /* Check whether the X11 cursor is bigger than the win32 cursor */ if (pScreenPriv->cursor.sm_cx < pCursor->bits->width || pScreenPriv->cursor.sm_cy < pCursor->bits->height) { winErrorFVerb(3, "winLoadCursor - Windows requires %dx%d cursor but X requires %dx%d\n", pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy, pCursor->bits->width, pCursor->bits->height); } /* Get the number of bytes required to store the whole cursor image * This is roughly (sm_cx * sm_cy) / 8 * round up to 8 pixel boundary so we can convert whole bytes */ nBytes = bits_to_bytes(pScreenPriv->cursor.sm_cx) * pScreenPriv->cursor.sm_cy; /* Get the effective width and height */ nCX = min(pScreenPriv->cursor.sm_cx, pCursor->bits->width); nCY = min(pScreenPriv->cursor.sm_cy, pCursor->bits->height); /* Allocate memory for the bitmaps */ pAnd = malloc(nBytes); memset(pAnd, 0xFF, nBytes); pXor = calloc(1, nBytes); /* Convert the X11 bitmap to a win32 bitmap * The first is for an empty mask */ if (pCursor->bits->emptyMask) { int x, y, xmax = bits_to_bytes(nCX); for (y = 0; y < nCY; ++y) for (x = 0; x < xmax; ++x) { int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + x; int nXPix = BitmapBytePad(pCursor->bits->width) * y + x; pAnd[nWinPix] = 0; if (fReverse) pXor[nWinPix] = reverse(~pCursor->bits->source[nXPix]); else pXor[nWinPix] = reverse(pCursor->bits->source[nXPix]); } } else { int x, y, xmax = bits_to_bytes(nCX); for (y = 0; y < nCY; ++y) for (x = 0; x < xmax; ++x) { int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + x; int nXPix = BitmapBytePad(pCursor->bits->width) * y + x; unsigned char mask = pCursor->bits->mask[nXPix]; pAnd[nWinPix] = reverse(~mask); if (fReverse) pXor[nWinPix] = reverse(~pCursor->bits->source[nXPix] & mask); else pXor[nWinPix] = reverse(pCursor->bits->source[nXPix] & mask); } } /* prepare the pointers */ hCursor = NULL; lpBits = NULL; /* We have a truecolor alpha-blended cursor and can use it! */ if (pCursor->bits->argb) { WIN_DEBUG_MSG("winLoadCursor: Trying truecolor alphablended cursor\n"); memset(&bi, 0, sizeof(BITMAPV4HEADER)); bi.bV4Size = sizeof(BITMAPV4HEADER); bi.bV4Width = pScreenPriv->cursor.sm_cx; bi.bV4Height = -(pScreenPriv->cursor.sm_cy); /* right-side up */ bi.bV4Planes = 1; bi.bV4BitCount = 32; bi.bV4V4Compression = BI_BITFIELDS; bi.bV4RedMask = 0x00FF0000; bi.bV4GreenMask = 0x0000FF00; bi.bV4BlueMask = 0x000000FF; bi.bV4AlphaMask = 0xFF000000; lpBits = calloc(pScreenPriv->cursor.sm_cx * pScreenPriv->cursor.sm_cy, sizeof(uint32_t)); if (lpBits) { int y; for (y = 0; y < nCY; y++) { void *src, *dst; src = &(pCursor->bits->argb[y * pCursor->bits->width]); dst = &(lpBits[y * pScreenPriv->cursor.sm_cx]); memcpy(dst, src, 4 * nCX); } } } /* End if-truecolor-icon */ if (!lpBits) { RGBQUAD *pbmiColors; /* Bicolor, use a palettized DIB */ WIN_DEBUG_MSG("winLoadCursor: Trying two color cursor\n"); pbmi = (BITMAPINFO *) &bi; pbmiColors = &(pbmi->bmiColors[0]); memset(pbmi, 0, sizeof(BITMAPINFOHEADER)); pbmi->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); pbmi->bmiHeader.biWidth = pScreenPriv->cursor.sm_cx; pbmi->bmiHeader.biHeight = -abs(pScreenPriv->cursor.sm_cy); /* right-side up */ pbmi->bmiHeader.biPlanes = 1; pbmi->bmiHeader.biBitCount = 8; pbmi->bmiHeader.biCompression = BI_RGB; pbmi->bmiHeader.biSizeImage = 0; pbmi->bmiHeader.biClrUsed = 3; pbmi->bmiHeader.biClrImportant = 3; pbmiColors[0].rgbRed = 0; /* Empty */ pbmiColors[0].rgbGreen = 0; pbmiColors[0].rgbBlue = 0; pbmiColors[0].rgbReserved = 0; pbmiColors[1].rgbRed = pCursor->backRed >> 8; /* Background */ pbmiColors[1].rgbGreen = pCursor->backGreen >> 8; pbmiColors[1].rgbBlue = pCursor->backBlue >> 8; pbmiColors[1].rgbReserved = 0; pbmiColors[2].rgbRed = pCursor->foreRed >> 8; /* Foreground */ pbmiColors[2].rgbGreen = pCursor->foreGreen >> 8; pbmiColors[2].rgbBlue = pCursor->foreBlue >> 8; pbmiColors[2].rgbReserved = 0; lpBits = calloc(pScreenPriv->cursor.sm_cx * pScreenPriv->cursor.sm_cy, 1); pCur = (unsigned char *) lpBits; if (lpBits) { int x, y; for (y = 0; y < pScreenPriv->cursor.sm_cy; y++) { for (x = 0; x < pScreenPriv->cursor.sm_cx; x++) { if (x >= nCX || y >= nCY) /* Outside of X11 icon bounds */ (*pCur++) = 0; else { /* Within X11 icon bounds */ int nWinPix = bits_to_bytes(pScreenPriv->cursor.sm_cx) * y + (x / 8); bit = pAnd[nWinPix]; bit = bit & (1 << (7 - (x & 7))); if (!bit) { /* Within the cursor mask? */ int nXPix = BitmapBytePad(pCursor->bits->width) * y + (x / 8); bit = ~reverse(~pCursor->bits-> source[nXPix] & pCursor->bits-> mask[nXPix]); bit = bit & (1 << (7 - (x & 7))); if (bit) /* Draw foreground */ (*pCur++) = 2; else /* Draw background */ (*pCur++) = 1; } else /* Outside the cursor mask */ (*pCur++) = 0; } } /* end for (x) */ } /* end for (y) */ } /* end if (lpbits) */ } /* If one of the previous two methods gave us the bitmap we need, make a cursor */ if (lpBits) { WIN_DEBUG_MSG("winLoadCursor: Creating bitmap cursor: hotspot %d,%d\n", pCursor->bits->xhot, pCursor->bits->yhot); hAnd = NULL; hXor = NULL; hAnd = CreateBitmap(pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy, 1, 1, pAnd); hDC = GetDC(NULL); if (hDC) { hXor = CreateCompatibleBitmap(hDC, pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy); SetDIBits(hDC, hXor, 0, pScreenPriv->cursor.sm_cy, lpBits, (BITMAPINFO *) &bi, DIB_RGB_COLORS); ReleaseDC(NULL, hDC); } free(lpBits); if (hAnd && hXor) { ii.fIcon = FALSE; ii.xHotspot = pCursor->bits->xhot; ii.yHotspot = pCursor->bits->yhot; ii.hbmMask = hAnd; ii.hbmColor = hXor; hCursor = (HCURSOR) CreateIconIndirect(&ii); if (hCursor == NULL) winW32Error(2, "winLoadCursor - CreateIconIndirect failed:"); else { if (GetIconInfo(hCursor, &ii)) { if (ii.fIcon) { WIN_DEBUG_MSG ("winLoadCursor: CreateIconIndirect returned no cursor. Trying again.\n"); DestroyCursor(hCursor); ii.fIcon = FALSE; ii.xHotspot = pCursor->bits->xhot; ii.yHotspot = pCursor->bits->yhot; hCursor = (HCURSOR) CreateIconIndirect(&ii); if (hCursor == NULL) winW32Error(2, "winLoadCursor - CreateIconIndirect failed:"); } /* GetIconInfo creates new bitmaps. Destroy them again */ if (ii.hbmMask) DeleteObject(ii.hbmMask); if (ii.hbmColor) DeleteObject(ii.hbmColor); } } } if (hAnd) DeleteObject(hAnd); if (hXor) DeleteObject(hXor); } if (!hCursor) { /* We couldn't make a color cursor for this screen, use black and white instead */ hCursor = CreateCursor(g_hInstance, pCursor->bits->xhot, pCursor->bits->yhot, pScreenPriv->cursor.sm_cx, pScreenPriv->cursor.sm_cy, pAnd, pXor); if (hCursor == NULL) winW32Error(2, "winLoadCursor - CreateCursor failed:"); } free(pAnd); free(pXor); return hCursor; } /* =========================================================================== Pointer sprite functions =========================================================================== */ /* * winRealizeCursor * Convert the X cursor representation to native format if possible. */ static Bool winRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { if (pCursor == NULL || pCursor->bits == NULL) return FALSE; /* FIXME: cache ARGB8888 representation? */ return TRUE; } /* * winUnrealizeCursor * Free the storage space associated with a realized cursor. */ static Bool winUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } /* * winSetCursor * Set the cursor sprite and position. */ static void winSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { POINT ptCurPos, ptTemp; HWND hwnd; RECT rcClient; BOOL bInhibit; winScreenPriv(pScreen); WIN_DEBUG_MSG("winSetCursor: cursor=%p\n", pCursor); /* Inhibit changing the cursor if the mouse is not in a client area */ bInhibit = FALSE; if (GetCursorPos(&ptCurPos)) { hwnd = WindowFromPoint(ptCurPos); if (hwnd) { if (GetClientRect(hwnd, &rcClient)) { ptTemp.x = rcClient.left; ptTemp.y = rcClient.top; if (ClientToScreen(hwnd, &ptTemp)) { rcClient.left = ptTemp.x; rcClient.top = ptTemp.y; ptTemp.x = rcClient.right; ptTemp.y = rcClient.bottom; if (ClientToScreen(hwnd, &ptTemp)) { rcClient.right = ptTemp.x; rcClient.bottom = ptTemp.y; if (!PtInRect(&rcClient, ptCurPos)) bInhibit = TRUE; } } } } } if (pCursor == NULL) { if (pScreenPriv->cursor.visible) { if (!bInhibit && g_fSoftwareCursor) ShowCursor(FALSE); pScreenPriv->cursor.visible = FALSE; } } else { if (pScreenPriv->cursor.handle) { if (!bInhibit) SetCursor(NULL); DestroyCursor(pScreenPriv->cursor.handle); pScreenPriv->cursor.handle = NULL; } pScreenPriv->cursor.handle = winLoadCursor(pScreen, pCursor, pScreen->myNum); WIN_DEBUG_MSG("winSetCursor: handle=%p\n", pScreenPriv->cursor.handle); if (!bInhibit) SetCursor(pScreenPriv->cursor.handle); if (!pScreenPriv->cursor.visible) { if (!bInhibit && g_fSoftwareCursor) ShowCursor(TRUE); pScreenPriv->cursor.visible = TRUE; } } } /* * winMoveCursor * Move the cursor. This is a noop for us. */ static void winMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { } static Bool winDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScr) { winScreenPriv(pScr); return pScreenPriv->cursor.spriteFuncs->DeviceCursorInitialize(pDev, pScr); } static void winDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScr) { winScreenPriv(pScr); pScreenPriv->cursor.spriteFuncs->DeviceCursorCleanup(pDev, pScr); } static miPointerSpriteFuncRec winSpriteFuncsRec = { winRealizeCursor, winUnrealizeCursor, winSetCursor, winMoveCursor, winDeviceCursorInitialize, winDeviceCursorCleanup }; /* =========================================================================== Other screen functions =========================================================================== */ /* * winCursorQueryBestSize * Handle queries for best cursor size */ static void winCursorQueryBestSize(int class, unsigned short *width, unsigned short *height, ScreenPtr pScreen) { winScreenPriv(pScreen); if (class == CursorShape) { *width = pScreenPriv->cursor.sm_cx; *height = pScreenPriv->cursor.sm_cy; } else { if (pScreenPriv->cursor.QueryBestSize) (*pScreenPriv->cursor.QueryBestSize) (class, width, height, pScreen); } } /* * winInitCursor * Initialize cursor support */ Bool winInitCursor(ScreenPtr pScreen) { winScreenPriv(pScreen); miPointerScreenPtr pPointPriv; /* override some screen procedures */ pScreenPriv->cursor.QueryBestSize = pScreen->QueryBestSize; pScreen->QueryBestSize = winCursorQueryBestSize; pPointPriv = (miPointerScreenPtr) dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); pScreenPriv->cursor.spriteFuncs = pPointPriv->spriteFuncs; pPointPriv->spriteFuncs = &winSpriteFuncsRec; pScreenPriv->cursor.handle = NULL; pScreenPriv->cursor.visible = FALSE; pScreenPriv->cursor.sm_cx = GetSystemMetrics(SM_CXCURSOR); pScreenPriv->cursor.sm_cy = GetSystemMetrics(SM_CYCURSOR); return TRUE; } xorg-server-21.1.16/hw/xwin/windialogs.c0000644000175000017500000004444114757411105013551 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II * Earle F. Philhower III */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include #include "winprefs.h" /* * Local function prototypes */ static INT_PTR CALLBACK winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK winChangeDepthDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK winAboutDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam); static void winDrawURLWindow(LPARAM lParam); static LRESULT CALLBACK winURLWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); static void winOverrideURLButton(HWND hdlg, int id); static void winUnoverrideURLButton(HWND hdlg, int id); /* * Owner-draw a button as a URL */ static void winDrawURLWindow(LPARAM lParam) { DRAWITEMSTRUCT *draw; char str[256]; RECT rect; HFONT font; COLORREF crText; draw = (DRAWITEMSTRUCT *) lParam; GetWindowText(draw->hwndItem, str, sizeof(str)); str[255] = 0; GetClientRect(draw->hwndItem, &rect); /* Color the button depending upon its state */ if (draw->itemState & ODS_SELECTED) crText = RGB(128 + 64, 0, 0); else if (draw->itemState & ODS_FOCUS) crText = RGB(0, 128 + 64, 0); else crText = RGB(0, 0, 128 + 64); SetTextColor(draw->hDC, crText); /* Create font 8 high, standard dialog font */ font = CreateFont(-8, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, 0, 0, 0, 0, 0, "MS Sans Serif"); if (!font) { ErrorF("winDrawURLWindow: Unable to create URL font, bailing.\n"); return; } /* Draw it */ SetBkMode(draw->hDC, OPAQUE); SelectObject(draw->hDC, font); DrawText(draw->hDC, str, strlen(str), &rect, DT_LEFT | DT_VCENTER); /* Delete the created font, replace it with stock font */ DeleteObject(SelectObject(draw->hDC, GetStockObject(ANSI_VAR_FONT))); } /* * WndProc for overridden buttons */ static LRESULT CALLBACK winURLWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { WNDPROC origCB = NULL; HCURSOR cursor; /* If it's a SetCursor message, tell it to the hand */ if (msg == WM_SETCURSOR) { cursor = LoadCursor(NULL, IDC_HAND); if (cursor) SetCursor(cursor); return TRUE; } origCB = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_USERDATA); /* Otherwise fall through to original WndProc */ if (origCB) return CallWindowProc(origCB, hwnd, msg, wParam, lParam); else return FALSE; } /* * Register and unregister the custom WndProc */ static void winOverrideURLButton(HWND hwnd, int id) { WNDPROC origCB; origCB = (WNDPROC) SetWindowLongPtr(GetDlgItem(hwnd, id), GWLP_WNDPROC, (LONG_PTR) winURLWndProc); SetWindowLongPtr(GetDlgItem(hwnd, id), GWLP_USERDATA, (LONG_PTR) origCB); } static void winUnoverrideURLButton(HWND hwnd, int id) { WNDPROC origCB; origCB = (WNDPROC) SetWindowLongPtr(GetDlgItem(hwnd, id), GWLP_USERDATA, 0); if (origCB) SetWindowLongPtr(GetDlgItem(hwnd, id), GWLP_WNDPROC, (LONG_PTR) origCB); } /* * Center a dialog window in the desktop window * and set small and large icons to X icons. */ static void winInitDialog(HWND hwndDlg) { HWND hwndDesk; RECT rc, rcDlg, rcDesk; HICON hIcon, hIconSmall; hwndDesk = GetParent(hwndDlg); if (!hwndDesk || IsIconic(hwndDesk)) hwndDesk = GetDesktopWindow(); /* Remove minimize and maximize buttons */ SetWindowLongPtr(hwndDlg, GWL_STYLE, GetWindowLongPtr(hwndDlg, GWL_STYLE) & ~(WS_MAXIMIZEBOX | WS_MINIMIZEBOX)); /* Set Window not to show in the task bar */ SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, GetWindowLongPtr(hwndDlg, GWL_EXSTYLE) & ~WS_EX_APPWINDOW); /* Center dialog window in the screen. Not done for multi-monitor systems, where * it is likely to end up split across the screens. In that case, it appears * near the Tray icon. */ if (GetSystemMetrics(SM_CMONITORS) > 1) { /* Still need to refresh the frame change. */ SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); } else { GetWindowRect(hwndDesk, &rcDesk); GetWindowRect(hwndDlg, &rcDlg); CopyRect(&rc, &rcDesk); OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top); OffsetRect(&rc, -rc.left, -rc.top); OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom); SetWindowPos(hwndDlg, HWND_TOPMOST, rcDesk.left + (rc.right / 2), rcDesk.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE | SWP_FRAMECHANGED); } if (g_hIconX) hIcon = g_hIconX; else hIcon = LoadIcon(g_hInstance, MAKEINTRESOURCE(IDI_XWIN)); if (g_hSmallIconX) hIconSmall = g_hSmallIconX; else hIconSmall = LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_SHARED); PostMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) hIcon); PostMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); } /* * Display the Exit dialog box */ void winDisplayExitDialog(winPrivScreenPtr pScreenPriv) { int i; int liveClients = 0; /* Count up running clients (clients[0] is serverClient) */ for (i = 1; i < currentMaxClients; i++) if (clients[i] != NullClient) liveClients++; /* Count down server internal clients */ if (pScreenPriv->pScreenInfo->fMultiWindow) liveClients -= 2; /* multiwindow window manager & XMsgProc */ if (g_fClipboardStarted) liveClients--; /* clipboard manager */ /* A user reported that this sometimes drops below zero. just eye-candy. */ if (liveClients < 0) liveClients = 0; /* Don't show the exit confirmation dialog if SilentExit & no clients, or ForceExit, is enabled */ if ((pref.fSilentExit && liveClients <= 0) || pref.fForceExit) { if (g_hDlgExit != NULL) { DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; } PostMessage(pScreenPriv->hwndScreen, WM_GIVEUP, 0, 0); return; } pScreenPriv->iConnectedClients = liveClients; /* Check if dialog already exists */ if (g_hDlgExit != NULL) { /* Dialog box already exists, display it */ ShowWindow(g_hDlgExit, SW_SHOWDEFAULT); /* User has lost the dialog. Show them where it is. */ SetForegroundWindow(g_hDlgExit); return; } /* Create dialog box */ g_hDlgExit = CreateDialogParam(g_hInstance, "EXIT_DIALOG", pScreenPriv->hwndScreen, winExitDlgProc, (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgExit, SW_SHOW); /* Needed to get keyboard controls (tab, arrows, enter, esc) to work */ SetForegroundWindow(g_hDlgExit); /* Set focus to the Cancel button */ PostMessage(g_hDlgExit, WM_NEXTDLGCTL, (WPARAM) GetDlgItem(g_hDlgExit, IDCANCEL), TRUE); } #define CONNECTED_CLIENTS_FORMAT "There %s currently %d client%s connected." /* * Exit dialog window procedure */ static INT_PTR CALLBACK winExitDlgProc(HWND hDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; /* Branch on message type */ switch (message) { case WM_INITDIALOG: { char *pszConnectedClients; /* Store pointers to private structures for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; winInitDialog(hDialog); /* Format the connected clients string */ if (asprintf(&pszConnectedClients, CONNECTED_CLIENTS_FORMAT, (s_pScreenPriv->iConnectedClients == 1) ? "is" : "are", s_pScreenPriv->iConnectedClients, (s_pScreenPriv->iConnectedClients == 1) ? "" : "s") == -1) return TRUE; /* Set the number of connected clients */ SetWindowText(GetDlgItem(hDialog, IDC_CLIENTS_CONNECTED), pszConnectedClients); free(pszConnectedClients); } return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: /* Send message to call the GiveUp function */ PostMessage(s_pScreenPriv->hwndScreen, WM_GIVEUP, 0, 0); DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); return TRUE; case IDCANCEL: DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); return TRUE; } break; case WM_MOUSEMOVE: case WM_NCMOUSEMOVE: /* Show the cursor if it is hidden */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } return TRUE; case WM_CLOSE: DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); return TRUE; } return FALSE; } /* * Display the Depth Change dialog box */ void winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv) { /* Check if dialog already exists */ if (g_hDlgDepthChange != NULL) { /* Dialog box already exists, display it */ ShowWindow(g_hDlgDepthChange, SW_SHOWDEFAULT); /* User has lost the dialog. Show them where it is. */ SetForegroundWindow(g_hDlgDepthChange); return; } /* * Display a notification to the user that the visual * will not be displayed until the Windows display depth * is restored to the original value. */ g_hDlgDepthChange = CreateDialogParam(g_hInstance, "DEPTH_CHANGE_BOX", pScreenPriv->hwndScreen, winChangeDepthDlgProc, (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgDepthChange, SW_SHOW); if (!g_hDlgDepthChange) ErrorF("winDisplayDepthChangeDialog - GetLastError: %d\n", (int) GetLastError()); /* Minimize the display window */ ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE); } /* * Process messages for the dialog that is displayed for * disruptive screen depth changes. */ static INT_PTR CALLBACK winChangeDepthDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; static winScreenInfo *s_pScreenInfo = NULL; #if CYGDEBUG winDebug("winChangeDepthDlgProc\n"); #endif /* Branch on message type */ switch (message) { case WM_INITDIALOG: #if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG\n"); #endif /* Store pointers to private structures for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; s_pScreenInfo = s_pScreenPriv->pScreenInfo; #if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG - s_pScreenPriv: %p, " "s_pScreenInfo: %p\n", s_pScreenPriv, s_pScreenInfo); #endif #if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_INITDIALOG - orig bpp: %u, " "current bpp: %d\n", (unsigned int)s_pScreenInfo->dwBPP, GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)); #endif winInitDialog(hwndDialog); return TRUE; case WM_DISPLAYCHANGE: #if CYGDEBUG winDebug("winChangeDepthDlgProc - WM_DISPLAYCHANGE - orig bpp: %u, " "new bpp: %d\n", (unsigned int)s_pScreenInfo->dwBPP, GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)); #endif /* Dismiss the dialog if the display returns to the original depth */ if (GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL) == s_pScreenInfo->dwBPP) { ErrorF("winChangeDelthDlgProc - wParam == s_pScreenInfo->dwBPP\n"); /* Depth has been restored, dismiss dialog */ DestroyWindow(g_hDlgDepthChange); g_hDlgDepthChange = NULL; /* Flag that we have a valid screen depth */ s_pScreenPriv->fBadDepth = FALSE; } return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: case IDCANCEL: winDebug("winChangeDepthDlgProc - WM_COMMAND - IDOK or IDCANCEL\n"); /* * User dismissed the dialog, hide it until the * display mode is restored. */ ShowWindow(g_hDlgDepthChange, SW_HIDE); return TRUE; } break; case WM_CLOSE: winDebug("winChangeDepthDlgProc - WM_CLOSE\n"); DestroyWindow(g_hDlgAbout); g_hDlgAbout = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); return TRUE; } return FALSE; } /* * Display the About dialog box */ void winDisplayAboutDialog(winPrivScreenPtr pScreenPriv) { /* Check if dialog already exists */ if (g_hDlgAbout != NULL) { /* Dialog box already exists, display it */ ShowWindow(g_hDlgAbout, SW_SHOWDEFAULT); /* User has lost the dialog. Show them where it is. */ SetForegroundWindow(g_hDlgAbout); return; } /* * Display the about box */ g_hDlgAbout = CreateDialogParam(g_hInstance, "ABOUT_BOX", pScreenPriv->hwndScreen, winAboutDlgProc, (LPARAM) pScreenPriv); /* Show the dialog box */ ShowWindow(g_hDlgAbout, SW_SHOW); /* Needed to get keyboard controls (tab, arrows, enter, esc) to work */ SetForegroundWindow(g_hDlgAbout); /* Set focus to the OK button */ PostMessage(g_hDlgAbout, WM_NEXTDLGCTL, (WPARAM) GetDlgItem(g_hDlgAbout, IDOK), TRUE); } /* * Process messages for the about dialog. */ static INT_PTR CALLBACK winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; #if CYGDEBUG winDebug("winAboutDlgProc\n"); #endif /* Branch on message type */ switch (message) { case WM_INITDIALOG: #if CYGDEBUG winDebug("winAboutDlgProc - WM_INITDIALOG\n"); #endif /* Store pointer to private structure for future use */ s_pScreenPriv = (winPrivScreenPtr) lParam; winInitDialog(hwndDialog); /* Override the URL buttons */ winOverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); return TRUE; case WM_DRAWITEM: /* Draw the URL buttons as needed */ winDrawURLWindow(lParam); return TRUE; case WM_MOUSEMOVE: case WM_NCMOUSEMOVE: /* Show the cursor if it is hidden */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDOK: case IDCANCEL: winDebug("winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL\n"); DestroyWindow(g_hDlgAbout); g_hDlgAbout = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); /* Restore window procedures for URL buttons */ winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); return TRUE; case ID_ABOUT_WEBSITE: { const char *pszPath = __VENDORDWEBSUPPORT__; INT_PTR iReturn; iReturn = (INT_PTR) ShellExecute(NULL, "open", pszPath, NULL, NULL, SW_MAXIMIZE); if (iReturn < 32) { ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_WEBSITE - " "ShellExecute failed: %d\n", (int)iReturn); } } return TRUE; } break; case WM_CLOSE: winDebug("winAboutDlgProc - WM_CLOSE\n"); DestroyWindow(g_hDlgAbout); g_hDlgAbout = NULL; /* Fix to make sure keyboard focus isn't trapped */ PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); /* Restore window procedures for URL buttons */ winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); return TRUE; } return FALSE; } xorg-server-21.1.16/hw/xwin/winengine.c0000644000175000017500000002026414757411105013371 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" /* * Global variables for function pointers into * dynamically loaded libraries */ FARPROC g_fpDirectDrawCreate = NULL; FARPROC g_fpDirectDrawCreateClipper = NULL; /* module handle for dynamically loaded directdraw library */ static HMODULE g_hmodDirectDraw = NULL; /* * Detect engines supported by current Windows version * DirectDraw version and hardware */ void winDetectSupportedEngines(void) { /* Initialize the engine support flags */ g_dwEnginesSupported = WIN_SERVER_SHADOW_GDI; /* Do we have DirectDraw? */ if (g_hmodDirectDraw != NULL) { LPDIRECTDRAW lpdd = NULL; LPDIRECTDRAW4 lpdd4 = NULL; HRESULT ddrval; /* Was the DirectDrawCreate function found? */ if (g_fpDirectDrawCreate == NULL) { /* No DirectDraw support */ return; } /* DirectDrawCreate exists, try to call it */ /* Create a DirectDraw object, store the address at lpdd */ ddrval = (*g_fpDirectDrawCreate) (NULL, (void **) &lpdd, NULL); if (FAILED(ddrval)) { /* No DirectDraw support */ winErrorFVerb(2, "winDetectSupportedEngines - DirectDraw not installed\n"); return; } /* Try to query for DirectDraw4 interface */ ddrval = IDirectDraw_QueryInterface(lpdd, &IID_IDirectDraw4, (LPVOID *) &lpdd4); if (SUCCEEDED(ddrval)) { /* We have DirectDraw4 */ winErrorFVerb(2, "winDetectSupportedEngines - DirectDraw4 installed, allowing ShadowDDNL\n"); g_dwEnginesSupported |= WIN_SERVER_SHADOW_DDNL; } /* Cleanup DirectDraw interfaces */ if (lpdd4 != NULL) IDirectDraw_Release(lpdd4); if (lpdd != NULL) IDirectDraw_Release(lpdd); } winErrorFVerb(2, "winDetectSupportedEngines - Returning, supported engines %08x\n", (unsigned int) g_dwEnginesSupported); } /* * Set the engine type, depending on the engines * supported for this screen, and whether the user * suggested an engine type */ Bool winSetEngine(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; HDC hdc; DWORD dwBPP; /* Get a DC */ hdc = GetDC(NULL); if (hdc == NULL) { ErrorF("winSetEngine - Couldn't get an HDC\n"); return FALSE; } /* * pScreenInfo->dwBPP may be 0 to indicate that the current screen * depth is to be used. Thus, we must query for the current display * depth here. */ dwBPP = GetDeviceCaps(hdc, BITSPIXEL); /* Release the DC */ ReleaseDC(NULL, hdc); hdc = NULL; /* ShadowGDI is the only engine that supports windowed PseudoColor */ if (dwBPP == 8 && !pScreenInfo->fFullScreen) { winErrorFVerb(2, "winSetEngine - Windowed && PseudoColor => ShadowGDI\n"); pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI; /* Set engine function pointers */ winSetEngineFunctionsShadowGDI(pScreen); return TRUE; } /* ShadowGDI is the only engine that supports Multi Window Mode */ if (FALSE || pScreenInfo->fMultiWindow ) { winErrorFVerb(2, "winSetEngine - Multi Window or Rootless => ShadowGDI\n"); pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI; /* Set engine function pointers */ winSetEngineFunctionsShadowGDI(pScreen); return TRUE; } /* If the user's choice is supported, we'll use that */ if (g_dwEnginesSupported & pScreenInfo->dwEnginePreferred) { winErrorFVerb(2, "winSetEngine - Using user's preference: %d\n", (int) pScreenInfo->dwEnginePreferred); pScreenInfo->dwEngine = pScreenInfo->dwEnginePreferred; /* Setup engine function pointers */ switch (pScreenInfo->dwEngine) { case WIN_SERVER_SHADOW_GDI: winSetEngineFunctionsShadowGDI(pScreen); break; case WIN_SERVER_SHADOW_DDNL: winSetEngineFunctionsShadowDDNL(pScreen); break; default: FatalError("winSetEngine - Invalid engine type\n"); } return TRUE; } /* ShadowDDNL has good performance, so why not */ if (g_dwEnginesSupported & WIN_SERVER_SHADOW_DDNL) { winErrorFVerb(2, "winSetEngine - Using Shadow DirectDraw NonLocking\n"); pScreenInfo->dwEngine = WIN_SERVER_SHADOW_DDNL; /* Set engine function pointers */ winSetEngineFunctionsShadowDDNL(pScreen); return TRUE; } /* ShadowGDI is next in line */ if (g_dwEnginesSupported & WIN_SERVER_SHADOW_GDI) { winErrorFVerb(2, "winSetEngine - Using Shadow GDI DIB\n"); pScreenInfo->dwEngine = WIN_SERVER_SHADOW_GDI; /* Set engine function pointers */ winSetEngineFunctionsShadowGDI(pScreen); return TRUE; } return FALSE; } /* * Get procedure addresses for DirectDrawCreate and DirectDrawCreateClipper */ Bool winGetDDProcAddresses(void) { Bool fReturn = TRUE; /* Load the DirectDraw library */ g_hmodDirectDraw = LoadLibraryEx("ddraw.dll", NULL, 0); if (g_hmodDirectDraw == NULL) { ErrorF("winGetDDProcAddresses - Could not load ddraw.dll\n"); fReturn = TRUE; goto winGetDDProcAddresses_Exit; } /* Try to get the DirectDrawCreate address */ g_fpDirectDrawCreate = GetProcAddress(g_hmodDirectDraw, "DirectDrawCreate"); if (g_fpDirectDrawCreate == NULL) { ErrorF("winGetDDProcAddresses - Could not get DirectDrawCreate " "address\n"); fReturn = TRUE; goto winGetDDProcAddresses_Exit; } /* Try to get the DirectDrawCreateClipper address */ g_fpDirectDrawCreateClipper = GetProcAddress(g_hmodDirectDraw, "DirectDrawCreateClipper"); if (g_fpDirectDrawCreateClipper == NULL) { ErrorF("winGetDDProcAddresses - Could not get " "DirectDrawCreateClipper address\n"); fReturn = FALSE; goto winGetDDProcAddresses_Exit; } /* * Note: Do not unload ddraw.dll here. Do it in GiveUp */ winGetDDProcAddresses_Exit: /* Unload the DirectDraw library if we failed to initialize */ if (!fReturn && g_hmodDirectDraw != NULL) { FreeLibrary(g_hmodDirectDraw); g_hmodDirectDraw = NULL; } return fReturn; } void winReleaseDDProcAddresses(void) { if (g_hmodDirectDraw != NULL) { FreeLibrary(g_hmodDirectDraw); g_hmodDirectDraw = NULL; g_fpDirectDrawCreate = NULL; g_fpDirectDrawCreateClipper = NULL; } } xorg-server-21.1.16/hw/xwin/winerror.c0000644000175000017500000001041314757411105013250 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include <../xfree86/common/xorgVersion.h> #include "win.h" #ifdef DDXOSVERRORF void OsVendorVErrorF(const char *pszFormat, va_list va_args) { /* make sure the clipboard and multiwindow threads do not interfere the * main thread */ static pthread_mutex_t s_pmPrinting = PTHREAD_MUTEX_INITIALIZER; /* Lock the printing mutex */ pthread_mutex_lock(&s_pmPrinting); /* Print the error message to a log file, could be stderr */ LogVWrite(0, pszFormat, va_args); /* Unlock the printing mutex */ pthread_mutex_unlock(&s_pmPrinting); } #endif /* * os/log.c:FatalError () calls our vendor ErrorF, so the message * from a FatalError will be logged. * * Attempt to do last-ditch, safe, important cleanup here. */ void OsVendorFatalError(const char *f, va_list args) { char errormsg[1024] = ""; /* Don't give duplicate warning if UseMsg was called */ if (g_fSilentFatalError) return; if (!g_fLogInited) { g_fLogInited = TRUE; g_pszLogFile = LogInit(g_pszLogFile, ".old"); } LogClose(EXIT_ERR_ABORT); /* Format the error message */ vsnprintf(errormsg, sizeof(errormsg), f, args); /* Sometimes the error message needs a bit of cosmetic cleaning up for use in a dialog box... */ { char *s; while ((s = strstr(errormsg, "\n\t")) != NULL) { s[0] = ' '; s[1] = '\n'; } } winMessageBoxF("A fatal error has occurred and " PROJECT_NAME " will now exit.\n\n" "%s\n\n" "Please open %s for more information.\n", MB_ICONERROR, errormsg, (g_pszLogFile ? g_pszLogFile : "the logfile")); } /* * winMessageBoxF - Print a formatted error message in a useful * message box. */ void winMessageBoxF(const char *pszError, UINT uType, ...) { char *pszErrorF = NULL; char *pszMsgBox = NULL; va_list args; int size; va_start(args, uType); size = vasprintf(&pszErrorF, pszError, args); va_end(args); if (size == -1) { pszErrorF = NULL; goto winMessageBoxF_Cleanup; } #define MESSAGEBOXF \ "%s\n" \ "Vendor: %s\n" \ "Release: %d.%d.%d.%d\n" \ "Contact: %s\n" \ "%s\n\n" \ "XWin was started with the following command-line:\n\n" \ "%s\n" size = asprintf(&pszMsgBox, MESSAGEBOXF, pszErrorF, XVENDORNAME, XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP, BUILDERADDR, BUILDERSTRING, g_pszCommandLine); if (size == -1) { pszMsgBox = NULL; goto winMessageBoxF_Cleanup; } /* Display the message box string */ MessageBox(NULL, pszMsgBox, PROJECT_NAME, MB_OK | uType); winMessageBoxF_Cleanup: free(pszErrorF); free(pszMsgBox); #undef MESSAGEBOXF } xorg-server-21.1.16/hw/xwin/winglobals.c0000644000175000017500000000610314757411105013543 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * General global variables */ int g_iNumScreens = 0; winScreenInfo *g_ScreenInfo = 0; #ifdef HAS_DEVWINDOWS int g_fdMessageQueue = WIN_FD_INVALID; #endif DevPrivateKeyRec g_iScreenPrivateKeyRec; DevPrivateKeyRec g_iCmapPrivateKeyRec; DevPrivateKeyRec g_iGCPrivateKeyRec; DevPrivateKeyRec g_iPixmapPrivateKeyRec; DevPrivateKeyRec g_iWindowPrivateKeyRec; unsigned long g_ulServerGeneration = 0; DWORD g_dwEnginesSupported = 0; HINSTANCE g_hInstance = 0; HWND g_hDlgDepthChange = NULL; HWND g_hDlgExit = NULL; HWND g_hDlgAbout = NULL; const char *g_pszQueryHost = NULL; Bool g_fXdmcpEnabled = FALSE; Bool g_fAuthEnabled = FALSE; Bool g_fCompositeAlpha = FALSE; HICON g_hIconX = NULL; HICON g_hSmallIconX = NULL; #ifndef RELOCATE_PROJECTROOT const char *g_pszLogFile = DEFAULT_LOGDIR "/XWin.%s.log"; #else const char *g_pszLogFile = "XWin.log"; Bool g_fLogFileChanged = FALSE; #endif int g_iLogVerbose = 2; Bool g_fLogInited = FALSE; char *g_pszCommandLine = NULL; Bool g_fSilentFatalError = FALSE; DWORD g_dwCurrentThreadID = 0; Bool g_fKeyboardHookLL = FALSE; Bool g_fNoHelpMessageBox = FALSE; Bool g_fSoftwareCursor = FALSE; Bool g_fNativeGl = TRUE; Bool g_fHostInTitle = TRUE; pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER; /* * Wrapped DIX functions */ winDispatchProcPtr winProcEstablishConnectionOrig = NULL; /* * Clipboard variables */ Bool g_fClipboard = TRUE; Bool g_fClipboardStarted = FALSE; /* * Re-initialize global variables that are invalidated * by a server reset. */ void winInitializeGlobals(void) { g_dwCurrentThreadID = GetCurrentThreadId(); } xorg-server-21.1.16/hw/xwin/winkeybd.c0000644000175000017500000004026114757411105013221 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winkeybd.h" #include "winconfig.h" #include "winmsg.h" #include "xkbsrv.h" /* C does not have a logical XOR operator, so we use a macro instead */ #define LOGICAL_XOR(a,b) ((!(a) && (b)) || ((a) && !(b))) static Bool g_winKeyState[NUM_KEYCODES]; /* * Local prototypes */ static void winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, void *pCtrl, int iClass); static void winKeybdCtrl(DeviceIntPtr pDevice, KeybdCtrl * pCtrl); /* * Translate a Windows WM_[SYS]KEY(UP/DOWN) message * into an ASCII scan code. * * We do this ourselves, rather than letting Windows handle it, * because Windows tends to munge the handling of special keys, * like AltGr on European keyboards. */ int winTranslateKey(WPARAM wParam, LPARAM lParam) { int iKeyFixup = g_iKeyMap[wParam * WIN_KEYMAP_COLS + 1]; int iKeyFixupEx = g_iKeyMap[wParam * WIN_KEYMAP_COLS + 2]; int iParam = HIWORD(lParam); int iParamScanCode = LOBYTE(iParam); int iScanCode; winDebug("winTranslateKey: wParam %08x lParam %08x\n", (int)wParam, (int)lParam); /* WM_ key messages faked by Vista speech recognition (WSR) don't have a * scan code. * * Vocola 3 (Rick Mohr's supplement to WSR) uses * System.Windows.Forms.SendKeys.SendWait(), which appears always to give a * scan code of 1 */ if (iParamScanCode <= 1) { if (VK_PRIOR <= wParam && wParam <= VK_DOWN) /* Trigger special case table to translate to extended * keycode, otherwise if num_lock is on, we can get keypad * numbers instead of navigation keys. */ iParam |= KF_EXTENDED; else iParamScanCode = MapVirtualKeyEx(wParam, /*MAPVK_VK_TO_VSC */ 0, GetKeyboardLayout(0)); } /* Branch on special extended, special non-extended, or normal key */ if ((iParam & KF_EXTENDED) && iKeyFixupEx) iScanCode = iKeyFixupEx; else if (iKeyFixup) iScanCode = iKeyFixup; else if (wParam == 0 && iParamScanCode == 0x70) iScanCode = KEY_HKTG; else switch (iParamScanCode) { case 0x70: iScanCode = KEY_HKTG; break; case 0x73: iScanCode = KEY_BSlash2; break; default: iScanCode = iParamScanCode; break; } return iScanCode; } /* Ring the keyboard bell (system speaker on PCs) */ static void winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, void *pCtrl, int iClass) { /* * We can't use Beep () here because it uses the PC speaker * on NT/2000. MessageBeep (MB_OK) will play the default system * sound on systems with a sound card or it will beep the PC speaker * on systems that do not have a sound card. */ if (iPercent > 0) MessageBeep(MB_OK); } /* Change some keyboard configuration parameters */ static void winKeybdCtrl(DeviceIntPtr pDevice, KeybdCtrl * pCtrl) { } /* * See Porting Layer Definition - p. 18 * winKeybdProc is known as a DeviceProc. */ int winKeybdProc(DeviceIntPtr pDeviceInt, int iState) { DevicePtr pDevice = (DevicePtr) pDeviceInt; XkbSrvInfoPtr xkbi; XkbControlsPtr ctrl; switch (iState) { case DEVICE_INIT: winConfigKeyboard(pDeviceInt); /* FIXME: Maybe we should use winGetKbdLeds () here? */ defaultKeyboardControl.leds = g_winInfo.keyboard.leds; winErrorFVerb(2, "Rules = \"%s\" Model = \"%s\" Layout = \"%s\"" " Variant = \"%s\" Options = \"%s\"\n", g_winInfo.xkb.rules ? g_winInfo.xkb.rules : "none", g_winInfo.xkb.model ? g_winInfo.xkb.model : "none", g_winInfo.xkb.layout ? g_winInfo.xkb.layout : "none", g_winInfo.xkb.variant ? g_winInfo.xkb.variant : "none", g_winInfo.xkb.options ? g_winInfo.xkb.options : "none"); InitKeyboardDeviceStruct(pDeviceInt, &g_winInfo.xkb, winKeybdBell, winKeybdCtrl); xkbi = pDeviceInt->key->xkbInfo; if ((xkbi != NULL) && (xkbi->desc != NULL)) { ctrl = xkbi->desc->ctrls; ctrl->repeat_delay = g_winInfo.keyboard.delay; ctrl->repeat_interval = 1000 / g_winInfo.keyboard.rate; } else { winErrorFVerb(1, "winKeybdProc - Error initializing keyboard AutoRepeat\n"); } break; case DEVICE_ON: pDevice->on = TRUE; // immediately copy the state of this keyboard device to the VCK // (which otherwise happens lazily after the first keypress) CopyKeyClass(pDeviceInt, inputInfo.keyboard); break; case DEVICE_CLOSE: case DEVICE_OFF: pDevice->on = FALSE; break; } return Success; } /* * Detect current mode key states upon server startup. * * Simulate a press and release of any key that is currently * toggled. */ void winInitializeModeKeyStates(void) { /* Restore NumLock */ if (GetKeyState(VK_NUMLOCK) & 0x0001) { winSendKeyEvent(KEY_NumLock, TRUE); winSendKeyEvent(KEY_NumLock, FALSE); } /* Restore CapsLock */ if (GetKeyState(VK_CAPITAL) & 0x0001) { winSendKeyEvent(KEY_CapsLock, TRUE); winSendKeyEvent(KEY_CapsLock, FALSE); } /* Restore ScrollLock */ if (GetKeyState(VK_SCROLL) & 0x0001) { winSendKeyEvent(KEY_ScrollLock, TRUE); winSendKeyEvent(KEY_ScrollLock, FALSE); } /* Restore KanaLock */ if (GetKeyState(VK_KANA) & 0x0001) { winSendKeyEvent(KEY_HKTG, TRUE); winSendKeyEvent(KEY_HKTG, FALSE); } } /* * Upon regaining the keyboard focus we must * resynchronize our internal mode key states * with the actual state of the keys. */ void winRestoreModeKeyStates(void) { DWORD dwKeyState; BOOL processEvents = TRUE; unsigned short internalKeyStates; /* X server is being initialized */ if (!inputInfo.keyboard || !inputInfo.keyboard->key) return; /* Only process events if the rootwindow is mapped. The keyboard events * will cause segfaults otherwise */ if (screenInfo.screens[0]->root && screenInfo.screens[0]->root->mapped == FALSE) processEvents = FALSE; /* Force to process all pending events in the mi event queue */ if (processEvents) mieqProcessInputEvents(); /* Read the mode key states of our X server */ /* (stored in the virtual core keyboard) */ internalKeyStates = XkbStateFieldFromRec(&inputInfo.keyboard->key->xkbInfo->state); winDebug("winRestoreModeKeyStates: state %d\n", internalKeyStates); /* Check if modifier keys are pressed, and if so, fake a press */ { BOOL lctrl = (GetAsyncKeyState(VK_LCONTROL) < 0); BOOL rctrl = (GetAsyncKeyState(VK_RCONTROL) < 0); BOOL lshift = (GetAsyncKeyState(VK_LSHIFT) < 0); BOOL rshift = (GetAsyncKeyState(VK_RSHIFT) < 0); BOOL alt = (GetAsyncKeyState(VK_LMENU) < 0); BOOL altgr = (GetAsyncKeyState(VK_RMENU) < 0); /* If AltGr and CtrlL appear to be pressed, assume the CtrL is a fake one */ if (lctrl && altgr) lctrl = FALSE; if (lctrl) winSendKeyEvent(KEY_LCtrl, TRUE); if (rctrl) winSendKeyEvent(KEY_RCtrl, TRUE); if (lshift) winSendKeyEvent(KEY_ShiftL, TRUE); if (rshift) winSendKeyEvent(KEY_ShiftL, TRUE); if (alt) winSendKeyEvent(KEY_Alt, TRUE); if (altgr) winSendKeyEvent(KEY_AltLang, TRUE); } /* Check if latching modifier key states have changed, and if so, fake a press and a release to toggle the modifier to the correct state */ dwKeyState = GetKeyState(VK_NUMLOCK) & 0x0001; if (LOGICAL_XOR(internalKeyStates & NumLockMask, dwKeyState)) { winSendKeyEvent(KEY_NumLock, TRUE); winSendKeyEvent(KEY_NumLock, FALSE); } dwKeyState = GetKeyState(VK_CAPITAL) & 0x0001; if (LOGICAL_XOR(internalKeyStates & LockMask, dwKeyState)) { winSendKeyEvent(KEY_CapsLock, TRUE); winSendKeyEvent(KEY_CapsLock, FALSE); } dwKeyState = GetKeyState(VK_SCROLL) & 0x0001; if (LOGICAL_XOR(internalKeyStates & ScrollLockMask, dwKeyState)) { winSendKeyEvent(KEY_ScrollLock, TRUE); winSendKeyEvent(KEY_ScrollLock, FALSE); } dwKeyState = GetKeyState(VK_KANA) & 0x0001; if (LOGICAL_XOR(internalKeyStates & KanaMask, dwKeyState)) { winSendKeyEvent(KEY_HKTG, TRUE); winSendKeyEvent(KEY_HKTG, FALSE); } /* For strict correctness, we should also press any non-modifier keys which are already down when we gain focus, but nobody has complained yet :-) */ } /* * Look for the lovely fake Control_L press/release generated by Windows * when AltGr is pressed/released on a non-U.S. keyboard. */ Bool winIsFakeCtrl_L(UINT message, WPARAM wParam, LPARAM lParam) { MSG msgNext; LONG lTime; Bool fReturn; static Bool lastWasControlL = FALSE; static LONG lastTime; /* * Fake Ctrl_L presses will be followed by an Alt_R press * with the same timestamp as the Ctrl_L press. */ if ((message == WM_KEYDOWN || message == WM_SYSKEYDOWN) && wParam == VK_CONTROL && (HIWORD(lParam) & KF_EXTENDED) == 0) { /* Got a Ctrl_L press */ /* Get time of current message */ lTime = GetMessageTime(); /* Look for next press message */ fReturn = PeekMessage(&msgNext, NULL, WM_KEYDOWN, WM_SYSKEYDOWN, PM_NOREMOVE); if (fReturn && msgNext.message != WM_KEYDOWN && msgNext.message != WM_SYSKEYDOWN) fReturn = 0; if (!fReturn) { lastWasControlL = TRUE; lastTime = lTime; } else { lastWasControlL = FALSE; } /* Is next press an Alt_R with the same timestamp? */ if (fReturn && msgNext.wParam == VK_MENU && msgNext.time == lTime && (HIWORD(msgNext.lParam) & KF_EXTENDED)) { /* * Next key press is Alt_R with same timestamp as current * Ctrl_L message. Therefore, this Ctrl_L press is a fake * event, so discard it. */ return TRUE; } } /* * Sometimes, the Alt_R press message is not yet posted when the * fake Ctrl_L press message arrives (even though it has the * same timestamp), so check for an Alt_R press message that has * arrived since the last Ctrl_L message. */ else if ((message == WM_KEYDOWN || message == WM_SYSKEYDOWN) && wParam == VK_MENU && (HIWORD(lParam) & KF_EXTENDED)) { /* Got a Alt_R press */ if (lastWasControlL) { lTime = GetMessageTime(); if (lastTime == lTime) { /* Undo the fake Ctrl_L press by sending a fake Ctrl_L release */ winSendKeyEvent(KEY_LCtrl, FALSE); } lastWasControlL = FALSE; } } /* * Fake Ctrl_L releases will be followed by an Alt_R release * with the same timestamp as the Ctrl_L release. */ else if ((message == WM_KEYUP || message == WM_SYSKEYUP) && wParam == VK_CONTROL && (HIWORD(lParam) & KF_EXTENDED) == 0) { /* Got a Ctrl_L release */ /* Get time of current message */ lTime = GetMessageTime(); /* Look for next release message */ fReturn = PeekMessage(&msgNext, NULL, WM_KEYUP, WM_SYSKEYUP, PM_NOREMOVE); if (fReturn && msgNext.message != WM_KEYUP && msgNext.message != WM_SYSKEYUP) fReturn = 0; lastWasControlL = FALSE; /* Is next press an Alt_R with the same timestamp? */ if (fReturn && (msgNext.message == WM_KEYUP || msgNext.message == WM_SYSKEYUP) && msgNext.wParam == VK_MENU && msgNext.time == lTime && (HIWORD(msgNext.lParam) & KF_EXTENDED)) { /* * Next key release is Alt_R with same timestamp as current * Ctrl_L message. Therefore, this Ctrl_L release is a fake * event, so discard it. */ return TRUE; } } else { /* On any other press or release message, we don't have a potentially fake Ctrl_L to worry about anymore... */ lastWasControlL = FALSE; } /* Not a fake control left press/release */ return FALSE; } /* * Lift any modifier keys that are pressed */ void winKeybdReleaseKeys(void) { int i; #ifdef HAS_DEVWINDOWS /* Verify that the mi input system has been initialized */ if (g_fdMessageQueue == WIN_FD_INVALID) return; #endif /* Loop through all keys */ for (i = 0; i < NUM_KEYCODES; ++i) { /* Pop key if pressed */ if (g_winKeyState[i]) winSendKeyEvent(i, FALSE); /* Reset pressed flag for keys */ g_winKeyState[i] = FALSE; } } /* * Take a raw X key code and send an up or down event for it. * * Thanks to VNC for inspiration, though it is a simple function. */ void winSendKeyEvent(DWORD dwKey, Bool fDown) { /* * When alt-tabing between screens we can get phantom key up messages * Here we only pass them through it we think we should! */ if (g_winKeyState[dwKey] == FALSE && fDown == FALSE) return; /* Update the keyState map */ g_winKeyState[dwKey] = fDown; QueueKeyboardEvents(g_pwinKeyboard, fDown ? KeyPress : KeyRelease, dwKey + MIN_KEYCODE); winDebug("winSendKeyEvent: dwKey: %u, fDown: %u\n", (unsigned int)dwKey, fDown); } BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam) { switch (wParam) { case VK_CONTROL: if ((lParam & 0x1ff0000) == 0x11d0000 && g_winKeyState[KEY_RCtrl]) return TRUE; if ((lParam & 0x1ff0000) == 0x01d0000 && g_winKeyState[KEY_LCtrl]) return TRUE; break; case VK_SHIFT: if ((lParam & 0x1ff0000) == 0x0360000 && g_winKeyState[KEY_ShiftR]) return TRUE; if ((lParam & 0x1ff0000) == 0x02a0000 && g_winKeyState[KEY_ShiftL]) return TRUE; break; default: return TRUE; } return FALSE; } /* Only one shift release message is sent even if both are pressed. * Fix this here */ void winFixShiftKeys(int iScanCode) { if (GetKeyState(VK_SHIFT) & 0x8000) return; if (iScanCode == KEY_ShiftL && g_winKeyState[KEY_ShiftR]) winSendKeyEvent(KEY_ShiftR, FALSE); if (iScanCode == KEY_ShiftR && g_winKeyState[KEY_ShiftL]) winSendKeyEvent(KEY_ShiftL, FALSE); } xorg-server-21.1.16/hw/xwin/winkeyhook.c0000644000175000017500000001132214757411105013570 /* *Copyright (C) 2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" static HHOOK g_hhookKeyboardLL = NULL; /* * Function prototypes */ static LRESULT CALLBACK winKeyboardMessageHookLL(int iCode, WPARAM wParam, LPARAM lParam); #ifndef LLKHF_EXTENDED #define LLKHF_EXTENDED 0x00000001 #endif #ifndef LLKHF_UP #define LLKHF_UP 0x00000080 #endif /* * KeyboardMessageHook */ static LRESULT CALLBACK winKeyboardMessageHookLL(int iCode, WPARAM wParam, LPARAM lParam) { BOOL fPassKeystroke = FALSE; BOOL fPassAltTab = TRUE; PKBDLLHOOKSTRUCT p = (PKBDLLHOOKSTRUCT) lParam; HWND hwnd = GetActiveWindow(); WindowPtr pWin = NULL; winPrivWinPtr pWinPriv = NULL; winPrivScreenPtr pScreenPriv = NULL; winScreenInfo *pScreenInfo = NULL; /* Check if the Windows window property for our X window pointer is valid */ if ((pWin = GetProp(hwnd, WIN_WINDOW_PROP)) != NULL) { /* Get a pointer to our window privates */ pWinPriv = winGetWindowPriv(pWin); /* Get pointers to our screen privates and screen info */ pScreenPriv = pWinPriv->pScreenPriv; pScreenInfo = pScreenPriv->pScreenInfo; if (pScreenInfo->fMultiWindow) fPassAltTab = FALSE; } /* Pass keystrokes on to our main message loop */ if (iCode == HC_ACTION) { winDebug("winKeyboardMessageHook: vkCode: %08x scanCode: %08x\n", (unsigned int)p->vkCode, (unsigned int)p->scanCode); switch (wParam) { case WM_KEYDOWN: case WM_SYSKEYDOWN: case WM_KEYUP: case WM_SYSKEYUP: fPassKeystroke = (fPassAltTab && (p->vkCode == VK_TAB) && ((p->flags & LLKHF_ALTDOWN) != 0)) || (p->vkCode == VK_LWIN) || (p->vkCode == VK_RWIN); break; } } /* * Pass message on to our main message loop. * We process this immediately with SendMessage so that the keystroke * appears in, hopefully, the correct order. */ if (fPassKeystroke) { LPARAM lParamKey = 0x0; /* Construct the lParam from KBDLLHOOKSTRUCT */ lParamKey = lParamKey | (0x0000FFFF & 0x00000001); /* Repeat count */ lParamKey = lParamKey | (0x00FF0000 & (p->scanCode << 16)); lParamKey = lParamKey | (0x01000000 & ((p->flags & LLKHF_EXTENDED) << 23)); lParamKey = lParamKey | (0x20000000 & ((p->flags & LLKHF_ALTDOWN) << 24)); lParamKey = lParamKey | (0x80000000 & ((p->flags & LLKHF_UP) << 24)); /* Send message to our main window that has the keyboard focus */ PostMessage(hwnd, (UINT) wParam, (WPARAM) p->vkCode, lParamKey); return 1; } /* Call next hook */ return CallNextHookEx(NULL, iCode, wParam, lParam); } /* * Attempt to install the keyboard hook, return FALSE if it was not installed */ Bool winInstallKeyboardHookLL(void) { /* Install the hook only once */ if (!g_hhookKeyboardLL) g_hhookKeyboardLL = SetWindowsHookEx(WH_KEYBOARD_LL, winKeyboardMessageHookLL, g_hInstance, 0); return TRUE; } /* * Remove the keyboard hook if it is installed */ void winRemoveKeyboardHookLL(void) { if (g_hhookKeyboardLL) UnhookWindowsHookEx(g_hhookKeyboardLL); g_hhookKeyboardLL = NULL; } xorg-server-21.1.16/hw/xwin/winmisc.c0000644000175000017500000000516314757411105013060 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * Count the number of one bits in a color mask. */ CARD8 winCountBits(DWORD dw) { DWORD dwBits = 0; while (dw) { dwBits += (dw & 1); dw >>= 1; } return dwBits; } /* * Modify the screen pixmap to point to the new framebuffer address */ Bool winUpdateFBPointer(ScreenPtr pScreen, void *pbits) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Location of shadow framebuffer has changed */ pScreenInfo->pfb = pbits; /* Update the screen pixmap */ if (!(*pScreen->ModifyPixmapHeader) (pScreen->devPrivate, pScreen->width, pScreen->height, pScreen->rootDepth, BitsPerPixel(pScreen->rootDepth), PixmapBytePad(pScreenInfo->dwStride, pScreenInfo->dwBPP), pScreenInfo->pfb)) { FatalError("winUpdateFramebufferPointer - Failed modifying " "screen pixmap\n"); } return TRUE; } xorg-server-21.1.16/hw/xwin/winmonitors.c0000644000175000017500000000451114757411105013773 /* Copyright 1993, 1998 The Open Group Copyright (C) Colin Harrison 2005-2008 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmonitors.h" /* * getMonitorInfo - callback function used to return information from the enumeration of monitors attached */ static WINBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data) { struct GetMonitorInfoData *data = (struct GetMonitorInfoData *) _data; // only get data for monitor number specified in data->monitorNum++; if (data->monitorNum == data->requestedMonitor) { data->bMonitorSpecifiedExists = TRUE; data->monitorOffsetX = rect->left; data->monitorOffsetY = rect->top; data->monitorHeight = rect->bottom - rect->top; data->monitorWidth = rect->right - rect->left; data->monitorHandle = hMonitor; return FALSE; } return TRUE; } Bool QueryMonitor(int i, struct GetMonitorInfoData *data) { /* prepare data */ if (data == NULL) return FALSE; memset(data, 0, sizeof(*data)); data->requestedMonitor = i; /* query information */ EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); return data->bMonitorSpecifiedExists; } xorg-server-21.1.16/hw/xwin/winmouse.c0000644000175000017500000002502614757411105013255 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "inputstr.h" #include "exevents.h" /* for button/axes labels */ #include "xserver-properties.h" #include "inpututils.h" /* Peek the internal button mapping */ static CARD8 const *g_winMouseButtonMap = NULL; /* * Local prototypes */ static void winMouseCtrl(DeviceIntPtr pDevice, PtrCtrl * pCtrl); static void winMouseCtrl(DeviceIntPtr pDevice, PtrCtrl * pCtrl) { } /* * See Porting Layer Definition - p. 18 * This is known as a DeviceProc */ int winMouseProc(DeviceIntPtr pDeviceInt, int iState) { int lngMouseButtons, i; int lngWheelEvents = 4; CARD8 *map; DevicePtr pDevice = (DevicePtr) pDeviceInt; Atom btn_labels[9]; Atom axes_labels[2]; switch (iState) { case DEVICE_INIT: /* Get number of mouse buttons */ lngMouseButtons = GetSystemMetrics(SM_CMOUSEBUTTONS); winMsg(X_PROBED, "%d mouse buttons found\n", lngMouseButtons); /* Mapping of windows events to X events: * LEFT:1 MIDDLE:2 RIGHT:3 * SCROLL_UP:4 SCROLL_DOWN:5 * TILT_LEFT:6 TILT_RIGHT:7 * XBUTTON 1:8 XBUTTON 2:9 (most commonly 'back' and 'forward') * ... * * The current Windows API only defines 2 extra buttons, so we don't * expect more than 5 buttons to be reported, but more than that * should be handled correctly */ /* * To map scroll wheel correctly we need at least the 3 normal buttons */ if (lngMouseButtons < 3) lngMouseButtons = 3; /* allocate memory: * number of buttons + 4 x mouse wheel event + 1 extra (offset for map) */ map = malloc(sizeof(CARD8) * (lngMouseButtons + lngWheelEvents + 1)); /* initialize button map */ map[0] = 0; for (i = 1; i <= lngMouseButtons + lngWheelEvents; i++) map[i] = i; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); btn_labels[7] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_BACK); btn_labels[8] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_FORWARD); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); InitPointerDeviceStruct(pDevice, map, lngMouseButtons + lngWheelEvents, btn_labels, winMouseCtrl, GetMotionHistorySize(), 2, axes_labels); free(map); g_winMouseButtonMap = pDeviceInt->button->map; break; case DEVICE_ON: pDevice->on = TRUE; break; case DEVICE_CLOSE: g_winMouseButtonMap = NULL; case DEVICE_OFF: pDevice->on = FALSE; break; } return Success; } /* Handle the mouse wheel */ int winMouseWheel(int *iTotalDeltaZ, int iDeltaZ, int iButtonUp, int iButtonDown) { int button; /* Do we have any previous delta stored? */ if ((*iTotalDeltaZ > 0 && iDeltaZ > 0) || (*iTotalDeltaZ < 0 && iDeltaZ < 0)) { /* Previous delta and of same sign as current delta */ iDeltaZ += *iTotalDeltaZ; *iTotalDeltaZ = 0; } else { /* * Previous delta of different sign, or zero. * We will set it to zero for either case, * as blindly setting takes just as much time * as checking, then setting if necessary :) */ *iTotalDeltaZ = 0; } /* * Only process this message if the wheel has moved further than * WHEEL_DELTA */ if (iDeltaZ >= WHEEL_DELTA || (-1 * iDeltaZ) >= WHEEL_DELTA) { *iTotalDeltaZ = 0; /* Figure out how many whole deltas of the wheel we have */ iDeltaZ /= WHEEL_DELTA; } else { /* * Wheel has not moved past WHEEL_DELTA threshold; * we will store the wheel delta until the threshold * has been reached. */ *iTotalDeltaZ = iDeltaZ; return 0; } /* Set the button to indicate up or down wheel delta */ if (iDeltaZ > 0) { button = iButtonUp; } else { button = iButtonDown; } /* * Flip iDeltaZ to positive, if negative, * because always need to generate a *positive* number of * button clicks for the Z axis. */ if (iDeltaZ < 0) { iDeltaZ *= -1; } /* Generate X input messages for each wheel delta we have seen */ while (iDeltaZ--) { /* Push the wheel button */ winMouseButtonsSendEvent(ButtonPress, button); /* Release the wheel button */ winMouseButtonsSendEvent(ButtonRelease, button); } return 0; } /* * Enqueue a mouse button event */ void winMouseButtonsSendEvent(int iEventType, int iButton) { ValuatorMask mask; if (g_winMouseButtonMap) iButton = g_winMouseButtonMap[iButton]; valuator_mask_zero(&mask); QueuePointerEvents(g_pwinPointer, iEventType, iButton, POINTER_RELATIVE, &mask); #if CYGDEBUG ErrorF("winMouseButtonsSendEvent: iEventType: %d, iButton: %d\n", iEventType, iButton); #endif } /* * Decide what to do with a Windows mouse message */ int winMouseButtonsHandle(ScreenPtr pScreen, int iEventType, int iButton, WPARAM wParam) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Send button events right away if emulate 3 buttons is off */ if (pScreenInfo->iE3BTimeout == WIN_E3B_OFF) { /* Emulate 3 buttons is off, send the button event */ winMouseButtonsSendEvent(iEventType, iButton); return 0; } /* Emulate 3 buttons is on, let the fun begin */ if (iEventType == ButtonPress && pScreenPriv->iE3BCachedPress == 0 && !pScreenPriv->fE3BFakeButton2Sent) { /* * Button was pressed, no press is cached, * and there is no fake button 2 release pending. */ /* Store button press type */ pScreenPriv->iE3BCachedPress = iButton; /* * Set a timer to send this button press if the other button * is not pressed within the timeout time. */ SetTimer(pScreenPriv->hwndScreen, WIN_E3B_TIMER_ID, pScreenInfo->iE3BTimeout, NULL); } else if (iEventType == ButtonPress && pScreenPriv->iE3BCachedPress != 0 && pScreenPriv->iE3BCachedPress != iButton && !pScreenPriv->fE3BFakeButton2Sent) { /* * Button press is cached, other button was pressed, * and there is no fake button 2 release pending. */ /* Mouse button was cached and other button was pressed */ KillTimer(pScreenPriv->hwndScreen, WIN_E3B_TIMER_ID); pScreenPriv->iE3BCachedPress = 0; /* Send fake middle button */ winMouseButtonsSendEvent(ButtonPress, Button2); /* Indicate that a fake middle button event was sent */ pScreenPriv->fE3BFakeButton2Sent = TRUE; } else if (iEventType == ButtonRelease && pScreenPriv->iE3BCachedPress == iButton) { /* * Cached button was released before timer ran out, * and before the other mouse button was pressed. */ KillTimer(pScreenPriv->hwndScreen, WIN_E3B_TIMER_ID); pScreenPriv->iE3BCachedPress = 0; /* Send cached press, then send release */ winMouseButtonsSendEvent(ButtonPress, iButton); winMouseButtonsSendEvent(ButtonRelease, iButton); } else if (iEventType == ButtonRelease && pScreenPriv->fE3BFakeButton2Sent && !(wParam & MK_LBUTTON) && !(wParam & MK_RBUTTON)) { /* * Fake button 2 was sent and both mouse buttons have now been released */ pScreenPriv->fE3BFakeButton2Sent = FALSE; /* Send middle mouse button release */ winMouseButtonsSendEvent(ButtonRelease, Button2); } else if (iEventType == ButtonRelease && pScreenPriv->iE3BCachedPress == 0 && !pScreenPriv->fE3BFakeButton2Sent) { /* * Button was release, no button is cached, * and there is no fake button 2 release is pending. */ winMouseButtonsSendEvent(ButtonRelease, iButton); } return 0; } /** * Enqueue a motion event. * */ void winEnqueueMotion(int x, int y) { int valuators[2]; ValuatorMask mask; valuators[0] = x; valuators[1] = y; valuator_mask_set_range(&mask, 0, 2, valuators); QueuePointerEvents(g_pwinPointer, MotionNotify, 0, POINTER_ABSOLUTE | POINTER_SCREEN, &mask); } xorg-server-21.1.16/hw/xwin/winmsg.c0000644000175000017500000001037314757411105012712 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Alexander Gottwald */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" #if CYGDEBUG #include "winmessages.h" #endif #include #ifdef XWIN_XF86CONFIG void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, 0, format, ap); va_end(ap); } void winDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, verb, format, ap); va_end(ap); } #endif void winErrorFVerb(int verb, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(X_NONE, verb, format, ap); va_end(ap); } void winDebug(const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(X_NONE, 3, format, ap); va_end(ap); } void winTrace(const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(X_NONE, 10, format, ap); va_end(ap); } void winW32Error(int verb, const char *msg) { winW32ErrorEx(verb, msg, GetLastError()); } void winW32ErrorEx(int verb, const char *msg, DWORD errorcode) { LPVOID buffer; if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errorcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buffer, 0, NULL)) { winErrorFVerb(verb, "Unknown error in FormatMessage!\n"); } else { winErrorFVerb(verb, "%s %s", msg, (char *) buffer); LocalFree(buffer); } } #if CYGDEBUG void winDebugWin32Message(const char *function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static int force = 0; if (message >= WM_USER) { if (force || getenv("WIN_DEBUG_MESSAGES") || getenv("WIN_DEBUG_WM_USER")) { winDebug("%s - Message WM_USER + %d\n", function, message - WM_USER); winDebug("\thwnd 0x%p wParam 0x%x lParam 0x%x\n", hwnd, (int)wParam, (int)lParam); } } else if (message < MESSAGE_NAMES_LEN && MESSAGE_NAMES[message]) { const char *msgname = MESSAGE_NAMES[message]; char buffer[64]; snprintf(buffer, sizeof(buffer), "WIN_DEBUG_%s", msgname); buffer[63] = 0; if (force || getenv("WIN_DEBUG_MESSAGES") || getenv(buffer)) { winDebug("%s - Message %s\n", function, MESSAGE_NAMES[message]); winDebug("\thwnd 0x%p wParam 0x%x lParam 0x%x\n", hwnd, (int)wParam, (int)lParam); } } } #else void winDebugWin32Message(const char *function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { } #endif xorg-server-21.1.16/hw/xwin/winmsgwindow.c0000644000175000017500000001360314757411105014141 /* * Copyright (C) Jon TURNEY 2011 * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * This is the messaging window, a hidden top-level window. We never do anything * with it, but other programs may send messages to it. */ /* * winMsgWindowProc - Window procedure for msg window */ static LRESULT CALLBACK winMsgWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { #if CYGDEBUG winDebugWin32Message("winMsgWindowProc", hwnd, message, wParam, lParam); #endif switch (message) { case WM_ENDSESSION: if (!wParam) return 0; /* shutdown is being cancelled */ /* Send a WM_GIVEUP message to the X server thread so it wakes up if blocked in select(), performs GiveUp(), and then notices that GiveUp() has set the DE_TERMINATE flag so exits the msg dispatch loop. */ { ScreenPtr pScreen = screenInfo.screens[0]; winScreenPriv(pScreen); PostMessage(pScreenPriv->hwndScreen, WM_GIVEUP, 0, 0); } /* This process will be terminated by the system almost immediately after the last thread with a message queue returns from processing WM_ENDSESSION, so we cannot rely on any code executing after this message is processed and need to wait here until ddxGiveUp() is called and releases the termination mutex to guarantee that the lock file and unix domain sockets have been removed ofc, Microsoft doesn't document this under WM_ENDSESSION, you are supposed to read the source of CRSS to find out how it works :-) http://blogs.msdn.com/b/michen/archive/2008/04/04/application-termination-when-user-logs-off.aspx */ { int iReturn = pthread_mutex_lock(&g_pmTerminating); if (iReturn != 0) { ErrorF("winMsgWindowProc - pthread_mutex_lock () failed: %d\n", iReturn); } winDebug ("winMsgWindowProc - WM_ENDSESSION termination lock acquired\n"); } return 0; } return DefWindowProc(hwnd, message, wParam, lParam); } static HWND winCreateMsgWindow(void) { HWND hwndMsg; // register window class { WNDCLASSEX wcx; wcx.cbSize = sizeof(WNDCLASSEX); wcx.style = CS_HREDRAW | CS_VREDRAW; wcx.lpfnWndProc = winMsgWindowProc; wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; wcx.hInstance = g_hInstance; wcx.hIcon = NULL; wcx.hCursor = 0; wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wcx.lpszMenuName = NULL; wcx.lpszClassName = WINDOW_CLASS_X_MSG; wcx.hIconSm = NULL; RegisterClassEx(&wcx); } // Create the msg window. hwndMsg = CreateWindowEx(0, // no extended styles WINDOW_CLASS_X_MSG, // class name "XWin Msg Window", // window name WS_OVERLAPPEDWINDOW, // overlapped window CW_USEDEFAULT, // default horizontal position CW_USEDEFAULT, // default vertical position CW_USEDEFAULT, // default width CW_USEDEFAULT, // default height (HWND) NULL, // no parent or owner window (HMENU) NULL, // class menu used GetModuleHandle(NULL), // instance handle NULL); // no window creation data if (!hwndMsg) { ErrorF("winCreateMsgWindow - Create msg window failed\n"); return NULL; } winDebug("winCreateMsgWindow - Created msg window hwnd 0x%p\n", hwndMsg); return hwndMsg; } static void * winMsgWindowThreadProc(void *arg) { HWND hwndMsg; winDebug("winMsgWindowThreadProc - Hello\n"); hwndMsg = winCreateMsgWindow(); if (hwndMsg) { MSG msg; /* Pump the msg window message queue */ while (GetMessage(&msg, hwndMsg, 0, 0) > 0) { #if CYGDEBUG winDebugWin32Message("winMsgWindowThread", msg.hwnd, msg.message, msg.wParam, msg.lParam); #endif DispatchMessage(&msg); } } winDebug("winMsgWindowThreadProc - Exit\n"); return NULL; } Bool winCreateMsgWindowThread(void) { pthread_t ptMsgWindowThreadProc; /* Spawn a thread for the msg window */ if (pthread_create(&ptMsgWindowThreadProc, NULL, winMsgWindowThreadProc, NULL)) { /* Bail if thread creation failed */ ErrorF("winCreateMsgWindow - pthread_create failed.\n"); return FALSE; } return TRUE; } xorg-server-21.1.16/hw/xwin/winmultiwindowclass.c0000644000175000017500000001741414757411105015537 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Earle F. Philhower, III */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include "propertyst.h" #include "windowstr.h" #include "winmultiwindowclass.h" #include "win.h" /* * Local function */ DEFINE_ATOM_HELPER(AtmWmWindowRole, "WM_WINDOW_ROLE") int winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class) { struct _Window *pwin; struct _Property *prop; int len_name, len_class; if (!pWin || !res_name || !res_class) { ErrorF("winMultiWindowGetClassHint - pWin, res_name, or res_class was " "NULL\n"); return 0; } pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; *res_name = *res_class = NULL; while (prop) { if (prop->propertyName == XA_WM_CLASS && prop->type == XA_STRING && prop->format == 8 && prop->data) { /* WM_CLASS property should consist of 2 null terminated strings, but we must handle the cases when one or both is absent or not null terminated */ len_name = strlen((char *) prop->data); if (len_name > prop->size) len_name = prop->size; (*res_name) = malloc(len_name + 1); if (!*res_name) { ErrorF("winMultiWindowGetClassHint - *res_name was NULL\n"); return 0; } /* Copy name and ensure null terminated */ strncpy((*res_name), prop->data, len_name); (*res_name)[len_name] = '\0'; /* Compute length of class name, it could be that it is absent or not null terminated */ len_class = (len_name >= prop->size) ? 0 : (strlen(((char *) prop->data) + 1 + len_name)); if (len_class > prop->size - 1 - len_name) len_class = prop->size - 1 - len_name; (*res_class) = malloc(len_class + 1); if (!*res_class) { ErrorF("winMultiWindowGetClassHint - *res_class was NULL\n"); /* Free the previously allocated res_name */ free(*res_name); return 0; } /* Copy class name and ensure null terminated */ strncpy((*res_class), ((char *) prop->data) + 1 + len_name, len_class); (*res_class)[len_class] = '\0'; return 1; } else prop = prop->next; } return 0; } int winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints) { struct _Window *pwin; struct _Property *prop; if (!pWin || !hints) { ErrorF("winMultiWindowGetWMHints - pWin or hints was NULL\n"); return 0; } pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; memset(hints, 0, sizeof(WinXWMHints)); while (prop) { if (prop->propertyName == XA_WM_HINTS && prop->data) { memcpy(hints, prop->data, sizeof(WinXWMHints)); return 1; } else prop = prop->next; } return 0; } int winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role) { struct _Window *pwin; struct _Property *prop; int len_role; if (!pWin || !res_role) return 0; pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; *res_role = NULL; while (prop) { if (prop->propertyName == AtmWmWindowRole() && prop->type == XA_STRING && prop->format == 8 && prop->data) { len_role = prop->size; (*res_role) = malloc(len_role + 1); if (!*res_role) { ErrorF("winMultiWindowGetWindowRole - *res_role was NULL\n"); return 0; } strncpy((*res_role), prop->data, len_role); (*res_role)[len_role] = 0; return 1; } else prop = prop->next; } return 0; } int winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints) { struct _Window *pwin; struct _Property *prop; if (!pWin || !hints) { ErrorF("winMultiWindowGetWMNormalHints - pWin or hints was NULL\n"); return 0; } pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; memset(hints, 0, sizeof(WinXSizeHints)); while (prop) { if (prop->propertyName == XA_WM_NORMAL_HINTS && prop->data) { memcpy(hints, prop->data, sizeof(WinXSizeHints)); return 1; } else prop = prop->next; } return 0; } int winMultiWindowGetTransientFor(WindowPtr pWin, Window *pDaddyId) { struct _Window *pwin; struct _Property *prop; if (!pWin) { ErrorF("winMultiWindowGetTransientFor - pWin was NULL\n"); return 0; } pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; if (pDaddyId) *pDaddyId = 0; while (prop) { if (prop->propertyName == XA_WM_TRANSIENT_FOR) { if (pDaddyId) memcpy(pDaddyId, prop->data, sizeof(Window)); return 1; } else prop = prop->next; } return 0; } int winMultiWindowGetWMName(WindowPtr pWin, char **wmName) { struct _Window *pwin; struct _Property *prop; int len_name; if (!pWin || !wmName) { ErrorF("winMultiWindowGetClassHint - pWin, res_name, or res_class was " "NULL\n"); return 0; } pwin = (struct _Window *) pWin; if (pwin->optional) prop = (struct _Property *) pwin->optional->userProps; else prop = NULL; *wmName = NULL; while (prop) { if (prop->propertyName == XA_WM_NAME && prop->type == XA_STRING && prop->data) { len_name = prop->size; (*wmName) = malloc(len_name + 1); if (!*wmName) { ErrorF("winMultiWindowGetWMName - *wmName was NULL\n"); return 0; } strncpy((*wmName), prop->data, len_name); (*wmName)[len_name] = 0; return 1; } else prop = prop->next; } return 0; } xorg-server-21.1.16/hw/xwin/winmultiwindowicons.c0000644000175000017500000005474214757411105015552 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Earle F. Philhower, III */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #ifndef WINVER #define WINVER 0x0500 #endif #include #include #include #include #include #include #include "winresource.h" #include "winprefs.h" #include "winmsg.h" #include "winmultiwindowicons.h" #include "winglobals.h" /* * global variables */ extern HINSTANCE g_hInstance; /* * Scale an X icon ZPixmap into a Windoze icon bitmap */ static void winScaleXImageToWindowsIcon(int iconSize, int effBPP, int stride, xcb_image_t* pixmap, unsigned char *image) { int row, column, effXBPP, effXDepth; unsigned char *outPtr; unsigned char *iconData = 0; int xStride; float factX, factY; int posX, posY; unsigned char *ptr; unsigned int zero; unsigned int color; effXBPP = pixmap->bpp; if (pixmap->bpp == 15) effXBPP = 16; effXDepth = pixmap->depth; if (pixmap->depth == 15) effXDepth = 16; xStride = pixmap->stride; if (stride == 0 || xStride == 0) { ErrorF("winScaleXBitmapToWindows - stride or xStride is zero. " "Bailing.\n"); return; } /* Get icon data */ iconData = (unsigned char *) pixmap->data; /* Keep aspect ratio */ factX = ((float) pixmap->width) / ((float) iconSize); factY = ((float) pixmap->height) / ((float) iconSize); if (factX > factY) factY = factX; else factX = factY; /* Out-of-bounds, fill icon with zero */ zero = 0; for (row = 0; row < iconSize; row++) { outPtr = image + stride * row; for (column = 0; column < iconSize; column++) { posX = factX * column; posY = factY * row; ptr = (unsigned char *) iconData + posY * xStride; if (effXBPP == 1) { ptr += posX / 8; /* Out of X icon bounds, leave space blank */ if (posX >= pixmap->width || posY >= pixmap->height) ptr = (unsigned char *) &zero; if ((*ptr) & (1 << (posX & 7))) switch (effBPP) { case 32: *(outPtr++) = 0; case 24: *(outPtr++) = 0; case 16: *(outPtr++) = 0; case 8: *(outPtr++) = 0; break; case 1: outPtr[column / 8] &= ~(1 << (7 - (column & 7))); break; } else switch (effBPP) { case 32: *(outPtr++) = 255; *(outPtr++) = 255; *(outPtr++) = 255; *(outPtr++) = 0; break; case 24: *(outPtr++) = 255; case 16: *(outPtr++) = 255; case 8: *(outPtr++) = 255; break; case 1: outPtr[column / 8] |= (1 << (7 - (column & 7))); break; } } else if (effXDepth == 24 || effXDepth == 32) { ptr += posX * (effXBPP / 8); /* Out of X icon bounds, leave space blank */ if (posX >= pixmap->width || posY >= pixmap->height) ptr = (unsigned char *) &zero; color = (((*ptr) << 16) + ((*(ptr + 1)) << 8) + ((*(ptr + 2)) << 0)); switch (effBPP) { case 32: *(outPtr++) = *(ptr++); /* b */ *(outPtr++) = *(ptr++); /* g */ *(outPtr++) = *(ptr++); /* r */ *(outPtr++) = (effXDepth == 32) ? *(ptr++) : 0x0; /* alpha */ break; case 24: *(outPtr++) = *(ptr++); *(outPtr++) = *(ptr++); *(outPtr++) = *(ptr++); break; case 16: color = ((((*ptr) >> 2) << 10) + (((*(ptr + 1)) >> 2) << 5) + (((*(ptr + 2)) >> 2))); *(outPtr++) = (color >> 8); *(outPtr++) = (color & 255); break; case 8: color = (((*ptr))) + (((*(ptr + 1)))) + (((*(ptr + 2)))); color /= 3; *(outPtr++) = color; break; case 1: if (color) outPtr[column / 8] |= (1 << (7 - (column & 7))); else outPtr[column / 8] &= ~(1 << (7 - (column & 7))); } } else if (effXDepth == 16) { ptr += posX * (effXBPP / 8); /* Out of X icon bounds, leave space blank */ if (posX >= pixmap->width || posY >= pixmap->height) ptr = (unsigned char *) &zero; color = ((*ptr) << 8) + (*(ptr + 1)); switch (effBPP) { case 32: *(outPtr++) = (color & 31) << 2; *(outPtr++) = ((color >> 5) & 31) << 2; *(outPtr++) = ((color >> 10) & 31) << 2; *(outPtr++) = 0; /* resvd */ break; case 24: *(outPtr++) = (color & 31) << 2; *(outPtr++) = ((color >> 5) & 31) << 2; *(outPtr++) = ((color >> 10) & 31) << 2; break; case 16: *(outPtr++) = *(ptr++); *(outPtr++) = *(ptr++); break; case 8: *(outPtr++) = (((color & 31) + ((color >> 5) & 31) + ((color >> 10) & 31)) / 3) << 2; break; case 1: if (color) outPtr[column / 8] |= (1 << (7 - (column & 7))); else outPtr[column / 8] &= ~(1 << (7 - (column & 7))); break; } /* end switch(effbpp) */ } /* end if effxbpp==16) */ } /* end for column */ } /* end for row */ } static HICON NetWMToWinIconAlpha(uint32_t * icon) { int width = icon[0]; int height = icon[1]; uint32_t *pixels = &icon[2]; HICON result; HDC hdc = GetDC(NULL); uint32_t *DIB_pixels; ICONINFO ii; BITMAPV4HEADER bmh = { sizeof(bmh) }; /* Define an ARGB pixel format used for Color+Alpha icons */ bmh.bV4Width = width; bmh.bV4Height = -height; /* Invert the image */ bmh.bV4Planes = 1; bmh.bV4BitCount = 32; bmh.bV4V4Compression = BI_BITFIELDS; bmh.bV4AlphaMask = 0xFF000000; bmh.bV4RedMask = 0x00FF0000; bmh.bV4GreenMask = 0x0000FF00; bmh.bV4BlueMask = 0x000000FF; ii.fIcon = TRUE; ii.xHotspot = 0; /* ignored */ ii.yHotspot = 0; /* ignored */ ii.hbmColor = CreateDIBSection(hdc, (BITMAPINFO *) &bmh, DIB_RGB_COLORS, (void **) &DIB_pixels, NULL, 0); ReleaseDC(NULL, hdc); if (!ii.hbmColor) return NULL; ii.hbmMask = CreateBitmap(width, height, 1, 1, NULL); memcpy(DIB_pixels, pixels, height * width * 4); /* CreateIconIndirect() traditionally required DDBitmaps */ /* Systems from WinXP accept 32-bit ARGB DIBitmaps with full 8-bit alpha support */ /* The icon is created with a DIB + empty DDB mask (an MS example does the same) */ result = CreateIconIndirect(&ii); DeleteObject(ii.hbmColor); DeleteObject(ii.hbmMask); winDebug("NetWMToWinIconAlpha - %d x %d = %p\n", icon[0], icon[1], result); return result; } static HICON NetWMToWinIconThreshold(uint32_t * icon) { int width = icon[0]; int height = icon[1]; uint32_t *pixels = &icon[2]; int row, col; HICON result; ICONINFO ii; HDC hdc = GetDC(NULL); HDC xorDC = CreateCompatibleDC(hdc); HDC andDC = CreateCompatibleDC(hdc); ii.fIcon = TRUE; ii.xHotspot = 0; /* ignored */ ii.yHotspot = 0; /* ignored */ ii.hbmColor = CreateCompatibleBitmap(hdc, width, height); ii.hbmMask = CreateCompatibleBitmap(hdc, width, height); ReleaseDC(NULL, hdc); SelectObject(xorDC, ii.hbmColor); SelectObject(andDC, ii.hbmMask); for (row = 0; row < height; row++) { for (col = 0; col < width; col++) { if ((*pixels & 0xFF000000) > 31 << 24) { /* 31 alpha threshold, i.e. opaque above, transparent below */ SetPixelV(xorDC, col, row, RGB(((char *) pixels)[2], ((char *) pixels)[1], ((char *) pixels)[0])); SetPixelV(andDC, col, row, RGB(0, 0, 0)); /* black mask */ } else { SetPixelV(xorDC, col, row, RGB(0, 0, 0)); SetPixelV(andDC, col, row, RGB(255, 255, 255)); /* white mask */ } pixels++; } } DeleteDC(xorDC); DeleteDC(andDC); result = CreateIconIndirect(&ii); DeleteObject(ii.hbmColor); DeleteObject(ii.hbmMask); winDebug("NetWMToWinIconThreshold - %d x %d = %p\n", icon[0], icon[1], result); return result; } static HICON NetWMToWinIcon(int bpp, uint32_t * icon) { static bool hasIconAlphaChannel = FALSE; static bool versionChecked = FALSE; if (!versionChecked) { OSVERSIONINFOEX osvi = { 0 }; ULONGLONG dwlConditionMask = 0; osvi.dwOSVersionInfoSize = sizeof(osvi); osvi.dwMajorVersion = 5; osvi.dwMinorVersion = 1; /* Windows versions later than XP have icon alpha channel support, 2000 does not */ VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL); VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, VER_GREATER_EQUAL); hasIconAlphaChannel = VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask); versionChecked = TRUE; ErrorF("OS has icon alpha channel support: %s\n", hasIconAlphaChannel ? "yes" : "no"); } if (hasIconAlphaChannel && (bpp == 32)) return NetWMToWinIconAlpha(icon); else return NetWMToWinIconThreshold(icon); } /* * Attempt to create a custom icon from the WM_HINTS bitmaps */ static HICON winXIconToHICON(xcb_connection_t *conn, xcb_window_t id, int iconSize) { unsigned char *mask, *image = NULL, *imageMask; unsigned char *dst, *src; int planes, bpp, i; unsigned int biggest_size = 0; HDC hDC; ICONINFO ii; xcb_icccm_wm_hints_t hints; HICON hIcon = NULL; uint32_t *biggest_icon = NULL; static xcb_atom_t _XA_NET_WM_ICON; static int generation; uint32_t *icon, *icon_data = NULL; unsigned long int size; hDC = GetDC(GetDesktopWindow()); planes = GetDeviceCaps(hDC, PLANES); bpp = GetDeviceCaps(hDC, BITSPIXEL); ReleaseDC(GetDesktopWindow(), hDC); /* Always prefer _NET_WM_ICON icons */ if (generation != serverGeneration) { xcb_intern_atom_reply_t *atom_reply; xcb_intern_atom_cookie_t atom_cookie; const char *atomName = "_NET_WM_ICON"; generation = serverGeneration; _XA_NET_WM_ICON = XCB_NONE; atom_cookie = xcb_intern_atom(conn, 0, strlen(atomName), atomName); atom_reply = xcb_intern_atom_reply(conn, atom_cookie, NULL); if (atom_reply) { _XA_NET_WM_ICON = atom_reply->atom; free(atom_reply); } } { xcb_get_property_cookie_t cookie = xcb_get_property(conn, FALSE, id, _XA_NET_WM_ICON, XCB_ATOM_CARDINAL, 0L, INT_MAX); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie, NULL); if (reply && ((icon_data = xcb_get_property_value(reply)) != NULL)) { size = xcb_get_property_value_length(reply)/sizeof(uint32_t); for (icon = icon_data; icon < &icon_data[size] && *icon; icon = &icon[icon[0] * icon[1] + 2]) { winDebug("winXIconToHICON: %u x %u NetIcon\n", icon[0], icon[1]); /* Icon data size will overflow an int and thus is bigger than the property can possibly be */ if ((INT_MAX/icon[0]) < icon[1]) { winDebug("winXIconToHICON: _NET_WM_ICON icon data size overflow\n"); break; } /* Icon data size is bigger than amount of data remaining */ if (&icon[icon[0] * icon[1] + 2] > &icon_data[size]) { winDebug("winXIconToHICON: _NET_WM_ICON data is malformed\n"); break; } /* Found an exact match to the size we require... */ if (icon[0] == iconSize && icon[1] == iconSize) { winDebug("winXIconToHICON: selected %d x %d NetIcon\n", iconSize, iconSize); hIcon = NetWMToWinIcon(bpp, icon); break; } /* Otherwise, find the biggest icon and let Windows scale the size */ else if (biggest_size < icon[0]) { biggest_icon = icon; biggest_size = icon[0]; } } if (!hIcon && biggest_icon) { winDebug ("winXIconToHICON: selected %u x %u NetIcon for scaling to %d x %d\n", biggest_icon[0], biggest_icon[1], iconSize, iconSize); hIcon = NetWMToWinIcon(bpp, biggest_icon); } free(reply); } } if (!hIcon) { xcb_get_property_cookie_t wm_hints_cookie; winDebug("winXIconToHICON: no suitable NetIcon\n"); wm_hints_cookie = xcb_icccm_get_wm_hints(conn, id); if (xcb_icccm_get_wm_hints_reply(conn, wm_hints_cookie, &hints, NULL)) { winDebug("winXIconToHICON: id 0x%x icon_pixmap hint 0x%x\n", (unsigned int)id, (unsigned int)hints.icon_pixmap); if (hints.icon_pixmap) { unsigned int width, height; xcb_image_t *xImageIcon; xcb_image_t *xImageMask = NULL; xcb_get_geometry_cookie_t geom_cookie = xcb_get_geometry(conn, hints.icon_pixmap); xcb_get_geometry_reply_t *geom_reply = xcb_get_geometry_reply(conn, geom_cookie, NULL); if (geom_reply) { width = geom_reply->width; height = geom_reply->height; xImageIcon = xcb_image_get(conn, hints.icon_pixmap, 0, 0, width, height, 0xFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); winDebug("winXIconToHICON: id 0x%x icon Ximage 0x%p\n", (unsigned int)id, xImageIcon); if (hints.icon_mask) xImageMask = xcb_image_get(conn, hints.icon_mask, 0, 0, width, height, 0xFFFFFFFF, XCB_IMAGE_FORMAT_Z_PIXMAP); if (xImageIcon) { int effBPP, stride, maskStride; /* 15 BPP is really 16BPP as far as we care */ if (bpp == 15) effBPP = 16; else effBPP = bpp; /* Need 16-bit aligned rows for DDBitmaps */ stride = ((iconSize * effBPP + 15) & (~15)) / 8; /* Mask is 1-bit deep */ maskStride = ((iconSize * 1 + 15) & (~15)) / 8; image = malloc(stride * iconSize); imageMask = malloc(stride * iconSize); mask = malloc(maskStride * iconSize); /* Default to a completely black mask */ memset(imageMask, 0, stride * iconSize); memset(mask, 0, maskStride * iconSize); winScaleXImageToWindowsIcon(iconSize, effBPP, stride, xImageIcon, image); if (xImageMask) { winScaleXImageToWindowsIcon(iconSize, 1, maskStride, xImageMask, mask); winScaleXImageToWindowsIcon(iconSize, effBPP, stride, xImageMask, imageMask); } /* Now we need to set all bits of the icon which are not masked */ /* on to 0 because Color is really an XOR, not an OR function */ dst = image; src = imageMask; for (i = 0; i < (stride * iconSize); i++) if ((*(src++))) *(dst++) = 0; else dst++; ii.fIcon = TRUE; ii.xHotspot = 0; /* ignored */ ii.yHotspot = 0; /* ignored */ /* Create Win32 mask from pixmap shape */ ii.hbmMask = CreateBitmap(iconSize, iconSize, planes, 1, mask); /* Create Win32 bitmap from pixmap */ ii.hbmColor = CreateBitmap(iconSize, iconSize, planes, bpp, image); /* Merge Win32 mask and bitmap into icon */ hIcon = CreateIconIndirect(&ii); /* Release Win32 mask and bitmap */ DeleteObject(ii.hbmMask); DeleteObject(ii.hbmColor); /* Free X mask and bitmap */ free(mask); free(image); free(imageMask); if (xImageMask) xcb_image_destroy(xImageMask); xcb_image_destroy(xImageIcon); } } } } } return hIcon; } /* * Change the Windows window icon */ void winUpdateIcon(HWND hWnd, xcb_connection_t *conn, xcb_window_t id, HICON hIconNew) { HICON hIcon, hIconSmall = NULL, hIconOld; if (hIconNew) { /* Start with the icon from preferences, if any */ hIcon = hIconNew; hIconSmall = hIconNew; } else { /* If we still need an icon, try and get the icon from WM_HINTS */ hIcon = winXIconToHICON(conn, id, GetSystemMetrics(SM_CXICON)); hIconSmall = winXIconToHICON(conn, id, GetSystemMetrics(SM_CXSMICON)); } /* If we got the small, but not the large one swap them */ if (!hIcon && hIconSmall) { hIcon = hIconSmall; hIconSmall = NULL; } /* Set the large icon */ hIconOld = (HICON) SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM) hIcon); /* Delete the old icon if its not the default */ winDestroyIcon(hIconOld); /* Same for the small icon */ hIconOld = (HICON) SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM) hIconSmall); winDestroyIcon(hIconOld); } void winInitGlobalIcons(void) { int sm_cx = GetSystemMetrics(SM_CXICON); int sm_cxsm = GetSystemMetrics(SM_CXSMICON); /* Load default X icon in case it's not ready yet */ if (!g_hIconX) { g_hIconX = winOverrideDefaultIcon(sm_cx); g_hSmallIconX = winOverrideDefaultIcon(sm_cxsm); } if (!g_hIconX) { g_hIconX = (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); g_hSmallIconX = (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); } } void winSelectIcons(HICON * pIcon, HICON * pSmallIcon) { HICON hIcon, hSmallIcon; winInitGlobalIcons(); /* Use default X icon */ hIcon = g_hIconX; hSmallIcon = g_hSmallIconX; if (pIcon) *pIcon = hIcon; if (pSmallIcon) *pSmallIcon = hSmallIcon; } void winDestroyIcon(HICON hIcon) { /* Delete the icon if its not one of the application defaults or an override */ if (hIcon && hIcon != g_hIconX && hIcon != g_hSmallIconX && !winIconIsOverride(hIcon)) DestroyIcon(hIcon); } xorg-server-21.1.16/hw/xwin/winos.c0000644000175000017500000000463214757411105012546 /* * Copyright (c) 2010-2014 Colin Harrison All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. * * Author: Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" typedef BOOL (WINAPI *LPFN_ISWOW64PROCESS)(HANDLE, PBOOL); static const char* IsWow64(void) { #ifdef __x86_64__ return " (64-bit)"; #else WINBOOL bIsWow64; LPFN_ISWOW64PROCESS fnIsWow64Process = (LPFN_ISWOW64PROCESS) GetProcAddress(GetModuleHandle(TEXT("kernel32")), "IsWow64Process"); if (NULL != fnIsWow64Process) { if (fnIsWow64Process(GetCurrentProcess(), &bIsWow64)) return bIsWow64 ? " (WoW64)" : " (32-bit)"; } /* OS doesn't support IsWow64Process() */ return ""; #endif } /* * Report the OS version */ void winOS(void) { OSVERSIONINFOEX osvi = {0}; /* Get operating system version information */ osvi.dwOSVersionInfoSize = sizeof(osvi); GetVersionEx((LPOSVERSIONINFO)&osvi); ErrorF("OS: Windows NT %d.%d build %d%s\n", (int)osvi.dwMajorVersion, (int)osvi.dwMinorVersion, (int)osvi.dwBuildNumber, IsWow64()); } xorg-server-21.1.16/hw/xwin/winprefs.c0000644000175000017500000005620114757411105013243 /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #ifdef __CYGWIN__ #include #include #endif #include "win.h" #include #include #include "winprefs.h" #include "windisplay.h" #include "winmultiwindowclass.h" #include "winmultiwindowicons.h" /* Where will the custom menu commands start counting from? */ #define STARTMENUID WM_USER extern const char *winGetBaseDir(void); /* From winprefslex.l, the real parser */ extern int parse_file(FILE * fp); /* Currently in use command ID, incremented each new menu item created */ static int g_cmdid = STARTMENUID; /* * Creates or appends a menu from a MENUPARSED structure */ static HMENU MakeMenu(char *name, HMENU editMenu, int editItem) { int i; int item; MENUPARSED *m; HMENU hmenu, hsub; for (i = 0; i < pref.menuItems; i++) { if (!strcmp(name, pref.menu[i].menuName)) break; } /* Didn't find a match, bummer */ if (i == pref.menuItems) { ErrorF("MakeMenu: Can't find menu %s\n", name); return NULL; } m = &(pref.menu[i]); if (editMenu) { hmenu = editMenu; item = editItem; } else { hmenu = CreatePopupMenu(); if (!hmenu) { ErrorF("MakeMenu: Unable to CreatePopupMenu() %s\n", name); return NULL; } item = 0; } /* Add the menu items */ for (i = 0; i < m->menuItems; i++) { /* Only assign IDs one time... */ if (m->menuItem[i].commandID == 0) m->menuItem[i].commandID = g_cmdid++; switch (m->menuItem[i].cmd) { case CMD_EXEC: case CMD_ALWAYSONTOP: case CMD_RELOAD: InsertMenu(hmenu, item, MF_BYPOSITION | MF_ENABLED | MF_STRING, m->menuItem[i].commandID, m->menuItem[i].text); break; case CMD_SEPARATOR: InsertMenu(hmenu, item, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); break; case CMD_MENU: /* Recursive! */ hsub = MakeMenu(m->menuItem[i].param, 0, 0); if (hsub) InsertMenu(hmenu, item, MF_BYPOSITION | MF_POPUP | MF_ENABLED | MF_STRING, (UINT_PTR) hsub, m->menuItem[i].text); break; } /* If item==-1 (means to add at end of menu) don't increment) */ if (item >= 0) item++; } return hmenu; } /* * Callback routine that is executed once per window class. * Removes or creates custom window settings depending on LPARAM */ static wBOOL CALLBACK ReloadEnumWindowsProc(HWND hwnd, LPARAM lParam) { HICON hicon; if (!hwnd) { ErrorF("ReloadEnumWindowsProc: hwnd==NULL!\n"); return FALSE; } /* It's our baby, either clean or dirty it */ if (lParam == FALSE) { /* Reset the window's icon to undefined. */ hicon = (HICON) SendMessage(hwnd, WM_SETICON, ICON_BIG, 0); /* If the old icon is generated on-the-fly, get rid of it, will regen */ winDestroyIcon(hicon); /* Same for the small icon */ hicon = (HICON) SendMessage(hwnd, WM_SETICON, ICON_SMALL, 0); winDestroyIcon(hicon); /* Remove any menu additions; bRevert=TRUE destroys any modified menus */ GetSystemMenu(hwnd, TRUE); /* This window is now clean of our taint (but with undefined icons) */ } else { /* Send a message to WM thread telling it re-evaluate the icon for this window */ { winWMMessageRec wmMsg; WindowPtr pWin = GetProp(hwnd, WIN_WINDOW_PROP); if (pWin) { winPrivWinPtr pWinPriv = winGetWindowPriv(pWin); winPrivScreenPtr s_pScreenPriv = pWinPriv->pScreenPriv; wmMsg.msg = WM_WM_ICON_EVENT; wmMsg.hwndWindow = hwnd; wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP); winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); } } /* Update the system menu for this window */ SetupSysMenu(hwnd); /* That was easy... */ } return TRUE; } /* * Removes any custom icons in classes, custom menus, etc. * Frees all members in pref structure. * Reloads the preferences file. * Set custom icons and menus again. */ static void ReloadPrefs(winPrivScreenPtr pScreenPriv) { int i; winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* First, iterate over all windows, deleting their icons and custom menus. * This is really only needed because winDestroyIcon() will try to * destroy the old global icons, which will have changed. * It is probably better to set a windows USER_DATA to flag locally defined * icons, and use that to accurately know when to destroy old icons. */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, FALSE); /* Now, free/clear all info from our prefs structure */ for (i = 0; i < pref.menuItems; i++) free(pref.menu[i].menuItem); free(pref.menu); pref.menu = NULL; pref.menuItems = 0; pref.rootMenuName[0] = 0; free(pref.sysMenu); pref.sysMenuItems = 0; pref.defaultSysMenuName[0] = 0; pref.defaultSysMenuPos = 0; pref.iconDirectory[0] = 0; pref.defaultIconName[0] = 0; pref.trayIconName[0] = 0; for (i = 0; i < pref.iconItems; i++) if (pref.icon[i].hicon) DestroyIcon((HICON) pref.icon[i].hicon); free(pref.icon); pref.icon = NULL; pref.iconItems = 0; /* Free global default X icon */ if (g_hIconX) DestroyIcon(g_hIconX); if (g_hSmallIconX) DestroyIcon(g_hSmallIconX); /* Reset the custom command IDs */ g_cmdid = STARTMENUID; /* Load the updated resource file */ LoadPreferences(); g_hIconX = NULL; g_hSmallIconX = NULL; if (pScreenInfo->fMultiWindow) { winInitGlobalIcons(); /* Rebuild the icons and menus */ EnumThreadWindows(g_dwCurrentThreadID, ReloadEnumWindowsProc, TRUE); } /* Whew, done */ } /* * Check/uncheck the ALWAYSONTOP items in this menu */ void HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu) { DWORD dwExStyle; int i, j; if (!hwnd || !hmenu) return; if (GetWindowLongPtr(hwnd, GWL_EXSTYLE) & WS_EX_TOPMOST) dwExStyle = MF_BYCOMMAND | MF_CHECKED; else dwExStyle = MF_BYCOMMAND | MF_UNCHECKED; for (i = 0; i < pref.menuItems; i++) for (j = 0; j < pref.menu[i].menuItems; j++) if (pref.menu[i].menuItem[j].cmd == CMD_ALWAYSONTOP) CheckMenuItem(hmenu, pref.menu[i].menuItem[j].commandID, dwExStyle); } /* * Searches for the custom WM_COMMAND command ID and performs action. * Return TRUE if command is processed, FALSE otherwise. */ Bool HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv) { int i, j; MENUPARSED *m; DWORD dwExStyle; if (!command) return FALSE; for (i = 0; i < pref.menuItems; i++) { m = &(pref.menu[i]); for (j = 0; j < m->menuItems; j++) { if (command == m->menuItem[j].commandID) { /* Match! */ switch (m->menuItem[j].cmd) { #ifdef __CYGWIN__ case CMD_EXEC: if (fork() == 0) { struct rlimit rl; int fd; /* Close any open descriptors except for STD* */ getrlimit(RLIMIT_NOFILE, &rl); for (fd = STDERR_FILENO + 1; fd < rl.rlim_cur; fd++) close(fd); /* Disassociate any TTYs */ setsid(); execl("/bin/sh", "/bin/sh", "-c", m->menuItem[j].param, NULL); exit(0); } else return TRUE; break; #else case CMD_EXEC: { /* Start process without console window */ STARTUPINFO start; PROCESS_INFORMATION child; memset(&start, 0, sizeof(start)); start.cb = sizeof(start); start.dwFlags = STARTF_USESHOWWINDOW; start.wShowWindow = SW_HIDE; memset(&child, 0, sizeof(child)); if (CreateProcess (NULL, m->menuItem[j].param, NULL, NULL, FALSE, 0, NULL, NULL, &start, &child)) { CloseHandle(child.hThread); CloseHandle(child.hProcess); } else MessageBox(NULL, m->menuItem[j].param, "Mingrc Exec Command Error!", MB_OK | MB_ICONEXCLAMATION); } return TRUE; #endif case CMD_ALWAYSONTOP: if (!hwnd) return FALSE; /* Get extended window style */ dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); /* Handle topmost windows */ if (dwExStyle & WS_EX_TOPMOST) SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); else SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE); { winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; if (pScreenInfo->fMultiWindow) /* Reflect the changed Z order */ winReorderWindowsMultiWindow(); } return TRUE; case CMD_RELOAD: ReloadPrefs(pScreenPriv); return TRUE; default: return FALSE; } } /* match */ } /* for j */ } /* for i */ return FALSE; } /* * Add the default or a custom menu depending on the class match */ void SetupSysMenu(HWND hwnd) { HMENU sys; int i; WindowPtr pWin; char *res_name, *res_class; if (!hwnd) return; pWin = GetProp(hwnd, WIN_WINDOW_PROP); sys = GetSystemMenu(hwnd, FALSE); if (!sys) return; if (pWin) { /* First see if there's a class match... */ if (winMultiWindowGetClassHint(pWin, &res_name, &res_class)) { for (i = 0; i < pref.sysMenuItems; i++) { if (!strcmp(pref.sysMenu[i].match, res_name) || !strcmp(pref.sysMenu[i].match, res_class)) { free(res_name); free(res_class); MakeMenu(pref.sysMenu[i].menuName, sys, pref.sysMenu[i].menuPos == AT_START ? 0 : -1); return; } } /* No match, just free alloc'd strings */ free(res_name); free(res_class); } /* Found wm_class */ } /* if pwin */ /* Fallback to system default */ if (pref.defaultSysMenuName[0]) { if (pref.defaultSysMenuPos == AT_START) MakeMenu(pref.defaultSysMenuName, sys, 0); else MakeMenu(pref.defaultSysMenuName, sys, -1); } } /* * Possibly add a menu to the toolbar icon */ void SetupRootMenu(HMENU root) { if (!root) return; if (pref.rootMenuName[0]) { MakeMenu(pref.rootMenuName, root, 0); } } /* * Check for and return an overridden default ICON specified in the prefs */ HICON winOverrideDefaultIcon(int size) { HICON hicon; if (pref.defaultIconName[0]) { hicon = LoadImageComma(pref.defaultIconName, pref.iconDirectory, size, size, 0); if (hicon == NULL) ErrorF("winOverrideDefaultIcon: LoadImageComma(%s) failed\n", pref.defaultIconName); return hicon; } return 0; } /* * Return the HICON to use in the taskbar notification area */ HICON winTaskbarIcon(void) { HICON hicon; hicon = 0; /* First try and load an overridden, if success then return it */ if (pref.trayIconName[0]) { hicon = LoadImageComma(pref.trayIconName, pref.iconDirectory, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0); if (hicon == NULL) ErrorF("winTaskbarIcon: LoadImageComma(%s) failed\n", pref.trayIconName); } /* Otherwise return the default */ if (!hicon) hicon = (HICON) LoadImage(g_hInstance, MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0); return hicon; } /* * Handle comma-ified icon names * * Parse a filename to extract an icon: * If fname is exactly ",nnn" then extract icon from our resource * else if it is "file,nnn" then extract icon nnn from that file * else try to load it as an .ico file and if that fails return NULL */ HICON LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags) { HICON hicon; int i; /* Some input error checking */ if (!fname || !fname[0]) return NULL; i = 0; hicon = NULL; if (fname[0] == ',') { /* It's the XWIN.EXE resource they want */ i = atoi(fname + 1); hicon = LoadImage(g_hInstance, MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags); } else { char *file = malloc(PATH_MAX + NAME_MAX + 2); Bool convert = FALSE; if (!file) return NULL; file[0] = 0; /* If fname starts 'X:\', it's an absolute Windows path, do nothing */ if (!(fname[0] && fname[1] == ':' && fname[2] == '\\')) { #ifdef __CYGWIN__ /* If fname starts with '/', it's an absolute cygwin path, we'll need to convert it */ if (fname[0] == '/') { convert = TRUE; } else #endif if (iconDirectory) { /* Otherwise, prepend the default icon directory, which currently must be in absolute Windows path form */ strcpy(file, iconDirectory); if (iconDirectory[0]) if (iconDirectory[strlen(iconDirectory) - 1] != '\\') strcat(file, "\\"); } } strcat(file, fname); /* Trim off any ',index' */ if (strrchr(file, ',')) { *(strrchr(file, ',')) = 0; /* End string at comma */ i = atoi(strrchr(fname, ',') + 1); } else { i = -1; } #ifdef __CYGWIN__ /* Convert from Cygwin path to Windows path */ if (convert) { char *converted_file = cygwin_create_path(CCP_POSIX_TO_WIN_A | CCP_ABSOLUTE, file); if (converted_file) { free(file); file = converted_file; } } #endif if (i >= 0) { /* Specified as , */ hicon = ExtractIcon(g_hInstance, file, i); } else { /* Specified as just an .ico file */ hicon = (HICON) LoadImage(NULL, file, IMAGE_ICON, sx, sy, LR_LOADFROMFILE | flags); } free(file); } return hicon; } /* * Check for a match of the window class to one specified in the * ICONS{} section in the prefs file, and load the icon from a file */ HICON winOverrideIcon(char *res_name, char *res_class, char *wmName) { int i; HICON hicon; for (i = 0; i < pref.iconItems; i++) { if ((res_name && !strcmp(pref.icon[i].match, res_name)) || (res_class && !strcmp(pref.icon[i].match, res_class)) || (wmName && strstr(wmName, pref.icon[i].match))) { if (pref.icon[i].hicon) return pref.icon[i].hicon; hicon = LoadImageComma(pref.icon[i].iconFile, pref.iconDirectory, 0, 0, LR_DEFAULTSIZE); if (hicon == NULL) ErrorF("winOverrideIcon: LoadImageComma(%s) failed\n", pref.icon[i].iconFile); pref.icon[i].hicon = hicon; return hicon; } } /* Didn't find the icon, fail gracefully */ return 0; } /* * Should we free this icon or leave it in memory (is it part of our * ICONS{} overrides)? */ int winIconIsOverride(HICON hicon) { int i; if (!hicon) return 0; for (i = 0; i < pref.iconItems; i++) if ((HICON) pref.icon[i].hicon == hicon) return 1; return 0; } /* * Open and parse the XWinrc config file @path. * If @path is NULL, use the built-in default. */ static int winPrefsLoadPreferences(const char *path) { FILE *prefFile = NULL; if (path) prefFile = fopen(path, "r"); #ifdef __CYGWIN__ else { char defaultPrefs[] = "MENU rmenu {\n" " \"How to customize this menu\" EXEC \"xterm +tb -e man XWinrc\"\n" " \"Launch xterm\" EXEC xterm\n" " \"Load .XWinrc\" RELOAD\n" " SEPARATOR\n" "}\n" "\n" "ROOTMENU rmenu\n"; path = "built-in default"; prefFile = fmemopen(defaultPrefs, strlen(defaultPrefs), "r"); } #endif if (!prefFile) { ErrorF("LoadPreferences: %s not found\n", path); return FALSE; } ErrorF("LoadPreferences: Loading %s\n", path); if ((parse_file(prefFile)) != 0) { ErrorF("LoadPreferences: %s is badly formed!\n", path); fclose(prefFile); return FALSE; } fclose(prefFile); return TRUE; } /* * Try and open ~/.XWinrc and system.XWinrc * Load it into prefs structure for use by other functions */ void LoadPreferences(void) { char *home; char fname[PATH_MAX + NAME_MAX + 2]; char szDisplay[512]; char *szEnvDisplay; int i, j; char param[PARAM_MAX + 1]; char *srcParam, *dstParam; int parsed = FALSE; /* First, clear all preference settings */ memset(&pref, 0, sizeof(pref)); /* Now try and find a ~/.xwinrc file */ home = getenv("HOME"); if (home) { strcpy(fname, home); if (fname[strlen(fname) - 1] != '/') strcat(fname, "/"); strcat(fname, ".XWinrc"); parsed = winPrefsLoadPreferences(fname); } /* No home file found, check system default */ if (!parsed) { char buffer[MAX_PATH]; #ifdef RELOCATE_PROJECTROOT snprintf(buffer, sizeof(buffer), "%s\\system.XWinrc", winGetBaseDir()); #else strncpy(buffer, SYSCONFDIR "/X11/system.XWinrc", sizeof(buffer)); #endif buffer[sizeof(buffer) - 1] = 0; parsed = winPrefsLoadPreferences(buffer); } /* Neither user nor system configuration found, or were badly formed */ if (!parsed) { ErrorF ("LoadPreferences: See \"man XWinrc\" to customize the XWin menu.\n"); parsed = winPrefsLoadPreferences(NULL); } /* Setup a DISPLAY environment variable, need to allocate on heap */ /* because putenv doesn't copy the argument... */ winGetDisplayName(szDisplay, 0); szEnvDisplay = (char *) (malloc(strlen(szDisplay) + strlen("DISPLAY=") + 1)); if (szEnvDisplay) { snprintf(szEnvDisplay, 512, "DISPLAY=%s", szDisplay); putenv(szEnvDisplay); } /* Replace any "%display%" in menu commands with display string */ for (i = 0; i < pref.menuItems; i++) { for (j = 0; j < pref.menu[i].menuItems; j++) { if (pref.menu[i].menuItem[j].cmd == CMD_EXEC) { srcParam = pref.menu[i].menuItem[j].param; dstParam = param; while (*srcParam) { if (!strncmp(srcParam, "%display%", 9)) { memcpy(dstParam, szDisplay, strlen(szDisplay)); dstParam += strlen(szDisplay); srcParam += 9; } else { *dstParam = *srcParam; dstParam++; srcParam++; } } *dstParam = 0; strcpy(pref.menu[i].menuItem[j].param, param); } /* cmd==cmd_exec */ } /* for all menuitems */ } /* for all menus */ } /* * Check for a match of the window class to one specified in the * STYLES{} section in the prefs file, and return the style type */ unsigned long winOverrideStyle(char *res_name, char *res_class, char *wmName) { int i; for (i = 0; i < pref.styleItems; i++) { if ((res_name && !strcmp(pref.style[i].match, res_name)) || (res_class && !strcmp(pref.style[i].match, res_class)) || (wmName && strstr(wmName, pref.style[i].match))) { if (pref.style[i].type) return pref.style[i].type; } } /* Didn't find the style, fail gracefully */ return STYLE_NONE; } xorg-server-21.1.16/hw/xwin/winprefsyacc.y0000644000175000017500000002474214757411105014136 %{ /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ /* $XFree86: $ */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #define _STDLIB_H 1 /* bison checks this to know if stdlib has been included */ #include #include "winprefs.h" /* The following give better error messages in bison at the cost of a few KB */ #define YYERROR_VERBOSE 1 /* YYLTYPE_IS_TRIVIAL and YYENABLE_NLS defined to suppress warnings */ #define YYLTYPE_IS_TRIVIAL 1 #define YYENABLE_NLS 0 /* The global pref settings */ WINPREFS pref; /* The working menu */ static MENUPARSED menu; /* Functions for parsing the tokens into out structure */ /* Defined at the end section of this file */ static void SetIconDirectory (char *path); static void SetDefaultIcon (char *fname); static void SetRootMenu (char *menu); static void SetDefaultSysMenu (char *menu, int pos); static void SetTrayIcon (char *fname); static void OpenMenu(char *menuname); static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param); static void CloseMenu(void); static void OpenIcons(void); static void AddIconLine(char *matchstr, char *iconfile); static void CloseIcons(void); static void OpenStyles(void); static void AddStyleLine(char *matchstr, unsigned long style); static void CloseStyles(void); static void OpenSysMenu(void); static void AddSysMenuLine(char *matchstr, char *menuname, int pos); static void CloseSysMenu(void); static int yyerror (const char *s); extern char *yytext; extern int yylineno; extern int yylex(void); %} %union { char *sVal; unsigned long uVal; int iVal; } %token NEWLINE %token MENU %token LB %token RB %token ICONDIRECTORY %token DEFAULTICON %token ICONS %token STYLES %token TOPMOST %token MAXIMIZE %token MINIMIZE %token BOTTOM %token NOTITLE %token OUTLINE %token NOFRAME %token DEFAULTSYSMENU %token SYSMENU %token ROOTMENU %token SEPARATOR %token ATSTART %token ATEND %token EXEC %token ALWAYSONTOP %token DEBUGOUTPUT "DEBUG" %token RELOAD %token TRAYICON %token FORCEEXIT %token SILENTEXIT %token STRING %type group1 %type group2 %type stylecombo %type atspot %% input: /* empty */ | input line ; line: NEWLINE | command ; newline_or_nada: | NEWLINE newline_or_nada ; command: defaulticon | icondirectory | menu | icons | styles | sysmenu | rootmenu | defaultsysmenu | debug | trayicon | forceexit | silentexit ; trayicon: TRAYICON STRING NEWLINE { SetTrayIcon($2); free($2); } ; rootmenu: ROOTMENU STRING NEWLINE { SetRootMenu($2); free($2); } ; defaultsysmenu: DEFAULTSYSMENU STRING atspot NEWLINE { SetDefaultSysMenu($2, $3); free($2); } ; defaulticon: DEFAULTICON STRING NEWLINE { SetDefaultIcon($2); free($2); } ; icondirectory: ICONDIRECTORY STRING NEWLINE { SetIconDirectory($2); free($2); } ; menuline: SEPARATOR NEWLINE newline_or_nada { AddMenuLine("-", CMD_SEPARATOR, ""); } | STRING ALWAYSONTOP NEWLINE newline_or_nada { AddMenuLine($1, CMD_ALWAYSONTOP, ""); free($1); } | STRING EXEC STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_EXEC, $3); free($1); free($3); } | STRING MENU STRING NEWLINE newline_or_nada { AddMenuLine($1, CMD_MENU, $3); free($1); free($3); } | STRING RELOAD NEWLINE newline_or_nada { AddMenuLine($1, CMD_RELOAD, ""); free($1); } ; menulist: menuline | menuline menulist ; menu: MENU STRING LB { OpenMenu($2); free($2); } newline_or_nada menulist RB {CloseMenu();} ; iconline: STRING STRING NEWLINE newline_or_nada { AddIconLine($1, $2); free($1); free($2); } ; iconlist: iconline | iconline iconlist ; icons: ICONS LB {OpenIcons();} newline_or_nada iconlist RB {CloseIcons();} ; group1: TOPMOST { $$=STYLE_TOPMOST; } | MAXIMIZE { $$=STYLE_MAXIMIZE; } | MINIMIZE { $$=STYLE_MINIMIZE; } | BOTTOM { $$=STYLE_BOTTOM; } ; group2: NOTITLE { $$=STYLE_NOTITLE; } | OUTLINE { $$=STYLE_OUTLINE; } | NOFRAME { $$=STYLE_NOFRAME; } ; stylecombo: group1 { $$=$1; } | group2 { $$=$1; } | group1 group2 { $$=$1|$2; } | group2 group1 { $$=$1|$2; } ; styleline: STRING stylecombo NEWLINE newline_or_nada { AddStyleLine($1, $2); free($1); } ; stylelist: styleline | styleline stylelist ; styles: STYLES LB {OpenStyles();} newline_or_nada stylelist RB {CloseStyles();} ; atspot: { $$=AT_END; } | ATSTART { $$=AT_START; } | ATEND { $$=AT_END; } ; sysmenuline: STRING STRING atspot NEWLINE newline_or_nada { AddSysMenuLine($1, $2, $3); free($1); free($2); } ; sysmenulist: sysmenuline | sysmenuline sysmenulist ; sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {CloseSysMenu();} ; forceexit: FORCEEXIT NEWLINE { pref.fForceExit = TRUE; } ; silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; } ; debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); } ; %% /* * Errors in parsing abort and print log messages */ static int yyerror (const char *s) { ErrorF("LoadPreferences: %s line %d\n", s, yylineno); return 1; } /* Miscellaneous functions to store TOKENs into the structure */ static void SetIconDirectory (char *path) { strncpy (pref.iconDirectory, path, PATH_MAX); pref.iconDirectory[PATH_MAX] = 0; } static void SetDefaultIcon (char *fname) { strncpy (pref.defaultIconName, fname, NAME_MAX); pref.defaultIconName[NAME_MAX] = 0; } static void SetTrayIcon (char *fname) { strncpy (pref.trayIconName, fname, NAME_MAX); pref.trayIconName[NAME_MAX] = 0; } static void SetRootMenu (char *menuname) { strncpy (pref.rootMenuName, menuname, MENU_MAX); pref.rootMenuName[MENU_MAX] = 0; } static void SetDefaultSysMenu (char *menuname, int pos) { strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); pref.defaultSysMenuName[MENU_MAX] = 0; pref.defaultSysMenuPos = pos; } static void OpenMenu (char *menuname) { if (menu.menuItem) free(menu.menuItem); menu.menuItem = NULL; strncpy(menu.menuName, menuname, MENU_MAX); menu.menuName[MENU_MAX] = 0; menu.menuItems = 0; } static void AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param) { if (menu.menuItem==NULL) menu.menuItem = malloc(sizeof(MENUITEM)); else menu.menuItem = realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); strncpy (menu.menuItem[menu.menuItems].text, text, MENU_MAX); menu.menuItem[menu.menuItems].text[MENU_MAX] = 0; menu.menuItem[menu.menuItems].cmd = cmd; strncpy(menu.menuItem[menu.menuItems].param, param, PARAM_MAX); menu.menuItem[menu.menuItems].param[PARAM_MAX] = 0; menu.menuItem[menu.menuItems].commandID = 0; menu.menuItems++; } static void CloseMenu (void) { if (menu.menuItem==NULL || menu.menuItems==0) { ErrorF("LoadPreferences: Empty menu detected\n"); return; } if (pref.menuItems) pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); else pref.menu = malloc (sizeof(MENUPARSED)); memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); pref.menuItems++; memset (&menu, 0, sizeof(MENUPARSED)); } static void OpenIcons (void) { if (pref.icon != NULL) { ErrorF("LoadPreferences: Redefining icon mappings\n"); free(pref.icon); pref.icon = NULL; } pref.iconItems = 0; } static void AddIconLine (char *matchstr, char *iconfile) { if (pref.icon==NULL) pref.icon = malloc(sizeof(ICONITEM)); else pref.icon = realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); strncpy(pref.icon[pref.iconItems].match, matchstr, MENU_MAX); pref.icon[pref.iconItems].match[MENU_MAX] = 0; strncpy(pref.icon[pref.iconItems].iconFile, iconfile, PATH_MAX+NAME_MAX+1); pref.icon[pref.iconItems].iconFile[PATH_MAX+NAME_MAX+1] = 0; pref.icon[pref.iconItems].hicon = 0; pref.iconItems++; } static void CloseIcons (void) { } static void OpenStyles (void) { if (pref.style != NULL) { ErrorF("LoadPreferences: Redefining window style\n"); free(pref.style); pref.style = NULL; } pref.styleItems = 0; } static void AddStyleLine (char *matchstr, unsigned long style) { if (pref.style==NULL) pref.style = malloc(sizeof(STYLEITEM)); else pref.style = realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); strncpy(pref.style[pref.styleItems].match, matchstr, MENU_MAX); pref.style[pref.styleItems].match[MENU_MAX] = 0; pref.style[pref.styleItems].type = style; pref.styleItems++; } static void CloseStyles (void) { } static void OpenSysMenu (void) { if (pref.sysMenu != NULL) { ErrorF("LoadPreferences: Redefining system menu\n"); free(pref.sysMenu); pref.sysMenu = NULL; } pref.sysMenuItems = 0; } static void AddSysMenuLine (char *matchstr, char *menuname, int pos) { if (pref.sysMenu==NULL) pref.sysMenu = malloc(sizeof(SYSMENUITEM)); else pref.sysMenu = realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); strncpy (pref.sysMenu[pref.sysMenuItems].match, matchstr, MENU_MAX); pref.sysMenu[pref.sysMenuItems].match[MENU_MAX] = 0; strncpy (pref.sysMenu[pref.sysMenuItems].menuName, menuname, MENU_MAX); pref.sysMenu[pref.sysMenuItems].menuName[MENU_MAX] = 0; pref.sysMenu[pref.sysMenuItems].menuPos = pos; pref.sysMenuItems++; } static void CloseSysMenu (void) { } xorg-server-21.1.16/hw/xwin/winprefslex.l0000644000175000017500000000763214757411105013771 %{ # -*- C -*- /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ /* $XFree86: $ */ #include #include #include #include "winprefsyacc.h" extern void ErrorF (const char* /*f*/, ...); /* Copy the parsed string, must be free()d in yacc parser */ static char *makestr(char *str) { char *ptr; ptr = malloc(strlen(str)+1); if (!ptr) { ErrorF ("winMultiWindowLex:makestr() out of memory\n"); exit (-1); } strcpy(ptr, str); return ptr; } %} %option yylineno %option nounput %option noinput %option never-interactive %% \#.*[\r\n] { /* comment */ return NEWLINE; } \/\/.*[\r\n] { /* comment */ return NEWLINE; } [\r\n] { return NEWLINE; } [ \t]+ { /* ignore whitespace */ } MENU { return MENU; } ICONDIRECTORY { return ICONDIRECTORY; } DEFAULTICON { return DEFAULTICON; } ICONS { return ICONS; } STYLES { return STYLES; } TOPMOST { return TOPMOST; } MAXIMIZE { return MAXIMIZE; } MINIMIZE { return MINIMIZE; } BOTTOM { return BOTTOM; } NOTITLE { return NOTITLE; } OUTLINE { return OUTLINE; } NOFRAME { return NOFRAME; } ROOTMENU { return ROOTMENU; } DEFAULTSYSMENU { return DEFAULTSYSMENU; } SYSMENU { return SYSMENU; } SEPARATOR { return SEPARATOR; } ATSTART { return ATSTART; } ATEND { return ATEND; } EXEC { return EXEC; } ALWAYSONTOP { return ALWAYSONTOP; } DEBUG { return DEBUGOUTPUT; } RELOAD { return RELOAD; } TRAYICON { return TRAYICON; } FORCEEXIT { return FORCEEXIT; } SILENTEXIT { return SILENTEXIT; } "{" { return LB; } "}" { return RB; } "\""[^\"\r\n]+"\"" { yylval.sVal = makestr(yytext+1); \ yylval.sVal[strlen(yylval.sVal)-1] = 0; \ return STRING; } [^ \t\r\n]+ { yylval.sVal = makestr(yytext); \ return STRING; } %% /* * Run-of-the mill requirement for yacc */ int yywrap (void) { return 1; } /* * Run a file through the yacc parser */ int parse_file (FILE *file) { int ret; if (!file) return 1; yylineno = 1; yyin = file; ret = yyparse (); yylex_destroy (); return ret; } xorg-server-21.1.16/hw/xwin/winprocarg.c0000644000175000017500000010572514757411105013567 /* Copyright 1993, 1998 The Open Group Copyright (C) Colin Harrison 2005-2008 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #ifdef HAVE_SYS_UTSNAME_H #include #endif #include <../xfree86/common/xorgVersion.h> #include "win.h" #include "winconfig.h" #include "winmsg.h" #include "winmonitors.h" #include "winprefs.h" #include "winclipboard/winclipboard.h" /* * Function prototypes */ void winLogCommandLine(int argc, char *argv[]); void winLogVersionInfo(void); /* * Process arguments on the command line */ static int iLastScreen = -1; static winScreenInfo defaultScreenInfo; static void winInitializeScreenDefaults(void) { DWORD dwWidth, dwHeight; static Bool fInitializedScreenDefaults = FALSE; /* Bail out early if default screen has already been initialized */ if (fInitializedScreenDefaults) return; /* Zero the memory used for storing the screen info */ memset(&defaultScreenInfo, 0, sizeof(winScreenInfo)); /* Get default width and height */ /* * NOTE: These defaults will cause the window to cover only * the primary monitor in the case that we have multiple monitors. */ dwWidth = GetSystemMetrics(SM_CXSCREEN); dwHeight = GetSystemMetrics(SM_CYSCREEN); winErrorFVerb(2, "winInitializeScreenDefaults - primary monitor w %d h %d\n", (int) dwWidth, (int) dwHeight); /* Set a default DPI, if no '-dpi' option was used */ if (monitorResolution == 0) { HDC hdc = GetDC(NULL); if (hdc) { int dpiX = GetDeviceCaps(hdc, LOGPIXELSX); int dpiY = GetDeviceCaps(hdc, LOGPIXELSY); winErrorFVerb(2, "winInitializeScreenDefaults - native DPI x %d y %d\n", dpiX, dpiY); monitorResolution = dpiY; ReleaseDC(NULL, hdc); } else { winErrorFVerb(1, "winInitializeScreenDefaults - Failed to retrieve native DPI, falling back to default of %d DPI\n", WIN_DEFAULT_DPI); monitorResolution = WIN_DEFAULT_DPI; } } defaultScreenInfo.iMonitor = 1; defaultScreenInfo.hMonitor = MonitorFromWindow(NULL, MONITOR_DEFAULTTOPRIMARY); defaultScreenInfo.dwWidth = dwWidth; defaultScreenInfo.dwHeight = dwHeight; defaultScreenInfo.dwUserWidth = dwWidth; defaultScreenInfo.dwUserHeight = dwHeight; defaultScreenInfo.fUserGaveHeightAndWidth = WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH; defaultScreenInfo.fUserGavePosition = FALSE; defaultScreenInfo.dwBPP = WIN_DEFAULT_BPP; defaultScreenInfo.dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES; #ifdef XWIN_EMULATEPSEUDO defaultScreenInfo.fEmulatePseudo = WIN_DEFAULT_EMULATE_PSEUDO; #endif defaultScreenInfo.dwRefreshRate = WIN_DEFAULT_REFRESH; defaultScreenInfo.pfb = NULL; defaultScreenInfo.fFullScreen = FALSE; defaultScreenInfo.fDecoration = TRUE; defaultScreenInfo.fRootless = FALSE; defaultScreenInfo.fMultiWindow = FALSE; defaultScreenInfo.fCompositeWM = TRUE; defaultScreenInfo.fMultiMonitorOverride = FALSE; defaultScreenInfo.fMultipleMonitors = FALSE; defaultScreenInfo.fLessPointer = FALSE; defaultScreenInfo.iResizeMode = resizeDefault; defaultScreenInfo.fNoTrayIcon = FALSE; defaultScreenInfo.iE3BTimeout = WIN_E3B_DEFAULT; defaultScreenInfo.fUseWinKillKey = WIN_DEFAULT_WIN_KILL; defaultScreenInfo.fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL; defaultScreenInfo.fIgnoreInput = FALSE; defaultScreenInfo.fExplicitScreen = FALSE; defaultScreenInfo.hIcon = (HICON) LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); defaultScreenInfo.hIconSm = (HICON) LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_XWIN), IMAGE_ICON, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); /* Note that the default screen has been initialized */ fInitializedScreenDefaults = TRUE; } static void winInitializeScreen(int i) { winErrorFVerb(3, "winInitializeScreen - %d\n", i); /* Initialize default screen values, if needed */ winInitializeScreenDefaults(); /* Copy the default screen info */ g_ScreenInfo[i] = defaultScreenInfo; /* Set the screen number */ g_ScreenInfo[i].dwScreen = i; } void winInitializeScreens(int maxscreens) { int i; winErrorFVerb(3, "winInitializeScreens - %i\n", maxscreens); if (maxscreens > g_iNumScreens) { /* Reallocate the memory for DDX-specific screen info */ g_ScreenInfo = realloc(g_ScreenInfo, maxscreens * sizeof(winScreenInfo)); /* Set default values for any new screens */ for (i = g_iNumScreens; i < maxscreens; i++) winInitializeScreen(i); /* Keep a count of the number of screens */ g_iNumScreens = maxscreens; } } /* See Porting Layer Definition - p. 57 */ /* * INPUT * argv: pointer to an array of null-terminated strings, one for * each token in the X Server command line; the first token * is 'XWin.exe', or similar. * argc: a count of the number of tokens stored in argv. * i: a zero-based index into argv indicating the current token being * processed. * * OUTPUT * return: return the number of tokens processed correctly. * * NOTE * When looking for n tokens, check that i + n is less than argc. Or, * you may check if i is greater than or equal to argc, in which case * you should display the UseMsg () and return 0. */ /* Check if enough arguments are given for the option */ #define CHECK_ARGS(count) if (i + count >= argc) { UseMsg (); return 0; } /* Compare the current option with the string. */ #define IS_OPTION(name) (strcmp (argv[i], name) == 0) int ddxProcessArgument(int argc, char *argv[], int i) { static Bool s_fBeenHere = FALSE; winScreenInfo *screenInfoPtr = NULL; /* Initialize once */ if (!s_fBeenHere) { #ifdef DDXOSVERRORF /* * This initialises our hook into VErrorF () for catching log messages * that are generated before OsInit () is called. */ OsVendorVErrorFProc = OsVendorVErrorF; #endif s_fBeenHere = TRUE; /* Initialize only if option is not -help */ if (!IS_OPTION("-help") && !IS_OPTION("-h") && !IS_OPTION("--help") && !IS_OPTION("-version") && !IS_OPTION("--version")) { /* Log the version information */ winLogVersionInfo(); /* Log the command line */ winLogCommandLine(argc, argv); /* * Initialize default screen settings. We have to do this before * OsVendorInit () gets called, otherwise we will overwrite * settings changed by parameters such as -fullscreen, etc. */ winErrorFVerb(3, "ddxProcessArgument - Initializing default " "screens\n"); winInitializeScreenDefaults(); } } #if CYGDEBUG winDebug("ddxProcessArgument - arg: %s\n", argv[i]); #endif /* * Look for the '-help' and similar options */ if (IS_OPTION("-help") || IS_OPTION("-h") || IS_OPTION("--help")) { /* Reset logfile. We don't need that helpmessage in the logfile */ g_pszLogFile = NULL; g_fNoHelpMessageBox = TRUE; UseMsg(); exit(0); return 1; } if (IS_OPTION("-version") || IS_OPTION("--version")) { /* Reset logfile. We don't need that versioninfo in the logfile */ g_pszLogFile = NULL; winLogVersionInfo(); exit(0); return 1; } /* * Look for the '-screen scr_num [width height]' argument */ if (IS_OPTION("-screen")) { int iArgsProcessed = 1; int nScreenNum; int iWidth, iHeight, iX, iY; int iMonitor; #if CYGDEBUG winDebug("ddxProcessArgument - screen - argc: %d i: %d\n", argc, i); #endif /* Display the usage message if the argument is malformed */ if (i + 1 >= argc) { return 0; } /* Grab screen number */ nScreenNum = atoi(argv[i + 1]); /* Validate the specified screen number */ if (nScreenNum < 0) { ErrorF("ddxProcessArgument - screen - Invalid screen number %d\n", nScreenNum); UseMsg(); return 0; } /* Initialize default values for any new screens Note that default values can't change after a -screen option is seen, so it's safe to do this for each screen as it is introduced */ winInitializeScreens(nScreenNum + 1); /* look for @m where m is monitor number */ if (i + 2 < argc && 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor)) { struct GetMonitorInfoData data; if (QueryMonitor(iMonitor, &data)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor); iArgsProcessed = 3; g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE; g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; g_ScreenInfo[nScreenNum].iMonitor = iMonitor; g_ScreenInfo[nScreenNum].hMonitor = data.monitorHandle; g_ScreenInfo[nScreenNum].dwWidth = data.monitorWidth; g_ScreenInfo[nScreenNum].dwHeight = data.monitorHeight; g_ScreenInfo[nScreenNum].dwUserWidth = data.monitorWidth; g_ScreenInfo[nScreenNum].dwUserHeight = data.monitorHeight; g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX; g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY; } else { /* monitor does not exist, error out */ ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", iMonitor); exit(1); return 0; } } /* Look for 'WxD' or 'W D' */ else if (i + 2 < argc && 2 == sscanf(argv[i + 2], "%dx%d", (int *) &iWidth, (int *) &iHeight)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found ``WxD'' arg\n"); iArgsProcessed = 3; g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE; g_ScreenInfo[nScreenNum].dwWidth = iWidth; g_ScreenInfo[nScreenNum].dwHeight = iHeight; g_ScreenInfo[nScreenNum].dwUserWidth = iWidth; g_ScreenInfo[nScreenNum].dwUserHeight = iHeight; /* Look for WxD+X+Y */ if (2 == sscanf(argv[i + 2], "%*dx%*d+%d+%d", (int *) &iX, (int *) &iY)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found ``X+Y'' arg\n"); g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; g_ScreenInfo[nScreenNum].dwInitialX = iX; g_ScreenInfo[nScreenNum].dwInitialY = iY; /* look for WxD+X+Y@m where m is monitor number. take X,Y to be offsets from monitor's root position */ if (1 == sscanf(argv[i + 2], "%*dx%*d+%*d+%*d@%d", (int *) &iMonitor)) { struct GetMonitorInfoData data; if (QueryMonitor(iMonitor, &data)) { g_ScreenInfo[nScreenNum].iMonitor = iMonitor; g_ScreenInfo[nScreenNum].hMonitor = data.monitorHandle; g_ScreenInfo[nScreenNum].dwInitialX += data.monitorOffsetX; g_ScreenInfo[nScreenNum].dwInitialY += data.monitorOffsetY; } else { /* monitor does not exist, error out */ ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", iMonitor); exit(1); return 0; } } } /* look for WxD@m where m is monitor number */ else if (1 == sscanf(argv[i + 2], "%*dx%*d@%d", (int *) &iMonitor)) { struct GetMonitorInfoData data; if (QueryMonitor(iMonitor, &data)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found Valid ``@Monitor'' = %d arg\n", iMonitor); g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; g_ScreenInfo[nScreenNum].iMonitor = iMonitor; g_ScreenInfo[nScreenNum].hMonitor = data.monitorHandle; g_ScreenInfo[nScreenNum].dwInitialX = data.monitorOffsetX; g_ScreenInfo[nScreenNum].dwInitialY = data.monitorOffsetY; } else { /* monitor does not exist, error out */ ErrorF ("ddxProcessArgument - screen - Invalid monitor number %d\n", iMonitor); exit(1); return 0; } } } else if (i + 3 < argc && 1 == sscanf(argv[i + 2], "%d", (int *) &iWidth) && 1 == sscanf(argv[i + 3], "%d", (int *) &iHeight)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found ``W D'' arg\n"); iArgsProcessed = 4; g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE; g_ScreenInfo[nScreenNum].dwWidth = iWidth; g_ScreenInfo[nScreenNum].dwHeight = iHeight; g_ScreenInfo[nScreenNum].dwUserWidth = iWidth; g_ScreenInfo[nScreenNum].dwUserHeight = iHeight; if (i + 5 < argc && 1 == sscanf(argv[i + 4], "%d", (int *) &iX) && 1 == sscanf(argv[i + 5], "%d", (int *) &iY)) { winErrorFVerb(2, "ddxProcessArgument - screen - Found ``X Y'' arg\n"); iArgsProcessed = 6; g_ScreenInfo[nScreenNum].fUserGavePosition = TRUE; g_ScreenInfo[nScreenNum].dwInitialX = iX; g_ScreenInfo[nScreenNum].dwInitialY = iY; } } else { winErrorFVerb(2, "ddxProcessArgument - screen - Did not find size arg. " "dwWidth: %d dwHeight: %d\n", (int) g_ScreenInfo[nScreenNum].dwWidth, (int) g_ScreenInfo[nScreenNum].dwHeight); iArgsProcessed = 2; g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = FALSE; } /* Flag that this screen was explicitly specified by the user */ g_ScreenInfo[nScreenNum].fExplicitScreen = TRUE; /* * Keep track of the last screen number seen, as parameters seen * before a screen number apply to all screens, whereas parameters * seen after a screen number apply to that screen number only. */ iLastScreen = nScreenNum; return iArgsProcessed; } /* * Is this parameter attached to a screen or global? * * If the parameter is for all screens (appears before * any -screen option), store it in the default screen * info * * If the parameter is for a single screen (appears * after a -screen option), store it in the screen info * for that screen * */ if (iLastScreen == -1) { screenInfoPtr = &defaultScreenInfo; } else { screenInfoPtr = &(g_ScreenInfo[iLastScreen]); } /* * Look for the '-engine n' argument */ if (IS_OPTION("-engine")) { DWORD dwEngine = 0; CARD8 c8OnBits = 0; /* Display the usage message if the argument is malformed */ if (++i >= argc) { UseMsg(); return 0; } /* Grab the argument */ dwEngine = atoi(argv[i]); /* Count the one bits in the engine argument */ c8OnBits = winCountBits(dwEngine); /* Argument should only have a single bit on */ if (c8OnBits != 1) { UseMsg(); return 0; } screenInfoPtr->dwEnginePreferred = dwEngine; /* Indicate that we have processed the argument */ return 2; } /* * Look for the '-fullscreen' argument */ if (IS_OPTION("-fullscreen")) { if (!screenInfoPtr->fMultiMonitorOverride) screenInfoPtr->fMultipleMonitors = FALSE; screenInfoPtr->fFullScreen = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-lesspointer' argument */ if (IS_OPTION("-lesspointer")) { screenInfoPtr->fLessPointer = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-nodecoration' argument */ if (IS_OPTION("-nodecoration")) { if (!screenInfoPtr->fMultiMonitorOverride) screenInfoPtr->fMultipleMonitors = FALSE; screenInfoPtr->fDecoration = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-rootless' argument */ if (IS_OPTION("-rootless")) { if (!screenInfoPtr->fMultiMonitorOverride) screenInfoPtr->fMultipleMonitors = FALSE; screenInfoPtr->fRootless = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-multiwindow' argument */ if (IS_OPTION("-multiwindow")) { if (!screenInfoPtr->fMultiMonitorOverride) screenInfoPtr->fMultipleMonitors = TRUE; screenInfoPtr->fMultiWindow = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-compositewm' argument */ if (IS_OPTION("-compositewm")) { screenInfoPtr->fCompositeWM = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-nocompositewm' argument */ if (IS_OPTION("-nocompositewm")) { screenInfoPtr->fCompositeWM = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-compositealpha' argument */ if (IS_OPTION("-compositealpha")) { g_fCompositeAlpha = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-nocompositealpha' argument */ if (IS_OPTION("-nocompositealpha")) { g_fCompositeAlpha = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-multiplemonitors' argument */ if (IS_OPTION("-multiplemonitors") || IS_OPTION("-multimonitors")) { screenInfoPtr->fMultiMonitorOverride = TRUE; screenInfoPtr->fMultipleMonitors = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-nomultiplemonitors' argument */ if (IS_OPTION("-nomultiplemonitors") || IS_OPTION("-nomultimonitors")) { screenInfoPtr->fMultiMonitorOverride = TRUE; screenInfoPtr->fMultipleMonitors = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-scrollbars' argument */ if (IS_OPTION("-scrollbars")) { screenInfoPtr->iResizeMode = resizeWithScrollbars; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-resize' argument */ if (IS_OPTION("-resize") || IS_OPTION("-noresize") || (strncmp(argv[i], "-resize=", strlen("-resize=")) == 0)) { winResizeMode mode; if (IS_OPTION("-resize")) mode = resizeWithRandr; else if (IS_OPTION("-noresize")) mode = resizeNotAllowed; else if (strncmp(argv[i], "-resize=", strlen("-resize=")) == 0) { char *option = argv[i] + strlen("-resize="); if (strcmp(option, "randr") == 0) mode = resizeWithRandr; else if (strcmp(option, "scrollbars") == 0) mode = resizeWithScrollbars; else if (strcmp(option, "none") == 0) mode = resizeNotAllowed; else { ErrorF("ddxProcessArgument - resize - Invalid resize mode %s\n", option); return 0; } } else { ErrorF("ddxProcessArgument - resize - Invalid resize option %s\n", argv[i]); return 0; } screenInfoPtr->iResizeMode = mode; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-clipboard' argument */ if (IS_OPTION("-clipboard")) { /* Now the default, we still accept the arg for backwards compatibility */ g_fClipboard = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-noclipboard' argument */ if (IS_OPTION("-noclipboard")) { g_fClipboard = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-primary' argument */ if (IS_OPTION("-primary")) { fPrimarySelection = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-noprimary' argument */ if (IS_OPTION("-noprimary")) { fPrimarySelection = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-ignoreinput' argument */ if (IS_OPTION("-ignoreinput")) { screenInfoPtr->fIgnoreInput = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-emulate3buttons' argument */ if (IS_OPTION("-emulate3buttons")) { int iArgsProcessed = 1; int iE3BTimeout = WIN_DEFAULT_E3B_TIME; /* Grab the optional timeout value */ if (i + 1 < argc && 1 == sscanf(argv[i + 1], "%d", &iE3BTimeout)) { /* Indicate that we have processed the next argument */ iArgsProcessed++; } else { /* * sscanf () won't modify iE3BTimeout if it doesn't find * the specified format; however, I want to be explicit * about setting the default timeout in such cases to * prevent some programs (me) from getting confused. */ iE3BTimeout = WIN_DEFAULT_E3B_TIME; } screenInfoPtr->iE3BTimeout = iE3BTimeout; /* Indicate that we have processed this argument */ return iArgsProcessed; } /* * Look for the '-noemulate3buttons' argument */ if (IS_OPTION("-noemulate3buttons")) { screenInfoPtr->iE3BTimeout = WIN_E3B_OFF; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-depth n' argument */ if (IS_OPTION("-depth")) { DWORD dwBPP = 0; /* Display the usage message if the argument is malformed */ if (++i >= argc) { UseMsg(); return 0; } /* Grab the argument */ dwBPP = atoi(argv[i]); screenInfoPtr->dwBPP = dwBPP; /* Indicate that we have processed the argument */ return 2; } /* * Look for the '-refresh n' argument */ if (IS_OPTION("-refresh")) { DWORD dwRefreshRate = 0; /* Display the usage message if the argument is malformed */ if (++i >= argc) { UseMsg(); return 0; } /* Grab the argument */ dwRefreshRate = atoi(argv[i]); screenInfoPtr->dwRefreshRate = dwRefreshRate; /* Indicate that we have processed the argument */ return 2; } /* * Look for the '-clipupdates num_boxes' argument */ if (IS_OPTION("-clipupdates")) { DWORD dwNumBoxes = 0; /* Display the usage message if the argument is malformed */ if (++i >= argc) { UseMsg(); return 0; } /* Grab the argument */ dwNumBoxes = atoi(argv[i]); screenInfoPtr->dwClipUpdatesNBoxes = dwNumBoxes; /* Indicate that we have processed the argument */ return 2; } #ifdef XWIN_EMULATEPSEUDO /* * Look for the '-emulatepseudo' argument */ if (IS_OPTION("-emulatepseudo")) { screenInfoPtr->fEmulatePseudo = TRUE; /* Indicate that we have processed this argument */ return 1; } #endif /* * Look for the '-nowinkill' argument */ if (IS_OPTION("-nowinkill")) { screenInfoPtr->fUseWinKillKey = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-winkill' argument */ if (IS_OPTION("-winkill")) { screenInfoPtr->fUseWinKillKey = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-nounixkill' argument */ if (IS_OPTION("-nounixkill")) { screenInfoPtr->fUseUnixKillKey = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-unixkill' argument */ if (IS_OPTION("-unixkill")) { screenInfoPtr->fUseUnixKillKey = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-notrayicon' argument */ if (IS_OPTION("-notrayicon")) { screenInfoPtr->fNoTrayIcon = TRUE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-trayicon' argument */ if (IS_OPTION("-trayicon")) { screenInfoPtr->fNoTrayIcon = FALSE; /* Indicate that we have processed this argument */ return 1; } /* * Look for the '-fp' argument */ if (IS_OPTION("-fp")) { CHECK_ARGS(1); g_cmdline.fontPath = argv[++i]; return 0; /* Let DIX parse this again */ } /* * Look for the '-query' argument */ if (IS_OPTION("-query")) { CHECK_ARGS(1); g_fXdmcpEnabled = TRUE; g_pszQueryHost = argv[++i]; return 0; /* Let DIX parse this again */ } /* * Look for the '-auth' argument */ if (IS_OPTION("-auth")) { g_fAuthEnabled = TRUE; return 0; /* Let DIX parse this again */ } /* * Look for the '-indirect' or '-broadcast' arguments */ if (IS_OPTION("-indirect") || IS_OPTION("-broadcast")) { g_fXdmcpEnabled = TRUE; return 0; /* Let DIX parse this again */ } /* * Look for the '-config' argument */ if (IS_OPTION("-config") || IS_OPTION("-xf86config")) { CHECK_ARGS(1); #ifdef XWIN_XF86CONFIG g_cmdline.configFile = argv[++i]; #else winMessageBoxF("The %s option is not supported in this " "release.\n" "Ignoring this option and continuing.\n", MB_ICONINFORMATION, argv[i]); #endif return 2; } /* * Look for the '-configdir' argument */ if (IS_OPTION("-configdir")) { CHECK_ARGS(1); #ifdef XWIN_XF86CONFIG g_cmdline.configDir = argv[++i]; #else winMessageBoxF("The %s option is not supported in this " "release.\n" "Ignoring this option and continuing.\n", MB_ICONINFORMATION, argv[i]); #endif return 2; } /* * Look for the '-keyboard' argument */ if (IS_OPTION("-keyboard")) { #ifdef XWIN_XF86CONFIG CHECK_ARGS(1); g_cmdline.keyboard = argv[++i]; #else winMessageBoxF("The -keyboard option is not supported in this " "release.\n" "Ignoring this option and continuing.\n", MB_ICONINFORMATION); #endif return 2; } /* * Look for the '-logfile' argument */ if (IS_OPTION("-logfile")) { CHECK_ARGS(1); g_pszLogFile = argv[++i]; #ifdef RELOCATE_PROJECTROOT g_fLogFileChanged = TRUE; #endif return 2; } /* * Look for the '-logverbose' argument */ if (IS_OPTION("-logverbose")) { CHECK_ARGS(1); g_iLogVerbose = atoi(argv[++i]); return 2; } if (IS_OPTION("-xkbrules")) { CHECK_ARGS(1); g_cmdline.xkbRules = argv[++i]; return 2; } if (IS_OPTION("-xkbmodel")) { CHECK_ARGS(1); g_cmdline.xkbModel = argv[++i]; return 2; } if (IS_OPTION("-xkblayout")) { CHECK_ARGS(1); g_cmdline.xkbLayout = argv[++i]; return 2; } if (IS_OPTION("-xkbvariant")) { CHECK_ARGS(1); g_cmdline.xkbVariant = argv[++i]; return 2; } if (IS_OPTION("-xkboptions")) { CHECK_ARGS(1); g_cmdline.xkbOptions = argv[++i]; return 2; } if (IS_OPTION("-keyhook")) { g_fKeyboardHookLL = TRUE; return 1; } if (IS_OPTION("-nokeyhook")) { g_fKeyboardHookLL = FALSE; return 1; } if (IS_OPTION("-swcursor")) { g_fSoftwareCursor = TRUE; return 1; } if (IS_OPTION("-wgl")) { g_fNativeGl = TRUE; return 1; } if (IS_OPTION("-nowgl")) { g_fNativeGl = FALSE; return 1; } if (IS_OPTION("-hostintitle")) { g_fHostInTitle = TRUE; return 1; } if (IS_OPTION("-nohostintitle")) { g_fHostInTitle = FALSE; return 1; } if (IS_OPTION("-icon")) { char *iconspec; CHECK_ARGS(1); iconspec = argv[++i]; screenInfoPtr->hIcon = LoadImageComma(iconspec, NULL, GetSystemMetrics(SM_CXICON), GetSystemMetrics(SM_CYICON), 0); screenInfoPtr->hIconSm = LoadImageComma(iconspec, NULL, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), LR_DEFAULTSIZE); if ((screenInfoPtr->hIcon == NULL) || (screenInfoPtr->hIconSm == NULL)) { ErrorF("ddxProcessArgument - icon - Invalid icon specification %s\n", iconspec); exit(1); } /* Indicate that we have processed the argument */ return 2; } return 0; } /* * winLogCommandLine - Write entire command line to the log file */ void winLogCommandLine(int argc, char *argv[]) { int i; int iSize = 0; int iCurrLen = 0; #define CHARS_PER_LINE 60 /* Bail if command line has already been logged */ if (g_pszCommandLine) return; /* Count how much memory is needed for concatenated command line */ for (i = 0, iCurrLen = 0; i < argc; ++i) if (argv[i]) { /* Adds two characters for lines that overflow */ if ((strlen(argv[i]) < CHARS_PER_LINE && iCurrLen + strlen(argv[i]) > CHARS_PER_LINE) || strlen(argv[i]) > CHARS_PER_LINE) { iCurrLen = 0; iSize += 2; } /* Add space for item and trailing space */ iSize += strlen(argv[i]) + 1; /* Update current line length */ iCurrLen += strlen(argv[i]); } /* Allocate memory for concatenated command line */ g_pszCommandLine = malloc(iSize + 1); if (!g_pszCommandLine) FatalError("winLogCommandLine - Could not allocate memory for " "command line string. Exiting.\n"); /* Set first character to concatenated command line to null */ g_pszCommandLine[0] = '\0'; /* Loop through all args */ for (i = 0, iCurrLen = 0; i < argc; ++i) { /* Add a character for lines that overflow */ if ((strlen(argv[i]) < CHARS_PER_LINE && iCurrLen + strlen(argv[i]) > CHARS_PER_LINE) || strlen(argv[i]) > CHARS_PER_LINE) { iCurrLen = 0; /* Add line break if it fits */ strncat(g_pszCommandLine, "\n ", iSize - strlen(g_pszCommandLine)); } strncat(g_pszCommandLine, argv[i], iSize - strlen(g_pszCommandLine)); strncat(g_pszCommandLine, " ", iSize - strlen(g_pszCommandLine)); /* Save new line length */ iCurrLen += strlen(argv[i]); } ErrorF("XWin was started with the following command line:\n\n" "%s\n\n", g_pszCommandLine); } /* * winLogVersionInfo - Log version information */ void winLogVersionInfo(void) { static Bool s_fBeenHere = FALSE; if (s_fBeenHere) return; s_fBeenHere = TRUE; ErrorF("Welcome to the XWin X Server\n"); ErrorF("Vendor: %s\n", XVENDORNAME); ErrorF("Release: %d.%d.%d.%d\n", XORG_VERSION_MAJOR, XORG_VERSION_MINOR, XORG_VERSION_PATCH, XORG_VERSION_SNAP); #ifdef HAVE_SYS_UTSNAME_H { struct utsname name; if (uname(&name) >= 0) { ErrorF("OS: %s %s %s %s %s\n", name.sysname, name.nodename, name.release, name.version, name.machine); } } #endif winOS(); if (strlen(BUILDERSTRING)) ErrorF("%s\n", BUILDERSTRING); ErrorF("Contact: %s\n", BUILDERADDR); ErrorF("\n"); } xorg-server-21.1.16/hw/xwin/winscrinit.c0000644000175000017500000004253714757411105013606 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II * Kensuke Matsuzaki */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" /* * Determine what type of screen we are initializing * and call the appropriate procedure to initialize * that type of screen. */ Bool winScreenInit(ScreenPtr pScreen, int argc, char **argv) { winScreenInfoPtr pScreenInfo = &g_ScreenInfo[pScreen->myNum]; winPrivScreenPtr pScreenPriv; HDC hdc; DWORD dwInitialBPP; #if CYGDEBUG || YES winDebug("winScreenInit - dwWidth: %u dwHeight: %u\n", (unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwHeight); #endif /* Allocate privates for this screen */ if (!winAllocatePrivates(pScreen)) { ErrorF("winScreenInit - Couldn't allocate screen privates\n"); return FALSE; } /* Get a pointer to the privates structure that was allocated */ pScreenPriv = winGetScreenPriv(pScreen); /* Save a pointer to this screen in the screen info structure */ pScreenInfo->pScreen = pScreen; /* Save a pointer to the screen info in the screen privates structure */ /* This allows us to get back to the screen info from a screen pointer */ pScreenPriv->pScreenInfo = pScreenInfo; /* * Determine which engine to use. * * NOTE: This is done once per screen because each screen possibly has * a preferred engine specified on the command line. */ if (!winSetEngine(pScreen)) { ErrorF("winScreenInit - winSetEngine () failed\n"); return FALSE; } /* Horribly misnamed function: Allow engine to adjust BPP for screen */ dwInitialBPP = pScreenInfo->dwBPP; if (!(*pScreenPriv->pwinAdjustVideoMode) (pScreen)) { ErrorF("winScreenInit - winAdjustVideoMode () failed\n"); return FALSE; } if (dwInitialBPP == WIN_DEFAULT_BPP) { /* No -depth parameter was passed, let the user know the depth being used */ ErrorF ("winScreenInit - Using Windows display depth of %d bits per pixel\n", (int) pScreenInfo->dwBPP); } else if (dwInitialBPP != pScreenInfo->dwBPP) { /* Warn user if engine forced a depth different to -depth parameter */ ErrorF ("winScreenInit - Command line depth of %d bpp overridden by engine, using %d bpp\n", (int) dwInitialBPP, (int) pScreenInfo->dwBPP); } else { ErrorF("winScreenInit - Using command line depth of %d bpp\n", (int) pScreenInfo->dwBPP); } /* Check for supported display depth */ if (!(WIN_SUPPORTED_BPPS & (1 << (pScreenInfo->dwBPP - 1)))) { ErrorF("winScreenInit - Unsupported display depth: %d\n" "Change your Windows display depth to 15, 16, 24, or 32 bits " "per pixel.\n", (int) pScreenInfo->dwBPP); ErrorF("winScreenInit - Supported depths: %08x\n", WIN_SUPPORTED_BPPS); #if WIN_CHECK_DEPTH return FALSE; #endif } /* * Check that all monitors have the same display depth if we are using * multiple monitors */ if (pScreenInfo->fMultipleMonitors && !GetSystemMetrics(SM_SAMEDISPLAYFORMAT)) { ErrorF("winScreenInit - Monitors do not all have same pixel format / " "display depth.\n"); if (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI) { ErrorF ("winScreenInit - Performance may suffer off primary display.\n"); } else { ErrorF("winScreenInit - Using primary display only.\n"); pScreenInfo->fMultipleMonitors = FALSE; } } /* Create display window */ if (!(*pScreenPriv->pwinCreateBoundingWindow) (pScreen)) { ErrorF("winScreenInit - pwinCreateBoundingWindow () " "failed\n"); return FALSE; } /* Get a device context */ hdc = GetDC(pScreenPriv->hwndScreen); /* Are we using multiple monitors? */ if (pScreenInfo->fMultipleMonitors) { /* * In this case, some of the defaults set in * winInitializeScreenDefaults() are not correct ... */ if (!pScreenInfo->fUserGaveHeightAndWidth) { pScreenInfo->dwWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); pScreenInfo->dwHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); } } /* Release the device context */ ReleaseDC(pScreenPriv->hwndScreen, hdc); /* Clear the visuals list */ miClearVisualTypes(); /* Call the engine dependent screen initialization procedure */ if (!((*pScreenPriv->pwinFinishScreenInit) (pScreen->myNum, pScreen, argc, argv))) { ErrorF("winScreenInit - winFinishScreenInit () failed\n"); /* call the engine dependent screen close procedure to clean up from a failure */ pScreenPriv->pwinCloseScreen(pScreen); return FALSE; } if (!g_fSoftwareCursor) winInitCursor(pScreen); else winErrorFVerb(2, "winScreenInit - Using software cursor\n"); if (!noPanoramiXExtension) { /* Note the screen origin in a normalized coordinate space where (0,0) is at the top left of the native virtual desktop area */ pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", pScreen->myNum, pScreen->x, pScreen->y); } #if CYGDEBUG || YES winDebug("winScreenInit - returning\n"); #endif return TRUE; } static Bool winCreateScreenResources(ScreenPtr pScreen) { winScreenPriv(pScreen); Bool result; result = pScreenPriv->pwinCreateScreenResources(pScreen); /* Now the screen bitmap has been wrapped in a pixmap, add that to the Shadow framebuffer */ if (!shadowAdd(pScreen, pScreen->devPrivate, pScreenPriv->pwinShadowUpdate, NULL, 0, 0)) { ErrorF("winCreateScreenResources - shadowAdd () failed\n"); return FALSE; } return result; } /* See Porting Layer Definition - p. 20 */ Bool winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; VisualPtr pVisual = NULL; int iReturn; /* Create framebuffer */ if (!(*pScreenPriv->pwinInitScreen) (pScreen)) { ErrorF("winFinishScreenInitFB - Could not allocate framebuffer\n"); return FALSE; } /* * Calculate the number of bits that are used to represent color in each pixel, * the color depth for the screen */ if (pScreenInfo->dwBPP == 8) pScreenInfo->dwDepth = 8; else pScreenInfo->dwDepth = winCountBits(pScreenPriv->dwRedMask) + winCountBits(pScreenPriv->dwGreenMask) + winCountBits(pScreenPriv->dwBlueMask); winErrorFVerb(2, "winFinishScreenInitFB - Masks: %08x %08x %08x\n", (unsigned int) pScreenPriv->dwRedMask, (unsigned int) pScreenPriv->dwGreenMask, (unsigned int) pScreenPriv->dwBlueMask); /* Init visuals */ if (!(*pScreenPriv->pwinInitVisuals) (pScreen)) { ErrorF("winFinishScreenInitFB - winInitVisuals failed\n"); return FALSE; } if ((pScreenInfo->dwBPP == 8) && (pScreenInfo->fCompositeWM)) { ErrorF("-compositewm disabled due to 8bpp depth\n"); pScreenInfo->fCompositeWM = FALSE; } /* Apparently we need this for the render extension */ miSetPixmapDepths(); /* Start fb initialization */ if (!fbSetupScreen(pScreen, pScreenInfo->pfb, pScreenInfo->dwWidth, pScreenInfo->dwHeight, monitorResolution, monitorResolution, pScreenInfo->dwStride, pScreenInfo->dwBPP)) { ErrorF("winFinishScreenInitFB - fbSetupScreen failed\n"); return FALSE; } /* Override default colormap routines if visual class is dynamic */ if (pScreenInfo->dwDepth == 8 && (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI || (pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL && pScreenInfo->fFullScreen))) { winSetColormapFunctions(pScreen); /* * NOTE: Setting whitePixel to 255 causes Magic 7.1 to allocate its * own colormap, as it cannot allocate 7 planes in the default * colormap. Setting whitePixel to 1 allows Magic to get 7 * planes in the default colormap, so it doesn't create its * own colormap. This latter situation is highly desirable, * as it keeps the Magic window viewable when switching to * other X clients that use the default colormap. */ pScreen->blackPixel = 0; pScreen->whitePixel = 1; } /* Finish fb initialization */ if (!fbFinishScreenInit(pScreen, pScreenInfo->pfb, pScreenInfo->dwWidth, pScreenInfo->dwHeight, monitorResolution, monitorResolution, pScreenInfo->dwStride, pScreenInfo->dwBPP)) { ErrorF("winFinishScreenInitFB - fbFinishScreenInit failed\n"); return FALSE; } /* Save a pointer to the root visual */ for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++); pScreenPriv->pRootVisual = pVisual; /* * Setup points to the block and wakeup handlers. Pass a pointer * to the current screen as pWakeupdata. */ pScreen->BlockHandler = winBlockHandler; pScreen->WakeupHandler = winWakeupHandler; /* Render extension initialization, calls miPictureInit */ if (!fbPictureInit(pScreen, NULL, 0)) { ErrorF("winFinishScreenInitFB - fbPictureInit () failed\n"); return FALSE; } #ifdef RANDR /* Initialize resize and rotate support */ if (!winRandRInit(pScreen)) { ErrorF("winFinishScreenInitFB - winRandRInit () failed\n"); return FALSE; } #endif /* Setup the cursor routines */ #if CYGDEBUG winDebug("winFinishScreenInitFB - Calling miDCInitialize ()\n"); #endif miDCInitialize(pScreen, &g_winPointerCursorFuncs); /* KDrive does winCreateDefColormap right after miDCInitialize */ /* Create a default colormap */ #if CYGDEBUG winDebug("winFinishScreenInitFB - Calling winCreateDefColormap ()\n"); #endif if (!winCreateDefColormap(pScreen)) { ErrorF("winFinishScreenInitFB - Could not create colormap\n"); return FALSE; } /* Initialize the shadow framebuffer layer */ if ((pScreenInfo->dwEngine == WIN_SERVER_SHADOW_GDI || pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) { #if CYGDEBUG winDebug("winFinishScreenInitFB - Calling shadowSetup ()\n"); #endif if (!shadowSetup(pScreen)) { ErrorF("winFinishScreenInitFB - shadowSetup () failed\n"); return FALSE; } /* Wrap CreateScreenResources so we can add the screen pixmap to the Shadow framebuffer after it's been created */ pScreenPriv->pwinCreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = winCreateScreenResources; } /* Handle rootless mode */ if (pScreenInfo->fRootless) { /* Define the WRAP macro temporarily for local use */ #define WRAP(a) \ if (pScreen->a) { \ pScreenPriv->a = pScreen->a; \ } else { \ winDebug("winScreenInit - null screen fn " #a "\n"); \ pScreenPriv->a = NULL; \ } /* Save a pointer to each lower-level window procedure */ WRAP(CreateWindow); WRAP(DestroyWindow); WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(PositionWindow); WRAP(ChangeWindowAttributes); WRAP(SetShape); /* Assign rootless window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowRootless; pScreen->DestroyWindow = winDestroyWindowRootless; pScreen->PositionWindow = winPositionWindowRootless; /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesRootless; */ pScreen->RealizeWindow = winMapWindowRootless; pScreen->UnrealizeWindow = winUnmapWindowRootless; pScreen->SetShape = winSetShapeRootless; /* Undefine the WRAP macro, as it is not needed elsewhere */ #undef WRAP } /* Handle multi window mode */ else if (pScreenInfo->fMultiWindow) { /* Define the WRAP macro temporarily for local use */ #define WRAP(a) \ if (pScreen->a) { \ pScreenPriv->a = pScreen->a; \ } else { \ winDebug("null screen fn " #a "\n"); \ pScreenPriv->a = NULL; \ } /* Save a pointer to each lower-level window procedure */ WRAP(CreateWindow); WRAP(DestroyWindow); WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(PositionWindow); WRAP(ChangeWindowAttributes); WRAP(ReparentWindow); WRAP(RestackWindow); WRAP(ResizeWindow); WRAP(MoveWindow); WRAP(CopyWindow); WRAP(SetShape); WRAP(ModifyPixmapHeader); /* Assign multi-window window procedures to be top level procedures */ pScreen->CreateWindow = winCreateWindowMultiWindow; pScreen->DestroyWindow = winDestroyWindowMultiWindow; pScreen->PositionWindow = winPositionWindowMultiWindow; /*pScreen->ChangeWindowAttributes = winChangeWindowAttributesMultiWindow; */ pScreen->RealizeWindow = winMapWindowMultiWindow; pScreen->UnrealizeWindow = winUnmapWindowMultiWindow; pScreen->ReparentWindow = winReparentWindowMultiWindow; pScreen->RestackWindow = winRestackWindowMultiWindow; pScreen->ResizeWindow = winResizeWindowMultiWindow; pScreen->MoveWindow = winMoveWindowMultiWindow; pScreen->CopyWindow = winCopyWindowMultiWindow; pScreen->SetShape = winSetShapeMultiWindow; if (pScreenInfo->fCompositeWM) { pScreen->CreatePixmap = winCreatePixmapMultiwindow; pScreen->DestroyPixmap = winDestroyPixmapMultiwindow; pScreen->ModifyPixmapHeader = winModifyPixmapHeaderMultiwindow; } /* Undefine the WRAP macro, as it is not needed elsewhere */ #undef WRAP } /* Wrap either fb's or shadow's CloseScreen with our CloseScreen */ pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = pScreenPriv->pwinCloseScreen; /* Create a mutex for modules in separate threads to wait for */ iReturn = pthread_mutex_init(&pScreenPriv->pmServerStarted, NULL); if (iReturn != 0) { ErrorF("winFinishScreenInitFB - pthread_mutex_init () failed: %d\n", iReturn); return FALSE; } /* Own the mutex for modules in separate threads */ iReturn = pthread_mutex_lock(&pScreenPriv->pmServerStarted); if (iReturn != 0) { ErrorF("winFinishScreenInitFB - pthread_mutex_lock () failed: %d\n", iReturn); return FALSE; } /* Set the ServerStarted flag to false */ pScreenPriv->fServerStarted = FALSE; if (pScreenInfo->fMultiWindow) { #if CYGDEBUG || YES winDebug("winFinishScreenInitFB - Calling winInitWM.\n"); #endif /* Initialize multi window mode */ if (!winInitWM(&pScreenPriv->pWMInfo, &pScreenPriv->ptWMProc, &pScreenPriv->ptXMsgProc, &pScreenPriv->pmServerStarted, pScreenInfo->dwScreen, (HWND) &pScreenPriv->hwndScreen, pScreenInfo->fCompositeWM)) { ErrorF("winFinishScreenInitFB - winInitWM () failed.\n"); return FALSE; } } /* Tell the server that we are enabled */ pScreenPriv->fEnabled = TRUE; /* Tell the server that we have a valid depth */ pScreenPriv->fBadDepth = FALSE; #if CYGDEBUG || YES winDebug("winFinishScreenInitFB - returning\n"); #endif return TRUE; } xorg-server-21.1.16/hw/xwin/winshadddnl.c0000644000175000017500000012015114757411105013701 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #define FAIL_MSG_MAX_BLT 10 /* * Local prototypes */ static Bool winAllocateFBShadowDDNL(ScreenPtr pScreen); static void winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf); static Bool winCloseScreenShadowDDNL(ScreenPtr pScreen); static Bool winInitVisualsShadowDDNL(ScreenPtr pScreen); static Bool winAdjustVideoModeShadowDDNL(ScreenPtr pScreen); static Bool winBltExposedRegionsShadowDDNL(ScreenPtr pScreen); static Bool winActivateAppShadowDDNL(ScreenPtr pScreen); static Bool winRedrawScreenShadowDDNL(ScreenPtr pScreen); static Bool winRealizeInstalledPaletteShadowDDNL(ScreenPtr pScreen); static Bool winInstallColormapShadowDDNL(ColormapPtr pColormap); static Bool winStoreColorsShadowDDNL(ColormapPtr pmap, int ndef, xColorItem * pdefs); static Bool winCreateColormapShadowDDNL(ColormapPtr pColormap); static Bool winDestroyColormapShadowDDNL(ColormapPtr pColormap); static Bool winCreatePrimarySurfaceShadowDDNL(ScreenPtr pScreen); static Bool winReleasePrimarySurfaceShadowDDNL(ScreenPtr pScreen); /* * Create the primary surface and attach the clipper. * Used for both the initial surface creation and during * WM_DISPLAYCHANGE messages. */ static Bool winCreatePrimarySurfaceShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); HRESULT ddrval = DD_OK; DDSURFACEDESC2 ddsd; winDebug("winCreatePrimarySurfaceShadowDDNL - Creating primary surface\n"); /* Describe the primary surface */ ZeroMemory(&ddsd, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE; /* Create the primary surface */ ddrval = IDirectDraw4_CreateSurface(pScreenPriv->pdd4, &ddsd, &pScreenPriv->pddsPrimary4, NULL); pScreenPriv->fRetryCreateSurface = FALSE; if (FAILED(ddrval)) { if (ddrval == DDERR_NOEXCLUSIVEMODE) { /* Recreating the surface failed. Mark screen to retry later */ pScreenPriv->fRetryCreateSurface = TRUE; winDebug("winCreatePrimarySurfaceShadowDDNL - Could not create " "primary surface: DDERR_NOEXCLUSIVEMODE\n"); } else { ErrorF("winCreatePrimarySurfaceShadowDDNL - Could not create " "primary surface: %08x\n", (unsigned int) ddrval); } return FALSE; } #if 1 winDebug("winCreatePrimarySurfaceShadowDDNL - Created primary surface\n"); #endif /* Attach our clipper to our primary surface handle */ ddrval = IDirectDrawSurface4_SetClipper(pScreenPriv->pddsPrimary4, pScreenPriv->pddcPrimary); if (FAILED(ddrval)) { ErrorF("winCreatePrimarySurfaceShadowDDNL - Primary attach clipper " "failed: %08x\n", (unsigned int) ddrval); return FALSE; } #if 1 winDebug("winCreatePrimarySurfaceShadowDDNL - Attached clipper to primary " "surface\n"); #endif /* Everything was correct */ return TRUE; } /* * Detach the clipper and release the primary surface. * Called from WM_DISPLAYCHANGE. */ static Bool winReleasePrimarySurfaceShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winDebug("winReleasePrimarySurfaceShadowDDNL - Hello\n"); /* Release the primary surface and clipper, if they exist */ if (pScreenPriv->pddsPrimary4) { /* * Detach the clipper from the primary surface. * NOTE: We do this explicity for clarity. The Clipper is not released. */ IDirectDrawSurface4_SetClipper(pScreenPriv->pddsPrimary4, NULL); winDebug("winReleasePrimarySurfaceShadowDDNL - Detached clipper\n"); /* Release the primary surface */ IDirectDrawSurface4_Release(pScreenPriv->pddsPrimary4); pScreenPriv->pddsPrimary4 = NULL; } winDebug("winReleasePrimarySurfaceShadowDDNL - Released primary surface\n"); return TRUE; } /* * Create a DirectDraw surface for the shadow framebuffer; also create * a primary surface object so we can blit to the display. * * Install a DirectDraw clipper on our primary surface object * that clips our blits to the unobscured client area of our display window. */ Bool winAllocateFBShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; HRESULT ddrval = DD_OK; DDSURFACEDESC2 ddsdShadow; char *lpSurface = NULL; DDPIXELFORMAT ddpfPrimary; #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - w %u h %u d %u\n", (unsigned int)pScreenInfo->dwWidth, (unsigned int)pScreenInfo->dwHeight, (unsigned int)pScreenInfo->dwDepth); #endif /* Set the padded screen width */ pScreenInfo->dwPaddedWidth = PixmapBytePad(pScreenInfo->dwWidth, pScreenInfo->dwBPP); /* Allocate memory for our shadow surface */ lpSurface = malloc(pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight); if (lpSurface == NULL) { ErrorF("winAllocateFBShadowDDNL - Could not allocate bits\n"); return FALSE; } /* * Initialize the framebuffer memory so we don't get a * strange display at startup */ ZeroMemory(lpSurface, pScreenInfo->dwPaddedWidth * pScreenInfo->dwHeight); /* Create a clipper */ ddrval = (*g_fpDirectDrawCreateClipper) (0, &pScreenPriv->pddcPrimary, NULL); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not attach clipper: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - Created a clipper\n"); #endif /* Attach the clipper to our display window */ ddrval = IDirectDrawClipper_SetHWnd(pScreenPriv->pddcPrimary, 0, pScreenPriv->hwndScreen); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Clipper not attached " "to window: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - Attached clipper to window\n"); #endif /* Create a DirectDraw object, store the address at lpdd */ ddrval = (*g_fpDirectDrawCreate) (NULL, (LPDIRECTDRAW *) &pScreenPriv->pdd, NULL); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not start " "DirectDraw: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - Created and initialized DD\n"); #endif /* Get a DirectDraw4 interface pointer */ ddrval = IDirectDraw_QueryInterface(pScreenPriv->pdd, &IID_IDirectDraw4, (LPVOID *) &pScreenPriv->pdd4); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Failed DD4 query: %08x\n", (unsigned int) ddrval); return FALSE; } /* Are we full screen? */ if (pScreenInfo->fFullScreen) { DDSURFACEDESC2 ddsdCurrent; DWORD dwRefreshRateCurrent = 0; HDC hdc = NULL; /* Set the cooperative level to full screen */ ddrval = IDirectDraw4_SetCooperativeLevel(pScreenPriv->pdd4, pScreenPriv->hwndScreen, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not set " "cooperative level: %08x\n", (unsigned int) ddrval); return FALSE; } /* * We only need to get the current refresh rate for comparison * if a refresh rate has been passed on the command line. */ if (pScreenInfo->dwRefreshRate != 0) { ZeroMemory(&ddsdCurrent, sizeof(ddsdCurrent)); ddsdCurrent.dwSize = sizeof(ddsdCurrent); /* Get information about current display settings */ ddrval = IDirectDraw4_GetDisplayMode(pScreenPriv->pdd4, &ddsdCurrent); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not get current " "refresh rate: %08x. Continuing.\n", (unsigned int) ddrval); dwRefreshRateCurrent = 0; } else { /* Grab the current refresh rate */ dwRefreshRateCurrent = ddsdCurrent.u2.dwRefreshRate; } } /* Clean up the refresh rate */ if (dwRefreshRateCurrent == pScreenInfo->dwRefreshRate) { /* * Refresh rate is non-specified or equal to current. */ pScreenInfo->dwRefreshRate = 0; } /* Grab a device context for the screen */ hdc = GetDC(NULL); if (hdc == NULL) { ErrorF("winAllocateFBShadowDDNL - GetDC () failed\n"); return FALSE; } /* Only change the video mode when different than current mode */ if (!pScreenInfo->fMultipleMonitors && (pScreenInfo->dwWidth != GetSystemMetrics(SM_CXSCREEN) || pScreenInfo->dwHeight != GetSystemMetrics(SM_CYSCREEN) || pScreenInfo->dwBPP != GetDeviceCaps(hdc, BITSPIXEL) || pScreenInfo->dwRefreshRate != 0)) { winDebug("winAllocateFBShadowDDNL - Changing video mode\n"); /* Change the video mode to the mode requested, and use the driver default refresh rate on failure */ ddrval = IDirectDraw4_SetDisplayMode(pScreenPriv->pdd4, pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenInfo->dwBPP, pScreenInfo->dwRefreshRate, 0); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not set " "full screen display mode: %08x\n", (unsigned int) ddrval); ErrorF ("winAllocateFBShadowDDNL - Using default driver refresh rate\n"); ddrval = IDirectDraw4_SetDisplayMode(pScreenPriv->pdd4, pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenInfo->dwBPP, 0, 0); if (FAILED(ddrval)) { ErrorF ("winAllocateFBShadowDDNL - Could not set default refresh rate " "full screen display mode: %08x\n", (unsigned int) ddrval); return FALSE; } } } else { winDebug("winAllocateFBShadowDDNL - Not changing video mode\n"); } /* Release our DC */ ReleaseDC(NULL, hdc); hdc = NULL; } else { /* Set the cooperative level for windowed mode */ ddrval = IDirectDraw4_SetCooperativeLevel(pScreenPriv->pdd4, pScreenPriv->hwndScreen, DDSCL_NORMAL); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not set " "cooperative level: %08x\n", (unsigned int) ddrval); return FALSE; } } /* Create the primary surface */ if (!winCreatePrimarySurfaceShadowDDNL(pScreen)) { ErrorF("winAllocateFBShadowDDNL - winCreatePrimarySurfaceShadowDDNL " "failed\n"); return FALSE; } /* Get primary surface's pixel format */ ZeroMemory(&ddpfPrimary, sizeof(ddpfPrimary)); ddpfPrimary.dwSize = sizeof(ddpfPrimary); ddrval = IDirectDrawSurface4_GetPixelFormat(pScreenPriv->pddsPrimary4, &ddpfPrimary); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not get primary " "pixformat: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - Primary masks: %08x %08x %08x " "dwRGBBitCount: %u\n", (unsigned int)ddpfPrimary.u2.dwRBitMask, (unsigned int)ddpfPrimary.u3.dwGBitMask, (unsigned int)ddpfPrimary.u4.dwBBitMask, (unsigned int)ddpfPrimary.u1.dwRGBBitCount); #endif /* Describe the shadow surface to be created */ /* * NOTE: Do not use a DDSCAPS_VIDEOMEMORY surface, * as drawing, locking, and unlocking take forever * with video memory surfaces. In addition, * video memory is a somewhat scarce resource, * so you shouldn't be allocating video memory when * you have the option of using system memory instead. */ ZeroMemory(&ddsdShadow, sizeof(ddsdShadow)); ddsdShadow.dwSize = sizeof(ddsdShadow); ddsdShadow.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_LPSURFACE | DDSD_PITCH | DDSD_PIXELFORMAT; ddsdShadow.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY; ddsdShadow.dwHeight = pScreenInfo->dwHeight; ddsdShadow.dwWidth = pScreenInfo->dwWidth; ddsdShadow.u1.lPitch = pScreenInfo->dwPaddedWidth; ddsdShadow.lpSurface = lpSurface; ddsdShadow.u4.ddpfPixelFormat = ddpfPrimary; winDebug("winAllocateFBShadowDDNL - lPitch: %d\n", (int) pScreenInfo->dwPaddedWidth); /* Create the shadow surface */ ddrval = IDirectDraw4_CreateSurface(pScreenPriv->pdd4, &ddsdShadow, &pScreenPriv->pddsShadow4, NULL); if (FAILED(ddrval)) { ErrorF("winAllocateFBShadowDDNL - Could not create shadow " "surface: %08x\n", (unsigned int) ddrval); return FALSE; } #if CYGDEBUG || YES winDebug("winAllocateFBShadowDDNL - Created shadow pitch: %d\n", (int) ddsdShadow.u1.lPitch); #endif /* Grab the pitch from the surface desc */ pScreenInfo->dwStride = (ddsdShadow.u1.lPitch * 8) / pScreenInfo->dwBPP; #if CYGDEBUG || YES winDebug("winAllocateFBShadowDDNL - Created shadow stride: %d\n", (int) pScreenInfo->dwStride); #endif /* Save the pointer to our surface memory */ pScreenInfo->pfb = lpSurface; /* Grab the masks from the surface description */ pScreenPriv->dwRedMask = ddsdShadow.u4.ddpfPixelFormat.u2.dwRBitMask; pScreenPriv->dwGreenMask = ddsdShadow.u4.ddpfPixelFormat.u3.dwGBitMask; pScreenPriv->dwBlueMask = ddsdShadow.u4.ddpfPixelFormat.u4.dwBBitMask; #if CYGDEBUG winDebug("winAllocateFBShadowDDNL - Returning\n"); #endif return TRUE; } static void winFreeFBShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Free the shadow surface, if there is one */ if (pScreenPriv->pddsShadow4) { IDirectDrawSurface4_Release(pScreenPriv->pddsShadow4); free(pScreenInfo->pfb); pScreenInfo->pfb = NULL; pScreenPriv->pddsShadow4 = NULL; } /* Detach the clipper from the primary surface and release the primary surface, if there is one */ winReleasePrimarySurfaceShadowDDNL(pScreen); /* Release the clipper object */ if (pScreenPriv->pddcPrimary) { IDirectDrawClipper_Release(pScreenPriv->pddcPrimary); pScreenPriv->pddcPrimary = NULL; } /* Free the DirectDraw4 object, if there is one */ if (pScreenPriv->pdd4) { IDirectDraw4_RestoreDisplayMode(pScreenPriv->pdd4); IDirectDraw4_Release(pScreenPriv->pdd4); pScreenPriv->pdd4 = NULL; } /* Free the DirectDraw object, if there is one */ if (pScreenPriv->pdd) { IDirectDraw_Release(pScreenPriv->pdd); pScreenPriv->pdd = NULL; } /* Invalidate the ScreenInfo's fb pointer */ pScreenInfo->pfb = NULL; } /* * Transfer the damaged regions of the shadow framebuffer to the display. */ static void winShadowUpdateDDNL(ScreenPtr pScreen, shadowBufPtr pBuf) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; RegionPtr damage = DamageRegion(pBuf->pDamage); HRESULT ddrval = DD_OK; RECT rcDest, rcSrc; POINT ptOrigin; DWORD dwBox = RegionNumRects(damage); BoxPtr pBox = RegionRects(damage); HRGN hrgnCombined = NULL; /* * Return immediately if the app is not active * and we are fullscreen, or if we have a bad display depth */ if ((!pScreenPriv->fActive && pScreenInfo->fFullScreen) || pScreenPriv->fBadDepth) return; /* Return immediately if we didn't get needed surfaces */ if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4) return; /* Get the origin of the window in the screen coords */ ptOrigin.x = pScreenInfo->dwXOffset; ptOrigin.y = pScreenInfo->dwYOffset; MapWindowPoints(pScreenPriv->hwndScreen, HWND_DESKTOP, (LPPOINT) &ptOrigin, 1); /* * Handle small regions with multiple blits, * handle large regions by creating a clipping region and * doing a single blit constrained to that clipping region. */ if (pScreenInfo->dwClipUpdatesNBoxes == 0 || dwBox < pScreenInfo->dwClipUpdatesNBoxes) { /* Loop through all boxes in the damaged region */ while (dwBox--) { /* Assign damage box to source rectangle */ rcSrc.left = pBox->x1; rcSrc.top = pBox->y1; rcSrc.right = pBox->x2; rcSrc.bottom = pBox->y2; /* Calculate destination rectangle */ rcDest.left = ptOrigin.x + rcSrc.left; rcDest.top = ptOrigin.y + rcSrc.top; rcDest.right = ptOrigin.x + rcSrc.right; rcDest.bottom = ptOrigin.y + rcSrc.bottom; /* Blit the damaged areas */ ddrval = IDirectDrawSurface4_Blt(pScreenPriv->pddsPrimary4, &rcDest, pScreenPriv->pddsShadow4, &rcSrc, DDBLT_WAIT, NULL); if (FAILED(ddrval)) { static int s_iFailCount = 0; if (s_iFailCount < FAIL_MSG_MAX_BLT) { ErrorF("winShadowUpdateDDNL - IDirectDrawSurface4_Blt () " "failed: %08x\n", (unsigned int) ddrval); ++s_iFailCount; if (s_iFailCount == FAIL_MSG_MAX_BLT) { ErrorF("winShadowUpdateDDNL - IDirectDrawSurface4_Blt " "failure message maximum (%d) reached. No " "more failure messages will be printed.\n", FAIL_MSG_MAX_BLT); } } } /* Get a pointer to the next box */ ++pBox; } } else { BoxPtr pBoxExtents = RegionExtents(damage); /* Compute a GDI region from the damaged region */ hrgnCombined = CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, pBoxExtents->y2); /* Install the GDI region as a clipping region */ SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined); DeleteObject(hrgnCombined); hrgnCombined = NULL; #if CYGDEBUG winDebug("winShadowUpdateDDNL - be x1 %d y1 %d x2 %d y2 %d\n", pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, pBoxExtents->y2); #endif /* Calculating a bounding box for the source is easy */ rcSrc.left = pBoxExtents->x1; rcSrc.top = pBoxExtents->y1; rcSrc.right = pBoxExtents->x2; rcSrc.bottom = pBoxExtents->y2; /* Calculating a bounding box for the destination is trickier */ rcDest.left = ptOrigin.x + rcSrc.left; rcDest.top = ptOrigin.y + rcSrc.top; rcDest.right = ptOrigin.x + rcSrc.right; rcDest.bottom = ptOrigin.y + rcSrc.bottom; /* Our Blt should be clipped to the invalidated region */ ddrval = IDirectDrawSurface4_Blt(pScreenPriv->pddsPrimary4, &rcDest, pScreenPriv->pddsShadow4, &rcSrc, DDBLT_WAIT, NULL); /* Reset the clip region */ SelectClipRgn(pScreenPriv->hdcScreen, NULL); } } static Bool winInitScreenShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); /* Get a device context for the screen */ pScreenPriv->hdcScreen = GetDC(pScreenPriv->hwndScreen); return winAllocateFBShadowDDNL(pScreen); } /* * Call the wrapped CloseScreen function. * * Free our resources and private structures. */ static Bool winCloseScreenShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; Bool fReturn = TRUE; #if CYGDEBUG winDebug("winCloseScreenShadowDDNL - Freeing screen resources\n"); #endif /* Flag that the screen is closed */ pScreenPriv->fClosed = TRUE; pScreenPriv->fActive = FALSE; /* Call the wrapped CloseScreen procedure */ WIN_UNWRAP(CloseScreen); if (pScreen->CloseScreen) fReturn = (*pScreen->CloseScreen) (pScreen); winFreeFBShadowDDNL(pScreen); /* Free the screen DC */ ReleaseDC(pScreenPriv->hwndScreen, pScreenPriv->hdcScreen); /* Delete the window property */ RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP); /* Delete tray icon, if we have one */ if (!pScreenInfo->fNoTrayIcon) winDeleteNotifyIcon(pScreenPriv); /* Free the exit confirmation dialog box, if it exists */ if (g_hDlgExit != NULL) { DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; } /* Kill our window */ if (pScreenPriv->hwndScreen) { DestroyWindow(pScreenPriv->hwndScreen); pScreenPriv->hwndScreen = NULL; } /* Destroy the thread startup mutex */ pthread_mutex_destroy(&pScreenPriv->pmServerStarted); /* Kill our screeninfo's pointer to the screen */ pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ free((void *) pScreenPriv); return fReturn; } /* * Tell mi what sort of visuals we need. * * Generally we only need one visual, as our screen can only * handle one format at a time, I believe. You may want * to verify that last sentence. */ static Bool winInitVisualsShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; DWORD dwRedBits, dwGreenBits, dwBlueBits; /* Count the number of ones in each color mask */ dwRedBits = winCountBits(pScreenPriv->dwRedMask); dwGreenBits = winCountBits(pScreenPriv->dwGreenMask); dwBlueBits = winCountBits(pScreenPriv->dwBlueMask); /* Store the maximum number of ones in a color mask as the bitsPerRGB */ if (dwRedBits == 0 || dwGreenBits == 0 || dwBlueBits == 0) pScreenPriv->dwBitsPerRGB = 8; else if (dwRedBits > dwGreenBits && dwRedBits > dwBlueBits) pScreenPriv->dwBitsPerRGB = dwRedBits; else if (dwGreenBits > dwRedBits && dwGreenBits > dwBlueBits) pScreenPriv->dwBitsPerRGB = dwGreenBits; else pScreenPriv->dwBitsPerRGB = dwBlueBits; winDebug("winInitVisualsShadowDDNL - Masks %08x %08x %08x BPRGB %d d %d " "bpp %d\n", (unsigned int) pScreenPriv->dwRedMask, (unsigned int) pScreenPriv->dwGreenMask, (unsigned int) pScreenPriv->dwBlueMask, (int) pScreenPriv->dwBitsPerRGB, (int) pScreenInfo->dwDepth, (int) pScreenInfo->dwBPP); /* Create a single visual according to the Windows screen depth */ switch (pScreenInfo->dwDepth) { case 24: case 16: case 15: /* Setup the real visual */ if (!miSetVisualTypesAndMasks(pScreenInfo->dwDepth, TrueColorMask, pScreenPriv->dwBitsPerRGB, -1, pScreenPriv->dwRedMask, pScreenPriv->dwGreenMask, pScreenPriv->dwBlueMask)) { ErrorF("winInitVisualsShadowDDNL - miSetVisualTypesAndMasks " "failed for TrueColor\n"); return FALSE; } #ifdef XWIN_EMULATEPSEUDO if (!pScreenInfo->fEmulatePseudo) break; /* Setup a pseudocolor visual */ if (!miSetVisualTypesAndMasks(8, PseudoColorMask, 8, -1, 0, 0, 0)) { ErrorF("winInitVisualsShadowDDNL - miSetVisualTypesAndMasks " "failed for PseudoColor\n"); return FALSE; } #endif break; case 8: if (!miSetVisualTypesAndMasks(pScreenInfo->dwDepth, pScreenInfo->fFullScreen ? PseudoColorMask : StaticColorMask, pScreenPriv->dwBitsPerRGB, pScreenInfo->fFullScreen ? PseudoColor : StaticColor, pScreenPriv->dwRedMask, pScreenPriv->dwGreenMask, pScreenPriv->dwBlueMask)) { ErrorF("winInitVisualsShadowDDNL - miSetVisualTypesAndMasks " "failed\n"); return FALSE; } break; default: ErrorF("winInitVisualsShadowDDNL - Unknown screen depth\n"); return FALSE; } #if CYGDEBUG winDebug("winInitVisualsShadowDDNL - Returning\n"); #endif return TRUE; } /* * Adjust the user proposed video mode */ static Bool winAdjustVideoModeShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; HDC hdc = NULL; DWORD dwBPP; /* We're in serious trouble if we can't get a DC */ hdc = GetDC(NULL); if (hdc == NULL) { ErrorF("winAdjustVideoModeShadowDDNL - GetDC () failed\n"); return FALSE; } /* Query GDI for current display depth */ dwBPP = GetDeviceCaps(hdc, BITSPIXEL); /* DirectDraw can only change the depth in fullscreen mode */ if (!(pScreenInfo->fFullScreen && (pScreenInfo->dwBPP != WIN_DEFAULT_BPP))) { /* Otherwise, We'll use GDI's depth */ pScreenInfo->dwBPP = dwBPP; } /* Release our DC */ ReleaseDC(NULL, hdc); return TRUE; } /* * Blt exposed regions to the screen */ static Bool winBltExposedRegionsShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; RECT rcSrc, rcDest; POINT ptOrigin; HDC hdcUpdate; PAINTSTRUCT ps; HRESULT ddrval = DD_OK; Bool fReturn = TRUE; int i; /* Quite common case. The primary surface was lost (maybe because of depth * change). Try to create a new primary surface. Bail out if this fails */ if (pScreenPriv->pddsPrimary4 == NULL && pScreenPriv->fRetryCreateSurface && !winCreatePrimarySurfaceShadowDDNL(pScreen)) { Sleep(100); return FALSE; } if (pScreenPriv->pddsPrimary4 == NULL) return FALSE; /* BeginPaint gives us an hdc that clips to the invalidated region */ hdcUpdate = BeginPaint(pScreenPriv->hwndScreen, &ps); if (hdcUpdate == NULL) { fReturn = FALSE; ErrorF("winBltExposedRegionsShadowDDNL - BeginPaint () returned " "a NULL device context handle. Aborting blit attempt.\n"); goto winBltExposedRegionsShadowDDNL_Exit; } /* Get the origin of the window in the screen coords */ ptOrigin.x = pScreenInfo->dwXOffset; ptOrigin.y = pScreenInfo->dwYOffset; MapWindowPoints(pScreenPriv->hwndScreen, HWND_DESKTOP, (LPPOINT) &ptOrigin, 1); rcDest.left = ptOrigin.x; rcDest.right = ptOrigin.x + pScreenInfo->dwWidth; rcDest.top = ptOrigin.y; rcDest.bottom = ptOrigin.y + pScreenInfo->dwHeight; /* Source can be entire shadow surface, as Blt should clip for us */ rcSrc.left = 0; rcSrc.top = 0; rcSrc.right = pScreenInfo->dwWidth; rcSrc.bottom = pScreenInfo->dwHeight; /* Try to regain the primary surface and blit again if we've lost it */ for (i = 0; i <= WIN_REGAIN_SURFACE_RETRIES; ++i) { /* Our Blt should be clipped to the invalidated region */ ddrval = IDirectDrawSurface4_Blt(pScreenPriv->pddsPrimary4, &rcDest, pScreenPriv->pddsShadow4, &rcSrc, DDBLT_WAIT, NULL); if (ddrval == DDERR_SURFACELOST) { /* Surface was lost */ winErrorFVerb(1, "winBltExposedRegionsShadowDDNL - " "IDirectDrawSurface4_Blt reported that the primary " "surface was lost, trying to restore, retry: %d\n", i + 1); /* Try to restore the surface, once */ ddrval = IDirectDrawSurface4_Restore(pScreenPriv->pddsPrimary4); winDebug("winBltExposedRegionsShadowDDNL - " "IDirectDrawSurface4_Restore returned: "); if (ddrval == DD_OK) winDebug("DD_OK\n"); else if (ddrval == DDERR_WRONGMODE) winDebug("DDERR_WRONGMODE\n"); else if (ddrval == DDERR_INCOMPATIBLEPRIMARY) winDebug("DDERR_INCOMPATIBLEPRIMARY\n"); else if (ddrval == DDERR_UNSUPPORTED) winDebug("DDERR_UNSUPPORTED\n"); else if (ddrval == DDERR_INVALIDPARAMS) winDebug("DDERR_INVALIDPARAMS\n"); else if (ddrval == DDERR_INVALIDOBJECT) winDebug("DDERR_INVALIDOBJECT\n"); else winDebug("unknown error: %08x\n", (unsigned int) ddrval); /* Loop around to try the blit one more time */ continue; } else if (FAILED(ddrval)) { fReturn = FALSE; winErrorFVerb(1, "winBltExposedRegionsShadowDDNL - " "IDirectDrawSurface4_Blt failed, but surface not " "lost: %08x %d\n", (unsigned int) ddrval, (int) ddrval); goto winBltExposedRegionsShadowDDNL_Exit; } else { /* Success, stop looping */ break; } } winBltExposedRegionsShadowDDNL_Exit: /* EndPaint frees the DC */ if (hdcUpdate != NULL) EndPaint(pScreenPriv->hwndScreen, &ps); return fReturn; } /* * Do any engine-specific application-activation processing */ static Bool winActivateAppShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); /* * Do we have a surface? * Are we active? * Are we full screen? */ if (pScreenPriv != NULL && pScreenPriv->pddsPrimary4 != NULL && pScreenPriv->fActive) { /* Primary surface was lost, restore it */ IDirectDrawSurface4_Restore(pScreenPriv->pddsPrimary4); } return TRUE; } /* * Reblit the shadow framebuffer to the screen. */ static Bool winRedrawScreenShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; HRESULT ddrval = DD_OK; RECT rcSrc, rcDest; POINT ptOrigin; /* Return immediately if we didn't get needed surfaces */ if (!pScreenPriv->pddsPrimary4 || !pScreenPriv->pddsShadow4) return FALSE; /* Get the origin of the window in the screen coords */ ptOrigin.x = pScreenInfo->dwXOffset; ptOrigin.y = pScreenInfo->dwYOffset; MapWindowPoints(pScreenPriv->hwndScreen, HWND_DESKTOP, (LPPOINT) &ptOrigin, 1); rcDest.left = ptOrigin.x; rcDest.right = ptOrigin.x + pScreenInfo->dwWidth; rcDest.top = ptOrigin.y; rcDest.bottom = ptOrigin.y + pScreenInfo->dwHeight; /* Source can be entire shadow surface, as Blt should clip for us */ rcSrc.left = 0; rcSrc.top = 0; rcSrc.right = pScreenInfo->dwWidth; rcSrc.bottom = pScreenInfo->dwHeight; /* Redraw the whole window, to take account for the new colors */ ddrval = IDirectDrawSurface4_Blt(pScreenPriv->pddsPrimary4, &rcDest, pScreenPriv->pddsShadow4, &rcSrc, DDBLT_WAIT, NULL); if (FAILED(ddrval)) { ErrorF("winRedrawScreenShadowDDNL - IDirectDrawSurface4_Blt () " "failed: %08x\n", (unsigned int) ddrval); } return TRUE; } /* * Realize the currently installed colormap */ static Bool winRealizeInstalledPaletteShadowDDNL(ScreenPtr pScreen) { return TRUE; } /* * Install the specified colormap */ static Bool winInstallColormapShadowDDNL(ColormapPtr pColormap) { ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); winCmapPriv(pColormap); HRESULT ddrval = DD_OK; /* Install the DirectDraw palette on the primary surface */ ddrval = IDirectDrawSurface4_SetPalette(pScreenPriv->pddsPrimary4, pCmapPriv->lpDDPalette); if (FAILED(ddrval)) { ErrorF("winInstallColormapShadowDDNL - Failed installing the " "DirectDraw palette.\n"); return FALSE; } /* Save a pointer to the newly installed colormap */ pScreenPriv->pcmapInstalled = pColormap; return TRUE; } /* * Store the specified colors in the specified colormap */ static Bool winStoreColorsShadowDDNL(ColormapPtr pColormap, int ndef, xColorItem * pdefs) { ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); winCmapPriv(pColormap); ColormapPtr curpmap = pScreenPriv->pcmapInstalled; HRESULT ddrval = DD_OK; /* Put the X colormap entries into the Windows logical palette */ ddrval = IDirectDrawPalette_SetEntries(pCmapPriv->lpDDPalette, 0, pdefs[0].pixel, ndef, pCmapPriv->peColors + pdefs[0].pixel); if (FAILED(ddrval)) { ErrorF("winStoreColorsShadowDDNL - SetEntries () failed: %08x\n", (unsigned int) ddrval); return FALSE; } /* Don't install the DirectDraw palette if the colormap is not installed */ if (pColormap != curpmap) { return TRUE; } if (!winInstallColormapShadowDDNL(pColormap)) { ErrorF("winStoreColorsShadowDDNL - Failed installing colormap\n"); return FALSE; } return TRUE; } /* * Colormap initialization procedure */ static Bool winCreateColormapShadowDDNL(ColormapPtr pColormap) { HRESULT ddrval = DD_OK; ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); winCmapPriv(pColormap); /* Create a DirectDraw palette */ ddrval = IDirectDraw4_CreatePalette(pScreenPriv->pdd4, DDPCAPS_8BIT | DDPCAPS_ALLOW256, pCmapPriv->peColors, &pCmapPriv->lpDDPalette, NULL); if (FAILED(ddrval)) { ErrorF("winCreateColormapShadowDDNL - CreatePalette failed\n"); return FALSE; } return TRUE; } /* * Colormap destruction procedure */ static Bool winDestroyColormapShadowDDNL(ColormapPtr pColormap) { winScreenPriv(pColormap->pScreen); winCmapPriv(pColormap); HRESULT ddrval = DD_OK; /* * Is colormap to be destroyed the default? * * Non-default colormaps should have had winUninstallColormap * called on them before we get here. The default colormap * will not have had winUninstallColormap called on it. Thus, * we need to handle the default colormap in a special way. */ if (pColormap->flags & IsDefault) { #if CYGDEBUG winDebug ("winDestroyColormapShadowDDNL - Destroying default colormap\n"); #endif /* * FIXME: Walk the list of all screens, popping the default * palette out of each screen device context. */ /* Pop the palette out of the primary surface */ ddrval = IDirectDrawSurface4_SetPalette(pScreenPriv->pddsPrimary4, NULL); if (FAILED(ddrval)) { ErrorF("winDestroyColormapShadowDDNL - Failed freeing the " "default colormap DirectDraw palette.\n"); return FALSE; } /* Clear our private installed colormap pointer */ pScreenPriv->pcmapInstalled = NULL; } /* Release the palette */ IDirectDrawPalette_Release(pCmapPriv->lpDDPalette); /* Invalidate the colormap privates */ pCmapPriv->lpDDPalette = NULL; return TRUE; } /* * Set pointers to our engine specific functions */ Bool winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Set our pointers */ pScreenPriv->pwinAllocateFB = winAllocateFBShadowDDNL; pScreenPriv->pwinFreeFB = winFreeFBShadowDDNL; pScreenPriv->pwinShadowUpdate = winShadowUpdateDDNL; pScreenPriv->pwinInitScreen = winInitScreenShadowDDNL; pScreenPriv->pwinCloseScreen = winCloseScreenShadowDDNL; pScreenPriv->pwinInitVisuals = winInitVisualsShadowDDNL; pScreenPriv->pwinAdjustVideoMode = winAdjustVideoModeShadowDDNL; if (pScreenInfo->fFullScreen) pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowFullScreen; else pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed; pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB; pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowDDNL; pScreenPriv->pwinBltExposedWindowRegion = NULL; pScreenPriv->pwinActivateApp = winActivateAppShadowDDNL; pScreenPriv->pwinRedrawScreen = winRedrawScreenShadowDDNL; pScreenPriv->pwinRealizeInstalledPalette = winRealizeInstalledPaletteShadowDDNL; pScreenPriv->pwinInstallColormap = winInstallColormapShadowDDNL; pScreenPriv->pwinStoreColors = winStoreColorsShadowDDNL; pScreenPriv->pwinCreateColormap = winCreateColormapShadowDDNL; pScreenPriv->pwinDestroyColormap = winDestroyColormapShadowDDNL; pScreenPriv->pwinCreatePrimarySurface = winCreatePrimarySurfaceShadowDDNL; pScreenPriv->pwinReleasePrimarySurface = winReleasePrimarySurfaceShadowDDNL; return TRUE; } xorg-server-21.1.16/hw/xwin/winshadgdi.c0000644000175000017500000011737314757411105013537 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * Local function prototypes */ static wBOOL CALLBACK winRedrawAllProcShadowGDI(HWND hwnd, LPARAM lParam); static wBOOL CALLBACK winRedrawDamagedWindowShadowGDI(HWND hwnd, LPARAM lParam); static Bool winAllocateFBShadowGDI(ScreenPtr pScreen); static void winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf); static Bool winCloseScreenShadowGDI(ScreenPtr pScreen); static Bool winInitVisualsShadowGDI(ScreenPtr pScreen); static Bool winAdjustVideoModeShadowGDI(ScreenPtr pScreen); static Bool winBltExposedRegionsShadowGDI(ScreenPtr pScreen); static Bool winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin); static Bool winActivateAppShadowGDI(ScreenPtr pScreen); static Bool winRedrawScreenShadowGDI(ScreenPtr pScreen); static Bool winRealizeInstalledPaletteShadowGDI(ScreenPtr pScreen); static Bool winInstallColormapShadowGDI(ColormapPtr pColormap); static Bool winStoreColorsShadowGDI(ColormapPtr pmap, int ndef, xColorItem * pdefs); static Bool winCreateColormapShadowGDI(ColormapPtr pColormap); static Bool winDestroyColormapShadowGDI(ColormapPtr pColormap); /* * Internal function to get the DIB format that is compatible with the screen */ static Bool winQueryScreenDIBFormat(ScreenPtr pScreen, BITMAPINFOHEADER * pbmih) { winScreenPriv(pScreen); HBITMAP hbmp; #if CYGDEBUG LPDWORD pdw = NULL; #endif /* Create a memory bitmap compatible with the screen */ hbmp = CreateCompatibleBitmap(pScreenPriv->hdcScreen, 1, 1); if (hbmp == NULL) { ErrorF("winQueryScreenDIBFormat - CreateCompatibleBitmap failed\n"); return FALSE; } /* Initialize our bitmap info header */ ZeroMemory(pbmih, sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); pbmih->biSize = sizeof(BITMAPINFOHEADER); /* Get the biBitCount */ if (!GetDIBits(pScreenPriv->hdcScreen, hbmp, 0, 1, NULL, (BITMAPINFO *) pbmih, DIB_RGB_COLORS)) { ErrorF("winQueryScreenDIBFormat - First call to GetDIBits failed\n"); DeleteObject(hbmp); return FALSE; } #if CYGDEBUG /* Get a pointer to bitfields */ pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER)); winDebug("winQueryScreenDIBFormat - First call masks: %08x %08x %08x\n", (unsigned int)pdw[0], (unsigned int)pdw[1], (unsigned int)pdw[2]); #endif /* Get optimal color table, or the optimal bitfields */ if (!GetDIBits(pScreenPriv->hdcScreen, hbmp, 0, 1, NULL, (BITMAPINFO *) pbmih, DIB_RGB_COLORS)) { ErrorF("winQueryScreenDIBFormat - Second call to GetDIBits " "failed\n"); DeleteObject(hbmp); return FALSE; } /* Free memory */ DeleteObject(hbmp); return TRUE; } /* * Internal function to determine the GDI bits per rgb and bit masks */ static Bool winQueryRGBBitsAndMasks(ScreenPtr pScreen) { winScreenPriv(pScreen); BITMAPINFOHEADER *pbmih = NULL; Bool fReturn = TRUE; LPDWORD pdw = NULL; DWORD dwRedBits, dwGreenBits, dwBlueBits; /* Color masks for 8 bpp are standardized */ if (GetDeviceCaps(pScreenPriv->hdcScreen, RASTERCAPS) & RC_PALETTE) { /* * RGB BPP for 8 bit palletes is always 8 * and the color masks are always 0. */ pScreenPriv->dwBitsPerRGB = 8; pScreenPriv->dwRedMask = 0x0L; pScreenPriv->dwGreenMask = 0x0L; pScreenPriv->dwBlueMask = 0x0L; return TRUE; } /* Color masks for 24 bpp are standardized */ if (GetDeviceCaps(pScreenPriv->hdcScreen, PLANES) * GetDeviceCaps(pScreenPriv->hdcScreen, BITSPIXEL) == 24) { ErrorF("winQueryRGBBitsAndMasks - GetDeviceCaps (BITSPIXEL) " "returned 24 for the screen. Using default 24bpp masks.\n"); /* 8 bits per primary color */ pScreenPriv->dwBitsPerRGB = 8; /* Set screen privates masks */ pScreenPriv->dwRedMask = WIN_24BPP_MASK_RED; pScreenPriv->dwGreenMask = WIN_24BPP_MASK_GREEN; pScreenPriv->dwBlueMask = WIN_24BPP_MASK_BLUE; return TRUE; } /* Allocate a bitmap header and color table */ pbmih = malloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pbmih == NULL) { ErrorF("winQueryRGBBitsAndMasks - malloc failed\n"); return FALSE; } /* Get screen description */ if (winQueryScreenDIBFormat(pScreen, pbmih)) { /* Get a pointer to bitfields */ pdw = (DWORD *) ((CARD8 *) pbmih + sizeof(BITMAPINFOHEADER)); #if CYGDEBUG winDebug("%s - Masks: %08x %08x %08x\n", __FUNCTION__, (unsigned int)pdw[0], (unsigned int)pdw[1], (unsigned int)pdw[2]); winDebug("%s - Bitmap: %dx%d %d bpp %d planes\n", __FUNCTION__, (int)pbmih->biWidth, (int)pbmih->biHeight, pbmih->biBitCount, pbmih->biPlanes); winDebug("%s - Compression: %u %s\n", __FUNCTION__, (unsigned int)pbmih->biCompression, (pbmih->biCompression == BI_RGB ? "(BI_RGB)" : (pbmih->biCompression == BI_RLE8 ? "(BI_RLE8)" : (pbmih-> biCompression == BI_RLE4 ? "(BI_RLE4)" : (pbmih-> biCompression == BI_BITFIELDS ? "(BI_BITFIELDS)" : ""))))); #endif /* Handle BI_RGB case, which is returned by Wine */ if (pbmih->biCompression == BI_RGB) { dwRedBits = 5; dwGreenBits = 5; dwBlueBits = 5; pScreenPriv->dwBitsPerRGB = 5; /* Set screen privates masks */ pScreenPriv->dwRedMask = 0x7c00; pScreenPriv->dwGreenMask = 0x03e0; pScreenPriv->dwBlueMask = 0x001f; } else { /* Count the number of bits in each mask */ dwRedBits = winCountBits(pdw[0]); dwGreenBits = winCountBits(pdw[1]); dwBlueBits = winCountBits(pdw[2]); /* Find maximum bits per red, green, blue */ if (dwRedBits > dwGreenBits && dwRedBits > dwBlueBits) pScreenPriv->dwBitsPerRGB = dwRedBits; else if (dwGreenBits > dwRedBits && dwGreenBits > dwBlueBits) pScreenPriv->dwBitsPerRGB = dwGreenBits; else pScreenPriv->dwBitsPerRGB = dwBlueBits; /* Set screen privates masks */ pScreenPriv->dwRedMask = pdw[0]; pScreenPriv->dwGreenMask = pdw[1]; pScreenPriv->dwBlueMask = pdw[2]; } } else { ErrorF("winQueryRGBBitsAndMasks - winQueryScreenDIBFormat failed\n"); fReturn = FALSE; } /* Free memory */ free(pbmih); return fReturn; } /* * Redraw all ---? */ static wBOOL CALLBACK winRedrawAllProcShadowGDI(HWND hwnd, LPARAM lParam) { if (hwnd == (HWND) lParam) return TRUE; InvalidateRect(hwnd, NULL, FALSE); UpdateWindow(hwnd); return TRUE; } static wBOOL CALLBACK winRedrawDamagedWindowShadowGDI(HWND hwnd, LPARAM lParam) { BoxPtr pDamage = (BoxPtr) lParam; RECT rcClient, rcDamage, rcRedraw; POINT topLeft, bottomRight; if (IsIconic(hwnd)) return TRUE; /* Don't care minimized windows */ /* Convert the damaged area from Screen coords to Client coords */ topLeft.x = pDamage->x1; topLeft.y = pDamage->y1; bottomRight.x = pDamage->x2; bottomRight.y = pDamage->y2; topLeft.x += GetSystemMetrics(SM_XVIRTUALSCREEN); bottomRight.x += GetSystemMetrics(SM_XVIRTUALSCREEN); topLeft.y += GetSystemMetrics(SM_YVIRTUALSCREEN); bottomRight.y += GetSystemMetrics(SM_YVIRTUALSCREEN); ScreenToClient(hwnd, &topLeft); ScreenToClient(hwnd, &bottomRight); SetRect(&rcDamage, topLeft.x, topLeft.y, bottomRight.x, bottomRight.y); GetClientRect(hwnd, &rcClient); if (IntersectRect(&rcRedraw, &rcClient, &rcDamage)) { InvalidateRect(hwnd, &rcRedraw, FALSE); UpdateWindow(hwnd); } return TRUE; } /* * Allocate a DIB for the shadow framebuffer GDI server */ static Bool winAllocateFBShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; DIBSECTION dibsection; Bool fReturn = TRUE; /* Describe shadow bitmap to be created */ pScreenPriv->pbmih->biWidth = pScreenInfo->dwWidth; pScreenPriv->pbmih->biHeight = -pScreenInfo->dwHeight; ErrorF("winAllocateFBShadowGDI - Creating DIB with width: %d height: %d " "depth: %d\n", (int) pScreenPriv->pbmih->biWidth, (int) -pScreenPriv->pbmih->biHeight, pScreenPriv->pbmih->biBitCount); /* Create a DI shadow bitmap with a bit pointer */ pScreenPriv->hbmpShadow = CreateDIBSection(pScreenPriv->hdcScreen, (BITMAPINFO *) pScreenPriv-> pbmih, DIB_RGB_COLORS, (VOID **) &pScreenInfo->pfb, NULL, 0); if (pScreenPriv->hbmpShadow == NULL || pScreenInfo->pfb == NULL) { winW32Error(2, "winAllocateFBShadowGDI - CreateDIBSection failed:"); return FALSE; } else { #if CYGDEBUG winDebug("winAllocateFBShadowGDI - Shadow buffer allocated\n"); #endif } /* Get information about the bitmap that was allocated */ GetObject(pScreenPriv->hbmpShadow, sizeof(dibsection), &dibsection); #if CYGDEBUG || YES /* Print information about bitmap allocated */ winDebug("winAllocateFBShadowGDI - Dibsection width: %d height: %d " "depth: %d size image: %d\n", (int) dibsection.dsBmih.biWidth, (int) dibsection.dsBmih.biHeight, dibsection.dsBmih.biBitCount, (int) dibsection.dsBmih.biSizeImage); #endif /* Select the shadow bitmap into the shadow DC */ SelectObject(pScreenPriv->hdcShadow, pScreenPriv->hbmpShadow); #if CYGDEBUG winDebug("winAllocateFBShadowGDI - Attempting a shadow blit\n"); #endif /* Do a test blit from the shadow to the screen, I think */ fReturn = BitBlt(pScreenPriv->hdcScreen, 0, 0, pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenPriv->hdcShadow, 0, 0, SRCCOPY); if (fReturn) { #if CYGDEBUG winDebug("winAllocateFBShadowGDI - Shadow blit success\n"); #endif } else { winW32Error(2, "winAllocateFBShadowGDI - Shadow blit failure\n"); #if 0 return FALSE; #else /* ago: ignore this error. The blit fails with wine, but does not * cause any problems later. */ fReturn = TRUE; #endif } /* Look for height weirdness */ if (dibsection.dsBmih.biHeight < 0) { dibsection.dsBmih.biHeight = -dibsection.dsBmih.biHeight; } /* Set screeninfo stride */ pScreenInfo->dwStride = ((dibsection.dsBmih.biSizeImage / dibsection.dsBmih.biHeight) * 8) / pScreenInfo->dwBPP; #if CYGDEBUG || YES winDebug("winAllocateFBShadowGDI - Created shadow stride: %d\n", (int) pScreenInfo->dwStride); #endif /* Redraw all windows */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 0); return fReturn; } static void winFreeFBShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Free the shadow bitmap */ DeleteObject(pScreenPriv->hbmpShadow); /* Invalidate the ScreenInfo's fb pointer */ pScreenInfo->pfb = NULL; } /* * Blit the damaged regions of the shadow fb to the screen */ static void winShadowUpdateGDI(ScreenPtr pScreen, shadowBufPtr pBuf) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; RegionPtr damage = DamageRegion(pBuf->pDamage); DWORD dwBox = RegionNumRects(damage); BoxPtr pBox = RegionRects(damage); int x, y, w, h; HRGN hrgnCombined = NULL; #ifdef XWIN_UPDATESTATS static DWORD s_dwNonUnitRegions = 0; static DWORD s_dwTotalUpdates = 0; static DWORD s_dwTotalBoxes = 0; #endif BoxPtr pBoxExtents = RegionExtents(damage); /* * Return immediately if the app is not active * and we are fullscreen, or if we have a bad display depth */ if ((!pScreenPriv->fActive && pScreenInfo->fFullScreen) || pScreenPriv->fBadDepth) return; #ifdef XWIN_UPDATESTATS ++s_dwTotalUpdates; s_dwTotalBoxes += dwBox; if (dwBox != 1) { ++s_dwNonUnitRegions; ErrorF("winShadowUpdatGDI - dwBox: %d\n", dwBox); } if ((s_dwTotalUpdates % 100) == 0) ErrorF("winShadowUpdateGDI - %d%% non-unity regions, avg boxes: %d " "nu: %d tu: %d\n", (s_dwNonUnitRegions * 100) / s_dwTotalUpdates, s_dwTotalBoxes / s_dwTotalUpdates, s_dwNonUnitRegions, s_dwTotalUpdates); #endif /* XWIN_UPDATESTATS */ /* * Handle small regions with multiple blits, * handle large regions by creating a clipping region and * doing a single blit constrained to that clipping region. */ if (!pScreenInfo->fMultiWindow && (pScreenInfo->dwClipUpdatesNBoxes == 0 || dwBox < pScreenInfo->dwClipUpdatesNBoxes)) { /* Loop through all boxes in the damaged region */ while (dwBox--) { /* * Calculate x offset, y offset, width, and height for * current damage box */ x = pBox->x1; y = pBox->y1; w = pBox->x2 - pBox->x1; h = pBox->y2 - pBox->y1; BitBlt(pScreenPriv->hdcScreen, x, y, w, h, pScreenPriv->hdcShadow, x, y, SRCCOPY); /* Get a pointer to the next box */ ++pBox; } } else if (!pScreenInfo->fMultiWindow) { /* Compute a GDI region from the damaged region */ hrgnCombined = CreateRectRgn(pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2, pBoxExtents->y2); /* Install the GDI region as a clipping region */ SelectClipRgn(pScreenPriv->hdcScreen, hrgnCombined); DeleteObject(hrgnCombined); hrgnCombined = NULL; /* * Blit the shadow buffer to the screen, * constrained to the clipping region. */ BitBlt(pScreenPriv->hdcScreen, pBoxExtents->x1, pBoxExtents->y1, pBoxExtents->x2 - pBoxExtents->x1, pBoxExtents->y2 - pBoxExtents->y1, pScreenPriv->hdcShadow, pBoxExtents->x1, pBoxExtents->y1, SRCCOPY); /* Reset the clip region */ SelectClipRgn(pScreenPriv->hdcScreen, NULL); } /* Redraw all multiwindow windows */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, winRedrawDamagedWindowShadowGDI, (LPARAM) pBoxExtents); } static Bool winInitScreenShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); /* Get device contexts for the screen and shadow bitmap */ pScreenPriv->hdcScreen = GetDC(pScreenPriv->hwndScreen); pScreenPriv->hdcShadow = CreateCompatibleDC(pScreenPriv->hdcScreen); /* Allocate bitmap info header */ pScreenPriv->pbmih = malloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pScreenPriv->pbmih == NULL) { ErrorF("winInitScreenShadowGDI - malloc () failed\n"); return FALSE; } /* Query the screen format */ if (!winQueryScreenDIBFormat(pScreen, pScreenPriv->pbmih)) { ErrorF("winInitScreenShadowGDI - winQueryScreenDIBFormat failed\n"); return FALSE; } /* Determine our color masks */ if (!winQueryRGBBitsAndMasks(pScreen)) { ErrorF("winInitScreenShadowGDI - winQueryRGBBitsAndMasks failed\n"); return FALSE; } return winAllocateFBShadowGDI(pScreen); } /* See Porting Layer Definition - p. 33 */ /* * We wrap whatever CloseScreen procedure was specified by fb; * a pointer to said procedure is stored in our privates. */ static Bool winCloseScreenShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; Bool fReturn = TRUE; #if CYGDEBUG winDebug("winCloseScreenShadowGDI - Freeing screen resources\n"); #endif /* Flag that the screen is closed */ pScreenPriv->fClosed = TRUE; pScreenPriv->fActive = FALSE; /* Call the wrapped CloseScreen procedure */ WIN_UNWRAP(CloseScreen); if (pScreen->CloseScreen) fReturn = (*pScreen->CloseScreen) (pScreen); /* Delete the window property */ RemoveProp(pScreenPriv->hwndScreen, WIN_SCR_PROP); /* Free the shadow DC; which allows the bitmap to be freed */ DeleteDC(pScreenPriv->hdcShadow); winFreeFBShadowGDI(pScreen); /* Free the screen DC */ ReleaseDC(pScreenPriv->hwndScreen, pScreenPriv->hdcScreen); /* Delete tray icon, if we have one */ if (!pScreenInfo->fNoTrayIcon) winDeleteNotifyIcon(pScreenPriv); /* Free the exit confirmation dialog box, if it exists */ if (g_hDlgExit != NULL) { DestroyWindow(g_hDlgExit); g_hDlgExit = NULL; } /* Kill our window */ if (pScreenPriv->hwndScreen) { DestroyWindow(pScreenPriv->hwndScreen); pScreenPriv->hwndScreen = NULL; } /* Destroy the thread startup mutex */ pthread_mutex_destroy(&pScreenPriv->pmServerStarted); /* Invalidate our screeninfo's pointer to the screen */ pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ free((void *) pScreenPriv); return fReturn; } /* * Tell mi what sort of visuals we need. * * Generally we only need one visual, as our screen can only * handle one format at a time, I believe. You may want * to verify that last sentence. */ static Bool winInitVisualsShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Display debugging information */ ErrorF("winInitVisualsShadowGDI - Masks %08x %08x %08x BPRGB %d d %d " "bpp %d\n", (unsigned int) pScreenPriv->dwRedMask, (unsigned int) pScreenPriv->dwGreenMask, (unsigned int) pScreenPriv->dwBlueMask, (int) pScreenPriv->dwBitsPerRGB, (int) pScreenInfo->dwDepth, (int) pScreenInfo->dwBPP); /* Create a single visual according to the Windows screen depth */ switch (pScreenInfo->dwDepth) { case 24: case 16: case 15: /* Setup the real visual */ if (!miSetVisualTypesAndMasks(pScreenInfo->dwDepth, TrueColorMask, pScreenPriv->dwBitsPerRGB, -1, pScreenPriv->dwRedMask, pScreenPriv->dwGreenMask, pScreenPriv->dwBlueMask)) { ErrorF("winInitVisualsShadowGDI - miSetVisualTypesAndMasks " "failed\n"); return FALSE; } #ifdef XWIN_EMULATEPSEUDO if (!pScreenInfo->fEmulatePseudo) break; /* Setup a pseudocolor visual */ if (!miSetVisualTypesAndMasks(8, PseudoColorMask, 8, -1, 0, 0, 0)) { ErrorF("winInitVisualsShadowGDI - miSetVisualTypesAndMasks " "failed for PseudoColor\n"); return FALSE; } #endif break; case 8: if (!miSetVisualTypesAndMasks(pScreenInfo->dwDepth, PseudoColorMask, pScreenPriv->dwBitsPerRGB, PseudoColor, pScreenPriv->dwRedMask, pScreenPriv->dwGreenMask, pScreenPriv->dwBlueMask)) { ErrorF("winInitVisualsShadowGDI - miSetVisualTypesAndMasks " "failed\n"); return FALSE; } break; default: ErrorF("winInitVisualsShadowGDI - Unknown screen depth\n"); return FALSE; } #if CYGDEBUG winDebug("winInitVisualsShadowGDI - Returning\n"); #endif return TRUE; } /* * Adjust the proposed video mode */ static Bool winAdjustVideoModeShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; HDC hdc; DWORD dwBPP; hdc = GetDC(NULL); /* We're in serious trouble if we can't get a DC */ if (hdc == NULL) { ErrorF("winAdjustVideoModeShadowGDI - GetDC () failed\n"); return FALSE; } /* Query GDI for current display depth */ dwBPP = GetDeviceCaps(hdc, BITSPIXEL); /* GDI cannot change the screen depth, so always use GDI's depth */ pScreenInfo->dwBPP = dwBPP; /* Release our DC */ ReleaseDC(NULL, hdc); hdc = NULL; return TRUE; } /* * Blt exposed regions to the screen */ static Bool winBltExposedRegionsShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; winPrivCmapPtr pCmapPriv = NULL; HDC hdcUpdate; PAINTSTRUCT ps; /* BeginPaint gives us an hdc that clips to the invalidated region */ hdcUpdate = BeginPaint(pScreenPriv->hwndScreen, &ps); /* Avoid the BitBlt if the PAINTSTRUCT region is bogus */ if (ps.rcPaint.right == 0 && ps.rcPaint.bottom == 0 && ps.rcPaint.left == 0 && ps.rcPaint.top == 0) { EndPaint(pScreenPriv->hwndScreen, &ps); return 0; } /* Realize the palette, if we have one */ if (pScreenPriv->pcmapInstalled != NULL) { pCmapPriv = winGetCmapPriv(pScreenPriv->pcmapInstalled); SelectPalette(hdcUpdate, pCmapPriv->hPalette, FALSE); RealizePalette(hdcUpdate); } /* Try to copy from the shadow buffer to the invalidated region */ if (!BitBlt(hdcUpdate, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top, pScreenPriv->hdcShadow, ps.rcPaint.left, ps.rcPaint.top, SRCCOPY)) { LPVOID lpMsgBuf; /* Display an error message */ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); ErrorF("winBltExposedRegionsShadowGDI - BitBlt failed: %s\n", (LPSTR) lpMsgBuf); LocalFree(lpMsgBuf); } /* EndPaint frees the DC */ EndPaint(pScreenPriv->hwndScreen, &ps); /* Redraw all windows */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, (LPARAM) pScreenPriv->hwndScreen); return TRUE; } /* * Blt exposed region to the given HWND */ static Bool winBltExposedWindowRegionShadowGDI(ScreenPtr pScreen, WindowPtr pWin) { winScreenPriv(pScreen); winPrivWinPtr pWinPriv = winGetWindowPriv(pWin); HWND hWnd = pWinPriv->hWnd; HDC hdcUpdate; PAINTSTRUCT ps; hdcUpdate = BeginPaint(hWnd, &ps); /* Avoid the BitBlt if the PAINTSTRUCT region is bogus */ if (ps.rcPaint.right == 0 && ps.rcPaint.bottom == 0 && ps.rcPaint.left == 0 && ps.rcPaint.top == 0) { EndPaint(hWnd, &ps); return 0; } #ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) { HBITMAP hBitmap; HDC hdcPixmap; PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap); /* window pixmap format is the same as the screen pixmap */ assert(pPixmap->drawable.bitsPerPixel > 8); /* Get the window bitmap from the pixmap */ hBitmap = pPixmapPriv->hBitmap; /* XXX: There may be a need for a slow-path here: If hBitmap is NULL (because we couldn't back the pixmap with a Windows DIB), we should fall-back to creating a Windows DIB from the pixmap, then deleting it after the BitBlt (as this this code did before the fast-path was added). */ if (!hBitmap) { ErrorF("winBltExposedWindowRegionShadowGDI - slow path unimplemented\n"); } /* Select the window bitmap into a screen-compatible DC */ hdcPixmap = CreateCompatibleDC(pScreenPriv->hdcScreen); SelectObject(hdcPixmap, hBitmap); /* Blt from the window bitmap to the invalidated region */ if (!BitBlt(hdcUpdate, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top, hdcPixmap, ps.rcPaint.left + pWin->borderWidth, ps.rcPaint.top + pWin->borderWidth, SRCCOPY)) ErrorF("winBltExposedWindowRegionShadowGDI - BitBlt failed: 0x%08x\n", GetLastError()); /* Release DC */ DeleteDC(hdcPixmap); } else #endif { /* Try to copy from the shadow buffer to the invalidated region */ if (!BitBlt(hdcUpdate, ps.rcPaint.left, ps.rcPaint.top, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - ps.rcPaint.top, pScreenPriv->hdcShadow, ps.rcPaint.left + pWin->drawable.x, ps.rcPaint.top + pWin->drawable.y, SRCCOPY)) { LPVOID lpMsgBuf; /* Display an error message */ FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL); ErrorF("winBltExposedWindowRegionShadowGDI - BitBlt failed: %s\n", (LPSTR) lpMsgBuf); LocalFree(lpMsgBuf); } } /* If part of the invalidated region is outside the window (which can happen if the native window is being re-sized), fill that area with black */ if (ps.rcPaint.right > ps.rcPaint.left + pWin->drawable.width) { BitBlt(hdcUpdate, ps.rcPaint.left + pWin->drawable.width, ps.rcPaint.top, ps.rcPaint.right - (ps.rcPaint.left + pWin->drawable.width), ps.rcPaint.bottom - ps.rcPaint.top, NULL, 0, 0, BLACKNESS); } if (ps.rcPaint.bottom > ps.rcPaint.top + pWin->drawable.height) { BitBlt(hdcUpdate, ps.rcPaint.left, ps.rcPaint.top + pWin->drawable.height, ps.rcPaint.right - ps.rcPaint.left, ps.rcPaint.bottom - (ps.rcPaint.top + pWin->drawable.height), NULL, 0, 0, BLACKNESS); } /* EndPaint frees the DC */ EndPaint(hWnd, &ps); return TRUE; } /* * Do any engine-specific appliation-activation processing */ static Bool winActivateAppShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* * 2004/04/12 - Harold - We perform the restoring or minimizing * manually for ShadowGDI in fullscreen modes so that this engine * will perform just like ShadowDD and ShadowDDNL in fullscreen mode; * if we do not do this then our fullscreen window will appear in the * z-order when it is deactivated and it can be uncovered by resizing * or minimizing another window that is on top of it, which is not how * the DirectDraw engines work. Therefore we keep this code here to * make sure that all engines work the same in fullscreen mode. */ /* * Are we active? * Are we fullscreen? */ if (pScreenPriv->fActive && pScreenInfo->fFullScreen) { /* * Activating, attempt to bring our window * to the top of the display */ ShowWindow(pScreenPriv->hwndScreen, SW_RESTORE); } else if (!pScreenPriv->fActive && pScreenInfo->fFullScreen) { /* * Deactivating, stuff our window onto the * task bar. */ ShowWindow(pScreenPriv->hwndScreen, SW_MINIMIZE); } return TRUE; } /* * Reblit the shadow framebuffer to the screen. */ static Bool winRedrawScreenShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Redraw the whole window, to take account for the new colors */ BitBlt(pScreenPriv->hdcScreen, 0, 0, pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenPriv->hdcShadow, 0, 0, SRCCOPY); /* Redraw all windows */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 0); return TRUE; } /* * Realize the currently installed colormap */ static Bool winRealizeInstalledPaletteShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winPrivCmapPtr pCmapPriv = NULL; #if CYGDEBUG winDebug("winRealizeInstalledPaletteShadowGDI\n"); #endif /* Don't do anything if there is not a colormap */ if (pScreenPriv->pcmapInstalled == NULL) { #if CYGDEBUG winDebug("winRealizeInstalledPaletteShadowGDI - No colormap " "installed\n"); #endif return TRUE; } pCmapPriv = winGetCmapPriv(pScreenPriv->pcmapInstalled); /* Realize our palette for the screen */ if (RealizePalette(pScreenPriv->hdcScreen) == GDI_ERROR) { ErrorF("winRealizeInstalledPaletteShadowGDI - RealizePalette () " "failed\n"); return FALSE; } /* Set the DIB color table */ if (SetDIBColorTable(pScreenPriv->hdcShadow, 0, WIN_NUM_PALETTE_ENTRIES, pCmapPriv->rgbColors) == 0) { ErrorF("winRealizeInstalledPaletteShadowGDI - SetDIBColorTable () " "failed\n"); return FALSE; } return TRUE; } /* * Install the specified colormap */ static Bool winInstallColormapShadowGDI(ColormapPtr pColormap) { ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; winCmapPriv(pColormap); /* * Tell Windows to install the new colormap */ if (SelectPalette(pScreenPriv->hdcScreen, pCmapPriv->hPalette, FALSE) == NULL) { ErrorF("winInstallColormapShadowGDI - SelectPalette () failed\n"); return FALSE; } /* Realize the palette */ if (GDI_ERROR == RealizePalette(pScreenPriv->hdcScreen)) { ErrorF("winInstallColormapShadowGDI - RealizePalette () failed\n"); return FALSE; } /* Set the DIB color table */ if (SetDIBColorTable(pScreenPriv->hdcShadow, 0, WIN_NUM_PALETTE_ENTRIES, pCmapPriv->rgbColors) == 0) { ErrorF("winInstallColormapShadowGDI - SetDIBColorTable () failed\n"); return FALSE; } /* Redraw the whole window, to take account for the new colors */ BitBlt(pScreenPriv->hdcScreen, 0, 0, pScreenInfo->dwWidth, pScreenInfo->dwHeight, pScreenPriv->hdcShadow, 0, 0, SRCCOPY); /* Save a pointer to the newly installed colormap */ pScreenPriv->pcmapInstalled = pColormap; /* Redraw all windows */ if (pScreenInfo->fMultiWindow) EnumThreadWindows(g_dwCurrentThreadID, winRedrawAllProcShadowGDI, 0); return TRUE; } /* * Store the specified colors in the specified colormap */ static Bool winStoreColorsShadowGDI(ColormapPtr pColormap, int ndef, xColorItem * pdefs) { ScreenPtr pScreen = pColormap->pScreen; winScreenPriv(pScreen); winCmapPriv(pColormap); ColormapPtr curpmap = pScreenPriv->pcmapInstalled; /* Put the X colormap entries into the Windows logical palette */ if (SetPaletteEntries(pCmapPriv->hPalette, pdefs[0].pixel, ndef, pCmapPriv->peColors + pdefs[0].pixel) == 0) { ErrorF("winStoreColorsShadowGDI - SetPaletteEntries () failed\n"); return FALSE; } /* Don't install the Windows palette if the colormap is not installed */ if (pColormap != curpmap) { return TRUE; } /* Try to install the newly modified colormap */ if (!winInstallColormapShadowGDI(pColormap)) { ErrorF("winInstallColormapShadowGDI - winInstallColormapShadowGDI " "failed\n"); return FALSE; } #if 0 /* Tell Windows that the palette has changed */ RealizePalette(pScreenPriv->hdcScreen); /* Set the DIB color table */ if (SetDIBColorTable(pScreenPriv->hdcShadow, pdefs[0].pixel, ndef, pCmapPriv->rgbColors + pdefs[0].pixel) == 0) { ErrorF("winInstallColormapShadowGDI - SetDIBColorTable () failed\n"); return FALSE; } /* Save a pointer to the newly installed colormap */ pScreenPriv->pcmapInstalled = pColormap; #endif return TRUE; } /* * Colormap initialization procedure */ static Bool winCreateColormapShadowGDI(ColormapPtr pColormap) { LPLOGPALETTE lpPaletteNew = NULL; DWORD dwEntriesMax; VisualPtr pVisual; HPALETTE hpalNew = NULL; winCmapPriv(pColormap); /* Get a pointer to the visual that the colormap belongs to */ pVisual = pColormap->pVisual; /* Get the maximum number of palette entries for this visual */ dwEntriesMax = pVisual->ColormapEntries; /* Allocate a Windows logical color palette with max entries */ lpPaletteNew = malloc(sizeof(LOGPALETTE) + (dwEntriesMax - 1) * sizeof(PALETTEENTRY)); if (lpPaletteNew == NULL) { ErrorF("winCreateColormapShadowGDI - Couldn't allocate palette " "with %d entries\n", (int) dwEntriesMax); return FALSE; } /* Zero out the colormap */ ZeroMemory(lpPaletteNew, sizeof(LOGPALETTE) + (dwEntriesMax - 1) * sizeof(PALETTEENTRY)); /* Set the logical palette structure */ lpPaletteNew->palVersion = 0x0300; lpPaletteNew->palNumEntries = dwEntriesMax; /* Tell Windows to create the palette */ hpalNew = CreatePalette(lpPaletteNew); if (hpalNew == NULL) { ErrorF("winCreateColormapShadowGDI - CreatePalette () failed\n"); free(lpPaletteNew); return FALSE; } /* Save the Windows logical palette handle in the X colormaps' privates */ pCmapPriv->hPalette = hpalNew; /* Free the palette initialization memory */ free(lpPaletteNew); return TRUE; } /* * Colormap destruction procedure */ static Bool winDestroyColormapShadowGDI(ColormapPtr pColormap) { winScreenPriv(pColormap->pScreen); winCmapPriv(pColormap); /* * Is colormap to be destroyed the default? * * Non-default colormaps should have had winUninstallColormap * called on them before we get here. The default colormap * will not have had winUninstallColormap called on it. Thus, * we need to handle the default colormap in a special way. */ if (pColormap->flags & IsDefault) { #if CYGDEBUG winDebug("winDestroyColormapShadowGDI - Destroying default " "colormap\n"); #endif /* * FIXME: Walk the list of all screens, popping the default * palette out of each screen device context. */ /* Pop the palette out of the device context */ SelectPalette(pScreenPriv->hdcScreen, GetStockObject(DEFAULT_PALETTE), FALSE); /* Clear our private installed colormap pointer */ pScreenPriv->pcmapInstalled = NULL; } /* Try to delete the logical palette */ if (DeleteObject(pCmapPriv->hPalette) == 0) { ErrorF("winDestroyColormap - DeleteObject () failed\n"); return FALSE; } /* Invalidate the colormap privates */ pCmapPriv->hPalette = NULL; return TRUE; } /* * Set engine specific functions */ Bool winSetEngineFunctionsShadowGDI(ScreenPtr pScreen) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; /* Set our pointers */ pScreenPriv->pwinAllocateFB = winAllocateFBShadowGDI; pScreenPriv->pwinFreeFB = winFreeFBShadowGDI; pScreenPriv->pwinShadowUpdate = winShadowUpdateGDI; pScreenPriv->pwinInitScreen = winInitScreenShadowGDI; pScreenPriv->pwinCloseScreen = winCloseScreenShadowGDI; pScreenPriv->pwinInitVisuals = winInitVisualsShadowGDI; pScreenPriv->pwinAdjustVideoMode = winAdjustVideoModeShadowGDI; if (pScreenInfo->fFullScreen) pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowFullScreen; else pScreenPriv->pwinCreateBoundingWindow = winCreateBoundingWindowWindowed; pScreenPriv->pwinFinishScreenInit = winFinishScreenInitFB; pScreenPriv->pwinBltExposedRegions = winBltExposedRegionsShadowGDI; pScreenPriv->pwinBltExposedWindowRegion = winBltExposedWindowRegionShadowGDI; pScreenPriv->pwinActivateApp = winActivateAppShadowGDI; pScreenPriv->pwinRedrawScreen = winRedrawScreenShadowGDI; pScreenPriv->pwinRealizeInstalledPalette = winRealizeInstalledPaletteShadowGDI; pScreenPriv->pwinInstallColormap = winInstallColormapShadowGDI; pScreenPriv->pwinStoreColors = winStoreColorsShadowGDI; pScreenPriv->pwinCreateColormap = winCreateColormapShadowGDI; pScreenPriv->pwinDestroyColormap = winDestroyColormapShadowGDI; pScreenPriv->pwinCreatePrimarySurface = NULL; pScreenPriv->pwinReleasePrimarySurface = NULL; return TRUE; } xorg-server-21.1.16/hw/xwin/wintaskbar.c0000644000175000017500000000612214757411105013550 /* 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winwindow.h" const GUID CLSID_TaskbarList = {0x56fdf344,0xfd6d,0x11d0,{0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90}}; const GUID IID_ITaskbarList = {0x56fdf342,0xfd6d,0x11d0,{0x95,0x8a,0x0,0x60,0x97,0xc9,0xa0,0x90}}; #ifdef INTERFACE #undef INTERFACE #endif #define INTERFACE ITaskbarList DECLARE_INTERFACE_(ITaskbarList, IUnknown) { /* IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void **ppv) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; /* ITaskbarList methods */ STDMETHOD(HrInit) (THIS) PURE; STDMETHOD(AddTab) (THIS_ HWND hWnd) PURE; STDMETHOD(DeleteTab) (THIS_ HWND hWnd) PURE; STDMETHOD(ActivateTab) (THIS_ HWND hWnd) PURE; STDMETHOD(SetActiveAlt) (THIS_ HWND hWnd) PURE; }; #undef INTERFACE /* The stuff above needs to be in win32api headers, not defined here, or at least generated from the MIDL :-) */ /* This is unnecessarily heavyweight, we could just call CoInitialize() once at startup and CoUninitialize() once at shutdown */ /* The documentation for ITaskbarList::AddTab says that we are responsible for deleting the tab ourselves when the window is deleted, but that doesn't actually seem to be the case */ void winShowWindowOnTaskbar(HWND hWnd, Bool show) { ITaskbarList* pTaskbarList = NULL; if (SUCCEEDED(CoInitialize(NULL))) { if (SUCCEEDED(CoCreateInstance((const CLSID *)&CLSID_TaskbarList, NULL, CLSCTX_INPROC_SERVER, (const IID *)&IID_ITaskbarList, (void**)&pTaskbarList))) { if (SUCCEEDED(pTaskbarList->lpVtbl->HrInit(pTaskbarList))) { if (show) { pTaskbarList->lpVtbl->AddTab(pTaskbarList,hWnd); } else { pTaskbarList->lpVtbl->DeleteTab(pTaskbarList,hWnd); } } pTaskbarList->lpVtbl->Release(pTaskbarList); } CoUninitialize(); } } xorg-server-21.1.16/hw/xwin/wintrayicon.c0000644000175000017500000001427414757411105013760 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Early Ehlinger * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include #include "winprefs.h" #include "winclipboard/winclipboard.h" /* * Initialize the tray icon */ void winInitNotifyIcon(winPrivScreenPtr pScreenPriv) { winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; NOTIFYICONDATA nid = { 0 }; nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd = pScreenPriv->hwndScreen; nid.uID = pScreenInfo->dwScreen; nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; nid.uCallbackMessage = WM_TRAYICON; nid.hIcon = winTaskbarIcon(); /* Save handle to the icon so it can be freed later */ pScreenPriv->hiconNotifyIcon = nid.hIcon; /* Set display and screen-specific tooltip text */ snprintf(nid.szTip, sizeof(nid.szTip), PROJECT_NAME " Server:%s.%d", display, (int) pScreenInfo->dwScreen); /* Add the tray icon */ if (!Shell_NotifyIcon(NIM_ADD, &nid)) ErrorF("winInitNotifyIcon - Shell_NotifyIcon Failed\n"); } /* * Delete the tray icon */ void winDeleteNotifyIcon(winPrivScreenPtr pScreenPriv) { winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; NOTIFYICONDATA nid = { 0 }; #if 0 ErrorF("winDeleteNotifyIcon\n"); #endif nid.cbSize = sizeof(NOTIFYICONDATA); nid.hWnd = pScreenPriv->hwndScreen; nid.uID = pScreenInfo->dwScreen; /* Delete the tray icon */ if (!Shell_NotifyIcon(NIM_DELETE, &nid)) { ErrorF("winDeleteNotifyIcon - Shell_NotifyIcon failed\n"); return; } /* Free the icon that was loaded */ if (pScreenPriv->hiconNotifyIcon != NULL && DestroyIcon(pScreenPriv->hiconNotifyIcon) == 0) { ErrorF("winDeleteNotifyIcon - DestroyIcon failed\n"); } pScreenPriv->hiconNotifyIcon = NULL; } /* * Process messages intended for the tray icon */ LRESULT winHandleIconMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, winPrivScreenPtr pScreenPriv) { winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; switch (lParam) { case WM_LBUTTONUP: /* Restack and bring all windows to top */ SetForegroundWindow (pScreenPriv->hwndScreen); break; case WM_LBUTTONDBLCLK: /* Display Exit dialog box */ winDisplayExitDialog(pScreenPriv); break; case WM_RBUTTONUP: { POINT ptCursor; HMENU hmenuPopup; HMENU hmenuTray; /* Get cursor position */ GetCursorPos(&ptCursor); /* Load tray icon menu resource */ hmenuPopup = LoadMenu(g_hInstance, MAKEINTRESOURCE(IDM_TRAYICON_MENU)); if (!hmenuPopup) ErrorF("winHandleIconMessage - LoadMenu failed\n"); /* Get actual tray icon menu */ hmenuTray = GetSubMenu(hmenuPopup, 0); /* Check for MultiWindow mode */ if (pScreenInfo->fMultiWindow) { MENUITEMINFO mii = { 0 }; /* Root is shown, remove the check box */ /* Setup menu item info structure */ mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_STATE; mii.fState = MFS_CHECKED; /* Unheck box if root is shown */ if (pScreenPriv->fRootWindowShown) mii.fState = MFS_UNCHECKED; /* Set menu state */ SetMenuItemInfo(hmenuTray, ID_APP_HIDE_ROOT, FALSE, &mii); } else { /* Remove Hide Root Window button */ RemoveMenu(hmenuTray, ID_APP_HIDE_ROOT, MF_BYCOMMAND); } if (g_fClipboard) { /* Set menu state to indicate if 'Monitor Primary' is enabled or not */ MENUITEMINFO mii = { 0 }; mii.cbSize = sizeof(MENUITEMINFO); mii.fMask = MIIM_STATE; mii.fState = fPrimarySelection ? MFS_CHECKED : MFS_UNCHECKED; SetMenuItemInfo(hmenuTray, ID_APP_MONITOR_PRIMARY, FALSE, &mii); } else { /* Remove 'Monitor Primary' menu item */ RemoveMenu(hmenuTray, ID_APP_MONITOR_PRIMARY, MF_BYCOMMAND); } SetupRootMenu(hmenuTray); /* * NOTE: This three-step procedure is required for * proper popup menu operation. Without the * call to SetForegroundWindow the * popup menu will often not disappear when you click * outside of it. Without the PostMessage the second * time you display the popup menu it might immediately * disappear. */ SetForegroundWindow(hwnd); TrackPopupMenuEx(hmenuTray, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_RIGHTBUTTON, ptCursor.x, ptCursor.y, hwnd, NULL); PostMessage(hwnd, WM_NULL, 0, 0); /* Free menu */ DestroyMenu(hmenuPopup); } break; } return 0; } xorg-server-21.1.16/hw/xwin/winvalargs.c0000644000175000017500000001370714757411105013567 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "winmsg.h" /* * Verify all screens have been explicitly specified */ static BOOL isEveryScreenExplicit(void) { int i; for (i = 0; i < g_iNumScreens; i++) if (!g_ScreenInfo[i].fExplicitScreen) return FALSE; return TRUE; } /* * winValidateArgs - Look for invalid argument combinations */ Bool winValidateArgs(void) { int i; BOOL fHasNormalScreen0 = FALSE; /* * Check for a malformed set of -screen parameters. * Examples of malformed parameters: * XWin -screen 1 * XWin -screen 0 -screen 2 * XWin -screen 1 -screen 2 */ if (!isEveryScreenExplicit()) { ErrorF("winValidateArgs - Malformed set of screen parameter(s). " "Screens must be specified consecutively starting with " "screen 0. That is, you cannot have only a screen 1, nor " "could you have screen 0 and screen 2. You instead must " "have screen 0, or screen 0 and screen 1, respectively. " "You can specify as many screens as you want.\n"); return FALSE; } /* Loop through all screens */ for (i = 0; i < g_iNumScreens; ++i) { /* * Check for any combination of * -multiwindow and -rootless. */ { int iCount = 0; /* Count conflicting options */ if (g_ScreenInfo[i].fMultiWindow) ++iCount; if (g_ScreenInfo[i].fRootless) ++iCount; /* Check if the first screen is without rootless and multiwindow */ if (iCount == 0 && i == 0) fHasNormalScreen0 = TRUE; /* Fail if two or more conflicting options */ if (iCount > 1) { ErrorF("winValidateArgs - Only one of -multiwindow " "and -rootless can be specific at a time.\n"); return FALSE; } } /* Check for -multiwindow and Xdmcp */ /* allow xdmcp if screen 0 is normal. */ if (g_fXdmcpEnabled && !fHasNormalScreen0 && (FALSE || g_ScreenInfo[i]. fMultiWindow ) ) { ErrorF("winValidateArgs - Xdmcp (-query, -broadcast, or -indirect) " "is invalid with -multiwindow.\n"); return FALSE; } /* Check for -multiwindow or -rootless and -fullscreen */ if (g_ScreenInfo[i].fFullScreen && (FALSE || g_ScreenInfo[i].fMultiWindow || g_ScreenInfo[i].fRootless) ) { ErrorF("winValidateArgs - -fullscreen is invalid with " "-multiwindow or -rootless.\n"); return FALSE; } /* Check for -multiwindow or -rootless and -nodecoration */ if (!g_ScreenInfo[i].fDecoration && (FALSE || g_ScreenInfo[i].fMultiWindow || g_ScreenInfo[i].fRootless) ) { ErrorF("winValidateArgs - -nodecoration is invalid with " "-multiwindow or -rootless.\n"); return FALSE; } /* Check for !fullscreen and any fullscreen-only parameters */ if (!g_ScreenInfo[i].fFullScreen && (g_ScreenInfo[i].dwRefreshRate != WIN_DEFAULT_REFRESH || g_ScreenInfo[i].dwBPP != WIN_DEFAULT_BPP)) { ErrorF("winValidateArgs - -refresh and -depth are only valid " "with -fullscreen.\n"); return FALSE; } /* Check for fullscreen and any non-fullscreen parameters */ if (g_ScreenInfo[i].fFullScreen && ((g_ScreenInfo[i].iResizeMode != resizeNotAllowed) || !g_ScreenInfo[i].fDecoration || g_ScreenInfo[i].fLessPointer)) { ErrorF("winValidateArgs - -fullscreen is invalid with " "-scrollbars, -resize, -nodecoration, or -lesspointer.\n"); return FALSE; } /* Ignore -swcursor if -multiwindow -compositewm is requested */ if (g_ScreenInfo[i].fMultiWindow && g_ScreenInfo[i].fCompositeWM) { if (g_fSoftwareCursor) { g_fSoftwareCursor = FALSE; winMsg(X_WARNING, "Ignoring -swcursor due to -compositewm\n"); } } } winDebug("winValidateArgs - Returning.\n"); return TRUE; } xorg-server-21.1.16/hw/xwin/winwakeup.c0000644000175000017500000000400414757411105013412 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* See Porting Layer Definition - p. 7 */ void winWakeupHandler(ScreenPtr pScreen, int iResult) { MSG msg; /* Process one message from our queue */ if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if ((g_hDlgDepthChange == 0 || !IsDialogMessage(g_hDlgDepthChange, &msg)) && (g_hDlgExit == 0 || !IsDialogMessage(g_hDlgExit, &msg)) && (g_hDlgAbout == 0 || !IsDialogMessage(g_hDlgAbout, &msg))) { DispatchMessage(&msg); } } } xorg-server-21.1.16/hw/xwin/winwindow.c0000644000175000017500000002247414757411105013440 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Harold L Hunt II * Kensuke Matsuzaki */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * Prototypes for local functions */ static int winAddRgn(WindowPtr pWindow, void *data); static void winUpdateRgnRootless(WindowPtr pWindow); static void winReshapeRootless(WindowPtr pWin); /* See Porting Layer Definition - p. 37 */ /* See mfb/mfbwindow.c - mfbCreateWindow() */ Bool winCreateWindowRootless(WindowPtr pWin) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG winTrace("winCreateWindowRootless (%p)\n", pWin); #endif WIN_UNWRAP(CreateWindow); fResult = (*pScreen->CreateWindow) (pWin); WIN_WRAP(CreateWindow, winCreateWindowRootless); pWinPriv->hRgn = NULL; return fResult; } /* See Porting Layer Definition - p. 37 */ /* See mfb/mfbwindow.c - mfbDestroyWindow() */ Bool winDestroyWindowRootless(WindowPtr pWin) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG winTrace("winDestroyWindowRootless (%p)\n", pWin); #endif WIN_UNWRAP(DestroyWindow); fResult = (*pScreen->DestroyWindow) (pWin); WIN_WRAP(DestroyWindow, winDestroyWindowRootless); if (pWinPriv->hRgn != NULL) { DeleteObject(pWinPriv->hRgn); pWinPriv->hRgn = NULL; } winUpdateRgnRootless(pWin); return fResult; } /* See Porting Layer Definition - p. 37 */ /* See mfb/mfbwindow.c - mfbPositionWindow() */ Bool winPositionWindowRootless(WindowPtr pWin, int x, int y) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGDEBUG winTrace("winPositionWindowRootless (%p)\n", pWin); #endif WIN_UNWRAP(PositionWindow); fResult = (*pScreen->PositionWindow) (pWin, x, y); WIN_WRAP(PositionWindow, winPositionWindowRootless); winUpdateRgnRootless(pWin); return fResult; } /* See Porting Layer Definition - p. 37 */ /* See mfb/mfbwindow.c - mfbChangeWindowAttributes() */ Bool winChangeWindowAttributesRootless(WindowPtr pWin, unsigned long mask) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGDEBUG winTrace("winChangeWindowAttributesRootless (%p)\n", pWin); #endif WIN_UNWRAP(ChangeWindowAttributes); fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask); WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesRootless); winUpdateRgnRootless(pWin); return fResult; } /* See Porting Layer Definition - p. 37 * Also referred to as UnrealizeWindow */ Bool winUnmapWindowRootless(WindowPtr pWin) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGDEBUG winTrace("winUnmapWindowRootless (%p)\n", pWin); #endif WIN_UNWRAP(UnrealizeWindow); fResult = (*pScreen->UnrealizeWindow) (pWin); WIN_WRAP(UnrealizeWindow, winUnmapWindowRootless); if (pWinPriv->hRgn != NULL) { DeleteObject(pWinPriv->hRgn); pWinPriv->hRgn = NULL; } winUpdateRgnRootless(pWin); return fResult; } /* See Porting Layer Definition - p. 37 * Also referred to as RealizeWindow */ Bool winMapWindowRootless(WindowPtr pWin) { Bool fResult = FALSE; ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGDEBUG winTrace("winMapWindowRootless (%p)\n", pWin); #endif WIN_UNWRAP(RealizeWindow); fResult = (*pScreen->RealizeWindow) (pWin); WIN_WRAP(RealizeWindow, winMapWindowRootless); winReshapeRootless(pWin); winUpdateRgnRootless(pWin); return fResult; } void winSetShapeRootless(WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGDEBUG winTrace("winSetShapeRootless (%p, %i)\n", pWin, kind); #endif WIN_UNWRAP(SetShape); (*pScreen->SetShape) (pWin, kind); WIN_WRAP(SetShape, winSetShapeRootless); winReshapeRootless(pWin); winUpdateRgnRootless(pWin); return; } /* * Local function for adding a region to the Windows window region */ static int winAddRgn(WindowPtr pWin, void *data) { int iX, iY, iWidth, iHeight, iBorder; HRGN hRgn = *(HRGN *) data; HRGN hRgnWin; winWindowPriv(pWin); /* If pWin is not Root */ if (pWin->parent != NULL) { #if CYGDEBUG winDebug("winAddRgn ()\n"); #endif if (pWin->mapped) { iBorder = wBorderWidth(pWin); iX = pWin->drawable.x - iBorder; iY = pWin->drawable.y - iBorder; iWidth = pWin->drawable.width + iBorder * 2; iHeight = pWin->drawable.height + iBorder * 2; hRgnWin = CreateRectRgn(0, 0, iWidth, iHeight); if (hRgnWin == NULL) { ErrorF("winAddRgn - CreateRectRgn () failed\n"); ErrorF(" Rect %d %d %d %d\n", iX, iY, iX + iWidth, iY + iHeight); } if (pWinPriv->hRgn) { if (CombineRgn(hRgnWin, hRgnWin, pWinPriv->hRgn, RGN_AND) == ERROR) { ErrorF("winAddRgn - CombineRgn () failed\n"); } } OffsetRgn(hRgnWin, iX, iY); if (CombineRgn(hRgn, hRgn, hRgnWin, RGN_OR) == ERROR) { ErrorF("winAddRgn - CombineRgn () failed\n"); } DeleteObject(hRgnWin); } return WT_DONTWALKCHILDREN; } else { return WT_WALKCHILDREN; } } /* * Local function to update the Windows window's region */ static void winUpdateRgnRootless(WindowPtr pWin) { HRGN hRgn = CreateRectRgn(0, 0, 0, 0); if (hRgn != NULL) { WalkTree(pWin->drawable.pScreen, winAddRgn, &hRgn); SetWindowRgn(winGetScreenPriv(pWin->drawable.pScreen)->hwndScreen, hRgn, TRUE); } else { ErrorF("winUpdateRgnRootless - CreateRectRgn failed.\n"); } } static void winReshapeRootless(WindowPtr pWin) { int nRects; RegionRec rrNewShape; BoxPtr pShape, pRects, pEnd; HRGN hRgn, hRgnRect; winWindowPriv(pWin); #if CYGDEBUG winDebug("winReshapeRootless ()\n"); #endif /* Bail if the window is the root window */ if (pWin->parent == NULL) return; /* Bail if the window is not top level */ if (pWin->parent->parent != NULL) return; /* Free any existing window region stored in the window privates */ if (pWinPriv->hRgn != NULL) { DeleteObject(pWinPriv->hRgn); pWinPriv->hRgn = NULL; } /* Bail if the window has no bounding region defined */ if (!wBoundingShape(pWin)) return; RegionNull(&rrNewShape); RegionCopy(&rrNewShape, wBoundingShape(pWin)); RegionTranslate(&rrNewShape, pWin->borderWidth, pWin->borderWidth); nRects = RegionNumRects(&rrNewShape); pShape = RegionRects(&rrNewShape); if (nRects > 0) { /* Create initial empty Windows region */ hRgn = CreateRectRgn(0, 0, 0, 0); /* Loop through all rectangles in the X region */ for (pRects = pShape, pEnd = pShape + nRects; pRects < pEnd; pRects++) { /* Create a Windows region for the X rectangle */ hRgnRect = CreateRectRgn(pRects->x1, pRects->y1, pRects->x2, pRects->y2); if (hRgnRect == NULL) { ErrorF("winReshapeRootless - CreateRectRgn() failed\n"); } /* Merge the Windows region with the accumulated region */ if (CombineRgn(hRgn, hRgn, hRgnRect, RGN_OR) == ERROR) { ErrorF("winReshapeRootless - CombineRgn() failed\n"); } /* Delete the temporary Windows region */ DeleteObject(hRgnRect); } /* Save a handle to the composite region in the window privates */ pWinPriv->hRgn = hRgn; } RegionUninit(&rrNewShape); return; } xorg-server-21.1.16/hw/xwin/winwndproc.c0000644000175000017500000011657314757411105013611 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II * MATSUZAKI Kensuke */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include #include "winprefs.h" #include "winconfig.h" #include "winmsg.h" #include "winmonitors.h" #include "inputstr.h" #include "winclipboard/winclipboard.h" /* * Global variables */ Bool g_fCursor = TRUE; Bool g_fButton[3] = { FALSE, FALSE, FALSE }; /* * Called by winWakeupHandler * Processes current Windows message */ LRESULT CALLBACK winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { static winPrivScreenPtr s_pScreenPriv = NULL; static winScreenInfo *s_pScreenInfo = NULL; static ScreenPtr s_pScreen = NULL; static HWND s_hwndLastPrivates = NULL; static Bool s_fTracking = FALSE; static unsigned long s_ulServerGeneration = 0; static UINT s_uTaskbarRestart = 0; int iScanCode; int i; #if CYGDEBUG winDebugWin32Message("winWindowProc", hwnd, message, wParam, lParam); #endif /* Watch for server regeneration */ if (g_ulServerGeneration != s_ulServerGeneration) { /* Store new server generation */ s_ulServerGeneration = g_ulServerGeneration; } /* Only retrieve new privates pointers if window handle is null or changed */ if ((s_pScreenPriv == NULL || hwnd != s_hwndLastPrivates) && (s_pScreenPriv = GetProp(hwnd, WIN_SCR_PROP)) != NULL) { #if CYGDEBUG winDebug("winWindowProc - Setting privates handle\n"); #endif s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreen = s_pScreenInfo->pScreen; s_hwndLastPrivates = hwnd; } else if (s_pScreenPriv == NULL) { /* For safety, handle case that should never happen */ s_pScreenInfo = NULL; s_pScreen = NULL; s_hwndLastPrivates = NULL; } /* Branch on message type */ switch (message) { case WM_TRAYICON: return winHandleIconMessage(hwnd, message, wParam, lParam, s_pScreenPriv); case WM_CREATE: #if CYGDEBUG winDebug("winWindowProc - WM_CREATE\n"); #endif /* * Add a property to our display window that references * this screens' privates. * * This allows the window procedure to refer to the * appropriate window DC and shadow DC for the window that * it is processing. We use this to repaint exposed * areas of our display window. */ s_pScreenPriv = ((LPCREATESTRUCT) lParam)->lpCreateParams; s_pScreenInfo = s_pScreenPriv->pScreenInfo; s_pScreen = s_pScreenInfo->pScreen; s_hwndLastPrivates = hwnd; s_uTaskbarRestart = RegisterWindowMessage(TEXT("TaskbarCreated")); SetProp(hwnd, WIN_SCR_PROP, s_pScreenPriv); /* Setup tray icon */ if (!s_pScreenInfo->fNoTrayIcon) { /* * NOTE: The WM_CREATE message is processed before CreateWindowEx * returns, so s_pScreenPriv->hwndScreen is invalid at this point. * We go ahead and copy our hwnd parameter over top of the screen * privates hwndScreen so that we have a valid value for * that member. Otherwise, the tray icon will disappear * the first time you move the mouse over top of it. */ s_pScreenPriv->hwndScreen = hwnd; winInitNotifyIcon(s_pScreenPriv); } return 0; case WM_DISPLAYCHANGE: /* WM_DISPLAYCHANGE seems to be sent when the monitor layout or any monitor's resolution or depth changes, but its lParam and wParam always indicate the resolution and bpp for the primary monitor (so ignore that as we could be on any monitor...) */ /* We cannot handle a display mode change during initialization */ if (s_pScreenInfo == NULL) FatalError("winWindowProc - WM_DISPLAYCHANGE - The display " "mode changed while we were initializing. This is " "very bad and unexpected. Exiting.\n"); /* * We do not care about display changes with * fullscreen DirectDraw engines, because those engines set * their own mode when they become active. */ if (s_pScreenInfo->fFullScreen && (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL)) { break; } ErrorF("winWindowProc - WM_DISPLAYCHANGE - new width: %d " "new height: %d new bpp: %d\n", LOWORD(lParam), HIWORD(lParam), (int)wParam); /* 0 bpp has no defined meaning, ignore this message */ if (wParam == 0) break; /* * Check for a disruptive change in depth. * We can only display a message for a disruptive depth change, * we cannot do anything to correct the situation. */ /* XXX: maybe we need to check if GetSystemMetrics(SM_SAMEDISPLAYFORMAT) has changed as well... */ if (s_pScreenInfo->dwBPP != GetDeviceCaps(s_pScreenPriv->hdcScreen, BITSPIXEL)) { if (s_pScreenInfo->dwEngine == WIN_SERVER_SHADOW_DDNL) { /* Cannot display the visual until the depth is restored */ ErrorF("winWindowProc - Disruptive change in depth\n"); /* Display depth change dialog */ winDisplayDepthChangeDialog(s_pScreenPriv); /* Flag that we have an invalid screen depth */ s_pScreenPriv->fBadDepth = TRUE; /* Minimize the display window */ ShowWindow(hwnd, SW_MINIMIZE); } else { /* For GDI, performance may suffer until original depth is restored */ ErrorF ("winWindowProc - Performance may be non-optimal after change in depth\n"); } } else { /* Flag that we have a valid screen depth */ s_pScreenPriv->fBadDepth = FALSE; } /* If we could cheaply check if this WM_DISPLAYCHANGE change affects the monitor(s) which this X screen is displayed on then we should do so here. For the moment, assume it does. (this is probably usually the case so that might be an overoptimization) */ { /* In rootless modes which are monitor or virtual desktop size use RandR to resize the X screen */ if ((!s_pScreenInfo->fUserGaveHeightAndWidth) && (s_pScreenInfo->iResizeMode == resizeWithRandr) && (s_pScreenInfo-> fRootless || s_pScreenInfo-> fMultiWindow )) { DWORD dwWidth = 0, dwHeight = 0; if (s_pScreenInfo->fMultipleMonitors) { /* resize to new virtual desktop size */ dwWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN); dwHeight = GetSystemMetrics(SM_CYVIRTUALSCREEN); } else { /* resize to new size of specified monitor */ struct GetMonitorInfoData data; if (QueryMonitor(s_pScreenInfo->iMonitor, &data)) { dwWidth = data.monitorWidth; dwHeight = data.monitorHeight; /* XXX: monitor may have changed position, so we might need to update xinerama data */ } else { ErrorF("Monitor number %d no longer exists!\n", s_pScreenInfo->iMonitor); } } /* XXX: probably a small bug here: we don't compute the work area and allow for task bar XXX: generally, we don't allow for the task bar being moved after the server is started */ /* Set screen size to match new size, if it is different to current */ if (((dwWidth != 0) && (dwHeight != 0)) && ((s_pScreenInfo->dwWidth != dwWidth) || (s_pScreenInfo->dwHeight != dwHeight))) { winDoRandRScreenSetSize(s_pScreen, dwWidth, dwHeight, (dwWidth * 25.4) / monitorResolution, (dwHeight * 25.4) / monitorResolution); } } else { /* * We can simply recreate the same-sized primary surface when * the display dimensions change. */ winDebug ("winWindowProc - WM_DISPLAYCHANGE - Releasing and recreating primary surface\n"); /* Release the old primary surface */ if (*s_pScreenPriv->pwinReleasePrimarySurface) (*s_pScreenPriv->pwinReleasePrimarySurface) (s_pScreen); /* Create the new primary surface */ if (*s_pScreenPriv->pwinCreatePrimarySurface) (*s_pScreenPriv->pwinCreatePrimarySurface) (s_pScreen); } } break; case WM_SIZE: { SCROLLINFO si; RECT rcWindow; int iWidth, iHeight; #if CYGDEBUG winDebug("winWindowProc - WM_SIZE\n"); #endif /* Break if we do not allow resizing */ if ((s_pScreenInfo->iResizeMode == resizeNotAllowed) || !s_pScreenInfo->fDecoration || s_pScreenInfo->fRootless || s_pScreenInfo->fMultiWindow || s_pScreenInfo->fFullScreen) break; /* No need to resize if we get minimized */ if (wParam == SIZE_MINIMIZED) return 0; ErrorF("winWindowProc - WM_SIZE - new client area w: %d h: %d\n", LOWORD(lParam), HIWORD(lParam)); if (s_pScreenInfo->iResizeMode == resizeWithRandr) { /* Actual resizing is done on WM_EXITSIZEMOVE */ return 0; } /* Otherwise iResizeMode == resizeWithScrollbars */ /* * Get the size of the whole window, including client area, * scrollbars, and non-client area decorations (caption, borders). * We do this because we need to check if the client area * without scrollbars is large enough to display the whole visual. * The new client area size passed by lParam already subtracts * the size of the scrollbars if they are currently displayed. * So checking is LOWORD(lParam) == visual_width and * HIWORD(lParam) == visual_height will never tell us to hide * the scrollbars because the client area would always be too small. * GetClientRect returns the same sizes given by lParam, so we * cannot use GetClientRect either. */ GetWindowRect(hwnd, &rcWindow); iWidth = rcWindow.right - rcWindow.left; iHeight = rcWindow.bottom - rcWindow.top; /* Subtract the frame size from the window size. */ iWidth -= 2 * GetSystemMetrics(SM_CXSIZEFRAME); iHeight -= (2 * GetSystemMetrics(SM_CYSIZEFRAME) + GetSystemMetrics(SM_CYCAPTION)); /* * Update scrollbar page sizes. * NOTE: If page size == range, then the scrollbar is * automatically hidden. */ /* Is the naked client area large enough to show the whole visual? */ if (iWidth < s_pScreenInfo->dwWidth || iHeight < s_pScreenInfo->dwHeight) { /* Client area too small to display visual, use scrollbars */ iWidth -= GetSystemMetrics(SM_CXVSCROLL); iHeight -= GetSystemMetrics(SM_CYHSCROLL); } /* Set the horizontal scrollbar page size */ si.cbSize = sizeof(si); si.fMask = SIF_PAGE | SIF_RANGE; si.nMin = 0; si.nMax = s_pScreenInfo->dwWidth - 1; si.nPage = iWidth; SetScrollInfo(hwnd, SB_HORZ, &si, TRUE); /* Set the vertical scrollbar page size */ si.cbSize = sizeof(si); si.fMask = SIF_PAGE | SIF_RANGE; si.nMin = 0; si.nMax = s_pScreenInfo->dwHeight - 1; si.nPage = iHeight; SetScrollInfo(hwnd, SB_VERT, &si, TRUE); /* * NOTE: Scrollbars may have moved if they were at the * far right/bottom, so we query their current position. */ /* Get the horizontal scrollbar position and set the offset */ si.cbSize = sizeof(si); si.fMask = SIF_POS; GetScrollInfo(hwnd, SB_HORZ, &si); s_pScreenInfo->dwXOffset = -si.nPos; /* Get the vertical scrollbar position and set the offset */ si.cbSize = sizeof(si); si.fMask = SIF_POS; GetScrollInfo(hwnd, SB_VERT, &si); s_pScreenInfo->dwYOffset = -si.nPos; } return 0; case WM_SYSCOMMAND: if (s_pScreenInfo->iResizeMode == resizeWithRandr && ((wParam & 0xfff0) == SC_MAXIMIZE || (wParam & 0xfff0) == SC_RESTORE)) PostMessage(hwnd, WM_EXITSIZEMOVE, 0, 0); break; case WM_ENTERSIZEMOVE: ErrorF("winWindowProc - WM_ENTERSIZEMOVE\n"); break; case WM_EXITSIZEMOVE: ErrorF("winWindowProc - WM_EXITSIZEMOVE\n"); if (s_pScreenInfo->iResizeMode == resizeWithRandr) { /* Set screen size to match new client area, if it is different to current */ RECT rcClient; DWORD dwWidth, dwHeight; GetClientRect(hwnd, &rcClient); dwWidth = rcClient.right - rcClient.left; dwHeight = rcClient.bottom - rcClient.top; if ((s_pScreenInfo->dwWidth != dwWidth) || (s_pScreenInfo->dwHeight != dwHeight)) { /* mm = dots * (25.4 mm / inch) / (dots / inch) */ winDoRandRScreenSetSize(s_pScreen, dwWidth, dwHeight, (dwWidth * 25.4) / monitorResolution, (dwHeight * 25.4) / monitorResolution); } } break; case WM_VSCROLL: { SCROLLINFO si; int iVertPos; #if CYGDEBUG winDebug("winWindowProc - WM_VSCROLL\n"); #endif /* Get vertical scroll bar info */ si.cbSize = sizeof(si); si.fMask = SIF_ALL; GetScrollInfo(hwnd, SB_VERT, &si); /* Save the vertical position for comparison later */ iVertPos = si.nPos; /* * Don't forget: * moving the scrollbar to the DOWN, scroll the content UP */ switch (LOWORD(wParam)) { case SB_TOP: si.nPos = si.nMin; break; case SB_BOTTOM: si.nPos = si.nMax - si.nPage + 1; break; case SB_LINEUP: si.nPos -= 1; break; case SB_LINEDOWN: si.nPos += 1; break; case SB_PAGEUP: si.nPos -= si.nPage; break; case SB_PAGEDOWN: si.nPos += si.nPage; break; case SB_THUMBTRACK: si.nPos = si.nTrackPos; break; default: break; } /* * We retrieve the position after setting it, * because Windows may adjust it. */ si.fMask = SIF_POS; SetScrollInfo(hwnd, SB_VERT, &si, TRUE); GetScrollInfo(hwnd, SB_VERT, &si); /* Scroll the window if the position has changed */ if (si.nPos != iVertPos) { /* Save the new offset for bit block transfers, etc. */ s_pScreenInfo->dwYOffset = -si.nPos; /* Change displayed region in the window */ ScrollWindowEx(hwnd, 0, iVertPos - si.nPos, NULL, NULL, NULL, NULL, SW_INVALIDATE); /* Redraw the window contents */ UpdateWindow(hwnd); } } return 0; case WM_HSCROLL: { SCROLLINFO si; int iHorzPos; #if CYGDEBUG winDebug("winWindowProc - WM_HSCROLL\n"); #endif /* Get horizontal scroll bar info */ si.cbSize = sizeof(si); si.fMask = SIF_ALL; GetScrollInfo(hwnd, SB_HORZ, &si); /* Save the horizontal position for comparison later */ iHorzPos = si.nPos; /* * Don't forget: * moving the scrollbar to the RIGHT, scroll the content LEFT */ switch (LOWORD(wParam)) { case SB_LEFT: si.nPos = si.nMin; break; case SB_RIGHT: si.nPos = si.nMax - si.nPage + 1; break; case SB_LINELEFT: si.nPos -= 1; break; case SB_LINERIGHT: si.nPos += 1; break; case SB_PAGELEFT: si.nPos -= si.nPage; break; case SB_PAGERIGHT: si.nPos += si.nPage; break; case SB_THUMBTRACK: si.nPos = si.nTrackPos; break; default: break; } /* * We retrieve the position after setting it, * because Windows may adjust it. */ si.fMask = SIF_POS; SetScrollInfo(hwnd, SB_HORZ, &si, TRUE); GetScrollInfo(hwnd, SB_HORZ, &si); /* Scroll the window if the position has changed */ if (si.nPos != iHorzPos) { /* Save the new offset for bit block transfers, etc. */ s_pScreenInfo->dwXOffset = -si.nPos; /* Change displayed region in the window */ ScrollWindowEx(hwnd, iHorzPos - si.nPos, 0, NULL, NULL, NULL, NULL, SW_INVALIDATE); /* Redraw the window contents */ UpdateWindow(hwnd); } } return 0; case WM_GETMINMAXINFO: { MINMAXINFO *pMinMaxInfo = (MINMAXINFO *) lParam; int iCaptionHeight; int iBorderHeight, iBorderWidth; #if CYGDEBUG winDebug("winWindowProc - WM_GETMINMAXINFO - pScreenInfo: %p\n", s_pScreenInfo); #endif /* Can't do anything without screen info */ if (s_pScreenInfo == NULL || (s_pScreenInfo->iResizeMode != resizeWithScrollbars) || s_pScreenInfo->fFullScreen || !s_pScreenInfo->fDecoration || s_pScreenInfo->fRootless || s_pScreenInfo->fMultiWindow ) break; /* * Here we can override the maximum tracking size, which * is the largest size that can be assigned to our window * via the sizing border. */ /* * FIXME: Do we only need to do this once, since our visual size * does not change? Does Windows store this value statically * once we have set it once? */ /* Get the border and caption sizes */ iCaptionHeight = GetSystemMetrics(SM_CYCAPTION); iBorderWidth = 2 * GetSystemMetrics(SM_CXSIZEFRAME); iBorderHeight = 2 * GetSystemMetrics(SM_CYSIZEFRAME); /* Allow the full visual to be displayed */ pMinMaxInfo->ptMaxTrackSize.x = s_pScreenInfo->dwWidth + iBorderWidth; pMinMaxInfo->ptMaxTrackSize.y = s_pScreenInfo->dwHeight + iBorderHeight + iCaptionHeight; } return 0; case WM_ERASEBKGND: #if CYGDEBUG winDebug("winWindowProc - WM_ERASEBKGND\n"); #endif /* * Pretend that we did erase the background but we don't care, * the application uses the full window estate. This avoids some * flickering when resizing. */ return TRUE; case WM_PAINT: #if CYGDEBUG winDebug("winWindowProc - WM_PAINT\n"); #endif /* Only paint if we have privates and the server is enabled */ if (s_pScreenPriv == NULL || !s_pScreenPriv->fEnabled || (s_pScreenInfo->fFullScreen && !s_pScreenPriv->fActive) || s_pScreenPriv->fBadDepth) { /* We don't want to paint */ break; } /* Break out here if we don't have a valid paint routine */ if (s_pScreenPriv->pwinBltExposedRegions == NULL) break; /* Call the engine dependent repainter */ (*s_pScreenPriv->pwinBltExposedRegions) (s_pScreen); return 0; case WM_PALETTECHANGED: { #if CYGDEBUG winDebug("winWindowProc - WM_PALETTECHANGED\n"); #endif /* * Don't process if we don't have privates or a colormap, * or if we have an invalid depth. */ if (s_pScreenPriv == NULL || s_pScreenPriv->pcmapInstalled == NULL || s_pScreenPriv->fBadDepth) break; /* Return if we caused the palette to change */ if ((HWND) wParam == hwnd) { /* Redraw the screen */ (*s_pScreenPriv->pwinRedrawScreen) (s_pScreen); return 0; } /* Reinstall the windows palette */ (*s_pScreenPriv->pwinRealizeInstalledPalette) (s_pScreen); /* Redraw the screen */ (*s_pScreenPriv->pwinRedrawScreen) (s_pScreen); return 0; } case WM_MOUSEMOVE: /* We can't do anything without privates */ if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* We can't do anything without g_pwinPointer */ if (g_pwinPointer == NULL) break; /* Has the mouse pointer crossed screens? */ if (s_pScreen != miPointerGetScreen(g_pwinPointer)) miPointerSetScreen(g_pwinPointer, s_pScreenInfo->dwScreen, GET_X_LPARAM(lParam) - s_pScreenInfo->dwXOffset, GET_Y_LPARAM(lParam) - s_pScreenInfo->dwYOffset); /* Are we tracking yet? */ if (!s_fTracking) { TRACKMOUSEEVENT tme; /* Setup data structure */ ZeroMemory(&tme, sizeof(tme)); tme.cbSize = sizeof(tme); tme.dwFlags = TME_LEAVE; tme.hwndTrack = hwnd; /* Call the tracking function */ if (!TrackMouseEvent(&tme)) ErrorF("winWindowProc - TrackMouseEvent failed\n"); /* Flag that we are tracking now */ s_fTracking = TRUE; } /* Hide or show the Windows mouse cursor */ if (g_fSoftwareCursor && g_fCursor && (s_pScreenPriv->fActive || s_pScreenInfo->fLessPointer)) { /* Hide Windows cursor */ g_fCursor = FALSE; ShowCursor(FALSE); } else if (g_fSoftwareCursor && !g_fCursor && !s_pScreenPriv->fActive && !s_pScreenInfo->fLessPointer) { /* Show Windows cursor */ g_fCursor = TRUE; ShowCursor(TRUE); } /* Deliver absolute cursor position to X Server */ winEnqueueMotion(GET_X_LPARAM(lParam) - s_pScreenInfo->dwXOffset, GET_Y_LPARAM(lParam) - s_pScreenInfo->dwYOffset); return 0; case WM_NCMOUSEMOVE: /* * We break instead of returning 0 since we need to call * DefWindowProc to get the mouse cursor changes * and min/max/close button highlighting in Windows XP. * The Platform SDK says that you should return 0 if you * process this message, but it fails to mention that you * will give up any default functionality if you do return 0. */ /* We can't do anything without privates */ if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Non-client mouse movement, show Windows cursor */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } break; case WM_MOUSELEAVE: /* Mouse has left our client area */ /* Flag that we are no longer tracking */ s_fTracking = FALSE; /* Show the mouse cursor, if necessary */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } return 0; case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button1, wParam); case WM_LBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) ReleaseCapture(); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button1, wParam); case WM_MBUTTONDBLCLK: case WM_MBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button2, wParam); case WM_MBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) ReleaseCapture(); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button2, wParam); case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button3, wParam); case WM_RBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) ReleaseCapture(); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button3, wParam); case WM_XBUTTONDBLCLK: case WM_XBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, HIWORD(wParam) + 7, wParam); case WM_XBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; if (s_pScreenInfo->fRootless) ReleaseCapture(); return winMouseButtonsHandle(s_pScreen, ButtonRelease, HIWORD(wParam) + 7, wParam); case WM_TIMER: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Branch on the timer id */ switch (wParam) { case WIN_E3B_TIMER_ID: /* Send delayed button press */ winMouseButtonsSendEvent(ButtonPress, s_pScreenPriv->iE3BCachedPress); /* Kill this timer */ KillTimer(s_pScreenPriv->hwndScreen, WIN_E3B_TIMER_ID); /* Clear screen privates flags */ s_pScreenPriv->iE3BCachedPress = 0; break; case WIN_POLLING_MOUSE_TIMER_ID: { static POINT last_point; POINT point; WPARAM wL, wM, wR, wShift, wCtrl; LPARAM lPos; /* Get the current position of the mouse cursor */ GetCursorPos(&point); /* Map from screen (-X, -Y) to root (0, 0) */ point.x -= GetSystemMetrics(SM_XVIRTUALSCREEN); point.y -= GetSystemMetrics(SM_YVIRTUALSCREEN); /* If the mouse pointer has moved, deliver absolute cursor position to X Server */ if (last_point.x != point.x || last_point.y != point.y) { winEnqueueMotion(point.x, point.y); last_point.x = point.x; last_point.y = point.y; } /* Check if a button was released but we didn't see it */ GetCursorPos(&point); wL = (GetKeyState(VK_LBUTTON) & 0x8000) ? MK_LBUTTON : 0; wM = (GetKeyState(VK_MBUTTON) & 0x8000) ? MK_MBUTTON : 0; wR = (GetKeyState(VK_RBUTTON) & 0x8000) ? MK_RBUTTON : 0; wShift = (GetKeyState(VK_SHIFT) & 0x8000) ? MK_SHIFT : 0; wCtrl = (GetKeyState(VK_CONTROL) & 0x8000) ? MK_CONTROL : 0; lPos = MAKELPARAM(point.x, point.y); if (g_fButton[0] && !wL) PostMessage(hwnd, WM_LBUTTONUP, wCtrl | wM | wR | wShift, lPos); if (g_fButton[1] && !wM) PostMessage(hwnd, WM_MBUTTONUP, wCtrl | wL | wR | wShift, lPos); if (g_fButton[2] && !wR) PostMessage(hwnd, WM_RBUTTONUP, wCtrl | wL | wM | wShift, lPos); } } return 0; case WM_CTLCOLORSCROLLBAR: FatalError("winWindowProc - WM_CTLCOLORSCROLLBAR - We are not " "supposed to get this message. Exiting.\n"); return 0; case WM_MOUSEWHEEL: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; #if CYGDEBUG winDebug("winWindowProc - WM_MOUSEWHEEL\n"); #endif /* Button4 = WheelUp */ /* Button5 = WheelDown */ winMouseWheel(&(s_pScreenPriv->iDeltaZ), GET_WHEEL_DELTA_WPARAM(wParam), Button4, Button5); break; case WM_MOUSEHWHEEL: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; #if CYGDEBUG winDebug("winWindowProc - WM_MOUSEHWHEEL\n"); #endif /* Button7 = TiltRight */ /* Button6 = TiltLeft */ winMouseWheel(&(s_pScreenPriv->iDeltaV), GET_WHEEL_DELTA_WPARAM(wParam), 7, 6); break; case WM_SETFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Restore the state of all mode keys */ winRestoreModeKeyStates(); /* Add the keyboard hook if possible */ if (g_fKeyboardHookLL) g_fKeyboardHookLL = winInstallKeyboardHookLL(); return 0; case WM_KILLFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Release any pressed keys */ winKeybdReleaseKeys(); /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL(); return 0; case WM_SYSKEYDOWN: case WM_KEYDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* * FIXME: Catching Alt-F4 like this is really terrible. This should * be generalized to handle other Windows keyboard signals. Actually, * the list keys to catch and the actions to perform when caught should * be configurable; that way user's can customize the keys that they * need to have passed through to their window manager or apps, or they * can remap certain actions to new key codes that do not conflict * with the X apps that they are using. Yeah, that'll take awhile. */ if ((s_pScreenInfo->fUseWinKillKey && wParam == VK_F4 && (GetKeyState(VK_MENU) & 0x8000)) || (s_pScreenInfo->fUseUnixKillKey && wParam == VK_BACK && (GetKeyState(VK_MENU) & 0x8000) && (GetKeyState(VK_CONTROL) & 0x8000))) { /* * Better leave this message here, just in case some unsuspecting * user enters Alt + F4 and is surprised when the application * quits. */ ErrorF("winWindowProc - WM_*KEYDOWN - Closekey hit, quitting\n"); /* Display Exit dialog */ winDisplayExitDialog(s_pScreenPriv); return 0; } /* * Don't do anything for the Windows keys, as focus will soon * be returned to Windows. We may be able to trap the Windows keys, * but we should determine if that is desirable before doing so. */ if ((wParam == VK_LWIN || wParam == VK_RWIN) && !g_fKeyboardHookLL) break; /* Discard fake Ctrl_L events that precede AltGR on non-US keyboards */ if (winIsFakeCtrl_L(message, wParam, lParam)) return 0; /* * Discard presses generated from Windows auto-repeat */ if (lParam & (1 << 30)) { switch (wParam) { /* ago: Pressing LControl while RControl is pressed is * Indicated as repeat. Fix this! */ case VK_CONTROL: case VK_SHIFT: if (winCheckKeyPressed(wParam, lParam)) return 0; break; default: return 0; } } /* Translate Windows key code to X scan code */ iScanCode = winTranslateKey(wParam, lParam); /* Ignore repeats for CapsLock */ if (wParam == VK_CAPITAL) lParam = 1; /* Send the key event(s) */ for (i = 0; i < LOWORD(lParam); ++i) winSendKeyEvent(iScanCode, TRUE); return 0; case WM_SYSKEYUP: case WM_KEYUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* * Don't do anything for the Windows keys, as focus will soon * be returned to Windows. We may be able to trap the Windows keys, * but we should determine if that is desirable before doing so. */ if ((wParam == VK_LWIN || wParam == VK_RWIN) && !g_fKeyboardHookLL) break; /* Ignore the fake Ctrl_L that follows an AltGr release */ if (winIsFakeCtrl_L(message, wParam, lParam)) return 0; /* Enqueue a keyup event */ iScanCode = winTranslateKey(wParam, lParam); winSendKeyEvent(iScanCode, FALSE); /* Release all pressed shift keys */ if (wParam == VK_SHIFT) winFixShiftKeys(iScanCode); return 0; case WM_ACTIVATE: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* TODO: Override display of window when we have a bad depth */ if (LOWORD(wParam) != WA_INACTIVE && s_pScreenPriv->fBadDepth) { ErrorF("winWindowProc - WM_ACTIVATE - Bad depth, trying " "to override window activation\n"); /* Minimize the window */ ShowWindow(hwnd, SW_MINIMIZE); /* Display dialog box */ if (g_hDlgDepthChange != NULL) { /* Make the existing dialog box active */ SetActiveWindow(g_hDlgDepthChange); } else { /* TODO: Recreate the dialog box and bring to the top */ ShowWindow(g_hDlgDepthChange, SW_SHOWDEFAULT); } /* Don't do any other processing of this message */ return 0; } #if CYGDEBUG winDebug("winWindowProc - WM_ACTIVATE\n"); #endif /* * Focus is being changed to another window. * The other window may or may not belong to * our process. */ /* Clear any lingering wheel delta */ s_pScreenPriv->iDeltaZ = 0; s_pScreenPriv->iDeltaV = 0; /* Reshow the Windows mouse cursor if we are being deactivated */ if (g_fSoftwareCursor && LOWORD(wParam) == WA_INACTIVE && !g_fCursor) { /* Show Windows cursor */ g_fCursor = TRUE; ShowCursor(TRUE); } return 0; case WM_ACTIVATEAPP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; #if CYGDEBUG || TRUE winDebug("winWindowProc - WM_ACTIVATEAPP\n"); #endif /* Activate or deactivate */ s_pScreenPriv->fActive = wParam; /* Reshow the Windows mouse cursor if we are being deactivated */ if (g_fSoftwareCursor && !s_pScreenPriv->fActive && !g_fCursor) { /* Show Windows cursor */ g_fCursor = TRUE; ShowCursor(TRUE); } /* Call engine specific screen activation/deactivation function */ (*s_pScreenPriv->pwinActivateApp) (s_pScreen); return 0; case WM_COMMAND: switch (LOWORD(wParam)) { case ID_APP_EXIT: /* Display Exit dialog */ winDisplayExitDialog(s_pScreenPriv); return 0; case ID_APP_HIDE_ROOT: if (s_pScreenPriv->fRootWindowShown) ShowWindow(s_pScreenPriv->hwndScreen, SW_HIDE); else ShowWindow(s_pScreenPriv->hwndScreen, SW_SHOW); s_pScreenPriv->fRootWindowShown = !s_pScreenPriv->fRootWindowShown; return 0; case ID_APP_MONITOR_PRIMARY: fPrimarySelection = !fPrimarySelection; return 0; case ID_APP_ABOUT: /* Display the About box */ winDisplayAboutDialog(s_pScreenPriv); return 0; default: /* It's probably one of the custom menus... */ if (HandleCustomWM_COMMAND(0, LOWORD(wParam), s_pScreenPriv)) return 0; } break; case WM_GIVEUP: /* Tell X that we are giving up */ if (s_pScreenInfo->fMultiWindow) winDeinitMultiWindowWM(); GiveUp(0); return 0; case WM_CLOSE: /* Display Exit dialog */ winDisplayExitDialog(s_pScreenPriv); return 0; case WM_SETCURSOR: if (LOWORD(lParam) == HTCLIENT) { if (!g_fSoftwareCursor) SetCursor(s_pScreenPriv->cursor.handle); return TRUE; } break; default: if ((message == s_uTaskbarRestart) && !s_pScreenInfo->fNoTrayIcon) { winInitNotifyIcon(s_pScreenPriv); } break; } return DefWindowProc(hwnd, message, wParam, lParam); } xorg-server-21.1.16/hw/xwin/ddraw.h0000644000175000017500000040317514757411105012522 #ifdef __MINGW64_VERSION_MAJOR #include_next #define __XWIN_DDRAW_H #endif #ifndef __XWIN_DDRAW_H #define __XWIN_DDRAW_H #include #include #include #if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1) #define DUMMYUNIONNAME1 u1 #endif #define ICOM_CALL_( xfn, p, args) (p)->lpVtbl->xfn args #ifdef UNICODE #define WINELIB_NAME_AW(func) func##W #else #define WINELIB_NAME_AW(func) func##A #endif /* UNICODE */ #define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type; #ifdef __cplusplus extern "C" { #endif /* defined(__cplusplus) */ #ifndef DIRECTDRAW_VERSION #define DIRECTDRAW_VERSION 0x0700 #endif /* DIRECTDRAW_VERSION */ /***************************************************************************** * Predeclare the interfaces */ DEFINE_GUID(CLSID_DirectDraw, 0xD7B70EE0, 0x4340, 0x11CF, 0xB0, 0x63, 0x00, 0x20, 0xAF, 0xC2, 0xCD, 0x35); DEFINE_GUID(CLSID_DirectDraw7, 0x3C305196, 0x50DB, 0x11D3, 0x9C, 0xFE, 0x00, 0xC0, 0x4F, 0xD9, 0x30, 0xC5); DEFINE_GUID(CLSID_DirectDrawClipper, 0x593817A0, 0x7DB3, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xb9, 0x33, 0x56); DEFINE_GUID(IID_IDirectDraw, 0x6C14DB80, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00, 0xAA, 0x00, 0xB9, 0x33, 0x56); DEFINE_GUID(IID_IDirectDraw4, 0x9c59509a, 0x39bd, 0x11d1, 0x8c, 0x4a, 0x00, 0xc0, 0x4f, 0xd9, 0x30, 0xc5); DEFINE_GUID(IID_IDirectDraw7, 0x15e65ec0, 0x3b9c, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b); DEFINE_GUID(IID_IDirectDrawSurface, 0x6C14DB81, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); DEFINE_GUID(IID_IDirectDrawSurface2, 0x57805885, 0x6eec, 0x11cf, 0x94, 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27); DEFINE_GUID(IID_IDirectDrawSurface3, 0xDA044E00, 0x69B2, 0x11D0, 0xA1, 0xD5, 0x00, 0xAA, 0x00, 0xB8, 0xDF, 0xBB); DEFINE_GUID(IID_IDirectDrawSurface4, 0x0B2B8630, 0xAD35, 0x11D0, 0x8E, 0xA6, 0x00, 0x60, 0x97, 0x97, 0xEA, 0x5B); DEFINE_GUID(IID_IDirectDrawSurface7, 0x06675a80, 0x3b9b, 0x11d2, 0xb9, 0x2f, 0x00, 0x60, 0x97, 0x97, 0xea, 0x5b); DEFINE_GUID(IID_IDirectDrawPalette, 0x6C14DB84, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); DEFINE_GUID(IID_IDirectDrawClipper, 0x6C14DB85, 0xA733, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); DEFINE_GUID(IID_IDirectDrawColorControl, 0x4B9F0EE0, 0x0D7E, 0x11D0, 0x9B, 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8); DEFINE_GUID(IID_IDirectDrawGammaControl, 0x69C11C3E, 0xB46B, 0x11D1, 0xAD, 0x7A, 0x00, 0xC0, 0x4F, 0xC2, 0x9B, 0x4E); typedef struct IDirectDraw *LPDIRECTDRAW; typedef struct IDirectDraw2 *LPDIRECTDRAW2; typedef struct IDirectDraw4 *LPDIRECTDRAW4; typedef struct IDirectDraw7 *LPDIRECTDRAW7; typedef struct IDirectDrawClipper *LPDIRECTDRAWCLIPPER; typedef struct IDirectDrawPalette *LPDIRECTDRAWPALETTE; typedef struct IDirectDrawSurface *LPDIRECTDRAWSURFACE; typedef struct IDirectDrawSurface2 *LPDIRECTDRAWSURFACE2; typedef struct IDirectDrawSurface3 *LPDIRECTDRAWSURFACE3; typedef struct IDirectDrawSurface4 *LPDIRECTDRAWSURFACE4; typedef struct IDirectDrawSurface7 *LPDIRECTDRAWSURFACE7; typedef struct IDirectDrawColorControl *LPDIRECTDRAWCOLORCONTROL; typedef struct IDirectDrawGammaControl *LPDIRECTDRAWGAMMACONTROL; #define DDENUMRET_CANCEL 0 #define DDENUMRET_OK 1 #define DD_OK 0 #define _FACDD 0x876 #define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) #define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 ) #define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 ) #define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 ) #define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 ) #define DDERR_EXCEPTION MAKE_DDHRESULT( 55 ) #define DDERR_GENERIC E_FAIL #define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 ) #define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 ) #define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 ) #define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 ) #define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 ) #define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 ) #define DDERR_INVALIDPARAMS E_INVALIDARG #define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 ) #define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 ) #define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 ) #define DDERR_NO3D MAKE_DDHRESULT( 170 ) #define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 ) #define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 ) #define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 ) #define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 ) #define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 ) #define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 ) #define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 ) #define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 ) #define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 ) #define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 ) #define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 ) #define DDERR_NOGDI MAKE_DDHRESULT( 240 ) #define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 ) #define DDERR_NOTFOUND MAKE_DDHRESULT( 255 ) #define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 ) #define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 ) #define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 ) #define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 ) #define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 ) #define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 ) #define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 ) #define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 ) #define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 ) #define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 ) #define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 ) #define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 ) #define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 ) #define DDERR_OUTOFMEMORY E_OUTOFMEMORY #define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 ) #define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 ) #define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 ) #define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 ) #define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 ) #define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 ) #define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 ) #define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 ) #define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 ) #define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 ) #define DDERR_SURFACELOST MAKE_DDHRESULT( 450 ) #define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 ) #define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 ) #define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 ) #define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 ) #define DDERR_UNSUPPORTED E_NOTIMPL #define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 ) #define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 ) #define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 ) #define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 ) #define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 ) #define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 ) #define DDERR_XALIGN MAKE_DDHRESULT( 560 ) #define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 ) #define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 ) #define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 ) #define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 ) #define DDERR_NOEMULATION MAKE_DDHRESULT( 565 ) #define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 ) #define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 ) #define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 ) #define DDERR_NOHWND MAKE_DDHRESULT( 569 ) #define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 ) #define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 ) #define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 ) #define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 ) #define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 ) #define DDERR_NOBLTHW MAKE_DDHRESULT( 575 ) #define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 ) #define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 ) #define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 ) #define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 ) #define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 ) #define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 ) #define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 ) #define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 ) #define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 ) #define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 ) #define DDERR_NODC MAKE_DDHRESULT( 586 ) #define DDERR_WRONGMODE MAKE_DDHRESULT( 587 ) #define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 ) #define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 ) #define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 ) #define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 ) #define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 ) #define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 ) #define DDERR_NOTLOADED MAKE_DDHRESULT( 601 ) #define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 ) #define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 ) #define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 ) #define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 ) #define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 ) #define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 ) #define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 ) #define DDERR_MOREDATA MAKE_DDHRESULT( 690 ) #define DDERR_EXPIRED MAKE_DDHRESULT( 691 ) #define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 ) #define DDERR_NEWMODE MAKE_DDHRESULT( 693 ) #define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 ) #define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 ) #define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 ) #define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 ) #define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 ) #define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED /* dwFlags for Blt* */ #define DDBLT_ALPHADEST 0x00000001 #define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002 #define DDBLT_ALPHADESTNEG 0x00000004 #define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008 #define DDBLT_ALPHAEDGEBLEND 0x00000010 #define DDBLT_ALPHASRC 0x00000020 #define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040 #define DDBLT_ALPHASRCNEG 0x00000080 #define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100 #define DDBLT_ASYNC 0x00000200 #define DDBLT_COLORFILL 0x00000400 #define DDBLT_DDFX 0x00000800 #define DDBLT_DDROPS 0x00001000 #define DDBLT_KEYDEST 0x00002000 #define DDBLT_KEYDESTOVERRIDE 0x00004000 #define DDBLT_KEYSRC 0x00008000 #define DDBLT_KEYSRCOVERRIDE 0x00010000 #define DDBLT_ROP 0x00020000 #define DDBLT_ROTATIONANGLE 0x00040000 #define DDBLT_ZBUFFER 0x00080000 #define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000 #define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000 #define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000 #define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000 #define DDBLT_WAIT 0x01000000 #define DDBLT_DEPTHFILL 0x02000000 #define DDBLT_DONOTWAIT 0x08000000 /* dwTrans for BltFast */ #define DDBLTFAST_NOCOLORKEY 0x00000000 #define DDBLTFAST_SRCCOLORKEY 0x00000001 #define DDBLTFAST_DESTCOLORKEY 0x00000002 #define DDBLTFAST_WAIT 0x00000010 #define DDBLTFAST_DONOTWAIT 0x00000020 /* dwFlags for Flip */ #define DDFLIP_WAIT 0x00000001 #define DDFLIP_EVEN 0x00000002 /* only valid for overlay */ #define DDFLIP_ODD 0x00000004 /* only valid for overlay */ #define DDFLIP_NOVSYNC 0x00000008 #define DDFLIP_STEREO 0x00000010 #define DDFLIP_DONOTWAIT 0x00000020 /* dwFlags for GetBltStatus */ #define DDGBS_CANBLT 0x00000001 #define DDGBS_ISBLTDONE 0x00000002 /* dwFlags for IDirectDrawSurface7::GetFlipStatus */ #define DDGFS_CANFLIP 1L #define DDGFS_ISFLIPDONE 2L /* dwFlags for IDirectDrawSurface7::SetPrivateData */ #define DDSPD_IUNKNOWNPTR 1L #define DDSPD_VOLATILE 2L /* DDSCAPS.dwCaps */ /* reserved1, was 3d capable */ #define DDSCAPS_RESERVED1 0x00000001 /* surface contains alpha information */ #define DDSCAPS_ALPHA 0x00000002 /* this surface is a backbuffer */ #define DDSCAPS_BACKBUFFER 0x00000004 /* complex surface structure */ #define DDSCAPS_COMPLEX 0x00000008 /* part of surface flipping structure */ #define DDSCAPS_FLIP 0x00000010 /* this surface is the frontbuffer surface */ #define DDSCAPS_FRONTBUFFER 0x00000020 /* this is a plain offscreen surface */ #define DDSCAPS_OFFSCREENPLAIN 0x00000040 /* overlay */ #define DDSCAPS_OVERLAY 0x00000080 /* palette objects can be created and attached to us */ #define DDSCAPS_PALETTE 0x00000100 /* primary surface (the one the user looks at currently)(right eye)*/ #define DDSCAPS_PRIMARYSURFACE 0x00000200 /* primary surface for left eye */ #define DDSCAPS_PRIMARYSURFACELEFT 0x00000400 /* surface exists in systemmemory */ #define DDSCAPS_SYSTEMMEMORY 0x00000800 /* surface can be used as a texture */ #define DDSCAPS_TEXTURE 0x00001000 /* surface may be destination for 3d rendering */ #define DDSCAPS_3DDEVICE 0x00002000 /* surface exists in videomemory */ #define DDSCAPS_VIDEOMEMORY 0x00004000 /* surface changes immediately visible */ #define DDSCAPS_VISIBLE 0x00008000 /* write only surface */ #define DDSCAPS_WRITEONLY 0x00010000 /* zbuffer surface */ #define DDSCAPS_ZBUFFER 0x00020000 /* has its own DC */ #define DDSCAPS_OWNDC 0x00040000 /* surface should be able to receive live video */ #define DDSCAPS_LIVEVIDEO 0x00080000 /* should be able to have a hw codec decompress stuff into it */ #define DDSCAPS_HWCODEC 0x00100000 /* mode X (320x200 or 320x240) surface */ #define DDSCAPS_MODEX 0x00200000 /* one mipmap surface (1 level) */ #define DDSCAPS_MIPMAP 0x00400000 #define DDSCAPS_RESERVED2 0x00800000 /* memory allocation delayed until Load() */ #define DDSCAPS_ALLOCONLOAD 0x04000000 /* Indicates that the surface will receive data from a video port */ #define DDSCAPS_VIDEOPORT 0x08000000 /* surface is in local videomemory */ #define DDSCAPS_LOCALVIDMEM 0x10000000 /* surface is in nonlocal videomemory */ #define DDSCAPS_NONLOCALVIDMEM 0x20000000 /* surface is a standard VGA mode surface (NOT ModeX) */ #define DDSCAPS_STANDARDVGAMODE 0x40000000 /* optimized? surface */ #define DDSCAPS_OPTIMIZED 0x80000000 typedef struct _DDSCAPS { DWORD dwCaps; /* capabilities of surface wanted */ } DDSCAPS, *LPDDSCAPS; /* DDSCAPS2.dwCaps2 */ /* indicates the surface will receive data from a video port using deinterlacing hardware. */ #define DDSCAPS2_HARDWAREDEINTERLACE 0x00000002 /* indicates the surface will be locked very frequently. */ #define DDSCAPS2_HINTDYNAMIC 0x00000004 /* indicates surface can be re-ordered or retiled on load() */ #define DDSCAPS2_HINTSTATIC 0x00000008 /* indicates surface to be managed by directdraw/direct3D */ #define DDSCAPS2_TEXTUREMANAGE 0x00000010 /* reserved bits */ #define DDSCAPS2_RESERVED1 0x00000020 #define DDSCAPS2_RESERVED2 0x00000040 /* indicates surface will never be locked again */ #define DDSCAPS2_OPAQUE 0x00000080 /* set at CreateSurface() time to indicate antialiasing will be used */ #define DDSCAPS2_HINTANTIALIASING 0x00000100 /* set at CreateSurface() time to indicate cubic environment map */ #define DDSCAPS2_CUBEMAP 0x00000200 /* face flags for cube maps */ #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400 #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800 #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000 #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000 #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000 #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000 /* specifies all faces of a cube for CreateSurface() */ #define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\ DDSCAPS2_CUBEMAP_NEGATIVEX |\ DDSCAPS2_CUBEMAP_POSITIVEY |\ DDSCAPS2_CUBEMAP_NEGATIVEY |\ DDSCAPS2_CUBEMAP_POSITIVEZ |\ DDSCAPS2_CUBEMAP_NEGATIVEZ ) /* set for mipmap sublevels on DirectX7 and later. ignored by CreateSurface() */ #define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000 /* indicates texture surface to be managed by Direct3D *only* */ #define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000 /* indicates managed surface that can safely be lost */ #define DDSCAPS2_DONOTPERSIST 0x00040000 /* indicates surface is part of a stereo flipping chain */ #define DDSCAPS2_STEREOSURFACELEFT 0x00080000 typedef struct _DDSCAPS2 { DWORD dwCaps; /* capabilities of surface wanted */ DWORD dwCaps2; /* additional capabilities */ DWORD dwCaps3; /* reserved capabilities */ DWORD dwCaps4; /* more reserved capabilities */ } DDSCAPS2, *LPDDSCAPS2; #define DD_ROP_SPACE (256/32) /* space required to store ROP array */ typedef struct _DDCAPS_DX7 { /* DirectX 7 version of caps struct */ DWORD dwSize; /* size of the DDDRIVERCAPS structure */ DWORD dwCaps; /* driver specific capabilities */ DWORD dwCaps2; /* more driver specific capabilities */ DWORD dwCKeyCaps; /* color key capabilities of the surface */ DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ DWORD dwPalCaps; /* palette capabilities */ DWORD dwSVCaps; /* stereo vision capabilities */ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ DWORD dwVidMemTotal; /* total amount of video memory */ DWORD dwVidMemFree; /* amount of free video memory */ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ DWORD dwNumFourCCCodes; /* number of four cc codes */ DWORD dwAlignBoundarySrc; /* source rectangle alignment */ DWORD dwAlignSizeSrc; /* source rectangle byte size */ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ DWORD dwAlignSizeDest; /* dest rectangle byte size */ DWORD dwAlignStrideAlign; /* stride alignment */ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */ DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwReserved1; DWORD dwReserved2; DWORD dwReserved3; DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ DWORD dwSVBRops[DD_ROP_SPACE]; /* ROPS supported for System->Vmem blts */ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ DWORD dwVSBRops[DD_ROP_SPACE]; /* ROPS supported for Vmem->System blts */ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ DWORD dwSSBRops[DD_ROP_SPACE]; /* ROPS supported for System->System blts */ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ DWORD dwCurrVideoPorts; /* current number of video ports used */ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */ DDSCAPS2 ddsCaps; /* surface capabilities */ } DDCAPS_DX7, *LPDDCAPS_DX7; typedef struct _DDCAPS_DX6 { /* DirectX 6 version of caps struct */ DWORD dwSize; /* size of the DDDRIVERCAPS structure */ DWORD dwCaps; /* driver specific capabilities */ DWORD dwCaps2; /* more driver specific capabilities */ DWORD dwCKeyCaps; /* color key capabilities of the surface */ DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ DWORD dwPalCaps; /* palette capabilities */ DWORD dwSVCaps; /* stereo vision capabilities */ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ DWORD dwVidMemTotal; /* total amount of video memory */ DWORD dwVidMemFree; /* amount of free video memory */ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ DWORD dwNumFourCCCodes; /* number of four cc codes */ DWORD dwAlignBoundarySrc; /* source rectangle alignment */ DWORD dwAlignSizeSrc; /* source rectangle byte size */ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ DWORD dwAlignSizeDest; /* dest rectangle byte size */ DWORD dwAlignStrideAlign; /* stride alignment */ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */ DDSCAPS ddsOldCaps; /* old DDSCAPS - superseded for DirectX6+ */ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwReserved1; DWORD dwReserved2; DWORD dwReserved3; DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ DWORD dwSVBRops[DD_ROP_SPACE]; /* ROPS supported for System->Vmem blts */ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ DWORD dwVSBRops[DD_ROP_SPACE]; /* ROPS supported for Vmem->System blts */ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ DWORD dwSSBRops[DD_ROP_SPACE]; /* ROPS supported for System->System blts */ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ DWORD dwCurrVideoPorts; /* current number of video ports used */ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */ /* and one new member for DirectX 6 */ DDSCAPS2 ddsCaps; /* surface capabilities */ } DDCAPS_DX6, *LPDDCAPS_DX6; typedef struct _DDCAPS_DX5 { /* DirectX5 version of caps struct */ DWORD dwSize; /* size of the DDDRIVERCAPS structure */ DWORD dwCaps; /* driver specific capabilities */ DWORD dwCaps2; /* more driver specific capabilities */ DWORD dwCKeyCaps; /* color key capabilities of the surface */ DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ DWORD dwPalCaps; /* palette capabilities */ DWORD dwSVCaps; /* stereo vision capabilities */ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ DWORD dwVidMemTotal; /* total amount of video memory */ DWORD dwVidMemFree; /* amount of free video memory */ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ DWORD dwNumFourCCCodes; /* number of four cc codes */ DWORD dwAlignBoundarySrc; /* source rectangle alignment */ DWORD dwAlignSizeSrc; /* source rectangle byte size */ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ DWORD dwAlignSizeDest; /* dest rectangle byte size */ DWORD dwAlignStrideAlign; /* stride alignment */ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */ DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwReserved1; DWORD dwReserved2; DWORD dwReserved3; DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ DWORD dwSVBRops[DD_ROP_SPACE]; /* ROPS supported for System->Vmem blts */ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ DWORD dwVSBRops[DD_ROP_SPACE]; /* ROPS supported for Vmem->System blts */ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ DWORD dwSSBRops[DD_ROP_SPACE]; /* ROPS supported for System->System blts */ /* the following are the new DirectX 5 members */ DWORD dwMaxVideoPorts; /* maximum number of usable video ports */ DWORD dwCurrVideoPorts; /* current number of video ports used */ DWORD dwSVBCaps2; /* more driver specific capabilities for System->Vmem blts */ DWORD dwNLVBCaps; /* driver specific capabilities for non-local->local vidmem blts */ DWORD dwNLVBCaps2; /* more driver specific capabilities non-local->local vidmem blts */ DWORD dwNLVBCKeyCaps; /* driver color key capabilities for non-local->local vidmem blts */ DWORD dwNLVBFXCaps; /* driver FX capabilities for non-local->local blts */ DWORD dwNLVBRops[DD_ROP_SPACE]; /* ROPS supported for non-local->local blts */ } DDCAPS_DX5, *LPDDCAPS_DX5; typedef struct _DDCAPS_DX3 { /* DirectX3 version of caps struct */ DWORD dwSize; /* size of the DDDRIVERCAPS structure */ DWORD dwCaps; /* driver specific capabilities */ DWORD dwCaps2; /* more driver specific capabilities */ DWORD dwCKeyCaps; /* color key capabilities of the surface */ DWORD dwFXCaps; /* driver specific stretching and effects capabilities */ DWORD dwFXAlphaCaps; /* alpha driver specific capabilities */ DWORD dwPalCaps; /* palette capabilities */ DWORD dwSVCaps; /* stereo vision capabilities */ DWORD dwAlphaBltConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaBltPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaBltSurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlayConstBitDepths; /* DDBD_2,4,8 */ DWORD dwAlphaOverlayPixelBitDepths; /* DDBD_1,2,4,8 */ DWORD dwAlphaOverlaySurfaceBitDepths; /* DDBD_1,2,4,8 */ DWORD dwZBufferBitDepths; /* DDBD_8,16,24,32 */ DWORD dwVidMemTotal; /* total amount of video memory */ DWORD dwVidMemFree; /* amount of free video memory */ DWORD dwMaxVisibleOverlays; /* maximum number of visible overlays */ DWORD dwCurrVisibleOverlays; /* current number of visible overlays */ DWORD dwNumFourCCCodes; /* number of four cc codes */ DWORD dwAlignBoundarySrc; /* source rectangle alignment */ DWORD dwAlignSizeSrc; /* source rectangle byte size */ DWORD dwAlignBoundaryDest; /* dest rectangle alignment */ DWORD dwAlignSizeDest; /* dest rectangle byte size */ DWORD dwAlignStrideAlign; /* stride alignment */ DWORD dwRops[DD_ROP_SPACE]; /* ROPS supported */ DDSCAPS ddsCaps; /* DDSCAPS structure has all the general capabilities */ DWORD dwMinOverlayStretch; /* minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxOverlayStretch; /* maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinLiveVideoStretch; /* minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxLiveVideoStretch; /* maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMinHwCodecStretch; /* minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwMaxHwCodecStretch; /* maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 */ DWORD dwReserved1; DWORD dwReserved2; DWORD dwReserved3; DWORD dwSVBCaps; /* driver specific capabilities for System->Vmem blts */ DWORD dwSVBCKeyCaps; /* driver color key capabilities for System->Vmem blts */ DWORD dwSVBFXCaps; /* driver FX capabilities for System->Vmem blts */ DWORD dwSVBRops[DD_ROP_SPACE]; /* ROPS supported for System->Vmem blts */ DWORD dwVSBCaps; /* driver specific capabilities for Vmem->System blts */ DWORD dwVSBCKeyCaps; /* driver color key capabilities for Vmem->System blts */ DWORD dwVSBFXCaps; /* driver FX capabilities for Vmem->System blts */ DWORD dwVSBRops[DD_ROP_SPACE]; /* ROPS supported for Vmem->System blts */ DWORD dwSSBCaps; /* driver specific capabilities for System->System blts */ DWORD dwSSBCKeyCaps; /* driver color key capabilities for System->System blts */ DWORD dwSSBFXCaps; /* driver FX capabilities for System->System blts */ DWORD dwSSBRops[DD_ROP_SPACE]; /* ROPS supported for System->System blts */ DWORD dwReserved4; DWORD dwReserved5; DWORD dwReserved6; } DDCAPS_DX3, *LPDDCAPS_DX3; /* set caps struct according to DIRECTDRAW_VERSION */ #if DIRECTDRAW_VERSION <= 0x300 typedef DDCAPS_DX3 DDCAPS; #elif DIRECTDRAW_VERSION <= 0x500 typedef DDCAPS_DX5 DDCAPS; #elif DIRECTDRAW_VERSION <= 0x600 typedef DDCAPS_DX6 DDCAPS; #else typedef DDCAPS_DX7 DDCAPS; #endif typedef DDCAPS *LPDDCAPS; /* DDCAPS.dwCaps */ #define DDCAPS_3D 0x00000001 #define DDCAPS_ALIGNBOUNDARYDEST 0x00000002 #define DDCAPS_ALIGNSIZEDEST 0x00000004 #define DDCAPS_ALIGNBOUNDARYSRC 0x00000008 #define DDCAPS_ALIGNSIZESRC 0x00000010 #define DDCAPS_ALIGNSTRIDE 0x00000020 #define DDCAPS_BLT 0x00000040 #define DDCAPS_BLTQUEUE 0x00000080 #define DDCAPS_BLTFOURCC 0x00000100 #define DDCAPS_BLTSTRETCH 0x00000200 #define DDCAPS_GDI 0x00000400 #define DDCAPS_OVERLAY 0x00000800 #define DDCAPS_OVERLAYCANTCLIP 0x00001000 #define DDCAPS_OVERLAYFOURCC 0x00002000 #define DDCAPS_OVERLAYSTRETCH 0x00004000 #define DDCAPS_PALETTE 0x00008000 #define DDCAPS_PALETTEVSYNC 0x00010000 #define DDCAPS_READSCANLINE 0x00020000 #define DDCAPS_STEREOVIEW 0x00040000 #define DDCAPS_VBI 0x00080000 #define DDCAPS_ZBLTS 0x00100000 #define DDCAPS_ZOVERLAYS 0x00200000 #define DDCAPS_COLORKEY 0x00400000 #define DDCAPS_ALPHA 0x00800000 #define DDCAPS_COLORKEYHWASSIST 0x01000000 #define DDCAPS_NOHARDWARE 0x02000000 #define DDCAPS_BLTCOLORFILL 0x04000000 #define DDCAPS_BANKSWITCHED 0x08000000 #define DDCAPS_BLTDEPTHFILL 0x10000000 #define DDCAPS_CANCLIP 0x20000000 #define DDCAPS_CANCLIPSTRETCHED 0x40000000 #define DDCAPS_CANBLTSYSMEM 0x80000000 /* DDCAPS.dwCaps2 */ #define DDCAPS2_CERTIFIED 0x00000001 #define DDCAPS2_NO2DDURING3DSCENE 0x00000002 #define DDCAPS2_VIDEOPORT 0x00000004 #define DDCAPS2_AUTOFLIPOVERLAY 0x00000008 #define DDCAPS2_CANBOBINTERLEAVED 0x00000010 #define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020 #define DDCAPS2_COLORCONTROLOVERLAY 0x00000040 #define DDCAPS2_COLORCONTROLPRIMARY 0x00000080 #define DDCAPS2_CANDROPZ16BIT 0x00000100 #define DDCAPS2_NONLOCALVIDMEM 0x00000200 #define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400 #define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800 #define DDCAPS2_WIDESURFACES 0x00001000 #define DDCAPS2_CANFLIPODDEVEN 0x00002000 #define DDCAPS2_CANBOBHARDWARE 0x00004000 #define DDCAPS2_COPYFOURCC 0x00008000 #define DDCAPS2_PRIMARYGAMMA 0x00020000 #define DDCAPS2_CANRENDERWINDOWED 0x00080000 #define DDCAPS2_CANCALIBRATEGAMMA 0x00100000 #define DDCAPS2_FLIPINTERVAL 0x00200000 #define DDCAPS2_FLIPNOVSYNC 0x00400000 #define DDCAPS2_CANMANAGETEXTURE 0x00800000 #define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000 #define DDCAPS2_STEREO 0x02000000 #define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000 /* Set/Get Colour Key Flags */ #define DDCKEY_COLORSPACE 0x00000001 /* Struct is single colour space */ #define DDCKEY_DESTBLT 0x00000002 /* To be used as dest for blt */ #define DDCKEY_DESTOVERLAY 0x00000004 /* To be used as dest for CK overlays */ #define DDCKEY_SRCBLT 0x00000008 /* To be used as src for blt */ #define DDCKEY_SRCOVERLAY 0x00000010 /* To be used as src for CK overlays */ typedef struct _DDCOLORKEY { DWORD dwColorSpaceLowValue; /* low boundary of color space that is to * be treated as Color Key, inclusive */ DWORD dwColorSpaceHighValue; /* high boundary of color space that is * to be treated as Color Key, inclusive */ } DDCOLORKEY, *LPDDCOLORKEY; /* ddCKEYCAPS bits */ #define DDCKEYCAPS_DESTBLT 0x00000001 #define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002 #define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004 #define DDCKEYCAPS_DESTBLTYUV 0x00000008 #define DDCKEYCAPS_DESTOVERLAY 0x00000010 #define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020 #define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040 #define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080 #define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100 #define DDCKEYCAPS_SRCBLT 0x00000200 #define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400 #define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800 #define DDCKEYCAPS_SRCBLTYUV 0x00001000 #define DDCKEYCAPS_SRCOVERLAY 0x00002000 #define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000 #define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000 #define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000 #define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000 #define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000 typedef struct _DDPIXELFORMAT { DWORD dwSize; /* 0: size of structure */ DWORD dwFlags; /* 4: pixel format flags */ DWORD dwFourCC; /* 8: (FOURCC code) */ union { DWORD dwRGBBitCount; /* C: how many bits per pixel */ DWORD dwYUVBitCount; /* C: how many bits per pixel */ DWORD dwZBufferBitDepth; /* C: how many bits for z buffers */ DWORD dwAlphaBitDepth; /* C: how many bits for alpha channels */ DWORD dwLuminanceBitCount; DWORD dwBumpBitCount; } DUMMYUNIONNAME1; union { DWORD dwRBitMask; /* 10: mask for red bit */ DWORD dwYBitMask; /* 10: mask for Y bits */ DWORD dwStencilBitDepth; DWORD dwLuminanceBitMask; DWORD dwBumpDuBitMask; } DUMMYUNIONNAME2; union { DWORD dwGBitMask; /* 14: mask for green bits */ DWORD dwUBitMask; /* 14: mask for U bits */ DWORD dwZBitMask; DWORD dwBumpDvBitMask; } DUMMYUNIONNAME3; union { DWORD dwBBitMask; /* 18: mask for blue bits */ DWORD dwVBitMask; /* 18: mask for V bits */ DWORD dwStencilBitMask; DWORD dwBumpLuminanceBitMask; } DUMMYUNIONNAME4; union { DWORD dwRGBAlphaBitMask; /* 1C: mask for alpha channel */ DWORD dwYUVAlphaBitMask; /* 1C: mask for alpha channel */ DWORD dwLuminanceAlphaBitMask; DWORD dwRGBZBitMask; /* 1C: mask for Z channel */ DWORD dwYUVZBitMask; /* 1C: mask for Z channel */ } DUMMYUNIONNAME5; /* 20: next structure */ } DDPIXELFORMAT, *LPDDPIXELFORMAT; /* DDCAPS.dwFXCaps */ #define DDFXCAPS_BLTALPHA 0x00000001 #define DDFXCAPS_OVERLAYALPHA 0x00000004 #define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010 #define DDFXCAPS_BLTARITHSTRETCHY 0x00000020 #define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040 #define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080 #define DDFXCAPS_BLTROTATION 0x00000100 #define DDFXCAPS_BLTROTATION90 0x00000200 #define DDFXCAPS_BLTSHRINKX 0x00000400 #define DDFXCAPS_BLTSHRINKXN 0x00000800 #define DDFXCAPS_BLTSHRINKY 0x00001000 #define DDFXCAPS_BLTSHRINKYN 0x00002000 #define DDFXCAPS_BLTSTRETCHX 0x00004000 #define DDFXCAPS_BLTSTRETCHXN 0x00008000 #define DDFXCAPS_BLTSTRETCHY 0x00010000 #define DDFXCAPS_BLTSTRETCHYN 0x00020000 #define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000 #define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008 #define DDFXCAPS_OVERLAYSHRINKX 0x00080000 #define DDFXCAPS_OVERLAYSHRINKXN 0x00100000 #define DDFXCAPS_OVERLAYSHRINKY 0x00200000 #define DDFXCAPS_OVERLAYSHRINKYN 0x00400000 #define DDFXCAPS_OVERLAYSTRETCHX 0x00800000 #define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000 #define DDFXCAPS_OVERLAYSTRETCHY 0x02000000 #define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000 #define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000 #define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000 #define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY /* DDCAPS.dwFXAlphaCaps */ #define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001 #define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002 #define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004 #define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008 #define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010 #define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020 #define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040 #define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080 #define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100 #define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200 /* DDCAPS.dwPalCaps */ #define DDPCAPS_4BIT 0x00000001 #define DDPCAPS_8BITENTRIES 0x00000002 #define DDPCAPS_8BIT 0x00000004 #define DDPCAPS_INITIALIZE 0x00000008 #define DDPCAPS_PRIMARYSURFACE 0x00000010 #define DDPCAPS_PRIMARYSURFACELEFT 0x00000020 #define DDPCAPS_ALLOW256 0x00000040 #define DDPCAPS_VSYNC 0x00000080 #define DDPCAPS_1BIT 0x00000100 #define DDPCAPS_2BIT 0x00000200 #define DDPCAPS_ALPHA 0x00000400 /* DDCAPS.dwSVCaps */ /* the first 4 of these are now obsolete */ #if DIRECTDRAW_VERSION >= 0x700 /* FIXME: I'm not sure when this switch occurred */ #define DDSVCAPS_RESERVED1 0x00000001 #define DDSVCAPS_RESERVED2 0x00000002 #define DDSVCAPS_RESERVED3 0x00000004 #define DDSVCAPS_RESERVED4 0x00000008 #else #define DDSVCAPS_ENIGMA 0x00000001 #define DDSVCAPS_FLICKER 0x00000002 #define DDSVCAPS_REDBLUE 0x00000004 #define DDSVCAPS_SPLIT 0x00000008 #endif #define DDSVCAPS_STEREOSEQUENTIAL 0x00000010 /* BitDepths */ #define DDBD_1 0x00004000 #define DDBD_2 0x00002000 #define DDBD_4 0x00001000 #define DDBD_8 0x00000800 #define DDBD_16 0x00000400 #define DDBD_24 0x00000200 #define DDBD_32 0x00000100 /* DDOVERLAYFX.dwDDFX */ #define DDOVERFX_ARITHSTRETCHY 0x00000001 #define DDOVERFX_MIRRORLEFTRIGHT 0x00000002 #define DDOVERFX_MIRRORUPDOWN 0x00000004 /* UpdateOverlay flags */ #define DDOVER_ALPHADEST 0x00000001 #define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002 #define DDOVER_ALPHADESTNEG 0x00000004 #define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008 #define DDOVER_ALPHAEDGEBLEND 0x00000010 #define DDOVER_ALPHASRC 0x00000020 #define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040 #define DDOVER_ALPHASRCNEG 0x00000080 #define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100 #define DDOVER_HIDE 0x00000200 #define DDOVER_KEYDEST 0x00000400 #define DDOVER_KEYDESTOVERRIDE 0x00000800 #define DDOVER_KEYSRC 0x00001000 #define DDOVER_KEYSRCOVERRIDE 0x00002000 #define DDOVER_SHOW 0x00004000 #define DDOVER_ADDDIRTYRECT 0x00008000 #define DDOVER_REFRESHDIRTYRECTS 0x00010000 #define DDOVER_REFRESHALL 0x00020000 #define DDOVER_DDFX 0x00080000 #define DDOVER_AUTOFLIP 0x00100000 #define DDOVER_BOB 0x00200000 #define DDOVER_OVERRIDEBOBWEAVE 0x00400000 #define DDOVER_INTERLEAVED 0x00800000 /* DDCOLORKEY.dwFlags */ #define DDPF_ALPHAPIXELS 0x00000001 #define DDPF_ALPHA 0x00000002 #define DDPF_FOURCC 0x00000004 #define DDPF_PALETTEINDEXED4 0x00000008 #define DDPF_PALETTEINDEXEDTO8 0x00000010 #define DDPF_PALETTEINDEXED8 0x00000020 #define DDPF_RGB 0x00000040 #define DDPF_COMPRESSED 0x00000080 #define DDPF_RGBTOYUV 0x00000100 #define DDPF_YUV 0x00000200 #define DDPF_ZBUFFER 0x00000400 #define DDPF_PALETTEINDEXED1 0x00000800 #define DDPF_PALETTEINDEXED2 0x00001000 #define DDPF_ZPIXELS 0x00002000 #define DDPF_STENCILBUFFER 0x00004000 #define DDPF_ALPHAPREMULT 0x00008000 #define DDPF_LUMINANCE 0x00020000 #define DDPF_BUMPLUMINANCE 0x00040000 #define DDPF_BUMPDUDV 0x00080000 /* SetCooperativeLevel dwFlags */ #define DDSCL_FULLSCREEN 0x00000001 #define DDSCL_ALLOWREBOOT 0x00000002 #define DDSCL_NOWINDOWCHANGES 0x00000004 #define DDSCL_NORMAL 0x00000008 #define DDSCL_EXCLUSIVE 0x00000010 #define DDSCL_ALLOWMODEX 0x00000040 #define DDSCL_SETFOCUSWINDOW 0x00000080 #define DDSCL_SETDEVICEWINDOW 0x00000100 #define DDSCL_CREATEDEVICEWINDOW 0x00000200 #define DDSCL_MULTITHREADED 0x00000400 #define DDSCL_FPUSETUP 0x00000800 #define DDSCL_FPUPRESERVE 0x00001000 /* DDSURFACEDESC.dwFlags */ #define DDSD_CAPS 0x00000001 #define DDSD_HEIGHT 0x00000002 #define DDSD_WIDTH 0x00000004 #define DDSD_PITCH 0x00000008 #define DDSD_BACKBUFFERCOUNT 0x00000020 #define DDSD_ZBUFFERBITDEPTH 0x00000040 #define DDSD_ALPHABITDEPTH 0x00000080 #define DDSD_LPSURFACE 0x00000800 #define DDSD_PIXELFORMAT 0x00001000 #define DDSD_CKDESTOVERLAY 0x00002000 #define DDSD_CKDESTBLT 0x00004000 #define DDSD_CKSRCOVERLAY 0x00008000 #define DDSD_CKSRCBLT 0x00010000 #define DDSD_MIPMAPCOUNT 0x00020000 #define DDSD_REFRESHRATE 0x00040000 #define DDSD_LINEARSIZE 0x00080000 #define DDSD_TEXTURESTAGE 0x00100000 #define DDSD_FVF 0x00200000 #define DDSD_SRCVBHANDLE 0x00400000 #define DDSD_ALL 0x007ff9ee /* EnumSurfaces flags */ #define DDENUMSURFACES_ALL 0x00000001 #define DDENUMSURFACES_MATCH 0x00000002 #define DDENUMSURFACES_NOMATCH 0x00000004 #define DDENUMSURFACES_CANBECREATED 0x00000008 #define DDENUMSURFACES_DOESEXIST 0x00000010 /* SetDisplayMode flags */ #define DDSDM_STANDARDVGAMODE 0x00000001 /* EnumDisplayModes flags */ #define DDEDM_REFRESHRATES 0x00000001 #define DDEDM_STANDARDVGAMODES 0x00000002 /* WaitForVerticalDisplay flags */ #define DDWAITVB_BLOCKBEGIN 0x00000001 #define DDWAITVB_BLOCKBEGINEVENT 0x00000002 #define DDWAITVB_BLOCKEND 0x00000004 typedef struct _DDSURFACEDESC { DWORD dwSize; /* 0: size of the DDSURFACEDESC structure */ DWORD dwFlags; /* 4: determines what fields are valid */ DWORD dwHeight; /* 8: height of surface to be created */ DWORD dwWidth; /* C: width of input surface */ union { LONG lPitch; /* 10: distance to start of next line (return value only) */ DWORD dwLinearSize; } DUMMYUNIONNAME1; DWORD dwBackBufferCount; /* 14: number of back buffers requested */ union { DWORD dwMipMapCount; /* 18:number of mip-map levels requested */ DWORD dwZBufferBitDepth; /*18: depth of Z buffer requested */ DWORD dwRefreshRate; /* 18:refresh rate (used when display mode is described) */ } DUMMYUNIONNAME2; DWORD dwAlphaBitDepth; /* 1C:depth of alpha buffer requested */ DWORD dwReserved; /* 20:reserved */ LPVOID lpSurface; /* 24:pointer to the associated surface memory */ DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use */ DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use */ DDCOLORKEY ddckCKSrcOverlay; /* 38: CK for source overlay use */ DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use */ DDPIXELFORMAT ddpfPixelFormat; /* 48: pixel format description of the surface */ DDSCAPS ddsCaps; /* 68: direct draw surface caps */ } DDSURFACEDESC, *LPDDSURFACEDESC; typedef struct _DDSURFACEDESC2 { DWORD dwSize; /* 0: size of the DDSURFACEDESC structure */ DWORD dwFlags; /* 4: determines what fields are valid */ DWORD dwHeight; /* 8: height of surface to be created */ DWORD dwWidth; /* C: width of input surface */ union { LONG lPitch; /*10: distance to start of next line (return value only) */ DWORD dwLinearSize; /*10: formless late-allocated optimized surface size */ } DUMMYUNIONNAME1; DWORD dwBackBufferCount; /* 14: number of back buffers requested */ union { DWORD dwMipMapCount; /* 18:number of mip-map levels requested */ DWORD dwRefreshRate; /* 18:refresh rate (used when display mode is described) */ DWORD dwSrcVBHandle; /* 18:source used in VB::Optimize */ } DUMMYUNIONNAME2; DWORD dwAlphaBitDepth; /* 1C:depth of alpha buffer requested */ DWORD dwReserved; /* 20:reserved */ LPVOID lpSurface; /* 24:pointer to the associated surface memory */ union { DDCOLORKEY ddckCKDestOverlay; /* 28: CK for dest overlay use */ DWORD dwEmptyFaceColor; /* 28: color for empty cubemap faces */ } DUMMYUNIONNAME3; DDCOLORKEY ddckCKDestBlt; /* 30: CK for destination blt use */ DDCOLORKEY ddckCKSrcOverlay; /* 38: CK for source overlay use */ DDCOLORKEY ddckCKSrcBlt; /* 40: CK for source blt use */ union { DDPIXELFORMAT ddpfPixelFormat; /* 48: pixel format description of the surface */ DWORD dwFVF; /* 48: vertex format description of vertex buffers */ } DUMMYUNIONNAME4; DDSCAPS2 ddsCaps; /* 68: DDraw surface caps */ DWORD dwTextureStage; /* 78: stage in multitexture cascade */ } DDSURFACEDESC2, *LPDDSURFACEDESC2; /* DDCOLORCONTROL.dwFlags */ #define DDCOLOR_BRIGHTNESS 0x00000001 #define DDCOLOR_CONTRAST 0x00000002 #define DDCOLOR_HUE 0x00000004 #define DDCOLOR_SATURATION 0x00000008 #define DDCOLOR_SHARPNESS 0x00000010 #define DDCOLOR_GAMMA 0x00000020 #define DDCOLOR_COLORENABLE 0x00000040 typedef struct { DWORD dwSize; DWORD dwFlags; LONG lBrightness; LONG lContrast; LONG lHue; LONG lSaturation; LONG lSharpness; LONG lGamma; LONG lColorEnable; DWORD dwReserved1; } DDCOLORCONTROL, *LPDDCOLORCONTROL; typedef struct { WORD red[256]; WORD green[256]; WORD blue[256]; } DDGAMMARAMP, *LPDDGAMMARAMP; typedef BOOL CALLBACK(*LPDDENUMCALLBACKA) (GUID *, LPSTR, LPSTR, LPVOID); typedef BOOL CALLBACK(*LPDDENUMCALLBACKW) (GUID *, LPWSTR, LPWSTR, LPVOID); DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACK) typedef HRESULT CALLBACK(*LPDDENUMMODESCALLBACK) (LPDDSURFACEDESC, LPVOID); typedef HRESULT CALLBACK(*LPDDENUMMODESCALLBACK2) (LPDDSURFACEDESC2, LPVOID); typedef HRESULT CALLBACK(*LPDDENUMSURFACESCALLBACK) (LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID); typedef HRESULT CALLBACK(*LPDDENUMSURFACESCALLBACK2) (LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID); typedef HRESULT CALLBACK(*LPDDENUMSURFACESCALLBACK7) (LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID); typedef BOOL CALLBACK(*LPDDENUMCALLBACKEXA) (GUID *, LPSTR, LPSTR, LPVOID, HMONITOR); typedef BOOL CALLBACK(*LPDDENUMCALLBACKEXW) (GUID *, LPWSTR, LPWSTR, LPVOID, HMONITOR); DECL_WINELIB_TYPE_AW(LPDDENUMCALLBACKEX) HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); HRESULT WINAPI DirectDrawEnumerateExW(LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); #define DirectDrawEnumerateEx WINELIB_NAME_AW(DirectDrawEnumerateEx) /* flags for DirectDrawEnumerateEx */ #define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001 #define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002 #define DDENUM_NONDISPLAYDEVICES 0x00000004 /* flags for DirectDrawCreate or IDirectDraw::Initialize */ #define DDCREATE_HARDWAREONLY 1L #define DDCREATE_EMULATIONONLY 2L typedef struct _DDBLTFX { DWORD dwSize; /* size of structure */ DWORD dwDDFX; /* FX operations */ DWORD dwROP; /* Win32 raster operations */ DWORD dwDDROP; /* Raster operations new for DirectDraw */ DWORD dwRotationAngle; /* Rotation angle for blt */ DWORD dwZBufferOpCode; /* ZBuffer compares */ DWORD dwZBufferLow; /* Low limit of Z buffer */ DWORD dwZBufferHigh; /* High limit of Z buffer */ DWORD dwZBufferBaseDest; /* Destination base value */ DWORD dwZDestConstBitDepth; /* Bit depth used to specify Z constant for destination */ union { DWORD dwZDestConst; /* Constant to use as Z buffer for dest */ LPDIRECTDRAWSURFACE lpDDSZBufferDest; /* Surface to use as Z buffer for dest */ } DUMMYUNIONNAME1; DWORD dwZSrcConstBitDepth; /* Bit depth used to specify Z constant for source */ union { DWORD dwZSrcConst; /* Constant to use as Z buffer for src */ LPDIRECTDRAWSURFACE lpDDSZBufferSrc; /* Surface to use as Z buffer for src */ } DUMMYUNIONNAME2; DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ DWORD dwAlphaEdgeBlend; /* Alpha for edge blending */ DWORD dwReserved; DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ union { DWORD dwAlphaDestConst; /* Constant to use as Alpha Channel */ LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as Alpha Channel */ } DUMMYUNIONNAME3; DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ union { DWORD dwAlphaSrcConst; /* Constant to use as Alpha Channel */ LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as Alpha Channel */ } DUMMYUNIONNAME4; union { DWORD dwFillColor; /* color in RGB or Palettized */ DWORD dwFillDepth; /* depth value for z-buffer */ DWORD dwFillPixel; /* pixel val for RGBA or RGBZ */ LPDIRECTDRAWSURFACE lpDDSPattern; /* Surface to use as pattern */ } DUMMYUNIONNAME5; DDCOLORKEY ddckDestColorkey; /* DestColorkey override */ DDCOLORKEY ddckSrcColorkey; /* SrcColorkey override */ } DDBLTFX, *LPDDBLTFX; /* dwDDFX */ /* arithmetic stretching along y axis */ #define DDBLTFX_ARITHSTRETCHY 0x00000001 /* mirror on y axis */ #define DDBLTFX_MIRRORLEFTRIGHT 0x00000002 /* mirror on x axis */ #define DDBLTFX_MIRRORUPDOWN 0x00000004 /* do not tear */ #define DDBLTFX_NOTEARING 0x00000008 /* 180 degrees clockwise rotation */ #define DDBLTFX_ROTATE180 0x00000010 /* 270 degrees clockwise rotation */ #define DDBLTFX_ROTATE270 0x00000020 /* 90 degrees clockwise rotation */ #define DDBLTFX_ROTATE90 0x00000040 /* dwZBufferLow and dwZBufferHigh specify limits to the copied Z values */ #define DDBLTFX_ZBUFFERRANGE 0x00000080 /* add dwZBufferBaseDest to every source z value before compare */ #define DDBLTFX_ZBUFFERBASEDEST 0x00000100 typedef struct _DDOVERLAYFX { DWORD dwSize; /* size of structure */ DWORD dwAlphaEdgeBlendBitDepth; /* Bit depth used to specify constant for alpha edge blend */ DWORD dwAlphaEdgeBlend; /* Constant to use as alpha for edge blend */ DWORD dwReserved; DWORD dwAlphaDestConstBitDepth; /* Bit depth used to specify alpha constant for destination */ union { DWORD dwAlphaDestConst; /* Constant to use as alpha channel for dest */ LPDIRECTDRAWSURFACE lpDDSAlphaDest; /* Surface to use as alpha channel for dest */ } DUMMYUNIONNAME1; DWORD dwAlphaSrcConstBitDepth; /* Bit depth used to specify alpha constant for source */ union { DWORD dwAlphaSrcConst; /* Constant to use as alpha channel for src */ LPDIRECTDRAWSURFACE lpDDSAlphaSrc; /* Surface to use as alpha channel for src */ } DUMMYUNIONNAME2; DDCOLORKEY dckDestColorkey; /* DestColorkey override */ DDCOLORKEY dckSrcColorkey; /* DestColorkey override */ DWORD dwDDFX; /* Overlay FX */ DWORD dwFlags; /* flags */ } DDOVERLAYFX, *LPDDOVERLAYFX; typedef struct _DDBLTBATCH { LPRECT lprDest; LPDIRECTDRAWSURFACE lpDDSSrc; LPRECT lprSrc; DWORD dwFlags; LPDDBLTFX lpDDBltFx; } DDBLTBATCH, *LPDDBLTBATCH; #define MAX_DDDEVICEID_STRING 512 typedef struct tagDDDEVICEIDENTIFIER { char szDriver[MAX_DDDEVICEID_STRING]; char szDescription[MAX_DDDEVICEID_STRING]; LARGE_INTEGER liDriverVersion; DWORD dwVendorId; DWORD dwDeviceId; DWORD dwSubSysId; DWORD dwRevision; GUID guidDeviceIdentifier; } DDDEVICEIDENTIFIER, *LPDDDEVICEIDENTIFIER; typedef struct tagDDDEVICEIDENTIFIER2 { char szDriver[MAX_DDDEVICEID_STRING]; /* user readable driver name */ char szDescription[MAX_DDDEVICEID_STRING]; /* user readable description */ LARGE_INTEGER liDriverVersion; /* driver version */ DWORD dwVendorId; /* vendor ID, zero if unknown */ DWORD dwDeviceId; /* chipset ID, zero if unknown */ DWORD dwSubSysId; /* board ID, zero if unknown */ DWORD dwRevision; /* chipset version, zero if unknown */ GUID guidDeviceIdentifier; /* unique ID for this driver/chipset combination */ DWORD dwWHQLLevel; /* Windows Hardware Quality Lab certification level */ } DDDEVICEIDENTIFIER2, *LPDDDEVICEIDENTIFIER2; /***************************************************************************** * IDirectDrawPalette interface */ #undef INTERFACE #define INTERFACE IDirectDrawPalette DECLARE_INTERFACE_(IDirectDrawPalette, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, PVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(GetCaps) (THIS_ LPDWORD lpdwCaps) PURE; STDMETHOD(GetEntries) (THIS_ DWORD dwFlags, DWORD dwBase, DWORD dwNumEntries, LPPALETTEENTRY lpEntries) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags, LPPALETTEENTRY lpDDColorTable) PURE; STDMETHOD(SetEntries) (THIS_ DWORD dwFlags, DWORD dwStartingEntry, DWORD dwCount, LPPALETTEENTRY lpEntries) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawPalette_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawPalette_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawPalette_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawPalette methods ***/ #define IDirectDrawPalette_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawPalette_GetEntries(p,a,b,c,d) ICOM_CALL_(GetEntries,p,(p,a,b,c,d)) #define IDirectDrawPalette_Initialize(p,a,b,c) ICOM_CALL_(Initialize,p,(p,a,b,c)) #define IDirectDrawPalette_SetEntries(p,a,b,c,d) ICOM_CALL_(SetEntries,p,(p,a,b,c,d)) /***************************************************************************** * IDirectDrawClipper interface */ #undef INTERFACE #define INTERFACE IDirectDrawClipper DECLARE_INTERFACE_(IDirectDrawClipper, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(GetClipList) (THIS_ LPRECT lpRect, LPRGNDATA lpClipList, LPDWORD lpdwSize) PURE; STDMETHOD(GetHWnd) (THIS_ HWND * lphWnd) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, DWORD dwFlags) PURE; STDMETHOD(IsClipListChanged) (THIS_ BOOL * lpbChanged) PURE; STDMETHOD(SetClipList) (THIS_ LPRGNDATA lpClipList, DWORD dwFlags) PURE; STDMETHOD(SetHWnd) (THIS_ DWORD dwFlags, HWND hWnd) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawClipper_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawClipper_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawClipper_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawClipper methods ***/ #define IDirectDrawClipper_GetClipList(p,a,b,c) ICOM_CALL_(GetClipList,p,(p,a,b,c)) #define IDirectDrawClipper_GetHWnd(p,a) ICOM_CALL_(GetHWnd,p,(p,a)) #define IDirectDrawClipper_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawClipper_IsClipListChanged(p,a) ICOM_CALL_(IsClipListChanged,p,(p,a)) #define IDirectDrawClipper_SetClipList(p,a,b) ICOM_CALL_(SetClipList,p,(p,a,b)) #define IDirectDrawClipper_SetHWnd(p,a,b) ICOM_CALL_(SetHWnd,p,(p,a,b)) /***************************************************************************** * IDirectDraw interface */ #undef INTERFACE #define INTERFACE IDirectDraw DECLARE_INTERFACE_(IDirectDraw, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(Compact) (THIS) PURE; STDMETHOD(CreateClipper) (THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER * lplpDDClipper, IUnknown * pUnkOuter) PURE; STDMETHOD(CreatePalette) (THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE * lplpDDPalette, IUnknown * pUnkOuter) PURE; STDMETHOD(CreateSurface) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE * lplpDDSurface, IUnknown * pUnkOuter) PURE; STDMETHOD(DuplicateSurface) (THIS_ LPDIRECTDRAWSURFACE lpDDSurface, LPDIRECTDRAWSURFACE * lplpDupDDSurface) PURE; STDMETHOD(EnumDisplayModes) (THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; STDMETHOD(EnumSurfaces) (THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(FlipToGDISurface) (THIS) PURE; STDMETHOD(GetCaps) (THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; STDMETHOD(GetDisplayMode) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(GetFourCCCodes) (THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; STDMETHOD(GetGDISurface) (THIS_ LPDIRECTDRAWSURFACE * lplpGDIDDSurface) PURE; STDMETHOD(GetMonitorFrequency) (THIS_ LPDWORD lpdwFrequency) PURE; STDMETHOD(GetScanLine) (THIS_ LPDWORD lpdwScanLine) PURE; STDMETHOD(GetVerticalBlankStatus) (THIS_ BOOL * lpbIsInVB) PURE; STDMETHOD(Initialize) (THIS_ GUID * lpGUID) PURE; STDMETHOD(RestoreDisplayMode) (THIS) PURE; STDMETHOD(SetCooperativeLevel) (THIS_ HWND hWnd, DWORD dwFlags) PURE; STDMETHOD(SetDisplayMode) (THIS_ DWORD, DWORD, DWORD) PURE; STDMETHOD(WaitForVerticalBlank) (THIS_ DWORD dwFlags, HANDLE hEvent) PURE; }; /*** IUnknown methods ***/ #define IDirectDraw_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDraw_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDraw_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDraw methods ***/ #define IDirectDraw_Compact(p) ICOM_CALL_(Compact,p,(p)) #define IDirectDraw_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c)) #define IDirectDraw_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d)) #define IDirectDraw_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c)) #define IDirectDraw_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b)) #define IDirectDraw_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d)) #define IDirectDraw_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d)) #define IDirectDraw_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p)) #define IDirectDraw_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b)) #define IDirectDraw_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a)) #define IDirectDraw_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b)) #define IDirectDraw_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a)) #define IDirectDraw_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a)) #define IDirectDraw_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a)) #define IDirectDraw_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a)) #define IDirectDraw_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a)) #define IDirectDraw_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p)) #define IDirectDraw_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b)) #define IDirectDraw_SetDisplayMode(p,a,b,c) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c)) #define IDirectDraw_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b)) /* flags for Lock() */ #define DDLOCK_SURFACEMEMORYPTR 0x00000000 #define DDLOCK_WAIT 0x00000001 #define DDLOCK_EVENT 0x00000002 #define DDLOCK_READONLY 0x00000010 #define DDLOCK_WRITEONLY 0x00000020 #define DDLOCK_NOSYSLOCK 0x00000800 /***************************************************************************** * IDirectDraw2 interface */ /* Note: IDirectDraw2 cannot derive from IDirectDraw because the number of * arguments of SetDisplayMode has changed ! */ #undef INTERFACE #define INTERFACE IDirectDraw2 DECLARE_INTERFACE_(IDirectDraw2, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(Compact) (THIS) PURE; STDMETHOD(CreateClipper) (THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER * lplpDDClipper, IUnknown * pUnkOuter) PURE; STDMETHOD(CreatePalette) (THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE * lplpDDPalette, IUnknown * pUnkOuter) PURE; STDMETHOD(CreateSurface) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc, LPDIRECTDRAWSURFACE2 * lplpDDSurface, IUnknown * pUnkOuter) PURE; STDMETHOD(DuplicateSurface) (THIS_ LPDIRECTDRAWSURFACE2 lpDDSurface, LPDIRECTDRAWSURFACE2 * lplpDupDDSurface) PURE; STDMETHOD(EnumDisplayModes) (THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK lpEnumModesCallback) PURE; STDMETHOD(EnumSurfaces) (THIS_ DWORD dwFlags, LPDDSURFACEDESC lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(FlipToGDISurface) (THIS) PURE; STDMETHOD(GetCaps) (THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; STDMETHOD(GetDisplayMode) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(GetFourCCCodes) (THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; STDMETHOD(GetGDISurface) (THIS_ LPDIRECTDRAWSURFACE2 * lplpGDIDDSurface) PURE; STDMETHOD(GetMonitorFrequency) (THIS_ LPDWORD lpdwFrequency) PURE; STDMETHOD(GetScanLine) (THIS_ LPDWORD lpdwScanLine) PURE; STDMETHOD(GetVerticalBlankStatus) (THIS_ BOOL * lpbIsInVB) PURE; STDMETHOD(Initialize) (THIS_ GUID * lpGUID) PURE; STDMETHOD(RestoreDisplayMode) (THIS) PURE; STDMETHOD(SetCooperativeLevel) (THIS_ HWND hWnd, DWORD dwFlags) PURE; STDMETHOD(SetDisplayMode) (THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; STDMETHOD(WaitForVerticalBlank) (THIS_ DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(GetAvailableVidMem) (THIS_ LPDDSCAPS lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; }; /*** IUnknown methods ***/ #define IDirectDraw2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDraw2_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDraw2_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDraw methods ***/ #define IDirectDraw2_Compact(p) ICOM_CALL_(Compact,p,(p)) #define IDirectDraw2_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c)) #define IDirectDraw2_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d)) #define IDirectDraw2_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c)) #define IDirectDraw2_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b)) #define IDirectDraw2_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d)) #define IDirectDraw2_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d)) #define IDirectDraw2_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p)) #define IDirectDraw2_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b)) #define IDirectDraw2_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a)) #define IDirectDraw2_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b)) #define IDirectDraw2_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a)) #define IDirectDraw2_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a)) #define IDirectDraw2_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a)) #define IDirectDraw2_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a)) #define IDirectDraw2_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a)) #define IDirectDraw2_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p)) #define IDirectDraw2_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b)) #define IDirectDraw2_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e)) #define IDirectDraw2_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b)) /*** IDirectDraw2 methods ***/ #define IDirectDraw2_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c)) /***************************************************************************** * IDirectDraw4 interface */ #undef INTERFACE #define INTERFACE IDirectDraw4 DECLARE_INTERFACE_(IDirectDraw4, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(Compact) (THIS) PURE; STDMETHOD(CreateClipper) (THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER * lplpDDClipper, IUnknown * pUnkOuter) PURE; STDMETHOD(CreatePalette) (THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE * lplpDDPalette, IUnknown * pUnkOuter) PURE; STDMETHOD(CreateSurface) (THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE4 * lplpDDSurface, IUnknown * pUnkOuter) PURE; STDMETHOD(DuplicateSurface) (THIS_ LPDIRECTDRAWSURFACE4 lpDDSurface, LPDIRECTDRAWSURFACE4 * lplpDupDDSurface) PURE; STDMETHOD(EnumDisplayModes) (THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE; STDMETHOD(EnumSurfaces) (THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK2 lpEnumSurfacesCallback) PURE; STDMETHOD(FlipToGDISurface) (THIS) PURE; STDMETHOD(GetCaps) (THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; STDMETHOD(GetDisplayMode) (THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; STDMETHOD(GetFourCCCodes) (THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; STDMETHOD(GetGDISurface) (THIS_ LPDIRECTDRAWSURFACE4 * lplpGDIDDSurface) PURE; STDMETHOD(GetMonitorFrequency) (THIS_ LPDWORD lpdwFrequency) PURE; STDMETHOD(GetScanLine) (THIS_ LPDWORD lpdwScanLine) PURE; STDMETHOD(GetVerticalBlankStatus) (THIS_ BOOL * lpbIsInVB) PURE; STDMETHOD(Initialize) (THIS_ GUID * lpGUID) PURE; STDMETHOD(RestoreDisplayMode) (THIS) PURE; STDMETHOD(SetCooperativeLevel) (THIS_ HWND hWnd, DWORD dwFlags) PURE; STDMETHOD(SetDisplayMode) (THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; STDMETHOD(WaitForVerticalBlank) (THIS_ DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(GetAvailableVidMem) (THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE; STDMETHOD(RestoreAllSurfaces) (THIS) PURE; STDMETHOD(TestCooperativeLevel) (THIS) PURE; STDMETHOD(GetDeviceIdentifier) (THIS_ LPDDDEVICEIDENTIFIER, DWORD) PURE; }; /*** IUnknown methods ***/ #define IDirectDraw4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDraw4_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDraw4_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDraw methods ***/ #define IDirectDraw4_Compact(p) ICOM_CALL_(Compact,p,(p)) #define IDirectDraw4_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c)) #define IDirectDraw4_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d)) #define IDirectDraw4_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c)) #define IDirectDraw4_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b)) #define IDirectDraw4_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d)) #define IDirectDraw4_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d)) #define IDirectDraw4_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p)) #define IDirectDraw4_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b)) #define IDirectDraw4_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a)) #define IDirectDraw4_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b)) #define IDirectDraw4_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a)) #define IDirectDraw4_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a)) #define IDirectDraw4_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a)) #define IDirectDraw4_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a)) #define IDirectDraw4_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a)) #define IDirectDraw4_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p)) #define IDirectDraw4_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b)) #define IDirectDraw4_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e)) #define IDirectDraw4_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b)) /*** IDirectDraw2 methods ***/ #define IDirectDraw4_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c)) /*** IDirectDraw4 methods ***/ #define IDirectDraw4_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b)) #define IDirectDraw4_RestoreAllSurfaces(p) ICOM_CALL_(RestoreAllSurfaces,p,(p)) #define IDirectDraw4_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p)) #define IDirectDraw4_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b)) /***************************************************************************** * IDirectDraw7 interface */ /* Note: IDirectDraw7 cannot derive from IDirectDraw4; it is even documented * as not interchangeable with earlier DirectDraw interfaces. */ #undef INTERFACE #define INTERFACE IDirectDraw7 DECLARE_INTERFACE_(IDirectDraw7, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(Compact) (THIS) PURE; STDMETHOD(CreateClipper) (THIS_ DWORD dwFlags, LPDIRECTDRAWCLIPPER * lplpDDClipper, IUnknown * pUnkOuter) PURE; STDMETHOD(CreatePalette) (THIS_ DWORD dwFlags, LPPALETTEENTRY lpColorTable, LPDIRECTDRAWPALETTE * lplpDDPalette, IUnknown * pUnkOuter) PURE; STDMETHOD(CreateSurface) (THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc, LPDIRECTDRAWSURFACE7 * lplpDDSurface, IUnknown * pUnkOuter) PURE; STDMETHOD(DuplicateSurface) (THIS_ LPDIRECTDRAWSURFACE7 lpDDSurface, LPDIRECTDRAWSURFACE7 * lplpDupDDSurface) PURE; STDMETHOD(EnumDisplayModes) (THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSurfaceDesc, LPVOID lpContext, LPDDENUMMODESCALLBACK2 lpEnumModesCallback) PURE; STDMETHOD(EnumSurfaces) (THIS_ DWORD dwFlags, LPDDSURFACEDESC2 lpDDSD, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE; STDMETHOD(FlipToGDISurface) (THIS) PURE; STDMETHOD(GetCaps) (THIS_ LPDDCAPS lpDDDriverCaps, LPDDCAPS lpDDHELCaps) PURE; STDMETHOD(GetDisplayMode) (THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; STDMETHOD(GetFourCCCodes) (THIS_ LPDWORD lpNumCodes, LPDWORD lpCodes) PURE; STDMETHOD(GetGDISurface) (THIS_ LPDIRECTDRAWSURFACE7 * lplpGDIDDSurface) PURE; STDMETHOD(GetMonitorFrequency) (THIS_ LPDWORD lpdwFrequency) PURE; STDMETHOD(GetScanLine) (THIS_ LPDWORD lpdwScanLine) PURE; STDMETHOD(GetVerticalBlankStatus) (THIS_ BOOL * lpbIsInVB) PURE; STDMETHOD(Initialize) (THIS_ GUID * lpGUID) PURE; STDMETHOD(RestoreDisplayMode) (THIS) PURE; STDMETHOD(SetCooperativeLevel) (THIS_ HWND hWnd, DWORD dwFlags) PURE; STDMETHOD(SetDisplayMode) (THIS_ DWORD dwWidth, DWORD dwHeight, DWORD dwBPP, DWORD dwRefreshRate, DWORD dwFlags) PURE; STDMETHOD(WaitForVerticalBlank) (THIS_ DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(GetAvailableVidMem) (THIS_ LPDDSCAPS2 lpDDCaps, LPDWORD lpdwTotal, LPDWORD lpdwFree) PURE; STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE; STDMETHOD(RestoreAllSurfaces) (THIS) PURE; STDMETHOD(TestCooperativeLevel) (THIS) PURE; STDMETHOD(GetDeviceIdentifier) (THIS_ LPDDDEVICEIDENTIFIER2, DWORD) PURE; STDMETHOD(StartModeTest) (THIS_ LPSIZE, DWORD, DWORD) PURE; STDMETHOD(EvaluateMode) (THIS_ DWORD, DWORD *) PURE; }; /*** IUnknown methods ***/ #define IDirectDraw7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDraw7_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDraw7_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDraw methods ***/ #define IDirectDraw7_Compact(p) ICOM_CALL_(Compact,p,(p)) #define IDirectDraw7_CreateClipper(p,a,b,c) ICOM_CALL_(CreateClipper,p,(p,a,b,c)) #define IDirectDraw7_CreatePalette(p,a,b,c,d) ICOM_CALL_(CreatePalette,p,(p,a,b,c,d)) #define IDirectDraw7_CreateSurface(p,a,b,c) ICOM_CALL_(CreateSurface,p,(p,a,b,c)) #define IDirectDraw7_DuplicateSurface(p,a,b) ICOM_CALL_(DuplicateSurface,p,(p,a,b)) #define IDirectDraw7_EnumDisplayModes(p,a,b,c,d) ICOM_CALL_(EnumDisplayModes,p,(p,a,b,c,d)) #define IDirectDraw7_EnumSurfaces(p,a,b,c,d) ICOM_CALL_(EnumSurfaces,p,(p,a,b,c,d)) #define IDirectDraw7_FlipToGDISurface(p) ICOM_CALL_(FlipToGDISurface,p,(p)) #define IDirectDraw7_GetCaps(p,a,b) ICOM_CALL_(GetCaps,p,(p,a,b)) #define IDirectDraw7_GetDisplayMode(p,a) ICOM_CALL_(GetDisplayMode,p,(p,a)) #define IDirectDraw7_GetFourCCCodes(p,a,b) ICOM_CALL_(GetFourCCCodes,p,(p,a,b)) #define IDirectDraw7_GetGDISurface(p,a) ICOM_CALL_(GetGDISurface,p,(p,a)) #define IDirectDraw7_GetMonitorFrequency(p,a) ICOM_CALL_(GetMonitorFrequency,p,(p,a)) #define IDirectDraw7_GetScanLine(p,a) ICOM_CALL_(GetScanLine,p,(p,a)) #define IDirectDraw7_GetVerticalBlankStatus(p,a) ICOM_CALL_(GetVerticalBlankStatus,p,(p,a)) #define IDirectDraw7_Initialize(p,a) ICOM_CALL_(Initialize,p,(p,a)) #define IDirectDraw7_RestoreDisplayMode(p) ICOM_CALL_(RestoreDisplayMode,p,(p)) #define IDirectDraw7_SetCooperativeLevel(p,a,b) ICOM_CALL_(SetCooperativeLevel,p,(p,a,b)) #define IDirectDraw7_SetDisplayMode(p,a,b,c,d,e) ICOM_CALL_(SetDisplayMode,p,(p,a,b,c,d,e)) #define IDirectDraw7_WaitForVerticalBlank(p,a,b) ICOM_CALL_(WaitForVerticalBlank,p,(p,a,b)) /*** added in IDirectDraw2 ***/ #define IDirectDraw7_GetAvailableVidMem(p,a,b,c) ICOM_CALL_(GetAvailableVidMem,p,(p,a,b,c)) /*** added in IDirectDraw4 ***/ #define IDirectDraw7_GetSurfaceFromDC(p,a,b) ICOM_CALL_(GetSurfaceFromDC,p,(p,a,b)) #define IDirectDraw7_RestoreAllSurfaces(p) ICOM_CALL_(RestoreAllSurfaces,p,(p)) #define IDirectDraw7_TestCooperativeLevel(p) ICOM_CALL_(TestCooperativeLevel,p,(p)) #define IDirectDraw7_GetDeviceIdentifier(p,a,b) ICOM_CALL_(GetDeviceIdentifier,p,(p,a,b)) /*** added in IDirectDraw 7 ***/ #define IDirectDraw7_StartModeTest(p,a,b,c) ICOM_CALL_(StartModeTest,p,(p,a,b,c)) #define IDirectDraw7_EvaluateMode(p,a,b) ICOM_CALL_(EvaluateMode,p,(p,a,b)) /***************************************************************************** * IDirectDrawSurface interface */ #undef INTERFACE #define INTERFACE IDirectDrawSurface DECLARE_INTERFACE_(IDirectDrawSurface, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(AddAttachedSurface) (THIS_ LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE; STDMETHOD(AddOverlayDirtyRect) (THIS_ LPRECT lpRect) PURE; STDMETHOD(Blt) (THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; STDMETHOD(BltBatch) (THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast) (THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSAttachedSurface) PURE; STDMETHOD(EnumAttachedSurfaces) (THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(EnumOverlayZOrders) (THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; STDMETHOD(Flip) (THIS_ LPDIRECTDRAWSURFACE lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface) (THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE * lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps) (THIS_ LPDDSCAPS lpDDSCaps) PURE; STDMETHOD(GetClipper) (THIS_ LPDIRECTDRAWCLIPPER * lplpDDClipper) PURE; STDMETHOD(GetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(GetDC) (THIS_ HDC * lphDC) PURE; STDMETHOD(GetFlipStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition) (THIS_ LPLONG lplX, LPLONG lplY) PURE; STDMETHOD(GetPalette) (THIS_ LPDIRECTDRAWPALETTE * lplpDDPalette) PURE; STDMETHOD(GetPixelFormat) (THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; STDMETHOD(GetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(IsLost) (THIS) PURE; STDMETHOD(Lock) (THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(ReleaseDC) (THIS_ HDC hDC) PURE; STDMETHOD(Restore) (THIS) PURE; STDMETHOD(SetClipper) (THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; STDMETHOD(SetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(SetOverlayPosition) (THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette) (THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; STDMETHOD(Unlock) (THIS_ LPVOID lpSurfaceData) PURE; STDMETHOD(UpdateOverlay) (THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; STDMETHOD(UpdateOverlayDisplay) (THIS_ DWORD dwFlags) PURE; STDMETHOD(UpdateOverlayZOrder) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE lpDDSReference) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawSurface_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawSurface_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawSurface_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawSurface methods ***/ #define IDirectDrawSurface_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a)) #define IDirectDrawSurface_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a)) #define IDirectDrawSurface_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e)) #define IDirectDrawSurface_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c)) #define IDirectDrawSurface_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e)) #define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b)) #define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c)) #define IDirectDrawSurface_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b)) #define IDirectDrawSurface_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a)) #define IDirectDrawSurface_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawSurface_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a)) #define IDirectDrawSurface_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b)) #define IDirectDrawSurface_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a)) #define IDirectDrawSurface_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a)) #define IDirectDrawSurface_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a)) #define IDirectDrawSurface_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a)) #define IDirectDrawSurface_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a)) #define IDirectDrawSurface_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawSurface_IsLost(p) ICOM_CALL_(IsLost,p,(p)) #define IDirectDrawSurface_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d)) #define IDirectDrawSurface_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a)) #define IDirectDrawSurface_Restore(p) ICOM_CALL_(Restore,p,(p)) #define IDirectDrawSurface_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a)) #define IDirectDrawSurface_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b)) #define IDirectDrawSurface_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a)) #define IDirectDrawSurface_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a)) #define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e)) #define IDirectDrawSurface_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a)) #define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b)) /***************************************************************************** * IDirectDrawSurface2 interface */ /* Cannot inherit from IDirectDrawSurface because the LPDIRECTDRAWSURFACE parameters * have been converted to LPDIRECTDRAWSURFACE2. */ #undef INTERFACE #define INTERFACE IDirectDrawSurface2 DECLARE_INTERFACE_(IDirectDrawSurface2, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(AddAttachedSurface) (THIS_ LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE; STDMETHOD(AddOverlayDirtyRect) (THIS_ LPRECT lpRect) PURE; STDMETHOD(Blt) (THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; STDMETHOD(BltBatch) (THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast) (THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE2 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSAttachedSurface) PURE; STDMETHOD(EnumAttachedSurfaces) (THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(EnumOverlayZOrders) (THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; STDMETHOD(Flip) (THIS_ LPDIRECTDRAWSURFACE2 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface) (THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE2 * lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps) (THIS_ LPDDSCAPS lpDDSCaps) PURE; STDMETHOD(GetClipper) (THIS_ LPDIRECTDRAWCLIPPER * lplpDDClipper) PURE; STDMETHOD(GetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(GetDC) (THIS_ HDC * lphDC) PURE; STDMETHOD(GetFlipStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition) (THIS_ LPLONG lplX, LPLONG lplY) PURE; STDMETHOD(GetPalette) (THIS_ LPDIRECTDRAWPALETTE * lplpDDPalette) PURE; STDMETHOD(GetPixelFormat) (THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; STDMETHOD(GetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(IsLost) (THIS) PURE; STDMETHOD(Lock) (THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(ReleaseDC) (THIS_ HDC hDC) PURE; STDMETHOD(Restore) (THIS) PURE; STDMETHOD(SetClipper) (THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; STDMETHOD(SetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(SetOverlayPosition) (THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette) (THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; STDMETHOD(Unlock) (THIS_ LPVOID lpSurfaceData) PURE; STDMETHOD(UpdateOverlay) (THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE2 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; STDMETHOD(UpdateOverlayDisplay) (THIS_ DWORD dwFlags) PURE; STDMETHOD(UpdateOverlayZOrder) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE2 lpDDSReference) PURE; /* added in v2 */ STDMETHOD(GetDDInterface) (THIS_ LPVOID * lplpDD) PURE; STDMETHOD(PageLock) (THIS_ DWORD dwFlags) PURE; STDMETHOD(PageUnlock) (THIS_ DWORD dwFlags) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawSurface2_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawSurface2_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawSurface2_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawSurface methods (almost) ***/ #define IDirectDrawSurface2_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a)) #define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a)) #define IDirectDrawSurface2_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e)) #define IDirectDrawSurface2_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c)) #define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e)) #define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b)) #define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c)) #define IDirectDrawSurface2_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b)) #define IDirectDrawSurface2_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface2_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a)) #define IDirectDrawSurface2_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawSurface2_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a)) #define IDirectDrawSurface2_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b)) #define IDirectDrawSurface2_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a)) #define IDirectDrawSurface2_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a)) #define IDirectDrawSurface2_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface2_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a)) #define IDirectDrawSurface2_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a)) #define IDirectDrawSurface2_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a)) #define IDirectDrawSurface2_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawSurface2_IsLost(p) ICOM_CALL_(IsLost,p,(p)) #define IDirectDrawSurface2_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d)) #define IDirectDrawSurface2_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a)) #define IDirectDrawSurface2_Restore(p) ICOM_CALL_(Restore,p,(p)) #define IDirectDrawSurface2_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a)) #define IDirectDrawSurface2_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b)) #define IDirectDrawSurface2_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface2_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a)) #define IDirectDrawSurface2_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a)) #define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e)) #define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a)) #define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b)) /*** IDirectDrawSurface2 methods ***/ #define IDirectDrawSurface2_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a)) #define IDirectDrawSurface2_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a)) #define IDirectDrawSurface2_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a)) /***************************************************************************** * IDirectDrawSurface3 interface */ /* Cannot inherit from IDirectDrawSurface2 because the LPDIRECTDRAWSURFACE2 parameters * have been converted to LPDIRECTDRAWSURFACE3. */ #undef INTERFACE #define INTERFACE IDirectDrawSurface3 DECLARE_INTERFACE_(IDirectDrawSurface3, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(AddAttachedSurface) (THIS_ LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE; STDMETHOD(AddOverlayDirtyRect) (THIS_ LPRECT lpRect) PURE; STDMETHOD(Blt) (THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; STDMETHOD(BltBatch) (THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast) (THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE3 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSAttachedSurface) PURE; STDMETHOD(EnumAttachedSurfaces) (THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(EnumOverlayZOrders) (THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; STDMETHOD(Flip) (THIS_ LPDIRECTDRAWSURFACE3 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface) (THIS_ LPDDSCAPS lpDDSCaps, LPDIRECTDRAWSURFACE3 * lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps) (THIS_ LPDDSCAPS lpDDSCaps) PURE; STDMETHOD(GetClipper) (THIS_ LPDIRECTDRAWCLIPPER * lplpDDClipper) PURE; STDMETHOD(GetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(GetDC) (THIS_ HDC * lphDC) PURE; STDMETHOD(GetFlipStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition) (THIS_ LPLONG lplX, LPLONG lplY) PURE; STDMETHOD(GetPalette) (THIS_ LPDIRECTDRAWPALETTE * lplpDDPalette) PURE; STDMETHOD(GetPixelFormat) (THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; STDMETHOD(GetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(IsLost) (THIS) PURE; STDMETHOD(Lock) (THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(ReleaseDC) (THIS_ HDC hDC) PURE; STDMETHOD(Restore) (THIS) PURE; STDMETHOD(SetClipper) (THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; STDMETHOD(SetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(SetOverlayPosition) (THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette) (THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; STDMETHOD(Unlock) (THIS_ LPVOID lpSurfaceData) PURE; STDMETHOD(UpdateOverlay) (THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE3 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; STDMETHOD(UpdateOverlayDisplay) (THIS_ DWORD dwFlags) PURE; STDMETHOD(UpdateOverlayZOrder) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE3 lpDDSReference) PURE; /* added in v2 */ STDMETHOD(GetDDInterface) (THIS_ LPVOID * lplpDD) PURE; STDMETHOD(PageLock) (THIS_ DWORD dwFlags) PURE; STDMETHOD(PageUnlock) (THIS_ DWORD dwFlags) PURE; /* added in v3 */ STDMETHOD(SetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawSurface3_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawSurface3_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawSurface3_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawSurface methods (almost) ***/ #define IDirectDrawSurface3_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a)) #define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a)) #define IDirectDrawSurface3_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e)) #define IDirectDrawSurface3_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c)) #define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e)) #define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b)) #define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c)) #define IDirectDrawSurface3_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b)) #define IDirectDrawSurface3_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface3_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a)) #define IDirectDrawSurface3_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawSurface3_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a)) #define IDirectDrawSurface3_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b)) #define IDirectDrawSurface3_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a)) #define IDirectDrawSurface3_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a)) #define IDirectDrawSurface3_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface3_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a)) #define IDirectDrawSurface3_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a)) #define IDirectDrawSurface3_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a)) #define IDirectDrawSurface3_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawSurface3_IsLost(p) ICOM_CALL_(IsLost,p,(p)) #define IDirectDrawSurface3_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d)) #define IDirectDrawSurface3_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a)) #define IDirectDrawSurface3_Restore(p) ICOM_CALL_(Restore,p,(p)) #define IDirectDrawSurface3_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a)) #define IDirectDrawSurface3_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b)) #define IDirectDrawSurface3_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface3_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a)) #define IDirectDrawSurface3_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a)) #define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e)) #define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a)) #define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b)) /*** IDirectDrawSurface2 methods ***/ #define IDirectDrawSurface3_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a)) #define IDirectDrawSurface3_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a)) #define IDirectDrawSurface3_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a)) /*** IDirectDrawSurface3 methods ***/ #define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b)) /***************************************************************************** * IDirectDrawSurface4 interface */ /* Cannot inherit from IDirectDrawSurface2 because DDSCAPS changed to DDSCAPS2. */ #undef INTERFACE #define INTERFACE IDirectDrawSurface4 DECLARE_INTERFACE_(IDirectDrawSurface4, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(AddAttachedSurface) (THIS_ LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE; STDMETHOD(AddOverlayDirtyRect) (THIS_ LPRECT lpRect) PURE; STDMETHOD(Blt) (THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; STDMETHOD(BltBatch) (THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast) (THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE4 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSAttachedSurface) PURE; STDMETHOD(EnumAttachedSurfaces) (THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpEnumSurfacesCallback) PURE; STDMETHOD(EnumOverlayZOrders) (THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK lpfnCallback) PURE; STDMETHOD(Flip) (THIS_ LPDIRECTDRAWSURFACE4 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface) (THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE4 * lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps) (THIS_ LPDDSCAPS2 lpDDSCaps) PURE; STDMETHOD(GetClipper) (THIS_ LPDIRECTDRAWCLIPPER * lplpDDClipper) PURE; STDMETHOD(GetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(GetDC) (THIS_ HDC * lphDC) PURE; STDMETHOD(GetFlipStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition) (THIS_ LPLONG lplX, LPLONG lplY) PURE; STDMETHOD(GetPalette) (THIS_ LPDIRECTDRAWPALETTE * lplpDDPalette) PURE; STDMETHOD(GetPixelFormat) (THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; STDMETHOD(GetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC lpDDSurfaceDesc) PURE; STDMETHOD(IsLost) (THIS) PURE; STDMETHOD(Lock) (THIS_ LPRECT lpDestRect, LPDDSURFACEDESC lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(ReleaseDC) (THIS_ HDC hDC) PURE; STDMETHOD(Restore) (THIS) PURE; STDMETHOD(SetClipper) (THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; STDMETHOD(SetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(SetOverlayPosition) (THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette) (THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; STDMETHOD(Unlock) (THIS_ LPRECT lpSurfaceData) PURE; STDMETHOD(UpdateOverlay) (THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE4 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; STDMETHOD(UpdateOverlayDisplay) (THIS_ DWORD dwFlags) PURE; STDMETHOD(UpdateOverlayZOrder) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE4 lpDDSReference) PURE; /* added in v2 */ STDMETHOD(GetDDInterface) (THIS_ LPVOID * lplpDD) PURE; STDMETHOD(PageLock) (THIS_ DWORD dwFlags) PURE; STDMETHOD(PageUnlock) (THIS_ DWORD dwFlags) PURE; /* added in v3 */ STDMETHOD(SetSurfaceDesc) (THIS_ LPDDSURFACEDESC lpDDSD, DWORD dwFlags) PURE; /* added in v4 */ STDMETHOD(SetPrivateData) (THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; STDMETHOD(GetPrivateData) (THIS_ REFGUID, LPVOID, LPDWORD) PURE; STDMETHOD(FreePrivateData) (THIS_ REFGUID) PURE; STDMETHOD(GetUniquenessValue) (THIS_ LPDWORD) PURE; STDMETHOD(ChangeUniquenessValue) (THIS) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawSurface4_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawSurface4_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawSurface4_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawSurface (almost) methods ***/ #define IDirectDrawSurface4_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a)) #define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a)) #define IDirectDrawSurface4_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e)) #define IDirectDrawSurface4_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c)) #define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e)) #define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b)) #define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c)) #define IDirectDrawSurface4_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b)) #define IDirectDrawSurface4_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface4_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a)) #define IDirectDrawSurface4_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawSurface4_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a)) #define IDirectDrawSurface4_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b)) #define IDirectDrawSurface4_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a)) #define IDirectDrawSurface4_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a)) #define IDirectDrawSurface4_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface4_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a)) #define IDirectDrawSurface4_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a)) #define IDirectDrawSurface4_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a)) #define IDirectDrawSurface4_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawSurface4_IsLost(p) ICOM_CALL_(IsLost,p,(p)) #define IDirectDrawSurface4_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d)) #define IDirectDrawSurface4_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a)) #define IDirectDrawSurface4_Restore(p) ICOM_CALL_(Restore,p,(p)) #define IDirectDrawSurface4_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a)) #define IDirectDrawSurface4_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b)) #define IDirectDrawSurface4_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface4_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a)) #define IDirectDrawSurface4_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a)) #define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e)) #define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a)) #define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b)) /*** IDirectDrawSurface2 methods ***/ #define IDirectDrawSurface4_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a)) #define IDirectDrawSurface4_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a)) #define IDirectDrawSurface4_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a)) /*** IDirectDrawSurface3 methods ***/ #define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b)) /*** IDirectDrawSurface4 methods ***/ #define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d)) #define IDirectDrawSurface4_GetPrivateData(p,a,b,c) ICOM_CALL_(GetPrivateData,p,(p,a,b,c)) #define IDirectDrawSurface4_FreePrivateData(p,a) ICOM_CALL_(FreePrivateData,p,(p,a)) #define IDirectDrawSurface4_GetUniquenessValue(p,a) ICOM_CALL_(GetUniquenessValue,p,(p,a)) #define IDirectDrawSurface4_ChangeUniquenessValue(p) ICOM_CALL_(ChangeUniquenessValue,p,(p)) /***************************************************************************** * IDirectDrawSurface7 interface */ #undef INTERFACE #define INTERFACE IDirectDrawSurface7 DECLARE_INTERFACE_(IDirectDrawSurface7, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(AddAttachedSurface) (THIS_ LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE; STDMETHOD(AddOverlayDirtyRect) (THIS_ LPRECT lpRect) PURE; STDMETHOD(Blt) (THIS_ LPRECT lpDestRect, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwFlags, LPDDBLTFX lpDDBltFx) PURE; STDMETHOD(BltBatch) (THIS_ LPDDBLTBATCH lpDDBltBatch, DWORD dwCount, DWORD dwFlags) PURE; STDMETHOD(BltFast) (THIS_ DWORD dwX, DWORD dwY, LPDIRECTDRAWSURFACE7 lpDDSrcSurface, LPRECT lpSrcRect, DWORD dwTrans) PURE; STDMETHOD(DeleteAttachedSurface) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSAttachedSurface) PURE; STDMETHOD(EnumAttachedSurfaces) (THIS_ LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpEnumSurfacesCallback) PURE; STDMETHOD(EnumOverlayZOrders) (THIS_ DWORD dwFlags, LPVOID lpContext, LPDDENUMSURFACESCALLBACK7 lpfnCallback) PURE; STDMETHOD(Flip) (THIS_ LPDIRECTDRAWSURFACE7 lpDDSurfaceTargetOverride, DWORD dwFlags) PURE; STDMETHOD(GetAttachedSurface) (THIS_ LPDDSCAPS2 lpDDSCaps, LPDIRECTDRAWSURFACE7 * lplpDDAttachedSurface) PURE; STDMETHOD(GetBltStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetCaps) (THIS_ LPDDSCAPS2 lpDDSCaps) PURE; STDMETHOD(GetClipper) (THIS_ LPDIRECTDRAWCLIPPER * lplpDDClipper) PURE; STDMETHOD(GetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(GetDC) (THIS_ HDC * lphDC) PURE; STDMETHOD(GetFlipStatus) (THIS_ DWORD dwFlags) PURE; STDMETHOD(GetOverlayPosition) (THIS_ LPLONG lplX, LPLONG lplY) PURE; STDMETHOD(GetPalette) (THIS_ LPDIRECTDRAWPALETTE * lplpDDPalette) PURE; STDMETHOD(GetPixelFormat) (THIS_ LPDDPIXELFORMAT lpDDPixelFormat) PURE; STDMETHOD(GetSurfaceDesc) (THIS_ LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; STDMETHOD(Initialize) (THIS_ LPDIRECTDRAW lpDD, LPDDSURFACEDESC2 lpDDSurfaceDesc) PURE; STDMETHOD(IsLost) (THIS) PURE; STDMETHOD(Lock) (THIS_ LPRECT lpDestRect, LPDDSURFACEDESC2 lpDDSurfaceDesc, DWORD dwFlags, HANDLE hEvent) PURE; STDMETHOD(ReleaseDC) (THIS_ HDC hDC) PURE; STDMETHOD(Restore) (THIS) PURE; STDMETHOD(SetClipper) (THIS_ LPDIRECTDRAWCLIPPER lpDDClipper) PURE; STDMETHOD(SetColorKey) (THIS_ DWORD dwFlags, LPDDCOLORKEY lpDDColorKey) PURE; STDMETHOD(SetOverlayPosition) (THIS_ LONG lX, LONG lY) PURE; STDMETHOD(SetPalette) (THIS_ LPDIRECTDRAWPALETTE lpDDPalette) PURE; STDMETHOD(Unlock) (THIS_ LPRECT lpSurfaceData) PURE; STDMETHOD(UpdateOverlay) (THIS_ LPRECT lpSrcRect, LPDIRECTDRAWSURFACE7 lpDDDestSurface, LPRECT lpDestRect, DWORD dwFlags, LPDDOVERLAYFX lpDDOverlayFx) PURE; STDMETHOD(UpdateOverlayDisplay) (THIS_ DWORD dwFlags) PURE; STDMETHOD(UpdateOverlayZOrder) (THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE7 lpDDSReference) PURE; /* added in v2 */ STDMETHOD(GetDDInterface) (THIS_ LPVOID * lplpDD) PURE; STDMETHOD(PageLock) (THIS_ DWORD dwFlags) PURE; STDMETHOD(PageUnlock) (THIS_ DWORD dwFlags) PURE; /* added in v3 */ STDMETHOD(SetSurfaceDesc) (THIS_ LPDDSURFACEDESC2 lpDDSD, DWORD dwFlags) PURE; /* added in v4 */ STDMETHOD(SetPrivateData) (THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; STDMETHOD(GetPrivateData) (THIS_ REFGUID, LPVOID, LPDWORD) PURE; STDMETHOD(FreePrivateData) (THIS_ REFGUID) PURE; STDMETHOD(GetUniquenessValue) (THIS_ LPDWORD) PURE; STDMETHOD(ChangeUniquenessValue) (THIS) PURE; /* added in v7 */ STDMETHOD(SetPriority) (THIS_ DWORD prio) PURE; STDMETHOD(GetPriority) (THIS_ LPDWORD prio) PURE; STDMETHOD(SetLOD) (THIS_ DWORD lod) PURE; STDMETHOD(GetLOD) (THIS_ LPDWORD lod) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawSurface7_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawSurface7_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawSurface7_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawSurface (almost) methods ***/ #define IDirectDrawSurface7_AddAttachedSurface(p,a) ICOM_CALL_(AddAttachedSurface,p,(p,a)) #define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) ICOM_CALL_(AddOverlayDirtyRect,p,(p,a)) #define IDirectDrawSurface7_Blt(p,a,b,c,d,e) ICOM_CALL_(Blt,p,(p,a,b,c,d,e)) #define IDirectDrawSurface7_BltBatch(p,a,b,c) ICOM_CALL_(BltBatch,p,(p,a,b,c)) #define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) ICOM_CALL_(BltFast,p,(p,a,b,c,d,e)) #define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) ICOM_CALL_(DeleteAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) ICOM_CALL_(EnumAttachedSurfaces,p,(p,a,b)) #define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) ICOM_CALL_(EnumOverlayZOrders,p,(p,a,b,c)) #define IDirectDrawSurface7_Flip(p,a,b) ICOM_CALL_(Flip,p,(p,a,b)) #define IDirectDrawSurface7_GetAttachedSurface(p,a,b) ICOM_CALL_(GetAttachedSurface,p,(p,a,b)) #define IDirectDrawSurface7_GetBltStatus(p,a) ICOM_CALL_(GetBltStatus,p,(p,a)) #define IDirectDrawSurface7_GetCaps(p,a) ICOM_CALL_(GetCaps,p,(p,a)) #define IDirectDrawSurface7_GetClipper(p,a) ICOM_CALL_(GetClipper,p,(p,a)) #define IDirectDrawSurface7_GetColorKey(p,a,b) ICOM_CALL_(GetColorKey,p,(p,a,b)) #define IDirectDrawSurface7_GetDC(p,a) ICOM_CALL_(GetDC,p,(p,a)) #define IDirectDrawSurface7_GetFlipStatus(p,a) ICOM_CALL_(GetFlipStatus,p,(p,a)) #define IDirectDrawSurface7_GetOverlayPosition(p,a,b) ICOM_CALL_(GetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface7_GetPalette(p,a) ICOM_CALL_(GetPalette,p,(p,a)) #define IDirectDrawSurface7_GetPixelFormat(p,a) ICOM_CALL_(GetPixelFormat,p,(p,a)) #define IDirectDrawSurface7_GetSurfaceDesc(p,a) ICOM_CALL_(GetSurfaceDesc,p,(p,a)) #define IDirectDrawSurface7_Initialize(p,a,b) ICOM_CALL_(Initialize,p,(p,a,b)) #define IDirectDrawSurface7_IsLost(p) ICOM_CALL_(IsLost,p,(p)) #define IDirectDrawSurface7_Lock(p,a,b,c,d) ICOM_CALL_(Lock,p,(p,a,b,c,d)) #define IDirectDrawSurface7_ReleaseDC(p,a) ICOM_CALL_(ReleaseDC,p,(p,a)) #define IDirectDrawSurface7_Restore(p) ICOM_CALL_(Restore,p,(p)) #define IDirectDrawSurface7_SetClipper(p,a) ICOM_CALL_(SetClipper,p,(p,a)) #define IDirectDrawSurface7_SetColorKey(p,a,b) ICOM_CALL_(SetColorKey,p,(p,a,b)) #define IDirectDrawSurface7_SetOverlayPosition(p,a,b) ICOM_CALL_(SetOverlayPosition,p,(p,a,b)) #define IDirectDrawSurface7_SetPalette(p,a) ICOM_CALL_(SetPalette,p,(p,a)) #define IDirectDrawSurface7_Unlock(p,a) ICOM_CALL_(Unlock,p,(p,a)) #define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) ICOM_CALL_(UpdateOverlay,p,(p,a,b,c,d,e)) #define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) ICOM_CALL_(UpdateOverlayDisplay,p,(p,a)) #define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) ICOM_CALL_(UpdateOverlayZOrder,p,(p,a,b)) /*** IDirectDrawSurface2 methods ***/ #define IDirectDrawSurface7_GetDDInterface(p,a) ICOM_CALL_(GetDDInterface,p,(p,a)) #define IDirectDrawSurface7_PageLock(p,a) ICOM_CALL_(PageLock,p,(p,a)) #define IDirectDrawSurface7_PageUnlock(p,a) ICOM_CALL_(PageUnlock,p,(p,a)) /*** IDirectDrawSurface3 methods ***/ #define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) ICOM_CALL_(SetSurfaceDesc,p,(p,a,b)) /*** IDirectDrawSurface4 methods ***/ #define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) ICOM_CALL_(SetPrivateData,p,(p,a,b,c,d)) #define IDirectDrawSurface7_GetPrivateData(p,a,b,c) ICOM_CALL_(GetPrivateData,p,(p,a,b,c)) #define IDirectDrawSurface7_FreePrivateData(p,a) ICOM_CALL_(FreePrivateData,p,(p,a)) #define IDirectDrawSurface7_GetUniquenessValue(p,a) ICOM_CALL_(GetUniquenessValue,p,(p,a)) #define IDirectDrawSurface7_ChangeUniquenessValue(p) ICOM_CALL_(ChangeUniquenessValue,p,(p)) /*** IDirectDrawSurface7 methods ***/ #define IDirectDrawSurface7_SetPriority(p,a) ICOM_CALL_(SetPriority,p,(p,a)) #define IDirectDrawSurface7_GetPriority(p,a) ICOM_CALL_(GetPriority,p,(p,a)) #define IDirectDrawSurface7_SetLOD(p,a) ICOM_CALL_(SetLOD,p,(p,a)) #define IDirectDrawSurface7_GetLOD(p,a) ICOM_CALL_(GetLOD,p,(p,a)) /***************************************************************************** * IDirectDrawColorControl interface */ #undef INTERFACE #define INTERFACE IDirectDrawColorControl DECLARE_INTERFACE_(IDirectDrawColorControl, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(GetColorControls) (THIS_ LPDDCOLORCONTROL lpColorControl) PURE; STDMETHOD(SetColorControls) (THIS_ LPDDCOLORCONTROL lpColorControl) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawColorControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawColorControl_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawColorControl_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawColorControl methods ***/ #define IDirectDrawColorControl_GetColorControls(p,a) ICOM_CALL_(GetColorControls,p,(p,a)) #define IDirectDrawColorControl_SetColorControls(p,a) ICOM_CALL_(SetColorControls,p,(p,a)) /***************************************************************************** * IDirectDrawGammaControl interface */ #undef INTERFACE #define INTERFACE IDirectDrawGammaControl DECLARE_INTERFACE_(IDirectDrawGammaControl, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(GetGammaRamp) (THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE; STDMETHOD(SetGammaRamp) (THIS_ DWORD dwFlags, LPDDGAMMARAMP lpGammaRamp) PURE; }; /*** IUnknown methods ***/ #define IDirectDrawGammaControl_QueryInterface(p,a,b) ICOM_CALL_(QueryInterface,p,(p,a,b)) #define IDirectDrawGammaControl_AddRef(p) ICOM_CALL_(AddRef,p,(p)) #define IDirectDrawGammaControl_Release(p) ICOM_CALL_(Release,p,(p)) /*** IDirectDrawGammaControl methods ***/ #define IDirectDrawGammaControl_GetGammaRamp(p,a,b) ICOM_CALL_(GetGammaRamp,p,(p,a,b)) #define IDirectDrawGammaControl_SetGammaRamp(p,a,b) ICOM_CALL_(SetGammaRamp,p,(p,a,b)) HRESULT WINAPI DirectDrawCreate(LPGUID, LPDIRECTDRAW *, LPUNKNOWN); HRESULT WINAPI DirectDrawCreateEx(LPGUID, LPVOID *, REFIID, LPUNKNOWN); HRESULT WINAPI DirectDrawEnumerateA(LPDDENUMCALLBACKA, LPVOID); HRESULT WINAPI DirectDrawEnumerateW(LPDDENUMCALLBACKW, LPVOID); #define DirectDrawEnumerate WINELIB_NAME_AW(DirectDrawEnumerate) HRESULT WINAPI DirectDrawCreateClipper(DWORD, LPDIRECTDRAWCLIPPER *, LPUNKNOWN); #ifdef __cplusplus } /* extern "C" */ #endif /* defined(__cplusplus) */ #endif /* __XWIN_DDRAW_H */ xorg-server-21.1.16/hw/xwin/winconfig.h0000644000175000017500000001410014757411105013366 #ifndef __WIN_CONFIG_H__ #define __WIN_CONFIG_H__ /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Alexander Gottwald */ #include "win.h" #ifdef XWIN_XF86CONFIG #include "../xfree86/parser/xf86Parser.h" #endif /* These are taken from hw/xfree86/common/xf86str.h */ typedef struct { CARD32 red, green, blue; } rgb; typedef struct { float red, green, blue; } Gamma; typedef struct { char *identifier; char *vendor; char *board; char *chipset; char *ramdac; char *driver; struct _confscreenrec *myScreenSection; Bool claimed; Bool active; Bool inUse; int videoRam; void *options; int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; typedef struct { char *identifier; char *driver; void *commonOptions; void *extraOptions; } IDevRec, *IDevPtr; typedef struct { int frameX0; int frameY0; int virtualX; int virtualY; int depth; int fbbpp; rgb weight; rgb blackColour; rgb whiteColour; int defaultVisual; char **modes; void *options; } DispRec, *DispPtr; typedef struct _confxvportrec { char *identifier; void *options; } confXvPortRec, *confXvPortPtr; typedef struct _confxvadaptrec { char *identifier; int numports; confXvPortPtr ports; void *options; } confXvAdaptorRec, *confXvAdaptorPtr; typedef struct _confscreenrec { char *id; int screennum; int defaultdepth; int defaultbpp; int defaultfbbpp; GDevPtr device; int numdisplays; DispPtr displays; int numxvadaptors; confXvAdaptorPtr xvadaptors; void *options; } confScreenRec, *confScreenPtr; typedef enum { PosObsolete = -1, PosAbsolute = 0, PosRightOf, PosLeftOf, PosAbove, PosBelow, PosRelative } PositionType; typedef struct _screenlayoutrec { confScreenPtr screen; char *topname; confScreenPtr top; char *bottomname; confScreenPtr bottom; char *leftname; confScreenPtr left; char *rightname; confScreenPtr right; PositionType where; int x; int y; char *refname; confScreenPtr refscreen; } screenLayoutRec, *screenLayoutPtr; typedef struct _serverlayoutrec { char *id; screenLayoutPtr screens; GDevPtr inactives; IDevPtr inputs; void *options; } serverLayoutRec, *serverLayoutPtr; /* * winconfig.c */ typedef struct { /* Files */ #ifdef XWIN_XF86CONFIG char *configFile; char *configDir; #endif char *fontPath; /* input devices - keyboard */ #ifdef XWIN_XF86CONFIG char *keyboard; #endif char *xkbRules; char *xkbModel; char *xkbLayout; char *xkbVariant; char *xkbOptions; /* layout */ char *screenname; /* mouse settings */ char *mouse; Bool emulate3buttons; long emulate3timeout; } WinCmdlineRec, *WinCmdlinePtr; extern WinCmdlineRec g_cmdline; #ifdef XWIN_XF86CONFIG extern XF86ConfigPtr g_xf86configptr; #endif extern serverLayoutRec g_winConfigLayout; /* * Function prototypes */ Bool winReadConfigfile(void); Bool winConfigFiles(void); Bool winConfigOptions(void); Bool winConfigScreens(void); Bool winConfigKeyboard(DeviceIntPtr pDevice); Bool winConfigMouse(DeviceIntPtr pDevice); typedef struct { double freq; int units; } OptFrequency; typedef union { unsigned long num; char *str; double realnum; Bool boolean; OptFrequency freq; } ValueUnion; typedef enum { OPTV_NONE = 0, OPTV_INTEGER, OPTV_STRING, /* a non-empty string */ OPTV_ANYSTR, /* Any string, including an empty one */ OPTV_REAL, OPTV_BOOLEAN, OPTV_PERCENT, OPTV_FREQ } OptionValueType; typedef enum { OPTUNITS_HZ = 1, OPTUNITS_KHZ, OPTUNITS_MHZ } OptFreqUnits; typedef struct { int token; const char *name; OptionValueType type; ValueUnion value; Bool found; } OptionInfoRec, *OptionInfoPtr; /* * Function prototypes */ char *winSetStrOption(void *optlist, const char *name, char *deflt); int winSetBoolOption(void *optlist, const char *name, int deflt); int winSetIntOption(void *optlist, const char *name, int deflt); double winSetRealOption(void *optlist, const char *name, double deflt); double winSetPercentOption(void *optlist, const char *name, double deflt); #ifdef XWIN_XF86CONFIG XF86OptionPtr winFindOption(XF86OptionPtr list, const char *name); char *winFindOptionValue(XF86OptionPtr list, const char *name); #endif int winNameCompare(const char *s1, const char *s2); char *winNormalizeName(const char *s); typedef struct { struct { long leds; long delay; long rate; } keyboard; XkbRMLVOSet xkb; struct { Bool emulate3Buttons; long emulate3Timeout; } pointer; } winInfoRec, *winInfoPtr; extern winInfoRec g_winInfo; #endif xorg-server-21.1.16/hw/xwin/win.h0000644000175000017500000005433214757411105012213 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Dakshinamurthy Karra * Suhaib M Siddiqi * Peter Busch * Harold L Hunt II * Kensuke Matsuzaki */ #ifndef _WIN_H_ #define _WIN_H_ #ifndef NO #define NO 0 #endif #ifndef YES #define YES 1 #endif /* We can handle WM_MOUSEHWHEEL even though _WIN32_WINNT < 0x0600 */ #ifndef WM_MOUSEHWHEEL #define WM_MOUSEHWHEEL 0x020E #endif /* Turn debug messages on or off */ #ifndef CYGDEBUG #define CYGDEBUG NO #endif #define WIN_DEFAULT_BPP 0 #define WIN_DEFAULT_WHITEPIXEL 255 #define WIN_DEFAULT_BLACKPIXEL 0 #define WIN_DEFAULT_LINEBIAS 0 #define WIN_DEFAULT_E3B_TIME 50 /* milliseconds */ #define WIN_DEFAULT_DPI 96 #define WIN_DEFAULT_REFRESH 0 #define WIN_DEFAULT_WIN_KILL TRUE #define WIN_DEFAULT_UNIX_KILL FALSE #define WIN_DEFAULT_CLIP_UPDATES_NBOXES 0 #ifdef XWIN_EMULATEPSEUDO #define WIN_DEFAULT_EMULATE_PSEUDO FALSE #endif #define WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH FALSE /* * Windows only supports 256 color palettes */ #define WIN_NUM_PALETTE_ENTRIES 256 /* * Number of times to call Restore in an attempt to restore the primary surface */ #define WIN_REGAIN_SURFACE_RETRIES 1 /* * Build a supported display depths mask by shifting one to the left * by the number of bits in the supported depth. */ #define WIN_SUPPORTED_BPPS ( (1 << (32 - 1)) | (1 << (24 - 1)) \ | (1 << (16 - 1)) | (1 << (15 - 1)) \ | (1 << ( 8 - 1))) #define WIN_CHECK_DEPTH YES /* * Timer IDs for WM_TIMER */ #define WIN_E3B_TIMER_ID 1 #define WIN_POLLING_MOUSE_TIMER_ID 2 #define MOUSE_POLLING_INTERVAL 50 #define WIN_E3B_OFF -1 #define WIN_E3B_DEFAULT 0 #define WIN_FD_INVALID -1 #define WIN_SERVER_NONE 0x0L /* 0 */ #define WIN_SERVER_SHADOW_GDI 0x1L /* 1 */ #define WIN_SERVER_SHADOW_DDNL 0x4L /* 4 */ #define AltMapIndex Mod1MapIndex #define NumLockMapIndex Mod2MapIndex #define AltLangMapIndex Mod3MapIndex #define KanaMapIndex Mod4MapIndex #define ScrollLockMapIndex Mod5MapIndex #define WIN_MOD_LALT 0x00000001 #define WIN_MOD_RALT 0x00000002 #define WIN_MOD_LCONTROL 0x00000004 #define WIN_MOD_RCONTROL 0x00000008 #define WIN_24BPP_MASK_RED 0x00FF0000 #define WIN_24BPP_MASK_GREEN 0x0000FF00 #define WIN_24BPP_MASK_BLUE 0x000000FF #define WIN_MAX_KEYS_PER_KEY 4 #define NONAMELESSUNION #include #include #include #include #define HANDLE void * #include #undef HANDLE #ifdef HAVE_MMAP #include #ifndef MAP_FILE #define MAP_FILE 0 #endif /* MAP_FILE */ #endif /* HAVE_MMAP */ #include #include #include #include #include "scrnintstr.h" #include "pixmapstr.h" #include "pixmap.h" #include "region.h" #include "gcstruct.h" #include "colormap.h" #include "colormapst.h" #include "miscstruct.h" #include "servermd.h" #include "windowstr.h" #include "mi.h" #include "micmap.h" #include "mifillarc.h" #include "mifpoly.h" #include "input.h" #include "mipointer.h" #include "X11/keysym.h" #include "micoord.h" #include "miline.h" #include "shadow.h" #include "fb.h" #include "mipict.h" #include "picturestr.h" #ifdef RANDR #include "randrstr.h" #endif /* * Windows headers */ #include "winms.h" #include "winresource.h" /* * Define Windows constants */ #define WM_TRAYICON (WM_USER + 1000) #define WM_INIT_SYS_MENU (WM_USER + 1001) #define WM_GIVEUP (WM_USER + 1002) /* Local includes */ #include "winwindow.h" #include "winmsg.h" /* * Debugging macros */ #if CYGDEBUG #define DEBUG_MSG(str,...) \ if (fDebugProcMsg) \ { \ char *pszTemp; \ int iLength; \ if (asprintf (&pszTemp, str, ##__VA_ARGS__) != -1) { \ MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \ free (pszTemp); \ } \ } #else #define DEBUG_MSG(str,...) #endif #if CYGDEBUG #define DEBUG_FN_NAME(str) PTSTR szFunctionName = str #else #define DEBUG_FN_NAME(str) #endif #if CYGDEBUG || YES #define DEBUGVARS BOOL fDebugProcMsg = FALSE #else #define DEBUGVARS #endif #if CYGDEBUG || YES #define DEBUGPROC_MSG fDebugProcMsg = TRUE #else #define DEBUGPROC_MSG #endif #define PROFILEPOINT(point,thresh)\ {\ static unsigned int PROFPT##point = 0;\ if (++PROFPT##point % thresh == 0)\ ErrorF (#point ": PROFILEPOINT hit %u times\n", PROFPT##point);\ } #define DEFINE_ATOM_HELPER(func,atom_name) \ static Atom func (void) { \ static int generation; \ static Atom atom; \ if (generation != serverGeneration) { \ generation = serverGeneration; \ atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ } \ return atom; \ } /* * Typedefs for engine dependent function pointers */ typedef Bool (*winAllocateFBProcPtr) (ScreenPtr); typedef void (*winFreeFBProcPtr) (ScreenPtr); typedef void (*winShadowUpdateProcPtr) (ScreenPtr, shadowBufPtr); typedef Bool (*winInitScreenProcPtr) (ScreenPtr); typedef Bool (*winCloseScreenProcPtr) (ScreenPtr); typedef Bool (*winInitVisualsProcPtr) (ScreenPtr); typedef Bool (*winAdjustVideoModeProcPtr) (ScreenPtr); typedef Bool (*winCreateBoundingWindowProcPtr) (ScreenPtr); typedef Bool (*winFinishScreenInitProcPtr) (int, ScreenPtr, int, char **); typedef Bool (*winBltExposedRegionsProcPtr) (ScreenPtr); typedef Bool (*winBltExposedWindowRegionProcPtr) (ScreenPtr, WindowPtr); typedef Bool (*winActivateAppProcPtr) (ScreenPtr); typedef Bool (*winRedrawScreenProcPtr) (ScreenPtr pScreen); typedef Bool (*winRealizeInstalledPaletteProcPtr) (ScreenPtr pScreen); typedef Bool (*winInstallColormapProcPtr) (ColormapPtr pColormap); typedef Bool (*winStoreColorsProcPtr) (ColormapPtr pmap, int ndef, xColorItem * pdefs); typedef Bool (*winCreateColormapProcPtr) (ColormapPtr pColormap); typedef Bool (*winDestroyColormapProcPtr) (ColormapPtr pColormap); typedef Bool (*winCreatePrimarySurfaceProcPtr) (ScreenPtr); typedef Bool (*winReleasePrimarySurfaceProcPtr) (ScreenPtr); typedef Bool (*winCreateScreenResourcesProc) (ScreenPtr); /* * Pixmap privates */ typedef struct { HBITMAP hBitmap; void *pbBits; BITMAPINFOHEADER *pbmih; BOOL owned; } winPrivPixmapRec, *winPrivPixmapPtr; /* * Colormap privates */ typedef struct { HPALETTE hPalette; LPDIRECTDRAWPALETTE lpDDPalette; RGBQUAD rgbColors[WIN_NUM_PALETTE_ENTRIES]; PALETTEENTRY peColors[WIN_NUM_PALETTE_ENTRIES]; } winPrivCmapRec, *winPrivCmapPtr; /* * Windows Cursor handling. */ typedef struct { /* from GetSystemMetrics */ int sm_cx; int sm_cy; BOOL visible; HCURSOR handle; QueryBestSizeProcPtr QueryBestSize; miPointerSpriteFuncPtr spriteFuncs; } winCursorRec; /* * Resize modes */ typedef enum { resizeDefault = -1, resizeNotAllowed, resizeWithScrollbars, resizeWithRandr } winResizeMode; /* * Screen information structure that we need before privates are available * in the server startup sequence. */ typedef struct { ScreenPtr pScreen; /* Did the user specify a height and width? */ Bool fUserGaveHeightAndWidth; DWORD dwScreen; int iMonitor; HMONITOR hMonitor; DWORD dwUserWidth; DWORD dwUserHeight; DWORD dwWidth; DWORD dwHeight; DWORD dwPaddedWidth; /* Did the user specify a screen position? */ Bool fUserGavePosition; DWORD dwInitialX; DWORD dwInitialY; /* * dwStride is the number of whole pixels that occupy a scanline, * including those pixels that are not displayed. This is basically * a rounding up of the width. */ DWORD dwStride; /* Offset of the screen in the window when using scrollbars */ DWORD dwXOffset; DWORD dwYOffset; DWORD dwBPP; DWORD dwDepth; DWORD dwRefreshRate; char *pfb; DWORD dwEngine; DWORD dwEnginePreferred; DWORD dwClipUpdatesNBoxes; #ifdef XWIN_EMULATEPSEUDO Bool fEmulatePseudo; #endif Bool fFullScreen; Bool fDecoration; Bool fRootless; Bool fMultiWindow; Bool fCompositeWM; Bool fMultiMonitorOverride; Bool fMultipleMonitors; Bool fLessPointer; winResizeMode iResizeMode; Bool fNoTrayIcon; int iE3BTimeout; /* Windows (Alt+F4) and Unix (Ctrl+Alt+Backspace) Killkey */ Bool fUseWinKillKey; Bool fUseUnixKillKey; Bool fIgnoreInput; /* Did the user explicitly set this screen? */ Bool fExplicitScreen; /* Icons for screen window */ HICON hIcon; HICON hIconSm; } winScreenInfo, *winScreenInfoPtr; /* * Screen privates */ typedef struct _winPrivScreenRec { winScreenInfoPtr pScreenInfo; Bool fEnabled; Bool fClosed; Bool fActive; Bool fBadDepth; int iDeltaZ; int iDeltaV; int iConnectedClients; CloseScreenProcPtr CloseScreen; DWORD dwRedMask; DWORD dwGreenMask; DWORD dwBlueMask; DWORD dwBitsPerRGB; DWORD dwModeKeyStates; /* Handle to icons that must be freed */ HICON hiconNotifyIcon; /* Palette management */ ColormapPtr pcmapInstalled; /* Pointer to the root visual so we only have to look it up once */ VisualPtr pRootVisual; /* 3 button emulation variables */ int iE3BCachedPress; Bool fE3BFakeButton2Sent; /* Privates used by shadow fb GDI engine */ HBITMAP hbmpShadow; HDC hdcScreen; HDC hdcShadow; HWND hwndScreen; BITMAPINFOHEADER *pbmih; /* Privates used by shadow fb DirectDraw Nonlocking engine */ LPDIRECTDRAW pdd; LPDIRECTDRAW4 pdd4; LPDIRECTDRAWSURFACE4 pddsShadow4; LPDIRECTDRAWSURFACE4 pddsPrimary4; LPDIRECTDRAWCLIPPER pddcPrimary; BOOL fRetryCreateSurface; /* Privates used by multi-window */ pthread_t ptWMProc; pthread_t ptXMsgProc; void *pWMInfo; Bool fRootWindowShown; /* Privates used for any module running in a separate thread */ pthread_mutex_t pmServerStarted; Bool fServerStarted; /* Engine specific functions */ winAllocateFBProcPtr pwinAllocateFB; winFreeFBProcPtr pwinFreeFB; winShadowUpdateProcPtr pwinShadowUpdate; winInitScreenProcPtr pwinInitScreen; winCloseScreenProcPtr pwinCloseScreen; winInitVisualsProcPtr pwinInitVisuals; winAdjustVideoModeProcPtr pwinAdjustVideoMode; winCreateBoundingWindowProcPtr pwinCreateBoundingWindow; winFinishScreenInitProcPtr pwinFinishScreenInit; winBltExposedRegionsProcPtr pwinBltExposedRegions; winBltExposedWindowRegionProcPtr pwinBltExposedWindowRegion; winActivateAppProcPtr pwinActivateApp; winRedrawScreenProcPtr pwinRedrawScreen; winRealizeInstalledPaletteProcPtr pwinRealizeInstalledPalette; winInstallColormapProcPtr pwinInstallColormap; winStoreColorsProcPtr pwinStoreColors; winCreateColormapProcPtr pwinCreateColormap; winDestroyColormapProcPtr pwinDestroyColormap; winCreatePrimarySurfaceProcPtr pwinCreatePrimarySurface; winReleasePrimarySurfaceProcPtr pwinReleasePrimarySurface; winCreateScreenResourcesProc pwinCreateScreenResources; /* Window Procedures for Rootless mode */ CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; PositionWindowProcPtr PositionWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; ValidateTreeProcPtr ValidateTree; PostValidateTreeProcPtr PostValidateTree; CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; RestackWindowProcPtr RestackWindow; ReparentWindowProcPtr ReparentWindow; ResizeWindowProcPtr ResizeWindow; MoveWindowProcPtr MoveWindow; SetShapeProcPtr SetShape; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; winCursorRec cursor; Bool fNativeGlActive; } winPrivScreenRec; typedef struct { void *value; XID id; } WindowIDPairRec, *WindowIDPairPtr; /* * Extern declares for general global variables */ #include "winglobals.h" extern winScreenInfo *g_ScreenInfo; extern miPointerScreenFuncRec g_winPointerCursorFuncs; extern DWORD g_dwEvents; #ifdef HAS_DEVWINDOWS extern int g_fdMessageQueue; #endif extern DevPrivateKeyRec g_iScreenPrivateKeyRec; #define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec) extern DevPrivateKeyRec g_iCmapPrivateKeyRec; #define g_iCmapPrivateKey (&g_iCmapPrivateKeyRec) extern DevPrivateKeyRec g_iGCPrivateKeyRec; #define g_iGCPrivateKey (&g_iGCPrivateKeyRec) extern DevPrivateKeyRec g_iPixmapPrivateKeyRec; #define g_iPixmapPrivateKey (&g_iPixmapPrivateKeyRec) extern DevPrivateKeyRec g_iWindowPrivateKeyRec; #define g_iWindowPrivateKey (&g_iWindowPrivateKeyRec) extern unsigned long g_ulServerGeneration; extern DWORD g_dwEnginesSupported; extern HINSTANCE g_hInstance; extern int g_copyROP[]; extern int g_patternROP[]; extern const char *g_pszQueryHost; extern DeviceIntPtr g_pwinPointer; extern DeviceIntPtr g_pwinKeyboard; /* * Extern declares for dynamically loaded library function pointers */ extern FARPROC g_fpDirectDrawCreate; extern FARPROC g_fpDirectDrawCreateClipper; /* * Screen privates macros */ #define winGetScreenPriv(pScreen) ((winPrivScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey)) #define winSetScreenPriv(pScreen,v) \ dixSetPrivate(&(pScreen)->devPrivates, g_iScreenPrivateKey, v) #define winScreenPriv(pScreen) \ winPrivScreenPtr pScreenPriv = winGetScreenPriv(pScreen) /* * Colormap privates macros */ #define winGetCmapPriv(pCmap) ((winPrivCmapPtr) \ dixLookupPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey)) #define winSetCmapPriv(pCmap,v) \ dixSetPrivate(&(pCmap)->devPrivates, g_iCmapPrivateKey, v) #define winCmapPriv(pCmap) \ winPrivCmapPtr pCmapPriv = winGetCmapPriv(pCmap) /* * GC privates macros */ #define winGetGCPriv(pGC) ((winPrivGCPtr) \ dixLookupPrivate(&(pGC)->devPrivates, g_iGCPrivateKey)) #define winSetGCPriv(pGC,v) \ dixSetPrivate(&(pGC)->devPrivates, g_iGCPrivateKey, v) #define winGCPriv(pGC) \ winPrivGCPtr pGCPriv = winGetGCPriv(pGC) /* * Pixmap privates macros */ #define winGetPixmapPriv(pPixmap) ((winPrivPixmapPtr) \ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey)) #define winSetPixmapPriv(pPixmap,v) \ dixLookupPrivate(&(pPixmap)->devPrivates, g_iPixmapPrivateKey, v) #define winPixmapPriv(pPixmap) \ winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap) /* * Window privates macros */ #define winGetWindowPriv(pWin) ((winPrivWinPtr) \ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey)) #define winSetWindowPriv(pWin,v) \ dixLookupPrivate(&(pWin)->devPrivates, g_iWindowPrivateKey, v) #define winWindowPriv(pWin) \ winPrivWinPtr pWinPriv = winGetWindowPriv(pWin) /* * wrapper macros */ #define _WIN_WRAP(priv, real, mem, func) {\ priv->mem = real->mem; \ real->mem = func; \ } #define _WIN_UNWRAP(priv, real, mem) {\ real->mem = priv->mem; \ } #define WIN_WRAP(mem, func) _WIN_WRAP(pScreenPriv, pScreen, mem, func) #define WIN_UNWRAP(mem) _WIN_UNWRAP(pScreenPriv, pScreen, mem) /* * BEGIN DDX and DIX Function Prototypes */ /* * winallpriv.c */ Bool winAllocatePrivates(ScreenPtr pScreen); Bool winInitCmapPrivates(ColormapPtr pCmap, int i); Bool winAllocateCmapPrivates(ColormapPtr pCmap); /* * winblock.c */ void winBlockHandler(ScreenPtr pScreen, void *pTimeout); /* * winclipboardinit.c */ Bool winInitClipboard(void); void winClipboardShutdown(void); /* * wincmap.c */ void winSetColormapFunctions(ScreenPtr pScreen); Bool winCreateDefColormap(ScreenPtr pScreen); /* * wincreatewnd.c */ Bool winCreateBoundingWindowFullScreen(ScreenPtr pScreen); Bool winCreateBoundingWindowWindowed(ScreenPtr pScreen); /* * windialogs.c */ void winDisplayExitDialog(winPrivScreenPtr pScreenPriv); void winDisplayDepthChangeDialog(winPrivScreenPtr pScreenPriv); void winDisplayAboutDialog(winPrivScreenPtr pScreenPriv); /* * winengine.c */ void winDetectSupportedEngines(void); Bool winSetEngine(ScreenPtr pScreen); Bool winGetDDProcAddresses(void); void winReleaseDDProcAddresses(void); /* * winerror.c */ #ifdef DDXOSVERRORF void OsVendorVErrorF(const char *pszFormat, va_list va_args) _X_ATTRIBUTE_PRINTF(1, 0); #endif void winMessageBoxF(const char *pszError, UINT uType, ...) _X_ATTRIBUTE_PRINTF(1, 3); /* * winglobals.c */ void winInitializeGlobals(void); /* * winkeybd.c */ int winTranslateKey(WPARAM wParam, LPARAM lParam); int winKeybdProc(DeviceIntPtr pDeviceInt, int iState); void winInitializeModeKeyStates(void); void winRestoreModeKeyStates(void); Bool winIsFakeCtrl_L(UINT message, WPARAM wParam, LPARAM lParam); void winKeybdReleaseKeys(void); void winSendKeyEvent(DWORD dwKey, Bool fDown); BOOL winCheckKeyPressed(WPARAM wParam, LPARAM lParam); void winFixShiftKeys(int iScanCode); /* * winkeyhook.c */ Bool winInstallKeyboardHookLL(void); void winRemoveKeyboardHookLL(void); /* * winmisc.c */ CARD8 winCountBits(DWORD dw); Bool winUpdateFBPointer(ScreenPtr pScreen, void *pbits); /* * winmouse.c */ int winMouseProc(DeviceIntPtr pDeviceInt, int iState); int winMouseWheel(int *iTotalDeltaZ, int iDeltaZ, int iButtonUp, int iButtonDown); void winMouseButtonsSendEvent(int iEventType, int iButton); int winMouseButtonsHandle(ScreenPtr pScreen, int iEventType, int iButton, WPARAM wParam); void winEnqueueMotion(int x, int y); /* * winscrinit.c */ Bool winScreenInit(ScreenPtr pScreen, int argc, char **argv); Bool winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv); /* * winshadddnl.c */ Bool winSetEngineFunctionsShadowDDNL(ScreenPtr pScreen); /* * winshadgdi.c */ Bool winSetEngineFunctionsShadowGDI(ScreenPtr pScreen); /* * winwakeup.c */ void winWakeupHandler(ScreenPtr pScreen, int iResult); /* * winwindow.c */ Bool winCreateWindowRootless(WindowPtr pWindow); Bool winDestroyWindowRootless(WindowPtr pWindow); Bool winPositionWindowRootless(WindowPtr pWindow, int x, int y); Bool winChangeWindowAttributesRootless(WindowPtr pWindow, unsigned long mask); Bool winUnmapWindowRootless(WindowPtr pWindow); Bool winMapWindowRootless(WindowPtr pWindow); void winSetShapeRootless(WindowPtr pWindow, int kind); /* * winmultiwindowshape.c */ void winReshapeMultiWindow(WindowPtr pWin); void winSetShapeMultiWindow(WindowPtr pWindow, int kind); void winUpdateRgnMultiWindow(WindowPtr pWindow); /* * winmultiwindowwindow.c */ Bool winCreateWindowMultiWindow(WindowPtr pWindow); Bool winDestroyWindowMultiWindow(WindowPtr pWindow); Bool winPositionWindowMultiWindow(WindowPtr pWindow, int x, int y); Bool winChangeWindowAttributesMultiWindow(WindowPtr pWindow, unsigned long mask); Bool winUnmapWindowMultiWindow(WindowPtr pWindow); Bool winMapWindowMultiWindow(WindowPtr pWindow); void winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent); void winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib); void winReorderWindowsMultiWindow(void); void winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); void winMoveWindowMultiWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind); void winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion); PixmapPtr winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint); Bool winDestroyPixmapMultiwindow(PixmapPtr pPixmap); Bool winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); XID winGetWindowID(WindowPtr pWin); int winAdjustXWindow(WindowPtr pWin, HWND hwnd); /* * winmultiwindowwndproc.c */ LRESULT CALLBACK winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); /* * wintrayicon.c */ void winInitNotifyIcon(winPrivScreenPtr pScreenPriv); void winDeleteNotifyIcon(winPrivScreenPtr pScreenPriv); LRESULT winHandleIconMessage(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, winPrivScreenPtr pScreenPriv); /* * winwndproc.c */ LRESULT CALLBACK winWindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); /* * winwindowswm.c */ void winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg, Window window, int x, int y, int w, int h); void winWindowsWMExtensionInit(void); /* * wincursor.c */ Bool winInitCursor(ScreenPtr pScreen); /* * winprocarg.c */ void winInitializeScreens(int maxscreens); /* * winrandr.c */ Bool winRandRInit(ScreenPtr pScreen); void winDoRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight); /* * winmsgwindow.c */ Bool winCreateMsgWindowThread(void); /* * winos.c */ void winOS(void); /* * END DDX and DIX Function Prototypes */ #endif /* _WIN_H_ */ xorg-server-21.1.16/hw/xwin/winglobals.h0000644000175000017500000000456114757411105013556 /* File: winglobals.h Purpose: declarations for global variables 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef WINGLOBALS_H #define WINGLOBALS_H #ifdef HAVE_XWIN_CONFIG_H #include #endif #include /* * References to external symbols */ extern int g_iNumScreens; extern int g_iLastScreen; extern char *g_pszCommandLine; extern Bool g_fSilentFatalError; extern const char *g_pszLogFile; #ifdef RELOCATE_PROJECTROOT extern Bool g_fLogFileChanged; #endif extern int g_iLogVerbose; extern Bool g_fLogInited; extern Bool g_fAuthEnabled; extern Bool g_fXdmcpEnabled; extern Bool g_fCompositeAlpha; extern Bool g_fNoHelpMessageBox; extern Bool g_fNativeGl; extern Bool g_fHostInTitle; extern HWND g_hDlgDepthChange; extern HWND g_hDlgExit; extern HWND g_hDlgAbout; extern Bool g_fSoftwareCursor; extern Bool g_fCursor; /* Typedef for DIX wrapper functions */ typedef int (*winDispatchProcPtr) (ClientPtr); /* * Wrapped DIX functions */ extern winDispatchProcPtr winProcEstablishConnectionOrig; extern Bool g_fClipboard; extern Bool g_fClipboardStarted; /* The global X default icons */ extern HICON g_hIconX; extern HICON g_hSmallIconX; extern DWORD g_dwCurrentThreadID; extern Bool g_fKeyboardHookLL; extern Bool g_fButton[3]; extern pthread_mutex_t g_pmTerminating; #endif /* WINGLOBALS_H */ xorg-server-21.1.16/hw/xwin/winkeybd.h0000644000175000017500000002051314757411105013224 #if !defined(WINKEYBD_H) #define WINKEYBD_H /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Harold L Hunt II */ /* * We need symbols for the scan codes of keys. */ #include "winkeynames.h" #define VK_FN 0xFF #define WIN_KEYMAP_COLS 3 /* Rows 160 through 165 correspond to software-generated codes, which * may not be associated with the appropriate scan code. */ const int g_iKeyMap[] = { /* count Windows VK, ASCII, ASCII when extended VK */ /* 0 */ 0, 0, 0, /* 1 */ 0, 0, 0, /* 2 */ 0, 0, 0, /* 3 */ VK_CANCEL, 0, KEY_Break, /* 4 */ 0, 0, 0, /* 5 */ 0, 0, 0, /* 6 */ 0, 0, 0, /* 7 */ 0, 0, 0, /* 8 */ 0, 0, 0, /* 9 */ 0, 0, 0, /* 10 */ 0, 0, 0, /* 11 */ 0, 0, 0, /* 12 */ 0, 0, 0, /* 13 */ VK_RETURN, 0, KEY_KP_Enter, /* 14 */ 0, 0, 0, /* 15 */ 0, 0, 0, /* 16 */ VK_SHIFT, 0, 0, /* 17 */ VK_CONTROL, 0, KEY_RCtrl, /* 18 */ VK_MENU, 0, KEY_AltLang, /* 19 */ VK_PAUSE, KEY_Pause, 0, /* 20 */ 0, 0, 0, /* 21 */ 0, 0, 0, /* 22 */ 0, 0, 0, /* 23 */ 0, 0, 0, /* 24 */ 0, 0, 0, /* 25 */ 0, 0, 0, /* 26 */ 0, 0, 0, /* 27 */ 0, 0, 0, /* 28 */ 0, 0, 0, /* 29 */ 0, 0, 0, /* 30 */ 0, 0, 0, /* 31 */ 0, 0, 0, /* 32 */ 0, 0, 0, /* 33 */ VK_PRIOR, 0, KEY_PgUp, /* 34 */ VK_NEXT, 0, KEY_PgDown, /* 35 */ VK_END, 0, KEY_End, /* 36 */ VK_HOME, 0, KEY_Home, /* 37 */ VK_LEFT, 0, KEY_Left, /* 38 */ VK_UP, 0, KEY_Up, /* 39 */ VK_RIGHT, 0, KEY_Right, /* 40 */ VK_DOWN, 0, KEY_Down, /* 41 */ 0, 0, 0, /* 42 */ 0, 0, 0, /* 43 */ 0, 0, 0, /* 44 */ VK_SNAPSHOT, 0, KEY_Print, /* 45 */ VK_INSERT, 0, KEY_Insert, /* 46 */ VK_DELETE, 0, KEY_Delete, /* 47 */ 0, 0, 0, /* 48 */ 0, 0, 0, /* 49 */ 0, 0, 0, /* 50 */ 0, 0, 0, /* 51 */ 0, 0, 0, /* 52 */ 0, 0, 0, /* 53 */ 0, 0, 0, /* 54 */ 0, 0, 0, /* 55 */ 0, 0, 0, /* 56 */ 0, 0, 0, /* 57 */ 0, 0, 0, /* 58 */ 0, 0, 0, /* 59 */ 0, 0, 0, /* 60 */ 0, 0, 0, /* 61 */ 0, 0, 0, /* 62 */ 0, 0, 0, /* 63 */ 0, 0, 0, /* 64 */ 0, 0, 0, /* 65 */ 0, 0, 0, /* 66 */ 0, 0, 0, /* 67 */ 0, 0, 0, /* 68 */ 0, 0, 0, /* 69 */ 0, 0, 0, /* 70 */ 0, 0, 0, /* 71 */ 0, 0, 0, /* 72 */ 0, 0, 0, /* 73 */ 0, 0, 0, /* 74 */ 0, 0, 0, /* 75 */ 0, 0, 0, /* 76 */ 0, 0, 0, /* 77 */ 0, 0, 0, /* 78 */ 0, 0, 0, /* 79 */ 0, 0, 0, /* 80 */ 0, 0, 0, /* 81 */ 0, 0, 0, /* 82 */ 0, 0, 0, /* 83 */ 0, 0, 0, /* 84 */ 0, 0, 0, /* 85 */ 0, 0, 0, /* 86 */ 0, 0, 0, /* 87 */ 0, 0, 0, /* 88 */ 0, 0, 0, /* 89 */ 0, 0, 0, /* 90 */ 0, 0, 0, /* 91 */ VK_LWIN, KEY_LMeta, 0, /* 92 */ VK_RWIN, KEY_RMeta, 0, /* 93 */ VK_APPS, KEY_Menu, 0, /* 94 */ 0, 0, 0, /* 95 */ 0, 0, 0, /* 96 */ 0, 0, 0, /* 97 */ 0, 0, 0, /* 98 */ 0, 0, 0, /* 99 */ 0, 0, 0, /* 100 */ 0, 0, 0, /* 101 */ 0, 0, 0, /* 102 */ 0, 0, 0, /* 103 */ 0, 0, 0, /* 104 */ 0, 0, 0, /* 105 */ 0, 0, 0, /* 106 */ 0, 0, 0, /* 107 */ 0, 0, 0, /* 108 */ 0, 0, 0, /* 109 */ 0, 0, 0, /* 110 */ 0, 0, 0, /* 111 */ VK_DIVIDE, 0, KEY_KP_Divide, /* 112 */ 0, 0, 0, /* 113 */ 0, 0, 0, /* 114 */ 0, 0, 0, /* 115 */ 0, 0, 0, /* 116 */ 0, 0, 0, /* 117 */ 0, 0, 0, /* 118 */ 0, 0, 0, /* 119 */ 0, 0, 0, /* 120 */ 0, 0, 0, /* 121 */ 0, 0, 0, /* 122 */ 0, 0, 0, /* 123 */ 0, 0, 0, /* 124 */ 0, 0, 0, /* 125 */ 0, 0, 0, /* 126 */ 0, 0, 0, /* 127 */ 0, 0, 0, /* 128 */ 0, 0, 0, /* 129 */ 0, 0, 0, /* 130 */ 0, 0, 0, /* 131 */ 0, 0, 0, /* 132 */ 0, 0, 0, /* 133 */ 0, 0, 0, /* 134 */ 0, 0, 0, /* 135 */ 0, 0, 0, /* 136 */ 0, 0, 0, /* 137 */ 0, 0, 0, /* 138 */ 0, 0, 0, /* 139 */ 0, 0, 0, /* 140 */ 0, 0, 0, /* 141 */ 0, 0, 0, /* 142 */ 0, 0, 0, /* 143 */ 0, 0, 0, /* 144 */ 0, 0, 0, /* 145 */ 0, 0, 0, /* 146 */ 0, 0, 0, /* 147 */ 0, 0, 0, /* 148 */ 0, 0, 0, /* 149 */ 0, 0, 0, /* 150 */ 0, 0, 0, /* 151 */ 0, 0, 0, /* 152 */ 0, 0, 0, /* 153 */ 0, 0, 0, /* 154 */ 0, 0, 0, /* 155 */ 0, 0, 0, /* 156 */ 0, 0, 0, /* 157 */ 0, 0, 0, /* 158 */ 0, 0, 0, /* 159 */ 0, 0, 0, /* 160 */ VK_LSHIFT, KEY_ShiftL, 0, /* 161 */ VK_RSHIFT, KEY_ShiftR, 0, /* 162 */ VK_LCONTROL, KEY_LCtrl, 0, /* 163 */ VK_RCONTROL, KEY_RCtrl, 0, /* 164 */ VK_LMENU, KEY_Alt, 0, /* 165 */ VK_RMENU, KEY_AltLang, 0, /* 166 */ 0, 0, 0, /* 167 */ 0, 0, 0, /* 168 */ 0, 0, 0, /* 169 */ 0, 0, 0, /* 170 */ 0, 0, 0, /* 171 */ 0, 0, 0, /* 172 */ 0, 0, 0, /* 173 */ VK_VOLUME_MUTE, 0, KEY_Mute, /* 174 */ VK_VOLUME_DOWN, 0, KEY_AudioLower, /* 175 */ VK_VOLUME_UP, 0, KEY_AudioRaise, /* 176 */ VK_MEDIA_NEXT_TRACK, 0, KEY_NEXTSONG, /* 177 */ VK_MEDIA_PREV_TRACK, 0, KEY_PREVIOUSSONG, /* 178 */ VK_MEDIA_STOP, 0, KEY_STOPCD, /* 179 */ VK_MEDIA_PLAY_PAUSE, 0, KEY_PLAYPAUSE, /* 180 */ 0, 0, 0, /* 181 */ 0, 0, 0, /* 182 */ 0, 0, 0, /* 183 */ 0, 0, 0, /* 184 */ 0, 0, 0, /* 185 */ 0, 0, 0, /* 186 */ 0, 0, 0, /* 187 */ 0, 0, 0, /* 188 */ 0, 0, 0, /* 189 */ 0, 0, 0, /* 190 */ 0, 0, 0, /* 191 */ 0, 0, 0, /* 192 */ 0, 0, 0, /* 193 */ 0, 0, 0, /* 194 */ 0, 0, 0, /* 195 */ 0, 0, 0, /* 196 */ 0, 0, 0, /* 197 */ 0, 0, 0, /* 198 */ 0, 0, 0, /* 199 */ 0, 0, 0, /* 200 */ 0, 0, 0, /* 201 */ 0, 0, 0, /* 202 */ 0, 0, 0, /* 203 */ 0, 0, 0, /* 204 */ 0, 0, 0, /* 205 */ 0, 0, 0, /* 206 */ 0, 0, 0, /* 207 */ 0, 0, 0, /* 208 */ 0, 0, 0, /* 209 */ 0, 0, 0, /* 210 */ 0, 0, 0, /* 211 */ 0, 0, 0, /* 212 */ 0, 0, 0, /* 213 */ 0, 0, 0, /* 214 */ 0, 0, 0, /* 215 */ 0, 0, 0, /* 216 */ 0, 0, 0, /* 217 */ 0, 0, 0, /* 218 */ 0, 0, 0, /* 219 */ 0, 0, 0, /* 220 */ 0, 0, 0, /* 221 */ 0, 0, 0, /* 222 */ 0, 0, 0, /* 223 */ VK_OEM_8, 0, KEY_RCtrl, /* at least on Canadian Multilingual Standard layout */ /* 224 */ 0, 0, 0, /* 225 */ 0, 0, 0, /* 226 */ 0, 0, 0, /* 227 */ 0, 0, 0, /* 228 */ 0, 0, 0, /* 229 */ 0, 0, 0, /* 230 */ 0, 0, 0, /* 231 */ 0, 0, 0, /* 232 */ 0, 0, 0, /* 233 */ 0, 0, 0, /* 234 */ 0, 0, 0, /* 235 */ 0, 0, 0, /* 236 */ 0, 0, 0, /* 237 */ 0, 0, 0, /* 238 */ 0, 0, 0, /* 239 */ 0, 0, 0, /* 240 */ 0, 0, 0, /* 241 */ 0, 0, 0, /* 242 */ 0, 0, 0, /* 243 */ 0, 0, 0, /* 244 */ 0, 0, 0, /* 245 */ 0, 0, 0, /* 246 */ 0, 0, 0, /* 247 */ 0, 0, 0, /* 248 */ 0, 0, 0, /* 249 */ 0, 0, 0, /* 250 */ 0, 0, 0, /* 251 */ 0, 0, 0, /* 252 */ 0, 0, 0, /* 253 */ 0, 0, 0, /* 254 */ 0, 0, 0, /* 255 */ VK_FN, 0, KEY_Fn /* Most keyboards don't generate a scancode for Fn, but a few do... */ }; #endif /* WINKEYBD_H */ xorg-server-21.1.16/hw/xwin/winkeynames.h0000644000175000017500000002620214757411105013743 #ifndef _WINKEYNAMES_H #define _WINKEYNAMES_H /* * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. * * 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 Thomas Roell not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Thomas Roell makes no representations * about the suitability of this software for any purpose. It is provided * "as is" without express or implied warranty. * * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THOMAS ROELL 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. * */ #define GLYPHS_PER_KEY 4 #define NUM_KEYCODES 248 #define MIN_KEYCODE 8 #define MAX_KEYCODE (NUM_KEYCODES + MIN_KEYCODE - 1) #define AltMask Mod1Mask #define NumLockMask Mod2Mask #define AltLangMask Mod3Mask #define KanaMask Mod4Mask #define ScrollLockMask Mod5Mask #define ModifierDown(k) ((keyc->state & (k)) == (k)) /* * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three) * sets of scancodes. Set3 can only be generated by a MF keyboard. * Set2 sends a makecode for keypress, and the same code prefixed by a * F0 for keyrelease. This is a little bit ugly to handle. Thus we use * here for X386 the PC/XT compatible Set1. This set uses 8bit scancodes. * Bit 7 is set if the key is released. The code E0 switches to a * different meaning to add the new MF cursorkeys, while not breaking old * applications. E1 is another special prefix. Since I assume that there * will be further versions of PC/XT scancode compatible keyboards, we * may be in trouble one day. * * IDEA: 1) Use Set2 on AT84 keyboards and translate it to MF Set3. * 2) Use the keyboards native set and translate it to common keysyms. */ /* * definition of the AT84/MF101/MF102 Keyboard: * ============================================================ * Defined Key Cap Glyphs Pressed value * Key Name Main Also (hex) (dec) * ---------------- ---------- ------- ------ ------ */ #define KEY_Escape /* Escape 0x01 */ 1 #define KEY_1 /* 1 ! 0x02 */ 2 #define KEY_2 /* 2 @ 0x03 */ 3 #define KEY_3 /* 3 # 0x04 */ 4 #define KEY_4 /* 4 $ 0x05 */ 5 #define KEY_5 /* 5 % 0x06 */ 6 #define KEY_6 /* 6 ^ 0x07 */ 7 #define KEY_7 /* 7 & 0x08 */ 8 #define KEY_8 /* 8 * 0x09 */ 9 #define KEY_9 /* 9 ( 0x0a */ 10 #define KEY_0 /* 0 ) 0x0b */ 11 #define KEY_Minus /* - (Minus) _ (Under) 0x0c */ 12 #define KEY_Equal /* = (Equal) + 0x0d */ 13 #define KEY_BackSpace /* Back Space 0x0e */ 14 #define KEY_Tab /* Tab 0x0f */ 15 #define KEY_Q /* Q 0x10 */ 16 #define KEY_W /* W 0x11 */ 17 #define KEY_E /* E 0x12 */ 18 #define KEY_R /* R 0x13 */ 19 #define KEY_T /* T 0x14 */ 20 #define KEY_Y /* Y 0x15 */ 21 #define KEY_U /* U 0x16 */ 22 #define KEY_I /* I 0x17 */ 23 #define KEY_O /* O 0x18 */ 24 #define KEY_P /* P 0x19 */ 25 #define KEY_LBrace /* [ { 0x1a */ 26 #define KEY_RBrace /* ] } 0x1b */ 27 #define KEY_Enter /* Enter 0x1c */ 28 #define KEY_LCtrl /* Ctrl(left) 0x1d */ 29 #define KEY_A /* A 0x1e */ 30 #define KEY_S /* S 0x1f */ 31 #define KEY_D /* D 0x20 */ 32 #define KEY_F /* F 0x21 */ 33 #define KEY_G /* G 0x22 */ 34 #define KEY_H /* H 0x23 */ 35 #define KEY_J /* J 0x24 */ 36 #define KEY_K /* K 0x25 */ 37 #define KEY_L /* L 0x26 */ 38 #define KEY_SemiColon /* ;(SemiColon) :(Colon) 0x27 */ 39 #define KEY_Quote /* ' (Apostr) " (Quote) 0x28 */ 40 #define KEY_Tilde /* ` (Accent) ~ (Tilde) 0x29 */ 41 #define KEY_ShiftL /* Shift(left) 0x2a */ 42 #define KEY_BSlash /* \(BckSlash) |(VertBar)0x2b */ 43 #define KEY_Z /* Z 0x2c */ 44 #define KEY_X /* X 0x2d */ 45 #define KEY_C /* C 0x2e */ 46 #define KEY_V /* V 0x2f */ 47 #define KEY_B /* B 0x30 */ 48 #define KEY_N /* N 0x31 */ 49 #define KEY_M /* M 0x32 */ 50 #define KEY_Comma /* , (Comma) < (Less) 0x33 */ 51 #define KEY_Period /* . (Period) >(Greater)0x34 */ 52 #define KEY_Slash /* / (Slash) ? 0x35 */ 53 #define KEY_ShiftR /* Shift(right) 0x36 */ 54 #define KEY_KP_Multiply /* * 0x37 */ 55 #define KEY_Alt /* Alt(left) 0x38 */ 56 #define KEY_Space /* (SpaceBar) 0x39 */ 57 #define KEY_CapsLock /* CapsLock 0x3a */ 58 #define KEY_F1 /* F1 0x3b */ 59 #define KEY_F2 /* F2 0x3c */ 60 #define KEY_F3 /* F3 0x3d */ 61 #define KEY_F4 /* F4 0x3e */ 62 #define KEY_F5 /* F5 0x3f */ 63 #define KEY_F6 /* F6 0x40 */ 64 #define KEY_F7 /* F7 0x41 */ 65 #define KEY_F8 /* F8 0x42 */ 66 #define KEY_F9 /* F9 0x43 */ 67 #define KEY_F10 /* F10 0x44 */ 68 #define KEY_NumLock /* NumLock 0x45 */ 69 #define KEY_ScrollLock /* ScrollLock 0x46 */ 70 #define KEY_KP_7 /* 7 Home 0x47 */ 71 #define KEY_KP_8 /* 8 Up 0x48 */ 72 #define KEY_KP_9 /* 9 PgUp 0x49 */ 73 #define KEY_KP_Minus /* - (Minus) 0x4a */ 74 #define KEY_KP_4 /* 4 Left 0x4b */ 75 #define KEY_KP_5 /* 5 0x4c */ 76 #define KEY_KP_6 /* 6 Right 0x4d */ 77 #define KEY_KP_Plus /* + (Plus) 0x4e */ 78 #define KEY_KP_1 /* 1 End 0x4f */ 79 #define KEY_KP_2 /* 2 Down 0x50 */ 80 #define KEY_KP_3 /* 3 PgDown 0x51 */ 81 #define KEY_KP_0 /* 0 Insert 0x52 */ 82 #define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83 #define KEY_SysReqest /* SysReqest 0x54 */ 84 #define KEY_Fn /* Fn 0x55 */ 85 #define KEY_Less /* < (Less) >(Greater) 0x56 */ 86 #define KEY_F11 /* F11 0x57 */ 87 #define KEY_F12 /* F12 0x58 */ 88 #define KEY_Prefix0 /* special 0x60 */ 96 #define KEY_Prefix1 /* special 0x61 */ 97 /* * The 'scancodes' below are generated by the server, because the MF101/102 * keyboard sends them as sequence of other scancodes */ #define KEY_Home /* Home 0x59 */ 89 #define KEY_Up /* Up 0x5a */ 90 #define KEY_PgUp /* PgUp 0x5b */ 91 #define KEY_Left /* Left 0x5c */ 92 #define KEY_Begin /* Begin 0x5d */ 93 #define KEY_Right /* Right 0x5e */ 94 #define KEY_End /* End 0x5f */ 95 #define KEY_Down /* Down 0x60 */ 96 #define KEY_PgDown /* PgDown 0x61 */ 97 #define KEY_Insert /* Insert 0x62 */ 98 #define KEY_Delete /* Delete 0x63 */ 99 #define KEY_KP_Enter /* Enter 0x64 */ 100 #define KEY_RCtrl /* Ctrl(right) 0x65 */ 101 #define KEY_Pause /* Pause 0x66 */ 102 #define KEY_Print /* Print 0x67 */ 103 #define KEY_KP_Divide /* Divide 0x68 */ 104 #define KEY_AltLang /* AtlLang(right) 0x69 */ 105 #define KEY_Break /* Break 0x6a */ 106 #define KEY_LMeta /* Left Meta 0x6b */ 107 #define KEY_RMeta /* Right Meta 0x6c */ 108 #define KEY_Menu /* Menu 0x6d */ 109 #define KEY_F13 /* F13 0x6e */ 110 #define KEY_F14 /* F14 0x6f */ 111 #define KEY_F15 /* F15 0x70 */ 112 #define KEY_F16 /* F16 0x71 */ 113 #define KEY_F17 /* F17 0x72 */ 114 #define KEY_KP_DEC /* KP_DEC 0x73 */ 115 #define KEY_KP_Equal /* Equal (Keypad) 0x76 */ 118 #define KEY_XFER /* Kanji Transfer 0x79 */ 121 #define KEY_NFER /* No Kanji Transfer 0x7b */ 123 #define KEY_Yen /* Yen 0x7d */ 125 #define KEY_HKTG /* Hirugana/Katakana tog 0xc8 */ 200 #define KEY_BSlash2 /* \ _ 0xcb */ 203 #define KEY_Mute /* Audio Mute */ 152 #define KEY_AudioLower /* Audio Lower */ 166 #define KEY_AudioRaise /* Audio Raise */ 168 #define KEY_NEXTSONG /* Media next */ 145 #define KEY_PLAYPAUSE /* Media play/pause toggle */ 154 #define KEY_PREVIOUSSONG /* Media previous */ 136 #define KEY_STOPCD /* Media stop */ 156 /* These are for "notused" and "unknown" entries in translation maps. */ #define KEY_NOTUSED 0 #define KEY_UNKNOWN 255 #endif /* _WINKEYNAMES_H */ xorg-server-21.1.16/hw/xwin/winlayouts.h0000644000175000017500000001174414757411105013634 /* * Copyright (c) 2005 Alexander Gottwald * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ /* Definitions for various keyboard layouts from windows and their * XKB settings. */ typedef struct { unsigned int winlayout; int winkbtype; const char *xkbmodel; const char *xkblayout; const char *xkbvariant; const char *xkboptions; const char *layoutname; } WinKBLayoutRec, *WinKBLayoutPtr; /* This table is sorted by low byte of winlayout, then by next byte, etc. */ WinKBLayoutRec winKBLayouts[] = { {0x00000404, -1, "pc105", "cn", NULL, NULL, "Chinese (Traditional)"}, {0x00000804, -1, "pc105", "cn", NULL, NULL, "Chinese (Simplified)"}, {0x00000405, -1, "pc105", "cz", NULL, NULL, "Czech"}, {0x00010405, -1, "pc105", "cz_qwerty", NULL, NULL, "Czech (QWERTY)"}, {0x00000406, -1, "pc105", "dk", NULL, NULL, "Danish"}, {0x00000407, -1, "pc105", "de", NULL, NULL, "German (Germany)"}, {0x00010407, -1, "pc105", "de", NULL, NULL, "German (Germany,IBM)"}, {0x00000807, -1, "pc105", "ch", "de", NULL, "German (Switzerland)"}, {0x00000409, -1, "pc105", "us", NULL, NULL, "English (USA)"}, {0x00010409, -1, "pc105", "dvorak", NULL, NULL, "English (USA,Dvorak)"}, {0x00020409, -1, "pc105", "us_intl", NULL, NULL, "English (USA,International)"}, {0x00000809, -1, "pc105", "gb", NULL, NULL, "English (United Kingdom)"}, {0x00001009, -1, "pc105", "ca", "fr", NULL, "French (Canada)"}, {0x00011009, -1, "pc105", "ca", "multix", NULL, "Canadian Multilingual Standard"}, {0x00001809, -1, "pc105", "ie", NULL, NULL, "Irish"}, {0x0000040a, -1, "pc105", "es", NULL, NULL, "Spanish (Spain,Traditional Sort)"}, {0x0000080a, -1, "pc105", "latam", NULL, NULL, "Latin American"}, {0x0000040b, -1, "pc105", "fi", NULL, NULL, "Finnish"}, {0x0000040c, -1, "pc105", "fr", NULL, NULL, "French (Standard)"}, {0x0000080c, -1, "pc105", "be", NULL, NULL, "French (Belgian)"}, {0x0001080c, -1, "pc105", "be", NULL, NULL, "Belgian (Comma)"}, {0x00000c0c, -1, "pc105", "ca", "fr-legacy", NULL, "French (Canada, Legacy)"}, {0x0000100c, -1, "pc105", "ch", "fr", NULL, "French (Switzerland)"}, {0x0000040d, -1, "pc105", "il", NULL, NULL, "Hebrew"}, {0x0000040e, -1, "pc105", "hu", NULL, NULL, "Hungarian"}, {0x0000040f, -1, "pc105", "is", NULL, NULL, "Icelandic"}, {0x00000410, -1, "pc105", "it", NULL, NULL, "Italian"}, {0x00010410, -1, "pc105", "it", NULL, NULL, "Italian (142)"}, {0x00000411, 7, "jp106", "jp", NULL, NULL, "Japanese"}, {0x00000412, -1, "kr106", "kr", NULL, NULL, "Korean"}, {0x00000413, -1, "pc105", "nl", NULL, NULL, "Dutch"}, {0x00000813, -1, "pc105", "be", NULL, NULL, "Dutch (Belgian)"}, {0x00000414, -1, "pc105", "no", NULL, NULL, "Norwegian"}, {0x00000415, -1, "pc105", "pl", NULL, NULL, "Polish (Programmers)"}, {0x00000416, -1, "pc105", "br", NULL, NULL, "Portuguese (Brazil,ABNT)"}, {0x00010416, -1, "abnt2", "br", NULL, NULL, "Portuguese (Brazil,ABNT2)"}, {0x00000816, -1, "pc105", "pt", NULL, NULL, "Portuguese (Portugal)"}, {0x00000419, -1, "pc105", "ru", NULL, NULL, "Russian"}, {0x0000041a, -1, "pc105", "hr", NULL, NULL, "Croatian"}, {0x0000041d, -1, "pc105", "se", NULL, NULL, "Swedish (Sweden)"}, {0x0000041f, -1, "pc105", "tr", NULL, NULL, "Turkish (Q)"}, {0x0001041f, -1, "pc105", "tr", "f", NULL, "Turkish (F)"}, {0x00000424, -1, "pc105", "si", NULL, NULL, "Slovenian"}, {0x00000425, -1, "pc105", "ee", NULL, NULL, "Estonian"}, {0x00000452, -1, "pc105", "gb", "intl", NULL, "United Kingdom (Extended)"}, {-1, -1, NULL, NULL, NULL, NULL, NULL} }; /* See http://technet.microsoft.com/en-us/library/cc766503%28WS.10%29.aspx for a listing of input locale (keyboard layout) codes */ xorg-server-21.1.16/hw/xwin/winmessages.h0000644000175000017500000003212014757411105013732 #ifndef __WINMESSAGES_H__ #define __WINMESSAGES_H__ static const unsigned MESSAGE_NAMES_LEN = 1024; static const char *MESSAGE_NAMES[1024] = { "WM_NULL", "WM_CREATE", "WM_DESTROY", "WM_MOVE", "4", "WM_SIZE", "WM_ACTIVATE", "WM_SETFOCUS", "WM_KILLFOCUS", "9", "WM_ENABLE", "WM_SETREDRAW", "WM_SETTEXT", "WM_GETTEXT", "WM_GETTEXTLENGTH", "WM_PAINT", "WM_CLOSE", "WM_QUERYENDSESSION", "WM_QUIT", "WM_QUERYOPEN", "WM_ERASEBKGND", "WM_SYSCOLORCHANGE", "WM_ENDSESSION", "23", "WM_SHOWWINDOW", "25", "WM_WININICHANGE", "WM_DEVMODECHANGE", "WM_ACTIVATEAPP", "WM_FONTCHANGE", "WM_TIMECHANGE", "WM_CANCELMODE", NULL /* WM_SETCURSOR */ , "WM_MOUSEACTIVATE", "WM_CHILDACTIVATE", "WM_QUEUESYNC", "WM_GETMINMAXINFO", "37", "WM_PAINTICON", "WM_ICONERASEBKGND", "WM_NEXTDLGCTL", "41", "WM_SPOOLERSTATUS", "WM_DRAWITEM", "WM_MEASUREITEM", "WM_DELETEITEM", "WM_VKEYTOITEM", "WM_CHARTOITEM", "WM_SETFONT", "WM_GETFONT", "WM_SETHOTKEY", "WM_GETHOTKEY", "52", "53", "54", "WM_QUERYDRAGICON", "56", "WM_COMPAREITEM", "58", "59", "60", "61", "62", "63", "64", "WM_COMPACTING", "66", "67", "WM_COMMNOTIFY", "69", "WM_WINDOWPOSCHANGING", "WM_WINDOWPOSCHANGED", "WM_POWER", "73", "WM_COPYDATA", "WM_CANCELJOURNAL", "76", "77", "WM_NOTIFY", "79", "WM_INPUTLANGCHANGEREQUEST", "WM_INPUTLANGCHANGE", "WM_TCARD", "WM_HELP", "WM_USERCHANGED", "WM_NOTIFYFORMAT", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100", "101", "102", "103", "104", "105", "106", "107", "108", "109", "110", "111", "112", "113", "114", "115", "116", "117", "118", "119", "120", "121", "122", "WM_CONTEXTMENU", "WM_STYLECHANGING", "WM_STYLECHANGED", "WM_DISPLAYCHANGE", "WM_GETICON", "WM_SETICON", "WM_NCCREATE", "WM_NCDESTROY", "WM_NCCALCSIZE", NULL /* WM_NCHITTEST */ , "WM_NCPAINT", "WM_NCACTIVATE", "WM_GETDLGCODE", "WM_SYNCPAINT", "137", "138", "139", "140", "141", "142", "143", "144", "145", "146", "147", "148", "149", "150", "151", "152", "153", "154", "155", "156", "157", "158", "159", NULL /* WM_NCMOUSEMOVE */ , "WM_NCLBUTTONDOWN", "WM_NCLBUTTONUP", "WM_NCLBUTTONDBLCLK", "WM_NCRBUTTONDOWN", "WM_NCRBUTTONUP", "WM_NCRBUTTONDBLCLK", "WM_NCMBUTTONDOWN", "WM_NCMBUTTONUP", "WM_NCMBUTTONDBLCLK", "170", "171", "172", "173", "174", "175", "176", "177", "178", "179", "180", "181", "182", "183", "184", "185", "186", "187", "188", "189", "190", "191", "192", "193", "194", "195", "196", "197", "198", "199", "200", "201", "202", "203", "204", "205", "206", "207", "208", "209", "210", "211", "212", "213", "214", "215", "216", "217", "218", "219", "220", "221", "222", "223", "224", "225", "226", "227", "228", "229", "230", "231", "232", "233", "234", "235", "236", "237", "238", "239", "240", "241", "242", "243", "244", "245", "246", "247", "248", "249", "250", "251", "252", "253", "254", "255", "WM_KEYDOWN", "WM_KEYUP", "WM_CHAR", "WM_DEADCHAR", "WM_SYSKEYDOWN", "WM_SYSKEYUP", "WM_SYSCHAR", "WM_SYSDEADCHAR", "WM_CONVERTREQUESTEX", "265", "266", "267", "268", "WM_IME_STARTCOMPOSITION", "WM_IME_ENDCOMPOSITION", "WM_IME_KEYLAST", "WM_INITDIALOG", "WM_COMMAND", "WM_SYSCOMMAND", NULL /* WM_TIMER */ , "WM_HSCROLL", "WM_VSCROLL", "WM_INITMENU", "WM_INITMENUPOPUP", "280", "281", "282", "283", "284", "285", "286", "WM_MENUSELECT", "WM_MENUCHAR", "WM_ENTERIDLE", "290", "291", "292", "293", "294", "295", "296", "297", "298", "299", "300", "301", "302", "303", "304", "305", "WM_CTLCOLORMSGBOX", "WM_CTLCOLOREDIT", "WM_CTLCOLORLISTBOX", "WM_CTLCOLORBTN", "WM_CTLCOLORDLG", "WM_CTLCOLORSCROLLBAR", "WM_CTLCOLORSTATIC", "313", "314", "315", "316", "317", "318", "319", "320", "321", "322", "323", "324", "325", "326", "327", "328", "329", "330", "331", "332", "333", "334", "335", "336", "337", "338", "339", "340", "341", "342", "343", "344", "345", "346", "347", "348", "349", "350", "351", "352", "353", "354", "355", "356", "357", "358", "359", "360", "361", "362", "363", "364", "365", "366", "367", "368", "369", "370", "371", "372", "373", "374", "375", "376", "377", "378", "379", "380", "381", "382", "383", "384", "385", "386", "387", "388", "389", "390", "391", "392", "393", "394", "395", "396", "397", "398", "399", "400", "401", "402", "403", "404", "405", "406", "407", "408", "409", "410", "411", "412", "413", "414", "415", "416", "417", "418", "419", "420", "421", "422", "423", "424", "425", "426", "427", "428", "429", "430", "431", "432", "433", "434", "435", "436", "437", "438", "439", "440", "441", "442", "443", "444", "445", "446", "447", "448", "449", "450", "451", "452", "453", "454", "455", "456", "457", "458", "459", "460", "461", "462", "463", "464", "465", "466", "467", "468", "469", "470", "471", "472", "473", "474", "475", "476", "477", "478", "479", "480", "481", "482", "483", "484", "485", "486", "487", "488", "489", "490", "491", "492", "493", "494", "495", "496", "497", "498", "499", "500", "501", "502", "503", "504", "505", "506", "507", "508", "509", "510", "511", NULL /* WM_MOUSEMOVE */ , "WM_LBUTTONDOWN", "WM_LBUTTONUP", "WM_LBUTTONDBLCLK", "WM_RBUTTONDOWN", "WM_RBUTTONUP", "WM_RBUTTONDBLCLK", "WM_MBUTTONDOWN", "WM_MBUTTONUP", "WM_MBUTTONDBLCLK", "WM_MOUSEWHEEL", "WM_XBUTTONDOWN", "WM_XBUTTONUP", "WM_XBUTTONDBLCLK", "WM_MOUSEHWHEEL", "527", "WM_PARENTNOTIFY", "WM_ENTERMENULOOP", "WM_EXITMENULOOP", "WM_NEXTMENU", "WM_SIZING", "WM_CAPTURECHANGED", "WM_MOVING", "535", "WM_POWERBROADCAST", "WM_DEVICECHANGE", "538", "539", "540", "541", "542", "543", "WM_MDICREATE", "WM_MDIDESTROY", "WM_MDIACTIVATE", "WM_MDIRESTORE", "WM_MDINEXT", "WM_MDIMAXIMIZE", "WM_MDITILE", "WM_MDICASCADE", "WM_MDIICONARRANGE", "WM_MDIGETACTIVE", "554", "555", "556", "557", "558", "559", "WM_MDISETMENU", "WM_ENTERSIZEMOVE", "WM_EXITSIZEMOVE", "WM_DROPFILES", "WM_MDIREFRESHMENU", "565", "566", "567", "568", "569", "570", "571", "572", "573", "574", "575", "576", "577", "578", "579", "580", "581", "582", "583", "584", "585", "586", "587", "588", "589", "590", "591", "592", "593", "594", "595", "596", "597", "598", "599", "600", "601", "602", "603", "604", "605", "606", "607", "608", "609", "610", "611", "612", "613", "614", "615", "616", "617", "618", "619", "620", "621", "622", "623", "624", "625", "626", "627", "628", "629", "630", "631", "632", "633", "634", "635", "636", "637", "638", "639", "640", "WM_IME_SETCONTEXT", "WM_IME_NOTIFY", "WM_IME_CONTROL", "WM_IME_COMPOSITIONFULL", "WM_IME_SELECT", "WM_IME_CHAR", "647", "648", "649", "650", "651", "652", "653", "654", "655", "WM_IME_KEYDOWN", "WM_IME_KEYUP", "658", "659", "660", "661", "662", "663", "664", "665", "666", "667", "668", "669", "670", "671", "672", "WM_MOUSEHOVER", "674", "WM_MOUSELEAVE", "676", "677", "678", "679", "680", "681", "682", "683", "684", "685", "686", "687", "688", "689", "690", "691", "692", "693", "694", "695", "696", "697", "698", "699", "700", "701", "702", "703", "704", "705", "706", "707", "708", "709", "710", "711", "712", "713", "714", "715", "716", "717", "718", "719", "720", "721", "722", "723", "724", "725", "726", "727", "728", "729", "730", "731", "732", "733", "734", "735", "736", "737", "738", "739", "740", "741", "742", "743", "744", "745", "746", "747", "748", "749", "750", "751", "752", "753", "754", "755", "756", "757", "758", "759", "760", "761", "762", "763", "764", "765", "766", "767", "WM_CUT", "WM_COPY", "WM_PASTE", "WM_CLEAR", "WM_UNDO", "WM_RENDERFORMAT", "WM_RENDERALLFORMATS", "WM_DESTROYCLIPBOARD", "WM_DRAWCLIPBOARD", "WM_PAINTCLIPBOARD", "WM_VSCROLLCLIPBOARD", "WM_SIZECLIPBOARD", "WM_ASKCBFORMATNAME", "WM_CHANGECBCHAIN", "WM_HSCROLLCLIPBOARD", "WM_QUERYNEWPALETTE", "WM_PALETTEISCHANGING", "WM_PALETTECHANGED", "WM_HOTKEY", "787", "788", "789", "790", "WM_PRINT", "WM_PRINTCLIENT", "793", "794", "795", "796", "797", "798", "799", "800", "801", "802", "803", "804", "805", "806", "807", "808", "809", "810", "811", "812", "813", "814", "815", "816", "817", "818", "819", "820", "821", "822", "823", "824", "825", "826", "827", "828", "829", "830", "831", "832", "833", "834", "835", "836", "837", "838", "839", "840", "841", "842", "843", "844", "845", "846", "847", "848", "849", "850", "851", "852", "853", "854", "855", "856", "857", "858", "859", "860", "861", "862", "863", "864", "865", "866", "867", "868", "869", "870", "871", "872", "873", "874", "875", "876", "877", "878", "879", "880", "881", "882", "883", "884", "885", "886", "887", "888", "889", "890", "891", "892", "893", "894", "895", "896", "897", "898", "899", "900", "901", "902", "903", "904", "905", "906", "907", "908", "909", "910", "911", "912", "913", "914", "915", "916", "917", "918", "919", "920", "921", "922", "923", "924", "925", "926", "927", "928", "929", "930", "931", "932", "933", "934", "935", "936", "937", "938", "939", "940", "941", "942", "943", "944", "945", "946", "947", "948", "949", "950", "951", "952", "953", "954", "955", "956", "957", "958", "959", "960", "961", "962", "963", "964", "965", "966", "967", "968", "969", "970", "971", "972", "973", "974", "975", "976", "977", "978", "979", "980", "981", "982", "983", "984", "985", "986", "987", "988", "989", "990", "991", "992", "993", "994", "995", "996", "997", "998", "999", "1000", "1001", "1002", "1003", "1004", "1005", "1006", "1007", "1008", "1009", "1010", "1011", "1012", "1013", "1014", "1015", "1016", "1017", "1018", "1019", "1020", "1021", "1022", "1023" }; #endif xorg-server-21.1.16/hw/xwin/winmonitors.h0000644000175000017500000000301714757411105014000 /* Copyright 1993, 1998 The Open Group Copyright (C) Colin Harrison 2005-2008 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. */ /* data returned for monitor information */ struct GetMonitorInfoData { int requestedMonitor; int monitorNum; Bool bUserSpecifiedMonitor; Bool bMonitorSpecifiedExists; int monitorOffsetX; int monitorOffsetY; int monitorHeight; int monitorWidth; HMONITOR monitorHandle; }; Bool QueryMonitor(int i, struct GetMonitorInfoData *data); xorg-server-21.1.16/hw/xwin/winmsg.h0000644000175000017500000000437314757411105012722 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Alexander Gottwald */ #ifndef __WIN_MSG_H__ #define __WIN_MSG_H__ #include #include /* * Function prototypes */ #ifdef XWIN_XF86CONFIG void winDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(4, 5); void winDrvMsg(int scrnIndex, MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); #endif #define winMsg LogMessage void winDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); void winTrace(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); void winErrorFVerb(int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(2, 3); void winW32Error(int verb, const char *message); void winW32ErrorEx(int verb, const char *message, DWORD errorcode); void winDebugWin32Message(const char *function, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); #endif xorg-server-21.1.16/hw/xwin/winms.h0000644000175000017500000000341214757411105012544 #ifndef _WINMS_H_ #define _WINMS_H_ /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #define DIRECTDRAW_VERSION 0x0300 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef WINVER #define WINVER 0x0500 #endif #include #include #pragma push_macro("Status") #undef Status #define Status wStatus #include "ddraw.h" #pragma pop_macro("Status") #undef CreateWindow #endif /* _WINMS_H_ */ xorg-server-21.1.16/hw/xwin/winmultiwindowclass.h0000644000175000017500000001223114757411105015534 #if !defined(WINMULTIWINDOWCLASS_H) #define WINMULTIWINDOWCLASS_H /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Earle F. Philhower, III */ /* * The next block of definitions are for window manager properties that * clients and applications use for communication. */ /* * Structures */ /* * WM_HINTS structure * * NOTE: this structure represents the internal format stored in the property * after it is marshalled by libX11, converting the flags field from an * arch-dependent long to a 32-bit int. */ typedef struct { int flags; /* marks which fields in this structure are defined */ Bool input; /* does this application rely on the window manager to get keyboard input? */ int initial_state; /* see below */ Pixmap icon_pixmap; /* pixmap to be used as icon */ Window icon_window; /* window to be used as icon */ int icon_x, icon_y; /* initial position of icon */ Pixmap icon_mask; /* icon mask bitmap */ XID window_group; /* id of related window group */ /* this structure may be extended in the future */ } WinXWMHints; /* Window manager hints mask bits */ #define InputHint (1L << 0) #define StateHint (1L << 1) #define IconPixmapHint (1L << 2) #define IconWindowHint (1L << 3) #define IconPositionHint (1L << 4) #define IconMaskHint (1L << 5) #define WindowGroupHint (1L << 6) #define UrgencyHint (1L << 8) #define AllHints (InputHint|StateHint|IconPixmapHint|IconWindowHint|IconPositionHint|IconMaskHint|WindowGroupHint) /* * ICCCM 1.0 version containing base_width, base_height, and win_gravity fields; * used with WM_NORMAL_HINTS. * * NOTE: this structure represents the internal format stored in the property * after it is marshalled by libX11, converting the flags field from an * arch-dependent long to a 32-bit int. */ typedef struct { int flags; /* marks which fields in this structure are defined */ int x, y; /* obsolete for new window mgrs, but clients */ int width, height; /* should set so old wm's don't mess up */ int min_width, min_height; int max_width, max_height; int width_inc, height_inc; struct { int x; /* numerator */ int y; /* denominator */ } min_aspect, max_aspect; int base_width, base_height; /* added by ICCCM version 1 */ int win_gravity; /* added by ICCCM version 1 */ } WinXSizeHints; /* flags argument in size hints */ #define USPosition (1L << 0) /* user specified x, y */ #define USSize (1L << 1) /* user specified width, height */ #define PPosition (1L << 2) /* program specified position */ #define PSize (1L << 3) /* program specified size */ #define PMinSize (1L << 4) /* program specified minimum size */ #define PMaxSize (1L << 5) /* program specified maximum size */ #define PResizeInc (1L << 6) /* program specified resize increments */ #define PAspect (1L << 7) /* program specified min and max aspect ratios */ #define PBaseSize (1L << 8) /* program specified base for incrementing */ #define PWinGravity (1L << 9) /* program specified window gravity */ /* obsolete */ #define PAllHints (PPosition|PSize|PMinSize|PMaxSize|PResizeInc|PAspect) /* * Function prototypes */ int winMultiWindowGetWMHints(WindowPtr pWin, WinXWMHints * hints); int winMultiWindowGetClassHint(WindowPtr pWin, char **res_name, char **res_class); int winMultiWindowGetWindowRole(WindowPtr pWin, char **res_role); int winMultiWindowGetWMNormalHints(WindowPtr pWin, WinXSizeHints * hints); int winMultiWindowGetWMName(WindowPtr pWin, char **wmName); int winMultiWindowGetTransientFor(WindowPtr pWin, Window *ppDaddy); #endif xorg-server-21.1.16/hw/xwin/winmultiwindowicons.h0000644000175000017500000000304714757411105015547 /* * File: winmultiwindowicons.h * Purpose: interface for multiwindow mode icon functions * * Copyright (c) Jon TURNEY 2012 * * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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. */ #ifndef WINMULTIWINDOWICONS_H #define WINMULTIWINDOWICONS_H #include void winUpdateIcon(HWND hWnd, xcb_connection_t *conn, xcb_window_t id, HICON hIconNew); void winInitGlobalIcons(void); void winDestroyIcon(HICON hIcon); void winSelectIcons(HICON * pIcon, HICON * pSmallIcon); #endif /* WINMULTIWINDOWICONS_H */ xorg-server-21.1.16/hw/xwin/winprefs.h0000644000175000017500000001447414757411105013256 /* * Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * Copyright (C) Colin Harrison 2005-2008 * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * 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 XFREE86 PROJECT 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 XFree86 Project * 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 XFree86 Project. * * Authors: Earle F. Philhower, III * Colin Harrison */ #if !defined(WINPREFS_H) #define WINPREFS_H /* Need Bool */ #include /* Need TRUE */ #include "misc.h" /* Need to know how long paths can be... */ #include /* Xwindows redefines PATH_MAX to at least 1024 */ #include #include "winwindow.h" #ifndef NAME_MAX #define NAME_MAX PATH_MAX #endif #define MENU_MAX 128 /* Maximum string length of a menu name or item */ #define PARAM_MAX (4*PATH_MAX) /* Maximum length of a parameter to a MENU */ /* Supported commands in a MENU {} statement */ typedef enum MENUCOMMANDTYPE { CMD_EXEC, /* /bin/sh -c the parameter */ CMD_MENU, /* Display a popup menu named param */ CMD_SEPARATOR, /* Menu separator */ CMD_ALWAYSONTOP, /* Toggle always-on-top mode */ CMD_RELOAD /* Reparse the .XWINRC file */ } MENUCOMMANDTYPE; #define STYLE_NONE (0L) /* Dummy the first entry */ #define STYLE_NOTITLE (1L) /* Force window style no titlebar */ #define STYLE_OUTLINE (1L<<1) /* Force window style just thin-line border */ #define STYLE_NOFRAME (1L<<2) /* Force window style no frame */ #define STYLE_TOPMOST (1L<<3) /* Open a window always-on-top */ #define STYLE_MAXIMIZE (1L<<4) /* Open a window maximized */ #define STYLE_MINIMIZE (1L<<5) /* Open a window minimized */ #define STYLE_BOTTOM (1L<<6) /* Open a window at the bottom of the Z order */ /* Where to place a system menu */ typedef enum MENUPOSITION { AT_START, /* Place menu at the top of the system menu */ AT_END /* Put it at the bottom of the menu (default) */ } MENUPOSITION; /* Menu item definitions */ typedef struct MENUITEM { char text[MENU_MAX + 1]; /* To be displayed in menu */ MENUCOMMANDTYPE cmd; /* What should it do? */ char param[PARAM_MAX + 1]; /* Any parameters? */ unsigned long commandID; /* Windows WM_COMMAND ID assigned at runtime */ } MENUITEM; /* A completely read in menu... */ typedef struct MENUPARSED { char menuName[MENU_MAX + 1]; /* What's it called in the text? */ MENUITEM *menuItem; /* Array of items */ int menuItems; /* How big's the array? */ } MENUPARSED; /* To map between a window and a system menu to add for it */ typedef struct SYSMENUITEM { char match[MENU_MAX + 1]; /* String to look for to apply this sysmenu */ char menuName[MENU_MAX + 1]; /* Which menu to show? Used to set *menu */ MENUPOSITION menuPos; /* Where to place it (ignored in root) */ } SYSMENUITEM; /* To redefine icons for certain window types */ typedef struct ICONITEM { char match[MENU_MAX + 1]; /* What string to search for? */ char iconFile[PATH_MAX + NAME_MAX + 2]; /* Icon location, WIN32 path */ HICON hicon; /* LoadImage() result */ } ICONITEM; /* To redefine styles for certain window types */ typedef struct STYLEITEM { char match[MENU_MAX + 1]; /* What string to search for? */ unsigned long type; /* What should it do? */ } STYLEITEM; typedef struct WINPREFS { /* Menu information */ MENUPARSED *menu; /* Array of created menus */ int menuItems; /* How big? */ /* Taskbar menu settings */ char rootMenuName[MENU_MAX + 1]; /* Menu for taskbar icon */ /* System menu addition menus */ SYSMENUITEM *sysMenu; int sysMenuItems; /* Which menu to add to unmatched windows? */ char defaultSysMenuName[MENU_MAX + 1]; MENUPOSITION defaultSysMenuPos; /* Where to place it */ /* Icon information */ char iconDirectory[PATH_MAX + 1]; /* Where do the .icos lie? (Win32 path) */ char defaultIconName[NAME_MAX + 1]; /* Replacement for x.ico */ char trayIconName[NAME_MAX + 1]; /* Replacement for tray icon */ ICONITEM *icon; int iconItems; STYLEITEM *style; int styleItems; /* Force exit flag */ Bool fForceExit; /* Silent exit flag */ Bool fSilentExit; } WINPREFS; /* The global pref settings structure loaded by the winprefyacc.y parser */ extern WINPREFS pref; /* Functions */ void LoadPreferences(void); void SetupRootMenu(HMENU root); void SetupSysMenu(HWND hwnd); void HandleCustomWM_INITMENU(HWND hwnd, HMENU hmenu); Bool HandleCustomWM_COMMAND(HWND hwnd, WORD command, winPrivScreenPtr pScreenPriv); int winIconIsOverride(HICON hicon); HICON winOverrideIcon(char *res_name, char *res_class, char *wmName); unsigned long winOverrideStyle(char *res_name, char *res_class, char *wmName); HICON winTaskbarIcon(void); HICON winOverrideDefaultIcon(int size); HICON LoadImageComma(char *fname, char *iconDirectory, int sx, int sy, int flags); #endif xorg-server-21.1.16/hw/xwin/winresource.h0000644000175000017500000000334314757411105013757 #if !defined(WINRESOURCE_H) #define WINRESOURCE_H /* *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ /* * Local defines */ #define IDC_STATIC -1 #define IDI_XWIN 101 #define IDM_TRAYICON_MENU 103 #define IDC_CLIENTS_CONNECTED 104 #define ID_APP_EXIT 200 #define ID_APP_HIDE_ROOT 201 #define ID_APP_ALWAYS_ON_TOP 202 #define ID_APP_ABOUT 203 #define ID_APP_MONITOR_PRIMARY 204 #define ID_ABOUT_WEBSITE 303 #endif xorg-server-21.1.16/hw/xwin/winwindow.h0000644000175000017500000001106614757411105013440 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. *Copyright (C) Colin Harrison 2005-2009 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Kensuke Matsuzaki * Colin Harrison */ #if !defined(_WINWINDOW_H_) #define _WINWINDOW_H_ #ifndef NO #define NO 0 #endif #ifndef YES #define YES 1 #endif /* Constant strings */ #ifndef PROJECT_NAME #define PROJECT_NAME "Cygwin/X" #endif #define EXECUTABLE_NAME "XWin" #define WINDOW_CLASS "cygwin/x" #define WINDOW_TITLE PROJECT_NAME ":%s.%d" #define WINDOW_TITLE_XDMCP "%s:%s.%d" #define WIN_SCR_PROP "cyg_screen_prop rl" #define WINDOW_CLASS_X "cygwin/x X rl" #define WINDOW_CLASS_X_MSG "cygwin/x X msg" #define WINDOW_TITLE_X PROJECT_NAME " X" #define WIN_WINDOW_PROP "cyg_window_prop_rl" #ifdef HAS_DEVWINDOWS #define WIN_MSG_QUEUE_FNAME "/dev/windows" #endif #define WIN_WID_PROP "cyg_wid_prop_rl" #define WIN_NEEDMANAGE_PROP "cyg_override_redirect_prop_rl" #ifndef CYGMULTIWINDOW_DEBUG #define CYGMULTIWINDOW_DEBUG NO #endif #ifndef CYGWINDOWING_DEBUG #define CYGWINDOWING_DEBUG NO #endif #define XMING_SIGNATURE 0x12345678L typedef struct _winPrivScreenRec *winPrivScreenPtr; /* * Window privates */ typedef struct { DWORD dwDummy; HRGN hRgn; HWND hWnd; winPrivScreenPtr pScreenPriv; Bool fXKilled; HDWP hDwp; #ifdef XWIN_GLX_WINDOWS Bool fWglUsed; #endif } winPrivWinRec, *winPrivWinPtr; typedef struct _winWMMessageRec { DWORD dwID; DWORD msg; int iWindow; HWND hwndWindow; int iX, iY; int iWidth, iHeight; } winWMMessageRec, *winWMMessagePtr; /* * winmultiwindowwm.c */ #define WM_WM_MOVE (WM_USER + 1) #define WM_WM_SIZE (WM_USER + 2) #define WM_WM_RAISE (WM_USER + 3) #define WM_WM_LOWER (WM_USER + 4) #define WM_WM_UNMAP (WM_USER + 6) #define WM_WM_KILL (WM_USER + 7) #define WM_WM_ACTIVATE (WM_USER + 8) #define WM_WM_NAME_EVENT (WM_USER + 9) #define WM_WM_ICON_EVENT (WM_USER + 10) #define WM_WM_CHANGE_STATE (WM_USER + 11) #define WM_WM_MAP_UNMANAGED (WM_USER + 12) #define WM_WM_MAP_MANAGED (WM_USER + 13) #define WM_WM_HINTS_EVENT (WM_USER + 14) #define MwmHintsDecorations (1L << 1) #define MwmDecorAll (1L << 0) #define MwmDecorBorder (1L << 1) #define MwmDecorHandle (1L << 2) #define MwmDecorTitle (1L << 3) #define MwmDecorMenu (1L << 4) #define MwmDecorMinimize (1L << 5) #define MwmDecorMaximize (1L << 6) /* This structure only contains 3 elements. The Motif 2.0 structure contains 5, but we only need the first 3, so that is all we will define This structure represents xcb_get_property()'s view of the property as a sequence of ints, rather than XGetWindowProperty()'s view of the property as a sequence of arch-dependent longs. */ typedef struct MwmHints { unsigned int flags, functions, decorations; } MwmHints; #define PropMwmHintsElements 3 void winSendMessageToWM(void *pWMInfo, winWMMessagePtr msg); Bool winInitWM(void **ppWMInfo, pthread_t * ptWMProc, pthread_t * ptXMsgProc, pthread_mutex_t * ppmServerStarted, int dwScreen, HWND hwndScreen, Bool compositeWM); void winDeinitMultiWindowWM(void); void winPropertyStoreInit(void); void winPropertyStoreDestroy(void); void winSetAppUserModelID(HWND hWnd, const char *AppID); void winShowWindowOnTaskbar(HWND hWnd, Bool show); #endif xorg-server-21.1.16/hw/xwin/windisplay.c0000644000175000017500000000425514757411105013573 /* * File: windisplay.c * Purpose: Retrieve server display name * * Copyright (C) Jon TURNEY 2009 * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include // for display #include "windisplay.h" #include "winmsg.h" #define XSERV_t #define TRANS_SERVER #include /* Generate a display name string referring to the display of this server, using a transport we know is enabled */ void winGetDisplayName(char *szDisplay, unsigned int screen) { if (_XSERVTransIsListening("local")) { snprintf(szDisplay, 512, ":%s.%d", display, screen); } else if (_XSERVTransIsListening("inet")) { snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen); } else if (_XSERVTransIsListening("inet6")) { snprintf(szDisplay, 512, "::1:%s.%d", display, screen); } else { // this can't happen! ErrorF("winGetDisplay: Don't know what to use for DISPLAY\n"); snprintf(szDisplay, 512, "localhost:%s.%d", display, screen); } winDebug("winGetDisplay: DISPLAY=%s\n", szDisplay); } xorg-server-21.1.16/hw/xwin/windisplay.h0000644000175000017500000000252614757411105013577 /* * File: windisplay.h * Purpose: Interface to retrieve server display name * * Copyright (C) Jon TURNEY 2009 * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef WINDISPLAY_H #define WINDISPLAY_H void winGetDisplayName(char *szDisplay, unsigned int screen); #endif /* !WINDISPLAY_H */ xorg-server-21.1.16/hw/xwin/XWin.rc0000644000175000017500000000730514757411105012456 /* *Copyright (C) 2002-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) 2008 Yaakov Selkowitz All Rights Reserved * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 names of the authors *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 authors. * * Authors: Harold L Hunt II, Yaakov Selkowitz */ #include #include "winresource.h" #include "xwin-config.h" #include "version-config.h" /* * Dialogs */ /* About */ ABOUT_BOX DIALOGEX 32, 32, 260, 105 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE CAPTION "About " XVENDORNAMESHORT FONT 8, "MS Shell Dlg 2" BEGIN CONTROL IDI_XWIN, IDC_STATIC, "Static", SS_ICON, 8, 8, 32, 32 LTEXT XVENDORNAMESHORT " X Server ", IDC_STATIC, 36, 8, 220, 8 LTEXT VENDOR_MAN_VERSION, IDC_STATIC, 36, 18, 220, 8 LTEXT BUILDERSTRING, IDC_STATIC, 36, 28, 220, 8 LTEXT "This software is licensed under the terms of the MIT/X11 License.", IDC_STATIC, 36, 48, 220, 20 CONTROL __VENDORDWEBSUPPORT__, ID_ABOUT_WEBSITE, "Button", BS_OWNERDRAW | WS_TABSTOP, 36, 68, 220, 8 DEFPUSHBUTTON "&OK", IDOK, 105, 85, 50, 15 END /* Depth change */ DEPTH_CHANGE_BOX DIALOGEX 32, 32, 180, 100 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | DS_CENTERMOUSE FONT 8, "MS Shell Dlg 2" CAPTION XVENDORNAMESHORT BEGIN DEFPUSHBUTTON "Dismiss", IDOK, 66, 80, 50, 14 CTEXT XVENDORNAMESHORT, IDC_STATIC, 40, 12, 100, 8 CTEXT "Disruptive screen configuration change.", IDC_STATIC, 7, 40, 166, 8 CTEXT "Restore previous resolution to use " XVENDORNAMESHORT ".", IDC_STATIC, 7, 52, 166, 8 END /* Exit */ EXIT_DIALOG DIALOGEX 32, 32, 180, 78 STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_VISIBLE | WS_TABSTOP | DS_CENTERMOUSE FONT 8, "MS Shell Dlg 2" CAPTION "Exit " XVENDORNAMESHORT "?" BEGIN PUSHBUTTON "E&xit", IDOK, 55, 56, 30, 14 DEFPUSHBUTTON "&Cancel", IDCANCEL, 95, 56, 30, 14 CTEXT "E&xiting will close all screens running on this display.", IDC_STATIC, 7, 12, 166, 8 CTEXT "No information about connected clients available.", IDC_CLIENTS_CONNECTED, 7, 24, 166, 8 CTEXT "Proceed with shutdown of this display/server?", IDC_STATIC, 7, 36, 166, 8 END /* * Menus */ IDM_TRAYICON_MENU MENU BEGIN POPUP "TRAYICON_MENU" BEGIN MENUITEM "&Hide Root Window", ID_APP_HIDE_ROOT MENUITEM "Clipboard may use &PRIMARY selection", ID_APP_MONITOR_PRIMARY MENUITEM "&About...", ID_APP_ABOUT MENUITEM SEPARATOR MENUITEM "E&xit...", ID_APP_EXIT END END /* * Icons */ IDI_XWIN ICON "X.ico" CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "XWin.exe.manifest" xorg-server-21.1.16/hw/xwin/winclipboardinit.c0000644000175000017500000001011314757411105014737 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 Harold L Hunt II *shall not be used in advertising or otherwise to promote the sale, use *or other dealings in this Software without prior written authorization *from Harold L Hunt II. * * Authors: Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include "win.h" #include "winclipboard/winclipboard.h" #include "windisplay.h" #include "winauth.h" #define WIN_CLIPBOARD_RETRIES 40 #define WIN_CLIPBOARD_DELAY 1 /* * Local variables */ static pthread_t g_ptClipboardProc; /* * */ static void * winClipboardThreadProc(void *arg) { char szDisplay[512]; xcb_auth_info_t *auth_info; int clipboardRestarts = 0; while (1) { Bool fShutdown; ++clipboardRestarts; /* Setup the display connection string */ /* * NOTE: Always connect to screen 0 since we require that screen * numbers start at 0 and increase without gaps. We only need * to connect to one screen on the display to get events * for all screens on the display. That is why there is only * one clipboard client thread. */ winGetDisplayName(szDisplay, 0); /* Print the display connection string */ ErrorF("winClipboardThreadProc - DISPLAY=%s\n", szDisplay); /* Flag that clipboard client has been launched */ g_fClipboardStarted = TRUE; /* Use our generated cookie for authentication */ auth_info = winGetXcbAuthInfo(); fShutdown = winClipboardProc(szDisplay, auth_info); /* Flag that clipboard client has stopped */ g_fClipboardStarted = FALSE; if (fShutdown) break; /* checking if we need to restart */ if (clipboardRestarts >= WIN_CLIPBOARD_RETRIES) { /* terminates clipboard thread but the main server still lives */ ErrorF("winClipboardProc - the clipboard thread has restarted %d times and seems to be unstable, disabling clipboard integration\n", clipboardRestarts); g_fClipboard = FALSE; break; } sleep(WIN_CLIPBOARD_DELAY); ErrorF("winClipboardProc - trying to restart clipboard thread \n"); } return NULL; } /* * Initialize the Clipboard module */ Bool winInitClipboard(void) { winDebug("winInitClipboard ()\n"); /* Spawn a thread for the Clipboard module */ if (pthread_create(&g_ptClipboardProc, NULL, winClipboardThreadProc, NULL)) { /* Bail if thread creation failed */ ErrorF("winInitClipboard - pthread_create failed.\n"); return FALSE; } return TRUE; } void winClipboardShutdown(void) { /* Close down clipboard resources */ if (g_fClipboard && g_fClipboardStarted) { /* Synchronously destroy the clipboard window */ winClipboardWindowDestroy(); /* Wait for the clipboard thread to exit */ pthread_join(g_ptClipboardProc, NULL); g_fClipboardStarted = FALSE; winDebug("winClipboardShutdown - Clipboard thread has exited.\n"); } } xorg-server-21.1.16/hw/xwin/winclipboardwrappers.c0000644000175000017500000001150214757411105015642 /* *Copyright (C) 2003-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 copyright holder(s) *and author(s) 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 copyright holder(s) and author(s). * * Authors: Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "dixstruct.h" /* * Local function prototypes */ DISPATCH_PROC(winProcEstablishConnection); /* * Wrapper for internal EstablishConnection function. * Initializes internal clients that must not be started until * an external client has connected. */ int winProcEstablishConnection(ClientPtr client) { int iReturn; static int s_iCallCount = 0; static unsigned long s_ulServerGeneration = 0; if (s_iCallCount == 0) winDebug("winProcEstablishConnection - Hello\n"); /* Do nothing if clipboard is not enabled */ if (!g_fClipboard) { ErrorF("winProcEstablishConnection - Clipboard is not enabled, " "returning.\n"); /* Unwrap the original function, call it, and return */ InitialVector[2] = winProcEstablishConnectionOrig; iReturn = (*winProcEstablishConnectionOrig) (client); winProcEstablishConnectionOrig = NULL; return iReturn; } /* Watch for server reset */ if (s_ulServerGeneration != serverGeneration) { /* Save new generation number */ s_ulServerGeneration = serverGeneration; /* Reset call count */ s_iCallCount = 0; } /* Increment call count */ ++s_iCallCount; /* * This procedure is only used for initialization. * We can unwrap the original procedure at this point * so that this function is no longer called until the * server resets and the function is wrapped again. */ InitialVector[2] = winProcEstablishConnectionOrig; /* * Call original function and bail if it fails. * NOTE: We must do this first, since we need XdmcpOpenDisplay * to be called before we initialize our clipboard client. */ iReturn = (*winProcEstablishConnectionOrig) (client); if (iReturn != 0) { ErrorF("winProcEstablishConnection - ProcEstablishConnection " "failed, bailing.\n"); return iReturn; } /* Clear original function pointer */ winProcEstablishConnectionOrig = NULL; /* Startup the clipboard client if clipboard mode is being used */ if (g_fClipboard) { /* * NOTE: The clipboard client is started here for a reason: * 1) Assume you are using XDMCP (e.g. XWin -query %hostname%) * 2) If the clipboard client attaches during X Server startup, * then it becomes the "magic client" that causes the X Server * to reset if it exits. * 3) XDMCP calls KillAllClients when it starts up. * 4) The clipboard client is a client, so it is killed. * 5) The clipboard client is the "magic client", so the X Server * resets itself. * 6) This repeats ad infinitum. * 7) We avoid this by waiting until at least one client (could * be XDM, could be another client) connects, which makes it * almost certain that the clipboard client will not connect * until after XDM when using XDMCP. */ /* Create the clipboard client thread */ if (!winInitClipboard()) { ErrorF("winProcEstablishConnection - winClipboardInit " "failed.\n"); return iReturn; } ErrorF("winProcEstablishConnection - winInitClipboard returned.\n"); } return iReturn; } xorg-server-21.1.16/hw/xwin/winmultiwindowshape.c0000644000175000017500000001462014757411105015526 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Kensuke Matsuzaki * Harold L Hunt II */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * winSetShapeMultiWindow - See Porting Layer Definition - p. 42 */ void winSetShapeMultiWindow(WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG ErrorF("winSetShapeMultiWindow - pWin: %p kind: %i\n", pWin, kind); #endif WIN_UNWRAP(SetShape); (*pScreen->SetShape) (pWin, kind); WIN_WRAP(SetShape, winSetShapeMultiWindow); /* Update the Windows window's shape */ winReshapeMultiWindow(pWin); winUpdateRgnMultiWindow(pWin); return; } /* * winUpdateRgnMultiWindow - Local function to update a Windows window region */ void winUpdateRgnMultiWindow(WindowPtr pWin) { SetWindowRgn(winGetWindowPriv(pWin)->hWnd, winGetWindowPriv(pWin)->hRgn, TRUE); /* The system now owns the region specified by the region handle and will delete it when it is no longer needed. */ winGetWindowPriv(pWin)->hRgn = NULL; } /* * winReshapeMultiWindow - Computes the composite clipping region for a window */ void winReshapeMultiWindow(WindowPtr pWin) { int nRects; RegionRec rrNewShape; BoxPtr pShape, pRects, pEnd; HRGN hRgn, hRgnRect; winWindowPriv(pWin); #if CYGDEBUG winDebug("winReshape ()\n"); #endif /* Bail if the window is the root window */ if (pWin->parent == NULL) return; /* Bail if the window is not top level */ if (pWin->parent->parent != NULL) return; /* Bail if Windows window handle is invalid */ if (pWinPriv->hWnd == NULL) return; /* Free any existing window region stored in the window privates */ if (pWinPriv->hRgn != NULL) { DeleteObject(pWinPriv->hRgn); pWinPriv->hRgn = NULL; } /* Bail if the window has no bounding region defined */ if (!wBoundingShape(pWin)) return; RegionNull(&rrNewShape); RegionCopy(&rrNewShape, wBoundingShape(pWin)); RegionTranslate(&rrNewShape, pWin->borderWidth, pWin->borderWidth); nRects = RegionNumRects(&rrNewShape); pShape = RegionRects(&rrNewShape); /* Don't do anything if there are no rectangles in the region */ if (nRects > 0) { RECT rcClient; RECT rcWindow; int iOffsetX, iOffsetY; /* Get client rectangle */ if (!GetClientRect(pWinPriv->hWnd, &rcClient)) { ErrorF("winReshape - GetClientRect failed, bailing: %d\n", (int) GetLastError()); return; } /* Translate client rectangle coords to screen coords */ /* NOTE: Only transforms top and left members */ ClientToScreen(pWinPriv->hWnd, (LPPOINT) &rcClient); /* Get window rectangle */ if (!GetWindowRect(pWinPriv->hWnd, &rcWindow)) { ErrorF("winReshape - GetWindowRect failed, bailing: %d\n", (int) GetLastError()); return; } /* Calculate offset from window upper-left to client upper-left */ iOffsetX = rcClient.left - rcWindow.left; iOffsetY = rcClient.top - rcWindow.top; /* Create initial Windows region for title bar */ /* FIXME: Mean, nasty, ugly hack!!! */ hRgn = CreateRectRgn(0, 0, rcWindow.right, iOffsetY); if (hRgn == NULL) { ErrorF("winReshape - Initial CreateRectRgn (%d, %d, %d, %d) " "failed: %d\n", 0, 0, (int) rcWindow.right, iOffsetY, (int) GetLastError()); } /* Loop through all rectangles in the X region */ for (pRects = pShape, pEnd = pShape + nRects; pRects < pEnd; pRects++) { /* Create a Windows region for the X rectangle */ hRgnRect = CreateRectRgn(pRects->x1 + iOffsetX, pRects->y1 + iOffsetY, pRects->x2 + iOffsetX, pRects->y2 + iOffsetY); if (hRgnRect == NULL) { ErrorF("winReshape - Loop CreateRectRgn (%d, %d, %d, %d) " "failed: %d\n" "\tx1: %d x2: %d xOff: %d y1: %d y2: %d yOff: %d\n", pRects->x1 + iOffsetX, pRects->y1 + iOffsetY, pRects->x2 + iOffsetX, pRects->y2 + iOffsetY, (int) GetLastError(), pRects->x1, pRects->x2, iOffsetX, pRects->y1, pRects->y2, iOffsetY); } /* Merge the Windows region with the accumulated region */ if (CombineRgn(hRgn, hRgn, hRgnRect, RGN_OR) == ERROR) { ErrorF("winReshape - CombineRgn () failed: %d\n", (int) GetLastError()); } /* Delete the temporary Windows region */ DeleteObject(hRgnRect); } /* Save a handle to the composite region in the window privates */ pWinPriv->hRgn = hRgn; } RegionUninit(&rrNewShape); return; } xorg-server-21.1.16/hw/xwin/winmultiwindowwindow.c0000644000175000017500000010646314757411105015744 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Kensuke Matsuzaki * Earle F. Philhower, III * Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "dixevents.h" #include "winmultiwindowclass.h" #include "winmultiwindowicons.h" /* * Prototypes for local functions */ void winCreateWindowsWindow(WindowPtr pWin); static void winDestroyWindowsWindow(WindowPtr pWin); static void winUpdateWindowsWindow(WindowPtr pWin); static void winFindWindow(void *value, XID id, void *cdata); static void winInitMultiWindowClass(void) { static wATOM atomXWinClass = 0; WNDCLASSEX wcx; if (atomXWinClass == 0) { HICON hIcon, hIconSmall; /* Load the default icons */ winSelectIcons(&hIcon, &hIconSmall); /* Setup our window class */ wcx.cbSize = sizeof(WNDCLASSEX); wcx.style = CS_HREDRAW | CS_VREDRAW | (g_fNativeGl ? CS_OWNDC : 0); wcx.lpfnWndProc = winTopLevelWindowProc; wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; wcx.hInstance = g_hInstance; wcx.hIcon = hIcon; wcx.hCursor = 0; wcx.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); wcx.lpszMenuName = NULL; wcx.lpszClassName = WINDOW_CLASS_X; wcx.hIconSm = hIconSmall; #if CYGMULTIWINDOW_DEBUG ErrorF("winCreateWindowsWindow - Creating class: %s\n", WINDOW_CLASS_X); #endif atomXWinClass = RegisterClassEx(&wcx); } } /* * CreateWindow - See Porting Layer Definition - p. 37 */ Bool winCreateWindowMultiWindow(WindowPtr pWin) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG winTrace("winCreateWindowMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(CreateWindow); fResult = (*pScreen->CreateWindow) (pWin); WIN_WRAP(CreateWindow, winCreateWindowMultiWindow); /* Initialize some privates values */ pWinPriv->hRgn = NULL; pWinPriv->hWnd = NULL; pWinPriv->pScreenPriv = winGetScreenPriv(pWin->drawable.pScreen); pWinPriv->fXKilled = FALSE; #ifdef XWIN_GLX_WINDOWS pWinPriv->fWglUsed = FALSE; #endif return fResult; } /* * DestroyWindow - See Porting Layer Definition - p. 37 */ Bool winDestroyWindowMultiWindow(WindowPtr pWin) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG ErrorF("winDestroyWindowMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(DestroyWindow); fResult = (*pScreen->DestroyWindow) (pWin); WIN_WRAP(DestroyWindow, winDestroyWindowMultiWindow); /* Flag that the window has been destroyed */ pWinPriv->fXKilled = TRUE; /* Kill the MS Windows window associated with this window */ winDestroyWindowsWindow(pWin); return fResult; } /* * PositionWindow - See Porting Layer Definition - p. 37 * * This function adjusts the position and size of Windows window * with respect to the underlying X window. This is the inverse * of winAdjustXWindow, which adjusts X window to Windows window. */ Bool winPositionWindowMultiWindow(WindowPtr pWin, int x, int y) { Bool fResult = TRUE; int iX, iY, iWidth, iHeight; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); HWND hWnd = pWinPriv->hWnd; RECT rcNew; RECT rcOld; #if CYGMULTIWINDOW_DEBUG RECT rcClient; RECT *lpRc; #endif DWORD dwExStyle; DWORD dwStyle; #if CYGMULTIWINDOW_DEBUG winTrace("winPositionWindowMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(PositionWindow); fResult = (*pScreen->PositionWindow) (pWin, x, y); WIN_WRAP(PositionWindow, winPositionWindowMultiWindow); #if CYGWINDOWING_DEBUG ErrorF("winPositionWindowMultiWindow: (x, y) = (%d, %d)\n", x, y); #endif /* Bail out if the Windows window handle is bad */ if (!hWnd) { #if CYGWINDOWING_DEBUG ErrorF("\timmediately return since hWnd is NULL\n"); #endif return fResult; } /* Get the Windows window style and extended style */ dwExStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE); dwStyle = GetWindowLongPtr(hWnd, GWL_STYLE); /* Get the X and Y location of the X window */ iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN); iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN); /* Get the height and width of the X window */ iWidth = pWin->drawable.width; iHeight = pWin->drawable.height; /* Store the origin, height, and width in a rectangle structure */ SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight); #if CYGMULTIWINDOW_DEBUG lpRc = &rcNew; ErrorF("winPositionWindowMultiWindow - drawable (%d, %d)-(%d, %d)\n", (int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom); #endif /* * Calculate the required size of the Windows window rectangle, * given the size of the Windows window client area. */ AdjustWindowRectEx(&rcNew, dwStyle, FALSE, dwExStyle); /* Get a rectangle describing the old Windows window */ GetWindowRect(hWnd, &rcOld); #if CYGMULTIWINDOW_DEBUG /* Get a rectangle describing the Windows window client area */ GetClientRect(hWnd, &rcClient); lpRc = &rcNew; ErrorF("winPositionWindowMultiWindow - rcNew (%d, %d)-(%d, %d)\n", (int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom); lpRc = &rcOld; ErrorF("winPositionWindowMultiWindow - rcOld (%d, %d)-(%d, %d)\n", (int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom); lpRc = &rcClient; ErrorF("rcClient (%d, %d)-(%d, %d)\n", (int)lpRc->left, (int)lpRc->top, (int)lpRc->right, (int)lpRc->bottom); #endif /* Check if the old rectangle and new rectangle are the same */ if (!EqualRect(&rcNew, &rcOld)) { #if CYGMULTIWINDOW_DEBUG ErrorF("winPositionWindowMultiWindow - Need to move\n"); #endif #if CYGWINDOWING_DEBUG ErrorF("\tMoveWindow to (%d, %d) - %dx%d\n", (int)rcNew.left, (int)rcNew.top, (int)(rcNew.right - rcNew.left), (int)(rcNew.bottom - rcNew.top)); #endif /* Change the position and dimensions of the Windows window */ MoveWindow(hWnd, rcNew.left, rcNew.top, rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, TRUE); } else { #if CYGMULTIWINDOW_DEBUG ErrorF("winPositionWindowMultiWindow - Not need to move\n"); #endif } return fResult; } /* * ChangeWindowAttributes - See Porting Layer Definition - p. 37 */ Bool winChangeWindowAttributesMultiWindow(WindowPtr pWin, unsigned long mask) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG ErrorF("winChangeWindowAttributesMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(ChangeWindowAttributes); fResult = (*pScreen->ChangeWindowAttributes) (pWin, mask); WIN_WRAP(ChangeWindowAttributes, winChangeWindowAttributesMultiWindow); /* * NOTE: We do not currently need to do anything here. */ return fResult; } /* * UnmapWindow - See Porting Layer Definition - p. 37 * Also referred to as UnrealizeWindow */ Bool winUnmapWindowMultiWindow(WindowPtr pWin) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG ErrorF("winUnmapWindowMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(UnrealizeWindow); fResult = (*pScreen->UnrealizeWindow) (pWin); WIN_WRAP(UnrealizeWindow, winUnmapWindowMultiWindow); /* Flag that the window has been killed */ pWinPriv->fXKilled = TRUE; /* Destroy the Windows window associated with this X window */ winDestroyWindowsWindow(pWin); return fResult; } /* * MapWindow - See Porting Layer Definition - p. 37 * Also referred to as RealizeWindow */ Bool winMapWindowMultiWindow(WindowPtr pWin) { Bool fResult = TRUE; ScreenPtr pScreen = pWin->drawable.pScreen; winWindowPriv(pWin); winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG ErrorF("winMapWindowMultiWindow - pWin: %p\n", pWin); #endif WIN_UNWRAP(RealizeWindow); fResult = (*pScreen->RealizeWindow) (pWin); WIN_WRAP(RealizeWindow, winMapWindowMultiWindow); /* Flag that this window has not been destroyed */ pWinPriv->fXKilled = FALSE; /* Refresh/redisplay the Windows window associated with this X window */ winUpdateWindowsWindow(pWin); /* Update the Windows window's shape */ winReshapeMultiWindow(pWin); winUpdateRgnMultiWindow(pWin); return fResult; } /* * ReparentWindow - See Porting Layer Definition - p. 42 */ void winReparentWindowMultiWindow(WindowPtr pWin, WindowPtr pPriorParent) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); winDebug ("winReparentMultiWindow - pWin:%p XID:0x%x, reparent from pWin:%p XID:0x%x to pWin:%p XID:0x%x\n", pWin, (unsigned int)pWin->drawable.id, pPriorParent, (unsigned int)pPriorParent->drawable.id, pWin->parent, (unsigned int)pWin->parent->drawable.id); WIN_UNWRAP(ReparentWindow); if (pScreen->ReparentWindow) (*pScreen->ReparentWindow) (pWin, pPriorParent); WIN_WRAP(ReparentWindow, winReparentWindowMultiWindow); /* Update the Windows window associated with this X window */ winUpdateWindowsWindow(pWin); } /* * RestackWindow - Shuffle the z-order of a window */ void winRestackWindowMultiWindow(WindowPtr pWin, WindowPtr pOldNextSib) { #if 0 WindowPtr pPrevWin; UINT uFlags; HWND hInsertAfter; HWND hWnd = NULL; #endif ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG winTrace("winRestackMultiWindow - %p\n", pWin); #endif WIN_UNWRAP(RestackWindow); if (pScreen->RestackWindow) (*pScreen->RestackWindow) (pWin, pOldNextSib); WIN_WRAP(RestackWindow, winRestackWindowMultiWindow); #if 1 /* * Calling winReorderWindowsMultiWindow here means our window manager * (i.e. Windows Explorer) has initiative to determine Z order. */ if (pWin->nextSib != pOldNextSib) winReorderWindowsMultiWindow(); #else /* Bail out if no window privates or window handle is invalid */ if (!pWinPriv || !pWinPriv->hWnd) return; /* Get a pointer to our previous sibling window */ pPrevWin = pWin->prevSib; /* * Look for a sibling window with * valid privates and window handle */ while (pPrevWin && !winGetWindowPriv(pPrevWin) && !winGetWindowPriv(pPrevWin)->hWnd) pPrevWin = pPrevWin->prevSib; /* Check if we found a valid sibling */ if (pPrevWin) { /* Valid sibling - get handle to insert window after */ hInsertAfter = winGetWindowPriv(pPrevWin)->hWnd; uFlags = SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE; hWnd = GetNextWindow(pWinPriv->hWnd, GW_HWNDPREV); do { if (GetProp(hWnd, WIN_WINDOW_PROP)) { if (hWnd == winGetWindowPriv(pPrevWin)->hWnd) { uFlags |= SWP_NOZORDER; } break; } hWnd = GetNextWindow(hWnd, GW_HWNDPREV); } while (hWnd); } else { /* No valid sibling - make this window the top window */ hInsertAfter = HWND_TOP; uFlags = SWP_NOMOVE | SWP_NOSIZE; } /* Perform the restacking operation in Windows */ SetWindowPos(pWinPriv->hWnd, hInsertAfter, 0, 0, 0, 0, uFlags); #endif } /* * winCreateWindowsWindow - Create a Windows window associated with an X window */ void winCreateWindowsWindow(WindowPtr pWin) { int iX, iY; int iWidth; int iHeight; HWND hWnd; HWND hFore = NULL; winWindowPriv(pWin); WinXSizeHints hints; Window daddyId; DWORD dwStyle, dwExStyle; RECT rc; winInitMultiWindowClass(); winDebug("winCreateWindowsTopLevelWindow - pWin:%p XID:0x%x \n", pWin, (unsigned int)pWin->drawable.id); iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN); iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN); iWidth = pWin->drawable.width; iHeight = pWin->drawable.height; /* If it's an InputOutput window, and so is going to end up being made visible, make sure the window actually ends up somewhere where it will be visible To handle arrangements of monitors which form a non-rectangular virtual desktop, check if the window will end up with its top-left corner on any monitor */ if (pWin->drawable.class != InputOnly) { POINT pt = { iX, iY }; if (MonitorFromPoint(pt, MONITOR_DEFAULTTONULL) == NULL) { iX = CW_USEDEFAULT; iY = CW_USEDEFAULT; } } winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX, iY); if (winMultiWindowGetTransientFor(pWin, &daddyId)) { if (daddyId) { WindowPtr pParent; int res = dixLookupWindow(&pParent, daddyId, serverClient, DixReadAccess); if (res == Success) { winPrivWinPtr pParentPriv = winGetWindowPriv(pParent); hFore = pParentPriv->hWnd; } } } else { /* Default positions if none specified */ if (!winMultiWindowGetWMNormalHints(pWin, &hints)) hints.flags = 0; if (!(hints.flags & (USPosition | PPosition)) && !pWin->overrideRedirect) { iX = CW_USEDEFAULT; iY = CW_USEDEFAULT; } } /* Make it WS_OVERLAPPED in create call since WS_POPUP doesn't support */ /* CW_USEDEFAULT, change back to popup after creation */ dwStyle = WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; dwExStyle = WS_EX_TOOLWINDOW; /* Calculate the window coordinates containing the requested client area, being careful to preserve CW_USEDEFAULT */ rc.top = (iY != CW_USEDEFAULT) ? iY : 0; rc.left = (iX != CW_USEDEFAULT) ? iX : 0; rc.bottom = rc.top + iHeight; rc.right = rc.left + iWidth; AdjustWindowRectEx(&rc, dwStyle, FALSE, dwExStyle); if (iY != CW_USEDEFAULT) iY = rc.top; if (iX != CW_USEDEFAULT) iX = rc.left; iHeight = rc.bottom - rc.top; iWidth = rc.right - rc.left; winDebug("winCreateWindowsWindow - %dx%d @ %dx%d\n", iWidth, iHeight, iX, iY); /* Create the window */ hWnd = CreateWindowExA(dwExStyle, /* Extended styles */ WINDOW_CLASS_X, /* Class name */ WINDOW_TITLE_X, /* Window name */ dwStyle, /* Styles */ iX, /* Horizontal position */ iY, /* Vertical position */ iWidth, /* Right edge */ iHeight, /* Bottom edge */ hFore, /* Null or Parent window if transient */ (HMENU) NULL, /* No menu */ GetModuleHandle(NULL), /* Instance handle */ pWin); /* ScreenPrivates */ if (hWnd == NULL) { ErrorF("winCreateWindowsWindow - CreateWindowExA () failed: %d\n", (int) GetLastError()); } pWinPriv->hWnd = hWnd; /* Change style back to popup, already placed... */ SetWindowLongPtr(hWnd, GWL_STYLE, WS_POPUP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); SetWindowPos(hWnd, 0, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); /* Adjust the X window to match the window placement we actually got... */ winAdjustXWindow(pWin, hWnd); /* Make sure it gets the proper system menu for a WS_POPUP, too */ GetSystemMenu(hWnd, TRUE); /* Cause any .XWinrc menus to be added in main WNDPROC */ PostMessage(hWnd, WM_INIT_SYS_MENU, 0, 0); SetProp(hWnd, WIN_WID_PROP, (HANDLE) (INT_PTR) winGetWindowID(pWin)); /* Flag that this Windows window handles its own activation */ SetProp(hWnd, WIN_NEEDMANAGE_PROP, (HANDLE) 0); } Bool winInDestroyWindowsWindow = FALSE; /* * winDestroyWindowsWindow - Destroy a Windows window associated * with an X window */ static void winDestroyWindowsWindow(WindowPtr pWin) { MSG msg; winWindowPriv(pWin); BOOL oldstate = winInDestroyWindowsWindow; HICON hIcon; HICON hIconSm; winDebug("winDestroyWindowsWindow - pWin:%p XID:0x%x \n", pWin, (unsigned int)pWin->drawable.id); /* Bail out if the Windows window handle is invalid */ if (pWinPriv->hWnd == NULL) return; winInDestroyWindowsWindow = TRUE; /* Store the info we need to destroy after this window is gone */ hIcon = (HICON) SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_BIG, 0); hIconSm = (HICON) SendMessage(pWinPriv->hWnd, WM_GETICON, ICON_SMALL, 0); /* Destroy the Windows window */ DestroyWindow(pWinPriv->hWnd); /* Null our handle to the Window so referencing it will cause an error */ pWinPriv->hWnd = NULL; /* Destroy any icons we created for this window */ winDestroyIcon(hIcon); winDestroyIcon(hIconSm); #ifdef XWIN_GLX_WINDOWS /* No longer note WGL used on this window */ pWinPriv->fWglUsed = FALSE; #endif /* Process all messages on our queue */ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { if (g_hDlgDepthChange == 0 || !IsDialogMessage(g_hDlgDepthChange, &msg)) { DispatchMessage(&msg); } } winInDestroyWindowsWindow = oldstate; winDebug("winDestroyWindowsWindow - done\n"); } /* * winUpdateWindowsWindow - Redisplay/redraw a Windows window * associated with an X window */ static void winUpdateWindowsWindow(WindowPtr pWin) { winWindowPriv(pWin); HWND hWnd = pWinPriv->hWnd; #if CYGMULTIWINDOW_DEBUG ErrorF("winUpdateWindowsWindow\n"); #endif /* Check if the Windows window's parents have been destroyed */ if (pWin->parent != NULL && pWin->parent->parent == NULL && pWin->mapped) { /* Create the Windows window if it has been destroyed */ if (hWnd == NULL) { winCreateWindowsWindow(pWin); assert(pWinPriv->hWnd != NULL); } /* Display the window without activating it */ if (pWin->drawable.class != InputOnly) ShowWindow(pWinPriv->hWnd, SW_SHOWNOACTIVATE); /* Send first paint message */ UpdateWindow(pWinPriv->hWnd); } else if (hWnd != NULL) { /* Destroy the Windows window if its parents are destroyed */ winDestroyWindowsWindow(pWin); assert(pWinPriv->hWnd == NULL); } #if CYGMULTIWINDOW_DEBUG ErrorF("-winUpdateWindowsWindow\n"); #endif } /* * winGetWindowID - */ XID winGetWindowID(WindowPtr pWin) { WindowIDPairRec wi = { pWin, 0 }; ClientPtr c = wClient(pWin); /* */ FindClientResourcesByType(c, RT_WINDOW, winFindWindow, &wi); #if CYGMULTIWINDOW_DEBUG ErrorF("winGetWindowID - Window ID: %u\n", (unsigned int)wi.id); #endif return wi.id; } /* * winFindWindow - */ static void winFindWindow(void *value, XID id, void *cdata) { WindowIDPairPtr wi = (WindowIDPairPtr) cdata; if (value == wi->value) { wi->id = id; } } /* * winReorderWindowsMultiWindow - */ void winReorderWindowsMultiWindow(void) { HWND hwnd = NULL; WindowPtr pWin = NULL; WindowPtr pWinSib = NULL; XID vlist[2]; static Bool fRestacking = FALSE; /* Avoid recursive calls to this function */ DWORD dwCurrentProcessID = GetCurrentProcessId(); DWORD dwWindowProcessID = 0; #if CYGMULTIWINDOW_DEBUG || CYGWINDOWING_DEBUG winTrace("winReorderWindowsMultiWindow\n"); #endif if (fRestacking) { /* It is a recursive call so immediately exit */ #if CYGWINDOWING_DEBUG ErrorF("winReorderWindowsMultiWindow - " "exit because fRestacking == TRUE\n"); #endif return; } fRestacking = TRUE; /* Loop through top level Window windows, descending in Z order */ for (hwnd = GetTopWindow(NULL); hwnd; hwnd = GetNextWindow(hwnd, GW_HWNDNEXT)) { /* Don't take care of other Cygwin/X process's windows */ GetWindowThreadProcessId(hwnd, &dwWindowProcessID); if (GetProp(hwnd, WIN_WINDOW_PROP) && (dwWindowProcessID == dwCurrentProcessID) && !IsIconic(hwnd)) { /* ignore minimized windows */ pWinSib = pWin; pWin = GetProp(hwnd, WIN_WINDOW_PROP); if (!pWinSib) { /* 1st window - raise to the top */ vlist[0] = Above; ConfigureWindow(pWin, CWStackMode, vlist, wClient(pWin)); } else { /* 2nd or deeper windows - just below the previous one */ vlist[0] = winGetWindowID(pWinSib); vlist[1] = Below; ConfigureWindow(pWin, CWSibling | CWStackMode, vlist, wClient(pWin)); } } } fRestacking = FALSE; } /* * CopyWindow - See Porting Layer Definition - p. 39 */ void winCopyWindowMultiWindow(WindowPtr pWin, DDXPointRec oldpt, RegionPtr oldRegion) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG ErrorF("CopyWindowMultiWindow\n"); #endif WIN_UNWRAP(CopyWindow); (*pScreen->CopyWindow) (pWin, oldpt, oldRegion); WIN_WRAP(CopyWindow, winCopyWindowMultiWindow); } /* * MoveWindow - See Porting Layer Definition - p. 42 */ void winMoveWindowMultiWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG ErrorF("MoveWindowMultiWindow to (%d, %d)\n", x, y); #endif WIN_UNWRAP(MoveWindow); (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); WIN_WRAP(MoveWindow, winMoveWindowMultiWindow); } /* * ResizeWindow - See Porting Layer Definition - p. 42 */ void winResizeWindowMultiWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGWINDOWING_DEBUG ErrorF("ResizeWindowMultiWindow to (%d, %d) - %dx%d\n", x, y, w, h); #endif WIN_UNWRAP(ResizeWindow); (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); WIN_WRAP(ResizeWindow, winResizeWindowMultiWindow); } /* * winAdjustXWindow * * Move and resize X window with respect to corresponding Windows window. * This is called from WM_MOVE/WM_SIZE handlers when the user performs * any windowing operation (move, resize, minimize, maximize, restore). * * The functionality is the inverse of winPositionWindowMultiWindow, which * adjusts Windows window with respect to X window. */ int winAdjustXWindow(WindowPtr pWin, HWND hwnd) { RECT rcDraw; /* Rect made from pWin->drawable to be adjusted */ RECT rcWin; /* The source: WindowRect from hwnd */ DrawablePtr pDraw; XID vlist[4]; LONG dX, dY, dW, dH, x, y; DWORD dwStyle, dwExStyle; #define WIDTH(rc) (rc.right - rc.left) #define HEIGHT(rc) (rc.bottom - rc.top) #if CYGWINDOWING_DEBUG ErrorF("winAdjustXWindow\n"); #endif if (IsIconic(hwnd)) { #if CYGWINDOWING_DEBUG ErrorF("\timmediately return because the window is iconized\n"); #endif /* * If the Windows window is minimized, its WindowRect has * meaningless values so we don't adjust X window to it. */ vlist[0] = 0; vlist[1] = 0; return ConfigureWindow(pWin, CWX | CWY, vlist, wClient(pWin)); } pDraw = &pWin->drawable; /* Calculate the window rect from the drawable */ x = pDraw->x + GetSystemMetrics(SM_XVIRTUALSCREEN); y = pDraw->y + GetSystemMetrics(SM_YVIRTUALSCREEN); SetRect(&rcDraw, x, y, x + pDraw->width, y + pDraw->height); #ifdef CYGMULTIWINDOW_DEBUG winDebug("\tDrawable extend {%d, %d, %d, %d}, {%d, %d}\n", (int)rcDraw.left, (int)rcDraw.top, (int)rcDraw.right, (int)rcDraw.bottom, (int)(rcDraw.right - rcDraw.left), (int)(rcDraw.bottom - rcDraw.top)); #endif dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); #ifdef CYGMULTIWINDOW_DEBUG winDebug("\tWindowStyle: %08x %08x\n", (unsigned int)dwStyle, (unsigned int)dwExStyle); #endif AdjustWindowRectEx(&rcDraw, dwStyle, FALSE, dwExStyle); /* The source of adjust */ GetWindowRect(hwnd, &rcWin); #ifdef CYGMULTIWINDOW_DEBUG winDebug("\tWindow extend {%d, %d, %d, %d}, {%d, %d}\n", (int)rcWin.left, (int)rcWin.top, (int)rcWin.right, (int)rcWin.bottom, (int)(rcWin.right - rcWin.left), (int)(rcWin.bottom - rcWin.top)); winDebug("\tDraw extend {%d, %d, %d, %d}, {%d, %d}\n", (int)rcDraw.left, (int)rcDraw.top, (int)rcDraw.right, (int)rcDraw.bottom, (int)(rcDraw.right - rcDraw.left), (int)(rcDraw.bottom - rcDraw.top)); #endif if (EqualRect(&rcDraw, &rcWin)) { /* Bail if no adjust is needed */ #if CYGWINDOWING_DEBUG ErrorF("\treturn because already adjusted\n"); #endif return 0; } /* Calculate delta values */ dX = rcWin.left - rcDraw.left; dY = rcWin.top - rcDraw.top; dW = WIDTH(rcWin) - WIDTH(rcDraw); dH = HEIGHT(rcWin) - HEIGHT(rcDraw); /* * Adjust. * We may only need to move (vlist[0] and [1]), or only resize * ([2] and [3]) but currently we set all the parameters and leave * the decision to ConfigureWindow. The reason is code simplicity. */ vlist[0] = pDraw->x + dX - wBorderWidth(pWin); vlist[1] = pDraw->y + dY - wBorderWidth(pWin); vlist[2] = pDraw->width + dW; vlist[3] = pDraw->height + dH; #if CYGWINDOWING_DEBUG ErrorF("\tConfigureWindow to (%u, %u) - %ux%u\n", (unsigned int)vlist[0], (unsigned int)vlist[1], (unsigned int)vlist[2], (unsigned int)vlist[3]); #endif return ConfigureWindow(pWin, CWX | CWY | CWWidth | CWHeight, vlist, wClient(pWin)); #undef WIDTH #undef HEIGHT } /* Helper function for creating a DIB to back a pixmap */ static HBITMAP winCreateDIB(ScreenPtr pScreen, int width, int height, int bpp, void **ppvBits, BITMAPINFOHEADER **ppbmih) { winScreenPriv(pScreen); BITMAPV4HEADER *pbmih = NULL; HBITMAP hBitmap = NULL; /* Allocate bitmap info header */ pbmih = malloc(sizeof(BITMAPV4HEADER) + 256 * sizeof(RGBQUAD)); if (pbmih == NULL) { ErrorF("winCreateDIB: malloc() failed\n"); return NULL; } memset(pbmih, 0, sizeof(BITMAPV4HEADER) + 256 * sizeof(RGBQUAD)); /* Describe bitmap to be created */ pbmih->bV4Size = sizeof(BITMAPV4HEADER); pbmih->bV4Width = width; pbmih->bV4Height = -height; /* top-down bitmap */ pbmih->bV4Planes = 1; pbmih->bV4BitCount = bpp; if (bpp == 1) { RGBQUAD *bmiColors = (RGBQUAD *)((char *)pbmih + sizeof(BITMAPV4HEADER)); pbmih->bV4V4Compression = BI_RGB; bmiColors[1].rgbBlue = 255; bmiColors[1].rgbGreen = 255; bmiColors[1].rgbRed = 255; } else if (bpp == 8) { pbmih->bV4V4Compression = BI_RGB; pbmih->bV4ClrUsed = 0; } else if (bpp == 16) { pbmih->bV4V4Compression = BI_RGB; pbmih->bV4ClrUsed = 0; } else if (bpp == 32) { pbmih->bV4V4Compression = BI_BITFIELDS; pbmih->bV4RedMask = pScreenPriv->dwRedMask; pbmih->bV4GreenMask = pScreenPriv->dwGreenMask; pbmih->bV4BlueMask = pScreenPriv->dwBlueMask; pbmih->bV4AlphaMask = 0; } else { ErrorF("winCreateDIB: %d bpp unhandled\n", bpp); } /* Create a DIB with a bit pointer */ hBitmap = CreateDIBSection(NULL, (BITMAPINFO *) pbmih, DIB_RGB_COLORS, ppvBits, NULL, 0); if (hBitmap == NULL) { ErrorF("winCreateDIB: CreateDIBSection() failed\n"); return NULL; } /* Store the address of the BMIH in the ppbmih parameter */ *ppbmih = (BITMAPINFOHEADER *)pbmih; winDebug("winCreateDIB: HBITMAP %p pBMIH %p pBits %p\n", hBitmap, pbmih, *ppvBits); return hBitmap; } /* * CreatePixmap - See Porting Layer Definition */ PixmapPtr winCreatePixmapMultiwindow(ScreenPtr pScreen, int width, int height, int depth, unsigned usage_hint) { winPrivPixmapPtr pPixmapPriv = NULL; PixmapPtr pPixmap = NULL; int bpp, paddedwidth; /* allocate Pixmap header and privates */ pPixmap = AllocatePixmap(pScreen, 0); if (!pPixmap) return NullPixmap; bpp = BitsPerPixel(depth); /* DIBs have 4-byte aligned rows paddedwidth is the width in bytes, padded to align i.e. round up the number of bits used by a row so it is a multiple of 32, then convert to bytes */ paddedwidth = (((bpp * width) + 31) & ~31)/8; /* setup Pixmap header */ pPixmap->drawable.type = DRAWABLE_PIXMAP; pPixmap->drawable.class = 0; pPixmap->drawable.pScreen = pScreen; pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = bpp; pPixmap->drawable.id = 0; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->devKind = paddedwidth; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = NULL; // later set to pbBits pPixmap->primary_pixmap = NULL; #ifdef COMPOSITE pPixmap->screen_x = 0; pPixmap->screen_y = 0; #endif pPixmap->usage_hint = usage_hint; /* Check for zero width or height pixmaps */ if (width == 0 || height == 0) { /* DIBs with a dimension of 0 aren't permitted, so don't try to allocate a DIB, just set fields and return */ return pPixmap; } /* Initialize pixmap privates */ pPixmapPriv = winGetPixmapPriv(pPixmap); pPixmapPriv->hBitmap = NULL; pPixmapPriv->pbBits = NULL; pPixmapPriv->pbmih = NULL; /* Create a DIB for the pixmap */ pPixmapPriv->hBitmap = winCreateDIB(pScreen, width, height, bpp, &pPixmapPriv->pbBits, &pPixmapPriv->pbmih); pPixmapPriv->owned = TRUE; winDebug("winCreatePixmap: pPixmap %p HBITMAP %p pBMIH %p pBits %p\n", pPixmap, pPixmapPriv->hBitmap, pPixmapPriv->pbmih, pPixmapPriv->pbBits); /* XXX: so why do we need this in privates ??? */ pPixmap->devPrivate.ptr = pPixmapPriv->pbBits; return pPixmap; } /* * DestroyPixmap - See Porting Layer Definition */ Bool winDestroyPixmapMultiwindow(PixmapPtr pPixmap) { winPrivPixmapPtr pPixmapPriv = NULL; /* Bail early if there is not a pixmap to destroy */ if (pPixmap == NULL) { return TRUE; } /* Decrement reference count, return if nonzero */ --pPixmap->refcnt; if (pPixmap->refcnt != 0) return TRUE; winDebug("winDestroyPixmap: pPixmap %p\n", pPixmap); /* Get a handle to the pixmap privates */ pPixmapPriv = winGetPixmapPriv(pPixmap); /* Nothing to do if we don't own the DIB */ if (!pPixmapPriv->owned) return TRUE; /* Free GDI bitmap */ if (pPixmapPriv->hBitmap) DeleteObject(pPixmapPriv->hBitmap); /* Free the bitmap info header memory */ free(pPixmapPriv->pbmih); pPixmapPriv->pbmih = NULL; /* Free the pixmap memory */ free(pPixmap); pPixmap = NULL; return TRUE; } /* * ModifyPixmapHeader - See Porting Layer Definition */ Bool winModifyPixmapHeaderMultiwindow(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { int i; winPrivPixmapPtr pPixmapPriv = winGetPixmapPriv(pPixmap); Bool fResult; /* reinitialize everything */ pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = bitsPerPixel; pPixmap->drawable.id = 0; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->devKind = devKind; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = pPixData; pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; /* This can be used for some out-of-order initialization on the screen pixmap, which is the only case we can properly support. */ /* Look for which screen this pixmap corresponds to */ for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; if (pScreenInfo->pfb == pPixData) { /* and initialize pixmap privates from screen privates */ pPixmapPriv->hBitmap = pScreenPriv->hbmpShadow; pPixmapPriv->pbBits = pScreenInfo->pfb; pPixmapPriv->pbmih = pScreenPriv->pbmih; /* mark these not to get released by DestroyPixmap */ pPixmapPriv->owned = FALSE; return TRUE; } } /* Otherwise, since creating a DIBSection from arbitrary memory is not * possible, fallback to normal. If needed, we can create a DIBSection with * a copy of the bits later (see comment about a potential slow-path in * winBltExposedWindowRegionShadowGDI()). */ pPixmapPriv->hBitmap = 0; pPixmapPriv->pbBits = 0; pPixmapPriv->pbmih = 0; pPixmapPriv->owned = FALSE; winDebug("winModifyPixmapHeaderMultiwindow: falling back\n"); { ScreenPtr pScreen = pPixmap->drawable.pScreen; winScreenPriv(pScreen); WIN_UNWRAP(ModifyPixmapHeader); fResult = (*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData); WIN_WRAP(ModifyPixmapHeader, winModifyPixmapHeaderMultiwindow); } return fResult; } xorg-server-21.1.16/hw/xwin/winmultiwindowwm.c0000644000175000017500000017752214757411105015064 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. *Copyright (C) Colin Harrison 2005-2009 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Kensuke Matsuzaki * Colin Harrison */ /* X headers */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #ifdef __CYGWIN__ #include #endif #include #include #define HANDLE void * #include #undef HANDLE #include #include #include #include #include #include /* Local headers */ #include "X11/Xdefs.h" // for Bool type #include "winwindow.h" #include "winprefs.h" #include "window.h" #include "pixmapstr.h" #include "windowstr.h" #include "winglobals.h" #include "windisplay.h" #include "winmultiwindowicons.h" #include "winauth.h" /* We need the native HWND atom for intWM, so for consistency use the same name as extWM does */ #define WINDOWSWM_NATIVE_HWND "_WINDOWSWM_NATIVE_HWND" #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 255 #endif extern void winDebug(const char *format, ...); extern void winReshapeMultiWindow(WindowPtr pWin); extern void winUpdateRgnMultiWindow(WindowPtr pWin); #ifndef CYGDEBUG #define CYGDEBUG NO #endif /* * Constant defines */ #define WIN_CONNECT_RETRIES 5 #define WIN_CONNECT_DELAY 5 #ifdef HAS_DEVWINDOWS #define WIN_MSG_QUEUE_FNAME "/dev/windows" #endif /* * Local structures */ typedef struct _WMMsgNodeRec { winWMMessageRec msg; struct _WMMsgNodeRec *pNext; } WMMsgNodeRec, *WMMsgNodePtr; typedef struct _WMMsgQueueRec { struct _WMMsgNodeRec *pHead; struct _WMMsgNodeRec *pTail; pthread_mutex_t pmMutex; pthread_cond_t pcNotEmpty; } WMMsgQueueRec, *WMMsgQueuePtr; typedef struct _WMInfo { xcb_connection_t *conn; WMMsgQueueRec wmMsgQueue; xcb_atom_t atmWmProtos; xcb_atom_t atmWmDelete; xcb_atom_t atmWmTakeFocus; xcb_atom_t atmPrivMap; xcb_atom_t atmUtf8String; xcb_atom_t atmNetWmName; xcb_atom_t atmCurrentDesktop; xcb_atom_t atmNumberDesktops; xcb_atom_t atmDesktopNames; xcb_ewmh_connection_t ewmh; Bool fCompositeWM; } WMInfoRec, *WMInfoPtr; typedef struct _WMProcArgRec { DWORD dwScreen; WMInfoPtr pWMInfo; pthread_mutex_t *ppmServerStarted; } WMProcArgRec, *WMProcArgPtr; typedef struct _XMsgProcArgRec { xcb_connection_t *conn; DWORD dwScreen; WMInfoPtr pWMInfo; pthread_mutex_t *ppmServerStarted; HWND hwndScreen; } XMsgProcArgRec, *XMsgProcArgPtr; /* * Prototypes for local functions */ static void PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode); static WMMsgNodePtr PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo); static Bool InitQueue(WMMsgQueuePtr pQueue); static void GetWindowName(WMInfoPtr pWMInfo, xcb_window_t iWin, char **ppWindowName); static void SendXMessage(xcb_connection_t *conn, xcb_window_t iWin, xcb_atom_t atmType, long nData); static void UpdateName(WMInfoPtr pWMInfo, xcb_window_t iWindow); static void *winMultiWindowWMProc(void *pArg); static void *winMultiWindowXMsgProc(void *pArg); static void winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg); #if 0 static void PreserveWin32Stack(WMInfoPtr pWMInfo, xcb_window_t iWindow, UINT direction); #endif static Bool CheckAnotherWindowManager(xcb_connection_t *conn, DWORD dwScreen); static void winApplyHints(WMInfoPtr pWMInfo, xcb_window_t iWindow, HWND hWnd, HWND * zstyle); void winUpdateWindowPosition(HWND hWnd, HWND * zstyle); /* * Local globals */ static Bool g_shutdown = FALSE; /* * Translate msg id to text, for debug purposes */ #if CYGMULTIWINDOW_DEBUG static const char * MessageName(winWMMessagePtr msg) { switch (msg->msg) { case WM_WM_MOVE: return "WM_WM_MOVE"; break; case WM_WM_SIZE: return "WM_WM_SIZE"; break; case WM_WM_RAISE: return "WM_WM_RAISE"; break; case WM_WM_LOWER: return "WM_WM_LOWER"; break; case WM_WM_UNMAP: return "WM_WM_UNMAP"; break; case WM_WM_KILL: return "WM_WM_KILL"; break; case WM_WM_ACTIVATE: return "WM_WM_ACTIVATE"; break; case WM_WM_NAME_EVENT: return "WM_WM_NAME_EVENT"; break; case WM_WM_ICON_EVENT: return "WM_WM_ICON_EVENT"; break; case WM_WM_CHANGE_STATE: return "WM_WM_CHANGE_STATE"; break; case WM_WM_MAP_UNMANAGED: return "WM_WM_MAP_UNMANAGED"; break; case WM_WM_MAP_MANAGED: return "WM_WM_MAP_MANAGED"; break; case WM_WM_HINTS_EVENT: return "WM_WM_HINTS_EVENT"; break; default: return "Unknown Message"; break; } } #endif /* * PushMessage - Push a message onto the queue */ static void PushMessage(WMMsgQueuePtr pQueue, WMMsgNodePtr pNode) { /* Lock the queue mutex */ pthread_mutex_lock(&pQueue->pmMutex); pNode->pNext = NULL; if (pQueue->pTail != NULL) { pQueue->pTail->pNext = pNode; } pQueue->pTail = pNode; if (pQueue->pHead == NULL) { pQueue->pHead = pNode; } /* Release the queue mutex */ pthread_mutex_unlock(&pQueue->pmMutex); /* Signal that the queue is not empty */ pthread_cond_signal(&pQueue->pcNotEmpty); } /* * PopMessage - Pop a message from the queue */ static WMMsgNodePtr PopMessage(WMMsgQueuePtr pQueue, WMInfoPtr pWMInfo) { WMMsgNodePtr pNode; /* Lock the queue mutex */ pthread_mutex_lock(&pQueue->pmMutex); /* Wait for --- */ while (pQueue->pHead == NULL) { pthread_cond_wait(&pQueue->pcNotEmpty, &pQueue->pmMutex); } pNode = pQueue->pHead; if (pQueue->pHead != NULL) { pQueue->pHead = pQueue->pHead->pNext; } if (pQueue->pTail == pNode) { pQueue->pTail = NULL; } /* Release the queue mutex */ pthread_mutex_unlock(&pQueue->pmMutex); return pNode; } #if 0 /* * HaveMessage - */ static Bool HaveMessage(WMMsgQueuePtr pQueue, UINT msg, xcb_window_t iWindow) { WMMsgNodePtr pNode; for (pNode = pQueue->pHead; pNode != NULL; pNode = pNode->pNext) { if (pNode->msg.msg == msg && pNode->msg.iWindow == iWindow) return True; } return False; } #endif /* * InitQueue - Initialize the Window Manager message queue */ static Bool InitQueue(WMMsgQueuePtr pQueue) { /* Check if the pQueue pointer is NULL */ if (pQueue == NULL) { ErrorF("InitQueue - pQueue is NULL. Exiting.\n"); return FALSE; } /* Set the head and tail to NULL */ pQueue->pHead = NULL; pQueue->pTail = NULL; winDebug("InitQueue - Calling pthread_mutex_init\n"); /* Create synchronization objects */ pthread_mutex_init(&pQueue->pmMutex, NULL); winDebug("InitQueue - pthread_mutex_init returned\n"); winDebug("InitQueue - Calling pthread_cond_init\n"); pthread_cond_init(&pQueue->pcNotEmpty, NULL); winDebug("InitQueue - pthread_cond_init returned\n"); return TRUE; } static char * Xutf8TextPropertyToString(WMInfoPtr pWMInfo, xcb_icccm_get_text_property_reply_t *xtp) { char *pszReturnData; if ((xtp->encoding == XCB_ATOM_STRING) || // Latin1 ISO 8859-1 (xtp->encoding == pWMInfo->atmUtf8String)) { // UTF-8 ISO 10646 pszReturnData = strndup(xtp->name, xtp->name_len); } else { // Converting from COMPOUND_TEXT to UTF-8 properly is complex to // implement, and not very much use unless you have an old // application which isn't UTF-8 aware. ErrorF("Xutf8TextPropertyToString: text encoding %d is not implemented\n", xtp->encoding); pszReturnData = strdup(""); } return pszReturnData; } /* * GetWindowName - Retrieve the title of an X Window */ static void GetWindowName(WMInfoPtr pWMInfo, xcb_window_t iWin, char **ppWindowName) { xcb_connection_t *conn = pWMInfo->conn; char *pszWindowName = NULL; #if CYGMULTIWINDOW_DEBUG ErrorF("GetWindowName\n"); #endif /* Try to get window name from _NET_WM_NAME */ { xcb_get_property_cookie_t cookie; xcb_get_property_reply_t *reply; cookie = xcb_get_property(pWMInfo->conn, FALSE, iWin, pWMInfo->atmNetWmName, XCB_GET_PROPERTY_TYPE_ANY, 0, INT_MAX); reply = xcb_get_property_reply(pWMInfo->conn, cookie, NULL); if (reply && (reply->type != XCB_NONE)) { pszWindowName = strndup(xcb_get_property_value(reply), xcb_get_property_value_length(reply)); free(reply); } } /* Otherwise, try to get window name from WM_NAME */ if (!pszWindowName) { xcb_get_property_cookie_t cookie; xcb_icccm_get_text_property_reply_t reply; cookie = xcb_icccm_get_wm_name(conn, iWin); if (!xcb_icccm_get_wm_name_reply(conn, cookie, &reply, NULL)) { ErrorF("GetWindowName - xcb_icccm_get_wm_name_reply failed. No name.\n"); *ppWindowName = NULL; return; } pszWindowName = Xutf8TextPropertyToString(pWMInfo, &reply); xcb_icccm_get_text_property_reply_wipe(&reply); } /* return the window name, unless... */ *ppWindowName = pszWindowName; if (g_fHostInTitle) { xcb_get_property_cookie_t cookie; xcb_icccm_get_text_property_reply_t reply; /* Try to get client machine name */ cookie = xcb_icccm_get_wm_client_machine(conn, iWin); if (xcb_icccm_get_wm_client_machine_reply(conn, cookie, &reply, NULL)) { char *pszClientMachine; char *pszClientHostname; char *dot; char hostname[HOST_NAME_MAX + 1]; pszClientMachine = Xutf8TextPropertyToString(pWMInfo, &reply); xcb_icccm_get_text_property_reply_wipe(&reply); /* If client machine name looks like a FQDN, find the hostname */ pszClientHostname = strdup(pszClientMachine); dot = strchr(pszClientHostname, '.'); if (dot) *dot = '\0'; /* If we have a client machine hostname and it's not the local hostname and it's not already in the window title... */ if (strlen(pszClientHostname) && !gethostname(hostname, HOST_NAME_MAX + 1) && strcmp(hostname, pszClientHostname) && (strstr(pszWindowName, pszClientHostname) == 0)) { /* ... add '@' to end of window name */ *ppWindowName = malloc(strlen(pszWindowName) + strlen(pszClientMachine) + 2); strcpy(*ppWindowName, pszWindowName); strcat(*ppWindowName, "@"); strcat(*ppWindowName, pszClientMachine); free(pszWindowName); } free(pszClientMachine); free(pszClientHostname); } } } /* * Does the client support the specified WM_PROTOCOLS protocol? */ static Bool IsWmProtocolAvailable(WMInfoPtr pWMInfo, xcb_window_t iWindow, xcb_atom_t atmProtocol) { int i, found = 0; xcb_get_property_cookie_t cookie; xcb_icccm_get_wm_protocols_reply_t reply; xcb_connection_t *conn = pWMInfo->conn; cookie = xcb_icccm_get_wm_protocols(conn, iWindow, pWMInfo->ewmh.WM_PROTOCOLS); if (xcb_icccm_get_wm_protocols_reply(conn, cookie, &reply, NULL)) { for (i = 0; i < reply.atoms_len; ++i) if (reply.atoms[i] == atmProtocol) { ++found; break; } xcb_icccm_get_wm_protocols_reply_wipe(&reply); } return found > 0; } /* * Send a message to the X server from the WM thread */ static void SendXMessage(xcb_connection_t *conn, xcb_window_t iWin, xcb_atom_t atmType, long nData) { xcb_client_message_event_t e; /* Prepare the X event structure */ memset(&e, 0, sizeof(e)); e.response_type = XCB_CLIENT_MESSAGE; e.window = iWin; e.type = atmType; e.format = 32; e.data.data32[0] = nData; e.data.data32[1] = XCB_CURRENT_TIME; /* Send the event to X */ xcb_send_event(conn, FALSE, iWin, XCB_EVENT_MASK_NO_EVENT, (const char *)&e); } /* * See if we can get the stored HWND for this window... */ static HWND getHwnd(WMInfoPtr pWMInfo, xcb_window_t iWindow) { HWND hWnd = NULL; xcb_get_property_cookie_t cookie; xcb_get_property_reply_t *reply; cookie = xcb_get_property(pWMInfo->conn, FALSE, iWindow, pWMInfo->atmPrivMap, XCB_ATOM_INTEGER, 0L, sizeof(HWND)/4L); reply = xcb_get_property_reply(pWMInfo->conn, cookie, NULL); if (reply) { int length = xcb_get_property_value_length(reply); HWND *value = xcb_get_property_value(reply); if (value && (length == sizeof(HWND))) { hWnd = *value; } free(reply); } /* Some sanity checks */ if (!hWnd) return NULL; if (!IsWindow(hWnd)) return NULL; return hWnd; } /* * Helper function to check for override-redirect */ static Bool IsOverrideRedirect(xcb_connection_t *conn, xcb_window_t iWin) { Bool result = FALSE; xcb_get_window_attributes_reply_t *reply; xcb_get_window_attributes_cookie_t cookie; cookie = xcb_get_window_attributes(conn, iWin); reply = xcb_get_window_attributes_reply(conn, cookie, NULL); if (reply) { result = (reply->override_redirect != 0); free(reply); } else { ErrorF("IsOverrideRedirect: Failed to get window attributes\n"); } return result; } /* * Helper function to get class and window names */ static void GetClassNames(WMInfoPtr pWMInfo, xcb_window_t iWindow, char **res_name, char **res_class, char **window_name) { xcb_get_property_cookie_t cookie1; xcb_icccm_get_wm_class_reply_t reply1; xcb_get_property_cookie_t cookie2; xcb_icccm_get_text_property_reply_t reply2; cookie1 = xcb_icccm_get_wm_class(pWMInfo->conn, iWindow); if (xcb_icccm_get_wm_class_reply(pWMInfo->conn, cookie1, &reply1, NULL)) { *res_name = strdup(reply1.instance_name); *res_class = strdup(reply1.class_name); xcb_icccm_get_wm_class_reply_wipe(&reply1); } else { *res_name = strdup(""); *res_class = strdup(""); } cookie2 = xcb_icccm_get_wm_name(pWMInfo->conn, iWindow); if (xcb_icccm_get_wm_name_reply(pWMInfo->conn, cookie2, &reply2, NULL)) { *window_name = strndup(reply2.name, reply2.name_len); xcb_icccm_get_text_property_reply_wipe(&reply2); } else { *window_name = strdup(""); } } /* * Updates the name of a HWND according to its X WM_NAME property */ static void UpdateName(WMInfoPtr pWMInfo, xcb_window_t iWindow) { HWND hWnd; hWnd = getHwnd(pWMInfo, iWindow); if (!hWnd) return; /* If window isn't override-redirect */ if (!IsOverrideRedirect(pWMInfo->conn, iWindow)) { char *pszWindowName; /* Get the X windows window name */ GetWindowName(pWMInfo, iWindow, &pszWindowName); if (pszWindowName) { /* Convert from UTF-8 to wide char */ int iLen = MultiByteToWideChar(CP_UTF8, 0, pszWindowName, -1, NULL, 0); wchar_t *pwszWideWindowName = malloc(sizeof(wchar_t)*(iLen + 1)); MultiByteToWideChar(CP_UTF8, 0, pszWindowName, -1, pwszWideWindowName, iLen); /* Set the Windows window name */ SetWindowTextW(hWnd, pwszWideWindowName); free(pwszWideWindowName); free(pszWindowName); } } } /* * Updates the icon of a HWND according to its X icon properties */ static void UpdateIcon(WMInfoPtr pWMInfo, xcb_window_t iWindow) { HWND hWnd; HICON hIconNew = NULL; hWnd = getHwnd(pWMInfo, iWindow); if (!hWnd) return; /* If window isn't override-redirect */ if (!IsOverrideRedirect(pWMInfo->conn, iWindow)) { char *window_name = 0; char *res_name = 0; char *res_class = 0; GetClassNames(pWMInfo, iWindow, &res_name, &res_class, &window_name); hIconNew = winOverrideIcon(res_name, res_class, window_name); free(res_name); free(res_class); free(window_name); winUpdateIcon(hWnd, pWMInfo->conn, iWindow, hIconNew); } } /* * Updates the style of a HWND according to its X style properties */ static void UpdateStyle(WMInfoPtr pWMInfo, xcb_window_t iWindow) { HWND hWnd; HWND zstyle = HWND_NOTOPMOST; UINT flags; hWnd = getHwnd(pWMInfo, iWindow); if (!hWnd) return; /* Determine the Window style, which determines borders and clipping region... */ winApplyHints(pWMInfo, iWindow, hWnd, &zstyle); winUpdateWindowPosition(hWnd, &zstyle); /* Apply the updated window style, without changing its show or activation state */ flags = SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE; if (zstyle == HWND_NOTOPMOST) flags |= SWP_NOZORDER | SWP_NOOWNERZORDER; SetWindowPos(hWnd, NULL, 0, 0, 0, 0, flags); /* Use the WS_EX_TOOLWINDOW style to remove window from Alt-Tab window switcher According to MSDN, this is supposed to remove the window from the taskbar as well, if we SW_HIDE before changing the style followed by SW_SHOW afterwards. But that doesn't seem to work reliably, and causes the window to flicker, so use the iTaskbarList interface to tell the taskbar to show or hide this window. */ winShowWindowOnTaskbar(hWnd, (GetWindowLongPtr(hWnd, GWL_EXSTYLE) & WS_EX_APPWINDOW) ? TRUE : FALSE); } /* * Updates the state of a HWND * (only minimization supported at the moment) */ static void UpdateState(WMInfoPtr pWMInfo, xcb_window_t iWindow) { HWND hWnd; winDebug("UpdateState: iWindow 0x%08x\n", (int)iWindow); hWnd = getHwnd(pWMInfo, iWindow); if (!hWnd) return; ShowWindow(hWnd, SW_MINIMIZE); } #if 0 /* * Fix up any differences between the X11 and Win32 window stacks * starting at the window passed in */ static void PreserveWin32Stack(WMInfoPtr pWMInfo, xcb_window_t iWindow, UINT direction) { HWND hWnd; DWORD myWinProcID, winProcID; xcb_window_t xWindow; WINDOWPLACEMENT wndPlace; hWnd = getHwnd(pWMInfo, iWindow); if (!hWnd) return; GetWindowThreadProcessId(hWnd, &myWinProcID); hWnd = GetNextWindow(hWnd, direction); while (hWnd) { GetWindowThreadProcessId(hWnd, &winProcID); if (winProcID == myWinProcID) { wndPlace.length = sizeof(WINDOWPLACEMENT); GetWindowPlacement(hWnd, &wndPlace); if (!(wndPlace.showCmd == SW_HIDE || wndPlace.showCmd == SW_MINIMIZE)) { xWindow = (Window) GetProp(hWnd, WIN_WID_PROP); if (xWindow) { if (direction == GW_HWNDPREV) XRaiseWindow(pWMInfo->pDisplay, xWindow); else XLowerWindow(pWMInfo->pDisplay, xWindow); } } } hWnd = GetNextWindow(hWnd, direction); } } #endif /* PreserveWin32Stack */ /* * winMultiWindowWMProc */ static void * winMultiWindowWMProc(void *pArg) { WMProcArgPtr pProcArg = (WMProcArgPtr) pArg; WMInfoPtr pWMInfo = pProcArg->pWMInfo; /* Initialize the Window Manager */ winInitMultiWindowWM(pWMInfo, pProcArg); #if CYGMULTIWINDOW_DEBUG ErrorF("winMultiWindowWMProc ()\n"); #endif /* Loop until we explicitly break out */ for (;;) { WMMsgNodePtr pNode; /* Pop a message off of our queue */ pNode = PopMessage(&pWMInfo->wmMsgQueue, pWMInfo); if (pNode == NULL) { /* Bail if PopMessage returns without a message */ /* NOTE: Remember that PopMessage is a blocking function. */ ErrorF("winMultiWindowWMProc - Queue is Empty? Exiting.\n"); pthread_exit(NULL); } #if CYGMULTIWINDOW_DEBUG ErrorF("winMultiWindowWMProc - MSG: %s (%d) ID: %d\n", MessageName(&(pNode->msg)), (int)pNode->msg.msg, (int)pNode->msg.dwID); #endif /* Branch on the message type */ switch (pNode->msg.msg) { #if 0 case WM_WM_MOVE: break; case WM_WM_SIZE: break; #endif case WM_WM_RAISE: /* Raise the window */ { const static uint32_t values[] = { XCB_STACK_MODE_ABOVE }; xcb_configure_window(pWMInfo->conn, pNode->msg.iWindow, XCB_CONFIG_WINDOW_STACK_MODE, values); } #if 0 PreserveWin32Stack(pWMInfo, pNode->msg.iWindow, GW_HWNDPREV); #endif break; case WM_WM_LOWER: /* Lower the window */ { const static uint32_t values[] = { XCB_STACK_MODE_BELOW }; xcb_configure_window(pWMInfo->conn, pNode->msg.iWindow, XCB_CONFIG_WINDOW_STACK_MODE, values); } break; case WM_WM_MAP_UNMANAGED: /* Put a note as to the HWND associated with this Window */ xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, pNode->msg.iWindow, pWMInfo->atmPrivMap, XCB_ATOM_INTEGER, 32, sizeof(HWND)/4, &(pNode->msg.hwndWindow)); break; case WM_WM_MAP_MANAGED: /* Put a note as to the HWND associated with this Window */ xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, pNode->msg.iWindow, pWMInfo->atmPrivMap, XCB_ATOM_INTEGER, 32, sizeof(HWND)/4, &(pNode->msg.hwndWindow)); UpdateName(pWMInfo, pNode->msg.iWindow); UpdateIcon(pWMInfo, pNode->msg.iWindow); UpdateStyle(pWMInfo, pNode->msg.iWindow); /* Reshape */ { WindowPtr pWin = GetProp(pNode->msg.hwndWindow, WIN_WINDOW_PROP); if (pWin) { winReshapeMultiWindow(pWin); winUpdateRgnMultiWindow(pWin); } } break; case WM_WM_UNMAP: /* Unmap the window */ xcb_unmap_window(pWMInfo->conn, pNode->msg.iWindow); break; case WM_WM_KILL: { /* --- */ if (IsWmProtocolAvailable(pWMInfo, pNode->msg.iWindow, pWMInfo->atmWmDelete)) SendXMessage(pWMInfo->conn, pNode->msg.iWindow, pWMInfo->atmWmProtos, pWMInfo->atmWmDelete); else xcb_kill_client(pWMInfo->conn, pNode->msg.iWindow); } break; case WM_WM_ACTIVATE: /* Set the input focus */ /* ICCCM 4.1.7 is pretty opaque, but it appears that the rules are actually quite simple: -- the WM_HINTS input field determines whether the WM should call XSetInputFocus() -- independently, the WM_TAKE_FOCUS protocol determines whether the WM should send a WM_TAKE_FOCUS ClientMessage. */ { Bool neverFocus = FALSE; xcb_get_property_cookie_t cookie; xcb_icccm_wm_hints_t hints; cookie = xcb_icccm_get_wm_hints(pWMInfo->conn, pNode->msg.iWindow); if (xcb_icccm_get_wm_hints_reply(pWMInfo->conn, cookie, &hints, NULL)) { if (hints.flags & XCB_ICCCM_WM_HINT_INPUT) neverFocus = !hints.input; } if (!neverFocus) xcb_set_input_focus(pWMInfo->conn, XCB_INPUT_FOCUS_POINTER_ROOT, pNode->msg.iWindow, XCB_CURRENT_TIME); if (IsWmProtocolAvailable(pWMInfo, pNode->msg.iWindow, pWMInfo->atmWmTakeFocus)) SendXMessage(pWMInfo->conn, pNode->msg.iWindow, pWMInfo->atmWmProtos, pWMInfo->atmWmTakeFocus); } break; case WM_WM_NAME_EVENT: UpdateName(pWMInfo, pNode->msg.iWindow); break; case WM_WM_ICON_EVENT: UpdateIcon(pWMInfo, pNode->msg.iWindow); break; case WM_WM_HINTS_EVENT: { /* Don't do anything if this is an override-redirect window */ if (IsOverrideRedirect(pWMInfo->conn, pNode->msg.iWindow)) break; UpdateStyle(pWMInfo, pNode->msg.iWindow); } break; case WM_WM_CHANGE_STATE: UpdateState(pWMInfo, pNode->msg.iWindow); break; default: ErrorF("winMultiWindowWMProc - Unknown Message. Exiting.\n"); pthread_exit(NULL); break; } /* Free the retrieved message */ free(pNode); /* Flush any pending events on our display */ xcb_flush(pWMInfo->conn); /* This is just laziness rather than making sure we used _checked everywhere */ { xcb_generic_event_t *event = xcb_poll_for_event(pWMInfo->conn); if (event) { if ((event->response_type & ~0x80) == 0) { xcb_generic_error_t *err = (xcb_generic_error_t *)event; ErrorF("winMultiWindowWMProc - Error code: %i, ID: 0x%08x, " "Major opcode: %i, Minor opcode: %i\n", err->error_code, err->resource_id, err->major_code, err->minor_code); } } } /* I/O errors etc. */ { int e = xcb_connection_has_error(pWMInfo->conn); if (e) { ErrorF("winMultiWindowWMProc - Fatal error %d on xcb connection\n", e); break; } } } /* Free the condition variable */ pthread_cond_destroy(&pWMInfo->wmMsgQueue.pcNotEmpty); /* Free the mutex variable */ pthread_mutex_destroy(&pWMInfo->wmMsgQueue.pmMutex); /* Free the passed-in argument */ free(pProcArg); #if CYGMULTIWINDOW_DEBUG ErrorF("-winMultiWindowWMProc ()\n"); #endif return NULL; } static xcb_atom_t intern_atom(xcb_connection_t *conn, const char *atomName) { xcb_intern_atom_reply_t *atom_reply; xcb_intern_atom_cookie_t atom_cookie; xcb_atom_t atom = XCB_ATOM_NONE; atom_cookie = xcb_intern_atom(conn, 0, strlen(atomName), atomName); atom_reply = xcb_intern_atom_reply(conn, atom_cookie, NULL); if (atom_reply) { atom = atom_reply->atom; free(atom_reply); } return atom; } /* * X message procedure */ static void * winMultiWindowXMsgProc(void *pArg) { winWMMessageRec msg; XMsgProcArgPtr pProcArg = (XMsgProcArgPtr) pArg; char pszDisplay[512]; int iRetries; xcb_atom_t atmWmName; xcb_atom_t atmNetWmName; xcb_atom_t atmWmHints; xcb_atom_t atmWmChange; xcb_atom_t atmNetWmIcon; xcb_atom_t atmWindowState, atmMotifWmHints, atmWindowType, atmNormalHints; int iReturn; xcb_auth_info_t *auth_info; xcb_screen_t *root_screen; xcb_window_t root_window_id; winDebug("winMultiWindowXMsgProc - Hello\n"); /* Check that argument pointer is not invalid */ if (pProcArg == NULL) { ErrorF("winMultiWindowXMsgProc - pProcArg is NULL. Exiting.\n"); pthread_exit(NULL); } winDebug("winMultiWindowXMsgProc - Calling pthread_mutex_lock ()\n"); /* Grab the server started mutex - pause until we get it */ iReturn = pthread_mutex_lock(pProcArg->ppmServerStarted); if (iReturn != 0) { ErrorF("winMultiWindowXMsgProc - pthread_mutex_lock () failed: %d. " "Exiting.\n", iReturn); pthread_exit(NULL); } winDebug("winMultiWindowXMsgProc - pthread_mutex_lock () returned.\n"); /* Release the server started mutex */ pthread_mutex_unlock(pProcArg->ppmServerStarted); winDebug("winMultiWindowXMsgProc - pthread_mutex_unlock () returned.\n"); /* Setup the display connection string x */ winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen); /* Print the display connection string */ ErrorF("winMultiWindowXMsgProc - DISPLAY=%s\n", pszDisplay); /* Use our generated cookie for authentication */ auth_info = winGetXcbAuthInfo(); /* Initialize retry count */ iRetries = 0; /* Open the X display */ do { /* Try to open the display */ pProcArg->conn = xcb_connect_to_display_with_auth_info(pszDisplay, auth_info, NULL); if (xcb_connection_has_error(pProcArg->conn)) { ErrorF("winMultiWindowXMsgProc - Could not open display, try: %d, " "sleeping: %d\n", iRetries + 1, WIN_CONNECT_DELAY); ++iRetries; sleep(WIN_CONNECT_DELAY); continue; } else break; } while (xcb_connection_has_error(pProcArg->conn) && iRetries < WIN_CONNECT_RETRIES); /* Make sure that the display opened */ if (xcb_connection_has_error(pProcArg->conn)) { ErrorF("winMultiWindowXMsgProc - Failed opening the display. " "Exiting.\n"); pthread_exit(NULL); } ErrorF("winMultiWindowXMsgProc - xcb_connect() returned and " "successfully opened the display.\n"); /* Check if another window manager is already running */ if (CheckAnotherWindowManager(pProcArg->conn, pProcArg->dwScreen)) { ErrorF("winMultiWindowXMsgProc - " "another window manager is running. Exiting.\n"); pthread_exit(NULL); } /* Get root window id */ root_screen = xcb_aux_get_screen(pProcArg->conn, pProcArg->dwScreen); root_window_id = root_screen->root; { /* Set WM_ICON_SIZE property indicating desired icon sizes */ typedef struct { uint32_t min_width, min_height; uint32_t max_width, max_height; int32_t width_inc, height_inc; } xcb_wm_icon_size_hints_hints_t; xcb_wm_icon_size_hints_hints_t xis; xis.min_width = xis.min_height = 16; xis.max_width = xis.max_height = 48; xis.width_inc = xis.height_inc = 16; xcb_change_property(pProcArg->conn, XCB_PROP_MODE_REPLACE, root_window_id, XCB_ATOM_WM_ICON_SIZE, XCB_ATOM_WM_ICON_SIZE, 32, sizeof(xis)/4, &xis); } atmWmName = intern_atom(pProcArg->conn, "WM_NAME"); atmNetWmName = intern_atom(pProcArg->conn, "_NET_WM_NAME"); atmWmHints = intern_atom(pProcArg->conn, "WM_HINTS"); atmWmChange = intern_atom(pProcArg->conn, "WM_CHANGE_STATE"); atmNetWmIcon = intern_atom(pProcArg->conn, "_NET_WM_ICON"); atmWindowState = intern_atom(pProcArg->conn, "_NET_WM_STATE"); atmMotifWmHints = intern_atom(pProcArg->conn, "_MOTIF_WM_HINTS"); atmWindowType = intern_atom(pProcArg->conn, "_NET_WM_WINDOW_TYPE"); atmNormalHints = intern_atom(pProcArg->conn, "WM_NORMAL_HINTS"); /* iiimxcf had a bug until 2009-04-27, assuming that the WM_STATE atom exists, causing clients to fail with a BadAtom X error if it doesn't. Since this is on in the default Solaris 10 install, workaround this by making sure it does exist... */ intern_atom(pProcArg->conn, "WM_STATE"); /* Enable Composite extension and redirect subwindows of the root window */ if (pProcArg->pWMInfo->fCompositeWM) { const char *extension_name = "Composite"; xcb_query_extension_cookie_t cookie; xcb_query_extension_reply_t *reply; cookie = xcb_query_extension(pProcArg->conn, strlen(extension_name), extension_name); reply = xcb_query_extension_reply(pProcArg->conn, cookie, NULL); if (reply && (reply->present)) { xcb_composite_redirect_subwindows(pProcArg->conn, root_window_id, XCB_COMPOSITE_REDIRECT_AUTOMATIC); /* We use automatic updating of the root window for two reasons: 1) redirected window contents are mirrored to the root window so that the root window draws correctly when shown. 2) updating the root window causes damage against the shadow framebuffer, which ultimately causes WM_PAINT to be sent to the affected window(s) to cause the damage regions to be redrawn. */ ErrorF("Using Composite redirection\n"); free(reply); } } /* Loop until we explicitly break out */ while (1) { xcb_generic_event_t *event; uint8_t type; Bool send_event; if (g_shutdown) break; /* Fetch next event */ event = xcb_wait_for_event(pProcArg->conn); if (!event) { // returns NULL on I/O error int e = xcb_connection_has_error(pProcArg->conn); ErrorF("winMultiWindowXMsgProc - Fatal error %d on xcb connection\n", e); break; } type = event->response_type & ~0x80; send_event = event->response_type & 0x80; winDebug("winMultiWindowXMsgProc - event %d\n", type); /* Branch on event type */ if (type == 0) { xcb_generic_error_t *err = (xcb_generic_error_t *)event; ErrorF("winMultiWindowXMsgProc - Error code: %i, ID: 0x%08x, " "Major opcode: %i, Minor opcode: %i\n", err->error_code, err->resource_id, err->major_code, err->minor_code); } else if (type == XCB_CREATE_NOTIFY) { xcb_create_notify_event_t *notify = (xcb_create_notify_event_t *)event; /* Request property change events */ const static uint32_t mask_value[] = { XCB_EVENT_MASK_PROPERTY_CHANGE }; xcb_change_window_attributes (pProcArg->conn, notify->window, XCB_CW_EVENT_MASK, mask_value); /* If it's not override-redirect, set the border-width to 0 */ if (!IsOverrideRedirect(pProcArg->conn, notify->window)) { const static uint32_t width_value[] = { 0 }; xcb_configure_window(pProcArg->conn, notify->window, XCB_CONFIG_WINDOW_BORDER_WIDTH, width_value); } } else if (type == XCB_MAP_NOTIFY) { /* Fake a reparentNotify event as SWT/Motif expects a Window Manager to reparent a top-level window when it is mapped and waits until they do. We don't actually need to reparent, as the frame is a native window, not an X window We do this on MapNotify, not MapRequest like a real Window Manager would, so we don't have do get involved in actually mapping the window via it's (non-existent) parent... See sourceware bugzilla #9848 */ xcb_map_notify_event_t *notify = (xcb_map_notify_event_t *)event; xcb_get_geometry_cookie_t cookie; xcb_get_geometry_reply_t *reply; xcb_query_tree_cookie_t cookie_qt; xcb_query_tree_reply_t *reply_qt; cookie = xcb_get_geometry(pProcArg->conn, notify->window); cookie_qt = xcb_query_tree(pProcArg->conn, notify->window); reply = xcb_get_geometry_reply(pProcArg->conn, cookie, NULL); reply_qt = xcb_query_tree_reply(pProcArg->conn, cookie_qt, NULL); if (reply && reply_qt) { /* It's a top-level window if the parent window is a root window Only non-override_redirect windows can get reparented */ if ((reply->root == reply_qt->parent) && !notify->override_redirect) { xcb_reparent_notify_event_t event_send; event_send.response_type = XCB_REPARENT_NOTIFY; event_send.event = notify->window; event_send.window = notify->window; event_send.parent = reply_qt->parent; event_send.x = reply->x; event_send.y = reply->y; xcb_send_event (pProcArg->conn, TRUE, notify->window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (const char *)&event_send); free(reply_qt); free(reply); } } } else if (type == XCB_CONFIGURE_NOTIFY) { if (!send_event) { /* Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT doesn't explicitly know about (See sun bug #6434227) XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic ConfigureNotify events to update window location if it's identified the WM as a non-reparenting WM it knows about (compiz or lookingglass) Rather than tell all sorts of lies to get XWM to recognize us as one of those, simply send a synthetic ConfigureNotify for every non-synthetic one */ xcb_configure_notify_event_t *notify = (xcb_configure_notify_event_t *)event; xcb_configure_notify_event_t event_send = *notify; event_send.event = notify->window; xcb_send_event(pProcArg->conn, TRUE, notify->window, XCB_EVENT_MASK_STRUCTURE_NOTIFY, (const char *)&event_send); } } else if (type == XCB_PROPERTY_NOTIFY) { xcb_property_notify_event_t *notify = (xcb_property_notify_event_t *)event; if ((notify->atom == atmWmName) || (notify->atom == atmNetWmName)) { memset(&msg, 0, sizeof(msg)); msg.msg = WM_WM_NAME_EVENT; msg.iWindow = notify->window; /* Other fields ignored */ winSendMessageToWM(pProcArg->pWMInfo, &msg); } else { /* Several properties are considered for WM hints, check if this property change affects any of them... (this list needs to be kept in sync with winApplyHints()) */ if ((notify->atom == atmWmHints) || (notify->atom == atmWindowState) || (notify->atom == atmMotifWmHints) || (notify->atom == atmWindowType) || (notify->atom == atmNormalHints)) { memset(&msg, 0, sizeof(msg)); msg.msg = WM_WM_HINTS_EVENT; msg.iWindow = notify->window; /* Other fields ignored */ winSendMessageToWM(pProcArg->pWMInfo, &msg); } /* Not an else as WM_HINTS affects both style and icon */ if ((notify->atom == atmWmHints) || (notify->atom == atmNetWmIcon)) { memset(&msg, 0, sizeof(msg)); msg.msg = WM_WM_ICON_EVENT; msg.iWindow = notify->window; /* Other fields ignored */ winSendMessageToWM(pProcArg->pWMInfo, &msg); } } } else if (type == XCB_CLIENT_MESSAGE) { xcb_client_message_event_t *client_msg = (xcb_client_message_event_t *)event; if (client_msg->type == atmWmChange && client_msg->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC) { ErrorF("winMultiWindowXMsgProc - WM_CHANGE_STATE - IconicState\n"); memset(&msg, 0, sizeof(msg)); msg.msg = WM_WM_CHANGE_STATE; msg.iWindow = client_msg->window; winSendMessageToWM(pProcArg->pWMInfo, &msg); } } /* Free the event */ free(event); } xcb_disconnect(pProcArg->conn); pthread_exit(NULL); return NULL; } /* * winInitWM - Entry point for the X server to spawn * the Window Manager thread. Called from * winscrinit.c/winFinishScreenInitFB (). */ Bool winInitWM(void **ppWMInfo, pthread_t * ptWMProc, pthread_t * ptXMsgProc, pthread_mutex_t * ppmServerStarted, int dwScreen, HWND hwndScreen, Bool compositeWM) { WMProcArgPtr pArg = malloc(sizeof(WMProcArgRec)); WMInfoPtr pWMInfo = malloc(sizeof(WMInfoRec)); XMsgProcArgPtr pXMsgArg = malloc(sizeof(XMsgProcArgRec)); /* Bail if the input parameters are bad */ if (pArg == NULL || pWMInfo == NULL || pXMsgArg == NULL) { ErrorF("winInitWM - malloc failed.\n"); free(pArg); free(pWMInfo); free(pXMsgArg); return FALSE; } /* Zero the allocated memory */ ZeroMemory(pArg, sizeof(WMProcArgRec)); ZeroMemory(pWMInfo, sizeof(WMInfoRec)); ZeroMemory(pXMsgArg, sizeof(XMsgProcArgRec)); /* Set a return pointer to the Window Manager info structure */ *ppWMInfo = pWMInfo; pWMInfo->fCompositeWM = compositeWM; /* Setup the argument structure for the thread function */ pArg->dwScreen = dwScreen; pArg->pWMInfo = pWMInfo; pArg->ppmServerStarted = ppmServerStarted; /* Initialize the message queue */ if (!InitQueue(&pWMInfo->wmMsgQueue)) { ErrorF("winInitWM - InitQueue () failed.\n"); return FALSE; } /* Spawn a thread for the Window Manager */ if (pthread_create(ptWMProc, NULL, winMultiWindowWMProc, pArg)) { /* Bail if thread creation failed */ ErrorF("winInitWM - pthread_create failed for Window Manager.\n"); return FALSE; } /* Spawn the XNextEvent thread, will send messages to WM */ pXMsgArg->dwScreen = dwScreen; pXMsgArg->pWMInfo = pWMInfo; pXMsgArg->ppmServerStarted = ppmServerStarted; pXMsgArg->hwndScreen = hwndScreen; if (pthread_create(ptXMsgProc, NULL, winMultiWindowXMsgProc, pXMsgArg)) { /* Bail if thread creation failed */ ErrorF("winInitWM - pthread_create failed on XMSG.\n"); return FALSE; } #if CYGDEBUG || YES winDebug("winInitWM - Returning.\n"); #endif return TRUE; } /* * Window manager thread - setup */ static void winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg) { int iRetries = 0; char pszDisplay[512]; int iReturn; xcb_auth_info_t *auth_info; xcb_screen_t *root_screen; xcb_window_t root_window_id; winDebug("winInitMultiWindowWM - Hello\n"); /* Check that argument pointer is not invalid */ if (pProcArg == NULL) { ErrorF("winInitMultiWindowWM - pProcArg is NULL. Exiting.\n"); pthread_exit(NULL); } winDebug("winInitMultiWindowWM - Calling pthread_mutex_lock ()\n"); /* Grab our garbage mutex to satisfy pthread_cond_wait */ iReturn = pthread_mutex_lock(pProcArg->ppmServerStarted); if (iReturn != 0) { ErrorF("winInitMultiWindowWM - pthread_mutex_lock () failed: %d. " "Exiting.\n", iReturn); pthread_exit(NULL); } winDebug("winInitMultiWindowWM - pthread_mutex_lock () returned.\n"); /* Release the server started mutex */ pthread_mutex_unlock(pProcArg->ppmServerStarted); winDebug("winInitMultiWindowWM - pthread_mutex_unlock () returned.\n"); /* Setup the display connection string x */ winGetDisplayName(pszDisplay, (int) pProcArg->dwScreen); /* Print the display connection string */ ErrorF("winInitMultiWindowWM - DISPLAY=%s\n", pszDisplay); /* Use our generated cookie for authentication */ auth_info = winGetXcbAuthInfo(); /* Open the X display */ do { /* Try to open the display */ pWMInfo->conn = xcb_connect_to_display_with_auth_info(pszDisplay, auth_info, NULL); if (xcb_connection_has_error(pWMInfo->conn)) { ErrorF("winInitMultiWindowWM - Could not open display, try: %d, " "sleeping: %d\n", iRetries + 1, WIN_CONNECT_DELAY); ++iRetries; sleep(WIN_CONNECT_DELAY); continue; } else break; } while (xcb_connection_has_error(pWMInfo->conn) && iRetries < WIN_CONNECT_RETRIES); /* Make sure that the display opened */ if (xcb_connection_has_error(pWMInfo->conn)) { ErrorF("winInitMultiWindowWM - Failed opening the display. " "Exiting.\n"); pthread_exit(NULL); } ErrorF("winInitMultiWindowWM - xcb_connect () returned and " "successfully opened the display.\n"); /* Create some atoms */ pWMInfo->atmWmProtos = intern_atom(pWMInfo->conn, "WM_PROTOCOLS"); pWMInfo->atmWmDelete = intern_atom(pWMInfo->conn, "WM_DELETE_WINDOW"); pWMInfo->atmWmTakeFocus = intern_atom(pWMInfo->conn, "WM_TAKE_FOCUS"); pWMInfo->atmPrivMap = intern_atom(pWMInfo->conn, WINDOWSWM_NATIVE_HWND); pWMInfo->atmUtf8String = intern_atom(pWMInfo->conn, "UTF8_STRING"); pWMInfo->atmNetWmName = intern_atom(pWMInfo->conn, "_NET_WM_NAME"); pWMInfo->atmCurrentDesktop = intern_atom(pWMInfo->conn, "_NET_CURRENT_DESKTOP"); pWMInfo->atmNumberDesktops = intern_atom(pWMInfo->conn, "_NET_NUMBER_OF_DESKTOPS"); pWMInfo->atmDesktopNames = intern_atom(pWMInfo->conn, "__NET_DESKTOP_NAMES"); /* Initialization for the xcb_ewmh and EWMH atoms */ { xcb_intern_atom_cookie_t *atoms_cookie; atoms_cookie = xcb_ewmh_init_atoms(pWMInfo->conn, &pWMInfo->ewmh); if (xcb_ewmh_init_atoms_replies(&pWMInfo->ewmh, atoms_cookie, NULL)) { /* Set the _NET_SUPPORTED atom for this context. TODO: Audit to ensure we implement everything defined as MUSTs for window managers in the EWMH standard.*/ xcb_atom_t supported[] = { pWMInfo->ewmh.WM_PROTOCOLS, pWMInfo->ewmh._NET_SUPPORTED, pWMInfo->ewmh._NET_SUPPORTING_WM_CHECK, pWMInfo->ewmh._NET_CLOSE_WINDOW, pWMInfo->ewmh._NET_WM_WINDOW_TYPE, pWMInfo->ewmh._NET_WM_WINDOW_TYPE_DOCK, pWMInfo->ewmh._NET_WM_WINDOW_TYPE_SPLASH, pWMInfo->ewmh._NET_WM_STATE, pWMInfo->ewmh._NET_WM_STATE_HIDDEN, pWMInfo->ewmh._NET_WM_STATE_ABOVE, pWMInfo->ewmh._NET_WM_STATE_BELOW, pWMInfo->ewmh._NET_WM_STATE_SKIP_TASKBAR, }; xcb_ewmh_set_supported(&pWMInfo->ewmh, pProcArg->dwScreen, ARRAY_SIZE(supported), supported); } else { ErrorF("winInitMultiWindowWM - xcb_ewmh_init_atoms() failed\n"); } } /* Get root window id */ root_screen = xcb_aux_get_screen(pWMInfo->conn, pProcArg->dwScreen); root_window_id = root_screen->root; /* Set root window properties for describing multiple desktops to describe the one desktop we have */ { int data; const char buf[] = "Desktop"; data = 0; xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id, pWMInfo->atmCurrentDesktop, XCB_ATOM_CARDINAL, 32, 1, &data); data = 1; xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id, pWMInfo->atmNumberDesktops, XCB_ATOM_CARDINAL, 32, 1, &data); xcb_change_property(pWMInfo->conn, XCB_PROP_MODE_REPLACE, root_window_id, pWMInfo->atmDesktopNames, pWMInfo->atmUtf8String, 8, strlen(buf), (unsigned char *) buf); } /* Set the root window cursor to left_ptr (this controls the cursor an application gets over its windows when it doesn't set one) */ { #define XC_left_ptr 68 xcb_cursor_t cursor = xcb_generate_id(pWMInfo->conn); xcb_font_t font = xcb_generate_id(pWMInfo->conn); xcb_font_t *mask_font = &font; /* An alias to clarify */ int shape = XC_left_ptr; uint32_t mask = XCB_CW_CURSOR; uint32_t value_list = cursor; static const uint16_t fgred = 0, fggreen = 0, fgblue = 0; static const uint16_t bgred = 0xFFFF, bggreen = 0xFFFF, bgblue = 0xFFFF; xcb_open_font(pWMInfo->conn, font, sizeof("cursor"), "cursor"); xcb_create_glyph_cursor(pWMInfo->conn, cursor, font, *mask_font, shape, shape + 1, fgred, fggreen, fgblue, bgred, bggreen, bgblue); xcb_change_window_attributes(pWMInfo->conn, root_window_id, mask, &value_list); xcb_free_cursor(pWMInfo->conn, cursor); xcb_close_font(pWMInfo->conn, font); } } /* * winSendMessageToWM - Send a message from the X thread to the WM thread */ void winSendMessageToWM(void *pWMInfo, winWMMessagePtr pMsg) { WMMsgNodePtr pNode; #if CYGMULTIWINDOW_DEBUG ErrorF("winSendMessageToWM %s\n", MessageName(pMsg)); #endif pNode = malloc(sizeof(WMMsgNodeRec)); if (pNode != NULL) { memcpy(&pNode->msg, pMsg, sizeof(winWMMessageRec)); PushMessage(&((WMInfoPtr) pWMInfo)->wmMsgQueue, pNode); } } /* * Check if another window manager is running */ static Bool CheckAnotherWindowManager(xcb_connection_t *conn, DWORD dwScreen) { Bool redirectError = FALSE; /* Get root window id */ xcb_screen_t *root_screen = xcb_aux_get_screen(conn, dwScreen); xcb_window_t root_window_id = root_screen->root; /* Try to select the events which only one client at a time is allowed to select. If this causes an error, another window manager is already running... */ const static uint32_t test_mask[] = { XCB_EVENT_MASK_RESIZE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_BUTTON_PRESS }; xcb_void_cookie_t cookie = xcb_change_window_attributes_checked(conn, root_window_id, XCB_CW_EVENT_MASK, test_mask); xcb_generic_error_t *error; if ((error = xcb_request_check(conn, cookie))) { redirectError = TRUE; free(error); } /* Side effect: select the events we are actually interested in... Other WMs are not allowed, also select one of the events which only one client at a time is allowed to select, so other window managers won't start... */ { const uint32_t mask[] = { XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY | XCB_EVENT_MASK_BUTTON_PRESS }; xcb_change_window_attributes(conn, root_window_id, XCB_CW_EVENT_MASK, mask); } return redirectError; } /* * Notify the MWM thread we're exiting and not to reconnect */ void winDeinitMultiWindowWM(void) { ErrorF("winDeinitMultiWindowWM - Noting shutdown in progress\n"); g_shutdown = TRUE; } /* Windows window styles */ #define HINT_NOFRAME (1L<<0) #define HINT_BORDER (1L<<1) #define HINT_SIZEBOX (1L<<2) #define HINT_CAPTION (1L<<3) #define HINT_NOMAXIMIZE (1L<<4) #define HINT_NOMINIMIZE (1L<<5) #define HINT_NOSYSMENU (1L<<6) #define HINT_SKIPTASKBAR (1L<<7) /* These two are used on their own */ #define HINT_MAX (1L<<0) #define HINT_MIN (1L<<1) static void winApplyHints(WMInfoPtr pWMInfo, xcb_window_t iWindow, HWND hWnd, HWND * zstyle) { xcb_connection_t *conn = pWMInfo->conn; static xcb_atom_t windowState, motif_wm_hints; static xcb_atom_t hiddenState, fullscreenState, belowState, aboveState, skiptaskbarState; static xcb_atom_t splashType; static int generation; unsigned long hint = 0, maxmin = 0; unsigned long style, exStyle; if (!hWnd) return; if (!IsWindow(hWnd)) return; if (generation != serverGeneration) { generation = serverGeneration; windowState = intern_atom(conn, "_NET_WM_STATE"); motif_wm_hints = intern_atom(conn, "_MOTIF_WM_HINTS"); hiddenState = intern_atom(conn, "_NET_WM_STATE_HIDDEN"); fullscreenState = intern_atom(conn, "_NET_WM_STATE_FULLSCREEN"); belowState = intern_atom(conn, "_NET_WM_STATE_BELOW"); aboveState = intern_atom(conn, "_NET_WM_STATE_ABOVE"); skiptaskbarState = intern_atom(conn, "_NET_WM_STATE_SKIP_TASKBAR"); splashType = intern_atom(conn, "_NET_WM_WINDOW_TYPE_SPLASHSCREEN"); } { xcb_get_property_cookie_t cookie_wm_state = xcb_get_property(conn, FALSE, iWindow, windowState, XCB_ATOM_ATOM, 0L, INT_MAX); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie_wm_state, NULL); if (reply) { int i; int nitems = xcb_get_property_value_length(reply)/sizeof(xcb_atom_t); xcb_atom_t *pAtom = xcb_get_property_value(reply); for (i = 0; i < nitems; i++) { if (pAtom[i] == skiptaskbarState) hint |= HINT_SKIPTASKBAR; if (pAtom[i] == hiddenState) maxmin |= HINT_MIN; else if (pAtom[i] == fullscreenState) maxmin |= HINT_MAX; if (pAtom[i] == belowState) *zstyle = HWND_BOTTOM; else if (pAtom[i] == aboveState) *zstyle = HWND_TOPMOST; } free(reply); } } { xcb_get_property_cookie_t cookie_mwm_hint = xcb_get_property(conn, FALSE, iWindow, motif_wm_hints, motif_wm_hints, 0L, sizeof(MwmHints)); xcb_get_property_reply_t *reply = xcb_get_property_reply(conn, cookie_mwm_hint, NULL); if (reply) { int nitems = xcb_get_property_value_length(reply)/4; MwmHints *mwm_hint = xcb_get_property_value(reply); if (mwm_hint && (nitems >= PropMwmHintsElements) && (mwm_hint->flags & MwmHintsDecorations)) { if (!mwm_hint->decorations) hint |= (HINT_NOFRAME | HINT_NOSYSMENU | HINT_NOMINIMIZE | HINT_NOMAXIMIZE); else if (!(mwm_hint->decorations & MwmDecorAll)) { if (mwm_hint->decorations & MwmDecorBorder) hint |= HINT_BORDER; if (mwm_hint->decorations & MwmDecorHandle) hint |= HINT_SIZEBOX; if (mwm_hint->decorations & MwmDecorTitle) hint |= HINT_CAPTION; if (!(mwm_hint->decorations & MwmDecorMenu)) hint |= HINT_NOSYSMENU; if (!(mwm_hint->decorations & MwmDecorMinimize)) hint |= HINT_NOMINIMIZE; if (!(mwm_hint->decorations & MwmDecorMaximize)) hint |= HINT_NOMAXIMIZE; } else { /* MwmDecorAll means all decorations *except* those specified by other flag bits that are set. Not yet implemented. */ } } free(reply); } } { int i; xcb_ewmh_get_atoms_reply_t type; xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_window_type(&pWMInfo->ewmh, iWindow); if (xcb_ewmh_get_wm_window_type_reply(&pWMInfo->ewmh, cookie, &type, NULL)) { for (i = 0; i < type.atoms_len; i++) { if (type.atoms[i] == pWMInfo->ewmh._NET_WM_WINDOW_TYPE_DOCK) { hint = (hint & ~HINT_NOFRAME) | HINT_SKIPTASKBAR | HINT_SIZEBOX; *zstyle = HWND_TOPMOST; } else if ((type.atoms[i] == pWMInfo->ewmh._NET_WM_WINDOW_TYPE_SPLASH) || (type.atoms[i] == splashType)) { hint |= (HINT_SKIPTASKBAR | HINT_NOSYSMENU | HINT_NOMINIMIZE | HINT_NOMAXIMIZE); *zstyle = HWND_TOPMOST; } } } } { xcb_size_hints_t size_hints; xcb_get_property_cookie_t cookie; cookie = xcb_icccm_get_wm_normal_hints(conn, iWindow); if (xcb_icccm_get_wm_normal_hints_reply(conn, cookie, &size_hints, NULL)) { if (size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE) { /* Not maximizable if a maximum size is specified, and that size is smaller (in either dimension) than the screen size */ if ((size_hints.max_width < GetSystemMetrics(SM_CXVIRTUALSCREEN)) || (size_hints.max_height < GetSystemMetrics(SM_CYVIRTUALSCREEN))) hint |= HINT_NOMAXIMIZE; if (size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE) { /* If both minimum size and maximum size are specified and are the same, don't bother with a resizing frame */ if ((size_hints.min_width == size_hints.max_width) && (size_hints.min_height == size_hints.max_height)) hint = (hint & ~HINT_SIZEBOX); } } } } /* Override hint settings from above with settings from config file and set application id for grouping. */ { char *application_id = 0; char *window_name = 0; char *res_name = 0; char *res_class = 0; GetClassNames(pWMInfo, iWindow, &res_name, &res_class, &window_name); style = STYLE_NONE; style = winOverrideStyle(res_name, res_class, window_name); #define APPLICATION_ID_FORMAT "%s.xwin.%s" #define APPLICATION_ID_UNKNOWN "unknown" if (res_class) { asprintf(&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, res_class); } else { asprintf(&application_id, APPLICATION_ID_FORMAT, XVENDORNAME, APPLICATION_ID_UNKNOWN); } winSetAppUserModelID(hWnd, application_id); free(application_id); free(res_name); free(res_class); free(window_name); } if (style & STYLE_TOPMOST) *zstyle = HWND_TOPMOST; else if (style & STYLE_MAXIMIZE) maxmin = (hint & ~HINT_MIN) | HINT_MAX; else if (style & STYLE_MINIMIZE) maxmin = (hint & ~HINT_MAX) | HINT_MIN; else if (style & STYLE_BOTTOM) *zstyle = HWND_BOTTOM; if (maxmin & HINT_MAX) SendMessage(hWnd, WM_SYSCOMMAND, SC_MAXIMIZE, 0); else if (maxmin & HINT_MIN) SendMessage(hWnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); if (style & STYLE_NOTITLE) hint = (hint & ~HINT_NOFRAME & ~HINT_BORDER & ~HINT_CAPTION) | HINT_SIZEBOX; else if (style & STYLE_OUTLINE) hint = (hint & ~HINT_NOFRAME & ~HINT_SIZEBOX & ~HINT_CAPTION) | HINT_BORDER; else if (style & STYLE_NOFRAME) hint = (hint & ~HINT_BORDER & ~HINT_CAPTION & ~HINT_SIZEBOX) | HINT_NOFRAME; /* Now apply styles to window */ style = GetWindowLongPtr(hWnd, GWL_STYLE); if (!style) return; /* GetWindowLongPointer returns 0 on failure, we hope this isn't a valid style */ style &= ~WS_CAPTION & ~WS_SIZEBOX; /* Just in case */ if (!(hint & ~HINT_SKIPTASKBAR)) /* No hints, default */ style = style | WS_CAPTION | WS_SIZEBOX; else if (hint & HINT_NOFRAME) /* No frame, no decorations */ style = style & ~WS_CAPTION & ~WS_SIZEBOX; else style = style | ((hint & HINT_BORDER) ? WS_BORDER : 0) | ((hint & HINT_SIZEBOX) ? WS_SIZEBOX : 0) | ((hint & HINT_CAPTION) ? WS_CAPTION : 0); if (hint & HINT_NOMAXIMIZE) style = style & ~WS_MAXIMIZEBOX; if (hint & HINT_NOMINIMIZE) style = style & ~WS_MINIMIZEBOX; if (hint & HINT_NOSYSMENU) style = style & ~WS_SYSMENU; if (hint & HINT_SKIPTASKBAR) style = style & ~WS_MINIMIZEBOX; /* window will become lost if minimized */ SetWindowLongPtr(hWnd, GWL_STYLE, style); exStyle = GetWindowLongPtr(hWnd, GWL_EXSTYLE); if (hint & HINT_SKIPTASKBAR) exStyle = (exStyle & ~WS_EX_APPWINDOW) | WS_EX_TOOLWINDOW; else exStyle = (exStyle & ~WS_EX_TOOLWINDOW) | WS_EX_APPWINDOW; SetWindowLongPtr(hWnd, GWL_EXSTYLE, exStyle); winDebug ("winApplyHints: iWindow 0x%08x hints 0x%08x style 0x%08x exstyle 0x%08x\n", iWindow, hint, style, exStyle); } void winUpdateWindowPosition(HWND hWnd, HWND * zstyle) { int iX, iY, iWidth, iHeight; int iDx, iDy; RECT rcNew; WindowPtr pWin = GetProp(hWnd, WIN_WINDOW_PROP); DrawablePtr pDraw = NULL; if (!pWin) return; pDraw = &pWin->drawable; if (!pDraw) return; /* Get the X and Y location of the X window */ iX = pWin->drawable.x + GetSystemMetrics(SM_XVIRTUALSCREEN); iY = pWin->drawable.y + GetSystemMetrics(SM_YVIRTUALSCREEN); /* Get the height and width of the X window */ iWidth = pWin->drawable.width; iHeight = pWin->drawable.height; /* Setup a rectangle with the X window position and size */ SetRect(&rcNew, iX, iY, iX + iWidth, iY + iHeight); winDebug("winUpdateWindowPosition - drawable extent (%d, %d)-(%d, %d)\n", rcNew.left, rcNew.top, rcNew.right, rcNew.bottom); AdjustWindowRectEx(&rcNew, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE, GetWindowLongPtr(hWnd, GWL_EXSTYLE)); /* Don't allow window decoration to disappear off to top-left as a result of this adjustment */ if (rcNew.left < GetSystemMetrics(SM_XVIRTUALSCREEN)) { iDx = GetSystemMetrics(SM_XVIRTUALSCREEN) - rcNew.left; rcNew.left += iDx; rcNew.right += iDx; } if (rcNew.top < GetSystemMetrics(SM_YVIRTUALSCREEN)) { iDy = GetSystemMetrics(SM_YVIRTUALSCREEN) - rcNew.top; rcNew.top += iDy; rcNew.bottom += iDy; } winDebug("winUpdateWindowPosition - Window extent (%d, %d)-(%d, %d)\n", rcNew.left, rcNew.top, rcNew.right, rcNew.bottom); /* Position the Windows window */ SetWindowPos(hWnd, *zstyle, rcNew.left, rcNew.top, rcNew.right - rcNew.left, rcNew.bottom - rcNew.top, 0); } xorg-server-21.1.16/hw/xwin/winmultiwindowwndproc.c0000644000175000017500000012165614757411105016112 /* *Copyright (C) 1994-2000 The XFree86 Project, Inc. All Rights Reserved. *Copyright (C) Colin Harrison 2005-2008 * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 XFREE86 PROJECT 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 XFree86 Project *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 XFree86 Project. * * Authors: Kensuke Matsuzaki * Earle F. Philhower, III * Harold L Hunt II * Colin Harrison */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" #include "dixevents.h" #include "winmultiwindowclass.h" #include "winprefs.h" #include "winmsg.h" #include "inputstr.h" #include #ifndef WM_DWMCOMPOSITIONCHANGED #define WM_DWMCOMPOSITIONCHANGED 0x031e #endif extern void winUpdateWindowPosition(HWND hWnd, HWND * zstyle); /* * Local globals */ static UINT_PTR g_uipMousePollingTimerID = 0; /* * Constant defines */ #define WIN_MULTIWINDOW_SHAPE YES /* * ConstrainSize - Taken from TWM sources - Respects hints for sizing */ #define makemult(a,b) ((b==1) ? (a) : (((int)((a)/(b))) * (b)) ) static void ConstrainSize(WinXSizeHints hints, int *widthp, int *heightp) { int minWidth, minHeight, maxWidth, maxHeight, xinc, yinc, delta; int baseWidth, baseHeight; int dwidth = *widthp, dheight = *heightp; if (hints.flags & PMinSize) { minWidth = hints.min_width; minHeight = hints.min_height; } else if (hints.flags & PBaseSize) { minWidth = hints.base_width; minHeight = hints.base_height; } else minWidth = minHeight = 1; if (hints.flags & PBaseSize) { baseWidth = hints.base_width; baseHeight = hints.base_height; } else if (hints.flags & PMinSize) { baseWidth = hints.min_width; baseHeight = hints.min_height; } else baseWidth = baseHeight = 0; if (hints.flags & PMaxSize) { maxWidth = hints.max_width; maxHeight = hints.max_height; } else { maxWidth = MAXINT; maxHeight = MAXINT; } if (hints.flags & PResizeInc) { xinc = hints.width_inc; yinc = hints.height_inc; } else xinc = yinc = 1; /* * First, clamp to min and max values */ if (dwidth < minWidth) dwidth = minWidth; if (dheight < minHeight) dheight = minHeight; if (dwidth > maxWidth) dwidth = maxWidth; if (dheight > maxHeight) dheight = maxHeight; /* * Second, fit to base + N * inc */ dwidth = ((dwidth - baseWidth) / xinc * xinc) + baseWidth; dheight = ((dheight - baseHeight) / yinc * yinc) + baseHeight; /* * Third, adjust for aspect ratio */ /* * The math looks like this: * * minAspectX dwidth maxAspectX * ---------- <= ------- <= ---------- * minAspectY dheight maxAspectY * * If that is multiplied out, then the width and height are * invalid in the following situations: * * minAspectX * dheight > minAspectY * dwidth * maxAspectX * dheight < maxAspectY * dwidth * */ if (hints.flags & PAspect) { if (hints.min_aspect.x * dheight > hints.min_aspect.y * dwidth) { delta = makemult(hints.min_aspect.x * dheight / hints.min_aspect.y - dwidth, xinc); if (dwidth + delta <= maxWidth) dwidth += delta; else { delta = makemult(dheight - dwidth * hints.min_aspect.y / hints.min_aspect.x, yinc); if (dheight - delta >= minHeight) dheight -= delta; } } if (hints.max_aspect.x * dheight < hints.max_aspect.y * dwidth) { delta = makemult(dwidth * hints.max_aspect.y / hints.max_aspect.x - dheight, yinc); if (dheight + delta <= maxHeight) dheight += delta; else { delta = makemult(dwidth - hints.max_aspect.x * dheight / hints.max_aspect.y, xinc); if (dwidth - delta >= minWidth) dwidth -= delta; } } } /* Return computed values */ *widthp = dwidth; *heightp = dheight; } #undef makemult /* * ValidateSizing - Ensures size request respects hints */ static int ValidateSizing(HWND hwnd, WindowPtr pWin, WPARAM wParam, LPARAM lParam) { WinXSizeHints sizeHints; RECT *rect; int iWidth, iHeight; RECT rcClient, rcWindow; int iBorderWidthX, iBorderWidthY; /* Invalid input checking */ if (pWin == NULL || lParam == 0) return FALSE; /* No size hints, no checking */ if (!winMultiWindowGetWMNormalHints(pWin, &sizeHints)) return FALSE; /* Avoid divide-by-zero */ if (sizeHints.flags & PResizeInc) { if (sizeHints.width_inc == 0) sizeHints.width_inc = 1; if (sizeHints.height_inc == 0) sizeHints.height_inc = 1; } rect = (RECT *) lParam; iWidth = rect->right - rect->left; iHeight = rect->bottom - rect->top; /* Now remove size of any borders and title bar */ GetClientRect(hwnd, &rcClient); GetWindowRect(hwnd, &rcWindow); iBorderWidthX = (rcWindow.right - rcWindow.left) - (rcClient.right - rcClient.left); iBorderWidthY = (rcWindow.bottom - rcWindow.top) - (rcClient.bottom - rcClient.top); iWidth -= iBorderWidthX; iHeight -= iBorderWidthY; /* Constrain the size to legal values */ ConstrainSize(sizeHints, &iWidth, &iHeight); /* Add back the size of borders and title bar */ iWidth += iBorderWidthX; iHeight += iBorderWidthY; /* Adjust size according to where we're dragging from */ switch (wParam) { case WMSZ_TOP: case WMSZ_TOPRIGHT: case WMSZ_BOTTOM: case WMSZ_BOTTOMRIGHT: case WMSZ_RIGHT: rect->right = rect->left + iWidth; break; default: rect->left = rect->right - iWidth; break; } switch (wParam) { case WMSZ_BOTTOM: case WMSZ_BOTTOMRIGHT: case WMSZ_BOTTOMLEFT: case WMSZ_RIGHT: case WMSZ_LEFT: rect->bottom = rect->top + iHeight; break; default: rect->top = rect->bottom - iHeight; break; } return TRUE; } extern Bool winInDestroyWindowsWindow; static Bool winInRaiseWindow = FALSE; static void winRaiseWindow(WindowPtr pWin) { if (!winInDestroyWindowsWindow && !winInRaiseWindow) { BOOL oldstate = winInRaiseWindow; XID vlist[1] = { 0 }; winInRaiseWindow = TRUE; /* Call configure window directly to make sure it gets processed * in time */ ConfigureWindow(pWin, CWStackMode, vlist, serverClient); winInRaiseWindow = oldstate; } } static void winStartMousePolling(winPrivScreenPtr s_pScreenPriv) { /* * Timer to poll mouse position. This is needed to make * programs like xeyes follow the mouse properly when the * mouse pointer is outside of any X window. */ if (g_uipMousePollingTimerID == 0) g_uipMousePollingTimerID = SetTimer(s_pScreenPriv->hwndScreen, WIN_POLLING_MOUSE_TIMER_ID, MOUSE_POLLING_INTERVAL, NULL); } /* Undocumented */ typedef struct _ACCENTPOLICY { ULONG AccentState; ULONG AccentFlags; ULONG GradientColor; ULONG AnimationId; } ACCENTPOLICY; #define ACCENT_ENABLE_BLURBEHIND 3 typedef struct _WINCOMPATTR { DWORD attribute; PVOID pData; ULONG dataSize; } WINCOMPATTR; #define WCA_ACCENT_POLICY 19 typedef WINBOOL WINAPI (*PFNSETWINDOWCOMPOSITIONATTRIBUTE)(HWND, WINCOMPATTR *); static void CheckForAlpha(HWND hWnd, WindowPtr pWin, winScreenInfo *pScreenInfo) { /* Check (once) which API we should use */ static Bool doOnce = TRUE; static PFNSETWINDOWCOMPOSITIONATTRIBUTE pSetWindowCompositionAttribute = NULL; static Bool useDwmEnableBlurBehindWindow = FALSE; if (doOnce) { OSVERSIONINFOEX osvi = {0}; osvi.dwOSVersionInfoSize = sizeof(osvi); GetVersionEx((LPOSVERSIONINFO)&osvi); /* SetWindowCompositionAttribute() exists on Windows 7 and later, but doesn't work for this purpose, so first check for Windows 10 or later */ if (osvi.dwMajorVersion >= 10) { HMODULE hUser32 = GetModuleHandle("user32"); if (hUser32) pSetWindowCompositionAttribute = (PFNSETWINDOWCOMPOSITIONATTRIBUTE) GetProcAddress(hUser32, "SetWindowCompositionAttribute"); winDebug("SetWindowCompositionAttribute %s\n", pSetWindowCompositionAttribute ? "found" : "not found"); } /* On Windows 7 and Windows Vista, use DwmEnableBlurBehindWindow() */ else if ((osvi.dwMajorVersion == 6) && (osvi.dwMinorVersion <= 1)) { useDwmEnableBlurBehindWindow = TRUE; } /* On Windows 8 and Windows 8.1, using the alpha channel on those seems near impossible, so we don't do anything. */ doOnce = FALSE; } /* alpha-channel use is wanted */ if (!g_fCompositeAlpha || !pScreenInfo->fCompositeWM) return; /* Image has alpha ... */ if (pWin->drawable.depth != 32) return; /* ... and we can do something useful with it? */ if (pSetWindowCompositionAttribute) { WINBOOL rc; /* Use the (undocumented) SetWindowCompositionAttribute, if available, to turn on alpha channel use on Windows 10. */ ACCENTPOLICY policy = { ACCENT_ENABLE_BLURBEHIND, 0, 0, 0 } ; WINCOMPATTR data = { WCA_ACCENT_POLICY, &policy, sizeof(ACCENTPOLICY) }; /* This turns on DWM looking at the alpha-channel of this window */ winDebug("enabling alpha for XID %08x hWnd %p, using SetWindowCompositionAttribute()\n", (unsigned int)pWin->drawable.id, hWnd); rc = pSetWindowCompositionAttribute(hWnd, &data); if (!rc) ErrorF("SetWindowCompositionAttribute failed: %d\n", (int)GetLastError()); } else if (useDwmEnableBlurBehindWindow) { HRESULT rc; WINBOOL enabled; rc = DwmIsCompositionEnabled(&enabled); if ((rc == S_OK) && enabled) { /* Use DwmEnableBlurBehindWindow, to turn on alpha channel use on Windows Vista and Windows 7 */ DWM_BLURBEHIND bbh; bbh.dwFlags = DWM_BB_ENABLE | DWM_BB_BLURREGION | DWM_BB_TRANSITIONONMAXIMIZED; bbh.fEnable = TRUE; bbh.hRgnBlur = NULL; bbh.fTransitionOnMaximized = TRUE; /* What does this do ??? */ /* This terribly-named function actually controls if DWM looks at the alpha channel of this window */ winDebug("enabling alpha for XID %08x hWnd %p, using DwmEnableBlurBehindWindow()\n", (unsigned int)pWin->drawable.id, hWnd); rc = DwmEnableBlurBehindWindow(hWnd, &bbh); if (rc != S_OK) ErrorF("DwmEnableBlurBehindWindow failed: %x, %d\n", (int)rc, (int)GetLastError()); } } } /* * winTopLevelWindowProc - Window procedure for all top-level Windows windows. */ LRESULT CALLBACK winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { POINT ptMouse; PAINTSTRUCT ps; WindowPtr pWin = NULL; winPrivWinPtr pWinPriv = NULL; ScreenPtr s_pScreen = NULL; winPrivScreenPtr s_pScreenPriv = NULL; winScreenInfo *s_pScreenInfo = NULL; HWND hwndScreen = NULL; DrawablePtr pDraw = NULL; winWMMessageRec wmMsg; Bool fWMMsgInitialized = FALSE; static Bool s_fTracking = FALSE; Bool needRestack = FALSE; LRESULT ret; static Bool hasEnteredSizeMove = FALSE; #if CYGDEBUG winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, lParam); #endif /* If this is WM_CREATE, set up the Windows window properties which point to X window information, before we populate local convenience variables... */ if (message == WM_CREATE) { SetProp(hwnd, WIN_WINDOW_PROP, (HANDLE) ((LPCREATESTRUCT) lParam)->lpCreateParams); SetProp(hwnd, WIN_WID_PROP, (HANDLE) (INT_PTR)winGetWindowID(((LPCREATESTRUCT) lParam)-> lpCreateParams)); } /* Check if the Windows window property for our X window pointer is valid */ if ((pWin = GetProp(hwnd, WIN_WINDOW_PROP)) != NULL) { /* Our X window pointer is valid */ /* Get pointers to the drawable and the screen */ pDraw = &pWin->drawable; s_pScreen = pWin->drawable.pScreen; /* Get a pointer to our window privates */ pWinPriv = winGetWindowPriv(pWin); /* Get pointers to our screen privates and screen info */ s_pScreenPriv = pWinPriv->pScreenPriv; s_pScreenInfo = s_pScreenPriv->pScreenInfo; /* Get the handle for our screen-sized window */ hwndScreen = s_pScreenPriv->hwndScreen; /* */ wmMsg.msg = 0; wmMsg.hwndWindow = hwnd; wmMsg.iWindow = (Window) (INT_PTR) GetProp(hwnd, WIN_WID_PROP); wmMsg.iX = pDraw->x; wmMsg.iY = pDraw->y; wmMsg.iWidth = pDraw->width; wmMsg.iHeight = pDraw->height; fWMMsgInitialized = TRUE; #if 0 /* * Print some debugging information */ ErrorF("hWnd %08X\n", hwnd); ErrorF("pWin %08X\n", pWin); ErrorF("pDraw %08X\n", pDraw); ErrorF("\ttype %08X\n", pWin->drawable.type); ErrorF("\tclass %08X\n", pWin->drawable.class); ErrorF("\tdepth %08X\n", pWin->drawable.depth); ErrorF("\tbitsPerPixel %08X\n", pWin->drawable.bitsPerPixel); ErrorF("\tid %08X\n", pWin->drawable.id); ErrorF("\tx %08X\n", pWin->drawable.x); ErrorF("\ty %08X\n", pWin->drawable.y); ErrorF("\twidth %08X\n", pWin->drawable.width); ErrorF("\thenght %08X\n", pWin->drawable.height); ErrorF("\tpScreen %08X\n", pWin->drawable.pScreen); ErrorF("\tserialNumber %08X\n", pWin->drawable.serialNumber); ErrorF("g_iWindowPrivateKey %p\n", g_iWindowPrivateKey); ErrorF("pWinPriv %08X\n", pWinPriv); ErrorF("s_pScreenPriv %08X\n", s_pScreenPriv); ErrorF("s_pScreenInfo %08X\n", s_pScreenInfo); ErrorF("hwndScreen %08X\n", hwndScreen); #endif } /* Branch on message type */ switch (message) { case WM_CREATE: /* * Make X windows' Z orders sync with Windows windows because * there can be AlwaysOnTop windows overlapped on the window * currently being created. */ winReorderWindowsMultiWindow(); /* Fix a 'round title bar corner background should be transparent not black' problem when first painted */ { RECT rWindow; HRGN hRgnWindow; GetWindowRect(hwnd, &rWindow); hRgnWindow = CreateRectRgnIndirect(&rWindow); SetWindowRgn(hwnd, hRgnWindow, TRUE); DeleteObject(hRgnWindow); } SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) XMING_SIGNATURE); CheckForAlpha(hwnd, pWin, s_pScreenInfo); return 0; case WM_INIT_SYS_MENU: /* * Add whatever the setup file wants to for this window */ SetupSysMenu(hwnd); return 0; case WM_SYSCOMMAND: /* * Any window menu items go through here */ if (HandleCustomWM_COMMAND(hwnd, LOWORD(wParam), s_pScreenPriv)) { /* Don't pass customized menus to DefWindowProc */ return 0; } if (wParam == SC_RESTORE || wParam == SC_MAXIMIZE) { WINDOWPLACEMENT wndpl; wndpl.length = sizeof(wndpl); if (GetWindowPlacement(hwnd, &wndpl) && wndpl.showCmd == SW_SHOWMINIMIZED) needRestack = TRUE; } break; case WM_INITMENU: /* Checks/Unchecks any menu items before they are displayed */ HandleCustomWM_INITMENU(hwnd, (HMENU)wParam); break; case WM_ERASEBKGND: /* * Pretend that we did erase the background but we don't care, * since we repaint the entire region anyhow * This avoids some flickering when resizing. */ return TRUE; case WM_PAINT: /* Only paint if our window handle is valid */ if (hwnd == NULL) break; #ifdef XWIN_GLX_WINDOWS if (pWinPriv->fWglUsed) { /* For regions which are being drawn by GL, the shadow framebuffer doesn't have the correct bits, so don't bitblt from the shadow framebuffer XXX: For now, just leave it alone, but ideally we want to send an expose event to the window so it really redraws the affected region... */ BeginPaint(hwnd, &ps); ValidateRect(hwnd, &(ps.rcPaint)); EndPaint(hwnd, &ps); } else #endif /* Call the engine dependent repainter */ if (*s_pScreenPriv->pwinBltExposedWindowRegion) (*s_pScreenPriv->pwinBltExposedWindowRegion) (s_pScreen, pWin); return 0; case WM_MOUSEMOVE: /* Unpack the client area mouse coordinates */ ptMouse.x = GET_X_LPARAM(lParam); ptMouse.y = GET_Y_LPARAM(lParam); /* Translate the client area mouse coordinates to screen coordinates */ ClientToScreen(hwnd, &ptMouse); /* Screen Coords from (-X, -Y) -> Root Window (0, 0) */ ptMouse.x -= GetSystemMetrics(SM_XVIRTUALSCREEN); ptMouse.y -= GetSystemMetrics(SM_YVIRTUALSCREEN); /* We can't do anything without privates */ if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Has the mouse pointer crossed screens? */ if (s_pScreen != miPointerGetScreen(g_pwinPointer)) miPointerSetScreen(g_pwinPointer, s_pScreenInfo->dwScreen, ptMouse.x - s_pScreenInfo->dwXOffset, ptMouse.y - s_pScreenInfo->dwYOffset); /* Are we tracking yet? */ if (!s_fTracking) { TRACKMOUSEEVENT tme; /* Setup data structure */ ZeroMemory(&tme, sizeof(tme)); tme.cbSize = sizeof(tme); tme.dwFlags = TME_LEAVE; tme.hwndTrack = hwnd; /* Call the tracking function */ if (!TrackMouseEvent(&tme)) ErrorF("winTopLevelWindowProc - TrackMouseEvent failed\n"); /* Flag that we are tracking now */ s_fTracking = TRUE; } /* Hide or show the Windows mouse cursor */ if (g_fSoftwareCursor && g_fCursor) { /* Hide Windows cursor */ g_fCursor = FALSE; ShowCursor(FALSE); } /* Kill the timer used to poll mouse events */ if (g_uipMousePollingTimerID != 0) { KillTimer(s_pScreenPriv->hwndScreen, WIN_POLLING_MOUSE_TIMER_ID); g_uipMousePollingTimerID = 0; } /* Deliver absolute cursor position to X Server */ winEnqueueMotion(ptMouse.x - s_pScreenInfo->dwXOffset, ptMouse.y - s_pScreenInfo->dwYOffset); return 0; case WM_NCMOUSEMOVE: /* * We break instead of returning 0 since we need to call * DefWindowProc to get the mouse cursor changes * and min/max/close button highlighting in Windows XP. * The Platform SDK says that you should return 0 if you * process this message, but it fails to mention that you * will give up any default functionality if you do return 0. */ /* We can't do anything without privates */ if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; /* Non-client mouse movement, show Windows cursor */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } winStartMousePolling(s_pScreenPriv); break; case WM_MOUSELEAVE: /* Mouse has left our client area */ /* Flag that we are no longer tracking */ s_fTracking = FALSE; /* Show the mouse cursor, if necessary */ if (g_fSoftwareCursor && !g_fCursor) { g_fCursor = TRUE; ShowCursor(TRUE); } winStartMousePolling(s_pScreenPriv); return 0; case WM_LBUTTONDBLCLK: case WM_LBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[0] = TRUE; SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button1, wParam); case WM_LBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[0] = FALSE; ReleaseCapture(); winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button1, wParam); case WM_MBUTTONDBLCLK: case WM_MBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[1] = TRUE; SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button2, wParam); case WM_MBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[1] = FALSE; ReleaseCapture(); winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button2, wParam); case WM_RBUTTONDBLCLK: case WM_RBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[2] = TRUE; SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, Button3, wParam); case WM_RBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; g_fButton[2] = FALSE; ReleaseCapture(); winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle(s_pScreen, ButtonRelease, Button3, wParam); case WM_XBUTTONDBLCLK: case WM_XBUTTONDOWN: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; SetCapture(hwnd); return winMouseButtonsHandle(s_pScreen, ButtonPress, HIWORD(wParam) + 7, wParam); case WM_XBUTTONUP: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; ReleaseCapture(); winStartMousePolling(s_pScreenPriv); return winMouseButtonsHandle(s_pScreen, ButtonRelease, HIWORD(wParam) + 7, wParam); case WM_MOUSEWHEEL: if (SendMessage (hwnd, WM_NCHITTEST, 0, MAKELONG(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))) == HTCLIENT) { /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); return 0; } else break; case WM_MOUSEHWHEEL: if (SendMessage (hwnd, WM_NCHITTEST, 0, MAKELONG(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam))) == HTCLIENT) { /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); return 0; } else break; case WM_SETFOCUS: if (s_pScreenPriv == NULL || s_pScreenInfo->fIgnoreInput) break; { /* Get the parent window for transient handling */ HWND hParent = GetParent(hwnd); if (hParent && IsIconic(hParent)) ShowWindow(hParent, SW_RESTORE); } winRestoreModeKeyStates(); /* Add the keyboard hook if possible */ if (g_fKeyboardHookLL) g_fKeyboardHookLL = winInstallKeyboardHookLL(); return 0; case WM_KILLFOCUS: /* Pop any pressed keys since we are losing keyboard focus */ winKeybdReleaseKeys(); /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL(); /* Revert the X focus as well, but only if the Windows focus is going to another window */ if (!wParam && pWin) DeleteWindowFromAnyEvents(pWin, FALSE); return 0; case WM_SYSDEADCHAR: case WM_DEADCHAR: /* * NOTE: We do nothing with WM_*CHAR messages, * nor does the root window, so we can just toss these messages. */ return 0; case WM_SYSKEYDOWN: case WM_KEYDOWN: /* * Don't pass Alt-F4 key combo to root window, * let Windows translate to WM_CLOSE and close this top-level window. * * NOTE: We purposely don't check the fUseWinKillKey setting because * it should only apply to the key handling for the root window, * not for top-level window-manager windows. * * ALSO NOTE: We do pass Ctrl-Alt-Backspace to the root window * because that is a key combo that no X app should be expecting to * receive, since it has historically been used to shutdown the X server. * Passing Ctrl-Alt-Backspace to the root window preserves that * behavior, assuming that -unixkill has been passed as a parameter. */ if (wParam == VK_F4 && (GetKeyState(VK_MENU) & 0x8000)) break; #if CYGWINDOWING_DEBUG if (wParam == VK_ESCAPE) { /* Place for debug: put any tests and dumps here */ WINDOWPLACEMENT windPlace; RECT rc; LPRECT pRect; windPlace.length = sizeof(WINDOWPLACEMENT); GetWindowPlacement(hwnd, &windPlace); pRect = &windPlace.rcNormalPosition; ErrorF("\nCYGWINDOWING Dump:\n" "\tdrawable: (%hd, %hd) - %hdx%hd\n", pDraw->x, pDraw->y, pDraw->width, pDraw->height); ErrorF("\twindPlace: (%d, %d) - %dx%d\n", (int)pRect->left, (int)pRect->top, (int)(pRect->right - pRect->left), (int)(pRect->bottom - pRect->top)); if (GetClientRect(hwnd, &rc)) { pRect = &rc; ErrorF("\tClientRect: (%d, %d) - %dx%d\n", (int)pRect->left, (int)pRect->top, (int)(pRect->right - pRect->left), (int)(pRect->bottom - pRect->top)); } if (GetWindowRect(hwnd, &rc)) { pRect = &rc; ErrorF("\tWindowRect: (%d, %d) - %dx%d\n", (int)pRect->left, (int)pRect->top, (int)(pRect->right - pRect->left), (int)(pRect->bottom - pRect->top)); } ErrorF("\n"); } #endif /* Pass the message to the root window */ return winWindowProc(hwndScreen, message, wParam, lParam); case WM_SYSKEYUP: case WM_KEYUP: /* Pass the message to the root window */ return winWindowProc(hwndScreen, message, wParam, lParam); case WM_HOTKEY: /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); return 0; case WM_ACTIVATE: /* Pass the message to the root window */ SendMessage(hwndScreen, message, wParam, lParam); if (LOWORD(wParam) != WA_INACTIVE) { /* Raise the window to the top in Z order */ /* ago: Activate does not mean putting it to front! */ /* wmMsg.msg = WM_WM_RAISE; if (fWMMsgInitialized) winSendMessageToWM (s_pScreenPriv->pWMInfo, &wmMsg); */ /* Tell our Window Manager thread to activate the window */ wmMsg.msg = WM_WM_ACTIVATE; if (fWMMsgInitialized) if (!pWin || !pWin->overrideRedirect) /* for OOo menus */ winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); } /* Prevent the mouse wheel from stalling when another window is minimized */ if (HIWORD(wParam) == 0 && LOWORD(wParam) == WA_ACTIVE && (HWND) lParam != NULL && (HWND) lParam != GetParent(hwnd)) SetFocus(hwnd); return 0; case WM_ACTIVATEAPP: /* * This message is also sent to the root window * so we do nothing for individual multiwindow windows */ break; case WM_CLOSE: /* Remove AppUserModelID property */ winSetAppUserModelID(hwnd, NULL); /* Branch on if the window was killed in X already */ if (pWinPriv->fXKilled) { /* Window was killed, go ahead and destroy the window */ DestroyWindow(hwnd); } else { /* Tell our Window Manager thread to kill the window */ wmMsg.msg = WM_WM_KILL; if (fWMMsgInitialized) winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); } return 0; case WM_DESTROY: /* Branch on if the window was killed in X already */ if (pWinPriv && !pWinPriv->fXKilled) { ErrorF("winTopLevelWindowProc - WM_DESTROY - WM_WM_KILL\n"); /* Tell our Window Manager thread to kill the window */ wmMsg.msg = WM_WM_KILL; if (fWMMsgInitialized) winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); } RemoveProp(hwnd, WIN_WINDOW_PROP); RemoveProp(hwnd, WIN_WID_PROP); RemoveProp(hwnd, WIN_NEEDMANAGE_PROP); break; case WM_MOVE: /* Adjust the X Window to the moved Windows window */ if (!hasEnteredSizeMove) winAdjustXWindow(pWin, hwnd); /* else: Wait for WM_EXITSIZEMOVE */ return 0; case WM_SHOWWINDOW: /* Bail out if the window is being hidden */ if (!wParam) return 0; /* */ if (!pWin->overrideRedirect) { HWND zstyle = HWND_NOTOPMOST; /* Flag that this window needs to be made active when clicked */ SetProp(hwnd, WIN_NEEDMANAGE_PROP, (HANDLE) 1); /* Set the transient style flags */ if (GetParent(hwnd)) SetWindowLongPtr(hwnd, GWL_STYLE, WS_POPUP | WS_OVERLAPPED | WS_SYSMENU | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); /* Set the window standard style flags */ else SetWindowLongPtr(hwnd, GWL_STYLE, (WS_POPUP | WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN | WS_CLIPSIBLINGS) & ~WS_CAPTION & ~WS_SIZEBOX); winUpdateWindowPosition(hwnd, &zstyle); { WinXWMHints hints; if (winMultiWindowGetWMHints(pWin, &hints)) { /* Give the window focus, unless it has an InputHint which is FALSE (this is used by e.g. glean to avoid every test window grabbing the focus) */ if (!((hints.flags & InputHint) && (!hints.input))) { SetForegroundWindow(hwnd); } } } wmMsg.msg = WM_WM_MAP_MANAGED; } else { /* It is an overridden window so make it top of Z stack */ HWND forHwnd = GetForegroundWindow(); #if CYGWINDOWING_DEBUG ErrorF("overridden window is shown\n"); #endif if (forHwnd != NULL) { if (GetWindowLongPtr(forHwnd, GWLP_USERDATA) & (LONG_PTR) XMING_SIGNATURE) { if (GetWindowLongPtr(forHwnd, GWL_EXSTYLE) & WS_EX_TOPMOST) SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); else SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE); } } wmMsg.msg = WM_WM_MAP_UNMANAGED; } /* Tell our Window Manager thread to map the window */ if (fWMMsgInitialized) winSendMessageToWM(s_pScreenPriv->pWMInfo, &wmMsg); winStartMousePolling(s_pScreenPriv); return 0; case WM_SIZING: /* Need to legalize the size according to WM_NORMAL_HINTS */ /* for applications like xterm */ return ValidateSizing(hwnd, pWin, wParam, lParam); case WM_WINDOWPOSCHANGED: { LPWINDOWPOS pWinPos = (LPWINDOWPOS) lParam; if (!(pWinPos->flags & SWP_NOZORDER)) { #if CYGWINDOWING_DEBUG winDebug("\twindow z order was changed\n"); #endif if (pWinPos->hwndInsertAfter == HWND_TOP || pWinPos->hwndInsertAfter == HWND_TOPMOST || pWinPos->hwndInsertAfter == HWND_NOTOPMOST) { #if CYGWINDOWING_DEBUG winDebug("\traise to top\n"); #endif /* Raise the window to the top in Z order */ winRaiseWindow(pWin); } else if (pWinPos->hwndInsertAfter == HWND_BOTTOM) { } else { /* Check if this window is top of X windows. */ HWND hWndAbove = NULL; DWORD dwCurrentProcessID = GetCurrentProcessId(); DWORD dwWindowProcessID = 0; for (hWndAbove = pWinPos->hwndInsertAfter; hWndAbove != NULL; hWndAbove = GetNextWindow(hWndAbove, GW_HWNDPREV)) { /* Ignore other XWin process's window */ GetWindowThreadProcessId(hWndAbove, &dwWindowProcessID); if ((dwWindowProcessID == dwCurrentProcessID) && GetProp(hWndAbove, WIN_WINDOW_PROP) && !IsWindowVisible(hWndAbove) && !IsIconic(hWndAbove)) /* ignore minimized windows */ break; } /* If this is top of X windows in Windows stack, raise it in X stack. */ if (hWndAbove == NULL) { #if CYGWINDOWING_DEBUG winDebug("\traise to top\n"); #endif winRaiseWindow(pWin); } } } } /* * Pass the message to DefWindowProc to let the function * break down WM_WINDOWPOSCHANGED to WM_MOVE and WM_SIZE. */ break; case WM_ENTERSIZEMOVE: hasEnteredSizeMove = TRUE; return 0; case WM_EXITSIZEMOVE: /* Adjust the X Window to the moved Windows window */ hasEnteredSizeMove = FALSE; winAdjustXWindow(pWin, hwnd); return 0; case WM_SIZE: /* see dix/window.c */ #if CYGWINDOWING_DEBUG { char buf[64]; switch (wParam) { case SIZE_MINIMIZED: strcpy(buf, "SIZE_MINIMIZED"); break; case SIZE_MAXIMIZED: strcpy(buf, "SIZE_MAXIMIZED"); break; case SIZE_RESTORED: strcpy(buf, "SIZE_RESTORED"); break; default: strcpy(buf, "UNKNOWN_FLAG"); } ErrorF("winTopLevelWindowProc - WM_SIZE to %dx%d (%s)\n", (int) LOWORD(lParam), (int) HIWORD(lParam), buf); } #endif if (!hasEnteredSizeMove) { /* Adjust the X Window to the moved Windows window */ winAdjustXWindow(pWin, hwnd); } /* else: wait for WM_EXITSIZEMOVE */ return 0; /* end of WM_SIZE handler */ case WM_STYLECHANGING: /* When the style changes, adjust the Windows window size so the client area remains the same size, and adjust the Windows window position so that the client area remains in the same place. */ { RECT newWinRect; DWORD dwExStyle; DWORD dwStyle; DWORD newStyle = ((STYLESTRUCT *) lParam)->styleNew; WINDOWINFO wi; dwExStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE); winDebug("winTopLevelWindowProc - WM_STYLECHANGING from %08x %08x\n", (unsigned int)dwStyle, (unsigned int)dwExStyle); if (wParam == GWL_EXSTYLE) dwExStyle = newStyle; if (wParam == GWL_STYLE) dwStyle = newStyle; winDebug("winTopLevelWindowProc - WM_STYLECHANGING to %08x %08x\n", (unsigned int)dwStyle, (unsigned int)dwExStyle); /* Get client rect in screen coordinates */ wi.cbSize = sizeof(WINDOWINFO); GetWindowInfo(hwnd, &wi); winDebug ("winTopLevelWindowProc - WM_STYLECHANGING client area {%d, %d, %d, %d}, {%d x %d}\n", (int)wi.rcClient.left, (int)wi.rcClient.top, (int)wi.rcClient.right, (int)wi.rcClient.bottom, (int)(wi.rcClient.right - wi.rcClient.left), (int)(wi.rcClient.bottom - wi.rcClient.top)); newWinRect = wi.rcClient; if (!AdjustWindowRectEx(&newWinRect, dwStyle, FALSE, dwExStyle)) winDebug ("winTopLevelWindowProc - WM_STYLECHANGING AdjustWindowRectEx failed\n"); winDebug ("winTopLevelWindowProc - WM_STYLECHANGING window area should be {%d, %d, %d, %d}, {%d x %d}\n", (int)newWinRect.left, (int)newWinRect.top, (int)newWinRect.right, (int)newWinRect.bottom, (int)(newWinRect.right - newWinRect.left), (int)(newWinRect.bottom - newWinRect.top)); /* Style change hasn't happened yet, so we can't adjust the window size yet, as the winAdjustXWindow() which WM_SIZE does will use the current (unchanged) style. Instead make a note to change it when WM_STYLECHANGED is received... */ pWinPriv->hDwp = BeginDeferWindowPos(1); pWinPriv->hDwp = DeferWindowPos(pWinPriv->hDwp, hwnd, NULL, newWinRect.left, newWinRect.top, newWinRect.right - newWinRect.left, newWinRect.bottom - newWinRect.top, SWP_NOACTIVATE | SWP_NOZORDER); } return 0; case WM_STYLECHANGED: { if (pWinPriv->hDwp) { EndDeferWindowPos(pWinPriv->hDwp); pWinPriv->hDwp = NULL; } winDebug("winTopLevelWindowProc - WM_STYLECHANGED done\n"); } return 0; case WM_MOUSEACTIVATE: /* Check if this window needs to be made active when clicked */ if (!GetProp(pWinPriv->hWnd, WIN_NEEDMANAGE_PROP)) { #if CYGMULTIWINDOW_DEBUG ErrorF("winTopLevelWindowProc - WM_MOUSEACTIVATE - " "MA_NOACTIVATE\n"); #endif /* */ return MA_NOACTIVATE; } break; case WM_SETCURSOR: if (LOWORD(lParam) == HTCLIENT) { if (!g_fSoftwareCursor) SetCursor(s_pScreenPriv->cursor.handle); return TRUE; } break; case WM_DWMCOMPOSITIONCHANGED: /* This message is only sent on Vista/W7 */ CheckForAlpha(hwnd, pWin, s_pScreenInfo); return 0; default: break; } ret = DefWindowProc(hwnd, message, wParam, lParam); /* * If the window was minized we get the stack change before the window is restored * and so it gets lost. Ensure there stacking order is correct. */ if (needRestack) winReorderWindowsMultiWindow(); return ret; } xorg-server-21.1.16/hw/xwin/propertystore.h0000644000175000017500000000605514757411105014356 /* * Copyright (C) 2011 Tobias Häußler * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef PROPERTYSTORE_H #define PROPERTYSTORE_H #include #ifdef __MINGW64_VERSION_MAJOR /* If we are using headers from mingw-w64 project, it provides the PSDK headers this needs ... */ #include #include #else /* !__MINGW64_VERSION_MAJOR */ /* ... otherwise, we need to define all this stuff ourselves */ typedef struct _tagpropertykey { GUID fmtid; DWORD pid; } PROPERTYKEY; #define REFPROPERTYKEY const PROPERTYKEY * #define REFPROPVARIANT const PROPVARIANT * WINOLEAPI PropVariantClear(PROPVARIANT *pvar); #ifdef INTERFACE #undef INTERFACE #endif #define INTERFACE IPropertyStore DECLARE_INTERFACE_(IPropertyStore, IUnknown) { STDMETHOD(QueryInterface) (THIS_ REFIID, PVOID *) PURE; STDMETHOD_(ULONG, AddRef) (THIS) PURE; STDMETHOD_(ULONG, Release) (THIS) PURE; STDMETHOD(GetCount) (THIS_ DWORD) PURE; STDMETHOD(GetAt) (THIS_ DWORD, PROPERTYKEY) PURE; STDMETHOD(GetValue) (THIS_ REFPROPERTYKEY, PROPVARIANT) PURE; STDMETHOD(SetValue) (THIS_ REFPROPERTYKEY, REFPROPVARIANT) PURE; STDMETHOD(Commit) (THIS) PURE; }; #undef INTERFACE typedef IPropertyStore *LPPROPERTYSTORE; DEFINE_GUID(IID_IPropertyStore, 0x886d8eeb, 0x8cf2, 0x4446, 0x8d, 0x02, 0xcd, 0xba, 0x1d, 0xbd, 0xcf, 0x99); #ifdef INITGUID #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) GUID_EXT const PROPERTYKEY DECLSPEC_SELECTANY name = { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }, pid } #else #define DEFINE_PROPERTYKEY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8, pid) GUID_EXT const PROPERTYKEY name #endif DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0, 0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 5); #endif /* !__MINGW64_VERSION_MAJOR */ typedef HRESULT(__stdcall * SHGETPROPERTYSTOREFORWINDOWPROC) (HWND, REFIID, void **); #endif xorg-server-21.1.16/hw/xwin/winSetAppUserModelID.c0000644000175000017500000000663214757411105015360 /* * Copyright (C) 2011 Tobias Häußler * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include #include #include #include #include "winwindow.h" #include "os.h" #include "winmsg.h" #include #define INITGUID #include "initguid.h" #include "propertystore.h" #undef INITGUID static HMODULE g_hmodShell32Dll = NULL; static SHGETPROPERTYSTOREFORWINDOWPROC g_pSHGetPropertyStoreForWindow = NULL; void winPropertyStoreInit(void) { /* Load library and get function pointer to SHGetPropertyStoreForWindow() SHGetPropertyStoreForWindow is only supported since Windows 7. On previous versions the pointer will be NULL and taskbar grouping is not supported. winSetAppUserModelID() will do nothing in this case. */ g_hmodShell32Dll = LoadLibrary("shell32.dll"); if (g_hmodShell32Dll == NULL) { ErrorF("winPropertyStoreInit - Could not load shell32.dll\n"); return; } g_pSHGetPropertyStoreForWindow = (SHGETPROPERTYSTOREFORWINDOWPROC) GetProcAddress(g_hmodShell32Dll, "SHGetPropertyStoreForWindow"); if (g_pSHGetPropertyStoreForWindow == NULL) { ErrorF ("winPropertyStoreInit - Could not get SHGetPropertyStoreForWindow address\n"); return; } } void winPropertyStoreDestroy(void) { if (g_hmodShell32Dll != NULL) { FreeLibrary(g_hmodShell32Dll); g_hmodShell32Dll = NULL; g_pSHGetPropertyStoreForWindow = NULL; } } void winSetAppUserModelID(HWND hWnd, const char *AppID) { PROPVARIANT pv; IPropertyStore *pps = NULL; HRESULT hr; if (g_pSHGetPropertyStoreForWindow == NULL) { return; } winDebug("winSetAppUserMOdelID - hwnd 0x%p appid '%s'\n", hWnd, AppID); hr = g_pSHGetPropertyStoreForWindow(hWnd, &IID_IPropertyStore, (void **) &pps); if (SUCCEEDED(hr) && pps) { memset(&pv, 0, sizeof(PROPVARIANT)); if (AppID) { pv.vt = VT_LPWSTR; hr = SHStrDupA(AppID, &pv.pwszVal); } if (SUCCEEDED(hr)) { pps->lpVtbl->SetValue(pps, &PKEY_AppUserModel_ID, &pv); PropVariantClear(&pv); } pps->lpVtbl->Release(pps); } } xorg-server-21.1.16/hw/xwin/winrandr.c0000644000175000017500000002215614757411105013234 /* *Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. *Copyright (C) 2009-2010 Jon TURNEY * *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, and to *permit persons to whom the Software is furnished to do so, subject to *the following conditions: * *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 HAROLD L HUNT II 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 author(s) *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 author(s) * * Authors: Harold L Hunt II * Jon TURNEY */ #ifdef HAVE_XWIN_CONFIG_H #include #endif #include "win.h" /* * Answer queries about the RandR features supported. */ static Bool winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations) { winDebug("winRandRGetInfo ()\n"); /* Don't support rotations */ *pRotations = RR_Rotate_0; return TRUE; } static void winRandRUpdateMode(ScreenPtr pScreen, RROutputPtr output) { /* Delete previous mode */ if (output->modes[0]) { RRModeDestroy(output->modes[0]); RRModeDestroy(output->crtc->mode); } /* Register current mode */ { xRRModeInfo modeInfo; RRModePtr mode; char name[100]; memset(&modeInfo, '\0', sizeof(modeInfo)); snprintf(name, sizeof(name), "%dx%d", pScreen->width, pScreen->height); modeInfo.width = pScreen->width; modeInfo.height = pScreen->height; modeInfo.hTotal = pScreen->width; modeInfo.vTotal = pScreen->height; modeInfo.dotClock = 0; modeInfo.nameLength = strlen(name); mode = RRModeGet(&modeInfo, name); output->modes[0] = mode; output->numModes = 1; mode = RRModeGet(&modeInfo, name); output->crtc->mode = mode; } } /* */ void winDoRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { rrScrPrivPtr pRRScrPriv; winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; WindowPtr pRoot = pScreen->root; /* Ignore changes which do nothing */ if ((pScreen->width == width) && (pScreen->height == height) && (pScreen->mmWidth == mmWidth) && (pScreen->mmHeight == mmHeight)) return; // Prevent screen updates while we change things around SetRootClip(pScreen, ROOT_CLIP_NONE); /* Update the screen size as requested */ pScreenInfo->dwWidth = width; pScreenInfo->dwHeight = height; /* Reallocate the framebuffer used by the drawing engine */ (*pScreenPriv->pwinFreeFB) (pScreen); if (!(*pScreenPriv->pwinAllocateFB) (pScreen)) { ErrorF("winDoRandRScreenSetSize - Could not reallocate framebuffer\n"); } pScreen->width = width; pScreen->height = height; pScreen->mmWidth = mmWidth; pScreen->mmHeight = mmHeight; /* Update the screen pixmap to point to the new framebuffer */ winUpdateFBPointer(pScreen, pScreenInfo->pfb); // pScreen->devPrivate == pScreen->GetScreenPixmap(screen) ? // resize the root window //pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL); // does this emit a ConfigureNotify?? // Restore the ability to update screen, now with new dimensions SetRootClip(pScreen, ROOT_CLIP_FULL); // and arrange for it to be repainted pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); // Set mode to current display size pRRScrPriv = rrGetScrPriv(pScreen); winRandRUpdateMode(pScreen, pRRScrPriv->primaryOutput); /* Indicate that a screen size change took place */ RRScreenSizeNotify(pScreen); } /* * Respond to resize request */ static Bool winRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; winDebug("winRandRScreenSetSize ()\n"); /* It doesn't currently make sense to allow resize in fullscreen mode (we'd actually have to list the supported resolutions) */ if (pScreenInfo->fFullScreen) { ErrorF ("winRandRScreenSetSize - resize not supported in fullscreen mode\n"); return FALSE; } /* Client resize requests aren't allowed in rootless modes, even if the X screen is monitor or virtual desktop size, we'd need to resize the native display size */ if (FALSE || pScreenInfo->fRootless || pScreenInfo->fMultiWindow ) { ErrorF ("winRandRScreenSetSize - resize not supported in rootless modes\n"); return FALSE; } winDoRandRScreenSetSize(pScreen, width, height, mmWidth, mmHeight); /* Cause the native window for the screen to resize itself */ { DWORD dwStyle, dwExStyle; RECT rcClient; rcClient.left = 0; rcClient.top = 0; rcClient.right = width; rcClient.bottom = height; ErrorF("winRandRScreenSetSize new client area w: %d h: %d\n", width, height); /* Get the Windows window style and extended style */ dwExStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_EXSTYLE); dwStyle = GetWindowLongPtr(pScreenPriv->hwndScreen, GWL_STYLE); /* * Calculate the window size needed for the given client area * adjusting for any decorations it will have */ AdjustWindowRectEx(&rcClient, dwStyle, FALSE, dwExStyle); ErrorF("winRandRScreenSetSize new window area w: %d h: %d\n", (int)(rcClient.right - rcClient.left), (int)(rcClient.bottom - rcClient.top)); SetWindowPos(pScreenPriv->hwndScreen, NULL, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, SWP_NOZORDER | SWP_NOMOVE); } return TRUE; } /* * Initialize the RandR layer. */ Bool winRandRInit(ScreenPtr pScreen) { rrScrPrivPtr pRRScrPriv; winDebug("winRandRInit ()\n"); if (!RRScreenInit(pScreen)) { ErrorF("winRandRInit () - RRScreenInit () failed\n"); return FALSE; } /* Set some RandR function pointers */ pRRScrPriv = rrGetScrPriv(pScreen); pRRScrPriv->rrGetInfo = winRandRGetInfo; pRRScrPriv->rrSetConfig = NULL; pRRScrPriv->rrScreenSetSize = winRandRScreenSetSize; pRRScrPriv->rrCrtcSet = NULL; pRRScrPriv->rrCrtcSetGamma = NULL; /* Create a CRTC and an output for the screen, and hook them together */ { RRCrtcPtr crtc; RROutputPtr output; crtc = RRCrtcCreate(pScreen, NULL); if (!crtc) return FALSE; crtc->rotations = RR_Rotate_0; output = RROutputCreate(pScreen, "default", 7, NULL); if (!output) return FALSE; RROutputSetCrtcs(output, &crtc, 1); RROutputSetConnection(output, RR_Connected); RROutputSetSubpixelOrder(output, PictureGetSubpixelOrder(pScreen)); output->crtc = crtc; /* Set crtc outputs (should use RRCrtcNotify?) */ crtc->outputs = malloc(sizeof(RROutputPtr)); crtc->outputs[0] = output; crtc->numOutputs = 1; pRRScrPriv->primaryOutput = output; /* Ensure we have space for exactly one mode */ output->modes = malloc(sizeof(RRModePtr)); output->modes[0] = NULL; /* Set mode to current display size */ winRandRUpdateMode(pScreen, output); /* Make up some physical dimensions */ output->mmWidth = (pScreen->width * 25.4)/monitorResolution; output->mmHeight = (pScreen->height * 25.4)/monitorResolution; /* Allocate and make up a (fixed, linear) gamma ramp */ { int i; RRCrtcGammaSetSize(crtc, 256); for (i = 0; i < crtc->gammaSize; i++) { crtc->gammaRed[i] = i << 8; crtc->gammaBlue[i] = i << 8; crtc->gammaGreen[i] = i << 8; } } } /* The screen doesn't have to be limited to the actual monitor size (we can have scrollbars :-), so set the upper limit to the maximum coordinates X11 can use. */ RRScreenSetSizeRange(pScreen, 0, 0, 32768, 32768); return TRUE; } xorg-server-21.1.16/hw/xwin/system.XWinrc0000644000175000017500000000677514757411105013735 # XWin Server Resource File - EXAMPLE # Earle F. Philhower, III # Place in ~/.XWinrc or in /etc/X11/system.XWinrc # Keywords are case insensitive, comments legal pretty much anywhere # you can have an end-of-line # Comments begin with "#" or "//" and go to the end-of-line # Menus are defined as... # MENU { #

EXEC # ^^ This command will have any "%display%" # string replaced with the proper display # variable (i.e. 127.0.0.1:.0) # (This should only rarely be needed as # the DISPLAY environment variable is also # set correctly) # or MENU # or ALWAYSONTOP # ^^ Sets the window to display above all others # or RELOAD # ^^ Causes ~/.XWinrc or the system.XWinrc file # to be reloaded and icons and menus regenerated # or SEPARATOR # ... # } # Set the taskmar menu with # ROOTMENU # If you want a menu to be applied to all popup window's system menu # DEFAULTSYSMENU # To choose a specific menu for a specific WM_CLASS or WM_NAME use ... # SYSMENU { # # ... # } # When specifying an ICONFILE in the following commands several different # formats are allowed: # 1. Name of a regular Windows .ico format file # (ex: "cygwin.ico", "apple.ico") # 2. Name and index into a Windows .DLL # (ex: "c:\windows\system32\shell32.dll,4" gives the default folder icon # "c:\windows\system32\shell32.dll,5" gives the floppy drive icon) # 3. Index into XWin.EXE internal ICON resource # (ex: ",101" is the 1st icon inside XWin.exe) # To define where ICO files live (** Windows path**) # ICONDIRECTORY # NOTE: If you specify an absolute path in Windows or Cygwin format to an ICON below # (i.e. "c:\icons\xxx.ico" or "/usr/share/icons/xxx.ico") # this ICONDIRECTORY will not be prepended # To change the taskbar icon use... # TRAYICON # To define a replacement for the standard X icon for apps w/o specified icons # DEFAULTICON # To define substitute icons on a per-window basis use... # ICONS { # # ... # } # In the case where multiple matches occur, the first listed in the ICONS # section will be chosen. # To disable exit confirmation dialog add the line containing SilentExit # DEBUG prints out the string to the XWin.log file // Below are just some silly menus to demonstrate writing your // own configuration file. // Make some menus... menu apps { xterm exec "xterm" "Emacs" exec "emacs" notepad exec notepad xload exec "xload -display %display%" # Comment } menu root { // Comments fit here, too... "Reload .XWinrc" RELOAD "Applications" menu apps SEParATOR } menu aot { Separator "Always on Top" alwaysontop } menu xtermspecial { "Emacs" exec "emacs" "Always on Top" alwaysontop SepArAtor } RootMenu root DefaultSysMenu aot atend SysMenu { "xterm" xtermspecial atstart } # IconDirectory "c:\winnt\" # DefaultIcon "reinstall.ico" # Icons { # "xterm" "uninstall.ico" # } SilentExit DEBUG "Done parsing the configuration file..." xorg-server-21.1.16/hw/xwin/X.ico0000644000175000017500000006117614757411105012154  00h ( 00 h^"00 %'  nM h^(0`ppp@w0333x30s3;{y;3p3993ppyp p 0pp 9p 9 p w pp pxyppp 9 9xxp30xpp377ppppp??8?@~<?||8@~?<1@??( @pp 03q;{yx p pppw9p pp  7pp;17ppp?À???( 7w7s7xx p0w pwppwÃ8 (0` ppp(((000@@@HHH``` 8(hx x@(p@H p8p@x`xppx(@`8pXxHHxPp`p(XHX@xphPh(HHH P0((0 p0XHXh``(XHP Ph0X@H@x880X`pX H(HxxxhHPPPX(H(P hX(PPhP X`@XXX`X8X8`PP(Xh XXpH H8hxP PX `0h@`(`(hpP0`` hhhh0p(h phhxHp `(p0p(xPHx`(x0x88x8Px(@Hx@00x8P @HHhH8(x00(@`(HX8xP``8XhpP8880@X`PppPHXX`H8`pPH@8@H@HP@Hp(08`XPX``@@8888 Y pz\\pm[,Ӻ׹\\ݬMcp4öŷLcqpķ}im7 TKRm m| mXu }mhYgGG iGG p}uuG |}E?@ABC23456) d9:) ,. 01  "#%K%'( Qp R    Y     p??8?@~<?||8@~?<1@??( @&&&RRR ttt888zzz:::(P@<Dt,bN.6>*DP6`J~r~ ~~JNBdd`.8@xz.XJN(X$$$lxhf$DHJ&\ fXNL P222^^^nJHN$RBBB`fJJ`n*R:xB42@N^j*\r:V`X"6B FPFBFJRTTHFdL?@ABCDE3456789:;*+,-./012 !"#$%&'()  ?À???( @kkkccc]]]777+++VVVZZZ-./ %M Wqy%5S!!"H*KKLUUTmN"S%%%320i"OOooo&&&k!QU;l{{{b Z'`555^6iW>:5gm)p/tX"FVJ]"3gDMA>[Y+\s& -%!;;;{ 1 ll G  e r Per G ,/xyz{  1{UGC~CD6D!D<!DDKۭ׫ ۪ V UUU_*p5gZ]VWY\bdfE@=/!!!F OyV`KODA@C@=?AGLIGGGLVGHv+6; T )p׶Q=:8665DXfkoeQrwruVLY[`I>ar1󓟱H?(,~75,Fe캃瘟D no, ,L[;}Vdfg9[m d ! "Yd~A34~4~1:U2vOLKK $DMLXUlʘ\8Eg*o-x0x9={;W}Qo`8n霜(AL{S[{e8flu:Jq'c/s0q2s/yU+%g H `OK{z4dpYwj35pb+n*j%rl u555"3cmlR{ta~0`6`j~1ca&e+g'j!frss;oooKNXP@l CmEgσ!^&^)`(h(hpߙ"111a۽'|t\Ud8Dl=k#U![^'b'c2j]bE .n uPVS6Q PuV$YX!_'dr~B]tkfEEEX\>eE MR&U#XV>lٙ|||/򐐐mkiyQhe,NQ"PRS#Y"ZXw+Y)VKKKtCz{BOiWbTzq|||bbbg|idn|&LV:Snm0ZҘFJLVGzYJxb]^III887G'sip*Xab@JU9i'^pCv1/YMY Dywn ׉ĆJ,,,T&!*)))Gy*pz,zGCQgG```ꝝHHHv :&(iX fAAA. 777gB3 .UUU{hsss,,,333111111111111---  $$$ [[[n(+??8?@~<?||8@~?<1@??( @  rvi^UW^c;;;ITTTj,pzgYNPWZ|}}:{ wKgO[UYagwUFo= 'Ia>FQGCGJSUTHGeL=p$+%u+R;xC42@N_kW##$*\s;WaY"7C R  GG\hh264Pusg`Z~zv>JK`nۨve}coyg)h!i*r'n5\K")]WYRg_b3baOFvT|T#e)i"iV f^T >)CQ!j`Z#s._6e!\$a)h cGGGVVV~!*jh Znp~Y)X!Z!_*efGvvv~k5Wjda ~Q!VX4gE]999WFKVcX@.Sߡ PS#ZPut+\i%C111UnajQZ-[OP![LxBFt?pS;;;|#\]!ILO!V@q9:m8ibbbQQQ aD=paLJQDiX8c>e'''1ngkBdnOJ߶IN%RC>CCC iV^`fQ P Q6NM Q:R!(K:_233^^^ ^yn~P/\$DkIK'\LT7MU7|i::: n(Q@<{DzuP Bbv{{{LYM YM`$9RRRa 888^'''#uuuFf l'''2RRR Z ŧF8ت?À???(  @fffCZZZZZZZZZEEE\\\)*"{+DDD !!!"3gDMA>[βY+\sm%)p/tX\kkk"FVJ]hn*]6iWBgm|e"MJ Z'`|rrr444DDD[^oA!QU;l`BBB```GGG]cOb"OO,^MVVV1dfDk%F%N"SCUUU bivZ"LGFH*]A^^^DDDrmRg<IGfW{1Wqy%5S+222tttxm1kkk%M:fIBi 5$DDDb### 222ZZZGGGZZZZZZZZZ1eeeAxorg-server-21.1.16/hw/xwin/XWin.exe.manifest0000755000175000017500000000256314757411105014444 The XWin X Windows server true xorg-server-21.1.16/hw/xwin/man/0000755000175000017500000000000014757411135012074 5xorg-server-21.1.16/hw/xwin/man/Makefile.am0000644000175000017500000000012114757411105014037 include $(top_srcdir)/manpages.am appman_PRE = XWin.man fileman_PRE = XWinrc.man xorg-server-21.1.16/hw/xwin/man/Makefile.in0000644000175000017500000006311114757411116014062 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw/xwin/man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = XWin.man fileman_PRE = XWinrc.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/xwin/man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/xwin/man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/hw/xwin/man/XWin.man0000644000175000017500000003666214757411105013410 .TH XWIN 1 @vendorversion@ .SH NAME XWin \- X Server for the Cygwin environment on Microsoft Windows .SH SYNOPSIS .B XWin [ options ] ... .SH DESCRIPTION \fIXWin\fP is an X Server for the X Window System on the Cygwin environment running on Microsoft Windows. .SH MODES \fIXWin\fP can operate in 3 different modes: .br * \fISingle Window\fP: This is the default mode. Each X screen appears as a single \fIWindows\fP window and all X windows are contained within this window. (In X terminology, the \fIWindows\fP window contains the root window for the screen) .br * \fIMulti-Window\fP: In this mode \fIXWin\fP uses its own integrated window manager in order to handle the top-level X windows, in such a way that they appear as normal \fIWindows\fP windows. .br * \fIRootless\fP: In this mode the X server works in a window containing the whole screen but this root window (traditionally covered with an X hatch pattern) is hidden from view, so only top-level X windows are seen. .SH OPTIONS In addition to the normal server options described in the \fIXserver(1)\fP manual page, \fIXWin\fP accepts the following command line switches, \fIall\fP of which are optional: .SH OPTIONS CONTROLLING WINDOWING MODE Only one of these options may be specified. .TP 8 .B (default) Windowed or rooted mode. Each X screen appears as a single \fIWindows\fP window and all X windows are contained within those windows. .TP 8 .B \-multiwindow Each top-level X window appears in its own \fIWindows\fP window. Also start the integrated \fIWindows\fP-based window manager. .TP 8 .B \-rootless Run the server in rootless mode. The X server works on a window covering the whole screen but the root window is hidden from view. .PP \fBNOTE:\fP \fI-multiwindow\fP mode uses its own internal window manager. All other modes require an external window manager in order to move, resize, and perform other operations on the individual X windows. .SH OPTIONS FOR SPECIFYING X SCREENS An X display may be composed of multiple screens. The default behaviour is to create a single screen 0 that is roughly the size of useful area of the primary monitor (allowing for any window decorations and the task-bar). Screen specific parameters can be applied as a default to all screens by placing those screen specific parameters before any \fB\-screen\fP parameter. Screen specific parameters placed after the first \fB\-screen\fP parameter will apply only to the immediately preceding \fB\-screen\fP parameter. .TP 8 .B \-[no]multimonitors or \-[no]multiplemonitors Create a screen 0 that covers all monitors [the primary monitor] on a system with multiple monitors. Fake XINERAMA data is created describing the individual monitors, (This is similar to the 'merged framebuffer' or 'pseudo-xinerama' mode provided by some drivers for the xorg X server). This option is currently enabled by default in \fB\-multiwindow\fP mode. .TP 8 .B "\-screen \fIscreen_number\fP [\fIW\fP \fIH\fP [\fIX\fP \fIY\fP] | [[\fIW\fPx\fIH\fP[+\fIX\fP+\fIY\fP]][@\fIM\fP]] ] " Create screen number .I screen_number and optionally specify its .I height, .I width and .I initial position. Additionally a .I monitor number (which count from 1) can be specified to place the screen on, at which point, all coordinates become relative to that monitor. Screen numbers must be contiguous starting from zero and cannot be duplicated. Examples: .I " -screen 0 @1 ; on 1st monitor using its full resolution (the default)" .I " -screen 0 800x600+100+100@2 ; on 2nd monitor offset 100,100 size 800x600" .I " -screen 0 1024x768@3 ; on 3rd monitor size 1024x768" .SH OPTIONS CONTROLLING THE APPEARANCE OF THE X SCREEN WINDOWS These parameters only apply to windowed mode screens i.e. not in \fB-multiwindow\fP or \fB-rootless\fP mode. .TP 8 .B "\-fullscreen" The X server window takes the full screen, covering completely the \fIWindows\fP desktop. Currently \fB\-fullscreen\fP may only be applied to one X screen. .TP 8 .B "\-icon" \fIicon-specifier\fP Override the window icon for the screen window from the default. The \fIicon-specifier\fP is as defined in \fIXWinrc(@filemansuffix@)\fP. .TP 8 .B \-nodecoration Do not give the Cygwin/X window a \fIWindows\fP window border, title bar, etc. This parameter is ignored when the \fB\-fullscreen\fP parameter is specified. .TP 8 .B \-scrollbars Alternative name for \fB\-resize=scrollbars\fP. .SH OPTIONS CONTROLLING RESIZE BEHAVIOUR .TP 8 .B \-resize[=none|scrollbars|randr] Select the resize mode of an X screen. The default is \fBnone\fP if \fB\-fullscreen\fP is used, \fBrandr\fP otherwise. .RS .IP \fB\-resize=none\fP 8 The screen is not resizable. In windowed mode, if the window has decorations, a fixed frame is used. Alternative name is \fB\-noresize\fP. .IP \fB\-resize=scrollbars\fP 8 The screen window is resizeable, but the screen is not resizable. In windowed mode, if the window has decorations, a resizing frame is used. Scrollbars are drawn when needed to allow the entire X screen to viewed by adjusting them. This also permits screens bigger than the \fIWindows\fP virtual desktop to be used. This parameter is ignored in \fB-multiwindow\fP or \fB-rootless\fP mode. Alternative name is \fB\-scrollbars\fP. .IP \fB\-resize=randr\fP 8 The screen is resizable and the screen window is resizeable. In windowed mode, if the window has decorations, a resizing frame is used. Resizing the \fIWindows\fP window will use the RANDR extension to change the size of the X screen. Likewise, changing the size of the X screen using the RANDR extension will cause the size of the \fIWindows\fP window containing the X screen to be changed. In \fB-multiwindow\fP or \fB-rootless\fP mode, if the X screen is of the same dimensions as a Windows monitor or the virtual desktop, the X server will respond to the WM_DISPLAYCHANGED sent when those dimensions change by resizing the X screen. Changing the size of the X screen using the RANDR extension is not permitted. The maximum dimensions of the screen are the dimensions of the \fIWindows\fP virtual desktop. .IP \fB\-resize\fP 8 on its own is equivalent to \fB\-resize=randr\fP .RE .SH OPTIONS FOR MULTIWINDOW MODE .TP 8 .B \-[no]hostintitle Add the host name to the window title for X applications which are running on remote hosts, when that information is available and it's useful to do so. The default is enabled. .TP 8 .B \-[no]compositewm Use Composite extension redirection to maintain a bitmap image of each top-level X window, so window contents which are occluded show correctly in task bar and task switcher previews. The default is enabled. .TP 8 .B \-[no]compositealpha X windows with per-pixel alpha are composited into the \fIWindows\fP desktop (i.e. a \fIWindows\fP window can be seen through any transparency in an X window placed over it). This option has no effect on Windows 8 and 8.1. This option has no effect if \fB-compositewm\fP is disabled. The default is disabled. .SH OPTIONS CONTROLLING WINDOWS INTEGRATION .TP 8 .B \-[no]clipboard Enables [disables] the integration between the X11 clipboard and \fIWindows\fP clipboard. The default is enabled. .TP 8 .B "\-emulate3buttons [\fItimeout\fP]" Emulate a three button mouse; pressing both buttons within .I timeout milliseconds causes an emulated middle button press. The default .I timeout is 50 milliseconds. Note that most mice with scroll wheel have middle button functionality, usually you will need this option only if you have a two button mouse without scroll wheel. Default is to enable this option if \fIWindows\fP reports a two button mouse, disabled otherwise. .TP 8 .B \-[no]keyhook Enable [disable] a low-level keyboard hook for catching special keypresses like Menu and Alt+Tab and passing them to the X Server instead of letting \fIWindows\fP handle them. .TP 8 .B \-lesspointer Normally the \fIWindows\fP mouse cursor is hidden when the mouse is over an active Cygwin/X window. This option causes the mouse cursor also to be hidden when it is over an inactive Cygwin/X window. This prevents the \fIWindows\fP mouse cursor from being drawn on top of the X cursor. This parameter has no effect unless \fB-swcursor\fP is also specified. .TP 8 .B \-[no]primary Clipboard integration may [will not] use the PRIMARY selection. The default is enabled. .TP 8 .B \-swcursor Disable the usage of the \fIWindows\fP cursor and use the X11 software cursor instead. This option is ignored if \fB-compositewm\fP is also enabled. .TP 8 .B \-[no]trayicon Do not create a tray icon. Default is to create one icon per screen. You can globally disable tray icons with \fB\-notrayicon\fP, then enable it for specific screens with \fB\-trayicon\fP for those screens. .TP 8 .B \-[no]unixkill Enable or disable the \fICtrl-Alt-Backspace\fP key combination as a signal to exit the X Server. The \fICtrl-Alt-Backspace\fP key combination is disabled by default. .TP 8 .B \-[no]wgl Enable [disable] the GLX extension to use the native Windows WGL interface for hardware accelerated OpenGL (AIGLX). The default is enabled. .TP 8 .B \-[no]winkill Enable or disable the \fIAlt-F4\fP key combination as a signal to exit the X Server. The \fIAlt-F4\fP key combination is enabled by default. .SH DRAWING ENGINE OPTIONS .TP 8 .B "\-clipupdates \fInum_boxes\fP" Specify an optional threshold, above which the regions in a shadow update operation will be collected into a GDI clipping region. The clipping region is then used to do a single bit block transfer that is constrained to the updated area by the clipping region. There is some overhead involved in creating, installing, destroying, and removing the clipping region, thus there may not be much benefit for a small number of boxes (less than 10). It is even possible that this functionality does not provide a benefit at any number of boxes; we can only determine the usefulness of this feature through testing. This option probably has limited effect on current \fIWindows\fP versions as they already perform GDI batching. .TP 8 .B "\-engine \fIengine_type_id\fP" This option, which is intended for Cygwin/X developers, overrides the server's automatically selected drawing engine type. This parameter will be ignored if the specified drawing engine type is not supported on the current system. Default behavior is to select the drawing engine with optimum performance that supports the specified depth and window configuration. The engine type ids are: .RS .IP 1 4 Shadow GDI .IP 4 4 Shadow DirectDraw Non-Locking .RE .SH FULLSCREEN OPTIONS .TP 8 .B "\-depth \fIdepth\fP" Specify the color depth, in bits per pixel, to use when running in fullscreen with a DirectDraw engine. This parameter is ignored if \fB\-fullscreen\fP is not specified. .TP 8 .B "\-refresh \fIrate_in_Hz\fP" Specify an optional refresh rate to use when running in fullscreen with a DirectDraw engine. This parameter is ignored if \fB\-fullscreen\fP is not specified. .SH MISCELLANEOUS OPTIONS See also the normal server options described in the \fIXserver(1)\fP manual page .TP 8 .B \-help Write a help text listing supported command line options and their description to the console. .TP 8 .B \-ignoreinput Ignore keyboard and mouse input. This is usually only used for testing and debugging purposes. .TP 8 .B "\-logfile \fIfilename\fP" Change the server log file from the default of \fI @logdir@/XWin.n.log\fP, where \fIn\fP is the display number of the XWin server, to \fIfilename\fP. .TP 8 .B "\-logverbose \fIlevel\fP" Control the degree of verbosity of the log messages with the integer parameter \fIlevel\fP. For \fIlevel\fP=0 only fatal errors are reported, for \fIlevel\fP=1 simple information about configuration is also given, for \fIlevel\fP=2 (default) additional runtime information is recorded and for \fIlevel\fP=3 detailed log information (including trace and debug output) is produced. Bigger values will yield a still more detailed debug output. .TP 8 .B "\-xkblayout \fIlayout\fP" .TP 8 .B "\-xkbmodel \fImodel\fP" .TP 8 .B "\-xkboptions \fIoption\fP" .TP 8 .B "\-xkbrules \fIrule\fP" .TP 8 .B "\-xkbvariant \fIvariant\fp" These options configure the xkeyboard extension to load a particular keyboard map as the X server starts. The behavior is similar to the \fIsetxkbmap\fP(1) program. See the \fIxkeyboard-config\fP(@miscmansuffix@) manual page for a list of keyboard configurations. The keyboard layout data is located at \fI@datadir@/X11/xkb/\fP. Additional information can be found in the README files there and in the \fIsetxkbmap\fP(1) manual page. For example, in order to load a German layout for a pc105 keyboard, use the options: .br .I " \-xkblayout de \-xkbmodel pc105" Alternatively, you can use the \fIsetxkbmap\fP(1) program after \fIXWin\fP is running. The default is to select a keyboard configuration matching your current layout as reported by \fIWindows\fP, if known, or the default X server configuration if no matching keyboard configuration was found. .SH UNDOCUMENTED OPTIONS These options are undocumented. Do not use them. .TP 8 .B \-emulatepseudo Create a depth 8 PseudoColor visual when running in depths 15, 16, 24, or 32, collectively known as TrueColor depths. Color map manipulation is not supported, so the PseudoColor visual will not have the correct colors. This option is intended to allow applications which only work with a depth 8 visual to operate in TrueColor modes. .SH LOG FILE As it runs \fIXWin\fP writes messages indicating the most relevant events to the console from which it was called and to a log file that by default is located at \fI @logdir@/XWin.0.log\fP. This file is mainly for debugging purposes. .SH PREFERENCES FILE On startup \fIXWin\fP looks for the file \fI$HOME/.XWinrc\fP or, if the previous file does not exist, \fI @sysconfdir@/X11/system.XWinrc\fP. \fI.XWinrc\fP allows setting preferences for the following: .br * To include items into the menu associated with the \fIXWin\fP icon which is in the \fIWindows\fP system tray. This functions in all modes that have a tray icon. .br * To include items in the system menu which is associated with the \fIWindows\fP window that \fIXWin -multiwindow\fP produces for each top-level X window, in both the generic case and for particular programs. .br * To change the icon that is associated to the \fIWindows\fP window that \fIXWin -multiwindow\fP produces for each top-level X-window. .br * To change the style that is associated to the \fIWindows\fP window that \fXWin I-multiwindow\fP produces for each top-level X window. .PP The format of the \fI.XWinrc\fP file is given in the XWinrc(5) manual page. .SH EXAMPLES Need some examples .SH "SEE ALSO" X(@miscmansuffix@), Xserver(1), xdm(1), xinit(1), XWinrc(@filemansuffix@), setxkbmap(1), xkeyboard-config(@miscmansuffix@). .SH BUGS .I XWin and this manual page still have many limitations. The \fIXWin\fP software is continuously developing; it is therefore possible that this manual page is not up to date. It is always prudent to look also at the output of \fIXWin -help\fP in order to check the options that are operative. .SH AUTHORS This list is by no means complete, but direct contributors to the Cygwin/X project include (in alphabetical order by last name): Stuart Adamson, Michael Bax, Jehan Bing, Lev Bishop, Dr. Peter Busch, Biju G C, Robert Collins, Nick Crabtree, Early Ehlinger, Christopher Faylor, John Fortin, Brian Genisio, Fabrizio Gennari, Alexander Gottwald, Ralf Habacker, Colin Harrison, Matthieu Herrb, Alan Hourihane, Pierre A Humblet, Harold L Hunt II, Dakshinamurthy Karra, Joe Krahn, Paul Loewenstein, Kensuke Matsuzaki, Takuma Murakami, Earle F. Philhower III, Benjamin Riefenstahl, Yaakov Selkowitz, Suhaib Siddiqi, Jack Tanner, Jon Turney and Nicholas Wourms. xorg-server-21.1.16/hw/xwin/man/XWinrc.man0000644000175000017500000001612514757411105013725 .TH XWIN @filemansuffix@ @vendorversion@ .SH NAME XWinrc\- XWin Server Resource Configuration File. .SH DESCRIPTION The X Server for the X Window System on the Cygwin/X environment running on Microsoft Windows, \fIXWin\fP can be optionally configured with the \fIXWinrc\fP file. A system-wide configuration file should be placed in \fI @sysconfdir@/X11/system.XWinrc\fP, a per-user file should be put at \fI$HOME/.XWinrc\fP. The \fIsystem.XWinrc\fP file is read only if no \fI$HOME/.XWinrc\fP exist. .PP With the \fI.XWinrc\fP configuration file it is possible to do the following: .PP 1- To include items into the menu associated with the \fIXWin\fP icon which is in the \fIWindows\fP system tray. This feature functions in all XWin modes that have such tray icon. .PP 2- To include items into the menu which is associated with the \fIWindows\fP window that \fIXWin -multiwindow\fP produces for each top-level X-window. That can be done both for the generic case and for particular programs. .PP 3- To change the icon that is associated to the \fIWindows\fP window that \fIXWin -multiwindow\fP produces for each top-level X-window. Again, that can be done both for the generic case and for particular programs. The new icons associated should be \fIWindows\fP format icons \fI.ico\fP. .PP 4- To change the style that is associated to the \fIWindows\fP window that \fI-multiwindow\fP produces for each top-level X window. Again, that can be done both for the generic case and for particular programs. .SH FILE FORMAT .B Keywords are case insensitive, but in this document they will be written completely capitalized. .PP .B Comments are legal pretty much anywhere you can have an end-of-line; they begin with "#" or "//" and go to the end-of-line. .PP Quote marks in strings are optional unless the string has included spaces, or could be parsed, ambiguously, as a misplaced keyword. .PP There are four kinds of instructions: miscellaneous, menu, icon and style. .SH Miscellaneous instruction .TP 8 .B DEBUG \fIString\fP The \fIString\fP is printed to the XWin log file. .TP 8 .B TRAYICON \fIicon-specifier\fB The \fBTRAYICON\fP keyword changes the icon \fIXWin\fP displays in the system tray area. .TP 8 .B SILENTEXIT The \fBSILENTEXIT\fP keyword, which takes no parameters, disables the exit confirmation dialog if no clients are connected. .TP 8 .B FORCEEXIT The \fBFORCEEXIT\fP keyword, which takes no parameters, disables the exit confirmation dialog always. Unsaved client work may be lost but this may be useful if you want no dialogs. .SH Menu instructions .TP 8 .B MENU \fIMenu_Name\fP { .br .B \fIMenu_Item_Line\fP .br .B \fIMenu_Item_Line\fP .br .B \fI...\fP .br .B } .br This instruction defines a menu and asigns a \fIMenu_Name\fP to it. \fIMenu_Item_Line\fP are lines of any of the following types: .TP 8 .B SEPARATOR .TP 8 .B \fIItem_Label\fP EXEC \fICommand\fP .TP 8 .B \fIItem_Label\fP MENU \fIpreviously-defined-menu-name\fP .TP 8 .B \fIItem_Label\fP ALWAYSONTOP .TP 8 .B \fIItem_Label\fP RELOAD .br The \fIItem_Label\fP is the string that is written in the menu item. .br \fICommand\fP is a string with the command that will be executed by /bin/sh. Here paths should be \fICYGWIN\fP style (e.g. /usr/local/bin/myprogram). A string "%display%" appearing in the \fICommand\fP will be replaced with the proper display variable (i.e. 127.0.0.1:.0). .br \fBALWAYSONTOP\fP sets the window to which the menu is associated to display above all others. .br \fBRELOAD\fP causes the XWinrc file to be reloaded and icons and menus regenerated. .TP 8 .B ROOTMENU \fIpreviously-defined-menu-name\fP Includes the items in the indicated menu into the menu associated with \fIXWin\fP that appears in the system tray. .TP 8 .B DEFAULTSYSMENU \fIpreviously-defined-menu-name\fP ATSTART|ATEND Includes the items in the indicated menu into the menu associated with generic top-level X-Windows in the \fIXWin\fP \fImultiwindow\fP mode. The keywords \fBATSTART\fP and \fBATEND\fP indicate if such items should be included at the start or at the end of the menu. .TP 8 .B SYSMENU { \fIclass-or-name-of-window\fP \fIdefined-menu-name\fP \fBATSTART|ATEND\fP .br \fI...\fP .br \fB}\fP .br Associates a specific menu to a specified window class or name in \fI-multiwindow\fP mode. The keywords ATSTART or ATEND indicate if such items should be included at the start or at the end of the menu. .SH Icon Instructions When specifying an \fIicon-specifier\fP in the following commands several different formats are allowed: .PP .IP \fI"NAME.ICO"\fP 16 filename of an .ico format file .br (e.g. "cygwin.ico", "apple.ico", "C:\\icons\\cheese.ico", "/usr/share/icons/moon.ico") .IP \fI"NAME.DLL,nnn"\fP 16 filename of a DLL with an index into its ICON resources .br (e.g. "c:\\windows\\system32\\shell32.dll,4", the default folder icon, "/usr/bin/cygicons-0.dll,10", the hippo icon) .IP \fI",nnn"\fP 16 index into the XWin executable's internal ICON resources .br (e.g. ",101" is the 1st icon in \fIXWin\fP) .TP 8 .B ICONDIRECTORY \fIWindows-path-to-icon-directory\fP Defines the default directory for the file when an \fIicon-specifier\fP doesn't contain an absolute path. It should be a \fIWindows\fP style path (e.g. C:\\cygwin\\usr\\local\\icons). .TP 8 .B DEFAULTICON \fIicon-specifier\fP Defines a replacement for the standard X icon for applications without specified icons. .TP 8 .B ICONS { .br \fIclass-or-name-of-window\fP \fIicon-specifier\fP .br \fI...\fP .br \fB}\fP .br Defines icon replacements windows matching the specified window class or names. If multiple name or class matches occur for a window, only the first one will be used. .SH Style Instructions .TP 8 .B STYLES { \fIclass-or-name-of-window\fP \fIstyle-keyword-1\fP \fIstyle-keyword-2\fP .br \fI...\fP .br \fB}\fP Associates specific styles to a specified window class or name in \fI-multiwindow\fP mode. If multiple class or name matches occur, for a window, only the first one will be used. The style keywords indicate the following: \fIstyle-keyword-1\fP \fBTOPMOST\fP .br Open the class or name above all NOTOPMOST Microsoft Windows .br \fBMAXIMIZE\fP .br Start the class or name fullscreen. .br \fBMINIMIZE\fP .br Start the class or name iconic. .br \fBBOTTOM\fP .br Open the class or name below all Windows windows. .br \fIstyle-keyword-2\fP \fBNOTITLE\fP .br No Windows title bar, for the class or name. .br \fBOUTLINE\fP .br No Windows title bar and just a thin-line border, for the class or name. .br \fBNOFRAME\fP .br No Windows title bar or border, for the class or name. One keyword in \fIstyle-keyword-1\fP can be used with one keyword in \fIstyle-keyword-2\fP, or any keyword can be used singly. .SH EXAMPLE .TP 8 This example adds an Xterm menu item to the system tray icon \fBMENU systray { .br \t xterm EXEC "xterm -display %display% -sb -sl 999" .br \t SEPARATOR .br } .br ROOTMENU systray \fP .TP 8 This example makes an oclock window frameless in \fI-multiwindow\fP mode \fBSTYLES { .br \t oclock NOFRAME .br } .SH "SEE ALSO" XWin(1) .SH AUTHOR The XWinrc feature of XWin was written primarily by Earle F. Philhower III. Extended for style configuration by Colin Harrison. xorg-server-21.1.16/hw/meson.build0000644000175000017500000000041514757411105012413 if get_option('xephyr') subdir('kdrive') endif if get_option('xvfb') subdir('vfb') endif if build_xnest subdir('xnest') endif if build_xorg subdir('xfree86') endif if build_xquartz subdir('xquartz') endif if build_xwin subdir('xwin') endif xorg-server-21.1.16/hw/Makefile.am0000644000175000017500000000076714757411105012317 if XORG XORG_SUBDIRS = xfree86 endif if XVFB XVFB_SUBDIRS = vfb endif if XNEST XNEST_SUBDIRS = xnest endif if XWIN XWIN_SUBDIRS = xwin endif if KDRIVE KDRIVE_SUBDIRS = kdrive endif if XQUARTZ XQUARTZ_SUBDIRS = xquartz endif SUBDIRS = \ $(XORG_SUBDIRS) \ $(XWIN_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ $(XQUARTZ_SUBDIRS) DIST_SUBDIRS = xfree86 vfb xnest xwin xquartz kdrive relink: $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done xorg-server-21.1.16/hw/Makefile.in0000644000175000017500000006261714757411115012333 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = hw ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @XORG_TRUE@XORG_SUBDIRS = xfree86 @XVFB_TRUE@XVFB_SUBDIRS = vfb @XNEST_TRUE@XNEST_SUBDIRS = xnest @XWIN_TRUE@XWIN_SUBDIRS = xwin @KDRIVE_TRUE@KDRIVE_SUBDIRS = kdrive @XQUARTZ_TRUE@XQUARTZ_SUBDIRS = xquartz SUBDIRS = \ $(XORG_SUBDIRS) \ $(XWIN_SUBDIRS) \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ $(XQUARTZ_SUBDIRS) DIST_SUBDIRS = xfree86 vfb xnest xwin xquartz kdrive all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign hw/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile relink: $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/include/0000755000175000017500000000000014757411132011336 5xorg-server-21.1.16/include/xorg-config.h.meson.in0000644000175000017500000000637014757411105015404 /* xorg-config.h.in: not at all generated. -*- c -*- * * This file differs from xorg-server.h.in in that -server is installed * with the rest of the SDK for external drivers/modules to use, whereas * -config is for internal use only (i.e. building the DDX). * */ #ifndef _XORG_CONFIG_H_ #define _XORG_CONFIG_H_ #include #include /* Building Xorg server. */ #mesondefine XORGSERVER /* Current X.Org version. */ #mesondefine XORG_VERSION_CURRENT /* Name of X server. */ #mesondefine __XSERVERNAME__ /* URL to go to for support. */ #mesondefine __VENDORDWEBSUPPORT__ /* Built-in output drivers. */ #mesondefine DRIVERS /* Built-in input drivers. */ #mesondefine IDRIVERS /* Path to configuration file. */ #mesondefine XF86CONFIGFILE /* Path to configuration file. */ #mesondefine XCONFIGFILE /* Name of configuration directory. */ #mesondefine XCONFIGDIR /* Path to loadable modules. */ #mesondefine DEFAULT_MODULE_PATH /* Path to installed libraries. */ #mesondefine DEFAULT_LIBRARY_PATH /* Default log location */ #mesondefine DEFAULT_LOGDIR /* Default logfile prefix */ #mesondefine DEFAULT_LOGPREFIX /* Default XDG_DATA dir under HOME */ #mesondefine DEFAULT_XDG_DATA_HOME /* Default log dir under XDG_DATA_HOME */ #mesondefine DEFAULT_XDG_DATA_HOME_LOGDIR /* Building DRI-capable DDX. */ #mesondefine XF86DRI /* Build DRI2 extension */ #mesondefine DRI2 /* Define to 1 if you have the header file. */ #mesondefine HAVE_STROPTS_H /* Define to 1 if you have the header file. */ #mesondefine HAVE_SYS_KD_H /* Define to 1 if you have the header file. */ #mesondefine HAVE_SYS_VT_H /* Define to 1 if you have the `walkcontext' function (used on Solaris for xorg_backtrace in hw/xfree86/common/xf86Events.c */ #mesondefine HAVE_WALKCONTEXT /* Building vgahw module */ #mesondefine WITH_VGAHW /* NetBSD PIO alpha IO */ #mesondefine USE_ALPHA_PIO /* BSD AMD64 iopl */ #mesondefine USE_AMD64_IOPL /* BSD /dev/io */ #mesondefine USE_DEV_IO /* BSD i386 iopl */ #mesondefine USE_I386_IOPL /* System is BSD-like */ #mesondefine CSRG_BASED /* System has PC console */ #mesondefine PCCONS_SUPPORT /* System has PCVT console */ #mesondefine PCVT_SUPPORT /* System has syscons console */ #mesondefine SYSCONS_SUPPORT /* System has wscons console */ #mesondefine WSCONS_SUPPORT /* System has /dev/xf86 aperture driver */ #mesondefine HAS_APERTURE_DRV /* Has backtrace support */ #mesondefine HAVE_BACKTRACE /* Name of the period field in struct kbd_repeat */ #mesondefine LNX_KBD_PERIOD_NAME /* Have execinfo.h */ #mesondefine HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #mesondefine HAVE_SYS_MKDEV_H /* Path to text files containing PCI IDs */ #mesondefine PCI_TXT_IDS_PATH /* Build with libdrm support */ #mesondefine WITH_LIBDRM /* Use libpciaccess */ #mesondefine XSERVER_LIBPCIACCESS /* Have setugid */ #mesondefine HAVE_ISSETUGID /* Have getresuid */ #mesondefine HAVE_GETRESUID /* Have X server platform bus support */ #mesondefine XSERVER_PLATFORM_BUS /* Define to 1 if you have the `seteuid' function. */ #mesondefine HAVE_SETEUID /* Fallback input driver if the assigned driver fails */ #mesondefine FALLBACK_INPUT_DRIVER #endif /* _XORG_CONFIG_H_ */ xorg-server-21.1.16/include/xwin-config.h.meson.in0000644000175000017500000000102614757411105015403 /* * xwin-config.h.in * * This file has all defines used in the xwin ddx * */ #include /* Winsock networking */ #mesondefine HAS_WINSOCK /* Cygwin has /dev/windows for signaling new win32 messages */ #mesondefine HAS_DEVWINDOWS /* Switch on debug messages */ #mesondefine CYGDEBUG #mesondefine CYGWINDOWING_DEBUG #mesondefine CYGMULTIWINDOW_DEBUG /* Default log location */ #mesondefine DEFAULT_LOGDIR /* Whether we should re-locate the root to where the executable lives */ #mesondefine RELOCATE_PROJECTROOT xorg-server-21.1.16/include/meson.build0000644000175000017500000005110714757411105013424 version_split = meson.project_version().split('.') major = version_split[0].to_int() minor = version_split[1].to_int() patch = version_split[2].to_int() # convert to the old-style 1.x.y version scheme used up to 1.20.x for backwards compatibility release = 1 * 10000000 + major * 100000 + minor * 1000 + patch dri_dep = dependency('dri', required: build_glx) conf_data = configuration_data() conf_data.set('_DIX_CONFIG_H_', '1') conf_data.set('HAVE_TYPEOF', cc.compiles(''' int foo(int bar) { typeof(bar) baz = 1; return baz; } ''', name: 'typeof()') ? '1' : false) # For feature macros we're using either false (boolean) or '1', which correspond to the macro being # not defined at all and defined to 1. This is to match autotools behavior and thus preserve # backwards compatibility with all the existing code that uses #ifdef to check if feature is # enabled. This ifdef would pass if the macro is defined to 0 which would silently break code # in various places. # # As a complication when we read the configuration from conf_data back we get either string or # bool. Meson does not like comparing things of different types so we always convert the returned # value to an integer using to_int(). conf_data.set('MONOTONIC_CLOCK', cc.has_function('clock_gettime') and cc.compiles(''' #define _POSIX_C_SOURCE 200112L #include #include #ifndef CLOCK_MONOTONIC #error CLOCK_MONOTONIC not defined #endif ''', name: 'CLOCK_MONOTONIC') ? '1' : false) conf_data.set('XSERVER_DTRACE', with_dtrace ? '1' : false) if host_machine.endian() == 'little' conf_data.set('X_BYTE_ORDER', 'X_LITTLE_ENDIAN') else conf_data.set('X_BYTE_ORDER', 'X_BIG_ENDIAN') endif glx_align64 = [] if cc.sizeof('unsigned long') == 8 conf_data.set('_XSERVER64', '1') glx_align64 = '-D__GLX_ALIGN64' endif conf_data.set('_GNU_SOURCE', '1') # autoconf checks for /dev/xf86 here, but the test should be based on # the target, not the build system. Could we get rid of this and just # ifdef for openbsd? conf_data.set('HAS_APERTURE_DRV', host_machine.system() == 'openbsd' ? '1' : false) if get_option('input_thread') == 'false' enable_input_thread = false else enable_input_thread = cc.has_header_symbol('pthread.h', 'PTHREAD_MUTEX_RECURSIVE') if not enable_input_thread and get_option('input_thread') == 'true' error('Input thread enabled and PTHREAD_MUTEX_RECURSIVE not found') endif if host_machine.system() == 'windows' and get_option('input_thread') == 'auto' enable_input_thread = false endif endif conf_data.set('INPUTTHREAD', enable_input_thread ? '1' : false) if cc.compiles(''' #define _GNU_SOURCE 1 #include void foo(int bar) { pthread_setname_np(pthread_self(), "example"); } ''', args: '-Werror-implicit-function-declaration', name: 'pthread_setname_np(tid, name)') conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITH_TID', 1) elif cc.compiles(''' #define _GNU_SOURCE 1 #include void foo(int bar) { pthread_setname_np("example"); } ''', args: '-Werror-implicit-function-declaration', name: 'pthread_setname_np(name)') conf_data.set('HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID', 1) endif conf_data.set('HAVE_LIBBSD', libbsd_dep.found() ? '1' : false) # Note: this symbol is used by libXtrans. conf_data.set('HAVE_SYSTEMD_DAEMON', libsystemd_daemon_dep.found() ? '1' : false) conf_data.set('CONFIG_UDEV', build_udev ? '1' : false) conf_data.set('CONFIG_UDEV_KMS', build_udev_kms ? '1' : false) conf_data.set('HAVE_DBUS', build_dbus ? '1' : false) conf_data.set('CONFIG_HAL', build_hal ? '1' : false) conf_data.set('SYSTEMD_LOGIND', build_systemd_logind ? '1' : false) conf_data.set('NEED_DBUS', build_systemd_logind or build_hal ? '1' : false) conf_data.set('CONFIG_WSCONS', host_machine.system() == 'openbsd' ? '1' : false) conf_data.set('HAVE_XSHMFENCE', xshmfence_dep.found() ? '1' : false) conf_data.set('WITH_LIBDRM', libdrm_required ? '1' : false) conf_data.set('GLAMOR_HAS_EGL_QUERY_DMABUF', epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.4.4') ? '1' : false) conf_data.set('GLAMOR_HAS_EGL_QUERY_DRIVER', epoxy_dep.found() and epoxy_dep.version().version_compare('>= 1.5.4') ? '1' : false) conf_data.set('GLXEXT', build_glx ? '1' : false) conf_data.set('GLAMOR', build_glamor ? '1' : false) conf_data.set('GLAMOR_HAS_GBM', gbm_dep.found() ? '1' : false) conf_data.set('GLAMOR_HAS_GBM_LINEAR', build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 10.6') ? '1' : false) conf_data.set('GBM_BO_WITH_MODIFIERS', build_glamor and gbm_dep.found() and gbm_dep.version().version_compare('>= 17.1') ? '1' : false) conf_data.set_quoted('SERVER_MISC_CONFIG_PATH', serverconfigdir) conf_data.set_quoted('PROJECTROOT', get_option('prefix')) conf_data.set_quoted('SYSCONFDIR', join_paths(get_option('prefix'), get_option('sysconfdir'))) conf_data.set_quoted('SUID_WRAPPER_DIR', join_paths(get_option('prefix'), get_option('libexecdir'))) conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path) conf_data.set('XORG_VERSION_CURRENT', release) conf_data.set('HASXDMAUTH', has_xdm_auth ? '1' : false) conf_data.set('SECURE_RPC', get_option('secure-rpc') ? '1' : false) conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h') ? '1' : false) conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h') ? '1' : false) conf_data.set('HAVE_FCNTL_H', cc.has_header('fcntl.h') ? '1' : false) conf_data.set('HAVE_FNMATCH_H', cc.has_header('fnmatch.h') ? '1' : false) conf_data.set('HAVE_LINUX_AGPGART_H', cc.has_header('linux/agpgart.h') ? '1' : false) conf_data.set('HAVE_STDLIB_H', cc.has_header('stdlib.h') ? '1' : false) conf_data.set('HAVE_STRING_H', cc.has_header('string.h') ? '1' : false) conf_data.set('HAVE_STRINGS_H', cc.has_header('strings.h') ? '1' : false) conf_data.set('HAVE_SYS_AGPGART_H', cc.has_header('sys/agpgart.h') ? '1' : false) conf_data.set('HAVE_SYS_AGPIO_H', cc.has_header('sys/agpio.h') ? '1' : false) conf_data.set('HAVE_SYS_UN_H', cc.has_header('sys/un.h') ? '1' : false) conf_data.set('HAVE_SYS_UTSNAME_H', cc.has_header('sys/utsname.h') ? '1' : false) conf_data.set('HAVE_SYS_SYSMACROS_H', cc.has_header('sys/sysmacros.h') ? '1' : false) conf_data.set('HAVE_UNISTD_H', cc.has_header('unistd.h') ? '1' : false) conf_data.set('HAVE_ARC4RANDOM_BUF', cc.has_function('arc4random_buf', dependencies: libbsd_dep) ? '1' : false) conf_data.set('HAVE_BACKTRACE', cc.has_function('backtrace') ? '1' : false) conf_data.set('HAVE_CBRT', cc.has_function('cbrt') ? '1' : false) conf_data.set('HAVE_EPOLL_CREATE1', cc.has_function('epoll_create1') ? '1' : false) conf_data.set('HAVE_GETUID', cc.has_function('getuid') ? '1' : false) conf_data.set('HAVE_GETEUID', cc.has_function('geteuid') ? '1' : false) conf_data.set('HAVE_ISASTREAM', cc.has_function('isastream') ? '1' : false) conf_data.set('HAVE_ISSETUGID', cc.has_function('issetugid') ? '1' : false) conf_data.set('HAVE_GETIFADDRS', cc.has_function('getifaddrs') ? '1' : false) conf_data.set('HAVE_GETPEEREID', cc.has_function('getpeereid') ? '1' : false) conf_data.set('HAVE_GETPEERUCRED', cc.has_function('getpeerucred') ? '1' : false) conf_data.set('HAVE_GETPROGNAME', cc.has_function('getprogname') ? '1' : false) conf_data.set('HAVE_GETZONEID', cc.has_function('getzoneid') ? '1' : false) conf_data.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create') ? '1' : false) conf_data.set('HAVE_MKOSTEMP', cc.has_function('mkostemp') ? '1' : false) conf_data.set('HAVE_MMAP', cc.has_function('mmap') ? '1' : false) conf_data.set('HAVE_POLL', cc.has_function('poll') ? '1' : false) conf_data.set('HAVE_POLLSET_CREATE', cc.has_function('pollset_create') ? '1' : false) conf_data.set('HAVE_POSIX_FALLOCATE', cc.has_function('posix_fallocate') ? '1' : false) conf_data.set('HAVE_PORT_CREATE', cc.has_function('port_create') ? '1' : false) conf_data.set('HAVE_REALLOCARRAY', cc.has_function('reallocarray', dependencies: libbsd_dep) ? '1' : false) conf_data.set('HAVE_SETEUID', cc.has_function('seteuid') ? '1' : false) conf_data.set('HAVE_SETITIMER', cc.has_function('setitimer') ? '1' : false) conf_data.set('HAVE_SHMCTL64', cc.has_function('shmctl64') ? '1' : false) conf_data.set('HAVE_SIGACTION', cc.has_function('sigaction') ? '1' : false) conf_data.set('HAVE_SIGPROCMASK', cc.has_function('sigprocmask') ? '1' : false) # HAVE_SOCKLEN_T is used by xtrans when IPv6 is disabled conf_data.set('HAVE_SOCKLEN_T', cc.has_type('socklen_t', prefix: '#include ') ? '1' : false) conf_data.set('HAVE_STRCASECMP', cc.has_function('strcasecmp') ? '1' : false) conf_data.set('HAVE_STRCASESTR', cc.has_function('strcasestr') ? '1' : false) conf_data.set('HAVE_STRLCAT', cc.has_function('strlcat', dependencies: libbsd_dep) ? '1' : false) conf_data.set('HAVE_STRLCPY', cc.has_function('strlcpy', dependencies: libbsd_dep) ? '1' : false) conf_data.set('HAVE_STRNCASECMP', cc.has_function('strncasecmp') ? '1' : false) conf_data.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup') ? '1' : false) conf_data.set('HAVE_TIMINGSAFE_MEMCMP', cc.has_function('timingsafe_memcmp') ? '1' : false) conf_data.set('HAVE_VASPRINTF', cc.has_function('vasprintf') ? '1' : false) conf_data.set('HAVE_VSNPRINTF', cc.has_function('vsnprintf') ? '1' : false) conf_data.set('HAVE_WALKCONTEXT', cc.has_function('walkcontext') ? '1' : false) conf_data.set('BUSFAULT', conf_data.get('HAVE_SIGACTION')) # Don't let X dependencies typedef 'pointer' conf_data.set('_XTYPEDEF_POINTER', '1') conf_data.set('_XITYPEDEF_POINTER', '1') conf_data.set('LISTEN_TCP', get_option('listen_tcp')) conf_data.set('LISTEN_UNIX', get_option('listen_unix')) conf_data.set('LISTEN_LOCAL', get_option('listen_local')) if cc.has_header_symbol('sys/socket.h', 'SCM_RIGHTS') conf_data.set('XTRANS_SEND_FDS', '1') endif if conf_data.get('HAVE_GETPEEREID').to_int() == 0 and conf_data.get('HAVE_GETPEERUCRED').to_int() == 0 if not cc.has_header_symbol('sys/socket.h', 'SO_PEERCRED') conf_data.set('NO_LOCAL_CLIENT_CRED', 1) endif endif conf_data.set('TCPCONN', '1') conf_data.set('UNIXCONN', host_machine.system() != 'windows' ? '1' : false) conf_data.set('IPv6', build_ipv6 ? '1' : false) conf_data.set('BIGREQS', '1') conf_data.set('COMPOSITE', '1') conf_data.set('DAMAGE', '1') conf_data.set('DBE', '1') conf_data.set('DGA', build_dga ? '1' : false) conf_data.set('DPMSExtension', build_dpms ? '1' : false) conf_data.set('DRI2', build_dri2 ? '1' : false) conf_data.set('DRI3', build_dri3 ? '1' : false) if build_glx conf_data.set_quoted('DRI_DRIVER_PATH', dri_dep.get_pkgconfig_variable('dridriverdir')) endif conf_data.set('HAS_SHM', build_mitshm ? '1' : false) conf_data.set('MITSHM', build_mitshm ? '1' : false) conf_data.set('PANORAMIX', build_xinerama ? '1' : false) conf_data.set('PRESENT', '1') conf_data.set('RANDR', '1') conf_data.set('RES', build_res ? '1' : false) conf_data.set('RENDER', '1') conf_data.set('SCREENSAVER', build_screensaver ? '1' : false) conf_data.set('SHAPE', '1') conf_data.set('XACE', build_xace ? '1' : false) conf_data.set('XCMISC', '1') conf_data.set('XCSECURITY', build_xsecurity ? '1' : false) conf_data.set('XDMCP', xdmcp_dep.found() ? '1' : false) conf_data.set('XF86BIGFONT', build_xf86bigfont ? '1' : false) conf_data.set('XF86DRI', build_dri1 ? '1' : false) conf_data.set('XF86VIDMODE', 1) conf_data.set('XFIXES', '1') conf_data.set('XFreeXDGA', build_dga ? '1' : false) conf_data.set('XINERAMA', build_xinerama ? '1' : false) conf_data.set('XINPUT', '1') conf_data.set('XRECORD', '1') conf_data.set('XSELINUX', build_xselinux ? '1' : false) conf_data.set('XSYNC', '1') conf_data.set('XTEST', '1') conf_data.set('XV', build_xv ? '1' : false) conf_data.set('XvExtension', build_xv ? '1' : false) conf_data.set('XvMCExtension', build_xvmc ? '1' : false) conf_data.set('HAVE_SHA1_IN_' + sha1.to_upper(), '1', description: 'Use @0@ SHA1 functions'.format(sha1)) conf_data.set('HAVE_LIBUNWIND', get_option('libunwind')) conf_data.set('HAVE_APM', (build_apm or build_acpi) ? '1' : false) conf_data.set('HAVE_ACPI', build_acpi ? '1' : false) conf_data.set('DDXOSVERRORF', build_xwin ? '1' : false) conf_data.set('DDXBEFORERESET', build_xwin ? '1' : false) enable_debugging = get_option('buildtype') == 'debug' conf_data.set('DEBUG', enable_debugging ? '1' : false) conf_data.set_quoted('XVENDORNAME', get_option('vendor_name')) conf_data.set_quoted('XVENDORNAMESHORT', get_option('vendor_name_short')) conf_data.set_quoted('__VENDORDWEBSUPPORT__', get_option('vendor_web')) conf_data.set_quoted('BUILDERADDR', get_option('builder_addr')) conf_data.set_quoted('BUILDERSTRING', get_option('builder_string')) if build_rootless conf_data.set('ROOTLESS', build_rootless ? '1' : false) conf_data.set('ROOTLESS_WORKAROUND', 1) conf_data.set('ROOTLESS_SAFEALPHA', 1) endif # # for xorg-server.h only # defines_svr4 = '''#if !defined(SVR4) && !defined(__svr4__) && !defined(__SVR4) #error "I am not SVR4" #endif ''' # BSD specifics supports_pccons = false supports_pcvt = false supports_syscons = false supports_wscons = false csrg_based = false if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly' supports_pccons = true supports_pcvt = true supports_syscons = true csrg_based = true endif if host_machine.system() == 'kfreebsd' supports_pccons = true supports_pcvt = true supports_syscons = true endif if host_machine.system() == 'netbsd' supports_pccons = true supports_pcvt = true supports_wscons = true csrg_based = true endif if host_machine.system() == 'openbsd' supports_pcvt = true supports_wscons = true csrg_based = true endif if host_machine.system() == 'darwin' csrg_based = true endif conf_data.set('SVR4', cc.compiles(defines_svr4) ? '1' : false) conf_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules')) conf_data.set('XORGSERVER', build_xorg ? '1' : false) conf_data.set_quoted('XCONFIGFILE', 'xorg.conf') conf_data.set_quoted('__XSERVERNAME__', 'Xorg') conf_data.set('WITH_VGAHW', build_vgahw ? '1' : false) conf_data.set('CSRG_BASED', csrg_based ? '1' : false) conf_data.set('PCCONS_SUPPORT', supports_pccons ? '1' : false) conf_data.set('PCVT_SUPPORT', supports_pcvt ? '1' : false) conf_data.set('SYSCONS_SUPPORT', supports_syscons ? '1' : false) conf_data.set('WSCONS_SUPPORT', supports_wscons ? '1' : false) conf_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false) conf_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false) configure_file(output : 'dix-config.h', configuration : conf_data) configure_file(output : 'xorg-server.h', input : 'xorg-server.h.meson.in', configuration : conf_data, install: build_xorg, install_dir: xorgsdkdir) version_data = configuration_data() version_data.set('VENDOR_RELEASE', '@0@'.format(release)) version_data.set_quoted('VENDOR_NAME', get_option('vendor_name')) version_data.set_quoted('VENDOR_NAME_SHORT', get_option('vendor_name_short')) version_data.set_quoted('VENDOR_WEB', get_option('vendor_web')) version_data.set_quoted('VENDOR_MAN_VERSION', 'Version @0@.@1@.@2@'.format(major, minor, patch)) configure_file(output : 'version-config.h', configuration : version_data) xkb_data = configuration_data() xkb_data.set_quoted('XKB_BIN_DIRECTORY', xkb_bin_dir) xkb_data.set_quoted('XKB_BASE_DIRECTORY', xkb_dir) xkb_data.set_quoted('XKB_DFLT_RULES', get_option('xkb_default_rules')) xkb_data.set_quoted('XKB_DFLT_MODEL', get_option('xkb_default_model')) xkb_data.set_quoted('XKB_DFLT_LAYOUT', get_option('xkb_default_layout')) xkb_data.set_quoted('XKB_DFLT_VARIANT', get_option('xkb_default_variant')) xkb_data.set_quoted('XKB_DFLT_OPTIONS', get_option('xkb_default_options')) xkb_data.set_quoted('XKM_OUTPUT_DIR', xkb_output_dir + '/') configure_file(output : 'xkb-config.h', configuration : xkb_data) xorg_data = configuration_data() xorg_data.set_quoted('XORG_BIN_DIRECTORY', get_option('bindir')) xorg_data.set('XORG_VERSION_CURRENT', release) xorg_data.set_quoted('XF86CONFIGFILE', 'xorg.conf') xorg_data.set_quoted('XCONFIGFILE', 'xorg.conf') xorg_data.set_quoted('XCONFIGDIR', 'xorg.conf.d') xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME', '.local/share') xorg_data.set_quoted('DEFAULT_XDG_DATA_HOME_LOGDIR', 'xorg') xorg_data.set_quoted('DEFAULT_LOGDIR', log_dir) xorg_data.set_quoted('DEFAULT_LOGPREFIX', 'Xorg.') xorg_data.set_quoted('DEFAULT_MODULE_PATH', join_paths(get_option('prefix'), module_dir)) xorg_data.set_quoted('DEFAULT_LIBRARY_PATH', join_paths(get_option('prefix'), get_option('libdir'))) xorg_data.set_quoted('__XSERVERNAME__', 'Xorg') xorg_data.set('XSERVER_LIBPCIACCESS', get_option('pciaccess') ? '1' : false) xorg_data.set_quoted('PCI_TXT_IDS_PATH', '') xorg_data.set('XSERVER_PLATFORM_BUS', build_udev_kms ? '1' : false) xorg_data.set('WSCONS_SUPPORT', host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd' ? '1' : false) xorg_data.set('HAVE_STROPTS_H', cc.has_header('stropts.h') ? '1' : false) xorg_data.set('HAVE_SYS_KD_H', cc.has_header('sys/kd.h') ? '1' : false) xorg_data.set('HAVE_SYS_VT_H', cc.has_header('sys/vt.h') ? '1' : false) if host_machine.system() == 'freebsd' or host_machine.system() == 'dragonfly' if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' xorg_data.set('USE_DEV_IO', '1') endif elif host_machine.system() == 'netbsd' if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' xorg_data.set('USE_I386_IOPL', '1') endif elif host_machine.system() == 'openbsd' if host_machine.cpu_family() == 'x86' xorg_data.set('USE_I386_IOPL', '1') endif if host_machine.cpu_family() == 'x86_64' xorg_data.set('USE_AMD64_IOPL', '1') endif endif configure_file(output : 'xorg-config.h', input : 'xorg-config.h.meson.in', configuration : xorg_data) xwin_data = configuration_data() xwin_data.set_quoted('DEFAULT_LOGDIR', log_dir) xwin_data.set('HAS_WINSOCK', host_machine.system() == 'windows' ? '1' : false, description: 'Use Windows sockets') xwin_data.set('HAS_DEVWINDOWS', host_machine.system() == 'cygwin' ? '1' : false, description: 'Has /dev/windows for signaling new win32 messages') xwin_data.set('RELOCATE_PROJECTROOT', host_machine.system() == 'windows' ? '1' : false, description: 'Make paths relative to the xserver installation location') # XXX: these three are all the same as DEBUG so we should just change to that xwin_data.set10('CYGDEBUG', enable_debugging) xwin_data.set10('CYGWINDOWING_DEBUG',enable_debugging) xwin_data.set10('CYGMULTIWINDOW_DEBUG', enable_debugging) configure_file(output : 'xwin-config.h', input : 'xwin-config.h.meson.in', configuration : xwin_data) dtrace_hdr = [] dtrace_tmpl = files('Xserver.d') if with_dtrace dtrace_header = generator(dtrace, output: '@BASENAME@-dtrace.h', arguments: ['-h', '-s', '@INPUT@', '-o', '@OUTPUT@'] ) dtrace_hdr += dtrace_header.process(dtrace_tmpl) endif if build_xorg install_data( [ 'XIstubs.h', 'Xprintf.h', 'callback.h', 'client.h', 'closestr.h', 'closure.h', 'colormap.h', 'colormapst.h', 'hotplug.h', 'cursor.h', 'cursorstr.h', 'dix.h', 'dixaccess.h', 'dixevents.h', 'dixfont.h', 'dixfontstr.h', 'dixgrabs.h', 'dixstruct.h', 'events.h', 'exevents.h', 'extension.h', 'extinit.h', 'extnsionst.h', 'fourcc.h', 'gc.h', 'gcstruct.h', 'globals.h', 'glx_extinit.h', 'glxvndabi.h', 'input.h', 'inputstr.h', 'list.h', 'misc.h', 'miscstruct.h', 'opaque.h', 'nonsdk_extinit.h', 'optionstr.h', 'os.h', 'pixmap.h', 'pixmapstr.h', 'privates.h', 'property.h', 'propertyst.h', 'ptrveloc.h', 'region.h', 'regionstr.h', 'registry.h', 'resource.h', 'rgb.h', 'screenint.h', 'scrnintstr.h', 'selection.h', 'servermd.h', 'validate.h', 'displaymode.h', 'window.h', 'windowstr.h', 'xkbfile.h', 'xkbsrv.h', 'xkbstr.h', 'xkbrules.h', 'Xprintf.h', 'xserver_poll.h', 'xserver-properties.h', ], install_dir: xorgsdkdir, ) endif xorg-server-21.1.16/include/Makefile.am0000644000175000017500000000301214757411105013306 if XORG sdk_HEADERS = \ XIstubs.h \ Xprintf.h \ callback.h \ client.h \ closestr.h \ closure.h \ colormap.h \ colormapst.h \ hotplug.h \ cursor.h \ cursorstr.h \ dix.h \ dixaccess.h \ dixevents.h \ dixfont.h \ dixfontstr.h \ dixgrabs.h \ dixstruct.h \ events.h \ exevents.h \ extension.h \ extinit.h \ extnsionst.h \ fourcc.h \ gc.h \ gcstruct.h \ globals.h \ glx_extinit.h \ glxvndabi.h \ input.h \ inputstr.h \ list.h \ misc.h \ miscstruct.h \ opaque.h \ nonsdk_extinit.h \ optionstr.h \ os.h \ pixmap.h \ pixmapstr.h \ privates.h \ property.h \ propertyst.h \ ptrveloc.h \ region.h \ regionstr.h \ registry.h \ resource.h \ rgb.h \ screenint.h \ scrnintstr.h \ selection.h \ servermd.h \ validate.h \ displaymode.h \ window.h \ windowstr.h \ xkbfile.h \ xkbsrv.h \ xkbstr.h \ xkbrules.h \ xserver_poll.h \ xserver-properties.h nodist_sdk_HEADERS = xorg-server.h endif AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ busfault.h dbus-core.h \ dix-config-apple-verbatim.h \ eventconvert.h eventstr.h inpututils.h \ probes.h \ protocol-versions.h \ swaprep.h \ swapreq.h \ systemd-logind.h \ vidmodestr.h \ xorg-config.h.meson.in \ xorg-server.h.meson.in \ xwin-config.h.meson.in \ xsha1.h \ Xserver.d if XSERVER_DTRACE # Generate dtrace header file for C sources to include BUILT_SOURCES = Xserver-dtrace.h Xserver-dtrace.h: $(srcdir)/Xserver.d $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d endif CLEANFILES = Xserver-dtrace.h xorg-server-21.1.16/include/XIstubs.h0000644000175000017500000000345514757411105013037 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ #ifndef XI_STUBS_H #define XI_STUBS_H 1 extern _X_EXPORT int SetDeviceMode(ClientPtr /* client */ , DeviceIntPtr /* dev */ , int /* mode */ ); extern _X_EXPORT int SetDeviceValuators(ClientPtr /* client */ , DeviceIntPtr /* dev */ , int * /* valuators */ , int /* first_valuator */ , int /* num_valuators */ ); extern _X_EXPORT int ChangeDeviceControl(ClientPtr /* client */ , DeviceIntPtr /* dev */ , xDeviceCtl * /* control */ ); #endif /* XI_STUBS_H */ xorg-server-21.1.16/include/Xprintf.h0000644000175000017500000000613514757411105013066 /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef XPRINTF_H #define XPRINTF_H #include #include #include #ifndef _X_RESTRICT_KYWD #if defined(restrict) /* assume autoconf set it correctly */ || \ (defined(__STDC__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ #define _X_RESTRICT_KYWD restrict #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ #define _X_RESTRICT_KYWD __restrict__ #else #define _X_RESTRICT_KYWD #endif #endif /* * These functions provide a portable implementation of the common (but not * yet universal) asprintf & vasprintf routines to allocate a buffer big * enough to sprintf the arguments to. The XNF variants terminate the server * if the allocation fails. * The buffer allocated is returned in the pointer provided in the first * argument. The return value is the size of the allocated buffer, or -1 * on failure. */ extern _X_EXPORT int Xasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT int Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va) _X_ATTRIBUTE_PRINTF(2, 0); extern _X_EXPORT int XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT int XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD fmt, va_list va) _X_ATTRIBUTE_PRINTF(2, 0); #if !defined(HAVE_ASPRINTF) && !defined(HAVE_VASPRINTF) #define asprintf Xasprintf #define vasprintf Xvasprintf #endif /* * These functions provide a portable implementation of the linux kernel * scnprintf & vscnprintf routines that return the number of bytes actually * copied during a snprintf, (excluding the final '\0'). */ extern _X_EXPORT int Xscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, ...) _X_ATTRIBUTE_PRINTF(3,4); extern _X_EXPORT int Xvscnprintf(char *s, int n, const char * _X_RESTRICT_KYWD fmt, va_list va) _X_ATTRIBUTE_PRINTF(3,0); #endif /* XPRINTF_H */ xorg-server-21.1.16/include/callback.h0000644000175000017500000000673614757411105013177 /*********************************************************** 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. ******************************************************************/ #ifndef CALLBACK_H #define CALLBACK_H #include /* for GContext, Mask */ #include /* for Bool */ #include #include /* * callback manager stuff */ #ifndef _XTYPEDEF_CALLBACKLISTPTR typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ #define _XTYPEDEF_CALLBACKLISTPTR #endif typedef void (*CallbackProcPtr) (CallbackListPtr *, void *, void *); extern _X_EXPORT Bool AddCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data); extern _X_EXPORT Bool DeleteCallback(CallbackListPtr *pcbl, CallbackProcPtr callback, void *data); extern _X_EXPORT void _CallCallbacks(CallbackListPtr *pcbl, void *call_data); static inline void CallCallbacks(CallbackListPtr *pcbl, void *call_data) { if (!pcbl || !*pcbl) return; _CallCallbacks(pcbl, call_data); } extern _X_EXPORT void DeleteCallbackList(CallbackListPtr *pcbl); extern _X_EXPORT void InitCallbackManager(void); extern _X_EXPORT void DeleteCallbackManager(void); #endif /* CALLBACK_H */ xorg-server-21.1.16/include/client.h0000644000175000017500000000500614757411105012706 /* * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All * rights reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Author: Rami Ylimäki */ #ifndef CLIENT_H #define CLIENT_H #ifdef HAVE_DIX_CONFIG_H #include #endif /* HAVE_DIX_CONFIG_H */ #include #include /* Client IDs. Use GetClientPid, GetClientCmdName and GetClientCmdArgs * instead of accessing the fields directly. */ typedef struct { pid_t pid; /* process ID, -1 if not available */ const char *cmdname; /* process name, NULL if not available */ const char *cmdargs; /* process arguments, NULL if not available */ } ClientIdRec, *ClientIdPtr; struct _Client; /* Initialize and clean up. */ void ReserveClientIds(struct _Client *client); void ReleaseClientIds(struct _Client *client); /* Determine client IDs for caching. Exported on purpose for * extensions such as SELinux. */ extern _X_EXPORT pid_t DetermineClientPid(struct _Client *client); extern _X_EXPORT void DetermineClientCmd(pid_t, const char **cmdname, const char **cmdargs); /* Query cached client IDs. Exported on purpose for drivers. */ extern _X_EXPORT pid_t GetClientPid(struct _Client *client); extern _X_EXPORT const char *GetClientCmdName(struct _Client *client); extern _X_EXPORT const char *GetClientCmdArgs(struct _Client *client); #endif /* CLIENT_H */ xorg-server-21.1.16/include/closestr.h0000644000175000017500000000573214757411105013274 /* Copyright 1991, 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. */ #ifndef CLOSESTR_H #define CLOSESTR_H #include #include "closure.h" #include "dix.h" #include "misc.h" #include "gcstruct.h" /* closure structures */ /* OpenFont */ typedef struct _OFclosure { ClientPtr client; short current_fpe; short num_fpes; FontPathElementPtr *fpe_list; Mask flags; /* XXX -- get these from request buffer instead? */ const char *origFontName; int origFontNameLen; XID fontid; char *fontname; int fnamelen; FontPtr non_cachable_font; } OFclosureRec; /* ListFontsWithInfo */ #define XLFDMAXFONTNAMELEN 256 typedef struct _LFWIstate { char pattern[XLFDMAXFONTNAMELEN]; int patlen; int current_fpe; int max_names; Bool list_started; void *private; } LFWIstateRec, *LFWIstatePtr; typedef struct _LFWIclosure { ClientPtr client; int num_fpes; FontPathElementPtr *fpe_list; xListFontsWithInfoReply *reply; int length; LFWIstateRec current; LFWIstateRec saved; int savedNumFonts; Bool haveSaved; char *savedName; } LFWIclosureRec; /* ListFonts */ typedef struct _LFclosure { ClientPtr client; int num_fpes; FontPathElementPtr *fpe_list; FontNamesPtr names; LFWIstateRec current; LFWIstateRec saved; Bool haveSaved; char *savedName; int savedNameLen; } LFclosureRec; /* PolyText */ typedef struct _PTclosure { ClientPtr client; DrawablePtr pDraw; GC *pGC; unsigned char *pElt; unsigned char *endReq; unsigned char *data; int xorg; int yorg; CARD8 reqType; XID did; int err; } PTclosureRec; /* ImageText */ typedef struct _ITclosure { ClientPtr client; DrawablePtr pDraw; GC *pGC; BYTE nChars; unsigned char *data; int xorg; int yorg; CARD8 reqType; XID did; } ITclosureRec; #endif /* CLOSESTR_H */ xorg-server-21.1.16/include/closure.h0000644000175000017500000000501514757411105013104 /*********************************************************** 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. ******************************************************************/ #ifndef CLOSURE_H #define CLOSURE_H 1 typedef struct _LFclosure *LFclosurePtr; typedef struct _LFWIclosure *LFWIclosurePtr; typedef struct _OFclosure *OFclosurePtr; typedef struct _PTclosure *PTclosurePtr; typedef struct _ITclosure *ITclosurePtr; #endif /* CLOSURE_H */ xorg-server-21.1.16/include/colormap.h0000644000175000017500000001457314757411105013255 /* 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. */ #ifndef CMAP_H #define CMAP_H 1 #include #include "screenint.h" #include "window.h" /* these follow X.h's AllocNone and AllocAll */ #define CM_PSCREEN 2 #define CM_PWIN 3 /* Passed internally in colormap.c */ #define REDMAP 0 #define GREENMAP 1 #define BLUEMAP 2 #define PSEUDOMAP 3 #define AllocPrivate (-1) #define AllocTemporary (-2) #define DynamicClass 1 /* Values for the flags field of a colormap. These should have 1 bit set * and not overlap */ #define IsDefault 1 #define AllAllocated 2 #define BeingCreated 4 typedef CARD32 Pixel; typedef struct _CMEntry *EntryPtr; /* moved to screenint.h: typedef struct _ColormapRec *ColormapPtr */ typedef struct _colorResource *colorResourcePtr; extern _X_EXPORT int CreateColormap(Colormap /*mid */ , ScreenPtr /*pScreen */ , VisualPtr /*pVisual */ , ColormapPtr * /*ppcmap */ , int /*alloc */ , int /*client */ ); extern _X_EXPORT int FreeColormap(void *pmap, XID mid); extern _X_EXPORT int TellLostMap(WindowPtr pwin, void *value); extern _X_EXPORT int TellGainedMap(WindowPtr pwin, void *value); extern _X_EXPORT int CopyColormapAndFree(Colormap /*mid */ , ColormapPtr /*pSrc */ , int /*client */ ); extern _X_EXPORT int AllocColor(ColormapPtr /*pmap */ , unsigned short * /*pred */ , unsigned short * /*pgreen */ , unsigned short * /*pblue */ , Pixel * /*pPix */ , int /*client */ ); extern _X_EXPORT void FakeAllocColor(ColormapPtr /*pmap */ , xColorItem * /*item */ ); extern _X_EXPORT void FakeFreeColor(ColormapPtr /*pmap */ , Pixel /*pixel */ ); extern _X_EXPORT int QueryColors(ColormapPtr /*pmap */ , int /*count */ , Pixel * /*ppixIn */ , xrgb * /*prgbList */ , ClientPtr client); extern _X_EXPORT int FreeClientPixels(void *pcr, XID fakeid); extern _X_EXPORT int AllocColorCells(int /*client */ , ColormapPtr /*pmap */ , int /*colors */ , int /*planes */ , Bool /*contig */ , Pixel * /*ppix */ , Pixel * /*masks */ ); extern _X_EXPORT int AllocColorPlanes(int /*client */ , ColormapPtr /*pmap */ , int /*colors */ , int /*r */ , int /*g */ , int /*b */ , Bool /*contig */ , Pixel * /*pixels */ , Pixel * /*prmask */ , Pixel * /*pgmask */ , Pixel * /*pbmask */ ); extern _X_EXPORT int FreeColors(ColormapPtr /*pmap */ , int /*client */ , int /*count */ , Pixel * /*pixels */ , Pixel /*mask */ ); extern _X_EXPORT int StoreColors(ColormapPtr /*pmap */ , int /*count */ , xColorItem * /*defs */ , ClientPtr client); extern _X_EXPORT int IsMapInstalled(Colormap /*map */ , WindowPtr /*pWin */ ); extern _X_EXPORT Bool ResizeVisualArray(ScreenPtr /* pScreen */ , int /* new_vis_count */ , DepthPtr /* depth */ ); #endif /* CMAP_H */ xorg-server-21.1.16/include/colormapst.h0000644000175000017500000000774114757411105013623 /* 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. */ #ifndef CMAPSTRUCT_H #define CMAPSTRUCT_H 1 #include "colormap.h" #include "screenint.h" #include "privates.h" /* Shared color -- the color is used by AllocColorPlanes */ typedef struct { unsigned short color; short refcnt; } SHAREDCOLOR; /* LOCO -- a local color for a PseudoColor cell. DirectColor maps always * use the first value (called red) in the structure. What channel they * are really talking about depends on which map they are in. */ typedef struct { unsigned short red, green, blue; } LOCO; /* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes. * DirectColor maps always use the first value (called red) in the structure. * What channel they are really talking about depends on which map they * are in. */ typedef struct { SHAREDCOLOR *red, *green, *blue; } SHCO; /* color map entry */ typedef struct _CMEntry { union { LOCO local; SHCO shco; } co; short refcnt; Bool fShared; } Entry; /* COLORMAPs can be used for either Direct or Pseudo color. PseudoColor * only needs one cell table, we arbitrarily pick red. We keep track * of that table with freeRed, numPixelsRed, and clientPixelsRed */ typedef struct _ColormapRec { VisualPtr pVisual; short class; /* PseudoColor or DirectColor */ XID mid; /* client's name for colormap */ ScreenPtr pScreen; /* screen map is associated with */ short flags; /* 1 = IsDefault * 2 = AllAllocated */ int freeRed; int freeGreen; int freeBlue; int *numPixelsRed; int *numPixelsGreen; int *numPixelsBlue; Pixel **clientPixelsRed; Pixel **clientPixelsGreen; Pixel **clientPixelsBlue; Entry *red; Entry *green; Entry *blue; PrivateRec *devPrivates; } ColormapRec; #endif /* COLORMAP_H */ xorg-server-21.1.16/include/hotplug.h0000644000175000017500000000542014757411105013112 /* * Copyright © 2006-2007 Daniel Stone * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ #ifndef HOTPLUG_H #define HOTPLUG_H #include "list.h" extern _X_EXPORT void config_pre_init(void); extern _X_EXPORT void config_init(void); extern _X_EXPORT void config_fini(void); /* Bump this each time you add something to the struct * so that drivers can easily tell what is available */ #define ODEV_ATTRIBUTES_VERSION 1 struct OdevAttributes { /* path to kernel device node - Linux e.g. /dev/dri/card0 */ char *path; /* system device path - Linux e.g. /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card1 */ char *syspath; /* DRI-style bus id */ char *busid; /* Server managed FD */ int fd; /* Major number of the device node pointed to by ODEV_ATTRIB_PATH */ int major; /* Minor number of the device node pointed to by ODEV_ATTRIB_PATH */ int minor; /* kernel driver name */ char *driver; }; /* Note starting with xserver 1.16 this function never fails */ struct OdevAttributes * config_odev_allocate_attributes(void); void config_odev_free_attributes(struct OdevAttributes *attribs); typedef void (*config_odev_probe_proc_ptr)(struct OdevAttributes *attribs); void config_odev_probe(config_odev_probe_proc_ptr probe_callback); #ifdef CONFIG_UDEV_KMS void NewGPUDeviceRequest(struct OdevAttributes *attribs); void DeleteGPUDeviceRequest(struct OdevAttributes *attribs); #endif #define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0")) struct xf86_platform_device * xf86_find_platform_device_by_devnum(int major, int minor); #endif /* HOTPLUG_H */ xorg-server-21.1.16/include/cursor.h0000644000175000017500000001371414757411105012752 /*********************************************************** 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. ******************************************************************/ #ifndef CURSOR_H #define CURSOR_H #include "misc.h" #include "screenint.h" #include "window.h" #include "privates.h" #define NullCursor ((CursorPtr)NULL) /* Provide support for alpha composited cursors */ #define ARGB_CURSOR struct _DeviceIntRec; typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; extern _X_EXPORT DevScreenPrivateKeyRec cursorScreenDevPriv; #define CursorScreenKey (&cursorScreenDevPriv) extern _X_EXPORT CursorPtr rootCursor; extern _X_EXPORT int FreeCursor(void *pCurs, XID cid); extern _X_EXPORT CursorPtr RefCursor(CursorPtr /* cursor */); extern _X_EXPORT CursorPtr UnrefCursor(CursorPtr /* cursor */); extern _X_EXPORT int CursorRefCount(const CursorPtr /* cursor */); extern _X_EXPORT int AllocARGBCursor(unsigned char * /*psrcbits */ , unsigned char * /*pmaskbits */ , CARD32 * /*argb */ , CursorMetricPtr /*cm */ , unsigned /*foreRed */ , unsigned /*foreGreen */ , unsigned /*foreBlue */ , unsigned /*backRed */ , unsigned /*backGreen */ , unsigned /*backBlue */ , CursorPtr * /*ppCurs */ , ClientPtr /*client */ , XID /*cid */ ); extern _X_EXPORT int AllocGlyphCursor(Font /*source */ , unsigned int /*sourceChar */ , Font /*mask */ , unsigned int /*maskChar */ , unsigned /*foreRed */ , unsigned /*foreGreen */ , unsigned /*foreBlue */ , unsigned /*backRed */ , unsigned /*backGreen */ , unsigned /*backBlue */ , CursorPtr * /*ppCurs */ , ClientPtr /*client */ , XID /*cid */ ); extern _X_EXPORT CursorPtr CreateRootCursor(char * /*pfilename */ , unsigned int /*glyph */ ); extern _X_EXPORT int ServerBitsFromGlyph(FontPtr /*pfont */ , unsigned int /*ch */ , CursorMetricPtr /*cm */ , unsigned char ** /*ppbits */ ); extern _X_EXPORT Bool CursorMetricsFromGlyph(FontPtr /*pfont */ , unsigned /*ch */ , CursorMetricPtr /*cm */ ); extern _X_EXPORT void CheckCursorConfinement(WindowPtr /*pWin */ ); extern _X_EXPORT void NewCurrentScreen(struct _DeviceIntRec * /*pDev */ , ScreenPtr /*newScreen */ , int /*x */ , int /*y */ ); extern _X_EXPORT Bool PointerConfinedToScreen(struct _DeviceIntRec * /* pDev */ ); extern _X_EXPORT void GetSpritePosition(struct _DeviceIntRec * /* pDev */ , int * /*px */ , int * /*py */ ); #ifdef PANORAMIX extern _X_EXPORT int XineramaGetCursorScreen(struct _DeviceIntRec *pDev); #endif /* PANORAMIX */ #endif /* CURSOR_H */ xorg-server-21.1.16/include/cursorstr.h0000644000175000017500000000721614757411105013503 /*********************************************************** 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. ******************************************************************/ #ifndef CURSORSTRUCT_H #define CURSORSTRUCT_H #include "cursor.h" #include "privates.h" /* * device-independent cursor storage */ /* * source and mask point directly to the bits, which are in the server-defined * bitmap format. */ typedef struct _CursorBits { unsigned char *source; /* points to bits */ unsigned char *mask; /* points to bits */ Bool emptyMask; /* all zeros mask */ unsigned short width, height, xhot, yhot; /* metrics */ int refcnt; /* can be shared */ PrivateRec *devPrivates; /* set by pScr->RealizeCursor */ CARD32 *argb; /* full-color alpha blended */ } CursorBits, *CursorBitsPtr; #define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS)) typedef struct _Cursor { CursorBitsPtr bits; unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */ unsigned short backRed, backGreen, backBlue; /* device-independent color */ int refcnt; PrivateRec *devPrivates; /* set by pScr->RealizeCursor */ XID id; CARD32 serialNumber; Atom name; } CursorRec; #define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR)) typedef struct _CursorMetric { unsigned short width, height, xhot, yhot; } CursorMetricRec; typedef struct { int x, y; ScreenPtr pScreen; } HotSpot; #endif /* CURSORSTRUCT_H */ xorg-server-21.1.16/include/dix.h0000644000175000017500000005173514757411105012226 /*********************************************************** 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. ******************************************************************/ #ifndef DIX_H #define DIX_H #include "callback.h" #include "gc.h" #include "window.h" #include "input.h" #include "cursor.h" #include "geext.h" #include "events.h" #include #define EARLIER -1 #define SAMETIME 0 #define LATER 1 #define NullClient ((ClientPtr) 0) #define REQUEST(type) \ type * stuff = (type *)client->requestBuffer; #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) #define REQUEST_SIZE_MATCH(req) \ do { \ if ((sizeof(req) >> 2) != client->req_len) \ return(BadLength); \ } while (0) #define REQUEST_AT_LEAST_SIZE(req) \ do { \ if ((sizeof(req) >> 2) > client->req_len) \ return(BadLength); \ } while (0) #define REQUEST_AT_LEAST_EXTRA_SIZE(req, extra) \ do { \ if (((sizeof(req) + ((uint64_t) (extra))) >> 2) > client->req_len) \ return(BadLength); \ } while (0) #define REQUEST_FIXED_SIZE(req, n) \ do { \ if ((((sizeof(req)) >> 2) > client->req_len) || \ (((n) >> 2) >= client->req_len) || \ ((((uint64_t) sizeof(req) + (n) + 3) >> 2) != (uint64_t) client->req_len)) \ return(BadLength); \ } while (0) #define LEGAL_NEW_RESOURCE(id,client) \ do { \ if (!LegalNewID((id), (client))) { \ (client)->errorValue = (id); \ return BadIDChoice; \ } \ } while (0) #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode) \ do { \ int tmprc = dixLookupDrawable(&(pDraw), drawID, client, M_ANY, mode); \ if (tmprc != Success) \ return tmprc; \ tmprc = dixLookupGC(&(pGC), stuff->gc, client, DixUseAccess); \ if (tmprc != Success) \ return tmprc; \ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen)) \ return BadMatch; \ if (pGC->serialNumber != pDraw->serialNumber) \ ValidateGC(pDraw, pGC); \ } while (0) #define WriteReplyToClient(pClient, size, pReply) \ do { \ if ((pClient)->swapped) \ (*ReplySwapVector[((xReq *)(pClient)->requestBuffer)->reqType]) \ (pClient, (int)(size), pReply); \ else \ WriteToClient(pClient, (int)(size), (pReply)); \ } while (0) #define WriteSwappedDataToClient(pClient, size, pbuf) \ do { \ if ((pClient)->swapped) \ (*(pClient)->pSwapReplyFunc)(pClient, (int)(size), pbuf); \ else \ WriteToClient(pClient, (int)(size), (pbuf)); \ } while (0) typedef struct _TimeStamp *TimeStampPtr; #ifndef _XTYPEDEF_CLIENTPTR typedef struct _Client *ClientPtr; /* also in misc.h */ #define _XTYPEDEF_CLIENTPTR #endif typedef struct _WorkQueue *WorkQueuePtr; extern _X_EXPORT ClientPtr clients[MAXCLIENTS]; extern _X_EXPORT ClientPtr serverClient; extern _X_EXPORT int currentMaxClients; extern _X_EXPORT char dispatchExceptionAtReset; extern _X_EXPORT int terminateDelay; extern _X_EXPORT Bool touchEmulatePointer; typedef int HWEventQueueType; typedef HWEventQueueType *HWEventQueuePtr; extern _X_EXPORT HWEventQueuePtr checkForInput[2]; static inline _X_NOTSAN Bool InputCheckPending(void) { return (*checkForInput[0] != *checkForInput[1]); } typedef struct _TimeStamp { CARD32 months; /* really ~49.7 days */ CARD32 milliseconds; } TimeStamp; /* dispatch.c */ extern _X_EXPORT ClientPtr GetCurrentClient(void); extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ , HWEventQueuePtr /*c1 */ ); extern _X_EXPORT void CloseDownClient(ClientPtr /*client */ ); extern _X_EXPORT void UpdateCurrentTime(void); extern _X_EXPORT void UpdateCurrentTimeIf(void); extern _X_EXPORT int dixDestroyPixmap(void *value, XID pid); extern _X_EXPORT void InitClient(ClientPtr client, int i, void *ospriv); extern _X_EXPORT ClientPtr NextAvailableClient(void *ospriv); extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ , unsigned int /*majorCode */ , unsigned int /*minorCode */ , XID /*resId */ , int /*errorCode */ ); extern _X_EXPORT void MarkClientException(ClientPtr /*client */ ); extern _X_HIDDEN Bool CreateConnectionBlock(void); /* dixutils.c */ extern _X_EXPORT int CompareISOLatin1Lowered(const unsigned char * /*a */ , int alen, const unsigned char * /*b */ , int blen); extern _X_EXPORT int dixLookupWindow(WindowPtr *result, XID id, ClientPtr client, Mask access_mode); extern _X_EXPORT int dixLookupDrawable(DrawablePtr *result, XID id, ClientPtr client, Mask type_mask, Mask access_mode); extern _X_EXPORT int dixLookupGC(GCPtr *result, XID id, ClientPtr client, Mask access_mode); extern _X_EXPORT int dixLookupFontable(FontPtr *result, XID id, ClientPtr client, Mask access_mode); extern _X_EXPORT int dixLookupClient(ClientPtr *result, XID id, ClientPtr client, Mask access_mode); extern _X_EXPORT void NoopDDA(void); extern _X_EXPORT int AlterSaveSetForClient(ClientPtr /*client */ , WindowPtr /*pWin */ , unsigned /*mode */ , Bool /*toRoot */ , Bool /*map */ ); extern _X_EXPORT void DeleteWindowFromAnySaveSet(WindowPtr /*pWin */ ); extern _X_EXPORT void BlockHandler(void *timeout); extern _X_EXPORT void WakeupHandler(int result); void EnableLimitedSchedulingLatency(void); void DisableLimitedSchedulingLatency(void); typedef void (*ServerBlockHandlerProcPtr) (void *blockData, void *timeout); typedef void (*ServerWakeupHandlerProcPtr) (void *blockData, int result); extern _X_EXPORT Bool RegisterBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler, ServerWakeupHandlerProcPtr wakeupHandler, void *blockData); extern _X_EXPORT void RemoveBlockAndWakeupHandlers(ServerBlockHandlerProcPtr blockHandler, ServerWakeupHandlerProcPtr wakeupHandler, void *blockData); extern _X_EXPORT void InitBlockAndWakeupHandlers(void); extern _X_EXPORT void ClearWorkQueue(void); extern _X_EXPORT void ProcessWorkQueue(void); extern _X_EXPORT void ProcessWorkQueueZombies(void); extern _X_EXPORT Bool QueueWorkProc(Bool (*function)(ClientPtr clientUnused, void *closure), ClientPtr client, void *closure); typedef Bool (*ClientSleepProcPtr) (ClientPtr client, void *closure); extern _X_EXPORT Bool ClientSleep(ClientPtr client, ClientSleepProcPtr function, void *closure); #ifndef ___CLIENTSIGNAL_DEFINED___ #define ___CLIENTSIGNAL_DEFINED___ extern _X_EXPORT Bool ClientSignal(ClientPtr /*client */ ); #endif /* ___CLIENTSIGNAL_DEFINED___ */ #define CLIENT_SIGNAL_ANY ((void *)-1) extern _X_EXPORT int ClientSignalAll(ClientPtr /*client*/, ClientSleepProcPtr /*function*/, void * /*closure*/); extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ ); extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ ); extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ , RegionPtr /*pRgn */ , XID /*drawable */ , int /*major */ , int /*minor */); /* atom.c */ extern _X_EXPORT Atom MakeAtom(const char * /*string */ , unsigned /*len */ , Bool /*makeit */ ); extern _X_EXPORT Bool ValidAtom(Atom /*atom */ ); extern _X_EXPORT const char *NameForAtom(Atom /*atom */ ); extern _X_EXPORT void AtomError(void) _X_NORETURN; extern _X_EXPORT void FreeAllAtoms(void); extern _X_EXPORT void InitAtoms(void); /* main.c */ extern _X_EXPORT void SetVendorRelease(int release); int dix_main(int argc, char *argv[], char *envp[]); /* events.c */ extern void SetMaskForEvent(int /* deviceid */ , Mask /* mask */ , int /* event */ ); extern _X_EXPORT void ConfineToShape(DeviceIntPtr /* pDev */ , RegionPtr /* shape */ , int * /* px */ , int * /* py */ ); extern _X_EXPORT Bool IsParent(WindowPtr /* maybeparent */ , WindowPtr /* child */ ); extern _X_EXPORT WindowPtr GetCurrentRootWindow(DeviceIntPtr pDev); extern _X_EXPORT WindowPtr GetSpriteWindow(DeviceIntPtr pDev); extern _X_EXPORT void NoticeTime(const DeviceIntPtr dev, TimeStamp time); extern _X_EXPORT void NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev); extern _X_EXPORT TimeStamp LastEventTime(int deviceid); extern _X_EXPORT Bool LastEventTimeWasReset(int deviceid); extern _X_EXPORT void LastEventTimeToggleResetFlag(int deviceid, Bool state); extern _X_EXPORT void LastEventTimeToggleResetAll(Bool state); extern void EnqueueEvent(InternalEvent * /* ev */ , DeviceIntPtr /* device */ ); extern void PlayReleasedEvents(void); extern void ActivatePointerGrab(DeviceIntPtr /* mouse */ , GrabPtr /* grab */ , TimeStamp /* time */ , Bool /* autoGrab */ ); extern void DeactivatePointerGrab(DeviceIntPtr /* mouse */ ); extern void ActivateKeyboardGrab(DeviceIntPtr /* keybd */ , GrabPtr /* grab */ , TimeStamp /* time */ , Bool /* passive */ ); extern void DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ ); extern BOOL ActivateFocusInGrab(DeviceIntPtr /* dev */ , WindowPtr /* old */ , WindowPtr /* win */ ); extern void AllowSome(ClientPtr /* client */ , TimeStamp /* time */ , DeviceIntPtr /* thisDev */ , int /* newState */ ); extern void ReleaseActiveGrabs(ClientPtr client); extern GrabPtr CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ , DeviceIntPtr /* device */ , InternalEvent * /* event */ , BOOL /* checkCore */ , BOOL /* activate */ ); extern _X_EXPORT int DeliverEventsToWindow(DeviceIntPtr /* pWin */ , WindowPtr /* pWin */ , xEventPtr /* pEvents */ , int /* count */ , Mask /* filter */ , GrabPtr /* grab */ ); extern _X_EXPORT void DeliverRawEvent(RawDeviceEvent * /* ev */ , DeviceIntPtr /* dev */ ); extern int DeliverDeviceEvents(WindowPtr /* pWin */ , InternalEvent * /* event */ , GrabPtr /* grab */ , WindowPtr /* stopAt */ , DeviceIntPtr /* dev */ ); extern int DeliverOneGrabbedEvent(InternalEvent * /* event */ , DeviceIntPtr /* dev */ , enum InputLevel /* level */ ); extern void DeliverTouchEvents(DeviceIntPtr /* dev */ , TouchPointInfoPtr /* ti */ , InternalEvent * /* ev */ , XID /* resource */ ); extern Bool DeliverGestureEventToOwner(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev); extern void InitializeSprite(DeviceIntPtr /* pDev */ , WindowPtr /* pWin */ ); extern void FreeSprite(DeviceIntPtr pDev); extern void UpdateSpriteForScreen(DeviceIntPtr /* pDev */ , ScreenPtr /* pScreen */ ); extern _X_EXPORT void WindowHasNewCursor(WindowPtr /* pWin */ ); extern Bool CheckDeviceGrabs(DeviceIntPtr /* device */ , InternalEvent * /* event */ , WindowPtr /* ancestor */ ); extern void DeliverFocusedEvent(DeviceIntPtr /* keybd */ , InternalEvent * /* event */ , WindowPtr /* window */ ); extern int DeliverGrabbedEvent(InternalEvent * /* event */ , DeviceIntPtr /* thisDev */ , Bool /* deactivateGrab */ ); extern void FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, InternalEvent *event); extern void FixKeyState(DeviceEvent * /* event */ , DeviceIntPtr /* keybd */ ); extern void RecalculateDeliverableEvents(WindowPtr /* pWin */ ); extern _X_EXPORT int OtherClientGone(void *value, XID id); extern void DoFocusEvents(DeviceIntPtr /* dev */ , WindowPtr /* fromWin */ , WindowPtr /* toWin */ , int /* mode */ ); extern int SetInputFocus(ClientPtr /* client */ , DeviceIntPtr /* dev */ , Window /* focusID */ , CARD8 /* revertTo */ , Time /* ctime */ , Bool /* followOK */ ); extern int GrabDevice(ClientPtr /* client */ , DeviceIntPtr /* dev */ , unsigned /* this_mode */ , unsigned /* other_mode */ , Window /* grabWindow */ , unsigned /* ownerEvents */ , Time /* ctime */ , GrabMask * /* mask */ , int /* grabtype */ , Cursor /* curs */ , Window /* confineToWin */ , CARD8 * /* status */ ); extern void InitEvents(void); extern void CloseDownEvents(void); extern void DeleteWindowFromAnyEvents(WindowPtr /* pWin */ , Bool /* freeResources */ ); extern Mask EventMaskForClient(WindowPtr /* pWin */ , ClientPtr /* client */ ); extern _X_EXPORT int DeliverEvents(WindowPtr /*pWin */ , xEventPtr /*xE */ , int /*count */ , WindowPtr /*otherParent */ ); extern Bool CheckMotion(DeviceEvent * /* ev */ , DeviceIntPtr /* pDev */ ); extern _X_EXPORT void WriteEventsToClient(ClientPtr /*pClient */ , int /*count */ , xEventPtr /*events */ ); extern _X_EXPORT int TryClientEvents(ClientPtr /*client */ , DeviceIntPtr /* device */ , xEventPtr /*pEvents */ , int /*count */ , Mask /*mask */ , Mask /*filter */ , GrabPtr /*grab */ ); extern _X_EXPORT void WindowsRestructured(void); extern int SetClientPointer(ClientPtr /* client */ , DeviceIntPtr /* device */ ); extern _X_EXPORT DeviceIntPtr PickPointer(ClientPtr /* client */ ); extern _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr /* client */ ); extern Bool IsInterferingGrab(ClientPtr /* client */ , DeviceIntPtr /* dev */ , xEvent * /* events */ ); #ifdef PANORAMIX extern _X_EXPORT void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); #endif #ifdef RANDR extern _X_EXPORT void ScreenRestructured(ScreenPtr pScreen); #endif /* * ServerGrabCallback stuff */ extern _X_EXPORT CallbackListPtr ServerGrabCallback; typedef enum { SERVER_GRABBED, SERVER_UNGRABBED, CLIENT_PERVIOUS, CLIENT_IMPERVIOUS } ServerGrabState; typedef struct { ClientPtr client; ServerGrabState grabstate; } ServerGrabInfoRec; /* * EventCallback stuff */ extern _X_EXPORT CallbackListPtr EventCallback; typedef struct { ClientPtr client; xEventPtr events; int count; } EventInfoRec; /* * DeviceEventCallback stuff */ extern _X_EXPORT CallbackListPtr DeviceEventCallback; typedef struct { InternalEvent *event; DeviceIntPtr device; } DeviceEventInfoRec; extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback; extern int XItoCoreType(int xi_type); extern Bool DevHasCursor(DeviceIntPtr pDev); extern _X_EXPORT Bool IsPointerDevice(DeviceIntPtr dev); extern _X_EXPORT Bool IsKeyboardDevice(DeviceIntPtr dev); extern Bool IsPointerEvent(InternalEvent *event); extern Bool IsTouchEvent(InternalEvent *event); Bool IsGestureEvent(InternalEvent *event); Bool IsGestureBeginEvent(InternalEvent *event); Bool IsGestureEndEvent(InternalEvent *event); extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev); extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev); extern _X_HIDDEN void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); extern _X_HIDDEN int CorePointerProc(DeviceIntPtr dev, int what); extern _X_HIDDEN int CoreKeyboardProc(DeviceIntPtr dev, int what); extern _X_EXPORT void *lastGLContext; #endif /* DIX_H */ xorg-server-21.1.16/include/dixaccess.h0000644000175000017500000000515314757411105013401 /*********************************************************** 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. ******************************************************************/ #ifndef DIX_ACCESS_H #define DIX_ACCESS_H /* These are the access modes that can be passed in the last parameter * to several of the dix lookup functions. They were originally part * of the Security extension, now used by XACE. * * You can or these values together to indicate multiple modes * simultaneously. */ #define DixUnknownAccess 0 /* don't know intentions */ #define DixReadAccess (1<<0) /* inspecting the object */ #define DixWriteAccess (1<<1) /* changing the object */ #define DixDestroyAccess (1<<2) /* destroying the object */ #define DixCreateAccess (1<<3) /* creating the object */ #define DixGetAttrAccess (1<<4) /* get object attributes */ #define DixSetAttrAccess (1<<5) /* set object attributes */ #define DixListPropAccess (1<<6) /* list properties of object */ #define DixGetPropAccess (1<<7) /* get properties of object */ #define DixSetPropAccess (1<<8) /* set properties of object */ #define DixGetFocusAccess (1<<9) /* get focus of object */ #define DixSetFocusAccess (1<<10) /* set focus of object */ #define DixListAccess (1<<11) /* list objects */ #define DixAddAccess (1<<12) /* add object */ #define DixRemoveAccess (1<<13) /* remove object */ #define DixHideAccess (1<<14) /* hide object */ #define DixShowAccess (1<<15) /* show object */ #define DixBlendAccess (1<<16) /* mix contents of objects */ #define DixGrabAccess (1<<17) /* exclusive access to object */ #define DixFreezeAccess (1<<18) /* freeze status of object */ #define DixForceAccess (1<<19) /* force status of object */ #define DixInstallAccess (1<<20) /* install object */ #define DixUninstallAccess (1<<21) /* uninstall object */ #define DixSendAccess (1<<22) /* send to object */ #define DixReceiveAccess (1<<23) /* receive from object */ #define DixUseAccess (1<<24) /* use object */ #define DixManageAccess (1<<25) /* manage object */ #define DixDebugAccess (1<<26) /* debug object */ #define DixBellAccess (1<<27) /* audible sound */ #define DixPostAccess (1<<28) /* post or follow-up call */ #endif /* DIX_ACCESS_H */ xorg-server-21.1.16/include/dixevents.h0000644000175000017500000000632214757411105013443 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ #ifndef DIXEVENTS_H #define DIXEVENTS_H extern _X_EXPORT void SetCriticalEvent(int /* event */ ); extern _X_EXPORT CursorPtr GetSpriteCursor(DeviceIntPtr /*pDev */ ); extern _X_EXPORT int ProcAllowEvents(ClientPtr /* client */ ); extern _X_EXPORT int MaybeDeliverEventsToClient(WindowPtr /* pWin */ , xEvent * /* pEvents */ , int /* count */ , Mask /* filter */ , ClientPtr /* dontClient */ ); extern _X_EXPORT int ProcWarpPointer(ClientPtr /* client */ ); extern _X_EXPORT int EventSelectForWindow(WindowPtr /* pWin */ , ClientPtr /* client */ , Mask /* mask */ ); extern _X_EXPORT int EventSuppressForWindow(WindowPtr /* pWin */ , ClientPtr /* client */ , Mask /* mask */ , Bool * /* checkOptional */ ); extern _X_EXPORT int ProcSetInputFocus(ClientPtr /* client */ ); extern _X_EXPORT int ProcGetInputFocus(ClientPtr /* client */ ); extern _X_EXPORT int ProcGrabPointer(ClientPtr /* client */ ); extern _X_EXPORT int ProcChangeActivePointerGrab(ClientPtr /* client */ ); extern _X_EXPORT int ProcUngrabPointer(ClientPtr /* client */ ); extern _X_EXPORT int ProcGrabKeyboard(ClientPtr /* client */ ); extern _X_EXPORT int ProcUngrabKeyboard(ClientPtr /* client */ ); extern _X_EXPORT int ProcQueryPointer(ClientPtr /* client */ ); extern _X_EXPORT int ProcSendEvent(ClientPtr /* client */ ); extern _X_EXPORT int ProcUngrabKey(ClientPtr /* client */ ); extern _X_EXPORT int ProcGrabKey(ClientPtr /* client */ ); extern _X_EXPORT int ProcGrabButton(ClientPtr /* client */ ); extern _X_EXPORT int ProcUngrabButton(ClientPtr /* client */ ); extern _X_EXPORT int ProcRecolorCursor(ClientPtr /* client */ ); #endif /* DIXEVENTS_H */ xorg-server-21.1.16/include/dixfont.h0000644000175000017500000001035014757411105013101 /*********************************************************** 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. ******************************************************************/ #ifndef DIXFONT_H #define DIXFONT_H 1 #include "dix.h" #include #include "closure.h" #include #define NullDIXFontProp ((DIXFontPropPtr)0) typedef struct _DIXFontProp *DIXFontPropPtr; extern _X_EXPORT Bool SetDefaultFont(const char * /*defaultfontname */ ); extern _X_EXPORT int OpenFont(ClientPtr /*client */ , XID /*fid */ , Mask /*flags */ , unsigned /*lenfname */ , const char * /*pfontname */ ); extern _X_EXPORT int CloseFont(void *pfont, XID fid); typedef struct _xQueryFontReply *xQueryFontReplyPtr; extern _X_EXPORT void QueryFont(FontPtr /*pFont */ , xQueryFontReplyPtr /*pReply */ , int /*nProtoCCIStructs */ ); extern _X_EXPORT int ListFonts(ClientPtr /*client */ , unsigned char * /*pattern */ , unsigned int /*length */ , unsigned int /*max_names */ ); extern _X_EXPORT int PolyText(ClientPtr /*client */ , DrawablePtr /*pDraw */ , GCPtr /*pGC */ , unsigned char * /*pElt */ , unsigned char * /*endReq */ , int /*xorg */ , int /*yorg */ , int /*reqType */ , XID /*did */ ); extern _X_EXPORT int ImageText(ClientPtr /*client */ , DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*nChars */ , unsigned char * /*data */ , int /*xorg */ , int /*yorg */ , int /*reqType */ , XID /*did */ ); extern _X_EXPORT int SetFontPath(ClientPtr /*client */ , int /*npaths */ , unsigned char * /*paths */ ); extern _X_EXPORT int SetDefaultFontPath(const char * /*path */ ); extern _X_EXPORT int GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result); extern _X_EXPORT void DeleteClientFontStuff(ClientPtr /*client */ ); /* Quartz support on Mac OS X pulls in the QuickDraw framework whose InitFonts function conflicts here. */ #ifdef __APPLE__ #define InitFonts Darwin_X_InitFonts #endif extern _X_EXPORT void InitFonts(void); extern _X_EXPORT void FreeFonts(void); extern _X_EXPORT void GetGlyphs(FontPtr /*font */ , unsigned long /*count */ , unsigned char * /*chars */ , FontEncoding /*fontEncoding */ , unsigned long * /*glyphcount */ , CharInfoPtr * /*glyphs */ ); #endif /* DIXFONT_H */ xorg-server-21.1.16/include/dixfontstr.h0000644000175000017500000000671714757411105013646 /*********************************************************** 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. ******************************************************************/ #ifndef DIXFONTSTRUCT_H #define DIXFONTSTRUCT_H #include "servermd.h" #include "dixfont.h" #include #include #include "closure.h" #include /* for xQueryFontReply */ #define FONTCHARSET(font) (font) #define FONTMAXBOUNDS(font,field) (font)->info.maxbounds.field #define FONTMINBOUNDS(font,field) (font)->info.minbounds.field #define TERMINALFONT(font) (font)->info.terminalFont #define FONTASCENT(font) (font)->info.fontAscent #define FONTDESCENT(font) (font)->info.fontDescent #define FONTGLYPHS(font) 0 #define FONTCONSTMETRICS(font) (font)->info.constantMetrics #define FONTCONSTWIDTH(font) (font)->info.constantWidth #define FONTALLEXIST(font) (font)->info.allExist #define FONTFIRSTCOL(font) (font)->info.firstCol #define FONTLASTCOL(font) (font)->info.lastCol #define FONTFIRSTROW(font) (font)->info.firstRow #define FONTLASTROW(font) (font)->info.lastRow #define FONTDEFAULTCH(font) (font)->info.defaultCh #define FONTINKMIN(font) (&((font)->info.ink_minbounds)) #define FONTINKMAX(font) (&((font)->info.ink_maxbounds)) #define FONTPROPS(font) (font)->info.props #define FONTGLYPHBITS(base,pci) ((unsigned char *) (pci)->bits) #define FONTINFONPROPS(font) (font)->info.nprops /* some things haven't changed names, but we'll be careful anyway */ #define FONTREFCNT(font) (font)->refcnt /* * for linear char sets */ #define N1dChars(pfont) (FONTLASTCOL(pfont) - FONTFIRSTCOL(pfont) + 1) /* * for 2D char sets */ #define N2dChars(pfont) (N1dChars(pfont) * \ (FONTLASTROW(pfont) - FONTFIRSTROW(pfont) + 1)) #ifndef GLYPHPADBYTES #define GLYPHPADBYTES -1 #endif #if GLYPHPADBYTES == 0 || GLYPHPADBYTES == 1 #define GLYPHWIDTHBYTESPADDED(pci) (GLYPHWIDTHBYTES(pci)) #define PADGLYPHWIDTHBYTES(w) (((w)+7)>>3) #endif #if GLYPHPADBYTES == 2 #define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+1) & ~0x1) #define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+1) & ~0x1) #endif #if GLYPHPADBYTES == 4 #define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+3) & ~0x3) #define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+3) & ~0x3) #endif #if GLYPHPADBYTES == 8 /* for a cray? */ #define GLYPHWIDTHBYTESPADDED(pci) ((GLYPHWIDTHBYTES(pci)+7) & ~0x7) #define PADGLYPHWIDTHBYTES(w) (((((w)+7)>>3)+7) & ~0x7) #endif #endif /* DIXFONTSTRUCT_H */ xorg-server-21.1.16/include/dixgrabs.h0000644000175000017500000000533314757411105013236 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ #ifndef DIXGRABS_H #define DIXGRABS_H 1 struct _GrabParameters; extern void PrintDeviceGrabInfo(DeviceIntPtr dev); extern void UngrabAllDevices(Bool kill_client); extern GrabPtr AllocGrab(const GrabPtr src); extern void FreeGrab(GrabPtr grab); extern Bool CopyGrab(GrabPtr dst, const GrabPtr src); extern GrabPtr CreateGrab(int /* client */ , DeviceIntPtr /* device */ , DeviceIntPtr /* modDevice */ , WindowPtr /* window */ , enum InputLevel /* grabtype */ , GrabMask * /* mask */ , struct _GrabParameters * /* param */ , int /* type */ , KeyCode /* keybut */ , WindowPtr /* confineTo */ , CursorPtr /* cursor */ ); extern _X_EXPORT int DeletePassiveGrab(void *value, XID id); extern _X_EXPORT Bool GrabMatchesSecond(GrabPtr /* pFirstGrab */ , GrabPtr /* pSecondGrab */ , Bool /*ignoreDevice */ ); extern _X_EXPORT int AddPassiveGrabToList(ClientPtr /* client */ , GrabPtr /* pGrab */ ); extern _X_EXPORT Bool DeletePassiveGrabFromList(GrabPtr /* pMinuendGrab */ ); extern Bool GrabIsPointerGrab(GrabPtr grab); extern Bool GrabIsKeyboardGrab(GrabPtr grab); extern Bool GrabIsGestureGrab(GrabPtr grab); #endif /* DIXGRABS_H */ xorg-server-21.1.16/include/dixstruct.h0000644000175000017500000001502614757411105013464 /*********************************************************** 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. ******************************************************************/ #ifndef DIXSTRUCT_H #define DIXSTRUCT_H #include "client.h" #include "dix.h" #include "resource.h" #include "cursor.h" #include "gc.h" #include "pixmap.h" #include "privates.h" #include /* * direct-mapped hash table, used by resource manager to store * translation from client ids to server addresses. */ extern _X_EXPORT CallbackListPtr ClientStateCallback; typedef struct { ClientPtr client; xConnSetupPrefix *prefix; xConnSetup *setup; } NewClientInfoRec; typedef void (*ReplySwapPtr) (ClientPtr /* pClient */ , int /* size */ , void * /* pbuf */ ); extern _X_EXPORT void ReplyNotSwappd(ClientPtr /* pClient */ , int /* size */ , void * /* pbuf */ ) _X_NORETURN; typedef enum { ClientStateInitial, ClientStateRunning, ClientStateRetained, ClientStateGone } ClientState; typedef struct _saveSet { struct _Window *windowPtr; Bool toRoot; Bool map; } SaveSetElt; #define SaveSetWindow(ss) ((ss).windowPtr) #define SaveSetToRoot(ss) ((ss).toRoot) #define SaveSetShouldMap(ss) ((ss).map) #define SaveSetAssignWindow(ss,w) ((ss).windowPtr = (w)) #define SaveSetAssignToRoot(ss,tr) ((ss).toRoot = (tr)) #define SaveSetAssignMap(ss,m) ((ss).map = (m)) typedef struct _Client { void *requestBuffer; void *osPrivate; /* for OS layer, including scheduler */ struct xorg_list ready; /* List of clients ready to run */ struct xorg_list output_pending; /* List of clients with output queued */ Mask clientAsMask; short index; unsigned char majorOp, minorOp; unsigned int swapped:1; unsigned int local:1; unsigned int big_requests:1; /* supports large requests */ unsigned int clientGone:1; unsigned int closeDownMode:2; unsigned int clientState:2; signed char smart_priority; short noClientException; /* this client died or needs to be killed */ int priority; ReplySwapPtr pSwapReplyFunc; XID errorValue; int sequence; int ignoreCount; /* count for Attend/IgnoreClient */ int numSaved; SaveSetElt *saveSet; int (**requestVector) (ClientPtr /* pClient */ ); CARD32 req_len; /* length of current request */ unsigned int replyBytesRemaining; PrivateRec *devPrivates; unsigned short mapNotifyMask; unsigned short newKeyboardNotifyMask; unsigned char xkbClientFlags; KeyCode minKC, maxKC; int smart_start_tick; int smart_stop_tick; DeviceIntPtr clientPtr; ClientIdPtr clientIds; int req_fds; } ClientRec; static inline void SetReqFds(ClientPtr client, int req_fds) { if (client->req_fds != 0 && req_fds != client->req_fds) LogMessage(X_ERROR, "Mismatching number of request fds %d != %d\n", req_fds, client->req_fds); client->req_fds = req_fds; } /* * Scheduling interface */ extern long SmartScheduleTime; extern long SmartScheduleInterval; extern long SmartScheduleSlice; extern long SmartScheduleMaxSlice; #ifdef HAVE_SETITIMER extern Bool SmartScheduleSignalEnable; #else #define SmartScheduleSignalEnable FALSE #endif extern void SmartScheduleStartTimer(void); extern void SmartScheduleStopTimer(void); /* Client has requests queued or data on the network */ void mark_client_ready(ClientPtr client); /* * Client has requests queued or data on the network, but awaits a * server grab release */ void mark_client_saved_ready(ClientPtr client); /* Client has no requests queued and no data on network */ void mark_client_not_ready(ClientPtr client); static inline Bool client_is_ready(ClientPtr client) { return !xorg_list_is_empty(&client->ready); } Bool clients_are_ready(void); extern struct xorg_list output_pending_clients; static inline void output_pending_mark(ClientPtr client) { if (!client->clientGone && xorg_list_is_empty(&client->output_pending)) xorg_list_append(&client->output_pending, &output_pending_clients); } static inline void output_pending_clear(ClientPtr client) { xorg_list_del(&client->output_pending); } static inline Bool any_output_pending(void) { return !xorg_list_is_empty(&output_pending_clients); } #define SMART_MAX_PRIORITY (20) #define SMART_MIN_PRIORITY (-20) extern void SmartScheduleInit(void); /* This prototype is used pervasively in Xext, dix */ #define DISPATCH_PROC(func) int func(ClientPtr /* client */) typedef struct _WorkQueue { struct _WorkQueue *next; Bool (*function) (ClientPtr /* pClient */ , void * /* closure */ ); ClientPtr client; void *closure; } WorkQueueRec; extern _X_EXPORT TimeStamp currentTime; extern _X_EXPORT int CompareTimeStamps(TimeStamp /*a */ , TimeStamp /*b */ ); extern _X_EXPORT TimeStamp ClientTimeToServerTime(CARD32 /*c */ ); typedef struct _CallbackRec { CallbackProcPtr proc; void *data; Bool deleted; struct _CallbackRec *next; } CallbackRec, *CallbackPtr; typedef struct _CallbackList { int inCallback; Bool deleted; int numDeleted; CallbackPtr list; } CallbackListRec; /* proc vectors */ extern int (*InitialVector[3]) (ClientPtr /*client */ ); extern _X_EXPORT int (*ProcVector[256]) (ClientPtr /*client */ ); extern _X_EXPORT int (*SwappedProcVector[256]) (ClientPtr /*client */ ); extern ReplySwapPtr ReplySwapVector[256]; extern _X_EXPORT int ProcBadRequest(ClientPtr /*client */ ); #endif /* DIXSTRUCT_H */ xorg-server-21.1.16/include/events.h0000644000175000017500000000316614757411105012741 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef EVENTS_H #define EVENTS_H typedef struct _DeviceEvent DeviceEvent; typedef struct _DeviceChangedEvent DeviceChangedEvent; typedef struct _TouchOwnershipEvent TouchOwnershipEvent; typedef struct _BarrierEvent BarrierEvent; typedef struct _GestureEvent GestureEvent; #ifdef XFreeXDGA typedef struct _DGAEvent DGAEvent; #endif typedef struct _RawDeviceEvent RawDeviceEvent; #ifdef XQUARTZ typedef struct _XQuartzEvent XQuartzEvent; #endif typedef union _InternalEvent InternalEvent; #endif xorg-server-21.1.16/include/exevents.h0000644000175000017500000002631614757411105013300 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ /******************************************************************** * Interface of 'exevents.c' */ #ifndef EXEVENTS_H #define EXEVENTS_H #include #include "inputstr.h" /*************************************************************** * Interface available to drivers * ***************************************************************/ /** * Scroll flags for ::SetScrollValuator. */ enum ScrollFlags { SCROLL_FLAG_NONE = 0, /** * Do not emulate legacy button events for valuator events on this axis. */ SCROLL_FLAG_DONT_EMULATE = (1 << 1), /** * This axis is the preferred axis for valuator emulation for this axis' * scroll type. */ SCROLL_FLAG_PREFERRED = (1 << 2) }; extern _X_EXPORT int InitProximityClassDeviceStruct(DeviceIntPtr /* dev */ ); extern _X_EXPORT Bool InitValuatorAxisStruct(DeviceIntPtr /* dev */ , int /* axnum */ , Atom /* label */ , int /* minval */ , int /* maxval */ , int /* resolution */ , int /* min_res */ , int /* max_res */ , int /* mode */ ); extern _X_EXPORT Bool SetScrollValuator(DeviceIntPtr /* dev */ , int /* axnum */ , enum ScrollType /* type */ , double /* increment */ , int /* flags */ ); /* Input device properties */ extern _X_EXPORT void XIDeleteAllDeviceProperties(DeviceIntPtr /* device */ ); extern _X_EXPORT int XIDeleteDeviceProperty(DeviceIntPtr /* device */ , Atom /* property */ , Bool /* fromClient */ ); extern _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr /* dev */ , Atom /* property */ , Atom /* type */ , int /* format */ , int /* mode */ , unsigned long /* len */ , const void * /* value */ , Bool /* sendevent */ ); extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ , Atom /* property */ , XIPropertyValuePtr * /* value */ ); extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ , Atom /* property */ , Bool /* deletable */ ); extern _X_EXPORT long XIRegisterPropertyHandler(DeviceIntPtr dev, int (*SetProperty) (DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly), int (*GetProperty) (DeviceIntPtr dev, Atom property), int (*DeleteProperty) (DeviceIntPtr dev, Atom property) ); extern _X_EXPORT void XIUnregisterPropertyHandler(DeviceIntPtr dev, long id); extern _X_EXPORT Atom XIGetKnownProperty(const char *name); extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev); extern _X_EXPORT int XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return); extern _X_EXPORT int XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return); /**************************************************************************** * End of driver interface * ****************************************************************************/ /** * Attached to the devPrivates of each client. Specifies the version number as * supported by the client. */ typedef struct _XIClientRec { int major_version; int minor_version; } XIClientRec, *XIClientPtr; typedef struct _GrabParameters { int grabtype; /* CORE, etc. */ unsigned int ownerEvents; unsigned int this_device_mode; unsigned int other_devices_mode; Window grabWindow; Window confineTo; Cursor cursor; unsigned int modifiers; } GrabParameters; extern int UpdateDeviceState(DeviceIntPtr /* device */ , DeviceEvent * /* xE */ ); extern void ProcessOtherEvent(InternalEvent * /* ev */ , DeviceIntPtr /* other */ ); extern int CheckGrabValues(ClientPtr /* client */ , GrabParameters * /* param */ ); extern int GrabButton(ClientPtr /* client */ , DeviceIntPtr /* dev */ , DeviceIntPtr /* modifier_device */ , int /* button */ , GrabParameters * /* param */ , enum InputLevel /* grabtype */ , GrabMask * /* eventMask */ ); extern int GrabKey(ClientPtr /* client */ , DeviceIntPtr /* dev */ , DeviceIntPtr /* modifier_device */ , int /* key */ , GrabParameters * /* param */ , enum InputLevel /* grabtype */ , GrabMask * /* eventMask */ ); extern int GrabWindow(ClientPtr /* client */ , DeviceIntPtr /* dev */ , int /* type */ , GrabParameters * /* param */ , GrabMask * /* eventMask */ ); extern int GrabTouchOrGesture(ClientPtr /* client */ , DeviceIntPtr /* dev */ , DeviceIntPtr /* mod_dev */ , int /* type */ , GrabParameters * /* param */ , GrabMask * /* eventMask */ ); extern int SelectForWindow(DeviceIntPtr /* dev */ , WindowPtr /* pWin */ , ClientPtr /* client */ , Mask /* mask */ , Mask /* exclusivemasks */ ); extern int AddExtensionClient(WindowPtr /* pWin */ , ClientPtr /* client */ , Mask /* mask */ , int /* mskidx */ ); extern void RecalculateDeviceDeliverableEvents(WindowPtr /* pWin */ ); extern int InputClientGone(WindowPtr /* pWin */ , XID /* id */ ); extern void WindowGone(WindowPtr /* win */ ); extern int SendEvent(ClientPtr /* client */ , DeviceIntPtr /* d */ , Window /* dest */ , Bool /* propagate */ , xEvent * /* ev */ , Mask /* mask */ , int /* count */ ); extern int SetButtonMapping(ClientPtr /* client */ , DeviceIntPtr /* dev */ , int /* nElts */ , BYTE * /* map */ ); extern int ChangeKeyMapping(ClientPtr /* client */ , DeviceIntPtr /* dev */ , unsigned /* len */ , int /* type */ , KeyCode /* firstKeyCode */ , CARD8 /* keyCodes */ , CARD8 /* keySymsPerKeyCode */ , KeySym * /* map */ ); extern void DeleteWindowFromAnyExtEvents(WindowPtr /* pWin */ , Bool /* freeResources */ ); extern int MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * /* pEvents */ , Mask /* mask */ ); extern void CheckDeviceGrabAndHintWindow(WindowPtr /* pWin */ , int /* type */ , deviceKeyButtonPointer * /* xE */ , GrabPtr /* grab */ , ClientPtr /* client */ , Mask /* deliveryMask */ ); extern void MaybeStopDeviceHint(DeviceIntPtr /* dev */ , ClientPtr /* client */ ); extern int DeviceEventSuppressForWindow(WindowPtr /* pWin */ , ClientPtr /* client */ , Mask /* mask */ , int /* maskndx */ ); extern void SendEventToAllWindows(DeviceIntPtr /* dev */ , Mask /* mask */ , xEvent * /* ev */ , int /* count */ ); extern void TouchRejected(DeviceIntPtr /* sourcedev */ , TouchPointInfoPtr /* ti */ , XID /* resource */ , TouchOwnershipEvent * /* ev */ ); extern _X_HIDDEN void XI2EventSwap(xGenericEvent * /* from */ , xGenericEvent * /* to */ ); /* For an event such as MappingNotify which affects client interpretation * of input events sent by device dev, should we notify the client, or * would it merely be irrelevant and confusing? */ extern int XIShouldNotify(ClientPtr client, DeviceIntPtr dev); extern void XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce); extern int XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, unsigned int len, unsigned char *mask); extern int XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len); #endif /* EXEVENTS_H */ xorg-server-21.1.16/include/extension.h0000644000175000017500000001067414757411105013453 /*********************************************************** 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. ******************************************************************/ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifndef EXTENSION_H #define EXTENSION_H #include #include "dixstruct.h" typedef void (*InitExtension) (void); typedef struct { InitExtension initFunc; const char *name; Bool *disablePtr; } ExtensionModule; extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ ); extern _X_EXPORT Bool EnableDisableExtension(const char *name, Bool enable); extern _X_EXPORT void EnableDisableExtensionError(const char *name, Bool enable); extern _X_EXPORT void InitExtensions(int argc, char **argv); extern _X_EXPORT void CloseDownExtensions(void); extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[], int listSize, Bool external); #endif /* EXTENSION_H */ xorg-server-21.1.16/include/extinit.h0000644000175000017500000001142514757411105013116 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * 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, FIT- * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * XFREE86 PROJECT 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 XFree86 Project 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 XFree86 Project. */ #ifndef EXTINIT_H #define EXTINIT_H #include "extnsionst.h" #ifdef COMPOSITE extern _X_EXPORT Bool noCompositeExtension; extern void CompositeExtensionInit(void); #endif #ifdef DAMAGE extern _X_EXPORT Bool noDamageExtension; extern void DamageExtensionInit(void); #endif #if defined(DBE) extern _X_EXPORT Bool noDbeExtension; extern void DbeExtensionInit(void); #endif #if defined(DPMSExtension) extern _X_EXPORT Bool noDPMSExtension; extern void DPMSExtensionInit(void); #endif extern Bool noGEExtension; extern void GEExtensionInit(void); #ifdef GLXEXT extern _X_EXPORT Bool noGlxExtension; extern void GlxExtensionInit(void); #endif #ifdef PANORAMIX extern _X_EXPORT Bool noPanoramiXExtension; extern void PanoramiXExtensionInit(void); #endif #ifdef RANDR extern _X_EXPORT Bool noRRExtension; extern void RRExtensionInit(void); #endif #if defined(XRECORD) extern void RecordExtensionInit(void); #endif extern _X_EXPORT Bool noRenderExtension; extern void RenderExtensionInit(void); #if defined(RES) extern _X_EXPORT Bool noResExtension; extern void ResExtensionInit(void); #endif #if defined(SCREENSAVER) extern _X_EXPORT Bool noScreenSaverExtension; extern void ScreenSaverExtensionInit(void); #endif extern void ShapeExtensionInit(void); #ifdef MITSHM extern _X_EXPORT Bool noMITShmExtension; extern void ShmExtensionInit(void); #endif extern void SyncExtensionInit(void); extern void XCMiscExtensionInit(void); #ifdef XCSECURITY extern _X_EXPORT Bool noSecurityExtension; extern void SecurityExtensionInit(void); #endif #ifdef XF86BIGFONT extern _X_EXPORT Bool noXFree86BigfontExtension; extern void XFree86BigfontExtensionInit(void); #endif extern void BigReqExtensionInit(void); extern _X_EXPORT Bool noXFixesExtension; extern void XFixesExtensionInit(void); extern void XInputExtensionInit(void); extern void XkbExtensionInit(void); #if defined(XSELINUX) extern _X_EXPORT Bool noSELinuxExtension; extern void SELinuxExtensionInit(void); #endif #ifdef XTEST extern void XTestExtensionInit(void); #endif #if defined(XV) extern _X_EXPORT Bool noXvExtension; extern void XvExtensionInit(void); extern void XvMCExtensionInit(void); #endif #if defined(DRI3) extern void dri3_extension_init(void); #endif #if defined(PRESENT) #include "presentext.h" #endif #endif xorg-server-21.1.16/include/extnsionst.h0000644000175000017500000000774314757411105013660 /*********************************************************** 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. ******************************************************************/ #ifndef EXTENSIONSTRUCT_H #define EXTENSIONSTRUCT_H #include "dix.h" #include "misc.h" #include "screenint.h" #include "extension.h" #include "gc.h" #include "privates.h" typedef struct _ExtensionEntry { int index; void (*CloseDown) ( /* called at server shutdown */ struct _ExtensionEntry * /* extension */ ); const char *name; /* extension name */ int base; /* base request number */ int eventBase; int eventLast; int errorBase; int errorLast; void *extPrivate; unsigned short (*MinorOpcode) ( /* called for errors */ ClientPtr /* client */ ); PrivateRec *devPrivates; } ExtensionEntry; /* * The arguments may be different for extension event swapping functions. * Deal with this by casting when initializing the event's EventSwapVector[] * entries. */ typedef void (*EventSwapPtr) (xEvent *, xEvent *); extern _X_EXPORT EventSwapPtr EventSwapVector[128]; extern _X_EXPORT void NotImplemented( /* FIXME: this may move to another file... */ xEvent *, xEvent *) _X_NORETURN; extern _X_EXPORT ExtensionEntry * AddExtension(const char * /*name */ , int /*NumEvents */ , int /*NumErrors */ , int (* /*MainProc */ )(ClientPtr /*client */ ), int (* /*SwappedMainProc */ )(ClientPtr /*client */ ), void (* /*CloseDownProc */ )(ExtensionEntry * /*extension */ ), unsigned short (* /*MinorOpcodeProc */ )(ClientPtr /*client */ ) ); extern _X_EXPORT ExtensionEntry * CheckExtension(const char *extname); extern _X_EXPORT ExtensionEntry * GetExtensionEntry(int major); #endif /* EXTENSIONSTRUCT_H */ xorg-server-21.1.16/include/fourcc.h0000644000175000017500000001123214757411105012707 /* * Copyright (c) 2000-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ /* This header file contains listings of STANDARD guids for video formats. Please do not place non-registered, or incomplete entries in this file. A list of some popular fourcc's are at: http://www.webartz.com/fourcc/ For an explanation of fourcc <-> guid mappings see RFC2361. */ #ifndef _XF86_FOURCC_H_ #define _XF86_FOURCC_H_ 1 #define FOURCC_YUY2 0x32595559 #define XVIMAGE_YUY2 \ { \ FOURCC_YUY2, \ XvYUV, \ LSBFirst, \ {'Y','U','Y','2', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 16, \ XvPacked, \ 1, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 2, 2, \ 1, 1, 1, \ {'Y','U','Y','V', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_YV12 0x32315659 #define XVIMAGE_YV12 \ { \ FOURCC_YV12, \ XvYUV, \ LSBFirst, \ {'Y','V','1','2', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 12, \ XvPlanar, \ 3, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 2, 2, \ 1, 2, 2, \ {'Y','V','U', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_I420 0x30323449 #define XVIMAGE_I420 \ { \ FOURCC_I420, \ XvYUV, \ LSBFirst, \ {'I','4','2','0', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 12, \ XvPlanar, \ 3, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 2, 2, \ 1, 2, 2, \ {'Y','U','V', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_UYVY 0x59565955 #define XVIMAGE_UYVY \ { \ FOURCC_UYVY, \ XvYUV, \ LSBFirst, \ {'U','Y','V','Y', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 16, \ XvPacked, \ 1, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 2, 2, \ 1, 1, 1, \ {'U','Y','V','Y', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_IA44 0x34344149 #define XVIMAGE_IA44 \ { \ FOURCC_IA44, \ XvYUV, \ LSBFirst, \ {'I','A','4','4', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 8, \ XvPacked, \ 1, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 1, 1, \ 1, 1, 1, \ {'A','I', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_AI44 0x34344941 #define XVIMAGE_AI44 \ { \ FOURCC_AI44, \ XvYUV, \ LSBFirst, \ {'A','I','4','4', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 8, \ XvPacked, \ 1, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 1, 1, \ 1, 1, 1, \ {'I','A', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #define FOURCC_NV12 0x3231564e #define XVIMAGE_NV12 \ { \ FOURCC_NV12, \ XvYUV, \ LSBFirst, \ {'N','V','1','2', \ 0x00,0x00,0x00,0x10,0x80,0x00,0x00,0xAA,0x00,0x38,0x9B,0x71}, \ 12, \ XvPlanar, \ 2, \ 0, 0, 0, 0, \ 8, 8, 8, \ 1, 2, 2, \ 1, 2, 2, \ {'Y','U','V', \ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, \ XvTopToBottom \ } #endif /* _XF86_FOURCC_H_ */ xorg-server-21.1.16/include/gc.h0000644000175000017500000001303514757411105012022 /*********************************************************** 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. ******************************************************************/ #ifndef GC_H #define GC_H #include /* for GContext, Mask */ #include /* for Bool */ #include #include "screenint.h" /* for ScreenPtr */ #include "pixmap.h" /* for DrawablePtr */ /* clientClipType field in GC */ #define CT_NONE 0 #define CT_PIXMAP 1 #define CT_REGION 2 #define CT_UNSORTED 6 #define CT_YSORTED 10 #define CT_YXSORTED 14 #define CT_YXBANDED 18 #define GCQREASON_VALIDATE 1 #define GCQREASON_CHANGE 2 #define GCQREASON_COPY_SRC 3 #define GCQREASON_COPY_DST 4 #define GCQREASON_DESTROY 5 #define GC_CHANGE_SERIAL_BIT (((unsigned long)1)<<31) #define GC_CALL_VALIDATE_BIT (1L<<30) #define GCExtensionInterest (1L<<29) #define DRAWABLE_SERIAL_BITS (~(GC_CHANGE_SERIAL_BIT)) #define MAX_SERIAL_NUM (1L<<28) #define NEXT_SERIAL_NUMBER ((++globalSerialNumber) > MAX_SERIAL_NUM ? \ (globalSerialNumber = 1): globalSerialNumber) typedef struct _GCInterest *GCInterestPtr; typedef struct _GC *GCPtr; typedef struct _GCOps *GCOpsPtr; extern _X_EXPORT void ValidateGC(DrawablePtr /*pDraw */ , GCPtr /*pGC */ ); typedef union { CARD32 val; void *ptr; } ChangeGCVal, *ChangeGCValPtr; extern int ChangeGCXIDs(ClientPtr /*client */ , GCPtr /*pGC */ , BITS32 /*mask */ , CARD32 * /*pval */ ); extern _X_EXPORT int ChangeGC(ClientPtr /*client */ , GCPtr /*pGC */ , BITS32 /*mask */ , ChangeGCValPtr /*pCGCV */ ); extern _X_EXPORT GCPtr CreateGC(DrawablePtr /*pDrawable */ , BITS32 /*mask */ , XID * /*pval */ , int * /*pStatus */ , XID /*gcid */ , ClientPtr /*client */ ); extern _X_EXPORT int CopyGC(GCPtr /*pgcSrc */ , GCPtr /*pgcDst */ , BITS32 /*mask */ ); extern _X_EXPORT int FreeGC(void *pGC, XID gid); extern _X_EXPORT void FreeGCperDepth(int /*screenNum */ ); extern _X_EXPORT Bool CreateGCperDepth(int /*screenNum */ ); extern _X_EXPORT Bool CreateDefaultStipple(int /*screenNum */ ); extern _X_EXPORT void FreeDefaultStipple(int /*screenNum */ ); extern _X_EXPORT int SetDashes(GCPtr /*pGC */ , unsigned /*offset */ , unsigned /*ndash */ , unsigned char * /*pdash */ ); extern _X_EXPORT int VerifyRectOrder(int /*nrects */ , xRectangle * /*prects */ , int /*ordering */ ); extern _X_EXPORT int SetClipRects(GCPtr /*pGC */ , int /*xOrigin */ , int /*yOrigin */ , int /*nrects */ , xRectangle * /*prects */ , int /*ordering */ ); extern _X_EXPORT GCPtr GetScratchGC(unsigned /*depth */ , ScreenPtr /*pScreen */ ); extern _X_EXPORT void FreeScratchGC(GCPtr /*pGC */ ); #endif /* GC_H */ xorg-server-21.1.16/include/gcstruct.h0000644000175000017500000002423514757411105013273 /*********************************************************** 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. ******************************************************************/ #ifndef GCSTRUCT_H #define GCSTRUCT_H #include "gc.h" #include "regionstr.h" #include "region.h" #include "pixmap.h" #include "screenint.h" #include "privates.h" #include #define GCAllBits ((1 << (GCLastBit + 1)) - 1) /* * functions which modify the state of the GC */ typedef struct _GCFuncs { void (*ValidateGC) (GCPtr /*pGC */ , unsigned long /*stateChanges */ , DrawablePtr /*pDrawable */ ); void (*ChangeGC) (GCPtr /*pGC */ , unsigned long /*mask */ ); void (*CopyGC) (GCPtr /*pGCSrc */ , unsigned long /*mask */ , GCPtr /*pGCDst */ ); void (*DestroyGC) (GCPtr /*pGC */ ); void (*ChangeClip) (GCPtr pGC, int type, void *pvalue, int nrects); void (*DestroyClip) (GCPtr /*pGC */ ); void (*CopyClip) (GCPtr /*pgcDst */ , GCPtr /*pgcSrc */ ); } GCFuncs; /* * graphics operations invoked through a GC */ typedef struct _GCOps { void (*FillSpans) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*nInit */ , DDXPointPtr /*pptInit */ , int * /*pwidthInit */ , int /*fSorted */ ); void (*SetSpans) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , char * /*psrc */ , DDXPointPtr /*ppt */ , int * /*pwidth */ , int /*nspans */ , int /*fSorted */ ); void (*PutImage) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*depth */ , int /*x */ , int /*y */ , int /*w */ , int /*h */ , int /*leftPad */ , int /*format */ , char * /*pBits */ ); RegionPtr (*CopyArea) (DrawablePtr /*pSrc */ , DrawablePtr /*pDst */ , GCPtr /*pGC */ , int /*srcx */ , int /*srcy */ , int /*w */ , int /*h */ , int /*dstx */ , int /*dsty */ ); RegionPtr (*CopyPlane) (DrawablePtr /*pSrcDrawable */ , DrawablePtr /*pDstDrawable */ , GCPtr /*pGC */ , int /*srcx */ , int /*srcy */ , int /*width */ , int /*height */ , int /*dstx */ , int /*dsty */ , unsigned long /*bitPlane */ ); void (*PolyPoint) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , int /*npt */ , DDXPointPtr /*pptInit */ ); void (*Polylines) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , int /*npt */ , DDXPointPtr /*pptInit */ ); void (*PolySegment) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*nseg */ , xSegment * /*pSegs */ ); void (*PolyRectangle) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*nrects */ , xRectangle * /*pRects */ ); void (*PolyArc) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*narcs */ , xArc * /*parcs */ ); void (*FillPolygon) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*shape */ , int /*mode */ , int /*count */ , DDXPointPtr /*pPts */ ); void (*PolyFillRect) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*nrectFill */ , xRectangle * /*prectInit */ ); void (*PolyFillArc) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*narcs */ , xArc * /*parcs */ ); int (*PolyText8) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , char * /*chars */ ); int (*PolyText16) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , unsigned short * /*chars */ ); void (*ImageText8) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , char * /*chars */ ); void (*ImageText16) (DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , unsigned short * /*chars */ ); void (*ImageGlyphBlt) (DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase); void (*PolyGlyphBlt) (DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase); void (*PushPixels) (GCPtr /*pGC */ , PixmapPtr /*pBitMap */ , DrawablePtr /*pDst */ , int /*w */ , int /*h */ , int /*x */ , int /*y */ ); } GCOps; /* there is padding in the bit fields because the Sun compiler doesn't * force alignment to 32-bit boundaries. losers. */ typedef struct _GC { ScreenPtr pScreen; unsigned char depth; unsigned char alu; unsigned short lineWidth; unsigned short dashOffset; unsigned short numInDashList; unsigned char *dash; unsigned int lineStyle:2; unsigned int capStyle:2; unsigned int joinStyle:2; unsigned int fillStyle:2; unsigned int fillRule:1; unsigned int arcMode:1; unsigned int subWindowMode:1; unsigned int graphicsExposures:1; unsigned int miTranslate:1; /* should mi things translate? */ unsigned int tileIsPixel:1; /* tile is solid pixel */ unsigned int fExpose:1; /* Call exposure handling */ unsigned int freeCompClip:1; /* Free composite clip */ unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */ unsigned int unused:15; /* see comment above */ unsigned int planemask; unsigned int fgPixel; unsigned int bgPixel; /* * alas -- both tile and stipple must be here as they * are independently specifiable */ PixUnion tile; PixmapPtr stipple; DDXPointRec patOrg; /* origin for (tile, stipple) */ DDXPointRec clipOrg; struct _Font *font; RegionPtr clientClip; unsigned int stateChanges; /* masked with GC_ */ unsigned int serialNumber; const GCFuncs *funcs; const GCOps *ops; PrivateRec *devPrivates; RegionPtr pCompositeClip; } GC; #endif /* GCSTRUCT_H */ xorg-server-21.1.16/include/globals.h0000644000175000017500000000232014757411105013047 #ifndef _XSERV_GLOBAL_H_ #define _XSERV_GLOBAL_H_ #include "window.h" /* for WindowPtr */ #include "extinit.h" #ifdef DPMSExtension /* sigh, too many drivers assume this */ #include #endif /* Global X server variables that are visible to mi, dix, os, and ddx */ extern _X_EXPORT CARD32 defaultScreenSaverTime; extern _X_EXPORT CARD32 defaultScreenSaverInterval; extern _X_EXPORT CARD32 ScreenSaverTime; extern _X_EXPORT CARD32 ScreenSaverInterval; #ifdef SCREENSAVER extern _X_EXPORT Bool screenSaverSuspended; #endif extern _X_EXPORT const char *defaultFontPath; extern _X_EXPORT int monitorResolution; extern _X_EXPORT int defaultColorVisualClass; extern _X_EXPORT int GrabInProgress; extern _X_EXPORT Bool noTestExtensions; extern _X_EXPORT char *SeatId; extern _X_EXPORT char *ConnectionInfo; extern _X_EXPORT sig_atomic_t inSignalContext; #ifdef PANORAMIX extern _X_EXPORT Bool PanoramiXExtensionDisabledHack; #endif #ifdef XSELINUX #define SELINUX_MODE_DEFAULT 0 #define SELINUX_MODE_DISABLED 1 #define SELINUX_MODE_PERMISSIVE 2 #define SELINUX_MODE_ENFORCING 3 extern _X_EXPORT int selinuxEnforcingState; #endif #endif /* !_XSERV_GLOBAL_H_ */ xorg-server-21.1.16/include/glx_extinit.h0000644000175000017500000000370214757411105013767 /* * Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * 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, FIT- * NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * XFREE86 PROJECT 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 XFree86 Project 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 XFree86 Project. */ #ifndef GLX_EXT_INIT_H #define GLX_EXT_INIT_H /* this is separate due to sdksyms pulling in extinit.h */ /* XXX this comment no longer makes sense i think */ #ifdef GLXEXT typedef struct __GLXprovider __GLXprovider; typedef struct __GLXscreen __GLXscreen; struct __GLXprovider { __GLXscreen *(*screenProbe) (ScreenPtr pScreen); const char *name; __GLXprovider *next; }; extern __GLXprovider __glXDRISWRastProvider; void GlxPushProvider(__GLXprovider * provider); Bool xorgGlxCreateVendor(void); #else static inline Bool xorgGlxCreateVendor(void) { return TRUE; } #endif #endif xorg-server-21.1.16/include/glxvndabi.h0000644000175000017500000002621714757411105013415 /* * Copyright (c) 2016, NVIDIA CORPORATION. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the * "Materials"), to deal in the Materials without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Materials, and to * permit persons to whom the Materials are furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be included * unaltered in all copies or substantial portions of the Materials. * Any additions, deletions, or changes to the original source files * must be clearly indicated in accompanying documentation. * * If only executable code is distributed, then the accompanying * documentation must state that "this software is based in part on the * work of the Khronos Group." * * THE MATERIALS ARE 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 AUTHORS OR COPYRIGHT HOLDERS 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 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ /** * \file * * Defines the interface between the libglvnd server module and a vendor * library. * * Each screen may have one vendor library assigned to it. The GLVND module * will examine each GLX request to determine which screen it goes to, and then * it will forward that request to whichever vendor is assigned to that screen. * * Each vendor library is represented by an opaque __GLXServerVendor handle. * Display drivers are responsible for creating handles for its GLX * implementations, and assigning those handles to each screen. * * The GLVND module keeps a list of callbacks, which are called from * InitExtensions. Drivers should use that callback to assign a vendor * handle to whichever screens they support. * * Additional notes about dispatching: * - If a request has one or more GLXContextTag values, then the dispatch stub * must ensure that all of the tags belong to the vendor that it forwards the * request to. Otherwise, if a vendor library tries to look up the private * data for the tag, it could get the data from another vendor and crash. * - Following from the last point, if a request takes a GLXContextTag value, * then the dispatch stub should use the tag to select a vendor. If the * request takes two or more tags, then the vendor must ensure that they all * map to the same vendor. */ #ifndef GLXVENDORABI_H #define GLXVENDORABI_H #include #include #include /*! * Current version of the ABI. * * This version number contains a major number in the high-order 16 bits, and * a minor version number in the low-order 16 bits. * * The major version number is incremented when an interface change will break * backwards compatibility with existing vendor libraries. The minor version * number is incremented when there's a change but existing vendor libraries * will still work. */ #define GLXSERVER_VENDOR_ABI_MAJOR_VERSION 0 #define GLXSERVER_VENDOR_ABI_MINOR_VERSION 1 #if defined(__cplusplus) extern "C" { #endif /** * An opaque pointer representing a vendor library. */ typedef struct GlxServerVendorRec GlxServerVendor; typedef int (* GlxServerDispatchProc) (ClientPtr client); typedef struct GlxServerImportsRec GlxServerImports; /** * Functions exported by libglvnd to the vendor library. */ typedef struct GlxServerExportsRec { int majorVersion; int minorVersion; /** * This callback is called during each server generation when the GLX * extension is initialized. * * Drivers may create a __GLXServerVendor handle at any time, but may only * assign a vendor to a screen from this callback. * * The callback is called with the ExtensionEntry pointer for the GLX * extension. */ CallbackListPtr *extensionInitCallback; /** * Allocates and zeroes a __GLXserverImports structure. * * Future versions of the GLVND interface may add optional members to the * end of the __GLXserverImports struct. Letting the GLVND layer allocate * the __GLXserverImports struct allows backward compatibility with * existing drivers. */ GlxServerImports * (* allocateServerImports) (void); /** * Frees a __GLXserverImports structure that was allocated with * \c allocateServerImports. */ void (* freeServerImports) (GlxServerImports *imports); /** * Creates a new vendor library handle. */ GlxServerVendor * (* createVendor) (const GlxServerImports *imports); /** * Destroys a vendor library handle. * * This function may not be called while the vendor handle is assigned to a * screen, but it may be called from the __GLXserverImports::extensionCloseDown * callback. */ void (* destroyVendor) (GlxServerVendor *vendor); /** * Sets the vendor library to use for a screen. * * This function should be called from the screen's CreateScreenResources * callback. */ Bool (* setScreenVendor) (ScreenPtr screen, GlxServerVendor *vendor); /** * Adds an entry to the XID map. * * This mapping is used to dispatch requests based on an XID. * * Client-generated XID's (contexts, drawables, etc) must be added to the * map by the dispatch stub. * * XID's that are generated in the server should be added by the vendor * library. * * Vendor libraries are responsible for keeping track of any additional * data they need for the XID's. * * Note that adding GLXFBConfig ID's appears to be unnecessary -- every GLX * request I can find that takes a GLXFBConfig also takes a screen number. * * \param id The XID to add to the map. The XID must not already be in the * map. * \param vendor The vendor library to associate with \p id. * \return True on success, or False on failure. */ Bool (* addXIDMap) (XID id, GlxServerVendor *vendor); /** * Returns the vendor and data for an XID, as added with \c addXIDMap. * * If \p id wasn't added with \c addXIDMap (for example, if it's a regular * X window), then libglvnd will try to look it up as a drawable and return * the vendor for whatever screen it's on. * * \param id The XID to look up. * \return The vendor that owns the XID, or \c NULL if no matching vendor * was found. */ GlxServerVendor * (* getXIDMap) (XID id); /** * Removes an entry from the XID map. */ void (* removeXIDMap) (XID id); /** * Looks up a context tag. * * Context tags are created and managed by libglvnd to ensure that they're * unique between vendors. * * \param client The client connection. * \param tag The context tag. * \return The vendor that owns the context tag, or \c NULL if the context * tag is invalid. */ GlxServerVendor * (* getContextTag)(ClientPtr client, GLXContextTag tag); /** * Assigns a pointer to vendor-private data for a context tag. * * Since the tag values are assigned by GLVND, vendors can use this * function to store any private data they need for a context tag. * * \param client The client connection. * \param tag The context tag. * \param data An arbitrary pointer value. */ Bool (* setContextTagPrivate)(ClientPtr client, GLXContextTag tag, void *data); /** * Returns the private data pointer that was assigned from * setContextTagPrivate. * * This function is safe to use in __GLXserverImports::makeCurrent to look * up the old context private pointer. * * However, this function is not safe to use from a ClientStateCallback, * because GLVND may have already deleted the tag by that point. */ void * (* getContextTagPrivate)(ClientPtr client, GLXContextTag tag); GlxServerVendor * (* getVendorForScreen) (ClientPtr client, ScreenPtr screen); /** * Forwards a request to a vendor library. * * \param vendor The vendor to send the request to. * \param client The client. */ int (* forwardRequest) (GlxServerVendor *vendor, ClientPtr client); /** * Sets the vendor library to use for a screen for a specific client. * * This function changes which vendor should handle GLX requests for a * screen. Unlike \c setScreenVendor, this function can be called at any * time, and only applies to requests from a single client. * * This function is available in GLXVND version 0.1 or later. */ Bool (* setClientScreenVendor) (ClientPtr client, ScreenPtr screen, GlxServerVendor *vendor); } GlxServerExports; extern _X_EXPORT const GlxServerExports glxServer; /** * Functions exported by the vendor library to libglvnd. */ struct GlxServerImportsRec { /** * Called on a server reset. * * This is called from the extension's CloseDown callback. * * Note that this is called after freeing all of GLVND's per-screen data, * so the callback may destroy any vendor handles. * * If the server is exiting, then GLVND will free any remaining vendor * handles after calling the extensionCloseDown callbacks. */ void (* extensionCloseDown) (const ExtensionEntry *extEntry); /** * Handles a GLX request. */ int (* handleRequest) (ClientPtr client); /** * Returns a dispatch function for a request. * * \param minorOpcode The minor opcode of the request. * \param vendorCode The vendor opcode, if \p minorOpcode * is \c X_GLXVendorPrivate or \c X_GLXVendorPrivateWithReply. * \return A dispatch function, or NULL if the vendor doesn't support this * request. */ GlxServerDispatchProc (* getDispatchAddress) (CARD8 minorOpcode, CARD32 vendorCode); /** * Handles a MakeCurrent request. * * This function is called to handle any MakeCurrent request. The vendor * library should deal with changing the current context. After the vendor * returns GLVND will send the reply. * * In addition, GLVND will call this function with any current contexts * when a client disconnects. * * To ensure that context tags are unique, libglvnd will select a context * tag and pass it to the vendor library. * * The vendor can use \c __GLXserverExports::getContextTagPrivate to look * up the private data pointer for \p oldContextTag. * * Likewise, the vendor can use \c __GLXserverExports::setContextTagPrivate * to assign a private data pointer to \p newContextTag. */ int (* makeCurrent) (ClientPtr client, GLXContextTag oldContextTag, XID drawable, XID readdrawable, XID context, GLXContextTag newContextTag); }; #if defined(__cplusplus) } #endif #endif // GLXVENDORABI_H xorg-server-21.1.16/include/input.h0000644000175000017500000011014014757411105012563 /************************************************************ 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. ********************************************************/ #ifndef INPUT_H #define INPUT_H #include "misc.h" #include "screenint.h" #include #include #include #include "window.h" /* for WindowPtr */ #include "xkbrules.h" #include "events.h" #include "list.h" #include "os.h" #include #define DEFAULT_KEYBOARD_CLICK 0 #define DEFAULT_BELL 50 #define DEFAULT_BELL_PITCH 400 #define DEFAULT_BELL_DURATION 100 #define DEFAULT_AUTOREPEAT TRUE #define DEFAULT_AUTOREPEATS {\ 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,\ 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00} #define DEFAULT_LEDS 0x0 /* all off */ #define DEFAULT_LEDS_MASK 0xffffffff /* 32 */ #define DEFAULT_INT_RESOLUTION 1000 #define DEFAULT_INT_MIN_VALUE 0 #define DEFAULT_INT_MAX_VALUE 100 #define DEFAULT_INT_DISPLAYED 0 #define DEFAULT_PTR_NUMERATOR 2 #define DEFAULT_PTR_DENOMINATOR 1 #define DEFAULT_PTR_THRESHOLD 4 #define DEVICE_INIT 0 #define DEVICE_ON 1 #define DEVICE_OFF 2 #define DEVICE_CLOSE 3 #define DEVICE_ABORT 4 #define POINTER_RELATIVE (1 << 1) #define POINTER_ABSOLUTE (1 << 2) #define POINTER_ACCELERATE (1 << 3) #define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */ #define POINTER_NORAW (1 << 5) /* Don't generate RawEvents */ #define POINTER_EMULATED (1 << 6) /* Event was emulated from another event */ #define POINTER_DESKTOP (1 << 7) /* Data in desktop coordinates */ #define POINTER_RAWONLY (1 << 8) /* Only generate RawEvents */ /* GetTouchEvent flags */ #define TOUCH_ACCEPT (1 << 0) #define TOUCH_REJECT (1 << 1) #define TOUCH_PENDING_END (1 << 2) #define TOUCH_CLIENT_ID (1 << 3) /* touch ID is the client-visible id */ #define TOUCH_REPLAYING (1 << 4) /* event is being replayed */ #define TOUCH_POINTER_EMULATED (1 << 5) /* touch event may be pointer emulated */ #define TOUCH_END (1 << 6) /* really end this touch now */ /* GetGestureEvent flags */ #define GESTURE_CANCELLED (1 << 0) /*int constants for pointer acceleration schemes*/ #define PtrAccelNoOp 0 #define PtrAccelPredictable 1 #define PtrAccelLightweight 2 #define PtrAccelDefault PtrAccelPredictable #define MAX_VALUATORS 36 /* Maximum number of valuators, divided by six, rounded up, to get number * of events. */ #define MAX_VALUATOR_EVENTS 6 #define MAX_BUTTONS 256 /* completely arbitrarily chosen */ #define NO_AXIS_LIMITS -1 #define MAP_LENGTH MAX_BUTTONS #define DOWN_LENGTH (MAX_BUTTONS/8) /* 256/8 => number of bytes to hold 256 bits */ #define NullGrab ((GrabPtr)NULL) #define PointerRootWin ((WindowPtr)PointerRoot) #define NoneWin ((WindowPtr)None) #define NullDevice ((DevicePtr)NULL) #ifndef FollowKeyboard #define FollowKeyboard 3 #endif #ifndef FollowKeyboardWin #define FollowKeyboardWin ((WindowPtr) FollowKeyboard) #endif #ifndef RevertToFollowKeyboard #define RevertToFollowKeyboard 3 #endif enum InputLevel { CORE = 1, XI = 2, XI2 = 3, }; typedef unsigned long Leds; typedef struct _OtherClients *OtherClientsPtr; typedef struct _InputClients *InputClientsPtr; typedef struct _DeviceIntRec *DeviceIntPtr; typedef struct _ValuatorClassRec *ValuatorClassPtr; typedef struct _ClassesRec *ClassesPtr; typedef struct _SpriteRec *SpritePtr; typedef struct _TouchClassRec *TouchClassPtr; typedef struct _GestureClassRec *GestureClassPtr; typedef struct _TouchPointInfo *TouchPointInfoPtr; typedef struct _GestureInfo *GestureInfoPtr; typedef struct _DDXTouchPointInfo *DDXTouchPointInfoPtr; typedef union _GrabMask GrabMask; typedef struct _ValuatorMask ValuatorMask; /* The DIX stores incoming input events in this list */ extern InternalEvent *InputEventList; typedef int (*DeviceProc) (DeviceIntPtr /*device */ , int /*what */ ); typedef void (*ProcessInputProc) (InternalEvent * /*event */ , DeviceIntPtr /*device */ ); typedef Bool (*DeviceHandleProc) (DeviceIntPtr /*device */ , void * /*data */ ); typedef void (*DeviceUnwrapProc) (DeviceIntPtr /*device */ , DeviceHandleProc /*proc */ , void * /*data */ ); /* pointer acceleration handling */ typedef void (*PointerAccelSchemeProc) (DeviceIntPtr /*device */ , ValuatorMask * /*valuators */ , CARD32 /*evtime */ ); typedef void (*DeviceCallbackProc) (DeviceIntPtr /*pDev */ ); struct _ValuatorAccelerationRec; typedef Bool (*PointerAccelSchemeInitProc) (DeviceIntPtr /*dev */ , struct _ValuatorAccelerationRec * /*protoScheme */ ); typedef struct _DeviceRec { void *devicePrivate; ProcessInputProc processInputProc; /* current */ ProcessInputProc realInputProc; /* deliver */ ProcessInputProc enqueueInputProc; /* enqueue */ Bool on; /* used by DDX to keep state */ } DeviceRec, *DevicePtr; typedef struct { int click, bell, bell_pitch, bell_duration; Bool autoRepeat; unsigned char autoRepeats[32]; Leds leds; unsigned char id; } KeybdCtrl; typedef struct { KeySym *map; KeyCode minKeyCode, maxKeyCode; int mapWidth; } KeySymsRec, *KeySymsPtr; typedef struct { int num, den, threshold; unsigned char id; } PtrCtrl; typedef struct { int resolution, min_value, max_value; int integer_displayed; unsigned char id; } IntegerCtrl; typedef struct { int max_symbols, num_symbols_supported; int num_symbols_displayed; KeySym *symbols_supported; KeySym *symbols_displayed; unsigned char id; } StringCtrl; typedef struct { int percent, pitch, duration; unsigned char id; } BellCtrl; typedef struct { Leds led_values; Mask led_mask; unsigned char id; } LedCtrl; extern _X_EXPORT KeybdCtrl defaultKeyboardControl; extern _X_EXPORT PtrCtrl defaultPointerControl; typedef struct _InputOption InputOption; typedef struct _XI2Mask XI2Mask; typedef struct _InputAttributes { char *product; char *vendor; char *device; char *pnp_id; char *usb_id; char **tags; /* null-terminated */ uint32_t flags; } InputAttributes; #define ATTR_KEYBOARD (1<<0) #define ATTR_POINTER (1<<1) #define ATTR_JOYSTICK (1<<2) #define ATTR_TABLET (1<<3) #define ATTR_TOUCHPAD (1<<4) #define ATTR_TOUCHSCREEN (1<<5) #define ATTR_KEY (1<<6) #define ATTR_TABLET_PAD (1<<7) /* Key/Button has been run through all input processing and events sent to clients. */ #define KEY_PROCESSED 1 #define BUTTON_PROCESSED 1 /* Key/Button has not been fully processed, no events have been sent. */ #define KEY_POSTED 2 #define BUTTON_POSTED 2 extern _X_EXPORT void set_key_down(DeviceIntPtr pDev, int key_code, int type); extern _X_EXPORT void set_key_up(DeviceIntPtr pDev, int key_code, int type); extern _X_EXPORT int key_is_down(DeviceIntPtr pDev, int key_code, int type); extern _X_EXPORT void set_button_down(DeviceIntPtr pDev, int button, int type); extern _X_EXPORT void set_button_up(DeviceIntPtr pDev, int button, int type); extern _X_EXPORT int button_is_down(DeviceIntPtr pDev, int button, int type); extern void InitCoreDevices(void); extern void InitXTestDevices(void); extern _X_EXPORT DeviceIntPtr AddInputDevice(ClientPtr /*client */ , DeviceProc /*deviceProc */ , Bool /*autoStart */ ); extern _X_EXPORT Bool EnableDevice(DeviceIntPtr /*device */ , BOOL /* sendevent */ ); extern _X_EXPORT Bool ActivateDevice(DeviceIntPtr /*device */ , BOOL /* sendevent */ ); extern _X_EXPORT Bool DisableDevice(DeviceIntPtr /*device */ , BOOL /* sendevent */ ); extern void DisableAllDevices(void); extern int InitAndStartDevices(void); extern void CloseDownDevices(void); extern void AbortDevices(void); extern void UndisplayDevices(void); extern _X_EXPORT int RemoveDevice(DeviceIntPtr /*dev */ , BOOL /* sendevent */ ); extern _X_EXPORT int NumMotionEvents(void); extern _X_EXPORT int dixLookupDevice(DeviceIntPtr * /* dev */ , int /* id */ , ClientPtr /* client */ , Mask /* access_mode */ ); extern _X_EXPORT void QueryMinMaxKeyCodes(KeyCode * /*minCode */ , KeyCode * /*maxCode */ ); extern _X_EXPORT Bool InitButtonClassDeviceStruct(DeviceIntPtr /*device */ , int /*numButtons */ , Atom * /* labels */ , CARD8 * /*map */ ); extern _X_INTERNAL ValuatorClassPtr AllocValuatorClass(ValuatorClassPtr src, int numAxes); extern _X_EXPORT Bool InitValuatorClassDeviceStruct(DeviceIntPtr /*device */ , int /*numAxes */ , Atom * /* labels */ , int /*numMotionEvents */ , int /*mode */ ); extern _X_EXPORT Bool InitPointerAccelerationScheme(DeviceIntPtr /*dev */ , int /*scheme */ ); extern _X_EXPORT Bool InitFocusClassDeviceStruct(DeviceIntPtr /*device */ ); extern _X_EXPORT Bool InitTouchClassDeviceStruct(DeviceIntPtr /*device */ , unsigned int /*max_touches */ , unsigned int /*mode */ , unsigned int /*numAxes */ ); extern _X_EXPORT Bool InitGestureClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches); typedef void (*BellProcPtr) (int percent, DeviceIntPtr device, void *ctrl, int feedbackClass); typedef void (*KbdCtrlProcPtr) (DeviceIntPtr /*device */ , KeybdCtrl * /*ctrl */ ); typedef void (*PtrCtrlProcPtr) (DeviceIntPtr /*device */ , PtrCtrl * /*ctrl */ ); extern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(DeviceIntPtr /*device */ , PtrCtrlProcPtr /*controlProc */ ); typedef void (*StringCtrlProcPtr) (DeviceIntPtr /*device */ , StringCtrl * /*ctrl */ ); extern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(DeviceIntPtr /*device */ , StringCtrlProcPtr /*controlProc */ , int /*max_symbols */ , int /*num_symbols_supported */ , KeySym * /*symbols */ ); typedef void (*BellCtrlProcPtr) (DeviceIntPtr /*device */ , BellCtrl * /*ctrl */ ); extern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(DeviceIntPtr /*device */ , BellProcPtr /*bellProc */ , BellCtrlProcPtr /*controlProc */ ); typedef void (*LedCtrlProcPtr) (DeviceIntPtr /*device */ , LedCtrl * /*ctrl */ ); extern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(DeviceIntPtr /*device */ , LedCtrlProcPtr /*controlProc */ ); typedef void (*IntegerCtrlProcPtr) (DeviceIntPtr /*device */ , IntegerCtrl * /*ctrl */ ); extern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(DeviceIntPtr /*device */ , IntegerCtrlProcPtr /*controlProc */ ); extern _X_EXPORT Bool InitPointerDeviceStruct(DevicePtr /*device */ , CARD8 * /*map */ , int /*numButtons */ , Atom * /* btn_labels */ , PtrCtrlProcPtr /*controlProc */ , int /*numMotionEvents */ , int /*numAxes */ , Atom * /* axes_labels */ ); extern _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr /*device */ , XkbRMLVOSet * /*rmlvo */ , BellProcPtr /*bellProc */ , KbdCtrlProcPtr /*controlProc */ ); extern _X_EXPORT Bool InitKeyboardDeviceStructFromString(DeviceIntPtr dev, const char *keymap, int keymap_length, BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func); extern int ApplyPointerMapping(DeviceIntPtr /* pDev */ , CARD8 * /* map */ , int /* len */ , ClientPtr /* client */ ); extern Bool BadDeviceMap(BYTE * /*buff */ , int /*length */ , unsigned /*low */ , unsigned /*high */ , XID * /*errval */ ); extern void NoteLedState(DeviceIntPtr /*keybd */ , int /*led */ , Bool /*on */ ); extern void MaybeStopHint(DeviceIntPtr /*device */ , ClientPtr /*client */ ); extern void ProcessPointerEvent(InternalEvent * /* ev */ , DeviceIntPtr /*mouse */ ); extern void ProcessKeyboardEvent(InternalEvent * /*ev */ , DeviceIntPtr /*keybd */ ); extern _X_EXPORT void ProcessInputEvents(void); extern _X_EXPORT void InitInput(int /*argc */ , char ** /*argv */ ); extern _X_EXPORT void CloseInput(void); extern _X_EXPORT int GetMaximumEventsNum(void); extern _X_EXPORT InternalEvent *InitEventList(int num_events); extern _X_EXPORT void FreeEventList(InternalEvent *list, int num_events); extern void CreateClassesChangedEvent(InternalEvent *event, DeviceIntPtr master, DeviceIntPtr slave, int flags); extern InternalEvent *UpdateFromMaster(InternalEvent *events, DeviceIntPtr pDev, int type, int *num_events); extern _X_EXPORT int GetPointerEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int buttons, int flags, const ValuatorMask *mask); extern _X_EXPORT void QueuePointerEvents(DeviceIntPtr pDev, int type, int buttons, int flags, const ValuatorMask *mask); extern _X_EXPORT int GetKeyboardEvents(InternalEvent *events, DeviceIntPtr pDev, int type, int key_code); extern _X_EXPORT void QueueKeyboardEvents(DeviceIntPtr pDev, int type, int key_code); extern int GetTouchEvents(InternalEvent *events, DeviceIntPtr pDev, uint32_t ddx_touchid, uint16_t type, uint32_t flags, const ValuatorMask *mask); void QueueTouchEvents(DeviceIntPtr device, int type, uint32_t ddx_touchid, int flags, const ValuatorMask *mask); void InitGestureEvent(InternalEvent *ievent, DeviceIntPtr dev, CARD32 ms, int type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle); int GetGestureEvents(InternalEvent *events, DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle); void QueueGesturePinchEvents(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y, double scale, double delta_angle); void QueueGestureSwipeEvents(DeviceIntPtr dev, uint16_t type, uint16_t num_touches, uint32_t flags, double delta_x, double delta_y, double delta_unaccel_x, double delta_unaccel_y); extern int GetTouchOwnershipEvents(InternalEvent *events, DeviceIntPtr pDev, TouchPointInfoPtr ti, uint8_t mode, XID resource, uint32_t flags); extern void GetDixTouchEnd(InternalEvent *ievent, DeviceIntPtr dev, TouchPointInfoPtr ti, uint32_t flags); extern _X_EXPORT int GetProximityEvents(InternalEvent *events, DeviceIntPtr pDev, int type, const ValuatorMask *mask); extern _X_EXPORT void QueueProximityEvents(DeviceIntPtr pDev, int type, const ValuatorMask *mask); #ifdef PANORAMIX _X_EXPORT #endif extern void PostSyntheticMotion(DeviceIntPtr pDev, int x, int y, int screen, unsigned long time); extern _X_EXPORT int GetMotionHistorySize(void); extern _X_EXPORT void AllocateMotionHistory(DeviceIntPtr pDev); extern _X_EXPORT int GetMotionHistory(DeviceIntPtr pDev, xTimecoord ** buff, unsigned long start, unsigned long stop, ScreenPtr pScreen, BOOL core); extern void ReleaseButtonsAndKeys(DeviceIntPtr dev); extern int AttachDevice(ClientPtr client, DeviceIntPtr slave, DeviceIntPtr master); extern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd); extern _X_EXPORT DeviceIntPtr GetMaster(DeviceIntPtr dev, int type); extern _X_EXPORT int AllocDevicePair(ClientPtr client, const char *name, DeviceIntPtr *ptr, DeviceIntPtr *keybd, DeviceProc ptr_proc, DeviceProc keybd_proc, Bool master); extern void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce); /* Helper functions. */ extern _X_EXPORT int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, KeyCode **modkeymap, int *max_keys_per_mod); extern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map, int max_keys_per_mod); extern int AllocXTestDevice(ClientPtr client, const char *name, DeviceIntPtr *ptr, DeviceIntPtr *keybd, DeviceIntPtr master_ptr, DeviceIntPtr master_keybd); extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master); extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master); extern void SendDevicePresenceEvent(int deviceid, int type); extern void DeliverDeviceClassesChangedEvent(int sourceid, Time time); extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes * attrs); extern _X_EXPORT void FreeInputAttributes(InputAttributes * attrs); enum TouchListenerState { TOUCH_LISTENER_AWAITING_BEGIN = 0, /**< Waiting for a TouchBegin event */ TOUCH_LISTENER_AWAITING_OWNER, /**< Waiting for a TouchOwnership event */ TOUCH_LISTENER_EARLY_ACCEPT, /**< Waiting for ownership, has already accepted */ TOUCH_LISTENER_IS_OWNER, /**< Is the current owner, hasn't accepted */ TOUCH_LISTENER_HAS_ACCEPTED, /**< Is the current owner, has accepted */ TOUCH_LISTENER_HAS_END, /**< Has already received the end event */ }; enum TouchListenerType { TOUCH_LISTENER_GRAB, TOUCH_LISTENER_POINTER_GRAB, TOUCH_LISTENER_REGULAR, TOUCH_LISTENER_POINTER_REGULAR, }; enum GestureListenerType { GESTURE_LISTENER_GRAB, GESTURE_LISTENER_NONGESTURE_GRAB, GESTURE_LISTENER_REGULAR }; extern void TouchInitDDXTouchPoint(DeviceIntPtr dev, DDXTouchPointInfoPtr ddxtouch); extern DDXTouchPointInfoPtr TouchBeginDDXTouch(DeviceIntPtr dev, uint32_t ddx_id); extern void TouchEndDDXTouch(DeviceIntPtr dev, DDXTouchPointInfoPtr ti); extern DDXTouchPointInfoPtr TouchFindByDDXID(DeviceIntPtr dev, uint32_t ddx_id, Bool create); extern Bool TouchInitTouchPoint(TouchClassPtr touch, ValuatorClassPtr v, int index); extern void TouchFreeTouchPoint(DeviceIntPtr dev, int index); extern TouchPointInfoPtr TouchBeginTouch(DeviceIntPtr dev, int sourceid, uint32_t touchid, Bool emulate_pointer); extern TouchPointInfoPtr TouchFindByClientID(DeviceIntPtr dev, uint32_t client_id); extern void TouchEndTouch(DeviceIntPtr dev, TouchPointInfoPtr ti); extern Bool TouchEventHistoryAllocate(TouchPointInfoPtr ti); extern void TouchEventHistoryFree(TouchPointInfoPtr ti); extern void TouchEventHistoryPush(TouchPointInfoPtr ti, const DeviceEvent *ev); extern void TouchEventHistoryReplay(TouchPointInfoPtr ti, DeviceIntPtr dev, XID resource); extern Bool TouchResourceIsOwner(TouchPointInfoPtr ti, XID resource); extern void TouchAddListener(TouchPointInfoPtr ti, XID resource, int resource_type, enum InputLevel level, enum TouchListenerType type, enum TouchListenerState state, WindowPtr window, GrabPtr grab); extern Bool TouchRemoveListener(TouchPointInfoPtr ti, XID resource); extern void TouchSetupListeners(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev); extern Bool TouchBuildSprite(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, InternalEvent *ev); extern Bool TouchBuildDependentSpriteTrace(DeviceIntPtr dev, SpritePtr sprite); extern int TouchConvertToPointerEvent(const InternalEvent *ev, InternalEvent *motion, InternalEvent *button); extern int TouchGetPointerEventType(const InternalEvent *ev); extern void TouchRemovePointerGrab(DeviceIntPtr dev); extern void TouchListenerGone(XID resource); extern int TouchListenerAcceptReject(DeviceIntPtr dev, TouchPointInfoPtr ti, int listener, int mode); extern int TouchAcceptReject(ClientPtr client, DeviceIntPtr dev, int mode, uint32_t touchid, Window grab_window, XID *error); extern void TouchEndPhysicallyActiveTouches(DeviceIntPtr dev); extern void TouchEmitTouchEnd(DeviceIntPtr dev, TouchPointInfoPtr ti, int flags, XID resource); extern void TouchAcceptAndEnd(DeviceIntPtr dev, int touchid); extern Bool GestureInitGestureInfo(GestureInfoPtr gesture); extern GestureInfoPtr GestureBeginGesture(DeviceIntPtr dev, InternalEvent *ev); extern GestureInfoPtr GestureFindActiveByEventType(DeviceIntPtr dev, int type); extern void GestureEndGesture(GestureInfoPtr gi); extern Bool GestureResourceIsOwner(GestureInfoPtr gi, XID resource); extern void GestureAddListener(GestureInfoPtr gi, XID resource, int resource_type, enum GestureListenerType type, WindowPtr window, GrabPtr grab); extern void GestureSetupListener(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev); extern Bool GestureBuildSprite(DeviceIntPtr sourcedev, GestureInfoPtr gi); extern void GestureListenerGone(XID resource); extern void GestureEndActiveGestures(DeviceIntPtr dev); extern void GestureEmitGestureEndToOwner(DeviceIntPtr dev, GestureInfoPtr gi); extern void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev); /* misc event helpers */ extern void CopyPartialInternalEvent(InternalEvent* dst_event, const InternalEvent* src_event); extern Mask GetEventMask(DeviceIntPtr dev, xEvent *ev, InputClientsPtr clients); extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); extern Bool WindowXI2MaskIsset(DeviceIntPtr dev, WindowPtr win, xEvent *ev); extern int GetXI2MaskByte(XI2Mask *mask, DeviceIntPtr dev, int event_type); void FixUpEventFromWindow(SpritePtr pSprite, xEvent *xE, WindowPtr pWin, Window child, Bool calcChild); extern Bool PointInBorderSize(WindowPtr pWin, int x, int y); extern WindowPtr XYToWindow(SpritePtr pSprite, int x, int y); extern int EventIsDeliverable(DeviceIntPtr dev, int evtype, WindowPtr win); extern Bool ActivatePassiveGrab(DeviceIntPtr dev, GrabPtr grab, InternalEvent *ev, InternalEvent *real_event); extern void ActivateGrabNoDelivery(DeviceIntPtr dev, GrabPtr grab, InternalEvent *event, InternalEvent *real_event); /** * Masks specifying the type of event to deliver for an InternalEvent; used * by EventIsDeliverable. * @defgroup EventIsDeliverable return flags * @{ */ #define EVENT_XI1_MASK (1 << 0) /**< XI1.x event */ #define EVENT_CORE_MASK (1 << 1) /**< Core event */ #define EVENT_DONT_PROPAGATE_MASK (1 << 2) /**< DontPropagate mask set */ #define EVENT_XI2_MASK (1 << 3) /**< XI2 mask set on window */ /* @} */ enum EventDeliveryState { EVENT_DELIVERED, /**< Event has been delivered to a client */ EVENT_NOT_DELIVERED, /**< Event was not delivered to any client */ EVENT_SKIP, /**< Event can be discarded by the caller */ EVENT_REJECTED, /**< Event was rejected for delivery to the client */ }; /* Implemented by the DDX. */ extern _X_EXPORT int NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, DeviceIntPtr *dev); extern _X_EXPORT void DeleteInputDeviceRequest(DeviceIntPtr dev); extern _X_EXPORT void RemoveInputDeviceTraces(const char *config_info); extern _X_EXPORT void DDXRingBell(int volume, int pitch, int duration); #define VALUATOR_MODE_ALL_AXES -1 extern _X_HIDDEN int valuator_get_mode(DeviceIntPtr dev, int axis); extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode); /* Set to TRUE by default - os/utils.c sets it to FALSE on user request, xfixes/cursor.c uses it to determine if the cursor is enabled */ extern Bool EnableCursor; /* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on * CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled */ extern Bool CursorVisible; extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators); extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask); extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask, int first_valuator, int num_valuators, const int *valuators); extern _X_EXPORT void valuator_mask_set(ValuatorMask *mask, int valuator, int data); extern _X_EXPORT void valuator_mask_set_double(ValuatorMask *mask, int valuator, double data); extern _X_EXPORT void valuator_mask_zero(ValuatorMask *mask); extern _X_EXPORT int valuator_mask_size(const ValuatorMask *mask); extern _X_EXPORT int valuator_mask_isset(const ValuatorMask *mask, int bit); extern _X_EXPORT void valuator_mask_unset(ValuatorMask *mask, int bit); extern _X_EXPORT int valuator_mask_num_valuators(const ValuatorMask *mask); extern _X_EXPORT void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src); extern _X_EXPORT int valuator_mask_get(const ValuatorMask *mask, int valnum); extern _X_EXPORT double valuator_mask_get_double(const ValuatorMask *mask, int valnum); extern _X_EXPORT Bool valuator_mask_fetch(const ValuatorMask *mask, int valnum, int *val); extern _X_EXPORT Bool valuator_mask_fetch_double(const ValuatorMask *mask, int valnum, double *val); extern _X_EXPORT Bool valuator_mask_has_unaccelerated(const ValuatorMask *mask); extern _X_EXPORT void valuator_mask_set_unaccelerated(ValuatorMask *mask, int valuator, double accel, double unaccel); extern _X_EXPORT void valuator_mask_set_absolute_unaccelerated(ValuatorMask *mask, int valuator, int absolute, double unaccel); extern _X_EXPORT double valuator_mask_get_accelerated(const ValuatorMask *mask, int valuator); extern _X_EXPORT double valuator_mask_get_unaccelerated(const ValuatorMask *mask, int valuator); extern _X_EXPORT Bool valuator_mask_fetch_unaccelerated(const ValuatorMask *mask, int valuator, double *accel, double *unaccel); extern _X_HIDDEN void valuator_mask_drop_unaccelerated(ValuatorMask *mask); /* InputOption handling interface */ extern _X_EXPORT InputOption *input_option_new(InputOption *list, const char *key, const char *value); extern _X_EXPORT void input_option_free_list(InputOption **opt); extern _X_EXPORT InputOption *input_option_free_element(InputOption *opt, const char *key); extern _X_EXPORT InputOption *input_option_find(InputOption *list, const char *key); extern _X_EXPORT const char *input_option_get_key(const InputOption *opt); extern _X_EXPORT const char *input_option_get_value(const InputOption *opt); extern _X_EXPORT void input_option_set_key(InputOption *opt, const char *key); extern _X_EXPORT void input_option_set_value(InputOption *opt, const char *value); extern _X_HIDDEN Bool point_on_screen(ScreenPtr pScreen, int x, int y); extern _X_HIDDEN void update_desktop_dimensions(void); extern _X_HIDDEN void input_constrain_cursor(DeviceIntPtr pDev, ScreenPtr screen, int current_x, int current_y, int dest_x, int dest_y, int *out_x, int *out_y, int *nevents, InternalEvent* events); extern _X_EXPORT void input_lock(void); extern _X_EXPORT void input_unlock(void); extern _X_EXPORT void input_force_unlock(void); extern _X_EXPORT int in_input_thread(void); extern void InputThreadPreInit(void); extern void InputThreadInit(void); extern void InputThreadFini(void); extern int InputThreadRegisterDev(int fd, NotifyFdProcPtr readInputProc, void *readInputArgs); extern int InputThreadUnregisterDev(int fd); extern _X_EXPORT Bool InputThreadEnable; #endif /* INPUT_H */ xorg-server-21.1.16/include/inputstr.h0000644000175000017500000006303514757411105013326 /************************************************************ 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. ********************************************************/ #ifndef INPUTSTRUCT_H #define INPUTSTRUCT_H #include #include #include "input.h" #include "window.h" #include "dixstruct.h" #include "cursorstr.h" #include "geext.h" #include "privates.h" extern _X_EXPORT void AssignTypeAndName(DeviceIntPtr dev, Atom type, const char *name); #define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))) #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) #define ClearBit(ptr, bit) (((BYTE *)(ptr))[(bit)>>3] &= ~(1 << ((bit) & 7))) extern _X_EXPORT int CountBits(const uint8_t * mask, int len); #define SameClient(obj,client) \ (CLIENT_BITS((obj)->resource) == (client)->clientAsMask) #define EMASKSIZE (MAXDEVICES + 2) /* This is the last XI2 event supported by the server. If you add * events to the protocol, the server will not support these events until * this number here is bumped. */ #define XI2LASTEVENT XI_GestureSwipeEnd #define XI2MASKSIZE ((XI2LASTEVENT >> 3) + 1) /* no of bytes for masks */ /** * Scroll types for ::SetScrollValuator and the scroll type in the * ::ScrollInfoPtr. */ enum ScrollType { SCROLL_TYPE_NONE = 0, /**< Not a scrolling valuator */ SCROLL_TYPE_VERTICAL = 8, SCROLL_TYPE_HORIZONTAL = 9, }; /** * This struct stores the core event mask for each client except the client * that created the window. * * Each window that has events selected from other clients has at least one of * these masks. If multiple clients selected for events on the same window, * these masks are in a linked list. * * The event mask for the client that created the window is stored in * win->eventMask instead. * * The resource id is simply a fake client ID to associate this mask with a * client. * * Kludge: OtherClients and InputClients must be compatible, see code. */ typedef struct _OtherClients { OtherClientsPtr next; /**< Pointer to the next mask */ XID resource; /**< id for putting into resource manager */ Mask mask; /**< Core event mask */ } OtherClients; /** * This struct stores the XI event mask for each client. * * Each window that has events selected has at least one of these masks. If * multiple client selected for events on the same window, these masks are in * a linked list. */ typedef struct _InputClients { InputClientsPtr next; /**< Pointer to the next mask */ XID resource; /**< id for putting into resource manager */ Mask mask[EMASKSIZE]; /**< Actual XI event mask, deviceid is index */ /** XI2 event masks. One per device, each bit is a mask of (1 << type) */ struct _XI2Mask *xi2mask; } InputClients; /** * Combined XI event masks from all devices. * * This is the XI equivalent of the deliverableEvents, eventMask and * dontPropagate mask of the WindowRec (or WindowOptRec). * * A window that has an XI client selecting for events has exactly one * OtherInputMasks struct and exactly one InputClients struct hanging off * inputClients. Each further client appends to the inputClients list. * Each Mask field is per-device, with the device id as the index. * Exception: for non-device events (Presence events), the MAXDEVICES * deviceid is used. */ typedef struct _OtherInputMasks { /** * Bitwise OR of all masks by all clients and the window's parent's masks. */ Mask deliverableEvents[EMASKSIZE]; /** * Bitwise OR of all masks by all clients on this window. */ Mask inputEvents[EMASKSIZE]; /** The do-not-propagate masks for each device. */ Mask dontPropagateMask[EMASKSIZE]; /** The clients that selected for events */ InputClientsPtr inputClients; /* XI2 event masks. One per device, each bit is a mask of (1 << type) */ struct _XI2Mask *xi2mask; } OtherInputMasks; /* * The following structure gets used for both active and passive grabs. For * active grabs some of the fields (e.g. modifiers) are not used. However, * that is not much waste since there aren't many active grabs (one per * keyboard/pointer device) going at once in the server. */ #define MasksPerDetailMask 8 /* 256 keycodes and 256 possible modifier combinations, but only 3 buttons. */ typedef struct _DetailRec { /* Grab details may be bit masks */ unsigned int exact; Mask *pMask; } DetailRec; union _GrabMask { Mask core; Mask xi; struct _XI2Mask *xi2mask; }; /** * Central struct for device grabs. * The same struct is used for both core grabs and device grabs, with * different fields being set. * If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask * is a combination of standard event masks (i.e. PointerMotionMask | * ButtonPressMask). * If the grab is a device grab (GrabDevice), then the eventMask is a * combination of event masks for a given XI event type (see SetEventInfo). * * If the grab is a result of a ButtonPress, then eventMask is the core mask * and deviceMask is set to the XI event mask for the grab. */ typedef struct _GrabRec { GrabPtr next; /* for chain of passive grabs */ XID resource; DeviceIntPtr device; WindowPtr window; unsigned ownerEvents:1; unsigned keyboardMode:1; unsigned pointerMode:1; enum InputLevel grabtype; CARD8 type; /* event type for passive grabs, 0 for active grabs */ DetailRec modifiersDetail; DeviceIntPtr modifierDevice; DetailRec detail; /* key or button */ WindowPtr confineTo; /* always NULL for keyboards */ CursorPtr cursor; /* always NULL for keyboards */ Mask eventMask; Mask deviceMask; /* XI2 event masks. One per device, each bit is a mask of (1 << type) */ struct _XI2Mask *xi2mask; } GrabRec; /** * Sprite information for a device. */ typedef struct _SpriteRec { CursorPtr current; BoxRec hotLimits; /* logical constraints of hot spot */ Bool confined; /* confined to screen */ RegionPtr hotShape; /* additional logical shape constraint */ BoxRec physLimits; /* physical constraints of hot spot */ WindowPtr win; /* window of logical position */ HotSpot hot; /* logical pointer position */ HotSpot hotPhys; /* physical pointer position */ #ifdef PANORAMIX ScreenPtr screen; /* all others are in Screen 0 coordinates */ RegionRec Reg1; /* Region 1 for confining motion */ RegionRec Reg2; /* Region 2 for confining virtual motion */ WindowPtr windows[MAXSCREENS]; WindowPtr confineWin; /* confine window */ #endif /* The window trace information is used at dix/events.c to avoid having * to compute all the windows between the root and the current pointer * window each time a button or key goes down. The grabs on each of those * windows must be checked. * spriteTraces should only be used at dix/events.c! */ WindowPtr *spriteTrace; int spriteTraceSize; int spriteTraceGood; /* Due to delays between event generation and event processing, it is * possible that the pointer has crossed screen boundaries between the * time in which it begins generating events and the time when * those events are processed. * * pEnqueueScreen: screen the pointer was on when the event was generated * pDequeueScreen: screen the pointer was on when the event is processed */ ScreenPtr pEnqueueScreen; ScreenPtr pDequeueScreen; } SpriteRec; typedef struct _KeyClassRec { int sourceid; CARD8 down[DOWN_LENGTH]; CARD8 postdown[DOWN_LENGTH]; int modifierKeyCount[8]; struct _XkbSrvInfo *xkbInfo; } KeyClassRec, *KeyClassPtr; typedef struct _ScrollInfo { enum ScrollType type; double increment; int flags; } ScrollInfo, *ScrollInfoPtr; typedef struct _AxisInfo { int resolution; int min_resolution; int max_resolution; int min_value; int max_value; Atom label; CARD8 mode; ScrollInfo scroll; } AxisInfo, *AxisInfoPtr; typedef struct _ValuatorAccelerationRec { int number; PointerAccelSchemeProc AccelSchemeProc; void *accelData; /* at disposal of AccelScheme */ PointerAccelSchemeInitProc AccelInitProc; DeviceCallbackProc AccelCleanupProc; } ValuatorAccelerationRec, *ValuatorAccelerationPtr; typedef struct _ValuatorClassRec { int sourceid; int numMotionEvents; int first_motion; int last_motion; void *motion; /* motion history buffer. Different layout for MDs and SDs! */ WindowPtr motionHintWindow; AxisInfoPtr axes; unsigned short numAxes; double *axisVal; /* always absolute, but device-coord system */ ValuatorAccelerationRec accelScheme; int h_scroll_axis; /* horiz smooth-scrolling axis */ int v_scroll_axis; /* vert smooth-scrolling axis */ } ValuatorClassRec; typedef struct _TouchListener { XID listener; /* grabs/event selection IDs receiving * events for this touch */ int resource_type; /* listener's resource type */ enum TouchListenerType type; enum TouchListenerState state; enum InputLevel level; /* matters only for emulating touches */ WindowPtr window; GrabPtr grab; } TouchListener; typedef struct _TouchPointInfo { uint32_t client_id; /* touch ID as seen in client events */ int sourceid; /* Source device's ID for this touchpoint */ Bool active; /* whether or not the touch is active */ Bool pending_finish; /* true if the touch is physically inactive * but still owned by a grab */ SpriteRec sprite; /* window trace for delivery */ ValuatorMask *valuators; /* last recorded axis values */ TouchListener *listeners; /* set of listeners */ int num_listeners; int num_grabs; /* number of open grabs on this touch * which have not accepted or rejected */ Bool emulate_pointer; DeviceEvent *history; /* History of events on this touchpoint */ size_t history_elements; /* Number of current elements in history */ size_t history_size; /* Size of history in elements */ } TouchPointInfoRec; typedef struct _DDXTouchPointInfo { uint32_t client_id; /* touch ID as seen in client events */ Bool active; /* whether or not the touch is active */ uint32_t ddx_id; /* touch ID given by the DDX */ Bool emulate_pointer; ValuatorMask *valuators; /* last axis values as posted, pre-transform */ } DDXTouchPointInfoRec; typedef struct _TouchClassRec { int sourceid; TouchPointInfoPtr touches; unsigned short num_touches; /* number of allocated touches */ unsigned short max_touches; /* maximum number of touches, may be 0 */ CARD8 mode; /* ::XIDirectTouch, XIDependentTouch */ /* for pointer-emulation */ CARD8 buttonsDown; /* number of buttons down */ unsigned short state; /* logical button state */ Mask motionMask; } TouchClassRec; typedef struct _GestureListener { XID listener; /* grabs/event selection IDs receiving * events for this gesture */ int resource_type; /* listener's resource type */ enum GestureListenerType type; WindowPtr window; GrabPtr grab; } GestureListener; typedef struct _GestureInfo { int sourceid; /* Source device's ID for this gesture */ Bool active; /* whether or not the gesture is active */ uint8_t type; /* Gesture type: either ET_GesturePinchBegin or ET_GestureSwipeBegin. Valid if active == TRUE */ int num_touches; /* The number of touches in the gesture */ SpriteRec sprite; /* window trace for delivery */ GestureListener listener; /* the listener that will receive events */ Bool has_listener; /* true if listener has been setup already */ } GestureInfoRec; typedef struct _GestureClassRec { int sourceid; GestureInfoRec gesture; unsigned short max_touches; /* maximum number of touches, may be 0 */ } GestureClassRec; typedef struct _ButtonClassRec { int sourceid; CARD8 numButtons; CARD8 buttonsDown; /* number of buttons currently down This counts logical buttons, not physical ones, i.e if some buttons are mapped to 0, they're not counted here */ unsigned short state; Mask motionMask; CARD8 down[DOWN_LENGTH]; CARD8 postdown[DOWN_LENGTH]; CARD8 map[MAP_LENGTH]; union _XkbAction *xkb_acts; Atom labels[MAX_BUTTONS]; } ButtonClassRec, *ButtonClassPtr; typedef struct _FocusClassRec { int sourceid; WindowPtr win; /* May be set to a int constant (e.g. PointerRootWin)! */ int revert; TimeStamp time; WindowPtr *trace; int traceSize; int traceGood; } FocusClassRec, *FocusClassPtr; typedef struct _ProximityClassRec { int sourceid; char in_proximity; } ProximityClassRec, *ProximityClassPtr; typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr; typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr; typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr; typedef struct _StringFeedbackClassRec *StringFeedbackPtr; typedef struct _BellFeedbackClassRec *BellFeedbackPtr; typedef struct _LedFeedbackClassRec *LedFeedbackPtr; typedef struct _KbdFeedbackClassRec { BellProcPtr BellProc; KbdCtrlProcPtr CtrlProc; KeybdCtrl ctrl; KbdFeedbackPtr next; struct _XkbSrvLedInfo *xkb_sli; } KbdFeedbackClassRec; typedef struct _PtrFeedbackClassRec { PtrCtrlProcPtr CtrlProc; PtrCtrl ctrl; PtrFeedbackPtr next; } PtrFeedbackClassRec; typedef struct _IntegerFeedbackClassRec { IntegerCtrlProcPtr CtrlProc; IntegerCtrl ctrl; IntegerFeedbackPtr next; } IntegerFeedbackClassRec; typedef struct _StringFeedbackClassRec { StringCtrlProcPtr CtrlProc; StringCtrl ctrl; StringFeedbackPtr next; } StringFeedbackClassRec; typedef struct _BellFeedbackClassRec { BellProcPtr BellProc; BellCtrlProcPtr CtrlProc; BellCtrl ctrl; BellFeedbackPtr next; } BellFeedbackClassRec; typedef struct _LedFeedbackClassRec { LedCtrlProcPtr CtrlProc; LedCtrl ctrl; LedFeedbackPtr next; struct _XkbSrvLedInfo *xkb_sli; } LedFeedbackClassRec; typedef struct _ClassesRec { KeyClassPtr key; ValuatorClassPtr valuator; TouchClassPtr touch; GestureClassPtr gesture; ButtonClassPtr button; FocusClassPtr focus; ProximityClassPtr proximity; KbdFeedbackPtr kbdfeed; PtrFeedbackPtr ptrfeed; IntegerFeedbackPtr intfeed; StringFeedbackPtr stringfeed; BellFeedbackPtr bell; LedFeedbackPtr leds; } ClassesRec; /* Device properties */ typedef struct _XIPropertyValue { Atom type; /* ignored by server */ short format; /* format of data for swapping - 8,16,32 */ long size; /* size of data in (format/8) bytes */ void *data; /* private to client */ } XIPropertyValueRec; typedef struct _XIProperty { struct _XIProperty *next; Atom propertyName; BOOL deletable; /* clients can delete this prop? */ XIPropertyValueRec value; } XIPropertyRec; typedef XIPropertyRec *XIPropertyPtr; typedef XIPropertyValueRec *XIPropertyValuePtr; typedef struct _XIPropertyHandler { struct _XIPropertyHandler *next; long id; int (*SetProperty) (DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly); int (*GetProperty) (DeviceIntPtr dev, Atom property); int (*DeleteProperty) (DeviceIntPtr dev, Atom property); } XIPropertyHandler, *XIPropertyHandlerPtr; /* states for devices */ #define NOT_GRABBED 0 #define THAWED 1 #define THAWED_BOTH 2 /* not a real state */ #define FREEZE_NEXT_EVENT 3 #define FREEZE_BOTH_NEXT_EVENT 4 #define FROZEN 5 /* any state >= has device frozen */ #define FROZEN_NO_EVENT 5 #define FROZEN_WITH_EVENT 6 #define THAW_OTHERS 7 typedef struct _GrabInfoRec { TimeStamp grabTime; Bool fromPassiveGrab; /* true if from passive grab */ Bool implicitGrab; /* implicit from ButtonPress */ GrabPtr unused; /* Kept for ABI stability, remove soon */ GrabPtr grab; CARD8 activatingKey; void (*ActivateGrab) (DeviceIntPtr /*device */ , GrabPtr /*grab */ , TimeStamp /*time */ , Bool /*autoGrab */ ); void (*DeactivateGrab) (DeviceIntPtr /*device */ ); struct { Bool frozen; int state; GrabPtr other; /* if other grab has this frozen */ InternalEvent *event; /* saved to be replayed */ } sync; } GrabInfoRec, *GrabInfoPtr; typedef struct _SpriteInfoRec { /* sprite must always point to a valid sprite. For devices sharing the * sprite, let sprite point to a paired spriteOwner's sprite. */ SpritePtr sprite; /* sprite information */ Bool spriteOwner; /* True if device owns the sprite */ DeviceIntPtr paired; /* The paired device. Keyboard if spriteOwner is TRUE, otherwise the pointer that owns the sprite. */ /* keep states for animated cursor */ struct { CursorPtr pCursor; ScreenPtr pScreen; int elt; } anim; } SpriteInfoRec, *SpriteInfoPtr; /* device types */ #define MASTER_POINTER 1 #define MASTER_KEYBOARD 2 #define SLAVE 3 /* special types for GetMaster */ #define MASTER_ATTACHED 4 /* Master for this device */ #define KEYBOARD_OR_FLOAT 5 /* Keyboard master for this device or this device if floating */ #define POINTER_OR_FLOAT 6 /* Pointer master for this device or this device if floating */ typedef struct _DeviceIntRec { DeviceRec public; DeviceIntPtr next; Bool startup; /* true if needs to be turned on at server initialization time */ DeviceProc deviceProc; /* proc(DevicePtr, DEVICE_xx). It is used to initialize, turn on, or turn off the device */ Bool inited; /* TRUE if INIT returns Success */ Bool enabled; /* TRUE if ON returns Success */ Bool coreEvents; /* TRUE if device also sends core */ GrabInfoRec deviceGrab; /* grab on the device */ int type; /* MASTER_POINTER, MASTER_KEYBOARD, SLAVE */ Atom xinput_type; char *name; int id; KeyClassPtr key; ValuatorClassPtr valuator; TouchClassPtr touch; GestureClassPtr gesture; ButtonClassPtr button; FocusClassPtr focus; ProximityClassPtr proximity; KbdFeedbackPtr kbdfeed; PtrFeedbackPtr ptrfeed; IntegerFeedbackPtr intfeed; StringFeedbackPtr stringfeed; BellFeedbackPtr bell; LedFeedbackPtr leds; struct _XkbInterest *xkb_interest; char *config_info; /* used by the hotplug layer */ ClassesPtr unused_classes; /* for master devices */ int saved_master_id; /* for slaves while grabbed */ PrivateRec *devPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; DeviceIntPtr master; /* master device */ DeviceIntPtr lastSlave; /* last slave device used */ /* last valuator values recorded, not posted to client; * for slave devices, valuators is in device coordinates, mapped to the * desktop * for master devices, valuators is in desktop coordinates. * see dix/getevents.c * remainder supports acceleration */ struct { double valuators[MAX_VALUATORS]; int numValuators; DeviceIntPtr slave; ValuatorMask *scroll; int num_touches; /* size of the touches array */ DDXTouchPointInfoPtr touches; } last; /* Input device property handling. */ struct { XIPropertyPtr properties; XIPropertyHandlerPtr handlers; /* NULL-terminated */ } properties; /* coordinate transformation matrix for relative movement. Matrix with * the translation component dropped */ struct pixman_f_transform relative_transform; /* scale matrix for absolute devices, this is the combined matrix of [1/scale] . [transform] . [scale]. See DeviceSetTransform */ struct pixman_f_transform scale_and_transform; /* XTest related master device id */ int xtest_master_id; struct _SyncCounter *idle_counter; } DeviceIntRec; typedef struct { int numDevices; /* total number of devices */ DeviceIntPtr devices; /* all devices turned on */ DeviceIntPtr off_devices; /* all devices turned off */ DeviceIntPtr keyboard; /* the main one for the server */ DeviceIntPtr pointer; DeviceIntPtr all_devices; DeviceIntPtr all_master_devices; } InputInfo; extern _X_EXPORT InputInfo inputInfo; /* for keeping the events for devices grabbed synchronously */ typedef struct _QdEvent *QdEventPtr; typedef struct _QdEvent { struct xorg_list next; DeviceIntPtr device; ScreenPtr pScreen; /* what screen the pointer was on */ unsigned long months; /* milliseconds is in the event */ InternalEvent *event; } QdEventRec; /** * syncEvents is the global structure for queued events. * * Devices can be frozen through GrabModeSync pointer grabs. If this is the * case, events from these devices are added to "pending" instead of being * processed normally. When the device is unfrozen, events in "pending" are * replayed and processed as if they would come from the device directly. */ typedef struct _EventSyncInfo { struct xorg_list pending; /** The device to replay events for. Only set in AllowEvents(), in which * case it is set to the device specified in the request. */ DeviceIntPtr replayDev; /* kludgy rock to put flag for */ /** * The window the events are supposed to be replayed on. * This window may be set to the grab's window (but only when * Replay{Pointer|Keyboard} is given in the XAllowEvents() * request. */ WindowPtr replayWin; /* ComputeFreezes */ /** * Flag to indicate whether we're in the process of * replaying events. Only set in ComputeFreezes(). */ Bool playingEvents; TimeStamp time; } EventSyncInfoRec, *EventSyncInfoPtr; extern EventSyncInfoRec syncEvents; /** * Given a sprite, returns the window at the bottom of the trace (i.e. the * furthest window from the root). */ static inline WindowPtr DeepestSpriteWin(SpritePtr sprite) { assert(sprite->spriteTraceGood > 0); return sprite->spriteTrace[sprite->spriteTraceGood - 1]; } struct _XI2Mask { unsigned char **masks; /* event mask in masks[deviceid][event type byte] */ size_t nmasks; /* number of masks */ size_t mask_size; /* size of each mask in bytes */ }; #endif /* INPUTSTRUCT_H */ xorg-server-21.1.16/include/list.h0000644000175000017500000003550214757411105012407 /* * Copyright © 2010 Intel Corporation * Copyright © 2010 Francisco Jerez * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef _XORG_LIST_H_ #define _XORG_LIST_H_ #include /* offsetof() */ /** * @file Classic doubly-link circular list implementation. * For real usage examples of the linked list, see the file test/list.c * * Example: * We need to keep a list of struct foo in the parent struct bar, i.e. what * we want is something like this. * * struct bar { * ... * struct foo *list_of_foos; -----> struct foo {}, struct foo {}, struct foo{} * ... * } * * We need one list head in bar and a list element in all list_of_foos (both are of * data type 'struct xorg_list'). * * struct bar { * ... * struct xorg_list list_of_foos; * ... * } * * struct foo { * ... * struct xorg_list entry; * ... * } * * Now we initialize the list head: * * struct bar bar; * ... * xorg_list_init(&bar.list_of_foos); * * Then we create the first element and add it to this list: * * struct foo *foo = malloc(...); * .... * xorg_list_add(&foo->entry, &bar.list_of_foos); * * Repeat the above for each element you want to add to the list. Deleting * works with the element itself. * xorg_list_del(&foo->entry); * free(foo); * * Note: calling xorg_list_del(&bar.list_of_foos) will set bar.list_of_foos to an empty * list again. * * Looping through the list requires a 'struct foo' as iterator and the * name of the field the subnodes use. * * struct foo *iterator; * xorg_list_for_each_entry(iterator, &bar.list_of_foos, entry) { * if (iterator->something == ...) * ... * } * * Note: You must not call xorg_list_del() on the iterator if you continue the * loop. You need to run the safe for-each loop instead: * * struct foo *iterator, *next; * xorg_list_for_each_entry_safe(iterator, next, &bar.list_of_foos, entry) { * if (...) * xorg_list_del(&iterator->entry); * } * */ /** * The linkage struct for list nodes. This struct must be part of your * to-be-linked struct. struct xorg_list is required for both the head of the * list and for each list node. * * Position and name of the struct xorg_list field is irrelevant. * There are no requirements that elements of a list are of the same type. * There are no requirements for a list head, any struct xorg_list can be a list * head. */ struct xorg_list { struct xorg_list *next, *prev; }; /** * Initialize the list as an empty list. * * Example: * xorg_list_init(&bar->list_of_foos); * * @param list The list to initialize */ static inline void xorg_list_init(struct xorg_list *list) { list->next = list->prev = list; } static inline void __xorg_list_add(struct xorg_list *entry, struct xorg_list *prev, struct xorg_list *next) { next->prev = entry; entry->next = next; entry->prev = prev; prev->next = entry; } /** * Insert a new element after the given list head. The new element does not * need to be initialised as empty list. * The list changes from: * head → some element → ... * to * head → new element → older element → ... * * Example: * struct foo *newfoo = malloc(...); * xorg_list_add(&newfoo->entry, &bar->list_of_foos); * * @param entry The new element to prepend to the list. * @param head The existing list. */ static inline void xorg_list_add(struct xorg_list *entry, struct xorg_list *head) { __xorg_list_add(entry, head, head->next); } /** * Append a new element to the end of the list given with this list head. * * The list changes from: * head → some element → ... → lastelement * to * head → some element → ... → lastelement → new element * * Example: * struct foo *newfoo = malloc(...); * xorg_list_append(&newfoo->entry, &bar->list_of_foos); * * @param entry The new element to prepend to the list. * @param head The existing list. */ static inline void xorg_list_append(struct xorg_list *entry, struct xorg_list *head) { __xorg_list_add(entry, head->prev, head); } static inline void __xorg_list_del(struct xorg_list *prev, struct xorg_list *next) { next->prev = prev; prev->next = next; } /** * Remove the element from the list it is in. Using this function will reset * the pointers to/from this element so it is removed from the list. It does * NOT free the element itself or manipulate it otherwise. * * Using xorg_list_del on a pure list head (like in the example at the top of * this file) will NOT remove the first element from * the list but rather reset the list as empty list. * * Example: * xorg_list_del(&foo->entry); * * @param entry The element to remove. */ static inline void xorg_list_del(struct xorg_list *entry) { __xorg_list_del(entry->prev, entry->next); xorg_list_init(entry); } /** * Check if the list is empty. * * Example: * xorg_list_is_empty(&bar->list_of_foos); * * @return True if the list is empty or False if the list contains one or more * elements. */ static inline int xorg_list_is_empty(struct xorg_list *head) { return head->next == head; } /** * Returns a pointer to the container of this list element. * * Example: * struct foo* f; * f = container_of(&foo->entry, struct foo, entry); * assert(f == foo); * * @param ptr Pointer to the struct xorg_list. * @param type Data type of the list element. * @param member Member name of the struct xorg_list field in the list element. * @return A pointer to the data struct containing the list head. */ #ifndef container_of #define container_of(ptr, type, member) \ (type *)((char *)(ptr) - offsetof(type, member)) #endif /** * Alias of container_of */ #define xorg_list_entry(ptr, type, member) \ container_of(ptr, type, member) /** * Retrieve the first list entry for the given list pointer. * * Example: * struct foo *first; * first = xorg_list_first_entry(&bar->list_of_foos, struct foo, list_of_foos); * * @param ptr The list head * @param type Data type of the list element to retrieve * @param member Member name of the struct xorg_list field in the list element. * @return A pointer to the first list element. */ #define xorg_list_first_entry(ptr, type, member) \ xorg_list_entry((ptr)->next, type, member) /** * Retrieve the last list entry for the given listpointer. * * Example: * struct foo *first; * first = xorg_list_last_entry(&bar->list_of_foos, struct foo, list_of_foos); * * @param ptr The list head * @param type Data type of the list element to retrieve * @param member Member name of the struct xorg_list field in the list element. * @return A pointer to the last list element. */ #define xorg_list_last_entry(ptr, type, member) \ xorg_list_entry((ptr)->prev, type, member) #ifdef HAVE_TYPEOF #define __container_of(ptr, sample, member) \ container_of(ptr, typeof(*sample), member) #else /* This implementation of __container_of has undefined behavior according * to the C standard, but it works in many cases. If your compiler doesn't * support typeof() and fails with this implementation, please try a newer * compiler. */ #define __container_of(ptr, sample, member) \ (void *)((char *)(ptr) \ - ((char *)&(sample)->member - (char *)(sample))) #endif /** * Loop through the list given by head and set pos to struct in the list. * * Example: * struct foo *iterator; * xorg_list_for_each_entry(iterator, &bar->list_of_foos, entry) { * [modify iterator] * } * * This macro is not safe for node deletion. Use xorg_list_for_each_entry_safe * instead. * * @param pos Iterator variable of the type of the list elements. * @param head List head * @param member Member name of the struct xorg_list in the list elements. * */ #define xorg_list_for_each_entry(pos, head, member) \ for (pos = NULL, \ pos = __container_of((head)->next, pos, member); \ &pos->member != (head); \ pos = __container_of(pos->member.next, pos, member)) /** * Loop through the list, keeping a backup pointer to the element. This * macro allows for the deletion of a list element while looping through the * list. * * See xorg_list_for_each_entry for more details. */ #define xorg_list_for_each_entry_safe(pos, tmp, head, member) \ for (pos = NULL, \ pos = __container_of((head)->next, pos, member), \ tmp = __container_of(pos->member.next, pos, member); \ &pos->member != (head); \ pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) /* NULL-Terminated List Interface * * The interface below does _not_ use the struct xorg_list as described above. * It is mainly for legacy structures that cannot easily be switched to * struct xorg_list. * * This interface is for structs like * struct foo { * [...] * struct foo *next; * [...] * }; * * The position and field name of "next" are arbitrary. */ /** * Init the element as null-terminated list. * * Example: * struct foo *list = malloc(); * nt_list_init(list, next); * * @param list The list element that will be the start of the list * @param member Member name of the field pointing to next struct */ #define nt_list_init(_list, _member) \ (_list)->_member = NULL /** * Returns the next element in the list or NULL on termination. * * Example: * struct foo *element = list; * while ((element = nt_list_next(element, next)) { } * * This macro is not safe for node deletion. Use nt_list_for_each_entry_safe * instead. * * @param list The list or current element. * @param member Member name of the field pointing to next struct. */ #define nt_list_next(_list, _member) \ (_list)->_member /** * Iterate through each element in the list. * * Example: * struct foo *iterator; * nt_list_for_each_entry(iterator, list, next) { * [modify iterator] * } * * @param entry Assigned to the current list element * @param list The list to iterate through. * @param member Member name of the field pointing to next struct. */ #define nt_list_for_each_entry(_entry, _list, _member) \ for (_entry = _list; _entry; _entry = (_entry)->_member) /** * Iterate through each element in the list, keeping a backup pointer to the * element. This macro allows for the deletion of a list element while * looping through the list. * * See nt_list_for_each_entry for more details. * * @param entry Assigned to the current list element * @param tmp The pointer to the next element * @param list The list to iterate through. * @param member Member name of the field pointing to next struct. */ #define nt_list_for_each_entry_safe(_entry, _tmp, _list, _member) \ for (_entry = _list, _tmp = (_entry) ? (_entry)->_member : NULL;\ _entry; \ _entry = _tmp, _tmp = (_tmp) ? (_tmp)->_member: NULL) /** * Append the element to the end of the list. This macro may be used to * merge two lists. * * Example: * struct foo *elem = malloc(...); * nt_list_init(elem, next) * nt_list_append(elem, list, struct foo, next); * * Resulting list order: * list_item_0 -> list_item_1 -> ... -> elem_item_0 -> elem_item_1 ... * * @param entry An entry (or list) to append to the list * @param list The list to append to. This list must be a valid list, not * NULL. * @param type The list type * @param member Member name of the field pointing to next struct */ #define nt_list_append(_entry, _list, _type, _member) \ do { \ _type *__iterator = _list; \ while (__iterator->_member) { __iterator = __iterator->_member;}\ __iterator->_member = _entry; \ } while (0) /** * Insert the element at the next position in the list. This macro may be * used to insert a list into a list. * * struct foo *elem = malloc(...); * nt_list_init(elem, next) * nt_list_insert(elem, list, struct foo, next); * * Resulting list order: * list_item_0 -> elem_item_0 -> elem_item_1 ... -> list_item_1 -> ... * * @param entry An entry (or list) to append to the list * @param list The list to insert to. This list must be a valid list, not * NULL. * @param type The list type * @param member Member name of the field pointing to next struct */ #define nt_list_insert(_entry, _list, _type, _member) \ do { \ nt_list_append((_list)->_member, _entry, _type, _member); \ (_list)->_member = _entry; \ } while (0) /** * Delete the entry from the list by iterating through the list and * removing any reference from the list to the entry. * * Example: * struct foo *elem = * nt_list_del(elem, list, struct foo, next); * * @param entry The entry to delete from the list. entry is always * re-initialized as a null-terminated list. * @param list The list containing the entry, set to the new list without * the removed entry. * @param type The list type * @param member Member name of the field pointing to the next entry */ #define nt_list_del(_entry, _list, _type, _member) \ do { \ _type *__e = _entry; \ if (__e == NULL || _list == NULL) break; \ if ((_list) == __e) { \ _list = __e->_member; \ } else { \ _type *__prev = _list; \ while (__prev->_member && __prev->_member != __e) \ __prev = nt_list_next(__prev, _member); \ if (__prev->_member) \ __prev->_member = __e->_member; \ } \ nt_list_init(__e, _member); \ } while(0) /** * DO NOT USE THIS. * This is a remainder of the xfree86 DDX attempt of having a set of generic * list functions. Unfortunately, the xf86OptionRec uses it and we can't * easily get rid of it. Do not use for new code. */ typedef struct generic_list_rec { void *next; } GenericListRec, *GenericListPtr, *glp; #endif xorg-server-21.1.16/include/misc.h0000644000175000017500000003251414757411105012367 /*********************************************************** 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. Copyright 1992, 1993 Data General Corporation; Copyright 1992, 1993 OMRON Corporation 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 neither the name OMRON or DATA GENERAL be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission of the party whose name is to be used. Neither OMRON or DATA GENERAL make any representation about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OMRON OR DATA GENERAL 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. ******************************************************************/ #ifndef MISC_H #define MISC_H 1 /* * X internal definitions * */ #include #include #include #include #include #include #include #include #ifndef MAXSCREENS #define MAXSCREENS 16 #endif #ifndef MAXGPUSCREENS #define MAXGPUSCREENS 16 #endif #define MAXCLIENTS 2048 #define LIMITCLIENTS 256 /* Must be a power of 2 and <= MAXCLIENTS */ #define MAXEXTENSIONS 128 #define MAXFORMATS 8 #ifndef MAXDEVICES #define MAXDEVICES 256 /* input devices */ #endif #define GPU_SCREEN_OFFSET 256 /* 128 event opcodes for core + extension events, excluding GE */ #define MAXEVENTS 128 #define EXTENSION_EVENT_BASE 64 #define EXTENSION_BASE 128 typedef uint32_t ATOM; #ifndef TRUE #define TRUE 1 #define FALSE 0 #endif #ifndef _XTYPEDEF_CALLBACKLISTPTR typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */ #define _XTYPEDEF_CALLBACKLISTPTR #endif typedef struct _xReq *xReqPtr; #include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */ #include /* for bcopy, bzero, and bcmp */ #define NullBox ((BoxPtr)0) #define MILLI_PER_MIN (1000 * 60) #define MILLI_PER_SECOND (1000) /* this next is used with None and ParentRelative to tell PaintWin() what to use to paint the background. Also used in the macro IS_VALID_PIXMAP */ #define USE_BACKGROUND_PIXEL 3 #define USE_BORDER_PIXEL 3 #undef min #undef max #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) /* abs() is a function, not a macro; include the file declaring * it in case we haven't done that yet. */ #include #define sign(x) ((x) < 0 ? -1 : ((x) > 0 ? 1 : 0)) /* this assumes b > 0 */ #define modulus(a, b, d) if (((d) = (a) % (b)) < 0) (d) += (b) /* * return the least significant bit in x which is set * * This works on 1's complement and 2's complement machines. * If you care about the extra instruction on 2's complement * machines, change to ((x) & (-(x))) */ #define lowbit(x) ((x) & (~(x) + 1)) /* XXX Not for modules */ #include #if !defined(MAXSHORT) || !defined(MINSHORT) || \ !defined(MAXINT) || !defined(MININT) /* * Some implementations #define these through , so preclude * #include'ing it later. */ #include #undef MAXSHORT #define MAXSHORT SHRT_MAX #undef MINSHORT #define MINSHORT SHRT_MIN #undef MAXINT #define MAXINT INT_MAX #undef MININT #define MININT INT_MIN #include #include #include /* for fopen, etc... */ #endif #ifndef PATH_MAX #include #ifndef PATH_MAX #ifdef MAXPATHLEN #define PATH_MAX MAXPATHLEN #else #define PATH_MAX 1024 #endif #endif #endif /** * Calculate the number of bytes needed to hold bits. * @param bits The minimum number of bits needed. * @return The number of bytes needed to hold bits. */ static inline int bits_to_bytes(const int bits) { return ((bits + 7) >> 3); } /** * Calculate the number of 4-byte units needed to hold the given number of * bytes. * @param bytes The minimum number of bytes needed. * @return The number of 4-byte units needed to hold bytes. */ static inline int bytes_to_int32(const int bytes) { return (((bytes) + 3) >> 2); } /** * Calculate the number of bytes (in multiples of 4) needed to hold bytes. * @param bytes The minimum number of bytes needed. * @return The closest multiple of 4 that is equal or higher than bytes. */ static inline int pad_to_int32(const int bytes) { return (((bytes) + 3) & ~3); } /** * Calculate padding needed to bring the number of bytes to an even * multiple of 4. * @param bytes The minimum number of bytes needed. * @return The bytes of padding needed to arrive at the closest multiple of 4 * that is equal or higher than bytes. */ static inline int padding_for_int32(const int bytes) { return ((-bytes) & 3); } extern _X_EXPORT char **xstrtokenize(const char *str, const char *separators); extern void FormatInt64(int64_t num, char *string); extern void FormatUInt64(uint64_t num, char *string); extern void FormatUInt64Hex(uint64_t num, char *string); extern void FormatDouble(double dbl, char *string); /** * Compare the two version numbers comprising of major.minor. * * @return A value less than 0 if a is less than b, 0 if a is equal to b, * or a value greater than 0 */ static inline int version_compare(uint32_t a_major, uint32_t a_minor, uint32_t b_major, uint32_t b_minor) { if (a_major > b_major) return 1; if (a_major < b_major) return -1; if (a_minor > b_minor) return 1; if (a_minor < b_minor) return -1; return 0; } /* some macros to help swap requests, replies, and events */ #define LengthRestB(stuff) \ ((client->req_len << 2) - sizeof(*stuff)) #define LengthRestS(stuff) \ ((client->req_len << 1) - (sizeof(*stuff) >> 1)) #define LengthRestL(stuff) \ (client->req_len - (sizeof(*stuff) >> 2)) #define SwapRestS(stuff) \ SwapShorts((short *)(stuff + 1), LengthRestS(stuff)) #define SwapRestL(stuff) \ SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff)) #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) void __attribute__ ((error("wrong sized variable passed to swap"))) wrong_size(void); #else static inline void wrong_size(void) { } #endif #if !(defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590))) static inline int __builtin_constant_p(int x) { return 0; } #endif static inline uint64_t bswap_64(uint64_t x) { return (((x & 0xFF00000000000000ull) >> 56) | ((x & 0x00FF000000000000ull) >> 40) | ((x & 0x0000FF0000000000ull) >> 24) | ((x & 0x000000FF00000000ull) >> 8) | ((x & 0x00000000FF000000ull) << 8) | ((x & 0x0000000000FF0000ull) << 24) | ((x & 0x000000000000FF00ull) << 40) | ((x & 0x00000000000000FFull) << 56)); } #define swapll(x) do { \ if (sizeof(*(x)) != 8) \ wrong_size(); \ *(x) = bswap_64(*(x)); \ } while (0) static inline uint32_t bswap_32(uint32_t x) { return (((x & 0xFF000000) >> 24) | ((x & 0x00FF0000) >> 8) | ((x & 0x0000FF00) << 8) | ((x & 0x000000FF) << 24)); } static inline Bool checked_int64_add(int64_t *out, int64_t a, int64_t b) { /* Do the potentially overflowing math as uint64_t, as signed * integers in C are undefined on overflow (and the compiler may * optimize out our overflow check below, otherwise) */ int64_t result = (uint64_t)a + (uint64_t)b; /* signed addition overflows if operands have the same sign, and * the sign of the result doesn't match the sign of the inputs. */ Bool overflow = (a < 0) == (b < 0) && (a < 0) != (result < 0); *out = result; return overflow; } static inline Bool checked_int64_subtract(int64_t *out, int64_t a, int64_t b) { int64_t result = (uint64_t)a - (uint64_t)b; Bool overflow = (a < 0) != (b < 0) && (a < 0) != (result < 0); *out = result; return overflow; } #define swapl(x) do { \ if (sizeof(*(x)) != 4) \ wrong_size(); \ *(x) = bswap_32(*(x)); \ } while (0) static inline uint16_t bswap_16(uint16_t x) { return (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)); } #define swaps(x) do { \ if (sizeof(*(x)) != 2) \ wrong_size(); \ *(x) = bswap_16(*(x)); \ } while (0) /* copy 32-bit value from src to dst byteswapping on the way */ #define cpswapl(src, dst) do { \ if (sizeof((src)) != 4 || sizeof((dst)) != 4) \ wrong_size(); \ (dst) = bswap_32((src)); \ } while (0) /* copy short from src to dst byteswapping on the way */ #define cpswaps(src, dst) do { \ if (sizeof((src)) != 2 || sizeof((dst)) != 2) \ wrong_size(); \ (dst) = bswap_16((src)); \ } while (0) extern _X_EXPORT void SwapLongs(CARD32 *list, unsigned long count); extern _X_EXPORT void SwapShorts(short *list, unsigned long count); extern _X_EXPORT void MakePredeclaredAtoms(void); extern _X_EXPORT int Ones(unsigned long /*mask */ ); typedef struct _xPoint *DDXPointPtr; typedef struct pixman_box16 *BoxPtr; typedef struct _xEvent *xEventPtr; typedef struct _xRectangle *xRectanglePtr; typedef struct _GrabRec *GrabPtr; /* typedefs from other places - duplicated here to minimize the amount * of unnecessary junk that one would normally have to include to get * these symbols defined */ #ifndef _XTYPEDEF_CHARINFOPTR typedef struct _CharInfo *CharInfoPtr; /* also in fonts/include/font.h */ #define _XTYPEDEF_CHARINFOPTR #endif extern _X_EXPORT unsigned long globalSerialNumber; extern _X_EXPORT unsigned long serverGeneration; /* Don't use this directly, use BUG_WARN or BUG_WARN_MSG instead */ #define __BUG_WARN_MSG(cond, with_msg, ...) \ do { if (cond) { \ ErrorFSigSafe("BUG: triggered 'if (" #cond ")'\n"); \ ErrorFSigSafe("BUG: %s:%u in %s()\n", \ __FILE__, __LINE__, __func__); \ if (with_msg) ErrorFSigSafe(__VA_ARGS__); \ xorg_backtrace(); \ } } while(0) #define BUG_WARN_MSG(cond, ...) \ __BUG_WARN_MSG(cond, 1, __VA_ARGS__) #define BUG_WARN(cond) __BUG_WARN_MSG(cond, 0, NULL) #define BUG_RETURN(cond) \ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return; } } while(0) #define BUG_RETURN_MSG(cond, ...) \ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return; } } while(0) #define BUG_RETURN_VAL(cond, val) \ do { if (cond) { __BUG_WARN_MSG(cond, 0, NULL); return (val); } } while(0) #define BUG_RETURN_VAL_MSG(cond, val, ...) \ do { if (cond) { __BUG_WARN_MSG(cond, 1, __VA_ARGS__); return (val); } } while(0) #endif /* MISC_H */ xorg-server-21.1.16/include/miscstruct.h0000644000175000017500000000507614757411105013637 /*********************************************************** 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. ******************************************************************/ #ifndef MISCSTRUCT_H #define MISCSTRUCT_H 1 #include "misc.h" #include #include typedef xPoint DDXPointRec; typedef struct pixman_box16 BoxRec; typedef union _DevUnion { void *ptr; long val; unsigned long uval; void *(*fptr) (void); } DevUnion; #endif /* MISCSTRUCT_H */ xorg-server-21.1.16/include/opaque.h0000644000175000017500000000502414757411105012722 /* 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. */ #ifndef OPAQUE_H #define OPAQUE_H #include #include "globals.h" extern _X_EXPORT int LimitClients; extern _X_EXPORT volatile char isItTimeToYield; extern _X_EXPORT volatile char dispatchException; /* bit values for dispatchException */ #define DE_RESET 1 #define DE_TERMINATE 2 #define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */ extern _X_EXPORT int ScreenSaverBlanking; extern _X_EXPORT int ScreenSaverAllowExposures; extern _X_EXPORT int defaultScreenSaverBlanking; extern _X_EXPORT int defaultScreenSaverAllowExposures; extern _X_EXPORT const char *display; extern _X_EXPORT int displayfd; extern _X_EXPORT Bool explicit_display; extern _X_EXPORT Bool disableBackingStore; extern _X_EXPORT Bool enableBackingStore; extern _X_EXPORT Bool enableIndirectGLX; extern _X_EXPORT Bool PartialNetwork; extern _X_EXPORT Bool RunFromSigStopParent; #ifdef RLIMIT_DATA extern _X_EXPORT int limitDataSpace; #endif #ifdef RLIMIT_STACK extern _X_EXPORT int limitStackSpace; #endif #ifdef RLIMIT_NOFILE extern _X_EXPORT int limitNoFile; #endif extern _X_EXPORT Bool defeatAccessControl; extern _X_EXPORT long maxBigRequestSize; extern _X_EXPORT Bool party_like_its_1989; extern _X_EXPORT Bool whiteRoot; extern _X_EXPORT Bool bgNoneRoot; extern _X_EXPORT Bool CoreDump; extern _X_EXPORT Bool NoListenAll; extern _X_EXPORT Bool AllowByteSwappedClients; #endif /* OPAQUE_H */ xorg-server-21.1.16/include/nonsdk_extinit.h0000644000175000017500000000267714757411105014503 /*********************************************************** Copyright 2014 Jon TURNEY 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. ******************************************************************/ #ifndef NONSDK_EXT_INIT_H #define NONSDK_EXT_INIT_H /* this is separate from extinit.h to avoid references to these symbols being pulled in by sdksyms */ extern _X_EXPORT Bool noPseudoramiXExtension; extern void PseudoramiXExtensionInit(void); #endif xorg-server-21.1.16/include/optionstr.h0000644000175000017500000000036414757411105013473 #ifndef OPTIONSTR_H_ #define OPTIONSTR_H_ #include "list.h" struct _InputOption { GenericListRec list; char *opt_name; char *opt_val; int opt_used; char *opt_comment; }; #endif /* INPUTSTRUCT_H */ xorg-server-21.1.16/include/os.h0000644000175000017500000005101214757411105012047 /*********************************************************** 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. ******************************************************************/ #ifndef OS_H #define OS_H #include "misc.h" #include #include #if defined(HAVE_REALLOCARRAY) #include /* for reallocarray */ #endif #include #ifdef MONOTONIC_CLOCK #include #endif #define SCREEN_SAVER_ON 0 #define SCREEN_SAVER_OFF 1 #define SCREEN_SAVER_FORCER 2 #define SCREEN_SAVER_CYCLE 3 #ifndef MAX_REQUEST_SIZE #define MAX_REQUEST_SIZE 65535 #endif #ifndef MAX_BIG_REQUEST_SIZE #define MAX_BIG_REQUEST_SIZE 4194303 #endif typedef struct _FontPathRec *FontPathPtr; typedef struct _NewClientRec *NewClientPtr; #ifndef xnfalloc #define xnfalloc(size) XNFalloc((unsigned long)(size)) #define xnfcalloc(_num, _size) XNFcallocarray((_num), (_size)) #define xnfrealloc(ptr, size) XNFrealloc((void *)(ptr), (unsigned long)(size)) #define xstrdup(s) Xstrdup(s) #define xnfstrdup(s) XNFstrdup(s) #define xallocarray(num, size) reallocarray(NULL, (num), (size)) #define xnfallocarray(num, size) XNFreallocarray(NULL, (num), (size)) #define xnfreallocarray(ptr, num, size) XNFreallocarray((ptr), (num), (size)) #endif #include #include #ifdef DDXBEFORERESET extern void ddxBeforeReset(void); #endif #ifdef DDXOSVERRORF extern _X_EXPORT void (*OsVendorVErrorFProc) (const char *, va_list args) _X_ATTRIBUTE_PRINTF(1, 0); #endif extern _X_EXPORT Bool WaitForSomething(Bool clients_are_ready); extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ ); extern _X_EXPORT int ReadFdFromClient(ClientPtr client); extern _X_EXPORT int WriteFdToClient(ClientPtr client, int fd, Bool do_close); extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ , char * /*data */ , int /*count */ ); extern _X_EXPORT void ResetCurrentRequest(ClientPtr /*client */ ); extern _X_EXPORT void FlushAllOutput(void); extern _X_EXPORT void FlushIfCriticalOutputPending(void); extern _X_EXPORT void SetCriticalOutputPending(void); extern _X_EXPORT int WriteToClient(ClientPtr /*who */ , int /*count */ , const void * /*buf */ ); extern _X_EXPORT void ResetOsBuffers(void); extern _X_EXPORT void NotifyParentProcess(void); extern _X_EXPORT void CreateWellKnownSockets(void); extern _X_EXPORT void ResetWellKnownSockets(void); extern _X_EXPORT void CloseWellKnownConnections(void); extern _X_EXPORT XID AuthorizationIDOfClient(ClientPtr /*client */ ); extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ , unsigned int /*proto_n */ , char * /*auth_proto */ , unsigned int /*string_n */ , char * /*auth_string */ ); extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ ); typedef void (*NotifyFdProcPtr)(int fd, int ready, void *data); #define X_NOTIFY_NONE 0x0 #define X_NOTIFY_READ 0x1 #define X_NOTIFY_WRITE 0x2 #define X_NOTIFY_ERROR 0x4 /* don't need to select for, always reported */ extern _X_EXPORT Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data); static inline void RemoveNotifyFd(int fd) { (void) SetNotifyFd(fd, NULL, X_NOTIFY_NONE, NULL); } extern _X_EXPORT int OnlyListenToOneClient(ClientPtr /*client */ ); extern _X_EXPORT void ListenToAllClients(void); extern _X_EXPORT void IgnoreClient(ClientPtr /*client */ ); extern _X_EXPORT void AttendClient(ClientPtr /*client */ ); extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ ); extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ ); extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ ); extern _X_EXPORT Bool AddClientOnOpenFD(int /* fd */ ); #ifdef MONOTONIC_CLOCK extern void ForceClockId(clockid_t /* forced_clockid */); #endif extern _X_EXPORT CARD32 GetTimeInMillis(void); extern _X_EXPORT CARD64 GetTimeInMicros(void); extern _X_EXPORT void AdjustWaitForDelay(void *waitTime, int newdelay); typedef struct _OsTimerRec *OsTimerPtr; typedef CARD32 (*OsTimerCallback) (OsTimerPtr timer, CARD32 time, void *arg); extern _X_EXPORT void TimerInit(void); extern _X_EXPORT Bool TimerForce(OsTimerPtr /* timer */ ); #define TimerAbsolute (1<<0) #define TimerForceOld (1<<1) extern _X_EXPORT OsTimerPtr TimerSet(OsTimerPtr timer, int flags, CARD32 millis, OsTimerCallback func, void *arg); extern _X_EXPORT void TimerCheck(void); extern _X_EXPORT void TimerCancel(OsTimerPtr /* pTimer */ ); extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ ); extern _X_EXPORT void SetScreenSaverTimer(void); extern _X_EXPORT void FreeScreenSaverTimer(void); extern _X_EXPORT void AutoResetServer(int /*sig */ ); extern _X_EXPORT void GiveUp(int /*sig */ ); extern _X_EXPORT void UseMsg(void); extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []); extern _X_EXPORT int set_font_authorizations(char **authorizations, int *authlen, void *client); /* * This function malloc(3)s buffer, terminating the server if there is not * enough memory. */ extern _X_EXPORT void * XNFalloc(unsigned long /*amount */ ); /* * This function calloc(3)s buffer, terminating the server if there is not * enough memory. */ extern _X_EXPORT void * XNFcalloc(unsigned long /*amount */ ) _X_DEPRECATED; /* * This function calloc(3)s buffer, terminating the server if there is not * enough memory or the arguments overflow when multiplied */ extern _X_EXPORT void * XNFcallocarray(size_t nmemb, size_t size); /* * This function realloc(3)s passed buffer, terminating the server if there is * not enough memory. */ extern _X_EXPORT void * XNFrealloc(void * /*ptr */ , unsigned long /*amount */ ); /* * This function reallocarray(3)s passed buffer, terminating the server if * there is not enough memory or the arguments overflow when multiplied. */ extern _X_EXPORT void * XNFreallocarray(void *ptr, size_t nmemb, size_t size); /* * This function strdup(3)s passed string. The only difference from the library * function that it is safe to pass NULL, as NULL will be returned. */ extern _X_EXPORT char * Xstrdup(const char *s); /* * This function strdup(3)s passed string, terminating the server if there is * not enough memory. If NULL is passed to this function, NULL is returned. */ extern _X_EXPORT char * XNFstrdup(const char *s); /* Include new X*asprintf API */ #include "Xprintf.h" /* Older api deprecated in favor of the asprintf versions */ extern _X_EXPORT char * Xprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_DEPRECATED; extern _X_EXPORT char * Xvprintf(const char *fmt, va_list va) _X_ATTRIBUTE_PRINTF(1, 0) _X_DEPRECATED; extern _X_EXPORT char * XNFprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_DEPRECATED; extern _X_EXPORT char * XNFvprintf(const char *fmt, va_list va) _X_ATTRIBUTE_PRINTF(1, 0) _X_DEPRECATED; typedef void (*OsSigHandlerPtr) (int /* sig */ ); typedef int (*OsSigWrapperPtr) (int /* sig */ ); extern _X_EXPORT OsSigHandlerPtr OsSignal(int /* sig */ , OsSigHandlerPtr /* handler */ ); extern _X_EXPORT OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newWrap); extern _X_EXPORT int auditTrailLevel; extern _X_EXPORT void LockServer(void); extern _X_EXPORT void UnlockServer(void); extern _X_EXPORT int OsLookupColor(int /*screen */ , char * /*name */ , unsigned /*len */ , unsigned short * /*pred */ , unsigned short * /*pgreen */ , unsigned short * /*pblue */ ); extern _X_EXPORT void OsInit(void); extern _X_EXPORT void OsCleanup(Bool); extern _X_EXPORT void OsVendorFatalError(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0); extern _X_EXPORT void OsVendorInit(void); extern _X_EXPORT void OsBlockSignals(void); extern _X_EXPORT void OsReleaseSignals(void); extern void OsResetSignals(void); extern _X_EXPORT void OsAbort(void) _X_NORETURN; #if !defined(WIN32) extern _X_EXPORT int System(const char *); extern _X_EXPORT void * Popen(const char *, const char *); extern _X_EXPORT int Pclose(void *); extern _X_EXPORT void * Fopen(const char *, const char *); extern _X_EXPORT int Fclose(void *); #else extern const char * Win32TempDir(void); extern int System(const char *cmdline); #define Fopen(a,b) fopen(a,b) #define Fclose(a) fclose(a) #endif extern _X_EXPORT Bool PrivsElevated(void); extern _X_EXPORT void CheckUserParameters(int argc, char **argv, char **envp); extern _X_EXPORT void CheckUserAuthorization(void); extern _X_EXPORT int AddHost(ClientPtr /*client */ , int /*family */ , unsigned /*length */ , const void * /*pAddr */ ); extern _X_EXPORT Bool ForEachHostInFamily(int family, Bool (*func)( unsigned char *addr, short len, void *closure), void *closure); extern _X_EXPORT int RemoveHost(ClientPtr client, int family, unsigned length, void *pAddr); extern _X_EXPORT int GetHosts(void ** /*data */ , int * /*pnHosts */ , int * /*pLen */ , BOOL * /*pEnabled */ ); typedef struct sockaddr *sockaddrPtr; extern _X_EXPORT int InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client); #define LCC_UID_SET (1 << 0) #define LCC_GID_SET (1 << 1) #define LCC_PID_SET (1 << 2) #define LCC_ZID_SET (1 << 3) typedef struct { int fieldsSet; /* Bit mask of fields set */ int euid; /* Effective uid */ int egid; /* Primary effective group id */ int nSuppGids; /* Number of supplementary group ids */ int *pSuppGids; /* Array of supplementary group ids */ int pid; /* Process id */ int zoneid; /* Only set on Solaris 10 & later */ } LocalClientCredRec; extern _X_EXPORT int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); extern _X_EXPORT void FreeLocalClientCreds(LocalClientCredRec *); extern _X_EXPORT int ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ ); extern _X_EXPORT int GetClientFd(ClientPtr); extern _X_EXPORT Bool ClientIsLocal(ClientPtr client); extern _X_EXPORT int GetAccessControl(void); extern _X_EXPORT void AddLocalHosts(void); extern _X_EXPORT void ResetHosts(const char *display); extern _X_EXPORT void EnableLocalAccess(void); extern _X_EXPORT void DisableLocalAccess(void); extern _X_EXPORT void EnableLocalHost(void); extern _X_EXPORT void DisableLocalHost(void); #ifndef NO_LOCAL_CLIENT_CRED extern _X_EXPORT void EnableLocalUser(void); extern _X_EXPORT void DisableLocalUser(void); extern _X_EXPORT void LocalAccessScopeUser(void); #endif extern _X_EXPORT void AccessUsingXdmcp(void); extern _X_EXPORT void DefineSelf(int /*fd */ ); #ifdef XDMCP extern _X_EXPORT void AugmentSelf(void *from, int len); extern _X_EXPORT void RegisterAuthorizations(void); #endif extern _X_EXPORT void InitAuthorization(const char * /*filename */ ); /* extern int LoadAuthorization(void); */ extern _X_EXPORT int AuthorizationFromID(XID id, unsigned short *name_lenp, const char **namep, unsigned short *data_lenp, char **datap); extern _X_EXPORT XID CheckAuthorization(unsigned int /*namelength */ , const char * /*name */ , unsigned int /*datalength */ , const char * /*data */ , ClientPtr /*client */ , const char ** /*reason */ ); extern _X_EXPORT void ResetAuthorization(void); extern _X_EXPORT int RemoveAuthorization(unsigned short name_length, const char *name, unsigned short data_length, const char *data); extern _X_EXPORT int AddAuthorization(unsigned int /*name_length */ , const char * /*name */ , unsigned int /*data_length */ , char * /*data */ ); #ifdef XCSECURITY extern _X_EXPORT XID GenerateAuthorization(unsigned int /* name_length */ , const char * /* name */ , unsigned int /* data_length */ , const char * /* data */ , unsigned int * /* data_length_return */ , char ** /* data_return */ ); #endif extern _X_EXPORT int ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ ); #define CHECK_FOR_REQUIRED_ARGUMENTS(num) \ do if (((i + num) >= argc) || (!argv[i + num])) { \ UseMsg(); \ FatalError("Required argument to %s not specified\n", argv[i]); \ } while (0) extern _X_EXPORT void ddxUseMsg(void); /* stuff for ReplyCallback */ extern _X_EXPORT CallbackListPtr ReplyCallback; typedef struct { ClientPtr client; const void *replyData; unsigned long dataLenBytes; /* actual bytes from replyData + pad bytes */ unsigned long bytesRemaining; Bool startOfReply; unsigned long padBytes; /* pad bytes from zeroed array */ } ReplyInfoRec; /* stuff for FlushCallback */ extern _X_EXPORT CallbackListPtr FlushCallback; enum ExitCode { EXIT_NO_ERROR = 0, EXIT_ERR_ABORT = 1, EXIT_ERR_CONFIGURE = 2, EXIT_ERR_DRIVERS = 3, }; extern _X_EXPORT void ddxGiveUp(enum ExitCode error); extern _X_EXPORT void ddxInputThreadInit(void); extern _X_EXPORT int TimeSinceLastInputEvent(void); /* Function fallbacks provided by AC_REPLACE_FUNCS in configure.ac */ #ifndef HAVE_REALLOCARRAY #define reallocarray xreallocarray extern _X_EXPORT void * reallocarray(void *optr, size_t nmemb, size_t size); #endif #ifndef HAVE_STRCASECMP #define strcasecmp xstrcasecmp extern _X_EXPORT int xstrcasecmp(const char *s1, const char *s2); #endif #ifndef HAVE_STRNCASECMP #define strncasecmp xstrncasecmp extern _X_EXPORT int xstrncasecmp(const char *s1, const char *s2, size_t n); #endif #ifndef HAVE_STRCASESTR #define strcasestr xstrcasestr extern _X_EXPORT char * xstrcasestr(const char *s, const char *find); #endif #ifndef HAVE_STRLCPY extern _X_EXPORT size_t strlcpy(char *dst, const char *src, size_t siz); extern _X_EXPORT size_t strlcat(char *dst, const char *src, size_t siz); #endif #ifndef HAVE_STRNDUP extern _X_EXPORT char * strndup(const char *str, size_t n); #endif #ifndef HAVE_TIMINGSAFE_MEMCMP extern _X_EXPORT int timingsafe_memcmp(const void *b1, const void *b2, size_t len); #endif /* Logging. */ typedef enum _LogParameter { XLOG_FLUSH, XLOG_SYNC, XLOG_VERBOSITY, XLOG_FILE_VERBOSITY } LogParameter; /* Flags for log messages. */ typedef enum { X_PROBED, /* Value was probed */ X_CONFIG, /* Value was given in the config file */ X_DEFAULT, /* Value is a default */ X_CMDLINE, /* Value was given on the command line */ X_NOTICE, /* Notice */ X_ERROR, /* Error message */ X_WARNING, /* Warning message */ X_INFO, /* Informational message */ X_NONE, /* No prefix */ X_NOT_IMPLEMENTED, /* Not implemented */ X_DEBUG, /* Debug message */ X_UNKNOWN = -1 /* unknown -- this must always be last */ } MessageType; extern _X_EXPORT const char * LogInit(const char *fname, const char *backup); extern void LogSetDisplay(void); extern _X_EXPORT void LogClose(enum ExitCode error); extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value); extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args) _X_ATTRIBUTE_PRINTF(2, 0); extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(3, 0); extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(2, 3); extern _X_EXPORT void LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(3, 4); extern _X_EXPORT void LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args) _X_ATTRIBUTE_PRINTF(3, 0); extern _X_EXPORT void LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format, va_list msg_args, const char *hdr_format, va_list hdr_args) _X_ATTRIBUTE_PRINTF(3, 0) _X_ATTRIBUTE_PRINTF(5, 0); extern _X_EXPORT void LogHdrMessageVerb(MessageType type, int verb, const char *msg_format, va_list msg_args, const char *hdr_format, ...) _X_ATTRIBUTE_PRINTF(3, 0) _X_ATTRIBUTE_PRINTF(5, 6); extern _X_EXPORT void LogHdrMessage(MessageType type, const char *msg_format, va_list msg_args, const char *hdr_format, ...) _X_ATTRIBUTE_PRINTF(2, 0) _X_ATTRIBUTE_PRINTF(4, 5); extern _X_EXPORT void FreeAuditTimer(void); extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern _X_EXPORT void VAuditF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0); extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2) _X_NORETURN; #ifdef DEBUG #define DebugF ErrorF #else #define DebugF(...) /* */ #endif extern _X_EXPORT void VErrorF(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0); extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern _X_EXPORT void VErrorFSigSafe(const char *f, va_list args) _X_ATTRIBUTE_PRINTF(1, 0); extern _X_EXPORT void ErrorFSigSafe(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); extern _X_EXPORT void LogPrintMarkers(void); extern _X_EXPORT void xorg_backtrace(void); extern _X_EXPORT int os_move_fd(int fd); #include #if defined(WIN32) && !defined(__CYGWIN__) typedef _sigset_t sigset_t; #endif extern _X_EXPORT int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldest); #endif /* OS_H */ xorg-server-21.1.16/include/pixmap.h0000644000175000017500000001205614757411105012731 /*********************************************************** 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. ******************************************************************/ #ifndef PIXMAP_H #define PIXMAP_H #include "misc.h" #include "screenint.h" #include "regionstr.h" #include /* types for Drawable */ #define DRAWABLE_WINDOW 0 #define DRAWABLE_PIXMAP 1 #define UNDRAWABLE_WINDOW 2 /* corresponding type masks for dixLookupDrawable() */ #define M_DRAWABLE_WINDOW (1<<0) #define M_DRAWABLE_PIXMAP (1<<1) #define M_UNDRAWABLE_WINDOW (1<<2) #define M_ANY (-1) #define M_WINDOW (M_DRAWABLE_WINDOW|M_UNDRAWABLE_WINDOW) #define M_DRAWABLE (M_DRAWABLE_WINDOW|M_DRAWABLE_PIXMAP) #define M_UNDRAWABLE (M_UNDRAWABLE_WINDOW) /* flags to PaintWindow() */ #define PW_BACKGROUND 0 #define PW_BORDER 1 #define NullPixmap ((PixmapPtr)0) typedef struct _Drawable *DrawablePtr; typedef struct _Pixmap *PixmapPtr; typedef struct _PixmapDirtyUpdate *PixmapDirtyUpdatePtr; typedef union _PixUnion { PixmapPtr pixmap; unsigned long pixel; } PixUnion; #define SamePixUnion(a,b,isPixel)\ ((isPixel) ? (a).pixel == (b).pixel : (a).pixmap == (b).pixmap) #define EqualPixUnion(as, a, bs, b) \ ((as) == (bs) && (SamePixUnion (a, b, as))) #define OnScreenDrawable(type) \ (type == DRAWABLE_WINDOW) #define WindowDrawable(type) \ ((type == DRAWABLE_WINDOW) || (type == UNDRAWABLE_WINDOW)) extern _X_EXPORT PixmapPtr GetScratchPixmapHeader(ScreenPtr pScreen, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); extern _X_EXPORT void FreeScratchPixmapHeader(PixmapPtr /*pPixmap */ ); extern _X_EXPORT Bool CreateScratchPixmapsForScreen(ScreenPtr /*pScreen */ ); extern _X_EXPORT void FreeScratchPixmapsForScreen(ScreenPtr /*pScreen */ ); extern _X_EXPORT PixmapPtr AllocatePixmap(ScreenPtr /*pScreen */ , int /*pixDataSize */ ); extern _X_EXPORT void FreePixmap(PixmapPtr /*pPixmap */ ); extern _X_EXPORT PixmapPtr PixmapShareToSecondary(PixmapPtr pixmap, ScreenPtr secondary); extern _X_EXPORT void PixmapUnshareSecondaryPixmap(PixmapPtr secondary_pixmap); #define HAS_DIRTYTRACKING_ROTATION 1 #define HAS_DIRTYTRACKING_DRAWABLE_SRC 1 extern _X_EXPORT Bool PixmapStartDirtyTracking(DrawablePtr src, PixmapPtr slave_dst, int x, int y, int dst_x, int dst_y, Rotation rotation); extern _X_EXPORT Bool PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst); /* helper function, drivers can do this themselves if they can do it more efficiently */ extern _X_EXPORT Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty); #endif /* PIXMAP_H */ xorg-server-21.1.16/include/pixmapstr.h0000644000175000017500000001034514757411105013461 /*********************************************************** 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. ******************************************************************/ #ifndef PIXMAPSTRUCT_H #define PIXMAPSTRUCT_H #include "pixmap.h" #include "screenint.h" #include "regionstr.h" #include "privates.h" #include "damage.h" #include #include "picturestr.h" typedef struct _Drawable { unsigned char type; /* DRAWABLE_ */ unsigned char class; /* specific to type */ unsigned char depth; unsigned char bitsPerPixel; XID id; /* resource id */ short x; /* window: screen absolute, pixmap: 0 */ short y; /* window: screen absolute, pixmap: 0 */ unsigned short width; unsigned short height; ScreenPtr pScreen; unsigned long serialNumber; } DrawableRec; /* * PIXMAP -- device dependent */ typedef struct _Pixmap { DrawableRec drawable; PrivateRec *devPrivates; int refcnt; int devKind; /* This is the pitch of the pixmap, typically width*bpp/8. */ DevUnion devPrivate; /* When !NULL, devPrivate.ptr points to the raw pixel data. */ #ifdef COMPOSITE short screen_x; short screen_y; #endif unsigned usage_hint; /* see CREATE_PIXMAP_USAGE_* */ PixmapPtr primary_pixmap; /* pointer to primary copy of pixmap for pixmap sharing */ } PixmapRec; typedef struct _PixmapDirtyUpdate { DrawablePtr src; /* Root window / shared pixmap */ PixmapPtr secondary_dst; /* Shared / scanout pixmap */ int x, y; DamagePtr damage; struct xorg_list ent; int dst_x, dst_y; Rotation rotation; PictTransform transform; struct pixman_f_transform f_transform, f_inverse; } PixmapDirtyUpdateRec; static inline void PixmapBox(BoxPtr box, PixmapPtr pixmap) { box->x1 = 0; box->x2 = pixmap->drawable.width; box->y1 = 0; box->y2 = pixmap->drawable.height; } static inline void PixmapRegionInit(RegionPtr region, PixmapPtr pixmap) { BoxRec box; PixmapBox(&box, pixmap); RegionInit(region, &box, 1); } #endif /* PIXMAPSTRUCT_H */ xorg-server-21.1.16/include/privates.h0000644000175000017500000002564714757411105013302 /*********************************************************** 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 AUTHOR 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. ******************************************************************/ #ifndef PRIVATES_H #define PRIVATES_H 1 #include #include #include #include #include "misc.h" /***************************************************************** * STUFF FOR PRIVATES *****************************************************************/ typedef struct _Private PrivateRec, *PrivatePtr; typedef enum { /* XSELinux uses the same private keys for numerous objects */ PRIVATE_XSELINUX, /* Otherwise, you get a private in just the requested structure */ /* These can have objects created before all of the keys are registered */ PRIVATE_SCREEN, PRIVATE_EXTENSION, PRIVATE_COLORMAP, PRIVATE_DEVICE, /* These cannot have any objects before all relevant keys are registered */ PRIVATE_CLIENT, PRIVATE_PROPERTY, PRIVATE_SELECTION, PRIVATE_WINDOW, PRIVATE_PIXMAP, PRIVATE_GC, PRIVATE_CURSOR, PRIVATE_CURSOR_BITS, /* extension privates */ PRIVATE_GLYPH, PRIVATE_GLYPHSET, PRIVATE_PICTURE, PRIVATE_SYNC_FENCE, /* last private type */ PRIVATE_LAST, } DevPrivateType; typedef struct _DevPrivateKeyRec { int offset; int size; Bool initialized; Bool allocated; DevPrivateType type; struct _DevPrivateKeyRec *next; } DevPrivateKeyRec, *DevPrivateKey; typedef struct _DevPrivateSetRec { DevPrivateKey key; unsigned offset; int created; int allocated; } DevPrivateSetRec, *DevPrivateSetPtr; typedef struct _DevScreenPrivateKeyRec { DevPrivateKeyRec screenKey; } DevScreenPrivateKeyRec, *DevScreenPrivateKey; /* * Let drivers know how to initialize private keys */ #define HAS_DEVPRIVATEKEYREC 1 #define HAS_DIXREGISTERPRIVATEKEY 1 /* * Register a new private index for the private type. * * This initializes the specified key and optionally requests pre-allocated * private space for your driver/module. If you request no extra space, you * may set and get a single pointer value using this private key. Otherwise, * you can get the address of the extra space and store whatever data you like * there. * * You may call dixRegisterPrivateKey more than once on the same key, but the * size and type must match or the server will abort. * * dixRegisterPrivateKey returns FALSE if it fails to allocate memory * during its operation. */ extern _X_EXPORT Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size); /* * Check whether a private key has been registered */ static inline Bool dixPrivateKeyRegistered(DevPrivateKey key) { return key->initialized; } /* * Get the address of the private storage. * * For keys with pre-defined storage, this gets the base of that storage * Otherwise, it returns the place where the private pointer is stored. */ static inline void * dixGetPrivateAddr(PrivatePtr *privates, const DevPrivateKey key) { assert(key->initialized); return (char *) (*privates) + key->offset; } /* * Fetch a private pointer stored in the object * * Returns the pointer stored with dixSetPrivate. * This must only be used with keys that have * no pre-defined storage */ static inline void * dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key) { assert(key->size == 0); return *(void **) dixGetPrivateAddr(privates, key); } /* * Associate 'val' with 'key' in 'privates' so that later calls to * dixLookupPrivate(privates, key) will return 'val'. */ static inline void dixSetPrivate(PrivatePtr *privates, const DevPrivateKey key, void *val) { assert(key->size == 0); *(void **) dixGetPrivateAddr(privates, key) = val; } #include "dix.h" #include "resource.h" /* * Lookup a pointer to the private record. * * For privates with defined storage, return the address of the * storage. For privates without defined storage, return the pointer * contents */ static inline void * dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key) { if (key->size) return dixGetPrivateAddr(privates, key); else return dixGetPrivate(privates, key); } /* * Look up the address of the pointer to the storage * * This returns the place where the private pointer is stored, * which is only valid for privates without predefined storage. */ static inline void ** dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key) { assert(key->size == 0); return (void **) dixGetPrivateAddr(privates, key); } extern _X_EXPORT Bool dixRegisterScreenPrivateKey(DevScreenPrivateKey key, ScreenPtr pScreen, DevPrivateType type, unsigned size); extern _X_EXPORT DevPrivateKey _dixGetScreenPrivateKey(const DevScreenPrivateKey key, ScreenPtr pScreen); static inline void * dixGetScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen) { return dixGetPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen)); } static inline void * dixGetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen) { return dixGetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen)); } static inline void dixSetScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen, void *val) { dixSetPrivate(privates, _dixGetScreenPrivateKey(key, pScreen), val); } static inline void * dixLookupScreenPrivate(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen) { return dixLookupPrivate(privates, _dixGetScreenPrivateKey(key, pScreen)); } static inline void ** dixLookupScreenPrivateAddr(PrivatePtr *privates, const DevScreenPrivateKey key, ScreenPtr pScreen) { return dixLookupPrivateAddr(privates, _dixGetScreenPrivateKey(key, pScreen)); } /* * These functions relate to allocations related to a specific screen; * space will only be available for objects allocated for use on that * screen. As such, only objects which are related directly to a specific * screen are candidates for allocation this way, this includes * windows, pixmaps, gcs, pictures and colormaps. This key is * used just like any other key using dixGetPrivate and friends. * * This is distinctly different from the ScreenPrivateKeys above which * allocate space in global objects like cursor bits for a specific * screen, allowing multiple screen-related chunks of storage in a * single global object. */ #define HAVE_SCREEN_SPECIFIC_PRIVATE_KEYS 1 extern _X_EXPORT Bool dixRegisterScreenSpecificPrivateKey(ScreenPtr pScreen, DevPrivateKey key, DevPrivateType type, unsigned size); /* Clean up screen-specific privates before CloseScreen */ extern void dixFreeScreenSpecificPrivates(ScreenPtr pScreen); /* Initialize screen-specific privates in AddScreen */ extern void dixInitScreenSpecificPrivates(ScreenPtr pScreen); /* is this private created - so hotplug can avoid crashing */ Bool dixPrivatesCreated(DevPrivateType type); extern _X_EXPORT void * _dixAllocateScreenObjectWithPrivates(ScreenPtr pScreen, unsigned size, unsigned clear, unsigned offset, DevPrivateType type); #define dixAllocateScreenObjectWithPrivates(s, t, type) _dixAllocateScreenObjectWithPrivates(s, sizeof(t), sizeof(t), offsetof(t, devPrivates), type) extern _X_EXPORT int dixScreenSpecificPrivatesSize(ScreenPtr pScreen, DevPrivateType type); extern _X_EXPORT void _dixInitScreenPrivates(ScreenPtr pScreen, PrivatePtr *privates, void *addr, DevPrivateType type); #define dixInitScreenPrivates(s, o, v, type) _dixInitScreenPrivates(s, &(o)->devPrivates, (v), type); /* * Allocates private data separately from main object. * * For objects created during server initialization, this allows those * privates to be re-allocated as new private keys are registered. * * This includes screens, the serverClient, default colormaps and * extensions entries. */ extern _X_EXPORT Bool dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type); /* * Frees separately allocated private data */ extern _X_EXPORT void dixFreePrivates(PrivatePtr privates, DevPrivateType type); /* * Initialize privates by zeroing them */ extern _X_EXPORT void _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type); #define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type); /* * Clean up privates */ extern _X_EXPORT void _dixFiniPrivates(PrivatePtr privates, DevPrivateType type); #define dixFiniPrivates(o,t) _dixFiniPrivates((o)->devPrivates,t) /* * Allocates private data at object creation time. Required * for almost all objects, except for the list described * above for dixAllocatePrivates. */ extern _X_EXPORT void *_dixAllocateObjectWithPrivates(unsigned size, unsigned clear, unsigned offset, DevPrivateType type); #define dixAllocateObjectWithPrivates(t, type) (t *) _dixAllocateObjectWithPrivates(sizeof(t), sizeof(t), offsetof(t, devPrivates), type) extern _X_EXPORT void _dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type); #define dixFreeObjectWithPrivates(o,t) _dixFreeObjectWithPrivates(o, (o)->devPrivates, t) /* * Return size of privates for the specified type */ extern _X_EXPORT int dixPrivatesSize(DevPrivateType type); /* * Dump out private stats to ErrorF */ extern void dixPrivateUsage(void); /* * Resets the privates subsystem. dixResetPrivates is called from the main loop * before each server generation. This function must only be called by main(). */ extern _X_EXPORT void dixResetPrivates(void); /* * Looks up the offset where the devPrivates field is located. * * Returns -1 if the specified resource has no dev privates. * The position of the devPrivates field varies by structure * and calling code might only know the resource type, not the * structure definition. */ extern _X_EXPORT int dixLookupPrivateOffset(RESTYPE type); /* * Convenience macro for adding an offset to an object pointer * when making a call to one of the devPrivates functions */ #define DEVPRIV_AT(ptr, offset) ((PrivatePtr *)((char *)(ptr) + offset)) #endif /* PRIVATES_H */ xorg-server-21.1.16/include/property.h0000644000175000017500000000715514757411105013323 /*********************************************************** 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. ******************************************************************/ #ifndef PROPERTY_H #define PROPERTY_H #include "window.h" typedef struct _Property *PropertyPtr; typedef struct _PropertyStateRec { WindowPtr win; PropertyPtr prop; int state; } PropertyStateRec; extern CallbackListPtr PropertyStateCallback; extern _X_EXPORT int dixLookupProperty(PropertyPtr * /*result */ , WindowPtr /*pWin */ , Atom /*proprty */ , ClientPtr /*pClient */ , Mask /*access_mode */ ); extern _X_EXPORT int dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, Atom type, int format, int mode, unsigned long len, const void *value, Bool sendevent); extern _X_EXPORT int DeleteProperty(ClientPtr /*client */ , WindowPtr /*pWin */ , Atom /*propName */ ); extern _X_EXPORT void DeleteAllWindowProperties(WindowPtr /*pWin */ ); #endif /* PROPERTY_H */ xorg-server-21.1.16/include/propertyst.h0000644000175000017500000000546314757411105013672 /*********************************************************** 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. ******************************************************************/ #ifndef PROPERTYSTRUCT_H #define PROPERTYSTRUCT_H #include "misc.h" #include "property.h" #include "privates.h" /* * PROPERTY -- property element */ typedef struct _Property { struct _Property *next; ATOM propertyName; ATOM type; /* ignored by server */ uint32_t format; /* format of data for swapping - 8,16,32 */ uint32_t size; /* size of data in (format/8) bytes */ void *data; /* private to client */ PrivateRec *devPrivates; } PropertyRec; #endif /* PROPERTYSTRUCT_H */ xorg-server-21.1.16/include/ptrveloc.h0000644000175000017500000001260214757411105013266 /* * * Copyright © 2006-2011 Simon Thum simon dot thum at gmx dot de * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef POINTERVELOCITY_H #define POINTERVELOCITY_H #include /* constants for acceleration profiles */ #define AccelProfileNone -1 #define AccelProfileClassic 0 #define AccelProfileDeviceSpecific 1 #define AccelProfilePolynomial 2 #define AccelProfileSmoothLinear 3 #define AccelProfileSimple 4 #define AccelProfilePower 5 #define AccelProfileLinear 6 #define AccelProfileSmoothLimited 7 #define AccelProfileLAST AccelProfileSmoothLimited /* fwd */ struct _DeviceVelocityRec; /** * profile * returns actual acceleration depending on velocity, acceleration control,... */ typedef double (*PointerAccelerationProfileFunc) (DeviceIntPtr dev, struct _DeviceVelocityRec * vel, double velocity, double threshold, double accelCoeff); /** * a motion history, with just enough information to * calc mean velocity and decide which motion was along * a more or less straight line */ typedef struct _MotionTracker { double dx, dy; /* accumulated delta for each axis */ int time; /* time of creation */ int dir; /* initial direction bitfield */ } MotionTracker, *MotionTrackerPtr; /** * Contains all data needed to implement mouse ballistics */ typedef struct _DeviceVelocityRec { MotionTrackerPtr tracker; int num_tracker; int cur_tracker; /* current index */ double velocity; /* velocity as guessed by algorithm */ double last_velocity; /* previous velocity estimate */ double last_dx; /* last time-difference */ double last_dy; /* phase of last/current estimate */ double corr_mul; /* config: multiply this into velocity */ double const_acceleration; /* config: (recipr.) const deceleration */ double min_acceleration; /* config: minimum acceleration */ short reset_time; /* config: reset non-visible state after # ms */ short use_softening; /* config: use softening of mouse values */ double max_rel_diff; /* config: max. relative difference */ double max_diff; /* config: max. difference */ int initial_range; /* config: max. offset used as initial velocity */ Bool average_accel; /* config: average acceleration over velocity */ PointerAccelerationProfileFunc Profile; PointerAccelerationProfileFunc deviceSpecificProfile; void *profile_private; /* extended data, see SetAccelerationProfile() */ struct { /* to be able to query this information */ int profile_number; } statistics; } DeviceVelocityRec, *DeviceVelocityPtr; /** * contains the run-time data for the predictable scheme, that is, a * DeviceVelocityPtr and the property handlers. */ typedef struct _PredictableAccelSchemeRec { DeviceVelocityPtr vel; long *prop_handlers; int num_prop_handlers; } PredictableAccelSchemeRec, *PredictableAccelSchemePtr; extern _X_EXPORT void InitVelocityData(DeviceVelocityPtr vel); extern _X_EXPORT void InitTrackers(DeviceVelocityPtr vel, int ntracker); extern _X_EXPORT BOOL ProcessVelocityData2D(DeviceVelocityPtr vel, double dx, double dy, int time); extern _X_EXPORT double BasicComputeAcceleration(DeviceIntPtr dev, DeviceVelocityPtr vel, double velocity, double threshold, double acc); extern _X_EXPORT void FreeVelocityData(DeviceVelocityPtr vel); extern _X_EXPORT int SetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); extern _X_EXPORT DeviceVelocityPtr GetDevicePredictableAccelData(DeviceIntPtr dev); extern _X_EXPORT void SetDeviceSpecificAccelerationProfile(DeviceVelocityPtr vel, PointerAccelerationProfileFunc profile); extern _X_INTERNAL void AccelerationDefaultCleanup(DeviceIntPtr dev); extern _X_INTERNAL Bool InitPredictableAccelerationScheme(DeviceIntPtr dev, struct _ValuatorAccelerationRec *protoScheme); extern _X_INTERNAL void acceleratePointerPredictable(DeviceIntPtr dev, ValuatorMask *val, CARD32 evtime); extern _X_INTERNAL void acceleratePointerLightweight(DeviceIntPtr dev, ValuatorMask *val, CARD32 evtime); #endif /* POINTERVELOCITY_H */ xorg-server-21.1.16/include/region.h0000644000175000017500000000451614757411105012720 /*********************************************************** 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. ******************************************************************/ #ifndef REGION_H #define REGION_H #include "regionstr.h" #endif /* REGION_H */ xorg-server-21.1.16/include/regionstr.h0000644000175000017500000002517714757411105013457 /*********************************************************** 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. ******************************************************************/ #ifndef REGIONSTRUCT_H #define REGIONSTRUCT_H typedef struct pixman_region16 RegionRec, *RegionPtr; #include "miscstruct.h" /* Return values from RectIn() */ #define rgnOUT 0 #define rgnIN 1 #define rgnPART 2 #define NullRegion ((RegionPtr)0) /* * clip region */ typedef struct pixman_region16_data RegDataRec, *RegDataPtr; extern _X_EXPORT BoxRec RegionEmptyBox; extern _X_EXPORT RegDataRec RegionEmptyData; extern _X_EXPORT RegDataRec RegionBrokenData; static inline Bool RegionNil(RegionPtr reg) { return ((reg)->data && !(reg)->data->numRects); } /* not a region */ static inline Bool RegionNar(RegionPtr reg) { return ((reg)->data == &RegionBrokenData); } static inline int RegionNumRects(RegionPtr reg) { return ((reg)->data ? (reg)->data->numRects : 1); } static inline int RegionSize(RegionPtr reg) { return ((reg)->data ? (reg)->data->size : 0); } static inline BoxPtr RegionRects(RegionPtr reg) { return ((reg)->data ? (BoxPtr) ((reg)->data + 1) : &(reg)->extents); } static inline BoxPtr RegionBoxptr(RegionPtr reg) { return ((BoxPtr) ((reg)->data + 1)); } static inline BoxPtr RegionBox(RegionPtr reg, int i) { return (&RegionBoxptr(reg)[i]); } static inline BoxPtr RegionTop(RegionPtr reg) { return RegionBox(reg, (reg)->data->numRects); } static inline BoxPtr RegionEnd(RegionPtr reg) { return RegionBox(reg, (reg)->data->numRects - 1); } static inline size_t RegionSizeof(size_t n) { if (n < ((INT_MAX - sizeof(RegDataRec)) / sizeof(BoxRec))) return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))); else return 0; } static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size) { if ((_rect) != NULL) { (_pReg)->extents = *(_rect); (_pReg)->data = (RegDataPtr) NULL; } else { size_t rgnSize; (_pReg)->extents = RegionEmptyBox; if (((_size) > 1) && ((rgnSize = RegionSizeof(_size)) > 0) && (((_pReg)->data = (RegDataPtr) malloc(rgnSize)) != NULL)) { (_pReg)->data->size = (_size); (_pReg)->data->numRects = 0; } else (_pReg)->data = &RegionEmptyData; } } static inline Bool RegionInitBoxes(RegionPtr pReg, BoxPtr boxes, int nBoxes) { return pixman_region_init_rects(pReg, boxes, nBoxes); } static inline void RegionUninit(RegionPtr _pReg) { if ((_pReg)->data && (_pReg)->data->size) { free((_pReg)->data); (_pReg)->data = NULL; } } static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox) { (_pReg)->extents = *(_pBox); RegionUninit(_pReg); (_pReg)->data = (RegDataPtr) NULL; } static inline Bool RegionNotEmpty(RegionPtr _pReg) { return !RegionNil(_pReg); } static inline Bool RegionBroken(RegionPtr _pReg) { return RegionNar(_pReg); } static inline void RegionEmpty(RegionPtr _pReg) { RegionUninit(_pReg); (_pReg)->extents.x2 = (_pReg)->extents.x1; (_pReg)->extents.y2 = (_pReg)->extents.y1; (_pReg)->data = &RegionEmptyData; } static inline BoxPtr RegionExtents(RegionPtr _pReg) { return (&(_pReg)->extents); } static inline void RegionNull(RegionPtr _pReg) { (_pReg)->extents = RegionEmptyBox; (_pReg)->data = &RegionEmptyData; } extern _X_EXPORT void InitRegions(void); extern _X_EXPORT RegionPtr RegionCreate(BoxPtr /*rect */ , int /*size */ ); extern _X_EXPORT void RegionDestroy(RegionPtr /*pReg */ ); extern _X_EXPORT RegionPtr RegionDuplicate(RegionPtr /* pOld */); static inline Bool RegionCopy(RegionPtr dst, RegionPtr src) { return pixman_region_copy(dst, src); } static inline Bool RegionIntersect(RegionPtr newReg, /* destination Region */ RegionPtr reg1, RegionPtr reg2 /* source regions */ ) { return pixman_region_intersect(newReg, reg1, reg2); } static inline Bool RegionUnion(RegionPtr newReg, /* destination Region */ RegionPtr reg1, RegionPtr reg2 /* source regions */ ) { return pixman_region_union(newReg, reg1, reg2); } extern _X_EXPORT Bool RegionAppend(RegionPtr /*dstrgn */ , RegionPtr /*rgn */ ); extern _X_EXPORT Bool RegionValidate(RegionPtr /*badreg */ , Bool * /*pOverlap */ ); extern _X_EXPORT RegionPtr RegionFromRects(int /*nrects */ , xRectanglePtr /*prect */ , int /*ctype */ ); /*- *----------------------------------------------------------------------- * Subtract -- * Subtract regS from regM and leave the result in regD. * S stands for subtrahend, M for minuend and D for difference. * * Results: * TRUE if successful. * * Side Effects: * regD is overwritten. * *----------------------------------------------------------------------- */ static inline Bool RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) { return pixman_region_subtract(regD, regM, regS); } /*- *----------------------------------------------------------------------- * Inverse -- * Take a region and a box and return a region that is everything * in the box but not in the region. The careful reader will note * that this is the same as subtracting the region from the box... * * Results: * TRUE. * * Side Effects: * newReg is overwritten. * *----------------------------------------------------------------------- */ static inline Bool RegionInverse(RegionPtr newReg, /* Destination region */ RegionPtr reg1, /* Region to invert */ BoxPtr invRect /* Bounding box for inversion */ ) { return pixman_region_inverse(newReg, reg1, invRect); } static inline int RegionContainsRect(RegionPtr region, BoxPtr prect) { return pixman_region_contains_rectangle(region, prect); } /* TranslateRegion(pReg, x, y) translates in place */ static inline void RegionTranslate(RegionPtr pReg, int x, int y) { pixman_region_translate(pReg, x, y); } extern _X_EXPORT Bool RegionBreak(RegionPtr /*pReg */ ); static inline Bool RegionContainsPoint(RegionPtr pReg, int x, int y, BoxPtr box /* "return" value */ ) { return pixman_region_contains_point(pReg, x, y, box); } static inline Bool RegionEqual(RegionPtr reg1, RegionPtr reg2) { return pixman_region_equal(reg1, reg2); } extern _X_EXPORT Bool RegionRectAlloc(RegionPtr /*pRgn */ , int /*n */ ); #ifdef DEBUG extern _X_EXPORT Bool RegionIsValid(RegionPtr /*prgn */ ); #endif extern _X_EXPORT void RegionPrint(RegionPtr /*pReg */ ); #define INCLUDE_LEGACY_REGION_DEFINES #ifdef INCLUDE_LEGACY_REGION_DEFINES #define REGION_NIL RegionNil #define REGION_NAR RegionNar #define REGION_NUM_RECTS RegionNumRects #define REGION_SIZE RegionSize #define REGION_RECTS RegionRects #define REGION_BOXPTR RegionBoxptr #define REGION_BOX RegionBox #define REGION_TOP RegionTop #define REGION_END RegionEnd #define REGION_SZOF RegionSizeof #define BITMAP_TO_REGION BitmapToRegion #define REGION_CREATE(pScreen, r, s) RegionCreate(r,s) #define REGION_COPY(pScreen, d, r) RegionCopy(d, r) #define REGION_DESTROY(pScreen, r) RegionDestroy(r) #define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2) #define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2) #define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2) #define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b) #define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y) #define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b) #define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b) #define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2) #define REGION_APPEND(pScreen, d, r) RegionAppend(d, r) #define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o) #define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c) #define REGION_BREAK(pScreen, r) RegionBreak(r) #define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s) #define REGION_UNINIT(pScreen, r) RegionUninit(r) #define REGION_RESET(pScreen, r, b) RegionReset(r, b) #define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r) #define REGION_BROKEN(pScreen, r) RegionBroken(r) #define REGION_EMPTY(pScreen, r) RegionEmpty(r) #define REGION_EXTENTS(pScreen, r) RegionExtents(r) #define REGION_NULL(pScreen, r) RegionNull(r) #endif /* INCLUDE_LEGACY_REGION_DEFINES */ #endif /* REGIONSTRUCT_H */ xorg-server-21.1.16/include/registry.h0000644000175000017500000000355414757411105013306 /*********************************************************** 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 AUTHOR 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. ******************************************************************/ #ifndef DIX_REGISTRY_H #define DIX_REGISTRY_H /* * Result returned from any unsuccessful lookup */ #define XREGISTRY_UNKNOWN "" #include "resource.h" #include "extnsionst.h" #if defined(XSELINUX) || defined(RES) #define X_REGISTRY_RESOURCE 1 #endif #if defined(XSELINUX) || defined(XCSECURITY) || defined(XSERVER_DTRACE) #define X_REGISTRY_REQUEST 1 #endif /* Internal string registry - for auditing, debugging, security, etc. */ #ifdef X_REGISTRY_RESOURCE /* Functions used by the X-Resource extension */ extern _X_EXPORT void RegisterResourceName(RESTYPE type, const char *name); extern _X_EXPORT const char *LookupResourceName(RESTYPE rtype); #endif #ifdef X_REGISTRY_REQUEST extern _X_EXPORT void RegisterExtensionNames(ExtensionEntry * ext); /* * Lookup functions. The returned string must not be modified or freed. */ extern _X_EXPORT const char *LookupMajorName(int major); extern _X_EXPORT const char *LookupRequestName(int major, int minor); extern _X_EXPORT const char *LookupEventName(int event); extern _X_EXPORT const char *LookupErrorName(int error); #endif /* * Setup and teardown */ extern _X_EXPORT void dixResetRegistry(void); extern _X_EXPORT void dixFreeRegistry(void); extern _X_EXPORT void dixCloseRegistry(void); #endif /* DIX_REGISTRY_H */ xorg-server-21.1.16/include/resource.h0000644000175000017500000002467414757411105013273 /*********************************************************** Copyright 1987, 1989, 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, 1989 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. ******************************************************************/ #ifndef RESOURCE_H #define RESOURCE_H 1 #include "misc.h" #include "dixaccess.h" /***************************************************************** * STUFF FOR RESOURCES *****************************************************************/ /* classes for Resource routines */ typedef uint32_t RESTYPE; #define RC_VANILLA ((RESTYPE)0) #define RC_CACHED ((RESTYPE)1<<31) #define RC_DRAWABLE ((RESTYPE)1<<30) /* Use class RC_NEVERRETAIN for resources that should not be retained * regardless of the close down mode when the client dies. (A client's * event selections on objects that it doesn't own are good candidates.) * Extensions can use this too! */ #define RC_NEVERRETAIN ((RESTYPE)1<<29) #define RC_LASTPREDEF RC_NEVERRETAIN #define RC_ANY (~(RESTYPE)0) /* types for Resource routines */ #define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE) #define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE) #define RT_GC ((RESTYPE)3) #undef RT_FONT #undef RT_CURSOR #define RT_FONT ((RESTYPE)4) #define RT_CURSOR ((RESTYPE)5) #define RT_COLORMAP ((RESTYPE)6) #define RT_CMAPENTRY ((RESTYPE)7) #define RT_OTHERCLIENT ((RESTYPE)8|RC_NEVERRETAIN) #define RT_PASSIVEGRAB ((RESTYPE)9|RC_NEVERRETAIN) #define RT_LASTPREDEF ((RESTYPE)9) #define RT_NONE ((RESTYPE)0) extern _X_EXPORT unsigned int ResourceClientBits(void); /* bits and fields within a resource id */ #define RESOURCE_AND_CLIENT_COUNT 29 /* 29 bits for XIDs */ #define RESOURCE_CLIENT_BITS ResourceClientBits() /* client field offset */ #define CLIENTOFFSET (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS) /* resource field */ #define RESOURCE_ID_MASK ((1 << CLIENTOFFSET) - 1) /* client field */ #define RESOURCE_CLIENT_MASK (((1 << RESOURCE_CLIENT_BITS) - 1) << CLIENTOFFSET) /* extract the client mask from an XID */ #define CLIENT_BITS(id) ((id) & RESOURCE_CLIENT_MASK) /* extract the client id from an XID */ #define CLIENT_ID(id) ((int)(CLIENT_BITS(id) >> CLIENTOFFSET)) #define SERVER_BIT (Mask)0x40000000 /* use illegal bit */ #ifdef INVALID #undef INVALID /* needed on HP/UX */ #endif /* Invalid resource id */ #define INVALID (0) #define BAD_RESOURCE 0xe0000000 #define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) /* Resource state callback */ extern _X_EXPORT CallbackListPtr ResourceStateCallback; typedef enum { ResourceStateAdding, ResourceStateFreeing } ResourceState; typedef struct { ResourceState state; XID id; RESTYPE type; void *value; } ResourceStateInfoRec; typedef int (*DeleteType) (void *value, XID id); typedef void (*FindResType) (void *value, XID id, void *cdata); typedef void (*FindAllRes) (void *value, XID id, RESTYPE type, void *cdata); typedef Bool (*FindComplexResType) (void *value, XID id, void *cdata); /* Structure for estimating resource memory usage. Memory usage * consists of space allocated for the resource itself and of * references to other resources. Currently the most important use for * this structure is to estimate pixmap usage of different resources * more accurately. */ typedef struct { /* Size of resource itself. Zero if not implemented. */ unsigned long resourceSize; /* Size attributed to pixmap references from the resource. */ unsigned long pixmapRefSize; /* Number of references to this resource; typically 1 */ unsigned long refCnt; } ResourceSizeRec, *ResourceSizePtr; typedef void (*SizeType)(void *value, XID id, ResourceSizePtr size); extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType deleteFunc, const char *name); typedef void (*FindTypeSubResources)(void *value, FindAllRes func, void *cdata); extern _X_EXPORT SizeType GetResourceTypeSizeFunc( RESTYPE /*type*/); extern _X_EXPORT void SetResourceTypeFindSubResFunc( RESTYPE /*type*/, FindTypeSubResources /*findFunc*/); extern _X_EXPORT void SetResourceTypeSizeFunc( RESTYPE /*type*/, SizeType /*sizeFunc*/); extern _X_EXPORT void SetResourceTypeErrorValue( RESTYPE /*type*/, int /*errorValue*/); extern _X_EXPORT RESTYPE CreateNewResourceClass(void); extern _X_EXPORT Bool InitClientResources(ClientPtr /*client */ ); extern _X_EXPORT XID FakeClientID(int /*client */ ); /* Quartz support on Mac OS X uses the CarbonCore framework whose AddResource function conflicts here. */ #ifdef __APPLE__ #define AddResource Darwin_X_AddResource #endif extern _X_EXPORT Bool AddResource(XID id, RESTYPE type, void *value); extern _X_EXPORT void FreeResource(XID /*id */ , RESTYPE /*skipDeleteFuncType */ ); extern _X_EXPORT void FreeResourceByType(XID /*id */ , RESTYPE /*type */ , Bool /*skipFree */ ); extern _X_EXPORT Bool ChangeResourceValue(XID id, RESTYPE rtype, void *value); extern _X_EXPORT void FindClientResourcesByType(ClientPtr client, RESTYPE type, FindResType func, void *cdata); extern _X_EXPORT void FindAllClientResources(ClientPtr client, FindAllRes func, void *cdata); /** @brief Iterate through all subresources of a resource. @note The XID argument provided to the FindAllRes function may be 0 for subresources that don't have an XID */ extern _X_EXPORT void FindSubResources(void *resource, RESTYPE type, FindAllRes func, void *cdata); extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ ); extern _X_EXPORT void FreeClientResources(ClientPtr /*client */ ); extern _X_EXPORT void FreeAllResources(void); extern _X_EXPORT Bool LegalNewID(XID /*id */ , ClientPtr /*client */ ); extern _X_EXPORT void *LookupClientResourceComplex(ClientPtr client, RESTYPE type, FindComplexResType func, void *cdata); extern _X_EXPORT int dixLookupResourceByType(void **result, XID id, RESTYPE rtype, ClientPtr client, Mask access_mode); extern _X_EXPORT int dixLookupResourceByClass(void **result, XID id, RESTYPE rclass, ClientPtr client, Mask access_mode); extern _X_EXPORT void GetXIDRange(int /*client */ , Bool /*server */ , XID * /*minp */ , XID * /*maxp */ ); extern _X_EXPORT unsigned int GetXIDList(ClientPtr /*client */ , unsigned int /*count */ , XID * /*pids */ ); extern _X_EXPORT RESTYPE lastResourceType; extern _X_EXPORT RESTYPE TypeMask; /** @brief A hashing function to be used for hashing resource IDs @param id The resource ID to hash @param numBits The number of bits in the resulting hash. Must be >=0. @note This function is really only for handling INITHASHSIZE..MAXHASHSIZE bit hashes, but will handle any number of bits by either masking numBits lower bits of the ID or by providing at most MAXHASHSIZE hashes. */ extern _X_EXPORT int HashResourceID(XID id, unsigned int numBits); #endif /* RESOURCE_H */ xorg-server-21.1.16/include/rgb.h0000644000175000017500000000455614757411105012213 /*********************************************************** 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. ******************************************************************/ #ifndef RGB_H #define RGB_H typedef struct _RGB { unsigned short red, green, blue; } RGB; #endif /* RGB_H */ xorg-server-21.1.16/include/screenint.h0000644000175000017500000000634514757411105013431 /*********************************************************** 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. ******************************************************************/ #ifndef SCREENINT_H #define SCREENINT_H #include "misc.h" typedef struct _PixmapFormat *PixmapFormatPtr; typedef struct _Visual *VisualPtr; typedef struct _Depth *DepthPtr; typedef struct _Screen *ScreenPtr; typedef Bool (*ScreenInitProcPtr)(ScreenPtr pScreen, int argc, char **argv); extern _X_EXPORT int AddScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); extern _X_EXPORT int AddGPUScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen); extern _X_EXPORT void AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr newScreen); extern _X_EXPORT void DetachUnboundGPU(ScreenPtr unbound); extern _X_EXPORT void AttachOutputGPU(ScreenPtr pScreen, ScreenPtr newScreen); extern _X_EXPORT void DetachOutputGPU(ScreenPtr output); extern _X_EXPORT void AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen); extern _X_EXPORT void DetachOffloadGPU(ScreenPtr slave); typedef struct _ColormapRec *ColormapPtr; #endif /* SCREENINT_H */ xorg-server-21.1.16/include/scrnintstr.h0000644000175000017500000006526214757411105013653 /*********************************************************** 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. ******************************************************************/ #ifndef SCREENINTSTRUCT_H #define SCREENINTSTRUCT_H #include "screenint.h" #include "regionstr.h" #include "colormap.h" #include "cursor.h" #include "validate.h" #include #include "dix.h" #include "privates.h" #include typedef struct _PixmapFormat { unsigned char depth; unsigned char bitsPerPixel; unsigned char scanlinePad; } PixmapFormatRec; typedef struct _Visual { VisualID vid; short class; short bitsPerRGBValue; short ColormapEntries; short nplanes; /* = log2 (ColormapEntries). This does not * imply that the screen has this many planes. * it may have more or fewer */ unsigned long redMask, greenMask, blueMask; int offsetRed, offsetGreen, offsetBlue; } VisualRec; typedef struct _Depth { unsigned char depth; short numVids; VisualID *vids; /* block of visual ids for this depth */ } DepthRec; typedef struct _ScreenSaverStuff { WindowPtr pWindow; XID wid; char blanked; Bool (*ExternalScreenSaver) (ScreenPtr /*pScreen */ , int /*xstate */ , Bool /*force */ ); } ScreenSaverStuffRec; /* * There is a typedef for each screen function pointer so that code that * needs to declare a screen function pointer (e.g. in a screen private * or as a local variable) can easily do so and retain full type checking. */ typedef Bool (*CloseScreenProcPtr) (ScreenPtr /*pScreen */ ); typedef void (*QueryBestSizeProcPtr) (int /*class */ , unsigned short * /*pwidth */ , unsigned short * /*pheight */ , ScreenPtr /*pScreen */ ); typedef Bool (*SaveScreenProcPtr) (ScreenPtr /*pScreen */ , int /*on */ ); typedef void (*GetImageProcPtr) (DrawablePtr /*pDrawable */ , int /*sx */ , int /*sy */ , int /*w */ , int /*h */ , unsigned int /*format */ , unsigned long /*planeMask */ , char * /*pdstLine */ ); typedef void (*GetSpansProcPtr) (DrawablePtr /*pDrawable */ , int /*wMax */ , DDXPointPtr /*ppt */ , int * /*pwidth */ , int /*nspans */ , char * /*pdstStart */ ); typedef void (*SourceValidateProcPtr) (DrawablePtr /*pDrawable */ , int /*x */ , int /*y */ , int /*width */ , int /*height */ , unsigned int /*subWindowMode */ ); typedef Bool (*CreateWindowProcPtr) (WindowPtr /*pWindow */ ); typedef Bool (*DestroyWindowProcPtr) (WindowPtr /*pWindow */ ); typedef Bool (*PositionWindowProcPtr) (WindowPtr /*pWindow */ , int /*x */ , int /*y */ ); typedef Bool (*ChangeWindowAttributesProcPtr) (WindowPtr /*pWindow */ , unsigned long /*mask */ ); typedef Bool (*RealizeWindowProcPtr) (WindowPtr /*pWindow */ ); typedef Bool (*UnrealizeWindowProcPtr) (WindowPtr /*pWindow */ ); typedef void (*RestackWindowProcPtr) (WindowPtr /*pWindow */ , WindowPtr /*pOldNextSib */ ); typedef int (*ValidateTreeProcPtr) (WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ ); typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ ); typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ , RegionPtr /*prgn */); typedef void (*PaintWindowProcPtr) (WindowPtr /*pWindow*/, RegionPtr /*pRegion*/, int /*what*/); typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ , DDXPointRec /*ptOldOrg */ , RegionPtr /*prgnSrc */ ); typedef void (*ClearToBackgroundProcPtr) (WindowPtr /*pWindow */ , int /*x */ , int /*y */ , int /*w */ , int /*h */ , Bool /*generateExposures */ ); typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ , int /*dx */ , int /*dy */ ); /* pixmap will exist only for the duration of the current rendering operation */ #define CREATE_PIXMAP_USAGE_SCRATCH 1 /* pixmap will be the backing pixmap for a redirected window */ #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2 /* pixmap will contain a glyph */ #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3 /* pixmap will be shared */ #define CREATE_PIXMAP_USAGE_SHARED 4 typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ , int /*width */ , int /*height */ , int /*depth */ , unsigned /*usage_hint */ ); typedef Bool (*DestroyPixmapProcPtr) (PixmapPtr /*pPixmap */ ); typedef Bool (*RealizeFontProcPtr) (ScreenPtr /*pScreen */ , FontPtr /*pFont */ ); typedef Bool (*UnrealizeFontProcPtr) (ScreenPtr /*pScreen */ , FontPtr /*pFont */ ); typedef void (*ConstrainCursorProcPtr) (DeviceIntPtr /*pDev */ , ScreenPtr /*pScreen */ , BoxPtr /*pBox */ ); typedef void (*CursorLimitsProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , CursorPtr /*pCursor */ , BoxPtr /*pHotBox */ , BoxPtr /*pTopLeftBox */ ); typedef Bool (*DisplayCursorProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , CursorPtr /*pCursor */ ); typedef Bool (*RealizeCursorProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , CursorPtr /*pCursor */ ); typedef Bool (*UnrealizeCursorProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , CursorPtr /*pCursor */ ); typedef void (*RecolorCursorProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , CursorPtr /*pCursor */ , Bool /*displayed */ ); typedef Bool (*SetCursorPositionProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , int /*x */ , int /*y */ , Bool /*generateEvent */ ); typedef void (*CursorWarpedToProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , ClientPtr /*pClient */ , WindowPtr /*pWindow */ , SpritePtr /*pSprite */ , int /*x */ , int /*y */ ); typedef void (*CurserConfinedToProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , WindowPtr /*pWindow */ ); typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ ); typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ ); typedef void (*DestroyColormapProcPtr) (ColormapPtr /*pColormap */ ); typedef void (*InstallColormapProcPtr) (ColormapPtr /*pColormap */ ); typedef void (*UninstallColormapProcPtr) (ColormapPtr /*pColormap */ ); typedef int (*ListInstalledColormapsProcPtr) (ScreenPtr /*pScreen */ , XID * /*pmaps */ ); typedef void (*StoreColorsProcPtr) (ColormapPtr /*pColormap */ , int /*ndef */ , xColorItem * /*pdef */ ); typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ , unsigned short * /*pgreen */ , unsigned short * /*pblue */ , VisualPtr /*pVisual */ ); typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ ); typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen, void *timeout); /* result has three possible values: * < 0 - error * = 0 - timeout * > 0 - activity */ typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr pScreen, int result); typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ ); typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData); typedef PixmapPtr (*GetWindowPixmapProcPtr) (WindowPtr /*pWin */ ); typedef void (*SetWindowPixmapProcPtr) (WindowPtr /*pWin */ , PixmapPtr /*pPix */ ); typedef PixmapPtr (*GetScreenPixmapProcPtr) (ScreenPtr /*pScreen */ ); typedef void (*SetScreenPixmapProcPtr) (PixmapPtr /*pPix */ ); typedef void (*MarkWindowProcPtr) (WindowPtr /*pWin */ ); typedef Bool (*MarkOverlappedWindowsProcPtr) (WindowPtr /*parent */ , WindowPtr /*firstChild */ , WindowPtr * /*pLayerWin */ ); typedef int (*ConfigNotifyProcPtr) (WindowPtr /*pWin */ , int /*x */ , int /*y */ , int /*w */ , int /*h */ , int /*bw */ , WindowPtr /*pSib */ ); typedef void (*MoveWindowProcPtr) (WindowPtr /*pWin */ , int /*x */ , int /*y */ , WindowPtr /*pSib */ , VTKind /*kind */ ); typedef void (*ResizeWindowProcPtr) (WindowPtr /*pWin */ , int /*x */ , int /*y */ , unsigned int /*w */ , unsigned int /*h */ , WindowPtr /*pSib */ ); typedef WindowPtr (*GetLayerWindowProcPtr) (WindowPtr /*pWin */ ); typedef void (*HandleExposuresProcPtr) (WindowPtr /*pWin */ ); typedef void (*ReparentWindowProcPtr) (WindowPtr /*pWin */ , WindowPtr /*pPriorParent */ ); typedef void (*SetShapeProcPtr) (WindowPtr /*pWin */ , int /* kind */ ); typedef void (*ChangeBorderWidthProcPtr) (WindowPtr /*pWin */ , unsigned int /*width */ ); typedef void (*MarkUnrealizedWindowProcPtr) (WindowPtr /*pChild */ , WindowPtr /*pWin */ , Bool /*fromConfigure */ ); typedef Bool (*DeviceCursorInitializeProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScreen */ ); typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScreen */ ); typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int, int *, int *); typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **); typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *); #define HAS_SYNC_SHARED_PIXMAP 1 /* The SyncSharedPixmap hook has two purposes: * * 1. If the primary driver has it, the secondary driver can use it to * synchronize the shared pixmap contents with the screen pixmap. * 2. If the secondary driver has it, the primary driver can expect the secondary * driver to call the primary screen's SyncSharedPixmap hook, so the primary * driver doesn't have to synchronize the shared pixmap contents itself, * e.g. from the BlockHandler. * * A driver must only set the hook if it handles both cases correctly. * * The argument is the secondary screen's pixmap_dirty_list entry, the hook is * responsible for finding the corresponding entry in the primary screen's * pixmap_dirty_list. */ typedef void (*SyncSharedPixmapProcPtr)(PixmapDirtyUpdatePtr); typedef Bool (*StartPixmapTrackingProcPtr)(DrawablePtr, PixmapPtr, int x, int y, int dst_x, int dst_y, Rotation rotation); typedef Bool (*PresentSharedPixmapProcPtr)(PixmapPtr); typedef Bool (*RequestSharedPixmapNotifyDamageProcPtr)(PixmapPtr); typedef Bool (*StopPixmapTrackingProcPtr)(DrawablePtr, PixmapPtr); typedef Bool (*StopFlippingPixmapTrackingProcPtr)(DrawablePtr, PixmapPtr, PixmapPtr); typedef Bool (*SharedPixmapNotifyDamageProcPtr)(PixmapPtr); typedef Bool (*ReplaceScanoutPixmapProcPtr)(DrawablePtr, PixmapPtr, Bool); typedef WindowPtr (*XYToWindowProcPtr)(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); typedef int (*NameWindowPixmapProcPtr)(WindowPtr, PixmapPtr, CARD32); typedef void (*DPMSProcPtr)(ScreenPtr pScreen, int level); /* Wrapping Screen procedures There are a few modules in the X server which dynamically add and remove themselves from various screen procedure call chains. For example, the BlockHandler is dynamically modified by: * xf86Rotate * miSprite * composite * render (for animated cursors) Correctly manipulating this chain is complicated by the fact that the chain is constructed through a sequence of screen private structures, each holding the next screen->proc pointer. To add a module to a screen->proc chain is fairly simple; just save the current screen->proc value in the module screen private and store the module's function in the screen->proc location. Removing a screen proc is a bit trickier. It seems like all you need to do is set the screen->proc pointer back to the value saved in your screen private. However, if some other module has come along and wrapped on top of you, then the right place to store the previous screen->proc value is actually in the wrapping module's screen private structure(!). Of course, you have no idea what other module may have wrapped on top, nor could you poke inside its screen private in any case. To make this work, we restrict the unwrapping process to happen during the invocation of the screen proc itself, and then we require the screen proc to take some care when manipulating the screen proc functions pointers. The requirements are: 1) The screen proc must set the screen->proc pointer back to the value saved in its screen private before calling outside its module. 2a) If the screen proc wants to be remove itself from the chain, it must not manipulate screen->proc pointer again before returning. 2b) If the screen proc wants to remain in the chain, it must: 2b.1) Re-fetch the screen->proc pointer and store that in its screen private. This ensures that any changes to the chain will be preserved. 2b.2) Set screen->proc back to itself One key requirement here is that these steps must wrap not just any invocation of the nested screen->proc value, but must nest essentially any calls outside the current module. This ensures that other modules can reliably manipulate screen->proc wrapping using these same rules. For example, the animated cursor code in render has two macros, Wrap and Unwrap. #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) Unwrap takes the screen private (as), the screen (s) and the member name (elt), and restores screen->proc to that saved in the screen private. #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) Wrap takes the screen private (as), the screen (s), the member name (elt) and the wrapping function (func). It saves the current screen->proc value in the screen private, and then sets the screen->proc to the local wrapping function. Within each of these functions, there's a pretty simple pattern: Unwrap(as, pScreen, UnrealizeCursor); // Do local stuff, including possibly calling down through // pScreen->UnrealizeCursor Wrap(as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor); The wrapping block handler is a bit different; it does the Unwrap, the local operations, and then only re-Wraps if the hook is still required. Unwrap occurs at the top of each function, just after entry, and Wrap occurs at the bottom of each function, just before returning. */ typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; short x, y, width, height; short mmWidth, mmHeight; short numDepths; unsigned char rootDepth; DepthPtr allowedDepths; unsigned long rootVisual; unsigned long defColormap; short minInstalledCmaps, maxInstalledCmaps; char backingStoreSupport, saveUnderSupport; unsigned long whitePixel, blackPixel; GCPtr GCperDepth[MAXFORMATS + 1]; /* next field is a stipple to use as default in a GC. we don't build * default tiles of all depths because they are likely to be of a color * different from the default fg pixel, so we don't win anything by * building a standard one. */ PixmapPtr defaultStipple; void *devPrivate; short numVisuals; VisualPtr visuals; WindowPtr root; ScreenSaverStuffRec screensaver; DevPrivateSetRec screenSpecificPrivates[PRIVATE_LAST]; /* Random screen procedures */ CloseScreenProcPtr CloseScreen; QueryBestSizeProcPtr QueryBestSize; SaveScreenProcPtr SaveScreen; GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; SourceValidateProcPtr SourceValidate; /* Window Procedures */ CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; PositionWindowProcPtr PositionWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; ValidateTreeProcPtr ValidateTree; PostValidateTreeProcPtr PostValidateTree; WindowExposuresProcPtr WindowExposures; CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; RestackWindowProcPtr RestackWindow; PaintWindowProcPtr PaintWindow; /* Pixmap procedures */ CreatePixmapProcPtr CreatePixmap; DestroyPixmapProcPtr DestroyPixmap; /* Font procedures */ RealizeFontProcPtr RealizeFont; UnrealizeFontProcPtr UnrealizeFont; /* Cursor Procedures */ ConstrainCursorProcPtr ConstrainCursor; ConstrainCursorHarderProcPtr ConstrainCursorHarder; CursorLimitsProcPtr CursorLimits; DisplayCursorProcPtr DisplayCursor; RealizeCursorProcPtr RealizeCursor; UnrealizeCursorProcPtr UnrealizeCursor; RecolorCursorProcPtr RecolorCursor; SetCursorPositionProcPtr SetCursorPosition; CursorWarpedToProcPtr CursorWarpedTo; CurserConfinedToProcPtr CursorConfinedTo; /* GC procedures */ CreateGCProcPtr CreateGC; /* Colormap procedures */ CreateColormapProcPtr CreateColormap; DestroyColormapProcPtr DestroyColormap; InstallColormapProcPtr InstallColormap; UninstallColormapProcPtr UninstallColormap; ListInstalledColormapsProcPtr ListInstalledColormaps; StoreColorsProcPtr StoreColors; ResolveColorProcPtr ResolveColor; /* Region procedures */ BitmapToRegionProcPtr BitmapToRegion; /* os layer procedures */ ScreenBlockHandlerProcPtr BlockHandler; ScreenWakeupHandlerProcPtr WakeupHandler; /* anybody can get a piece of this array */ PrivateRec *devPrivates; CreateScreenResourcesProcPtr CreateScreenResources; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; GetWindowPixmapProcPtr GetWindowPixmap; SetWindowPixmapProcPtr SetWindowPixmap; GetScreenPixmapProcPtr GetScreenPixmap; SetScreenPixmapProcPtr SetScreenPixmap; NameWindowPixmapProcPtr NameWindowPixmap; PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */ unsigned int totalPixmapSize; MarkWindowProcPtr MarkWindow; MarkOverlappedWindowsProcPtr MarkOverlappedWindows; ConfigNotifyProcPtr ConfigNotify; MoveWindowProcPtr MoveWindow; ResizeWindowProcPtr ResizeWindow; GetLayerWindowProcPtr GetLayerWindow; HandleExposuresProcPtr HandleExposures; ReparentWindowProcPtr ReparentWindow; SetShapeProcPtr SetShape; ChangeBorderWidthProcPtr ChangeBorderWidth; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; /* Device cursor procedures */ DeviceCursorInitializeProcPtr DeviceCursorInitialize; DeviceCursorCleanupProcPtr DeviceCursorCleanup; /* set it in driver side if X server can copy the framebuffer content. * Meant to be used together with '-background none' option, avoiding * malicious users to steal framebuffer's content if that would be the * default */ Bool canDoBGNoneRoot; Bool isGPU; /* Info on this screen's secondarys (if any) */ struct xorg_list secondary_list; struct xorg_list secondary_head; int output_secondarys; /* Info for when this screen is a secondary */ ScreenPtr current_primary; Bool is_output_secondary; Bool is_offload_secondary; SharePixmapBackingProcPtr SharePixmapBacking; SetSharedPixmapBackingProcPtr SetSharedPixmapBacking; StartPixmapTrackingProcPtr StartPixmapTracking; StopPixmapTrackingProcPtr StopPixmapTracking; SyncSharedPixmapProcPtr SyncSharedPixmap; SharedPixmapNotifyDamageProcPtr SharedPixmapNotifyDamage; RequestSharedPixmapNotifyDamageProcPtr RequestSharedPixmapNotifyDamage; PresentSharedPixmapProcPtr PresentSharedPixmap; StopFlippingPixmapTrackingProcPtr StopFlippingPixmapTracking; struct xorg_list pixmap_dirty_list; ReplaceScanoutPixmapProcPtr ReplaceScanoutPixmap; XYToWindowProcPtr XYToWindow; DPMSProcPtr DPMS; } ScreenRec; static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) { return (*(_pScreen)->BitmapToRegion) (pPix); /* no mi version?! */ } typedef struct _ScreenInfo { int imageByteOrder; int bitmapScanlineUnit; int bitmapScanlinePad; int bitmapBitOrder; int numPixmapFormats; PixmapFormatRec formats[MAXFORMATS]; int numScreens; ScreenPtr screens[MAXSCREENS]; int numGPUScreens; ScreenPtr gpuscreens[MAXGPUSCREENS]; int x; /* origin */ int y; /* origin */ int width; /* total width of all screens together */ int height; /* total height of all screens together */ } ScreenInfo; extern _X_EXPORT ScreenInfo screenInfo; extern _X_EXPORT void InitOutput(ScreenInfo * /*pScreenInfo */ , int /*argc */ , char ** /*argv */ ); #endif /* SCREENINTSTRUCT_H */ xorg-server-21.1.16/include/selection.h0000644000175000017500000000652314757411105013422 /*********************************************************** 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. ******************************************************************/ #ifndef SELECTION_H #define SELECTION_H 1 #include "dixstruct.h" #include "privates.h" /* * Selection data structures */ typedef struct _Selection { Atom selection; TimeStamp lastTimeChanged; Window window; WindowPtr pWin; ClientPtr client; struct _Selection *next; PrivateRec *devPrivates; } Selection; /* * Selection API */ extern _X_EXPORT int dixLookupSelection(Selection ** result, Atom name, ClientPtr client, Mask access_mode); extern _X_EXPORT Selection *CurrentSelections; extern _X_EXPORT CallbackListPtr SelectionCallback; typedef enum { SelectionSetOwner, SelectionWindowDestroy, SelectionClientClose } SelectionCallbackKind; typedef struct { struct _Selection *selection; ClientPtr client; SelectionCallbackKind kind; } SelectionInfoRec; /* * Selection server internals */ extern _X_EXPORT void InitSelections(void); extern _X_EXPORT void DeleteWindowFromAnySelections(WindowPtr pWin); extern _X_EXPORT void DeleteClientFromAnySelections(ClientPtr client); #endif /* SELECTION_H */ xorg-server-21.1.16/include/servermd.h0000644000175000017500000001170414757411105013261 /*********************************************************** 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. ******************************************************************/ #ifndef SERVERMD_H #define SERVERMD_H 1 #if !defined(_DIX_CONFIG_H_) && !defined(_XORG_SERVER_H_) #error Drivers must include xorg-server.h before any other xserver headers #error xserver code must include dix-config.h before any other headers #endif #include /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */ #if X_BYTE_ORDER == X_LITTLE_ENDIAN #define IMAGE_BYTE_ORDER LSBFirst #define BITMAP_BIT_ORDER LSBFirst #elif X_BYTE_ORDER == X_BIG_ENDIAN #define IMAGE_BYTE_ORDER MSBFirst #define BITMAP_BIT_ORDER MSBFirst #else #error "Too weird to live." #endif #ifndef GLYPHPADBYTES #define GLYPHPADBYTES 4 #endif /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of heap used and the number of times the * ddx routine has to be called. */ #ifndef IMAGE_BUFSIZE #define IMAGE_BUFSIZE (64*1024) #endif /* pad scanline to a longword */ #ifndef BITMAP_SCANLINE_UNIT #define BITMAP_SCANLINE_UNIT 32 #endif #ifndef BITMAP_SCANLINE_PAD #define BITMAP_SCANLINE_PAD 32 #define LOG2_BITMAP_PAD 5 #define LOG2_BYTES_PER_SCANLINE_PAD 2 #endif #include /* * This returns the number of padding units, for depth d and width w. * For bitmaps this can be calculated with the macros above. * Other depths require either grovelling over the formats field of the * screenInfo or hardwired constants. */ typedef struct _PaddingInfo { int padRoundUp; /* pixels per pad unit - 1 */ int padPixelsLog2; /* log 2 (pixels per pad unit) */ int padBytesLog2; /* log 2 (bytes per pad unit) */ int notPower2; /* bitsPerPixel not a power of 2 */ int bytesPerPixel; /* only set when notPower2 is TRUE */ int bitsPerPixel; /* bits per pixel */ } PaddingInfo; extern _X_EXPORT PaddingInfo PixmapWidthPaddingInfo[]; /* The only portable way to get the bpp from the depth is to look it up */ #define BitsPerPixel(d) (PixmapWidthPaddingInfo[d].bitsPerPixel) #define PixmapWidthInPadUnits(w, d) \ (PixmapWidthPaddingInfo[d].notPower2 ? \ (((int)(w) * PixmapWidthPaddingInfo[d].bytesPerPixel + \ PixmapWidthPaddingInfo[d].bytesPerPixel) >> \ PixmapWidthPaddingInfo[d].padBytesLog2) : \ ((int)((w) + PixmapWidthPaddingInfo[d].padRoundUp) >> \ PixmapWidthPaddingInfo[d].padPixelsLog2)) /* * Return the number of bytes to which a scanline of the given * depth and width will be padded. */ #define PixmapBytePad(w, d) \ (PixmapWidthInPadUnits(w, d) << PixmapWidthPaddingInfo[d].padBytesLog2) #define BitmapBytePad(w) \ (((int)((w) + BITMAP_SCANLINE_PAD - 1) >> LOG2_BITMAP_PAD) << LOG2_BYTES_PER_SCANLINE_PAD) #endif /* SERVERMD_H */ xorg-server-21.1.16/include/validate.h0000644000175000017500000000275314757411105013227 /* Copyright 1989, 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. */ #ifndef VALIDATE_H #define VALIDATE_H #include "miscstruct.h" #include "regionstr.h" typedef enum { VTOther, VTStack, VTMove, VTUnmap, VTMap, VTBroken } VTKind; /* union _Validate is now device dependent; see mivalidate.h for an example */ typedef union _Validate *ValidatePtr; #define UnmapValData ((ValidatePtr)1) #endif /* VALIDATE_H */ xorg-server-21.1.16/include/displaymode.h0000644000175000017500000000776214757411105013755 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _DISMODEPROC_H_ #define _DISMODEPROC_H_ #include "scrnintstr.h" #define MAXCLOCKS 128 /* These are possible return values for xf86CheckMode() and ValidMode() */ typedef enum { MODE_OK = 0, /* Mode OK */ MODE_HSYNC, /* hsync out of range */ MODE_VSYNC, /* vsync out of range */ MODE_H_ILLEGAL, /* mode has illegal horizontal timings */ MODE_V_ILLEGAL, /* mode has illegal horizontal timings */ MODE_BAD_WIDTH, /* requires an unsupported linepitch */ MODE_NOMODE, /* no mode with a matching name */ MODE_NO_INTERLACE, /* interlaced mode not supported */ MODE_NO_DBLESCAN, /* doublescan mode not supported */ MODE_NO_VSCAN, /* multiscan mode not supported */ MODE_MEM, /* insufficient video memory */ MODE_VIRTUAL_X, /* mode width too large for specified virtual size */ MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */ MODE_MEM_VIRT, /* insufficient video memory given virtual size */ MODE_NOCLOCK, /* no fixed clock available */ MODE_CLOCK_HIGH, /* clock required is too high */ MODE_CLOCK_LOW, /* clock required is too low */ MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */ MODE_BAD_HVALUE, /* horizontal timing was out of range */ MODE_BAD_VVALUE, /* vertical timing was out of range */ MODE_BAD_VSCAN, /* VScan value out of range */ MODE_HSYNC_NARROW, /* horizontal sync too narrow */ MODE_HSYNC_WIDE, /* horizontal sync too wide */ MODE_HBLANK_NARROW, /* horizontal blanking too narrow */ MODE_HBLANK_WIDE, /* horizontal blanking too wide */ MODE_VSYNC_NARROW, /* vertical sync too narrow */ MODE_VSYNC_WIDE, /* vertical sync too wide */ MODE_VBLANK_NARROW, /* vertical blanking too narrow */ MODE_VBLANK_WIDE, /* vertical blanking too wide */ MODE_PANEL, /* exceeds panel dimensions */ MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */ MODE_ONE_WIDTH, /* only one width is supported */ MODE_ONE_HEIGHT, /* only one height is supported */ MODE_ONE_SIZE, /* only one resolution is supported */ MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */ MODE_BANDWIDTH, /* mode requires too much memory bandwidth */ MODE_BAD = -2, /* unspecified reason */ MODE_ERROR = -1 /* error condition */ } ModeStatus; /* Video mode */ typedef struct _DisplayModeRec { struct _DisplayModeRec *prev; struct _DisplayModeRec *next; const char *name; /* identifier for the mode */ ModeStatus status; int type; /* These are the values that the user sees/provides */ int Clock; /* pixel clock freq (kHz) */ int HDisplay; /* horizontal timing */ int HSyncStart; int HSyncEnd; int HTotal; int HSkew; int VDisplay; /* vertical timing */ int VSyncStart; int VSyncEnd; int VTotal; int VScan; int Flags; /* These are the values the hardware uses */ int ClockIndex; int SynthClock; /* Actual clock freq to * be programmed (kHz) */ int CrtcHDisplay; int CrtcHBlankStart; int CrtcHSyncStart; int CrtcHSyncEnd; int CrtcHBlankEnd; int CrtcHTotal; int CrtcHSkew; int CrtcVDisplay; int CrtcVBlankStart; int CrtcVSyncStart; int CrtcVSyncEnd; int CrtcVBlankEnd; int CrtcVTotal; Bool CrtcHAdjusted; Bool CrtcVAdjusted; int PrivSize; INT32 *Private; int PrivFlags; float HSync, VRefresh; } DisplayModeRec, *DisplayModePtr; #endif xorg-server-21.1.16/include/window.h0000644000175000017500000002307614757411105012746 /*********************************************************** 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. ******************************************************************/ #ifndef WINDOW_H #define WINDOW_H #include "misc.h" #include "region.h" #include "screenint.h" #include #define TOTALLY_OBSCURED 0 #define UNOBSCURED 1 #define OBSCURED 2 #define VisibilityNotViewable 3 /* return values for tree-walking callback procedures */ #define WT_STOPWALKING 0 #define WT_WALKCHILDREN 1 #define WT_DONTWALKCHILDREN 2 #define WT_NOMATCH 3 #define NullWindow ((WindowPtr) 0) /* Forward declaration, we can't include input.h here */ struct _DeviceIntRec; struct _Cursor; typedef struct _BackingStore *BackingStorePtr; typedef struct _Window *WindowPtr; enum RootClipMode { ROOT_CLIP_NONE = 0, /**< resize the root window to 0x0 */ ROOT_CLIP_FULL = 1, /**< resize the root window to fit screen */ ROOT_CLIP_INPUT_ONLY = 2, /**< as above, but no rendering to screen */ }; typedef int (*VisitWindowProcPtr) (WindowPtr pWin, void *data); extern _X_EXPORT int TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, void *data); extern _X_EXPORT int WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, void *data); extern _X_EXPORT Bool CreateRootWindow(ScreenPtr /*pScreen */ ); extern _X_EXPORT void InitRootWindow(WindowPtr /*pWin */ ); typedef WindowPtr (*RealChildHeadProc) (WindowPtr pWin); extern _X_EXPORT void RegisterRealChildHeadProc(RealChildHeadProc proc); extern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ ); extern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ , WindowPtr /*pParent */ , int /*x */ , int /*y */ , unsigned int /*w */ , unsigned int /*h */ , unsigned int /*bw */ , unsigned int /*class */ , Mask /*vmask */ , XID * /*vlist */ , int /*depth */ , ClientPtr /*client */ , VisualID /*visual */ , int * /*error */ ); extern _X_EXPORT int DeleteWindow(void *pWin, XID wid); extern _X_EXPORT int DestroySubwindows(WindowPtr /*pWin */ , ClientPtr /*client */ ); /* Quartz support on Mac OS X uses the HIToolbox framework whose ChangeWindowAttributes function conflicts here. */ #ifdef __APPLE__ #define ChangeWindowAttributes Darwin_X_ChangeWindowAttributes #endif extern _X_EXPORT int ChangeWindowAttributes(WindowPtr /*pWin */ , Mask /*vmask */ , XID * /*vlist */ , ClientPtr /*client */ ); extern _X_EXPORT int ChangeWindowDeviceCursor(WindowPtr /*pWin */ , struct _DeviceIntRec * /*pDev */ , struct _Cursor * /*pCursor */ ); extern _X_EXPORT struct _Cursor *WindowGetDeviceCursor(WindowPtr /*pWin */ , struct _DeviceIntRec * /*pDev */ ); /* Quartz support on Mac OS X uses the HIToolbox framework whose GetWindowAttributes function conflicts here. */ #ifdef __APPLE__ #define GetWindowAttributes(w,c,x) Darwin_X_GetWindowAttributes(w,c,x) extern void Darwin_X_GetWindowAttributes( #else extern _X_EXPORT void GetWindowAttributes( #endif WindowPtr /*pWin */ , ClientPtr /*client */ , xGetWindowAttributesReply * /* wa */ ); extern _X_EXPORT void GravityTranslate(int /*x */ , int /*y */ , int /*oldx */ , int /*oldy */ , int /*dw */ , int /*dh */ , unsigned /*gravity */ , int * /*destx */ , int * /*desty */ ); extern _X_EXPORT int ConfigureWindow(WindowPtr /*pWin */ , Mask /*mask */ , XID * /*vlist */ , ClientPtr /*client */ ); extern _X_EXPORT int CirculateWindow(WindowPtr /*pParent */ , int /*direction */ , ClientPtr /*client */ ); extern _X_EXPORT int ReparentWindow(WindowPtr /*pWin */ , WindowPtr /*pParent */ , int /*x */ , int /*y */ , ClientPtr /*client */ ); extern _X_EXPORT int MapWindow(WindowPtr /*pWin */ , ClientPtr /*client */ ); extern _X_EXPORT void MapSubwindows(WindowPtr /*pParent */ , ClientPtr /*client */ ); extern _X_EXPORT int UnmapWindow(WindowPtr /*pWin */ , Bool /*fromConfigure */ ); extern _X_EXPORT void UnmapSubwindows(WindowPtr /*pWin */ ); extern _X_EXPORT void HandleSaveSet(ClientPtr /*client */ ); extern _X_EXPORT Bool PointInWindowIsVisible(WindowPtr /*pWin */ , int /*x */ , int /*y */ ); extern _X_EXPORT RegionPtr NotClippedByChildren(WindowPtr /*pWin */ ); extern _X_EXPORT void SendVisibilityNotify(WindowPtr /*pWin */ ); extern _X_EXPORT int dixSaveScreens(ClientPtr client, int on, int mode); extern _X_EXPORT int SaveScreens(int on, int mode); extern _X_EXPORT WindowPtr FindWindowWithOptional(WindowPtr /*w */ ); extern _X_EXPORT void CheckWindowOptionalNeed(WindowPtr /*w */ ); extern _X_EXPORT Bool MakeWindowOptional(WindowPtr /*pWin */ ); extern _X_EXPORT WindowPtr MoveWindowInStack(WindowPtr /*pWin */ , WindowPtr /*pNextSib */ ); extern _X_EXPORT void SetWinSize(WindowPtr /*pWin */ ); extern _X_EXPORT void SetBorderSize(WindowPtr /*pWin */ ); extern _X_EXPORT void ResizeChildrenWinSize(WindowPtr /*pWin */ , int /*dx */ , int /*dy */ , int /*dw */ , int /*dh */ ); extern _X_EXPORT void SendShapeNotify(WindowPtr /* pWin */ , int /* which */); extern _X_EXPORT RegionPtr CreateBoundingShape(WindowPtr /* pWin */ ); extern _X_EXPORT RegionPtr CreateClipShape(WindowPtr /* pWin */ ); extern _X_EXPORT void SetRootClip(ScreenPtr pScreen, int enable); extern _X_EXPORT void PrintWindowTree(void); extern _X_EXPORT void PrintPassiveGrabs(void); extern _X_EXPORT VisualPtr WindowGetVisual(WindowPtr /*pWin*/); #endif /* WINDOW_H */ xorg-server-21.1.16/include/windowstr.h0000644000175000017500000002113414757411105013470 /*********************************************************** 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. ******************************************************************/ #ifndef WINDOWSTRUCT_H #define WINDOWSTRUCT_H #include "window.h" #include "pixmapstr.h" #include "regionstr.h" #include "cursor.h" #include "property.h" #include "resource.h" /* for ROOT_WINDOW_ID_BASE */ #include "dix.h" #include "privates.h" #include "miscstruct.h" #include #include "opaque.h" #define GuaranteeNothing 0 #define GuaranteeVisBack 1 #define SameBackground(as, a, bs, b) \ ((as) == (bs) && ((as) == None || \ (as) == ParentRelative || \ SamePixUnion(a,b,as == BackgroundPixel))) #define SameBorder(as, a, bs, b) \ EqualPixUnion(as, a, bs, b) /* used as NULL-terminated list */ typedef struct _DevCursorNode { CursorPtr cursor; DeviceIntPtr dev; struct _DevCursorNode *next; } DevCursNodeRec, *DevCursNodePtr, *DevCursorList; typedef struct _WindowOpt { CursorPtr cursor; /* default: window.cursorNone */ VisualID visual; /* default: same as parent */ Colormap colormap; /* default: same as parent */ Mask dontPropagateMask; /* default: window.dontPropagate */ Mask otherEventMasks; /* default: 0 */ struct _OtherClients *otherClients; /* default: NULL */ struct _GrabRec *passiveGrabs; /* default: NULL */ PropertyPtr userProps; /* default: NULL */ CARD32 backingBitPlanes; /* default: ~0L */ CARD32 backingPixel; /* default: 0 */ RegionPtr boundingShape; /* default: NULL */ RegionPtr clipShape; /* default: NULL */ RegionPtr inputShape; /* default: NULL */ struct _OtherInputMasks *inputMasks; /* default: NULL */ DevCursorList deviceCursors; /* default: NULL */ } WindowOptRec, *WindowOptPtr; #define BackgroundPixel 2L #define BackgroundPixmap 3L /* * The redirectDraw field can have one of three values: * * RedirectDrawNone * A normal window; painted into the same pixmap as the parent * and clipping parent and siblings to its geometry. These * windows get a clip list equal to the intersection of their * geometry with the parent geometry, minus the geometry * of overlapping None and Clipped siblings. * RedirectDrawAutomatic * A redirected window which clips parent and sibling drawing. * Contents for these windows are manage inside the server. * These windows get an internal clip list equal to their * geometry. * RedirectDrawManual * A redirected window which does not clip parent and sibling * drawing; the window must be represented within the parent * geometry by the client performing the redirection management. * Contents for these windows are managed outside the server. * These windows get an internal clip list equal to their * geometry. */ #define RedirectDrawNone 0 #define RedirectDrawAutomatic 1 #define RedirectDrawManual 2 typedef struct _Window { DrawableRec drawable; PrivateRec *devPrivates; WindowPtr parent; /* ancestor chain */ WindowPtr nextSib; /* next lower sibling */ WindowPtr prevSib; /* next higher sibling */ WindowPtr firstChild; /* top-most child */ WindowPtr lastChild; /* bottom-most child */ RegionRec clipList; /* clipping rectangle for output */ RegionRec borderClip; /* NotClippedByChildren + border */ union _Validate *valdata; RegionRec winSize; RegionRec borderSize; DDXPointRec origin; /* position relative to parent */ unsigned short borderWidth; unsigned short deliverableEvents; /* all masks from all clients */ Mask eventMask; /* mask from the creating client */ PixUnion background; PixUnion border; WindowOptPtr optional; unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */ unsigned borderIsPixel:1; unsigned cursorIsNone:1; /* else real cursor (might inherit) */ unsigned backingStore:2; unsigned saveUnder:1; unsigned bitGravity:4; unsigned winGravity:4; unsigned overrideRedirect:1; unsigned visibility:2; unsigned mapped:1; unsigned realized:1; /* ancestors are all mapped */ unsigned viewable:1; /* realized && InputOutput */ unsigned dontPropagate:3; /* index into DontPropagateMasks */ unsigned redirectDraw:2; /* COMPOSITE rendering redirect */ unsigned forcedBG:1; /* must have an opaque background */ unsigned unhittable:1; /* doesn't hit-test, for rootless */ #ifdef COMPOSITE unsigned damagedDescendants:1; /* some descendants are damaged */ unsigned inhibitBGPaint:1; /* paint the background? */ #endif } WindowRec; /* * Ok, a bunch of macros for accessing the optional record * fields (or filling the appropriate default value) */ extern _X_EXPORT Mask DontPropagateMasks[]; #define wTrackParent(w,field) ((w)->optional ? \ (w)->optional->field \ : FindWindowWithOptional(w)->optional->field) #define wUseDefault(w,field,def) ((w)->optional ? \ (w)->optional->field \ : def) #define wVisual(w) wTrackParent(w, visual) #define wCursor(w) ((w)->cursorIsNone ? None : wTrackParent(w, cursor)) #define wColormap(w) ((w)->drawable.class == InputOnly ? None : wTrackParent(w, colormap)) #define wDontPropagateMask(w) wUseDefault(w, dontPropagateMask, DontPropagateMasks[(w)->dontPropagate]) #define wOtherEventMasks(w) wUseDefault(w, otherEventMasks, 0) #define wOtherClients(w) wUseDefault(w, otherClients, NULL) #define wOtherInputMasks(w) wUseDefault(w, inputMasks, NULL) #define wPassiveGrabs(w) wUseDefault(w, passiveGrabs, NULL) #define wUserProps(w) wUseDefault(w, userProps, NULL) #define wBackingBitPlanes(w) wUseDefault(w, backingBitPlanes, ~0L) #define wBackingPixel(w) wUseDefault(w, backingPixel, 0) #define wBoundingShape(w) wUseDefault(w, boundingShape, NULL) #define wClipShape(w) wUseDefault(w, clipShape, NULL) #define wInputShape(w) wUseDefault(w, inputShape, NULL) #define wClient(w) (clients[CLIENT_ID((w)->drawable.id)]) #define wBorderWidth(w) ((int) (w)->borderWidth) /* true when w needs a border drawn. */ #define HasBorder(w) ((w)->borderWidth || wClipShape(w)) typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr; #define SCREEN_IS_BLANKED 0 #define SCREEN_ISNT_SAVED 1 #define SCREEN_IS_TILED 2 #define SCREEN_IS_BLACK 3 #define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow) extern _X_EXPORT int screenIsSaved; #endif /* WINDOWSTRUCT_H */ xorg-server-21.1.16/include/xkbfile.h0000644000175000017500000002407114757411105013057 /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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. ********************************************************/ #ifndef _XKBFILE_H_ #define _XKBFILE_H_ 1 #include "xkbstr.h" /***====================================================================***/ #define XkbXKMFile 0 #define XkbCFile 1 #define XkbXKBFile 2 #define XkbMessage 3 #define XkbMapDefined (1<<0) #define XkbStateDefined (1<<1) typedef void (*XkbFileAddOnFunc) (FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , int /* fileSection */ , void * /* priv */ ); /***====================================================================***/ #define _XkbSuccess 0 #define _XkbErrMissingNames 1 #define _XkbErrMissingTypes 2 #define _XkbErrMissingReqTypes 3 #define _XkbErrMissingSymbols 4 #define _XkbErrMissingVMods 5 #define _XkbErrMissingIndicators 6 #define _XkbErrMissingCompatMap 7 #define _XkbErrMissingSymInterps 8 #define _XkbErrMissingGeometry 9 #define _XkbErrIllegalDoodad 10 #define _XkbErrIllegalTOCType 11 #define _XkbErrIllegalContents 12 #define _XkbErrEmptyFile 13 #define _XkbErrFileNotFound 14 #define _XkbErrFileCannotOpen 15 #define _XkbErrBadValue 16 #define _XkbErrBadMatch 17 #define _XkbErrBadTypeName 18 #define _XkbErrBadTypeWidth 19 #define _XkbErrBadFileType 20 #define _XkbErrBadFileVersion 21 #define _XkbErrBadFileFormat 22 #define _XkbErrBadAlloc 23 #define _XkbErrBadLength 24 #define _XkbErrXReqFailure 25 #define _XkbErrBadImplementation 26 /***====================================================================***/ _XFUNCPROTOBEGIN extern _X_EXPORT char *XkbIndentText(unsigned /* size */ ); extern _X_EXPORT char *XkbAtomText(Atom /* atm */ , unsigned /* format */ ); extern _X_EXPORT char *XkbKeysymText(KeySym /* sym */ , unsigned /* format */ ); extern _X_EXPORT char *XkbStringText(char * /* str */ , unsigned /* format */ ); extern _X_EXPORT char *XkbKeyNameText(char * /* name */ , unsigned /* format */ ); extern _X_EXPORT char *XkbModIndexText(unsigned /* ndx */ , unsigned /* format */ ); extern _X_EXPORT char *XkbModMaskText(unsigned /* mask */ , unsigned /* format */ ); extern _X_EXPORT char *XkbVModIndexText(XkbDescPtr /* xkb */ , unsigned /* ndx */ , unsigned /* format */ ); extern _X_EXPORT char *XkbVModMaskText(XkbDescPtr /* xkb */ , unsigned /* modMask */ , unsigned /* mask */ , unsigned /* format */ ); extern _X_EXPORT char *XkbConfigText(unsigned /* config */ , unsigned /* format */ ); extern _X_EXPORT const char *XkbSIMatchText(unsigned /* type */ , unsigned /* format */ ); extern _X_EXPORT char *XkbIMWhichStateMaskText(unsigned /* use_which */ , unsigned /* format */ ); extern _X_EXPORT char *XkbControlsMaskText(unsigned /* ctrls */ , unsigned /* format */ ); extern _X_EXPORT char *XkbGeomFPText(int /* val */ , unsigned /* format */ ); extern _X_EXPORT char *XkbDoodadTypeText(unsigned /* type */ , unsigned /* format */ ); extern _X_EXPORT const char *XkbActionTypeText(unsigned /* type */ , unsigned /* format */ ); extern _X_EXPORT char *XkbActionText(XkbDescPtr /* xkb */ , XkbAction * /* action */ , unsigned /* format */ ); extern _X_EXPORT char *XkbBehaviorText(XkbDescPtr /* xkb */ , XkbBehavior * /* behavior */ , unsigned /* format */ ); /***====================================================================***/ #define _XkbKSLower (1<<0) #define _XkbKSUpper (1<<1) #define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower) #define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper) #define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal)) #define XkbKSIsDeadKey(k) \ (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) extern _X_EXPORT unsigned _XkbKSCheckCase(KeySym /* sym */ ); extern _X_EXPORT int XkbFindKeycodeByName(XkbDescPtr /* xkb */ , char * /* name */ , Bool /* use_aliases */ ); /***====================================================================***/ extern _X_EXPORT Atom XkbInternAtom(char * /* name */ , Bool /* onlyIfExists */ ); /***====================================================================***/ #ifdef _XKBGEOM_H_ #define XkbDW_Unknown 0 #define XkbDW_Doodad 1 #define XkbDW_Section 2 typedef struct _XkbDrawable { int type; int priority; union { XkbDoodadPtr doodad; XkbSectionPtr section; } u; struct _XkbDrawable *next; } XkbDrawableRec, *XkbDrawablePtr; #endif /***====================================================================***/ extern _X_EXPORT unsigned XkbConvertGetByNameComponents(Bool /* toXkm */ , unsigned /* orig */ ); extern _X_EXPORT Bool XkbNameMatchesPattern(char * /* name */ , char * /* pattern */ ); /***====================================================================***/ extern _X_EXPORT Bool XkbWriteXKBKeycodes(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , XkbFileAddOnFunc /* addOn */ , void * /* priv */ ); extern _X_EXPORT Bool XkbWriteXKBKeyTypes(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , XkbFileAddOnFunc /* addOn */ , void * /* priv */ ); extern _X_EXPORT Bool XkbWriteXKBCompatMap(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , XkbFileAddOnFunc /* addOn */ , void * /* priv */ ); extern _X_EXPORT Bool XkbWriteXKBSymbols(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , XkbFileAddOnFunc /* addOn */ , void * /* priv */ ); extern _X_EXPORT Bool XkbWriteXKBGeometry(FILE * /* file */ , XkbDescPtr /* result */ , Bool /* topLevel */ , Bool /* showImplicit */ , XkbFileAddOnFunc /* addOn */ , void * /* priv */ ); extern _X_EXPORT Bool XkbWriteXKBKeymapForNames(FILE * /* file */ , XkbComponentNamesPtr /* names */ , XkbDescPtr /* xkb */ , unsigned /* want */ , unsigned /* need */ ); /***====================================================================***/ extern _X_EXPORT Bool XkmProbe(FILE * /* file */ ); extern _X_EXPORT unsigned XkmReadFile(FILE * /* file */ , unsigned /* need */ , unsigned /* want */ , XkbDescPtr * /* result */ ); _XFUNCPROTOEND #endif /* _XKBFILE_H_ */ xorg-server-21.1.16/include/xkbsrv.h0000644000175000017500000010450114757411105012747 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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. ********************************************************/ #ifndef _XKBSRV_H_ #define _XKBSRV_H_ #define XkbAllocClientMap SrvXkbAllocClientMap #define XkbAllocServerMap SrvXkbAllocServerMap #define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey #define XkbCopyKeyTypes SrvXkbCopyKeyTypes #define XkbFreeClientMap SrvXkbFreeClientMap #define XkbFreeServerMap SrvXkbFreeServerMap #define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols #define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey #define XkbResizeKeyActions SrvXkbResizeKeyActions #define XkbResizeKeySyms SrvXkbResizeKeySyms #define XkbResizeKeyType SrvXkbResizeKeyType #define XkbAllocCompatMap SrvXkbAllocCompatMap #define XkbAllocControls SrvXkbAllocControls #define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps #define XkbAllocKeyboard SrvXkbAllocKeyboard #define XkbAllocNames SrvXkbAllocNames #define XkbFreeCompatMap SrvXkbFreeCompatMap #define XkbFreeKeyboard SrvXkbFreeKeyboard #define XkbFreeNames SrvXkbFreeNames #define XkbLatchModifiers SrvXkbLatchModifiers #define XkbLatchGroup SrvXkbLatchGroup #define XkbVirtualModsToReal SrvXkbVirtualModsToReal #define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange #define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges #include #include "xkbstr.h" #include "xkbrules.h" #include "inputstr.h" #include "events.h" typedef struct _XkbInterest { DeviceIntPtr dev; ClientPtr client; XID resource; struct _XkbInterest *next; CARD16 extDevNotifyMask; CARD16 stateNotifyMask; CARD16 namesNotifyMask; CARD32 ctrlsNotifyMask; CARD8 compatNotifyMask; BOOL bellNotifyMask; BOOL actionMessageMask; CARD16 accessXNotifyMask; CARD32 iStateNotifyMask; CARD32 iMapNotifyMask; CARD16 altSymsNotifyMask; CARD32 autoCtrls; CARD32 autoCtrlValues; } XkbInterestRec, *XkbInterestPtr; typedef struct _XkbRadioGroup { CARD8 flags; CARD8 nMembers; CARD8 dfltDown; CARD8 currentDown; CARD8 members[XkbRGMaxMembers]; } XkbRadioGroupRec, *XkbRadioGroupPtr; typedef struct _XkbEventCause { CARD8 kc; CARD8 event; CARD8 mjr; CARD8 mnr; ClientPtr client; } XkbEventCauseRec, *XkbEventCausePtr; #define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\ (c)->mjr= (c)->mnr= 0; \ (c)->client= NULL; } #define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\ (c)->mjr= (j),(c)->mnr= (n);\ (c)->client= (cl); } #define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl) #define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl) #define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0) #define _OFF_TIMER 0 #define _KRG_WARN_TIMER 1 #define _KRG_TIMER 2 #define _SK_TIMEOUT_TIMER 3 #define _ALL_TIMEOUT_TIMER 4 #define _BEEP_NONE 0 #define _BEEP_FEATURE_ON 1 #define _BEEP_FEATURE_OFF 2 #define _BEEP_FEATURE_CHANGE 3 #define _BEEP_SLOW_WARN 4 #define _BEEP_SLOW_PRESS 5 #define _BEEP_SLOW_ACCEPT 6 #define _BEEP_SLOW_REJECT 7 #define _BEEP_SLOW_RELEASE 8 #define _BEEP_STICKY_LATCH 9 #define _BEEP_STICKY_LOCK 10 #define _BEEP_STICKY_UNLOCK 11 #define _BEEP_LED_ON 12 #define _BEEP_LED_OFF 13 #define _BEEP_LED_CHANGE 14 #define _BEEP_BOUNCE_REJECT 15 typedef struct _XkbFilter { CARD16 keycode; CARD8 what; CARD8 active; CARD8 filterOthers; CARD32 priv; XkbAction upAction; int (*filter) (struct _XkbSrvInfo * /* xkbi */ , struct _XkbFilter * /* filter */ , unsigned /* keycode */ , XkbAction * /* action */ ); struct _XkbFilter *next; } XkbFilterRec, *XkbFilterPtr; typedef Bool (*XkbSrvCheckRepeatPtr) (DeviceIntPtr dev, struct _XkbSrvInfo * /* xkbi */ , unsigned /* keycode */); typedef struct _XkbSrvInfo { XkbStateRec prev_state; XkbStateRec state; XkbDescPtr desc; DeviceIntPtr device; KbdCtrlProcPtr kbdProc; XkbRadioGroupPtr radioGroups; CARD8 nRadioGroups; CARD8 clearMods; CARD8 setMods; INT16 groupChange; CARD16 dfltPtrDelta; double mouseKeysCurve; double mouseKeysCurveFactor; INT16 mouseKeysDX; INT16 mouseKeysDY; CARD8 mouseKeysFlags; Bool mouseKeysAccel; CARD8 mouseKeysCounter; CARD8 lockedPtrButtons; CARD8 shiftKeyCount; KeyCode mouseKey; KeyCode inactiveKey; KeyCode slowKey; KeyCode slowKeyEnableKey; KeyCode repeatKey; CARD8 krgTimerActive; CARD8 beepType; CARD8 beepCount; CARD32 flags; CARD32 lastPtrEventTime; CARD32 lastShiftEventTime; OsTimerPtr beepTimer; OsTimerPtr mouseKeyTimer; OsTimerPtr slowKeysTimer; OsTimerPtr bounceKeysTimer; OsTimerPtr repeatKeyTimer; OsTimerPtr krgTimer; int szFilters; XkbFilterPtr filters; XkbSrvCheckRepeatPtr checkRepeat; char overlay_perkey_state[256/8]; /* bitfield */ } XkbSrvInfoRec, *XkbSrvInfoPtr; #define XkbSLI_IsDefault (1L<<0) #define XkbSLI_HasOwnState (1L<<1) typedef struct _XkbSrvLedInfo { CARD16 flags; CARD16 class; CARD16 id; union { KbdFeedbackPtr kf; LedFeedbackPtr lf; } fb; CARD32 physIndicators; CARD32 autoState; CARD32 explicitState; CARD32 effectiveState; CARD32 mapsPresent; CARD32 namesPresent; XkbIndicatorMapPtr maps; Atom *names; CARD32 usesBase; CARD32 usesLatched; CARD32 usesLocked; CARD32 usesEffective; CARD32 usesCompat; CARD32 usesControls; CARD32 usedComponents; } XkbSrvLedInfoRec, *XkbSrvLedInfoPtr; /* * Settings for xkbClientFlags field (used by DIX) * These flags _must_ not overlap with XkbPCF_* */ #define _XkbClientInitialized (1<<7) #define _XkbClientIsAncient (1<<6) #define _XkbWantsDetectableAutoRepeat(c)\ ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask) /* * Settings for flags field */ #define _XkbStateNotifyInProgress (1<<0) typedef struct { ProcessInputProc processInputProc; /* If processInputProc is set to something different than realInputProc, * UNWRAP and COND_WRAP will not touch processInputProc and update only * realInputProc. This ensures that * processInputProc == (frozen ? EnqueueEvent : realInputProc) * * WRAP_PROCESS_INPUT_PROC should only be called during initialization, * since it may destroy this invariant. */ ProcessInputProc realInputProc; DeviceUnwrapProc unwrapProc; } xkbDeviceInfoRec, *xkbDeviceInfoPtr; #define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; #define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ if (device->public.processInputProc == device->public.realInputProc)\ device->public.processInputProc = proc; \ oldprocs->processInputProc = \ oldprocs->realInputProc = device->public.realInputProc; \ device->public.realInputProc = proc; \ oldprocs->unwrapProc = device->unwrapProc; \ device->unwrapProc = unwrapproc; #define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs, backupproc) \ backupproc = device->public.realInputProc; \ if (device->public.processInputProc == device->public.realInputProc)\ device->public.processInputProc = oldprocs->realInputProc; \ device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec; #define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec) #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey)) extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, void *); /***====================================================================***/ /***====================================================================***/ #define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask) #define XkbAllFilteredEventsMask \ (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask) /***====================================================================***/ extern _X_EXPORT int XkbReqCode; extern _X_EXPORT int XkbEventBase; extern _X_EXPORT int XkbKeyboardErrorCode; extern _X_EXPORT const char *XkbBaseDirectory; extern _X_EXPORT const char *XkbBinDirectory; extern _X_EXPORT CARD32 xkbDebugFlags; #define _XkbLibError(c,l,d) /* Epoch fail */ /* "a" is a "unique" numeric identifier that just defines which error * code statement it is. _XkbErrCode2(4, foo) means "this is the 4th error * statement in this function". lovely. */ #define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) #define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) #define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) #define Status int extern _X_EXPORT void XkbUseMsg(void ); extern _X_EXPORT int XkbProcessArguments(int /* argc */ , char ** /* argv */ , int /* i */ ); extern _X_EXPORT Bool XkbInitPrivates(void); extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); extern _X_EXPORT void XkbFreeCompatMap(XkbDescPtr /* xkb */ , unsigned int /* which */ , Bool /* freeMap */ ); extern _X_EXPORT void XkbFreeNames(XkbDescPtr /* xkb */ , unsigned int /* which */ , Bool /* freeMap */ ); extern _X_EXPORT int _XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err); extern _X_EXPORT int _XkbLookupKeyboard(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err); extern _X_EXPORT int _XkbLookupBellDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err); extern _X_EXPORT int _XkbLookupLedDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err); extern _X_EXPORT int _XkbLookupButtonDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err); extern _X_EXPORT XkbDescPtr XkbAllocKeyboard(void ); extern _X_EXPORT Status XkbAllocClientMap(XkbDescPtr /* xkb */ , unsigned int /* which */ , unsigned int /* nTypes */ ); extern _X_EXPORT Status XkbAllocServerMap(XkbDescPtr /* xkb */ , unsigned int /* which */ , unsigned int /* nNewActions */ ); extern _X_EXPORT void XkbFreeClientMap(XkbDescPtr /* xkb */ , unsigned int /* what */ , Bool /* freeMap */ ); extern _X_EXPORT void XkbFreeServerMap(XkbDescPtr /* xkb */ , unsigned int /* what */ , Bool /* freeMap */ ); extern _X_EXPORT Status XkbAllocIndicatorMaps(XkbDescPtr /* xkb */ ); extern _X_EXPORT Status XkbAllocCompatMap(XkbDescPtr /* xkb */ , unsigned int /* which */ , unsigned int /* nInterpret */ ); extern _X_EXPORT Status XkbAllocNames(XkbDescPtr /* xkb */ , unsigned int /* which */ , int /* nTotalRG */ , int /* nTotalAliases */ ); extern _X_EXPORT Status XkbAllocControls(XkbDescPtr /* xkb */ , unsigned int /* which */ ); extern _X_EXPORT Status XkbCopyKeyTypes(XkbKeyTypePtr /* from */ , XkbKeyTypePtr /* into */ , int /* num_types */ ); extern _X_EXPORT Status XkbResizeKeyType(XkbDescPtr /* xkb */ , int /* type_ndx */ , int /* map_count */ , Bool /* want_preserve */ , int /* new_num_lvls */ ); extern _X_EXPORT void XkbFreeKeyboard(XkbDescPtr /* xkb */ , unsigned int /* which */ , Bool /* freeDesc */ ); extern _X_EXPORT void XkbFreeComponentNames(XkbComponentNamesPtr /* names */ , Bool /* freeNames */ ); extern _X_EXPORT void XkbSetActionKeyMods(XkbDescPtr /* xkb */ , XkbAction * /* act */ , unsigned int /* mods */ ); extern _X_EXPORT unsigned int XkbMaskForVMask(XkbDescPtr /* xkb */ , unsigned int /* vmask */ ); extern _X_EXPORT Bool XkbVirtualModsToReal(XkbDescPtr /* xkb */ , unsigned int /* virtua_mask */ , unsigned int * /* mask_rtrn */ ); extern _X_EXPORT unsigned int XkbAdjustGroup(int /* group */ , XkbControlsPtr /* ctrls */ ); extern _X_EXPORT KeySym *XkbResizeKeySyms(XkbDescPtr /* xkb */ , int /* key */ , int /* needed */ ); extern _X_EXPORT XkbAction *XkbResizeKeyActions(XkbDescPtr /* xkb */ , int /* key */ , int /* needed */ ); extern _X_EXPORT void XkbUpdateKeyTypesFromCore(DeviceIntPtr /* pXDev */ , KeySymsPtr /* syms */ , KeyCode /* first */ , CARD8 /* num */ , XkbChangesPtr /* pChanges */ ); extern _X_EXPORT void XkbUpdateDescActions(XkbDescPtr /* xkb */ , KeyCode /* first */ , CARD8 /* num */ , XkbChangesPtr /* changes */ ); extern _X_EXPORT void XkbUpdateActions(DeviceIntPtr /* pXDev */ , KeyCode /* first */ , CARD8 /* num */ , XkbChangesPtr /* pChanges */ , unsigned int * /* needChecksRtrn */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT KeySymsPtr XkbGetCoreMap(DeviceIntPtr /* keybd */ ); extern _X_EXPORT void XkbApplyMappingChange(DeviceIntPtr /* pXDev */ , KeySymsPtr /* map */ , KeyCode /* firstKey */ , CARD8 /* num */ , CARD8 * /* modmap */ , ClientPtr /* client */ ); extern _X_EXPORT void XkbSetIndicators(DeviceIntPtr /* pXDev */ , CARD32 /* affect */ , CARD32 /* values */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbUpdateIndicators(DeviceIntPtr /* keybd */ , CARD32 /* changed */ , Bool /* check_edevs */ , XkbChangesPtr /* pChanges */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbUpdateAllDeviceIndicators(XkbChangesPtr /* changes */, XkbEventCausePtr /* cause */ ); extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr /* dev */ , KbdFeedbackPtr /* kf */ , LedFeedbackPtr /* lf */ , unsigned int /* needed_parts */ ); extern _X_EXPORT XkbSrvLedInfoPtr XkbCopySrvLedInfo(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* src */ , KbdFeedbackPtr /* kf */ , LedFeedbackPtr /* lf */ ); extern _X_EXPORT XkbSrvLedInfoPtr XkbFindSrvLedInfo(DeviceIntPtr /* dev */ , unsigned int /* class */ , unsigned int /* id */ , unsigned int /* needed_parts */ ); extern _X_EXPORT void XkbApplyLedNameChanges(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* sli */ , unsigned int /* changed_names */ , xkbExtensionDeviceNotify * /* ed */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbApplyLedMapChanges(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* sli */ , unsigned int /* changed_maps */ , xkbExtensionDeviceNotify * /* ed */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbApplyLedStateChanges(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* sli */ , unsigned int /* changed_leds */ , xkbExtensionDeviceNotify * /* ed */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbFlushLedEvents(DeviceIntPtr /* dev */ , DeviceIntPtr /* kbd */ , XkbSrvLedInfoPtr /* sli */ , xkbExtensionDeviceNotify * /* ed */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT unsigned int XkbIndicatorsToUpdate(DeviceIntPtr /* dev */ , unsigned long /* state_changes */ , Bool /* enabled_ctrl_changes */ ); extern _X_EXPORT void XkbComputeDerivedState(XkbSrvInfoPtr /* xkbi */ ); extern _X_EXPORT void XkbCheckSecondaryEffects(XkbSrvInfoPtr /* xkbi */ , unsigned int /* which */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbCheckIndicatorMaps(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* sli */ , unsigned int /* which */ ); extern _X_EXPORT unsigned int XkbStateChangedFlags(XkbStatePtr /* old */ , XkbStatePtr /* new */ ); extern _X_EXPORT void XkbSendStateNotify(DeviceIntPtr /* kbd */ , xkbStateNotify * /* pSN */ ); extern _X_EXPORT void XkbSendMapNotify(DeviceIntPtr /* kbd */ , xkbMapNotify * /* ev */ ); extern _X_EXPORT int XkbComputeControlsNotify(DeviceIntPtr /* kbd */ , XkbControlsPtr /* old */ , XkbControlsPtr /* new */ , xkbControlsNotify * /* pCN */ , Bool /* forceCtrlProc */ ); extern _X_EXPORT void XkbSendControlsNotify(DeviceIntPtr /* kbd */ , xkbControlsNotify * /* ev */ ); extern _X_EXPORT void XkbSendCompatMapNotify(DeviceIntPtr /* kbd */ , xkbCompatMapNotify * /* ev */ ); extern _X_EXPORT void XkbHandleBell(BOOL force, BOOL eventOnly, DeviceIntPtr kbd, CARD8 percent, void *ctrl, CARD8 class, Atom name, WindowPtr pWin, ClientPtr pClient ); extern _X_EXPORT void XkbSendAccessXNotify(DeviceIntPtr /* kbd */ , xkbAccessXNotify * /* pEv */ ); extern _X_EXPORT void XkbSendNamesNotify(DeviceIntPtr /* kbd */ , xkbNamesNotify * /* ev */ ); extern _X_EXPORT void XkbSendActionMessage(DeviceIntPtr /* kbd */ , xkbActionMessage * /* ev */ ); extern _X_EXPORT void XkbSendExtensionDeviceNotify(DeviceIntPtr /* kbd */ , ClientPtr /* client */ , xkbExtensionDeviceNotify * /* ev */ ); extern _X_EXPORT void XkbSendNotification(DeviceIntPtr /* kbd */ , XkbChangesPtr /* pChanges */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbProcessKeyboardEvent(DeviceEvent * /* event */ , DeviceIntPtr /* keybd */ ); extern _X_EXPORT void XkbHandleActions(DeviceIntPtr /* dev */ , DeviceIntPtr /* kbd */ , DeviceEvent * /* event */ ); extern void XkbPushLockedStateToSlaves(DeviceIntPtr /* master */, int /* evtype */, int /* key */); extern _X_EXPORT Bool XkbEnableDisableControls(XkbSrvInfoPtr /* xkbi */ , unsigned long /* change */ , unsigned long /* newValues */ , XkbChangesPtr /* changes */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void AccessXInit(DeviceIntPtr /* dev */ ); extern _X_EXPORT Bool AccessXFilterPressEvent(DeviceEvent * /* event */ , DeviceIntPtr /* keybd */ ); extern _X_EXPORT Bool AccessXFilterReleaseEvent(DeviceEvent * /* event */ , DeviceIntPtr /* keybd */ ); extern _X_EXPORT void AccessXCancelRepeatKey(XkbSrvInfoPtr /* xkbi */ , KeyCode /* key */ ); extern _X_EXPORT void AccessXComputeCurveFactor(XkbSrvInfoPtr /* xkbi */ , XkbControlsPtr /* ctrls */ ); extern _X_EXPORT XkbInterestPtr XkbFindClientResource(DevicePtr /* inDev */ , ClientPtr /* client */ ); extern _X_EXPORT XkbInterestPtr XkbAddClientResource(DevicePtr /* inDev */ , ClientPtr /* client */ , XID /* id */ ); extern _X_EXPORT int XkbRemoveResourceClient(DevicePtr /* inDev */ , XID /* id */ ); extern _X_EXPORT int XkbDDXAccessXBeep(DeviceIntPtr /* dev */ , unsigned int /* what */ , unsigned int /* which */ ); extern _X_EXPORT int XkbDDXUsesSoftRepeat(DeviceIntPtr /* dev */ ); extern _X_EXPORT void XkbDDXKeybdCtrlProc(DeviceIntPtr /* dev */ , KeybdCtrl * /* ctrl */ ); extern _X_EXPORT void XkbDDXChangeControls(DeviceIntPtr /* dev */ , XkbControlsPtr /* old */ , XkbControlsPtr /* new */ ); extern _X_EXPORT void XkbDDXUpdateDeviceIndicators(DeviceIntPtr /* dev */ , XkbSrvLedInfoPtr /* sli */ , CARD32 /* newState */ ); extern _X_EXPORT int XkbDDXTerminateServer(DeviceIntPtr /* dev */ , KeyCode /* key */ , XkbAction * /* act */ ); extern _X_EXPORT int XkbDDXSwitchScreen(DeviceIntPtr /* dev */ , KeyCode /* key */ , XkbAction * /* act */ ); extern _X_EXPORT int XkbDDXPrivate(DeviceIntPtr /* dev */ , KeyCode /* key */ , XkbAction * /* act */ ); extern _X_EXPORT void XkbDisableComputedAutoRepeats(DeviceIntPtr /* pXDev */ , unsigned int /* key */ ); extern _X_EXPORT void XkbSetRepeatKeys(DeviceIntPtr /* pXDev */ , int /* key */ , int /* onoff */ ); extern _X_EXPORT int XkbLatchModifiers(DeviceIntPtr /* pXDev */ , CARD8 /* mask */ , CARD8 /* latches */ ); extern _X_EXPORT int XkbLatchGroup(DeviceIntPtr /* pXDev */ , int /* group */ ); extern _X_EXPORT void XkbClearAllLatchesAndLocks(DeviceIntPtr /* dev */ , XkbSrvInfoPtr /* xkbi */ , Bool /* genEv */ , XkbEventCausePtr /* cause */ ); extern _X_EXPORT void XkbInitRules(XkbRMLVOSet * /* rmlvo */, const char * /* rules */, const char * /* model */, const char * /* layout */, const char * /* variant */, const char * /* options */ ) ; extern _X_EXPORT void XkbGetRulesDflts(XkbRMLVOSet * /* rmlvo */ ); extern _X_EXPORT void XkbFreeRMLVOSet(XkbRMLVOSet * /* rmlvo */ , Bool /* freeRMLVO */ ); extern _X_EXPORT void XkbSetRulesDflts(XkbRMLVOSet * /* rmlvo */ ); extern _X_EXPORT void XkbDeleteRulesDflts(void ); extern _X_EXPORT void XkbDeleteRulesUsed(void ); extern _X_EXPORT int SProcXkbDispatch(ClientPtr /* client */ ); extern _X_EXPORT XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr /* dev */ , Atom /* name */ , Bool * /* shouldFree */ ); extern _X_EXPORT void XkbConvertCase(KeySym /* sym */ , KeySym * /* lower */ , KeySym * /* upper */ ); extern _X_EXPORT Status XkbChangeKeycodeRange(XkbDescPtr /* xkb */ , int /* minKC */ , int /* maxKC */ , XkbChangesPtr /* changes */ ); extern _X_EXPORT void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr /* sli */ ); extern _X_EXPORT void XkbFreeInfo(XkbSrvInfoPtr /* xkbi */ ); extern _X_EXPORT Status XkbChangeTypesOfKey(XkbDescPtr /* xkb */ , int /* key */ , int /* nGroups */ , unsigned int /* groups */ , int * /* newTypesIn */ , XkbMapChangesPtr /* changes */ ); extern _X_EXPORT int XkbKeyTypesForCoreSymbols(XkbDescPtr /* xkb */ , int /* map_width */ , KeySym * /* core_syms */ , unsigned int /* protected */ , int * /* types_inout */ , KeySym * /* xkb_syms_rtrn */ ); extern _X_EXPORT Bool XkbApplyCompatMapToKey(XkbDescPtr /* xkb */ , KeyCode /* key */ , XkbChangesPtr /* changes */ ); extern _X_EXPORT Bool XkbApplyVirtualModChanges(XkbDescPtr /* xkb */ , unsigned int /* changed */ , XkbChangesPtr /* changes */ ); extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ , xkbNewKeyboardNotify * /* pNKN */ ); extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ , XkbDescPtr /* src */ ); extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */, DeviceIntPtr /* src */); extern _X_EXPORT Bool XkbDeviceApplyKeymap(DeviceIntPtr /* dst */ , XkbDescPtr /* src */ ); extern void XkbFilterEvents(ClientPtr /* pClient */ , int /* nEvents */ , xEvent * /* xE */ ); extern int XkbGetEffectiveGroup(XkbSrvInfoPtr /* xkbi */ , XkbStatePtr /* xkbstate */ , CARD8 /* keycode */ ); extern void XkbMergeLockedPtrBtns(DeviceIntPtr /* master */ ); extern void XkbFakeDeviceButton(DeviceIntPtr /* dev */ , int /* press */ , int /* button */ ); extern _X_EXPORT void XkbCopyControls(XkbDescPtr /* dst */ , XkbDescPtr /* src */ ); #include "xkbfile.h" #include "xkbrules.h" #define _XkbListKeycodes 0 #define _XkbListTypes 1 #define _XkbListCompat 2 #define _XkbListSymbols 3 #define _XkbListGeometry 4 #define _XkbListNumComponents 5 extern _X_EXPORT unsigned int XkbDDXLoadKeymapByNames(DeviceIntPtr /* keybd */ , XkbComponentNamesPtr /* names */ , unsigned int /* want */ , unsigned int /* need */ , XkbDescPtr * /* finfoRtrn */ , char * /* keymapNameRtrn */ , int /* keymapNameRtrnLen */ ); extern _X_EXPORT Bool XkbDDXNamesFromRules(DeviceIntPtr /* keybd */ , const char * /* rules */ , XkbRF_VarDefsPtr /* defs */ , XkbComponentNamesPtr /* names */ ); extern _X_EXPORT XkbDescPtr XkbCompileKeymap(DeviceIntPtr /* dev */ , XkbRMLVOSet * /* rmlvo */ ); extern _X_EXPORT XkbDescPtr XkbCompileKeymapFromString(DeviceIntPtr dev, const char *keymap, int keymap_length); #endif /* _XKBSRV_H_ */ xorg-server-21.1.16/include/xkbstr.h0000644000175000017500000004777714757411105012772 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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. ********************************************************/ #ifndef _XKBSTR_H_ #define _XKBSTR_H_ #include #define XkbCharToInt(v) ((int) ((v) & 0x80 ? ((v) | (~0xff)) : ((v) & 0x7f))) #define XkbIntTo2Chars(i, h, l) ((h) = (i >> 8) & 0xff, (l) = (i) & 0xff) #if defined(WORD64) && defined(UNSIGNEDBITFIELDS) #define Xkb2CharsToInt(h, l) ((int) ((h) & 0x80 ? \ (((h) << 8) | (l) | (~0xffff)) : \ (((h) << 8) | (l) & 0x7fff)) #else #define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) #endif /* * Common data structures and access macros */ typedef struct _XkbStateRec { unsigned char group; /* base + latched + locked */ /* FIXME: Why are base + latched short and not char?? */ unsigned short base_group; /* physically ... down? */ unsigned short latched_group; unsigned char locked_group; unsigned char mods; /* base + latched + locked */ unsigned char base_mods; /* physically down */ unsigned char latched_mods; unsigned char locked_mods; unsigned char compat_state; /* mods + group for core state */ /* grab mods = all depressed and latched mods, _not_ locked mods */ unsigned char grab_mods; /* grab mods minus internal mods */ unsigned char compat_grab_mods; /* grab mods + group for core state, but not locked groups if IgnoreGroupLocks set */ /* effective mods = all mods (depressed, latched, locked) */ unsigned char lookup_mods; /* effective mods minus internal mods */ unsigned char compat_lookup_mods; /* effective mods + group */ unsigned short ptr_buttons; /* core pointer buttons */ } XkbStateRec, *XkbStatePtr; #define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) #define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) typedef struct _XkbMods { unsigned char mask; /* effective mods */ unsigned char real_mods; unsigned short vmods; } XkbModsRec, *XkbModsPtr; typedef struct _XkbKTMapEntry { Bool active; unsigned char level; XkbModsRec mods; } XkbKTMapEntryRec, *XkbKTMapEntryPtr; typedef struct _XkbKeyType { XkbModsRec mods; unsigned char num_levels; unsigned char map_count; XkbKTMapEntryPtr map; XkbModsPtr preserve; Atom name; Atom *level_names; } XkbKeyTypeRec, *XkbKeyTypePtr; #define XkbNumGroups(g) ((g)&0x0f) #define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) #define XkbOutOfRangeGroupAction(g) ((g)&0xc0) #define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) #define XkbSetGroupInfo(g, w, n) (((w) & 0xc0) | (((n) & 3) << 4) | \ ((g) & 0x0f)) #define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) /* * Structures and access macros used primarily by the server */ typedef struct _XkbBehavior { unsigned char type; unsigned char data; } XkbBehavior; #define XkbAnyActionDataSize 7 typedef struct _XkbAnyAction { unsigned char type; unsigned char data[XkbAnyActionDataSize]; } XkbAnyAction; typedef struct _XkbModAction { unsigned char type; unsigned char flags; unsigned char mask; unsigned char real_mods; /* FIXME: Make this an int. */ unsigned char vmods1; unsigned char vmods2; } XkbModAction; #define XkbModActionVMods(a) ((short) (((a)->vmods1 << 8) | (a)->vmods2)) #define XkbSetModActionVMods(a,v) \ ((a)->vmods1 = (((v) >> 8) & 0xff), \ (a)->vmods2 = (v) & 0xff) typedef struct _XkbGroupAction { unsigned char type; unsigned char flags; /* FIXME: Make this an int. */ char group_XXX; } XkbGroupAction; #define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) #define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) typedef struct _XkbISOAction { unsigned char type; unsigned char flags; unsigned char mask; unsigned char real_mods; /* FIXME: Make this an int. */ char group_XXX; unsigned char affect; unsigned char vmods1; unsigned char vmods2; } XkbISOAction; typedef struct _XkbPtrAction { unsigned char type; unsigned char flags; /* FIXME: Make this an int. */ unsigned char high_XXX; unsigned char low_XXX; unsigned char high_YYY; unsigned char low_YYY; } XkbPtrAction; #define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) #define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) #define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) #define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) typedef struct _XkbPtrBtnAction { unsigned char type; unsigned char flags; unsigned char count; unsigned char button; } XkbPtrBtnAction; typedef struct _XkbPtrDfltAction { unsigned char type; unsigned char flags; unsigned char affect; char valueXXX; } XkbPtrDfltAction; #define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) #define XkbSASetPtrDfltValue(a, c) ((a)->valueXXX = (c) & 0xff) typedef struct _XkbSwitchScreenAction { unsigned char type; unsigned char flags; char screenXXX; } XkbSwitchScreenAction; #define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) #define XkbSASetScreen(a, s) ((a)->screenXXX = (s) & 0xff) typedef struct _XkbCtrlsAction { unsigned char type; unsigned char flags; /* FIXME: Make this an int. */ unsigned char ctrls3; unsigned char ctrls2; unsigned char ctrls1; unsigned char ctrls0; } XkbCtrlsAction; #define XkbActionSetCtrls(a, c) ((a)->ctrls3 = ((c) >> 24) & 0xff, \ (a)->ctrls2 = ((c) >> 16) & 0xff, \ (a)->ctrls1 = ((c) >> 8) & 0xff, \ (a)->ctrls0 = (c) & 0xff) #define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ (((unsigned int)(a)->ctrls2)<<16)|\ (((unsigned int)(a)->ctrls1)<<8)|\ ((unsigned int) (a)->ctrls0)) typedef struct _XkbMessageAction { unsigned char type; unsigned char flags; unsigned char message[6]; } XkbMessageAction; typedef struct _XkbRedirectKeyAction { unsigned char type; unsigned char new_key; unsigned char mods_mask; unsigned char mods; /* FIXME: Make this an int. */ unsigned char vmods_mask0; unsigned char vmods_mask1; unsigned char vmods0; unsigned char vmods1; } XkbRedirectKeyAction; #define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ ((unsigned int)(a)->vmods0)) /* FIXME: This is blatantly not setting vmods. Yeesh. */ #define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ ((a)->vmods_mask0=((m)&0xff))) #define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ ((unsigned int)(a)->vmods_mask0)) #define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ ((a)->vmods_mask0=((m)&0xff))) typedef struct _XkbDeviceBtnAction { unsigned char type; unsigned char flags; unsigned char count; unsigned char button; unsigned char device; } XkbDeviceBtnAction; typedef struct _XkbDeviceValuatorAction { unsigned char type; unsigned char device; unsigned char v1_what; unsigned char v1_ndx; unsigned char v1_value; unsigned char v2_what; unsigned char v2_ndx; unsigned char v2_value; } XkbDeviceValuatorAction; typedef union _XkbAction { XkbAnyAction any; XkbModAction mods; XkbGroupAction group; XkbISOAction iso; XkbPtrAction ptr; XkbPtrBtnAction btn; XkbPtrDfltAction dflt; XkbSwitchScreenAction screen; XkbCtrlsAction ctrls; XkbMessageAction msg; XkbRedirectKeyAction redirect; XkbDeviceBtnAction devbtn; XkbDeviceValuatorAction devval; unsigned char type; } XkbAction; typedef struct _XkbControls { unsigned char mk_dflt_btn; unsigned char num_groups; unsigned char groups_wrap; XkbModsRec internal; XkbModsRec ignore_lock; unsigned int enabled_ctrls; unsigned short repeat_delay; unsigned short repeat_interval; unsigned short slow_keys_delay; unsigned short debounce_delay; unsigned short mk_delay; unsigned short mk_interval; unsigned short mk_time_to_max; unsigned short mk_max_speed; short mk_curve; unsigned short ax_options; unsigned short ax_timeout; unsigned short axt_opts_mask; unsigned short axt_opts_values; unsigned int axt_ctrls_mask; unsigned int axt_ctrls_values; unsigned char per_key_repeat[XkbPerKeyBitArraySize]; } XkbControlsRec, *XkbControlsPtr; #define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) #define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) #define XkbAX_NeedFeedback(c, w) (XkbAX_AnyFeedback((c)) && \ XkbAX_NeedOption((c), (w))) typedef struct _XkbServerMapRec { unsigned short num_acts; unsigned short size_acts; XkbAction *acts; XkbBehavior *behaviors; unsigned short *key_acts; #if defined(__cplusplus) || defined(c_plusplus) /* explicit is a C++ reserved word */ unsigned char *c_explicit; #else unsigned char *explicit; #endif unsigned char vmods[XkbNumVirtualMods]; unsigned short *vmodmap; } XkbServerMapRec, *XkbServerMapPtr; #define XkbSMKeyActionsPtr(m, k) (&(m)->acts[(m)->key_acts[(k)]]) /* * Structures and access macros used primarily by clients */ typedef struct _XkbSymMapRec { unsigned char kt_index[XkbNumKbdGroups]; unsigned char group_info; unsigned char width; unsigned short offset; } XkbSymMapRec, *XkbSymMapPtr; typedef struct _XkbClientMapRec { unsigned char size_types; unsigned char num_types; XkbKeyTypePtr types; unsigned short size_syms; unsigned short num_syms; KeySym *syms; XkbSymMapPtr key_sym_map; unsigned char *modmap; } XkbClientMapRec, *XkbClientMapPtr; #define XkbCMKeyGroupInfo(m, k) ((m)->key_sym_map[(k)].group_info) #define XkbCMKeyNumGroups(m, k) (XkbNumGroups((m)->key_sym_map[(k)].group_info)) #define XkbCMKeyGroupWidth(m, k, g) (XkbCMKeyType((m), (k), (g))->num_levels) #define XkbCMKeyGroupsWidth(m, k) ((m)->key_sym_map[(k)].width) #define XkbCMKeyTypeIndex(m, k, g) ((m)->key_sym_map[(k)].kt_index[(g) & 0x3]) #define XkbCMKeyType(m, k, g) (&(m)->types[XkbCMKeyTypeIndex((m), (k), (g))]) #define XkbCMKeyNumSyms(m, k) (XkbCMKeyGroupsWidth((m), (k)) * \ XkbCMKeyNumGroups((m), (k))) #define XkbCMKeySymsOffset(m, k) ((m)->key_sym_map[(k)].offset) #define XkbCMKeySymsPtr(m, k) (&(m)->syms[XkbCMKeySymsOffset((m), (k))]) /* * Compatibility structures and access macros */ typedef struct _XkbSymInterpretRec { KeySym sym; unsigned char flags; unsigned char match; unsigned char mods; unsigned char virtual_mod; XkbAnyAction act; } XkbSymInterpretRec, *XkbSymInterpretPtr; typedef struct _XkbCompatMapRec { XkbSymInterpretPtr sym_interpret; XkbModsRec groups[XkbNumKbdGroups]; unsigned short num_si; unsigned short size_si; } XkbCompatMapRec, *XkbCompatMapPtr; typedef struct _XkbIndicatorMapRec { unsigned char flags; /* FIXME: For some reason, interpretation of groups is wildly * different between which being base/latched/locked. */ unsigned char which_groups; unsigned char groups; unsigned char which_mods; XkbModsRec mods; unsigned int ctrls; } XkbIndicatorMapRec, *XkbIndicatorMapPtr; #define XkbIM_IsAuto(i) (!((i)->flags & XkbIM_NoAutomatic) && \ (((i)->which_groups&&(i)->groups)||\ ((i)->which_mods&&(i)->mods.mask)||\ (i)->ctrls)) #define XkbIM_InUse(i) ((i)->flags || (i)->which_groups || (i)->which_mods || \ (i)->ctrls) typedef struct _XkbIndicatorRec { unsigned long phys_indicators; XkbIndicatorMapRec maps[XkbNumIndicators]; } XkbIndicatorRec, *XkbIndicatorPtr; typedef struct _XkbKeyNameRec { char name[XkbKeyNameLength]; } XkbKeyNameRec, *XkbKeyNamePtr; typedef struct _XkbKeyAliasRec { char real[XkbKeyNameLength]; char alias[XkbKeyNameLength]; } XkbKeyAliasRec, *XkbKeyAliasPtr; /* * Names for everything */ typedef struct _XkbNamesRec { Atom keycodes; Atom geometry; Atom symbols; Atom types; Atom compat; Atom vmods[XkbNumVirtualMods]; Atom indicators[XkbNumIndicators]; Atom groups[XkbNumKbdGroups]; XkbKeyNamePtr keys; XkbKeyAliasPtr key_aliases; Atom *radio_groups; Atom phys_symbols; unsigned char num_keys; unsigned char num_key_aliases; unsigned short num_rg; } XkbNamesRec, *XkbNamesPtr; typedef struct _XkbGeometry *XkbGeometryPtr; /* * Tie it all together into one big keyboard description */ typedef struct _XkbDesc { unsigned int defined; unsigned short flags; unsigned short device_spec; KeyCode min_key_code; KeyCode max_key_code; XkbControlsPtr ctrls; XkbServerMapPtr server; XkbClientMapPtr map; XkbIndicatorPtr indicators; XkbNamesPtr names; XkbCompatMapPtr compat; XkbGeometryPtr geom; } XkbDescRec, *XkbDescPtr; #define XkbKeyKeyTypeIndex(d, k, g) (XkbCMKeyTypeIndex((d)->map, (k), (g))) #define XkbKeyKeyType(d, k, g) (XkbCMKeyType((d)->map, (k), (g))) #define XkbKeyGroupWidth(d, k, g) (XkbCMKeyGroupWidth((d)->map, (k), (g))) #define XkbKeyGroupsWidth(d, k) (XkbCMKeyGroupsWidth((d)->map, (k))) #define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) #define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) #define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) #define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) #define XkbKeySym(d, k, n) (XkbKeySymsPtr((d), (k))[(n)]) #define XkbKeySymEntry(d,k,sl,g) \ (XkbKeySym((d), (k), (XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) #define XkbKeyAction(d,k,n) \ (XkbKeyHasActions((d), (k)) ? & XkbKeyActionsPtr((d), (k))[(n)] : NULL) #define XkbKeyActionEntry(d,k,sl,g) \ (XkbKeyHasActions((d), (k)) ? \ XkbKeyAction((d), (k), ((XkbKeyGroupsWidth((d), (k)) * (g)) + (sl))) : \ NULL) #define XkbKeyHasActions(d, k) (!!(d)->server->key_acts[(k)]) #define XkbKeyNumActions(d, k) (XkbKeyHasActions((d), (k)) ? \ XkbKeyNumSyms((d), (k)) : 1) #define XkbKeyActionsPtr(d, k) (XkbSMKeyActionsPtr((d)->server, (k))) #define XkbKeycodeInRange(d, k) ((k) >= (d)->min_key_code && \ (k) <= (d)->max_key_code) #define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) /* * The following structures can be used to track changes * to a keyboard device */ typedef struct _XkbMapChanges { unsigned short changed; KeyCode min_key_code; KeyCode max_key_code; unsigned char first_type; unsigned char num_types; KeyCode first_key_sym; unsigned char num_key_syms; KeyCode first_key_act; unsigned char num_key_acts; KeyCode first_key_behavior; unsigned char num_key_behaviors; KeyCode first_key_explicit; unsigned char num_key_explicit; KeyCode first_modmap_key; unsigned char num_modmap_keys; KeyCode first_vmodmap_key; unsigned char num_vmodmap_keys; unsigned char pad; unsigned short vmods; } XkbMapChangesRec, *XkbMapChangesPtr; typedef struct _XkbControlsChanges { unsigned int changed_ctrls; unsigned int enabled_ctrls_changes; Bool num_groups_changed; } XkbControlsChangesRec, *XkbControlsChangesPtr; typedef struct _XkbIndicatorChanges { unsigned int state_changes; unsigned int map_changes; } XkbIndicatorChangesRec, *XkbIndicatorChangesPtr; typedef struct _XkbNameChanges { unsigned int changed; unsigned char first_type; unsigned char num_types; unsigned char first_lvl; unsigned char num_lvls; unsigned char num_aliases; unsigned char num_rg; unsigned char first_key; unsigned char num_keys; unsigned short changed_vmods; unsigned long changed_indicators; unsigned char changed_groups; } XkbNameChangesRec, *XkbNameChangesPtr; typedef struct _XkbCompatChanges { unsigned char changed_groups; unsigned short first_si; unsigned short num_si; } XkbCompatChangesRec, *XkbCompatChangesPtr; typedef struct _XkbChanges { unsigned short device_spec; unsigned short state_changes; XkbMapChangesRec map; XkbControlsChangesRec ctrls; XkbIndicatorChangesRec indicators; XkbNameChangesRec names; XkbCompatChangesRec compat; } XkbChangesRec, *XkbChangesPtr; /* * These data structures are used to construct a keymap from * a set of components or to list components in the server * database. */ typedef struct _XkbComponentNames { char *keycodes; char *types; char *compat; char *symbols; char *geometry; } XkbComponentNamesRec, *XkbComponentNamesPtr; typedef struct _XkbComponentName { unsigned short flags; char *name; } XkbComponentNameRec, *XkbComponentNamePtr; typedef struct _XkbComponentList { int num_keymaps; int num_keycodes; int num_types; int num_compat; int num_symbols; int num_geometry; XkbComponentNamePtr keymaps; XkbComponentNamePtr keycodes; XkbComponentNamePtr types; XkbComponentNamePtr compat; XkbComponentNamePtr symbols; XkbComponentNamePtr geometry; } XkbComponentListRec, *XkbComponentListPtr; /* * The following data structures describe and track changes to a * non-keyboard extension device */ typedef struct _XkbDeviceLedInfo { unsigned short led_class; unsigned short led_id; unsigned int phys_indicators; unsigned int maps_present; unsigned int names_present; unsigned int state; Atom names[XkbNumIndicators]; XkbIndicatorMapRec maps[XkbNumIndicators]; } XkbDeviceLedInfoRec, *XkbDeviceLedInfoPtr; typedef struct _XkbDeviceInfo { char *name; Atom type; unsigned short device_spec; Bool has_own_state; unsigned short supported; unsigned short unsupported; unsigned short num_btns; XkbAction *btn_acts; unsigned short sz_leds; unsigned short num_leds; unsigned short dflt_kbd_fb; unsigned short dflt_led_fb; XkbDeviceLedInfoPtr leds; } XkbDeviceInfoRec, *XkbDeviceInfoPtr; #define XkbXI_DevHasBtnActs(d) ((d)->num_btns > 0 && (d)->btn_acts) #define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d) && (b) < (d)->num_btns) #define XkbXI_DevHasLeds(d) ((d)->num_leds > 0 && (d)->leds) typedef struct _XkbDeviceLedChanges { unsigned short led_class; unsigned short led_id; unsigned int defined; /* names or maps changed */ struct _XkbDeviceLedChanges *next; } XkbDeviceLedChangesRec, *XkbDeviceLedChangesPtr; typedef struct _XkbDeviceChanges { unsigned int changed; unsigned short first_btn; unsigned short num_btns; XkbDeviceLedChangesRec leds; } XkbDeviceChangesRec, *XkbDeviceChangesPtr; #endif /* _XKBSTR_H_ */ xorg-server-21.1.16/include/xkbrules.h0000644000175000017500000000745414757411105013300 #ifndef _XKBRULES_H_ #define _XKBRULES_H_ 1 /************************************************************ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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. ********************************************************/ /***====================================================================***/ typedef struct _XkbRMLVOSet { char *rules; char *model; char *layout; char *variant; char *options; } XkbRMLVOSet; typedef struct _XkbRF_VarDefs { const char *model; const char *layout; const char *variant; const char *options; } XkbRF_VarDefsRec, *XkbRF_VarDefsPtr; typedef struct _XkbRF_Rule { int number; int layout_num; int variant_num; const char *model; const char *layout; const char *variant; const char *option; /* yields */ const char *keycodes; const char *symbols; const char *types; const char *compat; const char *geometry; unsigned flags; } XkbRF_RuleRec, *XkbRF_RulePtr; typedef struct _XkbRF_Group { int number; const char *name; char *words; } XkbRF_GroupRec, *XkbRF_GroupPtr; #define XkbRF_PendingMatch (1L<<1) #define XkbRF_Option (1L<<2) #define XkbRF_Append (1L<<3) #define XkbRF_Normal (1L<<4) #define XkbRF_Invalid (1L<<5) typedef struct _XkbRF_Rules { unsigned short sz_rules; unsigned short num_rules; XkbRF_RulePtr rules; unsigned short sz_groups; unsigned short num_groups; XkbRF_GroupPtr groups; } XkbRF_RulesRec, *XkbRF_RulesPtr; /***====================================================================***/ _XFUNCPROTOBEGIN /* Seems preferable to dragging xkbstr.h in. */ struct _XkbComponentNames; extern _X_EXPORT Bool XkbRF_GetComponents(XkbRF_RulesPtr /* rules */ , XkbRF_VarDefsPtr /* var_defs */ , struct _XkbComponentNames * /* names */ ); extern _X_EXPORT Bool XkbRF_LoadRules(FILE * /* file */ , XkbRF_RulesPtr /* rules */ ); extern _X_EXPORT Bool XkbRF_LoadRulesByName(char * /* base */ , char * /* locale */ , XkbRF_RulesPtr /* rules */ ); /***====================================================================***/ extern _X_EXPORT XkbRF_RulesPtr XkbRF_Create(void); extern _X_EXPORT void XkbRF_Free(XkbRF_RulesPtr /* rules */ , Bool /* freeRules */ ); /***====================================================================***/ #define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES" #define _XKB_RF_NAMES_PROP_MAXLEN 1024 _XFUNCPROTOEND #endif /* _XKBRULES_H_ */ xorg-server-21.1.16/include/xserver_poll.h0000644000175000017500000000337014757411105014156 /* * Copyright © 2016 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _XSERVER_POLL_H_ #define _XSERVER_POLL_H_ #ifndef _DIX_CONFIG_H_ #error must include dix-config.h to use xserver_poll.h #endif #ifdef HAVE_POLL #include #define xserver_poll(fds, nfds, timeout) poll(fds, nfds, timeout) #else #define POLLIN 0x01 #define POLLPRI 0x02 #define POLLOUT 0x04 #define POLLERR 0x08 #define POLLHUP 0x10 #define POLLNVAL 0x20 struct pollfd { int fd; short events; short revents; }; typedef unsigned long nfds_t; int xserver_poll (struct pollfd *pArray, nfds_t n_fds, int timeout); #endif #endif /* _XSERVER_POLL_H_ */ xorg-server-21.1.16/include/xserver-properties.h0000644000175000017500000002245314757411105015325 /* * Copyright 2008 Red Hat, Inc. * * 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 * on the rights to use, copy, modify, merge, publish, distribute, sub * license, and/or sell copies of the Software, and to permit persons to whom * them Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 MERCHANTIBILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS 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. */ /* Properties managed by the server. */ #ifndef _XSERVER_PROPERTIES_H_ #define _XSERVER_PROPERTIES_H_ /* Type for a 4 byte float. Storage format IEEE 754 in client's default * byte-ordering. */ #define XATOM_FLOAT "FLOAT" /* STRING. Seat name of this display */ #define SEAT_ATOM_NAME "Xorg_Seat" /* BOOL. 0 - device disabled, 1 - device enabled */ #define XI_PROP_ENABLED "Device Enabled" /* BOOL. If present, device is a virtual XTEST device */ #define XI_PROP_XTEST_DEVICE "XTEST Device" /* CARD32, 2 values, vendor, product. * This property is set by the driver and may not be available for some * drivers. Read-Only */ #define XI_PROP_PRODUCT_ID "Device Product ID" /* Coordinate transformation matrix for absolute input devices * FLOAT, 9 values in row-major order, coordinates in 0..1 range: * [c0 c1 c2] [x] * [c3 c4 c5] * [y] * [c6 c7 c8] [1] */ #define XI_PROP_TRANSFORM "Coordinate Transformation Matrix" /* STRING. Device node path of device */ #define XI_PROP_DEVICE_NODE "Device Node" /* Pointer acceleration properties */ /* INTEGER of any format */ #define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile" /* FLOAT, format 32 */ #define ACCEL_PROP_CONSTANT_DECELERATION "Device Accel Constant Deceleration" /* FLOAT, format 32 */ #define ACCEL_PROP_ADAPTIVE_DECELERATION "Device Accel Adaptive Deceleration" /* FLOAT, format 32 */ #define ACCEL_PROP_VELOCITY_SCALING "Device Accel Velocity Scaling" /* Axis labels */ #define AXIS_LABEL_PROP "Axis Labels" #define AXIS_LABEL_PROP_REL_X "Rel X" #define AXIS_LABEL_PROP_REL_Y "Rel Y" #define AXIS_LABEL_PROP_REL_Z "Rel Z" #define AXIS_LABEL_PROP_REL_RX "Rel Rotary X" #define AXIS_LABEL_PROP_REL_RY "Rel Rotary Y" #define AXIS_LABEL_PROP_REL_RZ "Rel Rotary Z" #define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel" #define AXIS_LABEL_PROP_REL_DIAL "Rel Dial" #define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel" #define AXIS_LABEL_PROP_REL_MISC "Rel Misc" #define AXIS_LABEL_PROP_REL_VSCROLL "Rel Vert Scroll" #define AXIS_LABEL_PROP_REL_HSCROLL "Rel Horiz Scroll" /* * Absolute axes */ #define AXIS_LABEL_PROP_ABS_X "Abs X" #define AXIS_LABEL_PROP_ABS_Y "Abs Y" #define AXIS_LABEL_PROP_ABS_Z "Abs Z" #define AXIS_LABEL_PROP_ABS_RX "Abs Rotary X" #define AXIS_LABEL_PROP_ABS_RY "Abs Rotary Y" #define AXIS_LABEL_PROP_ABS_RZ "Abs Rotary Z" #define AXIS_LABEL_PROP_ABS_THROTTLE "Abs Throttle" #define AXIS_LABEL_PROP_ABS_RUDDER "Abs Rudder" #define AXIS_LABEL_PROP_ABS_WHEEL "Abs Wheel" #define AXIS_LABEL_PROP_ABS_GAS "Abs Gas" #define AXIS_LABEL_PROP_ABS_BRAKE "Abs Brake" #define AXIS_LABEL_PROP_ABS_HAT0X "Abs Hat 0 X" #define AXIS_LABEL_PROP_ABS_HAT0Y "Abs Hat 0 Y" #define AXIS_LABEL_PROP_ABS_HAT1X "Abs Hat 1 X" #define AXIS_LABEL_PROP_ABS_HAT1Y "Abs Hat 1 Y" #define AXIS_LABEL_PROP_ABS_HAT2X "Abs Hat 2 X" #define AXIS_LABEL_PROP_ABS_HAT2Y "Abs Hat 2 Y" #define AXIS_LABEL_PROP_ABS_HAT3X "Abs Hat 3 X" #define AXIS_LABEL_PROP_ABS_HAT3Y "Abs Hat 3 Y" #define AXIS_LABEL_PROP_ABS_PRESSURE "Abs Pressure" #define AXIS_LABEL_PROP_ABS_DISTANCE "Abs Distance" #define AXIS_LABEL_PROP_ABS_TILT_X "Abs Tilt X" #define AXIS_LABEL_PROP_ABS_TILT_Y "Abs Tilt Y" #define AXIS_LABEL_PROP_ABS_TOOL_WIDTH "Abs Tool Width" #define AXIS_LABEL_PROP_ABS_VOLUME "Abs Volume" #define AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR "Abs MT Touch Major" #define AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR "Abs MT Touch Minor" #define AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR "Abs MT Width Major" #define AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR "Abs MT Width Minor" #define AXIS_LABEL_PROP_ABS_MT_ORIENTATION "Abs MT Orientation" #define AXIS_LABEL_PROP_ABS_MT_POSITION_X "Abs MT Position X" #define AXIS_LABEL_PROP_ABS_MT_POSITION_Y "Abs MT Position Y" #define AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE "Abs MT Tool Type" #define AXIS_LABEL_PROP_ABS_MT_BLOB_ID "Abs MT Blob ID" #define AXIS_LABEL_PROP_ABS_MT_TRACKING_ID "Abs MT Tracking ID" #define AXIS_LABEL_PROP_ABS_MT_PRESSURE "Abs MT Pressure" #define AXIS_LABEL_PROP_ABS_MT_DISTANCE "Abs MT Distance" #define AXIS_LABEL_PROP_ABS_MT_TOOL_X "Abs MT Tool X" #define AXIS_LABEL_PROP_ABS_MT_TOOL_Y "Abs MT Tool Y" #define AXIS_LABEL_PROP_ABS_MISC "Abs Misc" /* Button names */ #define BTN_LABEL_PROP "Button Labels" /* Default label */ #define BTN_LABEL_PROP_BTN_UNKNOWN "Button Unknown" /* Wheel buttons */ #define BTN_LABEL_PROP_BTN_WHEEL_UP "Button Wheel Up" #define BTN_LABEL_PROP_BTN_WHEEL_DOWN "Button Wheel Down" #define BTN_LABEL_PROP_BTN_HWHEEL_LEFT "Button Horiz Wheel Left" #define BTN_LABEL_PROP_BTN_HWHEEL_RIGHT "Button Horiz Wheel Right" /* The following are from linux/input.h */ #define BTN_LABEL_PROP_BTN_0 "Button 0" #define BTN_LABEL_PROP_BTN_1 "Button 1" #define BTN_LABEL_PROP_BTN_2 "Button 2" #define BTN_LABEL_PROP_BTN_3 "Button 3" #define BTN_LABEL_PROP_BTN_4 "Button 4" #define BTN_LABEL_PROP_BTN_5 "Button 5" #define BTN_LABEL_PROP_BTN_6 "Button 6" #define BTN_LABEL_PROP_BTN_7 "Button 7" #define BTN_LABEL_PROP_BTN_8 "Button 8" #define BTN_LABEL_PROP_BTN_9 "Button 9" #define BTN_LABEL_PROP_BTN_LEFT "Button Left" #define BTN_LABEL_PROP_BTN_RIGHT "Button Right" #define BTN_LABEL_PROP_BTN_MIDDLE "Button Middle" #define BTN_LABEL_PROP_BTN_SIDE "Button Side" #define BTN_LABEL_PROP_BTN_EXTRA "Button Extra" #define BTN_LABEL_PROP_BTN_FORWARD "Button Forward" #define BTN_LABEL_PROP_BTN_BACK "Button Back" #define BTN_LABEL_PROP_BTN_TASK "Button Task" #define BTN_LABEL_PROP_BTN_TRIGGER "Button Trigger" #define BTN_LABEL_PROP_BTN_THUMB "Button Thumb" #define BTN_LABEL_PROP_BTN_THUMB2 "Button Thumb2" #define BTN_LABEL_PROP_BTN_TOP "Button Top" #define BTN_LABEL_PROP_BTN_TOP2 "Button Top2" #define BTN_LABEL_PROP_BTN_PINKIE "Button Pinkie" #define BTN_LABEL_PROP_BTN_BASE "Button Base" #define BTN_LABEL_PROP_BTN_BASE2 "Button Base2" #define BTN_LABEL_PROP_BTN_BASE3 "Button Base3" #define BTN_LABEL_PROP_BTN_BASE4 "Button Base4" #define BTN_LABEL_PROP_BTN_BASE5 "Button Base5" #define BTN_LABEL_PROP_BTN_BASE6 "Button Base6" #define BTN_LABEL_PROP_BTN_DEAD "Button Dead" #define BTN_LABEL_PROP_BTN_A "Button A" #define BTN_LABEL_PROP_BTN_B "Button B" #define BTN_LABEL_PROP_BTN_C "Button C" #define BTN_LABEL_PROP_BTN_X "Button X" #define BTN_LABEL_PROP_BTN_Y "Button Y" #define BTN_LABEL_PROP_BTN_Z "Button Z" #define BTN_LABEL_PROP_BTN_TL "Button T Left" #define BTN_LABEL_PROP_BTN_TR "Button T Right" #define BTN_LABEL_PROP_BTN_TL2 "Button T Left2" #define BTN_LABEL_PROP_BTN_TR2 "Button T Right2" #define BTN_LABEL_PROP_BTN_SELECT "Button Select" #define BTN_LABEL_PROP_BTN_START "Button Start" #define BTN_LABEL_PROP_BTN_MODE "Button Mode" #define BTN_LABEL_PROP_BTN_THUMBL "Button Thumb Left" #define BTN_LABEL_PROP_BTN_THUMBR "Button Thumb Right" #define BTN_LABEL_PROP_BTN_TOOL_PEN "Button Tool Pen" #define BTN_LABEL_PROP_BTN_TOOL_RUBBER "Button Tool Rubber" #define BTN_LABEL_PROP_BTN_TOOL_BRUSH "Button Tool Brush" #define BTN_LABEL_PROP_BTN_TOOL_PENCIL "Button Tool Pencil" #define BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH "Button Tool Airbrush" #define BTN_LABEL_PROP_BTN_TOOL_FINGER "Button Tool Finger" #define BTN_LABEL_PROP_BTN_TOOL_MOUSE "Button Tool Mouse" #define BTN_LABEL_PROP_BTN_TOOL_LENS "Button Tool Lens" #define BTN_LABEL_PROP_BTN_TOUCH "Button Touch" #define BTN_LABEL_PROP_BTN_STYLUS "Button Stylus" #define BTN_LABEL_PROP_BTN_STYLUS2 "Button Stylus2" #define BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP "Button Tool Doubletap" #define BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP "Button Tool Tripletap" #define BTN_LABEL_PROP_BTN_GEAR_DOWN "Button Gear down" #define BTN_LABEL_PROP_BTN_GEAR_UP "Button Gear up" #endif xorg-server-21.1.16/include/Makefile.in0000644000175000017500000007315114757411116013334 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = include ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = do-not-use-config.h xorg-server.h dix-config.h \ xorg-config.h xkb-config.h xwin-config.h version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)" am__sdk_HEADERS_DIST = XIstubs.h Xprintf.h callback.h client.h \ closestr.h closure.h colormap.h colormapst.h hotplug.h \ cursor.h cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \ dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \ extension.h extinit.h extnsionst.h fourcc.h gc.h gcstruct.h \ globals.h glx_extinit.h glxvndabi.h input.h inputstr.h list.h \ misc.h miscstruct.h opaque.h nonsdk_extinit.h optionstr.h os.h \ pixmap.h pixmapstr.h privates.h property.h propertyst.h \ ptrveloc.h region.h regionstr.h registry.h resource.h rgb.h \ screenint.h scrnintstr.h selection.h servermd.h validate.h \ displaymode.h window.h windowstr.h xkbfile.h xkbsrv.h xkbstr.h \ xkbrules.h xserver_poll.h xserver-properties.h HEADERS = $(nodist_sdk_HEADERS) $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ do-not-use-config.h.in xorg-server.h.in dix-config.h.in \ xorg-config.h.in xkb-config.h.in xwin-config.h.in \ version-config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/dix-config.h.in \ $(srcdir)/do-not-use-config.h.in $(srcdir)/version-config.h.in \ $(srcdir)/xkb-config.h.in $(srcdir)/xorg-config.h.in \ $(srcdir)/xorg-server.h.in $(srcdir)/xwin-config.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @XORG_TRUE@sdk_HEADERS = \ @XORG_TRUE@ XIstubs.h \ @XORG_TRUE@ Xprintf.h \ @XORG_TRUE@ callback.h \ @XORG_TRUE@ client.h \ @XORG_TRUE@ closestr.h \ @XORG_TRUE@ closure.h \ @XORG_TRUE@ colormap.h \ @XORG_TRUE@ colormapst.h \ @XORG_TRUE@ hotplug.h \ @XORG_TRUE@ cursor.h \ @XORG_TRUE@ cursorstr.h \ @XORG_TRUE@ dix.h \ @XORG_TRUE@ dixaccess.h \ @XORG_TRUE@ dixevents.h \ @XORG_TRUE@ dixfont.h \ @XORG_TRUE@ dixfontstr.h \ @XORG_TRUE@ dixgrabs.h \ @XORG_TRUE@ dixstruct.h \ @XORG_TRUE@ events.h \ @XORG_TRUE@ exevents.h \ @XORG_TRUE@ extension.h \ @XORG_TRUE@ extinit.h \ @XORG_TRUE@ extnsionst.h \ @XORG_TRUE@ fourcc.h \ @XORG_TRUE@ gc.h \ @XORG_TRUE@ gcstruct.h \ @XORG_TRUE@ globals.h \ @XORG_TRUE@ glx_extinit.h \ @XORG_TRUE@ glxvndabi.h \ @XORG_TRUE@ input.h \ @XORG_TRUE@ inputstr.h \ @XORG_TRUE@ list.h \ @XORG_TRUE@ misc.h \ @XORG_TRUE@ miscstruct.h \ @XORG_TRUE@ opaque.h \ @XORG_TRUE@ nonsdk_extinit.h \ @XORG_TRUE@ optionstr.h \ @XORG_TRUE@ os.h \ @XORG_TRUE@ pixmap.h \ @XORG_TRUE@ pixmapstr.h \ @XORG_TRUE@ privates.h \ @XORG_TRUE@ property.h \ @XORG_TRUE@ propertyst.h \ @XORG_TRUE@ ptrveloc.h \ @XORG_TRUE@ region.h \ @XORG_TRUE@ regionstr.h \ @XORG_TRUE@ registry.h \ @XORG_TRUE@ resource.h \ @XORG_TRUE@ rgb.h \ @XORG_TRUE@ screenint.h \ @XORG_TRUE@ scrnintstr.h \ @XORG_TRUE@ selection.h \ @XORG_TRUE@ servermd.h \ @XORG_TRUE@ validate.h \ @XORG_TRUE@ displaymode.h \ @XORG_TRUE@ window.h \ @XORG_TRUE@ windowstr.h \ @XORG_TRUE@ xkbfile.h \ @XORG_TRUE@ xkbsrv.h \ @XORG_TRUE@ xkbstr.h \ @XORG_TRUE@ xkbrules.h \ @XORG_TRUE@ xserver_poll.h \ @XORG_TRUE@ xserver-properties.h @XORG_TRUE@nodist_sdk_HEADERS = xorg-server.h AM_CFLAGS = $(DIX_CFLAGS) EXTRA_DIST = \ busfault.h dbus-core.h \ dix-config-apple-verbatim.h \ eventconvert.h eventstr.h inpututils.h \ probes.h \ protocol-versions.h \ swaprep.h \ swapreq.h \ systemd-logind.h \ vidmodestr.h \ xorg-config.h.meson.in \ xorg-server.h.meson.in \ xwin-config.h.meson.in \ xsha1.h \ Xserver.d # Generate dtrace header file for C sources to include @XSERVER_DTRACE_TRUE@BUILT_SOURCES = Xserver-dtrace.h CLEANFILES = Xserver-dtrace.h all: $(BUILT_SOURCES) do-not-use-config.h xorg-server.h dix-config.h xorg-config.h xkb-config.h xwin-config.h version-config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign include/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): do-not-use-config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/do-not-use-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/do-not-use-config.h $(srcdir)/do-not-use-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ xorg-server.h: stamp-h2 @test -f $@ || rm -f stamp-h2 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2 stamp-h2: $(srcdir)/xorg-server.h.in $(top_builddir)/config.status @rm -f stamp-h2 cd $(top_builddir) && $(SHELL) ./config.status include/xorg-server.h dix-config.h: stamp-h3 @test -f $@ || rm -f stamp-h3 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h3 stamp-h3: $(srcdir)/dix-config.h.in $(top_builddir)/config.status @rm -f stamp-h3 cd $(top_builddir) && $(SHELL) ./config.status include/dix-config.h xorg-config.h: stamp-h4 @test -f $@ || rm -f stamp-h4 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h4 stamp-h4: $(srcdir)/xorg-config.h.in $(top_builddir)/config.status @rm -f stamp-h4 cd $(top_builddir) && $(SHELL) ./config.status include/xorg-config.h xkb-config.h: stamp-h5 @test -f $@ || rm -f stamp-h5 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h5 stamp-h5: $(srcdir)/xkb-config.h.in $(top_builddir)/config.status @rm -f stamp-h5 cd $(top_builddir) && $(SHELL) ./config.status include/xkb-config.h xwin-config.h: stamp-h6 @test -f $@ || rm -f stamp-h6 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h6 stamp-h6: $(srcdir)/xwin-config.h.in $(top_builddir)/config.status @rm -f stamp-h6 cd $(top_builddir) && $(SHELL) ./config.status include/xwin-config.h version-config.h: stamp-h7 @test -f $@ || rm -f stamp-h7 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h7 stamp-h7: $(srcdir)/version-config.h.in $(top_builddir)/config.status @rm -f stamp-h7 cd $(top_builddir) && $(SHELL) ./config.status include/version-config.h distclean-hdr: -rm -f do-not-use-config.h stamp-h1 xorg-server.h stamp-h2 dix-config.h stamp-h3 xorg-config.h stamp-h4 xkb-config.h stamp-h5 xwin-config.h stamp-h6 version-config.h stamp-h7 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nodist_sdkHEADERS: $(nodist_sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-nodist_sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(HEADERS) do-not-use-config.h xorg-server.h \ dix-config.h xorg-config.h xkb-config.h xwin-config.h \ version-config.h installdirs: for dir in "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_sdkHEADERS install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS .MAKE: all check install install-am install-exec install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-nodist_sdkHEADERS install-pdf install-pdf-am \ install-ps install-ps-am install-sdkHEADERS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-nodist_sdkHEADERS uninstall-sdkHEADERS .PRECIOUS: Makefile @XSERVER_DTRACE_TRUE@Xserver-dtrace.h: $(srcdir)/Xserver.d @XSERVER_DTRACE_TRUE@ $(AM_V_GEN)$(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/include/dix-config.h.in0000644000175000017500000002620614757411105014071 /* dix-config.h.in: not at all generated. -*- c -*- */ #ifndef _DIX_CONFIG_H_ #define _DIX_CONFIG_H_ /* Support BigRequests extension */ #undef BIGREQS /* Builder address */ #undef BUILDERADDR /* Builder string */ #undef BUILDERSTRING /* Default font path */ #undef COMPILEDDEFAULTFONTPATH /* Miscellaneous server configuration files path */ #undef SERVER_MISC_CONFIG_PATH /* Support Composite Extension */ #undef COMPOSITE /* Support Damage extension */ #undef DAMAGE /* Use OsVendorVErrorF */ #undef DDXOSVERRORF /* Use ddxBeforeReset */ #undef DDXBEFORERESET /* Build DPMS extension */ #undef DPMSExtension /* Build DRI3 extension */ #undef DRI3 /* Build GLX extension */ #undef GLXEXT /* Build GLX DRI loader */ #undef GLX_DRI /* Path to DRI drivers */ #undef DRI_DRIVER_PATH /* Support XDM-AUTH*-1 */ #undef HASXDMAUTH /* Support SHM */ #undef HAS_SHM /* Has backtrace support */ #undef HAVE_BACKTRACE /* Has libunwind support */ #undef HAVE_LIBUNWIND /* Define to 1 if you have the `cbrt' function. */ #undef HAVE_CBRT /* Define to 1 if you have the declaration of `program_invocation_short_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Have execinfo.h */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `getdtablesize' function. */ #undef HAVE_GETDTABLESIZE /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `getpeereid' function. */ #undef HAVE_GETPEEREID /* Define to 1 if you have the `getpeerucred' function. */ #undef HAVE_GETPEERUCRED /* Define to 1 if you have the `getprogname' function. */ #undef HAVE_GETPROGNAME /* Define to 1 if you have the `getzoneid' function. */ #undef HAVE_GETZONEID /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Have Quartz */ #undef XQUARTZ /* Support application updating through sparkle. */ #undef XQUARTZ_SPARKLE /* Prefix to use for bundle identifiers */ #undef BUNDLE_ID_PREFIX /* Build a standalone xpbproxy */ #undef STANDALONE_XPBPROXY /* Define to 1 if you have the `bsd' library (-lbsd). */ #undef HAVE_LIBBSD /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_AGPGART_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_APM_BIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FB_H /* Define to 1 if you have the `memfd_create' function. */ #undef HAVE_MEMFD_CREATE /* Define to 1 if you have the `mkostemp' function. */ #undef HAVE_MKOSTEMP /* Define to 1 if you have the `mmap' function. */ #undef HAVE_MMAP /* Define to 1 if you have the function pthread_setname_np(const char*) */ #undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID /* Define to 1 if you have the function pthread_setname_np(pthread_t, const char*) */ #undef HAVE_PTHREAD_SETNAME_NP_WITH_TID /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `reallocarray' function. */ #undef HAVE_REALLOCARRAY /* Define to 1 if you have the `arc4random_buf' function. */ #undef HAVE_ARC4RANDOM_BUF /* Define to use libc SHA1 functions */ #undef HAVE_SHA1_IN_LIBC /* Define to use CommonCrypto SHA1 functions */ #undef HAVE_SHA1_IN_COMMONCRYPTO /* Define to use CryptoAPI SHA1 functions */ #undef HAVE_SHA1_IN_CRYPTOAPI /* Define to use libmd SHA1 functions */ #undef HAVE_SHA1_IN_LIBMD /* Define to use libgcrypt SHA1 functions */ #undef HAVE_SHA1_IN_LIBGCRYPT /* Define to use libnettle SHA1 functions */ #undef HAVE_SHA1_IN_LIBNETTLE /* Define to use libsha1 for SHA1 */ #undef HAVE_SHA1_IN_LIBSHA1 /* Define to 1 if you have the `shmctl64' function. */ #undef HAVE_SHMCTL64 /* Define to 1 if the system has the type 'socklen_t'. */ #undef HAVE_SOCKLEN_T /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if libsystemd-daemon is available */ #undef HAVE_SYSTEMD_DAEMON /* Define to 1 if SYSV IPC is available */ #undef HAVE_SYSV_IPC /* Define to 1 if you have the header file. */ #undef HAVE_SYS_AGPIO_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define to 1 if you have the `timingsafe_memcmp' function. */ #undef HAVE_TIMINGSAFE_MEMCMP /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_FNMATCH_H /* Have /dev/urandom */ #undef HAVE_URANDOM /* Define to 1 if you have the `vasprintf' function. */ #undef HAVE_VASPRINTF /* Support IPv6 for TCP connections */ #undef IPv6 /* Support os-specific local connections */ #undef LOCALCONN /* Support MIT-SHM Extension */ #undef MITSHM /* Enable some debugging code */ #undef DEBUG /* Name of package */ #undef PACKAGE /* Internal define for Xinerama */ #undef PANORAMIX /* Support Present extension */ #undef PRESENT /* Overall prefix */ #undef PROJECTROOT /* Support RANDR extension */ #undef RANDR /* Support Record extension */ #undef XRECORD /* Support RENDER extension */ #undef RENDER /* Support X resource extension */ #undef RES /* Support client ID tracking in X resource extension */ #undef CLIENTIDS /* Support MIT-SCREEN-SAVER extension */ #undef SCREENSAVER /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ #undef SECURE_RPC /* Support SHAPE extension */ #undef SHAPE /* Where to install Xorg.bin and Xorg.wrap */ #undef SUID_WRAPPER_DIR /* Define to 1 on systems derived from System V Release 4 */ #undef SVR4 /* sysconfdir */ #undef SYSCONFDIR /* Support TCP socket connections */ #undef TCPCONN /* Support UNIX socket connections */ #undef UNIXCONN /* Build X string registry */ #undef XREGISTRY /* Build X-ACE extension */ #undef XACE /* Build SELinux extension */ #undef XSELINUX /* Support XCMisc extension */ #undef XCMISC /* Build Security extension */ #undef XCSECURITY /* Support Xdmcp */ #undef XDMCP /* Build XFree86 BigFont extension */ #undef XF86BIGFONT /* Support XFree86 Video Mode extension */ #undef XF86VIDMODE /* Support XFixes extension */ #undef XFIXES /* Build XDGA support */ #undef XFreeXDGA /* Support Xinerama extension */ #undef XINERAMA /* Current Xorg version */ #undef XORG_VERSION_CURRENT /* Build Xv Extension */ #undef XvExtension /* Build XvMC Extension */ #undef XvMCExtension /* Support XSync extension */ #undef XSYNC /* Support XTest extension */ #undef XTEST /* Support Xv extension */ #undef XV /* Support DRI extension */ #undef XF86DRI /* Build DRI2 extension */ #undef DRI2 /* Build DBE support */ #undef DBE /* Vendor name */ #undef XVENDORNAME /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Enable GNU and other extensions to the C environment for GLIBC */ #undef _GNU_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef pid_t /* Build Rootless code */ #undef ROOTLESS /* Define to 1 if unsigned long is 64 bits. */ #undef _XSERVER64 /* System is BSD-like */ #undef CSRG_BASED /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ #undef BSD44SOCKETS /* Support D-Bus */ #undef HAVE_DBUS /* Use libudev for input hotplug */ #undef CONFIG_UDEV /* Use libudev for kms enumeration */ #undef CONFIG_UDEV_KMS /* Use udev_monitor_filter_add_match_tag() */ #undef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG /* Use udev_enumerate_add_match_tag() */ #undef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG /* Enable D-Bus core */ #undef NEED_DBUS /* Support HAL for hotplug */ #undef CONFIG_HAL /* Enable systemd-logind integration */ #undef SYSTEMD_LOGIND 1 /* Have a monotonic clock from clock_gettime() */ #undef MONOTONIC_CLOCK /* Define to 1 if the DTrace Xserver provider probes should be built in */ #undef XSERVER_DTRACE /* Define to 1 if typeof works with your compiler. */ #undef HAVE_TYPEOF /* Define to __typeof__ if your compiler spells it that way. */ #undef typeof /* Correctly set _XSERVER64 for OSX fat binaries */ #ifdef __APPLE__ #include "dix-config-apple-verbatim.h" #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Defined if needed to expose struct msghdr.msg_control */ #undef _XOPEN_SOURCE /* Have support for X shared memory fence library (xshmfence) */ #undef HAVE_XSHMFENCE /* Use XTrans FD passing support */ #undef XTRANS_SEND_FDS /* Wrap SIGBUS to catch MIT-SHM faults */ #undef BUSFAULT /* Don't let Xdefs.h define 'pointer' */ #define _XTYPEDEF_POINTER 1 /* Don't let XIproto define 'Pointer' */ #define _XITYPEDEF_POINTER 1 /* Ask fontsproto to make font path element names const */ #define FONT_PATH_ELEMENT_NAME_CONST 1 /* Build GLAMOR */ #undef GLAMOR /* Build glamor's GBM-based EGL support */ #undef GLAMOR_HAS_GBM /* Build glamor/gbm has linear support */ #undef GLAMOR_HAS_GBM_LINEAR /* GBM has modifiers support */ #undef GBM_BO_WITH_MODIFIERS /* Glamor can use eglQueryDmaBuf* functions */ #undef GLAMOR_HAS_EGL_QUERY_DMABUF /* Glamor can use EGL_MESA_query_driver functions */ #undef GLAMOR_HAS_EGL_QUERY_DRIVER /* byte order */ #undef X_BYTE_ORDER /* Listen on TCP socket */ #undef LISTEN_TCP /* Listen on Unix socket */ #undef LISTEN_UNIX /* Listen on local socket */ #undef LISTEN_LOCAL /* Define if no local socket credentials interface exists */ #undef NO_LOCAL_CLIENT_CRED /* Have setitimer support */ #undef HAVE_SETITIMER /* Have posix_fallocate() */ #undef HAVE_POSIX_FALLOCATE /* Use input thread */ #undef INPUTTHREAD /* Have poll() */ #undef HAVE_POLL /* Have epoll_create1() */ #undef HAVE_EPOLL_CREATE1 /* Have header */ #undef HAVE_SYS_SYSMACROS_H /* Have sigprocmask */ #undef HAVE_SIGPROCMASK /* Have isastream */ #undef HAVE_ISASTREAM #endif /* _DIX_CONFIG_H_ */ xorg-server-21.1.16/include/do-not-use-config.h.in0000644000175000017500000005034214757411114015275 /* include/do-not-use-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Default base font path */ #undef BASE_FONT_PATH /* Support BigRequests extension */ #undef BIGREQS /* Define to 1 if `struct sockaddr_in' has a `sin_len' member */ #undef BSD44SOCKETS /* Builder address */ #undef BUILDERADDR /* Builder string */ #undef BUILDERSTRING /* Prefix to use for bundle identifiers */ #undef BUNDLE_ID_PREFIX /* Include busfault OS API */ #undef BUSFAULT /* Support client ID tracking */ #undef CLIENTIDS /* Default font path */ #undef COMPILEDDEFAULTFONTPATH /* Support Composite Extension */ #undef COMPOSITE /* Use the HAL hotplug API */ #undef CONFIG_HAL /* Use libudev for input hotplug */ #undef CONFIG_UDEV /* Use libudev for kms enumeration */ #undef CONFIG_UDEV_KMS /* Use wscons for input auto configuration */ #undef CONFIG_WSCONS /* System is BSD-like */ #undef CSRG_BASED /* Simple debug messages */ #undef CYGDEBUG /* Debug window manager */ #undef CYGMULTIWINDOW_DEBUG /* Debug messages for window handling */ #undef CYGWINDOWING_DEBUG /* Support Damage extension */ #undef DAMAGE /* Support DBE extension */ #undef DBE /* Use ddxBeforeReset */ #undef DDXBEFORERESET /* Use OsVendorVErrorF */ #undef DDXOSVERRORF /* Enable debugging code */ #undef DEBUG /* Default library install path */ #undef DEFAULT_LIBRARY_PATH /* Default log location */ #undef DEFAULT_LOGDIR /* Default logfile prefix */ #undef DEFAULT_LOGPREFIX /* Default module search path */ #undef DEFAULT_MODULE_PATH /* Default XDG_DATA dir under HOME */ #undef DEFAULT_XDG_DATA_HOME /* Default log dir under XDG_DATA_HOME */ #undef DEFAULT_XDG_DATA_HOME_LOGDIR /* Support DGA extension */ #undef DGA /* Support DPMS extension */ #undef DPMSExtension /* Build DRI2 extension */ #undef DRI2 /* Build DRI3 extension */ #undef DRI3 /* Default DRI driver path */ #undef DRI_DRIVER_PATH /* Fallback input driver */ #undef FALLBACK_INPUT_DRIVER /* Have gbm_bo_create_with_modifiers */ #undef GBM_BO_WITH_MODIFIERS /* Build glamor */ #undef GLAMOR /* Have GLAMOR_HAS_EGL_QUERY_DMABUF */ #undef GLAMOR_HAS_EGL_QUERY_DMABUF /* Have GLAMOR_HAS_EGL_QUERY_DRIVER */ #undef GLAMOR_HAS_EGL_QUERY_DRIVER /* Build glamor with GBM-based EGL support */ #undef GLAMOR_HAS_GBM /* Have GBM_BO_USE_LINEAR */ #undef GLAMOR_HAS_GBM_LINEAR /* Build GLX extension */ #undef GLXEXT /* Support XDM-AUTH*-1 */ #undef HASXDMAUTH /* System has /dev/xf86 aperture driver */ #undef HAS_APERTURE_DRV /* Cygwin has /dev/windows for signaling new win32 messages */ #undef HAS_DEVWINDOWS /* Support SHM */ #undef HAS_SHM /* Use Windows sockets */ #undef HAS_WINSOCK /* Define to 1 if you have the 'authdes_create' function. */ #undef HAVE_AUTHDES_CREATE /* Define to 1 if you have the 'authdes_seccreate' function. */ #undef HAVE_AUTHDES_SECCREATE /* Has backtrace support */ #undef HAVE_BACKTRACE /* Define to 1 if you have the 'cbrt' function. */ #undef HAVE_CBRT /* Define to 1 if you have the 'clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Have D-Bus support */ #undef HAVE_DBUS /* Define to 1 if you have the declaration of 'program_invocation_short_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the 'epoll_create1' function. */ #undef HAVE_EPOLL_CREATE1 /* Have execinfo.h */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FNMATCH_H /* Define to 1 if you have the 'getdtablesize' function. */ #undef HAVE_GETDTABLESIZE /* Define to 1 if you have the 'geteuid' function. */ #undef HAVE_GETEUID /* Define to 1 if you have the 'getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the 'getpeereid' function. */ #undef HAVE_GETPEEREID /* Define to 1 if you have the 'getpeerucred' function. */ #undef HAVE_GETPEERUCRED /* Define to 1 if you have the 'getprogname' function. */ #undef HAVE_GETPROGNAME /* Define to 1 if you have the 'getresuid' function. */ #undef HAVE_GETRESUID /* Define to 1 if you have the 'getuid' function. */ #undef HAVE_GETUID /* Define to 1 if you have the 'getzoneid' function. */ #undef HAVE_GETZONEID /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the 'isastream' function. */ #undef HAVE_ISASTREAM /* Define to 1 if you have the 'issetugid' function. */ #undef HAVE_ISSETUGID /* Define to 1 if you have the 'audit' library (-laudit). */ #undef HAVE_LIBAUDIT /* Define to 1 if you have the header file. */ #undef HAVE_LIBAUDIT_H /* Define to 1 if you have the 'm' library (-lm). */ #undef HAVE_LIBM /* Have libunwind support */ #undef HAVE_LIBUNWIND /* Define to 1 if you have the 'ws2_32' library (-lws2_32). */ #undef HAVE_LIBWS2_32 /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_AGPGART_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_APM_BIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_FB_H /* Define to 1 if you have the 'memfd_create' function. */ #undef HAVE_MEMFD_CREATE /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H /* Define to 1 if you have the 'mkostemp' function. */ #undef HAVE_MKOSTEMP /* Define to 1 if you have the 'mmap' function. */ #undef HAVE_MMAP /* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the 'poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the 'posix_fallocate' function. */ #undef HAVE_POSIX_FALLOCATE /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT /* Have function pthread_setname_np(const char*) */ #undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID /* Have function pthread_setname_np(pthread_t, const char*) */ #undef HAVE_PTHREAD_SETNAME_NP_WITH_TID /* Define to 1 if you have the 'reallocarray' function. */ #undef HAVE_REALLOCARRAY /* Define to 1 if you have the 'seteuid' function. */ #undef HAVE_SETEUID /* Define to 1 if you have the 'setitimer' function. */ #undef HAVE_SETITIMER /* Use CommonCrypto SHA1 functions */ #undef HAVE_SHA1_IN_COMMONCRYPTO /* Use CryptoAPI SHA1 functions */ #undef HAVE_SHA1_IN_CRYPTOAPI /* Use libc SHA1 functions */ #undef HAVE_SHA1_IN_LIBC /* Use libgcrypt SHA1 functions */ #undef HAVE_SHA1_IN_LIBGCRYPT /* Use libmd SHA1 functions */ #undef HAVE_SHA1_IN_LIBMD /* Use static libnettle SHA1 functions */ #undef HAVE_SHA1_IN_LIBNETTLE /* Use libsha1 for SHA1 */ #undef HAVE_SHA1_IN_LIBSHA1 /* Define to 1 if you have the 'shmctl64' function. */ #undef HAVE_SHMCTL64 /* Have sigaction function */ #undef HAVE_SIGACTION /* Define to 1 if you have the 'sigprocmask' function. */ #undef HAVE_SIGPROCMASK /* Define to 1 if the system has the type 'socklen_t'. */ #undef HAVE_SOCKLEN_T /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the 'strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the 'strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the 'strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the 'strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the 'strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if libsystemd-daemon is available */ #undef HAVE_SYSTEMD_DAEMON /* Define to 1 if SYSV IPC is available */ #undef HAVE_SYSV_IPC /* Define to 1 if you have the header file. */ #undef HAVE_SYS_AGPGART_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_AGPIO_H /* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_KD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_LINKER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MKDEV_H /* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSMACROS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UTSNAME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VT_H /* Define to 1 if you have the 'timingsafe_memcmp' function. */ #undef HAVE_TIMINGSAFE_MEMCMP /* Define to 1 if typeof works with your compiler. */ #undef HAVE_TYPEOF /* Define to 1 if you have the 'udev_enumerate_add_match_tag' function. */ #undef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG /* Define to 1 if you have the 'udev_monitor_filter_add_match_tag' function. */ #undef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the 'vasprintf' function. */ #undef HAVE_VASPRINTF /* Define to 1 if you have the 'vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if you have the 'walkcontext' function. */ #undef HAVE_WALKCONTEXT /* Define to 1 if you have the header file. */ #undef HAVE_WCHAR_H /* Have xshmfence support */ #undef HAVE_XSHMFENCE /* Use a separate input thread */ #undef INPUTTHREAD /* Support IPv6 for TCP connections */ #undef IPv6 /* Listen on local socket */ #undef LISTEN_LOCAL /* Listen on TCP socket */ #undef LISTEN_TCP /* Listen on Unix socket */ #undef LISTEN_UNIX /* Support os-specific local connections */ #undef LOCALCONN /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Support MIT-SHM extension */ #undef MITSHM /* Have monotonic clock from clock_gettime() */ #undef MONOTONIC_CLOCK /* Enable D-Bus core */ #undef NEED_DBUS /* Need XFree86 helper functions */ #undef NEED_XF86_PROTOTYPES /* Need XFree86 typedefs */ #undef NEED_XF86_TYPES /* Define to 1 if no local socket credentials interface exists */ #undef NO_LOCAL_CLIENT_CRED /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Major version of this package */ #undef PACKAGE_VERSION_MAJOR /* Minor version of this package */ #undef PACKAGE_VERSION_MINOR /* Patch version of this package */ #undef PACKAGE_VERSION_PATCHLEVEL /* Internal define for Xinerama */ #undef PANORAMIX /* System has PC console */ #undef PCCONS_SUPPORT /* Default PCI text file ID path */ #undef PCI_TXT_IDS_PATH /* System has PC console */ #undef PCVT_SUPPORT /* Support Present extension */ #undef PRESENT /* Overall prefix */ #undef PROJECTROOT /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Support RANDR extension */ #undef RANDR /* Make PROJECT_ROOT relative to the xserver location */ #undef RELOCATE_PROJECTROOT /* Support RENDER extension */ #undef RENDER /* Support X resource extension */ #undef RES /* Build Rootless code */ #undef ROOTLESS /* Support MIT-SCREEN-SAVER extension */ #undef SCREENSAVER /* Support Secure RPC ("SUN-DES-1") authentication for X11 clients */ #undef SECURE_RPC /* Server miscellaneous config path */ #undef SERVER_MISC_CONFIG_PATH /* Support SHAPE extension */ #undef SHAPE /* The size of 'unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* Build a standalone xpbproxy */ #undef STANDALONE_XPBPROXY /* Define to 1 if all of the C89 standard headers exist (not just the ones required in a freestanding environment). This macro is provided for backward compatibility; new code need not use it. */ #undef STDC_HEADERS /* Where to install the Xorg binary and Xorg.wrap */ #undef SUID_WRAPPER_DIR /* Define to 1 on systems derived from System V Release 4 */ #undef SVR4 /* sysconfdir */ #undef SYSCONFDIR /* System has syscons console */ #undef SYSCONS_SUPPORT /* Enable systemd-logind integration */ #undef SYSTEMD_LOGIND /* Support TCP socket connections */ #undef TCPCONN /* Support UNIX socket connections */ #undef UNIXCONN /* NetBSD PIO alpha IO */ #undef USE_ALPHA_PIO /* BSD AMD64 iopl */ #undef USE_AMD64_IOPL /* BSD /dev/io */ #undef USE_DEV_IO /* BSD i386 iopl */ #undef USE_I386_IOPL /* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable general extensions on macOS. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable X/Open compliant socket functions that do not require linking with -lxnet on HP-UX 11.11. */ #ifndef _HPUX_ALT_XOPEN_SOCKET_API # undef _HPUX_ALT_XOPEN_SOCKET_API #endif /* Identify the host operating system as Minix. This macro does not affect the system headers' behavior. A future release of Autoconf may stop defining this macro. */ #ifndef _MINIX # undef _MINIX #endif /* Enable general extensions on NetBSD. Enable NetBSD compatibility extensions on Minix. */ #ifndef _NETBSD_SOURCE # undef _NETBSD_SOURCE #endif /* Enable OpenBSD compatibility extensions on NetBSD. Oddly enough, this does nothing on OpenBSD. */ #ifndef _OPENBSD_SOURCE # undef _OPENBSD_SOURCE #endif /* Define to 1 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_SOURCE # undef _POSIX_SOURCE #endif /* Define to 2 if needed for POSIX-compatible behavior. */ #ifndef _POSIX_1_SOURCE # undef _POSIX_1_SOURCE #endif /* Enable POSIX-compatible threading on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ # undef __STDC_WANT_IEC_60559_BFP_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif /* Enable extensions specified by C23 Annex F. */ #ifndef __STDC_WANT_IEC_60559_EXT__ # undef __STDC_WANT_IEC_60559_EXT__ #endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif /* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */ #ifndef __STDC_WANT_LIB_EXT2__ # undef __STDC_WANT_LIB_EXT2__ #endif /* Enable extensions specified by ISO/IEC 24747:2009. */ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__ # undef __STDC_WANT_MATH_SPEC_FUNCS__ #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable X/Open extensions. Define to 500 only if necessary to make mbstate_t available. */ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif /* Vendor man version */ #undef VENDOR_MAN_VERSION /* Vendor name */ #undef VENDOR_NAME /* Vendor name */ #undef VENDOR_NAME_SHORT /* Vendor release */ #undef VENDOR_RELEASE /* Version number of package */ #undef VERSION /* Building with libdrm support */ #undef WITH_LIBDRM /* Building vgahw module */ #undef WITH_VGAHW /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* System has wscons console */ #undef WSCONS_SUPPORT /* Build X-ACE extension */ #undef XACE /* Support XCMisc extension */ #undef XCMISC /* Name of configuration directory */ #undef XCONFIGDIR /* Name of configuration file */ #undef XCONFIGFILE /* Build Security extension */ #undef XCSECURITY /* Support XDM Control Protocol */ #undef XDMCP /* Support XF86 Big font extension */ #undef XF86BIGFONT /* Name of configuration file */ #undef XF86CONFIGFILE /* Build DRI extension */ #undef XF86DRI /* Support XFree86 Video Mode extension */ #undef XF86VIDMODE /* Support XFixes extension */ #undef XFIXES /* Building XFree86 server */ #undef XFree86Server /* Build XDGA support */ #undef XFreeXDGA /* Support Xinerama extension */ #undef XINERAMA /* Support X Input extension */ #undef XINPUT /* Path to XKB data */ #undef XKB_BASE_DIRECTORY /* Path to XKB bin dir */ #undef XKB_BIN_DIRECTORY /* Default XKB layout */ #undef XKB_DFLT_LAYOUT /* Default XKB model */ #undef XKB_DFLT_MODEL /* Default XKB options */ #undef XKB_DFLT_OPTIONS /* Default XKB ruleset */ #undef XKB_DFLT_RULES /* Default XKB variant */ #undef XKB_DFLT_VARIANT /* Path to XKB output dir */ #undef XKM_OUTPUT_DIR /* Building Xorg server */ #undef XORGSERVER /* Vendor man version */ #undef XORG_MAN_VERSION /* Building Xorg server */ #undef XORG_SERVER /* Current Xorg version */ #undef XORG_VERSION_CURRENT /* Have Quartz */ #undef XQUARTZ /* Support application updating through sparkle. */ #undef XQUARTZ_SPARKLE /* Support Record extension */ #undef XRECORD /* Build SELinux extension */ #undef XSELINUX /* Define to 1 if the DTrace Xserver provider probes should be built in. */ #undef XSERVER_DTRACE /* Use libpciaccess for all pci manipulation */ #undef XSERVER_LIBPCIACCESS /* X server supports platform device enumeration */ #undef XSERVER_PLATFORM_BUS /* Support XSync extension */ #undef XSYNC /* Support XTest extension */ #undef XTEST /* Enable xtrans fd passing support */ #undef XTRANS_SEND_FDS /* Support Xv extension */ #undef XV /* Vendor name */ #undef XVENDORNAME /* Short vendor name */ #undef XVENDORNAMESHORT /* byte order */ #undef X_BYTE_ORDER /* Build Xv extension */ #undef XvExtension /* Build XvMC extension */ #undef XvMCExtension /* Define to 1 if 'lex' declares 'yytext' as a 'char *' by default, not a 'char[]'. */ #undef YYTEXT_POINTER /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Enable GNU and other extensions to the C environment for glibc */ #undef _GNU_SOURCE /* Define to 1 on platforms where this makes off_t a 64-bit type. */ #undef _LARGE_FILES /* Number of bits in time_t, on hosts where this is settable. */ #undef _TIME_BITS /* Defined if needed to expose struct msghdr.msg_control */ #undef _XOPEN_SOURCE /* Define to 1 if unsigned long is 64 bits. */ #undef _XSERVER64 /* Define to 1 on platforms where this makes time_t a 64-bit type. */ #undef __MINGW_USE_VC2005_COMPAT /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ /* Name of X server */ #undef __XSERVERNAME__ /* Define to empty if 'const' does not conform to ANSI C. */ #undef const /* Define as a signed integer type capable of holding a process identifier. */ #undef pid_t /* Define to __typeof__ if your compiler spells it that way. */ #undef typeof xorg-server-21.1.16/include/version-config.h.in0000644000175000017500000000040214757411105014760 /* version-config.h.in: not generated */ #ifndef VERSION_CONFIG_H #define VERSION_CONFIG_H /* Vendor man version */ #undef VENDOR_MAN_VERSION /* Vendor name */ #undef VENDOR_NAME /* Vendor release */ #undef VENDOR_RELEASE #endif /* VERSION_CONFIG_H */ xorg-server-21.1.16/include/xkb-config.h.in0000644000175000017500000000111314757411105014057 /* xkb-config.h.in: not at all generated. -*- c -*- * */ #ifndef _XKB_CONFIG_H_ #define _XKB_CONFIG_H_ /* Default set of XKB rules. */ #undef XKB_DFLT_RULES /* Default XKB model. */ #undef XKB_DFLT_MODEL /* Default XKB layout. */ #undef XKB_DFLT_LAYOUT /* Default XKB variant. */ #undef XKB_DFLT_VARIANT /* Default XKB options. */ #undef XKB_DFLT_OPTIONS /* Path to XKB definitions. */ #undef XKB_BASE_DIRECTORY /* Path to xkbcomp. */ #undef XKB_BIN_DIRECTORY /* XKB output dir for compiled keymaps. */ #undef XKM_OUTPUT_DIR #endif /* _XKB_CONFIG_H_ */ xorg-server-21.1.16/include/xorg-config.h.in0000644000175000017500000000622014757411105014256 /* xorg-config.h.in: not at all generated. -*- c -*- * * This file differs from xorg-server.h.in in that -server is installed * with the rest of the SDK for external drivers/modules to use, whereas * -config is for internal use only (i.e. building the DDX). * */ #ifndef _XORG_CONFIG_H_ #define _XORG_CONFIG_H_ #include #include /* Building Xorg server. */ #undef XORGSERVER /* Current X.Org version. */ #undef XORG_VERSION_CURRENT /* Name of X server. */ #undef __XSERVERNAME__ /* URL to go to for support. */ #undef __VENDORDWEBSUPPORT__ /* Built-in output drivers. */ #undef DRIVERS /* Built-in input drivers. */ #undef IDRIVERS /* Path to configuration file. */ #undef XF86CONFIGFILE /* Path to configuration file. */ #undef XCONFIGFILE /* Name of configuration directory. */ #undef XCONFIGDIR /* Path to loadable modules. */ #undef DEFAULT_MODULE_PATH /* Path to installed libraries. */ #undef DEFAULT_LIBRARY_PATH /* Default log location */ #undef DEFAULT_LOGDIR /* Default logfile prefix */ #undef DEFAULT_LOGPREFIX /* Default XDG_DATA dir under HOME */ #undef DEFAULT_XDG_DATA_HOME /* Default log dir under XDG_DATA_HOME */ #undef DEFAULT_XDG_DATA_HOME_LOGDIR /* Building DRI-capable DDX. */ #undef XF86DRI /* Build DRI2 extension */ #undef DRI2 /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_KD_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VT_H /* Define to 1 if you have the `walkcontext' function (used on Solaris for xorg_backtrace in hw/xfree86/common/xf86Events.c */ #undef HAVE_WALKCONTEXT /* Define to 1 if unsigned long is 64 bits. */ #undef _XSERVER64 /* Building vgahw module */ #undef WITH_VGAHW /* NetBSD PIO alpha IO */ #undef USE_ALPHA_PIO /* BSD AMD64 iopl */ #undef USE_AMD64_IOPL /* BSD /dev/io */ #undef USE_DEV_IO /* BSD i386 iopl */ #undef USE_I386_IOPL /* System is BSD-like */ #undef CSRG_BASED /* System has PC console */ #undef PCCONS_SUPPORT /* System has PCVT console */ #undef PCVT_SUPPORT /* System has syscons console */ #undef SYSCONS_SUPPORT /* System has wscons console */ #undef WSCONS_SUPPORT /* System has /dev/xf86 aperture driver */ #undef HAS_APERTURE_DRV /* Has backtrace support */ #undef HAVE_BACKTRACE /* Name of the period field in struct kbd_repeat */ #undef LNX_KBD_PERIOD_NAME /* Have execinfo.h */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MKDEV_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSMACROS_H /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH /* Build with libdrm support */ #undef WITH_LIBDRM /* Use libpciaccess */ #undef XSERVER_LIBPCIACCESS /* Have setugid */ #undef HAVE_ISSETUGID /* Have getresuid */ #undef HAVE_GETRESUID /* Have X server platform bus support */ #undef XSERVER_PLATFORM_BUS /* Define to 1 if you have the `seteuid' function. */ #undef HAVE_SETEUID /* Fallback input driver if the assigned driver fails */ #undef FALLBACK_INPUT_DRIVER #endif /* _XORG_CONFIG_H_ */ xorg-server-21.1.16/include/xorg-server.h.in0000644000175000017500000001040714757411105014321 /* xorg-server.h.in -*- c -*- * * This file is the template file for the xorg-server.h file which gets * installed as part of the SDK. The #defines in this file overlap * with those from config.h, but only for those options that we want * to export to external modules. Boilerplate autotool #defines such * as HAVE_STUFF and PACKAGE_NAME is kept in config.h * * It is still possible to update config.h.in using autoheader, since * autoheader only creates a .h.in file for the first * AM_CONFIG_HEADER() line, and thus does not overwrite this file. * * However, it should be kept in sync with this file. */ #ifndef _XORG_SERVER_H_ #define _XORG_SERVER_H_ #ifdef HAVE_XORG_CONFIG_H #error Include xorg-config.h when building the X server #endif /* Support BigRequests extension */ #undef BIGREQS /* Default font path */ #undef COMPILEDDEFAULTFONTPATH /* Support Composite Extension */ #undef COMPOSITE /* Build DPMS extension */ #undef DPMSExtension /* Build DRI3 extension */ #undef DRI3 /* Build GLX extension */ #undef GLXEXT /* Support XDM-AUTH*-1 */ #undef HASXDMAUTH /* Support SHM */ #undef HAS_SHM /* Define to 1 if you have the `reallocarray' function. */ #undef HAVE_REALLOCARRAY /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strlcat' function. */ #undef HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Support IPv6 for TCP connections */ #undef IPv6 /* Support MIT-SHM Extension */ #undef MITSHM /* Internal define for Xinerama */ #undef PANORAMIX /* Support Present extension */ #undef PRESENT /* Support RANDR extension */ #undef RANDR /* Support RENDER extension */ #undef RENDER /* Support X resource extension */ #undef RES /* Support MIT-SCREEN-SAVER extension */ #undef SCREENSAVER /* Support SHAPE extension */ #undef SHAPE /* Define to 1 on systems derived from System V Release 4 */ #undef SVR4 /* Support TCP socket connections */ #undef TCPCONN /* Support UNIX socket connections */ #undef UNIXCONN /* Support XCMisc extension */ #undef XCMISC /* Support Xdmcp */ #undef XDMCP /* Build XFree86 BigFont extension */ #undef XF86BIGFONT /* Support XFree86 Video Mode extension */ #undef XF86VIDMODE /* Build XDGA support */ #undef XFreeXDGA /* Support Xinerama extension */ #undef XINERAMA /* Support X Input extension */ #undef XINPUT /* XKB default rules */ #undef XKB_DFLT_RULES /* Build DRI extension */ #undef XF86DRI /* Build DRI2 extension */ #undef DRI2 /* Build Xorg server */ #undef XORGSERVER /* Current Xorg version */ #undef XORG_VERSION_CURRENT /* Build Xv Extension */ #undef XvExtension /* Build XvMC Extension */ #undef XvMCExtension /* Support XSync extension */ #undef XSYNC /* Support XTest extension */ #undef XTEST /* Support Xv Extension */ #undef XV /* Vendor name */ #undef XVENDORNAME /* BSD-compliant source */ #undef _BSD_SOURCE /* POSIX-compliant source */ #undef _POSIX_SOURCE /* X/Open-compliant source */ #undef _XOPEN_SOURCE /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ /* Location of configuration file */ #undef XCONFIGFILE /* Name of X server */ #undef __XSERVERNAME__ /* Building vgahw module */ #undef WITH_VGAHW /* System is BSD-like */ #undef CSRG_BASED /* System has PC console */ #undef PCCONS_SUPPORT /* System has PCVT console */ #undef PCVT_SUPPORT /* System has syscons console */ #undef SYSCONS_SUPPORT /* System has wscons console */ #undef WSCONS_SUPPORT /* Loadable XFree86 server awesomeness */ #define XFree86LOADER /* Use libpciaccess */ #undef XSERVER_LIBPCIACCESS /* X Access Control Extension */ #undef XACE /* Have X server platform bus support */ #undef XSERVER_PLATFORM_BUS #ifdef _LP64 #define _XSERVER64 1 #endif /* Have support for X shared memory fence library (xshmfence) */ #undef HAVE_XSHMFENCE /* Use XTrans FD passing support */ #undef XTRANS_SEND_FDS /* Ask fontsproto to make font path element names const */ #define FONT_PATH_ELEMENT_NAME_CONST 1 /* byte order */ #undef X_BYTE_ORDER #endif /* _XORG_SERVER_H_ */ xorg-server-21.1.16/include/xwin-config.h.in0000644000175000017500000000124214757411105014263 /* * xwin-config.h.in * * This file has all defines used in the xwin ddx * */ #include /* Winsock networking */ #undef HAS_WINSOCK /* Cygwin has /dev/windows for signaling new win32 messages */ #undef HAS_DEVWINDOWS /* Switch on debug messages */ #undef CYGDEBUG #undef CYGWINDOWING_DEBUG #undef CYGMULTIWINDOW_DEBUG /* Define to 1 if unsigned long is 64 bits. */ #undef _XSERVER64 /* Short vendor name */ #undef XVENDORNAMESHORT /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ /* Default log location */ #undef DEFAULT_LOGDIR /* Whether we should re-locate the root to where the executable lives */ #undef RELOCATE_PROJECTROOT xorg-server-21.1.16/include/busfault.h0000644000175000017500000000311014757411105013247 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _BUSFAULT_H_ #define _BUSFAULT_H_ #include #ifdef BUSFAULT #include typedef void (*busfault_notify_ptr) (void *context); struct busfault * busfault_register_mmap(void *addr, size_t size, busfault_notify_ptr notify, void *context); void busfault_unregister(struct busfault *busfault); void busfault_check(void); Bool busfault_init(void); #endif #endif /* _BUSFAULT_H_ */ xorg-server-21.1.16/include/dbus-core.h0000644000175000017500000000351014757411105013311 /* * Copyright © 2013 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Hans de Goede */ #ifndef DBUS_CORE_H #define DBUS_CORE_H #ifdef NEED_DBUS #include typedef void (*dbus_core_connect_hook) (DBusConnection * connection, void *data); typedef void (*dbus_core_disconnect_hook) (void *data); struct dbus_core_hook { dbus_core_connect_hook connect; dbus_core_disconnect_hook disconnect; void *data; struct dbus_core_hook *next; }; int dbus_core_init(void); void dbus_core_fini(void); int dbus_core_add_hook(struct dbus_core_hook *hook); void dbus_core_remove_hook(struct dbus_core_hook *hook); #else #define dbus_core_init() #define dbus_core_fini() #endif #endif xorg-server-21.1.16/include/dix-config-apple-verbatim.h0000644000175000017500000000042714757411105016367 /* Do not include this file directly. It is included at the end of */ /* Correctly set _XSERVER64 for OSX fat binaries */ #if defined(__LP64__) && !defined(_XSERVER64) #define _XSERVER64 1 #elif !defined(__LP64__) && defined(_XSERVER64) #undef _XSERVER64 #endif xorg-server-21.1.16/include/eventconvert.h0000644000175000017500000000345714757411105014162 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef _EVENTCONVERT_H_ #include #include #include "input.h" #include "events.h" #include "eventstr.h" _X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count); _X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count); _X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi); _X_INTERNAL int GetCoreType(enum EventType type); _X_INTERNAL int GetXIType(enum EventType type); _X_INTERNAL int GetXI2Type(enum EventType type); _X_INTERNAL enum EventType GestureTypeToBegin(enum EventType type); _X_INTERNAL enum EventType GestureTypeToEnd(enum EventType type); #endif /* _EVENTCONVERT_H_ */ xorg-server-21.1.16/include/eventstr.h0000644000175000017500000003033114757411105013301 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifndef EVENTSTR_H #define EVENTSTR_H #include "inputstr.h" #include /** * @file events.h * This file describes the event structures used internally by the X * server during event generation and event processing. * * When are internal events used? * Events from input devices are stored as internal events in the EQ and * processed as internal events until late in the processing cycle. Only then * do they switch to their respective wire events. */ /** * Event types. Used exclusively internal to the server, not visible on the * protocol. * * Note: Keep KeyPress to Motion aligned with the core events. * Keep ET_Raw* in the same order as KeyPress - Motion */ enum EventType { ET_KeyPress = 2, ET_KeyRelease, ET_ButtonPress, ET_ButtonRelease, ET_Motion, ET_TouchBegin, ET_TouchUpdate, ET_TouchEnd, ET_TouchOwnership, ET_Enter, ET_Leave, ET_FocusIn, ET_FocusOut, ET_ProximityIn, ET_ProximityOut, ET_DeviceChanged, ET_Hierarchy, ET_DGAEvent, ET_RawKeyPress, ET_RawKeyRelease, ET_RawButtonPress, ET_RawButtonRelease, ET_RawMotion, ET_RawTouchBegin, ET_RawTouchUpdate, ET_RawTouchEnd, ET_XQuartz, ET_BarrierHit, ET_BarrierLeave, ET_GesturePinchBegin, ET_GesturePinchUpdate, ET_GesturePinchEnd, ET_GestureSwipeBegin, ET_GestureSwipeUpdate, ET_GestureSwipeEnd, ET_Internal = 0xFF /* First byte */ }; /** * How a DeviceEvent was provoked */ enum DeviceEventSource { EVENT_SOURCE_NORMAL = 0, /**< Default: from a user action (e.g. key press) */ EVENT_SOURCE_FOCUS, /**< Keys or buttons previously down on focus-in */ }; /** * Used for ALL input device events internal in the server until * copied into the matching protocol event. * * Note: We only use the device id because the DeviceIntPtr may become invalid while * the event is in the EQ. */ struct _DeviceEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< One of EventType */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device to post this event for */ int sourceid; /**< The physical source device */ union { uint32_t button; /**< Button number (also used in pointer emulating touch events) */ uint32_t key; /**< Key code */ } detail; uint32_t touchid; /**< Touch ID (client_id) */ int16_t root_x; /**< Pos relative to root window in integral data */ float root_x_frac; /**< Pos relative to root window in frac part */ int16_t root_y; /**< Pos relative to root window in integral part */ float root_y_frac; /**< Pos relative to root window in frac part */ uint8_t buttons[(MAX_BUTTONS + 7) / 8]; /**< Button mask */ struct { uint8_t mask[(MAX_VALUATORS + 7) / 8];/**< Valuator mask */ uint8_t mode[(MAX_VALUATORS + 7) / 8];/**< Valuator mode (Abs or Rel)*/ double data[MAX_VALUATORS]; /**< Valuator data */ } valuators; struct { uint32_t base; /**< XKB base modifiers */ uint32_t latched; /**< XKB latched modifiers */ uint32_t locked; /**< XKB locked modifiers */ uint32_t effective;/**< XKB effective modifiers */ } mods; struct { uint8_t base; /**< XKB base group */ uint8_t latched; /**< XKB latched group */ uint8_t locked; /**< XKB locked group */ uint8_t effective;/**< XKB effective group */ } group; Window root; /**< Root window of the event */ int corestate; /**< Core key/button state BEFORE the event */ int key_repeat; /**< Internally-generated key repeat event */ uint32_t flags; /**< Flags to be copied into the generated event */ uint32_t resource; /**< Touch event resource, only for TOUCH_REPLAYING */ enum DeviceEventSource source_type; /**< How this event was provoked */ }; /** * Generated internally whenever a touch ownership chain changes - an owner * has accepted or rejected a touch, or a grab/event selection in the delivery * chain has been removed. */ struct _TouchOwnershipEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< ET_TouchOwnership */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device to post this event for */ int sourceid; /**< The physical source device */ uint32_t touchid; /**< Touch ID (client_id) */ uint8_t reason; /**< ::XIAcceptTouch, ::XIRejectTouch */ uint32_t resource; /**< Provoking grab or event selection */ uint32_t flags; /**< Flags to be copied into the generated event */ }; /* Flags used in DeviceChangedEvent to signal if the slave has changed */ #define DEVCHANGE_SLAVE_SWITCH 0x2 /* Flags used in DeviceChangedEvent to signal whether the event was a * pointer event or a keyboard event */ #define DEVCHANGE_POINTER_EVENT 0x4 #define DEVCHANGE_KEYBOARD_EVENT 0x8 /* device capabilities changed */ #define DEVCHANGE_DEVICE_CHANGE 0x10 /** * Sent whenever a device's capabilities have changed. */ struct _DeviceChangedEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< ET_DeviceChanged */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device whose capabilities have changed */ int flags; /**< Mask of ::HAS_NEW_SLAVE, ::POINTER_EVENT, ::KEYBOARD_EVENT */ int masterid; /**< MD when event was generated */ int sourceid; /**< The device that caused the change */ struct { int num_buttons; /**< Number of buttons */ Atom names[MAX_BUTTONS];/**< Button names */ } buttons; int num_valuators; /**< Number of axes */ struct { uint32_t min; /**< Minimum value */ uint32_t max; /**< Maximum value */ double value; /**< Current value */ /* FIXME: frac parts of min/max */ uint32_t resolution; /**< Resolution counts/m */ uint8_t mode; /**< Relative or Absolute */ Atom name; /**< Axis name */ ScrollInfo scroll; /**< Smooth scrolling info */ } valuators[MAX_VALUATORS]; struct { int min_keycode; int max_keycode; } keys; }; #ifdef XFreeXDGA /** * DGAEvent, used by DGA to intercept and emulate input events. */ struct _DGAEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< ET_DGAEvent */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int subtype; /**< KeyPress, KeyRelease, ButtonPress, ButtonRelease, MotionNotify */ int detail; /**< Button number or key code */ int dx; /**< Relative x coordinate */ int dy; /**< Relative y coordinate */ int screen; /**< Screen number this event applies to */ uint16_t state; /**< Core modifier/button state */ }; #endif /** * Raw event, contains the data as posted by the device. */ struct _RawDeviceEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< ET_Raw */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device to post this event for */ int sourceid; /**< The physical source device */ union { uint32_t button; /**< Button number */ uint32_t key; /**< Key code */ } detail; struct { uint8_t mask[(MAX_VALUATORS + 7) / 8];/**< Valuator mask */ double data[MAX_VALUATORS]; /**< Valuator data */ double data_raw[MAX_VALUATORS]; /**< Valuator data as posted */ } valuators; uint32_t flags; /**< Flags to be copied into the generated event */ }; struct _BarrierEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< ET_BarrierHit, ET_BarrierLeave */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device to post this event for */ int sourceid; /**< The physical source device */ int barrierid; Window window; Window root; double dx; double dy; double root_x; double root_y; int16_t dt; int32_t event_id; uint32_t flags; }; struct _GestureEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< One of ET_Gesture{Pinch,Swipe}{Begin,Update,End} */ int length; /**< Length in bytes */ Time time; /**< Time in ms */ int deviceid; /**< Device to post this event for */ int sourceid; /**< The physical source device */ uint32_t num_touches; /**< The number of touches in this gesture */ double root_x; /**< Pos relative to root window */ double root_y; /**< Pos relative to root window */ double delta_x; double delta_y; double delta_unaccel_x; double delta_unaccel_y; double scale; /**< Only on ET_GesturePinch{Begin,Update} */ double delta_angle; /**< Only on ET_GesturePinch{Begin,Update} */ struct { uint32_t base; /**< XKB base modifiers */ uint32_t latched; /**< XKB latched modifiers */ uint32_t locked; /**< XKB locked modifiers */ uint32_t effective;/**< XKB effective modifiers */ } mods; struct { uint8_t base; /**< XKB base group */ uint8_t latched; /**< XKB latched group */ uint8_t locked; /**< XKB locked group */ uint8_t effective;/**< XKB effective group */ } group; Window root; /**< Root window of the event */ uint32_t flags; /**< Flags to be copied into the generated event */ }; #ifdef XQUARTZ #define XQUARTZ_EVENT_MAXARGS 5 struct _XQuartzEvent { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< Always ET_XQuartz */ int length; /**< Length in bytes */ Time time; /**< Time in ms. */ int subtype; /**< Subtype defined by XQuartz DDX */ uint32_t data[XQUARTZ_EVENT_MAXARGS]; /**< Up to 5 32bit values passed to handler */ }; #endif /** * Event type used inside the X server for input event * processing. */ union _InternalEvent { struct { unsigned char header; /**< Always ET_Internal */ enum EventType type; /**< One of ET_* */ int length; /**< Length in bytes */ Time time; /**< Time in ms. */ } any; DeviceEvent device_event; DeviceChangedEvent changed_event; TouchOwnershipEvent touch_ownership_event; BarrierEvent barrier_event; #ifdef XFreeXDGA DGAEvent dga_event; #endif RawDeviceEvent raw_event; #ifdef XQUARTZ XQuartzEvent xquartz_event; #endif GestureEvent gesture_event; }; extern void LeaveWindow(DeviceIntPtr dev); #endif xorg-server-21.1.16/include/inpututils.h0000644000175000017500000000635614757411105013661 /* * Copyright © 2010 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ #ifdef HAVE_DIX_CONFIG_H #include "dix-config.h" #endif #ifndef INPUTUTILS_H #define INPUTUTILS_H #include "input.h" #include "eventstr.h" #include extern Mask event_filters[MAXDEVICES][MAXEVENTS]; struct _ValuatorMask { int8_t last_bit; /* highest bit set in mask */ int8_t has_unaccelerated; uint8_t mask[(MAX_VALUATORS + 7) / 8]; double valuators[MAX_VALUATORS]; /* valuator data */ double unaccelerated[MAX_VALUATORS]; /* valuator data */ }; extern void verify_internal_event(const InternalEvent *ev); extern void init_device_event(DeviceEvent *event, DeviceIntPtr dev, Time ms, enum DeviceEventSource event_source); extern void init_gesture_event(GestureEvent *event, DeviceIntPtr dev, Time ms); extern int event_get_corestate(DeviceIntPtr mouse, DeviceIntPtr kbd); extern void event_set_state(DeviceIntPtr mouse, DeviceIntPtr kbd, DeviceEvent *event); extern void event_set_state_gesture(DeviceIntPtr kbd, GestureEvent *event); extern Mask event_get_filter_from_type(DeviceIntPtr dev, int evtype); extern Mask event_get_filter_from_xi2type(int evtype); FP3232 double_to_fp3232(double in); FP1616 double_to_fp1616(double in); double fp1616_to_double(FP1616 in); double fp3232_to_double(FP3232 in); XI2Mask *xi2mask_new(void); XI2Mask *xi2mask_new_with_size(size_t, size_t); /* don't use it */ void xi2mask_free(XI2Mask **mask); Bool xi2mask_isset(XI2Mask *mask, const DeviceIntPtr dev, int event_type); Bool xi2mask_isset_for_device(XI2Mask *mask, const DeviceIntPtr dev, int event_type); void xi2mask_set(XI2Mask *mask, int deviceid, int event_type); void xi2mask_zero(XI2Mask *mask, int deviceid); void xi2mask_merge(XI2Mask *dest, const XI2Mask *source); size_t xi2mask_num_masks(const XI2Mask *mask); size_t xi2mask_mask_size(const XI2Mask *mask); void xi2mask_set_one_mask(XI2Mask *xi2mask, int deviceid, const unsigned char *mask, size_t mask_size); const unsigned char *xi2mask_get_one_mask(const XI2Mask *xi2mask, int deviceid); Bool CopySprite(SpritePtr src, SpritePtr dst); #endif xorg-server-21.1.16/include/probes.h0000644000175000017500000000304614757411105012724 /* * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef XORG_PROBES_H #define XORG_PROBES_H #ifdef HAVE_DIX_CONFIG_H #include #endif /* definitions needed to include Dtrace probes in a source file */ #ifdef XSERVER_DTRACE #include typedef const char *string; typedef const uint8_t *const_uint8_p; typedef const double *const_double_p; #include "Xserver-dtrace.h" #endif #endif /* XORG_PROBES_H */ xorg-server-21.1.16/include/protocol-versions.h0000644000175000017500000001061414757411105015140 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * */ /** * This file specifies the server-supported protocol versions. */ #ifndef _PROTOCOL_VERSIONS_ #define _PROTOCOL_VERSIONS_ /* Apple DRI */ #define SERVER_APPLEDRI_MAJOR_VERSION 1 #define SERVER_APPLEDRI_MINOR_VERSION 0 #define SERVER_APPLEDRI_PATCH_VERSION 0 /* AppleWM */ #define SERVER_APPLEWM_MAJOR_VERSION 1 #define SERVER_APPLEWM_MINOR_VERSION 3 #define SERVER_APPLEWM_PATCH_VERSION 0 /* Composite */ #define SERVER_COMPOSITE_MAJOR_VERSION 0 #define SERVER_COMPOSITE_MINOR_VERSION 4 /* Damage */ #define SERVER_DAMAGE_MAJOR_VERSION 1 #define SERVER_DAMAGE_MINOR_VERSION 1 /* DRI3 */ #define SERVER_DRI3_MAJOR_VERSION 1 #define SERVER_DRI3_MINOR_VERSION 2 /* DMX */ #define SERVER_DMX_MAJOR_VERSION 2 #define SERVER_DMX_MINOR_VERSION 2 #define SERVER_DMX_PATCH_VERSION 20040604 /* Generic event extension */ #define SERVER_GE_MAJOR_VERSION 1 #define SERVER_GE_MINOR_VERSION 0 /* GLX */ #define SERVER_GLX_MAJOR_VERSION 1 #define SERVER_GLX_MINOR_VERSION 4 /* Xinerama */ #define SERVER_PANORAMIX_MAJOR_VERSION 1 #define SERVER_PANORAMIX_MINOR_VERSION 1 /* Present */ #define SERVER_PRESENT_MAJOR_VERSION 1 #define SERVER_PRESENT_MINOR_VERSION 2 /* RandR */ #define SERVER_RANDR_MAJOR_VERSION 1 #define SERVER_RANDR_MINOR_VERSION 6 /* Record */ #define SERVER_RECORD_MAJOR_VERSION 1 #define SERVER_RECORD_MINOR_VERSION 13 /* Render */ #define SERVER_RENDER_MAJOR_VERSION 0 #define SERVER_RENDER_MINOR_VERSION 11 /* RandR Xinerama */ #define SERVER_RRXINERAMA_MAJOR_VERSION 1 #define SERVER_RRXINERAMA_MINOR_VERSION 1 /* Screensaver */ #define SERVER_SAVER_MAJOR_VERSION 1 #define SERVER_SAVER_MINOR_VERSION 1 /* Security */ #define SERVER_SECURITY_MAJOR_VERSION 1 #define SERVER_SECURITY_MINOR_VERSION 0 /* Shape */ #define SERVER_SHAPE_MAJOR_VERSION 1 #define SERVER_SHAPE_MINOR_VERSION 1 /* SHM */ #define SERVER_SHM_MAJOR_VERSION 1 #if XTRANS_SEND_FDS #define SERVER_SHM_MINOR_VERSION 2 #else #define SERVER_SHM_MINOR_VERSION 1 #endif /* Sync */ #define SERVER_SYNC_MAJOR_VERSION 3 #define SERVER_SYNC_MINOR_VERSION 1 /* Windows DRI */ #define SERVER_WINDOWSDRI_MAJOR_VERSION 1 #define SERVER_WINDOWSDRI_MINOR_VERSION 0 #define SERVER_WINDOWSDRI_PATCH_VERSION 0 /* Windows WM */ #define SERVER_WINDOWSWM_MAJOR_VERSION 1 #define SERVER_WINDOWSWM_MINOR_VERSION 0 #define SERVER_WINDOWSWM_PATCH_VERSION 0 /* DGA */ #define SERVER_XDGA_MAJOR_VERSION 2 #define SERVER_XDGA_MINOR_VERSION 0 /* Big Font */ #define SERVER_XF86BIGFONT_MAJOR_VERSION 1 #define SERVER_XF86BIGFONT_MINOR_VERSION 1 /* DRI */ #define SERVER_XF86DRI_MAJOR_VERSION 4 #define SERVER_XF86DRI_MINOR_VERSION 1 #define SERVER_XF86DRI_PATCH_VERSION 20040604 /* Vidmode */ #define SERVER_XF86VIDMODE_MAJOR_VERSION 2 #define SERVER_XF86VIDMODE_MINOR_VERSION 2 /* Fixes */ #define SERVER_XFIXES_MAJOR_VERSION 6 #define SERVER_XFIXES_MINOR_VERSION 0 /* X Input */ #define SERVER_XI_MAJOR_VERSION 2 #define SERVER_XI_MINOR_VERSION 4 /* XKB */ #define SERVER_XKB_MAJOR_VERSION 1 #define SERVER_XKB_MINOR_VERSION 0 /* Resource */ #define SERVER_XRES_MAJOR_VERSION 1 #define SERVER_XRES_MINOR_VERSION 2 /* XvMC */ #define SERVER_XVMC_MAJOR_VERSION 1 #define SERVER_XVMC_MINOR_VERSION 1 #endif xorg-server-21.1.16/include/swaprep.h0000644000175000017500000002453214757411105013116 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ #ifndef SWAPREP_H #define SWAPREP_H 1 extern void Swap32Write(ClientPtr /* pClient */ , int /* size */ , CARD32 * /* pbuf */ ); extern void CopySwap32Write(ClientPtr /* pClient */ , int /* size */ , CARD32 * /* pbuf */ ); extern void CopySwap16Write(ClientPtr /* pClient */ , int /* size */ , short * /* pbuf */ ); extern void SGenericReply(ClientPtr /* pClient */ , int /* size */ , xGenericReply * /* pRep */ ); extern void SGetWindowAttributesReply(ClientPtr /* pClient */ , int /* size */ , xGetWindowAttributesReply * /* pRep */ ); extern void SGetGeometryReply(ClientPtr /* pClient */ , int /* size */ , xGetGeometryReply * /* pRep */ ); extern void SQueryTreeReply(ClientPtr /* pClient */ , int /* size */ , xQueryTreeReply * /* pRep */ ); extern void SInternAtomReply(ClientPtr /* pClient */ , int /* size */ , xInternAtomReply * /* pRep */ ); extern void SGetAtomNameReply(ClientPtr /* pClient */ , int /* size */ , xGetAtomNameReply * /* pRep */ ); extern void SGetPropertyReply(ClientPtr /* pClient */ , int /* size */ , xGetPropertyReply * /* pRep */ ); extern void SListPropertiesReply(ClientPtr /* pClient */ , int /* size */ , xListPropertiesReply * /* pRep */ ); extern void SGetSelectionOwnerReply(ClientPtr /* pClient */ , int /* size */ , xGetSelectionOwnerReply * /* pRep */ ); extern void SQueryPointerReply(ClientPtr /* pClient */ , int /* size */ , xQueryPointerReply * /* pRep */ ); extern void SwapTimeCoordWrite(ClientPtr /* pClient */ , int /* size */ , xTimecoord * /* pRep */ ); extern void SGetMotionEventsReply(ClientPtr /* pClient */ , int /* size */ , xGetMotionEventsReply * /* pRep */ ); extern void STranslateCoordsReply(ClientPtr /* pClient */ , int /* size */ , xTranslateCoordsReply * /* pRep */ ); extern void SGetInputFocusReply(ClientPtr /* pClient */ , int /* size */ , xGetInputFocusReply * /* pRep */ ); extern void SQueryKeymapReply(ClientPtr /* pClient */ , int /* size */ , xQueryKeymapReply * /* pRep */ ); extern void SQueryFontReply(ClientPtr /* pClient */ , int /* size */ , xQueryFontReply * /* pRep */ ); extern void SQueryTextExtentsReply(ClientPtr /* pClient */ , int /* size */ , xQueryTextExtentsReply * /* pRep */ ); extern void SListFontsReply(ClientPtr /* pClient */ , int /* size */ , xListFontsReply * /* pRep */ ); extern void SListFontsWithInfoReply(ClientPtr /* pClient */ , int /* size */ , xListFontsWithInfoReply * /* pRep */ ); extern void SGetFontPathReply(ClientPtr /* pClient */ , int /* size */ , xGetFontPathReply * /* pRep */ ); extern void SGetImageReply(ClientPtr /* pClient */ , int /* size */ , xGetImageReply * /* pRep */ ); extern void SListInstalledColormapsReply(ClientPtr /* pClient */ , int /* size */ , xListInstalledColormapsReply * /* pRep */ ); extern void SAllocColorReply(ClientPtr /* pClient */ , int /* size */ , xAllocColorReply * /* pRep */ ); extern void SAllocNamedColorReply(ClientPtr /* pClient */ , int /* size */ , xAllocNamedColorReply * /* pRep */ ); extern void SAllocColorCellsReply(ClientPtr /* pClient */ , int /* size */ , xAllocColorCellsReply * /* pRep */ ); extern void SAllocColorPlanesReply(ClientPtr /* pClient */ , int /* size */ , xAllocColorPlanesReply * /* pRep */ ); extern void SQColorsExtend(ClientPtr /* pClient */ , int /* size */ , xrgb * /* prgb */ ); extern void SQueryColorsReply(ClientPtr /* pClient */ , int /* size */ , xQueryColorsReply * /* pRep */ ); extern void SLookupColorReply(ClientPtr /* pClient */ , int /* size */ , xLookupColorReply * /* pRep */ ); extern void SQueryBestSizeReply(ClientPtr /* pClient */ , int /* size */ , xQueryBestSizeReply * /* pRep */ ); extern void SListExtensionsReply(ClientPtr /* pClient */ , int /* size */ , xListExtensionsReply * /* pRep */ ); extern void SGetKeyboardMappingReply(ClientPtr /* pClient */ , int /* size */ , xGetKeyboardMappingReply * /* pRep */ ); extern void SGetPointerMappingReply(ClientPtr /* pClient */ , int /* size */ , xGetPointerMappingReply * /* pRep */ ); extern void SGetModifierMappingReply(ClientPtr /* pClient */ , int /* size */ , xGetModifierMappingReply * /* pRep */ ); extern void SGetKeyboardControlReply(ClientPtr /* pClient */ , int /* size */ , xGetKeyboardControlReply * /* pRep */ ); extern void SGetPointerControlReply(ClientPtr /* pClient */ , int /* size */ , xGetPointerControlReply * /* pRep */ ); extern void SGetScreenSaverReply(ClientPtr /* pClient */ , int /* size */ , xGetScreenSaverReply * /* pRep */ ); extern void SLHostsExtend(ClientPtr /* pClient */ , int /* size */ , char * /* buf */ ); extern void SListHostsReply(ClientPtr /* pClient */ , int /* size */ , xListHostsReply * /* pRep */ ); extern void SErrorEvent(xError * /* from */ , xError * /* to */ ); extern void SwapConnSetupInfo(char * /* pInfo */ , char * /* pInfoTBase */ ); extern void WriteSConnectionInfo(ClientPtr /* pClient */ , unsigned long /* size */ , char * /* pInfo */ ); extern void SwapConnSetupPrefix(xConnSetupPrefix * /* pcspFrom */ , xConnSetupPrefix * /* pcspTo */ ); extern void WriteSConnSetupPrefix(ClientPtr /* pClient */ , xConnSetupPrefix * /* pcsp */ ); #undef SWAPREP_PROC #define SWAPREP_PROC(func) extern void func(xEvent * /* from */, xEvent * /* to */) SWAPREP_PROC(SCirculateEvent); SWAPREP_PROC(SClientMessageEvent); SWAPREP_PROC(SColormapEvent); SWAPREP_PROC(SConfigureNotifyEvent); SWAPREP_PROC(SConfigureRequestEvent); SWAPREP_PROC(SCreateNotifyEvent); SWAPREP_PROC(SDestroyNotifyEvent); SWAPREP_PROC(SEnterLeaveEvent); SWAPREP_PROC(SExposeEvent); SWAPREP_PROC(SFocusEvent); SWAPREP_PROC(SGraphicsExposureEvent); SWAPREP_PROC(SGravityEvent); SWAPREP_PROC(SKeyButtonPtrEvent); SWAPREP_PROC(SKeymapNotifyEvent); SWAPREP_PROC(SMapNotifyEvent); SWAPREP_PROC(SMapRequestEvent); SWAPREP_PROC(SMappingEvent); SWAPREP_PROC(SNoExposureEvent); SWAPREP_PROC(SPropertyEvent); SWAPREP_PROC(SReparentEvent); SWAPREP_PROC(SResizeRequestEvent); SWAPREP_PROC(SSelectionClearEvent); SWAPREP_PROC(SSelectionNotifyEvent); SWAPREP_PROC(SSelectionRequestEvent); SWAPREP_PROC(SUnmapNotifyEvent); SWAPREP_PROC(SVisibilityEvent); #undef SWAPREP_PROC #endif /* SWAPREP_H */ xorg-server-21.1.16/include/swapreq.h0000644000175000017500000000722214757411105013114 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ #ifndef SWAPREQ_H #define SWAPREQ_H 1 extern void SwapColorItem(xColorItem * /* pItem */ ); extern void SwapConnClientPrefix(xConnClientPrefix * /* pCCP */ ); #undef SWAPREQ_PROC #define SWAPREQ_PROC(func) extern int func(ClientPtr /* client */) SWAPREQ_PROC(SProcAllocColor); SWAPREQ_PROC(SProcAllocColorCells); SWAPREQ_PROC(SProcAllocColorPlanes); SWAPREQ_PROC(SProcAllocNamedColor); SWAPREQ_PROC(SProcChangeActivePointerGrab); SWAPREQ_PROC(SProcChangeGC); SWAPREQ_PROC(SProcChangeHosts); SWAPREQ_PROC(SProcChangeKeyboardControl); SWAPREQ_PROC(SProcChangeKeyboardMapping); SWAPREQ_PROC(SProcChangePointerControl); SWAPREQ_PROC(SProcChangeProperty); SWAPREQ_PROC(SProcChangeWindowAttributes); SWAPREQ_PROC(SProcClearToBackground); SWAPREQ_PROC(SProcConfigureWindow); SWAPREQ_PROC(SProcConvertSelection); SWAPREQ_PROC(SProcCopyArea); SWAPREQ_PROC(SProcCopyColormapAndFree); SWAPREQ_PROC(SProcCopyGC); SWAPREQ_PROC(SProcCopyPlane); SWAPREQ_PROC(SProcCreateColormap); SWAPREQ_PROC(SProcCreateCursor); SWAPREQ_PROC(SProcCreateGC); SWAPREQ_PROC(SProcCreateGlyphCursor); SWAPREQ_PROC(SProcCreatePixmap); SWAPREQ_PROC(SProcCreateWindow); SWAPREQ_PROC(SProcDeleteProperty); SWAPREQ_PROC(SProcFillPoly); SWAPREQ_PROC(SProcFreeColors); SWAPREQ_PROC(SProcGetImage); SWAPREQ_PROC(SProcGetMotionEvents); SWAPREQ_PROC(SProcGetProperty); SWAPREQ_PROC(SProcGrabButton); SWAPREQ_PROC(SProcGrabKey); SWAPREQ_PROC(SProcGrabKeyboard); SWAPREQ_PROC(SProcGrabPointer); SWAPREQ_PROC(SProcImageText); SWAPREQ_PROC(SProcInternAtom); SWAPREQ_PROC(SProcListFonts); SWAPREQ_PROC(SProcListFontsWithInfo); SWAPREQ_PROC(SProcLookupColor); SWAPREQ_PROC(SProcNoOperation); SWAPREQ_PROC(SProcOpenFont); SWAPREQ_PROC(SProcPoly); SWAPREQ_PROC(SProcPolyText); SWAPREQ_PROC(SProcPutImage); SWAPREQ_PROC(SProcQueryBestSize); SWAPREQ_PROC(SProcQueryColors); SWAPREQ_PROC(SProcQueryExtension); SWAPREQ_PROC(SProcRecolorCursor); SWAPREQ_PROC(SProcReparentWindow); SWAPREQ_PROC(SProcResourceReq); SWAPREQ_PROC(SProcRotateProperties); SWAPREQ_PROC(SProcSendEvent); SWAPREQ_PROC(SProcSetClipRectangles); SWAPREQ_PROC(SProcSetDashes); SWAPREQ_PROC(SProcSetFontPath); SWAPREQ_PROC(SProcSetInputFocus); SWAPREQ_PROC(SProcSetScreenSaver); SWAPREQ_PROC(SProcSetSelectionOwner); SWAPREQ_PROC(SProcSimpleReq); SWAPREQ_PROC(SProcStoreColors); SWAPREQ_PROC(SProcStoreNamedColor); SWAPREQ_PROC(SProcTranslateCoords); SWAPREQ_PROC(SProcUngrabButton); SWAPREQ_PROC(SProcUngrabKey); SWAPREQ_PROC(SProcWarpPointer); #undef SWAPREQ_PROC #endif /* SWAPREQ_H */ xorg-server-21.1.16/include/systemd-logind.h0000644000175000017500000000357314757411105014401 /* * Copyright © 2013 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Hans de Goede */ #ifndef SYSTEMD_LOGIND_H #define SYSTEMD_LOGIND_H #ifdef SYSTEMD_LOGIND int systemd_logind_init(void); void systemd_logind_fini(void); int systemd_logind_take_fd(int major, int minor, const char *path, Bool *paus); void systemd_logind_release_fd(int major, int minor, int fd); int systemd_logind_controls_session(void); void systemd_logind_vtenter(void); void systemd_logind_drop_master(void); #else #define systemd_logind_init() #define systemd_logind_fini() #define systemd_logind_take_fd(major, minor, path, paus) -1 #define systemd_logind_release_fd(major, minor, fd) close(fd) #define systemd_logind_controls_session() 0 #define systemd_logind_vtenter() #define systemd_logind_drop_master() #endif #endif xorg-server-21.1.16/include/vidmodestr.h0000644000175000017500000001610514757411105013612 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _VIDMODEPROC_H_ #define _VIDMODEPROC_H_ #include "displaymode.h" typedef enum { VIDMODE_H_DISPLAY, VIDMODE_H_SYNCSTART, VIDMODE_H_SYNCEND, VIDMODE_H_TOTAL, VIDMODE_H_SKEW, VIDMODE_V_DISPLAY, VIDMODE_V_SYNCSTART, VIDMODE_V_SYNCEND, VIDMODE_V_TOTAL, VIDMODE_FLAGS, VIDMODE_CLOCK } VidModeSelectMode; typedef enum { VIDMODE_MON_VENDOR, VIDMODE_MON_MODEL, VIDMODE_MON_NHSYNC, VIDMODE_MON_NVREFRESH, VIDMODE_MON_HSYNC_LO, VIDMODE_MON_HSYNC_HI, VIDMODE_MON_VREFRESH_LO, VIDMODE_MON_VREFRESH_HI } VidModeSelectMonitor; typedef union { const void *ptr; int i; float f; } vidMonitorValue; typedef Bool (*VidModeExtensionInitProcPtr) (ScreenPtr pScreen); typedef vidMonitorValue (*VidModeGetMonitorValueProcPtr) (ScreenPtr pScreen, int valtyp, int indx); typedef Bool (*VidModeGetEnabledProcPtr) (void); typedef Bool (*VidModeGetAllowNonLocalProcPtr) (void); typedef Bool (*VidModeGetCurrentModelineProcPtr) (ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock); typedef Bool (*VidModeGetFirstModelineProcPtr) (ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock); typedef Bool (*VidModeGetNextModelineProcPtr) (ScreenPtr pScreen, DisplayModePtr *mode, int *dotClock); typedef Bool (*VidModeDeleteModelineProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef Bool (*VidModeZoomViewportProcPtr) (ScreenPtr pScreen, int zoom); typedef Bool (*VidModeGetViewPortProcPtr) (ScreenPtr pScreen, int *x, int *y); typedef Bool (*VidModeSetViewPortProcPtr) (ScreenPtr pScreen, int x, int y); typedef Bool (*VidModeSwitchModeProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef Bool (*VidModeLockZoomProcPtr) (ScreenPtr pScreen, Bool lock); typedef int (*VidModeGetNumOfClocksProcPtr) (ScreenPtr pScreen, Bool *progClock); typedef Bool (*VidModeGetClocksProcPtr) (ScreenPtr pScreen, int *Clocks); typedef ModeStatus (*VidModeCheckModeForMonitorProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef ModeStatus (*VidModeCheckModeForDriverProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef void (*VidModeSetCrtcForModeProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef Bool (*VidModeAddModelineProcPtr) (ScreenPtr pScreen, DisplayModePtr mode); typedef int (*VidModeGetDotClockProcPtr) (ScreenPtr pScreen, int Clock); typedef int (*VidModeGetNumOfModesProcPtr) (ScreenPtr pScreen); typedef Bool (*VidModeSetGammaProcPtr) (ScreenPtr pScreen, float red, float green, float blue); typedef Bool (*VidModeGetGammaProcPtr) (ScreenPtr pScreen, float *red, float *green, float *blue); typedef Bool (*VidModeSetGammaRampProcPtr) (ScreenPtr pScreen, int size, CARD16 *red, CARD16 *green, CARD16 *blue); typedef Bool (*VidModeGetGammaRampProcPtr) (ScreenPtr pScreen, int size, CARD16 *red, CARD16 *green, CARD16 *blue); typedef int (*VidModeGetGammaRampSizeProcPtr) (ScreenPtr pScreen); typedef struct { DisplayModePtr First; DisplayModePtr Next; int Flags; VidModeExtensionInitProcPtr ExtensionInit; VidModeGetMonitorValueProcPtr GetMonitorValue; VidModeGetCurrentModelineProcPtr GetCurrentModeline; VidModeGetFirstModelineProcPtr GetFirstModeline; VidModeGetNextModelineProcPtr GetNextModeline; VidModeDeleteModelineProcPtr DeleteModeline; VidModeZoomViewportProcPtr ZoomViewport; VidModeGetViewPortProcPtr GetViewPort; VidModeSetViewPortProcPtr SetViewPort; VidModeSwitchModeProcPtr SwitchMode; VidModeLockZoomProcPtr LockZoom; VidModeGetNumOfClocksProcPtr GetNumOfClocks; VidModeGetClocksProcPtr GetClocks; VidModeCheckModeForMonitorProcPtr CheckModeForMonitor; VidModeCheckModeForDriverProcPtr CheckModeForDriver; VidModeSetCrtcForModeProcPtr SetCrtcForMode; VidModeAddModelineProcPtr AddModeline; VidModeGetDotClockProcPtr GetDotClock; VidModeGetNumOfModesProcPtr GetNumOfModes; VidModeSetGammaProcPtr SetGamma; VidModeGetGammaProcPtr GetGamma; VidModeSetGammaRampProcPtr SetGammaRamp; VidModeGetGammaRampProcPtr GetGammaRamp; VidModeGetGammaRampSizeProcPtr GetGammaRampSize; } VidModeRec, *VidModePtr; #ifdef XF86VIDMODE void VidModeAddExtension(Bool allow_non_local); VidModePtr VidModeGetPtr(ScreenPtr pScreen); VidModePtr VidModeInit(ScreenPtr pScreen); #endif /* XF86VIDMODE */ #endif xorg-server-21.1.16/include/xorg-server.h.meson.in0000644000175000017500000001120114757411105015432 /* xorg-server.h.in -*- c -*- * * This file is the template file for the xorg-server.h file which gets * installed as part of the SDK. The #defines in this file overlap * with those from config.h, but only for those options that we want * to export to external modules. Boilerplate autotool #defines such * as HAVE_STUFF and PACKAGE_NAME is kept in config.h * * It is still possible to update config.h.in using autoheader, since * autoheader only creates a .h.in file for the first * AM_CONFIG_HEADER() line, and thus does not overwrite this file. * * However, it should be kept in sync with this file. */ #ifndef _XORG_SERVER_H_ #define _XORG_SERVER_H_ #ifdef HAVE_XORG_CONFIG_H #error Include xorg-config.h when building the X server #endif /* Support BigRequests extension */ #mesondefine BIGREQS /* Default font path */ #mesondefine COMPILEDDEFAULTFONTPATH /* Support Composite Extension */ #mesondefine COMPOSITE /* Build DPMS extension */ #mesondefine DPMSExtension /* Build DRI3 extension */ #mesondefine DRI3 /* Build GLX extension */ #mesondefine GLXEXT /* Support XDM-AUTH*-1 */ #mesondefine HASXDMAUTH /* Support SHM */ #mesondefine HAS_SHM /* Define to 1 if you have the `reallocarray' function. */ #mesondefine HAVE_REALLOCARRAY /* Define to 1 if you have the `strcasecmp' function. */ #mesondefine HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #mesondefine HAVE_STRCASESTR /* Define to 1 if you have the `strlcat' function. */ #mesondefine HAVE_STRLCAT /* Define to 1 if you have the `strlcpy' function. */ #mesondefine HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #mesondefine HAVE_STRNCASECMP /* Define to 1 if you have the `strndup' function. */ #mesondefine HAVE_STRNDUP /* Support IPv6 for TCP connections */ #mesondefine IPv6 /* Support MIT-SHM Extension */ #mesondefine MITSHM /* Internal define for Xinerama */ #mesondefine PANORAMIX /* Support Present extension */ #mesondefine PRESENT /* Support RANDR extension */ #mesondefine RANDR /* Support RENDER extension */ #mesondefine RENDER /* Support X resource extension */ #mesondefine RES /* Support MIT-SCREEN-SAVER extension */ #mesondefine SCREENSAVER /* Support SHAPE extension */ #mesondefine SHAPE /* Define to 1 on systems derived from System V Release 4 */ #mesondefine SVR4 /* Support TCP socket connections */ #mesondefine TCPCONN /* Support UNIX socket connections */ #mesondefine UNIXCONN /* Support XCMisc extension */ #mesondefine XCMISC /* Support Xdmcp */ #mesondefine XDMCP /* Build XFree86 BigFont extension */ #mesondefine XF86BIGFONT /* Support XFree86 Video Mode extension */ #mesondefine XF86VIDMODE /* Build XDGA support */ #mesondefine XFreeXDGA /* Support Xinerama extension */ #mesondefine XINERAMA /* Support X Input extension */ #mesondefine XINPUT /* XKB default rules */ #mesondefine XKB_DFLT_RULES /* Build DRI extension */ #mesondefine XF86DRI /* Build DRI2 extension */ #mesondefine DRI2 /* Build Xorg server */ #mesondefine XORGSERVER /* Current Xorg version */ #mesondefine XORG_VERSION_CURRENT /* Build Xv Extension */ #mesondefine XvExtension /* Build XvMC Extension */ #mesondefine XvMCExtension /* Support XSync extension */ #mesondefine XSYNC /* Support XTest extension */ #mesondefine XTEST /* Support Xv Extension */ #mesondefine XV /* Vendor name */ #mesondefine XVENDORNAME /* BSD-compliant source */ #mesondefine _BSD_SOURCE /* POSIX-compliant source */ #mesondefine _POSIX_SOURCE /* X/Open-compliant source */ #mesondefine _XOPEN_SOURCE /* Vendor web address for support */ #mesondefine __VENDORDWEBSUPPORT__ /* Location of configuration file */ #mesondefine XCONFIGFILE /* Name of X server */ #mesondefine __XSERVERNAME__ /* Building vgahw module */ #mesondefine WITH_VGAHW /* System is BSD-like */ #mesondefine CSRG_BASED /* System has PC console */ #mesondefine PCCONS_SUPPORT /* System has PCVT console */ #mesondefine PCVT_SUPPORT /* System has syscons console */ #mesondefine SYSCONS_SUPPORT /* System has wscons console */ #mesondefine WSCONS_SUPPORT /* Loadable XFree86 server awesomeness */ #define XFree86LOADER /* Use libpciaccess */ #mesondefine XSERVER_LIBPCIACCESS /* X Access Control Extension */ #mesondefine XACE /* Have X server platform bus support */ #mesondefine XSERVER_PLATFORM_BUS #ifdef _LP64 #define _XSERVER64 1 #endif /* Have support for X shared memory fence library (xshmfence) */ #mesondefine HAVE_XSHMFENCE /* Use XTrans FD passing support */ #mesondefine XTRANS_SEND_FDS /* Ask fontsproto to make font path element names const */ #define FONT_PATH_ELEMENT_NAME_CONST 1 /* byte order */ #mesondefine X_BYTE_ORDER #endif /* _XORG_SERVER_H_ */ xorg-server-21.1.16/include/xsha1.h0000644000175000017500000000067014757411105012456 #ifndef XSHA1_H #define XSHA1_H /* Initialize SHA1 computation. Returns NULL on error. */ void *x_sha1_init(void); /* * Add some data to be hashed. ctx is the value returned by x_sha1_init() * Returns 0 on error, 1 on success. */ int x_sha1_update(void *ctx, void *data, int size); /* * Place the hash in result, and free ctx. * Returns 0 on error, 1 on success. */ int x_sha1_final(void *ctx, unsigned char result[20]); #endif xorg-server-21.1.16/include/Xserver.d0000644000175000017500000000536114757411105013066 /* Copyright (c) 2005-2006, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* * Xserver dtrace provider definition */ #ifdef __APPLE__ #define string char * #define pid_t uint32_t #define zoneid_t uint32_t #elif defined(__FreeBSD__) #define zoneid_t id_t #else #include #endif typedef const uint8_t *const_uint8_p; typedef const double *const_double_p; provider Xserver { /* reqType, data, length, client id, request buffer */ probe request__start(string, uint8_t, uint16_t, int, void *); /* reqType, data, sequence, client id, result */ probe request__done(string, uint8_t, uint32_t, int, int); /* client id, client fd */ probe client__connect(int, int); /* client id, client address, client pid, client zone id */ probe client__auth(int, string, pid_t, zoneid_t); /* client id */ probe client__disconnect(int); /* resource id, resource type, value, resource type name */ probe resource__alloc(uint32_t, uint32_t, void *, string); /* resource id, resource type, value, resource type name */ probe resource__free(uint32_t, uint32_t, void *, string); /* client id, event type, event* */ probe send__event(int, uint8_t, void *); /* deviceid, type, button/keycode/touchid, flags, nvalues, mask, values */ probe input__event(int, int, uint32_t, uint32_t, int8_t, const_uint8_p, const_double_p); }; #pragma D attributes Unstable/Unstable/Common provider Xserver provider #pragma D attributes Private/Private/Unknown provider Xserver module #pragma D attributes Private/Private/Unknown provider Xserver function #pragma D attributes Unstable/Unstable/Common provider Xserver name #pragma D attributes Unstable/Unstable/Common provider Xserver args xorg-server-21.1.16/m4/0000755000175000017500000000000014757411132010233 5xorg-server-21.1.16/m4/ac_define_dir.m40000644000175000017500000000314014757411105013146 # =========================================================================== # http://autoconf-archive.cryp.to/ac_define_dir.html # =========================================================================== # # SYNOPSIS # # AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) # # DESCRIPTION # # This macro sets VARNAME to the expansion of the DIR variable, taking # care of fixing up ${prefix} and such. # # VARNAME is then offered as both an output variable and a C preprocessor # symbol. # # Example: # # AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) # # LAST MODIFICATION # # 2008-04-12 # # COPYLEFT # # Copyright (c) 2008 Stepan Kasal # Copyright (c) 2008 Andreas Schwab # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2008 Alexandre Oliva # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. AC_DEFUN([AC_DEFINE_DIR], [ prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn dnl refers to ${prefix}. Thus we have to use `eval' twice. eval ac_define_dir="\"[$]$2\"" eval ac_define_dir="\"$ac_define_dir\"" AC_SUBST($1, "$ac_define_dir") AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE ]) xorg-server-21.1.16/m4/ax_pthread.m40000644000175000017500000003305714757411105012544 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS # # AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C programs using POSIX threads. It # sets the PTHREAD_LIBS output variable to the threads library and linker # flags, and the PTHREAD_CFLAGS output variable to any special C compiler # flags that are needed. (The user can also force certain compiler # flags/libs to be tested by setting these environment variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). (This # is necessary on AIX to use the special cc_r compiler alias.) # # NOTE: You are assumed to not only compile your program with these flags, # but also link it with them as well. e.g. you should link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threads programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CC="$PTHREAD_CC" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name # (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the # PTHREAD_PRIO_INHERIT symbol is defined when compiling with # PTHREAD_CFLAGS. # # ACTION-IF-FOUND is a list of shell commands to run if a threads library # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it # is not found. If ACTION-IF-FOUND is not specified, the default action # will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or if # you have any other suggestions or comments. This macro was based on work # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by # Alejandro Forero Cuervo to the autoconf macro repository. We are also # grateful for the helpful feedback of numerous users. # # Updated for Autoconf 2.68 by Daniel Richard G. # # LICENSE # # Copyright (c) 2008 Steven G. Johnson # Copyright (c) 2011 Daniel Richard G. # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 21 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C]) ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) AC_MSG_RESULT([$ax_pthread_ok]) if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case ${host_os} in solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; darwin*) ax_pthread_flags="-pthread $ax_pthread_flags" ;; netbsd*) # use libc stubs, don't link against libpthread, to allow # dynamic loading ax_pthread_flags="" ;; esac # Clang doesn't consider unrecognized options an error unless we specify # -Werror. We throw in some extra Clang-specific options to ensure that # this doesn't happen for GCC, which also accepts -Werror. AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) save_CFLAGS="$CFLAGS" ax_pthread_extra_flags="-Werror" CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], [AC_MSG_RESULT([yes])], [ax_pthread_extra_flags= AC_MSG_RESULT([no])]) CFLAGS="$save_CFLAGS" if test x"$ax_pthread_ok" = xno; then for flag in $ax_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) if test x"$ax_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([#include static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; }], [pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */])], [ax_pthread_ok=yes], []) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT([$ax_pthread_ok]) if test "x$ax_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [int attr = $attr; return attr /* ; */])], [attr_name=$attr; break], []) done AC_MSG_RESULT([$attr_name]) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case ${host_os} in aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; osf* | hpux*) flag="-D_REENTRANT";; solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else # TODO: What about Clang on Solaris? flag="-mt -D_REENTRANT" fi ;; esac AC_MSG_RESULT([$flag]) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], [ax_cv_PTHREAD_PRIO_INHERIT], [ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int i = PTHREAD_PRIO_INHERIT;]])], [ax_cv_PTHREAD_PRIO_INHERIT=yes], [ax_cv_PTHREAD_PRIO_INHERIT=no]) ]) AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], [AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: compile with *_r variant if test "x$GCC" != xyes; then case $host_os in aix*) AS_CASE(["x/$CC"], [x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], [#handle absolute path differently from PATH based program lookup AS_CASE(["x$CC"], [x/*], [AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], [AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" AC_SUBST([PTHREAD_LIBS]) AC_SUBST([PTHREAD_CFLAGS]) AC_SUBST([PTHREAD_CC]) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$ax_pthread_ok" = xyes; then ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) : else ax_pthread_ok=no $2 fi AC_LANG_POP ])dnl AX_PTHREAD xorg-server-21.1.16/m4/libtool.m40000644000175000017500000112776414757411111012100 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 59 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_DECL_FILECMD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} _LT_DECL([], [AR], [1], [The archiver]) # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -z "$STRIP"; then AC_MSG_RESULT([no]) else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl* | icl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl* | ,icl* | no,icl*) # Native MSVC or ICC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly* | midnightbsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_FILECMD # ---------------- # Check for a file(cmd) program that can be used to detect file type and magic m4_defun([_LT_DECL_FILECMD], [AC_CHECK_TOOL([FILECMD], [file], [:]) _LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) ])# _LD_DECL_FILECMD # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS xorg-server-21.1.16/m4/ltoptions.m40000644000175000017500000003427514757411111012460 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) xorg-server-21.1.16/m4/ltsugar.m40000644000175000017500000001045314757411111012076 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) xorg-server-21.1.16/m4/ltversion.m40000644000175000017500000000131214757411111012434 # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, # Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4245 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.7]) m4_define([LT_PACKAGE_REVISION], [2.4.7]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.7' macro_revision='2.4.7' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) xorg-server-21.1.16/m4/lt~obsolete.m40000644000175000017500000001400714757411111012766 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free # Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) xorg-server-21.1.16/mi/0000755000175000017500000000000014757411134010322 5xorg-server-21.1.16/mi/meson.build0000644000175000017500000000161414757411105012404 srcs_mi = [ 'miarc.c', 'mibitblt.c', 'micmap.c', 'micopy.c', 'midash.c', 'midispcur.c', 'mieq.c', 'miexpose.c', 'mifillarc.c', 'mifillrct.c', 'migc.c', 'miglblt.c', 'mioverlay.c', 'mipointer.c', 'mipoly.c', 'mipolypnt.c', 'mipolyrect.c', 'mipolyseg.c', 'mipolytext.c', 'mipushpxl.c', 'miscrinit.c', 'misprite.c', 'mivaltree.c', 'miwideline.c', 'miwindow.c', 'mizerarc.c', 'mizerclip.c', 'mizerline.c', ] hdrs_mi = [ 'micmap.h', 'micoord.h', 'migc.h', 'mi.h', 'miline.h', 'mioverlay.h', 'mipointer.h', 'mipointrst.h', 'mistruct.h', 'mizerarc.h', ] libxserver_mi = static_library('libxserver_mi', srcs_mi, include_directories: inc, dependencies: [ common_dep, m_dep, ], ) if build_xorg install_data(hdrs_mi, install_dir: xorgsdkdir) endif xorg-server-21.1.16/mi/Makefile.am0000644000175000017500000000154014757411105012274 noinst_LTLIBRARIES = libmi.la if XORG sdk_HEADERS = micmap.h miline.h mipointer.h mi.h \ migc.h mipointrst.h mizerarc.h micoord.h \ mistruct.h mioverlay.h endif AM_CFLAGS = $(DIX_CFLAGS) libmi_la_SOURCES = \ mi.h \ miarc.c \ mibitblt.c \ micmap.c \ micmap.h \ micoord.h \ micopy.c \ midash.c \ midispcur.c \ mieq.c \ miexpose.c \ mifillarc.c \ mifillarc.h \ mifillrct.c \ mifpoly.h \ migc.c \ migc.h \ miglblt.c \ miline.h \ mioverlay.c \ mioverlay.h \ mipointer.c \ mipointer.h \ mipointrst.h \ mipoly.c \ mipoly.h \ mipolypnt.c \ mipolyrect.c \ mipolyseg.c \ mipolytext.c \ mipushpxl.c \ miscanfill.h \ miscrinit.c \ misprite.c \ misprite.h \ mistruct.h \ mivaltree.c \ mivalidate.h \ miwideline.c \ miwideline.h \ miwindow.c \ mizerarc.c \ mizerarc.h \ mizerclip.c \ mizerline.c xorg-server-21.1.16/mi/micmap.h0000644000175000017500000000476114757411105011667 #include "colormapst.h" #ifndef _MICMAP_H_ #define _MICMAP_H_ #define GetInstalledmiColormap(s) \ ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey)) #define SetInstalledmiColormap(s,c) \ (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c)) extern _X_EXPORT DevPrivateKeyRec micmapScrPrivateKeyRec; #define micmapScrPrivateKey (&micmapScrPrivateKeyRec) typedef Bool (*miInitVisualsProcPtr) (VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, unsigned long, int, int); extern _X_EXPORT int miListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps); extern _X_EXPORT void miInstallColormap(ColormapPtr pmap); extern _X_EXPORT void miUninstallColormap(ColormapPtr pmap); extern _X_EXPORT void miResolveColor(unsigned short *, unsigned short *, unsigned short *, VisualPtr); extern _X_EXPORT Bool miInitializeColormap(ColormapPtr); extern _X_EXPORT int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *); extern _X_EXPORT Bool miCreateDefColormap(ScreenPtr); extern _X_EXPORT void miClearVisualTypes(void); extern _X_EXPORT Bool miSetVisualTypes(int, int, int, int); extern _X_EXPORT Bool miSetPixmapDepths(void); extern _X_EXPORT Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, int preferredCVC, Pixel redMask, Pixel greenMask, Pixel blueMask); extern _X_EXPORT int miGetDefaultVisualMask(int); extern _X_EXPORT Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, unsigned long, int, int); #define MAX_PSEUDO_DEPTH 10 #define MIN_TRUE_DEPTH 6 #define StaticGrayMask (1 << StaticGray) #define GrayScaleMask (1 << GrayScale) #define StaticColorMask (1 << StaticColor) #define PseudoColorMask (1 << PseudoColor) #define TrueColorMask (1 << TrueColor) #define DirectColorMask (1 << DirectColor) #define ALL_VISUALS (StaticGrayMask|\ GrayScaleMask|\ StaticColorMask|\ PseudoColorMask|\ TrueColorMask|\ DirectColorMask) #define LARGE_VISUALS (TrueColorMask|\ DirectColorMask) #define SMALL_VISUALS (StaticGrayMask|\ GrayScaleMask|\ StaticColorMask|\ PseudoColorMask) #endif /* _MICMAP_H_ */ xorg-server-21.1.16/mi/miline.h0000644000175000017500000001320314757411105011665 /* Copyright 1994, 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. */ #ifndef MILINE_H #include "screenint.h" #include "privates.h" /* * Public definitions used for configuring basic pixelization aspects * of the sample implementation line-drawing routines provided in * {mfb,mi,cfb*} at run-time. */ #define XDECREASING 4 #define YDECREASING 2 #define YMAJOR 1 #define OCTANT1 (1 << (YDECREASING)) #define OCTANT2 (1 << (YDECREASING|YMAJOR)) #define OCTANT3 (1 << (XDECREASING|YDECREASING|YMAJOR)) #define OCTANT4 (1 << (XDECREASING|YDECREASING)) #define OCTANT5 (1 << (XDECREASING)) #define OCTANT6 (1 << (XDECREASING|YMAJOR)) #define OCTANT7 (1 << (YMAJOR)) #define OCTANT8 (1 << (0)) #define XMAJOROCTANTS (OCTANT1 | OCTANT4 | OCTANT5 | OCTANT8) #define DEFAULTZEROLINEBIAS (OCTANT2 | OCTANT3 | OCTANT4 | OCTANT5) /* * Devices can configure the rendering of routines in mi, mfb, and cfb* * by specifying a thin line bias to be applied to a particular screen * using the following function. The bias parameter is an OR'ing of * the appropriate OCTANT constants defined above to indicate which * octants to bias a line to prefer an axial step when the Bresenham * error term is exactly zero. The octants are mapped as follows: * * \ | / * \ 3 | 2 / * \ | / * 4 \ | / 1 * \|/ * ----------- * /|\ * 5 / | \ 8 * / | \ * / 6 | 7 \ * / | \ * * For more information, see "Ambiguities in Incremental Line Rastering," * Jack E. Bresenham, IEEE CG&A, May 1987. */ extern _X_EXPORT void miSetZeroLineBias(ScreenPtr /* pScreen */ , unsigned int /* bias */ ); /* * Private definitions needed for drawing thin (zero width) lines * Used by the mi, mfb, and all cfb* components. */ #define X_AXIS 0 #define Y_AXIS 1 #define OUT_LEFT 0x08 #define OUT_RIGHT 0x04 #define OUT_ABOVE 0x02 #define OUT_BELOW 0x01 #define OUTCODES(_result, _x, _y, _pbox) \ if ( (_x) < (_pbox)->x1) (_result) |= OUT_LEFT; \ else if ( (_x) >= (_pbox)->x2) (_result) |= OUT_RIGHT; \ if ( (_y) < (_pbox)->y1) (_result) |= OUT_ABOVE; \ else if ( (_y) >= (_pbox)->y2) (_result) |= OUT_BELOW; #define MIOUTCODES(outcode, x, y, xmin, ymin, xmax, ymax) \ {\ if (x < xmin) outcode |= OUT_LEFT;\ if (x > xmax) outcode |= OUT_RIGHT;\ if (y < ymin) outcode |= OUT_ABOVE;\ if (y > ymax) outcode |= OUT_BELOW;\ } #define SWAPINT(i, j) \ { int _t = i; i = j; j = _t; } #define SWAPPT(i, j) \ { DDXPointRec _t; _t = i; i = j; j = _t; } #define SWAPINT_PAIR(x1, y1, x2, y2)\ { int t = x1; x1 = x2; x2 = t;\ t = y1; y1 = y2; y2 = t;\ } #define miGetZeroLineBias(_pScreen) ((unsigned long) (unsigned long*)\ dixLookupPrivate(&(_pScreen)->devPrivates, miZeroLineScreenKey)) #define CalcLineDeltas(_x1,_y1,_x2,_y2,_adx,_ady,_sx,_sy,_SX,_SY,_octant) \ (_octant) = 0; \ (_sx) = (_SX); \ if (((_adx) = (_x2) - (_x1)) < 0) { \ (_adx) = -(_adx); \ (_sx = -(_sx)); \ (_octant) |= XDECREASING; \ } \ (_sy) = (_SY); \ if (((_ady) = (_y2) - (_y1)) < 0) { \ (_ady) = -(_ady); \ (_sy = -(_sy)); \ (_octant) |= YDECREASING; \ } #define SetYMajorOctant(_octant) ((_octant) |= YMAJOR) #define FIXUP_ERROR(_e, _octant, _bias) \ (_e) -= (((_bias) >> (_octant)) & 1) #define IsXMajorOctant(_octant) (!((_octant) & YMAJOR)) #define IsYMajorOctant(_octant) ((_octant) & YMAJOR) #define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) #define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) extern _X_EXPORT DevPrivateKeyRec miZeroLineScreenKeyRec; #define miZeroLineScreenKey (&miZeroLineScreenKeyRec) extern _X_EXPORT int miZeroClipLine(int /*xmin */ , int /*ymin */ , int /*xmax */ , int /*ymax */ , int * /*new_x1 */ , int * /*new_y1 */ , int * /*new_x2 */ , int * /*new_y2 */ , unsigned int /*adx */ , unsigned int /*ady */ , int * /*pt1_clipped */ , int * /*pt2_clipped */ , int /*octant */ , unsigned int /*bias */ , int /*oc1 */ , int /*oc2 */ ); #endif /* MILINE_H */ xorg-server-21.1.16/mi/mipointer.h0000644000175000017500000001146214757411105012423 /* Copyright 1989, 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. */ #ifndef MIPOINTER_H #define MIPOINTER_H #include "cursor.h" #include "input.h" #include "privates.h" typedef struct _miPointerSpriteFuncRec { Bool (*RealizeCursor) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ , CursorPtr /* pCurs */ ); Bool (*UnrealizeCursor) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ , CursorPtr /* pCurs */ ); void (*SetCursor) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ , CursorPtr /* pCurs */ , int /* x */ , int /* y */ ); void (*MoveCursor) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ , int /* x */ , int /* y */ ); Bool (*DeviceCursorInitialize) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ ); void (*DeviceCursorCleanup) (DeviceIntPtr /* pDev */ , ScreenPtr /* pScr */ ); } miPointerSpriteFuncRec, *miPointerSpriteFuncPtr; typedef struct _miPointerScreenFuncRec { Bool (*CursorOffScreen) (ScreenPtr * /* ppScr */ , int * /* px */ , int * /* py */ ); void (*CrossScreen) (ScreenPtr /* pScr */ , int /* entering */ ); void (*WarpCursor) (DeviceIntPtr /*pDev */ , ScreenPtr /* pScr */ , int /* x */ , int /* y */ ); } miPointerScreenFuncRec, *miPointerScreenFuncPtr; extern _X_EXPORT Bool miDCInitialize(ScreenPtr /*pScreen */ , miPointerScreenFuncPtr /*screenFuncs */ ); extern _X_EXPORT Bool miPointerInitialize(ScreenPtr /*pScreen */ , miPointerSpriteFuncPtr /*spriteFuncs */ , miPointerScreenFuncPtr /*screenFuncs */ , Bool /*waitForUpdate */ ); extern _X_EXPORT void miPointerWarpCursor(DeviceIntPtr /*pDev */ , ScreenPtr /*pScreen */ , int /*x */ , int /*y */ ); extern _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev); extern _X_EXPORT void miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y); /* Returns the current cursor position. */ extern _X_EXPORT void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y); /* Moves the cursor to the specified position. May clip the coordinates: * x and y are modified in-place. */ extern _X_EXPORT ScreenPtr miPointerSetPosition(DeviceIntPtr pDev, int mode, double *x, double *y, int *nevents, InternalEvent *events); extern _X_EXPORT void miPointerUpdateSprite(DeviceIntPtr pDev); /* Invalidate current sprite, forcing reload on next * sprite setting (window crossing, grab action, etc) */ extern _X_EXPORT void miPointerInvalidateSprite(DeviceIntPtr pDev); /* Sets whether the sprite should be updated immediately on pointer moves */ extern _X_EXPORT Bool miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait); extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec; #define miPointerPrivKey (&miPointerPrivKeyRec) extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec; #define miPointerScreenKey (&miPointerScreenKeyRec) #endif /* MIPOINTER_H */ xorg-server-21.1.16/mi/mi.h0000644000175000017500000004623414757411105011027 /*********************************************************** 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. ******************************************************************/ #ifndef MI_H #define MI_H #include #include "region.h" #include "validate.h" #include "window.h" #include "gc.h" #include #include "input.h" #include "cursor.h" #include "privates.h" #include "colormap.h" #include "events.h" #define MiBits CARD32 typedef struct _miDash *miDashPtr; #define EVEN_DASH 0 #define ODD_DASH ~0 /* miarc.c */ extern _X_EXPORT void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); extern _X_EXPORT void miPolyArc(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*narcs */ , xArc * /*parcs */ ); /* mibitblt.c */ extern _X_EXPORT RegionPtr miCopyArea(DrawablePtr /*pSrcDrawable */ , DrawablePtr /*pDstDrawable */ , GCPtr /*pGC */ , int /*xIn */ , int /*yIn */ , int /*widthSrc */ , int /*heightSrc */ , int /*xOut */ , int /*yOut */ ); extern _X_EXPORT RegionPtr miCopyPlane(DrawablePtr /*pSrcDrawable */ , DrawablePtr /*pDstDrawable */ , GCPtr /*pGC */ , int /*srcx */ , int /*srcy */ , int /*width */ , int /*height */ , int /*dstx */ , int /*dsty */ , unsigned long /*bitPlane */ ); extern _X_EXPORT void miGetImage(DrawablePtr /*pDraw */ , int /*sx */ , int /*sy */ , int /*w */ , int /*h */ , unsigned int /*format */ , unsigned long /*planeMask */ , char * /*pdstLine */ ); extern _X_EXPORT void miPutImage(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*depth */ , int /*x */ , int /*y */ , int /*w */ , int /*h */ , int /*leftPad */ , int /*format */ , char * /*pImage */ ); /* micopy.c */ #define miGetCompositeClip(pGC) ((pGC)->pCompositeClip) typedef void (*miCopyProc) (DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, BoxPtr pDstBox, int nbox, int dx, int dy, Bool reverse, Bool upsidedown, Pixel bitplane, void *closure); extern _X_EXPORT void miCopyRegion(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, RegionPtr pDstRegion, int dx, int dy, miCopyProc copyProc, Pixel bitPlane, void *closure); extern _X_EXPORT RegionPtr miDoCopy(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut, miCopyProc copyProc, Pixel bitplane, void *closure); /* micursor.c */ extern _X_EXPORT void miRecolorCursor(DeviceIntPtr /* pDev */ , ScreenPtr /*pScr */ , CursorPtr /*pCurs */ , Bool /*displayed */ ); /* midash.c */ extern _X_EXPORT void miStepDash(int /*dist */ , int * /*pDashIndex */ , unsigned char * /*pDash */ , int /*numInDashList */ , int * /*pDashOffset */ ); /* mieq.c */ #ifndef INPUT_H typedef struct _DeviceRec *DevicePtr; #endif extern _X_EXPORT Bool mieqInit(void ); extern _X_EXPORT void mieqFini(void); extern _X_EXPORT void mieqEnqueue(DeviceIntPtr /*pDev */ , InternalEvent * /*e */ ); extern _X_EXPORT void mieqSwitchScreen(DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , Bool /*set_dequeue_screen */ ); extern _X_EXPORT void mieqProcessDeviceEvent(DeviceIntPtr /* dev */ , InternalEvent * /* event */ , ScreenPtr /* screen */ ); extern _X_EXPORT void mieqProcessInputEvents(void ); extern _X_EXPORT void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param); extern _X_EXPORT void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param); extern DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr /* sdev */ , InternalEvent * /* original */ , InternalEvent * /* copy */ ); /** * Custom input event handler. If you need to process input events in some * other way than the default path, register an input event handler for the * given internal event type. */ typedef void (*mieqHandler) (int screen, InternalEvent *event, DeviceIntPtr dev); void _X_EXPORT mieqSetHandler(int event, mieqHandler handler); /* miexpose.c */ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , DrawablePtr /*pDstDrawable */ , GCPtr /*pGC */ , int /*srcx */ , int /*srcy */ , int /*width */ , int /*height */ , int /*dstx */ , int /*dsty */ ); extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , RegionPtr /*pRgn */ , int /*dx */ , int /*dy */ ); extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , RegionPtr /*prgn */); extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ , RegionPtr /*prgn */ , int /*what */ ); extern _X_EXPORT void miClearDrawable(DrawablePtr /*pDraw */ , GCPtr /*pGC */ ); /* mifillrct.c */ extern _X_EXPORT void miPolyFillRect(DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*nrectFill */ , xRectangle * /*prectInit */ ); /* miglblt.c */ extern _X_EXPORT void miPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase ); extern _X_EXPORT void miImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr *ppci, void *pglyphBase ); /* mipoly.c */ extern _X_EXPORT void miFillPolygon(DrawablePtr /*dst */ , GCPtr /*pgc */ , int /*shape */ , int /*mode */ , int /*count */ , DDXPointPtr /*pPts */ ); /* mipolypnt.c */ extern _X_EXPORT void miPolyPoint(DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , int /*npt */ , xPoint * /*pptInit */ ); /* mipolyrect.c */ extern _X_EXPORT void miPolyRectangle(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*nrects */ , xRectangle * /*pRects */ ); /* mipolyseg.c */ extern _X_EXPORT void miPolySegment(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*nseg */ , xSegment * /*pSegs */ ); /* mipolytext.c */ extern _X_EXPORT int miPolyText8(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , char * /*chars */ ); extern _X_EXPORT int miPolyText16(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , unsigned short * /*chars */ ); extern _X_EXPORT void miImageText8(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , char * /*chars */ ); extern _X_EXPORT void miImageText16(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*x */ , int /*y */ , int /*count */ , unsigned short * /*chars */ ); /* mipushpxl.c */ extern _X_EXPORT void miPushPixels(GCPtr /*pGC */ , PixmapPtr /*pBitMap */ , DrawablePtr /*pDrawable */ , int /*dx */ , int /*dy */ , int /*xOrg */ , int /*yOrg */ ); /* miscrinit.c */ extern _X_EXPORT void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode); extern _X_EXPORT Bool miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData ); extern _X_EXPORT Bool miCreateScreenResources(ScreenPtr /*pScreen */ ); extern _X_EXPORT Bool miScreenDevPrivateInit(ScreenPtr pScreen, int width, void *pbits ); extern _X_EXPORT Bool miScreenInit(ScreenPtr pScreen, void *pbits, int xsize, int ysize, int dpix, int dpiy, int width, int rootDepth, int numDepths, DepthPtr depths, VisualID rootVisual, int numVisuals, VisualPtr visuals ); /* mivaltree.c */ extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ , RegionPtr /*bounding */ , BoxPtr /*rect */ , int /*x */ , int /*y */ ); extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ ); extern _X_EXPORT void miWideLine(DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , int /*npt */ , DDXPointPtr /*pPts */ ); extern _X_EXPORT void miWideDash(DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , int /*npt */ , DDXPointPtr /*pPts */ ); extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pPts); /* miwindow.c */ extern _X_EXPORT void miClearToBackground(WindowPtr /*pWin */ , int /*x */ , int /*y */ , int /*w */ , int /*h */ , Bool /*generateExposures */ ); extern _X_EXPORT void miMarkWindow(WindowPtr /*pWin */ ); extern _X_EXPORT Bool miMarkOverlappedWindows(WindowPtr /*pWin */ , WindowPtr /*pFirst */ , WindowPtr * /*ppLayerWin */ ); extern _X_EXPORT void miHandleValidateExposures(WindowPtr /*pWin */ ); extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ , int /*x */ , int /*y */ , WindowPtr /*pNextSib */ , VTKind /*kind */ ); extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ , int /*x */ , int /*y */ , unsigned int /*w */ , unsigned int /*h */ , WindowPtr /*pSib */ ); extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */ ); extern _X_EXPORT void miSetShape(WindowPtr /*pWin */ , int /*kind */ ); extern _X_EXPORT void miChangeBorderWidth(WindowPtr /*pWin */ , unsigned int /*width */ ); extern _X_EXPORT void miMarkUnrealizedWindow(WindowPtr /*pChild */ , WindowPtr /*pWin */ , Bool /*fromConfigure */ ); extern _X_EXPORT WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); extern _X_EXPORT WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); /* mizerarc.c */ extern _X_EXPORT void miZeroPolyArc(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*narcs */ , xArc * /*parcs */ ); /* mizerline.c */ extern _X_EXPORT void miZeroLine(DrawablePtr /*dst */ , GCPtr /*pgc */ , int /*mode */ , int /*nptInit */ , DDXPointRec * /*pptInit */ ); extern _X_EXPORT void miZeroDashLine(DrawablePtr /*dst */ , GCPtr /*pgc */ , int /*mode */ , int /*nptInit */ , DDXPointRec * /*pptInit */ ); extern _X_EXPORT void miPolyFillArc(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*narcs */ , xArc * /*parcs */ ); #endif /* MI_H */ xorg-server-21.1.16/mi/migc.h0000644000175000017500000000401014757411105011323 /* Copyright 1993, 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. */ #ifndef _MIGC_H #define _MIGC_H extern _X_EXPORT void miChangeGC(GCPtr pGC, unsigned long mask); extern _X_EXPORT void miDestroyGC(GCPtr pGC); extern _X_EXPORT void miDestroyClip(GCPtr pGC); extern _X_EXPORT void miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); extern _X_EXPORT void miCopyClip(GCPtr pgcDst, GCPtr pgcSrc); extern _X_EXPORT void miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst); extern _X_EXPORT void miComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable); #endif xorg-server-21.1.16/mi/mipointrst.h0000644000175000017500000000322014757411105012616 /* * mipointrst.h * */ /* Copyright 1989, 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. */ #ifndef MIPOINTRST_H #define MIPOINTRST_H #include "mipointer.h" #include "scrnintstr.h" typedef struct { miPointerSpriteFuncPtr spriteFuncs; /* sprite-specific methods */ miPointerScreenFuncPtr screenFuncs; /* screen-specific methods */ CloseScreenProcPtr CloseScreen; Bool waitForUpdate; /* don't move cursor from input thread */ Bool showTransparent; /* show empty cursors */ } miPointerScreenRec, *miPointerScreenPtr; #endif /* MIPOINTRST_H */ xorg-server-21.1.16/mi/mizerarc.h0000644000175000017500000000556514757411105012240 /************************************************************ Copyright 1989, 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. ********************************************************/ typedef struct { int x; int y; int mask; } miZeroArcPtRec; typedef struct { int x, y, k1, k3, a, b, d, dx, dy; int alpha, beta; int xorg, yorg; int xorgo, yorgo; int w, h; int initialMask; miZeroArcPtRec start, altstart, end, altend; int firstx, firsty; int startAngle, endAngle; } miZeroArcRec; #define miCanZeroArc(arc) (((arc)->width == (arc)->height) || \ (((arc)->width <= 800) && ((arc)->height <= 800))) #define MIARCSETUP() \ x = info.x; \ y = info.y; \ k1 = info.k1; \ k3 = info.k3; \ a = info.a; \ b = info.b; \ d = info.d; \ dx = info.dx; \ dy = info.dy #define MIARCOCTANTSHIFT(clause) \ if (a < 0) \ { \ if (y == info.h) \ { \ d = -1; \ a = b = k1 = 0; \ } \ else \ { \ dx = (k1 << 1) - k3; \ k1 = dx - k1; \ k3 = -k3; \ b = b + a - (k1 >> 1); \ d = b + ((-a) >> 1) - d + (k3 >> 3); \ if (dx < 0) \ a = -((-dx) >> 1) - a; \ else \ a = (dx >> 1) - a; \ dx = 0; \ dy = 1; \ clause \ } \ } #define MIARCSTEP(move1,move2) \ b -= k1; \ if (d < 0) \ { \ x += dx; \ y += dy; \ a += k1; \ d += b; \ move1 \ } \ else \ { \ x++; \ y++; \ a += k3; \ d -= a; \ move2 \ } #define MIARCCIRCLESTEP(clause) \ b -= k1; \ x++; \ if (d < 0) \ { \ a += k1; \ d += b; \ } \ else \ { \ y++; \ a += k3; \ d -= a; \ clause \ } /* mizerarc.c */ extern _X_EXPORT Bool miZeroArcSetup(xArc * /*arc */ , miZeroArcRec * /*info */ , Bool /*ok360 */ ); xorg-server-21.1.16/mi/micoord.h0000644000175000017500000000404214757411105012045 /* * Copyright (C) 2000 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. * */ #ifndef _MICOORD_H_ #define _MICOORD_H_ 1 #include "servermd.h" /* Macros which handle a coordinate in a single register */ #define GetHighWord(x) (((int) (x)) >> 16) #if IMAGE_BYTE_ORDER == MSBFirst #define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) (i)))) #define coordToInt(x,y) (((x) << 16) | ((y) & 0xffff)) #define intToX(i) (GetHighWord(i)) #define intToY(i) ((int) ((short) i)) #else #define intToCoord(i,x,y) (((x) = (int) ((short) (i))), ((y) = GetHighWord(i))) #define coordToInt(x,y) (((y) << 16) | ((x) & 0xffff)) #define intToX(i) ((int) ((short) (i))) #define intToY(i) (GetHighWord(i)) #endif #endif /* _MICOORD_H_ */ xorg-server-21.1.16/mi/mistruct.h0000644000175000017500000000531014757411105012262 /*********************************************************** 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. ******************************************************************/ #ifndef MISTRUCT_H #define MISTRUCT_H #include "mi.h" #include "regionstr.h" /* information about dashes */ typedef struct _miDash { DDXPointRec pt; int e1, e2; /* keep these, so we don't have to do it again */ int e; /* bresenham error term for this point on line */ int which; int newLine; /* 0 if part of same original line as previous dash */ } miDashRec; #endif /* MISTRUCT_H */ xorg-server-21.1.16/mi/mioverlay.h0000644000175000017500000000156414757411105012426 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef __MIOVERLAY_H #define __MIOVERLAY_H typedef void (*miOverlayTransFunc) (ScreenPtr, int, BoxPtr); typedef Bool (*miOverlayInOverlayFunc) (WindowPtr); extern _X_EXPORT Bool miInitOverlay(ScreenPtr pScreen, miOverlayInOverlayFunc inOverlay, miOverlayTransFunc trans); extern _X_EXPORT Bool miOverlayGetPrivateClips(WindowPtr pWin, RegionPtr *borderClip, RegionPtr *clipList); extern _X_EXPORT Bool miOverlayCollectUnderlayRegions(WindowPtr, RegionPtr *); extern _X_EXPORT void miOverlayComputeCompositeClip(GCPtr, WindowPtr); extern _X_EXPORT Bool miOverlayCopyUnderlay(ScreenPtr); extern _X_EXPORT void miOverlaySetTransFunction(ScreenPtr, miOverlayTransFunc); extern _X_EXPORT void miOverlaySetRootClip(ScreenPtr, Bool); #endif /* __MIOVERLAY_H */ xorg-server-21.1.16/mi/Makefile.in0000644000175000017500000010116214757411116012310 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = mi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmi_la_LIBADD = am_libmi_la_OBJECTS = miarc.lo mibitblt.lo micmap.lo micopy.lo \ midash.lo midispcur.lo mieq.lo miexpose.lo mifillarc.lo \ mifillrct.lo migc.lo miglblt.lo mioverlay.lo mipointer.lo \ mipoly.lo mipolypnt.lo mipolyrect.lo mipolyseg.lo \ mipolytext.lo mipushpxl.lo miscrinit.lo misprite.lo \ mivaltree.lo miwideline.lo miwindow.lo mizerarc.lo \ mizerclip.lo mizerline.lo libmi_la_OBJECTS = $(am_libmi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/miarc.Plo ./$(DEPDIR)/mibitblt.Plo \ ./$(DEPDIR)/micmap.Plo ./$(DEPDIR)/micopy.Plo \ ./$(DEPDIR)/midash.Plo ./$(DEPDIR)/midispcur.Plo \ ./$(DEPDIR)/mieq.Plo ./$(DEPDIR)/miexpose.Plo \ ./$(DEPDIR)/mifillarc.Plo ./$(DEPDIR)/mifillrct.Plo \ ./$(DEPDIR)/migc.Plo ./$(DEPDIR)/miglblt.Plo \ ./$(DEPDIR)/mioverlay.Plo ./$(DEPDIR)/mipointer.Plo \ ./$(DEPDIR)/mipoly.Plo ./$(DEPDIR)/mipolypnt.Plo \ ./$(DEPDIR)/mipolyrect.Plo ./$(DEPDIR)/mipolyseg.Plo \ ./$(DEPDIR)/mipolytext.Plo ./$(DEPDIR)/mipushpxl.Plo \ ./$(DEPDIR)/miscrinit.Plo ./$(DEPDIR)/misprite.Plo \ ./$(DEPDIR)/mivaltree.Plo ./$(DEPDIR)/miwideline.Plo \ ./$(DEPDIR)/miwindow.Plo ./$(DEPDIR)/mizerarc.Plo \ ./$(DEPDIR)/mizerclip.Plo ./$(DEPDIR)/mizerline.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmi_la_SOURCES) DIST_SOURCES = $(libmi_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = micmap.h miline.h mipointer.h mi.h migc.h \ mipointrst.h mizerarc.h micoord.h mistruct.h mioverlay.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmi.la @XORG_TRUE@sdk_HEADERS = micmap.h miline.h mipointer.h mi.h \ @XORG_TRUE@ migc.h mipointrst.h mizerarc.h micoord.h \ @XORG_TRUE@ mistruct.h mioverlay.h AM_CFLAGS = $(DIX_CFLAGS) libmi_la_SOURCES = \ mi.h \ miarc.c \ mibitblt.c \ micmap.c \ micmap.h \ micoord.h \ micopy.c \ midash.c \ midispcur.c \ mieq.c \ miexpose.c \ mifillarc.c \ mifillarc.h \ mifillrct.c \ mifpoly.h \ migc.c \ migc.h \ miglblt.c \ miline.h \ mioverlay.c \ mioverlay.h \ mipointer.c \ mipointer.h \ mipointrst.h \ mipoly.c \ mipoly.h \ mipolypnt.c \ mipolyrect.c \ mipolyseg.c \ mipolytext.c \ mipushpxl.c \ miscanfill.h \ miscrinit.c \ misprite.c \ misprite.h \ mistruct.h \ mivaltree.c \ mivalidate.h \ miwideline.c \ miwideline.h \ miwindow.c \ mizerarc.c \ mizerarc.h \ mizerclip.c \ mizerline.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign mi/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmi.la: $(libmi_la_OBJECTS) $(libmi_la_DEPENDENCIES) $(EXTRA_libmi_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmi_la_OBJECTS) $(libmi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibitblt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micopy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midash.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/midispcur.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mieq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miexpose.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifillarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifillrct.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/migc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miglblt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mioverlay.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipoly.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolypnt.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolyrect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolyseg.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolytext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipushpxl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscrinit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misprite.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mivaltree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miwideline.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miwindow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mizerarc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mizerclip.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mizerline.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/miarc.Plo -rm -f ./$(DEPDIR)/mibitblt.Plo -rm -f ./$(DEPDIR)/micmap.Plo -rm -f ./$(DEPDIR)/micopy.Plo -rm -f ./$(DEPDIR)/midash.Plo -rm -f ./$(DEPDIR)/midispcur.Plo -rm -f ./$(DEPDIR)/mieq.Plo -rm -f ./$(DEPDIR)/miexpose.Plo -rm -f ./$(DEPDIR)/mifillarc.Plo -rm -f ./$(DEPDIR)/mifillrct.Plo -rm -f ./$(DEPDIR)/migc.Plo -rm -f ./$(DEPDIR)/miglblt.Plo -rm -f ./$(DEPDIR)/mioverlay.Plo -rm -f ./$(DEPDIR)/mipointer.Plo -rm -f ./$(DEPDIR)/mipoly.Plo -rm -f ./$(DEPDIR)/mipolypnt.Plo -rm -f ./$(DEPDIR)/mipolyrect.Plo -rm -f ./$(DEPDIR)/mipolyseg.Plo -rm -f ./$(DEPDIR)/mipolytext.Plo -rm -f ./$(DEPDIR)/mipushpxl.Plo -rm -f ./$(DEPDIR)/miscrinit.Plo -rm -f ./$(DEPDIR)/misprite.Plo -rm -f ./$(DEPDIR)/mivaltree.Plo -rm -f ./$(DEPDIR)/miwideline.Plo -rm -f ./$(DEPDIR)/miwindow.Plo -rm -f ./$(DEPDIR)/mizerarc.Plo -rm -f ./$(DEPDIR)/mizerclip.Plo -rm -f ./$(DEPDIR)/mizerline.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/miarc.Plo -rm -f ./$(DEPDIR)/mibitblt.Plo -rm -f ./$(DEPDIR)/micmap.Plo -rm -f ./$(DEPDIR)/micopy.Plo -rm -f ./$(DEPDIR)/midash.Plo -rm -f ./$(DEPDIR)/midispcur.Plo -rm -f ./$(DEPDIR)/mieq.Plo -rm -f ./$(DEPDIR)/miexpose.Plo -rm -f ./$(DEPDIR)/mifillarc.Plo -rm -f ./$(DEPDIR)/mifillrct.Plo -rm -f ./$(DEPDIR)/migc.Plo -rm -f ./$(DEPDIR)/miglblt.Plo -rm -f ./$(DEPDIR)/mioverlay.Plo -rm -f ./$(DEPDIR)/mipointer.Plo -rm -f ./$(DEPDIR)/mipoly.Plo -rm -f ./$(DEPDIR)/mipolypnt.Plo -rm -f ./$(DEPDIR)/mipolyrect.Plo -rm -f ./$(DEPDIR)/mipolyseg.Plo -rm -f ./$(DEPDIR)/mipolytext.Plo -rm -f ./$(DEPDIR)/mipushpxl.Plo -rm -f ./$(DEPDIR)/miscrinit.Plo -rm -f ./$(DEPDIR)/misprite.Plo -rm -f ./$(DEPDIR)/mivaltree.Plo -rm -f ./$(DEPDIR)/miwideline.Plo -rm -f ./$(DEPDIR)/miwindow.Plo -rm -f ./$(DEPDIR)/mizerarc.Plo -rm -f ./$(DEPDIR)/mizerclip.Plo -rm -f ./$(DEPDIR)/mizerline.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/mi/miarc.c0000644000175000017500000031721014757411105011503 /*********************************************************** 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. ******************************************************************/ /* Author: Keith Packard and Bob Scheifler */ /* Warning: this code is toxic, do not dally very long here. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "mifpoly.h" #include "mi.h" #include "mifillarc.h" #include #define EPSILON 0.000001 #define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON) #define UNEQUAL(a,b) (fabs((a) - (b)) > EPSILON) #define PTISEQUAL(a,b) (ISEQUAL(a.x,b.x) && ISEQUAL(a.y,b.y)) #define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */ /* Point with sub-pixel positioning. */ typedef struct _SppPoint { double x, y; } SppPointRec, *SppPointPtr; typedef struct _SppArc { double x, y, width, height; double angle1, angle2; } SppArcRec, *SppArcPtr; static double miDsin(double a); static double miDcos(double a); static double miDasin(double v); static double miDatan2(double dy, double dx); #ifndef HAVE_CBRT static double cbrt(double x) { if (x > 0.0) return pow(x, 1.0 / 3.0); else return -pow(-x, 1.0 / 3.0); } #endif /* * some interesting semantic interpretation of the protocol: * * Self intersecting arcs (i.e. those spanning 360 degrees) * never join with other arcs, and are drawn without caps * (unless on/off dashed, in which case each dash segment * is capped, except when the last segment meets the * first segment, when no caps are drawn) * * double dash arcs are drawn in two parts, first the * odd dashes (drawn in background) then the even dashes * (drawn in foreground). This means that overlapping * sections of foreground/background are drawn twice, * first in background then in foreground. The double-draw * occurs even when the function uses the destination values * (e.g. xor mode). This is the same way the wide-line * code works and should be "fixed". * */ struct bound { double min, max; }; struct ibound { int min, max; }; #define boundedLe(value, bounds)\ ((bounds).min <= (value) && (value) <= (bounds).max) struct line { double m, b; int valid; }; #define intersectLine(y,line) (line.m * (y) + line.b) /* * these are all y value bounds */ struct arc_bound { struct bound ellipse; struct bound inner; struct bound outer; struct bound right; struct bound left; struct ibound inneri; struct ibound outeri; }; struct accelerators { double tail_y; double h2; double w2; double h4; double w4; double h2mw2; double h2l; double w2l; double fromIntX; double fromIntY; struct line left, right; int yorgu; int yorgl; int xorg; }; struct arc_def { double w, h, l; double a0, a1; }; #define todeg(xAngle) (((double) (xAngle)) / 64.0) #define RIGHT_END 0 #define LEFT_END 1 typedef struct _miArcJoin { int arcIndex0, arcIndex1; int phase0, phase1; int end0, end1; } miArcJoinRec, *miArcJoinPtr; typedef struct _miArcCap { int arcIndex; int end; } miArcCapRec, *miArcCapPtr; typedef struct _miArcFace { SppPointRec clock; SppPointRec center; SppPointRec counterClock; } miArcFaceRec, *miArcFacePtr; typedef struct _miArcData { xArc arc; int render; /* non-zero means render after drawing */ int join; /* related join */ int cap; /* related cap */ int selfJoin; /* final dash meets first dash */ miArcFaceRec bounds[2]; double x0, y0, x1, y1; } miArcDataRec, *miArcDataPtr; /* * This is an entire sequence of arcs, computed and categorized according * to operation. miDashArcs generates either one or two of these. */ typedef struct _miPolyArc { int narcs; miArcDataPtr arcs; int ncaps; miArcCapPtr caps; int njoins; miArcJoinPtr joins; } miPolyArcRec, *miPolyArcPtr; typedef struct { short lx, lw, rx, rw; } miArcSpan; typedef struct { miArcSpan *spans; int count1, count2, k; char top, bot, hole; } miArcSpanData; static void fillSpans(DrawablePtr pDrawable, GCPtr pGC); static void newFinalSpan(int y, int xmin, int xmax); static miArcSpanData *drawArc(xArc * tarc, int l, int a0, int a1, miArcFacePtr right, miArcFacePtr left, miArcSpanData *spdata); static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc * tarc, int lw, miArcFacePtr left, miArcFacePtr right); static void miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, miArcFacePtr pRight, int xOrgLeft, int yOrgLeft, double xFtransLeft, double yFtransLeft, int xOrgRight, int yOrgRight, double xFtransRight, double yFtransRight); static void miArcCap(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pFace, int end, int xOrg, int yOrg, double xFtrans, double yFtrans); static void miRoundCap(DrawablePtr pDraw, GCPtr pGC, SppPointRec pCenter, SppPointRec pEnd, SppPointRec pCorner, SppPointRec pOtherCorner, int fLineEnd, int xOrg, int yOrg, double xFtrans, double yFtrans); static void miFreeArcs(miPolyArcPtr arcs, GCPtr pGC); static miPolyArcPtr miComputeArcs(xArc * parcs, int narcs, GCPtr pGC); static int miGetArcPts(SppArcPtr parc, int cpt, SppPointPtr * ppPts); #define CUBED_ROOT_2 1.2599210498948732038115849718451499938964 #define CUBED_ROOT_4 1.5874010519681993173435330390930175781250 /* * draw one segment of the arc using the arc spans generation routines */ static miArcSpanData * miArcSegment(DrawablePtr pDraw, GCPtr pGC, xArc tarc, miArcFacePtr right, miArcFacePtr left, miArcSpanData *spdata) { int l = pGC->lineWidth; int a0, a1, startAngle, endAngle; miArcFacePtr temp; if (!l) l = 1; if (tarc.width == 0 || tarc.height == 0) { drawZeroArc(pDraw, pGC, &tarc, l, left, right); return spdata; } if (pGC->miTranslate) { tarc.x += pDraw->x; tarc.y += pDraw->y; } a0 = tarc.angle1; a1 = tarc.angle2; if (a1 > FULLCIRCLE) a1 = FULLCIRCLE; else if (a1 < -FULLCIRCLE) a1 = -FULLCIRCLE; if (a1 < 0) { startAngle = a0 + a1; endAngle = a0; temp = right; right = left; left = temp; } else { startAngle = a0; endAngle = a0 + a1; } /* * bounds check the two angles */ if (startAngle < 0) startAngle = FULLCIRCLE - (-startAngle) % FULLCIRCLE; if (startAngle >= FULLCIRCLE) startAngle = startAngle % FULLCIRCLE; if (endAngle < 0) endAngle = FULLCIRCLE - (-endAngle) % FULLCIRCLE; if (endAngle > FULLCIRCLE) endAngle = (endAngle - 1) % FULLCIRCLE + 1; if ((startAngle == endAngle) && a1) { startAngle = 0; endAngle = FULLCIRCLE; } return drawArc(&tarc, l, startAngle, endAngle, right, left, spdata); } /* Three equations combine to describe the boundaries of the arc x^2/w^2 + y^2/h^2 = 1 ellipse itself (X-x)^2 + (Y-y)^2 = r^2 circle at (x, y) on the ellipse (Y-y) = (X-x)*w^2*y/(h^2*x) normal at (x, y) on the ellipse These lead to a quartic relating Y and y y^4 - (2Y)y^3 + (Y^2 + (h^4 - w^2*r^2)/(w^2 - h^2))y^2 - (2Y*h^4/(w^2 - h^2))y + (Y^2*h^4)/(w^2 - h^2) = 0 The reducible cubic obtained from this quartic is z^3 - (3N)z^2 - 2V = 0 where N = (Y^2 + (h^4 - w^2*r^2/(w^2 - h^2)))/6 V = w^2*r^2*Y^2*h^4/(4 *(w^2 - h^2)^2) Let t = z - N p = -N^2 q = -N^3 - V Then we get t^3 + 3pt + 2q = 0 The discriminant of this cubic is D = q^2 + p^3 When D > 0, a real root is obtained as z = N + cbrt(-q+sqrt(D)) + cbrt(-q-sqrt(D)) When D < 0, a real root is obtained as z = N - 2m*cos(acos(-q/m^3)/3) where m = sqrt(|p|) * sign(q) Given a real root Z of the cubic, the roots of the quartic are the roots of the two quadratics y^2 + ((b+A)/2)y + (Z + (bZ - d)/A) = 0 where A = +/- sqrt(8Z + b^2 - 4c) b, c, d are the cubic, quadratic, and linear coefficients of the quartic Some experimentation is then required to determine which solutions correspond to the inner and outer boundaries. */ static void drawQuadrant(struct arc_def *def, struct accelerators *acc, int a0, int a1, int mask, miArcFacePtr right, miArcFacePtr left, miArcSpanData * spdata); static void miComputeCircleSpans(int lw, xArc * parc, miArcSpanData * spdata) { miArcSpan *span; int doinner; int x, y, e; int xk, yk, xm, ym, dx, dy; int slw, inslw; int inx = 0, iny, ine = 0; int inxk = 0, inyk = 0, inxm = 0, inym = 0; doinner = -lw; slw = parc->width - doinner; y = parc->height >> 1; dy = parc->height & 1; dx = 1 - dy; MIWIDEARCSETUP(x, y, dy, slw, e, xk, xm, yk, ym); inslw = parc->width + doinner; if (inslw > 0) { spdata->hole = spdata->top; MIWIDEARCSETUP(inx, iny, dy, inslw, ine, inxk, inxm, inyk, inym); } else { spdata->hole = FALSE; doinner = -y; } spdata->count1 = -doinner - spdata->top; spdata->count2 = y + doinner; span = spdata->spans; while (y) { MIFILLARCSTEP(slw); span->lx = dy - x; if (++doinner <= 0) { span->lw = slw; span->rx = 0; span->rw = span->lx + slw; } else { MIFILLINARCSTEP(inslw); span->lw = x - inx; span->rx = dy - inx + inslw; span->rw = inx - x + slw - inslw; } span++; } if (spdata->bot) { if (spdata->count2) spdata->count2--; else { if (lw > (int) parc->height) span[-1].rx = span[-1].rw = -((lw - (int) parc->height) >> 1); else span[-1].rw = 0; spdata->count1--; } } } static void miComputeEllipseSpans(int lw, xArc * parc, miArcSpanData * spdata) { miArcSpan *span; double w, h, r, xorg; double Hs, Hf, WH, K, Vk, Nk, Fk, Vr, N, Nc, Z, rs; double A, T, b, d, x, y, t, inx, outx = 0.0, hepp, hepm; int flip, solution; w = (double) parc->width / 2.0; h = (double) parc->height / 2.0; r = lw / 2.0; rs = r * r; Hs = h * h; WH = w * w - Hs; Nk = w * r; Vk = (Nk * Hs) / (WH + WH); Hf = Hs * Hs; Nk = (Hf - Nk * Nk) / WH; Fk = Hf / WH; hepp = h + EPSILON; hepm = h - EPSILON; K = h + ((lw - 1) >> 1); span = spdata->spans; if (parc->width & 1) xorg = .5; else xorg = 0.0; if (spdata->top) { span->lx = 0; span->lw = 1; span++; } spdata->count1 = 0; spdata->count2 = 0; spdata->hole = (spdata->top && (int) parc->height * lw <= (int) (parc->width * parc->width) && lw < (int) parc->height); for (; K > 0.0; K -= 1.0) { N = (K * K + Nk) / 6.0; Nc = N * N * N; Vr = Vk * K; t = Nc + Vr * Vr; d = Nc + t; if (d < 0.0) { d = Nc; b = N; if ((b < 0.0) == (t < 0.0)) { b = -b; d = -d; } Z = N - 2.0 * b * cos(acos(-t / d) / 3.0); if ((Z < 0.0) == (Vr < 0.0)) flip = 2; else flip = 1; } else { d = Vr * sqrt(d); Z = N + cbrt(t + d) + cbrt(t - d); flip = 0; } A = sqrt((Z + Z) - Nk); T = (Fk - Z) * K / A; inx = 0.0; solution = FALSE; b = -A + K; d = b * b - 4 * (Z + T); if (d >= 0) { d = sqrt(d); y = (b + d) / 2; if ((y >= 0.0) && (y < hepp)) { solution = TRUE; if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) t = sqrt(rs - (t * t)); else t = 0; if (flip == 2) inx = x - t; else outx = x + t; } } b = A + K; d = b * b - 4 * (Z - T); /* Because of the large magnitudes involved, we lose enough precision * that sometimes we end up with a negative value near the axis, when * it should be positive. This is a workaround. */ if (d < 0 && !solution) d = 0.0; if (d >= 0) { d = sqrt(d); y = (b + d) / 2; if (y < hepp) { if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) inx = x - sqrt(rs - (t * t)); else inx = x; } y = (b - d) / 2; if (y >= 0.0) { if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) t = sqrt(rs - (t * t)); else t = 0; if (flip == 1) inx = x - t; else outx = x + t; } } span->lx = ICEIL(xorg - outx); if (inx <= 0.0) { spdata->count1++; span->lw = ICEIL(xorg + outx) - span->lx; span->rx = ICEIL(xorg + inx); span->rw = -ICEIL(xorg - inx); } else { spdata->count2++; span->lw = ICEIL(xorg - inx) - span->lx; span->rx = ICEIL(xorg + inx); span->rw = ICEIL(xorg + outx) - span->rx; } span++; } if (spdata->bot) { outx = w + r; if (r >= h && r <= w) inx = 0.0; else if (Nk < 0.0 && -Nk < Hs) { inx = w * sqrt(1 + Nk / Hs) - sqrt(rs + Nk); if (inx > w - r) inx = w - r; } else inx = w - r; span->lx = ICEIL(xorg - outx); if (inx <= 0.0) { span->lw = ICEIL(xorg + outx) - span->lx; span->rx = ICEIL(xorg + inx); span->rw = -ICEIL(xorg - inx); } else { span->lw = ICEIL(xorg - inx) - span->lx; span->rx = ICEIL(xorg + inx); span->rw = ICEIL(xorg + outx) - span->rx; } } if (spdata->hole) { span = &spdata->spans[spdata->count1]; span->lw = -span->lx; span->rx = 1; span->rw = span->lw; spdata->count1--; spdata->count2++; } } static double tailX(double K, struct arc_def *def, struct arc_bound *bounds, struct accelerators *acc) { double w, h, r; double Hs, Hf, WH, Vk, Nk, Fk, Vr, N, Nc, Z, rs; double A, T, b, d, x, y, t, hepp, hepm; int flip, solution; double xs[2]; double *xp; w = def->w; h = def->h; r = def->l; rs = r * r; Hs = acc->h2; WH = -acc->h2mw2; Nk = def->w * r; Vk = (Nk * Hs) / (WH + WH); Hf = acc->h4; Nk = (Hf - Nk * Nk) / WH; if (K == 0.0) { if (Nk < 0.0 && -Nk < Hs) { xs[0] = w * sqrt(1 + Nk / Hs) - sqrt(rs + Nk); xs[1] = w - r; if (acc->left.valid && boundedLe(K, bounds->left) && !boundedLe(K, bounds->outer) && xs[0] >= 0.0 && xs[1] >= 0.0) return xs[1]; if (acc->right.valid && boundedLe(K, bounds->right) && !boundedLe(K, bounds->inner) && xs[0] <= 0.0 && xs[1] <= 0.0) return xs[1]; return xs[0]; } return w - r; } Fk = Hf / WH; hepp = h + EPSILON; hepm = h - EPSILON; N = (K * K + Nk) / 6.0; Nc = N * N * N; Vr = Vk * K; xp = xs; xs[0] = 0.0; t = Nc + Vr * Vr; d = Nc + t; if (d < 0.0) { d = Nc; b = N; if ((b < 0.0) == (t < 0.0)) { b = -b; d = -d; } Z = N - 2.0 * b * cos(acos(-t / d) / 3.0); if ((Z < 0.0) == (Vr < 0.0)) flip = 2; else flip = 1; } else { d = Vr * sqrt(d); Z = N + cbrt(t + d) + cbrt(t - d); flip = 0; } A = sqrt((Z + Z) - Nk); T = (Fk - Z) * K / A; solution = FALSE; b = -A + K; d = b * b - 4 * (Z + T); if (d >= 0 && flip == 2) { d = sqrt(d); y = (b + d) / 2; if ((y >= 0.0) && (y < hepp)) { solution = TRUE; if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) t = sqrt(rs - (t * t)); else t = 0; *xp++ = x - t; } } b = A + K; d = b * b - 4 * (Z - T); /* Because of the large magnitudes involved, we lose enough precision * that sometimes we end up with a negative value near the axis, when * it should be positive. This is a workaround. */ if (d < 0 && !solution) d = 0.0; if (d >= 0) { d = sqrt(d); y = (b + d) / 2; if (y < hepp) { if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) *xp++ = x - sqrt(rs - (t * t)); else *xp++ = x; } y = (b - d) / 2; if (y >= 0.0 && flip == 1) { if (y > hepm) y = h; t = y / h; x = w * sqrt(1 - (t * t)); t = K - y; if (rs - (t * t) >= 0) t = sqrt(rs - (t * t)); else t = 0; *xp++ = x - t; } } if (xp > &xs[1]) { if (acc->left.valid && boundedLe(K, bounds->left) && !boundedLe(K, bounds->outer) && xs[0] >= 0.0 && xs[1] >= 0.0) return xs[1]; if (acc->right.valid && boundedLe(K, bounds->right) && !boundedLe(K, bounds->inner) && xs[0] <= 0.0 && xs[1] <= 0.0) return xs[1]; } return xs[0]; } static miArcSpanData * miComputeWideEllipse(int lw, xArc * parc) { miArcSpanData *spdata = NULL; int k; if (!lw) lw = 1; k = (parc->height >> 1) + ((lw - 1) >> 1); spdata = malloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); if (!spdata) return NULL; spdata->spans = (miArcSpan *) (spdata + 1); spdata->k = k; spdata->top = !(lw & 1) && !(parc->width & 1); spdata->bot = !(parc->height & 1); if (parc->width == parc->height) miComputeCircleSpans(lw, parc, spdata); else miComputeEllipseSpans(lw, parc, spdata); return spdata; } static void miFillWideEllipse(DrawablePtr pDraw, GCPtr pGC, xArc * parc) { DDXPointPtr points; DDXPointPtr pts; int *widths; int *wids; miArcSpanData *spdata; miArcSpan *span; int xorg, yorgu, yorgl; int n; yorgu = parc->height + pGC->lineWidth; n = (sizeof(int) * 2) * yorgu; widths = malloc(n + (sizeof(DDXPointRec) * 2) * yorgu); if (!widths) return; points = (DDXPointPtr) ((char *) widths + n); spdata = miComputeWideEllipse((int) pGC->lineWidth, parc); if (!spdata) { free(widths); return; } pts = points; wids = widths; span = spdata->spans; xorg = parc->x + (parc->width >> 1); yorgu = parc->y + (parc->height >> 1); yorgl = yorgu + (parc->height & 1); if (pGC->miTranslate) { xorg += pDraw->x; yorgu += pDraw->y; yorgl += pDraw->y; } yorgu -= spdata->k; yorgl += spdata->k; if (spdata->top) { pts->x = xorg; pts->y = yorgu - 1; pts++; *wids++ = 1; span++; } for (n = spdata->count1; --n >= 0;) { pts[0].x = xorg + span->lx; pts[0].y = yorgu; wids[0] = span->lw; pts[1].x = pts[0].x; pts[1].y = yorgl; wids[1] = wids[0]; yorgu++; yorgl--; pts += 2; wids += 2; span++; } if (spdata->hole) { pts[0].x = xorg; pts[0].y = yorgl; wids[0] = 1; pts++; wids++; } for (n = spdata->count2; --n >= 0;) { pts[0].x = xorg + span->lx; pts[0].y = yorgu; wids[0] = span->lw; pts[1].x = xorg + span->rx; pts[1].y = pts[0].y; wids[1] = span->rw; pts[2].x = pts[0].x; pts[2].y = yorgl; wids[2] = wids[0]; pts[3].x = pts[1].x; pts[3].y = pts[2].y; wids[3] = wids[1]; yorgu++; yorgl--; pts += 4; wids += 4; span++; } if (spdata->bot) { if (span->rw <= 0) { pts[0].x = xorg + span->lx; pts[0].y = yorgu; wids[0] = span->lw; pts++; wids++; } else { pts[0].x = xorg + span->lx; pts[0].y = yorgu; wids[0] = span->lw; pts[1].x = xorg + span->rx; pts[1].y = pts[0].y; wids[1] = span->rw; pts += 2; wids += 2; } } free(spdata); (*pGC->ops->FillSpans) (pDraw, pGC, pts - points, points, widths, FALSE); free(widths); } /* * miPolyArc strategy: * * If arc is zero width and solid, we don't have to worry about the rasterop * or join styles. For wide solid circles, we use a fast integer algorithm. * For wide solid ellipses, we use special case floating point code. * Otherwise, we set up pDrawTo and pGCTo according to the rasterop, then * draw using pGCTo and pDrawTo. If the raster-op was "tricky," that is, * if it involves the destination, then we use PushPixels to move the bits * from the scratch drawable to pDraw. (See the wide line code for a * fuller explanation of this.) */ void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) { int i; xArc *parc; int xMin, xMax, yMin, yMax; int pixmapWidth = 0, pixmapHeight = 0; int xOrg = 0, yOrg = 0; int width = pGC->lineWidth; Bool fTricky; DrawablePtr pDrawTo; CARD32 fg, bg; GCPtr pGCTo; miPolyArcPtr polyArcs; int cap[2], join[2]; int iphase; int halfWidth; if (width == 0 && pGC->lineStyle == LineSolid) { for (i = narcs, parc = parcs; --i >= 0; parc++) { miArcSpanData *spdata; spdata = miArcSegment(pDraw, pGC, *parc, NULL, NULL, NULL); free(spdata); } fillSpans(pDraw, pGC); return; } if ((pGC->lineStyle == LineSolid) && narcs) { while (parcs->width && parcs->height && (parcs->angle2 >= FULLCIRCLE || parcs->angle2 <= -FULLCIRCLE)) { miFillWideEllipse(pDraw, pGC, parcs); if (!--narcs) return; parcs++; } } /* Set up pDrawTo and pGCTo based on the rasterop */ switch (pGC->alu) { case GXclear: /* 0 */ case GXcopy: /* src */ case GXcopyInverted: /* NOT src */ case GXset: /* 1 */ fTricky = FALSE; pDrawTo = pDraw; pGCTo = pGC; break; default: fTricky = TRUE; /* find bounding box around arcs */ xMin = yMin = MAXSHORT; xMax = yMax = MINSHORT; for (i = narcs, parc = parcs; --i >= 0; parc++) { xMin = min(xMin, parc->x); yMin = min(yMin, parc->y); xMax = max(xMax, (parc->x + (int) parc->width)); yMax = max(yMax, (parc->y + (int) parc->height)); } /* expand box to deal with line widths */ halfWidth = (width + 1) / 2; xMin -= halfWidth; yMin -= halfWidth; xMax += halfWidth; yMax += halfWidth; /* compute pixmap size; limit it to size of drawable */ xOrg = max(xMin, 0); yOrg = max(yMin, 0); pixmapWidth = min(xMax, pDraw->width) - xOrg; pixmapHeight = min(yMax, pDraw->height) - yOrg; /* if nothing left, return */ if ((pixmapWidth <= 0) || (pixmapHeight <= 0)) return; for (i = narcs, parc = parcs; --i >= 0; parc++) { parc->x -= xOrg; parc->y -= yOrg; } if (pGC->miTranslate) { xOrg += pDraw->x; yOrg += pDraw->y; } /* set up scratch GC */ pGCTo = GetScratchGC(1, pDraw->pScreen); if (!pGCTo) return; { ChangeGCVal gcvals[6]; gcvals[0].val = GXcopy; gcvals[1].val = 1; gcvals[2].val = 0; gcvals[3].val = pGC->lineWidth; gcvals[4].val = pGC->capStyle; gcvals[5].val = pGC->joinStyle; ChangeGC(NullClient, pGCTo, GCFunction | GCForeground | GCBackground | GCLineWidth | GCCapStyle | GCJoinStyle, gcvals); } /* allocate a bitmap of the appropriate size, and validate it */ pDrawTo = (DrawablePtr) (*pDraw->pScreen->CreatePixmap) (pDraw->pScreen, pixmapWidth, pixmapHeight, 1, CREATE_PIXMAP_USAGE_SCRATCH); if (!pDrawTo) { FreeScratchGC(pGCTo); return; } ValidateGC(pDrawTo, pGCTo); miClearDrawable(pDrawTo, pGCTo); } fg = pGC->fgPixel; bg = pGC->bgPixel; /* the protocol sez these don't cause color changes */ if ((pGC->fillStyle == FillTiled) || (pGC->fillStyle == FillOpaqueStippled)) bg = fg; polyArcs = miComputeArcs(parcs, narcs, pGC); if (!polyArcs) goto out; cap[0] = cap[1] = 0; join[0] = join[1] = 0; for (iphase = (pGC->lineStyle == LineDoubleDash); iphase >= 0; iphase--) { miArcSpanData *spdata = NULL; xArc lastArc; ChangeGCVal gcval; if (iphase == 1) { gcval.val = bg; ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } else if (pGC->lineStyle == LineDoubleDash) { gcval.val = fg; ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } for (i = 0; i < polyArcs[iphase].narcs; i++) { miArcDataPtr arcData; arcData = &polyArcs[iphase].arcs[i]; if (spdata) { if (lastArc.width != arcData->arc.width || lastArc.height != arcData->arc.height) { free(spdata); spdata = NULL; } } memcpy(&lastArc, &arcData->arc, sizeof(xArc)); spdata = miArcSegment(pDrawTo, pGCTo, arcData->arc, &arcData->bounds[RIGHT_END], &arcData->bounds[LEFT_END], spdata); if (polyArcs[iphase].arcs[i].render) { fillSpans(pDrawTo, pGCTo); /* don't cap self-joining arcs */ if (polyArcs[iphase].arcs[i].selfJoin && cap[iphase] < polyArcs[iphase].arcs[i].cap) cap[iphase]++; while (cap[iphase] < polyArcs[iphase].arcs[i].cap) { int arcIndex, end; miArcDataPtr arcData0; arcIndex = polyArcs[iphase].caps[cap[iphase]].arcIndex; end = polyArcs[iphase].caps[cap[iphase]].end; arcData0 = &polyArcs[iphase].arcs[arcIndex]; miArcCap(pDrawTo, pGCTo, &arcData0->bounds[end], end, arcData0->arc.x, arcData0->arc.y, (double) arcData0->arc.width / 2.0, (double) arcData0->arc.height / 2.0); ++cap[iphase]; } while (join[iphase] < polyArcs[iphase].arcs[i].join) { int arcIndex0, arcIndex1, end0, end1; int phase0, phase1; miArcDataPtr arcData0, arcData1; miArcJoinPtr joinp; joinp = &polyArcs[iphase].joins[join[iphase]]; arcIndex0 = joinp->arcIndex0; end0 = joinp->end0; arcIndex1 = joinp->arcIndex1; end1 = joinp->end1; phase0 = joinp->phase0; phase1 = joinp->phase1; arcData0 = &polyArcs[phase0].arcs[arcIndex0]; arcData1 = &polyArcs[phase1].arcs[arcIndex1]; miArcJoin(pDrawTo, pGCTo, &arcData0->bounds[end0], &arcData1->bounds[end1], arcData0->arc.x, arcData0->arc.y, (double) arcData0->arc.width / 2.0, (double) arcData0->arc.height / 2.0, arcData1->arc.x, arcData1->arc.y, (double) arcData1->arc.width / 2.0, (double) arcData1->arc.height / 2.0); ++join[iphase]; } if (fTricky) { if (pGC->serialNumber != pDraw->serialNumber) ValidateGC(pDraw, pGC); (*pGC->ops->PushPixels) (pGC, (PixmapPtr) pDrawTo, pDraw, pixmapWidth, pixmapHeight, xOrg, yOrg); miClearDrawable((DrawablePtr) pDrawTo, pGCTo); } } } free(spdata); spdata = NULL; } miFreeArcs(polyArcs, pGC); out: if (fTricky) { (*pGCTo->pScreen->DestroyPixmap) ((PixmapPtr) pDrawTo); FreeScratchGC(pGCTo); } } /* Find the index of the point with the smallest y.also return the * smallest and largest y */ static int GetFPolyYBounds(SppPointPtr pts, int n, double yFtrans, int *by, int *ty) { SppPointPtr ptMin; double ymin, ymax; SppPointPtr ptsStart = pts; ptMin = pts; ymin = ymax = (pts++)->y; while (--n > 0) { if (pts->y < ymin) { ptMin = pts; ymin = pts->y; } if (pts->y > ymax) ymax = pts->y; pts++; } *by = ICEIL(ymin + yFtrans); *ty = ICEIL(ymax + yFtrans - 1); return ptMin - ptsStart; } /* * miFillSppPoly written by Todd Newman; April. 1987. * * Fill a convex polygon. If the given polygon * is not convex, then the result is undefined. * The algorithm is to order the edges from smallest * y to largest by partitioning the array into a left * edge list and a right edge list. The algorithm used * to traverse each edge is digital differencing analyzer * line algorithm with y as the major axis. There's some funny linear * interpolation involved because of the subpixel postioning. */ static void miFillSppPoly(DrawablePtr dst, GCPtr pgc, int count, /* number of points */ SppPointPtr ptsIn, /* the points */ int xTrans, int yTrans, /* Translate each point by this */ double xFtrans, double yFtrans /* translate before conversion by this amount. This provides a mechanism to match rounding errors with any shape that must meet the polygon exactly. */ ) { double xl = 0.0, xr = 0.0, /* x vals of left and right edges */ ml = 0.0, /* left edge slope */ mr = 0.0, /* right edge slope */ dy, /* delta y */ i; /* loop counter */ int y, /* current scanline */ j, imin, /* index of vertex with smallest y */ ymin, /* y-extents of polygon */ ymax, *width, *FirstWidth, /* output buffer */ *Marked; /* set if this vertex has been used */ int left, right, /* indices to first endpoints */ nextleft, nextright; /* indices to second endpoints */ DDXPointPtr ptsOut, FirstPoint; /* output buffer */ if (pgc->miTranslate) { xTrans += dst->x; yTrans += dst->y; } imin = GetFPolyYBounds(ptsIn, count, yFtrans, &ymin, &ymax); y = ymax - ymin + 1; if ((count < 3) || (y <= 0)) return; ptsOut = FirstPoint = xallocarray(y, sizeof(DDXPointRec)); width = FirstWidth = xallocarray(y, sizeof(int)); Marked = xallocarray(count, sizeof(int)); if (!ptsOut || !width || !Marked) { free(Marked); free(width); free(ptsOut); return; } for (j = 0; j < count; j++) Marked[j] = 0; nextleft = nextright = imin; Marked[imin] = -1; y = ICEIL(ptsIn[nextleft].y + yFtrans); /* * loop through all edges of the polygon */ do { /* add a left edge if we need to */ if ((y > (ptsIn[nextleft].y + yFtrans) || ISEQUAL(y, ptsIn[nextleft].y + yFtrans)) && Marked[nextleft] != 1) { Marked[nextleft]++; left = nextleft++; /* find the next edge, considering the end conditions */ if (nextleft >= count) nextleft = 0; /* now compute the starting point and slope */ dy = ptsIn[nextleft].y - ptsIn[left].y; if (dy != 0.0) { ml = (ptsIn[nextleft].x - ptsIn[left].x) / dy; dy = y - (ptsIn[left].y + yFtrans); xl = (ptsIn[left].x + xFtrans) + ml * max(dy, 0); } } /* add a right edge if we need to */ if ((y > ptsIn[nextright].y + yFtrans) || (ISEQUAL(y, ptsIn[nextright].y + yFtrans) && Marked[nextright] != 1)) { Marked[nextright]++; right = nextright--; /* find the next edge, considering the end conditions */ if (nextright < 0) nextright = count - 1; /* now compute the starting point and slope */ dy = ptsIn[nextright].y - ptsIn[right].y; if (dy != 0.0) { mr = (ptsIn[nextright].x - ptsIn[right].x) / dy; dy = y - (ptsIn[right].y + yFtrans); xr = (ptsIn[right].x + xFtrans) + mr * max(dy, 0); } } /* * generate scans to fill while we still have * a right edge as well as a left edge. */ i = (min(ptsIn[nextleft].y, ptsIn[nextright].y) + yFtrans) - y; if (i < EPSILON) { if (Marked[nextleft] && Marked[nextright]) { /* Arrgh, we're trapped! (no more points) * Out, we've got to get out of here before this decadence saps * our will completely! */ break; } continue; } else { j = (int) i; if (!j) j++; } while (j > 0) { int cxl, cxr; ptsOut->y = (y) + yTrans; cxl = ICEIL(xl); cxr = ICEIL(xr); /* reverse the edges if necessary */ if (xl < xr) { *(width++) = cxr - cxl; (ptsOut++)->x = cxl + xTrans; } else { *(width++) = cxl - cxr; (ptsOut++)->x = cxr + xTrans; } y++; /* increment down the edges */ xl += ml; xr += mr; j--; } } while (y <= ymax); /* Finally, fill the spans we've collected */ (*pgc->ops->FillSpans) (dst, pgc, ptsOut - FirstPoint, FirstPoint, FirstWidth, 1); free(Marked); free(FirstWidth); free(FirstPoint); } static double angleBetween(SppPointRec center, SppPointRec point1, SppPointRec point2) { double a1, a2, a; /* * reflect from X coordinates back to ellipse * coordinates -- y increasing upwards */ a1 = miDatan2(-(point1.y - center.y), point1.x - center.x); a2 = miDatan2(-(point2.y - center.y), point2.x - center.x); a = a2 - a1; if (a <= -180.0) a += 360.0; else if (a > 180.0) a -= 360.0; return a; } static void translateBounds(miArcFacePtr b, int x, int y, double fx, double fy) { fx += x; fy += y; b->clock.x -= fx; b->clock.y -= fy; b->center.x -= fx; b->center.y -= fy; b->counterClock.x -= fx; b->counterClock.y -= fy; } static void miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, miArcFacePtr pRight, int xOrgLeft, int yOrgLeft, double xFtransLeft, double yFtransLeft, int xOrgRight, int yOrgRight, double xFtransRight, double yFtransRight) { SppPointRec center, corner, otherCorner; SppPointRec poly[5], e; SppPointPtr pArcPts; int cpt; SppArcRec arc; miArcFaceRec Right, Left; int polyLen = 0; int xOrg, yOrg; double xFtrans, yFtrans; double a; double ae, ac2, ec2, bc2, de; double width; xOrg = (xOrgRight + xOrgLeft) / 2; yOrg = (yOrgRight + yOrgLeft) / 2; xFtrans = (xFtransLeft + xFtransRight) / 2; yFtrans = (yFtransLeft + yFtransRight) / 2; Right = *pRight; translateBounds(&Right, xOrg - xOrgRight, yOrg - yOrgRight, xFtrans - xFtransRight, yFtrans - yFtransRight); Left = *pLeft; translateBounds(&Left, xOrg - xOrgLeft, yOrg - yOrgLeft, xFtrans - xFtransLeft, yFtrans - yFtransLeft); pRight = &Right; pLeft = &Left; if (pRight->clock.x == pLeft->counterClock.x && pRight->clock.y == pLeft->counterClock.y) return; center = pRight->center; if (0 <= (a = angleBetween(center, pRight->clock, pLeft->counterClock)) && a <= 180.0) { corner = pRight->clock; otherCorner = pLeft->counterClock; } else { a = angleBetween(center, pLeft->clock, pRight->counterClock); corner = pLeft->clock; otherCorner = pRight->counterClock; } switch (pGC->joinStyle) { case JoinRound: width = (pGC->lineWidth ? (double) pGC->lineWidth : (double) 1); arc.x = center.x - width / 2; arc.y = center.y - width / 2; arc.width = width; arc.height = width; arc.angle1 = -miDatan2(corner.y - center.y, corner.x - center.x); arc.angle2 = a; pArcPts = malloc(3 * sizeof(SppPointRec)); if (!pArcPts) return; pArcPts[0].x = otherCorner.x; pArcPts[0].y = otherCorner.y; pArcPts[1].x = center.x; pArcPts[1].y = center.y; pArcPts[2].x = corner.x; pArcPts[2].y = corner.y; if ((cpt = miGetArcPts(&arc, 3, &pArcPts))) { /* by drawing with miFillSppPoly and setting the endpoints of the arc * to be the corners, we assure that the cap will meet up with the * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, xOrg, yOrg, xFtrans, yFtrans); } free(pArcPts); return; case JoinMiter: /* * don't miter arcs with less than 11 degrees between them */ if (a < 169.0) { poly[0] = corner; poly[1] = center; poly[2] = otherCorner; bc2 = (corner.x - otherCorner.x) * (corner.x - otherCorner.x) + (corner.y - otherCorner.y) * (corner.y - otherCorner.y); ec2 = bc2 / 4; ac2 = (corner.x - center.x) * (corner.x - center.x) + (corner.y - center.y) * (corner.y - center.y); ae = sqrt(ac2 - ec2); de = ec2 / ae; e.x = (corner.x + otherCorner.x) / 2; e.y = (corner.y + otherCorner.y) / 2; poly[3].x = e.x + de * (e.x - center.x) / ae; poly[3].y = e.y + de * (e.y - center.y) / ae; poly[4] = corner; polyLen = 5; break; } case JoinBevel: poly[0] = corner; poly[1] = center; poly[2] = otherCorner; poly[3] = corner; polyLen = 4; break; } miFillSppPoly(pDraw, pGC, polyLen, poly, xOrg, yOrg, xFtrans, yFtrans); } /*ARGSUSED*/ static void miArcCap(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pFace, int end, int xOrg, int yOrg, double xFtrans, double yFtrans) { SppPointRec corner, otherCorner, center, endPoint, poly[5]; corner = pFace->clock; otherCorner = pFace->counterClock; center = pFace->center; switch (pGC->capStyle) { case CapProjecting: poly[0].x = otherCorner.x; poly[0].y = otherCorner.y; poly[1].x = corner.x; poly[1].y = corner.y; poly[2].x = corner.x - (center.y - corner.y); poly[2].y = corner.y + (center.x - corner.x); poly[3].x = otherCorner.x - (otherCorner.y - center.y); poly[3].y = otherCorner.y + (otherCorner.x - center.x); poly[4].x = otherCorner.x; poly[4].y = otherCorner.y; miFillSppPoly(pDraw, pGC, 5, poly, xOrg, yOrg, xFtrans, yFtrans); break; case CapRound: /* * miRoundCap just needs these to be unequal. */ endPoint = center; endPoint.x = endPoint.x + 100; miRoundCap(pDraw, pGC, center, endPoint, corner, otherCorner, 0, -xOrg, -yOrg, xFtrans, yFtrans); break; } } /* MIROUNDCAP -- a private helper function * Put Rounded cap on end. pCenter is the center of this end of the line * pEnd is the center of the other end of the line. pCorner is one of the * two corners at this end of the line. * NOTE: pOtherCorner must be counter-clockwise from pCorner. */ /*ARGSUSED*/ static void miRoundCap(DrawablePtr pDraw, GCPtr pGC, SppPointRec pCenter, SppPointRec pEnd, SppPointRec pCorner, SppPointRec pOtherCorner, int fLineEnd, int xOrg, int yOrg, double xFtrans, double yFtrans) { int cpt; double width; SppArcRec arc; SppPointPtr pArcPts; width = (pGC->lineWidth ? (double) pGC->lineWidth : (double) 1); arc.x = pCenter.x - width / 2; arc.y = pCenter.y - width / 2; arc.width = width; arc.height = width; arc.angle1 = -miDatan2(pCorner.y - pCenter.y, pCorner.x - pCenter.x); if (PTISEQUAL(pCenter, pEnd)) arc.angle2 = -180.0; else { arc.angle2 = -miDatan2(pOtherCorner.y - pCenter.y, pOtherCorner.x - pCenter.x) - arc.angle1; if (arc.angle2 < 0) arc.angle2 += 360.0; } pArcPts = (SppPointPtr) NULL; if ((cpt = miGetArcPts(&arc, 0, &pArcPts))) { /* by drawing with miFillSppPoly and setting the endpoints of the arc * to be the corners, we assure that the cap will meet up with the * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, -xOrg, -yOrg, xFtrans, yFtrans); } free(pArcPts); } /* * To avoid inaccuracy at the cardinal points, use trig functions * which are exact for those angles */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #ifndef M_PI_2 #define M_PI_2 1.57079632679489661923 #endif #define Dsin(d) ((d) == 0.0 ? 0.0 : ((d) == 90.0 ? 1.0 : sin(d*M_PI/180.0))) #define Dcos(d) ((d) == 0.0 ? 1.0 : ((d) == 90.0 ? 0.0 : cos(d*M_PI/180.0))) #define mod(a,b) ((a) >= 0 ? (a) % (b) : (b) - (-(a)) % (b)) static double miDcos(double a) { int i; if (floor(a / 90) == a / 90) { i = (int) (a / 90.0); switch (mod(i, 4)) { case 0: return 1; case 1: return 0; case 2: return -1; case 3: return 0; } } return cos(a * M_PI / 180.0); } static double miDsin(double a) { int i; if (floor(a / 90) == a / 90) { i = (int) (a / 90.0); switch (mod(i, 4)) { case 0: return 0; case 1: return 1; case 2: return 0; case 3: return -1; } } return sin(a * M_PI / 180.0); } static double miDasin(double v) { if (v == 0) return 0.0; if (v == 1.0) return 90.0; if (v == -1.0) return -90.0; return asin(v) * (180.0 / M_PI); } static double miDatan2(double dy, double dx) { if (dy == 0) { if (dx >= 0) return 0.0; return 180.0; } else if (dx == 0) { if (dy > 0) return 90.0; return -90.0; } else if (fabs(dy) == fabs(dx)) { if (dy > 0) { if (dx > 0) return 45.0; return 135.0; } else { if (dx > 0) return 315.0; return 225.0; } } else { return atan2(dy, dx) * (180.0 / M_PI); } } /* MIGETARCPTS -- Converts an arc into a set of line segments -- a helper * routine for filled arc and line (round cap) code. * Returns the number of points in the arc. Note that it takes a pointer * to a pointer to where it should put the points and an index (cpt). * This procedure allocates the space necessary to fit the arc points. * Sometimes it's convenient for those points to be at the end of an existing * array. (For example, if we want to leave a spare point to make sectors * instead of segments.) So we pass in the malloc()ed chunk that contains the * array and an index saying where we should start stashing the points. * If there isn't an array already, we just pass in a null pointer and * count on realloc() to handle the null pointer correctly. */ static int miGetArcPts(SppArcPtr parc, /* points to an arc */ int cpt, /* number of points already in arc list */ SppPointPtr * ppPts) { /* pointer to pointer to arc-list -- modified */ double st, /* Start Theta, start angle */ et, /* End Theta, offset from start theta */ dt, /* Delta Theta, angle to sweep ellipse */ cdt, /* Cos Delta Theta, actually 2 cos(dt) */ x0, y0, /* the recurrence formula needs two points to start */ x1, y1, x2, y2, /* this will be the new point generated */ xc, yc; /* the center point */ int count, i; SppPointPtr poly; /* The spec says that positive angles indicate counterclockwise motion. * Given our coordinate system (with 0,0 in the upper left corner), * the screen appears flipped in Y. The easiest fix is to negate the * angles given */ st = -parc->angle1; et = -parc->angle2; /* Try to get a delta theta that is within 1/2 pixel. Then adjust it * so that it divides evenly into the total. * I'm just using cdt 'cause I'm lazy. */ cdt = parc->width; if (parc->height > cdt) cdt = parc->height; cdt /= 2.0; if (cdt <= 0) return 0; if (cdt < 1.0) cdt = 1.0; dt = miDasin(1.0 / cdt); /* minimum step necessary */ count = et / dt; count = abs(count) + 1; dt = et / count; count++; cdt = 2 * miDcos(dt); if (!(poly = reallocarray(*ppPts, cpt + count, sizeof(SppPointRec)))) return 0; *ppPts = poly; xc = parc->width / 2.0; /* store half width and half height */ yc = parc->height / 2.0; x0 = xc * miDcos(st); y0 = yc * miDsin(st); x1 = xc * miDcos(st + dt); y1 = yc * miDsin(st + dt); xc += parc->x; /* by adding initial point, these become */ yc += parc->y; /* the center point */ poly[cpt].x = (xc + x0); poly[cpt].y = (yc + y0); poly[cpt + 1].x = (xc + x1); poly[cpt + 1].y = (yc + y1); for (i = 2; i < count; i++) { x2 = cdt * x1 - x0; y2 = cdt * y1 - y0; poly[cpt + i].x = (xc + x2); poly[cpt + i].y = (yc + y2); x0 = x1; y0 = y1; x1 = x2; y1 = y2; } /* adjust the last point */ if (fabs(parc->angle2) >= 360.0) poly[cpt + i - 1] = poly[0]; else { poly[cpt + i - 1].x = (miDcos(st + et) * parc->width / 2.0 + xc); poly[cpt + i - 1].y = (miDsin(st + et) * parc->height / 2.0 + yc); } return count; } struct arcData { double x0, y0, x1, y1; int selfJoin; }; #define ADD_REALLOC_STEP 20 static void addCap(miArcCapPtr * capsp, int *ncapsp, int *sizep, int end, int arcIndex) { int newsize; miArcCapPtr cap; if (*ncapsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; cap = reallocarray(*capsp, newsize, sizeof(**capsp)); if (!cap) return; *sizep = newsize; *capsp = cap; } cap = &(*capsp)[*ncapsp]; cap->end = end; cap->arcIndex = arcIndex; ++*ncapsp; } static void addJoin(miArcJoinPtr * joinsp, int *njoinsp, int *sizep, int end0, int index0, int phase0, int end1, int index1, int phase1) { int newsize; miArcJoinPtr join; if (*njoinsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; join = reallocarray(*joinsp, newsize, sizeof(**joinsp)); if (!join) return; *sizep = newsize; *joinsp = join; } join = &(*joinsp)[*njoinsp]; join->end0 = end0; join->arcIndex0 = index0; join->phase0 = phase0; join->end1 = end1; join->arcIndex1 = index1; join->phase1 = phase1; ++*njoinsp; } static miArcDataPtr addArc(miArcDataPtr * arcsp, int *narcsp, int *sizep, xArc * xarc) { int newsize; miArcDataPtr arc; if (*narcsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; arc = reallocarray(*arcsp, newsize, sizeof(**arcsp)); if (!arc) return NULL; *sizep = newsize; *arcsp = arc; } arc = &(*arcsp)[*narcsp]; arc->arc = *xarc; ++*narcsp; return arc; } static void miFreeArcs(miPolyArcPtr arcs, GCPtr pGC) { int iphase; for (iphase = ((pGC->lineStyle == LineDoubleDash) ? 1 : 0); iphase >= 0; iphase--) { if (arcs[iphase].narcs > 0) free(arcs[iphase].arcs); if (arcs[iphase].njoins > 0) free(arcs[iphase].joins); if (arcs[iphase].ncaps > 0) free(arcs[iphase].caps); } free(arcs); } /* * map angles to radial distance. This only deals with the first quadrant */ /* * a polygonal approximation to the arc for computing arc lengths */ #define DASH_MAP_SIZE 91 #define dashIndexToAngle(di) ((((double) (di)) * 90.0) / ((double) DASH_MAP_SIZE - 1)) #define xAngleToDashIndex(xa) ((((long) (xa)) * (DASH_MAP_SIZE - 1)) / (90 * 64)) #define dashIndexToXAngle(di) ((((long) (di)) * (90 * 64)) / (DASH_MAP_SIZE - 1)) #define dashXAngleStep (((double) (90 * 64)) / ((double) (DASH_MAP_SIZE - 1))) typedef struct { double map[DASH_MAP_SIZE]; } dashMap; static int computeAngleFromPath(int startAngle, int endAngle, dashMap * map, int *lenp, int backwards); static void computeDashMap(xArc * arcp, dashMap * map) { int di; double a, x, y, prevx = 0.0, prevy = 0.0, dist; for (di = 0; di < DASH_MAP_SIZE; di++) { a = dashIndexToAngle(di); x = ((double) arcp->width / 2.0) * miDcos(a); y = ((double) arcp->height / 2.0) * miDsin(a); if (di == 0) { map->map[di] = 0.0; } else { dist = hypot(x - prevx, y - prevy); map->map[di] = map->map[di - 1] + dist; } prevx = x; prevy = y; } } typedef enum { HORIZONTAL, VERTICAL, OTHER } arcTypes; /* this routine is a bit gory */ static miPolyArcPtr miComputeArcs(xArc * parcs, int narcs, GCPtr pGC) { int isDashed, isDoubleDash; int dashOffset; miPolyArcPtr arcs; int start, i, j, k = 0, nexti, nextk = 0; int joinSize[2]; int capSize[2]; int arcSize[2]; int angle2; double a0, a1; struct arcData *data; miArcDataPtr arc; xArc xarc; int iphase, prevphase = 0, joinphase; int arcsJoin; int selfJoin; int iDash = 0, dashRemaining = 0; int iDashStart = 0, dashRemainingStart = 0, iphaseStart; int startAngle, spanAngle, endAngle, backwards = 0; int prevDashAngle, dashAngle; dashMap map; isDashed = !(pGC->lineStyle == LineSolid); isDoubleDash = (pGC->lineStyle == LineDoubleDash); dashOffset = pGC->dashOffset; data = xallocarray(narcs, sizeof(struct arcData)); if (!data) return NULL; arcs = xallocarray(isDoubleDash ? 2 : 1, sizeof(*arcs)); if (!arcs) { free(data); return NULL; } for (i = 0; i < narcs; i++) { a0 = todeg(parcs[i].angle1); angle2 = parcs[i].angle2; if (angle2 > FULLCIRCLE) angle2 = FULLCIRCLE; else if (angle2 < -FULLCIRCLE) angle2 = -FULLCIRCLE; data[i].selfJoin = angle2 == FULLCIRCLE || angle2 == -FULLCIRCLE; a1 = todeg(parcs[i].angle1 + angle2); data[i].x0 = parcs[i].x + (double) parcs[i].width / 2 * (1 + miDcos(a0)); data[i].y0 = parcs[i].y + (double) parcs[i].height / 2 * (1 - miDsin(a0)); data[i].x1 = parcs[i].x + (double) parcs[i].width / 2 * (1 + miDcos(a1)); data[i].y1 = parcs[i].y + (double) parcs[i].height / 2 * (1 - miDsin(a1)); } for (iphase = 0; iphase < (isDoubleDash ? 2 : 1); iphase++) { arcs[iphase].njoins = 0; arcs[iphase].joins = 0; joinSize[iphase] = 0; arcs[iphase].ncaps = 0; arcs[iphase].caps = 0; capSize[iphase] = 0; arcs[iphase].narcs = 0; arcs[iphase].arcs = 0; arcSize[iphase] = 0; } iphase = 0; if (isDashed) { iDash = 0; dashRemaining = pGC->dash[0]; while (dashOffset > 0) { if (dashOffset >= dashRemaining) { dashOffset -= dashRemaining; iphase = iphase ? 0 : 1; iDash++; if (iDash == pGC->numInDashList) iDash = 0; dashRemaining = pGC->dash[iDash]; } else { dashRemaining -= dashOffset; dashOffset = 0; } } iDashStart = iDash; dashRemainingStart = dashRemaining; } iphaseStart = iphase; for (i = narcs - 1; i >= 0; i--) { j = i + 1; if (j == narcs) j = 0; if (data[i].selfJoin || i == j || (UNEQUAL(data[i].x1, data[j].x0) || UNEQUAL(data[i].y1, data[j].y0))) { if (iphase == 0 || isDoubleDash) addCap(&arcs[iphase].caps, &arcs[iphase].ncaps, &capSize[iphase], RIGHT_END, 0); break; } } start = i + 1; if (start == narcs) start = 0; i = start; for (;;) { j = i + 1; if (j == narcs) j = 0; nexti = i + 1; if (nexti == narcs) nexti = 0; if (isDashed) { /* ** deal with dashed arcs. Use special rules for certain 0 area arcs. ** Presumably, the other 0 area arcs still aren't done right. */ arcTypes arcType = OTHER; CARD16 thisLength; if (parcs[i].height == 0 && (parcs[i].angle1 % FULLCIRCLE) == 0x2d00 && parcs[i].angle2 == 0x2d00) arcType = HORIZONTAL; else if (parcs[i].width == 0 && (parcs[i].angle1 % FULLCIRCLE) == 0x1680 && parcs[i].angle2 == 0x2d00) arcType = VERTICAL; if (arcType == OTHER) { /* * precompute an approximation map */ computeDashMap(&parcs[i], &map); /* * compute each individual dash segment using the path * length function */ startAngle = parcs[i].angle1; spanAngle = parcs[i].angle2; if (spanAngle > FULLCIRCLE) spanAngle = FULLCIRCLE; else if (spanAngle < -FULLCIRCLE) spanAngle = -FULLCIRCLE; if (startAngle < 0) startAngle = FULLCIRCLE - (-startAngle) % FULLCIRCLE; if (startAngle >= FULLCIRCLE) startAngle = startAngle % FULLCIRCLE; endAngle = startAngle + spanAngle; backwards = spanAngle < 0; } else { xarc = parcs[i]; if (arcType == VERTICAL) { xarc.angle1 = 0x1680; startAngle = parcs[i].y; endAngle = startAngle + parcs[i].height; } else { xarc.angle1 = 0x2d00; startAngle = parcs[i].x; endAngle = startAngle + parcs[i].width; } } dashAngle = startAngle; selfJoin = data[i].selfJoin && (iphase == 0 || isDoubleDash); /* * add dashed arcs to each bucket */ arc = 0; while (dashAngle != endAngle) { prevDashAngle = dashAngle; if (arcType == OTHER) { dashAngle = computeAngleFromPath(prevDashAngle, endAngle, &map, &dashRemaining, backwards); /* avoid troubles with huge arcs and small dashes */ if (dashAngle == prevDashAngle) { if (backwards) dashAngle--; else dashAngle++; } } else { thisLength = (dashAngle + dashRemaining <= endAngle) ? dashRemaining : endAngle - dashAngle; if (arcType == VERTICAL) { xarc.y = dashAngle; xarc.height = thisLength; } else { xarc.x = dashAngle; xarc.width = thisLength; } dashAngle += thisLength; dashRemaining -= thisLength; } if (iphase == 0 || isDoubleDash) { if (arcType == OTHER) { xarc = parcs[i]; spanAngle = prevDashAngle; if (spanAngle < 0) spanAngle = FULLCIRCLE - (-spanAngle) % FULLCIRCLE; if (spanAngle >= FULLCIRCLE) spanAngle = spanAngle % FULLCIRCLE; xarc.angle1 = spanAngle; spanAngle = dashAngle - prevDashAngle; if (backwards) { if (dashAngle > prevDashAngle) spanAngle = -FULLCIRCLE + spanAngle; } else { if (dashAngle < prevDashAngle) spanAngle = FULLCIRCLE + spanAngle; } if (spanAngle > FULLCIRCLE) spanAngle = FULLCIRCLE; if (spanAngle < -FULLCIRCLE) spanAngle = -FULLCIRCLE; xarc.angle2 = spanAngle; } arc = addArc(&arcs[iphase].arcs, &arcs[iphase].narcs, &arcSize[iphase], &xarc); if (!arc) goto arcfail; /* * cap each end of an on/off dash */ if (!isDoubleDash) { if (prevDashAngle != startAngle) { addCap(&arcs[iphase].caps, &arcs[iphase].ncaps, &capSize[iphase], RIGHT_END, arc - arcs[iphase].arcs); } if (dashAngle != endAngle) { addCap(&arcs[iphase].caps, &arcs[iphase].ncaps, &capSize[iphase], LEFT_END, arc - arcs[iphase].arcs); } } arc->cap = arcs[iphase].ncaps; arc->join = arcs[iphase].njoins; arc->render = 0; arc->selfJoin = 0; if (dashAngle == endAngle) arc->selfJoin = selfJoin; } prevphase = iphase; if (dashRemaining <= 0) { ++iDash; if (iDash == pGC->numInDashList) iDash = 0; iphase = iphase ? 0 : 1; dashRemaining = pGC->dash[iDash]; } } /* * make sure a place exists for the position data when * drawing a zero-length arc */ if (startAngle == endAngle) { prevphase = iphase; if (!isDoubleDash && iphase == 1) prevphase = 0; arc = addArc(&arcs[prevphase].arcs, &arcs[prevphase].narcs, &arcSize[prevphase], &parcs[i]); if (!arc) goto arcfail; arc->join = arcs[prevphase].njoins; arc->cap = arcs[prevphase].ncaps; arc->selfJoin = data[i].selfJoin; } } else { arc = addArc(&arcs[iphase].arcs, &arcs[iphase].narcs, &arcSize[iphase], &parcs[i]); if (!arc) goto arcfail; arc->join = arcs[iphase].njoins; arc->cap = arcs[iphase].ncaps; arc->selfJoin = data[i].selfJoin; prevphase = iphase; } if (prevphase == 0 || isDoubleDash) k = arcs[prevphase].narcs - 1; if (iphase == 0 || isDoubleDash) nextk = arcs[iphase].narcs; if (nexti == start) { nextk = 0; if (isDashed) { iDash = iDashStart; iphase = iphaseStart; dashRemaining = dashRemainingStart; } } arcsJoin = narcs > 1 && i != j && ISEQUAL(data[i].x1, data[j].x0) && ISEQUAL(data[i].y1, data[j].y0) && !data[i].selfJoin && !data[j].selfJoin; if (arc) { if (arcsJoin) arc->render = 0; else arc->render = 1; } if (arcsJoin && (prevphase == 0 || isDoubleDash) && (iphase == 0 || isDoubleDash)) { joinphase = iphase; if (isDoubleDash) { if (nexti == start) joinphase = iphaseStart; /* * if the join is right at the dash, * draw the join in foreground * This is because the foreground * arcs are computed second, the results * of which are needed to draw the join */ if (joinphase != prevphase) joinphase = 0; } if (joinphase == 0 || isDoubleDash) { addJoin(&arcs[joinphase].joins, &arcs[joinphase].njoins, &joinSize[joinphase], LEFT_END, k, prevphase, RIGHT_END, nextk, iphase); arc->join = arcs[prevphase].njoins; } } else { /* * cap the left end of this arc * unless it joins itself */ if ((prevphase == 0 || isDoubleDash) && !arc->selfJoin) { addCap(&arcs[prevphase].caps, &arcs[prevphase].ncaps, &capSize[prevphase], LEFT_END, k); arc->cap = arcs[prevphase].ncaps; } if (isDashed && !arcsJoin) { iDash = iDashStart; iphase = iphaseStart; dashRemaining = dashRemainingStart; } nextk = arcs[iphase].narcs; if (nexti == start) { nextk = 0; iDash = iDashStart; iphase = iphaseStart; dashRemaining = dashRemainingStart; } /* * cap the right end of the next arc. If the * next arc is actually the first arc, only * cap it if it joins with this arc. This * case will occur when the final dash segment * of an on/off dash is off. Of course, this * cap will be drawn at a strange time, but that * hardly matters... */ if ((iphase == 0 || isDoubleDash) && (nexti != start || (arcsJoin && isDashed))) addCap(&arcs[iphase].caps, &arcs[iphase].ncaps, &capSize[iphase], RIGHT_END, nextk); } i = nexti; if (i == start) break; } /* * make sure the last section is rendered */ for (iphase = 0; iphase < (isDoubleDash ? 2 : 1); iphase++) if (arcs[iphase].narcs > 0) { arcs[iphase].arcs[arcs[iphase].narcs - 1].render = 1; arcs[iphase].arcs[arcs[iphase].narcs - 1].join = arcs[iphase].njoins; arcs[iphase].arcs[arcs[iphase].narcs - 1].cap = arcs[iphase].ncaps; } free(data); return arcs; arcfail: miFreeArcs(arcs, pGC); free(data); return NULL; } static double angleToLength(int angle, dashMap * map) { double len, excesslen, sidelen = map->map[DASH_MAP_SIZE - 1], totallen; int di; int excess; Bool oddSide = FALSE; totallen = 0; if (angle >= 0) { while (angle >= 90 * 64) { angle -= 90 * 64; totallen += sidelen; oddSide = !oddSide; } } else { while (angle < 0) { angle += 90 * 64; totallen -= sidelen; oddSide = !oddSide; } } if (oddSide) angle = 90 * 64 - angle; di = xAngleToDashIndex(angle); excess = angle - dashIndexToXAngle(di); len = map->map[di]; /* * linearly interpolate between this point and the next */ if (excess > 0) { excesslen = (map->map[di + 1] - map->map[di]) * ((double) excess) / dashXAngleStep; len += excesslen; } if (oddSide) totallen += (sidelen - len); else totallen += len; return totallen; } /* * len is along the arc, but may be more than one rotation */ static int lengthToAngle(double len, dashMap * map) { double sidelen = map->map[DASH_MAP_SIZE - 1]; int angle, angleexcess; Bool oddSide = FALSE; int a0, a1, a; angle = 0; /* * step around the ellipse, subtracting sidelens and * adding 90 degrees. oddSide will tell if the * map should be interpolated in reverse */ if (len >= 0) { if (sidelen == 0) return 2 * FULLCIRCLE; /* infinity */ while (len >= sidelen) { angle += 90 * 64; len -= sidelen; oddSide = !oddSide; } } else { if (sidelen == 0) return -2 * FULLCIRCLE; /* infinity */ while (len < 0) { angle -= 90 * 64; len += sidelen; oddSide = !oddSide; } } if (oddSide) len = sidelen - len; a0 = 0; a1 = DASH_MAP_SIZE - 1; /* * binary search for the closest pre-computed length */ while (a1 - a0 > 1) { a = (a0 + a1) / 2; if (len > map->map[a]) a0 = a; else a1 = a; } angleexcess = dashIndexToXAngle(a0); /* * linearly interpolate to the next point */ angleexcess += (len - map->map[a0]) / (map->map[a0 + 1] - map->map[a0]) * dashXAngleStep; if (oddSide) angle += (90 * 64) - angleexcess; else angle += angleexcess; return angle; } /* * compute the angle of an ellipse which corresponds to * the given path length. Note that the correct solution * to this problem is an eliptic integral, we'll punt and * approximate (it's only for dashes anyway). This * approximation uses a polygon. * * The remaining portion of len is stored in *lenp - * this will be negative if the arc extends beyond * len and positive if len extends beyond the arc. */ static int computeAngleFromPath(int startAngle, int endAngle, /* normalized absolute angles in *64 degrees */ dashMap * map, int *lenp, int backwards) { int a0, a1, a; double len0; int len; a0 = startAngle; a1 = endAngle; len = *lenp; if (backwards) { /* * flip the problem around to always be * forwards */ a0 = FULLCIRCLE - a0; a1 = FULLCIRCLE - a1; } if (a1 < a0) a1 += FULLCIRCLE; len0 = angleToLength(a0, map); a = lengthToAngle(len0 + len, map); if (a > a1) { a = a1; len -= angleToLength(a1, map) - len0; } else len = 0; if (backwards) a = FULLCIRCLE - a; *lenp = len; return a; } /* * scan convert wide arcs. */ /* * draw zero width/height arcs */ static void drawZeroArc(DrawablePtr pDraw, GCPtr pGC, xArc * tarc, int lw, miArcFacePtr left, miArcFacePtr right) { double x0 = 0.0, y0 = 0.0, x1 = 0.0, y1 = 0.0, w, h, x, y; double xmax, ymax, xmin, ymin; int a0, a1; double a, startAngle, endAngle; double l, lx, ly; l = lw / 2.0; a0 = tarc->angle1; a1 = tarc->angle2; if (a1 > FULLCIRCLE) a1 = FULLCIRCLE; else if (a1 < -FULLCIRCLE) a1 = -FULLCIRCLE; w = (double) tarc->width / 2.0; h = (double) tarc->height / 2.0; /* * play in X coordinates right away */ startAngle = -((double) a0 / 64.0); endAngle = -((double) (a0 + a1) / 64.0); xmax = -w; xmin = w; ymax = -h; ymin = h; a = startAngle; for (;;) { x = w * miDcos(a); y = h * miDsin(a); if (a == startAngle) { x0 = x; y0 = y; } if (a == endAngle) { x1 = x; y1 = y; } if (x > xmax) xmax = x; if (x < xmin) xmin = x; if (y > ymax) ymax = y; if (y < ymin) ymin = y; if (a == endAngle) break; if (a1 < 0) { /* clockwise */ if (floor(a / 90.0) == floor(endAngle / 90.0)) a = endAngle; else a = 90 * (floor(a / 90.0) + 1); } else { if (ceil(a / 90.0) == ceil(endAngle / 90.0)) a = endAngle; else a = 90 * (ceil(a / 90.0) - 1); } } lx = ly = l; if ((x1 - x0) + (y1 - y0) < 0) lx = ly = -l; if (h) { ly = 0.0; lx = -lx; } else lx = 0.0; if (right) { right->center.x = x0; right->center.y = y0; right->clock.x = x0 - lx; right->clock.y = y0 - ly; right->counterClock.x = x0 + lx; right->counterClock.y = y0 + ly; } if (left) { left->center.x = x1; left->center.y = y1; left->clock.x = x1 + lx; left->clock.y = y1 + ly; left->counterClock.x = x1 - lx; left->counterClock.y = y1 - ly; } x0 = xmin; x1 = xmax; y0 = ymin; y1 = ymax; if (ymin != y1) { xmin = -l; xmax = l; } else { ymin = -l; ymax = l; } if (xmax != xmin && ymax != ymin) { int minx, maxx, miny, maxy; xRectangle rect; minx = ICEIL(xmin + w) + tarc->x; maxx = ICEIL(xmax + w) + tarc->x; miny = ICEIL(ymin + h) + tarc->y; maxy = ICEIL(ymax + h) + tarc->y; rect.x = minx; rect.y = miny; rect.width = maxx - minx; rect.height = maxy - miny; (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); } } /* * this computes the ellipse y value associated with the * bottom of the tail. */ static void tailEllipseY(struct arc_def *def, struct accelerators *acc) { double t; acc->tail_y = 0.0; if (def->w == def->h) return; t = def->l * def->w; if (def->w > def->h) { if (t < acc->h2) return; } else { if (t > acc->h2) return; } t = 2.0 * def->h * t; t = (CUBED_ROOT_4 * acc->h2 - cbrt(t * t)) / acc->h2mw2; if (t > 0.0) acc->tail_y = def->h / CUBED_ROOT_2 * sqrt(t); } /* * inverse functions -- compute edge coordinates * from the ellipse */ static double outerXfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) { return x + (x * acc->h2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); } static double outerYfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) { return y + (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); } static double innerXfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) { return x - (x * acc->h2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); } static double innerYfromXY(double x, double y, struct arc_def *def, struct accelerators *acc) { return y - (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); } static double innerYfromY(double y, struct arc_def *def, struct accelerators *acc) { double x; x = (def->w / def->h) * sqrt(acc->h2 - y * y); return y - (y * acc->w2l) / sqrt(x * x * acc->h4 + y * y * acc->w4); } static void computeLine(double x1, double y1, double x2, double y2, struct line *line) { if (y1 == y2) line->valid = 0; else { line->m = (x1 - x2) / (y1 - y2); line->b = x1 - y1 * line->m; line->valid = 1; } } /* * compute various accelerators for an ellipse. These * are simply values that are used repeatedly in * the computations */ static void computeAcc(xArc * tarc, int lw, struct arc_def *def, struct accelerators *acc) { def->w = ((double) tarc->width) / 2.0; def->h = ((double) tarc->height) / 2.0; def->l = ((double) lw) / 2.0; acc->h2 = def->h * def->h; acc->w2 = def->w * def->w; acc->h4 = acc->h2 * acc->h2; acc->w4 = acc->w2 * acc->w2; acc->h2l = acc->h2 * def->l; acc->w2l = acc->w2 * def->l; acc->h2mw2 = acc->h2 - acc->w2; acc->fromIntX = (tarc->width & 1) ? 0.5 : 0.0; acc->fromIntY = (tarc->height & 1) ? 0.5 : 0.0; acc->xorg = tarc->x + (tarc->width >> 1); acc->yorgu = tarc->y + (tarc->height >> 1); acc->yorgl = acc->yorgu + (tarc->height & 1); tailEllipseY(def, acc); } /* * compute y value bounds of various portions of the arc, * the outer edge, the ellipse and the inner edge. */ static void computeBound(struct arc_def *def, struct arc_bound *bound, struct accelerators *acc, miArcFacePtr right, miArcFacePtr left) { double t; double innerTaily; double tail_y; struct bound innerx, outerx; struct bound ellipsex; bound->ellipse.min = Dsin(def->a0) * def->h; bound->ellipse.max = Dsin(def->a1) * def->h; if (def->a0 == 45 && def->w == def->h) ellipsex.min = bound->ellipse.min; else ellipsex.min = Dcos(def->a0) * def->w; if (def->a1 == 45 && def->w == def->h) ellipsex.max = bound->ellipse.max; else ellipsex.max = Dcos(def->a1) * def->w; bound->outer.min = outerYfromXY(ellipsex.min, bound->ellipse.min, def, acc); bound->outer.max = outerYfromXY(ellipsex.max, bound->ellipse.max, def, acc); bound->inner.min = innerYfromXY(ellipsex.min, bound->ellipse.min, def, acc); bound->inner.max = innerYfromXY(ellipsex.max, bound->ellipse.max, def, acc); outerx.min = outerXfromXY(ellipsex.min, bound->ellipse.min, def, acc); outerx.max = outerXfromXY(ellipsex.max, bound->ellipse.max, def, acc); innerx.min = innerXfromXY(ellipsex.min, bound->ellipse.min, def, acc); innerx.max = innerXfromXY(ellipsex.max, bound->ellipse.max, def, acc); /* * save the line end points for the * cap code to use. Careful here, these are * in cartesean coordinates (y increasing upwards) * while the cap code uses inverted coordinates * (y increasing downwards) */ if (right) { right->counterClock.y = bound->outer.min; right->counterClock.x = outerx.min; right->center.y = bound->ellipse.min; right->center.x = ellipsex.min; right->clock.y = bound->inner.min; right->clock.x = innerx.min; } if (left) { left->clock.y = bound->outer.max; left->clock.x = outerx.max; left->center.y = bound->ellipse.max; left->center.x = ellipsex.max; left->counterClock.y = bound->inner.max; left->counterClock.x = innerx.max; } bound->left.min = bound->inner.max; bound->left.max = bound->outer.max; bound->right.min = bound->inner.min; bound->right.max = bound->outer.min; computeLine(innerx.min, bound->inner.min, outerx.min, bound->outer.min, &acc->right); computeLine(innerx.max, bound->inner.max, outerx.max, bound->outer.max, &acc->left); if (bound->inner.min > bound->inner.max) { t = bound->inner.min; bound->inner.min = bound->inner.max; bound->inner.max = t; } tail_y = acc->tail_y; if (tail_y > bound->ellipse.max) tail_y = bound->ellipse.max; else if (tail_y < bound->ellipse.min) tail_y = bound->ellipse.min; innerTaily = innerYfromY(tail_y, def, acc); if (bound->inner.min > innerTaily) bound->inner.min = innerTaily; if (bound->inner.max < innerTaily) bound->inner.max = innerTaily; bound->inneri.min = ICEIL(bound->inner.min - acc->fromIntY); bound->inneri.max = floor(bound->inner.max - acc->fromIntY); bound->outeri.min = ICEIL(bound->outer.min - acc->fromIntY); bound->outeri.max = floor(bound->outer.max - acc->fromIntY); } /* * this section computes the x value of the span at y * intersected with the specified face of the ellipse. * * this is the min/max X value over the set of normal * lines to the entire ellipse, the equation of the * normal lines is: * * ellipse_x h^2 h^2 * x = ------------ y + ellipse_x (1 - --- ) * ellipse_y w^2 w^2 * * compute the derivative with-respect-to ellipse_y and solve * for zero: * * (w^2 - h^2) ellipse_y^3 + h^4 y * 0 = - ---------------------------------- * h w ellipse_y^2 sqrt (h^2 - ellipse_y^2) * * ( h^4 y ) * ellipse_y = ( ---------- ) ^ (1/3) * ( (h^2 - w^2) ) * * The other two solutions to the equation are imaginary. * * This gives the position on the ellipse which generates * the normal with the largest/smallest x intersection point. * * Now compute the second derivative to check whether * the intersection is a minimum or maximum: * * h (y0^3 (w^2 - h^2) + h^2 y (3y0^2 - 2h^2)) * - ------------------------------------------- * w y0^3 (sqrt (h^2 - y^2)) ^ 3 * * as we only care about the sign, * * - (y0^3 (w^2 - h^2) + h^2 y (3y0^2 - 2h^2)) * * or (to use accelerators), * * y0^3 (h^2 - w^2) - h^2 y (3y0^2 - 2h^2) * */ /* * computes the position on the ellipse whose normal line * intersects the given scan line maximally */ static double hookEllipseY(double scan_y, struct arc_bound *bound, struct accelerators *acc, int left) { double ret; if (acc->h2mw2 == 0) { if ((scan_y > 0 && !left) || (scan_y < 0 && left)) return bound->ellipse.min; return bound->ellipse.max; } ret = (acc->h4 * scan_y) / (acc->h2mw2); if (ret >= 0) return cbrt(ret); else return -cbrt(-ret); } /* * computes the X value of the intersection of the * given scan line with the right side of the lower hook */ static double hookX(double scan_y, struct arc_def *def, struct arc_bound *bound, struct accelerators *acc, int left) { double ellipse_y, x; double maxMin; if (def->w != def->h) { ellipse_y = hookEllipseY(scan_y, bound, acc, left); if (boundedLe(ellipse_y, bound->ellipse)) { /* * compute the value of the second * derivative */ maxMin = ellipse_y * ellipse_y * ellipse_y * acc->h2mw2 - acc->h2 * scan_y * (3 * ellipse_y * ellipse_y - 2 * acc->h2); if ((left && maxMin > 0) || (!left && maxMin < 0)) { if (ellipse_y == 0) return def->w + left ? -def->l : def->l; x = (acc->h2 * scan_y - ellipse_y * acc->h2mw2) * sqrt(acc->h2 - ellipse_y * ellipse_y) / (def->h * def->w * ellipse_y); return x; } } } if (left) { if (acc->left.valid && boundedLe(scan_y, bound->left)) { x = intersectLine(scan_y, acc->left); } else { if (acc->right.valid) x = intersectLine(scan_y, acc->right); else x = def->w - def->l; } } else { if (acc->right.valid && boundedLe(scan_y, bound->right)) { x = intersectLine(scan_y, acc->right); } else { if (acc->left.valid) x = intersectLine(scan_y, acc->left); else x = def->w - def->l; } } return x; } /* * generate the set of spans with * the given y coordinate */ static void arcSpan(int y, int lx, int lw, int rx, int rw, struct arc_def *def, struct arc_bound *bounds, struct accelerators *acc, int mask) { int linx, loutx, rinx, routx; double x, altx; if (boundedLe(y, bounds->inneri)) { linx = -(lx + lw); rinx = rx; } else { /* * intersection with left face */ x = hookX(y + acc->fromIntY, def, bounds, acc, 1); if (acc->right.valid && boundedLe(y + acc->fromIntY, bounds->right)) { altx = intersectLine(y + acc->fromIntY, acc->right); if (altx < x) x = altx; } linx = -ICEIL(acc->fromIntX - x); rinx = ICEIL(acc->fromIntX + x); } if (boundedLe(y, bounds->outeri)) { loutx = -lx; routx = rx + rw; } else { /* * intersection with right face */ x = hookX(y + acc->fromIntY, def, bounds, acc, 0); if (acc->left.valid && boundedLe(y + acc->fromIntY, bounds->left)) { altx = x; x = intersectLine(y + acc->fromIntY, acc->left); if (x < altx) x = altx; } loutx = -ICEIL(acc->fromIntX - x); routx = ICEIL(acc->fromIntX + x); } if (routx > rinx) { if (mask & 1) newFinalSpan(acc->yorgu - y, acc->xorg + rinx, acc->xorg + routx); if (mask & 8) newFinalSpan(acc->yorgl + y, acc->xorg + rinx, acc->xorg + routx); } if (loutx > linx) { if (mask & 2) newFinalSpan(acc->yorgu - y, acc->xorg - loutx, acc->xorg - linx); if (mask & 4) newFinalSpan(acc->yorgl + y, acc->xorg - loutx, acc->xorg - linx); } } static void arcSpan0(int lx, int lw, int rx, int rw, struct arc_def *def, struct arc_bound *bounds, struct accelerators *acc, int mask) { double x; if (boundedLe(0, bounds->inneri) && acc->left.valid && boundedLe(0, bounds->left) && acc->left.b > 0) { x = def->w - def->l; if (acc->left.b < x) x = acc->left.b; lw = ICEIL(acc->fromIntX - x) - lx; rw += rx; rx = ICEIL(acc->fromIntX + x); rw -= rx; } arcSpan(0, lx, lw, rx, rw, def, bounds, acc, mask); } static void tailSpan(int y, int lw, int rw, struct arc_def *def, struct arc_bound *bounds, struct accelerators *acc, int mask) { double yy, xalt, x, lx, rx; int n; if (boundedLe(y, bounds->outeri)) arcSpan(y, 0, lw, -rw, rw, def, bounds, acc, mask); else if (def->w != def->h) { yy = y + acc->fromIntY; x = tailX(yy, def, bounds, acc); if (yy == 0.0 && x == -rw - acc->fromIntX) return; if (acc->right.valid && boundedLe(yy, bounds->right)) { rx = x; lx = -x; xalt = intersectLine(yy, acc->right); if (xalt >= -rw - acc->fromIntX && xalt <= rx) rx = xalt; n = ICEIL(acc->fromIntX + lx); if (lw > n) { if (mask & 2) newFinalSpan(acc->yorgu - y, acc->xorg + n, acc->xorg + lw); if (mask & 4) newFinalSpan(acc->yorgl + y, acc->xorg + n, acc->xorg + lw); } n = ICEIL(acc->fromIntX + rx); if (n > -rw) { if (mask & 1) newFinalSpan(acc->yorgu - y, acc->xorg - rw, acc->xorg + n); if (mask & 8) newFinalSpan(acc->yorgl + y, acc->xorg - rw, acc->xorg + n); } } arcSpan(y, ICEIL(acc->fromIntX - x), 0, ICEIL(acc->fromIntX + x), 0, def, bounds, acc, mask); } } /* * create whole arcs out of pieces. This code is * very bad. */ static struct finalSpan **finalSpans = NULL; static int finalMiny = 0, finalMaxy = -1; static int finalSize = 0; static int nspans = 0; /* total spans, not just y coords */ struct finalSpan { struct finalSpan *next; int min, max; /* x values */ }; static struct finalSpan *freeFinalSpans, *tmpFinalSpan; #define allocFinalSpan() (freeFinalSpans ?\ ((tmpFinalSpan = freeFinalSpans), \ (freeFinalSpans = freeFinalSpans->next), \ (tmpFinalSpan->next = 0), \ tmpFinalSpan) : \ realAllocSpan ()) #define SPAN_CHUNK_SIZE 128 struct finalSpanChunk { struct finalSpan data[SPAN_CHUNK_SIZE]; struct finalSpanChunk *next; }; static struct finalSpanChunk *chunks; static struct finalSpan * realAllocSpan(void) { struct finalSpanChunk *newChunk; struct finalSpan *span; int i; newChunk = malloc(sizeof(struct finalSpanChunk)); if (!newChunk) return (struct finalSpan *) NULL; newChunk->next = chunks; chunks = newChunk; freeFinalSpans = span = newChunk->data + 1; for (i = 1; i < SPAN_CHUNK_SIZE - 1; i++) { span->next = span + 1; span++; } span->next = 0; span = newChunk->data; span->next = 0; return span; } static void disposeFinalSpans(void) { struct finalSpanChunk *chunk, *next; for (chunk = chunks; chunk; chunk = next) { next = chunk->next; free(chunk); } chunks = 0; freeFinalSpans = 0; free(finalSpans); finalSpans = 0; } static void fillSpans(DrawablePtr pDrawable, GCPtr pGC) { struct finalSpan *span; DDXPointPtr xSpan; int *xWidth; int i; struct finalSpan **f; int spany; DDXPointPtr xSpans; int *xWidths; if (nspans == 0) return; xSpan = xSpans = xallocarray(nspans, sizeof(DDXPointRec)); xWidth = xWidths = xallocarray(nspans, sizeof(int)); if (xSpans && xWidths) { i = 0; f = finalSpans; for (spany = finalMiny; spany <= finalMaxy; spany++, f++) { for (span = *f; span; span = span->next) { if (span->max <= span->min) continue; xSpan->x = span->min; xSpan->y = spany; ++xSpan; *xWidth++ = span->max - span->min; ++i; } } (*pGC->ops->FillSpans) (pDrawable, pGC, i, xSpans, xWidths, TRUE); } disposeFinalSpans(); free(xSpans); free(xWidths); finalMiny = 0; finalMaxy = -1; finalSize = 0; nspans = 0; } #define SPAN_REALLOC 100 #define findSpan(y) ((finalMiny <= (y) && (y) <= finalMaxy) ? \ &finalSpans[(y) - finalMiny] : \ realFindSpan (y)) static struct finalSpan ** realFindSpan(int y) { struct finalSpan **newSpans; int newSize, newMiny, newMaxy; int change; int i; if (y < finalMiny || y > finalMaxy) { if (!finalSize) { finalMiny = y; finalMaxy = y - 1; } if (y < finalMiny) change = finalMiny - y; else change = y - finalMaxy; if (change >= SPAN_REALLOC) change += SPAN_REALLOC; else change = SPAN_REALLOC; newSize = finalSize + change; newSpans = xallocarray(newSize, sizeof(struct finalSpan *)); if (!newSpans) return NULL; newMiny = finalMiny; newMaxy = finalMaxy; if (y < finalMiny) newMiny = finalMiny - change; else newMaxy = finalMaxy + change; if (finalSpans) { memmove(((char *) newSpans) + (finalMiny - newMiny) * sizeof(struct finalSpan *), (char *) finalSpans, finalSize * sizeof(struct finalSpan *)); free(finalSpans); } if ((i = finalMiny - newMiny) > 0) memset((char *) newSpans, 0, i * sizeof(struct finalSpan *)); if ((i = newMaxy - finalMaxy) > 0) memset((char *) (newSpans + newSize - i), 0, i * sizeof(struct finalSpan *)); finalSpans = newSpans; finalMaxy = newMaxy; finalMiny = newMiny; finalSize = newSize; } return &finalSpans[y - finalMiny]; } static void newFinalSpan(int y, int xmin, int xmax) { struct finalSpan *x; struct finalSpan **f; struct finalSpan *oldx; struct finalSpan *prev; f = findSpan(y); if (!f) return; oldx = 0; for (;;) { prev = 0; for (x = *f; x; x = x->next) { if (x == oldx) { prev = x; continue; } if (x->min <= xmax && xmin <= x->max) { if (oldx) { oldx->min = min(x->min, xmin); oldx->max = max(x->max, xmax); if (prev) prev->next = x->next; else *f = x->next; --nspans; } else { x->min = min(x->min, xmin); x->max = max(x->max, xmax); oldx = x; } xmin = oldx->min; xmax = oldx->max; break; } prev = x; } if (!x) break; } if (!oldx) { x = allocFinalSpan(); if (x) { x->min = xmin; x->max = xmax; x->next = *f; *f = x; ++nspans; } } } static void mirrorSppPoint(int quadrant, SppPointPtr sppPoint) { switch (quadrant) { case 0: break; case 1: sppPoint->x = -sppPoint->x; break; case 2: sppPoint->x = -sppPoint->x; sppPoint->y = -sppPoint->y; break; case 3: sppPoint->y = -sppPoint->y; break; } /* * and translate to X coordinate system */ sppPoint->y = -sppPoint->y; } /* * split an arc into pieces which are scan-converted * in the first-quadrant and mirrored into position. * This is necessary as the scan-conversion code can * only deal with arcs completely contained in the * first quadrant. */ static miArcSpanData * drawArc(xArc * tarc, int l, int a0, int a1, miArcFacePtr right, miArcFacePtr left, miArcSpanData *spdata) { /* save end line points */ struct arc_def def; struct accelerators acc; int startq, endq, curq; int rightq, leftq = 0, righta = 0, lefta = 0; miArcFacePtr passRight, passLeft; int q0 = 0, q1 = 0, mask; struct band { int a0, a1; int mask; } band[5], sweep[20]; int bandno, sweepno; int i, j; int flipRight = 0, flipLeft = 0; int copyEnd = 0; if (!spdata) spdata = miComputeWideEllipse(l, tarc); if (!spdata) return NULL; if (a1 < a0) a1 += 360 * 64; startq = a0 / (90 * 64); if (a0 == a1) endq = startq; else endq = (a1 - 1) / (90 * 64); bandno = 0; curq = startq; rightq = -1; for (;;) { switch (curq) { case 0: if (a0 > 90 * 64) q0 = 0; else q0 = a0; if (a1 < 360 * 64) q1 = min(a1, 90 * 64); else q1 = 90 * 64; if (curq == startq && a0 == q0 && rightq < 0) { righta = q0; rightq = curq; } if (curq == endq && a1 == q1) { lefta = q1; leftq = curq; } break; case 1: if (a1 < 90 * 64) q0 = 0; else q0 = 180 * 64 - min(a1, 180 * 64); if (a0 > 180 * 64) q1 = 90 * 64; else q1 = 180 * 64 - max(a0, 90 * 64); if (curq == startq && 180 * 64 - a0 == q1) { righta = q1; rightq = curq; } if (curq == endq && 180 * 64 - a1 == q0) { lefta = q0; leftq = curq; } break; case 2: if (a0 > 270 * 64) q0 = 0; else q0 = max(a0, 180 * 64) - 180 * 64; if (a1 < 180 * 64) q1 = 90 * 64; else q1 = min(a1, 270 * 64) - 180 * 64; if (curq == startq && a0 - 180 * 64 == q0) { righta = q0; rightq = curq; } if (curq == endq && a1 - 180 * 64 == q1) { lefta = q1; leftq = curq; } break; case 3: if (a1 < 270 * 64) q0 = 0; else q0 = 360 * 64 - min(a1, 360 * 64); q1 = 360 * 64 - max(a0, 270 * 64); if (curq == startq && 360 * 64 - a0 == q1) { righta = q1; rightq = curq; } if (curq == endq && 360 * 64 - a1 == q0) { lefta = q0; leftq = curq; } break; } band[bandno].a0 = q0; band[bandno].a1 = q1; band[bandno].mask = 1 << curq; bandno++; if (curq == endq) break; curq++; if (curq == 4) { a0 = 0; a1 -= 360 * 64; curq = 0; endq -= 4; } } sweepno = 0; for (;;) { q0 = 90 * 64; mask = 0; /* * find left-most point */ for (i = 0; i < bandno; i++) if (band[i].a0 <= q0) { q0 = band[i].a0; q1 = band[i].a1; mask = band[i].mask; } if (!mask) break; /* * locate next point of change */ for (i = 0; i < bandno; i++) if (!(mask & band[i].mask)) { if (band[i].a0 == q0) { if (band[i].a1 < q1) q1 = band[i].a1; mask |= band[i].mask; } else if (band[i].a0 < q1) q1 = band[i].a0; } /* * create a new sweep */ sweep[sweepno].a0 = q0; sweep[sweepno].a1 = q1; sweep[sweepno].mask = mask; sweepno++; /* * subtract the sweep from the affected bands */ for (i = 0; i < bandno; i++) if (band[i].a0 == q0) { band[i].a0 = q1; /* * check if this band is empty */ if (band[i].a0 == band[i].a1) band[i].a1 = band[i].a0 = 90 * 64 + 1; } } computeAcc(tarc, l, &def, &acc); for (j = 0; j < sweepno; j++) { mask = sweep[j].mask; passRight = passLeft = 0; if (mask & (1 << rightq)) { if (sweep[j].a0 == righta) passRight = right; else if (sweep[j].a1 == righta) { passLeft = right; flipRight = 1; } } if (mask & (1 << leftq)) { if (sweep[j].a1 == lefta) { if (passLeft) copyEnd = 1; passLeft = left; } else if (sweep[j].a0 == lefta) { if (passRight) copyEnd = 1; passRight = left; flipLeft = 1; } } drawQuadrant(&def, &acc, sweep[j].a0, sweep[j].a1, mask, passRight, passLeft, spdata); } /* * when copyEnd is set, both ends of the arc were computed * at the same time; drawQuadrant only takes one end though, * so the left end will be the only one holding the data. Copy * it from there. */ if (copyEnd) *right = *left; /* * mirror the coordinates generated for the * faces of the arc */ if (right) { mirrorSppPoint(rightq, &right->clock); mirrorSppPoint(rightq, &right->center); mirrorSppPoint(rightq, &right->counterClock); if (flipRight) { SppPointRec temp; temp = right->clock; right->clock = right->counterClock; right->counterClock = temp; } } if (left) { mirrorSppPoint(leftq, &left->counterClock); mirrorSppPoint(leftq, &left->center); mirrorSppPoint(leftq, &left->clock); if (flipLeft) { SppPointRec temp; temp = left->clock; left->clock = left->counterClock; left->counterClock = temp; } } return spdata; } static void drawQuadrant(struct arc_def *def, struct accelerators *acc, int a0, int a1, int mask, miArcFacePtr right, miArcFacePtr left, miArcSpanData * spdata) { struct arc_bound bound; double yy, x, xalt; int y, miny, maxy; int n; miArcSpan *span; def->a0 = ((double) a0) / 64.0; def->a1 = ((double) a1) / 64.0; computeBound(def, &bound, acc, right, left); yy = bound.inner.min; if (bound.outer.min < yy) yy = bound.outer.min; miny = ICEIL(yy - acc->fromIntY); yy = bound.inner.max; if (bound.outer.max > yy) yy = bound.outer.max; maxy = floor(yy - acc->fromIntY); y = spdata->k; span = spdata->spans; if (spdata->top) { if (a1 == 90 * 64 && (mask & 1)) newFinalSpan(acc->yorgu - y - 1, acc->xorg, acc->xorg + 1); span++; } for (n = spdata->count1; --n >= 0;) { if (y < miny) return; if (y <= maxy) { arcSpan(y, span->lx, -span->lx, 0, span->lx + span->lw, def, &bound, acc, mask); if (span->rw + span->rx) tailSpan(y, -span->rw, -span->rx, def, &bound, acc, mask); } y--; span++; } if (y < miny) return; if (spdata->hole) { if (y <= maxy) arcSpan(y, 0, 0, 0, 1, def, &bound, acc, mask & 0xc); } for (n = spdata->count2; --n >= 0;) { if (y < miny) return; if (y <= maxy) arcSpan(y, span->lx, span->lw, span->rx, span->rw, def, &bound, acc, mask); y--; span++; } if (spdata->bot && miny <= y && y <= maxy) { n = mask; if (y == miny) n &= 0xc; if (span->rw <= 0) { arcSpan0(span->lx, -span->lx, 0, span->lx + span->lw, def, &bound, acc, n); if (span->rw + span->rx) tailSpan(y, -span->rw, -span->rx, def, &bound, acc, n); } else arcSpan0(span->lx, span->lw, span->rx, span->rw, def, &bound, acc, n); y--; } while (y >= miny) { yy = y + acc->fromIntY; if (def->w == def->h) { xalt = def->w - def->l; x = -sqrt(xalt * xalt - yy * yy); } else { x = tailX(yy, def, &bound, acc); if (acc->left.valid && boundedLe(yy, bound.left)) { xalt = intersectLine(yy, acc->left); if (xalt < x) x = xalt; } if (acc->right.valid && boundedLe(yy, bound.right)) { xalt = intersectLine(yy, acc->right); if (xalt < x) x = xalt; } } arcSpan(y, ICEIL(acc->fromIntX - x), 0, ICEIL(acc->fromIntX + x), 0, def, &bound, acc, mask); y--; } } void miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) { if (pGC->lineWidth == 0) miZeroPolyArc(pDraw, pGC, narcs, parcs); else miWideArc(pDraw, pGC, narcs, parcs); } xorg-server-21.1.16/mi/mibitblt.c0000644000175000017500000006536714757411105012233 /*********************************************************** 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. ******************************************************************/ /* Author: Todd Newman (aided and abetted by Mr. Drewry) */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "mi.h" #include "regionstr.h" #include #include "servermd.h" #ifdef __MINGW32__ #define ffs __builtin_ffs #endif /* MICOPYAREA -- public entry for the CopyArea request * For each rectangle in the source region * get the pixels with GetSpans * set them in the destination with SetSpans * We let SetSpans worry about clipping to the destination. */ _X_COLD RegionPtr miCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut) { DDXPointPtr ppt, pptFirst; unsigned int *pwidthFirst, *pwidth, *pbits; BoxRec srcBox, *prect; /* may be a new region, or just a copy */ RegionPtr prgnSrcClip; /* non-0 if we've created a src clip */ RegionPtr prgnExposed; int realSrcClip = 0; int srcx, srcy, dstx, dsty, i, j, y, width, height, xMin, xMax, yMin, yMax; unsigned int *ordering; int numRects; BoxPtr boxes; srcx = xIn + pSrcDrawable->x; srcy = yIn + pSrcDrawable->y; /* If the destination isn't realized, this is easy */ if (pDstDrawable->type == DRAWABLE_WINDOW && !((WindowPtr) pDstDrawable)->realized) return NULL; /* clip the source */ if (pSrcDrawable->type == DRAWABLE_PIXMAP) { BoxRec box; box.x1 = pSrcDrawable->x; box.y1 = pSrcDrawable->y; box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; prgnSrcClip = RegionCreate(&box, 1); realSrcClip = 1; } else { if (pGC->subWindowMode == IncludeInferiors) { prgnSrcClip = NotClippedByChildren((WindowPtr) pSrcDrawable); realSrcClip = 1; } else prgnSrcClip = &((WindowPtr) pSrcDrawable)->clipList; } /* If the src drawable is a window, we need to translate the srcBox so * that we can compare it with the window's clip region later on. */ srcBox.x1 = srcx; srcBox.y1 = srcy; srcBox.x2 = srcx + widthSrc; srcBox.y2 = srcy + heightSrc; dstx = xOut; dsty = yOut; if (pGC->miTranslate) { dstx += pDstDrawable->x; dsty += pDstDrawable->y; } pptFirst = ppt = xallocarray(heightSrc, sizeof(DDXPointRec)); pwidthFirst = pwidth = xallocarray(heightSrc, sizeof(unsigned int)); numRects = RegionNumRects(prgnSrcClip); boxes = RegionRects(prgnSrcClip); ordering = xallocarray(numRects, sizeof(unsigned int)); if (!pptFirst || !pwidthFirst || !ordering) { free(ordering); free(pwidthFirst); free(pptFirst); if (realSrcClip) RegionDestroy(prgnSrcClip); return NULL; } /* If not the same drawable then order of move doesn't matter. Following assumes that boxes are sorted from top to bottom and left to right. */ if ((pSrcDrawable != pDstDrawable) && ((pGC->subWindowMode != IncludeInferiors) || (pSrcDrawable->type == DRAWABLE_PIXMAP) || (pDstDrawable->type == DRAWABLE_PIXMAP))) for (i = 0; i < numRects; i++) ordering[i] = i; else { /* within same drawable, must sequence moves carefully! */ if (dsty <= srcBox.y1) { /* Scroll up or stationary vertical. Vertical order OK */ if (dstx <= srcBox.x1) /* Scroll left or stationary horizontal. Horizontal order OK as well */ for (i = 0; i < numRects; i++) ordering[i] = i; else { /* scroll right. must reverse horizontal banding of rects. */ for (i = 0, j = 1, xMax = 0; i < numRects; j = i + 1, xMax = i) { /* find extent of current horizontal band */ y = boxes[i].y1; /* band has this y coordinate */ while ((j < numRects) && (boxes[j].y1 == y)) j++; /* reverse the horizontal band in the output ordering */ for (j--; j >= xMax; j--, i++) ordering[i] = j; } } } else { /* Scroll down. Must reverse vertical banding. */ if (dstx < srcBox.x1) { /* Scroll left. Horizontal order OK. */ for (i = numRects - 1, j = i - 1, yMin = i, yMax = 0; i >= 0; j = i - 1, yMin = i) { /* find extent of current horizontal band */ y = boxes[i].y1; /* band has this y coordinate */ while ((j >= 0) && (boxes[j].y1 == y)) j--; /* reverse the horizontal band in the output ordering */ for (j++; j <= yMin; j++, i--, yMax++) ordering[yMax] = j; } } else /* Scroll right or horizontal stationary. Reverse horizontal order as well (if stationary, horizontal order can be swapped without penalty and this is faster to compute). */ for (i = 0, j = numRects - 1; i < numRects; i++, j--) ordering[i] = j; } } for (i = 0; i < numRects; i++) { prect = &boxes[ordering[i]]; xMin = max(prect->x1, srcBox.x1); xMax = min(prect->x2, srcBox.x2); yMin = max(prect->y1, srcBox.y1); yMax = min(prect->y2, srcBox.y2); /* is there anything visible here? */ if (xMax <= xMin || yMax <= yMin) continue; ppt = pptFirst; pwidth = pwidthFirst; y = yMin; height = yMax - yMin; width = xMax - xMin; for (j = 0; j < height; j++) { /* We must untranslate before calling GetSpans */ ppt->x = xMin; ppt++->y = y++; *pwidth++ = width; } pbits = xallocarray(height, PixmapBytePad(width, pSrcDrawable->depth)); if (pbits) { (*pSrcDrawable->pScreen->GetSpans) (pSrcDrawable, width, pptFirst, (int *) pwidthFirst, height, (char *) pbits); ppt = pptFirst; pwidth = pwidthFirst; xMin -= (srcx - dstx); y = yMin - (srcy - dsty); for (j = 0; j < height; j++) { ppt->x = xMin; ppt++->y = y++; *pwidth++ = width; } (*pGC->ops->SetSpans) (pDstDrawable, pGC, (char *) pbits, pptFirst, (int *) pwidthFirst, height, TRUE); free(pbits); } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut); if (realSrcClip) RegionDestroy(prgnSrcClip); free(ordering); free(pwidthFirst); free(pptFirst); return prgnExposed; } /* MIGETPLANE -- gets a bitmap representing one plane of pDraw * A helper used for CopyPlane and XY format GetImage * No clever strategy here, we grab a scanline at a time, pull out the * bits and then stuff them in a 1 bit deep map. */ /* * This should be replaced with something more general. mi shouldn't have to * care about such things as scanline padding et alia. */ _X_COLD static MiBits * miGetPlane(DrawablePtr pDraw, int planeNum, /* number of the bitPlane */ int sx, int sy, int w, int h, MiBits * result) { int i, j, k, width, bitsPerPixel, widthInBytes; DDXPointRec pt = { 0, 0 }; MiBits pixel; MiBits bit; unsigned char *pCharsOut = NULL; #if BITMAP_SCANLINE_UNIT == 8 #define OUT_TYPE unsigned char #endif #if BITMAP_SCANLINE_UNIT == 16 #define OUT_TYPE CARD16 #endif #if BITMAP_SCANLINE_UNIT == 32 #define OUT_TYPE CARD32 #endif #if BITMAP_SCANLINE_UNIT == 64 #define OUT_TYPE CARD64 #endif OUT_TYPE *pOut; int delta = 0; sx += pDraw->x; sy += pDraw->y; widthInBytes = BitmapBytePad(w); if (!result) result = calloc(h, widthInBytes); if (!result) return NULL; bitsPerPixel = pDraw->bitsPerPixel; pOut = (OUT_TYPE *) result; if (bitsPerPixel == 1) { pCharsOut = (unsigned char *) result; width = w; } else { delta = (widthInBytes / (BITMAP_SCANLINE_UNIT / 8)) - (w / BITMAP_SCANLINE_UNIT); width = 1; #if IMAGE_BYTE_ORDER == MSBFirst planeNum += (32 - bitsPerPixel); #endif } pt.y = sy; for (i = h; --i >= 0; pt.y++) { pt.x = sx; if (bitsPerPixel == 1) { (*pDraw->pScreen->GetSpans) (pDraw, width, &pt, &width, 1, (char *) pCharsOut); pCharsOut += widthInBytes; } else { k = 0; for (j = w; --j >= 0; pt.x++) { /* Fetch the next pixel */ (*pDraw->pScreen->GetSpans) (pDraw, width, &pt, &width, 1, (char *) &pixel); /* * Now get the bit and insert into a bitmap in XY format. */ bit = (pixel >> planeNum) & 1; #if 0 /* XXX assuming bit order == byte order */ #if BITMAP_BIT_ORDER == LSBFirst bit <<= k; #else bit <<= ((BITMAP_SCANLINE_UNIT - 1) - k); #endif #else /* XXX assuming byte order == LSBFirst */ if (screenInfo.bitmapBitOrder == LSBFirst) bit <<= k; else bit <<= ((screenInfo.bitmapScanlineUnit - 1) - (k % screenInfo.bitmapScanlineUnit)) + ((k / screenInfo.bitmapScanlineUnit) * screenInfo.bitmapScanlineUnit); #endif *pOut |= (OUT_TYPE) bit; k++; if (k == BITMAP_SCANLINE_UNIT) { pOut++; k = 0; } } pOut += delta; } } return result; } /* MIOPQSTIPDRAWABLE -- use pbits as an opaque stipple for pDraw. * Drawing through the clip mask we SetSpans() the bits into a * bitmap and stipple those bits onto the destination drawable by doing a * PolyFillRect over the whole drawable, * then we invert the bitmap by copying it onto itself with an alu of * GXinvert, invert the foreground/background colors of the gc, and draw * the background bits. * Note how the clipped out bits of the bitmap are always the background * color so that the stipple never causes FillRect to draw them. */ _X_COLD static void miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, MiBits * pbits, int srcx, int w, int h, int dstx, int dsty) { int oldfill, i; unsigned long oldfg; int *pwidth, *pwidthFirst; ChangeGCVal gcv[6]; PixmapPtr pStipple, pPixmap; DDXPointRec oldOrg; GCPtr pGCT; DDXPointPtr ppt, pptFirst; xRectangle rect; RegionPtr prgnSrcClip; pPixmap = (*pDraw->pScreen->CreatePixmap) (pDraw->pScreen, w + srcx, h, 1, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) return; /* Put the image into a 1 bit deep pixmap */ pGCT = GetScratchGC(1, pDraw->pScreen); if (!pGCT) { (*pDraw->pScreen->DestroyPixmap) (pPixmap); return; } /* First set the whole pixmap to 0 */ gcv[0].val = 0; ChangeGC(NullClient, pGCT, GCBackground, gcv); ValidateGC((DrawablePtr) pPixmap, pGCT); miClearDrawable((DrawablePtr) pPixmap, pGCT); ppt = pptFirst = xallocarray(h, sizeof(DDXPointRec)); pwidth = pwidthFirst = xallocarray(h, sizeof(int)); if (!pptFirst || !pwidthFirst) { free(pwidthFirst); free(pptFirst); FreeScratchGC(pGCT); return; } /* we need a temporary region because ChangeClip must be assumed to destroy what it's sent. note that this means we don't have to free prgnSrcClip ourselves. */ prgnSrcClip = RegionCreate(NULL, 0); RegionCopy(prgnSrcClip, prgnSrc); RegionTranslate(prgnSrcClip, srcx, 0); (*pGCT->funcs->ChangeClip) (pGCT, CT_REGION, prgnSrcClip, 0); ValidateGC((DrawablePtr) pPixmap, pGCT); /* Since we know pDraw is always a pixmap, we never need to think * about translation here */ for (i = 0; i < h; i++) { ppt->x = 0; ppt++->y = i; *pwidth++ = w + srcx; } (*pGCT->ops->SetSpans) ((DrawablePtr) pPixmap, pGCT, (char *) pbits, pptFirst, pwidthFirst, h, TRUE); free(pwidthFirst); free(pptFirst); /* Save current values from the client GC */ oldfill = pGC->fillStyle; pStipple = pGC->stipple; if (pStipple) pStipple->refcnt++; oldOrg = pGC->patOrg; /* Set a new stipple in the drawable */ gcv[0].val = FillStippled; gcv[1].ptr = pPixmap; gcv[2].val = dstx - srcx; gcv[3].val = dsty; ChangeGC(NullClient, pGC, GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, gcv); ValidateGC(pDraw, pGC); /* Fill the drawable with the stipple. This will draw the * foreground color wherever 1 bits are set, leaving everything * with 0 bits untouched. Note that the part outside the clip * region is all 0s. */ rect.x = dstx; rect.y = dsty; rect.width = w; rect.height = h; (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); /* Invert the tiling pixmap. This sets 0s for 1s and 1s for 0s, only * within the clipping region, the part outside is still all 0s */ gcv[0].val = GXinvert; ChangeGC(NullClient, pGCT, GCFunction, gcv); ValidateGC((DrawablePtr) pPixmap, pGCT); (*pGCT->ops->CopyArea) ((DrawablePtr) pPixmap, (DrawablePtr) pPixmap, pGCT, 0, 0, w + srcx, h, 0, 0); /* Swap foreground and background colors on the GC for the drawable. * Now when we fill the drawable, we will fill in the "Background" * values */ oldfg = pGC->fgPixel; gcv[0].val = pGC->bgPixel; gcv[1].val = oldfg; gcv[2].ptr = pPixmap; ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, gcv); ValidateGC(pDraw, pGC); /* PolyFillRect might have bashed the rectangle */ rect.x = dstx; rect.y = dsty; rect.width = w; rect.height = h; (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); /* Now put things back */ if (pStipple) pStipple->refcnt--; gcv[0].val = oldfg; gcv[1].val = pGC->fgPixel; gcv[2].val = oldfill; gcv[3].ptr = pStipple; gcv[4].val = oldOrg.x; gcv[5].val = oldOrg.y; ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, gcv); ValidateGC(pDraw, pGC); /* put what we hope is a smaller clip region back in the scratch gc */ (*pGCT->funcs->ChangeClip) (pGCT, CT_NONE, NULL, 0); FreeScratchGC(pGCT); (*pDraw->pScreen->DestroyPixmap) (pPixmap); } /* MICOPYPLANE -- public entry for the CopyPlane request. * strategy: * First build up a bitmap out of the bits requested * build a source clip * Use the bitmap we've built up as a Stipple for the destination */ _X_COLD RegionPtr miCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitPlane) { MiBits *ptile; BoxRec box; RegionPtr prgnSrc, prgnExposed; /* incorporate the source clip */ box.x1 = srcx + pSrcDrawable->x; box.y1 = srcy + pSrcDrawable->y; box.x2 = box.x1 + width; box.y2 = box.y1 + height; /* clip to visible drawable */ if (box.x1 < pSrcDrawable->x) box.x1 = pSrcDrawable->x; if (box.y1 < pSrcDrawable->y) box.y1 = pSrcDrawable->y; if (box.x2 > pSrcDrawable->x + (int) pSrcDrawable->width) box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; if (box.y2 > pSrcDrawable->y + (int) pSrcDrawable->height) box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; if (box.x1 > box.x2) box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; prgnSrc = RegionCreate(&box, 1); if (pSrcDrawable->type != DRAWABLE_PIXMAP) { /* clip to visible drawable */ if (pGC->subWindowMode == IncludeInferiors) { RegionPtr clipList = NotClippedByChildren((WindowPtr) pSrcDrawable); RegionIntersect(prgnSrc, prgnSrc, clipList); RegionDestroy(clipList); } else RegionIntersect(prgnSrc, prgnSrc, &((WindowPtr) pSrcDrawable)->clipList); } box = *RegionExtents(prgnSrc); RegionTranslate(prgnSrc, -box.x1, -box.y1); if ((box.x2 > box.x1) && (box.y2 > box.y1)) { /* minimize the size of the data extracted */ /* note that we convert the plane mask bitPlane into a plane number */ box.x1 -= pSrcDrawable->x; box.x2 -= pSrcDrawable->x; box.y1 -= pSrcDrawable->y; box.y2 -= pSrcDrawable->y; ptile = miGetPlane(pSrcDrawable, ffs(bitPlane) - 1, box.x1, box.y1, box.x2 - box.x1, box.y2 - box.y1, (MiBits *) NULL); if (ptile) { miOpqStipDrawable(pDstDrawable, pGC, prgnSrc, ptile, 0, box.x2 - box.x1, box.y2 - box.y1, dstx + box.x1 - srcx, dsty + box.y1 - srcy); free(ptile); } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty); RegionDestroy(prgnSrc); return prgnExposed; } /* MIGETIMAGE -- public entry for the GetImage Request * We're getting the image into a memory buffer. While we have to use GetSpans * to read a line from the device (since we don't know what that looks like), * we can just write into the destination buffer * * two different strategies are used, depending on whether we're getting the * image in Z format or XY format * Z format: * Line at a time, GetSpans a line into the destination buffer, then if the * planemask is not all ones, we do a SetSpans into a temporary buffer (to get * bits turned off) and then another GetSpans to get stuff back (because * pixmaps are opaque, and we are passed in the memory to write into). This is * pretty ugly and slow but works. Life is hard. * XY format: * get the single plane specified in planemask */ _X_COLD void miGetImage(DrawablePtr pDraw, int sx, int sy, int w, int h, unsigned int format, unsigned long planeMask, char *pDst) { unsigned char depth; int i, linelength, width, srcx, srcy; DDXPointRec pt = { 0, 0 }; PixmapPtr pPixmap = NULL; GCPtr pGC = NULL; depth = pDraw->depth; if (format == ZPixmap) { if ((((1LL << depth) - 1) & planeMask) != (1LL << depth) - 1) { ChangeGCVal gcv; xPoint xpt; pGC = GetScratchGC(depth, pDraw->pScreen); if (!pGC) return; pPixmap = (*pDraw->pScreen->CreatePixmap) (pDraw->pScreen, w, 1, depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { FreeScratchGC(pGC); return; } /* * Clear the pixmap before doing anything else */ ValidateGC((DrawablePtr) pPixmap, pGC); xpt.x = xpt.y = 0; width = w; (*pGC->ops->FillSpans) ((DrawablePtr) pPixmap, pGC, 1, &xpt, &width, TRUE); /* alu is already GXCopy */ gcv.val = (XID) planeMask; ChangeGC(NullClient, pGC, GCPlaneMask, &gcv); ValidateGC((DrawablePtr) pPixmap, pGC); } linelength = PixmapBytePad(w, depth); srcx = sx + pDraw->x; srcy = sy + pDraw->y; for (i = 0; i < h; i++) { pt.x = srcx; pt.y = srcy + i; width = w; (*pDraw->pScreen->GetSpans) (pDraw, w, &pt, &width, 1, pDst); if (pPixmap) { pt.x = 0; pt.y = 0; width = w; (*pGC->ops->SetSpans) ((DrawablePtr) pPixmap, pGC, pDst, &pt, &width, 1, TRUE); (*pDraw->pScreen->GetSpans) ((DrawablePtr) pPixmap, w, &pt, &width, 1, pDst); } pDst += linelength; } if (pPixmap) { (*pGC->pScreen->DestroyPixmap) (pPixmap); FreeScratchGC(pGC); } } else { (void) miGetPlane(pDraw, ffs(planeMask) - 1, sx, sy, w, h, (MiBits *) pDst); } } /* MIPUTIMAGE -- public entry for the PutImage request * Here we benefit from knowing the format of the bits pointed to by pImage, * even if we don't know how pDraw represents them. * Three different strategies are used depending on the format * XYBitmap Format: * we just use the Opaque Stipple helper function to cover the destination * Note that this covers all the planes of the drawable with the * foreground color (masked with the GC planemask) where there are 1 bits * and the background color (masked with the GC planemask) where there are * 0 bits * XYPixmap format: * what we're called with is a series of XYBitmaps, but we only want * each XYPixmap to update 1 plane, instead of updating all of them. * we set the foreground color to be all 1s and the background to all 0s * then for each plane, we set the plane mask to only effect that one * plane and recursive call ourself with the format set to XYBitmap * (This clever idea courtesy of RGD.) * ZPixmap format: * This part is simple, just call SetSpans */ _X_COLD void miPutImage(DrawablePtr pDraw, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { DDXPointPtr pptFirst, ppt; int *pwidthFirst, *pwidth; RegionPtr prgnSrc; BoxRec box; unsigned long oldFg, oldBg; ChangeGCVal gcv[3]; unsigned long oldPlanemask; unsigned long i; long bytesPer; if (!w || !h) return; switch (format) { case XYBitmap: box.x1 = 0; box.y1 = 0; box.x2 = w; box.y2 = h; prgnSrc = RegionCreate(&box, 1); miOpqStipDrawable(pDraw, pGC, prgnSrc, (MiBits *) pImage, leftPad, w, h, x, y); RegionDestroy(prgnSrc); break; case XYPixmap: depth = pGC->depth; oldPlanemask = pGC->planemask; oldFg = pGC->fgPixel; oldBg = pGC->bgPixel; gcv[0].val = (XID) ~0; gcv[1].val = (XID) 0; ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv); bytesPer = (long) h *BitmapBytePad(w + leftPad); for (i = (unsigned long) 1 << (depth - 1); i != 0; i >>= 1, pImage += bytesPer) { if (i & oldPlanemask) { gcv[0].val = (XID) i; ChangeGC(NullClient, pGC, GCPlaneMask, gcv); ValidateGC(pDraw, pGC); (*pGC->ops->PutImage) (pDraw, pGC, 1, x, y, w, h, leftPad, XYBitmap, (char *) pImage); } } gcv[0].val = (XID) oldPlanemask; gcv[1].val = (XID) oldFg; gcv[2].val = (XID) oldBg; ChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv); ValidateGC(pDraw, pGC); break; case ZPixmap: ppt = pptFirst = xallocarray(h, sizeof(DDXPointRec)); pwidth = pwidthFirst = xallocarray(h, sizeof(int)); if (!pptFirst || !pwidthFirst) { free(pwidthFirst); free(pptFirst); return; } if (pGC->miTranslate) { x += pDraw->x; y += pDraw->y; } for (i = 0; i < h; i++) { ppt->x = x; ppt->y = y + i; ppt++; *pwidth++ = w; } (*pGC->ops->SetSpans) (pDraw, pGC, (char *) pImage, pptFirst, pwidthFirst, h, TRUE); free(pwidthFirst); free(pptFirst); break; } } xorg-server-21.1.16/mi/micmap.c0000644000175000017500000004225414757411105011661 /* * Copyright (c) 1987, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* * This is based on cfbcmap.c. The functions here are useful independently * of cfb, which is the reason for including them here. How "mi" these * are may be debatable. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" #include "globals.h" #include "micmap.h" DevPrivateKeyRec micmapScrPrivateKeyRec; int miListInstalledColormaps(ScreenPtr pScreen, Colormap * pmaps) { if (GetInstalledmiColormap(pScreen)) { *pmaps = GetInstalledmiColormap(pScreen)->mid; return 1; } return 0; } void miInstallColormap(ColormapPtr pmap) { ColormapPtr oldpmap = GetInstalledmiColormap(pmap->pScreen); if (pmap != oldpmap) { /* Uninstall pInstalledMap. No hardware changes required, just * notify all interested parties. */ if (oldpmap != (ColormapPtr) None) WalkTree(pmap->pScreen, TellLostMap, (char *) &oldpmap->mid); /* Install pmap */ SetInstalledmiColormap(pmap->pScreen, pmap); WalkTree(pmap->pScreen, TellGainedMap, (char *) &pmap->mid); } } void miUninstallColormap(ColormapPtr pmap) { ColormapPtr curpmap = GetInstalledmiColormap(pmap->pScreen); if (pmap == curpmap) { if (pmap->mid != pmap->pScreen->defColormap) { dixLookupResourceByType((void **) &curpmap, pmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixUseAccess); (*pmap->pScreen->InstallColormap) (curpmap); } } } void miResolveColor(unsigned short *pred, unsigned short *pgreen, unsigned short *pblue, VisualPtr pVisual) { int shift = 16 - pVisual->bitsPerRGBValue; unsigned lim = (1 << pVisual->bitsPerRGBValue) - 1; if ((pVisual->class | DynamicClass) == GrayScale) { /* rescale to gray then rgb bits */ *pred = (30L * *pred + 59L * *pgreen + 11L * *pblue) / 100; *pblue = *pgreen = *pred = ((*pred >> shift) * 65535) / lim; } else { /* rescale to rgb bits */ *pred = ((*pred >> shift) * 65535) / lim; *pgreen = ((*pgreen >> shift) * 65535) / lim; *pblue = ((*pblue >> shift) * 65535) / lim; } } Bool miInitializeColormap(ColormapPtr pmap) { unsigned i; VisualPtr pVisual; unsigned lim, maxent, shift; pVisual = pmap->pVisual; lim = (1 << pVisual->bitsPerRGBValue) - 1; shift = 16 - pVisual->bitsPerRGBValue; maxent = pVisual->ColormapEntries - 1; if (pVisual->class == TrueColor) { unsigned limr, limg, limb; limr = pVisual->redMask >> pVisual->offsetRed; limg = pVisual->greenMask >> pVisual->offsetGreen; limb = pVisual->blueMask >> pVisual->offsetBlue; for (i = 0; i <= maxent; i++) { /* rescale to [0..65535] then rgb bits */ pmap->red[i].co.local.red = ((((i * 65535) / limr) >> shift) * 65535) / lim; pmap->green[i].co.local.green = ((((i * 65535) / limg) >> shift) * 65535) / lim; pmap->blue[i].co.local.blue = ((((i * 65535) / limb) >> shift) * 65535) / lim; } } else if (pVisual->class == StaticColor) { unsigned limr, limg, limb; limr = pVisual->redMask >> pVisual->offsetRed; limg = pVisual->greenMask >> pVisual->offsetGreen; limb = pVisual->blueMask >> pVisual->offsetBlue; for (i = 0; i <= maxent; i++) { /* rescale to [0..65535] then rgb bits */ pmap->red[i].co.local.red = ((((((i & pVisual->redMask) >> pVisual->offsetRed) * 65535) / limr) >> shift) * 65535) / lim; pmap->red[i].co.local.green = ((((((i & pVisual->greenMask) >> pVisual->offsetGreen) * 65535) / limg) >> shift) * 65535) / lim; pmap->red[i].co.local.blue = ((((((i & pVisual->blueMask) >> pVisual->offsetBlue) * 65535) / limb) >> shift) * 65535) / lim; } } else if (pVisual->class == StaticGray) { for (i = 0; i <= maxent; i++) { /* rescale to [0..65535] then rgb bits */ pmap->red[i].co.local.red = ((((i * 65535) / maxent) >> shift) * 65535) / lim; pmap->red[i].co.local.green = pmap->red[i].co.local.red; pmap->red[i].co.local.blue = pmap->red[i].co.local.red; } } return TRUE; } /* When simulating DirectColor on PseudoColor hardware, multiple entries of the colormap must be updated */ #define AddElement(mask) { \ pixel = red | green | blue; \ for (i = 0; i < nresult; i++) \ if (outdefs[i].pixel == pixel) \ break; \ if (i == nresult) \ { \ nresult++; \ outdefs[i].pixel = pixel; \ outdefs[i].flags = 0; \ } \ outdefs[i].flags |= (mask); \ outdefs[i].red = pmap->red[red >> pVisual->offsetRed].co.local.red; \ outdefs[i].green = pmap->green[green >> pVisual->offsetGreen].co.local.green; \ outdefs[i].blue = pmap->blue[blue >> pVisual->offsetBlue].co.local.blue; \ } int miExpandDirectColors(ColormapPtr pmap, int ndef, xColorItem * indefs, xColorItem * outdefs) { int red, green, blue; int maxred, maxgreen, maxblue; int stepred, stepgreen, stepblue; VisualPtr pVisual; int pixel; int nresult; int i; pVisual = pmap->pVisual; stepred = 1 << pVisual->offsetRed; stepgreen = 1 << pVisual->offsetGreen; stepblue = 1 << pVisual->offsetBlue; maxred = pVisual->redMask; maxgreen = pVisual->greenMask; maxblue = pVisual->blueMask; nresult = 0; for (; ndef--; indefs++) { if (indefs->flags & DoRed) { red = indefs->pixel & pVisual->redMask; for (green = 0; green <= maxgreen; green += stepgreen) { for (blue = 0; blue <= maxblue; blue += stepblue) { AddElement(DoRed) } } } if (indefs->flags & DoGreen) { green = indefs->pixel & pVisual->greenMask; for (red = 0; red <= maxred; red += stepred) { for (blue = 0; blue <= maxblue; blue += stepblue) { AddElement(DoGreen) } } } if (indefs->flags & DoBlue) { blue = indefs->pixel & pVisual->blueMask; for (red = 0; red <= maxred; red += stepred) { for (green = 0; green <= maxgreen; green += stepgreen) { AddElement(DoBlue) } } } } return nresult; } Bool miCreateDefColormap(ScreenPtr pScreen) { unsigned short zero = 0, ones = 0xFFFF; Pixel wp, bp; VisualPtr pVisual; ColormapPtr cmap; int alloctype; if (!dixRegisterPrivateKey(&micmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++); if (pScreen->rootDepth == 1 || (pVisual->class & DynamicClass)) alloctype = AllocNone; else alloctype = AllocAll; if (CreateColormap(pScreen->defColormap, pScreen, pVisual, &cmap, alloctype, 0) != Success) return FALSE; if (pScreen->rootDepth > 1) { wp = pScreen->whitePixel; bp = pScreen->blackPixel; if ((AllocColor(cmap, &ones, &ones, &ones, &wp, 0) != Success) || (AllocColor(cmap, &zero, &zero, &zero, &bp, 0) != Success)) return FALSE; pScreen->whitePixel = wp; pScreen->blackPixel = bp; } (*pScreen->InstallColormap) (cmap); return TRUE; } /* * Default true color bitmasks, should be overridden by * driver */ #define _RZ(d) ((d + 2) / 3) #define _RS(d) 0 #define _RM(d) ((1U << _RZ(d)) - 1) #define _GZ(d) ((d - _RZ(d) + 1) / 2) #define _GS(d) _RZ(d) #define _GM(d) (((1U << _GZ(d)) - 1) << _GS(d)) #define _BZ(d) (d - _RZ(d) - _GZ(d)) #define _BS(d) (_RZ(d) + _GZ(d)) #define _BM(d) (((1U << _BZ(d)) - 1) << _BS(d)) #define _CE(d) (1U << _RZ(d)) typedef struct _miVisuals { struct _miVisuals *next; int depth; int bitsPerRGB; int visuals; int count; int preferredCVC; Pixel redMask, greenMask, blueMask; } miVisualsRec, *miVisualsPtr; static int miVisualPriority[] = { PseudoColor, GrayScale, StaticColor, TrueColor, DirectColor, StaticGray }; #define NUM_PRIORITY 6 static miVisualsPtr miVisuals; void miClearVisualTypes(void) { miVisualsPtr v; while ((v = miVisuals)) { miVisuals = v->next; free(v); } } Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, int preferredCVC, Pixel redMask, Pixel greenMask, Pixel blueMask) { miVisualsPtr new, *prev, v; int count; new = malloc(sizeof *new); if (!new) return FALSE; if (!redMask || !greenMask || !blueMask) { redMask = _RM(depth); greenMask = _GM(depth); blueMask = _BM(depth); } new->next = 0; new->depth = depth; new->visuals = visuals; new->bitsPerRGB = bitsPerRGB; new->preferredCVC = preferredCVC; new->redMask = redMask; new->greenMask = greenMask; new->blueMask = blueMask; count = (visuals >> 1) & 033333333333; count = visuals - count - ((count >> 1) & 033333333333); count = (((count + (count >> 3)) & 030707070707) % 077); /* HAKMEM 169 */ new->count = count; for (prev = &miVisuals; (v = *prev); prev = &v->next); *prev = new; return TRUE; } Bool miSetVisualTypes(int depth, int visuals, int bitsPerRGB, int preferredCVC) { return miSetVisualTypesAndMasks(depth, visuals, bitsPerRGB, preferredCVC, 0, 0, 0); } int miGetDefaultVisualMask(int depth) { if (depth > MAX_PSEUDO_DEPTH) return LARGE_VISUALS; else if (depth >= MIN_TRUE_DEPTH) return ALL_VISUALS; else if (depth == 1) return StaticGrayMask; else return SMALL_VISUALS; } static Bool miVisualTypesSet(int depth) { miVisualsPtr visuals; for (visuals = miVisuals; visuals; visuals = visuals->next) if (visuals->depth == depth) return TRUE; return FALSE; } Bool miSetPixmapDepths(void) { int d, f; /* Add any unlisted depths from the pixmap formats */ for (f = 0; f < screenInfo.numPixmapFormats; f++) { d = screenInfo.formats[f].depth; if (!miVisualTypesSet(d)) { if (!miSetVisualTypes(d, 0, 0, -1)) return FALSE; } } return TRUE; } /* * Distance to least significant one bit */ static int maskShift(Pixel p) { int s; if (!p) return 0; s = 0; while (!(p & 1)) { s++; p >>= 1; } return s; } /* * Given a list of formats for a screen, create a list * of visuals and depths for the screen which correspond to * the set which can be used with this version of cfb. */ Bool miInitVisuals(VisualPtr * visualp, DepthPtr * depthp, int *nvisualp, int *ndepthp, int *rootDepthp, VisualID * defaultVisp, unsigned long sizes, int bitsPerRGB, int preferredVis) { int i, j = 0, k; VisualPtr visual; DepthPtr depth; VisualID *vid; int d, b; int f; int ndepth, nvisual; int nvtype; int vtype; miVisualsPtr visuals, nextVisuals; int *preferredCVCs, *prefp; int first_depth; /* none specified, we'll guess from pixmap formats */ if (!miVisuals) { for (f = 0; f < screenInfo.numPixmapFormats; f++) { d = screenInfo.formats[f].depth; b = screenInfo.formats[f].bitsPerPixel; if (sizes & (1 << (b - 1))) vtype = miGetDefaultVisualMask(d); else vtype = 0; if (!miSetVisualTypes(d, vtype, bitsPerRGB, -1)) return FALSE; } } nvisual = 0; ndepth = 0; for (visuals = miVisuals; visuals; visuals = nextVisuals) { nextVisuals = visuals->next; ndepth++; nvisual += visuals->count; } depth = xallocarray(ndepth, sizeof(DepthRec)); visual = xallocarray(nvisual, sizeof(VisualRec)); preferredCVCs = xallocarray(ndepth, sizeof(int)); if (!depth || !visual || !preferredCVCs) { free(depth); free(visual); free(preferredCVCs); return FALSE; } *depthp = depth; *visualp = visual; *ndepthp = ndepth; *nvisualp = nvisual; prefp = preferredCVCs; for (visuals = miVisuals; visuals; visuals = nextVisuals) { nextVisuals = visuals->next; d = visuals->depth; vtype = visuals->visuals; nvtype = visuals->count; *prefp = visuals->preferredCVC; prefp++; vid = NULL; if (nvtype) { vid = xallocarray(nvtype, sizeof(VisualID)); if (!vid) { free(depth); free(visual); free(preferredCVCs); return FALSE; } } depth->depth = d; depth->numVids = nvtype; depth->vids = vid; depth++; for (i = 0; i < NUM_PRIORITY; i++) { if (!(vtype & (1 << miVisualPriority[i]))) continue; visual->class = miVisualPriority[i]; visual->bitsPerRGBValue = visuals->bitsPerRGB; visual->ColormapEntries = 1 << d; visual->nplanes = d; visual->vid = *vid = FakeClientID(0); switch (visual->class) { case PseudoColor: case GrayScale: case StaticGray: visual->redMask = 0; visual->greenMask = 0; visual->blueMask = 0; visual->offsetRed = 0; visual->offsetGreen = 0; visual->offsetBlue = 0; break; case DirectColor: case TrueColor: visual->ColormapEntries = _CE(d); /* fall through */ case StaticColor: visual->redMask = visuals->redMask; visual->greenMask = visuals->greenMask; visual->blueMask = visuals->blueMask; visual->offsetRed = maskShift(visuals->redMask); visual->offsetGreen = maskShift(visuals->greenMask); visual->offsetBlue = maskShift(visuals->blueMask); } vid++; visual++; } free(visuals); } miVisuals = NULL; visual = *visualp; depth = *depthp; /* * if we did not supplyied by a preferred visual class * check if there is a preferred class in one of the depth * structures - if there is, we want to start looking for the * default visual/depth from that depth. */ first_depth = 0; if (preferredVis < 0 && defaultColorVisualClass < 0) { for (i = 0; i < ndepth; i++) { if (preferredCVCs[i] >= 0) { first_depth = i; break; } } } for (i = first_depth; i < ndepth; i++) { int prefColorVisualClass = -1; if (defaultColorVisualClass >= 0) prefColorVisualClass = defaultColorVisualClass; else if (preferredVis >= 0) prefColorVisualClass = preferredVis; else if (preferredCVCs[i] >= 0) prefColorVisualClass = preferredCVCs[i]; if (*rootDepthp && *rootDepthp != depth[i].depth) continue; for (j = 0; j < depth[i].numVids; j++) { for (k = 0; k < nvisual; k++) if (visual[k].vid == depth[i].vids[j]) break; if (k == nvisual) continue; if (prefColorVisualClass < 0 || visual[k].class == prefColorVisualClass) break; } if (j != depth[i].numVids) break; } if (i == ndepth) { i = 0; j = 0; } *rootDepthp = depth[i].depth; *defaultVisp = depth[i].vids[j]; free(preferredCVCs); return TRUE; } xorg-server-21.1.16/mi/micopy.c0000644000175000017500000002324714757411105011714 /* * Copyright © 1998 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 #endif #include "mi.h" #include "scrnintstr.h" #include "gcstruct.h" #include "pixmap.h" #include "pixmapstr.h" #include "windowstr.h" void miCopyRegion(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, RegionPtr pDstRegion, int dx, int dy, miCopyProc copyProc, Pixel bitPlane, void *closure) { int careful; Bool reverse; Bool upsidedown; BoxPtr pbox; int nbox; BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; pbox = RegionRects(pDstRegion); nbox = RegionNumRects(pDstRegion); /* XXX we have to err on the side of safety when both are windows, * because we don't know if IncludeInferiors is being used. */ careful = ((pSrcDrawable == pDstDrawable) || ((pSrcDrawable->type == DRAWABLE_WINDOW) && (pDstDrawable->type == DRAWABLE_WINDOW))); pboxNew1 = NULL; pboxNew2 = NULL; if (careful && dy < 0) { upsidedown = TRUE; if (nbox > 1) { /* keep ordering in each band, reverse order of bands */ pboxNew1 = xallocarray(nbox, sizeof(BoxRec)); if (!pboxNew1) return; pboxBase = pboxNext = pbox + nbox - 1; while (pboxBase >= pbox) { while ((pboxNext >= pbox) && (pboxBase->y1 == pboxNext->y1)) pboxNext--; pboxTmp = pboxNext + 1; while (pboxTmp <= pboxBase) { *pboxNew1++ = *pboxTmp++; } pboxBase = pboxNext; } pboxNew1 -= nbox; pbox = pboxNew1; } } else { /* walk source top to bottom */ upsidedown = FALSE; } if (careful && dx < 0) { /* walk source right to left */ if (dy <= 0) reverse = TRUE; else reverse = FALSE; if (nbox > 1) { /* reverse order of rects in each band */ pboxNew2 = xallocarray(nbox, sizeof(BoxRec)); if (!pboxNew2) { free(pboxNew1); return; } pboxBase = pboxNext = pbox; while (pboxBase < pbox + nbox) { while ((pboxNext < pbox + nbox) && (pboxNext->y1 == pboxBase->y1)) pboxNext++; pboxTmp = pboxNext; while (pboxTmp != pboxBase) { *pboxNew2++ = *--pboxTmp; } pboxBase = pboxNext; } pboxNew2 -= nbox; pbox = pboxNew2; } } else { /* walk source left to right */ reverse = FALSE; } (*copyProc) (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitPlane, closure); free(pboxNew1); free(pboxNew2); } RegionPtr miDoCopy(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int xIn, int yIn, int widthSrc, int heightSrc, int xOut, int yOut, miCopyProc copyProc, Pixel bitPlane, void *closure) { RegionPtr prgnSrcClip = NULL; /* may be a new region, or just a copy */ Bool freeSrcClip = FALSE; RegionPtr prgnExposed = NULL; RegionRec rgnDst; int dx; int dy; int numRects; int box_x1; int box_y1; int box_x2; int box_y2; Bool fastSrc = FALSE; /* for fast clipping with pixmap source */ Bool fastDst = FALSE; /* for fast clipping with one rect dest */ Bool fastExpose = FALSE; /* for fast exposures with pixmap source */ /* Short cut for unmapped windows */ if (pDstDrawable->type == DRAWABLE_WINDOW && !((WindowPtr) pDstDrawable)->realized) { return NULL; } (*pSrcDrawable->pScreen->SourceValidate) (pSrcDrawable, xIn, yIn, widthSrc, heightSrc, pGC->subWindowMode); /* Compute source clip region */ if (pSrcDrawable->type == DRAWABLE_PIXMAP) { if ((pSrcDrawable == pDstDrawable) && (!pGC->clientClip)) prgnSrcClip = miGetCompositeClip(pGC); else fastSrc = TRUE; } else { if (pGC->subWindowMode == IncludeInferiors) { /* * XFree86 DDX empties the border clip when the * VT is inactive, make sure the region isn't empty */ if (!((WindowPtr) pSrcDrawable)->parent && RegionNotEmpty(&((WindowPtr) pSrcDrawable)->borderClip)) { /* * special case bitblt from root window in * IncludeInferiors mode; just like from a pixmap */ fastSrc = TRUE; } else if ((pSrcDrawable == pDstDrawable) && (!pGC->clientClip)) { prgnSrcClip = miGetCompositeClip(pGC); } else { prgnSrcClip = NotClippedByChildren((WindowPtr) pSrcDrawable); freeSrcClip = TRUE; } } else { prgnSrcClip = &((WindowPtr) pSrcDrawable)->clipList; } } xIn += pSrcDrawable->x; yIn += pSrcDrawable->y; xOut += pDstDrawable->x; yOut += pDstDrawable->y; box_x1 = xIn; box_y1 = yIn; box_x2 = xIn + widthSrc; box_y2 = yIn + heightSrc; dx = xIn - xOut; dy = yIn - yOut; /* Don't create a source region if we are doing a fast clip */ if (fastSrc) { RegionPtr cclip; fastExpose = TRUE; /* * clip the source; if regions extend beyond the source size, * make sure exposure events get sent */ if (box_x1 < pSrcDrawable->x) { box_x1 = pSrcDrawable->x; fastExpose = FALSE; } if (box_y1 < pSrcDrawable->y) { box_y1 = pSrcDrawable->y; fastExpose = FALSE; } if (box_x2 > pSrcDrawable->x + (int) pSrcDrawable->width) { box_x2 = pSrcDrawable->x + (int) pSrcDrawable->width; fastExpose = FALSE; } if (box_y2 > pSrcDrawable->y + (int) pSrcDrawable->height) { box_y2 = pSrcDrawable->y + (int) pSrcDrawable->height; fastExpose = FALSE; } /* Translate and clip the dst to the destination composite clip */ box_x1 -= dx; box_x2 -= dx; box_y1 -= dy; box_y2 -= dy; /* If the destination composite clip is one rectangle we can do the clip directly. Otherwise we have to create a full blown region and call intersect */ cclip = miGetCompositeClip(pGC); if (RegionNumRects(cclip) == 1) { BoxPtr pBox = RegionRects(cclip); if (box_x1 < pBox->x1) box_x1 = pBox->x1; if (box_x2 > pBox->x2) box_x2 = pBox->x2; if (box_y1 < pBox->y1) box_y1 = pBox->y1; if (box_y2 > pBox->y2) box_y2 = pBox->y2; fastDst = TRUE; } } /* Check to see if the region is empty */ if (box_x1 >= box_x2 || box_y1 >= box_y2) { RegionNull(&rgnDst); } else { BoxRec box; box.x1 = box_x1; box.y1 = box_y1; box.x2 = box_x2; box.y2 = box_y2; RegionInit(&rgnDst, &box, 1); } /* Clip against complex source if needed */ if (!fastSrc) { RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip); RegionTranslate(&rgnDst, -dx, -dy); } /* Clip against complex dest if needed */ if (!fastDst) { RegionIntersect(&rgnDst, &rgnDst, miGetCompositeClip(pGC)); } /* Do bit blitting */ numRects = RegionNumRects(&rgnDst); if (numRects && widthSrc && heightSrc) miCopyRegion(pSrcDrawable, pDstDrawable, pGC, &rgnDst, dx, dy, copyProc, bitPlane, closure); /* Pixmap sources generate a NoExposed (we return NULL to do this) */ if (!fastExpose && pGC->fExpose) prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn - pSrcDrawable->x, yIn - pSrcDrawable->y, widthSrc, heightSrc, xOut - pDstDrawable->x, yOut - pDstDrawable->y); RegionUninit(&rgnDst); if (freeSrcClip) RegionDestroy(prgnSrcClip); return prgnExposed; } xorg-server-21.1.16/mi/midash.c0000644000175000017500000000644714757411105011664 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "regionstr.h" #include "mistruct.h" void miStepDash(int dist, /* distance to step */ int *pDashIndex, /* current dash */ unsigned char *pDash, /* dash list */ int numInDashList, /* total length of dash list */ int *pDashOffset /* offset into current dash */ ) { int dashIndex, dashOffset; int totallen; int i; dashIndex = *pDashIndex; dashOffset = *pDashOffset; if (dist < pDash[dashIndex] - dashOffset) { *pDashOffset = dashOffset + dist; return; } dist -= pDash[dashIndex] - dashOffset; if (++dashIndex == numInDashList) dashIndex = 0; totallen = 0; for (i = 0; i < numInDashList; i++) totallen += pDash[i]; if (totallen <= dist) dist = dist % totallen; while (dist >= pDash[dashIndex]) { dist -= pDash[dashIndex]; if (++dashIndex == numInDashList) dashIndex = 0; } *pDashIndex = dashIndex; *pDashOffset = dist; } xorg-server-21.1.16/mi/midispcur.c0000644000175000017500000003673014757411105012414 /* * midispcur.c * * machine independent cursor display routines */ /* Copyright 1989, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "input.h" #include "cursorstr.h" #include "windowstr.h" #include "regionstr.h" #include "dixstruct.h" #include "scrnintstr.h" #include "servermd.h" #include "mipointer.h" #include "misprite.h" #include "gcstruct.h" #include "picturestr.h" #include "inputstr.h" /* per-screen private data */ static DevPrivateKeyRec miDCScreenKeyRec; #define miDCScreenKey (&miDCScreenKeyRec) static DevScreenPrivateKeyRec miDCDeviceKeyRec; #define miDCDeviceKey (&miDCDeviceKeyRec) static Bool miDCCloseScreen(ScreenPtr pScreen); /* per device private data */ typedef struct { GCPtr pSourceGC, pMaskGC; GCPtr pSaveGC, pRestoreGC; PixmapPtr pSave; PicturePtr pRootPicture; } miDCBufferRec, *miDCBufferPtr; #define miGetDCDevice(dev, screen) \ ((DevHasCursor(dev)) ? \ (miDCBufferPtr)dixLookupScreenPrivate(&dev->devPrivates, miDCDeviceKey, screen) : \ (miDCBufferPtr)dixLookupScreenPrivate(&GetMaster(dev, MASTER_POINTER)->devPrivates, miDCDeviceKey, screen)) /* * The core pointer buffer will point to the index of the virtual pointer * in the pCursorBuffers array. */ typedef struct { CloseScreenProcPtr CloseScreen; PixmapPtr sourceBits; /* source bits */ PixmapPtr maskBits; /* mask bits */ PicturePtr pPicture; CursorPtr pCursor; } miDCScreenRec, *miDCScreenPtr; #define miGetDCScreen(s) ((miDCScreenPtr)(dixLookupPrivate(&(s)->devPrivates, miDCScreenKey))) Bool miDCInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs) { miDCScreenPtr pScreenPriv; if (!dixRegisterPrivateKey(&miDCScreenKeyRec, PRIVATE_SCREEN, 0) || !dixRegisterScreenPrivateKey(&miDCDeviceKeyRec, pScreen, PRIVATE_DEVICE, 0)) return FALSE; pScreenPriv = calloc(1, sizeof(miDCScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; dixSetPrivate(&pScreen->devPrivates, miDCScreenKey, pScreenPriv); if (!miSpriteInitialize(pScreen, screenFuncs)) { free((void *) pScreenPriv); return FALSE; } return TRUE; } static void miDCSwitchScreenCursor(ScreenPtr pScreen, CursorPtr pCursor, PixmapPtr sourceBits, PixmapPtr maskBits, PicturePtr pPicture) { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); if (pScreenPriv->sourceBits) (*pScreen->DestroyPixmap)(pScreenPriv->sourceBits); pScreenPriv->sourceBits = sourceBits; if (pScreenPriv->maskBits) (*pScreen->DestroyPixmap)(pScreenPriv->maskBits); pScreenPriv->maskBits = maskBits; if (pScreenPriv->pPicture) FreePicture(pScreenPriv->pPicture, 0); pScreenPriv->pPicture = pPicture; pScreenPriv->pCursor = pCursor; } static Bool miDCCloseScreen(ScreenPtr pScreen) { miDCScreenPtr pScreenPriv; pScreenPriv = (miDCScreenPtr) dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; miDCSwitchScreenCursor(pScreen, NULL, NULL, NULL, NULL); free((void *) pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { return TRUE; } #define EnsurePicture(picture,draw,win) (picture || miDCMakePicture(&picture,draw,win)) static PicturePtr miDCMakePicture(PicturePtr * ppPicture, DrawablePtr pDraw, WindowPtr pWin) { PictFormatPtr pFormat; XID subwindow_mode = IncludeInferiors; PicturePtr pPicture; int error; pFormat = PictureWindowFormat(pWin); if (!pFormat) return 0; pPicture = CreatePicture(0, pDraw, pFormat, CPSubwindowMode, &subwindow_mode, serverClient, &error); *ppPicture = pPicture; return pPicture; } static Bool miDCRealize(ScreenPtr pScreen, CursorPtr pCursor) { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); GCPtr pGC; ChangeGCVal gcvals; PixmapPtr sourceBits, maskBits; if (pScreenPriv->pCursor == pCursor) return TRUE; if (pCursor->bits->argb) { PixmapPtr pPixmap; PictFormatPtr pFormat; int error; PicturePtr pPicture; pFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); if (!pFormat) return FALSE; pPixmap = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 32, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) return FALSE; pGC = GetScratchGC(32, pScreen); if (!pGC) { (*pScreen->DestroyPixmap) (pPixmap); return FALSE; } ValidateGC(&pPixmap->drawable, pGC); (*pGC->ops->PutImage) (&pPixmap->drawable, pGC, 32, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, ZPixmap, (char *) pCursor->bits->argb); FreeScratchGC(pGC); pPicture = CreatePicture(0, &pPixmap->drawable, pFormat, 0, 0, serverClient, &error); (*pScreen->DestroyPixmap) (pPixmap); if (!pPicture) return FALSE; miDCSwitchScreenCursor(pScreen, pCursor, NULL, NULL, pPicture); return TRUE; } sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!sourceBits) return FALSE; maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!maskBits) { (*pScreen->DestroyPixmap) (sourceBits); return FALSE; } /* create the two sets of bits, clipping as appropriate */ pGC = GetScratchGC(1, pScreen); if (!pGC) { (*pScreen->DestroyPixmap) (sourceBits); (*pScreen->DestroyPixmap) (maskBits); return FALSE; } ValidateGC((DrawablePtr) sourceBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr) sourceBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *) pCursor->bits->source); gcvals.val = GXand; ChangeGC(NullClient, pGC, GCFunction, &gcvals); ValidateGC((DrawablePtr) sourceBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr) sourceBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *) pCursor->bits->mask); /* mask bits -- pCursor->mask & ~pCursor->source */ gcvals.val = GXcopy; ChangeGC(NullClient, pGC, GCFunction, &gcvals); ValidateGC((DrawablePtr) maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr) maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *) pCursor->bits->mask); gcvals.val = GXandInverted; ChangeGC(NullClient, pGC, GCFunction, &gcvals); ValidateGC((DrawablePtr) maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr) maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *) pCursor->bits->source); FreeScratchGC(pGC); miDCSwitchScreenCursor(pScreen, pCursor, sourceBits, maskBits, NULL); return TRUE; } Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); if (pCursor == pScreenPriv->pCursor) miDCSwitchScreenCursor(pScreen, NULL, NULL, NULL, NULL); return TRUE; } static void miDCPutBits(DrawablePtr pDrawable, GCPtr sourceGC, GCPtr maskGC, int x_org, int y_org, unsigned w, unsigned h, unsigned long source, unsigned long mask) { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pDrawable->pScreen->devPrivates, miDCScreenKey); ChangeGCVal gcval; int x, y; if (sourceGC->fgPixel != source) { gcval.val = source; ChangeGC(NullClient, sourceGC, GCForeground, &gcval); } if (sourceGC->serialNumber != pDrawable->serialNumber) ValidateGC(pDrawable, sourceGC); if (sourceGC->miTranslate) { x = pDrawable->x + x_org; y = pDrawable->y + y_org; } else { x = x_org; y = y_org; } (*sourceGC->ops->PushPixels) (sourceGC, pScreenPriv->sourceBits, pDrawable, w, h, x, y); if (maskGC->fgPixel != mask) { gcval.val = mask; ChangeGC(NullClient, maskGC, GCForeground, &gcval); } if (maskGC->serialNumber != pDrawable->serialNumber) ValidateGC(pDrawable, maskGC); if (maskGC->miTranslate) { x = pDrawable->x + x_org; y = pDrawable->y + y_org; } else { x = x_org; y = y_org; } (*maskGC->ops->PushPixels) (maskGC, pScreenPriv->maskBits, pDrawable, w, h, x, y); } static GCPtr miDCMakeGC(WindowPtr pWin) { GCPtr pGC; int status; XID gcvals[2]; gcvals[0] = IncludeInferiors; gcvals[1] = FALSE; pGC = CreateGC((DrawablePtr) pWin, GCSubwindowMode | GCGraphicsExposures, gcvals, &status, (XID) 0, serverClient); return pGC; } Bool miDCPutUpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y, unsigned long source, unsigned long mask) { miDCScreenPtr pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); miDCBufferPtr pBuffer; WindowPtr pWin; if (!miDCRealize(pScreen, pCursor)) return FALSE; pWin = pScreen->root; pBuffer = miGetDCDevice(pDev, pScreen); if (pScreenPriv->pPicture) { if (!EnsurePicture(pBuffer->pRootPicture, &pWin->drawable, pWin)) return FALSE; CompositePicture(PictOpOver, pScreenPriv->pPicture, NULL, pBuffer->pRootPicture, 0, 0, 0, 0, x, y, pCursor->bits->width, pCursor->bits->height); } else { miDCPutBits((DrawablePtr) pWin, pBuffer->pSourceGC, pBuffer->pMaskGC, x, y, pCursor->bits->width, pCursor->bits->height, source, mask); } return TRUE; } Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h) { miDCBufferPtr pBuffer; PixmapPtr pSave; WindowPtr pWin; GCPtr pGC; pBuffer = miGetDCDevice(pDev, pScreen); pSave = pBuffer->pSave; pWin = pScreen->root; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) { if (pSave) (*pScreen->DestroyPixmap) (pSave); pBuffer->pSave = pSave = (*pScreen->CreatePixmap) (pScreen, w, h, pScreen->rootDepth, 0); if (!pSave) return FALSE; } pGC = pBuffer->pSaveGC; if (pSave->drawable.serialNumber != pGC->serialNumber) ValidateGC((DrawablePtr) pSave, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, x, y, w, h, 0, 0); return TRUE; } Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h) { miDCBufferPtr pBuffer; PixmapPtr pSave; WindowPtr pWin; GCPtr pGC; pBuffer = miGetDCDevice(pDev, pScreen); pSave = pBuffer->pSave; pWin = pScreen->root; if (!pSave) return FALSE; pGC = pBuffer->pRestoreGC; if (pWin->drawable.serialNumber != pGC->serialNumber) ValidateGC((DrawablePtr) pWin, pGC); (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, 0, 0, w, h, x, y); return TRUE; } Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; WindowPtr pWin; int i; if (!DevHasCursor(pDev)) return TRUE; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; pBuffer = calloc(1, sizeof(miDCBufferRec)); if (!pBuffer) goto failure; dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, pBuffer); pWin = pScreen->root; pBuffer->pSourceGC = miDCMakeGC(pWin); if (!pBuffer->pSourceGC) goto failure; pBuffer->pMaskGC = miDCMakeGC(pWin); if (!pBuffer->pMaskGC) goto failure; pBuffer->pSaveGC = miDCMakeGC(pWin); if (!pBuffer->pSaveGC) goto failure; pBuffer->pRestoreGC = miDCMakeGC(pWin); if (!pBuffer->pRestoreGC) goto failure; pBuffer->pRootPicture = NULL; /* (re)allocated lazily depending on the cursor size */ pBuffer->pSave = NULL; } return TRUE; failure: miDCDeviceCleanup(pDev, pScreen); return FALSE; } void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; int i; if (DevHasCursor(pDev)) { for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; pBuffer = miGetDCDevice(pDev, pScreen); if (pBuffer) { if (pBuffer->pSourceGC) FreeGC(pBuffer->pSourceGC, (GContext) 0); if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0); if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0); if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0); /* If a pRootPicture was allocated for a root window, it * is freed when that root window is destroyed, so don't * free it again here. */ if (pBuffer->pSave) (*pScreen->DestroyPixmap) (pBuffer->pSave); free(pBuffer); dixSetScreenPrivate(&pDev->devPrivates, miDCDeviceKey, pScreen, NULL); } } } } xorg-server-21.1.16/mi/mieq.c0000644000175000017500000004400214757411105011337 /* * Copyright 1990, 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. * * Author: Keith Packard, MIT X Consortium */ /* * mieq.c * * Machine independent event queue * */ #if HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" #include "inputstr.h" #include "inpututils.h" #include "mi.h" #include "mipointer.h" #include "scrnintstr.h" #include #include #include #include "extinit.h" #include "exglobals.h" #include "eventstr.h" #ifdef DPMSExtension #include "dpmsproc.h" #include #endif /* Maximum size should be initial size multiplied by a power of 2 */ #define QUEUE_INITIAL_SIZE 512 #define QUEUE_RESERVED_SIZE 64 #define QUEUE_MAXIMUM_SIZE 4096 #define QUEUE_DROP_BACKTRACE_FREQUENCY 100 #define QUEUE_DROP_BACKTRACE_MAX 10 #define EnqueueScreen(dev) dev->spriteInfo->sprite->pEnqueueScreen #define DequeueScreen(dev) dev->spriteInfo->sprite->pDequeueScreen typedef struct _Event { InternalEvent *events; ScreenPtr pScreen; DeviceIntPtr pDev; /* device this event _originated_ from */ } EventRec, *EventPtr; typedef struct _EventQueue { HWEventQueueType head, tail; /* long for SetInputCheck */ CARD32 lastEventTime; /* to avoid time running backwards */ int lastMotion; /* device ID if last event motion? */ EventRec *events; /* our queue as an array */ size_t nevents; /* the number of buckets in our queue */ size_t dropped; /* counter for number of consecutive dropped events */ mieqHandler handlers[128]; /* custom event handler */ } EventQueueRec, *EventQueuePtr; static EventQueueRec miEventQueue; static CallbackListPtr miCallbacksWhenDrained = NULL; static size_t mieqNumEnqueued(EventQueuePtr eventQueue) { size_t n_enqueued = 0; if (eventQueue->nevents) { /* % is not well-defined with negative numbers... sigh */ n_enqueued = eventQueue->tail - eventQueue->head + eventQueue->nevents; if (n_enqueued >= eventQueue->nevents) n_enqueued -= eventQueue->nevents; } return n_enqueued; } /* Pre-condition: Called with input_lock held */ static Bool mieqGrowQueue(EventQueuePtr eventQueue, size_t new_nevents) { size_t i, n_enqueued, first_hunk; EventRec *new_events; if (!eventQueue) { ErrorF("[mi] mieqGrowQueue called with a NULL eventQueue\n"); return FALSE; } if (new_nevents <= eventQueue->nevents) return FALSE; new_events = calloc(new_nevents, sizeof(EventRec)); if (new_events == NULL) { ErrorF("[mi] mieqGrowQueue memory allocation error.\n"); return FALSE; } n_enqueued = mieqNumEnqueued(eventQueue); /* First copy the existing events */ first_hunk = eventQueue->nevents - eventQueue->head; if (eventQueue->events) { memcpy(new_events, &eventQueue->events[eventQueue->head], first_hunk * sizeof(EventRec)); memcpy(&new_events[first_hunk], eventQueue->events, eventQueue->head * sizeof(EventRec)); } /* Initialize the new portion */ for (i = eventQueue->nevents; i < new_nevents; i++) { InternalEvent *evlist = InitEventList(1); if (!evlist) { size_t j; for (j = 0; j < i; j++) FreeEventList(new_events[j].events, 1); free(new_events); return FALSE; } new_events[i].events = evlist; } /* And update our record */ eventQueue->tail = n_enqueued; eventQueue->head = 0; eventQueue->nevents = new_nevents; free(eventQueue->events); eventQueue->events = new_events; return TRUE; } Bool mieqInit(void) { memset(&miEventQueue, 0, sizeof(miEventQueue)); miEventQueue.lastEventTime = GetTimeInMillis(); input_lock(); if (!mieqGrowQueue(&miEventQueue, QUEUE_INITIAL_SIZE)) FatalError("Could not allocate event queue.\n"); input_unlock(); SetInputCheck(&miEventQueue.head, &miEventQueue.tail); return TRUE; } void mieqFini(void) { int i; for (i = 0; i < miEventQueue.nevents; i++) { if (miEventQueue.events[i].events != NULL) { FreeEventList(miEventQueue.events[i].events, 1); miEventQueue.events[i].events = NULL; } } free(miEventQueue.events); } /* * Must be reentrant with ProcessInputEvents. Assumption: mieqEnqueue * will never be interrupted. Must be called with input_lock held */ void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e) { unsigned int oldtail = miEventQueue.tail; InternalEvent *evt; int isMotion = 0; int evlen; Time time; size_t n_enqueued; verify_internal_event(e); n_enqueued = mieqNumEnqueued(&miEventQueue); /* avoid merging events from different devices */ if (e->any.type == ET_Motion) isMotion = pDev->id; if (isMotion && isMotion == miEventQueue.lastMotion && oldtail != miEventQueue.head) { oldtail = (oldtail - 1) % miEventQueue.nevents; } else if (n_enqueued + 1 == miEventQueue.nevents) { if (!mieqGrowQueue(&miEventQueue, miEventQueue.nevents << 1)) { /* Toss events which come in late. Usually this means your server's * stuck in an infinite loop in the main thread. */ miEventQueue.dropped++; if (miEventQueue.dropped == 1) { ErrorFSigSafe("[mi] EQ overflowing. Additional events will be " "discarded until existing events are processed.\n"); xorg_backtrace(); ErrorFSigSafe("[mi] These backtraces from mieqEnqueue may point to " "a culprit higher up the stack.\n"); ErrorFSigSafe("[mi] mieq is *NOT* the cause. It is a victim.\n"); } else if (miEventQueue.dropped % QUEUE_DROP_BACKTRACE_FREQUENCY == 0 && miEventQueue.dropped / QUEUE_DROP_BACKTRACE_FREQUENCY <= QUEUE_DROP_BACKTRACE_MAX) { ErrorFSigSafe("[mi] EQ overflow continuing. %zu events have been " "dropped.\n", miEventQueue.dropped); if (miEventQueue.dropped / QUEUE_DROP_BACKTRACE_FREQUENCY == QUEUE_DROP_BACKTRACE_MAX) { ErrorFSigSafe("[mi] No further overflow reports will be " "reported until the clog is cleared.\n"); } xorg_backtrace(); } return; } oldtail = miEventQueue.tail; } evlen = e->any.length; evt = miEventQueue.events[oldtail].events; memcpy(evt, e, evlen); time = e->any.time; /* Make sure that event times don't go backwards - this * is "unnecessary", but very useful. */ if (time < miEventQueue.lastEventTime && miEventQueue.lastEventTime - time < 10000) e->any.time = miEventQueue.lastEventTime; miEventQueue.lastEventTime = evt->any.time; miEventQueue.events[oldtail].pScreen = pDev ? EnqueueScreen(pDev) : NULL; miEventQueue.events[oldtail].pDev = pDev; miEventQueue.lastMotion = isMotion; miEventQueue.tail = (oldtail + 1) % miEventQueue.nevents; } /** * Changes the screen reference events are being enqueued from. * Input events are enqueued with a screen reference and dequeued and * processed with a (potentially different) screen reference. * This function is called whenever a new event has changed screen but is * still logically on the previous screen as seen by the client. * This usually happens whenever the visible cursor moves across screen * boundaries during event generation, before the same event is processed * and sent down the wire. * * @param pDev The device that triggered a screen change. * @param pScreen The new screen events are being enqueued for. * @param set_dequeue_screen If TRUE, pScreen is set as both enqueue screen * and dequeue screen. */ void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen) { EnqueueScreen(pDev) = pScreen; if (set_dequeue_screen) DequeueScreen(pDev) = pScreen; } void mieqSetHandler(int event, mieqHandler handler) { if (handler && miEventQueue.handlers[event] != handler) ErrorF("[mi] mieq: warning: overriding existing handler %p with %p for " "event %d\n", miEventQueue.handlers[event], handler, event); miEventQueue.handlers[event] = handler; } /** * Change the device id of the given event to the given device's id. */ static void ChangeDeviceID(DeviceIntPtr dev, InternalEvent *event) { switch (event->any.type) { case ET_Motion: case ET_KeyPress: case ET_KeyRelease: case ET_ButtonPress: case ET_ButtonRelease: case ET_ProximityIn: case ET_ProximityOut: case ET_Hierarchy: case ET_DeviceChanged: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: event->device_event.deviceid = dev->id; break; case ET_TouchOwnership: event->touch_ownership_event.deviceid = dev->id; break; #ifdef XFreeXDGA case ET_DGAEvent: break; #endif case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: case ET_RawTouchBegin: case ET_RawTouchEnd: case ET_RawTouchUpdate: event->raw_event.deviceid = dev->id; break; case ET_BarrierHit: case ET_BarrierLeave: event->barrier_event.deviceid = dev->id; break; case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: event->gesture_event.deviceid = dev->id; break; default: ErrorF("[mi] Unknown event type (%d), cannot change id.\n", event->any.type); } } static void FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, InternalEvent *original, InternalEvent *master) { verify_internal_event(original); verify_internal_event(master); /* Ensure chained button mappings, i.e. that the detail field is the * value of the mapped button on the SD, not the physical button */ if (original->any.type == ET_ButtonPress || original->any.type == ET_ButtonRelease) { int btn = original->device_event.detail.button; if (!sdev->button) return; /* Should never happen */ master->device_event.detail.button = sdev->button->map[btn]; } } /** * Copy the given event into master. * @param sdev The slave device the original event comes from * @param original The event as it came from the EQ * @param copy The event after being copied * @return The master device or NULL if the device is a floating slave. */ DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr sdev, InternalEvent *original, InternalEvent *copy) { DeviceIntPtr mdev; int len = original->any.length; int type = original->any.type; int mtype; /* which master type? */ verify_internal_event(original); /* ET_XQuartz has sdev == NULL */ if (!sdev || IsMaster(sdev) || IsFloating(sdev)) return NULL; #ifdef XFreeXDGA if (type == ET_DGAEvent) type = original->dga_event.subtype; #endif switch (type) { case ET_KeyPress: case ET_KeyRelease: mtype = MASTER_KEYBOARD; break; case ET_ButtonPress: case ET_ButtonRelease: case ET_Motion: case ET_ProximityIn: case ET_ProximityOut: mtype = MASTER_POINTER; break; default: mtype = MASTER_ATTACHED; break; } mdev = GetMaster(sdev, mtype); memcpy(copy, original, len); ChangeDeviceID(mdev, copy); FixUpEventForMaster(mdev, sdev, original, copy); return mdev; } static void mieqMoveToNewScreen(DeviceIntPtr dev, ScreenPtr screen, DeviceEvent *event) { if (dev && screen && screen != DequeueScreen(dev)) { int x = 0, y = 0; DequeueScreen(dev) = screen; x = event->root_x; y = event->root_y; NewCurrentScreen(dev, DequeueScreen(dev), x, y); } } /** * Post the given @event through the device hierarchy, as appropriate. * Use this function if an event must be posted for a given device during the * usual event processing cycle. */ void mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen) { mieqHandler handler; DeviceIntPtr master; InternalEvent mevent; /* master event */ verify_internal_event(event); /* refuse events from disabled devices */ if (dev && !dev->enabled) return; /* Custom event handler */ handler = miEventQueue.handlers[event->any.type]; switch (event->any.type) { /* Catch events that include valuator information and check if they * are changing the screen */ case ET_Motion: case ET_KeyPress: case ET_KeyRelease: case ET_ButtonPress: case ET_ButtonRelease: if (!handler) mieqMoveToNewScreen(dev, screen, &event->device_event); break; case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: if (!handler && (event->device_event.flags & TOUCH_POINTER_EMULATED)) mieqMoveToNewScreen(dev, screen, &event->device_event); break; default: break; } master = CopyGetMasterEvent(dev, event, &mevent); if (master) master->lastSlave = dev; /* If someone's registered a custom event handler, let them * steal it. */ if (handler) { int screenNum = dev && DequeueScreen(dev) ? DequeueScreen(dev)->myNum : (screen ? screen-> myNum : 0); handler(screenNum, event, dev); /* Check for the SD's master in case the device got detached * during event processing */ if (master && !IsFloating(dev)) handler(screenNum, &mevent, master); } else { /* process slave first, then master */ dev->public.processInputProc(event, dev); /* Check for the SD's master in case the device got detached * during event processing */ if (master && !IsFloating(dev)) master->public.processInputProc(&mevent, master); } } /* Call this from ProcessInputEvents(). */ void mieqProcessInputEvents(void) { EventRec *e = NULL; ScreenPtr screen; InternalEvent event; DeviceIntPtr dev = NULL, master = NULL; static Bool inProcessInputEvents = FALSE; input_lock(); /* * report an error if mieqProcessInputEvents() is called recursively; * this can happen, e.g., if something in the mieqProcessDeviceEvent() * call chain calls UpdateCurrentTime() instead of UpdateCurrentTimeIf() */ BUG_WARN_MSG(inProcessInputEvents, "[mi] mieqProcessInputEvents() called recursively.\n"); inProcessInputEvents = TRUE; if (miEventQueue.dropped) { ErrorF("[mi] EQ processing has resumed after %lu dropped events.\n", (unsigned long) miEventQueue.dropped); ErrorF ("[mi] This may be caused by a misbehaving driver monopolizing the server's resources.\n"); miEventQueue.dropped = 0; } while (miEventQueue.head != miEventQueue.tail) { e = &miEventQueue.events[miEventQueue.head]; event = *e->events; dev = e->pDev; screen = e->pScreen; miEventQueue.head = (miEventQueue.head + 1) % miEventQueue.nevents; input_unlock(); master = (dev) ? GetMaster(dev, MASTER_ATTACHED) : NULL; if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); #ifdef DPMSExtension else if (DPMSPowerLevel != DPMSModeOn) SetScreenSaverTimer(); if (DPMSPowerLevel != DPMSModeOn) DPMSSet(serverClient, DPMSModeOn); #endif mieqProcessDeviceEvent(dev, &event, screen); /* Update the sprite now. Next event may be from different device. */ if (master && (event.any.type == ET_Motion || ((event.any.type == ET_TouchBegin || event.any.type == ET_TouchUpdate) && event.device_event.flags & TOUCH_POINTER_EMULATED))) miPointerUpdateSprite(dev); input_lock(); } inProcessInputEvents = FALSE; CallCallbacks(&miCallbacksWhenDrained, NULL); input_unlock(); } void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param) { input_lock(); AddCallback(&miCallbacksWhenDrained, callback, param); input_unlock(); } void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param) { input_lock(); DeleteCallback(&miCallbacksWhenDrained, callback, param); input_unlock(); } xorg-server-21.1.16/mi/miexpose.c0000644000175000017500000004343614757411105012247 /*********************************************************** 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. ******************************************************************/ /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "regionstr.h" #include "scrnintstr.h" #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" #include "input.h" #include "dixstruct.h" #include "mi.h" #include #include "globals.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif /* machine-independent graphics exposure code. any device that uses the region package can call this. */ #ifndef RECTLIMIT #define RECTLIMIT 25 /* pick a number, any number > 8 */ #endif /* miHandleExposures generate a region for exposures for areas that were copied from obscured or non-existent areas to non-obscured areas of the destination. Paint the background for the region, if the destination is a window. */ RegionPtr miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; RegionPtr prgnDstClip; /* drawable-relative dest clip */ RegionRec rgnDstRec; BoxRec srcBox; /* unclipped source */ RegionRec rgnExposed; /* exposed region, calculated source- relative, made dst relative to intersect with visible parts of dest and send events to client, and then screen relative to paint the window background */ WindowPtr pSrcWin; BoxRec expBox = { 0, }; Bool extents; /* avoid work if we can */ if (!pGC->graphicsExposures && pDstDrawable->type == DRAWABLE_PIXMAP) return NULL; srcBox.x1 = srcx; srcBox.y1 = srcy; srcBox.x2 = srcx + width; srcBox.y2 = srcy + height; if (pSrcDrawable->type != DRAWABLE_PIXMAP) { BoxRec TsrcBox; TsrcBox.x1 = srcx + pSrcDrawable->x; TsrcBox.y1 = srcy + pSrcDrawable->y; TsrcBox.x2 = TsrcBox.x1 + width; TsrcBox.y2 = TsrcBox.y1 + height; pSrcWin = (WindowPtr) pSrcDrawable; if (pGC->subWindowMode == IncludeInferiors) { prgnSrcClip = NotClippedByChildren(pSrcWin); if ((RegionContainsRect(prgnSrcClip, &TsrcBox)) == rgnIN) { RegionDestroy(prgnSrcClip); return NULL; } } else { if ((RegionContainsRect(&pSrcWin->clipList, &TsrcBox)) == rgnIN) return NULL; prgnSrcClip = &rgnSrcRec; RegionNull(prgnSrcClip); RegionCopy(prgnSrcClip, &pSrcWin->clipList); } RegionTranslate(prgnSrcClip, -pSrcDrawable->x, -pSrcDrawable->y); } else { BoxRec box; if ((srcBox.x1 >= 0) && (srcBox.y1 >= 0) && (srcBox.x2 <= pSrcDrawable->width) && (srcBox.y2 <= pSrcDrawable->height)) return NULL; box.x1 = 0; box.y1 = 0; box.x2 = pSrcDrawable->width; box.y2 = pSrcDrawable->height; prgnSrcClip = &rgnSrcRec; RegionInit(prgnSrcClip, &box, 1); pSrcWin = NULL; } if (pDstDrawable == pSrcDrawable) { prgnDstClip = prgnSrcClip; } else if (pDstDrawable->type != DRAWABLE_PIXMAP) { if (pGC->subWindowMode == IncludeInferiors) { prgnDstClip = NotClippedByChildren((WindowPtr) pDstDrawable); } else { prgnDstClip = &rgnDstRec; RegionNull(prgnDstClip); RegionCopy(prgnDstClip, &((WindowPtr) pDstDrawable)->clipList); } RegionTranslate(prgnDstClip, -pDstDrawable->x, -pDstDrawable->y); } else { BoxRec box; box.x1 = 0; box.y1 = 0; box.x2 = pDstDrawable->width; box.y2 = pDstDrawable->height; prgnDstClip = &rgnDstRec; RegionInit(prgnDstClip, &box, 1); } /* drawable-relative source region */ RegionInit(&rgnExposed, &srcBox, 1); /* now get the hidden parts of the source box */ RegionSubtract(&rgnExposed, &rgnExposed, prgnSrcClip); /* move them over the destination */ RegionTranslate(&rgnExposed, dstx - srcx, dsty - srcy); /* intersect with visible areas of dest */ RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip); /* intersect with client clip region. */ if (pGC->clientClip) RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip); /* * If we have LOTS of rectangles, we decide to take the extents * and force an exposure on that. This should require much less * work overall, on both client and server. This is cheating, but * isn't prohibited by the protocol ("spontaneous combustion" :-) * for windows. */ extents = pGC->graphicsExposures && (RegionNumRects(&rgnExposed) > RECTLIMIT) && (pDstDrawable->type != DRAWABLE_PIXMAP); if (pSrcWin) { RegionPtr region; if (!(region = wClipShape(pSrcWin))) region = wBoundingShape(pSrcWin); /* * If you try to CopyArea the extents of a shaped window, compacting the * exposed region will undo all our work! */ if (extents && pSrcWin && region && (RegionContainsRect(region, &srcBox) != rgnIN)) extents = FALSE; } if (extents) { expBox = *RegionExtents(&rgnExposed); RegionReset(&rgnExposed, &expBox); } if ((pDstDrawable->type != DRAWABLE_PIXMAP) && (((WindowPtr) pDstDrawable)->backgroundState != None)) { WindowPtr pWin = (WindowPtr) pDstDrawable; /* make the exposed area screen-relative */ RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y); if (extents) { /* PaintWindow doesn't clip, so we have to */ RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); } pDstDrawable->pScreen->PaintWindow((WindowPtr) pDstDrawable, &rgnExposed, PW_BACKGROUND); if (extents) { RegionReset(&rgnExposed, &expBox); } else RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y); } if (prgnDstClip == &rgnDstRec) { RegionUninit(prgnDstClip); } else if (prgnDstClip != prgnSrcClip) { RegionDestroy(prgnDstClip); } if (prgnSrcClip == &rgnSrcRec) { RegionUninit(prgnSrcClip); } else { RegionDestroy(prgnSrcClip); } if (pGC->graphicsExposures) { /* don't look */ RegionPtr exposed = RegionCreate(NullBox, 0); *exposed = rgnExposed; return exposed; } else { RegionUninit(&rgnExposed); return NULL; } } void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy) { BoxPtr pBox; int numRects; xEvent *pEvent, *pe; int i; pBox = RegionRects(pRgn); numRects = RegionNumRects(pRgn); if (!(pEvent = calloc(1, numRects * sizeof(xEvent)))) return; for (i = numRects, pe = pEvent; --i >= 0; pe++, pBox++) { pe->u.u.type = Expose; pe->u.expose.window = pWin->drawable.id; pe->u.expose.x = pBox->x1 - dx; pe->u.expose.y = pBox->y1 - dy; pe->u.expose.width = pBox->x2 - pBox->x1; pe->u.expose.height = pBox->y2 - pBox->y1; pe->u.expose.count = i; } #ifdef PANORAMIX if (!noPanoramiXExtension) { int scrnum = pWin->drawable.pScreen->myNum; int x = 0, y = 0; XID realWin = 0; if (!pWin->parent) { x = screenInfo.screens[scrnum]->x; y = screenInfo.screens[scrnum]->y; pWin = screenInfo.screens[0]->root; realWin = pWin->drawable.id; } else if (scrnum) { PanoramiXRes *win; win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, scrnum); if (!win) { free(pEvent); return; } realWin = win->info[0].id; dixLookupWindow(&pWin, realWin, serverClient, DixSendAccess); } if (x || y || scrnum) for (i = 0; i < numRects; i++) { pEvent[i].u.expose.window = realWin; pEvent[i].u.expose.x += x; pEvent[i].u.expose.y += y; } } #endif DeliverEvents(pWin, pEvent, numRects, NullWindow); free(pEvent); } void miWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; if (prgn && !RegionNil(prgn)) { RegionRec expRec; int clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) { /* * If we have LOTS of rectangles, we decide to take the extents * and force an exposure on that. This should require much less * work overall, on both client and server. This is cheating, but * isn't prohibited by the protocol ("spontaneous combustion" :-). */ BoxRec box = *RegionExtents(prgn); exposures = &expRec; RegionInit(exposures, &box, 1); RegionReset(prgn, &box); /* miPaintWindow doesn't clip, so we have to */ RegionIntersect(prgn, prgn, &pWin->clipList); } pWin->drawable.pScreen->PaintWindow(pWin, prgn, PW_BACKGROUND); if (clientInterested) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); if (exposures == &expRec) RegionUninit(exposures); RegionEmpty(prgn); } } void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) { ScreenPtr pScreen = pWin->drawable.pScreen; ChangeGCVal gcval[6]; BITS32 gcmask; GCPtr pGC; int i; BoxPtr pbox; xRectangle *prect; int numRects, regionnumrects; /* * Distance from screen to destination drawable, use this * to adjust rendering coordinates which come in in screen space */ int draw_x_off, draw_y_off; /* * Tile offset for drawing; these need to align the tile * to the appropriate window origin */ int tile_x_off, tile_y_off; PixUnion fill; Bool solid = TRUE; DrawablePtr drawable = &pWin->drawable; if (what == PW_BACKGROUND) { while (pWin->backgroundState == ParentRelative) pWin = pWin->parent; draw_x_off = drawable->x; draw_y_off = drawable->y; tile_x_off = pWin->drawable.x - draw_x_off; tile_y_off = pWin->drawable.y - draw_y_off; fill = pWin->background; #ifdef COMPOSITE if (pWin->inhibitBGPaint) return; #endif switch (pWin->backgroundState) { case None: return; case BackgroundPixmap: solid = FALSE; break; } } else { PixmapPtr pixmap; fill = pWin->border; solid = pWin->borderIsPixel; /* servers without pixmaps draw their own borders */ if (!pScreen->GetWindowPixmap) return; pixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) drawable); drawable = &pixmap->drawable; while (pWin->backgroundState == ParentRelative) pWin = pWin->parent; tile_x_off = pWin->drawable.x; tile_y_off = pWin->drawable.y; #ifdef COMPOSITE draw_x_off = pixmap->screen_x; draw_y_off = pixmap->screen_y; tile_x_off -= draw_x_off; tile_y_off -= draw_y_off; #else draw_x_off = 0; draw_y_off = 0; #endif } gcval[0].val = GXcopy; gcmask = GCFunction; #ifdef ROOTLESS_SAFEALPHA /* Bit mask for alpha channel with a particular number of bits per * pixel. Note that we only care for 32bpp data. Mac OS X uses planar * alpha for 16bpp. */ #define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) #endif if (solid) { #ifdef ROOTLESS_SAFEALPHA gcval[1].val = fill.pixel | RootlessAlphaMask(pWin->drawable.bitsPerPixel); #else gcval[1].val = fill.pixel; #endif gcval[2].val = FillSolid; gcmask |= GCForeground | GCFillStyle; } else { int c = 1; #ifdef ROOTLESS_SAFEALPHA gcval[c++].val = ((CARD32) -1) & ~RootlessAlphaMask(pWin->drawable.bitsPerPixel); gcmask |= GCPlaneMask; #endif gcval[c++].val = FillTiled; gcval[c++].ptr = (void *) fill.pixmap; gcval[c++].val = tile_x_off; gcval[c++].val = tile_y_off; gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; } regionnumrects = RegionNumRects(prgn); if (regionnumrects == 0) return; prect = xallocarray(regionnumrects, sizeof(xRectangle)); if (!prect) return; pGC = GetScratchGC(drawable->depth, drawable->pScreen); if (!pGC) { free(prect); return; } ChangeGC(NullClient, pGC, gcmask, gcval); ValidateGC(drawable, pGC); numRects = RegionNumRects(prgn); pbox = RegionRects(prgn); for (i = numRects; --i >= 0; pbox++, prect++) { prect->x = pbox->x1 - draw_x_off; prect->y = pbox->y1 - draw_y_off; prect->width = pbox->x2 - pbox->x1; prect->height = pbox->y2 - pbox->y1; } prect -= numRects; (*pGC->ops->PolyFillRect) (drawable, pGC, numRects, prect); free(prect); FreeScratchGC(pGC); } /* MICLEARDRAWABLE -- sets the entire drawable to the background color of * the GC. Useful when we have a scratch drawable and need to initialize * it. */ void miClearDrawable(DrawablePtr pDraw, GCPtr pGC) { ChangeGCVal fg, bg; xRectangle rect; fg.val = pGC->fgPixel; bg.val = pGC->bgPixel; rect.x = 0; rect.y = 0; rect.width = pDraw->width; rect.height = pDraw->height; ChangeGC(NullClient, pGC, GCForeground, &bg); ValidateGC(pDraw, pGC); (*pGC->ops->PolyFillRect) (pDraw, pGC, 1, &rect); ChangeGC(NullClient, pGC, GCForeground, &fg); ValidateGC(pDraw, pGC); } xorg-server-21.1.16/mi/mifillarc.c0000644000175000017500000004640414757411105012356 /************************************************************ Copyright 1989, 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. Author: Bob Scheifler, MIT X Consortium ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "mi.h" #include "mifillarc.h" #define QUADRANT (90 * 64) #define HALFCIRCLE (180 * 64) #define QUADRANT3 (270 * 64) #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define Dsin(d) sin((double)d*(M_PI/11520.0)) #define Dcos(d) cos((double)d*(M_PI/11520.0)) static void miFillArcSetup(xArc * arc, miFillArcRec * info) { info->y = arc->height >> 1; info->dy = arc->height & 1; info->yorg = arc->y + info->y; info->dx = arc->width & 1; info->xorg = arc->x + (arc->width >> 1) + info->dx; info->dx = 1 - info->dx; if (arc->width == arc->height) { /* (2x - 2xorg)^2 = d^2 - (2y - 2yorg)^2 */ /* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */ info->ym = 8; info->xm = 8; info->yk = info->y << 3; if (!info->dx) { info->xk = 0; info->e = -1; } else { info->y++; info->yk += 4; info->xk = -4; info->e = -(info->y << 3); } } else { /* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */ /* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */ info->ym = (arc->width * arc->width) << 3; info->xm = (arc->height * arc->height) << 3; info->yk = info->y * info->ym; if (!info->dy) info->yk -= info->ym >> 1; if (!info->dx) { info->xk = 0; info->e = -(info->xm >> 3); } else { info->y++; info->yk += info->ym; info->xk = -(info->xm >> 1); info->e = info->xk - info->yk; } } } static void miFillArcDSetup(xArc * arc, miFillArcDRec * info) { /* h^2 * (2x - 2xorg)^2 = w^2 * h^2 - w^2 * (2y - 2yorg)^2 */ /* even: xorg = yorg = 0 odd: xorg = .5, yorg = -.5 */ info->y = arc->height >> 1; info->dy = arc->height & 1; info->yorg = arc->y + info->y; info->dx = arc->width & 1; info->xorg = arc->x + (arc->width >> 1) + info->dx; info->dx = 1 - info->dx; info->ym = ((double) arc->width) * (arc->width * 8); info->xm = ((double) arc->height) * (arc->height * 8); info->yk = info->y * info->ym; if (!info->dy) info->yk -= info->ym / 2.0; if (!info->dx) { info->xk = 0; info->e = -(info->xm / 8.0); } else { info->y++; info->yk += info->ym; info->xk = -info->xm / 2.0; info->e = info->xk - info->yk; } } static void miGetArcEdge(xArc * arc, miSliceEdgePtr edge, int k, Bool top, Bool left) { int xady, y; y = arc->height >> 1; if (!(arc->width & 1)) y++; if (!top) { y = -y; if (arc->height & 1) y--; } xady = k + y * edge->dx; if (xady <= 0) edge->x = -((-xady) / edge->dy + 1); else edge->x = (xady - 1) / edge->dy; edge->e = xady - edge->x * edge->dy; if ((top && (edge->dx < 0)) || (!top && (edge->dx > 0))) edge->e = edge->dy - edge->e + 1; if (left) edge->x++; edge->x += arc->x + (arc->width >> 1); if (edge->dx > 0) { edge->deltax = 1; edge->stepx = edge->dx / edge->dy; edge->dx = edge->dx % edge->dy; } else { edge->deltax = -1; edge->stepx = -((-edge->dx) / edge->dy); edge->dx = (-edge->dx) % edge->dy; } if (!top) { edge->deltax = -edge->deltax; edge->stepx = -edge->stepx; } } static void miEllipseAngleToSlope(int angle, int width, int height, int *dxp, int *dyp, double *d_dxp, double *d_dyp) { int dx, dy; double d_dx, d_dy, scale; Bool negative_dx, negative_dy; switch (angle) { case 0: *dxp = -1; *dyp = 0; if (d_dxp) { *d_dxp = width / 2.0; *d_dyp = 0; } break; case QUADRANT: *dxp = 0; *dyp = 1; if (d_dxp) { *d_dxp = 0; *d_dyp = -height / 2.0; } break; case HALFCIRCLE: *dxp = 1; *dyp = 0; if (d_dxp) { *d_dxp = -width / 2.0; *d_dyp = 0; } break; case QUADRANT3: *dxp = 0; *dyp = -1; if (d_dxp) { *d_dxp = 0; *d_dyp = height / 2.0; } break; default: d_dx = Dcos(angle) * width; d_dy = Dsin(angle) * height; if (d_dxp) { *d_dxp = d_dx / 2.0; *d_dyp = -d_dy / 2.0; } negative_dx = FALSE; if (d_dx < 0.0) { d_dx = -d_dx; negative_dx = TRUE; } negative_dy = FALSE; if (d_dy < 0.0) { d_dy = -d_dy; negative_dy = TRUE; } scale = d_dx; if (d_dy > d_dx) scale = d_dy; dx = floor((d_dx * 32768) / scale + 0.5); if (negative_dx) dx = -dx; *dxp = dx; dy = floor((d_dy * 32768) / scale + 0.5); if (negative_dy) dy = -dy; *dyp = dy; break; } } static void miGetPieEdge(xArc * arc, int angle, miSliceEdgePtr edge, Bool top, Bool left) { int k; int dx, dy; miEllipseAngleToSlope(angle, arc->width, arc->height, &dx, &dy, 0, 0); if (dy == 0) { edge->x = left ? -65536 : 65536; edge->stepx = 0; edge->e = 0; edge->dx = -1; return; } if (dx == 0) { edge->x = arc->x + (arc->width >> 1); if (left && (arc->width & 1)) edge->x++; else if (!left && !(arc->width & 1)) edge->x--; edge->stepx = 0; edge->e = 0; edge->dx = -1; return; } if (dy < 0) { dx = -dx; dy = -dy; } k = (arc->height & 1) ? dx : 0; if (arc->width & 1) k += dy; edge->dx = dx << 1; edge->dy = dy << 1; miGetArcEdge(arc, edge, k, top, left); } static void miFillArcSliceSetup(xArc * arc, miArcSliceRec * slice, GCPtr pGC) { int angle1, angle2; angle1 = arc->angle1; if (arc->angle2 < 0) { angle2 = angle1; angle1 += arc->angle2; } else angle2 = angle1 + arc->angle2; while (angle1 < 0) angle1 += FULLCIRCLE; while (angle1 >= FULLCIRCLE) angle1 -= FULLCIRCLE; while (angle2 < 0) angle2 += FULLCIRCLE; while (angle2 >= FULLCIRCLE) angle2 -= FULLCIRCLE; slice->min_top_y = 0; slice->max_top_y = arc->height >> 1; slice->min_bot_y = 1 - (arc->height & 1); slice->max_bot_y = slice->max_top_y - 1; slice->flip_top = FALSE; slice->flip_bot = FALSE; if (pGC->arcMode == ArcPieSlice) { slice->edge1_top = (angle1 < HALFCIRCLE); slice->edge2_top = (angle2 <= HALFCIRCLE); if ((angle2 == 0) || (angle1 == HALFCIRCLE)) { if (angle2 ? slice->edge2_top : slice->edge1_top) slice->min_top_y = slice->min_bot_y; else slice->min_top_y = arc->height; slice->min_bot_y = 0; } else if ((angle1 == 0) || (angle2 == HALFCIRCLE)) { slice->min_top_y = slice->min_bot_y; if (angle1 ? slice->edge1_top : slice->edge2_top) slice->min_bot_y = arc->height; else slice->min_bot_y = 0; } else if (slice->edge1_top == slice->edge2_top) { if (angle2 < angle1) { slice->flip_top = slice->edge1_top; slice->flip_bot = !slice->edge1_top; } else if (slice->edge1_top) { slice->min_top_y = 1; slice->min_bot_y = arc->height; } else { slice->min_bot_y = 0; slice->min_top_y = arc->height; } } miGetPieEdge(arc, angle1, &slice->edge1, slice->edge1_top, !slice->edge1_top); miGetPieEdge(arc, angle2, &slice->edge2, slice->edge2_top, slice->edge2_top); } else { double w2, h2, x1, y1, x2, y2, dx, dy, scale; int signdx, signdy, y, k; Bool isInt1 = TRUE, isInt2 = TRUE; w2 = (double) arc->width / 2.0; h2 = (double) arc->height / 2.0; if ((angle1 == 0) || (angle1 == HALFCIRCLE)) { x1 = angle1 ? -w2 : w2; y1 = 0.0; } else if ((angle1 == QUADRANT) || (angle1 == QUADRANT3)) { x1 = 0.0; y1 = (angle1 == QUADRANT) ? h2 : -h2; } else { isInt1 = FALSE; x1 = Dcos(angle1) * w2; y1 = Dsin(angle1) * h2; } if ((angle2 == 0) || (angle2 == HALFCIRCLE)) { x2 = angle2 ? -w2 : w2; y2 = 0.0; } else if ((angle2 == QUADRANT) || (angle2 == QUADRANT3)) { x2 = 0.0; y2 = (angle2 == QUADRANT) ? h2 : -h2; } else { isInt2 = FALSE; x2 = Dcos(angle2) * w2; y2 = Dsin(angle2) * h2; } dx = x2 - x1; dy = y2 - y1; if (arc->height & 1) { y1 -= 0.5; y2 -= 0.5; } if (arc->width & 1) { x1 += 0.5; x2 += 0.5; } if (dy < 0.0) { dy = -dy; signdy = -1; } else signdy = 1; if (dx < 0.0) { dx = -dx; signdx = -1; } else signdx = 1; if (isInt1 && isInt2) { slice->edge1.dx = dx * 2; slice->edge1.dy = dy * 2; } else { scale = (dx > dy) ? dx : dy; slice->edge1.dx = floor((dx * 32768) / scale + .5); slice->edge1.dy = floor((dy * 32768) / scale + .5); } if (!slice->edge1.dy) { if (signdx < 0) { y = floor(y1 + 1.0); if (y >= 0) { slice->min_top_y = y; slice->min_bot_y = arc->height; } else { slice->max_bot_y = -y - (arc->height & 1); } } else { y = floor(y1); if (y >= 0) slice->max_top_y = y; else { slice->min_top_y = arc->height; slice->min_bot_y = -y - (arc->height & 1); } } slice->edge1_top = TRUE; slice->edge1.x = 65536; slice->edge1.stepx = 0; slice->edge1.e = 0; slice->edge1.dx = -1; slice->edge2 = slice->edge1; slice->edge2_top = FALSE; } else if (!slice->edge1.dx) { if (signdy < 0) x1 -= 1.0; slice->edge1.x = ceil(x1); slice->edge1_top = signdy < 0; slice->edge1.x += arc->x + (arc->width >> 1); slice->edge1.stepx = 0; slice->edge1.e = 0; slice->edge1.dx = -1; slice->edge2_top = !slice->edge1_top; slice->edge2 = slice->edge1; } else { if (signdx < 0) slice->edge1.dx = -slice->edge1.dx; if (signdy < 0) slice->edge1.dx = -slice->edge1.dx; k = ceil(((x1 + x2) * slice->edge1.dy - (y1 + y2) * slice->edge1.dx) / 2.0); slice->edge2.dx = slice->edge1.dx; slice->edge2.dy = slice->edge1.dy; slice->edge1_top = signdy < 0; slice->edge2_top = !slice->edge1_top; miGetArcEdge(arc, &slice->edge1, k, slice->edge1_top, !slice->edge1_top); miGetArcEdge(arc, &slice->edge2, k, slice->edge2_top, slice->edge2_top); } } } #define ADDSPANS() \ pts->x = xorg - x; \ pts->y = yorg - y; \ *wids = slw; \ pts++; \ wids++; \ if (miFillArcLower(slw)) \ { \ pts->x = xorg - x; \ pts->y = yorg + y + dy; \ pts++; \ *wids++ = slw; \ } static int miFillEllipseI(DrawablePtr pDraw, GCPtr pGC, xArc * arc, DDXPointPtr points, int *widths) { int x, y, e; int yk, xk, ym, xm, dx, dy, xorg, yorg; int slw; miFillArcRec info; DDXPointPtr pts; int *wids; miFillArcSetup(arc, &info); MIFILLARCSETUP(); if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; } pts = points; wids = widths; while (y > 0) { MIFILLARCSTEP(slw); ADDSPANS(); } return pts - points; } static int miFillEllipseD(DrawablePtr pDraw, GCPtr pGC, xArc * arc, DDXPointPtr points, int *widths) { int x, y; int xorg, yorg, dx, dy, slw; double e, yk, xk, ym, xm; miFillArcDRec info; DDXPointPtr pts; int *wids; miFillArcDSetup(arc, &info); MIFILLARCSETUP(); if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; } pts = points; wids = widths; while (y > 0) { MIFILLARCSTEP(slw); ADDSPANS(); } return pts - points; } #define ADDSPAN(l,r) \ if (r >= l) \ { \ pts->x = l; \ pts->y = ya; \ pts++; \ *wids++ = r - l + 1; \ } #define ADDSLICESPANS(flip) \ if (!flip) \ { \ ADDSPAN(xl, xr); \ } \ else \ { \ xc = xorg - x; \ ADDSPAN(xc, xr); \ xc += slw - 1; \ ADDSPAN(xl, xc); \ } static int miFillArcSliceI(DrawablePtr pDraw, GCPtr pGC, xArc * arc, DDXPointPtr points, int *widths) { int yk, xk, ym, xm, dx, dy, xorg, yorg, slw; int x, y, e; miFillArcRec info; miArcSliceRec slice; int ya, xl, xr, xc; DDXPointPtr pts; int *wids; miFillArcSetup(arc, &info); miFillArcSliceSetup(arc, &slice, pGC); MIFILLARCSETUP(); slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; slice.edge1.x += pDraw->x; slice.edge2.x += pDraw->x; } pts = points; wids = widths; while (y > 0) { MIFILLARCSTEP(slw); MIARCSLICESTEP(slice.edge1); MIARCSLICESTEP(slice.edge2); if (miFillSliceUpper(slice)) { ya = yorg - y; MIARCSLICEUPPER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_top); } if (miFillSliceLower(slice)) { ya = yorg + y + dy; MIARCSLICELOWER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_bot); } } return pts - points; } static int miFillArcSliceD(DrawablePtr pDraw, GCPtr pGC, xArc * arc, DDXPointPtr points, int *widths) { int x, y; int dx, dy, xorg, yorg, slw; double e, yk, xk, ym, xm; miFillArcDRec info; miArcSliceRec slice; int ya, xl, xr, xc; DDXPointPtr pts; int *wids; miFillArcDSetup(arc, &info); miFillArcSliceSetup(arc, &slice, pGC); MIFILLARCSETUP(); slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; slice.edge1.x += pDraw->x; slice.edge2.x += pDraw->x; } pts = points; wids = widths; while (y > 0) { MIFILLARCSTEP(slw); MIARCSLICESTEP(slice.edge1); MIARCSLICESTEP(slice.edge2); if (miFillSliceUpper(slice)) { ya = yorg - y; MIARCSLICEUPPER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_top); } if (miFillSliceLower(slice)) { ya = yorg + y + dy; MIARCSLICELOWER(xl, xr, slice, slw); ADDSLICESPANS(slice.flip_bot); } } return pts - points; } /* MIPOLYFILLARC -- The public entry for the PolyFillArc request. * Since we don't have to worry about overlapping segments, we can just * fill each arc as it comes. */ /* Limit the number of spans in a single draw request to avoid integer * overflow in the computation of the span buffer size. */ #define MAX_SPANS_PER_LOOP (4 * 1024 * 1024) void miPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcs_all, xArc * parcs) { while (narcs_all > 0) { int narcs; int i; xArc *arc; int nspans = 0; DDXPointPtr pts, points; int *wids, *widths; int n; for (narcs = 0, arc = parcs; narcs < narcs_all; narcs++, arc++) { if (narcs && nspans + arc->height > MAX_SPANS_PER_LOOP) break; nspans += arc->height; /* A pie-slice arc may add another pile of spans */ if (pGC->arcMode == ArcPieSlice && (-FULLCIRCLE < arc->angle2 && arc->angle2 < FULLCIRCLE)) nspans += (arc->height + 1) >> 1; } pts = points = malloc (sizeof (DDXPointRec) * nspans + sizeof(int) * nspans); if (points) { wids = widths = (int *) (points + nspans); for (i = 0, arc = parcs; i < narcs; arc++, i++) { if (miFillArcEmpty(arc)) continue; if ((arc->angle2 >= FULLCIRCLE) || (arc->angle2 <= -FULLCIRCLE)) { if (miCanFillArc(arc)) n = miFillEllipseI(pDraw, pGC, arc, pts, wids); else n = miFillEllipseD(pDraw, pGC, arc, pts, wids); } else { if (miCanFillArc(arc)) n = miFillArcSliceI(pDraw, pGC, arc, pts, wids); else n = miFillArcSliceD(pDraw, pGC, arc, pts, wids); } pts += n; wids += n; } nspans = pts - points; if (nspans) (*pGC->ops->FillSpans) (pDraw, pGC, nspans, points, widths, FALSE); free (points); } parcs += narcs; narcs_all -= narcs; } } xorg-server-21.1.16/mi/mifillarc.h0000644000175000017500000001053514757411105012357 /************************************************************ Copyright 1989, 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. ********************************************************/ #ifndef __MIFILLARC_H__ #define __MIFILLARC_H__ #define FULLCIRCLE (360 * 64) typedef struct _miFillArc { int xorg, yorg; int y; int dx, dy; int e; int ym, yk, xm, xk; } miFillArcRec; /* could use 64-bit integers */ typedef struct _miFillArcD { int xorg, yorg; int y; int dx, dy; double e; double ym, yk, xm, xk; } miFillArcDRec; #define miFillArcEmpty(arc) (!(arc)->angle2 || \ !(arc)->width || !(arc)->height || \ (((arc)->width == 1) && ((arc)->height & 1))) #define miCanFillArc(arc) (((arc)->width == (arc)->height) || \ (((arc)->width <= 800) && ((arc)->height <= 800))) #define MIFILLARCSETUP() \ x = 0; \ y = info.y; \ e = info.e; \ xk = info.xk; \ xm = info.xm; \ yk = info.yk; \ ym = info.ym; \ dx = info.dx; \ dy = info.dy; \ xorg = info.xorg; \ yorg = info.yorg #define MIFILLARCSTEP(slw) \ e += yk; \ while (e >= 0) \ { \ x++; \ xk -= xm; \ e += xk; \ } \ y--; \ yk -= ym; \ slw = (x << 1) + dx; \ if ((e == xk) && (slw > 1)) \ slw-- #define MIFILLCIRCSTEP(slw) MIFILLARCSTEP(slw) #define MIFILLELLSTEP(slw) MIFILLARCSTEP(slw) #define miFillArcLower(slw) (((y + dy) != 0) && ((slw > 1) || (e != xk))) typedef struct _miSliceEdge { int x; int stepx; int deltax; int e; int dy; int dx; } miSliceEdgeRec, *miSliceEdgePtr; typedef struct _miArcSlice { miSliceEdgeRec edge1, edge2; int min_top_y, max_top_y; int min_bot_y, max_bot_y; Bool edge1_top, edge2_top; Bool flip_top, flip_bot; } miArcSliceRec; #define MIARCSLICESTEP(edge) \ edge.x -= edge.stepx; \ edge.e -= edge.dx; \ if (edge.e <= 0) \ { \ edge.x -= edge.deltax; \ edge.e += edge.dy; \ } #define miFillSliceUpper(slice) \ ((y >= slice.min_top_y) && (y <= slice.max_top_y)) #define miFillSliceLower(slice) \ ((y >= slice.min_bot_y) && (y <= slice.max_bot_y)) #define MIARCSLICEUPPER(xl,xr,slice,slw) \ xl = xorg - x; \ xr = xl + slw - 1; \ if (slice.edge1_top && (slice.edge1.x < xr)) \ xr = slice.edge1.x; \ if (slice.edge2_top && (slice.edge2.x > xl)) \ xl = slice.edge2.x; #define MIARCSLICELOWER(xl,xr,slice,slw) \ xl = xorg - x; \ xr = xl + slw - 1; \ if (!slice.edge1_top && (slice.edge1.x > xl)) \ xl = slice.edge1.x; \ if (!slice.edge2_top && (slice.edge2.x < xr)) \ xr = slice.edge2.x; #define MIWIDEARCSETUP(x,y,dy,slw,e,xk,xm,yk,ym) \ x = 0; \ y = slw >> 1; \ yk = y << 3; \ xm = 8; \ ym = 8; \ if (dy) \ { \ xk = 0; \ if (slw & 1) \ e = -1; \ else \ e = -(y << 2) - 2; \ } \ else \ { \ y++; \ yk += 4; \ xk = -4; \ if (slw & 1) \ e = -(y << 2) - 3; \ else \ e = - (y << 3); \ } #define MIFILLINARCSTEP(slw) \ ine += inyk; \ while (ine >= 0) \ { \ inx++; \ inxk -= inxm; \ ine += inxk; \ } \ iny--; \ inyk -= inym; \ slw = (inx << 1) + dx; \ if ((ine == inxk) && (slw > 1)) \ slw-- #define miFillInArcLower(slw) (((iny + dy) != 0) && \ ((slw > 1) || (ine != inxk))) #endif /* __MIFILLARC_H__ */ xorg-server-21.1.16/mi/mifillrct.c0000644000175000017500000001051014757411105012366 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" #include "mi.h" #include "misc.h" /* mi rectangles written by newman, with debts to all and sundry */ /* MIPOLYFILLRECT -- public entry for PolyFillRect request * very straight forward: translate rectangles if necessary * then call FillSpans to fill each rectangle. We let FillSpans worry about * clipping to the destination */ _X_COLD void miPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nrectFill, /* number of rectangles to fill */ xRectangle *prectInit /* Pointer to first rectangle to fill */ ) { int i; int height; int width; xRectangle *prect; int xorg; int yorg; int maxheight; DDXPointPtr pptFirst; DDXPointPtr ppt; int *pwFirst; int *pw; if (pGC->miTranslate) { xorg = pDrawable->x; yorg = pDrawable->y; prect = prectInit; maxheight = 0; for (i = 0; i < nrectFill; i++, prect++) { prect->x += xorg; prect->y += yorg; maxheight = max(maxheight, prect->height); } } else { prect = prectInit; maxheight = 0; for (i = 0; i < nrectFill; i++, prect++) maxheight = max(maxheight, prect->height); } pptFirst = xallocarray(maxheight, sizeof(DDXPointRec)); pwFirst = xallocarray(maxheight, sizeof(int)); if (!pptFirst || !pwFirst) { free(pwFirst); free(pptFirst); return; } prect = prectInit; while (nrectFill--) { ppt = pptFirst; pw = pwFirst; height = prect->height; width = prect->width; xorg = prect->x; yorg = prect->y; while (height--) { *pw++ = width; ppt->x = xorg; ppt->y = yorg; ppt++; yorg++; } (*pGC->ops->FillSpans) (pDrawable, pGC, prect->height, pptFirst, pwFirst, 1); prect++; } free(pwFirst); free(pptFirst); } xorg-server-21.1.16/mi/mifpoly.h0000644000175000017500000000473414757411105012100 /*********************************************************** 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. ******************************************************************/ #ifndef __MIFPOLY_H__ #define __MIFPOLY_H__ #include static _X_INLINE int ICEIL(double x) { int _cTmp = x; return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp + 1; } #endif /* __MIFPOLY_H__ */ xorg-server-21.1.16/mi/migc.c0000644000175000017500000001543614757411105011334 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "migc.h" /* ARGSUSED */ void miChangeGC(GCPtr pGC, unsigned long mask) { return; } void miDestroyGC(GCPtr pGC) { if (pGC->freeCompClip) RegionDestroy(pGC->pCompositeClip); } void miDestroyClip(GCPtr pGC) { if (pGC->clientClip) RegionDestroy(pGC->clientClip); pGC->clientClip = NULL; } void miChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { (*pGC->funcs->DestroyClip) (pGC); if (type == CT_PIXMAP) { /* convert the pixmap to a region */ pGC->clientClip = BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue); (*pGC->pScreen->DestroyPixmap) (pvalue); } else if (type == CT_REGION) { /* stuff the region in the GC */ pGC->clientClip = pvalue; } else if (type != CT_NONE) { pGC->clientClip = RegionFromRects(nrects, (xRectangle *) pvalue, type); free(pvalue); } pGC->stateChanges |= GCClipMask; } void miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { if (pgcSrc->clientClip) { RegionPtr prgnNew = RegionCreate(NULL, 1); RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip)); (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, prgnNew, 0); } else { (*pgcDst->funcs->ChangeClip) (pgcDst, CT_NONE, NULL, 0); } } /* ARGSUSED */ void miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) { return; } void miComputeCompositeClip(GCPtr pGC, DrawablePtr pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; RegionPtr pregWin; Bool freeTmpClip, freeCompClip; if (pGC->subWindowMode == IncludeInferiors) { pregWin = NotClippedByChildren(pWin); freeTmpClip = TRUE; } else { pregWin = &pWin->clipList; freeTmpClip = FALSE; } freeCompClip = pGC->freeCompClip; /* * if there is no client clip, we can get by with just keeping the * pointer we got, and remembering whether or not should destroy (or * maybe re-use) it later. this way, we avoid unnecessary copying of * regions. (this wins especially if many clients clip by children * and have no client clip.) */ if (!pGC->clientClip) { if (freeCompClip) RegionDestroy(pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } else { /* * we need one 'real' region to put into the composite clip. if * pregWin the current composite clip are real, we can get rid of * one. if pregWin is real and the current composite clip isn't, * use pregWin for the composite clip. if the current composite * clip is real and pregWin isn't, use the current composite * clip. if neither is real, create a new region. */ RegionTranslate(pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); if (freeCompClip) { RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) RegionDestroy(pregWin); } else if (freeTmpClip) { RegionIntersect(pregWin, pregWin, pGC->clientClip); pGC->pCompositeClip = pregWin; } else { pGC->pCompositeClip = RegionCreate(NullBox, 0); RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; RegionTranslate(pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } } /* end of composite clip for a window */ else { BoxRec pixbounds; /* XXX should we translate by drawable.x/y here ? */ /* If you want pixmaps in offscreen memory, yes */ pixbounds.x1 = pDrawable->x; pixbounds.y1 = pDrawable->y; pixbounds.x2 = pDrawable->x + pDrawable->width; pixbounds.y2 = pDrawable->y + pDrawable->height; if (pGC->freeCompClip) { RegionReset(pGC->pCompositeClip, &pixbounds); } else { pGC->freeCompClip = TRUE; pGC->pCompositeClip = RegionCreate(&pixbounds, 1); } if (pGC->clientClip) { if (pDrawable->x || pDrawable->y) { RegionTranslate(pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); RegionIntersect(pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); RegionTranslate(pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } else { RegionTranslate(pGC->pCompositeClip, -pGC->clipOrg.x, -pGC->clipOrg.y); RegionIntersect(pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); RegionTranslate(pGC->pCompositeClip, pGC->clipOrg.x, pGC->clipOrg.y); } } } /* end of composite clip for pixmap */ } /* end miComputeCompositeClip */ xorg-server-21.1.16/mi/miglblt.c0000644000175000017500000002037514757411105012045 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include #include #include "dixfontstr.h" #include "gcstruct.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmap.h" #include "servermd.h" #include "mi.h" /* machine-independent glyph blt. assumes that glyph bits in snf are written in bytes, have same bit order as the server's bitmap format, and are byte padded. this corresponds to the snf distributed with the sample server. get a scratch GC. in the scratch GC set alu = GXcopy, fg = 1, bg = 0 allocate a bitmap big enough to hold the largest glyph in the font validate the scratch gc with the bitmap for each glyph carefully put the bits of the glyph in a buffer, padded to the server pixmap scanline padding rules fake a call to PutImage from the buffer into the bitmap use the bitmap in a call to PushPixels */ void miPolyGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, /* array of character info */ void *pglyphBase /* start of array of glyphs */ ) { int width, height; PixmapPtr pPixmap; int nbyLine; /* bytes per line of padded pixmap */ FontPtr pfont; GCPtr pGCtmp; int i; int j; unsigned char *pbits; /* buffer for PutImage */ unsigned char *pb; /* temp pointer into buffer */ CharInfoPtr pci; /* current char info */ unsigned char *pglyph; /* pointer bits in glyph */ int gWidth, gHeight; /* width and height of glyph */ int nbyGlyphWidth; /* bytes per scanline of glyph */ int nbyPadGlyph; /* server padded line of glyph */ ChangeGCVal gcvals[3]; if (pGC->miTranslate) { x += pDrawable->x; y += pDrawable->y; } pfont = pGC->font; width = FONTMAXBOUNDS(pfont, rightSideBearing) - FONTMINBOUNDS(pfont, leftSideBearing); height = FONTMAXBOUNDS(pfont, ascent) + FONTMAXBOUNDS(pfont, descent); pPixmap = (*pDrawable->pScreen->CreatePixmap) (pDrawable->pScreen, width, height, 1, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) return; pGCtmp = GetScratchGC(1, pDrawable->pScreen); if (!pGCtmp) { (*pDrawable->pScreen->DestroyPixmap) (pPixmap); return; } gcvals[0].val = GXcopy; gcvals[1].val = 1; gcvals[2].val = 0; ChangeGC(NullClient, pGCtmp, GCFunction | GCForeground | GCBackground, gcvals); nbyLine = BitmapBytePad(width); pbits = xallocarray(height, nbyLine); if (!pbits) { (*pDrawable->pScreen->DestroyPixmap) (pPixmap); FreeScratchGC(pGCtmp); return; } while (nglyph--) { pci = *ppci++; pglyph = FONTGLYPHBITS(pglyphBase, pci); gWidth = GLYPHWIDTHPIXELS(pci); gHeight = GLYPHHEIGHTPIXELS(pci); if (gWidth && gHeight) { nbyGlyphWidth = GLYPHWIDTHBYTESPADDED(pci); nbyPadGlyph = BitmapBytePad(gWidth); if (nbyGlyphWidth == nbyPadGlyph #if GLYPHPADBYTES != 4 && (((int) pglyph) & 3) == 0 #endif ) { pb = pglyph; } else { for (i = 0, pb = pbits; i < gHeight; i++, pb = pbits + (i * nbyPadGlyph)) for (j = 0; j < nbyGlyphWidth; j++) *pb++ = *pglyph++; pb = pbits; } if ((pGCtmp->serialNumber) != (pPixmap->drawable.serialNumber)) ValidateGC((DrawablePtr) pPixmap, pGCtmp); (*pGCtmp->ops->PutImage) ((DrawablePtr) pPixmap, pGCtmp, pPixmap->drawable.depth, 0, 0, gWidth, gHeight, 0, XYBitmap, (char *) pb); (*pGC->ops->PushPixels) (pGC, pPixmap, pDrawable, gWidth, gHeight, x + pci->metrics.leftSideBearing, y - pci->metrics.ascent); } x += pci->metrics.characterWidth; } (*pDrawable->pScreen->DestroyPixmap) (pPixmap); free(pbits); FreeScratchGC(pGCtmp); } void miImageGlyphBlt(DrawablePtr pDrawable, GC * pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, /* array of character info */ void *pglyphBase /* start of array of glyphs */ ) { ExtentInfoRec info; /* used by xfont2_query_glyph_extents() */ ChangeGCVal gcvals[3]; int oldAlu, oldFS; unsigned long oldFG; xRectangle backrect; xfont2_query_glyph_extents(pGC->font, ppci, (unsigned long) nglyph, &info); if (info.overallWidth >= 0) { backrect.x = x; backrect.width = info.overallWidth; } else { backrect.x = x + info.overallWidth; backrect.width = -info.overallWidth; } backrect.y = y - FONTASCENT(pGC->font); backrect.height = FONTASCENT(pGC->font) + FONTDESCENT(pGC->font); oldAlu = pGC->alu; oldFG = pGC->fgPixel; oldFS = pGC->fillStyle; /* fill in the background */ gcvals[0].val = GXcopy; gcvals[1].val = pGC->bgPixel; gcvals[2].val = FillSolid; ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &backrect); /* put down the glyphs */ gcvals[0].val = oldFG; ChangeGC(NullClient, pGC, GCForeground, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); /* put all the toys away when done playing */ gcvals[0].val = oldAlu; gcvals[1].val = oldFG; gcvals[2].val = oldFS; ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); } xorg-server-21.1.16/mi/mioverlay.c0000644000175000017500000016310314757411105012417 #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "scrnintstr.h" #include #include "validate.h" #include "windowstr.h" #include "mi.h" #include "gcstruct.h" #include "regionstr.h" #include "privates.h" #include "mivalidate.h" #include "mioverlay.h" #include "migc.h" #include "globals.h" typedef struct { RegionRec exposed; RegionRec borderExposed; RegionPtr borderVisible; DDXPointRec oldAbsCorner; } miOverlayValDataRec, *miOverlayValDataPtr; typedef struct _TreeRec { WindowPtr pWin; struct _TreeRec *parent; struct _TreeRec *firstChild; struct _TreeRec *lastChild; struct _TreeRec *prevSib; struct _TreeRec *nextSib; RegionRec borderClip; RegionRec clipList; unsigned visibility; miOverlayValDataPtr valdata; } miOverlayTreeRec, *miOverlayTreePtr; typedef struct { miOverlayTreePtr tree; } miOverlayWindowRec, *miOverlayWindowPtr; typedef struct { CloseScreenProcPtr CloseScreen; CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; UnrealizeWindowProcPtr UnrealizeWindow; RealizeWindowProcPtr RealizeWindow; miOverlayTransFunc MakeTransparent; miOverlayInOverlayFunc InOverlay; Bool underlayMarked; Bool copyUnderlay; } miOverlayScreenRec, *miOverlayScreenPtr; static DevPrivateKeyRec miOverlayWindowKeyRec; #define miOverlayWindowKey (&miOverlayWindowKeyRec) static DevPrivateKeyRec miOverlayScreenKeyRec; #define miOverlayScreenKey (&miOverlayScreenKeyRec) static void RebuildTree(WindowPtr); static Bool HasUnderlayChildren(WindowPtr); static void MarkUnderlayWindow(WindowPtr); static Bool CollectUnderlayChildrenRegions(WindowPtr, RegionPtr); static Bool miOverlayCloseScreen(ScreenPtr); static Bool miOverlayCreateWindow(WindowPtr); static Bool miOverlayDestroyWindow(WindowPtr); static Bool miOverlayUnrealizeWindow(WindowPtr); static Bool miOverlayRealizeWindow(WindowPtr); static void miOverlayMarkWindow(WindowPtr); static void miOverlayReparentWindow(WindowPtr, WindowPtr); static void miOverlayRestackWindow(WindowPtr, WindowPtr); static Bool miOverlayMarkOverlappedWindows(WindowPtr, WindowPtr, WindowPtr *); static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool); static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind); static void miOverlayHandleExposures(WindowPtr); static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind); static void miOverlayWindowExposures(WindowPtr, RegionPtr); static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, unsigned int, WindowPtr); static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool); static void miOverlaySetShape(WindowPtr, int); static void miOverlayChangeBorderWidth(WindowPtr, unsigned int); #define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) ((miOverlayScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, miOverlayScreenKey)) #define MIOVERLAY_GET_WINDOW_PRIVATE(pWin) ((miOverlayWindowPtr) \ dixLookupPrivate(&(pWin)->devPrivates, miOverlayWindowKey)) #define MIOVERLAY_GET_WINDOW_TREE(pWin) \ (MIOVERLAY_GET_WINDOW_PRIVATE(pWin)->tree) #define IN_UNDERLAY(w) MIOVERLAY_GET_WINDOW_TREE(w) #define IN_OVERLAY(w) !MIOVERLAY_GET_WINDOW_TREE(w) #define MARK_OVERLAY(w) miMarkWindow(w) #define MARK_UNDERLAY(w) MarkUnderlayWindow(w) #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) Bool miInitOverlay(ScreenPtr pScreen, miOverlayInOverlayFunc inOverlayFunc, miOverlayTransFunc transFunc) { miOverlayScreenPtr pScreenPriv; if (!inOverlayFunc || !transFunc) return FALSE; if (!dixRegisterPrivateKey (&miOverlayWindowKeyRec, PRIVATE_WINDOW, sizeof(miOverlayWindowRec))) return FALSE; if (!dixRegisterPrivateKey(&miOverlayScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!(pScreenPriv = malloc(sizeof(miOverlayScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, miOverlayScreenKey, pScreenPriv); pScreenPriv->InOverlay = inOverlayFunc; pScreenPriv->MakeTransparent = transFunc; pScreenPriv->underlayMarked = FALSE; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreenPriv->CreateWindow = pScreen->CreateWindow; pScreenPriv->DestroyWindow = pScreen->DestroyWindow; pScreenPriv->UnrealizeWindow = pScreen->UnrealizeWindow; pScreenPriv->RealizeWindow = pScreen->RealizeWindow; pScreen->CloseScreen = miOverlayCloseScreen; pScreen->CreateWindow = miOverlayCreateWindow; pScreen->DestroyWindow = miOverlayDestroyWindow; pScreen->UnrealizeWindow = miOverlayUnrealizeWindow; pScreen->RealizeWindow = miOverlayRealizeWindow; pScreen->ReparentWindow = miOverlayReparentWindow; pScreen->RestackWindow = miOverlayRestackWindow; pScreen->MarkOverlappedWindows = miOverlayMarkOverlappedWindows; pScreen->MarkUnrealizedWindow = miOverlayMarkUnrealizedWindow; pScreen->ValidateTree = miOverlayValidateTree; pScreen->HandleExposures = miOverlayHandleExposures; pScreen->MoveWindow = miOverlayMoveWindow; pScreen->WindowExposures = miOverlayWindowExposures; pScreen->ResizeWindow = miOverlayResizeWindow; pScreen->MarkWindow = miOverlayMarkWindow; pScreen->ClearToBackground = miOverlayClearToBackground; pScreen->SetShape = miOverlaySetShape; pScreen->ChangeBorderWidth = miOverlayChangeBorderWidth; return TRUE; } static Bool miOverlayCloseScreen(ScreenPtr pScreen) { miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->CreateWindow = pScreenPriv->CreateWindow; pScreen->DestroyWindow = pScreenPriv->DestroyWindow; pScreen->UnrealizeWindow = pScreenPriv->UnrealizeWindow; pScreen->RealizeWindow = pScreenPriv->RealizeWindow; free(pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } static Bool miOverlayCreateWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); miOverlayWindowPtr pWinPriv = MIOVERLAY_GET_WINDOW_PRIVATE(pWin); miOverlayTreePtr pTree = NULL; Bool result = TRUE; pWinPriv->tree = NULL; if (!pWin->parent || !((*pScreenPriv->InOverlay) (pWin))) { if (!(pTree = (miOverlayTreePtr) calloc(1, sizeof(miOverlayTreeRec)))) return FALSE; } if (pScreenPriv->CreateWindow) { pScreen->CreateWindow = pScreenPriv->CreateWindow; result = (*pScreen->CreateWindow) (pWin); pScreen->CreateWindow = miOverlayCreateWindow; } if (pTree) { if (result) { pTree->pWin = pWin; pTree->visibility = VisibilityNotViewable; pWinPriv->tree = pTree; if (pWin->parent) { RegionNull(&(pTree->borderClip)); RegionNull(&(pTree->clipList)); RebuildTree(pWin); } else { BoxRec fullBox; fullBox.x1 = 0; fullBox.y1 = 0; fullBox.x2 = pScreen->width; fullBox.y2 = pScreen->height; RegionInit(&(pTree->borderClip), &fullBox, 1); RegionInit(&(pTree->clipList), &fullBox, 1); } } else free(pTree); } return TRUE; } static Bool miOverlayDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); Bool result = TRUE; if (pTree) { if (pTree->prevSib) pTree->prevSib->nextSib = pTree->nextSib; else if (pTree->parent) pTree->parent->firstChild = pTree->nextSib; if (pTree->nextSib) pTree->nextSib->prevSib = pTree->prevSib; else if (pTree->parent) pTree->parent->lastChild = pTree->prevSib; RegionUninit(&(pTree->borderClip)); RegionUninit(&(pTree->clipList)); free(pTree); } if (pScreenPriv->DestroyWindow) { pScreen->DestroyWindow = pScreenPriv->DestroyWindow; result = (*pScreen->DestroyWindow) (pWin); pScreen->DestroyWindow = miOverlayDestroyWindow; } return result; } static Bool miOverlayUnrealizeWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); Bool result = TRUE; if (pTree) pTree->visibility = VisibilityNotViewable; if (pScreenPriv->UnrealizeWindow) { pScreen->UnrealizeWindow = pScreenPriv->UnrealizeWindow; result = (*pScreen->UnrealizeWindow) (pWin); pScreen->UnrealizeWindow = miOverlayUnrealizeWindow; } return result; } static Bool miOverlayRealizeWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); Bool result = TRUE; if (pScreenPriv->RealizeWindow) { pScreen->RealizeWindow = pScreenPriv->RealizeWindow; result = (*pScreen->RealizeWindow) (pWin); pScreen->RealizeWindow = miOverlayRealizeWindow; } /* we only need to catch the root window realization */ if (result && !pWin->parent && !((*pScreenPriv->InOverlay) (pWin))) { BoxRec box; box.x1 = box.y1 = 0; box.x2 = pWin->drawable.width; box.y2 = pWin->drawable.height; (*pScreenPriv->MakeTransparent) (pScreen, 1, &box); } return result; } static void miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) { if (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) { /* This could probably be more optimal */ RebuildTree(pWin->drawable.pScreen->root->firstChild); } } static void miOverlayRestackWindow(WindowPtr pWin, WindowPtr oldNextSib) { if (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) { /* This could probably be more optimal */ RebuildTree(pWin); } } static Bool miOverlayMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *pLayerWin) { WindowPtr pChild, pLast; Bool overMarked, underMarked, doUnderlay, markAll; miOverlayTreePtr pTree = NULL, tLast, tChild; BoxPtr box; overMarked = underMarked = markAll = FALSE; if (pLayerWin) *pLayerWin = pWin; /* hah! */ doUnderlay = (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)); box = RegionExtents(&pWin->borderSize); if ((pChild = pFirst)) { pLast = pChild->parent->lastChild; while (1) { if (pChild == pWin) markAll = TRUE; if (doUnderlay && IN_UNDERLAY(pChild)) pTree = MIOVERLAY_GET_WINDOW_TREE(pChild); if (pChild->viewable) { if (RegionBroken(&pChild->winSize)) SetWinSize(pChild); if (RegionBroken(&pChild->borderSize)) SetBorderSize(pChild); if (markAll || RegionContainsRect(&pChild->borderSize, box)) { MARK_OVERLAY(pChild); overMarked = TRUE; if (doUnderlay && IN_UNDERLAY(pChild)) { MARK_UNDERLAY(pChild); underMarked = TRUE; } if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } } while (!pChild->nextSib && (pChild != pLast)) { pChild = pChild->parent; if (doUnderlay && IN_UNDERLAY(pChild)) pTree = MIOVERLAY_GET_WINDOW_TREE(pChild); } if (pChild == pWin) markAll = FALSE; if (pChild == pLast) break; pChild = pChild->nextSib; } if (overMarked) MARK_OVERLAY(pWin->parent); } if (doUnderlay && !pTree) { if (!(pTree = MIOVERLAY_GET_WINDOW_TREE(pWin))) { pChild = pWin->lastChild; while (1) { if ((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) break; if (pChild->lastChild) { pChild = pChild->lastChild; continue; } while (!pChild->prevSib) pChild = pChild->parent; pChild = pChild->prevSib; } } } if (pTree && pTree->nextSib) { tChild = pTree->parent->lastChild; tLast = pTree->nextSib; while (1) { if (tChild->pWin->viewable) { if (RegionBroken(&tChild->pWin->winSize)) SetWinSize(tChild->pWin); if (RegionBroken(&tChild->pWin->borderSize)) SetBorderSize(tChild->pWin); if (RegionContainsRect(&(tChild->pWin->borderSize), box)) { MARK_UNDERLAY(tChild->pWin); underMarked = TRUE; } } if (tChild->lastChild) { tChild = tChild->lastChild; continue; } while (!tChild->prevSib && (tChild != tLast)) tChild = tChild->parent; if (tChild == tLast) break; tChild = tChild->prevSib; } } if (underMarked) { ScreenPtr pScreen = pWin->drawable.pScreen; MARK_UNDERLAY(pTree->parent->pWin); MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE; } return underMarked || overMarked; } static void miOverlayComputeClips(WindowPtr pParent, RegionPtr universe, VTKind kind, RegionPtr exposed) { ScreenPtr pScreen = pParent->drawable.pScreen; int oldVis, newVis, dx, dy; BoxRec borderSize; RegionPtr borderVisible; RegionRec childUniverse, childUnion; miOverlayTreePtr tParent = MIOVERLAY_GET_WINDOW_TREE(pParent); miOverlayTreePtr tChild; Bool overlap; borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); if (dx > 32767) dx = 32767; borderSize.x2 = dx; dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); if (dy > 32767) dy = 32767; borderSize.y2 = dy; oldVis = tParent->visibility; switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnPART: newVis = VisibilityPartiallyObscured; { RegionPtr pBounding; if ((pBounding = wBoundingShape(pParent))) { switch (miShapedWindowIn(universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnOUT: newVis = VisibilityFullyObscured; break; } } } break; default: newVis = VisibilityFullyObscured; break; } tParent->visibility = newVis; dx = pParent->drawable.x - tParent->valdata->oldAbsCorner.x; dy = pParent->drawable.y - tParent->valdata->oldAbsCorner.y; switch (kind) { case VTMap: case VTStack: case VTUnmap: break; case VTMove: if ((oldVis == newVis) && ((oldVis == VisibilityFullyObscured) || (oldVis == VisibilityUnobscured))) { tChild = tParent; while (1) { if (tChild->pWin->viewable) { if (tChild->visibility != VisibilityFullyObscured) { RegionTranslate(&tChild->borderClip, dx, dy); RegionTranslate(&tChild->clipList, dx, dy); tChild->pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (tChild->pWin, dx, dy); } if (tChild->valdata) { RegionNull(&tChild->valdata->borderExposed); if (HasParentRelativeBorder(tChild->pWin)) { RegionSubtract(&tChild->valdata->borderExposed, &tChild->borderClip, &tChild->pWin->winSize); } RegionNull(&tChild->valdata->exposed); } if (tChild->firstChild) { tChild = tChild->firstChild; continue; } } while (!tChild->nextSib && (tChild != tParent)) tChild = tChild->parent; if (tChild == tParent) break; tChild = tChild->nextSib; } return; } /* fall through */ default: if (dx || dy) { RegionTranslate(&tParent->borderClip, dx, dy); RegionTranslate(&tParent->clipList, dx, dy); } break; case VTBroken: RegionEmpty(&tParent->borderClip); RegionEmpty(&tParent->clipList); break; } borderVisible = tParent->valdata->borderVisible; RegionNull(&tParent->valdata->borderExposed); RegionNull(&tParent->valdata->exposed); if (HasBorder(pParent)) { if (borderVisible) { RegionSubtract(exposed, universe, borderVisible); RegionDestroy(borderVisible); } else RegionSubtract(exposed, universe, &tParent->borderClip); if (HasParentRelativeBorder(pParent) && (dx || dy)) RegionSubtract(&tParent->valdata->borderExposed, universe, &pParent->winSize); else RegionSubtract(&tParent->valdata->borderExposed, exposed, &pParent->winSize); RegionCopy(&tParent->borderClip, universe); RegionIntersect(universe, universe, &pParent->winSize); } else RegionCopy(&tParent->borderClip, universe); if ((tChild = tParent->firstChild) && pParent->mapped) { RegionNull(&childUniverse); RegionNull(&childUnion); for (; tChild; tChild = tChild->nextSib) { if (tChild->pWin->viewable) RegionAppend(&childUnion, &tChild->pWin->borderSize); } RegionValidate(&childUnion, &overlap); for (tChild = tParent->firstChild; tChild; tChild = tChild->nextSib) { if (tChild->pWin->viewable) { if (tChild->valdata) { RegionIntersect(&childUniverse, universe, &tChild->pWin->borderSize); miOverlayComputeClips(tChild->pWin, &childUniverse, kind, exposed); } if (overlap) RegionSubtract(universe, universe, &tChild->pWin->borderSize); } } if (!overlap) RegionSubtract(universe, universe, &childUnion); RegionUninit(&childUnion); RegionUninit(&childUniverse); } if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { RegionCopy(&tParent->valdata->exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { RegionSubtract(&tParent->valdata->exposed, universe, &tParent->clipList); } /* HACK ALERT - copying contents of regions, instead of regions */ { RegionRec tmp; tmp = tParent->clipList; tParent->clipList = *universe; *universe = tmp; } pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, dx, dy); } static void miOverlayMarkWindow(WindowPtr pWin) { miOverlayTreePtr pTree = NULL; WindowPtr pChild, pGrandChild; miMarkWindow(pWin); /* look for UnmapValdata among immediate children */ if (!(pChild = pWin->firstChild)) return; for (; pChild; pChild = pChild->nextSib) { if (pChild->valdata == UnmapValData) { if (IN_UNDERLAY(pChild)) { pTree = MIOVERLAY_GET_WINDOW_TREE(pChild); pTree->valdata = (miOverlayValDataPtr) UnmapValData; continue; } else { if (!(pGrandChild = pChild->firstChild)) continue; while (1) { if (IN_UNDERLAY(pGrandChild)) { pTree = MIOVERLAY_GET_WINDOW_TREE(pGrandChild); pTree->valdata = (miOverlayValDataPtr) UnmapValData; } else if (pGrandChild->firstChild) { pGrandChild = pGrandChild->firstChild; continue; } while (!pGrandChild->nextSib && (pGrandChild != pChild)) pGrandChild = pGrandChild->parent; if (pChild == pGrandChild) break; pGrandChild = pGrandChild->nextSib; } } } } if (pTree) { MARK_UNDERLAY(pTree->parent->pWin); MIOVERLAY_GET_SCREEN_PRIVATE(pWin->drawable.pScreen)->underlayMarked = TRUE; } } static void miOverlayMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) { if ((pChild != pWin) || fromConfigure) { miOverlayTreePtr pTree; RegionEmpty(&pChild->clipList); if (pChild->drawable.pScreen->ClipNotify) (*pChild->drawable.pScreen->ClipNotify) (pChild, 0, 0); RegionEmpty(&pChild->borderClip); if ((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) { if (pTree->valdata != (miOverlayValDataPtr) UnmapValData) { RegionEmpty(&pTree->clipList); RegionEmpty(&pTree->borderClip); } } } } static int miOverlayValidateTree(WindowPtr pParent, WindowPtr pChild, /* first child effected */ VTKind kind) { ScreenPtr pScreen = pParent->drawable.pScreen; miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); RegionRec totalClip, childClip, exposed; miOverlayTreePtr tParent, tChild, tWin; Bool overlap; WindowPtr newParent; if (!pPriv->underlayMarked) goto SKIP_UNDERLAY; if (!pChild) pChild = pParent->firstChild; RegionNull(&totalClip); RegionNull(&childClip); RegionNull(&exposed); newParent = pParent; while (IN_OVERLAY(newParent)) newParent = newParent->parent; tParent = MIOVERLAY_GET_WINDOW_TREE(newParent); if (IN_UNDERLAY(pChild)) tChild = MIOVERLAY_GET_WINDOW_TREE(pChild); else tChild = tParent->firstChild; if (RegionBroken(&tParent->clipList) && !RegionBroken(&tParent->borderClip)) { kind = VTBroken; RegionCopy(&totalClip, &tParent->borderClip); RegionIntersect(&totalClip, &totalClip, &tParent->pWin->winSize); for (tWin = tParent->firstChild; tWin != tChild; tWin = tWin->nextSib) { if (tWin->pWin->viewable) RegionSubtract(&totalClip, &totalClip, &tWin->pWin->borderSize); } RegionEmpty(&tParent->clipList); } else { for (tWin = tChild; tWin; tWin = tWin->nextSib) { if (tWin->valdata) RegionAppend(&totalClip, &tWin->borderClip); } RegionValidate(&totalClip, &overlap); } if (kind != VTStack) RegionUnion(&totalClip, &totalClip, &tParent->clipList); for (tWin = tChild; tWin; tWin = tWin->nextSib) { if (tWin->valdata) { if (tWin->pWin->viewable) { RegionIntersect(&childClip, &totalClip, &tWin->pWin->borderSize); miOverlayComputeClips(tWin->pWin, &childClip, kind, &exposed); RegionSubtract(&totalClip, &totalClip, &tWin->pWin->borderSize); } else { /* Means we are unmapping */ RegionEmpty(&tWin->clipList); RegionEmpty(&tWin->borderClip); tWin->valdata = NULL; } } } RegionUninit(&childClip); if (!((*pPriv->InOverlay) (newParent))) { RegionNull(&tParent->valdata->exposed); RegionNull(&tParent->valdata->borderExposed); } switch (kind) { case VTStack: break; default: if (!((*pPriv->InOverlay) (newParent))) RegionSubtract(&tParent->valdata->exposed, &totalClip, &tParent->clipList); /* fall through */ case VTMap: RegionCopy(&tParent->clipList, &totalClip); if (!((*pPriv->InOverlay) (newParent))) newParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; break; } RegionUninit(&totalClip); RegionUninit(&exposed); SKIP_UNDERLAY: miValidateTree(pParent, pChild, kind); return 1; } static void miOverlayHandleExposures(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); WindowPtr pChild; ValidatePtr val; WindowExposuresProcPtr WindowExposures; WindowExposures = pWin->drawable.pScreen->WindowExposures; if (pPriv->underlayMarked) { miOverlayTreePtr pTree; miOverlayValDataPtr mival; pChild = pWin; while (IN_OVERLAY(pChild)) pChild = pChild->parent; pTree = MIOVERLAY_GET_WINDOW_TREE(pChild); while (1) { if ((mival = pTree->valdata)) { if (!((*pPriv->InOverlay) (pTree->pWin))) { if (RegionNotEmpty(&mival->borderExposed)) { pScreen->PaintWindow(pTree->pWin, &mival->borderExposed, PW_BORDER); } RegionUninit(&mival->borderExposed); (*WindowExposures) (pTree->pWin, &mival->exposed); RegionUninit(&mival->exposed); } free(mival); pTree->valdata = NULL; if (pTree->firstChild) { pTree = pTree->firstChild; continue; } } while (!pTree->nextSib && (pTree->pWin != pChild)) pTree = pTree->parent; if (pTree->pWin == pChild) break; pTree = pTree->nextSib; } pPriv->underlayMarked = FALSE; } pChild = pWin; while (1) { if ((val = pChild->valdata)) { if (!((*pPriv->InOverlay) (pChild))) { RegionUnion(&val->after.exposed, &val->after.exposed, &val->after.borderExposed); if (RegionNotEmpty(&val->after.exposed)) { (*(MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->MakeTransparent)) (pScreen, RegionNumRects(&val->after.exposed), RegionRects(&val->after.exposed)); } } else { if (RegionNotEmpty(&val->after.borderExposed)) { pScreen->PaintWindow(pChild, &val->after.borderExposed, PW_BORDER); } (*WindowExposures) (pChild, &val->after.exposed); } RegionUninit(&val->after.borderExposed); RegionUninit(&val->after.exposed); free(val); pChild->valdata = NULL; if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } } static void miOverlayMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) { ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); WindowPtr pParent, windowToValidate; Bool WasViewable = (Bool) (pWin->viewable); short bw; RegionRec overReg, underReg; DDXPointRec oldpt; if (!(pParent = pWin->parent)) return; bw = wBorderWidth(pWin); oldpt.x = pWin->drawable.x; oldpt.y = pWin->drawable.y; if (WasViewable) { RegionNull(&overReg); RegionNull(&underReg); if (pTree) { RegionCopy(&overReg, &pWin->borderClip); RegionCopy(&underReg, &pTree->borderClip); } else { RegionCopy(&overReg, &pWin->borderClip); CollectUnderlayChildrenRegions(pWin, &underReg); } (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); } pWin->origin.x = x + (int) bw; pWin->origin.y = y + (int) bw; x = pWin->drawable.x = pParent->drawable.x + x + (int) bw; y = pWin->drawable.y = pParent->drawable.y + y + (int) bw; SetWinSize(pWin); SetBorderSize(pWin); (*pScreen->PositionWindow) (pWin, x, y); windowToValidate = MoveWindowInStack(pWin, pNextSib); ResizeChildrenWinSize(pWin, x - oldpt.x, y - oldpt.y, 0, 0); if (WasViewable) { miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL); (*pScreen->ValidateTree) (pWin->parent, NullWindow, kind); if (RegionNotEmpty(&underReg)) { pPriv->copyUnderlay = TRUE; (*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, &underReg); } RegionUninit(&underReg); if (RegionNotEmpty(&overReg)) { pPriv->copyUnderlay = FALSE; (*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, &overReg); } RegionUninit(&overReg); (*pScreen->HandleExposures) (pWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pWin->parent, NullWindow, kind); } if (pWin->realized) WindowsRestructured(); } #ifndef RECTLIMIT #define RECTLIMIT 25 #endif static void miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn) { RegionPtr exposures = prgn; ScreenPtr pScreen = pWin->drawable.pScreen; if (prgn && !RegionNil(prgn)) { RegionRec expRec; int clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask; if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) { miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); BoxRec box; box = *RegionExtents(prgn); exposures = &expRec; RegionInit(exposures, &box, 1); RegionReset(prgn, &box); /* This is the only reason why we are replacing mi's version of this file */ if (!((*pPriv->InOverlay) (pWin))) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionIntersect(prgn, prgn, &pTree->clipList); } else RegionIntersect(prgn, prgn, &pWin->clipList); } pScreen->PaintWindow(pWin, prgn, PW_BACKGROUND); if (clientInterested) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); if (exposures == &expRec) RegionUninit(exposures); RegionEmpty(prgn); } } typedef struct { RegionPtr over; RegionPtr under; } miOverlayTwoRegions; static int miOverlayRecomputeExposures(WindowPtr pWin, void *value) { miOverlayTwoRegions *pValid = (miOverlayTwoRegions *) value; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); if (pWin->valdata) { /* * compute exposed regions of this window */ RegionSubtract(&pWin->valdata->after.exposed, &pWin->clipList, pValid->over); /* * compute exposed regions of the border */ RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->borderClip, &pWin->winSize); RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->valdata->after.borderExposed, pValid->over); } if (pTree && pTree->valdata) { RegionSubtract(&pTree->valdata->exposed, &pTree->clipList, pValid->under); RegionSubtract(&pTree->valdata->borderExposed, &pTree->borderClip, &pWin->winSize); RegionSubtract(&pTree->valdata->borderExposed, &pTree->valdata->borderExposed, pValid->under); } else if (!pWin->valdata) return WT_NOMATCH; return WT_WALKCHILDREN; } static void miOverlayResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pParent; miOverlayTreePtr tChild, pTree; Bool WasViewable = (Bool) (pWin->viewable); unsigned short width = pWin->drawable.width; unsigned short height = pWin->drawable.height; short oldx = pWin->drawable.x; short oldy = pWin->drawable.y; int bw = wBorderWidth(pWin); short dw, dh; DDXPointRec oldpt; RegionPtr oldRegion = NULL, oldRegion2 = NULL; WindowPtr pFirstChange; WindowPtr pChild; RegionPtr gravitate[StaticGravity + 1]; RegionPtr gravitate2[StaticGravity + 1]; unsigned g; int nx, ny; /* destination x,y */ int newx, newy; /* new inner window position */ RegionPtr pRegion = NULL; RegionPtr destClip, destClip2; RegionPtr oldWinClip = NULL, oldWinClip2 = NULL; RegionPtr borderVisible = NullRegion; RegionPtr borderVisible2 = NullRegion; Bool shrunk = FALSE; /* shrunk in an inner dimension */ Bool moved = FALSE; /* window position changed */ Bool doUnderlay; /* if this is a root window, can't be resized */ if (!(pParent = pWin->parent)) return; pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); doUnderlay = ((pTree) || HasUnderlayChildren(pWin)); newx = pParent->drawable.x + x + bw; newy = pParent->drawable.y + y + bw; if (WasViewable) { /* * save the visible region of the window */ oldRegion = RegionCreate(NullBox, 1); RegionCopy(oldRegion, &pWin->winSize); if (doUnderlay) { oldRegion2 = RegionCreate(NullBox, 1); RegionCopy(oldRegion2, &pWin->winSize); } /* * categorize child windows into regions to be moved */ for (g = 0; g <= StaticGravity; g++) gravitate[g] = gravitate2[g] = NULL; for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { g = pChild->winGravity; if (g != UnmapGravity) { if (!gravitate[g]) gravitate[g] = RegionCreate(NullBox, 1); RegionUnion(gravitate[g], gravitate[g], &pChild->borderClip); if (doUnderlay) { if (!gravitate2[g]) gravitate2[g] = RegionCreate(NullBox, 0); if ((tChild = MIOVERLAY_GET_WINDOW_TREE(pChild))) { RegionUnion(gravitate2[g], gravitate2[g], &tChild->borderClip); } else CollectUnderlayChildrenRegions(pChild, gravitate2[g]); } } else { UnmapWindow(pChild, TRUE); } } (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); oldWinClip = oldWinClip2 = NULL; if (pWin->bitGravity != ForgetGravity) { oldWinClip = RegionCreate(NullBox, 1); RegionCopy(oldWinClip, &pWin->clipList); if (pTree) { oldWinClip2 = RegionCreate(NullBox, 1); RegionCopy(oldWinClip2, &pTree->clipList); } } /* * if the window is changing size, borderExposed * can't be computed correctly without some help. */ if (pWin->drawable.height > h || pWin->drawable.width > w) shrunk = TRUE; if (newx != oldx || newy != oldy) moved = TRUE; if ((pWin->drawable.height != h || pWin->drawable.width != w) && HasBorder(pWin)) { borderVisible = RegionCreate(NullBox, 1); if (pTree) borderVisible2 = RegionCreate(NullBox, 1); /* for tiled borders, we punt and draw the whole thing */ if (pWin->borderIsPixel || !moved) { if (shrunk || moved) RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); else RegionCopy(borderVisible, &pWin->borderClip); if (pTree) { if (shrunk || moved) RegionSubtract(borderVisible, &pTree->borderClip, &pWin->winSize); else RegionCopy(borderVisible, &pTree->borderClip); } } } } pWin->origin.x = x + bw; pWin->origin.y = y + bw; pWin->drawable.height = h; pWin->drawable.width = w; x = pWin->drawable.x = newx; y = pWin->drawable.y = newy; SetWinSize(pWin); SetBorderSize(pWin); dw = (int) w - (int) width; dh = (int) h - (int) height; ResizeChildrenWinSize(pWin, x - oldx, y - oldy, dw, dh); /* let the hardware adjust background and border pixmaps, if any */ (*pScreen->PositionWindow) (pWin, x, y); pFirstChange = MoveWindowInStack(pWin, pSib); if (WasViewable) { pRegion = RegionCreate(NullBox, 1); (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange, NULL); pWin->valdata->before.resized = TRUE; pWin->valdata->before.borderVisible = borderVisible; if (pTree) pTree->valdata->borderVisible = borderVisible2; (*pScreen->ValidateTree) (pWin->parent, pFirstChange, VTOther); /* * the entire window is trashed unless bitGravity * recovers portions of it */ RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList); if (pTree) RegionCopy(&pTree->valdata->exposed, &pTree->clipList); } GravityTranslate(x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny); if (WasViewable) { miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); miOverlayTwoRegions TwoRegions; /* avoid the border */ if (HasBorder(pWin)) { int offx, offy, dx, dy; /* kruft to avoid double translates for each gravity */ offx = 0; offy = 0; for (g = 0; g <= StaticGravity; g++) { if (!gravitate[g] && !gravitate2[g]) continue; /* align winSize to gravitate[g]. * winSize is in new coordinates, * gravitate[g] is still in old coordinates */ GravityTranslate(x, y, oldx, oldy, dw, dh, g, &nx, &ny); dx = (oldx - nx) - offx; dy = (oldy - ny) - offy; if (dx || dy) { RegionTranslate(&pWin->winSize, dx, dy); offx += dx; offy += dy; } if (gravitate[g]) RegionIntersect(gravitate[g], gravitate[g], &pWin->winSize); if (gravitate2[g]) RegionIntersect(gravitate2[g], gravitate2[g], &pWin->winSize); } /* get winSize back where it belongs */ if (offx || offy) RegionTranslate(&pWin->winSize, -offx, -offy); } /* * add screen bits to the appropriate bucket */ if (oldWinClip2) { RegionCopy(pRegion, oldWinClip2); RegionTranslate(pRegion, nx - oldx, ny - oldy); RegionIntersect(oldWinClip2, pRegion, &pTree->clipList); for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate2[g]) RegionSubtract(oldWinClip2, oldWinClip2, gravitate2[g]); } RegionTranslate(oldWinClip2, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate2[g]) gravitate2[g] = oldWinClip2; else { RegionUnion(gravitate2[g], gravitate2[g], oldWinClip2); RegionDestroy(oldWinClip2); } } if (oldWinClip) { /* * clip to new clipList */ RegionCopy(pRegion, oldWinClip); RegionTranslate(pRegion, nx - oldx, ny - oldy); RegionIntersect(oldWinClip, pRegion, &pWin->clipList); /* * don't step on any gravity bits which will be copied after this * region. Note -- this assumes that the regions will be copied * in gravity order. */ for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate[g]) RegionSubtract(oldWinClip, oldWinClip, gravitate[g]); } RegionTranslate(oldWinClip, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate[g]) gravitate[g] = oldWinClip; else { RegionUnion(gravitate[g], gravitate[g], oldWinClip); RegionDestroy(oldWinClip); } } /* * move the bits on the screen */ destClip = destClip2 = NULL; for (g = 0; g <= StaticGravity; g++) { if (!gravitate[g] && !gravitate2[g]) continue; GravityTranslate(x, y, oldx, oldy, dw, dh, g, &nx, &ny); oldpt.x = oldx + (x - nx); oldpt.y = oldy + (y - ny); /* Note that gravitate[g] is *translated* by CopyWindow */ /* only copy the remaining useful bits */ if (gravitate[g]) RegionIntersect(gravitate[g], gravitate[g], oldRegion); if (gravitate2[g]) RegionIntersect(gravitate2[g], gravitate2[g], oldRegion2); /* clip to not overwrite already copied areas */ if (destClip && gravitate[g]) { RegionTranslate(destClip, oldpt.x - x, oldpt.y - y); RegionSubtract(gravitate[g], gravitate[g], destClip); RegionTranslate(destClip, x - oldpt.x, y - oldpt.y); } if (destClip2 && gravitate2[g]) { RegionTranslate(destClip2, oldpt.x - x, oldpt.y - y); RegionSubtract(gravitate2[g], gravitate2[g], destClip2); RegionTranslate(destClip2, x - oldpt.x, y - oldpt.y); } /* and move those bits */ if (oldpt.x != x || oldpt.y != y) { if (gravitate2[g]) { pPriv->copyUnderlay = TRUE; (*pScreen->CopyWindow) (pWin, oldpt, gravitate2[g]); } if (gravitate[g]) { pPriv->copyUnderlay = FALSE; (*pScreen->CopyWindow) (pWin, oldpt, gravitate[g]); } } /* remove any overwritten bits from the remaining useful bits */ if (gravitate[g]) RegionSubtract(oldRegion, oldRegion, gravitate[g]); if (gravitate2[g]) RegionSubtract(oldRegion2, oldRegion2, gravitate2[g]); /* * recompute exposed regions of child windows */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->winGravity != g) continue; TwoRegions.over = gravitate[g]; TwoRegions.under = gravitate2[g]; TraverseTree(pChild, miOverlayRecomputeExposures, (void *) (&TwoRegions)); } /* * remove the successfully copied regions of the * window from its exposed region */ if (g == pWin->bitGravity) { if (gravitate[g]) RegionSubtract(&pWin->valdata->after.exposed, &pWin->valdata->after.exposed, gravitate[g]); if (gravitate2[g] && pTree) RegionSubtract(&pTree->valdata->exposed, &pTree->valdata->exposed, gravitate2[g]); } if (gravitate[g]) { if (!destClip) destClip = gravitate[g]; else { RegionUnion(destClip, destClip, gravitate[g]); RegionDestroy(gravitate[g]); } } if (gravitate2[g]) { if (!destClip2) destClip2 = gravitate2[g]; else { RegionUnion(destClip2, destClip2, gravitate2[g]); RegionDestroy(gravitate2[g]); } } } RegionDestroy(pRegion); RegionDestroy(oldRegion); if (doUnderlay) RegionDestroy(oldRegion2); if (destClip) RegionDestroy(destClip); if (destClip2) RegionDestroy(destClip2); (*pScreen->HandleExposures) (pWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pWin->parent, pFirstChange, VTOther); } if (pWin->realized) WindowsRestructured(); } static void miOverlaySetShape(WindowPtr pWin, int kind) { Bool WasViewable = (Bool) (pWin->viewable); ScreenPtr pScreen = pWin->drawable.pScreen; if (kind != ShapeInput) { if (WasViewable) { (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); if (HasBorder(pWin)) { RegionPtr borderVisible; borderVisible = RegionCreate(NullBox, 1); RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; pWin->valdata->before.resized = TRUE; if (IN_UNDERLAY(pWin)) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr borderVisible2; borderVisible2 = RegionCreate(NULL, 1); RegionSubtract(borderVisible2, &pTree->borderClip, &pWin->winSize); pTree->valdata->borderVisible = borderVisible2; } } } SetWinSize(pWin); SetBorderSize(pWin); ResizeChildrenWinSize(pWin, 0, 0, 0, 0); if (WasViewable) { (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); (*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther); (*pScreen->HandleExposures) (pWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pWin->parent, NullWindow, VTOther); } } if (pWin->realized) WindowsRestructured(); CheckCursorConfinement(pWin); } static void miOverlayChangeBorderWidth(WindowPtr pWin, unsigned int width) { int oldwidth; ScreenPtr pScreen; Bool WasViewable = (Bool) (pWin->viewable); Bool HadBorder; oldwidth = wBorderWidth(pWin); if (oldwidth == width) return; HadBorder = HasBorder(pWin); pScreen = pWin->drawable.pScreen; if (WasViewable && (width < oldwidth)) (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); pWin->borderWidth = width; SetBorderSize(pWin); if (WasViewable) { if (width > oldwidth) { (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); if (HadBorder) { RegionPtr borderVisible; borderVisible = RegionCreate(NULL, 1); RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; if (IN_UNDERLAY(pWin)) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr borderVisible2; borderVisible2 = RegionCreate(NULL, 1); RegionSubtract(borderVisible2, &pTree->borderClip, &pWin->winSize); pTree->valdata->borderVisible = borderVisible2; } } } (*pScreen->ValidateTree) (pWin->parent, pWin, VTOther); (*pScreen->HandleExposures) (pWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pWin->parent, pWin, VTOther); } if (pWin->realized) WindowsRestructured(); } /* We need this as an addition since the xf86 common code doesn't know about the second tree which is static to this file. */ void miOverlaySetRootClip(ScreenPtr pScreen, Bool enable) { WindowPtr pRoot = pScreen->root; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot); MARK_UNDERLAY(pRoot); if (enable) { BoxRec box; box.x1 = 0; box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; RegionReset(&pTree->borderClip, &box); } else RegionEmpty(&pTree->borderClip); RegionBreak(&pTree->clipList); } static void miOverlayClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); BoxRec box; RegionRec reg; ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); RegionPtr clipList; BoxPtr extents; int x1, y1, x2, y2; x1 = pWin->drawable.x + x; y1 = pWin->drawable.y + y; if (w) x2 = x1 + (int) w; else x2 = x1 + (int) pWin->drawable.width - (int) x; if (h) y2 = y1 + h; else y2 = y1 + (int) pWin->drawable.height - (int) y; clipList = ((*pScreenPriv->InOverlay) (pWin)) ? &pWin->clipList : &pTree->clipList; extents = RegionExtents(clipList); if (x1 < extents->x1) x1 = extents->x1; if (x2 > extents->x2) x2 = extents->x2; if (y1 < extents->y1) y1 = extents->y1; if (y2 > extents->y2) y2 = extents->y2; if (x2 <= x1 || y2 <= y1) x2 = x1 = y2 = y1 = 0; box.x1 = x1; box.x2 = x2; box.y1 = y1; box.y2 = y2; RegionInit(®, &box, 1); RegionIntersect(®, ®, clipList); if (generateExposures) (*pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) pScreen->PaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); } /****************************************************************/ /* not used */ Bool miOverlayGetPrivateClips(WindowPtr pWin, RegionPtr *borderClip, RegionPtr *clipList) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); if (pTree) { *borderClip = &(pTree->borderClip); *clipList = &(pTree->clipList); return TRUE; } *borderClip = *clipList = NULL; return FALSE; } void miOverlaySetTransFunction(ScreenPtr pScreen, miOverlayTransFunc transFunc) { MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->MakeTransparent = transFunc; } Bool miOverlayCopyUnderlay(ScreenPtr pScreen) { return MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->copyUnderlay; } void miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr pregWin; Bool freeTmpClip, freeCompClip; if (!pTree) { miComputeCompositeClip(pGC, &pWin->drawable); return; } if (pGC->subWindowMode == IncludeInferiors) { pregWin = RegionCreate(NullBox, 1); freeTmpClip = TRUE; if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) || !HasSaverWindow(pGC->pScreen)) { RegionIntersect(pregWin, &pTree->borderClip, &pWin->winSize); } } else { pregWin = &pTree->clipList; freeTmpClip = FALSE; } freeCompClip = pGC->freeCompClip; if (!pGC->clientClip) { if (freeCompClip) RegionDestroy(pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } else { RegionTranslate(pGC->clientClip, pWin->drawable.x + pGC->clipOrg.x, pWin->drawable.y + pGC->clipOrg.y); if (freeCompClip) { RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) RegionDestroy(pregWin); } else if (freeTmpClip) { RegionIntersect(pregWin, pregWin, pGC->clientClip); pGC->pCompositeClip = pregWin; } else { pGC->pCompositeClip = RegionCreate(NullBox, 0); RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; RegionTranslate(pGC->clientClip, -(pWin->drawable.x + pGC->clipOrg.x), -(pWin->drawable.y + pGC->clipOrg.y)); } } Bool miOverlayCollectUnderlayRegions(WindowPtr pWin, RegionPtr *region) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); if (pTree) { *region = &pTree->borderClip; return FALSE; } *region = RegionCreate(NullBox, 0); CollectUnderlayChildrenRegions(pWin, *region); return TRUE; } static miOverlayTreePtr DoLeaf(WindowPtr pWin, miOverlayTreePtr parent, miOverlayTreePtr prevSib) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); pTree->parent = parent; pTree->firstChild = NULL; pTree->lastChild = NULL; pTree->prevSib = prevSib; pTree->nextSib = NULL; if (prevSib) prevSib->nextSib = pTree; if (!parent->firstChild) parent->firstChild = parent->lastChild = pTree; else if (parent->lastChild == prevSib) parent->lastChild = pTree; return pTree; } static void RebuildTree(WindowPtr pWin) { miOverlayTreePtr parent, prevSib, tChild; WindowPtr pChild; prevSib = tChild = NULL; pWin = pWin->parent; while (IN_OVERLAY(pWin)) pWin = pWin->parent; parent = MIOVERLAY_GET_WINDOW_TREE(pWin); pChild = pWin->firstChild; parent->firstChild = parent->lastChild = NULL; while (1) { if (IN_UNDERLAY(pChild)) prevSib = tChild = DoLeaf(pChild, parent, prevSib); if (pChild->firstChild) { if (IN_UNDERLAY(pChild)) { parent = tChild; prevSib = NULL; } pChild = pChild->firstChild; continue; } while (!pChild->nextSib) { pChild = pChild->parent; if (pChild == pWin) return; if (IN_UNDERLAY(pChild)) { prevSib = tChild = MIOVERLAY_GET_WINDOW_TREE(pChild); parent = tChild->parent; } } pChild = pChild->nextSib; } } static Bool HasUnderlayChildren(WindowPtr pWin) { WindowPtr pChild; if (!(pChild = pWin->firstChild)) return FALSE; while (1) { if (IN_UNDERLAY(pChild)) return TRUE; if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pWin != pChild)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } return FALSE; } static Bool CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg) { WindowPtr pChild; miOverlayTreePtr pTree; Bool hasUnderlay; if (!(pChild = pWin->firstChild)) return FALSE; hasUnderlay = FALSE; while (1) { if ((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) { RegionAppend(pReg, &pTree->borderClip); hasUnderlay = TRUE; } else if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pWin != pChild)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } if (hasUnderlay) { Bool overlap; RegionValidate(pReg, &overlap); } return hasUnderlay; } static void MarkUnderlayWindow(WindowPtr pWin) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); if (pTree->valdata) return; pTree->valdata = (miOverlayValDataPtr) xnfalloc(sizeof(miOverlayValDataRec)); pTree->valdata->oldAbsCorner.x = pWin->drawable.x; pTree->valdata->oldAbsCorner.y = pWin->drawable.y; pTree->valdata->borderVisible = NullRegion; } xorg-server-21.1.16/mi/mipointer.c0000644000175000017500000006024414757411105012420 /* Copyright 1989, 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. */ /** * @file * This file contains functions to move the pointer on the screen and/or * restrict its movement. These functions are divided into two sets: * Screen-specific functions that are used as function pointers from other * parts of the server (and end up heavily wrapped by e.g. animcur and * xfixes): * miPointerConstrainCursor * miPointerCursorLimits * miPointerDisplayCursor * miPointerRealizeCursor * miPointerUnrealizeCursor * miPointerSetCursorPosition * miRecolorCursor * miPointerDeviceInitialize * miPointerDeviceCleanup * If wrapped, these are the last element in the wrapping chain. They may * call into sprite-specific code through further function pointers though. * * The second type of functions are those that are directly called by the * DIX, DDX and some drivers. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" #include "mi.h" #include "scrnintstr.h" #include "mipointrst.h" #include "cursorstr.h" #include "dixstruct.h" #include "inputstr.h" #include "inpututils.h" #include "eventstr.h" typedef struct { ScreenPtr pScreen; /* current screen */ ScreenPtr pSpriteScreen; /* screen containing current sprite */ CursorPtr pCursor; /* current cursor */ CursorPtr pSpriteCursor; /* cursor on screen */ BoxRec limits; /* current constraints */ Bool confined; /* pointer can't change screens */ int x, y; /* hot spot location */ int devx, devy; /* sprite position */ Bool generateEvent; /* generate an event during warping? */ } miPointerRec, *miPointerPtr; DevPrivateKeyRec miPointerScreenKeyRec; #define GetScreenPrivate(s) ((miPointerScreenPtr) \ dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey)) #define SetupScreen(s) miPointerScreenPtr pScreenPriv = GetScreenPrivate(s) DevPrivateKeyRec miPointerPrivKeyRec; #define MIPOINTER(dev) \ (IsFloating(dev) ? \ (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ (miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey)) static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox); static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox); static Bool miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent); static Bool miPointerCloseScreen(ScreenPtr pScreen); static void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static InternalEvent *mipointermove_events; /* for WarpPointer MotionNotifies */ Bool miPointerInitialize(ScreenPtr pScreen, miPointerSpriteFuncPtr spriteFuncs, miPointerScreenFuncPtr screenFuncs, Bool waitForUpdate) { miPointerScreenPtr pScreenPriv; if (!dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0)) return FALSE; pScreenPriv = malloc(sizeof(miPointerScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->spriteFuncs = spriteFuncs; pScreenPriv->screenFuncs = screenFuncs; pScreenPriv->waitForUpdate = waitForUpdate; pScreenPriv->showTransparent = FALSE; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miPointerCloseScreen; dixSetPrivate(&pScreen->devPrivates, miPointerScreenKey, pScreenPriv); /* * set up screen cursor method table */ pScreen->ConstrainCursor = miPointerConstrainCursor; pScreen->CursorLimits = miPointerCursorLimits; pScreen->DisplayCursor = miPointerDisplayCursor; pScreen->RealizeCursor = miPointerRealizeCursor; pScreen->UnrealizeCursor = miPointerUnrealizeCursor; pScreen->SetCursorPosition = miPointerSetCursorPosition; pScreen->RecolorCursor = miRecolorCursor; pScreen->DeviceCursorInitialize = miPointerDeviceInitialize; pScreen->DeviceCursorCleanup = miPointerDeviceCleanup; mipointermove_events = NULL; return TRUE; } /** * Destroy screen-specific information. * * @param index Screen index of the screen in screenInfo.screens[] * @param pScreen The actual screen pointer */ static Bool miPointerCloseScreen(ScreenPtr pScreen) { SetupScreen(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; free((void *) pScreenPriv); FreeEventList(mipointermove_events, GetMaximumEventsNum()); mipointermove_events = NULL; return (*pScreen->CloseScreen) (pScreen); } /* * DIX/DDX interface routines */ static Bool miPointerRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { SetupScreen(pScreen); return (*pScreenPriv->spriteFuncs->RealizeCursor) (pDev, pScreen, pCursor); } static Bool miPointerUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { SetupScreen(pScreen); return (*pScreenPriv->spriteFuncs->UnrealizeCursor) (pDev, pScreen, pCursor); } static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miPointerPtr pPointer; /* return for keyboards */ if (!IsPointerDevice(pDev)) return FALSE; pPointer = MIPOINTER(pDev); pPointer->pCursor = pCursor; pPointer->pScreen = pScreen; miPointerUpdateSprite(pDev); return TRUE; } /** * Set up the constraints for the given device. This function does not * actually constrain the cursor but merely copies the given box to the * internal constraint storage. * * @param pDev The device to constrain to the box * @param pBox The rectangle to constrain the cursor to * @param pScreen Used for copying screen confinement */ static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox) { miPointerPtr pPointer; pPointer = MIPOINTER(pDev); pPointer->limits = *pBox; pPointer->confined = PointerConfinedToScreen(pDev); } /** * Should calculate the box for the given cursor, based on screen and the * confinement given. But we assume that whatever box is passed in is valid * anyway. * * @param pDev The device to calculate the cursor limits for * @param pScreen The screen the confinement happens on * @param pCursor The screen the confinement happens on * @param pHotBox The confinement box for the cursor * @param[out] pTopLeftBox The new confinement box, always *pHotBox. */ static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox) { *pTopLeftBox = *pHotBox; } /** * Set the device's cursor position to the x/y position on the given screen. * Generates and event if required. * * This function is called from: * - sprite init code to place onto initial position * - the various WarpPointer implementations (core, XI, Xinerama, dmx,…) * - during the cursor update path in CheckMotion * - in the Xinerama part of NewCurrentScreen * - when a RandR/RandR1.2 mode was applied (it may have moved the pointer, so * it's set back to the original pos) * * @param pDev The device to move * @param pScreen The screen the device is on * @param x The x coordinate in per-screen coordinates * @param y The y coordinate in per-screen coordinates * @param generateEvent True if the pointer movement should generate an * event. * * @return TRUE in all cases */ static Bool miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent) { SetupScreen(pScreen); miPointerPtr pPointer = MIPOINTER(pDev); pPointer->generateEvent = generateEvent; if (pScreen->ConstrainCursorHarder) pScreen->ConstrainCursorHarder(pDev, pScreen, Absolute, &x, &y); /* device dependent - must pend signal and call miPointerWarpCursor */ (*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y); if (!generateEvent) miPointerUpdateSprite(pDev); return TRUE; } void miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs, Bool displayed) { /* * This is guaranteed to correct any color-dependent state which may have * been bound up in private state created by RealizeCursor */ pScr->UnrealizeCursor(pDev, pScr, pCurs); pScr->RealizeCursor(pDev, pScr, pCurs); if (displayed) pScr->DisplayCursor(pDev, pScr, pCurs); } /** * Set up sprite information for the device. * This function will be called once for each device after it is initialized * in the DIX. * * @param pDev The newly created device * @param pScreen The initial sprite scree. */ static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miPointerPtr pPointer; SetupScreen(pScreen); pPointer = malloc(sizeof(miPointerRec)); if (!pPointer) return FALSE; pPointer->pScreen = NULL; pPointer->pSpriteScreen = NULL; pPointer->pCursor = NULL; pPointer->pSpriteCursor = NULL; pPointer->limits.x1 = 0; pPointer->limits.x2 = 32767; pPointer->limits.y1 = 0; pPointer->limits.y2 = 32767; pPointer->confined = FALSE; pPointer->x = 0; pPointer->y = 0; pPointer->generateEvent = FALSE; if (!((*pScreenPriv->spriteFuncs->DeviceCursorInitialize) (pDev, pScreen))) { free(pPointer); return FALSE; } dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, pPointer); return TRUE; } /** * Clean up after device. * This function will be called once before the device is freed in the DIX * * @param pDev The device to be removed from the server * @param pScreen Current screen of the device */ static void miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { SetupScreen(pScreen); if (!IsMaster(pDev) && !IsFloating(pDev)) return; (*pScreenPriv->spriteFuncs->DeviceCursorCleanup) (pDev, pScreen); free(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL); } /** * Warp the pointer to the given position on the given screen. May generate * an event, depending on whether we're coming from miPointerSetPosition. * * Once signals are ignored, the WarpCursor function can call this * * @param pDev The device to warp * @param pScreen Screen to warp on * @param x The x coordinate in per-screen coordinates * @param y The y coordinate in per-screen coordinates */ void miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miPointerPtr pPointer; BOOL changedScreen = FALSE; pPointer = MIPOINTER(pDev); if (pPointer->pScreen != pScreen) { mieqSwitchScreen(pDev, pScreen, TRUE); changedScreen = TRUE; } if (pPointer->generateEvent) miPointerMove(pDev, pScreen, x, y); else miPointerMoveNoEvent(pDev, pScreen, x, y); /* Don't call USFS if we use Xinerama, otherwise the root window is * updated to the second screen, and we never receive any events. * (FDO bug #18668) */ if (changedScreen #ifdef PANORAMIX && noPanoramiXExtension #endif ) { DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); /* Hack for CVE-2023-5380: if we're moving * screens PointerWindows[] keeps referring to the * old window. If that gets destroyed we have a UAF * bug later. Only happens when jumping from a window * to the root window on the other screen. * Enter/Leave events are incorrect for that case but * too niche to fix. */ LeaveWindow(pDev); if (master) LeaveWindow(master); UpdateSpriteForScreen(pDev, pScreen); } } /** * Synchronize the sprite with the cursor. * * @param pDev The device to sync */ void miPointerUpdateSprite(DeviceIntPtr pDev) { ScreenPtr pScreen; miPointerScreenPtr pScreenPriv; CursorPtr pCursor; int x, y, devx, devy; miPointerPtr pPointer; if (!pDev || !pDev->coreEvents) return; pPointer = MIPOINTER(pDev); if (!pPointer) return; pScreen = pPointer->pScreen; if (!pScreen) return; x = pPointer->x; y = pPointer->y; devx = pPointer->devx; devy = pPointer->devy; pScreenPriv = GetScreenPrivate(pScreen); /* * if the cursor has switched screens, disable the sprite * on the old screen */ if (pScreen != pPointer->pSpriteScreen) { if (pPointer->pSpriteScreen) { miPointerScreenPtr pOldPriv; pOldPriv = GetScreenPrivate(pPointer->pSpriteScreen); if (pPointer->pCursor) { (*pOldPriv->spriteFuncs->SetCursor) (pDev, pPointer->pSpriteScreen, NullCursor, 0, 0); } (*pOldPriv->screenFuncs->CrossScreen) (pPointer->pSpriteScreen, FALSE); } (*pScreenPriv->screenFuncs->CrossScreen) (pScreen, TRUE); (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pPointer->pCursor, x, y); pPointer->devx = x; pPointer->devy = y; pPointer->pSpriteCursor = pPointer->pCursor; pPointer->pSpriteScreen = pScreen; } /* * if the cursor has changed, display the new one */ else if (pPointer->pCursor != pPointer->pSpriteCursor) { pCursor = pPointer->pCursor; if (!pCursor || (pCursor->bits->emptyMask && !pScreenPriv->showTransparent)) pCursor = NullCursor; (*pScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, pCursor, x, y); pPointer->devx = x; pPointer->devy = y; pPointer->pSpriteCursor = pPointer->pCursor; } else if (x != devx || y != devy) { pPointer->devx = x; pPointer->devy = y; if (pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } } /** * Invalidate the current sprite and force it to be reloaded on next cursor setting * operation * * @param pDev The device to invalidate the sprite fore */ void miPointerInvalidateSprite(DeviceIntPtr pDev) { miPointerPtr pPointer; pPointer = MIPOINTER(pDev); pPointer->pSpriteCursor = (CursorPtr) 1; } /** * Set the device to the coordinates on the given screen. * * @param pDev The device to move * @param screen_no Index of the screen to move to * @param x The x coordinate in per-screen coordinates * @param y The y coordinate in per-screen coordinates */ void miPointerSetScreen(DeviceIntPtr pDev, int screen_no, int x, int y) { ScreenPtr pScreen; miPointerPtr pPointer; pPointer = MIPOINTER(pDev); pScreen = screenInfo.screens[screen_no]; mieqSwitchScreen(pDev, pScreen, FALSE); NewCurrentScreen(pDev, pScreen, x, y); pPointer->limits.x2 = pScreen->width; pPointer->limits.y2 = pScreen->height; } /** * @return The current screen of the given device or NULL. */ ScreenPtr miPointerGetScreen(DeviceIntPtr pDev) { miPointerPtr pPointer = MIPOINTER(pDev); return (pPointer) ? pPointer->pScreen : NULL; } /* Controls whether the cursor image should be updated immediately when moved (FALSE) or if something else will be responsible for updating it later (TRUE). Returns current setting. Caller is responsible for calling OsBlockSignal first. */ Bool miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait) { SetupScreen(pScreen); Bool prevWait = pScreenPriv->waitForUpdate; pScreenPriv->waitForUpdate = wait; return prevWait; } /* Move the pointer on the current screen, and update the sprite. */ static void miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miPointerPtr pPointer; SetupScreen(pScreen); pPointer = MIPOINTER(pDev); /* Hack: We mustn't call into ->MoveCursor for anything but the * VCP, as this may cause a non-HW rendered cursor to be rendered while * not holding the input lock. This would race with building the command * buffer for other rendering. */ if (GetMaster(pDev, MASTER_POINTER) == inputInfo.pointer &&!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) { pPointer->devx = x; pPointer->devy = y; if (pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); } pPointer->x = x; pPointer->y = y; pPointer->pScreen = pScreen; } /** * Set the devices' cursor position to the given x/y position. * * This function is called during the pointer update path in * GetPointerEvents and friends (and the same in the xwin DDX). * * The coordinates provided are always absolute. The parameter mode whether * it was relative or absolute movement that landed us at those coordinates. * * If the cursor was constrained by a barrier, ET_Barrier* events may be * generated and appended to the InternalEvent list provided. * * @param pDev The device to move * @param mode Movement mode (Absolute or Relative) * @param[in,out] screenx The x coordinate in desktop coordinates * @param[in,out] screeny The y coordinate in desktop coordinates * @param[in,out] nevents The number of events in events (before/after) * @param[in,out] events The list of events before/after being constrained */ ScreenPtr miPointerSetPosition(DeviceIntPtr pDev, int mode, double *screenx, double *screeny, int *nevents, InternalEvent* events) { miPointerScreenPtr pScreenPriv; ScreenPtr pScreen; ScreenPtr newScreen; int x, y; Bool switch_screen = FALSE; Bool should_constrain_barriers = FALSE; int i; miPointerPtr pPointer; pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; x = floor(*screenx); y = floor(*screeny); switch_screen = !point_on_screen(pScreen, x, y); /* Switch to per-screen coordinates for CursorOffScreen and * Pointer->limits */ x -= pScreen->x; y -= pScreen->y; should_constrain_barriers = (mode == Relative); if (should_constrain_barriers) { /* coordinates after clamped to a barrier */ int constrained_x, constrained_y; int current_x, current_y; /* current position in per-screen coord */ current_x = MIPOINTER(pDev)->x - pScreen->x; current_y = MIPOINTER(pDev)->y - pScreen->y; input_constrain_cursor(pDev, pScreen, current_x, current_y, x, y, &constrained_x, &constrained_y, nevents, events); x = constrained_x; y = constrained_y; } if (switch_screen) { pScreenPriv = GetScreenPrivate(pScreen); if (!pPointer->confined) { newScreen = pScreen; (*pScreenPriv->screenFuncs->CursorOffScreen) (&newScreen, &x, &y); if (newScreen != pScreen) { pScreen = newScreen; mieqSwitchScreen(pDev, pScreen, FALSE); /* Smash the confine to the new screen */ pPointer->limits.x2 = pScreen->width; pPointer->limits.y2 = pScreen->height; } } } /* Constrain the sprite to the current limits. */ if (x < pPointer->limits.x1) x = pPointer->limits.x1; if (x >= pPointer->limits.x2) x = pPointer->limits.x2 - 1; if (y < pPointer->limits.y1) y = pPointer->limits.y1; if (y >= pPointer->limits.y2) y = pPointer->limits.y2 - 1; if (pScreen->ConstrainCursorHarder) pScreen->ConstrainCursorHarder(pDev, pScreen, mode, &x, &y); if (pPointer->x != x || pPointer->y != y || pPointer->pScreen != pScreen) miPointerMoveNoEvent(pDev, pScreen, x, y); /* check if we generated any barrier events and if so, update root x/y * to the fully constrained coords */ if (should_constrain_barriers) { for (i = 0; i < *nevents; i++) { if (events[i].any.type == ET_BarrierHit || events[i].any.type == ET_BarrierLeave) { events[i].barrier_event.root_x = x; events[i].barrier_event.root_y = y; } } } /* Convert to desktop coordinates again */ x += pScreen->x; y += pScreen->y; /* In the event we actually change screen or we get confined, we just * drop the float component on the floor * FIXME: only drop remainder for ConstrainCursorHarder, not for screen * crossings */ if (x != floor(*screenx)) *screenx = x; if (y != floor(*screeny)) *screeny = y; return pScreen; } /** * Get the current position of the device in desktop coordinates. * * @param x Return value for the current x coordinate in desktop coordinates. * @param y Return value for the current y coordinate in desktop coordinates. */ void miPointerGetPosition(DeviceIntPtr pDev, int *x, int *y) { *x = MIPOINTER(pDev)->x; *y = MIPOINTER(pDev)->y; } /** * Move the device's pointer to the x/y coordinates on the given screen. * This function generates and enqueues pointer events. * * @param pDev The device to move * @param pScreen The screen the device is on * @param x The x coordinate in per-screen coordinates * @param y The y coordinate in per-screen coordinates */ void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { int i, nevents; int valuators[2]; ValuatorMask mask; miPointerMoveNoEvent(pDev, pScreen, x, y); /* generate motion notify */ valuators[0] = x; valuators[1] = y; if (!mipointermove_events) { mipointermove_events = InitEventList(GetMaximumEventsNum()); if (!mipointermove_events) { FatalError("Could not allocate event store.\n"); return; } } valuator_mask_set_range(&mask, 0, 2, valuators); nevents = GetPointerEvents(mipointermove_events, pDev, MotionNotify, 0, POINTER_SCREEN | POINTER_ABSOLUTE | POINTER_NORAW, &mask); input_lock(); for (i = 0; i < nevents; i++) mieqEnqueue(pDev, &mipointermove_events[i]); input_unlock(); } xorg-server-21.1.16/mi/mipoly.c0000644000175000017500000005151114757411105011720 /*********************************************************** 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. ******************************************************************/ /* * mipoly.c * * Written by Brian Kelleher; June 1986 */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "windowstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "mi.h" #include "miscanfill.h" #include "mipoly.h" #include "regionstr.h" /* * Insert the given edge into the edge table. First we must find the correct * bucket in the Edge table, then find the right slot in the bucket. Finally, * we can insert it. */ static Bool miInsertEdgeInET(EdgeTable * ET, EdgeTableEntry * ETE, int scanline, ScanLineListBlock ** SLLBlock, int *iSLLBlock) { EdgeTableEntry *start, *prev; ScanLineList *pSLL, *pPrevSLL; ScanLineListBlock *tmpSLLBlock; /* * find the right bucket to put the edge into */ pPrevSLL = &ET->scanlines; pSLL = pPrevSLL->next; while (pSLL && (pSLL->scanline < scanline)) { pPrevSLL = pSLL; pSLL = pSLL->next; } /* * reassign pSLL (pointer to ScanLineList) if necessary */ if ((!pSLL) || (pSLL->scanline > scanline)) { if (*iSLLBlock > SLLSPERBLOCK - 1) { tmpSLLBlock = malloc(sizeof(ScanLineListBlock)); if (!tmpSLLBlock) return FALSE; (*SLLBlock)->next = tmpSLLBlock; tmpSLLBlock->next = NULL; *SLLBlock = tmpSLLBlock; *iSLLBlock = 0; } pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]); pSLL->next = pPrevSLL->next; pSLL->edgelist = NULL; pPrevSLL->next = pSLL; } pSLL->scanline = scanline; /* * now insert the edge in the right bucket */ prev = NULL; start = pSLL->edgelist; while (start && (start->bres.minor < ETE->bres.minor)) { prev = start; start = start->next; } ETE->next = start; if (prev) prev->next = ETE; else pSLL->edgelist = ETE; return TRUE; } static void miFreeStorage(ScanLineListBlock * pSLLBlock) { ScanLineListBlock *tmpSLLBlock; while (pSLLBlock) { tmpSLLBlock = pSLLBlock->next; free(pSLLBlock); pSLLBlock = tmpSLLBlock; } } /* * CreateEdgeTable * * This routine creates the edge table for scan converting polygons. * The Edge Table (ET) looks like: * * EdgeTable * -------- * | ymax | ScanLineLists * |scanline|-->------------>-------------->... * -------- |scanline| |scanline| * |edgelist| |edgelist| * --------- --------- * | | * | | * V V * list of ETEs list of ETEs * * where ETE is an EdgeTableEntry data structure, and there is one ScanLineList * per scanline at which an edge is initially entered. */ static Bool miCreateETandAET(int count, DDXPointPtr pts, EdgeTable * ET, EdgeTableEntry * AET, EdgeTableEntry * pETEs, ScanLineListBlock * pSLLBlock) { DDXPointPtr top, bottom; DDXPointPtr PrevPt, CurrPt; int iSLLBlock = 0; int dy; if (count < 2) return TRUE; /* * initialize the Active Edge Table */ AET->next = NULL; AET->back = NULL; AET->nextWETE = NULL; AET->bres.minor = MININT; /* * initialize the Edge Table. */ ET->scanlines.next = NULL; ET->ymax = MININT; ET->ymin = MAXINT; pSLLBlock->next = NULL; PrevPt = &pts[count - 1]; /* * for each vertex in the array of points. * In this loop we are dealing with two vertices at * a time -- these make up one edge of the polygon. */ while (count--) { CurrPt = pts++; /* * find out which point is above and which is below. */ if (PrevPt->y > CurrPt->y) { bottom = PrevPt, top = CurrPt; pETEs->ClockWise = 0; } else { bottom = CurrPt, top = PrevPt; pETEs->ClockWise = 1; } /* * don't add horizontal edges to the Edge table. */ if (bottom->y != top->y) { pETEs->ymax = bottom->y - 1; /* -1 so we don't get last scanline */ /* * initialize integer edge algorithm */ dy = bottom->y - top->y; BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) { miFreeStorage(pSLLBlock->next); return FALSE; } ET->ymax = max(ET->ymax, PrevPt->y); ET->ymin = min(ET->ymin, PrevPt->y); pETEs++; } PrevPt = CurrPt; } return TRUE; } /* * This routine moves EdgeTableEntries from the EdgeTable into the Active Edge * Table, leaving them sorted by smaller x coordinate. */ static void miloadAET(EdgeTableEntry * AET, EdgeTableEntry * ETEs) { EdgeTableEntry *pPrevAET; EdgeTableEntry *tmp; pPrevAET = AET; AET = AET->next; while (ETEs) { while (AET && (AET->bres.minor < ETEs->bres.minor)) { pPrevAET = AET; AET = AET->next; } tmp = ETEs->next; ETEs->next = AET; if (AET) AET->back = ETEs; ETEs->back = pPrevAET; pPrevAET->next = ETEs; pPrevAET = ETEs; ETEs = tmp; } } /* * computeWAET * * This routine links the AET by the nextWETE (winding EdgeTableEntry) link for * use by the winding number rule. The final Active Edge Table (AET) might * look something like: * * AET * ---------- --------- --------- * |ymax | |ymax | |ymax | * | ... | |... | |... | * |next |->|next |->|next |->... * |nextWETE| |nextWETE| |nextWETE| * --------- --------- ^-------- * | | | * V-------------------> V---> ... * */ static void micomputeWAET(EdgeTableEntry * AET) { EdgeTableEntry *pWETE; int inside = 1; int isInside = 0; AET->nextWETE = NULL; pWETE = AET; AET = AET->next; while (AET) { if (AET->ClockWise) isInside++; else isInside--; if ((!inside && !isInside) || (inside && isInside)) { pWETE->nextWETE = AET; pWETE = AET; inside = !inside; } AET = AET->next; } pWETE->nextWETE = NULL; } /* * Just a simple insertion sort using pointers and back pointers to sort the * Active Edge Table. */ static int miInsertionSort(EdgeTableEntry * AET) { EdgeTableEntry *pETEchase; EdgeTableEntry *pETEinsert; EdgeTableEntry *pETEchaseBackTMP; int changed = 0; AET = AET->next; while (AET) { pETEinsert = AET; pETEchase = AET; while (pETEchase->back->bres.minor > AET->bres.minor) pETEchase = pETEchase->back; AET = AET->next; if (pETEchase != pETEinsert) { pETEchaseBackTMP = pETEchase->back; pETEinsert->back->next = AET; if (AET) AET->back = pETEinsert->back; pETEinsert->next = pETEchase; pETEchase->back->next = pETEinsert; pETEchase->back = pETEinsert; pETEinsert->back = pETEchaseBackTMP; changed = 1; } } return changed; } /* Find the index of the point with the smallest y */ static int getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty) { DDXPointPtr ptMin; int ymin, ymax; DDXPointPtr ptsStart = pts; ptMin = pts; ymin = ymax = (pts++)->y; while (--n > 0) { if (pts->y < ymin) { ptMin = pts; ymin = pts->y; } if (pts->y > ymax) ymax = pts->y; pts++; } *by = ymin; *ty = ymax; return ptMin - ptsStart; } /* * Written by Brian Kelleher; Dec. 1985. * * Fill a convex polygon. If the given polygon is not convex, then the result * is undefined. The algorithm is to order the edges from smallest y to * largest by partitioning the array into a left edge list and a right edge * list. The algorithm used to traverse each edge is an extension of * Bresenham's line algorithm with y as the major axis. For a derivation of * the algorithm, see the author of this code. */ static Bool miFillConvexPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn) { int xl = 0, xr = 0; /* x vals of left and right edges */ int dl = 0, dr = 0; /* decision variables */ int ml = 0, m1l = 0; /* left edge slope and slope+1 */ int mr = 0, m1r = 0; /* right edge slope and slope+1 */ int incr1l = 0, incr2l = 0; /* left edge error increments */ int incr1r = 0, incr2r = 0; /* right edge error increments */ int dy; /* delta y */ int y; /* current scanline */ int left, right; /* indices to first endpoints */ int i; /* loop counter */ int nextleft, nextright; /* indices to second endpoints */ DDXPointPtr ptsOut, FirstPoint; /* output buffer */ int *width, *FirstWidth; /* output buffer */ int imin; /* index of smallest vertex (in y) */ int ymin; /* y-extents of polygon */ int ymax; /* * find leftx, bottomy, rightx, topy, and the index * of bottomy. Also translate the points. */ imin = getPolyYBounds(ptsIn, count, &ymin, &ymax); dy = ymax - ymin + 1; if ((count < 3) || (dy < 0)) return TRUE; ptsOut = FirstPoint = xallocarray(dy, sizeof(DDXPointRec)); width = FirstWidth = xallocarray(dy, sizeof(int)); if (!FirstPoint || !FirstWidth) { free(FirstWidth); free(FirstPoint); return FALSE; } nextleft = nextright = imin; y = ptsIn[nextleft].y; /* * loop through all edges of the polygon */ do { /* * add a left edge if we need to */ if (ptsIn[nextleft].y == y) { left = nextleft; /* * find the next edge, considering the end * conditions of the array. */ nextleft++; if (nextleft >= count) nextleft = 0; /* * now compute all of the random information * needed to run the iterative algorithm. */ BRESINITPGON(ptsIn[nextleft].y - ptsIn[left].y, ptsIn[left].x, ptsIn[nextleft].x, xl, dl, ml, m1l, incr1l, incr2l); } /* * add a right edge if we need to */ if (ptsIn[nextright].y == y) { right = nextright; /* * find the next edge, considering the end * conditions of the array. */ nextright--; if (nextright < 0) nextright = count - 1; /* * now compute all of the random information * needed to run the iterative algorithm. */ BRESINITPGON(ptsIn[nextright].y - ptsIn[right].y, ptsIn[right].x, ptsIn[nextright].x, xr, dr, mr, m1r, incr1r, incr2r); } /* * generate scans to fill while we still have * a right edge as well as a left edge. */ i = min(ptsIn[nextleft].y, ptsIn[nextright].y) - y; /* in case we're called with non-convex polygon */ if (i < 0) { free(FirstWidth); free(FirstPoint); return TRUE; } while (i-- > 0) { ptsOut->y = y; /* * reverse the edges if necessary */ if (xl < xr) { *(width++) = xr - xl; (ptsOut++)->x = xl; } else { *(width++) = xl - xr; (ptsOut++)->x = xr; } y++; /* increment down the edges */ BRESINCRPGON(dl, xl, ml, m1l, incr1l, incr2l); BRESINCRPGON(dr, xr, mr, m1r, incr1r, incr2r); } } while (y != ymax); /* * Finally, fill the spans */ (*pgc->ops->FillSpans) (dst, pgc, ptsOut - FirstPoint, FirstPoint, FirstWidth, 1); free(FirstWidth); free(FirstPoint); return TRUE; } /* * Written by Brian Kelleher; Oct. 1985 * * Routine to fill a polygon. Two fill rules are supported: frWINDING and * frEVENODD. */ static Bool miFillGeneralPoly(DrawablePtr dst, GCPtr pgc, int count, DDXPointPtr ptsIn) { EdgeTableEntry *pAET; /* the Active Edge Table */ int y; /* the current scanline */ int nPts = 0; /* number of pts in buffer */ EdgeTableEntry *pWETE; /* Winding Edge Table */ ScanLineList *pSLL; /* Current ScanLineList */ DDXPointPtr ptsOut; /* ptr to output buffers */ int *width; DDXPointRec FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ int FirstWidth[NUMPTSTOBUFFER]; EdgeTableEntry *pPrevAET; /* previous AET entry */ EdgeTable ET; /* Edge Table header node */ EdgeTableEntry AET; /* Active ET header node */ EdgeTableEntry *pETEs; /* Edge Table Entries buff */ ScanLineListBlock SLLBlock; /* header for ScanLineList */ int fixWAET = 0; if (count < 3) return TRUE; if (!(pETEs = malloc(sizeof(EdgeTableEntry) * count))) return FALSE; ptsOut = FirstPoint; width = FirstWidth; if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock)) { free(pETEs); return FALSE; } pSLL = ET.scanlines.next; if (pgc->fillRule == EvenOddRule) { /* * for each scanline */ for (y = ET.ymin; y < ET.ymax; y++) { /* * Add a new edge to the active edge table when we * get to the next edge. */ if (pSLL && y == pSLL->scanline) { miloadAET(&AET, pSLL->edgelist); pSLL = pSLL->next; } pPrevAET = &AET; pAET = AET.next; /* * for each active edge */ while (pAET) { ptsOut->x = pAET->bres.minor; ptsOut++->y = y; *width++ = pAET->next->bres.minor - pAET->bres.minor; nPts++; /* * send out the buffer when its full */ if (nPts == NUMPTSTOBUFFER) { (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint, FirstWidth, 1); ptsOut = FirstPoint; width = FirstWidth; nPts = 0; } EVALUATEEDGEEVENODD(pAET, pPrevAET, y); EVALUATEEDGEEVENODD(pAET, pPrevAET, y); } miInsertionSort(&AET); } } else { /* default to WindingNumber */ /* * for each scanline */ for (y = ET.ymin; y < ET.ymax; y++) { /* * Add a new edge to the active edge table when we * get to the next edge. */ if (pSLL && y == pSLL->scanline) { miloadAET(&AET, pSLL->edgelist); micomputeWAET(&AET); pSLL = pSLL->next; } pPrevAET = &AET; pAET = AET.next; pWETE = pAET; /* * for each active edge */ while (pAET) { /* * if the next edge in the active edge table is * also the next edge in the winding active edge * table. */ if (pWETE == pAET) { ptsOut->x = pAET->bres.minor; ptsOut++->y = y; *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor; nPts++; /* * send out the buffer */ if (nPts == NUMPTSTOBUFFER) { (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint, FirstWidth, 1); ptsOut = FirstPoint; width = FirstWidth; nPts = 0; } pWETE = pWETE->nextWETE; while (pWETE != pAET) EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); pWETE = pWETE->nextWETE; } EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); } /* * reevaluate the Winding active edge table if we * just had to resort it or if we just exited an edge. */ if (miInsertionSort(&AET) || fixWAET) { micomputeWAET(&AET); fixWAET = 0; } } } /* * Get any spans that we missed by buffering */ (*pgc->ops->FillSpans) (dst, pgc, nPts, FirstPoint, FirstWidth, 1); free(pETEs); miFreeStorage(SLLBlock.next); return TRUE; } /* * Draw polygons. This routine translates the point by the origin if * pGC->miTranslate is non-zero, and calls to the appropriate routine to * actually scan convert the polygon. */ void miFillPolygon(DrawablePtr dst, GCPtr pgc, int shape, int mode, int count, DDXPointPtr pPts) { int i; int xorg, yorg; DDXPointPtr ppt; if (count == 0) return; ppt = pPts; if (pgc->miTranslate) { xorg = dst->x; yorg = dst->y; if (mode == CoordModeOrigin) { for (i = 0; i < count; i++) { ppt->x += xorg; ppt++->y += yorg; } } else { ppt->x += xorg; ppt++->y += yorg; for (i = 1; i < count; i++) { ppt->x += (ppt - 1)->x; ppt->y += (ppt - 1)->y; ppt++; } } } else { if (mode == CoordModePrevious) { ppt++; for (i = 1; i < count; i++) { ppt->x += (ppt - 1)->x; ppt->y += (ppt - 1)->y; ppt++; } } } if (shape == Convex) miFillConvexPoly(dst, pgc, count, pPts); else miFillGeneralPoly(dst, pgc, count, pPts); } xorg-server-21.1.16/mi/mipoly.h0000644000175000017500000001452614757411105011732 /* 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. */ /* * fill.h * * Created by Brian Kelleher; Oct 1985 * * Include file for filled polygon routines. * * These are the data structures needed to scan * convert regions. Two different scan conversion * methods are available -- the even-odd method, and * the winding number method. * The even-odd rule states that a point is inside * the polygon if a ray drawn from that point in any * direction will pass through an odd number of * path segments. * By the winding number rule, a point is decided * to be inside the polygon if a ray drawn from that * point in any direction passes through a different * number of clockwise and counter-clockwise path * segments. * * These data structures are adapted somewhat from * the algorithm in (Foley/Van Dam) for scan converting * polygons. * The basic algorithm is to start at the top (smallest y) * of the polygon, stepping down to the bottom of * the polygon by incrementing the y coordinate. We * keep a list of edges which the current scanline crosses, * sorted by x. This list is called the Active Edge Table (AET) * As we change the y-coordinate, we update each entry in * in the active edge table to reflect the edges new xcoord. * This list must be sorted at each scanline in case * two edges intersect. * We also keep a data structure known as the Edge Table (ET), * which keeps track of all the edges which the current * scanline has not yet reached. The ET is basically a * list of ScanLineList structures containing a list of * edges which are entered at a given scanline. There is one * ScanLineList per scanline at which an edge is entered. * When we enter a new edge, we move it from the ET to the AET. * * From the AET, we can implement the even-odd rule as in * (Foley/Van Dam). * The winding number rule is a little trickier. We also * keep the EdgeTableEntries in the AET linked by the * nextWETE (winding EdgeTableEntry) link. This allows * the edges to be linked just as before for updating * purposes, but only uses the edges linked by the nextWETE * link as edges representing spans of the polygon to * drawn (as with the even-odd rule). */ /* * for the winding number rule */ #define CLOCKWISE 1 #define COUNTERCLOCKWISE -1 typedef struct _EdgeTableEntry { int ymax; /* ycoord at which we exit this edge. */ BRESINFO bres; /* Bresenham info to run the edge */ struct _EdgeTableEntry *next; /* next in the list */ struct _EdgeTableEntry *back; /* for insertion sort */ struct _EdgeTableEntry *nextWETE; /* for winding num rule */ int ClockWise; /* flag for winding number rule */ } EdgeTableEntry; typedef struct _ScanLineList { int scanline; /* the scanline represented */ EdgeTableEntry *edgelist; /* header node */ struct _ScanLineList *next; /* next in the list */ } ScanLineList; typedef struct { int ymax; /* ymax for the polygon */ int ymin; /* ymin for the polygon */ ScanLineList scanlines; /* header node */ } EdgeTable; /* * Here is a struct to help with storage allocation * so we can allocate a big chunk at a time, and then take * pieces from this heap when we need to. */ #define SLLSPERBLOCK 25 typedef struct _ScanLineListBlock { ScanLineList SLLs[SLLSPERBLOCK]; struct _ScanLineListBlock *next; } ScanLineListBlock; /* * number of points to buffer before sending them off * to scanlines() : Must be an even number */ #define NUMPTSTOBUFFER 200 /* * * a few macros for the inner loops of the fill code where * performance considerations don't allow a procedure call. * * Evaluate the given edge at the given scanline. * If the edge has expired, then we leave it and fix up * the active edge table; otherwise, we increment the * x value to be ready for the next scanline. * The winding number rule is in effect, so we must notify * the caller when the edge has been removed so he * can reorder the Winding Active Edge Table. */ #define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \ if (pAET->ymax == y) { /* leaving this edge */ \ pPrevAET->next = pAET->next; \ pAET = pPrevAET->next; \ fixWAET = 1; \ if (pAET) \ pAET->back = pPrevAET; \ } \ else { \ BRESINCRPGONSTRUCT(pAET->bres); \ pPrevAET = pAET; \ pAET = pAET->next; \ } \ } /* * Evaluate the given edge at the given scanline. * If the edge has expired, then we leave it and fix up * the active edge table; otherwise, we increment the * x value to be ready for the next scanline. * The even-odd rule is in effect. */ #define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \ if (pAET->ymax == y) { /* leaving this edge */ \ pPrevAET->next = pAET->next; \ pAET = pPrevAET->next; \ if (pAET) \ pAET->back = pPrevAET; \ } \ else { \ BRESINCRPGONSTRUCT(pAET->bres); \ pPrevAET = pAET; \ pAET = pAET->next; \ } \ } xorg-server-21.1.16/mi/mipolypnt.c0000644000175000017500000000734614757411105012451 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "pixmapstr.h" #include "gcstruct.h" #include "windowstr.h" #include "mi.h" void miPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, /* Origin or Previous */ int npt, xPoint * pptInit) { int xorg; int yorg; int nptTmp; ChangeGCVal fsOld, fsNew; int *pwidthInit, *pwidth; int i; xPoint *ppt; if (!(pwidthInit = xallocarray(npt, sizeof(int)))) return; /* make pointlist origin relative */ if (mode == CoordModePrevious) { ppt = pptInit; nptTmp = npt; nptTmp--; while (nptTmp--) { ppt++; ppt->x += (ppt - 1)->x; ppt->y += (ppt - 1)->y; } } if (pGC->miTranslate) { ppt = pptInit; nptTmp = npt; xorg = pDrawable->x; yorg = pDrawable->y; while (nptTmp--) { ppt->x += xorg; ppt++->y += yorg; } } fsOld.val = pGC->fillStyle; fsNew.val = FillSolid; if (pGC->fillStyle != FillSolid) { ChangeGC(NullClient, pGC, GCFillStyle, &fsNew); ValidateGC(pDrawable, pGC); } pwidth = pwidthInit; for (i = 0; i < npt; i++) *pwidth++ = 1; (*pGC->ops->FillSpans) (pDrawable, pGC, npt, pptInit, pwidthInit, FALSE); if (fsOld.val != FillSolid) { ChangeGC(NullClient, pGC, GCFillStyle, &fsOld); ValidateGC(pDrawable, pGC); } free(pwidthInit); } xorg-server-21.1.16/mi/mipolyrect.c0000644000175000017500000001366414757411105012605 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" #include "mi.h" void miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) { int i; xRectangle *pR = pRects; DDXPointRec rect[5]; int bound_tmp; #define MINBOUND(dst,eqn) bound_tmp = eqn; \ if (bound_tmp < -32768) \ bound_tmp = -32768; \ dst = bound_tmp; #define MAXBOUND(dst,eqn) bound_tmp = eqn; \ if (bound_tmp > 32767) \ bound_tmp = 32767; \ dst = bound_tmp; #define MAXUBOUND(dst,eqn) bound_tmp = eqn; \ if (bound_tmp > 65535) \ bound_tmp = 65535; \ dst = bound_tmp; if (pGC->lineStyle == LineSolid && pGC->joinStyle == JoinMiter && pGC->lineWidth != 0) { xRectangle *tmp, *t; int ntmp; int offset1, offset2, offset3; int x, y, width, height; ntmp = (nrects << 2); offset2 = pGC->lineWidth; offset1 = offset2 >> 1; offset3 = offset2 - offset1; tmp = xallocarray(ntmp, sizeof(xRectangle)); if (!tmp) return; t = tmp; for (i = 0; i < nrects; i++) { x = pR->x; y = pR->y; width = pR->width; height = pR->height; pR++; if (width == 0 && height == 0) { rect[0].x = x; rect[0].y = y; rect[1].x = x; rect[1].y = y; (*pGC->ops->Polylines) (pDraw, pGC, CoordModeOrigin, 2, rect); } else if (height < offset2 || width < offset1) { if (height == 0) { t->x = x; t->width = width; } else { MINBOUND(t->x, x - offset1) MAXUBOUND(t->width, width + offset2) } if (width == 0) { t->y = y; t->height = height; } else { MINBOUND(t->y, y - offset1) MAXUBOUND(t->height, height + offset2) } t++; } else { MINBOUND(t->x, x - offset1) MINBOUND(t->y, y - offset1) MAXUBOUND(t->width, width + offset2) t->height = offset2; t++; MINBOUND(t->x, x - offset1) MAXBOUND(t->y, y + offset3); t->width = offset2; t->height = height - offset2; t++; MAXBOUND(t->x, x + width - offset1); MAXBOUND(t->y, y + offset3) t->width = offset2; t->height = height - offset2; t++; MINBOUND(t->x, x - offset1) MAXBOUND(t->y, y + height - offset1) MAXUBOUND(t->width, width + offset2) t->height = offset2; t++; } } (*pGC->ops->PolyFillRect) (pDraw, pGC, t - tmp, tmp); free((void *) tmp); } else { for (i = 0; i < nrects; i++) { rect[0].x = pR->x; rect[0].y = pR->y; MAXBOUND(rect[1].x, pR->x + (int) pR->width) rect[1].y = rect[0].y; rect[2].x = rect[1].x; MAXBOUND(rect[2].y, pR->y + (int) pR->height); rect[3].x = rect[0].x; rect[3].y = rect[2].y; rect[4].x = rect[0].x; rect[4].y = rect[0].y; (*pGC->ops->Polylines) (pDraw, pGC, CoordModeOrigin, 5, rect); pR++; } } } xorg-server-21.1.16/mi/mipolyseg.c0000644000175000017500000000600314757411105012413 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "regionstr.h" #include "gcstruct.h" #include "pixmap.h" #include "mi.h" /***************************************************************** * miPolySegment * * For each segment, draws a line between (x1, y1) and (x2, y2). The * lines are drawn in the order listed. * * Walks the segments, compressing them into format for PolyLines. * *****************************************************************/ void miPolySegment(DrawablePtr pDraw, GCPtr pGC, int nseg, xSegment * pSegs) { int i; for (i = 0; i < nseg; i++) { (*pGC->ops->Polylines) (pDraw, pGC, CoordModeOrigin, 2, (DDXPointPtr) pSegs); pSegs++; } } xorg-server-21.1.16/mi/mipolytext.c0000644000175000017500000001143314757411105012624 /******************************************************************* 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. ************************************************************************/ /* * mipolytext.c - text routines * * Author: haynes * Digital Equipment Corporation * Western Software Laboratory * Date: Thu Feb 5 1987 */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "gcstruct.h" #include #include "dixfontstr.h" #include "mi.h" int miPolyText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n, i; int w; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars, Linear8Bit, &n, charinfo); w = 0; for (i = 0; i < n; i++) w += charinfo[i]->metrics.characterWidth; if (n != 0) (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); return x + w; } int miPolyText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { unsigned long n, i; int w; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ GetGlyphs(pGC->font, (unsigned long) count, (unsigned char *) chars, (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, &n, charinfo); w = 0; for (i = 0; i < n; i++) w += charinfo[i]->metrics.characterWidth; if (n != 0) (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); return x + w; } void miImageText8(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, char *chars) { unsigned long n; FontPtr font = pGC->font; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ GetGlyphs(font, (unsigned long) count, (unsigned char *) chars, Linear8Bit, &n, charinfo); if (n != 0) (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); } void miImageText16(DrawablePtr pDraw, GCPtr pGC, int x, int y, int count, unsigned short *chars) { unsigned long n; FontPtr font = pGC->font; CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ GetGlyphs(font, (unsigned long) count, (unsigned char *) chars, (FONTLASTROW(pGC->font) == 0) ? Linear16Bit : TwoD16Bit, &n, charinfo); if (n != 0) (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, x, y, n, charinfo, FONTGLYPHS(font)); } xorg-server-21.1.16/mi/mipushpxl.c0000644000175000017500000002252014757411105012436 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "regionstr.h" #include "mi.h" #include "servermd.h" #define NPT 128 /* These were stolen from mfb. They don't really belong here. */ #define LONG2CHARSSAMEORDER(x) ((MiBits)(x)) #define LONG2CHARSDIFFORDER( x ) ( ( ( ( x ) & (MiBits)0x000000FF ) << 0x18 ) \ | ( ( ( x ) & (MiBits)0x0000FF00 ) << 0x08 ) \ | ( ( ( x ) & (MiBits)0x00FF0000 ) >> 0x08 ) \ | ( ( ( x ) & (MiBits)0xFF000000 ) >> 0x18 ) ) #define PGSZB 4 #define PPW (PGSZB<<3) /* assuming 8 bits per byte */ #define PGSZ PPW #define PLST (PPW-1) #define PIM PLST #define PWSH 5 /* miPushPixels -- squeegees the fill style of pGC through pBitMap * into pDrawable. pBitMap is a stencil (dx by dy of it is used, it may * be bigger) which is placed on the drawable at xOrg, yOrg. Where a 1 bit * is set in the bitmap, the fill style is put onto the drawable using * the GC's logical function. The drawable is not changed where the bitmap * has a zero bit or outside the area covered by the stencil. WARNING: this code works if the 1-bit deep pixmap format returned by GetSpans is the same as the format defined by the mfb code (i.e. 32-bit padding per scanline, scanline unit = 32 bits; later, this might mean bitsizeof(int) padding and sacnline unit == bitsizeof(int).) */ /* * in order to have both (MSB_FIRST and LSB_FIRST) versions of this * in the server, we need to rename one of them */ void miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) { int h, dxDivPPW, ibEnd; MiBits *pwLineStart; MiBits *pw, *pwEnd; MiBits msk; int ib, w; int ipt; /* index into above arrays */ Bool fInBox; DDXPointRec pt[NPT], ptThisLine; int width[NPT]; #if 1 MiBits startmask; if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER) if (screenInfo.bitmapBitOrder == LSBFirst) startmask = (MiBits) (-1) ^ LONG2CHARSSAMEORDER((MiBits) (-1) << 1); else startmask = (MiBits) (-1) ^ LONG2CHARSSAMEORDER((MiBits) (-1) >> 1); else if (screenInfo.bitmapBitOrder == LSBFirst) startmask = (MiBits) (-1) ^ LONG2CHARSDIFFORDER((MiBits) (-1) << 1); else startmask = (MiBits) (-1) ^ LONG2CHARSDIFFORDER((MiBits) (-1) >> 1); #endif pwLineStart = malloc(BitmapBytePad(dx)); if (!pwLineStart) return; ipt = 0; dxDivPPW = dx / PPW; for (h = 0, ptThisLine.x = 0, ptThisLine.y = 0; h < dy; h++, ptThisLine.y++) { (*pBitMap->drawable.pScreen->GetSpans) ((DrawablePtr) pBitMap, dx, &ptThisLine, &dx, 1, (char *) pwLineStart); pw = pwLineStart; /* Process all words which are fully in the pixmap */ fInBox = FALSE; pwEnd = pwLineStart + dxDivPPW; while (pw < pwEnd) { w = *pw; #if 1 msk = startmask; #else msk = (MiBits) (-1) ^ SCRRIGHT((MiBits) (-1), 1); #endif for (ib = 0; ib < PPW; ib++) { if (w & msk) { if (!fInBox) { pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; pt[ipt].y = h + yOrg; /* start new box */ fInBox = TRUE; } } else { if (fInBox) { width[ipt] = ((pw - pwLineStart) << PWSH) + ib + xOrg - pt[ipt].x; if (++ipt >= NPT) { (*pGC->ops->FillSpans) (pDrawable, pGC, NPT, pt, width, TRUE); ipt = 0; } /* end box */ fInBox = FALSE; } } #if 1 /* This is not quite right, but it'll do for now */ if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER) if (screenInfo.bitmapBitOrder == LSBFirst) msk = LONG2CHARSSAMEORDER(LONG2CHARSSAMEORDER(msk) << 1); else msk = LONG2CHARSSAMEORDER(LONG2CHARSSAMEORDER(msk) >> 1); else if (screenInfo.bitmapBitOrder == LSBFirst) msk = LONG2CHARSDIFFORDER(LONG2CHARSDIFFORDER(msk) << 1); else msk = LONG2CHARSDIFFORDER(LONG2CHARSDIFFORDER(msk) >> 1); #else msk = SCRRIGHT(msk, 1); #endif } pw++; } ibEnd = dx & PIM; if (ibEnd) { /* Process final partial word on line */ w = *pw; #if 1 msk = startmask; #else msk = (MiBits) (-1) ^ SCRRIGHT((MiBits) (-1), 1); #endif for (ib = 0; ib < ibEnd; ib++) { if (w & msk) { if (!fInBox) { /* start new box */ pt[ipt].x = ((pw - pwLineStart) << PWSH) + ib + xOrg; pt[ipt].y = h + yOrg; fInBox = TRUE; } } else { if (fInBox) { /* end box */ width[ipt] = ((pw - pwLineStart) << PWSH) + ib + xOrg - pt[ipt].x; if (++ipt >= NPT) { (*pGC->ops->FillSpans) (pDrawable, pGC, NPT, pt, width, TRUE); ipt = 0; } fInBox = FALSE; } } #if 1 /* This is not quite right, but it'll do for now */ if (screenInfo.bitmapBitOrder == IMAGE_BYTE_ORDER) if (screenInfo.bitmapBitOrder == LSBFirst) msk = LONG2CHARSSAMEORDER(LONG2CHARSSAMEORDER(msk) << 1); else msk = LONG2CHARSSAMEORDER(LONG2CHARSSAMEORDER(msk) >> 1); else if (screenInfo.bitmapBitOrder == LSBFirst) msk = LONG2CHARSDIFFORDER(LONG2CHARSDIFFORDER(msk) << 1); else msk = LONG2CHARSDIFFORDER(LONG2CHARSDIFFORDER(msk) >> 1); #else msk = SCRRIGHT(msk, 1); #endif } } /* If scanline ended with last bit set, end the box */ if (fInBox) { width[ipt] = dx + xOrg - pt[ipt].x; if (++ipt >= NPT) { (*pGC->ops->FillSpans) (pDrawable, pGC, NPT, pt, width, TRUE); ipt = 0; } } } free(pwLineStart); /* Flush any remaining spans */ if (ipt) { (*pGC->ops->FillSpans) (pDrawable, pGC, ipt, pt, width, TRUE); } } xorg-server-21.1.16/mi/miscanfill.h0000644000175000017500000001150014757411105012527 /* 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef SCANFILLINCLUDED #define SCANFILLINCLUDED /* * scanfill.h * * Written by Brian Kelleher; Jan 1985 * * This file contains a few macros to help track * the edge of a filled object. The object is assumed * to be filled in scanline order, and thus the * algorithm used is an extension of Bresenham's line * drawing algorithm which assumes that y is always the * major axis. * Since these pieces of code are the same for any filled shape, * it is more convenient to gather the library in one * place, but since these pieces of code are also in * the inner loops of output primitives, procedure call * overhead is out of the question. * See the author for a derivation if needed. */ /* * In scan converting polygons, we want to choose those pixels * which are inside the polygon. Thus, we add .5 to the starting * x coordinate for both left and right edges. Now we choose the * first pixel which is inside the pgon for the left edge and the * first pixel which is outside the pgon for the right edge. * Draw the left pixel, but not the right. * * How to add .5 to the starting x coordinate: * If the edge is moving to the right, then subtract dy from the * error term from the general form of the algorithm. * If the edge is moving to the left, then add dy to the error term. * * The reason for the difference between edges moving to the left * and edges moving to the right is simple: If an edge is moving * to the right, then we want the algorithm to flip immediately. * If it is moving to the left, then we don't want it to flip until * we traverse an entire pixel. */ #define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \ int dx; /* local storage */ \ \ /* \ * if the edge is horizontal, then it is ignored \ * and assumed not to be processed. Otherwise, do this stuff. \ */ \ if ((dy) != 0) { \ xStart = (x1); \ dx = (x2) - xStart; \ if (dx < 0) { \ m = dx / (dy); \ m1 = m - 1; \ incr1 = -2 * dx + 2 * (dy) * m1; \ incr2 = -2 * dx + 2 * (dy) * m; \ d = 2 * m * (dy) - 2 * dx - 2 * (dy); \ } else { \ m = dx / (dy); \ m1 = m + 1; \ incr1 = 2 * dx - 2 * (dy) * m1; \ incr2 = 2 * dx - 2 * (dy) * m; \ d = -2 * m * (dy) + 2 * dx; \ } \ } \ } #define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \ if (m1 > 0) { \ if (d > 0) { \ minval += m1; \ d += incr1; \ } \ else { \ minval += m; \ d += incr2; \ } \ } else {\ if (d >= 0) { \ minval += m1; \ d += incr1; \ } \ else { \ minval += m; \ d += incr2; \ } \ } \ } /* * This structure contains all of the information needed * to run the bresenham algorithm. * The variables may be hardcoded into the declarations * instead of using this structure to make use of * register declarations. */ typedef struct { int minor; /* minor axis */ int d; /* decision variable */ int m, m1; /* slope and slope+1 */ int incr1, incr2; /* error increments */ } BRESINFO; #define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \ BRESINITPGON(dmaj, min1, min2, bres.minor, bres.d, \ bres.m, bres.m1, bres.incr1, bres.incr2) #define BRESINCRPGONSTRUCT(bres) \ BRESINCRPGON(bres.d, bres.minor, bres.m, bres.m1, bres.incr1, bres.incr2) #endif xorg-server-21.1.16/mi/miscrinit.c0000644000175000017500000002446114757411105012414 /* Copyright 1990, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "servermd.h" #include "misc.h" #include "mi.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "dix.h" #include "miline.h" #ifdef MITSHM #include #include "shmint.h" #endif /* We use this structure to propagate some information from miScreenInit to * miCreateScreenResources. miScreenInit allocates the structure, fills it * in, and puts it into pScreen->devPrivate. miCreateScreenResources * extracts the info and frees the structure. We could've accomplished the * same thing by adding fields to the screen structure, but they would have * ended up being redundant, and would have exposed this mi implementation * detail to the whole server. */ typedef struct { void *pbits; /* pointer to framebuffer */ int width; /* delta to add to a framebuffer addr to move one row down */ } miScreenInitParmsRec, *miScreenInitParmsPtr; /* this plugs into pScreen->ModifyPixmapHeader */ Bool miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, void *pPixData) { if (!pPixmap) return FALSE; /* * If all arguments are specified, reinitialize everything (including * validated state). */ if ((width > 0) && (height > 0) && (depth > 0) && (bitsPerPixel > 0) && (devKind > 0) && pPixData) { pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = bitsPerPixel; pPixmap->drawable.id = 0; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; pPixmap->drawable.height = height; pPixmap->devKind = devKind; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = pPixData; } else { /* * Only modify specified fields, keeping all others intact. */ if (width > 0) pPixmap->drawable.width = width; if (height > 0) pPixmap->drawable.height = height; if (depth > 0) pPixmap->drawable.depth = depth; if (bitsPerPixel > 0) pPixmap->drawable.bitsPerPixel = bitsPerPixel; else if ((bitsPerPixel < 0) && (depth > 0)) pPixmap->drawable.bitsPerPixel = BitsPerPixel(depth); /* * CAVEAT: Non-SI DDXen may use devKind and devPrivate fields for * other purposes. */ if (devKind > 0) pPixmap->devKind = devKind; else if ((devKind < 0) && ((width > 0) || (depth > 0))) pPixmap->devKind = PixmapBytePad(pPixmap->drawable.width, pPixmap->drawable.depth); if (pPixData) pPixmap->devPrivate.ptr = pPixData; } pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; return TRUE; } static Bool miCloseScreen(ScreenPtr pScreen) { return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate)); } static Bool miSaveScreen(ScreenPtr pScreen, int on) { return TRUE; } void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode) { } /* With the introduction of pixmap privates, the "screen pixmap" can no * longer be created in miScreenInit, since all the modules that could * possibly ask for pixmap private space have not been initialized at * that time. pScreen->CreateScreenResources is called after all * possible private-requesting modules have been inited; we create the * screen pixmap here. */ Bool miCreateScreenResources(ScreenPtr pScreen) { miScreenInitParmsPtr pScrInitParms; void *value; pScrInitParms = (miScreenInitParmsPtr) pScreen->devPrivate; /* if width is non-zero, pScreen->devPrivate will be a pixmap * else it will just take the value pbits */ if (pScrInitParms->width) { PixmapPtr pPixmap; /* create a pixmap with no data, then redirect it to point to * the screen */ pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth, 0); if (!pPixmap) return FALSE; if (!(*pScreen->ModifyPixmapHeader) (pPixmap, pScreen->width, pScreen->height, pScreen->rootDepth, BitsPerPixel(pScreen->rootDepth), PixmapBytePad(pScrInitParms->width, pScreen->rootDepth), pScrInitParms->pbits)) return FALSE; value = (void *) pPixmap; } else { value = pScrInitParms->pbits; } free(pScreen->devPrivate); /* freeing miScreenInitParmsRec */ pScreen->devPrivate = value; /* pPixmap or pbits */ return TRUE; } Bool miScreenDevPrivateInit(ScreenPtr pScreen, int width, void *pbits) { miScreenInitParmsPtr pScrInitParms; /* Stash pbits and width in a short-lived miScreenInitParmsRec attached * to the screen, until CreateScreenResources can put them in the * screen pixmap. */ pScrInitParms = malloc(sizeof(miScreenInitParmsRec)); if (!pScrInitParms) return FALSE; pScrInitParms->pbits = pbits; pScrInitParms->width = width; pScreen->devPrivate = (void *) pScrInitParms; return TRUE; } static PixmapPtr miGetScreenPixmap(ScreenPtr pScreen) { return (PixmapPtr) (pScreen->devPrivate); } static void miSetScreenPixmap(PixmapPtr pPix) { if (pPix) pPix->drawable.pScreen->devPrivate = (void *) pPix; } Bool miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */ int xsize, int ysize, /* in pixels */ int dpix, int dpiy, /* dots per inch */ int width, /* pixel width of frame buffer */ int rootDepth, /* depth of root window */ int numDepths, /* number of depths supported */ DepthRec * depths, /* supported depths */ VisualID rootVisual, /* root visual */ int numVisuals, /* number of visuals supported */ VisualRec * visuals /* supported visuals */ ) { pScreen->width = xsize; pScreen->height = ysize; pScreen->mmWidth = (xsize * 254 + dpix * 5) / (dpix * 10); pScreen->mmHeight = (ysize * 254 + dpiy * 5) / (dpiy * 10); pScreen->numDepths = numDepths; pScreen->rootDepth = rootDepth; pScreen->allowedDepths = depths; pScreen->rootVisual = rootVisual; /* defColormap */ pScreen->minInstalledCmaps = 1; pScreen->maxInstalledCmaps = 1; pScreen->backingStoreSupport = NotUseful; pScreen->saveUnderSupport = NotUseful; /* whitePixel, blackPixel */ pScreen->ModifyPixmapHeader = miModifyPixmapHeader; pScreen->CreateScreenResources = miCreateScreenResources; pScreen->GetScreenPixmap = miGetScreenPixmap; pScreen->SetScreenPixmap = miSetScreenPixmap; pScreen->numVisuals = numVisuals; pScreen->visuals = visuals; if (width) { #ifdef MITSHM ShmRegisterFbFuncs(pScreen); #endif pScreen->CloseScreen = miCloseScreen; } /* else CloseScreen */ /* QueryBestSize */ pScreen->SaveScreen = miSaveScreen; /* GetImage, GetSpans */ pScreen->SourceValidate = miSourceValidate; /* CreateWindow, DestroyWindow, PositionWindow, ChangeWindowAttributes */ /* RealizeWindow, UnrealizeWindow */ pScreen->ValidateTree = miValidateTree; pScreen->PostValidateTree = (PostValidateTreeProcPtr) 0; pScreen->WindowExposures = miWindowExposures; /* CopyWindow */ pScreen->ClearToBackground = miClearToBackground; pScreen->ClipNotify = (ClipNotifyProcPtr) 0; pScreen->RestackWindow = (RestackWindowProcPtr) 0; pScreen->PaintWindow = miPaintWindow; /* CreatePixmap, DestroyPixmap */ /* RealizeFont, UnrealizeFont */ /* CreateGC */ /* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */ /* ListInstalledColormaps, StoreColors, ResolveColor */ /* BitmapToRegion */ pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA; pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA; pScreen->MarkWindow = miMarkWindow; pScreen->MarkOverlappedWindows = miMarkOverlappedWindows; pScreen->MoveWindow = miMoveWindow; pScreen->ResizeWindow = miResizeWindow; pScreen->GetLayerWindow = miGetLayerWindow; pScreen->HandleExposures = miHandleValidateExposures; pScreen->ReparentWindow = (ReparentWindowProcPtr) 0; pScreen->ChangeBorderWidth = miChangeBorderWidth; pScreen->SetShape = miSetShape; pScreen->MarkUnrealizedWindow = miMarkUnrealizedWindow; pScreen->XYToWindow = miXYToWindow; miSetZeroLineBias(pScreen, DEFAULTZEROLINEBIAS); return miScreenDevPrivateInit(pScreen, width, pbits); } DevPrivateKeyRec miZeroLineScreenKeyRec; void miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias) { if (!dixRegisterPrivateKey(&miZeroLineScreenKeyRec, PRIVATE_SCREEN, 0)) return; dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (unsigned long *) (unsigned long) bias); } xorg-server-21.1.16/mi/misprite.c0000644000175000017500000006312114757411105012243 /* * misprite.c * * machine independent software sprite routines */ /* Copyright 1989, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "pixmapstr.h" #include "input.h" #include "mi.h" #include "cursorstr.h" #include #include "scrnintstr.h" #include "colormapst.h" #include "windowstr.h" #include "gcstruct.h" #include "mipointer.h" #include "misprite.h" #include "dixfontstr.h" #include #include "inputstr.h" #include "damage.h" typedef struct { CursorPtr pCursor; int x; /* cursor hotspot */ int y; BoxRec saved; /* saved area from the screen */ Bool isUp; /* cursor in frame buffer */ Bool shouldBeUp; /* cursor should be displayed */ Bool checkPixels; /* check colormap collision */ ScreenPtr pScreen; } miCursorInfoRec, *miCursorInfoPtr; /* * per screen information */ typedef struct { /* screen procedures */ CloseScreenProcPtr CloseScreen; SourceValidateProcPtr SourceValidate; /* window procedures */ CopyWindowProcPtr CopyWindow; /* colormap procedures */ InstallColormapProcPtr InstallColormap; StoreColorsProcPtr StoreColors; /* os layer procedures */ ScreenBlockHandlerProcPtr BlockHandler; xColorItem colors[2]; ColormapPtr pInstalledMap; ColormapPtr pColormap; VisualPtr pVisual; DamagePtr pDamage; /* damage tracking structure */ Bool damageRegistered; int numberOfCursors; } miSpriteScreenRec, *miSpriteScreenPtr; #define SOURCE_COLOR 0 #define MASK_COLOR 1 /* * Overlap BoxPtr and Box elements */ #define BOX_OVERLAP(pCbox,X1,Y1,X2,Y2) \ (((pCbox)->x1 <= (X2)) && ((X1) <= (pCbox)->x2) && \ ((pCbox)->y1 <= (Y2)) && ((Y1) <= (pCbox)->y2)) /* * Overlap BoxPtr, origins, and rectangle */ #define ORG_OVERLAP(pCbox,xorg,yorg,x,y,w,h) \ BOX_OVERLAP((pCbox),(x)+(xorg),(y)+(yorg),(x)+(xorg)+(w),(y)+(yorg)+(h)) /* * Overlap BoxPtr, origins and RectPtr */ #define ORGRECT_OVERLAP(pCbox,xorg,yorg,pRect) \ ORG_OVERLAP((pCbox),(xorg),(yorg),(pRect)->x,(pRect)->y, \ (int)((pRect)->width), (int)((pRect)->height)) /* * Overlap BoxPtr and horizontal span */ #define SPN_OVERLAP(pCbox,y,x,w) BOX_OVERLAP((pCbox),(x),(y),(x)+(w),(y)) #define LINE_SORT(x1,y1,x2,y2) \ { int _t; \ if (x1 > x2) { _t = x1; x1 = x2; x2 = _t; } \ if (y1 > y2) { _t = y1; y1 = y2; y2 = _t; } } #define LINE_OVERLAP(pCbox,x1,y1,x2,y2,lw2) \ BOX_OVERLAP((pCbox), (x1)-(lw2), (y1)-(lw2), (x2)+(lw2), (y2)+(lw2)) #define SPRITE_DEBUG_ENABLE 0 #if SPRITE_DEBUG_ENABLE #define SPRITE_DEBUG(x) ErrorF x #else #define SPRITE_DEBUG(x) #endif static DevPrivateKeyRec miSpriteScreenKeyRec; static DevPrivateKeyRec miSpriteDevPrivatesKeyRec; static miSpriteScreenPtr GetSpriteScreen(ScreenPtr pScreen) { return dixLookupPrivate(&pScreen->devPrivates, &miSpriteScreenKeyRec); } static miCursorInfoPtr GetSprite(DeviceIntPtr dev) { if (IsFloating(dev)) return dixLookupPrivate(&dev->devPrivates, &miSpriteDevPrivatesKeyRec); return dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, &miSpriteDevPrivatesKeyRec); } static void miSpriteDisableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) { if (pScreenPriv->damageRegistered) { DamageUnregister(pScreenPriv->pDamage); pScreenPriv->damageRegistered = 0; } } static void miSpriteEnableDamage(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) { if (!pScreenPriv->damageRegistered) { pScreenPriv->damageRegistered = 1; DamageRegister(&(pScreen->GetScreenPixmap(pScreen)->drawable), pScreenPriv->pDamage); } } static void miSpriteIsUp(miCursorInfoPtr pDevCursor) { pDevCursor->isUp = TRUE; } static void miSpriteIsDown(miCursorInfoPtr pDevCursor) { pDevCursor->isUp = FALSE; } /* * screen wrappers */ static Bool miSpriteCloseScreen(ScreenPtr pScreen); static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode); static void miSpriteCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); static void miSpriteBlockHandler(ScreenPtr pScreen, void *timeout); static void miSpriteInstallColormap(ColormapPtr pMap); static void miSpriteStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef); static void miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen); static Bool miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); static void miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); #define SCREEN_PROLOGUE(pPriv, pScreen, field) ((pScreen)->field = \ (pPriv)->field) #define SCREEN_EPILOGUE(pPriv, pScreen, field)\ ((pPriv)->field = (pScreen)->field, (pScreen)->field = miSprite##field) /* * pointer-sprite method table */ static Bool miSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static Bool miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y); static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); miPointerSpriteFuncRec miSpritePointerFuncs = { miSpriteRealizeCursor, miSpriteUnrealizeCursor, miSpriteSetCursor, miSpriteMoveCursor, miSpriteDeviceCursorInitialize, miSpriteDeviceCursorCleanup, }; /* * other misc functions */ static void miSpriteRemoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void miSpriteRestoreCursor(DeviceIntPtr pDev, ScreenPtr pScreen); static void miSpriteRegisterBlockHandler(ScreenPtr pScreen, miSpriteScreenPtr pScreenPriv) { if (!pScreenPriv->BlockHandler) { pScreenPriv->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = miSpriteBlockHandler; } } static void miSpriteReportDamage(DamagePtr pDamage, RegionPtr pRegion, void *closure) { ScreenPtr pScreen = closure; miCursorInfoPtr pCursorInfo; DeviceIntPtr pDev; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && RegionContainsRect(pRegion, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor(pDev, pScreen); } } } } /* * miSpriteInitialize -- called from device-dependent screen * initialization proc after all of the function pointers have * been stored in the screen structure. */ Bool miSpriteInitialize(ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs) { miSpriteScreenPtr pScreenPriv; VisualPtr pVisual; if (!DamageSetup(pScreen)) return FALSE; if (!dixRegisterPrivateKey(&miSpriteScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey (&miSpriteDevPrivatesKeyRec, PRIVATE_DEVICE, sizeof(miCursorInfoRec))) return FALSE; pScreenPriv = malloc(sizeof(miSpriteScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->pDamage = DamageCreate(miSpriteReportDamage, NULL, DamageReportRawRegion, TRUE, pScreen, pScreen); if (!miPointerInitialize(pScreen, &miSpritePointerFuncs, screenFuncs, TRUE)) { free(pScreenPriv); return FALSE; } for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++); pScreenPriv->pVisual = pVisual; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreenPriv->SourceValidate = pScreen->SourceValidate; pScreenPriv->CopyWindow = pScreen->CopyWindow; pScreenPriv->InstallColormap = pScreen->InstallColormap; pScreenPriv->StoreColors = pScreen->StoreColors; pScreenPriv->BlockHandler = NULL; pScreenPriv->pInstalledMap = NULL; pScreenPriv->pColormap = NULL; pScreenPriv->colors[SOURCE_COLOR].red = 0; pScreenPriv->colors[SOURCE_COLOR].green = 0; pScreenPriv->colors[SOURCE_COLOR].blue = 0; pScreenPriv->colors[MASK_COLOR].red = 0; pScreenPriv->colors[MASK_COLOR].green = 0; pScreenPriv->colors[MASK_COLOR].blue = 0; pScreenPriv->damageRegistered = 0; pScreenPriv->numberOfCursors = 0; dixSetPrivate(&pScreen->devPrivates, &miSpriteScreenKeyRec, pScreenPriv); pScreen->CloseScreen = miSpriteCloseScreen; pScreen->SourceValidate = miSpriteSourceValidate; pScreen->CopyWindow = miSpriteCopyWindow; pScreen->InstallColormap = miSpriteInstallColormap; pScreen->StoreColors = miSpriteStoreColors; return TRUE; } /* * Screen wrappers */ /* * CloseScreen wrapper -- unwrap everything, free the private data * and call the wrapped function */ static Bool miSpriteCloseScreen(ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv = GetSpriteScreen(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->SourceValidate = pScreenPriv->SourceValidate; pScreen->InstallColormap = pScreenPriv->InstallColormap; pScreen->StoreColors = pScreenPriv->StoreColors; DamageDestroy(pScreenPriv->pDamage); free(pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } static void miSpriteSourceValidate(DrawablePtr pDrawable, int x, int y, int width, int height, unsigned int subWindowMode) { ScreenPtr pScreen = pDrawable->pScreen; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen); SCREEN_PROLOGUE(pPriv, pScreen, SourceValidate); if (pDrawable->type == DRAWABLE_WINDOW) { for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && ORG_OVERLAP(&pCursorInfo->saved, pDrawable->x, pDrawable->y, x, y, width, height)) { SPRITE_DEBUG(("SourceValidate remove\n")); miSpriteRemoveCursor(pDev, pScreen); } } } } (*pScreen->SourceValidate) (pDrawable, x, y, width, height, subWindowMode); SCREEN_EPILOGUE(pPriv, pScreen, SourceValidate); } static void miSpriteCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWindow->drawable.pScreen; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen); SCREEN_PROLOGUE(pPriv, pScreen, CopyWindow); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); /* * Damage will take care of destination check */ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && RegionContainsRect(prgnSrc, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("CopyWindow remove\n")); miSpriteRemoveCursor(pDev, pScreen); } } } (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); SCREEN_EPILOGUE(pPriv, pScreen, CopyWindow); } static void miSpriteBlockHandler(ScreenPtr pScreen, void *timeout) { miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen); DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; Bool WorkToDo = FALSE; SCREEN_PROLOGUE(pPriv, pScreen, BlockHandler); for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); if (pCursorInfo && !pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && pCursorInfo->shouldBeUp) { SPRITE_DEBUG(("BlockHandler save")); miSpriteSaveUnderCursor(pDev, pScreen); } } } for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); if (pCursorInfo && !pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && pCursorInfo->shouldBeUp) { SPRITE_DEBUG(("BlockHandler restore\n")); miSpriteRestoreCursor(pDev, pScreen); if (!pCursorInfo->isUp) WorkToDo = TRUE; } } } (*pScreen->BlockHandler) (pScreen, timeout); if (WorkToDo) SCREEN_EPILOGUE(pPriv, pScreen, BlockHandler); else pPriv->BlockHandler = NULL; } static void miSpriteInstallColormap(ColormapPtr pMap) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen); SCREEN_PROLOGUE(pPriv, pScreen, InstallColormap); (*pScreen->InstallColormap) (pMap); SCREEN_EPILOGUE(pPriv, pScreen, InstallColormap); /* InstallColormap can be called before devices are initialized. */ pPriv->pInstalledMap = pMap; if (pPriv->pColormap != pMap) { DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); pCursorInfo->checkPixels = TRUE; if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) miSpriteRemoveCursor(pDev, pScreen); } } } } static void miSpriteStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef) { ScreenPtr pScreen = pMap->pScreen; miSpriteScreenPtr pPriv = GetSpriteScreen(pScreen); int i; int updated; VisualPtr pVisual; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE(pPriv, pScreen, StoreColors); (*pScreen->StoreColors) (pMap, ndef, pdef); SCREEN_EPILOGUE(pPriv, pScreen, StoreColors); if (pPriv->pColormap == pMap) { updated = 0; pVisual = pMap->pVisual; if (pVisual->class == DirectColor) { /* Direct color - match on any of the subfields */ #define MaskMatch(a,b,mask) (((a) & (pVisual->mask)) == ((b) & (pVisual->mask))) #define UpdateDAC(dev, plane,dac,mask) {\ if (MaskMatch (dev->colors[plane].pixel,pdef[i].pixel,mask)) {\ dev->colors[plane].dac = pdef[i].dac; \ updated = 1; \ } \ } #define CheckDirect(dev, plane) \ UpdateDAC(dev, plane,red,redMask) \ UpdateDAC(dev, plane,green,greenMask) \ UpdateDAC(dev, plane,blue,blueMask) for (i = 0; i < ndef; i++) { CheckDirect(pPriv, SOURCE_COLOR) CheckDirect(pPriv, MASK_COLOR) } } else { /* PseudoColor/GrayScale - match on exact pixel */ for (i = 0; i < ndef; i++) { if (pdef[i].pixel == pPriv->colors[SOURCE_COLOR].pixel) { pPriv->colors[SOURCE_COLOR] = pdef[i]; if (++updated == 2) break; } if (pdef[i].pixel == pPriv->colors[MASK_COLOR].pixel) { pPriv->colors[MASK_COLOR] = pdef[i]; if (++updated == 2) break; } } } if (updated) { for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) { pCursorInfo = GetSprite(pDev); pCursorInfo->checkPixels = TRUE; if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen) miSpriteRemoveCursor(pDev, pScreen); } } } } } static void miSpriteFindColors(miCursorInfoPtr pDevCursor, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv = GetSpriteScreen(pScreen); CursorPtr pCursor; xColorItem *sourceColor, *maskColor; pCursor = pDevCursor->pCursor; sourceColor = &pScreenPriv->colors[SOURCE_COLOR]; maskColor = &pScreenPriv->colors[MASK_COLOR]; if (pScreenPriv->pColormap != pScreenPriv->pInstalledMap || !(pCursor->foreRed == sourceColor->red && pCursor->foreGreen == sourceColor->green && pCursor->foreBlue == sourceColor->blue && pCursor->backRed == maskColor->red && pCursor->backGreen == maskColor->green && pCursor->backBlue == maskColor->blue)) { pScreenPriv->pColormap = pScreenPriv->pInstalledMap; sourceColor->red = pCursor->foreRed; sourceColor->green = pCursor->foreGreen; sourceColor->blue = pCursor->foreBlue; FakeAllocColor(pScreenPriv->pColormap, sourceColor); maskColor->red = pCursor->backRed; maskColor->green = pCursor->backGreen; maskColor->blue = pCursor->backBlue; FakeAllocColor(pScreenPriv->pColormap, maskColor); /* "free" the pixels right away, don't let this confuse you */ FakeFreeColor(pScreenPriv->pColormap, sourceColor->pixel); FakeFreeColor(pScreenPriv->pColormap, maskColor->pixel); } pDevCursor->checkPixels = FALSE; } /* * miPointer interface routines */ #define SPRITE_PAD 8 static Bool miSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { miCursorInfoPtr pCursorInfo; if (IsFloating(pDev)) return FALSE; pCursorInfo = GetSprite(pDev); if (pCursor == pCursorInfo->pCursor) pCursorInfo->checkPixels = TRUE; return miDCRealizeCursor(pScreen, pCursor); } static Bool miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { return miDCUnrealizeCursor(pScreen, pCursor); } static void miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { miCursorInfoPtr pPointer; miSpriteScreenPtr pScreenPriv; if (IsFloating(pDev)) return; pPointer = GetSprite(pDev); pScreenPriv = GetSpriteScreen(pScreen); if (!pCursor) { if (pPointer->shouldBeUp) --pScreenPriv->numberOfCursors; pPointer->shouldBeUp = FALSE; if (pPointer->isUp) miSpriteRemoveCursor(pDev, pScreen); if (pScreenPriv->numberOfCursors == 0) miSpriteDisableDamage(pScreen, pScreenPriv); pPointer->pCursor = 0; return; } if (!pPointer->shouldBeUp) pScreenPriv->numberOfCursors++; pPointer->shouldBeUp = TRUE; if (!pPointer->isUp) miSpriteRegisterBlockHandler(pScreen, pScreenPriv); if (pPointer->x == x && pPointer->y == y && pPointer->pCursor == pCursor && !pPointer->checkPixels) { return; } pPointer->x = x; pPointer->y = y; if (pPointer->checkPixels || pPointer->pCursor != pCursor) { pPointer->pCursor = pCursor; miSpriteFindColors(pPointer, pScreen); } if (pPointer->isUp) { /* TODO: reimplement flicker-free MoveCursor */ SPRITE_DEBUG(("SetCursor remove %d\n", pDev->id)); miSpriteRemoveCursor(pDev, pScreen); } if (!pPointer->isUp && pPointer->pCursor) { SPRITE_DEBUG(("SetCursor restore %d\n", pDev->id)); miSpriteSaveUnderCursor(pDev, pScreen); miSpriteRestoreCursor(pDev, pScreen); } } static void miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { CursorPtr pCursor; if (IsFloating(pDev)) return; pCursor = GetSprite(pDev)->pCursor; miSpriteSetCursor(pDev, pScreen, pCursor, x, y); } static Bool miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { int ret = miDCDeviceInitialize(pDev, pScreen); if (ret) { miCursorInfoPtr pCursorInfo; pCursorInfo = dixLookupPrivate(&pDev->devPrivates, &miSpriteDevPrivatesKeyRec); pCursorInfo->pCursor = NULL; pCursorInfo->x = 0; pCursorInfo->y = 0; pCursorInfo->isUp = FALSE; pCursorInfo->shouldBeUp = FALSE; pCursorInfo->checkPixels = TRUE; pCursorInfo->pScreen = FALSE; } return ret; } static void miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { miCursorInfoPtr pCursorInfo = dixLookupPrivate(&pDev->devPrivates, &miSpriteDevPrivatesKeyRec); if (DevHasCursor(pDev)) miDCDeviceCleanup(pDev, pScreen); memset(pCursorInfo, 0, sizeof(miCursorInfoRec)); } /* * undraw/draw cursor */ static void miSpriteRemoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; if (IsFloating(pDev)) return; DamageDrawInternal(pScreen, TRUE); pScreenPriv = GetSpriteScreen(pScreen); pCursorInfo = GetSprite(pDev); miSpriteIsDown(pCursorInfo); miSpriteRegisterBlockHandler(pScreen, pScreenPriv); miSpriteDisableDamage(pScreen, pScreenPriv); if (!miDCRestoreUnderCursor(pDev, pScreen, pCursorInfo->saved.x1, pCursorInfo->saved.y1, pCursorInfo->saved.x2 - pCursorInfo->saved.x1, pCursorInfo->saved.y2 - pCursorInfo->saved.y1)) { miSpriteIsUp(pCursorInfo); } miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal(pScreen, FALSE); } /* * Called from the block handler, saves area under cursor * before waiting for something to do. */ static void miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; if (IsFloating(pDev)) return; DamageDrawInternal(pScreen, TRUE); pScreenPriv = GetSpriteScreen(pScreen); pCursorInfo = GetSprite(pDev); miSpriteComputeSaved(pDev, pScreen); miSpriteDisableDamage(pScreen, pScreenPriv); miDCSaveUnderCursor(pDev, pScreen, pCursorInfo->saved.x1, pCursorInfo->saved.y1, pCursorInfo->saved.x2 - pCursorInfo->saved.x1, pCursorInfo->saved.y2 - pCursorInfo->saved.y1); SPRITE_DEBUG(("SaveUnderCursor %d\n", pDev->id)); miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal(pScreen, FALSE); } /* * Called from the block handler, restores the cursor * before waiting for something to do. */ static void miSpriteRestoreCursor(DeviceIntPtr pDev, ScreenPtr pScreen) { miSpriteScreenPtr pScreenPriv; int x, y; CursorPtr pCursor; miCursorInfoPtr pCursorInfo; if (IsFloating(pDev)) return; DamageDrawInternal(pScreen, TRUE); pScreenPriv = GetSpriteScreen(pScreen); pCursorInfo = GetSprite(pDev); miSpriteComputeSaved(pDev, pScreen); pCursor = pCursorInfo->pCursor; x = pCursorInfo->x - (int) pCursor->bits->xhot; y = pCursorInfo->y - (int) pCursor->bits->yhot; miSpriteDisableDamage(pScreen, pScreenPriv); SPRITE_DEBUG(("RestoreCursor %d\n", pDev->id)); if (pCursorInfo->checkPixels) miSpriteFindColors(pCursorInfo, pScreen); if (miDCPutUpCursor(pDev, pScreen, pCursor, x, y, pScreenPriv->colors[SOURCE_COLOR].pixel, pScreenPriv->colors[MASK_COLOR].pixel)) { miSpriteIsUp(pCursorInfo); pCursorInfo->pScreen = pScreen; } miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal(pScreen, FALSE); } /* * compute the desired area of the screen to save */ static void miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen) { int x, y, w, h; int wpad, hpad; CursorPtr pCursor; miCursorInfoPtr pCursorInfo; if (IsFloating(pDev)) return; pCursorInfo = GetSprite(pDev); pCursor = pCursorInfo->pCursor; x = pCursorInfo->x - (int) pCursor->bits->xhot; y = pCursorInfo->y - (int) pCursor->bits->yhot; w = pCursor->bits->width; h = pCursor->bits->height; wpad = SPRITE_PAD; hpad = SPRITE_PAD; pCursorInfo->saved.x1 = x - wpad; pCursorInfo->saved.y1 = y - hpad; pCursorInfo->saved.x2 = pCursorInfo->saved.x1 + w + wpad * 2; pCursorInfo->saved.y2 = pCursorInfo->saved.y1 + h + hpad * 2; } xorg-server-21.1.16/mi/misprite.h0000644000175000017500000000414114757411105012245 /* * misprite.h * * software-sprite/sprite drawing interface spec * * mi versions of these routines exist. */ /* Copyright 1989, 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. */ extern Bool miSpriteInitialize(ScreenPtr /*pScreen */ , miPointerScreenFuncPtr /*screenFuncs */ ); extern Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); extern Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); extern Bool miDCPutUpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y, unsigned long source, unsigned long mask); extern Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h); extern Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h); extern Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); extern void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); xorg-server-21.1.16/mi/mivaltree.c0000644000175000017500000006316514757411105012407 /* * mivaltree.c -- * Functions for recalculating window clip lists. Main function * is miValidateTree. * Copyright 1987, 1988, 1989, 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, 1988, 1989 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. * ******************************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ /* * Aug '86: Susan Angebranndt -- original code * July '87: Adam de Boor -- substantially modified and commented * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. * In particular, much improved code for window mapping and * circulating. * Bob Scheifler -- avoid miComputeClips for unmapped windows, * valdata changes */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" #include "mi.h" #include "regionstr.h" #include "mivalidate.h" #include "globals.h" #ifdef COMPOSITE #include "compint.h" #endif /* * Compute the visibility of a shaped window */ int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y) { BoxRec box; BoxPtr boundBox; int nbox; Bool someIn, someOut; int t, x1, y1, x2, y2; nbox = RegionNumRects(bounding); boundBox = RegionRects(bounding); someIn = someOut = FALSE; x1 = rect->x1; y1 = rect->y1; x2 = rect->x2; y2 = rect->y2; while (nbox--) { if ((t = boundBox->x1 + x) < x1) t = x1; box.x1 = t; if ((t = boundBox->y1 + y) < y1) t = y1; box.y1 = t; if ((t = boundBox->x2 + x) > x2) t = x2; box.x2 = t; if ((t = boundBox->y2 + y) > y2) t = y2; box.y2 = t; if (box.x1 > box.x2) box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; switch (RegionContainsRect(universe, &box)) { case rgnIN: if (someOut) return rgnPART; someIn = TRUE; break; case rgnOUT: if (someIn) return rgnPART; someOut = TRUE; break; default: return rgnPART; } boundBox++; } if (someIn) return rgnIN; return rgnOUT; } /* * Manual redirected windows are treated as transparent; they do not obscure * siblings or parent windows */ #ifdef COMPOSITE #define TreatAsTransparent(w) ((w)->redirectDraw == RedirectDrawManual) #else #define TreatAsTransparent(w) FALSE #endif #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) /* *----------------------------------------------------------------------- * miComputeClips -- * Recompute the clipList, borderClip, exposed and borderExposed * regions for pParent and its children. Only viewable windows are * taken into account. * * Results: * None. * * Side Effects: * clipList, borderClip, exposed and borderExposed are altered. * A VisibilityNotify event may be generated on the parent window. * *----------------------------------------------------------------------- */ static void miComputeClips(WindowPtr pParent, ScreenPtr pScreen, RegionPtr universe, VTKind kind, RegionPtr exposed) { /* for intermediate calculations */ int dx, dy; RegionRec childUniverse; WindowPtr pChild; int oldVis, newVis; BoxRec borderSize; RegionRec childUnion; Bool overlap; RegionPtr borderVisible; /* * Figure out the new visibility of this window. * The extent of the universe should be the same as the extent of * the borderSize region. If the window is unobscured, this rectangle * will be completely inside the universe (the universe will cover it * completely). If the window is completely obscured, none of the * universe will cover the rectangle. */ borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); if (dx > 32767) dx = 32767; borderSize.x2 = dx; dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); if (dy > 32767) dy = 32767; borderSize.y2 = dy; #ifdef COMPOSITE /* * In redirected drawing case, reset universe to borderSize */ if (pParent->redirectDraw != RedirectDrawNone) { if (TreatAsTransparent(pParent)) RegionEmpty(universe); compSetRedirectBorderClip (pParent, universe); RegionCopy(universe, &pParent->borderSize); } #endif oldVis = pParent->visibility; switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnPART: newVis = VisibilityPartiallyObscured; { RegionPtr pBounding; if ((pBounding = wBoundingShape(pParent))) { switch (miShapedWindowIn(universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnOUT: newVis = VisibilityFullyObscured; break; } } } break; default: newVis = VisibilityFullyObscured; break; } pParent->visibility = newVis; if (oldVis != newVis && ((pParent-> eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) SendVisibilityNotify(pParent); dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; /* * avoid computations when dealing with simple operations */ switch (kind) { case VTMap: case VTStack: case VTUnmap: break; case VTMove: if ((oldVis == newVis) && ((oldVis == VisibilityFullyObscured) || (oldVis == VisibilityUnobscured))) { pChild = pParent; while (1) { if (pChild->viewable) { if (pChild->visibility != VisibilityFullyObscured) { RegionTranslate(&pChild->borderClip, dx, dy); RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pChild, dx, dy); } if (pChild->valdata) { RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { RegionSubtract(&pChild->valdata->after. borderExposed, &pChild->borderClip, &pChild->winSize); } RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pParent)) pChild = pChild->parent; if (pChild == pParent) break; pChild = pChild->nextSib; } return; } /* fall through */ default: /* * To calculate exposures correctly, we have to translate the old * borderClip and clipList regions to the window's new location so there * is a correspondence between pieces of the new and old clipping regions. */ if (dx || dy) { /* * We translate the old clipList because that will be exposed or copied * if gravity is right. */ RegionTranslate(&pParent->borderClip, dx, dy); RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: RegionEmpty(&pParent->borderClip); RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; RegionNull(&pParent->valdata->after.borderExposed); RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do * the border exposure first... * * 'universe' is the window's borderClip. To figure the exposures, remove * the area that used to be exposed from the new. * This leaves a region of pieces that weren't exposed before. */ if (HasBorder(pParent)) { if (borderVisible) { /* * when the border changes shape, the old visible portions * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ RegionSubtract(exposed, universe, borderVisible); RegionDestroy(borderVisible); } else { RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); else RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure * that no child overlaps the parent's border, we remove the parent's * border from the universe before proceeding. */ RegionIntersect(universe, universe, &pParent->winSize); } else RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { RegionNull(&childUniverse); RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) { for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable && !TreatAsTransparent(pChild)) RegionAppend(&childUnion, &pChild->borderSize); } } else { for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable && !TreatAsTransparent(pChild)) RegionAppend(&childUnion, &pChild->borderSize); } } RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->viewable) { /* * If the child is viewable, we want to remove its extents * from the current universe, but we only re-clip it if * it's been marked. */ if (pChild->valdata) { /* * Figure out the new universe from the child's * perspective and recurse. */ RegionIntersect(&childUniverse, universe, &pChild->borderSize); miComputeClips(pChild, pScreen, &childUniverse, kind, exposed); } /* * Once the child has been processed, we remove its extents * from the current universe, thus denying its space to any * other sibling. */ if (overlap && !TreatAsTransparent(pChild)) RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) RegionSubtract(universe, universe, &childUnion); RegionUninit(&childUnion); RegionUninit(&childUniverse); } /* if any children */ /* * 'universe' now contains the new clipList for the parent window. * * To figure the exposure of the window we subtract the old clip from the * new, just as for the border. */ if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } /* HACK ALERT - copying contents of regions, instead of regions */ { RegionRec tmp; tmp = pParent->clipList; pParent->clipList = *universe; *universe = tmp; } #ifdef NOTDEF RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, dx, dy); } static void miTreeObscured(WindowPtr pParent) { WindowPtr pChild; int oldVis; pChild = pParent; while (1) { if (pChild->viewable) { oldVis = pChild->visibility; if (oldVis != (pChild->visibility = VisibilityFullyObscured) && ((pChild-> eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) SendVisibilityNotify(pChild); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pParent)) pChild = pChild->parent; if (pChild == pParent) break; pChild = pChild->nextSib; } } static RegionPtr getBorderClip(WindowPtr pWin) { #ifdef COMPOSITE if (pWin->redirectDraw != RedirectDrawNone) return compGetRedirectBorderClip(pWin); else #endif return &pWin->borderClip; } /* *----------------------------------------------------------------------- * miValidateTree -- * Recomputes the clip list for pParent and all its inferiors. * * Results: * Always returns 1. * * Side Effects: * The clipList, borderClip, exposed, and borderExposed regions for * each marked window are altered. * * Notes: * This routine assumes that all affected windows have been marked * (valdata created) and their winSize and borderSize regions * adjusted to correspond to their new positions. The borderClip and * clipList regions should not have been touched. * * The top-most level is treated differently from all lower levels * because pParent is unchanged. For the top level, we merge the * regions taken up by the marked children back into the clipList * for pParent, thus forming a region from which the marked children * can claim their areas. For lower levels, where the old clipList * and borderClip are invalid, we can't do this and have to do the * extra operations done in miComputeClips, but this is much faster * e.g. when only one child has moved... * *----------------------------------------------------------------------- */ /*ARGSUSED*/ int miValidateTree(WindowPtr pParent, /* Parent to validate */ WindowPtr pChild, /* First child of pParent that was * affected */ VTKind kind /* What kind of configuration caused call */ ) { RegionRec totalClip; /* Total clipping region available to * the marked children. pParent's clipList * merged with the borderClips of all * the marked children. */ RegionRec childClip; /* The new borderClip for the current * child */ RegionRec childUnion; /* the space covered by borderSize for * all marked children */ RegionRec exposed; /* For intermediate calculations */ ScreenPtr pScreen; WindowPtr pWin; Bool overlap; int viewvals; Bool forward; pScreen = pParent->drawable.pScreen; if (pChild == NullWindow) pChild = pParent->firstChild; RegionNull(&childClip); RegionNull(&exposed); /* * compute the area of the parent window occupied * by the marked children + the parent itself. This * is the area which can be divied up among the marked * children in their new configuration. */ RegionNull(&totalClip); viewvals = 0; if (RegionBroken(&pParent->clipList) && !RegionBroken(&pParent->borderClip)) { kind = VTBroken; /* * When rebuilding clip lists after out of memory, * assume everything is busted. */ forward = TRUE; RegionCopy(&totalClip, &pParent->borderClip); RegionIntersect(&totalClip, &totalClip, &pParent->winSize); for (pWin = pParent->firstChild; pWin != pChild; pWin = pWin->nextSib) { if (pWin->viewable && !TreatAsTransparent(pWin)) RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable) viewvals++; RegionEmpty(&pParent->clipList); } else { if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) { forward = TRUE; for (pWin = pChild; pWin; pWin = pWin->nextSib) { if (pWin->valdata) { RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } } } else { forward = FALSE; pWin = pParent->lastChild; while (1) { if (pWin->valdata) { RegionAppend(&totalClip, getBorderClip(pWin)); if (pWin->viewable) viewvals++; } if (pWin == pChild) break; pWin = pWin->prevSib; } } RegionValidate(&totalClip, &overlap); } /* * Now go through the children of the root and figure their new * borderClips from the totalClip, passing that off to miComputeClips * to handle recursively. Once that's done, we remove the child * from the totalClip to clip any siblings below it. */ overlap = TRUE; if (kind != VTStack) { RegionUnion(&totalClip, &totalClip, &pParent->clipList); if (viewvals > 1) { /* * precompute childUnion to discover whether any of them * overlap. This seems redundant, but performance studies * have demonstrated that the cost of this loop is * lower than the cost of multiple Subtracts in the * loop below. */ RegionNull(&childUnion); if (forward) { for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable && !TreatAsTransparent(pWin)) RegionAppend(&childUnion, &pWin->borderSize); } else { pWin = pParent->lastChild; while (1) { if (pWin->valdata && pWin->viewable && !TreatAsTransparent(pWin)) RegionAppend(&childUnion, &pWin->borderSize); if (pWin == pChild) break; pWin = pWin->prevSib; } } RegionValidate(&childUnion, &overlap); if (overlap) RegionUninit(&childUnion); } } for (pWin = pChild; pWin != NullWindow; pWin = pWin->nextSib) { if (pWin->viewable) { if (pWin->valdata) { RegionIntersect(&childClip, &totalClip, &pWin->borderSize); miComputeClips(pWin, pScreen, &childClip, kind, &exposed); if (overlap && !TreatAsTransparent(pWin)) { RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } } else if (pWin->visibility == VisibilityNotViewable) { miTreeObscured(pWin); } } else { if (pWin->valdata) { RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pWin, 0, 0); RegionEmpty(&pWin->borderClip); pWin->valdata = NULL; } } } RegionUninit(&childClip); if (!overlap) { RegionSubtract(&totalClip, &totalClip, &childUnion); RegionUninit(&childUnion); } RegionNull(&pParent->valdata->after.exposed); RegionNull(&pParent->valdata->after.borderExposed); /* * each case below is responsible for updating the * clipList and serial number for the parent window */ switch (kind) { case VTStack: break; default: /* * totalClip contains the new clipList for the parent. Figure out * exposures and obscures as per miComputeClips and reset the parent's * clipList. */ RegionSubtract(&pParent->valdata->after.exposed, &totalClip, &pParent->clipList); /* fall through */ case VTMap: RegionCopy(&pParent->clipList, &totalClip); pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; break; } RegionUninit(&totalClip); RegionUninit(&exposed); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, 0, 0); return 1; } xorg-server-21.1.16/mi/mivalidate.h0000644000175000017500000000337714757411105012542 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef MIVALIDATE_H #define MIVALIDATE_H #include "regionstr.h" typedef union _Validate { struct BeforeValidate { DDXPointRec oldAbsCorner; /* old window position */ RegionPtr borderVisible; /* visible region of border, */ /* non-null when size changes */ Bool resized; /* unclipped winSize has changed */ } before; struct AfterValidate { RegionRec exposed; /* exposed regions, absolute pos */ RegionRec borderExposed; } after; } ValidateRec; #endif /* MIVALIDATE_H */ xorg-server-21.1.16/mi/miwideline.c0000644000175000017500000022174614757411105012546 /* Copyright 1988, 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 1989 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. */ /* Author: Keith Packard, MIT X Consortium */ /* * Mostly integer wideline code. Uses a technique similar to * bresenham zero-width lines, except walks an X edge */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #ifdef _XOPEN_SOURCE #include #else #define _XOPEN_SOURCE /* to get prototype for hypot on some systems */ #include #undef _XOPEN_SOURCE #endif #include #include "windowstr.h" #include "gcstruct.h" #include "regionstr.h" #include "miwideline.h" #include "mi.h" #if 0 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "misc.h" #include "pixmapstr.h" #include "gcstruct.h" #endif typedef struct { int count; /* number of spans */ DDXPointPtr points; /* pointer to list of start points */ int *widths; /* pointer to list of widths */ } Spans; typedef struct { int size; /* Total number of *Spans allocated */ int count; /* Number of *Spans actually in group */ Spans *group; /* List of Spans */ int ymin, ymax; /* Min, max y values encountered */ } SpanGroup; /* Rops which must use span groups */ #define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2) #define miSpansEasyRop(rop) (!miSpansCarefulRop(rop)) /* These routines maintain lists of Spans, in order to implement the ``touch-each-pixel-once'' rules of wide lines and arcs. Written by Joel McCormack, Summer 1989. */ static void miInitSpanGroup(SpanGroup * spanGroup) { spanGroup->size = 0; spanGroup->count = 0; spanGroup->group = NULL; spanGroup->ymin = MAXSHORT; spanGroup->ymax = MINSHORT; } /* InitSpanGroup */ #define YMIN(spans) (spans->points[0].y) #define YMAX(spans) (spans->points[spans->count-1].y) static void miSubtractSpans(SpanGroup * spanGroup, Spans * sub) { int i, subCount, spansCount; int ymin, ymax, xmin, xmax; Spans *spans; DDXPointPtr subPt, spansPt; int *subWid, *spansWid; int extra; ymin = YMIN(sub); ymax = YMAX(sub); spans = spanGroup->group; for (i = spanGroup->count; i; i--, spans++) { if (YMIN(spans) <= ymax && ymin <= YMAX(spans)) { subCount = sub->count; subPt = sub->points; subWid = sub->widths; spansCount = spans->count; spansPt = spans->points; spansWid = spans->widths; extra = 0; for (;;) { while (spansCount && spansPt->y < subPt->y) { spansPt++; spansWid++; spansCount--; } if (!spansCount) break; while (subCount && subPt->y < spansPt->y) { subPt++; subWid++; subCount--; } if (!subCount) break; if (subPt->y == spansPt->y) { xmin = subPt->x; xmax = xmin + *subWid; if (xmin >= spansPt->x + *spansWid || spansPt->x >= xmax) { ; } else if (xmin <= spansPt->x) { if (xmax >= spansPt->x + *spansWid) { memmove(spansPt, spansPt + 1, sizeof *spansPt * (spansCount - 1)); memmove(spansWid, spansWid + 1, sizeof *spansWid * (spansCount - 1)); spansPt--; spansWid--; spans->count--; extra++; } else { *spansWid = *spansWid - (xmax - spansPt->x); spansPt->x = xmax; } } else { if (xmax >= spansPt->x + *spansWid) { *spansWid = xmin - spansPt->x; } else { if (!extra) { DDXPointPtr newPt; int *newwid; #define EXTRA 8 newPt = reallocarray(spans->points, spans->count + EXTRA, sizeof(DDXPointRec)); if (!newPt) break; spansPt = newPt + (spansPt - spans->points); spans->points = newPt; newwid = reallocarray(spans->widths, spans->count + EXTRA, sizeof(int)); if (!newwid) break; spansWid = newwid + (spansWid - spans->widths); spans->widths = newwid; extra = EXTRA; } memmove(spansPt + 1, spansPt, sizeof *spansPt * (spansCount)); memmove(spansWid + 1, spansWid, sizeof *spansWid * (spansCount)); spans->count++; extra--; *spansWid = xmin - spansPt->x; spansWid++; spansPt++; *spansWid = *spansWid - (xmax - spansPt->x); spansPt->x = xmax; } } } spansPt++; spansWid++; spansCount--; } } } } static void miAppendSpans(SpanGroup * spanGroup, SpanGroup * otherGroup, Spans * spans) { int ymin, ymax; int spansCount; spansCount = spans->count; if (spansCount > 0) { if (spanGroup->size == spanGroup->count) { spanGroup->size = (spanGroup->size + 8) * 2; spanGroup->group = reallocarray(spanGroup->group, sizeof(Spans), spanGroup->size); } spanGroup->group[spanGroup->count] = *spans; (spanGroup->count)++; ymin = spans->points[0].y; if (ymin < spanGroup->ymin) spanGroup->ymin = ymin; ymax = spans->points[spansCount - 1].y; if (ymax > spanGroup->ymax) spanGroup->ymax = ymax; if (otherGroup && otherGroup->ymin < ymax && ymin < otherGroup->ymax) { miSubtractSpans(otherGroup, spans); } } else { free(spans->points); free(spans->widths); } } /* AppendSpans */ static void miFreeSpanGroup(SpanGroup * spanGroup) { free(spanGroup->group); } static void QuickSortSpansX(DDXPointRec points[], int widths[], int numSpans) { int x; int i, j, m; DDXPointPtr r; /* Always called with numSpans > 1 */ /* Sorts only by x, as all y should be the same */ #define ExchangeSpans(a, b) \ { \ DDXPointRec tpt; \ int tw; \ \ tpt = points[a]; points[a] = points[b]; points[b] = tpt; \ tw = widths[a]; widths[a] = widths[b]; widths[b] = tw; \ } do { if (numSpans < 9) { /* Do insertion sort */ int xprev; xprev = points[0].x; i = 1; do { /* while i != numSpans */ x = points[i].x; if (xprev > x) { /* points[i] is out of order. Move into proper location. */ DDXPointRec tpt; int tw, k; for (j = 0; x >= points[j].x; j++) { } tpt = points[i]; tw = widths[i]; for (k = i; k != j; k--) { points[k] = points[k - 1]; widths[k] = widths[k - 1]; } points[j] = tpt; widths[j] = tw; x = points[i].x; } /* if out of order */ xprev = x; i++; } while (i != numSpans); return; } /* Choose partition element, stick in location 0 */ m = numSpans / 2; if (points[m].x > points[0].x) ExchangeSpans(m, 0); if (points[m].x > points[numSpans - 1].x) ExchangeSpans(m, numSpans - 1); if (points[m].x > points[0].x) ExchangeSpans(m, 0); x = points[0].x; /* Partition array */ i = 0; j = numSpans; do { r = &(points[i]); do { r++; i++; } while (i != numSpans && r->x < x); r = &(points[j]); do { r--; j--; } while (x < r->x); if (i < j) ExchangeSpans(i, j); } while (i < j); /* Move partition element back to middle */ ExchangeSpans(0, j); /* Recurse */ if (numSpans - j - 1 > 1) QuickSortSpansX(&points[j + 1], &widths[j + 1], numSpans - j - 1); numSpans = j; } while (numSpans > 1); } /* QuickSortSpans */ static int UniquifySpansX(Spans * spans, DDXPointRec * newPoints, int *newWidths) { int newx1, newx2, oldpt, i, y; DDXPointRec *oldPoints; int *oldWidths; int *startNewWidths; /* Always called with numSpans > 1 */ /* Uniquify the spans, and stash them into newPoints and newWidths. Return the number of unique spans. */ startNewWidths = newWidths; oldPoints = spans->points; oldWidths = spans->widths; y = oldPoints->y; newx1 = oldPoints->x; newx2 = newx1 + *oldWidths; for (i = spans->count - 1; i != 0; i--) { oldPoints++; oldWidths++; oldpt = oldPoints->x; if (oldpt > newx2) { /* Write current span, start a new one */ newPoints->x = newx1; newPoints->y = y; *newWidths = newx2 - newx1; newPoints++; newWidths++; newx1 = oldpt; newx2 = oldpt + *oldWidths; } else { /* extend current span, if old extends beyond new */ oldpt = oldpt + *oldWidths; if (oldpt > newx2) newx2 = oldpt; } } /* for */ /* Write final span */ newPoints->x = newx1; *newWidths = newx2 - newx1; newPoints->y = y; return (newWidths - startNewWidths) + 1; } /* UniquifySpansX */ static void miDisposeSpanGroup(SpanGroup * spanGroup) { int i; Spans *spans; for (i = 0; i < spanGroup->count; i++) { spans = spanGroup->group + i; free(spans->points); free(spans->widths); } } static void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup * spanGroup) { int i; Spans *spans; Spans *yspans; int *ysizes; int ymin, ylength; /* Outgoing spans for one big call to FillSpans */ DDXPointPtr points; int *widths; int count; if (spanGroup->count == 0) return; if (spanGroup->count == 1) { /* Already should be sorted, unique */ spans = spanGroup->group; (*pGC->ops->FillSpans) (pDraw, pGC, spans->count, spans->points, spans->widths, TRUE); free(spans->points); free(spans->widths); } else { /* Yuck. Gross. Radix sort into y buckets, then sort x and uniquify */ /* This seems to be the fastest thing to do. I've tried sorting on both x and y at the same time rather than creating into all those y buckets, but it was somewhat slower. */ ymin = spanGroup->ymin; ylength = spanGroup->ymax - ymin + 1; /* Allocate Spans for y buckets */ yspans = xallocarray(ylength, sizeof(Spans)); ysizes = xallocarray(ylength, sizeof(int)); if (!yspans || !ysizes) { free(yspans); free(ysizes); miDisposeSpanGroup(spanGroup); return; } for (i = 0; i != ylength; i++) { ysizes[i] = 0; yspans[i].count = 0; yspans[i].points = NULL; yspans[i].widths = NULL; } /* Go through every single span and put it into the correct bucket */ count = 0; for (i = 0, spans = spanGroup->group; i != spanGroup->count; i++, spans++) { int index; int j; for (j = 0, points = spans->points, widths = spans->widths; j != spans->count; j++, points++, widths++) { index = points->y - ymin; if (index >= 0 && index < ylength) { Spans *newspans = &(yspans[index]); if (newspans->count == ysizes[index]) { DDXPointPtr newpoints; int *newwidths; ysizes[index] = (ysizes[index] + 8) * 2; newpoints = reallocarray(newspans->points, ysizes[index], sizeof(DDXPointRec)); newwidths = reallocarray(newspans->widths, ysizes[index], sizeof(int)); if (!newpoints || !newwidths) { for (i = 0; i < ylength; i++) { free(yspans[i].points); free(yspans[i].widths); } free(yspans); free(ysizes); free(newpoints); free(newwidths); miDisposeSpanGroup(spanGroup); return; } newspans->points = newpoints; newspans->widths = newwidths; } newspans->points[newspans->count] = *points; newspans->widths[newspans->count] = *widths; (newspans->count)++; } /* if y value of span in range */ } /* for j through spans */ count += spans->count; free(spans->points); spans->points = NULL; free(spans->widths); spans->widths = NULL; } /* for i thorough Spans */ /* Now sort by x and uniquify each bucket into the final array */ points = xallocarray(count, sizeof(DDXPointRec)); widths = xallocarray(count, sizeof(int)); if (!points || !widths) { for (i = 0; i < ylength; i++) { free(yspans[i].points); free(yspans[i].widths); } free(yspans); free(ysizes); free(points); free(widths); return; } count = 0; for (i = 0; i != ylength; i++) { int ycount = yspans[i].count; if (ycount > 0) { if (ycount > 1) { QuickSortSpansX(yspans[i].points, yspans[i].widths, ycount); count += UniquifySpansX (&(yspans[i]), &(points[count]), &(widths[count])); } else { points[count] = yspans[i].points[0]; widths[count] = yspans[i].widths[0]; count++; } free(yspans[i].points); free(yspans[i].widths); } } (*pGC->ops->FillSpans) (pDraw, pGC, count, points, widths, TRUE); free(points); free(widths); free(yspans); free(ysizes); /* use (DE)xalloc for these? */ } spanGroup->count = 0; spanGroup->ymin = MAXSHORT; spanGroup->ymax = MINSHORT; } static Bool InitSpans(Spans * spans, size_t nspans) { spans->points = xallocarray(nspans, sizeof(*spans->points)); if (!spans->points) return FALSE; spans->widths = xallocarray(nspans, sizeof(*spans->widths)); if (!spans->widths) { free(spans->points); return FALSE; } return TRUE; } /* * interface data to span-merging polygon filler */ typedef struct _SpanData { SpanGroup fgGroup, bgGroup; } SpanDataRec, *SpanDataPtr; static void AppendSpanGroup(GCPtr pGC, unsigned long pixel, Spans * spanPtr, SpanDataPtr spanData) { SpanGroup *group, *othergroup = NULL; if (pixel == pGC->fgPixel) { group = &spanData->fgGroup; if (pGC->lineStyle == LineDoubleDash) othergroup = &spanData->bgGroup; } else { group = &spanData->bgGroup; othergroup = &spanData->fgGroup; } miAppendSpans(group, othergroup, spanPtr); } static void miLineArc(DrawablePtr pDraw, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, LineFacePtr leftFace, LineFacePtr rightFace, double xorg, double yorg, Bool isInt); /* * spans-based polygon filler */ static void fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans * spans, SpanDataPtr spanData) { if (!spanData) { ChangeGCVal oldPixel, tmpPixel; oldPixel.val = pGC->fgPixel; if (pixel != oldPixel.val) { tmpPixel.val = (XID) pixel; ChangeGC(NullClient, pGC, GCForeground, &tmpPixel); ValidateGC(pDrawable, pGC); } (*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points, spans->widths, TRUE); free(spans->widths); free(spans->points); if (pixel != oldPixel.val) { ChangeGC(NullClient, pGC, GCForeground, &oldPixel); ValidateGC(pDrawable, pGC); } } else AppendSpanGroup(pGC, pixel, spans, spanData); } static void miFillPolyHelper(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, int y, int overall_height, PolyEdgePtr left, PolyEdgePtr right, int left_count, int right_count) { int left_x = 0, left_e = 0; int left_stepx = 0; int left_signdx = 0; int left_dy = 0, left_dx = 0; int right_x = 0, right_e = 0; int right_stepx = 0; int right_signdx = 0; int right_dy = 0, right_dx = 0; int height = 0; int left_height = 0, right_height = 0; DDXPointPtr ppt; int *pwidth; int xorg; Spans spanRec; if (!InitSpans(&spanRec, overall_height)) return; ppt = spanRec.points; pwidth = spanRec.widths; xorg = 0; if (pGC->miTranslate) { y += pDrawable->y; xorg = pDrawable->x; } while ((left_count || left_height) && (right_count || right_height)) { if (!left_height && left_count) { left_height = left->height; left_x = left->x; left_stepx = left->stepx; left_signdx = left->signdx; left_e = left->e; left_dy = left->dy; left_dx = left->dx; --left_count; ++left; } if (!right_height && right_count) { right_height = right->height; right_x = right->x; right_stepx = right->stepx; right_signdx = right->signdx; right_e = right->e; right_dy = right->dy; right_dx = right->dx; --right_count; ++right; } height = left_height; if (height > right_height) height = right_height; left_height -= height; right_height -= height; while (--height >= 0) { if (right_x >= left_x) { ppt->y = y; ppt->x = left_x + xorg; ppt++; *pwidth++ = right_x - left_x + 1; } y++; left_x += left_stepx; left_e += left_dx; if (left_e > 0) { left_x += left_signdx; left_e -= left_dy; } right_x += right_stepx; right_e += right_dx; if (right_e > 0) { right_x += right_signdx; right_e -= right_dy; } } } spanRec.count = ppt - spanRec.points; fillSpans(pDrawable, pGC, pixel, &spanRec, spanData); } static void miFillRectPolyHelper(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, int x, int y, int w, int h) { DDXPointPtr ppt; int *pwidth; ChangeGCVal oldPixel, tmpPixel; Spans spanRec; xRectangle rect; if (!spanData) { rect.x = x; rect.y = y; rect.width = w; rect.height = h; oldPixel.val = pGC->fgPixel; if (pixel != oldPixel.val) { tmpPixel.val = (XID) pixel; ChangeGC(NullClient, pGC, GCForeground, &tmpPixel); ValidateGC(pDrawable, pGC); } (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect); if (pixel != oldPixel.val) { ChangeGC(NullClient, pGC, GCForeground, &oldPixel); ValidateGC(pDrawable, pGC); } } else { if (!InitSpans(&spanRec, h)) return; ppt = spanRec.points; pwidth = spanRec.widths; if (pGC->miTranslate) { y += pDrawable->y; x += pDrawable->x; } while (h--) { ppt->x = x; ppt->y = y; ppt++; *pwidth++ = w; y++; } spanRec.count = ppt - spanRec.points; AppendSpanGroup(pGC, pixel, &spanRec, spanData); } } static int miPolyBuildEdge(double x0, double y0, double k, /* x0 * dy - y0 * dx */ int dx, int dy, int xi, int yi, int left, PolyEdgePtr edge) { int x, y, e; int xady; if (dy < 0) { dy = -dy; dx = -dx; k = -k; } #ifdef NOTDEF { double realk, kerror; realk = x0 * dy - y0 * dx; kerror = fabs(realk - k); if (kerror > .1) printf("realk: %g k: %g\n", realk, k); } #endif y = ICEIL(y0); xady = ICEIL(k) + y * dx; if (xady <= 0) x = -(-xady / dy) - 1; else x = (xady - 1) / dy; e = xady - x * dy; if (dx >= 0) { edge->signdx = 1; edge->stepx = dx / dy; edge->dx = dx % dy; } else { edge->signdx = -1; edge->stepx = -(-dx / dy); edge->dx = -dx % dy; e = dy - e + 1; } edge->dy = dy; edge->x = x + left + xi; edge->e = e - dy; /* bias to compare against 0 instead of dy */ return y + yi; } #define StepAround(v, incr, max) (((v) + (incr) < 0) ? (max - 1) : ((v) + (incr) == max) ? 0 : ((v) + (incr))) static int miPolyBuildPoly(PolyVertexPtr vertices, PolySlopePtr slopes, int count, int xi, int yi, PolyEdgePtr left, PolyEdgePtr right, int *pnleft, int *pnright, int *h) { int top, bottom; double miny, maxy; int i; int j; int clockwise; int slopeoff; int s; int nright, nleft; int y, lasty = 0, bottomy, topy = 0; /* find the top of the polygon */ maxy = miny = vertices[0].y; bottom = top = 0; for (i = 1; i < count; i++) { if (vertices[i].y < miny) { top = i; miny = vertices[i].y; } if (vertices[i].y >= maxy) { bottom = i; maxy = vertices[i].y; } } clockwise = 1; slopeoff = 0; i = top; j = StepAround(top, -1, count); if ((int64_t) slopes[j].dy * slopes[i].dx > (int64_t) slopes[i].dy * slopes[j].dx) { clockwise = -1; slopeoff = -1; } bottomy = ICEIL(maxy) + yi; nright = 0; s = StepAround(top, slopeoff, count); i = top; while (i != bottom) { if (slopes[s].dy != 0) { y = miPolyBuildEdge(vertices[i].x, vertices[i].y, slopes[s].k, slopes[s].dx, slopes[s].dy, xi, yi, 0, &right[nright]); if (nright != 0) right[nright - 1].height = y - lasty; else topy = y; nright++; lasty = y; } i = StepAround(i, clockwise, count); s = StepAround(s, clockwise, count); } if (nright != 0) right[nright - 1].height = bottomy - lasty; if (slopeoff == 0) slopeoff = -1; else slopeoff = 0; nleft = 0; s = StepAround(top, slopeoff, count); i = top; while (i != bottom) { if (slopes[s].dy != 0) { y = miPolyBuildEdge(vertices[i].x, vertices[i].y, slopes[s].k, slopes[s].dx, slopes[s].dy, xi, yi, 1, &left[nleft]); if (nleft != 0) left[nleft - 1].height = y - lasty; nleft++; lasty = y; } i = StepAround(i, -clockwise, count); s = StepAround(s, -clockwise, count); } if (nleft != 0) left[nleft - 1].height = bottomy - lasty; *pnleft = nleft; *pnright = nright; *h = bottomy - topy; return topy; } static void miLineOnePoint(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, int x, int y) { DDXPointRec pt; int wid; unsigned long oldPixel; MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel); if (pGC->fillStyle == FillSolid) { pt.x = x; pt.y = y; (*pGC->ops->PolyPoint) (pDrawable, pGC, CoordModeOrigin, 1, &pt); } else { wid = 1; if (pGC->miTranslate) { x += pDrawable->x; y += pDrawable->y; } pt.x = x; pt.y = y; (*pGC->ops->FillSpans) (pDrawable, pGC, 1, &pt, &wid, TRUE); } MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel); } static void miLineJoin(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, LineFacePtr pLeft, LineFacePtr pRight) { double mx = 0, my = 0; double denom = 0.0; PolyVertexRec vertices[4]; PolySlopeRec slopes[4]; int edgecount; PolyEdgeRec left[4], right[4]; int nleft, nright; int y, height; int swapslopes; int joinStyle = pGC->joinStyle; int lw = pGC->lineWidth; if (lw == 1 && !spanData) { /* See if one of the lines will draw the joining pixel */ if (pLeft->dx > 0 || (pLeft->dx == 0 && pLeft->dy > 0)) return; if (pRight->dx > 0 || (pRight->dx == 0 && pRight->dy > 0)) return; if (joinStyle != JoinRound) { denom = -pLeft->dx * (double) pRight->dy + pRight->dx * (double) pLeft->dy; if (denom == 0) return; /* no join to draw */ } if (joinStyle != JoinMiter) { miLineOnePoint(pDrawable, pGC, pixel, spanData, pLeft->x, pLeft->y); return; } } else { if (joinStyle == JoinRound) { miLineArc(pDrawable, pGC, pixel, spanData, pLeft, pRight, (double) 0.0, (double) 0.0, TRUE); return; } denom = -pLeft->dx * (double) pRight->dy + pRight->dx * (double) pLeft->dy; if (denom == 0.0) return; /* no join to draw */ } swapslopes = 0; if (denom > 0) { pLeft->xa = -pLeft->xa; pLeft->ya = -pLeft->ya; pLeft->dx = -pLeft->dx; pLeft->dy = -pLeft->dy; } else { swapslopes = 1; pRight->xa = -pRight->xa; pRight->ya = -pRight->ya; pRight->dx = -pRight->dx; pRight->dy = -pRight->dy; } vertices[0].x = pRight->xa; vertices[0].y = pRight->ya; slopes[0].dx = -pRight->dy; slopes[0].dy = pRight->dx; slopes[0].k = 0; vertices[1].x = 0; vertices[1].y = 0; slopes[1].dx = pLeft->dy; slopes[1].dy = -pLeft->dx; slopes[1].k = 0; vertices[2].x = pLeft->xa; vertices[2].y = pLeft->ya; if (joinStyle == JoinMiter) { my = (pLeft->dy * (pRight->xa * pRight->dy - pRight->ya * pRight->dx) - pRight->dy * (pLeft->xa * pLeft->dy - pLeft->ya * pLeft->dx)) / denom; if (pLeft->dy != 0) { mx = pLeft->xa + (my - pLeft->ya) * (double) pLeft->dx / (double) pLeft->dy; } else { mx = pRight->xa + (my - pRight->ya) * (double) pRight->dx / (double) pRight->dy; } /* check miter limit */ if ((mx * mx + my * my) * 4 > SQSECANT * lw * lw) joinStyle = JoinBevel; } if (joinStyle == JoinMiter) { slopes[2].dx = pLeft->dx; slopes[2].dy = pLeft->dy; slopes[2].k = pLeft->k; if (swapslopes) { slopes[2].dx = -slopes[2].dx; slopes[2].dy = -slopes[2].dy; slopes[2].k = -slopes[2].k; } vertices[3].x = mx; vertices[3].y = my; slopes[3].dx = pRight->dx; slopes[3].dy = pRight->dy; slopes[3].k = pRight->k; if (swapslopes) { slopes[3].dx = -slopes[3].dx; slopes[3].dy = -slopes[3].dy; slopes[3].k = -slopes[3].k; } edgecount = 4; } else { double scale, dx, dy, adx, ady; adx = dx = pRight->xa - pLeft->xa; ady = dy = pRight->ya - pLeft->ya; if (adx < 0) adx = -adx; if (ady < 0) ady = -ady; scale = ady; if (adx > ady) scale = adx; slopes[2].dx = (dx * 65536) / scale; slopes[2].dy = (dy * 65536) / scale; slopes[2].k = ((pLeft->xa + pRight->xa) * slopes[2].dy - (pLeft->ya + pRight->ya) * slopes[2].dx) / 2.0; edgecount = 3; } y = miPolyBuildPoly(vertices, slopes, edgecount, pLeft->x, pLeft->y, left, right, &nleft, &nright, &height); miFillPolyHelper(pDrawable, pGC, pixel, spanData, y, height, left, right, nleft, nright); } static int miLineArcI(DrawablePtr pDraw, GCPtr pGC, int xorg, int yorg, DDXPointPtr points, int *widths) { DDXPointPtr tpts, bpts; int *twids, *bwids; int x, y, e, ex, slw; tpts = points; twids = widths; if (pGC->miTranslate) { xorg += pDraw->x; yorg += pDraw->y; } slw = pGC->lineWidth; if (slw == 1) { tpts->x = xorg; tpts->y = yorg; *twids = 1; return 1; } bpts = tpts + slw; bwids = twids + slw; y = (slw >> 1) + 1; if (slw & 1) e = -((y << 2) + 3); else e = -(y << 3); ex = -4; x = 0; while (y) { e += (y << 3) - 4; while (e >= 0) { x++; e += (ex = -((x << 3) + 4)); } y--; slw = (x << 1) + 1; if ((e == ex) && (slw > 1)) slw--; tpts->x = xorg - x; tpts->y = yorg - y; tpts++; *twids++ = slw; if ((y != 0) && ((slw > 1) || (e != ex))) { bpts--; bpts->x = xorg - x; bpts->y = yorg + y; *--bwids = slw; } } return pGC->lineWidth; } #define CLIPSTEPEDGE(edgey,edge,edgeleft) \ if (ybase == edgey) \ { \ if (edgeleft) \ { \ if (edge->x > xcl) \ xcl = edge->x; \ } \ else \ { \ if (edge->x < xcr) \ xcr = edge->x; \ } \ edgey++; \ edge->x += edge->stepx; \ edge->e += edge->dx; \ if (edge->e > 0) \ { \ edge->x += edge->signdx; \ edge->e -= edge->dy; \ } \ } static int miLineArcD(DrawablePtr pDraw, GCPtr pGC, double xorg, double yorg, DDXPointPtr points, int *widths, PolyEdgePtr edge1, int edgey1, Bool edgeleft1, PolyEdgePtr edge2, int edgey2, Bool edgeleft2) { DDXPointPtr pts; int *wids; double radius, x0, y0, el, er, yk, xlk, xrk, k; int xbase, ybase, y, boty, xl, xr, xcl, xcr; int ymin, ymax; Bool edge1IsMin, edge2IsMin; int ymin1, ymin2; pts = points; wids = widths; xbase = floor(xorg); x0 = xorg - xbase; ybase = ICEIL(yorg); y0 = yorg - ybase; if (pGC->miTranslate) { xbase += pDraw->x; ybase += pDraw->y; edge1->x += pDraw->x; edge2->x += pDraw->x; edgey1 += pDraw->y; edgey2 += pDraw->y; } xlk = x0 + x0 + 1.0; xrk = x0 + x0 - 1.0; yk = y0 + y0 - 1.0; radius = ((double) pGC->lineWidth) / 2.0; y = floor(radius - y0 + 1.0); ybase -= y; ymin = ybase; ymax = 65536; edge1IsMin = FALSE; ymin1 = edgey1; if (edge1->dy >= 0) { if (!edge1->dy) { if (edgeleft1) edge1IsMin = TRUE; else ymax = edgey1; edgey1 = 65536; } else { if ((edge1->signdx < 0) == edgeleft1) edge1IsMin = TRUE; } } edge2IsMin = FALSE; ymin2 = edgey2; if (edge2->dy >= 0) { if (!edge2->dy) { if (edgeleft2) edge2IsMin = TRUE; else ymax = edgey2; edgey2 = 65536; } else { if ((edge2->signdx < 0) == edgeleft2) edge2IsMin = TRUE; } } if (edge1IsMin) { ymin = ymin1; if (edge2IsMin && ymin1 > ymin2) ymin = ymin2; } else if (edge2IsMin) ymin = ymin2; el = radius * radius - ((y + y0) * (y + y0)) - (x0 * x0); er = el + xrk; xl = 1; xr = 0; if (x0 < 0.5) { xl = 0; el -= xlk; } boty = (y0 < -0.5) ? 1 : 0; if (ybase + y - boty > ymax) boty = ymax - ybase - y; while (y > boty) { k = (y << 1) + yk; er += k; while (er > 0.0) { xr++; er += xrk - (xr << 1); } el += k; while (el >= 0.0) { xl--; el += (xl << 1) - xlk; } y--; ybase++; if (ybase < ymin) continue; xcl = xl + xbase; xcr = xr + xbase; CLIPSTEPEDGE(edgey1, edge1, edgeleft1); CLIPSTEPEDGE(edgey2, edge2, edgeleft2); if (xcr >= xcl) { pts->x = xcl; pts->y = ybase; pts++; *wids++ = xcr - xcl + 1; } } er = xrk - (xr << 1) - er; el = (xl << 1) - xlk - el; boty = floor(-y0 - radius + 1.0); if (ybase + y - boty > ymax) boty = ymax - ybase - y; while (y > boty) { k = (y << 1) + yk; er -= k; while ((er >= 0.0) && (xr >= 0)) { xr--; er += xrk - (xr << 1); } el -= k; while ((el > 0.0) && (xl <= 0)) { xl++; el += (xl << 1) - xlk; } y--; ybase++; if (ybase < ymin) continue; xcl = xl + xbase; xcr = xr + xbase; CLIPSTEPEDGE(edgey1, edge1, edgeleft1); CLIPSTEPEDGE(edgey2, edge2, edgeleft2); if (xcr >= xcl) { pts->x = xcl; pts->y = ybase; pts++; *wids++ = xcr - xcl + 1; } } return pts - points; } static int miRoundJoinFace(LineFacePtr face, PolyEdgePtr edge, Bool *leftEdge) { int y; int dx, dy; double xa, ya; Bool left; dx = -face->dy; dy = face->dx; xa = face->xa; ya = face->ya; left = 1; if (ya > 0) { ya = 0.0; xa = 0.0; } if (dy < 0 || (dy == 0 && dx > 0)) { dx = -dx; dy = -dy; left = !left; } if (dx == 0 && dy == 0) dy = 1; if (dy == 0) { y = ICEIL(face->ya) + face->y; edge->x = -32767; edge->stepx = 0; edge->signdx = 0; edge->e = -1; edge->dy = 0; edge->dx = 0; edge->height = 0; } else { y = miPolyBuildEdge(xa, ya, 0.0, dx, dy, face->x, face->y, !left, edge); edge->height = 32767; } *leftEdge = !left; return y; } static void miRoundJoinClip(LineFacePtr pLeft, LineFacePtr pRight, PolyEdgePtr edge1, PolyEdgePtr edge2, int *y1, int *y2, Bool *left1, Bool *left2) { double denom; denom = -pLeft->dx * (double) pRight->dy + pRight->dx * (double) pLeft->dy; if (denom >= 0) { pLeft->xa = -pLeft->xa; pLeft->ya = -pLeft->ya; } else { pRight->xa = -pRight->xa; pRight->ya = -pRight->ya; } *y1 = miRoundJoinFace(pLeft, edge1, left1); *y2 = miRoundJoinFace(pRight, edge2, left2); } static int miRoundCapClip(LineFacePtr face, Bool isInt, PolyEdgePtr edge, Bool *leftEdge) { int y; int dx, dy; double xa, ya, k; Bool left; dx = -face->dy; dy = face->dx; xa = face->xa; ya = face->ya; k = 0.0; if (!isInt) k = face->k; left = 1; if (dy < 0 || (dy == 0 && dx > 0)) { dx = -dx; dy = -dy; xa = -xa; ya = -ya; left = !left; } if (dx == 0 && dy == 0) dy = 1; if (dy == 0) { y = ICEIL(face->ya) + face->y; edge->x = -32767; edge->stepx = 0; edge->signdx = 0; edge->e = -1; edge->dy = 0; edge->dx = 0; edge->height = 0; } else { y = miPolyBuildEdge(xa, ya, k, dx, dy, face->x, face->y, !left, edge); edge->height = 32767; } *leftEdge = !left; return y; } static void miLineArc(DrawablePtr pDraw, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, LineFacePtr leftFace, LineFacePtr rightFace, double xorg, double yorg, Bool isInt) { int xorgi = 0, yorgi = 0; Spans spanRec; int n; PolyEdgeRec edge1 = { 0 }, edge2 = { 0 }; int edgey1, edgey2; Bool edgeleft1, edgeleft2; if (isInt) { xorgi = leftFace ? leftFace->x : rightFace->x; yorgi = leftFace ? leftFace->y : rightFace->y; } edgey1 = 65536; edgey2 = 65536; edge1.x = 0; /* not used, keep memory checkers happy */ edge1.dy = -1; edge2.x = 0; /* not used, keep memory checkers happy */ edge2.dy = -1; edgeleft1 = FALSE; edgeleft2 = FALSE; if ((pGC->lineStyle != LineSolid || pGC->lineWidth > 2) && ((pGC->capStyle == CapRound && pGC->joinStyle != JoinRound) || (pGC->joinStyle == JoinRound && pGC->capStyle == CapButt))) { if (isInt) { xorg = (double) xorgi; yorg = (double) yorgi; } if (leftFace && rightFace) { miRoundJoinClip(leftFace, rightFace, &edge1, &edge2, &edgey1, &edgey2, &edgeleft1, &edgeleft2); } else if (leftFace) { edgey1 = miRoundCapClip(leftFace, isInt, &edge1, &edgeleft1); } else if (rightFace) { edgey2 = miRoundCapClip(rightFace, isInt, &edge2, &edgeleft2); } isInt = FALSE; } if (!InitSpans(&spanRec, pGC->lineWidth)) return; if (isInt) n = miLineArcI(pDraw, pGC, xorgi, yorgi, spanRec.points, spanRec.widths); else n = miLineArcD(pDraw, pGC, xorg, yorg, spanRec.points, spanRec.widths, &edge1, edgey1, edgeleft1, &edge2, edgey2, edgeleft2); spanRec.count = n; fillSpans(pDraw, pGC, pixel, &spanRec, spanData); } static void miLineProjectingCap(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, LineFacePtr face, Bool isLeft, double xorg, double yorg, Bool isInt) { int xorgi = 0, yorgi = 0; int lw; PolyEdgeRec lefts[4], rights[4]; int lefty, righty, topy, bottomy; PolyEdgePtr left, right; PolyEdgePtr top, bottom; double xa, ya; double k; double xap, yap; int dx, dy; double projectXoff, projectYoff; double maxy; int finaly; if (isInt) { xorgi = face->x; yorgi = face->y; } lw = pGC->lineWidth; dx = face->dx; dy = face->dy; k = face->k; if (dy == 0) { lefts[0].height = lw; lefts[0].x = xorgi; if (isLeft) lefts[0].x -= (lw >> 1); lefts[0].stepx = 0; lefts[0].signdx = 1; lefts[0].e = -lw; lefts[0].dx = 0; lefts[0].dy = lw; rights[0].height = lw; rights[0].x = xorgi; if (!isLeft) rights[0].x += ((lw + 1) >> 1); rights[0].stepx = 0; rights[0].signdx = 1; rights[0].e = -lw; rights[0].dx = 0; rights[0].dy = lw; miFillPolyHelper(pDrawable, pGC, pixel, spanData, yorgi - (lw >> 1), lw, lefts, rights, 1, 1); } else if (dx == 0) { if (dy < 0) { dy = -dy; isLeft = !isLeft; } topy = yorgi; bottomy = yorgi + dy; if (isLeft) topy -= (lw >> 1); else bottomy += (lw >> 1); lefts[0].height = bottomy - topy; lefts[0].x = xorgi - (lw >> 1); lefts[0].stepx = 0; lefts[0].signdx = 1; lefts[0].e = -dy; lefts[0].dx = dx; lefts[0].dy = dy; rights[0].height = bottomy - topy; rights[0].x = lefts[0].x + (lw - 1); rights[0].stepx = 0; rights[0].signdx = 1; rights[0].e = -dy; rights[0].dx = dx; rights[0].dy = dy; miFillPolyHelper(pDrawable, pGC, pixel, spanData, topy, bottomy - topy, lefts, rights, 1, 1); } else { xa = face->xa; ya = face->ya; projectXoff = -ya; projectYoff = xa; if (dx < 0) { right = &rights[1]; left = &lefts[0]; top = &rights[0]; bottom = &lefts[1]; } else { right = &rights[0]; left = &lefts[1]; top = &lefts[0]; bottom = &rights[1]; } if (isLeft) { righty = miPolyBuildEdge(xa, ya, k, dx, dy, xorgi, yorgi, 0, right); xa = -xa; ya = -ya; k = -k; lefty = miPolyBuildEdge(xa - projectXoff, ya - projectYoff, k, dx, dy, xorgi, yorgi, 1, left); if (dx > 0) { ya = -ya; xa = -xa; } xap = xa - projectXoff; yap = ya - projectYoff; topy = miPolyBuildEdge(xap, yap, xap * dx + yap * dy, -dy, dx, xorgi, yorgi, dx > 0, top); bottomy = miPolyBuildEdge(xa, ya, 0.0, -dy, dx, xorgi, yorgi, dx < 0, bottom); maxy = -ya; } else { righty = miPolyBuildEdge(xa - projectXoff, ya - projectYoff, k, dx, dy, xorgi, yorgi, 0, right); xa = -xa; ya = -ya; k = -k; lefty = miPolyBuildEdge(xa, ya, k, dx, dy, xorgi, yorgi, 1, left); if (dx > 0) { ya = -ya; xa = -xa; } xap = xa - projectXoff; yap = ya - projectYoff; topy = miPolyBuildEdge(xa, ya, 0.0, -dy, dx, xorgi, xorgi, dx > 0, top); bottomy = miPolyBuildEdge(xap, yap, xap * dx + yap * dy, -dy, dx, xorgi, xorgi, dx < 0, bottom); maxy = -ya + projectYoff; } finaly = ICEIL(maxy) + yorgi; if (dx < 0) { left->height = bottomy - lefty; right->height = finaly - righty; top->height = righty - topy; } else { right->height = bottomy - righty; left->height = finaly - lefty; top->height = lefty - topy; } bottom->height = finaly - bottomy; miFillPolyHelper(pDrawable, pGC, pixel, spanData, topy, bottom->height + bottomy - topy, lefts, rights, 2, 2); } } static void miWideSegment(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, int x1, int y1, int x2, int y2, Bool projectLeft, Bool projectRight, LineFacePtr leftFace, LineFacePtr rightFace) { double l, L, r; double xa, ya; double projectXoff = 0.0, projectYoff = 0.0; double k; double maxy; int x, y; int dx, dy; int finaly; PolyEdgePtr left, right; PolyEdgePtr top, bottom; int lefty, righty, topy, bottomy; int signdx; PolyEdgeRec lefts[4], rights[4]; LineFacePtr tface; int lw = pGC->lineWidth; /* draw top-to-bottom always */ if (y2 < y1 || (y2 == y1 && x2 < x1)) { x = x1; x1 = x2; x2 = x; y = y1; y1 = y2; y2 = y; x = projectLeft; projectLeft = projectRight; projectRight = x; tface = leftFace; leftFace = rightFace; rightFace = tface; } dy = y2 - y1; signdx = 1; dx = x2 - x1; if (dx < 0) signdx = -1; leftFace->x = x1; leftFace->y = y1; leftFace->dx = dx; leftFace->dy = dy; rightFace->x = x2; rightFace->y = y2; rightFace->dx = -dx; rightFace->dy = -dy; if (dy == 0) { rightFace->xa = 0; rightFace->ya = (double) lw / 2.0; rightFace->k = -(double) (lw * dx) / 2.0; leftFace->xa = 0; leftFace->ya = -rightFace->ya; leftFace->k = rightFace->k; x = x1; if (projectLeft) x -= (lw >> 1); y = y1 - (lw >> 1); dx = x2 - x; if (projectRight) dx += ((lw + 1) >> 1); dy = lw; miFillRectPolyHelper(pDrawable, pGC, pixel, spanData, x, y, dx, dy); } else if (dx == 0) { leftFace->xa = (double) lw / 2.0; leftFace->ya = 0; leftFace->k = (double) (lw * dy) / 2.0; rightFace->xa = -leftFace->xa; rightFace->ya = 0; rightFace->k = leftFace->k; y = y1; if (projectLeft) y -= lw >> 1; x = x1 - (lw >> 1); dy = y2 - y; if (projectRight) dy += ((lw + 1) >> 1); dx = lw; miFillRectPolyHelper(pDrawable, pGC, pixel, spanData, x, y, dx, dy); } else { l = ((double) lw) / 2.0; L = hypot((double) dx, (double) dy); if (dx < 0) { right = &rights[1]; left = &lefts[0]; top = &rights[0]; bottom = &lefts[1]; } else { right = &rights[0]; left = &lefts[1]; top = &lefts[0]; bottom = &rights[1]; } r = l / L; /* coord of upper bound at integral y */ ya = -r * dx; xa = r * dy; if (projectLeft | projectRight) { projectXoff = -ya; projectYoff = xa; } /* xa * dy - ya * dx */ k = l * L; leftFace->xa = xa; leftFace->ya = ya; leftFace->k = k; rightFace->xa = -xa; rightFace->ya = -ya; rightFace->k = k; if (projectLeft) righty = miPolyBuildEdge(xa - projectXoff, ya - projectYoff, k, dx, dy, x1, y1, 0, right); else righty = miPolyBuildEdge(xa, ya, k, dx, dy, x1, y1, 0, right); /* coord of lower bound at integral y */ ya = -ya; xa = -xa; /* xa * dy - ya * dx */ k = -k; if (projectLeft) lefty = miPolyBuildEdge(xa - projectXoff, ya - projectYoff, k, dx, dy, x1, y1, 1, left); else lefty = miPolyBuildEdge(xa, ya, k, dx, dy, x1, y1, 1, left); /* coord of top face at integral y */ if (signdx > 0) { ya = -ya; xa = -xa; } if (projectLeft) { double xap = xa - projectXoff; double yap = ya - projectYoff; topy = miPolyBuildEdge(xap, yap, xap * dx + yap * dy, -dy, dx, x1, y1, dx > 0, top); } else topy = miPolyBuildEdge(xa, ya, 0.0, -dy, dx, x1, y1, dx > 0, top); /* coord of bottom face at integral y */ if (projectRight) { double xap = xa + projectXoff; double yap = ya + projectYoff; bottomy = miPolyBuildEdge(xap, yap, xap * dx + yap * dy, -dy, dx, x2, y2, dx < 0, bottom); maxy = -ya + projectYoff; } else { bottomy = miPolyBuildEdge(xa, ya, 0.0, -dy, dx, x2, y2, dx < 0, bottom); maxy = -ya; } finaly = ICEIL(maxy) + y2; if (dx < 0) { left->height = bottomy - lefty; right->height = finaly - righty; top->height = righty - topy; } else { right->height = bottomy - righty; left->height = finaly - lefty; top->height = lefty - topy; } bottom->height = finaly - bottomy; miFillPolyHelper(pDrawable, pGC, pixel, spanData, topy, bottom->height + bottomy - topy, lefts, rights, 2, 2); } } static SpanDataPtr miSetupSpanData(GCPtr pGC, SpanDataPtr spanData, int npt) { if ((npt < 3 && pGC->capStyle != CapRound) || miSpansEasyRop(pGC->alu)) return (SpanDataPtr) NULL; if (pGC->lineStyle == LineDoubleDash) miInitSpanGroup(&spanData->bgGroup); miInitSpanGroup(&spanData->fgGroup); return spanData; } static void miCleanupSpanData(DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData) { if (pGC->lineStyle == LineDoubleDash) { ChangeGCVal oldPixel, pixel; pixel.val = pGC->bgPixel; oldPixel.val = pGC->fgPixel; if (pixel.val != oldPixel.val) { ChangeGC(NullClient, pGC, GCForeground, &pixel); ValidateGC(pDrawable, pGC); } miFillUniqueSpanGroup(pDrawable, pGC, &spanData->bgGroup); miFreeSpanGroup(&spanData->bgGroup); if (pixel.val != oldPixel.val) { ChangeGC(NullClient, pGC, GCForeground, &oldPixel); ValidateGC(pDrawable, pGC); } } miFillUniqueSpanGroup(pDrawable, pGC, &spanData->fgGroup); miFreeSpanGroup(&spanData->fgGroup); } void miWideLine(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pPts) { int x1, y1, x2, y2; SpanDataRec spanDataRec; SpanDataPtr spanData; long pixel; Bool projectLeft, projectRight; LineFaceRec leftFace, rightFace, prevRightFace; LineFaceRec firstFace; int first; Bool somethingDrawn = FALSE; Bool selfJoin; spanData = miSetupSpanData(pGC, &spanDataRec, npt); pixel = pGC->fgPixel; x2 = pPts->x; y2 = pPts->y; first = TRUE; selfJoin = FALSE; if (npt > 1) { if (mode == CoordModePrevious) { int nptTmp; DDXPointPtr pPtsTmp; x1 = x2; y1 = y2; nptTmp = npt; pPtsTmp = pPts + 1; while (--nptTmp) { x1 += pPtsTmp->x; y1 += pPtsTmp->y; ++pPtsTmp; } if (x2 == x1 && y2 == y1) selfJoin = TRUE; } else if (x2 == pPts[npt - 1].x && y2 == pPts[npt - 1].y) { selfJoin = TRUE; } } projectLeft = pGC->capStyle == CapProjecting && !selfJoin; projectRight = FALSE; while (--npt) { x1 = x2; y1 = y2; ++pPts; x2 = pPts->x; y2 = pPts->y; if (mode == CoordModePrevious) { x2 += x1; y2 += y1; } if (x1 != x2 || y1 != y2) { somethingDrawn = TRUE; if (npt == 1 && pGC->capStyle == CapProjecting && !selfJoin) projectRight = TRUE; miWideSegment(pDrawable, pGC, pixel, spanData, x1, y1, x2, y2, projectLeft, projectRight, &leftFace, &rightFace); if (first) { if (selfJoin) firstFace = leftFace; else if (pGC->capStyle == CapRound) { if (pGC->lineWidth == 1 && !spanData) miLineOnePoint(pDrawable, pGC, pixel, spanData, x1, y1); else miLineArc(pDrawable, pGC, pixel, spanData, &leftFace, (LineFacePtr) NULL, (double) 0.0, (double) 0.0, TRUE); } } else { miLineJoin(pDrawable, pGC, pixel, spanData, &leftFace, &prevRightFace); } prevRightFace = rightFace; first = FALSE; projectLeft = FALSE; } if (npt == 1 && somethingDrawn) { if (selfJoin) miLineJoin(pDrawable, pGC, pixel, spanData, &firstFace, &rightFace); else if (pGC->capStyle == CapRound) { if (pGC->lineWidth == 1 && !spanData) miLineOnePoint(pDrawable, pGC, pixel, spanData, x2, y2); else miLineArc(pDrawable, pGC, pixel, spanData, (LineFacePtr) NULL, &rightFace, (double) 0.0, (double) 0.0, TRUE); } } } /* handle crock where all points are coincedent */ if (!somethingDrawn) { projectLeft = pGC->capStyle == CapProjecting; miWideSegment(pDrawable, pGC, pixel, spanData, x2, y2, x2, y2, projectLeft, projectLeft, &leftFace, &rightFace); if (pGC->capStyle == CapRound) { miLineArc(pDrawable, pGC, pixel, spanData, &leftFace, (LineFacePtr) NULL, (double) 0.0, (double) 0.0, TRUE); rightFace.dx = -1; /* sleezy hack to make it work */ miLineArc(pDrawable, pGC, pixel, spanData, (LineFacePtr) NULL, &rightFace, (double) 0.0, (double) 0.0, TRUE); } } if (spanData) miCleanupSpanData(pDrawable, pGC, spanData); } #define V_TOP 0 #define V_RIGHT 1 #define V_BOTTOM 2 #define V_LEFT 3 static void miWideDashSegment(DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData, int *pDashOffset, int *pDashIndex, int x1, int y1, int x2, int y2, Bool projectLeft, Bool projectRight, LineFacePtr leftFace, LineFacePtr rightFace) { int dashIndex, dashRemain; unsigned char *pDash; double L, l; double k; PolyVertexRec vertices[4]; PolyVertexRec saveRight, saveBottom; PolySlopeRec slopes[4]; PolyEdgeRec left[4], right[4]; LineFaceRec lcapFace, rcapFace; int nleft, nright; int h; int y; int dy, dx; unsigned long pixel; double LRemain; double r; double rdx, rdy; double dashDx, dashDy; double saveK = 0.0; Bool first = TRUE; double lcenterx, lcentery, rcenterx = 0.0, rcentery = 0.0; unsigned long fgPixel, bgPixel; dx = x2 - x1; dy = y2 - y1; dashIndex = *pDashIndex; pDash = pGC->dash; dashRemain = pDash[dashIndex] - *pDashOffset; fgPixel = pGC->fgPixel; bgPixel = pGC->bgPixel; if (pGC->fillStyle == FillOpaqueStippled || pGC->fillStyle == FillTiled) { bgPixel = fgPixel; } l = ((double) pGC->lineWidth) / 2.0; if (dx == 0) { L = dy; rdx = 0; rdy = l; if (dy < 0) { L = -dy; rdy = -l; } } else if (dy == 0) { L = dx; rdx = l; rdy = 0; if (dx < 0) { L = -dx; rdx = -l; } } else { L = hypot((double) dx, (double) dy); r = l / L; rdx = r * dx; rdy = r * dy; } k = l * L; LRemain = L; /* All position comments are relative to a line with dx and dy > 0, * but the code does not depend on this */ /* top */ slopes[V_TOP].dx = dx; slopes[V_TOP].dy = dy; slopes[V_TOP].k = k; /* right */ slopes[V_RIGHT].dx = -dy; slopes[V_RIGHT].dy = dx; slopes[V_RIGHT].k = 0; /* bottom */ slopes[V_BOTTOM].dx = -dx; slopes[V_BOTTOM].dy = -dy; slopes[V_BOTTOM].k = k; /* left */ slopes[V_LEFT].dx = dy; slopes[V_LEFT].dy = -dx; slopes[V_LEFT].k = 0; /* preload the start coordinates */ vertices[V_RIGHT].x = vertices[V_TOP].x = rdy; vertices[V_RIGHT].y = vertices[V_TOP].y = -rdx; vertices[V_BOTTOM].x = vertices[V_LEFT].x = -rdy; vertices[V_BOTTOM].y = vertices[V_LEFT].y = rdx; if (projectLeft) { vertices[V_TOP].x -= rdx; vertices[V_TOP].y -= rdy; vertices[V_LEFT].x -= rdx; vertices[V_LEFT].y -= rdy; slopes[V_LEFT].k = rdx * dx + rdy * dy; } lcenterx = x1; lcentery = y1; if (pGC->capStyle == CapRound) { lcapFace.dx = dx; lcapFace.dy = dy; lcapFace.x = x1; lcapFace.y = y1; rcapFace.dx = -dx; rcapFace.dy = -dy; rcapFace.x = x1; rcapFace.y = y1; } while (LRemain > dashRemain) { dashDx = (dashRemain * dx) / L; dashDy = (dashRemain * dy) / L; rcenterx = lcenterx + dashDx; rcentery = lcentery + dashDy; vertices[V_RIGHT].x += dashDx; vertices[V_RIGHT].y += dashDy; vertices[V_BOTTOM].x += dashDx; vertices[V_BOTTOM].y += dashDy; slopes[V_RIGHT].k = vertices[V_RIGHT].x * dx + vertices[V_RIGHT].y * dy; if (pGC->lineStyle == LineDoubleDash || !(dashIndex & 1)) { if (pGC->lineStyle == LineOnOffDash && pGC->capStyle == CapProjecting) { saveRight = vertices[V_RIGHT]; saveBottom = vertices[V_BOTTOM]; saveK = slopes[V_RIGHT].k; if (!first) { vertices[V_TOP].x -= rdx; vertices[V_TOP].y -= rdy; vertices[V_LEFT].x -= rdx; vertices[V_LEFT].y -= rdy; slopes[V_LEFT].k = vertices[V_LEFT].x * slopes[V_LEFT].dy - vertices[V_LEFT].y * slopes[V_LEFT].dx; } vertices[V_RIGHT].x += rdx; vertices[V_RIGHT].y += rdy; vertices[V_BOTTOM].x += rdx; vertices[V_BOTTOM].y += rdy; slopes[V_RIGHT].k = vertices[V_RIGHT].x * slopes[V_RIGHT].dy - vertices[V_RIGHT].y * slopes[V_RIGHT].dx; } y = miPolyBuildPoly(vertices, slopes, 4, x1, y1, left, right, &nleft, &nright, &h); pixel = (dashIndex & 1) ? bgPixel : fgPixel; miFillPolyHelper(pDrawable, pGC, pixel, spanData, y, h, left, right, nleft, nright); if (pGC->lineStyle == LineOnOffDash) { switch (pGC->capStyle) { case CapProjecting: vertices[V_BOTTOM] = saveBottom; vertices[V_RIGHT] = saveRight; slopes[V_RIGHT].k = saveK; break; case CapRound: if (!first) { if (dx < 0) { lcapFace.xa = -vertices[V_LEFT].x; lcapFace.ya = -vertices[V_LEFT].y; lcapFace.k = slopes[V_LEFT].k; } else { lcapFace.xa = vertices[V_TOP].x; lcapFace.ya = vertices[V_TOP].y; lcapFace.k = -slopes[V_LEFT].k; } miLineArc(pDrawable, pGC, pixel, spanData, &lcapFace, (LineFacePtr) NULL, lcenterx, lcentery, FALSE); } if (dx < 0) { rcapFace.xa = vertices[V_BOTTOM].x; rcapFace.ya = vertices[V_BOTTOM].y; rcapFace.k = slopes[V_RIGHT].k; } else { rcapFace.xa = -vertices[V_RIGHT].x; rcapFace.ya = -vertices[V_RIGHT].y; rcapFace.k = -slopes[V_RIGHT].k; } miLineArc(pDrawable, pGC, pixel, spanData, (LineFacePtr) NULL, &rcapFace, rcenterx, rcentery, FALSE); break; } } } LRemain -= dashRemain; ++dashIndex; if (dashIndex == pGC->numInDashList) dashIndex = 0; dashRemain = pDash[dashIndex]; lcenterx = rcenterx; lcentery = rcentery; vertices[V_TOP] = vertices[V_RIGHT]; vertices[V_LEFT] = vertices[V_BOTTOM]; slopes[V_LEFT].k = -slopes[V_RIGHT].k; first = FALSE; } if (pGC->lineStyle == LineDoubleDash || !(dashIndex & 1)) { vertices[V_TOP].x -= dx; vertices[V_TOP].y -= dy; vertices[V_LEFT].x -= dx; vertices[V_LEFT].y -= dy; vertices[V_RIGHT].x = rdy; vertices[V_RIGHT].y = -rdx; vertices[V_BOTTOM].x = -rdy; vertices[V_BOTTOM].y = rdx; if (projectRight) { vertices[V_RIGHT].x += rdx; vertices[V_RIGHT].y += rdy; vertices[V_BOTTOM].x += rdx; vertices[V_BOTTOM].y += rdy; slopes[V_RIGHT].k = vertices[V_RIGHT].x * slopes[V_RIGHT].dy - vertices[V_RIGHT].y * slopes[V_RIGHT].dx; } else slopes[V_RIGHT].k = 0; if (!first && pGC->lineStyle == LineOnOffDash && pGC->capStyle == CapProjecting) { vertices[V_TOP].x -= rdx; vertices[V_TOP].y -= rdy; vertices[V_LEFT].x -= rdx; vertices[V_LEFT].y -= rdy; slopes[V_LEFT].k = vertices[V_LEFT].x * slopes[V_LEFT].dy - vertices[V_LEFT].y * slopes[V_LEFT].dx; } else slopes[V_LEFT].k += dx * dx + dy * dy; y = miPolyBuildPoly(vertices, slopes, 4, x2, y2, left, right, &nleft, &nright, &h); pixel = (dashIndex & 1) ? pGC->bgPixel : pGC->fgPixel; miFillPolyHelper(pDrawable, pGC, pixel, spanData, y, h, left, right, nleft, nright); if (!first && pGC->lineStyle == LineOnOffDash && pGC->capStyle == CapRound) { lcapFace.x = x2; lcapFace.y = y2; if (dx < 0) { lcapFace.xa = -vertices[V_LEFT].x; lcapFace.ya = -vertices[V_LEFT].y; lcapFace.k = slopes[V_LEFT].k; } else { lcapFace.xa = vertices[V_TOP].x; lcapFace.ya = vertices[V_TOP].y; lcapFace.k = -slopes[V_LEFT].k; } miLineArc(pDrawable, pGC, pixel, spanData, &lcapFace, (LineFacePtr) NULL, rcenterx, rcentery, FALSE); } } dashRemain = ((double) dashRemain) - LRemain; if (dashRemain == 0) { dashIndex++; if (dashIndex == pGC->numInDashList) dashIndex = 0; dashRemain = pDash[dashIndex]; } leftFace->x = x1; leftFace->y = y1; leftFace->dx = dx; leftFace->dy = dy; leftFace->xa = rdy; leftFace->ya = -rdx; leftFace->k = k; rightFace->x = x2; rightFace->y = y2; rightFace->dx = -dx; rightFace->dy = -dy; rightFace->xa = -rdy; rightFace->ya = rdx; rightFace->k = k; *pDashIndex = dashIndex; *pDashOffset = pDash[dashIndex] - dashRemain; } void miWideDash(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr pPts) { int x1, y1, x2, y2; unsigned long pixel; Bool projectLeft, projectRight; LineFaceRec leftFace, rightFace, prevRightFace; LineFaceRec firstFace; int first; int dashIndex, dashOffset; int prevDashIndex; SpanDataRec spanDataRec; SpanDataPtr spanData; Bool somethingDrawn = FALSE; Bool selfJoin; Bool endIsFg = FALSE, startIsFg = FALSE; Bool firstIsFg = FALSE, prevIsFg = FALSE; #if 0 /* XXX backward compatibility */ if (pGC->lineWidth == 0) { miZeroDashLine(pDrawable, pGC, mode, npt, pPts); return; } #endif if (pGC->lineStyle == LineDoubleDash && (pGC->fillStyle == FillOpaqueStippled || pGC->fillStyle == FillTiled)) { miWideLine(pDrawable, pGC, mode, npt, pPts); return; } if (npt == 0) return; spanData = miSetupSpanData(pGC, &spanDataRec, npt); x2 = pPts->x; y2 = pPts->y; first = TRUE; selfJoin = FALSE; if (mode == CoordModePrevious) { int nptTmp; DDXPointPtr pPtsTmp; x1 = x2; y1 = y2; nptTmp = npt; pPtsTmp = pPts + 1; while (--nptTmp) { x1 += pPtsTmp->x; y1 += pPtsTmp->y; ++pPtsTmp; } if (x2 == x1 && y2 == y1) selfJoin = TRUE; } else if (x2 == pPts[npt - 1].x && y2 == pPts[npt - 1].y) { selfJoin = TRUE; } projectLeft = pGC->capStyle == CapProjecting && !selfJoin; projectRight = FALSE; dashIndex = 0; dashOffset = 0; miStepDash((int) pGC->dashOffset, &dashIndex, pGC->dash, (int) pGC->numInDashList, &dashOffset); while (--npt) { x1 = x2; y1 = y2; ++pPts; x2 = pPts->x; y2 = pPts->y; if (mode == CoordModePrevious) { x2 += x1; y2 += y1; } if (x1 != x2 || y1 != y2) { somethingDrawn = TRUE; if (npt == 1 && pGC->capStyle == CapProjecting && (!selfJoin || !firstIsFg)) projectRight = TRUE; prevDashIndex = dashIndex; miWideDashSegment(pDrawable, pGC, spanData, &dashOffset, &dashIndex, x1, y1, x2, y2, projectLeft, projectRight, &leftFace, &rightFace); startIsFg = !(prevDashIndex & 1); endIsFg = (dashIndex & 1) ^ (dashOffset != 0); if (pGC->lineStyle == LineDoubleDash || startIsFg) { pixel = startIsFg ? pGC->fgPixel : pGC->bgPixel; if (first || (pGC->lineStyle == LineOnOffDash && !prevIsFg)) { if (first && selfJoin) { firstFace = leftFace; firstIsFg = startIsFg; } else if (pGC->capStyle == CapRound) miLineArc(pDrawable, pGC, pixel, spanData, &leftFace, (LineFacePtr) NULL, (double) 0.0, (double) 0.0, TRUE); } else { miLineJoin(pDrawable, pGC, pixel, spanData, &leftFace, &prevRightFace); } } prevRightFace = rightFace; prevIsFg = endIsFg; first = FALSE; projectLeft = FALSE; } if (npt == 1 && somethingDrawn) { if (pGC->lineStyle == LineDoubleDash || endIsFg) { pixel = endIsFg ? pGC->fgPixel : pGC->bgPixel; if (selfJoin && (pGC->lineStyle == LineDoubleDash || firstIsFg)) { miLineJoin(pDrawable, pGC, pixel, spanData, &firstFace, &rightFace); } else { if (pGC->capStyle == CapRound) miLineArc(pDrawable, pGC, pixel, spanData, (LineFacePtr) NULL, &rightFace, (double) 0.0, (double) 0.0, TRUE); } } else { /* glue a cap to the start of the line if * we're OnOffDash and ended on odd dash */ if (selfJoin && firstIsFg) { pixel = pGC->fgPixel; if (pGC->capStyle == CapProjecting) miLineProjectingCap(pDrawable, pGC, pixel, spanData, &firstFace, TRUE, (double) 0.0, (double) 0.0, TRUE); else if (pGC->capStyle == CapRound) miLineArc(pDrawable, pGC, pixel, spanData, &firstFace, (LineFacePtr) NULL, (double) 0.0, (double) 0.0, TRUE); } } } } /* handle crock where all points are coincident */ if (!somethingDrawn && (pGC->lineStyle == LineDoubleDash || !(dashIndex & 1))) { /* not the same as endIsFg computation above */ pixel = (dashIndex & 1) ? pGC->bgPixel : pGC->fgPixel; switch (pGC->capStyle) { case CapRound: miLineArc(pDrawable, pGC, pixel, spanData, (LineFacePtr) NULL, (LineFacePtr) NULL, (double) x2, (double) y2, FALSE); break; case CapProjecting: x1 = pGC->lineWidth; miFillRectPolyHelper(pDrawable, pGC, pixel, spanData, x2 - (x1 >> 1), y2 - (x1 >> 1), x1, x1); break; } } if (spanData) miCleanupSpanData(pDrawable, pGC, spanData); } void miPolylines(DrawablePtr drawable, GCPtr gc, int mode, int n, DDXPointPtr points) { if (gc->lineWidth == 0) { if (gc->lineStyle == LineSolid) miZeroLine(drawable, gc, mode, n, points); else miZeroDashLine(drawable, gc, mode, n, points); } else { if (gc->lineStyle == LineSolid) miWideLine(drawable, gc, mode, n, points); else miWideDash(drawable, gc, mode, n, points); } } xorg-server-21.1.16/mi/miwideline.h0000644000175000017500000000525214757411105012543 /* Copyright 1988, 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. */ /* Author: Keith Packard, MIT X Consortium */ #include "mifpoly.h" /* for ICEIL */ /* * Polygon edge description for integer wide-line routines */ typedef struct _PolyEdge { int height; /* number of scanlines to process */ int x; /* starting x coordinate */ int stepx; /* fixed integral dx */ int signdx; /* variable dx sign */ int e; /* initial error term */ int dy; int dx; } PolyEdgeRec, *PolyEdgePtr; #define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - miter limit constant */ /* * types for general polygon routines */ typedef struct _PolyVertex { double x, y; } PolyVertexRec, *PolyVertexPtr; typedef struct _PolySlope { int dx, dy; double k; /* x0 * dy - y0 * dx */ } PolySlopeRec, *PolySlopePtr; /* * Line face description for caps/joins */ typedef struct _LineFace { double xa, ya; int dx, dy; int x, y; double k; } LineFaceRec, *LineFacePtr; /* * macros for polygon fillers */ #define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \ oldPixel = pGC->fgPixel; \ if (pixel != oldPixel) { \ ChangeGCVal gcval; \ gcval.val = pixel; \ ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } #define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \ if (pixel != oldPixel) { \ ChangeGCVal gcval; \ gcval.val = oldPixel; \ ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } xorg-server-21.1.16/mi/miwindow.c0000644000175000017500000006471314757411105012254 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "regionstr.h" #include "region.h" #include "mi.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "mivalidate.h" #include "inputstr.h" void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures) { BoxRec box; RegionRec reg; BoxPtr extents; int x1, y1, x2, y2; /* compute everything using ints to avoid overflow */ x1 = pWin->drawable.x + x; y1 = pWin->drawable.y + y; if (w) x2 = x1 + (int) w; else x2 = x1 + (int) pWin->drawable.width - (int) x; if (h) y2 = y1 + h; else y2 = y1 + (int) pWin->drawable.height - (int) y; extents = &pWin->clipList.extents; /* clip the resulting rectangle to the window clipList extents. This * makes sure that the result will fit in a box, given that the * screen is < 32768 on a side. */ if (x1 < extents->x1) x1 = extents->x1; if (x2 > extents->x2) x2 = extents->x2; if (y1 < extents->y1) y1 = extents->y1; if (y2 > extents->y2) y2 = extents->y2; if (x2 <= x1 || y2 <= y1) { x2 = x1 = 0; y2 = y1 = 0; } box.x1 = x1; box.x2 = x2; box.y1 = y1; box.y2 = y2; RegionInit(®, &box, 1); RegionIntersect(®, ®, &pWin->clipList); if (generateExposures) (*pWin->drawable.pScreen->WindowExposures) (pWin, ®); else if (pWin->backgroundState != None) pWin->drawable.pScreen->PaintWindow(pWin, ®, PW_BACKGROUND); RegionUninit(®); } void miMarkWindow(WindowPtr pWin) { ValidatePtr val; if (pWin->valdata) return; val = (ValidatePtr) xnfalloc(sizeof(ValidateRec)); val->before.oldAbsCorner.x = pWin->drawable.x; val->before.oldAbsCorner.y = pWin->drawable.y; val->before.borderVisible = NullRegion; val->before.resized = FALSE; pWin->valdata = val; } Bool miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) { BoxPtr box; WindowPtr pChild, pLast; Bool anyMarked = FALSE; MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow; /* single layered systems are easy */ if (ppLayerWin) *ppLayerWin = pWin; if (pWin == pFirst) { /* Blindly mark pWin and all of its inferiors. This is a slight * overkill if there are mapped windows that outside pWin's border, * but it's better than wasting time on RectIn checks. */ pChild = pWin; while (1) { if (pChild->viewable) { if (RegionBroken(&pChild->winSize)) SetWinSize(pChild); if (RegionBroken(&pChild->borderSize)) SetBorderSize(pChild); (*MarkWindow) (pChild); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } anyMarked = TRUE; pFirst = pFirst->nextSib; } if ((pChild = pFirst)) { box = RegionExtents(&pWin->borderSize); pLast = pChild->parent->lastChild; while (1) { if (pChild->viewable) { if (RegionBroken(&pChild->winSize)) SetWinSize(pChild); if (RegionBroken(&pChild->borderSize)) SetBorderSize(pChild); if (RegionContainsRect(&pChild->borderSize, box)) { (*MarkWindow) (pChild); anyMarked = TRUE; if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } } while (!pChild->nextSib && (pChild != pLast)) pChild = pChild->parent; if (pChild == pLast) break; pChild = pChild->nextSib; } } if (anyMarked) (*MarkWindow) (pWin->parent); return anyMarked; } /***** * miHandleValidateExposures(pWin) * starting at pWin, draw background in any windows that have exposure * regions, translate the regions, restore any backing store, * and then send any regions still exposed to the client *****/ void miHandleValidateExposures(WindowPtr pWin) { WindowPtr pChild; ValidatePtr val; WindowExposuresProcPtr WindowExposures; pChild = pWin; WindowExposures = pChild->drawable.pScreen->WindowExposures; while (1) { if ((val = pChild->valdata)) { if (RegionNotEmpty(&val->after.borderExposed)) pWin->drawable.pScreen->PaintWindow(pChild, &val->after.borderExposed, PW_BORDER); RegionUninit(&val->after.borderExposed); (*WindowExposures) (pChild, &val->after.exposed); RegionUninit(&val->after.exposed); free(val); pChild->valdata = NULL; if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } } void miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) { WindowPtr pParent; Bool WasViewable = (Bool) (pWin->viewable); short bw; RegionPtr oldRegion = NULL; DDXPointRec oldpt; Bool anyMarked = FALSE; ScreenPtr pScreen; WindowPtr windowToValidate; WindowPtr pLayerWin; /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; pScreen = pWin->drawable.pScreen; bw = wBorderWidth(pWin); oldpt.x = pWin->drawable.x; oldpt.y = pWin->drawable.y; if (WasViewable) { oldRegion = RegionCreate(NullBox, 1); RegionCopy(oldRegion, &pWin->borderClip); anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); } pWin->origin.x = x + (int) bw; pWin->origin.y = y + (int) bw; x = pWin->drawable.x = pParent->drawable.x + x + (int) bw; y = pWin->drawable.y = pParent->drawable.y + y + (int) bw; SetWinSize(pWin); SetBorderSize(pWin); (*pScreen->PositionWindow) (pWin, x, y); windowToValidate = MoveWindowInStack(pWin, pNextSib); ResizeChildrenWinSize(pWin, x - oldpt.x, y - oldpt.y, 0, 0); if (WasViewable) { if (pLayerWin == pWin) anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL); else anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, NullWindow, kind); (*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, oldRegion); RegionDestroy(oldRegion); /* XXX need to retile border if ParentRelative origin */ (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, NULL, kind); } } if (pWin->realized) WindowsRestructured(); } /* * pValid is a region of the screen which has been * successfully copied -- recomputed exposed regions for affected windows */ static int miRecomputeExposures(WindowPtr pWin, void *value) { /* must conform to VisitWindowProcPtr */ RegionPtr pValid = (RegionPtr) value; if (pWin->valdata) { #ifdef COMPOSITE /* * Redirected windows are not affected by parent window * gravity manipulations, so don't recompute their * exposed areas here. */ if (pWin->redirectDraw != RedirectDrawNone) return WT_DONTWALKCHILDREN; #endif /* * compute exposed regions of this window */ RegionSubtract(&pWin->valdata->after.exposed, &pWin->clipList, pValid); /* * compute exposed regions of the border */ RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->borderClip, &pWin->winSize); RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->valdata->after.borderExposed, pValid); return WT_WALKCHILDREN; } return WT_NOMATCH; } void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { WindowPtr pParent; Bool WasViewable = (Bool) (pWin->viewable); unsigned short width = pWin->drawable.width, height = pWin->drawable.height; short oldx = pWin->drawable.x, oldy = pWin->drawable.y; int bw = wBorderWidth(pWin); short dw, dh; DDXPointRec oldpt; RegionPtr oldRegion = NULL; Bool anyMarked = FALSE; ScreenPtr pScreen; WindowPtr pFirstChange; WindowPtr pChild; RegionPtr gravitate[StaticGravity + 1]; unsigned g; int nx, ny; /* destination x,y */ int newx, newy; /* new inner window position */ RegionPtr pRegion = NULL; RegionPtr destClip; /* portions of destination already written */ RegionPtr oldWinClip = NULL; /* old clip list for window */ RegionPtr borderVisible = NullRegion; /* visible area of the border */ Bool shrunk = FALSE; /* shrunk in an inner dimension */ Bool moved = FALSE; /* window position changed */ WindowPtr pLayerWin; /* if this is a root window, can't be resized */ if (!(pParent = pWin->parent)) return; pScreen = pWin->drawable.pScreen; newx = pParent->drawable.x + x + bw; newy = pParent->drawable.y + y + bw; if (WasViewable) { anyMarked = FALSE; /* * save the visible region of the window */ oldRegion = RegionCreate(NullBox, 1); RegionCopy(oldRegion, &pWin->winSize); /* * categorize child windows into regions to be moved */ for (g = 0; g <= StaticGravity; g++) gravitate[g] = (RegionPtr) NULL; for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { g = pChild->winGravity; if (g != UnmapGravity) { if (!gravitate[g]) gravitate[g] = RegionCreate(NullBox, 1); RegionUnion(gravitate[g], gravitate[g], &pChild->borderClip); } else { UnmapWindow(pChild, TRUE); anyMarked = TRUE; } } anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); oldWinClip = NULL; if (pWin->bitGravity != ForgetGravity) { oldWinClip = RegionCreate(NullBox, 1); RegionCopy(oldWinClip, &pWin->clipList); } /* * if the window is changing size, borderExposed * can't be computed correctly without some help. */ if (pWin->drawable.height > h || pWin->drawable.width > w) shrunk = TRUE; if (newx != oldx || newy != oldy) moved = TRUE; if ((pWin->drawable.height != h || pWin->drawable.width != w) && HasBorder(pWin)) { borderVisible = RegionCreate(NullBox, 1); /* for tiled borders, we punt and draw the whole thing */ if (pWin->borderIsPixel || !moved) { if (shrunk || moved) RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); else RegionCopy(borderVisible, &pWin->borderClip); } } } pWin->origin.x = x + bw; pWin->origin.y = y + bw; pWin->drawable.height = h; pWin->drawable.width = w; x = pWin->drawable.x = newx; y = pWin->drawable.y = newy; SetWinSize(pWin); SetBorderSize(pWin); dw = (int) w - (int) width; dh = (int) h - (int) height; ResizeChildrenWinSize(pWin, x - oldx, y - oldy, dw, dh); /* let the hardware adjust background and border pixmaps, if any */ (*pScreen->PositionWindow) (pWin, x, y); pFirstChange = MoveWindowInStack(pWin, pSib); if (WasViewable) { pRegion = RegionCreate(NullBox, 1); if (pLayerWin == pWin) anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pFirstChange, NULL); else anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL); if (pWin->valdata) { pWin->valdata->before.resized = TRUE; pWin->valdata->before.borderVisible = borderVisible; } if (anyMarked) (*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, VTOther); /* * the entire window is trashed unless bitGravity * recovers portions of it */ RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList); } GravityTranslate(x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny); if (WasViewable) { /* avoid the border */ if (HasBorder(pWin)) { int offx, offy, dx, dy; /* kruft to avoid double translates for each gravity */ offx = 0; offy = 0; for (g = 0; g <= StaticGravity; g++) { if (!gravitate[g]) continue; /* align winSize to gravitate[g]. * winSize is in new coordinates, * gravitate[g] is still in old coordinates */ GravityTranslate(x, y, oldx, oldy, dw, dh, g, &nx, &ny); dx = (oldx - nx) - offx; dy = (oldy - ny) - offy; if (dx || dy) { RegionTranslate(&pWin->winSize, dx, dy); offx += dx; offy += dy; } RegionIntersect(gravitate[g], gravitate[g], &pWin->winSize); } /* get winSize back where it belongs */ if (offx || offy) RegionTranslate(&pWin->winSize, -offx, -offy); } /* * add screen bits to the appropriate bucket */ if (oldWinClip) { /* * clip to new clipList */ RegionCopy(pRegion, oldWinClip); RegionTranslate(pRegion, nx - oldx, ny - oldy); RegionIntersect(oldWinClip, pRegion, &pWin->clipList); /* * don't step on any gravity bits which will be copied after this * region. Note -- this assumes that the regions will be copied * in gravity order. */ for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate[g]) RegionSubtract(oldWinClip, oldWinClip, gravitate[g]); } RegionTranslate(oldWinClip, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate[g]) gravitate[g] = oldWinClip; else { RegionUnion(gravitate[g], gravitate[g], oldWinClip); RegionDestroy(oldWinClip); } } /* * move the bits on the screen */ destClip = NULL; for (g = 0; g <= StaticGravity; g++) { if (!gravitate[g]) continue; GravityTranslate(x, y, oldx, oldy, dw, dh, g, &nx, &ny); oldpt.x = oldx + (x - nx); oldpt.y = oldy + (y - ny); /* Note that gravitate[g] is *translated* by CopyWindow */ /* only copy the remaining useful bits */ RegionIntersect(gravitate[g], gravitate[g], oldRegion); /* clip to not overwrite already copied areas */ if (destClip) { RegionTranslate(destClip, oldpt.x - x, oldpt.y - y); RegionSubtract(gravitate[g], gravitate[g], destClip); RegionTranslate(destClip, x - oldpt.x, y - oldpt.y); } /* and move those bits */ if (oldpt.x != x || oldpt.y != y #ifdef COMPOSITE || pWin->redirectDraw #endif ) { (*pWin->drawable.pScreen->CopyWindow) (pWin, oldpt, gravitate[g]); } /* remove any overwritten bits from the remaining useful bits */ RegionSubtract(oldRegion, oldRegion, gravitate[g]); /* * recompute exposed regions of child windows */ for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->winGravity != g) continue; RegionIntersect(pRegion, &pChild->borderClip, gravitate[g]); TraverseTree(pChild, miRecomputeExposures, (void *) pRegion); } /* * remove the successfully copied regions of the * window from its exposed region */ if (g == pWin->bitGravity) RegionSubtract(&pWin->valdata->after.exposed, &pWin->valdata->after.exposed, gravitate[g]); if (!destClip) destClip = gravitate[g]; else { RegionUnion(destClip, destClip, gravitate[g]); RegionDestroy(gravitate[g]); } } RegionDestroy(oldRegion); RegionDestroy(pRegion); if (destClip) RegionDestroy(destClip); if (anyMarked) { (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange, VTOther); } } if (pWin->realized) WindowsRestructured(); } WindowPtr miGetLayerWindow(WindowPtr pWin) { return pWin->firstChild; } /****** * * miSetShape * The border/window shape has changed. Recompute winSize/borderSize * and send appropriate exposure events */ void miSetShape(WindowPtr pWin, int kind) { Bool WasViewable = (Bool) (pWin->viewable); ScreenPtr pScreen = pWin->drawable.pScreen; Bool anyMarked = FALSE; WindowPtr pLayerWin; if (kind != ShapeInput) { if (WasViewable) { anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); if (pWin->valdata) { if (HasBorder(pWin)) { RegionPtr borderVisible; borderVisible = RegionCreate(NullBox, 1); RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } pWin->valdata->before.resized = TRUE; } } SetWinSize(pWin); SetBorderSize(pWin); ResizeChildrenWinSize(pWin, 0, 0, 0, 0); if (WasViewable) { anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL); if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, NullWindow, VTOther); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, NULL, VTOther); } } } if (pWin->realized) WindowsRestructured(); CheckCursorConfinement(pWin); } /* Keeps the same inside(!) origin */ void miChangeBorderWidth(WindowPtr pWin, unsigned int width) { int oldwidth; Bool anyMarked = FALSE; ScreenPtr pScreen; Bool WasViewable = (Bool) (pWin->viewable); Bool HadBorder; WindowPtr pLayerWin; oldwidth = wBorderWidth(pWin); if (oldwidth == width) return; HadBorder = HasBorder(pWin); pScreen = pWin->drawable.pScreen; if (WasViewable && width < oldwidth) anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); pWin->borderWidth = width; SetBorderSize(pWin); if (WasViewable) { if (width > oldwidth) { anyMarked = (*pScreen->MarkOverlappedWindows) (pWin, pWin, &pLayerWin); /* * save the old border visible region to correctly compute * borderExposed. */ if (pWin->valdata && HadBorder) { RegionPtr borderVisible; borderVisible = RegionCreate(NULL, 1); RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } } if (anyMarked) { (*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther); (*pScreen->HandleExposures) (pLayerWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin, VTOther); } } if (pWin->realized) WindowsRestructured(); } void miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) { if ((pChild != pWin) || fromConfigure) { RegionEmpty(&pChild->clipList); if (pChild->drawable.pScreen->ClipNotify) (*pChild->drawable.pScreen->ClipNotify) (pChild, 0, 0); RegionEmpty(&pChild->borderClip); } } WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y) { WindowPtr pWin; BoxRec box; pWin = DeepestSpriteWin(pSprite)->firstChild; while (pWin) { if ((pWin->mapped) && (x >= pWin->drawable.x - wBorderWidth(pWin)) && (x < pWin->drawable.x + (int) pWin->drawable.width + wBorderWidth(pWin)) && (y >= pWin->drawable.y - wBorderWidth(pWin)) && (y < pWin->drawable.y + (int) pWin->drawable.height + wBorderWidth(pWin)) /* When a window is shaped, a further check * is made to see if the point is inside * borderSize */ && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y)) && (!wInputShape(pWin) || RegionContainsPoint(wInputShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) /* In rootless mode windows may be offscreen, even when * they're in X's stack. (E.g. if the native window system * implements some form of virtual desktop system). */ && !pWin->unhittable) { if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) { pSprite->spriteTraceSize += 10; pSprite->spriteTrace = reallocarray(pSprite->spriteTrace, pSprite->spriteTraceSize, sizeof(WindowPtr)); } pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin; pWin = pWin->firstChild; } else pWin = pWin->nextSib; } return DeepestSpriteWin(pSprite); } /** * Traversed from the root window to the window at the position x/y. While * traversing, it sets up the traversal history in the spriteTrace array. * After completing, the spriteTrace history is set in the following way: * spriteTrace[0] ... root window * spriteTrace[1] ... top level window that encloses x/y * ... * spriteTrace[spriteTraceGood - 1] ... window at x/y * * @returns the window at the given coordinates. */ WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y) { pSprite->spriteTraceGood = 1; /* root window still there */ return miSpriteTrace(pSprite, x, y); } xorg-server-21.1.16/mi/mizerarc.c0000644000175000017500000005555514757411105012237 /************************************************************ Copyright 1989, 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. Author: Bob Scheifler, MIT X Consortium ********************************************************/ /* Derived from: * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" * by M. L. V. Pitteway * The Computer Journal, November 1967, Volume 10, Number 3, pp. 282-289 */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "mi.h" #include "mizerarc.h" #define FULLCIRCLE (360 * 64) #define OCTANT (45 * 64) #define QUADRANT (90 * 64) #define HALFCIRCLE (180 * 64) #define QUADRANT3 (270 * 64) #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #define Dsin(d) ((d) == 0 ? 0.0 : ((d) == QUADRANT ? 1.0 : \ ((d) == HALFCIRCLE ? 0.0 : \ ((d) == QUADRANT3 ? -1.0 : sin((double)d*(M_PI/11520.0)))))) #define Dcos(d) ((d) == 0 ? 1.0 : ((d) == QUADRANT ? 0.0 : \ ((d) == HALFCIRCLE ? -1.0 : \ ((d) == QUADRANT3 ? 0.0 : cos((double)d*(M_PI/11520.0)))))) #define EPSILON45 64 typedef struct { int skipStart; int haveStart; DDXPointRec startPt; int haveLast; int skipLast; DDXPointRec endPt; int dashIndex; int dashOffset; int dashIndexInit; int dashOffsetInit; } DashInfo; static miZeroArcPtRec oob = { 65536, 65536, 0 }; /* * (x - l)^2 / (W/2)^2 + (y + H/2)^2 / (H/2)^2 = 1 * * where l is either 0 or .5 * * alpha = 4(W^2) * beta = 4(H^2) * gamma = 0 * u = 2(W^2)H * v = 4(H^2)l * k = -4(H^2)(l^2) * */ Bool miZeroArcSetup(xArc * arc, miZeroArcRec * info, Bool ok360) { int l; int angle1, angle2; int startseg, endseg; int startAngle, endAngle; int i, overlap; miZeroArcPtRec start, end; l = arc->width & 1; if (arc->width == arc->height) { info->alpha = 4; info->beta = 4; info->k1 = -8; info->k3 = -16; info->b = 12; info->a = (arc->width << 2) - 12; info->d = 17 - (arc->width << 1); if (l) { info->b -= 4; info->a += 4; info->d -= 7; } } else if (!arc->width || !arc->height) { info->alpha = 0; info->beta = 0; info->k1 = 0; info->k3 = 0; info->a = -(int) arc->height; info->b = 0; info->d = -1; } else { /* initial conditions */ info->alpha = (arc->width * arc->width) << 2; info->beta = (arc->height * arc->height) << 2; info->k1 = info->beta << 1; info->k3 = info->k1 + (info->alpha << 1); info->b = l ? 0 : -info->beta; info->a = info->alpha * arc->height; info->d = info->b - (info->a >> 1) - (info->alpha >> 2); if (l) info->d -= info->beta >> 2; info->a -= info->b; /* take first step, d < 0 always */ info->b -= info->k1; info->a += info->k1; info->d += info->b; /* octant change, b < 0 always */ info->k1 = -info->k1; info->k3 = -info->k3; info->b = -info->b; info->d = info->b - info->a - info->d; info->a = info->a - (info->b << 1); } info->dx = 1; info->dy = 0; info->w = (arc->width + 1) >> 1; info->h = arc->height >> 1; info->xorg = arc->x + (arc->width >> 1); info->yorg = arc->y; info->xorgo = info->xorg + l; info->yorgo = info->yorg + arc->height; if (!arc->width) { if (!arc->height) { info->x = 0; info->y = 0; info->initialMask = 0; info->startAngle = 0; info->endAngle = 0; info->start = oob; info->end = oob; return FALSE; } info->x = 0; info->y = 1; } else { info->x = 1; info->y = 0; } angle1 = arc->angle1; angle2 = arc->angle2; if ((angle1 == 0) && (angle2 >= FULLCIRCLE)) { startAngle = 0; endAngle = 0; } else { if (angle2 > FULLCIRCLE) angle2 = FULLCIRCLE; else if (angle2 < -FULLCIRCLE) angle2 = -FULLCIRCLE; if (angle2 < 0) { startAngle = angle1 + angle2; endAngle = angle1; } else { startAngle = angle1; endAngle = angle1 + angle2; } if (startAngle < 0) startAngle = FULLCIRCLE - (-startAngle) % FULLCIRCLE; if (startAngle >= FULLCIRCLE) startAngle = startAngle % FULLCIRCLE; if (endAngle < 0) endAngle = FULLCIRCLE - (-endAngle) % FULLCIRCLE; if (endAngle >= FULLCIRCLE) endAngle = endAngle % FULLCIRCLE; } info->startAngle = startAngle; info->endAngle = endAngle; if (ok360 && (startAngle == endAngle) && arc->angle2 && arc->width && arc->height) { info->initialMask = 0xf; info->start = oob; info->end = oob; return TRUE; } startseg = startAngle / OCTANT; if (!arc->height || (((startseg + 1) & 2) && arc->width)) { start.x = Dcos(startAngle) * ((arc->width + 1) / 2.0); if (start.x < 0) start.x = -start.x; start.y = -1; } else { start.y = Dsin(startAngle) * (arc->height / 2.0); if (start.y < 0) start.y = -start.y; start.y = info->h - start.y; start.x = 65536; } endseg = endAngle / OCTANT; if (!arc->height || (((endseg + 1) & 2) && arc->width)) { end.x = Dcos(endAngle) * ((arc->width + 1) / 2.0); if (end.x < 0) end.x = -end.x; end.y = -1; } else { end.y = Dsin(endAngle) * (arc->height / 2.0); if (end.y < 0) end.y = -end.y; end.y = info->h - end.y; end.x = 65536; } info->firstx = start.x; info->firsty = start.y; info->initialMask = 0; overlap = arc->angle2 && (endAngle <= startAngle); for (i = 0; i < 4; i++) { if (overlap ? ((i * QUADRANT <= endAngle) || ((i + 1) * QUADRANT > startAngle)) : ((i * QUADRANT <= endAngle) && ((i + 1) * QUADRANT > startAngle))) info->initialMask |= (1 << i); } start.mask = info->initialMask; end.mask = info->initialMask; startseg >>= 1; endseg >>= 1; overlap = overlap && (endseg == startseg); if (start.x != end.x || start.y != end.y || !overlap) { if (startseg & 1) { if (!overlap) info->initialMask &= ~(1 << startseg); if (start.x > end.x || start.y > end.y) end.mask &= ~(1 << startseg); } else { start.mask &= ~(1 << startseg); if (((start.x < end.x || start.y < end.y) || (start.x == end.x && start.y == end.y && (endseg & 1))) && !overlap) end.mask &= ~(1 << startseg); } if (endseg & 1) { end.mask &= ~(1 << endseg); if (((start.x > end.x || start.y > end.y) || (start.x == end.x && start.y == end.y && !(startseg & 1))) && !overlap) start.mask &= ~(1 << endseg); } else { if (!overlap) info->initialMask &= ~(1 << endseg); if (start.x < end.x || start.y < end.y) start.mask &= ~(1 << endseg); } } /* take care of case when start and stop are both near 45 */ /* handle here rather than adding extra code to pixelization loops */ if (startAngle && ((start.y < 0 && end.y >= 0) || (start.y >= 0 && end.y < 0))) { i = (startAngle + OCTANT) % OCTANT; if (i < EPSILON45 || i > OCTANT - EPSILON45) { i = (endAngle + OCTANT) % OCTANT; if (i < EPSILON45 || i > OCTANT - EPSILON45) { if (start.y < 0) { i = Dsin(startAngle) * (arc->height / 2.0); if (i < 0) i = -i; if (info->h - i == end.y) start.mask = end.mask; } else { i = Dsin(endAngle) * (arc->height / 2.0); if (i < 0) i = -i; if (info->h - i == start.y) end.mask = start.mask; } } } } if (startseg & 1) { info->start = start; info->end = oob; } else { info->end = start; info->start = oob; } if (endseg & 1) { info->altend = end; if (info->altend.x < info->end.x || info->altend.y < info->end.y) { miZeroArcPtRec tmp; tmp = info->altend; info->altend = info->end; info->end = tmp; } info->altstart = oob; } else { info->altstart = end; if (info->altstart.x < info->start.x || info->altstart.y < info->start.y) { miZeroArcPtRec tmp; tmp = info->altstart; info->altstart = info->start; info->start = tmp; } info->altend = oob; } if (!info->start.x || !info->start.y) { info->initialMask = info->start.mask; info->start = info->altstart; } if (!arc->width && (arc->height == 1)) { /* kludge! */ info->initialMask |= info->end.mask; info->initialMask |= info->initialMask << 1; info->end.x = 0; info->end.mask = 0; } return FALSE; } #define Pixelate(xval,yval) \ { \ pts->x = xval; \ pts->y = yval; \ pts++; \ } #define DoPix(idx,xval,yval) if (mask & (1 << idx)) Pixelate(xval, yval); static DDXPointPtr miZeroArcPts(xArc * arc, DDXPointPtr pts) { miZeroArcRec info; int x, y, a, b, d, mask; int k1, k3, dx, dy; Bool do360; do360 = miZeroArcSetup(arc, &info, TRUE); MIARCSETUP(); mask = info.initialMask; if (!(arc->width & 1)) { DoPix(1, info.xorgo, info.yorg); DoPix(3, info.xorgo, info.yorgo); } if (!info.end.x || !info.end.y) { mask = info.end.mask; info.end = info.altend; } if (do360 && (arc->width == arc->height) && !(arc->width & 1)) { int yorgh = info.yorg + info.h; int xorghp = info.xorg + info.h; int xorghn = info.xorg - info.h; while (1) { Pixelate(info.xorg + x, info.yorg + y); Pixelate(info.xorg - x, info.yorg + y); Pixelate(info.xorg - x, info.yorgo - y); Pixelate(info.xorg + x, info.yorgo - y); if (a < 0) break; Pixelate(xorghp - y, yorgh - x); Pixelate(xorghn + y, yorgh - x); Pixelate(xorghn + y, yorgh + x); Pixelate(xorghp - y, yorgh + x); MIARCCIRCLESTEP(; ); } if (x > 1 && pts[-1].x == pts[-5].x && pts[-1].y == pts[-5].y) pts -= 4; x = info.w; y = info.h; } else if (do360) { while (y < info.h || x < info.w) { MIARCOCTANTSHIFT(; ); Pixelate(info.xorg + x, info.yorg + y); Pixelate(info.xorgo - x, info.yorg + y); Pixelate(info.xorgo - x, info.yorgo - y); Pixelate(info.xorg + x, info.yorgo - y); MIARCSTEP(; ,; ); } } else { while (y < info.h || x < info.w) { MIARCOCTANTSHIFT(; ); if ((x == info.start.x) || (y == info.start.y)) { mask = info.start.mask; info.start = info.altstart; } DoPix(0, info.xorg + x, info.yorg + y); DoPix(1, info.xorgo - x, info.yorg + y); DoPix(2, info.xorgo - x, info.yorgo - y); DoPix(3, info.xorg + x, info.yorgo - y); if ((x == info.end.x) || (y == info.end.y)) { mask = info.end.mask; info.end = info.altend; } MIARCSTEP(; ,; ); } } if ((x == info.start.x) || (y == info.start.y)) mask = info.start.mask; DoPix(0, info.xorg + x, info.yorg + y); DoPix(2, info.xorgo - x, info.yorgo - y); if (arc->height & 1) { DoPix(1, info.xorgo - x, info.yorg + y); DoPix(3, info.xorg + x, info.yorgo - y); } return pts; } #undef DoPix #define DoPix(idx,xval,yval) \ if (mask & (1 << idx)) \ { \ arcPts[idx]->x = xval; \ arcPts[idx]->y = yval; \ arcPts[idx]++; \ } static void miZeroArcDashPts(GCPtr pGC, xArc * arc, DashInfo * dinfo, DDXPointPtr points, int maxPts, DDXPointPtr * evenPts, DDXPointPtr * oddPts) { miZeroArcRec info; int x, y, a, b, d, mask; int k1, k3, dx, dy; int dashRemaining; DDXPointPtr arcPts[4]; DDXPointPtr startPts[5], endPts[5]; int deltas[5]; DDXPointPtr startPt, pt, lastPt, pts; int i, j, delta, ptsdelta, seg, startseg; for (i = 0; i < 4; i++) arcPts[i] = points + (i * maxPts); (void) miZeroArcSetup(arc, &info, FALSE); MIARCSETUP(); mask = info.initialMask; startseg = info.startAngle / QUADRANT; startPt = arcPts[startseg]; if (!(arc->width & 1)) { DoPix(1, info.xorgo, info.yorg); DoPix(3, info.xorgo, info.yorgo); } if (!info.end.x || !info.end.y) { mask = info.end.mask; info.end = info.altend; } while (y < info.h || x < info.w) { MIARCOCTANTSHIFT(; ); if ((x == info.firstx) || (y == info.firsty)) startPt = arcPts[startseg]; if ((x == info.start.x) || (y == info.start.y)) { mask = info.start.mask; info.start = info.altstart; } DoPix(0, info.xorg + x, info.yorg + y); DoPix(1, info.xorgo - x, info.yorg + y); DoPix(2, info.xorgo - x, info.yorgo - y); DoPix(3, info.xorg + x, info.yorgo - y); if ((x == info.end.x) || (y == info.end.y)) { mask = info.end.mask; info.end = info.altend; } MIARCSTEP(; ,; ); } if ((x == info.firstx) || (y == info.firsty)) startPt = arcPts[startseg]; if ((x == info.start.x) || (y == info.start.y)) mask = info.start.mask; DoPix(0, info.xorg + x, info.yorg + y); DoPix(2, info.xorgo - x, info.yorgo - y); if (arc->height & 1) { DoPix(1, info.xorgo - x, info.yorg + y); DoPix(3, info.xorg + x, info.yorgo - y); } for (i = 0; i < 4; i++) { seg = (startseg + i) & 3; pt = points + (seg * maxPts); if (seg & 1) { startPts[i] = pt; endPts[i] = arcPts[seg]; deltas[i] = 1; } else { startPts[i] = arcPts[seg] - 1; endPts[i] = pt - 1; deltas[i] = -1; } } startPts[4] = startPts[0]; endPts[4] = startPt; startPts[0] = startPt; if (startseg & 1) { if (startPts[4] != endPts[4]) endPts[4]--; deltas[4] = 1; } else { if (startPts[0] > startPts[4]) startPts[0]--; if (startPts[4] < endPts[4]) endPts[4]--; deltas[4] = -1; } if (arc->angle2 < 0) { DDXPointPtr tmps, tmpe; int tmpd; tmpd = deltas[0]; tmps = startPts[0] - tmpd; tmpe = endPts[0] - tmpd; startPts[0] = endPts[4] - deltas[4]; endPts[0] = startPts[4] - deltas[4]; deltas[0] = -deltas[4]; startPts[4] = tmpe; endPts[4] = tmps; deltas[4] = -tmpd; tmpd = deltas[1]; tmps = startPts[1] - tmpd; tmpe = endPts[1] - tmpd; startPts[1] = endPts[3] - deltas[3]; endPts[1] = startPts[3] - deltas[3]; deltas[1] = -deltas[3]; startPts[3] = tmpe; endPts[3] = tmps; deltas[3] = -tmpd; tmps = startPts[2] - deltas[2]; startPts[2] = endPts[2] - deltas[2]; endPts[2] = tmps; deltas[2] = -deltas[2]; } for (i = 0; i < 5 && startPts[i] == endPts[i]; i++); if (i == 5) return; pt = startPts[i]; for (j = 4; startPts[j] == endPts[j]; j--); lastPt = endPts[j] - deltas[j]; if (dinfo->haveLast && (pt->x == dinfo->endPt.x) && (pt->y == dinfo->endPt.y)) { startPts[i] += deltas[i]; } else { dinfo->dashIndex = dinfo->dashIndexInit; dinfo->dashOffset = dinfo->dashOffsetInit; } if (!dinfo->skipStart && (info.startAngle != info.endAngle)) { dinfo->startPt = *pt; dinfo->haveStart = TRUE; } else if (!dinfo->skipLast && dinfo->haveStart && (lastPt->x == dinfo->startPt.x) && (lastPt->y == dinfo->startPt.y) && (lastPt != startPts[i])) endPts[j] = lastPt; if (info.startAngle != info.endAngle) { dinfo->haveLast = TRUE; dinfo->endPt = *lastPt; } dashRemaining = pGC->dash[dinfo->dashIndex] - dinfo->dashOffset; for (i = 0; i < 5; i++) { pt = startPts[i]; lastPt = endPts[i]; delta = deltas[i]; while (pt != lastPt) { if (dinfo->dashIndex & 1) { pts = *oddPts; ptsdelta = -1; } else { pts = *evenPts; ptsdelta = 1; } while ((pt != lastPt) && --dashRemaining >= 0) { *pts = *pt; pts += ptsdelta; pt += delta; } if (dinfo->dashIndex & 1) *oddPts = pts; else *evenPts = pts; if (dashRemaining <= 0) { if (++(dinfo->dashIndex) == pGC->numInDashList) dinfo->dashIndex = 0; dashRemaining = pGC->dash[dinfo->dashIndex]; } } } dinfo->dashOffset = pGC->dash[dinfo->dashIndex] - dashRemaining; } void miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs) { int maxPts = 0; int n, maxw = 0; xArc *arc; int i; DDXPointPtr points, pts, oddPts = NULL; DDXPointPtr pt; int numPts; Bool dospans; int *widths = NULL; XID fgPixel = pGC->fgPixel; DashInfo dinfo; for (arc = parcs, i = narcs; --i >= 0; arc++) { if (!miCanZeroArc(arc)) miWideArc(pDraw, pGC, 1, arc); else { if (arc->width > arc->height) n = arc->width + (arc->height >> 1); else n = arc->height + (arc->width >> 1); if (n > maxPts) maxPts = n; } } if (!maxPts) return; numPts = maxPts << 2; dospans = (pGC->fillStyle != FillSolid); if (dospans) { widths = xallocarray(numPts, sizeof(int)); if (!widths) return; maxw = 0; } if (pGC->lineStyle != LineSolid) { numPts <<= 1; dinfo.haveStart = FALSE; dinfo.skipStart = FALSE; dinfo.haveLast = FALSE; dinfo.dashIndexInit = 0; dinfo.dashOffsetInit = 0; miStepDash((int) pGC->dashOffset, &dinfo.dashIndexInit, (unsigned char *) pGC->dash, (int) pGC->numInDashList, &dinfo.dashOffsetInit); } points = xallocarray(numPts, sizeof(DDXPointRec)); if (!points) { if (dospans) { free(widths); } return; } for (arc = parcs, i = narcs; --i >= 0; arc++) { if (miCanZeroArc(arc)) { if (pGC->lineStyle == LineSolid) pts = miZeroArcPts(arc, points); else { pts = points; oddPts = &points[(numPts >> 1) - 1]; dinfo.skipLast = i; miZeroArcDashPts(pGC, arc, &dinfo, oddPts + 1, maxPts, &pts, &oddPts); dinfo.skipStart = TRUE; } n = pts - points; if (!dospans) (*pGC->ops->PolyPoint) (pDraw, pGC, CoordModeOrigin, n, points); else { if (n > maxw) { while (maxw < n) widths[maxw++] = 1; } if (pGC->miTranslate) { for (pt = points; pt != pts; pt++) { pt->x += pDraw->x; pt->y += pDraw->y; } } (*pGC->ops->FillSpans) (pDraw, pGC, n, points, widths, FALSE); } if (pGC->lineStyle != LineDoubleDash) continue; if ((pGC->fillStyle == FillSolid) || (pGC->fillStyle == FillStippled)) { ChangeGCVal gcval; gcval.val = pGC->bgPixel; ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } pts = &points[numPts >> 1]; oddPts++; n = pts - oddPts; if (!dospans) (*pGC->ops->PolyPoint) (pDraw, pGC, CoordModeOrigin, n, oddPts); else { if (n > maxw) { while (maxw < n) widths[maxw++] = 1; } if (pGC->miTranslate) { for (pt = oddPts; pt != pts; pt++) { pt->x += pDraw->x; pt->y += pDraw->y; } } (*pGC->ops->FillSpans) (pDraw, pGC, n, oddPts, widths, FALSE); } if ((pGC->fillStyle == FillSolid) || (pGC->fillStyle == FillStippled)) { ChangeGCVal gcval; gcval.val = fgPixel; ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } } } free(points); if (dospans) { free(widths); } } xorg-server-21.1.16/mi/mizerclip.c0000644000175000017500000005257314757411105012416 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "scrnintstr.h" #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" #include "mi.h" #include "miline.h" /* The bresenham error equation used in the mi/mfb/cfb line routines is: e = error dx = difference in raw X coordinates dy = difference in raw Y coordinates M = # of steps in X direction N = # of steps in Y direction B = 0 to prefer diagonal steps in a given octant, 1 to prefer axial steps in a given octant For X major lines: e = 2Mdy - 2Ndx - dx - B -2dx <= e < 0 For Y major lines: e = 2Ndx - 2Mdy - dy - B -2dy <= e < 0 At the start of the line, we have taken 0 X steps and 0 Y steps, so M = 0 and N = 0: X major e = 2Mdy - 2Ndx - dx - B = -dx - B Y major e = 2Ndx - 2Mdy - dy - B = -dy - B At the end of the line, we have taken dx X steps and dy Y steps, so M = dx and N = dy: X major e = 2Mdy - 2Ndx - dx - B = 2dxdy - 2dydx - dx - B = -dx - B Y major e = 2Ndx - 2Mdy - dy - B = 2dydx - 2dxdy - dy - B = -dy - B Thus, the error term is the same at the start and end of the line. Let us consider clipping an X coordinate. There are 4 cases which represent the two independent cases of clipping the start vs. the end of the line and an X major vs. a Y major line. In any of these cases, we know the number of X steps (M) and we wish to find the number of Y steps (N). Thus, we will solve our error term equation. If we are clipping the start of the line, we will find the smallest N that satisfies our error term inequality. If we are clipping the end of the line, we will find the largest number of Y steps that satisfies the inequality. In that case, since we are representing the Y steps as (dy - N), we will actually want to solve for the smallest N in that equation. Case 1: X major, starting X coordinate moved by M steps -2dx <= 2Mdy - 2Ndx - dx - B < 0 2Ndx <= 2Mdy - dx - B + 2dx 2Ndx > 2Mdy - dx - B 2Ndx <= 2Mdy + dx - B N > (2Mdy - dx - B) / 2dx N <= (2Mdy + dx - B) / 2dx Since we are trying to find the smallest N that satisfies these equations, we should use the > inequality to find the smallest: N = floor((2Mdy - dx - B) / 2dx) + 1 = floor((2Mdy - dx - B + 2dx) / 2dx) = floor((2Mdy + dx - B) / 2dx) Case 1b: X major, ending X coordinate moved to M steps Same derivations as Case 1, but we want the largest N that satisfies the equations, so we use the <= inequality: N = floor((2Mdy + dx - B) / 2dx) Case 2: X major, ending X coordinate moved by M steps -2dx <= 2(dx - M)dy - 2(dy - N)dx - dx - B < 0 -2dx <= 2dxdy - 2Mdy - 2dxdy + 2Ndx - dx - B < 0 -2dx <= 2Ndx - 2Mdy - dx - B < 0 2Ndx >= 2Mdy + dx + B - 2dx 2Ndx < 2Mdy + dx + B 2Ndx >= 2Mdy - dx + B N < (2Mdy + dx + B) / 2dx N >= (2Mdy - dx + B) / 2dx Since we are trying to find the highest number of Y steps that satisfies these equations, we need to find the smallest N, so we should use the >= inequality to find the smallest: N = ceiling((2Mdy - dx + B) / 2dx) = floor((2Mdy - dx + B + 2dx - 1) / 2dx) = floor((2Mdy + dx + B - 1) / 2dx) Case 2b: X major, starting X coordinate moved to M steps from end Same derivations as Case 2, but we want the smallest number of Y steps, so we want the highest N, so we use the < inequality: N = ceiling((2Mdy + dx + B) / 2dx) - 1 = floor((2Mdy + dx + B + 2dx - 1) / 2dx) - 1 = floor((2Mdy + dx + B + 2dx - 1 - 2dx) / 2dx) = floor((2Mdy + dx + B - 1) / 2dx) Case 3: Y major, starting X coordinate moved by M steps -2dy <= 2Ndx - 2Mdy - dy - B < 0 2Ndx >= 2Mdy + dy + B - 2dy 2Ndx < 2Mdy + dy + B 2Ndx >= 2Mdy - dy + B N < (2Mdy + dy + B) / 2dx N >= (2Mdy - dy + B) / 2dx Since we are trying to find the smallest N that satisfies these equations, we should use the >= inequality to find the smallest: N = ceiling((2Mdy - dy + B) / 2dx) = floor((2Mdy - dy + B + 2dx - 1) / 2dx) = floor((2Mdy - dy + B - 1) / 2dx) + 1 Case 3b: Y major, ending X coordinate moved to M steps Same derivations as Case 3, but we want the largest N that satisfies the equations, so we use the < inequality: N = ceiling((2Mdy + dy + B) / 2dx) - 1 = floor((2Mdy + dy + B + 2dx - 1) / 2dx) - 1 = floor((2Mdy + dy + B + 2dx - 1 - 2dx) / 2dx) = floor((2Mdy + dy + B - 1) / 2dx) Case 4: Y major, ending X coordinate moved by M steps -2dy <= 2(dy - N)dx - 2(dx - M)dy - dy - B < 0 -2dy <= 2dxdy - 2Ndx - 2dxdy + 2Mdy - dy - B < 0 -2dy <= 2Mdy - 2Ndx - dy - B < 0 2Ndx <= 2Mdy - dy - B + 2dy 2Ndx > 2Mdy - dy - B 2Ndx <= 2Mdy + dy - B N > (2Mdy - dy - B) / 2dx N <= (2Mdy + dy - B) / 2dx Since we are trying to find the highest number of Y steps that satisfies these equations, we need to find the smallest N, so we should use the > inequality to find the smallest: N = floor((2Mdy - dy - B) / 2dx) + 1 Case 4b: Y major, starting X coordinate moved to M steps from end Same analysis as Case 4, but we want the smallest number of Y steps which means the largest N, so we use the <= inequality: N = floor((2Mdy + dy - B) / 2dx) Now let's try the Y coordinates, we have the same 4 cases. Case 5: X major, starting Y coordinate moved by N steps -2dx <= 2Mdy - 2Ndx - dx - B < 0 2Mdy >= 2Ndx + dx + B - 2dx 2Mdy < 2Ndx + dx + B 2Mdy >= 2Ndx - dx + B M < (2Ndx + dx + B) / 2dy M >= (2Ndx - dx + B) / 2dy Since we are trying to find the smallest M, we use the >= inequality: M = ceiling((2Ndx - dx + B) / 2dy) = floor((2Ndx - dx + B + 2dy - 1) / 2dy) = floor((2Ndx - dx + B - 1) / 2dy) + 1 Case 5b: X major, ending Y coordinate moved to N steps Same derivations as Case 5, but we want the largest M that satisfies the equations, so we use the < inequality: M = ceiling((2Ndx + dx + B) / 2dy) - 1 = floor((2Ndx + dx + B + 2dy - 1) / 2dy) - 1 = floor((2Ndx + dx + B + 2dy - 1 - 2dy) / 2dy) = floor((2Ndx + dx + B - 1) / 2dy) Case 6: X major, ending Y coordinate moved by N steps -2dx <= 2(dx - M)dy - 2(dy - N)dx - dx - B < 0 -2dx <= 2dxdy - 2Mdy - 2dxdy + 2Ndx - dx - B < 0 -2dx <= 2Ndx - 2Mdy - dx - B < 0 2Mdy <= 2Ndx - dx - B + 2dx 2Mdy > 2Ndx - dx - B 2Mdy <= 2Ndx + dx - B M > (2Ndx - dx - B) / 2dy M <= (2Ndx + dx - B) / 2dy Largest # of X steps means smallest M, so use the > inequality: M = floor((2Ndx - dx - B) / 2dy) + 1 Case 6b: X major, starting Y coordinate moved to N steps from end Same derivations as Case 6, but we want the smallest # of X steps which means the largest M, so use the <= inequality: M = floor((2Ndx + dx - B) / 2dy) Case 7: Y major, starting Y coordinate moved by N steps -2dy <= 2Ndx - 2Mdy - dy - B < 0 2Mdy <= 2Ndx - dy - B + 2dy 2Mdy > 2Ndx - dy - B 2Mdy <= 2Ndx + dy - B M > (2Ndx - dy - B) / 2dy M <= (2Ndx + dy - B) / 2dy To find the smallest M, use the > inequality: M = floor((2Ndx - dy - B) / 2dy) + 1 = floor((2Ndx - dy - B + 2dy) / 2dy) = floor((2Ndx + dy - B) / 2dy) Case 7b: Y major, ending Y coordinate moved to N steps Same derivations as Case 7, but we want the largest M that satisfies the equations, so use the <= inequality: M = floor((2Ndx + dy - B) / 2dy) Case 8: Y major, ending Y coordinate moved by N steps -2dy <= 2(dy - N)dx - 2(dx - M)dy - dy - B < 0 -2dy <= 2dxdy - 2Ndx - 2dxdy + 2Mdy - dy - B < 0 -2dy <= 2Mdy - 2Ndx - dy - B < 0 2Mdy >= 2Ndx + dy + B - 2dy 2Mdy < 2Ndx + dy + B 2Mdy >= 2Ndx - dy + B M < (2Ndx + dy + B) / 2dy M >= (2Ndx - dy + B) / 2dy To find the highest X steps, find the smallest M, use the >= inequality: M = ceiling((2Ndx - dy + B) / 2dy) = floor((2Ndx - dy + B + 2dy - 1) / 2dy) = floor((2Ndx + dy + B - 1) / 2dy) Case 8b: Y major, starting Y coordinate moved to N steps from the end Same derivations as Case 8, but we want to find the smallest # of X steps which means the largest M, so we use the < inequality: M = ceiling((2Ndx + dy + B) / 2dy) - 1 = floor((2Ndx + dy + B + 2dy - 1) / 2dy) - 1 = floor((2Ndx + dy + B + 2dy - 1 - 2dy) / 2dy) = floor((2Ndx + dy + B - 1) / 2dy) So, our equations are: 1: X major move x1 to x1+M floor((2Mdy + dx - B) / 2dx) 1b: X major move x2 to x1+M floor((2Mdy + dx - B) / 2dx) 2: X major move x2 to x2-M floor((2Mdy + dx + B - 1) / 2dx) 2b: X major move x1 to x2-M floor((2Mdy + dx + B - 1) / 2dx) 3: Y major move x1 to x1+M floor((2Mdy - dy + B - 1) / 2dx) + 1 3b: Y major move x2 to x1+M floor((2Mdy + dy + B - 1) / 2dx) 4: Y major move x2 to x2-M floor((2Mdy - dy - B) / 2dx) + 1 4b: Y major move x1 to x2-M floor((2Mdy + dy - B) / 2dx) 5: X major move y1 to y1+N floor((2Ndx - dx + B - 1) / 2dy) + 1 5b: X major move y2 to y1+N floor((2Ndx + dx + B - 1) / 2dy) 6: X major move y2 to y2-N floor((2Ndx - dx - B) / 2dy) + 1 6b: X major move y1 to y2-N floor((2Ndx + dx - B) / 2dy) 7: Y major move y1 to y1+N floor((2Ndx + dy - B) / 2dy) 7b: Y major move y2 to y1+N floor((2Ndx + dy - B) / 2dy) 8: Y major move y2 to y2-N floor((2Ndx + dy + B - 1) / 2dy) 8b: Y major move y1 to y2-N floor((2Ndx + dy + B - 1) / 2dy) We have the following constraints on all of the above terms: 0 < M,N <= 2^15 2^15 can be imposed by miZeroClipLine 0 <= dx/dy <= 2^16 - 1 0 <= B <= 1 The floor in all of the above equations can be accomplished with a simple C divide operation provided that both numerator and denominator are positive. Since dx,dy >= 0 and since moving an X coordinate implies that dx != 0 and moving a Y coordinate implies dy != 0, we know that the denominators are all > 0. For all lines, (-B) and (B-1) are both either 0 or -1, depending on the bias. Thus, we have to show that the 2MNdxy +/- dxy terms are all >= 1 or > 0 to prove that the numerators are positive (or zero). For X Major lines we know that dx > 0 and since 2Mdy is >= 0 due to the constraints, the first four equations all have numerators >= 0. For the second four equations, M > 0, so 2Mdy >= 2dy so (2Mdy - dy) >= dy So (2Mdy - dy) > 0, since they are Y major lines. Also, (2Mdy + dy) >= 3dy or (2Mdy + dy) > 0. So all of their numerators are >= 0. For the third set of four equations, N > 0, so 2Ndx >= 2dx so (2Ndx - dx) >= dx > 0. Similarly (2Ndx + dx) >= 3dx > 0. So all numerators >= 0. For the fourth set of equations, dy > 0 and 2Ndx >= 0, so all numerators are > 0. To consider overflow, consider the case of 2 * M,N * dx,dy + dx,dy. This is bounded <= 2 * 2^15 * (2^16 - 1) + (2^16 - 1) <= 2^16 * (2^16 - 1) + (2^16 - 1) <= 2^32 - 2^16 + 2^16 - 1 <= 2^32 - 1 Since the (-B) and (B-1) terms are all 0 or -1, the maximum value of the numerator is therefore (2^32 - 1), which does not overflow an unsigned 32 bit variable. */ /* Bit codes for the terms of the 16 clipping equations defined below. */ #define T_2NDX (1 << 0) #define T_2MDY (0) /* implicit term */ #define T_DXNOTY (1 << 1) #define T_DYNOTX (0) /* implicit term */ #define T_SUBDXORY (1 << 2) #define T_ADDDX (T_DXNOTY) /* composite term */ #define T_SUBDX (T_DXNOTY | T_SUBDXORY) /* composite term */ #define T_ADDDY (T_DYNOTX) /* composite term */ #define T_SUBDY (T_DYNOTX | T_SUBDXORY) /* composite term */ #define T_BIASSUBONE (1 << 3) #define T_SUBBIAS (0) /* implicit term */ #define T_DIV2DX (1 << 4) #define T_DIV2DY (0) /* implicit term */ #define T_ADDONE (1 << 5) /* Bit masks defining the 16 equations used in miZeroClipLine. */ #define EQN1 (T_2MDY | T_ADDDX | T_SUBBIAS | T_DIV2DX) #define EQN1B (T_2MDY | T_ADDDX | T_SUBBIAS | T_DIV2DX) #define EQN2 (T_2MDY | T_ADDDX | T_BIASSUBONE | T_DIV2DX) #define EQN2B (T_2MDY | T_ADDDX | T_BIASSUBONE | T_DIV2DX) #define EQN3 (T_2MDY | T_SUBDY | T_BIASSUBONE | T_DIV2DX | T_ADDONE) #define EQN3B (T_2MDY | T_ADDDY | T_BIASSUBONE | T_DIV2DX) #define EQN4 (T_2MDY | T_SUBDY | T_SUBBIAS | T_DIV2DX | T_ADDONE) #define EQN4B (T_2MDY | T_ADDDY | T_SUBBIAS | T_DIV2DX) #define EQN5 (T_2NDX | T_SUBDX | T_BIASSUBONE | T_DIV2DY | T_ADDONE) #define EQN5B (T_2NDX | T_ADDDX | T_BIASSUBONE | T_DIV2DY) #define EQN6 (T_2NDX | T_SUBDX | T_SUBBIAS | T_DIV2DY | T_ADDONE) #define EQN6B (T_2NDX | T_ADDDX | T_SUBBIAS | T_DIV2DY) #define EQN7 (T_2NDX | T_ADDDY | T_SUBBIAS | T_DIV2DY) #define EQN7B (T_2NDX | T_ADDDY | T_SUBBIAS | T_DIV2DY) #define EQN8 (T_2NDX | T_ADDDY | T_BIASSUBONE | T_DIV2DY) #define EQN8B (T_2NDX | T_ADDDY | T_BIASSUBONE | T_DIV2DY) /* miZeroClipLine * * returns: 1 for partially clipped line * -1 for completely clipped line * */ int miZeroClipLine(int xmin, int ymin, int xmax, int ymax, int *new_x1, int *new_y1, int *new_x2, int *new_y2, unsigned int adx, unsigned int ady, int *pt1_clipped, int *pt2_clipped, int octant, unsigned int bias, int oc1, int oc2) { int swapped = 0; int clipDone = 0; CARD32 utmp = 0; int clip1, clip2; int x1, y1, x2, y2; int x1_orig, y1_orig, x2_orig, y2_orig; int xmajor; int negslope = 0, anchorval = 0; unsigned int eqn = 0; x1 = x1_orig = *new_x1; y1 = y1_orig = *new_y1; x2 = x2_orig = *new_x2; y2 = y2_orig = *new_y2; clip1 = 0; clip2 = 0; xmajor = IsXMajorOctant(octant); bias = ((bias >> octant) & 1); while (1) { if ((oc1 & oc2) != 0) { /* trivial reject */ clipDone = -1; clip1 = oc1; clip2 = oc2; break; } else if ((oc1 | oc2) == 0) { /* trivial accept */ clipDone = 1; if (swapped) { SWAPINT_PAIR(x1, y1, x2, y2); SWAPINT(clip1, clip2); } break; } else { /* have to clip */ /* only clip one point at a time */ if (oc1 == 0) { SWAPINT_PAIR(x1, y1, x2, y2); SWAPINT_PAIR(x1_orig, y1_orig, x2_orig, y2_orig); SWAPINT(oc1, oc2); SWAPINT(clip1, clip2); swapped = !swapped; } clip1 |= oc1; if (oc1 & OUT_LEFT) { negslope = IsYDecreasingOctant(octant); utmp = xmin - x1_orig; if (utmp <= 32767) { /* clip based on near endpt */ if (xmajor) eqn = (swapped) ? EQN2 : EQN1; else eqn = (swapped) ? EQN4 : EQN3; anchorval = y1_orig; } else { /* clip based on far endpt */ utmp = x2_orig - xmin; if (xmajor) eqn = (swapped) ? EQN1B : EQN2B; else eqn = (swapped) ? EQN3B : EQN4B; anchorval = y2_orig; negslope = !negslope; } x1 = xmin; } else if (oc1 & OUT_ABOVE) { negslope = IsXDecreasingOctant(octant); utmp = ymin - y1_orig; if (utmp <= 32767) { /* clip based on near endpt */ if (xmajor) eqn = (swapped) ? EQN6 : EQN5; else eqn = (swapped) ? EQN8 : EQN7; anchorval = x1_orig; } else { /* clip based on far endpt */ utmp = y2_orig - ymin; if (xmajor) eqn = (swapped) ? EQN5B : EQN6B; else eqn = (swapped) ? EQN7B : EQN8B; anchorval = x2_orig; negslope = !negslope; } y1 = ymin; } else if (oc1 & OUT_RIGHT) { negslope = IsYDecreasingOctant(octant); utmp = x1_orig - xmax; if (utmp <= 32767) { /* clip based on near endpt */ if (xmajor) eqn = (swapped) ? EQN2 : EQN1; else eqn = (swapped) ? EQN4 : EQN3; anchorval = y1_orig; } else { /* clip based on far endpt */ /* * Technically since the equations can handle * utmp == 32768, this overflow code isn't * needed since X11 protocol can't generate * a line which goes more than 32768 pixels * to the right of a clip rectangle. */ utmp = xmax - x2_orig; if (xmajor) eqn = (swapped) ? EQN1B : EQN2B; else eqn = (swapped) ? EQN3B : EQN4B; anchorval = y2_orig; negslope = !negslope; } x1 = xmax; } else if (oc1 & OUT_BELOW) { negslope = IsXDecreasingOctant(octant); utmp = y1_orig - ymax; if (utmp <= 32767) { /* clip based on near endpt */ if (xmajor) eqn = (swapped) ? EQN6 : EQN5; else eqn = (swapped) ? EQN8 : EQN7; anchorval = x1_orig; } else { /* clip based on far endpt */ /* * Technically since the equations can handle * utmp == 32768, this overflow code isn't * needed since X11 protocol can't generate * a line which goes more than 32768 pixels * below the bottom of a clip rectangle. */ utmp = ymax - y2_orig; if (xmajor) eqn = (swapped) ? EQN5B : EQN6B; else eqn = (swapped) ? EQN7B : EQN8B; anchorval = x2_orig; negslope = !negslope; } y1 = ymax; } if (swapped) negslope = !negslope; utmp <<= 1; /* utmp = 2N or 2M */ if (eqn & T_2NDX) utmp = (utmp * adx); else /* (eqn & T_2MDY) */ utmp = (utmp * ady); if (eqn & T_DXNOTY) if (eqn & T_SUBDXORY) utmp -= adx; else utmp += adx; else /* (eqn & T_DYNOTX) */ if (eqn & T_SUBDXORY) utmp -= ady; else utmp += ady; if (eqn & T_BIASSUBONE) utmp += bias - 1; else /* (eqn & T_SUBBIAS) */ utmp -= bias; if (eqn & T_DIV2DX) utmp /= (adx << 1); else /* (eqn & T_DIV2DY) */ utmp /= (ady << 1); if (eqn & T_ADDONE) utmp++; if (negslope) utmp = -utmp; if (eqn & T_2NDX) /* We are calculating X steps */ x1 = anchorval + utmp; else /* else, Y steps */ y1 = anchorval + utmp; oc1 = 0; MIOUTCODES(oc1, x1, y1, xmin, ymin, xmax, ymax); } } *new_x1 = x1; *new_y1 = y1; *new_x2 = x2; *new_y2 = y2; *pt1_clipped = clip1; *pt2_clipped = clip2; return clipDone; } xorg-server-21.1.16/mi/mizerline.c0000644000175000017500000002574414757411105012416 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "scrnintstr.h" #include "gcstruct.h" #include "windowstr.h" #include "pixmap.h" #include "mi.h" #include "miline.h" /* Draw lineSolid, fillStyle-independent zero width lines. * * Must keep X and Y coordinates in "ints" at least until after they're * translated and clipped to accommodate CoordModePrevious lines with very * large coordinates. * * Draws the same pixels regardless of sign(dx) or sign(dy). * * Ken Whaley * */ /* largest positive value that can fit into a component of a point. * Assumes that the point structure is {type x, y;} where type is * a signed type. */ #define MAX_COORDINATE ((1 << (((sizeof(DDXPointRec) >> 1) << 3) - 1)) - 1) #define MI_OUTPUT_POINT(xx, yy)\ {\ if ( !new_span && yy == current_y)\ {\ if (xx < spans->x)\ spans->x = xx;\ ++*widths;\ }\ else\ {\ ++Nspans;\ ++spans;\ ++widths;\ spans->x = xx;\ spans->y = yy;\ *widths = 1;\ current_y = yy;\ new_span = FALSE;\ }\ } void miZeroLine(DrawablePtr pDraw, GCPtr pGC, int mode, /* Origin or Previous */ int npt, /* number of points */ DDXPointPtr pptInit) { int Nspans, current_y = 0; DDXPointPtr ppt; DDXPointPtr pspanInit, spans; int *pwidthInit, *widths, list_len; int xleft, ytop, xright, ybottom; int new_x1, new_y1, new_x2, new_y2; int x = 0, y = 0, x1, y1, x2, y2, xstart, ystart; int oc1, oc2; int result; int pt1_clipped, pt2_clipped = 0; Bool new_span; int signdx, signdy; int clipdx, clipdy; int width, height; int adx, ady; int octant; unsigned int bias = miGetZeroLineBias(pDraw->pScreen); int e, e1, e2, e3; /* Bresenham error terms */ int length; /* length of lines == # of pixels on major axis */ xleft = pDraw->x; ytop = pDraw->y; xright = pDraw->x + pDraw->width - 1; ybottom = pDraw->y + pDraw->height - 1; if (!pGC->miTranslate) { /* do everything in drawable-relative coordinates */ xleft = 0; ytop = 0; xright -= pDraw->x; ybottom -= pDraw->y; } /* it doesn't matter whether we're in drawable or screen coordinates, * FillSpans simply cannot take starting coordinates outside of the * range of a DDXPointRec component. */ if (xright > MAX_COORDINATE) xright = MAX_COORDINATE; if (ybottom > MAX_COORDINATE) ybottom = MAX_COORDINATE; /* since we're clipping to the drawable's boundaries & coordinate * space boundaries, we're guaranteed that the larger of width/height * is the longest span we'll need to output */ width = xright - xleft + 1; height = ybottom - ytop + 1; list_len = (height >= width) ? height : width; pspanInit = xallocarray(list_len, sizeof(DDXPointRec)); pwidthInit = xallocarray(list_len, sizeof(int)); if (!pspanInit || !pwidthInit) { free(pspanInit); free(pwidthInit); return; } Nspans = 0; new_span = TRUE; spans = pspanInit - 1; widths = pwidthInit - 1; ppt = pptInit; xstart = ppt->x; ystart = ppt->y; if (pGC->miTranslate) { xstart += pDraw->x; ystart += pDraw->y; } /* x2, y2, oc2 copied to x1, y1, oc1 at top of loop to simplify * iteration logic */ x2 = xstart; y2 = ystart; oc2 = 0; MIOUTCODES(oc2, x2, y2, xleft, ytop, xright, ybottom); while (--npt > 0) { x1 = x2; y1 = y2; oc1 = oc2; ++ppt; x2 = ppt->x; y2 = ppt->y; if (pGC->miTranslate && (mode != CoordModePrevious)) { x2 += pDraw->x; y2 += pDraw->y; } else if (mode == CoordModePrevious) { x2 += x1; y2 += y1; } oc2 = 0; MIOUTCODES(oc2, x2, y2, xleft, ytop, xright, ybottom); CalcLineDeltas(x1, y1, x2, y2, adx, ady, signdx, signdy, 1, 1, octant); if (ady + 1 > (list_len - Nspans)) { (*pGC->ops->FillSpans) (pDraw, pGC, Nspans, pspanInit, pwidthInit, FALSE); Nspans = 0; spans = pspanInit - 1; widths = pwidthInit - 1; } new_span = TRUE; if (adx > ady) { e1 = ady << 1; e2 = e1 - (adx << 1); e = e1 - adx; length = adx; /* don't draw endpoint in main loop */ FIXUP_ERROR(e, octant, bias); new_x1 = x1; new_y1 = y1; new_x2 = x2; new_y2 = y2; pt1_clipped = 0; pt2_clipped = 0; if ((oc1 | oc2) != 0) { result = miZeroClipLine(xleft, ytop, xright, ybottom, &new_x1, &new_y1, &new_x2, &new_y2, adx, ady, &pt1_clipped, &pt2_clipped, octant, bias, oc1, oc2); if (result == -1) continue; length = abs(new_x2 - new_x1); /* if we've clipped the endpoint, always draw the full length * of the segment, because then the capstyle doesn't matter */ if (pt2_clipped) length++; if (pt1_clipped) { /* must calculate new error terms */ clipdx = abs(new_x1 - x1); clipdy = abs(new_y1 - y1); e += (clipdy * e2) + ((clipdx - clipdy) * e1); } } /* draw the segment */ x = new_x1; y = new_y1; e3 = e2 - e1; e = e - e1; while (length--) { MI_OUTPUT_POINT(x, y); e += e1; if (e >= 0) { y += signdy; e += e3; } x += signdx; } } else { /* Y major line */ e1 = adx << 1; e2 = e1 - (ady << 1); e = e1 - ady; length = ady; /* don't draw endpoint in main loop */ SetYMajorOctant(octant); FIXUP_ERROR(e, octant, bias); new_x1 = x1; new_y1 = y1; new_x2 = x2; new_y2 = y2; pt1_clipped = 0; pt2_clipped = 0; if ((oc1 | oc2) != 0) { result = miZeroClipLine(xleft, ytop, xright, ybottom, &new_x1, &new_y1, &new_x2, &new_y2, adx, ady, &pt1_clipped, &pt2_clipped, octant, bias, oc1, oc2); if (result == -1) continue; length = abs(new_y2 - new_y1); /* if we've clipped the endpoint, always draw the full length * of the segment, because then the capstyle doesn't matter */ if (pt2_clipped) length++; if (pt1_clipped) { /* must calculate new error terms */ clipdx = abs(new_x1 - x1); clipdy = abs(new_y1 - y1); e += (clipdx * e2) + ((clipdy - clipdx) * e1); } } /* draw the segment */ x = new_x1; y = new_y1; e3 = e2 - e1; e = e - e1; while (length--) { MI_OUTPUT_POINT(x, y); e += e1; if (e >= 0) { x += signdx; e += e3; } y += signdy; } } } /* only do the capnotlast check on the last segment * and only if the endpoint wasn't clipped. And then, if the last * point is the same as the first point, do not draw it, unless the * line is degenerate */ if ((!pt2_clipped) && (pGC->capStyle != CapNotLast) && (((xstart != x2) || (ystart != y2)) || (ppt == pptInit + 1))) { MI_OUTPUT_POINT(x, y); } if (Nspans > 0) (*pGC->ops->FillSpans) (pDraw, pGC, Nspans, pspanInit, pwidthInit, FALSE); free(pwidthInit); free(pspanInit); } void miZeroDashLine(DrawablePtr dst, GCPtr pgc, int mode, int nptInit, /* number of points in polyline */ DDXPointRec * pptInit /* points in the polyline */ ) { /* XXX kludge until real zero-width dash code is written */ pgc->lineWidth = 1; miWideDash(dst, pgc, mode, nptInit, pptInit); pgc->lineWidth = 0; } xorg-server-21.1.16/mi/miinitext.c0000644000175000017500000002334614757411105012426 /*********************************************************** 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. ******************************************************************/ /* * Copyright (c) 2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef HAVE_XORG_CONFIG_H #include #include "xf86Extensions.h" #endif #ifdef HAVE_DMX_CONFIG_H #include #undef XV #undef DBE #undef SCREENSAVER #undef RANDR #undef DAMAGE #undef COMPOSITE #undef MITSHM #endif #ifdef HAVE_XNEST_CONFIG_H #include #undef COMPOSITE #undef DPMSExtension #endif #include "misc.h" #include "extension.h" #include "extinit.h" #include "micmap.h" #include "os.h" #include "globals.h" #include "miinitext.h" /* List of built-in (statically linked) extensions */ static const ExtensionModule staticExtensions[] = { {GEExtensionInit, "Generic Event Extension", &noGEExtension}, {ShapeExtensionInit, "SHAPE", NULL}, #ifdef MITSHM {ShmExtensionInit, "MIT-SHM", &noMITShmExtension}, #endif {XInputExtensionInit, "XInputExtension", NULL}, #ifdef XTEST {XTestExtensionInit, "XTEST", &noTestExtensions}, #endif {BigReqExtensionInit, "BIG-REQUESTS", NULL}, {SyncExtensionInit, "SYNC", NULL}, {XkbExtensionInit, "XKEYBOARD", NULL}, {XCMiscExtensionInit, "XC-MISC", NULL}, #ifdef XCSECURITY {SecurityExtensionInit, "SECURITY", &noSecurityExtension}, #endif #ifdef PANORAMIX {PanoramiXExtensionInit, "XINERAMA", &noPanoramiXExtension}, #endif /* must be before Render to layer DisplayCursor correctly */ {XFixesExtensionInit, "XFIXES", &noXFixesExtension}, #ifdef XF86BIGFONT {XFree86BigfontExtensionInit, "XFree86-Bigfont", &noXFree86BigfontExtension}, #endif {RenderExtensionInit, "RENDER", &noRenderExtension}, #ifdef RANDR {RRExtensionInit, "RANDR", &noRRExtension}, #endif #ifdef COMPOSITE {CompositeExtensionInit, "COMPOSITE", &noCompositeExtension}, #endif #ifdef DAMAGE {DamageExtensionInit, "DAMAGE", &noDamageExtension}, #endif #ifdef SCREENSAVER {ScreenSaverExtensionInit, "MIT-SCREEN-SAVER", &noScreenSaverExtension}, #endif #ifdef DBE {DbeExtensionInit, "DOUBLE-BUFFER", &noDbeExtension}, #endif #ifdef XRECORD {RecordExtensionInit, "RECORD", &noTestExtensions}, #endif #ifdef DPMSExtension {DPMSExtensionInit, "DPMS", &noDPMSExtension}, #endif #ifdef PRESENT {present_extension_init, "Present", NULL}, #endif #ifdef DRI3 {dri3_extension_init, "DRI3", NULL}, #endif #ifdef RES {ResExtensionInit, "X-Resource", &noResExtension}, #endif #ifdef XV {XvExtensionInit, "XVideo", &noXvExtension}, {XvMCExtensionInit, "XVideo-MotionCompensation", &noXvExtension}, #endif #ifdef XSELINUX {SELinuxExtensionInit, "SELinux", &noSELinuxExtension}, #endif #ifdef GLXEXT {GlxExtensionInit, "GLX", &noGlxExtension}, #endif }; void ListStaticExtensions(void) { const ExtensionModule *ext; int i; ErrorF(" Only the following extensions can be run-time enabled/disabled:\n"); for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) { ext = &staticExtensions[i]; if (ext->disablePtr != NULL) { ErrorF("\t%s\n", ext->name); } } } Bool EnableDisableExtension(const char *name, Bool enable) { const ExtensionModule *ext; int i; for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) { ext = &staticExtensions[i]; if (strcasecmp(name, ext->name) == 0) { if (ext->disablePtr != NULL) { *ext->disablePtr = !enable; return TRUE; } else { /* Extension is always on, impossible to disable */ return enable; /* okay if they wanted to enable, fail if they tried to disable */ } } } return FALSE; } void EnableDisableExtensionError(const char *name, Bool enable) { const ExtensionModule *ext; int i; Bool found = FALSE; for (i = 0; i < ARRAY_SIZE(staticExtensions); i++) { ext = &staticExtensions[i]; if ((strcmp(name, ext->name) == 0) && (ext->disablePtr == NULL)) { ErrorF("[mi] Extension \"%s\" can not be disabled\n", name); found = TRUE; break; } } if (found == FALSE) { ErrorF("[mi] Extension \"%s\" is not recognized\n", name); /* Disabling a non-existing extension is a no-op anyway */ if (enable == FALSE) return; } ListStaticExtensions(); } static ExtensionModule *ExtensionModuleList = NULL; static int numExtensionModules = 0; static void AddStaticExtensions(void) { static Bool listInitialised = FALSE; if (listInitialised) return; listInitialised = TRUE; /* Add built-in extensions to the list. */ LoadExtensionList(staticExtensions, ARRAY_SIZE(staticExtensions), TRUE); } void InitExtensions(int argc, char *argv[]) { int i; ExtensionModule *ext; AddStaticExtensions(); for (i = 0; i < numExtensionModules; i++) { ext = &ExtensionModuleList[i]; if (ext->initFunc != NULL && (ext->disablePtr == NULL || !*ext->disablePtr)) { LogMessageVerb(X_INFO, 3, "Initializing extension %s\n", ext->name); (ext->initFunc) (); } } } static ExtensionModule * NewExtensionModuleList(int size) { ExtensionModule *save = ExtensionModuleList; int n; /* Sanity check */ if (!ExtensionModuleList) numExtensionModules = 0; n = numExtensionModules + size; ExtensionModuleList = reallocarray(ExtensionModuleList, n, sizeof(ExtensionModule)); if (ExtensionModuleList == NULL) { ExtensionModuleList = save; return NULL; } else { numExtensionModules += size; return ExtensionModuleList + (numExtensionModules - size); } } void LoadExtensionList(const ExtensionModule ext[], int size, Bool builtin) { ExtensionModule *newext; int i; /* Make sure built-in extensions get added to the list before those * in modules. */ AddStaticExtensions(); if (!(newext = NewExtensionModuleList(size))) return; for (i = 0; i < size; i++, newext++) { newext->name = ext[i].name; newext->initFunc = ext[i].initFunc; newext->disablePtr = ext[i].disablePtr; } } xorg-server-21.1.16/mi/miinitext.h0000644000175000017500000000742314757411105012431 /*********************************************************** 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. ******************************************************************/ /* * Copyright (c) 2000 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef MIINITEXT_H #define MIINITEXT_H void ListStaticExtensions(void); #endif /* MIINITEXT_H */ xorg-server-21.1.16/miext/0000755000175000017500000000000014757411133011042 5xorg-server-21.1.16/miext/damage/0000755000175000017500000000000014757411133012260 5xorg-server-21.1.16/miext/damage/meson.build0000644000175000017500000000047614757411105014350 srcs_miext_damage = [ 'damage.c', ] hdrs_miext_damage = [ 'damage.h', 'damagestr.h', ] libxserver_miext_damage = static_library('libxserver_miext_damage', srcs_miext_damage, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_miext_damage, install_dir: xorgsdkdir) endif xorg-server-21.1.16/miext/damage/Makefile.am0000644000175000017500000000031714757411105014234 noinst_LTLIBRARIES = libdamage.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = -I$(srcdir)/../cw if XORG sdk_HEADERS = damage.h damagestr.h endif libdamage_la_SOURCES = \ damage.c \ damage.h \ damagestr.h xorg-server-21.1.16/miext/damage/damage.h0000644000175000017500000000775714757411105013606 /* * 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 #endif #ifndef _DAMAGE_H_ #define _DAMAGE_H_ typedef struct _damage *DamagePtr; typedef enum _damageReportLevel { DamageReportRawRegion, DamageReportDeltaRegion, DamageReportBoundingBox, DamageReportNonEmpty, DamageReportNone } DamageReportLevel; typedef void (*DamageReportFunc) (DamagePtr pDamage, RegionPtr pRegion, void *closure); typedef void (*DamageDestroyFunc) (DamagePtr pDamage, void *closure); typedef void (*DamageScreenCreateFunc) (DamagePtr); typedef void (*DamageScreenRegisterFunc) (DrawablePtr, DamagePtr); typedef void (*DamageScreenUnregisterFunc) (DrawablePtr, DamagePtr); typedef void (*DamageScreenDestroyFunc) (DamagePtr); typedef struct _damageScreenFuncs { DamageScreenCreateFunc Create; DamageScreenRegisterFunc Register; DamageScreenUnregisterFunc Unregister; DamageScreenDestroyFunc Destroy; } DamageScreenFuncsRec, *DamageScreenFuncsPtr; extern _X_EXPORT void miDamageCreate(DamagePtr); extern _X_EXPORT void miDamageRegister(DrawablePtr, DamagePtr); extern _X_EXPORT void miDamageUnregister(DrawablePtr, DamagePtr); extern _X_EXPORT void miDamageDestroy(DamagePtr); extern _X_EXPORT Bool DamageSetup(ScreenPtr pScreen); extern _X_EXPORT DamagePtr DamageCreate(DamageReportFunc damageReport, DamageDestroyFunc damageDestroy, DamageReportLevel damageLevel, Bool isInternal, ScreenPtr pScreen, void *closure); extern _X_EXPORT void DamageDrawInternal(ScreenPtr pScreen, Bool enable); extern _X_EXPORT void DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage); extern _X_EXPORT void DamageUnregister(DamagePtr pDamage); extern _X_EXPORT void DamageDestroy(DamagePtr pDamage); extern _X_EXPORT Bool DamageSubtract(DamagePtr pDamage, const RegionPtr pRegion); extern _X_EXPORT void DamageEmpty(DamagePtr pDamage); extern _X_EXPORT RegionPtr DamageRegion(DamagePtr pDamage); extern _X_EXPORT RegionPtr DamagePendingRegion(DamagePtr pDamage); /* In case of rendering, call this before the submitting the commands. */ extern _X_EXPORT void DamageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion); /* Call this directly after the rendering operation has been submitted. */ extern _X_EXPORT void DamageRegionProcessPending(DrawablePtr pDrawable); /* Call this when you create a new Damage and you wish to send an initial damage message (to it). */ extern _X_EXPORT void DamageReportDamage(DamagePtr pDamage, RegionPtr pDamageRegion); /* Avoid using this call, it only exists for API compatibility. */ extern _X_EXPORT void DamageDamageRegion(DrawablePtr pDrawable, const RegionPtr pRegion); extern _X_EXPORT void DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter); extern _X_EXPORT DamageScreenFuncsPtr DamageGetScreenFuncs(ScreenPtr); #endif /* _DAMAGE_H_ */ xorg-server-21.1.16/miext/damage/damagestr.h0000644000175000017500000000674514757411105014333 /* * 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 #endif #ifndef _DAMAGESTR_H_ #define _DAMAGESTR_H_ #include "damage.h" #include "gcstruct.h" #include "privates.h" #include "picturestr.h" typedef struct _damage { DamagePtr pNext; DamagePtr pNextWin; RegionRec damage; DamageReportLevel damageLevel; Bool isInternal; void *closure; Bool isWindow; DrawablePtr pDrawable; DamageReportFunc damageReport; DamageDestroyFunc damageDestroy; Bool reportAfter; RegionRec pendingDamage; /* will be flushed post submission at the latest */ ScreenPtr pScreen; } DamageRec; typedef struct _damageScrPriv { int internalLevel; /* * For DDXen which don't provide GetScreenPixmap, this provides * a place to hook damage for windows on the screen */ DamagePtr pScreenDamage; CopyWindowProcPtr CopyWindow; CloseScreenProcPtr CloseScreen; CreateGCProcPtr CreateGC; DestroyPixmapProcPtr DestroyPixmap; SetWindowPixmapProcPtr SetWindowPixmap; DestroyWindowProcPtr DestroyWindow; CompositeProcPtr Composite; GlyphsProcPtr Glyphs; AddTrapsProcPtr AddTraps; /* Table of wrappable function pointers */ DamageScreenFuncsRec funcs; } DamageScrPrivRec, *DamageScrPrivPtr; typedef struct _damageGCPriv { const GCOps *ops; const GCFuncs *funcs; } DamageGCPrivRec, *DamageGCPrivPtr; /* XXX should move these into damage.c, damageScrPrivateIndex is static */ #define damageGetScrPriv(pScr) ((DamageScrPrivPtr) \ dixLookupPrivate(&(pScr)->devPrivates, damageScrPrivateKey)) #define damageScrPriv(pScr) \ DamageScrPrivPtr pScrPriv = damageGetScrPriv(pScr) #define damageGetPixPriv(pPix) \ dixLookupPrivate(&(pPix)->devPrivates, damagePixPrivateKey) #define damgeSetPixPriv(pPix,v) \ dixSetPrivate(&(pPix)->devPrivates, damagePixPrivateKey, v) #define damagePixPriv(pPix) \ DamagePtr pDamage = damageGetPixPriv(pPix) #define damageGetGCPriv(pGC) \ dixLookupPrivate(&(pGC)->devPrivates, damageGCPrivateKey) #define damageGCPriv(pGC) \ DamageGCPrivPtr pGCPriv = damageGetGCPriv(pGC) #define damageGetWinPriv(pWin) \ ((DamagePtr)dixLookupPrivate(&(pWin)->devPrivates, damageWinPrivateKey)) #define damageSetWinPriv(pWin,d) \ dixSetPrivate(&(pWin)->devPrivates, damageWinPrivateKey, d) #endif /* _DAMAGESTR_H_ */ xorg-server-21.1.16/miext/damage/Makefile.in0000644000175000017500000006530714757411116014261 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = miext/damage ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdamage_la_LIBADD = am_libdamage_la_OBJECTS = damage.lo libdamage_la_OBJECTS = $(am_libdamage_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/damage.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdamage_la_SOURCES) DIST_SOURCES = $(libdamage_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = damage.h damagestr.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdamage.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = -I$(srcdir)/../cw @XORG_TRUE@sdk_HEADERS = damage.h damagestr.h libdamage_la_SOURCES = \ damage.c \ damage.h \ damagestr.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign miext/damage/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign miext/damage/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdamage.la: $(libdamage_la_OBJECTS) $(libdamage_la_DEPENDENCIES) $(EXTRA_libdamage_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdamage_la_OBJECTS) $(libdamage_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/damage.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/damage.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/damage.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/miext/damage/damage.c0000644000175000017500000016212114757411105013564 /* * 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 #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include #include "mi.h" #include "mipict.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "damage.h" #include "damagestr.h" #define wrap(priv, real, mem, func) {\ priv->mem = real->mem; \ real->mem = func; \ } #define unwrap(priv, real, mem) {\ real->mem = priv->mem; \ } #define BOX_SAME(a,b) \ ((a)->x1 == (b)->x1 && \ (a)->y1 == (b)->y1 && \ (a)->x2 == (b)->x2 && \ (a)->y2 == (b)->y2) #define DAMAGE_VALIDATE_ENABLE 0 #define DAMAGE_DEBUG_ENABLE 0 #if DAMAGE_DEBUG_ENABLE #define DAMAGE_DEBUG(x) ErrorF x #else #define DAMAGE_DEBUG(x) #endif #define getPixmapDamageRef(pPixmap) ((DamagePtr *) \ dixLookupPrivateAddr(&(pPixmap)->devPrivates, damagePixPrivateKey)) #define pixmapDamage(pPixmap) damagePixPriv(pPixmap) static DevPrivateKeyRec damageScrPrivateKeyRec; #define damageScrPrivateKey (&damageScrPrivateKeyRec) static DevPrivateKeyRec damagePixPrivateKeyRec; #define damagePixPrivateKey (&damagePixPrivateKeyRec) static DevPrivateKeyRec damageGCPrivateKeyRec; #define damageGCPrivateKey (&damageGCPrivateKeyRec) static DevPrivateKeyRec damageWinPrivateKeyRec; #define damageWinPrivateKey (&damageWinPrivateKeyRec) static DamagePtr * getDrawableDamageRef(DrawablePtr pDrawable) { PixmapPtr pPixmap; if (WindowDrawable(pDrawable->type)) { ScreenPtr pScreen = pDrawable->pScreen; pPixmap = 0; if (pScreen->GetWindowPixmap #ifdef ROOTLESS_WORKAROUND && ((WindowPtr) pDrawable)->viewable #endif ) pPixmap = (*pScreen->GetWindowPixmap) ((WindowPtr) pDrawable); if (!pPixmap) { damageScrPriv(pScreen); return &pScrPriv->pScreenDamage; } } else pPixmap = (PixmapPtr) pDrawable; return getPixmapDamageRef(pPixmap); } #define getDrawableDamage(pDrawable) (*getDrawableDamageRef (pDrawable)) #define getWindowDamage(pWin) getDrawableDamage(&(pWin)->drawable) #define drawableDamage(pDrawable) \ DamagePtr pDamage = getDrawableDamage(pDrawable) #define windowDamage(pWin) drawableDamage(&(pWin)->drawable) #define winDamageRef(pWindow) \ DamagePtr *pPrev = (DamagePtr *) \ dixLookupPrivateAddr(&(pWindow)->devPrivates, damageWinPrivateKey) #if DAMAGE_DEBUG_ENABLE static void _damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, int subWindowMode, const char *where) #define damageRegionAppend(d,r,c,m) _damageRegionAppend(d,r,c,m,__FUNCTION__) #else static void damageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, int subWindowMode) #endif { ScreenPtr pScreen = pDrawable->pScreen; damageScrPriv(pScreen); drawableDamage(pDrawable); DamagePtr pNext; RegionRec clippedRec; RegionPtr pDamageRegion; RegionRec pixClip; int draw_x, draw_y; #ifdef COMPOSITE int screen_x = 0, screen_y = 0; #endif /* short circuit for empty regions */ if (!RegionNotEmpty(pRegion)) return; #ifdef COMPOSITE /* * When drawing to a pixmap which is storing window contents, * the region presented is in pixmap relative coordinates which * need to be converted to screen relative coordinates */ if (pDrawable->type != DRAWABLE_WINDOW) { screen_x = ((PixmapPtr) pDrawable)->screen_x - pDrawable->x; screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y; } if (screen_x || screen_y) RegionTranslate(pRegion, screen_x, screen_y); #endif if (pDrawable->type == DRAWABLE_WINDOW && ((WindowPtr) (pDrawable))->backingStore == NotUseful) { if (subWindowMode == ClipByChildren) { RegionIntersect(pRegion, pRegion, &((WindowPtr) (pDrawable))->clipList); } else if (subWindowMode == IncludeInferiors) { RegionPtr pTempRegion = NotClippedByChildren((WindowPtr) (pDrawable)); RegionIntersect(pRegion, pRegion, pTempRegion); RegionDestroy(pTempRegion); } /* If subWindowMode is set to an invalid value, don't perform * any drawable-based clipping. */ } RegionNull(&clippedRec); for (; pDamage; pDamage = pNext) { pNext = pDamage->pNext; /* * Check for internal damage and don't send events */ if (pScrPriv->internalLevel > 0 && !pDamage->isInternal) { DAMAGE_DEBUG(("non internal damage, skipping at %d\n", pScrPriv->internalLevel)); continue; } /* * Check for unrealized windows */ if (pDamage->pDrawable->type == DRAWABLE_WINDOW && !((WindowPtr) (pDamage->pDrawable))->realized) { continue; } draw_x = pDamage->pDrawable->x; draw_y = pDamage->pDrawable->y; #ifdef COMPOSITE /* * Need to move everyone to screen coordinates * XXX what about off-screen pixmaps with non-zero x/y? */ if (!WindowDrawable(pDamage->pDrawable->type)) { draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x; draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y; } #endif /* * Clip against border or pixmap bounds */ pDamageRegion = pRegion; if (clip || pDamage->pDrawable != pDrawable) { pDamageRegion = &clippedRec; if (pDamage->pDrawable->type == DRAWABLE_WINDOW) { RegionIntersect(pDamageRegion, pRegion, &((WindowPtr) (pDamage->pDrawable))-> borderClip); } else { BoxRec box; box.x1 = draw_x; box.y1 = draw_y; box.x2 = draw_x + pDamage->pDrawable->width; box.y2 = draw_y + pDamage->pDrawable->height; RegionInit(&pixClip, &box, 1); RegionIntersect(pDamageRegion, pRegion, &pixClip); RegionUninit(&pixClip); } /* * Short circuit empty results */ if (!RegionNotEmpty(pDamageRegion)) continue; } DAMAGE_DEBUG(("%s %d x %d +%d +%d (target 0x%lx monitor 0x%lx)\n", where, pDamageRegion->extents.x2 - pDamageRegion->extents.x1, pDamageRegion->extents.y2 - pDamageRegion->extents.y1, pDamageRegion->extents.x1, pDamageRegion->extents.y1, pDrawable->id, pDamage->pDrawable->id)); /* * Move region to target coordinate space */ if (draw_x || draw_y) RegionTranslate(pDamageRegion, -draw_x, -draw_y); /* Store damage region if needed after submission. */ if (pDamage->reportAfter) RegionUnion(&pDamage->pendingDamage, &pDamage->pendingDamage, pDamageRegion); /* Report damage now, if desired. */ if (!pDamage->reportAfter) { if (pDamage->damageReport) DamageReportDamage(pDamage, pDamageRegion); else RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); } /* * translate original region back */ if (pDamageRegion == pRegion && (draw_x || draw_y)) RegionTranslate(pDamageRegion, draw_x, draw_y); } #ifdef COMPOSITE if (screen_x || screen_y) RegionTranslate(pRegion, -screen_x, -screen_y); #endif RegionUninit(&clippedRec); } static void damageRegionProcessPending(DrawablePtr pDrawable) { drawableDamage(pDrawable); for (; pDamage != NULL; pDamage = pDamage->pNext) { if (pDamage->reportAfter) { /* It's possible that there is only interest in postRendering reporting. */ if (pDamage->damageReport) DamageReportDamage(pDamage, &pDamage->pendingDamage); else RegionUnion(&pDamage->damage, &pDamage->damage, &pDamage->pendingDamage); } if (pDamage->reportAfter) RegionEmpty(&pDamage->pendingDamage); } } #if DAMAGE_DEBUG_ENABLE #define damageDamageBox(d,b,m) _damageDamageBox(d,b,m,__FUNCTION__) static void _damageDamageBox(DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode, const char *where) #else static void damageDamageBox(DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode) #endif { RegionRec region; RegionInit(®ion, pBox, 1); #if DAMAGE_DEBUG_ENABLE _damageRegionAppend(pDrawable, ®ion, TRUE, subWindowMode, where); #else damageRegionAppend(pDrawable, ®ion, TRUE, subWindowMode); #endif RegionUninit(®ion); } static void damageValidateGC(GCPtr, unsigned long, DrawablePtr); static void damageChangeGC(GCPtr, unsigned long); static void damageCopyGC(GCPtr, unsigned long, GCPtr); static void damageDestroyGC(GCPtr); static void damageChangeClip(GCPtr, int, void *, int); static void damageDestroyClip(GCPtr); static void damageCopyClip(GCPtr, GCPtr); static GCFuncs damageGCFuncs = { damageValidateGC, damageChangeGC, damageCopyGC, damageDestroyGC, damageChangeClip, damageDestroyClip, damageCopyClip }; static GCOps damageGCOps; static Bool damageCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; damageScrPriv(pScreen); damageGCPriv(pGC); Bool ret; unwrap(pScrPriv, pScreen, CreateGC); if ((ret = (*pScreen->CreateGC) (pGC))) { pGCPriv->ops = NULL; pGCPriv->funcs = pGC->funcs; pGC->funcs = &damageGCFuncs; } wrap(pScrPriv, pScreen, CreateGC, damageCreateGC); return ret; } #define DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable) \ damageGCPriv(pGC); \ const GCFuncs *oldFuncs = pGC->funcs; \ unwrap(pGCPriv, pGC, funcs); \ unwrap(pGCPriv, pGC, ops); \ #define DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable) \ wrap(pGCPriv, pGC, funcs, oldFuncs); \ wrap(pGCPriv, pGC, ops, &damageGCOps) #define DAMAGE_GC_FUNC_PROLOGUE(pGC) \ damageGCPriv(pGC); \ unwrap(pGCPriv, pGC, funcs); \ if (pGCPriv->ops) unwrap(pGCPriv, pGC, ops) #define DAMAGE_GC_FUNC_EPILOGUE(pGC) \ wrap(pGCPriv, pGC, funcs, &damageGCFuncs); \ if (pGCPriv->ops) wrap(pGCPriv, pGC, ops, &damageGCOps) static void damageValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { DAMAGE_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->ValidateGC) (pGC, changes, pDrawable); pGCPriv->ops = pGC->ops; /* just so it's not NULL */ DAMAGE_GC_FUNC_EPILOGUE(pGC); } static void damageDestroyGC(GCPtr pGC) { DAMAGE_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->DestroyGC) (pGC); DAMAGE_GC_FUNC_EPILOGUE(pGC); } static void damageChangeGC(GCPtr pGC, unsigned long mask) { DAMAGE_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->ChangeGC) (pGC, mask); DAMAGE_GC_FUNC_EPILOGUE(pGC); } static void damageCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { DAMAGE_GC_FUNC_PROLOGUE(pGCDst); (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); DAMAGE_GC_FUNC_EPILOGUE(pGCDst); } static void damageChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { DAMAGE_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); DAMAGE_GC_FUNC_EPILOGUE(pGC); } static void damageCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { DAMAGE_GC_FUNC_PROLOGUE(pgcDst); (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); DAMAGE_GC_FUNC_EPILOGUE(pgcDst); } static void damageDestroyClip(GCPtr pGC) { DAMAGE_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->DestroyClip) (pGC); DAMAGE_GC_FUNC_EPILOGUE(pGC); } #define TRIM_BOX(box, pGC) if (pGC->pCompositeClip) { \ BoxPtr extents = &pGC->pCompositeClip->extents;\ if(box.x1 < extents->x1) box.x1 = extents->x1; \ if(box.x2 > extents->x2) box.x2 = extents->x2; \ if(box.y1 < extents->y1) box.y1 = extents->y1; \ if(box.y2 > extents->y2) box.y2 = extents->y2; \ } #define TRANSLATE_BOX(box, pDrawable) { \ box.x1 += pDrawable->x; \ box.x2 += pDrawable->x; \ box.y1 += pDrawable->y; \ box.y2 += pDrawable->y; \ } #define TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC) { \ TRANSLATE_BOX(box, pDrawable); \ TRIM_BOX(box, pGC); \ } #define BOX_NOT_EMPTY(box) \ (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) #define checkGCDamage(d,g) (getDrawableDamage(d) && \ (!g->pCompositeClip ||\ RegionNotEmpty(g->pCompositeClip))) #define TRIM_PICTURE_BOX(box, pDst) { \ BoxPtr extents = &pDst->pCompositeClip->extents;\ if(box.x1 < extents->x1) box.x1 = extents->x1; \ if(box.x2 > extents->x2) box.x2 = extents->x2; \ if(box.y1 < extents->y1) box.y1 = extents->y1; \ if(box.y2 > extents->y2) box.y2 = extents->y2; \ } #define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \ RegionNotEmpty(p->pCompositeClip)) static void damageComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); damageScrPriv(pScreen); if (checkPictureDamage(pDst)) { BoxRec box; box.x1 = xDst + pDst->pDrawable->x; box.y1 = yDst + pDst->pDrawable->y; box.x2 = box.x1 + width; box.y2 = box.y1 + height; TRIM_PICTURE_BOX(box, pDst); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDst->pDrawable, &box, pDst->subWindowMode); } /* * Validating a source picture bound to a window may trigger other * composite operations. Do it before unwrapping to make sure damage * is reported correctly. */ if (pSrc->pDrawable && WindowDrawable(pSrc->pDrawable->type)) miCompositeSourceValidate(pSrc); if (pMask && pMask->pDrawable && WindowDrawable(pMask->pDrawable->type)) miCompositeSourceValidate(pMask); unwrap(pScrPriv, ps, Composite); (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); damageRegionProcessPending(pDst->pDrawable); wrap(pScrPriv, ps, Composite, damageComposite); } static void damageGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); damageScrPriv(pScreen); if (checkPictureDamage(pDst)) { int nlistTmp = nlist; GlyphListPtr listTmp = list; GlyphPtr *glyphsTmp = glyphs; int x, y; int n; GlyphPtr glyph; BoxRec box; int x1, y1, x2, y2; box.x1 = 32767; box.y1 = 32767; box.x2 = -32767; box.y2 = -32767; x = pDst->pDrawable->x; y = pDst->pDrawable->y; while (nlistTmp--) { x += listTmp->xOff; y += listTmp->yOff; n = listTmp->len; while (n--) { glyph = *glyphsTmp++; x1 = x - glyph->info.x; y1 = y - glyph->info.y; x2 = x1 + glyph->info.width; y2 = y1 + glyph->info.height; if (x1 < box.x1) box.x1 = x1; if (y1 < box.y1) box.y1 = y1; if (x2 > box.x2) box.x2 = x2; if (y2 > box.y2) box.y2 = y2; x += glyph->info.xOff; y += glyph->info.yOff; } listTmp++; } TRIM_PICTURE_BOX(box, pDst); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDst->pDrawable, &box, pDst->subWindowMode); } unwrap(pScrPriv, ps, Glyphs); (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); damageRegionProcessPending(pDst->pDrawable); wrap(pScrPriv, ps, Glyphs, damageGlyphs); } static void damageAddTraps(PicturePtr pPicture, INT16 x_off, INT16 y_off, int ntrap, xTrap * traps) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); damageScrPriv(pScreen); if (checkPictureDamage(pPicture)) { BoxRec box; int i; int x, y; xTrap *t = traps; box.x1 = 32767; box.y1 = 32767; box.x2 = -32767; box.y2 = -32767; x = pPicture->pDrawable->x + x_off; y = pPicture->pDrawable->y + y_off; for (i = 0; i < ntrap; i++) { pixman_fixed_t l = min(t->top.l, t->bot.l); pixman_fixed_t r = max(t->top.r, t->bot.r); int x1 = x + pixman_fixed_to_int(l); int x2 = x + pixman_fixed_to_int(pixman_fixed_ceil(r)); int y1 = y + pixman_fixed_to_int(t->top.y); int y2 = y + pixman_fixed_to_int(pixman_fixed_ceil(t->bot.y)); if (x1 < box.x1) box.x1 = x1; if (x2 > box.x2) box.x2 = x2; if (y1 < box.y1) box.y1 = y1; if (y2 > box.y2) box.y2 = y2; } TRIM_PICTURE_BOX(box, pPicture); if (BOX_NOT_EMPTY(box)) damageDamageBox(pPicture->pDrawable, &box, pPicture->subWindowMode); } unwrap(pScrPriv, ps, AddTraps); (*ps->AddTraps) (pPicture, x_off, y_off, ntrap, traps); damageRegionProcessPending(pPicture->pDrawable); wrap(pScrPriv, ps, AddTraps, damageAddTraps); } /**********************************************************/ static void damageFillSpans(DrawablePtr pDrawable, GC * pGC, int npt, DDXPointPtr ppt, int *pwidth, int fSorted) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (npt && checkGCDamage(pDrawable, pGC)) { int nptTmp = npt; DDXPointPtr pptTmp = ppt; int *pwidthTmp = pwidth; BoxRec box; box.x1 = pptTmp->x; box.x2 = box.x1 + *pwidthTmp; box.y2 = box.y1 = pptTmp->y; while (--nptTmp) { pptTmp++; pwidthTmp++; if (box.x1 > pptTmp->x) box.x1 = pptTmp->x; if (box.x2 < (pptTmp->x + *pwidthTmp)) box.x2 = pptTmp->x + *pwidthTmp; if (box.y1 > pptTmp->y) box.y1 = pptTmp->y; else if (box.y2 < pptTmp->y) box.y2 = pptTmp->y; } box.y2++; if (!pGC->miTranslate) { TRANSLATE_BOX(box, pDrawable); } TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->FillSpans) (pDrawable, pGC, npt, ppt, pwidth, fSorted); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damageSetSpans(DrawablePtr pDrawable, GCPtr pGC, char *pcharsrc, DDXPointPtr ppt, int *pwidth, int npt, int fSorted) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (npt && checkGCDamage(pDrawable, pGC)) { DDXPointPtr pptTmp = ppt; int *pwidthTmp = pwidth; int nptTmp = npt; BoxRec box; box.x1 = pptTmp->x; box.x2 = box.x1 + *pwidthTmp; box.y2 = box.y1 = pptTmp->y; while (--nptTmp) { pptTmp++; pwidthTmp++; if (box.x1 > pptTmp->x) box.x1 = pptTmp->x; if (box.x2 < (pptTmp->x + *pwidthTmp)) box.x2 = pptTmp->x + *pwidthTmp; if (box.y1 > pptTmp->y) box.y1 = pptTmp->y; else if (box.y2 < pptTmp->y) box.y2 = pptTmp->y; } box.y2++; if (!pGC->miTranslate) { TRANSLATE_BOX(box, pDrawable); } TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->SetSpans) (pDrawable, pGC, pcharsrc, ppt, pwidth, npt, fSorted); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pImage) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage(pDrawable, pGC)) { BoxRec box; box.x1 = x + pDrawable->x; box.x2 = box.x1 + w; box.y1 = y + pDrawable->y; box.y2 = box.y1 + h; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PutImage) (pDrawable, pGC, depth, x, y, w, h, leftPad, format, pImage); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static RegionPtr damageCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GC * pGC, int srcx, int srcy, int width, int height, int dstx, int dsty) { RegionPtr ret; DAMAGE_GC_OP_PROLOGUE(pGC, pDst); if (checkGCDamage(pDst, pGC)) { BoxRec box; box.x1 = dstx + pDst->x; box.x2 = box.x1 + width; box.y1 = dsty + pDst->y; box.y2 = box.y1 + height; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDst, &box, pGC->subWindowMode); } ret = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty); damageRegionProcessPending(pDst); DAMAGE_GC_OP_EPILOGUE(pGC, pDst); return ret; } static RegionPtr damageCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long bitPlane) { RegionPtr ret; DAMAGE_GC_OP_PROLOGUE(pGC, pDst); if (checkGCDamage(pDst, pGC)) { BoxRec box; box.x1 = dstx + pDst->x; box.x2 = box.x1 + width; box.y1 = dsty + pDst->y; box.y2 = box.y1 + height; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDst, &box, pGC->subWindowMode); } ret = (*pGC->ops->CopyPlane) (pSrc, pDst, pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); damageRegionProcessPending(pDst); DAMAGE_GC_OP_EPILOGUE(pGC, pDst); return ret; } static void damagePolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, xPoint * ppt) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (npt && checkGCDamage(pDrawable, pGC)) { BoxRec box; int nptTmp = npt; xPoint *pptTmp = ppt; box.x2 = box.x1 = pptTmp->x; box.y2 = box.y1 = pptTmp->y; /* this could be slow if the points were spread out */ if (mode == CoordModePrevious) { int x = box.x1; int y = box.y1; while (--nptTmp) { pptTmp++; x += pptTmp->x; y += pptTmp->y; if (box.x1 > x) box.x1 = x; else if (box.x2 < x) box.x2 = x; if (box.y1 > y) box.y1 = y; else if (box.y2 < y) box.y2 = y; } } else { while (--nptTmp) { pptTmp++; if (box.x1 > pptTmp->x) box.x1 = pptTmp->x; else if (box.x2 < pptTmp->x) box.x2 = pptTmp->x; if (box.y1 > pptTmp->y) box.y1 = pptTmp->y; else if (box.y2 < pptTmp->y) box.y2 = pptTmp->y; } } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PolyPoint) (pDrawable, pGC, mode, npt, ppt); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, DDXPointPtr ppt) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (npt && checkGCDamage(pDrawable, pGC)) { int nptTmp = npt; DDXPointPtr pptTmp = ppt; BoxRec box; int extra = pGC->lineWidth >> 1; box.x2 = box.x1 = pptTmp->x; box.y2 = box.y1 = pptTmp->y; if (nptTmp > 1) { if (pGC->joinStyle == JoinMiter) extra = 6 * pGC->lineWidth; else if (pGC->capStyle == CapProjecting) extra = pGC->lineWidth; } if (mode == CoordModePrevious) { int x = box.x1; int y = box.y1; while (--nptTmp) { pptTmp++; x += pptTmp->x; y += pptTmp->y; if (box.x1 > x) box.x1 = x; else if (box.x2 < x) box.x2 = x; if (box.y1 > y) box.y1 = y; else if (box.y2 < y) box.y2 = y; } } else { while (--nptTmp) { pptTmp++; if (box.x1 > pptTmp->x) box.x1 = pptTmp->x; else if (box.x2 < pptTmp->x) box.x2 = pptTmp->x; if (box.y1 > pptTmp->y) box.y1 = pptTmp->y; else if (box.y2 < pptTmp->y) box.y2 = pptTmp->y; } } box.x2++; box.y2++; if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->Polylines) (pDrawable, pGC, mode, npt, ppt); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolySegment(DrawablePtr pDrawable, GCPtr pGC, int nSeg, xSegment * pSeg) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (nSeg && checkGCDamage(pDrawable, pGC)) { BoxRec box; int extra = pGC->lineWidth; int nsegTmp = nSeg; xSegment *pSegTmp = pSeg; if (pGC->capStyle != CapProjecting) extra >>= 1; if (pSegTmp->x2 > pSegTmp->x1) { box.x1 = pSegTmp->x1; box.x2 = pSegTmp->x2; } else { box.x2 = pSegTmp->x1; box.x1 = pSegTmp->x2; } if (pSegTmp->y2 > pSegTmp->y1) { box.y1 = pSegTmp->y1; box.y2 = pSegTmp->y2; } else { box.y2 = pSegTmp->y1; box.y1 = pSegTmp->y2; } while (--nsegTmp) { pSegTmp++; if (pSegTmp->x2 > pSegTmp->x1) { if (pSegTmp->x1 < box.x1) box.x1 = pSegTmp->x1; if (pSegTmp->x2 > box.x2) box.x2 = pSegTmp->x2; } else { if (pSegTmp->x2 < box.x1) box.x1 = pSegTmp->x2; if (pSegTmp->x1 > box.x2) box.x2 = pSegTmp->x1; } if (pSegTmp->y2 > pSegTmp->y1) { if (pSegTmp->y1 < box.y1) box.y1 = pSegTmp->y1; if (pSegTmp->y2 > box.y2) box.y2 = pSegTmp->y2; } else { if (pSegTmp->y2 < box.y1) box.y1 = pSegTmp->y2; if (pSegTmp->y1 > box.y2) box.y2 = pSegTmp->y1; } } box.x2++; box.y2++; if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PolySegment) (pDrawable, pGC, nSeg, pSeg); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolyRectangle(DrawablePtr pDrawable, GCPtr pGC, int nRects, xRectangle *pRects) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (nRects && checkGCDamage(pDrawable, pGC)) { BoxRec box; int offset1, offset2, offset3; int nRectsTmp = nRects; xRectangle *pRectsTmp = pRects; offset2 = pGC->lineWidth; if (!offset2) offset2 = 1; offset1 = offset2 >> 1; offset3 = offset2 - offset1; while (nRectsTmp--) { box.x1 = pRectsTmp->x - offset1; box.y1 = pRectsTmp->y - offset1; box.x2 = box.x1 + pRectsTmp->width + offset2; box.y2 = box.y1 + offset2; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); box.x1 = pRectsTmp->x - offset1; box.y1 = pRectsTmp->y + offset3; box.x2 = box.x1 + offset2; box.y2 = box.y1 + pRectsTmp->height - offset2; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); box.x1 = pRectsTmp->x + pRectsTmp->width - offset1; box.y1 = pRectsTmp->y + offset3; box.x2 = box.x1 + offset2; box.y2 = box.y1 + pRectsTmp->height - offset2; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); box.x1 = pRectsTmp->x - offset1; box.y1 = pRectsTmp->y + pRectsTmp->height - offset1; box.x2 = box.x1 + pRectsTmp->width + offset2; box.y2 = box.y1 + offset2; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); pRectsTmp++; } } (*pGC->ops->PolyRectangle) (pDrawable, pGC, nRects, pRects); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolyArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (nArcs && checkGCDamage(pDrawable, pGC)) { int extra = pGC->lineWidth >> 1; BoxRec box; int nArcsTmp = nArcs; xArc *pArcsTmp = pArcs; box.x1 = pArcsTmp->x; box.x2 = box.x1 + pArcsTmp->width; box.y1 = pArcsTmp->y; box.y2 = box.y1 + pArcsTmp->height; while (--nArcsTmp) { pArcsTmp++; if (box.x1 > pArcsTmp->x) box.x1 = pArcsTmp->x; if (box.x2 < (pArcsTmp->x + pArcsTmp->width)) box.x2 = pArcsTmp->x + pArcsTmp->width; if (box.y1 > pArcsTmp->y) box.y1 = pArcsTmp->y; if (box.y2 < (pArcsTmp->y + pArcsTmp->height)) box.y2 = pArcsTmp->y + pArcsTmp->height; } if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PolyArc) (pDrawable, pGC, nArcs, pArcs); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damageFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, int mode, int npt, DDXPointPtr ppt) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (npt > 2 && checkGCDamage(pDrawable, pGC)) { DDXPointPtr pptTmp = ppt; int nptTmp = npt; BoxRec box; box.x2 = box.x1 = pptTmp->x; box.y2 = box.y1 = pptTmp->y; if (mode != CoordModeOrigin) { int x = box.x1; int y = box.y1; while (--nptTmp) { pptTmp++; x += pptTmp->x; y += pptTmp->y; if (box.x1 > x) box.x1 = x; else if (box.x2 < x) box.x2 = x; if (box.y1 > y) box.y1 = y; else if (box.y2 < y) box.y2 = y; } } else { while (--nptTmp) { pptTmp++; if (box.x1 > pptTmp->x) box.x1 = pptTmp->x; else if (box.x2 < pptTmp->x) box.x2 = pptTmp->x; if (box.y1 > pptTmp->y) box.y1 = pptTmp->y; else if (box.y2 < pptTmp->y) box.y2 = pptTmp->y; } } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->FillPolygon) (pDrawable, pGC, shape, mode, npt, ppt); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolyFillRect(DrawablePtr pDrawable, GCPtr pGC, int nRects, xRectangle *pRects) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (nRects && checkGCDamage(pDrawable, pGC)) { BoxRec box; xRectangle *pRectsTmp = pRects; int nRectsTmp = nRects; box.x1 = pRectsTmp->x; box.x2 = box.x1 + pRectsTmp->width; box.y1 = pRectsTmp->y; box.y2 = box.y1 + pRectsTmp->height; while (--nRectsTmp) { pRectsTmp++; if (box.x1 > pRectsTmp->x) box.x1 = pRectsTmp->x; if (box.x2 < (pRectsTmp->x + pRectsTmp->width)) box.x2 = pRectsTmp->x + pRectsTmp->width; if (box.y1 > pRectsTmp->y) box.y1 = pRectsTmp->y; if (box.y2 < (pRectsTmp->y + pRectsTmp->height)) box.y2 = pRectsTmp->y + pRectsTmp->height; } TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PolyFillRect) (pDrawable, pGC, nRects, pRects); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolyFillArc(DrawablePtr pDrawable, GCPtr pGC, int nArcs, xArc * pArcs) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (nArcs && checkGCDamage(pDrawable, pGC)) { BoxRec box; int nArcsTmp = nArcs; xArc *pArcsTmp = pArcs; box.x1 = pArcsTmp->x; box.x2 = box.x1 + pArcsTmp->width; box.y1 = pArcsTmp->y; box.y2 = box.y1 + pArcsTmp->height; while (--nArcsTmp) { pArcsTmp++; if (box.x1 > pArcsTmp->x) box.x1 = pArcsTmp->x; if (box.x2 < (pArcsTmp->x + pArcsTmp->width)) box.x2 = pArcsTmp->x + pArcsTmp->width; if (box.y1 > pArcsTmp->y) box.y1 = pArcsTmp->y; if (box.y2 < (pArcsTmp->y + pArcsTmp->height)) box.y2 = pArcsTmp->y + pArcsTmp->height; } TRIM_AND_TRANSLATE_BOX(box, pDrawable, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PolyFillArc) (pDrawable, pGC, nArcs, pArcs); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } /* * general Poly/Image text function. Extract glyph information, * compute bounding box and remove cursor if it is overlapped. */ static void damageDamageChars(DrawablePtr pDrawable, FontPtr font, int x, int y, unsigned int n, CharInfoPtr * charinfo, Bool imageblt, int subWindowMode) { ExtentInfoRec extents; BoxRec box; xfont2_query_glyph_extents(font, charinfo, n, &extents); if (imageblt) { if (extents.overallWidth > extents.overallRight) extents.overallRight = extents.overallWidth; if (extents.overallWidth < extents.overallLeft) extents.overallLeft = extents.overallWidth; if (extents.overallLeft > 0) extents.overallLeft = 0; if (extents.fontAscent > extents.overallAscent) extents.overallAscent = extents.fontAscent; if (extents.fontDescent > extents.overallDescent) extents.overallDescent = extents.fontDescent; } box.x1 = x + extents.overallLeft; box.y1 = y - extents.overallAscent; box.x2 = x + extents.overallRight; box.y2 = y + extents.overallDescent; damageDamageBox(pDrawable, &box, subWindowMode); } /* * values for textType: */ #define TT_POLY8 0 #define TT_IMAGE8 1 #define TT_POLY16 2 #define TT_IMAGE16 3 static void damageText(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned long count, char *chars, FontEncoding fontEncoding, Bool textType) { CharInfoPtr *charinfo; unsigned long i; unsigned int n; Bool imageblt; imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16); if (!checkGCDamage(pDrawable, pGC)) return; charinfo = xallocarray(count, sizeof(CharInfoPtr)); if (!charinfo) return; GetGlyphs(pGC->font, count, (unsigned char *) chars, fontEncoding, &i, charinfo); n = (unsigned int) i; if (n != 0) { damageDamageChars(pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y, n, charinfo, imageblt, pGC->subWindowMode); } free(charinfo); } static int damagePolyText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageText(pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_POLY8); x = (*pGC->ops->PolyText8) (pDrawable, pGC, x, y, count, chars); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; } static int damagePolyText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageText(pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_POLY16); x = (*pGC->ops->PolyText16) (pDrawable, pGC, x, y, count, chars); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; } static void damageImageText8(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, char *chars) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageText(pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_IMAGE8); (*pGC->ops->ImageText8) (pDrawable, pGC, x, y, count, chars); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damageImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageText(pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_IMAGE16); (*pGC->ops->ImageText16) (pDrawable, pGC, x, y, count, chars); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damageImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageDamageChars(pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y, nglyph, ppci, TRUE, pGC->subWindowMode); (*pGC->ops->ImageGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); damageDamageChars(pDrawable, pGC->font, x + pDrawable->x, y + pDrawable->y, nglyph, ppci, FALSE, pGC->subWindowMode); (*pGC->ops->PolyGlyphBlt) (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damagePushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, int dx, int dy, int xOrg, int yOrg) { DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage(pDrawable, pGC)) { BoxRec box; box.x1 = xOrg; box.y1 = yOrg; if (!pGC->miTranslate) { box.x1 += pDrawable->x; box.y1 += pDrawable->y; } box.x2 = box.x1 + dx; box.y2 = box.y1 + dy; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) damageDamageBox(pDrawable, &box, pGC->subWindowMode); } (*pGC->ops->PushPixels) (pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg); damageRegionProcessPending(pDrawable); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } static void damageRemoveDamage(DamagePtr * pPrev, DamagePtr pDamage) { while (*pPrev) { if (*pPrev == pDamage) { *pPrev = pDamage->pNext; return; } pPrev = &(*pPrev)->pNext; } #if DAMAGE_VALIDATE_ENABLE ErrorF("Damage not on list\n"); OsAbort(); #endif } static void damageInsertDamage(DamagePtr * pPrev, DamagePtr pDamage) { #if DAMAGE_VALIDATE_ENABLE DamagePtr pOld; for (pOld = *pPrev; pOld; pOld = pOld->pNext) if (pOld == pDamage) { ErrorF("Damage already on list\n"); OsAbort(); } #endif pDamage->pNext = *pPrev; *pPrev = pDamage; } static Bool damageDestroyPixmap(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; damageScrPriv(pScreen); if (pPixmap->refcnt == 1) { DamagePtr *pPrev = getPixmapDamageRef(pPixmap); DamagePtr pDamage; while ((pDamage = *pPrev)) { damageRemoveDamage(pPrev, pDamage); if (!pDamage->isWindow) DamageDestroy(pDamage); } } unwrap(pScrPriv, pScreen, DestroyPixmap); (*pScreen->DestroyPixmap) (pPixmap); wrap(pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap); return TRUE; } static void damageCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWindow->drawable.pScreen; damageScrPriv(pScreen); if (getWindowDamage(pWindow)) { int dx = pWindow->drawable.x - ptOldOrg.x; int dy = pWindow->drawable.y - ptOldOrg.y; /* * The region comes in source relative, but the damage occurs * at the destination location. Translate back and forth. */ RegionTranslate(prgnSrc, dx, dy); damageRegionAppend(&pWindow->drawable, prgnSrc, FALSE, -1); RegionTranslate(prgnSrc, -dx, -dy); } unwrap(pScrPriv, pScreen, CopyWindow); (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); damageRegionProcessPending(&pWindow->drawable); wrap(pScrPriv, pScreen, CopyWindow, damageCopyWindow); } static GCOps damageGCOps = { damageFillSpans, damageSetSpans, damagePutImage, damageCopyArea, damageCopyPlane, damagePolyPoint, damagePolylines, damagePolySegment, damagePolyRectangle, damagePolyArc, damageFillPolygon, damagePolyFillRect, damagePolyFillArc, damagePolyText8, damagePolyText16, damageImageText8, damageImageText16, damageImageGlyphBlt, damagePolyGlyphBlt, damagePushPixels, }; static void damageSetWindowPixmap(WindowPtr pWindow, PixmapPtr pPixmap) { DamagePtr pDamage; ScreenPtr pScreen = pWindow->drawable.pScreen; damageScrPriv(pScreen); if ((pDamage = damageGetWinPriv(pWindow))) { PixmapPtr pOldPixmap = (*pScreen->GetWindowPixmap) (pWindow); DamagePtr *pPrev = getPixmapDamageRef(pOldPixmap); while (pDamage) { damageRemoveDamage(pPrev, pDamage); pDamage = pDamage->pNextWin; } } unwrap(pScrPriv, pScreen, SetWindowPixmap); (*pScreen->SetWindowPixmap) (pWindow, pPixmap); wrap(pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap); if ((pDamage = damageGetWinPriv(pWindow))) { DamagePtr *pPrev = getPixmapDamageRef(pPixmap); while (pDamage) { damageInsertDamage(pPrev, pDamage); pDamage = pDamage->pNextWin; } } } static Bool damageDestroyWindow(WindowPtr pWindow) { DamagePtr pDamage; ScreenPtr pScreen = pWindow->drawable.pScreen; Bool ret; damageScrPriv(pScreen); while ((pDamage = damageGetWinPriv(pWindow))) { DamageDestroy(pDamage); } unwrap(pScrPriv, pScreen, DestroyWindow); ret = (*pScreen->DestroyWindow) (pWindow); wrap(pScrPriv, pScreen, DestroyWindow, damageDestroyWindow); return ret; } static Bool damageCloseScreen(ScreenPtr pScreen) { damageScrPriv(pScreen); unwrap(pScrPriv, pScreen, DestroyPixmap); unwrap(pScrPriv, pScreen, CreateGC); unwrap(pScrPriv, pScreen, CopyWindow); unwrap(pScrPriv, pScreen, CloseScreen); free(pScrPriv); return (*pScreen->CloseScreen) (pScreen); } /** * Default implementations of the damage management functions. */ void miDamageCreate(DamagePtr pDamage) { } /* * We only wrap into the GC when there's a registered listener. For windows, * damage includes damage to children. So if there's a GC validated against * a subwindow and we then register a damage on the parent, we need to bump * the serial numbers of the children to re-trigger validation. * * Since we can't know if a GC has been validated against one of the affected * children, just bump them all to be safe. */ static int damageRegisterVisit(WindowPtr pWin, void *data) { pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; return WT_WALKCHILDREN; } void miDamageRegister(DrawablePtr pDrawable, DamagePtr pDamage) { if (pDrawable->type == DRAWABLE_WINDOW) TraverseTree((WindowPtr)pDrawable, damageRegisterVisit, NULL); else pDrawable->serialNumber = NEXT_SERIAL_NUMBER; } void miDamageUnregister(DrawablePtr pDrawable, DamagePtr pDamage) { if (pDrawable->type == DRAWABLE_WINDOW) TraverseTree((WindowPtr)pDrawable, damageRegisterVisit, NULL); else pDrawable->serialNumber = NEXT_SERIAL_NUMBER; } void miDamageDestroy(DamagePtr pDamage) { } /** * Public functions for consumption outside this file. */ Bool DamageSetup(ScreenPtr pScreen) { DamageScrPrivPtr pScrPriv; PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); const DamageScreenFuncsRec miFuncs = { miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy }; if (!dixRegisterPrivateKey(&damageScrPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey)) return TRUE; if (!dixRegisterPrivateKey (&damageGCPrivateKeyRec, PRIVATE_GC, sizeof(DamageGCPrivRec))) return FALSE; if (!dixRegisterPrivateKey(&damagePixPrivateKeyRec, PRIVATE_PIXMAP, 0)) return FALSE; if (!dixRegisterPrivateKey(&damageWinPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; pScrPriv = malloc(sizeof(DamageScrPrivRec)); if (!pScrPriv) return FALSE; pScrPriv->internalLevel = 0; pScrPriv->pScreenDamage = 0; wrap(pScrPriv, pScreen, DestroyPixmap, damageDestroyPixmap); wrap(pScrPriv, pScreen, CreateGC, damageCreateGC); wrap(pScrPriv, pScreen, DestroyWindow, damageDestroyWindow); wrap(pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap); wrap(pScrPriv, pScreen, CopyWindow, damageCopyWindow); wrap(pScrPriv, pScreen, CloseScreen, damageCloseScreen); if (ps) { wrap(pScrPriv, ps, Glyphs, damageGlyphs); wrap(pScrPriv, ps, Composite, damageComposite); wrap(pScrPriv, ps, AddTraps, damageAddTraps); } pScrPriv->funcs = miFuncs; dixSetPrivate(&pScreen->devPrivates, damageScrPrivateKey, pScrPriv); return TRUE; } DamagePtr DamageCreate(DamageReportFunc damageReport, DamageDestroyFunc damageDestroy, DamageReportLevel damageLevel, Bool isInternal, ScreenPtr pScreen, void *closure) { damageScrPriv(pScreen); DamagePtr pDamage; pDamage = calloc(1, sizeof(DamageRec)); if (!pDamage) return 0; pDamage->pNext = 0; pDamage->pNextWin = 0; RegionNull(&pDamage->damage); RegionNull(&pDamage->pendingDamage); pDamage->damageLevel = damageLevel; pDamage->isInternal = isInternal; pDamage->closure = closure; pDamage->isWindow = FALSE; pDamage->pDrawable = 0; pDamage->reportAfter = FALSE; pDamage->damageReport = damageReport; pDamage->damageDestroy = damageDestroy; pDamage->pScreen = pScreen; (*pScrPriv->funcs.Create) (pDamage); return pDamage; } void DamageRegister(DrawablePtr pDrawable, DamagePtr pDamage) { ScreenPtr pScreen = pDrawable->pScreen; damageScrPriv(pScreen); #if DAMAGE_VALIDATE_ENABLE if (pDrawable->pScreen != pDamage->pScreen) { ErrorF("DamageRegister called with mismatched screens\n"); OsAbort(); } #endif if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; winDamageRef(pWindow); #if DAMAGE_VALIDATE_ENABLE DamagePtr pOld; for (pOld = *pPrev; pOld; pOld = pOld->pNextWin) if (pOld == pDamage) { ErrorF("Damage already on window list\n"); OsAbort(); } #endif pDamage->pNextWin = *pPrev; *pPrev = pDamage; pDamage->isWindow = TRUE; } else pDamage->isWindow = FALSE; pDamage->pDrawable = pDrawable; damageInsertDamage(getDrawableDamageRef(pDrawable), pDamage); (*pScrPriv->funcs.Register) (pDrawable, pDamage); } void DamageDrawInternal(ScreenPtr pScreen, Bool enable) { damageScrPriv(pScreen); pScrPriv->internalLevel += enable ? 1 : -1; } void DamageUnregister(DamagePtr pDamage) { DrawablePtr pDrawable = pDamage->pDrawable; ScreenPtr pScreen = pDrawable->pScreen; damageScrPriv(pScreen); (*pScrPriv->funcs.Unregister) (pDrawable, pDamage); if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pDrawable; winDamageRef(pWindow); #if DAMAGE_VALIDATE_ENABLE int found = 0; #endif while (*pPrev) { if (*pPrev == pDamage) { *pPrev = pDamage->pNextWin; #if DAMAGE_VALIDATE_ENABLE found = 1; #endif break; } pPrev = &(*pPrev)->pNextWin; } #if DAMAGE_VALIDATE_ENABLE if (!found) { ErrorF("Damage not on window list\n"); OsAbort(); } #endif } pDamage->pDrawable = 0; damageRemoveDamage(getDrawableDamageRef(pDrawable), pDamage); } void DamageDestroy(DamagePtr pDamage) { ScreenPtr pScreen = pDamage->pScreen; damageScrPriv(pScreen); if (pDamage->pDrawable) DamageUnregister(pDamage); if (pDamage->damageDestroy) (*pDamage->damageDestroy) (pDamage, pDamage->closure); (*pScrPriv->funcs.Destroy) (pDamage); RegionUninit(&pDamage->damage); RegionUninit(&pDamage->pendingDamage); free(pDamage); } Bool DamageSubtract(DamagePtr pDamage, const RegionPtr pRegion) { RegionPtr pClip; RegionRec pixmapClip; DrawablePtr pDrawable = pDamage->pDrawable; RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion); if (pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) pClip = &((WindowPtr) pDrawable)->borderClip; else { BoxRec box; box.x1 = pDrawable->x; box.y1 = pDrawable->y; box.x2 = pDrawable->x + pDrawable->width; box.y2 = pDrawable->y + pDrawable->height; RegionInit(&pixmapClip, &box, 1); pClip = &pixmapClip; } RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y); RegionIntersect(&pDamage->damage, &pDamage->damage, pClip); RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y); if (pDrawable->type != DRAWABLE_WINDOW) RegionUninit(&pixmapClip); } return RegionNotEmpty(&pDamage->damage); } void DamageEmpty(DamagePtr pDamage) { RegionEmpty(&pDamage->damage); } RegionPtr DamageRegion(DamagePtr pDamage) { return &pDamage->damage; } RegionPtr DamagePendingRegion(DamagePtr pDamage) { return &pDamage->pendingDamage; } void DamageRegionAppend(DrawablePtr pDrawable, RegionPtr pRegion) { damageRegionAppend(pDrawable, pRegion, FALSE, -1); } void DamageRegionProcessPending(DrawablePtr pDrawable) { damageRegionProcessPending(pDrawable); } /* This call is very odd, i'm leaving it intact for API sake, but please don't use it. */ void DamageDamageRegion(DrawablePtr pDrawable, RegionPtr pRegion) { damageRegionAppend(pDrawable, pRegion, FALSE, -1); /* Go back and report this damage for DamagePtrs with reportAfter set, since * this call isn't part of an in-progress drawing op in the call chain and * the DDX probably just wants to know about it right away. */ damageRegionProcessPending(pDrawable); } void DamageSetReportAfterOp(DamagePtr pDamage, Bool reportAfter) { pDamage->reportAfter = reportAfter; } DamageScreenFuncsPtr DamageGetScreenFuncs(ScreenPtr pScreen) { damageScrPriv(pScreen); return &pScrPriv->funcs; } void DamageReportDamage(DamagePtr pDamage, RegionPtr pDamageRegion) { BoxRec tmpBox; RegionRec tmpRegion; Bool was_empty; switch (pDamage->damageLevel) { case DamageReportRawRegion: RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure); break; case DamageReportDeltaRegion: RegionNull(&tmpRegion); RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage); if (RegionNotEmpty(&tmpRegion)) { RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure); } RegionUninit(&tmpRegion); break; case DamageReportBoundingBox: tmpBox = *RegionExtents(&pDamage->damage); RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); if (!BOX_SAME(&tmpBox, RegionExtents(&pDamage->damage))) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNonEmpty: was_empty = !RegionNotEmpty(&pDamage->damage); RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); if (was_empty && RegionNotEmpty(&pDamage->damage)) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNone: RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); break; } } xorg-server-21.1.16/miext/rootless/0000755000175000017500000000000014757411133012714 5xorg-server-21.1.16/miext/rootless/meson.build0000644000175000017500000000051714757411105015000 srcs_miext_rootless = [ 'rootlessCommon.c', 'rootlessGC.c', 'rootlessScreen.c', 'rootlessValTree.c', 'rootlessWindow.c', ] libxserver_miext_rootless = static_library('libxserver_miext_rootless', srcs_miext_rootless, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/miext/rootless/Makefile.am0000644000175000017500000000046214757411105014671 AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS) noinst_LTLIBRARIES = librootless.la librootless_la_SOURCES = \ rootlessCommon.c \ rootlessGC.c \ rootlessScreen.c \ rootlessValTree.c \ rootlessWindow.c EXTRA_DIST = \ README.txt \ rootless.h \ rootlessCommon.h \ rootlessConfig.h \ rootlessWindow.h xorg-server-21.1.16/miext/rootless/Makefile.in0000644000175000017500000006302714757411116014712 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = miext/rootless ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librootless_la_LIBADD = am_librootless_la_OBJECTS = rootlessCommon.lo rootlessGC.lo \ rootlessScreen.lo rootlessValTree.lo rootlessWindow.lo librootless_la_OBJECTS = $(am_librootless_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/rootlessCommon.Plo \ ./$(DEPDIR)/rootlessGC.Plo ./$(DEPDIR)/rootlessScreen.Plo \ ./$(DEPDIR)/rootlessValTree.Plo ./$(DEPDIR)/rootlessWindow.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librootless_la_SOURCES) DIST_SOURCES = $(librootless_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(DIX_CFLAGS) $(XSERVER_CFLAGS) noinst_LTLIBRARIES = librootless.la librootless_la_SOURCES = \ rootlessCommon.c \ rootlessGC.c \ rootlessScreen.c \ rootlessValTree.c \ rootlessWindow.c EXTRA_DIST = \ README.txt \ rootless.h \ rootlessCommon.h \ rootlessConfig.h \ rootlessWindow.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign miext/rootless/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign miext/rootless/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librootless.la: $(librootless_la_OBJECTS) $(librootless_la_DEPENDENCIES) $(EXTRA_librootless_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(librootless_la_OBJECTS) $(librootless_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootlessCommon.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootlessGC.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootlessScreen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootlessValTree.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rootlessWindow.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/rootlessCommon.Plo -rm -f ./$(DEPDIR)/rootlessGC.Plo -rm -f ./$(DEPDIR)/rootlessScreen.Plo -rm -f ./$(DEPDIR)/rootlessValTree.Plo -rm -f ./$(DEPDIR)/rootlessWindow.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/rootlessCommon.Plo -rm -f ./$(DEPDIR)/rootlessGC.Plo -rm -f ./$(DEPDIR)/rootlessScreen.Plo -rm -f ./$(DEPDIR)/rootlessValTree.Plo -rm -f ./$(DEPDIR)/rootlessWindow.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/miext/rootless/rootlessCommon.c0000644000175000017500000003677314757411105016042 /* * Common rootless definitions and code */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* For NULL */ #include /* For CHAR_BIT */ #include "rootlessCommon.h" #include "colormapst.h" unsigned int rootless_CopyBytes_threshold = 0; unsigned int rootless_CopyWindow_threshold = 0; int rootlessGlobalOffsetX = 0; int rootlessGlobalOffsetY = 0; RegionRec rootlessHugeRoot = { {-32767, -32767, 32767, 32767}, NULL }; /* Following macro from miregion.c */ /* true iff two Boxes overlap */ #define EXTENTCHECK(r1,r2) \ (!( ((r1)->x2 <= (r2)->x1) || \ ((r1)->x1 >= (r2)->x2) || \ ((r1)->y2 <= (r2)->y1) || \ ((r1)->y1 >= (r2)->y2) ) ) /* * TopLevelParent * Returns the top-level parent of pWindow. * The root is the top-level parent of itself, even though the root is * not otherwise considered to be a top-level window. */ WindowPtr TopLevelParent(WindowPtr pWindow) { WindowPtr top; if (IsRoot(pWindow)) return pWindow; top = pWindow; while (top && !IsTopLevel(top)) top = top->parent; return top; } /* * IsFramedWindow * Returns TRUE if this window is visible inside a frame * (e.g. it is visible and has a top-level or root parent) */ Bool IsFramedWindow(WindowPtr pWin) { WindowPtr top; if (!dixPrivateKeyRegistered(&rootlessWindowPrivateKeyRec)) return FALSE; if (!pWin->realized) return FALSE; top = TopLevelParent(pWin); return (top && WINREC(top)); } Bool RootlessResolveColormap(ScreenPtr pScreen, int first_color, int n_colors, uint32_t * colors) { int last, i; ColormapPtr map; map = RootlessGetColormap(pScreen); if (map == NULL || map->class != PseudoColor) return FALSE; last = min(map->pVisual->ColormapEntries, first_color + n_colors); for (i = max(0, first_color); i < last; i++) { Entry *ent = map->red + i; uint16_t red, green, blue; if (!ent->refcnt) continue; if (ent->fShared) { red = ent->co.shco.red->color; green = ent->co.shco.green->color; blue = ent->co.shco.blue->color; } else { red = ent->co.local.red; green = ent->co.local.green; blue = ent->co.local.blue; } colors[i - first_color] = (0xFF000000UL | ((uint32_t) red & 0xff00) << 8 | (green & 0xff00) | (blue >> 8)); } return TRUE; } unsigned long RootlessWID(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; WindowPtr top = TopLevelParent(pWindow); RootlessWindowRec *winRec; PixmapPtr curPixmap; if (top == NULL) { return 0; } winRec = WINREC(top); if (winRec == NULL) { return 0; } return (unsigned long)(uintptr_t)winRec->wid; } /* * RootlessStartDrawing * Prepare a window for direct access to its backing buffer. * Each top-level parent has a Pixmap representing its backing buffer, * which all of its children inherit. */ void RootlessStartDrawing(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; WindowPtr top = TopLevelParent(pWindow); RootlessWindowRec *winRec; PixmapPtr curPixmap; if (top == NULL) { RL_DEBUG_MSG("RootlessStartDrawing is a no-op because top == NULL.\n"); return; } winRec = WINREC(top); if (winRec == NULL) { RL_DEBUG_MSG("RootlessStartDrawing is a no-op because winRec == NULL.\n"); return; } // Make sure the window's top-level parent is prepared for drawing. if (!winRec->is_drawing) { int bw = wBorderWidth(top); SCREENREC(pScreen)->imp->StartDrawing(winRec->wid, &winRec->pixelData, &winRec->bytesPerRow); winRec->pixmap = GetScratchPixmapHeader(pScreen, winRec->width, winRec->height, top->drawable.depth, top->drawable.bitsPerPixel, winRec->bytesPerRow, winRec->pixelData); RL_DEBUG_MSG("GetScratchPixmapHeader gave us %p %p (%d,%d %dx%d %d) for wid=%lu\n", winRec->pixmap, winRec->pixmap->devPrivate.ptr, winRec->pixmap->drawable.x, winRec->pixmap->drawable.y, winRec->pixmap->drawable.width, winRec->pixmap->drawable.height, winRec->pixmap->drawable.bitsPerPixel, RootlessWID(pWindow)); SetPixmapBaseToScreen(winRec->pixmap, top->drawable.x - bw, top->drawable.y - bw); RL_DEBUG_MSG("After SetPixmapBaseToScreen(%d %d %d): %p (%d,%d %dx%d %d) for wid=%lu\n", top->drawable.x, top->drawable.y, bw, winRec->pixmap->devPrivate.ptr, winRec->pixmap->drawable.x, winRec->pixmap->drawable.y, winRec->pixmap->drawable.width, winRec->pixmap->drawable.height, winRec->pixmap->drawable.bitsPerPixel, RootlessWID(pWindow)); winRec->is_drawing = TRUE; } else { RL_DEBUG_MSG("Skipped call to xprStartDrawing (wid: %lu) because winRec->is_drawing says we already did.\n", RootlessWID(pWindow)); } curPixmap = pScreen->GetWindowPixmap(pWindow); if (curPixmap == winRec->pixmap) { RL_DEBUG_MSG("Window %p already has winRec->pixmap %p; not pushing\n", pWindow, winRec->pixmap); } else { PixmapPtr oldPixmap = dixLookupPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey); RL_DEBUG_MSG("curPixmap is %p %p for wid=%lu\n", curPixmap, curPixmap ? curPixmap->devPrivate.ptr : NULL, RootlessWID(pWindow)); RL_DEBUG_MSG("oldPixmap is %p %p for wid=%lu\n", oldPixmap, oldPixmap ? oldPixmap->devPrivate.ptr : NULL, RootlessWID(pWindow)); if (oldPixmap != NULL) { if (oldPixmap == curPixmap) RL_DEBUG_MSG ("Window %p's curPixmap %p is the same as its oldPixmap; strange\n", pWindow, curPixmap); else RL_DEBUG_MSG("Window %p's existing oldPixmap %p being lost!\n", pWindow, oldPixmap); } dixSetPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey, curPixmap); pScreen->SetWindowPixmap(pWindow, winRec->pixmap); } } /* * RootlessStopDrawing * Stop drawing to a window's backing buffer. If flush is true, * damaged regions are flushed to the screen. */ static int RestorePreDrawingPixmapVisitor(WindowPtr pWindow, void *data) { RootlessWindowRec *winRec = (RootlessWindowRec *) data; ScreenPtr pScreen = pWindow->drawable.pScreen; PixmapPtr exPixmap = pScreen->GetWindowPixmap(pWindow); PixmapPtr oldPixmap = dixLookupPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey); if (oldPixmap == NULL) { if (exPixmap == winRec->pixmap) RL_DEBUG_MSG ("Window %p appears to be in drawing mode (ex-pixmap %p equals winRec->pixmap, which is being freed) but has no oldPixmap!\n", pWindow, exPixmap); } else { if (exPixmap != winRec->pixmap) RL_DEBUG_MSG ("Window %p appears to be in drawing mode (oldPixmap %p) but ex-pixmap %p not winRec->pixmap %p!\n", pWindow, oldPixmap, exPixmap, winRec->pixmap); if (oldPixmap == winRec->pixmap) RL_DEBUG_MSG ("Window %p's oldPixmap %p is winRec->pixmap, which has just been freed!\n", pWindow, oldPixmap); pScreen->SetWindowPixmap(pWindow, oldPixmap); dixSetPrivate(&pWindow->devPrivates, rootlessWindowOldPixmapPrivateKey, NULL); } return WT_WALKCHILDREN; } void RootlessStopDrawing(WindowPtr pWindow, Bool flush) { ScreenPtr pScreen = pWindow->drawable.pScreen; WindowPtr top = TopLevelParent(pWindow); RootlessWindowRec *winRec; if (top == NULL) return; winRec = WINREC(top); if (winRec == NULL) return; if (winRec->is_drawing) { SCREENREC(pScreen)->imp->StopDrawing(winRec->wid, flush); FreeScratchPixmapHeader(winRec->pixmap); TraverseTree(top, RestorePreDrawingPixmapVisitor, (void *) winRec); winRec->pixmap = NULL; winRec->is_drawing = FALSE; } else if (flush) { SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, NULL); } if (flush && winRec->is_reorder_pending) { winRec->is_reorder_pending = FALSE; RootlessReorderWindow(pWindow); } } /* * RootlessDamageRegion * Mark a damaged region as requiring redisplay to screen. * pRegion is in GLOBAL coordinates. */ void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) { RootlessWindowRec *winRec; RegionRec clipped; WindowPtr pTop; BoxPtr b1, b2; RL_DEBUG_MSG("Damaged win %p\n", pWindow); pTop = TopLevelParent(pWindow); if (pTop == NULL) return; winRec = WINREC(pTop); if (winRec == NULL) return; /* We need to intersect the drawn region with the clip of the window to avoid marking places we didn't actually draw (which can cause problems when the window has an extra client-side backing store) But this is a costly operation and since we'll normally just be drawing inside the clip, go to some lengths to avoid the general case intersection. */ b1 = RegionExtents(&pWindow->borderClip); b2 = RegionExtents(pRegion); if (EXTENTCHECK(b1, b2)) { /* Regions may overlap. */ if (RegionNumRects(pRegion) == 1) { int in; /* Damaged region only has a single rect, so we can just compare that against the region */ in = RegionContainsRect(&pWindow->borderClip, RegionRects(pRegion)); if (in == rgnIN) { /* clip totally contains pRegion */ SCREENREC(pWindow->drawable.pScreen)->imp->DamageRects(winRec-> wid, RegionNumRects (pRegion), RegionRects (pRegion), -winRec-> x, -winRec-> y); RootlessQueueRedisplay(pTop->drawable.pScreen); goto out; } else if (in == rgnOUT) { /* clip doesn't contain pRegion */ goto out; } } /* clip overlaps pRegion, need to intersect */ RegionNull(&clipped); RegionIntersect(&clipped, &pWindow->borderClip, pRegion); SCREENREC(pWindow->drawable.pScreen)->imp->DamageRects(winRec->wid, RegionNumRects (&clipped), RegionRects (&clipped), -winRec->x, -winRec->y); RegionUninit(&clipped); RootlessQueueRedisplay(pTop->drawable.pScreen); } out: #ifdef ROOTLESSDEBUG { BoxRec *box = RegionRects(pRegion), *end; int numBox = RegionNumRects(pRegion); for (end = box + numBox; box < end; box++) { RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", box->x1, box->x2, box->y1, box->y2); } } #endif return; } /* * RootlessDamageBox * Mark a damaged box as requiring redisplay to screen. * pRegion is in GLOBAL coordinates. */ void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) { RegionRec region; RegionInit(®ion, pBox, 1); RootlessDamageRegion(pWindow, ®ion); RegionUninit(®ion); /* no-op */ } /* * RootlessDamageRect * Mark a damaged rectangle as requiring redisplay to screen. * (x, y, w, h) is in window-local coordinates. */ void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) { BoxRec box; RegionRec region; x += pWindow->drawable.x; y += pWindow->drawable.y; box.x1 = x; box.x2 = x + w; box.y1 = y; box.y2 = y + h; RegionInit(®ion, &box, 1); RootlessDamageRegion(pWindow, ®ion); RegionUninit(®ion); /* no-op */ } /* * RootlessRedisplay * Stop drawing and redisplay the damaged region of a window. */ void RootlessRedisplay(WindowPtr pWindow) { RootlessStopDrawing(pWindow, TRUE); } /* * RootlessRepositionWindows * Reposition all windows on a screen to their correct positions. */ void RootlessRepositionWindows(ScreenPtr pScreen) { WindowPtr root = pScreen->root; WindowPtr win; if (root != NULL) { RootlessRepositionWindow(root); for (win = root->firstChild; win; win = win->nextSib) { if (WINREC(win) != NULL) RootlessRepositionWindow(win); } } } /* * RootlessRedisplayScreen * Walk every window on a screen and redisplay the damaged regions. */ void RootlessRedisplayScreen(ScreenPtr pScreen) { WindowPtr root = pScreen->root; if (root != NULL) { WindowPtr win; RootlessRedisplay(root); for (win = root->firstChild; win; win = win->nextSib) { if (WINREC(win) != NULL) { RootlessRedisplay(win); } } } } xorg-server-21.1.16/miext/rootless/rootlessGC.c0000644000175000017500000012344114757411105015070 /* * Graphics Context support for generic rootless X server */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* For NULL */ #include "mi.h" #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "dixfontstr.h" #include "mivalidate.h" #include "fb.h" #include #include #include #include "rootlessCommon.h" // GC functions static void RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable); static void RootlessChangeGC(GCPtr pGC, unsigned long mask); static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst); static void RootlessDestroyGC(GCPtr pGC); static void RootlessChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); static void RootlessDestroyClip(GCPtr pGC); static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc); Bool RootlessCreateGC(GCPtr pGC); GCFuncs rootlessGCFuncs = { RootlessValidateGC, RootlessChangeGC, RootlessCopyGC, RootlessDestroyGC, RootlessChangeClip, RootlessDestroyClip, RootlessCopyClip, }; // GC operations static void RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int sorted); static void RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, DDXPointPtr pptInit, int *pwidthInit, int nspans, int sorted); static void RootlessPutImage(DrawablePtr dst, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pBits); static RegionPtr RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty); static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long plane); static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit); static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit); static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment * pSeg); static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, int nRects, xRectangle *pRects); static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc * parcs); static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, int shape, int mode, int count, DDXPointPtr pptInit); static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, int nRectsInit, xRectangle *pRectsInit); static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, int narcsInit, xArc * parcsInit); static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars); static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars); static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars); static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars); static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyphInit, CharInfoPtr * ppciInit, void *unused); static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase); static void RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, int dx, int dy, int xOrg, int yOrg); static GCOps rootlessGCOps = { RootlessFillSpans, RootlessSetSpans, RootlessPutImage, RootlessCopyArea, RootlessCopyPlane, RootlessPolyPoint, RootlessPolylines, RootlessPolySegment, RootlessPolyRectangle, RootlessPolyArc, RootlessFillPolygon, RootlessPolyFillRect, RootlessPolyFillArc, RootlessPolyText8, RootlessPolyText16, RootlessImageText8, RootlessImageText16, RootlessImageGlyphBlt, RootlessPolyGlyphBlt, RootlessPushPixels }; /* If ROOTLESS_PROTECT_ALPHA is set, we have to make sure that the alpha channel of the on screen windows is always opaque. fb makes this harder than it would otherwise be by noticing that a planemask of 0x00ffffff includes all bits when depth==24, and so it "optimizes" the planemask to 0xffffffff. We work around this by temporarily setting depth=bpp while changing the GC. So the normal situation (in 32 bit mode) is that the planemask is 0x00ffffff and thus fb leaves the alpha channel alone. The rootless implementation is responsible for setting the alpha channel opaque initially. Unfortunately drawing with a planemask that doesn't have all bits set normally causes fb to fall off its fastest paths when blitting and filling. So we try to recognize when we can relax the planemask back to 0xffffffff, and do that for the duration of the drawing operation, setting the alpha channel in fg/bg pixels to opaque at the same time. We can do this when drawing op is GXcopy. We can also do this when copying from another window since its alpha channel must also be opaque. The three macros below are used to implement this. Drawing ops that can potentially have their planemask relaxed look like: OP { GC_SAVE(gc); GCOP_UNWRAP(gc); ... if (canAccelxxx(..) && otherwise-suitable) GC_UNSET_PM(gc, dst); gc->funcs->OP(gc, ...); GC_RESTORE(gc, dst); GCOP_WRAP(gc); } */ #define GC_SAVE(pGC) \ unsigned long _save_fg = (pGC)->fgPixel; \ unsigned long _save_bg = (pGC)->bgPixel; \ unsigned long _save_pm = (pGC)->planemask; \ Bool _changed = FALSE #define GC_RESTORE(pGC, pDraw) \ do { \ if (_changed) { \ unsigned int depth = (pDraw)->depth; \ (pGC)->fgPixel = _save_fg; \ (pGC)->bgPixel = _save_bg; \ (pGC)->planemask = _save_pm; \ (pDraw)->depth = (pDraw)->bitsPerPixel; \ VALIDATE_GC(pGC, GCForeground | GCBackground | \ GCPlaneMask, pDraw); \ (pDraw)->depth = depth; \ } \ } while (0) #define GC_UNSET_PM(pGC, pDraw) \ do { \ unsigned int mask = RootlessAlphaMask ((pDraw)->bitsPerPixel); \ if (((pGC)->planemask & mask) != mask) { \ unsigned int depth = (pDraw)->depth; \ (pGC)->fgPixel |= mask; \ (pGC)->bgPixel |= mask; \ (pGC)->planemask |= mask; \ (pDraw)->depth = (pDraw)->bitsPerPixel; \ VALIDATE_GC(pGC, GCForeground | \ GCBackground | GCPlaneMask, pDraw); \ (pDraw)->depth = depth; \ _changed = TRUE; \ } \ } while (0) #define VALIDATE_GC(pGC, changes, pDrawable) \ do { \ pGC->funcs->ValidateGC(pGC, changes, pDrawable); \ if (((WindowPtr) pDrawable)->viewable) { \ gcrec->originalOps = pGC->ops; \ } \ } while(0) static RootlessWindowRec * canAccelBlit(DrawablePtr pDraw, GCPtr pGC) { WindowPtr pTop; RootlessWindowRec *winRec; unsigned int pm; if (pGC->alu != GXcopy) return NULL; if (pDraw->type != DRAWABLE_WINDOW) return NULL; pm = ~RootlessAlphaMask(pDraw->bitsPerPixel); if ((pGC->planemask & pm) != pm) return NULL; pTop = TopLevelParent((WindowPtr) pDraw); if (pTop == NULL) return NULL; winRec = WINREC(pTop); if (winRec == NULL) return NULL; return winRec; } static inline RootlessWindowRec * canAccelFill(DrawablePtr pDraw, GCPtr pGC) { if (pGC->fillStyle != FillSolid) return NULL; return canAccelBlit(pDraw, pGC); } /* * Screen function to create a graphics context */ Bool RootlessCreateGC(GCPtr pGC) { RootlessGCRec *gcrec; RootlessScreenRec *s; Bool result; SCREEN_UNWRAP(pGC->pScreen, CreateGC); s = SCREENREC(pGC->pScreen); result = s->CreateGC(pGC); gcrec = (RootlessGCRec *) dixLookupPrivate(&pGC->devPrivates, rootlessGCPrivateKey); gcrec->originalOps = NULL; // don't wrap ops yet gcrec->originalFuncs = pGC->funcs; pGC->funcs = &rootlessGCFuncs; SCREEN_WRAP(pGC->pScreen, CreateGC); return result; } /* * GC funcs * * These wrap lower level GC funcs. * ValidateGC wraps the GC ops iff dest is viewable. * All the others just unwrap and call. */ // GCFUNC_UNRAP assumes funcs have been wrapped and // does not assume ops have been wrapped #define GCFUNC_UNWRAP(pGC) \ RootlessGCRec *gcrec = (RootlessGCRec *) \ dixLookupPrivate(&(pGC)->devPrivates, rootlessGCPrivateKey); \ (pGC)->funcs = gcrec->originalFuncs; \ if (gcrec->originalOps) { \ (pGC)->ops = gcrec->originalOps; \ } #define GCFUNC_WRAP(pGC) \ gcrec->originalFuncs = (pGC)->funcs; \ (pGC)->funcs = &rootlessGCFuncs; \ if (gcrec->originalOps) { \ gcrec->originalOps = (pGC)->ops; \ (pGC)->ops = &rootlessGCOps; \ } static void RootlessValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) { GCFUNC_UNWRAP(pGC); gcrec->originalOps = NULL; if (pDrawable->type == DRAWABLE_WINDOW) { #ifdef ROOTLESS_PROTECT_ALPHA unsigned int depth = pDrawable->depth; // We force a planemask so fb doesn't overwrite the alpha channel. // Left to its own devices, fb will optimize away the planemask. pDrawable->depth = pDrawable->bitsPerPixel; pGC->planemask &= ~RootlessAlphaMask(pDrawable->bitsPerPixel); VALIDATE_GC(pGC, changes | GCPlaneMask, pDrawable); pDrawable->depth = depth; #else VALIDATE_GC(pGC, changes, pDrawable); #endif } else { pGC->funcs->ValidateGC(pGC, changes, pDrawable); } GCFUNC_WRAP(pGC); } static void RootlessChangeGC(GCPtr pGC, unsigned long mask) { GCFUNC_UNWRAP(pGC); pGC->funcs->ChangeGC(pGC, mask); GCFUNC_WRAP(pGC); } static void RootlessCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { GCFUNC_UNWRAP(pGCDst); pGCDst->funcs->CopyGC(pGCSrc, mask, pGCDst); GCFUNC_WRAP(pGCDst); } static void RootlessDestroyGC(GCPtr pGC) { GCFUNC_UNWRAP(pGC); pGC->funcs->DestroyGC(pGC); GCFUNC_WRAP(pGC); } static void RootlessChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { GCFUNC_UNWRAP(pGC); pGC->funcs->ChangeClip(pGC, type, pvalue, nrects); GCFUNC_WRAP(pGC); } static void RootlessDestroyClip(GCPtr pGC) { GCFUNC_UNWRAP(pGC); pGC->funcs->DestroyClip(pGC); GCFUNC_WRAP(pGC); } static void RootlessCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { GCFUNC_UNWRAP(pgcDst); pgcDst->funcs->CopyClip(pgcDst, pgcSrc); GCFUNC_WRAP(pgcDst); } /* * GC ops * * We can't use shadowfb because shadowfb assumes one pixmap * and our root window is a special case. * However, much of this code is copied from shadowfb. */ // assumes both funcs and ops are wrapped #define GCOP_UNWRAP(pGC) \ RootlessGCRec *gcrec = (RootlessGCRec *) \ dixLookupPrivate(&(pGC)->devPrivates, rootlessGCPrivateKey); \ const GCFuncs *saveFuncs = pGC->funcs; \ (pGC)->funcs = gcrec->originalFuncs; \ (pGC)->ops = gcrec->originalOps; #define GCOP_WRAP(pGC) \ gcrec->originalOps = (pGC)->ops; \ (pGC)->funcs = saveFuncs; \ (pGC)->ops = &rootlessGCOps; static void RootlessFillSpans(DrawablePtr dst, GCPtr pGC, int nInit, DDXPointPtr pptInit, int *pwidthInit, int sorted) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("fill spans start "); if (nInit <= 0) { pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); } else { DDXPointPtr ppt = pptInit; int *pwidth = pwidthInit; int i = nInit; BoxRec box; box.x1 = ppt->x; box.x2 = box.x1 + *pwidth; box.y2 = box.y1 = ppt->y; while (--i) { ppt++; pwidth++; if (box.x1 > ppt->x) box.x1 = ppt->x; if (box.x2 < (ppt->x + *pwidth)) box.x2 = ppt->x + *pwidth; if (box.y1 > ppt->y) box.y1 = ppt->y; else if (box.y2 < ppt->y) box.y2 = ppt->y; } box.y2++; RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->FillSpans(dst, pGC, nInit, pptInit, pwidthInit, sorted); TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("fill spans end\n"); } static void RootlessSetSpans(DrawablePtr dst, GCPtr pGC, char *pSrc, DDXPointPtr pptInit, int *pwidthInit, int nspans, int sorted) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("set spans start "); if (nspans <= 0) { pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, nspans, sorted); } else { DDXPointPtr ppt = pptInit; int *pwidth = pwidthInit; int i = nspans; BoxRec box; box.x1 = ppt->x; box.x2 = box.x1 + *pwidth; box.y2 = box.y1 = ppt->y; while (--i) { ppt++; pwidth++; if (box.x1 > ppt->x) box.x1 = ppt->x; if (box.x2 < (ppt->x + *pwidth)) box.x2 = ppt->x + *pwidth; if (box.y1 > ppt->y) box.y1 = ppt->y; else if (box.y2 < ppt->y) box.y2 = ppt->y; } box.y2++; RootlessStartDrawing((WindowPtr) dst); pGC->ops->SetSpans(dst, pGC, pSrc, pptInit, pwidthInit, nspans, sorted); TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("set spans end\n"); } static void RootlessPutImage(DrawablePtr dst, GCPtr pGC, int depth, int x, int y, int w, int h, int leftPad, int format, char *pBits) { BoxRec box; GCOP_UNWRAP(pGC); RL_DEBUG_MSG("put image start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PutImage(dst, pGC, depth, x, y, w, h, leftPad, format, pBits); box.x1 = x + dst->x; box.x2 = box.x1 + w; box.y1 = y + dst->y; box.y2 = box.y1 + h; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); GCOP_WRAP(pGC); RL_DEBUG_MSG("put image end\n"); } /* changed area is *dest* rect */ static RegionPtr RootlessCopyArea(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty) { RegionPtr result; BoxRec box; GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("copy area start (src 0x%x, dst 0x%x)", pSrc, dst); if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr) pSrc)) { /* If both source and dest are windows, and we're doing a simple copy operation, we can remove the alpha-protecting planemask (since source has opaque alpha as well) */ if (canAccelBlit(pSrc, pGC)) { GC_UNSET_PM(pGC, dst); } RootlessStartDrawing((WindowPtr) pSrc); } RootlessStartDrawing((WindowPtr) dst); result = pGC->ops->CopyArea(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty); box.x1 = dstx + dst->x; box.x2 = box.x1 + w; box.y1 = dsty + dst->y; box.y2 = box.y1 + h; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("copy area end\n"); return result; } /* changed area is *dest* rect */ static RegionPtr RootlessCopyPlane(DrawablePtr pSrc, DrawablePtr dst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long plane) { RegionPtr result; BoxRec box; GCOP_UNWRAP(pGC); RL_DEBUG_MSG("copy plane start "); if (pSrc->type == DRAWABLE_WINDOW && IsFramedWindow((WindowPtr) pSrc)) { RootlessStartDrawing((WindowPtr) pSrc); } RootlessStartDrawing((WindowPtr) dst); result = pGC->ops->CopyPlane(pSrc, dst, pGC, srcx, srcy, w, h, dstx, dsty, plane); box.x1 = dstx + dst->x; box.x2 = box.x1 + w; box.y1 = dsty + dst->y; box.y2 = box.y1 + h; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); GCOP_WRAP(pGC); RL_DEBUG_MSG("copy plane end\n"); return result; } // Options for size of changed area: // 0 = box per point // 1 = big box around all points // 2 = accumulate point in 20 pixel radius #define ROOTLESS_CHANGED_AREA 1 #define abs(a) ((a) > 0 ? (a) : -(a)) /* changed area is box around all points */ static void RootlessPolyPoint(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("polypoint start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolyPoint(dst, pGC, mode, npt, pptInit); if (npt > 0) { #if ROOTLESS_CHANGED_AREA==0 // box per point BoxRec box; while (npt) { box.x1 = pptInit->x; box.y1 = pptInit->y; box.x2 = box.x1 + 1; box.y2 = box.y1 + 1; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); npt--; pptInit++; } #elif ROOTLESS_CHANGED_AREA==1 // one big box BoxRec box; box.x2 = box.x1 = pptInit->x; box.y2 = box.y1 = pptInit->y; while (--npt) { pptInit++; if (box.x1 > pptInit->x) box.x1 = pptInit->x; else if (box.x2 < pptInit->x) box.x2 = pptInit->x; if (box.y1 > pptInit->y) box.y1 = pptInit->y; else if (box.y2 < pptInit->y) box.y2 = pptInit->y; } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); #elif ROOTLESS_CHANGED_AREA==2 // clever(?) method: accumulate point in 20-pixel radius BoxRec box; int firstx, firsty; box.x2 = box.x1 = firstx = pptInit->x; box.y2 = box.y1 = firsty = pptInit->y; while (--npt) { pptInit++; if (abs(pptInit->x - firstx) > 20 || abs(pptInit->y - firsty) > 20) { box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); box.x2 = box.x1 = firstx = pptInit->x; box.y2 = box.y1 = firsty = pptInit->y; } else { if (box.x1 > pptInit->x) box.x1 = pptInit->x; else if (box.x2 < pptInit->x) box.x2 = pptInit->x; if (box.y1 > pptInit->y) box.y1 = pptInit->y; else if (box.y2 < pptInit->y) box.y2 = pptInit->y; } } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); #endif /* ROOTLESS_CHANGED_AREA */ } GCOP_WRAP(pGC); RL_DEBUG_MSG("polypoint end\n"); } #undef ROOTLESS_CHANGED_AREA /* changed area is box around each line */ static void RootlessPolylines(DrawablePtr dst, GCPtr pGC, int mode, int npt, DDXPointPtr pptInit) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("poly lines start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->Polylines(dst, pGC, mode, npt, pptInit); if (npt > 0) { BoxRec box; int extra = pGC->lineWidth >> 1; box.x2 = box.x1 = pptInit->x; box.y2 = box.y1 = pptInit->y; if (npt > 1) { if (pGC->joinStyle == JoinMiter) extra = 6 * pGC->lineWidth; else if (pGC->capStyle == CapProjecting) extra = pGC->lineWidth; } if (mode == CoordModePrevious) { int x = box.x1; int y = box.y1; while (--npt) { pptInit++; x += pptInit->x; y += pptInit->y; if (box.x1 > x) box.x1 = x; else if (box.x2 < x) box.x2 = x; if (box.y1 > y) box.y1 = y; else if (box.y2 < y) box.y2 = y; } } else { while (--npt) { pptInit++; if (box.x1 > pptInit->x) box.x1 = pptInit->x; else if (box.x2 < pptInit->x) box.x2 = pptInit->x; if (box.y1 > pptInit->y) box.y1 = pptInit->y; else if (box.y2 < pptInit->y) box.y2 = pptInit->y; } } box.x2++; box.y2++; if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("poly lines end\n"); } /* changed area is box around each line segment */ static void RootlessPolySegment(DrawablePtr dst, GCPtr pGC, int nseg, xSegment * pSeg) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("poly segment start (win 0x%x)", dst); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolySegment(dst, pGC, nseg, pSeg); if (nseg > 0) { BoxRec box; int extra = pGC->lineWidth; if (pGC->capStyle != CapProjecting) extra >>= 1; if (pSeg->x2 > pSeg->x1) { box.x1 = pSeg->x1; box.x2 = pSeg->x2; } else { box.x2 = pSeg->x1; box.x1 = pSeg->x2; } if (pSeg->y2 > pSeg->y1) { box.y1 = pSeg->y1; box.y2 = pSeg->y2; } else { box.y2 = pSeg->y1; box.y1 = pSeg->y2; } while (--nseg) { pSeg++; if (pSeg->x2 > pSeg->x1) { if (pSeg->x1 < box.x1) box.x1 = pSeg->x1; if (pSeg->x2 > box.x2) box.x2 = pSeg->x2; } else { if (pSeg->x2 < box.x1) box.x1 = pSeg->x2; if (pSeg->x1 > box.x2) box.x2 = pSeg->x1; } if (pSeg->y2 > pSeg->y1) { if (pSeg->y1 < box.y1) box.y1 = pSeg->y1; if (pSeg->y2 > box.y2) box.y2 = pSeg->y2; } else { if (pSeg->y2 < box.y1) box.y1 = pSeg->y2; if (pSeg->y1 > box.y2) box.y2 = pSeg->y1; } } box.x2++; box.y2++; if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("poly segment end\n"); } /* changed area is box around each line (not entire rects) */ static void RootlessPolyRectangle(DrawablePtr dst, GCPtr pGC, int nRects, xRectangle *pRects) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("poly rectangle start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolyRectangle(dst, pGC, nRects, pRects); if (nRects > 0) { BoxRec box; int offset1, offset2, offset3; offset2 = pGC->lineWidth; if (!offset2) offset2 = 1; offset1 = offset2 >> 1; offset3 = offset2 - offset1; while (nRects--) { box.x1 = pRects->x - offset1; box.y1 = pRects->y - offset1; box.x2 = box.x1 + pRects->width + offset2; box.y2 = box.y1 + offset2; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); box.x1 = pRects->x - offset1; box.y1 = pRects->y + offset3; box.x2 = box.x1 + offset2; box.y2 = box.y1 + pRects->height - offset2; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); box.x1 = pRects->x + pRects->width - offset1; box.y1 = pRects->y + offset3; box.x2 = box.x1 + offset2; box.y2 = box.y1 + pRects->height - offset2; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); box.x1 = pRects->x - offset1; box.y1 = pRects->y + pRects->height - offset1; box.x2 = box.x1 + pRects->width + offset2; box.y2 = box.y1 + offset2; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); pRects++; } } GCOP_WRAP(pGC); RL_DEBUG_MSG("poly rectangle end\n"); } /* changed area is box around each arc (assumes all arcs are 360 degrees) */ static void RootlessPolyArc(DrawablePtr dst, GCPtr pGC, int narcs, xArc * parcs) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("poly arc start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolyArc(dst, pGC, narcs, parcs); if (narcs > 0) { int extra = pGC->lineWidth >> 1; BoxRec box; box.x1 = parcs->x; box.x2 = box.x1 + parcs->width; box.y1 = parcs->y; box.y2 = box.y1 + parcs->height; /* should I break these up instead ? */ while (--narcs) { parcs++; if (box.x1 > parcs->x) box.x1 = parcs->x; if (box.x2 < (parcs->x + parcs->width)) box.x2 = parcs->x + parcs->width; if (box.y1 > parcs->y) box.y1 = parcs->y; if (box.y2 < (parcs->y + parcs->height)) box.y2 = parcs->y + parcs->height; } if (extra) { box.x1 -= extra; box.x2 += extra; box.y1 -= extra; box.y2 += extra; } box.x2++; box.y2++; TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("poly arc end\n"); } /* changed area is box around each poly */ static void RootlessFillPolygon(DrawablePtr dst, GCPtr pGC, int shape, int mode, int count, DDXPointPtr pptInit) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("fill poly start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); if (count <= 2) { pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); } else { DDXPointPtr ppt = pptInit; int i = count; BoxRec box; box.x2 = box.x1 = ppt->x; box.y2 = box.y1 = ppt->y; if (mode != CoordModeOrigin) { int x = box.x1; int y = box.y1; while (--i) { ppt++; x += ppt->x; y += ppt->y; if (box.x1 > x) box.x1 = x; else if (box.x2 < x) box.x2 = x; if (box.y1 > y) box.y1 = y; else if (box.y2 < y) box.y2 = y; } } else { while (--i) { ppt++; if (box.x1 > ppt->x) box.x1 = ppt->x; else if (box.x2 < ppt->x) box.x2 = ppt->x; if (box.y1 > ppt->y) box.y1 = ppt->y; else if (box.y2 < ppt->y) box.y2 = ppt->y; } } box.x2++; box.y2++; RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pptInit); TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("fill poly end\n"); } /* changed area is the rects */ static void RootlessPolyFillRect(DrawablePtr dst, GCPtr pGC, int nRectsInit, xRectangle *pRectsInit) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("fill rect start (win 0x%x, fillStyle 0x%x)", dst, pGC->fillStyle); if (nRectsInit <= 0) { pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); } else { BoxRec box; xRectangle *pRects = pRectsInit; int nRects = nRectsInit; box.x1 = pRects->x; box.x2 = box.x1 + pRects->width; box.y1 = pRects->y; box.y2 = box.y1 + pRects->height; while (--nRects) { pRects++; if (box.x1 > pRects->x) box.x1 = pRects->x; if (box.x2 < (pRects->x + pRects->width)) box.x2 = pRects->x + pRects->width; if (box.y1 > pRects->y) box.y1 = pRects->y; if (box.y2 < (pRects->y + pRects->height)) box.y2 = pRects->y + pRects->height; } RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->PolyFillRect(dst, pGC, nRectsInit, pRectsInit); TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("fill rect end\n"); } /* changed area is box around each arc (assuming arcs are all 360 degrees) */ static void RootlessPolyFillArc(DrawablePtr dst, GCPtr pGC, int narcsInit, xArc * parcsInit) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("fill arc start "); if (narcsInit > 0) { BoxRec box; int narcs = narcsInit; xArc *parcs = parcsInit; box.x1 = parcs->x; box.x2 = box.x1 + parcs->width; box.y1 = parcs->y; box.y2 = box.y1 + parcs->height; /* should I break these up instead ? */ while (--narcs) { parcs++; if (box.x1 > parcs->x) box.x1 = parcs->x; if (box.x2 < (parcs->x + parcs->width)) box.x2 = parcs->x + parcs->width; if (box.y1 > parcs->y) box.y1 = parcs->y; if (box.y2 < (parcs->y + parcs->height)) box.y2 = parcs->y + parcs->height; } RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->PolyFillArc(dst, pGC, narcsInit, parcsInit); TRIM_AND_TRANSLATE_BOX(box, dst, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } else { pGC->ops->PolyFillArc(dst, pGC, narcsInit, parcsInit); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("fill arc end\n"); } static void RootlessImageText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("imagetext8 start "); if (count > 0) { int top, bot, Min, Max; BoxRec box; top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); Min = count * FONTMINBOUNDS(pGC->font, characterWidth); if (Min > 0) Min = 0; Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); if (Max < 0) Max = 0; /* ugh */ box.x1 = dst->x + x + Min + FONTMINBOUNDS(pGC->font, leftSideBearing); box.x2 = dst->x + x + Max + FONTMAXBOUNDS(pGC->font, rightSideBearing); box.y1 = dst->y + y - top; box.y2 = dst->y + y + bot; RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->ImageText8(dst, pGC, x, y, count, chars); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } else { pGC->ops->ImageText8(dst, pGC, x, y, count, chars); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("imagetext8 end\n"); } static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, int x, int y, int count, char *chars) { int width; // the result, sorta GCOP_UNWRAP(pGC); RL_DEBUG_MSG("polytext8 start "); RootlessStartDrawing((WindowPtr) dst); width = pGC->ops->PolyText8(dst, pGC, x, y, count, chars); width -= x; if (width > 0) { BoxRec box; /* ugh */ box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); if (count > 1) { box.x2 += width; } box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("polytext8 end\n"); return width + x; } static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("imagetext16 start "); if (count > 0) { int top, bot, Min, Max; BoxRec box; top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); Min = count * FONTMINBOUNDS(pGC->font, characterWidth); if (Min > 0) Min = 0; Max = count * FONTMAXBOUNDS(pGC->font, characterWidth); if (Max < 0) Max = 0; /* ugh */ box.x1 = dst->x + x + Min + FONTMINBOUNDS(pGC->font, leftSideBearing); box.x2 = dst->x + x + Max + FONTMAXBOUNDS(pGC->font, rightSideBearing); box.y1 = dst->y + y - top; box.y2 = dst->y + y + bot; RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->ImageText16(dst, pGC, x, y, count, chars); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } else { pGC->ops->ImageText16(dst, pGC, x, y, count, chars); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("imagetext16 end\n"); } static int RootlessPolyText16(DrawablePtr dst, GCPtr pGC, int x, int y, int count, unsigned short *chars) { int width; // the result, sorta GCOP_UNWRAP(pGC); RL_DEBUG_MSG("polytext16 start "); RootlessStartDrawing((WindowPtr) dst); width = pGC->ops->PolyText16(dst, pGC, x, y, count, chars); width -= x; if (width > 0) { BoxRec box; /* ugh */ box.x1 = dst->x + x + FONTMINBOUNDS(pGC->font, leftSideBearing); box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing); if (count > 1) { box.x2 += width; } box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("polytext16 end\n"); return width + x; } static void RootlessImageGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyphInit, CharInfoPtr * ppciInit, void *unused) { GC_SAVE(pGC); GCOP_UNWRAP(pGC); RL_DEBUG_MSG("imageglyph start "); if (nglyphInit > 0) { int top, bot, width = 0; BoxRec box; unsigned int nglyph = nglyphInit; CharInfoPtr *ppci = ppciInit; top = max(FONTMAXBOUNDS(pGC->font, ascent), FONTASCENT(pGC->font)); bot = max(FONTMAXBOUNDS(pGC->font, descent), FONTDESCENT(pGC->font)); box.x1 = ppci[0]->metrics.leftSideBearing; if (box.x1 > 0) box.x1 = 0; box.x2 = ppci[nglyph - 1]->metrics.rightSideBearing - ppci[nglyph - 1]->metrics.characterWidth; if (box.x2 < 0) box.x2 = 0; box.x2 += dst->x + x; box.x1 += dst->x + x; while (nglyph--) { width += (*ppci)->metrics.characterWidth; ppci++; } if (width > 0) box.x2 += width; else box.x1 += width; box.y1 = dst->y + y - top; box.y2 = dst->y + y + bot; RootlessStartDrawing((WindowPtr) dst); if (canAccelFill(dst, pGC)) { GC_UNSET_PM(pGC, dst); } pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyphInit, ppciInit, unused); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } else { pGC->ops->ImageGlyphBlt(dst, pGC, x, y, nglyphInit, ppciInit, unused); } GC_RESTORE(pGC, dst); GCOP_WRAP(pGC); RL_DEBUG_MSG("imageglyph end\n"); } static void RootlessPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyph, CharInfoPtr * ppci, void *pglyphBase) { GCOP_UNWRAP(pGC); RL_DEBUG_MSG("polyglyph start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PolyGlyphBlt(dst, pGC, x, y, nglyph, ppci, pglyphBase); if (nglyph > 0) { BoxRec box; /* ugh */ box.x1 = dst->x + x + ppci[0]->metrics.leftSideBearing; box.x2 = dst->x + x + ppci[nglyph - 1]->metrics.rightSideBearing; if (nglyph > 1) { int width = 0; while (--nglyph) { width += (*ppci)->metrics.characterWidth; ppci++; } if (width > 0) box.x2 += width; else box.x1 += width; } box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent); box.y2 = dst->y + y + FONTMAXBOUNDS(pGC->font, descent); TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); } GCOP_WRAP(pGC); RL_DEBUG_MSG("polyglyph end\n"); } /* changed area is in dest */ static void RootlessPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr dst, int dx, int dy, int xOrg, int yOrg) { BoxRec box; GCOP_UNWRAP(pGC); RL_DEBUG_MSG("push pixels start "); RootlessStartDrawing((WindowPtr) dst); pGC->ops->PushPixels(pGC, pBitMap, dst, dx, dy, xOrg, yOrg); box.x1 = xOrg + dst->x; box.x2 = box.x1 + dx; box.y1 = yOrg + dst->y; box.y2 = box.y1 + dy; TRIM_BOX(box, pGC); if (BOX_NOT_EMPTY(box)) RootlessDamageBox((WindowPtr) dst, &box); GCOP_WRAP(pGC); RL_DEBUG_MSG("push pixels end\n"); } xorg-server-21.1.16/miext/rootless/rootlessScreen.c0000644000175000017500000005154514757411105016023 /* * Screen routines for generic rootless X server */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "mi.h" #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "propertyst.h" #include "mivalidate.h" #include "picturestr.h" #include "colormapst.h" #include #include #include #include #include "rootlessCommon.h" #include "rootlessWindow.h" extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); extern Bool RootlessCreateGC(GCPtr pGC); // Initialize globals DevPrivateKeyRec rootlessGCPrivateKeyRec; DevPrivateKeyRec rootlessScreenPrivateKeyRec; DevPrivateKeyRec rootlessWindowPrivateKeyRec; DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec; /* * RootlessUpdateScreenPixmap * miCreateScreenResources does not like a null framebuffer pointer, * it leaves the screen pixmap with an uninitialized data pointer. * Thus, rootless implementations typically set the framebuffer width * to zero so that miCreateScreenResources does not allocate a screen * pixmap for us. We allocate our own screen pixmap here since we need * the screen pixmap to be valid (e.g. CopyArea from the root window). */ void RootlessUpdateScreenPixmap(ScreenPtr pScreen) { RootlessScreenRec *s = SCREENREC(pScreen); PixmapPtr pPix; unsigned int rowbytes; pPix = (*pScreen->GetScreenPixmap) (pScreen); if (pPix == NULL) { pPix = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth, 0); (*pScreen->SetScreenPixmap) (pPix); } rowbytes = PixmapBytePad(pScreen->width, pScreen->rootDepth); if (s->pixmap_data_size < rowbytes) { free(s->pixmap_data); s->pixmap_data_size = rowbytes; s->pixmap_data = malloc(s->pixmap_data_size); if (s->pixmap_data == NULL) return; memset(s->pixmap_data, 0xFF, s->pixmap_data_size); pScreen->ModifyPixmapHeader(pPix, pScreen->width, pScreen->height, pScreen->rootDepth, BitsPerPixel(pScreen->rootDepth), 0, s->pixmap_data); /* ModifyPixmapHeader ignores zero arguments, so install rowbytes by hand. */ pPix->devKind = 0; } } /* * RootlessCreateScreenResources * Rootless implementations typically set a null framebuffer pointer, which * causes problems with miCreateScreenResources. We fix things up here. */ static Bool RootlessCreateScreenResources(ScreenPtr pScreen) { Bool ret = TRUE; SCREEN_UNWRAP(pScreen, CreateScreenResources); if (pScreen->CreateScreenResources != NULL) ret = (*pScreen->CreateScreenResources) (pScreen); SCREEN_WRAP(pScreen, CreateScreenResources); if (!ret) return ret; /* Make sure we have a valid screen pixmap. */ RootlessUpdateScreenPixmap(pScreen); return ret; } static Bool RootlessCloseScreen(ScreenPtr pScreen) { RootlessScreenRec *s; s = SCREENREC(pScreen); // fixme unwrap everything that was wrapped? pScreen->CloseScreen = s->CloseScreen; if (s->pixmap_data != NULL) { free(s->pixmap_data); s->pixmap_data = NULL; s->pixmap_data_size = 0; } free(s); return pScreen->CloseScreen(pScreen); } static void RootlessGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, unsigned int format, unsigned long planeMask, char *pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; SCREEN_UNWRAP(pScreen, GetImage); if (pDrawable->type == DRAWABLE_WINDOW) { int x0, y0, x1, y1; RootlessWindowRec *winRec; // Many apps use GetImage to sync with the visible frame buffer // FIXME: entire screen or just window or all screens? RootlessRedisplayScreen(pScreen); // RedisplayScreen stops drawing, so we need to start it again RootlessStartDrawing((WindowPtr) pDrawable); /* Check that we have some place to read from. */ winRec = WINREC(TopLevelParent((WindowPtr) pDrawable)); if (winRec == NULL) goto out; /* Clip to top-level window bounds. */ /* FIXME: fbGetImage uses the width parameter to calculate the stride of the destination pixmap. If w is clipped, the data returned will be garbage, although we will not crash. */ x0 = pDrawable->x + sx; y0 = pDrawable->y + sy; x1 = x0 + w; y1 = y0 + h; x0 = max(x0, winRec->x); y0 = max(y0, winRec->y); x1 = min(x1, winRec->x + winRec->width); y1 = min(y1, winRec->y + winRec->height); sx = x0 - pDrawable->x; sy = y0 - pDrawable->y; w = x1 - x0; h = y1 - y0; if (w <= 0 || h <= 0) goto out; } pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); out: SCREEN_WRAP(pScreen, GetImage); } /* * RootlessSourceValidate * CopyArea and CopyPlane use a GC tied to the destination drawable. * StartDrawing/StopDrawing wrappers won't be called if source is * a visible window but the destination isn't. So, we call StartDrawing * here and leave StopDrawing for the block handler. */ static void RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode) { SCREEN_UNWRAP(pDrawable->pScreen, SourceValidate); if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; RootlessStartDrawing(pWin); } pDrawable->pScreen->SourceValidate(pDrawable, x, y, w, h, subWindowMode); SCREEN_WRAP(pDrawable->pScreen, SourceValidate); } static void RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); WindowPtr srcWin, dstWin, maskWin = NULL; if (pMask) { // pMask can be NULL maskWin = (pMask->pDrawable && pMask->pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pMask->pDrawable : NULL; } srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pSrc->pDrawable : NULL; dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pDst->pDrawable : NULL; // SCREEN_UNWRAP(ps, Composite); ps->Composite = SCREENREC(pScreen)->Composite; if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); if (maskWin && IsFramedWindow(maskWin)) RootlessStartDrawing(maskWin); if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); ps->Composite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (dstWin && IsFramedWindow(dstWin)) { RootlessDamageRect(dstWin, xDst, yDst, width, height); } ps->Composite = RootlessComposite; // SCREEN_WRAP(ps, Composite); } static void RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { ScreenPtr pScreen = pDst->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); int x, y; int n; GlyphPtr glyph; WindowPtr srcWin, dstWin; srcWin = (pSrc->pDrawable && pSrc->pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pSrc->pDrawable : NULL; dstWin = (pDst->pDrawable->type == DRAWABLE_WINDOW) ? (WindowPtr) pDst->pDrawable : NULL; if (srcWin && IsFramedWindow(srcWin)) RootlessStartDrawing(srcWin); if (dstWin && IsFramedWindow(dstWin)) RootlessStartDrawing(dstWin); //SCREEN_UNWRAP(ps, Glyphs); ps->Glyphs = SCREENREC(pScreen)->Glyphs; ps->Glyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); ps->Glyphs = RootlessGlyphs; //SCREEN_WRAP(ps, Glyphs); if (dstWin && IsFramedWindow(dstWin)) { x = xSrc; y = ySrc; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; /* Calling DamageRect for the bounding box of each glyph is inefficient. So compute the union of all glyphs in a list and damage that. */ if (n > 0) { BoxRec box; glyph = *glyphs++; box.x1 = x - glyph->info.x; box.y1 = y - glyph->info.y; box.x2 = box.x1 + glyph->info.width; box.y2 = box.y1 + glyph->info.height; x += glyph->info.xOff; y += glyph->info.yOff; while (--n > 0) { short x1, y1, x2, y2; glyph = *glyphs++; x1 = x - glyph->info.x; y1 = y - glyph->info.y; x2 = x1 + glyph->info.width; y2 = y1 + glyph->info.height; box.x1 = max(box.x1, x1); box.y1 = max(box.y1, y1); box.x2 = max(box.x2, x2); box.y2 = max(box.y2, y2); x += glyph->info.xOff; y += glyph->info.yOff; } RootlessDamageBox(dstWin, &box); } list++; } } } /* * RootlessValidateTree * ValidateTree is modified in two ways: * - top-level windows don't clip each other * - windows aren't clipped against root. * These only matter when validating from the root. */ static int RootlessValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) { int result; RegionRec saveRoot; ScreenPtr pScreen = pParent->drawable.pScreen; SCREEN_UNWRAP(pScreen, ValidateTree); RL_DEBUG_MSG("VALIDATETREE start "); // Use our custom version to validate from root if (IsRoot(pParent)) { RL_DEBUG_MSG("custom "); result = RootlessMiValidateTree(pParent, pChild, kind); } else { HUGE_ROOT(pParent); result = pScreen->ValidateTree(pParent, pChild, kind); NORMAL_ROOT(pParent); } SCREEN_WRAP(pScreen, ValidateTree); RL_DEBUG_MSG("VALIDATETREE end\n"); return result; } /* * RootlessMarkOverlappedWindows * MarkOverlappedWindows is modified to ignore overlapping * top-level windows. */ static Bool RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) { RegionRec saveRoot; Bool result; ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_UNWRAP(pScreen, MarkOverlappedWindows); RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS start "); HUGE_ROOT(pWin); if (IsRoot(pWin)) { // root - mark nothing RL_DEBUG_MSG("is root not marking "); result = FALSE; } else if (!IsTopLevel(pWin)) { // not top-level window - mark normally result = pScreen->MarkOverlappedWindows(pWin, pFirst, ppLayerWin); } else { //top-level window - mark children ONLY - NO overlaps with sibs (?) // This code copied from miMarkOverlappedWindows() register WindowPtr pChild; Bool anyMarked = FALSE; MarkWindowProcPtr MarkWindow = pScreen->MarkWindow; RL_DEBUG_MSG("is top level! "); /* single layered systems are easy */ if (ppLayerWin) *ppLayerWin = pWin; if (pWin == pFirst) { /* Blindly mark pWin and all of its inferiors. This is a slight * overkill if there are mapped windows that outside pWin's border, * but it's better than wasting time on RectIn checks. */ pChild = pWin; while (1) { if (pChild->viewable) { if (RegionBroken(&pChild->winSize)) SetWinSize(pChild); if (RegionBroken(&pChild->borderSize)) SetBorderSize(pChild); (*MarkWindow) (pChild); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } anyMarked = TRUE; } if (anyMarked) (*MarkWindow) (pWin->parent); result = anyMarked; } NORMAL_ROOT(pWin); SCREEN_WRAP(pScreen, MarkOverlappedWindows); RL_DEBUG_MSG("MARKOVERLAPPEDWINDOWS end\n"); return result; } static void expose_1(WindowPtr pWin) { WindowPtr pChild; if (!pWin->realized) return; pWin->drawable.pScreen->PaintWindow(pWin, &pWin->borderClip, PW_BACKGROUND); /* FIXME: comments in windowstr.h indicate that borderClip doesn't include subwindow visibility. But I'm not so sure.. so we may be exposing too much.. */ miSendExposures(pWin, &pWin->borderClip, pWin->drawable.x, pWin->drawable.y); for (pChild = pWin->firstChild; pChild != NULL; pChild = pChild->nextSib) expose_1(pChild); } void RootlessScreenExpose(ScreenPtr pScreen) { expose_1(pScreen->root); } ColormapPtr RootlessGetColormap(ScreenPtr pScreen) { RootlessScreenRec *s = SCREENREC(pScreen); return s->colormap; } static void RootlessInstallColormap(ColormapPtr pMap) { ScreenPtr pScreen = pMap->pScreen; RootlessScreenRec *s = SCREENREC(pScreen); SCREEN_UNWRAP(pScreen, InstallColormap); if (s->colormap != pMap) { s->colormap = pMap; s->colormap_changed = TRUE; RootlessQueueRedisplay(pScreen); } pScreen->InstallColormap(pMap); SCREEN_WRAP(pScreen, InstallColormap); } static void RootlessUninstallColormap(ColormapPtr pMap) { ScreenPtr pScreen = pMap->pScreen; RootlessScreenRec *s = SCREENREC(pScreen); SCREEN_UNWRAP(pScreen, UninstallColormap); if (s->colormap == pMap) s->colormap = NULL; pScreen->UninstallColormap(pMap); SCREEN_WRAP(pScreen, UninstallColormap); } static void RootlessStoreColors(ColormapPtr pMap, int ndef, xColorItem * pdef) { ScreenPtr pScreen = pMap->pScreen; RootlessScreenRec *s = SCREENREC(pScreen); SCREEN_UNWRAP(pScreen, StoreColors); if (s->colormap == pMap && ndef > 0) { s->colormap_changed = TRUE; RootlessQueueRedisplay(pScreen); } pScreen->StoreColors(pMap, ndef, pdef); SCREEN_WRAP(pScreen, StoreColors); } static CARD32 RootlessRedisplayCallback(OsTimerPtr timer, CARD32 time, void *arg) { RootlessScreenRec *screenRec = arg; if (!screenRec->redisplay_queued) { /* No update needed. Stop the timer. */ screenRec->redisplay_timer_set = FALSE; return 0; } screenRec->redisplay_queued = FALSE; /* Mark that we should redisplay before waiting for I/O next time */ screenRec->redisplay_expired = TRUE; /* Reinstall the timer immediately, so we get as close to our redisplay interval as possible. */ return ROOTLESS_REDISPLAY_DELAY; } /* * RootlessQueueRedisplay * Queue a redisplay after a timer delay to ensure we do not redisplay * too frequently. */ void RootlessQueueRedisplay(ScreenPtr pScreen) { RootlessScreenRec *screenRec = SCREENREC(pScreen); screenRec->redisplay_queued = TRUE; if (screenRec->redisplay_timer_set) return; screenRec->redisplay_timer = TimerSet(screenRec->redisplay_timer, 0, ROOTLESS_REDISPLAY_DELAY, RootlessRedisplayCallback, screenRec); screenRec->redisplay_timer_set = TRUE; } /* * RootlessBlockHandler * If the redisplay timer has expired, flush drawing before blocking * on select(). */ static void RootlessBlockHandler(void *pbdata, void *ptimeout) { ScreenPtr pScreen = pbdata; RootlessScreenRec *screenRec = SCREENREC(pScreen); if (screenRec->redisplay_expired) { screenRec->redisplay_expired = FALSE; RootlessRedisplayScreen(pScreen); } } static void RootlessWakeupHandler(void *data, int result) { // nothing here } static Bool RootlessAllocatePrivates(ScreenPtr pScreen) { RootlessScreenRec *s; if (!dixRegisterPrivateKey (&rootlessGCPrivateKeyRec, PRIVATE_GC, sizeof(RootlessGCRec))) return FALSE; if (!dixRegisterPrivateKey(&rootlessScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&rootlessWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!dixRegisterPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; s = malloc(sizeof(RootlessScreenRec)); if (!s) return FALSE; SETSCREENREC(pScreen, s); s->pixmap_data = NULL; s->pixmap_data_size = 0; s->redisplay_timer = NULL; s->redisplay_timer_set = FALSE; return TRUE; } static void RootlessWrap(ScreenPtr pScreen) { RootlessScreenRec *s = SCREENREC(pScreen); #define WRAP(a) \ if (pScreen->a) { \ s->a = pScreen->a; \ } else { \ RL_DEBUG_MSG("null screen fn " #a "\n"); \ s->a = NULL; \ } \ pScreen->a = Rootless##a WRAP(CreateScreenResources); WRAP(CloseScreen); WRAP(CreateGC); WRAP(CopyWindow); WRAP(PaintWindow); WRAP(GetImage); WRAP(SourceValidate); WRAP(CreateWindow); WRAP(DestroyWindow); WRAP(RealizeWindow); WRAP(UnrealizeWindow); WRAP(MoveWindow); WRAP(PositionWindow); WRAP(ResizeWindow); WRAP(RestackWindow); WRAP(ReparentWindow); WRAP(ChangeBorderWidth); WRAP(MarkOverlappedWindows); WRAP(ValidateTree); WRAP(ChangeWindowAttributes); WRAP(InstallColormap); WRAP(UninstallColormap); WRAP(StoreColors); WRAP(SetShape); { // Composite and Glyphs don't use normal screen wrapping PictureScreenPtr ps = GetPictureScreen(pScreen); s->Composite = ps->Composite; ps->Composite = RootlessComposite; s->Glyphs = ps->Glyphs; ps->Glyphs = RootlessGlyphs; } // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? #undef WRAP } /* * RootlessInit * Called by the rootless implementation to initialize the rootless layer. * Rootless wraps lots of stuff and needs a bunch of devPrivates. */ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs) { RootlessScreenRec *s; if (!RootlessAllocatePrivates(pScreen)) return FALSE; s = SCREENREC(pScreen); s->imp = procs; s->colormap = NULL; s->redisplay_expired = FALSE; RootlessWrap(pScreen); if (!RegisterBlockAndWakeupHandlers(RootlessBlockHandler, RootlessWakeupHandler, (void *) pScreen)) { return FALSE; } return TRUE; } void RootlessUpdateRooted(Bool state) { int i; if (!state) { for (i = 0; i < screenInfo.numScreens; i++) RootlessDisableRoot(screenInfo.screens[i]); } else { for (i = 0; i < screenInfo.numScreens; i++) RootlessEnableRoot(screenInfo.screens[i]); } } xorg-server-21.1.16/miext/rootless/rootlessValTree.c0000644000175000017500000004612414757411105016143 /* * Calculate window clip lists for rootless mode * * This file is very closely based on mivaltree.c. */ /* * mivaltree.c -- * Functions for recalculating window clip lists. Main function * is miValidateTree. * Copyright 1987, 1988, 1989, 1998 The Open Group All Rights Reserved. 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, 1988, 1989 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. * ******************************************************************/ /* The panoramix components contained the following notice */ /***************************************************************** 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. ******************************************************************/ /* * Aug '86: Susan Angebranndt -- original code * July '87: Adam de Boor -- substantially modified and commented * Summer '89: Joel McCormack -- so fast you wouldn't believe it possible. * In particular, much improved code for window mapping and * circulating. * Bob Scheifler -- avoid miComputeClips for unmapped windows, * valdata changes */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* For NULL */ #include #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" #include "mi.h" #include "regionstr.h" #include "mivalidate.h" #include "globals.h" int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind); #define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \ HasBorder(w) && \ (w)->backgroundState == ParentRelative) /* *----------------------------------------------------------------------- * RootlessComputeClips -- * Recompute the clipList, borderClip, exposed and borderExposed * regions for pParent and its children. Only viewable windows are * taken into account. * * Results: * None. * * Side Effects: * clipList, borderClip, exposed and borderExposed are altered. * A VisibilityNotify event may be generated on the parent window. * *----------------------------------------------------------------------- */ static void RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen, RegionPtr universe, VTKind kind, RegionPtr exposed) { int dx, dy; RegionRec childUniverse; register WindowPtr pChild; int oldVis, newVis; BoxRec borderSize; RegionRec childUnion; Bool overlap; RegionPtr borderVisible; /* * Figure out the new visibility of this window. * The extent of the universe should be the same as the extent of * the borderSize region. If the window is unobscured, this rectangle * will be completely inside the universe (the universe will cover it * completely). If the window is completely obscured, none of the * universe will cover the rectangle. */ borderSize.x1 = pParent->drawable.x - wBorderWidth(pParent); borderSize.y1 = pParent->drawable.y - wBorderWidth(pParent); dx = (int) pParent->drawable.x + (int) pParent->drawable.width + wBorderWidth(pParent); if (dx > 32767) dx = 32767; borderSize.x2 = dx; dy = (int) pParent->drawable.y + (int) pParent->drawable.height + wBorderWidth(pParent); if (dy > 32767) dy = 32767; borderSize.y2 = dy; oldVis = pParent->visibility; switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnPART: newVis = VisibilityPartiallyObscured; { RegionPtr pBounding; if ((pBounding = wBoundingShape(pParent))) { switch (miShapedWindowIn(universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) { case rgnIN: newVis = VisibilityUnobscured; break; case rgnOUT: newVis = VisibilityFullyObscured; break; } } } break; default: newVis = VisibilityFullyObscured; break; } pParent->visibility = newVis; if (oldVis != newVis && ((pParent-> eventMask | wOtherEventMasks(pParent)) & VisibilityChangeMask)) SendVisibilityNotify(pParent); dx = pParent->drawable.x - pParent->valdata->before.oldAbsCorner.x; dy = pParent->drawable.y - pParent->valdata->before.oldAbsCorner.y; /* * avoid computations when dealing with simple operations */ switch (kind) { case VTMap: case VTStack: case VTUnmap: break; case VTMove: if ((oldVis == newVis) && ((oldVis == VisibilityFullyObscured) || (oldVis == VisibilityUnobscured))) { pChild = pParent; while (1) { if (pChild->viewable) { if (pChild->visibility != VisibilityFullyObscured) { RegionTranslate(&pChild->borderClip, dx, dy); RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pChild, dx, dy); } if (pChild->valdata) { RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { RegionSubtract(&pChild->valdata->after. borderExposed, &pChild->borderClip, &pChild->winSize); } RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pParent)) pChild = pChild->parent; if (pChild == pParent) break; pChild = pChild->nextSib; } return; } /* fall through */ default: /* * To calculate exposures correctly, we have to translate the old * borderClip and clipList regions to the window's new location so there * is a correspondence between pieces of the new and old clipping regions. */ if (dx || dy) { /* * We translate the old clipList because that will be exposed or copied * if gravity is right. */ RegionTranslate(&pParent->borderClip, dx, dy); RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: RegionEmpty(&pParent->borderClip); RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; RegionNull(&pParent->valdata->after.borderExposed); RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do * the border exposure first... * * 'universe' is the window's borderClip. To figure the exposures, remove * the area that used to be exposed from the new. * This leaves a region of pieces that weren't exposed before. */ if (HasBorder(pParent)) { if (borderVisible) { /* * when the border changes shape, the old visible portions * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ RegionSubtract(exposed, universe, borderVisible); RegionDestroy(borderVisible); } else { RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) { RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); } else { RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); } RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure * that no child overlaps the parent's border, we remove the parent's * border from the universe before proceeding. */ RegionIntersect(universe, universe, &pParent->winSize); } else RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { RegionNull(&childUniverse); RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) { for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable) RegionAppend(&childUnion, &pChild->borderSize); } } else { for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable) RegionAppend(&childUnion, &pChild->borderSize); } } RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->viewable) { /* * If the child is viewable, we want to remove its extents * from the current universe, but we only re-clip it if * it's been marked. */ if (pChild->valdata) { /* * Figure out the new universe from the child's * perspective and recurse. */ RegionIntersect(&childUniverse, universe, &pChild->borderSize); RootlessComputeClips(pChild, pScreen, &childUniverse, kind, exposed); } /* * Once the child has been processed, we remove its extents * from the current universe, thus denying its space to any * other sibling. */ if (overlap) RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) RegionSubtract(universe, universe, &childUnion); RegionUninit(&childUnion); RegionUninit(&childUniverse); } /* if any children */ /* * 'universe' now contains the new clipList for the parent window. * * To figure the exposure of the window we subtract the old clip from the * new, just as for the border. */ if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } /* HACK ALERT - copying contents of regions, instead of regions */ { RegionRec tmp; tmp = pParent->clipList; pParent->clipList = *universe; *universe = tmp; } #ifdef NOTDEF RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, dx, dy); } static void RootlessTreeObscured(WindowPtr pParent) { register WindowPtr pChild; register int oldVis; pChild = pParent; while (1) { if (pChild->viewable) { oldVis = pChild->visibility; if (oldVis != (pChild->visibility = VisibilityFullyObscured) && ((pChild-> eventMask | wOtherEventMasks(pChild)) & VisibilityChangeMask)) SendVisibilityNotify(pChild); if (pChild->firstChild) { pChild = pChild->firstChild; continue; } } while (!pChild->nextSib && (pChild != pParent)) pChild = pChild->parent; if (pChild == pParent) break; pChild = pChild->nextSib; } } /* *----------------------------------------------------------------------- * RootlessMiValidateTree -- * Recomputes the clip list for pParent and all its inferiors. * * Results: * Always returns 1. * * Side Effects: * The clipList, borderClip, exposed, and borderExposed regions for * each marked window are altered. * * Notes: * This routine assumes that all affected windows have been marked * (valdata created) and their winSize and borderSize regions * adjusted to correspond to their new positions. The borderClip and * clipList regions should not have been touched. * * The top-most level is treated differently from all lower levels * because pParent is unchanged. For the top level, we merge the * regions taken up by the marked children back into the clipList * for pParent, thus forming a region from which the marked children * can claim their areas. For lower levels, where the old clipList * and borderClip are invalid, we can't do this and have to do the * extra operations done in miComputeClips, but this is much faster * e.g. when only one child has moved... * *----------------------------------------------------------------------- */ /* Quartz version: used for validate from root in rootless mode. We need to make sure top-level windows don't clip each other, and that top-level windows aren't clipped to the root window. */ /*ARGSUSED*/ // fixme this is ugly // Xprint/ValTree.c doesn't work, but maybe that method can? int RootlessMiValidateTree(WindowPtr pRoot, /* Parent to validate */ WindowPtr pChild, /* First child of pRoot that was * affected */ VTKind kind /* What kind of configuration caused call */ ) { RegionRec childClip; /* The new borderClip for the current * child */ RegionRec exposed; /* For intermediate calculations */ register ScreenPtr pScreen; register WindowPtr pWin; pScreen = pRoot->drawable.pScreen; if (pChild == NullWindow) pChild = pRoot->firstChild; RegionNull(&childClip); RegionNull(&exposed); if (RegionBroken(&pRoot->clipList) && !RegionBroken(&pRoot->borderClip)) { // fixme this might not work, but hopefully doesn't happen anyway. kind = VTBroken; RegionNull(&pRoot->clipList); ErrorF("ValidateTree: BUSTED!\n"); } /* * Recursively compute the clips for all children of the root. * They don't clip against each other or the root itself, so * childClip is always reset to that child's size. */ for (pWin = pChild; pWin != NullWindow; pWin = pWin->nextSib) { if (pWin->viewable) { if (pWin->valdata) { RegionCopy(&childClip, &pWin->borderSize); RootlessComputeClips(pWin, pScreen, &childClip, kind, &exposed); } else if (pWin->visibility == VisibilityNotViewable) { RootlessTreeObscured(pWin); } } else { if (pWin->valdata) { RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pWin, 0, 0); RegionEmpty(&pWin->borderClip); pWin->valdata = NULL; } } } RegionUninit(&childClip); /* The root is never clipped by its children, so nothing on the root is ever exposed by moving or mapping its children. */ RegionNull(&pRoot->valdata->after.exposed); RegionNull(&pRoot->valdata->after.borderExposed); return 1; } xorg-server-21.1.16/miext/rootless/rootlessWindow.c0000644000175000017500000014307714757411105016055 /* * Rootless window management */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. * Copyright (c) 2002 Apple Computer, Inc. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* For NULL */ #include /* For CHAR_BIT */ #include #include #ifdef __APPLE__ #include #include "mi.h" #include "pixmapstr.h" #include "windowstr.h" //#include extern int darwinMainScreenX, darwinMainScreenY; extern Bool no_configure_window; #endif #include "fb.h" #include "rootlessCommon.h" #include "rootlessWindow.h" #define SCREEN_TO_GLOBAL_X \ (pScreen->x + rootlessGlobalOffsetX) #define SCREEN_TO_GLOBAL_Y \ (pScreen->y + rootlessGlobalOffsetY) #define DEFINE_ATOM_HELPER(func,atom_name) \ static Atom func (void) { \ static unsigned int generation = 0; \ static Atom atom; \ if (generation != serverGeneration) { \ generation = serverGeneration; \ atom = MakeAtom (atom_name, strlen (atom_name), TRUE); \ } \ return atom; \ } DEFINE_ATOM_HELPER(xa_native_window_id, "_NATIVE_WINDOW_ID") static Bool windows_hidden; // TODO - abstract xp functions #ifdef __APPLE__ // XXX: identical to x_cvt_vptr_to_uint ? #define MAKE_WINDOW_ID(x) ((xp_window_id)((size_t)(x))) void RootlessNativeWindowStateChanged(WindowPtr pWin, unsigned int state) { RootlessWindowRec *winRec; if (pWin == NULL) return; winRec = WINREC(pWin); if (winRec == NULL) return; winRec->is_offscreen = ((state & XP_WINDOW_STATE_OFFSCREEN) != 0); winRec->is_obscured = ((state & XP_WINDOW_STATE_OBSCURED) != 0); pWin->unhittable = winRec->is_offscreen; } void RootlessNativeWindowMoved(WindowPtr pWin) { xp_box bounds; int sx, sy, err; XID vlist[2]; Mask mask; ClientPtr pClient; RootlessWindowRec *winRec; winRec = WINREC(pWin); if (xp_get_window_bounds(MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; sx = pWin->drawable.pScreen->x + darwinMainScreenX; sy = pWin->drawable.pScreen->y + darwinMainScreenY; /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ vlist[0] = (INT16) bounds.x1 - sx; vlist[1] = (INT16) bounds.y1 - sy; mask = CWX | CWY; /* pretend we're the owner of the window! */ err = dixLookupClient(&pClient, pWin->drawable.id, serverClient, DixUnknownAccess); if (err != Success) { ErrorF("RootlessNativeWindowMoved(): Failed to lookup window: 0x%x\n", (unsigned int) pWin->drawable.id); return; } /* Don't want to do anything to the physical window (avoids notification-response feedback loops) */ no_configure_window = TRUE; ConfigureWindow(pWin, mask, vlist, pClient); no_configure_window = FALSE; } #endif /* __APPLE__ */ /* * RootlessCreateWindow * For now, don't create a physical window until either the window is * realized, or we really need it (e.g. to attach VRAM surfaces to). * Do reset the window size so it's not clipped by the root window. */ Bool RootlessCreateWindow(WindowPtr pWin) { Bool result; RegionRec saveRoot; SETWINREC(pWin, NULL); dixSetPrivate(&pWin->devPrivates, rootlessWindowOldPixmapPrivateKey, NULL); SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow); if (!IsRoot(pWin)) { /* win/border size set by DIX, not by wrapped CreateWindow, so correct it here. Don't HUGE_ROOT when pWin is the root! */ HUGE_ROOT(pWin); SetWinSize(pWin); SetBorderSize(pWin); } result = pWin->drawable.pScreen->CreateWindow(pWin); if (pWin->parent) { NORMAL_ROOT(pWin); } SCREEN_WRAP(pWin->drawable.pScreen, CreateWindow); return result; } /* * RootlessDestroyFrame * Destroy the physical window associated with the given window. */ static void RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec) { SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid); free(winRec); SETWINREC(pWin, NULL); } /* * RootlessDestroyWindow * Destroy the physical window associated with the given window. */ Bool RootlessDestroyWindow(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); Bool result; if (winRec != NULL) { RootlessDestroyFrame(pWin, winRec); } SCREEN_UNWRAP(pWin->drawable.pScreen, DestroyWindow); result = pWin->drawable.pScreen->DestroyWindow(pWin); SCREEN_WRAP(pWin->drawable.pScreen, DestroyWindow); return result; } static Bool RootlessGetShape(WindowPtr pWin, RegionPtr pShape) { if (wBoundingShape(pWin) == NULL) return FALSE; /* wBoundingShape is relative to *inner* origin of window. Translate by borderWidth to get the outside-relative position. */ RegionNull(pShape); RegionCopy(pShape, wBoundingShape(pWin)); RegionTranslate(pShape, pWin->borderWidth, pWin->borderWidth); return TRUE; } /* * RootlessReshapeFrame * Set the frame shape. */ static void RootlessReshapeFrame(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); RegionRec newShape; RegionPtr pShape; // If the window is not yet framed, do nothing if (winRec == NULL) return; if (IsRoot(pWin)) return; RootlessStopDrawing(pWin, FALSE); pShape = RootlessGetShape(pWin, &newShape) ? &newShape : NULL; #ifdef ROOTLESSDEBUG RL_DEBUG_MSG("reshaping..."); if (pShape != NULL) { RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", RegionNumRects(&newShape), newShape.extents.x1, newShape.extents.y1, newShape.extents.x2, newShape.extents.y2); } else { RL_DEBUG_MSG("no shape "); } #endif SCREENREC(pWin->drawable.pScreen)->imp->ReshapeFrame(winRec->wid, pShape); if (pShape != NULL) RegionUninit(&newShape); } /* * RootlessSetShape * Shape is usually set before a window is mapped and the window will * not have a frame associated with it. In this case, the frame will be * shaped when the window is framed. */ void RootlessSetShape(WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_UNWRAP(pScreen, SetShape); pScreen->SetShape(pWin, kind); SCREEN_WRAP(pScreen, SetShape); RootlessReshapeFrame(pWin); } /* Disallow ParentRelative background on top-level windows because the root window doesn't really have the right background. */ Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask) { Bool result; ScreenPtr pScreen = pWin->drawable.pScreen; RL_DEBUG_MSG("change window attributes start "); SCREEN_UNWRAP(pScreen, ChangeWindowAttributes); result = pScreen->ChangeWindowAttributes(pWin, vmask); SCREEN_WRAP(pScreen, ChangeWindowAttributes); if (WINREC(pWin)) { // disallow ParentRelative background state if (pWin->backgroundState == ParentRelative) { XID pixel = 0; ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); } } RL_DEBUG_MSG("change window attributes end\n"); return result; } /* * RootlessPositionWindow * This is a hook for when DIX moves or resizes a window. * Update the frame position now although the physical window is moved * in RootlessMoveWindow. (x, y) are *inside* position. After this, * mi and fb are expecting the pixmap to be at the new location. */ Bool RootlessPositionWindow(WindowPtr pWin, int x, int y) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec = WINREC(pWin); Bool result; RL_DEBUG_MSG("positionwindow start (win 0x%x @ %i, %i)\n", pWin, x, y); if (winRec) { if (winRec->is_drawing) { // Reset frame's pixmap and move it to the new position. int bw = wBorderWidth(pWin); winRec->pixmap->devPrivate.ptr = winRec->pixelData; SetPixmapBaseToScreen(winRec->pixmap, x - bw, y - bw); } } SCREEN_UNWRAP(pScreen, PositionWindow); result = pScreen->PositionWindow(pWin, x, y); SCREEN_WRAP(pScreen, PositionWindow); RL_DEBUG_MSG("positionwindow end\n"); return result; } /* * RootlessInitializeFrame * Initialize some basic attributes of the frame. Note that winRec * may already have valid data in it, so don't overwrite anything * valuable. */ static void RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec * winRec) { DrawablePtr d = &pWin->drawable; int bw = wBorderWidth(pWin); winRec->win = pWin; winRec->x = d->x - bw; winRec->y = d->y - bw; winRec->width = d->width + 2 * bw; winRec->height = d->height + 2 * bw; winRec->borderWidth = bw; } /* * RootlessEnsureFrame * Make sure the given window is framed. If the window doesn't have a * physical window associated with it, attempt to create one. If that * is unsuccessful, return NULL. */ static RootlessWindowRec * RootlessEnsureFrame(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec; RegionRec shape; RegionPtr pShape = NULL; if (WINREC(pWin) != NULL) return WINREC(pWin); if (!IsTopLevel(pWin) && !IsRoot(pWin)) return NULL; if (pWin->drawable.class != InputOutput) return NULL; winRec = malloc(sizeof(RootlessWindowRec)); if (!winRec) return NULL; RootlessInitializeFrame(pWin, winRec); winRec->is_drawing = FALSE; winRec->is_reorder_pending = FALSE; winRec->pixmap = NULL; winRec->wid = NULL; winRec->level = 0; SETWINREC(pWin, winRec); // Set the frame's shape if the window is shaped if (RootlessGetShape(pWin, &shape)) pShape = &shape; RL_DEBUG_MSG("creating frame "); if (!SCREENREC(pScreen)->imp->CreateFrame(winRec, pScreen, winRec->x + SCREEN_TO_GLOBAL_X, winRec->y + SCREEN_TO_GLOBAL_Y, pShape)) { RL_DEBUG_MSG("implementation failed to create frame!\n"); free(winRec); SETWINREC(pWin, NULL); return NULL; } if (pWin->drawable.depth == 8) RootlessFlushWindowColormap(pWin); if (pShape != NULL) RegionUninit(&shape); return winRec; } /* * RootlessRealizeWindow * The frame is usually created here and not in CreateWindow so that * windows do not eat memory until they are realized. */ Bool RootlessRealizeWindow(WindowPtr pWin) { Bool result; RegionRec saveRoot; ScreenPtr pScreen = pWin->drawable.pScreen; RL_DEBUG_MSG("realizewindow start (win 0x%x) ", pWin); if ((IsTopLevel(pWin) && pWin->drawable.class == InputOutput)) { RootlessWindowRec *winRec; winRec = RootlessEnsureFrame(pWin); if (winRec == NULL) return FALSE; winRec->is_reorder_pending = TRUE; RL_DEBUG_MSG("Top level window "); // Disallow ParentRelative background state on top-level windows. // This might have been set before the window was mapped. if (pWin->backgroundState == ParentRelative) { XID pixel = 0; ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); } } if (!IsRoot(pWin)) HUGE_ROOT(pWin); SCREEN_UNWRAP(pScreen, RealizeWindow); result = pScreen->RealizeWindow(pWin); SCREEN_WRAP(pScreen, RealizeWindow); if (!IsRoot(pWin)) NORMAL_ROOT(pWin); RL_DEBUG_MSG("realizewindow end\n"); return result; } /* * RootlessFrameForWindow * Returns the frame ID for the physical window displaying the given window. * If CREATE is true and the window has no frame, attempt to create one. */ RootlessFrameID RootlessFrameForWindow(WindowPtr pWin, Bool create) { WindowPtr pTopWin; RootlessWindowRec *winRec; pTopWin = TopLevelParent(pWin); if (pTopWin == NULL) return NULL; winRec = WINREC(pTopWin); if (winRec == NULL && create && pWin->drawable.class == InputOutput) { winRec = RootlessEnsureFrame(pTopWin); } if (winRec == NULL) return NULL; return winRec->wid; } /* * RootlessUnrealizeWindow * Unmap the physical window. */ Bool RootlessUnrealizeWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec = WINREC(pWin); Bool result; RL_DEBUG_MSG("unrealizewindow start "); if (winRec) { RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->UnmapFrame(winRec->wid); winRec->is_reorder_pending = FALSE; } SCREEN_UNWRAP(pScreen, UnrealizeWindow); result = pScreen->UnrealizeWindow(pWin); SCREEN_WRAP(pScreen, UnrealizeWindow); RL_DEBUG_MSG("unrealizewindow end\n"); return result; } /* * RootlessReorderWindow * Reorder the frame associated with the given window so that it's * physically above the window below it in the X stacking order. */ void RootlessReorderWindow(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); if (pWin->realized && winRec != NULL && !winRec->is_reorder_pending && !windows_hidden) { WindowPtr newPrevW; RootlessWindowRec *newPrev; RootlessFrameID newPrevID; ScreenPtr pScreen = pWin->drawable.pScreen; /* Check if the implementation wants the frame to not be reordered even though the X11 window is restacked. This can be useful if frames are ordered-in with animation so that the reordering is not done until the animation is complete. */ if (SCREENREC(pScreen)->imp->DoReorderWindow) { if (!SCREENREC(pScreen)->imp->DoReorderWindow(winRec)) return; } RootlessStopDrawing(pWin, FALSE); /* Find the next window above this one that has a mapped frame. * Only include cases where the windows are in the same category of * hittability to ensure offscreen windows don't get restacked * relative to onscreen ones (but that the offscreen ones maintain * their stacking order if they are explicitly asked to Reorder). */ newPrevW = pWin->prevSib; while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized || newPrevW->unhittable != pWin->unhittable)) newPrevW = newPrevW->prevSib; newPrev = newPrevW != NULL ? WINREC(newPrevW) : NULL; newPrevID = newPrev != NULL ? newPrev->wid : 0; /* If it exists, reorder the frame above us first. */ if (newPrev && newPrev->is_reorder_pending) { newPrev->is_reorder_pending = FALSE; RootlessReorderWindow(newPrevW); } SCREENREC(pScreen)->imp->RestackFrame(winRec->wid, newPrevID); } } /* * RootlessRestackWindow * This is a hook for when DIX changes the window stacking order. * The window has already been inserted into its new position in the * DIX window stack. We need to change the order of the physical * window to match. */ void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib) { RegionRec saveRoot; RootlessWindowRec *winRec = WINREC(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; RL_DEBUG_MSG("restackwindow start "); if (winRec) RL_DEBUG_MSG("restack top level \n"); HUGE_ROOT(pWin); SCREEN_UNWRAP(pScreen, RestackWindow); if (pScreen->RestackWindow) pScreen->RestackWindow(pWin, pOldNextSib); SCREEN_WRAP(pScreen, RestackWindow); NORMAL_ROOT(pWin); if (winRec && pWin->viewable) { RootlessReorderWindow(pWin); } RL_DEBUG_MSG("restackwindow end\n"); } /* * Specialized window copy procedures */ // Globals needed during window resize and move. static void *gResizeDeathBits = NULL; static int gResizeDeathCount = 0; static PixmapPtr gResizeDeathPix[2] = { NULL, NULL }; static BoxRec gResizeDeathBounds[2]; static CopyWindowProcPtr gResizeOldCopyWindowProc = NULL; /* * RootlessNoCopyWindow * CopyWindow() that doesn't do anything. For MoveWindow() of * top-level windows. */ static void RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { // some code expects the region to be translated int dx = ptOldOrg.x - pWin->drawable.x; int dy = ptOldOrg.y - pWin->drawable.y; RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); RegionTranslate(prgnSrc, -dx, -dy); } /* * RootlessResizeCopyWindow * CopyWindow used during ResizeWindow for gravity moves. Based on * fbCopyWindow. The original always draws on the root pixmap, which * we don't have. Instead, draw on the parent window's pixmap. * Resize version: the old location's pixels are in gResizeCopyWindowSource. */ static void RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; RegionRec rgnDst; int dx, dy; RL_DEBUG_MSG("resizecopywindowFB start (win 0x%x) ", pWin); /* Don't unwrap pScreen->CopyWindow. The bogus rewrap with RootlessCopyWindow causes a crash if CopyWindow is called again during the same resize. */ if (gResizeDeathCount == 0) return; RootlessStartDrawing(pWin); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; RegionTranslate(prgnSrc, -dx, -dy); RegionNull(&rgnDst); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); if (gResizeDeathCount == 1) { /* Simple case, we only have a single source pixmap. */ miCopyRegion(&gResizeDeathPix[0]->drawable, &pScreen->GetWindowPixmap(pWin)->drawable, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); } else { int i; RegionRec clip, clipped; /* More complex case, N source pixmaps (usually two). So we intersect the destination with each source and copy those bits. */ for (i = 0; i < gResizeDeathCount; i++) { RegionInit(&clip, gResizeDeathBounds + 0, 1); RegionNull(&clipped); RegionIntersect(&rgnDst, &clip, &clipped); miCopyRegion(&gResizeDeathPix[i]->drawable, &pScreen->GetWindowPixmap(pWin)->drawable, 0, &clipped, dx, dy, fbCopyWindowProc, 0, 0); RegionUninit(&clipped); RegionUninit(&clip); } } /* Don't update - resize will update everything */ RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); RL_DEBUG_MSG("resizecopywindowFB end\n"); } /* * RootlessCopyWindow * Update *new* location of window. Old location is redrawn with * PaintWindow. Cloned from fbCopyWindow. * The original always draws on the root pixmap, which we don't have. * Instead, draw on the parent window's pixmap. */ void RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; RegionRec rgnDst; int dx, dy; BoxPtr extents; int area; RL_DEBUG_MSG("copywindowFB start (win 0x%x) ", pWin); SCREEN_UNWRAP(pScreen, CopyWindow); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; RegionTranslate(prgnSrc, -dx, -dy); RegionNull(&rgnDst); RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); extents = RegionExtents(&rgnDst); area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1); /* If the area exceeds threshold, use the implementation's accelerated version. */ if (area > rootless_CopyWindow_threshold && SCREENREC(pScreen)->imp->CopyWindow) { RootlessWindowRec *winRec; WindowPtr top; top = TopLevelParent(pWin); if (top == NULL) { RL_DEBUG_MSG("no parent\n"); goto out; } winRec = WINREC(top); if (winRec == NULL) { RL_DEBUG_MSG("not framed\n"); goto out; } /* Move region to window local coords */ RegionTranslate(&rgnDst, -winRec->x, -winRec->y); RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->CopyWindow(winRec->wid, RegionNumRects(&rgnDst), RegionRects(&rgnDst), dx, dy); } else { RootlessStartDrawing(pWin); miCopyRegion((DrawablePtr) pWin, (DrawablePtr) pWin, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); /* prgnSrc has been translated to dst position */ RootlessDamageRegion(pWin, prgnSrc); } out: RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); SCREEN_WRAP(pScreen, CopyWindow); RL_DEBUG_MSG("copywindowFB end\n"); } void RootlessPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) { ScreenPtr pScreen = pWin->drawable.pScreen; if (IsFramedWindow(pWin)) { RootlessStartDrawing(pWin); RootlessDamageRegion(pWin, prgn); if (pWin->backgroundState == ParentRelative) { if ((what == PW_BACKGROUND) || (what == PW_BORDER && !pWin->borderIsPixel)) RootlessSetPixmapOfAncestors(pWin); } } SCREEN_UNWRAP(pScreen, PaintWindow); pScreen->PaintWindow(pWin, prgn, what); SCREEN_WRAP(pScreen, PaintWindow); } /* * Window resize procedures */ enum { WIDTH_SMALLER = 1, HEIGHT_SMALLER = 2, }; /* * ResizeWeighting * Choose gravity to avoid local copies. Do that by looking for * a corner that doesn't move _relative to the screen_. */ static inline unsigned int ResizeWeighting(int oldX1, int oldY1, int oldX2, int oldY2, int oldBW, int newX1, int newY1, int newX2, int newY2, int newBW) { #ifdef ROOTLESS_RESIZE_GRAVITY if (newBW != oldBW) return RL_GRAVITY_NONE; if (newX1 == oldX1 && newY1 == oldY1) return RL_GRAVITY_NORTH_WEST; else if (newX1 == oldX1 && newY2 == oldY2) return RL_GRAVITY_SOUTH_WEST; else if (newX2 == oldX2 && newY2 == oldY2) return RL_GRAVITY_SOUTH_EAST; else if (newX2 == oldX2 && newY1 == oldY1) return RL_GRAVITY_NORTH_EAST; else return RL_GRAVITY_NONE; #else return RL_GRAVITY_NONE; #endif } /* * StartFrameResize * Prepare to resize a top-level window. The old window's pixels are * saved and the implementation is told to change the window size. * (x,y,w,h) is outer frame of window (outside border) */ static Bool StartFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY, int oldW, int oldH, int oldBW, int newX, int newY, int newW, int newH, int newBW) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec = WINREC(pWin); Bool need_window_source = FALSE, resize_after = FALSE; BoxRec rect; int oldX2, newX2; int oldY2, newY2; unsigned int weight; oldX2 = oldX + oldW, newX2 = newX + newW; oldY2 = oldY + oldH, newY2 = newY + newH; /* Decide which resize weighting to use */ weight = ResizeWeighting(oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); /* Compute intersection between old and new rects */ rect.x1 = max(oldX, newX); rect.y1 = max(oldY, newY); rect.x2 = min(oldX2, newX2); rect.y2 = min(oldY2, newY2); RL_DEBUG_MSG("RESIZE TOPLEVEL WINDOW with gravity %i ", gravity); RL_DEBUG_MSG("%d %d %d %d %d %d %d %d %d %d\n", oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); RootlessRedisplay(pWin); /* If gravity is true, then we need to have a way of recovering all the original bits in the window for when X rearranges the contents based on the various gravity settings. The obvious way is to just snapshot the entire backing store before resizing it, but that it slow on large windows. So the optimization here is to use the implementation's resize weighting options (if available) to allow us to reason about what is left in the backing store after the resize. We can then only copy what won't be there after the resize, and do a two-stage copy operation. Most of these optimizations are only applied when the top-left corner of the window is fixed, since that's the common case. They could probably be extended with some thought. */ gResizeDeathCount = 0; if (gravity && weight == RL_GRAVITY_NORTH_WEST) { unsigned int code = 0; /* Top left corner is anchored. We never need to copy the entire window. */ need_window_source = TRUE; /* These comparisons were chosen to avoid setting bits when the sizes are the same. (So the fastest case automatically gets taken when dimensions are unchanging.) */ if (newW < oldW) code |= WIDTH_SMALLER; if (newH < oldH) code |= HEIGHT_SMALLER; if (((code ^ (code >> 1)) & 1) == 0) { /* Both dimensions are either getting larger, or both are getting smaller. No need to copy anything. */ if (code == (WIDTH_SMALLER | HEIGHT_SMALLER)) { /* Since the window is getting smaller, we can do gravity repair on it with its current size, then resize it afterwards. */ resize_after = TRUE; } gResizeDeathCount = 1; } else { unsigned int copy_rowbytes, Bpp; unsigned int copy_rect_width, copy_rect_height; BoxRec copy_rect; /* We can get away with a partial copy. 'rect' is the intersection between old and new bounds, so copy everything to the right of or below the intersection. */ RootlessStartDrawing(pWin); if (code == WIDTH_SMALLER) { copy_rect.x1 = rect.x2; copy_rect.y1 = rect.y1; copy_rect.x2 = oldX2; copy_rect.y2 = oldY2; } else if (code == HEIGHT_SMALLER) { copy_rect.x1 = rect.x1; copy_rect.y1 = rect.y2; copy_rect.x2 = oldX2; copy_rect.y2 = oldY2; } else OsAbort(); Bpp = winRec->win->drawable.bitsPerPixel / 8; copy_rect_width = copy_rect.x2 - copy_rect.x1; copy_rect_height = copy_rect.y2 - copy_rect.y1; copy_rowbytes = ((copy_rect_width * Bpp) + 31) & ~31; gResizeDeathBits = xallocarray(copy_rowbytes, copy_rect_height); if (copy_rect_width * copy_rect_height > rootless_CopyBytes_threshold && SCREENREC(pScreen)->imp->CopyBytes) { SCREENREC(pScreen)->imp->CopyBytes(copy_rect_width * Bpp, copy_rect_height, ((char *) winRec->pixelData) + ((copy_rect.y1 - oldY) * winRec->bytesPerRow) + (copy_rect.x1 - oldX) * Bpp, winRec->bytesPerRow, gResizeDeathBits, copy_rowbytes); } else { fbBlt((FbBits *) (winRec->pixelData + ((copy_rect.y1 - oldY) * winRec->bytesPerRow) + (copy_rect.x1 - oldX) * Bpp), winRec->bytesPerRow / sizeof(FbBits), 0, (FbBits *) gResizeDeathBits, copy_rowbytes / sizeof(FbBits), 0, copy_rect_width * Bpp, copy_rect_height, GXcopy, FB_ALLONES, Bpp, 0, 0); } gResizeDeathBounds[1] = copy_rect; gResizeDeathPix[1] = GetScratchPixmapHeader(pScreen, copy_rect_width, copy_rect_height, winRec->win->drawable.depth, winRec->win->drawable.bitsPerPixel, winRec->bytesPerRow, (void *) gResizeDeathBits); SetPixmapBaseToScreen(gResizeDeathPix[1], copy_rect.x1, copy_rect.y1); gResizeDeathCount = 2; } } else if (gravity) { /* The general case. Just copy everything. */ RootlessStartDrawing(pWin); gResizeDeathBits = xallocarray(winRec->bytesPerRow, winRec->height); memcpy(gResizeDeathBits, winRec->pixelData, winRec->bytesPerRow * winRec->height); gResizeDeathBounds[0] = (BoxRec) { oldX, oldY, oldX2, oldY2}; gResizeDeathPix[0] = GetScratchPixmapHeader(pScreen, winRec->width, winRec->height, winRec->win->drawable.depth, winRec->win->drawable.bitsPerPixel, winRec->bytesPerRow, (void *) gResizeDeathBits); SetPixmapBaseToScreen(gResizeDeathPix[0], oldX, oldY); gResizeDeathCount = 1; } RootlessStopDrawing(pWin, FALSE); winRec->x = newX; winRec->y = newY; winRec->width = newW; winRec->height = newH; winRec->borderWidth = newBW; /* Unless both dimensions are getting smaller, Resize the frame before doing gravity repair */ if (!resize_after) { SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, newX + SCREEN_TO_GLOBAL_X, newY + SCREEN_TO_GLOBAL_Y, newW, newH, weight); } RootlessStartDrawing(pWin); /* If necessary, create a source pixmap pointing at the current window bits. */ if (need_window_source) { gResizeDeathBounds[0] = (BoxRec) { oldX, oldY, oldX2, oldY2}; gResizeDeathPix[0] = GetScratchPixmapHeader(pScreen, oldW, oldH, winRec->win->drawable.depth, winRec->win->drawable.bitsPerPixel, winRec->bytesPerRow, winRec->pixelData); SetPixmapBaseToScreen(gResizeDeathPix[0], oldX, oldY); } /* Use custom CopyWindow when moving gravity bits around ResizeWindow assumes the old window contents are in the same pixmap, but here they're in deathPix instead. */ if (gravity) { gResizeOldCopyWindowProc = pScreen->CopyWindow; pScreen->CopyWindow = RootlessResizeCopyWindow; } /* If we can't rely on the window server preserving the bits we need in the position we need, copy the pixels in the intersection from src to dst. ResizeWindow assumes these pixels are already present when making gravity adjustments. pWin currently has new-sized pixmap but is in old position. FIXME: border width change! (?) */ if (gravity && weight == RL_GRAVITY_NONE) { PixmapPtr src, dst; assert(gResizeDeathCount == 1); src = gResizeDeathPix[0]; dst = pScreen->GetWindowPixmap(pWin); RL_DEBUG_MSG("Resize copy rect %d %d %d %d\n", rect.x1, rect.y1, rect.x2, rect.y2); /* rect is the intersection of the old location and new location */ if (BOX_NOT_EMPTY(rect) && src != NULL && dst != NULL) { /* The window drawable still has the old frame position, which means that DST doesn't actually point at the origin of our physical backing store when adjusted by the drawable.x,y position. So sneakily adjust it temporarily while copying.. */ ((PixmapPtr) dst)->devPrivate.ptr = winRec->pixelData; SetPixmapBaseToScreen(dst, newX, newY); fbCopyWindowProc(&src->drawable, &dst->drawable, NULL, &rect, 1, 0, 0, FALSE, FALSE, 0, 0); ((PixmapPtr) dst)->devPrivate.ptr = winRec->pixelData; SetPixmapBaseToScreen(dst, oldX, oldY); } } return resize_after; } static void FinishFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY, unsigned int oldW, unsigned int oldH, unsigned int oldBW, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int newBW, Bool resize_now) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec = WINREC(pWin); int i; RootlessStopDrawing(pWin, FALSE); if (resize_now) { unsigned int weight; /* We didn't resize anything earlier, so do it now, now that we've finished gravitating the bits. */ weight = ResizeWeighting(oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, newX + SCREEN_TO_GLOBAL_X, newY + SCREEN_TO_GLOBAL_Y, newW, newH, weight); } /* Redraw everything. FIXME: there must be times when we don't need to do this. Perhaps when top-left weighting and no gravity? */ RootlessDamageRect(pWin, -newBW, -newBW, newW, newH); for (i = 0; i < 2; i++) { if (gResizeDeathPix[i] != NULL) { FreeScratchPixmapHeader(gResizeDeathPix[i]); gResizeDeathPix[i] = NULL; } } free(gResizeDeathBits); gResizeDeathBits = NULL; if (gravity) { pScreen->CopyWindow = gResizeOldCopyWindowProc; } } /* * RootlessMoveWindow * If kind==VTOther, window border is resizing (and borderWidth is * already changed!!@#$) This case works like window resize, not move. */ void RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) { RootlessWindowRec *winRec = WINREC(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; CopyWindowProcPtr oldCopyWindowProc = NULL; int oldX = 0, oldY = 0, newX = 0, newY = 0; unsigned int oldW = 0, oldH = 0, oldBW = 0; unsigned int newW = 0, newH = 0, newBW = 0; Bool resize_after = FALSE; RegionRec saveRoot; RL_DEBUG_MSG("movewindow start \n"); if (winRec) { if (kind == VTMove) { oldX = winRec->x; oldY = winRec->y; RootlessRedisplay(pWin); RootlessStartDrawing(pWin); } else { RL_DEBUG_MSG("movewindow border resizing "); oldBW = winRec->borderWidth; oldX = winRec->x; oldY = winRec->y; oldW = winRec->width; oldH = winRec->height; newBW = wBorderWidth(pWin); newX = x; newY = y; newW = pWin->drawable.width + 2 * newBW; newH = pWin->drawable.height + 2 * newBW; resize_after = StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); } } HUGE_ROOT(pWin); SCREEN_UNWRAP(pScreen, MoveWindow); if (winRec) { oldCopyWindowProc = pScreen->CopyWindow; pScreen->CopyWindow = RootlessNoCopyWindow; } pScreen->MoveWindow(pWin, x, y, pSib, kind); if (winRec) { pScreen->CopyWindow = oldCopyWindowProc; } NORMAL_ROOT(pWin); SCREEN_WRAP(pScreen, MoveWindow); if (winRec) { if (kind == VTMove) { winRec->x = x; winRec->y = y; RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->MoveFrame(winRec->wid, pScreen, x + SCREEN_TO_GLOBAL_X, y + SCREEN_TO_GLOBAL_Y); } else { FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW, resize_after); } } RL_DEBUG_MSG("movewindow end\n"); } /* * RootlessResizeWindow * Note: (x, y, w, h) as passed to this procedure don't match the frame * definition. (x,y) is corner of very outer edge, *outside* border. * w,h is width and height *inside* border, *ignoring* border width. * The rect (x, y, w, h) doesn't mean anything. (x, y, w+2*bw, h+2*bw) * is total rect and (x+bw, y+bw, w, h) is inner rect. */ void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib) { RootlessWindowRec *winRec = WINREC(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; int oldX = 0, oldY = 0, newX = 0, newY = 0; unsigned int oldW = 0, oldH = 0, oldBW = 0, newW = 0, newH = 0, newBW = 0; Bool resize_after = FALSE; RegionRec saveRoot; RL_DEBUG_MSG("resizewindow start (win 0x%x) ", pWin); if (pWin->parent) { if (winRec) { oldBW = winRec->borderWidth; oldX = winRec->x; oldY = winRec->y; oldW = winRec->width; oldH = winRec->height; newBW = oldBW; newX = x; newY = y; newW = w + 2 * newBW; newH = h + 2 * newBW; resize_after = StartFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); } HUGE_ROOT(pWin); SCREEN_UNWRAP(pScreen, ResizeWindow); pScreen->ResizeWindow(pWin, x, y, w, h, pSib); SCREEN_WRAP(pScreen, ResizeWindow); NORMAL_ROOT(pWin); if (winRec) { FinishFrameResize(pWin, TRUE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW, resize_after); } } else { /* Special case for resizing the root window */ BoxRec box; pWin->drawable.x = x; pWin->drawable.y = y; pWin->drawable.width = w; pWin->drawable.height = h; box.x1 = x; box.y1 = y; box.x2 = x + w; box.y2 = y + h; RegionUninit(&pWin->winSize); RegionInit(&pWin->winSize, &box, 1); RegionCopy(&pWin->borderSize, &pWin->winSize); RegionCopy(&pWin->clipList, &pWin->winSize); RegionCopy(&pWin->borderClip, &pWin->winSize); if (winRec) { SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, x + SCREEN_TO_GLOBAL_X, y + SCREEN_TO_GLOBAL_Y, w, h, RL_GRAVITY_NONE); } miSendExposures(pWin, &pWin->borderClip, pWin->drawable.x, pWin->drawable.y); } RL_DEBUG_MSG("resizewindow end\n"); } /* * RootlessRepositionWindow * Called by the implementation when a window needs to be repositioned to * its correct location on the screen. This routine is typically needed * due to changes in the underlying window system, such as a screen layout * change. */ void RootlessRepositionWindow(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; if (winRec == NULL) return; RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->MoveFrame(winRec->wid, pScreen, winRec->x + SCREEN_TO_GLOBAL_X, winRec->y + SCREEN_TO_GLOBAL_Y); RootlessReorderWindow(pWin); } /* * RootlessReparentWindow * Called after a window has been reparented. Generally windows are not * framed until they are mapped. However, a window may be framed early by the * implementation calling RootlessFrameForWindow. (e.g. this could be needed * to attach a VRAM surface to it.) If the window is subsequently reparented * by the window manager before being mapped, we need to give the frame to * the new top-level window. */ void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) { ScreenPtr pScreen = pWin->drawable.pScreen; RootlessWindowRec *winRec = WINREC(pWin); WindowPtr pTopWin; /* Check that window is not top-level now, but used to be. */ if (IsRoot(pWin) || IsRoot(pWin->parent) || IsTopLevel(pWin) || winRec == NULL) { goto out; } /* If the formerly top-level window has a frame, we want to give the frame to its new top-level parent. If we can't do that, we'll just have to jettison it... */ pTopWin = TopLevelParent(pWin); assert(pTopWin != pWin); pWin->unhittable = FALSE; DeleteProperty(serverClient, pWin, xa_native_window_id()); if (WINREC(pTopWin) != NULL) { /* We're screwed. */ RootlessDestroyFrame(pWin, winRec); } else { if (!pTopWin->realized && pWin->realized) { SCREENREC(pScreen)->imp->UnmapFrame(winRec->wid); } /* Switch the frame record from one to the other. */ SETWINREC(pWin, NULL); SETWINREC(pTopWin, winRec); RootlessInitializeFrame(pTopWin, winRec); RootlessReshapeFrame(pTopWin); SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, winRec->x + SCREEN_TO_GLOBAL_X, winRec->y + SCREEN_TO_GLOBAL_Y, winRec->width, winRec->height, RL_GRAVITY_NONE); if (SCREENREC(pScreen)->imp->SwitchWindow) { SCREENREC(pScreen)->imp->SwitchWindow(winRec, pWin); } if (pTopWin->realized && !pWin->realized) winRec->is_reorder_pending = TRUE; } out: if (SCREENREC(pScreen)->ReparentWindow) { SCREEN_UNWRAP(pScreen, ReparentWindow); pScreen->ReparentWindow(pWin, pPriorParent); SCREEN_WRAP(pScreen, ReparentWindow); } } void RootlessFlushWindowColormap(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); ScreenPtr pScreen = pWin->drawable.pScreen; if (winRec == NULL) return; RootlessStopDrawing(pWin, FALSE); if (SCREENREC(pScreen)->imp->UpdateColormap) SCREENREC(pScreen)->imp->UpdateColormap(winRec->wid, pScreen); } /* * RootlessChangeBorderWidth * FIXME: untested! * pWin inside corner stays the same; pWin->drawable.[xy] stays the same * Frame moves and resizes. */ void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) { RegionRec saveRoot; Bool resize_after = FALSE; RL_DEBUG_MSG("change border width "); if (width != wBorderWidth(pWin)) { RootlessWindowRec *winRec = WINREC(pWin); int oldX = 0, oldY = 0, newX = 0, newY = 0; unsigned int oldW = 0, oldH = 0, oldBW = 0; unsigned int newW = 0, newH = 0, newBW = 0; if (winRec) { oldBW = winRec->borderWidth; oldX = winRec->x; oldY = winRec->y; oldW = winRec->width; oldH = winRec->height; newBW = width; newX = pWin->drawable.x - newBW; newY = pWin->drawable.y - newBW; newW = pWin->drawable.width + 2 * newBW; newH = pWin->drawable.height + 2 * newBW; resize_after = StartFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW); } HUGE_ROOT(pWin); SCREEN_UNWRAP(pWin->drawable.pScreen, ChangeBorderWidth); pWin->drawable.pScreen->ChangeBorderWidth(pWin, width); SCREEN_WRAP(pWin->drawable.pScreen, ChangeBorderWidth); NORMAL_ROOT(pWin); if (winRec) { FinishFrameResize(pWin, FALSE, oldX, oldY, oldW, oldH, oldBW, newX, newY, newW, newH, newBW, resize_after); } } RL_DEBUG_MSG("change border width end\n"); } /* * RootlessOrderAllWindows * Brings all X11 windows to the top of the window stack * (i.e in front of Aqua windows) -- called when X11.app is given focus */ void RootlessOrderAllWindows(Bool include_unhitable) { int i; WindowPtr pWin; if (windows_hidden) return; RL_DEBUG_MSG("RootlessOrderAllWindows() "); for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i] == NULL) continue; pWin = screenInfo.screens[i]->root; if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { if (!pWin->realized) continue; if (RootlessEnsureFrame(pWin) == NULL) continue; if (!include_unhitable && pWin->unhittable) continue; RootlessReorderWindow(pWin); } } RL_DEBUG_MSG("RootlessOrderAllWindows() done"); } void RootlessEnableRoot(ScreenPtr pScreen) { WindowPtr pRoot; pRoot = pScreen->root; RootlessEnsureFrame(pRoot); (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE); RootlessReorderWindow(pRoot); } void RootlessDisableRoot(ScreenPtr pScreen) { WindowPtr pRoot; RootlessWindowRec *winRec; pRoot = pScreen->root; winRec = WINREC(pRoot); if (NULL == winRec) return; RootlessDestroyFrame(pRoot, winRec); DeleteProperty(serverClient, pRoot, xa_native_window_id()); } void RootlessHideAllWindows(void) { int i; ScreenPtr pScreen; WindowPtr pWin; RootlessWindowRec *winRec; if (windows_hidden) return; windows_hidden = TRUE; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; if (pScreen == NULL) continue; pWin = pScreen->root; if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { if (!pWin->realized) continue; RootlessStopDrawing(pWin, FALSE); winRec = WINREC(pWin); if (winRec != NULL) { if (SCREENREC(pScreen)->imp->HideWindow) SCREENREC(pScreen)->imp->HideWindow(winRec->wid); } } } } void RootlessShowAllWindows(void) { int i; ScreenPtr pScreen; WindowPtr pWin; RootlessWindowRec *winRec; if (!windows_hidden) return; windows_hidden = FALSE; for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; if (pScreen == NULL) continue; pWin = pScreen->root; if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { if (!pWin->realized) continue; winRec = RootlessEnsureFrame(pWin); if (winRec == NULL) continue; RootlessReorderWindow(pWin); } RootlessScreenExpose(pScreen); } } /* * SetPixmapOfAncestors * Set the Pixmaps on all ParentRelative windows up the ancestor chain. */ void RootlessSetPixmapOfAncestors(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr topWin = TopLevelParent(pWin); RootlessWindowRec *topWinRec = WINREC(topWin); while (pWin->backgroundState == ParentRelative) { if (pWin == topWin) { // disallow ParentRelative background state on top level XID pixel = 0; ChangeWindowAttributes(pWin, CWBackPixel, &pixel, serverClient); RL_DEBUG_MSG("Cleared ParentRelative on 0x%x.\n", pWin); break; } pWin = pWin->parent; pScreen->SetWindowPixmap(pWin, topWinRec->pixmap); } } xorg-server-21.1.16/miext/rootless/README.txt0000644000175000017500000003265714757411105014346 Generic Rootless Layer Version 1.0 July 13, 2004 Torrey T. Lyons torrey@xfree86.org Introduction The generic rootless layer allows an X server to be implemented on top of another window server in a cooperative manner. This allows the X11 windows and native windows of the underlying window server to coexist on the same screen. The layer is called "rootless" because the root window of the X server is generally not drawn. Instead, each top-level child of the root window is represented as a separate on-screen window by the underlying window server. The layer is referred to as "generic" because it abstracts away the details of the underlying window system and contains code that is useful for any rootless X server. The code for the generic rootless layer is located in xc/programs/Xserver/miext/rootless. To build a complete rootless X server requires a specific rootless implementation, which provides functions that allow the generic rootless layer to interact with the underlying window system. Concepts In the context of a rootless X server the term window is used to mean many fundamentally different things. For X11 a window is a DDX resource that describes a visible, or potentially visible, rectangle on the screen. A top-level window is a direct child of the root window. To avoid confusion, an on-screen native window of the underlying window system is referred to as a "frame". The generic rootless layer associates each mapped top-level X11 window with a frame. An X11 window may be said to be "framed" if it or its top-level parent is represented by a frame. The generic rootless layer models each frame as being backed at all times by a backing buffer, which is periodically flushed to the screen. If the underlying window system does not provide a backing buffer for frames, this must be done by the rootless implementation. The generic rootless layer model does not assume it always has access to the frames' backing buffers. Any drawing to the buffer will be proceeded by a call to the rootless implementation's StartDrawing() function and StopDrawing() will be called when the drawing is concluded. The address of the frame's backing buffer is returned by the StartDrawing() function and it can change between successive calls. Because each frame is assumed to have a backing buffer, the generic rootless layer will stop Expose events being generated when the regions of visibility of a frame change on screen. This is similar to backing store, but backing buffers are different in that they always store a copy of the entire window contents, not just the obscured portions. The price paid in increased memory consumption is made up by the greatly decreased complexity in not having to track and record regions as they are obscured. Rootless Implementation The specifics of the underlying window system are provided to the generic rootless layer through rootless implementation functions, compile- time options, and runtime parameters. The rootless implementation functions are a list of functions that allow the generic rootless layer to perform operations such as creating, destroying, moving, and resizing frames. Some of the implementation functions are optional. A detailed description of the rootless implementation functions is provided in Appendix A. By design, a rootless implementation should only have to include the rootless.h header file. The rootlessCommon.h file contains definitions internal to the generic rootless layer. (If you find you need to use rootlessCommon.h in your implementation, let the generic rootless layer maintainers know. This could be an area where the generic rootless layer should be generalized.) A rootless implementation should also modify rootlessConfig.h to specify compile time options for its platform. The following compile-time options are defined in rootlessConfig.h: o ROOTLESS_PROTECT_ALPHA: By default for a color bit depth of 24 and 32 bits per pixel, fb will overwrite the "unused" 8 bits to optimize drawing speed. If this is true, the alpha channel of frames is protected and is not modified when drawing to them. The bits containing the alpha channel are defined by the macro RootlessAlphaMask(bpp), which should return a bit mask for various bits per pixel. o ROOTLESS_REDISPLAY_DELAY: Time in milliseconds between updates to the underlying window server. Most operations will be buffered until this time has expired. o ROOTLESS_RESIZE_GRAVITY: If the underlying window system supports it, some frame resizes can be optimized by relying on the frame contents maintaining a particular gravity during the resize. In this way less of the frame contents need to be preserved by the generic rootless layer. If true, the generic rootless layer will pass gravity hints during resizing and rely on the frame contents being preserved accordingly. The following runtime options are defined in rootless.h: o rootlessGlobalOffsetX, rootlessGlobalOffsetY: These specify the global offset that is applied to all screens when converting from screen-local to global coordinates. o rootless_CopyBytes_threshold, rootless_CopyWindow_threshold: The minimum number of bytes or pixels for which to use the rootless implementation's respective acceleration function. The rootless acceleration functions are all optional so these will only be used if the respective acceleration function pointer is not NULL. Accelerated Drawing The rootless implementation typically does not have direct access to the hardware. Its access to the graphics hardware is generally through the API of the underlying window system. This underlying API may not overlap well with the X11 drawing primitives. The generic rootless layer falls back to using fb for all its 2-D drawing. Providing optional rootless implementation acceleration functions can accelerate some graphics primitives and some window functions. Typically calling through to the underlying window systems API will not speed up these operations for small enough areas. The rootless_*_threshold runtime options allow the rootless implementation to provide hints for when the acceleration functions should be used instead of fb. Alpha Channel Protection If the bits per pixel is greater then the color bit depth, the contents of the extra bits are undefined by the X11 protocol. Some window systems will use these extra bits as an alpha channel. The generic rootless layer can be configured to protect these bits and make sure they are not modified by other parts of the X server. To protect the alpha channel ROOTLESS_PROTECT_ALPHA and RootlessAlphaMask(bpp) must be set appropriately as described under the compile time options. This ensures that the X11 graphics primitives do not overwrite the alpha channel in an attempt to optimize drawing. In addition, the window functions PaintWindow() and Composite() must be replaced by alpha channel safe variants. These are provided in rootless/safeAlpha. Credits The generic rootless layer was originally conceived and developed by Greg Parker as part of the XDarwin X server on Mac OS X. John Harper made later optimizations to this code but removed its generic independence of the underlying window system. Torrey T. Lyons reintroduced the generic abstractions and made the rootless code suitable for use by other X servers. Appendix A: Rootless Implementation Functions The rootless implementation functions are defined in rootless.h. It is intended that rootless.h contains the complete interface that is needed by rootless implementations. The definitions contained in rootlessCommon.h are intended for internal use by the generic rootless layer and are more likely to change. Most of these functions take a RootlessFrameID as a parameter. The RootlessFrameID is an opaque object that is returned by the implementation's CreateFrame() function. The generic rootless layer does not use this frame id other than to pass it back to the rootless implementation to indicate the frame to operate on. /* * Create a new frame. * The frame is created unmapped. * * pFrame RootlessWindowPtr for this frame should be completely * initialized before calling except for pFrame->wid, which * is set by this function. * pScreen Screen on which to place the new frame * newX, newY Position of the frame. * pNewShape Shape for the frame (in frame-local coordinates). NULL for * unshaped frames. */ typedef Bool (*RootlessCreateFrameProc) (RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY, RegionPtr pNewShape); /* * Destroy a frame. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id */ typedef void (*RootlessDestroyFrameProc) (RootlessFrameID wid); /* * Move a frame on screen. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id * pScreen Screen to move the new frame to * newX, newY New position of the frame */ typedef void (*RootlessMoveFrameProc) (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY); /* * Resize and move a frame. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id * pScreen Screen to move the new frame to * newX, newY New position of the frame * newW, newH New size of the frame * gravity Gravity for window contents (rl_gravity_enum). This is always * RL_GRAVITY_NONE unless ROOTLESS_RESIZE_GRAVITY is set. */ typedef void (*RootlessResizeFrameProc) (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int gravity); /* * Change frame ordering (AKA stacking, layering). * Drawing is stopped before this is called. Unmapped frames are mapped by * setting their ordering. * * wid Frame id * nextWid Frame id of frame that is now above this one or NULL if this * frame is at the top. */ typedef void (*RootlessRestackFrameProc) (RootlessFrameID wid, RootlessFrameID nextWid); /* * Change frame's shape. * Drawing is stopped before this is called. * * wid Frame id * pNewShape New shape for the frame (in frame-local coordinates) * or NULL if now unshaped. */ typedef void (*RootlessReshapeFrameProc) (RootlessFrameID wid, RegionPtr pNewShape); /* * Unmap a frame. * * wid Frame id */ typedef void (*RootlessUnmapFrameProc) (RootlessFrameID wid); /* * Start drawing to a frame. * Prepare a frame for direct access to its backing buffer. * * wid Frame id * pixelData Address of the backing buffer (returned) * bytesPerRow Width in bytes of the backing buffer (returned) */ typedef void (*RootlessStartDrawingProc) (RootlessFrameID wid, char **pixelData, int *bytesPerRow); /* * Stop drawing to a frame. * No drawing to the frame's backing buffer will occur until drawing * is started again. * * wid Frame id * flush Flush drawing updates for this frame to the screen. */ typedef void (*RootlessStopDrawingProc) (RootlessFrameID wid, Bool flush); /* * Flush drawing updates to the screen. * Drawing is stopped before this is called. * * wid Frame id * pDamage Region containing all the changed pixels in frame-local * coordinates. This is clipped to the window's clip. */ typedef void (*RootlessUpdateRegionProc) (RootlessFrameID wid, RegionPtr pDamage); /* * Mark damaged rectangles as requiring redisplay to screen. * * wid Frame id * nrects Number of damaged rectangles * rects Array of damaged rectangles in frame-local coordinates * shift_x, Vector to shift rectangles by * shift_y */ typedef void (*RootlessDamageRectsProc) (RootlessFrameID wid, int nrects, const BoxRec *rects, int shift_x, int shift_y); /* * Switch the window associated with a frame. (Optional) * When a framed window is reparented, the frame is resized and set to * use the new top-level parent. If defined this function will be called * afterwards for implementation specific bookkeeping. * * pFrame Frame whose window has switched * oldWin Previous window wrapped by this frame */ typedef void (*RootlessSwitchWindowProc) (RootlessWindowPtr pFrame, WindowPtr oldWin); /* * Copy bytes. (Optional) * Source and destinate may overlap and the right thing should happen. * * width Bytes to copy per row * height Number of rows * src Source data * srcRowBytes Width of source in bytes * dst Destination data * dstRowBytes Width of destination in bytes */ typedef void (*RootlessCopyBytesProc) (unsigned int width, unsigned int height, const void *src, unsigned int srcRowBytes, void *dst, unsigned int dstRowBytes); /* * Copy area in frame to another part of frame. (Optional) * * wid Frame id * dstNrects Number of rectangles to copy * dstRects Array of rectangles to copy * dx, dy Number of pixels away to copy area */ typedef void (*RootlessCopyWindowProc) (RootlessFrameID wid, int dstNrects, const BoxRec *dstRects, int dx, int dy); xorg-server-21.1.16/miext/rootless/rootless.h0000644000175000017500000002701414757411105014662 /* * External interface to generic rootless mode */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2003 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _ROOTLESS_H #define _ROOTLESS_H #include "rootlessConfig.h" #include "mi.h" #include "gcstruct.h" /* Each top-level rootless window has a one-to-one correspondence to a physical on-screen window. The physical window is referred to as a "frame". */ typedef void *RootlessFrameID; /* * RootlessWindowRec * This structure stores the per-frame data used by the rootless code. * Each top-level X window has one RootlessWindowRec associated with it. */ typedef struct _RootlessWindowRec { // Position and size includes the window border // Position is in per-screen coordinates int x, y; unsigned int width, height; unsigned int borderWidth; int level; RootlessFrameID wid; // implementation specific frame id WindowPtr win; // underlying X window // Valid only when drawing (ie. is_drawing is set) char *pixelData; int bytesPerRow; PixmapPtr pixmap; unsigned int is_drawing:1; // Currently drawing? unsigned int is_reorder_pending:1; unsigned int is_offscreen:1; unsigned int is_obscured:1; } RootlessWindowRec, *RootlessWindowPtr; /* Offset for screen-local to global coordinate transforms */ extern int rootlessGlobalOffsetX; extern int rootlessGlobalOffsetY; /* The minimum number of bytes or pixels for which to use the implementation's accelerated functions. */ extern unsigned int rootless_CopyBytes_threshold; extern unsigned int rootless_CopyWindow_threshold; /* Gravity for window contents during resizing */ enum rl_gravity_enum { RL_GRAVITY_NONE = 0, /* no gravity, fill everything */ RL_GRAVITY_NORTH_WEST = 1, /* anchor to top-left corner */ RL_GRAVITY_NORTH_EAST = 2, /* anchor to top-right corner */ RL_GRAVITY_SOUTH_EAST = 3, /* anchor to bottom-right corner */ RL_GRAVITY_SOUTH_WEST = 4, /* anchor to bottom-left corner */ }; /*------------------------------------------ Rootless Implementation Functions ------------------------------------------*/ /* * Create a new frame. * The frame is created unmapped. * * pFrame RootlessWindowPtr for this frame should be completely * initialized before calling except for pFrame->wid, which * is set by this function. * pScreen Screen on which to place the new frame * newX, newY Position of the frame. * pNewShape Shape for the frame (in frame-local coordinates). NULL for * unshaped frames. */ typedef Bool (*RootlessCreateFrameProc) (RootlessWindowPtr pFrame, ScreenPtr pScreen, int newX, int newY, RegionPtr pNewShape); /* * Destroy a frame. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id */ typedef void (*RootlessDestroyFrameProc) (RootlessFrameID wid); /* * Move a frame on screen. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id * pScreen Screen to move the new frame to * newX, newY New position of the frame */ typedef void (*RootlessMoveFrameProc) (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY); /* * Resize and move a frame. * Drawing is stopped and all updates are flushed before this is called. * * wid Frame id * pScreen Screen to move the new frame to * newX, newY New position of the frame * newW, newH New size of the frame * gravity Gravity for window contents (rl_gravity_enum). This is always * RL_GRAVITY_NONE unless ROOTLESS_RESIZE_GRAVITY is set. */ typedef void (*RootlessResizeFrameProc) (RootlessFrameID wid, ScreenPtr pScreen, int newX, int newY, unsigned int newW, unsigned int newH, unsigned int gravity); /* * Change frame ordering (AKA stacking, layering). * Drawing is stopped before this is called. Unmapped frames are mapped by * setting their ordering. * * wid Frame id * nextWid Frame id of frame that is now above this one or NULL if this * frame is at the top. */ typedef void (*RootlessRestackFrameProc) (RootlessFrameID wid, RootlessFrameID nextWid); /* * Change frame's shape. * Drawing is stopped before this is called. * * wid Frame id * pNewShape New shape for the frame (in frame-local coordinates) * or NULL if now unshaped. */ typedef void (*RootlessReshapeFrameProc) (RootlessFrameID wid, RegionPtr pNewShape); /* * Unmap a frame. * * wid Frame id */ typedef void (*RootlessUnmapFrameProc) (RootlessFrameID wid); /* * Start drawing to a frame. * Prepare a frame for direct access to its backing buffer. * * wid Frame id * pixelData Address of the backing buffer (returned) * bytesPerRow Width in bytes of the backing buffer (returned) */ typedef void (*RootlessStartDrawingProc) (RootlessFrameID wid, char **pixelData, int *bytesPerRow); /* * Stop drawing to a frame. * No drawing to the frame's backing buffer will occur until drawing * is started again. * * wid Frame id * flush Flush drawing updates for this frame to the screen. */ typedef void (*RootlessStopDrawingProc) (RootlessFrameID wid, Bool flush); /* * Flush drawing updates to the screen. * Drawing is stopped before this is called. * * wid Frame id * pDamage Region containing all the changed pixels in frame-lcoal * coordinates. This is clipped to the window's clip. */ typedef void (*RootlessUpdateRegionProc) (RootlessFrameID wid, RegionPtr pDamage); /* * Mark damaged rectangles as requiring redisplay to screen. * * wid Frame id * nrects Number of damaged rectangles * rects Array of damaged rectangles in frame-local coordinates * shift_x, Vector to shift rectangles by * shift_y */ typedef void (*RootlessDamageRectsProc) (RootlessFrameID wid, int nrects, const BoxRec * rects, int shift_x, int shift_y); /* * Switch the window associated with a frame. (Optional) * When a framed window is reparented, the frame is resized and set to * use the new top-level parent. If defined this function will be called * afterwards for implementation specific bookkeeping. * * pFrame Frame whose window has switched * oldWin Previous window wrapped by this frame */ typedef void (*RootlessSwitchWindowProc) (RootlessWindowPtr pFrame, WindowPtr oldWin); /* * Check if window should be reordered. (Optional) * The underlying window system may animate windows being ordered in. * We want them to be mapped but remain ordered out until the animation * completes. If defined this function will be called to check if a * framed window should be reordered now. If this function returns * FALSE, the window will still be mapped from the X11 perspective, but * the RestackFrame function will not be called for its frame. * * pFrame Frame to reorder */ typedef Bool (*RootlessDoReorderWindowProc) (RootlessWindowPtr pFrame); /* * Copy bytes. (Optional) * Source and destinate may overlap and the right thing should happen. * * width Bytes to copy per row * height Number of rows * src Source data * srcRowBytes Width of source in bytes * dst Destination data * dstRowBytes Width of destination in bytes */ typedef void (*RootlessCopyBytesProc) (unsigned int width, unsigned int height, const void *src, unsigned int srcRowBytes, void *dst, unsigned int dstRowBytes); /* * Copy area in frame to another part of frame. (Optional) * * wid Frame id * dstNrects Number of rectangles to copy * dstRects Array of rectangles to copy * dx, dy Number of pixels away to copy area */ typedef void (*RootlessCopyWindowProc) (RootlessFrameID wid, int dstNrects, const BoxRec * dstRects, int dx, int dy); typedef void (*RootlessHideWindowProc) (RootlessFrameID wid); typedef void (*RootlessUpdateColormapProc) (RootlessFrameID wid, ScreenPtr pScreen); /* * Rootless implementation function list */ typedef struct _RootlessFrameProcs { RootlessCreateFrameProc CreateFrame; RootlessDestroyFrameProc DestroyFrame; RootlessMoveFrameProc MoveFrame; RootlessResizeFrameProc ResizeFrame; RootlessRestackFrameProc RestackFrame; RootlessReshapeFrameProc ReshapeFrame; RootlessUnmapFrameProc UnmapFrame; RootlessStartDrawingProc StartDrawing; RootlessStopDrawingProc StopDrawing; RootlessUpdateRegionProc UpdateRegion; RootlessDamageRectsProc DamageRects; /* Optional frame functions */ RootlessSwitchWindowProc SwitchWindow; RootlessDoReorderWindowProc DoReorderWindow; RootlessHideWindowProc HideWindow; RootlessUpdateColormapProc UpdateColormap; /* Optional acceleration functions */ RootlessCopyBytesProc CopyBytes; RootlessCopyWindowProc CopyWindow; } RootlessFrameProcsRec, *RootlessFrameProcsPtr; /* * Initialize rootless mode on the given screen. */ Bool RootlessInit(ScreenPtr pScreen, RootlessFrameProcsPtr procs); /* * Return the frame ID for the physical window displaying the given window. * * create If true and the window has no frame, attempt to create one */ RootlessFrameID RootlessFrameForWindow(WindowPtr pWin, Bool create); /* * Return the top-level parent of a window. * The root is the top-level parent of itself, even though the root is * not otherwise considered to be a top-level window. */ WindowPtr TopLevelParent(WindowPtr pWindow); /* * Prepare a window for direct access to its backing buffer. */ void RootlessStartDrawing(WindowPtr pWindow); /* * Finish drawing to a window's backing buffer. * * flush If true, damaged areas are flushed to the screen. */ void RootlessStopDrawing(WindowPtr pWindow, Bool flush); /* * Allocate a new screen pixmap. * miCreateScreenResources does not do this properly with a null * framebuffer pointer. */ void RootlessUpdateScreenPixmap(ScreenPtr pScreen); /* * Reposition all windows on a screen to their correct positions. */ void RootlessRepositionWindows(ScreenPtr pScreen); /* * Bring all windows to the front of the native stack */ void RootlessOrderAllWindows(Bool include_unhitable); #endif /* _ROOTLESS_H */ xorg-server-21.1.16/miext/rootless/rootlessCommon.h0000644000175000017500000002376214757411105016041 /* * Common internal rootless definitions and code */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * Copyright (c) 2002-2004 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #ifndef _ROOTLESSCOMMON_H #define _ROOTLESSCOMMON_H #include "misc.h" #include "rootless.h" #include "fb.h" #include "scrnintstr.h" #include "picturestr.h" // Debug output, or not. #ifdef ROOTLESSDEBUG #define RL_DEBUG_MSG ErrorF #else #define RL_DEBUG_MSG(a, ...) #endif // Global variables extern DevPrivateKeyRec rootlessGCPrivateKeyRec; #define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec) extern DevPrivateKeyRec rootlessScreenPrivateKeyRec; #define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec) extern DevPrivateKeyRec rootlessWindowPrivateKeyRec; #define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec) extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec; #define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec) // RootlessGCRec: private per-gc data typedef struct { const GCFuncs *originalFuncs; const GCOps *originalOps; } RootlessGCRec; // RootlessScreenRec: per-screen private data typedef struct _RootlessScreenRec { // Rootless implementation functions RootlessFrameProcsPtr imp; // Wrapped screen functions CreateScreenResourcesProcPtr CreateScreenResources; CloseScreenProcPtr CloseScreen; CreateWindowProcPtr CreateWindow; DestroyWindowProcPtr DestroyWindow; RealizeWindowProcPtr RealizeWindow; UnrealizeWindowProcPtr UnrealizeWindow; MoveWindowProcPtr MoveWindow; ResizeWindowProcPtr ResizeWindow; RestackWindowProcPtr RestackWindow; ReparentWindowProcPtr ReparentWindow; ChangeBorderWidthProcPtr ChangeBorderWidth; PositionWindowProcPtr PositionWindow; ChangeWindowAttributesProcPtr ChangeWindowAttributes; PaintWindowProcPtr PaintWindow; CreateGCProcPtr CreateGC; CopyWindowProcPtr CopyWindow; GetImageProcPtr GetImage; SourceValidateProcPtr SourceValidate; MarkOverlappedWindowsProcPtr MarkOverlappedWindows; ValidateTreeProcPtr ValidateTree; SetShapeProcPtr SetShape; CompositeProcPtr Composite; GlyphsProcPtr Glyphs; InstallColormapProcPtr InstallColormap; UninstallColormapProcPtr UninstallColormap; StoreColorsProcPtr StoreColors; void *pixmap_data; unsigned int pixmap_data_size; ColormapPtr colormap; void *redisplay_timer; unsigned int redisplay_timer_set:1; unsigned int redisplay_queued:1; unsigned int redisplay_expired:1; unsigned int colormap_changed:1; } RootlessScreenRec, *RootlessScreenPtr; // "Definition of the Porting Layer for the X11 Sample Server" says // unwrap and rewrap of screen functions is unnecessary, but // screen->CreateGC changes after a call to cfbCreateGC. #define SCREEN_UNWRAP(screen, fn) \ screen->fn = SCREENREC(screen)->fn; #define SCREEN_WRAP(screen, fn) \ SCREENREC(screen)->fn = screen->fn; \ screen->fn = Rootless##fn // Accessors for screen and window privates #define SCREENREC(pScreen) ((RootlessScreenRec *) \ dixLookupPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey)) #define SETSCREENREC(pScreen, v) \ dixSetPrivate(&(pScreen)->devPrivates, rootlessScreenPrivateKey, v) #define WINREC(pWin) ((RootlessWindowRec *) \ dixLookupPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey)) #define SETWINREC(pWin, v) \ dixSetPrivate(&(pWin)->devPrivates, rootlessWindowPrivateKey, v) // Call a rootless implementation function. // Many rootless implementation functions are allowed to be NULL. #define CallFrameProc(pScreen, proc, params) \ if (SCREENREC(pScreen)->frameProcs.proc) { \ RL_DEBUG_MSG("calling frame proc " #proc " "); \ SCREENREC(pScreen)->frameProcs.proc params; \ } // BoxRec manipulators // Copied from shadowfb #define TRIM_BOX(box, pGC) { \ BoxPtr extents = &pGC->pCompositeClip->extents;\ if(box.x1 < extents->x1) box.x1 = extents->x1; \ if(box.x2 > extents->x2) box.x2 = extents->x2; \ if(box.y1 < extents->y1) box.y1 = extents->y1; \ if(box.y2 > extents->y2) box.y2 = extents->y2; \ } #define TRANSLATE_BOX(box, pDraw) { \ box.x1 += pDraw->x; \ box.x2 += pDraw->x; \ box.y1 += pDraw->y; \ box.y2 += pDraw->y; \ } #define TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC) { \ TRANSLATE_BOX(box, pDraw); \ TRIM_BOX(box, pGC); \ } #define BOX_NOT_EMPTY(box) \ (((box.x2 - box.x1) > 0) && ((box.y2 - box.y1) > 0)) // HUGE_ROOT and NORMAL_ROOT // We don't want to clip windows to the edge of the screen. // HUGE_ROOT temporarily makes the root window really big. // This is needed as a wrapper around any function that calls // SetWinSize or SetBorderSize which clip a window against its // parents, including the root. extern RegionRec rootlessHugeRoot; #define HUGE_ROOT(pWin) \ do { \ WindowPtr _w = pWin; \ while (_w->parent) \ _w = _w->parent; \ saveRoot = _w->winSize; \ _w->winSize = rootlessHugeRoot; \ } while (0) #define NORMAL_ROOT(pWin) \ do { \ WindowPtr _w = pWin; \ while (_w->parent) \ _w = _w->parent; \ _w->winSize = saveRoot; \ } while (0) // Returns TRUE if this window is a top-level window (i.e. child of the root) // The root is not a top-level window. #define IsTopLevel(pWin) \ ((pWin) && (pWin)->parent && !(pWin)->parent->parent) // Returns TRUE if this window is a root window #define IsRoot(pWin) \ ((pWin) == (pWin)->drawable.pScreen->root) /* * SetPixmapBaseToScreen * Move the given pixmap's base address to where pixel (0, 0) * would be if the pixmap's actual data started at (x, y). * Can't access the bits before the first word of the drawable's data in * rootless mode, so make sure our base address is always 32-bit aligned. */ #define SetPixmapBaseToScreen(pix, _x, _y) { \ PixmapPtr _pPix = (PixmapPtr) (pix); \ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ ((int)(_x) * _pPix->drawable.bitsPerPixel/8 + \ (int)(_y) * _pPix->devKind); \ if (_pPix->drawable.bitsPerPixel != FB_UNIT) { \ size_t _diff = ((size_t) _pPix->devPrivate.ptr) & \ (FB_UNIT / CHAR_BIT - 1); \ _pPix->devPrivate.ptr = (char *) (_pPix->devPrivate.ptr) - \ _diff; \ _pPix->drawable.x = _diff / \ (_pPix->drawable.bitsPerPixel / CHAR_BIT); \ } \ } // Returns TRUE if this window is visible inside a frame // (e.g. it is visible and has a top-level or root parent) Bool IsFramedWindow(WindowPtr pWin); // Routines that cause regions to get redrawn. // DamageRegion and DamageRect are in global coordinates. // DamageBox is in window-local coordinates. void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion); void RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h); void RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox); void RootlessRedisplay(WindowPtr pWindow); void RootlessRedisplayScreen(ScreenPtr pScreen); void RootlessQueueRedisplay(ScreenPtr pScreen); /* Return the colormap currently installed on the given screen. */ ColormapPtr RootlessGetColormap(ScreenPtr pScreen); /* Convert colormap to ARGB. */ Bool RootlessResolveColormap(ScreenPtr pScreen, int first_color, int n_colors, uint32_t * colors); void RootlessFlushWindowColormap(WindowPtr pWin); void RootlessFlushScreenColormaps(ScreenPtr pScreen); // Move a window to its proper location on the screen. void RootlessRepositionWindow(WindowPtr pWin); // Move the window to its correct place in the physical stacking order. void RootlessReorderWindow(WindowPtr pWin); void RootlessScreenExpose(ScreenPtr pScreen); void RootlessHideAllWindows(void); void RootlessShowAllWindows(void); void RootlessUpdateRooted(Bool state); void RootlessEnableRoot(ScreenPtr pScreen); void RootlessDisableRoot(ScreenPtr pScreen); void RootlessSetPixmapOfAncestors(WindowPtr pWin); #endif /* _ROOTLESSCOMMON_H */ xorg-server-21.1.16/miext/rootless/rootlessConfig.h0000644000175000017500000000370014757411105016004 /* * Platform specific rootless configuration */ /* * Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _ROOTLESSCONFIG_H #define _ROOTLESSCONFIG_H #ifdef __APPLE__ #define ROOTLESS_RESIZE_GRAVITY TRUE #endif /*# define ROOTLESSDEBUG*/ #define ROOTLESS_PROTECT_ALPHA TRUE #define ROOTLESS_REDISPLAY_DELAY 10 /* Bit mask for alpha channel with a particular number of bits per pixel. Note that we only care for 32bpp data. Mac OS X uses planar alpha for 16bpp. */ #define RootlessAlphaMask(bpp) ((bpp) == 32 ? 0xFF000000 : 0) #endif /* _ROOTLESSCONFIG_H */ xorg-server-21.1.16/miext/rootless/rootlessWindow.h0000644000175000017500000000517714757411105016060 /* * Rootless window management */ /* * Copyright (c) 2001 Greg Parker. All Rights Reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _ROOTLESSWINDOW_H #define _ROOTLESSWINDOW_H #include "rootlessCommon.h" Bool RootlessCreateWindow(WindowPtr pWin); Bool RootlessDestroyWindow(WindowPtr pWin); void RootlessSetShape(WindowPtr pWin, int kind); Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); Bool RootlessRealizeWindow(WindowPtr pWin); Bool RootlessUnrealizeWindow(WindowPtr pWin); void RootlessRestackWindow(WindowPtr pWin, WindowPtr pOldNextSib); void RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); void RootlessPaintWindow(WindowPtr pWin, RegionPtr prgn, int what); void RootlessMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind); void RootlessResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); void RootlessReparentWindow(WindowPtr pWin, WindowPtr pPriorParent); void RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width); #ifdef __APPLE__ void RootlessNativeWindowMoved(WindowPtr pWin); void RootlessNativeWindowStateChanged(WindowPtr pWin, unsigned int state); #endif #endif xorg-server-21.1.16/miext/shadow/0000755000175000017500000000000014757411133012327 5xorg-server-21.1.16/miext/shadow/meson.build0000644000175000017500000000145414757411105014414 srcs_miext_shadow = [ 'shadow.c', 'sh3224.c', 'shafb4.c', 'shafb8.c', 'shiplan2p4.c', 'shiplan2p8.c', 'shpacked.c', 'shplanar8.c', 'shplanar.c', 'shrot16pack_180.c', 'shrot16pack_270.c', 'shrot16pack_270YX.c', 'shrot16pack_90.c', 'shrot16pack_90YX.c', 'shrot16pack.c', 'shrot32pack_180.c', 'shrot32pack_270.c', 'shrot32pack_90.c', 'shrot32pack.c', 'shrot8pack_180.c', 'shrot8pack_270.c', 'shrot8pack_90.c', 'shrot8pack.c', 'shrotate.c', ] hdrs_miext_shadow = [ 'shadow.h', ] libxserver_miext_shadow = static_library('libxserver_miext_shadow', srcs_miext_shadow, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_miext_shadow, install_dir: xorgsdkdir) endif xorg-server-21.1.16/miext/shadow/Makefile.am0000644000175000017500000000114614757411105014304 noinst_LTLIBRARIES = libshadow.la AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = shadow.h endif libshadow_la_SOURCES = \ c2p_core.h \ shadow.c \ shadow.h \ sh3224.c \ shafb4.c \ shafb8.c \ shiplan2p4.c \ shiplan2p8.c \ shpacked.c \ shplanar8.c \ shplanar.c \ shrot16pack_180.c \ shrot16pack_270.c \ shrot16pack_270YX.c \ shrot16pack_90.c \ shrot16pack_90YX.c \ shrot16pack.c \ shrot32pack_180.c \ shrot32pack_270.c \ shrot32pack_90.c \ shrot32pack.c \ shrot8pack_180.c \ shrot8pack_270.c \ shrot8pack_90.c \ shrot8pack.c \ shrotate.c \ shrotpack.h \ shrotpackYX.h xorg-server-21.1.16/miext/shadow/shadow.h0000644000175000017500000001134214757411105013705 /* * * Copyright © 2000 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. */ #ifndef _SHADOW_H_ #define _SHADOW_H_ #include "scrnintstr.h" #include "picturestr.h" #include "damage.h" #include "damagestr.h" typedef struct _shadowBuf *shadowBufPtr; typedef void (*ShadowUpdateProc) (ScreenPtr pScreen, shadowBufPtr pBuf); #define SHADOW_WINDOW_RELOCATE 1 #define SHADOW_WINDOW_READ 2 #define SHADOW_WINDOW_WRITE 4 typedef void *(*ShadowWindowProc) (ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure); typedef struct _shadowBuf { DamagePtr pDamage; ShadowUpdateProc update; ShadowWindowProc window; PixmapPtr pPixmap; void *closure; int randr; /* screen wrappers */ GetImageProcPtr GetImage; CloseScreenProcPtr CloseScreen; ScreenBlockHandlerProcPtr BlockHandler; } shadowBufRec; /* Match defines from randr extension */ #define SHADOW_ROTATE_0 1 #define SHADOW_ROTATE_90 2 #define SHADOW_ROTATE_180 4 #define SHADOW_ROTATE_270 8 #define SHADOW_ROTATE_ALL (SHADOW_ROTATE_0|SHADOW_ROTATE_90|\ SHADOW_ROTATE_180|SHADOW_ROTATE_270) #define SHADOW_REFLECT_X 16 #define SHADOW_REFLECT_Y 32 #define SHADOW_REFLECT_ALL (SHADOW_REFLECT_X|SHADOW_REFLECT_Y) extern _X_EXPORT Bool shadowSetup(ScreenPtr pScreen); extern _X_EXPORT Bool shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update, ShadowWindowProc window, int randr, void *closure); extern _X_EXPORT void shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap); extern _X_EXPORT void shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate8_90(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16_90(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16_90YX(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate32_90(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate8_180(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16_180(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate32_180(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate8_270(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16_270(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16_270YX(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate32_270(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate8(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate16(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdateRotate32(ScreenPtr pScreen, shadowBufPtr pBuf); extern _X_EXPORT void shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf); typedef void (*shadowUpdateProc) (ScreenPtr, shadowBufPtr); #endif /* _SHADOW_H_ */ xorg-server-21.1.16/miext/shadow/Makefile.in0000644000175000017500000007772614757411116014340 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = miext/shadow ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libshadow_la_LIBADD = am_libshadow_la_OBJECTS = shadow.lo sh3224.lo shafb4.lo shafb8.lo \ shiplan2p4.lo shiplan2p8.lo shpacked.lo shplanar8.lo \ shplanar.lo shrot16pack_180.lo shrot16pack_270.lo \ shrot16pack_270YX.lo shrot16pack_90.lo shrot16pack_90YX.lo \ shrot16pack.lo shrot32pack_180.lo shrot32pack_270.lo \ shrot32pack_90.lo shrot32pack.lo shrot8pack_180.lo \ shrot8pack_270.lo shrot8pack_90.lo shrot8pack.lo shrotate.lo libshadow_la_OBJECTS = $(am_libshadow_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/sh3224.Plo ./$(DEPDIR)/shadow.Plo \ ./$(DEPDIR)/shafb4.Plo ./$(DEPDIR)/shafb8.Plo \ ./$(DEPDIR)/shiplan2p4.Plo ./$(DEPDIR)/shiplan2p8.Plo \ ./$(DEPDIR)/shpacked.Plo ./$(DEPDIR)/shplanar.Plo \ ./$(DEPDIR)/shplanar8.Plo ./$(DEPDIR)/shrot16pack.Plo \ ./$(DEPDIR)/shrot16pack_180.Plo \ ./$(DEPDIR)/shrot16pack_270.Plo \ ./$(DEPDIR)/shrot16pack_270YX.Plo \ ./$(DEPDIR)/shrot16pack_90.Plo \ ./$(DEPDIR)/shrot16pack_90YX.Plo ./$(DEPDIR)/shrot32pack.Plo \ ./$(DEPDIR)/shrot32pack_180.Plo \ ./$(DEPDIR)/shrot32pack_270.Plo ./$(DEPDIR)/shrot32pack_90.Plo \ ./$(DEPDIR)/shrot8pack.Plo ./$(DEPDIR)/shrot8pack_180.Plo \ ./$(DEPDIR)/shrot8pack_270.Plo ./$(DEPDIR)/shrot8pack_90.Plo \ ./$(DEPDIR)/shrotate.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libshadow_la_SOURCES) DIST_SOURCES = $(libshadow_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = shadow.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libshadow.la AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = shadow.h libshadow_la_SOURCES = \ c2p_core.h \ shadow.c \ shadow.h \ sh3224.c \ shafb4.c \ shafb8.c \ shiplan2p4.c \ shiplan2p8.c \ shpacked.c \ shplanar8.c \ shplanar.c \ shrot16pack_180.c \ shrot16pack_270.c \ shrot16pack_270YX.c \ shrot16pack_90.c \ shrot16pack_90YX.c \ shrot16pack.c \ shrot32pack_180.c \ shrot32pack_270.c \ shrot32pack_90.c \ shrot32pack.c \ shrot8pack_180.c \ shrot8pack_270.c \ shrot8pack_90.c \ shrot8pack.c \ shrotate.c \ shrotpack.h \ shrotpackYX.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign miext/shadow/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign miext/shadow/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libshadow.la: $(libshadow_la_OBJECTS) $(libshadow_la_DEPENDENCIES) $(EXTRA_libshadow_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libshadow_la_OBJECTS) $(libshadow_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sh3224.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shadow.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shafb4.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shafb8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shiplan2p4.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shiplan2p8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shpacked.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shplanar.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shplanar8.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack_180.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack_270.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack_270YX.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack_90.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot16pack_90YX.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot32pack.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot32pack_180.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot32pack_270.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot32pack_90.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot8pack.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot8pack_180.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot8pack_270.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrot8pack_90.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shrotate.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/sh3224.Plo -rm -f ./$(DEPDIR)/shadow.Plo -rm -f ./$(DEPDIR)/shafb4.Plo -rm -f ./$(DEPDIR)/shafb8.Plo -rm -f ./$(DEPDIR)/shiplan2p4.Plo -rm -f ./$(DEPDIR)/shiplan2p8.Plo -rm -f ./$(DEPDIR)/shpacked.Plo -rm -f ./$(DEPDIR)/shplanar.Plo -rm -f ./$(DEPDIR)/shplanar8.Plo -rm -f ./$(DEPDIR)/shrot16pack.Plo -rm -f ./$(DEPDIR)/shrot16pack_180.Plo -rm -f ./$(DEPDIR)/shrot16pack_270.Plo -rm -f ./$(DEPDIR)/shrot16pack_270YX.Plo -rm -f ./$(DEPDIR)/shrot16pack_90.Plo -rm -f ./$(DEPDIR)/shrot16pack_90YX.Plo -rm -f ./$(DEPDIR)/shrot32pack.Plo -rm -f ./$(DEPDIR)/shrot32pack_180.Plo -rm -f ./$(DEPDIR)/shrot32pack_270.Plo -rm -f ./$(DEPDIR)/shrot32pack_90.Plo -rm -f ./$(DEPDIR)/shrot8pack.Plo -rm -f ./$(DEPDIR)/shrot8pack_180.Plo -rm -f ./$(DEPDIR)/shrot8pack_270.Plo -rm -f ./$(DEPDIR)/shrot8pack_90.Plo -rm -f ./$(DEPDIR)/shrotate.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/sh3224.Plo -rm -f ./$(DEPDIR)/shadow.Plo -rm -f ./$(DEPDIR)/shafb4.Plo -rm -f ./$(DEPDIR)/shafb8.Plo -rm -f ./$(DEPDIR)/shiplan2p4.Plo -rm -f ./$(DEPDIR)/shiplan2p8.Plo -rm -f ./$(DEPDIR)/shpacked.Plo -rm -f ./$(DEPDIR)/shplanar.Plo -rm -f ./$(DEPDIR)/shplanar8.Plo -rm -f ./$(DEPDIR)/shrot16pack.Plo -rm -f ./$(DEPDIR)/shrot16pack_180.Plo -rm -f ./$(DEPDIR)/shrot16pack_270.Plo -rm -f ./$(DEPDIR)/shrot16pack_270YX.Plo -rm -f ./$(DEPDIR)/shrot16pack_90.Plo -rm -f ./$(DEPDIR)/shrot16pack_90YX.Plo -rm -f ./$(DEPDIR)/shrot32pack.Plo -rm -f ./$(DEPDIR)/shrot32pack_180.Plo -rm -f ./$(DEPDIR)/shrot32pack_270.Plo -rm -f ./$(DEPDIR)/shrot32pack_90.Plo -rm -f ./$(DEPDIR)/shrot8pack.Plo -rm -f ./$(DEPDIR)/shrot8pack_180.Plo -rm -f ./$(DEPDIR)/shrot8pack_270.Plo -rm -f ./$(DEPDIR)/shrot8pack_90.Plo -rm -f ./$(DEPDIR)/shrotate.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/miext/shadow/c2p_core.h0000644000175000017500000001031614757411105014114 /* * Fast C2P (Chunky-to-Planar) Conversion * * NOTES: * - This code was inspired by Scout's C2P tutorial * - It assumes to run on a big endian system * * Copyright © 2003-2008 Geert Uytterhoeven * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* * Basic transpose step */ static inline void _transp(CARD32 d[], unsigned int i1, unsigned int i2, unsigned int shift, CARD32 mask) { CARD32 t = (d[i1] ^ (d[i2] >> shift)) & mask; d[i1] ^= t; d[i2] ^= t << shift; } static inline void c2p_unsupported(void) { BUG_WARN(1); } static inline CARD32 get_mask(unsigned int n) { switch (n) { case 1: return 0x55555555; case 2: return 0x33333333; case 4: return 0x0f0f0f0f; case 8: return 0x00ff00ff; case 16: return 0x0000ffff; } c2p_unsupported(); return 0; } /* * Transpose operations on 8 32-bit words */ static inline void transp8(CARD32 d[], unsigned int n, unsigned int m) { CARD32 mask = get_mask(n); switch (m) { case 1: /* First n x 1 block */ _transp(d, 0, 1, n, mask); /* Second n x 1 block */ _transp(d, 2, 3, n, mask); /* Third n x 1 block */ _transp(d, 4, 5, n, mask); /* Fourth n x 1 block */ _transp(d, 6, 7, n, mask); return; case 2: /* First n x 2 block */ _transp(d, 0, 2, n, mask); _transp(d, 1, 3, n, mask); /* Second n x 2 block */ _transp(d, 4, 6, n, mask); _transp(d, 5, 7, n, mask); return; case 4: /* Single n x 4 block */ _transp(d, 0, 4, n, mask); _transp(d, 1, 5, n, mask); _transp(d, 2, 6, n, mask); _transp(d, 3, 7, n, mask); return; } c2p_unsupported(); } /* * Transpose operations on 4 32-bit words */ static inline void transp4(CARD32 d[], unsigned int n, unsigned int m) { CARD32 mask = get_mask(n); switch (m) { case 1: /* First n x 1 block */ _transp(d, 0, 1, n, mask); /* Second n x 1 block */ _transp(d, 2, 3, n, mask); return; case 2: /* Single n x 2 block */ _transp(d, 0, 2, n, mask); _transp(d, 1, 3, n, mask); return; } c2p_unsupported(); } /* * Transpose operations on 4 32-bit words (reverse order) */ static inline void transp4x(CARD32 d[], unsigned int n, unsigned int m) { CARD32 mask = get_mask(n); switch (m) { case 2: /* Single n x 2 block */ _transp(d, 2, 0, n, mask); _transp(d, 3, 1, n, mask); return; } c2p_unsupported(); } /* * Transpose operations on 2 32-bit words */ static inline void transp2(CARD32 d[], unsigned int n) { CARD32 mask = get_mask(n); /* Single n x 1 block */ _transp(d, 0, 1, n, mask); return; } /* * Transpose operations on 2 32-bit words (reverse order) */ static inline void transp2x(CARD32 d[], unsigned int n) { CARD32 mask = get_mask(n); /* Single n x 1 block */ _transp(d, 1, 0, n, mask); return; } xorg-server-21.1.16/miext/shadow/shadow.c0000644000175000017500000001233314757411105013701 /* * Copyright © 2000 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 #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include "dixfontstr.h" #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" static DevPrivateKeyRec shadowScrPrivateKeyRec; #define shadowScrPrivateKey (&shadowScrPrivateKeyRec) #define shadowGetBuf(pScr) ((shadowBufPtr) \ dixLookupPrivate(&(pScr)->devPrivates, shadowScrPrivateKey)) #define shadowBuf(pScr) shadowBufPtr pBuf = shadowGetBuf(pScr) #define wrap(priv, real, mem) {\ priv->mem = real->mem; \ real->mem = shadow##mem; \ } #define unwrap(priv, real, mem) {\ real->mem = priv->mem; \ } static void shadowRedisplay(ScreenPtr pScreen) { shadowBuf(pScreen); RegionPtr pRegion; if (!pBuf || !pBuf->pDamage || !pBuf->update) return; pRegion = DamageRegion(pBuf->pDamage); if (RegionNotEmpty(pRegion)) { (*pBuf->update) (pScreen, pBuf); DamageEmpty(pBuf->pDamage); } } static void shadowBlockHandler(ScreenPtr pScreen, void *timeout) { shadowBuf(pScreen); shadowRedisplay(pScreen); unwrap(pBuf, pScreen, BlockHandler); pScreen->BlockHandler(pScreen, timeout); wrap(pBuf, pScreen, BlockHandler); } static void shadowGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, unsigned int format, unsigned long planeMask, char *pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; shadowBuf(pScreen); /* Many apps use GetImage to sync with the visible frame buffer */ if (pDrawable->type == DRAWABLE_WINDOW) shadowRedisplay(pScreen); unwrap(pBuf, pScreen, GetImage); pScreen->GetImage(pDrawable, sx, sy, w, h, format, planeMask, pdstLine); wrap(pBuf, pScreen, GetImage); } static Bool shadowCloseScreen(ScreenPtr pScreen) { shadowBuf(pScreen); unwrap(pBuf, pScreen, GetImage); unwrap(pBuf, pScreen, CloseScreen); unwrap(pBuf, pScreen, BlockHandler); shadowRemove(pScreen, pBuf->pPixmap); DamageDestroy(pBuf->pDamage); if (pBuf->pPixmap) pScreen->DestroyPixmap(pBuf->pPixmap); free(pBuf); return pScreen->CloseScreen(pScreen); } Bool shadowSetup(ScreenPtr pScreen) { shadowBufPtr pBuf; if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!DamageSetup(pScreen)) return FALSE; pBuf = malloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; pBuf->pDamage = DamageCreate((DamageReportFunc) NULL, (DamageDestroyFunc) NULL, DamageReportNone, TRUE, pScreen, pScreen); if (!pBuf->pDamage) { free(pBuf); return FALSE; } wrap(pBuf, pScreen, CloseScreen); wrap(pBuf, pScreen, GetImage); wrap(pBuf, pScreen, BlockHandler); pBuf->update = 0; pBuf->window = 0; pBuf->pPixmap = 0; pBuf->closure = 0; pBuf->randr = 0; dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf); return TRUE; } Bool shadowAdd(ScreenPtr pScreen, PixmapPtr pPixmap, ShadowUpdateProc update, ShadowWindowProc window, int randr, void *closure) { shadowBuf(pScreen); /* * Map simple rotation values to bitmasks; fortunately, * these are all unique */ switch (randr) { case 0: randr = SHADOW_ROTATE_0; break; case 90: randr = SHADOW_ROTATE_90; break; case 180: randr = SHADOW_ROTATE_180; break; case 270: randr = SHADOW_ROTATE_270; break; } pBuf->update = update; pBuf->window = window; pBuf->randr = randr; pBuf->closure = closure; pBuf->pPixmap = pPixmap; DamageRegister(&pPixmap->drawable, pBuf->pDamage); return TRUE; } void shadowRemove(ScreenPtr pScreen, PixmapPtr pPixmap) { shadowBuf(pScreen); if (pBuf->pPixmap) { DamageUnregister(pBuf->pDamage); pBuf->update = 0; pBuf->window = 0; pBuf->randr = 0; pBuf->closure = 0; pBuf->pPixmap = 0; } } xorg-server-21.1.16/miext/shadow/sh3224.c0000644000175000017500000000763114757411105013346 /* * Copyright © 2000 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 "shadow.h" #include "fb.h" #define Get8(a) ((CARD32) READ(a)) #if BITMAP_BIT_ORDER == MSBFirst #define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2)) #define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \ (WRITE((a+1), (CARD8) ((p) >> 8))), \ (WRITE((a+2), (CARD8) (p)))) #else #define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16)) #define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \ (WRITE((a+1), (CARD8) ((p) >> 8))), \ (WRITE((a+2), (CARD8) ((p) >> 16)))) #endif static void sh24_32BltLine(CARD8 *srcLine, CARD8 *dstLine, int width) { CARD32 *src; CARD8 *dst; int w; CARD32 pixel; src = (CARD32 *) srcLine; dst = dstLine; w = width; while (((long)dst & 3) && w) { w--; pixel = READ(src++); Put24(dst, pixel); dst += 3; } /* Do four aligned pixels at a time */ while (w >= 4) { CARD32 s0, s1; s0 = READ(src++); s1 = READ(src++); #if BITMAP_BIT_ORDER == LSBFirst WRITE((CARD32 *) dst, (s0 & 0xffffff) | (s1 << 24)); #else WRITE((CARD32 *) dst, (s0 << 8) | ((s1 & 0xffffff) >> 16)); #endif s0 = READ(src++); #if BITMAP_BIT_ORDER == LSBFirst WRITE((CARD32 *) (dst + 4), ((s1 & 0xffffff) >> 8) | (s0 << 16)); #else WRITE((CARD32 *) (dst + 4), (s1 << 16) | ((s0 & 0xffffff) >> 8)); #endif s1 = READ(src++); #if BITMAP_BIT_ORDER == LSBFirst WRITE((CARD32 *) (dst + 8), ((s0 & 0xffffff) >> 16) | (s1 << 8)); #else WRITE((CARD32 *) (dst + 8), (s0 << 24) | (s1 & 0xffffff)); #endif dst += 12; w -= 4; } while (w--) { pixel = READ(src++); Put24(dst, pixel); dst += 3; } } void shadowUpdate32to24(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbStride shaStride; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h; CARD32 winSize; FbBits *shaBase, *shaLine; CARD8 *winBase = NULL, *winLine; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); /* just get the initial window base + stride */ winBase = (*pBuf->window)(pScreen, 0, 0, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); while (nbox--) { x = pbox->x1; y = pbox->y1; w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; winLine = winBase + y * winSize + (x * 3); shaLine = shaBase + y * shaStride + ((x * shaBpp) >> FB_SHIFT); while (h--) { sh24_32BltLine((CARD8 *)shaLine, (CARD8 *)winLine, w); winLine += winSize; shaLine += shaStride; } pbox++; } } xorg-server-21.1.16/miext/shadow/shafb4.c0000644000175000017500000001032714757411105013564 /* * Copyright © 2013 Geert Uytterhoeven * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Based on shpacked.c, which is Copyright © 2000 Keith Packard */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #include "c2p_core.h" /* * Perform a full C2P step on 32 4-bit pixels, stored in 4 32-bit words * containing * - 32 4-bit chunky pixels on input * - permutated planar data (1 plane per 32-bit word) on output */ static void c2p_32x4(CARD32 d[4]) { transp4(d, 16, 2); transp4(d, 8, 1); transp4(d, 4, 2); transp4(d, 2, 1); transp4(d, 1, 2); } /* * Store a full block of permutated planar data after c2p conversion */ static inline void store_afb4(void *dst, unsigned int stride, const CARD32 d[4]) { CARD8 *p = dst; *(CARD32 *)p = d[3]; p += stride; *(CARD32 *)p = d[1]; p += stride; *(CARD32 *)p = d[2]; p += stride; *(CARD32 *)p = d[0]; p += stride; } void shadowUpdateAfb4(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBase; CARD32 *shaLine, *sha; FbStride shaStride; int scrLine; _X_UNUSED int shaBpp, shaXoff, shaYoff; int x, y, w, h; int i, n; CARD32 *win; CARD32 off, winStride; union { CARD8 bytes[16]; CARD32 words[4]; } d; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); if (sizeof(FbBits) != sizeof(CARD32)) shaStride = shaStride * sizeof(FbBits) / sizeof(CARD32); while (nbox--) { x = pbox->x1; y = pbox->y1; w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; scrLine = (x & -32) / 2; shaLine = (CARD32 *)shaBase + y * shaStride + scrLine / sizeof(CARD32); off = scrLine / 4; /* byte offset in bitplane scanline */ n = ((x & 31) + w + 31) / 32; /* number of c2p units in scanline */ while (h--) { sha = shaLine; win = (CARD32 *) (*pBuf->window) (pScreen, y, off, SHADOW_WINDOW_WRITE, &winStride, pBuf->closure); if (!win) return; for (i = 0; i < n; i++) { memcpy(d.bytes, sha, sizeof(d.bytes)); c2p_32x4(d.words); store_afb4(win++, winStride, d.words); sha += sizeof(d.bytes) / sizeof(*sha); } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shafb8.c0000644000175000017500000001055614757411105013574 /* * Copyright © 2013 Geert Uytterhoeven * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Based on shpacked.c, which is Copyright © 2000 Keith Packard */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #include "c2p_core.h" /* * Perform a full C2P step on 32 8-bit pixels, stored in 8 32-bit words * containing * - 32 8-bit chunky pixels on input * - permutated planar data (1 plane per 32-bit word) on output */ static void c2p_32x8(CARD32 d[8]) { transp8(d, 16, 4); transp8(d, 8, 2); transp8(d, 4, 1); transp8(d, 2, 4); transp8(d, 1, 2); } /* * Store a full block of permutated planar data after c2p conversion */ static inline void store_afb8(void *dst, unsigned int stride, const CARD32 d[8]) { CARD8 *p = dst; *(CARD32 *)p = d[7]; p += stride; *(CARD32 *)p = d[5]; p += stride; *(CARD32 *)p = d[3]; p += stride; *(CARD32 *)p = d[1]; p += stride; *(CARD32 *)p = d[6]; p += stride; *(CARD32 *)p = d[4]; p += stride; *(CARD32 *)p = d[2]; p += stride; *(CARD32 *)p = d[0]; p += stride; } void shadowUpdateAfb8(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBase; CARD32 *shaLine, *sha; FbStride shaStride; int scrLine; _X_UNUSED int shaBpp, shaXoff, shaYoff; int x, y, w, h; int i, n; CARD32 *win; CARD32 off, winStride; union { CARD8 bytes[32]; CARD32 words[8]; } d; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); if (sizeof(FbBits) != sizeof(CARD32)) shaStride = shaStride * sizeof(FbBits) / sizeof(CARD32); while (nbox--) { x = pbox->x1; y = pbox->y1; w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; scrLine = x & -32; shaLine = (CARD32 *)shaBase + y * shaStride + scrLine / sizeof(CARD32); off = scrLine / 8; /* byte offset in bitplane scanline */ n = ((x & 31) + w + 31) / 32; /* number of c2p units in scanline */ while (h--) { sha = shaLine; win = (CARD32 *) (*pBuf->window) (pScreen, y, off, SHADOW_WINDOW_WRITE, &winStride, pBuf->closure); if (!win) return; for (i = 0; i < n; i++) { memcpy(d.bytes, sha, sizeof(d.bytes)); c2p_32x8(d.words); store_afb8(win++, winStride, d.words); sha += sizeof(d.bytes) / sizeof(*sha); } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shiplan2p4.c0000644000175000017500000000774314757411105014411 /* * Copyright © 2013 Geert Uytterhoeven * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Based on shpacked.c, which is Copyright © 2000 Keith Packard */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #include "c2p_core.h" /* * Perform a full C2P step on 16 4-bit pixels, stored in 2 32-bit words * containing * - 16 4-bit chunky pixels on input * - permutated planar data (2 planes per 32-bit word) on output */ static void c2p_16x4(CARD32 d[2]) { transp2(d, 8); transp2(d, 2); transp2x(d, 1); transp2(d, 16); transp2(d, 4); transp2(d, 1); } /* * Store a full block of iplan2p4 data after c2p conversion */ static inline void store_iplan2p4(void *dst, const CARD32 d[2]) { CARD32 *p = dst; *p++ = d[0]; *p++ = d[1]; } void shadowUpdateIplan2p4(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBase; CARD16 *shaLine, *sha; FbStride shaStride; int scrLine; _X_UNUSED int shaBpp, shaXoff, shaYoff; int x, y, w, h; int i, n; CARD16 *win; _X_UNUSED CARD32 winSize; union { CARD8 bytes[8]; CARD32 words[2]; } d; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); shaStride *= sizeof(FbBits) / sizeof(CARD16); while (nbox--) { x = pbox->x1; y = pbox->y1; w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; scrLine = (x & -16) / 2; shaLine = (CARD16 *)shaBase + y * shaStride + scrLine / sizeof(CARD16); n = ((x & 15) + w + 15) / 16; /* number of c2p units in scanline */ while (h--) { sha = shaLine; win = (CARD16 *) (*pBuf->window) (pScreen, y, scrLine, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!win) return; for (i = 0; i < n; i++) { memcpy(d.bytes, sha, sizeof(d.bytes)); c2p_16x4(d.words); store_iplan2p4(win, d.words); sha += sizeof(d.bytes) / sizeof(*sha); win += sizeof(d.bytes) / sizeof(*win); } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shiplan2p8.c0000644000175000017500000001001014757411105014372 /* * Copyright © 2013 Geert Uytterhoeven * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Based on shpacked.c, which is Copyright © 2000 Keith Packard */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #include "c2p_core.h" /* * Perform a full C2P step on 16 8-bit pixels, stored in 4 32-bit words * containing * - 16 8-bit chunky pixels on input * - permutated planar data (2 planes per 32-bit word) on output */ static void c2p_16x8(CARD32 d[4]) { transp4(d, 8, 2); transp4(d, 1, 2); transp4x(d, 16, 2); transp4x(d, 2, 2); transp4(d, 4, 1); } /* * Store a full block of permutated iplan2p8 data after c2p conversion */ static inline void store_iplan2p8(void *dst, const CARD32 d[4]) { CARD32 *p = dst; *p++ = d[1]; *p++ = d[3]; *p++ = d[0]; *p++ = d[2]; } void shadowUpdateIplan2p8(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBase; CARD16 *shaLine, *sha; FbStride shaStride; int scrLine; _X_UNUSED int shaBpp, shaXoff, shaYoff; int x, y, w, h; int i, n; CARD16 *win; _X_UNUSED CARD32 winSize; union { CARD8 bytes[16]; CARD32 words[4]; } d; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); shaStride *= sizeof(FbBits) / sizeof(CARD16); while (nbox--) { x = pbox->x1; y = pbox->y1; w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; scrLine = x & -16; shaLine = (CARD16 *)shaBase + y * shaStride + scrLine / sizeof(CARD16); n = ((x & 15) + w + 15) / 16; /* number of c2p units in scanline */ while (h--) { sha = shaLine; win = (CARD16 *) (*pBuf->window) (pScreen, y, scrLine, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!win) return; for (i = 0; i < n; i++) { memcpy(d.bytes, sha, sizeof(d.bytes)); c2p_16x8(d.words); store_iplan2p8(win, d.words); sha += sizeof(d.bytes) / sizeof(*sha); win += sizeof(d.bytes) / sizeof(*win); } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shpacked.c0000644000175000017500000000722414757411105014201 /* * * Copyright © 2000 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 #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" void shadowUpdatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h, width; int i; FbBits *winBase = NULL, *win; CARD32 winSize; fbGetDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); while (nbox--) { x = pbox->x1 * shaBpp; y = pbox->y1; w = (pbox->x2 - pbox->x1) * shaBpp; h = pbox->y2 - pbox->y1; scrLine = (x >> FB_SHIFT); shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); x &= FB_MASK; w = (w + x + FB_MASK) >> FB_SHIFT; while (h--) { winSize = 0; scrBase = 0; width = w; scr = scrLine; sha = shaLine; while (width) { /* how much remains in this window */ i = scrBase + winSize - scr; if (i <= 0 || scr < scrBase) { winBase = (FbBits *) (*pBuf->window) (pScreen, y, scr * sizeof(FbBits), SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!winBase) return; scrBase = scr; winSize /= sizeof(FbBits); i = winSize; } win = winBase + (scr - scrBase); if (i > width) i = width; width -= i; scr += i; memcpy(win, sha, i * sizeof(FbBits)); sha += i; } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shplanar8.c0000644000175000017500000001343614757411105014321 /* * * Copyright © 2000 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 #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" /* * Expose 8bpp depth 4 */ /* * 32->8 conversion: * * 7 6 5 4 3 2 1 0 * A B C D E F G H * * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 * m1 D x x x x x x x C x x x x x x x B x x x x x x x A x x x x x x x sha[0] << (7-(p)) * m2 x x x x H x x x x x x x G x x x x x x x F x x x x x x x E x x x sha[1] << (3-(p)) * m3 D C B A m1 & 0x80808080 * m4 H G F E m2 & 0x08080808 * m5 D H C G B F A E m3 | m4 * m6 D H C G B F m5 >> 9 * m7 D H C D G H B C F G A B E F m5 | m6 * m8 D H C D G H m7 >> 18 * m9 D H C D G H B C D F G H A B C D E F G H m7 | m8 */ #define PL_SHIFT 8 #define PL_UNIT (1 << PL_SHIFT) #define PL_MASK (PL_UNIT - 1) #if 0 #define GetBits(p,o,d) { \ CARD32 m1,m2,m3,m4,m5,m6,m7,m8; \ m1 = sha[o] << (7 - (p)); \ m2 = sha[(o)+1] << (3 - (p)); \ m3 = m1 & 0x80808080; \ m4 = m2 & 0x08080808; \ m5 = m3 | m4; \ m6 = m5 >> 9; \ m7 = m5 | m6; \ m8 = m7 >> 18; \ d = m7 | m8; \ } #else #define GetBits(p,o,d) { \ CARD32 m5,m7; \ m5 = ((sha[o] << (7 - (p))) & 0x80808080) | ((sha[(o)+1] << (3 - (p))) & 0x08080808); \ m7 = m5 | (m5 >> 9); \ d = m7 | (m7 >> 18); \ } #endif void shadowUpdatePlanar4x8(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); CARD32 *shaBase, *shaLine, *sha; CARD8 s1, s2, s3, s4; FbStride shaStride; int scrBase, scrLine, scr; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h, width; int i; CARD32 *winBase = NULL, *win; CARD32 winSize; int plane; fbGetStipDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); while (nbox--) { x = pbox->x1 * shaBpp; y = pbox->y1; w = (pbox->x2 - pbox->x1) * shaBpp; h = pbox->y2 - pbox->y1; w = (w + (x & PL_MASK) + PL_MASK) >> PL_SHIFT; x &= ~PL_MASK; scrLine = (x >> PL_SHIFT); shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); while (h--) { for (plane = 0; plane < 4; plane++) { width = w; scr = scrLine; sha = shaLine; winSize = 0; scrBase = 0; while (width) { /* how much remains in this window */ i = scrBase + winSize - scr; if (i <= 0 || scr < scrBase) { winBase = (CARD32 *) (*pBuf->window) (pScreen, y, (scr << 4) | (plane), SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!winBase) return; winSize >>= 2; scrBase = scr; i = winSize; } win = winBase + (scr - scrBase); if (i > width) i = width; width -= i; scr += i; while (i--) { GetBits(plane, 0, s1); GetBits(plane, 2, s2); GetBits(plane, 4, s3); GetBits(plane, 6, s4); *win++ = s1 | (s2 << 8) | (s3 << 16) | (s4 << 24); sha += 8; } } } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shplanar.c0000644000175000017500000001324214757411105014224 /* * * Copyright © 2000 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 #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" /* * 32 4-bit pixels per write */ #define PL_SHIFT 7 #define PL_UNIT (1 << PL_SHIFT) #define PL_MASK (PL_UNIT - 1) /* * 32->8 conversion: * * 7 6 5 4 3 2 1 0 * A B C D E F G H * * 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 * m . . . H . . . G . . . F . . . E . . . D . . . C . . . B . . . A * m1 G . . . F . . . E . . . D . . . C . . . B . . . A . . . . . . . m << (7 - (p)) * m2 . H . . . G . . . F . . . E . . . D . . . C . . . B . . . A . . (m >> (p)) << 2 * m3 G E C A m1 & 0x80808080 * m4 H F D B m2 & 0x40404040 * m5 G H E F C D A B m3 | m4 * m6 G H E F C D G H A B E F m5 | (m5 >> 20) * m7 G H E F C D G H A B C D E F G H m6 | (m6 >> 10) */ #if 0 #define GetBits(p,o,d) {\ m = sha[o]; \ m1 = m << (7 - (p)); \ m2 = (m >> (p)) << 2; \ m3 = m1 & 0x80808080; \ m4 = m2 & 0x40404040; \ m5 = m3 | m4; \ m6 = m5 | (m5 >> 20); \ d = m6 | (m6 >> 10); \ } #else #define GetBits(p,o,d) {\ m = sha[o]; \ m5 = ((m << (7 - (p))) & 0x80808080) | (((m >> (p)) << 2) & 0x40404040); \ m6 = m5 | (m5 >> 20); \ d = m6 | (m6 >> 10); \ } #endif void shadowUpdatePlanar4(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); CARD32 *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h, width; int i; CARD32 *winBase = NULL, *win; CARD32 winSize; int plane; CARD32 m, m5, m6; CARD8 s1, s2, s3, s4; fbGetStipDrawable(&pShadow->drawable, shaBase, shaStride, shaBpp, shaXoff, shaYoff); while (nbox--) { x = (pbox->x1) * shaBpp; y = (pbox->y1); w = (pbox->x2 - pbox->x1) * shaBpp; h = pbox->y2 - pbox->y1; w = (w + (x & PL_MASK) + PL_MASK) >> PL_SHIFT; x &= ~PL_MASK; scrLine = (x >> PL_SHIFT); shaLine = shaBase + y * shaStride + (x >> FB_SHIFT); while (h--) { for (plane = 0; plane < 4; plane++) { width = w; scr = scrLine; sha = shaLine; winSize = 0; scrBase = 0; while (width) { /* how much remains in this window */ i = scrBase + winSize - scr; if (i <= 0 || scr < scrBase) { winBase = (CARD32 *) (*pBuf->window) (pScreen, y, (scr << 4) | (plane), SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!winBase) return; winSize >>= 2; scrBase = scr; i = winSize; } win = winBase + (scr - scrBase); if (i > width) i = width; width -= i; scr += i; while (i--) { GetBits(plane, 0, s1); GetBits(plane, 1, s2); GetBits(plane, 2, s3); GetBits(plane, 3, s4); *win++ = s1 | (s2 << 8) | (s3 << 16) | (s4 << 24); sha += 4; } } } shaLine += shaStride; y++; } pbox++; } } xorg-server-21.1.16/miext/shadow/shrot16pack_180.c0000644000175000017500000000244714757411105015156 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate16_180 #define Data CARD16 #define ROTATE 180 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot16pack_270.c0000644000175000017500000000244714757411105015156 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate16_270 #define Data CARD16 #define ROTATE 270 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot16pack_270YX.c0000644000175000017500000000245114757411105015432 /* * Copyright 2000 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. */ #define FUNC shadowUpdateRotate16_270YX #define Data CARD16 #define ROTATE 270 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpackYX.h" xorg-server-21.1.16/miext/shadow/shrot16pack_90.c0000644000175000017500000000244514757411105015074 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate16_90 #define Data CARD16 #define ROTATE 90 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot16pack_90YX.c0000644000175000017500000000244714757411105015357 /* * Copyright 2000 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. */ #define FUNC shadowUpdateRotate16_90YX #define Data CARD16 #define ROTATE 90 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpackYX.h" xorg-server-21.1.16/miext/shadow/shrot16pack.c0000644000175000017500000000242014757411105014555 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate16 #define Data CARD16 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot32pack_180.c0000644000175000017500000000244714757411105015154 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate32_180 #define Data CARD32 #define ROTATE 180 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot32pack_270.c0000644000175000017500000000244714757411105015154 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate32_270 #define Data CARD32 #define ROTATE 270 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot32pack_90.c0000644000175000017500000000244514757411105015072 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate32_90 #define Data CARD32 #define ROTATE 90 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot32pack.c0000644000175000017500000000242014757411105014553 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate32 #define Data CARD32 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot8pack_180.c0000644000175000017500000000244514757411105015075 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate8_180 #define Data CARD8 #define ROTATE 180 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot8pack_270.c0000644000175000017500000000244514757411105015075 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate8_270 #define Data CARD8 #define ROTATE 270 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot8pack_90.c0000644000175000017500000000244314757411105015013 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate8_90 #define Data CARD8 #define ROTATE 90 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrot8pack.c0000644000175000017500000000241614757411105014503 /* * Copyright © 2000 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. */ #define FUNC shadowUpdateRotate8 #define Data CARD8 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "shrotpack.h" xorg-server-21.1.16/miext/shadow/shrotate.c0000644000175000017500000002220214757411105014241 /* * * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" /* * These indicate which way the source (shadow) is scanned when * walking the screen in a particular direction */ #define LEFT_TO_RIGHT 1 #define RIGHT_TO_LEFT -1 #define TOP_TO_BOTTOM 2 #define BOTTOM_TO_TOP -2 void shadowUpdateRotatePacked(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBits; FbStride shaStride; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int box_x1, box_x2, box_y1, box_y2; int sha_x1 = 0, sha_y1 = 0; int scr_x1 = 0, scr_x2 = 0, scr_y1 = 0, scr_y2 = 0, scr_w, scr_h; int scr_x, scr_y; int w; int pixelsPerBits; int pixelsMask; FbStride shaStepOverY = 0, shaStepDownY = 0; FbStride shaStepOverX = 0, shaStepDownX = 0; FbBits *shaLine, *sha; int shaHeight = pShadow->drawable.height; int shaWidth = pShadow->drawable.width; FbBits shaMask; int shaFirstShift, shaShift; int o_x_dir; int o_y_dir; int x_dir; int y_dir; fbGetDrawable(&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff); pixelsPerBits = (sizeof(FbBits) * 8) / shaBpp; pixelsMask = ~(pixelsPerBits - 1); shaMask = FbBitsMask(FB_UNIT - shaBpp, shaBpp); /* * Compute rotation related constants to walk the shadow */ o_x_dir = LEFT_TO_RIGHT; o_y_dir = TOP_TO_BOTTOM; if (pBuf->randr & SHADOW_REFLECT_X) o_x_dir = -o_x_dir; if (pBuf->randr & SHADOW_REFLECT_Y) o_y_dir = -o_y_dir; switch (pBuf->randr & (SHADOW_ROTATE_ALL)) { case SHADOW_ROTATE_0: /* upper left shadow -> upper left screen */ default: x_dir = o_x_dir; y_dir = o_y_dir; break; case SHADOW_ROTATE_90: /* upper right shadow -> upper left screen */ x_dir = o_y_dir; y_dir = -o_x_dir; break; case SHADOW_ROTATE_180: /* lower right shadow -> upper left screen */ x_dir = -o_x_dir; y_dir = -o_y_dir; break; case SHADOW_ROTATE_270: /* lower left shadow -> upper left screen */ x_dir = -o_y_dir; y_dir = o_x_dir; break; } switch (x_dir) { case LEFT_TO_RIGHT: shaStepOverX = shaBpp; shaStepOverY = 0; break; case TOP_TO_BOTTOM: shaStepOverX = 0; shaStepOverY = shaStride; break; case RIGHT_TO_LEFT: shaStepOverX = -shaBpp; shaStepOverY = 0; break; case BOTTOM_TO_TOP: shaStepOverX = 0; shaStepOverY = -shaStride; break; } switch (y_dir) { case TOP_TO_BOTTOM: shaStepDownX = 0; shaStepDownY = shaStride; break; case RIGHT_TO_LEFT: shaStepDownX = -shaBpp; shaStepDownY = 0; break; case BOTTOM_TO_TOP: shaStepDownX = 0; shaStepDownY = -shaStride; break; case LEFT_TO_RIGHT: shaStepDownX = shaBpp; shaStepDownY = 0; break; } while (nbox--) { box_x1 = pbox->x1; box_y1 = pbox->y1; box_x2 = pbox->x2; box_y2 = pbox->y2; pbox++; /* * Compute screen and shadow locations for this box */ switch (x_dir) { case LEFT_TO_RIGHT: scr_x1 = box_x1 & pixelsMask; scr_x2 = (box_x2 + pixelsPerBits - 1) & pixelsMask; sha_x1 = scr_x1; break; case TOP_TO_BOTTOM: scr_x1 = box_y1 & pixelsMask; scr_x2 = (box_y2 + pixelsPerBits - 1) & pixelsMask; sha_y1 = scr_x1; break; case RIGHT_TO_LEFT: scr_x1 = (shaWidth - box_x2) & pixelsMask; scr_x2 = (shaWidth - box_x1 + pixelsPerBits - 1) & pixelsMask; sha_x1 = (shaWidth - scr_x1 - 1); break; case BOTTOM_TO_TOP: scr_x1 = (shaHeight - box_y2) & pixelsMask; scr_x2 = (shaHeight - box_y1 + pixelsPerBits - 1) & pixelsMask; sha_y1 = (shaHeight - scr_x1 - 1); break; } switch (y_dir) { case TOP_TO_BOTTOM: scr_y1 = box_y1; scr_y2 = box_y2; sha_y1 = scr_y1; break; case RIGHT_TO_LEFT: scr_y1 = (shaWidth - box_x2); scr_y2 = (shaWidth - box_x1); sha_x1 = box_x2 - 1; break; case BOTTOM_TO_TOP: scr_y1 = shaHeight - box_y2; scr_y2 = shaHeight - box_y1; sha_y1 = box_y2 - 1; break; case LEFT_TO_RIGHT: scr_y1 = box_x1; scr_y2 = box_x2; sha_x1 = box_x1; break; } scr_w = ((scr_x2 - scr_x1) * shaBpp) >> FB_SHIFT; scr_h = scr_y2 - scr_y1; scr_y = scr_y1; /* shift amount for first pixel on screen */ shaFirstShift = FB_UNIT - ((sha_x1 * shaBpp) & FB_MASK) - shaBpp; /* pointer to shadow data first placed on screen */ shaLine = (shaBits + sha_y1 * shaStride + ((sha_x1 * shaBpp) >> FB_SHIFT)); /* * Copy the bits, always write across the physical frame buffer * to take advantage of write combining. */ while (scr_h--) { int p; FbBits bits; FbBits *win; int i; CARD32 winSize; sha = shaLine; shaShift = shaFirstShift; w = scr_w; scr_x = scr_x1 * shaBpp >> FB_SHIFT; while (w) { /* * Map some of this line */ win = (FbBits *) (*pBuf->window) (pScreen, scr_y, scr_x << 2, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); i = (winSize >> 2); if (i > w) i = w; w -= i; scr_x += i; /* * Copy the portion of the line mapped */ while (i--) { bits = 0; p = pixelsPerBits; /* * Build one word of output from multiple inputs * * Note that for 90/270 rotations, this will walk * down the shadow hitting each scanline once. * This is probably not very efficient. */ while (p--) { bits = FbScrLeft(bits, shaBpp); bits |= FbScrRight(*sha, shaShift) & shaMask; shaShift -= shaStepOverX; if (shaShift >= FB_UNIT) { shaShift -= FB_UNIT; sha--; } else if (shaShift < 0) { shaShift += FB_UNIT; sha++; } sha += shaStepOverY; } *win++ = bits; } } scr_y++; shaFirstShift -= shaStepDownX; if (shaFirstShift >= FB_UNIT) { shaFirstShift -= FB_UNIT; shaLine--; } else if (shaFirstShift < 0) { shaFirstShift += FB_UNIT; shaLine++; } shaLine += shaStepDownY; } } } xorg-server-21.1.16/miext/shadow/shrotpack.h0000644000175000017500000001520614757411105014421 /* * * Copyright © 2000 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. */ /* * Thanks to Daniel Chemko for making the 90 and 180 * orientations work. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "scrnintstr.h" #include "windowstr.h" #include #include "dixfontstr.h" #include #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #define DANDEBUG 0 #if ROTATE == 270 #define SCRLEFT(x,y,w,h) (pScreen->height - ((y) + (h))) #define SCRY(x,y,w,h) (x) #define SCRWIDTH(x,y,w,h) (h) #define FIRSTSHA(x,y,w,h) (((y) + (h) - 1) * shaStride + (x)) #define STEPDOWN(x,y,w,h) ((w)--) #define NEXTY(x,y,w,h) ((x)++) #define SHASTEPX(stride) -(stride) #define SHASTEPY(stride) (1) #elif ROTATE == 90 #define SCRLEFT(x,y,w,h) (y) #define SCRY(x,y,w,h) (pScreen->width - ((x) + (w)) - 1) #define SCRWIDTH(x,y,w,h) (h) #define FIRSTSHA(x,y,w,h) ((y) * shaStride + (x + w - 1)) #define STEPDOWN(x,y,w,h) ((w)--) #define NEXTY(x,y,w,h) ((void)(x)) #define SHASTEPX(stride) (stride) #define SHASTEPY(stride) (-1) #elif ROTATE == 180 #define SCRLEFT(x,y,w,h) (pScreen->width - ((x) + (w))) #define SCRY(x,y,w,h) (pScreen->height - ((y) + (h)) - 1) #define SCRWIDTH(x,y,w,h) (w) #define FIRSTSHA(x,y,w,h) ((y + h - 1) * shaStride + (x + w - 1)) #define STEPDOWN(x,y,w,h) ((h)--) #define NEXTY(x,y,w,h) ((void)(y)) #define SHASTEPX(stride) (-1) #define SHASTEPY(stride) -(stride) #else #define SCRLEFT(x,y,w,h) (x) #define SCRY(x,y,w,h) (y) #define SCRWIDTH(x,y,w,h) (w) #define FIRSTSHA(x,y,w,h) ((y) * shaStride + (x)) #define STEPDOWN(x,y,w,h) ((h)--) #define NEXTY(x,y,w,h) ((y)++) #define SHASTEPX(stride) (1) #define SHASTEPY(stride) (stride) #endif void FUNC(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h, width; int i; Data *winBase = NULL, *win; CARD32 winSize; fbGetDrawable(&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff); shaBase = (Data *) shaBits; shaStride = shaStride * sizeof(FbBits) / sizeof(Data); #if (DANDEBUG > 1) ErrorF ("-> Entering Shadow Update:\r\n |- Origins: pShadow=%x, pScreen=%x, damage=%x\r\n |- Metrics: shaStride=%d, shaBase=%x, shaBpp=%d\r\n | \n", pShadow, pScreen, damage, shaStride, shaBase, shaBpp); #endif while (nbox--) { x = pbox->x1; y = pbox->y1; w = (pbox->x2 - pbox->x1); h = pbox->y2 - pbox->y1; #if (DANDEBUG > 2) ErrorF (" |-> Redrawing box - Metrics: X=%d, Y=%d, Width=%d, Height=%d\n", x, y, w, h); #endif scrLine = SCRLEFT(x, y, w, h); shaLine = shaBase + FIRSTSHA(x, y, w, h); while (STEPDOWN(x, y, w, h)) { winSize = 0; scrBase = 0; width = SCRWIDTH(x, y, w, h); scr = scrLine; sha = shaLine; #if (DANDEBUG > 3) ErrorF(" | |-> StepDown - Metrics: width=%d, scr=%x, sha=%x\n", width, scr, sha); #endif while (width) { /* how much remains in this window */ i = scrBase + winSize - scr; if (i <= 0 || scr < scrBase) { winBase = (Data *) (*pBuf->window) (pScreen, SCRY(x, y, w, h), scr * sizeof(Data), SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); if (!winBase) return; scrBase = scr; winSize /= sizeof(Data); i = winSize; #if(DANDEBUG > 4) ErrorF (" | | |-> Starting New Line - Metrics: winBase=%x, scrBase=%x, winSize=%d\r\n | | | Xstride=%d, Ystride=%d, w=%d h=%d\n", winBase, scrBase, winSize, SHASTEPX(shaStride), SHASTEPY(shaStride), w, h); #endif } win = winBase + (scr - scrBase); if (i > width) i = width; width -= i; scr += i; #if(DANDEBUG > 5) ErrorF (" | | |-> Writing Line - Metrics: win=%x, sha=%x\n", win, sha); #endif while (i--) { #if(DANDEBUG > 6) ErrorF (" | | |-> Writing Pixel - Metrics: win=%x, sha=%d, remaining=%d\n", win, sha, i); #endif *win++ = *sha; sha += SHASTEPX(shaStride); } /* i */ } /* width */ shaLine += SHASTEPY(shaStride); NEXTY(x, y, w, h); } /* STEPDOWN */ pbox++; } /* nbox */ } xorg-server-21.1.16/miext/shadow/shrotpackYX.h0000644000175000017500000001134314757411105014700 /* * Copyright © 2004 Philip Blundell * * 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 Philip Blundell not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Philip Blundell makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL PHILIP BLUNDELL 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. */ #include #include "scrnintstr.h" #include "windowstr.h" #include "dixfontstr.h" #include "mi.h" #include "regionstr.h" #include "globals.h" #include "gcstruct.h" #include "shadow.h" #include "fb.h" #if ROTATE == 270 #define WINSTEPX(stride) (stride) #define WINSTART(x,y) (((pScreen->height - 1) - y) + (x * winStride)) #define WINSTEPY() -1 #elif ROTATE == 90 #define WINSTEPX(stride) (-stride) #define WINSTEPY() 1 #define WINSTART(x,y) (((pScreen->width - 1 - x) * winStride) + y) #else #error This rotation is not supported here #endif #ifdef __arm__ #define PREFETCH #endif void FUNC(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = DamageRegion(pBuf->pDamage); PixmapPtr pShadow = pBuf->pPixmap; int nbox = RegionNumRects(damage); BoxPtr pbox = RegionRects(damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride, winStride; int shaBpp; _X_UNUSED int shaXoff, shaYoff; int x, y, w, h; Data *winBase, *win, *winLine; CARD32 winSize; fbGetDrawable(&pShadow->drawable, shaBits, shaStride, shaBpp, shaXoff, shaYoff); shaBase = (Data *) shaBits; shaStride = shaStride * sizeof(FbBits) / sizeof(Data); winBase = (Data *) (*pBuf->window) (pScreen, 0, 0, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure); winStride = (Data *) (*pBuf->window) (pScreen, 1, 0, SHADOW_WINDOW_WRITE, &winSize, pBuf->closure) - winBase; while (nbox--) { x = pbox->x1; y = pbox->y1; w = (pbox->x2 - pbox->x1); h = pbox->y2 - pbox->y1; shaLine = shaBase + (y * shaStride) + x; #ifdef PREFETCH __builtin_prefetch(shaLine); #endif winLine = winBase + WINSTART(x, y); while (h--) { sha = shaLine; win = winLine; while (sha < (shaLine + w - 16)) { #ifdef PREFETCH __builtin_prefetch(sha + shaStride); #endif *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); *win = *sha++; win += WINSTEPX(winStride); } while (sha < (shaLine + w)) { *win = *sha++; win += WINSTEPX(winStride); } y++; shaLine += shaStride; winLine += WINSTEPY(); } pbox++; } /* nbox */ } xorg-server-21.1.16/miext/sync/0000755000175000017500000000000014757411133012016 5xorg-server-21.1.16/miext/sync/meson.build0000644000175000017500000000073514757411105014104 srcs_miext_sync = [ 'misync.c', 'misyncfd.c', ] hdrs_miext_sync = [ 'misync.h', 'misyncfd.h', 'misyncshm.h', 'misyncstr.h', ] if build_dri3 srcs_miext_sync += 'misyncshm.c' endif libxserver_miext_sync = static_library('libxserver_miext_sync', srcs_miext_sync, include_directories: inc, dependencies: [ common_dep, xshmfence_dep, ], ) if build_xorg install_data(hdrs_miext_sync, install_dir: xorgsdkdir) endif xorg-server-21.1.16/miext/sync/Makefile.am0000644000175000017500000000047114757411105013773 noinst_LTLIBRARIES = libsync.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = if XORG sdk_HEADERS = misync.h misyncstr.h misyncshm.h misyncfd.h endif XSHMFENCE_SRCS = misyncshm.c libsync_la_SOURCES = \ misync.c \ misync.h \ misyncfd.c \ misyncstr.h if XSHMFENCE libsync_la_SOURCES += $(XSHMFENCE_SRCS) endif xorg-server-21.1.16/miext/sync/misync.h0000644000175000017500000000672714757411105013424 /* * Copyright © 2010 NVIDIA Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _MISYNC_H_ #define _MISYNC_H_ typedef struct _SyncObject SyncObject; typedef struct _SyncFence SyncFence; typedef struct _SyncTrigger SyncTrigger; typedef void (*SyncScreenCreateFenceFunc) (ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered); typedef void (*SyncScreenDestroyFenceFunc) (ScreenPtr pScreen, SyncFence * pFence); typedef struct _syncScreenFuncs { SyncScreenCreateFenceFunc CreateFence; SyncScreenDestroyFenceFunc DestroyFence; } SyncScreenFuncsRec, *SyncScreenFuncsPtr; extern _X_EXPORT void miSyncScreenCreateFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered); extern _X_EXPORT void miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence); typedef void (*SyncFenceSetTriggeredFunc) (SyncFence * pFence); typedef void (*SyncFenceResetFunc) (SyncFence * pFence); typedef Bool (*SyncFenceCheckTriggeredFunc) (SyncFence * pFence); typedef void (*SyncFenceAddTriggerFunc) (SyncTrigger * pTrigger); typedef void (*SyncFenceDeleteTriggerFunc) (SyncTrigger * pTrigger); typedef struct _syncFenceFuncs { SyncFenceSetTriggeredFunc SetTriggered; SyncFenceResetFunc Reset; SyncFenceCheckTriggeredFunc CheckTriggered; SyncFenceAddTriggerFunc AddTrigger; SyncFenceDeleteTriggerFunc DeleteTrigger; } SyncFenceFuncsRec, *SyncFenceFuncsPtr; extern _X_EXPORT void miSyncInitFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered); extern _X_EXPORT void miSyncDestroyFence(SyncFence * pFence); extern _X_EXPORT void miSyncTriggerFence(SyncFence * pFence); extern _X_EXPORT SyncScreenFuncsPtr miSyncGetScreenFuncs(ScreenPtr pScreen); extern _X_EXPORT Bool miSyncSetup(ScreenPtr pScreen); Bool miSyncFenceCheckTriggered(SyncFence * pFence); void miSyncFenceSetTriggered(SyncFence * pFence); void miSyncFenceReset(SyncFence * pFence); void miSyncFenceAddTrigger(SyncTrigger * pTrigger); void miSyncFenceDeleteTrigger(SyncTrigger * pTrigger); int miSyncInitFenceFromFD(DrawablePtr pDraw, SyncFence *pFence, int fd, BOOL initially_triggered); int miSyncFDFromFence(DrawablePtr pDraw, SyncFence *pFence); #endif /* _MISYNC_H_ */ xorg-server-21.1.16/miext/sync/misyncstr.h0000644000175000017500000000670214757411105014146 /* * Copyright © 2010 NVIDIA Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _MISYNCSTR_H_ #define _MISYNCSTR_H_ #include #include "dix.h" #include "misync.h" #include "scrnintstr.h" #include /* Sync object types */ #define SYNC_COUNTER 0 #define SYNC_FENCE 1 struct _SyncObject { ClientPtr client; /* Owning client. 0 for system counters */ struct _SyncTriggerList *pTriglist; /* list of triggers */ XID id; /* resource ID */ unsigned char type; /* SYNC_* */ unsigned char initialized; /* FALSE if created but not initialized */ Bool beingDestroyed; /* in process of going away */ }; typedef struct _SyncCounter { SyncObject sync; /* Common sync object data */ int64_t value; /* counter value */ struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */ } SyncCounter; struct _SyncFence { SyncObject sync; /* Common sync object data */ ScreenPtr pScreen; /* Screen of this fence object */ SyncFenceFuncsRec funcs; /* Funcs for performing ops on fence */ Bool triggered; /* fence state */ PrivateRec *devPrivates; /* driver-specific per-fence data */ }; struct _SyncTrigger { SyncObject *pSync; int64_t wait_value; /* wait value */ unsigned int value_type; /* Absolute or Relative */ unsigned int test_type; /* transition or Comparison type */ int64_t test_value; /* trigger event threshold value */ Bool (*CheckTrigger)(struct _SyncTrigger *pTrigger, int64_t newval); void (*TriggerFired)(struct _SyncTrigger *pTrigger); void (*CounterDestroyed)(struct _SyncTrigger *pTrigger); }; typedef struct _SyncTriggerList { SyncTrigger *pTrigger; struct _SyncTriggerList *next; } SyncTriggerList; extern DevPrivateKeyRec miSyncScreenPrivateKey; #define SYNC_SCREEN_PRIV(pScreen) \ (SyncScreenPrivPtr) dixLookupPrivate(&pScreen->devPrivates, \ &miSyncScreenPrivateKey) typedef struct _syncScreenPriv { /* Wrappable sync-specific screen functions */ SyncScreenFuncsRec funcs; /* Wrapped screen functions */ CloseScreenProcPtr CloseScreen; } SyncScreenPrivRec, *SyncScreenPrivPtr; #endif /* _MISYNCSTR_H_ */ xorg-server-21.1.16/miext/sync/misyncshm.h0000644000175000017500000000245614757411105014127 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _MISYNCSHM_H_ #define _MISYNCSHM_H_ extern _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen); #endif /* _MISYNCSHM_H_ */ xorg-server-21.1.16/miext/sync/misyncfd.h0000644000175000017500000000402214757411105013720 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _MISYNCFD_H_ #define _MISYNCFD_H_ typedef int (*SyncScreenCreateFenceFromFdFunc) (ScreenPtr screen, SyncFence *fence, int fd, Bool initially_triggered); typedef int (*SyncScreenGetFenceFdFunc) (ScreenPtr screen, SyncFence *fence); #define SYNC_FD_SCREEN_FUNCS_VERSION 1 typedef struct _syncFdScreenFuncs { int version; SyncScreenCreateFenceFromFdFunc CreateFenceFromFd; SyncScreenGetFenceFdFunc GetFenceFd; } SyncFdScreenFuncsRec, *SyncFdScreenFuncsPtr; extern _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen, const SyncFdScreenFuncsRec *funcs); #endif /* _MISYNCFD_H_ */ xorg-server-21.1.16/miext/sync/Makefile.in0000644000175000017500000006654714757411116014026 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XSHMFENCE_TRUE@am__append_1 = $(XSHMFENCE_SRCS) subdir = miext/sync ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsync_la_LIBADD = am__libsync_la_SOURCES_DIST = misync.c misync.h misyncfd.c misyncstr.h \ misyncshm.c am__objects_1 = misyncshm.lo @XSHMFENCE_TRUE@am__objects_2 = $(am__objects_1) am_libsync_la_OBJECTS = misync.lo misyncfd.lo $(am__objects_2) libsync_la_OBJECTS = $(am_libsync_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/misync.Plo ./$(DEPDIR)/misyncfd.Plo \ ./$(DEPDIR)/misyncshm.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libsync_la_SOURCES) DIST_SOURCES = $(am__libsync_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = misync.h misyncstr.h misyncshm.h misyncfd.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libsync.la AM_CFLAGS = $(DIX_CFLAGS) AM_CPPFLAGS = @XORG_TRUE@sdk_HEADERS = misync.h misyncstr.h misyncshm.h misyncfd.h XSHMFENCE_SRCS = misyncshm.c libsync_la_SOURCES = misync.c misync.h misyncfd.c misyncstr.h \ $(am__append_1) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign miext/sync/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign miext/sync/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libsync.la: $(libsync_la_OBJECTS) $(libsync_la_DEPENDENCIES) $(EXTRA_libsync_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsync_la_OBJECTS) $(libsync_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misync.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misyncfd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misyncshm.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/misync.Plo -rm -f ./$(DEPDIR)/misyncfd.Plo -rm -f ./$(DEPDIR)/misyncshm.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/misync.Plo -rm -f ./$(DEPDIR)/misyncfd.Plo -rm -f ./$(DEPDIR)/misyncshm.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/miext/sync/misync.c0000644000175000017500000001166614757411105013415 /* * Copyright © 2010 NVIDIA Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "scrnintstr.h" #include "misync.h" #include "misyncstr.h" DevPrivateKeyRec miSyncScreenPrivateKey; /* Default implementations of the sync screen functions */ void miSyncScreenCreateFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered) { (void) pScreen; pFence->triggered = initially_triggered; } void miSyncScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence) { (void) pScreen; (void) pFence; } /* Default implementations of the per-object functions */ void miSyncFenceSetTriggered(SyncFence * pFence) { pFence->triggered = TRUE; } void miSyncFenceReset(SyncFence * pFence) { pFence->triggered = FALSE; } Bool miSyncFenceCheckTriggered(SyncFence * pFence) { return pFence->triggered; } void miSyncFenceAddTrigger(SyncTrigger * pTrigger) { (void) pTrigger; return; } void miSyncFenceDeleteTrigger(SyncTrigger * pTrigger) { (void) pTrigger; return; } /* Machine independent portion of the fence sync object implementation */ void miSyncInitFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered) { SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen); static const SyncFenceFuncsRec miSyncFenceFuncs = { &miSyncFenceSetTriggered, &miSyncFenceReset, &miSyncFenceCheckTriggered, &miSyncFenceAddTrigger, &miSyncFenceDeleteTrigger }; pFence->pScreen = pScreen; pFence->funcs = miSyncFenceFuncs; pScreenPriv->funcs.CreateFence(pScreen, pFence, initially_triggered); pFence->sync.initialized = TRUE; } void miSyncDestroyFence(SyncFence * pFence) { pFence->sync.beingDestroyed = TRUE; if (pFence->sync.initialized) { ScreenPtr pScreen = pFence->pScreen; SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen); SyncTriggerList *ptl, *pNext; /* tell all the fence's triggers that the counter has been destroyed */ for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) { (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger); pNext = ptl->next; free(ptl); /* destroy the trigger list as we go */ } pScreenPriv->funcs.DestroyFence(pScreen, pFence); } dixFreeObjectWithPrivates(pFence, PRIVATE_SYNC_FENCE); } void miSyncTriggerFence(SyncFence * pFence) { SyncTriggerList *ptl, *pNext; pFence->funcs.SetTriggered(pFence); /* run through triggers to see if any fired */ for (ptl = pFence->sync.pTriglist; ptl; ptl = pNext) { pNext = ptl->next; if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, 0)) (*ptl->pTrigger->TriggerFired) (ptl->pTrigger); } } SyncScreenFuncsPtr miSyncGetScreenFuncs(ScreenPtr pScreen) { SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen); return &pScreenPriv->funcs; } static Bool SyncCloseScreen(ScreenPtr pScreen) { SyncScreenPrivPtr pScreenPriv = SYNC_SCREEN_PRIV(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; return (*pScreen->CloseScreen) (pScreen); } Bool miSyncSetup(ScreenPtr pScreen) { SyncScreenPrivPtr pScreenPriv; static const SyncScreenFuncsRec miSyncScreenFuncs = { &miSyncScreenCreateFence, &miSyncScreenDestroyFence }; if (!dixPrivateKeyRegistered(&miSyncScreenPrivateKey)) { if (!dixRegisterPrivateKey(&miSyncScreenPrivateKey, PRIVATE_SCREEN, sizeof(SyncScreenPrivRec))) return FALSE; } pScreenPriv = SYNC_SCREEN_PRIV(pScreen); if (!pScreenPriv->funcs.CreateFence) { pScreenPriv->funcs = miSyncScreenFuncs; /* Wrap CloseScreen to clean up */ pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = SyncCloseScreen; } return TRUE; } xorg-server-21.1.16/miext/sync/misyncfd.c0000644000175000017500000000614014757411105013716 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include "scrnintstr.h" #include "misync.h" #include "misyncstr.h" #include "misyncfd.h" #include "pixmapstr.h" static DevPrivateKeyRec syncFdScreenPrivateKey; typedef struct _SyncFdScreenPrivate { SyncFdScreenFuncsRec funcs; } SyncFdScreenPrivateRec, *SyncFdScreenPrivatePtr; static inline SyncFdScreenPrivatePtr sync_fd_screen_priv(ScreenPtr pScreen) { if (!dixPrivateKeyRegistered(&syncFdScreenPrivateKey)) return NULL; return dixLookupPrivate(&pScreen->devPrivates, &syncFdScreenPrivateKey); } int miSyncInitFenceFromFD(DrawablePtr pDraw, SyncFence *pFence, int fd, BOOL initially_triggered) { SyncFdScreenPrivatePtr priv = sync_fd_screen_priv(pDraw->pScreen); if (!priv) return BadMatch; return (*priv->funcs.CreateFenceFromFd)(pDraw->pScreen, pFence, fd, initially_triggered); } int miSyncFDFromFence(DrawablePtr pDraw, SyncFence *pFence) { SyncFdScreenPrivatePtr priv = sync_fd_screen_priv(pDraw->pScreen); if (!priv) return -1; return (*priv->funcs.GetFenceFd)(pDraw->pScreen, pFence); } _X_EXPORT Bool miSyncFdScreenInit(ScreenPtr pScreen, const SyncFdScreenFuncsRec *funcs) { SyncFdScreenPrivatePtr priv; /* Check to see if we've already been initialized */ if (sync_fd_screen_priv(pScreen) != NULL) return FALSE; if (!miSyncSetup(pScreen)) return FALSE; if (!dixPrivateKeyRegistered(&syncFdScreenPrivateKey)) { if (!dixRegisterPrivateKey(&syncFdScreenPrivateKey, PRIVATE_SCREEN, 0)) return FALSE; } priv = calloc(1, sizeof (SyncFdScreenPrivateRec)); if (!priv) return FALSE; /* Will require version checks when there are multiple versions * of the funcs structure */ priv->funcs = *funcs; dixSetPrivate(&pScreen->devPrivates, &syncFdScreenPrivateKey, priv); return TRUE; } xorg-server-21.1.16/miext/sync/misyncshm.c0000644000175000017500000001226014757411105014114 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include "scrnintstr.h" #include "misync.h" #include "misyncstr.h" #include "misyncshm.h" #include "misyncfd.h" #include "pixmapstr.h" #include #include #include #include static DevPrivateKeyRec syncShmFencePrivateKey; typedef struct _SyncShmFencePrivate { struct xshmfence *fence; int fd; } SyncShmFencePrivateRec, *SyncShmFencePrivatePtr; #define SYNC_FENCE_PRIV(pFence) \ (SyncShmFencePrivatePtr) dixLookupPrivate(&pFence->devPrivates, &syncShmFencePrivateKey) static void miSyncShmFenceSetTriggered(SyncFence * pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); if (pPriv->fence) xshmfence_trigger(pPriv->fence); miSyncFenceSetTriggered(pFence); } static void miSyncShmFenceReset(SyncFence * pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); if (pPriv->fence) xshmfence_reset(pPriv->fence); miSyncFenceReset(pFence); } static Bool miSyncShmFenceCheckTriggered(SyncFence * pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); if (pPriv->fence) return xshmfence_query(pPriv->fence); else return miSyncFenceCheckTriggered(pFence); } static void miSyncShmFenceAddTrigger(SyncTrigger * pTrigger) { miSyncFenceAddTrigger(pTrigger); } static void miSyncShmFenceDeleteTrigger(SyncTrigger * pTrigger) { miSyncFenceDeleteTrigger(pTrigger); } static const SyncFenceFuncsRec miSyncShmFenceFuncs = { &miSyncShmFenceSetTriggered, &miSyncShmFenceReset, &miSyncShmFenceCheckTriggered, &miSyncShmFenceAddTrigger, &miSyncShmFenceDeleteTrigger }; static void miSyncShmScreenCreateFence(ScreenPtr pScreen, SyncFence * pFence, Bool initially_triggered) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); pPriv->fence = NULL; miSyncScreenCreateFence(pScreen, pFence, initially_triggered); pFence->funcs = miSyncShmFenceFuncs; } static void miSyncShmScreenDestroyFence(ScreenPtr pScreen, SyncFence * pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); if (pPriv->fence) { xshmfence_trigger(pPriv->fence); xshmfence_unmap_shm(pPriv->fence); close(pPriv->fd); } miSyncScreenDestroyFence(pScreen, pFence); } static int miSyncShmCreateFenceFromFd(ScreenPtr pScreen, SyncFence *pFence, int fd, Bool initially_triggered) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); miSyncInitFence(pScreen, pFence, initially_triggered); fd = os_move_fd(fd); pPriv->fence = xshmfence_map_shm(fd); if (pPriv->fence) { pPriv->fd = fd; return Success; } else close(fd); return BadValue; } static int miSyncShmGetFenceFd(ScreenPtr pScreen, SyncFence *pFence) { SyncShmFencePrivatePtr pPriv = SYNC_FENCE_PRIV(pFence); if (!pPriv->fence) { pPriv->fd = xshmfence_alloc_shm(); if (pPriv->fd < 0) return -1; pPriv->fd = os_move_fd(pPriv->fd); pPriv->fence = xshmfence_map_shm(pPriv->fd); if (!pPriv->fence) { close (pPriv->fd); return -1; } } return pPriv->fd; } static const SyncFdScreenFuncsRec miSyncShmScreenFuncs = { .version = SYNC_FD_SCREEN_FUNCS_VERSION, .CreateFenceFromFd = miSyncShmCreateFenceFromFd, .GetFenceFd = miSyncShmGetFenceFd }; _X_EXPORT Bool miSyncShmScreenInit(ScreenPtr pScreen) { SyncScreenFuncsPtr funcs; if (!miSyncFdScreenInit(pScreen, &miSyncShmScreenFuncs)) return FALSE; if (!dixPrivateKeyRegistered(&syncShmFencePrivateKey)) { if (!dixRegisterPrivateKey(&syncShmFencePrivateKey, PRIVATE_SYNC_FENCE, sizeof(SyncShmFencePrivateRec))) return FALSE; } funcs = miSyncGetScreenFuncs(pScreen); funcs->CreateFence = miSyncShmScreenCreateFence; funcs->DestroyFence = miSyncShmScreenDestroyFence; return TRUE; } xorg-server-21.1.16/miext/Makefile.am0000644000175000017500000000004614757411105013015 SUBDIRS = sync damage shadow rootless xorg-server-21.1.16/miext/Makefile.in0000644000175000017500000006177314757411116013046 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = miext ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = sync damage shadow rootless all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign miext/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign miext/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/os/0000755000175000017500000000000014757411133010335 5xorg-server-21.1.16/os/meson.build0000644000175000017500000000476014757411105012425 srcs_os = [ 'WaitFor.c', 'access.c', 'auth.c', 'backtrace.c', 'client.c', 'connection.c', 'inputthread.c', 'io.c', 'mitauth.c', 'oscolor.c', 'osinit.c', 'ospoll.c', 'utils.c', 'xdmauth.c', 'xsha1.c', 'xstrans.c', 'xprintf.c', 'log.c', ] # Wrapper code for missing C library functions. Note that conf_data contains either '1' or false. srcs_libc = [] if conf_data.get('HAVE_REALLOCARRAY').to_int() == 0 srcs_libc += 'reallocarray.c' endif if conf_data.get('HAVE_STRCASECMP').to_int() == 0 srcs_libc += 'strcasecmp.c' endif if conf_data.get('HAVE_STRCASESTR').to_int() == 0 srcs_libc += 'strcasestr.c' endif if conf_data.get('HAVE_STRLCAT').to_int() == 0 srcs_libc += 'strlcat.c' endif if conf_data.get('HAVE_STRLCPY').to_int() == 0 srcs_libc += 'strlcpy.c' endif if conf_data.get('HAVE_STRNDUP').to_int() == 0 srcs_libc += 'strndup.c' endif if conf_data.get('HAVE_TIMINGSAFE_MEMCMP').to_int() == 0 srcs_libc += 'timingsafe_memcmp.c' endif if conf_data.get('HAVE_POLL').to_int() == 0 srcs_os += 'xserver_poll.c' endif if conf_data.get('BUSFAULT').to_int() != 0 srcs_os += 'busfault.c' endif if get_option('xdmcp') srcs_os += 'xdmcp.c' endif rpc_dep = [] if get_option('secure-rpc') # prefer libtirpc (if available), otherwise ensure RPC functions are # provided by libc. rpc_dep = dependency('libtirpc', required: false) if not (rpc_dep.found() or cc.has_header('rpc/rpc.h')) error('secure-rpc requested, but neither libtirpc or libc RPC support were found') endif # XXX: also check if RPC library provides xdr_opaque_auth, authdes_(sec)create ??? srcs_os += 'rpcauth.c' endif os_dep = [] os_c_args = [] if get_option('xres') # Only the XRes extension cares about the client ID. os_c_args += '-DCLIENTIDS' if host_machine.system() == 'openbsd' os_dep += cc.find_library('kvm') endif endif libxlibc = [] if srcs_libc.length() > 0 libxlibc = static_library('libxlibc', srcs_libc, include_directories: inc, dependencies: [ xproto_dep, ], ) endif if enable_input_thread os_dep += cc.find_library('pthread') endif libxserver_os = static_library('libxserver_os', srcs_os, include_directories: inc, dependencies: [ dtrace_dep, common_dep, dl_dep, sha1_dep, rpc_dep, os_dep, dependency('xau') ], c_args: os_c_args, link_with: libxlibc, ) xorg-server-21.1.16/os/Makefile.am0000644000175000017500000000234214757411105012311 noinst_LTLIBRARIES = libos.la AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS) SECURERPC_SRCS = rpcauth.c XDMCP_SRCS = xdmcp.c XORG_SRCS = log.c BUSFAULT_SRCS = busfault.c XSERVER_POLL_SRCS=xserver_poll.c libos_la_SOURCES = \ WaitFor.c \ access.c \ auth.c \ backtrace.c \ client.c \ connection.c \ inputthread.c \ io.c \ mitauth.c \ oscolor.c \ osdep.h \ osinit.c \ ospoll.c \ ospoll.h \ utils.c \ xdmauth.c \ xsha1.c \ xstrans.c \ xprintf.c \ $(XORG_SRCS) libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS) $(LTLIBOBJS) if SECURE_RPC libos_la_SOURCES += $(SECURERPC_SRCS) endif if POLL else libos_la_SOURCES += $(XSERVER_POLL_SRCS) endif if XDMCP libos_la_SOURCES += $(XDMCP_SRCS) endif if HAVE_LIBUNWIND AM_CFLAGS += $(LIBUNWIND_CFLAGS) libos_la_LIBADD += $(LIBUNWIND_LIBS) endif if BUSFAULT libos_la_SOURCES += $(BUSFAULT_SRCS) endif EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS) if SPECIAL_DTRACE_OBJECTS # Generate dtrace object code for probes in libos & libdix dtrace.o: $(top_srcdir)/include/Xserver.d libos.la $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d .libs/*.o ../dix/.libs/*.o noinst_PROGRAMS = os.O os_O_SOURCES = os.O: dtrace.o libos.la $(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o endif xorg-server-21.1.16/os/Makefile.in0000644000175000017500000010057714757411116012335 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @SECURE_RPC_TRUE@am__append_1 = $(SECURERPC_SRCS) @POLL_FALSE@am__append_2 = $(XSERVER_POLL_SRCS) @XDMCP_TRUE@am__append_3 = $(XDMCP_SRCS) @HAVE_LIBUNWIND_TRUE@am__append_4 = $(LIBUNWIND_CFLAGS) @HAVE_LIBUNWIND_TRUE@am__append_5 = $(LIBUNWIND_LIBS) @BUSFAULT_TRUE@am__append_6 = $(BUSFAULT_SRCS) @SPECIAL_DTRACE_OBJECTS_TRUE@noinst_PROGRAMS = os.O$(EXEEXT) subdir = os ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_LIBUNWIND_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) libos_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(LTLIBOBJS) \ $(am__DEPENDENCIES_2) am__libos_la_SOURCES_DIST = WaitFor.c access.c auth.c backtrace.c \ client.c connection.c inputthread.c io.c mitauth.c oscolor.c \ osdep.h osinit.c ospoll.c ospoll.h utils.c xdmauth.c xsha1.c \ xstrans.c xprintf.c log.c rpcauth.c xserver_poll.c xdmcp.c \ busfault.c am__objects_1 = log.lo am__objects_2 = rpcauth.lo @SECURE_RPC_TRUE@am__objects_3 = $(am__objects_2) am__objects_4 = xserver_poll.lo @POLL_FALSE@am__objects_5 = $(am__objects_4) am__objects_6 = xdmcp.lo @XDMCP_TRUE@am__objects_7 = $(am__objects_6) am__objects_8 = busfault.lo @BUSFAULT_TRUE@am__objects_9 = $(am__objects_8) am_libos_la_OBJECTS = WaitFor.lo access.lo auth.lo backtrace.lo \ client.lo connection.lo inputthread.lo io.lo mitauth.lo \ oscolor.lo osinit.lo ospoll.lo utils.lo xdmauth.lo xsha1.lo \ xstrans.lo xprintf.lo $(am__objects_1) $(am__objects_3) \ $(am__objects_5) $(am__objects_7) $(am__objects_9) libos_la_OBJECTS = $(am_libos_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am_os_O_OBJECTS = os_O_OBJECTS = $(am_os_O_OBJECTS) os_O_LDADD = $(LDADD) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = $(DEPDIR)/reallocarray.Plo \ $(DEPDIR)/strcasecmp.Plo $(DEPDIR)/strcasestr.Plo \ $(DEPDIR)/strlcat.Plo $(DEPDIR)/strlcpy.Plo \ $(DEPDIR)/strndup.Plo $(DEPDIR)/timingsafe_memcmp.Plo \ ./$(DEPDIR)/WaitFor.Plo ./$(DEPDIR)/access.Plo \ ./$(DEPDIR)/auth.Plo ./$(DEPDIR)/backtrace.Plo \ ./$(DEPDIR)/busfault.Plo ./$(DEPDIR)/client.Plo \ ./$(DEPDIR)/connection.Plo ./$(DEPDIR)/inputthread.Plo \ ./$(DEPDIR)/io.Plo ./$(DEPDIR)/log.Plo ./$(DEPDIR)/mitauth.Plo \ ./$(DEPDIR)/oscolor.Plo ./$(DEPDIR)/osinit.Plo \ ./$(DEPDIR)/ospoll.Plo ./$(DEPDIR)/rpcauth.Plo \ ./$(DEPDIR)/utils.Plo ./$(DEPDIR)/xdmauth.Plo \ ./$(DEPDIR)/xdmcp.Plo ./$(DEPDIR)/xprintf.Plo \ ./$(DEPDIR)/xserver_poll.Plo ./$(DEPDIR)/xsha1.Plo \ ./$(DEPDIR)/xstrans.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libos_la_SOURCES) $(os_O_SOURCES) DIST_SOURCES = $(am__libos_la_SOURCES_DIST) $(os_O_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ reallocarray.c strcasecmp.c strcasestr.c strlcat.c strlcpy.c \ strndup.c timingsafe_memcmp.c DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libos.la AM_CFLAGS = $(DIX_CFLAGS) $(SHA1_CFLAGS) $(am__append_4) SECURERPC_SRCS = rpcauth.c XDMCP_SRCS = xdmcp.c XORG_SRCS = log.c BUSFAULT_SRCS = busfault.c XSERVER_POLL_SRCS = xserver_poll.c libos_la_SOURCES = WaitFor.c access.c auth.c backtrace.c client.c \ connection.c inputthread.c io.c mitauth.c oscolor.c osdep.h \ osinit.c ospoll.c ospoll.h utils.c xdmauth.c xsha1.c xstrans.c \ xprintf.c $(XORG_SRCS) $(am__append_1) $(am__append_2) \ $(am__append_3) $(am__append_6) libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS) $(LTLIBOBJS) \ $(am__append_5) EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS) @SPECIAL_DTRACE_OBJECTS_TRUE@os_O_SOURCES = all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign os/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign os/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libos.la: $(libos_la_OBJECTS) $(libos_la_DEPENDENCIES) $(EXTRA_libos_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libos_la_OBJECTS) $(libos_la_LIBADD) $(LIBS) @SPECIAL_DTRACE_OBJECTS_FALSE@os.O$(EXEEXT): $(os_O_OBJECTS) $(os_O_DEPENDENCIES) $(EXTRA_os_O_DEPENDENCIES) @SPECIAL_DTRACE_OBJECTS_FALSE@ @rm -f os.O$(EXEEXT) @SPECIAL_DTRACE_OBJECTS_FALSE@ $(AM_V_CCLD)$(LINK) $(os_O_OBJECTS) $(os_O_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/reallocarray.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasestr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcat.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strlcpy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strndup.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/timingsafe_memcmp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WaitFor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/access.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/auth.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backtrace.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/busfault.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/client.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/connection.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inputthread.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mitauth.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oscolor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/osinit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ospoll.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rpcauth.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmauth.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xdmcp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprintf.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xserver_poll.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xsha1.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrans.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -f $(DEPDIR)/reallocarray.Plo -rm -f $(DEPDIR)/strcasecmp.Plo -rm -f $(DEPDIR)/strcasestr.Plo -rm -f $(DEPDIR)/strlcat.Plo -rm -f $(DEPDIR)/strlcpy.Plo -rm -f $(DEPDIR)/strndup.Plo -rm -f $(DEPDIR)/timingsafe_memcmp.Plo -rm -f ./$(DEPDIR)/WaitFor.Plo -rm -f ./$(DEPDIR)/access.Plo -rm -f ./$(DEPDIR)/auth.Plo -rm -f ./$(DEPDIR)/backtrace.Plo -rm -f ./$(DEPDIR)/busfault.Plo -rm -f ./$(DEPDIR)/client.Plo -rm -f ./$(DEPDIR)/connection.Plo -rm -f ./$(DEPDIR)/inputthread.Plo -rm -f ./$(DEPDIR)/io.Plo -rm -f ./$(DEPDIR)/log.Plo -rm -f ./$(DEPDIR)/mitauth.Plo -rm -f ./$(DEPDIR)/oscolor.Plo -rm -f ./$(DEPDIR)/osinit.Plo -rm -f ./$(DEPDIR)/ospoll.Plo -rm -f ./$(DEPDIR)/rpcauth.Plo -rm -f ./$(DEPDIR)/utils.Plo -rm -f ./$(DEPDIR)/xdmauth.Plo -rm -f ./$(DEPDIR)/xdmcp.Plo -rm -f ./$(DEPDIR)/xprintf.Plo -rm -f ./$(DEPDIR)/xserver_poll.Plo -rm -f ./$(DEPDIR)/xsha1.Plo -rm -f ./$(DEPDIR)/xstrans.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(DEPDIR)/reallocarray.Plo -rm -f $(DEPDIR)/strcasecmp.Plo -rm -f $(DEPDIR)/strcasestr.Plo -rm -f $(DEPDIR)/strlcat.Plo -rm -f $(DEPDIR)/strlcpy.Plo -rm -f $(DEPDIR)/strndup.Plo -rm -f $(DEPDIR)/timingsafe_memcmp.Plo -rm -f ./$(DEPDIR)/WaitFor.Plo -rm -f ./$(DEPDIR)/access.Plo -rm -f ./$(DEPDIR)/auth.Plo -rm -f ./$(DEPDIR)/backtrace.Plo -rm -f ./$(DEPDIR)/busfault.Plo -rm -f ./$(DEPDIR)/client.Plo -rm -f ./$(DEPDIR)/connection.Plo -rm -f ./$(DEPDIR)/inputthread.Plo -rm -f ./$(DEPDIR)/io.Plo -rm -f ./$(DEPDIR)/log.Plo -rm -f ./$(DEPDIR)/mitauth.Plo -rm -f ./$(DEPDIR)/oscolor.Plo -rm -f ./$(DEPDIR)/osinit.Plo -rm -f ./$(DEPDIR)/ospoll.Plo -rm -f ./$(DEPDIR)/rpcauth.Plo -rm -f ./$(DEPDIR)/utils.Plo -rm -f ./$(DEPDIR)/xdmauth.Plo -rm -f ./$(DEPDIR)/xdmcp.Plo -rm -f ./$(DEPDIR)/xprintf.Plo -rm -f ./$(DEPDIR)/xserver_poll.Plo -rm -f ./$(DEPDIR)/xsha1.Plo -rm -f ./$(DEPDIR)/xstrans.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Generate dtrace object code for probes in libos & libdix @SPECIAL_DTRACE_OBJECTS_TRUE@dtrace.o: $(top_srcdir)/include/Xserver.d libos.la @SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)$(DTRACE) -G -C -o $@ -s $(top_srcdir)/include/Xserver.d .libs/*.o ../dix/.libs/*.o @SPECIAL_DTRACE_OBJECTS_TRUE@os.O: dtrace.o libos.la @SPECIAL_DTRACE_OBJECTS_TRUE@ $(AM_V_GEN)ld -r -o $@ dtrace.o .libs/*.o # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/os/reallocarray.c0000644000175000017500000000263114757411105013102 /* $OpenBSD: reallocarray.c,v 1.2 2014/12/08 03:45:00 bcook Exp $ */ /* * Copyright (c) 2008 Otto Moerbeek * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, 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 #endif #include #include #include #include #include "os.h" /* * This is sqrt(SIZE_MAX+1), as s1*s2 <= SIZE_MAX * if both s1 < MUL_NO_OVERFLOW and s2 < MUL_NO_OVERFLOW */ #define MUL_NO_OVERFLOW ((size_t)1 << (sizeof(size_t) * 4)) void * reallocarray(void *optr, size_t nmemb, size_t size) { if ((nmemb >= MUL_NO_OVERFLOW || size >= MUL_NO_OVERFLOW) && nmemb > 0 && SIZE_MAX / nmemb < size) { errno = ENOMEM; return NULL; } return realloc(optr, size * nmemb); } xorg-server-21.1.16/os/strcasecmp.c0000644000175000017500000000460514757411105012571 /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "dix.h" #ifndef HAVE_STRCASECMP int xstrcasecmp(const char *str1, const char *str2) { const u_char *us1 = (const u_char *) str1, *us2 = (const u_char *) str2; while (tolower(*us1) == tolower(*us2)) { if (*us1++ == '\0') return 0; us2++; } return (tolower(*us1) - tolower(*us2)); } #endif #ifndef HAVE_STRNCASECMP int xstrncasecmp(const char *s1, const char *s2, size_t n) { if (n != 0) { const u_char *us1 = (const u_char *) s1, *us2 = (const u_char *) s2; do { if (tolower(*us1) != tolower(*us2++)) return (tolower(*us1) - tolower(*--us2)); if (*us1++ == '\0') break; } while (--n != 0); } return 0; } #endif xorg-server-21.1.16/os/strcasestr.c0000644000175000017500000000442114757411105012616 /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Chris Torek. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include /* * Find the first occurrence of find in s, ignore case. */ #ifndef HAVE_STRCASESTR char * xstrcasestr(const char *s, const char *find) { char c, sc; size_t len; if ((c = *find++) != 0) { c = tolower((unsigned char) c); len = strlen(find); do { do { if ((sc = *s++) == 0) return NULL; } while ((char) tolower((unsigned char) sc) != c); } while (strncasecmp(s, find, len) != 0); s--; } return ((char *) s); } #endif xorg-server-21.1.16/os/strlcat.c0000644000175000017500000000342714757411105012102 /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE * FOR ANY SPECIAL, DIRECT, 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 #endif #include #include #include "os.h" /* * Appends src to string dst of size siz (unlike strncat, siz is the * full size of dst, not space left). At most siz-1 characters * will be copied. Always NUL terminates (unless siz <= strlen(dst)). * Returns strlen(src) + MIN(siz, strlen(initial dst)). * If retval >= siz, truncation occurred. */ size_t strlcat(char *dst, const char *src, size_t siz) { register char *d = dst; register const char *s = src; register size_t n = siz; size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (n-- != 0 && *d != '\0') d++; dlen = d - dst; n = siz - dlen; if (n == 0) return (dlen + strlen(s)); while (*s != '\0') { if (n != 1) { *d++ = *s; n--; } s++; } *d = '\0'; return (dlen + (s - src)); /* count does not include NUL */ } xorg-server-21.1.16/os/strlcpy.c0000644000175000017500000000331114757411105012116 /* * Copyright (c) 1998 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE * FOR ANY SPECIAL, DIRECT, 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 #endif #include #include #include "os.h" #ifndef HAVE_STRLCPY /* * Copy src to string dst of size siz. At most siz-1 characters * will be copied. Always NUL terminates (unless siz == 0). * Returns strlen(src); if retval >= siz, truncation occurred. */ size_t strlcpy(char *dst, const char *src, size_t siz) { register char *d = dst; register const char *s = src; register size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { if ((*d++ = *s++) == 0) break; } while (--n != 0); } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++); } return s - src - 1; /* count does not include NUL */ } #endif xorg-server-21.1.16/os/strndup.c0000644000175000017500000000372714757411105012130 /* * Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "os.h" char * strndup(const char *str, size_t n) { size_t len; char *copy; for (len = 0; len < n && str[len]; len++) continue; if ((copy = malloc(len + 1)) == NULL) return (NULL); memcpy(copy, str, len); copy[len] = '\0'; return (copy); } xorg-server-21.1.16/os/timingsafe_memcmp.c0000644000175000017500000000312514757411105014105 /* * Copyright (c) 2014 Google Inc. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, 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. */ #include #include #include #include #include "os.h" int timingsafe_memcmp(const void *b1, const void *b2, size_t len) { const unsigned char *p1 = b1, *p2 = b2; size_t i; int res = 0, done = 0; for (i = 0; i < len; i++) { /* lt is -1 if p1[i] < p2[i]; else 0. */ int lt = (p1[i] - p2[i]) >> CHAR_BIT; /* gt is -1 if p1[i] > p2[i]; else 0. */ int gt = (p2[i] - p1[i]) >> CHAR_BIT; /* cmp is 1 if p1[i] > p2[i]; -1 if p1[i] < p2[i]; else 0. */ int cmp = lt - gt; /* set res = cmp if !done. */ res |= cmp & ~done; /* set done if p1[i] != p2[i]. */ done |= lt | gt; } return (res); } xorg-server-21.1.16/os/WaitFor.c0000644000175000017500000003255714757411105012007 /*********************************************************** 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. ******************************************************************/ /***************************************************************** * OS Dependent input routines: * * WaitForSomething * TimerForce, TimerSet, TimerCheck, TimerFree * *****************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include /* for strings, fcntl, time */ #include #include #include #include "misc.h" #include "osdep.h" #include "dixstruct.h" #include "opaque.h" #ifdef DPMSExtension #include "dpmsproc.h" #endif #include "busfault.h" #ifdef WIN32 /* Error codes from windows sockets differ from fileio error codes */ #undef EINTR #define EINTR WSAEINTR #undef EINVAL #define EINVAL WSAEINVAL #undef EBADF #define EBADF WSAENOTSOCK /* Windows select does not set errno. Use GetErrno as wrapper for WSAGetLastError */ #define GetErrno WSAGetLastError #else /* This is just a fallback to errno to hide the differences between unix and Windows in the code */ #define GetErrno() errno #endif #ifdef DPMSExtension #include #endif struct _OsTimerRec { struct xorg_list list; CARD32 expires; CARD32 delta; OsTimerCallback callback; void *arg; }; static void DoTimer(OsTimerPtr timer, CARD32 now); static void DoTimers(CARD32 now); static void CheckAllTimers(void); static volatile struct xorg_list timers; static inline OsTimerPtr first_timer(void) { /* inline xorg_list_is_empty which can't handle volatile */ if (timers.next == &timers) return NULL; return xorg_list_first_entry(&timers, struct _OsTimerRec, list); } /* * Compute timeout until next timer, running * any expired timers */ static int check_timers(void) { OsTimerPtr timer; if ((timer = first_timer()) != NULL) { CARD32 now = GetTimeInMillis(); int timeout = timer->expires - now; if (timeout <= 0) { DoTimers(now); } else { /* Make sure the timeout is sane */ if (timeout < timer->delta + 250) return timeout; /* time has rewound. reset the timers. */ CheckAllTimers(); } return 0; } return -1; } /***************** * WaitForSomething: * Make the server suspend until there is * 1. data from clients or * 2. input events available or * 3. ddx notices something of interest (graphics * queue ready, etc.) or * 4. clients that have buffered replies/events are ready * * If the time between INPUT events is * greater than ScreenSaverTime, the display is turned off (or * saved, depending on the hardware). So, WaitForSomething() * has to handle this also (that's why the select() has a timeout. * For more info on ClientsWithInput, see ReadRequestFromClient(). * pClientsReady is an array to store ready client->index values into. *****************/ Bool WaitForSomething(Bool are_ready) { int i; int timeout; int pollerr; static Bool were_ready; Bool timer_is_running; timer_is_running = were_ready; if (were_ready && !are_ready) { timer_is_running = FALSE; SmartScheduleStopTimer(); } were_ready = FALSE; #ifdef BUSFAULT busfault_check(); #endif /* We need a while loop here to handle crashed connections and the screen saver timeout */ while (1) { /* deal with any blocked jobs */ if (workQueue) { ProcessWorkQueue(); } timeout = check_timers(); are_ready = clients_are_ready(); if (are_ready) timeout = 0; BlockHandler(&timeout); if (NewOutputPending) FlushAllOutput(); /* keep this check close to select() call to minimize race */ if (dispatchException) i = -1; else i = ospoll_wait(server_poll, timeout); pollerr = GetErrno(); WakeupHandler(i); if (i <= 0) { /* An error or timeout occurred */ if (dispatchException) return FALSE; if (i < 0) { if (pollerr != EINTR && !ETEST(pollerr)) { ErrorF("WaitForSomething(): poll: %s\n", strerror(pollerr)); } } } else are_ready = clients_are_ready(); if (InputCheckPending()) return FALSE; if (are_ready) { were_ready = TRUE; if (!timer_is_running) SmartScheduleStartTimer(); return TRUE; } } } void AdjustWaitForDelay(void *waitTime, int newdelay) { int *timeoutp = waitTime; int timeout = *timeoutp; if (timeout < 0 || newdelay < timeout) *timeoutp = newdelay; } static inline Bool timer_pending(OsTimerPtr timer) { return !xorg_list_is_empty(&timer->list); } /* If time has rewound, re-run every affected timer. * Timers might drop out of the list, so we have to restart every time. */ static void CheckAllTimers(void) { OsTimerPtr timer; CARD32 now; input_lock(); start: now = GetTimeInMillis(); xorg_list_for_each_entry(timer, &timers, list) { if (timer->expires - now > timer->delta + 250) { DoTimer(timer, now); goto start; } } input_unlock(); } static void DoTimer(OsTimerPtr timer, CARD32 now) { CARD32 newTime; xorg_list_del(&timer->list); newTime = (*timer->callback) (timer, now, timer->arg); if (newTime) TimerSet(timer, 0, newTime, timer->callback, timer->arg); } static void DoTimers(CARD32 now) { OsTimerPtr timer; input_lock(); while ((timer = first_timer())) { if ((int) (timer->expires - now) > 0) break; DoTimer(timer, now); } input_unlock(); } OsTimerPtr TimerSet(OsTimerPtr timer, int flags, CARD32 millis, OsTimerCallback func, void *arg) { OsTimerPtr existing; CARD32 now = GetTimeInMillis(); if (!timer) { timer = calloc(1, sizeof(struct _OsTimerRec)); if (!timer) return NULL; xorg_list_init(&timer->list); } else { input_lock(); if (timer_pending(timer)) { xorg_list_del(&timer->list); if (flags & TimerForceOld) (void) (*timer->callback) (timer, now, timer->arg); } input_unlock(); } if (!millis) return timer; if (flags & TimerAbsolute) { timer->delta = millis - now; } else { timer->delta = millis; millis += now; } timer->expires = millis; timer->callback = func; timer->arg = arg; input_lock(); /* Sort into list */ xorg_list_for_each_entry(existing, &timers, list) if ((int) (existing->expires - millis) > 0) break; /* This even works at the end of the list -- existing->list will be timers */ xorg_list_append(&timer->list, &existing->list); /* Check to see if the timer is ready to run now */ if ((int) (millis - now) <= 0) DoTimer(timer, now); input_unlock(); return timer; } Bool TimerForce(OsTimerPtr timer) { int pending; input_lock(); pending = timer_pending(timer); if (pending) DoTimer(timer, GetTimeInMillis()); input_unlock(); return pending; } void TimerCancel(OsTimerPtr timer) { if (!timer) return; input_lock(); xorg_list_del(&timer->list); input_unlock(); } void TimerFree(OsTimerPtr timer) { if (!timer) return; TimerCancel(timer); free(timer); } void TimerCheck(void) { DoTimers(GetTimeInMillis()); } void TimerInit(void) { static Bool been_here; OsTimerPtr timer, tmp; if (!been_here) { been_here = TRUE; xorg_list_init((struct xorg_list*) &timers); } xorg_list_for_each_entry_safe(timer, tmp, &timers, list) { xorg_list_del(&timer->list); free(timer); } } #ifdef DPMSExtension #define DPMS_CHECK_MODE(mode,time)\ if (time > 0 && DPMSPowerLevel < mode && timeout >= time)\ DPMSSet(serverClient, mode); #define DPMS_CHECK_TIMEOUT(time)\ if (time > 0 && (time - timeout) > 0)\ return time - timeout; static CARD32 NextDPMSTimeout(INT32 timeout) { /* * Return the amount of time remaining until we should set * the next power level. Fallthroughs are intentional. */ switch (DPMSPowerLevel) { case DPMSModeOn: DPMS_CHECK_TIMEOUT(DPMSStandbyTime) /* fallthrough */ case DPMSModeStandby: DPMS_CHECK_TIMEOUT(DPMSSuspendTime) /* fallthrough */ case DPMSModeSuspend: DPMS_CHECK_TIMEOUT(DPMSOffTime) /* fallthrough */ default: /* DPMSModeOff */ return 0; } } #endif /* DPMSExtension */ static CARD32 ScreenSaverTimeoutExpire(OsTimerPtr timer, CARD32 now, void *arg) { INT32 timeout = now - LastEventTime(XIAllDevices).milliseconds; CARD32 nextTimeout = 0; #ifdef DPMSExtension /* * Check each mode lowest to highest, since a lower mode can * have the same timeout as a higher one. */ if (DPMSEnabled) { DPMS_CHECK_MODE(DPMSModeOff, DPMSOffTime) DPMS_CHECK_MODE(DPMSModeSuspend, DPMSSuspendTime) DPMS_CHECK_MODE(DPMSModeStandby, DPMSStandbyTime) nextTimeout = NextDPMSTimeout(timeout); } /* * Only do the screensaver checks if we're not in a DPMS * power saving mode */ if (DPMSPowerLevel != DPMSModeOn) return nextTimeout; #endif /* DPMSExtension */ if (!ScreenSaverTime) return nextTimeout; if (timeout < ScreenSaverTime) { return nextTimeout > 0 ? min(ScreenSaverTime - timeout, nextTimeout) : ScreenSaverTime - timeout; } ResetOsBuffers(); /* not ideal, but better than nothing */ dixSaveScreens(serverClient, SCREEN_SAVER_ON, ScreenSaverActive); if (ScreenSaverInterval > 0) { nextTimeout = nextTimeout > 0 ? min(ScreenSaverInterval, nextTimeout) : ScreenSaverInterval; } return nextTimeout; } static OsTimerPtr ScreenSaverTimer = NULL; void FreeScreenSaverTimer(void) { if (ScreenSaverTimer) { TimerFree(ScreenSaverTimer); ScreenSaverTimer = NULL; } } void SetScreenSaverTimer(void) { CARD32 timeout = 0; #ifdef DPMSExtension if (DPMSEnabled) { /* * A higher DPMS level has a timeout that's either less * than or equal to that of a lower DPMS level. */ if (DPMSStandbyTime > 0) timeout = DPMSStandbyTime; else if (DPMSSuspendTime > 0) timeout = DPMSSuspendTime; else if (DPMSOffTime > 0) timeout = DPMSOffTime; } #endif if (ScreenSaverTime > 0) { timeout = timeout > 0 ? min(ScreenSaverTime, timeout) : ScreenSaverTime; } #ifdef SCREENSAVER if (timeout && !screenSaverSuspended) { #else if (timeout) { #endif ScreenSaverTimer = TimerSet(ScreenSaverTimer, 0, timeout, ScreenSaverTimeoutExpire, NULL); } else if (ScreenSaverTimer) { FreeScreenSaverTimer(); } } xorg-server-21.1.16/os/access.c0000644000175000017500000017014714757411105011673 /*********************************************************** Copyright 1987, 1998 The Open Group All rights reserved. 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, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. 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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. X Window System is a trademark of 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. ******************************************************************/ /* * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #include #include #include #include "misc.h" #include #include #ifndef WIN32 #include #include #include #ifndef NO_LOCAL_CLIENT_CRED #include #endif #if defined(TCPCONN) #include #endif /* TCPCONN || STREAMSCONN */ #ifdef HAVE_GETPEERUCRED #include #ifdef __sun #include #endif #endif #ifdef HAVE_SYS_UN_H #include #endif #if defined(SVR4) || (defined(SYSV) && defined(__i386__)) || defined(__GNU__) #include #endif #if defined(SYSV) && defined(__i386__) #include #endif #ifdef __GNU__ #undef SIOCGIFCONF #include #else /*!__GNU__ */ #include #endif /*__GNU__ */ #ifdef SVR4 #include #include #endif #include #ifdef CSRG_BASED #include #if (BSD >= 199103) #define VARIABLE_IFREQ #endif #endif #ifdef BSD44SOCKETS #ifndef VARIABLE_IFREQ #define VARIABLE_IFREQ #endif #endif #ifdef HAVE_GETIFADDRS #include #endif /* Solaris provides an extended interface SIOCGLIFCONF. Other systems * may have this as well, but the code has only been tested on Solaris * so far, so we only enable it there. Other platforms may be added as * needed. * * Test for Solaris commented out -- TSI @ UQV 2003.06.13 */ #ifdef SIOCGLIFCONF /* #if defined(__sun) */ #define USE_SIOCGLIFCONF /* #endif */ #endif #if defined(IPv6) && defined(AF_INET6) #include #endif #endif /* WIN32 */ #if !defined(WIN32) || defined(__CYGWIN__) #include #endif #define X_INCLUDE_NETDB_H #include #include "dixstruct.h" #include "osdep.h" #include "xace.h" Bool defeatAccessControl = FALSE; #define addrEqual(fam, address, length, host) \ ((fam) == (host)->family &&\ (length) == (host)->len &&\ !memcmp (address, (host)->addr, length)) static int ConvertAddr(struct sockaddr * /*saddr */ , int * /*len */ , void ** /*addr */ ); static int CheckAddr(int /*family */ , const void * /*pAddr */ , unsigned /*length */ ); static Bool NewHost(int /*family */ , const void * /*addr */ , int /*len */ , int /* addingLocalHosts */ ); /* XFree86 bug #156: To keep track of which hosts were explicitly requested in /etc/X.hosts, we've added a requested field to the HOST struct, and a LocalHostRequested variable. These default to FALSE, but are set to TRUE in ResetHosts when reading in /etc/X.hosts. They are checked in DisableLocalHost(), which is called to disable the default local host entries when stronger authentication is turned on. */ typedef struct _host { short family; short len; unsigned char *addr; struct _host *next; int requested; } HOST; #define MakeHost(h,l) (h)=malloc(sizeof *(h)+(l));\ if (h) { \ (h)->addr=(unsigned char *) ((h) + 1);\ (h)->requested = FALSE; \ } #define FreeHost(h) free(h) static HOST *selfhosts = NULL; static HOST *validhosts = NULL; static int AccessEnabled = TRUE; static int LocalHostEnabled = FALSE; static int LocalHostRequested = FALSE; static int UsingXdmcp = FALSE; static enum { LOCAL_ACCESS_SCOPE_HOST = 0, #ifndef NO_LOCAL_CLIENT_CRED LOCAL_ACCESS_SCOPE_USER, #endif } LocalAccessScope; /* FamilyServerInterpreted implementation */ static Bool siAddrMatch(int family, void *addr, int len, HOST * host, ClientPtr client); static int siCheckAddr(const char *addrString, int length); static void siTypesInitialize(void); /* * called when authorization is not enabled to add the * local host to the access list */ void EnableLocalAccess(void) { switch (LocalAccessScope) { case LOCAL_ACCESS_SCOPE_HOST: EnableLocalHost(); break; #ifndef NO_LOCAL_CLIENT_CRED case LOCAL_ACCESS_SCOPE_USER: EnableLocalUser(); break; #endif } } void EnableLocalHost(void) { if (!UsingXdmcp) { LocalHostEnabled = TRUE; AddLocalHosts(); } } /* * called when authorization is enabled to keep us secure */ void DisableLocalAccess(void) { switch (LocalAccessScope) { case LOCAL_ACCESS_SCOPE_HOST: DisableLocalHost(); break; #ifndef NO_LOCAL_CLIENT_CRED case LOCAL_ACCESS_SCOPE_USER: DisableLocalUser(); break; #endif } } void DisableLocalHost(void) { HOST *self; if (!LocalHostRequested) /* Fix for XFree86 bug #156 */ LocalHostEnabled = FALSE; for (self = selfhosts; self; self = self->next) { if (!self->requested) /* Fix for XFree86 bug #156 */ (void) RemoveHost((ClientPtr) NULL, self->family, self->len, (void *) self->addr); } } #ifndef NO_LOCAL_CLIENT_CRED static int GetLocalUserAddr(char **addr) { static const char *type = "localuser"; static const char delimiter = '\0'; static const char *value; struct passwd *pw; int length = -1; pw = getpwuid(getuid()); if (pw == NULL || pw->pw_name == NULL) goto out; value = pw->pw_name; length = asprintf(addr, "%s%c%s", type, delimiter, value); if (length == -1) { goto out; } /* Trailing NUL */ length++; out: return length; } void EnableLocalUser(void) { char *addr = NULL; int length = -1; length = GetLocalUserAddr(&addr); if (length == -1) return; NewHost(FamilyServerInterpreted, addr, length, TRUE); free(addr); } void DisableLocalUser(void) { char *addr = NULL; int length = -1; length = GetLocalUserAddr(&addr); if (length == -1) return; RemoveHost(NULL, FamilyServerInterpreted, length, addr); free(addr); } void LocalAccessScopeUser(void) { LocalAccessScope = LOCAL_ACCESS_SCOPE_USER; } #endif /* * called at init time when XDMCP will be used; xdmcp always * adds local hosts manually when needed */ void AccessUsingXdmcp(void) { UsingXdmcp = TRUE; LocalHostEnabled = FALSE; } #if defined(SVR4) && !defined(__sun) && defined(SIOCGIFCONF) && !defined(USE_SIOCGLIFCONF) /* Deal with different SIOCGIFCONF ioctl semantics on these OSs */ static int ifioctl(int fd, int cmd, char *arg) { struct strioctl ioc; int ret; memset((char *) &ioc, 0, sizeof(ioc)); ioc.ic_cmd = cmd; ioc.ic_timout = 0; if (cmd == SIOCGIFCONF) { ioc.ic_len = ((struct ifconf *) arg)->ifc_len; ioc.ic_dp = ((struct ifconf *) arg)->ifc_buf; } else { ioc.ic_len = sizeof(struct ifreq); ioc.ic_dp = arg; } ret = ioctl(fd, I_STR, (char *) &ioc); if (ret >= 0 && cmd == SIOCGIFCONF) #ifdef SVR4 ((struct ifconf *) arg)->ifc_len = ioc.ic_len; #endif return ret; } #else #define ifioctl ioctl #endif /* * DefineSelf (fd): * * Define this host for access control. Find all the hosts the OS knows about * for this fd and add them to the selfhosts list. */ #if !defined(SIOCGIFCONF) void DefineSelf(int fd) { #if !defined(TCPCONN) && !defined(UNIXCONN) return; #else register int n; int len; caddr_t addr; int family; register HOST *host; #ifndef WIN32 struct utsname name; #else struct { char nodename[512]; } name; #endif register struct hostent *hp; union { struct sockaddr sa; struct sockaddr_in in; #if defined(IPv6) && defined(AF_INET6) struct sockaddr_in6 in6; #endif } saddr; struct sockaddr_in *inetaddr; struct sockaddr_in6 *inet6addr; struct sockaddr_in broad_addr; #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif /* Why not use gethostname()? Well, at least on my system, I've had to * make an ugly kernel patch to get a name longer than 8 characters, and * uname() lets me access to the whole string (it smashes release, you * see), whereas gethostname() kindly truncates it for me. */ #ifndef WIN32 uname(&name); #else gethostname(name.nodename, sizeof(name.nodename)); #endif hp = _XGethostbyname(name.nodename, hparams); if (hp != NULL) { saddr.sa.sa_family = hp->h_addrtype; switch (hp->h_addrtype) { case AF_INET: inetaddr = (struct sockaddr_in *) (&(saddr.sa)); memcpy(&(inetaddr->sin_addr), hp->h_addr, hp->h_length); len = sizeof(saddr.sa); break; #if defined(IPv6) && defined(AF_INET6) case AF_INET6: inet6addr = (struct sockaddr_in6 *) (&(saddr.sa)); memcpy(&(inet6addr->sin6_addr), hp->h_addr, hp->h_length); len = sizeof(saddr.in6); break; #endif default: goto DefineLocalHost; } family = ConvertAddr(&(saddr.sa), &len, (void **) &addr); if (family != -1 && family != FamilyLocal) { for (host = selfhosts; host && !addrEqual(family, addr, len, host); host = host->next); if (!host) { /* add this host to the host list. */ MakeHost(host, len) if (host) { host->family = family; host->len = len; memcpy(host->addr, addr, len); host->next = selfhosts; selfhosts = host; } #ifdef XDMCP /* * If this is an Internet Address, but not the localhost * address (127.0.0.1), nor the bogus address (0.0.0.0), * register it. */ if (family == FamilyInternet && !(len == 4 && ((addr[0] == 127) || (addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0))) ) { XdmcpRegisterConnection(family, (char *) addr, len); broad_addr = *inetaddr; ((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr = htonl(INADDR_BROADCAST); XdmcpRegisterBroadcastAddress((struct sockaddr_in *) &broad_addr); } #if defined(IPv6) && defined(AF_INET6) else if (family == FamilyInternet6 && !(IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))) { XdmcpRegisterConnection(family, (char *) addr, len); } #endif #endif /* XDMCP */ } } } /* * now add a host of family FamilyLocalHost... */ DefineLocalHost: for (host = selfhosts; host && !addrEqual(FamilyLocalHost, "", 0, host); host = host->next); if (!host) { MakeHost(host, 0); if (host) { host->family = FamilyLocalHost; host->len = 0; /* Nothing to store in host->addr */ host->next = selfhosts; selfhosts = host; } } #endif /* !TCPCONN && !STREAMSCONN && !UNIXCONN */ } #else #ifdef USE_SIOCGLIFCONF #define ifr_type struct lifreq #else #define ifr_type struct ifreq #endif #ifdef VARIABLE_IFREQ #define ifr_size(p) (sizeof (struct ifreq) + \ (p->ifr_addr.sa_len > sizeof (p->ifr_addr) ? \ p->ifr_addr.sa_len - sizeof (p->ifr_addr) : 0)) #define ifraddr_size(a) (a.sa_len) #else #define ifr_size(p) (sizeof (ifr_type)) #define ifraddr_size(a) (sizeof (a)) #endif #if defined(IPv6) && defined(AF_INET6) static void in6_fillscopeid(struct sockaddr_in6 *sin6) { #if defined(__KAME__) if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && sin6->sin6_scope_id == 0) { sin6->sin6_scope_id = ntohs(*(u_int16_t *) &sin6->sin6_addr.s6_addr[2]); sin6->sin6_addr.s6_addr[2] = sin6->sin6_addr.s6_addr[3] = 0; } #endif } #endif void DefineSelf(int fd) { #ifndef HAVE_GETIFADDRS char *cp, *cplim; #ifdef USE_SIOCGLIFCONF struct sockaddr_storage buf[16]; struct lifconf ifc; register struct lifreq *ifr; #ifdef SIOCGLIFNUM struct lifnum ifn; #endif #else /* !USE_SIOCGLIFCONF */ char buf[2048]; struct ifconf ifc; register struct ifreq *ifr; #endif void *bufptr = buf; #else /* HAVE_GETIFADDRS */ struct ifaddrs *ifap, *ifr; #endif int len; unsigned char *addr; int family; register HOST *host; #ifndef HAVE_GETIFADDRS len = sizeof(buf); #ifdef USE_SIOCGLIFCONF #ifdef SIOCGLIFNUM ifn.lifn_family = AF_UNSPEC; ifn.lifn_flags = 0; if (ioctl(fd, SIOCGLIFNUM, (char *) &ifn) < 0) ErrorF("Getting interface count: %s\n", strerror(errno)); if (len < (ifn.lifn_count * sizeof(struct lifreq))) { len = ifn.lifn_count * sizeof(struct lifreq); bufptr = malloc(len); } #endif ifc.lifc_family = AF_UNSPEC; ifc.lifc_flags = 0; ifc.lifc_len = len; ifc.lifc_buf = bufptr; #define IFC_IOCTL_REQ SIOCGLIFCONF #define IFC_IFC_REQ ifc.lifc_req #define IFC_IFC_LEN ifc.lifc_len #define IFR_IFR_ADDR ifr->lifr_addr #define IFR_IFR_NAME ifr->lifr_name #else /* Use SIOCGIFCONF */ ifc.ifc_len = len; ifc.ifc_buf = bufptr; #define IFC_IOCTL_REQ SIOCGIFCONF #define IFC_IFC_REQ ifc.ifc_req #define IFC_IFC_LEN ifc.ifc_len #define IFR_IFR_ADDR ifr->ifr_addr #define IFR_IFR_NAME ifr->ifr_name #endif if (ifioctl(fd, IFC_IOCTL_REQ, (void *) &ifc) < 0) ErrorF("Getting interface configuration (4): %s\n", strerror(errno)); cplim = (char *) IFC_IFC_REQ + IFC_IFC_LEN; for (cp = (char *) IFC_IFC_REQ; cp < cplim; cp += ifr_size(ifr)) { ifr = (ifr_type *) cp; len = ifraddr_size(IFR_IFR_ADDR); family = ConvertAddr((struct sockaddr *) &IFR_IFR_ADDR, &len, (void **) &addr); if (family == -1 || family == FamilyLocal) continue; #if defined(IPv6) && defined(AF_INET6) if (family == FamilyInternet6) in6_fillscopeid((struct sockaddr_in6 *) &IFR_IFR_ADDR); #endif for (host = selfhosts; host && !addrEqual(family, addr, len, host); host = host->next); if (host) continue; MakeHost(host, len) if (host) { host->family = family; host->len = len; memcpy(host->addr, addr, len); host->next = selfhosts; selfhosts = host; } #ifdef XDMCP { #ifdef USE_SIOCGLIFCONF struct sockaddr_storage broad_addr; #else struct sockaddr broad_addr; #endif /* * If this isn't an Internet Address, don't register it. */ if (family != FamilyInternet #if defined(IPv6) && defined(AF_INET6) && family != FamilyInternet6 #endif ) continue; /* * ignore 'localhost' entries as they're not useful * on the other end of the wire */ if (family == FamilyInternet && addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) continue; #if defined(IPv6) && defined(AF_INET6) else if (family == FamilyInternet6 && IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr)) continue; #endif /* * Ignore '0.0.0.0' entries as they are * returned by some OSes for unconfigured NICs but they are * not useful on the other end of the wire. */ if (len == 4 && addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0) continue; XdmcpRegisterConnection(family, (char *) addr, len); #if defined(IPv6) && defined(AF_INET6) /* IPv6 doesn't support broadcasting, so we drop out here */ if (family == FamilyInternet6) continue; #endif broad_addr = IFR_IFR_ADDR; ((struct sockaddr_in *) &broad_addr)->sin_addr.s_addr = htonl(INADDR_BROADCAST); #if defined(USE_SIOCGLIFCONF) && defined(SIOCGLIFBRDADDR) { struct lifreq broad_req; broad_req = *ifr; if (ioctl(fd, SIOCGLIFFLAGS, (char *) &broad_req) != -1 && (broad_req.lifr_flags & IFF_BROADCAST) && (broad_req.lifr_flags & IFF_UP) ) { broad_req = *ifr; if (ioctl(fd, SIOCGLIFBRDADDR, &broad_req) != -1) broad_addr = broad_req.lifr_broadaddr; else continue; } else continue; } #elif defined(SIOCGIFBRDADDR) { struct ifreq broad_req; broad_req = *ifr; if (ifioctl(fd, SIOCGIFFLAGS, (void *) &broad_req) != -1 && (broad_req.ifr_flags & IFF_BROADCAST) && (broad_req.ifr_flags & IFF_UP) ) { broad_req = *ifr; if (ifioctl(fd, SIOCGIFBRDADDR, (void *) &broad_req) != -1) broad_addr = broad_req.ifr_addr; else continue; } else continue; } #endif /* SIOCGIFBRDADDR */ XdmcpRegisterBroadcastAddress((struct sockaddr_in *) &broad_addr); } #endif /* XDMCP */ } if (bufptr != buf) free(bufptr); #else /* HAVE_GETIFADDRS */ if (getifaddrs(&ifap) < 0) { ErrorF("Warning: getifaddrs returns %s\n", strerror(errno)); return; } for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) { if (!ifr->ifa_addr) continue; len = sizeof(*(ifr->ifa_addr)); family = ConvertAddr((struct sockaddr *) ifr->ifa_addr, &len, (void **) &addr); if (family == -1 || family == FamilyLocal) continue; #if defined(IPv6) && defined(AF_INET6) if (family == FamilyInternet6) in6_fillscopeid((struct sockaddr_in6 *) ifr->ifa_addr); #endif for (host = selfhosts; host != NULL && !addrEqual(family, addr, len, host); host = host->next); if (host != NULL) continue; MakeHost(host, len); if (host != NULL) { host->family = family; host->len = len; memcpy(host->addr, addr, len); host->next = selfhosts; selfhosts = host; } #ifdef XDMCP { /* * If this isn't an Internet Address, don't register it. */ if (family != FamilyInternet #if defined(IPv6) && defined(AF_INET6) && family != FamilyInternet6 #endif ) continue; /* * ignore 'localhost' entries as they're not useful * on the other end of the wire */ if (ifr->ifa_flags & IFF_LOOPBACK) continue; if (family == FamilyInternet && addr[0] == 127 && addr[1] == 0 && addr[2] == 0 && addr[3] == 1) continue; /* * Ignore '0.0.0.0' entries as they are * returned by some OSes for unconfigured NICs but they are * not useful on the other end of the wire. */ if (len == 4 && addr[0] == 0 && addr[1] == 0 && addr[2] == 0 && addr[3] == 0) continue; #if defined(IPv6) && defined(AF_INET6) else if (family == FamilyInternet6 && IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr)) continue; #endif XdmcpRegisterConnection(family, (char *) addr, len); #if defined(IPv6) && defined(AF_INET6) if (family == FamilyInternet6) /* IPv6 doesn't support broadcasting, so we drop out here */ continue; #endif if ((ifr->ifa_flags & IFF_BROADCAST) && (ifr->ifa_flags & IFF_UP) && ifr->ifa_broadaddr) XdmcpRegisterBroadcastAddress((struct sockaddr_in *) ifr-> ifa_broadaddr); else continue; } #endif /* XDMCP */ } /* for */ freeifaddrs(ifap); #endif /* HAVE_GETIFADDRS */ /* * add something of FamilyLocalHost */ for (host = selfhosts; host && !addrEqual(FamilyLocalHost, "", 0, host); host = host->next); if (!host) { MakeHost(host, 0); if (host) { host->family = FamilyLocalHost; host->len = 0; /* Nothing to store in host->addr */ host->next = selfhosts; selfhosts = host; } } } #endif /* hpux && !HAVE_IFREQ */ #ifdef XDMCP void AugmentSelf(void *from, int len) { int family; void *addr; register HOST *host; family = ConvertAddr(from, &len, (void **) &addr); if (family == -1 || family == FamilyLocal) return; for (host = selfhosts; host; host = host->next) { if (addrEqual(family, addr, len, host)) return; } MakeHost(host, len) if (!host) return; host->family = family; host->len = len; memcpy(host->addr, addr, len); host->next = selfhosts; selfhosts = host; } #endif void AddLocalHosts(void) { HOST *self; for (self = selfhosts; self; self = self->next) /* Fix for XFree86 bug #156: pass addingLocal = TRUE to * NewHost to tell that we are adding the default local * host entries and not to flag the entries as being * explicitly requested */ (void) NewHost(self->family, self->addr, self->len, TRUE); } /* Reset access control list to initial hosts */ void ResetHosts(const char *display) { register HOST *host; char lhostname[120], ohostname[120]; char *hostname = ohostname; char fname[PATH_MAX + 1]; int fnamelen; FILE *fd; char *ptr; int i, hostlen; #if defined(TCPCONN) && (!defined(IPv6) || !defined(AF_INET6)) union { struct sockaddr sa; #if defined(TCPCONN) struct sockaddr_in in; #endif /* TCPCONN || STREAMSCONN */ } saddr; #endif int family = 0; void *addr = NULL; int len; siTypesInitialize(); AccessEnabled = !defeatAccessControl; LocalHostEnabled = FALSE; while ((host = validhosts) != 0) { validhosts = host->next; FreeHost(host); } #if defined WIN32 && defined __MINGW32__ #define ETC_HOST_PREFIX "X" #else #define ETC_HOST_PREFIX "/etc/X" #endif #define ETC_HOST_SUFFIX ".hosts" fnamelen = strlen(ETC_HOST_PREFIX) + strlen(ETC_HOST_SUFFIX) + strlen(display) + 1; if (fnamelen > sizeof(fname)) FatalError("Display name `%s' is too long\n", display); snprintf(fname, sizeof(fname), ETC_HOST_PREFIX "%s" ETC_HOST_SUFFIX, display); if ((fd = fopen(fname, "r")) != 0) { while (fgets(ohostname, sizeof(ohostname), fd)) { family = FamilyWild; if (*ohostname == '#') continue; if ((ptr = strchr(ohostname, '\n')) != 0) *ptr = 0; hostlen = strlen(ohostname) + 1; for (i = 0; i < hostlen; i++) lhostname[i] = tolower(ohostname[i]); hostname = ohostname; if (!strncmp("local:", lhostname, 6)) { family = FamilyLocalHost; NewHost(family, "", 0, FALSE); LocalHostRequested = TRUE; /* Fix for XFree86 bug #156 */ } #if defined(TCPCONN) else if (!strncmp("inet:", lhostname, 5)) { family = FamilyInternet; hostname = ohostname + 5; } #if defined(IPv6) && defined(AF_INET6) else if (!strncmp("inet6:", lhostname, 6)) { family = FamilyInternet6; hostname = ohostname + 6; } #endif #endif #ifdef SECURE_RPC else if (!strncmp("nis:", lhostname, 4)) { family = FamilyNetname; hostname = ohostname + 4; } #endif else if (!strncmp("si:", lhostname, 3)) { family = FamilyServerInterpreted; hostname = ohostname + 3; hostlen -= 3; } if (family == FamilyServerInterpreted) { len = siCheckAddr(hostname, hostlen); if (len >= 0) { NewHost(family, hostname, len, FALSE); } } else #ifdef SECURE_RPC if ((family == FamilyNetname) || (strchr(hostname, '@'))) { SecureRPCInit(); (void) NewHost(FamilyNetname, hostname, strlen(hostname), FALSE); } else #endif /* SECURE_RPC */ #if defined(TCPCONN) { #if defined(IPv6) && defined(AF_INET6) if ((family == FamilyInternet) || (family == FamilyInternet6) || (family == FamilyWild)) { struct addrinfo *addresses; struct addrinfo *a; int f; if (getaddrinfo(hostname, NULL, NULL, &addresses) == 0) { for (a = addresses; a != NULL; a = a->ai_next) { len = a->ai_addrlen; f = ConvertAddr(a->ai_addr, &len, (void **) &addr); if (addr && ((family == f) || ((family == FamilyWild) && (f != -1)))) { NewHost(f, addr, len, FALSE); } } freeaddrinfo(addresses); } } #else #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif register struct hostent *hp; /* host name */ if ((family == FamilyInternet && ((hp = _XGethostbyname(hostname, hparams)) != 0)) || ((hp = _XGethostbyname(hostname, hparams)) != 0)) { saddr.sa.sa_family = hp->h_addrtype; len = sizeof(saddr.sa); if ((family = ConvertAddr(&saddr.sa, &len, (void **) &addr)) != -1) { #ifdef h_addr /* new 4.3bsd version of gethostent */ char **list; /* iterate over the addresses */ for (list = hp->h_addr_list; *list; list++) (void) NewHost(family, (void *) *list, len, FALSE); #else (void) NewHost(family, (void *) hp->h_addr, len, FALSE); #endif } } #endif /* IPv6 */ } #endif /* TCPCONN || STREAMSCONN */ family = FamilyWild; } fclose(fd); } } static Bool xtransLocalClient(ClientPtr client) { int alen, family, notused; Xtransaddr *from = NULL; void *addr; register HOST *host; OsCommPtr oc = (OsCommPtr) client->osPrivate; if (!oc->trans_conn) return FALSE; if (!_XSERVTransGetPeerAddr(oc->trans_conn, ¬used, &alen, &from)) { family = ConvertAddr((struct sockaddr *) from, &alen, (void **) &addr); if (family == -1) { free(from); return FALSE; } if (family == FamilyLocal) { free(from); return TRUE; } for (host = selfhosts; host; host = host->next) { if (addrEqual(family, addr, alen, host)) { free(from); return TRUE; } } free(from); } return FALSE; } /* Is client on the local host */ Bool ComputeLocalClient(ClientPtr client) { const char *cmdname = GetClientCmdName(client); if (!xtransLocalClient(client)) return FALSE; /* If the executable name is "ssh", assume that this client connection * is forwarded from another host via SSH */ if (cmdname) { char *cmd = strdup(cmdname); Bool ret; /* Cut off any colon and whatever comes after it, see * https://lists.freedesktop.org/archives/xorg-devel/2015-December/048164.html */ char *tok = strtok(cmd, ":"); #if !defined(WIN32) || defined(__CYGWIN__) ret = strcmp(basename(tok), "ssh") != 0; #else ret = strcmp(tok, "ssh") != 0; #endif free(cmd); return ret; } return TRUE; } /* * Return the uid and all gids of a connected local client * Allocates a LocalClientCredRec - caller must call FreeLocalClientCreds * * Used by localuser & localgroup ServerInterpreted access control forms below * Used by AuthAudit to log who local connections came from */ int GetLocalClientCreds(ClientPtr client, LocalClientCredRec ** lccp) { #if defined(HAVE_GETPEEREID) || defined(HAVE_GETPEERUCRED) || defined(SO_PEERCRED) int fd; XtransConnInfo ci; LocalClientCredRec *lcc; #if defined(HAVE_GETPEERUCRED) ucred_t *peercred = NULL; const gid_t *gids; #elif defined(SO_PEERCRED) struct ucred peercred; socklen_t so_len = sizeof(peercred); #elif defined(HAVE_GETPEEREID) uid_t uid; gid_t gid; #if defined(LOCAL_PEERPID) pid_t pid; socklen_t so_len = sizeof(pid); #endif #endif if (client == NULL) return -1; ci = ((OsCommPtr) client->osPrivate)->trans_conn; #if !(defined(__sun) && defined(HAVE_GETPEERUCRED)) /* Most implementations can only determine peer credentials for Unix * domain sockets - Solaris getpeerucred can work with a bit more, so * we just let it tell us if the connection type is supported or not */ if (!_XSERVTransIsLocal(ci)) { return -1; } #endif *lccp = calloc(1, sizeof(LocalClientCredRec)); if (*lccp == NULL) return -1; lcc = *lccp; fd = _XSERVTransGetConnectionNumber(ci); #if defined(HAVE_GETPEERUCRED) if (getpeerucred(fd, &peercred) < 0) { FreeLocalClientCreds(lcc); return -1; } lcc->euid = ucred_geteuid(peercred); if (lcc->euid != -1) lcc->fieldsSet |= LCC_UID_SET; lcc->egid = ucred_getegid(peercred); if (lcc->egid != -1) lcc->fieldsSet |= LCC_GID_SET; lcc->pid = ucred_getpid(peercred); if (lcc->pid != -1) lcc->fieldsSet |= LCC_PID_SET; #ifdef HAVE_GETZONEID lcc->zoneid = ucred_getzoneid(peercred); if (lcc->zoneid != -1) lcc->fieldsSet |= LCC_ZID_SET; #endif lcc->nSuppGids = ucred_getgroups(peercred, &gids); if (lcc->nSuppGids > 0) { lcc->pSuppGids = calloc(lcc->nSuppGids, sizeof(int)); if (lcc->pSuppGids == NULL) { lcc->nSuppGids = 0; } else { int i; for (i = 0; i < lcc->nSuppGids; i++) { (lcc->pSuppGids)[i] = (int) gids[i]; } } } else { lcc->nSuppGids = 0; } ucred_free(peercred); return 0; #elif defined(SO_PEERCRED) if (getsockopt(fd, SOL_SOCKET, SO_PEERCRED, &peercred, &so_len) == -1) { FreeLocalClientCreds(lcc); return -1; } lcc->euid = peercred.uid; lcc->egid = peercred.gid; lcc->pid = peercred.pid; lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET | LCC_PID_SET; return 0; #elif defined(HAVE_GETPEEREID) if (getpeereid(fd, &uid, &gid) == -1) { FreeLocalClientCreds(lcc); return -1; } lcc->euid = uid; lcc->egid = gid; lcc->fieldsSet = LCC_UID_SET | LCC_GID_SET; #if defined(LOCAL_PEERPID) if (getsockopt(fd, SOL_LOCAL, LOCAL_PEERPID, &pid, &so_len) != 0) { ErrorF("getsockopt failed to determine pid of socket %d: %s\n", fd, strerror(errno)); } else { lcc->pid = pid; lcc->fieldsSet |= LCC_PID_SET; } #endif return 0; #endif #else /* No system call available to get the credentials of the peer */ return -1; #endif } void FreeLocalClientCreds(LocalClientCredRec * lcc) { if (lcc != NULL) { if (lcc->nSuppGids > 0) { free(lcc->pSuppGids); } free(lcc); } } static int AuthorizedClient(ClientPtr client) { int rc; if (!client || defeatAccessControl) return Success; /* untrusted clients can't change host access */ rc = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); if (rc != Success) return rc; return client->local ? Success : BadAccess; } /* Add a host to the access control list. This is the external interface * called from the dispatcher */ int AddHost(ClientPtr client, int family, unsigned length, /* of bytes in pAddr */ const void *pAddr) { int rc, len; rc = AuthorizedClient(client); if (rc != Success) return rc; switch (family) { case FamilyLocalHost: len = length; LocalHostEnabled = TRUE; break; #ifdef SECURE_RPC case FamilyNetname: len = length; SecureRPCInit(); break; #endif case FamilyInternet: #if defined(IPv6) && defined(AF_INET6) case FamilyInternet6: #endif case FamilyDECnet: case FamilyChaos: case FamilyServerInterpreted: if ((len = CheckAddr(family, pAddr, length)) < 0) { client->errorValue = length; return BadValue; } break; case FamilyLocal: default: client->errorValue = family; return BadValue; } if (NewHost(family, pAddr, len, FALSE)) return Success; return BadAlloc; } Bool ForEachHostInFamily(int family, Bool (*func) (unsigned char *addr, short len, void *closure), void *closure) { HOST *host; for (host = validhosts; host; host = host->next) if (family == host->family && func(host->addr, host->len, closure)) return TRUE; return FALSE; } /* Add a host to the access control list. This is the internal interface * called when starting or resetting the server */ static Bool NewHost(int family, const void *addr, int len, int addingLocalHosts) { register HOST *host; for (host = validhosts; host; host = host->next) { if (addrEqual(family, addr, len, host)) return TRUE; } if (!addingLocalHosts) { /* Fix for XFree86 bug #156 */ for (host = selfhosts; host; host = host->next) { if (addrEqual(family, addr, len, host)) { host->requested = TRUE; break; } } } MakeHost(host, len) if (!host) return FALSE; host->family = family; host->len = len; memcpy(host->addr, addr, len); host->next = validhosts; validhosts = host; return TRUE; } /* Remove a host from the access control list */ int RemoveHost(ClientPtr client, int family, unsigned length, /* of bytes in pAddr */ void *pAddr) { int rc, len; register HOST *host, **prev; rc = AuthorizedClient(client); if (rc != Success) return rc; switch (family) { case FamilyLocalHost: len = length; LocalHostEnabled = FALSE; break; #ifdef SECURE_RPC case FamilyNetname: len = length; break; #endif case FamilyInternet: #if defined(IPv6) && defined(AF_INET6) case FamilyInternet6: #endif case FamilyDECnet: case FamilyChaos: case FamilyServerInterpreted: if ((len = CheckAddr(family, pAddr, length)) < 0) { if (client) client->errorValue = length; return BadValue; } break; case FamilyLocal: default: if (client) client->errorValue = family; return BadValue; } for (prev = &validhosts; (host = *prev) && (!addrEqual(family, pAddr, len, host)); prev = &host->next); if (host) { *prev = host->next; FreeHost(host); } return Success; } /* Get all hosts in the access control list */ int GetHosts(void **data, int *pnHosts, int *pLen, BOOL * pEnabled) { int len; register int n = 0; register unsigned char *ptr; register HOST *host; int nHosts = 0; *pEnabled = AccessEnabled ? EnableAccess : DisableAccess; for (host = validhosts; host; host = host->next) { nHosts++; n += pad_to_int32(host->len) + sizeof(xHostEntry); /* Could check for INT_MAX, but in reality having more than 1mb of hostnames in the access list is ridiculous */ if (n >= 1048576) break; } if (n) { *data = ptr = malloc(n); if (!ptr) { return BadAlloc; } for (host = validhosts; host; host = host->next) { len = host->len; if ((ptr + sizeof(xHostEntry) + len) > ((unsigned char *) *data + n)) break; ((xHostEntry *) ptr)->family = host->family; ((xHostEntry *) ptr)->length = len; ptr += sizeof(xHostEntry); memcpy(ptr, host->addr, len); ptr += pad_to_int32(len); } } else { *data = NULL; } *pnHosts = nHosts; *pLen = n; return Success; } /* Check for valid address family and length, and return address length. */ /*ARGSUSED*/ static int CheckAddr(int family, const void *pAddr, unsigned length) { int len; switch (family) { #if defined(TCPCONN) case FamilyInternet: if (length == sizeof(struct in_addr)) len = length; else len = -1; break; #if defined(IPv6) && defined(AF_INET6) case FamilyInternet6: if (length == sizeof(struct in6_addr)) len = length; else len = -1; break; #endif #endif case FamilyServerInterpreted: len = siCheckAddr(pAddr, length); break; default: len = -1; } return len; } /* Check if a host is not in the access control list. * Returns 1 if host is invalid, 0 if we've found it. */ int InvalidHost(register struct sockaddr *saddr, int len, ClientPtr client) { int family; void *addr = NULL; register HOST *selfhost, *host; if (!AccessEnabled) /* just let them in */ return 0; family = ConvertAddr(saddr, &len, (void **) &addr); if (family == -1) return 1; if (family == FamilyLocal) { if (!LocalHostEnabled) { /* * check to see if any local address is enabled. This * implicitly enables local connections. */ for (selfhost = selfhosts; selfhost; selfhost = selfhost->next) { for (host = validhosts; host; host = host->next) { if (addrEqual(selfhost->family, selfhost->addr, selfhost->len, host)) return 0; } } } else return 0; } for (host = validhosts; host; host = host->next) { if (host->family == FamilyServerInterpreted) { if (siAddrMatch(family, addr, len, host, client)) { return 0; } } else { if (addr && addrEqual(family, addr, len, host)) return 0; } } return 1; } static int ConvertAddr(register struct sockaddr *saddr, int *len, void **addr) { if (*len == 0) return FamilyLocal; switch (saddr->sa_family) { case AF_UNSPEC: #if defined(UNIXCONN) || defined(LOCALCONN) case AF_UNIX: #endif return FamilyLocal; #if defined(TCPCONN) case AF_INET: #ifdef WIN32 if (16777343 == *(long *) &((struct sockaddr_in *) saddr)->sin_addr) return FamilyLocal; #endif *len = sizeof(struct in_addr); *addr = (void *) &(((struct sockaddr_in *) saddr)->sin_addr); return FamilyInternet; #if defined(IPv6) && defined(AF_INET6) case AF_INET6: { struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *) saddr; if (IN6_IS_ADDR_V4MAPPED(&(saddr6->sin6_addr))) { *len = sizeof(struct in_addr); *addr = (void *) &(saddr6->sin6_addr.s6_addr[12]); return FamilyInternet; } else { *len = sizeof(struct in6_addr); *addr = (void *) &(saddr6->sin6_addr); return FamilyInternet6; } } #endif #endif default: return -1; } } int ChangeAccessControl(ClientPtr client, int fEnabled) { int rc = AuthorizedClient(client); if (rc != Success) return rc; AccessEnabled = fEnabled; return Success; } /* returns FALSE if xhost + in effect, else TRUE */ int GetAccessControl(void) { return AccessEnabled; } int GetClientFd(ClientPtr client) { return ((OsCommPtr) client->osPrivate)->fd; } Bool ClientIsLocal(ClientPtr client) { XtransConnInfo ci = ((OsCommPtr) client->osPrivate)->trans_conn; return _XSERVTransIsLocal(ci); } /***************************************************************************** * FamilyServerInterpreted host entry implementation * * Supports an extensible system of host types which the server can interpret * See the IPv6 extensions to the X11 protocol spec for the definition. * * Currently supported schemes: * * hostname - hostname as defined in IETF RFC 2396 * ipv6 - IPv6 literal address as defined in IETF RFC's 3513 and * * See xc/doc/specs/SIAddresses for formal definitions of each type. */ /* These definitions and the siTypeAdd function could be exported in the * future to enable loading additional host types, but that was not done for * the initial implementation. */ typedef Bool (*siAddrMatchFunc) (int family, void *addr, int len, const char *siAddr, int siAddrlen, ClientPtr client, void *siTypePriv); typedef int (*siCheckAddrFunc) (const char *addrString, int length, void *siTypePriv); struct siType { struct siType *next; const char *typeName; siAddrMatchFunc addrMatch; siCheckAddrFunc checkAddr; void *typePriv; /* Private data for type routines */ }; static struct siType *siTypeList; static int siTypeAdd(const char *typeName, siAddrMatchFunc addrMatch, siCheckAddrFunc checkAddr, void *typePriv) { struct siType *s, *p; if ((typeName == NULL) || (addrMatch == NULL) || (checkAddr == NULL)) return BadValue; for (s = siTypeList, p = NULL; s != NULL; p = s, s = s->next) { if (strcmp(typeName, s->typeName) == 0) { s->addrMatch = addrMatch; s->checkAddr = checkAddr; s->typePriv = typePriv; return Success; } } s = malloc(sizeof(struct siType)); if (s == NULL) return BadAlloc; if (p == NULL) siTypeList = s; else p->next = s; s->next = NULL; s->typeName = typeName; s->addrMatch = addrMatch; s->checkAddr = checkAddr; s->typePriv = typePriv; return Success; } /* Checks to see if a host matches a server-interpreted host entry */ static Bool siAddrMatch(int family, void *addr, int len, HOST * host, ClientPtr client) { Bool matches = FALSE; struct siType *s; const char *valueString; int addrlen; valueString = (const char *) memchr(host->addr, '\0', host->len); if (valueString != NULL) { for (s = siTypeList; s != NULL; s = s->next) { if (strcmp((char *) host->addr, s->typeName) == 0) { addrlen = host->len - (strlen((char *) host->addr) + 1); matches = s->addrMatch(family, addr, len, valueString + 1, addrlen, client, s->typePriv); break; } } #ifdef FAMILY_SI_DEBUG ErrorF("Xserver: siAddrMatch(): type = %s, value = %*.*s -- %s\n", host->addr, addrlen, addrlen, valueString + 1, (matches) ? "accepted" : "rejected"); #endif } return matches; } static int siCheckAddr(const char *addrString, int length) { const char *valueString; int addrlen, typelen; int len = -1; struct siType *s; /* Make sure there is a \0 byte inside the specified length to separate the address type from the address value. */ valueString = (const char *) memchr(addrString, '\0', length); if (valueString != NULL) { /* Make sure the first string is a recognized address type, * and the second string is a valid address of that type. */ typelen = strlen(addrString) + 1; addrlen = length - typelen; for (s = siTypeList; s != NULL; s = s->next) { if (strcmp(addrString, s->typeName) == 0) { len = s->checkAddr(valueString + 1, addrlen, s->typePriv); if (len >= 0) { len += typelen; } break; } } #ifdef FAMILY_SI_DEBUG { const char *resultMsg; if (s == NULL) { resultMsg = "type not registered"; } else { if (len == -1) resultMsg = "rejected"; else resultMsg = "accepted"; } ErrorF ("Xserver: siCheckAddr(): type = %s, value = %*.*s, len = %d -- %s\n", addrString, addrlen, addrlen, valueString + 1, len, resultMsg); } #endif } return len; } /*** * Hostname server-interpreted host type * * Stored as hostname string, explicitly defined to be resolved ONLY * at access check time, to allow for hosts with dynamic addresses * but static hostnames, such as found in some DHCP & mobile setups. * * Hostname must conform to IETF RFC 2396 sec. 3.2.2, which defines it as: * hostname = *( domainlabel "." ) toplabel [ "." ] * domainlabel = alphanum | alphanum *( alphanum | "-" ) alphanum * toplabel = alpha | alpha *( alphanum | "-" ) alphanum */ #ifdef NI_MAXHOST #define SI_HOSTNAME_MAXLEN NI_MAXHOST #else #ifdef MAXHOSTNAMELEN #define SI_HOSTNAME_MAXLEN MAXHOSTNAMELEN #else #define SI_HOSTNAME_MAXLEN 256 #endif #endif static Bool siHostnameAddrMatch(int family, void *addr, int len, const char *siAddr, int siAddrLen, ClientPtr client, void *typePriv) { Bool res = FALSE; /* Currently only supports checking against IPv4 & IPv6 connections, but * support for other address families, such as DECnet, could be added if * desired. */ #if defined(IPv6) && defined(AF_INET6) if ((family == FamilyInternet) || (family == FamilyInternet6)) { char hostname[SI_HOSTNAME_MAXLEN]; struct addrinfo *addresses; struct addrinfo *a; int f, hostaddrlen; void *hostaddr = NULL; if (siAddrLen >= sizeof(hostname)) return FALSE; strlcpy(hostname, siAddr, siAddrLen + 1); if (getaddrinfo(hostname, NULL, NULL, &addresses) == 0) { for (a = addresses; a != NULL; a = a->ai_next) { hostaddrlen = a->ai_addrlen; f = ConvertAddr(a->ai_addr, &hostaddrlen, &hostaddr); if ((f == family) && (len == hostaddrlen) && hostaddr && (memcmp(addr, hostaddr, len) == 0)) { res = TRUE; break; } } freeaddrinfo(addresses); } } #else /* IPv6 not supported, use gethostbyname instead for IPv4 */ if (family == FamilyInternet) { register struct hostent *hp; #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif char hostname[SI_HOSTNAME_MAXLEN]; int f, hostaddrlen; void *hostaddr; char **addrlist; if (siAddrLen >= sizeof(hostname)) return FALSE; strlcpy(hostname, siAddr, siAddrLen + 1); if ((hp = _XGethostbyname(hostname, hparams)) != NULL) { #ifdef h_addr /* new 4.3bsd version of gethostent */ /* iterate over the addresses */ for (addrlist = hp->h_addr_list; *addrlist; addrlist++) #else addrlist = &hp->h_addr; #endif { struct sockaddr_in sin; sin.sin_family = hp->h_addrtype; memcpy(&(sin.sin_addr), *addrlist, hp->h_length); hostaddrlen = sizeof(sin); f = ConvertAddr((struct sockaddr *) &sin, &hostaddrlen, &hostaddr); if ((f == family) && (len == hostaddrlen) && (memcmp(addr, hostaddr, len) == 0)) { res = TRUE; #ifdef h_addr break; #endif } } } } #endif return res; } static int siHostnameCheckAddr(const char *valueString, int length, void *typePriv) { /* Check conformance of hostname to RFC 2396 sec. 3.2.2 definition. * We do not use ctype functions here to avoid locale-specific * character sets. Hostnames must be pure ASCII. */ int len = length; int i; Bool dotAllowed = FALSE; Bool dashAllowed = FALSE; if ((length <= 0) || (length >= SI_HOSTNAME_MAXLEN)) { len = -1; } else { for (i = 0; i < length; i++) { char c = valueString[i]; if (c == 0x2E) { /* '.' */ if (dotAllowed == FALSE) { len = -1; break; } else { dotAllowed = FALSE; dashAllowed = FALSE; } } else if (c == 0x2D) { /* '-' */ if (dashAllowed == FALSE) { len = -1; break; } else { dotAllowed = FALSE; } } else if (((c >= 0x30) && (c <= 0x3A)) /* 0-9 */ || ((c >= 0x61) && (c <= 0x7A)) /* a-z */ || ((c >= 0x41) && (c <= 0x5A)) /* A-Z */ ) { dotAllowed = TRUE; dashAllowed = TRUE; } else { /* Invalid character */ len = -1; break; } } } return len; } #if defined(IPv6) && defined(AF_INET6) /*** * "ipv6" server interpreted type * * Currently supports only IPv6 literal address as specified in IETF RFC 3513 * * Once draft-ietf-ipv6-scoping-arch-00.txt becomes an RFC, support will be * added for the scoped address format it specifies. */ /* Maximum length of an IPv6 address string - increase when adding support * for scoped address qualifiers. Includes room for trailing NUL byte. */ #define SI_IPv6_MAXLEN INET6_ADDRSTRLEN static Bool siIPv6AddrMatch(int family, void *addr, int len, const char *siAddr, int siAddrlen, ClientPtr client, void *typePriv) { struct in6_addr addr6; char addrbuf[SI_IPv6_MAXLEN]; if ((family != FamilyInternet6) || (len != sizeof(addr6))) return FALSE; memcpy(addrbuf, siAddr, siAddrlen); addrbuf[siAddrlen] = '\0'; if (inet_pton(AF_INET6, addrbuf, &addr6) != 1) { perror("inet_pton"); return FALSE; } if (memcmp(addr, &addr6, len) == 0) { return TRUE; } else { return FALSE; } } static int siIPv6CheckAddr(const char *addrString, int length, void *typePriv) { int len; /* Minimum length is 3 (smallest legal address is "::1") */ if (length < 3) { /* Address is too short! */ len = -1; } else if (length >= SI_IPv6_MAXLEN) { /* Address is too long! */ len = -1; } else { /* Assume inet_pton is sufficient validation */ struct in6_addr addr6; char addrbuf[SI_IPv6_MAXLEN]; memcpy(addrbuf, addrString, length); addrbuf[length] = '\0'; if (inet_pton(AF_INET6, addrbuf, &addr6) != 1) { perror("inet_pton"); len = -1; } else { len = length; } } return len; } #endif /* IPv6 */ #if !defined(NO_LOCAL_CLIENT_CRED) /*** * "localuser" & "localgroup" server interpreted types * * Allows local connections from a given local user or group */ #include #include #define LOCAL_USER 1 #define LOCAL_GROUP 2 typedef struct { int credType; } siLocalCredPrivRec, *siLocalCredPrivPtr; static siLocalCredPrivRec siLocalUserPriv = { LOCAL_USER }; static siLocalCredPrivRec siLocalGroupPriv = { LOCAL_GROUP }; static Bool siLocalCredGetId(const char *addr, int len, siLocalCredPrivPtr lcPriv, int *id) { Bool parsedOK = FALSE; char *addrbuf = malloc(len + 1); if (addrbuf == NULL) { return FALSE; } memcpy(addrbuf, addr, len); addrbuf[len] = '\0'; if (addr[0] == '#') { /* numeric id */ char *cp; errno = 0; *id = strtol(addrbuf + 1, &cp, 0); if ((errno == 0) && (cp != (addrbuf + 1))) { parsedOK = TRUE; } } else { /* non-numeric name */ if (lcPriv->credType == LOCAL_USER) { struct passwd *pw = getpwnam(addrbuf); if (pw != NULL) { *id = (int) pw->pw_uid; parsedOK = TRUE; } } else { /* group */ struct group *gr = getgrnam(addrbuf); if (gr != NULL) { *id = (int) gr->gr_gid; parsedOK = TRUE; } } } free(addrbuf); return parsedOK; } static Bool siLocalCredAddrMatch(int family, void *addr, int len, const char *siAddr, int siAddrlen, ClientPtr client, void *typePriv) { int siAddrId; LocalClientCredRec *lcc; siLocalCredPrivPtr lcPriv = (siLocalCredPrivPtr) typePriv; if (GetLocalClientCreds(client, &lcc) == -1) { return FALSE; } #ifdef HAVE_GETZONEID /* Ensure process is in the same zone */ if ((lcc->fieldsSet & LCC_ZID_SET) && (lcc->zoneid != getzoneid())) { FreeLocalClientCreds(lcc); return FALSE; } #endif if (siLocalCredGetId(siAddr, siAddrlen, lcPriv, &siAddrId) == FALSE) { FreeLocalClientCreds(lcc); return FALSE; } if (lcPriv->credType == LOCAL_USER) { if ((lcc->fieldsSet & LCC_UID_SET) && (lcc->euid == siAddrId)) { FreeLocalClientCreds(lcc); return TRUE; } } else { if ((lcc->fieldsSet & LCC_GID_SET) && (lcc->egid == siAddrId)) { FreeLocalClientCreds(lcc); return TRUE; } if (lcc->pSuppGids != NULL) { int i; for (i = 0; i < lcc->nSuppGids; i++) { if (lcc->pSuppGids[i] == siAddrId) { FreeLocalClientCreds(lcc); return TRUE; } } } } FreeLocalClientCreds(lcc); return FALSE; } static int siLocalCredCheckAddr(const char *addrString, int length, void *typePriv) { int len = length; int id; if (siLocalCredGetId(addrString, length, (siLocalCredPrivPtr) typePriv, &id) == FALSE) { len = -1; } return len; } #endif /* localuser */ static void siTypesInitialize(void) { siTypeAdd("hostname", siHostnameAddrMatch, siHostnameCheckAddr, NULL); #if defined(IPv6) && defined(AF_INET6) siTypeAdd("ipv6", siIPv6AddrMatch, siIPv6CheckAddr, NULL); #endif #if !defined(NO_LOCAL_CLIENT_CRED) siTypeAdd("localuser", siLocalCredAddrMatch, siLocalCredCheckAddr, &siLocalUserPriv); siTypeAdd("localgroup", siLocalCredAddrMatch, siLocalCredCheckAddr, &siLocalGroupPriv); #endif } xorg-server-21.1.16/os/auth.c0000644000175000017500000002151414757411105011364 /* Copyright 1988, 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. */ /* * authorization hooks for the server * Author: Keith Packard, MIT X Consortium */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "osdep.h" #include "dixstruct.h" #include #include #include #ifdef WIN32 #include #endif #include /* for arc4random_buf() */ struct protocol { unsigned short name_length; const char *name; AuthAddCFunc Add; /* new authorization data */ AuthCheckFunc Check; /* verify client authorization data */ AuthRstCFunc Reset; /* delete all authorization data entries */ AuthFromIDFunc FromID; /* convert ID to cookie */ AuthRemCFunc Remove; /* remove a specific cookie */ #ifdef XCSECURITY AuthGenCFunc Generate; #endif }; static struct protocol protocols[] = { {(unsigned short) 18, "MIT-MAGIC-COOKIE-1", MitAddCookie, MitCheckCookie, MitResetCookie, MitFromID, MitRemoveCookie, #ifdef XCSECURITY MitGenerateCookie #endif }, #ifdef HASXDMAUTH {(unsigned short) 19, "XDM-AUTHORIZATION-1", XdmAddCookie, XdmCheckCookie, XdmResetCookie, XdmFromID, XdmRemoveCookie, #ifdef XCSECURITY NULL #endif }, #endif #ifdef SECURE_RPC {(unsigned short) 9, "SUN-DES-1", SecureRPCAdd, SecureRPCCheck, SecureRPCReset, SecureRPCFromID, SecureRPCRemove, #ifdef XCSECURITY NULL #endif }, #endif }; #define NUM_AUTHORIZATION ARRAY_SIZE(protocols) /* * Initialize all classes of authorization by reading the * specified authorization file */ static const char *authorization_file = NULL; static Bool ShouldLoadAuth = TRUE; void InitAuthorization(const char *file_name) { authorization_file = file_name; } static int LoadAuthorization(void) { FILE *f; Xauth *auth; int i; int count = 0; ShouldLoadAuth = FALSE; if (!authorization_file) return 0; errno = 0; f = Fopen(authorization_file, "r"); if (!f) { LogMessageVerb(X_ERROR, 0, "Failed to open authorization file \"%s\": %s\n", authorization_file, errno != 0 ? strerror(errno) : "Unknown error"); return -1; } while ((auth = XauReadAuth(f)) != 0) { for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].name_length == auth->name_length && memcmp(protocols[i].name, auth->name, (int) auth->name_length) == 0 && protocols[i].Add) { ++count; (*protocols[i].Add) (auth->data_length, auth->data, FakeClientID(0)); } } XauDisposeAuth(auth); } Fclose(f); return count; } #ifdef XDMCP /* * XdmcpInit calls this function to discover all authorization * schemes supported by the display */ void RegisterAuthorizations(void) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) XdmcpRegisterAuthorization(protocols[i].name, (int) protocols[i].name_length); } #endif XID CheckAuthorization(unsigned int name_length, const char *name, unsigned int data_length, const char *data, ClientPtr client, const char **reason) { /* failure message. NULL for default msg */ int i; struct stat buf; static time_t lastmod = 0; static Bool loaded = FALSE; if (!authorization_file || stat(authorization_file, &buf)) { if (lastmod != 0) { lastmod = 0; ShouldLoadAuth = TRUE; /* stat lost, so force reload */ } } else if (buf.st_mtime > lastmod) { lastmod = buf.st_mtime; ShouldLoadAuth = TRUE; } if (ShouldLoadAuth) { int loadauth = LoadAuthorization(); /* * If the authorization file has at least one entry for this server, * disable local access. (loadauth > 0) * * If there are zero entries (either initially or when the * authorization file is later reloaded), or if a valid * authorization file was never loaded, enable local access. * (loadauth == 0 || !loaded) * * If the authorization file was loaded initially (with valid * entries for this server), and reloading it later fails, don't * change anything. (loadauth == -1 && loaded) */ if (loadauth > 0) { DisableLocalAccess(); /* got at least one */ loaded = TRUE; } else if (loadauth == 0 || !loaded) EnableLocalAccess(); } if (name_length) { for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].name_length == name_length && memcmp(protocols[i].name, name, (int) name_length) == 0) { return (*protocols[i].Check) (data_length, data, client, reason); } *reason = "Authorization protocol not supported by server\n"; } } else *reason = "Authorization required, but no authorization protocol specified\n"; return (XID) ~0L; } void ResetAuthorization(void) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) if (protocols[i].Reset) (*protocols[i].Reset) (); ShouldLoadAuth = TRUE; } int AuthorizationFromID(XID id, unsigned short *name_lenp, const char **namep, unsigned short *data_lenp, char **datap) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].FromID && (*protocols[i].FromID) (id, data_lenp, datap)) { *name_lenp = protocols[i].name_length; *namep = protocols[i].name; return 1; } } return 0; } int RemoveAuthorization(unsigned short name_length, const char *name, unsigned short data_length, const char *data) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].name_length == name_length && memcmp(protocols[i].name, name, (int) name_length) == 0 && protocols[i].Remove) { return (*protocols[i].Remove) (data_length, data); } } return 0; } int AddAuthorization(unsigned name_length, const char *name, unsigned data_length, char *data) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].name_length == name_length && memcmp(protocols[i].name, name, (int) name_length) == 0 && protocols[i].Add) { return (*protocols[i].Add) (data_length, data, FakeClientID(0)); } } return 0; } #ifdef XCSECURITY XID GenerateAuthorization(unsigned name_length, const char *name, unsigned data_length, const char *data, unsigned *data_length_return, char **data_return) { int i; for (i = 0; i < NUM_AUTHORIZATION; i++) { if (protocols[i].name_length == name_length && memcmp(protocols[i].name, name, (int) name_length) == 0 && protocols[i].Generate) { return (*protocols[i].Generate) (data_length, data, FakeClientID(0), data_length_return, data_return); } } return -1; } #endif /* XCSECURITY */ void GenerateRandomData(int len, char *buf) { #ifdef HAVE_ARC4RANDOM_BUF arc4random_buf(buf, len); #else int fd; fd = open("/dev/urandom", O_RDONLY); read(fd, buf, len); close(fd); #endif } xorg-server-21.1.16/os/backtrace.c0000644000175000017500000002057514757411105012350 /* * Copyright 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "os.h" #include "misc.h" #include #include #ifdef HAVE_LIBUNWIND #define UNW_LOCAL_ONLY #include #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include void xorg_backtrace(void) { unw_cursor_t cursor; unw_context_t context; unw_word_t ip; unw_word_t off; unw_proc_info_t pip; int ret, i = 0; char procname[256]; const char *filename; Dl_info dlinfo; pip.unwind_info = NULL; ret = unw_getcontext(&context); if (ret) { ErrorFSigSafe("unw_getcontext failed: %s [%d]\n", unw_strerror(ret), ret); return; } ret = unw_init_local(&cursor, &context); if (ret) { ErrorFSigSafe("unw_init_local failed: %s [%d]\n", unw_strerror(ret), ret); return; } ErrorFSigSafe("\n"); ErrorFSigSafe("Backtrace:\n"); ret = unw_step(&cursor); while (ret > 0) { ret = unw_get_proc_info(&cursor, &pip); if (ret) { ErrorFSigSafe("unw_get_proc_info failed: %s [%d]\n", unw_strerror(ret), ret); break; } off = 0; ret = unw_get_proc_name(&cursor, procname, 256, &off); if (ret && ret != -UNW_ENOMEM) { if (ret != -UNW_EUNSPEC) ErrorFSigSafe("unw_get_proc_name failed: %s [%d]\n", unw_strerror(ret), ret); procname[0] = '?'; procname[1] = 0; } if (unw_get_reg (&cursor, UNW_REG_IP, &ip) < 0) ip = pip.start_ip + off; if (dladdr((void *)(uintptr_t)(ip), &dlinfo) && dlinfo.dli_fname && *dlinfo.dli_fname) filename = dlinfo.dli_fname; else filename = "?"; ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname, ret == -UNW_ENOMEM ? "..." : "", (int)off, (void *)(uintptr_t)(ip)); ret = unw_step(&cursor); if (ret < 0) ErrorFSigSafe("unw_step failed: %s [%d]\n", unw_strerror(ret), ret); } ErrorFSigSafe("\n"); } #else /* HAVE_LIBUNWIND */ #ifdef HAVE_BACKTRACE #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include #include void xorg_backtrace(void) { const int BT_SIZE = 64; void *array[BT_SIZE]; const char *mod; int size, i; Dl_info info; ErrorFSigSafe("\n"); ErrorFSigSafe("Backtrace:\n"); size = backtrace(array, BT_SIZE); for (i = 0; i < size; i++) { int rc = dladdr(array[i], &info); if (rc == 0) { ErrorFSigSafe("%u: ?? [%p]\n", i, array[i]); continue; } mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)"; if (info.dli_saddr) ErrorFSigSafe( "%u: %s (%s+0x%x) [%p]\n", i, mod, info.dli_sname, (unsigned int)((char *) array[i] - (char *) info.dli_saddr), array[i]); else ErrorFSigSafe( "%u: %s (%p+0x%x) [%p]\n", i, mod, info.dli_fbase, (unsigned int)((char *) array[i] - (char *) info.dli_fbase), array[i]); } ErrorFSigSafe("\n"); } #else /* not glibc or glibc < 2.1 */ #if defined(__sun) && defined(__SVR4) #define HAVE_PSTACK #endif #if defined(HAVE_WALKCONTEXT) /* Solaris 9 & later */ #include #include #include #include #ifdef _LP64 #define ElfSym Elf64_Sym #else #define ElfSym Elf32_Sym #endif /* Called for each frame on the stack to print its contents */ static int xorg_backtrace_frame(uintptr_t pc, int signo, void *arg) { Dl_info dlinfo; ElfSym *dlsym; char header[32]; int depth = *((int *) arg); if (signo) { char signame[SIG2STR_MAX]; if (sig2str(signo, signame) != 0) { strcpy(signame, "unknown"); } ErrorFSigSafe("** Signal %u (%s)\n", signo, signame); } snprintf(header, sizeof(header), "%d: 0x%lx", depth, pc); *((int *) arg) = depth + 1; /* Ask system dynamic loader for info on the address */ if (dladdr1((void *) pc, &dlinfo, (void **) &dlsym, RTLD_DL_SYMENT)) { unsigned long offset = pc - (uintptr_t) dlinfo.dli_saddr; const char *symname; if (offset < dlsym->st_size) { /* inside a function */ symname = dlinfo.dli_sname; } else { /* found which file it was in, but not which function */ symname = "
"; offset = pc - (uintptr_t) dlinfo.dli_fbase; } ErrorFSigSafe("%s: %s:%s+0x%x\n", header, dlinfo.dli_fname, symname, offset); } else { /* Couldn't find symbol info from system dynamic loader, should * probably poke elfloader here, but haven't written that code yet, * so we just print the pc. */ ErrorFSigSafe("%s\n", header); } return 0; } #endif /* HAVE_WALKCONTEXT */ #ifdef HAVE_PSTACK #include static int xorg_backtrace_pstack(void) { pid_t kidpid; int pipefd[2]; if (pipe(pipefd) != 0) { return -1; } kidpid = fork1(); if (kidpid == -1) { /* ERROR */ return -1; } else if (kidpid == 0) { /* CHILD */ char parent[16]; seteuid(0); close(STDIN_FILENO); close(STDOUT_FILENO); dup2(pipefd[1], STDOUT_FILENO); closefrom(STDERR_FILENO); snprintf(parent, sizeof(parent), "%d", getppid()); execle("/usr/bin/pstack", "pstack", parent, NULL); exit(1); } else { /* PARENT */ char btline[256]; int kidstat; int bytesread; int done = 0; close(pipefd[1]); while (!done) { bytesread = read(pipefd[0], btline, sizeof(btline) - 1); if (bytesread > 0) { btline[bytesread] = 0; ErrorFSigSafe("%s", btline); } else if ((bytesread < 0) || ((errno != EINTR) && (errno != EAGAIN))) done = 1; } close(pipefd[0]); waitpid(kidpid, &kidstat, 0); if (kidstat != 0) return -1; } return 0; } #endif /* HAVE_PSTACK */ #if defined(HAVE_PSTACK) || defined(HAVE_WALKCONTEXT) void xorg_backtrace(void) { ErrorFSigSafe("\n"); ErrorFSigSafe("Backtrace:\n"); #ifdef HAVE_PSTACK /* First try fork/exec of pstack - otherwise fall back to walkcontext pstack is preferred since it can print names of non-exported functions */ if (xorg_backtrace_pstack() < 0) #endif { #ifdef HAVE_WALKCONTEXT ucontext_t u; int depth = 1; if (getcontext(&u) == 0) walkcontext(&u, xorg_backtrace_frame, &depth); else #endif ErrorFSigSafe("Failed to get backtrace info: %s\n", strerror(errno)); } ErrorFSigSafe("\n"); } #else /* Default fallback if we can't find any way to get a backtrace */ void xorg_backtrace(void) { return; } #endif #endif #endif xorg-server-21.1.16/os/client.c0000644000175000017500000003673014757411105011707 /* * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). All * rights reserved. * Copyright (c) 1993, 2010, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * @file * * This file contains functionality for identifying clients by various * means. The primary purpose of identification is to simply aid in * finding out which clients are using X server and how they are using * it. For example, it's often necessary to monitor what requests * clients are executing (to spot bad behaviour) and how they are * allocating resources in X server (to spot excessive resource * usage). * * This framework automatically allocates information, that can be * used for client identification, when a client connects to the * server. The information is freed when the client disconnects. The * allocated information is just a collection of various IDs, such as * PID and process name for local clients, that are likely to be * useful in analyzing X server usage. * * Users of the framework can query ID information about clients at * any time. To avoid repeated polling of IDs the users can also * subscribe for notifications about the availability of ID * information. IDs have been allocated before ClientStateCallback is * called with ClientStateInitial state. Similarly the IDs will be * released after ClientStateCallback is called with ClientStateGone * state. * * Author: Rami Ylimäki */ #include #include #include #include "client.h" #include "os.h" #include "dixstruct.h" #ifdef __sun #include #include #endif #ifdef __OpenBSD__ #include #include #include #include #include #endif #ifdef __APPLE__ #include #include #include #endif /** * Try to determine a PID for a client from its connection * information. This should be called only once when new client has * connected, use GetClientPid to determine the PID at other times. * * @param[in] client Connection linked to some process. * * @return PID of the client. Error (-1) if PID can't be determined * for the client. * * @see GetClientPid */ pid_t DetermineClientPid(struct _Client * client) { LocalClientCredRec *lcc = NULL; pid_t pid = -1; if (client == NullClient) return pid; if (client == serverClient) return getpid(); if (GetLocalClientCreds(client, &lcc) != -1) { if (lcc->fieldsSet & LCC_PID_SET) pid = lcc->pid; FreeLocalClientCreds(lcc); } return pid; } /** * Try to determine a command line string for a client based on its * PID. Note that mapping PID to a command hasn't been implemented for * some operating systems. This should be called only once when a new * client has connected, use GetClientCmdName/Args to determine the * string at other times. * * @param[in] pid Process ID of a client. * @param[out] cmdname Client process name without arguments. You must * release this by calling free. On error NULL is * returned. Pass NULL if you aren't interested in * this value. * @param[out] cmdargs Arguments to client process. Useful for * identifying a client that is executed from a * launcher program. You must release this by * calling free. On error NULL is returned. Pass * NULL if you aren't interested in this value. * * @see GetClientCmdName/Args */ void DetermineClientCmd(pid_t pid, const char **cmdname, const char **cmdargs) { #if !defined(__APPLE__) char path[PATH_MAX + 1]; int totsize = 0; int fd = 0; #endif if (cmdname) *cmdname = NULL; if (cmdargs) *cmdargs = NULL; if (pid == -1) return; #if defined (__APPLE__) { static dispatch_once_t once; static int argmax; dispatch_once(&once, ^{ int mib[2]; size_t len; mib[0] = CTL_KERN; mib[1] = KERN_ARGMAX; len = sizeof(argmax); if (sysctl(mib, 2, &argmax, &len, NULL, 0) == -1) { ErrorF("Unable to dynamically determine kern.argmax, using ARG_MAX (%d)\n", ARG_MAX); argmax = ARG_MAX; } }); int mib[3]; size_t len = argmax; int32_t argc = -1; char * const procargs = malloc(len); if (!procargs) { ErrorF("Failed to allocate memory (%lu bytes) for KERN_PROCARGS2 result for pid %d: %s\n", len, pid, strerror(errno)); return; } mib[0] = CTL_KERN; mib[1] = KERN_PROCARGS2; mib[2] = pid; if (sysctl(mib, 3, procargs, &len, NULL, 0) == -1) { ErrorF("Failed to determine KERN_PROCARGS2 for pid %d: %s\n", pid, strerror(errno)); free(procargs); return; } if (len < sizeof(argc) || len > argmax) { ErrorF("Erroneous length returned when querying KERN_PROCARGS2 for pid %d: %zu\n", pid, len); free(procargs); return; } /* Ensure we have a failsafe NUL termination just in case the last entry * was not actually NUL terminated. */ procargs[len-1] = '\0'; /* Setup our iterator */ char *is = procargs; /* The first element in the buffer is argc as a 32bit int. When using * the older KERN_PROCARGS, this is omitted, and one needs to guess * (usually by checking for an `=` character) when we start seeing * envvars instead of arguments. */ argc = *(int32_t *)is; is += sizeof(argc); /* The very next string is the executable path. Skip over it since * this function wants to return argv[0] and argv[1...n]. */ is += strlen(is) + 1; /* Skip over extra NUL characters to get to the start of argv[0] */ for (; (is < &procargs[len]) && !(*is); is++); if (! (is < &procargs[len])) { ErrorF("Arguments were not returned when querying KERN_PROCARGS2 for pid %d: %zu\n", pid, len); free(procargs); return; } if (cmdname) { *cmdname = strdup(is); } /* Jump over argv[0] and point to argv[1] */ is += strlen(is) + 1; if (cmdargs && is < &procargs[len]) { char *args = is; /* Remove the NUL terminators except the last one */ for (int i = 1; i < argc - 1; i++) { /* Advance to the NUL terminator */ is += strlen(is); /* Change the NUL to a space, ensuring we don't accidentally remove the terminal NUL */ if (is < &procargs[len-1]) { *is = ' '; } } *cmdargs = strdup(args); } free(procargs); } #elif defined(__OpenBSD__) /* on OpenBSD use kvm_getargv() */ { kvm_t *kd; char errbuf[_POSIX2_LINE_MAX]; char **argv; struct kinfo_proc *kp; size_t len = 0; int i, n; kd = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, errbuf); if (kd == NULL) return; kp = kvm_getprocs(kd, KERN_PROC_PID, pid, sizeof(struct kinfo_proc), &n); if (n != 1) return; argv = kvm_getargv(kd, kp, 0); if (cmdname) { if (argv == NULL || argv[0] == NULL) return; else *cmdname = strdup(argv[0]); } if (cmdargs) { i = 1; while (argv[i] != NULL) { len += strlen(argv[i]) + 1; i++; } *cmdargs = calloc(1, len); i = 1; while (argv[i] != NULL) { strlcat(*(char **)cmdargs, argv[i], len); strlcat(*(char **)cmdargs, " ", len); i++; } } kvm_close(kd); } #else /* Linux using /proc/pid/cmdline */ /* Check if /proc/pid/cmdline exists. It's not supported on all * operating systems. */ if (snprintf(path, sizeof(path), "/proc/%d/cmdline", pid) < 0) return; fd = open(path, O_RDONLY); if (fd < 0) #ifdef __sun goto fallback; #else return; #endif /* Read the contents of /proc/pid/cmdline. It should contain the * process name and arguments. */ totsize = read(fd, path, sizeof(path)); close(fd); if (totsize <= 0) return; path[totsize - 1] = '\0'; /* Construct the process name without arguments. */ if (cmdname) { *cmdname = strdup(path); } /* Construct the arguments for client process. */ if (cmdargs) { int cmdsize = strlen(path) + 1; int argsize = totsize - cmdsize; char *args = NULL; if (argsize > 0) args = malloc(argsize); if (args) { int i = 0; for (i = 0; i < (argsize - 1); ++i) { const char c = path[cmdsize + i]; args[i] = (c == '\0') ? ' ' : c; } args[argsize - 1] = '\0'; *cmdargs = args; } } return; #endif #ifdef __sun /* Solaris */ fallback: /* Solaris prior to 11.3.5 does not support /proc/pid/cmdline, but * makes information similar to what ps shows available in a binary * structure in the /proc/pid/psinfo file. */ if (snprintf(path, sizeof(path), "/proc/%d/psinfo", pid) < 0) return; fd = open(path, O_RDONLY); if (fd < 0) { ErrorF("Failed to open %s: %s\n", path, strerror(errno)); return; } else { psinfo_t psinfo = { 0 }; char *sp; totsize = read(fd, &psinfo, sizeof(psinfo_t)); close(fd); if (totsize <= 0) return; /* pr_psargs is the first PRARGSZ (80) characters of the command * line string - assume up to the first space is the command name, * since it's not delimited. While there is also pr_fname, that's * more limited, giving only the first 16 chars of the basename of * the file that was exec'ed, thus cutting off many long gnome * command names, or returning "isapython2.6" for all python scripts. */ psinfo.pr_psargs[PRARGSZ - 1] = '\0'; sp = strchr(psinfo.pr_psargs, ' '); if (sp) *sp++ = '\0'; if (cmdname) *cmdname = strdup(psinfo.pr_psargs); if (cmdargs && sp) *cmdargs = strdup(sp); } #endif } /** * Called when a new client connects. Allocates client ID information. * * @param[in] client Recently connected client. */ void ReserveClientIds(struct _Client *client) { #ifdef CLIENTIDS if (client == NullClient) return; assert(!client->clientIds); client->clientIds = calloc(1, sizeof(ClientIdRec)); if (!client->clientIds) return; client->clientIds->pid = DetermineClientPid(client); if (client->clientIds->pid != -1) DetermineClientCmd(client->clientIds->pid, &client->clientIds->cmdname, &client->clientIds->cmdargs); DebugF("client(%lx): Reserved pid(%d).\n", (unsigned long) client->clientAsMask, client->clientIds->pid); DebugF("client(%lx): Reserved cmdname(%s) and cmdargs(%s).\n", (unsigned long) client->clientAsMask, client->clientIds->cmdname ? client->clientIds->cmdname : "NULL", client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL"); #endif /* CLIENTIDS */ } /** * Called when an existing client disconnects. Frees client ID * information. * * @param[in] client Recently disconnected client. */ void ReleaseClientIds(struct _Client *client) { #ifdef CLIENTIDS if (client == NullClient) return; if (!client->clientIds) return; DebugF("client(%lx): Released pid(%d).\n", (unsigned long) client->clientAsMask, client->clientIds->pid); DebugF("client(%lx): Released cmdline(%s) and cmdargs(%s).\n", (unsigned long) client->clientAsMask, client->clientIds->cmdname ? client->clientIds->cmdname : "NULL", client->clientIds->cmdargs ? client->clientIds->cmdargs : "NULL"); free((void *) client->clientIds->cmdname); /* const char * */ free((void *) client->clientIds->cmdargs); /* const char * */ free(client->clientIds); client->clientIds = NULL; #endif /* CLIENTIDS */ } /** * Get cached PID of a client. * * param[in] client Client whose PID has been already cached. * * @return Cached client PID. Error (-1) if called: * - before ClientStateInitial client state notification * - after ClientStateGone client state notification * - for remote clients * * @see DetermineClientPid */ pid_t GetClientPid(struct _Client *client) { if (client == NullClient) return -1; if (!client->clientIds) return -1; return client->clientIds->pid; } /** * Get cached command name string of a client. * * param[in] client Client whose command line string has been already * cached. * * @return Cached client command name. Error (NULL) if called: * - before ClientStateInitial client state notification * - after ClientStateGone client state notification * - for remote clients * - on OS that doesn't support mapping of PID to command line * * @see DetermineClientCmd */ const char * GetClientCmdName(struct _Client *client) { if (client == NullClient) return NULL; if (!client->clientIds) return NULL; return client->clientIds->cmdname; } /** * Get cached command arguments string of a client. * * param[in] client Client whose command line string has been already * cached. * * @return Cached client command arguments. Error (NULL) if called: * - before ClientStateInitial client state notification * - after ClientStateGone client state notification * - for remote clients * - on OS that doesn't support mapping of PID to command line * * @see DetermineClientCmd */ const char * GetClientCmdArgs(struct _Client *client) { if (client == NullClient) return NULL; if (!client->clientIds) return NULL; return client->clientIds->cmdargs; } xorg-server-21.1.16/os/connection.c0000644000175000017500000007466114757411105012575 /*********************************************************** Copyright 1987, 1989, 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, 1989 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. ******************************************************************/ /***************************************************************** * Stuff to create connections --- OS dependent * * EstablishNewConnections, CreateWellKnownSockets, ResetWellKnownSockets, * CloseDownConnection, * OnlyListToOneClient, * ListenToAllClients, * * (WaitForSomething is in its own file) * * In this implementation, a client socket table is not kept. * Instead, what would be the index into the table is just the * file descriptor of the socket. This won't work for if the * socket ids aren't small nums (0 - 2^8) * *****************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef WIN32 #include #endif #include #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #include #include #include #include #include #include #ifndef WIN32 #include #if defined(TCPCONN) #include #include #ifdef apollo #ifndef NO_TCP_H #include #endif #else #ifdef CSRG_BASED #include #endif #include #endif #include #endif #include #endif /* WIN32 */ #include "misc.h" /* for typedef of pointer */ #include "osdep.h" #include "opaque.h" #include "dixstruct.h" #include "xace.h" #define Pid_t pid_t #ifdef HAVE_GETPEERUCRED #include #include #else #define zoneid_t int #endif #ifdef HAVE_SYSTEMD_DAEMON #include #endif #include "probes.h" struct ospoll *server_poll; Bool NewOutputPending; /* not yet attempted to write some new output */ Bool NoListenAll; /* Don't establish any listening sockets */ static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */ Bool RunFromSigStopParent; /* send SIGSTOP to our own process; Upstart (or equivalent) will send SIGCONT back. */ static char dynamic_display[7]; /* display name */ Bool PartialNetwork; /* continue even if unable to bind all addrs */ static Pid_t ParentProcess; int GrabInProgress = 0; static void EstablishNewConnections(int curconn, int ready, void *data); static void set_poll_client(ClientPtr client); static void set_poll_clients(void); static XtransConnInfo *ListenTransConns = NULL; static int *ListenTransFds = NULL; static int ListenTransCount; static void ErrorConnMax(XtransConnInfo /* trans_conn */ ); static XtransConnInfo lookup_trans_conn(int fd) { if (ListenTransFds) { int i; for (i = 0; i < ListenTransCount; i++) if (ListenTransFds[i] == fd) return ListenTransConns[i]; } return NULL; } /* * If SIGUSR1 was set to SIG_IGN when the server started, assume that either * * a- The parent process is ignoring SIGUSR1 * * or * * b- The parent process is expecting a SIGUSR1 * when the server is ready to accept connections * * In the first case, the signal will be harmless, in the second case, * the signal will be quite useful. */ static void InitParentProcess(void) { #if !defined(WIN32) OsSigHandlerPtr handler; handler = OsSignal(SIGUSR1, SIG_IGN); if (handler == SIG_IGN) RunFromSmartParent = TRUE; OsSignal(SIGUSR1, handler); ParentProcess = getppid(); #endif } void NotifyParentProcess(void) { #if !defined(WIN32) if (displayfd >= 0) { if (write(displayfd, display, strlen(display)) != strlen(display)) FatalError("Cannot write display number to fd %d\n", displayfd); if (write(displayfd, "\n", 1) != 1) FatalError("Cannot write display number to fd %d\n", displayfd); close(displayfd); displayfd = -1; } if (RunFromSmartParent) { if (ParentProcess > 1) { kill(ParentProcess, SIGUSR1); } } if (RunFromSigStopParent) raise(SIGSTOP); #ifdef HAVE_SYSTEMD_DAEMON /* If we have been started as a systemd service, tell systemd that we are ready. Otherwise sd_notify() won't do anything. */ sd_notify(0, "READY=1"); #endif #endif } static Bool TryCreateSocket(int num, int *partial) { char port[20]; snprintf(port, sizeof(port), "%d", num); return (_XSERVTransMakeAllCOTSServerListeners(port, partial, &ListenTransCount, &ListenTransConns) >= 0); } /***************** * CreateWellKnownSockets * At initialization, create the sockets to listen on for new clients. *****************/ void CreateWellKnownSockets(void) { int i; int partial = 0; /* display is initialized to "0" by main(). It is then set to the display * number if specified on the command line. */ if (NoListenAll) { ListenTransCount = 0; } else if ((displayfd < 0) || explicit_display) { if (TryCreateSocket(atoi(display), &partial) && ListenTransCount >= 1) if (!PartialNetwork && partial) FatalError ("Failed to establish all listening sockets"); } else { /* -displayfd and no explicit display number */ Bool found = 0; for (i = 0; i < 65536 - X_TCP_PORT; i++) { if (TryCreateSocket(i, &partial) && !partial) { found = 1; break; } else CloseWellKnownConnections(); } if (!found) FatalError("Failed to find a socket to listen on"); snprintf(dynamic_display, sizeof(dynamic_display), "%d", i); display = dynamic_display; LogSetDisplay(); } ListenTransFds = xallocarray(ListenTransCount, sizeof (int)); if (ListenTransFds == NULL) FatalError ("Failed to create listening socket array"); for (i = 0; i < ListenTransCount; i++) { int fd = _XSERVTransGetConnectionNumber(ListenTransConns[i]); ListenTransFds[i] = fd; SetNotifyFd(fd, EstablishNewConnections, X_NOTIFY_READ, NULL); if (!_XSERVTransIsLocal(ListenTransConns[i])) DefineSelf (fd); } if (ListenTransCount == 0 && !NoListenAll) FatalError ("Cannot establish any listening sockets - Make sure an X server isn't already running"); #if !defined(WIN32) OsSignal(SIGPIPE, SIG_IGN); OsSignal(SIGHUP, AutoResetServer); #endif OsSignal(SIGINT, GiveUp); OsSignal(SIGTERM, GiveUp); ResetHosts(display); InitParentProcess(); #ifdef XDMCP XdmcpInit(); #endif } void ResetWellKnownSockets(void) { int i; ResetOsBuffers(); for (i = 0; i < ListenTransCount; i++) { int status = _XSERVTransResetListener(ListenTransConns[i]); if (status != TRANS_RESET_NOOP) { if (status == TRANS_RESET_FAILURE) { /* * ListenTransConns[i] freed by xtrans. * Remove it from out list. */ RemoveNotifyFd(ListenTransFds[i]); ListenTransFds[i] = ListenTransFds[ListenTransCount - 1]; ListenTransConns[i] = ListenTransConns[ListenTransCount - 1]; ListenTransCount -= 1; i -= 1; } else if (status == TRANS_RESET_NEW_FD) { /* * A new file descriptor was allocated (the old one was closed) */ int newfd = _XSERVTransGetConnectionNumber(ListenTransConns[i]); ListenTransFds[i] = newfd; } } } for (i = 0; i < ListenTransCount; i++) SetNotifyFd(ListenTransFds[i], EstablishNewConnections, X_NOTIFY_READ, NULL); ResetAuthorization(); ResetHosts(display); /* * restart XDMCP */ #ifdef XDMCP XdmcpReset(); #endif } void CloseWellKnownConnections(void) { int i; for (i = 0; i < ListenTransCount; i++) { if (ListenTransConns[i] != NULL) { _XSERVTransClose(ListenTransConns[i]); ListenTransConns[i] = NULL; if (ListenTransFds != NULL) RemoveNotifyFd(ListenTransFds[i]); } } ListenTransCount = 0; } static void AuthAudit(ClientPtr client, Bool letin, struct sockaddr *saddr, int len, unsigned int proto_n, char *auth_proto, int auth_id) { char addr[128]; char client_uid_string[64]; LocalClientCredRec *lcc; #ifdef XSERVER_DTRACE pid_t client_pid = -1; zoneid_t client_zid = -1; #endif if (!len) strlcpy(addr, "local host", sizeof(addr)); else switch (saddr->sa_family) { case AF_UNSPEC: #if defined(UNIXCONN) || defined(LOCALCONN) case AF_UNIX: #endif strlcpy(addr, "local host", sizeof(addr)); break; #if defined(TCPCONN) case AF_INET: snprintf(addr, sizeof(addr), "IP %s", inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr)); break; #if defined(IPv6) && defined(AF_INET6) case AF_INET6:{ char ipaddr[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, &((struct sockaddr_in6 *) saddr)->sin6_addr, ipaddr, sizeof(ipaddr)); snprintf(addr, sizeof(addr), "IP %s", ipaddr); } break; #endif #endif default: strlcpy(addr, "unknown address", sizeof(addr)); } if (GetLocalClientCreds(client, &lcc) != -1) { int slen; /* length written to client_uid_string */ strcpy(client_uid_string, " ( "); slen = 3; if (lcc->fieldsSet & LCC_UID_SET) { snprintf(client_uid_string + slen, sizeof(client_uid_string) - slen, "uid=%ld ", (long) lcc->euid); slen = strlen(client_uid_string); } if (lcc->fieldsSet & LCC_GID_SET) { snprintf(client_uid_string + slen, sizeof(client_uid_string) - slen, "gid=%ld ", (long) lcc->egid); slen = strlen(client_uid_string); } if (lcc->fieldsSet & LCC_PID_SET) { #ifdef XSERVER_DTRACE client_pid = lcc->pid; #endif snprintf(client_uid_string + slen, sizeof(client_uid_string) - slen, "pid=%ld ", (long) lcc->pid); slen = strlen(client_uid_string); } if (lcc->fieldsSet & LCC_ZID_SET) { #ifdef XSERVER_DTRACE client_zid = lcc->zoneid; #endif snprintf(client_uid_string + slen, sizeof(client_uid_string) - slen, "zoneid=%ld ", (long) lcc->zoneid); slen = strlen(client_uid_string); } snprintf(client_uid_string + slen, sizeof(client_uid_string) - slen, ")"); FreeLocalClientCreds(lcc); } else { client_uid_string[0] = '\0'; } #ifdef XSERVER_DTRACE XSERVER_CLIENT_AUTH(client->index, addr, client_pid, client_zid); #endif if (auditTrailLevel > 1) { if (proto_n) AuditF("client %d %s from %s%s\n Auth name: %.*s ID: %d\n", client->index, letin ? "connected" : "rejected", addr, client_uid_string, (int) proto_n, auth_proto, auth_id); else AuditF("client %d %s from %s%s\n", client->index, letin ? "connected" : "rejected", addr, client_uid_string); } } XID AuthorizationIDOfClient(ClientPtr client) { if (client->osPrivate) return ((OsCommPtr) client->osPrivate)->auth_id; else return None; } /***************************************************************** * ClientAuthorized * * Sent by the client at connection setup: * typedef struct _xConnClientPrefix { * CARD8 byteOrder; * BYTE pad; * CARD16 majorVersion, minorVersion; * CARD16 nbytesAuthProto; * CARD16 nbytesAuthString; * } xConnClientPrefix; * * It is hoped that eventually one protocol will be agreed upon. In the * mean time, a server that implements a different protocol than the * client expects, or a server that only implements the host-based * mechanism, will simply ignore this information. * *****************************************************************/ const char * ClientAuthorized(ClientPtr client, unsigned int proto_n, char *auth_proto, unsigned int string_n, char *auth_string) { OsCommPtr priv; Xtransaddr *from = NULL; int family; int fromlen; XID auth_id; const char *reason = NULL; XtransConnInfo trans_conn; priv = (OsCommPtr) client->osPrivate; trans_conn = priv->trans_conn; /* Allow any client to connect without authorization on a launchd socket, because it is securely created -- this prevents a race condition on launch */ if (trans_conn->flags & TRANS_NOXAUTH) { auth_id = (XID) 0L; } else { auth_id = CheckAuthorization(proto_n, auth_proto, string_n, auth_string, client, &reason); } if (auth_id == (XID) ~0L) { if (_XSERVTransGetPeerAddr(trans_conn, &family, &fromlen, &from) != -1) { if (InvalidHost((struct sockaddr *) from, fromlen, client)) AuthAudit(client, FALSE, (struct sockaddr *) from, fromlen, proto_n, auth_proto, auth_id); else { auth_id = (XID) 0; #ifdef XSERVER_DTRACE if ((auditTrailLevel > 1) || XSERVER_CLIENT_AUTH_ENABLED()) #else if (auditTrailLevel > 1) #endif AuthAudit(client, TRUE, (struct sockaddr *) from, fromlen, proto_n, auth_proto, auth_id); } free(from); } if (auth_id == (XID) ~0L) { if (reason) return reason; else return "Client is not authorized to connect to Server"; } } #ifdef XSERVER_DTRACE else if ((auditTrailLevel > 1) || XSERVER_CLIENT_AUTH_ENABLED()) #else else if (auditTrailLevel > 1) #endif { if (_XSERVTransGetPeerAddr(trans_conn, &family, &fromlen, &from) != -1) { AuthAudit(client, TRUE, (struct sockaddr *) from, fromlen, proto_n, auth_proto, auth_id); free(from); } } priv->auth_id = auth_id; priv->conn_time = 0; #ifdef XDMCP /* indicate to Xdmcp protocol that we've opened new client */ XdmcpOpenDisplay(priv->fd); #endif /* XDMCP */ XaceHook(XACE_AUTH_AVAIL, client, auth_id); /* At this point, if the client is authorized to change the access control * list, we should getpeername() information, and add the client to * the selfhosts list. It's not really the host machine, but the * true purpose of the selfhosts list is to see who may change the * access control list. */ return ((char *) NULL); } static void ClientReady(int fd, int xevents, void *data) { ClientPtr client = data; if (xevents & X_NOTIFY_ERROR) { CloseDownClient(client); return; } if (xevents & X_NOTIFY_READ) mark_client_ready(client); if (xevents & X_NOTIFY_WRITE) { ospoll_mute(server_poll, fd, X_NOTIFY_WRITE); NewOutputPending = TRUE; } } static ClientPtr AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time) { OsCommPtr oc; ClientPtr client; oc = malloc(sizeof(OsCommRec)); if (!oc) return NullClient; oc->trans_conn = trans_conn; oc->fd = fd; oc->input = (ConnectionInputPtr) NULL; oc->output = (ConnectionOutputPtr) NULL; oc->auth_id = None; oc->conn_time = conn_time; oc->flags = 0; if (!(client = NextAvailableClient((void *) oc))) { free(oc); return NullClient; } client->local = ComputeLocalClient(client); ospoll_add(server_poll, fd, ospoll_trigger_edge, ClientReady, client); set_poll_client(client); #ifdef DEBUG ErrorF("AllocNewConnection: client index = %d, socket fd = %d, local = %d\n", client->index, fd, client->local); #endif #ifdef XSERVER_DTRACE XSERVER_CLIENT_CONNECT(client->index, fd); #endif return client; } /***************** * EstablishNewConnections * If anyone is waiting on listened sockets, accept them. Drop pending * connections if they've stuck around for more than one minute. *****************/ #define TimeOutValue 60 * MILLI_PER_SECOND static void EstablishNewConnections(int curconn, int ready, void *data) { int newconn; /* fd of new client */ CARD32 connect_time; int i; ClientPtr client; OsCommPtr oc; XtransConnInfo trans_conn, new_trans_conn; int status; connect_time = GetTimeInMillis(); /* kill off stragglers */ for (i = 1; i < currentMaxClients; i++) { if ((client = clients[i])) { oc = (OsCommPtr) (client->osPrivate); if ((oc && (oc->conn_time != 0) && (connect_time - oc->conn_time) >= TimeOutValue) || (client->noClientException != Success && !client->clientGone)) CloseDownClient(client); } } if ((trans_conn = lookup_trans_conn(curconn)) == NULL) return; if ((new_trans_conn = _XSERVTransAccept(trans_conn, &status)) == NULL) return; newconn = _XSERVTransGetConnectionNumber(new_trans_conn); _XSERVTransSetOption(new_trans_conn, TRANS_NONBLOCKING, 1); if (trans_conn->flags & TRANS_NOXAUTH) new_trans_conn->flags = new_trans_conn->flags | TRANS_NOXAUTH; if (!AllocNewConnection(new_trans_conn, newconn, connect_time)) { ErrorConnMax(new_trans_conn); } return; } #define NOROOM "Maximum number of clients reached" /************ * ErrorConnMax * Fail a connection due to lack of client or file descriptor space ************/ static void ConnMaxNotify(int fd, int events, void *data) { XtransConnInfo trans_conn = data; char order = 0; /* try to read the byte-order of the connection */ (void) _XSERVTransRead(trans_conn, &order, 1); if (order == 'l' || order == 'B' || order == 'r' || order == 'R') { xConnSetupPrefix csp; char pad[3] = { 0, 0, 0 }; int whichbyte = 1; struct iovec iov[3]; csp.success = xFalse; csp.lengthReason = sizeof(NOROOM) - 1; csp.length = (sizeof(NOROOM) + 2) >> 2; csp.majorVersion = X_PROTOCOL; csp.minorVersion = X_PROTOCOL_REVISION; if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { swaps(&csp.majorVersion); swaps(&csp.minorVersion); swaps(&csp.length); } iov[0].iov_len = sz_xConnSetupPrefix; iov[0].iov_base = (char *) &csp; iov[1].iov_len = csp.lengthReason; iov[1].iov_base = (void *) NOROOM; iov[2].iov_len = (4 - (csp.lengthReason & 3)) & 3; iov[2].iov_base = pad; (void) _XSERVTransWritev(trans_conn, iov, 3); } RemoveNotifyFd(trans_conn->fd); _XSERVTransClose(trans_conn); } static void ErrorConnMax(XtransConnInfo trans_conn) { if (!SetNotifyFd(trans_conn->fd, ConnMaxNotify, X_NOTIFY_READ, trans_conn)) _XSERVTransClose(trans_conn); } /************ * CloseDownFileDescriptor: * Remove this file descriptor ************/ void CloseDownFileDescriptor(OsCommPtr oc) { if (oc->trans_conn) { int connection = oc->fd; #ifdef XDMCP XdmcpCloseDisplay(connection); #endif ospoll_remove(server_poll, connection); _XSERVTransDisconnect(oc->trans_conn); _XSERVTransClose(oc->trans_conn); oc->trans_conn = NULL; oc->fd = -1; } } /***************** * CloseDownConnection * Delete client from AllClients and free resources *****************/ void CloseDownConnection(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; if (FlushCallback) CallCallbacks(&FlushCallback, client); if (oc->output) FlushClient(client, oc, (char *) NULL, 0); CloseDownFileDescriptor(oc); FreeOsBuffers(oc); free(client->osPrivate); client->osPrivate = (void *) NULL; if (auditTrailLevel > 1) AuditF("client %d disconnected\n", client->index); } struct notify_fd { int mask; NotifyFdProcPtr notify; void *data; }; /***************** * HandleNotifyFd * A poll callback to be called when the registered * file descriptor is ready. *****************/ static void HandleNotifyFd(int fd, int xevents, void *data) { struct notify_fd *n = data; n->notify(fd, xevents, n->data); } /***************** * SetNotifyFd * Registers a callback to be invoked when the specified * file descriptor becomes readable. *****************/ Bool SetNotifyFd(int fd, NotifyFdProcPtr notify, int mask, void *data) { struct notify_fd *n; n = ospoll_data(server_poll, fd); if (!n) { if (mask == 0) return TRUE; n = calloc(1, sizeof (struct notify_fd)); if (!n) return FALSE; ospoll_add(server_poll, fd, ospoll_trigger_level, HandleNotifyFd, n); } if (mask == 0) { ospoll_remove(server_poll, fd); free(n); } else { int listen = mask & ~n->mask; int mute = n->mask & ~mask; if (listen) ospoll_listen(server_poll, fd, listen); if (mute) ospoll_mute(server_poll, fd, mute); n->mask = mask; n->data = data; n->notify = notify; } return TRUE; } /***************** * OnlyListenToOneClient: * Only accept requests from one client. Continue to handle new * connections, but don't take any protocol requests from the new * ones. Note that if GrabInProgress is set, EstablishNewConnections * needs to put new clients into SavedAllSockets and SavedAllClients. * Note also that there is no timeout for this in the protocol. * This routine is "undone" by ListenToAllClients() *****************/ int OnlyListenToOneClient(ClientPtr client) { int rc; rc = XaceHook(XACE_SERVER_ACCESS, client, DixGrabAccess); if (rc != Success) return rc; if (!GrabInProgress) { GrabInProgress = client->index; set_poll_clients(); } return rc; } /**************** * ListenToAllClients: * Undoes OnlyListentToOneClient() ****************/ void ListenToAllClients(void) { if (GrabInProgress) { GrabInProgress = 0; set_poll_clients(); } } /**************** * IgnoreClient * Removes one client from input masks. * Must have corresponding call to AttendClient. ****************/ void IgnoreClient(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; client->ignoreCount++; if (client->ignoreCount > 1) return; isItTimeToYield = TRUE; mark_client_not_ready(client); oc->flags |= OS_COMM_IGNORED; set_poll_client(client); } /**************** * AttendClient * Adds one client back into the input masks. ****************/ void AttendClient(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; if (client->clientGone) { /* * client is gone, so any pending requests will be dropped and its * ignore count doesn't matter. */ return; } client->ignoreCount--; if (client->ignoreCount) return; oc->flags &= ~OS_COMM_IGNORED; set_poll_client(client); if (listen_to_client(client)) mark_client_ready(client); else { /* grab active, mark ready when grab goes away */ mark_client_saved_ready(client); } } /* make client impervious to grabs; assume only executing client calls this */ void MakeClientGrabImpervious(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; oc->flags |= OS_COMM_GRAB_IMPERVIOUS; set_poll_client(client); if (ServerGrabCallback) { ServerGrabInfoRec grabinfo; grabinfo.client = client; grabinfo.grabstate = CLIENT_IMPERVIOUS; CallCallbacks(&ServerGrabCallback, &grabinfo); } } /* make client pervious to grabs; assume only executing client calls this */ void MakeClientGrabPervious(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; oc->flags &= ~OS_COMM_GRAB_IMPERVIOUS; set_poll_client(client); isItTimeToYield = TRUE; if (ServerGrabCallback) { ServerGrabInfoRec grabinfo; grabinfo.client = client; grabinfo.grabstate = CLIENT_PERVIOUS; CallCallbacks(&ServerGrabCallback, &grabinfo); } } /* Add a fd (from launchd or similar) to our listeners */ void ListenOnOpenFD(int fd, int noxauth) { char port[PATH_MAX]; XtransConnInfo ciptr; const char *display_env = getenv("DISPLAY"); /* First check if display_env matches a [.] scheme (eg: launchd) */ if (display_env && display_env[0] == '/') { struct stat sbuf; strlcpy(port, display_env, sizeof(port)); /* If the path exists, we don't have do do anything else. * If it doesn't, we need to check for a . to strip off and recheck. */ if (0 != stat(port, &sbuf)) { char *dot = strrchr(port, '.'); if (dot) { *dot = '\0'; if (0 != stat(port, &sbuf)) { display_env = NULL; } } else { display_env = NULL; } } } if (!display_env) { /* Just some default so things don't break and die. */ snprintf(port, sizeof(port), ":%d", atoi(display)); } /* Make our XtransConnInfo * TRANS_SOCKET_LOCAL_INDEX = 5 from Xtrans.c */ ciptr = _XSERVTransReopenCOTSServer(5, fd, port); if (ciptr == NULL) { ErrorF("Got NULL while trying to Reopen listen port.\n"); return; } if (noxauth) ciptr->flags = ciptr->flags | TRANS_NOXAUTH; /* Allocate space to store it */ ListenTransFds = xnfreallocarray(ListenTransFds, ListenTransCount + 1, sizeof(int)); ListenTransConns = xnfreallocarray(ListenTransConns, ListenTransCount + 1, sizeof(XtransConnInfo)); /* Store it */ ListenTransConns[ListenTransCount] = ciptr; ListenTransFds[ListenTransCount] = fd; SetNotifyFd(fd, EstablishNewConnections, X_NOTIFY_READ, NULL); /* Increment the count */ ListenTransCount++; } /* based on TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) */ Bool AddClientOnOpenFD(int fd) { XtransConnInfo ciptr; CARD32 connect_time; char port[20]; snprintf(port, sizeof(port), ":%d", atoi(display)); ciptr = _XSERVTransReopenCOTSServer(5, fd, port); if (ciptr == NULL) return FALSE; _XSERVTransSetOption(ciptr, TRANS_NONBLOCKING, 1); ciptr->flags |= TRANS_NOXAUTH; connect_time = GetTimeInMillis(); if (!AllocNewConnection(ciptr, fd, connect_time)) { ErrorConnMax(ciptr); return FALSE; } return TRUE; } Bool listen_to_client(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; if (oc->flags & OS_COMM_IGNORED) return FALSE; if (!GrabInProgress) return TRUE; if (client->index == GrabInProgress) return TRUE; if (oc->flags & OS_COMM_GRAB_IMPERVIOUS) return TRUE; return FALSE; } static void set_poll_client(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; if (oc->trans_conn) { if (listen_to_client(client)) ospoll_listen(server_poll, oc->trans_conn->fd, X_NOTIFY_READ); else ospoll_mute(server_poll, oc->trans_conn->fd, X_NOTIFY_READ); } } static void set_poll_clients(void) { int i; for (i = 1; i < currentMaxClients; i++) { ClientPtr client = clients[i]; if (client && !client->clientGone) set_poll_client(client); } } xorg-server-21.1.16/os/inputthread.c0000644000175000017500000003551614757411105012761 /* inputthread.c -- Threaded generation of input events. * * Copyright © 2007-2008 Tiago Vignatti * Copyright © 2010 Nokia * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. * * Authors: Fernando Carrijo * Tiago Vignatti */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "inputstr.h" #include "opaque.h" #include "osdep.h" #if INPUTTHREAD Bool InputThreadEnable = TRUE; /** * An input device as seen by the threaded input facility */ typedef enum _InputDeviceState { device_state_added, device_state_running, device_state_removed } InputDeviceState; typedef struct _InputThreadDevice { struct xorg_list node; NotifyFdProcPtr readInputProc; void *readInputArgs; int fd; InputDeviceState state; } InputThreadDevice; /** * The threaded input facility. * * For now, we have one instance for all input devices. */ typedef struct { pthread_t thread; struct xorg_list devs; struct ospoll *fds; int readPipe; int writePipe; Bool changed; Bool running; } InputThreadInfo; static InputThreadInfo *inputThreadInfo; static int hotplugPipeRead = -1; static int hotplugPipeWrite = -1; static int input_mutex_count; #ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP static pthread_mutex_t input_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; #else static pthread_mutex_t input_mutex; static Bool input_mutex_initialized; #endif int in_input_thread(void) { return inputThreadInfo && pthread_equal(pthread_self(), inputThreadInfo->thread); } void input_lock(void) { #ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP if (!input_mutex_initialized) { pthread_mutexattr_t mutex_attr; input_mutex_initialized = TRUE; pthread_mutexattr_init(&mutex_attr); pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&input_mutex, &mutex_attr); } #endif pthread_mutex_lock(&input_mutex); ++input_mutex_count; } void input_unlock(void) { --input_mutex_count; pthread_mutex_unlock(&input_mutex); } void input_force_unlock(void) { if (pthread_mutex_trylock(&input_mutex) == 0) { input_mutex_count++; /* unlock +1 times for the trylock */ while (input_mutex_count > 0) input_unlock(); } } /** * Notify a thread about the availability of new asynchronously enqueued input * events. * * @see WaitForSomething() */ static void InputThreadFillPipe(int writeHead) { int ret; char byte = 0; do { ret = write(writeHead, &byte, 1); } while (ret < 0 && ETEST(errno)); } /** * Consume eventual notifications left by a thread. * * @see WaitForSomething() * @see InputThreadFillPipe() */ static int InputThreadReadPipe(int readHead) { int ret, array[10]; ret = read(readHead, &array, sizeof(array)); if (ret >= 0) return ret; if (errno != EAGAIN) FatalError("input-thread: draining pipe (%d)", errno); return 1; } static void InputReady(int fd, int xevents, void *data) { InputThreadDevice *dev = data; input_lock(); if (dev->state == device_state_running) dev->readInputProc(fd, xevents, dev->readInputArgs); input_unlock(); } /** * Register an input device in the threaded input facility * * @param fd File descriptor which identifies the input device * @param readInputProc Procedure used to read input from the device * @param readInputArgs Arguments to be consumed by the above procedure * * return 1 if success; 0 otherwise. */ int InputThreadRegisterDev(int fd, NotifyFdProcPtr readInputProc, void *readInputArgs) { InputThreadDevice *dev, *old; if (!inputThreadInfo) return SetNotifyFd(fd, readInputProc, X_NOTIFY_READ, readInputArgs); input_lock(); dev = NULL; xorg_list_for_each_entry(old, &inputThreadInfo->devs, node) { if (old->fd == fd && old->state != device_state_removed) { dev = old; break; } } if (dev) { dev->readInputProc = readInputProc; dev->readInputArgs = readInputArgs; } else { dev = calloc(1, sizeof(InputThreadDevice)); if (dev == NULL) { DebugF("input-thread: could not register device\n"); input_unlock(); return 0; } dev->fd = fd; dev->readInputProc = readInputProc; dev->readInputArgs = readInputArgs; dev->state = device_state_added; /* Do not prepend, so that any dev->state == device_state_removed * with the same dev->fd get processed first. */ xorg_list_append(&dev->node, &inputThreadInfo->devs); } inputThreadInfo->changed = TRUE; input_unlock(); DebugF("input-thread: registered device %d\n", fd); InputThreadFillPipe(hotplugPipeWrite); return 1; } /** * Unregister a device in the threaded input facility * * @param fd File descriptor which identifies the input device * * @return 1 if success; 0 otherwise. */ int InputThreadUnregisterDev(int fd) { InputThreadDevice *dev; Bool found_device = FALSE; /* return silently if input thread is already finished (e.g., at * DisableDevice time, evdev tries to call this function again through * xf86RemoveEnabledDevice) */ if (!inputThreadInfo) { RemoveNotifyFd(fd); return 1; } input_lock(); xorg_list_for_each_entry(dev, &inputThreadInfo->devs, node) if (dev->fd == fd) { found_device = TRUE; break; } /* fd didn't match any registered device. */ if (!found_device) { input_unlock(); return 0; } dev->state = device_state_removed; inputThreadInfo->changed = TRUE; input_unlock(); InputThreadFillPipe(hotplugPipeWrite); DebugF("input-thread: unregistered device: %d\n", fd); return 1; } static void InputThreadPipeNotify(int fd, int revents, void *data) { /* Empty pending input, shut down if the pipe has been closed */ if (InputThreadReadPipe(hotplugPipeRead) == 0) { inputThreadInfo->running = FALSE; } } /** * The workhorse of threaded input event generation. * * Or if you prefer: The WaitForSomething for input devices. :) * * Runs in parallel with the server main thread, listening to input devices in * an endless loop. Whenever new input data is made available, calls the * proper device driver's routines which are ultimately responsible for the * generation of input events. * * @see InputThreadPreInit() * @see InputThreadInit() */ static void* InputThreadDoWork(void *arg) { sigset_t set; /* Don't handle any signals on this thread */ sigfillset(&set); pthread_sigmask(SIG_BLOCK, &set, NULL); ddxInputThreadInit(); inputThreadInfo->running = TRUE; #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) pthread_setname_np (pthread_self(), "InputThread"); #elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID) pthread_setname_np ("InputThread"); #endif ospoll_add(inputThreadInfo->fds, hotplugPipeRead, ospoll_trigger_level, InputThreadPipeNotify, NULL); ospoll_listen(inputThreadInfo->fds, hotplugPipeRead, X_NOTIFY_READ); while (inputThreadInfo->running) { DebugF("input-thread: %s waiting for devices\n", __func__); /* Check for hotplug changes and modify the ospoll structure to suit */ if (inputThreadInfo->changed) { InputThreadDevice *dev, *tmp; input_lock(); inputThreadInfo->changed = FALSE; xorg_list_for_each_entry_safe(dev, tmp, &inputThreadInfo->devs, node) { switch (dev->state) { case device_state_added: ospoll_add(inputThreadInfo->fds, dev->fd, ospoll_trigger_level, InputReady, dev); ospoll_listen(inputThreadInfo->fds, dev->fd, X_NOTIFY_READ); dev->state = device_state_running; break; case device_state_running: break; case device_state_removed: ospoll_remove(inputThreadInfo->fds, dev->fd); xorg_list_del(&dev->node); free(dev); break; } } input_unlock(); } if (ospoll_wait(inputThreadInfo->fds, -1) < 0) { if (errno == EINVAL) FatalError("input-thread: %s (%s)", __func__, strerror(errno)); else if (errno != EINTR) ErrorF("input-thread: %s (%s)\n", __func__, strerror(errno)); } /* Kick main thread to process the generated input events and drain * events from hotplug pipe */ InputThreadFillPipe(inputThreadInfo->writePipe); } ospoll_remove(inputThreadInfo->fds, hotplugPipeRead); return NULL; } static void InputThreadNotifyPipe(int fd, int mask, void *data) { InputThreadReadPipe(fd); } /** * Pre-initialize the facility used for threaded generation of input events * */ void InputThreadPreInit(void) { int fds[2], hotplugPipe[2]; int flags; if (!InputThreadEnable) return; if (pipe(fds) < 0) FatalError("input-thread: could not create pipe"); if (pipe(hotplugPipe) < 0) FatalError("input-thread: could not create pipe"); inputThreadInfo = malloc(sizeof(InputThreadInfo)); if (!inputThreadInfo) FatalError("input-thread: could not allocate memory"); inputThreadInfo->changed = FALSE; inputThreadInfo->thread = 0; xorg_list_init(&inputThreadInfo->devs); inputThreadInfo->fds = ospoll_create(); /* By making read head non-blocking, we ensure that while the main thread * is busy servicing client requests, the dedicated input thread can work * in parallel. */ inputThreadInfo->readPipe = fds[0]; fcntl(inputThreadInfo->readPipe, F_SETFL, O_NONBLOCK); flags = fcntl(inputThreadInfo->readPipe, F_GETFD); if (flags != -1) { flags |= FD_CLOEXEC; (void)fcntl(inputThreadInfo->readPipe, F_SETFD, flags); } SetNotifyFd(inputThreadInfo->readPipe, InputThreadNotifyPipe, X_NOTIFY_READ, NULL); inputThreadInfo->writePipe = fds[1]; hotplugPipeRead = hotplugPipe[0]; fcntl(hotplugPipeRead, F_SETFL, O_NONBLOCK); flags = fcntl(hotplugPipeRead, F_GETFD); if (flags != -1) { flags |= FD_CLOEXEC; (void)fcntl(hotplugPipeRead, F_SETFD, flags); } hotplugPipeWrite = hotplugPipe[1]; #ifndef __linux__ /* Linux does not deal well with renaming the main thread */ #if defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID) pthread_setname_np (pthread_self(), "MainThread"); #elif defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID) pthread_setname_np ("MainThread"); #endif #endif } /** * Start the threaded generation of input events. This routine complements what * was previously done by InputThreadPreInit(), being only responsible for * creating the dedicated input thread. * */ void InputThreadInit(void) { pthread_attr_t attr; /* If the driver hasn't asked for input thread support by calling * InputThreadPreInit, then do nothing here */ if (!inputThreadInfo) return; pthread_attr_init(&attr); /* For OSes that differentiate between processes and threads, the following * lines have sense. Linux uses the 1:1 thread model. The scheduler handles * every thread as a normal process. Therefore this probably has no meaning * if we are under Linux. */ if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) != 0) ErrorF("input-thread: error setting thread scope\n"); DebugF("input-thread: creating thread\n"); pthread_create(&inputThreadInfo->thread, &attr, &InputThreadDoWork, NULL); pthread_attr_destroy (&attr); } /** * Stop the threaded generation of input events * * This function is supposed to be called at server shutdown time only. */ void InputThreadFini(void) { InputThreadDevice *dev, *next; if (!inputThreadInfo) return; /* Close the pipe to get the input thread to shut down */ close(hotplugPipeWrite); input_force_unlock(); pthread_join(inputThreadInfo->thread, NULL); xorg_list_for_each_entry_safe(dev, next, &inputThreadInfo->devs, node) { ospoll_remove(inputThreadInfo->fds, dev->fd); free(dev); } xorg_list_init(&inputThreadInfo->devs); ospoll_destroy(inputThreadInfo->fds); RemoveNotifyFd(inputThreadInfo->readPipe); close(inputThreadInfo->readPipe); close(inputThreadInfo->writePipe); inputThreadInfo->readPipe = -1; inputThreadInfo->writePipe = -1; close(hotplugPipeRead); hotplugPipeRead = -1; hotplugPipeWrite = -1; free(inputThreadInfo); inputThreadInfo = NULL; } int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldset) { return pthread_sigmask(how, set, oldset); } #else /* INPUTTHREAD */ Bool InputThreadEnable = FALSE; void input_lock(void) {} void input_unlock(void) {} void input_force_unlock(void) {} void InputThreadPreInit(void) {} void InputThreadInit(void) {} void InputThreadFini(void) {} int in_input_thread(void) { return 0; } int InputThreadRegisterDev(int fd, NotifyFdProcPtr readInputProc, void *readInputArgs) { return SetNotifyFd(fd, readInputProc, X_NOTIFY_READ, readInputArgs); } extern int InputThreadUnregisterDev(int fd) { RemoveNotifyFd(fd); return 1; } int xthread_sigmask(int how, const sigset_t *set, sigset_t *oldset) { #ifdef HAVE_SIGPROCMASK return sigprocmask(how, set, oldset); #else return 0; #endif } #endif xorg-server-21.1.16/os/io.c0000644000175000017500000010032314757411105011026 /*********************************************************** Copyright 1987, 1989, 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, 1989 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. ******************************************************************/ /***************************************************************** * i/o functions * * WriteToClient, ReadRequestFromClient * InsertFakeRequest, ResetCurrentRequest * *****************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #undef DEBUG_COMMUNICATION #ifdef WIN32 #include #endif #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #include #include #if !defined(WIN32) #include #endif #include #include #include "os.h" #include "osdep.h" #include "opaque.h" #include "dixstruct.h" #include "misc.h" CallbackListPtr ReplyCallback; CallbackListPtr FlushCallback; typedef struct _connectionInput { struct _connectionInput *next; char *buffer; /* contains current client input */ char *bufptr; /* pointer to current start of data */ int bufcnt; /* count of bytes in buffer */ int lenLastReq; int size; unsigned int ignoreBytes; /* bytes to ignore before the next request */ } ConnectionInput; typedef struct _connectionOutput { struct _connectionOutput *next; unsigned char *buf; int size; int count; } ConnectionOutput; static ConnectionInputPtr AllocateInputBuffer(void); static ConnectionOutputPtr AllocateOutputBuffer(void); static Bool CriticalOutputPending; static int timesThisConnection = 0; static ConnectionInputPtr FreeInputs = (ConnectionInputPtr) NULL; static ConnectionOutputPtr FreeOutputs = (ConnectionOutputPtr) NULL; static OsCommPtr AvailableInput = (OsCommPtr) NULL; #define get_req_len(req,cli) ((cli)->swapped ? \ bswap_16((req)->length) : (req)->length) #include #define get_big_req_len(req,cli) ((cli)->swapped ? \ bswap_32(((xBigReq *)(req))->length) : \ ((xBigReq *)(req))->length) #define BUFSIZE 16384 #define BUFWATERMARK 32768 /* * A lot of the code in this file manipulates a ConnectionInputPtr: * * ----------------------------------------------- * |------- bufcnt ------->| | | * | |- gotnow ->| | | * | |-------- needed ------>| | * |-----------+--------- size --------+---------->| * ----------------------------------------------- * ^ ^ * | | * buffer bufptr * * buffer is a pointer to the start of the buffer. * bufptr points to the start of the current request. * bufcnt counts how many bytes are in the buffer. * size is the size of the buffer in bytes. * * In several of the functions, gotnow and needed are local variables * that do the following: * * gotnow is the number of bytes of the request that we're * trying to read that are currently in the buffer. * Typically, gotnow = (buffer + bufcnt) - bufptr * * needed = the length of the request that we're trying to * read. Watch out: needed sometimes counts bytes and sometimes * counts CARD32's. */ /***************************************************************** * ReadRequestFromClient * Returns one request in client->requestBuffer. The request * length will be in client->req_len. Return status is: * * > 0 if successful, specifies length in bytes of the request * = 0 if entire request is not yet available * < 0 if client should be terminated * * The request returned must be contiguous so that it can be * cast in the dispatcher to the correct request type. Because requests * are variable length, ReadRequestFromClient() must look at the first 4 * or 8 bytes of a request to determine the length (the request length is * in the 3rd and 4th bytes of the request unless it is a Big Request * (see the Big Request Extension), in which case the 3rd and 4th bytes * are zero and the following 4 bytes are the request length. * * Note: in order to make the server scheduler (WaitForSomething()) * "fair", the ClientsWithInput mask is used. This mask tells which * clients have FULL requests left in their buffers. Clients with * partial requests require a read. Basically, client buffers * are drained before select() is called again. But, we can't keep * reading from a client that is sending buckets of data (or has * a partial request) because others clients need to be scheduled. *****************************************************************/ static void YieldControl(void) { isItTimeToYield = TRUE; timesThisConnection = 0; } static void YieldControlNoInput(ClientPtr client) { OsCommPtr oc = client->osPrivate; YieldControl(); if (oc->trans_conn) ospoll_reset_events(server_poll, oc->fd); } static void YieldControlDeath(void) { timesThisConnection = 0; } /* If an input buffer was empty, either free it if it is too big or link it * into our list of free input buffers. This means that different clients can * share the same input buffer (at different times). This was done to save * memory. */ static void NextAvailableInput(OsCommPtr oc) { if (AvailableInput) { if (AvailableInput != oc) { ConnectionInputPtr aci = AvailableInput->input; if (aci->size > BUFWATERMARK) { free(aci->buffer); free(aci); } else { aci->next = FreeInputs; FreeInputs = aci; } AvailableInput->input = NULL; } AvailableInput = NULL; } } int ReadRequestFromClient(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; ConnectionInputPtr oci = oc->input; unsigned int gotnow, needed; int result; register xReq *request; Bool need_header; Bool move_header; NextAvailableInput(oc); /* make sure we have an input buffer */ if (!oci) { if ((oci = FreeInputs)) { FreeInputs = oci->next; } else if (!(oci = AllocateInputBuffer())) { YieldControlDeath(); return -1; } oc->input = oci; } #if XTRANS_SEND_FDS /* Discard any unused file descriptors */ while (client->req_fds > 0) { int req_fd = ReadFdFromClient(client); if (req_fd >= 0) close(req_fd); } #endif /* advance to start of next request */ oci->bufptr += oci->lenLastReq; need_header = FALSE; move_header = FALSE; gotnow = oci->bufcnt + oci->buffer - oci->bufptr; if (oci->ignoreBytes > 0) { if (oci->ignoreBytes > oci->size) needed = oci->size; else needed = oci->ignoreBytes; } else if (gotnow < sizeof(xReq)) { /* We don't have an entire xReq yet. Can't tell how big * the request will be until we get the whole xReq. */ needed = sizeof(xReq); need_header = TRUE; } else { /* We have a whole xReq. We can tell how big the whole * request will be unless it is a Big Request. */ request = (xReq *) oci->bufptr; needed = get_req_len(request, client); if (!needed && client->big_requests) { /* It's a Big Request. */ move_header = TRUE; if (gotnow < sizeof(xBigReq)) { /* Still need more data to tell just how big. */ needed = bytes_to_int32(sizeof(xBigReq)); /* needed is in CARD32s now */ need_header = TRUE; } else needed = get_big_req_len(request, client); } client->req_len = needed; needed <<= 2; /* needed is in bytes now */ } if (gotnow < needed) { /* Need to read more data, either so that we can get a * complete xReq (if need_header is TRUE), a complete * xBigReq (if move_header is TRUE), or the rest of the * request (if need_header and move_header are both FALSE). */ oci->lenLastReq = 0; if (needed > maxBigRequestSize << 2) { /* request is too big for us to handle */ /* * Mark the rest of it as needing to be ignored, and then return * the full size. Dispatch() will turn it into a BadLength error. */ oci->ignoreBytes = needed - gotnow; oci->lenLastReq = gotnow; return needed; } if ((gotnow == 0) || ((oci->bufptr - oci->buffer + needed) > oci->size)) { /* no data, or the request is too big to fit in the buffer */ if ((gotnow > 0) && (oci->bufptr != oci->buffer)) /* save the data we've already read */ memmove(oci->buffer, oci->bufptr, gotnow); if (needed > oci->size) { /* make buffer bigger to accommodate request */ char *ibuf; ibuf = (char *) realloc(oci->buffer, needed); if (!ibuf) { YieldControlDeath(); return -1; } oci->size = needed; oci->buffer = ibuf; } oci->bufptr = oci->buffer; oci->bufcnt = gotnow; } /* XXX this is a workaround. This function is sometimes called * after the trans_conn has been freed. In this case trans_conn * will be null. Really ought to restructure things so that we * never get here in those circumstances. */ if (!oc->trans_conn) { /* treat as if an error occurred on the read, which is what * used to happen */ YieldControlDeath(); return -1; } result = _XSERVTransRead(oc->trans_conn, oci->buffer + oci->bufcnt, oci->size - oci->bufcnt); if (result <= 0) { if ((result < 0) && ETEST(errno)) { mark_client_not_ready(client); #if defined(SVR4) && defined(__i386__) && !defined(__sun) if (0) #endif { YieldControlNoInput(client); return 0; } } YieldControlDeath(); return -1; } oci->bufcnt += result; gotnow += result; /* free up some space after huge requests */ if ((oci->size > BUFWATERMARK) && (oci->bufcnt < BUFSIZE) && (needed < BUFSIZE)) { char *ibuf; ibuf = (char *) realloc(oci->buffer, BUFSIZE); if (ibuf) { oci->size = BUFSIZE; oci->buffer = ibuf; oci->bufptr = ibuf + oci->bufcnt - gotnow; } } if (need_header && gotnow >= needed) { /* We wanted an xReq, now we've gotten it. */ request = (xReq *) oci->bufptr; needed = get_req_len(request, client); if (!needed && client->big_requests) { move_header = TRUE; if (gotnow < sizeof(xBigReq)) needed = bytes_to_int32(sizeof(xBigReq)); else needed = get_big_req_len(request, client); } client->req_len = needed; needed <<= 2; } if (gotnow < needed) { /* Still don't have enough; punt. */ YieldControlNoInput(client); return 0; } } if (needed == 0) { if (client->big_requests) needed = sizeof(xBigReq); else needed = sizeof(xReq); } /* If there are bytes to ignore, ignore them now. */ if (oci->ignoreBytes > 0) { assert(needed == oci->ignoreBytes || needed == oci->size); /* * The _XSERVTransRead call above may return more or fewer bytes than we * want to ignore. Ignore the smaller of the two sizes. */ if (gotnow < needed) { oci->ignoreBytes -= gotnow; oci->bufptr += gotnow; gotnow = 0; } else { oci->ignoreBytes -= needed; oci->bufptr += needed; gotnow -= needed; } needed = 0; } oci->lenLastReq = needed; /* * Check to see if client has at least one whole request in the * buffer beyond the request we're returning to the caller. * If there is only a partial request, treat like buffer * is empty so that select() will be called again and other clients * can get into the queue. */ gotnow -= needed; if (!gotnow) AvailableInput = oc; if (move_header) { if (client->req_len < bytes_to_int32(sizeof(xBigReq) - sizeof(xReq))) { YieldControlDeath(); return -1; } request = (xReq *) oci->bufptr; oci->bufptr += (sizeof(xBigReq) - sizeof(xReq)); *(xReq *) oci->bufptr = *request; oci->lenLastReq -= (sizeof(xBigReq) - sizeof(xReq)); client->req_len -= bytes_to_int32(sizeof(xBigReq) - sizeof(xReq)); } client->requestBuffer = (void *) oci->bufptr; #ifdef DEBUG_COMMUNICATION { xReq *req = client->requestBuffer; ErrorF("REQUEST: ClientIDX: %i, type: 0x%x data: 0x%x len: %i\n", client->index, req->reqType, req->data, req->length); } #endif return needed; } int ReadFdFromClient(ClientPtr client) { int fd = -1; #if XTRANS_SEND_FDS if (client->req_fds > 0) { OsCommPtr oc = (OsCommPtr) client->osPrivate; --client->req_fds; fd = _XSERVTransRecvFd(oc->trans_conn); } else LogMessage(X_ERROR, "Request asks for FD without setting req_fds\n"); #endif return fd; } int WriteFdToClient(ClientPtr client, int fd, Bool do_close) { #if XTRANS_SEND_FDS OsCommPtr oc = (OsCommPtr) client->osPrivate; return _XSERVTransSendFd(oc->trans_conn, fd, do_close); #else return -1; #endif } /***************************************************************** * InsertFakeRequest * Splice a consed up (possibly partial) request in as the next request. * **********************/ Bool InsertFakeRequest(ClientPtr client, char *data, int count) { OsCommPtr oc = (OsCommPtr) client->osPrivate; ConnectionInputPtr oci = oc->input; int gotnow, moveup; NextAvailableInput(oc); if (!oci) { if ((oci = FreeInputs)) FreeInputs = oci->next; else if (!(oci = AllocateInputBuffer())) return FALSE; oc->input = oci; } oci->bufptr += oci->lenLastReq; oci->lenLastReq = 0; gotnow = oci->bufcnt + oci->buffer - oci->bufptr; if ((gotnow + count) > oci->size) { char *ibuf; ibuf = (char *) realloc(oci->buffer, gotnow + count); if (!ibuf) return FALSE; oci->size = gotnow + count; oci->buffer = ibuf; oci->bufptr = ibuf + oci->bufcnt - gotnow; } moveup = count - (oci->bufptr - oci->buffer); if (moveup > 0) { if (gotnow > 0) memmove(oci->bufptr + moveup, oci->bufptr, gotnow); oci->bufptr += moveup; oci->bufcnt += moveup; } memmove(oci->bufptr - count, data, count); oci->bufptr -= count; gotnow += count; if ((gotnow >= sizeof(xReq)) && (gotnow >= (int) (get_req_len((xReq *) oci->bufptr, client) << 2))) mark_client_ready(client); else YieldControlNoInput(client); return TRUE; } /***************************************************************** * ResetRequestFromClient * Reset to reexecute the current request, and yield. * **********************/ void ResetCurrentRequest(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; /* ignore dying clients */ if (!oc) return; register ConnectionInputPtr oci = oc->input; register xReq *request; int gotnow, needed; if (AvailableInput == oc) AvailableInput = (OsCommPtr) NULL; oci->lenLastReq = 0; gotnow = oci->bufcnt + oci->buffer - oci->bufptr; if (gotnow < sizeof(xReq)) { YieldControlNoInput(client); } else { request = (xReq *) oci->bufptr; needed = get_req_len(request, client); if (!needed && client->big_requests) { oci->bufptr -= sizeof(xBigReq) - sizeof(xReq); *(xReq *) oci->bufptr = *request; ((xBigReq *) oci->bufptr)->length = client->req_len; if (client->swapped) { swapl(&((xBigReq *) oci->bufptr)->length); } } if (gotnow >= (needed << 2)) { if (listen_to_client(client)) mark_client_ready(client); YieldControl(); } else YieldControlNoInput(client); } } /******************** * FlushAllOutput() * Flush all clients with output. However, if some client still * has input in the queue (more requests), then don't flush. This * will prevent the output queue from being flushed every time around * the round robin queue. Now, some say that it SHOULD be flushed * every time around, but... * **********************/ void FlushAllOutput(void) { OsCommPtr oc; register ClientPtr client, tmp; Bool newoutput = NewOutputPending; if (!newoutput) return; /* * It may be that some client still has critical output pending, * but he is not yet ready to receive it anyway, so we will * simply wait for the select to tell us when he's ready to receive. */ CriticalOutputPending = FALSE; NewOutputPending = FALSE; xorg_list_for_each_entry_safe(client, tmp, &output_pending_clients, output_pending) { if (client->clientGone) continue; if (!client_is_ready(client)) { oc = (OsCommPtr) client->osPrivate; (void) FlushClient(client, oc, (char *) NULL, 0); } else NewOutputPending = TRUE; } } void FlushIfCriticalOutputPending(void) { if (CriticalOutputPending) FlushAllOutput(); } void SetCriticalOutputPending(void) { CriticalOutputPending = TRUE; } /***************** * AbortClient: * When a write error occurs to a client, close * the connection and clean things up. Mark * the client as 'ready' so that the server will * try to read from it again, notice that the fd is * closed and clean up from there. *****************/ static void AbortClient(ClientPtr client) { OsCommPtr oc = client->osPrivate; if (oc->trans_conn) { CloseDownFileDescriptor(oc); mark_client_ready(client); } } /***************** * WriteToClient * Copies buf into ClientPtr.buf if it fits (with padding), else * flushes ClientPtr.buf and buf to client. As of this writing, * every use of WriteToClient is cast to void, and the result * is ignored. Potentially, this could be used by requests * that are sending several chunks of data and want to break * out of a loop on error. Thus, we will leave the type of * this routine as int. *****************/ int WriteToClient(ClientPtr who, int count, const void *__buf) { OsCommPtr oc; ConnectionOutputPtr oco; int padBytes; const char *buf = __buf; BUG_RETURN_VAL_MSG(in_input_thread(), 0, "******** %s called from input thread *********\n", __func__); #ifdef DEBUG_COMMUNICATION Bool multicount = FALSE; #endif if (!count || !who || who == serverClient || who->clientGone) return 0; oc = who->osPrivate; oco = oc->output; #ifdef DEBUG_COMMUNICATION { char info[128]; xError *err; xGenericReply *rep; xEvent *ev; if (!who->replyBytesRemaining) { switch (buf[0]) { case X_Reply: rep = (xGenericReply *) buf; if (rep->sequenceNumber == who->sequence) { snprintf(info, 127, "Xreply: type: 0x%x data: 0x%x " "len: %i seq#: 0x%x", rep->type, rep->data1, rep->length, rep->sequenceNumber); multicount = TRUE; } break; case X_Error: err = (xError *) buf; snprintf(info, 127, "Xerror: Code: 0x%x resID: 0x%x maj: 0x%x " "min: %x", err->errorCode, err->resourceID, err->minorCode, err->majorCode); break; default: if ((buf[0] & 0x7f) == KeymapNotify) snprintf(info, 127, "KeymapNotifyEvent: %i", buf[0]); else { ev = (xEvent *) buf; snprintf(info, 127, "XEvent: type: 0x%x detail: 0x%x " "seq#: 0x%x", ev->u.u.type, ev->u.u.detail, ev->u.u.sequenceNumber); } } ErrorF("REPLY: ClientIDX: %i %s\n", who->index, info); } else multicount = TRUE; } #endif if (!oco) { if ((oco = FreeOutputs)) { FreeOutputs = oco->next; } else if (!(oco = AllocateOutputBuffer())) { AbortClient(who); MarkClientException(who); return -1; } oc->output = oco; } padBytes = padding_for_int32(count); if (ReplyCallback) { ReplyInfoRec replyinfo; replyinfo.client = who; replyinfo.replyData = buf; replyinfo.dataLenBytes = count + padBytes; replyinfo.padBytes = padBytes; if (who->replyBytesRemaining) { /* still sending data of an earlier reply */ who->replyBytesRemaining -= count + padBytes; replyinfo.startOfReply = FALSE; replyinfo.bytesRemaining = who->replyBytesRemaining; CallCallbacks((&ReplyCallback), (void *) &replyinfo); } else if (who->clientState == ClientStateRunning && buf[0] == X_Reply) { /* start of new reply */ CARD32 replylen; unsigned long bytesleft; replylen = ((const xGenericReply *) buf)->length; if (who->swapped) swapl(&replylen); bytesleft = (replylen * 4) + SIZEOF(xReply) - count - padBytes; replyinfo.startOfReply = TRUE; replyinfo.bytesRemaining = who->replyBytesRemaining = bytesleft; CallCallbacks((&ReplyCallback), (void *) &replyinfo); } } #ifdef DEBUG_COMMUNICATION else if (multicount) { if (who->replyBytesRemaining) { who->replyBytesRemaining -= (count + padBytes); } else { CARD32 replylen; replylen = ((xGenericReply *) buf)->length; who->replyBytesRemaining = (replylen * 4) + SIZEOF(xReply) - count - padBytes; } } #endif if (oco->count == 0 || oco->count + count + padBytes > oco->size) { output_pending_clear(who); if (!any_output_pending()) { CriticalOutputPending = FALSE; NewOutputPending = FALSE; } return FlushClient(who, oc, buf, count); } NewOutputPending = TRUE; output_pending_mark(who); memmove((char *) oco->buf + oco->count, buf, count); oco->count += count; if (padBytes) { memset(oco->buf + oco->count, '\0', padBytes); oco->count += padBytes; } return count; } /******************** * FlushClient() * If the client isn't keeping up with us, then we try to continue * buffering the data and set the appropriate bit in ClientsWritable * (which is used by WaitFor in the select). If the connection yields * a permanent error, or we can't allocate any more space, we then * close the connection. * **********************/ int FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) { ConnectionOutputPtr oco = oc->output; XtransConnInfo trans_conn = oc->trans_conn; struct iovec iov[3]; static char padBuffer[3]; const char *extraBuf = __extraBuf; long written; long padsize; long notWritten; long todo; if (!oco) return 0; written = 0; padsize = padding_for_int32(extraCount); notWritten = oco->count + extraCount + padsize; if (!notWritten) return 0; if (FlushCallback) CallCallbacks(&FlushCallback, who); todo = notWritten; while (notWritten) { long before = written; /* amount of whole thing written */ long remain = todo; /* amount to try this time, <= notWritten */ int i = 0; long len; /* You could be very general here and have "in" and "out" iovecs * and write a loop without using a macro, but what the heck. This * translates to: * * how much of this piece is new? * if more new then we are trying this time, clamp * if nothing new * then bump down amount already written, for next piece * else put new stuff in iovec, will need all of next piece * * Note that todo had better be at least 1 or else we'll end up * writing 0 iovecs. */ #define InsertIOV(pointer, length) \ len = (length) - before; \ if (len > remain) \ len = remain; \ if (len <= 0) { \ before = (-len); \ } else { \ iov[i].iov_len = len; \ iov[i].iov_base = (pointer) + before; \ i++; \ remain -= len; \ before = 0; \ } InsertIOV((char *) oco->buf, oco->count) InsertIOV((char *) extraBuf, extraCount) InsertIOV(padBuffer, padsize) errno = 0; if (trans_conn && (len = _XSERVTransWritev(trans_conn, iov, i)) >= 0) { written += len; notWritten -= len; todo = notWritten; } else if (ETEST(errno) #ifdef SUNSYSV /* check for another brain-damaged OS bug */ || (errno == 0) #endif #ifdef EMSGSIZE /* check for another brain-damaged OS bug */ || ((errno == EMSGSIZE) && (todo == 1)) #endif ) { /* If we've arrived here, then the client is stuffed to the gills and not ready to accept more. Make a note of it and buffer the rest. */ output_pending_mark(who); if (written < oco->count) { if (written > 0) { oco->count -= written; memmove((char *) oco->buf, (char *) oco->buf + written, oco->count); written = 0; } } else { written -= oco->count; oco->count = 0; } if (notWritten > oco->size) { unsigned char *obuf = NULL; if (notWritten + BUFSIZE <= INT_MAX) { obuf = realloc(oco->buf, notWritten + BUFSIZE); } if (!obuf) { AbortClient(who); MarkClientException(who); oco->count = 0; return -1; } oco->size = notWritten + BUFSIZE; oco->buf = obuf; } /* If the amount written extended into the padBuffer, then the difference "extraCount - written" may be less than 0 */ if ((len = extraCount - written) > 0) memmove((char *) oco->buf + oco->count, extraBuf + written, len); oco->count = notWritten; /* this will include the pad */ ospoll_listen(server_poll, oc->fd, X_NOTIFY_WRITE); /* return only the amount explicitly requested */ return extraCount; } #ifdef EMSGSIZE /* check for another brain-damaged OS bug */ else if (errno == EMSGSIZE) { todo >>= 1; } #endif else { AbortClient(who); MarkClientException(who); oco->count = 0; return -1; } } /* everything was flushed out */ oco->count = 0; output_pending_clear(who); if (oco->size > BUFWATERMARK) { free(oco->buf); free(oco); } else { oco->next = FreeOutputs; FreeOutputs = oco; } oc->output = (ConnectionOutputPtr) NULL; return extraCount; /* return only the amount explicitly requested */ } static ConnectionInputPtr AllocateInputBuffer(void) { ConnectionInputPtr oci; oci = malloc(sizeof(ConnectionInput)); if (!oci) return NULL; oci->buffer = malloc(BUFSIZE); if (!oci->buffer) { free(oci); return NULL; } oci->size = BUFSIZE; oci->bufptr = oci->buffer; oci->bufcnt = 0; oci->lenLastReq = 0; oci->ignoreBytes = 0; return oci; } static ConnectionOutputPtr AllocateOutputBuffer(void) { ConnectionOutputPtr oco; oco = malloc(sizeof(ConnectionOutput)); if (!oco) return NULL; oco->buf = calloc(1, BUFSIZE); if (!oco->buf) { free(oco); return NULL; } oco->size = BUFSIZE; oco->count = 0; return oco; } void FreeOsBuffers(OsCommPtr oc) { ConnectionInputPtr oci; ConnectionOutputPtr oco; if (AvailableInput == oc) AvailableInput = (OsCommPtr) NULL; if ((oci = oc->input)) { if (FreeInputs) { free(oci->buffer); free(oci); } else { FreeInputs = oci; oci->next = (ConnectionInputPtr) NULL; oci->bufptr = oci->buffer; oci->bufcnt = 0; oci->lenLastReq = 0; oci->ignoreBytes = 0; } } if ((oco = oc->output)) { if (FreeOutputs) { free(oco->buf); free(oco); } else { FreeOutputs = oco; oco->next = (ConnectionOutputPtr) NULL; oco->count = 0; } } } void ResetOsBuffers(void) { ConnectionInputPtr oci; ConnectionOutputPtr oco; while ((oci = FreeInputs)) { FreeInputs = oci->next; free(oci->buffer); free(oci); } while ((oco = FreeOutputs)) { FreeOutputs = oco->next; free(oco->buf); free(oco); } } xorg-server-21.1.16/os/mitauth.c0000644000175000017500000000760414757411105012102 /* Copyright 1988, 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. */ /* * MIT-MAGIC-COOKIE-1 authorization scheme * Author: Keith Packard, MIT X Consortium */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "os.h" #include "osdep.h" #include "dixstruct.h" static struct auth { struct auth *next; unsigned short len; char *data; XID id; } *mit_auth; int MitAddCookie(unsigned short data_length, const char *data, XID id) { struct auth *new; new = malloc(sizeof(struct auth)); if (!new) return 0; new->data = malloc((unsigned) data_length); if (!new->data) { free(new); return 0; } new->next = mit_auth; mit_auth = new; memmove(new->data, data, (int) data_length); new->len = data_length; new->id = id; return 1; } XID MitCheckCookie(unsigned short data_length, const char *data, ClientPtr client, const char **reason) { struct auth *auth; for (auth = mit_auth; auth; auth = auth->next) { if (data_length == auth->len && timingsafe_memcmp(data, auth->data, (int) data_length) == 0) return auth->id; } *reason = "Invalid MIT-MAGIC-COOKIE-1 key"; return (XID) -1; } int MitResetCookie(void) { struct auth *auth, *next; for (auth = mit_auth; auth; auth = next) { next = auth->next; free(auth->data); free(auth); } mit_auth = 0; return 0; } int MitFromID(XID id, unsigned short *data_lenp, char **datap) { struct auth *auth; for (auth = mit_auth; auth; auth = auth->next) { if (id == auth->id) { *data_lenp = auth->len; *datap = auth->data; return 1; } } return 0; } int MitRemoveCookie(unsigned short data_length, const char *data) { struct auth *auth, *prev; prev = 0; for (auth = mit_auth; auth; prev = auth, auth = auth->next) { if (data_length == auth->len && memcmp(data, auth->data, data_length) == 0) { if (prev) prev->next = auth->next; else mit_auth = auth->next; free(auth->data); free(auth); return 1; } } return 0; } static char cookie[16]; /* 128 bits */ XID MitGenerateCookie(unsigned data_length, const char *data, XID id, unsigned *data_length_return, char **data_return) { int i = 0; int status; while (data_length--) { cookie[i++] += *data++; if (i >= sizeof(cookie)) i = 0; } GenerateRandomData(sizeof(cookie), cookie); status = MitAddCookie(sizeof(cookie), cookie, id); if (!status) { id = -1; } else { *data_return = cookie; *data_length_return = sizeof(cookie); } return id; } xorg-server-21.1.16/os/oscolor.c0000644000175000017500000016062414757411105012111 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "dix.h" #include "os.h" typedef struct _builtinColor { unsigned char red; unsigned char green; unsigned char blue; unsigned short name; } BuiltinColor; static const char BuiltinColorNames[] = { "alice blue\0" "AliceBlue\0" "antique white\0" "AntiqueWhite\0" "AntiqueWhite1\0" "AntiqueWhite2\0" "AntiqueWhite3\0" "AntiqueWhite4\0" "aqua\0" "aquamarine\0" "aquamarine1\0" "aquamarine2\0" "aquamarine3\0" "aquamarine4\0" "azure\0" "azure1\0" "azure2\0" "azure3\0" "azure4\0" "beige\0" "bisque\0" "bisque1\0" "bisque2\0" "bisque3\0" "bisque4\0" "black\0" "blanched almond\0" "BlanchedAlmond\0" "blue\0" "blue violet\0" "blue1\0" "blue2\0" "blue3\0" "blue4\0" "BlueViolet\0" "brown\0" "brown1\0" "brown2\0" "brown3\0" "brown4\0" "burlywood\0" "burlywood1\0" "burlywood2\0" "burlywood3\0" "burlywood4\0" "cadet blue\0" "CadetBlue\0" "CadetBlue1\0" "CadetBlue2\0" "CadetBlue3\0" "CadetBlue4\0" "chartreuse\0" "chartreuse1\0" "chartreuse2\0" "chartreuse3\0" "chartreuse4\0" "chocolate\0" "chocolate1\0" "chocolate2\0" "chocolate3\0" "chocolate4\0" "coral\0" "coral1\0" "coral2\0" "coral3\0" "coral4\0" "cornflower blue\0" "CornflowerBlue\0" "cornsilk\0" "cornsilk1\0" "cornsilk2\0" "cornsilk3\0" "cornsilk4\0" "crimson\0" "cyan\0" "cyan1\0" "cyan2\0" "cyan3\0" "cyan4\0" "dark blue\0" "dark cyan\0" "dark goldenrod\0" "dark gray\0" "dark green\0" "dark grey\0" "dark khaki\0" "dark magenta\0" "dark olive green\0" "dark orange\0" "dark orchid\0" "dark red\0" "dark salmon\0" "dark sea green\0" "dark slate blue\0" "dark slate gray\0" "dark slate grey\0" "dark turquoise\0" "dark violet\0" "DarkBlue\0" "DarkCyan\0" "DarkGoldenrod\0" "DarkGoldenrod1\0" "DarkGoldenrod2\0" "DarkGoldenrod3\0" "DarkGoldenrod4\0" "DarkGray\0" "DarkGreen\0" "DarkGrey\0" "DarkKhaki\0" "DarkMagenta\0" "DarkOliveGreen\0" "DarkOliveGreen1\0" "DarkOliveGreen2\0" "DarkOliveGreen3\0" "DarkOliveGreen4\0" "DarkOrange\0" "DarkOrange1\0" "DarkOrange2\0" "DarkOrange3\0" "DarkOrange4\0" "DarkOrchid\0" "DarkOrchid1\0" "DarkOrchid2\0" "DarkOrchid3\0" "DarkOrchid4\0" "DarkRed\0" "DarkSalmon\0" "DarkSeaGreen\0" "DarkSeaGreen1\0" "DarkSeaGreen2\0" "DarkSeaGreen3\0" "DarkSeaGreen4\0" "DarkSlateBlue\0" "DarkSlateGray\0" "DarkSlateGray1\0" "DarkSlateGray2\0" "DarkSlateGray3\0" "DarkSlateGray4\0" "DarkSlateGrey\0" "DarkTurquoise\0" "DarkViolet\0" "deep pink\0" "deep sky blue\0" "DeepPink\0" "DeepPink1\0" "DeepPink2\0" "DeepPink3\0" "DeepPink4\0" "DeepSkyBlue\0" "DeepSkyBlue1\0" "DeepSkyBlue2\0" "DeepSkyBlue3\0" "DeepSkyBlue4\0" "dim gray\0" "dim grey\0" "DimGray\0" "DimGrey\0" "dodger blue\0" "DodgerBlue\0" "DodgerBlue1\0" "DodgerBlue2\0" "DodgerBlue3\0" "DodgerBlue4\0" "firebrick\0" "firebrick1\0" "firebrick2\0" "firebrick3\0" "firebrick4\0" "floral white\0" "FloralWhite\0" "forest green\0" "ForestGreen\0" "fuchsia\0" "gainsboro\0" "ghost white\0" "GhostWhite\0" "gold\0" "gold1\0" "gold2\0" "gold3\0" "gold4\0" "goldenrod\0" "goldenrod1\0" "goldenrod2\0" "goldenrod3\0" "goldenrod4\0" "gray\0" "gray0\0" "gray1\0" "gray10\0" "gray100\0" "gray11\0" "gray12\0" "gray13\0" "gray14\0" "gray15\0" "gray16\0" "gray17\0" "gray18\0" "gray19\0" "gray2\0" "gray20\0" "gray21\0" "gray22\0" "gray23\0" "gray24\0" "gray25\0" "gray26\0" "gray27\0" "gray28\0" "gray29\0" "gray3\0" "gray30\0" "gray31\0" "gray32\0" "gray33\0" "gray34\0" "gray35\0" "gray36\0" "gray37\0" "gray38\0" "gray39\0" "gray4\0" "gray40\0" "gray41\0" "gray42\0" "gray43\0" "gray44\0" "gray45\0" "gray46\0" "gray47\0" "gray48\0" "gray49\0" "gray5\0" "gray50\0" "gray51\0" "gray52\0" "gray53\0" "gray54\0" "gray55\0" "gray56\0" "gray57\0" "gray58\0" "gray59\0" "gray6\0" "gray60\0" "gray61\0" "gray62\0" "gray63\0" "gray64\0" "gray65\0" "gray66\0" "gray67\0" "gray68\0" "gray69\0" "gray7\0" "gray70\0" "gray71\0" "gray72\0" "gray73\0" "gray74\0" "gray75\0" "gray76\0" "gray77\0" "gray78\0" "gray79\0" "gray8\0" "gray80\0" "gray81\0" "gray82\0" "gray83\0" "gray84\0" "gray85\0" "gray86\0" "gray87\0" "gray88\0" "gray89\0" "gray9\0" "gray90\0" "gray91\0" "gray92\0" "gray93\0" "gray94\0" "gray95\0" "gray96\0" "gray97\0" "gray98\0" "gray99\0" "green\0" "green yellow\0" "green1\0" "green2\0" "green3\0" "green4\0" "GreenYellow\0" "grey\0" "grey0\0" "grey1\0" "grey10\0" "grey100\0" "grey11\0" "grey12\0" "grey13\0" "grey14\0" "grey15\0" "grey16\0" "grey17\0" "grey18\0" "grey19\0" "grey2\0" "grey20\0" "grey21\0" "grey22\0" "grey23\0" "grey24\0" "grey25\0" "grey26\0" "grey27\0" "grey28\0" "grey29\0" "grey3\0" "grey30\0" "grey31\0" "grey32\0" "grey33\0" "grey34\0" "grey35\0" "grey36\0" "grey37\0" "grey38\0" "grey39\0" "grey4\0" "grey40\0" "grey41\0" "grey42\0" "grey43\0" "grey44\0" "grey45\0" "grey46\0" "grey47\0" "grey48\0" "grey49\0" "grey5\0" "grey50\0" "grey51\0" "grey52\0" "grey53\0" "grey54\0" "grey55\0" "grey56\0" "grey57\0" "grey58\0" "grey59\0" "grey6\0" "grey60\0" "grey61\0" "grey62\0" "grey63\0" "grey64\0" "grey65\0" "grey66\0" "grey67\0" "grey68\0" "grey69\0" "grey7\0" "grey70\0" "grey71\0" "grey72\0" "grey73\0" "grey74\0" "grey75\0" "grey76\0" "grey77\0" "grey78\0" "grey79\0" "grey8\0" "grey80\0" "grey81\0" "grey82\0" "grey83\0" "grey84\0" "grey85\0" "grey86\0" "grey87\0" "grey88\0" "grey89\0" "grey9\0" "grey90\0" "grey91\0" "grey92\0" "grey93\0" "grey94\0" "grey95\0" "grey96\0" "grey97\0" "grey98\0" "grey99\0" "honeydew\0" "honeydew1\0" "honeydew2\0" "honeydew3\0" "honeydew4\0" "hot pink\0" "HotPink\0" "HotPink1\0" "HotPink2\0" "HotPink3\0" "HotPink4\0" "indian red\0" "IndianRed\0" "IndianRed1\0" "IndianRed2\0" "IndianRed3\0" "IndianRed4\0" "indigo\0" "ivory\0" "ivory1\0" "ivory2\0" "ivory3\0" "ivory4\0" "khaki\0" "khaki1\0" "khaki2\0" "khaki3\0" "khaki4\0" "lavender\0" "lavender blush\0" "LavenderBlush\0" "LavenderBlush1\0" "LavenderBlush2\0" "LavenderBlush3\0" "LavenderBlush4\0" "lawn green\0" "LawnGreen\0" "lemon chiffon\0" "LemonChiffon\0" "LemonChiffon1\0" "LemonChiffon2\0" "LemonChiffon3\0" "LemonChiffon4\0" "light blue\0" "light coral\0" "light cyan\0" "light goldenrod\0" "light goldenrod yellow\0" "light gray\0" "light green\0" "light grey\0" "light pink\0" "light salmon\0" "light sea green\0" "light sky blue\0" "light slate blue\0" "light slate gray\0" "light slate grey\0" "light steel blue\0" "light yellow\0" "LightBlue\0" "LightBlue1\0" "LightBlue2\0" "LightBlue3\0" "LightBlue4\0" "LightCoral\0" "LightCyan\0" "LightCyan1\0" "LightCyan2\0" "LightCyan3\0" "LightCyan4\0" "LightGoldenrod\0" "LightGoldenrod1\0" "LightGoldenrod2\0" "LightGoldenrod3\0" "LightGoldenrod4\0" "LightGoldenrodYellow\0" "LightGray\0" "LightGreen\0" "LightGrey\0" "LightPink\0" "LightPink1\0" "LightPink2\0" "LightPink3\0" "LightPink4\0" "LightSalmon\0" "LightSalmon1\0" "LightSalmon2\0" "LightSalmon3\0" "LightSalmon4\0" "LightSeaGreen\0" "LightSkyBlue\0" "LightSkyBlue1\0" "LightSkyBlue2\0" "LightSkyBlue3\0" "LightSkyBlue4\0" "LightSlateBlue\0" "LightSlateGray\0" "LightSlateGrey\0" "LightSteelBlue\0" "LightSteelBlue1\0" "LightSteelBlue2\0" "LightSteelBlue3\0" "LightSteelBlue4\0" "LightYellow\0" "LightYellow1\0" "LightYellow2\0" "LightYellow3\0" "LightYellow4\0" "lime\0" "lime green\0" "LimeGreen\0" "linen\0" "magenta\0" "magenta1\0" "magenta2\0" "magenta3\0" "magenta4\0" "maroon\0" "maroon1\0" "maroon2\0" "maroon3\0" "maroon4\0" "medium aquamarine\0" "medium blue\0" "medium orchid\0" "medium purple\0" "medium sea green\0" "medium slate blue\0" "medium spring green\0" "medium turquoise\0" "medium violet red\0" "MediumAquamarine\0" "MediumBlue\0" "MediumOrchid\0" "MediumOrchid1\0" "MediumOrchid2\0" "MediumOrchid3\0" "MediumOrchid4\0" "MediumPurple\0" "MediumPurple1\0" "MediumPurple2\0" "MediumPurple3\0" "MediumPurple4\0" "MediumSeaGreen\0" "MediumSlateBlue\0" "MediumSpringGreen\0" "MediumTurquoise\0" "MediumVioletRed\0" "midnight blue\0" "MidnightBlue\0" "mint cream\0" "MintCream\0" "misty rose\0" "MistyRose\0" "MistyRose1\0" "MistyRose2\0" "MistyRose3\0" "MistyRose4\0" "moccasin\0" "navajo white\0" "NavajoWhite\0" "NavajoWhite1\0" "NavajoWhite2\0" "NavajoWhite3\0" "NavajoWhite4\0" "navy\0" "navy blue\0" "NavyBlue\0" "old lace\0" "OldLace\0" "olive\0" "olive drab\0" "OliveDrab\0" "OliveDrab1\0" "OliveDrab2\0" "OliveDrab3\0" "OliveDrab4\0" "orange\0" "orange red\0" "orange1\0" "orange2\0" "orange3\0" "orange4\0" "OrangeRed\0" "OrangeRed1\0" "OrangeRed2\0" "OrangeRed3\0" "OrangeRed4\0" "orchid\0" "orchid1\0" "orchid2\0" "orchid3\0" "orchid4\0" "pale goldenrod\0" "pale green\0" "pale turquoise\0" "pale violet red\0" "PaleGoldenrod\0" "PaleGreen\0" "PaleGreen1\0" "PaleGreen2\0" "PaleGreen3\0" "PaleGreen4\0" "PaleTurquoise\0" "PaleTurquoise1\0" "PaleTurquoise2\0" "PaleTurquoise3\0" "PaleTurquoise4\0" "PaleVioletRed\0" "PaleVioletRed1\0" "PaleVioletRed2\0" "PaleVioletRed3\0" "PaleVioletRed4\0" "papaya whip\0" "PapayaWhip\0" "peach puff\0" "PeachPuff\0" "PeachPuff1\0" "PeachPuff2\0" "PeachPuff3\0" "PeachPuff4\0" "peru\0" "pink\0" "pink1\0" "pink2\0" "pink3\0" "pink4\0" "plum\0" "plum1\0" "plum2\0" "plum3\0" "plum4\0" "powder blue\0" "PowderBlue\0" "purple\0" "purple1\0" "purple2\0" "purple3\0" "purple4\0" "rebecca purple\0" "RebeccaPurple\0" "red\0" "red1\0" "red2\0" "red3\0" "red4\0" "rosy brown\0" "RosyBrown\0" "RosyBrown1\0" "RosyBrown2\0" "RosyBrown3\0" "RosyBrown4\0" "royal blue\0" "RoyalBlue\0" "RoyalBlue1\0" "RoyalBlue2\0" "RoyalBlue3\0" "RoyalBlue4\0" "saddle brown\0" "SaddleBrown\0" "salmon\0" "salmon1\0" "salmon2\0" "salmon3\0" "salmon4\0" "sandy brown\0" "SandyBrown\0" "sea green\0" "SeaGreen\0" "SeaGreen1\0" "SeaGreen2\0" "SeaGreen3\0" "SeaGreen4\0" "seashell\0" "seashell1\0" "seashell2\0" "seashell3\0" "seashell4\0" "sienna\0" "sienna1\0" "sienna2\0" "sienna3\0" "sienna4\0" "silver\0" "sky blue\0" "SkyBlue\0" "SkyBlue1\0" "SkyBlue2\0" "SkyBlue3\0" "SkyBlue4\0" "slate blue\0" "slate gray\0" "slate grey\0" "SlateBlue\0" "SlateBlue1\0" "SlateBlue2\0" "SlateBlue3\0" "SlateBlue4\0" "SlateGray\0" "SlateGray1\0" "SlateGray2\0" "SlateGray3\0" "SlateGray4\0" "SlateGrey\0" "snow\0" "snow1\0" "snow2\0" "snow3\0" "snow4\0" "spring green\0" "SpringGreen\0" "SpringGreen1\0" "SpringGreen2\0" "SpringGreen3\0" "SpringGreen4\0" "steel blue\0" "SteelBlue\0" "SteelBlue1\0" "SteelBlue2\0" "SteelBlue3\0" "SteelBlue4\0" "tan\0" "tan1\0" "tan2\0" "tan3\0" "tan4\0" "teal\0" "thistle\0" "thistle1\0" "thistle2\0" "thistle3\0" "thistle4\0" "tomato\0" "tomato1\0" "tomato2\0" "tomato3\0" "tomato4\0" "turquoise\0" "turquoise1\0" "turquoise2\0" "turquoise3\0" "turquoise4\0" "violet\0" "violet red\0" "VioletRed\0" "VioletRed1\0" "VioletRed2\0" "VioletRed3\0" "VioletRed4\0" "web gray\0" "web green\0" "web grey\0" "web maroon\0" "web purple\0" "WebGray\0" "WebGreen\0" "WebGrey\0" "WebMaroon\0" "WebPurple\0" "wheat\0" "wheat1\0" "wheat2\0" "wheat3\0" "wheat4\0" "white\0" "white smoke\0" "WhiteSmoke\0" "x11 gray\0" "x11 green\0" "x11 grey\0" "x11 maroon\0" "x11 purple\0" "X11Gray\0" "X11Green\0" "X11Grey\0" "X11Maroon\0" "X11Purple\0" "yellow\0" "yellow green\0" "yellow1\0" "yellow2\0" "yellow3\0" "yellow4\0" "YellowGreen\0" }; static const BuiltinColor BuiltinColors[] = { {240, 248, 255, 0}, /* alice blue */ {240, 248, 255, 11}, /* AliceBlue */ {250, 235, 215, 21}, /* antique white */ {250, 235, 215, 35}, /* AntiqueWhite */ {255, 239, 219, 48}, /* AntiqueWhite1 */ {238, 223, 204, 62}, /* AntiqueWhite2 */ {205, 192, 176, 76}, /* AntiqueWhite3 */ {139, 131, 120, 90}, /* AntiqueWhite4 */ {0, 255, 255, 104}, /* aqua */ {127, 255, 212, 109}, /* aquamarine */ {127, 255, 212, 120}, /* aquamarine1 */ {118, 238, 198, 132}, /* aquamarine2 */ {102, 205, 170, 144}, /* aquamarine3 */ {69, 139, 116, 156}, /* aquamarine4 */ {240, 255, 255, 168}, /* azure */ {240, 255, 255, 174}, /* azure1 */ {224, 238, 238, 181}, /* azure2 */ {193, 205, 205, 188}, /* azure3 */ {131, 139, 139, 195}, /* azure4 */ {245, 245, 220, 202}, /* beige */ {255, 228, 196, 208}, /* bisque */ {255, 228, 196, 215}, /* bisque1 */ {238, 213, 183, 223}, /* bisque2 */ {205, 183, 158, 231}, /* bisque3 */ {139, 125, 107, 239}, /* bisque4 */ {0, 0, 0, 247}, /* black */ {255, 235, 205, 253}, /* blanched almond */ {255, 235, 205, 269}, /* BlanchedAlmond */ {0, 0, 255, 284}, /* blue */ {138, 43, 226, 289}, /* blue violet */ {0, 0, 255, 301}, /* blue1 */ {0, 0, 238, 307}, /* blue2 */ {0, 0, 205, 313}, /* blue3 */ {0, 0, 139, 319}, /* blue4 */ {138, 43, 226, 325}, /* BlueViolet */ {165, 42, 42, 336}, /* brown */ {255, 64, 64, 342}, /* brown1 */ {238, 59, 59, 349}, /* brown2 */ {205, 51, 51, 356}, /* brown3 */ {139, 35, 35, 363}, /* brown4 */ {222, 184, 135, 370}, /* burlywood */ {255, 211, 155, 380}, /* burlywood1 */ {238, 197, 145, 391}, /* burlywood2 */ {205, 170, 125, 402}, /* burlywood3 */ {139, 115, 85, 413}, /* burlywood4 */ {95, 158, 160, 424}, /* cadet blue */ {95, 158, 160, 435}, /* CadetBlue */ {152, 245, 255, 445}, /* CadetBlue1 */ {142, 229, 238, 456}, /* CadetBlue2 */ {122, 197, 205, 467}, /* CadetBlue3 */ {83, 134, 139, 478}, /* CadetBlue4 */ {127, 255, 0, 489}, /* chartreuse */ {127, 255, 0, 500}, /* chartreuse1 */ {118, 238, 0, 512}, /* chartreuse2 */ {102, 205, 0, 524}, /* chartreuse3 */ {69, 139, 0, 536}, /* chartreuse4 */ {210, 105, 30, 548}, /* chocolate */ {255, 127, 36, 558}, /* chocolate1 */ {238, 118, 33, 569}, /* chocolate2 */ {205, 102, 29, 580}, /* chocolate3 */ {139, 69, 19, 591}, /* chocolate4 */ {255, 127, 80, 602}, /* coral */ {255, 114, 86, 608}, /* coral1 */ {238, 106, 80, 615}, /* coral2 */ {205, 91, 69, 622}, /* coral3 */ {139, 62, 47, 629}, /* coral4 */ {100, 149, 237, 636}, /* cornflower blue */ {100, 149, 237, 652}, /* CornflowerBlue */ {255, 248, 220, 667}, /* cornsilk */ {255, 248, 220, 676}, /* cornsilk1 */ {238, 232, 205, 686}, /* cornsilk2 */ {205, 200, 177, 696}, /* cornsilk3 */ {139, 136, 120, 706}, /* cornsilk4 */ {220, 20, 60, 716}, /* crimson */ {0, 255, 255, 724}, /* cyan */ {0, 255, 255, 729}, /* cyan1 */ {0, 238, 238, 735}, /* cyan2 */ {0, 205, 205, 741}, /* cyan3 */ {0, 139, 139, 747}, /* cyan4 */ {0, 0, 139, 753}, /* dark blue */ {0, 139, 139, 763}, /* dark cyan */ {184, 134, 11, 773}, /* dark goldenrod */ {169, 169, 169, 788}, /* dark gray */ {0, 100, 0, 798}, /* dark green */ {169, 169, 169, 809}, /* dark grey */ {189, 183, 107, 819}, /* dark khaki */ {139, 0, 139, 830}, /* dark magenta */ {85, 107, 47, 843}, /* dark olive green */ {255, 140, 0, 860}, /* dark orange */ {153, 50, 204, 872}, /* dark orchid */ {139, 0, 0, 884}, /* dark red */ {233, 150, 122, 893}, /* dark salmon */ {143, 188, 143, 905}, /* dark sea green */ {72, 61, 139, 920}, /* dark slate blue */ {47, 79, 79, 936}, /* dark slate gray */ {47, 79, 79, 952}, /* dark slate grey */ {0, 206, 209, 968}, /* dark turquoise */ {148, 0, 211, 983}, /* dark violet */ {0, 0, 139, 995}, /* DarkBlue */ {0, 139, 139, 1004}, /* DarkCyan */ {184, 134, 11, 1013}, /* DarkGoldenrod */ {255, 185, 15, 1027}, /* DarkGoldenrod1 */ {238, 173, 14, 1042}, /* DarkGoldenrod2 */ {205, 149, 12, 1057}, /* DarkGoldenrod3 */ {139, 101, 8, 1072}, /* DarkGoldenrod4 */ {169, 169, 169, 1087}, /* DarkGray */ {0, 100, 0, 1096}, /* DarkGreen */ {169, 169, 169, 1106}, /* DarkGrey */ {189, 183, 107, 1115}, /* DarkKhaki */ {139, 0, 139, 1125}, /* DarkMagenta */ {85, 107, 47, 1137}, /* DarkOliveGreen */ {202, 255, 112, 1152}, /* DarkOliveGreen1 */ {188, 238, 104, 1168}, /* DarkOliveGreen2 */ {162, 205, 90, 1184}, /* DarkOliveGreen3 */ {110, 139, 61, 1200}, /* DarkOliveGreen4 */ {255, 140, 0, 1216}, /* DarkOrange */ {255, 127, 0, 1227}, /* DarkOrange1 */ {238, 118, 0, 1239}, /* DarkOrange2 */ {205, 102, 0, 1251}, /* DarkOrange3 */ {139, 69, 0, 1263}, /* DarkOrange4 */ {153, 50, 204, 1275}, /* DarkOrchid */ {191, 62, 255, 1286}, /* DarkOrchid1 */ {178, 58, 238, 1298}, /* DarkOrchid2 */ {154, 50, 205, 1310}, /* DarkOrchid3 */ {104, 34, 139, 1322}, /* DarkOrchid4 */ {139, 0, 0, 1334}, /* DarkRed */ {233, 150, 122, 1342}, /* DarkSalmon */ {143, 188, 143, 1353}, /* DarkSeaGreen */ {193, 255, 193, 1366}, /* DarkSeaGreen1 */ {180, 238, 180, 1380}, /* DarkSeaGreen2 */ {155, 205, 155, 1394}, /* DarkSeaGreen3 */ {105, 139, 105, 1408}, /* DarkSeaGreen4 */ {72, 61, 139, 1422}, /* DarkSlateBlue */ {47, 79, 79, 1436}, /* DarkSlateGray */ {151, 255, 255, 1450}, /* DarkSlateGray1 */ {141, 238, 238, 1465}, /* DarkSlateGray2 */ {121, 205, 205, 1480}, /* DarkSlateGray3 */ {82, 139, 139, 1495}, /* DarkSlateGray4 */ {47, 79, 79, 1510}, /* DarkSlateGrey */ {0, 206, 209, 1524}, /* DarkTurquoise */ {148, 0, 211, 1538}, /* DarkViolet */ {255, 20, 147, 1549}, /* deep pink */ {0, 191, 255, 1559}, /* deep sky blue */ {255, 20, 147, 1573}, /* DeepPink */ {255, 20, 147, 1582}, /* DeepPink1 */ {238, 18, 137, 1592}, /* DeepPink2 */ {205, 16, 118, 1602}, /* DeepPink3 */ {139, 10, 80, 1612}, /* DeepPink4 */ {0, 191, 255, 1622}, /* DeepSkyBlue */ {0, 191, 255, 1634}, /* DeepSkyBlue1 */ {0, 178, 238, 1647}, /* DeepSkyBlue2 */ {0, 154, 205, 1660}, /* DeepSkyBlue3 */ {0, 104, 139, 1673}, /* DeepSkyBlue4 */ {105, 105, 105, 1686}, /* dim gray */ {105, 105, 105, 1695}, /* dim grey */ {105, 105, 105, 1704}, /* DimGray */ {105, 105, 105, 1712}, /* DimGrey */ {30, 144, 255, 1720}, /* dodger blue */ {30, 144, 255, 1732}, /* DodgerBlue */ {30, 144, 255, 1743}, /* DodgerBlue1 */ {28, 134, 238, 1755}, /* DodgerBlue2 */ {24, 116, 205, 1767}, /* DodgerBlue3 */ {16, 78, 139, 1779}, /* DodgerBlue4 */ {178, 34, 34, 1791}, /* firebrick */ {255, 48, 48, 1801}, /* firebrick1 */ {238, 44, 44, 1812}, /* firebrick2 */ {205, 38, 38, 1823}, /* firebrick3 */ {139, 26, 26, 1834}, /* firebrick4 */ {255, 250, 240, 1845}, /* floral white */ {255, 250, 240, 1858}, /* FloralWhite */ {34, 139, 34, 1870}, /* forest green */ {34, 139, 34, 1883}, /* ForestGreen */ {255, 0, 255, 1895}, /* fuchsia */ {220, 220, 220, 1903}, /* gainsboro */ {248, 248, 255, 1913}, /* ghost white */ {248, 248, 255, 1925}, /* GhostWhite */ {255, 215, 0, 1936}, /* gold */ {255, 215, 0, 1941}, /* gold1 */ {238, 201, 0, 1947}, /* gold2 */ {205, 173, 0, 1953}, /* gold3 */ {139, 117, 0, 1959}, /* gold4 */ {218, 165, 32, 1965}, /* goldenrod */ {255, 193, 37, 1975}, /* goldenrod1 */ {238, 180, 34, 1986}, /* goldenrod2 */ {205, 155, 29, 1997}, /* goldenrod3 */ {139, 105, 20, 2008}, /* goldenrod4 */ {190, 190, 190, 2019}, /* gray */ {0, 0, 0, 2024}, /* gray0 */ {3, 3, 3, 2030}, /* gray1 */ {26, 26, 26, 2036}, /* gray10 */ {255, 255, 255, 2043}, /* gray100 */ {28, 28, 28, 2051}, /* gray11 */ {31, 31, 31, 2058}, /* gray12 */ {33, 33, 33, 2065}, /* gray13 */ {36, 36, 36, 2072}, /* gray14 */ {38, 38, 38, 2079}, /* gray15 */ {41, 41, 41, 2086}, /* gray16 */ {43, 43, 43, 2093}, /* gray17 */ {46, 46, 46, 2100}, /* gray18 */ {48, 48, 48, 2107}, /* gray19 */ {5, 5, 5, 2114}, /* gray2 */ {51, 51, 51, 2120}, /* gray20 */ {54, 54, 54, 2127}, /* gray21 */ {56, 56, 56, 2134}, /* gray22 */ {59, 59, 59, 2141}, /* gray23 */ {61, 61, 61, 2148}, /* gray24 */ {64, 64, 64, 2155}, /* gray25 */ {66, 66, 66, 2162}, /* gray26 */ {69, 69, 69, 2169}, /* gray27 */ {71, 71, 71, 2176}, /* gray28 */ {74, 74, 74, 2183}, /* gray29 */ {8, 8, 8, 2190}, /* gray3 */ {77, 77, 77, 2196}, /* gray30 */ {79, 79, 79, 2203}, /* gray31 */ {82, 82, 82, 2210}, /* gray32 */ {84, 84, 84, 2217}, /* gray33 */ {87, 87, 87, 2224}, /* gray34 */ {89, 89, 89, 2231}, /* gray35 */ {92, 92, 92, 2238}, /* gray36 */ {94, 94, 94, 2245}, /* gray37 */ {97, 97, 97, 2252}, /* gray38 */ {99, 99, 99, 2259}, /* gray39 */ {10, 10, 10, 2266}, /* gray4 */ {102, 102, 102, 2272}, /* gray40 */ {105, 105, 105, 2279}, /* gray41 */ {107, 107, 107, 2286}, /* gray42 */ {110, 110, 110, 2293}, /* gray43 */ {112, 112, 112, 2300}, /* gray44 */ {115, 115, 115, 2307}, /* gray45 */ {117, 117, 117, 2314}, /* gray46 */ {120, 120, 120, 2321}, /* gray47 */ {122, 122, 122, 2328}, /* gray48 */ {125, 125, 125, 2335}, /* gray49 */ {13, 13, 13, 2342}, /* gray5 */ {127, 127, 127, 2348}, /* gray50 */ {130, 130, 130, 2355}, /* gray51 */ {133, 133, 133, 2362}, /* gray52 */ {135, 135, 135, 2369}, /* gray53 */ {138, 138, 138, 2376}, /* gray54 */ {140, 140, 140, 2383}, /* gray55 */ {143, 143, 143, 2390}, /* gray56 */ {145, 145, 145, 2397}, /* gray57 */ {148, 148, 148, 2404}, /* gray58 */ {150, 150, 150, 2411}, /* gray59 */ {15, 15, 15, 2418}, /* gray6 */ {153, 153, 153, 2424}, /* gray60 */ {156, 156, 156, 2431}, /* gray61 */ {158, 158, 158, 2438}, /* gray62 */ {161, 161, 161, 2445}, /* gray63 */ {163, 163, 163, 2452}, /* gray64 */ {166, 166, 166, 2459}, /* gray65 */ {168, 168, 168, 2466}, /* gray66 */ {171, 171, 171, 2473}, /* gray67 */ {173, 173, 173, 2480}, /* gray68 */ {176, 176, 176, 2487}, /* gray69 */ {18, 18, 18, 2494}, /* gray7 */ {179, 179, 179, 2500}, /* gray70 */ {181, 181, 181, 2507}, /* gray71 */ {184, 184, 184, 2514}, /* gray72 */ {186, 186, 186, 2521}, /* gray73 */ {189, 189, 189, 2528}, /* gray74 */ {191, 191, 191, 2535}, /* gray75 */ {194, 194, 194, 2542}, /* gray76 */ {196, 196, 196, 2549}, /* gray77 */ {199, 199, 199, 2556}, /* gray78 */ {201, 201, 201, 2563}, /* gray79 */ {20, 20, 20, 2570}, /* gray8 */ {204, 204, 204, 2576}, /* gray80 */ {207, 207, 207, 2583}, /* gray81 */ {209, 209, 209, 2590}, /* gray82 */ {212, 212, 212, 2597}, /* gray83 */ {214, 214, 214, 2604}, /* gray84 */ {217, 217, 217, 2611}, /* gray85 */ {219, 219, 219, 2618}, /* gray86 */ {222, 222, 222, 2625}, /* gray87 */ {224, 224, 224, 2632}, /* gray88 */ {227, 227, 227, 2639}, /* gray89 */ {23, 23, 23, 2646}, /* gray9 */ {229, 229, 229, 2652}, /* gray90 */ {232, 232, 232, 2659}, /* gray91 */ {235, 235, 235, 2666}, /* gray92 */ {237, 237, 237, 2673}, /* gray93 */ {240, 240, 240, 2680}, /* gray94 */ {242, 242, 242, 2687}, /* gray95 */ {245, 245, 245, 2694}, /* gray96 */ {247, 247, 247, 2701}, /* gray97 */ {250, 250, 250, 2708}, /* gray98 */ {252, 252, 252, 2715}, /* gray99 */ {0, 255, 0, 2722}, /* green */ {173, 255, 47, 2728}, /* green yellow */ {0, 255, 0, 2741}, /* green1 */ {0, 238, 0, 2748}, /* green2 */ {0, 205, 0, 2755}, /* green3 */ {0, 139, 0, 2762}, /* green4 */ {173, 255, 47, 2769}, /* GreenYellow */ {190, 190, 190, 2781}, /* grey */ {0, 0, 0, 2786}, /* grey0 */ {3, 3, 3, 2792}, /* grey1 */ {26, 26, 26, 2798}, /* grey10 */ {255, 255, 255, 2805}, /* grey100 */ {28, 28, 28, 2813}, /* grey11 */ {31, 31, 31, 2820}, /* grey12 */ {33, 33, 33, 2827}, /* grey13 */ {36, 36, 36, 2834}, /* grey14 */ {38, 38, 38, 2841}, /* grey15 */ {41, 41, 41, 2848}, /* grey16 */ {43, 43, 43, 2855}, /* grey17 */ {46, 46, 46, 2862}, /* grey18 */ {48, 48, 48, 2869}, /* grey19 */ {5, 5, 5, 2876}, /* grey2 */ {51, 51, 51, 2882}, /* grey20 */ {54, 54, 54, 2889}, /* grey21 */ {56, 56, 56, 2896}, /* grey22 */ {59, 59, 59, 2903}, /* grey23 */ {61, 61, 61, 2910}, /* grey24 */ {64, 64, 64, 2917}, /* grey25 */ {66, 66, 66, 2924}, /* grey26 */ {69, 69, 69, 2931}, /* grey27 */ {71, 71, 71, 2938}, /* grey28 */ {74, 74, 74, 2945}, /* grey29 */ {8, 8, 8, 2952}, /* grey3 */ {77, 77, 77, 2958}, /* grey30 */ {79, 79, 79, 2965}, /* grey31 */ {82, 82, 82, 2972}, /* grey32 */ {84, 84, 84, 2979}, /* grey33 */ {87, 87, 87, 2986}, /* grey34 */ {89, 89, 89, 2993}, /* grey35 */ {92, 92, 92, 3000}, /* grey36 */ {94, 94, 94, 3007}, /* grey37 */ {97, 97, 97, 3014}, /* grey38 */ {99, 99, 99, 3021}, /* grey39 */ {10, 10, 10, 3028}, /* grey4 */ {102, 102, 102, 3034}, /* grey40 */ {105, 105, 105, 3041}, /* grey41 */ {107, 107, 107, 3048}, /* grey42 */ {110, 110, 110, 3055}, /* grey43 */ {112, 112, 112, 3062}, /* grey44 */ {115, 115, 115, 3069}, /* grey45 */ {117, 117, 117, 3076}, /* grey46 */ {120, 120, 120, 3083}, /* grey47 */ {122, 122, 122, 3090}, /* grey48 */ {125, 125, 125, 3097}, /* grey49 */ {13, 13, 13, 3104}, /* grey5 */ {127, 127, 127, 3110}, /* grey50 */ {130, 130, 130, 3117}, /* grey51 */ {133, 133, 133, 3124}, /* grey52 */ {135, 135, 135, 3131}, /* grey53 */ {138, 138, 138, 3138}, /* grey54 */ {140, 140, 140, 3145}, /* grey55 */ {143, 143, 143, 3152}, /* grey56 */ {145, 145, 145, 3159}, /* grey57 */ {148, 148, 148, 3166}, /* grey58 */ {150, 150, 150, 3173}, /* grey59 */ {15, 15, 15, 3180}, /* grey6 */ {153, 153, 153, 3186}, /* grey60 */ {156, 156, 156, 3193}, /* grey61 */ {158, 158, 158, 3200}, /* grey62 */ {161, 161, 161, 3207}, /* grey63 */ {163, 163, 163, 3214}, /* grey64 */ {166, 166, 166, 3221}, /* grey65 */ {168, 168, 168, 3228}, /* grey66 */ {171, 171, 171, 3235}, /* grey67 */ {173, 173, 173, 3242}, /* grey68 */ {176, 176, 176, 3249}, /* grey69 */ {18, 18, 18, 3256}, /* grey7 */ {179, 179, 179, 3262}, /* grey70 */ {181, 181, 181, 3269}, /* grey71 */ {184, 184, 184, 3276}, /* grey72 */ {186, 186, 186, 3283}, /* grey73 */ {189, 189, 189, 3290}, /* grey74 */ {191, 191, 191, 3297}, /* grey75 */ {194, 194, 194, 3304}, /* grey76 */ {196, 196, 196, 3311}, /* grey77 */ {199, 199, 199, 3318}, /* grey78 */ {201, 201, 201, 3325}, /* grey79 */ {20, 20, 20, 3332}, /* grey8 */ {204, 204, 204, 3338}, /* grey80 */ {207, 207, 207, 3345}, /* grey81 */ {209, 209, 209, 3352}, /* grey82 */ {212, 212, 212, 3359}, /* grey83 */ {214, 214, 214, 3366}, /* grey84 */ {217, 217, 217, 3373}, /* grey85 */ {219, 219, 219, 3380}, /* grey86 */ {222, 222, 222, 3387}, /* grey87 */ {224, 224, 224, 3394}, /* grey88 */ {227, 227, 227, 3401}, /* grey89 */ {23, 23, 23, 3408}, /* grey9 */ {229, 229, 229, 3414}, /* grey90 */ {232, 232, 232, 3421}, /* grey91 */ {235, 235, 235, 3428}, /* grey92 */ {237, 237, 237, 3435}, /* grey93 */ {240, 240, 240, 3442}, /* grey94 */ {242, 242, 242, 3449}, /* grey95 */ {245, 245, 245, 3456}, /* grey96 */ {247, 247, 247, 3463}, /* grey97 */ {250, 250, 250, 3470}, /* grey98 */ {252, 252, 252, 3477}, /* grey99 */ {240, 255, 240, 3484}, /* honeydew */ {240, 255, 240, 3493}, /* honeydew1 */ {224, 238, 224, 3503}, /* honeydew2 */ {193, 205, 193, 3513}, /* honeydew3 */ {131, 139, 131, 3523}, /* honeydew4 */ {255, 105, 180, 3533}, /* hot pink */ {255, 105, 180, 3542}, /* HotPink */ {255, 110, 180, 3550}, /* HotPink1 */ {238, 106, 167, 3559}, /* HotPink2 */ {205, 96, 144, 3568}, /* HotPink3 */ {139, 58, 98, 3577}, /* HotPink4 */ {205, 92, 92, 3586}, /* indian red */ {205, 92, 92, 3597}, /* IndianRed */ {255, 106, 106, 3607}, /* IndianRed1 */ {238, 99, 99, 3618}, /* IndianRed2 */ {205, 85, 85, 3629}, /* IndianRed3 */ {139, 58, 58, 3640}, /* IndianRed4 */ {75, 0, 130, 3651}, /* indigo */ {255, 255, 240, 3658}, /* ivory */ {255, 255, 240, 3664}, /* ivory1 */ {238, 238, 224, 3671}, /* ivory2 */ {205, 205, 193, 3678}, /* ivory3 */ {139, 139, 131, 3685}, /* ivory4 */ {240, 230, 140, 3692}, /* khaki */ {255, 246, 143, 3698}, /* khaki1 */ {238, 230, 133, 3705}, /* khaki2 */ {205, 198, 115, 3712}, /* khaki3 */ {139, 134, 78, 3719}, /* khaki4 */ {230, 230, 250, 3726}, /* lavender */ {255, 240, 245, 3735}, /* lavender blush */ {255, 240, 245, 3750}, /* LavenderBlush */ {255, 240, 245, 3764}, /* LavenderBlush1 */ {238, 224, 229, 3779}, /* LavenderBlush2 */ {205, 193, 197, 3794}, /* LavenderBlush3 */ {139, 131, 134, 3809}, /* LavenderBlush4 */ {124, 252, 0, 3824}, /* lawn green */ {124, 252, 0, 3835}, /* LawnGreen */ {255, 250, 205, 3845}, /* lemon chiffon */ {255, 250, 205, 3859}, /* LemonChiffon */ {255, 250, 205, 3872}, /* LemonChiffon1 */ {238, 233, 191, 3886}, /* LemonChiffon2 */ {205, 201, 165, 3900}, /* LemonChiffon3 */ {139, 137, 112, 3914}, /* LemonChiffon4 */ {173, 216, 230, 3928}, /* light blue */ {240, 128, 128, 3939}, /* light coral */ {224, 255, 255, 3951}, /* light cyan */ {238, 221, 130, 3962}, /* light goldenrod */ {250, 250, 210, 3978}, /* light goldenrod yellow */ {211, 211, 211, 4001}, /* light gray */ {144, 238, 144, 4012}, /* light green */ {211, 211, 211, 4024}, /* light grey */ {255, 182, 193, 4035}, /* light pink */ {255, 160, 122, 4046}, /* light salmon */ {32, 178, 170, 4059}, /* light sea green */ {135, 206, 250, 4075}, /* light sky blue */ {132, 112, 255, 4090}, /* light slate blue */ {119, 136, 153, 4107}, /* light slate gray */ {119, 136, 153, 4124}, /* light slate grey */ {176, 196, 222, 4141}, /* light steel blue */ {255, 255, 224, 4158}, /* light yellow */ {173, 216, 230, 4171}, /* LightBlue */ {191, 239, 255, 4181}, /* LightBlue1 */ {178, 223, 238, 4192}, /* LightBlue2 */ {154, 192, 205, 4203}, /* LightBlue3 */ {104, 131, 139, 4214}, /* LightBlue4 */ {240, 128, 128, 4225}, /* LightCoral */ {224, 255, 255, 4236}, /* LightCyan */ {224, 255, 255, 4246}, /* LightCyan1 */ {209, 238, 238, 4257}, /* LightCyan2 */ {180, 205, 205, 4268}, /* LightCyan3 */ {122, 139, 139, 4279}, /* LightCyan4 */ {238, 221, 130, 4290}, /* LightGoldenrod */ {255, 236, 139, 4305}, /* LightGoldenrod1 */ {238, 220, 130, 4321}, /* LightGoldenrod2 */ {205, 190, 112, 4337}, /* LightGoldenrod3 */ {139, 129, 76, 4353}, /* LightGoldenrod4 */ {250, 250, 210, 4369}, /* LightGoldenrodYellow */ {211, 211, 211, 4390}, /* LightGray */ {144, 238, 144, 4400}, /* LightGreen */ {211, 211, 211, 4411}, /* LightGrey */ {255, 182, 193, 4421}, /* LightPink */ {255, 174, 185, 4431}, /* LightPink1 */ {238, 162, 173, 4442}, /* LightPink2 */ {205, 140, 149, 4453}, /* LightPink3 */ {139, 95, 101, 4464}, /* LightPink4 */ {255, 160, 122, 4475}, /* LightSalmon */ {255, 160, 122, 4487}, /* LightSalmon1 */ {238, 149, 114, 4500}, /* LightSalmon2 */ {205, 129, 98, 4513}, /* LightSalmon3 */ {139, 87, 66, 4526}, /* LightSalmon4 */ {32, 178, 170, 4539}, /* LightSeaGreen */ {135, 206, 250, 4553}, /* LightSkyBlue */ {176, 226, 255, 4566}, /* LightSkyBlue1 */ {164, 211, 238, 4580}, /* LightSkyBlue2 */ {141, 182, 205, 4594}, /* LightSkyBlue3 */ {96, 123, 139, 4608}, /* LightSkyBlue4 */ {132, 112, 255, 4622}, /* LightSlateBlue */ {119, 136, 153, 4637}, /* LightSlateGray */ {119, 136, 153, 4652}, /* LightSlateGrey */ {176, 196, 222, 4667}, /* LightSteelBlue */ {202, 225, 255, 4682}, /* LightSteelBlue1 */ {188, 210, 238, 4698}, /* LightSteelBlue2 */ {162, 181, 205, 4714}, /* LightSteelBlue3 */ {110, 123, 139, 4730}, /* LightSteelBlue4 */ {255, 255, 224, 4746}, /* LightYellow */ {255, 255, 224, 4758}, /* LightYellow1 */ {238, 238, 209, 4771}, /* LightYellow2 */ {205, 205, 180, 4784}, /* LightYellow3 */ {139, 139, 122, 4797}, /* LightYellow4 */ {0, 255, 0, 4810}, /* lime */ {50, 205, 50, 4815}, /* lime green */ {50, 205, 50, 4826}, /* LimeGreen */ {250, 240, 230, 4836}, /* linen */ {255, 0, 255, 4842}, /* magenta */ {255, 0, 255, 4850}, /* magenta1 */ {238, 0, 238, 4859}, /* magenta2 */ {205, 0, 205, 4868}, /* magenta3 */ {139, 0, 139, 4877}, /* magenta4 */ {176, 48, 96, 4886}, /* maroon */ {255, 52, 179, 4893}, /* maroon1 */ {238, 48, 167, 4901}, /* maroon2 */ {205, 41, 144, 4909}, /* maroon3 */ {139, 28, 98, 4917}, /* maroon4 */ {102, 205, 170, 4925}, /* medium aquamarine */ {0, 0, 205, 4943}, /* medium blue */ {186, 85, 211, 4955}, /* medium orchid */ {147, 112, 219, 4969}, /* medium purple */ {60, 179, 113, 4983}, /* medium sea green */ {123, 104, 238, 5000}, /* medium slate blue */ {0, 250, 154, 5018}, /* medium spring green */ {72, 209, 204, 5038}, /* medium turquoise */ {199, 21, 133, 5055}, /* medium violet red */ {102, 205, 170, 5073}, /* MediumAquamarine */ {0, 0, 205, 5090}, /* MediumBlue */ {186, 85, 211, 5101}, /* MediumOrchid */ {224, 102, 255, 5114}, /* MediumOrchid1 */ {209, 95, 238, 5128}, /* MediumOrchid2 */ {180, 82, 205, 5142}, /* MediumOrchid3 */ {122, 55, 139, 5156}, /* MediumOrchid4 */ {147, 112, 219, 5170}, /* MediumPurple */ {171, 130, 255, 5183}, /* MediumPurple1 */ {159, 121, 238, 5197}, /* MediumPurple2 */ {137, 104, 205, 5211}, /* MediumPurple3 */ {93, 71, 139, 5225}, /* MediumPurple4 */ {60, 179, 113, 5239}, /* MediumSeaGreen */ {123, 104, 238, 5254}, /* MediumSlateBlue */ {0, 250, 154, 5270}, /* MediumSpringGreen */ {72, 209, 204, 5288}, /* MediumTurquoise */ {199, 21, 133, 5304}, /* MediumVioletRed */ {25, 25, 112, 5320}, /* midnight blue */ {25, 25, 112, 5334}, /* MidnightBlue */ {245, 255, 250, 5347}, /* mint cream */ {245, 255, 250, 5358}, /* MintCream */ {255, 228, 225, 5368}, /* misty rose */ {255, 228, 225, 5379}, /* MistyRose */ {255, 228, 225, 5389}, /* MistyRose1 */ {238, 213, 210, 5400}, /* MistyRose2 */ {205, 183, 181, 5411}, /* MistyRose3 */ {139, 125, 123, 5422}, /* MistyRose4 */ {255, 228, 181, 5433}, /* moccasin */ {255, 222, 173, 5442}, /* navajo white */ {255, 222, 173, 5455}, /* NavajoWhite */ {255, 222, 173, 5467}, /* NavajoWhite1 */ {238, 207, 161, 5480}, /* NavajoWhite2 */ {205, 179, 139, 5493}, /* NavajoWhite3 */ {139, 121, 94, 5506}, /* NavajoWhite4 */ {0, 0, 128, 5519}, /* navy */ {0, 0, 128, 5524}, /* navy blue */ {0, 0, 128, 5534}, /* NavyBlue */ {253, 245, 230, 5543}, /* old lace */ {253, 245, 230, 5552}, /* OldLace */ {128, 128, 0, 5560}, /* olive */ {107, 142, 35, 5566}, /* olive drab */ {107, 142, 35, 5577}, /* OliveDrab */ {192, 255, 62, 5587}, /* OliveDrab1 */ {179, 238, 58, 5598}, /* OliveDrab2 */ {154, 205, 50, 5609}, /* OliveDrab3 */ {105, 139, 34, 5620}, /* OliveDrab4 */ {255, 165, 0, 5631}, /* orange */ {255, 69, 0, 5638}, /* orange red */ {255, 165, 0, 5649}, /* orange1 */ {238, 154, 0, 5657}, /* orange2 */ {205, 133, 0, 5665}, /* orange3 */ {139, 90, 0, 5673}, /* orange4 */ {255, 69, 0, 5681}, /* OrangeRed */ {255, 69, 0, 5691}, /* OrangeRed1 */ {238, 64, 0, 5702}, /* OrangeRed2 */ {205, 55, 0, 5713}, /* OrangeRed3 */ {139, 37, 0, 5724}, /* OrangeRed4 */ {218, 112, 214, 5735}, /* orchid */ {255, 131, 250, 5742}, /* orchid1 */ {238, 122, 233, 5750}, /* orchid2 */ {205, 105, 201, 5758}, /* orchid3 */ {139, 71, 137, 5766}, /* orchid4 */ {238, 232, 170, 5774}, /* pale goldenrod */ {152, 251, 152, 5789}, /* pale green */ {175, 238, 238, 5800}, /* pale turquoise */ {219, 112, 147, 5815}, /* pale violet red */ {238, 232, 170, 5831}, /* PaleGoldenrod */ {152, 251, 152, 5845}, /* PaleGreen */ {154, 255, 154, 5855}, /* PaleGreen1 */ {144, 238, 144, 5866}, /* PaleGreen2 */ {124, 205, 124, 5877}, /* PaleGreen3 */ {84, 139, 84, 5888}, /* PaleGreen4 */ {175, 238, 238, 5899}, /* PaleTurquoise */ {187, 255, 255, 5913}, /* PaleTurquoise1 */ {174, 238, 238, 5928}, /* PaleTurquoise2 */ {150, 205, 205, 5943}, /* PaleTurquoise3 */ {102, 139, 139, 5958}, /* PaleTurquoise4 */ {219, 112, 147, 5973}, /* PaleVioletRed */ {255, 130, 171, 5987}, /* PaleVioletRed1 */ {238, 121, 159, 6002}, /* PaleVioletRed2 */ {205, 104, 137, 6017}, /* PaleVioletRed3 */ {139, 71, 93, 6032}, /* PaleVioletRed4 */ {255, 239, 213, 6047}, /* papaya whip */ {255, 239, 213, 6059}, /* PapayaWhip */ {255, 218, 185, 6070}, /* peach puff */ {255, 218, 185, 6081}, /* PeachPuff */ {255, 218, 185, 6091}, /* PeachPuff1 */ {238, 203, 173, 6102}, /* PeachPuff2 */ {205, 175, 149, 6113}, /* PeachPuff3 */ {139, 119, 101, 6124}, /* PeachPuff4 */ {205, 133, 63, 6135}, /* peru */ {255, 192, 203, 6140}, /* pink */ {255, 181, 197, 6145}, /* pink1 */ {238, 169, 184, 6151}, /* pink2 */ {205, 145, 158, 6157}, /* pink3 */ {139, 99, 108, 6163}, /* pink4 */ {221, 160, 221, 6169}, /* plum */ {255, 187, 255, 6174}, /* plum1 */ {238, 174, 238, 6180}, /* plum2 */ {205, 150, 205, 6186}, /* plum3 */ {139, 102, 139, 6192}, /* plum4 */ {176, 224, 230, 6198}, /* powder blue */ {176, 224, 230, 6210}, /* PowderBlue */ {160, 32, 240, 6221}, /* purple */ {155, 48, 255, 6228}, /* purple1 */ {145, 44, 238, 6236}, /* purple2 */ {125, 38, 205, 6244}, /* purple3 */ {85, 26, 139, 6252}, /* purple4 */ {102, 51, 153, 6260}, /* rebecca purple */ {102, 51, 153, 6275}, /* RebeccaPurple */ {255, 0, 0, 6289}, /* red */ {255, 0, 0, 6293}, /* red1 */ {238, 0, 0, 6298}, /* red2 */ {205, 0, 0, 6303}, /* red3 */ {139, 0, 0, 6308}, /* red4 */ {188, 143, 143, 6313}, /* rosy brown */ {188, 143, 143, 6324}, /* RosyBrown */ {255, 193, 193, 6334}, /* RosyBrown1 */ {238, 180, 180, 6345}, /* RosyBrown2 */ {205, 155, 155, 6356}, /* RosyBrown3 */ {139, 105, 105, 6367}, /* RosyBrown4 */ {65, 105, 225, 6378}, /* royal blue */ {65, 105, 225, 6389}, /* RoyalBlue */ {72, 118, 255, 6399}, /* RoyalBlue1 */ {67, 110, 238, 6410}, /* RoyalBlue2 */ {58, 95, 205, 6421}, /* RoyalBlue3 */ {39, 64, 139, 6432}, /* RoyalBlue4 */ {139, 69, 19, 6443}, /* saddle brown */ {139, 69, 19, 6456}, /* SaddleBrown */ {250, 128, 114, 6468}, /* salmon */ {255, 140, 105, 6475}, /* salmon1 */ {238, 130, 98, 6483}, /* salmon2 */ {205, 112, 84, 6491}, /* salmon3 */ {139, 76, 57, 6499}, /* salmon4 */ {244, 164, 96, 6507}, /* sandy brown */ {244, 164, 96, 6519}, /* SandyBrown */ {46, 139, 87, 6530}, /* sea green */ {46, 139, 87, 6540}, /* SeaGreen */ {84, 255, 159, 6549}, /* SeaGreen1 */ {78, 238, 148, 6559}, /* SeaGreen2 */ {67, 205, 128, 6569}, /* SeaGreen3 */ {46, 139, 87, 6579}, /* SeaGreen4 */ {255, 245, 238, 6589}, /* seashell */ {255, 245, 238, 6598}, /* seashell1 */ {238, 229, 222, 6608}, /* seashell2 */ {205, 197, 191, 6618}, /* seashell3 */ {139, 134, 130, 6628}, /* seashell4 */ {160, 82, 45, 6638}, /* sienna */ {255, 130, 71, 6645}, /* sienna1 */ {238, 121, 66, 6653}, /* sienna2 */ {205, 104, 57, 6661}, /* sienna3 */ {139, 71, 38, 6669}, /* sienna4 */ {192, 192, 192, 6677}, /* silver */ {135, 206, 235, 6684}, /* sky blue */ {135, 206, 235, 6693}, /* SkyBlue */ {135, 206, 255, 6701}, /* SkyBlue1 */ {126, 192, 238, 6710}, /* SkyBlue2 */ {108, 166, 205, 6719}, /* SkyBlue3 */ {74, 112, 139, 6728}, /* SkyBlue4 */ {106, 90, 205, 6737}, /* slate blue */ {112, 128, 144, 6748}, /* slate gray */ {112, 128, 144, 6759}, /* slate grey */ {106, 90, 205, 6770}, /* SlateBlue */ {131, 111, 255, 6780}, /* SlateBlue1 */ {122, 103, 238, 6791}, /* SlateBlue2 */ {105, 89, 205, 6802}, /* SlateBlue3 */ {71, 60, 139, 6813}, /* SlateBlue4 */ {112, 128, 144, 6824}, /* SlateGray */ {198, 226, 255, 6834}, /* SlateGray1 */ {185, 211, 238, 6845}, /* SlateGray2 */ {159, 182, 205, 6856}, /* SlateGray3 */ {108, 123, 139, 6867}, /* SlateGray4 */ {112, 128, 144, 6878}, /* SlateGrey */ {255, 250, 250, 6888}, /* snow */ {255, 250, 250, 6893}, /* snow1 */ {238, 233, 233, 6899}, /* snow2 */ {205, 201, 201, 6905}, /* snow3 */ {139, 137, 137, 6911}, /* snow4 */ {0, 255, 127, 6917}, /* spring green */ {0, 255, 127, 6930}, /* SpringGreen */ {0, 255, 127, 6942}, /* SpringGreen1 */ {0, 238, 118, 6955}, /* SpringGreen2 */ {0, 205, 102, 6968}, /* SpringGreen3 */ {0, 139, 69, 6981}, /* SpringGreen4 */ {70, 130, 180, 6994}, /* steel blue */ {70, 130, 180, 7005}, /* SteelBlue */ {99, 184, 255, 7015}, /* SteelBlue1 */ {92, 172, 238, 7026}, /* SteelBlue2 */ {79, 148, 205, 7037}, /* SteelBlue3 */ {54, 100, 139, 7048}, /* SteelBlue4 */ {210, 180, 140, 7059}, /* tan */ {255, 165, 79, 7063}, /* tan1 */ {238, 154, 73, 7068}, /* tan2 */ {205, 133, 63, 7073}, /* tan3 */ {139, 90, 43, 7078}, /* tan4 */ {0, 128, 128, 7083}, /* teal */ {216, 191, 216, 7088}, /* thistle */ {255, 225, 255, 7096}, /* thistle1 */ {238, 210, 238, 7105}, /* thistle2 */ {205, 181, 205, 7114}, /* thistle3 */ {139, 123, 139, 7123}, /* thistle4 */ {255, 99, 71, 7132}, /* tomato */ {255, 99, 71, 7139}, /* tomato1 */ {238, 92, 66, 7147}, /* tomato2 */ {205, 79, 57, 7155}, /* tomato3 */ {139, 54, 38, 7163}, /* tomato4 */ {64, 224, 208, 7171}, /* turquoise */ {0, 245, 255, 7181}, /* turquoise1 */ {0, 229, 238, 7192}, /* turquoise2 */ {0, 197, 205, 7203}, /* turquoise3 */ {0, 134, 139, 7214}, /* turquoise4 */ {238, 130, 238, 7225}, /* violet */ {208, 32, 144, 7232}, /* violet red */ {208, 32, 144, 7243}, /* VioletRed */ {255, 62, 150, 7253}, /* VioletRed1 */ {238, 58, 140, 7264}, /* VioletRed2 */ {205, 50, 120, 7275}, /* VioletRed3 */ {139, 34, 82, 7286}, /* VioletRed4 */ {128, 128, 128, 7297}, /* web gray */ {0, 128, 0, 7306}, /* web green */ {128, 128, 128, 7316}, /* web grey */ {128, 0, 0, 7325}, /* web maroon */ {128, 0, 128, 7336}, /* web purple */ {128, 128, 128, 7347}, /* WebGray */ {0, 128, 0, 7355}, /* WebGreen */ {128, 128, 128, 7364}, /* WebGrey */ {128, 0, 0, 7372}, /* WebMaroon */ {128, 0, 128, 7382}, /* WebPurple */ {245, 222, 179, 7392}, /* wheat */ {255, 231, 186, 7398}, /* wheat1 */ {238, 216, 174, 7405}, /* wheat2 */ {205, 186, 150, 7412}, /* wheat3 */ {139, 126, 102, 7419}, /* wheat4 */ {255, 255, 255, 7426}, /* white */ {245, 245, 245, 7432}, /* white smoke */ {245, 245, 245, 7444}, /* WhiteSmoke */ {190, 190, 190, 7455}, /* x11 gray */ {0, 255, 0, 7464}, /* x11 green */ {190, 190, 190, 7474}, /* x11 grey */ {176, 48, 96, 7483}, /* x11 maroon */ {160, 32, 240, 7494}, /* x11 purple */ {190, 190, 190, 7505}, /* X11Gray */ {0, 255, 0, 7513}, /* X11Green */ {190, 190, 190, 7522}, /* X11Grey */ {176, 48, 96, 7530}, /* X11Maroon */ {160, 32, 240, 7540}, /* X11Purple */ {255, 255, 0, 7550}, /* yellow */ {154, 205, 50, 7557}, /* yellow green */ {255, 255, 0, 7570}, /* yellow1 */ {238, 238, 0, 7578}, /* yellow2 */ {205, 205, 0, 7586}, /* yellow3 */ {139, 139, 0, 7594}, /* yellow4 */ {154, 205, 50, 7602}, /* YellowGreen */ }; Bool OsLookupColor(int screen, char *name, unsigned int len, unsigned short *pred, unsigned short *pgreen, unsigned short *pblue) { const BuiltinColor *c; int low, mid, high; int r; low = 0; high = ARRAY_SIZE(BuiltinColors) - 1; while (high >= low) { mid = (low + high) / 2; c = &BuiltinColors[mid]; r = strncasecmp(&BuiltinColorNames[c->name], name, len); if (r == 0 && len == strlen(&BuiltinColorNames[c->name])) { *pred = c->red * 0x101; *pgreen = c->green * 0x101; *pblue = c->blue * 0x101; return TRUE; } if (r < 0) low = mid + 1; else high = mid - 1; } return FALSE; } xorg-server-21.1.16/os/osdep.h0000644000175000017500000001641314757411105011544 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _OSDEP_H_ #define _OSDEP_H_ 1 #if defined(XDMCP) || defined(HASXDMAUTH) #include #endif #include #include #include /* If EAGAIN and EWOULDBLOCK are distinct errno values, then we check errno * for both EAGAIN and EWOULDBLOCK, because some supposedly POSIX * systems are broken and return EWOULDBLOCK when they should return EAGAIN */ #ifndef WIN32 # if (EAGAIN != EWOULDBLOCK) # define ETEST(err) (err == EAGAIN || err == EWOULDBLOCK) # else # define ETEST(err) (err == EAGAIN) # endif #else /* WIN32 The socket errorcodes differ from the normal errors */ #define ETEST(err) (err == EAGAIN || err == WSAEWOULDBLOCK) #endif #if defined(XDMCP) || defined(HASXDMAUTH) typedef Bool (*ValidatorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*GeneratorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*AddAuthorFunc) (unsigned name_length, const char *name, unsigned data_length, char *data); #endif typedef struct _connectionInput *ConnectionInputPtr; typedef struct _connectionOutput *ConnectionOutputPtr; struct _osComm; #define AuthInitArgs void typedef void (*AuthInitFunc) (AuthInitArgs); #define AuthAddCArgs unsigned short data_length, const char *data, XID id typedef int (*AuthAddCFunc) (AuthAddCArgs); #define AuthCheckArgs unsigned short data_length, const char *data, ClientPtr client, const char **reason typedef XID (*AuthCheckFunc) (AuthCheckArgs); #define AuthFromIDArgs XID id, unsigned short *data_lenp, char **datap typedef int (*AuthFromIDFunc) (AuthFromIDArgs); #define AuthGenCArgs unsigned data_length, const char *data, XID id, unsigned *data_length_return, char **data_return typedef XID (*AuthGenCFunc) (AuthGenCArgs); #define AuthRemCArgs unsigned short data_length, const char *data typedef int (*AuthRemCFunc) (AuthRemCArgs); #define AuthRstCArgs void typedef int (*AuthRstCFunc) (AuthRstCArgs); typedef void (*OsCloseFunc) (ClientPtr); typedef int (*OsFlushFunc) (ClientPtr who, struct _osComm * oc, char *extraBuf, int extraCount); typedef struct _osComm { int fd; ConnectionInputPtr input; ConnectionOutputPtr output; XID auth_id; /* authorization id */ CARD32 conn_time; /* timestamp if not established, else 0 */ struct _XtransConnInfo *trans_conn; /* transport connection object */ int flags; } OsCommRec, *OsCommPtr; #define OS_COMM_GRAB_IMPERVIOUS 1 #define OS_COMM_IGNORED 2 extern int FlushClient(ClientPtr /*who */ , OsCommPtr /*oc */ , const void * /*extraBuf */ , int /*extraCount */ ); extern void FreeOsBuffers(OsCommPtr /*oc */ ); void CloseDownFileDescriptor(OsCommPtr oc); #include "dix.h" #include "ospoll.h" extern struct ospoll *server_poll; Bool listen_to_client(ClientPtr client); extern Bool NewOutputPending; extern WorkQueuePtr workQueue; /* in access.c */ extern Bool ComputeLocalClient(ClientPtr client); /* in auth.c */ extern void GenerateRandomData(int len, char *buf); /* in mitauth.c */ extern XID MitCheckCookie(AuthCheckArgs); extern XID MitGenerateCookie(AuthGenCArgs); extern int MitAddCookie(AuthAddCArgs); extern int MitFromID(AuthFromIDArgs); extern int MitRemoveCookie(AuthRemCArgs); extern int MitResetCookie(AuthRstCArgs); /* in xdmauth.c */ #ifdef HASXDMAUTH extern XID XdmCheckCookie(AuthCheckArgs); extern int XdmAddCookie(AuthAddCArgs); extern int XdmFromID(AuthFromIDArgs); extern int XdmRemoveCookie(AuthRemCArgs); extern int XdmResetCookie(AuthRstCArgs); #endif /* in rpcauth.c */ #ifdef SECURE_RPC extern void SecureRPCInit(AuthInitArgs); extern XID SecureRPCCheck(AuthCheckArgs); extern int SecureRPCAdd(AuthAddCArgs); extern int SecureRPCFromID(AuthFromIDArgs); extern int SecureRPCRemove(AuthRemCArgs); extern int SecureRPCReset(AuthRstCArgs); #endif #ifdef XDMCP /* in xdmcp.c */ extern void XdmcpUseMsg(void); extern int XdmcpOptions(int argc, char **argv, int i); extern void XdmcpRegisterConnection(int type, const char *address, int addrlen); extern void XdmcpRegisterAuthorizations(void); extern void XdmcpRegisterAuthorization(const char *name, int namelen); extern void XdmcpInit(void); extern void XdmcpReset(void); extern void XdmcpOpenDisplay(int sock); extern void XdmcpCloseDisplay(int sock); extern void XdmcpRegisterAuthentication(const char *name, int namelen, const char *data, int datalen, ValidatorFunc Validator, GeneratorFunc Generator, AddAuthorFunc AddAuth); struct sockaddr_in; extern void XdmcpRegisterBroadcastAddress(const struct sockaddr_in *addr); #endif #ifdef HASXDMAUTH extern void XdmAuthenticationInit(const char *cookie, int cookie_length); #endif #endif /* _OSDEP_H_ */ xorg-server-21.1.16/os/osinit.c0000644000175000017500000002256014757411105011732 /*********************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "os.h" #include "osdep.h" #include "opaque.h" #include #include #include #ifdef HAVE_DLFCN_H #include #endif #ifdef HAVE_BACKTRACE #include #endif #include "misc.h" #include "dixstruct.h" #if !defined(SYSV) && !defined(WIN32) #include #endif #ifndef ADMPATH #define ADMPATH "/usr/adm/X%smsgs" #endif #ifdef RLIMIT_DATA int limitDataSpace = -1; #endif #ifdef RLIMIT_STACK int limitStackSpace = -1; #endif #ifdef RLIMIT_NOFILE int limitNoFile = -1; #endif /* The actual user defined max number of clients */ int LimitClients = LIMITCLIENTS; static OsSigWrapperPtr OsSigWrapper = NULL; OsSigWrapperPtr OsRegisterSigWrapper(OsSigWrapperPtr newSigWrapper) { OsSigWrapperPtr oldSigWrapper = OsSigWrapper; OsSigWrapper = newSigWrapper; return oldSigWrapper; } /* * OsSigHandler -- * Catch unexpected signals and exit or continue cleanly. */ #if !defined(WIN32) || defined(__CYGWIN__) static void #ifdef SA_SIGINFO OsSigHandler(int signo, siginfo_t * sip, void *unused) #else OsSigHandler(int signo) #endif { #ifdef RTLD_DI_SETSIGNAL # define SIGNAL_FOR_RTLD_ERROR SIGQUIT if (signo == SIGNAL_FOR_RTLD_ERROR) { const char *dlerr = dlerror(); if (dlerr) { LogMessageVerbSigSafe(X_ERROR, 1, "Dynamic loader error: %s\n", dlerr); } } #endif /* RTLD_DI_SETSIGNAL */ if (OsSigWrapper != NULL) { if (OsSigWrapper(signo) == 0) { /* ddx handled signal and wants us to continue */ return; } } /* log, cleanup, and abort */ xorg_backtrace(); #ifdef SA_SIGINFO if (sip->si_code == SI_USER) { ErrorFSigSafe("Received signal %u sent by process %u, uid %u\n", signo, sip->si_pid, sip->si_uid); } else { switch (signo) { case SIGSEGV: case SIGBUS: case SIGILL: case SIGFPE: ErrorFSigSafe("%s at address %p\n", strsignal(signo), sip->si_addr); } } #endif if (signo != SIGQUIT) CoreDump = TRUE; FatalError("Caught signal %d (%s). Server aborting\n", signo, strsignal(signo)); } #endif /* !WIN32 || __CYGWIN__ */ #include "busfault.h" void OsInit(void) { static Bool been_here = FALSE; #ifndef XQUARTZ static const char *devnull = "/dev/null"; char fname[PATH_MAX]; #endif if (!been_here) { #if !defined(WIN32) || defined(__CYGWIN__) struct sigaction act, oact; int i; int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS, SIGABRT, SIGSYS, SIGXCPU, SIGXFSZ, #ifdef SIGEMT SIGEMT, #endif 0 /* must be last */ }; sigemptyset(&act.sa_mask); #ifdef SA_SIGINFO act.sa_sigaction = OsSigHandler; act.sa_flags = SA_SIGINFO; #else act.sa_handler = OsSigHandler; act.sa_flags = 0; #endif for (i = 0; siglist[i] != 0; i++) { if (sigaction(siglist[i], &act, &oact)) { ErrorF("failed to install signal handler for signal %d: %s\n", siglist[i], strerror(errno)); } } #endif /* !WIN32 || __CYGWIN__ */ #ifdef BUSFAULT busfault_init(); #endif server_poll = ospoll_create(); if (!server_poll) FatalError("failed to allocate poll structure"); #ifdef HAVE_BACKTRACE /* * initialize the backtracer, since the ctor calls dlopen(), which * calls malloc(), which isn't signal-safe. */ do { void *array; backtrace(&array, 1); } while (0); #endif #ifdef RTLD_DI_SETSIGNAL /* Tell runtime linker to send a signal we can catch instead of SIGKILL * for failures to load libraries/modules at runtime so we can clean up * after ourselves. */ { int failure_signal = SIGNAL_FOR_RTLD_ERROR; dlinfo(RTLD_SELF, RTLD_DI_SETSIGNAL, &failure_signal); } #endif #if !defined(XQUARTZ) /* STDIN is already /dev/null and STDOUT/STDERR is managed by console_redirect.c */ /* * If a write of zero bytes to stderr returns non-zero, i.e. -1, * then writing to stderr failed, and we'll write somewhere else * instead. (Apparently this never happens in the Real World.) */ if (write(2, fname, 0) == -1) { FILE *err; if (strlen(display) + strlen(ADMPATH) + 1 < sizeof fname) snprintf(fname, sizeof(fname), ADMPATH, display); else strcpy(fname, devnull); /* * uses stdio to avoid os dependencies here, * a real os would use * open (fname, O_WRONLY|O_APPEND|O_CREAT, 0666) */ if (!(err = fopen(fname, "a+"))) err = fopen(devnull, "w"); if (err && (fileno(err) != 2)) { dup2(fileno(err), 2); fclose(err); } #if defined(SYSV) || defined(SVR4) || defined(WIN32) || defined(__CYGWIN__) { static char buf[BUFSIZ]; setvbuf(stderr, buf, _IOLBF, BUFSIZ); } #else setlinebuf(stderr); #endif } #endif /* !XQUARTZ */ #if !defined(WIN32) || defined(__CYGWIN__) if (getpgrp() == 0) setpgid(0, 0); #endif #ifdef RLIMIT_DATA if (limitDataSpace >= 0) { struct rlimit rlim; if (!getrlimit(RLIMIT_DATA, &rlim)) { if ((limitDataSpace > 0) && (limitDataSpace < rlim.rlim_max)) rlim.rlim_cur = limitDataSpace; else rlim.rlim_cur = rlim.rlim_max; (void) setrlimit(RLIMIT_DATA, &rlim); } } #endif #ifdef RLIMIT_STACK if (limitStackSpace >= 0) { struct rlimit rlim; if (!getrlimit(RLIMIT_STACK, &rlim)) { if ((limitStackSpace > 0) && (limitStackSpace < rlim.rlim_max)) rlim.rlim_cur = limitStackSpace; else rlim.rlim_cur = rlim.rlim_max; (void) setrlimit(RLIMIT_STACK, &rlim); } } #endif #ifdef RLIMIT_NOFILE if (limitNoFile >= 0) { struct rlimit rlim; if (!getrlimit(RLIMIT_NOFILE, &rlim)) { if ((limitNoFile > 0) && (limitNoFile < rlim.rlim_max)) rlim.rlim_cur = limitNoFile; else rlim.rlim_cur = rlim.rlim_max; (void) setrlimit(RLIMIT_NOFILE, &rlim); } } #endif LockServer(); been_here = TRUE; } TimerInit(); OsVendorInit(); OsResetSignals(); /* * No log file by default. OsVendorInit() should call LogInit() with the * log file name if logging to a file is desired. */ LogInit(NULL, NULL); SmartScheduleInit(); } void OsCleanup(Bool terminating) { if (terminating) { UnlockServer(); } } xorg-server-21.1.16/os/ospoll.c0000644000175000017500000004621014757411105011733 /* * Copyright © 2016 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include #include #include #include #include "misc.h" /* for typedef of pointer */ #include "ospoll.h" #include "list.h" #if !HAVE_OSPOLL && defined(HAVE_POLLSET_CREATE) #include #define POLLSET 1 #define HAVE_OSPOLL 1 #endif #if !HAVE_OSPOLL && defined(HAVE_PORT_CREATE) #include #include #define PORT 1 #define HAVE_OSPOLL 1 #endif #if !HAVE_OSPOLL && defined(HAVE_EPOLL_CREATE1) #include #define EPOLL 1 #define HAVE_OSPOLL 1 #endif #if !HAVE_OSPOLL #include "xserver_poll.h" #define POLL 1 #define HAVE_OSPOLL 1 #endif #if POLLSET // pollset-based implementation (as seen on AIX) struct ospollfd { int fd; int xevents; short revents; enum ospoll_trigger trigger; void (*callback)(int fd, int xevents, void *data); void *data; }; struct ospoll { pollset_t ps; struct ospollfd *fds; int num; int size; }; #endif #if EPOLL || PORT /* epoll-based implementation */ struct ospollfd { int fd; int xevents; enum ospoll_trigger trigger; void (*callback)(int fd, int xevents, void *data); void *data; struct xorg_list deleted; }; struct ospoll { int epoll_fd; struct ospollfd **fds; int num; int size; struct xorg_list deleted; }; #endif #if POLL /* poll-based implementation */ struct ospollfd { short revents; enum ospoll_trigger trigger; void (*callback)(int fd, int revents, void *data); void *data; }; struct ospoll { struct pollfd *fds; struct ospollfd *osfds; int num; int size; Bool changed; }; #endif /* Binary search for the specified file descriptor * * Returns position if found * Returns -position - 1 if not found */ static int ospoll_find(struct ospoll *ospoll, int fd) { int lo = 0; int hi = ospoll->num - 1; while (lo <= hi) { int m = (lo + hi) >> 1; #if EPOLL || PORT int t = ospoll->fds[m]->fd; #endif #if POLL || POLLSET int t = ospoll->fds[m].fd; #endif if (t < fd) lo = m + 1; else if (t > fd) hi = m - 1; else return m; } return -(lo + 1); } #if EPOLL || PORT static void ospoll_clean_deleted(struct ospoll *ospoll) { struct ospollfd *osfd, *tmp; xorg_list_for_each_entry_safe(osfd, tmp, &ospoll->deleted, deleted) { xorg_list_del(&osfd->deleted); free(osfd); } } #endif /* Insert an element into an array * * base: base address of array * num: number of elements in the array before the insert * size: size of each element * pos: position to insert at */ static inline void array_insert(void *base, size_t num, size_t size, size_t pos) { char *b = base; memmove(b + (pos+1) * size, b + pos * size, (num - pos) * size); } /* Delete an element from an array * * base: base address of array * num: number of elements in the array before the delete * size: size of each element * pos: position to delete from */ static inline void array_delete(void *base, size_t num, size_t size, size_t pos) { char *b = base; memmove(b + pos * size, b + (pos + 1) * size, (num - pos - 1) * size); } struct ospoll * ospoll_create(void) { #if POLLSET struct ospoll *ospoll = calloc(1, sizeof (struct ospoll)); ospoll->ps = pollset_create(-1); if (ospoll->ps < 0) { free (ospoll); return NULL; } return ospoll; #endif #if PORT struct ospoll *ospoll = calloc(1, sizeof (struct ospoll)); ospoll->epoll_fd = port_create(); if (ospoll->epoll_fd < 0) { free (ospoll); return NULL; } xorg_list_init(&ospoll->deleted); return ospoll; #endif #if EPOLL struct ospoll *ospoll = calloc(1, sizeof (struct ospoll)); ospoll->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (ospoll->epoll_fd < 0) { free (ospoll); return NULL; } xorg_list_init(&ospoll->deleted); return ospoll; #endif #if POLL return calloc(1, sizeof (struct ospoll)); #endif } void ospoll_destroy(struct ospoll *ospoll) { #if POLLSET if (ospoll) { assert (ospoll->num == 0); pollset_destroy(ospoll->ps); free(ospoll->fds); free(ospoll); } #endif #if EPOLL || PORT if (ospoll) { assert (ospoll->num == 0); close(ospoll->epoll_fd); ospoll_clean_deleted(ospoll); free(ospoll->fds); free(ospoll); } #endif #if POLL if (ospoll) { assert (ospoll->num == 0); free (ospoll->fds); free (ospoll->osfds); free (ospoll); } #endif } Bool ospoll_add(struct ospoll *ospoll, int fd, enum ospoll_trigger trigger, void (*callback)(int fd, int xevents, void *data), void *data) { int pos = ospoll_find(ospoll, fd); #if POLLSET if (pos < 0) { if (ospoll->num == ospoll->size) { struct ospollfd *new_fds; int new_size = ospoll->size ? ospoll->size * 2 : MAXCLIENTS * 2; new_fds = reallocarray(ospoll->fds, new_size, sizeof (ospoll->fds[0])); if (!new_fds) return FALSE; ospoll->fds = new_fds; ospoll->size = new_size; } pos = -pos - 1; array_insert(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->num++; ospoll->fds[pos].fd = fd; ospoll->fds[pos].xevents = 0; ospoll->fds[pos].revents = 0; } ospoll->fds[pos].trigger = trigger; ospoll->fds[pos].callback = callback; ospoll->fds[pos].data = data; #endif #if PORT struct ospollfd *osfd; if (pos < 0) { osfd = calloc(1, sizeof (struct ospollfd)); if (!osfd) return FALSE; if (ospoll->num >= ospoll->size) { struct ospollfd **new_fds; int new_size = ospoll->size ? ospoll->size * 2 : MAXCLIENTS * 2; new_fds = reallocarray(ospoll->fds, new_size, sizeof (ospoll->fds[0])); if (!new_fds) { free (osfd); return FALSE; } ospoll->fds = new_fds; ospoll->size = new_size; } osfd->fd = fd; osfd->xevents = 0; pos = -pos - 1; array_insert(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->fds[pos] = osfd; ospoll->num++; } else { osfd = ospoll->fds[pos]; } osfd->data = data; osfd->callback = callback; osfd->trigger = trigger; #endif #if EPOLL struct ospollfd *osfd; if (pos < 0) { struct epoll_event ev; osfd = calloc(1, sizeof (struct ospollfd)); if (!osfd) return FALSE; if (ospoll->num >= ospoll->size) { struct ospollfd **new_fds; int new_size = ospoll->size ? ospoll->size * 2 : MAXCLIENTS * 2; new_fds = reallocarray(ospoll->fds, new_size, sizeof (ospoll->fds[0])); if (!new_fds) { free (osfd); return FALSE; } ospoll->fds = new_fds; ospoll->size = new_size; } ev.events = 0; ev.data.ptr = osfd; if (trigger == ospoll_trigger_edge) ev.events |= EPOLLET; if (epoll_ctl(ospoll->epoll_fd, EPOLL_CTL_ADD, fd, &ev) == -1) { free(osfd); return FALSE; } osfd->fd = fd; osfd->xevents = 0; pos = -pos - 1; array_insert(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->fds[pos] = osfd; ospoll->num++; } else { osfd = ospoll->fds[pos]; } osfd->data = data; osfd->callback = callback; osfd->trigger = trigger; #endif #if POLL if (pos < 0) { if (ospoll->num == ospoll->size) { struct pollfd *new_fds; struct ospollfd *new_osfds; int new_size = ospoll->size ? ospoll->size * 2 : MAXCLIENTS * 2; new_fds = reallocarray(ospoll->fds, new_size, sizeof (ospoll->fds[0])); if (!new_fds) return FALSE; ospoll->fds = new_fds; new_osfds = reallocarray(ospoll->osfds, new_size, sizeof (ospoll->osfds[0])); if (!new_osfds) return FALSE; ospoll->osfds = new_osfds; ospoll->size = new_size; } pos = -pos - 1; array_insert(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); array_insert(ospoll->osfds, ospoll->num, sizeof (ospoll->osfds[0]), pos); ospoll->num++; ospoll->changed = TRUE; ospoll->fds[pos].fd = fd; ospoll->fds[pos].events = 0; ospoll->fds[pos].revents = 0; ospoll->osfds[pos].revents = 0; } ospoll->osfds[pos].trigger = trigger; ospoll->osfds[pos].callback = callback; ospoll->osfds[pos].data = data; #endif return TRUE; } void ospoll_remove(struct ospoll *ospoll, int fd) { int pos = ospoll_find(ospoll, fd); pos = ospoll_find(ospoll, fd); if (pos >= 0) { #if POLLSET struct ospollfd *osfd = &ospoll->fds[pos]; struct poll_ctl ctl = { .cmd = PS_DELETE, .fd = fd }; pollset_ctl(ospoll->ps, &ctl, 1); array_delete(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->num--; #endif #if PORT struct ospollfd *osfd = ospoll->fds[pos]; port_dissociate(ospoll->epoll_fd, PORT_SOURCE_FD, fd); array_delete(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->num--; osfd->callback = NULL; osfd->data = NULL; xorg_list_add(&osfd->deleted, &ospoll->deleted); #endif #if EPOLL struct ospollfd *osfd = ospoll->fds[pos]; struct epoll_event ev; ev.events = 0; ev.data.ptr = osfd; (void) epoll_ctl(ospoll->epoll_fd, EPOLL_CTL_DEL, fd, &ev); array_delete(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); ospoll->num--; osfd->callback = NULL; osfd->data = NULL; xorg_list_add(&osfd->deleted, &ospoll->deleted); #endif #if POLL array_delete(ospoll->fds, ospoll->num, sizeof (ospoll->fds[0]), pos); array_delete(ospoll->osfds, ospoll->num, sizeof (ospoll->osfds[0]), pos); ospoll->num--; ospoll->changed = TRUE; #endif } } #if PORT static void epoll_mod(struct ospoll *ospoll, struct ospollfd *osfd) { int events = 0; if (osfd->xevents & X_NOTIFY_READ) events |= POLLIN; if (osfd->xevents & X_NOTIFY_WRITE) events |= POLLOUT; port_associate(ospoll->epoll_fd, PORT_SOURCE_FD, osfd->fd, events, osfd); } #endif #if EPOLL static void epoll_mod(struct ospoll *ospoll, struct ospollfd *osfd) { struct epoll_event ev; ev.events = 0; if (osfd->xevents & X_NOTIFY_READ) ev.events |= EPOLLIN; if (osfd->xevents & X_NOTIFY_WRITE) ev.events |= EPOLLOUT; if (osfd->trigger == ospoll_trigger_edge) ev.events |= EPOLLET; ev.data.ptr = osfd; (void) epoll_ctl(ospoll->epoll_fd, EPOLL_CTL_MOD, osfd->fd, &ev); } #endif void ospoll_listen(struct ospoll *ospoll, int fd, int xevents) { int pos = ospoll_find(ospoll, fd); if (pos >= 0) { #if POLLSET struct poll_ctl ctl = { .cmd = PS_MOD, .fd = fd }; if (xevents & X_NOTIFY_READ) { ctl.events |= POLLIN; ospoll->fds[pos].revents &= ~POLLIN; } if (xevents & X_NOTIFY_WRITE) { ctl.events |= POLLOUT; ospoll->fds[pos].revents &= ~POLLOUT; } pollset_ctl(ospoll->ps, &ctl, 1); ospoll->fds[pos].xevents |= xevents; #endif #if EPOLL || PORT struct ospollfd *osfd = ospoll->fds[pos]; osfd->xevents |= xevents; epoll_mod(ospoll, osfd); #endif #if POLL if (xevents & X_NOTIFY_READ) { ospoll->fds[pos].events |= POLLIN; ospoll->osfds[pos].revents &= ~POLLIN; } if (xevents & X_NOTIFY_WRITE) { ospoll->fds[pos].events |= POLLOUT; ospoll->osfds[pos].revents &= ~POLLOUT; } #endif } } void ospoll_mute(struct ospoll *ospoll, int fd, int xevents) { int pos = ospoll_find(ospoll, fd); if (pos >= 0) { #if POLLSET struct ospollfd *osfd = &ospoll->fds[pos]; osfd->xevents &= ~xevents; struct poll_ctl ctl = { .cmd = PS_DELETE, .fd = fd }; pollset_ctl(ospoll->ps, &ctl, 1); if (osfd->xevents) { ctl.cmd = PS_ADD; if (osfd->xevents & X_NOTIFY_READ) { ctl.events |= POLLIN; } if (osfd->xevents & X_NOTIFY_WRITE) { ctl.events |= POLLOUT; } pollset_ctl(ospoll->ps, &ctl, 1); } #endif #if EPOLL || PORT struct ospollfd *osfd = ospoll->fds[pos]; osfd->xevents &= ~xevents; epoll_mod(ospoll, osfd); #endif #if POLL if (xevents & X_NOTIFY_READ) ospoll->fds[pos].events &= ~POLLIN; if (xevents & X_NOTIFY_WRITE) ospoll->fds[pos].events &= ~POLLOUT; #endif } } int ospoll_wait(struct ospoll *ospoll, int timeout) { int nready; #if POLLSET #define MAX_EVENTS 256 struct pollfd events[MAX_EVENTS]; nready = pollset_poll(ospoll->ps, events, MAX_EVENTS, timeout); for (int i = 0; i < nready; i++) { struct pollfd *ev = &events[i]; int pos = ospoll_find(ospoll, ev->fd); struct ospollfd *osfd = &ospoll->fds[pos]; short revents = ev->revents; short oldevents = osfd->revents; osfd->revents = (revents & (POLLIN|POLLOUT)); if (osfd->trigger == ospoll_trigger_edge) revents &= ~oldevents; if (revents) { int xevents = 0; if (revents & POLLIN) xevents |= X_NOTIFY_READ; if (revents & POLLOUT) xevents |= X_NOTIFY_WRITE; if (revents & (~(POLLIN|POLLOUT))) xevents |= X_NOTIFY_ERROR; osfd->callback(osfd->fd, xevents, osfd->data); } } #endif #if PORT #define MAX_EVENTS 256 port_event_t events[MAX_EVENTS]; uint_t nget = 1; timespec_t port_timeout = { .tv_sec = timeout / 1000, .tv_nsec = (timeout % 1000) * 1000000 }; nready = 0; if (port_getn(ospoll->epoll_fd, events, MAX_EVENTS, &nget, &port_timeout) == 0) { nready = nget; } for (int i = 0; i < nready; i++) { port_event_t *ev = &events[i]; struct ospollfd *osfd = ev->portev_user; uint32_t revents = ev->portev_events; int xevents = 0; if (revents & POLLIN) xevents |= X_NOTIFY_READ; if (revents & POLLOUT) xevents |= X_NOTIFY_WRITE; if (revents & (~(POLLIN|POLLOUT))) xevents |= X_NOTIFY_ERROR; if (osfd->callback) osfd->callback(osfd->fd, xevents, osfd->data); if (osfd->trigger == ospoll_trigger_level && !xorg_list_is_empty(&osfd->deleted)) { epoll_mod(ospoll, osfd); } } ospoll_clean_deleted(ospoll); #endif #if EPOLL #define MAX_EVENTS 256 struct epoll_event events[MAX_EVENTS]; int i; nready = epoll_wait(ospoll->epoll_fd, events, MAX_EVENTS, timeout); for (i = 0; i < nready; i++) { struct epoll_event *ev = &events[i]; struct ospollfd *osfd = ev->data.ptr; uint32_t revents = ev->events; int xevents = 0; if (revents & EPOLLIN) xevents |= X_NOTIFY_READ; if (revents & EPOLLOUT) xevents |= X_NOTIFY_WRITE; if (revents & (~(EPOLLIN|EPOLLOUT))) xevents |= X_NOTIFY_ERROR; if (osfd->callback) osfd->callback(osfd->fd, xevents, osfd->data); } ospoll_clean_deleted(ospoll); #endif #if POLL nready = xserver_poll(ospoll->fds, ospoll->num, timeout); ospoll->changed = FALSE; if (nready > 0) { int f; for (f = 0; f < ospoll->num; f++) { short revents = ospoll->fds[f].revents; short oldevents = ospoll->osfds[f].revents; ospoll->osfds[f].revents = (revents & (POLLIN|POLLOUT)); if (ospoll->osfds[f].trigger == ospoll_trigger_edge) revents &= ~oldevents; if (revents) { int xevents = 0; if (revents & POLLIN) xevents |= X_NOTIFY_READ; if (revents & POLLOUT) xevents |= X_NOTIFY_WRITE; if (revents & (~(POLLIN|POLLOUT))) xevents |= X_NOTIFY_ERROR; ospoll->osfds[f].callback(ospoll->fds[f].fd, xevents, ospoll->osfds[f].data); /* Check to see if the arrays have changed, and just go back * around again */ if (ospoll->changed) break; } } } #endif return nready; } void ospoll_reset_events(struct ospoll *ospoll, int fd) { #if POLLSET int pos = ospoll_find(ospoll, fd); if (pos < 0) return; ospoll->fds[pos].revents = 0; #endif #if PORT int pos = ospoll_find(ospoll, fd); if (pos < 0) return; epoll_mod(ospoll, ospoll->fds[pos]); #endif #if POLL int pos = ospoll_find(ospoll, fd); if (pos < 0) return; ospoll->osfds[pos].revents = 0; #endif } void * ospoll_data(struct ospoll *ospoll, int fd) { int pos = ospoll_find(ospoll, fd); if (pos < 0) return NULL; #if POLLSET return ospoll->fds[pos].data; #endif #if EPOLL || PORT return ospoll->fds[pos]->data; #endif #if POLL return ospoll->osfds[pos].data; #endif } xorg-server-21.1.16/os/ospoll.h0000644000175000017500000001015014757411105011732 /* * Copyright © 2016 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _OSPOLL_H_ #define _OSPOLL_H_ /* Forward declaration */ struct ospoll; /** * ospoll_wait trigger mode * * @ospoll_trigger_edge * Trigger only when going from no data available * to data available. * * @ospoll_trigger_level * Trigger whenever there is data available */ enum ospoll_trigger { ospoll_trigger_edge, ospoll_trigger_level }; /** * Create a new ospoll structure */ struct ospoll * ospoll_create(void); /** * Destroy an ospoll structure * * @param ospoll ospoll to destroy */ void ospoll_destroy(struct ospoll *ospoll); /** * Add a file descriptor to monitor * * @param ospoll ospoll to add to * @param fd File descriptor to monitor * @param trigger Trigger mode for ospoll_wait * @param callback Function to call when triggered * @param data Extra data to pass callback */ Bool ospoll_add(struct ospoll *ospoll, int fd, enum ospoll_trigger trigger, void (*callback)(int fd, int xevents, void *data), void *data); /** * Remove a monitored file descriptor * * @param ospoll ospoll to remove from * @param fd File descriptor to stop monitoring */ void ospoll_remove(struct ospoll *ospoll, int fd); /** * Listen on additional events * * @param ospoll ospoll monitoring fd * @param fd File descriptor to change * @param events Additional events to trigger on */ void ospoll_listen(struct ospoll *ospoll, int fd, int xevents); /** * Stop listening on events * * @param ospoll ospoll monitoring fd * @param fd File descriptor to change * @param events events to stop triggering on */ void ospoll_mute(struct ospoll *ospoll, int fd, int xevents); /** * Wait for events * * @param ospoll ospoll to wait on * @param timeout < 0 wait forever * = 0 check and return * > 0 timeout in milliseconds * @return < 0 error * = 0 timeout * > 0 number of events delivered */ int ospoll_wait(struct ospoll *ospoll, int timeout); /** * Reset edge trigger status * * @param ospoll ospoll monitoring fd * @param fd file descriptor * * ospoll_reset_events resets the state of an edge-triggered * fd so that ospoll_wait calls will report events again. * * Call this after a read/recv operation reports no more data available. */ void ospoll_reset_events(struct ospoll *ospoll, int fd); /** * Fetch the data associated with an fd * * @param ospoll ospoll monitoring fd * @param fd file descriptor * * @return data parameter passed to ospoll_add call on * this file descriptor */ void * ospoll_data(struct ospoll *ospoll, int fd); #endif /* _OSPOLL_H_ */ xorg-server-21.1.16/os/utils.c0000644000175000017500000016237414757411105011575 /* 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, Copyright 1994 Quarterdeck Office Systems. 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 names of Digital and Quarterdeck not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND QUARTERDECK DISCLAIM 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef __CYGWIN__ #include #include /* Sigh... We really need a prototype for this to know it is stdcall, but #include-ing here is not a good idea... */ __stdcall unsigned long GetTickCount(void); #endif #if defined(WIN32) && !defined(__CYGWIN__) #include #endif #include #include #include #if !defined(WIN32) || !defined(__MINGW32__) #include #include #endif #include "misc.h" #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #include "input.h" #include "dixfont.h" #include #include "osdep.h" #include "extension.h" #include #ifndef WIN32 #include #endif #if !defined(SYSV) && !defined(WIN32) #include #endif #include #include /* for isspace */ #include #include /* for malloc() */ #if defined(TCPCONN) #ifndef WIN32 #include #endif #endif #include "opaque.h" #include "dixstruct.h" #include "xkbsrv.h" #include "picture.h" #include "miinitext.h" #include "present.h" Bool noTestExtensions; #ifdef COMPOSITE Bool noCompositeExtension = FALSE; #endif #ifdef DAMAGE Bool noDamageExtension = FALSE; #endif #ifdef DBE Bool noDbeExtension = FALSE; #endif #ifdef DPMSExtension #include "dpmsproc.h" Bool noDPMSExtension = FALSE; #endif #ifdef GLXEXT Bool noGlxExtension = FALSE; #endif #ifdef SCREENSAVER Bool noScreenSaverExtension = FALSE; #endif #ifdef MITSHM Bool noMITShmExtension = FALSE; #endif #ifdef RANDR Bool noRRExtension = FALSE; #endif Bool noRenderExtension = FALSE; #ifdef XCSECURITY Bool noSecurityExtension = FALSE; #endif #ifdef RES Bool noResExtension = FALSE; #endif #ifdef XF86BIGFONT Bool noXFree86BigfontExtension = FALSE; #endif #ifdef XFreeXDGA Bool noXFree86DGAExtension = FALSE; #endif #ifdef XF86DRI Bool noXFree86DRIExtension = FALSE; #endif #ifdef XF86VIDMODE Bool noXFree86VidModeExtension = FALSE; #endif Bool noXFixesExtension = FALSE; #ifdef PANORAMIX /* Xinerama is disabled by default unless enabled via +xinerama */ Bool noPanoramiXExtension = TRUE; #endif #ifdef XSELINUX Bool noSELinuxExtension = FALSE; int selinuxEnforcingState = SELINUX_MODE_DEFAULT; #endif #ifdef XV Bool noXvExtension = FALSE; #endif #ifdef DRI2 Bool noDRI2Extension = FALSE; #endif Bool noGEExtension = FALSE; #define X_INCLUDE_NETDB_H #include #include Bool CoreDump; Bool enableIndirectGLX = FALSE; Bool AllowByteSwappedClients = TRUE; #ifdef PANORAMIX Bool PanoramiXExtensionDisabledHack = FALSE; #endif int auditTrailLevel = 1; char *SeatId = NULL; sig_atomic_t inSignalContext = FALSE; #if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #define HAS_SAVED_IDS_AND_SETEUID #endif #ifdef MONOTONIC_CLOCK static clockid_t clockid; #endif OsSigHandlerPtr OsSignal(int sig, OsSigHandlerPtr handler) { #if defined(WIN32) && !defined(__CYGWIN__) return signal(sig, handler); #else struct sigaction act, oact; sigemptyset(&act.sa_mask); if (handler != SIG_IGN) sigaddset(&act.sa_mask, sig); act.sa_flags = 0; act.sa_handler = handler; if (sigaction(sig, &act, &oact)) perror("sigaction"); return oact.sa_handler; #endif } /* * Explicit support for a server lock file like the ones used for UUCP. * For architectures with virtual terminals that can run more than one * server at a time. This keeps the servers from stomping on each other * if the user forgets to give them different display numbers. */ #define LOCK_DIR "/tmp" #define LOCK_TMP_PREFIX "/.tX" #define LOCK_PREFIX "/.X" #define LOCK_SUFFIX "-lock" #if !defined(WIN32) || defined(__CYGWIN__) #define LOCK_SERVER #endif #ifndef LOCK_SERVER void LockServer(void) {} void UnlockServer(void) {} #else /* LOCK_SERVER */ static Bool StillLocking = FALSE; static char LockFile[PATH_MAX]; static Bool nolock = FALSE; /* * LockServer -- * Check if the server lock file exists. If so, check if the PID * contained inside is valid. If so, then die. Otherwise, create * the lock file containing the PID. */ void LockServer(void) { char tmp[PATH_MAX], pid_str[12]; int lfd, i, haslock, l_pid, t; const char *tmppath = LOCK_DIR; int len; char port[20]; if (nolock || NoListenAll) return; /* * Path names */ snprintf(port, sizeof(port), "%d", atoi(display)); len = strlen(LOCK_PREFIX) > strlen(LOCK_TMP_PREFIX) ? strlen(LOCK_PREFIX) : strlen(LOCK_TMP_PREFIX); len += strlen(tmppath) + strlen(port) + strlen(LOCK_SUFFIX) + 1; if (len > sizeof(LockFile)) FatalError("Display name `%s' is too long\n", port); (void) sprintf(tmp, "%s" LOCK_TMP_PREFIX "%s" LOCK_SUFFIX, tmppath, port); (void) sprintf(LockFile, "%s" LOCK_PREFIX "%s" LOCK_SUFFIX, tmppath, port); /* * Create a temporary file containing our PID. Attempt three times * to create the file. */ StillLocking = TRUE; i = 0; do { i++; lfd = open(tmp, O_CREAT | O_EXCL | O_WRONLY, 0644); if (lfd < 0) sleep(2); else break; } while (i < 3); if (lfd < 0) { unlink(tmp); i = 0; do { i++; lfd = open(tmp, O_CREAT | O_EXCL | O_WRONLY, 0644); if (lfd < 0) sleep(2); else break; } while (i < 3); } if (lfd < 0) FatalError("Could not create lock file in %s\n", tmp); snprintf(pid_str, sizeof(pid_str), "%10lu\n", (unsigned long) getpid()); if (write(lfd, pid_str, 11) != 11) FatalError("Could not write pid to lock file in %s\n", tmp); (void) fchmod(lfd, 0444); (void) close(lfd); /* * OK. Now the tmp file exists. Try three times to move it in place * for the lock. */ i = 0; haslock = 0; while ((!haslock) && (i++ < 3)) { haslock = (link(tmp, LockFile) == 0); if (haslock) { /* * We're done. */ break; } else if (errno == EEXIST) { /* * Read the pid from the existing file */ lfd = open(LockFile, O_RDONLY | O_NOFOLLOW); if (lfd < 0) { unlink(tmp); FatalError("Can't read lock file %s\n", LockFile); } pid_str[0] = '\0'; if (read(lfd, pid_str, 11) != 11) { /* * Bogus lock file. */ unlink(LockFile); close(lfd); continue; } pid_str[11] = '\0'; sscanf(pid_str, "%d", &l_pid); close(lfd); /* * Now try to kill the PID to see if it exists. */ errno = 0; t = kill(l_pid, 0); if ((t < 0) && (errno == ESRCH)) { /* * Stale lock file. */ unlink(LockFile); continue; } else if (((t < 0) && (errno == EPERM)) || (t == 0)) { /* * Process is still active. */ unlink(tmp); FatalError ("Server is already active for display %s\n%s %s\n%s\n", port, "\tIf this server is no longer running, remove", LockFile, "\tand start again."); } } else { unlink(tmp); FatalError ("Linking lock file (%s) in place failed: %s\n", LockFile, strerror(errno)); } } unlink(tmp); if (!haslock) FatalError("Could not create server lock file: %s\n", LockFile); StillLocking = FALSE; } /* * UnlockServer -- * Remove the server lock file. */ void UnlockServer(void) { if (nolock || NoListenAll) return; if (!StillLocking) { (void) unlink(LockFile); } } #endif /* LOCK_SERVER */ /* Force connections to close on SIGHUP from init */ void AutoResetServer(int sig) { int olderrno = errno; dispatchException |= DE_RESET; isItTimeToYield = TRUE; errno = olderrno; } /* Force connections to close and then exit on SIGTERM, SIGINT */ void GiveUp(int sig) { int olderrno = errno; dispatchException |= DE_TERMINATE; isItTimeToYield = TRUE; errno = olderrno; } #ifdef MONOTONIC_CLOCK void ForceClockId(clockid_t forced_clockid) { struct timespec tp; BUG_RETURN (clockid); clockid = forced_clockid; if (clock_gettime(clockid, &tp) != 0) { FatalError("Forced clock id failed to retrieve current time: %s\n", strerror(errno)); return; } } #endif #if (defined WIN32 && defined __MINGW32__) || defined(__CYGWIN__) CARD32 GetTimeInMillis(void) { return GetTickCount(); } CARD64 GetTimeInMicros(void) { return (CARD64) GetTickCount() * 1000; } #else CARD32 GetTimeInMillis(void) { struct timeval tv; #ifdef MONOTONIC_CLOCK struct timespec tp; if (!clockid) { #ifdef CLOCK_MONOTONIC_COARSE if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 && (tp.tv_nsec / 1000) <= 1000 && clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0) clockid = CLOCK_MONOTONIC_COARSE; else #endif if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) clockid = CLOCK_MONOTONIC; else clockid = ~0L; } if (clockid != ~0L && clock_gettime(clockid, &tp) == 0) return (tp.tv_sec * 1000) + (tp.tv_nsec / 1000000L); #endif X_GETTIMEOFDAY(&tv); return (tv.tv_sec * 1000) + (tv.tv_usec / 1000); } CARD64 GetTimeInMicros(void) { struct timeval tv; #ifdef MONOTONIC_CLOCK struct timespec tp; static clockid_t uclockid; if (!uclockid) { if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) uclockid = CLOCK_MONOTONIC; else uclockid = ~0L; } if (uclockid != ~0L && clock_gettime(uclockid, &tp) == 0) return (CARD64) tp.tv_sec * (CARD64)1000000 + tp.tv_nsec / 1000; #endif X_GETTIMEOFDAY(&tv); return (CARD64) tv.tv_sec * (CARD64)1000000 + (CARD64) tv.tv_usec; } #endif void UseMsg(void) { ErrorF("use: X [:] [option]\n"); ErrorF("-a # default pointer acceleration (factor)\n"); ErrorF("-ac disable access control restrictions\n"); ErrorF("-audit int set audit trail level\n"); ErrorF("-auth file select authorization file\n"); ErrorF("-br create root window with black background\n"); ErrorF("+bs enable any backing store support\n"); ErrorF("-bs disable any backing store support\n"); ErrorF("+byteswappedclients Allow clients with endianess different to that of the server\n"); ErrorF("-byteswappedclients Prohibit clients with endianess different to that of the server\n"); ErrorF("-c turns off key-click\n"); ErrorF("c # key-click volume (0-100)\n"); ErrorF("-cc int default color visual class\n"); ErrorF("-nocursor disable the cursor\n"); ErrorF("-core generate core dump on fatal error\n"); ErrorF("-displayfd fd file descriptor to write display number to when ready to connect\n"); ErrorF("-dpi int screen resolution in dots per inch\n"); #ifdef DPMSExtension ErrorF("-dpms disables VESA DPMS monitor control\n"); #endif ErrorF ("-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n"); ErrorF("-f # bell base (0-100)\n"); ErrorF("-fakescreenfps # fake screen default fps (1-600)\n"); ErrorF("-fp string default font path\n"); ErrorF("-help prints message with these options\n"); ErrorF("+iglx Allow creating indirect GLX contexts\n"); ErrorF("-iglx Prohibit creating indirect GLX contexts (default)\n"); ErrorF("-I ignore all remaining arguments\n"); #ifdef RLIMIT_DATA ErrorF("-ld int limit data space to N Kb\n"); #endif #ifdef RLIMIT_NOFILE ErrorF("-lf int limit number of open files to N\n"); #endif #ifdef RLIMIT_STACK ErrorF("-ls int limit stack space to N Kb\n"); #endif #ifdef LOCK_SERVER ErrorF("-nolock disable the locking mechanism\n"); #endif ErrorF("-maxclients n set maximum number of clients (power of two)\n"); ErrorF("-nolisten string don't listen on protocol\n"); ErrorF("-listen string listen on protocol\n"); ErrorF("-noreset don't reset after last client exists\n"); ErrorF("-background [none] create root window with no background\n"); ErrorF("-reset reset after last client exists\n"); ErrorF("-p # screen-saver pattern duration (minutes)\n"); ErrorF("-pn accept failure to listen on all ports\n"); ErrorF("-nopn reject failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); ErrorF("-retro start with classic stipple and cursor\n"); ErrorF("-s # screen-saver timeout (minutes)\n"); ErrorF("-seat string seat to run on\n"); ErrorF("-t # default pointer threshold (pixels/t)\n"); ErrorF("-terminate [delay] terminate at server reset (optional delay in sec)\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wr create root window with white background\n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA extension\n"); ErrorF("-xinerama Disable XINERAMA extension\n"); #endif ErrorF ("-dumbSched Disable smart scheduling and threaded input, enable old behavior\n"); ErrorF("-schedInterval int Set scheduler interval in msec\n"); ErrorF("-sigstop Enable SIGSTOP based startup\n"); ErrorF("+extension name Enable extension\n"); ErrorF("-extension name Disable extension\n"); ListStaticExtensions(); #ifdef XDMCP XdmcpUseMsg(); #endif XkbUseMsg(); ddxUseMsg(); } /* This function performs a rudimentary sanity check * on the display name passed in on the command-line, * since this string is used to generate filenames. * It is especially important that the display name * not contain a "/" and not start with a "-". * --kvajk */ static int VerifyDisplayName(const char *d) { int i; int period_found = FALSE; int after_period = 0; if (d == (char *) 0) return 0; /* null */ if (*d == '\0') return 0; /* empty */ if (*d == '-') return 0; /* could be confused for an option */ if (*d == '.') return 0; /* must not equal "." or ".." */ if (strchr(d, '/') != (char *) 0) return 0; /* very important!!! */ /* Since we run atoi() on the display later, only allow for digits, or exception of :0.0 and similar (two decimal points max) */ for (i = 0; i < strlen(d); i++) { if (!isdigit(d[i])) { if (d[i] != '.' || period_found) return 0; period_found = TRUE; } else if (period_found) after_period++; if (after_period > 2) return 0; } /* don't allow for :0. */ if (period_found && after_period == 0) return 0; if (atol(d) > INT_MAX) return 0; return 1; } static const char *defaultNoListenList[] = { #ifndef LISTEN_TCP "tcp", #endif #ifndef LISTEN_UNIX "unix", #endif #ifndef LISTEN_LOCAL "local", #endif NULL }; /* * This function parses the command line. Handles device-independent fields * and allows ddx to handle additional fields. It is not allowed to modify * argc or any of the strings pointed to by argv. */ void ProcessCommandLine(int argc, char *argv[]) { int i, skip; defaultKeyboardControl.autoRepeat = TRUE; #ifdef NO_PART_NET PartialNetwork = FALSE; #else PartialNetwork = TRUE; #endif for (i = 0; defaultNoListenList[i] != NULL; i++) { if (_XSERVTransNoListen(defaultNoListenList[i])) ErrorF("Failed to disable listen for %s transport", defaultNoListenList[i]); } for (i = 1; i < argc; i++) { /* call ddx first, so it can peek/override if it wants */ if ((skip = ddxProcessArgument(argc, argv, i))) { i += (skip - 1); } else if (argv[i][0] == ':') { /* initialize display */ display = argv[i]; explicit_display = TRUE; display++; if (!VerifyDisplayName(display)) { ErrorF("Bad display name: %s\n", display); UseMsg(); FatalError("Bad display name, exiting: %s\n", display); } } else if (strcmp(argv[i], "-a") == 0) { if (++i < argc) defaultPointerControl.num = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-ac") == 0) { defeatAccessControl = TRUE; } else if (strcmp(argv[i], "-audit") == 0) { if (++i < argc) auditTrailLevel = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-auth") == 0) { if (++i < argc) InitAuthorization(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-byteswappedclients") == 0) { AllowByteSwappedClients = FALSE; } else if (strcmp(argv[i], "+byteswappedclients") == 0) { AllowByteSwappedClients = TRUE; } else if (strcmp(argv[i], "-br") == 0); /* default */ else if (strcmp(argv[i], "+bs") == 0) enableBackingStore = TRUE; else if (strcmp(argv[i], "-bs") == 0) disableBackingStore = TRUE; else if (strcmp(argv[i], "c") == 0) { if (++i < argc) defaultKeyboardControl.click = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-c") == 0) { defaultKeyboardControl.click = 0; } else if (strcmp(argv[i], "-cc") == 0) { if (++i < argc) defaultColorVisualClass = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-core") == 0) { #if !defined(WIN32) || !defined(__MINGW32__) struct rlimit core_limit; getrlimit(RLIMIT_CORE, &core_limit); core_limit.rlim_cur = core_limit.rlim_max; setrlimit(RLIMIT_CORE, &core_limit); #endif CoreDump = TRUE; } else if (strcmp(argv[i], "-nocursor") == 0) { EnableCursor = FALSE; } else if (strcmp(argv[i], "-dpi") == 0) { if (++i < argc) monitorResolution = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-displayfd") == 0) { if (++i < argc) { displayfd = atoi(argv[i]); #ifdef LOCK_SERVER nolock = TRUE; #endif } else UseMsg(); } #ifdef DPMSExtension else if (strcmp(argv[i], "dpms") == 0) /* ignored for compatibility */ ; else if (strcmp(argv[i], "-dpms") == 0) DPMSDisabledSwitch = TRUE; #endif else if (strcmp(argv[i], "-deferglyphs") == 0) { if (++i >= argc || !xfont2_parse_glyph_caching_mode(argv[i])) UseMsg(); } else if (strcmp(argv[i], "-f") == 0) { if (++i < argc) defaultKeyboardControl.bell = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-fakescreenfps") == 0) { if (++i < argc) { FakeScreenFps = (uint32_t) atoi(argv[i]); if (FakeScreenFps < 1 || FakeScreenFps > 600) FatalError("fakescreenfps must be an integer in [1;600] range\n"); } else UseMsg(); } else if (strcmp(argv[i], "-fp") == 0) { if (++i < argc) { defaultFontPath = argv[i]; } else UseMsg(); } else if (strcmp(argv[i], "-help") == 0) { UseMsg(); exit(0); } else if (strcmp(argv[i], "+iglx") == 0) enableIndirectGLX = TRUE; else if (strcmp(argv[i], "-iglx") == 0) enableIndirectGLX = FALSE; else if ((skip = XkbProcessArguments(argc, argv, i)) != 0) { if (skip > 0) i += skip - 1; else UseMsg(); } #ifdef RLIMIT_DATA else if (strcmp(argv[i], "-ld") == 0) { if (++i < argc) { limitDataSpace = atoi(argv[i]); if (limitDataSpace > 0) limitDataSpace *= 1024; } else UseMsg(); } #endif #ifdef RLIMIT_NOFILE else if (strcmp(argv[i], "-lf") == 0) { if (++i < argc) limitNoFile = atoi(argv[i]); else UseMsg(); } #endif #ifdef RLIMIT_STACK else if (strcmp(argv[i], "-ls") == 0) { if (++i < argc) { limitStackSpace = atoi(argv[i]); if (limitStackSpace > 0) limitStackSpace *= 1024; } else UseMsg(); } #endif #ifdef LOCK_SERVER else if (strcmp(argv[i], "-nolock") == 0) { #if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != 0) ErrorF ("Warning: the -nolock option can only be used by root\n"); else #endif nolock = TRUE; } #endif else if ( strcmp( argv[i], "-maxclients") == 0) { if (++i < argc) { LimitClients = atoi(argv[i]); if (LimitClients != 64 && LimitClients != 128 && LimitClients != 256 && LimitClients != 512 && LimitClients != 1024 && LimitClients != 2048) { FatalError("maxclients must be one of 64, 128, 256, 512, 1024 or 2048\n"); } } else UseMsg(); } else if (strcmp(argv[i], "-nolisten") == 0) { if (++i < argc) { if (_XSERVTransNoListen(argv[i])) ErrorF("Failed to disable listen for %s transport", argv[i]); } else UseMsg(); } else if (strcmp(argv[i], "-listen") == 0) { if (++i < argc) { if (_XSERVTransListen(argv[i])) ErrorF("Failed to enable listen for %s transport", argv[i]); } else UseMsg(); } else if (strcmp(argv[i], "-noreset") == 0) { dispatchExceptionAtReset = 0; } else if (strcmp(argv[i], "-reset") == 0) { dispatchExceptionAtReset = DE_RESET; } else if (strcmp(argv[i], "-p") == 0) { if (++i < argc) defaultScreenSaverInterval = ((CARD32) atoi(argv[i])) * MILLI_PER_MIN; else UseMsg(); } else if (strcmp(argv[i], "-pogo") == 0) { dispatchException = DE_TERMINATE; } else if (strcmp(argv[i], "-pn") == 0) PartialNetwork = TRUE; else if (strcmp(argv[i], "-nopn") == 0) PartialNetwork = FALSE; else if (strcmp(argv[i], "r") == 0) defaultKeyboardControl.autoRepeat = TRUE; else if (strcmp(argv[i], "-r") == 0) defaultKeyboardControl.autoRepeat = FALSE; else if (strcmp(argv[i], "-retro") == 0) party_like_its_1989 = TRUE; else if (strcmp(argv[i], "-s") == 0) { if (++i < argc) defaultScreenSaverTime = ((CARD32) atoi(argv[i])) * MILLI_PER_MIN; else UseMsg(); } else if (strcmp(argv[i], "-seat") == 0) { if (++i < argc) SeatId = argv[i]; else UseMsg(); } else if (strcmp(argv[i], "-t") == 0) { if (++i < argc) defaultPointerControl.threshold = atoi(argv[i]); else UseMsg(); } else if (strcmp(argv[i], "-terminate") == 0) { dispatchExceptionAtReset = DE_TERMINATE; terminateDelay = -1; if ((i + 1 < argc) && (isdigit(*argv[i + 1]))) terminateDelay = atoi(argv[++i]); terminateDelay = max(0, terminateDelay); } else if (strcmp(argv[i], "-tst") == 0) { noTestExtensions = TRUE; } else if (strcmp(argv[i], "v") == 0) defaultScreenSaverBlanking = PreferBlanking; else if (strcmp(argv[i], "-v") == 0) defaultScreenSaverBlanking = DontPreferBlanking; else if (strcmp(argv[i], "-wr") == 0) whiteRoot = TRUE; else if (strcmp(argv[i], "-background") == 0) { if (++i < argc) { if (!strcmp(argv[i], "none")) bgNoneRoot = TRUE; else UseMsg(); } } else if (strcmp(argv[i], "-maxbigreqsize") == 0) { if (++i < argc) { long reqSizeArg = atol(argv[i]); /* Request size > 128MB does not make much sense... */ if (reqSizeArg > 0L && reqSizeArg < 128L) { maxBigRequestSize = (reqSizeArg * 1048576L) - 1L; } else { UseMsg(); } } else { UseMsg(); } } #ifdef PANORAMIX else if (strcmp(argv[i], "+xinerama") == 0) { noPanoramiXExtension = FALSE; } else if (strcmp(argv[i], "-xinerama") == 0) { noPanoramiXExtension = TRUE; } else if (strcmp(argv[i], "-disablexineramaextension") == 0) { PanoramiXExtensionDisabledHack = TRUE; } #endif else if (strcmp(argv[i], "-I") == 0) { /* ignore all remaining arguments */ break; } else if (strncmp(argv[i], "tty", 3) == 0) { /* init supplies us with this useless information */ } #ifdef XDMCP else if ((skip = XdmcpOptions(argc, argv, i)) != i) { i = skip - 1; } #endif else if (strcmp(argv[i], "-dumbSched") == 0) { InputThreadEnable = FALSE; #ifdef HAVE_SETITIMER SmartScheduleSignalEnable = FALSE; #endif } else if (strcmp(argv[i], "-schedInterval") == 0) { if (++i < argc) { SmartScheduleInterval = atoi(argv[i]); SmartScheduleSlice = SmartScheduleInterval; } else UseMsg(); } else if (strcmp(argv[i], "-schedMax") == 0) { if (++i < argc) { SmartScheduleMaxSlice = atoi(argv[i]); } else UseMsg(); } else if (strcmp(argv[i], "-render") == 0) { if (++i < argc) { int policy = PictureParseCmapPolicy(argv[i]); if (policy != PictureCmapPolicyInvalid) PictureCmapPolicy = policy; else UseMsg(); } else UseMsg(); } else if (strcmp(argv[i], "-sigstop") == 0) { RunFromSigStopParent = TRUE; } else if (strcmp(argv[i], "+extension") == 0) { if (++i < argc) { if (!EnableDisableExtension(argv[i], TRUE)) EnableDisableExtensionError(argv[i], TRUE); } else UseMsg(); } else if (strcmp(argv[i], "-extension") == 0) { if (++i < argc) { if (!EnableDisableExtension(argv[i], FALSE)) EnableDisableExtensionError(argv[i], FALSE); } else UseMsg(); } else { ErrorF("Unrecognized option: %s\n", argv[i]); UseMsg(); FatalError("Unrecognized option: %s\n", argv[i]); } } } /* Implement a simple-minded font authorization scheme. The authorization name is "hp-hostname-1", the contents are simply the host name. */ int set_font_authorizations(char **authorizations, int *authlen, void *client) { #define AUTHORIZATION_NAME "hp-hostname-1" #if defined(TCPCONN) static char *result = NULL; static char *p = NULL; if (p == NULL) { char hname[1024], *hnameptr; unsigned int len; #if defined(IPv6) && defined(AF_INET6) struct addrinfo hints, *ai = NULL; #else struct hostent *host; #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif #endif gethostname(hname, 1024); #if defined(IPv6) && defined(AF_INET6) memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; if (getaddrinfo(hname, NULL, &hints, &ai) == 0) { hnameptr = ai->ai_canonname; } else { hnameptr = hname; } #else host = _XGethostbyname(hname, hparams); if (host == NULL) hnameptr = hname; else hnameptr = host->h_name; #endif len = strlen(hnameptr) + 1; result = malloc(len + sizeof(AUTHORIZATION_NAME) + 4); p = result; *p++ = sizeof(AUTHORIZATION_NAME) >> 8; *p++ = sizeof(AUTHORIZATION_NAME) & 0xff; *p++ = (len) >> 8; *p++ = (len & 0xff); memmove(p, AUTHORIZATION_NAME, sizeof(AUTHORIZATION_NAME)); p += sizeof(AUTHORIZATION_NAME); memmove(p, hnameptr, len); p += len; #if defined(IPv6) && defined(AF_INET6) if (ai) { freeaddrinfo(ai); } #endif } *authlen = p - result; *authorizations = result; return 1; #else /* TCPCONN */ return 0; #endif /* TCPCONN */ } void * XNFalloc(unsigned long amount) { void *ptr = malloc(amount); if (!ptr) FatalError("Out of memory"); return ptr; } /* The original XNFcalloc was used with the xnfcalloc macro which multiplied * the arguments at the call site without allowing calloc to check for overflow. * XNFcallocarray was added to fix that without breaking ABI. */ void * XNFcalloc(unsigned long amount) { return XNFcallocarray(1, amount); } void * XNFcallocarray(size_t nmemb, size_t size) { void *ret = calloc(nmemb, size); if (!ret) FatalError("XNFcalloc: Out of memory"); return ret; } void * XNFrealloc(void *ptr, unsigned long amount) { void *ret = realloc(ptr, amount); if (!ret) FatalError("XNFrealloc: Out of memory"); return ret; } void * XNFreallocarray(void *ptr, size_t nmemb, size_t size) { void *ret = reallocarray(ptr, nmemb, size); if (!ret) FatalError("XNFreallocarray: Out of memory"); return ret; } char * Xstrdup(const char *s) { if (s == NULL) return NULL; return strdup(s); } char * XNFstrdup(const char *s) { char *ret; if (s == NULL) return NULL; ret = strdup(s); if (!ret) FatalError("XNFstrdup: Out of memory"); return ret; } void SmartScheduleStopTimer(void) { #ifdef HAVE_SETITIMER struct itimerval timer; if (!SmartScheduleSignalEnable) return; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = 0; timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; (void) setitimer(ITIMER_REAL, &timer, 0); #endif } void SmartScheduleStartTimer(void) { #ifdef HAVE_SETITIMER struct itimerval timer; if (!SmartScheduleSignalEnable) return; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = SmartScheduleInterval * 1000; timer.it_value.tv_sec = 0; timer.it_value.tv_usec = SmartScheduleInterval * 1000; setitimer(ITIMER_REAL, &timer, 0); #endif } #ifdef HAVE_SETITIMER static void SmartScheduleTimer(int sig) { SmartScheduleTime += SmartScheduleInterval; } static int SmartScheduleEnable(void) { int ret = 0; struct sigaction act; if (!SmartScheduleSignalEnable) return 0; memset((char *) &act, 0, sizeof(struct sigaction)); /* Set up the timer signal function */ act.sa_flags = SA_RESTART; act.sa_handler = SmartScheduleTimer; sigemptyset(&act.sa_mask); sigaddset(&act.sa_mask, SIGALRM); ret = sigaction(SIGALRM, &act, 0); return ret; } static int SmartSchedulePause(void) { int ret = 0; struct sigaction act; if (!SmartScheduleSignalEnable) return 0; memset((char *) &act, 0, sizeof(struct sigaction)); act.sa_handler = SIG_IGN; sigemptyset(&act.sa_mask); ret = sigaction(SIGALRM, &act, 0); return ret; } #endif void SmartScheduleInit(void) { #ifdef HAVE_SETITIMER if (SmartScheduleEnable() < 0) { perror("sigaction for smart scheduler"); SmartScheduleSignalEnable = FALSE; } #endif } #ifdef HAVE_SIGPROCMASK static sigset_t PreviousSignalMask; static int BlockedSignalCount; #endif void OsBlockSignals(void) { #ifdef HAVE_SIGPROCMASK if (BlockedSignalCount++ == 0) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGALRM); sigaddset(&set, SIGVTALRM); #ifdef SIGWINCH sigaddset(&set, SIGWINCH); #endif sigaddset(&set, SIGTSTP); sigaddset(&set, SIGTTIN); sigaddset(&set, SIGTTOU); sigaddset(&set, SIGCHLD); xthread_sigmask(SIG_BLOCK, &set, &PreviousSignalMask); } #endif } void OsReleaseSignals(void) { #ifdef HAVE_SIGPROCMASK if (--BlockedSignalCount == 0) { xthread_sigmask(SIG_SETMASK, &PreviousSignalMask, 0); } #endif } void OsResetSignals(void) { #ifdef HAVE_SIGPROCMASK while (BlockedSignalCount > 0) OsReleaseSignals(); input_force_unlock(); #endif } /* * Pending signals may interfere with core dumping. Provide a * mechanism to block signals when aborting. */ void OsAbort(void) { #ifndef __APPLE__ OsBlockSignals(); #endif #if !defined(WIN32) || defined(__CYGWIN__) /* abort() raises SIGABRT, so we have to stop handling that to prevent * recursion */ OsSignal(SIGABRT, SIG_DFL); #endif abort(); } #if !defined(WIN32) /* * "safer" versions of system(3), popen(3) and pclose(3) which give up * all privs before running a command. * * This is based on the code in FreeBSD 2.2 libc. * * XXX It'd be good to redirect stderr so that it ends up in the log file * as well. As it is now, xkbcomp messages don't end up in the log file. */ int System(const char *command) { int pid, p; void (*csig) (int); int status; if (!command) return 1; csig = OsSignal(SIGCHLD, SIG_DFL); if (csig == SIG_ERR) { perror("signal"); return -1; } DebugF("System: `%s'\n", command); switch (pid = fork()) { case -1: /* error */ p = -1; break; case 0: /* child */ if (setgid(getgid()) == -1) _exit(127); if (setuid(getuid()) == -1) _exit(127); execl("/bin/sh", "sh", "-c", command, (char *) NULL); _exit(127); default: /* parent */ do { p = waitpid(pid, &status, 0); } while (p == -1 && errno == EINTR); } if (OsSignal(SIGCHLD, csig) == SIG_ERR) { perror("signal"); return -1; } return p == -1 ? -1 : status; } static struct pid { struct pid *next; FILE *fp; int pid; } *pidlist; void * Popen(const char *command, const char *type) { struct pid *cur; FILE *iop; int pdes[2], pid; if (command == NULL || type == NULL) return NULL; if ((*type != 'r' && *type != 'w') || type[1]) return NULL; if ((cur = malloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { free(cur); return NULL; } /* Ignore the smart scheduler while this is going on */ #ifdef HAVE_SETITIMER if (SmartSchedulePause() < 0) { close(pdes[0]); close(pdes[1]); free(cur); perror("signal"); return NULL; } #endif switch (pid = fork()) { case -1: /* error */ close(pdes[0]); close(pdes[1]); free(cur); #ifdef HAVE_SETITIMER if (SmartScheduleEnable() < 0) perror("signal"); #endif return NULL; case 0: /* child */ if (setgid(getgid()) == -1) _exit(127); if (setuid(getuid()) == -1) _exit(127); if (*type == 'r') { if (pdes[1] != 1) { /* stdout */ dup2(pdes[1], 1); close(pdes[1]); } close(pdes[0]); } else { if (pdes[0] != 0) { /* stdin */ dup2(pdes[0], 0); close(pdes[0]); } close(pdes[1]); } execl("/bin/sh", "sh", "-c", command, (char *) NULL); _exit(127); } /* Avoid EINTR during stdio calls */ OsBlockSignals(); /* parent */ if (*type == 'r') { iop = fdopen(pdes[0], type); close(pdes[1]); } else { iop = fdopen(pdes[1], type); close(pdes[0]); } cur->fp = iop; cur->pid = pid; cur->next = pidlist; pidlist = cur; DebugF("Popen: `%s', fp = %p\n", command, iop); return iop; } /* fopen that drops privileges */ void * Fopen(const char *file, const char *type) { FILE *iop; #ifndef HAS_SAVED_IDS_AND_SETEUID struct pid *cur; int pdes[2], pid; if (file == NULL || type == NULL) return NULL; if ((*type != 'r' && *type != 'w') || type[1]) return NULL; if ((cur = malloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { free(cur); return NULL; } switch (pid = fork()) { case -1: /* error */ close(pdes[0]); close(pdes[1]); free(cur); return NULL; case 0: /* child */ if (setgid(getgid()) == -1) _exit(127); if (setuid(getuid()) == -1) _exit(127); if (*type == 'r') { if (pdes[1] != 1) { /* stdout */ dup2(pdes[1], 1); close(pdes[1]); } close(pdes[0]); } else { if (pdes[0] != 0) { /* stdin */ dup2(pdes[0], 0); close(pdes[0]); } close(pdes[1]); } execl("/bin/cat", "cat", file, (char *) NULL); _exit(127); } /* Avoid EINTR during stdio calls */ OsBlockSignals(); /* parent */ if (*type == 'r') { iop = fdopen(pdes[0], type); close(pdes[1]); } else { iop = fdopen(pdes[1], type); close(pdes[0]); } cur->fp = iop; cur->pid = pid; cur->next = pidlist; pidlist = cur; DebugF("Fopen(%s), fp = %p\n", file, iop); return iop; #else int ruid, euid; ruid = getuid(); euid = geteuid(); if (seteuid(ruid) == -1) { return NULL; } iop = fopen(file, type); if (seteuid(euid) == -1) { fclose(iop); return NULL; } return iop; #endif /* HAS_SAVED_IDS_AND_SETEUID */ } int Pclose(void *iop) { struct pid *cur, *last; int pstat; int pid; DebugF("Pclose: fp = %p\n", iop); fclose(iop); for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next) if (cur->fp == iop) break; if (cur == NULL) return -1; do { pid = waitpid(cur->pid, &pstat, 0); } while (pid == -1 && errno == EINTR); if (last == NULL) pidlist = cur->next; else last->next = cur->next; free(cur); /* allow EINTR again */ OsReleaseSignals(); #ifdef HAVE_SETITIMER if (SmartScheduleEnable() < 0) { perror("signal"); return -1; } #endif return pid == -1 ? -1 : pstat; } int Fclose(void *iop) { #ifdef HAS_SAVED_IDS_AND_SETEUID return fclose(iop); #else return Pclose(iop); #endif } #endif /* !WIN32 */ #ifdef WIN32 #include const char * Win32TempDir(void) { static char buffer[PATH_MAX]; if (GetTempPath(sizeof(buffer), buffer)) { int len; buffer[sizeof(buffer) - 1] = 0; len = strlen(buffer); if (len > 0) if (buffer[len - 1] == '\\') buffer[len - 1] = 0; return buffer; } if (getenv("TEMP") != NULL) return getenv("TEMP"); else if (getenv("TMP") != NULL) return getenv("TMP"); else return "/tmp"; } int System(const char *cmdline) { STARTUPINFO si; PROCESS_INFORMATION pi; DWORD dwExitCode; char *cmd = strdup(cmdline); ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); ZeroMemory(&pi, sizeof(pi)); if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi)) { LPVOID buffer; if (!FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &buffer, 0, NULL)) { ErrorF("[xkb] Starting '%s' failed!\n", cmdline); } else { ErrorF("[xkb] Starting '%s' failed: %s", cmdline, (char *) buffer); LocalFree(buffer); } free(cmd); return -1; } /* Wait until child process exits. */ WaitForSingleObject(pi.hProcess, INFINITE); GetExitCodeProcess(pi.hProcess, &dwExitCode); /* Close process and thread handles. */ CloseHandle(pi.hProcess); CloseHandle(pi.hThread); free(cmd); return dwExitCode; } #endif Bool PrivsElevated(void) { static Bool privsTested = FALSE; static Bool privsElevated = TRUE; if (!privsTested) { #if defined(WIN32) privsElevated = FALSE; #else if ((getuid() != geteuid()) || (getgid() != getegid())) { privsElevated = TRUE; } else { #if defined(HAVE_ISSETUGID) privsElevated = issetugid(); #elif defined(HAVE_GETRESUID) uid_t ruid, euid, suid; gid_t rgid, egid, sgid; if ((getresuid(&ruid, &euid, &suid) == 0) && (getresgid(&rgid, &egid, &sgid) == 0)) { privsElevated = (euid != suid) || (egid != sgid); } else { printf("Failed getresuid or getresgid"); /* Something went wrong, make defensive assumption */ privsElevated = TRUE; } #else if (getuid() == 0) { /* running as root: uid==euid==0 */ privsElevated = FALSE; } else { /* * If there are saved ID's the process might still be privileged * even though the above test succeeded. If issetugid() and * getresgid() aren't available, test this by trying to set * euid to 0. */ unsigned int oldeuid; oldeuid = geteuid(); if (seteuid(0) != 0) { privsElevated = FALSE; } else { if (seteuid(oldeuid) != 0) { FatalError("Failed to drop privileges. Exiting\n"); } privsElevated = TRUE; } } #endif } #endif privsTested = TRUE; } return privsElevated; } /* * CheckUserParameters: check for long command line arguments and long * environment variables. By default, these checks are only done when * the server's euid != ruid. In 3.3.x, these checks were done in an * external wrapper utility. */ /* Consider LD* variables insecure? */ #ifndef REMOVE_ENV_LD #define REMOVE_ENV_LD 1 #endif /* Remove long environment variables? */ #ifndef REMOVE_LONG_ENV #define REMOVE_LONG_ENV 1 #endif /* * Disallow stdout or stderr as pipes? It's possible to block the X server * when piping stdout+stderr to a pipe. * * Don't enable this because it looks like it's going to cause problems. */ #ifndef NO_OUTPUT_PIPES #define NO_OUTPUT_PIPES 0 #endif /* Check args and env only if running setuid (euid == 0 && euid != uid) ? */ #ifndef CHECK_EUID #ifndef WIN32 #define CHECK_EUID 1 #else #define CHECK_EUID 0 #endif #endif /* * Maybe the locale can be faked to make isprint(3) report that everything * is printable? Avoid it by default. */ #ifndef USE_ISPRINT #define USE_ISPRINT 0 #endif #define MAX_ARG_LENGTH 128 #define MAX_ENV_LENGTH 256 #define MAX_ENV_PATH_LENGTH 2048 /* Limit for *PATH and TERMCAP */ #if USE_ISPRINT #include #define checkPrintable(c) isprint(c) #else #define checkPrintable(c) (((c) & 0x7f) >= 0x20 && ((c) & 0x7f) != 0x7f) #endif enum BadCode { NotBad = 0, UnsafeArg, ArgTooLong, UnprintableArg, EnvTooLong, OutputIsPipe, InternalError }; #if defined(VENDORSUPPORT) #define BUGADDRESS VENDORSUPPORT #elif defined(BUILDERADDR) #define BUGADDRESS BUILDERADDR #else #define BUGADDRESS "xorg@freedesktop.org" #endif void CheckUserParameters(int argc, char **argv, char **envp) { enum BadCode bad = NotBad; int i = 0, j; char *a, *e = NULL; #if CHECK_EUID if (PrivsElevated()) #endif { /* Check each argv[] */ for (i = 1; i < argc; i++) { if (strcmp(argv[i], "-fp") == 0) { i++; /* continue with next argument. skip the length check */ if (i >= argc) break; } else { if (strlen(argv[i]) > MAX_ARG_LENGTH) { bad = ArgTooLong; break; } } a = argv[i]; while (*a) { if (checkPrintable(*a) == 0) { bad = UnprintableArg; break; } a++; } if (bad) break; } if (!bad) { /* Check each envp[] */ for (i = 0; envp[i]; i++) { /* Check for bad environment variables and values */ #if REMOVE_ENV_LD while (envp[i] && (strncmp(envp[i], "LD", 2) == 0)) { for (j = i; envp[j]; j++) { envp[j] = envp[j + 1]; } } #endif if (envp[i] && (strlen(envp[i]) > MAX_ENV_LENGTH)) { #if REMOVE_LONG_ENV for (j = i; envp[j]; j++) { envp[j] = envp[j + 1]; } i--; #else char *eq; int len; eq = strchr(envp[i], '='); if (!eq) continue; len = eq - envp[i]; e = strndup(envp[i], len); if (!e) { bad = InternalError; break; } if (len >= 4 && (strcmp(e + len - 4, "PATH") == 0 || strcmp(e, "TERMCAP") == 0)) { if (strlen(envp[i]) > MAX_ENV_PATH_LENGTH) { bad = EnvTooLong; break; } else { free(e); } } else { bad = EnvTooLong; break; } #endif } } } #if NO_OUTPUT_PIPES if (!bad) { struct stat buf; if (fstat(fileno(stdout), &buf) == 0 && S_ISFIFO(buf.st_mode)) bad = OutputIsPipe; if (fstat(fileno(stderr), &buf) == 0 && S_ISFIFO(buf.st_mode)) bad = OutputIsPipe; } #endif } switch (bad) { case NotBad: return; case UnsafeArg: ErrorF("Command line argument number %d is unsafe\n", i); break; case ArgTooLong: ErrorF("Command line argument number %d is too long\n", i); break; case UnprintableArg: ErrorF("Command line argument number %d contains unprintable" " characters\n", i); break; case EnvTooLong: ErrorF("Environment variable `%s' is too long\n", e); break; case OutputIsPipe: ErrorF("Stdout and/or stderr is a pipe\n"); break; case InternalError: ErrorF("Internal Error\n"); break; default: ErrorF("Unknown error\n"); break; } FatalError("X server aborted because of unsafe environment\n"); } /* * CheckUserAuthorization: check if the user is allowed to start the * X server. This usually means some sort of PAM checking, and it is * usually only done for setuid servers (uid != euid). */ #ifdef USE_PAM #include #include #include #endif /* USE_PAM */ void CheckUserAuthorization(void) { #ifdef USE_PAM static struct pam_conv conv = { misc_conv, NULL }; pam_handle_t *pamh = NULL; struct passwd *pw; int retval; if (getuid() != geteuid()) { pw = getpwuid(getuid()); if (pw == NULL) FatalError("getpwuid() failed for uid %d\n", getuid()); retval = pam_start("xserver", pw->pw_name, &conv, &pamh); if (retval != PAM_SUCCESS) FatalError("pam_start() failed.\n" "\tMissing or mangled PAM config file or module?\n"); retval = pam_authenticate(pamh, 0); if (retval != PAM_SUCCESS) { pam_end(pamh, retval); FatalError("PAM authentication failed, cannot start X server.\n" "\tPerhaps you do not have console ownership?\n"); } retval = pam_acct_mgmt(pamh, 0); if (retval != PAM_SUCCESS) { pam_end(pamh, retval); FatalError("PAM authentication failed, cannot start X server.\n" "\tPerhaps you do not have console ownership?\n"); } /* this is not a session, so do not do session management */ pam_end(pamh, PAM_SUCCESS); } #endif } /* * Tokenize a string into a NULL terminated array of strings. Always returns * an allocated array unless an error occurs. */ char ** xstrtokenize(const char *str, const char *separators) { char **list, **nlist; char *tok, *tmp; unsigned num = 0, n; if (!str) return NULL; list = calloc(1, sizeof(*list)); if (!list) return NULL; tmp = strdup(str); if (!tmp) goto error; for (tok = strtok(tmp, separators); tok; tok = strtok(NULL, separators)) { nlist = reallocarray(list, num + 2, sizeof(*list)); if (!nlist) goto error; list = nlist; list[num] = strdup(tok); if (!list[num]) goto error; list[++num] = NULL; } free(tmp); return list; error: free(tmp); for (n = 0; n < num; n++) free(list[n]); free(list); return NULL; } /* Format a signed number into a string in a signal safe manner. The string * should be at least 21 characters in order to handle all int64_t values. */ void FormatInt64(int64_t num, char *string) { if (num < 0) { string[0] = '-'; num *= -1; string++; } FormatUInt64(num, string); } /* Format a number into a string in a signal safe manner. The string should be * at least 21 characters in order to handle all uint64_t values. */ void FormatUInt64(uint64_t num, char *string) { uint64_t divisor; int len; int i; for (len = 1, divisor = 10; len < 20 && num / divisor; len++, divisor *= 10); for (i = len, divisor = 1; i > 0; i--, divisor *= 10) string[i - 1] = '0' + ((num / divisor) % 10); string[len] = '\0'; } /** * Format a double number as %.2f. */ void FormatDouble(double dbl, char *string) { int slen = 0; uint64_t frac; frac = (dbl > 0 ? dbl : -dbl) * 100.0 + 0.5; frac %= 100; /* write decimal part to string */ if (dbl < 0 && dbl > -1) string[slen++] = '-'; FormatInt64((int64_t)dbl, &string[slen]); while(string[slen] != '\0') slen++; /* append fractional part, but only if we have enough characters. We * expect string to be 21 chars (incl trailing \0) */ if (slen <= 17) { string[slen++] = '.'; if (frac < 10) string[slen++] = '0'; FormatUInt64(frac, &string[slen]); } } /* Format a number into a hexadecimal string in a signal safe manner. The string * should be at least 17 characters in order to handle all uint64_t values. */ void FormatUInt64Hex(uint64_t num, char *string) { uint64_t divisor; int len; int i; for (len = 1, divisor = 0x10; len < 16 && num / divisor; len++, divisor *= 0x10); for (i = len, divisor = 1; i > 0; i--, divisor *= 0x10) { int val = (num / divisor) % 0x10; if (val < 10) string[i - 1] = '0' + val; else string[i - 1] = 'a' + val - 10; } string[len] = '\0'; } #if !defined(WIN32) || defined(__CYGWIN__) /* Move a file descriptor out of the way of our select mask; this * is useful for file descriptors which will never appear in the * select mask to avoid reducing the number of clients that can * connect to the server */ int os_move_fd(int fd) { int newfd; #ifdef F_DUPFD_CLOEXEC newfd = fcntl(fd, F_DUPFD_CLOEXEC, MAXCLIENTS); #else newfd = fcntl(fd, F_DUPFD, MAXCLIENTS); #endif if (newfd < 0) return fd; #ifndef F_DUPFD_CLOEXEC fcntl(newfd, F_SETFD, FD_CLOEXEC); #endif close(fd); return newfd; } #endif xorg-server-21.1.16/os/xdmauth.c0000644000175000017500000003016714757411105012101 /* Copyright 1988, 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. */ /* * XDM-AUTHENTICATION-1 (XDMCP authentication) and * XDM-AUTHORIZATION-1 (client authorization) protocols * * Author: Keith Packard, MIT X Consortium */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #include "os.h" #include "osdep.h" #include "dixstruct.h" #ifdef HASXDMAUTH static Bool authFromXDMCP; #ifdef XDMCP #include #undef REQUEST #include /* XDM-AUTHENTICATION-1 */ static XdmAuthKeyRec privateKey; static char XdmAuthenticationName[] = "XDM-AUTHENTICATION-1"; #define XdmAuthenticationNameLen (sizeof XdmAuthenticationName - 1) static XdmAuthKeyRec global_rho; static Bool XdmAuthenticationValidator(ARRAY8Ptr privateData, ARRAY8Ptr incomingData, xdmOpCode packet_type) { XdmAuthKeyPtr incoming; XdmcpUnwrap(incomingData->data, (unsigned char *) &privateKey, incomingData->data, incomingData->length); if (packet_type == ACCEPT) { if (incomingData->length != 8) return FALSE; incoming = (XdmAuthKeyPtr) incomingData->data; XdmcpDecrementKey(incoming); return XdmcpCompareKeys(incoming, &global_rho); } return FALSE; } static Bool XdmAuthenticationGenerator(ARRAY8Ptr privateData, ARRAY8Ptr outgoingData, xdmOpCode packet_type) { outgoingData->length = 0; outgoingData->data = 0; if (packet_type == REQUEST) { if (XdmcpAllocARRAY8(outgoingData, 8)) XdmcpWrap((unsigned char *) &global_rho, (unsigned char *) &privateKey, outgoingData->data, 8); } return TRUE; } static Bool XdmAuthenticationAddAuth(int name_len, const char *name, int data_len, char *data) { Bool ret; XdmcpUnwrap((unsigned char *) data, (unsigned char *) &privateKey, (unsigned char *) data, data_len); authFromXDMCP = TRUE; ret = AddAuthorization(name_len, name, data_len, data); authFromXDMCP = FALSE; return ret; } #define atox(c) ('0' <= c && c <= '9' ? c - '0' : \ 'a' <= c && c <= 'f' ? c - 'a' + 10 : \ 'A' <= c && c <= 'F' ? c - 'A' + 10 : -1) static int HexToBinary(const char *in, char *out, int len) { int top, bottom; while (len > 0) { top = atox(in[0]); if (top == -1) return 0; bottom = atox(in[1]); if (bottom == -1) return 0; *out++ = (top << 4) | bottom; in += 2; len -= 2; } if (len) return 0; *out++ = '\0'; return 1; } void XdmAuthenticationInit(const char *cookie, int cookie_len) { memset(privateKey.data, 0, 8); if (!strncmp(cookie, "0x", 2) || !strncmp(cookie, "0X", 2)) { if (cookie_len > 2 + 2 * 8) cookie_len = 2 + 2 * 8; HexToBinary(cookie + 2, (char *) privateKey.data, cookie_len - 2); } else { if (cookie_len > 7) cookie_len = 7; memmove(privateKey.data + 1, cookie, cookie_len); } XdmcpGenerateKey(&global_rho); XdmcpRegisterAuthentication(XdmAuthenticationName, XdmAuthenticationNameLen, (char *) &global_rho, sizeof(global_rho), (ValidatorFunc) XdmAuthenticationValidator, (GeneratorFunc) XdmAuthenticationGenerator, (AddAuthorFunc) XdmAuthenticationAddAuth); } #endif /* XDMCP */ /* XDM-AUTHORIZATION-1 */ typedef struct _XdmAuthorization { struct _XdmAuthorization *next; XdmAuthKeyRec rho; XdmAuthKeyRec key; XID id; } XdmAuthorizationRec, *XdmAuthorizationPtr; static XdmAuthorizationPtr xdmAuth; typedef struct _XdmClientAuth { struct _XdmClientAuth *next; XdmAuthKeyRec rho; char client[6]; long time; } XdmClientAuthRec, *XdmClientAuthPtr; static XdmClientAuthPtr xdmClients; static long clockOffset; static Bool gotClock; #define TwentyMinutes (20 * 60) #define TwentyFiveMinutes (25 * 60) static Bool XdmClientAuthCompare(const XdmClientAuthPtr a, const XdmClientAuthPtr b) { int i; if (!XdmcpCompareKeys(&a->rho, &b->rho)) return FALSE; for (i = 0; i < 6; i++) if (a->client[i] != b->client[i]) return FALSE; return a->time == b->time; } static void XdmClientAuthDecode(const unsigned char *plain, XdmClientAuthPtr auth) { int i, j; j = 0; for (i = 0; i < 8; i++) { auth->rho.data[i] = plain[j]; ++j; } for (i = 0; i < 6; i++) { auth->client[i] = plain[j]; ++j; } auth->time = 0; for (i = 0; i < 4; i++) { auth->time |= plain[j] << ((3 - i) << 3); j++; } } static void XdmClientAuthTimeout(long now) { XdmClientAuthPtr client, next, prev; prev = 0; for (client = xdmClients; client; client = next) { next = client->next; if (labs(now - client->time) > TwentyFiveMinutes) { if (prev) prev->next = next; else xdmClients = next; free(client); } else prev = client; } } static XdmClientAuthPtr XdmAuthorizationValidate(unsigned char *plain, int length, XdmAuthKeyPtr rho, ClientPtr xclient, const char **reason) { XdmClientAuthPtr client, existing; long now; int i; if (length != (192 / 8)) { if (reason) *reason = "Bad XDM authorization key length"; return NULL; } client = malloc(sizeof(XdmClientAuthRec)); if (!client) return NULL; XdmClientAuthDecode(plain, client); if (!XdmcpCompareKeys(&client->rho, rho)) { free(client); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed key comparison)"; return NULL; } for (i = 18; i < 24; i++) if (plain[i] != 0) { free(client); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed NULL check)"; return NULL; } if (xclient) { int family, addr_len; Xtransaddr *addr; if (_XSERVTransGetPeerAddr(((OsCommPtr) xclient->osPrivate)->trans_conn, &family, &addr_len, &addr) == 0 && _XSERVTransConvertAddress(&family, &addr_len, &addr) == 0) { #if defined(TCPCONN) if (family == FamilyInternet && memcmp((char *) addr, client->client, 4) != 0) { free(client); free(addr); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed address comparison)"; return NULL; } #endif free(addr); } } now = time(0); if (!gotClock) { clockOffset = client->time - now; gotClock = TRUE; } now += clockOffset; XdmClientAuthTimeout(now); if (labs(client->time - now) > TwentyMinutes) { free(client); if (reason) *reason = "Excessive XDM-AUTHORIZATION-1 time offset"; return NULL; } for (existing = xdmClients; existing; existing = existing->next) { if (XdmClientAuthCompare(existing, client)) { free(client); if (reason) *reason = "XDM authorization key matches an existing client!"; return NULL; } } return client; } int XdmAddCookie(unsigned short data_length, const char *data, XID id) { XdmAuthorizationPtr new; unsigned char *rho_bits, *key_bits; switch (data_length) { case 16: /* auth from files is 16 bytes long */ #ifdef XDMCP if (authFromXDMCP) { /* R5 xdm sent bogus authorization data in the accept packet, * but we can recover */ rho_bits = global_rho.data; key_bits = (unsigned char *) data; key_bits[0] = '\0'; } else #endif { rho_bits = (unsigned char *) data; key_bits = (unsigned char *) (data + 8); } break; #ifdef XDMCP case 8: /* auth from XDMCP is 8 bytes long */ rho_bits = global_rho.data; key_bits = (unsigned char *) data; break; #endif default: return 0; } /* the first octet of the key must be zero */ if (key_bits[0] != '\0') return 0; new = malloc(sizeof(XdmAuthorizationRec)); if (!new) return 0; new->next = xdmAuth; xdmAuth = new; memmove(new->key.data, key_bits, (int) 8); memmove(new->rho.data, rho_bits, (int) 8); new->id = id; return 1; } XID XdmCheckCookie(unsigned short cookie_length, const char *cookie, ClientPtr xclient, const char **reason) { XdmAuthorizationPtr auth; XdmClientAuthPtr client; unsigned char *plain; /* Auth packets must be a multiple of 8 bytes long */ if (cookie_length & 7) return (XID) -1; plain = malloc(cookie_length); if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth = auth->next) { XdmcpUnwrap((unsigned char *) cookie, (unsigned char *) &auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate(plain, cookie_length, &auth->rho, xclient, reason)) != NULL) { client->next = xdmClients; xdmClients = client; free(plain); return auth->id; } } free(plain); return (XID) -1; } int XdmResetCookie(void) { XdmAuthorizationPtr auth, next_auth; XdmClientAuthPtr client, next_client; for (auth = xdmAuth; auth; auth = next_auth) { next_auth = auth->next; free(auth); } xdmAuth = 0; for (client = xdmClients; client; client = next_client) { next_client = client->next; free(client); } xdmClients = (XdmClientAuthPtr) 0; return 1; } int XdmFromID(XID id, unsigned short *data_lenp, char **datap) { XdmAuthorizationPtr auth; for (auth = xdmAuth; auth; auth = auth->next) { if (id == auth->id) { *data_lenp = 16; *datap = (char *) &auth->rho; return 1; } } return 0; } int XdmRemoveCookie(unsigned short data_length, const char *data) { XdmAuthorizationPtr auth; XdmAuthKeyPtr key_bits, rho_bits; switch (data_length) { case 16: rho_bits = (XdmAuthKeyPtr) data; key_bits = (XdmAuthKeyPtr) (data + 8); break; #ifdef XDMCP case 8: rho_bits = &global_rho; key_bits = (XdmAuthKeyPtr) data; break; #endif default: return 0; } for (auth = xdmAuth; auth; auth = auth->next) { if (XdmcpCompareKeys(rho_bits, &auth->rho) && XdmcpCompareKeys(key_bits, &auth->key)) { xdmAuth = auth->next; free(auth); return 1; } } return 0; } #endif xorg-server-21.1.16/os/xsha1.c0000644000175000017500000001374214757411105011453 /* Copyright © 2007 Carl Worth * Copyright © 2009 Jeremy Huddleston, Julien Cristau, and Matthieu Herrb * Copyright © 2009-2010 Mikhail Gusarov * Copyright © 2012 Yaakov Selkowitz and Keith Packard * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "os.h" #include "xsha1.h" #if defined(HAVE_SHA1_IN_LIBMD) /* Use libmd for SHA1 */ \ || defined(HAVE_SHA1_IN_LIBC) /* Use libc for SHA1 */ #if defined(__DragonFly__) || defined(__FreeBSD__) #include #define SHA1End SHA1_End #define SHA1File SHA1_File #define SHA1Final SHA1_Final #define SHA1Init SHA1_Init #define SHA1Update SHA1_Update #else #include #endif void * x_sha1_init(void) { SHA1_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; SHA1Init(ctx); return ctx; } int x_sha1_update(void *ctx, void *data, int size) { SHA1_CTX *sha1_ctx = ctx; SHA1Update(sha1_ctx, data, size); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { SHA1_CTX *sha1_ctx = ctx; SHA1Final(result, sha1_ctx); free(sha1_ctx); return 1; } #elif defined(HAVE_SHA1_IN_COMMONCRYPTO) /* Use CommonCrypto for SHA1 */ #include void * x_sha1_init(void) { CC_SHA1_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; CC_SHA1_Init(ctx); return ctx; } int x_sha1_update(void *ctx, void *data, int size) { CC_SHA1_CTX *sha1_ctx = ctx; CC_SHA1_Update(sha1_ctx, data, size); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { CC_SHA1_CTX *sha1_ctx = ctx; CC_SHA1_Final(result, sha1_ctx); free(sha1_ctx); return 1; } #elif defined(HAVE_SHA1_IN_CRYPTOAPI) /* Use CryptoAPI for SHA1 */ #define WIN32_LEAN_AND_MEAN #include #include static HCRYPTPROV hProv; void * x_sha1_init(void) { HCRYPTHASH *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; CryptAcquireContext(&hProv, NULL, MS_DEF_PROV, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT); CryptCreateHash(hProv, CALG_SHA1, 0, 0, ctx); return ctx; } int x_sha1_update(void *ctx, void *data, int size) { HCRYPTHASH *hHash = ctx; CryptHashData(*hHash, data, size, 0); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { HCRYPTHASH *hHash = ctx; DWORD len = 20; CryptGetHashParam(*hHash, HP_HASHVAL, result, &len, 0); CryptDestroyHash(*hHash); CryptReleaseContext(hProv, 0); free(ctx); return 1; } #elif defined(HAVE_SHA1_IN_LIBNETTLE) /* Use libnettle for SHA1 */ #include void * x_sha1_init(void) { struct sha1_ctx *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; sha1_init(ctx); return ctx; } int x_sha1_update(void *ctx, void *data, int size) { sha1_update(ctx, size, data); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { sha1_digest(ctx, 20, result); free(ctx); return 1; } #elif defined(HAVE_SHA1_IN_LIBGCRYPT) /* Use libgcrypt for SHA1 */ #include void * x_sha1_init(void) { static int init; gcry_md_hd_t h; gcry_error_t err; if (!init) { if (!gcry_check_version(NULL)) return NULL; gcry_control(GCRYCTL_DISABLE_SECMEM, 0); gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); init = 1; } err = gcry_md_open(&h, GCRY_MD_SHA1, 0); if (err) return NULL; return h; } int x_sha1_update(void *ctx, void *data, int size) { gcry_md_hd_t h = ctx; gcry_md_write(h, data, size); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { gcry_md_hd_t h = ctx; memcpy(result, gcry_md_read(h, GCRY_MD_SHA1), 20); gcry_md_close(h); return 1; } #elif defined(HAVE_SHA1_IN_LIBSHA1) /* Use libsha1 */ #include void * x_sha1_init(void) { sha1_ctx *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; sha1_begin(ctx); return ctx; } int x_sha1_update(void *ctx, void *data, int size) { sha1_hash(data, size, ctx); return 1; } int x_sha1_final(void *ctx, unsigned char result[20]) { sha1_end(result, ctx); free(ctx); return 1; } #else /* Use OpenSSL's libcrypto */ #include /* buggy openssl/sha.h wants size_t */ #include void * x_sha1_init(void) { int ret; SHA_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; ret = SHA1_Init(ctx); if (!ret) { free(ctx); return NULL; } return ctx; } int x_sha1_update(void *ctx, void *data, int size) { int ret; SHA_CTX *sha_ctx = ctx; ret = SHA1_Update(sha_ctx, data, size); if (!ret) free(sha_ctx); return ret; } int x_sha1_final(void *ctx, unsigned char result[20]) { int ret; SHA_CTX *sha_ctx = ctx; ret = SHA1_Final(result, sha_ctx); free(sha_ctx); return ret; } #endif xorg-server-21.1.16/os/xstrans.c0000644000175000017500000000047714757411105012132 #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* ErrorF is used by xtrans */ #ifndef HAVE_DIX_CONFIG_H extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1, 2); #endif #define TRANS_REOPEN #define TRANS_SERVER #define XSERV_t #include xorg-server-21.1.16/os/xprintf.c0000644000175000017500000001773714757411105012131 /** * @file * * @section DESCRIPTION * * These functions provide a portable implementation of the common (but not * yet universal) asprintf & vasprintf routines to allocate a buffer big * enough to sprintf the arguments to. The XNF variants terminate the server * if the allocation fails. */ /* * Copyright (c) 2004 Alexander Gottwald * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "os.h" #include #include #include #include #ifdef asprintf #undef asprintf #endif #ifdef vasprintf #undef vasprintf #endif #ifndef va_copy #ifdef __va_copy #define va_copy __va_copy #else #error "no working va_copy was found" #endif #endif /** * Varargs sprintf that allocates a string buffer the right size for * the pattern & data provided and prints the requested data to it. * * @param ret Pointer to which the newly allocated buffer is written * (contents undefined on error) * @param format printf style format string * @param va variable argument list * @return size of allocated buffer, or -1 on error. */ int Xvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va) { #ifdef HAVE_VASPRINTF return vasprintf(ret, format, va); #else int size; va_list va2; va_copy(va2, va); size = vsnprintf(NULL, 0, format, va2); va_end(va2); *ret = malloc(size + 1); if (*ret == NULL) return -1; vsnprintf(*ret, size + 1, format, va); (*ret)[size] = 0; return size; #endif } #ifndef HAVE_VASPRINTF #define vasprintf Xvasprintf #endif /** * sprintf that allocates a string buffer the right size for * the pattern & data provided and prints the requested data to it. * * @param ret Pointer to which the newly allocated buffer is written * (contents undefined on error) * @param format printf style format string * @param ... arguments for specified format * @return size of allocated buffer, or -1 on error. */ int Xasprintf(char **ret, const char *_X_RESTRICT_KYWD format, ...) { int size; va_list va; va_start(va, format); size = vasprintf(ret, format, va); va_end(va); return size; } /** * Varargs sprintf that allocates a string buffer the right size for * the pattern & data provided and prints the requested data to it. * On failure, issues a FatalError message and aborts the server. * * @param ret Pointer to which the newly allocated buffer is written * (contents undefined on error) * @param format printf style format string * @param va variable argument list * @return size of allocated buffer */ int XNFvasprintf(char **ret, const char *_X_RESTRICT_KYWD format, va_list va) { int size = vasprintf(ret, format, va); if ((size == -1) || (*ret == NULL)) { FatalError("XNFvasprintf failed: %s", strerror(errno)); } return size; } /** * sprintf that allocates a string buffer the right size for * the pattern & data provided and prints the requested data to it. * On failure, issues a FatalError message and aborts the server. * * @param ret Pointer to which the newly allocated buffer is written * (contents undefined on error) * @param format printf style format string * @param ... arguments for specified format * @return size of allocated buffer */ int XNFasprintf(char **ret, const char *_X_RESTRICT_KYWD format, ...) { int size; va_list va; va_start(va, format); size = XNFvasprintf(ret, format, va); va_end(va); return size; } /** * Varargs snprintf that returns the actual number of bytes (excluding final * '\0') that were copied into the buffer. * This is opposed to the normal sprintf() usually returns the number of bytes * that would have been written. * * @param s buffer to copy into * @param n size of buffer s * @param format printf style format string * @param va variable argument list * @return number of bytes actually copied, excluding final '\0' */ int Xvscnprintf(char *s, int n, const char *format, va_list args) { int x; if (n == 0) return 0; x = vsnprintf(s, n , format, args); return (x >= n) ? (n - 1) : x; } /** * snprintf that returns the actual number of bytes (excluding final '\0') that * were copied into the buffer. * This is opposed to the normal sprintf() usually returns the number of bytes * that would have been written. * * @param s buffer to copy into * @param n size of buffer s * @param format printf style format string * @param ... arguments for specified format * @return number of bytes actually copied, excluding final '\0' */ int Xscnprintf(char *s, int n, const char *format, ...) { int x; va_list ap; va_start(ap, format); x = Xvscnprintf(s, n, format, ap); va_end(ap); return x; } /* Old api, now deprecated, may be removed in the future */ char * Xvprintf(const char *format, va_list va) { char *ret; if (vasprintf(&ret, format, va) == -1) ret = NULL; return ret; } char * Xprintf(const char *format, ...) { char *ret; va_list va; va_start(va, format); if (vasprintf(&ret, format, va) == -1) ret = NULL; va_end(va); return ret; } char * XNFvprintf(const char *format, va_list va) { char *ret; XNFvasprintf(&ret, format, va); return ret; } char * XNFprintf(const char *format, ...) { char *ret; va_list va; va_start(va, format); XNFvasprintf(&ret, format, va); va_end(va); return ret; } xorg-server-21.1.16/os/log.c0000644000175000017500000007161514757411105011213 /* 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, Copyright 1994 Quarterdeck Office Systems. 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 names of Digital and Quarterdeck not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND QUARTERDECK DISCLAIM 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. */ /* * Copyright (c) 1997-2003 by The XFree86 Project, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include /* for malloc() */ #include #include "input.h" #include "opaque.h" #ifdef WIN32 #include #define getpid(x) _getpid(x) #endif #ifdef XF86BIGFONT #include "xf86bigfontsrv.h" #endif #ifdef __clang__ #pragma clang diagnostic ignored "-Wformat-nonliteral" #endif #ifdef DDXOSVERRORF void (*OsVendorVErrorFProc) (const char *, va_list args) = NULL; #endif /* Default logging parameters. */ #ifndef DEFAULT_LOG_VERBOSITY #define DEFAULT_LOG_VERBOSITY 0 #endif #ifndef DEFAULT_LOG_FILE_VERBOSITY #define DEFAULT_LOG_FILE_VERBOSITY 3 #endif static FILE *logFile = NULL; static int logFileFd = -1; static Bool logFlush = FALSE; static Bool logSync = FALSE; static int logVerbosity = DEFAULT_LOG_VERBOSITY; static int logFileVerbosity = DEFAULT_LOG_FILE_VERBOSITY; /* Buffer to information logged before the log file is opened. */ static char *saveBuffer = NULL; static int bufferSize = 0, bufferUnused = 0, bufferPos = 0; static Bool needBuffer = TRUE; #ifdef __APPLE__ static char __crashreporter_info_buff__[4096] = { 0 }; static const char *__crashreporter_info__ __attribute__ ((__used__)) = &__crashreporter_info_buff__[0]; asm(".desc ___crashreporter_info__, 0x10"); #endif /* Prefix strings for log messages. */ #ifndef X_UNKNOWN_STRING #define X_UNKNOWN_STRING "(\?\?)" #endif #ifndef X_PROBE_STRING #define X_PROBE_STRING "(--)" #endif #ifndef X_CONFIG_STRING #define X_CONFIG_STRING "(**)" #endif #ifndef X_DEFAULT_STRING #define X_DEFAULT_STRING "(==)" #endif #ifndef X_CMDLINE_STRING #define X_CMDLINE_STRING "(++)" #endif #ifndef X_NOTICE_STRING #define X_NOTICE_STRING "(!!)" #endif #ifndef X_ERROR_STRING #define X_ERROR_STRING "(EE)" #endif #ifndef X_WARNING_STRING #define X_WARNING_STRING "(WW)" #endif #ifndef X_INFO_STRING #define X_INFO_STRING "(II)" #endif #ifndef X_NOT_IMPLEMENTED_STRING #define X_NOT_IMPLEMENTED_STRING "(NI)" #endif #ifndef X_DEBUG_STRING #define X_DEBUG_STRING "(DB)" #endif #ifndef X_NONE_STRING #define X_NONE_STRING "" #endif static size_t strlen_sigsafe(const char *s) { size_t len; for (len = 0; s[len]; len++); return len; } /* * LogFilePrep is called to setup files for logging, including getting * an old file out of the way, but it doesn't actually open the file, * since it may be used for renaming a file we're already logging to. */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-nonliteral" static char * LogFilePrep(const char *fname, const char *backup, const char *idstring) { char *logFileName = NULL; /* the format string below is controlled by the user, this code should never be called with elevated privileges */ if (asprintf(&logFileName, fname, idstring) == -1) FatalError("Cannot allocate space for the log file name\n"); if (backup && *backup) { struct stat buf; if (!stat(logFileName, &buf) && S_ISREG(buf.st_mode)) { char *suffix; char *oldLog; if ((asprintf(&suffix, backup, idstring) == -1) || (asprintf(&oldLog, "%s%s", logFileName, suffix) == -1)) { FatalError("Cannot allocate space for the log file name\n"); } free(suffix); if (rename(logFileName, oldLog) == -1) { FatalError("Cannot move old log file \"%s\" to \"%s\"\n", logFileName, oldLog); } free(oldLog); } } else { if (remove(logFileName) != 0 && errno != ENOENT) { FatalError("Cannot remove old log file \"%s\": %s\n", logFileName, strerror(errno)); } } return logFileName; } #pragma GCC diagnostic pop /* * LogInit is called to start logging to a file. It is also called (with * NULL arguments) when logging to a file is not wanted. It must always be * called, otherwise log messages will continue to accumulate in a buffer. * * %s, if present in the fname or backup strings, is expanded to the display * string (or to a string containing the pid if the display is not yet set). */ static char *saved_log_fname; static char *saved_log_backup; static char *saved_log_tempname; const char * LogInit(const char *fname, const char *backup) { char *logFileName = NULL; if (fname && *fname) { if (displayfd != -1) { /* Display isn't set yet, so we can't use it in filenames yet. */ char pidstring[32]; snprintf(pidstring, sizeof(pidstring), "pid-%ld", (unsigned long) getpid()); logFileName = LogFilePrep(fname, backup, pidstring); saved_log_tempname = logFileName; /* Save the patterns for use when the display is named. */ saved_log_fname = strdup(fname); if (backup == NULL) saved_log_backup = NULL; else saved_log_backup = strdup(backup); } else logFileName = LogFilePrep(fname, backup, display); if ((logFile = fopen(logFileName, "w")) == NULL) FatalError("Cannot open log file \"%s\"\n", logFileName); setvbuf(logFile, NULL, _IONBF, 0); logFileFd = fileno(logFile); /* Flush saved log information. */ if (saveBuffer && bufferSize > 0) { fwrite(saveBuffer, bufferPos, 1, logFile); fflush(logFile); #ifndef WIN32 fsync(fileno(logFile)); #endif } } /* * Unconditionally free the buffer, and flag that the buffer is no longer * needed. */ if (saveBuffer && bufferSize > 0) { free(saveBuffer); saveBuffer = NULL; bufferSize = 0; } needBuffer = FALSE; return logFileName; } void LogSetDisplay(void) { if (saved_log_fname && strstr(saved_log_fname, "%s")) { char *logFileName; logFileName = LogFilePrep(saved_log_fname, saved_log_backup, display); if (rename(saved_log_tempname, logFileName) == 0) { LogMessageVerb(X_PROBED, 0, "Log file renamed from \"%s\" to \"%s\"\n", saved_log_tempname, logFileName); if (strlen(saved_log_tempname) >= strlen(logFileName)) strncpy(saved_log_tempname, logFileName, strlen(saved_log_tempname)); } else { ErrorF("Failed to rename log file \"%s\" to \"%s\": %s\n", saved_log_tempname, logFileName, strerror(errno)); } /* free newly allocated string - can't free old one since existing pointers to it may exist in DDX callers. */ free(logFileName); free(saved_log_fname); free(saved_log_backup); } } void LogClose(enum ExitCode error) { if (logFile) { int msgtype = (error == EXIT_NO_ERROR) ? X_INFO : X_ERROR; LogMessageVerbSigSafe(msgtype, -1, "Server terminated %s (%d). Closing log file.\n", (error == EXIT_NO_ERROR) ? "successfully" : "with error", error); fclose(logFile); logFile = NULL; logFileFd = -1; } } Bool LogSetParameter(LogParameter param, int value) { switch (param) { case XLOG_FLUSH: logFlush = value ? TRUE : FALSE; return TRUE; case XLOG_SYNC: logSync = value ? TRUE : FALSE; return TRUE; case XLOG_VERBOSITY: logVerbosity = value; return TRUE; case XLOG_FILE_VERBOSITY: logFileVerbosity = value; return TRUE; default: return FALSE; } } enum { LMOD_LONG = 0x1, LMOD_LONGLONG = 0x2, LMOD_SHORT = 0x4, LMOD_SIZET = 0x8, }; /** * Parse non-digit length modifiers and set the corresponding flag in * flags_return. * * @return the number of bytes parsed */ static int parse_length_modifier(const char *format, size_t len, int *flags_return) { int idx = 0; int length_modifier = 0; while (idx < len) { switch (format[idx]) { case 'l': BUG_RETURN_VAL(length_modifier & LMOD_SHORT, 0); if (length_modifier & LMOD_LONG) length_modifier |= LMOD_LONGLONG; else length_modifier |= LMOD_LONG; break; case 'h': BUG_RETURN_VAL(length_modifier & (LMOD_LONG|LMOD_LONGLONG), 0); length_modifier |= LMOD_SHORT; /* gcc says 'short int' is promoted to 'int' when * passed through '...', so ignored during * processing */ break; case 'z': length_modifier |= LMOD_SIZET; break; default: goto out; } idx++; } out: *flags_return = length_modifier; return idx; } /** * Signal-safe snprintf, with some limitations over snprintf. Be careful * which directives you use. */ static int vpnprintf(char *string, int size_in, const char *f, va_list args) { int f_idx = 0; int s_idx = 0; int f_len = strlen_sigsafe(f); char *string_arg; char number[21]; int p_len; int i; uint64_t ui; int64_t si; size_t size = size_in; int precision; for (; f_idx < f_len && s_idx < size - 1; f_idx++) { int length_modifier = 0; if (f[f_idx] != '%') { string[s_idx++] = f[f_idx]; continue; } f_idx++; /* silently swallow minimum field width */ if (f[f_idx] == '*') { f_idx++; va_arg(args, int); } else { while (f_idx < f_len && ((f[f_idx] >= '0' && f[f_idx] <= '9'))) f_idx++; } /* is there a precision? */ precision = size; if (f[f_idx] == '.') { f_idx++; if (f[f_idx] == '*') { f_idx++; /* precision is supplied in an int argument */ precision = va_arg(args, int); } else { /* silently swallow precision digits */ while (f_idx < f_len && ((f[f_idx] >= '0' && f[f_idx] <= '9'))) f_idx++; } } /* non-digit length modifiers */ if (f_idx < f_len) { int parsed_bytes = parse_length_modifier(&f[f_idx], f_len - f_idx, &length_modifier); if (parsed_bytes < 0) return 0; f_idx += parsed_bytes; } if (f_idx >= f_len) break; switch (f[f_idx]) { case 's': string_arg = va_arg(args, char*); for (i = 0; string_arg[i] != 0 && s_idx < size - 1 && s_idx < precision; i++) string[s_idx++] = string_arg[i]; break; case 'u': if (length_modifier & LMOD_LONGLONG) ui = va_arg(args, unsigned long long); else if (length_modifier & LMOD_LONG) ui = va_arg(args, unsigned long); else if (length_modifier & LMOD_SIZET) ui = va_arg(args, size_t); else ui = va_arg(args, unsigned); FormatUInt64(ui, number); p_len = strlen_sigsafe(number); for (i = 0; i < p_len && s_idx < size - 1; i++) string[s_idx++] = number[i]; break; case 'i': case 'd': if (length_modifier & LMOD_LONGLONG) si = va_arg(args, long long); else if (length_modifier & LMOD_LONG) si = va_arg(args, long); else if (length_modifier & LMOD_SIZET) si = va_arg(args, ssize_t); else si = va_arg(args, int); FormatInt64(si, number); p_len = strlen_sigsafe(number); for (i = 0; i < p_len && s_idx < size - 1; i++) string[s_idx++] = number[i]; break; case 'p': string[s_idx++] = '0'; if (s_idx < size - 1) string[s_idx++] = 'x'; ui = (uintptr_t)va_arg(args, void*); FormatUInt64Hex(ui, number); p_len = strlen_sigsafe(number); for (i = 0; i < p_len && s_idx < size - 1; i++) string[s_idx++] = number[i]; break; case 'x': if (length_modifier & LMOD_LONGLONG) ui = va_arg(args, unsigned long long); else if (length_modifier & LMOD_LONG) ui = va_arg(args, unsigned long); else if (length_modifier & LMOD_SIZET) ui = va_arg(args, size_t); else ui = va_arg(args, unsigned); FormatUInt64Hex(ui, number); p_len = strlen_sigsafe(number); for (i = 0; i < p_len && s_idx < size - 1; i++) string[s_idx++] = number[i]; break; case 'f': { double d = va_arg(args, double); FormatDouble(d, number); p_len = strlen_sigsafe(number); for (i = 0; i < p_len && s_idx < size - 1; i++) string[s_idx++] = number[i]; } break; case 'c': { char c = va_arg(args, int); if (s_idx < size - 1) string[s_idx++] = c; } break; case '%': string[s_idx++] = '%'; break; default: BUG_WARN_MSG(f[f_idx], "Unsupported printf directive '%c'\n", f[f_idx]); va_arg(args, char*); string[s_idx++] = '%'; if (s_idx < size - 1) string[s_idx++] = f[f_idx]; break; } } string[s_idx] = '\0'; return s_idx; } static int pnprintf(char *string, int size, const char *f, ...) { int rc; va_list args; va_start(args, f); rc = vpnprintf(string, size, f, args); va_end(args); return rc; } /* This function does the actual log message writes. It must be signal safe. * When attempting to call non-signal-safe functions, guard them with a check * of the inSignalContext global variable. */ static void LogSWrite(int verb, const char *buf, size_t len, Bool end_line) { static Bool newline = TRUE; int ret; if (verb < 0 || logVerbosity >= verb) ret = write(2, buf, len); if (verb < 0 || logFileVerbosity >= verb) { if (inSignalContext && logFileFd >= 0) { ret = write(logFileFd, buf, len); #ifndef WIN32 if (logFlush && logSync) fsync(logFileFd); #endif } else if (!inSignalContext && logFile) { if (newline) fprintf(logFile, "[%10.3f] ", GetTimeInMillis() / 1000.0); newline = end_line; fwrite(buf, len, 1, logFile); if (logFlush) { fflush(logFile); #ifndef WIN32 if (logSync) fsync(fileno(logFile)); #endif } } else if (!inSignalContext && needBuffer) { if (len > bufferUnused) { bufferSize += 1024; bufferUnused += 1024; saveBuffer = realloc(saveBuffer, bufferSize); if (!saveBuffer) FatalError("realloc() failed while saving log messages\n"); } bufferUnused -= len; memcpy(saveBuffer + bufferPos, buf, len); bufferPos += len; } } /* There's no place to log an error message if the log write * fails... */ (void) ret; } void LogVWrite(int verb, const char *f, va_list args) { return LogVMessageVerb(X_NONE, verb, f, args); } void LogWrite(int verb, const char *f, ...) { va_list args; va_start(args, f); LogVWrite(verb, f, args); va_end(args); } /* Returns the Message Type string to prepend to a logging message, or NULL * if the message will be dropped due to insufficient verbosity. */ static const char * LogMessageTypeVerbString(MessageType type, int verb) { if (type == X_ERROR) verb = 0; if (logVerbosity < verb && logFileVerbosity < verb) return NULL; switch (type) { case X_PROBED: return X_PROBE_STRING; case X_CONFIG: return X_CONFIG_STRING; case X_DEFAULT: return X_DEFAULT_STRING; case X_CMDLINE: return X_CMDLINE_STRING; case X_NOTICE: return X_NOTICE_STRING; case X_ERROR: return X_ERROR_STRING; case X_WARNING: return X_WARNING_STRING; case X_INFO: return X_INFO_STRING; case X_NOT_IMPLEMENTED: return X_NOT_IMPLEMENTED_STRING; case X_UNKNOWN: return X_UNKNOWN_STRING; case X_NONE: return X_NONE_STRING; case X_DEBUG: return X_DEBUG_STRING; default: return X_UNKNOWN_STRING; } } void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args) { const char *type_str; char buf[1024]; const size_t size = sizeof(buf); Bool newline; size_t len = 0; if (inSignalContext) { LogVMessageVerbSigSafe(type, verb, format, args); return; } type_str = LogMessageTypeVerbString(type, verb); if (!type_str) return; /* if type_str is not "", prepend it and ' ', to message */ if (type_str[0] != '\0') len += Xscnprintf(&buf[len], size - len, "%s ", type_str); if (size - len > 1) len += Xvscnprintf(&buf[len], size - len, format, args); /* Force '\n' at end of truncated line */ if (size - len == 1) buf[len - 1] = '\n'; newline = (buf[len - 1] == '\n'); LogSWrite(verb, buf, len, newline); } /* Log message with verbosity level specified. */ void LogMessageVerb(MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, verb, format, ap); va_end(ap); } /* Log a message with the standard verbosity level of 1. */ void LogMessage(MessageType type, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(type, 1, format, ap); va_end(ap); } /* Log a message using only signal safe functions. */ void LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerbSigSafe(type, verb, format, ap); va_end(ap); } void LogVMessageVerbSigSafe(MessageType type, int verb, const char *format, va_list args) { const char *type_str; char buf[1024]; int len; Bool newline; type_str = LogMessageTypeVerbString(type, verb); if (!type_str) return; /* if type_str is not "", prepend it and ' ', to message */ if (type_str[0] != '\0') { LogSWrite(verb, type_str, strlen_sigsafe(type_str), FALSE); LogSWrite(verb, " ", 1, FALSE); } len = vpnprintf(buf, sizeof(buf), format, args); /* Force '\n' at end of truncated line */ if (sizeof(buf) - len == 1) buf[len - 1] = '\n'; newline = (len > 0 && buf[len - 1] == '\n'); LogSWrite(verb, buf, len, newline); } void LogVHdrMessageVerb(MessageType type, int verb, const char *msg_format, va_list msg_args, const char *hdr_format, va_list hdr_args) { const char *type_str; char buf[1024]; const size_t size = sizeof(buf); Bool newline; size_t len = 0; int (*vprintf_func)(char *, int, const char* _X_RESTRICT_KYWD f, va_list args) _X_ATTRIBUTE_PRINTF(3, 0); int (*printf_func)(char *, int, const char* _X_RESTRICT_KYWD f, ...) _X_ATTRIBUTE_PRINTF(3, 4); type_str = LogMessageTypeVerbString(type, verb); if (!type_str) return; if (inSignalContext) { vprintf_func = vpnprintf; printf_func = pnprintf; } else { vprintf_func = Xvscnprintf; printf_func = Xscnprintf; } /* if type_str is not "", prepend it and ' ', to message */ if (type_str[0] != '\0') len += printf_func(&buf[len], size - len, "%s ", type_str); if (hdr_format && size - len > 1) len += vprintf_func(&buf[len], size - len, hdr_format, hdr_args); if (msg_format && size - len > 1) len += vprintf_func(&buf[len], size - len, msg_format, msg_args); /* Force '\n' at end of truncated line */ if (size - len == 1) buf[len - 1] = '\n'; newline = (buf[len - 1] == '\n'); LogSWrite(verb, buf, len, newline); } void LogHdrMessageVerb(MessageType type, int verb, const char *msg_format, va_list msg_args, const char *hdr_format, ...) { va_list hdr_args; va_start(hdr_args, hdr_format); LogVHdrMessageVerb(type, verb, msg_format, msg_args, hdr_format, hdr_args); va_end(hdr_args); } void LogHdrMessage(MessageType type, const char *msg_format, va_list msg_args, const char *hdr_format, ...) { va_list hdr_args; va_start(hdr_args, hdr_format); LogVHdrMessageVerb(type, 1, msg_format, msg_args, hdr_format, hdr_args); va_end(hdr_args); } void AbortServer(void) _X_NORETURN; void AbortServer(void) { #ifdef XF86BIGFONT XF86BigfontCleanup(); #endif CloseWellKnownConnections(); OsCleanup(TRUE); AbortDevices(); ddxGiveUp(EXIT_ERR_ABORT); fflush(stderr); if (CoreDump) OsAbort(); exit(1); } #define AUDIT_PREFIX "AUDIT: %s: %ld: " #ifndef AUDIT_TIMEOUT #define AUDIT_TIMEOUT ((CARD32)(120 * 1000)) /* 2 mn */ #endif static int nrepeat = 0; static int oldlen = -1; static OsTimerPtr auditTimer = NULL; void FreeAuditTimer(void) { if (auditTimer != NULL) { /* Force output of pending messages */ TimerForce(auditTimer); TimerFree(auditTimer); auditTimer = NULL; } } static char * AuditPrefix(void) { time_t tm; char *autime, *s; char *tmpBuf; int len; time(&tm); autime = ctime(&tm); if ((s = strchr(autime, '\n'))) *s = '\0'; len = strlen(AUDIT_PREFIX) + strlen(autime) + 10 + 1; tmpBuf = malloc(len); if (!tmpBuf) return NULL; snprintf(tmpBuf, len, AUDIT_PREFIX, autime, (unsigned long) getpid()); return tmpBuf; } void AuditF(const char *f, ...) { va_list args; va_start(args, f); VAuditF(f, args); va_end(args); } static CARD32 AuditFlush(OsTimerPtr timer, CARD32 now, void *arg) { char *prefix; if (nrepeat > 0) { prefix = AuditPrefix(); ErrorF("%slast message repeated %d times\n", prefix != NULL ? prefix : "", nrepeat); nrepeat = 0; free(prefix); return AUDIT_TIMEOUT; } else { /* if the timer expires without anything to print, flush the message */ oldlen = -1; return 0; } } void VAuditF(const char *f, va_list args) { char *prefix; char buf[1024]; int len; static char oldbuf[1024]; prefix = AuditPrefix(); len = vsnprintf(buf, sizeof(buf), f, args); if (len == oldlen && strcmp(buf, oldbuf) == 0) { /* Message already seen */ nrepeat++; } else { /* new message */ if (auditTimer != NULL) TimerForce(auditTimer); ErrorF("%s%s", prefix != NULL ? prefix : "", buf); strlcpy(oldbuf, buf, sizeof(oldbuf)); oldlen = len; nrepeat = 0; auditTimer = TimerSet(auditTimer, 0, AUDIT_TIMEOUT, AuditFlush, NULL); } free(prefix); } void FatalError(const char *f, ...) { va_list args; va_list args2; static Bool beenhere = FALSE; if (beenhere) ErrorFSigSafe("\nFatalError re-entered, aborting\n"); else ErrorFSigSafe("\nFatal server error:\n"); va_start(args, f); /* Make a copy for OsVendorFatalError */ va_copy(args2, args); #ifdef __APPLE__ { va_list apple_args; va_copy(apple_args, args); (void)vsnprintf(__crashreporter_info_buff__, sizeof(__crashreporter_info_buff__), f, apple_args); va_end(apple_args); } #endif VErrorFSigSafe(f, args); va_end(args); ErrorFSigSafe("\n"); if (!beenhere) OsVendorFatalError(f, args2); va_end(args2); if (!beenhere) { beenhere = TRUE; AbortServer(); } else OsAbort(); /*NOTREACHED*/} void VErrorF(const char *f, va_list args) { #ifdef DDXOSVERRORF if (OsVendorVErrorFProc) OsVendorVErrorFProc(f, args); else LogVWrite(-1, f, args); #else LogVWrite(-1, f, args); #endif } void ErrorF(const char *f, ...) { va_list args; va_start(args, f); VErrorF(f, args); va_end(args); } void VErrorFSigSafe(const char *f, va_list args) { LogVMessageVerbSigSafe(X_ERROR, -1, f, args); } void ErrorFSigSafe(const char *f, ...) { va_list args; va_start(args, f); VErrorFSigSafe(f, args); va_end(args); } void LogPrintMarkers(void) { /* Show what the message marker symbols mean. */ LogWrite(0, "Markers: "); LogMessageVerb(X_PROBED, 0, "probed, "); LogMessageVerb(X_CONFIG, 0, "from config file, "); LogMessageVerb(X_DEFAULT, 0, "default setting,\n\t"); LogMessageVerb(X_CMDLINE, 0, "from command line, "); LogMessageVerb(X_NOTICE, 0, "notice, "); LogMessageVerb(X_INFO, 0, "informational,\n\t"); LogMessageVerb(X_WARNING, 0, "warning, "); LogMessageVerb(X_ERROR, 0, "error, "); LogMessageVerb(X_NOT_IMPLEMENTED, 0, "not implemented, "); LogMessageVerb(X_UNKNOWN, 0, "unknown.\n"); } xorg-server-21.1.16/os/rpcauth.c0000644000175000017500000001163514757411105012074 /* Copyright 1991, 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. */ /* * SUN-DES-1 authentication mechanism * Author: Mayank Choudhary, Sun Microsystems */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef SECURE_RPC #include #include #include "misc.h" #include "os.h" #include "osdep.h" #include "dixstruct.h" #include #ifdef __sun /* only includes this if _KERNEL is #defined... */ extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); #endif static enum auth_stat why; static char * authdes_ezdecode(const char *inmsg, int len) { struct rpc_msg msg; char cred_area[MAX_AUTH_BYTES]; char verf_area[MAX_AUTH_BYTES]; char *temp_inmsg; struct svc_req r; bool_t res0, res1; XDR xdr; SVCXPRT xprt; temp_inmsg = malloc(len); if (temp_inmsg == NULL) { why = AUTH_FAILED; /* generic error, since there is no AUTH_BADALLOC */ return NULL; } memmove(temp_inmsg, inmsg, len); memset((char *) &msg, 0, sizeof(msg)); memset((char *) &r, 0, sizeof(r)); memset(cred_area, 0, sizeof(cred_area)); memset(verf_area, 0, sizeof(verf_area)); msg.rm_call.cb_cred.oa_base = cred_area; msg.rm_call.cb_verf.oa_base = verf_area; why = AUTH_FAILED; xdrmem_create(&xdr, temp_inmsg, len, XDR_DECODE); if ((r.rq_clntcred = malloc(MAX_AUTH_BYTES)) == NULL) goto bad1; r.rq_xprt = &xprt; /* decode into msg */ res0 = xdr_opaque_auth(&xdr, &(msg.rm_call.cb_cred)); res1 = xdr_opaque_auth(&xdr, &(msg.rm_call.cb_verf)); if (!(res0 && res1)) goto bad2; /* do the authentication */ r.rq_cred = msg.rm_call.cb_cred; /* read by opaque stuff */ if (r.rq_cred.oa_flavor != AUTH_DES) { why = AUTH_TOOWEAK; goto bad2; } #ifdef SVR4 if ((why = __authenticate(&r, &msg)) != AUTH_OK) { #else if ((why = _authenticate(&r, &msg)) != AUTH_OK) { #endif goto bad2; } return (((struct authdes_cred *) r.rq_clntcred)->adc_fullname.name); bad2: free(r.rq_clntcred); bad1: return ((char *) 0); /* ((struct authdes_cred *) NULL); */ } static XID rpc_id = (XID) ~0L; static Bool CheckNetName(unsigned char *addr, short len, void *closure) { return (len == strlen((char *) closure) && strncmp((char *) addr, (char *) closure, len) == 0); } static char rpc_error[MAXNETNAMELEN + 50]; _X_HIDDEN XID SecureRPCCheck(unsigned short data_length, const char *data, ClientPtr client, const char **reason) { char *fullname; if (rpc_id == (XID) ~0L) { *reason = "Secure RPC authorization not initialized"; } else { fullname = authdes_ezdecode(data, data_length); if (fullname == (char *) 0) { snprintf(rpc_error, sizeof(rpc_error), "Unable to authenticate secure RPC client (why=%d)", why); *reason = rpc_error; } else { if (ForEachHostInFamily(FamilyNetname, CheckNetName, fullname)) return rpc_id; snprintf(rpc_error, sizeof(rpc_error), "Principal \"%s\" is not authorized to connect", fullname); *reason = rpc_error; } } return (XID) ~0L; } _X_HIDDEN void SecureRPCInit(void) { if (rpc_id == ~0L) AddAuthorization(9, "SUN-DES-1", 0, (char *) 0); } _X_HIDDEN int SecureRPCAdd(unsigned short data_length, const char *data, XID id) { if (data_length) AddHost((void *) 0, FamilyNetname, data_length, data); rpc_id = id; return 1; } _X_HIDDEN int SecureRPCReset(void) { rpc_id = (XID) ~0L; return 1; } _X_HIDDEN int SecureRPCFromID(XID id, unsigned short *data_lenp, char **datap) { return 0; } _X_HIDDEN int SecureRPCRemove(unsigned short data_length, const char *data) { return 0; } #endif /* SECURE_RPC */ xorg-server-21.1.16/os/xserver_poll.c0000644000175000017500000002072614757411105013153 /*---------------------------------------------------------------------------*\ $Id$ NAME poll - select(2)-based poll() emulation function for BSD systems. SYNOPSIS #include "poll.h" struct pollfd { int fd; short events; short revents; } int poll (struct pollfd *pArray, unsigned long n_fds, int timeout) DESCRIPTION This file, and the accompanying "poll.h", implement the System V poll(2) system call for BSD systems (which typically do not provide poll()). Poll() provides a method for multiplexing input and output on multiple open file descriptors; in traditional BSD systems, that capability is provided by select(). While the semantics of select() differ from those of poll(), poll() can be readily emulated in terms of select() -- which is how this function is implemented. REFERENCES Stevens, W. Richard. Unix Network Programming. Prentice-Hall, 1990. NOTES 1. This software requires an ANSI C compiler. LICENSE This software is released under the following BSD license, adapted from http://opensource.org/licenses/bsd-license.php Copyright (c) 1995-2011, Brian M. Clapper All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the clapper.org nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*\ Includes \*---------------------------------------------------------------------------*/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* standard Unix definitions */ #include /* system types */ #include /* time definitions */ #include /* assertion macros */ #include /* string functions */ #include "xserver_poll.h" #if defined(WIN32) && !defined(__CYGWIN__) #include #endif /*---------------------------------------------------------------------------*\ Macros \*---------------------------------------------------------------------------*/ #ifndef MAX #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif /*---------------------------------------------------------------------------*\ Private Functions \*---------------------------------------------------------------------------*/ static int map_poll_spec (struct pollfd *pArray, nfds_t n_fds, fd_set *pReadSet, fd_set *pWriteSet, fd_set *pExceptSet) { register nfds_t i; /* loop control */ register struct pollfd *pCur; /* current array element */ register int max_fd = -1; /* return value */ /* Map the poll() structures into the file descriptor sets required by select(). */ for (i = 0, pCur = pArray; i < n_fds; i++, pCur++) { /* Skip any bad FDs in the array. */ if (pCur->fd < 0) continue; if (pCur->events & POLLIN) { /* "Input Ready" notification desired. */ FD_SET (pCur->fd, pReadSet); } if (pCur->events & POLLOUT) { /* "Output Possible" notification desired. */ FD_SET (pCur->fd, pWriteSet); } if (pCur->events & POLLPRI) { /* "Exception Occurred" notification desired. (Exceptions include out of band data. */ FD_SET (pCur->fd, pExceptSet); } max_fd = MAX (max_fd, pCur->fd); } return max_fd; } static struct timeval *map_timeout (int poll_timeout, struct timeval *pSelTimeout) { struct timeval *pResult; /* Map the poll() timeout value into a select() timeout. The possible values of the poll() timeout value, and their meanings, are: VALUE MEANING -1 wait indefinitely (until signal occurs) 0 return immediately, don't block >0 wait specified number of milliseconds select() uses a "struct timeval", which specifies the timeout in seconds and microseconds, so the milliseconds value has to be mapped accordingly. */ assert (pSelTimeout != (struct timeval *) NULL); switch (poll_timeout) { case -1: /* A NULL timeout structure tells select() to wait indefinitely. */ pResult = (struct timeval *) NULL; break; case 0: /* "Return immediately" (test) is specified by all zeros in a timeval structure. */ pSelTimeout->tv_sec = 0; pSelTimeout->tv_usec = 0; pResult = pSelTimeout; break; default: /* Wait the specified number of milliseconds. */ pSelTimeout->tv_sec = poll_timeout / 1000; /* get seconds */ poll_timeout %= 1000; /* remove seconds */ pSelTimeout->tv_usec = poll_timeout * 1000; /* get microseconds */ pResult = pSelTimeout; break; } return pResult; } static void map_select_results (struct pollfd *pArray, unsigned long n_fds, fd_set *pReadSet, fd_set *pWriteSet, fd_set *pExceptSet) { register unsigned long i; /* loop control */ register struct pollfd *pCur; /* current array element */ for (i = 0, pCur = pArray; i < n_fds; i++, pCur++) { /* Skip any bad FDs in the array. */ if (pCur->fd < 0) continue; /* Exception events take priority over input events. */ pCur->revents = 0; if (FD_ISSET (pCur->fd, pExceptSet)) pCur->revents |= POLLPRI; else if (FD_ISSET (pCur->fd, pReadSet)) pCur->revents |= POLLIN; if (FD_ISSET (pCur->fd, pWriteSet)) pCur->revents |= POLLOUT; } return; } /*---------------------------------------------------------------------------*\ Public Functions \*---------------------------------------------------------------------------*/ int xserver_poll (struct pollfd *pArray, unsigned long n_fds, int timeout) { fd_set read_descs; /* input file descs */ fd_set write_descs; /* output file descs */ fd_set except_descs; /* exception descs */ struct timeval stime; /* select() timeout value */ int ready_descriptors; /* function result */ int max_fd; /* maximum fd value */ struct timeval *pTimeout; /* actually passed */ FD_ZERO (&read_descs); FD_ZERO (&write_descs); FD_ZERO (&except_descs); assert (pArray != (struct pollfd *) NULL); /* Map the poll() file descriptor list in the select() data structures. */ max_fd = map_poll_spec (pArray, n_fds, &read_descs, &write_descs, &except_descs); /* Map the poll() timeout value in the select() timeout structure. */ pTimeout = map_timeout (timeout, &stime); /* Make the select() call. */ ready_descriptors = select (max_fd + 1, &read_descs, &write_descs, &except_descs, pTimeout); if (ready_descriptors >= 0) { map_select_results (pArray, n_fds, &read_descs, &write_descs, &except_descs); } return ready_descriptors; } xorg-server-21.1.16/os/xdmcp.c0000644000175000017500000012675614757411105011554 /* * Copyright 1989 Network Computing Devices, Inc., Mountain View, California. * * 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 N.C.D. not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. N.C.D. makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef WIN32 #include #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #endif #include #if !defined(WIN32) #include #include #include #include #endif #include #include #include #include #include "misc.h" #include "osdep.h" #include "input.h" #include "dixstruct.h" #include "opaque.h" #define XSERV_t #define TRANS_SERVER #define TRANS_REOPEN #include #ifdef XDMCP #undef REQUEST #ifdef XDMCP_NO_IPV6 #undef IPv6 #endif #include #define X_INCLUDE_NETDB_H #include static const char *defaultDisplayClass = "MIT-unspecified"; static int xdmcpSocket, sessionSocket; static xdmcp_states state; #if defined(IPv6) && defined(AF_INET6) static int xdmcpSocket6; static struct sockaddr_storage req_sockaddr; #else static struct sockaddr_in req_sockaddr; #endif static int req_socklen; static CARD32 SessionID; static int timeOutRtx; static CARD16 DisplayNumber; static xdmcp_states XDM_INIT_STATE = XDM_OFF; static OsTimerPtr xdmcp_timer; #ifdef HASXDMAUTH static char *xdmAuthCookie; #endif static XdmcpBuffer buffer; #if defined(IPv6) && defined(AF_INET6) static struct addrinfo *mgrAddr; static struct addrinfo *mgrAddrFirst; #define SOCKADDR_TYPE struct sockaddr_storage #define SOCKADDR_FAMILY(s) ((struct sockaddr *)&(s))->sa_family #ifdef BSD44SOCKETS #define SOCKLEN_FIELD(s) ((struct sockaddr *)&(s))->sa_len #define SOCKLEN_TYPE unsigned char #else #define SOCKLEN_TYPE unsigned int #endif #else #define SOCKADDR_TYPE struct sockaddr_in #define SOCKADDR_FAMILY(s) (s).sin_family #ifdef BSD44SOCKETS #define SOCKLEN_FIELD(s) (s).sin_len #define SOCKLEN_TYPE unsigned char #else #define SOCKLEN_TYPE size_t #endif #endif static SOCKADDR_TYPE ManagerAddress; static SOCKADDR_TYPE FromAddress; #ifdef SOCKLEN_FIELD #define ManagerAddressLen SOCKLEN_FIELD(ManagerAddress) #define FromAddressLen SOCKLEN_FIELD(FromAddress) #else static SOCKLEN_TYPE ManagerAddressLen, FromAddressLen; #endif #if defined(IPv6) && defined(AF_INET6) static struct multicastinfo { struct multicastinfo *next; struct addrinfo *ai; int hops; } *mcastlist; #endif static void XdmcpAddHost(const struct sockaddr *from, int fromlen, ARRAY8Ptr AuthenticationName, ARRAY8Ptr hostname, ARRAY8Ptr status); static void XdmcpSelectHost(const struct sockaddr *host_sockaddr, int host_len, ARRAY8Ptr AuthenticationName); static void get_xdmcp_sock(void); static void send_query_msg(void); static void recv_willing_msg(struct sockaddr *from, int fromlen, unsigned length); static void send_request_msg(void); static void recv_accept_msg(unsigned length); static void recv_decline_msg(unsigned length); static void send_manage_msg(void); static void recv_refuse_msg(unsigned length); static void recv_failed_msg(unsigned length); static void send_keepalive_msg(void); static void recv_alive_msg(unsigned length ); static void XdmcpFatal(const char *type, ARRAY8Ptr status); static void XdmcpWarning(const char *str); static void get_manager_by_name(int argc, char **argv, int i); static void get_fromaddr_by_name(int argc, char **argv, int i); #if defined(IPv6) && defined(AF_INET6) static int get_mcast_options(int argc, char **argv, int i); #endif static void receive_packet(int socketfd); static void send_packet(void); static void timeout(void); static void XdmcpSocketNotify(int fd, int ready, void *data); static CARD32 XdmcpTimerNotify(OsTimerPtr timer, CARD32 time, void *arg); /* * Register the Manufacturer display ID */ static ARRAY8 ManufacturerDisplayID; static void XdmcpRegisterManufacturerDisplayID(const char *name, int length) { int i; XdmcpDisposeARRAY8(&ManufacturerDisplayID); if (!XdmcpAllocARRAY8(&ManufacturerDisplayID, length)) return; for (i = 0; i < length; i++) ManufacturerDisplayID.data[i] = (CARD8) name[i]; } static unsigned short xdm_udp_port = XDM_UDP_PORT; static Bool OneSession = FALSE; static const char *xdm_from = NULL; void XdmcpUseMsg(void) { ErrorF("-query host-name contact named host for XDMCP\n"); ErrorF("-broadcast broadcast for XDMCP\n"); #if defined(IPv6) && defined(AF_INET6) ErrorF("-multicast [addr [hops]] IPv6 multicast for XDMCP\n"); #endif ErrorF("-indirect host-name contact named host for indirect XDMCP\n"); ErrorF("-port port-num UDP port number to send messages to\n"); ErrorF ("-from local-address specify the local address to connect from\n"); ErrorF("-once Terminate server after one session\n"); ErrorF("-class display-class specify display class to send in manage\n"); #ifdef HASXDMAUTH ErrorF("-cookie xdm-auth-bits specify the magic cookie for XDMCP\n"); #endif ErrorF("-displayID display-id manufacturer display ID for request\n"); } static void XdmcpDefaultListen(void) { /* Even when configured --disable-listen-tcp, we should listen on tcp in XDMCP modes */ _XSERVTransListen("tcp"); } int XdmcpOptions(int argc, char **argv, int i) { if (strcmp(argv[i], "-query") == 0) { get_manager_by_name(argc, argv, i++); XDM_INIT_STATE = XDM_QUERY; AccessUsingXdmcp(); XdmcpDefaultListen(); return i + 1; } if (strcmp(argv[i], "-broadcast") == 0) { XDM_INIT_STATE = XDM_BROADCAST; AccessUsingXdmcp(); XdmcpDefaultListen(); return i + 1; } #if defined(IPv6) && defined(AF_INET6) if (strcmp(argv[i], "-multicast") == 0) { i = get_mcast_options(argc, argv, ++i); XDM_INIT_STATE = XDM_MULTICAST; AccessUsingXdmcp(); XdmcpDefaultListen(); return i + 1; } #endif if (strcmp(argv[i], "-indirect") == 0) { get_manager_by_name(argc, argv, i++); XDM_INIT_STATE = XDM_INDIRECT; AccessUsingXdmcp(); XdmcpDefaultListen(); return i + 1; } if (strcmp(argv[i], "-port") == 0) { if (++i == argc) { FatalError("Xserver: missing port number in command line\n"); } xdm_udp_port = (unsigned short) atoi(argv[i]); return i + 1; } if (strcmp(argv[i], "-from") == 0) { get_fromaddr_by_name(argc, argv, ++i); return i + 1; } if (strcmp(argv[i], "-once") == 0) { OneSession = TRUE; return i + 1; } if (strcmp(argv[i], "-class") == 0) { if (++i == argc) { FatalError("Xserver: missing class name in command line\n"); } defaultDisplayClass = argv[i]; return i + 1; } #ifdef HASXDMAUTH if (strcmp(argv[i], "-cookie") == 0) { if (++i == argc) { FatalError("Xserver: missing cookie data in command line\n"); } xdmAuthCookie = argv[i]; return i + 1; } #endif if (strcmp(argv[i], "-displayID") == 0) { if (++i == argc) { FatalError("Xserver: missing displayID in command line\n"); } XdmcpRegisterManufacturerDisplayID(argv[i], strlen(argv[i])); return i + 1; } return i; } /* * This section is a collection of routines for * registering server-specific data with the XDMCP * state machine. */ /* * Save all broadcast addresses away so BroadcastQuery * packets get sent everywhere */ #define MAX_BROADCAST 10 /* This stays sockaddr_in since IPv6 doesn't support broadcast */ static struct sockaddr_in BroadcastAddresses[MAX_BROADCAST]; static int NumBroadcastAddresses; void XdmcpRegisterBroadcastAddress(const struct sockaddr_in *addr) { struct sockaddr_in *bcast; if (NumBroadcastAddresses >= MAX_BROADCAST) return; bcast = &BroadcastAddresses[NumBroadcastAddresses++]; memset(bcast, 0, sizeof(struct sockaddr_in)); #ifdef BSD44SOCKETS bcast->sin_len = addr->sin_len; #endif bcast->sin_family = addr->sin_family; bcast->sin_port = htons(xdm_udp_port); bcast->sin_addr = addr->sin_addr; } /* * Each authentication type is registered here; Validator * will be called to check all access attempts using * the specified authentication type */ static ARRAYofARRAY8 AuthenticationNames, AuthenticationDatas; typedef struct _AuthenticationFuncs { ValidatorFunc Validator; GeneratorFunc Generator; AddAuthorFunc AddAuth; } AuthenticationFuncsRec, *AuthenticationFuncsPtr; static AuthenticationFuncsPtr AuthenticationFuncsList; void XdmcpRegisterAuthentication(const char *name, int namelen, const char *data, int datalen, ValidatorFunc Validator, GeneratorFunc Generator, AddAuthorFunc AddAuth) { int i; ARRAY8 AuthenticationName, AuthenticationData; static AuthenticationFuncsPtr newFuncs; if (!XdmcpAllocARRAY8(&AuthenticationName, namelen)) return; if (!XdmcpAllocARRAY8(&AuthenticationData, datalen)) { XdmcpDisposeARRAY8(&AuthenticationName); return; } for (i = 0; i < namelen; i++) AuthenticationName.data[i] = name[i]; for (i = 0; i < datalen; i++) AuthenticationData.data[i] = data[i]; if (!(XdmcpReallocARRAYofARRAY8(&AuthenticationNames, AuthenticationNames.length + 1) && XdmcpReallocARRAYofARRAY8(&AuthenticationDatas, AuthenticationDatas.length + 1) && (newFuncs = malloc((AuthenticationNames.length + 1) * sizeof(AuthenticationFuncsRec))))) { XdmcpDisposeARRAY8(&AuthenticationName); XdmcpDisposeARRAY8(&AuthenticationData); return; } for (i = 0; i < AuthenticationNames.length - 1; i++) newFuncs[i] = AuthenticationFuncsList[i]; newFuncs[AuthenticationNames.length - 1].Validator = Validator; newFuncs[AuthenticationNames.length - 1].Generator = Generator; newFuncs[AuthenticationNames.length - 1].AddAuth = AddAuth; free(AuthenticationFuncsList); AuthenticationFuncsList = newFuncs; AuthenticationNames.data[AuthenticationNames.length - 1] = AuthenticationName; AuthenticationDatas.data[AuthenticationDatas.length - 1] = AuthenticationData; } /* * Select the authentication type to be used; this is * set by the manager of the host to be connected to. */ static ARRAY8 noAuthenticationName = { (CARD16) 0, (CARD8Ptr) 0 }; static ARRAY8 noAuthenticationData = { (CARD16) 0, (CARD8Ptr) 0 }; static ARRAY8Ptr AuthenticationName = &noAuthenticationName; static ARRAY8Ptr AuthenticationData = &noAuthenticationData; static AuthenticationFuncsPtr AuthenticationFuncs; static void XdmcpSetAuthentication(const ARRAY8Ptr name) { int i; for (i = 0; i < AuthenticationNames.length; i++) if (XdmcpARRAY8Equal(&AuthenticationNames.data[i], name)) { AuthenticationName = &AuthenticationNames.data[i]; AuthenticationData = &AuthenticationDatas.data[i]; AuthenticationFuncs = &AuthenticationFuncsList[i]; break; } } /* * Register the host address for the display */ static ARRAY16 ConnectionTypes; static ARRAYofARRAY8 ConnectionAddresses; static long xdmcpGeneration; void XdmcpRegisterConnection(int type, const char *address, int addrlen) { int i; CARD8 *newAddress; if (xdmcpGeneration != serverGeneration) { XdmcpDisposeARRAY16(&ConnectionTypes); XdmcpDisposeARRAYofARRAY8(&ConnectionAddresses); xdmcpGeneration = serverGeneration; } if (xdm_from != NULL) { /* Only register the requested address */ const void *regAddr = address; const void *fromAddr = NULL; int regAddrlen = addrlen; if (addrlen == sizeof(struct in_addr)) { if (SOCKADDR_FAMILY(FromAddress) == AF_INET) { fromAddr = &((struct sockaddr_in *) &FromAddress)->sin_addr; } #if defined(IPv6) && defined(AF_INET6) else if ((SOCKADDR_FAMILY(FromAddress) == AF_INET6) && IN6_IS_ADDR_V4MAPPED(& ((struct sockaddr_in6 *) &FromAddress)->sin6_addr)) { fromAddr = &((struct sockaddr_in6 *) &FromAddress)->sin6_addr. s6_addr[12]; } #endif } #if defined(IPv6) && defined(AF_INET6) else if (addrlen == sizeof(struct in6_addr)) { if (SOCKADDR_FAMILY(FromAddress) == AF_INET6) { fromAddr = &((struct sockaddr_in6 *) &FromAddress)->sin6_addr; } else if ((SOCKADDR_FAMILY(FromAddress) == AF_INET) && IN6_IS_ADDR_V4MAPPED((const struct in6_addr *) address)) { fromAddr = &((struct sockaddr_in *) &FromAddress)->sin_addr; regAddr = &((struct sockaddr_in6 *) address)->sin6_addr.s6_addr[12]; regAddrlen = sizeof(struct in_addr); } } #endif if (!fromAddr || memcmp(regAddr, fromAddr, regAddrlen) != 0) { return; } } if (ConnectionAddresses.length + 1 == 256) return; newAddress = malloc(addrlen * sizeof(CARD8)); if (!newAddress) return; if (!XdmcpReallocARRAY16(&ConnectionTypes, ConnectionTypes.length + 1)) { free(newAddress); return; } if (!XdmcpReallocARRAYofARRAY8(&ConnectionAddresses, ConnectionAddresses.length + 1)) { free(newAddress); return; } ConnectionTypes.data[ConnectionTypes.length - 1] = (CARD16) type; for (i = 0; i < addrlen; i++) newAddress[i] = address[i]; ConnectionAddresses.data[ConnectionAddresses.length - 1].data = newAddress; ConnectionAddresses.data[ConnectionAddresses.length - 1].length = addrlen; } /* * Register an Authorization Name. XDMCP advertises this list * to the manager. */ static ARRAYofARRAY8 AuthorizationNames; void XdmcpRegisterAuthorizations(void) { XdmcpDisposeARRAYofARRAY8(&AuthorizationNames); RegisterAuthorizations(); } void XdmcpRegisterAuthorization(const char *name, int namelen) { ARRAY8 authName; int i; authName.data = malloc(namelen * sizeof(CARD8)); if (!authName.data) return; if (!XdmcpReallocARRAYofARRAY8 (&AuthorizationNames, AuthorizationNames.length + 1)) { free(authName.data); return; } for (i = 0; i < namelen; i++) authName.data[i] = (CARD8) name[i]; authName.length = namelen; AuthorizationNames.data[AuthorizationNames.length - 1] = authName; } /* * Register the DisplayClass string */ static ARRAY8 DisplayClass; static void XdmcpRegisterDisplayClass(const char *name, int length) { int i; XdmcpDisposeARRAY8(&DisplayClass); if (!XdmcpAllocARRAY8(&DisplayClass, length)) return; for (i = 0; i < length; i++) DisplayClass.data[i] = (CARD8) name[i]; } static void xdmcp_reset(void) { timeOutRtx = 0; if (xdmcpSocket >= 0) SetNotifyFd(xdmcpSocket, XdmcpSocketNotify, X_NOTIFY_READ, NULL); #if defined(IPv6) && defined(AF_INET6) if (xdmcpSocket6 >= 0) SetNotifyFd(xdmcpSocket6, XdmcpSocketNotify, X_NOTIFY_READ, NULL); #endif xdmcp_timer = TimerSet(NULL, 0, 0, XdmcpTimerNotify, NULL); send_packet(); } static void xdmcp_start(void) { get_xdmcp_sock(); xdmcp_reset(); } /* * initialize XDMCP; create the socket, compute the display * number, set up the state machine */ void XdmcpInit(void) { state = XDM_INIT_STATE; #ifdef HASXDMAUTH if (xdmAuthCookie) XdmAuthenticationInit(xdmAuthCookie, strlen(xdmAuthCookie)); #endif if (state != XDM_OFF) { XdmcpRegisterAuthorizations(); XdmcpRegisterDisplayClass(defaultDisplayClass, strlen(defaultDisplayClass)); AccessUsingXdmcp(); DisplayNumber = (CARD16) atoi(display); xdmcp_start(); } } void XdmcpReset(void) { state = XDM_INIT_STATE; if (state != XDM_OFF) xdmcp_reset(); } /* * Called whenever a new connection is created; notices the * first connection and saves it to terminate the session * when it is closed */ void XdmcpOpenDisplay(int sock) { if (state != XDM_AWAIT_MANAGE_RESPONSE) return; state = XDM_RUN_SESSION; TimerSet(xdmcp_timer, 0, XDM_DEF_DORMANCY * 1000, XdmcpTimerNotify, NULL); sessionSocket = sock; } void XdmcpCloseDisplay(int sock) { if ((state != XDM_RUN_SESSION && state != XDM_AWAIT_ALIVE_RESPONSE) || sessionSocket != sock) return; state = XDM_INIT_STATE; if (OneSession) dispatchException |= DE_TERMINATE; else dispatchException |= DE_RESET; isItTimeToYield = TRUE; } static void XdmcpSocketNotify(int fd, int ready, void *data) { if (state == XDM_OFF) return; receive_packet(fd); } static CARD32 XdmcpTimerNotify(OsTimerPtr timer, CARD32 time, void *arg) { if (state == XDM_RUN_SESSION) { state = XDM_KEEPALIVE; send_packet(); } else timeout(); return 0; } /* * This routine should be called from the routine that drives the * user's host menu when the user selects a host */ static void XdmcpSelectHost(const struct sockaddr *host_sockaddr, int host_len, ARRAY8Ptr auth_name) { state = XDM_START_CONNECTION; memmove(&req_sockaddr, host_sockaddr, host_len); req_socklen = host_len; XdmcpSetAuthentication(auth_name); send_packet(); } /* * !!! this routine should be replaced by a routine that adds * the host to the user's host menu. the current version just * selects the first host to respond with willing message. */ /*ARGSUSED*/ static void XdmcpAddHost(const struct sockaddr *from, int fromlen, ARRAY8Ptr auth_name, ARRAY8Ptr hostname, ARRAY8Ptr status) { XdmcpSelectHost(from, fromlen, auth_name); } /* * A message is queued on the socket; read it and * do the appropriate thing */ static ARRAY8 UnwillingMessage = { (CARD8) 14, (CARD8 *) "Host unwilling" }; static void receive_packet(int socketfd) { #if defined(IPv6) && defined(AF_INET6) struct sockaddr_storage from; #else struct sockaddr_in from; #endif int fromlen = sizeof(from); XdmcpHeader header; /* read message off socket */ if (!XdmcpFill(socketfd, &buffer, (XdmcpNetaddr) &from, &fromlen)) return; /* reset retransmission backoff */ timeOutRtx = 0; if (!XdmcpReadHeader(&buffer, &header)) return; if (header.version != XDM_PROTOCOL_VERSION) return; switch (header.opcode) { case WILLING: recv_willing_msg((struct sockaddr *) &from, fromlen, header.length); break; case UNWILLING: XdmcpFatal("Manager unwilling", &UnwillingMessage); break; case ACCEPT: recv_accept_msg(header.length); break; case DECLINE: recv_decline_msg(header.length); break; case REFUSE: recv_refuse_msg(header.length); break; case FAILED: recv_failed_msg(header.length); break; case ALIVE: recv_alive_msg(header.length); break; } } /* * send the appropriate message given the current state */ static void send_packet(void) { int rtx; switch (state) { case XDM_QUERY: case XDM_BROADCAST: case XDM_INDIRECT: #if defined(IPv6) && defined(AF_INET6) case XDM_MULTICAST: #endif send_query_msg(); break; case XDM_START_CONNECTION: send_request_msg(); break; case XDM_MANAGE: send_manage_msg(); break; case XDM_KEEPALIVE: send_keepalive_msg(); break; default: break; } rtx = (XDM_MIN_RTX << timeOutRtx); if (rtx > XDM_MAX_RTX) rtx = XDM_MAX_RTX; TimerSet(xdmcp_timer, 0, rtx * 1000, XdmcpTimerNotify, NULL); } /* * The session is declared dead for some reason; too many * timeouts, or Keepalive failure. */ static void XdmcpDeadSession(const char *reason) { ErrorF("XDM: %s, declaring session dead\n", reason); state = XDM_INIT_STATE; isItTimeToYield = TRUE; dispatchException |= (OneSession ? DE_TERMINATE : DE_RESET); TimerCancel(xdmcp_timer); timeOutRtx = 0; send_packet(); } /* * Timeout waiting for an XDMCP response. */ static void timeout(void) { timeOutRtx++; if (state == XDM_AWAIT_ALIVE_RESPONSE && timeOutRtx >= XDM_KA_RTX_LIMIT) { XdmcpDeadSession("too many keepalive retransmissions"); return; } else if (timeOutRtx >= XDM_RTX_LIMIT) { /* Quit if "-once" specified, otherwise reset and try again. */ if (OneSession) { dispatchException |= DE_TERMINATE; ErrorF("XDM: too many retransmissions\n"); } else { XdmcpDeadSession("too many retransmissions"); } return; } #if defined(IPv6) && defined(AF_INET6) if (state == XDM_COLLECT_QUERY || state == XDM_COLLECT_INDIRECT_QUERY) { /* Try next address */ for (mgrAddr = mgrAddr->ai_next;; mgrAddr = mgrAddr->ai_next) { if (mgrAddr == NULL) { mgrAddr = mgrAddrFirst; } if (mgrAddr->ai_family == AF_INET || mgrAddr->ai_family == AF_INET6) break; } #ifndef SIN6_LEN ManagerAddressLen = mgrAddr->ai_addrlen; #endif memcpy(&ManagerAddress, mgrAddr->ai_addr, mgrAddr->ai_addrlen); } #endif switch (state) { case XDM_COLLECT_QUERY: state = XDM_QUERY; break; case XDM_COLLECT_BROADCAST_QUERY: state = XDM_BROADCAST; break; #if defined(IPv6) && defined(AF_INET6) case XDM_COLLECT_MULTICAST_QUERY: state = XDM_MULTICAST; break; #endif case XDM_COLLECT_INDIRECT_QUERY: state = XDM_INDIRECT; break; case XDM_AWAIT_REQUEST_RESPONSE: state = XDM_START_CONNECTION; break; case XDM_AWAIT_MANAGE_RESPONSE: state = XDM_MANAGE; break; case XDM_AWAIT_ALIVE_RESPONSE: state = XDM_KEEPALIVE; break; default: break; } send_packet(); } static int XdmcpCheckAuthentication(ARRAY8Ptr Name, ARRAY8Ptr Data, int packet_type) { return (XdmcpARRAY8Equal(Name, AuthenticationName) && (AuthenticationName->length == 0 || (*AuthenticationFuncs->Validator) (AuthenticationData, Data, packet_type))); } static int XdmcpAddAuthorization(ARRAY8Ptr name, ARRAY8Ptr data) { AddAuthorFunc AddAuth; if (AuthenticationFuncs && AuthenticationFuncs->AddAuth) AddAuth = AuthenticationFuncs->AddAuth; else AddAuth = AddAuthorization; return (*AddAuth) ((unsigned short) name->length, (char *) name->data, (unsigned short) data->length, (char *) data->data); } /* * from here to the end of this file are routines private * to the state machine. */ static void get_xdmcp_sock(void) { int soopts = 1; int socketfd = -1; #if defined(IPv6) && defined(AF_INET6) if ((xdmcpSocket6 = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) XdmcpWarning("INET6 UDP socket creation failed"); #endif if ((xdmcpSocket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) XdmcpWarning("UDP socket creation failed"); #ifdef SO_BROADCAST else if (setsockopt(xdmcpSocket, SOL_SOCKET, SO_BROADCAST, (char *) &soopts, sizeof(soopts)) < 0) XdmcpWarning("UDP set broadcast socket-option failed"); #endif /* SO_BROADCAST */ if (xdm_from == NULL) return; if (SOCKADDR_FAMILY(FromAddress) == AF_INET) socketfd = xdmcpSocket; #if defined(IPv6) && defined(AF_INET6) else if (SOCKADDR_FAMILY(FromAddress) == AF_INET6) socketfd = xdmcpSocket6; #endif if (socketfd >= 0) { if (bind(socketfd, (struct sockaddr *) &FromAddress, FromAddressLen) < 0) { FatalError("Xserver: failed to bind to -from address: %s\n", xdm_from); } } } static void send_query_msg(void) { XdmcpHeader header; Bool broadcast = FALSE; #if defined(IPv6) && defined(AF_INET6) Bool multicast = FALSE; #endif int i; int socketfd = xdmcpSocket; header.version = XDM_PROTOCOL_VERSION; switch (state) { case XDM_QUERY: header.opcode = (CARD16) QUERY; state = XDM_COLLECT_QUERY; break; case XDM_BROADCAST: header.opcode = (CARD16) BROADCAST_QUERY; state = XDM_COLLECT_BROADCAST_QUERY; broadcast = TRUE; break; #if defined(IPv6) && defined(AF_INET6) case XDM_MULTICAST: header.opcode = (CARD16) BROADCAST_QUERY; state = XDM_COLLECT_MULTICAST_QUERY; multicast = TRUE; break; #endif case XDM_INDIRECT: header.opcode = (CARD16) INDIRECT_QUERY; state = XDM_COLLECT_INDIRECT_QUERY; break; default: break; } header.length = 1; for (i = 0; i < AuthenticationNames.length; i++) header.length += 2 + AuthenticationNames.data[i].length; XdmcpWriteHeader(&buffer, &header); XdmcpWriteARRAYofARRAY8(&buffer, &AuthenticationNames); if (broadcast) { for (i = 0; i < NumBroadcastAddresses; i++) XdmcpFlush(xdmcpSocket, &buffer, (XdmcpNetaddr) &BroadcastAddresses[i], sizeof(struct sockaddr_in)); } #if defined(IPv6) && defined(AF_INET6) else if (multicast) { struct multicastinfo *mcl; struct addrinfo *ai; for (mcl = mcastlist; mcl != NULL; mcl = mcl->next) { for (ai = mcl->ai; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { unsigned char hopflag = (unsigned char) mcl->hops; socketfd = xdmcpSocket; setsockopt(socketfd, IPPROTO_IP, IP_MULTICAST_TTL, &hopflag, sizeof(hopflag)); } else if (ai->ai_family == AF_INET6) { int hopflag6 = mcl->hops; socketfd = xdmcpSocket6; setsockopt(socketfd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hopflag6, sizeof(hopflag6)); } else { continue; } XdmcpFlush(socketfd, &buffer, (XdmcpNetaddr) ai->ai_addr, ai->ai_addrlen); break; } } } #endif else { #if defined(IPv6) && defined(AF_INET6) if (SOCKADDR_FAMILY(ManagerAddress) == AF_INET6) socketfd = xdmcpSocket6; #endif XdmcpFlush(socketfd, &buffer, (XdmcpNetaddr) &ManagerAddress, ManagerAddressLen); } } static void recv_willing_msg(struct sockaddr *from, int fromlen, unsigned length) { ARRAY8 authenticationName; ARRAY8 hostname; ARRAY8 status; authenticationName.data = 0; hostname.data = 0; status.data = 0; if (XdmcpReadARRAY8(&buffer, &authenticationName) && XdmcpReadARRAY8(&buffer, &hostname) && XdmcpReadARRAY8(&buffer, &status)) { if (length == 6 + authenticationName.length + hostname.length + status.length) { switch (state) { case XDM_COLLECT_QUERY: XdmcpSelectHost(from, fromlen, &authenticationName); break; case XDM_COLLECT_BROADCAST_QUERY: #if defined(IPv6) && defined(AF_INET6) case XDM_COLLECT_MULTICAST_QUERY: #endif case XDM_COLLECT_INDIRECT_QUERY: XdmcpAddHost(from, fromlen, &authenticationName, &hostname, &status); break; default: break; } } } XdmcpDisposeARRAY8(&authenticationName); XdmcpDisposeARRAY8(&hostname); XdmcpDisposeARRAY8(&status); } static void send_request_msg(void) { XdmcpHeader header; int length; int i; CARD16 XdmcpConnectionType; ARRAY8 authenticationData; int socketfd = xdmcpSocket; switch (SOCKADDR_FAMILY(ManagerAddress)) { case AF_INET: XdmcpConnectionType = FamilyInternet; break; #if defined(IPv6) && defined(AF_INET6) case AF_INET6: XdmcpConnectionType = FamilyInternet6; break; #endif default: XdmcpConnectionType = 0xffff; break; } header.version = XDM_PROTOCOL_VERSION; header.opcode = (CARD16) REQUEST; length = 2; /* display number */ length += 1 + 2 * ConnectionTypes.length; /* connection types */ length += 1; /* connection addresses */ for (i = 0; i < ConnectionAddresses.length; i++) length += 2 + ConnectionAddresses.data[i].length; authenticationData.length = 0; authenticationData.data = 0; if (AuthenticationFuncs) { (*AuthenticationFuncs->Generator) (AuthenticationData, &authenticationData, REQUEST); } length += 2 + AuthenticationName->length; /* authentication name */ length += 2 + authenticationData.length; /* authentication data */ length += 1; /* authorization names */ for (i = 0; i < AuthorizationNames.length; i++) length += 2 + AuthorizationNames.data[i].length; length += 2 + ManufacturerDisplayID.length; /* display ID */ header.length = length; if (!XdmcpWriteHeader(&buffer, &header)) { XdmcpDisposeARRAY8(&authenticationData); return; } XdmcpWriteCARD16(&buffer, DisplayNumber); XdmcpWriteCARD8(&buffer, ConnectionTypes.length); /* The connection array is send reordered, so that connections of */ /* the same address type as the XDMCP manager connection are send */ /* first. This works around a bug in xdm. mario@klebsch.de */ for (i = 0; i < (int) ConnectionTypes.length; i++) if (ConnectionTypes.data[i] == XdmcpConnectionType) XdmcpWriteCARD16(&buffer, ConnectionTypes.data[i]); for (i = 0; i < (int) ConnectionTypes.length; i++) if (ConnectionTypes.data[i] != XdmcpConnectionType) XdmcpWriteCARD16(&buffer, ConnectionTypes.data[i]); XdmcpWriteCARD8(&buffer, ConnectionAddresses.length); for (i = 0; i < (int) ConnectionAddresses.length; i++) if ((i < ConnectionTypes.length) && (ConnectionTypes.data[i] == XdmcpConnectionType)) XdmcpWriteARRAY8(&buffer, &ConnectionAddresses.data[i]); for (i = 0; i < (int) ConnectionAddresses.length; i++) if ((i >= ConnectionTypes.length) || (ConnectionTypes.data[i] != XdmcpConnectionType)) XdmcpWriteARRAY8(&buffer, &ConnectionAddresses.data[i]); XdmcpWriteARRAY8(&buffer, AuthenticationName); XdmcpWriteARRAY8(&buffer, &authenticationData); XdmcpDisposeARRAY8(&authenticationData); XdmcpWriteARRAYofARRAY8(&buffer, &AuthorizationNames); XdmcpWriteARRAY8(&buffer, &ManufacturerDisplayID); #if defined(IPv6) && defined(AF_INET6) if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6) socketfd = xdmcpSocket6; #endif if (XdmcpFlush(socketfd, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen)) state = XDM_AWAIT_REQUEST_RESPONSE; } static void recv_accept_msg(unsigned length) { CARD32 AcceptSessionID; ARRAY8 AcceptAuthenticationName, AcceptAuthenticationData; ARRAY8 AcceptAuthorizationName, AcceptAuthorizationData; if (state != XDM_AWAIT_REQUEST_RESPONSE) return; AcceptAuthenticationName.data = 0; AcceptAuthenticationData.data = 0; AcceptAuthorizationName.data = 0; AcceptAuthorizationData.data = 0; if (XdmcpReadCARD32(&buffer, &AcceptSessionID) && XdmcpReadARRAY8(&buffer, &AcceptAuthenticationName) && XdmcpReadARRAY8(&buffer, &AcceptAuthenticationData) && XdmcpReadARRAY8(&buffer, &AcceptAuthorizationName) && XdmcpReadARRAY8(&buffer, &AcceptAuthorizationData)) { if (length == 12 + AcceptAuthenticationName.length + AcceptAuthenticationData.length + AcceptAuthorizationName.length + AcceptAuthorizationData.length) { if (!XdmcpCheckAuthentication(&AcceptAuthenticationName, &AcceptAuthenticationData, ACCEPT)) { XdmcpFatal("Authentication Failure", &AcceptAuthenticationName); } /* permit access control manipulations from this host */ AugmentSelf(&req_sockaddr, req_socklen); /* if the authorization specified in the packet fails * to be acceptable, enable the local addresses */ if (!XdmcpAddAuthorization(&AcceptAuthorizationName, &AcceptAuthorizationData)) { AddLocalHosts(); } SessionID = AcceptSessionID; state = XDM_MANAGE; send_packet(); } } XdmcpDisposeARRAY8(&AcceptAuthenticationName); XdmcpDisposeARRAY8(&AcceptAuthenticationData); XdmcpDisposeARRAY8(&AcceptAuthorizationName); XdmcpDisposeARRAY8(&AcceptAuthorizationData); } static void recv_decline_msg(unsigned length) { ARRAY8 status, DeclineAuthenticationName, DeclineAuthenticationData; status.data = 0; DeclineAuthenticationName.data = 0; DeclineAuthenticationData.data = 0; if (XdmcpReadARRAY8(&buffer, &status) && XdmcpReadARRAY8(&buffer, &DeclineAuthenticationName) && XdmcpReadARRAY8(&buffer, &DeclineAuthenticationData)) { if (length == 6 + status.length + DeclineAuthenticationName.length + DeclineAuthenticationData.length && XdmcpCheckAuthentication(&DeclineAuthenticationName, &DeclineAuthenticationData, DECLINE)) { XdmcpFatal("Session declined", &status); } } XdmcpDisposeARRAY8(&status); XdmcpDisposeARRAY8(&DeclineAuthenticationName); XdmcpDisposeARRAY8(&DeclineAuthenticationData); } static void send_manage_msg(void) { XdmcpHeader header; int socketfd = xdmcpSocket; header.version = XDM_PROTOCOL_VERSION; header.opcode = (CARD16) MANAGE; header.length = 8 + DisplayClass.length; if (!XdmcpWriteHeader(&buffer, &header)) return; XdmcpWriteCARD32(&buffer, SessionID); XdmcpWriteCARD16(&buffer, DisplayNumber); XdmcpWriteARRAY8(&buffer, &DisplayClass); state = XDM_AWAIT_MANAGE_RESPONSE; #if defined(IPv6) && defined(AF_INET6) if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6) socketfd = xdmcpSocket6; #endif XdmcpFlush(socketfd, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen); } static void recv_refuse_msg(unsigned length) { CARD32 RefusedSessionID; if (state != XDM_AWAIT_MANAGE_RESPONSE) return; if (length != 4) return; if (XdmcpReadCARD32(&buffer, &RefusedSessionID)) { if (RefusedSessionID == SessionID) { state = XDM_START_CONNECTION; send_packet(); } } } static void recv_failed_msg(unsigned length) { CARD32 FailedSessionID; ARRAY8 status; if (state != XDM_AWAIT_MANAGE_RESPONSE) return; status.data = 0; if (XdmcpReadCARD32(&buffer, &FailedSessionID) && XdmcpReadARRAY8(&buffer, &status)) { if (length == 6 + status.length && SessionID == FailedSessionID) { XdmcpFatal("Session failed", &status); } } XdmcpDisposeARRAY8(&status); } static void send_keepalive_msg(void) { XdmcpHeader header; int socketfd = xdmcpSocket; header.version = XDM_PROTOCOL_VERSION; header.opcode = (CARD16) KEEPALIVE; header.length = 6; XdmcpWriteHeader(&buffer, &header); XdmcpWriteCARD16(&buffer, DisplayNumber); XdmcpWriteCARD32(&buffer, SessionID); state = XDM_AWAIT_ALIVE_RESPONSE; #if defined(IPv6) && defined(AF_INET6) if (SOCKADDR_FAMILY(req_sockaddr) == AF_INET6) socketfd = xdmcpSocket6; #endif XdmcpFlush(socketfd, &buffer, (XdmcpNetaddr) &req_sockaddr, req_socklen); } static void recv_alive_msg(unsigned length) { CARD8 SessionRunning; CARD32 AliveSessionID; if (state != XDM_AWAIT_ALIVE_RESPONSE) return; if (length != 5) return; if (XdmcpReadCARD8(&buffer, &SessionRunning) && XdmcpReadCARD32(&buffer, &AliveSessionID)) { if (SessionRunning && AliveSessionID == SessionID) { state = XDM_RUN_SESSION; TimerSet(xdmcp_timer, 0, XDM_DEF_DORMANCY * 1000, XdmcpTimerNotify, NULL); } else { XdmcpDeadSession("Alive response indicates session dead"); } } } _X_NORETURN static void XdmcpFatal(const char *type, ARRAY8Ptr status) { FatalError("XDMCP fatal error: %s %*.*s\n", type, status->length, status->length, status->data); } static void XdmcpWarning(const char *str) { ErrorF("XDMCP warning: %s\n", str); } static void get_addr_by_name(const char *argtype, const char *namestr, int port, int socktype, SOCKADDR_TYPE * addr, SOCKLEN_TYPE * addrlen #if defined(IPv6) && defined(AF_INET6) , struct addrinfo **aip, struct addrinfo **aifirstp #endif ) { #if defined(IPv6) && defined(AF_INET6) struct addrinfo *ai; struct addrinfo hints; char portstr[6]; char *pport = portstr; int gaierr; memset(&hints, 0, sizeof(hints)); hints.ai_socktype = socktype; if (port == 0) { pport = NULL; } else if (port > 0 && port < 65535) { snprintf(portstr, sizeof(portstr), "%d", port); } else { FatalError("Xserver: port out of range: %d\n", port); } if (*aifirstp != NULL) { freeaddrinfo(*aifirstp); *aifirstp = NULL; } if ((gaierr = getaddrinfo(namestr, pport, &hints, aifirstp)) == 0) { for (ai = *aifirstp; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET || ai->ai_family == AF_INET6) break; } if ((ai == NULL) || (ai->ai_addrlen > sizeof(SOCKADDR_TYPE))) { FatalError("Xserver: %s host %s not on supported network type\n", argtype, namestr); } else { *aip = ai; *addrlen = ai->ai_addrlen; memcpy(addr, ai->ai_addr, ai->ai_addrlen); } } else { FatalError("Xserver: %s: %s %s\n", gai_strerror(gaierr), argtype, namestr); } #else struct hostent *hep; #ifdef XTHREADS_NEEDS_BYNAMEPARAMS _Xgethostbynameparams hparams; #endif #if defined(WIN32) && defined(TCPCONN) _XSERVTransWSAStartup(); #endif if (!(hep = _XGethostbyname(namestr, hparams))) { FatalError("Xserver: %s unknown host: %s\n", argtype, namestr); } if (hep->h_length == sizeof(struct in_addr)) { memmove(&addr->sin_addr, hep->h_addr, hep->h_length); *addrlen = sizeof(struct sockaddr_in); addr->sin_family = AF_INET; addr->sin_port = htons(port); } else { FatalError("Xserver: %s host on strange network %s\n", argtype, namestr); } #endif } static void get_manager_by_name(int argc, char **argv, int i) { if ((i + 1) == argc) { FatalError("Xserver: missing %s host name in command line\n", argv[i]); } get_addr_by_name(argv[i], argv[i + 1], xdm_udp_port, SOCK_DGRAM, &ManagerAddress, &ManagerAddressLen #if defined(IPv6) && defined(AF_INET6) , &mgrAddr, &mgrAddrFirst #endif ); } static void get_fromaddr_by_name(int argc, char **argv, int i) { #if defined(IPv6) && defined(AF_INET6) struct addrinfo *ai = NULL; struct addrinfo *aifirst = NULL; #endif if (i == argc) { FatalError("Xserver: missing -from host name in command line\n"); } get_addr_by_name("-from", argv[i], 0, 0, &FromAddress, &FromAddressLen #if defined(IPv6) && defined(AF_INET6) , &ai, &aifirst #endif ); #if defined(IPv6) && defined(AF_INET6) if (aifirst != NULL) freeaddrinfo(aifirst); #endif xdm_from = argv[i]; } #if defined(IPv6) && defined(AF_INET6) static int get_mcast_options(int argc, char **argv, int i) { const char *address = XDM_DEFAULT_MCAST_ADDR6; int hopcount = 1; struct addrinfo hints; char portstr[6]; int gaierr; struct addrinfo *ai, *firstai; if ((i < argc) && (argv[i][0] != '-') && (argv[i][0] != '+')) { address = argv[i++]; if ((i < argc) && (argv[i][0] != '-') && (argv[i][0] != '+')) { hopcount = strtol(argv[i++], NULL, 10); if ((hopcount < 1) || (hopcount > 255)) { FatalError("Xserver: multicast hop count out of range: %d\n", hopcount); } } } if (xdm_udp_port > 0 && xdm_udp_port < 65535) { snprintf(portstr, sizeof(portstr), "%d", xdm_udp_port); } else { FatalError("Xserver: port out of range: %d\n", xdm_udp_port); } memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; if ((gaierr = getaddrinfo(address, portstr, &hints, &firstai)) == 0) { for (ai = firstai; ai != NULL; ai = ai->ai_next) { if (((ai->ai_family == AF_INET) && IN_MULTICAST(((struct sockaddr_in *) ai->ai_addr) ->sin_addr.s_addr)) || ((ai->ai_family == AF_INET6) && IN6_IS_ADDR_MULTICAST(&((struct sockaddr_in6 *) ai->ai_addr) ->sin6_addr))) break; } if (ai == NULL) { FatalError("Xserver: address not supported multicast type %s\n", address); } else { struct multicastinfo *mcastinfo, *mcl; mcastinfo = malloc(sizeof(struct multicastinfo)); mcastinfo->next = NULL; mcastinfo->ai = firstai; mcastinfo->hops = hopcount; if (mcastlist == NULL) { mcastlist = mcastinfo; } else { for (mcl = mcastlist; mcl->next != NULL; mcl = mcl->next) { /* Do nothing - just find end of list */ } mcl->next = mcastinfo; } } } else { FatalError("Xserver: %s: %s\n", gai_strerror(gaierr), address); } return i; } #endif #else static int xdmcp_non_empty; /* avoid complaint by ranlib */ #endif /* XDMCP */ xorg-server-21.1.16/os/busfault.c0000644000175000017500000001003014757411105012237 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include #include #include "misc.h" #include #include #include #include #include #include #include struct busfault { struct xorg_list list; void *addr; size_t size; Bool valid; busfault_notify_ptr notify; void *context; }; static Bool busfaulted; static struct xorg_list busfaults; struct busfault * busfault_register_mmap(void *addr, size_t size, busfault_notify_ptr notify, void *context) { struct busfault *busfault; busfault = calloc(1, sizeof (struct busfault)); if (!busfault) return NULL; busfault->addr = addr; busfault->size = size; busfault->notify = notify; busfault->context = context; busfault->valid = TRUE; xorg_list_add(&busfault->list, &busfaults); return busfault; } void busfault_unregister(struct busfault *busfault) { xorg_list_del(&busfault->list); free(busfault); } void busfault_check(void) { struct busfault *busfault, *tmp; if (!busfaulted) return; busfaulted = FALSE; xorg_list_for_each_entry_safe(busfault, tmp, &busfaults, list) { if (!busfault->valid) (*busfault->notify)(busfault->context); } } static void (*previous_busfault_sigaction)(int sig, siginfo_t *info, void *param); static void busfault_sigaction(int sig, siginfo_t *info, void *param) { void *fault = info->si_addr; struct busfault *iter, *busfault = NULL; void *new_addr; /* Locate the faulting address in our list of shared segments */ xorg_list_for_each_entry(iter, &busfaults, list) { if ((char *) iter->addr <= (char *) fault && (char *) fault < (char *) iter->addr + iter->size) { busfault = iter; break; } } if (!busfault) goto panic; if (!busfault->valid) goto panic; busfault->valid = FALSE; busfaulted = TRUE; /* The client truncated the file; unmap the shared file, map * /dev/zero over that area and keep going */ new_addr = mmap(busfault->addr, busfault->size, PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE|MAP_FIXED, -1, 0); if (new_addr == MAP_FAILED) goto panic; return; panic: if (previous_busfault_sigaction) (*previous_busfault_sigaction)(sig, info, param); else FatalError("bus error\n"); } Bool busfault_init(void) { struct sigaction act, old_act; act.sa_sigaction = busfault_sigaction; act.sa_flags = SA_SIGINFO; sigemptyset(&act.sa_mask); if (sigaction(SIGBUS, &act, &old_act) < 0) return FALSE; previous_busfault_sigaction = old_act.sa_sigaction; xorg_list_init(&busfaults); return TRUE; } xorg-server-21.1.16/present/0000755000175000017500000000000014757411134011375 5xorg-server-21.1.16/present/meson.build0000644000175000017500000000112014757411105013447 srcs_present = [ 'present.c', 'present_event.c', 'present_execute.c', 'present_fake.c', 'present_fence.c', 'present_notify.c', 'present_request.c', 'present_scmd.c', 'present_screen.c', 'present_vblank.c', ] hdrs_present = [ 'present.h', 'presentext.h', ] libxserver_present = static_library('libxserver_present', srcs_present, include_directories: inc, dependencies: [ common_dep, dependency('presentproto', version: '>= 1.2') ], ) if build_xorg install_data(hdrs_present, install_dir: xorgsdkdir) endif xorg-server-21.1.16/present/Makefile.am0000644000175000017500000000053214757411105013347 noinst_LTLIBRARIES = libpresent.la AM_CFLAGS = \ @DIX_CFLAGS@ libpresent_la_SOURCES = \ present.h \ present.c \ present_event.c \ present_execute.c \ present_fake.c \ present_fence.c \ present_notify.c \ present_priv.h \ present_request.c \ present_scmd.c \ present_screen.c \ present_vblank.c sdk_HEADERS = present.h presentext.h xorg-server-21.1.16/present/present.h0000644000175000017500000001506314757411105013151 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _PRESENT_H_ #define _PRESENT_H_ #include #include "randrstr.h" #include "presentext.h" typedef enum { PRESENT_FLIP_REASON_UNKNOWN, PRESENT_FLIP_REASON_BUFFER_FORMAT } PresentFlipReason; typedef struct present_vblank present_vblank_rec, *present_vblank_ptr; /* Return the current CRTC for 'window'. */ typedef RRCrtcPtr (*present_get_crtc_ptr) (WindowPtr window); /* Return the current ust/msc for 'crtc' */ typedef int (*present_get_ust_msc_ptr) (RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc); typedef int (*present_wnmd_get_ust_msc_ptr) (WindowPtr window, uint64_t *ust, uint64_t *msc); /* Queue callback on 'crtc' for time 'msc'. Call present_event_notify with 'event_id' * at or after 'msc'. Return false if it didn't happen (which might occur if 'crtc' * is not currently generating vblanks). */ typedef Bool (*present_queue_vblank_ptr) (RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); typedef Bool (*present_wnmd_queue_vblank_ptr) (WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); /* Abort pending vblank. The extension is no longer interested in * 'event_id' which was to be notified at 'msc'. If possible, the * driver is free to de-queue the notification. */ typedef void (*present_abort_vblank_ptr) (RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); typedef void (*present_wnmd_abort_vblank_ptr) (WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); /* Flush pending drawing on 'window' to the hardware. */ typedef void (*present_flush_ptr) (WindowPtr window); /* Check if 'pixmap' is suitable for flipping to 'window'. */ typedef Bool (*present_check_flip_ptr) (RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip); /* Same as 'check_flip' but it can return a 'reason' why the flip would fail. */ typedef Bool (*present_check_flip2_ptr) (RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip, PresentFlipReason *reason); /* Flip pixmap, return false if it didn't happen. * * 'crtc' is to be used for any necessary synchronization. * * 'sync_flip' requests that the flip be performed at the next * vertical blank interval to avoid tearing artifacts. If false, the * flip should be performed as soon as possible. * * present_event_notify should be called with 'event_id' when the flip * occurs */ typedef Bool (*present_flip_ptr) (RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, PixmapPtr pixmap, Bool sync_flip); /* Flip pixmap for window, return false if it didn't happen. * * Like present_flip_ptr, additionally with: * * 'window' used for synchronization. * */ typedef Bool (*present_wnmd_flip_ptr) (WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, PixmapPtr pixmap, Bool sync_flip, RegionPtr damage); /* "unflip" back to the regular screen scanout buffer * * present_event_notify should be called with 'event_id' when the unflip occurs. */ typedef void (*present_unflip_ptr) (ScreenPtr screen, uint64_t event_id); /* Doing flips has been discontinued. * * Inform driver for potential cleanup on its side. */ typedef void (*present_wnmd_flips_stop_ptr) (WindowPtr window); #define PRESENT_SCREEN_INFO_VERSION 1 typedef struct present_screen_info { uint32_t version; present_get_crtc_ptr get_crtc; present_get_ust_msc_ptr get_ust_msc; present_queue_vblank_ptr queue_vblank; present_abort_vblank_ptr abort_vblank; present_flush_ptr flush; uint32_t capabilities; present_check_flip_ptr check_flip; present_flip_ptr flip; present_unflip_ptr unflip; present_check_flip2_ptr check_flip2; } present_screen_info_rec, *present_screen_info_ptr; /* * Called when 'event_id' occurs. 'ust' and 'msc' indicate when the * event actually happened */ extern _X_EXPORT void present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc); extern _X_EXPORT Bool present_screen_init(ScreenPtr screen, present_screen_info_ptr info); typedef void (*present_complete_notify_proc)(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc); extern _X_EXPORT void present_register_complete_notify(present_complete_notify_proc proc); extern _X_EXPORT Bool present_can_window_flip(WindowPtr window); extern _X_EXPORT uint32_t FakeScreenFps; #endif /* _PRESENT_H_ */ xorg-server-21.1.16/present/presentext.h0000644000175000017500000000244714757411105013674 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _PRESENTEXT_H_ #define _PRESENTEXT_H_ extern _X_EXPORT void present_extension_init(void); #endif /* _PRESENTEXT_H_ */ xorg-server-21.1.16/present/Makefile.in0000644000175000017500000007144114757411116013371 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = present ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(sdk_HEADERS) $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpresent_la_LIBADD = am_libpresent_la_OBJECTS = present.lo present_event.lo \ present_execute.lo present_fake.lo present_fence.lo \ present_notify.lo present_request.lo present_scmd.lo \ present_screen.lo present_vblank.lo libpresent_la_OBJECTS = $(am_libpresent_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/present.Plo \ ./$(DEPDIR)/present_event.Plo ./$(DEPDIR)/present_execute.Plo \ ./$(DEPDIR)/present_fake.Plo ./$(DEPDIR)/present_fence.Plo \ ./$(DEPDIR)/present_notify.Plo ./$(DEPDIR)/present_request.Plo \ ./$(DEPDIR)/present_scmd.Plo ./$(DEPDIR)/present_screen.Plo \ ./$(DEPDIR)/present_vblank.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libpresent_la_SOURCES) DIST_SOURCES = $(libpresent_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libpresent.la AM_CFLAGS = \ @DIX_CFLAGS@ libpresent_la_SOURCES = \ present.h \ present.c \ present_event.c \ present_execute.c \ present_fake.c \ present_fence.c \ present_notify.c \ present_priv.h \ present_request.c \ present_scmd.c \ present_screen.c \ present_vblank.c sdk_HEADERS = present.h presentext.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign present/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign present/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libpresent.la: $(libpresent_la_OBJECTS) $(libpresent_la_DEPENDENCIES) $(EXTRA_libpresent_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libpresent_la_OBJECTS) $(libpresent_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_event.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_execute.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_fake.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_fence.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_notify.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_request.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_scmd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_screen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/present_vblank.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/present.Plo -rm -f ./$(DEPDIR)/present_event.Plo -rm -f ./$(DEPDIR)/present_execute.Plo -rm -f ./$(DEPDIR)/present_fake.Plo -rm -f ./$(DEPDIR)/present_fence.Plo -rm -f ./$(DEPDIR)/present_notify.Plo -rm -f ./$(DEPDIR)/present_request.Plo -rm -f ./$(DEPDIR)/present_scmd.Plo -rm -f ./$(DEPDIR)/present_screen.Plo -rm -f ./$(DEPDIR)/present_vblank.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/present.Plo -rm -f ./$(DEPDIR)/present_event.Plo -rm -f ./$(DEPDIR)/present_execute.Plo -rm -f ./$(DEPDIR)/present_fake.Plo -rm -f ./$(DEPDIR)/present_fence.Plo -rm -f ./$(DEPDIR)/present_notify.Plo -rm -f ./$(DEPDIR)/present_request.Plo -rm -f ./$(DEPDIR)/present_scmd.Plo -rm -f ./$(DEPDIR)/present_screen.Plo -rm -f ./$(DEPDIR)/present_vblank.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/present/present.c0000644000175000017500000002157514757411105013151 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" #include uint32_t present_query_capabilities(RRCrtcPtr crtc) { present_screen_priv_ptr screen_priv; if (!crtc) return 0; screen_priv = present_screen_priv(crtc->pScreen); if (!screen_priv) return 0; return screen_priv->query_capabilities(screen_priv); } RRCrtcPtr present_get_crtc(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); RRCrtcPtr crtc = NULL; if (!screen_priv) return NULL; crtc = screen_priv->get_crtc(screen_priv, window); if (crtc && !present_screen_priv(crtc->pScreen)) { crtc = RRFirstEnabledCrtc(screen); } if (crtc && !present_screen_priv(crtc->pScreen)) { crtc = NULL; } return crtc; } /* * Copies the update region from a pixmap to the target drawable */ void present_copy_region(DrawablePtr drawable, PixmapPtr pixmap, RegionPtr update, int16_t x_off, int16_t y_off) { ScreenPtr screen = drawable->pScreen; GCPtr gc; gc = GetScratchGC(drawable->depth, screen); if (update) { ChangeGCVal changes[2]; changes[0].val = x_off; changes[1].val = y_off; ChangeGC(serverClient, gc, GCClipXOrigin|GCClipYOrigin, changes); (*gc->funcs->ChangeClip)(gc, CT_REGION, update, 0); } ValidateGC(drawable, gc); (*gc->ops->CopyArea)(&pixmap->drawable, drawable, gc, 0, 0, pixmap->drawable.width, pixmap->drawable.height, x_off, y_off); if (update) (*gc->funcs->ChangeClip)(gc, CT_NONE, NULL, 0); FreeScratchGC(gc); } void present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct present_fence *present_fence) { if (present_fence) present_fence_set_triggered(present_fence); if (window) { DebugPresent(("\ti %08" PRIx32 "\n", pixmap ? pixmap->drawable.id : 0)); present_send_idle_notify(window, serial, pixmap, present_fence); } } struct pixmap_visit { PixmapPtr old; PixmapPtr new; }; static int present_set_tree_pixmap_visit(WindowPtr window, void *data) { struct pixmap_visit *visit = data; ScreenPtr screen = window->drawable.pScreen; if ((*screen->GetWindowPixmap)(window) != visit->old) return WT_DONTWALKCHILDREN; (*screen->SetWindowPixmap)(window, visit->new); return WT_WALKCHILDREN; } void present_set_tree_pixmap(WindowPtr window, PixmapPtr expected, PixmapPtr pixmap) { struct pixmap_visit visit; ScreenPtr screen = window->drawable.pScreen; visit.old = (*screen->GetWindowPixmap)(window); if (expected && visit.old != expected) return; visit.new = pixmap; if (visit.old == visit.new) return; TraverseTree(window, present_set_tree_pixmap_visit, &visit); } Bool present_can_window_flip(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); return screen_priv->can_window_flip(window); } uint64_t present_get_target_msc(uint64_t target_msc_arg, uint64_t crtc_msc, uint64_t divisor, uint64_t remainder, uint32_t options) { const Bool synced_flip = !(options & PresentOptionAsync); uint64_t target_msc; /* If the specified target-msc lies in the future, then this * defines the target-msc according to Present protocol. */ if (msc_is_after(target_msc_arg, crtc_msc)) return target_msc_arg; /* If no divisor is specified, the modulo is undefined * and we do present instead asap. */ if (divisor == 0) { target_msc = crtc_msc; /* When no async presentation is forced, by default we sync the * presentation with vblank. But in this case we can't target * the current crtc-msc, which already has begun, but must aim * for the upcoming one. */ if (synced_flip) target_msc++; return target_msc; } /* Calculate target-msc by the specified modulo parameters. According * to Present protocol this is after the next field with: * * field-msc % divisor == remainder. * * The following formula calculates a target_msc solving above equation * and with |target_msc - crtc_msc| < divisor. * * Example with crtc_msc = 10, divisor = 4 and remainder = 3, 2, 1, 0: * 11 = 10 - 2 + 3 = 10 - (10 % 4) + 3, * 10 = 10 - 2 + 2 = 10 - (10 % 4) + 2, * 9 = 10 - 2 + 1 = 10 - (10 % 4) + 1, * 8 = 10 - 2 + 0 = 10 - (10 % 4) + 0. */ target_msc = crtc_msc - (crtc_msc % divisor) + remainder; /* Here we already found the correct field-msc. */ if (msc_is_after(target_msc, crtc_msc)) return target_msc; /* * Here either: * a) target_msc == crtc_msc, i.e. crtc_msc actually solved * above equation with crtc_msc % divisor == remainder. * * => This means we want to present at target_msc + divisor for a synced * flip or directly now for an async flip. * * b) target_msc < crtc_msc with target_msc + divisor > crtc_msc. * * => This means in any case we want to present at target_msc + divisor. */ if (synced_flip || msc_is_after(crtc_msc, target_msc)) target_msc += divisor; return target_msc; } int present_pixmap(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, uint64_t window_msc, uint64_t divisor, uint64_t remainder, present_notify_ptr notifies, int num_notifies) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); return screen_priv->present_pixmap(window, pixmap, serial, valid, update, x_off, y_off, target_crtc, wait_fence, idle_fence, options, window_msc, divisor, remainder, notifies, num_notifies); } int present_notify_msc(WindowPtr window, CARD32 serial, uint64_t target_msc, uint64_t divisor, uint64_t remainder) { return present_pixmap(window, NULL, serial, NULL, NULL, 0, 0, NULL, NULL, NULL, divisor == 0 ? PresentOptionAsync : 0, target_msc, divisor, remainder, NULL, 0); } xorg-server-21.1.16/present/present_event.c0000644000175000017500000001746414757411105014354 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" static RESTYPE present_event_type; static int present_free_event(void *data, XID id) { present_event_ptr present_event = (present_event_ptr) data; present_window_priv_ptr window_priv = present_window_priv(present_event->window); present_event_ptr *previous, current; for (previous = &window_priv->events; (current = *previous); previous = ¤t->next) { if (current == present_event) { *previous = present_event->next; break; } } free((void *) present_event); return 1; } void present_free_events(WindowPtr window) { present_window_priv_ptr window_priv = present_window_priv(window); present_event_ptr event; if (!window_priv) return; while ((event = window_priv->events)) FreeResource(event->id, RT_NONE); } static void present_event_swap(xGenericEvent *from, xGenericEvent *to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); switch (from->evtype) { case PresentConfigureNotify: { xPresentConfigureNotify *c = (xPresentConfigureNotify *) to; swapl(&c->eid); swapl(&c->window); swaps(&c->x); swaps(&c->y); swaps(&c->width); swaps(&c->height); swaps(&c->off_x); swaps(&c->off_y); swaps(&c->pixmap_width); swaps(&c->pixmap_height); swapl(&c->pixmap_flags); break; } case PresentCompleteNotify: { xPresentCompleteNotify *c = (xPresentCompleteNotify *) to; swapl(&c->eid); swapl(&c->window); swapl(&c->serial); swapll(&c->ust); swapll(&c->msc); break; } case PresentIdleNotify: { xPresentIdleNotify *c = (xPresentIdleNotify *) to; swapl(&c->eid); swapl(&c->window); swapl(&c->serial); swapl(&c->idle_fence); break; } } } void present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling, CARD32 flags) { present_window_priv_ptr window_priv = present_window_priv(window); if (window_priv) { xPresentConfigureNotify cn = { .type = GenericEvent, .extension = present_request, .length = (sizeof(xPresentConfigureNotify) - 32) >> 2, .evtype = PresentConfigureNotify, .eid = 0, .window = window->drawable.id, .x = x, .y = y, .width = w, .height = h, .off_x = 0, .off_y = 0, .pixmap_width = w, .pixmap_height = h, .pixmap_flags = flags }; present_event_ptr event; for (event = window_priv->events; event; event = event->next) { if (event->mask & (1 << PresentConfigureNotify)) { cn.eid = event->id; WriteEventsToClient(event->client, 1, (xEvent *) &cn); } } } } static present_complete_notify_proc complete_notify; void present_register_complete_notify(present_complete_notify_proc proc) { complete_notify = proc; } void present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc) { present_window_priv_ptr window_priv = present_window_priv(window); if (window_priv) { xPresentCompleteNotify cn = { .type = GenericEvent, .extension = present_request, .length = (sizeof(xPresentCompleteNotify) - 32) >> 2, .evtype = PresentCompleteNotify, .kind = kind, .mode = mode, .eid = 0, .window = window->drawable.id, .serial = serial, .ust = ust, .msc = msc, }; present_event_ptr event; for (event = window_priv->events; event; event = event->next) { if (event->mask & PresentCompleteNotifyMask) { cn.eid = event->id; WriteEventsToClient(event->client, 1, (xEvent *) &cn); } } } if (complete_notify) (*complete_notify)(window, kind, mode, serial, ust, msc); } void present_send_idle_notify(WindowPtr window, CARD32 serial, PixmapPtr pixmap, struct present_fence *idle_fence) { present_window_priv_ptr window_priv = present_window_priv(window); if (window_priv) { xPresentIdleNotify in = { .type = GenericEvent, .extension = present_request, .length = (sizeof(xPresentIdleNotify) - 32) >> 2, .evtype = PresentIdleNotify, .eid = 0, .window = window->drawable.id, .serial = serial, .pixmap = pixmap->drawable.id, .idle_fence = present_fence_id(idle_fence) }; present_event_ptr event; for (event = window_priv->events; event; event = event->next) { if (event->mask & PresentIdleNotifyMask) { in.eid = event->id; WriteEventsToClient(event->client, 1, (xEvent *) &in); } } } } int present_select_input(ClientPtr client, XID eid, WindowPtr window, CARD32 mask) { present_window_priv_ptr window_priv; present_event_ptr event; int ret; /* Check to see if we're modifying an existing event selection */ ret = dixLookupResourceByType((void **) &event, eid, present_event_type, client, DixWriteAccess); if (ret == Success) { /* Match error for the wrong window; also don't modify some other * client's event selection */ if (event->window != window || event->client != client) return BadMatch; if (mask) event->mask = mask; else FreeResource(eid, RT_NONE); return Success; } if (ret != BadValue) return ret; if (mask == 0) return Success; LEGAL_NEW_RESOURCE(eid, client); window_priv = present_get_window_priv(window, TRUE); if (!window_priv) return BadAlloc; event = calloc (1, sizeof (present_event_rec)); if (!event) return BadAlloc; event->client = client; event->window = window; event->id = eid; event->mask = mask; event->next = window_priv->events; window_priv->events = event; if (!AddResource(event->id, present_event_type, (void *) event)) return BadAlloc; return Success; } Bool present_event_init(void) { present_event_type = CreateNewResourceType(present_free_event, "PresentEvent"); if (!present_event_type) return FALSE; GERegisterExtension(present_request, present_event_swap); return TRUE; } xorg-server-21.1.16/present/present_execute.c0000644000175000017500000001041314757411105014660 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" /* * Called when the wait fence is triggered; just gets the current msc/ust and * calls the proper execute again. That will re-check the fence and pend the * request again if it's still not actually ready */ static void present_wait_fence_triggered(void *param) { present_vblank_ptr vblank = param; ScreenPtr screen = vblank->screen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); screen_priv->re_execute(vblank); } Bool present_execute_wait(present_vblank_ptr vblank, uint64_t crtc_msc) { WindowPtr window = vblank->window; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); /* We may have to requeue for the next MSC if check_flip_window prevented * using a flip. */ if (vblank->exec_msc == crtc_msc + 1 && screen_priv->queue_vblank(screen, window, vblank->crtc, vblank->event_id, vblank->exec_msc) == Success) return TRUE; if (vblank->wait_fence) { if (!present_fence_check_triggered(vblank->wait_fence)) { present_fence_set_callback(vblank->wait_fence, present_wait_fence_triggered, vblank); return TRUE; } } return FALSE; } void present_execute_copy(present_vblank_ptr vblank, uint64_t crtc_msc) { WindowPtr window = vblank->window; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); /* If present_flip failed, we may have to requeue for the next MSC */ if (vblank->exec_msc == crtc_msc + 1 && Success == screen_priv->queue_vblank(screen, window, vblank->crtc, vblank->event_id, vblank->exec_msc)) { vblank->queued = TRUE; return; } present_copy_region(&window->drawable, vblank->pixmap, vblank->update, vblank->x_off, vblank->y_off); /* present_copy_region sticks the region into a scratch GC, * which is then freed, freeing the region */ vblank->update = NULL; screen_priv->flush(window); present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); } void present_execute_post(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { uint8_t mode; /* Compute correct CompleteMode */ if (vblank->kind == PresentCompleteKindPixmap) { if (vblank->pixmap && vblank->window) { if (vblank->has_suboptimal && vblank->reason == PRESENT_FLIP_REASON_BUFFER_FORMAT) mode = PresentCompleteModeSuboptimalCopy; else mode = PresentCompleteModeCopy; } else { mode = PresentCompleteModeSkip; } } else mode = PresentCompleteModeCopy; present_vblank_notify(vblank, vblank->kind, mode, ust, crtc_msc); present_vblank_destroy(vblank); } xorg-server-21.1.16/present/present_fake.c0000644000175000017500000001110214757411105014120 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" #include "list.h" static struct xorg_list fake_vblank_queue; typedef struct present_fake_vblank { struct xorg_list list; uint64_t event_id; OsTimerPtr timer; ScreenPtr screen; } present_fake_vblank_rec, *present_fake_vblank_ptr; int present_fake_get_ust_msc(ScreenPtr screen, uint64_t *ust, uint64_t *msc) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); *ust = GetTimeInMicros(); *msc = (*ust + screen_priv->fake_interval / 2) / screen_priv->fake_interval; return Success; } static void present_fake_notify(ScreenPtr screen, uint64_t event_id) { uint64_t ust, msc; present_fake_get_ust_msc(screen, &ust, &msc); present_event_notify(event_id, ust, msc); } static CARD32 present_fake_do_timer(OsTimerPtr timer, CARD32 time, void *arg) { present_fake_vblank_ptr fake_vblank = arg; present_fake_notify(fake_vblank->screen, fake_vblank->event_id); xorg_list_del(&fake_vblank->list); TimerFree(fake_vblank->timer); free(fake_vblank); return 0; } void present_fake_abort_vblank(ScreenPtr screen, uint64_t event_id, uint64_t msc) { present_fake_vblank_ptr fake_vblank, tmp; xorg_list_for_each_entry_safe(fake_vblank, tmp, &fake_vblank_queue, list) { if (fake_vblank->event_id == event_id) { TimerFree(fake_vblank->timer); /* TimerFree will call TimerCancel() */ xorg_list_del(&fake_vblank->list); free (fake_vblank); break; } } } int present_fake_queue_vblank(ScreenPtr screen, uint64_t event_id, uint64_t msc) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); uint64_t ust = msc * screen_priv->fake_interval; uint64_t now = GetTimeInMicros(); INT32 delay = ((int64_t) (ust - now)) / 1000; present_fake_vblank_ptr fake_vblank; if (delay <= 0) { present_fake_notify(screen, event_id); return Success; } fake_vblank = calloc (1, sizeof (present_fake_vblank_rec)); if (!fake_vblank) return BadAlloc; fake_vblank->screen = screen; fake_vblank->event_id = event_id; fake_vblank->timer = TimerSet(NULL, 0, delay, present_fake_do_timer, fake_vblank); if (!fake_vblank->timer) { free(fake_vblank); return BadAlloc; } xorg_list_add(&fake_vblank->list, &fake_vblank_queue); return Success; } uint32_t FakeScreenFps = 0; void present_fake_screen_init(ScreenPtr screen) { uint32_t fake_fps; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (FakeScreenFps) fake_fps = FakeScreenFps; else { /* For screens with hardware vblank support, the fake code * will be used for off-screen windows and while screens are blanked, * in which case we want a large interval here: 1Hz * * Otherwise, pretend that the screen runs at 60Hz */ if (screen_priv->info && screen_priv->info->get_crtc) fake_fps = 1; else fake_fps = 60; } screen_priv->fake_interval = 1000000 / fake_fps; } void present_fake_queue_init(void) { xorg_list_init(&fake_vblank_queue); } xorg-server-21.1.16/present/present_fence.c0000644000175000017500000001015114757411105014275 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" #include #include #include /* * Wraps SyncFence objects so we can add a SyncTrigger to find out * when the SyncFence gets destroyed and clean up appropriately */ struct present_fence { SyncTrigger trigger; SyncFence *fence; void (*callback)(void *param); void *param; }; /* * SyncTrigger callbacks */ static Bool present_fence_sync_check_trigger(SyncTrigger *trigger, int64_t oldval) { struct present_fence *present_fence = container_of(trigger, struct present_fence, trigger); return present_fence->callback != NULL; } static void present_fence_sync_trigger_fired(SyncTrigger *trigger) { struct present_fence *present_fence = container_of(trigger, struct present_fence, trigger); if (present_fence->callback) (*present_fence->callback)(present_fence->param); } static void present_fence_sync_counter_destroyed(SyncTrigger *trigger) { struct present_fence *present_fence = container_of(trigger, struct present_fence, trigger); present_fence->fence = NULL; } struct present_fence * present_fence_create(SyncFence *fence) { struct present_fence *present_fence; present_fence = calloc (1, sizeof (struct present_fence)); if (!present_fence) return NULL; present_fence->fence = fence; present_fence->trigger.pSync = (SyncObject *) fence; present_fence->trigger.CheckTrigger = present_fence_sync_check_trigger; present_fence->trigger.TriggerFired = present_fence_sync_trigger_fired; present_fence->trigger.CounterDestroyed = present_fence_sync_counter_destroyed; if (SyncAddTriggerToSyncObject(&present_fence->trigger) != Success) { free (present_fence); return NULL; } return present_fence; } void present_fence_destroy(struct present_fence *present_fence) { if (present_fence) { if (present_fence->fence) SyncDeleteTriggerFromSyncObject(&present_fence->trigger); free(present_fence); } } void present_fence_set_triggered(struct present_fence *present_fence) { if (present_fence) if (present_fence->fence) (*present_fence->fence->funcs.SetTriggered) (present_fence->fence); } Bool present_fence_check_triggered(struct present_fence *present_fence) { if (!present_fence) return TRUE; if (!present_fence->fence) return TRUE; return (*present_fence->fence->funcs.CheckTriggered)(present_fence->fence); } void present_fence_set_callback(struct present_fence *present_fence, void (*callback) (void *param), void *param) { present_fence->callback = callback; present_fence->param = param; } XID present_fence_id(struct present_fence *present_fence) { if (!present_fence) return None; if (!present_fence->fence) return None; return present_fence->fence->sync.id; } xorg-server-21.1.16/present/present_notify.c0000644000175000017500000000630414757411105014532 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" /* * Mark all pending notifies for 'window' as invalid when * the window is destroyed */ void present_clear_window_notifies(WindowPtr window) { present_notify_ptr notify; present_window_priv_ptr window_priv = present_window_priv(window); if (!window_priv) return; xorg_list_for_each_entry(notify, &window_priv->notifies, window_list) { notify->window = NULL; } } /* * 'notify' is being freed; remove it from the window's notify list */ void present_free_window_notify(present_notify_ptr notify) { xorg_list_del(¬ify->window_list); } /* * 'notify' is new; add it to the specified window */ int present_add_window_notify(present_notify_ptr notify) { WindowPtr window = notify->window; present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); if (!window_priv) return BadAlloc; xorg_list_add(¬ify->window_list, &window_priv->notifies); return Success; } int present_create_notifies(ClientPtr client, int num_notifies, xPresentNotify *x_notifies, present_notify_ptr *p_notifies) { present_notify_ptr notifies; int i; int added = 0; int status; notifies = calloc (num_notifies, sizeof (present_notify_rec)); if (!notifies) return BadAlloc; for (i = 0; i < num_notifies; i++) { status = dixLookupWindow(¬ifies[i].window, x_notifies[i].window, client, DixGetAttrAccess); if (status != Success) goto bail; notifies[i].serial = x_notifies[i].serial; status = present_add_window_notify(¬ifies[i]); if (status != Success) goto bail; added = i; } return Success; bail: present_destroy_notifies(notifies, added); return status; } void present_destroy_notifies(present_notify_ptr notifies, int num_notifies) { int i; for (i = 0; i < num_notifies; i++) present_free_window_notify(¬ifies[i]); free(notifies); } xorg-server-21.1.16/present/present_priv.h0000644000175000017500000003611314757411105014210 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _PRESENT_PRIV_H_ #define _PRESENT_PRIV_H_ #include "dix-config.h" #include #include "scrnintstr.h" #include "misc.h" #include "list.h" #include "windowstr.h" #include "dixstruct.h" #include "present.h" #include #include #include #include #include #if 0 #define DebugPresent(x) ErrorF x #else #define DebugPresent(x) #endif /* XXX this belongs in presentproto */ #ifndef PresentWindowDestroyed #define PresentWindowDestroyed (1 << 0) #endif extern int present_request; extern DevPrivateKeyRec present_screen_private_key; typedef struct present_fence *present_fence_ptr; typedef struct present_notify present_notify_rec, *present_notify_ptr; struct present_notify { struct xorg_list window_list; WindowPtr window; CARD32 serial; }; struct present_vblank { struct xorg_list window_list; struct xorg_list event_queue; ScreenPtr screen; WindowPtr window; PixmapPtr pixmap; RegionPtr valid; RegionPtr update; RRCrtcPtr crtc; uint32_t serial; int16_t x_off; int16_t y_off; CARD16 kind; uint64_t event_id; uint64_t target_msc; /* target MSC when present should complete */ uint64_t exec_msc; /* MSC at which present can be executed */ uint64_t msc_offset; present_fence_ptr idle_fence; present_fence_ptr wait_fence; present_notify_ptr notifies; int num_notifies; Bool queued; /* on present_exec_queue */ Bool flip; /* planning on using flip */ Bool flip_ready; /* wants to flip, but waiting for previous flip or unflip */ Bool sync_flip; /* do flip synchronous to vblank */ Bool abort_flip; /* aborting this flip */ PresentFlipReason reason; /* reason for which flip is not possible */ Bool has_suboptimal; /* whether client can support SuboptimalCopy mode */ }; typedef struct present_screen_priv present_screen_priv_rec, *present_screen_priv_ptr; typedef struct present_window_priv present_window_priv_rec, *present_window_priv_ptr; /* * Mode hooks */ typedef uint32_t (*present_priv_query_capabilities_ptr)(present_screen_priv_ptr screen_priv); typedef RRCrtcPtr (*present_priv_get_crtc_ptr)(present_screen_priv_ptr screen_priv, WindowPtr window); typedef Bool (*present_priv_check_flip_ptr)(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip, RegionPtr valid, int16_t x_off, int16_t y_off, PresentFlipReason *reason); typedef void (*present_priv_check_flip_window_ptr)(WindowPtr window); typedef Bool (*present_priv_can_window_flip_ptr)(WindowPtr window); typedef void (*present_priv_clear_window_flip_ptr)(WindowPtr window); typedef int (*present_priv_pixmap_ptr)(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, uint64_t window_msc, uint64_t divisor, uint64_t remainder, present_notify_ptr notifies, int num_notifies); typedef int (*present_priv_queue_vblank_ptr)(ScreenPtr screen, WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); typedef void (*present_priv_flush_ptr)(WindowPtr window); typedef void (*present_priv_re_execute_ptr)(present_vblank_ptr vblank); typedef void (*present_priv_abort_vblank_ptr)(ScreenPtr screen, WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); typedef void (*present_priv_flip_destroy_ptr)(ScreenPtr screen); struct present_screen_priv { CloseScreenProcPtr CloseScreen; ConfigNotifyProcPtr ConfigNotify; DestroyWindowProcPtr DestroyWindow; ClipNotifyProcPtr ClipNotify; present_vblank_ptr flip_pending; uint64_t unflip_event_id; uint32_t fake_interval; /* Currently active flipped pixmap and fence */ RRCrtcPtr flip_crtc; WindowPtr flip_window; uint32_t flip_serial; PixmapPtr flip_pixmap; present_fence_ptr flip_idle_fence; Bool flip_sync; present_screen_info_ptr info; /* Mode hooks */ present_priv_query_capabilities_ptr query_capabilities; present_priv_get_crtc_ptr get_crtc; present_priv_check_flip_ptr check_flip; present_priv_check_flip_window_ptr check_flip_window; present_priv_can_window_flip_ptr can_window_flip; present_priv_clear_window_flip_ptr clear_window_flip; present_priv_pixmap_ptr present_pixmap; present_priv_queue_vblank_ptr queue_vblank; present_priv_flush_ptr flush; present_priv_re_execute_ptr re_execute; present_priv_abort_vblank_ptr abort_vblank; present_priv_flip_destroy_ptr flip_destroy; }; #define wrap(priv,real,mem,func) {\ priv->mem = real->mem; \ real->mem = func; \ } #define unwrap(priv,real,mem) {\ real->mem = priv->mem; \ } static inline present_screen_priv_ptr present_screen_priv(ScreenPtr screen) { return (present_screen_priv_ptr)dixLookupPrivate(&(screen)->devPrivates, &present_screen_private_key); } /* * Each window has a list of clients and event masks */ typedef struct present_event *present_event_ptr; typedef struct present_event { present_event_ptr next; ClientPtr client; WindowPtr window; XID id; int mask; } present_event_rec; struct present_window_priv { WindowPtr window; present_event_ptr events; RRCrtcPtr crtc; /* Last reported CRTC from get_ust_msc */ uint64_t msc_offset; uint64_t msc; /* Last reported MSC from the current crtc */ struct xorg_list vblank; struct xorg_list notifies; }; #define PresentCrtcNeverSet ((RRCrtcPtr) 1) extern DevPrivateKeyRec present_window_private_key; static inline present_window_priv_ptr present_window_priv(WindowPtr window) { return (present_window_priv_ptr)dixGetPrivate(&(window)->devPrivates, &present_window_private_key); } present_window_priv_ptr present_get_window_priv(WindowPtr window, Bool create); /* * Returns: * TRUE if the first MSC value is after the second one * FALSE if the first MSC value is equal to or before the second one */ static inline Bool msc_is_after(uint64_t test, uint64_t reference) { return (int64_t)(test - reference) > 0; } /* * present.c */ uint32_t present_query_capabilities(RRCrtcPtr crtc); RRCrtcPtr present_get_crtc(WindowPtr window); void present_copy_region(DrawablePtr drawable, PixmapPtr pixmap, RegionPtr update, int16_t x_off, int16_t y_off); void present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct present_fence *present_fence); void present_set_tree_pixmap(WindowPtr window, PixmapPtr expected, PixmapPtr pixmap); uint64_t present_get_target_msc(uint64_t target_msc_arg, uint64_t crtc_msc, uint64_t divisor, uint64_t remainder, uint32_t options); int present_pixmap(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, uint64_t target_msc, uint64_t divisor, uint64_t remainder, present_notify_ptr notifies, int num_notifies); int present_notify_msc(WindowPtr window, CARD32 serial, uint64_t target_msc, uint64_t divisor, uint64_t remainder); /* * present_event.c */ void present_free_events(WindowPtr window); void present_send_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling, CARD32 flags); void present_send_complete_notify(WindowPtr window, CARD8 kind, CARD8 mode, CARD32 serial, uint64_t ust, uint64_t msc); void present_send_idle_notify(WindowPtr window, CARD32 serial, PixmapPtr pixmap, present_fence_ptr idle_fence); int present_select_input(ClientPtr client, CARD32 eid, WindowPtr window, CARD32 event_mask); Bool present_event_init(void); /* * present_execute.c */ Bool present_execute_wait(present_vblank_ptr vblank, uint64_t crtc_msc); void present_execute_copy(present_vblank_ptr vblank, uint64_t crtc_msc); void present_execute_post(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); /* * present_fake.c */ int present_fake_get_ust_msc(ScreenPtr screen, uint64_t *ust, uint64_t *msc); int present_fake_queue_vblank(ScreenPtr screen, uint64_t event_id, uint64_t msc); void present_fake_abort_vblank(ScreenPtr screen, uint64_t event_id, uint64_t msc); void present_fake_screen_init(ScreenPtr screen); void present_fake_queue_init(void); /* * present_fence.c */ struct present_fence * present_fence_create(SyncFence *sync_fence); void present_fence_destroy(struct present_fence *present_fence); void present_fence_set_triggered(struct present_fence *present_fence); Bool present_fence_check_triggered(struct present_fence *present_fence); void present_fence_set_callback(struct present_fence *present_fence, void (*callback)(void *param), void *param); XID present_fence_id(struct present_fence *present_fence); /* * present_notify.c */ void present_clear_window_notifies(WindowPtr window); void present_free_window_notify(present_notify_ptr notify); int present_add_window_notify(present_notify_ptr notify); int present_create_notifies(ClientPtr client, int num_notifies, xPresentNotify *x_notifies, present_notify_ptr *p_notifies); void present_destroy_notifies(present_notify_ptr notifies, int num_notifies); /* * present_redirect.c */ WindowPtr present_redirect(ClientPtr client, WindowPtr target); /* * present_request.c */ int proc_present_dispatch(ClientPtr client); int sproc_present_dispatch(ClientPtr client); /* * present_scmd.c */ void present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc); void present_flip_destroy(ScreenPtr screen); void present_restore_screen_pixmap(ScreenPtr screen); void present_set_abort_flip(ScreenPtr screen); Bool present_init(void); void present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv); /* * present_screen.c */ Bool present_screen_register_priv_keys(void); present_screen_priv_ptr present_screen_priv_init(ScreenPtr screen); /* * present_vblank.c */ void present_vblank_notify(present_vblank_ptr vblank, CARD8 kind, CARD8 mode, uint64_t ust, uint64_t crtc_msc); Bool present_vblank_init(present_vblank_ptr vblank, WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, const uint32_t capabilities, present_notify_ptr notifies, int num_notifies, uint64_t target_msc, uint64_t crtc_msc); present_vblank_ptr present_vblank_create(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, const uint32_t capabilities, present_notify_ptr notifies, int num_notifies, uint64_t target_msc, uint64_t crtc_msc); void present_vblank_scrap(present_vblank_ptr vblank); void present_vblank_destroy(present_vblank_ptr vblank); #endif /* _PRESENT_PRIV_H_ */ xorg-server-21.1.16/present/present_request.c0000644000175000017500000002555414757411105014722 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" #include "randrstr.h" #include static int proc_present_query_version(ClientPtr client) { REQUEST(xPresentQueryVersionReq); xPresentQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_PRESENT_MAJOR_VERSION, .minorVersion = SERVER_PRESENT_MINOR_VERSION }; REQUEST_SIZE_MATCH(xPresentQueryVersionReq); /* From presentproto: * * The client sends the highest supported version to the server * and the server sends the highest version it supports, but no * higher than the requested version. */ if (rep.majorVersion > stuff->majorVersion || rep.minorVersion > stuff->minorVersion) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(rep), &rep); return Success; } #define VERIFY_FENCE_OR_NONE(fence_ptr, fence_id, client, access) do { \ if ((fence_id) == None) \ (fence_ptr) = NULL; \ else { \ int __rc__ = SyncVerifyFence(&fence_ptr, fence_id, client, access); \ if (__rc__ != Success) \ return __rc__; \ } \ } while (0) #define VERIFY_CRTC_OR_NONE(crtc_ptr, crtc_id, client, access) do { \ if ((crtc_id) == None) \ (crtc_ptr) = NULL; \ else { \ VERIFY_RR_CRTC(crtc_id, crtc_ptr, access); \ } \ } while (0) static int proc_present_pixmap(ClientPtr client) { REQUEST(xPresentPixmapReq); WindowPtr window; PixmapPtr pixmap; RegionPtr valid = NULL; RegionPtr update = NULL; SyncFence *wait_fence; SyncFence *idle_fence; RRCrtcPtr target_crtc; int ret; int nnotifies; present_notify_ptr notifies = NULL; REQUEST_AT_LEAST_SIZE(xPresentPixmapReq); ret = dixLookupWindow(&window, stuff->window, client, DixWriteAccess); if (ret != Success) return ret; ret = dixLookupResourceByType((void **) &pixmap, stuff->pixmap, RT_PIXMAP, client, DixReadAccess); if (ret != Success) return ret; if (window->drawable.depth != pixmap->drawable.depth) return BadMatch; VERIFY_REGION_OR_NONE(valid, stuff->valid, client, DixReadAccess); VERIFY_REGION_OR_NONE(update, stuff->update, client, DixReadAccess); VERIFY_CRTC_OR_NONE(target_crtc, stuff->target_crtc, client, DixReadAccess); VERIFY_FENCE_OR_NONE(wait_fence, stuff->wait_fence, client, DixReadAccess); VERIFY_FENCE_OR_NONE(idle_fence, stuff->idle_fence, client, DixWriteAccess); if (stuff->options & ~(PresentAllOptions)) { client->errorValue = stuff->options; return BadValue; } /* * Check to see if remainder is sane */ if (stuff->divisor == 0) { if (stuff->remainder != 0) { client->errorValue = (CARD32) stuff->remainder; return BadValue; } } else { if (stuff->remainder >= stuff->divisor) { client->errorValue = (CARD32) stuff->remainder; return BadValue; } } nnotifies = (client->req_len << 2) - sizeof (xPresentPixmapReq); if (nnotifies % sizeof (xPresentNotify)) return BadLength; nnotifies /= sizeof (xPresentNotify); if (nnotifies) { ret = present_create_notifies(client, nnotifies, (xPresentNotify *) (stuff + 1), ¬ifies); if (ret != Success) return ret; } ret = present_pixmap(window, pixmap, stuff->serial, valid, update, stuff->x_off, stuff->y_off, target_crtc, wait_fence, idle_fence, stuff->options, stuff->target_msc, stuff->divisor, stuff->remainder, notifies, nnotifies); if (ret != Success) present_destroy_notifies(notifies, nnotifies); return ret; } static int proc_present_notify_msc(ClientPtr client) { REQUEST(xPresentNotifyMSCReq); WindowPtr window; int rc; REQUEST_SIZE_MATCH(xPresentNotifyMSCReq); rc = dixLookupWindow(&window, stuff->window, client, DixReadAccess); if (rc != Success) return rc; /* * Check to see if remainder is sane */ if (stuff->divisor == 0) { if (stuff->remainder != 0) { client->errorValue = (CARD32) stuff->remainder; return BadValue; } } else { if (stuff->remainder >= stuff->divisor) { client->errorValue = (CARD32) stuff->remainder; return BadValue; } } return present_notify_msc(window, stuff->serial, stuff->target_msc, stuff->divisor, stuff->remainder); } static int proc_present_select_input (ClientPtr client) { REQUEST(xPresentSelectInputReq); WindowPtr window; int rc; REQUEST_SIZE_MATCH(xPresentSelectInputReq); rc = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~PresentAllEvents) { client->errorValue = stuff->eventMask; return BadValue; } return present_select_input(client, stuff->eid, window, stuff->eventMask); } static int proc_present_query_capabilities (ClientPtr client) { REQUEST(xPresentQueryCapabilitiesReq); xPresentQueryCapabilitiesReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, }; WindowPtr window; RRCrtcPtr crtc = NULL; int r; REQUEST_SIZE_MATCH(xPresentQueryCapabilitiesReq); r = dixLookupWindow(&window, stuff->target, client, DixGetAttrAccess); switch (r) { case Success: crtc = present_get_crtc(window); break; case BadWindow: VERIFY_RR_CRTC(stuff->target, crtc, DixGetAttrAccess); break; default: return r; } rep.capabilities = present_query_capabilities(crtc); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.capabilities); } WriteToClient(client, sizeof(rep), &rep); return Success; } static int (*proc_present_vector[PresentNumberRequests]) (ClientPtr) = { proc_present_query_version, /* 0 */ proc_present_pixmap, /* 1 */ proc_present_notify_msc, /* 2 */ proc_present_select_input, /* 3 */ proc_present_query_capabilities, /* 4 */ }; int proc_present_dispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= PresentNumberRequests || !proc_present_vector[stuff->data]) return BadRequest; return (*proc_present_vector[stuff->data]) (client); } static int _X_COLD sproc_present_query_version(ClientPtr client) { REQUEST(xPresentQueryVersionReq); REQUEST_SIZE_MATCH(xPresentQueryVersionReq); swaps(&stuff->length); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*proc_present_vector[stuff->presentReqType]) (client); } static int _X_COLD sproc_present_pixmap(ClientPtr client) { REQUEST(xPresentPixmapReq); REQUEST_AT_LEAST_SIZE(xPresentPixmapReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->pixmap); swapl(&stuff->valid); swapl(&stuff->update); swaps(&stuff->x_off); swaps(&stuff->y_off); swapll(&stuff->target_msc); swapll(&stuff->divisor); swapll(&stuff->remainder); swapl(&stuff->idle_fence); return (*proc_present_vector[stuff->presentReqType]) (client); } static int _X_COLD sproc_present_notify_msc(ClientPtr client) { REQUEST(xPresentNotifyMSCReq); REQUEST_SIZE_MATCH(xPresentNotifyMSCReq); swaps(&stuff->length); swapl(&stuff->window); swapll(&stuff->target_msc); swapll(&stuff->divisor); swapll(&stuff->remainder); return (*proc_present_vector[stuff->presentReqType]) (client); } static int _X_COLD sproc_present_select_input (ClientPtr client) { REQUEST(xPresentSelectInputReq); REQUEST_SIZE_MATCH(xPresentSelectInputReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->eventMask); return (*proc_present_vector[stuff->presentReqType]) (client); } static int _X_COLD sproc_present_query_capabilities (ClientPtr client) { REQUEST(xPresentQueryCapabilitiesReq); REQUEST_SIZE_MATCH(xPresentQueryCapabilitiesReq); swaps(&stuff->length); swapl(&stuff->target); return (*proc_present_vector[stuff->presentReqType]) (client); } static int (*sproc_present_vector[PresentNumberRequests]) (ClientPtr) = { sproc_present_query_version, /* 0 */ sproc_present_pixmap, /* 1 */ sproc_present_notify_msc, /* 2 */ sproc_present_select_input, /* 3 */ sproc_present_query_capabilities, /* 4 */ }; int _X_COLD sproc_present_dispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= PresentNumberRequests || !sproc_present_vector[stuff->data]) return BadRequest; return (*sproc_present_vector[stuff->data]) (client); } xorg-server-21.1.16/present/present_scmd.c0000644000175000017500000006722714757411105014163 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" #include #include #ifdef MONOTONIC_CLOCK #include #endif /* * Screen flip mode * * Provides the default mode for drivers, that do not * support flips and the full screen flip mode. * */ static uint64_t present_scmd_event_id; static struct xorg_list present_exec_queue; static struct xorg_list present_flip_queue; static void present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); static inline PixmapPtr present_flip_pending_pixmap(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (!screen_priv) return NULL; if (!screen_priv->flip_pending) return NULL; return screen_priv->flip_pending->pixmap; } static Bool present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap, Bool sync_flip, RegionPtr valid, int16_t x_off, int16_t y_off, PresentFlipReason *reason) { ScreenPtr screen = window->drawable.pScreen; PixmapPtr window_pixmap; WindowPtr root = screen->root; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (crtc) { screen_priv = present_screen_priv(crtc->pScreen); } if (reason) *reason = PRESENT_FLIP_REASON_UNKNOWN; if (!screen_priv) return FALSE; if (!screen_priv->info) return FALSE; if (!crtc) return FALSE; /* Check to see if the driver supports flips at all */ if (!screen_priv->info->flip) return FALSE; /* Make sure the window hasn't been redirected with Composite */ window_pixmap = screen->GetWindowPixmap(window); if (window_pixmap != screen->GetScreenPixmap(screen) && window_pixmap != screen_priv->flip_pixmap && window_pixmap != present_flip_pending_pixmap(screen)) return FALSE; /* Check for full-screen window */ if (!RegionEqual(&window->clipList, &root->winSize)) { return FALSE; } /* Source pixmap must align with window exactly */ if (x_off || y_off) { return FALSE; } /* Make sure the area marked as valid fills the screen */ if (valid && !RegionEqual(valid, &root->winSize)) { return FALSE; } /* Does the window match the pixmap exactly? */ if (window->drawable.x != 0 || window->drawable.y != 0 || #ifdef COMPOSITE window->drawable.x != pixmap->screen_x || window->drawable.y != pixmap->screen_y || #endif window->drawable.width != pixmap->drawable.width || window->drawable.height != pixmap->drawable.height) { return FALSE; } /* Ask the driver for permission */ if (screen_priv->info->version >= 1 && screen_priv->info->check_flip2) { if (!(*screen_priv->info->check_flip2) (crtc, window, pixmap, sync_flip, reason)) { DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0)); return FALSE; } } else if (screen_priv->info->check_flip) { if (!(*screen_priv->info->check_flip) (crtc, window, pixmap, sync_flip)) { DebugPresent(("\td %08" PRIx32 " -> %08" PRIx32 "\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0)); return FALSE; } } return TRUE; } static Bool present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, PixmapPtr pixmap, Bool sync_flip) { ScreenPtr screen = crtc->pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); return (*screen_priv->info->flip) (crtc, event_id, target_msc, pixmap, sync_flip); } static RRCrtcPtr present_scmd_get_crtc(present_screen_priv_ptr screen_priv, WindowPtr window) { if (!screen_priv->info) return NULL; if (!screen_priv->info->get_crtc) return NULL; return (*screen_priv->info->get_crtc)(window); } static uint32_t present_scmd_query_capabilities(present_screen_priv_ptr screen_priv) { if (!screen_priv->info) return 0; return screen_priv->info->capabilities; } static int present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_screen_priv_ptr crtc_screen_priv = screen_priv; if (crtc) crtc_screen_priv = present_screen_priv(crtc->pScreen); if (crtc == NULL) return present_fake_get_ust_msc(screen, ust, msc); else return (*crtc_screen_priv->info->get_ust_msc)(crtc, ust, msc); } static void present_flush(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (!screen_priv) return; if (!screen_priv->info) return; if (!screen_priv->info->flush) return; (*screen_priv->info->flush) (window); } static int present_queue_vblank(ScreenPtr screen, WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) { Bool ret; if (crtc == NULL) ret = present_fake_queue_vblank(screen, event_id, msc); else { present_screen_priv_ptr screen_priv = present_screen_priv(crtc->pScreen); ret = (*screen_priv->info->queue_vblank) (crtc, event_id, msc); } return ret; } /* * When the wait fence or previous flip is completed, it's time * to re-try the request */ static void present_re_execute(present_vblank_ptr vblank) { uint64_t ust = 0, crtc_msc = 0; if (vblank->crtc) (void) present_get_ust_msc(vblank->screen, vblank->crtc, &ust, &crtc_msc); present_execute(vblank, ust, crtc_msc); } static void present_flip_try_ready(ScreenPtr screen) { present_vblank_ptr vblank; xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { if (vblank->queued) { present_re_execute(vblank); return; } } } static void present_flip_idle(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (screen_priv->flip_pixmap) { present_pixmap_idle(screen_priv->flip_pixmap, screen_priv->flip_window, screen_priv->flip_serial, screen_priv->flip_idle_fence); if (screen_priv->flip_idle_fence) present_fence_destroy(screen_priv->flip_idle_fence); dixDestroyPixmap(screen_priv->flip_pixmap, screen_priv->flip_pixmap->drawable.id); screen_priv->flip_crtc = NULL; screen_priv->flip_window = NULL; screen_priv->flip_serial = 0; screen_priv->flip_pixmap = NULL; screen_priv->flip_idle_fence = NULL; } } void present_restore_screen_pixmap(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); PixmapPtr screen_pixmap = (*screen->GetScreenPixmap)(screen); PixmapPtr flip_pixmap; WindowPtr flip_window; if (screen_priv->flip_pending) { flip_window = screen_priv->flip_pending->window; flip_pixmap = screen_priv->flip_pending->pixmap; } else { flip_window = screen_priv->flip_window; flip_pixmap = screen_priv->flip_pixmap; } assert (flip_pixmap); /* Update the screen pixmap with the current flip pixmap contents * Only do this the first time for a particular unflip operation, or * we'll probably scribble over other windows */ if (screen->root && screen->GetWindowPixmap(screen->root) == flip_pixmap) present_copy_region(&screen_pixmap->drawable, flip_pixmap, NULL, 0, 0); /* Switch back to using the screen pixmap now to avoid * 2D applications drawing to the wrong pixmap. */ if (flip_window) present_set_tree_pixmap(flip_window, flip_pixmap, screen_pixmap); if (screen->root) present_set_tree_pixmap(screen->root, NULL, screen_pixmap); } void present_set_abort_flip(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (!screen_priv->flip_pending->abort_flip) { present_restore_screen_pixmap(screen); screen_priv->flip_pending->abort_flip = TRUE; } } static void present_unflip(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); assert (!screen_priv->unflip_event_id); assert (!screen_priv->flip_pending); present_restore_screen_pixmap(screen); screen_priv->unflip_event_id = ++present_scmd_event_id; DebugPresent(("u %" PRIu64 "\n", screen_priv->unflip_event_id)); (*screen_priv->info->unflip) (screen, screen_priv->unflip_event_id); } static void present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { ScreenPtr screen = vblank->screen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); DebugPresent(("\tn %" PRIu64 " %p %" PRIu64 " %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n", vblank->event_id, vblank, vblank->exec_msc, vblank->target_msc, vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window ? vblank->window->drawable.id : 0)); assert (vblank == screen_priv->flip_pending); present_flip_idle(screen); xorg_list_del(&vblank->event_queue); /* Transfer reference for pixmap and fence from vblank to screen_priv */ screen_priv->flip_crtc = vblank->crtc; screen_priv->flip_window = vblank->window; screen_priv->flip_serial = vblank->serial; screen_priv->flip_pixmap = vblank->pixmap; screen_priv->flip_sync = vblank->sync_flip; screen_priv->flip_idle_fence = vblank->idle_fence; vblank->pixmap = NULL; vblank->idle_fence = NULL; screen_priv->flip_pending = NULL; if (vblank->abort_flip) present_unflip(screen); present_vblank_notify(vblank, PresentCompleteKindPixmap, PresentCompleteModeFlip, ust, crtc_msc); present_vblank_destroy(vblank); present_flip_try_ready(screen); } void present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc) { present_vblank_ptr vblank; int s; if (!event_id) return; DebugPresent(("\te %" PRIu64 " ust %" PRIu64 " msc %" PRIu64 "\n", event_id, ust, msc)); xorg_list_for_each_entry(vblank, &present_exec_queue, event_queue) { int64_t match = event_id - vblank->event_id; if (match == 0) { present_execute(vblank, ust, msc); return; } } xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { if (vblank->event_id == event_id) { if (vblank->queued) present_execute(vblank, ust, msc); else present_flip_notify(vblank, ust, msc); return; } } for (s = 0; s < screenInfo.numScreens; s++) { ScreenPtr screen = screenInfo.screens[s]; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (event_id == screen_priv->unflip_event_id) { DebugPresent(("\tun %" PRIu64 "\n", event_id)); screen_priv->unflip_event_id = 0; present_flip_idle(screen); present_flip_try_ready(screen); return; } } } /* * 'window' is being reconfigured. Check to see if it is involved * in flipping and clean up as necessary */ static void present_check_flip_window (WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_window_priv_ptr window_priv = present_window_priv(window); present_vblank_ptr flip_pending = screen_priv->flip_pending; present_vblank_ptr vblank; PresentFlipReason reason; /* If this window hasn't ever been used with Present, it can't be * flipping */ if (!window_priv) return; if (screen_priv->unflip_event_id) return; if (flip_pending) { /* * Check pending flip */ if (flip_pending->window == window) { if (!present_check_flip(flip_pending->crtc, window, flip_pending->pixmap, flip_pending->sync_flip, NULL, 0, 0, NULL)) present_set_abort_flip(screen); } } else { /* * Check current flip */ if (window == screen_priv->flip_window) { if (!present_check_flip(screen_priv->flip_crtc, window, screen_priv->flip_pixmap, screen_priv->flip_sync, NULL, 0, 0, NULL)) present_unflip(screen); } } /* Now check any queued vblanks */ xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) { if (vblank->queued && vblank->flip && !present_check_flip(vblank->crtc, window, vblank->pixmap, vblank->sync_flip, NULL, 0, 0, &reason)) { vblank->flip = FALSE; vblank->reason = reason; if (vblank->sync_flip) vblank->exec_msc = vblank->target_msc; } } } static Bool present_scmd_can_window_flip(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; PixmapPtr window_pixmap; WindowPtr root = screen->root; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (!screen_priv) return FALSE; if (!screen_priv->info) return FALSE; /* Check to see if the driver supports flips at all */ if (!screen_priv->info->flip) return FALSE; /* Make sure the window hasn't been redirected with Composite */ window_pixmap = screen->GetWindowPixmap(window); if (window_pixmap != screen->GetScreenPixmap(screen) && window_pixmap != screen_priv->flip_pixmap && window_pixmap != present_flip_pending_pixmap(screen)) return FALSE; /* Check for full-screen window */ if (!RegionEqual(&window->clipList, &root->winSize)) { return FALSE; } /* Does the window match the pixmap exactly? */ if (window->drawable.x != 0 || window->drawable.y != 0) { return FALSE; } return TRUE; } /* * Clean up any pending or current flips for this window */ static void present_scmd_clear_window_flip(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_vblank_ptr flip_pending = screen_priv->flip_pending; if (flip_pending && flip_pending->window == window) { present_set_abort_flip(screen); flip_pending->window = NULL; } if (screen_priv->flip_window == window) { present_restore_screen_pixmap(screen); screen_priv->flip_window = NULL; } } /* * Once the required MSC has been reached, execute the pending request. * * For requests to actually present something, either blt contents to * the screen or queue a frame buffer swap. * * For requests to just get the current MSC/UST combo, skip that part and * go straight to event delivery */ static void present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { WindowPtr window = vblank->window; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (vblank && vblank->crtc) { screen_priv=present_screen_priv(vblank->crtc->pScreen); } if (present_execute_wait(vblank, crtc_msc)) return; if (vblank->flip && vblank->pixmap && vblank->window) { if (screen_priv->flip_pending || screen_priv->unflip_event_id) { DebugPresent(("\tr %" PRIu64 " %p (pending %p unflip %" PRIu64 ")\n", vblank->event_id, vblank, screen_priv->flip_pending, screen_priv->unflip_event_id)); xorg_list_del(&vblank->event_queue); xorg_list_append(&vblank->event_queue, &present_flip_queue); vblank->flip_ready = TRUE; return; } } xorg_list_del(&vblank->event_queue); xorg_list_del(&vblank->window_list); vblank->queued = FALSE; if (vblank->pixmap && vblank->window) { if (vblank->flip) { DebugPresent(("\tf %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n", vblank->event_id, vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id)); /* Prepare to flip by placing it in the flip queue and * and sticking it into the flip_pending field */ screen_priv->flip_pending = vblank; xorg_list_add(&vblank->event_queue, &present_flip_queue); /* Try to flip */ if (present_flip(vblank->crtc, vblank->event_id, vblank->target_msc, vblank->pixmap, vblank->sync_flip)) { RegionPtr damage; /* Fix window pixmaps: * 1) Restore previous flip window pixmap * 2) Set current flip window pixmap to the new pixmap */ if (screen_priv->flip_window && screen_priv->flip_window != window) present_set_tree_pixmap(screen_priv->flip_window, screen_priv->flip_pixmap, (*screen->GetScreenPixmap)(screen)); present_set_tree_pixmap(vblank->window, NULL, vblank->pixmap); present_set_tree_pixmap(screen->root, NULL, vblank->pixmap); /* Report update region as damaged */ if (vblank->update) { damage = vblank->update; RegionIntersect(damage, damage, &window->clipList); } else damage = &window->clipList; DamageDamageRegion(&vblank->window->drawable, damage); return; } xorg_list_del(&vblank->event_queue); /* Oops, flip failed. Clear the flip_pending field */ screen_priv->flip_pending = NULL; vblank->flip = FALSE; vblank->exec_msc = vblank->target_msc; } DebugPresent(("\tc %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id)); if (screen_priv->flip_pending) { /* Check pending flip */ if (window == screen_priv->flip_pending->window) present_set_abort_flip(screen); } else if (!screen_priv->unflip_event_id) { /* Check current flip */ if (window == screen_priv->flip_window) present_unflip(screen); } present_execute_copy(vblank, crtc_msc); if (vblank->queued) { xorg_list_add(&vblank->event_queue, &present_exec_queue); xorg_list_append(&vblank->window_list, &present_get_window_priv(window, TRUE)->vblank); return; } } present_execute_post(vblank, ust, crtc_msc); } static void present_scmd_update_window_crtc(WindowPtr window, RRCrtcPtr crtc, uint64_t new_msc) { present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); uint64_t old_ust, old_msc; /* Crtc unchanged, no offset. */ if (crtc == window_priv->crtc) return; /* No crtc earlier to offset against, just set the crtc. */ if (window_priv->crtc == PresentCrtcNeverSet) { window_priv->crtc = crtc; return; } /* Crtc may have been turned off or be destroyed, just use whatever previous MSC we'd seen from this CRTC. */ if (!RRCrtcExists(window->drawable.pScreen, window_priv->crtc) || present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success) old_msc = window_priv->msc; window_priv->msc_offset += new_msc - old_msc; window_priv->crtc = crtc; } static int present_scmd_pixmap(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, uint64_t target_window_msc, uint64_t divisor, uint64_t remainder, present_notify_ptr notifies, int num_notifies) { uint64_t ust = 0; uint64_t target_msc; uint64_t crtc_msc = 0; int ret; present_vblank_ptr vblank, tmp; ScreenPtr screen = window->drawable.pScreen; present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (!window_priv) return BadAlloc; if (!screen_priv || !screen_priv->info) target_crtc = NULL; else if (!target_crtc) { /* Update the CRTC if we have a pixmap or we don't have a CRTC */ if (!pixmap) target_crtc = window_priv->crtc; if (!target_crtc || target_crtc == PresentCrtcNeverSet) target_crtc = present_get_crtc(window); } ret = present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc); present_scmd_update_window_crtc(window, target_crtc, crtc_msc); if (ret == Success) { /* Stash the current MSC away in case we need it later */ window_priv->msc = crtc_msc; } target_msc = present_get_target_msc(target_window_msc + window_priv->msc_offset, crtc_msc, divisor, remainder, options); /* * Look for a matching presentation already on the list and * don't bother doing the previous one if this one will overwrite it * in the same frame */ if (!update && pixmap) { xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { if (!vblank->pixmap) continue; if (!vblank->queued) continue; if (vblank->crtc != target_crtc || vblank->target_msc != target_msc) continue; present_vblank_scrap(vblank); if (vblank->flip_ready) present_re_execute(vblank); } } vblank = present_vblank_create(window, pixmap, serial, valid, update, x_off, y_off, target_crtc, wait_fence, idle_fence, options, screen_priv->info ? screen_priv->info->capabilities : 0, notifies, num_notifies, target_msc, crtc_msc); if (!vblank) return BadAlloc; vblank->event_id = ++present_scmd_event_id; if (vblank->flip && vblank->sync_flip) vblank->exec_msc--; xorg_list_append(&vblank->event_queue, &present_exec_queue); vblank->queued = TRUE; if (msc_is_after(vblank->exec_msc, crtc_msc)) { ret = present_queue_vblank(screen, window, target_crtc, vblank->event_id, vblank->exec_msc); if (ret == Success) return Success; DebugPresent(("present_queue_vblank failed\n")); } present_execute(vblank, ust, crtc_msc); return Success; } static void present_scmd_abort_vblank(ScreenPtr screen, WindowPtr window, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) { present_vblank_ptr vblank; if (crtc == NULL) present_fake_abort_vblank(screen, event_id, msc); else { present_screen_priv_ptr screen_priv = present_screen_priv(screen); (*screen_priv->info->abort_vblank) (crtc, event_id, msc); } xorg_list_for_each_entry(vblank, &present_exec_queue, event_queue) { int64_t match = event_id - vblank->event_id; if (match == 0) { xorg_list_del(&vblank->event_queue); vblank->queued = FALSE; return; } } xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { if (vblank->event_id == event_id) { xorg_list_del(&vblank->event_queue); vblank->queued = FALSE; return; } } } static void present_scmd_flip_destroy(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); /* Reset window pixmaps back to the screen pixmap */ if (screen_priv->flip_pending) present_set_abort_flip(screen); /* Drop reference to any pending flip or unflip pixmaps. */ present_flip_idle(screen); } void present_scmd_init_mode_hooks(present_screen_priv_ptr screen_priv) { screen_priv->query_capabilities = &present_scmd_query_capabilities; screen_priv->get_crtc = &present_scmd_get_crtc; screen_priv->check_flip = &present_check_flip; screen_priv->check_flip_window = &present_check_flip_window; screen_priv->can_window_flip = &present_scmd_can_window_flip; screen_priv->clear_window_flip = &present_scmd_clear_window_flip; screen_priv->present_pixmap = &present_scmd_pixmap; screen_priv->queue_vblank = &present_queue_vblank; screen_priv->flush = &present_flush; screen_priv->re_execute = &present_re_execute; screen_priv->abort_vblank = &present_scmd_abort_vblank; screen_priv->flip_destroy = &present_scmd_flip_destroy; } Bool present_init(void) { xorg_list_init(&present_exec_queue); xorg_list_init(&present_flip_queue); present_fake_queue_init(); return TRUE; } xorg-server-21.1.16/present/present_screen.c0000644000175000017500000001700314757411105014477 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" int present_request; DevPrivateKeyRec present_screen_private_key; DevPrivateKeyRec present_window_private_key; /* * Get a pointer to a present window private, creating if necessary */ present_window_priv_ptr present_get_window_priv(WindowPtr window, Bool create) { present_window_priv_ptr window_priv = present_window_priv(window); if (!create || window_priv != NULL) return window_priv; window_priv = calloc (1, sizeof (present_window_priv_rec)); if (!window_priv) return NULL; xorg_list_init(&window_priv->vblank); xorg_list_init(&window_priv->notifies); window_priv->window = window; window_priv->crtc = PresentCrtcNeverSet; dixSetPrivate(&window->devPrivates, &present_window_private_key, window_priv); return window_priv; } /* * Hook the close screen function to clean up our screen private */ static Bool present_close_screen(ScreenPtr screen) { present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (screen_priv->flip_destroy) screen_priv->flip_destroy(screen); unwrap(screen_priv, screen, CloseScreen); (*screen->CloseScreen) (screen); free(screen_priv); return TRUE; } /* * Free any queued presentations for this window */ static void present_free_window_vblank(WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_window_priv_ptr window_priv = present_window_priv(window); present_vblank_ptr vblank, tmp; xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { screen_priv->abort_vblank(window->drawable.pScreen, window, vblank->crtc, vblank->event_id, vblank->target_msc); present_vblank_destroy(vblank); } } /* * Hook the close window function to clean up our window private */ static Bool present_destroy_window(WindowPtr window) { Bool ret; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_window_priv_ptr window_priv = present_window_priv(window); present_send_config_notify(window, window->drawable.x, window->drawable.y, window->drawable.width, window->drawable.height, window->borderWidth, window->nextSib, PresentWindowDestroyed); if (window_priv) { present_clear_window_notifies(window); present_free_events(window); present_free_window_vblank(window); screen_priv->clear_window_flip(window); free(window_priv); } unwrap(screen_priv, screen, DestroyWindow); if (screen->DestroyWindow) ret = screen->DestroyWindow (window); else ret = TRUE; wrap(screen_priv, screen, DestroyWindow, present_destroy_window); return ret; } /* * Hook the config notify screen function to deliver present config notify events */ static int present_config_notify(WindowPtr window, int x, int y, int w, int h, int bw, WindowPtr sibling) { int ret; ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); present_send_config_notify(window, x, y, w, h, bw, sibling, 0); unwrap(screen_priv, screen, ConfigNotify); if (screen->ConfigNotify) ret = screen->ConfigNotify (window, x, y, w, h, bw, sibling); else ret = 0; wrap(screen_priv, screen, ConfigNotify, present_config_notify); return ret; } /* * Hook the clip notify screen function to un-flip as necessary */ static void present_clip_notify(WindowPtr window, int dx, int dy) { ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); screen_priv->check_flip_window(window); unwrap(screen_priv, screen, ClipNotify) if (screen->ClipNotify) screen->ClipNotify (window, dx, dy); wrap(screen_priv, screen, ClipNotify, present_clip_notify); } Bool present_screen_register_priv_keys(void) { if (!dixRegisterPrivateKey(&present_screen_private_key, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&present_window_private_key, PRIVATE_WINDOW, 0)) return FALSE; return TRUE; } present_screen_priv_ptr present_screen_priv_init(ScreenPtr screen) { present_screen_priv_ptr screen_priv; screen_priv = calloc(1, sizeof (present_screen_priv_rec)); if (!screen_priv) return NULL; wrap(screen_priv, screen, CloseScreen, present_close_screen); wrap(screen_priv, screen, DestroyWindow, present_destroy_window); wrap(screen_priv, screen, ConfigNotify, present_config_notify); wrap(screen_priv, screen, ClipNotify, present_clip_notify); dixSetPrivate(&screen->devPrivates, &present_screen_private_key, screen_priv); return screen_priv; } /* * Initialize a screen for use with present in default screen flip mode (scmd) */ int present_screen_init(ScreenPtr screen, present_screen_info_ptr info) { if (!present_screen_register_priv_keys()) return FALSE; if (!present_screen_priv(screen)) { present_screen_priv_ptr screen_priv = present_screen_priv_init(screen); if (!screen_priv) return FALSE; screen_priv->info = info; present_scmd_init_mode_hooks(screen_priv); present_fake_screen_init(screen); } return TRUE; } /* * Initialize the present extension */ void present_extension_init(void) { ExtensionEntry *extension; int i; #ifdef PANORAMIX if (!noPanoramiXExtension) return; #endif extension = AddExtension(PRESENT_NAME, PresentNumberEvents, PresentNumberErrors, proc_present_dispatch, sproc_present_dispatch, NULL, StandardMinorOpcode); if (!extension) goto bail; present_request = extension->base; if (!present_init()) goto bail; if (!present_event_init()) goto bail; for (i = 0; i < screenInfo.numScreens; i++) { if (!present_screen_init(screenInfo.screens[i], NULL)) goto bail; } return; bail: FatalError("Cannot initialize Present extension"); } xorg-server-21.1.16/present/present_vblank.c0000644000175000017500000002020214757411105014470 /* * Copyright © 2013 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "present_priv.h" void present_vblank_notify(present_vblank_ptr vblank, CARD8 kind, CARD8 mode, uint64_t ust, uint64_t crtc_msc) { int n; if (vblank->window) present_send_complete_notify(vblank->window, kind, mode, vblank->serial, ust, crtc_msc - vblank->msc_offset); for (n = 0; n < vblank->num_notifies; n++) { WindowPtr window = vblank->notifies[n].window; CARD32 serial = vblank->notifies[n].serial; if (window) present_send_complete_notify(window, kind, mode, serial, ust, crtc_msc - vblank->msc_offset); } } /* The memory vblank points to must be 0-initialized before calling this function. * * If this function returns FALSE, present_vblank_destroy must be called to clean * up. */ Bool present_vblank_init(present_vblank_ptr vblank, WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, const uint32_t capabilities, present_notify_ptr notifies, int num_notifies, uint64_t target_msc, uint64_t crtc_msc) { ScreenPtr screen = window->drawable.pScreen; present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); present_screen_priv_ptr screen_priv = present_screen_priv(screen); PresentFlipReason reason = PRESENT_FLIP_REASON_UNKNOWN; if (target_crtc) { screen_priv = present_screen_priv(target_crtc->pScreen); } xorg_list_append(&vblank->window_list, &window_priv->vblank); xorg_list_init(&vblank->event_queue); vblank->screen = screen; vblank->window = window; vblank->pixmap = pixmap; if (pixmap) { vblank->kind = PresentCompleteKindPixmap; pixmap->refcnt++; } else vblank->kind = PresentCompleteKindNotifyMSC; vblank->serial = serial; if (valid) { vblank->valid = RegionDuplicate(valid); if (!vblank->valid) goto no_mem; } if (update) { vblank->update = RegionDuplicate(update); if (!vblank->update) goto no_mem; } vblank->x_off = x_off; vblank->y_off = y_off; vblank->target_msc = target_msc; vblank->exec_msc = target_msc; vblank->crtc = target_crtc; vblank->msc_offset = window_priv->msc_offset; vblank->notifies = notifies; vblank->num_notifies = num_notifies; vblank->has_suboptimal = (options & PresentOptionSuboptimal); if (pixmap != NULL && !(options & PresentOptionCopy) && screen_priv->check_flip) { if (msc_is_after(target_msc, crtc_msc) && screen_priv->check_flip (target_crtc, window, pixmap, TRUE, valid, x_off, y_off, &reason)) { vblank->flip = TRUE; vblank->sync_flip = TRUE; } else if ((capabilities & PresentCapabilityAsync) && screen_priv->check_flip (target_crtc, window, pixmap, FALSE, valid, x_off, y_off, &reason)) { vblank->flip = TRUE; } } vblank->reason = reason; if (wait_fence) { vblank->wait_fence = present_fence_create(wait_fence); if (!vblank->wait_fence) goto no_mem; } if (idle_fence) { vblank->idle_fence = present_fence_create(idle_fence); if (!vblank->idle_fence) goto no_mem; } if (pixmap) DebugPresent(("q %" PRIu64 " %p %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p) flip %d vsync %d serial %d\n", vblank->event_id, vblank, target_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id, target_crtc, vblank->flip, vblank->sync_flip, vblank->serial)); return TRUE; no_mem: vblank->notifies = NULL; return FALSE; } present_vblank_ptr present_vblank_create(WindowPtr window, PixmapPtr pixmap, CARD32 serial, RegionPtr valid, RegionPtr update, int16_t x_off, int16_t y_off, RRCrtcPtr target_crtc, SyncFence *wait_fence, SyncFence *idle_fence, uint32_t options, const uint32_t capabilities, present_notify_ptr notifies, int num_notifies, uint64_t target_msc, uint64_t crtc_msc) { present_vblank_ptr vblank = calloc(1, sizeof(present_vblank_rec)); if (!vblank) return NULL; if (present_vblank_init(vblank, window, pixmap, serial, valid, update, x_off, y_off, target_crtc, wait_fence, idle_fence, options, capabilities, notifies, num_notifies, target_msc, crtc_msc)) return vblank; present_vblank_destroy(vblank); return NULL; } void present_vblank_scrap(present_vblank_ptr vblank) { DebugPresent(("\tx %" PRIu64 " %p %" PRIu64 " %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 " (crtc %p)\n", vblank->event_id, vblank, vblank->exec_msc, vblank->target_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id, vblank->crtc)); present_pixmap_idle(vblank->pixmap, vblank->window, vblank->serial, vblank->idle_fence); present_fence_destroy(vblank->idle_fence); dixDestroyPixmap(vblank->pixmap, vblank->pixmap->drawable.id); vblank->pixmap = NULL; vblank->idle_fence = NULL; vblank->flip = FALSE; } void present_vblank_destroy(present_vblank_ptr vblank) { /* Remove vblank from window and screen lists */ xorg_list_del(&vblank->window_list); /* Also make sure vblank is removed from event queue (wnmd) */ xorg_list_del(&vblank->event_queue); DebugPresent(("\td %" PRIu64 " %p %" PRIu64 " %" PRIu64 ": %08" PRIx32 " -> %08" PRIx32 "\n", vblank->event_id, vblank, vblank->exec_msc, vblank->target_msc, vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window ? vblank->window->drawable.id : 0)); /* Drop pixmap reference */ if (vblank->pixmap) dixDestroyPixmap(vblank->pixmap, vblank->pixmap->drawable.id); /* Free regions */ if (vblank->valid) RegionDestroy(vblank->valid); if (vblank->update) RegionDestroy(vblank->update); if (vblank->wait_fence) present_fence_destroy(vblank->wait_fence); if (vblank->idle_fence) present_fence_destroy(vblank->idle_fence); if (vblank->notifies) present_destroy_notifies(vblank->notifies, vblank->num_notifies); free(vblank); } xorg-server-21.1.16/pseudoramiX/0000755000175000017500000000000014757411133012214 5xorg-server-21.1.16/pseudoramiX/meson.build0000644000175000017500000000022514757411105014274 libxserver_pseudoramix = static_library('libxserver_pseudoramiX', 'pseudoramiX.c', include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/pseudoramiX/Makefile.am0000644000175000017500000000022614757411105014167 # Fake Xinerama extension AM_CFLAGS = $(DIX_CFLAGS) noinst_LTLIBRARIES = libPseudoramiX.la libPseudoramiX_la_SOURCES = pseudoramiX.c pseudoramiX.h xorg-server-21.1.16/pseudoramiX/Makefile.in0000644000175000017500000006077714757411116014223 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Fake Xinerama extension VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pseudoramiX ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libPseudoramiX_la_LIBADD = am_libPseudoramiX_la_OBJECTS = pseudoramiX.lo libPseudoramiX_la_OBJECTS = $(am_libPseudoramiX_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/pseudoramiX.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libPseudoramiX_la_SOURCES) DIST_SOURCES = $(libPseudoramiX_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = $(DIX_CFLAGS) noinst_LTLIBRARIES = libPseudoramiX.la libPseudoramiX_la_SOURCES = pseudoramiX.c pseudoramiX.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pseudoramiX/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign pseudoramiX/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libPseudoramiX.la: $(libPseudoramiX_la_OBJECTS) $(libPseudoramiX_la_DEPENDENCIES) $(EXTRA_libPseudoramiX_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libPseudoramiX_la_OBJECTS) $(libPseudoramiX_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pseudoramiX.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/pseudoramiX.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/pseudoramiX.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/pseudoramiX/pseudoramiX.c0000644000175000017500000003274614757411105014613 /* * Minimal implementation of PanoramiX/Xinerama * * This is used in rootless mode where the underlying window server * already provides an abstracted view of multiple screens as one * large screen area. * * This code is largely based on panoramiX.c, which contains the * following copyright notice: */ /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "pseudoramiX.h" #include "extnsionst.h" #include "nonsdk_extinit.h" #include "dixstruct.h" #include "window.h" #include #include "globals.h" #define TRACE PseudoramiXTrace("TRACE " __FILE__ ":%s",__FUNCTION__) #define DEBUG_LOG PseudoramiXDebug Bool noPseudoramiXExtension = FALSE; extern Bool noRRXineramaExtension; extern int ProcPanoramiXQueryVersion(ClientPtr client); static void PseudoramiXResetProc(ExtensionEntry *extEntry); static int ProcPseudoramiXQueryVersion(ClientPtr client); static int ProcPseudoramiXGetState(ClientPtr client); static int ProcPseudoramiXGetScreenCount(ClientPtr client); static int ProcPseudoramiXGetScreenSize(ClientPtr client); static int ProcPseudoramiXIsActive(ClientPtr client); static int ProcPseudoramiXQueryScreens(ClientPtr client); static int ProcPseudoramiXDispatch(ClientPtr client); static int SProcPseudoramiXQueryVersion(ClientPtr client); static int SProcPseudoramiXGetState(ClientPtr client); static int SProcPseudoramiXGetScreenCount(ClientPtr client); static int SProcPseudoramiXGetScreenSize(ClientPtr client); static int SProcPseudoramiXIsActive(ClientPtr client); static int SProcPseudoramiXQueryScreens(ClientPtr client); static int SProcPseudoramiXDispatch(ClientPtr client); typedef struct { int x; int y; int w; int h; } PseudoramiXScreenRec; static PseudoramiXScreenRec *pseudoramiXScreens = NULL; static int pseudoramiXScreensAllocated = 0; static int pseudoramiXNumScreens = 0; static unsigned long pseudoramiXGeneration = 0; static void PseudoramiXTrace(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); static void PseudoramiXTrace(const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(X_NONE, 10, format, ap); va_end(ap); } static void PseudoramiXDebug(const char *format, ...) _X_ATTRIBUTE_PRINTF(1, 2); static void PseudoramiXDebug(const char *format, ...) { va_list ap; va_start(ap, format); LogVMessageVerb(X_NONE, 3, format, ap); va_end(ap); } // Add a PseudoramiX screen. // The rest of the X server will know nothing about this screen. // Can be called before or after extension init. // Screens must be re-added once per generation. void PseudoramiXAddScreen(int x, int y, int w, int h) { PseudoramiXScreenRec *s; if (noPseudoramiXExtension) return; if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; pseudoramiXScreens = reallocarray(pseudoramiXScreens, pseudoramiXScreensAllocated, sizeof(PseudoramiXScreenRec)); } DEBUG_LOG("x: %d, y: %d, w: %d, h: %d\n", x, y, w, h); s = &pseudoramiXScreens[pseudoramiXNumScreens++]; s->x = x; s->y = y; s->w = w; s->h = h; } // Initialize PseudoramiX. // Copied from PanoramiXExtensionInit void PseudoramiXExtensionInit(void) { Bool success = FALSE; ExtensionEntry *extEntry; if (noPseudoramiXExtension) return; TRACE; /* Even with only one screen we need to enable PseudoramiX to allow dynamic screen configuration changes. */ #if 0 if (pseudoramiXNumScreens == 1) { // Only one screen - disable Xinerama extension. noPseudoramiXExtension = TRUE; return; } #endif if (pseudoramiXGeneration != serverGeneration) { extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, ProcPseudoramiXDispatch, SProcPseudoramiXDispatch, PseudoramiXResetProc, StandardMinorOpcode); if (!extEntry) { ErrorF("PseudoramiXExtensionInit(): AddExtension failed\n"); } else { pseudoramiXGeneration = serverGeneration; success = TRUE; } } /* Do not allow RRXinerama to initialize if we did */ noRRXineramaExtension = success; if (!success) { ErrorF("%s Extension (PseudoramiX) failed to initialize\n", PANORAMIX_PROTOCOL_NAME); return; } } void PseudoramiXResetScreens(void) { TRACE; pseudoramiXNumScreens = 0; } static void PseudoramiXResetProc(ExtensionEntry *extEntry) { TRACE; PseudoramiXResetScreens(); } // was PanoramiX static int ProcPseudoramiXQueryVersion(ClientPtr client) { TRACE; return ProcPanoramiXQueryVersion(client); } // was PanoramiX static int ProcPseudoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; register int rc; TRACE; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.state = !noPseudoramiXExtension; rep.window = stuff->window; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetStateReply),&rep); return Success; } // was PanoramiX static int ProcPseudoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; register int rc; TRACE; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.ScreenCount = pseudoramiXNumScreens; rep.window = stuff->window; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply),&rep); return Success; } // was PanoramiX static int ProcPseudoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; register int rc; TRACE; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); if (stuff->screen >= pseudoramiXNumScreens) return BadMatch; rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; /* screen dimensions */ rep.width = pseudoramiXScreens[stuff->screen].w; // was screenInfo.screens[stuff->screen]->width; rep.height = pseudoramiXScreens[stuff->screen].h; // was screenInfo.screens[stuff->screen]->height; rep.window = stuff->window; rep.screen = stuff->screen; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.width); swapl(&rep.height); swapl(&rep.window); swapl(&rep.screen); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply),&rep); return Success; } // was Xinerama static int ProcPseudoramiXIsActive(ClientPtr client) { /* REQUEST(xXineramaIsActiveReq); */ xXineramaIsActiveReply rep; TRACE; REQUEST_SIZE_MATCH(xXineramaIsActiveReq); rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; rep.state = !noPseudoramiXExtension; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.state); } WriteToClient(client, sizeof(xXineramaIsActiveReply),&rep); return Success; } // was Xinerama static int ProcPseudoramiXQueryScreens(ClientPtr client) { /* REQUEST(xXineramaQueryScreensReq); */ xXineramaQueryScreensReply rep; DEBUG_LOG("noPseudoramiXExtension=%d, pseudoramiXNumScreens=%d\n", noPseudoramiXExtension, pseudoramiXNumScreens); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.number = noPseudoramiXExtension ? 0 : pseudoramiXNumScreens; rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.number); } WriteToClient(client, sizeof(xXineramaQueryScreensReply),&rep); if (!noPseudoramiXExtension) { xXineramaScreenInfo scratch; int i; for (i = 0; i < pseudoramiXNumScreens; i++) { scratch.x_org = pseudoramiXScreens[i].x; scratch.y_org = pseudoramiXScreens[i].y; scratch.width = pseudoramiXScreens[i].w; scratch.height = pseudoramiXScreens[i].h; if (client->swapped) { swaps(&scratch.x_org); swaps(&scratch.y_org); swaps(&scratch.width); swaps(&scratch.height); } WriteToClient(client, sz_XineramaScreenInfo,&scratch); } } return Success; } // was PanoramiX static int ProcPseudoramiXDispatch(ClientPtr client) { REQUEST(xReq); TRACE; switch (stuff->data) { case X_PanoramiXQueryVersion: return ProcPseudoramiXQueryVersion(client); case X_PanoramiXGetState: return ProcPseudoramiXGetState(client); case X_PanoramiXGetScreenCount: return ProcPseudoramiXGetScreenCount(client); case X_PanoramiXGetScreenSize: return ProcPseudoramiXGetScreenSize(client); case X_XineramaIsActive: return ProcPseudoramiXIsActive(client); case X_XineramaQueryScreens: return ProcPseudoramiXQueryScreens(client); } return BadRequest; } static int SProcPseudoramiXQueryVersion(ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); return ProcPseudoramiXQueryVersion(client); } static int SProcPseudoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); return ProcPseudoramiXGetState(client); } static int SProcPseudoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); return ProcPseudoramiXGetScreenCount(client); } static int SProcPseudoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); return ProcPseudoramiXGetScreenSize(client); } static int SProcPseudoramiXIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return ProcPseudoramiXIsActive(client); } static int SProcPseudoramiXQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); TRACE; swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return ProcPseudoramiXQueryScreens(client); } static int SProcPseudoramiXDispatch(ClientPtr client) { REQUEST(xReq); TRACE; switch (stuff->data) { case X_PanoramiXQueryVersion: return SProcPseudoramiXQueryVersion(client); case X_PanoramiXGetState: return SProcPseudoramiXGetState(client); case X_PanoramiXGetScreenCount: return SProcPseudoramiXGetScreenCount(client); case X_PanoramiXGetScreenSize: return SProcPseudoramiXGetScreenSize(client); case X_XineramaIsActive: return SProcPseudoramiXIsActive(client); case X_XineramaQueryScreens: return SProcPseudoramiXQueryScreens(client); } return BadRequest; } xorg-server-21.1.16/pseudoramiX/pseudoramiX.h0000644000175000017500000000022314757411105014601 /* * Minimal implementation of PanoramiX/Xinerama */ void PseudoramiXAddScreen(int x, int y, int w, int h); void PseudoramiXResetScreens(void); xorg-server-21.1.16/randr/0000755000175000017500000000000014757411133011022 5xorg-server-21.1.16/randr/meson.build0000644000175000017500000000116014757411105013101 srcs_randr = [ 'randr.c', 'rrcrtc.c', 'rrdispatch.c', 'rrinfo.c', 'rrlease.c', 'rrmode.c', 'rrmonitor.c', 'rroutput.c', 'rrpointer.c', 'rrproperty.c', 'rrprovider.c', 'rrproviderproperty.c', 'rrscreen.c', 'rrsdispatch.c', 'rrtransform.c', ] hdrs_randr = [ 'randrstr.h', 'rrtransform.h', ] if build_xinerama srcs_randr += 'rrxinerama.c' endif libxserver_randr = static_library('libxserver_randr', srcs_randr, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_randr, install_dir: xorgsdkdir) endif xorg-server-21.1.16/randr/Makefile.am0000644000175000017500000000075114757411105013000 noinst_LTLIBRARIES = librandr.la AM_CFLAGS = $(DIX_CFLAGS) XINERAMA_SRCS = rrxinerama.c if XORG sdk_HEADERS = randrstr.h rrtransform.h endif librandr_la_SOURCES = \ randr.c \ randrstr.h \ rrcrtc.c \ rrdispatch.c \ rrinfo.c \ rrlease.c \ rrmode.c \ rrmonitor.c \ rroutput.c \ rrpointer.c \ rrproperty.c \ rrprovider.c \ rrproviderproperty.c \ rrscreen.c \ rrsdispatch.c \ rrtransform.h \ rrtransform.c if XINERAMA librandr_la_SOURCES += ${XINERAMA_SRCS} endif xorg-server-21.1.16/randr/randrstr.h0000644000175000017500000007634314757411105012766 /* * Copyright © 2000 Compaq Computer Corporation * Copyright © 2002 Hewlett-Packard Company * Copyright © 2006 Intel Corporation * Copyright © 2008 Red Hat, Inc. * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. * * Author: Jim Gettys, Hewlett-Packard Company, Inc. * Keith Packard, Intel Corporation */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _RANDRSTR_H_ #define _RANDRSTR_H_ #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "resource.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "servermd.h" #include "rrtransform.h" #include #include #include /* we share subpixel order information */ #include "picturestr.h" #include /* required for ABI compatibility for now */ #define RANDR_10_INTERFACE 1 #define RANDR_12_INTERFACE 1 #define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */ #define RANDR_GET_CRTC_INTERFACE 1 #define RANDR_INTERFACE_VERSION 0x0104 typedef XID RRMode; typedef XID RROutput; typedef XID RRCrtc; typedef XID RRProvider; typedef XID RRLease; extern int RREventBase, RRErrorBase; extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr); extern int (*SProcRandrVector[RRNumberRequests]) (ClientPtr); /* * Modeline for a monitor. Name follows directly after this struct */ #define RRModeName(pMode) ((char *) (pMode + 1)) typedef struct _rrMode RRModeRec, *RRModePtr; typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr; typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr; typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr; typedef struct _rrOutput RROutputRec, *RROutputPtr; typedef struct _rrProvider RRProviderRec, *RRProviderPtr; typedef struct _rrMonitor RRMonitorRec, *RRMonitorPtr; typedef struct _rrLease RRLeaseRec, *RRLeasePtr; struct _rrMode { int refcnt; xRRModeInfo mode; char *name; ScreenPtr userScreen; }; struct _rrPropertyValue { Atom type; /* ignored by server */ short format; /* format of data for swapping - 8,16,32 */ long size; /* size of data in (format/8) bytes */ void *data; /* private to client */ }; struct _rrProperty { RRPropertyPtr next; ATOM propertyName; Bool is_pending; Bool range; Bool immutable; int num_valid; INT32 *valid_values; RRPropertyValueRec current, pending; }; struct _rrCrtc { RRCrtc id; ScreenPtr pScreen; RRModePtr mode; int x, y; Rotation rotation; Rotation rotations; Bool changed; int numOutputs; RROutputPtr *outputs; int gammaSize; CARD16 *gammaRed; CARD16 *gammaBlue; CARD16 *gammaGreen; void *devPrivate; Bool transforms; RRTransformRec client_pending_transform; RRTransformRec client_current_transform; PictTransform transform; struct pict_f_transform f_transform; struct pict_f_transform f_inverse; PixmapPtr scanout_pixmap; PixmapPtr scanout_pixmap_back; }; struct _rrOutput { RROutput id; ScreenPtr pScreen; char *name; int nameLength; CARD8 connection; CARD8 subpixelOrder; int mmWidth; int mmHeight; RRCrtcPtr crtc; int numCrtcs; RRCrtcPtr *crtcs; int numClones; RROutputPtr *clones; int numModes; int numPreferred; RRModePtr *modes; int numUserModes; RRModePtr *userModes; Bool changed; Bool nonDesktop; RRPropertyPtr properties; Bool pendingProperties; void *devPrivate; }; struct _rrProvider { RRProvider id; ScreenPtr pScreen; uint32_t capabilities; char *name; int nameLength; RRPropertyPtr properties; Bool pendingProperties; Bool changed; struct _rrProvider *offload_sink; struct _rrProvider *output_source; }; typedef struct _rrMonitorGeometry { BoxRec box; CARD32 mmWidth; CARD32 mmHeight; } RRMonitorGeometryRec, *RRMonitorGeometryPtr; struct _rrMonitor { Atom name; ScreenPtr pScreen; int numOutputs; RROutput *outputs; Bool primary; Bool automatic; RRMonitorGeometryRec geometry; }; typedef enum _rrLeaseState { RRLeaseCreating, RRLeaseRunning, RRLeaseTerminating } RRLeaseState; struct _rrLease { struct xorg_list list; ScreenPtr screen; RRLease id; RRLeaseState state; void *devPrivate; int numCrtcs; RRCrtcPtr *crtcs; int numOutputs; RROutputPtr *outputs; }; #if RANDR_12_INTERFACE typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight); typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, int numOutputs, RROutputPtr * outputs); typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc); typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc); typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen, RROutputPtr output, Atom property, RRPropertyValuePtr value); typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen, RROutputPtr output, RRModePtr mode); typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, RRModePtr mode); #endif #if RANDR_13_INTERFACE typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen, RROutputPtr output, Atom property); typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn, RRCrtcPtr crtc, BoxPtr totalArea, BoxPtr trackingArea, INT16 *border); typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn, RRCrtcPtr crtc, BoxPtr totalArea, BoxPtr trackingArea, INT16 *border); #endif /* RANDR_13_INTERFACE */ typedef Bool (*RRProviderGetPropertyProcPtr) (ScreenPtr pScreen, RRProviderPtr provider, Atom property); typedef Bool (*RRProviderSetPropertyProcPtr) (ScreenPtr pScreen, RRProviderPtr provider, Atom property, RRPropertyValuePtr value); typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations); typedef Bool (*RRCloseScreenProcPtr) (ScreenPtr pscreen); typedef Bool (*RRProviderSetOutputSourceProcPtr)(ScreenPtr pScreen, RRProviderPtr provider, RRProviderPtr output_source); typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen, RRProviderPtr provider, RRProviderPtr offload_sink); typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen, RRProviderPtr provider); /* Additions for 1.6 */ typedef int (*RRCreateLeaseProcPtr)(ScreenPtr screen, RRLeasePtr lease, int *fd); typedef void (*RRTerminateLeaseProcPtr)(ScreenPtr screen, RRLeasePtr lease); /* These are for 1.0 compatibility */ typedef struct _rrRefresh { CARD16 rate; RRModePtr mode; } RRScreenRate, *RRScreenRatePtr; typedef struct _rrScreenSize { int id; short width, height; short mmWidth, mmHeight; int nRates; RRScreenRatePtr pRates; } RRScreenSize, *RRScreenSizePtr; #ifdef RANDR_10_INTERFACE typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); #endif typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap); typedef Bool (*RRStartFlippingPixmapTrackingProcPtr)(RRCrtcPtr, DrawablePtr, PixmapPtr, PixmapPtr, int x, int y, int dst_x, int dst_y, Rotation rotation); typedef Bool (*RREnableSharedPixmapFlippingProcPtr)(RRCrtcPtr, PixmapPtr front, PixmapPtr back); typedef void (*RRDisableSharedPixmapFlippingProcPtr)(RRCrtcPtr); typedef struct _rrScrPriv { /* * 'public' part of the structure; DDXen fill this in * as they initialize */ #if RANDR_10_INTERFACE RRSetConfigProcPtr rrSetConfig; #endif RRGetInfoProcPtr rrGetInfo; #if RANDR_12_INTERFACE RRScreenSetSizeProcPtr rrScreenSetSize; RRCrtcSetProcPtr rrCrtcSet; RRCrtcSetGammaProcPtr rrCrtcSetGamma; RRCrtcGetGammaProcPtr rrCrtcGetGamma; RROutputSetPropertyProcPtr rrOutputSetProperty; RROutputValidateModeProcPtr rrOutputValidateMode; RRModeDestroyProcPtr rrModeDestroy; #endif #if RANDR_13_INTERFACE RROutputGetPropertyProcPtr rrOutputGetProperty; RRGetPanningProcPtr rrGetPanning; RRSetPanningProcPtr rrSetPanning; #endif /* TODO #if RANDR_15_INTERFACE */ RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap; RRStartFlippingPixmapTrackingProcPtr rrStartFlippingPixmapTracking; RREnableSharedPixmapFlippingProcPtr rrEnableSharedPixmapFlipping; RRDisableSharedPixmapFlippingProcPtr rrDisableSharedPixmapFlipping; RRProviderSetOutputSourceProcPtr rrProviderSetOutputSource; RRProviderSetOffloadSinkProcPtr rrProviderSetOffloadSink; RRProviderGetPropertyProcPtr rrProviderGetProperty; RRProviderSetPropertyProcPtr rrProviderSetProperty; RRCreateLeaseProcPtr rrCreateLease; RRTerminateLeaseProcPtr rrTerminateLease; /* * Private part of the structure; not considered part of the ABI */ TimeStamp lastSetTime; /* last changed by client */ TimeStamp lastConfigTime; /* possible configs changed */ RRCloseScreenProcPtr CloseScreen; Bool changed; /* some config changed */ Bool configChanged; /* configuration changed */ Bool layoutChanged; /* screen layout changed */ Bool resourcesChanged; /* screen resources change */ Bool leasesChanged; /* leases change */ CARD16 minWidth, minHeight; CARD16 maxWidth, maxHeight; CARD16 width, height; /* last known screen size */ CARD16 mmWidth, mmHeight; /* last known screen size */ int numOutputs; RROutputPtr *outputs; RROutputPtr primaryOutput; int numCrtcs; RRCrtcPtr *crtcs; /* Last known pointer position */ RRCrtcPtr pointerCrtc; #ifdef RANDR_10_INTERFACE /* * Configuration information */ Rotation rotations; CARD16 reqWidth, reqHeight; int nSizes; RRScreenSizePtr pSizes; Rotation rotation; int rate; int size; #endif Bool discontiguous; RRProviderPtr provider; RRProviderDestroyProcPtr rrProviderDestroy; int numMonitors; RRMonitorPtr *monitors; struct xorg_list leases; } rrScrPrivRec, *rrScrPrivPtr; extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec; #define rrPrivKey (&rrPrivKeyRec) #define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey)) #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr) #define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p) /* * each window has a list of clients requesting * RRNotify events. Each client has a resource * for each window it selects RRNotify input for, * this resource is used to delete the RRNotifyRec * entry from the per-window queue. */ typedef struct _RREvent *RREventPtr; typedef struct _RREvent { RREventPtr next; ClientPtr client; WindowPtr window; XID clientResource; int mask; } RREventRec; typedef struct _RRTimes { TimeStamp setTime; TimeStamp configTime; } RRTimesRec, *RRTimesPtr; typedef struct _RRClient { int major_version; int minor_version; /* RRTimesRec times[0]; */ } RRClientRec, *RRClientPtr; extern RESTYPE RRClientType, RREventType; /* resource types for event masks */ extern DevPrivateKeyRec RRClientPrivateKeyRec; #define RRClientPrivateKey (&RRClientPrivateKeyRec) extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType, RRLeaseType; #define VERIFY_RR_OUTPUT(id, ptr, a)\ {\ int rc = dixLookupResourceByType((void **)&(ptr), id,\ RROutputType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ return rc;\ }\ } #define VERIFY_RR_CRTC(id, ptr, a)\ {\ int rc = dixLookupResourceByType((void **)&(ptr), id,\ RRCrtcType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ return rc;\ }\ } #define VERIFY_RR_MODE(id, ptr, a)\ {\ int rc = dixLookupResourceByType((void **)&(ptr), id,\ RRModeType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ return rc;\ }\ } #define VERIFY_RR_PROVIDER(id, ptr, a)\ {\ int rc = dixLookupResourceByType((void **)&(ptr), id,\ RRProviderType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ return rc;\ }\ } #define VERIFY_RR_LEASE(id, ptr, a)\ {\ int rc = dixLookupResourceByType((void **)&(ptr), id,\ RRLeaseType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ return rc;\ }\ } #define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey)) #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient) #ifdef RANDR_12_INTERFACE /* * Set the range of sizes for the screen */ extern _X_EXPORT void RRScreenSetSizeRange(ScreenPtr pScreen, CARD16 minWidth, CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight); #endif /* rrscreen.c */ /* * Notify the extension that the screen size has been changed. * The driver is responsible for calling this whenever it has changed * the size of the screen */ extern _X_EXPORT void RRScreenSizeNotify(ScreenPtr pScreen); /* * Request that the screen be resized */ extern _X_EXPORT Bool RRScreenSizeSet(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight); /* * Send ConfigureNotify event to root window when 'something' happens */ extern _X_EXPORT void RRSendConfigNotify(ScreenPtr pScreen); /* * screen dispatch */ extern _X_EXPORT int ProcRRGetScreenSizeRange(ClientPtr client); extern _X_EXPORT int ProcRRSetScreenSize(ClientPtr client); extern _X_EXPORT int ProcRRGetScreenResources(ClientPtr client); extern _X_EXPORT int ProcRRGetScreenResourcesCurrent(ClientPtr client); extern _X_EXPORT int ProcRRSetScreenConfig(ClientPtr client); extern _X_EXPORT int ProcRRGetScreenInfo(ClientPtr client); /* * Deliver a ScreenNotify event */ extern _X_EXPORT void RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen); extern _X_EXPORT void RRResourcesChanged(ScreenPtr pScreen); /* randr.c */ /* set a screen change on the primary screen */ extern _X_EXPORT void RRSetChanged(ScreenPtr pScreen); /* * Send all pending events */ extern _X_EXPORT void RRTellChanged(ScreenPtr pScreen); /* * Poll the driver for changed information */ extern _X_EXPORT Bool RRGetInfo(ScreenPtr pScreen, Bool force_query); extern _X_EXPORT Bool RRInit(void); extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen); extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen); extern _X_EXPORT RRCrtcPtr RRFirstEnabledCrtc(ScreenPtr pScreen); extern _X_EXPORT Bool RROutputSetNonDesktop(RROutputPtr output, Bool non_desktop); extern _X_EXPORT CARD16 RRVerticalRefresh(xRRModeInfo * mode); #ifdef RANDR_10_INTERFACE /* * This is the old interface, deprecated but left * around for compatibility */ /* * Then, register the specific size with the screen */ extern _X_EXPORT RRScreenSizePtr RRRegisterSize(ScreenPtr pScreen, short width, short height, short mmWidth, short mmHeight); extern _X_EXPORT Bool RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate); /* * Finally, set the current configuration of the screen */ extern _X_EXPORT void RRSetCurrentConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize); extern _X_EXPORT Rotation RRGetRotation(ScreenPtr pScreen); #endif /* rrcrtc.c */ /* * Notify the CRTC of some change; layoutChanged indicates that * some position or size element changed */ extern _X_EXPORT void RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged); /* * Create a CRTC */ extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate); /* * Tests if findCrtc belongs to pScreen or secondary screens */ extern _X_EXPORT Bool RRCrtcExists(ScreenPtr pScreen, RRCrtcPtr findCrtc); /* * Set the allowed rotations on a CRTC */ extern _X_EXPORT void RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations); /* * Set whether transforms are allowed on a CRTC */ extern _X_EXPORT void RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms); /* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode */ extern _X_EXPORT Bool RRCrtcNotify(RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, RRTransformPtr transform, int numOutputs, RROutputPtr * outputs); extern _X_EXPORT void RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc); /* * Request that the Crtc be reconfigured */ extern _X_EXPORT Bool RRCrtcSet(RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, int numOutput, RROutputPtr * outputs); /* * Request that the Crtc gamma be changed */ extern _X_EXPORT Bool RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue); /* * Request current gamma back from the DDX (if possible). * This includes gamma size. */ extern _X_EXPORT Bool RRCrtcGammaGet(RRCrtcPtr crtc); /* * Notify the extension that the Crtc gamma has been changed * The driver calls this whenever it has changed the gamma values * in the RRCrtcRec */ extern _X_EXPORT Bool RRCrtcGammaNotify(RRCrtcPtr crtc); /* * Set the size of the gamma table at server startup time */ extern _X_EXPORT Bool RRCrtcGammaSetSize(RRCrtcPtr crtc, int size); /* * Return the area of the frame buffer scanned out by the crtc, * taking into account the current mode and rotation */ extern _X_EXPORT void RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height); /* * Return crtc transform */ extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc); /* * Check whether the pending and current transforms are the same */ extern _X_EXPORT Bool RRCrtcPendingTransform(RRCrtcPtr crtc); /* * Destroy a Crtc at shutdown */ extern _X_EXPORT void RRCrtcDestroy(RRCrtcPtr crtc); /* * Set the pending CRTC transformation */ extern _X_EXPORT int RRCrtcTransformSet(RRCrtcPtr crtc, PictTransformPtr transform, struct pict_f_transform *f_transform, struct pict_f_transform *f_inverse, char *filter, int filter_len, xFixed * params, int nparams); /* * Initialize crtc type */ extern _X_EXPORT Bool RRCrtcInit(void); /* * Initialize crtc type error value */ extern _X_EXPORT void RRCrtcInitErrorValue(void); /* * Detach and free a scanout pixmap */ extern _X_EXPORT void RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc); extern _X_EXPORT Bool RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable); /* * Return if the screen has any scanout_pixmap's attached */ extern _X_EXPORT Bool RRHasScanoutPixmap(ScreenPtr pScreen); /* * Crtc dispatch */ extern _X_EXPORT int ProcRRGetCrtcInfo(ClientPtr client); extern _X_EXPORT int ProcRRSetCrtcConfig(ClientPtr client); extern _X_EXPORT int ProcRRGetCrtcGammaSize(ClientPtr client); extern _X_EXPORT int ProcRRGetCrtcGamma(ClientPtr client); extern _X_EXPORT int ProcRRSetCrtcGamma(ClientPtr client); extern _X_EXPORT int ProcRRSetCrtcTransform(ClientPtr client); extern _X_EXPORT int ProcRRGetCrtcTransform(ClientPtr client); int ProcRRGetPanning(ClientPtr client); int ProcRRSetPanning(ClientPtr client); void RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *); /* rrdispatch.c */ extern _X_EXPORT Bool RRClientKnowsRates(ClientPtr pClient); /* rrlease.c */ void RRDeliverLeaseEvent(ClientPtr client, WindowPtr window); extern _X_EXPORT void RRLeaseTerminated(RRLeasePtr lease); extern _X_EXPORT void RRLeaseFree(RRLeasePtr lease); extern _X_EXPORT Bool RRCrtcIsLeased(RRCrtcPtr crtc); extern _X_EXPORT Bool RROutputIsLeased(RROutputPtr output); void RRTerminateLease(RRLeasePtr lease); Bool RRLeaseInit(void); /* rrmode.c */ /* * Find, and if necessary, create a mode */ extern _X_EXPORT RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name); /* * Destroy a mode. */ extern _X_EXPORT void RRModeDestroy(RRModePtr mode); /* * Return a list of modes that are valid for some output in pScreen */ extern _X_EXPORT RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret); /* * Initialize mode type */ extern _X_EXPORT Bool RRModeInit(void); /* * Initialize mode type error value */ extern _X_EXPORT void RRModeInitErrorValue(void); extern _X_EXPORT int ProcRRCreateMode(ClientPtr client); extern _X_EXPORT int ProcRRDestroyMode(ClientPtr client); extern _X_EXPORT int ProcRRAddOutputMode(ClientPtr client); extern _X_EXPORT int ProcRRDeleteOutputMode(ClientPtr client); /* rroutput.c */ /* * Notify the output of some change. configChanged indicates whether * any external configuration (mode list, clones, connected status) * has changed, or whether the change was strictly internal * (which crtc is in use) */ extern _X_EXPORT void RROutputChanged(RROutputPtr output, Bool configChanged); /* * Create an output */ extern _X_EXPORT RROutputPtr RROutputCreate(ScreenPtr pScreen, const char *name, int nameLength, void *devPrivate); /* * Notify extension that output parameters have been changed */ extern _X_EXPORT Bool RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones); extern _X_EXPORT Bool RROutputSetModes(RROutputPtr output, RRModePtr * modes, int numModes, int numPreferred); extern _X_EXPORT int RROutputAddUserMode(RROutputPtr output, RRModePtr mode); extern _X_EXPORT int RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode); extern _X_EXPORT Bool RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs); extern _X_EXPORT Bool RROutputSetConnection(RROutputPtr output, CARD8 connection); extern _X_EXPORT Bool RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder); extern _X_EXPORT Bool RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight); extern _X_EXPORT void RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output); extern _X_EXPORT void RROutputDestroy(RROutputPtr output); extern _X_EXPORT int ProcRRGetOutputInfo(ClientPtr client); extern _X_EXPORT int ProcRRSetOutputPrimary(ClientPtr client); extern _X_EXPORT int ProcRRGetOutputPrimary(ClientPtr client); /* * Initialize output type */ extern _X_EXPORT Bool RROutputInit(void); /* * Initialize output type error value */ extern _X_EXPORT void RROutputInitErrorValue(void); /* rrpointer.c */ extern _X_EXPORT void RRPointerMoved(ScreenPtr pScreen, int x, int y); extern _X_EXPORT void RRPointerScreenConfigured(ScreenPtr pScreen); /* rrproperty.c */ extern _X_EXPORT void RRDeleteAllOutputProperties(RROutputPtr output); extern _X_EXPORT RRPropertyValuePtr RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending); extern _X_EXPORT RRPropertyPtr RRQueryOutputProperty(RROutputPtr output, Atom property); extern _X_EXPORT void RRDeleteOutputProperty(RROutputPtr output, Atom property); extern _X_EXPORT Bool RRPostPendingProperties(RROutputPtr output); extern _X_EXPORT int RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, int format, int mode, unsigned long len, const void *value, Bool sendevent, Bool pending); extern _X_EXPORT int RRConfigureOutputProperty(RROutputPtr output, Atom property, Bool pending, Bool range, Bool immutable, int num_values, const INT32 *values); extern _X_EXPORT int ProcRRChangeOutputProperty(ClientPtr client); extern _X_EXPORT int ProcRRGetOutputProperty(ClientPtr client); extern _X_EXPORT int ProcRRListOutputProperties(ClientPtr client); extern _X_EXPORT int ProcRRQueryOutputProperty(ClientPtr client); extern _X_EXPORT int ProcRRConfigureOutputProperty(ClientPtr client); extern _X_EXPORT int ProcRRDeleteOutputProperty(ClientPtr client); /* rrprovider.c */ #define PRIME_SYNC_PROP "PRIME Synchronization" extern _X_EXPORT void RRProviderInitErrorValue(void); extern _X_EXPORT int ProcRRGetProviders(ClientPtr client); extern _X_EXPORT int ProcRRGetProviderInfo(ClientPtr client); extern _X_EXPORT int ProcRRSetProviderOutputSource(ClientPtr client); extern _X_EXPORT int ProcRRSetProviderOffloadSink(ClientPtr client); extern _X_EXPORT Bool RRProviderInit(void); extern _X_EXPORT RRProviderPtr RRProviderCreate(ScreenPtr pScreen, const char *name, int nameLength); extern _X_EXPORT void RRProviderDestroy (RRProviderPtr provider); extern _X_EXPORT void RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities); extern _X_EXPORT Bool RRProviderLookup(XID id, RRProviderPtr *provider_p); extern _X_EXPORT void RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider); extern _X_EXPORT void RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr primaryScreen); /* rrproviderproperty.c */ extern _X_EXPORT void RRDeleteAllProviderProperties(RRProviderPtr provider); extern _X_EXPORT RRPropertyValuePtr RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending); extern _X_EXPORT RRPropertyPtr RRQueryProviderProperty(RRProviderPtr provider, Atom property); extern _X_EXPORT void RRDeleteProviderProperty(RRProviderPtr provider, Atom property); extern _X_EXPORT int RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type, int format, int mode, unsigned long len, void *value, Bool sendevent, Bool pending); extern _X_EXPORT int RRConfigureProviderProperty(RRProviderPtr provider, Atom property, Bool pending, Bool range, Bool immutable, int num_values, INT32 *values); extern _X_EXPORT Bool RRPostProviderPendingProperties(RRProviderPtr provider); extern _X_EXPORT int ProcRRGetProviderProperty(ClientPtr client); extern _X_EXPORT int ProcRRListProviderProperties(ClientPtr client); extern _X_EXPORT int ProcRRQueryProviderProperty(ClientPtr client); extern _X_EXPORT int ProcRRConfigureProviderProperty(ClientPtr client); extern _X_EXPORT int ProcRRChangeProviderProperty(ClientPtr client); extern _X_EXPORT int ProcRRDeleteProviderProperty(ClientPtr client); /* rrxinerama.c */ #ifdef XINERAMA extern _X_EXPORT void RRXineramaExtensionInit(void); #endif void RRMonitorInit(ScreenPtr screen); Bool RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret); int RRMonitorCountList(ScreenPtr screen); void RRMonitorFreeList(RRMonitorPtr monitors, int nmon); void RRMonitorClose(ScreenPtr screen); RRMonitorPtr RRMonitorAlloc(int noutput); int RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor); void RRMonitorFree(RRMonitorPtr monitor); int ProcRRGetMonitors(ClientPtr client); int ProcRRSetMonitor(ClientPtr client); int ProcRRDeleteMonitor(ClientPtr client); int ProcRRCreateLease(ClientPtr client); int ProcRRFreeLease(ClientPtr client); #endif /* _RANDRSTR_H_ */ /* randr extension implementation structure Query state: ProcRRGetScreenInfo/ProcRRGetScreenResources RRGetInfo • Request configuration from driver, either 1.0 or 1.2 style • These functions only record state changes, all other actions are pended until RRTellChanged is called ->rrGetInfo 1.0: RRRegisterSize RRRegisterRate RRSetCurrentConfig 1.2: RRScreenSetSizeRange RROutputSetCrtcs RRModeGet RROutputSetModes RROutputSetConnection RROutputSetSubpixelOrder RROutputSetClones RRCrtcNotify • Must delay scanning configuration until after ->rrGetInfo returns because some drivers will call SetCurrentConfig in the middle of the ->rrGetInfo operation. 1.0: • Scan old configuration, mirror to new structures RRScanOldConfig RRCrtcCreate RROutputCreate RROutputSetCrtcs RROutputSetConnection RROutputSetSubpixelOrder RROldModeAdd • This adds modes one-at-a-time RRModeGet RRCrtcNotify • send events, reset pointer if necessary RRTellChanged WalkTree (sending events) • when layout has changed: RRPointerScreenConfigured RRSendConfigNotify Asynchronous state setting (1.2 only) When setting state asynchronously, the driver invokes the ->rrGetInfo function and then calls RRTellChanged to flush the changes to the clients and reset pointer if necessary Set state ProcRRSetScreenConfig RRCrtcSet 1.2: ->rrCrtcSet RRCrtcNotify 1.0: ->rrSetConfig RRCrtcNotify RRTellChanged */ xorg-server-21.1.16/randr/rrtransform.h0000644000175000017500000000524214757411105013474 /* * Copyright © 2007 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #ifndef _RRTRANSFORM_H_ #define _RRTRANSFORM_H_ #include #include "picturestr.h" typedef struct _rrTransform RRTransformRec, *RRTransformPtr; struct _rrTransform { PictTransform transform; struct pict_f_transform f_transform; struct pict_f_transform f_inverse; PictFilterPtr filter; xFixed *params; int nparams; int width; int height; }; extern _X_EXPORT void RRTransformInit(RRTransformPtr transform); extern _X_EXPORT void RRTransformFini(RRTransformPtr transform); extern _X_EXPORT Bool RRTransformEqual(RRTransformPtr a, RRTransformPtr b); extern _X_EXPORT Bool RRTransformSetFilter(RRTransformPtr dst, PictFilterPtr filter, xFixed * params, int nparams, int width, int height); extern _X_EXPORT Bool RRTransformCopy(RRTransformPtr dst, RRTransformPtr src); /* * Compute the complete transformation matrix including * client-specified transform, rotation/reflection values and the crtc * offset. * * Return TRUE if the resulting transform is not a simple translation. */ extern _X_EXPORT Bool RRTransformCompute(int x, int y, int width, int height, Rotation rotation, RRTransformPtr rr_transform, PictTransformPtr transform, struct pict_f_transform *f_transform, struct pict_f_transform *f_inverse); #endif /* _RRTRANSFORM_H_ */ xorg-server-21.1.16/randr/Makefile.in0000644000175000017500000007436614757411116013030 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XINERAMA_TRUE@am__append_1 = ${XINERAMA_SRCS} subdir = randr ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librandr_la_LIBADD = am__librandr_la_SOURCES_DIST = randr.c randrstr.h rrcrtc.c \ rrdispatch.c rrinfo.c rrlease.c rrmode.c rrmonitor.c \ rroutput.c rrpointer.c rrproperty.c rrprovider.c \ rrproviderproperty.c rrscreen.c rrsdispatch.c rrtransform.h \ rrtransform.c rrxinerama.c am__objects_1 = rrxinerama.lo @XINERAMA_TRUE@am__objects_2 = $(am__objects_1) am_librandr_la_OBJECTS = randr.lo rrcrtc.lo rrdispatch.lo rrinfo.lo \ rrlease.lo rrmode.lo rrmonitor.lo rroutput.lo rrpointer.lo \ rrproperty.lo rrprovider.lo rrproviderproperty.lo rrscreen.lo \ rrsdispatch.lo rrtransform.lo $(am__objects_2) librandr_la_OBJECTS = $(am_librandr_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/randr.Plo ./$(DEPDIR)/rrcrtc.Plo \ ./$(DEPDIR)/rrdispatch.Plo ./$(DEPDIR)/rrinfo.Plo \ ./$(DEPDIR)/rrlease.Plo ./$(DEPDIR)/rrmode.Plo \ ./$(DEPDIR)/rrmonitor.Plo ./$(DEPDIR)/rroutput.Plo \ ./$(DEPDIR)/rrpointer.Plo ./$(DEPDIR)/rrproperty.Plo \ ./$(DEPDIR)/rrprovider.Plo ./$(DEPDIR)/rrproviderproperty.Plo \ ./$(DEPDIR)/rrscreen.Plo ./$(DEPDIR)/rrsdispatch.Plo \ ./$(DEPDIR)/rrtransform.Plo ./$(DEPDIR)/rrxinerama.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librandr_la_SOURCES) DIST_SOURCES = $(am__librandr_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = randrstr.h rrtransform.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = librandr.la AM_CFLAGS = $(DIX_CFLAGS) XINERAMA_SRCS = rrxinerama.c @XORG_TRUE@sdk_HEADERS = randrstr.h rrtransform.h librandr_la_SOURCES = randr.c randrstr.h rrcrtc.c rrdispatch.c \ rrinfo.c rrlease.c rrmode.c rrmonitor.c rroutput.c rrpointer.c \ rrproperty.c rrprovider.c rrproviderproperty.c rrscreen.c \ rrsdispatch.c rrtransform.h rrtransform.c $(am__append_1) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign randr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign randr/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librandr.la: $(librandr_la_OBJECTS) $(librandr_la_DEPENDENCIES) $(EXTRA_librandr_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(librandr_la_OBJECTS) $(librandr_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrcrtc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrdispatch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrinfo.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrlease.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrmode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrmonitor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rroutput.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrpointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrproperty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrprovider.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrproviderproperty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrscreen.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrsdispatch.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrtransform.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrxinerama.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/randr.Plo -rm -f ./$(DEPDIR)/rrcrtc.Plo -rm -f ./$(DEPDIR)/rrdispatch.Plo -rm -f ./$(DEPDIR)/rrinfo.Plo -rm -f ./$(DEPDIR)/rrlease.Plo -rm -f ./$(DEPDIR)/rrmode.Plo -rm -f ./$(DEPDIR)/rrmonitor.Plo -rm -f ./$(DEPDIR)/rroutput.Plo -rm -f ./$(DEPDIR)/rrpointer.Plo -rm -f ./$(DEPDIR)/rrproperty.Plo -rm -f ./$(DEPDIR)/rrprovider.Plo -rm -f ./$(DEPDIR)/rrproviderproperty.Plo -rm -f ./$(DEPDIR)/rrscreen.Plo -rm -f ./$(DEPDIR)/rrsdispatch.Plo -rm -f ./$(DEPDIR)/rrtransform.Plo -rm -f ./$(DEPDIR)/rrxinerama.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/randr.Plo -rm -f ./$(DEPDIR)/rrcrtc.Plo -rm -f ./$(DEPDIR)/rrdispatch.Plo -rm -f ./$(DEPDIR)/rrinfo.Plo -rm -f ./$(DEPDIR)/rrlease.Plo -rm -f ./$(DEPDIR)/rrmode.Plo -rm -f ./$(DEPDIR)/rrmonitor.Plo -rm -f ./$(DEPDIR)/rroutput.Plo -rm -f ./$(DEPDIR)/rrpointer.Plo -rm -f ./$(DEPDIR)/rrproperty.Plo -rm -f ./$(DEPDIR)/rrprovider.Plo -rm -f ./$(DEPDIR)/rrproviderproperty.Plo -rm -f ./$(DEPDIR)/rrscreen.Plo -rm -f ./$(DEPDIR)/rrsdispatch.Plo -rm -f ./$(DEPDIR)/rrtransform.Plo -rm -f ./$(DEPDIR)/rrxinerama.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/randr/randr.c0000644000175000017500000005330014757411105012214 /* * Copyright © 2000 Compaq Computer Corporation * Copyright © 2002 Hewlett-Packard Company * Copyright © 2006 Intel Corporation * Copyright © 2017 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. * * Author: Jim Gettys, Hewlett-Packard Company, Inc. * Keith Packard, Intel Corporation */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "randrstr.h" #include "extinit.h" /* From render.h */ #ifndef SubPixelUnknown #define SubPixelUnknown 0 #endif #define RR_VALIDATE static int RRNScreens; #define wrap(priv,real,mem,func) {\ priv->mem = real->mem; \ real->mem = func; \ } #define unwrap(priv,real,mem) {\ real->mem = priv->mem; \ } static int ProcRRDispatch(ClientPtr pClient); static int SProcRRDispatch(ClientPtr pClient); int RREventBase; int RRErrorBase; RESTYPE RRClientType, RREventType; /* resource types for event masks */ DevPrivateKeyRec RRClientPrivateKeyRec; DevPrivateKeyRec rrPrivKeyRec; static void RRClientCallback(CallbackListPtr *list, void *closure, void *data) { NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; ClientPtr pClient = clientinfo->client; rrClientPriv(pClient); RRTimesPtr pTimes = (RRTimesPtr) (pRRClient + 1); int i; pRRClient->major_version = 0; pRRClient->minor_version = 0; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; rrScrPriv(pScreen); if (pScrPriv) { pTimes[i].setTime = pScrPriv->lastSetTime; pTimes[i].configTime = pScrPriv->lastConfigTime; } } } static Bool RRCloseScreen(ScreenPtr pScreen) { rrScrPriv(pScreen); int j; RRLeasePtr lease, next; unwrap(pScrPriv, pScreen, CloseScreen); xorg_list_for_each_entry_safe(lease, next, &pScrPriv->leases, list) RRTerminateLease(lease); for (j = pScrPriv->numCrtcs - 1; j >= 0; j--) RRCrtcDestroy(pScrPriv->crtcs[j]); for (j = pScrPriv->numOutputs - 1; j >= 0; j--) RROutputDestroy(pScrPriv->outputs[j]); if (pScrPriv->provider) RRProviderDestroy(pScrPriv->provider); RRMonitorClose(pScreen); free(pScrPriv->crtcs); free(pScrPriv->outputs); free(pScrPriv); RRNScreens -= 1; /* ok, one fewer screen with RandR running */ return (*pScreen->CloseScreen) (pScreen); } static void SRRScreenChangeNotifyEvent(xRRScreenChangeNotifyEvent * from, xRRScreenChangeNotifyEvent * to) { to->type = from->type; to->rotation = from->rotation; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->configTimestamp, to->configTimestamp); cpswapl(from->root, to->root); cpswapl(from->window, to->window); cpswaps(from->sizeID, to->sizeID); cpswaps(from->subpixelOrder, to->subpixelOrder); cpswaps(from->widthInPixels, to->widthInPixels); cpswaps(from->heightInPixels, to->heightInPixels); cpswaps(from->widthInMillimeters, to->widthInMillimeters); cpswaps(from->heightInMillimeters, to->heightInMillimeters); } static void SRRCrtcChangeNotifyEvent(xRRCrtcChangeNotifyEvent * from, xRRCrtcChangeNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->window, to->window); cpswapl(from->crtc, to->crtc); cpswapl(from->mode, to->mode); cpswaps(from->rotation, to->rotation); /* pad1 */ cpswaps(from->x, to->x); cpswaps(from->y, to->y); cpswaps(from->width, to->width); cpswaps(from->height, to->height); } static void SRROutputChangeNotifyEvent(xRROutputChangeNotifyEvent * from, xRROutputChangeNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->configTimestamp, to->configTimestamp); cpswapl(from->window, to->window); cpswapl(from->output, to->output); cpswapl(from->crtc, to->crtc); cpswapl(from->mode, to->mode); cpswaps(from->rotation, to->rotation); to->connection = from->connection; to->subpixelOrder = from->subpixelOrder; } static void SRROutputPropertyNotifyEvent(xRROutputPropertyNotifyEvent * from, xRROutputPropertyNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->window, to->window); cpswapl(from->output, to->output); cpswapl(from->atom, to->atom); cpswapl(from->timestamp, to->timestamp); to->state = from->state; /* pad1 */ /* pad2 */ /* pad3 */ /* pad4 */ } static void SRRProviderChangeNotifyEvent(xRRProviderChangeNotifyEvent * from, xRRProviderChangeNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->window, to->window); cpswapl(from->provider, to->provider); } static void SRRProviderPropertyNotifyEvent(xRRProviderPropertyNotifyEvent * from, xRRProviderPropertyNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->window, to->window); cpswapl(from->provider, to->provider); cpswapl(from->atom, to->atom); cpswapl(from->timestamp, to->timestamp); to->state = from->state; /* pad1 */ /* pad2 */ /* pad3 */ /* pad4 */ } static void _X_COLD SRRResourceChangeNotifyEvent(xRRResourceChangeNotifyEvent * from, xRRResourceChangeNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->window, to->window); } static void _X_COLD SRRLeaseNotifyEvent(xRRLeaseNotifyEvent * from, xRRLeaseNotifyEvent * to) { to->type = from->type; to->subCode = from->subCode; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->window, to->window); cpswapl(from->lease, to->lease); to->created = from->created; } static void _X_COLD SRRNotifyEvent(xEvent *from, xEvent *to) { switch (from->u.u.detail) { case RRNotify_CrtcChange: SRRCrtcChangeNotifyEvent((xRRCrtcChangeNotifyEvent *) from, (xRRCrtcChangeNotifyEvent *) to); break; case RRNotify_OutputChange: SRROutputChangeNotifyEvent((xRROutputChangeNotifyEvent *) from, (xRROutputChangeNotifyEvent *) to); break; case RRNotify_OutputProperty: SRROutputPropertyNotifyEvent((xRROutputPropertyNotifyEvent *) from, (xRROutputPropertyNotifyEvent *) to); break; case RRNotify_ProviderChange: SRRProviderChangeNotifyEvent((xRRProviderChangeNotifyEvent *) from, (xRRProviderChangeNotifyEvent *) to); break; case RRNotify_ProviderProperty: SRRProviderPropertyNotifyEvent((xRRProviderPropertyNotifyEvent *) from, (xRRProviderPropertyNotifyEvent *) to); break; case RRNotify_ResourceChange: SRRResourceChangeNotifyEvent((xRRResourceChangeNotifyEvent *) from, (xRRResourceChangeNotifyEvent *) to); break; case RRNotify_Lease: SRRLeaseNotifyEvent((xRRLeaseNotifyEvent *) from, (xRRLeaseNotifyEvent *) to); break; default: break; } } static int RRGeneration; Bool RRInit(void) { if (RRGeneration != serverGeneration) { if (!RRModeInit()) return FALSE; if (!RRCrtcInit()) return FALSE; if (!RROutputInit()) return FALSE; if (!RRProviderInit()) return FALSE; if (!RRLeaseInit()) return FALSE; RRGeneration = serverGeneration; } if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0)) return FALSE; return TRUE; } Bool RRScreenInit(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; if (!RRInit()) return FALSE; pScrPriv = (rrScrPrivPtr) calloc(1, sizeof(rrScrPrivRec)); if (!pScrPriv) return FALSE; SetRRScreen(pScreen, pScrPriv); /* * Calling function best set these function vectors */ pScrPriv->rrGetInfo = 0; pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width; pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height; pScrPriv->width = pScreen->width; pScrPriv->height = pScreen->height; pScrPriv->mmWidth = pScreen->mmWidth; pScrPriv->mmHeight = pScreen->mmHeight; #if RANDR_12_INTERFACE pScrPriv->rrScreenSetSize = NULL; pScrPriv->rrCrtcSet = NULL; pScrPriv->rrCrtcSetGamma = NULL; #endif #if RANDR_10_INTERFACE pScrPriv->rrSetConfig = 0; pScrPriv->rotations = RR_Rotate_0; pScrPriv->reqWidth = pScreen->width; pScrPriv->reqHeight = pScreen->height; pScrPriv->nSizes = 0; pScrPriv->pSizes = NULL; pScrPriv->rotation = RR_Rotate_0; pScrPriv->rate = 0; pScrPriv->size = 0; #endif /* * This value doesn't really matter -- any client must call * GetScreenInfo before reading it which will automatically update * the time */ pScrPriv->lastSetTime = currentTime; pScrPriv->lastConfigTime = currentTime; wrap(pScrPriv, pScreen, CloseScreen, RRCloseScreen); pScreen->ConstrainCursorHarder = RRConstrainCursorHarder; pScreen->ReplaceScanoutPixmap = RRReplaceScanoutPixmap; pScrPriv->numOutputs = 0; pScrPriv->outputs = NULL; pScrPriv->numCrtcs = 0; pScrPriv->crtcs = NULL; xorg_list_init(&pScrPriv->leases); RRMonitorInit(pScreen); RRNScreens += 1; /* keep count of screens that implement randr */ return TRUE; } /*ARGSUSED*/ static int RRFreeClient(void *data, XID id) { RREventPtr pRREvent; WindowPtr pWin; RREventPtr *pHead, pCur, pPrev; pRREvent = (RREventPtr) data; pWin = pRREvent->window; dixLookupResourceByType((void **) &pHead, pWin->drawable.id, RREventType, serverClient, DixDestroyAccess); if (pHead) { pPrev = 0; for (pCur = *pHead; pCur && pCur != pRREvent; pCur = pCur->next) pPrev = pCur; if (pCur) { if (pPrev) pPrev->next = pRREvent->next; else *pHead = pRREvent->next; } } free((void *) pRREvent); return 1; } /*ARGSUSED*/ static int RRFreeEvents(void *data, XID id) { RREventPtr *pHead, pCur, pNext; pHead = (RREventPtr *) data; for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource(pCur->clientResource, RRClientType); free((void *) pCur); } free((void *) pHead); return 1; } void RRExtensionInit(void) { ExtensionEntry *extEntry; if (RRNScreens == 0) return; if (!dixRegisterPrivateKey(&RRClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RRClientRec) + screenInfo.numScreens * sizeof(RRTimesRec))) return; if (!AddCallback(&ClientStateCallback, RRClientCallback, 0)) return; RRClientType = CreateNewResourceType(RRFreeClient, "RandRClient"); if (!RRClientType) return; RREventType = CreateNewResourceType(RRFreeEvents, "RandREvent"); if (!RREventType) return; extEntry = AddExtension(RANDR_NAME, RRNumberEvents, RRNumberErrors, ProcRRDispatch, SProcRRDispatch, NULL, StandardMinorOpcode); if (!extEntry) return; RRErrorBase = extEntry->errorBase; RREventBase = extEntry->eventBase; EventSwapVector[RREventBase + RRScreenChangeNotify] = (EventSwapPtr) SRRScreenChangeNotifyEvent; EventSwapVector[RREventBase + RRNotify] = (EventSwapPtr) SRRNotifyEvent; RRModeInitErrorValue(); RRCrtcInitErrorValue(); RROutputInitErrorValue(); RRProviderInitErrorValue(); #ifdef PANORAMIX RRXineramaExtensionInit(); #endif } void RRResourcesChanged(ScreenPtr pScreen) { rrScrPriv(pScreen); pScrPriv->resourcesChanged = TRUE; RRSetChanged(pScreen); } static void RRDeliverResourceEvent(ClientPtr client, WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv(pScreen); xRRResourceChangeNotifyEvent re = { .type = RRNotify + RREventBase, .subCode = RRNotify_ResourceChange, .timestamp = pScrPriv->lastSetTime.milliseconds, .window = pWin->drawable.id }; WriteEventsToClient(client, 1, (xEvent *) &re); } static int TellChanged(WindowPtr pWin, void *value) { RREventPtr *pHead, pRREvent; ClientPtr client; ScreenPtr pScreen = pWin->drawable.pScreen; ScreenPtr iter; rrScrPrivPtr pSecondaryScrPriv; rrScrPriv(pScreen); int i; dixLookupResourceByType((void **) &pHead, pWin->drawable.id, RREventType, serverClient, DixReadAccess); if (!pHead) return WT_WALKCHILDREN; for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) { client = pRREvent->client; if (client == serverClient || client->clientGone) continue; if (pRREvent->mask & RRScreenChangeNotifyMask) RRDeliverScreenEvent(client, pWin, pScreen); if (pRREvent->mask & RRCrtcChangeNotifyMask) { for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; if (crtc->changed) RRDeliverCrtcEvent(client, pWin, crtc); } xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { if (!iter->is_output_secondary) continue; pSecondaryScrPriv = rrGetScrPriv(iter); for (i = 0; i < pSecondaryScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pSecondaryScrPriv->crtcs[i]; if (crtc->changed) RRDeliverCrtcEvent(client, pWin, crtc); } } } if (pRREvent->mask & RROutputChangeNotifyMask) { for (i = 0; i < pScrPriv->numOutputs; i++) { RROutputPtr output = pScrPriv->outputs[i]; if (output->changed) RRDeliverOutputEvent(client, pWin, output); } xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { if (!iter->is_output_secondary) continue; pSecondaryScrPriv = rrGetScrPriv(iter); for (i = 0; i < pSecondaryScrPriv->numOutputs; i++) { RROutputPtr output = pSecondaryScrPriv->outputs[i]; if (output->changed) RRDeliverOutputEvent(client, pWin, output); } } } if (pRREvent->mask & RRProviderChangeNotifyMask) { xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { pSecondaryScrPriv = rrGetScrPriv(iter); if (pSecondaryScrPriv->provider->changed) RRDeliverProviderEvent(client, pWin, pSecondaryScrPriv->provider); } } if (pRREvent->mask & RRResourceChangeNotifyMask) { if (pScrPriv->resourcesChanged) { RRDeliverResourceEvent(client, pWin); } } if (pRREvent->mask & RRLeaseNotifyMask) { if (pScrPriv->leasesChanged) { RRDeliverLeaseEvent(client, pWin); } } } return WT_WALKCHILDREN; } void RRSetChanged(ScreenPtr pScreen) { /* set changed bits on the primary screen only */ ScreenPtr primary; rrScrPriv(pScreen); rrScrPrivPtr primarysp; if (pScreen->isGPU) { primary = pScreen->current_primary; if (!primary) return; primarysp = rrGetScrPriv(primary); } else { primary = pScreen; primarysp = pScrPriv; } primarysp->changed = TRUE; } /* * Something changed; send events and adjust pointer position */ void RRTellChanged(ScreenPtr pScreen) { ScreenPtr primary; rrScrPriv(pScreen); rrScrPrivPtr primarysp; int i; ScreenPtr iter; rrScrPrivPtr pSecondaryScrPriv; if (pScreen->isGPU) { primary = pScreen->current_primary; if (!primary) return; primarysp = rrGetScrPriv(primary); } else { primary = pScreen; primarysp = pScrPriv; } /* If there's no root window yet, can't send events */ if (!primary->root) return; xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) { pSecondaryScrPriv = rrGetScrPriv(iter); if (!iter->is_output_secondary) continue; if (CompareTimeStamps(primarysp->lastSetTime, pSecondaryScrPriv->lastSetTime) == EARLIER) { primarysp->lastSetTime = pSecondaryScrPriv->lastSetTime; } } if (primarysp->changed) { UpdateCurrentTimeIf(); if (primarysp->configChanged) { primarysp->lastConfigTime = currentTime; primarysp->configChanged = FALSE; } pScrPriv->changed = FALSE; primarysp->changed = FALSE; WalkTree(primary, TellChanged, (void *) primary); primarysp->resourcesChanged = FALSE; for (i = 0; i < pScrPriv->numOutputs; i++) pScrPriv->outputs[i]->changed = FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) pScrPriv->crtcs[i]->changed = FALSE; xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) { pSecondaryScrPriv = rrGetScrPriv(iter); pSecondaryScrPriv->provider->changed = FALSE; if (iter->is_output_secondary) { for (i = 0; i < pSecondaryScrPriv->numOutputs; i++) pSecondaryScrPriv->outputs[i]->changed = FALSE; for (i = 0; i < pSecondaryScrPriv->numCrtcs; i++) pSecondaryScrPriv->crtcs[i]->changed = FALSE; } } if (primarysp->layoutChanged) { pScrPriv->layoutChanged = FALSE; RRPointerScreenConfigured(primary); RRSendConfigNotify(primary); } } } /* * Return the first output which is connected to an active CRTC * Used in emulating 1.0 behaviour */ RROutputPtr RRFirstOutput(ScreenPtr pScreen) { rrScrPriv(pScreen); RROutputPtr output; int i, j; if (!pScrPriv) return NULL; if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) return pScrPriv->primaryOutput; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; for (j = 0; j < pScrPriv->numOutputs; j++) { output = pScrPriv->outputs[j]; if (output->crtc == crtc) return output; } } return NULL; } RRCrtcPtr RRFirstEnabledCrtc(ScreenPtr pScreen) { rrScrPriv(pScreen); RROutputPtr output; int i, j; if (!pScrPriv) return NULL; if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc && pScrPriv->primaryOutput->pScreen == pScreen) return pScrPriv->primaryOutput->crtc; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; for (j = 0; j < pScrPriv->numOutputs; j++) { output = pScrPriv->outputs[j]; if (output->crtc == crtc && crtc->mode) return crtc; } } return NULL; } CARD16 RRVerticalRefresh(xRRModeInfo * mode) { CARD32 refresh; CARD32 dots = mode->hTotal * mode->vTotal; if (!dots) return 0; refresh = (mode->dotClock + dots / 2) / dots; if (refresh > 0xffff) refresh = 0xffff; return (CARD16) refresh; } static int ProcRRDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= RRNumberRequests || !ProcRandrVector[stuff->data]) return BadRequest; UpdateCurrentTimeIf(); return (*ProcRandrVector[stuff->data]) (client); } static int _X_COLD SProcRRDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= RRNumberRequests || !SProcRandrVector[stuff->data]) return BadRequest; UpdateCurrentTimeIf(); return (*SProcRandrVector[stuff->data]) (client); } xorg-server-21.1.16/randr/rrcrtc.c0000644000175000017500000016163014757411105012413 /* * Copyright © 2006 Keith Packard * Copyright 2010 Red Hat, Inc * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "swaprep.h" #include "mipointer.h" #include RESTYPE RRCrtcType = 0; /* * Notify the CRTC of some change */ void RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged) { ScreenPtr pScreen = crtc->pScreen; crtc->changed = TRUE; if (pScreen) { rrScrPriv(pScreen); RRSetChanged(pScreen); /* * Send ConfigureNotify on any layout change */ if (layoutChanged) pScrPriv->layoutChanged = TRUE; } } /* * Create a CRTC */ RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate) { RRCrtcPtr crtc; RRCrtcPtr *crtcs; rrScrPrivPtr pScrPriv; if (!RRInit()) return NULL; pScrPriv = rrGetScrPriv(pScreen); /* make space for the crtc pointer */ crtcs = reallocarray(pScrPriv->crtcs, pScrPriv->numCrtcs + 1, sizeof(RRCrtcPtr)); if (!crtcs) return NULL; pScrPriv->crtcs = crtcs; crtc = calloc(1, sizeof(RRCrtcRec)); if (!crtc) return NULL; crtc->id = FakeClientID(0); crtc->pScreen = pScreen; crtc->mode = NULL; crtc->x = 0; crtc->y = 0; crtc->rotation = RR_Rotate_0; crtc->rotations = RR_Rotate_0; crtc->outputs = NULL; crtc->numOutputs = 0; crtc->gammaSize = 0; crtc->gammaRed = crtc->gammaBlue = crtc->gammaGreen = NULL; crtc->changed = FALSE; crtc->devPrivate = devPrivate; RRTransformInit(&crtc->client_pending_transform); RRTransformInit(&crtc->client_current_transform); pixman_transform_init_identity(&crtc->transform); pixman_f_transform_init_identity(&crtc->f_transform); pixman_f_transform_init_identity(&crtc->f_inverse); if (!AddResource(crtc->id, RRCrtcType, (void *) crtc)) return NULL; /* attach the screen and crtc together */ crtc->pScreen = pScreen; pScrPriv->crtcs[pScrPriv->numCrtcs++] = crtc; RRResourcesChanged(pScreen); return crtc; } /* * Set the allowed rotations on a CRTC */ void RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations) { crtc->rotations = rotations; } /* * Set whether transforms are allowed on a CRTC */ void RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms) { crtc->transforms = transforms; } /* * Notify the extension that the Crtc has been reconfigured, * the driver calls this whenever it has updated the mode */ Bool RRCrtcNotify(RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, RRTransformPtr transform, int numOutputs, RROutputPtr * outputs) { int i, j; /* * Check to see if any of the new outputs were * not in the old list and mark them as changed */ for (i = 0; i < numOutputs; i++) { for (j = 0; j < crtc->numOutputs; j++) if (outputs[i] == crtc->outputs[j]) break; if (j == crtc->numOutputs) { outputs[i]->crtc = crtc; RROutputChanged(outputs[i], FALSE); RRCrtcChanged(crtc, FALSE); } } /* * Check to see if any of the old outputs are * not in the new list and mark them as changed */ for (j = 0; j < crtc->numOutputs; j++) { for (i = 0; i < numOutputs; i++) if (outputs[i] == crtc->outputs[j]) break; if (i == numOutputs) { if (crtc->outputs[j]->crtc == crtc) crtc->outputs[j]->crtc = NULL; RROutputChanged(crtc->outputs[j], FALSE); RRCrtcChanged(crtc, FALSE); } } /* * Reallocate the crtc output array if necessary */ if (numOutputs != crtc->numOutputs) { RROutputPtr *newoutputs; if (numOutputs) { if (crtc->numOutputs) newoutputs = reallocarray(crtc->outputs, numOutputs, sizeof(RROutputPtr)); else newoutputs = xallocarray(numOutputs, sizeof(RROutputPtr)); if (!newoutputs) return FALSE; } else { free(crtc->outputs); newoutputs = NULL; } crtc->outputs = newoutputs; crtc->numOutputs = numOutputs; } /* * Copy the new list of outputs into the crtc */ memcpy(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)); /* * Update remaining crtc fields */ if (mode != crtc->mode) { if (crtc->mode) RRModeDestroy(crtc->mode); crtc->mode = mode; if (mode != NULL) mode->refcnt++; RRCrtcChanged(crtc, TRUE); } if (x != crtc->x) { crtc->x = x; RRCrtcChanged(crtc, TRUE); } if (y != crtc->y) { crtc->y = y; RRCrtcChanged(crtc, TRUE); } if (rotation != crtc->rotation) { crtc->rotation = rotation; RRCrtcChanged(crtc, TRUE); } if (!RRTransformEqual(transform, &crtc->client_current_transform)) { RRTransformCopy(&crtc->client_current_transform, transform); RRCrtcChanged(crtc, TRUE); } if (crtc->changed && mode) { RRTransformCompute(x, y, mode->mode.width, mode->mode.height, rotation, &crtc->client_current_transform, &crtc->transform, &crtc->f_transform, &crtc->f_inverse); } return TRUE; } void RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv(pScreen); RRModePtr mode = crtc->mode; xRRCrtcChangeNotifyEvent ce = { .type = RRNotify + RREventBase, .subCode = RRNotify_CrtcChange, .timestamp = pScrPriv->lastSetTime.milliseconds, .window = pWin->drawable.id, .crtc = crtc->id, .mode = mode ? mode->mode.id : None, .rotation = crtc->rotation, .x = mode ? crtc->x : 0, .y = mode ? crtc->y : 0, .width = mode ? mode->mode.width : 0, .height = mode ? mode->mode.height : 0 }; WriteEventsToClient(client, 1, (xEvent *) &ce); } static Bool RRCrtcPendingProperties(RRCrtcPtr crtc) { ScreenPtr pScreen = crtc->pScreen; rrScrPriv(pScreen); int o; for (o = 0; o < pScrPriv->numOutputs; o++) { RROutputPtr output = pScrPriv->outputs[o]; if (output->crtc == crtc && output->pendingProperties) return TRUE; } return FALSE; } static Bool cursor_bounds(RRCrtcPtr crtc, int *left, int *right, int *top, int *bottom) { rrScrPriv(crtc->pScreen); BoxRec bounds; if (crtc->mode == NULL) return FALSE; memset(&bounds, 0, sizeof(bounds)); if (pScrPriv->rrGetPanning) pScrPriv->rrGetPanning(crtc->pScreen, crtc, NULL, &bounds, NULL); if (bounds.y2 <= bounds.y1 || bounds.x2 <= bounds.x1) { bounds.x1 = 0; bounds.y1 = 0; bounds.x2 = crtc->mode->mode.width; bounds.y2 = crtc->mode->mode.height; } pixman_f_transform_bounds(&crtc->f_transform, &bounds); *left = bounds.x1; *right = bounds.x2; *top = bounds.y1; *bottom = bounds.y2; return TRUE; } /* overlapping counts as adjacent */ static Bool crtcs_adjacent(const RRCrtcPtr a, const RRCrtcPtr b) { /* left, right, top, bottom... */ int al, ar, at, ab; int bl, br, bt, bb; int cl, cr, ct, cb; /* the overlap, if any */ if (!cursor_bounds(a, &al, &ar, &at, &ab)) return FALSE; if (!cursor_bounds(b, &bl, &br, &bt, &bb)) return FALSE; cl = max(al, bl); cr = min(ar, br); ct = max(at, bt); cb = min(ab, bb); return (cl <= cr) && (ct <= cb); } /* Depth-first search and mark all CRTCs reachable from cur */ static void mark_crtcs(rrScrPrivPtr pScrPriv, int *reachable, int cur) { int i; reachable[cur] = TRUE; for (i = 0; i < pScrPriv->numCrtcs; ++i) { if (reachable[i]) continue; if (crtcs_adjacent(pScrPriv->crtcs[cur], pScrPriv->crtcs[i])) mark_crtcs(pScrPriv, reachable, i); } } static void RRComputeContiguity(ScreenPtr pScreen) { rrScrPriv(pScreen); Bool discontiguous = TRUE; int i, n = pScrPriv->numCrtcs; int *reachable = calloc(n, sizeof(int)); if (!reachable) goto out; /* Find first enabled CRTC and start search for reachable CRTCs from it */ for (i = 0; i < n; ++i) { if (pScrPriv->crtcs[i]->mode) { mark_crtcs(pScrPriv, reachable, i); break; } } /* Check that all enabled CRTCs were marked as reachable */ for (i = 0; i < n; ++i) if (pScrPriv->crtcs[i]->mode && !reachable[i]) goto out; discontiguous = FALSE; out: free(reachable); pScrPriv->discontiguous = discontiguous; } static void rrDestroySharedPixmap(RRCrtcPtr crtc, PixmapPtr pPixmap) { ScreenPtr primary = crtc->pScreen->current_primary; if (primary && pPixmap->primary_pixmap) { /* * Unref the pixmap twice: once for the original reference, and once * for the reference implicitly added by PixmapShareToSecondary. */ PixmapUnshareSecondaryPixmap(pPixmap); primary->DestroyPixmap(pPixmap->primary_pixmap); primary->DestroyPixmap(pPixmap->primary_pixmap); } crtc->pScreen->DestroyPixmap(pPixmap); } void RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc) { rrScrPriv(crtc->pScreen); if (crtc->scanout_pixmap) { ScreenPtr primary = crtc->pScreen->current_primary; DrawablePtr mrootdraw = &primary->root->drawable; if (crtc->scanout_pixmap_back) { pScrPriv->rrDisableSharedPixmapFlipping(crtc); if (mrootdraw) { primary->StopFlippingPixmapTracking(mrootdraw, crtc->scanout_pixmap, crtc->scanout_pixmap_back); } rrDestroySharedPixmap(crtc, crtc->scanout_pixmap_back); crtc->scanout_pixmap_back = NULL; } else { pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL); if (mrootdraw) { primary->StopPixmapTracking(mrootdraw, crtc->scanout_pixmap); } } rrDestroySharedPixmap(crtc, crtc->scanout_pixmap); crtc->scanout_pixmap = NULL; } RRCrtcChanged(crtc, TRUE); } static PixmapPtr rrCreateSharedPixmap(RRCrtcPtr crtc, ScreenPtr primary, int width, int height, int depth, int x, int y, Rotation rotation) { PixmapPtr mpix, spix; mpix = primary->CreatePixmap(primary, width, height, depth, CREATE_PIXMAP_USAGE_SHARED); if (!mpix) return NULL; spix = PixmapShareToSecondary(mpix, crtc->pScreen); if (spix == NULL) { primary->DestroyPixmap(mpix); return NULL; } return spix; } static Bool rrGetPixmapSharingSyncProp(int numOutputs, RROutputPtr * outputs) { /* Determine if the user wants prime syncing */ int o; const char *syncStr = PRIME_SYNC_PROP; Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); if (syncProp == None) return TRUE; /* If one output doesn't want sync, no sync */ for (o = 0; o < numOutputs; o++) { RRPropertyValuePtr val; /* Try pending value first, then current value */ if ((val = RRGetOutputProperty(outputs[o], syncProp, TRUE)) && val->data) { if (!(*(char *) val->data)) return FALSE; continue; } if ((val = RRGetOutputProperty(outputs[o], syncProp, FALSE)) && val->data) { if (!(*(char *) val->data)) return FALSE; continue; } } return TRUE; } static void rrSetPixmapSharingSyncProp(char val, int numOutputs, RROutputPtr * outputs) { int o; const char *syncStr = PRIME_SYNC_PROP; Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); if (syncProp == None) return; for (o = 0; o < numOutputs; o++) { RRPropertyPtr prop = RRQueryOutputProperty(outputs[o], syncProp); if (prop) RRChangeOutputProperty(outputs[o], syncProp, XA_INTEGER, 8, PropModeReplace, 1, &val, FALSE, TRUE); } } static Bool rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height, int x, int y, Rotation rotation, Bool sync, int numOutputs, RROutputPtr * outputs) { ScreenPtr primary = crtc->pScreen->current_primary; rrScrPrivPtr pPrimaryScrPriv = rrGetScrPriv(primary); rrScrPrivPtr pSecondaryScrPriv = rrGetScrPriv(crtc->pScreen); DrawablePtr mrootdraw = &primary->root->drawable; int depth = mrootdraw->depth; PixmapPtr spix_front; /* Create a pixmap on the primary screen, then get a shared handle for it. Create a shared pixmap on the secondary screen using the handle. If sync == FALSE -- Set secondary screen to scanout shared linear pixmap. Set the primary screen to do dirty updates to the shared pixmap from the screen pixmap on its own accord. If sync == TRUE -- If any of the below steps fail, clean up and fall back to sync == FALSE. Create another shared pixmap on the secondary screen using the handle. Set secondary screen to prepare for scanout and flipping between shared linear pixmaps. Set the primary screen to do dirty updates to the shared pixmaps from the screen pixmap when prompted to by us or the secondary. Prompt the primary to do a dirty update on the first shared pixmap, then defer to the secondary. */ if (crtc->scanout_pixmap) RRCrtcDetachScanoutPixmap(crtc); if (width == 0 && height == 0) { return TRUE; } spix_front = rrCreateSharedPixmap(crtc, primary, width, height, depth, x, y, rotation); if (spix_front == NULL) { ErrorF("randr: failed to create shared pixmap\n"); return FALSE; } /* Both source and sink must support required ABI funcs for flipping */ if (sync && pSecondaryScrPriv->rrEnableSharedPixmapFlipping && pSecondaryScrPriv->rrDisableSharedPixmapFlipping && pPrimaryScrPriv->rrStartFlippingPixmapTracking && primary->PresentSharedPixmap && primary->StopFlippingPixmapTracking) { PixmapPtr spix_back = rrCreateSharedPixmap(crtc, primary, width, height, depth, x, y, rotation); if (spix_back == NULL) goto fail; if (!pSecondaryScrPriv->rrEnableSharedPixmapFlipping(crtc, spix_front, spix_back)) goto fail; crtc->scanout_pixmap = spix_front; crtc->scanout_pixmap_back = spix_back; if (!pPrimaryScrPriv->rrStartFlippingPixmapTracking(crtc, mrootdraw, spix_front, spix_back, x, y, 0, 0, rotation)) { pSecondaryScrPriv->rrDisableSharedPixmapFlipping(crtc); goto fail; } primary->PresentSharedPixmap(spix_front); return TRUE; fail: /* If flipping funcs fail, just fall back to unsynchronized */ if (spix_back) rrDestroySharedPixmap(crtc, spix_back); crtc->scanout_pixmap = NULL; crtc->scanout_pixmap_back = NULL; } if (sync) { /* Wanted sync, didn't get it */ ErrorF("randr: falling back to unsynchronized pixmap sharing\n"); /* Set output property to 0 to indicate to user */ rrSetPixmapSharingSyncProp(0, numOutputs, outputs); } if (!pSecondaryScrPriv->rrCrtcSetScanoutPixmap(crtc, spix_front)) { rrDestroySharedPixmap(crtc, spix_front); ErrorF("randr: failed to set shadow secondary pixmap\n"); return FALSE; } crtc->scanout_pixmap = spix_front; primary->StartPixmapTracking(mrootdraw, spix_front, x, y, 0, 0, rotation); return TRUE; } static void crtc_to_box(BoxPtr box, RRCrtcPtr crtc) { box->x1 = crtc->x; box->y1 = crtc->y; switch (crtc->rotation) { case RR_Rotate_0: case RR_Rotate_180: default: box->x2 = crtc->x + crtc->mode->mode.width; box->y2 = crtc->y + crtc->mode->mode.height; break; case RR_Rotate_90: case RR_Rotate_270: box->x2 = crtc->x + crtc->mode->mode.height; box->y2 = crtc->y + crtc->mode->mode.width; break; } } static Bool rrCheckPixmapBounding(ScreenPtr pScreen, RRCrtcPtr rr_crtc, Rotation rotation, int x, int y, int w, int h) { RegionRec root_pixmap_region, total_region, new_crtc_region; int c; BoxRec newbox; BoxPtr newsize; ScreenPtr secondary; int new_width, new_height; PixmapPtr screen_pixmap = pScreen->GetScreenPixmap(pScreen); rrScrPriv(pScreen); PixmapRegionInit(&root_pixmap_region, screen_pixmap); RegionInit(&total_region, NULL, 0); /* have to iterate all the crtcs of the attached gpu primarys and all their output secondarys */ for (c = 0; c < pScrPriv->numCrtcs; c++) { RRCrtcPtr crtc = pScrPriv->crtcs[c]; if (crtc == rr_crtc) { newbox.x1 = x; newbox.y1 = y; if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270) { newbox.x2 = x + h; newbox.y2 = y + w; } else { newbox.x2 = x + w; newbox.y2 = y + h; } } else { if (!crtc->mode) continue; crtc_to_box(&newbox, crtc); } RegionInit(&new_crtc_region, &newbox, 1); RegionUnion(&total_region, &total_region, &new_crtc_region); } xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { rrScrPrivPtr secondary_priv = rrGetScrPriv(secondary); if (!secondary->is_output_secondary) continue; for (c = 0; c < secondary_priv->numCrtcs; c++) { RRCrtcPtr secondary_crtc = secondary_priv->crtcs[c]; if (secondary_crtc == rr_crtc) { newbox.x1 = x; newbox.y1 = y; if (rotation == RR_Rotate_90 || rotation == RR_Rotate_270) { newbox.x2 = x + h; newbox.y2 = y + w; } else { newbox.x2 = x + w; newbox.y2 = y + h; } } else { if (!secondary_crtc->mode) continue; crtc_to_box(&newbox, secondary_crtc); } RegionInit(&new_crtc_region, &newbox, 1); RegionUnion(&total_region, &total_region, &new_crtc_region); } } newsize = RegionExtents(&total_region); new_width = newsize->x2; new_height = newsize->y2; if (new_width < screen_pixmap->drawable.width) new_width = screen_pixmap->drawable.width; if (new_height < screen_pixmap->drawable.height) new_height = screen_pixmap->drawable.height; if (new_width <= screen_pixmap->drawable.width && new_height <= screen_pixmap->drawable.height) { } else { pScrPriv->rrScreenSetSize(pScreen, new_width, new_height, 0, 0); } /* set shatters TODO */ return TRUE; } /* * Request that the Crtc be reconfigured */ Bool RRCrtcSet(RRCrtcPtr crtc, RRModePtr mode, int x, int y, Rotation rotation, int numOutputs, RROutputPtr * outputs) { ScreenPtr pScreen = crtc->pScreen; Bool ret = FALSE; Bool recompute = TRUE; Bool crtcChanged; int o; rrScrPriv(pScreen); crtcChanged = FALSE; for (o = 0; o < numOutputs; o++) { if (outputs[o] && outputs[o]->crtc != crtc) { crtcChanged = TRUE; break; } } /* See if nothing changed */ if (crtc->mode == mode && crtc->x == x && crtc->y == y && crtc->rotation == rotation && crtc->numOutputs == numOutputs && !memcmp(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)) && !RRCrtcPendingProperties(crtc) && !RRCrtcPendingTransform(crtc) && !crtcChanged) { recompute = FALSE; ret = TRUE; } else { if (pScreen->isGPU) { ScreenPtr primary = pScreen->current_primary; int width = 0, height = 0; if (mode) { width = mode->mode.width; height = mode->mode.height; } ret = rrCheckPixmapBounding(primary, crtc, rotation, x, y, width, height); if (!ret) return FALSE; if (pScreen->current_primary) { Bool sync = rrGetPixmapSharingSyncProp(numOutputs, outputs); ret = rrSetupPixmapSharing(crtc, width, height, x, y, rotation, sync, numOutputs, outputs); } } #if RANDR_12_INTERFACE if (pScrPriv->rrCrtcSet) { ret = (*pScrPriv->rrCrtcSet) (pScreen, crtc, mode, x, y, rotation, numOutputs, outputs); } else #endif { #if RANDR_10_INTERFACE if (pScrPriv->rrSetConfig) { RRScreenSize size; RRScreenRate rate; if (!mode) { RRCrtcNotify(crtc, NULL, x, y, rotation, NULL, 0, NULL); ret = TRUE; } else { size.width = mode->mode.width; size.height = mode->mode.height; if (outputs[0]->mmWidth && outputs[0]->mmHeight) { size.mmWidth = outputs[0]->mmWidth; size.mmHeight = outputs[0]->mmHeight; } else { size.mmWidth = pScreen->mmWidth; size.mmHeight = pScreen->mmHeight; } size.nRates = 1; rate.rate = RRVerticalRefresh(&mode->mode); size.pRates = &rate; ret = (*pScrPriv->rrSetConfig) (pScreen, rotation, rate.rate, &size); /* * Old 1.0 interface tied screen size to mode size */ if (ret) { RRCrtcNotify(crtc, mode, x, y, rotation, NULL, 1, outputs); RRScreenSizeNotify(pScreen); } } } #endif } if (ret) { RRTellChanged(pScreen); for (o = 0; o < numOutputs; o++) RRPostPendingProperties(outputs[o]); } } if (recompute) RRComputeContiguity(pScreen); return ret; } /* * Return crtc transform */ RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc) { RRTransformPtr transform = &crtc->client_pending_transform; if (pixman_transform_is_identity(&transform->transform)) return NULL; return transform; } /* * Check whether the pending and current transforms are the same */ Bool RRCrtcPendingTransform(RRCrtcPtr crtc) { return !RRTransformEqual(&crtc->client_current_transform, &crtc->client_pending_transform); } /* * Destroy a Crtc at shutdown */ void RRCrtcDestroy(RRCrtcPtr crtc) { FreeResource(crtc->id, 0); } static int RRCrtcDestroyResource(void *value, XID pid) { RRCrtcPtr crtc = (RRCrtcPtr) value; ScreenPtr pScreen = crtc->pScreen; if (pScreen) { rrScrPriv(pScreen); int i; RRLeasePtr lease, next; xorg_list_for_each_entry_safe(lease, next, &pScrPriv->leases, list) { int c; for (c = 0; c < lease->numCrtcs; c++) { if (lease->crtcs[c] == crtc) { RRTerminateLease(lease); break; } } } for (i = 0; i < pScrPriv->numCrtcs; i++) { if (pScrPriv->crtcs[i] == crtc) { memmove(pScrPriv->crtcs + i, pScrPriv->crtcs + i + 1, (pScrPriv->numCrtcs - (i + 1)) * sizeof(RRCrtcPtr)); --pScrPriv->numCrtcs; break; } } RRResourcesChanged(pScreen); } if (crtc->scanout_pixmap) RRCrtcDetachScanoutPixmap(crtc); free(crtc->gammaRed); if (crtc->mode) RRModeDestroy(crtc->mode); free(crtc->outputs); free(crtc); return 1; } /* * Request that the Crtc gamma be changed */ Bool RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue) { Bool ret = TRUE; #if RANDR_12_INTERFACE ScreenPtr pScreen = crtc->pScreen; #endif memcpy(crtc->gammaRed, red, crtc->gammaSize * sizeof(CARD16)); memcpy(crtc->gammaGreen, green, crtc->gammaSize * sizeof(CARD16)); memcpy(crtc->gammaBlue, blue, crtc->gammaSize * sizeof(CARD16)); #if RANDR_12_INTERFACE if (pScreen) { rrScrPriv(pScreen); if (pScrPriv->rrCrtcSetGamma) ret = (*pScrPriv->rrCrtcSetGamma) (pScreen, crtc); } #endif return ret; } /* * Request current gamma back from the DDX (if possible). * This includes gamma size. */ Bool RRCrtcGammaGet(RRCrtcPtr crtc) { Bool ret = TRUE; #if RANDR_12_INTERFACE ScreenPtr pScreen = crtc->pScreen; #endif #if RANDR_12_INTERFACE if (pScreen) { rrScrPriv(pScreen); if (pScrPriv->rrCrtcGetGamma) ret = (*pScrPriv->rrCrtcGetGamma) (pScreen, crtc); } #endif return ret; } static Bool RRCrtcInScreen(ScreenPtr pScreen, RRCrtcPtr findCrtc) { rrScrPrivPtr pScrPriv; int c; if (pScreen == NULL) return FALSE; if (findCrtc == NULL) return FALSE; if (!dixPrivateKeyRegistered(rrPrivKey)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); for (c = 0; c < pScrPriv->numCrtcs; c++) { if (pScrPriv->crtcs[c] == findCrtc) return TRUE; } return FALSE; } Bool RRCrtcExists(ScreenPtr pScreen, RRCrtcPtr findCrtc) { ScreenPtr secondary= NULL; if (RRCrtcInScreen(pScreen, findCrtc)) return TRUE; xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; if (RRCrtcInScreen(secondary, findCrtc)) return TRUE; } return FALSE; } /* * Notify the extension that the Crtc gamma has been changed * The driver calls this whenever it has changed the gamma values * in the RRCrtcRec */ Bool RRCrtcGammaNotify(RRCrtcPtr crtc) { return TRUE; /* not much going on here */ } static void RRModeGetScanoutSize(RRModePtr mode, PictTransformPtr transform, int *width, int *height) { BoxRec box; if (mode == NULL) { *width = 0; *height = 0; return; } box.x1 = 0; box.y1 = 0; box.x2 = mode->mode.width; box.y2 = mode->mode.height; pixman_transform_bounds(transform, &box); *width = box.x2 - box.x1; *height = box.y2 - box.y1; } /** * Returns the width/height that the crtc scans out from the framebuffer */ void RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height) { RRModeGetScanoutSize(crtc->mode, &crtc->transform, width, height); } /* * Set the size of the gamma table at server startup time */ Bool RRCrtcGammaSetSize(RRCrtcPtr crtc, int size) { CARD16 *gamma; if (size == crtc->gammaSize) return TRUE; if (size) { gamma = xallocarray(size, 3 * sizeof(CARD16)); if (!gamma) return FALSE; } else gamma = NULL; free(crtc->gammaRed); crtc->gammaRed = gamma; crtc->gammaGreen = gamma + size; crtc->gammaBlue = gamma + size * 2; crtc->gammaSize = size; return TRUE; } /* * Set the pending CRTC transformation */ int RRCrtcTransformSet(RRCrtcPtr crtc, PictTransformPtr transform, struct pixman_f_transform *f_transform, struct pixman_f_transform *f_inverse, char *filter_name, int filter_len, xFixed * params, int nparams) { PictFilterPtr filter = NULL; int width = 0, height = 0; if (!crtc->transforms) return BadValue; if (filter_len) { filter = PictureFindFilter(crtc->pScreen, filter_name, filter_len); if (!filter) return BadName; if (filter->ValidateParams) { if (!filter->ValidateParams(crtc->pScreen, filter->id, params, nparams, &width, &height)) return BadMatch; } else { width = filter->width; height = filter->height; } } else { if (nparams) return BadMatch; } if (!RRTransformSetFilter(&crtc->client_pending_transform, filter, params, nparams, width, height)) return BadAlloc; crtc->client_pending_transform.transform = *transform; crtc->client_pending_transform.f_transform = *f_transform; crtc->client_pending_transform.f_inverse = *f_inverse; return Success; } /* * Initialize crtc type */ Bool RRCrtcInit(void) { RRCrtcType = CreateNewResourceType(RRCrtcDestroyResource, "CRTC"); if (!RRCrtcType) return FALSE; return TRUE; } /* * Initialize crtc type error value */ void RRCrtcInitErrorValue(void) { SetResourceTypeErrorValue(RRCrtcType, RRErrorBase + BadRRCrtc); } int ProcRRGetCrtcInfo(ClientPtr client) { REQUEST(xRRGetCrtcInfoReq); xRRGetCrtcInfoReply rep; RRCrtcPtr crtc; CARD8 *extra = NULL; unsigned long extraLen; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; RRModePtr mode; RROutput *outputs; RROutput *possible; int i, j, k; int width, height; BoxRec panned_area; Bool leased; REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); leased = RRCrtcIsLeased(crtc); /* All crtcs must be associated with screens before client * requests are processed */ pScreen = crtc->pScreen; pScrPriv = rrGetScrPriv(pScreen); mode = crtc->mode; rep = (xRRGetCrtcInfoReply) { .type = X_Reply, .status = RRSetConfigSuccess, .sequenceNumber = client->sequence, .length = 0, .timestamp = pScrPriv->lastSetTime.milliseconds }; if (leased) { rep.x = rep.y = rep.width = rep.height = 0; rep.mode = 0; rep.rotation = RR_Rotate_0; rep.rotations = RR_Rotate_0; rep.nOutput = 0; rep.nPossibleOutput = 0; rep.length = 0; extraLen = 0; } else { if (pScrPriv->rrGetPanning && pScrPriv->rrGetPanning(pScreen, crtc, &panned_area, NULL, NULL) && (panned_area.x2 > panned_area.x1) && (panned_area.y2 > panned_area.y1)) { rep.x = panned_area.x1; rep.y = panned_area.y1; rep.width = panned_area.x2 - panned_area.x1; rep.height = panned_area.y2 - panned_area.y1; } else { RRCrtcGetScanoutSize(crtc, &width, &height); rep.x = crtc->x; rep.y = crtc->y; rep.width = width; rep.height = height; } rep.mode = mode ? mode->mode.id : 0; rep.rotation = crtc->rotation; rep.rotations = crtc->rotations; rep.nOutput = crtc->numOutputs; k = 0; for (i = 0; i < pScrPriv->numOutputs; i++) { if (!RROutputIsLeased(pScrPriv->outputs[i])) { for (j = 0; j < pScrPriv->outputs[i]->numCrtcs; j++) if (pScrPriv->outputs[i]->crtcs[j] == crtc) k++; } } rep.nPossibleOutput = k; rep.length = rep.nOutput + rep.nPossibleOutput; extraLen = rep.length << 2; if (extraLen) { extra = malloc(extraLen); if (!extra) return BadAlloc; } outputs = (RROutput *) extra; possible = (RROutput *) (outputs + rep.nOutput); for (i = 0; i < crtc->numOutputs; i++) { outputs[i] = crtc->outputs[i]->id; if (client->swapped) swapl(&outputs[i]); } k = 0; for (i = 0; i < pScrPriv->numOutputs; i++) { if (!RROutputIsLeased(pScrPriv->outputs[i])) { for (j = 0; j < pScrPriv->outputs[i]->numCrtcs; j++) if (pScrPriv->outputs[i]->crtcs[j] == crtc) { possible[k] = pScrPriv->outputs[i]->id; if (client->swapped) swapl(&possible[k]); k++; } } } } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swaps(&rep.x); swaps(&rep.y); swaps(&rep.width); swaps(&rep.height); swapl(&rep.mode); swaps(&rep.rotation); swaps(&rep.rotations); swaps(&rep.nOutput); swaps(&rep.nPossibleOutput); } WriteToClient(client, sizeof(xRRGetCrtcInfoReply), &rep); if (extraLen) { WriteToClient(client, extraLen, extra); free(extra); } return Success; } int ProcRRSetCrtcConfig(ClientPtr client) { REQUEST(xRRSetCrtcConfigReq); xRRSetCrtcConfigReply rep; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; RRCrtcPtr crtc; RRModePtr mode; unsigned int numOutputs; RROutputPtr *outputs = NULL; RROutput *outputIds; TimeStamp time; Rotation rotation; int ret, i, j; CARD8 status; REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq); numOutputs = (stuff->length - bytes_to_int32(SIZEOF(xRRSetCrtcConfigReq))); VERIFY_RR_CRTC(stuff->crtc, crtc, DixSetAttrAccess); if (RRCrtcIsLeased(crtc)) return BadAccess; if (stuff->mode == None) { mode = NULL; if (numOutputs > 0) return BadMatch; } else { VERIFY_RR_MODE(stuff->mode, mode, DixSetAttrAccess); if (numOutputs == 0) return BadMatch; } if (numOutputs) { outputs = xallocarray(numOutputs, sizeof(RROutputPtr)); if (!outputs) return BadAlloc; } else outputs = NULL; outputIds = (RROutput *) (stuff + 1); for (i = 0; i < numOutputs; i++) { ret = dixLookupResourceByType((void **) (outputs + i), outputIds[i], RROutputType, client, DixSetAttrAccess); if (ret != Success) { free(outputs); return ret; } if (RROutputIsLeased(outputs[i])) { free(outputs); return BadAccess; } /* validate crtc for this output */ for (j = 0; j < outputs[i]->numCrtcs; j++) if (outputs[i]->crtcs[j] == crtc) break; if (j == outputs[i]->numCrtcs) { free(outputs); return BadMatch; } /* validate mode for this output */ for (j = 0; j < outputs[i]->numModes + outputs[i]->numUserModes; j++) { RRModePtr m = (j < outputs[i]->numModes ? outputs[i]->modes[j] : outputs[i]->userModes[j - outputs[i]->numModes]); if (m == mode) break; } if (j == outputs[i]->numModes + outputs[i]->numUserModes) { free(outputs); return BadMatch; } } /* validate clones */ for (i = 0; i < numOutputs; i++) { for (j = 0; j < numOutputs; j++) { int k; if (i == j) continue; for (k = 0; k < outputs[i]->numClones; k++) { if (outputs[i]->clones[k] == outputs[j]) break; } if (k == outputs[i]->numClones) { free(outputs); return BadMatch; } } } pScreen = crtc->pScreen; pScrPriv = rrGetScrPriv(pScreen); time = ClientTimeToServerTime(stuff->timestamp); if (!pScrPriv) { time = currentTime; status = RRSetConfigFailed; goto sendReply; } /* * Validate requested rotation */ rotation = (Rotation) stuff->rotation; /* test the rotation bits only! */ switch (rotation & 0xf) { case RR_Rotate_0: case RR_Rotate_90: case RR_Rotate_180: case RR_Rotate_270: break; default: /* * Invalid rotation */ client->errorValue = stuff->rotation; free(outputs); return BadValue; } if (mode) { if ((~crtc->rotations) & rotation) { /* * requested rotation or reflection not supported by screen */ client->errorValue = stuff->rotation; free(outputs); return BadMatch; } #ifdef RANDR_12_INTERFACE /* * Check screen size bounds if the DDX provides a 1.2 interface * for setting screen size. Else, assume the CrtcSet sets * the size along with the mode. If the driver supports transforms, * then it must allow crtcs to display a subset of the screen, so * only do this check for drivers without transform support. */ if (pScrPriv->rrScreenSetSize && !crtc->transforms) { int source_width; int source_height; PictTransform transform; struct pixman_f_transform f_transform, f_inverse; int width, height; if (pScreen->isGPU) { width = pScreen->current_primary->width; height = pScreen->current_primary->height; } else { width = pScreen->width; height = pScreen->height; } RRTransformCompute(stuff->x, stuff->y, mode->mode.width, mode->mode.height, rotation, &crtc->client_pending_transform, &transform, &f_transform, &f_inverse); RRModeGetScanoutSize(mode, &transform, &source_width, &source_height); if (stuff->x + source_width > width) { client->errorValue = stuff->x; free(outputs); return BadValue; } if (stuff->y + source_height > height) { client->errorValue = stuff->y; free(outputs); return BadValue; } } #endif } if (!RRCrtcSet(crtc, mode, stuff->x, stuff->y, rotation, numOutputs, outputs)) { status = RRSetConfigFailed; goto sendReply; } status = RRSetConfigSuccess; pScrPriv->lastSetTime = time; sendReply: free(outputs); rep = (xRRSetCrtcConfigReply) { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0, .newTimestamp = pScrPriv->lastSetTime.milliseconds }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.newTimestamp); } WriteToClient(client, sizeof(xRRSetCrtcConfigReply), &rep); return Success; } int ProcRRGetPanning(ClientPtr client) { REQUEST(xRRGetPanningReq); xRRGetPanningReply rep; RRCrtcPtr crtc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; BoxRec total; BoxRec tracking; INT16 border[4]; REQUEST_SIZE_MATCH(xRRGetPanningReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* All crtcs must be associated with screens before client * requests are processed */ pScreen = crtc->pScreen; pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) return RRErrorBase + BadRRCrtc; rep = (xRRGetPanningReply) { .type = X_Reply, .status = RRSetConfigSuccess, .sequenceNumber = client->sequence, .length = 1, .timestamp = pScrPriv->lastSetTime.milliseconds }; if (pScrPriv->rrGetPanning && pScrPriv->rrGetPanning(pScreen, crtc, &total, &tracking, border)) { rep.left = total.x1; rep.top = total.y1; rep.width = total.x2 - total.x1; rep.height = total.y2 - total.y1; rep.track_left = tracking.x1; rep.track_top = tracking.y1; rep.track_width = tracking.x2 - tracking.x1; rep.track_height = tracking.y2 - tracking.y1; rep.border_left = border[0]; rep.border_top = border[1]; rep.border_right = border[2]; rep.border_bottom = border[3]; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swaps(&rep.left); swaps(&rep.top); swaps(&rep.width); swaps(&rep.height); swaps(&rep.track_left); swaps(&rep.track_top); swaps(&rep.track_width); swaps(&rep.track_height); swaps(&rep.border_left); swaps(&rep.border_top); swaps(&rep.border_right); swaps(&rep.border_bottom); } WriteToClient(client, sizeof(xRRGetPanningReply), &rep); return Success; } int ProcRRSetPanning(ClientPtr client) { REQUEST(xRRSetPanningReq); xRRSetPanningReply rep; RRCrtcPtr crtc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; TimeStamp time; BoxRec total; BoxRec tracking; INT16 border[4]; CARD8 status; REQUEST_SIZE_MATCH(xRRSetPanningReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); if (RRCrtcIsLeased(crtc)) return BadAccess; /* All crtcs must be associated with screens before client * requests are processed */ pScreen = crtc->pScreen; pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) { time = currentTime; status = RRSetConfigFailed; goto sendReply; } time = ClientTimeToServerTime(stuff->timestamp); if (!pScrPriv->rrGetPanning) return RRErrorBase + BadRRCrtc; total.x1 = stuff->left; total.y1 = stuff->top; total.x2 = total.x1 + stuff->width; total.y2 = total.y1 + stuff->height; tracking.x1 = stuff->track_left; tracking.y1 = stuff->track_top; tracking.x2 = tracking.x1 + stuff->track_width; tracking.y2 = tracking.y1 + stuff->track_height; border[0] = stuff->border_left; border[1] = stuff->border_top; border[2] = stuff->border_right; border[3] = stuff->border_bottom; if (!pScrPriv->rrSetPanning(pScreen, crtc, &total, &tracking, border)) return BadMatch; pScrPriv->lastSetTime = time; status = RRSetConfigSuccess; sendReply: rep = (xRRSetPanningReply) { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0, .newTimestamp = pScrPriv->lastSetTime.milliseconds }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.newTimestamp); } WriteToClient(client, sizeof(xRRSetPanningReply), &rep); return Success; } int ProcRRGetCrtcGammaSize(ClientPtr client) { REQUEST(xRRGetCrtcGammaSizeReq); xRRGetCrtcGammaSizeReply reply; RRCrtcPtr crtc; REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* Gamma retrieval failed, any better error? */ if (!RRCrtcGammaGet(crtc)) return RRErrorBase + BadRRCrtc; reply = (xRRGetCrtcGammaSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .size = crtc->gammaSize }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swaps(&reply.size); } WriteToClient(client, sizeof(xRRGetCrtcGammaSizeReply), &reply); return Success; } int ProcRRGetCrtcGamma(ClientPtr client) { REQUEST(xRRGetCrtcGammaReq); xRRGetCrtcGammaReply reply; RRCrtcPtr crtc; unsigned long len; char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); /* Gamma retrieval failed, any better error? */ if (!RRCrtcGammaGet(crtc)) return RRErrorBase + BadRRCrtc; len = crtc->gammaSize * 3 * 2; if (crtc->gammaSize) { extra = malloc(len); if (!extra) return BadAlloc; } reply = (xRRGetCrtcGammaReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(len), .size = crtc->gammaSize }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swaps(&reply.size); } WriteToClient(client, sizeof(xRRGetCrtcGammaReply), &reply); if (crtc->gammaSize) { memcpy(extra, crtc->gammaRed, len); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; WriteSwappedDataToClient(client, len, extra); free(extra); } return Success; } int ProcRRSetCrtcGamma(ClientPtr client) { REQUEST(xRRSetCrtcGammaReq); RRCrtcPtr crtc; unsigned long len; CARD16 *red, *green, *blue; REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); if (RRCrtcIsLeased(crtc)) return BadAccess; len = client->req_len - bytes_to_int32(sizeof(xRRSetCrtcGammaReq)); if (len < (stuff->size * 3 + 1) >> 1) return BadLength; if (stuff->size != crtc->gammaSize) return BadMatch; red = (CARD16 *) (stuff + 1); green = red + crtc->gammaSize; blue = green + crtc->gammaSize; RRCrtcGammaSet(crtc, red, green, blue); return Success; } /* Version 1.3 additions */ int ProcRRSetCrtcTransform(ClientPtr client) { REQUEST(xRRSetCrtcTransformReq); RRCrtcPtr crtc; PictTransform transform; struct pixman_f_transform f_transform, f_inverse; char *filter; int nbytes; xFixed *params; int nparams; REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); if (RRCrtcIsLeased(crtc)) return BadAccess; PictTransform_from_xRenderTransform(&transform, &stuff->transform); pixman_f_transform_from_pixman_transform(&f_transform, &transform); if (!pixman_f_transform_invert(&f_inverse, &f_transform)) return BadMatch; filter = (char *) (stuff + 1); nbytes = stuff->nbytesFilter; params = (xFixed *) (filter + pad_to_int32(nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; return RRCrtcTransformSet(crtc, &transform, &f_transform, &f_inverse, filter, nbytes, params, nparams); } #define CrtcTransformExtra (SIZEOF(xRRGetCrtcTransformReply) - 32) static int transform_filter_length(RRTransformPtr transform) { int nbytes, nparams; if (transform->filter == NULL) return 0; nbytes = strlen(transform->filter->name); nparams = transform->nparams; return pad_to_int32(nbytes) + (nparams * sizeof(xFixed)); } static int transform_filter_encode(ClientPtr client, char *output, CARD16 *nbytesFilter, CARD16 *nparamsFilter, RRTransformPtr transform) { int nbytes, nparams; if (transform->filter == NULL) { *nbytesFilter = 0; *nparamsFilter = 0; return 0; } nbytes = strlen(transform->filter->name); nparams = transform->nparams; *nbytesFilter = nbytes; *nparamsFilter = nparams; memcpy(output, transform->filter->name, nbytes); while ((nbytes & 3) != 0) output[nbytes++] = 0; memcpy(output + nbytes, transform->params, nparams * sizeof(xFixed)); if (client->swapped) { swaps(nbytesFilter); swaps(nparamsFilter); SwapLongs((CARD32 *) (output + nbytes), nparams); } nbytes += nparams * sizeof(xFixed); return nbytes; } static void transform_encode(ClientPtr client, xRenderTransform * wire, PictTransform * pict) { xRenderTransform_from_PictTransform(wire, pict); if (client->swapped) SwapLongs((CARD32 *) wire, bytes_to_int32(sizeof(xRenderTransform))); } int ProcRRGetCrtcTransform(ClientPtr client) { REQUEST(xRRGetCrtcTransformReq); xRRGetCrtcTransformReply *reply; RRCrtcPtr crtc; int nextra; RRTransformPtr current, pending; char *extra; REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq); VERIFY_RR_CRTC(stuff->crtc, crtc, DixReadAccess); pending = &crtc->client_pending_transform; current = &crtc->client_current_transform; nextra = (transform_filter_length(pending) + transform_filter_length(current)); reply = calloc(1, sizeof(xRRGetCrtcTransformReply) + nextra); if (!reply) return BadAlloc; extra = (char *) (reply + 1); reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = bytes_to_int32(CrtcTransformExtra + nextra); reply->hasTransforms = crtc->transforms; transform_encode(client, &reply->pendingTransform, &pending->transform); extra += transform_filter_encode(client, extra, &reply->pendingNbytesFilter, &reply->pendingNparamsFilter, pending); transform_encode(client, &reply->currentTransform, ¤t->transform); extra += transform_filter_encode(client, extra, &reply->currentNbytesFilter, &reply->currentNparamsFilter, current); if (client->swapped) { swaps(&reply->sequenceNumber); swapl(&reply->length); } WriteToClient(client, sizeof(xRRGetCrtcTransformReply) + nextra, reply); free(reply); return Success; } static Bool check_all_screen_crtcs(ScreenPtr pScreen, int *x, int *y) { rrScrPriv(pScreen); int i; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; int left, right, top, bottom; if (!cursor_bounds(crtc, &left, &right, &top, &bottom)) continue; if ((*x >= left) && (*x < right) && (*y >= top) && (*y < bottom)) return TRUE; } return FALSE; } static Bool constrain_all_screen_crtcs(DeviceIntPtr pDev, ScreenPtr pScreen, int *x, int *y) { rrScrPriv(pScreen); int i; /* if we're trying to escape, clamp to the CRTC we're coming from */ for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; int nx, ny; int left, right, top, bottom; if (!cursor_bounds(crtc, &left, &right, &top, &bottom)) continue; miPointerGetPosition(pDev, &nx, &ny); if ((nx >= left) && (nx < right) && (ny >= top) && (ny < bottom)) { if (*x < left) *x = left; if (*x >= right) *x = right - 1; if (*y < top) *y = top; if (*y >= bottom) *y = bottom - 1; return TRUE; } } return FALSE; } void RRConstrainCursorHarder(DeviceIntPtr pDev, ScreenPtr pScreen, int mode, int *x, int *y) { rrScrPriv(pScreen); Bool ret; ScreenPtr secondary; /* intentional dead space -> let it float */ if (pScrPriv->discontiguous) return; /* if we're moving inside a crtc, we're fine */ ret = check_all_screen_crtcs(pScreen, x, y); if (ret == TRUE) return; xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; ret = check_all_screen_crtcs(secondary, x, y); if (ret == TRUE) return; } /* if we're trying to escape, clamp to the CRTC we're coming from */ ret = constrain_all_screen_crtcs(pDev, pScreen, x, y); if (ret == TRUE) return; xorg_list_for_each_entry(secondary, &pScreen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; ret = constrain_all_screen_crtcs(pDev, secondary, x, y); if (ret == TRUE) return; } } Bool RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable) { rrScrPriv(pDrawable->pScreen); Bool ret = TRUE; PixmapPtr *saved_scanout_pixmap; int i; saved_scanout_pixmap = malloc(sizeof(PixmapPtr)*pScrPriv->numCrtcs); if (saved_scanout_pixmap == NULL) return FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; Bool size_fits; saved_scanout_pixmap[i] = crtc->scanout_pixmap; if (!crtc->mode && enable) continue; if (!crtc->scanout_pixmap && !enable) continue; /* not supported with double buffering, needs ABI change for 2 ppix */ if (crtc->scanout_pixmap_back) { ret = FALSE; continue; } size_fits = (crtc->mode && crtc->x == pDrawable->x && crtc->y == pDrawable->y && crtc->mode->mode.width == pDrawable->width && crtc->mode->mode.height == pDrawable->height); /* is the pixmap already set? */ if (crtc->scanout_pixmap == pPixmap) { /* if its a disable then don't care about size */ if (enable == FALSE) { /* set scanout to NULL */ crtc->scanout_pixmap = NULL; } else if (!size_fits) { /* if the size no longer fits then drop off */ crtc->scanout_pixmap = NULL; pScrPriv->rrCrtcSetScanoutPixmap(crtc, crtc->scanout_pixmap); (*pScrPriv->rrCrtcSet) (pDrawable->pScreen, crtc, crtc->mode, crtc->x, crtc->y, crtc->rotation, crtc->numOutputs, crtc->outputs); saved_scanout_pixmap[i] = crtc->scanout_pixmap; ret = FALSE; } else { /* if the size fits then we are already setup */ } } else { if (!size_fits) ret = FALSE; else if (enable) crtc->scanout_pixmap = pPixmap; else /* reject an attempt to disable someone else's scanout_pixmap */ ret = FALSE; } } for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; if (crtc->scanout_pixmap == saved_scanout_pixmap[i]) continue; if (ret) { pScrPriv->rrCrtcSetScanoutPixmap(crtc, crtc->scanout_pixmap); (*pScrPriv->rrCrtcSet) (pDrawable->pScreen, crtc, crtc->mode, crtc->x, crtc->y, crtc->rotation, crtc->numOutputs, crtc->outputs); } else crtc->scanout_pixmap = saved_scanout_pixmap[i]; } free(saved_scanout_pixmap); return ret; } Bool RRHasScanoutPixmap(ScreenPtr pScreen) { rrScrPrivPtr pScrPriv; int i; /* Bail out if RandR wasn't initialized. */ if (!dixPrivateKeyRegistered(rrPrivKey)) return FALSE; pScrPriv = rrGetScrPriv(pScreen); if (!pScreen->is_output_secondary) return FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; if (crtc->scanout_pixmap) return TRUE; } return FALSE; } xorg-server-21.1.16/randr/rrdispatch.c0000644000175000017500000002331214757411105013251 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "protocol-versions.h" Bool RRClientKnowsRates(ClientPtr pClient) { rrClientPriv(pClient); return version_compare(pRRClient->major_version, pRRClient->minor_version, 1, 1) >= 0; } static int ProcRRQueryVersion(ClientPtr client) { xRRQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; REQUEST(xRRQueryVersionReq); rrClientPriv(client); REQUEST_SIZE_MATCH(xRRQueryVersionReq); pRRClient->major_version = stuff->majorVersion; pRRClient->minor_version = stuff->minorVersion; if (version_compare(stuff->majorVersion, stuff->minorVersion, SERVER_RANDR_MAJOR_VERSION, SERVER_RANDR_MINOR_VERSION) < 0) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { rep.majorVersion = SERVER_RANDR_MAJOR_VERSION; rep.minorVersion = SERVER_RANDR_MINOR_VERSION; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xRRQueryVersionReply), &rep); return Success; } static int ProcRRSelectInput(ClientPtr client) { REQUEST(xRRSelectInputReq); rrClientPriv(client); RRTimesPtr pTimes; WindowPtr pWin; RREventPtr pRREvent, *pHead; XID clientResource; int rc; REQUEST_SIZE_MATCH(xRRSelectInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id, RREventType, client, DixWriteAccess); if (rc != Success && rc != BadValue) return rc; if (stuff->enable & (RRScreenChangeNotifyMask | RRCrtcChangeNotifyMask | RROutputChangeNotifyMask | RROutputPropertyNotifyMask | RRProviderChangeNotifyMask | RRProviderPropertyNotifyMask | RRResourceChangeNotifyMask)) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv(pScreen); pRREvent = NULL; if (pHead) { /* check for existing entry. */ for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) if (pRREvent->client == client) break; } if (!pRREvent) { /* build the entry */ pRREvent = (RREventPtr) malloc(sizeof(RREventRec)); if (!pRREvent) return BadAlloc; pRREvent->next = 0; pRREvent->client = client; pRREvent->window = pWin; pRREvent->mask = stuff->enable; /* * add a resource that will be deleted when * the client goes away */ clientResource = FakeClientID(client->index); pRREvent->clientResource = clientResource; if (!AddResource(clientResource, RRClientType, (void *) pRREvent)) return BadAlloc; /* * create a resource to contain a pointer to the list * of clients selecting input. This must be indirect as * the list may be arbitrarily rearranged which cannot be * done through the resource database. */ if (!pHead) { pHead = (RREventPtr *) malloc(sizeof(RREventPtr)); if (!pHead || !AddResource(pWin->drawable.id, RREventType, (void *) pHead)) { FreeResource(clientResource, RT_NONE); return BadAlloc; } *pHead = 0; } pRREvent->next = *pHead; *pHead = pRREvent; } /* * Now see if the client needs an event */ if (pScrPriv) { pTimes = &((RRTimesPtr) (pRRClient + 1))[pScreen->myNum]; if (CompareTimeStamps(pTimes->setTime, pScrPriv->lastSetTime) != 0 || CompareTimeStamps(pTimes->configTime, pScrPriv->lastConfigTime) != 0) { if (pRREvent->mask & RRScreenChangeNotifyMask) { RRDeliverScreenEvent(client, pWin, pScreen); } if (pRREvent->mask & RRCrtcChangeNotifyMask) { int i; for (i = 0; i < pScrPriv->numCrtcs; i++) { RRDeliverCrtcEvent(client, pWin, pScrPriv->crtcs[i]); } } if (pRREvent->mask & RROutputChangeNotifyMask) { int i; for (i = 0; i < pScrPriv->numOutputs; i++) { RRDeliverOutputEvent(client, pWin, pScrPriv->outputs[i]); } } /* We don't check for RROutputPropertyNotifyMask, as randrproto.txt doesn't * say if there ought to be notifications of changes to output properties * if those changes occurred before the time RRSelectInput is called. */ } } } else if (stuff->enable == 0) { /* delete the interest */ if (pHead) { RREventPtr pNewRREvent = 0; for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) { if (pRREvent->client == client) break; pNewRREvent = pRREvent; } if (pRREvent) { FreeResource(pRREvent->clientResource, RRClientType); if (pNewRREvent) pNewRREvent->next = pRREvent->next; else *pHead = pRREvent->next; free(pRREvent); } } } else { client->errorValue = stuff->enable; return BadValue; } return Success; } int (*ProcRandrVector[RRNumberRequests]) (ClientPtr) = { ProcRRQueryVersion, /* 0 */ /* we skip 1 to make old clients fail pretty immediately */ NULL, /* 1 ProcRandrOldGetScreenInfo */ /* V1.0 apps share the same set screen config request id */ ProcRRSetScreenConfig, /* 2 */ NULL, /* 3 ProcRandrOldScreenChangeSelectInput */ /* 3 used to be ScreenChangeSelectInput; deprecated */ ProcRRSelectInput, /* 4 */ ProcRRGetScreenInfo, /* 5 */ /* V1.2 additions */ ProcRRGetScreenSizeRange, /* 6 */ ProcRRSetScreenSize, /* 7 */ ProcRRGetScreenResources, /* 8 */ ProcRRGetOutputInfo, /* 9 */ ProcRRListOutputProperties, /* 10 */ ProcRRQueryOutputProperty, /* 11 */ ProcRRConfigureOutputProperty, /* 12 */ ProcRRChangeOutputProperty, /* 13 */ ProcRRDeleteOutputProperty, /* 14 */ ProcRRGetOutputProperty, /* 15 */ ProcRRCreateMode, /* 16 */ ProcRRDestroyMode, /* 17 */ ProcRRAddOutputMode, /* 18 */ ProcRRDeleteOutputMode, /* 19 */ ProcRRGetCrtcInfo, /* 20 */ ProcRRSetCrtcConfig, /* 21 */ ProcRRGetCrtcGammaSize, /* 22 */ ProcRRGetCrtcGamma, /* 23 */ ProcRRSetCrtcGamma, /* 24 */ /* V1.3 additions */ ProcRRGetScreenResourcesCurrent, /* 25 */ ProcRRSetCrtcTransform, /* 26 */ ProcRRGetCrtcTransform, /* 27 */ ProcRRGetPanning, /* 28 */ ProcRRSetPanning, /* 29 */ ProcRRSetOutputPrimary, /* 30 */ ProcRRGetOutputPrimary, /* 31 */ /* V1.4 additions */ ProcRRGetProviders, /* 32 */ ProcRRGetProviderInfo, /* 33 */ ProcRRSetProviderOffloadSink, /* 34 */ ProcRRSetProviderOutputSource, /* 35 */ ProcRRListProviderProperties, /* 36 */ ProcRRQueryProviderProperty, /* 37 */ ProcRRConfigureProviderProperty, /* 38 */ ProcRRChangeProviderProperty, /* 39 */ ProcRRDeleteProviderProperty, /* 40 */ ProcRRGetProviderProperty, /* 41 */ /* V1.5 additions */ ProcRRGetMonitors, /* 42 */ ProcRRSetMonitor, /* 43 */ ProcRRDeleteMonitor, /* 44 */ /* V1.6 additions */ ProcRRCreateLease, /* 45 */ ProcRRFreeLease, /* 46 */ }; xorg-server-21.1.16/randr/rrinfo.c0000644000175000017500000002145714757411105012415 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #ifdef RANDR_10_INTERFACE static RRModePtr RROldModeAdd(RROutputPtr output, RRScreenSizePtr size, int refresh) { ScreenPtr pScreen = output->pScreen; rrScrPriv(pScreen); xRRModeInfo modeInfo; char name[100]; RRModePtr mode; int i; RRModePtr *modes; memset(&modeInfo, '\0', sizeof(modeInfo)); snprintf(name, sizeof(name), "%dx%d", size->width, size->height); modeInfo.width = size->width; modeInfo.height = size->height; modeInfo.hTotal = size->width; modeInfo.vTotal = size->height; modeInfo.dotClock = ((CARD32) size->width * (CARD32) size->height * (CARD32) refresh); modeInfo.nameLength = strlen(name); mode = RRModeGet(&modeInfo, name); if (!mode) return NULL; for (i = 0; i < output->numModes; i++) if (output->modes[i] == mode) { RRModeDestroy(mode); return mode; } if (output->numModes) modes = reallocarray(output->modes, output->numModes + 1, sizeof(RRModePtr)); else modes = malloc(sizeof(RRModePtr)); if (!modes) { RRModeDestroy(mode); FreeResource(mode->mode.id, 0); return NULL; } modes[output->numModes++] = mode; output->modes = modes; output->changed = TRUE; pScrPriv->changed = TRUE; pScrPriv->configChanged = TRUE; return mode; } static void RRScanOldConfig(ScreenPtr pScreen, Rotation rotations) { rrScrPriv(pScreen); RROutputPtr output; RRCrtcPtr crtc; RRModePtr mode, newMode = NULL; int i; CARD16 minWidth = MAXSHORT, minHeight = MAXSHORT; CARD16 maxWidth = 0, maxHeight = 0; CARD16 width, height; /* * First time through, create a crtc and output and hook * them together */ if (pScrPriv->numOutputs == 0 && pScrPriv->numCrtcs == 0) { crtc = RRCrtcCreate(pScreen, NULL); if (!crtc) return; output = RROutputCreate(pScreen, "default", 7, NULL); if (!output) return; RROutputSetCrtcs(output, &crtc, 1); RROutputSetConnection(output, RR_Connected); RROutputSetSubpixelOrder(output, PictureGetSubpixelOrder(pScreen)); } output = pScrPriv->outputs[0]; if (!output) return; crtc = pScrPriv->crtcs[0]; if (!crtc) return; /* check rotations */ if (rotations != crtc->rotations) { crtc->rotations = rotations; crtc->changed = TRUE; pScrPriv->changed = TRUE; } /* regenerate mode list */ for (i = 0; i < pScrPriv->nSizes; i++) { RRScreenSizePtr size = &pScrPriv->pSizes[i]; int r; if (size->nRates) { for (r = 0; r < size->nRates; r++) { mode = RROldModeAdd(output, size, size->pRates[r].rate); if (i == pScrPriv->size && size->pRates[r].rate == pScrPriv->rate) { newMode = mode; } } free(size->pRates); } else { mode = RROldModeAdd(output, size, 0); if (i == pScrPriv->size) newMode = mode; } } if (pScrPriv->nSizes) free(pScrPriv->pSizes); pScrPriv->pSizes = NULL; pScrPriv->nSizes = 0; /* find size bounds */ for (i = 0; i < output->numModes + output->numUserModes; i++) { mode = (i < output->numModes ? output->modes[i] : output->userModes[i - output->numModes]); width = mode->mode.width; height = mode->mode.height; if (width < minWidth) minWidth = width; if (width > maxWidth) maxWidth = width; if (height < minHeight) minHeight = height; if (height > maxHeight) maxHeight = height; } RRScreenSetSizeRange(pScreen, minWidth, minHeight, maxWidth, maxHeight); /* notice current mode */ if (newMode) RRCrtcNotify(crtc, newMode, 0, 0, pScrPriv->rotation, NULL, 1, &output); } #endif /* * Poll the driver for changed information */ Bool RRGetInfo(ScreenPtr pScreen, Bool force_query) { rrScrPriv(pScreen); Rotation rotations; int i; /* Return immediately if we don't need to re-query and we already have the * information. */ if (!force_query) { if (pScrPriv->numCrtcs != 0 || pScrPriv->numOutputs != 0) return TRUE; } for (i = 0; i < pScrPriv->numOutputs; i++) pScrPriv->outputs[i]->changed = FALSE; for (i = 0; i < pScrPriv->numCrtcs; i++) pScrPriv->crtcs[i]->changed = FALSE; rotations = 0; pScrPriv->changed = FALSE; pScrPriv->configChanged = FALSE; if (!(*pScrPriv->rrGetInfo) (pScreen, &rotations)) return FALSE; #if RANDR_10_INTERFACE if (pScrPriv->nSizes) RRScanOldConfig(pScreen, rotations); #endif RRTellChanged(pScreen); return TRUE; } /* * Register the range of sizes for the screen */ void RRScreenSetSizeRange(ScreenPtr pScreen, CARD16 minWidth, CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight) { rrScrPriv(pScreen); if (!pScrPriv) return; if (pScrPriv->minWidth == minWidth && pScrPriv->minHeight == minHeight && pScrPriv->maxWidth == maxWidth && pScrPriv->maxHeight == maxHeight) { return; } pScrPriv->minWidth = minWidth; pScrPriv->minHeight = minHeight; pScrPriv->maxWidth = maxWidth; pScrPriv->maxHeight = maxHeight; RRSetChanged(pScreen); pScrPriv->configChanged = TRUE; } #ifdef RANDR_10_INTERFACE static Bool RRScreenSizeMatches(RRScreenSizePtr a, RRScreenSizePtr b) { if (a->width != b->width) return FALSE; if (a->height != b->height) return FALSE; if (a->mmWidth != b->mmWidth) return FALSE; if (a->mmHeight != b->mmHeight) return FALSE; return TRUE; } RRScreenSizePtr RRRegisterSize(ScreenPtr pScreen, short width, short height, short mmWidth, short mmHeight) { rrScrPriv(pScreen); int i; RRScreenSize tmp; RRScreenSizePtr pNew; if (!pScrPriv) return 0; tmp.id = 0; tmp.width = width; tmp.height = height; tmp.mmWidth = mmWidth; tmp.mmHeight = mmHeight; tmp.pRates = 0; tmp.nRates = 0; for (i = 0; i < pScrPriv->nSizes; i++) if (RRScreenSizeMatches(&tmp, &pScrPriv->pSizes[i])) return &pScrPriv->pSizes[i]; pNew = reallocarray(pScrPriv->pSizes, pScrPriv->nSizes + 1, sizeof(RRScreenSize)); if (!pNew) return 0; pNew[pScrPriv->nSizes++] = tmp; pScrPriv->pSizes = pNew; return &pNew[pScrPriv->nSizes - 1]; } Bool RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate) { rrScrPriv(pScreen); int i; RRScreenRatePtr pNew, pRate; if (!pScrPriv) return FALSE; for (i = 0; i < pSize->nRates; i++) if (pSize->pRates[i].rate == rate) return TRUE; pNew = reallocarray(pSize->pRates, pSize->nRates + 1, sizeof(RRScreenRate)); if (!pNew) return FALSE; pRate = &pNew[pSize->nRates++]; pRate->rate = rate; pSize->pRates = pNew; return TRUE; } Rotation RRGetRotation(ScreenPtr pScreen) { RROutputPtr output = RRFirstOutput(pScreen); if (!output) return RR_Rotate_0; return output->crtc->rotation; } void RRSetCurrentConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize) { rrScrPriv(pScreen); if (!pScrPriv) return; pScrPriv->size = pSize - pScrPriv->pSizes; pScrPriv->rotation = rotation; pScrPriv->rate = rate; } #endif xorg-server-21.1.16/randr/rrlease.c0000644000175000017500000002156514757411105012553 /* * Copyright © 2017 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "swaprep.h" #include RESTYPE RRLeaseType; /* * Notify of some lease change */ void RRDeliverLeaseEvent(ClientPtr client, WindowPtr window) { ScreenPtr screen = window->drawable.pScreen; rrScrPrivPtr scr_priv = rrGetScrPriv(screen); RRLeasePtr lease; UpdateCurrentTimeIf(); xorg_list_for_each_entry(lease, &scr_priv->leases, list) { if (lease->id != None && (lease->state == RRLeaseCreating || lease->state == RRLeaseTerminating)) { xRRLeaseNotifyEvent le = (xRRLeaseNotifyEvent) { .type = RRNotify + RREventBase, .subCode = RRNotify_Lease, .timestamp = currentTime.milliseconds, .window = window->drawable.id, .lease = lease->id, .created = lease->state == RRLeaseCreating, }; WriteEventsToClient(client, 1, (xEvent *) &le); } } } /* * Change the state of a lease and let anyone watching leases know */ static void RRLeaseChangeState(RRLeasePtr lease, RRLeaseState old, RRLeaseState new) { ScreenPtr screen = lease->screen; rrScrPrivPtr scr_priv = rrGetScrPriv(screen); lease->state = old; scr_priv->leasesChanged = TRUE; RRSetChanged(lease->screen); RRTellChanged(lease->screen); scr_priv->leasesChanged = FALSE; lease->state = new; } /* * Allocate and initialize a lease */ static RRLeasePtr RRLeaseAlloc(ScreenPtr screen, RRLease lid, int numCrtcs, int numOutputs) { RRLeasePtr lease; lease = calloc(1, sizeof(RRLeaseRec) + numCrtcs * sizeof (RRCrtcPtr) + numOutputs * sizeof(RROutputPtr)); if (!lease) return NULL; lease->screen = screen; xorg_list_init(&lease->list); lease->id = lid; lease->state = RRLeaseCreating; lease->numCrtcs = numCrtcs; lease->numOutputs = numOutputs; lease->crtcs = (RRCrtcPtr *) (lease + 1); lease->outputs = (RROutputPtr *) (lease->crtcs + numCrtcs); return lease; } /* * Check if a crtc is leased */ Bool RRCrtcIsLeased(RRCrtcPtr crtc) { ScreenPtr screen = crtc->pScreen; rrScrPrivPtr scr_priv = rrGetScrPriv(screen); RRLeasePtr lease; int c; xorg_list_for_each_entry(lease, &scr_priv->leases, list) { for (c = 0; c < lease->numCrtcs; c++) if (lease->crtcs[c] == crtc) return TRUE; } return FALSE; } /* * Check if an output is leased */ Bool RROutputIsLeased(RROutputPtr output) { ScreenPtr screen = output->pScreen; rrScrPrivPtr scr_priv = rrGetScrPriv(screen); RRLeasePtr lease; int o; xorg_list_for_each_entry(lease, &scr_priv->leases, list) { for (o = 0; o < lease->numOutputs; o++) if (lease->outputs[o] == output) return TRUE; } return FALSE; } /* * A lease has been terminated. * The driver is responsible for noticing and * calling this function when that happens */ void RRLeaseTerminated(RRLeasePtr lease) { /* Notify clients with events, but only if this isn't during lease creation */ if (lease->state == RRLeaseRunning) RRLeaseChangeState(lease, RRLeaseTerminating, RRLeaseTerminating); if (lease->id != None) FreeResource(lease->id, RT_NONE); xorg_list_del(&lease->list); } /* * A lease is completely shut down and is * ready to be deallocated */ void RRLeaseFree(RRLeasePtr lease) { free(lease); } /* * Ask the driver to terminate a lease. The * driver will call RRLeaseTerminated when that has * finished, which may be some time after this function returns * if the driver operation is asynchronous */ void RRTerminateLease(RRLeasePtr lease) { ScreenPtr screen = lease->screen; rrScrPrivPtr scr_priv = rrGetScrPriv(screen); scr_priv->rrTerminateLease(screen, lease); } /* * Destroy a lease resource ID. All this * does is note that the lease no longer has an ID, and * so doesn't appear over the protocol anymore. */ static int RRLeaseDestroyResource(void *value, XID pid) { RRLeasePtr lease = value; lease->id = None; return 1; } /* * Create the lease resource type during server initialization */ Bool RRLeaseInit(void) { RRLeaseType = CreateNewResourceType(RRLeaseDestroyResource, "LEASE"); if (!RRLeaseType) return FALSE; return TRUE; } int ProcRRCreateLease(ClientPtr client) { REQUEST(xRRCreateLeaseReq); xRRCreateLeaseReply rep; WindowPtr window; ScreenPtr screen; rrScrPrivPtr scr_priv; RRLeasePtr lease; RRCrtc *crtcIds; RROutput *outputIds; int fd; int rc; unsigned long len; int c, o; REQUEST_AT_LEAST_SIZE(xRRCreateLeaseReq); LEGAL_NEW_RESOURCE(stuff->lid, client); rc = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; len = client->req_len - bytes_to_int32(sizeof(xRRCreateLeaseReq)); if (len != stuff->nCrtcs + stuff->nOutputs) return BadLength; screen = window->drawable.pScreen; scr_priv = rrGetScrPriv(screen); if (!scr_priv) return BadMatch; if (!scr_priv->rrCreateLease) return BadMatch; /* Allocate a structure to hold all of the lease information */ lease = RRLeaseAlloc(screen, stuff->lid, stuff->nCrtcs, stuff->nOutputs); if (!lease) return BadAlloc; /* Look up all of the crtcs */ crtcIds = (RRCrtc *) (stuff + 1); for (c = 0; c < stuff->nCrtcs; c++) { RRCrtcPtr crtc; rc = dixLookupResourceByType((void **)&crtc, crtcIds[c], RRCrtcType, client, DixSetAttrAccess); if (rc != Success) { client->errorValue = crtcIds[c]; goto bail_lease; } if (RRCrtcIsLeased(crtc)) { client->errorValue = crtcIds[c]; rc = BadAccess; goto bail_lease; } lease->crtcs[c] = crtc; } /* Look up all of the outputs */ outputIds = (RROutput *) (crtcIds + stuff->nCrtcs); for (o = 0; o < stuff->nOutputs; o++) { RROutputPtr output; rc = dixLookupResourceByType((void **)&output, outputIds[o], RROutputType, client, DixSetAttrAccess); if (rc != Success) { client->errorValue = outputIds[o]; goto bail_lease; } if (RROutputIsLeased(output)) { client->errorValue = outputIds[o]; rc = BadAccess; goto bail_lease; } lease->outputs[o] = output; } rc = scr_priv->rrCreateLease(screen, lease, &fd); if (rc != Success) goto bail_lease; xorg_list_add(&lease->list, &scr_priv->leases); if (!AddResource(stuff->lid, RRLeaseType, lease)) { close(fd); return BadAlloc; } if (WriteFdToClient(client, fd, TRUE) < 0) { RRTerminateLease(lease); close(fd); return BadAlloc; } RRLeaseChangeState(lease, RRLeaseCreating, RRLeaseRunning); rep = (xRRCreateLeaseReply) { .type = X_Reply, .nfd = 1, .sequenceNumber = client->sequence, .length = 0, }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof (rep), &rep); return Success; bail_lease: free(lease); return rc; } int ProcRRFreeLease(ClientPtr client) { REQUEST(xRRFreeLeaseReq); RRLeasePtr lease; REQUEST_SIZE_MATCH(xRRFreeLeaseReq); VERIFY_RR_LEASE(stuff->lid, lease, DixDestroyAccess); if (stuff->terminate) RRTerminateLease(lease); else /* Get rid of the resource database entry */ FreeResource(stuff->lid, RT_NONE); return Success; } xorg-server-21.1.16/randr/rrmode.c0000644000175000017500000002265114757411105012403 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" RESTYPE RRModeType; static Bool RRModeEqual(xRRModeInfo * a, xRRModeInfo * b) { if (a->width != b->width) return FALSE; if (a->height != b->height) return FALSE; if (a->dotClock != b->dotClock) return FALSE; if (a->hSyncStart != b->hSyncStart) return FALSE; if (a->hSyncEnd != b->hSyncEnd) return FALSE; if (a->hTotal != b->hTotal) return FALSE; if (a->hSkew != b->hSkew) return FALSE; if (a->vSyncStart != b->vSyncStart) return FALSE; if (a->vSyncEnd != b->vSyncEnd) return FALSE; if (a->vTotal != b->vTotal) return FALSE; if (a->nameLength != b->nameLength) return FALSE; if (a->modeFlags != b->modeFlags) return FALSE; return TRUE; } /* * Keep a list so it's easy to find modes in the resource database. */ static int num_modes; static RRModePtr *modes; static RRModePtr RRModeCreate(xRRModeInfo * modeInfo, const char *name, ScreenPtr userScreen) { RRModePtr mode, *newModes; if (!RRInit()) return NULL; mode = malloc(sizeof(RRModeRec) + modeInfo->nameLength + 1); if (!mode) return NULL; mode->refcnt = 1; mode->mode = *modeInfo; mode->name = (char *) (mode + 1); memcpy(mode->name, name, modeInfo->nameLength); mode->name[modeInfo->nameLength] = '\0'; mode->userScreen = userScreen; if (num_modes) newModes = reallocarray(modes, num_modes + 1, sizeof(RRModePtr)); else newModes = malloc(sizeof(RRModePtr)); if (!newModes) { free(mode); return NULL; } mode->mode.id = FakeClientID(0); if (!AddResource(mode->mode.id, RRModeType, (void *) mode)) { free(newModes); return NULL; } modes = newModes; modes[num_modes++] = mode; /* * give the caller a reference to this mode */ ++mode->refcnt; return mode; } static RRModePtr RRModeFindByName(const char *name, CARD16 nameLength) { int i; RRModePtr mode; for (i = 0; i < num_modes; i++) { mode = modes[i]; if (mode->mode.nameLength == nameLength && !memcmp(name, mode->name, nameLength)) { return mode; } } return NULL; } RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name) { int i; for (i = 0; i < num_modes; i++) { RRModePtr mode = modes[i]; if (RRModeEqual(&mode->mode, modeInfo) && !memcmp(name, mode->name, modeInfo->nameLength)) { ++mode->refcnt; return mode; } } return RRModeCreate(modeInfo, name, NULL); } static RRModePtr RRModeCreateUser(ScreenPtr pScreen, xRRModeInfo * modeInfo, const char *name, int *error) { RRModePtr mode; mode = RRModeFindByName(name, modeInfo->nameLength); if (mode) { *error = BadName; return NULL; } mode = RRModeCreate(modeInfo, name, pScreen); if (!mode) { *error = BadAlloc; return NULL; } *error = Success; return mode; } RRModePtr * RRModesForScreen(ScreenPtr pScreen, int *num_ret) { rrScrPriv(pScreen); int o, c, m; RRModePtr *screen_modes; int num_screen_modes = 0; screen_modes = xallocarray((num_modes ? num_modes : 1), sizeof(RRModePtr)); if (!screen_modes) return NULL; /* * Add modes from all outputs */ for (o = 0; o < pScrPriv->numOutputs; o++) { RROutputPtr output = pScrPriv->outputs[o]; int n; for (m = 0; m < output->numModes + output->numUserModes; m++) { RRModePtr mode = (m < output->numModes ? output->modes[m] : output->userModes[m - output->numModes]); for (n = 0; n < num_screen_modes; n++) if (screen_modes[n] == mode) break; if (n == num_screen_modes) screen_modes[num_screen_modes++] = mode; } } /* * Add modes from all crtcs. The goal is to * make sure all available and active modes * are visible to the client */ for (c = 0; c < pScrPriv->numCrtcs; c++) { RRCrtcPtr crtc = pScrPriv->crtcs[c]; RRModePtr mode = crtc->mode; int n; if (!mode) continue; for (n = 0; n < num_screen_modes; n++) if (screen_modes[n] == mode) break; if (n == num_screen_modes) screen_modes[num_screen_modes++] = mode; } /* * Add all user modes for this screen */ for (m = 0; m < num_modes; m++) { RRModePtr mode = modes[m]; int n; if (mode->userScreen != pScreen) continue; for (n = 0; n < num_screen_modes; n++) if (screen_modes[n] == mode) break; if (n == num_screen_modes) screen_modes[num_screen_modes++] = mode; } *num_ret = num_screen_modes; return screen_modes; } void RRModeDestroy(RRModePtr mode) { int m; if (--mode->refcnt > 0) return; for (m = 0; m < num_modes; m++) { if (modes[m] == mode) { memmove(modes + m, modes + m + 1, (num_modes - m - 1) * sizeof(RRModePtr)); num_modes--; if (!num_modes) { free(modes); modes = NULL; } break; } } free(mode); } static int RRModeDestroyResource(void *value, XID pid) { RRModeDestroy((RRModePtr) value); return 1; } /* * Initialize mode type */ Bool RRModeInit(void) { assert(num_modes == 0); assert(modes == NULL); RRModeType = CreateNewResourceType(RRModeDestroyResource, "MODE"); if (!RRModeType) return FALSE; return TRUE; } /* * Initialize mode type error value */ void RRModeInitErrorValue(void) { SetResourceTypeErrorValue(RRModeType, RRErrorBase + BadRRMode); } int ProcRRCreateMode(ClientPtr client) { REQUEST(xRRCreateModeReq); xRRCreateModeReply rep; WindowPtr pWin; ScreenPtr pScreen; xRRModeInfo *modeInfo; long units_after; char *name; int error, rc; RRModePtr mode; REQUEST_AT_LEAST_SIZE(xRRCreateModeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; modeInfo = &stuff->modeInfo; name = (char *) (stuff + 1); units_after = (stuff->length - bytes_to_int32(sizeof(xRRCreateModeReq))); /* check to make sure requested name fits within the data provided */ if (bytes_to_int32(modeInfo->nameLength) > units_after) return BadLength; mode = RRModeCreateUser(pScreen, modeInfo, name, &error); if (!mode) return error; rep = (xRRCreateModeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .mode = mode->mode.id }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.mode); } WriteToClient(client, sizeof(xRRCreateModeReply), &rep); /* Drop out reference to this mode */ RRModeDestroy(mode); return Success; } int ProcRRDestroyMode(ClientPtr client) { REQUEST(xRRDestroyModeReq); RRModePtr mode; REQUEST_SIZE_MATCH(xRRDestroyModeReq); VERIFY_RR_MODE(stuff->mode, mode, DixDestroyAccess); if (!mode->userScreen) return BadMatch; if (mode->refcnt > 1) return BadAccess; FreeResource(stuff->mode, 0); return Success; } int ProcRRAddOutputMode(ClientPtr client) { REQUEST(xRRAddOutputModeReq); RRModePtr mode; RROutputPtr output; REQUEST_SIZE_MATCH(xRRAddOutputModeReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); VERIFY_RR_MODE(stuff->mode, mode, DixUseAccess); if (RROutputIsLeased(output)) return BadAccess; return RROutputAddUserMode(output, mode); } int ProcRRDeleteOutputMode(ClientPtr client) { REQUEST(xRRDeleteOutputModeReq); RRModePtr mode; RROutputPtr output; REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); VERIFY_RR_MODE(stuff->mode, mode, DixUseAccess); if (RROutputIsLeased(output)) return BadAccess; return RROutputDeleteUserMode(output, mode); } xorg-server-21.1.16/randr/rrmonitor.c0000644000175000017500000005424014757411105013145 /* * Copyright © 2014 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "swaprep.h" static Atom RRMonitorCrtcName(RRCrtcPtr crtc) { char name[20]; if (crtc->numOutputs) { RROutputPtr output = crtc->outputs[0]; return MakeAtom(output->name, output->nameLength, TRUE); } sprintf(name, "Monitor-%08lx", (unsigned long int)crtc->id); return MakeAtom(name, strlen(name), TRUE); } static Bool RRMonitorCrtcPrimary(RRCrtcPtr crtc) { ScreenPtr screen = crtc->pScreen; rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int o; for (o = 0; o < crtc->numOutputs; o++) if (crtc->outputs[o] == pScrPriv->primaryOutput) return TRUE; return FALSE; } #define DEFAULT_PIXELS_PER_MM (96.0 / 25.4) static void RRMonitorGetCrtcGeometry(RRCrtcPtr crtc, RRMonitorGeometryPtr geometry) { ScreenPtr screen = crtc->pScreen; rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); BoxRec panned_area; /* Check to see if crtc is panned and return the full area when applicable. */ if (pScrPriv && pScrPriv->rrGetPanning && pScrPriv->rrGetPanning(screen, crtc, &panned_area, NULL, NULL) && (panned_area.x2 > panned_area.x1) && (panned_area.y2 > panned_area.y1)) { geometry->box = panned_area; } else { int width, height; RRCrtcGetScanoutSize(crtc, &width, &height); geometry->box.x1 = crtc->x; geometry->box.y1 = crtc->y; geometry->box.x2 = geometry->box.x1 + width; geometry->box.y2 = geometry->box.y1 + height; } if (crtc->numOutputs && crtc->outputs[0]->mmWidth && crtc->outputs[0]->mmHeight) { RROutputPtr output = crtc->outputs[0]; geometry->mmWidth = output->mmWidth; geometry->mmHeight = output->mmHeight; } else { geometry->mmWidth = floor ((geometry->box.x2 - geometry->box.x1) / DEFAULT_PIXELS_PER_MM + 0.5); geometry->mmHeight = floor ((geometry->box.y2 - geometry->box.y1) / DEFAULT_PIXELS_PER_MM + 0.5); } } static Bool RRMonitorSetFromServer(RRCrtcPtr crtc, RRMonitorPtr monitor) { int o; monitor->name = RRMonitorCrtcName(crtc); monitor->pScreen = crtc->pScreen; monitor->numOutputs = crtc->numOutputs; monitor->outputs = calloc(crtc->numOutputs, sizeof(RROutput)); if (!monitor->outputs) return FALSE; for (o = 0; o < crtc->numOutputs; o++) monitor->outputs[o] = crtc->outputs[o]->id; monitor->primary = RRMonitorCrtcPrimary(crtc); monitor->automatic = TRUE; RRMonitorGetCrtcGeometry(crtc, &monitor->geometry); return TRUE; } static Bool RRMonitorAutomaticGeometry(RRMonitorPtr monitor) { return (monitor->geometry.box.x1 == 0 && monitor->geometry.box.y1 == 0 && monitor->geometry.box.x2 == 0 && monitor->geometry.box.y2 == 0); } static void RRMonitorGetGeometry(RRMonitorPtr monitor, RRMonitorGeometryPtr geometry) { if (RRMonitorAutomaticGeometry(monitor) && monitor->numOutputs > 0) { ScreenPtr screen = monitor->pScreen; rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); RRMonitorGeometryRec first = { .box = { 0, 0, 0, 0 }, .mmWidth = 0, .mmHeight = 0 }; RRMonitorGeometryRec this; int c, o, co; int active_crtcs = 0; *geometry = first; for (o = 0; o < monitor->numOutputs; o++) { RRCrtcPtr crtc = NULL; Bool in_use = FALSE; for (c = 0; !in_use && c < pScrPriv->numCrtcs; c++) { crtc = pScrPriv->crtcs[c]; if (!crtc->mode) continue; for (co = 0; !in_use && co < crtc->numOutputs; co++) if (monitor->outputs[o] == crtc->outputs[co]->id) in_use = TRUE; } if (!in_use) continue; RRMonitorGetCrtcGeometry(crtc, &this); if (active_crtcs == 0) { first = this; *geometry = this; } else { geometry->box.x1 = min(this.box.x1, geometry->box.x1); geometry->box.x2 = max(this.box.x2, geometry->box.x2); geometry->box.y1 = min(this.box.y1, geometry->box.y1); geometry->box.y2 = max(this.box.y2, geometry->box.y2); } active_crtcs++; } /* Adjust physical sizes to account for total area */ if (active_crtcs > 1 && first.box.x2 != first.box.x1 && first.box.y2 != first.box.y1) { geometry->mmWidth = (this.box.x2 - this.box.x1) / (first.box.x2 - first.box.x1) * first.mmWidth; geometry->mmHeight = (this.box.y2 - this.box.y1) / (first.box.y2 - first.box.y1) * first.mmHeight; } } else { *geometry = monitor->geometry; } } static Bool RRMonitorSetFromClient(RRMonitorPtr client_monitor, RRMonitorPtr monitor) { monitor->name = client_monitor->name; monitor->pScreen = client_monitor->pScreen; monitor->numOutputs = client_monitor->numOutputs; monitor->outputs = calloc(client_monitor->numOutputs, sizeof (RROutput)); if (!monitor->outputs && client_monitor->numOutputs) return FALSE; memcpy(monitor->outputs, client_monitor->outputs, client_monitor->numOutputs * sizeof (RROutput)); monitor->primary = client_monitor->primary; monitor->automatic = client_monitor->automatic; RRMonitorGetGeometry(client_monitor, &monitor->geometry); return TRUE; } typedef struct _rrMonitorList { int num_client; int num_server; RRCrtcPtr *server_crtc; int num_crtcs; int client_primary; int server_primary; } RRMonitorListRec, *RRMonitorListPtr; static Bool RRMonitorInitList(ScreenPtr screen, RRMonitorListPtr mon_list, Bool get_active) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int m, o, c, sc; int numCrtcs; ScreenPtr secondary; if (!RRGetInfo(screen, FALSE)) return FALSE; /* Count the number of crtcs in this and any secondary screens */ numCrtcs = pScrPriv->numCrtcs; xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) { rrScrPrivPtr pSecondaryPriv; if (!secondary->is_output_secondary) continue; pSecondaryPriv = rrGetScrPriv(secondary); numCrtcs += pSecondaryPriv->numCrtcs; } mon_list->num_crtcs = numCrtcs; mon_list->server_crtc = calloc(numCrtcs * 2, sizeof (RRCrtcPtr)); if (!mon_list->server_crtc) return FALSE; /* Collect pointers to all of the active crtcs */ c = 0; for (sc = 0; sc < pScrPriv->numCrtcs; sc++, c++) { if (pScrPriv->crtcs[sc]->mode != NULL) mon_list->server_crtc[c] = pScrPriv->crtcs[sc]; } xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) { rrScrPrivPtr pSecondaryPriv; if (!secondary->is_output_secondary) continue; pSecondaryPriv = rrGetScrPriv(secondary); for (sc = 0; sc < pSecondaryPriv->numCrtcs; sc++, c++) { if (pSecondaryPriv->crtcs[sc]->mode != NULL) mon_list->server_crtc[c] = pSecondaryPriv->crtcs[sc]; } } /* Walk the list of client-defined monitors, clearing the covered * CRTCs from the full list and finding whether one of the * monitors is primary */ mon_list->num_client = pScrPriv->numMonitors; mon_list->client_primary = -1; for (m = 0; m < pScrPriv->numMonitors; m++) { RRMonitorPtr monitor = pScrPriv->monitors[m]; if (get_active) { RRMonitorGeometryRec geom; RRMonitorGetGeometry(monitor, &geom); if (geom.box.x2 - geom.box.x1 == 0 || geom.box.y2 - geom.box.y1 == 0) { mon_list->num_client--; continue; } } if (monitor->primary && mon_list->client_primary == -1) mon_list->client_primary = m; for (o = 0; o < monitor->numOutputs; o++) { for (c = 0; c < numCrtcs; c++) { RRCrtcPtr crtc = mon_list->server_crtc[c]; if (crtc) { int co; for (co = 0; co < crtc->numOutputs; co++) if (crtc->outputs[co]->id == monitor->outputs[o]) { mon_list->server_crtc[c] = NULL; break; } } } } } /* Now look at the active CRTCs, and count * those not covered by a client monitor, as well * as finding whether one of them is marked primary */ mon_list->num_server = 0; mon_list->server_primary = -1; for (c = 0; c < mon_list->num_crtcs; c++) { RRCrtcPtr crtc = mon_list->server_crtc[c]; if (!crtc) continue; mon_list->num_server++; if (RRMonitorCrtcPrimary(crtc) && mon_list->server_primary == -1) mon_list->server_primary = c; } return TRUE; } static void RRMonitorFiniList(RRMonitorListPtr list) { free(list->server_crtc); } /* Construct a complete list of protocol-visible monitors, including * the manually generated ones as well as those generated * automatically from the remaining CRCTs */ Bool RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); RRMonitorListRec list; int m, c; RRMonitorPtr mon, monitors; Bool has_primary = FALSE; if (!pScrPriv) return FALSE; if (!RRMonitorInitList(screen, &list, get_active)) return FALSE; monitors = calloc(list.num_client + list.num_server, sizeof (RRMonitorRec)); if (!monitors) { RRMonitorFiniList(&list); return FALSE; } mon = monitors; /* Fill in the primary monitor data first */ if (list.client_primary >= 0) { RRMonitorSetFromClient(pScrPriv->monitors[list.client_primary], mon); mon++; } else if (list.server_primary >= 0) { RRMonitorSetFromServer(list.server_crtc[list.server_primary], mon); mon++; } /* Fill in the client-defined monitors next */ for (m = 0; m < pScrPriv->numMonitors; m++) { if (m == list.client_primary) continue; if (get_active) { RRMonitorGeometryRec geom; RRMonitorGetGeometry(pScrPriv->monitors[m], &geom); if (geom.box.x2 - geom.box.x1 == 0 || geom.box.y2 - geom.box.y1 == 0) { continue; } } RRMonitorSetFromClient(pScrPriv->monitors[m], mon); if (has_primary) mon->primary = FALSE; else if (mon->primary) has_primary = TRUE; mon++; } /* And finish with the list of crtc-inspired monitors */ for (c = 0; c < list.num_crtcs; c++) { RRCrtcPtr crtc = list.server_crtc[c]; if (c == list.server_primary && list.client_primary < 0) continue; if (!list.server_crtc[c]) continue; RRMonitorSetFromServer(crtc, mon); if (has_primary) mon->primary = FALSE; else if (mon->primary) has_primary = TRUE; mon++; } RRMonitorFiniList(&list); *nmon_ret = list.num_client + list.num_server; *monitors_ret = monitors; return TRUE; } int RRMonitorCountList(ScreenPtr screen) { RRMonitorListRec list; int nmon; if (!RRMonitorInitList(screen, &list, FALSE)) return -1; nmon = list.num_client + list.num_server; RRMonitorFiniList(&list); return nmon; } void RRMonitorFree(RRMonitorPtr monitor) { free(monitor); } RRMonitorPtr RRMonitorAlloc(int noutput) { RRMonitorPtr monitor; monitor = calloc(1, sizeof (RRMonitorRec) + noutput * sizeof (RROutput)); if (!monitor) return NULL; monitor->numOutputs = noutput; monitor->outputs = (RROutput *) (monitor + 1); return monitor; } static int RRMonitorDelete(ClientPtr client, ScreenPtr screen, Atom name) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int m; if (!pScrPriv) { client->errorValue = name; return BadAtom; } for (m = 0; m < pScrPriv->numMonitors; m++) { RRMonitorPtr monitor = pScrPriv->monitors[m]; if (monitor->name == name) { memmove(pScrPriv->monitors + m, pScrPriv->monitors + m + 1, (pScrPriv->numMonitors - (m + 1)) * sizeof (RRMonitorPtr)); --pScrPriv->numMonitors; RRMonitorFree(monitor); return Success; } } client->errorValue = name; return BadValue; } static Bool RRMonitorMatchesOutputName(ScreenPtr screen, Atom name) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int o; const char *str = NameForAtom(name); int len = strlen(str); for (o = 0; o < pScrPriv->numOutputs; o++) { RROutputPtr output = pScrPriv->outputs[o]; if (output->nameLength == len && !memcmp(output->name, str, len)) return TRUE; } return FALSE; } int RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int m; ScreenPtr secondary; RRMonitorPtr *monitors; if (!pScrPriv) return BadAlloc; /* 'name' must not match the name of any Output on the screen, or * a Value error results. */ if (RRMonitorMatchesOutputName(screen, monitor->name)) { client->errorValue = monitor->name; return BadValue; } xorg_list_for_each_entry(secondary, &screen->secondary_list, secondary_head) { if (!secondary->is_output_secondary) continue; if (RRMonitorMatchesOutputName(secondary, monitor->name)) { client->errorValue = monitor->name; return BadValue; } } /* 'name' must not match the name of any Monitor on the screen, or * a Value error results. */ for (m = 0; m < pScrPriv->numMonitors; m++) { if (pScrPriv->monitors[m]->name == monitor->name) { client->errorValue = monitor->name; return BadValue; } } /* Allocate space for the new pointer. This is done before * removing matching monitors as it may fail, and the request * needs to not have any side-effects on failure */ if (pScrPriv->numMonitors) monitors = reallocarray(pScrPriv->monitors, pScrPriv->numMonitors + 1, sizeof (RRMonitorPtr)); else monitors = malloc(sizeof (RRMonitorPtr)); if (!monitors) return BadAlloc; pScrPriv->monitors = monitors; for (m = 0; m < pScrPriv->numMonitors; m++) { RRMonitorPtr existing = pScrPriv->monitors[m]; /* If 'name' matches an existing Monitor on the screen, the * existing one will be deleted as if RRDeleteMonitor were called. */ if (existing->name == monitor->name) { (void) RRMonitorDelete(client, screen, existing->name); continue; } if (monitor->primary) existing->primary = FALSE; } /* Add the new one to the list */ pScrPriv->monitors[pScrPriv->numMonitors++] = monitor; return Success; } void RRMonitorFreeList(RRMonitorPtr monitors, int nmon) { int m; for (m = 0; m < nmon; m++) free(monitors[m].outputs); free(monitors); } void RRMonitorInit(ScreenPtr screen) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); if (!pScrPriv) return; pScrPriv->numMonitors = 0; pScrPriv->monitors = NULL; } void RRMonitorClose(ScreenPtr screen) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); int m; if (!pScrPriv) return; for (m = 0; m < pScrPriv->numMonitors; m++) RRMonitorFree(pScrPriv->monitors[m]); free(pScrPriv->monitors); pScrPriv->monitors = NULL; pScrPriv->numMonitors = 0; } static CARD32 RRMonitorTimestamp(ScreenPtr screen) { rrScrPrivPtr pScrPriv = rrGetScrPriv(screen); /* XXX should take client monitor changes into account */ return pScrPriv->lastConfigTime.milliseconds; } int ProcRRGetMonitors(ClientPtr client) { REQUEST(xRRGetMonitorsReq); xRRGetMonitorsReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, }; WindowPtr window; ScreenPtr screen; int r; RRMonitorPtr monitors; int nmonitors; int noutputs; int m; Bool get_active; REQUEST_SIZE_MATCH(xRRGetMonitorsReq); r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (r != Success) return r; screen = window->drawable.pScreen; get_active = stuff->get_active; if (!RRMonitorMakeList(screen, get_active, &monitors, &nmonitors)) return BadAlloc; rep.timestamp = RRMonitorTimestamp(screen); noutputs = 0; for (m = 0; m < nmonitors; m++) { rep.length += SIZEOF(xRRMonitorInfo) >> 2; rep.length += monitors[m].numOutputs; noutputs += monitors[m].numOutputs; } rep.nmonitors = nmonitors; rep.noutputs = noutputs; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swapl(&rep.nmonitors); swapl(&rep.noutputs); } WriteToClient(client, sizeof(xRRGetMonitorsReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; for (m = 0; m < nmonitors; m++) { RRMonitorPtr monitor = &monitors[m]; xRRMonitorInfo info = { .name = monitor->name, .primary = monitor->primary, .automatic = monitor->automatic, .noutput = monitor->numOutputs, .x = monitor->geometry.box.x1, .y = monitor->geometry.box.y1, .width = monitor->geometry.box.x2 - monitor->geometry.box.x1, .height = monitor->geometry.box.y2 - monitor->geometry.box.y1, .widthInMillimeters = monitor->geometry.mmWidth, .heightInMillimeters = monitor->geometry.mmHeight, }; if (client->swapped) { swapl(&info.name); swaps(&info.noutput); swaps(&info.x); swaps(&info.y); swaps(&info.width); swaps(&info.height); swapl(&info.widthInMillimeters); swapl(&info.heightInMillimeters); } WriteToClient(client, sizeof(xRRMonitorInfo), &info); WriteSwappedDataToClient(client, monitor->numOutputs * sizeof (RROutput), monitor->outputs); } RRMonitorFreeList(monitors, nmonitors); return Success; } int ProcRRSetMonitor(ClientPtr client) { REQUEST(xRRSetMonitorReq); WindowPtr window; ScreenPtr screen; RRMonitorPtr monitor; int r; REQUEST_AT_LEAST_SIZE(xRRSetMonitorReq); if (stuff->monitor.noutput != stuff->length - (SIZEOF(xRRSetMonitorReq) >> 2)) return BadLength; r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (r != Success) return r; screen = window->drawable.pScreen; if (!ValidAtom(stuff->monitor.name)) return BadAtom; /* Allocate the new monitor */ monitor = RRMonitorAlloc(stuff->monitor.noutput); if (!monitor) return BadAlloc; /* Fill in the bits from the request */ monitor->pScreen = screen; monitor->name = stuff->monitor.name; monitor->primary = stuff->monitor.primary; monitor->automatic = FALSE; memcpy(monitor->outputs, stuff + 1, stuff->monitor.noutput * sizeof (RROutput)); monitor->geometry.box.x1 = stuff->monitor.x; monitor->geometry.box.y1 = stuff->monitor.y; monitor->geometry.box.x2 = stuff->monitor.x + stuff->monitor.width; monitor->geometry.box.y2 = stuff->monitor.y + stuff->monitor.height; monitor->geometry.mmWidth = stuff->monitor.widthInMillimeters; monitor->geometry.mmHeight = stuff->monitor.heightInMillimeters; r = RRMonitorAdd(client, screen, monitor); if (r == Success) RRSendConfigNotify(screen); else RRMonitorFree(monitor); return r; } int ProcRRDeleteMonitor(ClientPtr client) { REQUEST(xRRDeleteMonitorReq); WindowPtr window; ScreenPtr screen; int r; REQUEST_SIZE_MATCH(xRRDeleteMonitorReq); r = dixLookupWindow(&window, stuff->window, client, DixGetAttrAccess); if (r != Success) return r; screen = window->drawable.pScreen; if (!ValidAtom(stuff->name)) { client->errorValue = stuff->name; return BadAtom; } r = RRMonitorDelete(client, screen, stuff->name); if (r == Success) RRSendConfigNotify(screen); return r; } xorg-server-21.1.16/randr/rroutput.c0000644000175000017500000004565114757411105013024 /* * Copyright © 2006 Keith Packard * Copyright © 2008 Red Hat, Inc. * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include RESTYPE RROutputType; /* * Notify the output of some change */ void RROutputChanged(RROutputPtr output, Bool configChanged) { /* set changed bits on the primary screen only */ ScreenPtr pScreen = output->pScreen; rrScrPrivPtr primarysp; output->changed = TRUE; if (!pScreen) return; if (pScreen->isGPU) { ScreenPtr primary = pScreen->current_primary; if (!primary) return; primarysp = rrGetScrPriv(primary); } else { primarysp = rrGetScrPriv(pScreen); } RRSetChanged(pScreen); if (configChanged) primarysp->configChanged = TRUE; } /* * Create an output */ RROutputPtr RROutputCreate(ScreenPtr pScreen, const char *name, int nameLength, void *devPrivate) { RROutputPtr output; RROutputPtr *outputs; rrScrPrivPtr pScrPriv; Atom nonDesktopAtom; if (!RRInit()) return NULL; pScrPriv = rrGetScrPriv(pScreen); outputs = reallocarray(pScrPriv->outputs, pScrPriv->numOutputs + 1, sizeof(RROutputPtr)); if (!outputs) return NULL; pScrPriv->outputs = outputs; output = malloc(sizeof(RROutputRec) + nameLength + 1); if (!output) return NULL; output->id = FakeClientID(0); output->pScreen = pScreen; output->name = (char *) (output + 1); output->nameLength = nameLength; memcpy(output->name, name, nameLength); output->name[nameLength] = '\0'; output->connection = RR_UnknownConnection; output->subpixelOrder = SubPixelUnknown; output->mmWidth = 0; output->mmHeight = 0; output->crtc = NULL; output->numCrtcs = 0; output->crtcs = NULL; output->numClones = 0; output->clones = NULL; output->numModes = 0; output->numPreferred = 0; output->modes = NULL; output->numUserModes = 0; output->userModes = NULL; output->properties = NULL; output->pendingProperties = FALSE; output->changed = FALSE; output->nonDesktop = FALSE; output->devPrivate = devPrivate; if (!AddResource(output->id, RROutputType, (void *) output)) return NULL; pScrPriv->outputs[pScrPriv->numOutputs++] = output; nonDesktopAtom = MakeAtom(RR_PROPERTY_NON_DESKTOP, strlen(RR_PROPERTY_NON_DESKTOP), TRUE); if (nonDesktopAtom != BAD_RESOURCE) { static const INT32 values[2] = { 0, 1 }; (void) RRConfigureOutputProperty(output, nonDesktopAtom, FALSE, FALSE, FALSE, 2, values); } RROutputSetNonDesktop(output, FALSE); RRResourcesChanged(pScreen); return output; } /* * Notify extension that output parameters have been changed */ Bool RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones) { RROutputPtr *newClones; int i; if (numClones == output->numClones) { for (i = 0; i < numClones; i++) if (output->clones[i] != clones[i]) break; if (i == numClones) return TRUE; } if (numClones) { newClones = xallocarray(numClones, sizeof(RROutputPtr)); if (!newClones) return FALSE; } else newClones = NULL; free(output->clones); memcpy(newClones, clones, numClones * sizeof(RROutputPtr)); output->clones = newClones; output->numClones = numClones; RROutputChanged(output, TRUE); return TRUE; } Bool RROutputSetModes(RROutputPtr output, RRModePtr * modes, int numModes, int numPreferred) { RRModePtr *newModes; int i; if (numModes == output->numModes && numPreferred == output->numPreferred) { for (i = 0; i < numModes; i++) if (output->modes[i] != modes[i]) break; if (i == numModes) { for (i = 0; i < numModes; i++) RRModeDestroy(modes[i]); return TRUE; } } if (numModes) { newModes = xallocarray(numModes, sizeof(RRModePtr)); if (!newModes) return FALSE; } else newModes = NULL; if (output->modes) { for (i = 0; i < output->numModes; i++) RRModeDestroy(output->modes[i]); free(output->modes); } memcpy(newModes, modes, numModes * sizeof(RRModePtr)); output->modes = newModes; output->numModes = numModes; output->numPreferred = numPreferred; RROutputChanged(output, TRUE); return TRUE; } int RROutputAddUserMode(RROutputPtr output, RRModePtr mode) { int m; ScreenPtr pScreen = output->pScreen; rrScrPriv(pScreen); RRModePtr *newModes; /* Check to see if this mode is already listed for this output */ for (m = 0; m < output->numModes + output->numUserModes; m++) { RRModePtr e = (m < output->numModes ? output->modes[m] : output->userModes[m - output->numModes]); if (mode == e) return Success; } /* Check with the DDX to see if this mode is OK */ if (pScrPriv->rrOutputValidateMode) if (!pScrPriv->rrOutputValidateMode(pScreen, output, mode)) return BadMatch; if (output->userModes) newModes = reallocarray(output->userModes, output->numUserModes + 1, sizeof(RRModePtr)); else newModes = malloc(sizeof(RRModePtr)); if (!newModes) return BadAlloc; output->userModes = newModes; output->userModes[output->numUserModes++] = mode; ++mode->refcnt; RROutputChanged(output, TRUE); RRTellChanged(pScreen); return Success; } int RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode) { int m; /* Find this mode in the user mode list */ for (m = 0; m < output->numUserModes; m++) { RRModePtr e = output->userModes[m]; if (mode == e) break; } /* Not there, access error */ if (m == output->numUserModes) return BadAccess; /* make sure the mode isn't active for this output */ if (output->crtc && output->crtc->mode == mode) return BadMatch; memmove(output->userModes + m, output->userModes + m + 1, (output->numUserModes - m - 1) * sizeof(RRModePtr)); output->numUserModes--; RRModeDestroy(mode); return Success; } Bool RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs) { RRCrtcPtr *newCrtcs; int i; if (numCrtcs == output->numCrtcs) { for (i = 0; i < numCrtcs; i++) if (output->crtcs[i] != crtcs[i]) break; if (i == numCrtcs) return TRUE; } if (numCrtcs) { newCrtcs = xallocarray(numCrtcs, sizeof(RRCrtcPtr)); if (!newCrtcs) return FALSE; } else newCrtcs = NULL; free(output->crtcs); memcpy(newCrtcs, crtcs, numCrtcs * sizeof(RRCrtcPtr)); output->crtcs = newCrtcs; output->numCrtcs = numCrtcs; RROutputChanged(output, TRUE); return TRUE; } Bool RROutputSetConnection(RROutputPtr output, CARD8 connection) { if (output->connection == connection) return TRUE; output->connection = connection; RROutputChanged(output, TRUE); return TRUE; } Bool RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder) { if (output->subpixelOrder == subpixelOrder) return TRUE; output->subpixelOrder = subpixelOrder; RROutputChanged(output, FALSE); return TRUE; } Bool RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight) { if (output->mmWidth == mmWidth && output->mmHeight == mmHeight) return TRUE; output->mmWidth = mmWidth; output->mmHeight = mmHeight; RROutputChanged(output, FALSE); return TRUE; } Bool RROutputSetNonDesktop(RROutputPtr output, Bool nonDesktop) { const char *nonDesktopStr = RR_PROPERTY_NON_DESKTOP; Atom nonDesktopProp = MakeAtom(nonDesktopStr, strlen(nonDesktopStr), TRUE); uint32_t value = nonDesktop ? 1 : 0; if (nonDesktopProp == None || nonDesktopProp == BAD_RESOURCE) return FALSE; return RRChangeOutputProperty(output, nonDesktopProp, XA_INTEGER, 32, PropModeReplace, 1, &value, TRUE, FALSE) == Success; } void RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv(pScreen); RRCrtcPtr crtc = output->crtc; RRModePtr mode = crtc ? crtc->mode : NULL; xRROutputChangeNotifyEvent oe = { .type = RRNotify + RREventBase, .subCode = RRNotify_OutputChange, .timestamp = pScrPriv->lastSetTime.milliseconds, .configTimestamp = pScrPriv->lastConfigTime.milliseconds, .window = pWin->drawable.id, .output = output->id, .crtc = crtc ? crtc->id : None, .mode = mode ? mode->mode.id : None, .rotation = crtc ? crtc->rotation : RR_Rotate_0, .connection = output->nonDesktop ? RR_Disconnected : output->connection, .subpixelOrder = output->subpixelOrder }; WriteEventsToClient(client, 1, (xEvent *) &oe); } /* * Destroy a Output at shutdown */ void RROutputDestroy(RROutputPtr output) { FreeResource(output->id, 0); } static int RROutputDestroyResource(void *value, XID pid) { RROutputPtr output = (RROutputPtr) value; ScreenPtr pScreen = output->pScreen; int m; if (pScreen) { rrScrPriv(pScreen); int i; RRLeasePtr lease, next; xorg_list_for_each_entry_safe(lease, next, &pScrPriv->leases, list) { int o; for (o = 0; o < lease->numOutputs; o++) { if (lease->outputs[o] == output) { RRTerminateLease(lease); break; } } } if (pScrPriv->primaryOutput == output) pScrPriv->primaryOutput = NULL; for (i = 0; i < pScrPriv->numOutputs; i++) { if (pScrPriv->outputs[i] == output) { memmove(pScrPriv->outputs + i, pScrPriv->outputs + i + 1, (pScrPriv->numOutputs - (i + 1)) * sizeof(RROutputPtr)); --pScrPriv->numOutputs; break; } } RRResourcesChanged(pScreen); } if (output->modes) { for (m = 0; m < output->numModes; m++) RRModeDestroy(output->modes[m]); free(output->modes); } for (m = 0; m < output->numUserModes; m++) RRModeDestroy(output->userModes[m]); free(output->userModes); free(output->crtcs); free(output->clones); RRDeleteAllOutputProperties(output); free(output); return 1; } /* * Initialize output type */ Bool RROutputInit(void) { RROutputType = CreateNewResourceType(RROutputDestroyResource, "OUTPUT"); if (!RROutputType) return FALSE; return TRUE; } /* * Initialize output type error value */ void RROutputInitErrorValue(void) { SetResourceTypeErrorValue(RROutputType, RRErrorBase + BadRROutput); } #define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32) int ProcRRGetOutputInfo(ClientPtr client) { REQUEST(xRRGetOutputInfoReq); xRRGetOutputInfoReply rep; RROutputPtr output; CARD8 *extra; unsigned long extraLen; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; RRCrtc *crtcs; RRMode *modes; RROutput *clones; char *name; int i; Bool leased; REQUEST_SIZE_MATCH(xRRGetOutputInfoReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); leased = RROutputIsLeased(output); pScreen = output->pScreen; pScrPriv = rrGetScrPriv(pScreen); if (leased) { rep = (xRRGetOutputInfoReply) { .type = X_Reply, .status = RRSetConfigSuccess, .sequenceNumber = client->sequence, .length = bytes_to_int32(OutputInfoExtra), .timestamp = pScrPriv->lastSetTime.milliseconds, .crtc = None, .mmWidth = 0, .mmHeight = 0, .connection = RR_Disconnected, .subpixelOrder = SubPixelUnknown, .nCrtcs = 0, .nModes = 0, .nPreferred = 0, .nClones = 0, .nameLength = output->nameLength }; extraLen = bytes_to_int32(rep.nameLength) << 2; if (extraLen) { rep.length += bytes_to_int32(extraLen); extra = calloc(1, extraLen); if (!extra) return BadAlloc; } else extra = NULL; name = (char *) extra; } else { rep = (xRRGetOutputInfoReply) { .type = X_Reply, .status = RRSetConfigSuccess, .sequenceNumber = client->sequence, .length = bytes_to_int32(OutputInfoExtra), .timestamp = pScrPriv->lastSetTime.milliseconds, .crtc = output->crtc ? output->crtc->id : None, .mmWidth = output->mmWidth, .mmHeight = output->mmHeight, .connection = output->nonDesktop ? RR_Disconnected : output->connection, .subpixelOrder = output->subpixelOrder, .nCrtcs = output->numCrtcs, .nModes = output->numModes + output->numUserModes, .nPreferred = output->numPreferred, .nClones = output->numClones, .nameLength = output->nameLength }; extraLen = ((output->numCrtcs + output->numModes + output->numUserModes + output->numClones + bytes_to_int32(rep.nameLength)) << 2); if (extraLen) { rep.length += bytes_to_int32(extraLen); extra = calloc(1, extraLen); if (!extra) return BadAlloc; } else extra = NULL; crtcs = (RRCrtc *) extra; modes = (RRMode *) (crtcs + output->numCrtcs); clones = (RROutput *) (modes + output->numModes + output->numUserModes); name = (char *) (clones + output->numClones); for (i = 0; i < output->numCrtcs; i++) { crtcs[i] = output->crtcs[i]->id; if (client->swapped) swapl(&crtcs[i]); } for (i = 0; i < output->numModes + output->numUserModes; i++) { if (i < output->numModes) modes[i] = output->modes[i]->mode.id; else modes[i] = output->userModes[i - output->numModes]->mode.id; if (client->swapped) swapl(&modes[i]); } for (i = 0; i < output->numClones; i++) { clones[i] = output->clones[i]->id; if (client->swapped) swapl(&clones[i]); } } memcpy(name, output->name, output->nameLength); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swapl(&rep.crtc); swapl(&rep.mmWidth); swapl(&rep.mmHeight); swaps(&rep.nCrtcs); swaps(&rep.nModes); swaps(&rep.nPreferred); swaps(&rep.nClones); swaps(&rep.nameLength); } WriteToClient(client, sizeof(xRRGetOutputInfoReply), &rep); if (extraLen) { WriteToClient(client, extraLen, extra); free(extra); } return Success; } static void RRSetPrimaryOutput(ScreenPtr pScreen, rrScrPrivPtr pScrPriv, RROutputPtr output) { if (pScrPriv->primaryOutput == output) return; /* clear the old primary */ if (pScrPriv->primaryOutput) { RROutputChanged(pScrPriv->primaryOutput, 0); pScrPriv->primaryOutput = NULL; } /* set the new primary */ if (output) { pScrPriv->primaryOutput = output; RROutputChanged(output, 0); } pScrPriv->layoutChanged = TRUE; RRTellChanged(pScreen); } int ProcRRSetOutputPrimary(ClientPtr client) { REQUEST(xRRSetOutputPrimaryReq); RROutputPtr output = NULL; WindowPtr pWin; rrScrPrivPtr pScrPriv; int ret; ScreenPtr secondary; REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq); ret = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (ret != Success) return ret; if (stuff->output) { VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (RROutputIsLeased(output)) return BadAccess; if (!output->pScreen->isGPU && output->pScreen != pWin->drawable.pScreen) { client->errorValue = stuff->window; return BadMatch; } if (output->pScreen->isGPU && output->pScreen->current_primary != pWin->drawable.pScreen) { client->errorValue = stuff->window; return BadMatch; } } pScrPriv = rrGetScrPriv(pWin->drawable.pScreen); if (pScrPriv) { RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output); xorg_list_for_each_entry(secondary, &pWin->drawable.pScreen->secondary_list, secondary_head) { if (secondary->is_output_secondary) RRSetPrimaryOutput(secondary, rrGetScrPriv(secondary), output); } } return Success; } int ProcRRGetOutputPrimary(ClientPtr client) { REQUEST(xRRGetOutputPrimaryReq); WindowPtr pWin; rrScrPrivPtr pScrPriv; xRRGetOutputPrimaryReply rep; RROutputPtr primary = NULL; int rc; REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScrPriv = rrGetScrPriv(pWin->drawable.pScreen); if (pScrPriv) primary = pScrPriv->primaryOutput; rep = (xRRGetOutputPrimaryReply) { .type = X_Reply, .sequenceNumber = client->sequence, .output = primary ? primary->id : None }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.output); } WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep); return Success; } xorg-server-21.1.16/randr/rrpointer.c0000644000175000017500000001113214757411105013127 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "inputstr.h" /* * When the pointer moves, check to see if the specified position is outside * any of theavailable CRTCs and move it to a 'sensible' place if so, where * sensible is the closest monitor to the departing edge. * * Returns whether the position was adjusted */ static Bool RRCrtcContainsPosition(RRCrtcPtr crtc, int x, int y) { RRModePtr mode = crtc->mode; int scan_width, scan_height; if (!mode) return FALSE; RRCrtcGetScanoutSize(crtc, &scan_width, &scan_height); if (crtc->x <= x && x < crtc->x + scan_width && crtc->y <= y && y < crtc->y + scan_height) return TRUE; return FALSE; } /* * Find the CRTC nearest the specified position, ignoring 'skip' */ static void RRPointerToNearestCrtc(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, RRCrtcPtr skip) { rrScrPriv(pScreen); int c; RRCrtcPtr nearest = NULL; int best = 0; int best_dx = 0, best_dy = 0; for (c = 0; c < pScrPriv->numCrtcs; c++) { RRCrtcPtr crtc = pScrPriv->crtcs[c]; RRModePtr mode = crtc->mode; int dx, dy; int dist; int scan_width, scan_height; if (!mode) continue; if (crtc == skip) continue; RRCrtcGetScanoutSize(crtc, &scan_width, &scan_height); if (x < crtc->x) dx = crtc->x - x; else if (x > crtc->x + scan_width - 1) dx = crtc->x + (scan_width - 1) - x; else dx = 0; if (y < crtc->y) dy = crtc->y - y; else if (y > crtc->y + scan_height - 1) dy = crtc->y + (scan_height - 1) - y; else dy = 0; dist = dx * dx + dy * dy; if (!nearest || dist < best) { nearest = crtc; best_dx = dx; best_dy = dy; best = dist; } } if (best_dx || best_dy) (*pScreen->SetCursorPosition) (pDev, pScreen, x + best_dx, y + best_dy, TRUE); pScrPriv->pointerCrtc = nearest; } void RRPointerMoved(ScreenPtr pScreen, int x, int y) { rrScrPriv(pScreen); RRCrtcPtr pointerCrtc = pScrPriv->pointerCrtc; int c; /* Check last known CRTC */ if (pointerCrtc && RRCrtcContainsPosition(pointerCrtc, x, y)) return; /* Check all CRTCs */ for (c = 0; c < pScrPriv->numCrtcs; c++) { RRCrtcPtr crtc = pScrPriv->crtcs[c]; if (RRCrtcContainsPosition(crtc, x, y)) { /* Remember containing CRTC */ pScrPriv->pointerCrtc = crtc; return; } } /* None contain pointer, find nearest */ ErrorF("RRPointerMoved: Untested, may cause \"bogus pointer event\"\n"); RRPointerToNearestCrtc(inputInfo.pointer, pScreen, x, y, pointerCrtc); } /* * When the screen is reconfigured, move all pointers to the nearest * CRTC */ void RRPointerScreenConfigured(ScreenPtr pScreen) { WindowPtr pRoot; ScreenPtr pCurrentScreen; int x, y; DeviceIntPtr pDev; for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (IsPointerDevice(pDev)) { pRoot = GetCurrentRootWindow(pDev); pCurrentScreen = pRoot ? pRoot->drawable.pScreen : NULL; if (pScreen == pCurrentScreen) { GetSpritePosition(pDev, &x, &y); RRPointerToNearestCrtc(pDev, pScreen, x, y, NULL); } } } } xorg-server-21.1.16/randr/rrproperty.c0000644000175000017500000005443714757411105013352 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "propertyst.h" #include "swaprep.h" #include static int DeliverPropertyEvent(WindowPtr pWin, void *value) { xRROutputPropertyNotifyEvent *event = value; RREventPtr *pHead, pRREvent; dixLookupResourceByType((void **) &pHead, pWin->drawable.id, RREventType, serverClient, DixReadAccess); if (!pHead) return WT_WALKCHILDREN; for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) { if (!(pRREvent->mask & RROutputPropertyNotifyMask)) continue; event->window = pRREvent->window->drawable.id; WriteEventsToClient(pRREvent->client, 1, (xEvent *) event); } return WT_WALKCHILDREN; } static void RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event) { if (!(dispatchException & (DE_RESET | DE_TERMINATE))) WalkTree(pScreen, DeliverPropertyEvent, event); } static void RRDestroyOutputProperty(RRPropertyPtr prop) { free(prop->valid_values); free(prop->current.data); free(prop->pending.data); free(prop); } static void RRDeleteProperty(RROutputRec * output, RRPropertyRec * prop) { xRROutputPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_OutputProperty, .output = output->id, .state = PropertyDelete, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event); RRDestroyOutputProperty(prop); } void RRDeleteAllOutputProperties(RROutputPtr output) { RRPropertyPtr prop, next; for (prop = output->properties; prop; prop = next) { next = prop->next; RRDeleteProperty(output, prop); } } static void RRInitOutputPropertyValue(RRPropertyValuePtr property_value) { property_value->type = None; property_value->format = 0; property_value->size = 0; property_value->data = NULL; } static RRPropertyPtr RRCreateOutputProperty(Atom property) { RRPropertyPtr prop; prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec)); if (!prop) return NULL; prop->next = NULL; prop->propertyName = property; prop->is_pending = FALSE; prop->range = FALSE; prop->immutable = FALSE; prop->num_valid = 0; prop->valid_values = NULL; RRInitOutputPropertyValue(&prop->current); RRInitOutputPropertyValue(&prop->pending); return prop; } void RRDeleteOutputProperty(RROutputPtr output, Atom property) { RRPropertyRec *prop, **prev; for (prev = &output->properties; (prop = *prev); prev = &(prop->next)) if (prop->propertyName == property) { *prev = prop->next; RRDeleteProperty(output, prop); return; } } static void RRNoticePropertyChange(RROutputPtr output, Atom property, RRPropertyValuePtr value) { const char *non_desktop_str = RR_PROPERTY_NON_DESKTOP; Atom non_desktop_prop = MakeAtom(non_desktop_str, strlen(non_desktop_str), FALSE); if (property == non_desktop_prop) { if (value->type == XA_INTEGER && value->format == 32 && value->size >= 1) { uint32_t nonDesktopData; Bool nonDesktop; memcpy(&nonDesktopData, value->data, sizeof (nonDesktopData)); nonDesktop = nonDesktopData != 0; if (nonDesktop != output->nonDesktop) { output->nonDesktop = nonDesktop; RROutputChanged(output, 0); RRTellChanged(output->pScreen); } } } } int RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type, int format, int mode, unsigned long len, const void *value, Bool sendevent, Bool pending) { RRPropertyPtr prop; rrScrPrivPtr pScrPriv = rrGetScrPriv(output->pScreen); int size_in_bytes; unsigned long total_len; RRPropertyValuePtr prop_value; RRPropertyValueRec new_value; Bool add = FALSE; size_in_bytes = format >> 3; /* first see if property already exists */ prop = RRQueryOutputProperty(output, property); if (!prop) { /* just add to list */ prop = RRCreateOutputProperty(property); if (!prop) return BadAlloc; add = TRUE; mode = PropModeReplace; } if (pending && prop->is_pending) prop_value = &prop->pending; else prop_value = &prop->current; /* To append or prepend to a property the request format and type must match those of the already defined property. The existing format and type are irrelevant when using the mode "PropModeReplace" since they will be written over. */ if ((format != prop_value->format) && (mode != PropModeReplace)) return BadMatch; if ((prop_value->type != type) && (mode != PropModeReplace)) return BadMatch; new_value = *prop_value; if (mode == PropModeReplace) total_len = len; else total_len = prop_value->size + len; if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; new_value.data = xallocarray(total_len, size_in_bytes); if (!new_value.data && total_len && size_in_bytes) { if (add) RRDestroyOutputProperty(prop); return BadAlloc; } new_value.size = total_len; new_value.type = type; new_value.format = format; switch (mode) { case PropModeReplace: new_data = new_value.data; old_data = NULL; break; case PropModeAppend: new_data = (void *) (((char *) new_value.data) + (prop_value->size * size_in_bytes)); old_data = new_value.data; break; case PropModePrepend: new_data = new_value.data; old_data = (void *) (((char *) new_value.data) + (len * size_in_bytes)); break; } if (new_data) memcpy((char *) new_data, (char *) value, len * size_in_bytes); if (old_data) memcpy((char *) old_data, (char *) prop_value->data, prop_value->size * size_in_bytes); if (pending && pScrPriv->rrOutputSetProperty && !pScrPriv->rrOutputSetProperty(output->pScreen, output, prop->propertyName, &new_value)) { free(new_value.data); if (add) RRDestroyOutputProperty(prop); return BadValue; } free(prop_value->data); *prop_value = new_value; } else if (len == 0) { /* do nothing */ } if (add) { prop->next = output->properties; output->properties = prop; } if (pending && prop->is_pending) output->pendingProperties = TRUE; if (!(pending && prop->is_pending)) RRNoticePropertyChange(output, prop->propertyName, prop_value); if (sendevent) { xRROutputPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_OutputProperty, .output = output->id, .state = PropertyNewValue, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event); } return Success; } Bool RRPostPendingProperties(RROutputPtr output) { RRPropertyValuePtr pending_value; RRPropertyValuePtr current_value; RRPropertyPtr property; Bool ret = TRUE; if (!output->pendingProperties) return TRUE; output->pendingProperties = FALSE; for (property = output->properties; property; property = property->next) { /* Skip non-pending properties */ if (!property->is_pending) continue; pending_value = &property->pending; current_value = &property->current; /* * If the pending and current values are equal, don't mark it * as changed (which would deliver an event) */ if (pending_value->type == current_value->type && pending_value->format == current_value->format && pending_value->size == current_value->size && !memcmp(pending_value->data, current_value->data, pending_value->size * (pending_value->format / 8))) continue; if (RRChangeOutputProperty(output, property->propertyName, pending_value->type, pending_value->format, PropModeReplace, pending_value->size, pending_value->data, TRUE, FALSE) != Success) ret = FALSE; } return ret; } RRPropertyPtr RRQueryOutputProperty(RROutputPtr output, Atom property) { RRPropertyPtr prop; for (prop = output->properties; prop; prop = prop->next) if (prop->propertyName == property) return prop; return NULL; } RRPropertyValuePtr RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending) { RRPropertyPtr prop = RRQueryOutputProperty(output, property); rrScrPrivPtr pScrPriv = rrGetScrPriv(output->pScreen); if (!prop) return NULL; if (pending && prop->is_pending) return &prop->pending; else { #if RANDR_13_INTERFACE /* If we can, try to update the property value first */ if (pScrPriv->rrOutputGetProperty) pScrPriv->rrOutputGetProperty(output->pScreen, output, prop->propertyName); #endif return &prop->current; } } int RRConfigureOutputProperty(RROutputPtr output, Atom property, Bool pending, Bool range, Bool immutable, int num_values, const INT32 *values) { RRPropertyPtr prop = RRQueryOutputProperty(output, property); Bool add = FALSE; INT32 *new_values; if (!prop) { prop = RRCreateOutputProperty(property); if (!prop) return BadAlloc; add = TRUE; } else if (prop->immutable && !immutable) return BadAccess; /* * ranges must have even number of values */ if (range && (num_values & 1)) { if (add) RRDestroyOutputProperty(prop); return BadMatch; } new_values = xallocarray(num_values, sizeof(INT32)); if (!new_values && num_values) { if (add) RRDestroyOutputProperty(prop); return BadAlloc; } if (num_values) memcpy(new_values, values, num_values * sizeof(INT32)); /* * Property moving from pending to non-pending * loses any pending values */ if (prop->is_pending && !pending) { free(prop->pending.data); RRInitOutputPropertyValue(&prop->pending); } prop->is_pending = pending; prop->range = range; prop->immutable = immutable; prop->num_valid = num_values; free(prop->valid_values); prop->valid_values = new_values; if (add) { prop->next = output->properties; output->properties = prop; } return Success; } int ProcRRListOutputProperties(ClientPtr client) { REQUEST(xRRListOutputPropertiesReq); Atom *pAtoms = NULL; xRRListOutputPropertiesReply rep; int numProps = 0; RROutputPtr output; RRPropertyPtr prop; REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); for (prop = output->properties; prop; prop = prop->next) numProps++; if (numProps) if (!(pAtoms = xallocarray(numProps, sizeof(Atom)))) return BadAlloc; rep = (xRRListOutputPropertiesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(numProps * sizeof(Atom)), .nAtoms = numProps }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.nAtoms); } WriteToClient(client, sizeof(xRRListOutputPropertiesReply), &rep); if (numProps) { /* Copy property name atoms to reply buffer */ Atom *temppAtoms = pAtoms; for (prop = output->properties; prop; prop = prop->next) *temppAtoms++ = prop->propertyName; client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); free(pAtoms); } return Success; } int ProcRRQueryOutputProperty(ClientPtr client) { REQUEST(xRRQueryOutputPropertyReq); xRRQueryOutputPropertyReply rep; RROutputPtr output; RRPropertyPtr prop; char *extra = NULL; REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); prop = RRQueryOutputProperty(output, stuff->property); if (!prop) return BadName; if (prop->num_valid) { extra = xallocarray(prop->num_valid, sizeof(INT32)); if (!extra) return BadAlloc; } rep = (xRRQueryOutputPropertyReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = prop->num_valid, .pending = prop->is_pending, .range = prop->range, .immutable = prop->immutable }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xRRQueryOutputPropertyReply), &rep); if (prop->num_valid) { memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32)); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32), extra); free(extra); } return Success; } int ProcRRConfigureOutputProperty(ClientPtr client) { REQUEST(xRRConfigureOutputPropertyReq); RROutputPtr output; int num_valid; REQUEST_AT_LEAST_SIZE(xRRConfigureOutputPropertyReq); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (RROutputIsLeased(output)) return BadAccess; num_valid = stuff->length - bytes_to_int32(sizeof(xRRConfigureOutputPropertyReq)); return RRConfigureOutputProperty(output, stuff->property, stuff->pending, stuff->range, FALSE, num_valid, (INT32 *) (stuff + 1)); } int ProcRRChangeOutputProperty(ClientPtr client) { REQUEST(xRRChangeOutputPropertyReq); RROutputPtr output; char format, mode; unsigned long len; int sizeInBytes; uint64_t totalSize; int err; REQUEST_AT_LEAST_SIZE(xRRChangeOutputPropertyReq); UpdateCurrentTime(); format = stuff->format; mode = stuff->mode; if ((mode != PropModeReplace) && (mode != PropModeAppend) && (mode != PropModePrepend)) { client->errorValue = mode; return BadValue; } if ((format != 8) && (format != 16) && (format != 32)) { client->errorValue = format; return BadValue; } len = stuff->nUnits; if (len > bytes_to_int32((0xffffffff - sizeof(xChangePropertyReq)))) return BadLength; sizeInBytes = format >> 3; totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xRRChangeOutputPropertyReq, totalSize); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if (!ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } err = RRChangeOutputProperty(output, stuff->property, stuff->type, (int) format, (int) mode, len, (void *) &stuff[1], TRUE, TRUE); if (err != Success) return err; else return Success; } int ProcRRDeleteOutputProperty(ClientPtr client) { REQUEST(xRRDeleteOutputPropertyReq); RROutputPtr output; RRPropertyPtr prop; REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq); UpdateCurrentTime(); VERIFY_RR_OUTPUT(stuff->output, output, DixReadAccess); if (RROutputIsLeased(output)) return BadAccess; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } prop = RRQueryOutputProperty(output, stuff->property); if (!prop) { client->errorValue = stuff->property; return BadName; } if (prop->immutable) { client->errorValue = stuff->property; return BadAccess; } RRDeleteOutputProperty(output, stuff->property); return Success; } int ProcRRGetOutputProperty(ClientPtr client) { REQUEST(xRRGetOutputPropertyReq); RRPropertyPtr prop, *prev; RRPropertyValuePtr prop_value; unsigned long n, len, ind; RROutputPtr output; xRRGetOutputPropertyReply reply; char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq); if (stuff->delete) UpdateCurrentTime(); VERIFY_RR_OUTPUT(stuff->output, output, stuff->delete ? DixWriteAccess : DixReadAccess); if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { client->errorValue = stuff->delete; return BadValue; } if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } for (prev = &output->properties; (prop = *prev); prev = &prop->next) if (prop->propertyName == stuff->property) break; reply = (xRRGetOutputPropertyReply) { .type = X_Reply, .sequenceNumber = client->sequence }; if (!prop) { reply.nItems = 0; reply.length = 0; reply.bytesAfter = 0; reply.propertyType = None; reply.format = 0; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply); return Success; } if (prop->immutable && stuff->delete) return BadAccess; prop_value = RRGetOutputProperty(output, stuff->property, stuff->pending); if (!prop_value) return BadAtom; /* If the request type and actual type don't match. Return the property information, but not the data. */ if (((stuff->type != prop_value->type) && (stuff->type != AnyPropertyType)) ) { reply.bytesAfter = prop_value->size; reply.format = prop_value->format; reply.length = 0; reply.nItems = 0; reply.propertyType = prop_value->type; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply); return Success; } /* * Return type, format, value to client */ n = (prop_value->format / 8) * prop_value->size; /* size (bytes) of prop */ ind = stuff->longOffset << 2; /* If longOffset is invalid such that it causes "len" to be negative, it's a value error. */ if (n < ind) { client->errorValue = stuff->longOffset; return BadValue; } len = min(n - ind, 4 * stuff->longLength); if (len) { extra = malloc(len); if (!extra) return BadAlloc; } reply.bytesAfter = n - (ind + len); reply.format = prop_value->format; reply.length = bytes_to_int32(len); if (prop_value->format) reply.nItems = len / (prop_value->format / 8); else reply.nItems = 0; reply.propertyType = prop_value->type; if (stuff->delete && (reply.bytesAfter == 0)) { xRROutputPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_OutputProperty, .output = output->id, .state = PropertyDelete, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(output->pScreen, (xEvent *) &event); } if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xGenericReply), &reply); if (len) { memcpy(extra, (char *) prop_value->data + ind, len); switch (reply.format) { case 32: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } WriteSwappedDataToClient(client, len, extra); free(extra); } if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */ *prev = prop->next; RRDestroyOutputProperty(prop); } return Success; } xorg-server-21.1.16/randr/rrprovider.c0000644000175000017500000003577314757411105013322 /* * Copyright © 2012 Red Hat Inc. * Copyright 2019 DisplayLink (UK) Ltd. * * 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. * * Authors: Dave Airlie */ #include "randrstr.h" #include "swaprep.h" #include RESTYPE RRProviderType = 0; /* * Initialize provider type error value */ void RRProviderInitErrorValue(void) { SetResourceTypeErrorValue(RRProviderType, RRErrorBase + BadRRProvider); } #define ADD_PROVIDER(_pScreen) do { \ pScrPriv = rrGetScrPriv((_pScreen)); \ if (pScrPriv->provider) { \ providers[count_providers] = pScrPriv->provider->id; \ if (client->swapped) \ swapl(&providers[count_providers]); \ count_providers++; \ } \ } while(0) int ProcRRGetProviders (ClientPtr client) { REQUEST(xRRGetProvidersReq); xRRGetProvidersReply rep; WindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; int rc; CARD8 *extra; unsigned int extraLen; RRProvider *providers; int total_providers = 0, count_providers = 0; ScreenPtr iter; REQUEST_SIZE_MATCH(xRRGetProvidersReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); if (pScrPriv->provider) total_providers++; xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { pScrPriv = rrGetScrPriv(iter); total_providers += pScrPriv->provider ? 1 : 0; } pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) { rep = (xRRGetProvidersReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .timestamp = currentTime.milliseconds, .nProviders = 0 }; extra = NULL; extraLen = 0; } else { rep = (xRRGetProvidersReply) { .type = X_Reply, .sequenceNumber = client->sequence, .timestamp = pScrPriv->lastSetTime.milliseconds, .nProviders = total_providers, .length = total_providers }; extraLen = rep.length << 2; if (extraLen) { extra = malloc(extraLen); if (!extra) return BadAlloc; } else extra = NULL; providers = (RRProvider *)extra; ADD_PROVIDER(pScreen); xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { ADD_PROVIDER(iter); } } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swaps(&rep.nProviders); } WriteToClient(client, sizeof(xRRGetProvidersReply), (char *)&rep); if (extraLen) { WriteToClient (client, extraLen, (char *) extra); free(extra); } return Success; } int ProcRRGetProviderInfo (ClientPtr client) { REQUEST(xRRGetProviderInfoReq); xRRGetProviderInfoReply rep; rrScrPrivPtr pScrPriv, pScrProvPriv; RRProviderPtr provider; ScreenPtr pScreen; CARD8 *extra; unsigned int extraLen = 0; RRCrtc *crtcs; RROutput *outputs; int i; char *name; ScreenPtr provscreen; RRProvider *providers; uint32_t *prov_cap; REQUEST_SIZE_MATCH(xRRGetProviderInfoReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); pScreen = provider->pScreen; pScrPriv = rrGetScrPriv(pScreen); rep = (xRRGetProviderInfoReply) { .type = X_Reply, .status = RRSetConfigSuccess, .sequenceNumber = client->sequence, .length = 0, .capabilities = provider->capabilities, .nameLength = provider->nameLength, .timestamp = pScrPriv->lastSetTime.milliseconds, .nCrtcs = pScrPriv->numCrtcs, .nOutputs = pScrPriv->numOutputs, .nAssociatedProviders = 0 }; /* count associated providers */ if (provider->offload_sink) rep.nAssociatedProviders++; if (provider->output_source && provider->output_source != provider->offload_sink) rep.nAssociatedProviders++; xorg_list_for_each_entry(provscreen, &pScreen->secondary_list, secondary_head) { if (provscreen->is_output_secondary || provscreen->is_offload_secondary) rep.nAssociatedProviders++; } rep.length = (pScrPriv->numCrtcs + pScrPriv->numOutputs + (rep.nAssociatedProviders * 2) + bytes_to_int32(rep.nameLength)); extraLen = rep.length << 2; if (extraLen) { extra = malloc(extraLen); if (!extra) return BadAlloc; } else extra = NULL; crtcs = (RRCrtc *)extra; outputs = (RROutput *)(crtcs + rep.nCrtcs); providers = (RRProvider *)(outputs + rep.nOutputs); prov_cap = (unsigned int *)(providers + rep.nAssociatedProviders); name = (char *)(prov_cap + rep.nAssociatedProviders); for (i = 0; i < pScrPriv->numCrtcs; i++) { crtcs[i] = pScrPriv->crtcs[i]->id; if (client->swapped) swapl(&crtcs[i]); } for (i = 0; i < pScrPriv->numOutputs; i++) { outputs[i] = pScrPriv->outputs[i]->id; if (client->swapped) swapl(&outputs[i]); } i = 0; if (provider->offload_sink) { providers[i] = provider->offload_sink->id; if (client->swapped) swapl(&providers[i]); prov_cap[i] = RR_Capability_SinkOffload; if (client->swapped) swapl(&prov_cap[i]); i++; } if (provider->output_source) { providers[i] = provider->output_source->id; if (client->swapped) swapl(&providers[i]); prov_cap[i] = RR_Capability_SourceOutput; swapl(&prov_cap[i]); i++; } xorg_list_for_each_entry(provscreen, &pScreen->secondary_list, secondary_head) { if (!provscreen->is_output_secondary && !provscreen->is_offload_secondary) continue; pScrProvPriv = rrGetScrPriv(provscreen); providers[i] = pScrProvPriv->provider->id; if (client->swapped) swapl(&providers[i]); prov_cap[i] = 0; if (provscreen->is_output_secondary) prov_cap[i] |= RR_Capability_SinkOutput; if (provscreen->is_offload_secondary) prov_cap[i] |= RR_Capability_SourceOffload; if (client->swapped) swapl(&prov_cap[i]); i++; } memcpy(name, provider->name, rep.nameLength); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.capabilities); swaps(&rep.nCrtcs); swaps(&rep.nOutputs); swaps(&rep.nameLength); } WriteToClient(client, sizeof(xRRGetProviderInfoReply), (char *)&rep); if (extraLen) { WriteToClient (client, extraLen, (char *) extra); free(extra); } return Success; } static void RRInitPrimeSyncProps(ScreenPtr pScreen) { /* * TODO: When adding support for different sources for different outputs, * make sure this sets up the output properties only on outputs associated * with the correct source provider. */ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); const char *syncStr = PRIME_SYNC_PROP; Atom syncProp = MakeAtom(syncStr, strlen(syncStr), TRUE); int defaultVal = TRUE; INT32 validVals[2] = {FALSE, TRUE}; int i; for (i = 0; i < pScrPriv->numOutputs; i++) { if (!RRQueryOutputProperty(pScrPriv->outputs[i], syncProp)) { RRConfigureOutputProperty(pScrPriv->outputs[i], syncProp, TRUE, FALSE, FALSE, 2, &validVals[0]); RRChangeOutputProperty(pScrPriv->outputs[i], syncProp, XA_INTEGER, 8, PropModeReplace, 1, &defaultVal, FALSE, FALSE); } } } static void RRFiniPrimeSyncProps(ScreenPtr pScreen) { /* * TODO: When adding support for different sources for different outputs, * make sure this tears down the output properties only on outputs * associated with the correct source provider. */ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen); int i; const char *syncStr = PRIME_SYNC_PROP; Atom syncProp = MakeAtom(syncStr, strlen(syncStr), FALSE); if (syncProp == None) return; for (i = 0; i < pScrPriv->numOutputs; i++) { RRDeleteOutputProperty(pScrPriv->outputs[i], syncProp); } } int ProcRRSetProviderOutputSource(ClientPtr client) { REQUEST(xRRSetProviderOutputSourceReq); rrScrPrivPtr pScrPriv; RRProviderPtr provider, source_provider = NULL; ScreenPtr pScreen; REQUEST_SIZE_MATCH(xRRSetProviderOutputSourceReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); if (!(provider->capabilities & RR_Capability_SinkOutput)) return BadValue; if (stuff->source_provider) { VERIFY_RR_PROVIDER(stuff->source_provider, source_provider, DixReadAccess); if (!(source_provider->capabilities & RR_Capability_SourceOutput)) return BadValue; } pScreen = provider->pScreen; pScrPriv = rrGetScrPriv(pScreen); if (!pScreen->isGPU) return BadValue; pScrPriv->rrProviderSetOutputSource(pScreen, provider, source_provider); RRInitPrimeSyncProps(pScreen); provider->changed = TRUE; RRSetChanged(pScreen); RRTellChanged (pScreen); return Success; } int ProcRRSetProviderOffloadSink(ClientPtr client) { REQUEST(xRRSetProviderOffloadSinkReq); rrScrPrivPtr pScrPriv; RRProviderPtr provider, sink_provider = NULL; ScreenPtr pScreen; REQUEST_SIZE_MATCH(xRRSetProviderOffloadSinkReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); if (!(provider->capabilities & RR_Capability_SourceOffload)) return BadValue; if (!provider->pScreen->isGPU) return BadValue; if (stuff->sink_provider) { VERIFY_RR_PROVIDER(stuff->sink_provider, sink_provider, DixReadAccess); if (!(sink_provider->capabilities & RR_Capability_SinkOffload)) return BadValue; } pScreen = provider->pScreen; pScrPriv = rrGetScrPriv(pScreen); pScrPriv->rrProviderSetOffloadSink(pScreen, provider, sink_provider); provider->changed = TRUE; RRSetChanged(pScreen); RRTellChanged (pScreen); return Success; } RRProviderPtr RRProviderCreate(ScreenPtr pScreen, const char *name, int nameLength) { RRProviderPtr provider; rrScrPrivPtr pScrPriv; pScrPriv = rrGetScrPriv(pScreen); provider = calloc(1, sizeof(RRProviderRec) + nameLength + 1); if (!provider) return NULL; provider->id = FakeClientID(0); provider->pScreen = pScreen; provider->name = (char *) (provider + 1); provider->nameLength = nameLength; memcpy(provider->name, name, nameLength); provider->name[nameLength] = '\0'; provider->changed = FALSE; if (!AddResource (provider->id, RRProviderType, (void *) provider)) return NULL; pScrPriv->provider = provider; return provider; } /* * Destroy a provider at shutdown */ void RRProviderDestroy (RRProviderPtr provider) { RRFiniPrimeSyncProps(provider->pScreen); FreeResource (provider->id, 0); } void RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities) { provider->capabilities = capabilities; } static int RRProviderDestroyResource (void *value, XID pid) { RRProviderPtr provider = (RRProviderPtr)value; ScreenPtr pScreen = provider->pScreen; if (pScreen) { rrScrPriv(pScreen); if (pScrPriv->rrProviderDestroy) (*pScrPriv->rrProviderDestroy)(pScreen, provider); pScrPriv->provider = NULL; } free(provider); return 1; } Bool RRProviderInit(void) { RRProviderType = CreateNewResourceType(RRProviderDestroyResource, "Provider"); if (!RRProviderType) return FALSE; return TRUE; } extern _X_EXPORT Bool RRProviderLookup(XID id, RRProviderPtr *provider_p) { int rc = dixLookupResourceByType((void **)provider_p, id, RRProviderType, NullClient, DixReadAccess); if (rc == Success) return TRUE; return FALSE; } void RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider) { ScreenPtr pScreen = pWin->drawable.pScreen; rrScrPriv(pScreen); xRRProviderChangeNotifyEvent pe = { .type = RRNotify + RREventBase, .subCode = RRNotify_ProviderChange, .timestamp = pScrPriv->lastSetTime.milliseconds, .window = pWin->drawable.id, .provider = provider->id }; WriteEventsToClient(client, 1, (xEvent *) &pe); } void RRProviderAutoConfigGpuScreen(ScreenPtr pScreen, ScreenPtr primaryScreen) { rrScrPrivPtr pScrPriv; rrScrPrivPtr primaryPriv; RRProviderPtr provider; RRProviderPtr primary_provider; /* Bail out if RandR wasn't initialized. */ if (!dixPrivateKeyRegistered(rrPrivKey)) return; pScrPriv = rrGetScrPriv(pScreen); primaryPriv = rrGetScrPriv(primaryScreen); provider = pScrPriv->provider; primary_provider = primaryPriv->provider; if (!provider || !primary_provider) return; if ((provider->capabilities & RR_Capability_SinkOutput) && (primary_provider->capabilities & RR_Capability_SourceOutput)) { pScrPriv->rrProviderSetOutputSource(pScreen, provider, primary_provider); RRInitPrimeSyncProps(pScreen); primaryPriv->configChanged = TRUE; RRSetChanged(primaryScreen); } if ((provider->capabilities & RR_Capability_SourceOffload) && (primary_provider->capabilities & RR_Capability_SinkOffload)) pScrPriv->rrProviderSetOffloadSink(pScreen, provider, primary_provider); } xorg-server-21.1.16/randr/rrproviderproperty.c0000644000175000017500000005302714757411105015117 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "propertyst.h" #include "swaprep.h" static int DeliverPropertyEvent(WindowPtr pWin, void *value) { xRRProviderPropertyNotifyEvent *event = value; RREventPtr *pHead, pRREvent; dixLookupResourceByType((void **) &pHead, pWin->drawable.id, RREventType, serverClient, DixReadAccess); if (!pHead) return WT_WALKCHILDREN; for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) { if (!(pRREvent->mask & RRProviderPropertyNotifyMask)) continue; event->window = pRREvent->window->drawable.id; WriteEventsToClient(pRREvent->client, 1, (xEvent *) event); } return WT_WALKCHILDREN; } static void RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event) { if (!(dispatchException & (DE_RESET | DE_TERMINATE))) WalkTree(pScreen, DeliverPropertyEvent, event); } static void RRDestroyProviderProperty(RRPropertyPtr prop) { free(prop->valid_values); free(prop->current.data); free(prop->pending.data); free(prop); } static void RRDeleteProperty(RRProviderRec * provider, RRPropertyRec * prop) { xRRProviderPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_ProviderProperty, .provider = provider->id, .state = PropertyDelete, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event); RRDestroyProviderProperty(prop); } void RRDeleteAllProviderProperties(RRProviderPtr provider) { RRPropertyPtr prop, next; for (prop = provider->properties; prop; prop = next) { next = prop->next; RRDeleteProperty(provider, prop); } } static void RRInitProviderPropertyValue(RRPropertyValuePtr property_value) { property_value->type = None; property_value->format = 0; property_value->size = 0; property_value->data = NULL; } static RRPropertyPtr RRCreateProviderProperty(Atom property) { RRPropertyPtr prop; prop = (RRPropertyPtr) malloc(sizeof(RRPropertyRec)); if (!prop) return NULL; prop->next = NULL; prop->propertyName = property; prop->is_pending = FALSE; prop->range = FALSE; prop->immutable = FALSE; prop->num_valid = 0; prop->valid_values = NULL; RRInitProviderPropertyValue(&prop->current); RRInitProviderPropertyValue(&prop->pending); return prop; } void RRDeleteProviderProperty(RRProviderPtr provider, Atom property) { RRPropertyRec *prop, **prev; for (prev = &provider->properties; (prop = *prev); prev = &(prop->next)) if (prop->propertyName == property) { *prev = prop->next; RRDeleteProperty(provider, prop); return; } } int RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type, int format, int mode, unsigned long len, void *value, Bool sendevent, Bool pending) { RRPropertyPtr prop; rrScrPrivPtr pScrPriv = rrGetScrPriv(provider->pScreen); int size_in_bytes; int total_size; unsigned long total_len; RRPropertyValuePtr prop_value; RRPropertyValueRec new_value; Bool add = FALSE; size_in_bytes = format >> 3; /* first see if property already exists */ prop = RRQueryProviderProperty(provider, property); if (!prop) { /* just add to list */ prop = RRCreateProviderProperty(property); if (!prop) return BadAlloc; add = TRUE; mode = PropModeReplace; } if (pending && prop->is_pending) prop_value = &prop->pending; else prop_value = &prop->current; /* To append or prepend to a property the request format and type must match those of the already defined property. The existing format and type are irrelevant when using the mode "PropModeReplace" since they will be written over. */ if ((format != prop_value->format) && (mode != PropModeReplace)) return BadMatch; if ((prop_value->type != type) && (mode != PropModeReplace)) return BadMatch; new_value = *prop_value; if (mode == PropModeReplace) total_len = len; else total_len = prop_value->size + len; if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; total_size = total_len * size_in_bytes; new_value.data = (void *) malloc(total_size); if (!new_value.data && total_size) { if (add) RRDestroyProviderProperty(prop); return BadAlloc; } new_value.size = len; new_value.type = type; new_value.format = format; switch (mode) { case PropModeReplace: new_data = new_value.data; old_data = NULL; break; case PropModeAppend: new_data = (void *) (((char *) new_value.data) + (prop_value->size * size_in_bytes)); old_data = new_value.data; break; case PropModePrepend: new_data = new_value.data; old_data = (void *) (((char *) new_value.data) + (prop_value->size * size_in_bytes)); break; } if (new_data) memcpy((char *) new_data, (char *) value, len * size_in_bytes); if (old_data) memcpy((char *) old_data, (char *) prop_value->data, prop_value->size * size_in_bytes); if (pending && pScrPriv->rrProviderSetProperty && !pScrPriv->rrProviderSetProperty(provider->pScreen, provider, prop->propertyName, &new_value)) { if (add) RRDestroyProviderProperty(prop); free(new_value.data); return BadValue; } free(prop_value->data); *prop_value = new_value; } else if (len == 0) { /* do nothing */ } if (add) { prop->next = provider->properties; provider->properties = prop; } if (pending && prop->is_pending) provider->pendingProperties = TRUE; if (sendevent) { xRRProviderPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_ProviderProperty, .provider = provider->id, .state = PropertyNewValue, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event); } return Success; } Bool RRPostProviderPendingProperties(RRProviderPtr provider) { RRPropertyValuePtr pending_value; RRPropertyValuePtr current_value; RRPropertyPtr property; Bool ret = TRUE; if (!provider->pendingProperties) return TRUE; provider->pendingProperties = FALSE; for (property = provider->properties; property; property = property->next) { /* Skip non-pending properties */ if (!property->is_pending) continue; pending_value = &property->pending; current_value = &property->current; /* * If the pending and current values are equal, don't mark it * as changed (which would deliver an event) */ if (pending_value->type == current_value->type && pending_value->format == current_value->format && pending_value->size == current_value->size && !memcmp(pending_value->data, current_value->data, pending_value->size * (pending_value->format / 8))) continue; if (RRChangeProviderProperty(provider, property->propertyName, pending_value->type, pending_value->format, PropModeReplace, pending_value->size, pending_value->data, TRUE, FALSE) != Success) ret = FALSE; } return ret; } RRPropertyPtr RRQueryProviderProperty(RRProviderPtr provider, Atom property) { RRPropertyPtr prop; for (prop = provider->properties; prop; prop = prop->next) if (prop->propertyName == property) return prop; return NULL; } RRPropertyValuePtr RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending) { RRPropertyPtr prop = RRQueryProviderProperty(provider, property); rrScrPrivPtr pScrPriv = rrGetScrPriv(provider->pScreen); if (!prop) return NULL; if (pending && prop->is_pending) return &prop->pending; else { #if RANDR_13_INTERFACE /* If we can, try to update the property value first */ if (pScrPriv->rrProviderGetProperty) pScrPriv->rrProviderGetProperty(provider->pScreen, provider, prop->propertyName); #endif return &prop->current; } } int RRConfigureProviderProperty(RRProviderPtr provider, Atom property, Bool pending, Bool range, Bool immutable, int num_values, INT32 *values) { RRPropertyPtr prop = RRQueryProviderProperty(provider, property); Bool add = FALSE; INT32 *new_values; if (!prop) { prop = RRCreateProviderProperty(property); if (!prop) return BadAlloc; add = TRUE; } else if (prop->immutable && !immutable) return BadAccess; /* * ranges must have even number of values */ if (range && (num_values & 1)) { if (add) RRDestroyProviderProperty(prop); return BadMatch; } new_values = xallocarray(num_values, sizeof(INT32)); if (!new_values && num_values) { if (add) RRDestroyProviderProperty(prop); return BadAlloc; } if (num_values) memcpy(new_values, values, num_values * sizeof(INT32)); /* * Property moving from pending to non-pending * loses any pending values */ if (prop->is_pending && !pending) { free(prop->pending.data); RRInitProviderPropertyValue(&prop->pending); } prop->is_pending = pending; prop->range = range; prop->immutable = immutable; prop->num_valid = num_values; free(prop->valid_values); prop->valid_values = new_values; if (add) { prop->next = provider->properties; provider->properties = prop; } return Success; } int ProcRRListProviderProperties(ClientPtr client) { REQUEST(xRRListProviderPropertiesReq); Atom *pAtoms = NULL, *temppAtoms; xRRListProviderPropertiesReply rep; int numProps = 0; RRProviderPtr provider; RRPropertyPtr prop; REQUEST_SIZE_MATCH(xRRListProviderPropertiesReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); for (prop = provider->properties; prop; prop = prop->next) numProps++; if (numProps) if (!(pAtoms = xallocarray(numProps, sizeof(Atom)))) return BadAlloc; rep = (xRRListProviderPropertiesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(numProps * sizeof(Atom)), .nAtoms = numProps }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.nAtoms); } temppAtoms = pAtoms; for (prop = provider->properties; prop; prop = prop->next) *temppAtoms++ = prop->propertyName; WriteToClient(client, sizeof(xRRListProviderPropertiesReply), (char *) &rep); if (numProps) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); free(pAtoms); } return Success; } int ProcRRQueryProviderProperty(ClientPtr client) { REQUEST(xRRQueryProviderPropertyReq); xRRQueryProviderPropertyReply rep; RRProviderPtr provider; RRPropertyPtr prop; char *extra = NULL; REQUEST_SIZE_MATCH(xRRQueryProviderPropertyReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); prop = RRQueryProviderProperty(provider, stuff->property); if (!prop) return BadName; if (prop->num_valid) { extra = xallocarray(prop->num_valid, sizeof(INT32)); if (!extra) return BadAlloc; } rep = (xRRQueryProviderPropertyReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = prop->num_valid, .pending = prop->is_pending, .range = prop->range, .immutable = prop->immutable }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xRRQueryProviderPropertyReply), (char *) &rep); if (prop->num_valid) { memcpy(extra, prop->valid_values, prop->num_valid * sizeof(INT32)); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32), extra); free(extra); } return Success; } int ProcRRConfigureProviderProperty(ClientPtr client) { REQUEST(xRRConfigureProviderPropertyReq); RRProviderPtr provider; int num_valid; REQUEST_AT_LEAST_SIZE(xRRConfigureProviderPropertyReq); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); num_valid = stuff->length - bytes_to_int32(sizeof(xRRConfigureProviderPropertyReq)); return RRConfigureProviderProperty(provider, stuff->property, stuff->pending, stuff->range, FALSE, num_valid, (INT32 *) (stuff + 1)); } int ProcRRChangeProviderProperty(ClientPtr client) { REQUEST(xRRChangeProviderPropertyReq); RRProviderPtr provider; char format, mode; unsigned long len; int sizeInBytes; uint64_t totalSize; int err; REQUEST_AT_LEAST_SIZE(xRRChangeProviderPropertyReq); UpdateCurrentTime(); format = stuff->format; mode = stuff->mode; if ((mode != PropModeReplace) && (mode != PropModeAppend) && (mode != PropModePrepend)) { client->errorValue = mode; return BadValue; } if ((format != 8) && (format != 16) && (format != 32)) { client->errorValue = format; return BadValue; } len = stuff->nUnits; if (len > bytes_to_int32((0xffffffff - sizeof(xChangePropertyReq)))) return BadLength; sizeInBytes = format >> 3; totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xRRChangeProviderPropertyReq, totalSize); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if (!ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } err = RRChangeProviderProperty(provider, stuff->property, stuff->type, (int) format, (int) mode, len, (void *) &stuff[1], TRUE, TRUE); if (err != Success) return err; else return Success; } int ProcRRDeleteProviderProperty(ClientPtr client) { REQUEST(xRRDeleteProviderPropertyReq); RRProviderPtr provider; RRPropertyPtr prop; REQUEST_SIZE_MATCH(xRRDeleteProviderPropertyReq); UpdateCurrentTime(); VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } prop = RRQueryProviderProperty(provider, stuff->property); if (!prop) { client->errorValue = stuff->property; return BadName; } if (prop->immutable) { client->errorValue = stuff->property; return BadAccess; } RRDeleteProviderProperty(provider, stuff->property); return Success; } int ProcRRGetProviderProperty(ClientPtr client) { REQUEST(xRRGetProviderPropertyReq); RRPropertyPtr prop, *prev; RRPropertyValuePtr prop_value; unsigned long n, len, ind; RRProviderPtr provider; xRRGetProviderPropertyReply reply = { .type = X_Reply, .sequenceNumber = client->sequence }; char *extra = NULL; REQUEST_SIZE_MATCH(xRRGetProviderPropertyReq); if (stuff->delete) UpdateCurrentTime(); VERIFY_RR_PROVIDER(stuff->provider, provider, stuff->delete ? DixWriteAccess : DixReadAccess); if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { client->errorValue = stuff->delete; return BadValue; } if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { client->errorValue = stuff->type; return BadAtom; } for (prev = &provider->properties; (prop = *prev); prev = &prop->next) if (prop->propertyName == stuff->property) break; if (!prop) { reply.nItems = 0; reply.length = 0; reply.bytesAfter = 0; reply.propertyType = None; reply.format = 0; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xRRGetProviderPropertyReply), &reply); return Success; } if (prop->immutable && stuff->delete) return BadAccess; prop_value = RRGetProviderProperty(provider, stuff->property, stuff->pending); if (!prop_value) return BadAtom; /* If the request type and actual type don't match. Return the property information, but not the data. */ if (((stuff->type != prop_value->type) && (stuff->type != AnyPropertyType)) ) { reply.bytesAfter = prop_value->size; reply.format = prop_value->format; reply.length = 0; reply.nItems = 0; reply.propertyType = prop_value->type; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xRRGetProviderPropertyReply), &reply); return Success; } /* * Return type, format, value to client */ n = (prop_value->format / 8) * prop_value->size; /* size (bytes) of prop */ ind = stuff->longOffset << 2; /* If longOffset is invalid such that it causes "len" to be negative, it's a value error. */ if (n < ind) { client->errorValue = stuff->longOffset; return BadValue; } len = min(n - ind, 4 * stuff->longLength); if (len) { extra = malloc(len); if (!extra) return BadAlloc; } reply.bytesAfter = n - (ind + len); reply.format = prop_value->format; reply.length = bytes_to_int32(len); if (prop_value->format) reply.nItems = len / (prop_value->format / 8); else reply.nItems = 0; reply.propertyType = prop_value->type; if (stuff->delete && (reply.bytesAfter == 0)) { xRRProviderPropertyNotifyEvent event = { .type = RREventBase + RRNotify, .subCode = RRNotify_ProviderProperty, .provider = provider->id, .state = PropertyDelete, .atom = prop->propertyName, .timestamp = currentTime.milliseconds }; RRDeliverPropertyEvent(provider->pScreen, (xEvent *) &event); } if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.propertyType); swapl(&reply.bytesAfter); swapl(&reply.nItems); } WriteToClient(client, sizeof(xGenericReply), &reply); if (len) { memcpy(extra, (char *) prop_value->data + ind, len); switch (reply.format) { case 32: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } WriteSwappedDataToClient(client, len, extra); free(extra); } if (stuff->delete && (reply.bytesAfter == 0)) { /* delete the Property */ *prev = prop->next; RRDestroyProviderProperty(prop); } return Success; } xorg-server-21.1.16/randr/rrscreen.c0000644000175000017500000010350614757411105012735 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" static CARD16 RR10CurrentSizeID(ScreenPtr pScreen); /* * Edit connection information block so that new clients * see the current screen size on connect */ static void RREditConnectionInfo(ScreenPtr pScreen) { xConnSetup *connSetup; char *vendor; xPixmapFormat *formats; xWindowRoot *root; xDepth *depth; xVisualType *visual; int screen = 0; int d; if (ConnectionInfo == NULL) return; connSetup = (xConnSetup *) ConnectionInfo; vendor = (char *) connSetup + sizeof(xConnSetup); formats = (xPixmapFormat *) ((char *) vendor + pad_to_int32(connSetup->nbytesVendor)); root = (xWindowRoot *) ((char *) formats + sizeof(xPixmapFormat) * screenInfo.numPixmapFormats); while (screen != pScreen->myNum) { depth = (xDepth *) ((char *) root + sizeof(xWindowRoot)); for (d = 0; d < root->nDepths; d++) { visual = (xVisualType *) ((char *) depth + sizeof(xDepth)); depth = (xDepth *) ((char *) visual + depth->nVisuals * sizeof(xVisualType)); } root = (xWindowRoot *) ((char *) depth); screen++; } root->pixWidth = pScreen->width; root->pixHeight = pScreen->height; root->mmWidth = pScreen->mmWidth; root->mmHeight = pScreen->mmHeight; } void RRSendConfigNotify(ScreenPtr pScreen) { WindowPtr pWin = pScreen->root; xEvent event = { .u.configureNotify.window = pWin->drawable.id, .u.configureNotify.aboveSibling = None, .u.configureNotify.x = 0, .u.configureNotify.y = 0, /* XXX xinerama stuff ? */ .u.configureNotify.width = pWin->drawable.width, .u.configureNotify.height = pWin->drawable.height, .u.configureNotify.borderWidth = wBorderWidth(pWin), .u.configureNotify.override = pWin->overrideRedirect }; event.u.u.type = ConfigureNotify; DeliverEvents(pWin, &event, 1, NullWindow); } void RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen) { rrScrPriv(pScreen); RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL; WindowPtr pRoot = pScreen->root; xRRScreenChangeNotifyEvent se = { .type = RRScreenChangeNotify + RREventBase, .rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0), .timestamp = pScrPriv->lastSetTime.milliseconds, .configTimestamp = pScrPriv->lastConfigTime.milliseconds, .root = pRoot->drawable.id, .window = pWin->drawable.id, .subpixelOrder = PictureGetSubpixelOrder(pScreen), .sizeID = RR10CurrentSizeID(pScreen) }; if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) { se.widthInPixels = pScreen->height; se.heightInPixels = pScreen->width; se.widthInMillimeters = pScreen->mmHeight; se.heightInMillimeters = pScreen->mmWidth; } else { se.widthInPixels = pScreen->width; se.heightInPixels = pScreen->height; se.widthInMillimeters = pScreen->mmWidth; se.heightInMillimeters = pScreen->mmHeight; } WriteEventsToClient(client, 1, (xEvent *) &se); } /* * Notify the extension that the screen size has been changed. * The driver is responsible for calling this whenever it has changed * the size of the screen */ void RRScreenSizeNotify(ScreenPtr pScreen) { rrScrPriv(pScreen); /* * Deliver ConfigureNotify events when root changes * pixel size */ if (pScrPriv->width == pScreen->width && pScrPriv->height == pScreen->height && pScrPriv->mmWidth == pScreen->mmWidth && pScrPriv->mmHeight == pScreen->mmHeight) return; pScrPriv->width = pScreen->width; pScrPriv->height = pScreen->height; pScrPriv->mmWidth = pScreen->mmWidth; pScrPriv->mmHeight = pScreen->mmHeight; RRSetChanged(pScreen); /* pScrPriv->sizeChanged = TRUE; */ RRTellChanged(pScreen); RRSendConfigNotify(pScreen); RREditConnectionInfo(pScreen); RRPointerScreenConfigured(pScreen); /* * Fix pointer bounds and location */ ScreenRestructured(pScreen); } /* * Request that the screen be resized */ Bool RRScreenSizeSet(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { rrScrPriv(pScreen); #if RANDR_12_INTERFACE if (pScrPriv->rrScreenSetSize) { return (*pScrPriv->rrScreenSetSize) (pScreen, width, height, mmWidth, mmHeight); } #endif #if RANDR_10_INTERFACE if (pScrPriv->rrSetConfig) { return TRUE; /* can't set size separately */ } #endif return FALSE; } /* * Retrieve valid screen size range */ int ProcRRGetScreenSizeRange(ClientPtr client) { REQUEST(xRRGetScreenSizeRangeReq); xRRGetScreenSizeRangeReply rep; WindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; int rc; REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); rep = (xRRGetScreenSizeRangeReply) { .type = X_Reply, .pad = 0, .sequenceNumber = client->sequence, .length = 0 }; if (pScrPriv) { if (!RRGetInfo(pScreen, FALSE)) return BadAlloc; rep.minWidth = pScrPriv->minWidth; rep.minHeight = pScrPriv->minHeight; rep.maxWidth = pScrPriv->maxWidth; rep.maxHeight = pScrPriv->maxHeight; } else { rep.maxWidth = rep.minWidth = pScreen->width; rep.maxHeight = rep.minHeight = pScreen->height; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.minWidth); swaps(&rep.minHeight); swaps(&rep.maxWidth); swaps(&rep.maxHeight); } WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), &rep); return Success; } int ProcRRSetScreenSize(ClientPtr client) { REQUEST(xRRSetScreenSizeReq); WindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; int i, rc; REQUEST_SIZE_MATCH(xRRSetScreenSizeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); if (!pScrPriv) return BadMatch; if (stuff->width < pScrPriv->minWidth || pScrPriv->maxWidth < stuff->width) { client->errorValue = stuff->width; return BadValue; } if (stuff->height < pScrPriv->minHeight || pScrPriv->maxHeight < stuff->height) { client->errorValue = stuff->height; return BadValue; } for (i = 0; i < pScrPriv->numCrtcs; i++) { RRCrtcPtr crtc = pScrPriv->crtcs[i]; RRModePtr mode = crtc->mode; if (!RRCrtcIsLeased(crtc) && mode) { int source_width = mode->mode.width; int source_height = mode->mode.height; Rotation rotation = crtc->rotation; if (rotation & (RR_Rotate_90 | RR_Rotate_270)) { source_width = mode->mode.height; source_height = mode->mode.width; } if (crtc->x + source_width > stuff->width || crtc->y + source_height > stuff->height) return BadMatch; } } if (stuff->widthInMillimeters == 0 || stuff->heightInMillimeters == 0) { client->errorValue = 0; return BadValue; } if (!RRScreenSizeSet(pScreen, stuff->width, stuff->height, stuff->widthInMillimeters, stuff->heightInMillimeters)) { return BadMatch; } return Success; } #define update_totals(gpuscreen, pScrPriv) do { \ total_crtcs += pScrPriv->numCrtcs; \ total_outputs += pScrPriv->numOutputs; \ modes = RRModesForScreen(gpuscreen, &num_modes); \ if (!modes) \ return BadAlloc; \ for (j = 0; j < num_modes; j++) \ total_name_len += modes[j]->mode.nameLength; \ total_modes += num_modes; \ free(modes); \ } while(0) static inline void swap_modeinfos(xRRModeInfo *modeinfos, int i) { swapl(&modeinfos[i].id); swaps(&modeinfos[i].width); swaps(&modeinfos[i].height); swapl(&modeinfos[i].dotClock); swaps(&modeinfos[i].hSyncStart); swaps(&modeinfos[i].hSyncEnd); swaps(&modeinfos[i].hTotal); swaps(&modeinfos[i].hSkew); swaps(&modeinfos[i].vSyncStart); swaps(&modeinfos[i].vSyncEnd); swaps(&modeinfos[i].vTotal); swaps(&modeinfos[i].nameLength); swapl(&modeinfos[i].modeFlags); } #define update_arrays(gpuscreen, pScrPriv, primary_crtc, has_primary) do { \ for (j = 0; j < pScrPriv->numCrtcs; j++) { \ if (has_primary && \ primary_crtc == pScrPriv->crtcs[j]) { \ has_primary = 0; \ continue; \ }\ crtcs[crtc_count] = pScrPriv->crtcs[j]->id; \ if (client->swapped) \ swapl(&crtcs[crtc_count]); \ crtc_count++; \ } \ for (j = 0; j < pScrPriv->numOutputs; j++) { \ outputs[output_count] = pScrPriv->outputs[j]->id; \ if (client->swapped) \ swapl(&outputs[output_count]); \ output_count++; \ } \ { \ RRModePtr mode; \ modes = RRModesForScreen(gpuscreen, &num_modes); \ for (j = 0; j < num_modes; j++) { \ mode = modes[j]; \ modeinfos[mode_count] = mode->mode; \ if (client->swapped) { \ swap_modeinfos(modeinfos, mode_count); \ } \ memcpy(names, mode->name, mode->mode.nameLength); \ names += mode->mode.nameLength; \ mode_count++; \ } \ free(modes); \ } \ } while (0) static int rrGetMultiScreenResources(ClientPtr client, Bool query, ScreenPtr pScreen) { int j; int total_crtcs, total_outputs, total_modes, total_name_len; int crtc_count, output_count, mode_count; ScreenPtr iter; rrScrPrivPtr pScrPriv; int num_modes; RRModePtr *modes; xRRGetScreenResourcesReply rep; unsigned long extraLen; CARD8 *extra; RRCrtc *crtcs; RRCrtcPtr primary_crtc = NULL; RROutput *outputs; xRRModeInfo *modeinfos; CARD8 *names; int has_primary = 0; /* we need to iterate all the GPU primarys and all their output secondarys */ total_crtcs = 0; total_outputs = 0; total_modes = 0; total_name_len = 0; pScrPriv = rrGetScrPriv(pScreen); if (query && pScrPriv) if (!RRGetInfo(pScreen, query)) return BadAlloc; update_totals(pScreen, pScrPriv); xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { if (!iter->is_output_secondary) continue; pScrPriv = rrGetScrPriv(iter); if (query) if (!RRGetInfo(iter, query)) return BadAlloc; update_totals(iter, pScrPriv); } pScrPriv = rrGetScrPriv(pScreen); rep = (xRRGetScreenResourcesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .timestamp = pScrPriv->lastSetTime.milliseconds, .configTimestamp = pScrPriv->lastConfigTime.milliseconds, .nCrtcs = total_crtcs, .nOutputs = total_outputs, .nModes = total_modes, .nbytesNames = total_name_len }; rep.length = (total_crtcs + total_outputs + total_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) + bytes_to_int32(total_name_len)); extraLen = rep.length << 2; if (extraLen) { extra = malloc(extraLen); if (!extra) { return BadAlloc; } } else extra = NULL; crtcs = (RRCrtc *)extra; outputs = (RROutput *)(crtcs + total_crtcs); modeinfos = (xRRModeInfo *)(outputs + total_outputs); names = (CARD8 *)(modeinfos + total_modes); crtc_count = 0; output_count = 0; mode_count = 0; pScrPriv = rrGetScrPriv(pScreen); if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) { has_primary = 1; primary_crtc = pScrPriv->primaryOutput->crtc; crtcs[0] = pScrPriv->primaryOutput->crtc->id; if (client->swapped) swapl(&crtcs[0]); crtc_count = 1; } update_arrays(pScreen, pScrPriv, primary_crtc, has_primary); xorg_list_for_each_entry(iter, &pScreen->secondary_list, secondary_head) { if (!iter->is_output_secondary) continue; pScrPriv = rrGetScrPriv(iter); update_arrays(iter, pScrPriv, primary_crtc, has_primary); } assert(bytes_to_int32((char *) names - (char *) extra) == rep.length); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swapl(&rep.configTimestamp); swaps(&rep.nCrtcs); swaps(&rep.nOutputs); swaps(&rep.nModes); swaps(&rep.nbytesNames); } WriteToClient(client, sizeof(xRRGetScreenResourcesReply), &rep); if (extraLen) { WriteToClient(client, extraLen, extra); free(extra); } return Success; } static int rrGetScreenResources(ClientPtr client, Bool query) { REQUEST(xRRGetScreenResourcesReq); xRRGetScreenResourcesReply rep; WindowPtr pWin; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; CARD8 *extra; unsigned long extraLen; int i, rc, has_primary = 0; RRCrtc *crtcs; RROutput *outputs; xRRModeInfo *modeinfos; CARD8 *names; REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); if (query && pScrPriv) if (!RRGetInfo(pScreen, query)) return BadAlloc; if (pScreen->output_secondarys) return rrGetMultiScreenResources(client, query, pScreen); if (!pScrPriv) { rep = (xRRGetScreenResourcesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .timestamp = currentTime.milliseconds, .configTimestamp = currentTime.milliseconds, .nCrtcs = 0, .nOutputs = 0, .nModes = 0, .nbytesNames = 0 }; extra = NULL; extraLen = 0; } else { RRModePtr *modes; int num_modes; modes = RRModesForScreen(pScreen, &num_modes); if (!modes) return BadAlloc; rep = (xRRGetScreenResourcesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .timestamp = pScrPriv->lastSetTime.milliseconds, .configTimestamp = pScrPriv->lastConfigTime.milliseconds, .nCrtcs = pScrPriv->numCrtcs, .nOutputs = pScrPriv->numOutputs, .nModes = num_modes, .nbytesNames = 0 }; for (i = 0; i < num_modes; i++) rep.nbytesNames += modes[i]->mode.nameLength; rep.length = (pScrPriv->numCrtcs + pScrPriv->numOutputs + num_modes * bytes_to_int32(SIZEOF(xRRModeInfo)) + bytes_to_int32(rep.nbytesNames)); extraLen = rep.length << 2; if (extraLen) { extra = calloc(1, extraLen); if (!extra) { free(modes); return BadAlloc; } } else extra = NULL; crtcs = (RRCrtc *) extra; outputs = (RROutput *) (crtcs + pScrPriv->numCrtcs); modeinfos = (xRRModeInfo *) (outputs + pScrPriv->numOutputs); names = (CARD8 *) (modeinfos + num_modes); if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc) { has_primary = 1; crtcs[0] = pScrPriv->primaryOutput->crtc->id; if (client->swapped) swapl(&crtcs[0]); } for (i = 0; i < pScrPriv->numCrtcs; i++) { if (has_primary && pScrPriv->primaryOutput->crtc == pScrPriv->crtcs[i]) { has_primary = 0; continue; } crtcs[i + has_primary] = pScrPriv->crtcs[i]->id; if (client->swapped) swapl(&crtcs[i + has_primary]); } for (i = 0; i < pScrPriv->numOutputs; i++) { outputs[i] = pScrPriv->outputs[i]->id; if (client->swapped) swapl(&outputs[i]); } for (i = 0; i < num_modes; i++) { RRModePtr mode = modes[i]; modeinfos[i] = mode->mode; if (client->swapped) { swapl(&modeinfos[i].id); swaps(&modeinfos[i].width); swaps(&modeinfos[i].height); swapl(&modeinfos[i].dotClock); swaps(&modeinfos[i].hSyncStart); swaps(&modeinfos[i].hSyncEnd); swaps(&modeinfos[i].hTotal); swaps(&modeinfos[i].hSkew); swaps(&modeinfos[i].vSyncStart); swaps(&modeinfos[i].vSyncEnd); swaps(&modeinfos[i].vTotal); swaps(&modeinfos[i].nameLength); swapl(&modeinfos[i].modeFlags); } memcpy(names, mode->name, mode->mode.nameLength); names += mode->mode.nameLength; } free(modes); assert(bytes_to_int32((char *) names - (char *) extra) == rep.length); } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swapl(&rep.configTimestamp); swaps(&rep.nCrtcs); swaps(&rep.nOutputs); swaps(&rep.nModes); swaps(&rep.nbytesNames); } WriteToClient(client, sizeof(xRRGetScreenResourcesReply), (char *) &rep); if (extraLen) { WriteToClient(client, extraLen, (char *) extra); free(extra); } return Success; } int ProcRRGetScreenResources(ClientPtr client) { return rrGetScreenResources(client, TRUE); } int ProcRRGetScreenResourcesCurrent(ClientPtr client) { return rrGetScreenResources(client, FALSE); } typedef struct _RR10Data { RRScreenSizePtr sizes; int nsize; int nrefresh; int size; CARD16 refresh; } RR10DataRec, *RR10DataPtr; /* * Convert 1.2 monitor data into 1.0 screen data */ static RR10DataPtr RR10GetData(ScreenPtr pScreen, RROutputPtr output) { RR10DataPtr data; RRScreenSizePtr size; int nmode = output->numModes + output->numUserModes; int o, os, l, r; RRScreenRatePtr refresh; CARD16 vRefresh; RRModePtr mode; Bool *used; /* Make sure there is plenty of space for any combination */ data = malloc(sizeof(RR10DataRec) + sizeof(RRScreenSize) * nmode + sizeof(RRScreenRate) * nmode + sizeof(Bool) * nmode); if (!data) return NULL; size = (RRScreenSizePtr) (data + 1); refresh = (RRScreenRatePtr) (size + nmode); used = (Bool *) (refresh + nmode); memset(used, '\0', sizeof(Bool) * nmode); data->sizes = size; data->nsize = 0; data->nrefresh = 0; data->size = 0; data->refresh = 0; /* * find modes not yet listed */ for (o = 0; o < output->numModes + output->numUserModes; o++) { if (used[o]) continue; if (o < output->numModes) mode = output->modes[o]; else mode = output->userModes[o - output->numModes]; l = data->nsize; size[l].id = data->nsize; size[l].width = mode->mode.width; size[l].height = mode->mode.height; if (output->mmWidth && output->mmHeight) { size[l].mmWidth = output->mmWidth; size[l].mmHeight = output->mmHeight; } else { size[l].mmWidth = pScreen->mmWidth; size[l].mmHeight = pScreen->mmHeight; } size[l].nRates = 0; size[l].pRates = &refresh[data->nrefresh]; data->nsize++; /* * Find all modes with matching size */ for (os = o; os < output->numModes + output->numUserModes; os++) { if (os < output->numModes) mode = output->modes[os]; else mode = output->userModes[os - output->numModes]; if (mode->mode.width == size[l].width && mode->mode.height == size[l].height) { vRefresh = RRVerticalRefresh(&mode->mode); used[os] = TRUE; for (r = 0; r < size[l].nRates; r++) if (vRefresh == size[l].pRates[r].rate) break; if (r == size[l].nRates) { size[l].pRates[r].rate = vRefresh; size[l].pRates[r].mode = mode; size[l].nRates++; data->nrefresh++; } if (mode == output->crtc->mode) { data->size = l; data->refresh = vRefresh; } } } } return data; } int ProcRRGetScreenInfo(ClientPtr client) { REQUEST(xRRGetScreenInfoReq); xRRGetScreenInfoReply rep; WindowPtr pWin; int rc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; CARD8 *extra; unsigned long extraLen; RROutputPtr output; REQUEST_SIZE_MATCH(xRRGetScreenInfoReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); if (pScrPriv) if (!RRGetInfo(pScreen, TRUE)) return BadAlloc; output = RRFirstOutput(pScreen); if (!pScrPriv || !output) { rep = (xRRGetScreenInfoReply) { .type = X_Reply, .setOfRotations = RR_Rotate_0, .sequenceNumber = client->sequence, .length = 0, .root = pWin->drawable.pScreen->root->drawable.id, .timestamp = currentTime.milliseconds, .configTimestamp = currentTime.milliseconds, .nSizes = 0, .sizeID = 0, .rotation = RR_Rotate_0, .rate = 0, .nrateEnts = 0 }; extra = 0; extraLen = 0; } else { int i, j; xScreenSizes *size; CARD16 *rates; CARD8 *data8; Bool has_rate = RRClientKnowsRates(client); RR10DataPtr pData; RRScreenSizePtr pSize; pData = RR10GetData(pScreen, output); if (!pData) return BadAlloc; rep = (xRRGetScreenInfoReply) { .type = X_Reply, .setOfRotations = output->crtc->rotations, .sequenceNumber = client->sequence, .length = 0, .root = pWin->drawable.pScreen->root->drawable.id, .timestamp = pScrPriv->lastSetTime.milliseconds, .configTimestamp = pScrPriv->lastConfigTime.milliseconds, .rotation = output->crtc->rotation, .nSizes = pData->nsize, .nrateEnts = pData->nrefresh + pData->nsize, .sizeID = pData->size, .rate = pData->refresh }; extraLen = rep.nSizes * sizeof(xScreenSizes); if (has_rate) extraLen += rep.nrateEnts * sizeof(CARD16); if (extraLen) { extra = (CARD8 *) malloc(extraLen); if (!extra) { free(pData); return BadAlloc; } } else extra = NULL; /* * First comes the size information */ size = (xScreenSizes *) extra; rates = (CARD16 *) (size + rep.nSizes); for (i = 0; i < pData->nsize; i++) { pSize = &pData->sizes[i]; size->widthInPixels = pSize->width; size->heightInPixels = pSize->height; size->widthInMillimeters = pSize->mmWidth; size->heightInMillimeters = pSize->mmHeight; if (client->swapped) { swaps(&size->widthInPixels); swaps(&size->heightInPixels); swaps(&size->widthInMillimeters); swaps(&size->heightInMillimeters); } size++; if (has_rate) { *rates = pSize->nRates; if (client->swapped) { swaps(rates); } rates++; for (j = 0; j < pSize->nRates; j++) { *rates = pSize->pRates[j].rate; if (client->swapped) { swaps(rates); } rates++; } } } free(pData); data8 = (CARD8 *) rates; if (data8 - (CARD8 *) extra != extraLen) FatalError("RRGetScreenInfo bad extra len %ld != %ld\n", (unsigned long) (data8 - (CARD8 *) extra), extraLen); rep.length = bytes_to_int32(extraLen); } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.timestamp); swapl(&rep.configTimestamp); swaps(&rep.rotation); swaps(&rep.nSizes); swaps(&rep.sizeID); swaps(&rep.rate); swaps(&rep.nrateEnts); } WriteToClient(client, sizeof(xRRGetScreenInfoReply), &rep); if (extraLen) { WriteToClient(client, extraLen, extra); free(extra); } return Success; } int ProcRRSetScreenConfig(ClientPtr client) { REQUEST(xRRSetScreenConfigReq); xRRSetScreenConfigReply rep; DrawablePtr pDraw; int rc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; TimeStamp time; int i; Rotation rotation; int rate; Bool has_rate; CARD8 status; RROutputPtr output; RRCrtcPtr crtc; RRModePtr mode; RR10DataPtr pData = NULL; RRScreenSizePtr pSize; int width, height; UpdateCurrentTime(); if (RRClientKnowsRates(client)) { REQUEST_SIZE_MATCH(xRRSetScreenConfigReq); has_rate = TRUE; } else { REQUEST_SIZE_MATCH(xRR1_0SetScreenConfigReq); has_rate = FALSE; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); if (rc != Success) return rc; pScreen = pDraw->pScreen; pScrPriv = rrGetScrPriv(pScreen); time = ClientTimeToServerTime(stuff->timestamp); if (!pScrPriv) { time = currentTime; status = RRSetConfigFailed; goto sendReply; } if (!RRGetInfo(pScreen, FALSE)) return BadAlloc; output = RRFirstOutput(pScreen); if (!output) { time = currentTime; status = RRSetConfigFailed; goto sendReply; } crtc = output->crtc; /* * If the client's config timestamp is not the same as the last config * timestamp, then the config information isn't up-to-date and * can't even be validated. * * Note that the client only knows about the milliseconds part of the * timestamp, so using CompareTimeStamps here would cause randr to suddenly * stop working after several hours have passed (freedesktop bug #6502). */ if (stuff->configTimestamp != pScrPriv->lastConfigTime.milliseconds) { status = RRSetConfigInvalidConfigTime; goto sendReply; } pData = RR10GetData(pScreen, output); if (!pData) return BadAlloc; if (stuff->sizeID >= pData->nsize) { /* * Invalid size ID */ client->errorValue = stuff->sizeID; free(pData); return BadValue; } pSize = &pData->sizes[stuff->sizeID]; /* * Validate requested rotation */ rotation = (Rotation) stuff->rotation; /* test the rotation bits only! */ switch (rotation & 0xf) { case RR_Rotate_0: case RR_Rotate_90: case RR_Rotate_180: case RR_Rotate_270: break; default: /* * Invalid rotation */ client->errorValue = stuff->rotation; free(pData); return BadValue; } if ((~crtc->rotations) & rotation) { /* * requested rotation or reflection not supported by screen */ client->errorValue = stuff->rotation; free(pData); return BadMatch; } /* * Validate requested refresh */ if (has_rate) rate = (int) stuff->rate; else rate = 0; if (rate) { for (i = 0; i < pSize->nRates; i++) { if (pSize->pRates[i].rate == rate) break; } if (i == pSize->nRates) { /* * Invalid rate */ client->errorValue = rate; free(pData); return BadValue; } mode = pSize->pRates[i].mode; } else mode = pSize->pRates[0].mode; /* * Make sure the requested set-time is not older than * the last set-time */ if (CompareTimeStamps(time, pScrPriv->lastSetTime) < 0) { status = RRSetConfigInvalidTime; goto sendReply; } /* * If the screen size is changing, adjust all of the other outputs * to fit the new size, mirroring as much as possible */ width = mode->mode.width; height = mode->mode.height; if (width < pScrPriv->minWidth || pScrPriv->maxWidth < width) { client->errorValue = width; free(pData); return BadValue; } if (height < pScrPriv->minHeight || pScrPriv->maxHeight < height) { client->errorValue = height; free(pData); return BadValue; } if (rotation & (RR_Rotate_90 | RR_Rotate_270)) { width = mode->mode.height; height = mode->mode.width; } if (width != pScreen->width || height != pScreen->height) { int c; for (c = 0; c < pScrPriv->numCrtcs; c++) { if (!RRCrtcSet(pScrPriv->crtcs[c], NULL, 0, 0, RR_Rotate_0, 0, NULL)) { status = RRSetConfigFailed; /* XXX recover from failure */ goto sendReply; } } if (!RRScreenSizeSet(pScreen, width, height, pScreen->mmWidth, pScreen->mmHeight)) { status = RRSetConfigFailed; /* XXX recover from failure */ goto sendReply; } } if (!RRCrtcSet(crtc, mode, 0, 0, stuff->rotation, 1, &output)) status = RRSetConfigFailed; else { pScrPriv->lastSetTime = time; status = RRSetConfigSuccess; } /* * XXX Configure other crtcs to mirror as much as possible */ sendReply: free(pData); rep = (xRRSetScreenConfigReply) { .type = X_Reply, .status = status, .sequenceNumber = client->sequence, .length = 0, .newTimestamp = pScrPriv->lastSetTime.milliseconds, .newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds, .root = pDraw->pScreen->root->drawable.id, /* .subpixelOrder = ?? */ }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.newTimestamp); swapl(&rep.newConfigTimestamp); swapl(&rep.root); } WriteToClient(client, sizeof(xRRSetScreenConfigReply), &rep); return Success; } static CARD16 RR10CurrentSizeID(ScreenPtr pScreen) { CARD16 sizeID = 0xffff; RROutputPtr output = RRFirstOutput(pScreen); if (output) { RR10DataPtr data = RR10GetData(pScreen, output); if (data) { int i; for (i = 0; i < data->nsize; i++) if (data->sizes[i].width == pScreen->width && data->sizes[i].height == pScreen->height) { sizeID = (CARD16) i; break; } free(data); } } return sizeID; } xorg-server-21.1.16/randr/rrsdispatch.c0000644000175000017500000004526714757411105013451 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" static int _X_COLD SProcRRQueryVersion(ClientPtr client) { REQUEST(xRRQueryVersionReq); REQUEST_SIZE_MATCH(xRRQueryVersionReq); swaps(&stuff->length); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetScreenInfo(ClientPtr client) { REQUEST(xRRGetScreenInfoReq); REQUEST_SIZE_MATCH(xRRGetScreenInfoReq); swaps(&stuff->length); swapl(&stuff->window); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetScreenConfig(ClientPtr client) { REQUEST(xRRSetScreenConfigReq); if (RRClientKnowsRates(client)) { REQUEST_SIZE_MATCH(xRRSetScreenConfigReq); swaps(&stuff->rate); } else { REQUEST_SIZE_MATCH(xRR1_0SetScreenConfigReq); } swaps(&stuff->length); swapl(&stuff->drawable); swapl(&stuff->timestamp); swaps(&stuff->sizeID); swaps(&stuff->rotation); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSelectInput(ClientPtr client) { REQUEST(xRRSelectInputReq); REQUEST_SIZE_MATCH(xRRSelectInputReq); swaps(&stuff->length); swapl(&stuff->window); swaps(&stuff->enable); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetScreenSizeRange(ClientPtr client) { REQUEST(xRRGetScreenSizeRangeReq); REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq); swaps(&stuff->length); swapl(&stuff->window); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetScreenSize(ClientPtr client) { REQUEST(xRRSetScreenSizeReq); REQUEST_SIZE_MATCH(xRRSetScreenSizeReq); swaps(&stuff->length); swapl(&stuff->window); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->widthInMillimeters); swapl(&stuff->heightInMillimeters); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetScreenResources(ClientPtr client) { REQUEST(xRRGetScreenResourcesReq); REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq); swaps(&stuff->length); swapl(&stuff->window); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetOutputInfo(ClientPtr client) { REQUEST(xRRGetOutputInfoReq); REQUEST_SIZE_MATCH(xRRGetOutputInfoReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->configTimestamp); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRListOutputProperties(ClientPtr client) { REQUEST(xRRListOutputPropertiesReq); REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq); swaps(&stuff->length); swapl(&stuff->output); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRQueryOutputProperty(ClientPtr client) { REQUEST(xRRQueryOutputPropertyReq); REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->property); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRConfigureOutputProperty(ClientPtr client) { REQUEST(xRRConfigureOutputPropertyReq); REQUEST_AT_LEAST_SIZE(xRRConfigureOutputPropertyReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->property); SwapRestL(stuff); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRChangeOutputProperty(ClientPtr client) { REQUEST(xRRChangeOutputPropertyReq); REQUEST_AT_LEAST_SIZE(xRRChangeOutputPropertyReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->nUnits); switch (stuff->format) { case 8: break; case 16: SwapRestS(stuff); break; case 32: SwapRestL(stuff); break; default: client->errorValue = stuff->format; return BadValue; } return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRDeleteOutputProperty(ClientPtr client) { REQUEST(xRRDeleteOutputPropertyReq); REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->property); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetOutputProperty(ClientPtr client) { REQUEST(xRRGetOutputPropertyReq); REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->longOffset); swapl(&stuff->longLength); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRCreateMode(ClientPtr client) { xRRModeInfo *modeinfo; REQUEST(xRRCreateModeReq); REQUEST_AT_LEAST_SIZE(xRRCreateModeReq); swaps(&stuff->length); swapl(&stuff->window); modeinfo = &stuff->modeInfo; swapl(&modeinfo->id); swaps(&modeinfo->width); swaps(&modeinfo->height); swapl(&modeinfo->dotClock); swaps(&modeinfo->hSyncStart); swaps(&modeinfo->hSyncEnd); swaps(&modeinfo->hTotal); swaps(&modeinfo->vSyncStart); swaps(&modeinfo->vSyncEnd); swaps(&modeinfo->vTotal); swaps(&modeinfo->nameLength); swapl(&modeinfo->modeFlags); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRDestroyMode(ClientPtr client) { REQUEST(xRRDestroyModeReq); REQUEST_SIZE_MATCH(xRRDestroyModeReq); swaps(&stuff->length); swapl(&stuff->mode); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRAddOutputMode(ClientPtr client) { REQUEST(xRRAddOutputModeReq); REQUEST_SIZE_MATCH(xRRAddOutputModeReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->mode); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRDeleteOutputMode(ClientPtr client) { REQUEST(xRRDeleteOutputModeReq); REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq); swaps(&stuff->length); swapl(&stuff->output); swapl(&stuff->mode); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetCrtcInfo(ClientPtr client) { REQUEST(xRRGetCrtcInfoReq); REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq); swaps(&stuff->length); swapl(&stuff->crtc); swapl(&stuff->configTimestamp); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetCrtcConfig(ClientPtr client) { REQUEST(xRRSetCrtcConfigReq); REQUEST_AT_LEAST_SIZE(xRRSetCrtcConfigReq); swaps(&stuff->length); swapl(&stuff->crtc); swapl(&stuff->timestamp); swapl(&stuff->configTimestamp); swaps(&stuff->x); swaps(&stuff->y); swapl(&stuff->mode); swaps(&stuff->rotation); SwapRestL(stuff); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetCrtcGammaSize(ClientPtr client) { REQUEST(xRRGetCrtcGammaSizeReq); REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq); swaps(&stuff->length); swapl(&stuff->crtc); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetCrtcGamma(ClientPtr client) { REQUEST(xRRGetCrtcGammaReq); REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq); swaps(&stuff->length); swapl(&stuff->crtc); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetCrtcGamma(ClientPtr client) { REQUEST(xRRSetCrtcGammaReq); REQUEST_AT_LEAST_SIZE(xRRSetCrtcGammaReq); swaps(&stuff->length); swapl(&stuff->crtc); swaps(&stuff->size); SwapRestS(stuff); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetCrtcTransform(ClientPtr client) { int nparams; char *filter; CARD32 *params; REQUEST(xRRSetCrtcTransformReq); REQUEST_AT_LEAST_SIZE(xRRSetCrtcTransformReq); swaps(&stuff->length); swapl(&stuff->crtc); SwapLongs((CARD32 *) &stuff->transform, bytes_to_int32(sizeof(xRenderTransform))); swaps(&stuff->nbytesFilter); filter = (char *) (stuff + 1); params = (CARD32 *) (filter + pad_to_int32(stuff->nbytesFilter)); nparams = ((CARD32 *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; SwapLongs(params, nparams); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetCrtcTransform(ClientPtr client) { REQUEST(xRRGetCrtcTransformReq); REQUEST_SIZE_MATCH(xRRGetCrtcTransformReq); swaps(&stuff->length); swapl(&stuff->crtc); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRGetPanning(ClientPtr client) { REQUEST(xRRGetPanningReq); REQUEST_SIZE_MATCH(xRRGetPanningReq); swaps(&stuff->length); swapl(&stuff->crtc); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetPanning(ClientPtr client) { REQUEST(xRRSetPanningReq); REQUEST_SIZE_MATCH(xRRSetPanningReq); swaps(&stuff->length); swapl(&stuff->crtc); swapl(&stuff->timestamp); swaps(&stuff->left); swaps(&stuff->top); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->track_left); swaps(&stuff->track_top); swaps(&stuff->track_width); swaps(&stuff->track_height); swaps(&stuff->border_left); swaps(&stuff->border_top); swaps(&stuff->border_right); swaps(&stuff->border_bottom); return (*ProcRandrVector[stuff->randrReqType]) (client); } static int _X_COLD SProcRRSetOutputPrimary(ClientPtr client) { REQUEST(xRRSetOutputPrimaryReq); REQUEST_SIZE_MATCH(xRRSetOutputPrimaryReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->output); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRGetOutputPrimary(ClientPtr client) { REQUEST(xRRGetOutputPrimaryReq); REQUEST_SIZE_MATCH(xRRGetOutputPrimaryReq); swaps(&stuff->length); swapl(&stuff->window); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRGetProviders(ClientPtr client) { REQUEST(xRRGetProvidersReq); REQUEST_SIZE_MATCH(xRRGetProvidersReq); swaps(&stuff->length); swapl(&stuff->window); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRGetProviderInfo(ClientPtr client) { REQUEST(xRRGetProviderInfoReq); REQUEST_SIZE_MATCH(xRRGetProviderInfoReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->configTimestamp); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRSetProviderOffloadSink(ClientPtr client) { REQUEST(xRRSetProviderOffloadSinkReq); REQUEST_SIZE_MATCH(xRRSetProviderOffloadSinkReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->sink_provider); swapl(&stuff->configTimestamp); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRSetProviderOutputSource(ClientPtr client) { REQUEST(xRRSetProviderOutputSourceReq); REQUEST_SIZE_MATCH(xRRSetProviderOutputSourceReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->source_provider); swapl(&stuff->configTimestamp); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRListProviderProperties(ClientPtr client) { REQUEST(xRRListProviderPropertiesReq); REQUEST_SIZE_MATCH(xRRListProviderPropertiesReq); swaps(&stuff->length); swapl(&stuff->provider); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRQueryProviderProperty(ClientPtr client) { REQUEST(xRRQueryProviderPropertyReq); REQUEST_SIZE_MATCH(xRRQueryProviderPropertyReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->property); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRConfigureProviderProperty(ClientPtr client) { REQUEST(xRRConfigureProviderPropertyReq); REQUEST_AT_LEAST_SIZE(xRRConfigureProviderPropertyReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->property); /* TODO: no way to specify format? */ SwapRestL(stuff); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRChangeProviderProperty(ClientPtr client) { REQUEST(xRRChangeProviderPropertyReq); REQUEST_AT_LEAST_SIZE(xRRChangeProviderPropertyReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->nUnits); switch (stuff->format) { case 8: break; case 16: SwapRestS(stuff); break; case 32: SwapRestL(stuff); break; } return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRDeleteProviderProperty(ClientPtr client) { REQUEST(xRRDeleteProviderPropertyReq); REQUEST_SIZE_MATCH(xRRDeleteProviderPropertyReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->property); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRGetProviderProperty(ClientPtr client) { REQUEST(xRRGetProviderPropertyReq); REQUEST_SIZE_MATCH(xRRGetProviderPropertyReq); swaps(&stuff->length); swapl(&stuff->provider); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->longOffset); swapl(&stuff->longLength); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRGetMonitors(ClientPtr client) { REQUEST(xRRGetMonitorsReq); REQUEST_SIZE_MATCH(xRRGetMonitorsReq); swaps(&stuff->length); swapl(&stuff->window); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRSetMonitor(ClientPtr client) { REQUEST(xRRSetMonitorReq); REQUEST_AT_LEAST_SIZE(xRRGetMonitorsReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->monitor.name); swaps(&stuff->monitor.noutput); swaps(&stuff->monitor.x); swaps(&stuff->monitor.y); swaps(&stuff->monitor.width); swaps(&stuff->monitor.height); SwapRestL(stuff); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRDeleteMonitor(ClientPtr client) { REQUEST(xRRDeleteMonitorReq); REQUEST_SIZE_MATCH(xRRDeleteMonitorReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->name); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRCreateLease(ClientPtr client) { REQUEST(xRRCreateLeaseReq); REQUEST_AT_LEAST_SIZE(xRRCreateLeaseReq); swaps(&stuff->length); swapl(&stuff->window); swaps(&stuff->nCrtcs); swaps(&stuff->nOutputs); SwapRestL(stuff); return ProcRandrVector[stuff->randrReqType] (client); } static int _X_COLD SProcRRFreeLease(ClientPtr client) { REQUEST(xRRFreeLeaseReq); REQUEST_SIZE_MATCH(xRRFreeLeaseReq); swaps(&stuff->length); swapl(&stuff->lid); return ProcRandrVector[stuff->randrReqType] (client); } int (*SProcRandrVector[RRNumberRequests]) (ClientPtr) = { SProcRRQueryVersion, /* 0 */ /* we skip 1 to make old clients fail pretty immediately */ NULL, /* 1 SProcRandrOldGetScreenInfo */ /* V1.0 apps share the same set screen config request id */ SProcRRSetScreenConfig, /* 2 */ NULL, /* 3 SProcRandrOldScreenChangeSelectInput */ /* 3 used to be ScreenChangeSelectInput; deprecated */ SProcRRSelectInput, /* 4 */ SProcRRGetScreenInfo, /* 5 */ /* V1.2 additions */ SProcRRGetScreenSizeRange, /* 6 */ SProcRRSetScreenSize, /* 7 */ SProcRRGetScreenResources, /* 8 */ SProcRRGetOutputInfo, /* 9 */ SProcRRListOutputProperties, /* 10 */ SProcRRQueryOutputProperty, /* 11 */ SProcRRConfigureOutputProperty, /* 12 */ SProcRRChangeOutputProperty, /* 13 */ SProcRRDeleteOutputProperty, /* 14 */ SProcRRGetOutputProperty, /* 15 */ SProcRRCreateMode, /* 16 */ SProcRRDestroyMode, /* 17 */ SProcRRAddOutputMode, /* 18 */ SProcRRDeleteOutputMode, /* 19 */ SProcRRGetCrtcInfo, /* 20 */ SProcRRSetCrtcConfig, /* 21 */ SProcRRGetCrtcGammaSize, /* 22 */ SProcRRGetCrtcGamma, /* 23 */ SProcRRSetCrtcGamma, /* 24 */ /* V1.3 additions */ SProcRRGetScreenResources, /* 25 GetScreenResourcesCurrent */ SProcRRSetCrtcTransform, /* 26 */ SProcRRGetCrtcTransform, /* 27 */ SProcRRGetPanning, /* 28 */ SProcRRSetPanning, /* 29 */ SProcRRSetOutputPrimary, /* 30 */ SProcRRGetOutputPrimary, /* 31 */ /* V1.4 additions */ SProcRRGetProviders, /* 32 */ SProcRRGetProviderInfo, /* 33 */ SProcRRSetProviderOffloadSink, /* 34 */ SProcRRSetProviderOutputSource, /* 35 */ SProcRRListProviderProperties, /* 36 */ SProcRRQueryProviderProperty, /* 37 */ SProcRRConfigureProviderProperty, /* 38 */ SProcRRChangeProviderProperty, /* 39 */ SProcRRDeleteProviderProperty, /* 40 */ SProcRRGetProviderProperty, /* 41 */ /* V1.5 additions */ SProcRRGetMonitors, /* 42 */ SProcRRSetMonitor, /* 43 */ SProcRRDeleteMonitor, /* 44 */ /* V1.6 additions */ SProcRRCreateLease, /* 45 */ SProcRRFreeLease, /* 46 */ }; xorg-server-21.1.16/randr/rrtransform.c0000644000175000017500000002243414757411105013471 /* * Copyright © 2007 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ #include "randrstr.h" #include "rrtransform.h" void RRTransformInit(RRTransformPtr transform) { pixman_transform_init_identity(&transform->transform); pixman_f_transform_init_identity(&transform->f_transform); pixman_f_transform_init_identity(&transform->f_inverse); transform->filter = NULL; transform->params = NULL; transform->nparams = 0; } void RRTransformFini(RRTransformPtr transform) { free(transform->params); } Bool RRTransformEqual(RRTransformPtr a, RRTransformPtr b) { if (a && pixman_transform_is_identity(&a->transform)) a = NULL; if (b && pixman_transform_is_identity(&b->transform)) b = NULL; if (a == NULL && b == NULL) return TRUE; if (a == NULL || b == NULL) return FALSE; if (memcmp(&a->transform, &b->transform, sizeof(a->transform)) != 0) return FALSE; if (a->filter != b->filter) return FALSE; if (a->nparams != b->nparams) return FALSE; if (memcmp(a->params, b->params, a->nparams * sizeof(xFixed)) != 0) return FALSE; return TRUE; } Bool RRTransformSetFilter(RRTransformPtr dst, PictFilterPtr filter, xFixed * params, int nparams, int width, int height) { xFixed *new_params; if (nparams) { new_params = xallocarray(nparams, sizeof(xFixed)); if (!new_params) return FALSE; memcpy(new_params, params, nparams * sizeof(xFixed)); } else new_params = NULL; free(dst->params); dst->filter = filter; dst->params = new_params; dst->nparams = nparams; dst->width = width; dst->height = height; return TRUE; } Bool RRTransformCopy(RRTransformPtr dst, RRTransformPtr src) { if (src && pixman_transform_is_identity(&src->transform)) src = NULL; if (src) { if (!RRTransformSetFilter(dst, src->filter, src->params, src->nparams, src->width, src->height)) return FALSE; dst->transform = src->transform; dst->f_transform = src->f_transform; dst->f_inverse = src->f_inverse; } else { if (!RRTransformSetFilter(dst, NULL, NULL, 0, 0, 0)) return FALSE; pixman_transform_init_identity(&dst->transform); pixman_f_transform_init_identity(&dst->f_transform); pixman_f_transform_init_identity(&dst->f_inverse); } return TRUE; } #define F(x) IntToxFixed(x) static void RRTransformRescale(struct pixman_f_transform *f_transform, double limit) { double max = 0, v, scale; int i, j; for (j = 0; j < 3; j++) for (i = 0; i < 3; i++) if ((v = fabs(f_transform->m[j][i])) > max) max = v; scale = limit / max; for (j = 0; j < 3; j++) for (i = 0; i < 3; i++) f_transform->m[j][i] *= scale; } /* * Compute the complete transformation matrix including * client-specified transform, rotation/reflection values and the crtc * offset. * * Return TRUE if the resulting transform is not a simple translation. */ Bool RRTransformCompute(int x, int y, int width, int height, Rotation rotation, RRTransformPtr rr_transform, PictTransformPtr transform, struct pixman_f_transform *f_transform, struct pixman_f_transform *f_inverse) { PictTransform t_transform, inverse; struct pixman_f_transform tf_transform, tf_inverse; Bool overflow = FALSE; if (!transform) transform = &t_transform; if (!f_transform) f_transform = &tf_transform; if (!f_inverse) f_inverse = &tf_inverse; pixman_transform_init_identity(transform); pixman_transform_init_identity(&inverse); pixman_f_transform_init_identity(f_transform); pixman_f_transform_init_identity(f_inverse); if (rotation != RR_Rotate_0) { double f_rot_cos, f_rot_sin, f_rot_dx, f_rot_dy; double f_scale_x, f_scale_y, f_scale_dx, f_scale_dy; xFixed rot_cos, rot_sin, rot_dx, rot_dy; xFixed scale_x, scale_y, scale_dx, scale_dy; /* rotation */ switch (rotation & 0xf) { default: case RR_Rotate_0: f_rot_cos = 1; f_rot_sin = 0; f_rot_dx = 0; f_rot_dy = 0; rot_cos = F(1); rot_sin = F(0); rot_dx = F(0); rot_dy = F(0); break; case RR_Rotate_90: f_rot_cos = 0; f_rot_sin = 1; f_rot_dx = height; f_rot_dy = 0; rot_cos = F(0); rot_sin = F(1); rot_dx = F(height); rot_dy = F(0); break; case RR_Rotate_180: f_rot_cos = -1; f_rot_sin = 0; f_rot_dx = width; f_rot_dy = height; rot_cos = F(~0u); rot_sin = F(0); rot_dx = F(width); rot_dy = F(height); break; case RR_Rotate_270: f_rot_cos = 0; f_rot_sin = -1; f_rot_dx = 0; f_rot_dy = width; rot_cos = F(0); rot_sin = F(~0u); rot_dx = F(0); rot_dy = F(width); break; } pixman_transform_rotate(transform, &inverse, rot_cos, rot_sin); pixman_transform_translate(transform, &inverse, rot_dx, rot_dy); pixman_f_transform_rotate(f_transform, f_inverse, f_rot_cos, f_rot_sin); pixman_f_transform_translate(f_transform, f_inverse, f_rot_dx, f_rot_dy); /* reflection */ f_scale_x = 1; f_scale_dx = 0; f_scale_y = 1; f_scale_dy = 0; scale_x = F(1); scale_dx = 0; scale_y = F(1); scale_dy = 0; if (rotation & RR_Reflect_X) { f_scale_x = -1; scale_x = F(~0u); if (rotation & (RR_Rotate_0 | RR_Rotate_180)) { f_scale_dx = width; scale_dx = F(width); } else { f_scale_dx = height; scale_dx = F(height); } } if (rotation & RR_Reflect_Y) { f_scale_y = -1; scale_y = F(~0u); if (rotation & (RR_Rotate_0 | RR_Rotate_180)) { f_scale_dy = height; scale_dy = F(height); } else { f_scale_dy = width; scale_dy = F(width); } } pixman_transform_scale(transform, &inverse, scale_x, scale_y); pixman_f_transform_scale(f_transform, f_inverse, f_scale_x, f_scale_y); pixman_transform_translate(transform, &inverse, scale_dx, scale_dy); pixman_f_transform_translate(f_transform, f_inverse, f_scale_dx, f_scale_dy); } #ifdef RANDR_12_INTERFACE if (rr_transform) { if (!pixman_transform_multiply (transform, &rr_transform->transform, transform)) overflow = TRUE; pixman_f_transform_multiply(f_transform, &rr_transform->f_transform, f_transform); pixman_f_transform_multiply(f_inverse, f_inverse, &rr_transform->f_inverse); } #endif /* * Compute the class of the resulting transform */ if (!overflow && pixman_transform_is_identity(transform)) { pixman_transform_init_translate(transform, F(x), F(y)); pixman_f_transform_init_translate(f_transform, x, y); pixman_f_transform_init_translate(f_inverse, -x, -y); return FALSE; } else { pixman_f_transform_translate(f_transform, f_inverse, x, y); if (!pixman_transform_translate(transform, &inverse, F(x), F(y))) overflow = TRUE; if (overflow) { struct pixman_f_transform f_scaled; f_scaled = *f_transform; RRTransformRescale(&f_scaled, 16384.0); pixman_transform_from_pixman_f_transform(transform, &f_scaled); } return TRUE; } } xorg-server-21.1.16/randr/rrxinerama.c0000644000175000017500000003212714757411105013262 /* * Copyright © 2006 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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. */ /* * This Xinerama implementation comes from the SiS driver which has * the following notice: */ /* * SiS driver main code * * Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1) Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2) Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3) The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Author: Thomas Winischhofer * - driver entirely rewritten since 2001, only basic structure taken from * old code (except sis_dri.c, sis_shadow.c, sis_accel.c and parts of * sis_dga.c; these were mostly taken over; sis_dri.c was changed for * new versions of the DRI layer) * * This notice covers the entire driver code unless indicated otherwise. * * Formerly based on code which was * Copyright (C) 1998, 1999 by Alan Hourihane, Wigan, England. * Written by: * Alan Hourihane , * Mike Chapman , * Juanjo Santamarta , * Mitani Hiroshi , * David Thomas . */ #include "randrstr.h" #include "swaprep.h" #include #include "protocol-versions.h" /* Xinerama is not multi-screen capable; just report about screen 0 */ #define RR_XINERAMA_SCREEN 0 static int ProcRRXineramaQueryVersion(ClientPtr client); static int ProcRRXineramaGetState(ClientPtr client); static int ProcRRXineramaGetScreenCount(ClientPtr client); static int ProcRRXineramaGetScreenSize(ClientPtr client); static int ProcRRXineramaIsActive(ClientPtr client); static int ProcRRXineramaQueryScreens(ClientPtr client); static int _X_COLD SProcRRXineramaDispatch(ClientPtr client); Bool noRRXineramaExtension = FALSE; /* Proc */ int ProcRRXineramaQueryVersion(ClientPtr client) { xPanoramiXQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_RRXINERAMA_MAJOR_VERSION, .minorVersion = SERVER_RRXINERAMA_MINOR_VERSION }; REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep); return Success; } int ProcRRXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; register int rc; ScreenPtr pScreen; rrScrPrivPtr pScrPriv; Bool active = FALSE; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pScrPriv = rrGetScrPriv(pScreen); if (pScrPriv) { /* XXX do we need more than this? */ active = TRUE; } rep = (xPanoramiXGetStateReply) { .type = X_Reply, .state = active, .sequenceNumber = client->sequence, .length = 0, .window = stuff->window }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep); return Success; } static int RRXineramaScreenCount(ScreenPtr pScreen) { return RRMonitorCountList(pScreen); } static Bool RRXineramaScreenActive(ScreenPtr pScreen) { return RRXineramaScreenCount(pScreen) > 0; } int ProcRRXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; register int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xPanoramiXGetScreenCountReply) { .type = X_Reply, .ScreenCount = RRXineramaScreenCount(pWin->drawable.pScreen), .sequenceNumber = client->sequence, .length = 0, .window = stuff->window }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep); return Success; } int ProcRRXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin, pRoot; ScreenPtr pScreen; xPanoramiXGetScreenSizeReply rep; register int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pRoot = pScreen->root; rep = (xPanoramiXGetScreenSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .width = pRoot->drawable.width, .height = pRoot->drawable.height, .window = stuff->window, .screen = stuff->screen }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.width); swapl(&rep.height); swapl(&rep.window); swapl(&rep.screen); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep); return Success; } int ProcRRXineramaIsActive(ClientPtr client) { xXineramaIsActiveReply rep; REQUEST_SIZE_MATCH(xXineramaIsActiveReq); rep = (xXineramaIsActiveReply) { .type = X_Reply, .length = 0, .sequenceNumber = client->sequence, .state = RRXineramaScreenActive(screenInfo.screens[RR_XINERAMA_SCREEN]) }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.state); } WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep); return Success; } static void RRXineramaWriteMonitor(ClientPtr client, RRMonitorPtr monitor) { xXineramaScreenInfo scratch; scratch.x_org = monitor->geometry.box.x1; scratch.y_org = monitor->geometry.box.y1; scratch.width = monitor->geometry.box.x2 - monitor->geometry.box.x1; scratch.height = monitor->geometry.box.y2 - monitor->geometry.box.y1; if (client->swapped) { swaps(&scratch.x_org); swaps(&scratch.y_org); swaps(&scratch.width); swaps(&scratch.height); } WriteToClient(client, sz_XineramaScreenInfo, &scratch); } int ProcRRXineramaQueryScreens(ClientPtr client) { xXineramaQueryScreensReply rep; ScreenPtr pScreen = screenInfo.screens[RR_XINERAMA_SCREEN]; int m; RRMonitorPtr monitors = NULL; int nmonitors = 0; REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); if (RRXineramaScreenActive(pScreen)) { RRGetInfo(pScreen, FALSE); if (!RRMonitorMakeList(pScreen, TRUE, &monitors, &nmonitors)) return BadAlloc; } rep = (xXineramaQueryScreensReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(nmonitors * sz_XineramaScreenInfo), .number = nmonitors }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.number); } WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep); for (m = 0; m < nmonitors; m++) RRXineramaWriteMonitor(client, &monitors[m]); if (monitors) RRMonitorFreeList(monitors, nmonitors); return Success; } static int ProcRRXineramaDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_PanoramiXQueryVersion: return ProcRRXineramaQueryVersion(client); case X_PanoramiXGetState: return ProcRRXineramaGetState(client); case X_PanoramiXGetScreenCount: return ProcRRXineramaGetScreenCount(client); case X_PanoramiXGetScreenSize: return ProcRRXineramaGetScreenSize(client); case X_XineramaIsActive: return ProcRRXineramaIsActive(client); case X_XineramaQueryScreens: return ProcRRXineramaQueryScreens(client); } return BadRequest; } /* SProc */ static int _X_COLD SProcRRXineramaQueryVersion(ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); return ProcRRXineramaQueryVersion(client); } static int _X_COLD SProcRRXineramaGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); swapl(&stuff->window); return ProcRRXineramaGetState(client); } static int _X_COLD SProcRRXineramaGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); swapl(&stuff->window); return ProcRRXineramaGetScreenCount(client); } static int _X_COLD SProcRRXineramaGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); swapl(&stuff->window); swapl(&stuff->screen); return ProcRRXineramaGetScreenSize(client); } static int _X_COLD SProcRRXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return ProcRRXineramaIsActive(client); } static int _X_COLD SProcRRXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return ProcRRXineramaQueryScreens(client); } int SProcRRXineramaDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_PanoramiXQueryVersion: return SProcRRXineramaQueryVersion(client); case X_PanoramiXGetState: return SProcRRXineramaGetState(client); case X_PanoramiXGetScreenCount: return SProcRRXineramaGetScreenCount(client); case X_PanoramiXGetScreenSize: return SProcRRXineramaGetScreenSize(client); case X_XineramaIsActive: return SProcRRXineramaIsActive(client); case X_XineramaQueryScreens: return SProcRRXineramaQueryScreens(client); } return BadRequest; } void RRXineramaExtensionInit(void) { #ifdef PANORAMIX if (!noPanoramiXExtension) return; #endif if (noRRXineramaExtension) return; /* * Xinerama isn't capable enough to have multiple protocol screens each * with their own output geometry. So if there's more than one protocol * screen, just don't even try. */ if (screenInfo.numScreens > 1) return; (void) AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, ProcRRXineramaDispatch, SProcRRXineramaDispatch, NULL, StandardMinorOpcode); } xorg-server-21.1.16/record/0000755000175000017500000000000014757411133011172 5xorg-server-21.1.16/record/meson.build0000644000175000017500000000025014757411105013250 srcs_record = [ 'record.c', 'set.c', ] libxserver_record = static_library('libxserver_record', srcs_record, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/record/Makefile.am0000644000175000017500000000017014757411105013143 noinst_LTLIBRARIES = librecord.la AM_CFLAGS = $(DIX_CFLAGS) librecord_la_SOURCES = record.c set.c EXTRA_DIST = set.h xorg-server-21.1.16/record/Makefile.in0000644000175000017500000006105014757411116013162 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = record ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librecord_la_LIBADD = am_librecord_la_OBJECTS = record.lo set.lo librecord_la_OBJECTS = $(am_librecord_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/record.Plo ./$(DEPDIR)/set.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librecord_la_SOURCES) DIST_SOURCES = $(librecord_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = librecord.la AM_CFLAGS = $(DIX_CFLAGS) librecord_la_SOURCES = record.c set.c EXTRA_DIST = set.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign record/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign record/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librecord.la: $(librecord_la_OBJECTS) $(librecord_la_DEPENDENCIES) $(EXTRA_librecord_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(librecord_la_OBJECTS) $(librecord_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/record.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/record.Plo -rm -f ./$(DEPDIR)/set.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/record.Plo -rm -f ./$(DEPDIR)/set.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/record/record.c0000644000175000017500000030502614757411105012541 /* Copyright 1995, 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. Author: David P. Wiggins, The Open Group This work benefited from earlier work done by Martha Zimet of NCD and Jim Haggerty of Metheus. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "dixstruct.h" #include "extnsionst.h" #include "extinit.h" #include #include "set.h" #include "swaprep.h" #include "inputstr.h" #include "eventconvert.h" #include "scrnintstr.h" #include #include #ifdef PANORAMIX #include "globals.h" #include "panoramiX.h" #include "panoramiXsrv.h" #include "cursor.h" #endif #include "protocol-versions.h" static RESTYPE RTContext; /* internal resource type for Record contexts */ /* How many bytes of protocol data to buffer in a context. Don't set to less * than 32. */ #define REPLY_BUF_SIZE 1024 /* Record Context structure */ typedef struct { XID id; /* resource id of context */ ClientPtr pRecordingClient; /* client that has context enabled */ struct _RecordClientsAndProtocolRec *pListOfRCAP; /* all registered info */ ClientPtr pBufClient; /* client whose protocol is in replyBuffer */ unsigned int continuedReply:1; /* recording a reply that is split up? */ char elemHeaders; /* element header flags (time/seq no.) */ char bufCategory; /* category of protocol in replyBuffer */ int numBufBytes; /* number of bytes in replyBuffer */ char replyBuffer[REPLY_BUF_SIZE]; /* buffered recorded protocol */ int inFlush; /* are we inside RecordFlushReplyBuffer */ } RecordContextRec, *RecordContextPtr; /* RecordMinorOpRec - to hold minor opcode selections for extension requests * and replies */ typedef union { int count; /* first element of array: how many "major" structs to follow */ struct { /* rest of array elements are this */ short first; /* first major opcode */ short last; /* last major opcode */ RecordSetPtr pMinOpSet; /* minor opcode set for above major range */ } major; } RecordMinorOpRec, *RecordMinorOpPtr; /* RecordClientsAndProtocolRec, nicknamed RCAP - holds all the client and * protocol selections passed in a single CreateContext or RegisterClients. * Generally, a context will have one of these from the create and an * additional one for each RegisterClients. RCAPs are freed when all their * clients are unregistered. */ typedef struct _RecordClientsAndProtocolRec { RecordContextPtr pContext; /* context that owns this RCAP */ struct _RecordClientsAndProtocolRec *pNextRCAP; /* next RCAP on context */ RecordSetPtr pRequestMajorOpSet; /* requests to record */ RecordMinorOpPtr pRequestMinOpInfo; /* extension requests to record */ RecordSetPtr pReplyMajorOpSet; /* replies to record */ RecordMinorOpPtr pReplyMinOpInfo; /* extension replies to record */ RecordSetPtr pDeviceEventSet; /* device events to record */ RecordSetPtr pDeliveredEventSet; /* delivered events to record */ RecordSetPtr pErrorSet; /* errors to record */ XID *pClientIDs; /* array of clients to record */ short numClients; /* number of clients in pClientIDs */ short sizeClients; /* size of pClientIDs array */ unsigned int clientStarted:1; /* record new client connections? */ unsigned int clientDied:1; /* record client disconnections? */ unsigned int clientIDsSeparatelyAllocated:1; /* pClientIDs malloced? */ } RecordClientsAndProtocolRec, *RecordClientsAndProtocolPtr; /* how much bigger to make pRCAP->pClientIDs when reallocing */ #define CLIENT_ARRAY_GROWTH_INCREMENT 4 /* counts the total number of RCAPs belonging to enabled contexts. */ static int numEnabledRCAPs; /* void VERIFY_CONTEXT(RecordContextPtr, XID, ClientPtr) * In the spirit of the VERIFY_* macros in dix.h, this macro fills in * the context pointer if the given ID is a valid Record Context, else it * returns an error. */ #define VERIFY_CONTEXT(_pContext, _contextid, _client) { \ int rc = dixLookupResourceByType((void **)&(_pContext), _contextid, \ RTContext, _client, DixUseAccess); \ if (rc != Success) \ return rc; \ } static int RecordDeleteContext(void *value, XID id); /***************************************************************************/ /* client private stuff */ /* To make declarations less obfuscated, have a typedef for a pointer to a * Proc function. */ typedef int (*ProcFunctionPtr) (ClientPtr /*pClient */ ); /* Record client private. Generally a client only has one of these if * any of its requests are being recorded. */ typedef struct { /* ptr to client's proc vector before Record stuck its nose in */ ProcFunctionPtr *originalVector; /* proc vector with pointers for recorded requests redirected to the * function RecordARequest */ ProcFunctionPtr recordVector[256]; } RecordClientPrivateRec, *RecordClientPrivatePtr; static DevPrivateKeyRec RecordClientPrivateKeyRec; #define RecordClientPrivateKey (&RecordClientPrivateKeyRec) /* RecordClientPrivatePtr RecordClientPrivate(ClientPtr) * gets the client private of the given client. Syntactic sugar. */ #define RecordClientPrivate(_pClient) (RecordClientPrivatePtr) \ dixLookupPrivate(&(_pClient)->devPrivates, RecordClientPrivateKey) /***************************************************************************/ /* global list of all contexts */ static RecordContextPtr *ppAllContexts; static int numContexts; /* number of contexts in ppAllContexts */ /* number of currently enabled contexts. All enabled contexts are bunched * up at the front of the ppAllContexts array, from ppAllContexts[0] to * ppAllContexts[numEnabledContexts-1], to eliminate time spent skipping * past disabled contexts. */ static int numEnabledContexts; /* RecordFindContextOnAllContexts * * Arguments: * pContext is the context to search for. * * Returns: * The index into the array ppAllContexts at which pContext is stored. * If pContext is not found in ppAllContexts, returns -1. * * Side Effects: none. */ static int RecordFindContextOnAllContexts(RecordContextPtr pContext) { int i; assert(numContexts >= numEnabledContexts); for (i = 0; i < numContexts; i++) { if (ppAllContexts[i] == pContext) return i; } return -1; } /* RecordFindContextOnAllContexts */ /***************************************************************************/ /* RecordFlushReplyBuffer * * Arguments: * pContext is the context to flush. * data1 is a pointer to additional data, and len1 is its length in bytes. * data2 is a pointer to additional data, and len2 is its length in bytes. * * Returns: nothing. * * Side Effects: * If the context is enabled, any buffered (recorded) protocol is written * to the recording client, and the number of buffered bytes is set to * zero. If len1 is not zero, data1/len1 are then written to the * recording client, and similarly for data2/len2 (written after * data1/len1). */ static void RecordFlushReplyBuffer(RecordContextPtr pContext, void *data1, int len1, void *data2, int len2) { if (!pContext->pRecordingClient || pContext->pRecordingClient->clientGone || pContext->inFlush) return; ++pContext->inFlush; if (pContext->numBufBytes) WriteToClient(pContext->pRecordingClient, pContext->numBufBytes, pContext->replyBuffer); pContext->numBufBytes = 0; if (len1) WriteToClient(pContext->pRecordingClient, len1, data1); if (len2) WriteToClient(pContext->pRecordingClient, len2, data2); --pContext->inFlush; } /* RecordFlushReplyBuffer */ /* RecordAProtocolElement * * Arguments: * pContext is the context that is recording a protocol element. * pClient is the client whose protocol is being recorded. For * device events and EndOfData, pClient is NULL. * category is the category of the protocol element, as defined * by the RECORD spec. * data is a pointer to the protocol data, and datalen - padlen * is its length in bytes. * padlen is the number of pad bytes from a zeroed array. * futurelen is the number of bytes that will be sent in subsequent * calls to this function to complete this protocol element. * In those subsequent calls, futurelen will be -1 to indicate * that the current data is a continuation of the same protocol * element. * * Returns: nothing. * * Side Effects: * The context may be flushed. The new protocol element will be * added to the context's protocol buffer with appropriate element * headers prepended (sequence number and timestamp). If the data * is continuation data (futurelen == -1), element headers won't * be added. If the protocol element and headers won't fit in * the context's buffer, it is sent directly to the recording * client (after any buffered data). */ static void RecordAProtocolElement(RecordContextPtr pContext, ClientPtr pClient, int category, void *data, int datalen, int padlen, int futurelen) { CARD32 elemHeaderData[2]; int numElemHeaders = 0; Bool recordingClientSwapped = pContext->pRecordingClient->swapped; CARD32 serverTime = 0; Bool gotServerTime = FALSE; int replylen; if (futurelen >= 0) { /* start of new protocol element */ xRecordEnableContextReply *pRep = (xRecordEnableContextReply *) pContext->replyBuffer; if (pContext->pBufClient != pClient || pContext->bufCategory != category) { RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0); pContext->pBufClient = pClient; pContext->bufCategory = category; } if (!pContext->numBufBytes) { serverTime = GetTimeInMillis(); gotServerTime = TRUE; pRep->type = X_Reply; pRep->category = category; pRep->sequenceNumber = pContext->pRecordingClient->sequence; pRep->length = 0; pRep->elementHeader = pContext->elemHeaders; pRep->serverTime = serverTime; if (pClient) { pRep->clientSwapped = (pClient->swapped != recordingClientSwapped); pRep->idBase = pClient->clientAsMask; pRep->recordedSequenceNumber = pClient->sequence; } else { /* it's a device event, StartOfData, or EndOfData */ pRep->clientSwapped = (category != XRecordFromServer) && recordingClientSwapped; pRep->idBase = 0; pRep->recordedSequenceNumber = 0; } if (recordingClientSwapped) { swaps(&pRep->sequenceNumber); swapl(&pRep->length); swapl(&pRep->idBase); swapl(&pRep->serverTime); swapl(&pRep->recordedSequenceNumber); } pContext->numBufBytes = SIZEOF(xRecordEnableContextReply); } /* generate element headers if needed */ if (((pContext->elemHeaders & XRecordFromClientTime) && category == XRecordFromClient) || ((pContext->elemHeaders & XRecordFromServerTime) && category == XRecordFromServer)) { if (gotServerTime) elemHeaderData[numElemHeaders] = serverTime; else elemHeaderData[numElemHeaders] = GetTimeInMillis(); if (recordingClientSwapped) swapl(&elemHeaderData[numElemHeaders]); numElemHeaders++; } if ((pContext->elemHeaders & XRecordFromClientSequence) && (category == XRecordFromClient || category == XRecordClientDied)) { elemHeaderData[numElemHeaders] = pClient->sequence; if (recordingClientSwapped) swapl(&elemHeaderData[numElemHeaders]); numElemHeaders++; } /* adjust reply length */ replylen = pRep->length; if (recordingClientSwapped) swapl(&replylen); replylen += numElemHeaders + bytes_to_int32(datalen) + bytes_to_int32(futurelen); if (recordingClientSwapped) swapl(&replylen); pRep->length = replylen; } /* end if not continued reply */ numElemHeaders *= 4; /* if space available >= space needed, buffer the data */ if (REPLY_BUF_SIZE - pContext->numBufBytes >= datalen + numElemHeaders) { if (numElemHeaders) { memcpy(pContext->replyBuffer + pContext->numBufBytes, elemHeaderData, numElemHeaders); pContext->numBufBytes += numElemHeaders; } if (datalen) { static char padBuffer[3]; /* as in FlushClient */ memcpy(pContext->replyBuffer + pContext->numBufBytes, data, datalen - padlen); pContext->numBufBytes += datalen - padlen; memcpy(pContext->replyBuffer + pContext->numBufBytes, padBuffer, padlen); pContext->numBufBytes += padlen; } } else { RecordFlushReplyBuffer(pContext, (void *) elemHeaderData, numElemHeaders, (void *) data, datalen - padlen); } } /* RecordAProtocolElement */ /* RecordFindClientOnContext * * Arguments: * pContext is the context to search. * clientspec is the resource ID mask identifying the client to search * for, or XRecordFutureClients. * pposition is a pointer to an int, or NULL. See Returns. * * Returns: * The RCAP on which clientspec was found, or NULL if not found on * any RCAP on the given context. * If pposition was not NULL and the returned RCAP is not NULL, * *pposition will be set to the index into the returned the RCAP's * pClientIDs array that holds clientspec. * * Side Effects: none. */ static RecordClientsAndProtocolPtr RecordFindClientOnContext(RecordContextPtr pContext, XID clientspec, int *pposition) { RecordClientsAndProtocolPtr pRCAP; for (pRCAP = pContext->pListOfRCAP; pRCAP; pRCAP = pRCAP->pNextRCAP) { int i; for (i = 0; i < pRCAP->numClients; i++) { if (pRCAP->pClientIDs[i] == clientspec) { if (pposition) *pposition = i; return pRCAP; } } } return NULL; } /* RecordFindClientOnContext */ /* RecordABigRequest * * Arguments: * pContext is the recording context. * client is the client being recorded. * stuff is a pointer to the big request of client (see the Big Requests * extension for details.) * * Returns: nothing. * * Side Effects: * The big request is recorded with the correct length field re-inserted. * * Note: this function exists mainly to make RecordARequest smaller. */ static void RecordABigRequest(RecordContextPtr pContext, ClientPtr client, xReq * stuff) { CARD32 bigLength; int bytesLeft; /* note: client->req_len has been frobbed by ReadRequestFromClient * (os/io.c) to discount the extra 4 bytes taken by the extended length * field in a big request. The actual request length to record is * client->req_len + 1 (measured in CARD32s). */ /* record the request header */ bytesLeft = client->req_len << 2; RecordAProtocolElement(pContext, client, XRecordFromClient, (void *) stuff, SIZEOF(xReq), 0, bytesLeft); /* reinsert the extended length field that was squished out */ bigLength = client->req_len + bytes_to_int32(sizeof(bigLength)); if (client->swapped) swapl(&bigLength); RecordAProtocolElement(pContext, client, XRecordFromClient, (void *) &bigLength, sizeof(bigLength), 0, /* continuation */ -1); bytesLeft -= sizeof(bigLength); /* record the rest of the request after the length */ RecordAProtocolElement(pContext, client, XRecordFromClient, (void *) (stuff + 1), bytesLeft, 0, /* continuation */ -1); } /* RecordABigRequest */ /* RecordARequest * * Arguments: * client is a client that the server has dispatched a request to by * calling client->requestVector[request opcode] . * The request is in client->requestBuffer. * * Returns: * Whatever is returned by the "real" Proc function for this request. * The "real" Proc function is the function that was in * client->requestVector[request opcode] before it was replaced by * RecordARequest. (See the function RecordInstallHooks.) * * Side Effects: * The request is recorded by all contexts that have registered this * request for this client. The real Proc function is called. */ static int RecordARequest(ClientPtr client) { RecordContextPtr pContext; RecordClientsAndProtocolPtr pRCAP; int i; RecordClientPrivatePtr pClientPriv; REQUEST(xReq); int majorop; majorop = stuff->reqType; for (i = 0; i < numEnabledContexts; i++) { pContext = ppAllContexts[i]; pRCAP = RecordFindClientOnContext(pContext, client->clientAsMask, NULL); if (pRCAP && pRCAP->pRequestMajorOpSet && RecordIsMemberOfSet(pRCAP->pRequestMajorOpSet, majorop)) { if (majorop <= 127) { /* core request */ if (stuff->length == 0) RecordABigRequest(pContext, client, stuff); else RecordAProtocolElement(pContext, client, XRecordFromClient, (void *) stuff, client->req_len << 2, 0, 0); } else { /* extension, check minor opcode */ int minorop = client->minorOp; int numMinOpInfo; RecordMinorOpPtr pMinorOpInfo = pRCAP->pRequestMinOpInfo; assert(pMinorOpInfo); numMinOpInfo = pMinorOpInfo->count; pMinorOpInfo++; assert(numMinOpInfo); for (; numMinOpInfo; numMinOpInfo--, pMinorOpInfo++) { if (majorop >= pMinorOpInfo->major.first && majorop <= pMinorOpInfo->major.last && RecordIsMemberOfSet(pMinorOpInfo->major.pMinOpSet, minorop)) { if (stuff->length == 0) RecordABigRequest(pContext, client, stuff); else RecordAProtocolElement(pContext, client, XRecordFromClient, (void *) stuff, client->req_len << 2, 0, 0); break; } } /* end for each minor op info */ } /* end extension request */ } /* end this RCAP wants this major opcode */ } /* end for each context */ pClientPriv = RecordClientPrivate(client); assert(pClientPriv); return (*pClientPriv->originalVector[majorop]) (client); } /* RecordARequest */ /* RecordAReply * * Arguments: * pcbl is &ReplyCallback. * nulldata is NULL. * calldata is a pointer to a ReplyInfoRec (include/os.h) * which provides information about replies that are being sent * to clients. * * Returns: nothing. * * Side Effects: * The reply is recorded by all contexts that have registered this * reply type for this client. If more data belonging to the same * reply is expected, and if the reply is being recorded by any * context, pContext->continuedReply is set to 1. * If pContext->continuedReply was already 1 and this is the last * chunk of data belonging to this reply, it is set to 0. */ static void RecordAReply(CallbackListPtr *pcbl, void *nulldata, void *calldata) { RecordContextPtr pContext; RecordClientsAndProtocolPtr pRCAP; int eci; ReplyInfoRec *pri = (ReplyInfoRec *) calldata; ClientPtr client = pri->client; for (eci = 0; eci < numEnabledContexts; eci++) { pContext = ppAllContexts[eci]; pRCAP = RecordFindClientOnContext(pContext, client->clientAsMask, NULL); if (pRCAP) { int majorop = client->majorOp; if (pContext->continuedReply) { RecordAProtocolElement(pContext, client, XRecordFromServer, (void *) pri->replyData, pri->dataLenBytes, pri->padBytes, /* continuation */ -1); if (!pri->bytesRemaining) pContext->continuedReply = 0; } else if (pri->startOfReply && pRCAP->pReplyMajorOpSet && RecordIsMemberOfSet(pRCAP->pReplyMajorOpSet, majorop)) { if (majorop <= 127) { /* core reply */ RecordAProtocolElement(pContext, client, XRecordFromServer, (void *) pri->replyData, pri->dataLenBytes, 0, pri->bytesRemaining); if (pri->bytesRemaining) pContext->continuedReply = 1; } else { /* extension, check minor opcode */ int minorop = client->minorOp; int numMinOpInfo; RecordMinorOpPtr pMinorOpInfo = pRCAP->pReplyMinOpInfo; assert(pMinorOpInfo); numMinOpInfo = pMinorOpInfo->count; pMinorOpInfo++; assert(numMinOpInfo); for (; numMinOpInfo; numMinOpInfo--, pMinorOpInfo++) { if (majorop >= pMinorOpInfo->major.first && majorop <= pMinorOpInfo->major.last && RecordIsMemberOfSet(pMinorOpInfo->major.pMinOpSet, minorop)) { RecordAProtocolElement(pContext, client, XRecordFromServer, (void *) pri->replyData, pri->dataLenBytes, 0, pri->bytesRemaining); if (pri->bytesRemaining) pContext->continuedReply = 1; break; } } /* end for each minor op info */ } /* end extension reply */ } /* end continued reply vs. start of reply */ } /* end client is registered on this context */ } /* end for each context */ } /* RecordAReply */ /* RecordADeliveredEventOrError * * Arguments: * pcbl is &EventCallback. * nulldata is NULL. * calldata is a pointer to a EventInfoRec (include/dix.h) * which provides information about events that are being sent * to clients. * * Returns: nothing. * * Side Effects: * The event or error is recorded by all contexts that have registered * it for this client. */ static void RecordADeliveredEventOrError(CallbackListPtr *pcbl, void *nulldata, void *calldata) { EventInfoRec *pei = (EventInfoRec *) calldata; RecordContextPtr pContext; RecordClientsAndProtocolPtr pRCAP; int eci; /* enabled context index */ ClientPtr pClient = pei->client; for (eci = 0; eci < numEnabledContexts; eci++) { pContext = ppAllContexts[eci]; pRCAP = RecordFindClientOnContext(pContext, pClient->clientAsMask, NULL); if (pRCAP && (pRCAP->pDeliveredEventSet || pRCAP->pErrorSet)) { int ev; /* event index */ xEvent *pev = pei->events; for (ev = 0; ev < pei->count; ev++, pev++) { int recordit = 0; if (pRCAP->pErrorSet) { recordit = RecordIsMemberOfSet(pRCAP->pErrorSet, ((xError *) (pev))-> errorCode); } else if (pRCAP->pDeliveredEventSet) { recordit = RecordIsMemberOfSet(pRCAP->pDeliveredEventSet, pev->u.u.type & 0177); } if (recordit) { xEvent swappedEvent; xEvent *pEvToRecord = pev; if (pClient->swapped) { (*EventSwapVector[pev->u.u.type & 0177]) (pev, &swappedEvent); pEvToRecord = &swappedEvent; } RecordAProtocolElement(pContext, pClient, XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0, 0); } } /* end for each event */ } /* end this client is on this context */ } /* end for each enabled context */ } /* RecordADeliveredEventOrError */ static void RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP, RecordContextPtr pContext, xEvent *pev, int count) { int ev; /* event index */ for (ev = 0; ev < count; ev++, pev++) { if (RecordIsMemberOfSet(pRCAP->pDeviceEventSet, pev->u.u.type & 0177)) { xEvent swappedEvent; xEvent *pEvToRecord = pev; #ifdef PANORAMIX xEvent shiftedEvent; if (!noPanoramiXExtension && (pev->u.u.type == MotionNotify || pev->u.u.type == ButtonPress || pev->u.u.type == ButtonRelease || pev->u.u.type == KeyPress || pev->u.u.type == KeyRelease)) { int scr = XineramaGetCursorScreen(inputInfo.pointer); memcpy(&shiftedEvent, pev, sizeof(xEvent)); shiftedEvent.u.keyButtonPointer.rootX += screenInfo.screens[scr]->x - screenInfo.screens[0]->x; shiftedEvent.u.keyButtonPointer.rootY += screenInfo.screens[scr]->y - screenInfo.screens[0]->y; pEvToRecord = &shiftedEvent; } #endif /* PANORAMIX */ if (pContext->pRecordingClient->swapped) { (*EventSwapVector[pEvToRecord->u.u.type & 0177]) (pEvToRecord, &swappedEvent); pEvToRecord = &swappedEvent; } RecordAProtocolElement(pContext, NULL, XRecordFromServer, pEvToRecord, SIZEOF(xEvent), 0, 0); /* make sure device events get flushed in the absence * of other client activity */ SetCriticalOutputPending(); } } /* end for each event */ } /* RecordADeviceEvent */ /* RecordADeviceEvent * * Arguments: * pcbl is &DeviceEventCallback. * nulldata is NULL. * calldata is a pointer to a DeviceEventInfoRec (include/dix.h) * which provides information about device events that occur. * * Returns: nothing. * * Side Effects: * The device event is recorded by all contexts that have registered * it for this client. */ static void RecordADeviceEvent(CallbackListPtr *pcbl, void *nulldata, void *calldata) { DeviceEventInfoRec *pei = (DeviceEventInfoRec *) calldata; RecordContextPtr pContext; RecordClientsAndProtocolPtr pRCAP; int eci; /* enabled context index */ for (eci = 0; eci < numEnabledContexts; eci++) { pContext = ppAllContexts[eci]; for (pRCAP = pContext->pListOfRCAP; pRCAP; pRCAP = pRCAP->pNextRCAP) { if (pRCAP->pDeviceEventSet) { int count; xEvent *xi_events = NULL; /* TODO check return values */ if (IsMaster(pei->device)) { xEvent *core_events; EventToCore(pei->event, &core_events, &count); RecordSendProtocolEvents(pRCAP, pContext, core_events, count); free(core_events); } EventToXI(pei->event, &xi_events, &count); RecordSendProtocolEvents(pRCAP, pContext, xi_events, count); free(xi_events); } /* end this RCAP selects device events */ } /* end for each RCAP on this context */ } /* end for each enabled context */ } /* RecordFlushAllContexts * * Arguments: * pcbl is &FlushCallback. * nulldata and calldata are NULL. * * Returns: nothing. * * Side Effects: * All buffered reply data of all enabled contexts is written to * the recording clients. */ static void RecordFlushAllContexts(CallbackListPtr *pcbl, void *nulldata, void *calldata) { int eci; /* enabled context index */ RecordContextPtr pContext; for (eci = 0; eci < numEnabledContexts; eci++) { pContext = ppAllContexts[eci]; /* In most cases we leave it to RecordFlushReplyBuffer to make * this check, but this function could be called very often, so we * check before calling hoping to save the function call cost * most of the time. */ if (pContext->numBufBytes) RecordFlushReplyBuffer(ppAllContexts[eci], NULL, 0, NULL, 0); } } /* RecordFlushAllContexts */ /* RecordInstallHooks * * Arguments: * pRCAP is an RCAP on an enabled or being-enabled context. * oneclient can be zero or the resource ID mask identifying a client. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * Recording hooks needed by RCAP are installed. * If oneclient is zero, recording hooks needed for all clients and * protocol on the RCAP are installed. If oneclient is non-zero, * only those hooks needed for the specified client are installed. * * Client requestVectors may be altered. numEnabledRCAPs will be * incremented if oneclient == 0. Callbacks may be added to * various callback lists. */ static int RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) { int i = 0; XID client; if (oneclient) client = oneclient; else client = pRCAP->numClients ? pRCAP->pClientIDs[i++] : 0; while (client) { if (client != XRecordFutureClients) { if (pRCAP->pRequestMajorOpSet) { RecordSetIteratePtr pIter = NULL; RecordSetInterval interval; ClientPtr pClient = clients[CLIENT_ID(client)]; if (pClient && !RecordClientPrivate(pClient)) { RecordClientPrivatePtr pClientPriv; /* no Record proc vector; allocate one */ pClientPriv = (RecordClientPrivatePtr) malloc(sizeof(RecordClientPrivateRec)); if (!pClientPriv) return BadAlloc; /* copy old proc vector to new */ memcpy(pClientPriv->recordVector, pClient->requestVector, sizeof(pClientPriv->recordVector)); pClientPriv->originalVector = pClient->requestVector; dixSetPrivate(&pClient->devPrivates, RecordClientPrivateKey, pClientPriv); pClient->requestVector = pClientPriv->recordVector; } while ((pIter = RecordIterateSet(pRCAP->pRequestMajorOpSet, pIter, &interval))) { unsigned int j; for (j = interval.first; j <= interval.last; j++) pClient->requestVector[j] = RecordARequest; } } } if (oneclient) client = 0; else client = (i < pRCAP->numClients) ? pRCAP->pClientIDs[i++] : 0; } assert(numEnabledRCAPs >= 0); if (!oneclient && ++numEnabledRCAPs == 1) { /* we're enabling the first context */ if (!AddCallback(&EventCallback, RecordADeliveredEventOrError, NULL)) return BadAlloc; if (!AddCallback(&DeviceEventCallback, RecordADeviceEvent, NULL)) return BadAlloc; if (!AddCallback(&ReplyCallback, RecordAReply, NULL)) return BadAlloc; if (!AddCallback(&FlushCallback, RecordFlushAllContexts, NULL)) return BadAlloc; /* Alternate context flushing scheme: delete the line above * and call RegisterBlockAndWakeupHandlers here passing * RecordFlushAllContexts. Is this any better? */ } return Success; } /* RecordInstallHooks */ /* RecordUninstallHooks * * Arguments: * pRCAP is an RCAP on an enabled or being-disabled context. * oneclient can be zero or the resource ID mask identifying a client. * * Returns: nothing. * * Side Effects: * Recording hooks needed by RCAP may be uninstalled. * If oneclient is zero, recording hooks needed for all clients and * protocol on the RCAP may be uninstalled. If oneclient is non-zero, * only those hooks needed for the specified client may be uninstalled. * * Client requestVectors may be altered. numEnabledRCAPs will be * decremented if oneclient == 0. Callbacks may be deleted from * various callback lists. */ static void RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) { int i = 0; XID client; if (oneclient) client = oneclient; else client = pRCAP->numClients ? pRCAP->pClientIDs[i++] : 0; while (client) { if (client != XRecordFutureClients) { if (pRCAP->pRequestMajorOpSet) { ClientPtr pClient = clients[CLIENT_ID(client)]; int c; Bool otherRCAPwantsProcVector = FALSE; RecordClientPrivatePtr pClientPriv = NULL; assert(pClient); pClientPriv = RecordClientPrivate(pClient); assert(pClientPriv); memcpy(pClientPriv->recordVector, pClientPriv->originalVector, sizeof(pClientPriv->recordVector)); for (c = 0; c < numEnabledContexts; c++) { RecordClientsAndProtocolPtr pOtherRCAP; RecordContextPtr pContext = ppAllContexts[c]; if (pContext == pRCAP->pContext) continue; pOtherRCAP = RecordFindClientOnContext(pContext, client, NULL); if (pOtherRCAP && pOtherRCAP->pRequestMajorOpSet) { RecordSetIteratePtr pIter = NULL; RecordSetInterval interval; otherRCAPwantsProcVector = TRUE; while ((pIter = RecordIterateSet(pOtherRCAP->pRequestMajorOpSet, pIter, &interval))) { unsigned int j; for (j = interval.first; j <= interval.last; j++) pClient->requestVector[j] = RecordARequest; } } } if (!otherRCAPwantsProcVector) { /* nobody needs it, so free it */ pClient->requestVector = pClientPriv->originalVector; dixSetPrivate(&pClient->devPrivates, RecordClientPrivateKey, NULL); free(pClientPriv); } } /* end if this RCAP specifies any requests */ } /* end if not future clients */ if (oneclient) client = 0; else client = (i < pRCAP->numClients) ? pRCAP->pClientIDs[i++] : 0; } assert(numEnabledRCAPs >= 1); if (!oneclient && --numEnabledRCAPs == 0) { /* we're disabling the last context */ DeleteCallback(&EventCallback, RecordADeliveredEventOrError, NULL); DeleteCallback(&DeviceEventCallback, RecordADeviceEvent, NULL); DeleteCallback(&ReplyCallback, RecordAReply, NULL); DeleteCallback(&FlushCallback, RecordFlushAllContexts, NULL); /* Alternate context flushing scheme: delete the line above * and call RemoveBlockAndWakeupHandlers here passing * RecordFlushAllContexts. Is this any better? */ /* Having deleted the callback, call it one last time. -gildea */ RecordFlushAllContexts(&FlushCallback, NULL, NULL); } } /* RecordUninstallHooks */ /* RecordDeleteClientFromRCAP * * Arguments: * pRCAP is an RCAP to delete the client from. * position is the index into the array pRCAP->pClientIDs of the * client to delete. * * Returns: nothing. * * Side Effects: * Recording hooks needed by client will be uninstalled if the context * is enabled. The designated client will be removed from the * pRCAP->pClientIDs array. If it was the only client on the RCAP, * the RCAP is removed from the context and freed. (Invariant: RCAPs * have at least one client.) */ static void RecordDeleteClientFromRCAP(RecordClientsAndProtocolPtr pRCAP, int position) { if (pRCAP->pContext->pRecordingClient) RecordUninstallHooks(pRCAP, pRCAP->pClientIDs[position]); if (position != pRCAP->numClients - 1) pRCAP->pClientIDs[position] = pRCAP->pClientIDs[pRCAP->numClients - 1]; if (--pRCAP->numClients == 0) { /* no more clients; remove RCAP from context's list */ RecordContextPtr pContext = pRCAP->pContext; if (pContext->pRecordingClient) RecordUninstallHooks(pRCAP, 0); if (pContext->pListOfRCAP == pRCAP) pContext->pListOfRCAP = pRCAP->pNextRCAP; else { RecordClientsAndProtocolPtr prevRCAP; for (prevRCAP = pContext->pListOfRCAP; prevRCAP->pNextRCAP != pRCAP; prevRCAP = prevRCAP->pNextRCAP); prevRCAP->pNextRCAP = pRCAP->pNextRCAP; } /* free the RCAP */ if (pRCAP->clientIDsSeparatelyAllocated) free(pRCAP->pClientIDs); free(pRCAP); } } /* RecordDeleteClientFromRCAP */ /* RecordAddClientToRCAP * * Arguments: * pRCAP is an RCAP to add the client to. * clientspec is the resource ID mask identifying a client, or * XRecordFutureClients. * * Returns: nothing. * * Side Effects: * Recording hooks needed by client will be installed if the context * is enabled. The designated client will be added to the * pRCAP->pClientIDs array, which may be realloced. * pRCAP->clientIDsSeparatelyAllocated may be set to 1 if there * is no more room to hold clients internal to the RCAP. */ static void RecordAddClientToRCAP(RecordClientsAndProtocolPtr pRCAP, XID clientspec) { if (pRCAP->numClients == pRCAP->sizeClients) { if (pRCAP->clientIDsSeparatelyAllocated) { XID *pNewIDs = reallocarray(pRCAP->pClientIDs, pRCAP->sizeClients + CLIENT_ARRAY_GROWTH_INCREMENT, sizeof(XID)); if (!pNewIDs) return; pRCAP->pClientIDs = pNewIDs; pRCAP->sizeClients += CLIENT_ARRAY_GROWTH_INCREMENT; } else { XID *pNewIDs = xallocarray(pRCAP->sizeClients + CLIENT_ARRAY_GROWTH_INCREMENT, sizeof(XID)); if (!pNewIDs) return; memcpy(pNewIDs, pRCAP->pClientIDs, pRCAP->numClients * sizeof(XID)); pRCAP->pClientIDs = pNewIDs; pRCAP->sizeClients += CLIENT_ARRAY_GROWTH_INCREMENT; pRCAP->clientIDsSeparatelyAllocated = 1; } } pRCAP->pClientIDs[pRCAP->numClients++] = clientspec; if (pRCAP->pContext->pRecordingClient) RecordInstallHooks(pRCAP, clientspec); } /* RecordDeleteClientFromRCAP */ /* RecordDeleteClientFromContext * * Arguments: * pContext is the context to delete from. * clientspec is the resource ID mask identifying a client, or * XRecordFutureClients. * * Returns: nothing. * * Side Effects: * If clientspec is on any RCAP of the context, it is deleted from that * RCAP. (A given clientspec can only be on one RCAP of a context.) */ static void RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec) { RecordClientsAndProtocolPtr pRCAP; int position; if ((pRCAP = RecordFindClientOnContext(pContext, clientspec, &position))) RecordDeleteClientFromRCAP(pRCAP, position); } /* RecordDeleteClientFromContext */ /* RecordSanityCheckClientSpecifiers * * Arguments: * clientspecs is an array of alleged CLIENTSPECs passed by the client. * nspecs is the number of elements in clientspecs. * errorspec, if non-zero, is the resource id base of a client that * must not appear in clienspecs. * * Returns: BadMatch if any of the clientspecs are invalid, else Success. * * Side Effects: none. */ static int RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec) { int i; int clientIndex; int rc; void *value; for (i = 0; i < nspecs; i++) { if (clientspecs[i] == XRecordCurrentClients || clientspecs[i] == XRecordFutureClients || clientspecs[i] == XRecordAllClients) continue; if (errorspec && (CLIENT_BITS(clientspecs[i]) == errorspec)) return BadMatch; clientIndex = CLIENT_ID(clientspecs[i]); if (clientIndex && clients[clientIndex] && clients[clientIndex]->clientState == ClientStateRunning) { if (clientspecs[i] == clients[clientIndex]->clientAsMask) continue; rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY, client, DixGetAttrAccess); if (rc != Success) return rc; } else return BadMatch; } return Success; } /* RecordSanityCheckClientSpecifiers */ /* RecordCanonicalizeClientSpecifiers * * Arguments: * pClientspecs is an array of CLIENTSPECs that have been sanity * checked. * pNumClientspecs is a pointer to the number of elements in pClientspecs. * excludespec, if non-zero, is the resource id base of a client that * should not be included in the expansion of XRecordAllClients or * XRecordCurrentClients. * * Returns: * A pointer to an array of CLIENTSPECs that is the same as the * passed array with the following modifications: * - all but the client id bits of resource IDs are stripped off. * - duplicates removed. * - XRecordAllClients expanded to a list of all currently connected * clients + XRecordFutureClients - excludespec (if non-zero) * - XRecordCurrentClients expanded to a list of all currently * connected clients - excludespec (if non-zero) * The returned array may be the passed array modified in place, or * it may be an malloc'ed array. The caller should keep a pointer to the * original array and free the returned array if it is different. * * *pNumClientspecs is set to the number of elements in the returned * array. * * Side Effects: * pClientspecs may be modified in place. */ static XID * RecordCanonicalizeClientSpecifiers(XID *pClientspecs, int *pNumClientspecs, XID excludespec) { int i; int numClients = *pNumClientspecs; /* first pass strips off the resource index bits, leaving just the * client id bits. This makes searching for a particular client simpler * (and faster.) */ for (i = 0; i < numClients; i++) { XID cs = pClientspecs[i]; if (cs > XRecordAllClients) pClientspecs[i] = CLIENT_BITS(cs); } for (i = 0; i < numClients; i++) { if (pClientspecs[i] == XRecordAllClients || pClientspecs[i] == XRecordCurrentClients) { /* expand All/Current */ int j, nc; XID *pCanon = xallocarray(currentMaxClients + 1, sizeof(XID)); if (!pCanon) return NULL; for (nc = 0, j = 1; j < currentMaxClients; j++) { ClientPtr client = clients[j]; if (client != NullClient && client->clientState == ClientStateRunning && client->clientAsMask != excludespec) { pCanon[nc++] = client->clientAsMask; } } if (pClientspecs[i] == XRecordAllClients) pCanon[nc++] = XRecordFutureClients; *pNumClientspecs = nc; return pCanon; } else { /* not All or Current */ int j; for (j = i + 1; j < numClients;) { if (pClientspecs[i] == pClientspecs[j]) { pClientspecs[j] = pClientspecs[--numClients]; } else j++; } } } /* end for each clientspec */ *pNumClientspecs = numClients; return pClientspecs; } /* RecordCanonicalizeClientSpecifiers */ /****************************************************************************/ /* stuff for RegisterClients */ /* RecordPadAlign * * Arguments: * size is the number of bytes taken by an object. * align is a byte boundary (e.g. 4, 8) * * Returns: * the number of pad bytes to add at the end of an object of the * given size so that an object placed immediately behind it will * begin on an -byte boundary. * * Side Effects: none. */ static int RecordPadAlign(int size, int align) { return (align - (size & (align - 1))) & (align - 1); } /* RecordPadAlign */ /* RecordSanityCheckRegisterClients * * Arguments: * pContext is the context being registered on. * client is the client that issued a RecordCreateContext or * RecordRegisterClients request. * stuff is a pointer to the request. * * Returns: * Any one of several possible error values if any of the request * arguments are invalid. Success if everything is OK. * * Side Effects: none. */ static int RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegisterClientsReq * stuff) { int err; xRecordRange *pRange; int i; XID recordingClient; if (((client->req_len << 2) - SIZEOF(xRecordRegisterClientsReq)) != 4 * stuff->nClients + SIZEOF(xRecordRange) * stuff->nRanges) return BadLength; if (stuff->elementHeader & ~(XRecordFromClientSequence | XRecordFromClientTime | XRecordFromServerTime)) { client->errorValue = stuff->elementHeader; return BadValue; } recordingClient = pContext->pRecordingClient ? pContext->pRecordingClient->clientAsMask : 0; err = RecordSanityCheckClientSpecifiers(client, (XID *) &stuff[1], stuff->nClients, recordingClient); if (err != Success) return err; pRange = (xRecordRange *) (((XID *) &stuff[1]) + stuff->nClients); for (i = 0; i < stuff->nRanges; i++, pRange++) { if (pRange->coreRequestsFirst > pRange->coreRequestsLast) { client->errorValue = pRange->coreRequestsFirst; return BadValue; } if (pRange->coreRepliesFirst > pRange->coreRepliesLast) { client->errorValue = pRange->coreRepliesFirst; return BadValue; } if ((pRange->extRequestsMajorFirst || pRange->extRequestsMajorLast) && (pRange->extRequestsMajorFirst < 128 || pRange->extRequestsMajorLast < 128 || pRange->extRequestsMajorFirst > pRange->extRequestsMajorLast)) { client->errorValue = pRange->extRequestsMajorFirst; return BadValue; } if (pRange->extRequestsMinorFirst > pRange->extRequestsMinorLast) { client->errorValue = pRange->extRequestsMinorFirst; return BadValue; } if ((pRange->extRepliesMajorFirst || pRange->extRepliesMajorLast) && (pRange->extRepliesMajorFirst < 128 || pRange->extRepliesMajorLast < 128 || pRange->extRepliesMajorFirst > pRange->extRepliesMajorLast)) { client->errorValue = pRange->extRepliesMajorFirst; return BadValue; } if (pRange->extRepliesMinorFirst > pRange->extRepliesMinorLast) { client->errorValue = pRange->extRepliesMinorFirst; return BadValue; } if ((pRange->deliveredEventsFirst || pRange->deliveredEventsLast) && (pRange->deliveredEventsFirst < 2 || pRange->deliveredEventsLast < 2 || pRange->deliveredEventsFirst > pRange->deliveredEventsLast)) { client->errorValue = pRange->deliveredEventsFirst; return BadValue; } if ((pRange->deviceEventsFirst || pRange->deviceEventsLast) && (pRange->deviceEventsFirst < 2 || pRange->deviceEventsLast < 2 || pRange->deviceEventsFirst > pRange->deviceEventsLast)) { client->errorValue = pRange->deviceEventsFirst; return BadValue; } if (pRange->errorsFirst > pRange->errorsLast) { client->errorValue = pRange->errorsFirst; return BadValue; } if (pRange->clientStarted != xFalse && pRange->clientStarted != xTrue) { client->errorValue = pRange->clientStarted; return BadValue; } if (pRange->clientDied != xFalse && pRange->clientDied != xTrue) { client->errorValue = pRange->clientDied; return BadValue; } } /* end for each range */ return Success; } /* end RecordSanityCheckRegisterClients */ /* This is a tactical structure used to gather information about all the sets * (RecordSetPtr) that need to be created for an RCAP in the process of * digesting a list of RECORDRANGEs (converting it to the internal * representation). */ typedef struct { int nintervals; /* number of intervals in following array */ RecordSetInterval *intervals; /* array of intervals for this set */ int size; /* size of intervals array; >= nintervals */ int align; /* alignment restriction for set */ int offset; /* where to store set pointer rel. to start of RCAP */ short first, last; /* if for extension, major opcode interval */ } SetInfoRec, *SetInfoPtr; #if defined(ERR) && defined(__sun) #undef ERR /* Avoid conflict with Solaris */ #endif /* These constant are used to index into an array of SetInfoRec. */ enum { REQ, /* set info for requests */ REP, /* set info for replies */ ERR, /* set info for errors */ DEV, /* set info for device events */ DLEV, /* set info for delivered events */ PREDEFSETS }; /* number of predefined array entries */ /* RecordAllocIntervals * * Arguments: * psi is a pointer to a SetInfoRec whose intervals pointer is NULL. * nIntervals is the desired size of the intervals array. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * If Success is returned, psi->intervals is a pointer to size * RecordSetIntervals, all zeroed, and psi->size is set to size. */ static int RecordAllocIntervals(SetInfoPtr psi, int nIntervals) { assert(!psi->intervals); psi->intervals = xallocarray(nIntervals, sizeof(RecordSetInterval)); if (!psi->intervals) return BadAlloc; memset(psi->intervals, 0, nIntervals * sizeof(RecordSetInterval)); psi->size = nIntervals; return Success; } /* end RecordAllocIntervals */ /* RecordConvertRangesToIntervals * * Arguments: * psi is a pointer to the SetInfoRec we are building. * pRanges is an array of xRecordRanges. * nRanges is the number of elements in pRanges. * byteoffset is the offset from the start of an xRecordRange of the * two bytes (1 for first, 1 for last) we are interested in. * pExtSetInfo, if non-NULL, indicates that the two bytes mentioned * above are followed by four bytes (2 for first, 2 for last) * representing a minor opcode range, and this information should be * stored in one of the SetInfoRecs starting at pExtSetInfo. * pnExtSetInfo is the number of elements in the pExtSetInfo array. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * The slice of pRanges indicated by byteoffset is stored in psi. * If pExtSetInfo is non-NULL, minor opcode intervals are stored * in an existing SetInfoRec if the major opcode interval matches, else * they are stored in a new SetInfoRec, and *pnExtSetInfo is * increased accordingly. */ static int RecordConvertRangesToIntervals(SetInfoPtr psi, xRecordRange * pRanges, int nRanges, int byteoffset, SetInfoPtr pExtSetInfo, int *pnExtSetInfo) { int i; CARD8 *pCARD8; int first, last; int err; for (i = 0; i < nRanges; i++, pRanges++) { pCARD8 = ((CARD8 *) pRanges) + byteoffset; first = pCARD8[0]; last = pCARD8[1]; if (first || last) { if (!psi->intervals) { err = RecordAllocIntervals(psi, 2 * (nRanges - i)); if (err != Success) return err; } psi->intervals[psi->nintervals].first = first; psi->intervals[psi->nintervals].last = last; psi->nintervals++; assert(psi->nintervals <= psi->size); if (pExtSetInfo) { SetInfoPtr pesi = pExtSetInfo; CARD16 *pCARD16 = (CARD16 *) (pCARD8 + 2); int j; for (j = 0; j < *pnExtSetInfo; j++, pesi++) { if ((first == pesi->first) && (last == pesi->last)) break; } if (j == *pnExtSetInfo) { err = RecordAllocIntervals(pesi, 2 * (nRanges - i)); if (err != Success) return err; pesi->first = first; pesi->last = last; (*pnExtSetInfo)++; } pesi->intervals[pesi->nintervals].first = pCARD16[0]; pesi->intervals[pesi->nintervals].last = pCARD16[1]; pesi->nintervals++; assert(pesi->nintervals <= pesi->size); } } } return Success; } /* end RecordConvertRangesToIntervals */ #define offset_of(_structure, _field) \ ((char *)(& (_structure . _field)) - (char *)(&_structure)) /* RecordRegisterClients * * Arguments: * pContext is the context on which to register the clients. * client is the client that issued the RecordCreateContext or * RecordRegisterClients request. * stuff is a pointer to the request. * * Returns: * Any one of several possible error values defined by the protocol. * Success if everything is OK. * * Side Effects: * If different element headers are specified, the context is flushed. * If any of the specified clients are already registered on the * context, they are first unregistered. A new RCAP is created to * hold the specified protocol and clients, and it is linked onto the * context. If the context is enabled, appropriate hooks are installed * to record the new clients and protocol. */ static int RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegisterClientsReq * stuff) { int err; int i; SetInfoPtr si; int maxSets; int nExtReqSets = 0; int nExtRepSets = 0; int extReqSetsOffset = 0; int extRepSetsOffset = 0; SetInfoPtr pExtReqSets, pExtRepSets; int clientListOffset; XID *pCanonClients; int clientStarted = 0, clientDied = 0; xRecordRange *pRanges, rr; int nClients; int sizeClients; int totRCAPsize; RecordClientsAndProtocolPtr pRCAP; int pad; XID recordingClient; /* do all sanity checking up front */ err = RecordSanityCheckRegisterClients(pContext, client, stuff); if (err != Success) return err; /* if element headers changed, flush buffer */ if (pContext->elemHeaders != stuff->elementHeader) { RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0); pContext->elemHeaders = stuff->elementHeader; } nClients = stuff->nClients; if (!nClients) /* if empty clients list, we're done. */ return Success; recordingClient = pContext->pRecordingClient ? pContext->pRecordingClient->clientAsMask : 0; pCanonClients = RecordCanonicalizeClientSpecifiers((XID *) &stuff[1], &nClients, recordingClient); if (!pCanonClients) return BadAlloc; /* We may have to create as many as one set for each "predefined" * protocol types, plus one per range for extension requests, plus one per * range for extension replies. */ maxSets = PREDEFSETS + 2 * stuff->nRanges; si = xallocarray(maxSets, sizeof(SetInfoRec)); if (!si) { err = BadAlloc; goto bailout; } memset(si, 0, sizeof(SetInfoRec) * maxSets); /* theoretically you must do this because NULL may not be all-bits-zero */ for (i = 0; i < maxSets; i++) si[i].intervals = NULL; pExtReqSets = si + PREDEFSETS; pExtRepSets = pExtReqSets + stuff->nRanges; pRanges = (xRecordRange *) (((XID *) &stuff[1]) + stuff->nClients); err = RecordConvertRangesToIntervals(&si[REQ], pRanges, stuff->nRanges, offset_of(rr, coreRequestsFirst), NULL, NULL); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[REQ], pRanges, stuff->nRanges, offset_of(rr, extRequestsMajorFirst), pExtReqSets, &nExtReqSets); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[REP], pRanges, stuff->nRanges, offset_of(rr, coreRepliesFirst), NULL, NULL); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[REP], pRanges, stuff->nRanges, offset_of(rr, extRepliesMajorFirst), pExtRepSets, &nExtRepSets); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[ERR], pRanges, stuff->nRanges, offset_of(rr, errorsFirst), NULL, NULL); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[DLEV], pRanges, stuff->nRanges, offset_of(rr, deliveredEventsFirst), NULL, NULL); if (err != Success) goto bailout; err = RecordConvertRangesToIntervals(&si[DEV], pRanges, stuff->nRanges, offset_of(rr, deviceEventsFirst), NULL, NULL); if (err != Success) goto bailout; /* collect client-started and client-died */ for (i = 0; i < stuff->nRanges; i++) { if (pRanges[i].clientStarted) clientStarted = TRUE; if (pRanges[i].clientDied) clientDied = TRUE; } /* We now have all the information collected to create all the sets, * and we can compute the total memory required for the RCAP. */ totRCAPsize = sizeof(RecordClientsAndProtocolRec); /* leave a little room to grow before forcing a separate allocation */ sizeClients = nClients + CLIENT_ARRAY_GROWTH_INCREMENT; pad = RecordPadAlign(totRCAPsize, sizeof(XID)); clientListOffset = totRCAPsize + pad; totRCAPsize += pad + sizeClients * sizeof(XID); if (nExtReqSets) { pad = RecordPadAlign(totRCAPsize, sizeof(RecordSetPtr)); extReqSetsOffset = totRCAPsize + pad; totRCAPsize += pad + (nExtReqSets + 1) * sizeof(RecordMinorOpRec); } if (nExtRepSets) { pad = RecordPadAlign(totRCAPsize, sizeof(RecordSetPtr)); extRepSetsOffset = totRCAPsize + pad; totRCAPsize += pad + (nExtRepSets + 1) * sizeof(RecordMinorOpRec); } for (i = 0; i < maxSets; i++) { if (si[i].nintervals) { si[i].size = RecordSetMemoryRequirements(si[i].intervals, si[i].nintervals, &si[i].align); pad = RecordPadAlign(totRCAPsize, si[i].align); si[i].offset = pad + totRCAPsize; totRCAPsize += pad + si[i].size; } } /* allocate memory for the whole RCAP */ pRCAP = (RecordClientsAndProtocolPtr) malloc(totRCAPsize); if (!pRCAP) { err = BadAlloc; goto bailout; } /* fill in the RCAP */ pRCAP->pContext = pContext; pRCAP->pClientIDs = (XID *) ((char *) pRCAP + clientListOffset); pRCAP->numClients = nClients; pRCAP->sizeClients = sizeClients; pRCAP->clientIDsSeparatelyAllocated = 0; for (i = 0; i < nClients; i++) { RecordDeleteClientFromContext(pContext, pCanonClients[i]); pRCAP->pClientIDs[i] = pCanonClients[i]; } /* create all the sets */ if (si[REQ].intervals) { pRCAP->pRequestMajorOpSet = RecordCreateSet(si[REQ].intervals, si[REQ].nintervals, (RecordSetPtr) ((char *) pRCAP + si[REQ].offset), si[REQ].size); } else pRCAP->pRequestMajorOpSet = NULL; if (si[REP].intervals) { pRCAP->pReplyMajorOpSet = RecordCreateSet(si[REP].intervals, si[REP].nintervals, (RecordSetPtr) ((char *) pRCAP + si[REP].offset), si[REP].size); } else pRCAP->pReplyMajorOpSet = NULL; if (si[ERR].intervals) { pRCAP->pErrorSet = RecordCreateSet(si[ERR].intervals, si[ERR].nintervals, (RecordSetPtr) ((char *) pRCAP + si[ERR].offset), si[ERR].size); } else pRCAP->pErrorSet = NULL; if (si[DEV].intervals) { pRCAP->pDeviceEventSet = RecordCreateSet(si[DEV].intervals, si[DEV].nintervals, (RecordSetPtr) ((char *) pRCAP + si[DEV].offset), si[DEV].size); } else pRCAP->pDeviceEventSet = NULL; if (si[DLEV].intervals) { pRCAP->pDeliveredEventSet = RecordCreateSet(si[DLEV].intervals, si[DLEV].nintervals, (RecordSetPtr) ((char *) pRCAP + si[DLEV].offset), si[DLEV].size); } else pRCAP->pDeliveredEventSet = NULL; if (nExtReqSets) { pRCAP->pRequestMinOpInfo = (RecordMinorOpPtr) ((char *) pRCAP + extReqSetsOffset); pRCAP->pRequestMinOpInfo[0].count = nExtReqSets; for (i = 0; i < nExtReqSets; i++, pExtReqSets++) { pRCAP->pRequestMinOpInfo[i + 1].major.first = pExtReqSets->first; pRCAP->pRequestMinOpInfo[i + 1].major.last = pExtReqSets->last; pRCAP->pRequestMinOpInfo[i + 1].major.pMinOpSet = RecordCreateSet(pExtReqSets->intervals, pExtReqSets->nintervals, (RecordSetPtr) ((char *) pRCAP + pExtReqSets->offset), pExtReqSets->size); } } else pRCAP->pRequestMinOpInfo = NULL; if (nExtRepSets) { pRCAP->pReplyMinOpInfo = (RecordMinorOpPtr) ((char *) pRCAP + extRepSetsOffset); pRCAP->pReplyMinOpInfo[0].count = nExtRepSets; for (i = 0; i < nExtRepSets; i++, pExtRepSets++) { pRCAP->pReplyMinOpInfo[i + 1].major.first = pExtRepSets->first; pRCAP->pReplyMinOpInfo[i + 1].major.last = pExtRepSets->last; pRCAP->pReplyMinOpInfo[i + 1].major.pMinOpSet = RecordCreateSet(pExtRepSets->intervals, pExtRepSets->nintervals, (RecordSetPtr) ((char *) pRCAP + pExtRepSets->offset), pExtRepSets->size); } } else pRCAP->pReplyMinOpInfo = NULL; pRCAP->clientStarted = clientStarted; pRCAP->clientDied = clientDied; /* link the RCAP onto the context */ pRCAP->pNextRCAP = pContext->pListOfRCAP; pContext->pListOfRCAP = pRCAP; if (pContext->pRecordingClient) /* context enabled */ RecordInstallHooks(pRCAP, 0); bailout: if (si) { for (i = 0; i < maxSets; i++) free(si[i].intervals); free(si); } if (pCanonClients && pCanonClients != (XID *) &stuff[1]) free(pCanonClients); return err; } /* RecordRegisterClients */ /* Proc functions all take a client argument, execute the request in * client->requestBuffer, and return a protocol error status. */ static int ProcRecordQueryVersion(ClientPtr client) { /* REQUEST(xRecordQueryVersionReq); */ xRecordQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_RECORD_MAJOR_VERSION, .minorVersion = SERVER_RECORD_MINOR_VERSION }; REQUEST_SIZE_MATCH(xRecordQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xRecordQueryVersionReply), &rep); return Success; } /* ProcRecordQueryVersion */ static int ProcRecordCreateContext(ClientPtr client) { REQUEST(xRecordCreateContextReq); RecordContextPtr pContext; RecordContextPtr *ppNewAllContexts = NULL; int err = BadAlloc; REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq); LEGAL_NEW_RESOURCE(stuff->context, client); pContext = (RecordContextPtr) malloc(sizeof(RecordContextRec)); if (!pContext) goto bailout; /* make sure there is room in ppAllContexts to store the new context */ ppNewAllContexts = reallocarray(ppAllContexts, numContexts + 1, sizeof(RecordContextPtr)); if (!ppNewAllContexts) goto bailout; ppAllContexts = ppNewAllContexts; pContext->id = stuff->context; pContext->pRecordingClient = NULL; pContext->pListOfRCAP = NULL; pContext->elemHeaders = 0; pContext->bufCategory = 0; pContext->numBufBytes = 0; pContext->pBufClient = NULL; pContext->continuedReply = 0; pContext->inFlush = 0; err = RecordRegisterClients(pContext, client, (xRecordRegisterClientsReq *) stuff); if (err != Success) goto bailout; if (AddResource(pContext->id, RTContext, pContext)) { ppAllContexts[numContexts++] = pContext; return Success; } else { return BadAlloc; } bailout: free(pContext); return err; } /* ProcRecordCreateContext */ static int ProcRecordRegisterClients(ClientPtr client) { RecordContextPtr pContext; REQUEST(xRecordRegisterClientsReq); REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq); VERIFY_CONTEXT(pContext, stuff->context, client); return RecordRegisterClients(pContext, client, stuff); } /* ProcRecordRegisterClients */ static int ProcRecordUnregisterClients(ClientPtr client) { RecordContextPtr pContext; int err; REQUEST(xRecordUnregisterClientsReq); XID *pCanonClients; int nClients; int i; REQUEST_AT_LEAST_SIZE(xRecordUnregisterClientsReq); if (INT_MAX / 4 < stuff->nClients || (client->req_len << 2) - SIZEOF(xRecordUnregisterClientsReq) != 4 * stuff->nClients) return BadLength; VERIFY_CONTEXT(pContext, stuff->context, client); err = RecordSanityCheckClientSpecifiers(client, (XID *) &stuff[1], stuff->nClients, 0); if (err != Success) return err; nClients = stuff->nClients; pCanonClients = RecordCanonicalizeClientSpecifiers((XID *) &stuff[1], &nClients, 0); if (!pCanonClients) return BadAlloc; for (i = 0; i < nClients; i++) { RecordDeleteClientFromContext(pContext, pCanonClients[i]); } if (pCanonClients != (XID *) &stuff[1]) free(pCanonClients); return Success; } /* ProcRecordUnregisterClients */ /****************************************************************************/ /* stuff for GetContext */ /* This is a tactical structure used to hold the xRecordRanges as they are * being reconstituted from the sets in the RCAPs. */ typedef struct { xRecordRange *pRanges; /* array of xRecordRanges for one RCAP */ int size; /* number of elements in pRanges, >= nRanges */ int nRanges; /* number of occupied element of pRanges */ } GetContextRangeInfoRec, *GetContextRangeInfoPtr; /* RecordAllocRanges * * Arguments: * pri is a pointer to a GetContextRangeInfoRec to allocate for. * nRanges is the number of xRecordRanges desired for pri. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * If Success is returned, pri->pRanges points to at least nRanges * ranges. pri->nRanges is set to nRanges. pri->size is the actual * number of ranges. Newly allocated ranges are zeroed. */ static int RecordAllocRanges(GetContextRangeInfoPtr pri, int nRanges) { int newsize; xRecordRange *pNewRange; #define SZINCR 8 newsize = max(pri->size + SZINCR, nRanges); pNewRange = reallocarray(pri->pRanges, newsize, sizeof(xRecordRange)); if (!pNewRange) return BadAlloc; pri->pRanges = pNewRange; pri->size = newsize; memset(&pri->pRanges[pri->size - SZINCR], 0, SZINCR * sizeof(xRecordRange)); if (pri->nRanges < nRanges) pri->nRanges = nRanges; return Success; } /* RecordAllocRanges */ /* RecordConvertSetToRanges * * Arguments: * pSet is the set to be converted. * pri is where the result should be stored. * byteoffset is the offset from the start of an xRecordRange of the * two vales (first, last) we are interested in. * card8 is TRUE if the vales are one byte each and FALSE if two bytes * each. * imax is the largest set value to store in pri->pRanges. * pStartIndex, if non-NULL, is the index of the first range in * pri->pRanges that should be stored to. If NULL, * start at index 0. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * If Success is returned, the slice of pri->pRanges indicated by * byteoffset and card8 is filled in with the intervals from pSet. * if pStartIndex was non-NULL, *pStartIndex is filled in with one * more than the index of the last xRecordRange that was touched. */ static int RecordConvertSetToRanges(RecordSetPtr pSet, GetContextRangeInfoPtr pri, int byteoffset, Bool card8, unsigned int imax, int *pStartIndex) { int nRanges; RecordSetIteratePtr pIter = NULL; RecordSetInterval interval; CARD8 *pCARD8; CARD16 *pCARD16; int err; if (!pSet) return Success; nRanges = pStartIndex ? *pStartIndex : 0; while ((pIter = RecordIterateSet(pSet, pIter, &interval))) { if (interval.first > imax) break; if (interval.last > imax) interval.last = imax; nRanges++; if (nRanges > pri->size) { err = RecordAllocRanges(pri, nRanges); if (err != Success) return err; } else pri->nRanges = max(pri->nRanges, nRanges); if (card8) { pCARD8 = ((CARD8 *) &pri->pRanges[nRanges - 1]) + byteoffset; *pCARD8++ = interval.first; *pCARD8 = interval.last; } else { pCARD16 = (CARD16 *) (((char *) &pri->pRanges[nRanges - 1]) + byteoffset); *pCARD16++ = interval.first; *pCARD16 = interval.last; } } if (pStartIndex) *pStartIndex = nRanges; return Success; } /* RecordConvertSetToRanges */ /* RecordConvertMinorOpInfoToRanges * * Arguments: * pMinOpInfo is the minor opcode info to convert to xRecordRanges. * pri is where the result should be stored. * byteoffset is the offset from the start of an xRecordRange of the * four vales (CARD8 major_first, CARD8 major_last, * CARD16 minor_first, CARD16 minor_last) we are going to store. * * Returns: BadAlloc if a memory allocation error occurred, else Success. * * Side Effects: * If Success is returned, the slice of pri->pRanges indicated by * byteoffset is filled in with the information from pMinOpInfo. */ static int RecordConvertMinorOpInfoToRanges(RecordMinorOpPtr pMinOpInfo, GetContextRangeInfoPtr pri, int byteoffset) { int nsets; int start; int i; int err; if (!pMinOpInfo) return Success; nsets = pMinOpInfo->count; pMinOpInfo++; start = 0; for (i = 0; i < nsets; i++) { int j, s; s = start; err = RecordConvertSetToRanges(pMinOpInfo[i].major.pMinOpSet, pri, byteoffset + 2, FALSE, 65535, &start); if (err != Success) return err; for (j = s; j < start; j++) { CARD8 *pCARD8 = ((CARD8 *) &pri->pRanges[j]) + byteoffset; *pCARD8++ = pMinOpInfo[i].major.first; *pCARD8 = pMinOpInfo[i].major.last; } } return Success; } /* RecordConvertMinorOpInfoToRanges */ /* RecordSwapRanges * * Arguments: * pRanges is an array of xRecordRanges. * nRanges is the number of elements in pRanges. * * Returns: nothing. * * Side Effects: * The 16 bit fields of each xRecordRange are byte swapped. */ static void RecordSwapRanges(xRecordRange * pRanges, int nRanges) { int i; for (i = 0; i < nRanges; i++, pRanges++) { swaps(&pRanges->extRequestsMinorFirst); swaps(&pRanges->extRequestsMinorLast); swaps(&pRanges->extRepliesMinorFirst); swaps(&pRanges->extRepliesMinorLast); } } /* RecordSwapRanges */ static int ProcRecordGetContext(ClientPtr client) { RecordContextPtr pContext; REQUEST(xRecordGetContextReq); xRecordGetContextReply rep; RecordClientsAndProtocolPtr pRCAP; int nRCAPs = 0; GetContextRangeInfoPtr pRangeInfo; GetContextRangeInfoPtr pri; int i; int err; CARD32 nClients, length; REQUEST_SIZE_MATCH(xRecordGetContextReq); VERIFY_CONTEXT(pContext, stuff->context, client); /* how many RCAPs are there on this context? */ for (pRCAP = pContext->pListOfRCAP; pRCAP; pRCAP = pRCAP->pNextRCAP) nRCAPs++; /* allocate and initialize space for record range info */ pRangeInfo = xallocarray(nRCAPs, sizeof(GetContextRangeInfoRec)); if (!pRangeInfo && nRCAPs > 0) return BadAlloc; for (i = 0; i < nRCAPs; i++) { pRangeInfo[i].pRanges = NULL; pRangeInfo[i].size = 0; pRangeInfo[i].nRanges = 0; } /* convert the RCAP (internal) representation of the recorded protocol * to the wire protocol (external) representation, storing the information * for the ith RCAP in pri[i] */ for (pRCAP = pContext->pListOfRCAP, pri = pRangeInfo; pRCAP; pRCAP = pRCAP->pNextRCAP, pri++) { xRecordRange rr; err = RecordConvertSetToRanges(pRCAP->pRequestMajorOpSet, pri, offset_of(rr, coreRequestsFirst), TRUE, 127, NULL); if (err != Success) goto bailout; err = RecordConvertSetToRanges(pRCAP->pReplyMajorOpSet, pri, offset_of(rr, coreRepliesFirst), TRUE, 127, NULL); if (err != Success) goto bailout; err = RecordConvertSetToRanges(pRCAP->pDeliveredEventSet, pri, offset_of(rr, deliveredEventsFirst), TRUE, 255, NULL); if (err != Success) goto bailout; err = RecordConvertSetToRanges(pRCAP->pDeviceEventSet, pri, offset_of(rr, deviceEventsFirst), TRUE, 255, NULL); if (err != Success) goto bailout; err = RecordConvertSetToRanges(pRCAP->pErrorSet, pri, offset_of(rr, errorsFirst), TRUE, 255, NULL); if (err != Success) goto bailout; err = RecordConvertMinorOpInfoToRanges(pRCAP->pRequestMinOpInfo, pri, offset_of(rr, extRequestsMajorFirst)); if (err != Success) goto bailout; err = RecordConvertMinorOpInfoToRanges(pRCAP->pReplyMinOpInfo, pri, offset_of(rr, extRepliesMajorFirst)); if (err != Success) goto bailout; if (pRCAP->clientStarted || pRCAP->clientDied) { if (pri->nRanges == 0) RecordAllocRanges(pri, 1); pri->pRanges[0].clientStarted = pRCAP->clientStarted; pri->pRanges[0].clientDied = pRCAP->clientDied; } } /* calculate number of clients and reply length */ nClients = 0; length = 0; for (pRCAP = pContext->pListOfRCAP, pri = pRangeInfo; pRCAP; pRCAP = pRCAP->pNextRCAP, pri++) { nClients += pRCAP->numClients; length += pRCAP->numClients * (bytes_to_int32(sizeof(xRecordClientInfo)) + pri->nRanges * bytes_to_int32(sizeof(xRecordRange))); } /* write the reply header */ rep = (xRecordGetContextReply) { .type = X_Reply, .enabled = pContext->pRecordingClient != NULL, .sequenceNumber = client->sequence, .length = length, .elementHeader = pContext->elemHeaders, .nClients = nClients }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.nClients); } WriteToClient(client, sizeof(xRecordGetContextReply), &rep); /* write all the CLIENT_INFOs */ for (pRCAP = pContext->pListOfRCAP, pri = pRangeInfo; pRCAP; pRCAP = pRCAP->pNextRCAP, pri++) { xRecordClientInfo rci; rci.nRanges = pri->nRanges; if (client->swapped) { swapl(&rci.nRanges); RecordSwapRanges(pri->pRanges, pri->nRanges); } for (i = 0; i < pRCAP->numClients; i++) { rci.clientResource = pRCAP->pClientIDs[i]; if (client->swapped) swapl(&rci.clientResource); WriteToClient(client, sizeof(xRecordClientInfo), &rci); WriteToClient(client, sizeof(xRecordRange) * pri->nRanges, pri->pRanges); } } err = Success; bailout: for (i = 0; i < nRCAPs; i++) { free(pRangeInfo[i].pRanges); } free(pRangeInfo); return err; } /* ProcRecordGetContext */ static int ProcRecordEnableContext(ClientPtr client) { RecordContextPtr pContext; REQUEST(xRecordEnableContextReq); int i; RecordClientsAndProtocolPtr pRCAP; REQUEST_SIZE_MATCH(xRecordGetContextReq); VERIFY_CONTEXT(pContext, stuff->context, client); if (pContext->pRecordingClient) return BadMatch; /* already enabled */ /* install record hooks for each RCAP */ for (pRCAP = pContext->pListOfRCAP; pRCAP; pRCAP = pRCAP->pNextRCAP) { int err = RecordInstallHooks(pRCAP, 0); if (err != Success) { /* undo the previous installs */ RecordClientsAndProtocolPtr pUninstallRCAP; for (pUninstallRCAP = pContext->pListOfRCAP; pUninstallRCAP != pRCAP; pUninstallRCAP = pUninstallRCAP->pNextRCAP) { RecordUninstallHooks(pUninstallRCAP, 0); } return err; } } /* Disallow further request processing on this connection until * the context is disabled. */ IgnoreClient(client); pContext->pRecordingClient = client; /* Don't allow the data connection to record itself; unregister it. */ RecordDeleteClientFromContext(pContext, pContext->pRecordingClient->clientAsMask); /* move the newly enabled context to the front part of ppAllContexts, * where all the enabled contexts are */ i = RecordFindContextOnAllContexts(pContext); assert(i >= numEnabledContexts); if (i != numEnabledContexts) { ppAllContexts[i] = ppAllContexts[numEnabledContexts]; ppAllContexts[numEnabledContexts] = pContext; } ++numEnabledContexts; assert(numEnabledContexts > 0); /* send StartOfData */ RecordAProtocolElement(pContext, NULL, XRecordStartOfData, NULL, 0, 0, 0); RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0); return Success; } /* ProcRecordEnableContext */ /* RecordDisableContext * * Arguments: * pContext is the context to disable. * nRanges is the number of elements in pRanges. * * Returns: nothing. * * Side Effects: * If the context was enabled, it is disabled. An EndOfData * message is sent to the recording client. Recording hooks for * this context are uninstalled. The context is moved to the * rear part of the ppAllContexts array. numEnabledContexts is * decremented. Request processing for the formerly recording client * is resumed. */ static void RecordDisableContext(RecordContextPtr pContext) { RecordClientsAndProtocolPtr pRCAP; int i; if (!pContext->pRecordingClient) return; if (!pContext->pRecordingClient->clientGone) { RecordAProtocolElement(pContext, NULL, XRecordEndOfData, NULL, 0, 0, 0); RecordFlushReplyBuffer(pContext, NULL, 0, NULL, 0); } /* Re-enable request processing on this connection. */ AttendClient(pContext->pRecordingClient); for (pRCAP = pContext->pListOfRCAP; pRCAP; pRCAP = pRCAP->pNextRCAP) { RecordUninstallHooks(pRCAP, 0); } pContext->pRecordingClient = NULL; /* move the newly disabled context to the rear part of ppAllContexts, * where all the disabled contexts are */ i = RecordFindContextOnAllContexts(pContext); assert(i != -1); assert(i < numEnabledContexts); if (i != (numEnabledContexts - 1)) { ppAllContexts[i] = ppAllContexts[numEnabledContexts - 1]; ppAllContexts[numEnabledContexts - 1] = pContext; } --numEnabledContexts; assert(numEnabledContexts >= 0); } /* RecordDisableContext */ static int ProcRecordDisableContext(ClientPtr client) { RecordContextPtr pContext; REQUEST(xRecordDisableContextReq); REQUEST_SIZE_MATCH(xRecordDisableContextReq); VERIFY_CONTEXT(pContext, stuff->context, client); RecordDisableContext(pContext); return Success; } /* ProcRecordDisableContext */ /* RecordDeleteContext * * Arguments: * value is the context to delete. * id is its resource ID. * * Returns: Success. * * Side Effects: * Disables the context, frees all associated memory, and removes * it from the ppAllContexts array. */ static int RecordDeleteContext(void *value, XID id) { int i; RecordContextPtr pContext = (RecordContextPtr) value; RecordClientsAndProtocolPtr pRCAP; RecordDisableContext(pContext); /* Remove all the clients from all the RCAPs. * As a result, the RCAPs will be freed. */ while ((pRCAP = pContext->pListOfRCAP)) { int numClients = pRCAP->numClients; /* when the last client is deleted, the RCAP will go away. */ while (numClients--) { RecordDeleteClientFromRCAP(pRCAP, numClients); } } /* remove context from AllContexts list */ if (-1 != (i = RecordFindContextOnAllContexts(pContext))) { ppAllContexts[i] = ppAllContexts[numContexts - 1]; if (--numContexts == 0) { free(ppAllContexts); ppAllContexts = NULL; } } free(pContext); return Success; } /* RecordDeleteContext */ static int ProcRecordFreeContext(ClientPtr client) { RecordContextPtr pContext; REQUEST(xRecordFreeContextReq); REQUEST_SIZE_MATCH(xRecordFreeContextReq); VERIFY_CONTEXT(pContext, stuff->context, client); FreeResource(stuff->context, RT_NONE); return Success; } /* ProcRecordFreeContext */ static int ProcRecordDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_RecordQueryVersion: return ProcRecordQueryVersion(client); case X_RecordCreateContext: return ProcRecordCreateContext(client); case X_RecordRegisterClients: return ProcRecordRegisterClients(client); case X_RecordUnregisterClients: return ProcRecordUnregisterClients(client); case X_RecordGetContext: return ProcRecordGetContext(client); case X_RecordEnableContext: return ProcRecordEnableContext(client); case X_RecordDisableContext: return ProcRecordDisableContext(client); case X_RecordFreeContext: return ProcRecordFreeContext(client); default: return BadRequest; } } /* ProcRecordDispatch */ static int _X_COLD SProcRecordQueryVersion(ClientPtr client) { REQUEST(xRecordQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecordQueryVersionReq); swaps(&stuff->majorVersion); swaps(&stuff->minorVersion); return ProcRecordQueryVersion(client); } /* SProcRecordQueryVersion */ static int _X_COLD SwapCreateRegister(ClientPtr client, xRecordRegisterClientsReq * stuff) { int i; XID *pClientID; swapl(&stuff->context); swapl(&stuff->nClients); swapl(&stuff->nRanges); pClientID = (XID *) &stuff[1]; if (stuff->nClients > client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq)) return BadLength; for (i = 0; i < stuff->nClients; i++, pClientID++) { swapl(pClientID); } if (stuff->nRanges > (client->req_len - bytes_to_int32(sz_xRecordRegisterClientsReq) - stuff->nClients) / bytes_to_int32(sz_xRecordRange)) return BadLength; RecordSwapRanges((xRecordRange *) pClientID, stuff->nRanges); return Success; } /* SwapCreateRegister */ static int _X_COLD SProcRecordCreateContext(ClientPtr client) { REQUEST(xRecordCreateContextReq); int status; swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq); if ((status = SwapCreateRegister(client, (void *) stuff)) != Success) return status; return ProcRecordCreateContext(client); } /* SProcRecordCreateContext */ static int _X_COLD SProcRecordRegisterClients(ClientPtr client) { REQUEST(xRecordRegisterClientsReq); int status; swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xRecordRegisterClientsReq); if ((status = SwapCreateRegister(client, (void *) stuff)) != Success) return status; return ProcRecordRegisterClients(client); } /* SProcRecordRegisterClients */ static int _X_COLD SProcRecordUnregisterClients(ClientPtr client) { REQUEST(xRecordUnregisterClientsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xRecordUnregisterClientsReq); swapl(&stuff->context); swapl(&stuff->nClients); SwapRestL(stuff); return ProcRecordUnregisterClients(client); } /* SProcRecordUnregisterClients */ static int _X_COLD SProcRecordGetContext(ClientPtr client) { REQUEST(xRecordGetContextReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecordGetContextReq); swapl(&stuff->context); return ProcRecordGetContext(client); } /* SProcRecordGetContext */ static int _X_COLD SProcRecordEnableContext(ClientPtr client) { REQUEST(xRecordEnableContextReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecordEnableContextReq); swapl(&stuff->context); return ProcRecordEnableContext(client); } /* SProcRecordEnableContext */ static int _X_COLD SProcRecordDisableContext(ClientPtr client) { REQUEST(xRecordDisableContextReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecordDisableContextReq); swapl(&stuff->context); return ProcRecordDisableContext(client); } /* SProcRecordDisableContext */ static int _X_COLD SProcRecordFreeContext(ClientPtr client) { REQUEST(xRecordFreeContextReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xRecordFreeContextReq); swapl(&stuff->context); return ProcRecordFreeContext(client); } /* SProcRecordFreeContext */ static int _X_COLD SProcRecordDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_RecordQueryVersion: return SProcRecordQueryVersion(client); case X_RecordCreateContext: return SProcRecordCreateContext(client); case X_RecordRegisterClients: return SProcRecordRegisterClients(client); case X_RecordUnregisterClients: return SProcRecordUnregisterClients(client); case X_RecordGetContext: return SProcRecordGetContext(client); case X_RecordEnableContext: return SProcRecordEnableContext(client); case X_RecordDisableContext: return SProcRecordDisableContext(client); case X_RecordFreeContext: return SProcRecordFreeContext(client); default: return BadRequest; } } /* SProcRecordDispatch */ /* RecordConnectionSetupInfo * * Arguments: * pContext is an enabled context that specifies recording of * connection setup info. * pci holds the connection setup info. * * Returns: nothing. * * Side Effects: * The connection setup info is sent to the recording client. */ static void RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec * pci) { int prefixsize = SIZEOF(xConnSetupPrefix); int restsize = pci->prefix->length * 4; if (pci->client->swapped) { char *pConnSetup = (char *) malloc(prefixsize + restsize); if (!pConnSetup) return; SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix *) pConnSetup); SwapConnSetupInfo((char *) pci->setup, (char *) (pConnSetup + prefixsize)); RecordAProtocolElement(pContext, pci->client, XRecordClientStarted, (void *) pConnSetup, prefixsize + restsize, 0, 0); free(pConnSetup); } else { /* don't alloc and copy as in the swapped case; just send the * data in two pieces */ RecordAProtocolElement(pContext, pci->client, XRecordClientStarted, (void *) pci->prefix, prefixsize, 0, restsize); RecordAProtocolElement(pContext, pci->client, XRecordClientStarted, (void *) pci->setup, restsize, 0, /* continuation */ -1); } } /* RecordConnectionSetupInfo */ /* RecordDeleteContext * * Arguments: * pcbl is &ClientStateCallback. * nullata is NULL. * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) * which contains information about client state changes. * * Returns: nothing. * * Side Effects: * If a new client has connected and any contexts have specified * XRecordFutureClients, the new client is registered on those contexts. * If any of those contexts specify recording of the connection setup * info, it is recorded. * * If an existing client has disconnected, it is deleted from any * contexts that it was registered on. If any of those contexts * specified XRecordClientDied, they record a ClientDied protocol element. * If the disconnectiong client happened to be the data connection of an * enabled context, the context is disabled. */ static void RecordAClientStateChange(CallbackListPtr *pcbl, void *nulldata, void *calldata) { NewClientInfoRec *pci = (NewClientInfoRec *) calldata; int i; ClientPtr pClient = pci->client; RecordContextPtr *ppAllContextsCopy = NULL; int numContextsCopy = 0; switch (pClient->clientState) { case ClientStateRunning: /* new client */ for (i = 0; i < numContexts; i++) { RecordClientsAndProtocolPtr pRCAP; RecordContextPtr pContext = ppAllContexts[i]; if ((pRCAP = RecordFindClientOnContext(pContext, XRecordFutureClients, NULL))) { RecordAddClientToRCAP(pRCAP, pClient->clientAsMask); if (pContext->pRecordingClient && pRCAP->clientStarted) RecordConnectionSetupInfo(pContext, pci); } } break; case ClientStateGone: case ClientStateRetained: /* client disconnected */ /* RecordDisableContext modifies contents of ppAllContexts. */ if (!(numContextsCopy = numContexts)) break; ppAllContextsCopy = xallocarray(numContextsCopy, sizeof(RecordContextPtr)); assert(ppAllContextsCopy); memcpy(ppAllContextsCopy, ppAllContexts, numContextsCopy * sizeof(RecordContextPtr)); for (i = 0; i < numContextsCopy; i++) { RecordClientsAndProtocolPtr pRCAP; RecordContextPtr pContext = ppAllContextsCopy[i]; int pos; if (pContext->pRecordingClient == pClient) RecordDisableContext(pContext); if ((pRCAP = RecordFindClientOnContext(pContext, pClient->clientAsMask, &pos))) { if (pContext->pRecordingClient && pRCAP->clientDied) RecordAProtocolElement(pContext, pClient, XRecordClientDied, NULL, 0, 0, 0); RecordDeleteClientFromRCAP(pRCAP, pos); } } free(ppAllContextsCopy); break; default: break; } /* end switch on client state */ } /* RecordAClientStateChange */ /* RecordCloseDown * * Arguments: * extEntry is the extension information for RECORD. * * Returns: nothing. * * Side Effects: * Performs any cleanup needed by RECORD at server shutdown time. * */ static void RecordCloseDown(ExtensionEntry * extEntry) { DeleteCallback(&ClientStateCallback, RecordAClientStateChange, NULL); } /* RecordCloseDown */ /* RecordExtensionInit * * Arguments: none. * * Returns: nothing. * * Side Effects: * Enables the RECORD extension if possible. */ void RecordExtensionInit(void) { ExtensionEntry *extentry; RTContext = CreateNewResourceType(RecordDeleteContext, "RecordContext"); if (!RTContext) return; if (!dixRegisterPrivateKey(RecordClientPrivateKey, PRIVATE_CLIENT, 0)) return; ppAllContexts = NULL; numContexts = numEnabledContexts = numEnabledRCAPs = 0; if (!AddCallback(&ClientStateCallback, RecordAClientStateChange, NULL)) return; extentry = AddExtension(RECORD_NAME, RecordNumEvents, RecordNumErrors, ProcRecordDispatch, SProcRecordDispatch, RecordCloseDown, StandardMinorOpcode); if (!extentry) { DeleteCallback(&ClientStateCallback, RecordAClientStateChange, NULL); return; } SetResourceTypeErrorValue(RTContext, extentry->errorBase + XRecordBadContext); } /* RecordExtensionInit */ xorg-server-21.1.16/record/set.c0000644000175000017500000003062314757411105012054 /* Copyright 1995, 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. */ /* See the header set.h for a description of the set ADT. Implementation Strategy A bit vector is an obvious choice to represent the set, but may take too much memory, depending on the numerically largest member in the set. One expected common case is for the client to ask for *all* protocol. This means it would ask for minor opcodes 0 through 65535. Representing this as a bit vector takes 8K -- and there may be multiple minor opcode intervals, as many as one per major (extension) opcode). In such cases, a list-of-intervals representation would be preferable to reduce memory consumption. Both representations will be implemented, and RecordCreateSet will decide heuristically which one to use based on the set members. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "set.h" static int maxMemberInInterval(RecordSetInterval * pIntervals, int nIntervals) { int i; int maxMember = -1; for (i = 0; i < nIntervals; i++) { if (maxMember < (int) pIntervals[i].last) maxMember = pIntervals[i].last; } return maxMember; } static void NoopDestroySet(RecordSetPtr pSet) { } /***************************************************************************/ /* set operations for bit vector representation */ typedef struct { RecordSetRec baseSet; int maxMember; /* followed by the bit vector itself */ } BitVectorSet, *BitVectorSetPtr; #define BITS_PER_LONG (sizeof(unsigned long) * 8) static void BitVectorDestroySet(RecordSetPtr pSet) { free(pSet); } static unsigned long BitVectorIsMemberOfSet(RecordSetPtr pSet, int pm) { BitVectorSetPtr pbvs = (BitVectorSetPtr) pSet; unsigned long *pbitvec; if ((int) pm > pbvs->maxMember) return FALSE; pbitvec = (unsigned long *) (&pbvs[1]); return (pbitvec[pm / BITS_PER_LONG] & ((unsigned long) 1 << (pm % BITS_PER_LONG))); } static int BitVectorFindBit(RecordSetPtr pSet, int iterbit, Bool bitval) { BitVectorSetPtr pbvs = (BitVectorSetPtr) pSet; unsigned long *pbitvec = (unsigned long *) (&pbvs[1]); int startlong; int startbit; int walkbit; int maxMember; unsigned long skipval; unsigned long bits; unsigned long usefulbits; startlong = iterbit / BITS_PER_LONG; pbitvec += startlong; startbit = startlong * BITS_PER_LONG; skipval = bitval ? 0L : ~0L; maxMember = pbvs->maxMember; if (startbit > maxMember) return -1; bits = *pbitvec; usefulbits = ~(((unsigned long) 1 << (iterbit - startbit)) - 1); if ((bits & usefulbits) == (skipval & usefulbits)) { pbitvec++; startbit += BITS_PER_LONG; while (startbit <= maxMember && *pbitvec == skipval) { pbitvec++; startbit += BITS_PER_LONG; } if (startbit > maxMember) return -1; } walkbit = (startbit < iterbit) ? iterbit - startbit : 0; bits = *pbitvec; while (walkbit < BITS_PER_LONG && ((!(bits & ((unsigned long) 1 << walkbit))) == bitval)) walkbit++; return startbit + walkbit; } static RecordSetIteratePtr BitVectorIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter, RecordSetInterval * pInterval) { int iterbit = (int) (long) pIter; int b; b = BitVectorFindBit(pSet, iterbit, TRUE); if (b == -1) return (RecordSetIteratePtr) 0; pInterval->first = b; b = BitVectorFindBit(pSet, b, FALSE); pInterval->last = (b < 0) ? ((BitVectorSetPtr) pSet)->maxMember : b - 1; return (RecordSetIteratePtr) (long) (pInterval->last + 1); } static RecordSetOperations BitVectorSetOperations = { BitVectorDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet }; static RecordSetOperations BitVectorNoFreeOperations = { NoopDestroySet, BitVectorIsMemberOfSet, BitVectorIterateSet }; static int BitVectorSetMemoryRequirements(RecordSetInterval * pIntervals, int nIntervals, int maxMember, int *alignment) { int nlongs; *alignment = sizeof(unsigned long); nlongs = (maxMember + BITS_PER_LONG) / BITS_PER_LONG; return (sizeof(BitVectorSet) + nlongs * sizeof(unsigned long)); } static RecordSetPtr BitVectorCreateSet(RecordSetInterval * pIntervals, int nIntervals, void *pMem, int memsize) { BitVectorSetPtr pbvs; int i, j; unsigned long *pbitvec; /* allocate all storage needed by this set in one chunk */ if (pMem) { memset(pMem, 0, memsize); pbvs = (BitVectorSetPtr) pMem; pbvs->baseSet.ops = &BitVectorNoFreeOperations; } else { pbvs = (BitVectorSetPtr) calloc(1, memsize); if (!pbvs) return NULL; pbvs->baseSet.ops = &BitVectorSetOperations; } pbvs->maxMember = maxMemberInInterval(pIntervals, nIntervals); /* fill in the set */ pbitvec = (unsigned long *) (&pbvs[1]); for (i = 0; i < nIntervals; i++) { for (j = pIntervals[i].first; j <= (int) pIntervals[i].last; j++) { pbitvec[j / BITS_PER_LONG] |= ((unsigned long) 1 << (j % BITS_PER_LONG)); } } return (RecordSetPtr) pbvs; } /***************************************************************************/ /* set operations for interval list representation */ typedef struct { RecordSetRec baseSet; int nIntervals; /* followed by the intervals (RecordSetInterval) */ } IntervalListSet, *IntervalListSetPtr; static void IntervalListDestroySet(RecordSetPtr pSet) { free(pSet); } static unsigned long IntervalListIsMemberOfSet(RecordSetPtr pSet, int pm) { IntervalListSetPtr prls = (IntervalListSetPtr) pSet; RecordSetInterval *pInterval = (RecordSetInterval *) (&prls[1]); int hi, lo, probe; /* binary search */ lo = 0; hi = prls->nIntervals - 1; while (lo <= hi) { probe = (hi + lo) / 2; if (pm >= pInterval[probe].first && pm <= pInterval[probe].last) return 1; else if (pm < pInterval[probe].first) hi = probe - 1; else lo = probe + 1; } return 0; } static RecordSetIteratePtr IntervalListIterateSet(RecordSetPtr pSet, RecordSetIteratePtr pIter, RecordSetInterval * pIntervalReturn) { RecordSetInterval *pInterval = (RecordSetInterval *) pIter; IntervalListSetPtr prls = (IntervalListSetPtr) pSet; if (pInterval == NULL) { pInterval = (RecordSetInterval *) (&prls[1]); } if ((pInterval - (RecordSetInterval *) (&prls[1])) < prls->nIntervals) { *pIntervalReturn = *pInterval; return (RecordSetIteratePtr) (++pInterval); } else return (RecordSetIteratePtr) NULL; } static RecordSetOperations IntervalListSetOperations = { IntervalListDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet }; static RecordSetOperations IntervalListNoFreeOperations = { NoopDestroySet, IntervalListIsMemberOfSet, IntervalListIterateSet }; static int IntervalListMemoryRequirements(RecordSetInterval * pIntervals, int nIntervals, int maxMember, int *alignment) { *alignment = sizeof(unsigned long); return sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval); } static RecordSetPtr IntervalListCreateSet(RecordSetInterval * pIntervals, int nIntervals, void *pMem, int memsize) { IntervalListSetPtr prls; int i, j, k; RecordSetInterval *stackIntervals = NULL; CARD16 first; if (nIntervals > 0) { stackIntervals = xallocarray(nIntervals, sizeof(RecordSetInterval)); if (!stackIntervals) return NULL; /* sort intervals, store in stackIntervals (insertion sort) */ for (i = 0; i < nIntervals; i++) { first = pIntervals[i].first; for (j = 0; j < i; j++) { if (first < stackIntervals[j].first) break; } for (k = i; k > j; k--) { stackIntervals[k] = stackIntervals[k - 1]; } stackIntervals[j] = pIntervals[i]; } /* merge abutting/overlapping intervals */ for (i = 0; i < nIntervals - 1;) { if ((stackIntervals[i].last + (unsigned int) 1) < stackIntervals[i + 1].first) { i++; /* disjoint intervals */ } else { stackIntervals[i].last = max(stackIntervals[i].last, stackIntervals[i + 1].last); nIntervals--; for (j = i + 1; j < nIntervals; j++) stackIntervals[j] = stackIntervals[j + 1]; } } } /* allocate and fill in set structure */ if (pMem) { prls = (IntervalListSetPtr) pMem; prls->baseSet.ops = &IntervalListNoFreeOperations; } else { prls = (IntervalListSetPtr) malloc(sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval)); if (!prls) goto bailout; prls->baseSet.ops = &IntervalListSetOperations; } memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); prls->nIntervals = nIntervals; bailout: free(stackIntervals); return (RecordSetPtr) prls; } typedef RecordSetPtr(*RecordCreateSetProcPtr) (RecordSetInterval * pIntervals, int nIntervals, void *pMem, int memsize); static int _RecordSetMemoryRequirements(RecordSetInterval * pIntervals, int nIntervals, int *alignment, RecordCreateSetProcPtr * ppCreateSet) { int bmsize, rlsize, bma, rla; int maxMember; /* find maximum member of set so we know how big to make the bit vector */ maxMember = maxMemberInInterval(pIntervals, nIntervals); bmsize = BitVectorSetMemoryRequirements(pIntervals, nIntervals, maxMember, &bma); rlsize = IntervalListMemoryRequirements(pIntervals, nIntervals, maxMember, &rla); if (((nIntervals > 1) && (maxMember <= 255)) || (bmsize < rlsize)) { *alignment = bma; *ppCreateSet = BitVectorCreateSet; return bmsize; } else { *alignment = rla; *ppCreateSet = IntervalListCreateSet; return rlsize; } } /***************************************************************************/ /* user-visible functions */ int RecordSetMemoryRequirements(RecordSetInterval * pIntervals, int nIntervals, int *alignment) { RecordCreateSetProcPtr pCreateSet; return _RecordSetMemoryRequirements(pIntervals, nIntervals, alignment, &pCreateSet); } RecordSetPtr RecordCreateSet(RecordSetInterval * pIntervals, int nIntervals, void *pMem, int memsize) { RecordCreateSetProcPtr pCreateSet; int alignment; int size; size = _RecordSetMemoryRequirements(pIntervals, nIntervals, &alignment, &pCreateSet); if (pMem) { if (((long) pMem & (alignment - 1)) || memsize < size) return NULL; } return (*pCreateSet) (pIntervals, nIntervals, pMem, size); } xorg-server-21.1.16/record/set.h0000644000175000017500000001272314757411105012062 /* Copyright 1995, 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. */ /* A Set Abstract Data Type (ADT) for the RECORD Extension David P. Wiggins 7/25/95 The RECORD extension server code needs to maintain sets of numbers that designate protocol message types. In most cases the interval of numbers starts at 0 and does not exceed 255, but in a few cases (minor opcodes of extension requests) the maximum is 65535. This disparity suggests that a single set representation may not be suitable for all sets, especially given that server memory is precious. We introduce a set ADT to hide implementation differences so that multiple simultaneous set representations can exist. A single interface is presented to the set user regardless of the implementation in use for a particular set. The existing RECORD SI appears to require only four set operations: create (given a list of members), destroy, see if a particular number is a member of the set, and iterate over the members of a set. Though many more set operations are imaginable, to keep the code space down, we won't provide any more operations than are needed. The following types and functions/macros define the ADT. */ /* an interval of set members */ typedef struct { CARD16 first; CARD16 last; } RecordSetInterval; typedef struct _RecordSetRec *RecordSetPtr; /* primary set type */ typedef void *RecordSetIteratePtr; /* table of function pointers for set operations. set users should never declare a variable of this type. */ typedef struct { void (*DestroySet) (RecordSetPtr pSet); unsigned long (*IsMemberOfSet) (RecordSetPtr pSet, int possible_member); RecordSetIteratePtr(*IterateSet) (RecordSetPtr pSet, RecordSetIteratePtr pIter, RecordSetInterval * interval); } RecordSetOperations; /* "base class" for sets. set users should never declare a variable of this type. */ typedef struct _RecordSetRec { RecordSetOperations *ops; } RecordSetRec; RecordSetPtr RecordCreateSet(RecordSetInterval * intervals, int nintervals, void *pMem, int memsize); /* RecordCreateSet creates and returns a new set having members specified by intervals and nintervals. nintervals is the number of RecordSetInterval structures pointed to by intervals. The elements belonging to the new set are determined as follows. For each RecordSetInterval structure, the elements between first and last inclusive are members of the new set. If a RecordSetInterval's first field is greater than its last field, the results are undefined. It is valid to create an empty set (nintervals == 0). If RecordCreateSet returns NULL, the set could not be created due to resource constraints. */ int RecordSetMemoryRequirements(RecordSetInterval * /*pIntervals */ , int /*nintervals */ , int * /*alignment */ ); #define RecordDestroySet(_pSet) \ /* void */ (*_pSet->ops->DestroySet)(/* RecordSetPtr */ _pSet) /* RecordDestroySet frees all resources used by _pSet. _pSet should not be used after it is destroyed. */ #define RecordIsMemberOfSet(_pSet, _m) \ /* unsigned long */ (*_pSet->ops->IsMemberOfSet)(/* RecordSetPtr */ _pSet, \ /* int */ _m) /* RecordIsMemberOfSet returns a non-zero value if _m is a member of _pSet, else it returns zero. */ #define RecordIterateSet(_pSet, _pIter, _interval) \ /* RecordSetIteratePtr */ (*_pSet->ops->IterateSet)(/* RecordSetPtr */ _pSet,\ /* RecordSetIteratePtr */ _pIter, /* RecordSetInterval */ _interval) /* RecordIterateSet returns successive intervals of members of _pSet. If _pIter is NULL, the first interval of set members is copied into _interval. The return value should be passed as _pIter in the next call to RecordIterateSet to obtain the next interval. When the return value is NULL, there were no more intervals in the set, and nothing is copied into the _interval parameter. Intervals appear in increasing numerical order with no overlap between intervals. As such, the list of intervals produced by RecordIterateSet may not match the list of intervals that were passed in RecordCreateSet. Typical usage: pIter = NULL; while (pIter = RecordIterateSet(pSet, pIter, &interval)) { process interval; } */ xorg-server-21.1.16/render/0000755000175000017500000000000014757411133011173 5xorg-server-21.1.16/render/meson.build0000644000175000017500000000076114757411105013260 srcs_render = [ 'animcur.c', 'filter.c', 'glyph.c', 'matrix.c', 'miindex.c', 'mipict.c', 'mirect.c', 'mitrap.c', 'mitri.c', 'picture.c', 'render.c', ] hdrs_render = [ 'glyphstr.h', 'mipict.h', 'picture.h', 'picturestr.h', ] libxserver_render = static_library('libxserver_render', srcs_render, include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_render, install_dir: xorgsdkdir) endif xorg-server-21.1.16/render/Makefile.am0000644000175000017500000000044414757411105013150 noinst_LTLIBRARIES = librender.la AM_CFLAGS = $(DIX_CFLAGS) librender_la_SOURCES = \ animcur.c \ filter.c \ glyph.c \ matrix.c \ miindex.c \ mipict.c \ mirect.c \ mitrap.c \ mitri.c \ picture.c \ render.c if XORG sdk_HEADERS = picture.h mipict.h glyphstr.h picturestr.h endif xorg-server-21.1.16/render/picture.h0000644000175000017500000001642214757411105012743 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _PICTURE_H_ #define _PICTURE_H_ #include "privates.h" #include typedef struct _DirectFormat *DirectFormatPtr; typedef struct _PictFormat *PictFormatPtr; typedef struct _Picture *PicturePtr; /* * While the protocol is generous in format support, the * sample implementation allows only packed RGB and GBR * representations for data to simplify software rendering, */ #define PICT_FORMAT(bpp,type,a,r,g,b) PIXMAN_FORMAT(bpp, type, a, r, g, b) /* * gray/color formats use a visual index instead of argb */ #define PICT_VISFORMAT(bpp,type,vi) (((bpp) << 24) | \ ((type) << 16) | \ ((vi))) #define PICT_FORMAT_BPP(f) PIXMAN_FORMAT_BPP(f) #define PICT_FORMAT_TYPE(f) PIXMAN_FORMAT_TYPE(f) #define PICT_FORMAT_A(f) PIXMAN_FORMAT_A(f) #define PICT_FORMAT_R(f) PIXMAN_FORMAT_R(f) #define PICT_FORMAT_G(f) PIXMAN_FORMAT_G(f) #define PICT_FORMAT_B(f) PIXMAN_FORMAT_B(f) #define PICT_FORMAT_RGB(f) PIXMAN_FORMAT_RGB(f) #define PICT_FORMAT_VIS(f) PIXMAN_FORMAT_VIS(f) #define PICT_TYPE_OTHER PIXMAN_TYPE_OTHER #define PICT_TYPE_A PIXMAN_TYPE_A #define PICT_TYPE_ARGB PIXMAN_TYPE_ARGB #define PICT_TYPE_ABGR PIXMAN_TYPE_ABGR #define PICT_TYPE_COLOR PIXMAN_TYPE_COLOR #define PICT_TYPE_GRAY PIXMAN_TYPE_GRAY #define PICT_TYPE_BGRA PIXMAN_TYPE_BGRA #define PICT_FORMAT_COLOR(f) PIXMAN_FORMAT_COLOR(f) /* 32bpp formats */ typedef enum _PictFormatShort { PICT_a2r10g10b10 = PIXMAN_a2r10g10b10, PICT_x2r10g10b10 = PIXMAN_x2r10g10b10, PICT_a2b10g10r10 = PIXMAN_a2b10g10r10, PICT_x2b10g10r10 = PIXMAN_x2b10g10r10, PICT_a8r8g8b8 = PIXMAN_a8r8g8b8, PICT_x8r8g8b8 = PIXMAN_x8r8g8b8, PICT_a8b8g8r8 = PIXMAN_a8b8g8r8, PICT_x8b8g8r8 = PIXMAN_x8b8g8r8, PICT_b8g8r8a8 = PIXMAN_b8g8r8a8, PICT_b8g8r8x8 = PIXMAN_b8g8r8x8, /* 24bpp formats */ PICT_r8g8b8 = PIXMAN_r8g8b8, PICT_b8g8r8 = PIXMAN_b8g8r8, /* 16bpp formats */ PICT_r5g6b5 = PIXMAN_r5g6b5, PICT_b5g6r5 = PIXMAN_b5g6r5, PICT_a1r5g5b5 = PIXMAN_a1r5g5b5, PICT_x1r5g5b5 = PIXMAN_x1r5g5b5, PICT_a1b5g5r5 = PIXMAN_a1b5g5r5, PICT_x1b5g5r5 = PIXMAN_x1b5g5r5, PICT_a4r4g4b4 = PIXMAN_a4r4g4b4, PICT_x4r4g4b4 = PIXMAN_x4r4g4b4, PICT_a4b4g4r4 = PIXMAN_a4b4g4r4, PICT_x4b4g4r4 = PIXMAN_x4b4g4r4, /* 8bpp formats */ PICT_a8 = PIXMAN_a8, PICT_r3g3b2 = PIXMAN_r3g3b2, PICT_b2g3r3 = PIXMAN_b2g3r3, PICT_a2r2g2b2 = PIXMAN_a2r2g2b2, PICT_a2b2g2r2 = PIXMAN_a2b2g2r2, PICT_c8 = PIXMAN_c8, PICT_g8 = PIXMAN_g8, PICT_x4a4 = PIXMAN_x4a4, PICT_x4c4 = PIXMAN_x4c4, PICT_x4g4 = PIXMAN_x4g4, /* 4bpp formats */ PICT_a4 = PIXMAN_a4, PICT_r1g2b1 = PIXMAN_r1g2b1, PICT_b1g2r1 = PIXMAN_b1g2r1, PICT_a1r1g1b1 = PIXMAN_a1r1g1b1, PICT_a1b1g1r1 = PIXMAN_a1b1g1r1, PICT_c4 = PIXMAN_c4, PICT_g4 = PIXMAN_g4, /* 1bpp formats */ PICT_a1 = PIXMAN_a1, PICT_g1 = PIXMAN_g1 } PictFormatShort; /* * For dynamic indexed visuals (GrayScale and PseudoColor), these control the * selection of colors allocated for drawing to Pictures. The default * policy depends on the size of the colormap: * * Size Default Policy * ---------------------------- * < 64 PolicyMono * < 256 PolicyGray * 256 PolicyColor (only on PseudoColor) * * The actual allocation code lives in miindex.c, and so is * austensibly server dependent, but that code does: * * PolicyMono Allocate no additional colors, use black and white * PolicyGray Allocate 13 gray levels (11 cells used) * PolicyColor Allocate a 4x4x4 cube and 13 gray levels (71 cells used) * PolicyAll Allocate as big a cube as possible, fill with gray (all) * * Here's a picture to help understand how many colors are * actually allocated (this is just the gray ramp): * * gray level * all 0000 1555 2aaa 4000 5555 6aaa 8000 9555 aaaa bfff d555 eaaa ffff * b/w 0000 ffff * 4x4x4 5555 aaaa * extra 1555 2aaa 4000 6aaa 8000 9555 bfff d555 eaaa * * The default colormap supplies two gray levels (black/white), the * 4x4x4 cube allocates another two and nine more are allocated to fill * in the 13 levels. When the 4x4x4 cube is not allocated, a total of * 11 cells are allocated. */ #define PictureCmapPolicyInvalid -1 #define PictureCmapPolicyDefault 0 #define PictureCmapPolicyMono 1 #define PictureCmapPolicyGray 2 #define PictureCmapPolicyColor 3 #define PictureCmapPolicyAll 4 extern int PictureCmapPolicy; extern int PictureParseCmapPolicy(const char *name); extern int RenderErrBase; /* Fixed point updates from Carl Worth, USC, Information Sciences Institute */ typedef pixman_fixed_32_32_t xFixed_32_32; typedef pixman_fixed_48_16_t xFixed_48_16; #define MAX_FIXED_48_16 pixman_max_fixed_48_16 #define MIN_FIXED_48_16 pixman_min_fixed_48_16 typedef pixman_fixed_1_31_t xFixed_1_31; typedef pixman_fixed_1_16_t xFixed_1_16; typedef pixman_fixed_16_16_t xFixed_16_16; /* * An unadorned "xFixed" is the same as xFixed_16_16, * (since it's quite common in the code) */ typedef pixman_fixed_t xFixed; #define XFIXED_BITS 16 #define xFixedToInt(f) pixman_fixed_to_int(f) #define IntToxFixed(i) pixman_int_to_fixed(i) #define xFixedE pixman_fixed_e #define xFixed1 pixman_fixed_1 #define xFixed1MinusE pixman_fixed_1_minus_e #define xFixedFrac(f) pixman_fixed_frac(f) #define xFixedFloor(f) pixman_fixed_floor(f) #define xFixedCeil(f) pixman_fixed_ceil(f) #define xFixedFraction(f) pixman_fixed_fraction(f) #define xFixedMod2(f) pixman_fixed_mod2(f) /* whether 't' is a well defined not obviously empty trapezoid */ #define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \ (t)->right.p1.y != (t)->right.p2.y && \ ((t)->bottom > (t)->top)) /* * Standard NTSC luminance conversions: * * y = r * 0.299 + g * 0.587 + b * 0.114 * * Approximate this for a bit more speed: * * y = (r * 153 + g * 301 + b * 58) / 512 * * This gives 17 bits of luminance; to get 15 bits, lop the low two */ #define CvtR8G8B8toY15(s) (((((s) >> 16) & 0xff) * 153 + \ (((s) >> 8) & 0xff) * 301 + \ (((s) ) & 0xff) * 58) >> 2) #endif /* _PICTURE_H_ */ xorg-server-21.1.16/render/mipict.h0000644000175000017500000000752114757411105012555 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _MIPICT_H_ #define _MIPICT_H_ #include "picturestr.h" #define MI_MAX_INDEXED 256 /* XXX depth must be <= 8 */ #if MI_MAX_INDEXED <= 256 typedef CARD8 miIndexType; #endif typedef struct _miIndexed { Bool color; CARD32 rgba[MI_MAX_INDEXED]; miIndexType ent[32768]; } miIndexedRec, *miIndexedPtr; #define miCvtR8G8B8to15(s) ((((s) >> 3) & 0x001f) | \ (((s) >> 6) & 0x03e0) | \ (((s) >> 9) & 0x7c00)) #define miIndexToEnt15(mif,rgb15) ((mif)->ent[rgb15]) #define miIndexToEnt24(mif,rgb24) miIndexToEnt15(mif,miCvtR8G8B8to15(rgb24)) #define miIndexToEntY24(mif,rgb24) ((mif)->ent[CvtR8G8B8toY15(rgb24)]) extern _X_EXPORT int miCreatePicture(PicturePtr pPicture); extern _X_EXPORT void miDestroyPicture(PicturePtr pPicture); extern _X_EXPORT void miCompositeSourceValidate(PicturePtr pPicture); extern _X_EXPORT Bool miComputeCompositeRegion(RegionPtr pRegion, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); extern _X_EXPORT Bool miPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); extern _X_EXPORT Bool miRealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph); extern _X_EXPORT void miUnrealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph); extern _X_EXPORT void miGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs); extern _X_EXPORT void miRenderColorToPixel(PictFormatPtr pPict, xRenderColor * color, CARD32 *pixel); extern _X_EXPORT void miRenderPixelToColor(PictFormatPtr pPict, CARD32 pixel, xRenderColor * color); extern _X_EXPORT Bool miIsSolidAlpha(PicturePtr pSrc); extern _X_EXPORT void miCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects); extern _X_EXPORT void miTrapezoidBounds(int ntrap, xTrapezoid * traps, BoxPtr box); extern _X_EXPORT void miPointFixedBounds(int npoint, xPointFixed * points, BoxPtr bounds); extern _X_EXPORT void miTriangleBounds(int ntri, xTriangle * tris, BoxPtr bounds); extern _X_EXPORT Bool miInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat); extern _X_EXPORT void miCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat); extern _X_EXPORT void miUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat, int ndef, xColorItem * pdef); #endif /* _MIPICT_H_ */ xorg-server-21.1.16/render/glyphstr.h0000644000175000017500000000717614757411105013152 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _GLYPHSTR_H_ #define _GLYPHSTR_H_ #include #include "picture.h" #include "screenint.h" #include "regionstr.h" #include "miscstruct.h" #include "privates.h" #define GlyphFormat1 0 #define GlyphFormat4 1 #define GlyphFormat8 2 #define GlyphFormat16 3 #define GlyphFormat32 4 #define GlyphFormatNum 5 typedef struct _Glyph { CARD32 refcnt; PrivateRec *devPrivates; unsigned char sha1[20]; CARD32 size; /* info + bitmap */ xGlyphInfo info; /* per-screen pixmaps follow */ } GlyphRec, *GlyphPtr; #define GlyphPicture(glyph) ((PicturePtr *) ((glyph) + 1)) typedef struct _GlyphRef { CARD32 signature; GlyphPtr glyph; } GlyphRefRec, *GlyphRefPtr; #define DeletedGlyph ((GlyphPtr) 1) typedef struct _GlyphHashSet { CARD32 entries; CARD32 size; CARD32 rehash; } GlyphHashSetRec, *GlyphHashSetPtr; typedef struct _GlyphHash { GlyphRefPtr table; GlyphHashSetPtr hashSet; CARD32 tableEntries; } GlyphHashRec, *GlyphHashPtr; typedef struct _GlyphSet { CARD32 refcnt; int fdepth; PictFormatPtr format; GlyphHashRec hash; PrivateRec *devPrivates; } GlyphSetRec, *GlyphSetPtr; #define GlyphSetGetPrivate(pGlyphSet,k) \ dixLookupPrivate(&(pGlyphSet)->devPrivates, k) #define GlyphSetSetPrivate(pGlyphSet,k,ptr) \ dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr) typedef struct _GlyphList { INT16 xOff; INT16 yOff; CARD8 len; PictFormatPtr format; } GlyphListRec, *GlyphListPtr; extern void GlyphUninit(ScreenPtr pScreen); extern GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format); extern int HashGlyph(xGlyphInfo * gi, CARD8 *bits, unsigned long size, unsigned char sha1[20]); extern void AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id); extern Bool DeleteGlyph(GlyphSetPtr glyphSet, Glyph id); extern GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id); extern GlyphPtr AllocateGlyph(xGlyphInfo * gi, int format); extern void FreeGlyph(GlyphPtr glyph, int format); extern Bool ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change); extern GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format); extern int FreeGlyphSet(void *value, XID gid); #define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR 1 /* used for api compat */ extern _X_EXPORT PicturePtr GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen); extern _X_EXPORT void SetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen, PicturePtr picture); #endif /* _GLYPHSTR_H_ */ xorg-server-21.1.16/render/picturestr.h0000644000175000017500000004425014757411105013474 /* * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifndef _PICTURESTR_H_ #define _PICTURESTR_H_ #include "scrnintstr.h" #include "glyphstr.h" #include "resource.h" #include "privates.h" typedef struct _DirectFormat { CARD16 red, redMask; CARD16 green, greenMask; CARD16 blue, blueMask; CARD16 alpha, alphaMask; } DirectFormatRec; typedef struct _IndexFormat { VisualID vid; ColormapPtr pColormap; int nvalues; xIndexValue *pValues; void *devPrivate; } IndexFormatRec; typedef struct _PictFormat { CARD32 id; CARD32 format; /* except bpp */ unsigned char type; unsigned char depth; DirectFormatRec direct; IndexFormatRec index; } PictFormatRec; typedef struct pixman_vector PictVector, *PictVectorPtr; typedef struct pixman_transform PictTransform, *PictTransformPtr; #define pict_f_vector pixman_f_vector #define pict_f_transform pixman_f_transform #define PICT_GRADIENT_STOPTABLE_SIZE 1024 #define SourcePictTypeSolidFill 0 #define SourcePictTypeLinear 1 #define SourcePictTypeRadial 2 #define SourcePictTypeConical 3 typedef struct _PictSolidFill { unsigned int type; CARD32 color; xRenderColor fullcolor; } PictSolidFill, *PictSolidFillPtr; typedef struct _PictGradientStop { xFixed x; xRenderColor color; } PictGradientStop, *PictGradientStopPtr; typedef struct _PictGradient { unsigned int type; int nstops; PictGradientStopPtr stops; } PictGradient, *PictGradientPtr; typedef struct _PictLinearGradient { unsigned int type; int nstops; PictGradientStopPtr stops; xPointFixed p1; xPointFixed p2; } PictLinearGradient, *PictLinearGradientPtr; typedef struct _PictCircle { xFixed x; xFixed y; xFixed radius; } PictCircle, *PictCirclePtr; typedef struct _PictRadialGradient { unsigned int type; int nstops; PictGradientStopPtr stops; PictCircle c1; PictCircle c2; } PictRadialGradient, *PictRadialGradientPtr; typedef struct _PictConicalGradient { unsigned int type; int nstops; PictGradientStopPtr stops; xPointFixed center; xFixed angle; } PictConicalGradient, *PictConicalGradientPtr; typedef union _SourcePict { unsigned int type; PictSolidFill solidFill; PictGradient gradient; PictLinearGradient linear; PictRadialGradient radial; PictConicalGradient conical; } SourcePict, *SourcePictPtr; typedef struct _Picture { DrawablePtr pDrawable; PictFormatPtr pFormat; PictFormatShort format; /* PICT_FORMAT */ int refcnt; CARD32 id; unsigned int repeat:1; unsigned int graphicsExposures:1; unsigned int subWindowMode:1; unsigned int polyEdge:1; unsigned int polyMode:1; unsigned int freeCompClip:1; unsigned int componentAlpha:1; unsigned int repeatType:2; unsigned int filter:3; unsigned int stateChanges:CPLastBit; unsigned int unused:18 - CPLastBit; PicturePtr pNext; /* chain on same drawable */ PicturePtr alphaMap; DDXPointRec alphaOrigin; DDXPointRec clipOrigin; RegionPtr clientClip; unsigned long serialNumber; RegionPtr pCompositeClip; PrivateRec *devPrivates; PictTransform *transform; SourcePictPtr pSourcePict; xFixed *filter_params; int filter_nparams; } PictureRec; typedef Bool (*PictFilterValidateParamsProcPtr) (ScreenPtr pScreen, int id, xFixed * params, int nparams, int *width, int *height); typedef struct { char *name; int id; PictFilterValidateParamsProcPtr ValidateParams; int width, height; } PictFilterRec, *PictFilterPtr; #define PictFilterNearest 0 #define PictFilterBilinear 1 #define PictFilterFast 2 #define PictFilterGood 3 #define PictFilterBest 4 #define PictFilterConvolution 5 /* if you add an 8th filter, expand the filter bitfield above */ typedef struct { char *alias; int alias_id; int filter_id; } PictFilterAliasRec, *PictFilterAliasPtr; typedef int (*CreatePictureProcPtr) (PicturePtr pPicture); typedef void (*DestroyPictureProcPtr) (PicturePtr pPicture); typedef int (*ChangePictureClipProcPtr) (PicturePtr pPicture, int clipType, void *value, int n); typedef void (*DestroyPictureClipProcPtr) (PicturePtr pPicture); typedef int (*ChangePictureTransformProcPtr) (PicturePtr pPicture, PictTransform * transform); typedef int (*ChangePictureFilterProcPtr) (PicturePtr pPicture, int filter, xFixed * params, int nparams); typedef void (*DestroyPictureFilterProcPtr) (PicturePtr pPicture); typedef void (*ChangePictureProcPtr) (PicturePtr pPicture, Mask mask); typedef void (*ValidatePictureProcPtr) (PicturePtr pPicture, Mask mask); typedef void (*CompositeProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); typedef void (*GlyphsProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlists, GlyphListPtr lists, GlyphPtr * glyphs); typedef void (*CompositeRectsProcPtr) (CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects); typedef void (*RasterizeTrapezoidProcPtr) (PicturePtr pMask, xTrapezoid * trap, int x_off, int y_off); typedef void (*TrapezoidsProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps); typedef void (*TrianglesProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntri, xTriangle * tris); typedef void (*TriStripProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed * points); typedef void (*TriFanProcPtr) (CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed * points); typedef Bool (*InitIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat); typedef void (*CloseIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat); typedef void (*UpdateIndexedProcPtr) (ScreenPtr pScreen, PictFormatPtr pFormat, int ndef, xColorItem * pdef); typedef void (*AddTrapsProcPtr) (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap * traps); typedef void (*AddTrianglesProcPtr) (PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntri, xTriangle * tris); typedef Bool (*RealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph); typedef void (*UnrealizeGlyphProcPtr) (ScreenPtr pScreen, GlyphPtr glyph); typedef struct _PictureScreen { PictFormatPtr formats; PictFormatPtr fallback; int nformats; CreatePictureProcPtr CreatePicture; DestroyPictureProcPtr DestroyPicture; ChangePictureClipProcPtr ChangePictureClip; DestroyPictureClipProcPtr DestroyPictureClip; ChangePictureProcPtr ChangePicture; ValidatePictureProcPtr ValidatePicture; CompositeProcPtr Composite; GlyphsProcPtr Glyphs; /* unused */ CompositeRectsProcPtr CompositeRects; DestroyWindowProcPtr DestroyWindow; CloseScreenProcPtr CloseScreen; StoreColorsProcPtr StoreColors; InitIndexedProcPtr InitIndexed; CloseIndexedProcPtr CloseIndexed; UpdateIndexedProcPtr UpdateIndexed; int subpixel; PictFilterPtr filters; int nfilters; PictFilterAliasPtr filterAliases; int nfilterAliases; /** * Called immediately after a picture's transform is changed through the * SetPictureTransform request. Not called for source-only pictures. */ ChangePictureTransformProcPtr ChangePictureTransform; /** * Called immediately after a picture's transform is changed through the * SetPictureFilter request. Not called for source-only pictures. */ ChangePictureFilterProcPtr ChangePictureFilter; DestroyPictureFilterProcPtr DestroyPictureFilter; TrapezoidsProcPtr Trapezoids; TrianglesProcPtr Triangles; RasterizeTrapezoidProcPtr RasterizeTrapezoid; AddTrianglesProcPtr AddTriangles; AddTrapsProcPtr AddTraps; RealizeGlyphProcPtr RealizeGlyph; UnrealizeGlyphProcPtr UnrealizeGlyph; #define PICTURE_SCREEN_VERSION 2 TriStripProcPtr TriStrip; TriFanProcPtr TriFan; } PictureScreenRec, *PictureScreenPtr; extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec; #define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec) extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec; #define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec) extern RESTYPE PictureType; extern RESTYPE PictFormatType; extern RESTYPE GlyphSetType; #define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey)) #define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL) #define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p) #define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey)) #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p) #define VERIFY_PICTURE(pPicture, pid, client, mode) {\ int tmprc = dixLookupResourceByType((void *)&(pPicture), pid,\ PictureType, client, mode);\ if (tmprc != Success)\ return tmprc;\ } #define VERIFY_ALPHA(pPicture, pid, client, mode) {\ if (pid == None) \ pPicture = 0; \ else { \ VERIFY_PICTURE(pPicture, pid, client, mode); \ } \ } \ extern _X_EXPORT PictFormatPtr PictureWindowFormat(WindowPtr pWindow); extern _X_EXPORT Bool PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel); extern _X_EXPORT int PictureGetSubpixelOrder(ScreenPtr pScreen); extern _X_EXPORT PictFormatPtr PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual); extern _X_EXPORT PictFormatPtr PictureMatchFormat(ScreenPtr pScreen, int depth, CARD32 format); extern _X_EXPORT Bool PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats); extern _X_EXPORT int PictureGetFilterId(const char *filter, int len, Bool makeit); extern _X_EXPORT char *PictureGetFilterName(int id); extern _X_EXPORT int PictureAddFilter(ScreenPtr pScreen, const char *filter, PictFilterValidateParamsProcPtr ValidateParams, int width, int height); extern _X_EXPORT Bool PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias); extern _X_EXPORT Bool PictureSetDefaultFilters(ScreenPtr pScreen); extern _X_EXPORT void PictureResetFilters(ScreenPtr pScreen); extern _X_EXPORT PictFilterPtr PictureFindFilter(ScreenPtr pScreen, char *name, int len); extern _X_EXPORT int SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter, xFixed * params, int nparams); extern _X_EXPORT int SetPictureFilter(PicturePtr pPicture, char *name, int len, xFixed * params, int nparams); extern _X_EXPORT Bool PictureFinishInit(void); extern _X_EXPORT PicturePtr CreatePicture(Picture pid, DrawablePtr pDrawable, PictFormatPtr pFormat, Mask mask, XID *list, ClientPtr client, int *error); extern _X_EXPORT int ChangePicture(PicturePtr pPicture, Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client); extern _X_EXPORT int SetPictureClipRects(PicturePtr pPicture, int xOrigin, int yOrigin, int nRect, xRectangle *rects); extern _X_EXPORT int SetPictureClipRegion(PicturePtr pPicture, int xOrigin, int yOrigin, RegionPtr pRegion); extern _X_EXPORT int SetPictureTransform(PicturePtr pPicture, PictTransform * transform); extern _X_EXPORT void ValidatePicture(PicturePtr pPicture); extern _X_EXPORT int FreePicture(void *pPicture, XID pid); extern _X_EXPORT void CompositePicture(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); extern _X_EXPORT void CompositeGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs); extern _X_EXPORT void CompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects); extern _X_EXPORT void CompositeTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps); extern _X_EXPORT void CompositeTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntriangles, xTriangle * triangles); extern _X_EXPORT void CompositeTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points); extern _X_EXPORT void CompositeTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points); Bool AnimCurInit(ScreenPtr pScreen); int AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid); extern _X_EXPORT void AddTraps(PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntraps, xTrap * traps); extern _X_EXPORT PicturePtr CreateSolidPicture(Picture pid, xRenderColor * color, int *error); extern _X_EXPORT PicturePtr CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, int nStops, xFixed * stops, xRenderColor * colors, int *error); extern _X_EXPORT PicturePtr CreateRadialGradientPicture(Picture pid, xPointFixed * inner, xPointFixed * outer, xFixed innerRadius, xFixed outerRadius, int nStops, xFixed * stops, xRenderColor * colors, int *error); extern _X_EXPORT PicturePtr CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, int nStops, xFixed * stops, xRenderColor * colors, int *error); #ifdef PANORAMIX extern void PanoramiXRenderInit(void); extern void PanoramiXRenderReset(void); #endif /* * matrix.c */ extern _X_EXPORT void PictTransform_from_xRenderTransform(PictTransformPtr pict, xRenderTransform * render); extern _X_EXPORT void xRenderTransform_from_PictTransform(xRenderTransform * render, PictTransformPtr pict); extern _X_EXPORT Bool PictureTransformPoint(PictTransformPtr transform, PictVectorPtr vector); extern _X_EXPORT Bool PictureTransformPoint3d(PictTransformPtr transform, PictVectorPtr vector); #endif /* _PICTURESTR_H_ */ xorg-server-21.1.16/render/Makefile.in0000644000175000017500000007121114757411116013163 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = render ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) librender_la_LIBADD = am_librender_la_OBJECTS = animcur.lo filter.lo glyph.lo matrix.lo \ miindex.lo mipict.lo mirect.lo mitrap.lo mitri.lo picture.lo \ render.lo librender_la_OBJECTS = $(am_librender_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/animcur.Plo ./$(DEPDIR)/filter.Plo \ ./$(DEPDIR)/glyph.Plo ./$(DEPDIR)/matrix.Plo \ ./$(DEPDIR)/miindex.Plo ./$(DEPDIR)/mipict.Plo \ ./$(DEPDIR)/mirect.Plo ./$(DEPDIR)/mitrap.Plo \ ./$(DEPDIR)/mitri.Plo ./$(DEPDIR)/picture.Plo \ ./$(DEPDIR)/render.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(librender_la_SOURCES) DIST_SOURCES = $(librender_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = picture.h mipict.h glyphstr.h picturestr.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = librender.la AM_CFLAGS = $(DIX_CFLAGS) librender_la_SOURCES = \ animcur.c \ filter.c \ glyph.c \ matrix.c \ miindex.c \ mipict.c \ mirect.c \ mitrap.c \ mitri.c \ picture.c \ render.c @XORG_TRUE@sdk_HEADERS = picture.h mipict.h glyphstr.h picturestr.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign render/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign render/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } librender.la: $(librender_la_OBJECTS) $(librender_la_DEPENDENCIES) $(EXTRA_librender_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(librender_la_OBJECTS) $(librender_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/animcur.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filter.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glyph.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matrix.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miindex.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipict.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mirect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mitrap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mitri.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/picture.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/render.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/animcur.Plo -rm -f ./$(DEPDIR)/filter.Plo -rm -f ./$(DEPDIR)/glyph.Plo -rm -f ./$(DEPDIR)/matrix.Plo -rm -f ./$(DEPDIR)/miindex.Plo -rm -f ./$(DEPDIR)/mipict.Plo -rm -f ./$(DEPDIR)/mirect.Plo -rm -f ./$(DEPDIR)/mitrap.Plo -rm -f ./$(DEPDIR)/mitri.Plo -rm -f ./$(DEPDIR)/picture.Plo -rm -f ./$(DEPDIR)/render.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/animcur.Plo -rm -f ./$(DEPDIR)/filter.Plo -rm -f ./$(DEPDIR)/glyph.Plo -rm -f ./$(DEPDIR)/matrix.Plo -rm -f ./$(DEPDIR)/miindex.Plo -rm -f ./$(DEPDIR)/mipict.Plo -rm -f ./$(DEPDIR)/mirect.Plo -rm -f ./$(DEPDIR)/mitrap.Plo -rm -f ./$(DEPDIR)/mitri.Plo -rm -f ./$(DEPDIR)/picture.Plo -rm -f ./$(DEPDIR)/render.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/render/animcur.c0000644000175000017500000002621114757411105012716 /* * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * 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. */ /* * Animated cursors for X. Not specific to Render in any way, but * stuck there because Render has the other cool cursor extension. * Besides, everyone has Render. * * Implemented as a simple layer over the core cursor code; it * creates composite cursors out of a set of static cursors and * delta times between each image. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" #include "cursorstr.h" #include "dixfontstr.h" #include "opaque.h" #include "picturestr.h" #include "inputstr.h" #include "xace.h" typedef struct _AnimCurElt { CursorPtr pCursor; /* cursor to show */ CARD32 delay; /* in ms */ } AnimCurElt; typedef struct _AnimCur { int nelt; /* number of elements in the elts array */ AnimCurElt *elts; /* actually allocated right after the structure */ OsTimerPtr timer; } AnimCurRec, *AnimCurPtr; typedef struct _AnimScrPriv { CloseScreenProcPtr CloseScreen; CursorLimitsProcPtr CursorLimits; DisplayCursorProcPtr DisplayCursor; SetCursorPositionProcPtr SetCursorPosition; RealizeCursorProcPtr RealizeCursor; UnrealizeCursorProcPtr UnrealizeCursor; RecolorCursorProcPtr RecolorCursor; } AnimCurScreenRec, *AnimCurScreenPtr; static unsigned char empty[4]; static CursorBits animCursorBits = { empty, empty, 2, 1, 1, 0, 0, 1 }; static DevPrivateKeyRec AnimCurScreenPrivateKeyRec; #define IsAnimCur(c) ((c) && ((c)->bits == &animCursorBits)) #define GetAnimCur(c) ((AnimCurPtr) ((((char *)(c) + CURSOR_REC_SIZE)))) #define GetAnimCurScreen(s) ((AnimCurScreenPtr)dixLookupPrivate(&(s)->devPrivates, &AnimCurScreenPrivateKeyRec)) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt) ((s)->elt = (as)->elt) static Bool AnimCurCloseScreen(ScreenPtr pScreen) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; Unwrap(as, pScreen, CloseScreen); Unwrap(as, pScreen, CursorLimits); Unwrap(as, pScreen, DisplayCursor); Unwrap(as, pScreen, SetCursorPosition); Unwrap(as, pScreen, RealizeCursor); Unwrap(as, pScreen, UnrealizeCursor); Unwrap(as, pScreen, RecolorCursor); ret = (*pScreen->CloseScreen) (pScreen); return ret; } static void AnimCurCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Unwrap(as, pScreen, CursorLimits); if (IsAnimCur(pCursor)) { AnimCurPtr ac = GetAnimCur(pCursor); (*pScreen->CursorLimits) (pDev, pScreen, ac->elts[0].pCursor, pHotBox, pTopLeftBox); } else { (*pScreen->CursorLimits) (pDev, pScreen, pCursor, pHotBox, pTopLeftBox); } Wrap(as, pScreen, CursorLimits, AnimCurCursorLimits); } /* * The cursor animation timer has expired, go display any relevant cursor changes * and compute a new timeout value */ static CARD32 AnimCurTimerNotify(OsTimerPtr timer, CARD32 now, void *arg) { DeviceIntPtr dev = arg; ScreenPtr pScreen = dev->spriteInfo->anim.pScreen; AnimCurScreenPtr as = GetAnimCurScreen(pScreen); AnimCurPtr ac = GetAnimCur(dev->spriteInfo->sprite->current); int elt = (dev->spriteInfo->anim.elt + 1) % ac->nelt; DisplayCursorProcPtr DisplayCursor = pScreen->DisplayCursor; /* * Not a simple Unwrap/Wrap as this isn't called along the DisplayCursor * wrapper chain. */ pScreen->DisplayCursor = as->DisplayCursor; (void) (*pScreen->DisplayCursor) (dev, pScreen, ac->elts[elt].pCursor); as->DisplayCursor = pScreen->DisplayCursor; pScreen->DisplayCursor = DisplayCursor; dev->spriteInfo->anim.elt = elt; dev->spriteInfo->anim.pCursor = ac->elts[elt].pCursor; return ac->elts[elt].delay; } static void AnimCurCancelTimer(DeviceIntPtr pDev) { CursorPtr cur = pDev->spriteInfo->sprite ? pDev->spriteInfo->sprite->current : NULL; if (IsAnimCur(cur)) TimerCancel(GetAnimCur(cur)->timer); } static Bool AnimCurDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret = TRUE; if (IsFloating(pDev)) return FALSE; Unwrap(as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { if (pCursor != pDev->spriteInfo->sprite->current) { AnimCurPtr ac = GetAnimCur(pCursor); AnimCurCancelTimer(pDev); ret = (*pScreen->DisplayCursor) (pDev, pScreen, ac->elts[0].pCursor); if (ret) { pDev->spriteInfo->anim.elt = 0; pDev->spriteInfo->anim.pCursor = pCursor; pDev->spriteInfo->anim.pScreen = pScreen; ac->timer = TimerSet(ac->timer, 0, ac->elts[0].delay, AnimCurTimerNotify, pDev); } } } else { AnimCurCancelTimer(pDev); pDev->spriteInfo->anim.pCursor = 0; pDev->spriteInfo->anim.pScreen = 0; ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } Wrap(as, pScreen, DisplayCursor, AnimCurDisplayCursor); return ret; } static Bool AnimCurSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, Bool generateEvent) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; Unwrap(as, pScreen, SetCursorPosition); if (pDev->spriteInfo->anim.pCursor) { pDev->spriteInfo->anim.pScreen = pScreen; } ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); Wrap(as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); return ret; } static Bool AnimCurRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; Unwrap(as, pScreen, RealizeCursor); if (IsAnimCur(pCursor)) ret = TRUE; else ret = (*pScreen->RealizeCursor) (pDev, pScreen, pCursor); Wrap(as, pScreen, RealizeCursor, AnimCurRealizeCursor); return ret; } static Bool AnimCurUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Bool ret; Unwrap(as, pScreen, UnrealizeCursor); if (IsAnimCur(pCursor)) { AnimCurPtr ac = GetAnimCur(pCursor); int i; if (pScreen->myNum == 0) for (i = 0; i < ac->nelt; i++) FreeCursor(ac->elts[i].pCursor, 0); ret = TRUE; } else ret = (*pScreen->UnrealizeCursor) (pDev, pScreen, pCursor); Wrap(as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor); return ret; } static void AnimCurRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, Bool displayed) { AnimCurScreenPtr as = GetAnimCurScreen(pScreen); Unwrap(as, pScreen, RecolorCursor); if (IsAnimCur(pCursor)) { AnimCurPtr ac = GetAnimCur(pCursor); int i; for (i = 0; i < ac->nelt; i++) (*pScreen->RecolorCursor) (pDev, pScreen, ac->elts[i].pCursor, displayed && pDev->spriteInfo->anim.elt == i); } else (*pScreen->RecolorCursor) (pDev, pScreen, pCursor, displayed); Wrap(as, pScreen, RecolorCursor, AnimCurRecolorCursor); } Bool AnimCurInit(ScreenPtr pScreen) { AnimCurScreenPtr as; if (!dixRegisterPrivateKey(&AnimCurScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof(AnimCurScreenRec))) return FALSE; as = GetAnimCurScreen(pScreen); Wrap(as, pScreen, CloseScreen, AnimCurCloseScreen); Wrap(as, pScreen, CursorLimits, AnimCurCursorLimits); Wrap(as, pScreen, DisplayCursor, AnimCurDisplayCursor); Wrap(as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); Wrap(as, pScreen, RealizeCursor, AnimCurRealizeCursor); Wrap(as, pScreen, UnrealizeCursor, AnimCurUnrealizeCursor); Wrap(as, pScreen, RecolorCursor, AnimCurRecolorCursor); return TRUE; } int AnimCursorCreate(CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *ppCursor, ClientPtr client, XID cid) { CursorPtr pCursor; int rc = BadAlloc, i; AnimCurPtr ac; for (i = 0; i < screenInfo.numScreens; i++) if (!GetAnimCurScreen(screenInfo.screens[i])) return BadImplementation; for (i = 0; i < ncursor; i++) if (IsAnimCur(cursors[i])) return BadMatch; pCursor = (CursorPtr) calloc(CURSOR_REC_SIZE + sizeof(AnimCurRec) + ncursor * sizeof(AnimCurElt), 1); if (!pCursor) return rc; dixInitPrivates(pCursor, pCursor + 1, PRIVATE_CURSOR); pCursor->bits = &animCursorBits; pCursor->refcnt = 1; pCursor->foreRed = cursors[0]->foreRed; pCursor->foreGreen = cursors[0]->foreGreen; pCursor->foreBlue = cursors[0]->foreBlue; pCursor->backRed = cursors[0]->backRed; pCursor->backGreen = cursors[0]->backGreen; pCursor->backBlue = cursors[0]->backBlue; pCursor->id = cid; ac = GetAnimCur(pCursor); ac->timer = TimerSet(NULL, 0, 0, AnimCurTimerNotify, NULL); /* security creation/labeling check */ if (ac->timer) rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, pCursor, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { TimerFree(ac->timer); dixFiniPrivates(pCursor, PRIVATE_CURSOR); free(pCursor); return rc; } /* * Fill in the AnimCurRec */ animCursorBits.refcnt++; ac->nelt = ncursor; ac->elts = (AnimCurElt *) (ac + 1); for (i = 0; i < ncursor; i++) { ac->elts[i].pCursor = RefCursor(cursors[i]); ac->elts[i].delay = deltas[i]; } *ppCursor = pCursor; return Success; } xorg-server-21.1.16/render/filter.c0000644000175000017500000002350214757411105012545 /* * Copyright © 2002 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 #endif #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "input.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" static char **filterNames; static int nfilterNames; /* * standard but not required filters don't have constant indices */ int PictureGetFilterId(const char *filter, int len, Bool makeit) { int i; char *name; char **names; if (len < 0) len = strlen(filter); for (i = 0; i < nfilterNames; i++) if (!CompareISOLatin1Lowered((const unsigned char *) filterNames[i], -1, (const unsigned char *) filter, len)) return i; if (!makeit) return -1; name = malloc(len + 1); if (!name) return -1; memcpy(name, filter, len); name[len] = '\0'; if (filterNames) names = reallocarray(filterNames, nfilterNames + 1, sizeof(char *)); else names = malloc(sizeof(char *)); if (!names) { free(name); return -1; } filterNames = names; i = nfilterNames++; filterNames[i] = name; return i; } static Bool PictureSetDefaultIds(void) { /* careful here -- this list must match the #define values */ if (PictureGetFilterId(FilterNearest, -1, TRUE) != PictFilterNearest) return FALSE; if (PictureGetFilterId(FilterBilinear, -1, TRUE) != PictFilterBilinear) return FALSE; if (PictureGetFilterId(FilterFast, -1, TRUE) != PictFilterFast) return FALSE; if (PictureGetFilterId(FilterGood, -1, TRUE) != PictFilterGood) return FALSE; if (PictureGetFilterId(FilterBest, -1, TRUE) != PictFilterBest) return FALSE; if (PictureGetFilterId(FilterConvolution, -1, TRUE) != PictFilterConvolution) return FALSE; return TRUE; } char * PictureGetFilterName(int id) { if (0 <= id && id < nfilterNames) return filterNames[id]; else return 0; } static void PictureFreeFilterIds(void) { int i; for (i = 0; i < nfilterNames; i++) free(filterNames[i]); free(filterNames); nfilterNames = 0; filterNames = 0; } int PictureAddFilter(ScreenPtr pScreen, const char *filter, PictFilterValidateParamsProcPtr ValidateParams, int width, int height) { PictureScreenPtr ps = GetPictureScreen(pScreen); int id = PictureGetFilterId(filter, -1, TRUE); int i; PictFilterPtr filters; if (id < 0) return -1; /* * It's an error to attempt to reregister a filter */ for (i = 0; i < ps->nfilters; i++) if (ps->filters[i].id == id) return -1; if (ps->filters) filters = reallocarray(ps->filters, ps->nfilters + 1, sizeof(PictFilterRec)); else filters = malloc(sizeof(PictFilterRec)); if (!filters) return -1; ps->filters = filters; i = ps->nfilters++; ps->filters[i].name = PictureGetFilterName(id); ps->filters[i].id = id; ps->filters[i].ValidateParams = ValidateParams; ps->filters[i].width = width; ps->filters[i].height = height; return id; } Bool PictureSetFilterAlias(ScreenPtr pScreen, const char *filter, const char *alias) { PictureScreenPtr ps = GetPictureScreen(pScreen); int filter_id = PictureGetFilterId(filter, -1, FALSE); int alias_id = PictureGetFilterId(alias, -1, TRUE); int i; if (filter_id < 0 || alias_id < 0) return FALSE; for (i = 0; i < ps->nfilterAliases; i++) if (ps->filterAliases[i].alias_id == alias_id) break; if (i == ps->nfilterAliases) { PictFilterAliasPtr aliases; if (ps->filterAliases) aliases = reallocarray(ps->filterAliases, ps->nfilterAliases + 1, sizeof(PictFilterAliasRec)); else aliases = malloc(sizeof(PictFilterAliasRec)); if (!aliases) return FALSE; ps->filterAliases = aliases; ps->filterAliases[i].alias = PictureGetFilterName(alias_id); ps->filterAliases[i].alias_id = alias_id; ps->nfilterAliases++; } ps->filterAliases[i].filter_id = filter_id; return TRUE; } PictFilterPtr PictureFindFilter(ScreenPtr pScreen, char *name, int len) { PictureScreenPtr ps = GetPictureScreen(pScreen); int id = PictureGetFilterId(name, len, FALSE); int i; if (id < 0) return 0; /* Check for an alias, allow them to recurse */ for (i = 0; i < ps->nfilterAliases; i++) if (ps->filterAliases[i].alias_id == id) { id = ps->filterAliases[i].filter_id; i = 0; } /* find the filter */ for (i = 0; i < ps->nfilters; i++) if (ps->filters[i].id == id) return &ps->filters[i]; return 0; } static Bool convolutionFilterValidateParams(ScreenPtr pScreen, int filter, xFixed * params, int nparams, int *width, int *height) { int w, h; if (nparams < 3) return FALSE; if (xFixedFrac(params[0]) || xFixedFrac(params[1])) return FALSE; w = xFixedToInt(params[0]); h = xFixedToInt(params[1]); nparams -= 2; if (w * h > nparams) return FALSE; *width = w; *height = h; return TRUE; } Bool PictureSetDefaultFilters(ScreenPtr pScreen) { if (!filterNames) if (!PictureSetDefaultIds()) return FALSE; if (PictureAddFilter(pScreen, FilterNearest, 0, 1, 1) < 0) return FALSE; if (PictureAddFilter(pScreen, FilterBilinear, 0, 2, 2) < 0) return FALSE; if (!PictureSetFilterAlias(pScreen, FilterNearest, FilterFast)) return FALSE; if (!PictureSetFilterAlias(pScreen, FilterBilinear, FilterGood)) return FALSE; if (!PictureSetFilterAlias(pScreen, FilterBilinear, FilterBest)) return FALSE; if (PictureAddFilter (pScreen, FilterConvolution, convolutionFilterValidateParams, 0, 0) < 0) return FALSE; return TRUE; } void PictureResetFilters(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); free(ps->filters); free(ps->filterAliases); /* Free the filters when the last screen is closed */ if (pScreen->myNum == 0) PictureFreeFilterIds(); } int SetPictureFilter(PicturePtr pPicture, char *name, int len, xFixed * params, int nparams) { PictFilterPtr pFilter; ScreenPtr pScreen; if (pPicture->pDrawable != NULL) pScreen = pPicture->pDrawable->pScreen; else pScreen = screenInfo.screens[0]; pFilter = PictureFindFilter(pScreen, name, len); if (!pFilter) return BadName; if (pPicture->pDrawable == NULL) { int s; /* For source pictures, the picture isn't tied to a screen. So, ensure * that all screens can handle a filter we set for the picture. */ for (s = 1; s < screenInfo.numScreens; s++) { PictFilterPtr pScreenFilter; pScreenFilter = PictureFindFilter(screenInfo.screens[s], name, len); if (!pScreenFilter || pScreenFilter->id != pFilter->id) return BadMatch; } } return SetPicturePictFilter(pPicture, pFilter, params, nparams); } int SetPicturePictFilter(PicturePtr pPicture, PictFilterPtr pFilter, xFixed * params, int nparams) { ScreenPtr pScreen; int i; if (pPicture->pDrawable) pScreen = pPicture->pDrawable->pScreen; else pScreen = screenInfo.screens[0]; if (pFilter->ValidateParams) { int width, height; if (!(*pFilter->ValidateParams) (pScreen, pFilter->id, params, nparams, &width, &height)) return BadMatch; } else if (nparams) return BadMatch; if (nparams != pPicture->filter_nparams) { xFixed *new_params = xallocarray(nparams, sizeof(xFixed)); if (!new_params && nparams) return BadAlloc; free(pPicture->filter_params); pPicture->filter_params = new_params; pPicture->filter_nparams = nparams; } for (i = 0; i < nparams; i++) pPicture->filter_params[i] = params[i]; pPicture->filter = pFilter->id; if (pPicture->pDrawable) { PictureScreenPtr ps = GetPictureScreen(pScreen); int result; result = (*ps->ChangePictureFilter) (pPicture, pPicture->filter, params, nparams); return result; } return Success; } xorg-server-21.1.16/render/glyph.c0000644000175000017500000004547414757411105012417 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "xsha1.h" #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "input.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" #include "glyphstr.h" #include "mipict.h" /* * From Knuth -- a good choice for hash/rehash values is p, p-2 where * p and p-2 are both prime. These tables are sized to have an extra 10% * free to avoid exponential performance degradation as the hash table fills */ static GlyphHashSetRec glyphHashSets[] = { {32, 43, 41}, {64, 73, 71}, {128, 151, 149}, {256, 283, 281}, {512, 571, 569}, {1024, 1153, 1151}, {2048, 2269, 2267}, {4096, 4519, 4517}, {8192, 9013, 9011}, {16384, 18043, 18041}, {32768, 36109, 36107}, {65536, 72091, 72089}, {131072, 144409, 144407}, {262144, 288361, 288359}, {524288, 576883, 576881}, {1048576, 1153459, 1153457}, {2097152, 2307163, 2307161}, {4194304, 4613893, 4613891}, {8388608, 9227641, 9227639}, {16777216, 18455029, 18455027}, {33554432, 36911011, 36911009}, {67108864, 73819861, 73819859}, {134217728, 147639589, 147639587}, {268435456, 295279081, 295279079}, {536870912, 590559793, 590559791} }; #define NGLYPHHASHSETS ARRAY_SIZE(glyphHashSets) static GlyphHashRec globalGlyphs[GlyphFormatNum]; void GlyphUninit(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); GlyphPtr glyph; int fdepth, i; for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) { if (!globalGlyphs[fdepth].hashSet) continue; for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) { glyph = globalGlyphs[fdepth].table[i].glyph; if (glyph && glyph != DeletedGlyph) { if (GetGlyphPicture(glyph, pScreen)) { FreePicture((void *) GetGlyphPicture(glyph, pScreen), 0); SetGlyphPicture(glyph, pScreen, NULL); } (*ps->UnrealizeGlyph) (pScreen, glyph); } } } } static GlyphHashSetPtr FindGlyphHashSet(CARD32 filled) { int i; for (i = 0; i < NGLYPHHASHSETS; i++) if (glyphHashSets[i].entries >= filled) return &glyphHashSets[i]; return 0; } static GlyphRefPtr FindGlyphRef(GlyphHashPtr hash, CARD32 signature, Bool match, unsigned char sha1[20]) { CARD32 elt, step, s; GlyphPtr glyph; GlyphRefPtr table, gr, del; CARD32 tableSize = hash->hashSet->size; table = hash->table; elt = signature % tableSize; step = 0; del = 0; for (;;) { gr = &table[elt]; s = gr->signature; glyph = gr->glyph; if (!glyph) { if (del) gr = del; break; } if (glyph == DeletedGlyph) { if (!del) del = gr; else if (gr == del) break; } else if (s == signature && (!match || memcmp(glyph->sha1, sha1, 20) == 0)) { break; } if (!step) { step = signature % hash->hashSet->rehash; if (!step) step = 1; } elt += step; if (elt >= tableSize) elt -= tableSize; } return gr; } int HashGlyph(xGlyphInfo * gi, CARD8 *bits, unsigned long size, unsigned char sha1[20]) { void *ctx = x_sha1_init(); int success; if (!ctx) return BadAlloc; success = x_sha1_update(ctx, gi, sizeof(xGlyphInfo)); if (!success) return BadAlloc; success = x_sha1_update(ctx, bits, size); if (!success) return BadAlloc; success = x_sha1_final(ctx, sha1); if (!success) return BadAlloc; return Success; } GlyphPtr FindGlyphByHash(unsigned char sha1[20], int format) { GlyphRefPtr gr; CARD32 signature = *(CARD32 *) sha1; if (!globalGlyphs[format].hashSet) return NULL; gr = FindGlyphRef(&globalGlyphs[format], signature, TRUE, sha1); if (gr->glyph && gr->glyph != DeletedGlyph) return gr->glyph; else return NULL; } #ifdef CHECK_DUPLICATES void DuplicateRef(GlyphPtr glyph, char *where) { ErrorF("Duplicate Glyph 0x%x from %s\n", glyph, where); } void CheckDuplicates(GlyphHashPtr hash, char *where) { GlyphPtr g; int i, j; for (i = 0; i < hash->hashSet->size; i++) { g = hash->table[i].glyph; if (!g || g == DeletedGlyph) continue; for (j = i + 1; j < hash->hashSet->size; j++) if (hash->table[j].glyph == g) DuplicateRef(g, where); } } #else #define CheckDuplicates(a,b) #define DuplicateRef(a,b) #endif static void FreeGlyphPicture(GlyphPtr glyph) { PictureScreenPtr ps; int i; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; if (GetGlyphPicture(glyph, pScreen)) FreePicture((void *) GetGlyphPicture(glyph, pScreen), 0); ps = GetPictureScreenIfSet(pScreen); if (ps) (*ps->UnrealizeGlyph) (pScreen, glyph); } } void FreeGlyph(GlyphPtr glyph, int format) { CheckDuplicates(&globalGlyphs[format], "FreeGlyph"); BUG_RETURN(glyph->refcnt == 0); if (--glyph->refcnt == 0) { GlyphRefPtr gr; int i; int first; CARD32 signature; first = -1; for (i = 0; i < globalGlyphs[format].hashSet->size; i++) if (globalGlyphs[format].table[i].glyph == glyph) { if (first != -1) DuplicateRef(glyph, "FreeGlyph check"); first = i; } signature = *(CARD32 *) glyph->sha1; gr = FindGlyphRef(&globalGlyphs[format], signature, TRUE, glyph->sha1); if (gr - globalGlyphs[format].table != first) DuplicateRef(glyph, "Found wrong one"); if (gr->glyph && gr->glyph != DeletedGlyph) { gr->glyph = DeletedGlyph; gr->signature = 0; globalGlyphs[format].tableEntries--; } FreeGlyphPicture(glyph); dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH); } } void AddGlyph(GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) { GlyphRefPtr gr; CARD32 signature; CheckDuplicates(&globalGlyphs[glyphSet->fdepth], "AddGlyph top global"); /* Locate existing matching glyph */ signature = *(CARD32 *) glyph->sha1; gr = FindGlyphRef(&globalGlyphs[glyphSet->fdepth], signature, TRUE, glyph->sha1); if (gr->glyph && gr->glyph != DeletedGlyph && gr->glyph != glyph) { glyph = gr->glyph; } else if (gr->glyph != glyph) { gr->glyph = glyph; gr->signature = signature; globalGlyphs[glyphSet->fdepth].tableEntries++; } /* Insert/replace glyphset value */ gr = FindGlyphRef(&glyphSet->hash, id, FALSE, 0); ++glyph->refcnt; if (gr->glyph && gr->glyph != DeletedGlyph) FreeGlyph(gr->glyph, glyphSet->fdepth); else glyphSet->hash.tableEntries++; gr->glyph = glyph; gr->signature = id; CheckDuplicates(&globalGlyphs[glyphSet->fdepth], "AddGlyph bottom"); } Bool DeleteGlyph(GlyphSetPtr glyphSet, Glyph id) { GlyphRefPtr gr; GlyphPtr glyph; gr = FindGlyphRef(&glyphSet->hash, id, FALSE, 0); glyph = gr->glyph; if (glyph && glyph != DeletedGlyph) { gr->glyph = DeletedGlyph; glyphSet->hash.tableEntries--; FreeGlyph(glyph, glyphSet->fdepth); return TRUE; } return FALSE; } GlyphPtr FindGlyph(GlyphSetPtr glyphSet, Glyph id) { GlyphPtr glyph; glyph = FindGlyphRef(&glyphSet->hash, id, FALSE, 0)->glyph; if (glyph == DeletedGlyph) glyph = 0; return glyph; } GlyphPtr AllocateGlyph(xGlyphInfo * gi, int fdepth) { PictureScreenPtr ps; int size; GlyphPtr glyph; int i; int head_size; head_size = sizeof(GlyphRec) + screenInfo.numScreens * sizeof(PicturePtr); size = (head_size + dixPrivatesSize(PRIVATE_GLYPH)); glyph = (GlyphPtr) malloc(size); if (!glyph) return 0; glyph->refcnt = 1; glyph->size = size + sizeof(xGlyphInfo); glyph->info = *gi; dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH); for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; SetGlyphPicture(glyph, pScreen, NULL); ps = GetPictureScreenIfSet(pScreen); if (ps) { if (!(*ps->RealizeGlyph) (pScreen, glyph)) goto bail; } } return glyph; bail: while (i--) { ps = GetPictureScreenIfSet(screenInfo.screens[i]); if (ps) (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph); } dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH); return 0; } static Bool AllocateGlyphHash(GlyphHashPtr hash, GlyphHashSetPtr hashSet) { hash->table = calloc(hashSet->size, sizeof(GlyphRefRec)); if (!hash->table) return FALSE; hash->hashSet = hashSet; hash->tableEntries = 0; return TRUE; } static Bool ResizeGlyphHash(GlyphHashPtr hash, CARD32 change, Bool global) { CARD32 tableEntries; GlyphHashSetPtr hashSet; GlyphHashRec newHash; GlyphRefPtr gr; GlyphPtr glyph; int i; int oldSize; CARD32 s; tableEntries = hash->tableEntries + change; hashSet = FindGlyphHashSet(tableEntries); if (hashSet == hash->hashSet) return TRUE; if (global) CheckDuplicates(hash, "ResizeGlyphHash top"); if (!AllocateGlyphHash(&newHash, hashSet)) return FALSE; if (hash->table) { oldSize = hash->hashSet->size; for (i = 0; i < oldSize; i++) { glyph = hash->table[i].glyph; if (glyph && glyph != DeletedGlyph) { s = hash->table[i].signature; gr = FindGlyphRef(&newHash, s, global, glyph->sha1); gr->signature = s; gr->glyph = glyph; ++newHash.tableEntries; } } free(hash->table); } *hash = newHash; if (global) CheckDuplicates(hash, "ResizeGlyphHash bottom"); return TRUE; } Bool ResizeGlyphSet(GlyphSetPtr glyphSet, CARD32 change) { return (ResizeGlyphHash(&glyphSet->hash, change, FALSE) && ResizeGlyphHash(&globalGlyphs[glyphSet->fdepth], change, TRUE)); } GlyphSetPtr AllocateGlyphSet(int fdepth, PictFormatPtr format) { GlyphSetPtr glyphSet; if (!globalGlyphs[fdepth].hashSet) { if (!AllocateGlyphHash(&globalGlyphs[fdepth], &glyphHashSets[0])) return FALSE; } glyphSet = dixAllocateObjectWithPrivates(GlyphSetRec, PRIVATE_GLYPHSET); if (!glyphSet) return FALSE; if (!AllocateGlyphHash(&glyphSet->hash, &glyphHashSets[0])) { free(glyphSet); return FALSE; } glyphSet->refcnt = 1; glyphSet->fdepth = fdepth; glyphSet->format = format; return glyphSet; } int FreeGlyphSet(void *value, XID gid) { GlyphSetPtr glyphSet = (GlyphSetPtr) value; if (--glyphSet->refcnt == 0) { CARD32 i, tableSize = glyphSet->hash.hashSet->size; GlyphRefPtr table = glyphSet->hash.table; GlyphPtr glyph; for (i = 0; i < tableSize; i++) { glyph = table[i].glyph; if (glyph && glyph != DeletedGlyph) FreeGlyph(glyph, glyphSet->fdepth); } if (!globalGlyphs[glyphSet->fdepth].tableEntries) { free(globalGlyphs[glyphSet->fdepth].table); globalGlyphs[glyphSet->fdepth].table = 0; globalGlyphs[glyphSet->fdepth].hashSet = 0; } else ResizeGlyphHash(&globalGlyphs[glyphSet->fdepth], 0, TRUE); free(table); dixFreeObjectWithPrivates(glyphSet, PRIVATE_GLYPHSET); } return Success; } static void GlyphExtents(int nlist, GlyphListPtr list, GlyphPtr * glyphs, BoxPtr extents) { int x1, x2, y1, y2; int n; GlyphPtr glyph; int x, y; x = 0; y = 0; extents->x1 = MAXSHORT; extents->x2 = MINSHORT; extents->y1 = MAXSHORT; extents->y2 = MINSHORT; while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; list++; while (n--) { glyph = *glyphs++; x1 = x - glyph->info.x; if (x1 < MINSHORT) x1 = MINSHORT; y1 = y - glyph->info.y; if (y1 < MINSHORT) y1 = MINSHORT; x2 = x1 + glyph->info.width; if (x2 > MAXSHORT) x2 = MAXSHORT; y2 = y1 + glyph->info.height; if (y2 > MAXSHORT) y2 = MAXSHORT; if (x1 < extents->x1) extents->x1 = x1; if (x2 > extents->x2) extents->x2 = x2; if (y1 < extents->y1) extents->y1 = y1; if (y2 > extents->y2) extents->y2 = y2; x += glyph->info.xOff; y += glyph->info.yOff; } } } #define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) void CompositeGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr lists, GlyphPtr * glyphs) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); ValidatePicture(pSrc); ValidatePicture(pDst); (*ps->Glyphs) (op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, lists, glyphs); } Bool miRealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph) { return TRUE; } void miUnrealizeGlyph(ScreenPtr pScreen, GlyphPtr glyph) { } void miGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int nlist, GlyphListPtr list, GlyphPtr * glyphs) { PicturePtr pPicture; PixmapPtr pMaskPixmap = 0; PicturePtr pMask; ScreenPtr pScreen = pDst->pDrawable->pScreen; int width = 0, height = 0; int x, y; int xDst = list->xOff, yDst = list->yOff; int n; GlyphPtr glyph; int error; BoxRec extents = { 0, 0, 0, 0 }; CARD32 component_alpha; if (maskFormat) { GCPtr pGC; xRectangle rect; GlyphExtents(nlist, list, glyphs, &extents); if (extents.x2 <= extents.x1 || extents.y2 <= extents.y1) return; width = extents.x2 - extents.x1; height = extents.y2 - extents.y1; pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, maskFormat->depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pMaskPixmap) return; component_alpha = NeedsComponent(maskFormat->format); pMask = CreatePicture(0, &pMaskPixmap->drawable, maskFormat, CPComponentAlpha, &component_alpha, serverClient, &error); if (!pMask) { (*pScreen->DestroyPixmap) (pMaskPixmap); return; } pGC = GetScratchGC(pMaskPixmap->drawable.depth, pScreen); ValidateGC(&pMaskPixmap->drawable, pGC); rect.x = 0; rect.y = 0; rect.width = width; rect.height = height; (*pGC->ops->PolyFillRect) (&pMaskPixmap->drawable, pGC, 1, &rect); FreeScratchGC(pGC); x = -extents.x1; y = -extents.y1; } else { pMask = pDst; x = 0; y = 0; } while (nlist--) { x += list->xOff; y += list->yOff; n = list->len; while (n--) { glyph = *glyphs++; pPicture = GetGlyphPicture(glyph, pScreen); if (pPicture) { if (maskFormat) { CompositePicture(PictOpAdd, pPicture, None, pMask, 0, 0, 0, 0, x - glyph->info.x, y - glyph->info.y, glyph->info.width, glyph->info.height); } else { CompositePicture(op, pSrc, pPicture, pDst, xSrc + (x - glyph->info.x) - xDst, ySrc + (y - glyph->info.y) - yDst, 0, 0, x - glyph->info.x, y - glyph->info.y, glyph->info.width, glyph->info.height); } } x += glyph->info.xOff; y += glyph->info.yOff; } list++; } if (maskFormat) { x = extents.x1; y = extents.y1; CompositePicture(op, pSrc, pMask, pDst, xSrc + x - xDst, ySrc + y - yDst, 0, 0, x, y, width, height); FreePicture((void *) pMask, (XID) 0); (*pScreen->DestroyPixmap) (pMaskPixmap); } } PicturePtr GetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen) { if (pScreen->isGPU) return NULL; return GlyphPicture(glyph)[pScreen->myNum]; } void SetGlyphPicture(GlyphPtr glyph, ScreenPtr pScreen, PicturePtr picture) { GlyphPicture(glyph)[pScreen->myNum] = picture; } xorg-server-21.1.16/render/matrix.c0000644000175000017500000000547014757411105012570 /* * Copyright © 2007 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 the copyright holders not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. The copyright holders make no representations * about the suitability of this software for any purpose. It is provided "as * is" without express or implied warranty. * * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL THE COPYRIGHT HOLDERS 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 #endif #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "input.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" void PictTransform_from_xRenderTransform(PictTransformPtr pict, xRenderTransform * render) { pict->matrix[0][0] = render->matrix11; pict->matrix[0][1] = render->matrix12; pict->matrix[0][2] = render->matrix13; pict->matrix[1][0] = render->matrix21; pict->matrix[1][1] = render->matrix22; pict->matrix[1][2] = render->matrix23; pict->matrix[2][0] = render->matrix31; pict->matrix[2][1] = render->matrix32; pict->matrix[2][2] = render->matrix33; } void xRenderTransform_from_PictTransform(xRenderTransform * render, PictTransformPtr pict) { render->matrix11 = pict->matrix[0][0]; render->matrix12 = pict->matrix[0][1]; render->matrix13 = pict->matrix[0][2]; render->matrix21 = pict->matrix[1][0]; render->matrix22 = pict->matrix[1][1]; render->matrix23 = pict->matrix[1][2]; render->matrix31 = pict->matrix[2][0]; render->matrix32 = pict->matrix[2][1]; render->matrix33 = pict->matrix[2][2]; } Bool PictureTransformPoint(PictTransformPtr transform, PictVectorPtr vector) { return pixman_transform_point(transform, vector); } Bool PictureTransformPoint3d(PictTransformPtr transform, PictVectorPtr vector) { return pixman_transform_point_3d(transform, vector); } xorg-server-21.1.16/render/miindex.c0000644000175000017500000002247714757411105012727 /* * * Copyright © 2001 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #ifndef _MIINDEX_H_ #define _MIINDEX_H_ #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "mi.h" #include "picturestr.h" #include "mipict.h" #include "colormapst.h" #define NUM_CUBE_LEVELS 4 #define NUM_GRAY_LEVELS 13 static Bool miBuildRenderColormap(ColormapPtr pColormap, Pixel * pixels, int *nump) { int r, g, b; unsigned short red, green, blue; Pixel pixel; Bool used[MI_MAX_INDEXED]; int needed; int policy; int cube, gray; int i, n; if (pColormap->mid != pColormap->pScreen->defColormap) { policy = PictureCmapPolicyAll; } else { int avail = pColormap->pVisual->ColormapEntries; policy = PictureCmapPolicy; if (policy == PictureCmapPolicyDefault) { if (avail >= 256 && (pColormap->pVisual->class | DynamicClass) == PseudoColor) policy = PictureCmapPolicyColor; else if (avail >= 64) policy = PictureCmapPolicyGray; else policy = PictureCmapPolicyMono; } } /* * Make sure enough cells are free for the chosen policy */ for (;;) { switch (policy) { case PictureCmapPolicyAll: needed = 0; break; case PictureCmapPolicyColor: needed = 71; break; case PictureCmapPolicyGray: needed = 11; break; case PictureCmapPolicyMono: default: needed = 0; break; } if (needed <= pColormap->freeRed) break; policy--; } /* * Compute size of cube and gray ramps */ cube = gray = 0; switch (policy) { case PictureCmapPolicyAll: /* * Allocate as big a cube as possible */ if ((pColormap->pVisual->class | DynamicClass) == PseudoColor) { for (cube = 1; cube * cube * cube < pColormap->pVisual->ColormapEntries; cube++); cube--; if (cube == 1) cube = 0; } else cube = 0; /* * Figure out how many gray levels to use so that they * line up neatly with the cube */ if (cube) { needed = pColormap->pVisual->ColormapEntries - (cube * cube * cube); /* levels to fill in with */ gray = needed / (cube - 1); /* total levels */ gray = (gray + 1) * (cube - 1) + 1; } else gray = pColormap->pVisual->ColormapEntries; break; case PictureCmapPolicyColor: cube = NUM_CUBE_LEVELS; /* fall through ... */ case PictureCmapPolicyGray: gray = NUM_GRAY_LEVELS; break; case PictureCmapPolicyMono: default: gray = 2; break; } memset(used, '\0', pColormap->pVisual->ColormapEntries * sizeof(Bool)); for (r = 0; r < cube; r++) for (g = 0; g < cube; g++) for (b = 0; b < cube; b++) { pixel = 0; red = (r * 65535 + (cube - 1) / 2) / (cube - 1); green = (g * 65535 + (cube - 1) / 2) / (cube - 1); blue = (b * 65535 + (cube - 1) / 2) / (cube - 1); if (AllocColor(pColormap, &red, &green, &blue, &pixel, 0) != Success) return FALSE; used[pixel] = TRUE; } for (g = 0; g < gray; g++) { pixel = 0; red = green = blue = (g * 65535 + (gray - 1) / 2) / (gray - 1); if (AllocColor(pColormap, &red, &green, &blue, &pixel, 0) != Success) return FALSE; used[pixel] = TRUE; } n = 0; for (i = 0; i < pColormap->pVisual->ColormapEntries; i++) if (used[i]) pixels[n++] = i; *nump = n; return TRUE; } /* 0 <= red, green, blue < 32 */ static Pixel FindBestColor(miIndexedPtr pIndexed, Pixel * pixels, int num, int red, int green, int blue) { Pixel best = pixels[0]; int bestDist = 1 << 30; int dist; int dr, dg, db; while (num--) { Pixel pixel = *pixels++; CARD32 v = pIndexed->rgba[pixel]; dr = ((v >> 19) & 0x1f); dg = ((v >> 11) & 0x1f); db = ((v >> 3) & 0x1f); dr = dr - red; dg = dg - green; db = db - blue; dist = dr * dr + dg * dg + db * db; if (dist < bestDist) { bestDist = dist; best = pixel; } } return best; } /* 0 <= gray < 32768 */ static Pixel FindBestGray(miIndexedPtr pIndexed, Pixel * pixels, int num, int gray) { Pixel best = pixels[0]; int bestDist = 1 << 30; int dist; int dr; int r; while (num--) { Pixel pixel = *pixels++; CARD32 v = pIndexed->rgba[pixel]; r = v & 0xff; r = r | (r << 8); dr = gray - (r >> 1); dist = dr * dr; if (dist < bestDist) { bestDist = dist; best = pixel; } } return best; } Bool miInitIndexed(ScreenPtr pScreen, PictFormatPtr pFormat) { ColormapPtr pColormap = pFormat->index.pColormap; VisualPtr pVisual = pColormap->pVisual; miIndexedPtr pIndexed; Pixel pixels[MI_MAX_INDEXED]; xrgb rgb[MI_MAX_INDEXED]; int num; int i; Pixel p, r, g, b; if (pVisual->ColormapEntries > MI_MAX_INDEXED) return FALSE; if (pVisual->class & DynamicClass) { if (!miBuildRenderColormap(pColormap, pixels, &num)) return FALSE; } else { num = pVisual->ColormapEntries; for (p = 0; p < num; p++) pixels[p] = p; } pIndexed = malloc(sizeof(miIndexedRec)); if (!pIndexed) return FALSE; pFormat->index.nvalues = num; pFormat->index.pValues = xallocarray(num, sizeof(xIndexValue)); if (!pFormat->index.pValues) { free(pIndexed); return FALSE; } /* * Build mapping from pixel value to ARGB */ QueryColors(pColormap, num, pixels, rgb, serverClient); for (i = 0; i < num; i++) { p = pixels[i]; pFormat->index.pValues[i].pixel = p; pFormat->index.pValues[i].red = rgb[i].red; pFormat->index.pValues[i].green = rgb[i].green; pFormat->index.pValues[i].blue = rgb[i].blue; pFormat->index.pValues[i].alpha = 0xffff; pIndexed->rgba[p] = (0xff000000 | ((rgb[i].red & 0xff00) << 8) | ((rgb[i].green & 0xff00)) | ((rgb[i].blue & 0xff00) >> 8)); } /* * Build mapping from RGB to pixel value. This could probably be * done a bit quicker... */ switch (pVisual->class | DynamicClass) { case GrayScale: pIndexed->color = FALSE; for (r = 0; r < 32768; r++) pIndexed->ent[r] = FindBestGray(pIndexed, pixels, num, r); break; case PseudoColor: pIndexed->color = TRUE; p = 0; for (r = 0; r < 32; r++) for (g = 0; g < 32; g++) for (b = 0; b < 32; b++) { pIndexed->ent[p] = FindBestColor(pIndexed, pixels, num, r, g, b); p++; } break; } pFormat->index.devPrivate = pIndexed; return TRUE; } void miCloseIndexed(ScreenPtr pScreen, PictFormatPtr pFormat) { free(pFormat->index.devPrivate); pFormat->index.devPrivate = NULL; free(pFormat->index.pValues); pFormat->index.pValues = NULL; } void miUpdateIndexed(ScreenPtr pScreen, PictFormatPtr pFormat, int ndef, xColorItem * pdef) { miIndexedPtr pIndexed = pFormat->index.devPrivate; if (pIndexed) { while (ndef--) { pIndexed->rgba[pdef->pixel] = (0xff000000 | ((pdef->red & 0xff00) << 8) | ((pdef->green & 0xff00)) | ((pdef->blue & 0xff00) >> 8)); pdef++; } } } #endif /* _MIINDEX_H_ */ xorg-server-21.1.16/render/mipict.c0000644000175000017500000004532414757411105012553 /* * * Copyright © 1999 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 #endif #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "mi.h" #include "picturestr.h" #include "mipict.h" int miCreatePicture(PicturePtr pPicture) { return Success; } void miDestroyPicture(PicturePtr pPicture) { if (pPicture->freeCompClip) RegionDestroy(pPicture->pCompositeClip); } static void miDestroyPictureClip(PicturePtr pPicture) { if (pPicture->clientClip) RegionDestroy(pPicture->clientClip); pPicture->clientClip = NULL; } static int miChangePictureClip(PicturePtr pPicture, int type, void *value, int n) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); RegionPtr clientClip; switch (type) { case CT_PIXMAP: /* convert the pixmap to a region */ clientClip = BitmapToRegion(pScreen, (PixmapPtr) value); if (!clientClip) return BadAlloc; (*pScreen->DestroyPixmap) ((PixmapPtr) value); break; case CT_REGION: clientClip = value; break; case CT_NONE: clientClip = 0; break; default: clientClip = RegionFromRects(n, (xRectangle *) value, type); if (!clientClip) return BadAlloc; free(value); break; } (*ps->DestroyPictureClip) (pPicture); pPicture->clientClip = clientClip; pPicture->stateChanges |= CPClipMask; return Success; } static void miChangePicture(PicturePtr pPicture, Mask mask) { return; } static void miValidatePicture(PicturePtr pPicture, Mask mask) { DrawablePtr pDrawable = pPicture->pDrawable; if ((mask & (CPClipXOrigin | CPClipYOrigin | CPClipMask | CPSubwindowMode)) || (pDrawable->serialNumber != (pPicture->serialNumber & DRAWABLE_SERIAL_BITS))) { if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; RegionPtr pregWin; Bool freeTmpClip, freeCompClip; if (pPicture->subWindowMode == IncludeInferiors) { pregWin = NotClippedByChildren(pWin); freeTmpClip = TRUE; } else { pregWin = &pWin->clipList; freeTmpClip = FALSE; } freeCompClip = pPicture->freeCompClip; /* * if there is no client clip, we can get by with just keeping the * pointer we got, and remembering whether or not should destroy * (or maybe re-use) it later. this way, we avoid unnecessary * copying of regions. (this wins especially if many clients clip * by children and have no client clip.) */ if (!pPicture->clientClip) { if (freeCompClip) RegionDestroy(pPicture->pCompositeClip); pPicture->pCompositeClip = pregWin; pPicture->freeCompClip = freeTmpClip; } else { /* * we need one 'real' region to put into the composite clip. if * pregWin the current composite clip are real, we can get rid of * one. if pregWin is real and the current composite clip isn't, * use pregWin for the composite clip. if the current composite * clip is real and pregWin isn't, use the current composite * clip. if neither is real, create a new region. */ RegionTranslate(pPicture->clientClip, pDrawable->x + pPicture->clipOrigin.x, pDrawable->y + pPicture->clipOrigin.y); if (freeCompClip) { RegionIntersect(pPicture->pCompositeClip, pregWin, pPicture->clientClip); if (freeTmpClip) RegionDestroy(pregWin); } else if (freeTmpClip) { RegionIntersect(pregWin, pregWin, pPicture->clientClip); pPicture->pCompositeClip = pregWin; } else { pPicture->pCompositeClip = RegionCreate(NullBox, 0); RegionIntersect(pPicture->pCompositeClip, pregWin, pPicture->clientClip); } pPicture->freeCompClip = TRUE; RegionTranslate(pPicture->clientClip, -(pDrawable->x + pPicture->clipOrigin.x), -(pDrawable->y + pPicture->clipOrigin.y)); } } /* end of composite clip for a window */ else { BoxRec pixbounds; /* XXX should we translate by drawable.x/y here ? */ /* If you want pixmaps in offscreen memory, yes */ pixbounds.x1 = pDrawable->x; pixbounds.y1 = pDrawable->y; pixbounds.x2 = pDrawable->x + pDrawable->width; pixbounds.y2 = pDrawable->y + pDrawable->height; if (pPicture->freeCompClip) { RegionReset(pPicture->pCompositeClip, &pixbounds); } else { pPicture->freeCompClip = TRUE; pPicture->pCompositeClip = RegionCreate(&pixbounds, 1); } if (pPicture->clientClip) { if (pDrawable->x || pDrawable->y) { RegionTranslate(pPicture->clientClip, pDrawable->x + pPicture->clipOrigin.x, pDrawable->y + pPicture->clipOrigin.y); RegionIntersect(pPicture->pCompositeClip, pPicture->pCompositeClip, pPicture->clientClip); RegionTranslate(pPicture->clientClip, -(pDrawable->x + pPicture->clipOrigin.x), -(pDrawable->y + pPicture->clipOrigin.y)); } else { RegionTranslate(pPicture->pCompositeClip, -pPicture->clipOrigin.x, -pPicture->clipOrigin.y); RegionIntersect(pPicture->pCompositeClip, pPicture->pCompositeClip, pPicture->clientClip); RegionTranslate(pPicture->pCompositeClip, pPicture->clipOrigin.x, pPicture->clipOrigin.y); } } } /* end of composite clip for pixmap */ } } static int miChangePictureTransform(PicturePtr pPicture, PictTransform * transform) { return Success; } static int miChangePictureFilter(PicturePtr pPicture, int filter, xFixed * params, int nparams) { return Success; } #define BOUND(v) (INT16) ((v) < MINSHORT ? MINSHORT : (v) > MAXSHORT ? MAXSHORT : (v)) static inline pixman_bool_t miClipPictureReg(pixman_region16_t * pRegion, pixman_region16_t * pClip, int dx, int dy) { if (pixman_region_n_rects(pRegion) == 1 && pixman_region_n_rects(pClip) == 1) { pixman_box16_t *pRbox = pixman_region_rectangles(pRegion, NULL); pixman_box16_t *pCbox = pixman_region_rectangles(pClip, NULL); int v; if (pRbox->x1 < (v = pCbox->x1 + dx)) pRbox->x1 = BOUND(v); if (pRbox->x2 > (v = pCbox->x2 + dx)) pRbox->x2 = BOUND(v); if (pRbox->y1 < (v = pCbox->y1 + dy)) pRbox->y1 = BOUND(v); if (pRbox->y2 > (v = pCbox->y2 + dy)) pRbox->y2 = BOUND(v); if (pRbox->x1 >= pRbox->x2 || pRbox->y1 >= pRbox->y2) { pixman_region_init(pRegion); } } else if (!pixman_region_not_empty(pClip)) return FALSE; else { if (dx || dy) pixman_region_translate(pRegion, -dx, -dy); if (!pixman_region_intersect(pRegion, pRegion, pClip)) return FALSE; if (dx || dy) pixman_region_translate(pRegion, dx, dy); } return pixman_region_not_empty(pRegion); } static inline Bool miClipPictureSrc(RegionPtr pRegion, PicturePtr pPicture, int dx, int dy) { if (pPicture->clientClip) { Bool result; pixman_region_translate(pPicture->clientClip, pPicture->clipOrigin.x + dx, pPicture->clipOrigin.y + dy); result = RegionIntersect(pRegion, pRegion, pPicture->clientClip); pixman_region_translate(pPicture->clientClip, -(pPicture->clipOrigin.x + dx), -(pPicture->clipOrigin.y + dy)); if (!result) return FALSE; } return TRUE; } static void SourceValidateOnePicture(PicturePtr pPicture) { DrawablePtr pDrawable = pPicture->pDrawable; ScreenPtr pScreen; if (!pDrawable) return; pScreen = pDrawable->pScreen; pScreen->SourceValidate(pDrawable, 0, 0, pDrawable->width, pDrawable->height, pPicture->subWindowMode); } void miCompositeSourceValidate(PicturePtr pPicture) { SourceValidateOnePicture(pPicture); if (pPicture->alphaMap) SourceValidateOnePicture(pPicture->alphaMap); } /* * returns FALSE if the final region is empty. Indistinguishable from * an allocation failure, but rendering ignores those anyways. */ Bool miComputeCompositeRegion(RegionPtr pRegion, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { int v; pRegion->extents.x1 = xDst; v = xDst + width; pRegion->extents.x2 = BOUND(v); pRegion->extents.y1 = yDst; v = yDst + height; pRegion->extents.y2 = BOUND(v); pRegion->data = 0; /* Check for empty operation */ if (pRegion->extents.x1 >= pRegion->extents.x2 || pRegion->extents.y1 >= pRegion->extents.y2) { pixman_region_init(pRegion); return FALSE; } /* clip against dst */ if (!miClipPictureReg(pRegion, pDst->pCompositeClip, 0, 0)) { pixman_region_fini(pRegion); return FALSE; } if (pDst->alphaMap) { if (!miClipPictureReg(pRegion, pDst->alphaMap->pCompositeClip, -pDst->alphaOrigin.x, -pDst->alphaOrigin.y)) { pixman_region_fini(pRegion); return FALSE; } } /* clip against src */ if (!miClipPictureSrc(pRegion, pSrc, xDst - xSrc, yDst - ySrc)) { pixman_region_fini(pRegion); return FALSE; } if (pSrc->alphaMap) { if (!miClipPictureSrc(pRegion, pSrc->alphaMap, xDst - (xSrc - pSrc->alphaOrigin.x), yDst - (ySrc - pSrc->alphaOrigin.y))) { pixman_region_fini(pRegion); return FALSE; } } /* clip against mask */ if (pMask) { if (!miClipPictureSrc(pRegion, pMask, xDst - xMask, yDst - yMask)) { pixman_region_fini(pRegion); return FALSE; } if (pMask->alphaMap) { if (!miClipPictureSrc(pRegion, pMask->alphaMap, xDst - (xMask - pMask->alphaOrigin.x), yDst - (yMask - pMask->alphaOrigin.y))) { pixman_region_fini(pRegion); return FALSE; } } } miCompositeSourceValidate(pSrc); if (pMask) miCompositeSourceValidate(pMask); return TRUE; } void miRenderColorToPixel(PictFormatPtr format, xRenderColor * color, CARD32 *pixel) { CARD32 r, g, b, a; miIndexedPtr pIndexed; switch (format->type) { case PictTypeDirect: r = color->red >> (16 - Ones(format->direct.redMask)); g = color->green >> (16 - Ones(format->direct.greenMask)); b = color->blue >> (16 - Ones(format->direct.blueMask)); a = color->alpha >> (16 - Ones(format->direct.alphaMask)); r = r << format->direct.red; g = g << format->direct.green; b = b << format->direct.blue; a = a << format->direct.alpha; *pixel = r | g | b | a; break; case PictTypeIndexed: pIndexed = (miIndexedPtr) (format->index.devPrivate); if (pIndexed->color) { r = color->red >> 11; g = color->green >> 11; b = color->blue >> 11; *pixel = miIndexToEnt15(pIndexed, (r << 10) | (g << 5) | b); } else { r = color->red >> 8; g = color->green >> 8; b = color->blue >> 8; *pixel = miIndexToEntY24(pIndexed, (r << 16) | (g << 8) | b); } break; } } static CARD16 miFillColor(CARD32 pixel, int bits) { while (bits < 16) { pixel |= pixel << bits; bits <<= 1; } return (CARD16) pixel; } Bool miIsSolidAlpha(PicturePtr pSrc) { ScreenPtr pScreen; char line[1]; if (!pSrc->pDrawable) return FALSE; pScreen = pSrc->pDrawable->pScreen; /* Alpha-only */ if (PICT_FORMAT_TYPE(pSrc->format) != PICT_TYPE_A) return FALSE; /* repeat */ if (!pSrc->repeat) return FALSE; /* 1x1 */ if (pSrc->pDrawable->width != 1 || pSrc->pDrawable->height != 1) return FALSE; line[0] = 1; (*pScreen->GetImage) (pSrc->pDrawable, 0, 0, 1, 1, ZPixmap, ~0L, line); switch (pSrc->pDrawable->bitsPerPixel) { case 1: return (CARD8) line[0] == 1 || (CARD8) line[0] == 0x80; case 4: return (CARD8) line[0] == 0xf || (CARD8) line[0] == 0xf0; case 8: return (CARD8) line[0] == 0xff; default: return FALSE; } } void miRenderPixelToColor(PictFormatPtr format, CARD32 pixel, xRenderColor * color) { CARD32 r, g, b, a; miIndexedPtr pIndexed; switch (format->type) { case PictTypeDirect: r = (pixel >> format->direct.red) & format->direct.redMask; g = (pixel >> format->direct.green) & format->direct.greenMask; b = (pixel >> format->direct.blue) & format->direct.blueMask; a = (pixel >> format->direct.alpha) & format->direct.alphaMask; color->red = miFillColor(r, Ones(format->direct.redMask)); color->green = miFillColor(g, Ones(format->direct.greenMask)); color->blue = miFillColor(b, Ones(format->direct.blueMask)); color->alpha = miFillColor(a, Ones(format->direct.alphaMask)); break; case PictTypeIndexed: pIndexed = (miIndexedPtr) (format->index.devPrivate); pixel = pIndexed->rgba[pixel & (MI_MAX_INDEXED - 1)]; r = (pixel >> 16) & 0xff; g = (pixel >> 8) & 0xff; b = (pixel) & 0xff; color->red = miFillColor(r, 8); color->green = miFillColor(g, 8); color->blue = miFillColor(b, 8); color->alpha = 0xffff; break; } } static void miTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points) { xTriangle *tris, *tri; int ntri; ntri = npoints - 2; tris = xallocarray(ntri, sizeof(xTriangle)); if (!tris) return; for (tri = tris; npoints >= 3; npoints--, points++, tri++) { tri->p1 = points[0]; tri->p2 = points[1]; tri->p3 = points[2]; } CompositeTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); free(tris); } static void miTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points) { xTriangle *tris, *tri; xPointFixed *first; int ntri; ntri = npoints - 2; tris = xallocarray(ntri, sizeof(xTriangle)); if (!tris) return; first = points++; for (tri = tris; npoints >= 3; npoints--, points++, tri++) { tri->p1 = *first; tri->p2 = points[0]; tri->p3 = points[1]; } CompositeTriangles(op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); free(tris); } Bool miPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; if (!PictureInit(pScreen, formats, nformats)) return FALSE; ps = GetPictureScreen(pScreen); ps->CreatePicture = miCreatePicture; ps->DestroyPicture = miDestroyPicture; ps->ChangePictureClip = miChangePictureClip; ps->DestroyPictureClip = miDestroyPictureClip; ps->ChangePicture = miChangePicture; ps->ValidatePicture = miValidatePicture; ps->InitIndexed = miInitIndexed; ps->CloseIndexed = miCloseIndexed; ps->UpdateIndexed = miUpdateIndexed; ps->ChangePictureTransform = miChangePictureTransform; ps->ChangePictureFilter = miChangePictureFilter; ps->RealizeGlyph = miRealizeGlyph; ps->UnrealizeGlyph = miUnrealizeGlyph; /* MI rendering routines */ ps->Composite = 0; /* requires DDX support */ ps->Glyphs = miGlyphs; ps->CompositeRects = miCompositeRects; ps->Trapezoids = 0; ps->Triangles = 0; ps->RasterizeTrapezoid = 0; /* requires DDX support */ ps->AddTraps = 0; /* requires DDX support */ ps->AddTriangles = 0; /* requires DDX support */ ps->TriStrip = miTriStrip; /* converts call to CompositeTriangles */ ps->TriFan = miTriFan; return TRUE; } xorg-server-21.1.16/render/mirect.c0000644000175000017500000000751314757411105012547 /* * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "mi.h" #include "picturestr.h" #include "mipict.h" static void miColorRects(PicturePtr pDst, PicturePtr pClipPict, xRenderColor * color, int nRect, xRectangle *rects, int xoff, int yoff) { CARD32 pixel; GCPtr pGC; ChangeGCVal tmpval[5]; RegionPtr pClip; unsigned long mask; miRenderColorToPixel(pDst->pFormat, color, &pixel); pGC = GetScratchGC(pDst->pDrawable->depth, pDst->pDrawable->pScreen); if (!pGC) return; tmpval[0].val = GXcopy; tmpval[1].val = pixel; tmpval[2].val = pDst->subWindowMode; mask = GCFunction | GCForeground | GCSubwindowMode; if (pClipPict->clientClip) { tmpval[3].val = pDst->clipOrigin.x - xoff; tmpval[4].val = pDst->clipOrigin.y - yoff; mask |= GCClipXOrigin | GCClipYOrigin; pClip = RegionCreate(NULL, 1); RegionCopy(pClip, (RegionPtr) pClipPict->clientClip); (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0); } ChangeGC(NullClient, pGC, mask, tmpval); ValidateGC(pDst->pDrawable, pGC); if (xoff || yoff) { int i; for (i = 0; i < nRect; i++) { rects[i].x -= xoff; rects[i].y -= yoff; } } (*pGC->ops->PolyFillRect) (pDst->pDrawable, pGC, nRect, rects); if (xoff || yoff) { int i; for (i = 0; i < nRect; i++) { rects[i].x += xoff; rects[i].y += yoff; } } FreeScratchGC(pGC); } void miCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects) { if (color->alpha == 0xffff) { if (op == PictOpOver) op = PictOpSrc; } if (op == PictOpClear) color->red = color->green = color->blue = color->alpha = 0; if (op == PictOpSrc || op == PictOpClear) { miColorRects(pDst, pDst, color, nRect, rects, 0, 0); if (pDst->alphaMap) miColorRects(pDst->alphaMap, pDst, color, nRect, rects, pDst->alphaOrigin.x, pDst->alphaOrigin.y); } else { int error; PicturePtr pSrc = CreateSolidPicture(0, color, &error); if (pSrc) { while (nRect--) { CompositePicture(op, pSrc, 0, pDst, 0, 0, 0, 0, rects->x, rects->y, rects->width, rects->height); rects++; } FreePicture((void *) pSrc, 0); } } } xorg-server-21.1.16/render/mitrap.c0000644000175000017500000000520014757411105012547 /* * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "servermd.h" #include "mi.h" #include "picturestr.h" #include "mipict.h" static xFixed miLineFixedX(xLineFixed * l, xFixed y, Bool ceil) { xFixed dx = l->p2.x - l->p1.x; xFixed_32_32 ex = (xFixed_32_32) (y - l->p1.y) * dx; xFixed dy = l->p2.y - l->p1.y; if (ceil) ex += (dy - 1); return l->p1.x + (xFixed) (ex / dy); } void miTrapezoidBounds(int ntrap, xTrapezoid * traps, BoxPtr box) { box->y1 = MAXSHORT; box->y2 = MINSHORT; box->x1 = MAXSHORT; box->x2 = MINSHORT; for (; ntrap; ntrap--, traps++) { INT16 x1, y1, x2, y2; if (!xTrapezoidValid(traps)) continue; y1 = xFixedToInt(traps->top); if (y1 < box->y1) box->y1 = y1; y2 = xFixedToInt(xFixedCeil(traps->bottom)); if (y2 > box->y2) box->y2 = y2; x1 = xFixedToInt(min(miLineFixedX(&traps->left, traps->top, FALSE), miLineFixedX(&traps->left, traps->bottom, FALSE))); if (x1 < box->x1) box->x1 = x1; x2 = xFixedToInt(xFixedCeil (max (miLineFixedX(&traps->right, traps->top, TRUE), miLineFixedX(&traps->right, traps->bottom, TRUE)))); if (x2 > box->x2) box->x2 = x2; } } xorg-server-21.1.16/render/mitri.c0000644000175000017500000000443014757411105012403 /* * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * * 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 #endif #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" #include "windowstr.h" #include "mi.h" #include "picturestr.h" #include "mipict.h" void miPointFixedBounds(int npoint, xPointFixed * points, BoxPtr bounds) { bounds->x1 = xFixedToInt(points->x); bounds->x2 = xFixedToInt(xFixedCeil(points->x)); bounds->y1 = xFixedToInt(points->y); bounds->y2 = xFixedToInt(xFixedCeil(points->y)); points++; npoint--; while (npoint-- > 0) { INT16 x1 = xFixedToInt(points->x); INT16 x2 = xFixedToInt(xFixedCeil(points->x)); INT16 y1 = xFixedToInt(points->y); INT16 y2 = xFixedToInt(xFixedCeil(points->y)); if (x1 < bounds->x1) bounds->x1 = x1; else if (x2 > bounds->x2) bounds->x2 = x2; if (y1 < bounds->y1) bounds->y1 = y1; else if (y2 > bounds->y2) bounds->y2 = y2; points++; } } void miTriangleBounds(int ntri, xTriangle * tris, BoxPtr bounds) { miPointFixedBounds(ntri * 3, (xPointFixed *) tris, bounds); } xorg-server-21.1.16/render/picture.c0000644000175000017500000013563114757411105012742 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "misc.h" #include "scrnintstr.h" #include "os.h" #include "regionstr.h" #include "validate.h" #include "windowstr.h" #include "input.h" #include "resource.h" #include "colormapst.h" #include "cursorstr.h" #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" #include "picturestr.h" #include "xace.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #endif DevPrivateKeyRec PictureScreenPrivateKeyRec; DevPrivateKeyRec PictureWindowPrivateKeyRec; static int PictureGeneration; RESTYPE PictureType; RESTYPE PictFormatType; RESTYPE GlyphSetType; int PictureCmapPolicy = PictureCmapPolicyDefault; PictFormatPtr PictureWindowFormat(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; return PictureMatchVisual(pScreen, pWindow->drawable.depth, WindowGetVisual(pWindow)); } static Bool PictureDestroyWindow(WindowPtr pWindow) { ScreenPtr pScreen = pWindow->drawable.pScreen; PicturePtr pPicture; PictureScreenPtr ps = GetPictureScreen(pScreen); Bool ret; while ((pPicture = GetPictureWindow(pWindow))) { SetPictureWindow(pWindow, pPicture->pNext); if (pPicture->id) FreeResource(pPicture->id, PictureType); FreePicture((void *) pPicture, pPicture->id); } pScreen->DestroyWindow = ps->DestroyWindow; ret = (*pScreen->DestroyWindow) (pWindow); ps->DestroyWindow = pScreen->DestroyWindow; pScreen->DestroyWindow = PictureDestroyWindow; return ret; } static Bool PictureCloseScreen(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); Bool ret; int n; pScreen->CloseScreen = ps->CloseScreen; ret = (*pScreen->CloseScreen) (pScreen); PictureResetFilters(pScreen); for (n = 0; n < ps->nformats; n++) if (ps->formats[n].type == PictTypeIndexed) (*ps->CloseIndexed) (pScreen, &ps->formats[n]); GlyphUninit(pScreen); SetPictureScreen(pScreen, 0); free(ps->formats); free(ps); return ret; } static void PictureStoreColors(ColormapPtr pColormap, int ndef, xColorItem * pdef) { ScreenPtr pScreen = pColormap->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); pScreen->StoreColors = ps->StoreColors; (*pScreen->StoreColors) (pColormap, ndef, pdef); ps->StoreColors = pScreen->StoreColors; pScreen->StoreColors = PictureStoreColors; if (pColormap->class == PseudoColor || pColormap->class == GrayScale) { PictFormatPtr format = ps->formats; int nformats = ps->nformats; while (nformats--) { if (format->type == PictTypeIndexed && format->index.pColormap == pColormap) { (*ps->UpdateIndexed) (pScreen, format, ndef, pdef); break; } format++; } } } static int visualDepth(ScreenPtr pScreen, VisualPtr pVisual) { int d, v; DepthPtr pDepth; for (d = 0; d < pScreen->numDepths; d++) { pDepth = &pScreen->allowedDepths[d]; for (v = 0; v < pDepth->numVids; v++) if (pDepth->vids[v] == pVisual->vid) return pDepth->depth; } return 0; } typedef struct _formatInit { CARD32 format; CARD8 depth; } FormatInitRec, *FormatInitPtr; static void addFormat(FormatInitRec formats[256], int *nformat, CARD32 format, CARD8 depth) { int n; for (n = 0; n < *nformat; n++) if (formats[n].format == format && formats[n].depth == depth) return; formats[*nformat].format = format; formats[*nformat].depth = depth; ++*nformat; } #define Mask(n) ((1 << (n)) - 1) static PictFormatPtr PictureCreateDefaultFormats(ScreenPtr pScreen, int *nformatp) { int nformats = 0, f; PictFormatPtr pFormats; FormatInitRec formats[1024]; CARD32 format; CARD8 depth; VisualPtr pVisual; int v; int bpp; int type; int r, g, b; int d; DepthPtr pDepth; nformats = 0; /* formats required by protocol */ formats[nformats].format = PICT_a1; formats[nformats].depth = 1; nformats++; formats[nformats].format = PICT_FORMAT(BitsPerPixel(8), PICT_TYPE_A, 8, 0, 0, 0); formats[nformats].depth = 8; nformats++; formats[nformats].format = PICT_a8r8g8b8; formats[nformats].depth = 32; nformats++; formats[nformats].format = PICT_x8r8g8b8; formats[nformats].depth = 32; nformats++; formats[nformats].format = PICT_b8g8r8a8; formats[nformats].depth = 32; nformats++; formats[nformats].format = PICT_b8g8r8x8; formats[nformats].depth = 32; nformats++; /* now look through the depths and visuals adding other formats */ for (v = 0; v < pScreen->numVisuals; v++) { pVisual = &pScreen->visuals[v]; depth = visualDepth(pScreen, pVisual); if (!depth) continue; bpp = BitsPerPixel(depth); switch (pVisual->class) { case DirectColor: case TrueColor: r = Ones(pVisual->redMask); g = Ones(pVisual->greenMask); b = Ones(pVisual->blueMask); type = PICT_TYPE_OTHER; /* * Current rendering code supports only three direct formats, * fields must be packed together at the bottom of the pixel */ if (pVisual->offsetBlue == 0 && pVisual->offsetGreen == b && pVisual->offsetRed == b + g) { type = PICT_TYPE_ARGB; } else if (pVisual->offsetRed == 0 && pVisual->offsetGreen == r && pVisual->offsetBlue == r + g) { type = PICT_TYPE_ABGR; } else if (pVisual->offsetRed == pVisual->offsetGreen - r && pVisual->offsetGreen == pVisual->offsetBlue - g && pVisual->offsetBlue == bpp - b) { type = PICT_TYPE_BGRA; } if (type != PICT_TYPE_OTHER) { format = PICT_FORMAT(bpp, type, 0, r, g, b); addFormat(formats, &nformats, format, depth); } break; case StaticColor: case PseudoColor: format = PICT_VISFORMAT(bpp, PICT_TYPE_COLOR, v); addFormat(formats, &nformats, format, depth); break; case StaticGray: case GrayScale: format = PICT_VISFORMAT(bpp, PICT_TYPE_GRAY, v); addFormat(formats, &nformats, format, depth); break; } } /* * Walk supported depths and add useful Direct formats */ for (d = 0; d < pScreen->numDepths; d++) { pDepth = &pScreen->allowedDepths[d]; bpp = BitsPerPixel(pDepth->depth); format = 0; switch (bpp) { case 16: /* depth 12 formats */ if (pDepth->depth >= 12) { addFormat(formats, &nformats, PICT_x4r4g4b4, pDepth->depth); addFormat(formats, &nformats, PICT_x4b4g4r4, pDepth->depth); } /* depth 15 formats */ if (pDepth->depth >= 15) { addFormat(formats, &nformats, PICT_x1r5g5b5, pDepth->depth); addFormat(formats, &nformats, PICT_x1b5g5r5, pDepth->depth); } /* depth 16 formats */ if (pDepth->depth >= 16) { addFormat(formats, &nformats, PICT_a1r5g5b5, pDepth->depth); addFormat(formats, &nformats, PICT_a1b5g5r5, pDepth->depth); addFormat(formats, &nformats, PICT_r5g6b5, pDepth->depth); addFormat(formats, &nformats, PICT_b5g6r5, pDepth->depth); addFormat(formats, &nformats, PICT_a4r4g4b4, pDepth->depth); addFormat(formats, &nformats, PICT_a4b4g4r4, pDepth->depth); } break; case 32: if (pDepth->depth >= 24) { addFormat(formats, &nformats, PICT_x8r8g8b8, pDepth->depth); addFormat(formats, &nformats, PICT_x8b8g8r8, pDepth->depth); } if (pDepth->depth >= 30) { addFormat(formats, &nformats, PICT_a2r10g10b10, pDepth->depth); addFormat(formats, &nformats, PICT_x2r10g10b10, pDepth->depth); addFormat(formats, &nformats, PICT_a2b10g10r10, pDepth->depth); addFormat(formats, &nformats, PICT_x2b10g10r10, pDepth->depth); } break; } } pFormats = calloc(nformats, sizeof(PictFormatRec)); if (!pFormats) return 0; for (f = 0; f < nformats; f++) { pFormats[f].id = FakeClientID(0); pFormats[f].depth = formats[f].depth; format = formats[f].format; pFormats[f].format = format; switch (PICT_FORMAT_TYPE(format)) { case PICT_TYPE_ARGB: pFormats[f].type = PictTypeDirect; pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); if (pFormats[f].direct.alphaMask) pFormats[f].direct.alpha = (PICT_FORMAT_R(format) + PICT_FORMAT_G(format) + PICT_FORMAT_B(format)); pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format)); pFormats[f].direct.red = (PICT_FORMAT_G(format) + PICT_FORMAT_B(format)); pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format)); pFormats[f].direct.green = PICT_FORMAT_B(format); pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); pFormats[f].direct.blue = 0; break; case PICT_TYPE_ABGR: pFormats[f].type = PictTypeDirect; pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); if (pFormats[f].direct.alphaMask) pFormats[f].direct.alpha = (PICT_FORMAT_B(format) + PICT_FORMAT_G(format) + PICT_FORMAT_R(format)); pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); pFormats[f].direct.blue = (PICT_FORMAT_G(format) + PICT_FORMAT_R(format)); pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format)); pFormats[f].direct.green = PICT_FORMAT_R(format); pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format)); pFormats[f].direct.red = 0; break; case PICT_TYPE_BGRA: pFormats[f].type = PictTypeDirect; pFormats[f].direct.blueMask = Mask (PICT_FORMAT_B(format)); pFormats[f].direct.blue = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format)); pFormats[f].direct.greenMask = Mask (PICT_FORMAT_G(format)); pFormats[f].direct.green = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) - PICT_FORMAT_G(format)); pFormats[f].direct.redMask = Mask (PICT_FORMAT_R(format)); pFormats[f].direct.red = (PICT_FORMAT_BPP(format) - PICT_FORMAT_B(format) - PICT_FORMAT_G(format) - PICT_FORMAT_R(format)); pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); pFormats[f].direct.alpha = 0; break; case PICT_TYPE_A: pFormats[f].type = PictTypeDirect; pFormats[f].direct.alpha = 0; pFormats[f].direct.alphaMask = Mask (PICT_FORMAT_A(format)); /* remaining fields already set to zero */ break; case PICT_TYPE_COLOR: case PICT_TYPE_GRAY: pFormats[f].type = PictTypeIndexed; pFormats[f].index.vid = pScreen->visuals[PICT_FORMAT_VIS(format)].vid; break; } } *nformatp = nformats; return pFormats; } static VisualPtr PictureFindVisual(ScreenPtr pScreen, VisualID visual) { int i; VisualPtr pVisual; for (i = 0, pVisual = pScreen->visuals; i < pScreen->numVisuals; i++, pVisual++) { if (pVisual->vid == visual) return pVisual; } return 0; } static Bool PictureInitIndexedFormat(ScreenPtr pScreen, PictFormatPtr format) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); if (format->type != PictTypeIndexed || format->index.pColormap) return TRUE; if (format->index.vid == pScreen->rootVisual) { dixLookupResourceByType((void **) &format->index.pColormap, pScreen->defColormap, RT_COLORMAP, serverClient, DixGetAttrAccess); } else { VisualPtr pVisual = PictureFindVisual(pScreen, format->index.vid); if (pVisual == NULL) return FALSE; if (CreateColormap(FakeClientID(0), pScreen, pVisual, &format->index.pColormap, AllocNone, 0) != Success) return FALSE; } if (!ps->InitIndexed(pScreen, format)) return FALSE; return TRUE; } static Bool PictureInitIndexedFormats(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); PictFormatPtr format; int nformat; if (!ps) return FALSE; format = ps->formats; nformat = ps->nformats; while (nformat--) if (!PictureInitIndexedFormat(pScreen, format++)) return FALSE; return TRUE; } Bool PictureFinishInit(void) { int s; for (s = 0; s < screenInfo.numScreens; s++) { if (!PictureInitIndexedFormats(screenInfo.screens[s])) return FALSE; (void) AnimCurInit(screenInfo.screens[s]); } return TRUE; } Bool PictureSetSubpixelOrder(ScreenPtr pScreen, int subpixel) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); if (!ps) return FALSE; ps->subpixel = subpixel; return TRUE; } int PictureGetSubpixelOrder(ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); if (!ps) return SubPixelUnknown; return ps->subpixel; } PictFormatPtr PictureMatchVisual(ScreenPtr pScreen, int depth, VisualPtr pVisual) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); PictFormatPtr format; int nformat; int type; if (!ps) return 0; format = ps->formats; nformat = ps->nformats; switch (pVisual->class) { case StaticGray: case GrayScale: case StaticColor: case PseudoColor: type = PictTypeIndexed; break; case TrueColor: case DirectColor: type = PictTypeDirect; break; default: return 0; } while (nformat--) { if (format->depth == depth && format->type == type) { if (type == PictTypeIndexed) { if (format->index.vid == pVisual->vid) return format; } else { if ((unsigned long)format->direct.redMask << format->direct.red == pVisual->redMask && (unsigned long)format->direct.greenMask << format->direct.green == pVisual->greenMask && (unsigned long)format->direct.blueMask << format->direct.blue == pVisual->blueMask) { return format; } } } format++; } return 0; } PictFormatPtr PictureMatchFormat(ScreenPtr pScreen, int depth, CARD32 f) { PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); PictFormatPtr format; int nformat; if (!ps) return 0; format = ps->formats; nformat = ps->nformats; while (nformat--) { if (format->depth == depth && format->format == (f & 0xffffff)) return format; format++; } return 0; } int PictureParseCmapPolicy(const char *name) { if (strcmp(name, "default") == 0) return PictureCmapPolicyDefault; else if (strcmp(name, "mono") == 0) return PictureCmapPolicyMono; else if (strcmp(name, "gray") == 0) return PictureCmapPolicyGray; else if (strcmp(name, "color") == 0) return PictureCmapPolicyColor; else if (strcmp(name, "all") == 0) return PictureCmapPolicyAll; else return PictureCmapPolicyInvalid; } /** @see GetDefaultBytes */ static void GetPictureBytes(void *value, XID id, ResourceSizePtr size) { PicturePtr picture = value; /* Currently only pixmap bytes are reported to clients. */ size->resourceSize = 0; size->refCnt = picture->refcnt; /* Calculate pixmap reference sizes. */ size->pixmapRefSize = 0; if (picture->pDrawable && (picture->pDrawable->type == DRAWABLE_PIXMAP)) { SizeType pixmapSizeFunc = GetResourceTypeSizeFunc(RT_PIXMAP); ResourceSizeRec pixmapSize = { 0, 0, 0 }; PixmapPtr pixmap = (PixmapPtr)picture->pDrawable; pixmapSizeFunc(pixmap, pixmap->drawable.id, &pixmapSize); size->pixmapRefSize += pixmapSize.pixmapRefSize; } } static int FreePictFormat(void *pPictFormat, XID pid) { return Success; } Bool PictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureScreenPtr ps; int n; CARD32 type, a, r, g, b; if (PictureGeneration != serverGeneration) { PictureType = CreateNewResourceType(FreePicture, "PICTURE"); if (!PictureType) return FALSE; SetResourceTypeSizeFunc(PictureType, GetPictureBytes); PictFormatType = CreateNewResourceType(FreePictFormat, "PICTFORMAT"); if (!PictFormatType) return FALSE; GlyphSetType = CreateNewResourceType(FreeGlyphSet, "GLYPHSET"); if (!GlyphSetType) return FALSE; PictureGeneration = serverGeneration; } if (!dixRegisterPrivateKey(&PictureScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&PictureWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; if (!formats) { formats = PictureCreateDefaultFormats(pScreen, &nformats); if (!formats) return FALSE; } for (n = 0; n < nformats; n++) { if (!AddResource (formats[n].id, PictFormatType, (void *) (formats + n))) { int i; for (i = 0; i < n; i++) FreeResource(formats[i].id, RT_NONE); free(formats); return FALSE; } if (formats[n].type == PictTypeIndexed) { VisualPtr pVisual = PictureFindVisual(pScreen, formats[n].index.vid); if ((pVisual->class | DynamicClass) == PseudoColor) type = PICT_TYPE_COLOR; else type = PICT_TYPE_GRAY; a = r = g = b = 0; } else { if ((formats[n].direct.redMask | formats[n].direct.blueMask | formats[n].direct.greenMask) == 0) type = PICT_TYPE_A; else if (formats[n].direct.red > formats[n].direct.blue) type = PICT_TYPE_ARGB; else if (formats[n].direct.red == 0) type = PICT_TYPE_ABGR; else type = PICT_TYPE_BGRA; a = Ones(formats[n].direct.alphaMask); r = Ones(formats[n].direct.redMask); g = Ones(formats[n].direct.greenMask); b = Ones(formats[n].direct.blueMask); } formats[n].format = PICT_FORMAT(0, type, a, r, g, b); } ps = (PictureScreenPtr) malloc(sizeof(PictureScreenRec)); if (!ps) { free(formats); return FALSE; } SetPictureScreen(pScreen, ps); ps->formats = formats; ps->fallback = formats; ps->nformats = nformats; ps->filters = 0; ps->nfilters = 0; ps->filterAliases = 0; ps->nfilterAliases = 0; ps->subpixel = SubPixelUnknown; ps->CloseScreen = pScreen->CloseScreen; ps->DestroyWindow = pScreen->DestroyWindow; ps->StoreColors = pScreen->StoreColors; pScreen->DestroyWindow = PictureDestroyWindow; pScreen->CloseScreen = PictureCloseScreen; pScreen->StoreColors = PictureStoreColors; if (!PictureSetDefaultFilters(pScreen)) { PictureResetFilters(pScreen); SetPictureScreen(pScreen, 0); free(formats); free(ps); return FALSE; } return TRUE; } static void SetPictureToDefaults(PicturePtr pPicture) { pPicture->refcnt = 1; pPicture->repeat = 0; pPicture->graphicsExposures = FALSE; pPicture->subWindowMode = ClipByChildren; pPicture->polyEdge = PolyEdgeSharp; pPicture->polyMode = PolyModePrecise; pPicture->freeCompClip = FALSE; pPicture->componentAlpha = FALSE; pPicture->repeatType = RepeatNone; pPicture->alphaMap = 0; pPicture->alphaOrigin.x = 0; pPicture->alphaOrigin.y = 0; pPicture->clipOrigin.x = 0; pPicture->clipOrigin.y = 0; pPicture->clientClip = 0; pPicture->transform = 0; pPicture->filter = PictureGetFilterId(FilterNearest, -1, TRUE); pPicture->filter_params = 0; pPicture->filter_nparams = 0; pPicture->serialNumber = GC_CHANGE_SERIAL_BIT; pPicture->stateChanges = -1; pPicture->pSourcePict = 0; } PicturePtr CreatePicture(Picture pid, DrawablePtr pDrawable, PictFormatPtr pFormat, Mask vmask, XID *vlist, ClientPtr client, int *error) { PicturePtr pPicture; PictureScreenPtr ps = GetPictureScreen(pDrawable->pScreen); pPicture = dixAllocateScreenObjectWithPrivates(pDrawable->pScreen, PictureRec, PRIVATE_PICTURE); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pDrawable = pDrawable; pPicture->pFormat = pFormat; pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); /* security creation/labeling check */ *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture, RT_PIXMAP, pDrawable, DixCreateAccess | DixSetAttrAccess); if (*error != Success) goto out; if (pDrawable->type == DRAWABLE_PIXMAP) { ++((PixmapPtr) pDrawable)->refcnt; pPicture->pNext = 0; } else { pPicture->pNext = GetPictureWindow(((WindowPtr) pDrawable)); SetPictureWindow(((WindowPtr) pDrawable), pPicture); } SetPictureToDefaults(pPicture); if (vmask) *error = ChangePicture(pPicture, vmask, vlist, 0, client); else *error = Success; if (*error == Success) *error = (*ps->CreatePicture) (pPicture); out: if (*error != Success) { FreePicture(pPicture, (XID) 0); pPicture = 0; } return pPicture; } static CARD32 xRenderColorToCard32(xRenderColor c) { return ((unsigned)c.alpha >> 8 << 24) | ((unsigned)c.red >> 8 << 16) | ((unsigned)c.green & 0xff00) | ((unsigned)c.blue >> 8); } static void initGradient(SourcePictPtr pGradient, int stopCount, xFixed * stopPoints, xRenderColor * stopColors, int *error) { int i; xFixed dpos; if (stopCount <= 0) { *error = BadValue; return; } dpos = -1; for (i = 0; i < stopCount; ++i) { if (stopPoints[i] < dpos || stopPoints[i] > (1 << 16)) { *error = BadValue; return; } dpos = stopPoints[i]; } pGradient->gradient.stops = xallocarray(stopCount, sizeof(PictGradientStop)); if (!pGradient->gradient.stops) { *error = BadAlloc; return; } pGradient->gradient.nstops = stopCount; for (i = 0; i < stopCount; ++i) { pGradient->gradient.stops[i].x = stopPoints[i]; pGradient->gradient.stops[i].color = stopColors[i]; } } static PicturePtr createSourcePicture(void) { PicturePtr pPicture; pPicture = dixAllocateScreenObjectWithPrivates(NULL, PictureRec, PRIVATE_PICTURE); if (!pPicture) return 0; pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; pPicture->format = PICT_a8r8g8b8; SetPictureToDefaults(pPicture); return pPicture; } PicturePtr CreateSolidPicture(Picture pid, xRenderColor * color, int *error) { PicturePtr pPicture; pPicture = createSourcePicture(); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); return 0; } pPicture->pSourcePict->type = SourcePictTypeSolidFill; pPicture->pSourcePict->solidFill.color = xRenderColorToCard32(*color); memcpy(&pPicture->pSourcePict->solidFill.fullcolor, color, sizeof(*color)); return pPicture; } PicturePtr CreateLinearGradientPicture(Picture pid, xPointFixed * p1, xPointFixed * p2, int nStops, xFixed * stops, xRenderColor * colors, int *error) { PicturePtr pPicture; if (nStops < 1) { *error = BadValue; return 0; } pPicture = createSourcePicture(); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); return 0; } pPicture->pSourcePict->linear.type = SourcePictTypeLinear; pPicture->pSourcePict->linear.p1 = *p1; pPicture->pSourcePict->linear.p2 = *p2; initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { free(pPicture); return 0; } return pPicture; } PicturePtr CreateRadialGradientPicture(Picture pid, xPointFixed * inner, xPointFixed * outer, xFixed innerRadius, xFixed outerRadius, int nStops, xFixed * stops, xRenderColor * colors, int *error) { PicturePtr pPicture; PictRadialGradient *radial; if (nStops < 1) { *error = BadValue; return 0; } pPicture = createSourcePicture(); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); return 0; } radial = &pPicture->pSourcePict->radial; radial->type = SourcePictTypeRadial; radial->c1.x = inner->x; radial->c1.y = inner->y; radial->c1.radius = innerRadius; radial->c2.x = outer->x; radial->c2.y = outer->y; radial->c2.radius = outerRadius; initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { free(pPicture); return 0; } return pPicture; } PicturePtr CreateConicalGradientPicture(Picture pid, xPointFixed * center, xFixed angle, int nStops, xFixed * stops, xRenderColor * colors, int *error) { PicturePtr pPicture; if (nStops < 1) { *error = BadValue; return 0; } pPicture = createSourcePicture(); if (!pPicture) { *error = BadAlloc; return 0; } pPicture->id = pid; pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(SourcePict)); if (!pPicture->pSourcePict) { *error = BadAlloc; free(pPicture); return 0; } pPicture->pSourcePict->conical.type = SourcePictTypeConical; pPicture->pSourcePict->conical.center = *center; pPicture->pSourcePict->conical.angle = angle; initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { free(pPicture); return 0; } return pPicture; } static int cpAlphaMap(void **result, XID id, ScreenPtr screen, ClientPtr client, Mask mode) { #ifdef PANORAMIX if (!noPanoramiXExtension) { PanoramiXRes *res; int err = dixLookupResourceByType((void **)&res, id, XRT_PICTURE, client, mode); if (err != Success) return err; id = res->info[screen->myNum].id; } #endif return dixLookupResourceByType(result, id, PictureType, client, mode); } static int cpClipMask(void **result, XID id, ScreenPtr screen, ClientPtr client, Mask mode) { #ifdef PANORAMIX if (!noPanoramiXExtension) { PanoramiXRes *res; int err = dixLookupResourceByType((void **)&res, id, XRT_PIXMAP, client, mode); if (err != Success) return err; id = res->info[screen->myNum].id; } #endif return dixLookupResourceByType(result, id, RT_PIXMAP, client, mode); } #define NEXT_VAL(_type) (vlist ? (_type) *vlist++ : (_type) ulist++->val) #define NEXT_PTR(_type) ((_type) ulist++->ptr) int ChangePicture(PicturePtr pPicture, Mask vmask, XID *vlist, DevUnion *ulist, ClientPtr client) { ScreenPtr pScreen = pPicture->pDrawable ? pPicture->pDrawable->pScreen : 0; PictureScreenPtr ps = pScreen ? GetPictureScreen(pScreen) : 0; BITS32 index2; int error = 0; BITS32 maskQ; pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; maskQ = vmask; while (vmask && !error) { index2 = (BITS32) lowbit(vmask); vmask &= ~index2; pPicture->stateChanges |= index2; switch (index2) { case CPRepeat: { unsigned int newr; newr = NEXT_VAL(unsigned int); if (newr <= RepeatReflect) { pPicture->repeat = (newr != RepeatNone); pPicture->repeatType = newr; } else { client->errorValue = newr; error = BadValue; } } break; case CPAlphaMap: { PicturePtr pAlpha; if (vlist) { Picture pid = NEXT_VAL(Picture); if (pid == None) pAlpha = 0; else { error = cpAlphaMap((void **) &pAlpha, pid, pScreen, client, DixReadAccess); if (error != Success) { client->errorValue = pid; break; } if (pAlpha->pDrawable == NULL || pAlpha->pDrawable->type != DRAWABLE_PIXMAP) { client->errorValue = pid; error = BadMatch; break; } } } else pAlpha = NEXT_PTR(PicturePtr); if (!error) { if (pAlpha && pAlpha->pDrawable->type == DRAWABLE_PIXMAP) pAlpha->refcnt++; if (pPicture->alphaMap) FreePicture((void *) pPicture->alphaMap, (XID) 0); pPicture->alphaMap = pAlpha; } } break; case CPAlphaXOrigin: pPicture->alphaOrigin.x = NEXT_VAL(INT16); break; case CPAlphaYOrigin: pPicture->alphaOrigin.y = NEXT_VAL(INT16); break; case CPClipXOrigin: pPicture->clipOrigin.x = NEXT_VAL(INT16); break; case CPClipYOrigin: pPicture->clipOrigin.y = NEXT_VAL(INT16); break; case CPClipMask: { Pixmap pid; PixmapPtr pPixmap; int clipType; if (!pScreen) return BadDrawable; if (vlist) { pid = NEXT_VAL(Pixmap); if (pid == None) { clipType = CT_NONE; pPixmap = NullPixmap; } else { clipType = CT_PIXMAP; error = cpClipMask((void **) &pPixmap, pid, pScreen, client, DixReadAccess); if (error != Success) { client->errorValue = pid; break; } } } else { pPixmap = NEXT_PTR(PixmapPtr); if (pPixmap) clipType = CT_PIXMAP; else clipType = CT_NONE; } if (pPixmap) { if ((pPixmap->drawable.depth != 1) || (pPixmap->drawable.pScreen != pScreen)) { error = BadMatch; break; } else { clipType = CT_PIXMAP; pPixmap->refcnt++; } } error = (*ps->ChangePictureClip) (pPicture, clipType, (void *) pPixmap, 0); break; } case CPGraphicsExposure: { unsigned int newe; newe = NEXT_VAL(unsigned int); if (newe <= xTrue) pPicture->graphicsExposures = newe; else { client->errorValue = newe; error = BadValue; } } break; case CPSubwindowMode: { unsigned int news; news = NEXT_VAL(unsigned int); if (news == ClipByChildren || news == IncludeInferiors) pPicture->subWindowMode = news; else { client->errorValue = news; error = BadValue; } } break; case CPPolyEdge: { unsigned int newe; newe = NEXT_VAL(unsigned int); if (newe == PolyEdgeSharp || newe == PolyEdgeSmooth) pPicture->polyEdge = newe; else { client->errorValue = newe; error = BadValue; } } break; case CPPolyMode: { unsigned int newm; newm = NEXT_VAL(unsigned int); if (newm == PolyModePrecise || newm == PolyModeImprecise) pPicture->polyMode = newm; else { client->errorValue = newm; error = BadValue; } } break; case CPDither: (void) NEXT_VAL(Atom); /* unimplemented */ break; case CPComponentAlpha: { unsigned int newca; newca = NEXT_VAL(unsigned int); if (newca <= xTrue) pPicture->componentAlpha = newca; else { client->errorValue = newca; error = BadValue; } } break; default: client->errorValue = maskQ; error = BadValue; break; } } if (ps) (*ps->ChangePicture) (pPicture, maskQ); return error; } int SetPictureClipRects(PicturePtr pPicture, int xOrigin, int yOrigin, int nRect, xRectangle *rects) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); RegionPtr clientClip; int result; clientClip = RegionFromRects(nRect, rects, CT_UNSORTED); if (!clientClip) return BadAlloc; result = (*ps->ChangePictureClip) (pPicture, CT_REGION, (void *) clientClip, 0); if (result == Success) { pPicture->clipOrigin.x = xOrigin; pPicture->clipOrigin.y = yOrigin; pPicture->stateChanges |= CPClipXOrigin | CPClipYOrigin | CPClipMask; pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; } return result; } int SetPictureClipRegion(PicturePtr pPicture, int xOrigin, int yOrigin, RegionPtr pRegion) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); RegionPtr clientClip; int result; int type; if (pRegion) { type = CT_REGION; clientClip = RegionCreate(RegionExtents(pRegion), RegionNumRects(pRegion)); if (!clientClip) return BadAlloc; if (!RegionCopy(clientClip, pRegion)) { RegionDestroy(clientClip); return BadAlloc; } } else { type = CT_NONE; clientClip = 0; } result = (*ps->ChangePictureClip) (pPicture, type, (void *) clientClip, 0); if (result == Success) { pPicture->clipOrigin.x = xOrigin; pPicture->clipOrigin.y = yOrigin; pPicture->stateChanges |= CPClipXOrigin | CPClipYOrigin | CPClipMask; pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; } return result; } static Bool transformIsIdentity(PictTransform * t) { return ((t->matrix[0][0] == t->matrix[1][1]) && (t->matrix[0][0] == t->matrix[2][2]) && (t->matrix[0][0] != 0) && (t->matrix[0][1] == 0) && (t->matrix[0][2] == 0) && (t->matrix[1][0] == 0) && (t->matrix[1][2] == 0) && (t->matrix[2][0] == 0) && (t->matrix[2][1] == 0)); } int SetPictureTransform(PicturePtr pPicture, PictTransform * transform) { if (transform && transformIsIdentity(transform)) transform = 0; if (transform) { if (!pPicture->transform) { pPicture->transform = (PictTransform *) malloc(sizeof(PictTransform)); if (!pPicture->transform) return BadAlloc; } *pPicture->transform = *transform; } else { free(pPicture->transform); pPicture->transform = NULL; } pPicture->serialNumber |= GC_CHANGE_SERIAL_BIT; if (pPicture->pDrawable != NULL) { int result; PictureScreenPtr ps = GetPictureScreen(pPicture->pDrawable->pScreen); result = (*ps->ChangePictureTransform) (pPicture, transform); return result; } return Success; } static void ValidateOnePicture(PicturePtr pPicture) { if (pPicture->pDrawable && pPicture->serialNumber != pPicture->pDrawable->serialNumber) { PictureScreenPtr ps = GetPictureScreen(pPicture->pDrawable->pScreen); (*ps->ValidatePicture) (pPicture, pPicture->stateChanges); pPicture->stateChanges = 0; pPicture->serialNumber = pPicture->pDrawable->serialNumber; } } void ValidatePicture(PicturePtr pPicture) { ValidateOnePicture(pPicture); if (pPicture->alphaMap) ValidateOnePicture(pPicture->alphaMap); } int FreePicture(void *value, XID pid) { PicturePtr pPicture = (PicturePtr) value; if (--pPicture->refcnt == 0) { free(pPicture->transform); free(pPicture->filter_params); if (pPicture->pSourcePict) { if (pPicture->pSourcePict->type != SourcePictTypeSolidFill) free(pPicture->pSourcePict->linear.stops); free(pPicture->pSourcePict); } if (pPicture->pDrawable) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; PictureScreenPtr ps = GetPictureScreen(pScreen); if (pPicture->alphaMap) FreePicture((void *) pPicture->alphaMap, (XID) 0); (*ps->DestroyPicture) (pPicture); (*ps->DestroyPictureClip) (pPicture); if (pPicture->pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWindow = (WindowPtr) pPicture->pDrawable; PicturePtr *pPrev; for (pPrev = (PicturePtr *) dixLookupPrivateAddr (&pWindow->devPrivates, PictureWindowPrivateKey); *pPrev; pPrev = &(*pPrev)->pNext) { if (*pPrev == pPicture) { *pPrev = pPicture->pNext; break; } } } else if (pPicture->pDrawable->type == DRAWABLE_PIXMAP) { (*pScreen->DestroyPixmap) ((PixmapPtr) pPicture->pDrawable); } } dixFreeObjectWithPrivates(pPicture, PRIVATE_PICTURE); } return Success; } /** * ReduceCompositeOp is used to choose simpler ops for cases where alpha * channels are always one and so math on the alpha channel per pixel becomes * unnecessary. It may also avoid destination reads sometimes if apps aren't * being careful to avoid these cases. */ static CARD8 ReduceCompositeOp(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, CARD16 width, CARD16 height) { Bool no_src_alpha, no_dst_alpha; /* Sampling off the edge of a RepeatNone picture introduces alpha * even if the picture itself doesn't have alpha. We don't try to * detect every case where we don't sample off the edge, just the * simplest case where there is no transform on the source * picture. */ no_src_alpha = PICT_FORMAT_COLOR(pSrc->format) && PICT_FORMAT_A(pSrc->format) == 0 && (pSrc->repeatType != RepeatNone || (!pSrc->transform && xSrc >= 0 && ySrc >= 0 && xSrc + width <= pSrc->pDrawable->width && ySrc + height <= pSrc->pDrawable->height)) && pSrc->alphaMap == NULL && pMask == NULL; no_dst_alpha = PICT_FORMAT_COLOR(pDst->format) && PICT_FORMAT_A(pDst->format) == 0 && pDst->alphaMap == NULL; /* TODO, maybe: Conjoint and Disjoint op reductions? */ /* Deal with simplifications where the source alpha is always 1. */ if (no_src_alpha) { switch (op) { case PictOpOver: op = PictOpSrc; break; case PictOpInReverse: op = PictOpDst; break; case PictOpOutReverse: op = PictOpClear; break; case PictOpAtop: op = PictOpIn; break; case PictOpAtopReverse: op = PictOpOverReverse; break; case PictOpXor: op = PictOpOut; break; default: break; } } /* Deal with simplifications when the destination alpha is always 1 */ if (no_dst_alpha) { switch (op) { case PictOpOverReverse: op = PictOpDst; break; case PictOpIn: op = PictOpSrc; break; case PictOpOut: op = PictOpClear; break; case PictOpAtop: op = PictOpOver; break; case PictOpXor: op = PictOpOutReverse; break; default: break; } } /* Reduce some con/disjoint ops to the basic names. */ switch (op) { case PictOpDisjointClear: case PictOpConjointClear: op = PictOpClear; break; case PictOpDisjointSrc: case PictOpConjointSrc: op = PictOpSrc; break; case PictOpDisjointDst: case PictOpConjointDst: op = PictOpDst; break; default: break; } return op; } void CompositePicture(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); ValidatePicture(pSrc); if (pMask) ValidatePicture(pMask); ValidatePicture(pDst); op = ReduceCompositeOp(op, pSrc, pMask, pDst, xSrc, ySrc, width, height); if (op == PictOpDst) return; (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); } void CompositeRects(CARD8 op, PicturePtr pDst, xRenderColor * color, int nRect, xRectangle *rects) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); ValidatePicture(pDst); (*ps->CompositeRects) (op, pDst, color, nRect, rects); } void CompositeTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntrap, xTrapezoid * traps) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); ValidatePicture(pSrc); ValidatePicture(pDst); (*ps->Trapezoids) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntrap, traps); } void CompositeTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int ntriangles, xTriangle * triangles) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); ValidatePicture(pSrc); ValidatePicture(pDst); (*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntriangles, triangles); } void CompositeTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); if (npoints < 3) return; ValidatePicture(pSrc); ValidatePicture(pDst); (*ps->TriStrip) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); } void CompositeTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst, PictFormatPtr maskFormat, INT16 xSrc, INT16 ySrc, int npoints, xPointFixed * points) { PictureScreenPtr ps = GetPictureScreen(pDst->pDrawable->pScreen); if (npoints < 3) return; ValidatePicture(pSrc); ValidatePicture(pDst); (*ps->TriFan) (op, pSrc, pDst, maskFormat, xSrc, ySrc, npoints, points); } void AddTraps(PicturePtr pPicture, INT16 xOff, INT16 yOff, int ntrap, xTrap * traps) { PictureScreenPtr ps = GetPictureScreen(pPicture->pDrawable->pScreen); ValidatePicture(pPicture); (*ps->AddTraps) (pPicture, xOff, yOff, ntrap, traps); } xorg-server-21.1.16/render/render.c0000644000175000017500000027753214757411105012555 /* * * Copyright © 2000 SuSE, Inc. * * 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 SuSE not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. SuSE makes no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE * 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. * * Author: Keith Packard, SuSE, Inc. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "resource.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "colormapst.h" #include "extnsionst.h" #include "extinit.h" #include "servermd.h" #include #include #include "picturestr.h" #include "glyphstr.h" #include #include "cursorstr.h" #include "xace.h" #include "protocol-versions.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include static int ProcRenderQueryVersion(ClientPtr pClient); static int ProcRenderQueryPictFormats(ClientPtr pClient); static int ProcRenderQueryPictIndexValues(ClientPtr pClient); static int ProcRenderQueryDithers(ClientPtr pClient); static int ProcRenderCreatePicture(ClientPtr pClient); static int ProcRenderChangePicture(ClientPtr pClient); static int ProcRenderSetPictureClipRectangles(ClientPtr pClient); static int ProcRenderFreePicture(ClientPtr pClient); static int ProcRenderComposite(ClientPtr pClient); static int ProcRenderScale(ClientPtr pClient); static int ProcRenderTrapezoids(ClientPtr pClient); static int ProcRenderTriangles(ClientPtr pClient); static int ProcRenderTriStrip(ClientPtr pClient); static int ProcRenderTriFan(ClientPtr pClient); static int ProcRenderColorTrapezoids(ClientPtr pClient); static int ProcRenderColorTriangles(ClientPtr pClient); static int ProcRenderTransform(ClientPtr pClient); static int ProcRenderCreateGlyphSet(ClientPtr pClient); static int ProcRenderReferenceGlyphSet(ClientPtr pClient); static int ProcRenderFreeGlyphSet(ClientPtr pClient); static int ProcRenderAddGlyphs(ClientPtr pClient); static int ProcRenderAddGlyphsFromPicture(ClientPtr pClient); static int ProcRenderFreeGlyphs(ClientPtr pClient); static int ProcRenderCompositeGlyphs(ClientPtr pClient); static int ProcRenderFillRectangles(ClientPtr pClient); static int ProcRenderCreateCursor(ClientPtr pClient); static int ProcRenderSetPictureTransform(ClientPtr pClient); static int ProcRenderQueryFilters(ClientPtr pClient); static int ProcRenderSetPictureFilter(ClientPtr pClient); static int ProcRenderCreateAnimCursor(ClientPtr pClient); static int ProcRenderAddTraps(ClientPtr pClient); static int ProcRenderCreateSolidFill(ClientPtr pClient); static int ProcRenderCreateLinearGradient(ClientPtr pClient); static int ProcRenderCreateRadialGradient(ClientPtr pClient); static int ProcRenderCreateConicalGradient(ClientPtr pClient); static int ProcRenderDispatch(ClientPtr pClient); static int SProcRenderQueryVersion(ClientPtr pClient); static int SProcRenderQueryPictFormats(ClientPtr pClient); static int SProcRenderQueryPictIndexValues(ClientPtr pClient); static int SProcRenderQueryDithers(ClientPtr pClient); static int SProcRenderCreatePicture(ClientPtr pClient); static int SProcRenderChangePicture(ClientPtr pClient); static int SProcRenderSetPictureClipRectangles(ClientPtr pClient); static int SProcRenderFreePicture(ClientPtr pClient); static int SProcRenderComposite(ClientPtr pClient); static int SProcRenderScale(ClientPtr pClient); static int SProcRenderTrapezoids(ClientPtr pClient); static int SProcRenderTriangles(ClientPtr pClient); static int SProcRenderTriStrip(ClientPtr pClient); static int SProcRenderTriFan(ClientPtr pClient); static int SProcRenderColorTrapezoids(ClientPtr pClient); static int SProcRenderColorTriangles(ClientPtr pClient); static int SProcRenderTransform(ClientPtr pClient); static int SProcRenderCreateGlyphSet(ClientPtr pClient); static int SProcRenderReferenceGlyphSet(ClientPtr pClient); static int SProcRenderFreeGlyphSet(ClientPtr pClient); static int SProcRenderAddGlyphs(ClientPtr pClient); static int SProcRenderAddGlyphsFromPicture(ClientPtr pClient); static int SProcRenderFreeGlyphs(ClientPtr pClient); static int SProcRenderCompositeGlyphs(ClientPtr pClient); static int SProcRenderFillRectangles(ClientPtr pClient); static int SProcRenderCreateCursor(ClientPtr pClient); static int SProcRenderSetPictureTransform(ClientPtr pClient); static int SProcRenderQueryFilters(ClientPtr pClient); static int SProcRenderSetPictureFilter(ClientPtr pClient); static int SProcRenderCreateAnimCursor(ClientPtr pClient); static int SProcRenderAddTraps(ClientPtr pClient); static int SProcRenderCreateSolidFill(ClientPtr pClient); static int SProcRenderCreateLinearGradient(ClientPtr pClient); static int SProcRenderCreateRadialGradient(ClientPtr pClient); static int SProcRenderCreateConicalGradient(ClientPtr pClient); static int SProcRenderDispatch(ClientPtr pClient); int (*ProcRenderVector[RenderNumberRequests]) (ClientPtr) = { ProcRenderQueryVersion, ProcRenderQueryPictFormats, ProcRenderQueryPictIndexValues, ProcRenderQueryDithers, ProcRenderCreatePicture, ProcRenderChangePicture, ProcRenderSetPictureClipRectangles, ProcRenderFreePicture, ProcRenderComposite, ProcRenderScale, ProcRenderTrapezoids, ProcRenderTriangles, ProcRenderTriStrip, ProcRenderTriFan, ProcRenderColorTrapezoids, ProcRenderColorTriangles, ProcRenderTransform, ProcRenderCreateGlyphSet, ProcRenderReferenceGlyphSet, ProcRenderFreeGlyphSet, ProcRenderAddGlyphs, ProcRenderAddGlyphsFromPicture, ProcRenderFreeGlyphs, ProcRenderCompositeGlyphs, ProcRenderCompositeGlyphs, ProcRenderCompositeGlyphs, ProcRenderFillRectangles, ProcRenderCreateCursor, ProcRenderSetPictureTransform, ProcRenderQueryFilters, ProcRenderSetPictureFilter, ProcRenderCreateAnimCursor, ProcRenderAddTraps, ProcRenderCreateSolidFill, ProcRenderCreateLinearGradient, ProcRenderCreateRadialGradient, ProcRenderCreateConicalGradient}; int (*SProcRenderVector[RenderNumberRequests]) (ClientPtr) = { SProcRenderQueryVersion, SProcRenderQueryPictFormats, SProcRenderQueryPictIndexValues, SProcRenderQueryDithers, SProcRenderCreatePicture, SProcRenderChangePicture, SProcRenderSetPictureClipRectangles, SProcRenderFreePicture, SProcRenderComposite, SProcRenderScale, SProcRenderTrapezoids, SProcRenderTriangles, SProcRenderTriStrip, SProcRenderTriFan, SProcRenderColorTrapezoids, SProcRenderColorTriangles, SProcRenderTransform, SProcRenderCreateGlyphSet, SProcRenderReferenceGlyphSet, SProcRenderFreeGlyphSet, SProcRenderAddGlyphs, SProcRenderAddGlyphsFromPicture, SProcRenderFreeGlyphs, SProcRenderCompositeGlyphs, SProcRenderCompositeGlyphs, SProcRenderCompositeGlyphs, SProcRenderFillRectangles, SProcRenderCreateCursor, SProcRenderSetPictureTransform, SProcRenderQueryFilters, SProcRenderSetPictureFilter, SProcRenderCreateAnimCursor, SProcRenderAddTraps, SProcRenderCreateSolidFill, SProcRenderCreateLinearGradient, SProcRenderCreateRadialGradient, SProcRenderCreateConicalGradient}; int RenderErrBase; static DevPrivateKeyRec RenderClientPrivateKeyRec; #define RenderClientPrivateKey (&RenderClientPrivateKeyRec ) typedef struct _RenderClient { int major_version; int minor_version; } RenderClientRec, *RenderClientPtr; #define GetRenderClient(pClient) ((RenderClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RenderClientPrivateKey)) #ifdef PANORAMIX RESTYPE XRT_PICTURE; #endif void RenderExtensionInit(void) { ExtensionEntry *extEntry; if (!PictureType) return; if (!PictureFinishInit()) return; if (!dixRegisterPrivateKey (&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec))) return; extEntry = AddExtension(RENDER_NAME, 0, RenderNumberErrors, ProcRenderDispatch, SProcRenderDispatch, NULL, StandardMinorOpcode); if (!extEntry) return; RenderErrBase = extEntry->errorBase; #ifdef PANORAMIX if (XRT_PICTURE) SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); #endif SetResourceTypeErrorValue(PictureType, RenderErrBase + BadPicture); SetResourceTypeErrorValue(PictFormatType, RenderErrBase + BadPictFormat); SetResourceTypeErrorValue(GlyphSetType, RenderErrBase + BadGlyphSet); } static int ProcRenderQueryVersion(ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient(client); xRenderQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; REQUEST(xRenderQueryVersionReq); REQUEST_SIZE_MATCH(xRenderQueryVersionReq); pRenderClient->major_version = stuff->majorVersion; pRenderClient->minor_version = stuff->minorVersion; if ((stuff->majorVersion * 1000 + stuff->minorVersion) < (SERVER_RENDER_MAJOR_VERSION * 1000 + SERVER_RENDER_MINOR_VERSION)) { rep.majorVersion = stuff->majorVersion; rep.minorVersion = stuff->minorVersion; } else { rep.majorVersion = SERVER_RENDER_MAJOR_VERSION; rep.minorVersion = SERVER_RENDER_MINOR_VERSION; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xRenderQueryVersionReply), &rep); return Success; } static VisualPtr findVisual(ScreenPtr pScreen, VisualID vid) { VisualPtr pVisual; int v; for (v = 0; v < pScreen->numVisuals; v++) { pVisual = pScreen->visuals + v; if (pVisual->vid == vid) return pVisual; } return 0; } static int ProcRenderQueryPictFormats(ClientPtr client) { RenderClientPtr pRenderClient = GetRenderClient(client); xRenderQueryPictFormatsReply *reply; xPictScreen *pictScreen; xPictDepth *pictDepth; xPictVisual *pictVisual; xPictFormInfo *pictForm; CARD32 *pictSubpixel; ScreenPtr pScreen; VisualPtr pVisual; DepthPtr pDepth; int v, d; PictureScreenPtr ps; PictFormatPtr pFormat; int nformat; int ndepth; int nvisual; int rlength; int s; int numScreens; int numSubpixel; /* REQUEST(xRenderQueryPictFormatsReq); */ REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq); #ifdef PANORAMIX if (noPanoramiXExtension) numScreens = screenInfo.numScreens; else numScreens = ((xConnSetup *) ConnectionInfo)->numRoots; #else numScreens = screenInfo.numScreens; #endif ndepth = nformat = nvisual = 0; for (s = 0; s < numScreens; s++) { pScreen = screenInfo.screens[s]; for (d = 0; d < pScreen->numDepths; d++) { pDepth = pScreen->allowedDepths + d; ++ndepth; for (v = 0; v < pDepth->numVids; v++) { pVisual = findVisual(pScreen, pDepth->vids[v]); if (pVisual && PictureMatchVisual(pScreen, pDepth->depth, pVisual)) ++nvisual; } } ps = GetPictureScreenIfSet(pScreen); if (ps) nformat += ps->nformats; } if (pRenderClient->major_version == 0 && pRenderClient->minor_version < 6) numSubpixel = 0; else numSubpixel = numScreens; rlength = (sizeof(xRenderQueryPictFormatsReply) + nformat * sizeof(xPictFormInfo) + numScreens * sizeof(xPictScreen) + ndepth * sizeof(xPictDepth) + nvisual * sizeof(xPictVisual) + numSubpixel * sizeof(CARD32)); reply = (xRenderQueryPictFormatsReply *) calloc(1, rlength); if (!reply) return BadAlloc; reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->numFormats = nformat; reply->numScreens = numScreens; reply->numDepths = ndepth; reply->numVisuals = nvisual; reply->numSubpixel = numSubpixel; pictForm = (xPictFormInfo *) (reply + 1); for (s = 0; s < numScreens; s++) { pScreen = screenInfo.screens[s]; ps = GetPictureScreenIfSet(pScreen); if (ps) { for (nformat = 0, pFormat = ps->formats; nformat < ps->nformats; nformat++, pFormat++) { pictForm->id = pFormat->id; pictForm->type = pFormat->type; pictForm->depth = pFormat->depth; pictForm->direct.red = pFormat->direct.red; pictForm->direct.redMask = pFormat->direct.redMask; pictForm->direct.green = pFormat->direct.green; pictForm->direct.greenMask = pFormat->direct.greenMask; pictForm->direct.blue = pFormat->direct.blue; pictForm->direct.blueMask = pFormat->direct.blueMask; pictForm->direct.alpha = pFormat->direct.alpha; pictForm->direct.alphaMask = pFormat->direct.alphaMask; if (pFormat->type == PictTypeIndexed && pFormat->index.pColormap) pictForm->colormap = pFormat->index.pColormap->mid; else pictForm->colormap = None; if (client->swapped) { swapl(&pictForm->id); swaps(&pictForm->direct.red); swaps(&pictForm->direct.redMask); swaps(&pictForm->direct.green); swaps(&pictForm->direct.greenMask); swaps(&pictForm->direct.blue); swaps(&pictForm->direct.blueMask); swaps(&pictForm->direct.alpha); swaps(&pictForm->direct.alphaMask); swapl(&pictForm->colormap); } pictForm++; } } } pictScreen = (xPictScreen *) pictForm; for (s = 0; s < numScreens; s++) { pScreen = screenInfo.screens[s]; pictDepth = (xPictDepth *) (pictScreen + 1); ndepth = 0; for (d = 0; d < pScreen->numDepths; d++) { pictVisual = (xPictVisual *) (pictDepth + 1); pDepth = pScreen->allowedDepths + d; nvisual = 0; for (v = 0; v < pDepth->numVids; v++) { pVisual = findVisual(pScreen, pDepth->vids[v]); if (pVisual && (pFormat = PictureMatchVisual(pScreen, pDepth->depth, pVisual))) { pictVisual->visual = pVisual->vid; pictVisual->format = pFormat->id; if (client->swapped) { swapl(&pictVisual->visual); swapl(&pictVisual->format); } pictVisual++; nvisual++; } } pictDepth->depth = pDepth->depth; pictDepth->nPictVisuals = nvisual; if (client->swapped) { swaps(&pictDepth->nPictVisuals); } ndepth++; pictDepth = (xPictDepth *) pictVisual; } pictScreen->nDepth = ndepth; ps = GetPictureScreenIfSet(pScreen); if (ps) pictScreen->fallback = ps->fallback->id; else pictScreen->fallback = 0; if (client->swapped) { swapl(&pictScreen->nDepth); swapl(&pictScreen->fallback); } pictScreen = (xPictScreen *) pictDepth; } pictSubpixel = (CARD32 *) pictScreen; for (s = 0; s < numSubpixel; s++) { pScreen = screenInfo.screens[s]; ps = GetPictureScreenIfSet(pScreen); if (ps) *pictSubpixel = ps->subpixel; else *pictSubpixel = SubPixelUnknown; if (client->swapped) { swapl(pictSubpixel); } ++pictSubpixel; } if (client->swapped) { swaps(&reply->sequenceNumber); swapl(&reply->length); swapl(&reply->numFormats); swapl(&reply->numScreens); swapl(&reply->numDepths); swapl(&reply->numVisuals); swapl(&reply->numSubpixel); } WriteToClient(client, rlength, reply); free(reply); return Success; } static int ProcRenderQueryPictIndexValues(ClientPtr client) { PictFormatPtr pFormat; int rc, num; int rlength; int i; REQUEST(xRenderQueryPictIndexValuesReq); xRenderQueryPictIndexValuesReply *reply; xIndexValue *values; REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq); rc = dixLookupResourceByType((void **) &pFormat, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; if (pFormat->type != PictTypeIndexed) { client->errorValue = stuff->format; return BadMatch; } num = pFormat->index.nvalues; rlength = (sizeof(xRenderQueryPictIndexValuesReply) + num * sizeof(xIndexValue)); reply = (xRenderQueryPictIndexValuesReply *) calloc(1, rlength); if (!reply) return BadAlloc; reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->numIndexValues = num; values = (xIndexValue *) (reply + 1); memcpy(reply + 1, pFormat->index.pValues, num * sizeof(xIndexValue)); if (client->swapped) { for (i = 0; i < num; i++) { swapl(&values[i].pixel); swaps(&values[i].red); swaps(&values[i].green); swaps(&values[i].blue); swaps(&values[i].alpha); } swaps(&reply->sequenceNumber); swapl(&reply->length); swapl(&reply->numIndexValues); } WriteToClient(client, rlength, reply); free(reply); return Success; } static int ProcRenderQueryDithers(ClientPtr client) { return BadImplementation; } static int ProcRenderCreatePicture(ClientPtr client) { PicturePtr pPicture; DrawablePtr pDrawable; PictFormatPtr pFormat; int len, error, rc; REQUEST(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixReadAccess | DixAddAccess); if (rc != Success) return rc; rc = dixLookupResourceByType((void **) &pFormat, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; if (pFormat->depth != pDrawable->depth) return BadMatch; len = client->req_len - bytes_to_int32(sizeof(xRenderCreatePictureReq)); if (Ones(stuff->mask) != len) return BadLength; pPicture = CreatePicture(stuff->pid, pDrawable, pFormat, stuff->mask, (XID *) (stuff + 1), client, &error); if (!pPicture) return error; if (!AddResource(stuff->pid, PictureType, (void *) pPicture)) return BadAlloc; return Success; } static int ProcRenderChangePicture(ClientPtr client) { PicturePtr pPicture; REQUEST(xRenderChangePictureReq); int len; REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictureReq)); if (Ones(stuff->mask) != len) return BadLength; return ChangePicture(pPicture, stuff->mask, (XID *) (stuff + 1), (DevUnion *) 0, client); } static int ProcRenderSetPictureClipRectangles(ClientPtr client) { REQUEST(xRenderSetPictureClipRectanglesReq); PicturePtr pPicture; int nr; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); if (!pPicture->pDrawable) return RenderErrBase + BadPicture; nr = (client->req_len << 2) - sizeof(xRenderSetPictureClipRectanglesReq); if (nr & 4) return BadLength; nr >>= 3; return SetPictureClipRects(pPicture, stuff->xOrigin, stuff->yOrigin, nr, (xRectangle *) &stuff[1]); } static int ProcRenderFreePicture(ClientPtr client) { PicturePtr pPicture; REQUEST(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixDestroyAccess); FreeResource(stuff->picture, RT_NONE); return Success; } static Bool PictOpValid(CARD8 op) { if ( /*PictOpMinimum <= op && */ op <= PictOpMaximum) return TRUE; if (PictOpDisjointMinimum <= op && op <= PictOpDisjointMaximum) return TRUE; if (PictOpConjointMinimum <= op && op <= PictOpConjointMaximum) return TRUE; if (PictOpBlendMinimum <= op && op <= PictOpBlendMaximum) return TRUE; return FALSE; } static int ProcRenderComposite(ClientPtr client) { PicturePtr pSrc, pMask, pDst; REQUEST(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_ALPHA(pMask, stuff->mask, client, DixReadAccess); if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) || (pMask && pMask-> pDrawable && pDst-> pDrawable-> pScreen != pMask-> pDrawable-> pScreen)) return BadMatch; CompositePicture(stuff->op, pSrc, pMask, pDst, stuff->xSrc, stuff->ySrc, stuff->xMask, stuff->yMask, stuff->xDst, stuff->yDst, stuff->width, stuff->height); return Success; } static int ProcRenderScale(ClientPtr client) { return BadImplementation; } static int ProcRenderTrapezoids(ClientPtr client) { int rc, ntraps; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) return BadMatch; if (stuff->maskFormat) { rc = dixLookupResourceByType((void **) &pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; } else pFormat = 0; ntraps = (client->req_len << 2) - sizeof(xRenderTrapezoidsReq); if (ntraps % sizeof(xTrapezoid)) return BadLength; ntraps /= sizeof(xTrapezoid); if (ntraps) CompositeTrapezoids(stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, ntraps, (xTrapezoid *) &stuff[1]); return Success; } static int ProcRenderTriangles(ClientPtr client) { int rc, ntris; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) return BadMatch; if (stuff->maskFormat) { rc = dixLookupResourceByType((void **) &pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; } else pFormat = 0; ntris = (client->req_len << 2) - sizeof(xRenderTrianglesReq); if (ntris % sizeof(xTriangle)) return BadLength; ntris /= sizeof(xTriangle); if (ntris) CompositeTriangles(stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, ntris, (xTriangle *) &stuff[1]); return Success; } static int ProcRenderTriStrip(ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) return BadMatch; if (stuff->maskFormat) { rc = dixLookupResourceByType((void **) &pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; } else pFormat = 0; npoints = ((client->req_len << 2) - sizeof(xRenderTriStripReq)); if (npoints & 4) return BadLength; npoints >>= 3; if (npoints >= 3) CompositeTriStrip(stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, npoints, (xPointFixed *) &stuff[1]); return Success; } static int ProcRenderTriFan(ClientPtr client) { int rc, npoints; PicturePtr pSrc, pDst; PictFormatPtr pFormat; REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) return BadMatch; if (stuff->maskFormat) { rc = dixLookupResourceByType((void **) &pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; } else pFormat = 0; npoints = ((client->req_len << 2) - sizeof(xRenderTriStripReq)); if (npoints & 4) return BadLength; npoints >>= 3; if (npoints >= 3) CompositeTriFan(stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, npoints, (xPointFixed *) &stuff[1]); return Success; } static int ProcRenderColorTrapezoids(ClientPtr client) { return BadImplementation; } static int ProcRenderColorTriangles(ClientPtr client) { return BadImplementation; } static int ProcRenderTransform(ClientPtr client) { return BadImplementation; } static int ProcRenderCreateGlyphSet(ClientPtr client) { GlyphSetPtr glyphSet; PictFormatPtr format; int rc, f; REQUEST(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((void **) &format, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; switch (format->depth) { case 1: f = GlyphFormat1; break; case 4: f = GlyphFormat4; break; case 8: f = GlyphFormat8; break; case 16: f = GlyphFormat16; break; case 32: f = GlyphFormat32; break; default: return BadMatch; } if (format->type != PictTypeDirect) return BadMatch; glyphSet = AllocateGlyphSet(f, format); if (!glyphSet) return BadAlloc; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->gsid, GlyphSetType, glyphSet, RT_NONE, NULL, DixCreateAccess); if (rc != Success) return rc; if (!AddResource(stuff->gsid, GlyphSetType, (void *) glyphSet)) return BadAlloc; return Success; } static int ProcRenderReferenceGlyphSet(ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); LEGAL_NEW_RESOURCE(stuff->gsid, client); rc = dixLookupResourceByType((void **) &glyphSet, stuff->existing, GlyphSetType, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->existing; return rc; } glyphSet->refcnt++; if (!AddResource(stuff->gsid, GlyphSetType, (void *) glyphSet)) return BadAlloc; return Success; } #define NLOCALDELTA 64 #define NLOCALGLYPH 256 static int ProcRenderFreeGlyphSet(ClientPtr client) { GlyphSetPtr glyphSet; int rc; REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); rc = dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixDestroyAccess); if (rc != Success) { client->errorValue = stuff->glyphset; return rc; } FreeResource(stuff->glyphset, RT_NONE); return Success; } typedef struct _GlyphNew { Glyph id; GlyphPtr glyph; Bool found; unsigned char sha1[20]; } GlyphNewRec, *GlyphNewPtr; #define NeedsComponent(f) (PICT_FORMAT_A(f) != 0 && PICT_FORMAT_RGB(f) != 0) static int ProcRenderAddGlyphs(ClientPtr client) { GlyphSetPtr glyphSet; REQUEST(xRenderAddGlyphsReq); GlyphNewRec glyphsLocal[NLOCALGLYPH]; GlyphNewPtr glyphsBase, glyphs, glyph_new; int remain, nglyphs; CARD32 *gids; xGlyphInfo *gi; CARD8 *bits; unsigned int size; int err; int i, screen; PicturePtr pSrc = NULL, pDst = NULL; PixmapPtr pSrcPix = NULL, pDstPix = NULL; CARD32 component_alpha; REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq); err = dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixAddAccess); if (err != Success) { client->errorValue = stuff->glyphset; return err; } err = BadAlloc; nglyphs = stuff->nglyphs; if (nglyphs > UINT32_MAX / sizeof(GlyphNewRec)) return BadAlloc; component_alpha = NeedsComponent(glyphSet->format->format); if (nglyphs <= NLOCALGLYPH) { memset(glyphsLocal, 0, sizeof(glyphsLocal)); glyphsBase = glyphsLocal; } else { glyphsBase = (GlyphNewPtr) calloc(nglyphs, sizeof(GlyphNewRec)); if (!glyphsBase) return BadAlloc; } remain = (client->req_len << 2) - sizeof(xRenderAddGlyphsReq); glyphs = glyphsBase; gids = (CARD32 *) (stuff + 1); gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof(CARD32) + sizeof(xGlyphInfo)) * nglyphs; /* protect against bad nglyphs */ if (gi < ((xGlyphInfo *) stuff) || gi > ((xGlyphInfo *) ((CARD32 *) stuff + client->req_len)) || bits < ((CARD8 *) stuff) || bits > ((CARD8 *) ((CARD32 *) stuff + client->req_len))) { err = BadLength; goto bail; } for (i = 0; i < nglyphs; i++) { size_t padded_width; glyph_new = &glyphs[i]; padded_width = PixmapBytePad(gi[i].width, glyphSet->format->depth); if (gi[i].height && padded_width > (UINT32_MAX - sizeof(GlyphRec)) / gi[i].height) break; size = gi[i].height * padded_width; if (remain < size) break; err = HashGlyph(&gi[i], bits, size, glyph_new->sha1); if (err) goto bail; glyph_new->glyph = FindGlyphByHash(glyph_new->sha1, glyphSet->fdepth); if (glyph_new->glyph && glyph_new->glyph != DeletedGlyph) { glyph_new->found = TRUE; ++glyph_new->glyph->refcnt; } else { GlyphPtr glyph; glyph_new->found = FALSE; glyph_new->glyph = glyph = AllocateGlyph(&gi[i], glyphSet->fdepth); if (!glyph) { err = BadAlloc; goto bail; } for (screen = 0; screen < screenInfo.numScreens; screen++) { int width = gi[i].width; int height = gi[i].height; int depth = glyphSet->format->depth; ScreenPtr pScreen; int error; /* Skip work if it's invisibly small anyway */ if (!width || !height) break; pScreen = screenInfo.screens[screen]; pSrcPix = GetScratchPixmapHeader(pScreen, width, height, depth, depth, -1, bits); if (!pSrcPix) { err = BadAlloc; goto bail; } pSrc = CreatePicture(0, &pSrcPix->drawable, glyphSet->format, 0, NULL, serverClient, &error); if (!pSrc) { err = BadAlloc; goto bail; } pDstPix = (pScreen->CreatePixmap) (pScreen, width, height, depth, CREATE_PIXMAP_USAGE_GLYPH_PICTURE); if (!pDstPix) { err = BadAlloc; goto bail; } pDst = CreatePicture(0, &pDstPix->drawable, glyphSet->format, CPComponentAlpha, &component_alpha, serverClient, &error); SetGlyphPicture(glyph, pScreen, pDst); /* The picture takes a reference to the pixmap, so we drop ours. */ (pScreen->DestroyPixmap) (pDstPix); pDstPix = NULL; if (!pDst) { err = BadAlloc; goto bail; } CompositePicture(PictOpSrc, pSrc, None, pDst, 0, 0, 0, 0, 0, 0, width, height); FreePicture((void *) pSrc, 0); pSrc = NULL; FreeScratchPixmapHeader(pSrcPix); pSrcPix = NULL; } memcpy(glyph_new->glyph->sha1, glyph_new->sha1, 20); } glyph_new->id = gids[i]; if (size & 3) size += 4 - (size & 3); bits += size; remain -= size; } if (remain || i < nglyphs) { err = BadLength; goto bail; } if (!ResizeGlyphSet(glyphSet, nglyphs)) { err = BadAlloc; goto bail; } for (i = 0; i < nglyphs; i++) { AddGlyph(glyphSet, glyphs[i].glyph, glyphs[i].id); FreeGlyph(glyphs[i].glyph, glyphSet->fdepth); } if (glyphsBase != glyphsLocal) free(glyphsBase); return Success; bail: if (pSrc) FreePicture((void *) pSrc, 0); if (pSrcPix) FreeScratchPixmapHeader(pSrcPix); for (i = 0; i < nglyphs; i++) { if (glyphs[i].glyph) { --glyphs[i].glyph->refcnt; if (!glyphs[i].found) free(glyphs[i].glyph); } } if (glyphsBase != glyphsLocal) free(glyphsBase); return err; } static int ProcRenderAddGlyphsFromPicture(ClientPtr client) { return BadImplementation; } static int ProcRenderFreeGlyphs(ClientPtr client) { REQUEST(xRenderFreeGlyphsReq); GlyphSetPtr glyphSet; int rc, nglyph; CARD32 *gids; CARD32 glyph; REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); rc = dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixRemoveAccess); if (rc != Success) { client->errorValue = stuff->glyphset; return rc; } nglyph = bytes_to_int32((client->req_len << 2) - sizeof(xRenderFreeGlyphsReq)); gids = (CARD32 *) (stuff + 1); while (nglyph-- > 0) { glyph = *gids++; if (!DeleteGlyph(glyphSet, glyph)) { client->errorValue = glyph; return RenderErrBase + BadGlyph; } } return Success; } static int ProcRenderCompositeGlyphs(ClientPtr client) { GlyphSetPtr glyphSet; GlyphSet gs; PicturePtr pSrc, pDst; PictFormatPtr pFormat; GlyphListRec listsLocal[NLOCALDELTA]; GlyphListPtr lists, listsBase; GlyphPtr glyphsLocal[NLOCALGLYPH]; Glyph glyph; GlyphPtr *glyphs, *glyphsBase; xGlyphElt *elt; CARD8 *buffer, *end; int nglyph; int nlist; int space; int size; int rc, n; REQUEST(xRenderCompositeGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); switch (stuff->renderReqType) { default: size = 1; break; case X_RenderCompositeGlyphs16: size = 2; break; case X_RenderCompositeGlyphs32: size = 4; break; } if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) return BadMatch; if (stuff->maskFormat) { rc = dixLookupResourceByType((void **) &pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) return rc; } else pFormat = 0; rc = dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixUseAccess); if (rc != Success) return rc; buffer = (CARD8 *) (stuff + 1); end = (CARD8 *) stuff + (client->req_len << 2); nglyph = 0; nlist = 0; while (buffer + sizeof(xGlyphElt) < end) { elt = (xGlyphElt *) buffer; buffer += sizeof(xGlyphElt); if (elt->len == 0xff) { buffer += 4; } else { nlist++; nglyph += elt->len; space = size * elt->len; if (space & 3) space += 4 - (space & 3); buffer += space; } } if (nglyph <= NLOCALGLYPH) glyphsBase = glyphsLocal; else { glyphsBase = xallocarray(nglyph, sizeof(GlyphPtr)); if (!glyphsBase) return BadAlloc; } if (nlist <= NLOCALDELTA) listsBase = listsLocal; else { listsBase = xallocarray(nlist, sizeof(GlyphListRec)); if (!listsBase) { rc = BadAlloc; goto bail; } } buffer = (CARD8 *) (stuff + 1); glyphs = glyphsBase; lists = listsBase; while (buffer + sizeof(xGlyphElt) < end) { elt = (xGlyphElt *) buffer; buffer += sizeof(xGlyphElt); if (elt->len == 0xff) { if (buffer + sizeof(GlyphSet) < end) { memcpy(&gs, buffer, sizeof(GlyphSet)); rc = dixLookupResourceByType((void **) &glyphSet, gs, GlyphSetType, client, DixUseAccess); if (rc != Success) goto bail; } buffer += 4; } else { lists->xOff = elt->deltax; lists->yOff = elt->deltay; lists->format = glyphSet->format; lists->len = 0; n = elt->len; while (n--) { if (buffer + size <= end) { switch (size) { case 1: glyph = *((CARD8 *) buffer); break; case 2: glyph = *((CARD16 *) buffer); break; case 4: default: glyph = *((CARD32 *) buffer); break; } if ((*glyphs = FindGlyph(glyphSet, glyph))) { lists->len++; glyphs++; } } buffer += size; } space = size * elt->len; if (space & 3) buffer += 4 - (space & 3); lists++; } } if (buffer > end) { rc = BadLength; goto bail; } CompositeGlyphs(stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, nlist, listsBase, glyphsBase); rc = Success; bail: if (glyphsBase != glyphsLocal) free(glyphsBase); if (listsBase != listsLocal) free(listsBase); return rc; } static int ProcRenderFillRectangles(ClientPtr client) { PicturePtr pDst; int things; REQUEST(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq); if (!PictOpValid(stuff->op)) { client->errorValue = stuff->op; return BadValue; } VERIFY_PICTURE(pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; things = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq); if (things & 4) return BadLength; things >>= 3; CompositeRects(stuff->op, pDst, &stuff->color, things, (xRectangle *) &stuff[1]); return Success; } static void RenderSetBit(unsigned char *line, int x, int bit) { unsigned char mask; if (screenInfo.bitmapBitOrder == LSBFirst) mask = (1 << (x & 7)); else mask = (0x80 >> (x & 7)); /* XXX assumes byte order is host byte order */ line += (x >> 3); if (bit) *line |= mask; else *line &= ~mask; } #define DITHER_DIM 2 static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = { {1, 3,}, {4, 2,}, }; #define DITHER_SIZE ((sizeof orderedDither / sizeof orderedDither[0][0]) + 1) static int ProcRenderCreateCursor(ClientPtr client) { REQUEST(xRenderCreateCursorReq); PicturePtr pSrc; ScreenPtr pScreen; unsigned short width, height; CARD32 *argbbits, *argb; unsigned char *srcbits, *srcline; unsigned char *mskbits, *mskline; int stride; int x, y; int nbytes_mono; CursorMetricRec cm; CursorPtr pCursor; CARD32 twocolor[3]; int rc, ncolor; REQUEST_SIZE_MATCH(xRenderCreateCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); VERIFY_PICTURE(pSrc, stuff->src, client, DixReadAccess); if (!pSrc->pDrawable) return BadDrawable; pScreen = pSrc->pDrawable->pScreen; width = pSrc->pDrawable->width; height = pSrc->pDrawable->height; if (height && width > UINT32_MAX / (height * sizeof(CARD32))) return BadAlloc; if (stuff->x > width || stuff->y > height) return BadMatch; argbbits = malloc(width * height * sizeof(CARD32)); if (!argbbits) return BadAlloc; stride = BitmapBytePad(width); nbytes_mono = stride * height; srcbits = calloc(1, nbytes_mono); if (!srcbits) { free(argbbits); return BadAlloc; } mskbits = calloc(1, nbytes_mono); if (!mskbits) { free(argbbits); free(srcbits); return BadAlloc; } /* what kind of maniac creates a cursor from a window picture though */ if (pSrc->pDrawable->type == DRAWABLE_WINDOW) pScreen->SourceValidate(pSrc->pDrawable, 0, 0, width, height, IncludeInferiors); if (pSrc->format == PICT_a8r8g8b8) { (*pScreen->GetImage) (pSrc->pDrawable, 0, 0, width, height, ZPixmap, 0xffffffff, (void *) argbbits); } else { PixmapPtr pPixmap; PicturePtr pPicture; PictFormatPtr pFormat; int error; pFormat = PictureMatchFormat(pScreen, 32, PICT_a8r8g8b8); if (!pFormat) { free(argbbits); free(srcbits); free(mskbits); return BadImplementation; } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { free(argbbits); free(srcbits); free(mskbits); return BadAlloc; } pPicture = CreatePicture(0, &pPixmap->drawable, pFormat, 0, 0, client, &error); if (!pPicture) { free(argbbits); free(srcbits); free(mskbits); return error; } (*pScreen->DestroyPixmap) (pPixmap); CompositePicture(PictOpSrc, pSrc, 0, pPicture, 0, 0, 0, 0, 0, 0, width, height); (*pScreen->GetImage) (pPicture->pDrawable, 0, 0, width, height, ZPixmap, 0xffffffff, (void *) argbbits); FreePicture(pPicture, 0); } /* * Check whether the cursor can be directly supported by * the core cursor code */ ncolor = 0; argb = argbbits; for (y = 0; ncolor <= 2 && y < height; y++) { for (x = 0; ncolor <= 2 && x < width; x++) { CARD32 p = *argb++; CARD32 a = (p >> 24); if (a == 0) /* transparent */ continue; if (a == 0xff) { /* opaque */ int n; for (n = 0; n < ncolor; n++) if (p == twocolor[n]) break; if (n == ncolor) twocolor[ncolor++] = p; } else ncolor = 3; } } /* * Convert argb image to two plane cursor */ srcline = srcbits; mskline = mskbits; argb = argbbits; for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { CARD32 p = *argb++; if (ncolor <= 2) { CARD32 a = ((p >> 24)); RenderSetBit(mskline, x, a != 0); RenderSetBit(srcline, x, a != 0 && p == twocolor[0]); } else { CARD32 a = ((p >> 24) * DITHER_SIZE + 127) / 255; CARD32 i = ((CvtR8G8B8toY15(p) >> 7) * DITHER_SIZE + 127) / 255; CARD32 d = orderedDither[y & (DITHER_DIM - 1)][x & (DITHER_DIM - 1)]; /* Set mask from dithered alpha value */ RenderSetBit(mskline, x, a > d); /* Set src from dithered intensity value */ RenderSetBit(srcline, x, a > d && i <= d); } } srcline += stride; mskline += stride; } /* * Dither to white and black if the cursor has more than two colors */ if (ncolor > 2) { twocolor[0] = 0xff000000; twocolor[1] = 0xffffffff; } else { free(argbbits); argbbits = 0; } #define GetByte(p,s) (((p) >> (s)) & 0xff) #define GetColor(p,s) (GetByte(p,s) | (GetByte(p,s) << 8)) cm.width = width; cm.height = height; cm.xhot = stuff->x; cm.yhot = stuff->y; rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm, GetColor(twocolor[0], 16), GetColor(twocolor[0], 8), GetColor(twocolor[0], 0), GetColor(twocolor[1], 16), GetColor(twocolor[1], 8), GetColor(twocolor[1], 0), &pCursor, client, stuff->cid); if (rc != Success) goto bail; if (!AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) { rc = BadAlloc; goto bail; } return Success; bail: free(srcbits); free(mskbits); return rc; } static int ProcRenderSetPictureTransform(ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); PicturePtr pPicture; REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); return SetPictureTransform(pPicture, (PictTransform *) &stuff->transform); } static int ProcRenderQueryFilters(ClientPtr client) { REQUEST(xRenderQueryFiltersReq); DrawablePtr pDrawable; xRenderQueryFiltersReply *reply; int nbytesName; int nnames; ScreenPtr pScreen; PictureScreenPtr ps; int i, j, len, total_bytes, rc; INT16 *aliases; char *names; REQUEST_SIZE_MATCH(xRenderQueryFiltersReq); rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pDrawable->pScreen; nbytesName = 0; nnames = 0; ps = GetPictureScreenIfSet(pScreen); if (ps) { for (i = 0; i < ps->nfilters; i++) nbytesName += 1 + strlen(ps->filters[i].name); for (i = 0; i < ps->nfilterAliases; i++) nbytesName += 1 + strlen(ps->filterAliases[i].alias); nnames = ps->nfilters + ps->nfilterAliases; } len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName); total_bytes = sizeof(xRenderQueryFiltersReply) + (len << 2); reply = (xRenderQueryFiltersReply *) calloc(1, total_bytes); if (!reply) return BadAlloc; aliases = (INT16 *) (reply + 1); names = (char *) (aliases + ((nnames + 1) & ~1)); reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = len; reply->numAliases = nnames; reply->numFilters = nnames; if (ps) { /* fill in alias values */ for (i = 0; i < ps->nfilters; i++) aliases[i] = FilterAliasNone; for (i = 0; i < ps->nfilterAliases; i++) { for (j = 0; j < ps->nfilters; j++) if (ps->filterAliases[i].filter_id == ps->filters[j].id) break; if (j == ps->nfilters) { for (j = 0; j < ps->nfilterAliases; j++) if (ps->filterAliases[i].filter_id == ps->filterAliases[j].alias_id) { break; } if (j == ps->nfilterAliases) j = FilterAliasNone; else j = j + ps->nfilters; } aliases[i + ps->nfilters] = j; } /* fill in filter names */ for (i = 0; i < ps->nfilters; i++) { j = strlen(ps->filters[i].name); *names++ = j; memcpy(names, ps->filters[i].name, j); names += j; } /* fill in filter alias names */ for (i = 0; i < ps->nfilterAliases; i++) { j = strlen(ps->filterAliases[i].alias); *names++ = j; memcpy(names, ps->filterAliases[i].alias, j); names += j; } } if (client->swapped) { for (i = 0; i < reply->numAliases; i++) { swaps(&aliases[i]); } swaps(&reply->sequenceNumber); swapl(&reply->length); swapl(&reply->numAliases); swapl(&reply->numFilters); } WriteToClient(client, total_bytes, reply); free(reply); return Success; } static int ProcRenderSetPictureFilter(ClientPtr client) { REQUEST(xRenderSetPictureFilterReq); PicturePtr pPicture; int result; xFixed *params; int nparams; char *name; REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); name = (char *) (stuff + 1); params = (xFixed *) (name + pad_to_int32(stuff->nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; if (nparams < 0) return BadLength; result = SetPictureFilter(pPicture, name, stuff->nbytes, params, nparams); return result; } static int ProcRenderCreateAnimCursor(ClientPtr client) { REQUEST(xRenderCreateAnimCursorReq); CursorPtr *cursors; CARD32 *deltas; CursorPtr pCursor; int ncursor; xAnimCursorElt *elt; int i; int ret; REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); if (client->req_len & 1) return BadLength; ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1; cursors = xallocarray(ncursor, sizeof(CursorPtr) + sizeof(CARD32)); if (!cursors) return BadAlloc; deltas = (CARD32 *) (cursors + ncursor); elt = (xAnimCursorElt *) (stuff + 1); for (i = 0; i < ncursor; i++) { ret = dixLookupResourceByType((void **) (cursors + i), elt->cursor, RT_CURSOR, client, DixReadAccess); if (ret != Success) { free(cursors); return ret; } deltas[i] = elt->delay; elt++; } ret = AnimCursorCreate(cursors, deltas, ncursor, &pCursor, client, stuff->cid); free(cursors); if (ret != Success) return ret; if (AddResource(stuff->cid, RT_CURSOR, (void *) pCursor)) return Success; return BadAlloc; } static int ProcRenderAddTraps(ClientPtr client) { int ntraps; PicturePtr pPicture; REQUEST(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess); if (!pPicture->pDrawable) return BadDrawable; ntraps = (client->req_len << 2) - sizeof(xRenderAddTrapsReq); if (ntraps % sizeof(xTrap)) return BadLength; ntraps /= sizeof(xTrap); if (ntraps) AddTraps(pPicture, stuff->xOff, stuff->yOff, ntraps, (xTrap *) &stuff[1]); return Success; } static int ProcRenderCreateSolidFill(ClientPtr client) { PicturePtr pPicture; int error = 0; REQUEST(xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); LEGAL_NEW_RESOURCE(stuff->pid, client); pPicture = CreateSolidPicture(stuff->pid, &stuff->color, &error); if (!pPicture) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource(stuff->pid, PictureType, (void *) pPicture)) return BadAlloc; return Success; } static int ProcRenderCreateLinearGradient(ClientPtr client) { PicturePtr pPicture; int len; int error = 0; xFixed *stops; xRenderColor *colors; REQUEST(xRenderCreateLinearGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); LEGAL_NEW_RESOURCE(stuff->pid, client); len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; stops = (xFixed *) (stuff + 1); colors = (xRenderColor *) (stops + stuff->nStops); pPicture = CreateLinearGradientPicture(stuff->pid, &stuff->p1, &stuff->p2, stuff->nStops, stops, colors, &error); if (!pPicture) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource(stuff->pid, PictureType, (void *) pPicture)) return BadAlloc; return Success; } static int ProcRenderCreateRadialGradient(ClientPtr client) { PicturePtr pPicture; int len; int error = 0; xFixed *stops; xRenderColor *colors; REQUEST(xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); LEGAL_NEW_RESOURCE(stuff->pid, client); len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; stops = (xFixed *) (stuff + 1); colors = (xRenderColor *) (stops + stuff->nStops); pPicture = CreateRadialGradientPicture(stuff->pid, &stuff->inner, &stuff->outer, stuff->inner_radius, stuff->outer_radius, stuff->nStops, stops, colors, &error); if (!pPicture) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource(stuff->pid, PictureType, (void *) pPicture)) return BadAlloc; return Success; } static int ProcRenderCreateConicalGradient(ClientPtr client) { PicturePtr pPicture; int len; int error = 0; xFixed *stops; xRenderColor *colors; REQUEST(xRenderCreateConicalGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); LEGAL_NEW_RESOURCE(stuff->pid, client); len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; stops = (xFixed *) (stuff + 1); colors = (xRenderColor *) (stops + stuff->nStops); pPicture = CreateConicalGradientPicture(stuff->pid, &stuff->center, stuff->angle, stuff->nStops, stops, colors, &error); if (!pPicture) return error; /* security creation/labeling check */ error = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, PictureType, pPicture, RT_NONE, NULL, DixCreateAccess); if (error != Success) return error; if (!AddResource(stuff->pid, PictureType, (void *) pPicture)) return BadAlloc; return Success; } static int ProcRenderDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < RenderNumberRequests) return (*ProcRenderVector[stuff->data]) (client); else return BadRequest; } static int _X_COLD SProcRenderQueryVersion(ClientPtr client) { REQUEST(xRenderQueryVersionReq); REQUEST_SIZE_MATCH(xRenderQueryVersionReq); swaps(&stuff->length); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderQueryPictFormats(ClientPtr client) { REQUEST(xRenderQueryPictFormatsReq); REQUEST_SIZE_MATCH(xRenderQueryPictFormatsReq); swaps(&stuff->length); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderQueryPictIndexValues(ClientPtr client) { REQUEST(xRenderQueryPictIndexValuesReq); REQUEST_AT_LEAST_SIZE(xRenderQueryPictIndexValuesReq); swaps(&stuff->length); swapl(&stuff->format); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderQueryDithers(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderCreatePicture(ClientPtr client) { REQUEST(xRenderCreatePictureReq); REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); swaps(&stuff->length); swapl(&stuff->pid); swapl(&stuff->drawable); swapl(&stuff->format); swapl(&stuff->mask); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderChangePicture(ClientPtr client) { REQUEST(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); swaps(&stuff->length); swapl(&stuff->picture); swapl(&stuff->mask); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderSetPictureClipRectangles(ClientPtr client) { REQUEST(xRenderSetPictureClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); swaps(&stuff->length); swapl(&stuff->picture); swaps(&stuff->xOrigin); swaps(&stuff->yOrigin); SwapRestS(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderFreePicture(ClientPtr client) { REQUEST(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq); swaps(&stuff->length); swapl(&stuff->picture); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderComposite(ClientPtr client) { REQUEST(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq); swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->mask); swapl(&stuff->dst); swaps(&stuff->xSrc); swaps(&stuff->ySrc); swaps(&stuff->xMask); swaps(&stuff->yMask); swaps(&stuff->xDst); swaps(&stuff->yDst); swaps(&stuff->width); swaps(&stuff->height); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderScale(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderTrapezoids(ClientPtr client) { REQUEST(xRenderTrapezoidsReq); REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->dst); swapl(&stuff->maskFormat); swaps(&stuff->xSrc); swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderTriangles(ClientPtr client) { REQUEST(xRenderTrianglesReq); REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->dst); swapl(&stuff->maskFormat); swaps(&stuff->xSrc); swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderTriStrip(ClientPtr client) { REQUEST(xRenderTriStripReq); REQUEST_AT_LEAST_SIZE(xRenderTriStripReq); swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->dst); swapl(&stuff->maskFormat); swaps(&stuff->xSrc); swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderTriFan(ClientPtr client) { REQUEST(xRenderTriFanReq); REQUEST_AT_LEAST_SIZE(xRenderTriFanReq); swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->dst); swapl(&stuff->maskFormat); swaps(&stuff->xSrc); swaps(&stuff->ySrc); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderColorTrapezoids(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderColorTriangles(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderTransform(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderCreateGlyphSet(ClientPtr client) { REQUEST(xRenderCreateGlyphSetReq); REQUEST_SIZE_MATCH(xRenderCreateGlyphSetReq); swaps(&stuff->length); swapl(&stuff->gsid); swapl(&stuff->format); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderReferenceGlyphSet(ClientPtr client) { REQUEST(xRenderReferenceGlyphSetReq); REQUEST_SIZE_MATCH(xRenderReferenceGlyphSetReq); swaps(&stuff->length); swapl(&stuff->gsid); swapl(&stuff->existing); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderFreeGlyphSet(ClientPtr client) { REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); swaps(&stuff->length); swapl(&stuff->glyphset); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderAddGlyphs(ClientPtr client) { register int i; CARD32 *gids; void *end; xGlyphInfo *gi; REQUEST(xRenderAddGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderAddGlyphsReq); swaps(&stuff->length); swapl(&stuff->glyphset); swapl(&stuff->nglyphs); if (stuff->nglyphs & 0xe0000000) return BadLength; end = (CARD8 *) stuff + (client->req_len << 2); gids = (CARD32 *) (stuff + 1); gi = (xGlyphInfo *) (gids + stuff->nglyphs); if ((char *) end - (char *) (gids + stuff->nglyphs) < 0) return BadLength; if ((char *) end - (char *) (gi + stuff->nglyphs) < 0) return BadLength; for (i = 0; i < stuff->nglyphs; i++) { swapl(&gids[i]); swaps(&gi[i].width); swaps(&gi[i].height); swaps(&gi[i].x); swaps(&gi[i].y); swaps(&gi[i].xOff); swaps(&gi[i].yOff); } return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderAddGlyphsFromPicture(ClientPtr client) { return BadImplementation; } static int _X_COLD SProcRenderFreeGlyphs(ClientPtr client) { REQUEST(xRenderFreeGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); swaps(&stuff->length); swapl(&stuff->glyphset); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCompositeGlyphs(ClientPtr client) { xGlyphElt *elt; CARD8 *buffer; CARD8 *end; int space; int i; int size; REQUEST(xRenderCompositeGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); switch (stuff->renderReqType) { default: size = 1; break; case X_RenderCompositeGlyphs16: size = 2; break; case X_RenderCompositeGlyphs32: size = 4; break; } swaps(&stuff->length); swapl(&stuff->src); swapl(&stuff->dst); swapl(&stuff->maskFormat); swapl(&stuff->glyphset); swaps(&stuff->xSrc); swaps(&stuff->ySrc); buffer = (CARD8 *) (stuff + 1); end = (CARD8 *) stuff + (client->req_len << 2); while (buffer + sizeof(xGlyphElt) < end) { elt = (xGlyphElt *) buffer; buffer += sizeof(xGlyphElt); swaps(&elt->deltax); swaps(&elt->deltay); i = elt->len; if (i == 0xff) { if (buffer + 4 > end) { return BadLength; } swapl((int *) buffer); buffer += 4; } else { space = size * i; switch (size) { case 1: buffer += i; break; case 2: if (buffer + i * 2 > end) { return BadLength; } while (i--) { swaps((short *) buffer); buffer += 2; } break; case 4: if (buffer + i * 4 > end) { return BadLength; } while (i--) { swapl((int *) buffer); buffer += 4; } break; } if (space & 3) buffer += 4 - (space & 3); } } return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderFillRectangles(ClientPtr client) { REQUEST(xRenderFillRectanglesReq); REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq); swaps(&stuff->length); swapl(&stuff->dst); swaps(&stuff->color.red); swaps(&stuff->color.green); swaps(&stuff->color.blue); swaps(&stuff->color.alpha); SwapRestS(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCreateCursor(ClientPtr client) { REQUEST(xRenderCreateCursorReq); REQUEST_SIZE_MATCH(xRenderCreateCursorReq); swaps(&stuff->length); swapl(&stuff->cid); swapl(&stuff->src); swaps(&stuff->x); swaps(&stuff->y); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderSetPictureTransform(ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); swaps(&stuff->length); swapl(&stuff->picture); swapl(&stuff->transform.matrix11); swapl(&stuff->transform.matrix12); swapl(&stuff->transform.matrix13); swapl(&stuff->transform.matrix21); swapl(&stuff->transform.matrix22); swapl(&stuff->transform.matrix23); swapl(&stuff->transform.matrix31); swapl(&stuff->transform.matrix32); swapl(&stuff->transform.matrix33); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderQueryFilters(ClientPtr client) { REQUEST(xRenderQueryFiltersReq); REQUEST_SIZE_MATCH(xRenderQueryFiltersReq); swaps(&stuff->length); swapl(&stuff->drawable); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderSetPictureFilter(ClientPtr client) { REQUEST(xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); swaps(&stuff->length); swapl(&stuff->picture); swaps(&stuff->nbytes); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCreateAnimCursor(ClientPtr client) { REQUEST(xRenderCreateAnimCursorReq); REQUEST_AT_LEAST_SIZE(xRenderCreateAnimCursorReq); swaps(&stuff->length); swapl(&stuff->cid); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderAddTraps(ClientPtr client) { REQUEST(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); swaps(&stuff->length); swapl(&stuff->picture); swaps(&stuff->xOff); swaps(&stuff->yOff); SwapRestL(stuff); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCreateSolidFill(ClientPtr client) { REQUEST(xRenderCreateSolidFillReq); REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); swaps(&stuff->length); swapl(&stuff->pid); swaps(&stuff->color.alpha); swaps(&stuff->color.red); swaps(&stuff->color.green); swaps(&stuff->color.blue); return (*ProcRenderVector[stuff->renderReqType]) (client); } static void _X_COLD swapStops(void *stuff, int num) { int i; CARD32 *stops; CARD16 *colors; stops = (CARD32 *) (stuff); for (i = 0; i < num; ++i) { swapl(stops); ++stops; } colors = (CARD16 *) (stops); for (i = 0; i < 4 * num; ++i) { swaps(colors); ++colors; } } static int _X_COLD SProcRenderCreateLinearGradient(ClientPtr client) { int len; REQUEST(xRenderCreateLinearGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); swaps(&stuff->length); swapl(&stuff->pid); swapl(&stuff->p1.x); swapl(&stuff->p1.y); swapl(&stuff->p2.x); swapl(&stuff->p2.y); swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateLinearGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; swapStops(stuff + 1, stuff->nStops); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCreateRadialGradient(ClientPtr client) { int len; REQUEST(xRenderCreateRadialGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); swaps(&stuff->length); swapl(&stuff->pid); swapl(&stuff->inner.x); swapl(&stuff->inner.y); swapl(&stuff->outer.x); swapl(&stuff->outer.y); swapl(&stuff->inner_radius); swapl(&stuff->outer_radius); swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateRadialGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; swapStops(stuff + 1, stuff->nStops); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderCreateConicalGradient(ClientPtr client) { int len; REQUEST(xRenderCreateConicalGradientReq); REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); swaps(&stuff->length); swapl(&stuff->pid); swapl(&stuff->center.x); swapl(&stuff->center.y); swapl(&stuff->angle); swapl(&stuff->nStops); len = (client->req_len << 2) - sizeof(xRenderCreateConicalGradientReq); if (stuff->nStops > UINT32_MAX / (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; if (len != stuff->nStops * (sizeof(xFixed) + sizeof(xRenderColor))) return BadLength; swapStops(stuff + 1, stuff->nStops); return (*ProcRenderVector[stuff->renderReqType]) (client); } static int _X_COLD SProcRenderDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < RenderNumberRequests) return (*SProcRenderVector[stuff->data]) (client); else return BadRequest; } #ifdef PANORAMIX #define VERIFY_XIN_PICTURE(pPicture, pid, client, mode) {\ int rc = dixLookupResourceByType((void **)&(pPicture), pid,\ XRT_PICTURE, client, mode);\ if (rc != Success)\ return rc;\ } #define VERIFY_XIN_ALPHA(pPicture, pid, client, mode) {\ if (pid == None) \ pPicture = 0; \ else { \ VERIFY_XIN_PICTURE(pPicture, pid, client, mode); \ } \ } \ int (*PanoramiXSaveRenderVector[RenderNumberRequests]) (ClientPtr); static int PanoramiXRenderCreatePicture(ClientPtr client) { REQUEST(xRenderCreatePictureReq); PanoramiXRes *refDraw, *newPict; int result, j; REQUEST_AT_LEAST_SIZE(xRenderCreatePictureReq); result = dixLookupResourceByClass((void **) &refDraw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; panoramix_setup_ids(newPict, client, stuff->pid); if (refDraw->type == XRT_WINDOW && stuff->drawable == screenInfo.screens[0]->root->drawable.id) { newPict->u.pict.root = TRUE; } else newPict->u.pict.root = FALSE; FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPict->info[j].id; stuff->drawable = refDraw->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderCreatePicture]) (client); if (result != Success) break; } if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else free(newPict); return result; } static int PanoramiXRenderChangePicture(ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderChangePictureReq); REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderChangePicture]) (client); if (result != Success) break; } return result; } static int PanoramiXRenderSetPictureClipRectangles(ClientPtr client) { REQUEST(xRenderSetPictureClipRectanglesReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderSetPictureClipRectangles]) (client); if (result != Success) break; } return result; } static int PanoramiXRenderSetPictureTransform(ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderSetPictureTransform]) (client); if (result != Success) break; } return result; } static int PanoramiXRenderSetPictureFilter(ClientPtr client) { REQUEST(xRenderSetPictureFilterReq); int result = Success, j; PanoramiXRes *pict; REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderSetPictureFilter]) (client); if (result != Success) break; } return result; } static int PanoramiXRenderFreePicture(ClientPtr client) { PanoramiXRes *pict; int result = Success, j; REQUEST(xRenderFreePictureReq); REQUEST_SIZE_MATCH(xRenderFreePictureReq); client->errorValue = stuff->picture; VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderFreePicture]) (client); if (result != Success) break; } /* Since ProcRenderFreePicture is using FreeResource, it will free our resource for us on the last pass through the loop above */ return result; } static int PanoramiXRenderComposite(ClientPtr client) { PanoramiXRes *src, *msk, *dst; int result = Success, j; xRenderCompositeReq orig; REQUEST(xRenderCompositeReq); REQUEST_SIZE_MATCH(xRenderCompositeReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_ALPHA(msk, stuff->mask, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); orig = *stuff; FOR_NSCREENS_FORWARD(j) { stuff->src = src->info[j].id; if (src->u.pict.root) { stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x; stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { stuff->xDst = orig.xDst - screenInfo.screens[j]->x; stuff->yDst = orig.yDst - screenInfo.screens[j]->y; } if (msk) { stuff->mask = msk->info[j].id; if (msk->u.pict.root) { stuff->xMask = orig.xMask - screenInfo.screens[j]->x; stuff->yMask = orig.yMask - screenInfo.screens[j]->y; } } result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client); if (result != Success) break; } return result; } static int PanoramiXRenderCompositeGlyphs(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderCompositeGlyphsReq); xGlyphElt origElt, *elt; INT16 xSrc, ySrc; REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); if (client->req_len << 2 >= (sizeof(xRenderCompositeGlyphsReq) + sizeof(xGlyphElt))) { elt = (xGlyphElt *) (stuff + 1); origElt = *elt; xSrc = stuff->xSrc; ySrc = stuff->ySrc; FOR_NSCREENS_FORWARD(j) { stuff->src = src->info[j].id; if (src->u.pict.root) { stuff->xSrc = xSrc - screenInfo.screens[j]->x; stuff->ySrc = ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { elt->deltax = origElt.deltax - screenInfo.screens[j]->x; elt->deltay = origElt.deltay - screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client); if (result != Success) break; } } return result; } static int PanoramiXRenderFillRectangles(ClientPtr client) { PanoramiXRes *dst; int result = Success, j; REQUEST(xRenderFillRectanglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE(xRenderFillRectanglesReq); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); if (dst->u.pict.root) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xRectangle *rects = (xRectangle *) (stuff + 1); int i = extra_len / sizeof(xRectangle); while (i--) { rects->x -= x_off; rects->y -= y_off; rects++; } } } stuff->dst = dst->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderTrapezoids(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrapezoidsReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE(xRenderTrapezoidsReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderTrapezoidsReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); if (dst->u.pict.root) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xTrapezoid *trap = (xTrapezoid *) (stuff + 1); int i = extra_len / sizeof(xTrapezoid); while (i--) { trap->top -= y_off; trap->bottom -= y_off; trap->left.p1.x -= x_off; trap->left.p1.y -= y_off; trap->left.p2.x -= x_off; trap->left.p2.y -= y_off; trap->right.p1.x -= x_off; trap->right.p1.y -= y_off; trap->right.p2.x -= x_off; trap->right.p2.y -= y_off; trap++; } } } stuff->src = src->info[j].id; stuff->dst = dst->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderTrapezoids]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderTriangles(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTrianglesReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE(xRenderTrianglesReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderTrianglesReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); if (dst->u.pict.root) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xTriangle *tri = (xTriangle *) (stuff + 1); int i = extra_len / sizeof(xTriangle); while (i--) { tri->p1.x -= x_off; tri->p1.y -= y_off; tri->p2.x -= x_off; tri->p2.y -= y_off; tri->p3.x -= x_off; tri->p3.y -= y_off; tri++; } } } stuff->src = src->info[j].id; stuff->dst = dst->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderTriangles]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderTriStrip(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriStripReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE(xRenderTriStripReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderTriStripReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); if (dst->u.pict.root) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); int i = extra_len / sizeof(xPointFixed); while (i--) { fixed->x -= x_off; fixed->y -= y_off; fixed++; } } } stuff->src = src->info[j].id; stuff->dst = dst->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderTriStrip]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderTriFan(ClientPtr client) { PanoramiXRes *src, *dst; int result = Success, j; REQUEST(xRenderTriFanReq); char *extra; int extra_len; REQUEST_AT_LEAST_SIZE(xRenderTriFanReq); VERIFY_XIN_PICTURE(src, stuff->src, client, DixReadAccess); VERIFY_XIN_PICTURE(dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderTriFanReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); if (dst->u.pict.root) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); int i = extra_len / sizeof(xPointFixed); while (i--) { fixed->x -= x_off; fixed->y -= y_off; fixed++; } } } stuff->src = src->info[j].id; stuff->dst = dst->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderTriFan]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderAddTraps(ClientPtr client) { PanoramiXRes *picture; int result = Success, j; REQUEST(xRenderAddTrapsReq); char *extra; int extra_len; INT16 x_off, y_off; REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); VERIFY_XIN_PICTURE(picture, stuff->picture, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof(xRenderAddTrapsReq); if (extra_len && (extra = (char *) malloc(extra_len))) { memcpy(extra, stuff + 1, extra_len); x_off = stuff->xOff; y_off = stuff->yOff; FOR_NSCREENS_FORWARD(j) { if (j) memcpy(stuff + 1, extra, extra_len); stuff->picture = picture->info[j].id; if (picture->u.pict.root) { stuff->xOff = x_off + screenInfo.screens[j]->x; stuff->yOff = y_off + screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client); if (result != Success) break; } free(extra); } return result; } static int PanoramiXRenderCreateSolidFill(ClientPtr client) { REQUEST(xRenderCreateSolidFillReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); if (!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; panoramix_setup_ids(newPict, client, stuff->pid); newPict->u.pict.root = FALSE; FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderCreateSolidFill]) (client); if (result != Success) break; } if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else free(newPict); return result; } static int PanoramiXRenderCreateLinearGradient(ClientPtr client) { REQUEST(xRenderCreateLinearGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); if (!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; panoramix_setup_ids(newPict, client, stuff->pid); newPict->u.pict.root = FALSE; FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderCreateLinearGradient]) (client); if (result != Success) break; } if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else free(newPict); return result; } static int PanoramiXRenderCreateRadialGradient(ClientPtr client) { REQUEST(xRenderCreateRadialGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); if (!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; panoramix_setup_ids(newPict, client, stuff->pid); newPict->u.pict.root = FALSE; FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderCreateRadialGradient]) (client); if (result != Success) break; } if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else free(newPict); return result; } static int PanoramiXRenderCreateConicalGradient(ClientPtr client) { REQUEST(xRenderCreateConicalGradientReq); PanoramiXRes *newPict; int result = Success, j; REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); if (!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; panoramix_setup_ids(newPict, client, stuff->pid); newPict->u.pict.root = FALSE; FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPict->info[j].id; result = (*PanoramiXSaveRenderVector[X_RenderCreateConicalGradient]) (client); if (result != Success) break; } if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else free(newPict); return result; } void PanoramiXRenderInit(void) { int i; XRT_PICTURE = CreateNewResourceType(XineramaDeleteResource, "XineramaPicture"); if (RenderErrBase) SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); for (i = 0; i < RenderNumberRequests; i++) PanoramiXSaveRenderVector[i] = ProcRenderVector[i]; /* * Stuff in Xinerama aware request processing hooks */ ProcRenderVector[X_RenderCreatePicture] = PanoramiXRenderCreatePicture; ProcRenderVector[X_RenderChangePicture] = PanoramiXRenderChangePicture; ProcRenderVector[X_RenderSetPictureTransform] = PanoramiXRenderSetPictureTransform; ProcRenderVector[X_RenderSetPictureFilter] = PanoramiXRenderSetPictureFilter; ProcRenderVector[X_RenderSetPictureClipRectangles] = PanoramiXRenderSetPictureClipRectangles; ProcRenderVector[X_RenderFreePicture] = PanoramiXRenderFreePicture; ProcRenderVector[X_RenderComposite] = PanoramiXRenderComposite; ProcRenderVector[X_RenderCompositeGlyphs8] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderCompositeGlyphs16] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderCompositeGlyphs32] = PanoramiXRenderCompositeGlyphs; ProcRenderVector[X_RenderFillRectangles] = PanoramiXRenderFillRectangles; ProcRenderVector[X_RenderTrapezoids] = PanoramiXRenderTrapezoids; ProcRenderVector[X_RenderTriangles] = PanoramiXRenderTriangles; ProcRenderVector[X_RenderTriStrip] = PanoramiXRenderTriStrip; ProcRenderVector[X_RenderTriFan] = PanoramiXRenderTriFan; ProcRenderVector[X_RenderAddTraps] = PanoramiXRenderAddTraps; ProcRenderVector[X_RenderCreateSolidFill] = PanoramiXRenderCreateSolidFill; ProcRenderVector[X_RenderCreateLinearGradient] = PanoramiXRenderCreateLinearGradient; ProcRenderVector[X_RenderCreateRadialGradient] = PanoramiXRenderCreateRadialGradient; ProcRenderVector[X_RenderCreateConicalGradient] = PanoramiXRenderCreateConicalGradient; } void PanoramiXRenderReset(void) { int i; for (i = 0; i < RenderNumberRequests; i++) ProcRenderVector[i] = PanoramiXSaveRenderVector[i]; RenderErrBase = 0; } #endif /* PANORAMIX */ xorg-server-21.1.16/test/0000755000175000017500000000000014757411136010676 5xorg-server-21.1.16/test/bigreq/0000755000175000017500000000000014757411132012143 5xorg-server-21.1.16/test/bigreq/meson.build0000644000175000017500000000065514757411105014233 xcb_dep = dependency('xcb', required: false) xcb_xinput_dep = dependency('xcb-xinput', required: false) if get_option('xvfb') if xcb_dep.found() and xcb_xinput_dep.found() requestlength = executable('request-length', 'request-length.c', dependencies: [xcb_dep, xcb_xinput_dep]) test('request-length', simple_xinit, args: [requestlength, '--', xvfb_server]) endif endif xorg-server-21.1.16/test/bigreq/request-length.c0000644000175000017500000000670514757411105015206 /* * Copyright © 2017 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #include #include #include #include #include #include int main(int argc, char **argv) { xcb_connection_t *c = xcb_connect(NULL, NULL); int fd = xcb_get_file_descriptor(c); struct { uint8_t extension; uint8_t opcode; uint16_t length; uint32_t length_bigreq; uint32_t win; int num_masks; uint16_t pad; } xise_req = { .extension = 0, .opcode = XCB_INPUT_XI_SELECT_EVENTS, /* The server triggers BadValue on a zero num_mask */ .num_masks = 0, .win = 0, /* This is the value that triggers the bug. */ .length_bigreq = 0, }; xcb_query_extension_cookie_t cookie; xcb_query_extension_reply_t *rep; cookie = xcb_query_extension(c, 15, "XInputExtension"); rep = xcb_query_extension_reply(c, cookie, NULL); xise_req.extension = rep->major_opcode; free(xcb_big_requests_enable_reply(c, xcb_big_requests_enable(c), NULL)); /* Manually write out the bad request. XCB can't help us here.*/ write(fd, &xise_req, sizeof(xise_req)); /* Block until the server has processed our mess and throws an * error. If we get disconnected, then the server has noticed what we're * up to. If we get an error back from the server, it looked at our fake * request - which shouldn't happen. */ struct pollfd pfd = { .fd = fd, .events = POLLIN, }; poll(&pfd, 1, -1); if (pfd.revents & POLLHUP) { /* We got killed by the server for being naughty. Yay! */ return 0; } /* We didn't get disconnected, that's bad. If we get a BadValue from our * request, we at least know that the bug triggered. * * If we get anything else back, something else has gone wrong. */ xcb_generic_error_t error; int r = read(fd, &error, sizeof(error)); if (r == sizeof(error) && error.error_code == 2 /* BadValue */ && error.major_code == xise_req.extension && error.minor_code == XCB_INPUT_XI_SELECT_EVENTS) return 1; /* Our request was processed, which shouldn't happen */ /* Something else bad happened. We got something back but it's not the * error we expected. If this happens, it needs to be investigated. */ return 2; } xorg-server-21.1.16/test/damage/0000755000175000017500000000000014757411132012110 5xorg-server-21.1.16/test/damage/meson.build0000644000175000017500000000062414757411105014174 xcb_dep = dependency('xcb', required: false) xcb_damage_dep = dependency('xcb-damage', required: false) if get_option('xvfb') if xcb_dep.found() and xcb_damage_dep.found() damage_primitives = executable('damage-primitives', 'primitives.c', dependencies: [xcb_dep, xcb_damage_dep]) test('damage-primitives', simple_xinit, args: [damage_primitives, '--', xvfb_server]) endif endif xorg-server-21.1.16/test/damage/primitives.c0000644000175000017500000002655614757411105014405 /* * Copyright © 2018 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** @file * * Touch-testing of the damage extension's implementation of various * primitives. The core initializes the pixmap with some contents, * turns on damage and each per-primitive test gets to just make a * rendering call that draws some pixels. Afterwards, the core checks * what pixels were modified and makes sure the damage report contains * them. */ /* Test relies on assert() */ #undef NDEBUG #include #include #include #include #include #include #include struct test_setup { xcb_connection_t *c; xcb_drawable_t d; xcb_drawable_t start_drawable; uint32_t *start_drawable_contents; xcb_screen_t *screen; xcb_gc_t gc; int width, height; uint32_t *expected; uint32_t *damaged; }; #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) /** * Performs a synchronous GetImage for a test pixmap, returning * uint32_t per pixel. */ static uint32_t * get_image(struct test_setup *setup, xcb_drawable_t drawable) { xcb_get_image_cookie_t cookie = xcb_get_image(setup->c, XCB_IMAGE_FORMAT_Z_PIXMAP, drawable, 0, 0, setup->width, setup->height, ~0); xcb_get_image_reply_t *reply = xcb_get_image_reply(setup->c, cookie, NULL); uint8_t *data = xcb_get_image_data(reply); int len = xcb_get_image_data_length(reply); /* Do I understand X protocol and our test environment? */ assert(reply->depth == 24); assert(len == 4 * setup->width * setup->height); uint32_t *result = malloc(sizeof(uint32_t) * setup->width * setup->height); memcpy(result, data, len); free(reply); return result; } /** * Gets the image drawn by the test and compares it to the starting * image, producing a bitmask of what pixels were damaged. */ static void compute_expected_damage(struct test_setup *setup) { uint32_t *results = get_image(setup, setup->d); bool any_modified_pixels = false; for (int i = 0; i < setup->width * setup->height; i++) { if (results[i] != setup->start_drawable_contents[i]) { setup->expected[i / 32] |= 1 << (i % 32); any_modified_pixels = true; } } /* Make sure that the testcases actually render something! */ assert(any_modified_pixels); } /** * Processes a damage event, filling in the bitmask of pixels reported * to be damaged. */ static bool damage_event_handle(struct test_setup *setup, struct xcb_damage_notify_event_t *event) { xcb_rectangle_t *rect = &event->area; assert(event->drawable == setup->d); for (int y = rect->y; y < rect->y + rect->height; y++) { for (int x = rect->x; x < rect->x + rect->width; x++) { int bit = y * setup->width + x; setup->damaged[bit / 32] |= 1 << (bit % 32); } } return event->level & 0x80; /* XXX: MORE is missing from xcb. */ } /** * Collects a series of damage events (while the MORE flag is set) * into the damaged bitmask. */ static void collect_damage(struct test_setup *setup) { const xcb_query_extension_reply_t *ext = xcb_get_extension_data(setup->c, &xcb_damage_id); xcb_generic_event_t *ge; xcb_flush(setup->c); while ((ge = xcb_wait_for_event(setup->c))) { int event = ge->response_type & ~0x80; if (event == (ext->first_event + XCB_DAMAGE_NOTIFY)) { if (!damage_event_handle(setup, (struct xcb_damage_notify_event_t *)ge)) { return; } } else { switch (ge->response_type) { case 0: { xcb_generic_error_t *error = (xcb_generic_error_t *)ge; fprintf(stderr, "X error %d at sequence %d\n", error->error_code, error->sequence); exit(1); } case XCB_GRAPHICS_EXPOSURE: case XCB_NO_EXPOSURE: break; default: fprintf(stderr, "Unexpected event %d\n", ge->response_type); exit(1); } } } fprintf(stderr, "I/O error\n"); exit(1); } /** * Wrapper to set up the test pixmap, attach damage to it, and see if * the reported damage matches the testcase's rendering. */ static bool damage_test(struct test_setup *setup, void (*test)(struct test_setup *setup), const char *name) { uint32_t expected[32] = { 0 }; uint32_t damaged[32] = { 0 }; printf("Testing %s\n", name); setup->expected = expected; setup->damaged = damaged; /* Create our pixmap for this test and fill it with the * starting image. */ setup->d = xcb_generate_id(setup->c); xcb_create_pixmap(setup->c, setup->screen->root_depth, setup->d, setup->screen->root, setup->width, setup->height); setup->gc = xcb_generate_id(setup->c); uint32_t values[] = { setup->screen->black_pixel }; xcb_create_gc(setup->c, setup->gc, setup->screen->root, XCB_GC_FOREGROUND, values); xcb_copy_area(setup->c, setup->start_drawable, setup->d, setup->gc, 0, 0, 0, 0, setup->width, setup->height); /* Start watching for damage now that we have the initial contents. */ xcb_damage_damage_t damage = xcb_generate_id(setup->c); xcb_damage_create(setup->c, damage, setup->d, XCB_DAMAGE_REPORT_LEVEL_RAW_RECTANGLES); test(setup); compute_expected_damage(setup); xcb_damage_destroy(setup->c, damage); xcb_free_gc(setup->c, setup->gc); xcb_free_pixmap(setup->c, setup->d); collect_damage(setup); for (int bit = 0; bit < setup->width * setup->height; bit++) { if ((expected[bit / 32] & (1 << bit % 32)) && !(damaged[bit / 32] & (1 << bit % 32))) { fprintf(stderr, " fail: %s(): Damage report missed %d, %d\n", name, bit % setup->width, bit / setup->width); return false; } } return true; } /** * Creates the pixmap of contents that will be the initial state of * each test's drawable. */ static void create_start_pixmap(struct test_setup *setup) { setup->start_drawable = xcb_generate_id(setup->c); xcb_create_pixmap(setup->c, setup->screen->root_depth, setup->start_drawable, setup->screen->root, setup->width, setup->height); /* Fill pixmap so it has defined contents */ xcb_gc_t fill = xcb_generate_id(setup->c); uint32_t fill_values[] = { setup->screen->white_pixel }; xcb_create_gc(setup->c, fill, setup->screen->root, XCB_GC_FOREGROUND, fill_values); xcb_rectangle_t rect_all = { 0, 0, setup->width, setup->height}; xcb_poly_fill_rectangle(setup->c, setup->start_drawable, fill, 1, &rect_all); xcb_free_gc(setup->c, fill); /* Draw a rectangle */ xcb_gc_t gc = xcb_generate_id(setup->c); uint32_t values[] = { 0xaaaaaaaa }; xcb_create_gc(setup->c, gc, setup->screen->root, XCB_GC_FOREGROUND, values); xcb_rectangle_t rect = { 5, 5, 10, 15 }; xcb_poly_rectangle(setup->c, setup->start_drawable, gc, 1, &rect); xcb_free_gc(setup->c, gc); /* Capture the rendered start contents once, for comparing each * test's rendering output to the start contents. */ setup->start_drawable_contents = get_image(setup, setup->start_drawable); } static void test_poly_point_origin(struct test_setup *setup) { struct xcb_point_t points[] = { {1, 2}, {3, 4} }; xcb_poly_point(setup->c, XCB_COORD_MODE_ORIGIN, setup->d, setup->gc, ARRAY_SIZE(points), points); } static void test_poly_point_previous(struct test_setup *setup) { struct xcb_point_t points[] = { {1, 2}, {3, 4} }; xcb_poly_point(setup->c, XCB_COORD_MODE_PREVIOUS, setup->d, setup->gc, ARRAY_SIZE(points), points); } static void test_poly_line_origin(struct test_setup *setup) { struct xcb_point_t points[] = { {1, 2}, {3, 4}, {5, 6} }; xcb_poly_line(setup->c, XCB_COORD_MODE_ORIGIN, setup->d, setup->gc, ARRAY_SIZE(points), points); } static void test_poly_line_previous(struct test_setup *setup) { struct xcb_point_t points[] = { {1, 2}, {3, 4}, {5, 6} }; xcb_poly_line(setup->c, XCB_COORD_MODE_PREVIOUS, setup->d, setup->gc, ARRAY_SIZE(points), points); } static void test_poly_fill_rectangle(struct test_setup *setup) { struct xcb_rectangle_t rects[] = { {1, 2, 3, 4}, {5, 6, 7, 8} }; xcb_poly_fill_rectangle(setup->c, setup->d, setup->gc, ARRAY_SIZE(rects), rects); } static void test_poly_rectangle(struct test_setup *setup) { struct xcb_rectangle_t rects[] = { {1, 2, 3, 4}, {5, 6, 7, 8} }; xcb_poly_rectangle(setup->c, setup->d, setup->gc, ARRAY_SIZE(rects), rects); } static void test_poly_segment(struct test_setup *setup) { struct xcb_segment_t segs[] = { {1, 2, 3, 4}, {5, 6, 7, 8} }; xcb_poly_segment(setup->c, setup->d, setup->gc, ARRAY_SIZE(segs), segs); } int main(int argc, char **argv) { int screen; xcb_connection_t *c = xcb_connect(NULL, &screen); const xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_damage_id); if (!ext->present) { printf("No XDamage present\n"); exit(77); } struct test_setup setup = { .c = c, .width = 32, .height = 32, }; /* Get the screen so we have the root window. */ xcb_screen_iterator_t iter; iter = xcb_setup_roots_iterator (xcb_get_setup (c)); setup.screen = iter.data; xcb_damage_query_version(c, 1, 1); create_start_pixmap(&setup); bool pass = true; #define test(x) pass = damage_test(&setup, x, #x) && pass; test(test_poly_point_origin); test(test_poly_point_previous); test(test_poly_line_origin); test(test_poly_line_previous); test(test_poly_fill_rectangle); test(test_poly_rectangle); test(test_poly_segment); xcb_disconnect(c); exit(pass ? 0 : 1); } xorg-server-21.1.16/test/sync/0000755000175000017500000000000014757411132011646 5xorg-server-21.1.16/test/sync/meson.build0000644000175000017500000000052214757411105013727 xcb_dep = dependency('xcb', required: false) xcb_sync_dep = dependency('xcb-sync', required: false) if get_option('xvfb') if xcb_dep.found() and xcb_sync_dep.found() sync = executable('sync', 'sync.c', dependencies: [xcb_dep, xcb_sync_dep]) test('sync', simple_xinit, args: [sync, '--', xvfb_server]) endif endif xorg-server-21.1.16/test/sync/sync.c0000644000175000017500000002300114757411105012702 /* * Copyright © 2017 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #include #include #include #include #include #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) static const int64_t some_values[] = { 0, 1, -1, LLONG_MAX, LLONG_MIN, }; static int64_t pack_sync_value(xcb_sync_int64_t val) { return ((int64_t)val.hi << 32) | val.lo; } static int64_t counter_value(struct xcb_connection_t *c, xcb_sync_query_counter_cookie_t cookie) { xcb_sync_query_counter_reply_t *reply = xcb_sync_query_counter_reply(c, cookie, NULL); int64_t value = pack_sync_value(reply->counter_value); free(reply); return value; } static xcb_sync_int64_t sync_value(int64_t value) { xcb_sync_int64_t v = { .hi = value >> 32, .lo = value, }; return v; } /* Initializes counters with a bunch of interesting values and makes * sure it comes back the same. */ static void test_create_counter(xcb_connection_t *c) { xcb_sync_query_counter_cookie_t queries[ARRAY_SIZE(some_values)]; for (int i = 0; i < ARRAY_SIZE(some_values); i++) { xcb_sync_counter_t counter = xcb_generate_id(c); xcb_sync_create_counter(c, counter, sync_value(some_values[i])); queries[i] = xcb_sync_query_counter_unchecked(c, counter); } for (int i = 0; i < ARRAY_SIZE(some_values); i++) { int64_t value = counter_value(c, queries[i]); if (value != some_values[i]) { fprintf(stderr, "Creating counter with %lld returned %lld\n", (long long)some_values[i], (long long)value); exit(1); } } } /* Set a single counter to a bunch of interesting values and make sure * it comes the same. */ static void test_set_counter(xcb_connection_t *c) { xcb_sync_counter_t counter = xcb_generate_id(c); xcb_sync_query_counter_cookie_t queries[ARRAY_SIZE(some_values)]; xcb_sync_create_counter(c, counter, sync_value(0)); for (int i = 0; i < ARRAY_SIZE(some_values); i++) { xcb_sync_set_counter(c, counter, sync_value(some_values[i])); queries[i] = xcb_sync_query_counter_unchecked(c, counter); } for (int i = 0; i < ARRAY_SIZE(some_values); i++) { int64_t value = counter_value(c, queries[i]); if (value != some_values[i]) { fprintf(stderr, "Setting counter to %lld returned %lld\n", (long long)some_values[i], (long long)value); exit(1); } } } /* Add [0, 1, 2, 3] to a counter and check that the values stick. */ static void test_change_counter_basic(xcb_connection_t *c) { int iterations = 4; xcb_sync_query_counter_cookie_t queries[iterations]; xcb_sync_counter_t counter = xcb_generate_id(c); xcb_sync_create_counter(c, counter, sync_value(0)); for (int i = 0; i < iterations; i++) { xcb_sync_change_counter(c, counter, sync_value(i)); queries[i] = xcb_sync_query_counter_unchecked(c, counter); } int64_t expected_value = 0; for (int i = 0; i < iterations; i++) { expected_value += i; int64_t value = counter_value(c, queries[i]); if (value != expected_value) { fprintf(stderr, "Adding %d to counter expected %lld returned %lld\n", i, (long long)expected_value, (long long)value); exit(1); } } } /* Test change_counter where we trigger an integer overflow. */ static void test_change_counter_overflow(xcb_connection_t *c) { int iterations = 4; xcb_sync_query_counter_cookie_t queries[iterations]; xcb_void_cookie_t changes[iterations]; static const struct { int64_t a, b; } overflow_args[] = { { LLONG_MAX, 1 }, { LLONG_MAX, LLONG_MAX }, { LLONG_MIN, -1 }, { LLONG_MIN, LLONG_MIN }, }; xcb_sync_counter_t counter = xcb_generate_id(c); xcb_sync_create_counter(c, counter, sync_value(0)); for (int i = 0; i < ARRAY_SIZE(overflow_args); i++) { int64_t a = overflow_args[i].a; int64_t b = overflow_args[i].b; xcb_sync_set_counter(c, counter, sync_value(a)); changes[i] = xcb_sync_change_counter_checked(c, counter, sync_value(b)); queries[i] = xcb_sync_query_counter(c, counter); } for (int i = 0; i < ARRAY_SIZE(overflow_args); i++) { int64_t a = overflow_args[i].a; int64_t b = overflow_args[i].b; xcb_sync_query_counter_reply_t *reply = xcb_sync_query_counter_reply(c, queries[i], NULL); int64_t value = (((int64_t)reply->counter_value.hi << 32) | reply->counter_value.lo); int64_t expected_value = a; /* The change_counter should have thrown BadValue */ xcb_generic_error_t *e = xcb_request_check(c, changes[i]); if (!e) { fprintf(stderr, "(%lld + %lld) failed to return an error\n", (long long)a, (long long)b); exit(1); } if (e->error_code != XCB_VALUE) { fprintf(stderr, "(%lld + %lld) returned %d, not BadValue\n", (long long)a, (long long)b, e->error_code); exit(1); } /* The change_counter should have had no other effect if it * errored out. */ if (value != expected_value) { fprintf(stderr, "(%lld + %lld) expected %lld returned %lld\n", (long long)a, (long long)b, (long long)expected_value, (long long)value); exit(1); } free(e); free(reply); } } static void test_change_alarm_value(xcb_connection_t *c) { xcb_sync_alarm_t alarm = xcb_generate_id(c); xcb_sync_query_alarm_cookie_t queries[ARRAY_SIZE(some_values)]; xcb_sync_create_alarm(c, alarm, 0, NULL); for (int i = 0; i < ARRAY_SIZE(some_values); i++) { uint32_t values[] = { some_values[i] >> 32, some_values[i] }; xcb_sync_change_alarm(c, alarm, XCB_SYNC_CA_VALUE, values); queries[i] = xcb_sync_query_alarm_unchecked(c, alarm); } for (int i = 0; i < ARRAY_SIZE(some_values); i++) { xcb_sync_query_alarm_reply_t *reply = xcb_sync_query_alarm_reply(c, queries[i], NULL); int64_t value = pack_sync_value(reply->trigger.wait_value); if (value != some_values[i]) { fprintf(stderr, "Setting alarm value to %lld returned %lld\n", (long long)some_values[i], (long long)value); exit(1); } free(reply); } } static void test_change_alarm_delta(xcb_connection_t *c) { xcb_sync_alarm_t alarm = xcb_generate_id(c); xcb_sync_query_alarm_cookie_t queries[ARRAY_SIZE(some_values)]; xcb_sync_create_alarm(c, alarm, 0, NULL); for (int i = 0; i < ARRAY_SIZE(some_values); i++) { uint32_t mask = XCB_SYNC_CA_TEST_TYPE | XCB_SYNC_CA_DELTA; uint32_t test_type = (some_values[i] >= 0 ? XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON : XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON); uint32_t values[] = { test_type, some_values[i] >> 32, some_values[i] }; xcb_sync_change_alarm(c, alarm, mask, values); queries[i] = xcb_sync_query_alarm_unchecked(c, alarm); } for (int i = 0; i < ARRAY_SIZE(some_values); i++) { xcb_sync_query_alarm_reply_t *reply = xcb_sync_query_alarm_reply(c, queries[i], NULL); int64_t value = pack_sync_value(reply->delta); if (value != some_values[i]) { fprintf(stderr, "Setting alarm delta to %lld returned %lld\n", (long long)some_values[i], (long long)value); exit(1); } free(reply); } } int main(int argc, char **argv) { int screen; xcb_connection_t *c = xcb_connect(NULL, &screen); const xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id); if (!ext->present) { printf("No XSync present\n"); exit(77); } test_create_counter(c); test_set_counter(c); test_change_counter_basic(c); test_change_counter_overflow(c); test_change_alarm_value(c); test_change_alarm_delta(c); xcb_disconnect(c); exit(0); } xorg-server-21.1.16/test/meson.build0000644000175000017500000001315214757411105012756 simple_xinit = executable( 'simple-xinit', 'simple-xinit.c', include_directories: inc, ) piglit_env = environment() piglit_env.set('XSERVER_DIR', meson.source_root()) piglit_env.set('XSERVER_BUILDDIR', meson.build_root()) some_ops = ' -o clear,src,dst,over,xor,disjointover' rendercheck_tests = [ ['blend/All/a8r8g8b8', '-t blend -f a8r8g8b8'], ['blend/All/x8r8g8b8', '-t blend -f a8r8g8b8,x8r8g8b8'], ['blend/All/a2r10g10b10', '-t blend -f a8r8g8b8,a2r10g10b10'], ['blend/Clear', '-t blend -o clear'], ['blend/Src', '-t blend -o src'], ['blend/Over', '-t blend -o over'], ['composite/Some/a8r8g8b8', '-t composite -f a8r8g8b8' + some_ops], ['composite/Some/x8r8g8b8', '-t composite -f a8r8g8b8,x8r8g8b8' + some_ops], ['composite/Some/a2r10g10b10', '-t composite -f a8r8g8b8,a2r10g10b10' + some_ops], ['ca composite/Some/a8r8g8b8', '-t cacomposite -f a8r8g8b8' + some_ops], ['ca composite/Some/a8', '-t cacomposite -f a8r8g8b8,a8' + some_ops], ['ca composite/Some/x8r8g8b8', '-t cacomposite -f a8r8g8b8,x8r8g8b8' + some_ops], ['ca composite/Some/a2r10g10b10', '-t cacomposite -f a8r8g8b8,a2r10g10b10' + some_ops], ['fill', '-t fill'], ['bug7366', '-t bug7366'], ['destination coordinates', '-t dcoords'], ['source coordinates', '-t scoords'], ['mask coordinates', '-t mcoords'], ['translated source coordinates', '-t tscoords'], ['translated mask coordinates', '-t tmcoords'], ['triangles', '-t triangles'], ['LibreOffice xRGB', '-t libreoffice_xrgb'], ['GTK ARGB vs xBGR', '-t gtk_argb_xbgr'], ] rendercheck = find_program('rendercheck', required:false) if get_option('xvfb') xvfb_args = [ xvfb_server.full_path(), '-screen', 'scrn', '1280x1024x24', ] test('XTS', find_program('scripts/xvfb-piglit.sh'), env: piglit_env, timeout: 1200, suite: 'xvfb' ) if rendercheck.found() foreach rctest: rendercheck_tests test(rctest[0], simple_xinit, # Use full_path so people can copy and paste the # command line from testlog.txt easily. args: [ rendercheck.path(), rctest[1].split(' '), '--', xvfb_args, ], suite: 'xvfb' ) endforeach endif if get_option('xephyr') and build_glamor test('XTS', find_program('scripts/xephyr-glamor-piglit.sh'), env: piglit_env, timeout: 1200, suite: 'xephr-glamor', ) if rendercheck.found() foreach rctest: rendercheck_tests test(rctest[0], simple_xinit, args: [simple_xinit.full_path(), rendercheck.path(), rctest[1].split(' '), '----', xephyr_server.full_path(), '-glamor', '-glamor-skip-present', '-schedMax', '2000', '--', xvfb_args, ], suite: 'xephr-glamor', timeout: 300, ) endforeach endif endif endif subdir('bigreq') subdir('damage') subdir('sync') if build_xorg # Tests that require at least some DDX functions in order to fully link # For now, requires xf86 ddx, could be adjusted to use another unit_sources = [ '../mi/miinitext.c', '../mi/miinitext.h', '../mi/micmap.c', '../mi/micmap.h', 'fixes.c', 'input.c', 'list.c', 'misc.c', 'signal-logging.c', 'string.c', 'test_xkb.c', 'tests-common.c', 'tests.c', 'touch.c', 'xfree86.c', 'xtest.c', ] unit_defines = ['-DXORG_TESTS'] unit_includes = [inc, xorg_inc] if build_res unit_sources += ['hashtabletest.c'] unit_defines += ['-DRES_TESTS'] endif unit_c_args = unit_defines if meson.get_compiler('c').has_link_argument('-Wl,-wrap') # LTO breaks with -Wl,-wrap on certain configurations unit_c_args += ['-fno-lto'] unit_sources += [ 'xi1/protocol-xchangedevicecontrol.c', 'xi2/protocol-common.c', 'xi2/protocol-xiqueryversion.c', 'xi2/protocol-xiquerydevice.c', 'xi2/protocol-xiselectevents.c', 'xi2/protocol-xigetselectedevents.c', 'xi2/protocol-xisetclientpointer.c', 'xi2/protocol-xigetclientpointer.c', 'xi2/protocol-xiquerypointer.c', 'xi2/protocol-xipassivegrabdevice.c', 'xi2/protocol-xiwarppointer.c', 'xi2/protocol-eventconvert.c', 'xi2/xi2.c', ] unit_defines += ['-DLDWRAP_TESTS'] unit_includes += [include_directories('xi1', 'xi2')] ldwraps = [ '-Wl,-wrap,dixLookupWindow', '-Wl,-wrap,dixLookupClient', '-Wl,-wrap,WriteToClient', '-Wl,-wrap,dixLookupWindow', '-Wl,-wrap,XISetEventMask', '-Wl,-wrap,AddResource', '-Wl,-wrap,GrabButton', ] else ldwraps = [] message('ld -wrap required for xi1 & xi2 unit tests, skipping') endif unit = executable('tests', unit_sources, c_args: unit_c_args, dependencies: [pixman_dep, randrproto_dep, inputproto_dep, libxcvt_dep], include_directories: unit_includes, link_args: ldwraps, link_with: xorg_link, ) test('unit', unit) endif xorg-server-21.1.16/test/scripts/0000755000175000017500000000000014757411136012365 5xorg-server-21.1.16/test/scripts/xvfb-piglit.sh0000755000175000017500000000054614757411105015100 #!/bin/sh # this times out on Travis, because the tests take too long. #if test "x$TRAVIS_BUILD_DIR" != "x"; then # exit 77 #fi export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/vfb/Xvfb \ -noreset \ -screen scrn 1280x1024x24" export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xvfb exec $XSERVER_DIR/test/scripts/run-piglit.sh xorg-server-21.1.16/test/scripts/xephyr-glamor-piglit.sh0000755000175000017500000000172414757411105016730 #!/bin/sh # this times out on Travis, because the tests take too long. if test "x$TRAVIS_BUILD_DIR" != "x"; then exit 77 fi # Start a Xephyr server using glamor. Since the test environment is # headless, we start an Xvfb first to host the Xephyr. export PIGLIT_RESULTS_DIR=$XSERVER_BUILDDIR/test/piglit-results/xephyr-glamor export SERVER_COMMAND="$XSERVER_BUILDDIR/hw/kdrive/ephyr/Xephyr \ -glamor \ -glamor-skip-present \ -noreset \ -schedMax 2000 \ -screen 1280x1024" # Tests that currently fail on llvmpipe on CI PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@6" PIGLIT_ARGS="$PIGLIT_ARGS -x xcleararea@7" PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@4" PIGLIT_ARGS="$PIGLIT_ARGS -x xclearwindow@5" PIGLIT_ARGS="$PIGLIT_ARGS -x xcopyarea@1" export PIGLIT_ARGS $XSERVER_BUILDDIR/test/simple-xinit \ $XSERVER_DIR/test/scripts/run-piglit.sh \ -- \ $XSERVER_BUILDDIR/hw/vfb/Xvfb \ -screen scrn 1280x1024x24 xorg-server-21.1.16/test/scripts/xinit-piglit-session.sh0000755000175000017500000000205114757411105016740 #!/bin/sh # .xinitrc replacement to run piglit and exit. # # Note that piglit will run many processes against the server, so # running the server with -noreset is recommended to improve runtime. set -e if test "x$PIGLIT_DIR" = "x"; then echo "PIGLIT_DIR must be set to the directory of the piglit repository." exit 1 fi if test "x$PIGLIT_RESULTS_DIR" = "x"; then echo "PIGLIT_RESULTS_DIR must be defined" exit 1 fi if test "x$XTEST_DIR" = "x"; then echo "XTEST_DIR must be set to the root of the built xtest tree." exit 1 fi cd $PIGLIT_DIR # Skip some tests that are failing at the time of importing the script. # "REPORT: min_bounds, rbearing was 0, expecting 2" PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@3" PIGLIT_ARGS="$PIGLIT_ARGS -x xlistfontswithinfo@4" PIGLIT_ARGS="$PIGLIT_ARGS -x xloadqueryfont@1" PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@1" PIGLIT_ARGS="$PIGLIT_ARGS -x xqueryfont@2" # Run as meson unit tests. PIGLIT_ARGS="$PIGLIT_ARGS -x rendercheck" exec ./piglit run xts-render $PIGLIT_ARGS $PIGLIT_RESULTS_DIR xorg-server-21.1.16/test/scripts/run-piglit.sh0000755000175000017500000000451714757411105014741 #!/bin/sh set -e if test "x$XTEST_DIR" = "x"; then echo "XTEST_DIR must be set to the directory of the xtest repository." # Exit as a "skip" so make check works even without piglit. exit 77 fi if test "x$PIGLIT_DIR" = "x"; then echo "PIGLIT_DIR must be set to the directory of the piglit repository." # Exit as a "skip" so make check works even without piglit. exit 77 fi if test "x$PIGLIT_RESULTS_DIR" = "x"; then echo "PIGLIT_RESULTS_DIR must be set to where to output piglit results." # Exit as a real failure because it should always be set. exit 1 fi if test "x$XSERVER_DIR" = "x"; then echo "XSERVER_DIR must be set to the directory of the xserver repository." # Exit as a real failure because it should always be set. exit 1 fi if test "x$XSERVER_BUILDDIR" = "x"; then echo "XSERVER_BUILDDIR must be set to the build directory of the xserver repository." # Exit as a real failure because it should always be set. exit 1 fi if test "x$SERVER_COMMAND" = "x"; then echo "SERVER_COMMAND must be set to the server to be spawned." # Exit as a real failure because it should always be set. exit 1 fi $XSERVER_BUILDDIR/test/simple-xinit \ $XSERVER_DIR/test/scripts/xinit-piglit-session.sh \ -- \ $SERVER_COMMAND # Write out piglit-summaries. SHORT_SUMMARY=$PIGLIT_RESULTS_DIR/summary LONG_SUMMARY=$PIGLIT_RESULTS_DIR/long-summary $PIGLIT_DIR/piglit summary console -s $PIGLIT_RESULTS_DIR > $SHORT_SUMMARY $PIGLIT_DIR/piglit summary console $PIGLIT_RESULTS_DIR > $LONG_SUMMARY # Write the short summary to make check's log file. cat $SHORT_SUMMARY # Parse the piglit summary to decide on our exit status. status=0 # "pass: 0" would mean no tests actually ran. if grep "^ *pass: *0$" $SHORT_SUMMARY > /dev/null; then status=1 fi # Fails or crashes should be failures from make check's perspective. if ! grep "^ *fail: *0$" $SHORT_SUMMARY > /dev/null; then status=1 fi if ! grep "^ *crash: *0$" $SHORT_SUMMARY > /dev/null; then status=1 fi $PIGLIT_DIR/piglit summary html \ --overwrite \ $PIGLIT_RESULTS_DIR/html \ $PIGLIT_RESULTS_DIR if test $status != 0; then echo "Some piglit tests failed." echo "The list of failing tests can be found in $LONG_SUMMARY." fi echo "An html page of the test status can be found at $PIGLIT_RESULTS_DIR/html/index.html" exit $status xorg-server-21.1.16/test/xi1/0000755000175000017500000000000014757411136011377 5xorg-server-21.1.16/test/xi1/protocol-xchangedevicecontrol.c0000644000175000017500000000754114757411105017523 /** * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for ChangeDeviceControl request. */ #include #include #include #include #include "inputstr.h" #include "chgdctl.h" #include "protocol-common.h" extern ClientRec client_window; static ClientRec client_request; static void reply_ChangeDeviceControl(ClientPtr client, int len, char *data, void *userdata) { xChangeDeviceControlReply *rep = (xChangeDeviceControlReply *) data; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); } reply_check_defaults(rep, len, ChangeDeviceControl); /* XXX: check status code in reply */ } static void request_ChangeDeviceControl(ClientPtr client, xChangeDeviceControlReq * req, xDeviceCtl *ctl, int error) { int rc; client_request.req_len = req->length; rc = ProcXChangeDeviceControl(&client_request); assert(rc == error); /* XXX: ChangeDeviceControl doesn't seem to fill in errorValue to check */ client_request.swapped = TRUE; swaps(&req->length); swaps(&req->control); swaps(&ctl->length); swaps(&ctl->control); /* XXX: swap other contents of ctl, depending on type */ rc = SProcXChangeDeviceControl(&client_request); assert(rc == error); } static unsigned char *data[4096]; /* the request buffer */ static void test_ChangeDeviceControl(void) { xChangeDeviceControlReq *request = (xChangeDeviceControlReq *) data; xDeviceCtl *control = (xDeviceCtl *) (&request[1]); request_init(request, ChangeDeviceControl); reply_handler = reply_ChangeDeviceControl; client_request = init_client(request->length, request); printf("Testing invalid lengths:\n"); printf(" -- no control struct\n"); request_ChangeDeviceControl(&client_request, request, control, BadLength); printf(" -- xDeviceResolutionCtl\n"); request_init(request, ChangeDeviceControl); request->control = DEVICE_RESOLUTION; control->length = (sizeof(xDeviceResolutionCtl) >> 2); request->length += control->length - 2; request_ChangeDeviceControl(&client_request, request, control, BadLength); printf(" -- xDeviceEnableCtl\n"); request_init(request, ChangeDeviceControl); request->control = DEVICE_ENABLE; control->length = (sizeof(xDeviceEnableCtl) >> 2); request->length += control->length - 2; request_ChangeDeviceControl(&client_request, request, control, BadLength); /* XXX: Test functionality! */ } int protocol_xchangedevicecontrol_test(void) { init_simple(); test_ChangeDeviceControl(); return 0; } xorg-server-21.1.16/test/xi2/0000755000175000017500000000000014757411136011400 5xorg-server-21.1.16/test/xi2/protocol-common.c0000644000175000017500000002405114757411105014611 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "extinit.h" /* for XInputExtensionInit */ #include "exglobals.h" #include "xkbsrv.h" /* for XkbInitPrivates */ #include "xserver-properties.h" #include "syncsrv.h" #include #define INSIDE_PROTOCOL_COMMON #include "protocol-common.h" struct devices devices; ScreenRec screen; WindowRec root; WindowRec window; static ClientRec server_client; void *global_userdata; void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata); int enable_GrabButton_wrap = 1; int enable_XISetEventMask_wrap = 1; static void fake_init_sprite(DeviceIntPtr dev) { SpritePtr sprite; sprite = dev->spriteInfo->sprite; sprite->spriteTraceSize = 10; sprite->spriteTrace = calloc(sprite->spriteTraceSize, sizeof(WindowPtr)); sprite->spriteTraceGood = 1; sprite->spriteTrace[0] = &root; sprite->hot.x = SPRITE_X; sprite->hot.y = SPRITE_Y; sprite->hotPhys.x = sprite->hot.x; sprite->hotPhys.y = sprite->hot.y; sprite->win = &window; sprite->hotPhys.pScreen = &screen; sprite->physLimits.x1 = 0; sprite->physLimits.y1 = 0; sprite->physLimits.x2 = screen.width; sprite->physLimits.y2 = screen.height; } /* This is essentially CorePointerProc with ScrollAxes added */ static int TestPointerProc(DeviceIntPtr pDev, int what) { #define NBUTTONS 10 #define NAXES 4 BYTE map[NBUTTONS + 1]; int i = 0; Atom btn_labels[NBUTTONS] = { 0 }; Atom axes_labels[NAXES] = { 0 }; switch (what) { case DEVICE_INIT: for (i = 1; i <= NBUTTONS; i++) map[i] = i; btn_labels[0] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_LEFT); btn_labels[1] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_MIDDLE); btn_labels[2] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_RIGHT); btn_labels[3] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_UP); btn_labels[4] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_WHEEL_DOWN); btn_labels[5] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_LEFT); btn_labels[6] = XIGetKnownProperty(BTN_LABEL_PROP_BTN_HWHEEL_RIGHT); /* don't know about the rest */ axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_X); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_Y); axes_labels[0] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_VSCROLL); axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_REL_HSCROLL); if (!InitPointerDeviceStruct ((DevicePtr) pDev, map, NBUTTONS, btn_labels, (PtrCtrlProcPtr) NoopDDA, GetMotionHistorySize(), NAXES, axes_labels)) { ErrorF("Could not initialize device '%s'. Out of memory.\n", pDev->name); return BadAlloc; } pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; pDev->last.valuators[0] = pDev->valuator->axisVal[0]; pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; pDev->last.valuators[1] = pDev->valuator->axisVal[1]; /* protocol-xiquerydevice.c relies on these increment */ SetScrollValuator(pDev, 2, SCROLL_TYPE_VERTICAL, 2.4, SCROLL_FLAG_NONE); SetScrollValuator(pDev, 3, SCROLL_TYPE_HORIZONTAL, 3.5, SCROLL_FLAG_PREFERRED); break; case DEVICE_CLOSE: break; default: break; } return Success; #undef NBUTTONS #undef NAXES } /** * Create and init 2 master devices (VCP + VCK) and two slave devices, one * default mouse, one default keyboard. */ struct devices init_devices(void) { ClientRec client; struct devices local_devices; int ret; /* * Put a unique name in display pointer so that when tests are run in * parallel, their xkbcomp outputs to /tmp/server-.xkm don't * stomp on each other. */ #ifdef HAVE_GETPROGNAME display = getprogname(); #elif HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME display = program_invocation_short_name; #endif client = init_client(0, NULL); AllocDevicePair(&client, "Virtual core", &local_devices.vcp, &local_devices.vck, CorePointerProc, CoreKeyboardProc, TRUE); inputInfo.pointer = local_devices.vcp; inputInfo.keyboard = local_devices.vck; ret = ActivateDevice(local_devices.vcp, FALSE); assert(ret == Success); /* This may fail if xkbcomp fails or xkb-config is not found. */ ret = ActivateDevice(local_devices.vck, FALSE); assert(ret == Success); EnableDevice(local_devices.vcp, FALSE); EnableDevice(local_devices.vck, FALSE); AllocDevicePair(&client, "", &local_devices.mouse, &local_devices.kbd, TestPointerProc, CoreKeyboardProc, FALSE); ret = ActivateDevice(local_devices.mouse, FALSE); assert(ret == Success); ret = ActivateDevice(local_devices.kbd, FALSE); assert(ret == Success); EnableDevice(local_devices.mouse, FALSE); EnableDevice(local_devices.kbd, FALSE); local_devices.num_devices = 4; local_devices.num_master_devices = 2; fake_init_sprite(local_devices.mouse); fake_init_sprite(local_devices.vcp); return local_devices; } /* Create minimal client, with the given buffer and len as request buffer */ ClientRec init_client(int len, void *data) { ClientRec client = { 0 }; /* we store the privates now and reassign it after the memset. this way * we can share them across multiple test runs and don't have to worry * about freeing them after each test run. */ client.index = CLIENT_INDEX; client.clientAsMask = CLIENT_MASK; client.sequence = CLIENT_SEQUENCE; client.req_len = len; client.requestBuffer = data; dixAllocatePrivates(&client.devPrivates, PRIVATE_CLIENT); return client; } void init_window(WindowPtr local_window, WindowPtr parent, int id) { memset(local_window, 0, sizeof(*local_window)); local_window->drawable.id = id; if (parent) { local_window->drawable.x = 30; local_window->drawable.y = 50; local_window->drawable.width = 100; local_window->drawable.height = 200; } local_window->parent = parent; local_window->optional = calloc(1, sizeof(WindowOptRec)); assert(local_window->optional); } extern DevPrivateKeyRec miPointerScreenKeyRec; extern DevPrivateKeyRec miPointerPrivKeyRec; /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr local_screen) { return TRUE; } static void device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr local_screen) { } static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr local_screen, int x, int y, Bool event) { return TRUE; } void init_simple(void) { screenInfo.numScreens = 1; screenInfo.screens[0] = &screen; screen.myNum = 0; screen.id = 100; screen.width = 640; screen.height = 480; screen.DeviceCursorInitialize = device_cursor_init; screen.DeviceCursorCleanup = device_cursor_cleanup; screen.SetCursorPosition = set_cursor_pos; screen.root = &root; dixResetPrivates(); InitAtoms(); XkbInitPrivates(); dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)); dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0); dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0); XInputExtensionInit(); init_window(&root, NULL, ROOT_WINDOW_ID); init_window(&window, &root, CLIENT_WINDOW_ID); serverClient = &server_client; InitClient(serverClient, 0, (void *) NULL); if (!InitClientResources(serverClient)) /* for root resources */ FatalError("couldn't init server resources"); SyncExtensionInit(); devices = init_devices(); } void __wrap_WriteToClient(ClientPtr client, int len, void *data) { assert(reply_handler != NULL); (*reply_handler) (client, len, data, global_userdata); } /* dixLookupWindow requires a lot of setup not necessary for this test. * Simple wrapper that returns either one of the fake root window or the * fake client window. If the requested ID is neither of those wanted, * return whatever the real dixLookupWindow does. */ int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access) { if (id == root.drawable.id) { *win = &root; return Success; } else if (id == window.drawable.id) { *win = &window; return Success; } return __real_dixLookupWindow(win, id, client, access); } extern ClientRec client_window; int __wrap_dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { if (rid == ROOT_WINDOW_ID) return BadWindow; if (rid == CLIENT_WINDOW_ID) { *pClient = &client_window; return Success; } return __real_dixLookupClient(pClient, rid, client, access); } xorg-server-21.1.16/test/xi2/protocol-xiqueryversion.c0000644000175000017500000002214114757411105016433 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIQueryVersion request and reply. * * Test approach: * Wrap WriteToClient to intercept the server's reply. * Repeatedly test a client/server version combination, compare version in * reply with versions given. Version must be equal to either * server version or client version, whichever is smaller. * Client version less than 2 must return BadValue. */ #include #include #include #include #include "inputstr.h" #include "extinit.h" /* for XInputExtensionInit */ #include "scrnintstr.h" #include "xiqueryversion.h" #include "protocol-common.h" #include "exglobals.h" extern XExtensionVersion XIVersion; struct test_data { int major_client; int minor_client; int major_server; int minor_server; int major_expected; int minor_expected; }; extern ClientRec client_window; static void reply_XIQueryVersion(ClientPtr client, int len, char *data, void *closure) { xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data; struct test_data *versions = (struct test_data *) closure; unsigned int sver, cver, ver; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); swaps(&rep->major_version); swaps(&rep->minor_version); } reply_check_defaults(rep, len, XIQueryVersion); assert(rep->length == 0); sver = versions->major_server * 1000 + versions->minor_server; cver = versions->major_client * 1000 + versions->minor_client; ver = rep->major_version * 1000 + rep->minor_version; assert(ver >= 2000); assert((sver > cver) ? ver == cver : ver == sver); } static void reply_XIQueryVersion_multiple(ClientPtr client, int len, char *data, void *closure) { xXIQueryVersionReply *rep = (xXIQueryVersionReply *) data; struct test_data *versions = (struct test_data *) closure; reply_check_defaults(rep, len, XIQueryVersion); assert(rep->length == 0); assert(versions->major_expected == rep->major_version); assert(versions->minor_expected == rep->minor_version); } /** * Run a single test with server version smaj.smin and client * version cmaj.cmin. Verify that return code is equal to 'error'. * * Test is run normal, then for a swapped client. */ static void request_XIQueryVersion(int smaj, int smin, int cmaj, int cmin, int error) { int rc; struct test_data versions; xXIQueryVersionReq request; ClientRec client; request_init(&request, XIQueryVersion); client = init_client(request.length, &request); global_userdata = (void *) &versions; /* Change the server to support smaj.smin */ XIVersion.major_version = smaj; XIVersion.minor_version = smin; /* remember versions we send and expect */ versions.major_client = cmaj; versions.minor_client = cmin; versions.major_server = XIVersion.major_version; versions.minor_server = XIVersion.minor_version; request.major_version = versions.major_client; request.minor_version = versions.minor_client; rc = ProcXIQueryVersion(&client); assert(rc == error); client = init_client(request.length, &request); client.swapped = TRUE; swaps(&request.length); swaps(&request.major_version); swaps(&request.minor_version); rc = SProcXIQueryVersion(&client); assert(rc == error); } /* Client version less than 2.0 must return BadValue, all other combinations * Success */ static void test_XIQueryVersion(void) { reply_handler = reply_XIQueryVersion; printf("Server version 2.0 - client versions [1..3].0\n"); /* some simple tests to catch common errors quickly */ request_XIQueryVersion(2, 0, 1, 0, BadValue); request_XIQueryVersion(2, 0, 2, 0, Success); request_XIQueryVersion(2, 0, 3, 0, Success); printf("Server version 3.0 - client versions [1..3].0\n"); request_XIQueryVersion(3, 0, 1, 0, BadValue); request_XIQueryVersion(3, 0, 2, 0, Success); request_XIQueryVersion(3, 0, 3, 0, Success); printf("Server version 2.0 - client versions [1..3].[1..3]\n"); request_XIQueryVersion(2, 0, 1, 1, BadValue); request_XIQueryVersion(2, 0, 2, 2, Success); request_XIQueryVersion(2, 0, 3, 3, Success); printf("Server version 2.2 - client versions [1..3].0\n"); request_XIQueryVersion(2, 2, 1, 0, BadValue); request_XIQueryVersion(2, 2, 2, 0, Success); request_XIQueryVersion(2, 2, 3, 0, Success); #if 0 /* this one takes a while */ unsigned int cmin, cmaj, smin, smaj; printf("Testing all combinations.\n"); for (smaj = 2; smaj <= 0xFFFF; smaj++) for (smin = 0; smin <= 0xFFFF; smin++) for (cmin = 0; cmin <= 0xFFFF; cmin++) for (cmaj = 0; cmaj <= 0xFFFF; cmaj++) { int error = (cmaj < 2) ? BadValue : Success; request_XIQueryVersion(smaj, smin, cmaj, cmin, error); } #endif reply_handler = NULL; } static void test_XIQueryVersion_multiple(void) { xXIQueryVersionReq request; ClientRec client; XIClientPtr pXIClient; struct test_data versions; int rc; request_init(&request, XIQueryVersion); client = init_client(request.length, &request); /* Change the server to support 2.2 */ XIVersion.major_version = 2; XIVersion.minor_version = 2; reply_handler = reply_XIQueryVersion_multiple; global_userdata = (void *) &versions; /* run 1 */ /* client is lower than server, nonexpected */ versions.major_expected = request.major_version = 2; versions.minor_expected = request.minor_version = 1; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* client is higher than server, no change */ request.major_version = 2; request.minor_version = 3; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* client tries to set higher version, stays same */ request.major_version = 2; request.minor_version = 2; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* client tries to set lower version, no change */ request.major_version = 2; request.minor_version = 0; rc = ProcXIQueryVersion(&client); assert(rc == BadValue); /* run 2 */ client = init_client(request.length, &request); XIVersion.major_version = 2; XIVersion.minor_version = 3; versions.major_expected = request.major_version = 2; versions.minor_expected = request.minor_version = 2; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* client bumps version from 2.2 to 2.3 */ request.major_version = 2; versions.minor_expected = request.minor_version = 3; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* real version is changed, too! */ pXIClient = dixLookupPrivate(&client.devPrivates, XIClientPrivateKey); assert(pXIClient->minor_version == 3); /* client tries to set lower version, no change */ request.major_version = 2; request.minor_version = 1; rc = ProcXIQueryVersion(&client); assert(rc == BadValue); /* run 3 */ client = init_client(request.length, &request); XIVersion.major_version = 2; XIVersion.minor_version = 3; versions.major_expected = request.major_version = 2; versions.minor_expected = request.minor_version = 3; rc = ProcXIQueryVersion(&client); assert(rc == Success); request.major_version = 2; versions.minor_expected = request.minor_version = 2; rc = ProcXIQueryVersion(&client); assert(rc == Success); /* but real client version must not be lowered */ pXIClient = dixLookupPrivate(&client.devPrivates, XIClientPrivateKey); assert(pXIClient->minor_version == 3); request.major_version = 2; request.minor_version = 1; rc = ProcXIQueryVersion(&client); assert(rc == BadValue); } int protocol_xiqueryversion_test(void) { init_simple(); test_XIQueryVersion(); test_XIQueryVersion_multiple(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xiquerydevice.c0000644000175000017500000002702014757411105016206 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "inputstr.h" #include "extinit.h" #include "exglobals.h" #include "scrnintstr.h" #include "xkbsrv.h" #include "xiquerydevice.h" #include "protocol-common.h" /* * Protocol testing for XIQueryDevice request and reply. * * Test approach: * Wrap WriteToClient to intercept server's reply. ProcXIQueryDevice returns * data in two batches, once for the request, once for the trailing data * with the device information. * Repeatedly test with varying deviceids and check against data in reply. */ struct test_data { int which_device; int num_devices_in_reply; }; extern ClientRec client_window; static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure); static void reply_XIQueryDevice(ClientPtr client, int len, char *data, void *closure); /* reply handling for the first bytes that constitute the reply */ static void reply_XIQueryDevice(ClientPtr client, int len, char *data, void *userdata) { xXIQueryDeviceReply *rep = (xXIQueryDeviceReply *) data; struct test_data *querydata = (struct test_data *) userdata; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); swaps(&rep->num_devices); } reply_check_defaults(rep, len, XIQueryDevice); if (querydata->which_device == XIAllDevices) assert(rep->num_devices == devices.num_devices); else if (querydata->which_device == XIAllMasterDevices) assert(rep->num_devices == devices.num_master_devices); else assert(rep->num_devices == 1); querydata->num_devices_in_reply = rep->num_devices; reply_handler = reply_XIQueryDevice_data; } /* reply handling for the trailing bytes that constitute the device info */ static void reply_XIQueryDevice_data(ClientPtr client, int len, char *data, void *closure) { int i, j; struct test_data *querydata = (struct test_data *) closure; DeviceIntPtr dev; xXIDeviceInfo *info = (xXIDeviceInfo *) data; xXIAnyInfo *any; for (i = 0; i < querydata->num_devices_in_reply; i++) { if (client->swapped) { swaps(&info->deviceid); swaps(&info->attachment); swaps(&info->use); swaps(&info->num_classes); swaps(&info->name_len); } if (querydata->which_device > XIAllMasterDevices) assert(info->deviceid == querydata->which_device); assert(info->deviceid >= 2); /* 0 and 1 is reserved */ switch (info->deviceid) { case 2: /* VCP */ dev = devices.vcp; assert(info->use == XIMasterPointer); assert(info->attachment == devices.vck->id); assert(info->num_classes == 3); /* 2 axes + button */ break; case 3: /* VCK */ dev = devices.vck; assert(info->use == XIMasterKeyboard); assert(info->attachment == devices.vcp->id); assert(info->num_classes == 1); break; case 4: /* mouse */ dev = devices.mouse; assert(info->use == XISlavePointer); assert(info->attachment == devices.vcp->id); assert(info->num_classes == 7); /* 4 axes + button + 2 scroll */ break; case 5: /* keyboard */ dev = devices.kbd; assert(info->use == XISlaveKeyboard); assert(info->attachment == devices.vck->id); assert(info->num_classes == 1); break; default: /* We shouldn't get here */ assert(0); break; } assert(info->enabled == dev->enabled); assert(info->name_len == strlen(dev->name)); assert(strncmp((char *) &info[1], dev->name, info->name_len) == 0); any = (xXIAnyInfo *) ((char *) &info[1] + ((info->name_len + 3) / 4) * 4); for (j = 0; j < info->num_classes; j++) { if (client->swapped) { swaps(&any->type); swaps(&any->length); swaps(&any->sourceid); } switch (info->deviceid) { case 3: /* VCK and kbd have the same properties */ case 5: { int k; xXIKeyInfo *ki = (xXIKeyInfo *) any; XkbDescPtr xkb = devices.vck->key->xkbInfo->desc; uint32_t *kc; if (client->swapped) swaps(&ki->num_keycodes); assert(any->type == XIKeyClass); assert(ki->num_keycodes == (xkb->max_key_code - xkb->min_key_code + 1)); assert(any->length == (2 + ki->num_keycodes)); kc = (uint32_t *) &ki[1]; for (k = 0; k < ki->num_keycodes; k++, kc++) { if (client->swapped) swapl(kc); assert(*kc >= xkb->min_key_code); assert(*kc <= xkb->max_key_code); } break; } case 4: { assert(any->type == XIButtonClass || any->type == XIValuatorClass || any->type == XIScrollClass); if (any->type == XIScrollClass) { xXIScrollInfo *si = (xXIScrollInfo *) any; if (client->swapped) { swaps(&si->number); swaps(&si->scroll_type); swapl(&si->increment.integral); swapl(&si->increment.frac); } assert(si->length == 6); assert(si->number == 2 || si->number == 3); if (si->number == 2) { assert(si->scroll_type == XIScrollTypeVertical); assert(!si->flags); } if (si->number == 3) { assert(si->scroll_type == XIScrollTypeHorizontal); assert(si->flags & XIScrollFlagPreferred); assert(!(si->flags & ~XIScrollFlagPreferred)); } assert(si->increment.integral == si->number); /* protocol-common.c sets up increments of 2.4 and 3.5 */ assert(si->increment.frac > 0.3 * (1ULL << 32)); assert(si->increment.frac < 0.6 * (1ULL << 32)); } } /* fall through */ case 2: /* VCP and mouse have the same properties except for scroll */ { if (info->deviceid == 2) /* VCP */ assert(any->type == XIButtonClass || any->type == XIValuatorClass); if (any->type == XIButtonClass) { int l; xXIButtonInfo *bi = (xXIButtonInfo *) any; if (client->swapped) swaps(&bi->num_buttons); assert(bi->num_buttons == devices.vcp->button->numButtons); l = 2 + bi->num_buttons + bytes_to_int32(bits_to_bytes(bi->num_buttons)); assert(bi->length == l); } else if (any->type == XIValuatorClass) { xXIValuatorInfo *vi = (xXIValuatorInfo *) any; if (client->swapped) { swaps(&vi->number); swapl(&vi->label); swapl(&vi->min.integral); swapl(&vi->min.frac); swapl(&vi->max.integral); swapl(&vi->max.frac); swapl(&vi->resolution); } assert(vi->length == 11); assert(vi->number >= 0); assert(vi->number < 4); if (info->deviceid == 2) /* VCP */ assert(vi->number < 2); assert(vi->mode == XIModeRelative); /* device was set up as relative, so standard * values here. */ assert(vi->min.integral == -1); assert(vi->min.frac == 0); assert(vi->max.integral == -1); assert(vi->max.frac == 0); assert(vi->resolution == 0); } } break; } any = (xXIAnyInfo *) (((char *) any) + any->length * 4); } info = (xXIDeviceInfo *) any; } } static void request_XIQueryDevice(struct test_data *querydata, int deviceid, int error) { int rc; ClientRec client; xXIQueryDeviceReq request; request_init(&request, XIQueryDevice); client = init_client(request.length, &request); reply_handler = reply_XIQueryDevice; querydata->which_device = deviceid; request.deviceid = deviceid; rc = ProcXIQueryDevice(&client); assert(rc == error); if (rc != Success) assert(client.errorValue == deviceid); reply_handler = reply_XIQueryDevice; client.swapped = TRUE; swaps(&request.length); swaps(&request.deviceid); rc = SProcXIQueryDevice(&client); assert(rc == error); if (rc != Success) assert(client.errorValue == deviceid); } static void test_XIQueryDevice(void) { int i; xXIQueryDeviceReq request; struct test_data data; reply_handler = reply_XIQueryDevice; global_userdata = &data; request_init(&request, XIQueryDevice); printf("Testing XIAllDevices.\n"); request_XIQueryDevice(&data, XIAllDevices, Success); printf("Testing XIAllMasterDevices.\n"); request_XIQueryDevice(&data, XIAllMasterDevices, Success); printf("Testing existing device ids.\n"); for (i = 2; i < 6; i++) request_XIQueryDevice(&data, i, Success); printf("Testing non-existing device ids.\n"); for (i = 6; i <= 0xFFFF; i++) request_XIQueryDevice(&data, i, BadDevice); reply_handler = NULL; } int protocol_xiquerydevice_test(void) { init_simple(); test_XIQueryDevice(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xiselectevents.c0000644000175000017500000002611014757411105016364 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XISelectEvents request. * * Test approach: * * Wrap XISetEventMask to intercept when the server tries to apply the event * mask. Ensure that the mask passed in is equivalent to the one supplied by * the client. Ensure that invalid devices and invalid masks return errors * as appropriate. * * Tests included: * BadValue for num_masks < 0 * BadWindow for invalid windows * BadDevice for non-existing devices * BadImplemenation for devices >= 0xFF * BadValue if HierarchyChanged bit is set for devices other than * XIAllDevices * BadValue for invalid mask bits * Sucecss for excessive mask lengths * */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "extinit.h" /* for XInputExtensionInit */ #include "scrnintstr.h" #include "exglobals.h" #include "xiselectev.h" #include "protocol-common.h" static unsigned char *data[4096 * 20]; /* the request data buffer */ extern ClientRec client_window; int __real_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, int len, unsigned char *mask); int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, int len, unsigned char *mask) { if (!enable_XISetEventMask_wrap) return __real_XISetEventMask(dev, win, client, len, mask); return Success; } static void request_XISelectEvent(xXISelectEventsReq * req, int error) { int i; int rc; ClientRec client; xXIEventMask *mask, *next; req->length = (sz_xXISelectEventsReq / 4); mask = (xXIEventMask *) &req[1]; for (i = 0; i < req->num_masks; i++) { req->length += sizeof(xXIEventMask) / 4 + mask->mask_len; mask = (xXIEventMask *) ((char *) &mask[1] + mask->mask_len * 4); } client = init_client(req->length, req); rc = ProcXISelectEvents(&client); assert(rc == error); client.swapped = TRUE; mask = (xXIEventMask *) &req[1]; for (i = 0; i < req->num_masks; i++) { next = (xXIEventMask *) ((char *) &mask[1] + mask->mask_len * 4); swaps(&mask->deviceid); swaps(&mask->mask_len); mask = next; } swapl(&req->win); swaps(&req->length); swaps(&req->num_masks); rc = SProcXISelectEvents(&client); assert(rc == error); } static void _set_bit(unsigned char *bits, int bit) { SetBit(bits, bit); if (bit >= XI_TouchBegin && bit <= XI_TouchOwnership) { SetBit(bits, XI_TouchBegin); SetBit(bits, XI_TouchUpdate); SetBit(bits, XI_TouchEnd); } if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) { SetBit(bits, XI_GesturePinchBegin); SetBit(bits, XI_GesturePinchUpdate); SetBit(bits, XI_GesturePinchEnd); } if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) { SetBit(bits, XI_GestureSwipeBegin); SetBit(bits, XI_GestureSwipeUpdate); SetBit(bits, XI_GestureSwipeEnd); } } static void _clear_bit(unsigned char *bits, int bit) { ClearBit(bits, bit); if (bit >= XI_TouchBegin && bit <= XI_TouchOwnership) { ClearBit(bits, XI_TouchBegin); ClearBit(bits, XI_TouchUpdate); ClearBit(bits, XI_TouchEnd); } if (bit >= XI_GesturePinchBegin && bit <= XI_GesturePinchEnd) { ClearBit(bits, XI_GesturePinchBegin); ClearBit(bits, XI_GesturePinchUpdate); ClearBit(bits, XI_GesturePinchEnd); } if (bit >= XI_GestureSwipeBegin && bit <= XI_GestureSwipeEnd) { ClearBit(bits, XI_GestureSwipeBegin); ClearBit(bits, XI_GestureSwipeUpdate); ClearBit(bits, XI_GestureSwipeEnd); } } static void request_XISelectEvents_masks(xXISelectEventsReq * req) { int i, j; xXIEventMask *mask; int nmasks = XI2MASKSIZE; unsigned char *bits; mask = (xXIEventMask *) &req[1]; req->win = ROOT_WINDOW_ID; /* if a clients submits more than 100 masks, consider it insane and untested */ for (i = 1; i <= 1000; i++) { req->num_masks = i; mask->deviceid = XIAllDevices; /* Test 0: * mask_len is 0 -> Success */ mask->mask_len = 0; request_XISelectEvent(req, Success); /* Test 1: * mask may be larger than needed for XI2LASTEVENT. * Test setting each valid mask bit, while leaving unneeded bits 0. * -> Success */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4 * 10; memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI2LASTEVENT; j++) { _set_bit(bits, j); request_XISelectEvent(req, Success); _clear_bit(bits, j); } /* Test 2: * mask may be larger than needed for XI2LASTEVENT. * Test setting all valid mask bits, while leaving unneeded bits 0. * -> Success */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4 * 10; memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI2LASTEVENT; j++) { _set_bit(bits, j); request_XISelectEvent(req, Success); } /* Test 3: * mask is larger than needed for XI2LASTEVENT. If any unneeded bit * is set -> BadValue */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4 * 10; memset(bits, 0, mask->mask_len * 4); for (j = XI2LASTEVENT + 1; j < mask->mask_len * 4; j++) { _set_bit(bits, j); request_XISelectEvent(req, BadValue); _clear_bit(bits, j); } /* Test 4: * Mask len is a sensible length, only valid bits are set -> Success */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4; memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI2LASTEVENT; j++) { _set_bit(bits, j); request_XISelectEvent(req, Success); } /* Test 5: * Mask len is 1 and XI_GestureSwipeEnd is set outside the mask. * That bit should be ignored -> Success */ bits = (unsigned char *) &mask[1]; mask->mask_len = 1; memset(bits, 0, 5); SetBit(bits, XI_ButtonPress); // does not matter which one SetBit(bits, XI_GestureSwipeEnd); request_XISelectEvent(req, Success); /* Test 6: * HierarchyChanged bit is BadValue for devices other than * XIAllDevices */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4; memset(bits, 0, mask->mask_len * 4); SetBit(bits, XI_HierarchyChanged); mask->deviceid = XIAllDevices; request_XISelectEvent(req, Success); for (j = 1; j < devices.num_devices; j++) { mask->deviceid = j; request_XISelectEvent(req, BadValue); } /* Test 7: * All bits set minus hierarchy changed bit -> Success */ bits = (unsigned char *) &mask[1]; mask->mask_len = (nmasks + 3) / 4; memset(bits, 0, mask->mask_len * 4); for (j = 0; j <= XI2LASTEVENT; j++) _set_bit(bits, j); _clear_bit(bits, XI_HierarchyChanged); for (j = 1; j < 6; j++) { mask->deviceid = j; request_XISelectEvent(req, Success); } mask = (xXIEventMask *) ((char *) mask + sizeof(xXIEventMask) + mask->mask_len * 4); } } static void test_XISelectEvents(void) { int i; xXIEventMask *mask; xXISelectEventsReq *req; req = (xXISelectEventsReq *) data; request_init(req, XISelectEvents); printf("Testing for BadValue on zero-length masks\n"); /* zero masks are BadValue, regardless of the window */ req->num_masks = 0; req->win = None; request_XISelectEvent(req, BadValue); req->win = ROOT_WINDOW_ID; request_XISelectEvent(req, BadValue); req->win = CLIENT_WINDOW_ID; request_XISelectEvent(req, BadValue); printf("Testing for BadWindow.\n"); /* None window is BadWindow, regardless of the masks. * We don't actually need to set the masks here, BadWindow must occur * before checking the masks. */ req->win = None; req->num_masks = 1; request_XISelectEvent(req, BadWindow); req->num_masks = 2; request_XISelectEvent(req, BadWindow); req->num_masks = 0xFF; request_XISelectEvent(req, BadWindow); /* request size is 3, so 0xFFFC is the highest num_mask that doesn't * overflow req->length */ req->num_masks = 0xFFFC; request_XISelectEvent(req, BadWindow); printf("Triggering num_masks/length overflow\n"); req->win = ROOT_WINDOW_ID; /* Integer overflow - req->length can't hold that much */ req->num_masks = 0xFFFF; request_XISelectEvent(req, BadLength); req->win = ROOT_WINDOW_ID; req->num_masks = 1; printf("Triggering bogus mask length error\n"); mask = (xXIEventMask *) &req[1]; mask->deviceid = 0; mask->mask_len = 0xFFFF; request_XISelectEvent(req, BadLength); /* testing various device ids */ printf("Testing existing device ids.\n"); for (i = 0; i < 6; i++) { mask = (xXIEventMask *) &req[1]; mask->deviceid = i; mask->mask_len = 1; req->win = ROOT_WINDOW_ID; req->num_masks = 1; request_XISelectEvent(req, Success); } printf("Testing non-existing device ids.\n"); for (i = 6; i <= 0xFFFF; i++) { req->win = ROOT_WINDOW_ID; req->num_masks = 1; mask = (xXIEventMask *) &req[1]; mask->deviceid = i; mask->mask_len = 1; request_XISelectEvent(req, BadDevice); } request_XISelectEvents_masks(req); } int protocol_xiselectevents_test(void) { init_simple(); test_XISelectEvents(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xigetselectedevents.c0000644000175000017500000001466514757411105017411 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIGetSelectedEvents request. * * Tests include: * BadWindow on wrong window. * Zero-length masks if no masks are set. * Valid masks for valid devices. * Masks set on non-existent devices are not returned. * * Note that this test is not connected to the XISelectEvents request. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "extinit.h" /* for XInputExtensionInit */ #include "scrnintstr.h" #include "xiselectev.h" #include "exevents.h" #include "protocol-common.h" static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, void *userdata); static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data, void *userdata); static struct { int num_masks_expected; unsigned char mask[MAXDEVICES][XI2LASTEVENT]; /* intentionally bigger */ int mask_len; } test_data; extern ClientRec client_window; /* AddResource is called from XISetSEventMask, we don't need this */ Bool __wrap_AddResource(XID id, RESTYPE type, void *value) { return TRUE; } static void reply_XIGetSelectedEvents(ClientPtr client, int len, char *data, void *userdata) { xXIGetSelectedEventsReply *rep = (xXIGetSelectedEventsReply *) data; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); swaps(&rep->num_masks); } reply_check_defaults(rep, len, XIGetSelectedEvents); assert(rep->num_masks == test_data.num_masks_expected); reply_handler = reply_XIGetSelectedEvents_data; } static void reply_XIGetSelectedEvents_data(ClientPtr client, int len, char *data, void *userdata) { int i; xXIEventMask *mask; unsigned char *bitmask; mask = (xXIEventMask *) data; for (i = 0; i < test_data.num_masks_expected; i++) { if (client->swapped) { swaps(&mask->deviceid); swaps(&mask->mask_len); } assert(mask->deviceid < 6); assert(mask->mask_len <= (((XI2LASTEVENT + 8) / 8) + 3) / 4); bitmask = (unsigned char *) &mask[1]; assert(memcmp(bitmask, test_data.mask[mask->deviceid], mask->mask_len * 4) == 0); mask = (xXIEventMask *) ((char *) mask + mask->mask_len * 4 + sizeof(xXIEventMask)); } } static void request_XIGetSelectedEvents(xXIGetSelectedEventsReq * req, int error) { int rc; ClientRec client; client = init_client(req->length, req); reply_handler = reply_XIGetSelectedEvents; rc = ProcXIGetSelectedEvents(&client); assert(rc == error); reply_handler = reply_XIGetSelectedEvents; client.swapped = TRUE; swapl(&req->win); swaps(&req->length); rc = SProcXIGetSelectedEvents(&client); assert(rc == error); } static void test_XIGetSelectedEvents(void) { int i, j; xXIGetSelectedEventsReq request; ClientRec client = init_client(0, NULL); unsigned char *mask; DeviceIntRec dev; request_init(&request, XIGetSelectedEvents); printf("Testing for BadWindow on invalid window.\n"); request.win = None; request_XIGetSelectedEvents(&request, BadWindow); printf("Testing for zero-length (unset) masks.\n"); /* No masks set yet */ test_data.num_masks_expected = 0; request.win = ROOT_WINDOW_ID; request_XIGetSelectedEvents(&request, Success); request.win = CLIENT_WINDOW_ID; request_XIGetSelectedEvents(&request, Success); memset(test_data.mask, 0, sizeof(test_data.mask)); printf("Testing for valid masks\n"); memset(&dev, 0, sizeof(dev)); /* dev->id is enough for XISetEventMask */ request.win = ROOT_WINDOW_ID; /* devices 6 - MAXDEVICES don't exist, they mustn't be included in the * reply even if a mask is set */ for (j = 0; j < MAXDEVICES; j++) { test_data.num_masks_expected = min(j + 1, devices.num_devices + 2); dev.id = j; mask = test_data.mask[j]; /* bits one-by-one */ for (i = 0; i < XI2LASTEVENT; i++) { SetBit(mask, i); XISetEventMask(&dev, &root, &client, (i + 8) / 8, mask); request_XIGetSelectedEvents(&request, Success); ClearBit(mask, i); } /* all valid mask bits */ for (i = 0; i < XI2LASTEVENT; i++) { SetBit(mask, i); XISetEventMask(&dev, &root, &client, (i + 8) / 8, mask); request_XIGetSelectedEvents(&request, Success); } } printf("Testing removing all masks\n"); /* Unset all masks one-by-one */ for (j = MAXDEVICES - 1; j >= 0; j--) { if (j < devices.num_devices + 2) test_data.num_masks_expected--; mask = test_data.mask[j]; memset(mask, 0, XI2LASTEVENT); dev.id = j; XISetEventMask(&dev, &root, &client, 0, NULL); request_XIGetSelectedEvents(&request, Success); } } int protocol_xigetselectedevents_test(void) { init_simple(); enable_GrabButton_wrap = 0; enable_XISetEventMask_wrap = 0; test_XIGetSelectedEvents(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xisetclientpointer.c0000644000175000017500000000764514757411105017267 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XISetClientPointer request. * * Tests include: * BadDevice of all devices except master pointers. * Success for a valid window. * Success for window None. * BadWindow for invalid windows. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "extinit.h" /* for XInputExtensionInit */ #include "scrnintstr.h" #include "xisetclientpointer.h" #include "exevents.h" #include "exglobals.h" #include "protocol-common.h" extern ClientRec client_window; static ClientRec client_request; static void request_XISetClientPointer(xXISetClientPointerReq * req, int error) { int rc; client_request = init_client(req->length, req); rc = ProcXISetClientPointer(&client_request); assert(rc == error); if (rc == BadDevice) assert(client_request.errorValue == req->deviceid); client_request.swapped = TRUE; swapl(&req->win); swaps(&req->length); swaps(&req->deviceid); rc = SProcXISetClientPointer(&client_request); assert(rc == error); if (rc == BadDevice) assert(client_request.errorValue == req->deviceid); } static void test_XISetClientPointer(void) { int i; xXISetClientPointerReq request; request_init(&request, XISetClientPointer); request.win = CLIENT_WINDOW_ID; printf("Testing BadDevice error for XIAllDevices and XIMasterDevices.\n"); request.deviceid = XIAllDevices; request_XISetClientPointer(&request, BadDevice); request.deviceid = XIAllMasterDevices; request_XISetClientPointer(&request, BadDevice); printf("Testing Success for VCP and VCK.\n"); request.deviceid = devices.vcp->id; /* 2 */ request_XISetClientPointer(&request, Success); assert(client_window.clientPtr->id == 2); request.deviceid = devices.vck->id; /* 3 */ request_XISetClientPointer(&request, Success); assert(client_window.clientPtr->id == 2); printf("Testing BadDevice error for all other devices.\n"); for (i = 4; i <= 0xFFFF; i++) { request.deviceid = i; request_XISetClientPointer(&request, BadDevice); } printf("Testing window None\n"); request.win = None; request.deviceid = devices.vcp->id; /* 2 */ request_XISetClientPointer(&request, Success); assert(client_request.clientPtr->id == 2); printf("Testing invalid window\n"); request.win = INVALID_WINDOW_ID; request.deviceid = devices.vcp->id; request_XISetClientPointer(&request, BadWindow); } int protocol_xisetclientpointer_test(void) { init_simple(); client_window = init_client(0, NULL); test_XISetClientPointer(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xigetclientpointer.c0000644000175000017500000001054514757411105017244 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIGetClientPointer request. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "xigetclientpointer.h" #include "exevents.h" #include "protocol-common.h" static struct { int cp_is_set; DeviceIntPtr dev; int win; } test_data; extern ClientRec client_window; static ClientRec client_request; static void reply_XIGetClientPointer(ClientPtr client, int len, char *data, void *userdata) { xXIGetClientPointerReply *rep = (xXIGetClientPointerReply *) data; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); swaps(&rep->deviceid); } reply_check_defaults(rep, len, XIGetClientPointer); assert(rep->set == test_data.cp_is_set); if (rep->set) assert(rep->deviceid == test_data.dev->id); } static void request_XIGetClientPointer(ClientPtr client, xXIGetClientPointerReq * req, int error) { int rc; test_data.win = req->win; rc = ProcXIGetClientPointer(&client_request); assert(rc == error); if (rc == BadWindow) assert(client_request.errorValue == req->win); client_request.swapped = TRUE; swapl(&req->win); swaps(&req->length); rc = SProcXIGetClientPointer(&client_request); assert(rc == error); if (rc == BadWindow) assert(client_request.errorValue == req->win); } static void test_XIGetClientPointer(void) { xXIGetClientPointerReq request; request_init(&request, XIGetClientPointer); request.win = CLIENT_WINDOW_ID; reply_handler = reply_XIGetClientPointer; client_request = init_client(request.length, &request); printf("Testing invalid window\n"); request.win = INVALID_WINDOW_ID; request_XIGetClientPointer(&client_request, &request, BadWindow); printf("Testing invalid length\n"); client_request.req_len -= 4; request_XIGetClientPointer(&client_request, &request, BadLength); client_request.req_len += 4; test_data.cp_is_set = FALSE; printf("Testing window None, unset ClientPointer.\n"); request.win = None; request_XIGetClientPointer(&client_request, &request, Success); printf("Testing valid window, unset ClientPointer.\n"); request.win = CLIENT_WINDOW_ID; request_XIGetClientPointer(&client_request, &request, Success); printf("Testing valid window, set ClientPointer.\n"); client_window.clientPtr = devices.vcp; test_data.dev = devices.vcp; test_data.cp_is_set = TRUE; request.win = CLIENT_WINDOW_ID; request_XIGetClientPointer(&client_request, &request, Success); client_window.clientPtr = NULL; printf("Testing window None, set ClientPointer.\n"); client_request.clientPtr = devices.vcp; test_data.dev = devices.vcp; test_data.cp_is_set = TRUE; request.win = None; request_XIGetClientPointer(&client_request, &request, Success); } int protocol_xigetclientpointer_test(void) { init_simple(); client_window = init_client(0, NULL); test_XIGetClientPointer(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xiquerypointer.c0000644000175000017500000001330014757411105016423 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIQueryPointer request. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "xiquerypointer.h" #include "exevents.h" #include "exglobals.h" #include "protocol-common.h" extern ClientRec client_window; static ClientRec client_request; static void reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *closure); static struct { DeviceIntPtr dev; WindowPtr win; } test_data; static void reply_XIQueryPointer(ClientPtr client, int len, char *data, void *closure) { xXIQueryPointerReply *rep = (xXIQueryPointerReply *) data; SpritePtr sprite; if (!rep->repType) return; if (client->swapped) { swapl(&rep->length); swaps(&rep->sequenceNumber); swapl(&rep->root); swapl(&rep->child); swapl(&rep->root_x); swapl(&rep->root_y); swapl(&rep->win_x); swapl(&rep->win_y); swaps(&rep->buttons_len); } reply_check_defaults(rep, len, XIQueryPointer); assert(rep->root == root.drawable.id); assert(rep->same_screen == xTrue); sprite = test_data.dev->spriteInfo->sprite; assert((rep->root_x >> 16) == sprite->hot.x); assert((rep->root_y >> 16) == sprite->hot.y); if (test_data.win == &root) { assert(rep->root_x == rep->win_x); assert(rep->root_y == rep->win_y); assert(rep->child == window.drawable.id); } else { int x, y; x = sprite->hot.x - window.drawable.x; y = sprite->hot.y - window.drawable.y; assert((rep->win_x >> 16) == x); assert((rep->win_y >> 16) == y); assert(rep->child == None); } assert(rep->same_screen == xTrue); reply_handler = reply_XIQueryPointer_data; } static void reply_XIQueryPointer_data(ClientPtr client, int len, char *data, void *closure) { reply_handler = reply_XIQueryPointer; } static void request_XIQueryPointer(ClientPtr client, xXIQueryPointerReq * req, int error) { int rc; rc = ProcXIQueryPointer(&client_request); assert(rc == error); if (rc == BadDevice) assert(client_request.errorValue == req->deviceid); client_request.swapped = TRUE; swaps(&req->deviceid); swapl(&req->win); swaps(&req->length); rc = SProcXIQueryPointer(&client_request); assert(rc == error); if (rc == BadDevice) assert(client_request.errorValue == req->deviceid); } static void test_XIQueryPointer(void) { int i; xXIQueryPointerReq request; memset(&request, 0, sizeof(request)); request_init(&request, XIQueryPointer); reply_handler = reply_XIQueryPointer; client_request = init_client(request.length, &request); request.deviceid = XIAllDevices; request_XIQueryPointer(&client_request, &request, BadDevice); request.deviceid = XIAllMasterDevices; request_XIQueryPointer(&client_request, &request, BadDevice); request.win = root.drawable.id; test_data.win = &root; test_data.dev = devices.vcp; request.deviceid = devices.vcp->id; request_XIQueryPointer(&client_request, &request, Success); request.deviceid = devices.vck->id; request_XIQueryPointer(&client_request, &request, BadDevice); request.deviceid = devices.mouse->id; request_XIQueryPointer(&client_request, &request, BadDevice); request.deviceid = devices.kbd->id; request_XIQueryPointer(&client_request, &request, BadDevice); test_data.dev = devices.mouse; devices.mouse->master = NULL; /* Float, kind-of */ request.deviceid = devices.mouse->id; request_XIQueryPointer(&client_request, &request, Success); for (i = devices.kbd->id + 1; i <= 0xFFFF; i++) { request.deviceid = i; request_XIQueryPointer(&client_request, &request, BadDevice); } request.win = window.drawable.id; test_data.dev = devices.vcp; test_data.win = &window; request.deviceid = devices.vcp->id; request_XIQueryPointer(&client_request, &request, Success); test_data.dev = devices.mouse; request.deviceid = devices.mouse->id; request_XIQueryPointer(&client_request, &request, Success); /* test REQUEST_SIZE_MATCH */ client_request.req_len -= 4; request_XIQueryPointer(&client_request, &request, BadLength); } int protocol_xiquerypointer_test(void) { init_simple(); test_XIQueryPointer(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xipassivegrabdevice.c0000644000175000017500000001776714757411105017370 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIPassiveGrab request. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "xipassivegrab.h" #include "exevents.h" #include "exglobals.h" #include "protocol-common.h" extern ClientRec client_window; static ClientRec client_request; #define N_MODS 7 static uint32_t modifiers[N_MODS] = { 1, 2, 3, 4, 5, 6, 7 }; static struct test_data { int num_modifiers; } testdata; int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int button, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask); int __real_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int button, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask); static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *closure); int __wrap_GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int button, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask) { if (!enable_GrabButton_wrap) __real_GrabButton(client, dev, modifier_device, button, param, grabtype, mask); /* Fail every odd modifier */ if (param->modifiers % 2) return BadAccess; return Success; } static void reply_XIPassiveGrabDevice(ClientPtr client, int len, char *data, void *closure) { xXIPassiveGrabDeviceReply *rep = (xXIPassiveGrabDeviceReply *) data; if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_modifiers); testdata.num_modifiers = rep->num_modifiers; } reply_check_defaults(rep, len, XIPassiveGrabDevice); /* ProcXIPassiveGrabDevice sends the data in two batches, let the second * handler handle the modifier data */ if (rep->num_modifiers > 0) reply_handler = reply_XIPassiveGrabDevice_data; } static void reply_XIPassiveGrabDevice_data(ClientPtr client, int len, char *data, void *closure) { int i; xXIGrabModifierInfo *mods = (xXIGrabModifierInfo *) data; for (i = 0; i < testdata.num_modifiers; i++, mods++) { if (client->swapped) swapl(&mods->modifiers); /* 1 - 7 is the range we use for the global modifiers array * above */ assert(mods->modifiers > 0); assert(mods->modifiers <= 7); assert(mods->modifiers % 2 == 1); /* because we fail odd ones */ assert(mods->status != Success); assert(mods->pad0 == 0); assert(mods->pad1 == 0); } reply_handler = reply_XIPassiveGrabDevice; } static void request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req, int error, int errval) { int rc; int local_modifiers; int mask_len; client_request.req_len = req->length; rc = ProcXIPassiveGrabDevice(&client_request); assert(rc == error); if (rc != Success) assert(client_request.errorValue == errval); client_request.swapped = TRUE; swaps(&req->length); swapl(&req->time); swapl(&req->grab_window); swapl(&req->cursor); swapl(&req->detail); swaps(&req->deviceid); local_modifiers = req->num_modifiers; swaps(&req->num_modifiers); mask_len = req->mask_len; swaps(&req->mask_len); while (local_modifiers--) { CARD32 *mod = (CARD32 *) (req + 1) + mask_len + local_modifiers; swapl(mod); } rc = SProcXIPassiveGrabDevice(&client_request); assert(rc == error); if (rc != Success) assert(client_request.errorValue == errval); } static unsigned char *data[4096]; /* the request buffer */ static void test_XIPassiveGrabDevice(void) { int i; xXIPassiveGrabDeviceReq *request = (xXIPassiveGrabDeviceReq *) data; unsigned char *mask; request_init(request, XIPassiveGrabDevice); request->grab_window = CLIENT_WINDOW_ID; reply_handler = reply_XIPassiveGrabDevice; client_request = init_client(request->length, request); printf("Testing invalid device\n"); request->deviceid = 12; request_XIPassiveGrabDevice(&client_request, request, BadDevice, request->deviceid); printf("Testing invalid length\n"); request->length -= 2; request_XIPassiveGrabDevice(&client_request, request, BadLength, client_request.errorValue); /* re-init request since swapped length test leaves some values swapped */ request_init(request, XIPassiveGrabDevice); request->grab_window = CLIENT_WINDOW_ID; request->deviceid = XIAllMasterDevices; printf("Testing invalid grab types\n"); for (i = XIGrabtypeGestureSwipeBegin + 1; i < 0xFF; i++) { request->grab_type = i; request_XIPassiveGrabDevice(&client_request, request, BadValue, request->grab_type); } printf("Testing invalid grab type + detail combinations\n"); request->grab_type = XIGrabtypeEnter; request->detail = 1; request_XIPassiveGrabDevice(&client_request, request, BadValue, request->detail); request->grab_type = XIGrabtypeFocusIn; request_XIPassiveGrabDevice(&client_request, request, BadValue, request->detail); request->detail = 0; printf("Testing invalid masks\n"); mask = (unsigned char *) &request[1]; request->mask_len = bytes_to_int32(XI2LASTEVENT + 1); request->length += request->mask_len; SetBit(mask, XI2LASTEVENT + 1); request_XIPassiveGrabDevice(&client_request, request, BadValue, XI2LASTEVENT + 1); ClearBit(mask, XI2LASTEVENT + 1); /* tested all special cases now, test a few valid cases */ /* no modifiers */ request->deviceid = XIAllDevices; request->grab_type = XIGrabtypeButton; request->detail = XIAnyButton; request_XIPassiveGrabDevice(&client_request, request, Success, 0); /* Set a few random masks to make sure we handle modifiers correctly */ SetBit(mask, XI_ButtonPress); SetBit(mask, XI_KeyPress); SetBit(mask, XI_Enter); /* some modifiers */ request->num_modifiers = N_MODS; request->length += N_MODS; memcpy((uint32_t *) (request + 1) + request->mask_len, modifiers, sizeof(modifiers)); request_XIPassiveGrabDevice(&client_request, request, Success, 0); } int protocol_xipassivegrabdevice_test(void) { init_simple(); test_XIPassiveGrabDevice(); return 0; } xorg-server-21.1.16/test/xi2/protocol-xiwarppointer.c0000644000175000017500000001344014757411105016234 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif /* * Protocol testing for XIWarpPointer request. */ #include #include #include #include #include "inputstr.h" #include "windowstr.h" #include "scrnintstr.h" #include "xiwarppointer.h" #include "exevents.h" #include "exglobals.h" #include "protocol-common.h" static int expected_x = SPRITE_X; static int expected_y = SPRITE_Y; extern ClientRec client_window; /** * This function overrides the one in the screen rec. */ static Bool ScreenSetCursorPosition(DeviceIntPtr dev, ScreenPtr scr, int x, int y, Bool generateEvent) { assert(x == expected_x); assert(y == expected_y); return TRUE; } static void request_XIWarpPointer(ClientPtr client, xXIWarpPointerReq * req, int error) { int rc; rc = ProcXIWarpPointer(client); assert(rc == error); if (rc == BadDevice) assert(client->errorValue == req->deviceid); else if (rc == BadWindow) assert(client->errorValue == req->dst_win || client->errorValue == req->src_win); client->swapped = TRUE; swapl(&req->src_win); swapl(&req->dst_win); swapl(&req->src_x); swapl(&req->src_y); swapl(&req->dst_x); swapl(&req->dst_y); swaps(&req->src_width); swaps(&req->src_height); swaps(&req->deviceid); rc = SProcXIWarpPointer(client); assert(rc == error); if (rc == BadDevice) assert(client->errorValue == req->deviceid); else if (rc == BadWindow) assert(client->errorValue == req->dst_win || client->errorValue == req->src_win); client->swapped = FALSE; } static void test_XIWarpPointer(void) { int i; ClientRec client_request; xXIWarpPointerReq request; memset(&request, 0, sizeof(request)); request_init(&request, XIWarpPointer); client_request = init_client(request.length, &request); request.deviceid = XIAllDevices; request_XIWarpPointer(&client_request, &request, BadDevice); request.deviceid = XIAllMasterDevices; request_XIWarpPointer(&client_request, &request, BadDevice); request.src_win = root.drawable.id; request.dst_win = root.drawable.id; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); request.deviceid = devices.vck->id; request_XIWarpPointer(&client_request, &request, BadDevice); request.deviceid = devices.mouse->id; request_XIWarpPointer(&client_request, &request, BadDevice); request.deviceid = devices.kbd->id; request_XIWarpPointer(&client_request, &request, BadDevice); devices.mouse->master = NULL; /* Float, kind-of */ request.deviceid = devices.mouse->id; request_XIWarpPointer(&client_request, &request, Success); for (i = devices.kbd->id + 1; i <= 0xFFFF; i++) { request.deviceid = i; request_XIWarpPointer(&client_request, &request, BadDevice); } request.src_win = window.drawable.id; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); request.deviceid = devices.mouse->id; request_XIWarpPointer(&client_request, &request, Success); request.src_win = root.drawable.id; request.dst_win = 0xFFFF; /* invalid window */ request_XIWarpPointer(&client_request, &request, BadWindow); request.src_win = 0xFFFF; /* invalid window */ request.dst_win = root.drawable.id; request_XIWarpPointer(&client_request, &request, BadWindow); request.src_win = None; request.dst_win = None; request.dst_y = 0; expected_y = SPRITE_Y; request.dst_x = 1 << 16; expected_x = SPRITE_X + 1; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); request.dst_x = -1 << 16; expected_x = SPRITE_X - 1; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); request.dst_x = 0; expected_x = SPRITE_X; request.dst_y = 1 << 16; expected_y = SPRITE_Y + 1; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); request.dst_y = -1 << 16; expected_y = SPRITE_Y - 1; request.deviceid = devices.vcp->id; request_XIWarpPointer(&client_request, &request, Success); /* FIXME: src_x/y checks */ client_request.req_len -= 2; /* invalid length */ request_XIWarpPointer(&client_request, &request, BadLength); } int protocol_xiwarppointer_test(void) { init_simple(); screen.SetCursorPosition = ScreenSetCursorPosition; test_XIWarpPointer(); return 0; } xorg-server-21.1.16/test/xi2/protocol-eventconvert.c0000644000175000017500000007712114757411105016051 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "inputstr.h" #include "eventstr.h" #include "eventconvert.h" #include "exevents.h" #include "inpututils.h" #include #include "protocol-common.h" static void test_values_XIRawEvent(RawDeviceEvent *in, xXIRawEvent * out, BOOL swap) { int i; unsigned char *ptr; FP3232 *value, *raw_value; int nvals = 0; int bits_set; int len; uint32_t flagmask = 0; if (swap) { swaps(&out->sequenceNumber); swapl(&out->length); swaps(&out->evtype); swaps(&out->deviceid); swapl(&out->time); swapl(&out->detail); swaps(&out->valuators_len); swapl(&out->flags); } assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type(in->type)); assert(out->time == in->time); assert(out->detail == in->detail.button); assert(out->deviceid == in->deviceid); assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(sizeof(in->valuators.mask)))); switch (in->type) { case ET_RawMotion: case ET_RawButtonPress: case ET_RawButtonRelease: flagmask = XIPointerEmulated; break; default: flagmask = 0; } assert((out->flags & ~flagmask) == 0); ptr = (unsigned char *) &out[1]; bits_set = 0; for (i = 0; out->valuators_len && i < sizeof(in->valuators.mask) * 8; i++) { if (i >= MAX_VALUATORS) assert(!XIMaskIsSet(in->valuators.mask, i)); assert(XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i)); if (XIMaskIsSet(in->valuators.mask, i)) bits_set++; } /* length is len of valuator mask (in 4-byte units) + the number of bits * set. Each bit set represents 2 8-byte values, hence the * 'bits_set * 4' */ len = out->valuators_len + bits_set * 4; assert(out->length == len); nvals = 0; for (i = 0; out->valuators_len && i < MAX_VALUATORS; i++) { assert(XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i)); if (XIMaskIsSet(in->valuators.mask, i)) { FP3232 vi, vo; value = (FP3232 *) (((unsigned char *) &out[1]) + out->valuators_len * 4); value += nvals; vi = double_to_fp3232(in->valuators.data[i]); vo.integral = value->integral; vo.frac = value->frac; if (swap) { swapl(&vo.integral); swapl(&vo.frac); } assert(vi.integral == vo.integral); assert(vi.frac == vo.frac); raw_value = value + bits_set; vi = double_to_fp3232(in->valuators.data_raw[i]); vo.integral = raw_value->integral; vo.frac = raw_value->frac; if (swap) { swapl(&vo.integral); swapl(&vo.frac); } assert(vi.integral == vo.integral); assert(vi.frac == vo.frac); nvals++; } } } static void test_XIRawEvent(RawDeviceEvent *in) { xXIRawEvent *out, *swapped; int rc; rc = EventToXI2((InternalEvent *) in, (xEvent **) &out); assert(rc == Success); test_values_XIRawEvent(in, out, FALSE); swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent *) out, (xGenericEvent *) swapped); test_values_XIRawEvent(in, swapped, TRUE); free(out); free(swapped); } static void test_convert_XIFocusEvent(void) { xEvent *out; DeviceEvent in; int rc; in.header = ET_Internal; in.type = ET_Enter; rc = EventToXI2((InternalEvent *) &in, &out); assert(rc == Success); assert(out == NULL); in.header = ET_Internal; in.type = ET_FocusIn; rc = EventToXI2((InternalEvent *) &in, &out); assert(rc == Success); assert(out == NULL); in.header = ET_Internal; in.type = ET_FocusOut; rc = EventToXI2((InternalEvent *) &in, &out); assert(rc == BadImplementation); in.header = ET_Internal; in.type = ET_Leave; rc = EventToXI2((InternalEvent *) &in, &out); assert(rc == BadImplementation); } static void test_convert_XIRawEvent(void) { RawDeviceEvent in; int i; memset(&in, 0, sizeof(in)); in.header = ET_Internal; in.type = ET_RawMotion; test_XIRawEvent(&in); in.header = ET_Internal; in.type = ET_RawKeyPress; test_XIRawEvent(&in); in.header = ET_Internal; in.type = ET_RawKeyRelease; test_XIRawEvent(&in); in.header = ET_Internal; in.type = ET_RawButtonPress; test_XIRawEvent(&in); in.header = ET_Internal; in.type = ET_RawButtonRelease; test_XIRawEvent(&in); in.detail.button = 1L; test_XIRawEvent(&in); in.detail.button = 1L << 8; test_XIRawEvent(&in); in.detail.button = 1L << 16; test_XIRawEvent(&in); in.detail.button = 1L << 24; test_XIRawEvent(&in); in.detail.button = ~0L; test_XIRawEvent(&in); in.detail.button = 0; in.time = 1L; test_XIRawEvent(&in); in.time = 1L << 8; test_XIRawEvent(&in); in.time = 1L << 16; test_XIRawEvent(&in); in.time = 1L << 24; test_XIRawEvent(&in); in.time = ~0L; test_XIRawEvent(&in); in.deviceid = 1; test_XIRawEvent(&in); in.deviceid = 1 << 8; test_XIRawEvent(&in); in.deviceid = ~0 & 0xFF; test_XIRawEvent(&in); for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); test_XIRawEvent(&in); XIClearMask(in.valuators.mask, i); } for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); in.valuators.data[i] = i + (i * 0.0010); in.valuators.data_raw[i] = (i + 10) + (i * 0.0030); test_XIRawEvent(&in); XIClearMask(in.valuators.mask, i); } for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); test_XIRawEvent(&in); } } static void test_values_XIDeviceEvent(DeviceEvent *in, xXIDeviceEvent * out, BOOL swap) { int buttons, valuators; int i; unsigned char *ptr; uint32_t flagmask = 0; FP3232 *values; if (swap) { swaps(&out->sequenceNumber); swapl(&out->length); swaps(&out->evtype); swaps(&out->deviceid); swaps(&out->sourceid); swapl(&out->time); swapl(&out->detail); swapl(&out->root); swapl(&out->event); swapl(&out->child); swapl(&out->root_x); swapl(&out->root_y); swapl(&out->event_x); swapl(&out->event_y); swaps(&out->buttons_len); swaps(&out->valuators_len); swapl(&out->mods.base_mods); swapl(&out->mods.latched_mods); swapl(&out->mods.locked_mods); swapl(&out->mods.effective_mods); swapl(&out->flags); } assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type(in->type)); assert(out->time == in->time); assert(out->detail == in->detail.button); assert(out->length >= 12); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); switch (in->type) { case ET_ButtonPress: case ET_Motion: case ET_ButtonRelease: flagmask = XIPointerEmulated; break; case ET_KeyPress: flagmask = XIKeyRepeat; break; default: flagmask = 0; break; } assert((out->flags & ~flagmask) == 0); assert(out->root == in->root); assert(out->event == None); /* set in FixUpEventFromWindow */ assert(out->child == None); /* set in FixUpEventFromWindow */ assert(out->mods.base_mods == in->mods.base); assert(out->mods.latched_mods == in->mods.latched); assert(out->mods.locked_mods == in->mods.locked); assert(out->mods.effective_mods == in->mods.effective); assert(out->group.base_group == in->group.base); assert(out->group.latched_group == in->group.latched); assert(out->group.locked_group == in->group.locked); assert(out->group.effective_group == in->group.effective); assert(out->event_x == 0); /* set in FixUpEventFromWindow */ assert(out->event_y == 0); /* set in FixUpEventFromWindow */ assert(out->root_x == double_to_fp1616(in->root_x + in->root_x_frac)); assert(out->root_y == double_to_fp1616(in->root_y + in->root_y_frac)); buttons = 0; for (i = 0; i < bits_to_bytes(sizeof(in->buttons)); i++) { if (XIMaskIsSet(in->buttons, i)) { assert(out->buttons_len >= bytes_to_int32(bits_to_bytes(i))); buttons++; } } ptr = (unsigned char *) &out[1]; for (i = 0; i < sizeof(in->buttons) * 8; i++) assert(XIMaskIsSet(in->buttons, i) == XIMaskIsSet(ptr, i)); valuators = 0; for (i = 0; i < MAX_VALUATORS; i++) if (XIMaskIsSet(in->valuators.mask, i)) valuators++; assert(out->valuators_len >= bytes_to_int32(bits_to_bytes(valuators))); ptr += out->buttons_len * 4; values = (FP3232 *) (ptr + out->valuators_len * 4); for (i = 0; i < sizeof(in->valuators.mask) * 8 || i < (out->valuators_len * 4) * 8; i++) { if (i >= MAX_VALUATORS) { assert(!XIMaskIsSet(in->valuators.mask, i)); assert(!XIMaskIsSet(ptr, i)); } else if (i > sizeof(in->valuators.mask) * 8) assert(!XIMaskIsSet(ptr, i)); else if (i > out->valuators_len * 4 * 8) assert(!XIMaskIsSet(in->valuators.mask, i)); else { assert(XIMaskIsSet(in->valuators.mask, i) == XIMaskIsSet(ptr, i)); if (XIMaskIsSet(ptr, i)) { FP3232 vi, vo; vi = double_to_fp3232(in->valuators.data[i]); vo = *values; if (swap) { swapl(&vo.integral); swapl(&vo.frac); } assert(vi.integral == vo.integral); assert(vi.frac == vo.frac); values++; } } } } static void test_XIDeviceEvent(DeviceEvent *in) { xXIDeviceEvent *out, *swapped; int rc; rc = EventToXI2((InternalEvent *) in, (xEvent **) &out); assert(rc == Success); test_values_XIDeviceEvent(in, out, FALSE); swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent *) out, (xGenericEvent *) swapped); test_values_XIDeviceEvent(in, swapped, TRUE); free(out); free(swapped); } static void test_convert_XIDeviceEvent(void) { DeviceEvent in; int i; memset(&in, 0, sizeof(in)); in.header = ET_Internal; in.type = ET_Motion; in.length = sizeof(DeviceEvent); in.time = 0; in.deviceid = 1; in.sourceid = 2; in.root = 3; in.root_x = 4; in.root_x_frac = 5; in.root_y = 6; in.root_y_frac = 7; in.detail.button = 8; in.mods.base = 9; in.mods.latched = 10; in.mods.locked = 11; in.mods.effective = 11; in.group.base = 12; in.group.latched = 13; in.group.locked = 14; in.group.effective = 15; test_XIDeviceEvent(&in); /* 32 bit */ in.detail.button = 1L; test_XIDeviceEvent(&in); in.detail.button = 1L << 8; test_XIDeviceEvent(&in); in.detail.button = 1L << 16; test_XIDeviceEvent(&in); in.detail.button = 1L << 24; test_XIDeviceEvent(&in); in.detail.button = ~0L; test_XIDeviceEvent(&in); /* 32 bit */ in.time = 1L; test_XIDeviceEvent(&in); in.time = 1L << 8; test_XIDeviceEvent(&in); in.time = 1L << 16; test_XIDeviceEvent(&in); in.time = 1L << 24; test_XIDeviceEvent(&in); in.time = ~0L; test_XIDeviceEvent(&in); /* 16 bit */ in.deviceid = 1; test_XIDeviceEvent(&in); in.deviceid = 1 << 8; test_XIDeviceEvent(&in); in.deviceid = ~0 & 0xFF; test_XIDeviceEvent(&in); /* 16 bit */ in.sourceid = 1; test_XIDeviceEvent(&in); in.deviceid = 1 << 8; test_XIDeviceEvent(&in); in.deviceid = ~0 & 0xFF; test_XIDeviceEvent(&in); /* 32 bit */ in.root = 1L; test_XIDeviceEvent(&in); in.root = 1L << 8; test_XIDeviceEvent(&in); in.root = 1L << 16; test_XIDeviceEvent(&in); in.root = 1L << 24; test_XIDeviceEvent(&in); in.root = ~0L; test_XIDeviceEvent(&in); /* 16 bit */ in.root_x = 1; test_XIDeviceEvent(&in); in.root_x = 1 << 8; test_XIDeviceEvent(&in); in.root_x = ~0 & 0xFF; test_XIDeviceEvent(&in); in.root_x_frac = 1; test_XIDeviceEvent(&in); in.root_x_frac = 1 << 8; test_XIDeviceEvent(&in); in.root_x_frac = ~0 & 0xFF; test_XIDeviceEvent(&in); in.root_y = 1; test_XIDeviceEvent(&in); in.root_y = 1 << 8; test_XIDeviceEvent(&in); in.root_y = ~0 & 0xFF; test_XIDeviceEvent(&in); in.root_y_frac = 1; test_XIDeviceEvent(&in); in.root_y_frac = 1 << 8; test_XIDeviceEvent(&in); in.root_y_frac = ~0 & 0xFF; test_XIDeviceEvent(&in); /* 32 bit */ in.mods.base = 1L; test_XIDeviceEvent(&in); in.mods.base = 1L << 8; test_XIDeviceEvent(&in); in.mods.base = 1L << 16; test_XIDeviceEvent(&in); in.mods.base = 1L << 24; test_XIDeviceEvent(&in); in.mods.base = ~0L; test_XIDeviceEvent(&in); in.mods.latched = 1L; test_XIDeviceEvent(&in); in.mods.latched = 1L << 8; test_XIDeviceEvent(&in); in.mods.latched = 1L << 16; test_XIDeviceEvent(&in); in.mods.latched = 1L << 24; test_XIDeviceEvent(&in); in.mods.latched = ~0L; test_XIDeviceEvent(&in); in.mods.locked = 1L; test_XIDeviceEvent(&in); in.mods.locked = 1L << 8; test_XIDeviceEvent(&in); in.mods.locked = 1L << 16; test_XIDeviceEvent(&in); in.mods.locked = 1L << 24; test_XIDeviceEvent(&in); in.mods.locked = ~0L; test_XIDeviceEvent(&in); in.mods.effective = 1L; test_XIDeviceEvent(&in); in.mods.effective = 1L << 8; test_XIDeviceEvent(&in); in.mods.effective = 1L << 16; test_XIDeviceEvent(&in); in.mods.effective = 1L << 24; test_XIDeviceEvent(&in); in.mods.effective = ~0L; test_XIDeviceEvent(&in); /* 8 bit */ in.group.base = 1; test_XIDeviceEvent(&in); in.group.base = ~0 & 0xFF; test_XIDeviceEvent(&in); in.group.latched = 1; test_XIDeviceEvent(&in); in.group.latched = ~0 & 0xFF; test_XIDeviceEvent(&in); in.group.locked = 1; test_XIDeviceEvent(&in); in.group.locked = ~0 & 0xFF; test_XIDeviceEvent(&in); in.mods.effective = 1; test_XIDeviceEvent(&in); in.mods.effective = ~0 & 0xFF; test_XIDeviceEvent(&in); for (i = 0; i < sizeof(in.buttons) * 8; i++) { XISetMask(in.buttons, i); test_XIDeviceEvent(&in); XIClearMask(in.buttons, i); } for (i = 0; i < sizeof(in.buttons) * 8; i++) { XISetMask(in.buttons, i); test_XIDeviceEvent(&in); } for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); test_XIDeviceEvent(&in); XIClearMask(in.valuators.mask, i); } for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); in.valuators.data[i] = i + (i * 0.0020); test_XIDeviceEvent(&in); XIClearMask(in.valuators.mask, i); } for (i = 0; i < MAX_VALUATORS; i++) { XISetMask(in.valuators.mask, i); test_XIDeviceEvent(&in); } } static void test_values_XIDeviceChangedEvent(DeviceChangedEvent *in, xXIDeviceChangedEvent * out, BOOL swap) { int i, j; unsigned char *ptr; if (swap) { swaps(&out->sequenceNumber); swapl(&out->length); swaps(&out->evtype); swaps(&out->deviceid); swaps(&out->sourceid); swapl(&out->time); swaps(&out->num_classes); } assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type(in->type)); assert(out->time == in->time); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); ptr = (unsigned char *) &out[1]; for (i = 0; i < out->num_classes; i++) { xXIAnyInfo *any = (xXIAnyInfo *) ptr; if (swap) { swaps(&any->length); swaps(&any->type); swaps(&any->sourceid); } switch (any->type) { case XIButtonClass: { xXIButtonInfo *b = (xXIButtonInfo *) any; Atom *names; if (swap) { swaps(&b->num_buttons); } assert(b->length == bytes_to_int32(sizeof(xXIButtonInfo)) + bytes_to_int32(bits_to_bytes(b->num_buttons)) + b->num_buttons); assert(b->num_buttons == in->buttons.num_buttons); names = (Atom *) ((char *) &b[1] + pad_to_int32(bits_to_bytes(b->num_buttons))); for (j = 0; j < b->num_buttons; j++) { if (swap) { swapl(&names[j]); } assert(names[j] == in->buttons.names[j]); } } break; case XIKeyClass: { xXIKeyInfo *k = (xXIKeyInfo *) any; uint32_t *kc; if (swap) { swaps(&k->num_keycodes); } assert(k->length == bytes_to_int32(sizeof(xXIKeyInfo)) + k->num_keycodes); assert(k->num_keycodes == in->keys.max_keycode - in->keys.min_keycode + 1); kc = (uint32_t *) &k[1]; for (j = 0; j < k->num_keycodes; j++) { if (swap) { swapl(&kc[j]); } assert(kc[j] >= in->keys.min_keycode); assert(kc[j] <= in->keys.max_keycode); } } break; case XIValuatorClass: { xXIValuatorInfo *v = (xXIValuatorInfo *) any; assert(v->length == bytes_to_int32(sizeof(xXIValuatorInfo))); } break; case XIScrollClass: { xXIScrollInfo *s = (xXIScrollInfo *) any; assert(s->length == bytes_to_int32(sizeof(xXIScrollInfo))); assert(s->sourceid == in->sourceid); assert(s->number < in->num_valuators); switch (s->type) { case XIScrollTypeVertical: assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_VERTICAL); break; case XIScrollTypeHorizontal: assert(in->valuators[s->number].scroll.type == SCROLL_TYPE_HORIZONTAL); break; } if (s->flags & XIScrollFlagPreferred) assert(in->valuators[s->number].scroll. flags & SCROLL_FLAG_PREFERRED); } default: printf("Invalid class type.\n\n"); assert(1); break; } ptr += any->length * 4; } } static void test_XIDeviceChangedEvent(DeviceChangedEvent *in) { xXIDeviceChangedEvent *out, *swapped; int rc; rc = EventToXI2((InternalEvent *) in, (xEvent **) &out); assert(rc == Success); test_values_XIDeviceChangedEvent(in, out, FALSE); swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent *) out, (xGenericEvent *) swapped); test_values_XIDeviceChangedEvent(in, swapped, TRUE); free(out); free(swapped); } static void test_convert_XIDeviceChangedEvent(void) { DeviceChangedEvent in; int i; memset(&in, 0, sizeof(in)); in.header = ET_Internal; in.type = ET_DeviceChanged; in.length = sizeof(DeviceChangedEvent); in.time = 0; in.deviceid = 1; in.sourceid = 2; in.masterid = 3; in.num_valuators = 4; in.flags = DEVCHANGE_SLAVE_SWITCH | DEVCHANGE_POINTER_EVENT | DEVCHANGE_KEYBOARD_EVENT; for (i = 0; i < MAX_BUTTONS; i++) in.buttons.names[i] = i + 10; in.keys.min_keycode = 8; in.keys.max_keycode = 255; test_XIDeviceChangedEvent(&in); in.time = 1L; test_XIDeviceChangedEvent(&in); in.time = 1L << 8; test_XIDeviceChangedEvent(&in); in.time = 1L << 16; test_XIDeviceChangedEvent(&in); in.time = 1L << 24; test_XIDeviceChangedEvent(&in); in.time = ~0L; test_XIDeviceChangedEvent(&in); in.deviceid = 1L; test_XIDeviceChangedEvent(&in); in.deviceid = 1L << 8; test_XIDeviceChangedEvent(&in); in.deviceid = ~0 & 0xFFFF; test_XIDeviceChangedEvent(&in); in.sourceid = 1L; test_XIDeviceChangedEvent(&in); in.sourceid = 1L << 8; test_XIDeviceChangedEvent(&in); in.sourceid = ~0 & 0xFFFF; test_XIDeviceChangedEvent(&in); in.masterid = 1L; test_XIDeviceChangedEvent(&in); in.masterid = 1L << 8; test_XIDeviceChangedEvent(&in); in.masterid = ~0 & 0xFFFF; test_XIDeviceChangedEvent(&in); in.buttons.num_buttons = 0; test_XIDeviceChangedEvent(&in); in.buttons.num_buttons = 1; test_XIDeviceChangedEvent(&in); in.buttons.num_buttons = MAX_BUTTONS; test_XIDeviceChangedEvent(&in); in.keys.min_keycode = 0; in.keys.max_keycode = 0; test_XIDeviceChangedEvent(&in); in.keys.max_keycode = 1 << 8; test_XIDeviceChangedEvent(&in); in.keys.max_keycode = 0xFFFC; /* highest range, above that the length field gives up */ test_XIDeviceChangedEvent(&in); in.keys.min_keycode = 1 << 8; in.keys.max_keycode = 1 << 8; test_XIDeviceChangedEvent(&in); in.keys.min_keycode = 1 << 8; in.keys.max_keycode = 0; test_XIDeviceChangedEvent(&in); in.num_valuators = 0; test_XIDeviceChangedEvent(&in); in.num_valuators = 1; test_XIDeviceChangedEvent(&in); in.num_valuators = MAX_VALUATORS; test_XIDeviceChangedEvent(&in); for (i = 0; i < MAX_VALUATORS; i++) { in.valuators[i].min = 0; in.valuators[i].max = 0; test_XIDeviceChangedEvent(&in); in.valuators[i].max = 1 << 8; test_XIDeviceChangedEvent(&in); in.valuators[i].max = 1 << 16; test_XIDeviceChangedEvent(&in); in.valuators[i].max = 1 << 24; test_XIDeviceChangedEvent(&in); in.valuators[i].max = abs(~0); test_XIDeviceChangedEvent(&in); in.valuators[i].resolution = 1 << 8; test_XIDeviceChangedEvent(&in); in.valuators[i].resolution = 1 << 16; test_XIDeviceChangedEvent(&in); in.valuators[i].resolution = 1 << 24; test_XIDeviceChangedEvent(&in); in.valuators[i].resolution = abs(~0); test_XIDeviceChangedEvent(&in); in.valuators[i].name = i; test_XIDeviceChangedEvent(&in); in.valuators[i].mode = Relative; test_XIDeviceChangedEvent(&in); in.valuators[i].mode = Absolute; test_XIDeviceChangedEvent(&in); } } static void test_values_XITouchOwnershipEvent(TouchOwnershipEvent *in, xXITouchOwnershipEvent * out, BOOL swap) { if (swap) { swaps(&out->sequenceNumber); swapl(&out->length); swaps(&out->evtype); swaps(&out->deviceid); swaps(&out->sourceid); swapl(&out->time); swapl(&out->touchid); swapl(&out->root); swapl(&out->event); swapl(&out->child); swapl(&out->time); } assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type(in->type)); assert(out->time == in->time); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); assert(out->touchid == in->touchid); assert(out->flags == in->reason); } static void test_XITouchOwnershipEvent(TouchOwnershipEvent *in) { xXITouchOwnershipEvent *out, *swapped; int rc; rc = EventToXI2((InternalEvent *) in, (xEvent **) &out); assert(rc == Success); test_values_XITouchOwnershipEvent(in, out, FALSE); swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent *) out, (xGenericEvent *) swapped); test_values_XITouchOwnershipEvent(in, swapped, TRUE); free(out); free(swapped); } static void test_convert_XITouchOwnershipEvent(void) { TouchOwnershipEvent in; long i; memset(&in, 0, sizeof(in)); in.header = ET_Internal; in.type = ET_TouchOwnership; in.length = sizeof(in); in.time = 0; in.deviceid = 1; in.sourceid = 2; in.touchid = 0; in.reason = 0; in.resource = 0; in.flags = 0; test_XITouchOwnershipEvent(&in); in.flags = XIAcceptTouch; test_XITouchOwnershipEvent(&in); in.flags = XIRejectTouch; test_XITouchOwnershipEvent(&in); for (i = 1; i <= 0xFFFF; i <<= 1) { in.deviceid = i; test_XITouchOwnershipEvent(&in); } for (i = 1; i <= 0xFFFF; i <<= 1) { in.sourceid = i; test_XITouchOwnershipEvent(&in); } for (i = 1;; i <<= 1) { in.touchid = i; test_XITouchOwnershipEvent(&in); if (i == ((long) 1 << 31)) break; } } static void test_XIBarrierEvent(BarrierEvent *in) { xXIBarrierEvent *out, *swapped; int count; int rc; int eventlen; FP3232 value; rc = EventToXI((InternalEvent*)in, (xEvent**)&out, &count); assert(rc == BadMatch); rc = EventToCore((InternalEvent*)in, (xEvent**)&out, &count); assert(rc == BadMatch); rc = EventToXI2((InternalEvent*)in, (xEvent**)&out); assert(out->type == GenericEvent); assert(out->extension == 0); /* IReqCode defaults to 0 */ assert(out->evtype == GetXI2Type(in->type)); assert(out->time == in->time); assert(out->deviceid == in->deviceid); assert(out->sourceid == in->sourceid); assert(out->barrier == in->barrierid); assert(out->flags == in->flags); assert(out->event == in->window); assert(out->root == in->root); assert(out->dtime == in->dt); assert(out->eventid == in->event_id); assert(out->root_x == double_to_fp1616(in->root_x)); assert(out->root_y == double_to_fp1616(in->root_y)); value = double_to_fp3232(in->dx); assert(out->dx.integral == value.integral); assert(out->dx.frac == value.frac); value = double_to_fp3232(in->dy); assert(out->dy.integral == value.integral); assert(out->dy.frac == value.frac); eventlen = sizeof(xEvent) + out->length * 4; swapped = calloc(1, eventlen); XI2EventSwap((xGenericEvent *) out, (xGenericEvent *) swapped); swaps(&swapped->sequenceNumber); swapl(&swapped->length); swaps(&swapped->evtype); swaps(&swapped->deviceid); swapl(&swapped->time); swapl(&swapped->eventid); swapl(&swapped->root); swapl(&swapped->event); swapl(&swapped->barrier); swapl(&swapped->dtime); swaps(&swapped->sourceid); swapl(&swapped->root_x); swapl(&swapped->root_y); swapl(&swapped->dx.integral); swapl(&swapped->dx.frac); swapl(&swapped->dy.integral); swapl(&swapped->dy.frac); assert(memcmp(swapped, out, eventlen) == 0); free(swapped); free(out); } static void test_convert_XIBarrierEvent(void) { BarrierEvent in; memset(&in, 0, sizeof(in)); in.header = ET_Internal; in.type = ET_BarrierHit; in.length = sizeof(in); in.time = 0; in.deviceid = 1; in.sourceid = 2; test_XIBarrierEvent(&in); in.deviceid = 1; while(in.deviceid & 0xFFFF) { test_XIBarrierEvent(&in); in.deviceid <<= 1; } in.deviceid = 0; in.sourceid = 1; while(in.sourceid & 0xFFFF) { test_XIBarrierEvent(&in); in.sourceid <<= 1; } in.sourceid = 0; in.flags = 1; while(in.flags) { test_XIBarrierEvent(&in); in.flags <<= 1; } in.barrierid = 1; while(in.barrierid) { test_XIBarrierEvent(&in); in.barrierid <<= 1; } in.dt = 1; while(in.dt) { test_XIBarrierEvent(&in); in.dt <<= 1; } in.event_id = 1; while(in.event_id) { test_XIBarrierEvent(&in); in.event_id <<= 1; } in.window = 1; while(in.window) { test_XIBarrierEvent(&in); in.window <<= 1; } in.root = 1; while(in.root) { test_XIBarrierEvent(&in); in.root <<= 1; } /* pseudo-random 16 bit numbers */ in.root_x = 1; test_XIBarrierEvent(&in); in.root_x = 1.3; test_XIBarrierEvent(&in); in.root_x = 264.908; test_XIBarrierEvent(&in); in.root_x = 35638.292; test_XIBarrierEvent(&in); in.root_x = -1; test_XIBarrierEvent(&in); in.root_x = -1.3; test_XIBarrierEvent(&in); in.root_x = -264.908; test_XIBarrierEvent(&in); in.root_x = -35638.292; test_XIBarrierEvent(&in); in.root_y = 1; test_XIBarrierEvent(&in); in.root_y = 1.3; test_XIBarrierEvent(&in); in.root_y = 264.908; test_XIBarrierEvent(&in); in.root_y = 35638.292; test_XIBarrierEvent(&in); in.root_y = -1; test_XIBarrierEvent(&in); in.root_y = -1.3; test_XIBarrierEvent(&in); in.root_y = -264.908; test_XIBarrierEvent(&in); in.root_y = -35638.292; test_XIBarrierEvent(&in); /* equally pseudo-random 32 bit numbers */ in.dx = 1; test_XIBarrierEvent(&in); in.dx = 1.3; test_XIBarrierEvent(&in); in.dx = 264.908; test_XIBarrierEvent(&in); in.dx = 35638.292; test_XIBarrierEvent(&in); in.dx = 2947813871.2342; test_XIBarrierEvent(&in); in.dx = -1; test_XIBarrierEvent(&in); in.dx = -1.3; test_XIBarrierEvent(&in); in.dx = -264.908; test_XIBarrierEvent(&in); in.dx = -35638.292; test_XIBarrierEvent(&in); in.dx = -2947813871.2342; test_XIBarrierEvent(&in); in.dy = 1; test_XIBarrierEvent(&in); in.dy = 1.3; test_XIBarrierEvent(&in); in.dy = 264.908; test_XIBarrierEvent(&in); in.dy = 35638.292; test_XIBarrierEvent(&in); in.dy = 2947813871.2342; test_XIBarrierEvent(&in); in.dy = -1; test_XIBarrierEvent(&in); in.dy = -1.3; test_XIBarrierEvent(&in); in.dy = -264.908; test_XIBarrierEvent(&in); in.dy = -35638.292; test_XIBarrierEvent(&in); in.dy = -2947813871.2342; test_XIBarrierEvent(&in); } int protocol_eventconvert_test(void) { test_convert_XIRawEvent(); test_convert_XIFocusEvent(); test_convert_XIDeviceEvent(); test_convert_XIDeviceChangedEvent(); test_convert_XITouchOwnershipEvent(); test_convert_XIBarrierEvent(); return 0; } xorg-server-21.1.16/test/xi2/xi2.c0000644000175000017500000001102414757411105012160 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "inpututils.h" #include "inputstr.h" #include "assert.h" #include "protocol-common.h" ClientRec client_window; static void xi2mask_test(void) { XI2Mask *xi2mask = NULL, *mergemask = NULL; unsigned char *mask; DeviceIntRec dev; DeviceIntRec all_devices, all_master_devices; int i; all_devices.id = XIAllDevices; inputInfo.all_devices = &all_devices; all_master_devices.id = XIAllMasterDevices; inputInfo.all_master_devices = &all_master_devices; /* size >= nmasks * 2 for the test cases below */ xi2mask = xi2mask_new_with_size(MAXDEVICES + 2, (MAXDEVICES + 2) * 2); assert(xi2mask); assert(xi2mask->nmasks > 0); assert(xi2mask->mask_size > 0); assert(xi2mask_mask_size(xi2mask) == xi2mask->mask_size); assert(xi2mask_num_masks(xi2mask) == xi2mask->nmasks); mask = calloc(1, xi2mask_mask_size(xi2mask)); /* ensure zeros */ for (i = 0; i < xi2mask_num_masks(xi2mask); i++) { const unsigned char *m = xi2mask_get_one_mask(xi2mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); } /* set various bits */ for (i = 0; i < xi2mask_num_masks(xi2mask); i++) { const unsigned char *m; xi2mask_set(xi2mask, i, i); dev.id = i; assert(xi2mask_isset(xi2mask, &dev, i)); m = xi2mask_get_one_mask(xi2mask, i); SetBit(mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); ClearBit(mask, i); } /* ensure zeros one-by-one */ for (i = 0; i < xi2mask_num_masks(xi2mask); i++) { const unsigned char *m = xi2mask_get_one_mask(xi2mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) != 0); xi2mask_zero(xi2mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); } /* re-set, zero all */ for (i = 0; i < xi2mask_num_masks(xi2mask); i++) xi2mask_set(xi2mask, i, i); xi2mask_zero(xi2mask, -1); for (i = 0; i < xi2mask_num_masks(xi2mask); i++) { const unsigned char *m = xi2mask_get_one_mask(xi2mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); } for (i = 0; i < xi2mask_num_masks(xi2mask); i++) { const unsigned char *m; SetBit(mask, i); xi2mask_set_one_mask(xi2mask, i, mask, xi2mask_mask_size(xi2mask)); m = xi2mask_get_one_mask(xi2mask, i); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); ClearBit(mask, i); } mergemask = xi2mask_new_with_size(MAXDEVICES + 2, (MAXDEVICES + 2) * 2); for (i = 0; i < xi2mask_num_masks(mergemask); i++) { dev.id = i; xi2mask_set(mergemask, i, i * 2); } /* xi2mask still has all i bits set, should now also have all i * 2 bits */ xi2mask_merge(xi2mask, mergemask); for (i = 0; i < xi2mask_num_masks(mergemask); i++) { const unsigned char *m = xi2mask_get_one_mask(xi2mask, i); SetBit(mask, i); SetBit(mask, i * 2); assert(memcmp(mask, m, xi2mask_mask_size(xi2mask)) == 0); ClearBit(mask, i); ClearBit(mask, i * 2); } xi2mask_free(&xi2mask); assert(xi2mask == NULL); xi2mask_free(&mergemask); assert(mergemask == NULL); free(mask); } int xi2_test(void) { xi2mask_test(); return 0; } xorg-server-21.1.16/test/xi2/protocol-common.h0000644000175000017500000001222014757411105014611 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "scrnintstr.h" #include "windowstr.h" #include "exevents.h" #include #include "tests.h" #ifndef PROTOCOL_COMMON_H #define PROTOCOL_COMMON_H /* Check default values in a reply */ #define reply_check_defaults(rep, len, type) \ { \ assert((len) >= sz_x##type##Reply); \ assert((rep)->repType == X_Reply); \ assert((rep)->RepType == X_##type); \ assert((rep)->sequenceNumber == CLIENT_SEQUENCE); \ assert((rep)->length >= (sz_x##type##Reply - 32)/4); \ } /* initialise default values for request */ #define request_init(req, type) \ { \ (req)->reqType = 128; /* doesn't matter */ \ (req)->ReqType = X_##type; \ (req)->length = (sz_x##type##Req >> 2); \ } /* Various defines used in the tests. Some tests may use different values * than these defaults */ /* default client index */ #define CLIENT_INDEX 1 /* default client mask for resources and windows */ #define CLIENT_MASK ((CLIENT_INDEX) << CLIENTOFFSET) /* default client sequence number for replies */ #define CLIENT_SEQUENCE 0x100 /* default root window id */ #define ROOT_WINDOW_ID 0x10 /* default client window id */ #define CLIENT_WINDOW_ID 0x100001 /* invalid window ID. use for BadWindow checks. */ #define INVALID_WINDOW_ID 0x111111 /* initial fake sprite position */ #define SPRITE_X 100 #define SPRITE_Y 200 /* Various structs used throughout the tests */ /* The default devices struct, contains one pointer + keyboard and the * matching master devices. Initialize with init_devices() if needed. */ struct devices { DeviceIntPtr vcp; DeviceIntPtr vck; DeviceIntPtr mouse; DeviceIntPtr kbd; int num_devices; int num_master_devices; }; /** * The set of default devices available in all tests if necessary. */ extern struct devices devices; /** * test-specific userdata, passed into the reply handler. */ extern void *global_userdata; /** * The reply handler called from WriteToClient. Set this handler if you need * to check the reply values. */ extern void (*reply_handler) (ClientPtr client, int len, char *data, void *userdata); /** * The default screen used for the windows. Initialized by init_simple(). */ extern ScreenRec screen; /** * Semi-initialized root window. initialized by init(). */ extern WindowRec root; /** * Semi-initialized top-level window. initialized by init(). */ extern WindowRec window; /* various simple functions for quick setup */ /** * Initialize the above struct with default devices and return the struct. * Usually not needed if you call ::init_simple. */ struct devices init_devices(void); /** * Init a mostly zeroed out client with default values for index and mask. */ ClientRec init_client(int request_len, void *request_data); /** * Init a mostly zeroed out window with the given window ID. * Usually not needed if you call ::init_simple which sets up root and * window. */ void init_window(WindowPtr window, WindowPtr parent, int id); /** * Create a very simple setup that provides the minimum values for most * tests, including a screen, the root and client window and the default * device setup. */ void init_simple(void); /* Declarations for various overrides in the test files. */ void __wrap_WriteToClient(ClientPtr client, int len, void *data); int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, int len, unsigned char *mask); int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); int __real_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); Bool __wrap_AddResource(XID id, RESTYPE type, void *value); int __wrap_dixLookupClient(ClientPtr *c, XID id, ClientPtr client, Mask access); int __real_dixLookupClient(ClientPtr *c, XID id, ClientPtr client, Mask access); #endif /* PROTOCOL_COMMON_H */ xorg-server-21.1.16/test/Makefile.am0000644000175000017500000001066314757411105012654 if ENABLE_UNIT_TESTS SUBDIRS= . AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ AM_CPPFLAGS = $(XORG_INCS) tests_CPPFLAGS= CLEANFILES= tests_SOURCES = \ tests-common.c \ tests-common.h \ list.c \ string.c \ tests.c \ tests.h noinst_PROGRAMS = simple-xinit tests if XVFB XVFB_TESTS = scripts/xvfb-piglit.sh if XEPHYR if GLAMOR XEPHYR_GLAMOR_TESTS = scripts/xephyr-glamor-piglit.sh endif endif endif SCRIPT_TESTS = \ $(XVFB_TESTS) \ $(XEPHYR_GLAMOR_TESTS) \ $(NULL) TESTS = tests \ $(SCRIPT_TESTS) \ $(NULL) TESTS_ENVIRONMENT = \ XSERVER_DIR=$(abs_top_srcdir) \ XSERVER_BUILDDIR=$(abs_top_builddir) \ $(XORG_MALLOC_DEBUG_ENV) \ $(NULL) tests_LDADD = if XORG # Tests that require at least some DDX functions in order to fully link # For now, requires xf86 ddx, could be adjusted to use another AM_CPPFLAGS += \ -I$(srcdir)/xi1 \ -I$(srcdir)/xi2 \ -I$(top_srcdir)/hw/xfree86/common \ -I$(top_srcdir)/hw/xfree86/parser \ -I$(top_srcdir)/hw/xfree86/ddc \ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \ -I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \ -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3 tests_CPPFLAGS += $(AM_CPPFLAGS) tests_SOURCES += \ fixes.c \ input.c \ misc.c \ signal-logging.c \ touch.c \ xfree86.c \ test_xkb.c \ xtest.c tests_CPPFLAGS += -DXORG_TESTS if RES tests_SOURCES += hashtabletest.c tests_CPPFLAGS += -DRES_TESTS endif endif XORG if HAVE_LD_WRAP tests_CPPFLAGS += -DLDWRAP_TESTS if XORG tests_SOURCES += \ xi1/protocol-xchangedevicecontrol.c \ xi2/protocol-common.c \ xi2/protocol-xiqueryversion.c \ xi2/protocol-xiquerydevice.c \ xi2/protocol-xiselectevents.c \ xi2/protocol-xigetselectedevents.c \ xi2/protocol-xisetclientpointer.c \ xi2/protocol-xigetclientpointer.c \ xi2/protocol-xiquerypointer.c \ xi2/protocol-xipassivegrabdevice.c \ xi2/protocol-xiwarppointer.c \ xi2/protocol-eventconvert.c \ xi2/xi2.c \ xi2/protocol-common.h tests_LDFLAGS = \ -Wl,-wrap,dixLookupWindow \ -Wl,-wrap,dixLookupClient \ -Wl,-wrap,WriteToClient \ -Wl,-wrap,dixLookupWindow \ -Wl,-wrap,XISetEventMask \ -Wl,-wrap,AddResource \ -Wl,-wrap,GrabButton \ $() endif XORG else !HAVE_LD_WRAP # Print that xi1-tests were skipped (exit code 77 for automake test harness) TESTS += xi1-tests CLEANFILES += xi1-tests xi1-tests: @echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@ @echo 'exit 77' >> $@ $(AM_V_GEN)chmod +x $@ # Print that xi2-tests were skipped (exit code 77 for automake test harness) TESTS += xi2-tests CLEANFILES += xi2-tests xi2-tests: @echo 'echo "ld -wrap support required for xi2 unit tests, skipping"' > $@ @echo 'exit 77' >> $@ $(AM_V_GEN)chmod +x $@ endif !HAVE_LD_WRAP if XORG nodist_tests_SOURCES = sdksyms.c tests_LDADD += \ $(top_builddir)/hw/xfree86/loader/libloader.la \ $(top_builddir)/hw/xfree86/common/libcommon.la \ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ $(top_builddir)/hw/xfree86/parser/libxf86config.la \ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ $(top_builddir)/hw/xfree86/ddc/libddc.la \ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ $(top_builddir)/Xext/libXvidmode.la \ $(top_builddir)/fb/libfb.la \ $(XSERVER_LIBS) \ $(XORG_LIBS) if !SPECIAL_DTRACE_OBJECTS tests_LDADD += $(top_builddir)/os/libos.la endif if GLX tests_LDADD += $(top_builddir)/glx/libglxvnd.la endif BUILT_SOURCES = sdksyms.c CLEANFILES += sdksyms.c sdksyms.c: $(top_builddir)/hw/xfree86/sdksyms.c $(AM_V_GEN)$(LN_S) $(top_builddir)/hw/xfree86/sdksyms.c if DRI tests_LDADD += $(top_builddir)/hw/xfree86/dri/libdri.la endif if DRI2 tests_LDADD += $(top_builddir)/hw/xfree86/dri2/libdri2.la endif if DRI3 tests_LDADD += $(top_builddir)/dri3/libdri3.la endif endif XORG # GNU LD scans only in one direction, add the following dependencies at the end # so as they get picked up by the previously-linked libraries tests_LDADD += $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) endif ENABLE_UNIT_TESTS EXTRA_DIST = \ scripts/xvfb-piglit.sh \ scripts/xephyr-glamor-piglit.sh \ scripts/xinit-piglit-session.sh \ scripts/run-piglit.sh \ $(NULL) xorg-server-21.1.16/test/Makefile.in0000644000175000017500000034664714757411116012705 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @ENABLE_UNIT_TESTS_TRUE@noinst_PROGRAMS = simple-xinit$(EXEEXT) \ @ENABLE_UNIT_TESTS_TRUE@ tests$(EXEEXT) @ENABLE_UNIT_TESTS_TRUE@TESTS = tests$(EXEEXT) $(am__EXEEXT_1) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_8) # Tests that require at least some DDX functions in order to fully link # For now, requires xf86 ddx, could be adjusted to use another @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_1 = \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(srcdir)/xi1 \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(srcdir)/xi2 \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/common \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/parser \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/ddc \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/i2c -I$(top_srcdir)/hw/xfree86/modes \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/ramdac -I$(top_srcdir)/hw/xfree86/dri \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -I$(top_srcdir)/hw/xfree86/dri2 -I$(top_srcdir)/dri3 @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_2 = $(AM_CPPFLAGS) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ -DXORG_TESTS @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_3 = \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ fixes.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ input.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ misc.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ signal-logging.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ touch.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ xfree86.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ test_xkb.c \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ xtest.c @ENABLE_UNIT_TESTS_TRUE@@RES_TRUE@@XORG_TRUE@am__append_4 = hashtabletest.c @ENABLE_UNIT_TESTS_TRUE@@RES_TRUE@@XORG_TRUE@am__append_5 = -DRES_TESTS @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@am__append_6 = -DLDWRAP_TESTS @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@am__append_7 = \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi1/protocol-xchangedevicecontrol.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-common.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xiqueryversion.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xiquerydevice.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xiselectevents.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xigetselectedevents.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xisetclientpointer.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xigetclientpointer.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xiquerypointer.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xipassivegrabdevice.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-xiwarppointer.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-eventconvert.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/xi2.c \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ xi2/protocol-common.h # Print that xi1-tests were skipped (exit code 77 for automake test harness) # Print that xi2-tests were skipped (exit code 77 for automake test harness) @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@am__append_8 = xi1-tests \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ xi2-tests @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@am__append_9 = xi1-tests \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ xi2-tests @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_10 = \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/loader/libloader.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/fb/libfb.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(XSERVER_LIBS) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(XORG_LIBS) @ENABLE_UNIT_TESTS_TRUE@@SPECIAL_DTRACE_OBJECTS_FALSE@@XORG_TRUE@am__append_11 = $(top_builddir)/os/libos.la @ENABLE_UNIT_TESTS_TRUE@@GLX_TRUE@@XORG_TRUE@am__append_12 = $(top_builddir)/glx/libglxvnd.la @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_13 = sdksyms.c @DRI_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_14 = $(top_builddir)/hw/xfree86/dri/libdri.la @DRI2_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_15 = $(top_builddir)/hw/xfree86/dri2/libdri2.la @DRI3_TRUE@@ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__append_16 = $(top_builddir)/dri3/libdri3.la subdir = test ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) simple_xinit_SOURCES = simple-xinit.c simple_xinit_OBJECTS = simple-xinit.$(OBJEXT) simple_xinit_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__tests_SOURCES_DIST = tests-common.c tests-common.h list.c string.c \ tests.c tests.h fixes.c input.c misc.c signal-logging.c \ touch.c xfree86.c test_xkb.c xtest.c hashtabletest.c \ xi1/protocol-xchangedevicecontrol.c xi2/protocol-common.c \ xi2/protocol-xiqueryversion.c xi2/protocol-xiquerydevice.c \ xi2/protocol-xiselectevents.c \ xi2/protocol-xigetselectedevents.c \ xi2/protocol-xisetclientpointer.c \ xi2/protocol-xigetclientpointer.c \ xi2/protocol-xiquerypointer.c \ xi2/protocol-xipassivegrabdevice.c \ xi2/protocol-xiwarppointer.c xi2/protocol-eventconvert.c \ xi2/xi2.c xi2/protocol-common.h @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__objects_1 = \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-fixes.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-input.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-misc.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-signal-logging.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-touch.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-xfree86.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-test_xkb.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-xtest.$(OBJEXT) @ENABLE_UNIT_TESTS_TRUE@@RES_TRUE@@XORG_TRUE@am__objects_2 = tests-hashtabletest.$(OBJEXT) @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@am__objects_3 = tests-protocol-xchangedevicecontrol.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-common.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xiqueryversion.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xiquerydevice.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xiselectevents.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xigetselectedevents.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xisetclientpointer.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xigetclientpointer.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xiquerypointer.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xipassivegrabdevice.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-xiwarppointer.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-protocol-eventconvert.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ tests-xi2.$(OBJEXT) @ENABLE_UNIT_TESTS_TRUE@am_tests_OBJECTS = \ @ENABLE_UNIT_TESTS_TRUE@ tests-tests-common.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@ tests-list.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@ tests-string.$(OBJEXT) \ @ENABLE_UNIT_TESTS_TRUE@ tests-tests.$(OBJEXT) $(am__objects_1) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__objects_2) $(am__objects_3) @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@nodist_tests_OBJECTS = \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ tests-sdksyms.$(OBJEXT) tests_OBJECTS = $(am_tests_OBJECTS) $(nodist_tests_OBJECTS) am__DEPENDENCIES_1 = @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/hw/xfree86/loader/libloader.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/common/libcommon.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/os-support/libxorgos.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/parser/libxf86config.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/dixmods/libdixmods.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/modes/libxf86modes.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ramdac/libramdac.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/ddc/libddc.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/i2c/libi2c.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/hw/xfree86/xkb/libxorgxkb.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/Xext/libXvidmode.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(top_builddir)/fb/libfb.la \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(am__DEPENDENCIES_1) \ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(am__DEPENDENCIES_1) @ENABLE_UNIT_TESTS_TRUE@tests_DEPENDENCIES = $(am__DEPENDENCIES_2) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_11) $(am__append_12) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_14) $(am__append_15) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_16) $(am__DEPENDENCIES_1) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__DEPENDENCIES_1) tests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(tests_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/simple-xinit.Po \ ./$(DEPDIR)/tests-fixes.Po ./$(DEPDIR)/tests-hashtabletest.Po \ ./$(DEPDIR)/tests-input.Po ./$(DEPDIR)/tests-list.Po \ ./$(DEPDIR)/tests-misc.Po ./$(DEPDIR)/tests-protocol-common.Po \ ./$(DEPDIR)/tests-protocol-eventconvert.Po \ ./$(DEPDIR)/tests-protocol-xchangedevicecontrol.Po \ ./$(DEPDIR)/tests-protocol-xigetclientpointer.Po \ ./$(DEPDIR)/tests-protocol-xigetselectedevents.Po \ ./$(DEPDIR)/tests-protocol-xipassivegrabdevice.Po \ ./$(DEPDIR)/tests-protocol-xiquerydevice.Po \ ./$(DEPDIR)/tests-protocol-xiquerypointer.Po \ ./$(DEPDIR)/tests-protocol-xiqueryversion.Po \ ./$(DEPDIR)/tests-protocol-xiselectevents.Po \ ./$(DEPDIR)/tests-protocol-xisetclientpointer.Po \ ./$(DEPDIR)/tests-protocol-xiwarppointer.Po \ ./$(DEPDIR)/tests-sdksyms.Po \ ./$(DEPDIR)/tests-signal-logging.Po \ ./$(DEPDIR)/tests-string.Po ./$(DEPDIR)/tests-test_xkb.Po \ ./$(DEPDIR)/tests-tests-common.Po ./$(DEPDIR)/tests-tests.Po \ ./$(DEPDIR)/tests-touch.Po ./$(DEPDIR)/tests-xfree86.Po \ ./$(DEPDIR)/tests-xi2.Po ./$(DEPDIR)/tests-xtest.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = simple-xinit.c $(tests_SOURCES) $(nodist_tests_SOURCES) DIST_SOURCES = simple-xinit.c $(am__tests_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ check recheck distdir distdir-am am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)' RECHECK_LOGS = $(TEST_LOGS) @ENABLE_UNIT_TESTS_TRUE@am__EXEEXT_1 = $(XVFB_TESTS) \ @ENABLE_UNIT_TESTS_TRUE@ $(XEPHYR_GLAMOR_TESTS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DIST_SUBDIRS = . am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/test-driver README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @ENABLE_UNIT_TESTS_TRUE@SUBDIRS = . @ENABLE_UNIT_TESTS_TRUE@AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ @ENABLE_UNIT_TESTS_TRUE@AM_CPPFLAGS = $(XORG_INCS) $(am__append_1) @ENABLE_UNIT_TESTS_TRUE@tests_CPPFLAGS = $(am__append_2) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_5) $(am__append_6) @ENABLE_UNIT_TESTS_TRUE@CLEANFILES = $(am__append_9) $(am__append_13) @ENABLE_UNIT_TESTS_TRUE@tests_SOURCES = tests-common.c tests-common.h \ @ENABLE_UNIT_TESTS_TRUE@ list.c string.c tests.c tests.h \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_3) $(am__append_4) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_7) @ENABLE_UNIT_TESTS_TRUE@@XVFB_TRUE@XVFB_TESTS = scripts/xvfb-piglit.sh @ENABLE_UNIT_TESTS_TRUE@@GLAMOR_TRUE@@XEPHYR_TRUE@@XVFB_TRUE@XEPHYR_GLAMOR_TESTS = scripts/xephyr-glamor-piglit.sh @ENABLE_UNIT_TESTS_TRUE@SCRIPT_TESTS = \ @ENABLE_UNIT_TESTS_TRUE@ $(XVFB_TESTS) \ @ENABLE_UNIT_TESTS_TRUE@ $(XEPHYR_GLAMOR_TESTS) \ @ENABLE_UNIT_TESTS_TRUE@ $(NULL) @ENABLE_UNIT_TESTS_TRUE@TESTS_ENVIRONMENT = \ @ENABLE_UNIT_TESTS_TRUE@ XSERVER_DIR=$(abs_top_srcdir) \ @ENABLE_UNIT_TESTS_TRUE@ XSERVER_BUILDDIR=$(abs_top_builddir) \ @ENABLE_UNIT_TESTS_TRUE@ $(XORG_MALLOC_DEBUG_ENV) \ @ENABLE_UNIT_TESTS_TRUE@ $(NULL) # GNU LD scans only in one direction, add the following dependencies at the end # so as they get picked up by the previously-linked libraries @ENABLE_UNIT_TESTS_TRUE@tests_LDADD = $(am__append_10) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_11) $(am__append_12) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_14) $(am__append_15) \ @ENABLE_UNIT_TESTS_TRUE@ $(am__append_16) $(XORG_SYS_LIBS) \ @ENABLE_UNIT_TESTS_TRUE@ $(XSERVER_SYS_LIBS) $(GLX_SYS_LIBS) @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@tests_LDFLAGS = \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,dixLookupWindow \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,dixLookupClient \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,WriteToClient \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,dixLookupWindow \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,XISetEventMask \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,AddResource \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ -Wl,-wrap,GrabButton \ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_TRUE@@XORG_TRUE@ $() @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@nodist_tests_SOURCES = sdksyms.c @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@BUILT_SOURCES = sdksyms.c EXTRA_DIST = \ scripts/xvfb-piglit.sh \ scripts/xephyr-glamor-piglit.sh \ scripts/xinit-piglit-session.sh \ scripts/run-piglit.sh \ $(NULL) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign test/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list simple-xinit$(EXEEXT): $(simple_xinit_OBJECTS) $(simple_xinit_DEPENDENCIES) $(EXTRA_simple_xinit_DEPENDENCIES) @rm -f simple-xinit$(EXEEXT) $(AM_V_CCLD)$(LINK) $(simple_xinit_OBJECTS) $(simple_xinit_LDADD) $(LIBS) tests$(EXEEXT): $(tests_OBJECTS) $(tests_DEPENDENCIES) $(EXTRA_tests_DEPENDENCIES) @rm -f tests$(EXEEXT) $(AM_V_CCLD)$(tests_LINK) $(tests_OBJECTS) $(tests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/simple-xinit.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-fixes.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-hashtabletest.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-input.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-list.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-misc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-eventconvert.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xchangedevicecontrol.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xigetclientpointer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xigetselectedevents.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xipassivegrabdevice.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xiquerydevice.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xiquerypointer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xiqueryversion.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xiselectevents.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xisetclientpointer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-protocol-xiwarppointer.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-sdksyms.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-signal-logging.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-string.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-test_xkb.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-tests-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-tests.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-touch.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-xfree86.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-xi2.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests-xtest.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< tests-tests-common.o: tests-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-tests-common.o -MD -MP -MF $(DEPDIR)/tests-tests-common.Tpo -c -o tests-tests-common.o `test -f 'tests-common.c' || echo '$(srcdir)/'`tests-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-tests-common.Tpo $(DEPDIR)/tests-tests-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests-common.c' object='tests-tests-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-tests-common.o `test -f 'tests-common.c' || echo '$(srcdir)/'`tests-common.c tests-tests-common.obj: tests-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-tests-common.obj -MD -MP -MF $(DEPDIR)/tests-tests-common.Tpo -c -o tests-tests-common.obj `if test -f 'tests-common.c'; then $(CYGPATH_W) 'tests-common.c'; else $(CYGPATH_W) '$(srcdir)/tests-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-tests-common.Tpo $(DEPDIR)/tests-tests-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests-common.c' object='tests-tests-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-tests-common.obj `if test -f 'tests-common.c'; then $(CYGPATH_W) 'tests-common.c'; else $(CYGPATH_W) '$(srcdir)/tests-common.c'; fi` tests-list.o: list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-list.o -MD -MP -MF $(DEPDIR)/tests-list.Tpo -c -o tests-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-list.Tpo $(DEPDIR)/tests-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='tests-list.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-list.o `test -f 'list.c' || echo '$(srcdir)/'`list.c tests-list.obj: list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-list.obj -MD -MP -MF $(DEPDIR)/tests-list.Tpo -c -o tests-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-list.Tpo $(DEPDIR)/tests-list.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='tests-list.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-list.obj `if test -f 'list.c'; then $(CYGPATH_W) 'list.c'; else $(CYGPATH_W) '$(srcdir)/list.c'; fi` tests-string.o: string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-string.o -MD -MP -MF $(DEPDIR)/tests-string.Tpo -c -o tests-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-string.Tpo $(DEPDIR)/tests-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='string.c' object='tests-string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-string.o `test -f 'string.c' || echo '$(srcdir)/'`string.c tests-string.obj: string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-string.obj -MD -MP -MF $(DEPDIR)/tests-string.Tpo -c -o tests-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-string.Tpo $(DEPDIR)/tests-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='string.c' object='tests-string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-string.obj `if test -f 'string.c'; then $(CYGPATH_W) 'string.c'; else $(CYGPATH_W) '$(srcdir)/string.c'; fi` tests-tests.o: tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-tests.o -MD -MP -MF $(DEPDIR)/tests-tests.Tpo -c -o tests-tests.o `test -f 'tests.c' || echo '$(srcdir)/'`tests.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-tests.Tpo $(DEPDIR)/tests-tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests.c' object='tests-tests.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-tests.o `test -f 'tests.c' || echo '$(srcdir)/'`tests.c tests-tests.obj: tests.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-tests.obj -MD -MP -MF $(DEPDIR)/tests-tests.Tpo -c -o tests-tests.obj `if test -f 'tests.c'; then $(CYGPATH_W) 'tests.c'; else $(CYGPATH_W) '$(srcdir)/tests.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-tests.Tpo $(DEPDIR)/tests-tests.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests.c' object='tests-tests.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-tests.obj `if test -f 'tests.c'; then $(CYGPATH_W) 'tests.c'; else $(CYGPATH_W) '$(srcdir)/tests.c'; fi` tests-fixes.o: fixes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-fixes.o -MD -MP -MF $(DEPDIR)/tests-fixes.Tpo -c -o tests-fixes.o `test -f 'fixes.c' || echo '$(srcdir)/'`fixes.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-fixes.Tpo $(DEPDIR)/tests-fixes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fixes.c' object='tests-fixes.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-fixes.o `test -f 'fixes.c' || echo '$(srcdir)/'`fixes.c tests-fixes.obj: fixes.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-fixes.obj -MD -MP -MF $(DEPDIR)/tests-fixes.Tpo -c -o tests-fixes.obj `if test -f 'fixes.c'; then $(CYGPATH_W) 'fixes.c'; else $(CYGPATH_W) '$(srcdir)/fixes.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-fixes.Tpo $(DEPDIR)/tests-fixes.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fixes.c' object='tests-fixes.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-fixes.obj `if test -f 'fixes.c'; then $(CYGPATH_W) 'fixes.c'; else $(CYGPATH_W) '$(srcdir)/fixes.c'; fi` tests-input.o: input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-input.o -MD -MP -MF $(DEPDIR)/tests-input.Tpo -c -o tests-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-input.Tpo $(DEPDIR)/tests-input.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='input.c' object='tests-input.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-input.o `test -f 'input.c' || echo '$(srcdir)/'`input.c tests-input.obj: input.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-input.obj -MD -MP -MF $(DEPDIR)/tests-input.Tpo -c -o tests-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-input.Tpo $(DEPDIR)/tests-input.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='input.c' object='tests-input.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-input.obj `if test -f 'input.c'; then $(CYGPATH_W) 'input.c'; else $(CYGPATH_W) '$(srcdir)/input.c'; fi` tests-misc.o: misc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-misc.o -MD -MP -MF $(DEPDIR)/tests-misc.Tpo -c -o tests-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-misc.Tpo $(DEPDIR)/tests-misc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='misc.c' object='tests-misc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c tests-misc.obj: misc.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-misc.obj -MD -MP -MF $(DEPDIR)/tests-misc.Tpo -c -o tests-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-misc.Tpo $(DEPDIR)/tests-misc.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='misc.c' object='tests-misc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` tests-signal-logging.o: signal-logging.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-signal-logging.o -MD -MP -MF $(DEPDIR)/tests-signal-logging.Tpo -c -o tests-signal-logging.o `test -f 'signal-logging.c' || echo '$(srcdir)/'`signal-logging.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-signal-logging.Tpo $(DEPDIR)/tests-signal-logging.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal-logging.c' object='tests-signal-logging.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-signal-logging.o `test -f 'signal-logging.c' || echo '$(srcdir)/'`signal-logging.c tests-signal-logging.obj: signal-logging.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-signal-logging.obj -MD -MP -MF $(DEPDIR)/tests-signal-logging.Tpo -c -o tests-signal-logging.obj `if test -f 'signal-logging.c'; then $(CYGPATH_W) 'signal-logging.c'; else $(CYGPATH_W) '$(srcdir)/signal-logging.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-signal-logging.Tpo $(DEPDIR)/tests-signal-logging.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='signal-logging.c' object='tests-signal-logging.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-signal-logging.obj `if test -f 'signal-logging.c'; then $(CYGPATH_W) 'signal-logging.c'; else $(CYGPATH_W) '$(srcdir)/signal-logging.c'; fi` tests-touch.o: touch.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-touch.o -MD -MP -MF $(DEPDIR)/tests-touch.Tpo -c -o tests-touch.o `test -f 'touch.c' || echo '$(srcdir)/'`touch.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-touch.Tpo $(DEPDIR)/tests-touch.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='touch.c' object='tests-touch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-touch.o `test -f 'touch.c' || echo '$(srcdir)/'`touch.c tests-touch.obj: touch.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-touch.obj -MD -MP -MF $(DEPDIR)/tests-touch.Tpo -c -o tests-touch.obj `if test -f 'touch.c'; then $(CYGPATH_W) 'touch.c'; else $(CYGPATH_W) '$(srcdir)/touch.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-touch.Tpo $(DEPDIR)/tests-touch.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='touch.c' object='tests-touch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-touch.obj `if test -f 'touch.c'; then $(CYGPATH_W) 'touch.c'; else $(CYGPATH_W) '$(srcdir)/touch.c'; fi` tests-xfree86.o: xfree86.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xfree86.o -MD -MP -MF $(DEPDIR)/tests-xfree86.Tpo -c -o tests-xfree86.o `test -f 'xfree86.c' || echo '$(srcdir)/'`xfree86.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xfree86.Tpo $(DEPDIR)/tests-xfree86.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfree86.c' object='tests-xfree86.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xfree86.o `test -f 'xfree86.c' || echo '$(srcdir)/'`xfree86.c tests-xfree86.obj: xfree86.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xfree86.obj -MD -MP -MF $(DEPDIR)/tests-xfree86.Tpo -c -o tests-xfree86.obj `if test -f 'xfree86.c'; then $(CYGPATH_W) 'xfree86.c'; else $(CYGPATH_W) '$(srcdir)/xfree86.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xfree86.Tpo $(DEPDIR)/tests-xfree86.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xfree86.c' object='tests-xfree86.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xfree86.obj `if test -f 'xfree86.c'; then $(CYGPATH_W) 'xfree86.c'; else $(CYGPATH_W) '$(srcdir)/xfree86.c'; fi` tests-test_xkb.o: test_xkb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-test_xkb.o -MD -MP -MF $(DEPDIR)/tests-test_xkb.Tpo -c -o tests-test_xkb.o `test -f 'test_xkb.c' || echo '$(srcdir)/'`test_xkb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-test_xkb.Tpo $(DEPDIR)/tests-test_xkb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test_xkb.c' object='tests-test_xkb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-test_xkb.o `test -f 'test_xkb.c' || echo '$(srcdir)/'`test_xkb.c tests-test_xkb.obj: test_xkb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-test_xkb.obj -MD -MP -MF $(DEPDIR)/tests-test_xkb.Tpo -c -o tests-test_xkb.obj `if test -f 'test_xkb.c'; then $(CYGPATH_W) 'test_xkb.c'; else $(CYGPATH_W) '$(srcdir)/test_xkb.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-test_xkb.Tpo $(DEPDIR)/tests-test_xkb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='test_xkb.c' object='tests-test_xkb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-test_xkb.obj `if test -f 'test_xkb.c'; then $(CYGPATH_W) 'test_xkb.c'; else $(CYGPATH_W) '$(srcdir)/test_xkb.c'; fi` tests-xtest.o: xtest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xtest.o -MD -MP -MF $(DEPDIR)/tests-xtest.Tpo -c -o tests-xtest.o `test -f 'xtest.c' || echo '$(srcdir)/'`xtest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xtest.Tpo $(DEPDIR)/tests-xtest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xtest.c' object='tests-xtest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xtest.o `test -f 'xtest.c' || echo '$(srcdir)/'`xtest.c tests-xtest.obj: xtest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xtest.obj -MD -MP -MF $(DEPDIR)/tests-xtest.Tpo -c -o tests-xtest.obj `if test -f 'xtest.c'; then $(CYGPATH_W) 'xtest.c'; else $(CYGPATH_W) '$(srcdir)/xtest.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xtest.Tpo $(DEPDIR)/tests-xtest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xtest.c' object='tests-xtest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xtest.obj `if test -f 'xtest.c'; then $(CYGPATH_W) 'xtest.c'; else $(CYGPATH_W) '$(srcdir)/xtest.c'; fi` tests-hashtabletest.o: hashtabletest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-hashtabletest.o -MD -MP -MF $(DEPDIR)/tests-hashtabletest.Tpo -c -o tests-hashtabletest.o `test -f 'hashtabletest.c' || echo '$(srcdir)/'`hashtabletest.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-hashtabletest.Tpo $(DEPDIR)/tests-hashtabletest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hashtabletest.c' object='tests-hashtabletest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-hashtabletest.o `test -f 'hashtabletest.c' || echo '$(srcdir)/'`hashtabletest.c tests-hashtabletest.obj: hashtabletest.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-hashtabletest.obj -MD -MP -MF $(DEPDIR)/tests-hashtabletest.Tpo -c -o tests-hashtabletest.obj `if test -f 'hashtabletest.c'; then $(CYGPATH_W) 'hashtabletest.c'; else $(CYGPATH_W) '$(srcdir)/hashtabletest.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-hashtabletest.Tpo $(DEPDIR)/tests-hashtabletest.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hashtabletest.c' object='tests-hashtabletest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-hashtabletest.obj `if test -f 'hashtabletest.c'; then $(CYGPATH_W) 'hashtabletest.c'; else $(CYGPATH_W) '$(srcdir)/hashtabletest.c'; fi` tests-protocol-xchangedevicecontrol.o: xi1/protocol-xchangedevicecontrol.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xchangedevicecontrol.o -MD -MP -MF $(DEPDIR)/tests-protocol-xchangedevicecontrol.Tpo -c -o tests-protocol-xchangedevicecontrol.o `test -f 'xi1/protocol-xchangedevicecontrol.c' || echo '$(srcdir)/'`xi1/protocol-xchangedevicecontrol.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xchangedevicecontrol.Tpo $(DEPDIR)/tests-protocol-xchangedevicecontrol.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi1/protocol-xchangedevicecontrol.c' object='tests-protocol-xchangedevicecontrol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xchangedevicecontrol.o `test -f 'xi1/protocol-xchangedevicecontrol.c' || echo '$(srcdir)/'`xi1/protocol-xchangedevicecontrol.c tests-protocol-xchangedevicecontrol.obj: xi1/protocol-xchangedevicecontrol.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xchangedevicecontrol.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xchangedevicecontrol.Tpo -c -o tests-protocol-xchangedevicecontrol.obj `if test -f 'xi1/protocol-xchangedevicecontrol.c'; then $(CYGPATH_W) 'xi1/protocol-xchangedevicecontrol.c'; else $(CYGPATH_W) '$(srcdir)/xi1/protocol-xchangedevicecontrol.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xchangedevicecontrol.Tpo $(DEPDIR)/tests-protocol-xchangedevicecontrol.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi1/protocol-xchangedevicecontrol.c' object='tests-protocol-xchangedevicecontrol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xchangedevicecontrol.obj `if test -f 'xi1/protocol-xchangedevicecontrol.c'; then $(CYGPATH_W) 'xi1/protocol-xchangedevicecontrol.c'; else $(CYGPATH_W) '$(srcdir)/xi1/protocol-xchangedevicecontrol.c'; fi` tests-protocol-common.o: xi2/protocol-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-common.o -MD -MP -MF $(DEPDIR)/tests-protocol-common.Tpo -c -o tests-protocol-common.o `test -f 'xi2/protocol-common.c' || echo '$(srcdir)/'`xi2/protocol-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-common.Tpo $(DEPDIR)/tests-protocol-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-common.c' object='tests-protocol-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-common.o `test -f 'xi2/protocol-common.c' || echo '$(srcdir)/'`xi2/protocol-common.c tests-protocol-common.obj: xi2/protocol-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-common.obj -MD -MP -MF $(DEPDIR)/tests-protocol-common.Tpo -c -o tests-protocol-common.obj `if test -f 'xi2/protocol-common.c'; then $(CYGPATH_W) 'xi2/protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-common.Tpo $(DEPDIR)/tests-protocol-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-common.c' object='tests-protocol-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-common.obj `if test -f 'xi2/protocol-common.c'; then $(CYGPATH_W) 'xi2/protocol-common.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-common.c'; fi` tests-protocol-xiqueryversion.o: xi2/protocol-xiqueryversion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiqueryversion.o -MD -MP -MF $(DEPDIR)/tests-protocol-xiqueryversion.Tpo -c -o tests-protocol-xiqueryversion.o `test -f 'xi2/protocol-xiqueryversion.c' || echo '$(srcdir)/'`xi2/protocol-xiqueryversion.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiqueryversion.Tpo $(DEPDIR)/tests-protocol-xiqueryversion.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiqueryversion.c' object='tests-protocol-xiqueryversion.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiqueryversion.o `test -f 'xi2/protocol-xiqueryversion.c' || echo '$(srcdir)/'`xi2/protocol-xiqueryversion.c tests-protocol-xiqueryversion.obj: xi2/protocol-xiqueryversion.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiqueryversion.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xiqueryversion.Tpo -c -o tests-protocol-xiqueryversion.obj `if test -f 'xi2/protocol-xiqueryversion.c'; then $(CYGPATH_W) 'xi2/protocol-xiqueryversion.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiqueryversion.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiqueryversion.Tpo $(DEPDIR)/tests-protocol-xiqueryversion.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiqueryversion.c' object='tests-protocol-xiqueryversion.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiqueryversion.obj `if test -f 'xi2/protocol-xiqueryversion.c'; then $(CYGPATH_W) 'xi2/protocol-xiqueryversion.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiqueryversion.c'; fi` tests-protocol-xiquerydevice.o: xi2/protocol-xiquerydevice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiquerydevice.o -MD -MP -MF $(DEPDIR)/tests-protocol-xiquerydevice.Tpo -c -o tests-protocol-xiquerydevice.o `test -f 'xi2/protocol-xiquerydevice.c' || echo '$(srcdir)/'`xi2/protocol-xiquerydevice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiquerydevice.Tpo $(DEPDIR)/tests-protocol-xiquerydevice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiquerydevice.c' object='tests-protocol-xiquerydevice.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiquerydevice.o `test -f 'xi2/protocol-xiquerydevice.c' || echo '$(srcdir)/'`xi2/protocol-xiquerydevice.c tests-protocol-xiquerydevice.obj: xi2/protocol-xiquerydevice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiquerydevice.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xiquerydevice.Tpo -c -o tests-protocol-xiquerydevice.obj `if test -f 'xi2/protocol-xiquerydevice.c'; then $(CYGPATH_W) 'xi2/protocol-xiquerydevice.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiquerydevice.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiquerydevice.Tpo $(DEPDIR)/tests-protocol-xiquerydevice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiquerydevice.c' object='tests-protocol-xiquerydevice.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiquerydevice.obj `if test -f 'xi2/protocol-xiquerydevice.c'; then $(CYGPATH_W) 'xi2/protocol-xiquerydevice.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiquerydevice.c'; fi` tests-protocol-xiselectevents.o: xi2/protocol-xiselectevents.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiselectevents.o -MD -MP -MF $(DEPDIR)/tests-protocol-xiselectevents.Tpo -c -o tests-protocol-xiselectevents.o `test -f 'xi2/protocol-xiselectevents.c' || echo '$(srcdir)/'`xi2/protocol-xiselectevents.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiselectevents.Tpo $(DEPDIR)/tests-protocol-xiselectevents.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiselectevents.c' object='tests-protocol-xiselectevents.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiselectevents.o `test -f 'xi2/protocol-xiselectevents.c' || echo '$(srcdir)/'`xi2/protocol-xiselectevents.c tests-protocol-xiselectevents.obj: xi2/protocol-xiselectevents.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiselectevents.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xiselectevents.Tpo -c -o tests-protocol-xiselectevents.obj `if test -f 'xi2/protocol-xiselectevents.c'; then $(CYGPATH_W) 'xi2/protocol-xiselectevents.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiselectevents.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiselectevents.Tpo $(DEPDIR)/tests-protocol-xiselectevents.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiselectevents.c' object='tests-protocol-xiselectevents.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiselectevents.obj `if test -f 'xi2/protocol-xiselectevents.c'; then $(CYGPATH_W) 'xi2/protocol-xiselectevents.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiselectevents.c'; fi` tests-protocol-xigetselectedevents.o: xi2/protocol-xigetselectedevents.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xigetselectedevents.o -MD -MP -MF $(DEPDIR)/tests-protocol-xigetselectedevents.Tpo -c -o tests-protocol-xigetselectedevents.o `test -f 'xi2/protocol-xigetselectedevents.c' || echo '$(srcdir)/'`xi2/protocol-xigetselectedevents.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xigetselectedevents.Tpo $(DEPDIR)/tests-protocol-xigetselectedevents.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xigetselectedevents.c' object='tests-protocol-xigetselectedevents.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xigetselectedevents.o `test -f 'xi2/protocol-xigetselectedevents.c' || echo '$(srcdir)/'`xi2/protocol-xigetselectedevents.c tests-protocol-xigetselectedevents.obj: xi2/protocol-xigetselectedevents.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xigetselectedevents.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xigetselectedevents.Tpo -c -o tests-protocol-xigetselectedevents.obj `if test -f 'xi2/protocol-xigetselectedevents.c'; then $(CYGPATH_W) 'xi2/protocol-xigetselectedevents.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xigetselectedevents.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xigetselectedevents.Tpo $(DEPDIR)/tests-protocol-xigetselectedevents.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xigetselectedevents.c' object='tests-protocol-xigetselectedevents.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xigetselectedevents.obj `if test -f 'xi2/protocol-xigetselectedevents.c'; then $(CYGPATH_W) 'xi2/protocol-xigetselectedevents.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xigetselectedevents.c'; fi` tests-protocol-xisetclientpointer.o: xi2/protocol-xisetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xisetclientpointer.o -MD -MP -MF $(DEPDIR)/tests-protocol-xisetclientpointer.Tpo -c -o tests-protocol-xisetclientpointer.o `test -f 'xi2/protocol-xisetclientpointer.c' || echo '$(srcdir)/'`xi2/protocol-xisetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xisetclientpointer.Tpo $(DEPDIR)/tests-protocol-xisetclientpointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xisetclientpointer.c' object='tests-protocol-xisetclientpointer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xisetclientpointer.o `test -f 'xi2/protocol-xisetclientpointer.c' || echo '$(srcdir)/'`xi2/protocol-xisetclientpointer.c tests-protocol-xisetclientpointer.obj: xi2/protocol-xisetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xisetclientpointer.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xisetclientpointer.Tpo -c -o tests-protocol-xisetclientpointer.obj `if test -f 'xi2/protocol-xisetclientpointer.c'; then $(CYGPATH_W) 'xi2/protocol-xisetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xisetclientpointer.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xisetclientpointer.Tpo $(DEPDIR)/tests-protocol-xisetclientpointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xisetclientpointer.c' object='tests-protocol-xisetclientpointer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xisetclientpointer.obj `if test -f 'xi2/protocol-xisetclientpointer.c'; then $(CYGPATH_W) 'xi2/protocol-xisetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xisetclientpointer.c'; fi` tests-protocol-xigetclientpointer.o: xi2/protocol-xigetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xigetclientpointer.o -MD -MP -MF $(DEPDIR)/tests-protocol-xigetclientpointer.Tpo -c -o tests-protocol-xigetclientpointer.o `test -f 'xi2/protocol-xigetclientpointer.c' || echo '$(srcdir)/'`xi2/protocol-xigetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xigetclientpointer.Tpo $(DEPDIR)/tests-protocol-xigetclientpointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xigetclientpointer.c' object='tests-protocol-xigetclientpointer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xigetclientpointer.o `test -f 'xi2/protocol-xigetclientpointer.c' || echo '$(srcdir)/'`xi2/protocol-xigetclientpointer.c tests-protocol-xigetclientpointer.obj: xi2/protocol-xigetclientpointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xigetclientpointer.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xigetclientpointer.Tpo -c -o tests-protocol-xigetclientpointer.obj `if test -f 'xi2/protocol-xigetclientpointer.c'; then $(CYGPATH_W) 'xi2/protocol-xigetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xigetclientpointer.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xigetclientpointer.Tpo $(DEPDIR)/tests-protocol-xigetclientpointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xigetclientpointer.c' object='tests-protocol-xigetclientpointer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xigetclientpointer.obj `if test -f 'xi2/protocol-xigetclientpointer.c'; then $(CYGPATH_W) 'xi2/protocol-xigetclientpointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xigetclientpointer.c'; fi` tests-protocol-xiquerypointer.o: xi2/protocol-xiquerypointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiquerypointer.o -MD -MP -MF $(DEPDIR)/tests-protocol-xiquerypointer.Tpo -c -o tests-protocol-xiquerypointer.o `test -f 'xi2/protocol-xiquerypointer.c' || echo '$(srcdir)/'`xi2/protocol-xiquerypointer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiquerypointer.Tpo $(DEPDIR)/tests-protocol-xiquerypointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiquerypointer.c' object='tests-protocol-xiquerypointer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiquerypointer.o `test -f 'xi2/protocol-xiquerypointer.c' || echo '$(srcdir)/'`xi2/protocol-xiquerypointer.c tests-protocol-xiquerypointer.obj: xi2/protocol-xiquerypointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiquerypointer.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xiquerypointer.Tpo -c -o tests-protocol-xiquerypointer.obj `if test -f 'xi2/protocol-xiquerypointer.c'; then $(CYGPATH_W) 'xi2/protocol-xiquerypointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiquerypointer.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiquerypointer.Tpo $(DEPDIR)/tests-protocol-xiquerypointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiquerypointer.c' object='tests-protocol-xiquerypointer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiquerypointer.obj `if test -f 'xi2/protocol-xiquerypointer.c'; then $(CYGPATH_W) 'xi2/protocol-xiquerypointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiquerypointer.c'; fi` tests-protocol-xipassivegrabdevice.o: xi2/protocol-xipassivegrabdevice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xipassivegrabdevice.o -MD -MP -MF $(DEPDIR)/tests-protocol-xipassivegrabdevice.Tpo -c -o tests-protocol-xipassivegrabdevice.o `test -f 'xi2/protocol-xipassivegrabdevice.c' || echo '$(srcdir)/'`xi2/protocol-xipassivegrabdevice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xipassivegrabdevice.Tpo $(DEPDIR)/tests-protocol-xipassivegrabdevice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xipassivegrabdevice.c' object='tests-protocol-xipassivegrabdevice.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xipassivegrabdevice.o `test -f 'xi2/protocol-xipassivegrabdevice.c' || echo '$(srcdir)/'`xi2/protocol-xipassivegrabdevice.c tests-protocol-xipassivegrabdevice.obj: xi2/protocol-xipassivegrabdevice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xipassivegrabdevice.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xipassivegrabdevice.Tpo -c -o tests-protocol-xipassivegrabdevice.obj `if test -f 'xi2/protocol-xipassivegrabdevice.c'; then $(CYGPATH_W) 'xi2/protocol-xipassivegrabdevice.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xipassivegrabdevice.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xipassivegrabdevice.Tpo $(DEPDIR)/tests-protocol-xipassivegrabdevice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xipassivegrabdevice.c' object='tests-protocol-xipassivegrabdevice.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xipassivegrabdevice.obj `if test -f 'xi2/protocol-xipassivegrabdevice.c'; then $(CYGPATH_W) 'xi2/protocol-xipassivegrabdevice.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xipassivegrabdevice.c'; fi` tests-protocol-xiwarppointer.o: xi2/protocol-xiwarppointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiwarppointer.o -MD -MP -MF $(DEPDIR)/tests-protocol-xiwarppointer.Tpo -c -o tests-protocol-xiwarppointer.o `test -f 'xi2/protocol-xiwarppointer.c' || echo '$(srcdir)/'`xi2/protocol-xiwarppointer.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiwarppointer.Tpo $(DEPDIR)/tests-protocol-xiwarppointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiwarppointer.c' object='tests-protocol-xiwarppointer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiwarppointer.o `test -f 'xi2/protocol-xiwarppointer.c' || echo '$(srcdir)/'`xi2/protocol-xiwarppointer.c tests-protocol-xiwarppointer.obj: xi2/protocol-xiwarppointer.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-xiwarppointer.obj -MD -MP -MF $(DEPDIR)/tests-protocol-xiwarppointer.Tpo -c -o tests-protocol-xiwarppointer.obj `if test -f 'xi2/protocol-xiwarppointer.c'; then $(CYGPATH_W) 'xi2/protocol-xiwarppointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiwarppointer.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-xiwarppointer.Tpo $(DEPDIR)/tests-protocol-xiwarppointer.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-xiwarppointer.c' object='tests-protocol-xiwarppointer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-xiwarppointer.obj `if test -f 'xi2/protocol-xiwarppointer.c'; then $(CYGPATH_W) 'xi2/protocol-xiwarppointer.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-xiwarppointer.c'; fi` tests-protocol-eventconvert.o: xi2/protocol-eventconvert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-eventconvert.o -MD -MP -MF $(DEPDIR)/tests-protocol-eventconvert.Tpo -c -o tests-protocol-eventconvert.o `test -f 'xi2/protocol-eventconvert.c' || echo '$(srcdir)/'`xi2/protocol-eventconvert.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-eventconvert.Tpo $(DEPDIR)/tests-protocol-eventconvert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-eventconvert.c' object='tests-protocol-eventconvert.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-eventconvert.o `test -f 'xi2/protocol-eventconvert.c' || echo '$(srcdir)/'`xi2/protocol-eventconvert.c tests-protocol-eventconvert.obj: xi2/protocol-eventconvert.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-protocol-eventconvert.obj -MD -MP -MF $(DEPDIR)/tests-protocol-eventconvert.Tpo -c -o tests-protocol-eventconvert.obj `if test -f 'xi2/protocol-eventconvert.c'; then $(CYGPATH_W) 'xi2/protocol-eventconvert.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-eventconvert.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-protocol-eventconvert.Tpo $(DEPDIR)/tests-protocol-eventconvert.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/protocol-eventconvert.c' object='tests-protocol-eventconvert.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-protocol-eventconvert.obj `if test -f 'xi2/protocol-eventconvert.c'; then $(CYGPATH_W) 'xi2/protocol-eventconvert.c'; else $(CYGPATH_W) '$(srcdir)/xi2/protocol-eventconvert.c'; fi` tests-xi2.o: xi2/xi2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xi2.o -MD -MP -MF $(DEPDIR)/tests-xi2.Tpo -c -o tests-xi2.o `test -f 'xi2/xi2.c' || echo '$(srcdir)/'`xi2/xi2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xi2.Tpo $(DEPDIR)/tests-xi2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/xi2.c' object='tests-xi2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xi2.o `test -f 'xi2/xi2.c' || echo '$(srcdir)/'`xi2/xi2.c tests-xi2.obj: xi2/xi2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-xi2.obj -MD -MP -MF $(DEPDIR)/tests-xi2.Tpo -c -o tests-xi2.obj `if test -f 'xi2/xi2.c'; then $(CYGPATH_W) 'xi2/xi2.c'; else $(CYGPATH_W) '$(srcdir)/xi2/xi2.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-xi2.Tpo $(DEPDIR)/tests-xi2.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xi2/xi2.c' object='tests-xi2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-xi2.obj `if test -f 'xi2/xi2.c'; then $(CYGPATH_W) 'xi2/xi2.c'; else $(CYGPATH_W) '$(srcdir)/xi2/xi2.c'; fi` tests-sdksyms.o: sdksyms.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-sdksyms.o -MD -MP -MF $(DEPDIR)/tests-sdksyms.Tpo -c -o tests-sdksyms.o `test -f 'sdksyms.c' || echo '$(srcdir)/'`sdksyms.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-sdksyms.Tpo $(DEPDIR)/tests-sdksyms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdksyms.c' object='tests-sdksyms.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-sdksyms.o `test -f 'sdksyms.c' || echo '$(srcdir)/'`sdksyms.c tests-sdksyms.obj: sdksyms.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests-sdksyms.obj -MD -MP -MF $(DEPDIR)/tests-sdksyms.Tpo -c -o tests-sdksyms.obj `if test -f 'sdksyms.c'; then $(CYGPATH_W) 'sdksyms.c'; else $(CYGPATH_W) '$(srcdir)/sdksyms.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/tests-sdksyms.Tpo $(DEPDIR)/tests-sdksyms.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdksyms.c' object='tests-sdksyms.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests-sdksyms.obj `if test -f 'sdksyms.c'; then $(CYGPATH_W) 'sdksyms.c'; else $(CYGPATH_W) '$(srcdir)/sdksyms.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? tests.log: tests$(EXEEXT) @p='tests$(EXEEXT)'; \ b='tests'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) scripts/xvfb-piglit.sh.log: scripts/xvfb-piglit.sh @p='scripts/xvfb-piglit.sh'; \ b='scripts/xvfb-piglit.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) scripts/xephyr-glamor-piglit.sh.log: scripts/xephyr-glamor-piglit.sh @p='scripts/xephyr-glamor-piglit.sh'; \ b='scripts/xephyr-glamor-piglit.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) xi1-tests.log: xi1-tests @p='xi1-tests'; \ b='xi1-tests'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) xi2-tests.log: xi2-tests @p='xi2-tests'; \ b='xi2-tests'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-recursive -rm -f ./$(DEPDIR)/simple-xinit.Po -rm -f ./$(DEPDIR)/tests-fixes.Po -rm -f ./$(DEPDIR)/tests-hashtabletest.Po -rm -f ./$(DEPDIR)/tests-input.Po -rm -f ./$(DEPDIR)/tests-list.Po -rm -f ./$(DEPDIR)/tests-misc.Po -rm -f ./$(DEPDIR)/tests-protocol-common.Po -rm -f ./$(DEPDIR)/tests-protocol-eventconvert.Po -rm -f ./$(DEPDIR)/tests-protocol-xchangedevicecontrol.Po -rm -f ./$(DEPDIR)/tests-protocol-xigetclientpointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xigetselectedevents.Po -rm -f ./$(DEPDIR)/tests-protocol-xipassivegrabdevice.Po -rm -f ./$(DEPDIR)/tests-protocol-xiquerydevice.Po -rm -f ./$(DEPDIR)/tests-protocol-xiquerypointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xiqueryversion.Po -rm -f ./$(DEPDIR)/tests-protocol-xiselectevents.Po -rm -f ./$(DEPDIR)/tests-protocol-xisetclientpointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xiwarppointer.Po -rm -f ./$(DEPDIR)/tests-sdksyms.Po -rm -f ./$(DEPDIR)/tests-signal-logging.Po -rm -f ./$(DEPDIR)/tests-string.Po -rm -f ./$(DEPDIR)/tests-test_xkb.Po -rm -f ./$(DEPDIR)/tests-tests-common.Po -rm -f ./$(DEPDIR)/tests-tests.Po -rm -f ./$(DEPDIR)/tests-touch.Po -rm -f ./$(DEPDIR)/tests-xfree86.Po -rm -f ./$(DEPDIR)/tests-xi2.Po -rm -f ./$(DEPDIR)/tests-xtest.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/simple-xinit.Po -rm -f ./$(DEPDIR)/tests-fixes.Po -rm -f ./$(DEPDIR)/tests-hashtabletest.Po -rm -f ./$(DEPDIR)/tests-input.Po -rm -f ./$(DEPDIR)/tests-list.Po -rm -f ./$(DEPDIR)/tests-misc.Po -rm -f ./$(DEPDIR)/tests-protocol-common.Po -rm -f ./$(DEPDIR)/tests-protocol-eventconvert.Po -rm -f ./$(DEPDIR)/tests-protocol-xchangedevicecontrol.Po -rm -f ./$(DEPDIR)/tests-protocol-xigetclientpointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xigetselectedevents.Po -rm -f ./$(DEPDIR)/tests-protocol-xipassivegrabdevice.Po -rm -f ./$(DEPDIR)/tests-protocol-xiquerydevice.Po -rm -f ./$(DEPDIR)/tests-protocol-xiquerypointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xiqueryversion.Po -rm -f ./$(DEPDIR)/tests-protocol-xiselectevents.Po -rm -f ./$(DEPDIR)/tests-protocol-xisetclientpointer.Po -rm -f ./$(DEPDIR)/tests-protocol-xiwarppointer.Po -rm -f ./$(DEPDIR)/tests-sdksyms.Po -rm -f ./$(DEPDIR)/tests-signal-logging.Po -rm -f ./$(DEPDIR)/tests-string.Po -rm -f ./$(DEPDIR)/tests-test_xkb.Po -rm -f ./$(DEPDIR)/tests-tests-common.Po -rm -f ./$(DEPDIR)/tests-tests.Po -rm -f ./$(DEPDIR)/tests-touch.Po -rm -f ./$(DEPDIR)/tests-xfree86.Po -rm -f ./$(DEPDIR)/tests-xi2.Po -rm -f ./$(DEPDIR)/tests-xtest.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-exec install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--depfiles check check-TESTS check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@xi1-tests: @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ @echo 'echo "ld -wrap support required for xi1 unit tests, skipping"' > $@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ @echo 'exit 77' >> $@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ $(AM_V_GEN)chmod +x $@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@xi2-tests: @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ @echo 'echo "ld -wrap support required for xi2 unit tests, skipping"' > $@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ @echo 'exit 77' >> $@ @ENABLE_UNIT_TESTS_TRUE@@HAVE_LD_WRAP_FALSE@ $(AM_V_GEN)chmod +x $@ @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@sdksyms.c: $(top_builddir)/hw/xfree86/sdksyms.c @ENABLE_UNIT_TESTS_TRUE@@XORG_TRUE@ $(AM_V_GEN)$(LN_S) $(top_builddir)/hw/xfree86/sdksyms.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/test/README0000644000175000017500000000204114757411105011467 X server test suite This suite contains a set of tests to verify the behaviour of functions used internally to the server. = How it works = Through some automake abuse, we link the test programs with the same static libraries as the Xorg binary. The test suites can then call various functions and verify their behaviour - without the need to start the server or connect clients. This testing only works for functions that do not rely on a particular state of the X server. Unless the test suite replicates the expected state, which may be difficult. = How to run the tests = Run "make check" in the test directory. This will compile the tests and execute them in the order specified in the TESTS variable in test/Makefile.am. Each set of tests related to a subsystem are available as a binary that can be executed directly. For example, run "xkb" to perform some xkb-related tests. == Adding a new test == When adding a new test, ensure that you add a short description of what the test does and what the expected outcome is. xorg-server-21.1.16/test/simple-xinit.c0000644000175000017500000001614714757411105013411 /* * Copyright © 2016 Broadcom * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include #include static void kill_server(int server_pid) { int ret = kill(server_pid, SIGTERM); int wstatus; if (ret) { fprintf(stderr, "Failed to send kill to the server: %s\n", strerror(errno)); exit(1); } ret = waitpid(server_pid, &wstatus, 0); if (ret < 0) { fprintf(stderr, "Failed to wait for X to die: %s\n", strerror(errno)); exit(1); } } static void usage(int argc, char **argv) { fprintf(stderr, "%s -- \n", argv[0]); exit(1); } static int server_displayfd; static const char *server_dead = "server_dead"; static void handle_sigchld(int sig) { write(server_displayfd, server_dead, strlen(server_dead)); } /* Starts the X server, returning its pid. */ static int start_server(char *const *server_args) { int server_pid = fork(); if (server_pid == -1) { fprintf(stderr, "Fork failed: %s\n", strerror(errno)); exit(1); } else if (server_pid != 0) { /* Continue along the main process that will exec the client. */ struct sigaction sa; sa.sa_handler = handle_sigchld; sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART | SA_NOCLDSTOP; if (sigaction(SIGCHLD, &sa, 0) == -1) { fprintf(stderr, "Failed to set up signal handler: %s\n", strerror(errno)); exit(1); } return server_pid; } /* Execute the server. This only returns if an error occurred. */ execvp(server_args[0], server_args); fprintf(stderr, "Error starting the server: %s\n", strerror(errno)); exit(1); } /* Reads the display number out of the started server's display socket. */ static int get_display(int displayfd) { char display_string[20]; ssize_t ret; ret = read(displayfd, display_string, sizeof(display_string) - 1); if (ret <= 0) { fprintf(stderr, "Failed reading displayfd: %s\n", strerror(errno)); exit(1); } /* We've read in the display number as a string terminated by * '\n', but not '\0'. Cap it and parse the number. */ display_string[ret] = '\0'; if (strncmp(display_string, server_dead, strlen(server_dead)) == 0) { fprintf(stderr, "Server failed to start before setting up displayfd\n"); exit(1); } return atoi(display_string); } static int start_client(char *const *client_args, int display) { char *display_string; int ret; int client_pid; ret = asprintf(&display_string, ":%d", display); if (ret < 0) { fprintf(stderr, "asprintf fail\n"); exit(1); } ret = setenv("DISPLAY", display_string, true); if (ret) { fprintf(stderr, "Failed to set DISPLAY\n"); exit(1); } client_pid = fork(); if (client_pid == -1) { fprintf(stderr, "Fork failed: %s\n", strerror(errno)); exit(1); } else if (client_pid) { int wstatus; ret = waitpid(client_pid, &wstatus, 0); if (ret < 0) { fprintf(stderr, "Error waiting for client to start: %s\n", strerror(errno)); return 1; } if (!WIFEXITED(wstatus)) return 1; return WEXITSTATUS(wstatus); } else { execvp(client_args[0], client_args); /* exec only returns if an error occurred. */ fprintf(stderr, "Error starting the client: %s\n", strerror(errno)); exit(1); } } /* Splits the incoming argc/argv into a pair of NULL-terminated arrays * of args. */ static void parse_args(int argc, char **argv, char * const **out_client_args, char * const **out_server_args, int displayfd) { /* We're stripping the -- and the program name, inserting two * NULLs, and also the -displayfd and fd number. */ char **args_storage = calloc(argc + 2, sizeof(char *)); char *const *client_args; char *const *server_args = NULL; char **next_arg = args_storage; bool parsing_client = true; int i, ret; char *displayfd_string; if (!args_storage) exit(1); client_args = args_storage; for (i = 1; i < argc; i++) { if (strcmp(argv[i], "--") == 0) { if (!parsing_client) usage(argc, argv); /* Cap the client list */ *next_arg = NULL; next_arg++; /* Move to adding into server_args. */ server_args = next_arg; parsing_client = false; continue; } /* A sort of escaped "--" argument so we can nest server * invocations for testing. */ if (strcmp(argv[i], "----") == 0) *next_arg = (char *)"--"; else *next_arg = argv[i]; next_arg++; } if (client_args[0] == NULL || !server_args || server_args[0] == NULL) usage(argc, argv); /* Give the server -displayfd X */ *next_arg = (char *)"-displayfd"; next_arg++; ret = asprintf(&displayfd_string, "%d", displayfd); if (ret < 0) { fprintf(stderr, "asprintf fail\n"); exit(1); } *next_arg = displayfd_string; next_arg++; *out_client_args = client_args; *out_server_args = server_args; } int main(int argc, char **argv) { char * const *client_args; char * const *server_args; int displayfd_pipe[2]; int display, server_pid; int ret; ret = pipe(displayfd_pipe); if (ret) { fprintf(stderr, "Pipe creation failure: %s", strerror(errno)); exit(1); } server_displayfd = displayfd_pipe[1]; parse_args(argc, argv, &client_args, &server_args, server_displayfd); server_pid = start_server(server_args); display = get_display(displayfd_pipe[0]); ret = start_client(client_args, display); kill_server(server_pid); exit(ret); } xorg-server-21.1.16/test/tests-common.c0000644000175000017500000000124614757411105013411 #include #include #include #include #include #include "tests-common.h" void run_test_in_child(int (*func)(void), const char *funcname) { int cpid; int csts; int exit_code = -1; printf("\n---------------------\n%s...\n", funcname); cpid = fork(); if (cpid) { waitpid(cpid, &csts, 0); if (!WIFEXITED(csts)) goto child_failed; exit_code = WEXITSTATUS(csts); if (exit_code == 0) printf(" Pass\n"); else { child_failed: printf(" FAIL\n"); exit(exit_code); } } else { exit(func()); } } xorg-server-21.1.16/test/tests-common.h0000644000175000017500000000041714757411105013415 #ifndef TESTS_COMMON_H #define TESTS_COMMON_H #include "tests.h" #define ARRAY_SIZE(a) (sizeof((a)) / sizeof((a)[0])) #define run_test(func) run_test_in_child(func, #func) void run_test_in_child(int (*func)(void), const char *funcname); #endif /* TESTS_COMMON_H */ xorg-server-21.1.16/test/list.c0000644000175000017500000002357114757411105011741 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "tests-common.h" struct parent { int a; struct xorg_list children; int b; }; struct child { int foo; int bar; struct xorg_list node; }; static void test_xorg_list_init(void) { struct parent parent, tmp; memset(&parent, 0, sizeof(parent)); parent.a = 0xa5a5a5; parent.b = ~0xa5a5a5; tmp = parent; xorg_list_init(&parent.children); /* test we haven't touched anything else. */ assert(parent.a == tmp.a); assert(parent.b == tmp.b); assert(xorg_list_is_empty(&parent.children)); } static void test_xorg_list_add(void) { struct parent parent = { 0 }; struct child child[3]; struct child *c; xorg_list_init(&parent.children); xorg_list_add(&child[0].node, &parent.children); assert(!xorg_list_is_empty(&parent.children)); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); /* note: xorg_list_add prepends */ xorg_list_add(&child[1].node, &parent.children); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[1], sizeof(struct child)) == 0); xorg_list_add(&child[2].node, &parent.children); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[2], sizeof(struct child)) == 0); }; static void test_xorg_list_append(void) { struct parent parent = { 0 }; struct child child[3]; struct child *c; int i; xorg_list_init(&parent.children); xorg_list_append(&child[0].node, &parent.children); assert(!xorg_list_is_empty(&parent.children)); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); c = xorg_list_last_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); xorg_list_append(&child[1].node, &parent.children); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); c = xorg_list_last_entry(&parent.children, struct child, node); assert(memcmp(c, &child[1], sizeof(struct child)) == 0); xorg_list_append(&child[2].node, &parent.children); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); c = xorg_list_last_entry(&parent.children, struct child, node); assert(memcmp(c, &child[2], sizeof(struct child)) == 0); i = 0; xorg_list_for_each_entry(c, &parent.children, node) { assert(memcmp(c, &child[i++], sizeof(struct child)) == 0); } }; static void test_xorg_list_del(void) { struct parent parent = { 0 }; struct child child[2]; struct child *c; xorg_list_init(&parent.children); xorg_list_add(&child[0].node, &parent.children); assert(!xorg_list_is_empty(&parent.children)); xorg_list_del(&parent.children); assert(xorg_list_is_empty(&parent.children)); xorg_list_add(&child[0].node, &parent.children); xorg_list_del(&child[0].node); assert(xorg_list_is_empty(&parent.children)); xorg_list_add(&child[0].node, &parent.children); xorg_list_add(&child[1].node, &parent.children); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[1], sizeof(struct child)) == 0); /* delete first node */ xorg_list_del(&child[1].node); assert(!xorg_list_is_empty(&parent.children)); assert(xorg_list_is_empty(&child[1].node)); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[0], sizeof(struct child)) == 0); /* delete last node */ xorg_list_add(&child[1].node, &parent.children); xorg_list_del(&child[0].node); c = xorg_list_first_entry(&parent.children, struct child, node); assert(memcmp(c, &child[1], sizeof(struct child)) == 0); /* delete list head */ xorg_list_add(&child[0].node, &parent.children); xorg_list_del(&parent.children); assert(xorg_list_is_empty(&parent.children)); assert(!xorg_list_is_empty(&child[0].node)); assert(!xorg_list_is_empty(&child[1].node)); } static void test_xorg_list_for_each(void) { struct parent parent = { 0 }; struct child child[3]; struct child *c; int i = 0; xorg_list_init(&parent.children); xorg_list_add(&child[2].node, &parent.children); xorg_list_add(&child[1].node, &parent.children); xorg_list_add(&child[0].node, &parent.children); xorg_list_for_each_entry(c, &parent.children, node) { assert(memcmp(c, &child[i], sizeof(struct child)) == 0); i++; } /* foreach on empty list */ xorg_list_del(&parent.children); assert(xorg_list_is_empty(&parent.children)); xorg_list_for_each_entry(c, &parent.children, node) { assert(0); /* we must not get here */ } } struct foo { char a; struct foo *next; char b; }; static void test_nt_list_init(void) { struct foo foo; foo.a = 10; foo.b = 20; nt_list_init(&foo, next); assert(foo.a == 10); assert(foo.b == 20); assert(foo.next == NULL); assert(nt_list_next(&foo, next) == NULL); } static void test_nt_list_append(void) { int i; struct foo *foo = calloc(10, sizeof(struct foo)); struct foo *item; for (item = foo, i = 1; i <= 10; i++, item++) { item->a = i; item->b = i * 2; nt_list_init(item, next); if (item != foo) nt_list_append(item, foo, struct foo, next); } /* Test using nt_list_next */ for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { assert(item->a == i); assert(item->b == i * 2); } /* Test using nt_list_for_each_entry */ i = 1; nt_list_for_each_entry(item, foo, next) { assert(item->a == i); assert(item->b == i * 2); i++; } assert(i == 11); } static void test_nt_list_insert(void) { int i; struct foo *foo = calloc(10, sizeof(struct foo)); struct foo *item; foo->a = 1; foo->b = 2; nt_list_init(foo, next); for (item = &foo[1], i = 10; i > 1; i--, item++) { item->a = i; item->b = i * 2; nt_list_init(item, next); nt_list_insert(item, foo, struct foo, next); } /* Test using nt_list_next */ for (item = foo, i = 1; i <= 10; i++, item = nt_list_next(item, next)) { assert(item->a == i); assert(item->b == i * 2); } /* Test using nt_list_for_each_entry */ i = 1; nt_list_for_each_entry(item, foo, next) { assert(item->a == i); assert(item->b == i * 2); i++; } assert(i == 11); } static void test_nt_list_delete(void) { int i = 1; struct foo *list = calloc(10, sizeof(struct foo)); struct foo *foo = list; struct foo *item, *tmp; struct foo *empty_list = foo; nt_list_init(empty_list, next); nt_list_del(empty_list, empty_list, struct foo, next); assert(!empty_list); for (item = foo, i = 1; i <= 10; i++, item++) { item->a = i; item->b = i * 2; nt_list_init(item, next); if (item != foo) nt_list_append(item, foo, struct foo, next); } i = 0; nt_list_for_each_entry(item, foo, next) { i++; } assert(i == 10); /* delete last item */ nt_list_del(&foo[9], foo, struct foo, next); i = 0; nt_list_for_each_entry(item, foo, next) { assert(item->a != 10); /* element 10 is gone now */ i++; } assert(i == 9); /* 9 elements left */ /* delete second item */ nt_list_del(foo->next, foo, struct foo, next); assert(foo->next->a == 3); i = 0; nt_list_for_each_entry(item, foo, next) { assert(item->a != 10); /* element 10 is gone now */ assert(item->a != 2); /* element 2 is gone now */ i++; } assert(i == 8); /* 9 elements left */ item = foo; /* delete first item */ nt_list_del(foo, foo, struct foo, next); assert(item != foo); assert(item->next == NULL); assert(foo->a == 3); assert(foo->next->a == 4); nt_list_for_each_entry_safe(item, tmp, foo, next) { nt_list_del(item, foo, struct foo, next); } assert(!foo); assert(!item); free(list); } int list_test(void) { test_xorg_list_init(); test_xorg_list_add(); test_xorg_list_append(); test_xorg_list_del(); test_xorg_list_for_each(); test_nt_list_init(); test_nt_list_append(); test_nt_list_insert(); test_nt_list_delete(); return 0; } xorg-server-21.1.16/test/string.c0000644000175000017500000000421614757411105012267 /* * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /** * Tests for fallback implementations of string handling routines * provided in os/ subdirectory for some platforms. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "os.h" #include "tests-common.h" /* Ensure we're testing our functions, even on platforms with libc versions */ #include #undef strndup #define strndup my_strndup char *strndup(const char *str, size_t n); #include "../os/strndup.c" static void strndup_checks(void) { const char *sample = "0123456789abcdef"; char *allofit; char *firsthalf = strndup(sample, 8); char *secondhalf = strndup(sample + 8, 8); assert(strcmp(firsthalf, "01234567") == 0); assert(strcmp(secondhalf, "89abcdef") == 0); free(firsthalf); free(secondhalf); allofit = strndup(sample, 20); assert(strcmp(allofit, sample) == 0); free(allofit); } int string_test(void) { strndup_checks(); return 0; } xorg-server-21.1.16/test/tests.c0000644000175000017500000000202514757411105012117 #include #include "tests.h" #include "tests-common.h" int main(int argc, char **argv) { run_test(list_test); run_test(string_test); #ifdef XORG_TESTS run_test(fixes_test); run_test(input_test); run_test(misc_test); run_test(signal_logging_test); run_test(touch_test); run_test(xfree86_test); run_test(xkb_test); run_test(xtest_test); #ifdef RES_TESTS run_test(hashtabletest_test); #endif #ifdef LDWRAP_TESTS run_test(protocol_xchangedevicecontrol_test); run_test(protocol_xiqueryversion_test); run_test(protocol_xiquerydevice_test); run_test(protocol_xiselectevents_test); run_test(protocol_xigetselectedevents_test); run_test(protocol_xisetclientpointer_test); run_test(protocol_xigetclientpointer_test); run_test(protocol_xipassivegrabdevice_test); run_test(protocol_xiquerypointer_test); run_test(protocol_xiwarppointer_test); run_test(protocol_eventconvert_test); run_test(xi2_test); #endif #endif /* XORG_TESTS */ return 0; } xorg-server-21.1.16/test/tests.h0000644000175000017500000000165414757411105012133 #ifndef TESTS_H #define TESTS_H int fixes_test(void); int hashtabletest_test(void); int input_test(void); int list_test(void); int misc_test(void); int signal_logging_test(void); int string_test(void); int touch_test(void); int xfree86_test(void); int xkb_test(void); int xtest_test(void); int protocol_xchangedevicecontrol_test(void); int protocol_xiqueryversion_test(void); int protocol_xiquerydevice_test(void); int protocol_xiselectevents_test(void); int protocol_xigetselectedevents_test(void); int protocol_xisetclientpointer_test(void); int protocol_xigetclientpointer_test(void); int protocol_xipassivegrabdevice_test(void); int protocol_xiquerypointer_test(void); int protocol_xiwarppointer_test(void); int protocol_eventconvert_test(void); int xi2_test(void); #ifndef INSIDE_PROTOCOL_COMMON extern int enable_XISetEventMask_wrap; extern int enable_GrabButton_wrap; #endif /* INSIDE_PROTOCOL_COMMON */ #endif /* TESTS_H */ xorg-server-21.1.16/test/fixes.c0000644000175000017500000002303014757411105012072 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "tests-common.h" static void _fixes_test_direction(struct PointerBarrier *barrier, int d[4], int permitted) { BOOL blocking; int i, j; int dir = barrier_get_direction(d[0], d[1], d[2], d[3]); barrier->directions = 0; blocking = barrier_is_blocking_direction(barrier, dir); assert(blocking); for (j = 0; j <= BarrierNegativeY; j++) { for (i = 0; i <= BarrierNegativeY; i++) { barrier->directions |= 1 << i; blocking = barrier_is_blocking_direction(barrier, dir); assert((barrier->directions & permitted) == permitted ? !blocking : blocking); } } } static void fixes_pointer_barrier_direction_test(void) { struct PointerBarrier barrier; int x = 100; int y = 100; int directions[8][4] = { {x, y, x, y + 100}, /* S */ {x + 50, y, x - 50, y + 100}, /* SW */ {x + 100, y, x, y}, /* W */ {x + 100, y + 50, x, y - 50}, /* NW */ {x, y + 100, x, y}, /* N */ {x - 50, y + 100, x + 50, y}, /* NE */ {x, y, x + 100, y}, /* E */ {x, y - 50, x + 100, y + 50}, /* SE */ }; barrier.x1 = x; barrier.x2 = x; barrier.y1 = y - 50; barrier.y2 = y + 49; _fixes_test_direction(&barrier, directions[0], BarrierPositiveY); _fixes_test_direction(&barrier, directions[1], BarrierPositiveY | BarrierNegativeX); _fixes_test_direction(&barrier, directions[2], BarrierNegativeX); _fixes_test_direction(&barrier, directions[3], BarrierNegativeY | BarrierNegativeX); _fixes_test_direction(&barrier, directions[4], BarrierNegativeY); _fixes_test_direction(&barrier, directions[5], BarrierPositiveX | BarrierNegativeY); _fixes_test_direction(&barrier, directions[6], BarrierPositiveX); _fixes_test_direction(&barrier, directions[7], BarrierPositiveY | BarrierPositiveX); } static void fixes_pointer_barriers_test(void) { struct PointerBarrier barrier; int x1, y1, x2, y2; double distance; int x = 100; int y = 100; /* vert barrier */ barrier.x1 = x; barrier.x2 = x; barrier.y1 = y - 50; barrier.y2 = y + 50; /* across at half-way */ x1 = x + 1; x2 = x - 1; y1 = y; y2 = y; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); assert(distance == 1); /* definitely not across */ x1 = x + 10; x2 = x + 5; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across, but outside of y range */ x1 = x + 1; x2 = x - 1; y1 = y + 100; y2 = y + 100; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across, diagonally */ x1 = x + 5; x2 = x - 5; y1 = y + 5; y2 = y - 5; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across but outside boundary, diagonally */ x1 = x + 5; x2 = x - 5; y1 = y + 100; y2 = y + 50; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → blocking */ x1 = x; x2 = x - 1; y1 = y; y2 = y; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → not blocking, positive */ x1 = x; x2 = x + 1; y1 = y; y2 = y; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → not blocking, negative */ x1 = x - 1; x2 = x - 2; y1 = y; y2 = y; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: endpoint of movement on barrier → blocking */ x1 = x + 1; x2 = x; y1 = y; y2 = y; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* startpoint on barrier but outside y range */ x1 = x; x2 = x - 1; y1 = y + 100; y2 = y + 100; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* endpoint on barrier but outside y range */ x1 = x + 1; x2 = x; y1 = y + 100; y2 = y + 100; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* horizontal barrier */ barrier.x1 = x - 50; barrier.x2 = x + 50; barrier.y1 = y; barrier.y2 = y; /* across at half-way */ x1 = x; x2 = x; y1 = y - 1; y2 = y + 1; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* definitely not across */ y1 = y + 10; y2 = y + 5; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across, but outside of y range */ x1 = x + 100; x2 = x + 100; y1 = y + 1; y2 = y - 1; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across, diagonally */ y1 = y + 5; y2 = y - 5; x1 = x + 5; x2 = x - 5; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* across but outside boundary, diagonally */ y1 = y + 5; y2 = y - 5; x1 = x + 100; x2 = x + 50; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → blocking */ y1 = y; y2 = y - 1; x1 = x; x2 = x; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → not blocking, positive */ y1 = y; y2 = y + 1; x1 = x; x2 = x; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: startpoint of movement on barrier → not blocking, negative */ y1 = y - 1; y2 = y - 2; x1 = x; x2 = x; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* edge case: endpoint of movement on barrier → blocking */ y1 = y + 1; y2 = y; x1 = x; x2 = x; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* startpoint on barrier but outside y range */ y1 = y; y2 = y - 1; x1 = x + 100; x2 = x + 100; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* endpoint on barrier but outside y range */ y1 = y + 1; y2 = y; x1 = x + 100; x2 = x + 100; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* ray vert barrier */ barrier.x1 = x; barrier.x2 = x; barrier.y1 = -1; barrier.y2 = y + 100; /* ray barrier simple case */ y1 = y; y2 = y; x1 = x + 50; x2 = x - 50; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* endpoint outside y range; should be blocked */ y1 = y - 1000; y2 = y - 1000; x1 = x + 50; x2 = x - 50; assert(barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); /* endpoint outside y range */ y1 = y + 150; y2 = y + 150; x1 = x + 50; x2 = x - 50; assert(!barrier_is_blocking(&barrier, x1, y1, x2, y2, &distance)); } static void fixes_pointer_barrier_clamp_test(void) { struct PointerBarrier barrier; int x = 100; int y = 100; int cx, cy; /* clamped */ /* vert barrier */ barrier.x1 = x; barrier.x2 = x; barrier.y1 = y - 50; barrier.y2 = y + 49; barrier.directions = 0; cx = INT_MAX; cy = INT_MAX; barrier_clamp_to_barrier(&barrier, BarrierPositiveX, &cx, &cy); assert(cx == barrier.x1 - 1); assert(cy == INT_MAX); cx = 0; cy = INT_MAX; barrier_clamp_to_barrier(&barrier, BarrierNegativeX, &cx, &cy); assert(cx == barrier.x1); assert(cy == INT_MAX); /* horiz barrier */ barrier.x1 = x - 50; barrier.x2 = x + 49; barrier.y1 = y; barrier.y2 = y; barrier.directions = 0; cx = INT_MAX; cy = INT_MAX; barrier_clamp_to_barrier(&barrier, BarrierPositiveY, &cx, &cy); assert(cx == INT_MAX); assert(cy == barrier.y1 - 1); cx = INT_MAX; cy = 0; barrier_clamp_to_barrier(&barrier, BarrierNegativeY, &cx, &cy); assert(cx == INT_MAX); assert(cy == barrier.y1); } int fixes_test(void) { fixes_pointer_barriers_test(); fixes_pointer_barrier_direction_test(); fixes_pointer_barrier_clamp_test(); return 0; } xorg-server-21.1.16/test/input.c0000644000175000017500000015635714757411105012136 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "resource.h" #include #include #include #include "windowstr.h" #include "inputstr.h" #include "eventconvert.h" #include "exevents.h" #include "exglobals.h" #include "dixgrabs.h" #include "eventstr.h" #include "inpututils.h" #include "mi.h" #include "assert.h" #include "tests-common.h" /** * Init a device with axes. * Verify values set on the device. * * Result: All axes set to default values (usually 0). */ static void dix_init_valuators(void) { DeviceIntRec dev; ValuatorClassPtr val; AxisInfoPtr axis; const int num_axes = 2; int i; Atom atoms[MAX_VALUATORS] = { 0 }; memset(&dev, 0, sizeof(DeviceIntRec)); dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */ assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE); assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute)); val = dev.valuator; assert(val); assert(val->numAxes == num_axes); assert(val->numMotionEvents == 0); assert(val->axisVal); for (i = 0; i < num_axes; i++) { assert(val->axisVal[i] == 0); assert(val->axes->min_value == NO_AXIS_LIMITS); assert(val->axes->max_value == NO_AXIS_LIMITS); assert(val->axes->mode == Absolute); } assert(dev.last.numValuators == num_axes); /* invalid increment */ assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_VERTICAL, 0.0, SCROLL_FLAG_NONE) == FALSE); /* invalid type */ assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_VERTICAL - 1, 1.0, SCROLL_FLAG_NONE) == FALSE); assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_HORIZONTAL + 1, 1.0, SCROLL_FLAG_NONE) == FALSE); /* invalid axisnum */ assert(SetScrollValuator (&dev, 2, SCROLL_TYPE_HORIZONTAL, 1.0, SCROLL_FLAG_NONE) == FALSE); /* valid */ assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_VERTICAL, 3.0, SCROLL_FLAG_NONE) == TRUE); axis = &dev.valuator->axes[0]; assert(axis->scroll.increment == 3.0); assert(axis->scroll.type == SCROLL_TYPE_VERTICAL); assert(axis->scroll.flags == 0); /* valid */ assert(SetScrollValuator (&dev, 1, SCROLL_TYPE_HORIZONTAL, 2.0, SCROLL_FLAG_NONE) == TRUE); axis = &dev.valuator->axes[1]; assert(axis->scroll.increment == 2.0); assert(axis->scroll.type == SCROLL_TYPE_HORIZONTAL); assert(axis->scroll.flags == 0); /* can add another non-preffered axis */ assert(SetScrollValuator (&dev, 1, SCROLL_TYPE_VERTICAL, 5.0, SCROLL_FLAG_NONE) == TRUE); assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_HORIZONTAL, 5.0, SCROLL_FLAG_NONE) == TRUE); /* can overwrite with Preferred */ assert(SetScrollValuator (&dev, 1, SCROLL_TYPE_VERTICAL, 5.5, SCROLL_FLAG_PREFERRED) == TRUE); axis = &dev.valuator->axes[1]; assert(axis->scroll.increment == 5.5); assert(axis->scroll.type == SCROLL_TYPE_VERTICAL); assert(axis->scroll.flags == SCROLL_FLAG_PREFERRED); assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_HORIZONTAL, 8.8, SCROLL_FLAG_PREFERRED) == TRUE); axis = &dev.valuator->axes[0]; assert(axis->scroll.increment == 8.8); assert(axis->scroll.type == SCROLL_TYPE_HORIZONTAL); assert(axis->scroll.flags == SCROLL_FLAG_PREFERRED); /* can overwrite as none */ assert(SetScrollValuator(&dev, 0, SCROLL_TYPE_NONE, 5.0, SCROLL_FLAG_NONE) == TRUE); axis = &dev.valuator->axes[0]; assert(axis->scroll.type == SCROLL_TYPE_NONE); /* can overwrite axis with new settings */ assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_VERTICAL, 5.0, SCROLL_FLAG_NONE) == TRUE); axis = &dev.valuator->axes[0]; assert(axis->scroll.type == SCROLL_TYPE_VERTICAL); assert(axis->scroll.increment == 5.0); assert(axis->scroll.flags == SCROLL_FLAG_NONE); assert(SetScrollValuator (&dev, 0, SCROLL_TYPE_VERTICAL, 3.0, SCROLL_FLAG_NONE) == TRUE); assert(axis->scroll.type == SCROLL_TYPE_VERTICAL); assert(axis->scroll.increment == 3.0); assert(axis->scroll.flags == SCROLL_FLAG_NONE); } /* just check the known success cases, and that error cases set the client's * error value correctly. */ static void dix_check_grab_values(void) { ClientRec client; GrabParameters param; int rc; memset(&client, 0, sizeof(client)); param.grabtype = CORE; param.this_device_mode = GrabModeSync; param.other_devices_mode = GrabModeSync; param.modifiers = AnyModifier; param.ownerEvents = FALSE; rc = CheckGrabValues(&client, ¶m); assert(rc == Success); param.this_device_mode = GrabModeAsync; rc = CheckGrabValues(&client, ¶m); assert(rc == Success); param.this_device_mode = XIGrabModeTouch; rc = CheckGrabValues(&client, ¶m); assert(rc == Success); param.this_device_mode = XIGrabModeTouch + 1; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.this_device_mode); assert(client.errorValue == XIGrabModeTouch + 1); param.this_device_mode = GrabModeSync; param.other_devices_mode = GrabModeAsync; rc = CheckGrabValues(&client, ¶m); param.this_device_mode = GrabModeSync; param.other_devices_mode = XIGrabModeTouch; rc = CheckGrabValues(&client, ¶m); assert(rc == Success); assert(rc == Success); param.other_devices_mode = XIGrabModeTouch + 1; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.other_devices_mode); assert(client.errorValue == XIGrabModeTouch + 1); param.other_devices_mode = GrabModeSync; param.modifiers = 1 << 13; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.modifiers); assert(client.errorValue == (1 << 13)); param.modifiers = AnyModifier; param.ownerEvents = TRUE; rc = CheckGrabValues(&client, ¶m); assert(rc == Success); param.ownerEvents = 3; rc = CheckGrabValues(&client, ¶m); assert(rc == BadValue); assert(client.errorValue == param.ownerEvents); assert(client.errorValue == 3); } /** * Convert various internal events to the matching core event and verify the * parameters. */ static void dix_event_to_core(int type) { DeviceEvent ev = {}; xEvent *core; int time; int x, y; int rc; int state; int detail; int count; const int ROOT_WINDOW_ID = 0x100; /* EventToCore memsets the event to 0 */ #define test_event() \ assert(rc == Success); \ assert(core); \ assert(count == 1); \ assert(core->u.u.type == type); \ assert(core->u.u.detail == detail); \ assert(core->u.keyButtonPointer.time == time); \ assert(core->u.keyButtonPointer.rootX == x); \ assert(core->u.keyButtonPointer.rootY == y); \ assert(core->u.keyButtonPointer.state == state); \ assert(core->u.keyButtonPointer.eventX == 0); \ assert(core->u.keyButtonPointer.eventY == 0); \ assert(core->u.keyButtonPointer.root == ROOT_WINDOW_ID); \ assert(core->u.keyButtonPointer.event == 0); \ assert(core->u.keyButtonPointer.child == 0); \ assert(core->u.keyButtonPointer.sameScreen == FALSE); x = 0; y = 0; time = 12345; state = 0; detail = 0; ev.header = 0xFF; ev.length = sizeof(DeviceEvent); ev.time = time; ev.root_y = x; ev.root_x = y; SetBit(ev.valuators.mask, 0); SetBit(ev.valuators.mask, 1); ev.root = ROOT_WINDOW_ID; ev.corestate = state; ev.detail.key = detail; ev.type = type; ev.detail.key = 0; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); x = 1; y = 2; ev.root_x = x; ev.root_y = y; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); x = 0x7FFF; y = 0x7FFF; ev.root_x = x; ev.root_y = y; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); x = 0x8000; /* too high */ y = 0x8000; /* too high */ ev.root_x = x; ev.root_y = y; rc = EventToCore((InternalEvent *) &ev, &core, &count); assert(rc == Success); assert(core); assert(count == 1); assert(core->u.keyButtonPointer.rootX != x); assert(core->u.keyButtonPointer.rootY != y); x = 0x7FFF; y = 0x7FFF; ev.root_x = x; ev.root_y = y; time = 0; ev.time = time; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); detail = 1; ev.detail.key = detail; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); detail = 0xFF; /* highest value */ ev.detail.key = detail; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); detail = 0xFFF; /* too big */ ev.detail.key = detail; rc = EventToCore((InternalEvent *) &ev, &core, &count); assert(rc == BadMatch); detail = 0xFF; /* too big */ ev.detail.key = detail; state = 0xFFFF; /* highest value */ ev.corestate = state; rc = EventToCore((InternalEvent *) &ev, &core, &count); test_event(); state = 0x10000; /* too big */ ev.corestate = state; rc = EventToCore((InternalEvent *) &ev, &core, &count); assert(rc == Success); assert(core); assert(count == 1); assert(core->u.keyButtonPointer.state != state); assert(core->u.keyButtonPointer.state == (state & 0xFFFF)); #undef test_event } static void dix_event_to_core_fail(int evtype, int expected_rc) { DeviceEvent ev; xEvent *core; int rc; int count; ev.header = 0xFF; ev.length = sizeof(DeviceEvent); ev.type = evtype; rc = EventToCore((InternalEvent *) &ev, &core, &count); assert(rc == expected_rc); } static void dix_event_to_core_conversion(void) { dix_event_to_core_fail(0, BadImplementation); dix_event_to_core_fail(1, BadImplementation); dix_event_to_core_fail(ET_ProximityOut + 1, BadImplementation); dix_event_to_core_fail(ET_ProximityIn, BadMatch); dix_event_to_core_fail(ET_ProximityOut, BadMatch); dix_event_to_core(ET_KeyPress); dix_event_to_core(ET_KeyRelease); dix_event_to_core(ET_ButtonPress); dix_event_to_core(ET_ButtonRelease); dix_event_to_core(ET_Motion); } static void _dix_test_xi_convert(DeviceEvent *ev, int expected_rc, int expected_count) { xEvent *xi; int count = 0; int rc; rc = EventToXI((InternalEvent *) ev, &xi, &count); assert(rc == expected_rc); assert(count >= expected_count); if (count > 0) { deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) xi; assert(kbp->type == IEventBase + ev->type); assert(kbp->detail == ev->detail.key); assert(kbp->time == ev->time); assert((kbp->deviceid & ~MORE_EVENTS) == ev->deviceid); assert(kbp->root_x == ev->root_x); assert(kbp->root_y == ev->root_y); assert(kbp->state == ev->corestate); assert(kbp->event_x == 0); assert(kbp->event_y == 0); assert(kbp->root == ev->root); assert(kbp->event == 0); assert(kbp->child == 0); assert(kbp->same_screen == FALSE); while (--count > 0) { deviceValuator *v = (deviceValuator *) &xi[count]; assert(v->type == DeviceValuator); assert(v->num_valuators <= 6); } free(xi); } } /** * This tests for internal event → XI1 event conversion * - all conversions should generate the right XI event type * - right number of events generated * - extra events are valuators */ static void dix_event_to_xi1_conversion(void) { DeviceEvent ev = { 0 }; int time; int x, y; int state; int detail; const int ROOT_WINDOW_ID = 0x100; int deviceid; IEventBase = 80; DeviceValuator = IEventBase - 1; DeviceKeyPress = IEventBase + ET_KeyPress; DeviceKeyRelease = IEventBase + ET_KeyRelease; DeviceButtonPress = IEventBase + ET_ButtonPress; DeviceButtonRelease = IEventBase + ET_ButtonRelease; DeviceMotionNotify = IEventBase + ET_Motion; DeviceFocusIn = IEventBase + ET_FocusIn; DeviceFocusOut = IEventBase + ET_FocusOut; ProximityIn = IEventBase + ET_ProximityIn; ProximityOut = IEventBase + ET_ProximityOut; /* EventToXI callocs */ x = 0; y = 0; time = 12345; state = 0; detail = 0; deviceid = 4; ev.header = 0xFF; ev.header = 0xFF; ev.length = sizeof(DeviceEvent); ev.time = time; ev.root_y = x; ev.root_x = y; SetBit(ev.valuators.mask, 0); SetBit(ev.valuators.mask, 1); ev.root = ROOT_WINDOW_ID; ev.corestate = state; ev.detail.key = detail; ev.deviceid = deviceid; /* test all types for bad match */ ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 1); /* No axes */ ClearBit(ev.valuators.mask, 0); ClearBit(ev.valuators.mask, 1); ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 1); ev.type = ET_Motion; _dix_test_xi_convert(&ev, BadMatch, 0); ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, BadMatch, 0); ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, BadMatch, 0); /* more than 6 axes → 2 valuator events */ SetBit(ev.valuators.mask, 0); SetBit(ev.valuators.mask, 1); SetBit(ev.valuators.mask, 2); SetBit(ev.valuators.mask, 3); SetBit(ev.valuators.mask, 4); SetBit(ev.valuators.mask, 5); SetBit(ev.valuators.mask, 6); ev.type = ET_KeyPress; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_KeyRelease; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_ButtonPress; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_ButtonRelease; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_Motion; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_ProximityIn; _dix_test_xi_convert(&ev, Success, 2); ev.type = ET_ProximityOut; _dix_test_xi_convert(&ev, Success, 2); /* keycode too high */ ev.type = ET_KeyPress; ev.detail.key = 256; _dix_test_xi_convert(&ev, Success, 0); /* deviceid too high */ ev.type = ET_KeyPress; ev.detail.key = 18; ev.deviceid = 128; _dix_test_xi_convert(&ev, Success, 0); } static void xi2_struct_sizes(void) { #define compare(req) \ assert(sizeof(req) == sz_##req); compare(xXIQueryVersionReq); compare(xXIWarpPointerReq); compare(xXIChangeCursorReq); compare(xXIChangeHierarchyReq); compare(xXISetClientPointerReq); compare(xXIGetClientPointerReq); compare(xXISelectEventsReq); compare(xXIQueryVersionReq); compare(xXIQueryDeviceReq); compare(xXISetFocusReq); compare(xXIGetFocusReq); compare(xXIGrabDeviceReq); compare(xXIUngrabDeviceReq); compare(xXIAllowEventsReq); compare(xXIPassiveGrabDeviceReq); compare(xXIPassiveUngrabDeviceReq); compare(xXIListPropertiesReq); compare(xXIChangePropertyReq); compare(xXIDeletePropertyReq); compare(xXIGetPropertyReq); compare(xXIGetSelectedEventsReq); #undef compare } static void dix_grab_matching(void) { DeviceIntRec xi_all_devices, xi_all_master_devices, dev1, dev2; GrabRec a, b; BOOL rc; memset(&a, 0, sizeof(a)); memset(&b, 0, sizeof(b)); /* different grabtypes must fail */ a.grabtype = CORE; b.grabtype = XI2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = CORE; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* XI2 grabs for different devices must fail, regardless of ignoreDevice * XI2 grabs for master devices must fail against a slave */ memset(&xi_all_devices, 0, sizeof(DeviceIntRec)); memset(&xi_all_master_devices, 0, sizeof(DeviceIntRec)); memset(&dev1, 0, sizeof(DeviceIntRec)); memset(&dev2, 0, sizeof(DeviceIntRec)); xi_all_devices.id = XIAllDevices; xi_all_master_devices.id = XIAllMasterDevices; dev1.id = 10; dev1.type = SLAVE; dev2.id = 11; dev2.type = SLAVE; inputInfo.all_devices = &xi_all_devices; inputInfo.all_master_devices = &xi_all_master_devices; a.grabtype = XI2; b.grabtype = XI2; a.device = &dev1; b.device = &dev2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); a.device = &dev2; b.device = &dev1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); a.device = inputInfo.all_master_devices; b.device = &dev1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); a.device = &dev1; b.device = inputInfo.all_master_devices; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); /* ignoreDevice FALSE must fail for different devices for CORE and XI */ a.grabtype = XI; b.grabtype = XI; a.device = &dev1; b.device = &dev2; a.modifierDevice = &dev1; b.modifierDevice = &dev1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; a.device = &dev1; b.device = &dev2; a.modifierDevice = &dev1; b.modifierDevice = &dev1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); /* ignoreDevice FALSE must fail for different modifier devices for CORE * and XI */ a.grabtype = XI; b.grabtype = XI; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); /* different event type must fail */ a.grabtype = XI2; b.grabtype = XI2; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev1; a.type = XI_KeyPress; b.type = XI_KeyRelease; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev1; a.type = XI_KeyPress; b.type = XI_KeyRelease; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev1; a.type = XI_KeyPress; b.type = XI_KeyRelease; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&a, &b, TRUE); assert(rc == FALSE); /* different modifiers must fail */ a.grabtype = XI2; b.grabtype = XI2; a.device = &dev1; b.device = &dev1; a.modifierDevice = &dev1; b.modifierDevice = &dev1; a.type = XI_KeyPress; b.type = XI_KeyPress; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 2; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* AnyModifier must fail for XI2 */ a.grabtype = XI2; b.grabtype = XI2; a.modifiersDetail.exact = AnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* XIAnyModifier must fail for CORE and XI */ a.grabtype = XI; b.grabtype = XI; a.modifiersDetail.exact = XIAnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; a.modifiersDetail.exact = XIAnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* different detail must fail */ a.grabtype = XI2; b.grabtype = XI2; a.detail.exact = 1; b.detail.exact = 2; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* detail of AnyModifier must fail */ a.grabtype = XI2; b.grabtype = XI2; a.detail.exact = AnyModifier; b.detail.exact = 1; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* detail of XIAnyModifier must fail */ a.grabtype = XI2; b.grabtype = XI2; a.detail.exact = XIAnyModifier; b.detail.exact = 1; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = CORE; b.grabtype = CORE; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); a.grabtype = XI; b.grabtype = XI; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == FALSE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == FALSE); /* XIAnyModifier or AnyModifer must succeed */ a.grabtype = XI2; b.grabtype = XI2; a.detail.exact = 1; b.detail.exact = 1; a.modifiersDetail.exact = XIAnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); a.grabtype = CORE; b.grabtype = CORE; a.detail.exact = 1; b.detail.exact = 1; a.modifiersDetail.exact = AnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); a.grabtype = XI; b.grabtype = XI; a.detail.exact = 1; b.detail.exact = 1; a.modifiersDetail.exact = AnyModifier; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); /* AnyKey or XIAnyKeycode must succeed */ a.grabtype = XI2; b.grabtype = XI2; a.detail.exact = XIAnyKeycode; b.detail.exact = 1; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); a.grabtype = CORE; b.grabtype = CORE; a.detail.exact = AnyKey; b.detail.exact = 1; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); a.grabtype = XI; b.grabtype = XI; a.detail.exact = AnyKey; b.detail.exact = 1; a.modifiersDetail.exact = 1; b.modifiersDetail.exact = 1; rc = GrabMatchesSecond(&a, &b, FALSE); assert(rc == TRUE); rc = GrabMatchesSecond(&b, &a, FALSE); assert(rc == TRUE); } static void test_bits_to_byte(int i) { int expected_bytes; expected_bytes = (i + 7) / 8; assert(bits_to_bytes(i) >= i / 8); assert((bits_to_bytes(i) * 8) - i <= 7); assert(expected_bytes == bits_to_bytes(i)); } static void test_bytes_to_int32(int i) { int expected_4byte; expected_4byte = (i + 3) / 4; assert(bytes_to_int32(i) <= i); assert((bytes_to_int32(i) * 4) - i <= 3); assert(expected_4byte == bytes_to_int32(i)); } static void test_pad_to_int32(int i) { int expected_bytes; expected_bytes = ((i + 3) / 4) * 4; assert(pad_to_int32(i) >= i); assert(pad_to_int32(i) - i <= 3); assert(expected_bytes == pad_to_int32(i)); } static void test_padding_for_int32(int i) { static const int padlength[4] = { 0, 3, 2, 1 }; int expected_bytes = (((i + 3) / 4) * 4) - i; assert(padding_for_int32(i) >= 0); assert(padding_for_int32(i) <= 3); assert(padding_for_int32(i) == expected_bytes); assert(padding_for_int32(i) == padlength[i & 3]); assert((padding_for_int32(i) + i) == pad_to_int32(i)); } static void include_byte_padding_macros(void) { printf("Testing bits_to_bytes()\n"); /* the macros don't provide overflow protection */ test_bits_to_byte(0); test_bits_to_byte(1); test_bits_to_byte(2); test_bits_to_byte(7); test_bits_to_byte(8); test_bits_to_byte(0xFF); test_bits_to_byte(0x100); test_bits_to_byte(INT_MAX - 9); test_bits_to_byte(INT_MAX - 8); printf("Testing bytes_to_int32()\n"); test_bytes_to_int32(0); test_bytes_to_int32(1); test_bytes_to_int32(2); test_bytes_to_int32(7); test_bytes_to_int32(8); test_bytes_to_int32(0xFF); test_bytes_to_int32(0x100); test_bytes_to_int32(0xFFFF); test_bytes_to_int32(0x10000); test_bytes_to_int32(0xFFFFFF); test_bytes_to_int32(0x1000000); test_bytes_to_int32(INT_MAX - 4); test_bytes_to_int32(INT_MAX - 3); printf("Testing pad_to_int32()\n"); test_pad_to_int32(0); test_pad_to_int32(1); test_pad_to_int32(2); test_pad_to_int32(3); test_pad_to_int32(7); test_pad_to_int32(8); test_pad_to_int32(0xFF); test_pad_to_int32(0x100); test_pad_to_int32(0xFFFF); test_pad_to_int32(0x10000); test_pad_to_int32(0xFFFFFF); test_pad_to_int32(0x1000000); test_pad_to_int32(INT_MAX - 4); test_pad_to_int32(INT_MAX - 3); printf("Testing padding_for_int32()\n"); test_padding_for_int32(0); test_padding_for_int32(1); test_padding_for_int32(2); test_padding_for_int32(3); test_padding_for_int32(7); test_padding_for_int32(8); test_padding_for_int32(0xFF); test_padding_for_int32(0x100); test_padding_for_int32(0xFFFF); test_padding_for_int32(0x10000); test_padding_for_int32(0xFFFFFF); test_padding_for_int32(0x1000000); test_padding_for_int32(INT_MAX - 4); test_padding_for_int32(INT_MAX - 3); } static void xi_unregister_handlers(void) { DeviceIntRec dev; int handler; memset(&dev, 0, sizeof(dev)); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 1); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 2); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 3); printf("Unlinking from front.\n"); XIUnregisterPropertyHandler(&dev, 4); /* NOOP */ assert(dev.properties.handlers->id == 3); XIUnregisterPropertyHandler(&dev, 3); assert(dev.properties.handlers->id == 2); XIUnregisterPropertyHandler(&dev, 2); assert(dev.properties.handlers->id == 1); XIUnregisterPropertyHandler(&dev, 1); assert(dev.properties.handlers == NULL); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 4); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 5); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 6); XIUnregisterPropertyHandler(&dev, 3); /* NOOP */ assert(dev.properties.handlers->next->next->next == NULL); XIUnregisterPropertyHandler(&dev, 4); assert(dev.properties.handlers->next->next == NULL); XIUnregisterPropertyHandler(&dev, 5); assert(dev.properties.handlers->next == NULL); XIUnregisterPropertyHandler(&dev, 6); assert(dev.properties.handlers == NULL); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 7); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 8); handler = XIRegisterPropertyHandler(&dev, NULL, NULL, NULL); assert(handler == 9); XIDeleteAllDeviceProperties(&dev); assert(dev.properties.handlers == NULL); XIUnregisterPropertyHandler(&dev, 7); /* NOOP */ } static void cmp_attr_fields(InputAttributes * attr1, InputAttributes * attr2) { char **tags1, **tags2; assert(attr1); assert(attr2); assert(attr1 != attr2); assert(attr1->flags == attr2->flags); if (attr1->product != NULL) { assert(attr1->product != attr2->product); assert(strcmp(attr1->product, attr2->product) == 0); } else assert(attr2->product == NULL); if (attr1->vendor != NULL) { assert(attr1->vendor != attr2->vendor); assert(strcmp(attr1->vendor, attr2->vendor) == 0); } else assert(attr2->vendor == NULL); if (attr1->device != NULL) { assert(attr1->device != attr2->device); assert(strcmp(attr1->device, attr2->device) == 0); } else assert(attr2->device == NULL); if (attr1->pnp_id != NULL) { assert(attr1->pnp_id != attr2->pnp_id); assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0); } else assert(attr2->pnp_id == NULL); if (attr1->usb_id != NULL) { assert(attr1->usb_id != attr2->usb_id); assert(strcmp(attr1->usb_id, attr2->usb_id) == 0); } else assert(attr2->usb_id == NULL); tags1 = attr1->tags; tags2 = attr2->tags; /* if we don't have any tags, skip the tag checking bits */ if (!tags1) { assert(!tags2); return; } /* Don't lug around empty arrays */ assert(*tags1); assert(*tags2); /* check for identical content, but duplicated */ while (*tags1) { assert(*tags1 != *tags2); assert(strcmp(*tags1, *tags2) == 0); tags1++; tags2++; } /* ensure tags1 and tags2 have the same no of elements */ assert(!*tags2); /* check for not sharing memory */ tags1 = attr1->tags; while (*tags1) { tags2 = attr2->tags; while (*tags2) assert(*tags1 != *tags2++); tags1++; } } static void dix_input_attributes(void) { InputAttributes *orig; InputAttributes *new; new = DuplicateInputAttributes(NULL); assert(!new); orig = calloc(1, sizeof(InputAttributes)); assert(orig); new = DuplicateInputAttributes(orig); assert(memcmp(orig, new, sizeof(InputAttributes)) == 0); orig->product = xnfstrdup("product name"); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->vendor = xnfstrdup("vendor name"); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->device = xnfstrdup("device path"); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->pnp_id = xnfstrdup("PnPID"); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->usb_id = xnfstrdup("USBID"); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->flags = 0xF0; new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); orig->tags = xstrtokenize("tag1 tag2 tag3", " "); new = DuplicateInputAttributes(orig); cmp_attr_fields(orig, new); FreeInputAttributes(new); FreeInputAttributes(orig); } static void dix_input_valuator_masks(void) { ValuatorMask *mask = NULL, *copy; int nvaluators = MAX_VALUATORS; double valuators[nvaluators]; int val_ranged[nvaluators]; int i; int first_val, num_vals; for (i = 0; i < nvaluators; i++) { valuators[i] = i + 0.5; val_ranged[i] = i; } mask = valuator_mask_new(nvaluators); assert(mask != NULL); assert(valuator_mask_size(mask) == 0); assert(valuator_mask_num_valuators(mask) == 0); for (i = 0; i < nvaluators; i++) { assert(!valuator_mask_isset(mask, i)); valuator_mask_set_double(mask, i, valuators[i]); assert(valuator_mask_isset(mask, i)); assert(valuator_mask_get(mask, i) == trunc(valuators[i])); assert(valuator_mask_get_double(mask, i) == valuators[i]); assert(valuator_mask_size(mask) == i + 1); assert(valuator_mask_num_valuators(mask) == i + 1); } for (i = 0; i < nvaluators; i++) { assert(valuator_mask_isset(mask, i)); valuator_mask_unset(mask, i); /* we're removing valuators from the front, so size should stay the * same until the last bit is removed */ if (i < nvaluators - 1) assert(valuator_mask_size(mask) == nvaluators); assert(!valuator_mask_isset(mask, i)); } assert(valuator_mask_size(mask) == 0); valuator_mask_zero(mask); assert(valuator_mask_size(mask) == 0); assert(valuator_mask_num_valuators(mask) == 0); for (i = 0; i < nvaluators; i++) assert(!valuator_mask_isset(mask, i)); first_val = 5; num_vals = 6; valuator_mask_set_range(mask, first_val, num_vals, val_ranged); assert(valuator_mask_size(mask) == first_val + num_vals); assert(valuator_mask_num_valuators(mask) == num_vals); for (i = 0; i < nvaluators; i++) { double val; if (i < first_val || i >= first_val + num_vals) { assert(!valuator_mask_isset(mask, i)); assert(!valuator_mask_fetch_double(mask, i, &val)); } else { assert(valuator_mask_isset(mask, i)); assert(valuator_mask_get(mask, i) == val_ranged[i - first_val]); assert(valuator_mask_get_double(mask, i) == val_ranged[i - first_val]); assert(valuator_mask_fetch_double(mask, i, &val)); assert(val_ranged[i - first_val] == val); } } copy = valuator_mask_new(nvaluators); valuator_mask_copy(copy, mask); assert(mask != copy); assert(valuator_mask_size(mask) == valuator_mask_size(copy)); assert(valuator_mask_num_valuators(mask) == valuator_mask_num_valuators(copy)); for (i = 0; i < nvaluators; i++) { double a, b; assert(valuator_mask_isset(mask, i) == valuator_mask_isset(copy, i)); if (!valuator_mask_isset(mask, i)) continue; assert(valuator_mask_get(mask, i) == valuator_mask_get(copy, i)); assert(valuator_mask_get_double(mask, i) == valuator_mask_get_double(copy, i)); assert(valuator_mask_fetch_double(mask, i, &a)); assert(valuator_mask_fetch_double(copy, i, &b)); assert(a == b); } valuator_mask_free(&mask); assert(mask == NULL); } static void dix_valuator_mode(void) { DeviceIntRec dev; const int num_axes = MAX_VALUATORS; int i; Atom atoms[MAX_VALUATORS] = { 0 }; memset(&dev, 0, sizeof(DeviceIntRec)); dev.type = MASTER_POINTER; /* claim it's a master to stop ptracccel */ assert(InitValuatorClassDeviceStruct(NULL, 0, atoms, 0, 0) == FALSE); assert(InitValuatorClassDeviceStruct(&dev, num_axes, atoms, 0, Absolute)); for (i = 0; i < num_axes; i++) { assert(valuator_get_mode(&dev, i) == Absolute); valuator_set_mode(&dev, i, Relative); assert(dev.valuator->axes[i].mode == Relative); assert(valuator_get_mode(&dev, i) == Relative); } valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Absolute); for (i = 0; i < num_axes; i++) assert(valuator_get_mode(&dev, i) == Absolute); valuator_set_mode(&dev, VALUATOR_MODE_ALL_AXES, Relative); for (i = 0; i < num_axes; i++) assert(valuator_get_mode(&dev, i) == Relative); } static void dix_input_valuator_masks_unaccel(void) { ValuatorMask *mask = NULL; double x, ux; /* set mask normally */ mask = valuator_mask_new(MAX_VALUATORS); assert(!valuator_mask_has_unaccelerated(mask)); valuator_mask_set_double(mask, 0, 1.0); assert(!valuator_mask_has_unaccelerated(mask)); valuator_mask_unset(mask, 0); assert(!valuator_mask_has_unaccelerated(mask)); /* all unset, now set accel mask */ valuator_mask_set_unaccelerated(mask, 0, 1.0, 2.0); assert(valuator_mask_has_unaccelerated(mask)); assert(valuator_mask_isset(mask, 0)); assert(!valuator_mask_isset(mask, 1)); assert(valuator_mask_get_accelerated(mask, 0) == 1.0); assert(valuator_mask_get_unaccelerated(mask, 0) == 2.0); assert(valuator_mask_fetch_unaccelerated(mask, 0, &x, &ux)); assert(x == 1.0); assert(ux == 2.0); x = 0xff; ux = 0xfe; assert(!valuator_mask_fetch_unaccelerated(mask, 1, &x, &ux)); assert(x == 0xff); assert(ux == 0xfe); /* all unset, now set normally again */ valuator_mask_unset(mask, 0); assert(!valuator_mask_has_unaccelerated(mask)); assert(!valuator_mask_isset(mask, 0)); valuator_mask_set_double(mask, 0, 1.0); assert(!valuator_mask_has_unaccelerated(mask)); valuator_mask_unset(mask, 0); assert(!valuator_mask_has_unaccelerated(mask)); valuator_mask_zero(mask); assert(!valuator_mask_has_unaccelerated(mask)); valuator_mask_set_unaccelerated(mask, 0, 1.0, 2.0); valuator_mask_set_unaccelerated(mask, 1, 3.0, 4.5); assert(valuator_mask_isset(mask, 0)); assert(valuator_mask_isset(mask, 1)); assert(!valuator_mask_isset(mask, 2)); assert(valuator_mask_has_unaccelerated(mask)); assert(valuator_mask_get_accelerated(mask, 0) == 1.0); assert(valuator_mask_get_accelerated(mask, 1) == 3.0); assert(valuator_mask_get_unaccelerated(mask, 0) == 2.0); assert(valuator_mask_get_unaccelerated(mask, 1) == 4.5); assert(valuator_mask_fetch_unaccelerated(mask, 0, &x, &ux)); assert(x == 1.0); assert(ux == 2.0); assert(valuator_mask_fetch_unaccelerated(mask, 1, &x, &ux)); assert(x == 3.0); assert(ux == 4.5); valuator_mask_free(&mask); } static void include_bit_test_macros(void) { uint8_t mask[9] = { 0 }; int i; for (i = 0; i < ARRAY_SIZE(mask); i++) { assert(BitIsOn(mask, i) == 0); SetBit(mask, i); assert(BitIsOn(mask, i) == 1); assert(! !(mask[i / 8] & (1 << (i % 8)))); assert(CountBits(mask, sizeof(mask)) == 1); ClearBit(mask, i); assert(BitIsOn(mask, i) == 0); } } /** * Ensure that val->axisVal and val->axes are aligned on doubles. */ static void dix_valuator_alloc(void) { ValuatorClassPtr v = NULL; int num_axes = 0; while (num_axes < 5) { v = AllocValuatorClass(v, num_axes); assert(v); assert(v->numAxes == num_axes); #if !defined(__i386__) && !defined(__m68k__) && !defined(__sh__) /* must be double-aligned on 64 bit */ assert(offsetof(struct _ValuatorClassRec, axisVal) % sizeof(double) == 0); assert(offsetof(struct _ValuatorClassRec, axes) % sizeof(double) == 0); #endif num_axes++; } free(v); } static void dix_get_master(void) { DeviceIntRec vcp, vck; DeviceIntRec ptr, kbd; DeviceIntRec floating; SpriteInfoRec vcp_sprite, vck_sprite; SpriteInfoRec ptr_sprite, kbd_sprite; SpriteInfoRec floating_sprite; memset(&vcp, 0, sizeof(vcp)); memset(&vck, 0, sizeof(vck)); memset(&ptr, 0, sizeof(ptr)); memset(&kbd, 0, sizeof(kbd)); memset(&floating, 0, sizeof(floating)); memset(&vcp_sprite, 0, sizeof(vcp_sprite)); memset(&vck_sprite, 0, sizeof(vck_sprite)); memset(&ptr_sprite, 0, sizeof(ptr_sprite)); memset(&kbd_sprite, 0, sizeof(kbd_sprite)); memset(&floating_sprite, 0, sizeof(floating_sprite)); vcp.type = MASTER_POINTER; vck.type = MASTER_KEYBOARD; ptr.type = SLAVE; kbd.type = SLAVE; floating.type = SLAVE; vcp.spriteInfo = &vcp_sprite; vck.spriteInfo = &vck_sprite; ptr.spriteInfo = &ptr_sprite; kbd.spriteInfo = &kbd_sprite; floating.spriteInfo = &floating_sprite; vcp_sprite.paired = &vck; vck_sprite.paired = &vcp; ptr_sprite.paired = &vcp; kbd_sprite.paired = &vck; floating_sprite.paired = &floating; vcp_sprite.spriteOwner = TRUE; floating_sprite.spriteOwner = TRUE; ptr.master = &vcp; kbd.master = &vck; assert(GetPairedDevice(&vcp) == &vck); assert(GetPairedDevice(&vck) == &vcp); assert(GetMaster(&ptr, MASTER_POINTER) == &vcp); assert(GetMaster(&ptr, MASTER_KEYBOARD) == &vck); assert(GetMaster(&kbd, MASTER_POINTER) == &vcp); assert(GetMaster(&kbd, MASTER_KEYBOARD) == &vck); assert(GetMaster(&ptr, MASTER_ATTACHED) == &vcp); assert(GetMaster(&kbd, MASTER_ATTACHED) == &vck); assert(GetPairedDevice(&floating) == &floating); assert(GetMaster(&floating, MASTER_POINTER) == NULL); assert(GetMaster(&floating, MASTER_KEYBOARD) == NULL); assert(GetMaster(&floating, MASTER_ATTACHED) == NULL); assert(GetMaster(&vcp, POINTER_OR_FLOAT) == &vcp); assert(GetMaster(&vck, POINTER_OR_FLOAT) == &vcp); assert(GetMaster(&ptr, POINTER_OR_FLOAT) == &vcp); assert(GetMaster(&kbd, POINTER_OR_FLOAT) == &vcp); assert(GetMaster(&vcp, KEYBOARD_OR_FLOAT) == &vck); assert(GetMaster(&vck, KEYBOARD_OR_FLOAT) == &vck); assert(GetMaster(&ptr, KEYBOARD_OR_FLOAT) == &vck); assert(GetMaster(&kbd, KEYBOARD_OR_FLOAT) == &vck); assert(GetMaster(&floating, KEYBOARD_OR_FLOAT) == &floating); assert(GetMaster(&floating, POINTER_OR_FLOAT) == &floating); } static void input_option_test(void) { InputOption *list = NULL; InputOption *opt; const char *val; printf("Testing input_option list interface\n"); list = input_option_new(list, "key", "value"); assert(list); opt = input_option_find(list, "key"); val = input_option_get_value(opt); assert(strcmp(val, "value") == 0); list = input_option_new(list, "2", "v2"); opt = input_option_find(list, "key"); val = input_option_get_value(opt); assert(strcmp(val, "value") == 0); opt = input_option_find(list, "2"); val = input_option_get_value(opt); assert(strcmp(val, "v2") == 0); list = input_option_new(list, "3", "v3"); /* search, delete */ opt = input_option_find(list, "key"); val = input_option_get_value(opt); assert(strcmp(val, "value") == 0); list = input_option_free_element(list, "key"); opt = input_option_find(list, "key"); assert(opt == NULL); opt = input_option_find(list, "2"); val = input_option_get_value(opt); assert(strcmp(val, "v2") == 0); list = input_option_free_element(list, "2"); opt = input_option_find(list, "2"); assert(opt == NULL); opt = input_option_find(list, "3"); val = input_option_get_value(opt); assert(strcmp(val, "v3") == 0); list = input_option_free_element(list, "3"); opt = input_option_find(list, "3"); assert(opt == NULL); /* list deletion */ list = input_option_new(list, "1", "v3"); list = input_option_new(list, "2", "v3"); list = input_option_new(list, "3", "v3"); input_option_free_list(&list); assert(list == NULL); list = input_option_new(list, "1", "v1"); list = input_option_new(list, "2", "v2"); list = input_option_new(list, "3", "v3"); /* value replacement */ opt = input_option_find(list, "2"); val = input_option_get_value(opt); assert(strcmp(val, "v2") == 0); input_option_set_value(opt, "foo"); val = input_option_get_value(opt); assert(strcmp(val, "foo") == 0); opt = input_option_find(list, "2"); val = input_option_get_value(opt); assert(strcmp(val, "foo") == 0); /* key replacement */ input_option_set_key(opt, "bar"); val = input_option_get_key(opt); assert(strcmp(val, "bar") == 0); opt = input_option_find(list, "bar"); val = input_option_get_value(opt); assert(strcmp(val, "foo") == 0); /* value replacement in input_option_new */ list = input_option_new(list, "bar", "foobar"); opt = input_option_find(list, "bar"); val = input_option_get_value(opt); assert(strcmp(val, "foobar") == 0); input_option_free_list(&list); assert(list == NULL); } static void _test_double_fp16_values(double orig_d) { FP1616 first_fp16, final_fp16; double final_d; if (orig_d > 0x7FFF) { printf("Test out of range\n"); assert(0); } first_fp16 = double_to_fp1616(orig_d); final_d = fp1616_to_double(first_fp16); final_fp16 = double_to_fp1616(final_d); /* { * char first_fp16_s[64]; * char final_fp16_s[64]; * snprintf(first_fp16_s, sizeof(first_fp16_s), "%d + %u * 2^-16", (first_fp16 & 0xffff0000) >> 16, first_fp16 & 0xffff); * snprintf(final_fp16_s, sizeof(final_fp16_s), "%d + %u * 2^-16", (final_fp16 & 0xffff0000) >> 16, final_fp16 & 0xffff); * * printf("FP16: original double: %f first fp16: %s, re-encoded double: %f, final fp16: %s\n", orig_d, first_fp16_s, final_d, final_fp16_s); * } */ /* since we lose precision, we only do rough range testing */ assert(final_d > orig_d - 0.1); assert(final_d < orig_d + 0.1); assert(memcmp(&first_fp16, &final_fp16, sizeof(FP1616)) == 0); if (orig_d > 0) _test_double_fp16_values(-orig_d); } static void _test_double_fp32_values(double orig_d) { FP3232 first_fp32, final_fp32; double final_d; if (orig_d > 0x7FFFFFFF) { printf("Test out of range\n"); assert(0); } first_fp32 = double_to_fp3232(orig_d); final_d = fp3232_to_double(first_fp32); final_fp32 = double_to_fp3232(final_d); /* { * char first_fp32_s[64]; * char final_fp32_s[64]; * snprintf(first_fp32_s, sizeof(first_fp32_s), "%d + %u * 2^-32", first_fp32.integral, first_fp32.frac); * snprintf(final_fp32_s, sizeof(final_fp32_s), "%d + %u * 2^-32", first_fp32.integral, final_fp32.frac); * * printf("FP32: original double: %f first fp32: %s, re-encoded double: %f, final fp32: %s\n", orig_d, first_fp32_s, final_d, final_fp32_s); * } */ /* since we lose precision, we only do rough range testing */ assert(final_d > orig_d - 0.1); assert(final_d < orig_d + 0.1); assert(memcmp(&first_fp32, &final_fp32, sizeof(FP3232)) == 0); if (orig_d > 0) _test_double_fp32_values(-orig_d); } static void dix_double_fp_conversion(void) { uint32_t i; printf("Testing double to FP1616/FP3232 conversions\n"); _test_double_fp16_values(0); for (i = 1; i < 0x7FFF; i <<= 1) { double val; val = i; _test_double_fp16_values(val); _test_double_fp32_values(val); /* and some pseudo-random floating points */ val = i - 0.00382; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.00382; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.05234; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.12342; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.27583; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.50535; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.72342; _test_double_fp16_values(val); _test_double_fp32_values(val); val = i + 0.80408; _test_double_fp16_values(val); _test_double_fp32_values(val); } for (i = 0x7FFFF; i < 0x7FFFFFFF; i <<= 1) { _test_double_fp32_values(i); /* and a few more random floating points, obtained * by faceplanting into the numpad repeatedly */ _test_double_fp32_values(i + 0.010177); _test_double_fp32_values(i + 0.213841); _test_double_fp32_values(i + 0.348720); _test_double_fp32_values(i + 0.472020); _test_double_fp32_values(i + 0.572020); _test_double_fp32_values(i + 0.892929); } } /* The mieq test verifies that events added to the queue come out in the same * order that they went in. */ static uint32_t mieq_test_event_last_processed; static void mieq_test_event_handler(int screenNum, InternalEvent *ie, DeviceIntPtr dev) { RawDeviceEvent *e = (RawDeviceEvent *) ie; assert(e->type == ET_RawMotion); assert(e->flags > mieq_test_event_last_processed); mieq_test_event_last_processed = e->flags; } static void _mieq_test_generate_events(uint32_t start, uint32_t count) { static DeviceIntRec dev; static SpriteInfoRec spriteInfo; static SpriteRec sprite; memset(&dev, 0, sizeof(dev)); memset(&spriteInfo, 0, sizeof(spriteInfo)); memset(&sprite, 0, sizeof(sprite)); dev.spriteInfo = &spriteInfo; spriteInfo.sprite = &sprite; dev.enabled = 1; count += start; while (start < count) { RawDeviceEvent e = { 0 }; e.header = ET_Internal; e.type = ET_RawMotion; e.length = sizeof(e); e.time = GetTimeInMillis(); e.flags = start; mieqEnqueue(&dev, (InternalEvent *) &e); start++; } } #define mieq_test_generate_events(c) { _mieq_test_generate_events(next, c); next += c; } static void mieq_test(void) { uint32_t next = 1; mieq_test_event_last_processed = 0; mieqInit(); mieqSetHandler(ET_RawMotion, mieq_test_event_handler); /* Enough to fit the buffer but trigger a grow */ mieq_test_generate_events(180); /* We should resize to 512 now */ mieqProcessInputEvents(); /* Some should now get dropped */ mieq_test_generate_events(500); /* Tell us how many got dropped, 1024 now */ mieqProcessInputEvents(); /* Now make it 2048 */ mieq_test_generate_events(900); mieqProcessInputEvents(); /* Now make it 4096 (max) */ mieq_test_generate_events(1950); mieqProcessInputEvents(); /* Now overflow one last time with the maximal queue and reach the verbosity limit */ mieq_test_generate_events(10000); mieqProcessInputEvents(); mieqFini(); } /* Simple check that we're replaying events in-order */ static void process_input_proc(InternalEvent *ev, DeviceIntPtr device) { static int last_evtype = -1; if (ev->any.header == 0xac) last_evtype = -1; assert(ev->any.type == ++last_evtype); } static void dix_enqueue_events(void) { #define NEVENTS 5 DeviceIntRec dev; InternalEvent ev[NEVENTS]; SpriteInfoRec spriteInfo; SpriteRec sprite; QdEventPtr qe; int i; memset(&dev, 0, sizeof(dev)); dev.public.processInputProc = process_input_proc; memset(&spriteInfo, 0, sizeof(spriteInfo)); memset(&sprite, 0, sizeof(sprite)); dev.spriteInfo = &spriteInfo; spriteInfo.sprite = &sprite; InitEvents(); assert(xorg_list_is_empty(&syncEvents.pending)); /* this way PlayReleasedEvents really runs through all events in the * queue */ inputInfo.devices = &dev; /* to reset process_input_proc */ ev[0].any.header = 0xac; for (i = 0; i < NEVENTS; i++) { ev[i].any.length = sizeof(*ev); ev[i].any.type = i; EnqueueEvent(&ev[i], &dev); assert(!xorg_list_is_empty(&syncEvents.pending)); qe = xorg_list_last_entry(&syncEvents.pending, QdEventRec, next); assert(memcmp(qe->event, &ev[i], ev[i].any.length) == 0); qe = xorg_list_first_entry(&syncEvents.pending, QdEventRec, next); assert(memcmp(qe->event, &ev[0], ev[i].any.length) == 0); } /* calls process_input_proc */ dev.deviceGrab.sync.frozen = 1; PlayReleasedEvents(); assert(!xorg_list_is_empty(&syncEvents.pending)); dev.deviceGrab.sync.frozen = 0; PlayReleasedEvents(); assert(xorg_list_is_empty(&syncEvents.pending)); inputInfo.devices = NULL; } int input_test(void) { dix_enqueue_events(); dix_double_fp_conversion(); dix_input_valuator_masks(); dix_input_valuator_masks_unaccel(); dix_input_attributes(); dix_init_valuators(); dix_event_to_core_conversion(); dix_event_to_xi1_conversion(); dix_check_grab_values(); xi2_struct_sizes(); dix_grab_matching(); dix_valuator_mode(); include_byte_padding_macros(); include_bit_test_macros(); xi_unregister_handlers(); dix_valuator_alloc(); dix_get_master(); input_option_test(); mieq_test(); return 0; } xorg-server-21.1.16/test/misc.c0000644000175000017500000001376014757411105011720 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "scrnintstr.h" #include "dix.h" #include "dixstruct.h" #include "tests-common.h" static void dix_version_compare(void) { int rc; rc = version_compare(0, 0, 1, 0); assert(rc < 0); rc = version_compare(1, 0, 0, 0); assert(rc > 0); rc = version_compare(0, 0, 0, 0); assert(rc == 0); rc = version_compare(1, 0, 1, 0); assert(rc == 0); rc = version_compare(1, 0, 0, 9); assert(rc > 0); rc = version_compare(0, 9, 1, 0); assert(rc < 0); rc = version_compare(1, 0, 1, 9); assert(rc < 0); rc = version_compare(1, 9, 1, 0); assert(rc > 0); rc = version_compare(2, 0, 1, 9); assert(rc > 0); rc = version_compare(1, 9, 2, 0); assert(rc < 0); } static void dix_update_desktop_dimensions(void) { int i; int x, y, w, h; int w2, h2; ScreenRec screens[MAXSCREENS]; for (i = 0; i < MAXSCREENS; i++) screenInfo.screens[i] = &screens[i]; x = 0; y = 0; w = 10; h = 5; w2 = 35; h2 = 25; #define assert_dimensions(_x, _y, _w, _h) \ update_desktop_dimensions(); \ assert(screenInfo.x == _x); \ assert(screenInfo.y == _y); \ assert(screenInfo.width == _w); \ assert(screenInfo.height == _h); #define set_screen(idx, _x, _y, _w, _h) \ screenInfo.screens[idx]->x = _x; \ screenInfo.screens[idx]->y = _y; \ screenInfo.screens[idx]->width = _w; \ screenInfo.screens[idx]->height = _h; \ /* single screen */ screenInfo.numScreens = 1; set_screen(0, x, y, w, h); assert_dimensions(x, y, w, h); /* dualhead rightof */ screenInfo.numScreens = 2; set_screen(1, w, 0, w2, h2); assert_dimensions(x, y, w + w2, h2); /* dualhead belowof */ screenInfo.numScreens = 2; set_screen(1, 0, h, w2, h2); assert_dimensions(x, y, w2, h + h2); /* triplehead L shape */ screenInfo.numScreens = 3; set_screen(1, 0, h, w2, h2); set_screen(2, w2, h2, w, h); assert_dimensions(x, y, w + w2, h + h2); /* quadhead 2x2 */ screenInfo.numScreens = 4; set_screen(1, 0, h, w, h); set_screen(2, w, h, w, h2); set_screen(3, w, 0, w2, h); assert_dimensions(x, y, w + w2, h + h2); /* quadhead horiz line */ screenInfo.numScreens = 4; set_screen(1, w, 0, w, h); set_screen(2, 2 * w, 0, w, h); set_screen(3, 3 * w, 0, w, h); assert_dimensions(x, y, 4 * w, h); /* quadhead vert line */ screenInfo.numScreens = 4; set_screen(1, 0, h, w, h); set_screen(2, 0, 2 * h, w, h); set_screen(3, 0, 3 * h, w, h); assert_dimensions(x, y, w, 4 * h); /* x overlap */ screenInfo.numScreens = 2; set_screen(0, 0, 0, w2, h2); set_screen(1, w, 0, w2, h2); assert_dimensions(x, y, w2 + w, h2); /* y overlap */ screenInfo.numScreens = 2; set_screen(0, 0, 0, w2, h2); set_screen(1, 0, h, w2, h2); assert_dimensions(x, y, w2, h2 + h); /* negative origin */ screenInfo.numScreens = 1; set_screen(0, -w2, -h2, w, h); assert_dimensions(-w2, -h2, w, h); /* dualhead negative origin, overlap */ screenInfo.numScreens = 2; set_screen(0, -w2, -h2, w2, h2); set_screen(1, -w, -h, w, h); assert_dimensions(-w2, -h2, w2, h2); } static int dix_request_fixed_size_overflow(ClientRec *client) { xReq req = { 0 }; client->req_len = req.length = 1; REQUEST_FIXED_SIZE(req, SIZE_MAX); return Success; } static int dix_request_fixed_size_match(ClientRec *client) { xReq req = { 0 }; client->req_len = req.length = 9; REQUEST_FIXED_SIZE(req, 30); return Success; } static void dix_request_size_checks(void) { ClientRec client = { 0 }; int rc; rc = dix_request_fixed_size_overflow(&client); assert(rc == BadLength); rc = dix_request_fixed_size_match(&client); assert(rc == Success); } static void bswap_test(void) { const uint16_t test_16 = 0xaabb; const uint16_t expect_16 = 0xbbaa; const uint32_t test_32 = 0xaabbccdd; const uint32_t expect_32 = 0xddccbbaa; const uint64_t test_64 = 0x11223344aabbccddull; const uint64_t expect_64 = 0xddccbbaa44332211ull; uint16_t result_16; uint32_t result_32; uint64_t result_64; assert(bswap_16(test_16) == expect_16); assert(bswap_32(test_32) == expect_32); assert(bswap_64(test_64) == expect_64); result_16 = test_16; swaps(&result_16); assert(result_16 == expect_16); result_32 = test_32; swapl(&result_32); assert(result_32 == expect_32); result_64 = test_64; swapll(&result_64); assert(result_64 == expect_64); } int misc_test(void) { dix_version_compare(); dix_update_desktop_dimensions(); dix_request_size_checks(); bswap_test(); return 0; } xorg-server-21.1.16/test/signal-logging.c0000644000175000017500000003117414757411105013665 /** * Copyright © 2012 Canonical, Ltd. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "assert.h" #include "misc.h" #include "tests-common.h" struct number_format_test { uint64_t number; char string[21]; char hex_string[17]; }; struct signed_number_format_test { int64_t number; char string[21]; }; struct float_number_format_test { double number; char string[21]; }; static Bool check_signed_number_format_test(long int number) { char string[21]; char expected[21]; sprintf(expected, "%ld", number); FormatInt64(number, string); if(strncmp(string, expected, 21) != 0) { fprintf(stderr, "Failed to convert %jd to decimal string (expected %s but got %s)\n", (intmax_t) number, expected, string); return FALSE; } return TRUE; } static Bool check_float_format_test(double number) { char string[21]; char expected[21]; /* we currently always print float as .2f */ sprintf(expected, "%.2f", number); FormatDouble(number, string); if(strncmp(string, expected, 21) != 0) { fprintf(stderr, "Failed to convert %f to string (%s vs %s)\n", number, expected, string); return FALSE; } return TRUE; } static Bool check_number_format_test(long unsigned int number) { char string[21]; char expected[21]; sprintf(expected, "%lu", number); FormatUInt64(number, string); if(strncmp(string, expected, 21) != 0) { fprintf(stderr, "Failed to convert %ju to decimal string (%s vs %s)\n", (intmax_t) number, expected, string); return FALSE; } sprintf(expected, "%lx", number); FormatUInt64Hex(number, string); if(strncmp(string, expected, 17) != 0) { fprintf(stderr, "Failed to convert %ju to hexadecimal string (%s vs %s)\n", (intmax_t) number, expected, string); return FALSE; } return TRUE; } /* FIXME: max range stuff */ double float_tests[] = { 0, 5, 0.1, 0.01, 5.2342, 10.2301, -1, -2.00, -0.6023, -1203.30 }; #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Woverflow" static void number_formatting(void) { int i; long unsigned int unsigned_tests[] = { 0,/* Zero */ 5, /* Single digit number */ 12, /* Two digit decimal number */ 37, /* Two digit hex number */ 0xC90B2, /* Large < 32 bit number */ 0x15D027BF211B37A, /* Large > 32 bit number */ 0xFFFFFFFFFFFFFFFF, /* Maximum 64-bit number */ }; long int signed_tests[] = { 0,/* Zero */ 5, /* Single digit number */ 12, /* Two digit decimal number */ 37, /* Two digit hex number */ 0xC90B2, /* Large < 32 bit number */ 0x15D027BF211B37A, /* Large > 32 bit number */ 0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */ -1, /* Single digit number */ -12, /* Two digit decimal number */ -0xC90B2, /* Large < 32 bit number */ -0x15D027BF211B37A, /* Large > 32 bit number */ -0x7FFFFFFFFFFFFFFF, /* Maximum 64-bit signed number */ } ; for (i = 0; i < ARRAY_SIZE(unsigned_tests); i++) assert(check_number_format_test(unsigned_tests[i])); for (i = 0; i < ARRAY_SIZE(signed_tests); i++) assert(check_signed_number_format_test(signed_tests[i])); for (i = 0; i < ARRAY_SIZE(float_tests); i++) assert(check_float_format_test(float_tests[i])); } #pragma GCC diagnostic pop #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wformat-security" #pragma GCC diagnostic ignored "-Wformat" #pragma GCC diagnostic ignored "-Wformat-extra-args" static void logging_format(void) { const char *log_file_path = "/tmp/Xorg-logging-test.log"; const char *str = "%s %d %u %% %p %i"; char buf[1024]; int i; unsigned int ui; long li; unsigned long lui; FILE *f; char read_buf[2048]; char *logmsg; uintptr_t ptr; /* set up buf to contain ".....end" */ memset(buf, '.', sizeof(buf)); strcpy(&buf[sizeof(buf) - 4], "end"); LogInit(log_file_path, NULL); assert((f = fopen(log_file_path, "r"))); #define read_log_msg(msg) do { \ msg = fgets(read_buf, sizeof(read_buf), f); \ assert(msg != NULL); \ msg = strchr(read_buf, ']'); \ assert(msg != NULL); \ assert(strlen(msg) > 2); \ msg = msg + 2; /* advance past [time.stamp] */ \ } while (0) /* boring test message */ LogMessageVerbSigSafe(X_ERROR, -1, "test message\n"); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) test message\n") == 0); /* long buf is truncated to "....en\n" */ LogMessageVerbSigSafe(X_ERROR, -1, buf); read_log_msg(logmsg); assert(strcmp(&logmsg[strlen(logmsg) - 3], "en\n") == 0); /* same thing, this time as string substitution */ LogMessageVerbSigSafe(X_ERROR, -1, "%s", buf); read_log_msg(logmsg); assert(strcmp(&logmsg[strlen(logmsg) - 3], "en\n") == 0); /* strings containing placeholders should just work */ LogMessageVerbSigSafe(X_ERROR, -1, "%s\n", str); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) %s %d %u %% %p %i\n") == 0); /* literal % */ LogMessageVerbSigSafe(X_ERROR, -1, "test %%\n"); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) test %\n") == 0); /* character */ LogMessageVerbSigSafe(X_ERROR, -1, "test %c\n", 'a'); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) test a\n") == 0); /* something unsupported % */ LogMessageVerbSigSafe(X_ERROR, -1, "test %Q\n"); read_log_msg(logmsg); assert(strstr(logmsg, "BUG") != NULL); LogMessageVerbSigSafe(X_ERROR, -1, "\n"); fseek(f, 0, SEEK_END); /* string substitution */ LogMessageVerbSigSafe(X_ERROR, -1, "%s\n", "substituted string"); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) substituted string\n") == 0); /* Invalid format */ LogMessageVerbSigSafe(X_ERROR, -1, "%4", 4); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) ") == 0); LogMessageVerbSigSafe(X_ERROR, -1, "\n"); fseek(f, 0, SEEK_END); /* %hld is bogus */ LogMessageVerbSigSafe(X_ERROR, -1, "%hld\n", 4); read_log_msg(logmsg); assert(strstr(logmsg, "BUG") != NULL); LogMessageVerbSigSafe(X_ERROR, -1, "\n"); fseek(f, 0, SEEK_END); /* number substitution */ ui = 0; do { char expected[30]; sprintf(expected, "(EE) %u\n", ui); LogMessageVerbSigSafe(X_ERROR, -1, "%u\n", ui); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %x\n", ui); LogMessageVerbSigSafe(X_ERROR, -1, "%x\n", ui); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); if (ui == 0) ui = 1; else ui <<= 1; } while(ui); lui = 0; do { char expected[30]; sprintf(expected, "(EE) %lu\n", lui); LogMessageVerbSigSafe(X_ERROR, -1, "%lu\n", lui); read_log_msg(logmsg); sprintf(expected, "(EE) %lld\n", (unsigned long long)ui); LogMessageVerbSigSafe(X_ERROR, -1, "%lld\n", (unsigned long long)ui); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %lx\n", lui); printf("%s\n", expected); LogMessageVerbSigSafe(X_ERROR, -1, "%lx\n", lui); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %llx\n", (unsigned long long)ui); LogMessageVerbSigSafe(X_ERROR, -1, "%llx\n", (unsigned long long)ui); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); if (lui == 0) lui = 1; else lui <<= 1; } while(lui); /* signed number substitution */ i = 0; do { char expected[30]; sprintf(expected, "(EE) %d\n", i); LogMessageVerbSigSafe(X_ERROR, -1, "%d\n", i); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %d\n", i | INT_MIN); LogMessageVerbSigSafe(X_ERROR, -1, "%d\n", i | INT_MIN); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); if (i == 0) i = 1; else i <<= 1; } while(i > INT_MIN); li = 0; do { char expected[30]; sprintf(expected, "(EE) %ld\n", li); LogMessageVerbSigSafe(X_ERROR, -1, "%ld\n", li); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %ld\n", li | LONG_MIN); LogMessageVerbSigSafe(X_ERROR, -1, "%ld\n", li | LONG_MIN); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %lld\n", (long long)li); LogMessageVerbSigSafe(X_ERROR, -1, "%lld\n", (long long)li); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); sprintf(expected, "(EE) %lld\n", (long long)(li | LONG_MIN)); LogMessageVerbSigSafe(X_ERROR, -1, "%lld\n", (long long)(li | LONG_MIN)); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); if (li == 0) li = 1; else li <<= 1; } while(li > LONG_MIN); /* pointer substitution */ /* we print a null-pointer differently to printf */ LogMessageVerbSigSafe(X_ERROR, -1, "%p\n", NULL); read_log_msg(logmsg); assert(strcmp(logmsg, "(EE) 0x0\n") == 0); ptr = 1; do { char expected[30]; #ifdef __sun /* Solaris doesn't autoadd "0x" to %p format */ sprintf(expected, "(EE) 0x%p\n", (void*)ptr); #else sprintf(expected, "(EE) %p\n", (void*)ptr); #endif LogMessageVerbSigSafe(X_ERROR, -1, "%p\n", (void*)ptr); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); ptr <<= 1; } while(ptr); for (i = 0; i < ARRAY_SIZE(float_tests); i++) { double d = float_tests[i]; char expected[30]; sprintf(expected, "(EE) %.2f\n", d); LogMessageVerbSigSafe(X_ERROR, -1, "%f\n", d); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); /* test for length modifiers, we just ignore them atm */ LogMessageVerbSigSafe(X_ERROR, -1, "%.3f\n", d); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); LogMessageVerbSigSafe(X_ERROR, -1, "%3f\n", d); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); LogMessageVerbSigSafe(X_ERROR, -1, "%.0f\n", d); read_log_msg(logmsg); assert(strcmp(logmsg, expected) == 0); } LogClose(EXIT_NO_ERROR); unlink(log_file_path); #undef read_log_msg } #pragma GCC diagnostic pop /* "-Wformat-security" */ int signal_logging_test(void) { number_formatting(); logging_format(); return 0; } xorg-server-21.1.16/test/touch.c0000644000175000017500000001734314757411105012110 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "inputstr.h" #include "assert.h" #include "scrnintstr.h" #include "tests-common.h" static void touch_grow_queue(void) { DeviceIntRec dev; ValuatorClassRec val; TouchClassRec touch; size_t size, new_size; int i; memset(&dev, 0, sizeof(dev)); dev.name = xnfstrdup("test device"); dev.id = 2; dev.valuator = &val; val.numAxes = 5; dev.touch = &touch; inputInfo.devices = &dev; size = 5; dev.last.num_touches = size; dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches)); assert(dev.last.touches); for (i = 0; i < size; i++) { dev.last.touches[i].active = TRUE; dev.last.touches[i].ddx_id = i; dev.last.touches[i].client_id = i * 2; } /* no more space, should've reallocated and succeeded */ assert(TouchBeginDDXTouch(&dev, 1234) != NULL); new_size = size + size / 2 + 1; assert(dev.last.num_touches == new_size); /* make sure we haven't touched those */ for (i = 0; i < size; i++) { DDXTouchPointInfoPtr t = &dev.last.touches[i]; assert(t->active == TRUE); assert(t->ddx_id == i); assert(t->client_id == i * 2); } assert(dev.last.touches[size].active == TRUE); assert(dev.last.touches[size].ddx_id == 1234); assert(dev.last.touches[size].client_id == 1); /* make sure those are zero-initialized */ for (i = size + 1; i < new_size; i++) { DDXTouchPointInfoPtr t = &dev.last.touches[i]; assert(t->active == FALSE); assert(t->client_id == 0); assert(t->ddx_id == 0); } free(dev.name); } static void touch_find_ddxid(void) { DeviceIntRec dev; DDXTouchPointInfoPtr ti, ti2; ValuatorClassRec val; TouchClassRec touch; int size = 5; int i; memset(&dev, 0, sizeof(dev)); dev.name = xnfstrdup("test device"); dev.id = 2; dev.valuator = &val; val.numAxes = 5; dev.touch = &touch; dev.last.num_touches = size; dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches)); inputInfo.devices = &dev; assert(dev.last.touches); dev.last.touches[0].active = TRUE; dev.last.touches[0].ddx_id = 10; dev.last.touches[0].client_id = 20; /* existing */ ti = TouchFindByDDXID(&dev, 10, FALSE); assert(ti == &dev.last.touches[0]); /* non-existing */ ti = TouchFindByDDXID(&dev, 20, FALSE); assert(ti == NULL); /* Non-active */ dev.last.touches[0].active = FALSE; ti = TouchFindByDDXID(&dev, 10, FALSE); assert(ti == NULL); /* create on number 2 */ dev.last.touches[0].active = TRUE; ti = TouchFindByDDXID(&dev, 20, TRUE); assert(ti == &dev.last.touches[1]); assert(ti->active); assert(ti->ddx_id == 20); /* set all to active */ for (i = 0; i < size; i++) dev.last.touches[i].active = TRUE; /* Try to create more, succeed */ ti = TouchFindByDDXID(&dev, 30, TRUE); assert(ti != NULL); ti2 = TouchFindByDDXID(&dev, 30, TRUE); assert(ti == ti2); /* make sure we have resized */ assert(dev.last.num_touches == 8); /* EQ grows from 5 to 8 */ /* stop one touchpoint, try to create, succeed */ dev.last.touches[2].active = FALSE; ti = TouchFindByDDXID(&dev, 35, TRUE); assert(ti == &dev.last.touches[2]); ti = TouchFindByDDXID(&dev, 40, TRUE); assert(ti == &dev.last.touches[size+1]); free(dev.name); } static void touch_begin_ddxtouch(void) { DeviceIntRec dev; DDXTouchPointInfoPtr ti; ValuatorClassRec val; TouchClassRec touch; int ddx_id = 123; unsigned int last_client_id = 0; int size = 5; memset(&dev, 0, sizeof(dev)); dev.name = xnfstrdup("test device"); dev.id = 2; dev.valuator = &val; val.numAxes = 5; touch.mode = XIDirectTouch; dev.touch = &touch; dev.last.num_touches = size; dev.last.touches = calloc(dev.last.num_touches, sizeof(*dev.last.touches)); inputInfo.devices = &dev; assert(dev.last.touches); ti = TouchBeginDDXTouch(&dev, ddx_id); assert(ti); assert(ti->ddx_id == ddx_id); /* client_id == ddx_id can happen in real life, but not in this test */ assert(ti->client_id != ddx_id); assert(ti->active); assert(ti->client_id > last_client_id); assert(ti->emulate_pointer); last_client_id = ti->client_id; ddx_id += 10; ti = TouchBeginDDXTouch(&dev, ddx_id); assert(ti); assert(ti->ddx_id == ddx_id); /* client_id == ddx_id can happen in real life, but not in this test */ assert(ti->client_id != ddx_id); assert(ti->active); assert(ti->client_id > last_client_id); assert(!ti->emulate_pointer); last_client_id = ti->client_id; free(dev.name); } static void touch_begin_touch(void) { DeviceIntRec dev; TouchClassRec touch; ValuatorClassRec val; TouchPointInfoPtr ti; int touchid = 12434; int sourceid = 23; SpriteInfoRec sprite; ScreenRec screen; screenInfo.screens[0] = &screen; memset(&dev, 0, sizeof(dev)); dev.name = xnfstrdup("test device"); dev.id = 2; memset(&sprite, 0, sizeof(sprite)); dev.spriteInfo = &sprite; memset(&touch, 0, sizeof(touch)); touch.num_touches = 0; memset(&val, 0, sizeof(val)); dev.valuator = &val; val.numAxes = 2; ti = TouchBeginTouch(&dev, sourceid, touchid, TRUE); assert(!ti); dev.touch = &touch; ti = TouchBeginTouch(&dev, sourceid, touchid, TRUE); assert(ti); assert(ti->client_id == touchid); assert(ti->active); assert(ti->sourceid == sourceid); assert(ti->emulate_pointer); assert(touch.num_touches == 1); free(dev.name); } static void touch_init(void) { DeviceIntRec dev; Atom labels[2] = { 0 }; int rc; SpriteInfoRec sprite; ScreenRec screen; screenInfo.screens[0] = &screen; memset(&dev, 0, sizeof(dev)); dev.name = xnfstrdup("test device"); memset(&sprite, 0, sizeof(sprite)); dev.spriteInfo = &sprite; InitAtoms(); rc = InitTouchClassDeviceStruct(&dev, 1, XIDirectTouch, 2); assert(rc == FALSE); InitValuatorClassDeviceStruct(&dev, 2, labels, 10, Absolute); rc = InitTouchClassDeviceStruct(&dev, 1, XIDirectTouch, 2); assert(rc == TRUE); assert(dev.touch); free(dev.name); } int touch_test(void) { printf("touch_test: start...\n"); touch_grow_queue(); touch_find_ddxid(); touch_begin_ddxtouch(); touch_init(); touch_begin_touch(); printf("touch_test: exiting successfully\n"); return 0; } xorg-server-21.1.16/test/xfree86.c0000644000175000017500000000602614757411105012251 /** * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "xf86.h" #include "xf86Parser.h" #include "tests-common.h" static void xfree86_option_list_duplicate(void) { XF86OptionPtr options; XF86OptionPtr duplicate; const char *o1 = "foo", *o2 = "bar", *v1 = "one", *v2 = "two"; const char *o_null = "NULL"; char *val1, *val2; XF86OptionPtr a, b; duplicate = xf86OptionListDuplicate(NULL); assert(!duplicate); options = xf86AddNewOption(NULL, o1, v1); assert(options); options = xf86AddNewOption(options, o2, v2); assert(options); options = xf86AddNewOption(options, o_null, NULL); assert(options); duplicate = xf86OptionListDuplicate(options); assert(duplicate); val1 = xf86CheckStrOption(options, o1, "1"); val2 = xf86CheckStrOption(duplicate, o1, "2"); assert(strcmp(val1, v1) == 0); assert(strcmp(val1, val2) == 0); val1 = xf86CheckStrOption(options, o2, "1"); val2 = xf86CheckStrOption(duplicate, o2, "2"); assert(strcmp(val1, v2) == 0); assert(strcmp(val1, val2) == 0); a = xf86FindOption(options, o_null); b = xf86FindOption(duplicate, o_null); assert(a); assert(b); } static void xfree86_add_comment(void) { char *current = NULL; const char *comment; char compare[1024] = { 0 }; comment = "# foo"; current = xf86addComment(current, comment); strcpy(compare, comment); strcat(compare, "\n"); assert(!strcmp(current, compare)); /* this used to overflow */ strcpy(current, "\n"); comment = "foobar\n"; current = xf86addComment(current, comment); strcpy(compare, "\n#"); strcat(compare, comment); assert(!strcmp(current, compare)); free(current); } int xfree86_test(void) { xfree86_option_list_duplicate(); xfree86_add_comment(); return 0; } xorg-server-21.1.16/test/test_xkb.c0000644000175000017500000001270114757411105012602 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "opaque.h" #include "property.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "../xkb/xkbgeom.h" #include #include "xkbfile.h" #include "../xkb/xkb.h" #include #include "tests-common.h" /** * Initialize an empty XkbRMLVOSet. * Call XkbGetRulesDflts to obtain the default ruleset. * Compare obtained ruleset with the built-in defaults. * * Result: RMLVO defaults are the same as obtained. */ static void xkb_get_rules_test(void) { XkbRMLVOSet rmlvo = { NULL }; XkbGetRulesDflts(&rmlvo); assert(rmlvo.rules); assert(rmlvo.model); assert(rmlvo.layout); assert(rmlvo.variant); assert(rmlvo.options); assert(strcmp(rmlvo.rules, XKB_DFLT_RULES) == 0); assert(strcmp(rmlvo.model, XKB_DFLT_MODEL) == 0); assert(strcmp(rmlvo.layout, XKB_DFLT_LAYOUT) == 0); assert(strcmp(rmlvo.variant, XKB_DFLT_VARIANT) == 0); assert(strcmp(rmlvo.options, XKB_DFLT_OPTIONS) == 0); } /** * Initialize an random XkbRMLVOSet. * Call XkbGetRulesDflts to obtain the default ruleset. * Compare obtained ruleset with the built-in defaults. * Result: RMLVO defaults are the same as obtained. */ static void xkb_set_rules_test(void) { XkbRMLVOSet rmlvo; XkbRMLVOSet rmlvo_new = { NULL }; XkbInitRules(&rmlvo, "test-rules", "test-model", "test-layout", "test-variant", "test-options"); assert(rmlvo.rules); assert(rmlvo.model); assert(rmlvo.layout); assert(rmlvo.variant); assert(rmlvo.options); XkbSetRulesDflts(&rmlvo); XkbGetRulesDflts(&rmlvo_new); /* XkbGetRulesDflts strdups the values */ assert(rmlvo.rules != rmlvo_new.rules); assert(rmlvo.model != rmlvo_new.model); assert(rmlvo.layout != rmlvo_new.layout); assert(rmlvo.variant != rmlvo_new.variant); assert(rmlvo.options != rmlvo_new.options); assert(strcmp(rmlvo.rules, rmlvo_new.rules) == 0); assert(strcmp(rmlvo.model, rmlvo_new.model) == 0); assert(strcmp(rmlvo.layout, rmlvo_new.layout) == 0); assert(strcmp(rmlvo.variant, rmlvo_new.variant) == 0); assert(strcmp(rmlvo.options, rmlvo_new.options) == 0); XkbFreeRMLVOSet(&rmlvo, FALSE); } /** * Get the default RMLVO set. * Set the default RMLVO set. * Get the default RMLVO set. * Repeat the last two steps. * * Result: RMLVO set obtained is the same as previously set. */ static void xkb_set_get_rules_test(void) { /* This test failed before XkbGetRulesDftlts changed to strdup. We test this twice because the first time using XkbGetRulesDflts we obtain the built-in defaults. The unexpected free isn't triggered until the second XkbSetRulesDefaults. */ XkbRMLVOSet rmlvo = { NULL }; XkbRMLVOSet rmlvo_backup; XkbGetRulesDflts(&rmlvo); /* pass 1 */ XkbSetRulesDflts(&rmlvo); XkbGetRulesDflts(&rmlvo); /* Make a backup copy */ rmlvo_backup.rules = strdup(rmlvo.rules); rmlvo_backup.layout = strdup(rmlvo.layout); rmlvo_backup.model = strdup(rmlvo.model); rmlvo_backup.variant = strdup(rmlvo.variant); rmlvo_backup.options = strdup(rmlvo.options); /* pass 2 */ XkbSetRulesDflts(&rmlvo); /* This test is iffy, because strictly we may be comparing against already * freed memory */ assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0); assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0); assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0); assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0); assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0); XkbGetRulesDflts(&rmlvo); assert(strcmp(rmlvo.rules, rmlvo_backup.rules) == 0); assert(strcmp(rmlvo.model, rmlvo_backup.model) == 0); assert(strcmp(rmlvo.layout, rmlvo_backup.layout) == 0); assert(strcmp(rmlvo.variant, rmlvo_backup.variant) == 0); assert(strcmp(rmlvo.options, rmlvo_backup.options) == 0); } int xkb_test(void) { xkb_set_get_rules_test(); xkb_get_rules_test(); xkb_set_rules_test(); return 0; } xorg-server-21.1.16/test/xtest.c0000644000175000017500000001012414757411105012123 /** * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ /* Test relies on assert() */ #undef NDEBUG #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "input.h" #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "exevents.h" #include "extinit.h" #include "xkbsrv.h" #include "xserver-properties.h" #include "syncsrv.h" #include "tests-common.h" /** */ /* from Xext/xtest.c */ extern DeviceIntPtr xtestpointer, xtestkeyboard; /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } static void device_cursor_cleanup(DeviceIntPtr dev, ScreenPtr screen) { } static void xtest_init_devices(void) { ScreenRec screen = {0}; ClientRec server_client = {0}; WindowRec root = {{0}}; WindowOptRec optional = {0}; /* random stuff that needs initialization */ root.drawable.id = 0xab; root.optional = &optional; screen.root = &root; screenInfo.numScreens = 1; screenInfo.screens[0] = &screen; screen.myNum = 0; screen.id = 100; screen.width = 640; screen.height = 480; screen.DeviceCursorInitialize = device_cursor_init; screen.DeviceCursorCleanup = device_cursor_cleanup; dixResetPrivates(); serverClient = &server_client; InitClient(serverClient, 0, (void *) NULL); if (!InitClientResources(serverClient)) /* for root resources */ FatalError("couldn't init server resources"); InitAtoms(); SyncExtensionInit(); /* this also inits the xtest devices */ InitCoreDevices(); assert(xtestpointer); assert(xtestkeyboard); assert(IsXTestDevice(xtestpointer, NULL)); assert(IsXTestDevice(xtestkeyboard, NULL)); assert(IsXTestDevice(xtestpointer, inputInfo.pointer)); assert(IsXTestDevice(xtestkeyboard, inputInfo.keyboard)); assert(GetXTestDevice(inputInfo.pointer) == xtestpointer); assert(GetXTestDevice(inputInfo.keyboard) == xtestkeyboard); } /** * Each xtest devices has a property attached marking it. This property * cannot be changed. */ static void xtest_properties(void) { int rc; char value = 1; XIPropertyValuePtr prop; Atom xtest_prop = XIGetKnownProperty(XI_PROP_XTEST_DEVICE); rc = XIGetDeviceProperty(xtestpointer, xtest_prop, &prop); assert(rc == Success); assert(prop); rc = XIGetDeviceProperty(xtestkeyboard, xtest_prop, &prop); assert(rc == Success); assert(prop != NULL); rc = XIChangeDeviceProperty(xtestpointer, xtest_prop, XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE); assert(rc == BadAccess); rc = XIChangeDeviceProperty(xtestkeyboard, xtest_prop, XA_INTEGER, 8, PropModeReplace, 1, &value, FALSE); assert(rc == BadAccess); } int xtest_test(void) { xtest_init_devices(); xtest_properties(); return 0; } xorg-server-21.1.16/test/hashtabletest.c0000644000175000017500000000573014757411105013616 #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "hashtable.h" #include "resource.h" #include "tests-common.h" static void print_xid(void* ptr, void* v) { XID *x = v; printf("%ld", (long)(*x)); } static void print_int(void* ptr, void* v) { int *x = v; printf("%d", *x); } static int test1(void) { HashTable h; int c; int ok = 1; const int numKeys = 420; printf("test1\n"); h = ht_create(sizeof(XID), sizeof(int), ht_resourceid_hash, ht_resourceid_compare, NULL); for (c = 0; c < numKeys; ++c) { int *dest; XID id = c; dest = ht_add(h, &id); if (dest) { *dest = 2 * c; } } printf("Distribution after insertion\n"); ht_dump_distribution(h); ht_dump_contents(h, print_xid, print_int, NULL); for (c = 0; c < numKeys; ++c) { XID id = c; int* v = ht_find(h, &id); if (v) { if (*v == 2 * c) { // ok } else { printf("Key %d doesn't have expected value %d but has %d instead\n", c, 2 * c, *v); ok = 0; } } else { ok = 0; printf("Cannot find key %d\n", c); } } if (ok) { printf("%d keys inserted and found\n", c); for (c = 0; c < numKeys; ++c) { XID id = c; ht_remove(h, &id); } printf("Distribution after deletion\n"); ht_dump_distribution(h); } ht_destroy(h); return ok; } static int test2(void) { HashTable h; int c; int ok = 1; const int numKeys = 420; printf("test2\n"); h = ht_create(sizeof(XID), 0, ht_resourceid_hash, ht_resourceid_compare, NULL); for (c = 0; c < numKeys; ++c) { XID id = c; ht_add(h, &id); } for (c = 0; c < numKeys; ++c) { XID id = c; if (!ht_find(h, &id)) { ok = 0; printf("Cannot find key %d\n", c); } } { XID id = c + 1; if (ht_find(h, &id)) { ok = 0; printf("Could find a key that shouldn't be there\n"); } } ht_destroy(h); if (ok) { printf("Test with empty keys OK\n"); } else { printf("Test with empty keys FAILED\n"); } return ok; } static int test3(void) { int ok = 1; HtGenericHashSetupRec hashSetup = { .keySize = 4 }; HashTable h; printf("test3\n"); h = ht_create(4, 0, ht_generic_hash, ht_generic_compare, &hashSetup); if (!ht_add(h, "helo") || !ht_add(h, "wrld")) { printf("Could not insert keys\n"); } if (!ht_find(h, "helo") || !ht_find(h, "wrld")) { ok = 0; printf("Could not find inserted keys\n"); } printf("Hash distribution with two strings\n"); ht_dump_distribution(h); ht_destroy(h); return ok; } int hashtabletest_test(void) { int ok = test1(); ok = ok && test2(); ok = ok && test3(); return ok ? 0 : 1; } xorg-server-21.1.16/Xext/0000755000175000017500000000000014757411133010644 5xorg-server-21.1.16/Xext/meson.build0000644000175000017500000000256314757411105012733 srcs_xext = [ 'bigreq.c', 'geext.c', 'shape.c', 'sleepuntil.c', 'sync.c', 'xcmisc.c', 'xtest.c', ] hdrs_xext = [ 'geext.h', 'geint.h', 'syncsdk.h', ] if build_dpms srcs_xext += 'dpms.c' endif if build_mitshm srcs_xext += 'shm.c' hdrs_xext += ['shmint.h'] endif if build_hashtable srcs_xext += 'hashtable.c' endif if build_res srcs_xext += 'xres.c' endif if build_screensaver srcs_xext += 'saver.c' endif if build_xace srcs_xext += 'xace.c' hdrs_xext += ['xace.h', 'xacestr.h'] endif if build_xf86bigfont srcs_xext += 'xf86bigfont.c' endif if build_xinerama srcs_xext += ['panoramiX.c', 'panoramiXprocs.c', 'panoramiXSwap.c'] hdrs_xext += ['panoramiX.h', 'panoramiXsrv.h'] endif if build_xsecurity srcs_xext += ['security.c'] endif if build_xselinux srcs_xext += ['xselinux_ext.c', 'xselinux_hooks.c', 'xselinux_label.c'] endif if build_xv srcs_xext += ['xvmain.c', 'xvdisp.c', 'xvmc.c'] hdrs_xext += ['xvdix.h', 'xvmcext.h'] endif libxserver_xext = static_library('libxserver_xext', srcs_xext, include_directories: inc, dependencies: common_dep, ) libxserver_xext_vidmode = static_library('libxserver_xext_vidmode', 'vidmode.c', include_directories: inc, dependencies: common_dep, ) if build_xorg install_data(hdrs_xext, install_dir: xorgsdkdir) endif xorg-server-21.1.16/Xext/Makefile.am0000644000175000017500000000522114757411105012617 noinst_LTLIBRARIES = libXext.la libXvidmode.la libhashtable.la AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h syncsdk.h endif # Sources always included in libXextbuiltin.la, libXext.la BUILTIN_SRCS = \ bigreq.c \ geext.c \ shape.c \ sleepuntil.c \ sleepuntil.h \ sync.c \ syncsdk.h \ syncsrv.h \ xcmisc.c \ xtest.c BUILTIN_LIBS = # Optional sources included if extension enabled by configure.ac rules # MIT Shared Memory extension MITSHM_SRCS = shm.c shmint.h if MITSHM BUILTIN_SRCS += $(MITSHM_SRCS) endif # XVideo extension XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h if XV BUILTIN_SRCS += $(XV_SRCS) endif # XResource extension: lets clients get data about per-client resource usage RES_SRCS = xres.c if RES BUILTIN_SRCS += $(RES_SRCS) endif # MIT ScreenSaver extension SCREENSAVER_SRCS = saver.c if SCREENSAVER BUILTIN_SRCS += $(SCREENSAVER_SRCS) endif # Xinerama extension: making multiple video devices act as one virtual screen XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c if XINERAMA BUILTIN_SRCS += $(XINERAMA_SRCS) if XORG sdk_HEADERS += panoramiXsrv.h panoramiX.h endif endif # X-ACE extension: provides hooks for building security policy extensions # like XC-Security, X-SELinux & XTSol XACE_SRCS = xace.c xace.h xacestr.h if XACE BUILTIN_SRCS += $(XACE_SRCS) if XORG sdk_HEADERS += xace.h xacestr.h endif endif # SELinux extension: provides SELinux policy support for X objects # requires X-ACE extension XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h if XSELINUX BUILTIN_SRCS += $(XSELINUX_SRCS) BUILTIN_LIBS += $(SELINUX_LIBS) endif # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h if XCSECURITY BUILTIN_SRCS += $(XCSECURITY_SRCS) endif # XF86 Big Font extension BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h if XF86BIGFONT BUILTIN_SRCS += $(BIGFONT_SRCS) endif # DPMS extension DPMS_SRCS = dpms.c dpmsproc.h if DPMSExtension BUILTIN_SRCS += $(DPMS_SRCS) endif # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la libXext_la_SOURCES = $(BUILTIN_SRCS) libXext_la_LIBADD = $(BUILTIN_LIBS) if RES libXext_la_LIBADD += libhashtable.la endif # XVidMode extension libXvidmode_la_SOURCES = vidmode.c #Hashtable libhashtable_la_SOURCES = hashtable.c hashtable.h EXTRA_DIST = \ $(MITSHM_SRCS) \ $(XV_SRCS) \ $(RES_SRCS) \ $(SCREENSAVER_SRCS) \ $(XACE_SRCS) \ $(XCSECURITY_SRCS) \ $(XSELINUX_SRCS) \ $(XINERAMA_SRCS) \ $(BIGFONT_SRCS) \ $(DPMS_SRCS) \ $(GE_SRCS) xorg-server-21.1.16/Xext/xvdix.h0000644000175000017500000002155014757411105012101 /*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. ******************************************************************/ #ifndef XVDIX_H #define XVDIX_H /* ** File: ** ** xvdix.h --- Xv device independent header file ** ** Author: ** ** David Carver (Digital Workstation Engineering/Project Athena) ** ** Revisions: ** ** 29.08.91 Carver ** - removed UnrealizeWindow wrapper unrealizing windows no longer ** preempts video ** ** 11.06.91 Carver ** - changed SetPortControl to SetPortAttribute ** - changed GetPortControl to GetPortAttribute ** - changed QueryBestSize ** ** 15.05.91 Carver ** - version 2.0 upgrade ** ** 24.01.91 Carver ** - version 1.4 upgrade ** */ #include "scrnintstr.h" #include extern _X_EXPORT unsigned long XvExtensionGeneration; extern _X_EXPORT unsigned long XvScreenGeneration; extern _X_EXPORT unsigned long XvResourceGeneration; extern _X_EXPORT int XvReqCode; extern _X_EXPORT int XvEventBase; extern _X_EXPORT int XvErrorBase; extern _X_EXPORT RESTYPE XvRTPort; extern _X_EXPORT RESTYPE XvRTEncoding; extern _X_EXPORT RESTYPE XvRTGrab; extern _X_EXPORT RESTYPE XvRTVideoNotify; extern _X_EXPORT RESTYPE XvRTVideoNotifyList; extern _X_EXPORT RESTYPE XvRTPortNotify; typedef struct { int numerator; int denominator; } XvRationalRec, *XvRationalPtr; typedef struct { char depth; unsigned long visual; } XvFormatRec, *XvFormatPtr; typedef struct { unsigned long id; ClientPtr client; } XvGrabRec, *XvGrabPtr; typedef struct _XvVideoNotifyRec { struct _XvVideoNotifyRec *next; ClientPtr client; unsigned long id; unsigned long mask; } XvVideoNotifyRec, *XvVideoNotifyPtr; typedef struct _XvPortNotifyRec { struct _XvPortNotifyRec *next; ClientPtr client; unsigned long id; } XvPortNotifyRec, *XvPortNotifyPtr; typedef struct { int id; ScreenPtr pScreen; char *name; unsigned short width, height; XvRationalRec rate; } XvEncodingRec, *XvEncodingPtr; typedef struct _XvAttributeRec { int flags; int min_value; int max_value; char *name; } XvAttributeRec, *XvAttributePtr; typedef struct { int id; int type; int byte_order; char guid[16]; int bits_per_pixel; int format; int num_planes; /* for RGB formats only */ int depth; unsigned int red_mask; unsigned int green_mask; unsigned int blue_mask; /* for YUV formats only */ unsigned int y_sample_bits; unsigned int u_sample_bits; unsigned int v_sample_bits; unsigned int horz_y_period; unsigned int horz_u_period; unsigned int horz_v_period; unsigned int vert_y_period; unsigned int vert_u_period; unsigned int vert_v_period; char component_order[32]; int scanline_order; } XvImageRec, *XvImagePtr; typedef struct { unsigned long base_id; unsigned char type; char *name; int nEncodings; XvEncodingPtr pEncodings; int nFormats; XvFormatPtr pFormats; int nAttributes; XvAttributePtr pAttributes; int nImages; XvImagePtr pImages; int nPorts; struct _XvPortRec *pPorts; ScreenPtr pScreen; int (*ddPutVideo) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); int (*ddPutStill) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); int (*ddGetVideo) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); int (*ddGetStill) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); int (*ddStopVideo) (struct _XvPortRec *, DrawablePtr); int (*ddSetPortAttribute) (struct _XvPortRec *, Atom, INT32); int (*ddGetPortAttribute) (struct _XvPortRec *, Atom, INT32 *); int (*ddQueryBestSize) (struct _XvPortRec *, CARD8, CARD16, CARD16, CARD16, CARD16, unsigned int *, unsigned int *); int (*ddPutImage) (DrawablePtr, struct _XvPortRec *, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); int (*ddQueryImageAttributes) (struct _XvPortRec *, XvImagePtr, CARD16 *, CARD16 *, int *, int *); DevUnion devPriv; } XvAdaptorRec, *XvAdaptorPtr; typedef struct _XvPortRec { unsigned long id; XvAdaptorPtr pAdaptor; XvPortNotifyPtr pNotify; DrawablePtr pDraw; ClientPtr client; XvGrabRec grab; TimeStamp time; DevUnion devPriv; } XvPortRec, *XvPortPtr; #define VALIDATE_XV_PORT(portID, pPort, mode)\ {\ int rc = dixLookupResourceByType((void **)&(pPort), portID,\ XvRTPort, client, mode);\ if (rc != Success)\ return rc;\ } typedef struct { int version, revision; int nAdaptors; XvAdaptorPtr pAdaptors; DestroyWindowProcPtr DestroyWindow; DestroyPixmapProcPtr DestroyPixmap; CloseScreenProcPtr CloseScreen; } XvScreenRec, *XvScreenPtr; #define SCREEN_PROLOGUE(pScreen, field) ((pScreen)->field = ((XvScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, XvScreenKey))->field) #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) /* Errors */ #define _XvBadPort (XvBadPort+XvErrorBase) #define _XvBadEncoding (XvBadEncoding+XvErrorBase) extern _X_EXPORT int ProcXvDispatch(ClientPtr); extern _X_EXPORT int SProcXvDispatch(ClientPtr); extern _X_EXPORT int XvScreenInit(ScreenPtr); extern _X_EXPORT DevPrivateKey XvGetScreenKey(void); extern _X_EXPORT unsigned long XvGetRTPort(void); extern _X_EXPORT void XvFreeAdaptor(XvAdaptorPtr pAdaptor); extern void _X_EXPORT XvFillColorKey(DrawablePtr pDraw, CARD32 key, RegionPtr region); extern _X_EXPORT int XvdiSendPortNotify(XvPortPtr, Atom, INT32); extern _X_EXPORT int XvdiPutVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); extern _X_EXPORT int XvdiPutStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); extern _X_EXPORT int XvdiGetVideo(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); extern _X_EXPORT int XvdiGetStill(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16); extern _X_EXPORT int XvdiPutImage(ClientPtr, DrawablePtr, XvPortPtr, GCPtr, INT16, INT16, CARD16, CARD16, INT16, INT16, CARD16, CARD16, XvImagePtr, unsigned char *, Bool, CARD16, CARD16); extern _X_EXPORT int XvdiSelectVideoNotify(ClientPtr, DrawablePtr, BOOL); extern _X_EXPORT int XvdiSelectPortNotify(ClientPtr, XvPortPtr, BOOL); extern _X_EXPORT int XvdiSetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32); extern _X_EXPORT int XvdiGetPortAttribute(ClientPtr, XvPortPtr, Atom, INT32 *); extern _X_EXPORT int XvdiStopVideo(ClientPtr, XvPortPtr, DrawablePtr); extern _X_EXPORT int XvdiMatchPort(XvPortPtr, DrawablePtr); extern _X_EXPORT int XvdiGrabPort(ClientPtr, XvPortPtr, Time, int *); extern _X_EXPORT int XvdiUngrabPort(ClientPtr, XvPortPtr, Time); #endif /* XVDIX_H */ xorg-server-21.1.16/Xext/xvmcext.h0000644000175000017500000000557314757411105012444 #ifndef _XVMC_H #define _XVMC_H #include #include "xvdix.h" typedef struct { int num_xvimages; int *xvimage_ids; } XvMCImageIDList; typedef struct { int surface_type_id; int chroma_format; int color_description; unsigned short max_width; unsigned short max_height; unsigned short subpicture_max_width; unsigned short subpicture_max_height; int mc_type; int flags; XvMCImageIDList *compatible_subpictures; } XvMCSurfaceInfoRec, *XvMCSurfaceInfoPtr; typedef struct { XID context_id; ScreenPtr pScreen; int adapt_num; int surface_type_id; unsigned short width; unsigned short height; CARD32 flags; int refcnt; void *port_priv; void *driver_priv; } XvMCContextRec, *XvMCContextPtr; typedef struct { XID surface_id; int surface_type_id; XvMCContextPtr context; void *driver_priv; } XvMCSurfaceRec, *XvMCSurfacePtr; typedef struct { XID subpicture_id; int xvimage_id; unsigned short width; unsigned short height; int num_palette_entries; int entry_bytes; char component_order[4]; XvMCContextPtr context; void *driver_priv; } XvMCSubpictureRec, *XvMCSubpicturePtr; typedef int (*XvMCCreateContextProcPtr) (XvPortPtr port, XvMCContextPtr context, int *num_priv, CARD32 **priv); typedef void (*XvMCDestroyContextProcPtr) (XvMCContextPtr context); typedef int (*XvMCCreateSurfaceProcPtr) (XvMCSurfacePtr surface, int *num_priv, CARD32 **priv); typedef void (*XvMCDestroySurfaceProcPtr) (XvMCSurfacePtr surface); typedef int (*XvMCCreateSubpictureProcPtr) (XvMCSubpicturePtr subpicture, int *num_priv, CARD32 **priv); typedef void (*XvMCDestroySubpictureProcPtr) (XvMCSubpicturePtr subpicture); typedef struct { XvAdaptorPtr xv_adaptor; int num_surfaces; XvMCSurfaceInfoPtr *surfaces; int num_subpictures; XvImagePtr *subpictures; XvMCCreateContextProcPtr CreateContext; XvMCDestroyContextProcPtr DestroyContext; XvMCCreateSurfaceProcPtr CreateSurface; XvMCDestroySurfaceProcPtr DestroySurface; XvMCCreateSubpictureProcPtr CreateSubpicture; XvMCDestroySubpictureProcPtr DestroySubpicture; } XvMCAdaptorRec, *XvMCAdaptorPtr; extern int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr); extern _X_EXPORT int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr adapt); extern _X_EXPORT XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id); extern _X_EXPORT int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name, const char *busID, int major, int minor, int patchLevel); #endif /* _XVMC_H */ xorg-server-21.1.16/Xext/geext.h0000644000175000017500000000573514757411105012062 /* Copyright 2007 Peter Hutterer 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 AUTHOR 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 author 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 author. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GEEXT_H_ #define _GEEXT_H_ #include /** Struct to keep information about registered extensions */ typedef struct _GEExtension { /** Event swapping routine */ void (*evswap) (xGenericEvent *from, xGenericEvent *to); } GEExtension, *GEExtensionPtr; /* All registered extensions and their handling functions. */ extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS]; /* Typecast to generic event */ #define GEV(ev) ((xGenericEvent*)(ev)) /* Returns the extension offset from the event */ #define GEEXT(ev) (GEV(ev)->extension) /* Return zero-based extension offset (offset - 128). Only for use in arrays */ #define GEEXTIDX(ev) (GEEXT(ev) & 0x7F) /* True if mask is set for extension on window */ #define GEMaskIsSet(pWin, extension, mask) \ ((pWin)->optional && \ (pWin)->optional->geMasks && \ ((pWin)->optional->geMasks->eventMasks[(extension) & 0x7F] & (mask))) /* Returns first client */ #define GECLIENT(pWin) \ (((pWin)->optional) ? (pWin)->optional->geMasks->geClients : NULL) /* Returns the event_fill for the given event */ #define GEEventFill(ev) \ GEExtensions[GEEXTIDX(ev)].evfill #define GEIsType(ev, ext, ev_type) \ ((GEV(ev)->type == GenericEvent) && \ GEEXT(ev) == (ext) && \ GEV(ev)->evtype == (ev_type)) /* Interface for other extensions */ extern _X_EXPORT void GERegisterExtension(int extension, void (*ev_dispatch) (xGenericEvent *from, xGenericEvent *to)); extern _X_EXPORT void GEInitEvent(xGenericEvent *ev, int extension); #endif /* _GEEXT_H_ */ xorg-server-21.1.16/Xext/geint.h0000644000175000017500000000351114757411105012042 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _GEINT_H_ #define _GEINT_H_ #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include extern DevPrivateKeyRec GEClientPrivateKeyRec; #define GEClientPrivateKey (&GEClientPrivateKeyRec) typedef struct _GEClientInfo { CARD32 major_version; CARD32 minor_version; } GEClientInfoRec, *GEClientInfoPtr; #define GEGetClient(pClient) ((GEClientInfoPtr)(dixLookupPrivate(&((pClient)->devPrivates), GEClientPrivateKey))) #endif /* _GEINT_H_ */ xorg-server-21.1.16/Xext/shmint.h0000644000175000017500000000526714757411105012250 /* * 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. */ #ifndef _SHMINT_H_ #define _SHMINT_H_ #include #include "screenint.h" #include "pixmap.h" #include "gc.h" #define XSHM_PUT_IMAGE_ARGS \ DrawablePtr /* dst */, \ GCPtr /* pGC */, \ int /* depth */, \ unsigned int /* format */, \ int /* w */, \ int /* h */, \ int /* sx */, \ int /* sy */, \ int /* sw */, \ int /* sh */, \ int /* dx */, \ int /* dy */, \ char * /* data */ #define XSHM_CREATE_PIXMAP_ARGS \ ScreenPtr /* pScreen */, \ int /* width */, \ int /* height */, \ int /* depth */, \ char * /* addr */ typedef struct _ShmFuncs { PixmapPtr (*CreatePixmap) (XSHM_CREATE_PIXMAP_ARGS); void (*PutImage) (XSHM_PUT_IMAGE_ARGS); } ShmFuncs, *ShmFuncsPtr; #if XTRANS_SEND_FDS #define SHM_FD_PASSING 1 #endif typedef struct _ShmDesc { struct _ShmDesc *next; int shmid; int refcnt; char *addr; Bool writable; unsigned long size; #ifdef SHM_FD_PASSING Bool is_fd; struct busfault *busfault; XID resource; #endif } ShmDescRec, *ShmDescPtr; #ifdef SHM_FD_PASSING #define SHMDESC_IS_FD(shmdesc) ((shmdesc)->is_fd) #else #define SHMDESC_IS_FD(shmdesc) (0) #endif extern _X_EXPORT void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs); extern _X_EXPORT void ShmRegisterFbFuncs(ScreenPtr pScreen); extern _X_EXPORT RESTYPE ShmSegType; extern _X_EXPORT int ShmCompletionCode; extern _X_EXPORT int BadShmSegCode; #endif /* _SHMINT_H_ */ xorg-server-21.1.16/Xext/syncsdk.h0000644000175000017500000000353714757411105012422 /* * Copyright © 2010 NVIDIA Corporation * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef _SYNCSDK_H_ #define _SYNCSDK_H_ #include "misync.h" extern _X_EXPORT int SyncVerifyFence(SyncFence ** ppFence, XID fid, ClientPtr client, Mask mode); extern _X_EXPORT SyncObject* SyncCreate(ClientPtr client, XID id, unsigned char type); #define VERIFY_SYNC_FENCE(pFence, fid, client, mode) \ do { \ int rc; \ rc = SyncVerifyFence(&(pFence), (fid), (client), (mode)); \ if (Success != rc) return rc; \ } while (0) #define VERIFY_SYNC_FENCE_OR_NONE(pFence, fid, client, mode) \ do { \ pFence = 0; \ if (None != fid) \ VERIFY_SYNC_FENCE((pFence), (fid), (client), (mode)); \ } while (0) #endif /* _SYNCSDK_H_ */ xorg-server-21.1.16/Xext/panoramiXsrv.h0000644000175000017500000000434114757411105013427 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _PANORAMIXSRV_H_ #define _PANORAMIXSRV_H_ #include "panoramiX.h" extern _X_EXPORT int PanoramiXNumScreens; extern _X_EXPORT int PanoramiXPixWidth; extern _X_EXPORT int PanoramiXPixHeight; extern _X_EXPORT RegionRec PanoramiXScreenRegion; extern _X_EXPORT VisualID PanoramiXTranslateVisualID(int screen, VisualID orig); extern _X_EXPORT void PanoramiXConsolidate(void); extern _X_EXPORT Bool PanoramiXCreateConnectionBlock(void); extern _X_EXPORT PanoramiXRes *PanoramiXFindIDByScrnum(RESTYPE, XID, int); extern _X_EXPORT Bool XineramaRegisterConnectionBlockCallback(void (*func) (void)); extern _X_EXPORT int XineramaDeleteResource(void *, XID); extern _X_EXPORT void XineramaReinitData(void); extern _X_EXPORT RESTYPE XRC_DRAWABLE; extern _X_EXPORT RESTYPE XRT_WINDOW; extern _X_EXPORT RESTYPE XRT_PIXMAP; extern _X_EXPORT RESTYPE XRT_GC; extern _X_EXPORT RESTYPE XRT_COLORMAP; extern _X_EXPORT RESTYPE XRT_PICTURE; /* * Drivers are allowed to wrap this function. Each wrapper can decide that the * two visuals are unequal, but if they are deemed equal, the wrapper must call * down and return FALSE if the wrapped function does. This ensures that all * layers agree that the visuals are equal. The first visual is always from * screen 0. */ typedef Bool (*XineramaVisualsEqualProcPtr) (VisualPtr, ScreenPtr, VisualPtr); extern _X_EXPORT XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr; extern _X_EXPORT void XineramaGetImageData(DrawablePtr *pDrawables, int left, int top, int width, int height, unsigned int format, unsigned long planemask, char *data, int pitch, Bool isRoot); static inline void panoramix_setup_ids(PanoramiXRes * resource, ClientPtr client, XID base_id) { int j; resource->info[0].id = base_id; FOR_NSCREENS_FORWARD_SKIP(j) { resource->info[j].id = FakeClientID(client->index); } } #endif /* _PANORAMIXSRV_H_ */ xorg-server-21.1.16/Xext/panoramiX.h0000644000175000017500000000520214757411105012671 /***************************************************************** 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. ******************************************************************/ /* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */ /* * PanoramiX definitions */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _PANORAMIX_H_ #define _PANORAMIX_H_ #define _PANORAMIX_SERVER #include #undef _PANORAMIX_SERVER #include "gcstruct.h" #include "dixstruct.h" typedef struct _PanoramiXInfo { XID id; } PanoramiXInfo; typedef struct { PanoramiXInfo info[MAXSCREENS]; RESTYPE type; union { struct { char visibility; char class; char root; } win; struct { Bool shared; } pix; struct { Bool root; } pict; char raw_data[4]; } u; } PanoramiXRes; #define FOR_NSCREENS_FORWARD(j) for(j = 0; j < PanoramiXNumScreens; j++) #define FOR_NSCREENS_FORWARD_SKIP(j) for(j = 1; j < PanoramiXNumScreens; j++) #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--) #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j) #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) #define IS_ROOT_DRAWABLE(d) (((d)->type == XRT_WINDOW) && (d)->u.win.root) #endif /* _PANORAMIX_H_ */ xorg-server-21.1.16/Xext/xace.h0000644000175000017500000001054314757411105011657 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifndef _XACE_H #define _XACE_H #ifdef XACE #define XACE_MAJOR_VERSION 2 #define XACE_MINOR_VERSION 0 #include "pixmap.h" #include "region.h" #include "window.h" #include "property.h" #include "selection.h" /* Default window background */ #define XaceBackgroundNoneState(w) ((w)->forcedBG ? BackgroundPixel : None) /* security hooks */ /* Constants used to identify the available security hooks */ #define XACE_CORE_DISPATCH 0 #define XACE_EXT_DISPATCH 1 #define XACE_RESOURCE_ACCESS 2 #define XACE_DEVICE_ACCESS 3 #define XACE_PROPERTY_ACCESS 4 #define XACE_SEND_ACCESS 5 #define XACE_RECEIVE_ACCESS 6 #define XACE_CLIENT_ACCESS 7 #define XACE_EXT_ACCESS 8 #define XACE_SERVER_ACCESS 9 #define XACE_SELECTION_ACCESS 10 #define XACE_SCREEN_ACCESS 11 #define XACE_SCREENSAVER_ACCESS 12 #define XACE_AUTH_AVAIL 13 #define XACE_KEY_AVAIL 14 #define XACE_NUM_HOOKS 15 extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; /* Entry point for hook functions. Called by Xserver. * Required by libdbe and libextmod */ extern _X_EXPORT int XaceHook(int /*hook */ , ... /*appropriate args for hook */ ); /* determine whether any callbacks are present for the XACE hook */ extern _X_EXPORT int XaceHookIsSet(int hook); /* Special-cased hook functions */ extern _X_EXPORT int XaceHookDispatch(ClientPtr ptr, int major); #define XaceHookDispatch(c, m) \ ((XaceHooks[XACE_EXT_DISPATCH] && (m) >= EXTENSION_BASE) ? \ XaceHookDispatch((c), (m)) : \ Success) extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, PropertyPtr *ppProp, Mask access_mode); extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, Mask access_mode); /* Register a callback for a given hook. */ #define XaceRegisterCallback(hook,callback,data) \ AddCallback(XaceHooks+(hook), callback, data) /* Unregister an existing callback for a given hook. */ #define XaceDeleteCallback(hook,callback,data) \ DeleteCallback(XaceHooks+(hook), callback, data) /* XTrans wrappers for use by security modules */ extern _X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr); extern _X_EXPORT int XaceIsLocal(ClientPtr ptr); /* From the original Security extension... */ extern _X_EXPORT void XaceCensorImage(ClientPtr client, RegionPtr pVisibleRegion, long widthBytesLine, DrawablePtr pDraw, int x, int y, int w, int h, unsigned int format, char *pBuf); #else /* XACE */ /* Default window background */ #define XaceBackgroundNoneState(w) None /* Define calls away when XACE is not being built. */ #ifdef __GNUC__ #define XaceHook(args...) Success #define XaceHookIsSet(args...) 0 #define XaceHookDispatch(args...) Success #define XaceHookPropertyAccess(args...) Success #define XaceHookSelectionAccess(args...) Success #define XaceCensorImage(args...) { ; } #else #define XaceHook(...) Success #define XaceHookIsSet(...) 0 #define XaceHookDispatch(...) Success #define XaceHookPropertyAccess(...) Success #define XaceHookSelectionAccess(...) Success #define XaceCensorImage(...) { ; } #endif #endif /* XACE */ #endif /* _XACE_H */ xorg-server-21.1.16/Xext/xacestr.h0000644000175000017500000000630214757411105012406 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifndef _XACESTR_H #define _XACESTR_H #include "dix.h" #include "resource.h" #include "extnsionst.h" #include "window.h" #include "input.h" #include "property.h" #include "selection.h" #include "xace.h" /* XACE_CORE_DISPATCH */ typedef struct { ClientPtr client; int status; } XaceCoreDispatchRec; /* XACE_RESOURCE_ACCESS */ typedef struct { ClientPtr client; XID id; RESTYPE rtype; void *res; RESTYPE ptype; void *parent; Mask access_mode; int status; } XaceResourceAccessRec; /* XACE_DEVICE_ACCESS */ typedef struct { ClientPtr client; DeviceIntPtr dev; Mask access_mode; int status; } XaceDeviceAccessRec; /* XACE_PROPERTY_ACCESS */ typedef struct { ClientPtr client; WindowPtr pWin; PropertyPtr *ppProp; Mask access_mode; int status; } XacePropertyAccessRec; /* XACE_SEND_ACCESS */ typedef struct { ClientPtr client; DeviceIntPtr dev; WindowPtr pWin; xEventPtr events; int count; int status; } XaceSendAccessRec; /* XACE_RECEIVE_ACCESS */ typedef struct { ClientPtr client; WindowPtr pWin; xEventPtr events; int count; int status; } XaceReceiveAccessRec; /* XACE_CLIENT_ACCESS */ typedef struct { ClientPtr client; ClientPtr target; Mask access_mode; int status; } XaceClientAccessRec; /* XACE_EXT_DISPATCH */ /* XACE_EXT_ACCESS */ typedef struct { ClientPtr client; ExtensionEntry *ext; Mask access_mode; int status; } XaceExtAccessRec; /* XACE_SERVER_ACCESS */ typedef struct { ClientPtr client; Mask access_mode; int status; } XaceServerAccessRec; /* XACE_SELECTION_ACCESS */ typedef struct { ClientPtr client; Selection **ppSel; Mask access_mode; int status; } XaceSelectionAccessRec; /* XACE_SCREEN_ACCESS */ /* XACE_SCREENSAVER_ACCESS */ typedef struct { ClientPtr client; ScreenPtr screen; Mask access_mode; int status; } XaceScreenAccessRec; /* XACE_AUTH_AVAIL */ typedef struct { ClientPtr client; XID authId; } XaceAuthAvailRec; /* XACE_KEY_AVAIL */ typedef struct { xEventPtr event; DeviceIntPtr keybd; int count; } XaceKeyAvailRec; /* XACE_AUDIT_BEGIN */ /* XACE_AUDIT_END */ typedef struct { ClientPtr client; int requestResult; } XaceAuditRec; #endif /* _XACESTR_H */ xorg-server-21.1.16/Xext/Makefile.in0000644000175000017500000011023314757411114012630 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @MITSHM_TRUE@am__append_1 = $(MITSHM_SRCS) @XV_TRUE@am__append_2 = $(XV_SRCS) @RES_TRUE@am__append_3 = $(RES_SRCS) @SCREENSAVER_TRUE@am__append_4 = $(SCREENSAVER_SRCS) @XINERAMA_TRUE@am__append_5 = $(XINERAMA_SRCS) @XINERAMA_TRUE@@XORG_TRUE@am__append_6 = panoramiXsrv.h panoramiX.h @XACE_TRUE@am__append_7 = $(XACE_SRCS) @XACE_TRUE@@XORG_TRUE@am__append_8 = xace.h xacestr.h @XSELINUX_TRUE@am__append_9 = $(XSELINUX_SRCS) @XSELINUX_TRUE@am__append_10 = $(SELINUX_LIBS) @XCSECURITY_TRUE@am__append_11 = $(XCSECURITY_SRCS) @XF86BIGFONT_TRUE@am__append_12 = $(BIGFONT_SRCS) @DPMSExtension_TRUE@am__append_13 = $(DPMS_SRCS) @RES_TRUE@am__append_14 = libhashtable.la subdir = Xext ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__sdk_HEADERS_DIST) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @XSELINUX_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) libXext_la_DEPENDENCIES = $(am__DEPENDENCIES_3) $(am__append_14) am__libXext_la_SOURCES_DIST = bigreq.c geext.c shape.c sleepuntil.c \ sleepuntil.h sync.c syncsdk.h syncsrv.h xcmisc.c xtest.c shm.c \ shmint.h xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h \ xres.c saver.c panoramiX.c panoramiX.h panoramiXh.h \ panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c xace.c xace.h \ xacestr.h xselinux_ext.c xselinux_hooks.c xselinux_label.c \ xselinux.h xselinuxint.h security.c securitysrv.h \ xf86bigfont.c xf86bigfontsrv.h dpms.c dpmsproc.h am__objects_1 = shm.lo @MITSHM_TRUE@am__objects_2 = $(am__objects_1) am__objects_3 = xvmain.lo xvdisp.lo xvmc.lo @XV_TRUE@am__objects_4 = $(am__objects_3) am__objects_5 = xres.lo @RES_TRUE@am__objects_6 = $(am__objects_5) am__objects_7 = saver.lo @SCREENSAVER_TRUE@am__objects_8 = $(am__objects_7) am__objects_9 = panoramiX.lo panoramiXprocs.lo panoramiXSwap.lo @XINERAMA_TRUE@am__objects_10 = $(am__objects_9) am__objects_11 = xace.lo @XACE_TRUE@am__objects_12 = $(am__objects_11) am__objects_13 = xselinux_ext.lo xselinux_hooks.lo xselinux_label.lo @XSELINUX_TRUE@am__objects_14 = $(am__objects_13) am__objects_15 = security.lo @XCSECURITY_TRUE@am__objects_16 = $(am__objects_15) am__objects_17 = xf86bigfont.lo @XF86BIGFONT_TRUE@am__objects_18 = $(am__objects_17) am__objects_19 = dpms.lo @DPMSExtension_TRUE@am__objects_20 = $(am__objects_19) am__objects_21 = bigreq.lo geext.lo shape.lo sleepuntil.lo sync.lo \ xcmisc.lo xtest.lo $(am__objects_2) $(am__objects_4) \ $(am__objects_6) $(am__objects_8) $(am__objects_10) \ $(am__objects_12) $(am__objects_14) $(am__objects_16) \ $(am__objects_18) $(am__objects_20) am_libXext_la_OBJECTS = $(am__objects_21) libXext_la_OBJECTS = $(am_libXext_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libXvidmode_la_LIBADD = am_libXvidmode_la_OBJECTS = vidmode.lo libXvidmode_la_OBJECTS = $(am_libXvidmode_la_OBJECTS) libhashtable_la_LIBADD = am_libhashtable_la_OBJECTS = hashtable.lo libhashtable_la_OBJECTS = $(am_libhashtable_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/bigreq.Plo ./$(DEPDIR)/dpms.Plo \ ./$(DEPDIR)/geext.Plo ./$(DEPDIR)/hashtable.Plo \ ./$(DEPDIR)/panoramiX.Plo ./$(DEPDIR)/panoramiXSwap.Plo \ ./$(DEPDIR)/panoramiXprocs.Plo ./$(DEPDIR)/saver.Plo \ ./$(DEPDIR)/security.Plo ./$(DEPDIR)/shape.Plo \ ./$(DEPDIR)/shm.Plo ./$(DEPDIR)/sleepuntil.Plo \ ./$(DEPDIR)/sync.Plo ./$(DEPDIR)/vidmode.Plo \ ./$(DEPDIR)/xace.Plo ./$(DEPDIR)/xcmisc.Plo \ ./$(DEPDIR)/xf86bigfont.Plo ./$(DEPDIR)/xres.Plo \ ./$(DEPDIR)/xselinux_ext.Plo ./$(DEPDIR)/xselinux_hooks.Plo \ ./$(DEPDIR)/xselinux_label.Plo ./$(DEPDIR)/xtest.Plo \ ./$(DEPDIR)/xvdisp.Plo ./$(DEPDIR)/xvmain.Plo \ ./$(DEPDIR)/xvmc.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libXext_la_SOURCES) $(libXvidmode_la_SOURCES) \ $(libhashtable_la_SOURCES) DIST_SOURCES = $(am__libXext_la_SOURCES_DIST) \ $(libXvidmode_la_SOURCES) $(libhashtable_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__sdk_HEADERS_DIST = xvdix.h xvmcext.h geext.h geint.h shmint.h \ syncsdk.h panoramiXsrv.h panoramiX.h xace.h xacestr.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(sdkdir)" HEADERS = $(sdk_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXext.la libXvidmode.la libhashtable.la AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = xvdix.h xvmcext.h geext.h geint.h shmint.h \ @XORG_TRUE@ syncsdk.h $(am__append_6) $(am__append_8) # Sources always included in libXextbuiltin.la, libXext.la BUILTIN_SRCS = bigreq.c geext.c shape.c sleepuntil.c sleepuntil.h \ sync.c syncsdk.h syncsrv.h xcmisc.c xtest.c $(am__append_1) \ $(am__append_2) $(am__append_3) $(am__append_4) \ $(am__append_5) $(am__append_7) $(am__append_9) \ $(am__append_11) $(am__append_12) $(am__append_13) BUILTIN_LIBS = $(am__append_10) # Optional sources included if extension enabled by configure.ac rules # MIT Shared Memory extension MITSHM_SRCS = shm.c shmint.h # XVideo extension XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h xvdisp.h # XResource extension: lets clients get data about per-client resource usage RES_SRCS = xres.c # MIT ScreenSaver extension SCREENSAVER_SRCS = saver.c # Xinerama extension: making multiple video devices act as one virtual screen XINERAMA_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c # X-ACE extension: provides hooks for building security policy extensions # like XC-Security, X-SELinux & XTSol XACE_SRCS = xace.c xace.h xacestr.h # SELinux extension: provides SELinux policy support for X objects # requires X-ACE extension XSELINUX_SRCS = xselinux_ext.c xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h # Security extension: multi-level security to protect clients from each other XCSECURITY_SRCS = security.c securitysrv.h # XF86 Big Font extension BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h # DPMS extension DPMS_SRCS = dpms.c dpmsproc.h # Now take all of the above, mix well, bake for 10 minutes and get libXext*.la libXext_la_SOURCES = $(BUILTIN_SRCS) libXext_la_LIBADD = $(BUILTIN_LIBS) $(am__append_14) # XVidMode extension libXvidmode_la_SOURCES = vidmode.c #Hashtable libhashtable_la_SOURCES = hashtable.c hashtable.h EXTRA_DIST = \ $(MITSHM_SRCS) \ $(XV_SRCS) \ $(RES_SRCS) \ $(SCREENSAVER_SRCS) \ $(XACE_SRCS) \ $(XCSECURITY_SRCS) \ $(XSELINUX_SRCS) \ $(XINERAMA_SRCS) \ $(BIGFONT_SRCS) \ $(DPMS_SRCS) \ $(GE_SRCS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xext/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Xext/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXext.la: $(libXext_la_OBJECTS) $(libXext_la_DEPENDENCIES) $(EXTRA_libXext_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXext_la_OBJECTS) $(libXext_la_LIBADD) $(LIBS) libXvidmode.la: $(libXvidmode_la_OBJECTS) $(libXvidmode_la_DEPENDENCIES) $(EXTRA_libXvidmode_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXvidmode_la_OBJECTS) $(libXvidmode_la_LIBADD) $(LIBS) libhashtable.la: $(libhashtable_la_OBJECTS) $(libhashtable_la_DEPENDENCIES) $(EXTRA_libhashtable_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhashtable_la_OBJECTS) $(libhashtable_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigreq.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpms.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashtable.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXSwap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXprocs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saver.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/security.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shape.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shm.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sleepuntil.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sync.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xace.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xcmisc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86bigfont.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xres.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_ext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_hooks.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xselinux_label.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xtest.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvdisp.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmain.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvmc.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-sdkHEADERS: $(sdk_HEADERS) @$(NORMAL_INSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sdkdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sdkdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(sdkdir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(sdkdir)" || exit $$?; \ done uninstall-sdkHEADERS: @$(NORMAL_UNINSTALL) @list='$(sdk_HEADERS)'; test -n "$(sdkdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(sdkdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/bigreq.Plo -rm -f ./$(DEPDIR)/dpms.Plo -rm -f ./$(DEPDIR)/geext.Plo -rm -f ./$(DEPDIR)/hashtable.Plo -rm -f ./$(DEPDIR)/panoramiX.Plo -rm -f ./$(DEPDIR)/panoramiXSwap.Plo -rm -f ./$(DEPDIR)/panoramiXprocs.Plo -rm -f ./$(DEPDIR)/saver.Plo -rm -f ./$(DEPDIR)/security.Plo -rm -f ./$(DEPDIR)/shape.Plo -rm -f ./$(DEPDIR)/shm.Plo -rm -f ./$(DEPDIR)/sleepuntil.Plo -rm -f ./$(DEPDIR)/sync.Plo -rm -f ./$(DEPDIR)/vidmode.Plo -rm -f ./$(DEPDIR)/xace.Plo -rm -f ./$(DEPDIR)/xcmisc.Plo -rm -f ./$(DEPDIR)/xf86bigfont.Plo -rm -f ./$(DEPDIR)/xres.Plo -rm -f ./$(DEPDIR)/xselinux_ext.Plo -rm -f ./$(DEPDIR)/xselinux_hooks.Plo -rm -f ./$(DEPDIR)/xselinux_label.Plo -rm -f ./$(DEPDIR)/xtest.Plo -rm -f ./$(DEPDIR)/xvdisp.Plo -rm -f ./$(DEPDIR)/xvmain.Plo -rm -f ./$(DEPDIR)/xvmc.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-sdkHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/bigreq.Plo -rm -f ./$(DEPDIR)/dpms.Plo -rm -f ./$(DEPDIR)/geext.Plo -rm -f ./$(DEPDIR)/hashtable.Plo -rm -f ./$(DEPDIR)/panoramiX.Plo -rm -f ./$(DEPDIR)/panoramiXSwap.Plo -rm -f ./$(DEPDIR)/panoramiXprocs.Plo -rm -f ./$(DEPDIR)/saver.Plo -rm -f ./$(DEPDIR)/security.Plo -rm -f ./$(DEPDIR)/shape.Plo -rm -f ./$(DEPDIR)/shm.Plo -rm -f ./$(DEPDIR)/sleepuntil.Plo -rm -f ./$(DEPDIR)/sync.Plo -rm -f ./$(DEPDIR)/vidmode.Plo -rm -f ./$(DEPDIR)/xace.Plo -rm -f ./$(DEPDIR)/xcmisc.Plo -rm -f ./$(DEPDIR)/xf86bigfont.Plo -rm -f ./$(DEPDIR)/xres.Plo -rm -f ./$(DEPDIR)/xselinux_ext.Plo -rm -f ./$(DEPDIR)/xselinux_hooks.Plo -rm -f ./$(DEPDIR)/xselinux_label.Plo -rm -f ./$(DEPDIR)/xtest.Plo -rm -f ./$(DEPDIR)/xvdisp.Plo -rm -f ./$(DEPDIR)/xvmain.Plo -rm -f ./$(DEPDIR)/xvmc.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sdkHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sdkHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sdkHEADERS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/Xext/bigreq.c0000644000175000017500000000434514757411105012206 /* Copyright 1992, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include #include "opaque.h" #include "extinit.h" static int ProcBigReqDispatch(ClientPtr client) { REQUEST(xBigReqEnableReq); xBigReqEnableReply rep; if (client->swapped) { swaps(&stuff->length); } if (stuff->brReqType != X_BigReqEnable) return BadRequest; REQUEST_SIZE_MATCH(xBigReqEnableReq); client->big_requests = TRUE; rep = (xBigReqEnableReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .max_request_size = maxBigRequestSize }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.max_request_size); } WriteToClient(client, sizeof(xBigReqEnableReply), &rep); return Success; } void BigReqExtensionInit(void) { AddExtension(XBigReqExtensionName, 0, 0, ProcBigReqDispatch, ProcBigReqDispatch, NULL, StandardMinorOpcode); } xorg-server-21.1.16/Xext/geext.c0000644000175000017500000001675014757411105012054 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "windowstr.h" #include #include "geint.h" #include "geext.h" #include "protocol-versions.h" #include "extinit.h" DevPrivateKeyRec GEClientPrivateKeyRec; GEExtension GEExtensions[MAXEXTENSIONS]; /* Major available requests */ static const int version_requests[] = { X_GEQueryVersion, /* before client sends QueryVersion */ X_GEQueryVersion, /* must be set to last request in version 1 */ }; /* Forward declarations */ static void SGEGenericEvent(xEvent *from, xEvent *to); #define EXT_MASK(ext) ((ext) & 0x7F) /************************************************************/ /* request handlers */ /************************************************************/ static int ProcGEQueryVersion(ClientPtr client) { GEClientInfoPtr pGEClient = GEGetClient(client); xGEQueryVersionReply rep; REQUEST(xGEQueryVersionReq); REQUEST_SIZE_MATCH(xGEQueryVersionReq); rep = (xGEQueryVersionReply) { .repType = X_Reply, .RepType = X_GEQueryVersion, .sequenceNumber = client->sequence, .length = 0, /* return the supported version by the server */ .majorVersion = SERVER_GE_MAJOR_VERSION, .minorVersion = SERVER_GE_MINOR_VERSION }; /* Remember version the client requested */ pGEClient->major_version = stuff->majorVersion; pGEClient->minor_version = stuff->minorVersion; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xGEQueryVersionReply), &rep); return Success; } static int (*ProcGEVector[GENumberRequests]) (ClientPtr) = { /* Version 1.0 */ ProcGEQueryVersion, }; /************************************************************/ /* swapped request handlers */ /************************************************************/ static int _X_COLD SProcGEQueryVersion(ClientPtr client) { REQUEST(xGEQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGEQueryVersionReq); swaps(&stuff->majorVersion); swaps(&stuff->minorVersion); return (*ProcGEVector[stuff->ReqType]) (client); } static int (*SProcGEVector[GENumberRequests]) (ClientPtr) = { /* Version 1.0 */ SProcGEQueryVersion }; /************************************************************/ /* callbacks */ /************************************************************/ /* dispatch requests */ static int ProcGEDispatch(ClientPtr client) { GEClientInfoPtr pGEClient = GEGetClient(client); REQUEST(xGEReq); if (pGEClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->ReqType > version_requests[pGEClient->major_version]) return BadRequest; return (ProcGEVector[stuff->ReqType]) (client); } /* dispatch swapped requests */ static int _X_COLD SProcGEDispatch(ClientPtr client) { GEClientInfoPtr pGEClient = GEGetClient(client); REQUEST(xGEReq); if (pGEClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->ReqType > version_requests[pGEClient->major_version]) return BadRequest; return (*SProcGEVector[stuff->ReqType]) (client); } /* Reset extension. Called on server shutdown. */ static void GEResetProc(ExtensionEntry * extEntry) { EventSwapVector[GenericEvent] = NotImplemented; } /* Calls the registered event swap function for the extension. * * Each extension can register a swap function to handle GenericEvents being * swapped properly. The server calls SGEGenericEvent() before the event is * written on the wire, this one calls the registered swap function to do the * work. */ static void _X_COLD SGEGenericEvent(xEvent *from, xEvent *to) { xGenericEvent *gefrom = (xGenericEvent *) from; xGenericEvent *geto = (xGenericEvent *) to; if ((gefrom->extension & 0x7f) > MAXEXTENSIONS) { ErrorF("GE: Invalid extension offset for event.\n"); return; } if (GEExtensions[EXT_MASK(gefrom->extension)].evswap) GEExtensions[EXT_MASK(gefrom->extension)].evswap(gefrom, geto); } /* Init extension, register at server. * Since other extensions may rely on XGE (XInput does already), it is a good * idea to init XGE first, before any other extension. */ void GEExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey (&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec))) FatalError("GEExtensionInit: GE private request failed.\n"); if ((extEntry = AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, SProcGEDispatch, GEResetProc, StandardMinorOpcode)) != 0) { memset(GEExtensions, 0, sizeof(GEExtensions)); EventSwapVector[GenericEvent] = (EventSwapPtr) SGEGenericEvent; } else { FatalError("GEInit: AddExtensions failed.\n"); } } /************************************************************/ /* interface for extensions */ /************************************************************/ /* Register an extension with GE. The given swap function will be called each * time an event is sent to a client with different byte order. * @param extension The extensions major opcode * @param ev_swap The event swap function. * @param ev_fill Called for an event before delivery. The extension now has * the chance to fill in necessary fields for the event. */ void GERegisterExtension(int extension, void (*ev_swap) (xGenericEvent *from, xGenericEvent *to)) { if (EXT_MASK(extension) >= MAXEXTENSIONS) FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n"); /* extension opcodes are > 128, might as well save some space here */ GEExtensions[EXT_MASK(extension)].evswap = ev_swap; } /* Sets type and extension field for a generic event. This is just an * auxiliary function, extensions could do it manually too. */ void GEInitEvent(xGenericEvent *ev, int extension) { ev->type = GenericEvent; ev->extension = extension; ev->length = 0; } xorg-server-21.1.16/Xext/shape.c0000644000175000017500000010362614757411105012037 /************************************************************ Copyright 1989, 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "os.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" #include #include "regionstr.h" #include "gcstruct.h" #include "extinit.h" #include "protocol-versions.h" typedef RegionPtr (*CreateDftPtr) (WindowPtr /* pWin */ ); static int ShapeFreeClient(void * /* data */ , XID /* id */ ); static int ShapeFreeEvents(void * /* data */ , XID /* id */ ); static void SShapeNotifyEvent(xShapeNotifyEvent * /* from */ , xShapeNotifyEvent * /* to */ ); /* SendShapeNotify, CreateBoundingShape and CreateClipShape are used * externally by the Xfixes extension and are now defined in window.h */ #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif static int ShapeEventBase = 0; static RESTYPE ClientType, ShapeEventType; /* resource types for event masks */ /* * each window has a list of clients requesting * ShapeNotify events. Each client has a resource * for each window it selects ShapeNotify input for, * this resource is used to delete the ShapeNotifyRec * entry from the per-window queue. */ typedef struct _ShapeEvent *ShapeEventPtr; typedef struct _ShapeEvent { ShapeEventPtr next; ClientPtr client; WindowPtr window; XID clientResource; } ShapeEventRec; /**************** * ShapeExtensionInit * * Called from InitExtensions in main() or from QueryExtension() if the * extension is dynamically loaded. * ****************/ static int RegionOperate(ClientPtr client, WindowPtr pWin, int kind, RegionPtr *destRgnp, RegionPtr srcRgn, int op, int xoff, int yoff, CreateDftPtr create) { if (srcRgn && (xoff || yoff)) RegionTranslate(srcRgn, xoff, yoff); if (!pWin->parent) { if (srcRgn) RegionDestroy(srcRgn); return Success; } /* May/30/2001: * The shape.PS specs say if src is None, existing shape is to be * removed (and so the op-code has no meaning in such removal); * see shape.PS, page 3, ShapeMask. */ if (srcRgn == NULL) { if (*destRgnp != NULL) { RegionDestroy(*destRgnp); *destRgnp = 0; /* go on to remove shape and generate ShapeNotify */ } else { /* May/30/2001: * The target currently has no shape in effect, so nothing to * do here. The specs say that ShapeNotify is generated whenever * the client region is "modified"; since no modification is done * here, we do not generate that event. The specs does not say * "it is an error to request removal when there is no shape in * effect", so we return good status. */ return Success; } } else switch (op) { case ShapeSet: if (*destRgnp) RegionDestroy(*destRgnp); *destRgnp = srcRgn; srcRgn = 0; break; case ShapeUnion: if (*destRgnp) RegionUnion(*destRgnp, *destRgnp, srcRgn); break; case ShapeIntersect: if (*destRgnp) RegionIntersect(*destRgnp, *destRgnp, srcRgn); else { *destRgnp = srcRgn; srcRgn = 0; } break; case ShapeSubtract: if (!*destRgnp) *destRgnp = (*create) (pWin); RegionSubtract(*destRgnp, *destRgnp, srcRgn); break; case ShapeInvert: if (!*destRgnp) *destRgnp = RegionCreate((BoxPtr) 0, 0); else RegionSubtract(*destRgnp, srcRgn, *destRgnp); break; default: client->errorValue = op; return BadValue; } if (srcRgn) RegionDestroy(srcRgn); (*pWin->drawable.pScreen->SetShape) (pWin, kind); SendShapeNotify(pWin, kind); return Success; } RegionPtr CreateBoundingShape(WindowPtr pWin) { BoxRec extents; extents.x1 = -wBorderWidth(pWin); extents.y1 = -wBorderWidth(pWin); extents.x2 = pWin->drawable.width + wBorderWidth(pWin); extents.y2 = pWin->drawable.height + wBorderWidth(pWin); return RegionCreate(&extents, 1); } RegionPtr CreateClipShape(WindowPtr pWin) { BoxRec extents; extents.x1 = 0; extents.y1 = 0; extents.x2 = pWin->drawable.width; extents.y2 = pWin->drawable.height; return RegionCreate(&extents, 1); } static int ProcShapeQueryVersion(ClientPtr client) { xShapeQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_SHAPE_MAJOR_VERSION, .minorVersion = SERVER_SHAPE_MINOR_VERSION }; REQUEST_SIZE_MATCH(xShapeQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xShapeQueryVersionReply), &rep); return Success; } /***************** * ProcShapeRectangles * *****************/ static int ProcShapeRectangles(ClientPtr client) { WindowPtr pWin; REQUEST(xShapeRectanglesReq); xRectangle *prects; int nrects, ctype, rc; RegionPtr srcRgn; RegionPtr *destRgn; CreateDftPtr createDefault; REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); UpdateCurrentTime(); rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; break; case ShapeClip: createDefault = CreateClipShape; break; case ShapeInput: createDefault = CreateBoundingShape; break; default: client->errorValue = stuff->destKind; return BadValue; } if ((stuff->ordering != Unsorted) && (stuff->ordering != YSorted) && (stuff->ordering != YXSorted) && (stuff->ordering != YXBanded)) { client->errorValue = stuff->ordering; return BadValue; } nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq)); if (nrects & 4) return BadLength; nrects >>= 3; prects = (xRectangle *) &stuff[1]; ctype = VerifyRectOrder(nrects, prects, (int) stuff->ordering); if (ctype < 0) return BadMatch; srcRgn = RegionFromRects(nrects, prects, ctype); if (!pWin->optional) MakeWindowOptional(pWin); switch (stuff->destKind) { case ShapeBounding: destRgn = &pWin->optional->boundingShape; break; case ShapeClip: destRgn = &pWin->optional->clipShape; break; case ShapeInput: destRgn = &pWin->optional->inputShape; break; default: return BadValue; } return RegionOperate(client, pWin, (int) stuff->destKind, destRgn, srcRgn, (int) stuff->op, stuff->xOff, stuff->yOff, createDefault); } #ifdef PANORAMIX static int ProcPanoramiXShapeRectangles(ClientPtr client) { REQUEST(xShapeRectanglesReq); PanoramiXRes *win; int j, result; REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; result = ProcShapeRectangles(client); if (result != Success) break; } return result; } #endif /************** * ProcShapeMask **************/ static int ProcShapeMask(ClientPtr client) { WindowPtr pWin; ScreenPtr pScreen; REQUEST(xShapeMaskReq); RegionPtr srcRgn; RegionPtr *destRgn; PixmapPtr pPixmap; CreateDftPtr createDefault; int rc; REQUEST_SIZE_MATCH(xShapeMaskReq); UpdateCurrentTime(); rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; break; case ShapeClip: createDefault = CreateClipShape; break; case ShapeInput: createDefault = CreateBoundingShape; break; default: client->errorValue = stuff->destKind; return BadValue; } pScreen = pWin->drawable.pScreen; if (stuff->src == None) srcRgn = 0; else { rc = dixLookupResourceByType((void **) &pPixmap, stuff->src, RT_PIXMAP, client, DixReadAccess); if (rc != Success) return rc; if (pPixmap->drawable.pScreen != pScreen || pPixmap->drawable.depth != 1) return BadMatch; srcRgn = BitmapToRegion(pScreen, pPixmap); if (!srcRgn) return BadAlloc; } if (!pWin->optional) MakeWindowOptional(pWin); switch (stuff->destKind) { case ShapeBounding: destRgn = &pWin->optional->boundingShape; break; case ShapeClip: destRgn = &pWin->optional->clipShape; break; case ShapeInput: destRgn = &pWin->optional->inputShape; break; default: return BadValue; } return RegionOperate(client, pWin, (int) stuff->destKind, destRgn, srcRgn, (int) stuff->op, stuff->xOff, stuff->yOff, createDefault); } #ifdef PANORAMIX static int ProcPanoramiXShapeMask(ClientPtr client) { REQUEST(xShapeMaskReq); PanoramiXRes *win, *pmap; int j, result; REQUEST_SIZE_MATCH(xShapeMaskReq); result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; if (stuff->src != None) { result = dixLookupResourceByType((void **) &pmap, stuff->src, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } else pmap = NULL; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; if (pmap) stuff->src = pmap->info[j].id; result = ProcShapeMask(client); if (result != Success) break; } return result; } #endif /************ * ProcShapeCombine ************/ static int ProcShapeCombine(ClientPtr client) { WindowPtr pSrcWin, pDestWin; REQUEST(xShapeCombineReq); RegionPtr srcRgn; RegionPtr *destRgn; CreateDftPtr createDefault; CreateDftPtr createSrc; RegionPtr tmp; int rc; REQUEST_SIZE_MATCH(xShapeCombineReq); UpdateCurrentTime(); rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; if (!pDestWin->optional) MakeWindowOptional(pDestWin); switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; break; case ShapeClip: createDefault = CreateClipShape; break; case ShapeInput: createDefault = CreateBoundingShape; break; default: client->errorValue = stuff->destKind; return BadValue; } rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess); if (rc != Success) return rc; switch (stuff->srcKind) { case ShapeBounding: srcRgn = wBoundingShape(pSrcWin); createSrc = CreateBoundingShape; break; case ShapeClip: srcRgn = wClipShape(pSrcWin); createSrc = CreateClipShape; break; case ShapeInput: srcRgn = wInputShape(pSrcWin); createSrc = CreateBoundingShape; break; default: client->errorValue = stuff->srcKind; return BadValue; } if (pSrcWin->drawable.pScreen != pDestWin->drawable.pScreen) { return BadMatch; } if (srcRgn) { tmp = RegionCreate((BoxPtr) 0, 0); RegionCopy(tmp, srcRgn); srcRgn = tmp; } else srcRgn = (*createSrc) (pSrcWin); if (!pDestWin->optional) MakeWindowOptional(pDestWin); switch (stuff->destKind) { case ShapeBounding: destRgn = &pDestWin->optional->boundingShape; break; case ShapeClip: destRgn = &pDestWin->optional->clipShape; break; case ShapeInput: destRgn = &pDestWin->optional->inputShape; break; default: return BadValue; } return RegionOperate(client, pDestWin, (int) stuff->destKind, destRgn, srcRgn, (int) stuff->op, stuff->xOff, stuff->yOff, createDefault); } #ifdef PANORAMIX static int ProcPanoramiXShapeCombine(ClientPtr client) { REQUEST(xShapeCombineReq); PanoramiXRes *win, *win2; int j, result; REQUEST_AT_LEAST_SIZE(xShapeCombineReq); result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &win2, stuff->src, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; stuff->src = win2->info[j].id; result = ProcShapeCombine(client); if (result != Success) break; } return result; } #endif /************* * ProcShapeOffset *************/ static int ProcShapeOffset(ClientPtr client) { WindowPtr pWin; REQUEST(xShapeOffsetReq); RegionPtr srcRgn; int rc; REQUEST_SIZE_MATCH(xShapeOffsetReq); UpdateCurrentTime(); rc = dixLookupWindow(&pWin, stuff->dest, client, DixSetAttrAccess); if (rc != Success) return rc; switch (stuff->destKind) { case ShapeBounding: srcRgn = wBoundingShape(pWin); break; case ShapeClip: srcRgn = wClipShape(pWin); break; case ShapeInput: srcRgn = wInputShape(pWin); break; default: client->errorValue = stuff->destKind; return BadValue; } if (srcRgn) { RegionTranslate(srcRgn, stuff->xOff, stuff->yOff); (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); } SendShapeNotify(pWin, (int) stuff->destKind); return Success; } #ifdef PANORAMIX static int ProcPanoramiXShapeOffset(ClientPtr client) { REQUEST(xShapeOffsetReq); PanoramiXRes *win; int j, result; REQUEST_AT_LEAST_SIZE(xShapeOffsetReq); result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; result = ProcShapeOffset(client); if (result != Success) break; } return result; } #endif static int ProcShapeQueryExtents(ClientPtr client) { REQUEST(xShapeQueryExtentsReq); WindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; int rc; RegionPtr region; REQUEST_SIZE_MATCH(xShapeQueryExtentsReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xShapeQueryExtentsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .boundingShaped = (wBoundingShape(pWin) != 0), .clipShaped = (wClipShape(pWin) != 0) }; if ((region = wBoundingShape(pWin))) { /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ pExtents = RegionExtents(region); extents = *pExtents; } else { extents.x1 = -wBorderWidth(pWin); extents.y1 = -wBorderWidth(pWin); extents.x2 = pWin->drawable.width + wBorderWidth(pWin); extents.y2 = pWin->drawable.height + wBorderWidth(pWin); } rep.xBoundingShape = extents.x1; rep.yBoundingShape = extents.y1; rep.widthBoundingShape = extents.x2 - extents.x1; rep.heightBoundingShape = extents.y2 - extents.y1; if ((region = wClipShape(pWin))) { /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ pExtents = RegionExtents(region); extents = *pExtents; } else { extents.x1 = 0; extents.y1 = 0; extents.x2 = pWin->drawable.width; extents.y2 = pWin->drawable.height; } rep.xClipShape = extents.x1; rep.yClipShape = extents.y1; rep.widthClipShape = extents.x2 - extents.x1; rep.heightClipShape = extents.y2 - extents.y1; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.xBoundingShape); swaps(&rep.yBoundingShape); swaps(&rep.widthBoundingShape); swaps(&rep.heightBoundingShape); swaps(&rep.xClipShape); swaps(&rep.yClipShape); swaps(&rep.widthClipShape); swaps(&rep.heightClipShape); } WriteToClient(client, sizeof(xShapeQueryExtentsReply), &rep); return Success; } /*ARGSUSED*/ static int ShapeFreeClient(void *data, XID id) { ShapeEventPtr pShapeEvent; WindowPtr pWin; ShapeEventPtr *pHead, pCur, pPrev; int rc; pShapeEvent = (ShapeEventPtr) data; pWin = pShapeEvent->window; rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id, ShapeEventType, serverClient, DixReadAccess); if (rc == Success) { pPrev = 0; for (pCur = *pHead; pCur && pCur != pShapeEvent; pCur = pCur->next) pPrev = pCur; if (pCur) { if (pPrev) pPrev->next = pShapeEvent->next; else *pHead = pShapeEvent->next; } } free((void *) pShapeEvent); return 1; } /*ARGSUSED*/ static int ShapeFreeEvents(void *data, XID id) { ShapeEventPtr *pHead, pCur, pNext; pHead = (ShapeEventPtr *) data; for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource(pCur->clientResource, ClientType); free((void *) pCur); } free((void *) pHead); return 1; } static int ProcShapeSelectInput(ClientPtr client) { REQUEST(xShapeSelectInputReq); WindowPtr pWin; ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; XID clientResource; int rc; REQUEST_SIZE_MATCH(xShapeSelectInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (rc != Success) return rc; rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id, ShapeEventType, client, DixWriteAccess); if (rc != Success && rc != BadValue) return rc; switch (stuff->enable) { case xTrue: if (pHead) { /* check for existing entry. */ for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { if (pShapeEvent->client == client) return Success; } } /* build the entry */ pNewShapeEvent = malloc(sizeof(ShapeEventRec)); if (!pNewShapeEvent) return BadAlloc; pNewShapeEvent->next = 0; pNewShapeEvent->client = client; pNewShapeEvent->window = pWin; /* * add a resource that will be deleted when * the client goes away */ clientResource = FakeClientID(client->index); pNewShapeEvent->clientResource = clientResource; if (!AddResource(clientResource, ClientType, (void *) pNewShapeEvent)) return BadAlloc; /* * create a resource to contain a void *to the list * of clients selecting input. This must be indirect as * the list may be arbitrarily rearranged which cannot be * done through the resource database. */ if (!pHead) { pHead = malloc(sizeof(ShapeEventPtr)); if (!pHead || !AddResource(pWin->drawable.id, ShapeEventType, (void *) pHead)) { FreeResource(clientResource, RT_NONE); return BadAlloc; } *pHead = 0; } pNewShapeEvent->next = *pHead; *pHead = pNewShapeEvent; break; case xFalse: /* delete the interest */ if (pHead) { pNewShapeEvent = 0; for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { if (pShapeEvent->client == client) break; pNewShapeEvent = pShapeEvent; } if (pShapeEvent) { FreeResource(pShapeEvent->clientResource, ClientType); if (pNewShapeEvent) pNewShapeEvent->next = pShapeEvent->next; else *pHead = pShapeEvent->next; free(pShapeEvent); } } break; default: client->errorValue = stuff->enable; return BadValue; } return Success; } /* * deliver the event */ void SendShapeNotify(WindowPtr pWin, int which) { ShapeEventPtr *pHead, pShapeEvent; BoxRec extents; RegionPtr region; BYTE shaped; int rc; rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id, ShapeEventType, serverClient, DixReadAccess); if (rc != Success) return; switch (which) { case ShapeBounding: region = wBoundingShape(pWin); if (region) { extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = -wBorderWidth(pWin); extents.y1 = -wBorderWidth(pWin); extents.x2 = pWin->drawable.width + wBorderWidth(pWin); extents.y2 = pWin->drawable.height + wBorderWidth(pWin); shaped = xFalse; } break; case ShapeClip: region = wClipShape(pWin); if (region) { extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = 0; extents.y1 = 0; extents.x2 = pWin->drawable.width; extents.y2 = pWin->drawable.height; shaped = xFalse; } break; case ShapeInput: region = wInputShape(pWin); if (region) { extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = -wBorderWidth(pWin); extents.y1 = -wBorderWidth(pWin); extents.x2 = pWin->drawable.width + wBorderWidth(pWin); extents.y2 = pWin->drawable.height + wBorderWidth(pWin); shaped = xFalse; } break; default: return; } UpdateCurrentTimeIf(); for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { xShapeNotifyEvent se = { .type = ShapeNotify + ShapeEventBase, .kind = which, .window = pWin->drawable.id, .x = extents.x1, .y = extents.y1, .width = extents.x2 - extents.x1, .height = extents.y2 - extents.y1, .time = currentTime.milliseconds, .shaped = shaped }; WriteEventsToClient(pShapeEvent->client, 1, (xEvent *) &se); } } static int ProcShapeInputSelected(ClientPtr client) { REQUEST(xShapeInputSelectedReq); WindowPtr pWin; ShapeEventPtr pShapeEvent, *pHead; int enabled, rc; xShapeInputSelectedReply rep; REQUEST_SIZE_MATCH(xShapeInputSelectedReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rc = dixLookupResourceByType((void **) &pHead, pWin->drawable.id, ShapeEventType, client, DixReadAccess); if (rc != Success && rc != BadValue) return rc; enabled = xFalse; if (pHead) { for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { if (pShapeEvent->client == client) { enabled = xTrue; break; } } } rep = (xShapeInputSelectedReply) { .type = X_Reply, .enabled = enabled, .sequenceNumber = client->sequence, .length = 0 }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xShapeInputSelectedReply), &rep); return Success; } static int ProcShapeGetRectangles(ClientPtr client) { REQUEST(xShapeGetRectanglesReq); WindowPtr pWin; xShapeGetRectanglesReply rep; xRectangle *rects; int nrects, i, rc; RegionPtr region; REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; switch (stuff->kind) { case ShapeBounding: region = wBoundingShape(pWin); break; case ShapeClip: region = wClipShape(pWin); break; case ShapeInput: region = wInputShape(pWin); break; default: client->errorValue = stuff->kind; return BadValue; } if (!region) { nrects = 1; rects = malloc(sizeof(xRectangle)); if (!rects) return BadAlloc; switch (stuff->kind) { case ShapeBounding: rects->x = -(int) wBorderWidth(pWin); rects->y = -(int) wBorderWidth(pWin); rects->width = pWin->drawable.width + wBorderWidth(pWin); rects->height = pWin->drawable.height + wBorderWidth(pWin); break; case ShapeClip: rects->x = 0; rects->y = 0; rects->width = pWin->drawable.width; rects->height = pWin->drawable.height; break; case ShapeInput: rects->x = -(int) wBorderWidth(pWin); rects->y = -(int) wBorderWidth(pWin); rects->width = pWin->drawable.width + wBorderWidth(pWin); rects->height = pWin->drawable.height + wBorderWidth(pWin); break; } } else { BoxPtr box; nrects = RegionNumRects(region); box = RegionRects(region); rects = xallocarray(nrects, sizeof(xRectangle)); if (!rects && nrects) return BadAlloc; for (i = 0; i < nrects; i++, box++) { rects[i].x = box->x1; rects[i].y = box->y1; rects[i].width = box->x2 - box->x1; rects[i].height = box->y2 - box->y1; } } rep = (xShapeGetRectanglesReply) { .type = X_Reply, .ordering = YXBanded, .sequenceNumber = client->sequence, .length = bytes_to_int32(nrects * sizeof(xRectangle)), .nrects = nrects }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.nrects); SwapShorts((short *) rects, (unsigned long) nrects * 4); } WriteToClient(client, sizeof(rep), &rep); WriteToClient(client, nrects * sizeof(xRectangle), rects); free(rects); return Success; } static int ProcShapeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_ShapeQueryVersion: return ProcShapeQueryVersion(client); case X_ShapeRectangles: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShapeRectangles(client); else #endif return ProcShapeRectangles(client); case X_ShapeMask: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShapeMask(client); else #endif return ProcShapeMask(client); case X_ShapeCombine: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShapeCombine(client); else #endif return ProcShapeCombine(client); case X_ShapeOffset: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShapeOffset(client); else #endif return ProcShapeOffset(client); case X_ShapeQueryExtents: return ProcShapeQueryExtents(client); case X_ShapeSelectInput: return ProcShapeSelectInput(client); case X_ShapeInputSelected: return ProcShapeInputSelected(client); case X_ShapeGetRectangles: return ProcShapeGetRectangles(client); default: return BadRequest; } } static void _X_COLD SShapeNotifyEvent(xShapeNotifyEvent * from, xShapeNotifyEvent * to) { to->type = from->type; to->kind = from->kind; cpswapl(from->window, to->window); cpswaps(from->sequenceNumber, to->sequenceNumber); cpswaps(from->x, to->x); cpswaps(from->y, to->y); cpswaps(from->width, to->width); cpswaps(from->height, to->height); cpswapl(from->time, to->time); to->shaped = from->shaped; } static int _X_COLD SProcShapeQueryVersion(ClientPtr client) { REQUEST(xShapeQueryVersionReq); swaps(&stuff->length); return ProcShapeQueryVersion(client); } static int _X_COLD SProcShapeRectangles(ClientPtr client) { REQUEST(xShapeRectanglesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xShapeRectanglesReq); swapl(&stuff->dest); swaps(&stuff->xOff); swaps(&stuff->yOff); SwapRestS(stuff); return ProcShapeRectangles(client); } static int _X_COLD SProcShapeMask(ClientPtr client) { REQUEST(xShapeMaskReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeMaskReq); swapl(&stuff->dest); swaps(&stuff->xOff); swaps(&stuff->yOff); swapl(&stuff->src); return ProcShapeMask(client); } static int _X_COLD SProcShapeCombine(ClientPtr client) { REQUEST(xShapeCombineReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeCombineReq); swapl(&stuff->dest); swaps(&stuff->xOff); swaps(&stuff->yOff); swapl(&stuff->src); return ProcShapeCombine(client); } static int _X_COLD SProcShapeOffset(ClientPtr client) { REQUEST(xShapeOffsetReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeOffsetReq); swapl(&stuff->dest); swaps(&stuff->xOff); swaps(&stuff->yOff); return ProcShapeOffset(client); } static int _X_COLD SProcShapeQueryExtents(ClientPtr client) { REQUEST(xShapeQueryExtentsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeQueryExtentsReq); swapl(&stuff->window); return ProcShapeQueryExtents(client); } static int _X_COLD SProcShapeSelectInput(ClientPtr client) { REQUEST(xShapeSelectInputReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeSelectInputReq); swapl(&stuff->window); return ProcShapeSelectInput(client); } static int _X_COLD SProcShapeInputSelected(ClientPtr client) { REQUEST(xShapeInputSelectedReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeInputSelectedReq); swapl(&stuff->window); return ProcShapeInputSelected(client); } static int _X_COLD SProcShapeGetRectangles(ClientPtr client) { REQUEST(xShapeGetRectanglesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); swapl(&stuff->window); return ProcShapeGetRectangles(client); } static int _X_COLD SProcShapeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_ShapeQueryVersion: return SProcShapeQueryVersion(client); case X_ShapeRectangles: return SProcShapeRectangles(client); case X_ShapeMask: return SProcShapeMask(client); case X_ShapeCombine: return SProcShapeCombine(client); case X_ShapeOffset: return SProcShapeOffset(client); case X_ShapeQueryExtents: return SProcShapeQueryExtents(client); case X_ShapeSelectInput: return SProcShapeSelectInput(client); case X_ShapeInputSelected: return SProcShapeInputSelected(client); case X_ShapeGetRectangles: return SProcShapeGetRectangles(client); default: return BadRequest; } } void ShapeExtensionInit(void) { ExtensionEntry *extEntry; ClientType = CreateNewResourceType(ShapeFreeClient, "ShapeClient"); ShapeEventType = CreateNewResourceType(ShapeFreeEvents, "ShapeEvent"); if (ClientType && ShapeEventType && (extEntry = AddExtension(SHAPENAME, ShapeNumberEvents, 0, ProcShapeDispatch, SProcShapeDispatch, NULL, StandardMinorOpcode))) { ShapeEventBase = extEntry->eventBase; EventSwapVector[ShapeEventBase] = (EventSwapPtr) SShapeNotifyEvent; } } xorg-server-21.1.16/Xext/sleepuntil.c0000644000175000017500000001417414757411105013122 /* * Copyright 1992, 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. * * Author: Keith Packard, MIT X Consortium */ /* dixsleep.c - implement millisecond timeouts for X clients */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "sleepuntil.h" #include #include #include "misc.h" #include "windowstr.h" #include "dixstruct.h" #include "pixmapstr.h" #include "scrnintstr.h" typedef struct _Sertafied { struct _Sertafied *next; TimeStamp revive; ClientPtr pClient; XID id; void (*notifyFunc) (ClientPtr /* client */ , void * /* closure */ ); void *closure; } SertafiedRec, *SertafiedPtr; static SertafiedPtr pPending; static RESTYPE SertafiedResType; static Bool BlockHandlerRegistered; static int SertafiedGeneration; static void ClientAwaken(ClientPtr /* client */ , void * /* closure */ ); static int SertafiedDelete(void * /* value */ , XID /* id */ ); static void SertafiedBlockHandler(void *data, void *timeout); static void SertafiedWakeupHandler(void *data, int i); int ClientSleepUntil(ClientPtr client, TimeStamp *revive, void (*notifyFunc) (ClientPtr, void *), void *closure) { SertafiedPtr pRequest, pReq, pPrev; if (SertafiedGeneration != serverGeneration) { SertafiedResType = CreateNewResourceType(SertafiedDelete, "ClientSleep"); if (!SertafiedResType) return FALSE; SertafiedGeneration = serverGeneration; BlockHandlerRegistered = FALSE; } pRequest = malloc(sizeof(SertafiedRec)); if (!pRequest) return FALSE; pRequest->pClient = client; pRequest->revive = *revive; pRequest->id = FakeClientID(client->index); pRequest->closure = closure; if (!BlockHandlerRegistered) { if (!RegisterBlockAndWakeupHandlers(SertafiedBlockHandler, SertafiedWakeupHandler, (void *) 0)) { free(pRequest); return FALSE; } BlockHandlerRegistered = TRUE; } pRequest->notifyFunc = 0; if (!AddResource(pRequest->id, SertafiedResType, (void *) pRequest)) return FALSE; if (!notifyFunc) notifyFunc = ClientAwaken; pRequest->notifyFunc = notifyFunc; /* Insert into time-ordered queue, with earliest activation time coming first. */ pPrev = 0; for (pReq = pPending; pReq; pReq = pReq->next) { if (CompareTimeStamps(pReq->revive, *revive) == LATER) break; pPrev = pReq; } if (pPrev) pPrev->next = pRequest; else pPending = pRequest; pRequest->next = pReq; IgnoreClient(client); return TRUE; } static void ClientAwaken(ClientPtr client, void *closure) { AttendClient(client); } static int SertafiedDelete(void *value, XID id) { SertafiedPtr pRequest = (SertafiedPtr) value; SertafiedPtr pReq, pPrev; pPrev = 0; for (pReq = pPending; pReq; pPrev = pReq, pReq = pReq->next) if (pReq == pRequest) { if (pPrev) pPrev->next = pReq->next; else pPending = pReq->next; break; } if (pRequest->notifyFunc) (*pRequest->notifyFunc) (pRequest->pClient, pRequest->closure); free(pRequest); return TRUE; } static void SertafiedBlockHandler(void *data, void *wt) { SertafiedPtr pReq, pNext; unsigned long delay; TimeStamp now; if (!pPending) return; now.milliseconds = GetTimeInMillis(); now.months = currentTime.months; if ((int) (now.milliseconds - currentTime.milliseconds) < 0) now.months++; for (pReq = pPending; pReq; pReq = pNext) { pNext = pReq->next; if (CompareTimeStamps(pReq->revive, now) == LATER) break; FreeResource(pReq->id, RT_NONE); /* AttendClient() may have been called via the resource delete * function so a client may have input to be processed and so * set delay to 0 to prevent blocking in WaitForSomething(). */ AdjustWaitForDelay(wt, 0); } pReq = pPending; if (!pReq) return; delay = pReq->revive.milliseconds - now.milliseconds; AdjustWaitForDelay(wt, delay); } static void SertafiedWakeupHandler(void *data, int i) { SertafiedPtr pReq, pNext; TimeStamp now; now.milliseconds = GetTimeInMillis(); now.months = currentTime.months; if ((int) (now.milliseconds - currentTime.milliseconds) < 0) now.months++; for (pReq = pPending; pReq; pReq = pNext) { pNext = pReq->next; if (CompareTimeStamps(pReq->revive, now) == LATER) break; FreeResource(pReq->id, RT_NONE); } if (!pPending) { RemoveBlockAndWakeupHandlers(SertafiedBlockHandler, SertafiedWakeupHandler, (void *) 0); BlockHandlerRegistered = FALSE; } } xorg-server-21.1.16/Xext/sleepuntil.h0000644000175000017500000000341614757411105013124 /* * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved. * * 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, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * 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 * XFREE86 PROJECT 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 XFree86 Project 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 * XFree86 Project. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _SLEEPUNTIL_H_ #define _SLEEPUNTIL_H_ 1 #include "dix.h" extern int ClientSleepUntil(ClientPtr client, TimeStamp *revive, void (*notifyFunc) (ClientPtr /* client */ , void * /* closure */ ), void *Closure); #endif xorg-server-21.1.16/Xext/sync.c0000644000175000017500000024314514757411105011714 /* Copyright 1991, 1993, 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 1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts, and Olivetti Research Limited, Cambridge, England. 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 names of Digital or Olivetti not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Digital and Olivetti make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THEY 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 #endif #include #include #include #include #include "scrnintstr.h" #include "os.h" #include "extnsionst.h" #include "dixstruct.h" #include "pixmapstr.h" #include "resource.h" #include "opaque.h" #include #include "syncsrv.h" #include "syncsdk.h" #include "protocol-versions.h" #include "inputstr.h" #include #if !defined(WIN32) #include #endif #include "extinit.h" /* * Local Global Variables */ static int SyncEventBase; static int SyncErrorBase; static RESTYPE RTCounter = 0; static RESTYPE RTAwait; static RESTYPE RTAlarm; static RESTYPE RTAlarmClient; static RESTYPE RTFence; static struct xorg_list SysCounterList; static int SyncNumInvalidCounterWarnings = 0; #define MAX_INVALID_COUNTER_WARNINGS 5 static const char *WARN_INVALID_COUNTER_COMPARE = "Warning: Non-counter XSync object using Counter-only\n" " comparison. Result will never be true.\n"; static const char *WARN_INVALID_COUNTER_ALARM = "Warning: Non-counter XSync object used in alarm. This is\n" " the result of a programming error in the X server.\n"; #define IsSystemCounter(pCounter) \ (pCounter && (pCounter->sync.client == NULL)) /* these are all the alarm attributes that pertain to the alarm's trigger */ #define XSyncCAAllTrigger \ (XSyncCACounter | XSyncCAValueType | XSyncCAValue | XSyncCATestType) static void SyncComputeBracketValues(SyncCounter *); static void SyncInitServerTime(void); static void SyncInitIdleTime(void); static inline void* SysCounterGetPrivate(SyncCounter *counter) { BUG_WARN(!IsSystemCounter(counter)); return counter->pSysCounterInfo ? counter->pSysCounterInfo->private : NULL; } static Bool SyncCheckWarnIsCounter(const SyncObject * pSync, const char *warning) { if (pSync && (SYNC_COUNTER != pSync->type)) { if (SyncNumInvalidCounterWarnings++ < MAX_INVALID_COUNTER_WARNINGS) { ErrorF("%s", warning); ErrorF(" Counter type: %d\n", pSync->type); } return FALSE; } return TRUE; } /* Each counter maintains a simple linked list of triggers that are * interested in the counter. The two functions below are used to * delete and add triggers on this list. */ void SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger) { SyncTriggerList *pCur; SyncTriggerList *pPrev; SyncCounter *pCounter; /* pSync needs to be stored in pTrigger before calling here. */ if (!pTrigger->pSync) return; pPrev = NULL; pCur = pTrigger->pSync->pTriglist; while (pCur) { if (pCur->pTrigger == pTrigger) { if (pPrev) pPrev->next = pCur->next; else pTrigger->pSync->pTriglist = pCur->next; free(pCur); break; } pPrev = pCur; pCur = pCur->next; } if (SYNC_COUNTER == pTrigger->pSync->type) { pCounter = (SyncCounter *) pTrigger->pSync; if (IsSystemCounter(pCounter)) SyncComputeBracketValues(pCounter); } else if (SYNC_FENCE == pTrigger->pSync->type) { SyncFence *pFence = (SyncFence *) pTrigger->pSync; pFence->funcs.DeleteTrigger(pTrigger); } } int SyncAddTriggerToSyncObject(SyncTrigger * pTrigger) { SyncTriggerList *pCur; SyncCounter *pCounter; if (!pTrigger->pSync) return Success; /* don't do anything if it's already there */ for (pCur = pTrigger->pSync->pTriglist; pCur; pCur = pCur->next) { if (pCur->pTrigger == pTrigger) return Success; } /* Failure is not an option, it's succeed or burst! */ pCur = XNFalloc(sizeof(SyncTriggerList)); pCur->pTrigger = pTrigger; pCur->next = pTrigger->pSync->pTriglist; pTrigger->pSync->pTriglist = pCur; if (SYNC_COUNTER == pTrigger->pSync->type) { pCounter = (SyncCounter *) pTrigger->pSync; if (IsSystemCounter(pCounter)) SyncComputeBracketValues(pCounter); } else if (SYNC_FENCE == pTrigger->pSync->type) { SyncFence *pFence = (SyncFence *) pTrigger->pSync; pFence->funcs.AddTrigger(pTrigger); } return Success; } /* Below are five possible functions that can be plugged into * pTrigger->CheckTrigger for counter sync objects, corresponding to * the four possible test-types, and the one possible function that * can be plugged into pTrigger->CheckTrigger for fence sync objects. * These functions are called after the sync object's state changes * but are also passed the old state so they can inspect both the old * and new values. (PositiveTransition and NegativeTransition need to * see both pieces of information.) These functions return the truth * value of the trigger. * * All of them include the condition pTrigger->pSync == NULL. * This is because the spec says that a trigger with a sync value * of None is always TRUE. */ static Bool SyncCheckTriggerPositiveComparison(SyncTrigger * pTrigger, int64_t oldval) { SyncCounter *pCounter; /* Non-counter sync objects should never get here because they * never trigger this comparison. */ if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) return FALSE; pCounter = (SyncCounter *) pTrigger->pSync; return pCounter == NULL || pCounter->value >= pTrigger->test_value; } static Bool SyncCheckTriggerNegativeComparison(SyncTrigger * pTrigger, int64_t oldval) { SyncCounter *pCounter; /* Non-counter sync objects should never get here because they * never trigger this comparison. */ if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) return FALSE; pCounter = (SyncCounter *) pTrigger->pSync; return pCounter == NULL || pCounter->value <= pTrigger->test_value; } static Bool SyncCheckTriggerPositiveTransition(SyncTrigger * pTrigger, int64_t oldval) { SyncCounter *pCounter; /* Non-counter sync objects should never get here because they * never trigger this comparison. */ if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) return FALSE; pCounter = (SyncCounter *) pTrigger->pSync; return (pCounter == NULL || (oldval < pTrigger->test_value && pCounter->value >= pTrigger->test_value)); } static Bool SyncCheckTriggerNegativeTransition(SyncTrigger * pTrigger, int64_t oldval) { SyncCounter *pCounter; /* Non-counter sync objects should never get here because they * never trigger this comparison. */ if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_COMPARE)) return FALSE; pCounter = (SyncCounter *) pTrigger->pSync; return (pCounter == NULL || (oldval > pTrigger->test_value && pCounter->value <= pTrigger->test_value)); } static Bool SyncCheckTriggerFence(SyncTrigger * pTrigger, int64_t unused) { SyncFence *pFence = (SyncFence *) pTrigger->pSync; (void) unused; return (pFence == NULL || pFence->funcs.CheckTriggered(pFence)); } static int SyncInitTrigger(ClientPtr client, SyncTrigger * pTrigger, XID syncObject, RESTYPE resType, Mask changes) { SyncObject *pSync = pTrigger->pSync; SyncCounter *pCounter = NULL; int rc; Bool newSyncObject = FALSE; if (changes & XSyncCACounter) { if (syncObject == None) pSync = NULL; else if (Success != (rc = dixLookupResourceByType((void **) &pSync, syncObject, resType, client, DixReadAccess))) { client->errorValue = syncObject; return rc; } } /* if system counter, ask it what the current value is */ if (pSync && SYNC_COUNTER == pSync->type) { pCounter = (SyncCounter *) pSync; if (IsSystemCounter(pCounter)) { (*pCounter->pSysCounterInfo->QueryValue) ((void *) pCounter, &pCounter->value); } } if (changes & XSyncCAValueType) { if (pTrigger->value_type != XSyncRelative && pTrigger->value_type != XSyncAbsolute) { client->errorValue = pTrigger->value_type; return BadValue; } } if (changes & (XSyncCAValueType | XSyncCAValue)) { if (pTrigger->value_type == XSyncAbsolute) pTrigger->test_value = pTrigger->wait_value; else { /* relative */ Bool overflow; if (pCounter == NULL) return BadMatch; overflow = checked_int64_add(&pTrigger->test_value, pCounter->value, pTrigger->wait_value); if (overflow) { client->errorValue = pTrigger->wait_value >> 32; return BadValue; } } } if (changes & XSyncCATestType) { if (pSync && SYNC_FENCE == pSync->type) { pTrigger->CheckTrigger = SyncCheckTriggerFence; } else { /* select appropriate CheckTrigger function */ switch (pTrigger->test_type) { case XSyncPositiveTransition: pTrigger->CheckTrigger = SyncCheckTriggerPositiveTransition; break; case XSyncNegativeTransition: pTrigger->CheckTrigger = SyncCheckTriggerNegativeTransition; break; case XSyncPositiveComparison: pTrigger->CheckTrigger = SyncCheckTriggerPositiveComparison; break; case XSyncNegativeComparison: pTrigger->CheckTrigger = SyncCheckTriggerNegativeComparison; break; default: client->errorValue = pTrigger->test_type; return BadValue; } } } if (changes & XSyncCACounter) { if (pSync != pTrigger->pSync) { /* new counter for trigger */ SyncDeleteTriggerFromSyncObject(pTrigger); pTrigger->pSync = pSync; newSyncObject = TRUE; } } /* we wait until we're sure there are no errors before registering * a new counter on a trigger */ if (newSyncObject) { SyncAddTriggerToSyncObject(pTrigger); } else if (pCounter && IsSystemCounter(pCounter)) { SyncComputeBracketValues(pCounter); } return Success; } /* AlarmNotify events happen in response to actions taken on an Alarm or * the counter used by the alarm. AlarmNotify may be sent to multiple * clients. The alarm maintains a list of clients interested in events. */ static void SyncSendAlarmNotifyEvents(SyncAlarm * pAlarm) { SyncAlarmClientList *pcl; xSyncAlarmNotifyEvent ane; SyncTrigger *pTrigger = &pAlarm->trigger; SyncCounter *pCounter; if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) return; pCounter = (SyncCounter *) pTrigger->pSync; UpdateCurrentTime(); ane = (xSyncAlarmNotifyEvent) { .type = SyncEventBase + XSyncAlarmNotify, .kind = XSyncAlarmNotify, .alarm = pAlarm->alarm_id, .alarm_value_hi = pTrigger->test_value >> 32, .alarm_value_lo = pTrigger->test_value, .time = currentTime.milliseconds, .state = pAlarm->state }; if (pTrigger->pSync && SYNC_COUNTER == pTrigger->pSync->type) { ane.counter_value_hi = pCounter->value >> 32; ane.counter_value_lo = pCounter->value; } else { /* XXX what else can we do if there's no counter? */ ane.counter_value_hi = ane.counter_value_lo = 0; } /* send to owner */ if (pAlarm->events) WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane); /* send to other interested clients */ for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); } /* CounterNotify events only occur in response to an Await. The events * go only to the Awaiting client. */ static void SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait ** ppAwait, int num_events) { xSyncCounterNotifyEvent *pEvents, *pev; int i; if (client->clientGone) return; pev = pEvents = calloc(num_events, sizeof(xSyncCounterNotifyEvent)); if (!pEvents) return; UpdateCurrentTime(); for (i = 0; i < num_events; i++, ppAwait++, pev++) { SyncTrigger *pTrigger = &(*ppAwait)->trigger; pev->type = SyncEventBase + XSyncCounterNotify; pev->kind = XSyncCounterNotify; pev->counter = pTrigger->pSync->id; pev->wait_value_lo = pTrigger->test_value; pev->wait_value_hi = pTrigger->test_value >> 32; if (SYNC_COUNTER == pTrigger->pSync->type) { SyncCounter *pCounter = (SyncCounter *) pTrigger->pSync; pev->counter_value_lo = pCounter->value; pev->counter_value_hi = pCounter->value >> 32; } else { pev->counter_value_lo = 0; pev->counter_value_hi = 0; } pev->time = currentTime.milliseconds; pev->count = num_events - i - 1; /* events remaining */ pev->destroyed = pTrigger->pSync->beingDestroyed; } /* swapping will be taken care of by this */ WriteEventsToClient(client, num_events, (xEvent *) pEvents); free(pEvents); } /* This function is called when an alarm's counter is destroyed. * It is plugged into pTrigger->CounterDestroyed (for alarm triggers). */ static void SyncAlarmCounterDestroyed(SyncTrigger * pTrigger) { SyncAlarm *pAlarm = (SyncAlarm *) pTrigger; pAlarm->state = XSyncAlarmInactive; SyncSendAlarmNotifyEvents(pAlarm); pTrigger->pSync = NULL; } /* This function is called when an alarm "goes off." * It is plugged into pTrigger->TriggerFired (for alarm triggers). */ static void SyncAlarmTriggerFired(SyncTrigger * pTrigger) { SyncAlarm *pAlarm = (SyncAlarm *) pTrigger; SyncCounter *pCounter; int64_t new_test_value; if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) return; pCounter = (SyncCounter *) pTrigger->pSync; /* no need to check alarm unless it's active */ if (pAlarm->state != XSyncAlarmActive) return; /* " if the counter value is None, or if the delta is 0 and * the test-type is PositiveComparison or NegativeComparison, * no change is made to value (test-value) and the alarm * state is changed to Inactive before the event is generated." */ if (pCounter == NULL || (pAlarm->delta == 0 && (pAlarm->trigger.test_type == XSyncPositiveComparison || pAlarm->trigger.test_type == XSyncNegativeComparison))) pAlarm->state = XSyncAlarmInactive; new_test_value = pAlarm->trigger.test_value; if (pAlarm->state == XSyncAlarmActive) { Bool overflow; int64_t oldvalue; SyncTrigger *paTrigger = &pAlarm->trigger; SyncCounter *paCounter; if (!SyncCheckWarnIsCounter(paTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) return; paCounter = (SyncCounter *) pTrigger->pSync; /* "The alarm is updated by repeatedly adding delta to the * value of the trigger and re-initializing it until it * becomes FALSE." */ oldvalue = paTrigger->test_value; /* XXX really should do something smarter here */ do { overflow = checked_int64_add(&paTrigger->test_value, paTrigger->test_value, pAlarm->delta); } while (!overflow && (*paTrigger->CheckTrigger) (paTrigger, paCounter->value)); new_test_value = paTrigger->test_value; paTrigger->test_value = oldvalue; /* "If this update would cause value to fall outside the range * for an INT64...no change is made to value (test-value) and * the alarm state is changed to Inactive before the event is * generated." */ if (overflow) { new_test_value = oldvalue; pAlarm->state = XSyncAlarmInactive; } } /* The AlarmNotify event has to have the "new state of the alarm" * which we can't be sure of until this point. However, it has * to have the "old" trigger test value. That's the reason for * all the newvalue/oldvalue shuffling above. After we send the * events, give the trigger its new test value. */ SyncSendAlarmNotifyEvents(pAlarm); pTrigger->test_value = new_test_value; } /* This function is called when an Await unblocks, either as a result * of the trigger firing OR the counter being destroyed. * It goes into pTrigger->TriggerFired AND pTrigger->CounterDestroyed * (for Await triggers). */ static void SyncAwaitTriggerFired(SyncTrigger * pTrigger) { SyncAwait *pAwait = (SyncAwait *) pTrigger; int numwaits; SyncAwaitUnion *pAwaitUnion; SyncAwait **ppAwait; int num_events = 0; pAwaitUnion = (SyncAwaitUnion *) pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; ppAwait = xallocarray(numwaits, sizeof(SyncAwait *)); if (!ppAwait) goto bail; pAwait = &(pAwaitUnion + 1)->await; /* "When a client is unblocked, all the CounterNotify events for * the Await request are generated contiguously. If count is 0 * there are no more events to follow for this request. If * count is n, there are at least n more events to follow." * * Thus, it is best to find all the counters for which events * need to be sent first, so that an accurate count field can * be stored in the events. */ for (; numwaits; numwaits--, pAwait++) { int64_t diff; Bool overflow, diffgreater, diffequal; /* "A CounterNotify event with the destroyed flag set to TRUE is * always generated if the counter for one of the triggers is * destroyed." */ if (pAwait->trigger.pSync->beingDestroyed) { ppAwait[num_events++] = pAwait; continue; } if (SYNC_COUNTER == pAwait->trigger.pSync->type) { SyncCounter *pCounter = (SyncCounter *) pAwait->trigger.pSync; /* "The difference between the counter and the test value is * calculated by subtracting the test value from the value of * the counter." */ overflow = checked_int64_subtract(&diff, pCounter->value, pAwait->trigger.test_value); /* "If the difference lies outside the range for an INT64, an * event is not generated." */ if (overflow) continue; diffgreater = diff > pAwait->event_threshold; diffequal = diff == pAwait->event_threshold; /* "If the test-type is PositiveTransition or * PositiveComparison, a CounterNotify event is generated if * the difference is at least event-threshold. If the test-type * is NegativeTransition or NegativeComparison, a CounterNotify * event is generated if the difference is at most * event-threshold." */ if (((pAwait->trigger.test_type == XSyncPositiveComparison || pAwait->trigger.test_type == XSyncPositiveTransition) && (diffgreater || diffequal)) || ((pAwait->trigger.test_type == XSyncNegativeComparison || pAwait->trigger.test_type == XSyncNegativeTransition) && (!diffgreater) /* less or equal */ ) ) { ppAwait[num_events++] = pAwait; } } } if (num_events) SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, num_events); free(ppAwait); bail: /* unblock the client */ AttendClient(pAwaitUnion->header.client); /* delete the await */ FreeResource(pAwaitUnion->header.delete_id, RT_NONE); } static int64_t SyncUpdateCounter(SyncCounter *pCounter, int64_t newval) { int64_t oldval = pCounter->value; pCounter->value = newval; return oldval; } /* This function should always be used to change a counter's value so that * any triggers depending on the counter will be checked. */ void SyncChangeCounter(SyncCounter * pCounter, int64_t newval) { SyncTriggerList *ptl, *pnext; int64_t oldval; oldval = SyncUpdateCounter(pCounter, newval); /* run through triggers to see if any become true */ for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) { pnext = ptl->next; if ((*ptl->pTrigger->CheckTrigger) (ptl->pTrigger, oldval)) (*ptl->pTrigger->TriggerFired) (ptl->pTrigger); } if (IsSystemCounter(pCounter)) { SyncComputeBracketValues(pCounter); } } /* loosely based on dix/events.c/EventSelectForWindow */ static Bool SyncEventSelectForAlarm(SyncAlarm * pAlarm, ClientPtr client, Bool wantevents) { SyncAlarmClientList *pClients; if (client == pAlarm->client) { /* alarm owner */ pAlarm->events = wantevents; return Success; } /* see if the client is already on the list (has events selected) */ for (pClients = pAlarm->pEventClients; pClients; pClients = pClients->next) { if (pClients->client == client) { /* client's presence on the list indicates desire for * events. If the client doesn't want events, remove it * from the list. If the client does want events, do * nothing, since it's already got them. */ if (!wantevents) { FreeResource(pClients->delete_id, RT_NONE); } return Success; } } /* if we get here, this client does not currently have * events selected on the alarm */ if (!wantevents) /* client doesn't want events, and we just discovered that it * doesn't have them, so there's nothing to do. */ return Success; /* add new client to pAlarm->pEventClients */ pClients = malloc(sizeof(SyncAlarmClientList)); if (!pClients) return BadAlloc; /* register it as a resource so it will be cleaned up * if the client dies */ pClients->delete_id = FakeClientID(client->index); /* link it into list after we know all the allocations succeed */ pClients->next = pAlarm->pEventClients; pAlarm->pEventClients = pClients; pClients->client = client; if (!AddResource(pClients->delete_id, RTAlarmClient, pAlarm)) return BadAlloc; return Success; } /* * ** SyncChangeAlarmAttributes ** This is used by CreateAlarm and ChangeAlarm */ static int SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * pAlarm, Mask mask, CARD32 *values) { int status; XSyncCounter counter; Mask origmask = mask; SyncTrigger trigger; Bool select_events_changed = FALSE; Bool select_events_value = FALSE; int64_t delta; trigger = pAlarm->trigger; delta = pAlarm->delta; counter = trigger.pSync ? trigger.pSync->id : None; while (mask) { int index2 = lowbit(mask); mask &= ~index2; switch (index2) { case XSyncCACounter: mask &= ~XSyncCACounter; /* sanity check in SyncInitTrigger */ counter = *values++; break; case XSyncCAValueType: mask &= ~XSyncCAValueType; /* sanity check in SyncInitTrigger */ trigger.value_type = *values++; break; case XSyncCAValue: mask &= ~XSyncCAValue; trigger.wait_value = ((int64_t)values[0] << 32) | values[1]; values += 2; break; case XSyncCATestType: mask &= ~XSyncCATestType; /* sanity check in SyncInitTrigger */ trigger.test_type = *values++; break; case XSyncCADelta: mask &= ~XSyncCADelta; delta = ((int64_t)values[0] << 32) | values[1]; values += 2; break; case XSyncCAEvents: mask &= ~XSyncCAEvents; if ((*values != xTrue) && (*values != xFalse)) { client->errorValue = *values; return BadValue; } select_events_value = (Bool) (*values++); select_events_changed = TRUE; break; default: client->errorValue = mask; return BadValue; } } if (select_events_changed) { status = SyncEventSelectForAlarm(pAlarm, client, select_events_value); if (status != Success) return status; } /* "If the test-type is PositiveComparison or PositiveTransition * and delta is less than zero, or if the test-type is * NegativeComparison or NegativeTransition and delta is * greater than zero, a Match error is generated." */ if (origmask & (XSyncCADelta | XSyncCATestType)) { if ((((trigger.test_type == XSyncPositiveComparison) || (trigger.test_type == XSyncPositiveTransition)) && delta < 0) || (((trigger.test_type == XSyncNegativeComparison) || (trigger.test_type == XSyncNegativeTransition)) && delta > 0) ) { return BadMatch; } } /* postpone this until now, when we're sure nothing else can go wrong */ pAlarm->delta = delta; pAlarm->trigger = trigger; if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter, RTCounter, origmask & XSyncCAAllTrigger)) != Success) return status; /* XXX spec does not really say to do this - needs clarification */ pAlarm->state = XSyncAlarmActive; return Success; } SyncObject * SyncCreate(ClientPtr client, XID id, unsigned char type) { SyncObject *pSync; RESTYPE resType; switch (type) { case SYNC_COUNTER: pSync = malloc(sizeof(SyncCounter)); resType = RTCounter; break; case SYNC_FENCE: pSync = (SyncObject *) dixAllocateObjectWithPrivates(SyncFence, PRIVATE_SYNC_FENCE); resType = RTFence; break; default: return NULL; } if (!pSync) return NULL; pSync->initialized = FALSE; if (!AddResource(id, resType, (void *) pSync)) return NULL; pSync->client = client; pSync->id = id; pSync->pTriglist = NULL; pSync->beingDestroyed = FALSE; pSync->type = type; return pSync; } int SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered) { #ifdef HAVE_XSHMFENCE SyncFence *pFence; int status; pFence = (SyncFence *) SyncCreate(client, id, SYNC_FENCE); if (!pFence) return BadAlloc; status = miSyncInitFenceFromFD(pDraw, pFence, fd, initially_triggered); if (status != Success) { FreeResource(pFence->sync.id, RT_NONE); return status; } return Success; #else return BadImplementation; #endif } int SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence) { #ifdef HAVE_XSHMFENCE return miSyncFDFromFence(pDraw, pFence); #else return BadImplementation; #endif } static SyncCounter * SyncCreateCounter(ClientPtr client, XSyncCounter id, int64_t initialvalue) { SyncCounter *pCounter; if (!(pCounter = (SyncCounter *) SyncCreate(client, id, SYNC_COUNTER))) return NULL; pCounter->value = initialvalue; pCounter->pSysCounterInfo = NULL; pCounter->sync.initialized = TRUE; return pCounter; } static int FreeCounter(void *, XID); /* * ***** System Counter utilities */ SyncCounter* SyncCreateSystemCounter(const char *name, int64_t initial, int64_t resolution, SyncCounterType counterType, SyncSystemCounterQueryValue QueryValue, SyncSystemCounterBracketValues BracketValues ) { SyncCounter *pCounter = SyncCreateCounter(NULL, FakeClientID(0), initial); if (pCounter) { SysCounterInfo *psci; psci = malloc(sizeof(SysCounterInfo)); if (!psci) { FreeResource(pCounter->sync.id, RT_NONE); return pCounter; } pCounter->pSysCounterInfo = psci; psci->pCounter = pCounter; psci->name = strdup(name); psci->resolution = resolution; psci->counterType = counterType; psci->QueryValue = QueryValue; psci->BracketValues = BracketValues; psci->private = NULL; psci->bracket_greater = LLONG_MAX; psci->bracket_less = LLONG_MIN; xorg_list_add(&psci->entry, &SysCounterList); } return pCounter; } void SyncDestroySystemCounter(void *pSysCounter) { SyncCounter *pCounter = (SyncCounter *) pSysCounter; FreeResource(pCounter->sync.id, RT_NONE); } static void SyncComputeBracketValues(SyncCounter * pCounter) { SyncTriggerList *pCur; SyncTrigger *pTrigger; SysCounterInfo *psci; int64_t *pnewgtval = NULL; int64_t *pnewltval = NULL; SyncCounterType ct; if (!pCounter) return; psci = pCounter->pSysCounterInfo; ct = pCounter->pSysCounterInfo->counterType; if (ct == XSyncCounterNeverChanges) return; psci->bracket_greater = LLONG_MAX; psci->bracket_less = LLONG_MIN; for (pCur = pCounter->sync.pTriglist; pCur; pCur = pCur->next) { pTrigger = pCur->pTrigger; if (pTrigger->test_type == XSyncPositiveComparison && ct != XSyncCounterNeverIncreases) { if (pCounter->value < pTrigger->test_value && pTrigger->test_value < psci->bracket_greater) { psci->bracket_greater = pTrigger->test_value; pnewgtval = &psci->bracket_greater; } else if (pCounter->value > pTrigger->test_value && pTrigger->test_value > psci->bracket_less) { psci->bracket_less = pTrigger->test_value; pnewltval = &psci->bracket_less; } } else if (pTrigger->test_type == XSyncNegativeComparison && ct != XSyncCounterNeverDecreases) { if (pCounter->value > pTrigger->test_value && pTrigger->test_value > psci->bracket_less) { psci->bracket_less = pTrigger->test_value; pnewltval = &psci->bracket_less; } else if (pCounter->value < pTrigger->test_value && pTrigger->test_value < psci->bracket_greater) { psci->bracket_greater = pTrigger->test_value; pnewgtval = &psci->bracket_greater; } } else if (pTrigger->test_type == XSyncNegativeTransition && ct != XSyncCounterNeverIncreases) { if (pCounter->value >= pTrigger->test_value && pTrigger->test_value > psci->bracket_less) { /* * If the value is exactly equal to our threshold, we want one * more event in the negative direction to ensure we pick up * when the value is less than this threshold. */ psci->bracket_less = pTrigger->test_value; pnewltval = &psci->bracket_less; } else if (pCounter->value < pTrigger->test_value && pTrigger->test_value < psci->bracket_greater) { psci->bracket_greater = pTrigger->test_value; pnewgtval = &psci->bracket_greater; } } else if (pTrigger->test_type == XSyncPositiveTransition && ct != XSyncCounterNeverDecreases) { if (pCounter->value <= pTrigger->test_value && pTrigger->test_value < psci->bracket_greater) { /* * If the value is exactly equal to our threshold, we * want one more event in the positive direction to * ensure we pick up when the value *exceeds* this * threshold. */ psci->bracket_greater = pTrigger->test_value; pnewgtval = &psci->bracket_greater; } else if (pCounter->value > pTrigger->test_value && pTrigger->test_value > psci->bracket_less) { psci->bracket_less = pTrigger->test_value; pnewltval = &psci->bracket_less; } } } /* end for each trigger */ (*psci->BracketValues) ((void *) pCounter, pnewltval, pnewgtval); } /* * ***** Resource delete functions */ /* ARGSUSED */ static int FreeAlarm(void *addr, XID id) { SyncAlarm *pAlarm = (SyncAlarm *) addr; pAlarm->state = XSyncAlarmDestroyed; SyncSendAlarmNotifyEvents(pAlarm); /* delete event selections */ while (pAlarm->pEventClients) FreeResource(pAlarm->pEventClients->delete_id, RT_NONE); SyncDeleteTriggerFromSyncObject(&pAlarm->trigger); free(pAlarm); return Success; } /* * ** Cleanup after the destruction of a Counter */ /* ARGSUSED */ static int FreeCounter(void *env, XID id) { SyncCounter *pCounter = (SyncCounter *) env; pCounter->sync.beingDestroyed = TRUE; if (pCounter->sync.initialized) { SyncTriggerList *ptl, *pnext; /* tell all the counter's triggers that counter has been destroyed */ for (ptl = pCounter->sync.pTriglist; ptl; ptl = pnext) { (*ptl->pTrigger->CounterDestroyed) (ptl->pTrigger); pnext = ptl->next; free(ptl); /* destroy the trigger list as we go */ } if (IsSystemCounter(pCounter)) { xorg_list_del(&pCounter->pSysCounterInfo->entry); free(pCounter->pSysCounterInfo->name); free(pCounter->pSysCounterInfo->private); free(pCounter->pSysCounterInfo); } } free(pCounter); return Success; } /* * ** Cleanup after Await */ /* ARGSUSED */ static int FreeAwait(void *addr, XID id) { SyncAwaitUnion *pAwaitUnion = (SyncAwaitUnion *) addr; SyncAwait *pAwait; int numwaits; pAwait = &(pAwaitUnion + 1)->await; /* first await on list */ /* remove triggers from counters */ for (numwaits = pAwaitUnion->header.num_waitconditions; numwaits; numwaits--, pAwait++) { /* If the counter is being destroyed, FreeCounter will delete * the trigger list itself, so don't do it here. */ SyncObject *pSync = pAwait->trigger.pSync; if (pSync && !pSync->beingDestroyed) SyncDeleteTriggerFromSyncObject(&pAwait->trigger); } free(pAwaitUnion); return Success; } /* loosely based on dix/events.c/OtherClientGone */ static int FreeAlarmClient(void *value, XID id) { SyncAlarm *pAlarm = (SyncAlarm *) value; SyncAlarmClientList *pCur, *pPrev; for (pPrev = NULL, pCur = pAlarm->pEventClients; pCur; pPrev = pCur, pCur = pCur->next) { if (pCur->delete_id == id) { if (pPrev) pPrev->next = pCur->next; else pAlarm->pEventClients = pCur->next; free(pCur); return Success; } } FatalError("alarm client not on event list"); /*NOTREACHED*/} /* * ***** Proc functions */ /* * ** Initialize the extension */ static int ProcSyncInitialize(ClientPtr client) { xSyncInitializeReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_SYNC_MAJOR_VERSION, .minorVersion = SERVER_SYNC_MINOR_VERSION, }; REQUEST_SIZE_MATCH(xSyncInitializeReq); if (client->swapped) { swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(rep), &rep); return Success; } /* * ** Get list of system counters available through the extension */ static int ProcSyncListSystemCounters(ClientPtr client) { xSyncListSystemCountersReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .nCounters = 0, }; SysCounterInfo *psci; int len = 0; xSyncSystemCounter *list = NULL, *walklist = NULL; REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); xorg_list_for_each_entry(psci, &SysCounterList, entry) { /* pad to 4 byte boundary */ len += pad_to_int32(sz_xSyncSystemCounter + strlen(psci->name)); ++rep.nCounters; } if (len) { walklist = list = malloc(len); if (!list) return BadAlloc; } rep.length = bytes_to_int32(len); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.nCounters); } xorg_list_for_each_entry(psci, &SysCounterList, entry) { int namelen; char *pname_in_reply; walklist->counter = psci->pCounter->sync.id; walklist->resolution_hi = psci->resolution >> 32; walklist->resolution_lo = psci->resolution; namelen = strlen(psci->name); walklist->name_length = namelen; if (client->swapped) { swapl(&walklist->counter); swapl(&walklist->resolution_hi); swapl(&walklist->resolution_lo); swaps(&walklist->name_length); } pname_in_reply = ((char *) walklist) + sz_xSyncSystemCounter; strncpy(pname_in_reply, psci->name, namelen); walklist = (xSyncSystemCounter *) (((char *) walklist) + pad_to_int32(sz_xSyncSystemCounter + namelen)); } WriteToClient(client, sizeof(rep), &rep); if (len) { WriteToClient(client, len, list); free(list); } return Success; } /* * ** Set client Priority */ static int ProcSyncSetPriority(ClientPtr client) { REQUEST(xSyncSetPriorityReq); ClientPtr priorityclient; int rc; REQUEST_SIZE_MATCH(xSyncSetPriorityReq); if (stuff->id == None) priorityclient = client; else { rc = dixLookupClient(&priorityclient, stuff->id, client, DixSetAttrAccess); if (rc != Success) return rc; } if (priorityclient->priority != stuff->priority) { priorityclient->priority = stuff->priority; /* The following will force the server back into WaitForSomething * so that the change in this client's priority is immediately * reflected. */ isItTimeToYield = TRUE; dispatchException |= DE_PRIORITYCHANGE; } return Success; } /* * ** Get client Priority */ static int ProcSyncGetPriority(ClientPtr client) { REQUEST(xSyncGetPriorityReq); xSyncGetPriorityReply rep; ClientPtr priorityclient; int rc; REQUEST_SIZE_MATCH(xSyncGetPriorityReq); if (stuff->id == None) priorityclient = client; else { rc = dixLookupClient(&priorityclient, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; } rep = (xSyncGetPriorityReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .priority = priorityclient->priority }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.priority); } WriteToClient(client, sizeof(xSyncGetPriorityReply), &rep); return Success; } /* * ** Create a new counter */ static int ProcSyncCreateCounter(ClientPtr client) { REQUEST(xSyncCreateCounterReq); int64_t initial; REQUEST_SIZE_MATCH(xSyncCreateCounterReq); LEGAL_NEW_RESOURCE(stuff->cid, client); initial = ((int64_t)stuff->initial_value_hi << 32) | stuff->initial_value_lo; if (!SyncCreateCounter(client, stuff->cid, initial)) return BadAlloc; return Success; } /* * ** Set Counter value */ static int ProcSyncSetCounter(ClientPtr client) { REQUEST(xSyncSetCounterReq); SyncCounter *pCounter; int64_t newvalue; int rc; REQUEST_SIZE_MATCH(xSyncSetCounterReq); rc = dixLookupResourceByType((void **) &pCounter, stuff->cid, RTCounter, client, DixWriteAccess); if (rc != Success) return rc; if (IsSystemCounter(pCounter)) { client->errorValue = stuff->cid; return BadAccess; } newvalue = ((int64_t)stuff->value_hi << 32) | stuff->value_lo; SyncChangeCounter(pCounter, newvalue); return Success; } /* * ** Change Counter value */ static int ProcSyncChangeCounter(ClientPtr client) { REQUEST(xSyncChangeCounterReq); SyncCounter *pCounter; int64_t newvalue; Bool overflow; int rc; REQUEST_SIZE_MATCH(xSyncChangeCounterReq); rc = dixLookupResourceByType((void **) &pCounter, stuff->cid, RTCounter, client, DixWriteAccess); if (rc != Success) return rc; if (IsSystemCounter(pCounter)) { client->errorValue = stuff->cid; return BadAccess; } newvalue = (int64_t)stuff->value_hi << 32 | stuff->value_lo; overflow = checked_int64_add(&newvalue, newvalue, pCounter->value); if (overflow) { /* XXX 64 bit value can't fit in 32 bits; do the best we can */ client->errorValue = stuff->value_hi; return BadValue; } SyncChangeCounter(pCounter, newvalue); return Success; } /* * ** Destroy a counter */ static int ProcSyncDestroyCounter(ClientPtr client) { REQUEST(xSyncDestroyCounterReq); SyncCounter *pCounter; int rc; REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); rc = dixLookupResourceByType((void **) &pCounter, stuff->counter, RTCounter, client, DixDestroyAccess); if (rc != Success) return rc; if (IsSystemCounter(pCounter)) { client->errorValue = stuff->counter; return BadAccess; } FreeResource(pCounter->sync.id, RT_NONE); return Success; } static SyncAwaitUnion * SyncAwaitPrologue(ClientPtr client, int items) { SyncAwaitUnion *pAwaitUnion; /* all the memory for the entire await list is allocated * here in one chunk */ pAwaitUnion = xallocarray(items + 1, sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return NULL; /* first item is the header, remainder are real wait conditions */ pAwaitUnion->header.delete_id = FakeClientID(client->index); pAwaitUnion->header.client = client; pAwaitUnion->header.num_waitconditions = 0; if (!AddResource(pAwaitUnion->header.delete_id, RTAwait, pAwaitUnion)) return NULL; return pAwaitUnion; } static void SyncAwaitEpilogue(ClientPtr client, int items, SyncAwaitUnion * pAwaitUnion) { SyncAwait *pAwait; int i; IgnoreClient(client); /* see if any of the triggers are already true */ pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ for (i = 0; i < items; i++, pAwait++) { int64_t value; /* don't have to worry about NULL counters because the request * errors before we get here out if they occur */ switch (pAwait->trigger.pSync->type) { case SYNC_COUNTER: value = ((SyncCounter *) pAwait->trigger.pSync)->value; break; default: value = 0; } if ((*pAwait->trigger.CheckTrigger) (&pAwait->trigger, value)) { (*pAwait->trigger.TriggerFired) (&pAwait->trigger); break; /* once is enough */ } } } /* * ** Await */ static int ProcSyncAwait(ClientPtr client) { REQUEST(xSyncAwaitReq); int len, items; int i; xSyncWaitCondition *pProtocolWaitConds; SyncAwaitUnion *pAwaitUnion; SyncAwait *pAwait; int status; REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); len = client->req_len << 2; len -= sz_xSyncAwaitReq; items = len / sz_xSyncWaitCondition; if (items * sz_xSyncWaitCondition != len) { return BadLength; } if (items == 0) { client->errorValue = items; /* XXX protocol change */ return BadValue; } if (!(pAwaitUnion = SyncAwaitPrologue(client, items))) return BadAlloc; /* don't need to do any more memory allocation for this request! */ pProtocolWaitConds = (xSyncWaitCondition *) &stuff[1]; pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ for (i = 0; i < items; i++, pProtocolWaitConds++, pAwait++) { if (pProtocolWaitConds->counter == None) { /* XXX protocol change */ /* this should take care of removing any triggers created by * this request that have already been registered on sync objects */ FreeResource(pAwaitUnion->header.delete_id, RT_NONE); client->errorValue = pProtocolWaitConds->counter; return SyncErrorBase + XSyncBadCounter; } /* sanity checks are in SyncInitTrigger */ pAwait->trigger.pSync = NULL; pAwait->trigger.value_type = pProtocolWaitConds->value_type; pAwait->trigger.wait_value = ((int64_t)pProtocolWaitConds->wait_value_hi << 32) | pProtocolWaitConds->wait_value_lo; pAwait->trigger.test_type = pProtocolWaitConds->test_type; status = SyncInitTrigger(client, &pAwait->trigger, pProtocolWaitConds->counter, RTCounter, XSyncCAAllTrigger); if (status != Success) { /* this should take care of removing any triggers created by * this request that have already been registered on sync objects */ FreeResource(pAwaitUnion->header.delete_id, RT_NONE); return status; } /* this is not a mistake -- same function works for both cases */ pAwait->trigger.TriggerFired = SyncAwaitTriggerFired; pAwait->trigger.CounterDestroyed = SyncAwaitTriggerFired; pAwait->event_threshold = ((int64_t) pProtocolWaitConds->event_threshold_hi << 32) | pProtocolWaitConds->event_threshold_lo; pAwait->pHeader = &pAwaitUnion->header; pAwaitUnion->header.num_waitconditions++; } SyncAwaitEpilogue(client, items, pAwaitUnion); return Success; } /* * ** Query a counter */ static int ProcSyncQueryCounter(ClientPtr client) { REQUEST(xSyncQueryCounterReq); xSyncQueryCounterReply rep; SyncCounter *pCounter; int rc; REQUEST_SIZE_MATCH(xSyncQueryCounterReq); rc = dixLookupResourceByType((void **) &pCounter, stuff->counter, RTCounter, client, DixReadAccess); if (rc != Success) return rc; /* if system counter, ask it what the current value is */ if (IsSystemCounter(pCounter)) { (*pCounter->pSysCounterInfo->QueryValue) ((void *) pCounter, &pCounter->value); } rep = (xSyncQueryCounterReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .value_hi = pCounter->value >> 32, .value_lo = pCounter->value }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.value_hi); swapl(&rep.value_lo); } WriteToClient(client, sizeof(xSyncQueryCounterReply), &rep); return Success; } /* * ** Create Alarm */ static int ProcSyncCreateAlarm(ClientPtr client) { REQUEST(xSyncCreateAlarmReq); SyncAlarm *pAlarm; int status; unsigned long len, vmask; SyncTrigger *pTrigger; REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); LEGAL_NEW_RESOURCE(stuff->id, client); vmask = stuff->valueMask; len = client->req_len - bytes_to_int32(sizeof(xSyncCreateAlarmReq)); /* the "extra" call to Ones accounts for the presence of 64 bit values */ if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue | XSyncCADelta)))) return BadLength; if (!(pAlarm = malloc(sizeof(SyncAlarm)))) { return BadAlloc; } /* set up defaults */ pTrigger = &pAlarm->trigger; pTrigger->pSync = NULL; pTrigger->value_type = XSyncAbsolute; pTrigger->wait_value = 0; pTrigger->test_type = XSyncPositiveComparison; pTrigger->TriggerFired = SyncAlarmTriggerFired; pTrigger->CounterDestroyed = SyncAlarmCounterDestroyed; status = SyncInitTrigger(client, pTrigger, None, RTCounter, XSyncCAAllTrigger); if (status != Success) { free(pAlarm); return status; } pAlarm->client = client; pAlarm->alarm_id = stuff->id; pAlarm->delta = 1; pAlarm->events = TRUE; pAlarm->state = XSyncAlarmInactive; pAlarm->pEventClients = NULL; status = SyncChangeAlarmAttributes(client, pAlarm, vmask, (CARD32 *) &stuff[1]); if (status != Success) { free(pAlarm); return status; } if (!AddResource(stuff->id, RTAlarm, pAlarm)) return BadAlloc; /* see if alarm already triggered. NULL counter will not trigger * in CreateAlarm and sets alarm state to Inactive. */ if (!pTrigger->pSync) { pAlarm->state = XSyncAlarmInactive; /* XXX protocol change */ } else { SyncCounter *pCounter; if (!SyncCheckWarnIsCounter(pTrigger->pSync, WARN_INVALID_COUNTER_ALARM)) { FreeResource(stuff->id, RT_NONE); return BadAlloc; } pCounter = (SyncCounter *) pTrigger->pSync; if ((*pTrigger->CheckTrigger) (pTrigger, pCounter->value)) (*pTrigger->TriggerFired) (pTrigger); } return Success; } /* * ** Change Alarm */ static int ProcSyncChangeAlarm(ClientPtr client) { REQUEST(xSyncChangeAlarmReq); SyncAlarm *pAlarm; SyncCounter *pCounter = NULL; long vmask; int len, status; REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); status = dixLookupResourceByType((void **) &pAlarm, stuff->alarm, RTAlarm, client, DixWriteAccess); if (status != Success) return status; vmask = stuff->valueMask; len = client->req_len - bytes_to_int32(sizeof(xSyncChangeAlarmReq)); /* the "extra" call to Ones accounts for the presence of 64 bit values */ if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue | XSyncCADelta)))) return BadLength; if ((status = SyncChangeAlarmAttributes(client, pAlarm, vmask, (CARD32 *) &stuff[1])) != Success) return status; if (SyncCheckWarnIsCounter(pAlarm->trigger.pSync, WARN_INVALID_COUNTER_ALARM)) pCounter = (SyncCounter *) pAlarm->trigger.pSync; /* see if alarm already triggered. NULL counter WILL trigger * in ChangeAlarm. */ if (!pCounter || (*pAlarm->trigger.CheckTrigger) (&pAlarm->trigger, pCounter->value)) { (*pAlarm->trigger.TriggerFired) (&pAlarm->trigger); } return Success; } static int ProcSyncQueryAlarm(ClientPtr client) { REQUEST(xSyncQueryAlarmReq); SyncAlarm *pAlarm; xSyncQueryAlarmReply rep; SyncTrigger *pTrigger; int rc; REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); rc = dixLookupResourceByType((void **) &pAlarm, stuff->alarm, RTAlarm, client, DixReadAccess); if (rc != Success) return rc; pTrigger = &pAlarm->trigger; rep = (xSyncQueryAlarmReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)), .counter = (pTrigger->pSync) ? pTrigger->pSync->id : None, #if 0 /* XXX unclear what to do, depends on whether relative value-types * are "consumed" immediately and are considered absolute from then * on. */ .value_type = pTrigger->value_type, .wait_value_hi = pTrigger->wait_value >> 32, .wait_value_lo = pTrigger->wait_value, #else .value_type = XSyncAbsolute, .wait_value_hi = pTrigger->test_value >> 32, .wait_value_lo = pTrigger->test_value, #endif .test_type = pTrigger->test_type, .delta_hi = pAlarm->delta >> 32, .delta_lo = pAlarm->delta, .events = pAlarm->events, .state = pAlarm->state }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.counter); swapl(&rep.wait_value_hi); swapl(&rep.wait_value_lo); swapl(&rep.test_type); swapl(&rep.delta_hi); swapl(&rep.delta_lo); } WriteToClient(client, sizeof(xSyncQueryAlarmReply), &rep); return Success; } static int ProcSyncDestroyAlarm(ClientPtr client) { SyncAlarm *pAlarm; int rc; REQUEST(xSyncDestroyAlarmReq); REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); rc = dixLookupResourceByType((void **) &pAlarm, stuff->alarm, RTAlarm, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->alarm, RT_NONE); return Success; } static int ProcSyncCreateFence(ClientPtr client) { REQUEST(xSyncCreateFenceReq); DrawablePtr pDraw; SyncFence *pFence; int rc; REQUEST_SIZE_MATCH(xSyncCreateFenceReq); rc = dixLookupDrawable(&pDraw, stuff->d, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; LEGAL_NEW_RESOURCE(stuff->fid, client); if (!(pFence = (SyncFence *) SyncCreate(client, stuff->fid, SYNC_FENCE))) return BadAlloc; miSyncInitFence(pDraw->pScreen, pFence, stuff->initially_triggered); return Success; } static int FreeFence(void *obj, XID id) { SyncFence *pFence = (SyncFence *) obj; miSyncDestroyFence(pFence); return Success; } int SyncVerifyFence(SyncFence ** ppSyncFence, XID fid, ClientPtr client, Mask mode) { int rc = dixLookupResourceByType((void **) ppSyncFence, fid, RTFence, client, mode); if (rc != Success) client->errorValue = fid; return rc; } static int ProcSyncTriggerFence(ClientPtr client) { REQUEST(xSyncTriggerFenceReq); SyncFence *pFence; int rc; REQUEST_SIZE_MATCH(xSyncTriggerFenceReq); rc = dixLookupResourceByType((void **) &pFence, stuff->fid, RTFence, client, DixWriteAccess); if (rc != Success) return rc; miSyncTriggerFence(pFence); return Success; } static int ProcSyncResetFence(ClientPtr client) { REQUEST(xSyncResetFenceReq); SyncFence *pFence; int rc; REQUEST_SIZE_MATCH(xSyncResetFenceReq); rc = dixLookupResourceByType((void **) &pFence, stuff->fid, RTFence, client, DixWriteAccess); if (rc != Success) return rc; if (pFence->funcs.CheckTriggered(pFence) != TRUE) return BadMatch; pFence->funcs.Reset(pFence); return Success; } static int ProcSyncDestroyFence(ClientPtr client) { REQUEST(xSyncDestroyFenceReq); SyncFence *pFence; int rc; REQUEST_SIZE_MATCH(xSyncDestroyFenceReq); rc = dixLookupResourceByType((void **) &pFence, stuff->fid, RTFence, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->fid, RT_NONE); return Success; } static int ProcSyncQueryFence(ClientPtr client) { REQUEST(xSyncQueryFenceReq); xSyncQueryFenceReply rep; SyncFence *pFence; int rc; REQUEST_SIZE_MATCH(xSyncQueryFenceReq); rc = dixLookupResourceByType((void **) &pFence, stuff->fid, RTFence, client, DixReadAccess); if (rc != Success) return rc; rep = (xSyncQueryFenceReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .triggered = pFence->funcs.CheckTriggered(pFence) }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xSyncQueryFenceReply), &rep); return Success; } static int ProcSyncAwaitFence(ClientPtr client) { REQUEST(xSyncAwaitFenceReq); SyncAwaitUnion *pAwaitUnion; SyncAwait *pAwait; /* Use CARD32 rather than XSyncFence because XIDs are hard-coded to * CARD32 in protocol definitions */ CARD32 *pProtocolFences; int status; int len; int items; int i; REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq); len = client->req_len << 2; len -= sz_xSyncAwaitFenceReq; items = len / sizeof(CARD32); if (items * sizeof(CARD32) != len) { return BadLength; } if (items == 0) { client->errorValue = items; return BadValue; } if (!(pAwaitUnion = SyncAwaitPrologue(client, items))) return BadAlloc; /* don't need to do any more memory allocation for this request! */ pProtocolFences = (CARD32 *) &stuff[1]; pAwait = &(pAwaitUnion + 1)->await; /* skip over header */ for (i = 0; i < items; i++, pProtocolFences++, pAwait++) { if (*pProtocolFences == None) { /* this should take care of removing any triggers created by * this request that have already been registered on sync objects */ FreeResource(pAwaitUnion->header.delete_id, RT_NONE); client->errorValue = *pProtocolFences; return SyncErrorBase + XSyncBadFence; } pAwait->trigger.pSync = NULL; /* Provide acceptable values for these unused fields to * satisfy SyncInitTrigger's validation logic */ pAwait->trigger.value_type = XSyncAbsolute; pAwait->trigger.wait_value = 0; pAwait->trigger.test_type = 0; status = SyncInitTrigger(client, &pAwait->trigger, *pProtocolFences, RTFence, XSyncCAAllTrigger); if (status != Success) { /* this should take care of removing any triggers created by * this request that have already been registered on sync objects */ FreeResource(pAwaitUnion->header.delete_id, RT_NONE); return status; } /* this is not a mistake -- same function works for both cases */ pAwait->trigger.TriggerFired = SyncAwaitTriggerFired; pAwait->trigger.CounterDestroyed = SyncAwaitTriggerFired; /* event_threshold is unused for fence syncs */ pAwait->event_threshold = 0; pAwait->pHeader = &pAwaitUnion->header; pAwaitUnion->header.num_waitconditions++; } SyncAwaitEpilogue(client, items, pAwaitUnion); return Success; } /* * ** Given an extension request, call the appropriate request procedure */ static int ProcSyncDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_SyncInitialize: return ProcSyncInitialize(client); case X_SyncListSystemCounters: return ProcSyncListSystemCounters(client); case X_SyncCreateCounter: return ProcSyncCreateCounter(client); case X_SyncSetCounter: return ProcSyncSetCounter(client); case X_SyncChangeCounter: return ProcSyncChangeCounter(client); case X_SyncQueryCounter: return ProcSyncQueryCounter(client); case X_SyncDestroyCounter: return ProcSyncDestroyCounter(client); case X_SyncAwait: return ProcSyncAwait(client); case X_SyncCreateAlarm: return ProcSyncCreateAlarm(client); case X_SyncChangeAlarm: return ProcSyncChangeAlarm(client); case X_SyncQueryAlarm: return ProcSyncQueryAlarm(client); case X_SyncDestroyAlarm: return ProcSyncDestroyAlarm(client); case X_SyncSetPriority: return ProcSyncSetPriority(client); case X_SyncGetPriority: return ProcSyncGetPriority(client); case X_SyncCreateFence: return ProcSyncCreateFence(client); case X_SyncTriggerFence: return ProcSyncTriggerFence(client); case X_SyncResetFence: return ProcSyncResetFence(client); case X_SyncDestroyFence: return ProcSyncDestroyFence(client); case X_SyncQueryFence: return ProcSyncQueryFence(client); case X_SyncAwaitFence: return ProcSyncAwaitFence(client); default: return BadRequest; } } /* * Boring Swapping stuff ... */ static int _X_COLD SProcSyncInitialize(ClientPtr client) { REQUEST(xSyncInitializeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncInitializeReq); return ProcSyncInitialize(client); } static int _X_COLD SProcSyncListSystemCounters(ClientPtr client) { REQUEST(xSyncListSystemCountersReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncListSystemCountersReq); return ProcSyncListSystemCounters(client); } static int _X_COLD SProcSyncCreateCounter(ClientPtr client) { REQUEST(xSyncCreateCounterReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncCreateCounterReq); swapl(&stuff->cid); swapl(&stuff->initial_value_lo); swapl(&stuff->initial_value_hi); return ProcSyncCreateCounter(client); } static int _X_COLD SProcSyncSetCounter(ClientPtr client) { REQUEST(xSyncSetCounterReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncSetCounterReq); swapl(&stuff->cid); swapl(&stuff->value_lo); swapl(&stuff->value_hi); return ProcSyncSetCounter(client); } static int _X_COLD SProcSyncChangeCounter(ClientPtr client) { REQUEST(xSyncChangeCounterReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncChangeCounterReq); swapl(&stuff->cid); swapl(&stuff->value_lo); swapl(&stuff->value_hi); return ProcSyncChangeCounter(client); } static int _X_COLD SProcSyncQueryCounter(ClientPtr client) { REQUEST(xSyncQueryCounterReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncQueryCounterReq); swapl(&stuff->counter); return ProcSyncQueryCounter(client); } static int _X_COLD SProcSyncDestroyCounter(ClientPtr client) { REQUEST(xSyncDestroyCounterReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); swapl(&stuff->counter); return ProcSyncDestroyCounter(client); } static int _X_COLD SProcSyncAwait(ClientPtr client) { REQUEST(xSyncAwaitReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncAwaitReq); SwapRestL(stuff); return ProcSyncAwait(client); } static int _X_COLD SProcSyncCreateAlarm(ClientPtr client) { REQUEST(xSyncCreateAlarmReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncCreateAlarmReq); swapl(&stuff->id); swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncCreateAlarm(client); } static int _X_COLD SProcSyncChangeAlarm(ClientPtr client) { REQUEST(xSyncChangeAlarmReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); swapl(&stuff->alarm); swapl(&stuff->valueMask); SwapRestL(stuff); return ProcSyncChangeAlarm(client); } static int _X_COLD SProcSyncQueryAlarm(ClientPtr client) { REQUEST(xSyncQueryAlarmReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); swapl(&stuff->alarm); return ProcSyncQueryAlarm(client); } static int _X_COLD SProcSyncDestroyAlarm(ClientPtr client) { REQUEST(xSyncDestroyAlarmReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); swapl(&stuff->alarm); return ProcSyncDestroyAlarm(client); } static int _X_COLD SProcSyncSetPriority(ClientPtr client) { REQUEST(xSyncSetPriorityReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncSetPriorityReq); swapl(&stuff->id); swapl(&stuff->priority); return ProcSyncSetPriority(client); } static int _X_COLD SProcSyncGetPriority(ClientPtr client) { REQUEST(xSyncGetPriorityReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncGetPriorityReq); swapl(&stuff->id); return ProcSyncGetPriority(client); } static int _X_COLD SProcSyncCreateFence(ClientPtr client) { REQUEST(xSyncCreateFenceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncCreateFenceReq); swapl(&stuff->d); swapl(&stuff->fid); return ProcSyncCreateFence(client); } static int _X_COLD SProcSyncTriggerFence(ClientPtr client) { REQUEST(xSyncTriggerFenceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncTriggerFenceReq); swapl(&stuff->fid); return ProcSyncTriggerFence(client); } static int _X_COLD SProcSyncResetFence(ClientPtr client) { REQUEST(xSyncResetFenceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncResetFenceReq); swapl(&stuff->fid); return ProcSyncResetFence(client); } static int _X_COLD SProcSyncDestroyFence(ClientPtr client) { REQUEST(xSyncDestroyFenceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncDestroyFenceReq); swapl(&stuff->fid); return ProcSyncDestroyFence(client); } static int _X_COLD SProcSyncQueryFence(ClientPtr client) { REQUEST(xSyncQueryFenceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSyncQueryFenceReq); swapl(&stuff->fid); return ProcSyncQueryFence(client); } static int _X_COLD SProcSyncAwaitFence(ClientPtr client) { REQUEST(xSyncAwaitFenceReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSyncAwaitFenceReq); SwapRestL(stuff); return ProcSyncAwaitFence(client); } static int _X_COLD SProcSyncDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_SyncInitialize: return SProcSyncInitialize(client); case X_SyncListSystemCounters: return SProcSyncListSystemCounters(client); case X_SyncCreateCounter: return SProcSyncCreateCounter(client); case X_SyncSetCounter: return SProcSyncSetCounter(client); case X_SyncChangeCounter: return SProcSyncChangeCounter(client); case X_SyncQueryCounter: return SProcSyncQueryCounter(client); case X_SyncDestroyCounter: return SProcSyncDestroyCounter(client); case X_SyncAwait: return SProcSyncAwait(client); case X_SyncCreateAlarm: return SProcSyncCreateAlarm(client); case X_SyncChangeAlarm: return SProcSyncChangeAlarm(client); case X_SyncQueryAlarm: return SProcSyncQueryAlarm(client); case X_SyncDestroyAlarm: return SProcSyncDestroyAlarm(client); case X_SyncSetPriority: return SProcSyncSetPriority(client); case X_SyncGetPriority: return SProcSyncGetPriority(client); case X_SyncCreateFence: return SProcSyncCreateFence(client); case X_SyncTriggerFence: return SProcSyncTriggerFence(client); case X_SyncResetFence: return SProcSyncResetFence(client); case X_SyncDestroyFence: return SProcSyncDestroyFence(client); case X_SyncQueryFence: return SProcSyncQueryFence(client); case X_SyncAwaitFence: return SProcSyncAwaitFence(client); default: return BadRequest; } } /* * Event Swapping */ static void _X_COLD SCounterNotifyEvent(xSyncCounterNotifyEvent * from, xSyncCounterNotifyEvent * to) { to->type = from->type; to->kind = from->kind; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->counter, to->counter); cpswapl(from->wait_value_lo, to->wait_value_lo); cpswapl(from->wait_value_hi, to->wait_value_hi); cpswapl(from->counter_value_lo, to->counter_value_lo); cpswapl(from->counter_value_hi, to->counter_value_hi); cpswapl(from->time, to->time); cpswaps(from->count, to->count); to->destroyed = from->destroyed; } static void _X_COLD SAlarmNotifyEvent(xSyncAlarmNotifyEvent * from, xSyncAlarmNotifyEvent * to) { to->type = from->type; to->kind = from->kind; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->alarm, to->alarm); cpswapl(from->counter_value_lo, to->counter_value_lo); cpswapl(from->counter_value_hi, to->counter_value_hi); cpswapl(from->alarm_value_lo, to->alarm_value_lo); cpswapl(from->alarm_value_hi, to->alarm_value_hi); cpswapl(from->time, to->time); to->state = from->state; } /* * ** Close everything down. ** This is fairly simple for now. */ /* ARGSUSED */ static void SyncResetProc(ExtensionEntry * extEntry) { RTCounter = 0; } /* * ** Initialise the extension. */ void SyncExtensionInit(void) { ExtensionEntry *extEntry; int s; for (s = 0; s < screenInfo.numScreens; s++) miSyncSetup(screenInfo.screens[s]); RTCounter = CreateNewResourceType(FreeCounter, "SyncCounter"); xorg_list_init(&SysCounterList); RTAlarm = CreateNewResourceType(FreeAlarm, "SyncAlarm"); RTAwait = CreateNewResourceType(FreeAwait, "SyncAwait"); RTFence = CreateNewResourceType(FreeFence, "SyncFence"); if (RTAwait) RTAwait |= RC_NEVERRETAIN; RTAlarmClient = CreateNewResourceType(FreeAlarmClient, "SyncAlarmClient"); if (RTAlarmClient) RTAlarmClient |= RC_NEVERRETAIN; if (RTCounter == 0 || RTAwait == 0 || RTAlarm == 0 || RTAlarmClient == 0 || (extEntry = AddExtension(SYNC_NAME, XSyncNumberEvents, XSyncNumberErrors, ProcSyncDispatch, SProcSyncDispatch, SyncResetProc, StandardMinorOpcode)) == NULL) { ErrorF("Sync Extension %d.%d failed to Initialise\n", SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); return; } SyncEventBase = extEntry->eventBase; SyncErrorBase = extEntry->errorBase; EventSwapVector[SyncEventBase + XSyncCounterNotify] = (EventSwapPtr) SCounterNotifyEvent; EventSwapVector[SyncEventBase + XSyncAlarmNotify] = (EventSwapPtr) SAlarmNotifyEvent; SetResourceTypeErrorValue(RTCounter, SyncErrorBase + XSyncBadCounter); SetResourceTypeErrorValue(RTAlarm, SyncErrorBase + XSyncBadAlarm); SetResourceTypeErrorValue(RTFence, SyncErrorBase + XSyncBadFence); /* * Although SERVERTIME is implemented by the OS layer, we initialise it * here because doing it in OsInit() is too early. The resource database * is not initialised when OsInit() is called. This is just about OK * because there is always a servertime counter. */ SyncInitServerTime(); SyncInitIdleTime(); #ifdef DEBUG fprintf(stderr, "Sync Extension %d.%d\n", SYNC_MAJOR_VERSION, SYNC_MINOR_VERSION); #endif } /* * ***** SERVERTIME implementation - should go in its own file in OS directory? */ static void *ServertimeCounter; static int64_t Now; static int64_t *pnext_time; static void GetTime(void) { unsigned long millis = GetTimeInMillis(); unsigned long maxis = Now >> 32; if (millis < (Now & 0xffffffff)) maxis++; Now = ((int64_t)maxis << 32) | millis; } /* *** Server Block Handler *** code inspired by multibuffer extension (now deprecated) */ /*ARGSUSED*/ static void ServertimeBlockHandler(void *env, void *wt) { unsigned long timeout; if (pnext_time) { GetTime(); if (Now >= *pnext_time) { timeout = 0; } else { timeout = *pnext_time - Now; } AdjustWaitForDelay(wt, timeout); /* os/utils.c */ } } /* *** Wakeup Handler */ /*ARGSUSED*/ static void ServertimeWakeupHandler(void *env, int rc) { if (pnext_time) { GetTime(); if (Now >= *pnext_time) { SyncChangeCounter(ServertimeCounter, Now); } } } static void ServertimeQueryValue(void *pCounter, int64_t *pValue_return) { GetTime(); *pValue_return = Now; } static void ServertimeBracketValues(void *pCounter, int64_t *pbracket_less, int64_t *pbracket_greater) { if (!pnext_time && pbracket_greater) { RegisterBlockAndWakeupHandlers(ServertimeBlockHandler, ServertimeWakeupHandler, NULL); } else if (pnext_time && !pbracket_greater) { RemoveBlockAndWakeupHandlers(ServertimeBlockHandler, ServertimeWakeupHandler, NULL); } pnext_time = pbracket_greater; } static void SyncInitServerTime(void) { int64_t resolution = 4; Now = GetTimeInMillis(); ServertimeCounter = SyncCreateSystemCounter("SERVERTIME", Now, resolution, XSyncCounterNeverDecreases, ServertimeQueryValue, ServertimeBracketValues); pnext_time = NULL; } /* * IDLETIME implementation */ typedef struct { int64_t *value_less; int64_t *value_greater; int deviceid; } IdleCounterPriv; static void IdleTimeQueryValue(void *pCounter, int64_t *pValue_return) { int deviceid; CARD32 idle; if (pCounter) { SyncCounter *counter = pCounter; IdleCounterPriv *priv = SysCounterGetPrivate(counter); deviceid = priv->deviceid; } else deviceid = XIAllDevices; idle = GetTimeInMillis() - LastEventTime(deviceid).milliseconds; *pValue_return = idle; } static void IdleTimeBlockHandler(void *pCounter, void *wt) { SyncCounter *counter = pCounter; IdleCounterPriv *priv = SysCounterGetPrivate(counter); int64_t *less = priv->value_less; int64_t *greater = priv->value_greater; int64_t idle, old_idle; SyncTriggerList *list = counter->sync.pTriglist; SyncTrigger *trig; if (!less && !greater) return; old_idle = counter->value; IdleTimeQueryValue(counter, &idle); counter->value = idle; /* push, so CheckTrigger works */ /** * There's an indefinite amount of time between ProcessInputEvents() * where the idle time is reset and the time we actually get here. idle * may be past the lower bracket if we dawdled with the events, so * check for whether we did reset and bomb out of select immediately. */ if (less && idle > *less && LastEventTimeWasReset(priv->deviceid)) { AdjustWaitForDelay(wt, 0); } else if (less && idle <= *less) { /* * We've been idle for less than the threshold value, and someone * wants to know about that, but now we need to know whether they * want level or edge trigger. Check the trigger list against the * current idle time, and if any succeed, bomb out of select() * immediately so we can reschedule. */ for (list = counter->sync.pTriglist; list; list = list->next) { trig = list->pTrigger; if (trig->CheckTrigger(trig, old_idle)) { AdjustWaitForDelay(wt, 0); break; } } /* * We've been called exactly on the idle time, but we have a * NegativeTransition trigger which requires a transition from an * idle time greater than this. Schedule a wakeup for the next * millisecond so we won't miss a transition. */ if (idle == *less) AdjustWaitForDelay(wt, 1); } else if (greater) { /* * There's a threshold in the positive direction. If we've been * idle less than it, schedule a wakeup for sometime in the future. * If we've been idle more than it, and someone wants to know about * that level-triggered, schedule an immediate wakeup. */ if (idle < *greater) { AdjustWaitForDelay(wt, *greater - idle); } else { for (list = counter->sync.pTriglist; list; list = list->next) { trig = list->pTrigger; if (trig->CheckTrigger(trig, old_idle)) { AdjustWaitForDelay(wt, 0); break; } } } } counter->value = old_idle; /* pop */ } static void IdleTimeCheckBrackets(SyncCounter *counter, int64_t idle, int64_t *less, int64_t *greater) { if ((greater && idle >= *greater) || (less && idle <= *less)) { SyncChangeCounter(counter, idle); } else SyncUpdateCounter(counter, idle); } static void IdleTimeWakeupHandler(void *pCounter, int rc) { SyncCounter *counter = pCounter; IdleCounterPriv *priv = SysCounterGetPrivate(counter); int64_t *less = priv->value_less; int64_t *greater = priv->value_greater; int64_t idle; if (!less && !greater) return; IdleTimeQueryValue(pCounter, &idle); /* There is no guarantee for the WakeupHandler to be called within a specific timeframe. Idletime may go to 0, but by the time we get here, it may be non-zero and alarms for a pos. transition on 0 won't get triggered. https://bugs.freedesktop.org/show_bug.cgi?id=70476 */ if (LastEventTimeWasReset(priv->deviceid)) { LastEventTimeToggleResetFlag(priv->deviceid, FALSE); if (idle != 0) { IdleTimeCheckBrackets(counter, 0, less, greater); less = priv->value_less; greater = priv->value_greater; } } IdleTimeCheckBrackets(counter, idle, less, greater); } static void IdleTimeBracketValues(void *pCounter, int64_t *pbracket_less, int64_t *pbracket_greater) { SyncCounter *counter = pCounter; IdleCounterPriv *priv = SysCounterGetPrivate(counter); int64_t *less = priv->value_less; int64_t *greater = priv->value_greater; Bool registered = (less || greater); if (registered && !pbracket_less && !pbracket_greater) { RemoveBlockAndWakeupHandlers(IdleTimeBlockHandler, IdleTimeWakeupHandler, pCounter); } else if (!registered && (pbracket_less || pbracket_greater)) { /* Reset flag must be zero so we don't force a idle timer reset on the first wakeup */ LastEventTimeToggleResetAll(FALSE); RegisterBlockAndWakeupHandlers(IdleTimeBlockHandler, IdleTimeWakeupHandler, pCounter); } priv->value_greater = pbracket_greater; priv->value_less = pbracket_less; } static SyncCounter* init_system_idle_counter(const char *name, int deviceid) { int64_t resolution = 4; int64_t idle; SyncCounter *idle_time_counter; IdleTimeQueryValue(NULL, &idle); idle_time_counter = SyncCreateSystemCounter(name, idle, resolution, XSyncCounterUnrestricted, IdleTimeQueryValue, IdleTimeBracketValues); if (idle_time_counter != NULL) { IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv)); priv->value_less = priv->value_greater = NULL; priv->deviceid = deviceid; idle_time_counter->pSysCounterInfo->private = priv; } return idle_time_counter; } static void SyncInitIdleTime(void) { init_system_idle_counter("IDLETIME", XIAllDevices); } SyncCounter* SyncInitDeviceIdleTime(DeviceIntPtr dev) { char timer_name[64]; sprintf(timer_name, "DEVICEIDLETIME %d", dev->id); return init_system_idle_counter(timer_name, dev->id); } void SyncRemoveDeviceIdleTime(SyncCounter *counter) { /* FreeAllResources() frees all system counters before the devices are shut down, check if there are any left before freeing the device's counter */ if (counter && !xorg_list_is_empty(&SysCounterList)) xorg_list_del(&counter->pSysCounterInfo->entry); } xorg-server-21.1.16/Xext/syncsrv.h0000644000175000017500000001203214757411105012441 /* Copyright 1991, 1993, 1994, 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 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, and Olivetti Research Limited, Cambridge, England. 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 names of Digital or Olivetti not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THEY 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. ******************************************************************/ #ifndef _SYNCSRV_H_ #define _SYNCSRV_H_ #include "list.h" #include "misync.h" #include "misyncstr.h" /* * The System Counter interface */ typedef enum { XSyncCounterNeverChanges, XSyncCounterNeverIncreases, XSyncCounterNeverDecreases, XSyncCounterUnrestricted } SyncCounterType; typedef void (*SyncSystemCounterQueryValue)(void *counter, int64_t *value_return ); typedef void (*SyncSystemCounterBracketValues)(void *counter, int64_t *pbracket_less, int64_t *pbracket_greater ); typedef struct _SysCounterInfo { SyncCounter *pCounter; char *name; int64_t resolution; int64_t bracket_greater; int64_t bracket_less; SyncCounterType counterType; /* how can this counter change */ SyncSystemCounterQueryValue QueryValue; SyncSystemCounterBracketValues BracketValues; void *private; struct xorg_list entry; } SysCounterInfo; typedef struct _SyncAlarmClientList { ClientPtr client; XID delete_id; struct _SyncAlarmClientList *next; } SyncAlarmClientList; typedef struct _SyncAlarm { SyncTrigger trigger; ClientPtr client; XSyncAlarm alarm_id; int64_t delta; int events; int state; SyncAlarmClientList *pEventClients; } SyncAlarm; typedef struct { ClientPtr client; CARD32 delete_id; int num_waitconditions; } SyncAwaitHeader; typedef struct { SyncTrigger trigger; int64_t event_threshold; SyncAwaitHeader *pHeader; } SyncAwait; typedef union { SyncAwaitHeader header; SyncAwait await; } SyncAwaitUnion; extern SyncCounter* SyncCreateSystemCounter(const char *name, int64_t initial_value, int64_t resolution, SyncCounterType counterType, SyncSystemCounterQueryValue QueryValue, SyncSystemCounterBracketValues BracketValues ); extern void SyncChangeCounter(SyncCounter *pCounter, int64_t new_value); extern void SyncDestroySystemCounter(void *pCounter); extern SyncCounter *SyncInitDeviceIdleTime(DeviceIntPtr dev); extern void SyncRemoveDeviceIdleTime(SyncCounter *counter); int SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered); int SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *fence); void SyncDeleteTriggerFromSyncObject(SyncTrigger * pTrigger); int SyncAddTriggerToSyncObject(SyncTrigger * pTrigger); #endif /* _SYNCSRV_H_ */ xorg-server-21.1.16/Xext/xcmisc.c0000644000175000017500000001207714757411105012224 /* Copyright 1993, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" #include #include "extinit.h" #include static int ProcXCMiscGetVersion(ClientPtr client) { xXCMiscGetVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = XCMiscMajorVersion, .minorVersion = XCMiscMinorVersion }; REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXCMiscGetVersionReply), &rep); return Success; } static int ProcXCMiscGetXIDRange(ClientPtr client) { xXCMiscGetXIDRangeReply rep; XID min_id, max_id; REQUEST_SIZE_MATCH(xXCMiscGetXIDRangeReq); GetXIDRange(client->index, FALSE, &min_id, &max_id); rep = (xXCMiscGetXIDRangeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .start_id = min_id, .count = max_id - min_id + 1 }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.start_id); swapl(&rep.count); } WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), &rep); return Success; } static int ProcXCMiscGetXIDList(ClientPtr client) { REQUEST(xXCMiscGetXIDListReq); xXCMiscGetXIDListReply rep; XID *pids; unsigned int count; REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); if (stuff->count > UINT32_MAX / sizeof(XID)) return BadAlloc; pids = xallocarray(stuff->count, sizeof(XID)); if (!pids) { return BadAlloc; } count = GetXIDList(client, stuff->count, pids); rep = (xXCMiscGetXIDListReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = count, .count = count }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.count); } WriteToClient(client, sizeof(xXCMiscGetXIDListReply), &rep); if (count) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XID), pids); } free(pids); return Success; } static int ProcXCMiscDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XCMiscGetVersion: return ProcXCMiscGetVersion(client); case X_XCMiscGetXIDRange: return ProcXCMiscGetXIDRange(client); case X_XCMiscGetXIDList: return ProcXCMiscGetXIDList(client); default: return BadRequest; } } static int _X_COLD SProcXCMiscGetVersion(ClientPtr client) { REQUEST(xXCMiscGetVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXCMiscGetVersionReq); swaps(&stuff->majorVersion); swaps(&stuff->minorVersion); return ProcXCMiscGetVersion(client); } static int _X_COLD SProcXCMiscGetXIDRange(ClientPtr client) { REQUEST(xReq); swaps(&stuff->length); return ProcXCMiscGetXIDRange(client); } static int _X_COLD SProcXCMiscGetXIDList(ClientPtr client) { REQUEST(xXCMiscGetXIDListReq); REQUEST_SIZE_MATCH(xXCMiscGetXIDListReq); swaps(&stuff->length); swapl(&stuff->count); return ProcXCMiscGetXIDList(client); } static int _X_COLD SProcXCMiscDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XCMiscGetVersion: return SProcXCMiscGetVersion(client); case X_XCMiscGetXIDRange: return SProcXCMiscGetXIDRange(client); case X_XCMiscGetXIDList: return SProcXCMiscGetXIDList(client); default: return BadRequest; } } void XCMiscExtensionInit(void) { AddExtension(XCMiscExtensionName, 0, 0, ProcXCMiscDispatch, SProcXCMiscDispatch, NULL, StandardMinorOpcode); } xorg-server-21.1.16/Xext/xtest.c0000644000175000017500000004736014757411105012110 /* Copyright 1992, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "windowstr.h" #include "inputstr.h" #include "scrnintstr.h" #include "dixevents.h" #include "sleepuntil.h" #include "mi.h" #include "xkbsrv.h" #include "xkbstr.h" #include #include #include #include "exglobals.h" #include "mipointer.h" #include "xserver-properties.h" #include "exevents.h" #include "eventstr.h" #include "inpututils.h" #include "extinit.h" /* XTest events are sent during request processing and may be interrupted by * a SIGIO. We need a separate event list to avoid events overwriting each * other's memory. */ static InternalEvent *xtest_evlist; /** * xtestpointer * is the virtual pointer for XTest. It is the first slave * device of the VCP. * xtestkeyboard * is the virtual keyboard for XTest. It is the first slave * device of the VCK * * Neither of these devices can be deleted. */ DeviceIntPtr xtestpointer, xtestkeyboard; #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif static int XTestSwapFakeInput(ClientPtr /* client */ , xReq * /* req */ ); static int ProcXTestGetVersion(ClientPtr client) { xXTestGetVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = XTestMajorVersion, .minorVersion = XTestMinorVersion }; REQUEST_SIZE_MATCH(xXTestGetVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXTestGetVersionReply), &rep); return Success; } static int ProcXTestCompareCursor(ClientPtr client) { REQUEST(xXTestCompareCursorReq); xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; int rc; DeviceIntPtr ptr = PickPointer(client); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (!ptr) return BadAccess; if (stuff->cursor == None) pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) pCursor = GetSpriteCursor(ptr); else { rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor, RT_CURSOR, client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->cursor; return rc; } } rep = (xXTestCompareCursorReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .same = (wCursor(pWin) == pCursor) }; if (client->swapped) { swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xXTestCompareCursorReply), &rep); return Success; } static int ProcXTestFakeInput(ClientPtr client) { REQUEST(xXTestFakeInputReq); int nev, n, type, rc; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; Bool extension = FALSE; ValuatorMask mask; int valuators[MAX_VALUATORS] = { 0 }; int numValuators = 0; int firstValuator = 0; int nevents = 0; int i; int base = 0; int flags = 0; int need_ptr_update = 1; nev = (stuff->length << 2) - sizeof(xReq); if ((nev % sizeof(xEvent)) || !nev) return BadLength; nev /= sizeof(xEvent); UpdateCurrentTime(); ev = (xEvent *) &((xReq *) stuff)[1]; type = ev->u.u.type & 0177; if (type >= EXTENSION_EVENT_BASE) { extension = TRUE; /* check device */ rc = dixLookupDevice(&dev, stuff->deviceid & 0177, client, DixWriteAccess); if (rc != Success) { client->errorValue = stuff->deviceid & 0177; return rc; } /* check type */ type -= DeviceValuator; switch (type) { case XI_DeviceKeyPress: case XI_DeviceKeyRelease: if (!dev->key) { client->errorValue = ev->u.u.type; return BadValue; } break; case XI_DeviceButtonPress: case XI_DeviceButtonRelease: if (!dev->button) { client->errorValue = ev->u.u.type; return BadValue; } break; case XI_DeviceMotionNotify: if (!dev->valuator) { client->errorValue = ev->u.u.type; return BadValue; } break; case XI_ProximityIn: case XI_ProximityOut: if (!dev->proximity) { client->errorValue = ev->u.u.type; return BadValue; } break; default: client->errorValue = ev->u.u.type; return BadValue; } /* check validity */ if (nev == 1 && type == XI_DeviceMotionNotify) return BadLength; /* DevMotion must be followed by DevValuator */ if (type == XI_DeviceMotionNotify) { firstValuator = ((deviceValuator *) (ev + 1))->first_valuator; if (firstValuator > dev->valuator->numAxes) { client->errorValue = ev->u.u.type; return BadValue; } if (ev->u.u.detail == xFalse) flags |= POINTER_ABSOLUTE; } else { firstValuator = 0; flags |= POINTER_ABSOLUTE; } if (nev > 1 && !dev->valuator) { client->errorValue = firstValuator; return BadValue; } /* check validity of valuator events */ base = firstValuator; for (n = 1; n < nev; n++) { deviceValuator *dv = (deviceValuator *) (ev + n); if (dv->type != DeviceValuator) { client->errorValue = dv->type; return BadValue; } if (dv->first_valuator != base) { client->errorValue = dv->first_valuator; return BadValue; } switch (dv->num_valuators) { case 6: valuators[base + 5] = dv->valuator5; case 5: valuators[base + 4] = dv->valuator4; case 4: valuators[base + 3] = dv->valuator3; case 3: valuators[base + 2] = dv->valuator2; case 2: valuators[base + 1] = dv->valuator1; case 1: valuators[base] = dv->valuator0; break; default: client->errorValue = dv->num_valuators; return BadValue; } base += dv->num_valuators; numValuators += dv->num_valuators; if (firstValuator + numValuators > dev->valuator->numAxes) { client->errorValue = dv->num_valuators; return BadValue; } } type = type - XI_DeviceKeyPress + KeyPress; } else { if (nev != 1) return BadLength; switch (type) { case KeyPress: case KeyRelease: dev = PickKeyboard(client); break; case ButtonPress: case ButtonRelease: dev = PickPointer(client); break; case MotionNotify: dev = PickPointer(client); valuators[0] = ev->u.keyButtonPointer.rootX; valuators[1] = ev->u.keyButtonPointer.rootY; numValuators = 2; firstValuator = 0; if (ev->u.u.detail == xFalse) flags = POINTER_ABSOLUTE | POINTER_DESKTOP; break; default: client->errorValue = ev->u.u.type; return BadValue; } /* Technically the protocol doesn't allow for BadAccess here but * this can only happen when all MDs are disabled. */ if (!dev) return BadAccess; dev = GetXTestDevice(dev); } /* If the event has a time set, wait for it to pass */ if (ev->u.keyButtonPointer.time) { TimeStamp activateTime; CARD32 ms; activateTime = currentTime; ms = activateTime.milliseconds + ev->u.keyButtonPointer.time; if (ms < activateTime.milliseconds) activateTime.months++; activateTime.milliseconds = ms; ev->u.keyButtonPointer.time = 0; /* see mbuf.c:QueueDisplayRequest (from the deprecated Multibuffer * extension) for code similar to this */ if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) { return BadAlloc; } /* swap the request back so we can simply re-execute it */ if (client->swapped) { (void) XTestSwapFakeInput(client, (xReq *) stuff); swaps(&stuff->length); } ResetCurrentRequest(client); client->sequence--; return Success; } switch (type) { case KeyPress: case KeyRelease: if (!dev->key) return BadDevice; if (ev->u.u.detail < dev->key->xkbInfo->desc->min_key_code || ev->u.u.detail > dev->key->xkbInfo->desc->max_key_code) { client->errorValue = ev->u.u.detail; return BadValue; } need_ptr_update = 0; break; case MotionNotify: if (!dev->valuator) return BadDevice; if (!(extension || ev->u.keyButtonPointer.root == None)) { rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, DixGetAttrAccess); if (rc != Success) return rc; if (root->parent) { client->errorValue = ev->u.keyButtonPointer.root; return BadValue; } /* Add the root window's offset to the valuators */ if ((flags & POINTER_ABSOLUTE) && firstValuator <= 1 && numValuators > 0) { if (firstValuator == 0) valuators[0] += root->drawable.pScreen->x; if (firstValuator < 2 && firstValuator + numValuators > 1) valuators[1 - firstValuator] += root->drawable.pScreen->y; } } if (ev->u.u.detail != xTrue && ev->u.u.detail != xFalse) { client->errorValue = ev->u.u.detail; return BadValue; } /* FIXME: Xinerama! */ break; case ButtonPress: case ButtonRelease: if (!dev->button) return BadDevice; if (!ev->u.u.detail || ev->u.u.detail > dev->button->numButtons) { client->errorValue = ev->u.u.detail; return BadValue; } break; } if (screenIsSaved == SCREEN_SAVER_ON) dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset); switch (type) { case MotionNotify: valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); nevents = GetPointerEvents(xtest_evlist, dev, type, 0, flags, &mask); break; case ButtonPress: case ButtonRelease: valuator_mask_set_range(&mask, firstValuator, numValuators, valuators); nevents = GetPointerEvents(xtest_evlist, dev, type, ev->u.u.detail, flags, &mask); break; case KeyPress: case KeyRelease: nevents = GetKeyboardEvents(xtest_evlist, dev, type, ev->u.u.detail); break; } for (i = 0; i < nevents; i++) mieqProcessDeviceEvent(dev, &xtest_evlist[i], miPointerGetScreen(inputInfo.pointer)); if (need_ptr_update) miPointerUpdateSprite(dev); return Success; } static int ProcXTestGrabControl(ClientPtr client) { REQUEST(xXTestGrabControlReq); REQUEST_SIZE_MATCH(xXTestGrabControlReq); if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse)) { client->errorValue = stuff->impervious; return BadValue; } if (stuff->impervious) MakeClientGrabImpervious(client); else MakeClientGrabPervious(client); return Success; } static int ProcXTestDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XTestGetVersion: return ProcXTestGetVersion(client); case X_XTestCompareCursor: return ProcXTestCompareCursor(client); case X_XTestFakeInput: return ProcXTestFakeInput(client); case X_XTestGrabControl: return ProcXTestGrabControl(client); default: return BadRequest; } } static int _X_COLD SProcXTestGetVersion(ClientPtr client) { REQUEST(xXTestGetVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGetVersionReq); swaps(&stuff->minorVersion); return ProcXTestGetVersion(client); } static int _X_COLD SProcXTestCompareCursor(ClientPtr client) { REQUEST(xXTestCompareCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestCompareCursorReq); swapl(&stuff->window); swapl(&stuff->cursor); return ProcXTestCompareCursor(client); } static int _X_COLD XTestSwapFakeInput(ClientPtr client, xReq * req) { int nev; xEvent *ev; xEvent sev; EventSwapPtr proc; nev = ((req->length << 2) - sizeof(xReq)) / sizeof(xEvent); for (ev = (xEvent *) &req[1]; --nev >= 0; ev++) { int evtype = ev->u.u.type & 0177; /* Swap event */ proc = EventSwapVector[evtype]; /* no swapping proc; invalid event type? */ if (!proc || proc == NotImplemented || evtype == GenericEvent) { client->errorValue = ev->u.u.type; return BadValue; } (*proc) (ev, &sev); *ev = sev; } return Success; } static int _X_COLD SProcXTestFakeInput(ClientPtr client) { int n; REQUEST(xReq); swaps(&stuff->length); n = XTestSwapFakeInput(client, stuff); if (n != Success) return n; return ProcXTestFakeInput(client); } static int _X_COLD SProcXTestGrabControl(ClientPtr client) { REQUEST(xXTestGrabControlReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXTestGrabControlReq); return ProcXTestGrabControl(client); } static int _X_COLD SProcXTestDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XTestGetVersion: return SProcXTestGetVersion(client); case X_XTestCompareCursor: return SProcXTestCompareCursor(client); case X_XTestFakeInput: return SProcXTestFakeInput(client); case X_XTestGrabControl: return SProcXTestGrabControl(client); default: return BadRequest; } } /** * Allocate an virtual slave device for xtest events, this * is a slave device to inputInfo master devices */ void InitXTestDevices(void) { if (AllocXTestDevice(serverClient, "Virtual core", &xtestpointer, &xtestkeyboard, inputInfo.pointer, inputInfo.keyboard) != Success) FatalError("Failed to allocate XTest devices"); if (ActivateDevice(xtestpointer, TRUE) != Success || ActivateDevice(xtestkeyboard, TRUE) != Success) FatalError("Failed to activate XTest core devices."); if (!EnableDevice(xtestpointer, TRUE) || !EnableDevice(xtestkeyboard, TRUE)) FatalError("Failed to enable XTest core devices."); AttachDevice(NULL, xtestpointer, inputInfo.pointer); AttachDevice(NULL, xtestkeyboard, inputInfo.keyboard); } /** * Don't allow changing the XTest property. */ static int DeviceSetXTestProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly) { if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE)) return BadAccess; return Success; } /** * Allocate a device pair that is initialised as a slave * device with properties that identify the devices as belonging * to XTest subsystem. * This only creates the pair, Activate/Enable Device * still need to be called. */ int AllocXTestDevice(ClientPtr client, const char *name, DeviceIntPtr *ptr, DeviceIntPtr *keybd, DeviceIntPtr master_ptr, DeviceIntPtr master_keybd) { int retval; char *xtestname; char dummy = 1; if (asprintf(&xtestname, "%s XTEST", name) == -1) return BadAlloc; retval = AllocDevicePair(client, xtestname, ptr, keybd, CorePointerProc, CoreKeyboardProc, FALSE); if (retval == Success) { (*ptr)->xtest_master_id = master_ptr->id; (*keybd)->xtest_master_id = master_keybd->id; XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), XA_INTEGER, 8, PropModeReplace, 1, &dummy, FALSE); XISetDevicePropertyDeletable(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE); XIRegisterPropertyHandler(*ptr, DeviceSetXTestProperty, NULL, NULL); XIChangeDeviceProperty(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), XA_INTEGER, 8, PropModeReplace, 1, &dummy, FALSE); XISetDevicePropertyDeletable(*keybd, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), FALSE); XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL); } free(xtestname); return retval; } /** * If master is NULL, return TRUE if the given device is an xtest device or * FALSE otherwise. * If master is not NULL, return TRUE if the given device is this master's * xtest device. */ BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master) { if (IsMaster(dev)) return FALSE; /* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest * device */ if (master) return dev->xtest_master_id == master->id; return dev->xtest_master_id != 0; } /** * @return The X Test virtual device for the given master. */ DeviceIntPtr GetXTestDevice(DeviceIntPtr master) { DeviceIntPtr it; for (it = inputInfo.devices; it; it = it->next) { if (IsXTestDevice(it, master)) return it; } /* This only happens if master is a slave device. don't do that */ return NULL; } static void XTestExtensionTearDown(ExtensionEntry * e) { FreeEventList(xtest_evlist, GetMaximumEventsNum()); xtest_evlist = NULL; } void XTestExtensionInit(void) { AddExtension(XTestExtensionName, 0, 0, ProcXTestDispatch, SProcXTestDispatch, XTestExtensionTearDown, StandardMinorOpcode); xtest_evlist = InitEventList(GetMaximumEventsNum()); } xorg-server-21.1.16/Xext/shm.c0000644000175000017500000013253614757411105011530 /************************************************************ Copyright 1989, 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. ********************************************************/ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #define SHM #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #ifdef HAVE_MEMFD_CREATE #include #endif #include #include #include #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "resource.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "gcstruct.h" #include "extnsionst.h" #include "servermd.h" #include "shmint.h" #include "xace.h" #include #include #include #include "protocol-versions.h" #include "busfault.h" /* Needed for Solaris cross-zone shared memory extension */ #ifdef HAVE_SHMCTL64 #include #define SHMSTAT(id, buf) shmctl64(id, IPC_STAT64, buf) #define SHMSTAT_TYPE struct shmid_ds64 #define SHMPERM_TYPE struct ipc_perm64 #define SHM_PERM(buf) buf.shmx_perm #define SHM_SEGSZ(buf) buf.shmx_segsz #define SHMPERM_UID(p) p->ipcx_uid #define SHMPERM_CUID(p) p->ipcx_cuid #define SHMPERM_GID(p) p->ipcx_gid #define SHMPERM_CGID(p) p->ipcx_cgid #define SHMPERM_MODE(p) p->ipcx_mode #define SHMPERM_ZONEID(p) p->ipcx_zoneid #else #define SHMSTAT(id, buf) shmctl(id, IPC_STAT, buf) #define SHMSTAT_TYPE struct shmid_ds #define SHMPERM_TYPE struct ipc_perm #define SHM_PERM(buf) buf.shm_perm #define SHM_SEGSZ(buf) buf.shm_segsz #define SHMPERM_UID(p) p->uid #define SHMPERM_CUID(p) p->cuid #define SHMPERM_GID(p) p->gid #define SHMPERM_CGID(p) p->cgid #define SHMPERM_MODE(p) p->mode #endif #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include "extinit.h" typedef struct _ShmScrPrivateRec { CloseScreenProcPtr CloseScreen; ShmFuncsPtr shmFuncs; DestroyPixmapProcPtr destroyPixmap; } ShmScrPrivateRec; static PixmapPtr fbShmCreatePixmap(XSHM_CREATE_PIXMAP_ARGS); static int ShmDetachSegment(void *value, XID shmseg); static void ShmResetProc(ExtensionEntry *extEntry); static void SShmCompletionEvent(xShmCompletionEvent *from, xShmCompletionEvent *to); static Bool ShmDestroyPixmap(PixmapPtr pPixmap); static unsigned char ShmReqCode; int ShmCompletionCode; int BadShmSegCode; RESTYPE ShmSegType; static ShmDescPtr Shmsegs; static Bool sharedPixmaps; static DevPrivateKeyRec shmScrPrivateKeyRec; #define shmScrPrivateKey (&shmScrPrivateKeyRec) static DevPrivateKeyRec shmPixmapPrivateKeyRec; #define shmPixmapPrivateKey (&shmPixmapPrivateKeyRec) static ShmFuncs miFuncs = { NULL, NULL }; static ShmFuncs fbFuncs = { fbShmCreatePixmap, NULL }; #define ShmGetScreenPriv(s) ((ShmScrPrivateRec *)dixLookupPrivate(&(s)->devPrivates, shmScrPrivateKey)) #define VERIFY_SHMSEG(shmseg,shmdesc,client) \ { \ int tmprc; \ tmprc = dixLookupResourceByType((void **)&(shmdesc), shmseg, ShmSegType, \ client, DixReadAccess); \ if (tmprc != Success) \ return tmprc; \ } #define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ { \ VERIFY_SHMSEG(shmseg, shmdesc, client); \ if ((offset & 3) || (offset > shmdesc->size)) \ { \ client->errorValue = offset; \ return BadValue; \ } \ if (needwrite && !shmdesc->writable) \ return BadAccess; \ } #define VERIFY_SHMSIZE(shmdesc,offset,len,client) \ { \ if ((offset + len) > shmdesc->size) \ { \ return BadAccess; \ } \ } #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) static Bool badSysCall = FALSE; static void SigSysHandler(int signo) { badSysCall = TRUE; } static Bool CheckForShmSyscall(void) { void (*oldHandler) (int); int shmid = -1; /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ oldHandler = OsSignal(SIGSYS, SigSysHandler); badSysCall = FALSE; shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); if (shmid != -1) { /* Successful allocation - clean up */ shmctl(shmid, IPC_RMID, NULL); } else { /* Allocation failed */ badSysCall = TRUE; } OsSignal(SIGSYS, oldHandler); return !badSysCall; } #define MUST_CHECK_FOR_SHM_SYSCALL #endif static Bool ShmCloseScreen(ScreenPtr pScreen) { ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); pScreen->CloseScreen = screen_priv->CloseScreen; dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, NULL); free(screen_priv); return (*pScreen->CloseScreen) (pScreen); } static ShmScrPrivateRec * ShmInitScreenPriv(ScreenPtr pScreen) { ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); if (!screen_priv) { screen_priv = calloc(1, sizeof(ShmScrPrivateRec)); screen_priv->CloseScreen = pScreen->CloseScreen; dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv); pScreen->CloseScreen = ShmCloseScreen; } return screen_priv; } static Bool ShmRegisterPrivates(void) { if (!dixRegisterPrivateKey(&shmScrPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; if (!dixRegisterPrivateKey(&shmPixmapPrivateKeyRec, PRIVATE_PIXMAP, 0)) return FALSE; return TRUE; } /*ARGSUSED*/ static void ShmResetProc(ExtensionEntry * extEntry) { int i; for (i = 0; i < screenInfo.numScreens; i++) ShmRegisterFuncs(screenInfo.screens[i], NULL); } void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs) { if (!ShmRegisterPrivates()) return; ShmInitScreenPriv(pScreen)->shmFuncs = funcs; } static Bool ShmDestroyPixmap(PixmapPtr pPixmap) { ScreenPtr pScreen = pPixmap->drawable.pScreen; ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); void *shmdesc = NULL; Bool ret; if (pPixmap->refcnt == 1) shmdesc = dixLookupPrivate(&pPixmap->devPrivates, shmPixmapPrivateKey); pScreen->DestroyPixmap = screen_priv->destroyPixmap; ret = (*pScreen->DestroyPixmap) (pPixmap); screen_priv->destroyPixmap = pScreen->DestroyPixmap; pScreen->DestroyPixmap = ShmDestroyPixmap; if (shmdesc) ShmDetachSegment(shmdesc, 0); return ret; } void ShmRegisterFbFuncs(ScreenPtr pScreen) { ShmRegisterFuncs(pScreen, &fbFuncs); } static int ProcShmQueryVersion(ClientPtr client) { xShmQueryVersionReply rep = { .type = X_Reply, .sharedPixmaps = sharedPixmaps, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_SHM_MAJOR_VERSION, .minorVersion = SERVER_SHM_MINOR_VERSION, .uid = geteuid(), .gid = getegid(), .pixmapFormat = sharedPixmaps ? ZPixmap : 0 }; REQUEST_SIZE_MATCH(xShmQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); swaps(&rep.uid); swaps(&rep.gid); } WriteToClient(client, sizeof(xShmQueryVersionReply), &rep); return Success; } /* * Simulate the access() system call for a shared memory segment, * using the credentials from the client if available. */ static int shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) { int uid, gid; mode_t mask; int uidset = 0, gidset = 0; LocalClientCredRec *lcc; if (GetLocalClientCreds(client, &lcc) != -1) { if (lcc->fieldsSet & LCC_UID_SET) { uid = lcc->euid; uidset = 1; } if (lcc->fieldsSet & LCC_GID_SET) { gid = lcc->egid; gidset = 1; } #if defined(HAVE_GETZONEID) && defined(SHMPERM_ZONEID) if (((lcc->fieldsSet & LCC_ZID_SET) == 0) || (lcc->zoneid == -1) || (lcc->zoneid != SHMPERM_ZONEID(perm))) { uidset = 0; gidset = 0; } #endif FreeLocalClientCreds(lcc); if (uidset) { /* User id 0 always gets access */ if (uid == 0) { return 0; } /* Check the owner */ if (SHMPERM_UID(perm) == uid || SHMPERM_CUID(perm) == uid) { mask = S_IRUSR; if (!readonly) { mask |= S_IWUSR; } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; } } if (gidset) { /* Check the group */ if (SHMPERM_GID(perm) == gid || SHMPERM_CGID(perm) == gid) { mask = S_IRGRP; if (!readonly) { mask |= S_IWGRP; } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; } } } /* Otherwise, check everyone else */ mask = S_IROTH; if (!readonly) { mask |= S_IWOTH; } return (SHMPERM_MODE(perm) & mask) == mask ? 0 : -1; } static int ProcShmAttach(ClientPtr client) { SHMSTAT_TYPE buf; ShmDescPtr shmdesc; REQUEST(xShmAttachReq); REQUEST_SIZE_MATCH(xShmAttachReq); LEGAL_NEW_RESOURCE(stuff->shmseg, client); if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { client->errorValue = stuff->readOnly; return BadValue; } for (shmdesc = Shmsegs; shmdesc; shmdesc = shmdesc->next) { if (!SHMDESC_IS_FD(shmdesc) && shmdesc->shmid == stuff->shmid) break; } if (shmdesc) { if (!stuff->readOnly && !shmdesc->writable) return BadAccess; shmdesc->refcnt++; } else { shmdesc = malloc(sizeof(ShmDescRec)); if (!shmdesc) return BadAlloc; #ifdef SHM_FD_PASSING shmdesc->is_fd = FALSE; #endif shmdesc->addr = shmat(stuff->shmid, 0, stuff->readOnly ? SHM_RDONLY : 0); if ((shmdesc->addr == ((char *) -1)) || SHMSTAT(stuff->shmid, &buf)) { free(shmdesc); return BadAccess; } /* The attach was performed with root privs. We must * do manual checking of access rights for the credentials * of the client */ if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) { shmdt(shmdesc->addr); free(shmdesc); return BadAccess; } shmdesc->shmid = stuff->shmid; shmdesc->refcnt = 1; shmdesc->writable = !stuff->readOnly; shmdesc->size = SHM_SEGSZ(buf); shmdesc->next = Shmsegs; Shmsegs = shmdesc; } if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc)) return BadAlloc; return Success; } /*ARGSUSED*/ static int ShmDetachSegment(void *value, /* must conform to DeleteType */ XID unused) { ShmDescPtr shmdesc = (ShmDescPtr) value; ShmDescPtr *prev; if (--shmdesc->refcnt) return TRUE; #if SHM_FD_PASSING if (shmdesc->is_fd) { if (shmdesc->busfault) busfault_unregister(shmdesc->busfault); munmap(shmdesc->addr, shmdesc->size); } else #endif shmdt(shmdesc->addr); for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next); *prev = shmdesc->next; free(shmdesc); return Success; } static int ProcShmDetach(ClientPtr client) { ShmDescPtr shmdesc; REQUEST(xShmDetachReq); REQUEST_SIZE_MATCH(xShmDetachReq); VERIFY_SHMSEG(stuff->shmseg, shmdesc, client); FreeResource(stuff->shmseg, RT_NONE); return Success; } /* * If the given request doesn't exactly match PutImage's constraints, * wrap the image in a scratch pixmap header and let CopyArea sort it out. */ static void doShmPutImage(DrawablePtr dst, GCPtr pGC, int depth, unsigned int format, int w, int h, int sx, int sy, int sw, int sh, int dx, int dy, char *data) { PixmapPtr pPixmap; if (format == ZPixmap || (format == XYPixmap && depth == 1)) { pPixmap = GetScratchPixmapHeader(dst->pScreen, w, h, depth, BitsPerPixel(depth), PixmapBytePad(w, depth), data); if (!pPixmap) return; pGC->ops->CopyArea((DrawablePtr) pPixmap, dst, pGC, sx, sy, sw, sh, dx, dy); FreeScratchPixmapHeader(pPixmap); } else { GCPtr putGC = GetScratchGC(depth, dst->pScreen); if (!putGC) return; pPixmap = (*dst->pScreen->CreatePixmap) (dst->pScreen, sw, sh, depth, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { FreeScratchGC(putGC); return; } ValidateGC(&pPixmap->drawable, putGC); (*putGC->ops->PutImage) (&pPixmap->drawable, putGC, depth, -sx, -sy, w, h, 0, (format == XYPixmap) ? XYPixmap : ZPixmap, data); FreeScratchGC(putGC); if (format == XYBitmap) (void) (*pGC->ops->CopyPlane) (&pPixmap->drawable, dst, pGC, 0, 0, sw, sh, dx, dy, 1L); else (void) (*pGC->ops->CopyArea) (&pPixmap->drawable, dst, pGC, 0, 0, sw, sh, dx, dy); (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); } } static int ProcShmPutImage(ClientPtr client) { GCPtr pGC; DrawablePtr pDraw; long length; ShmDescPtr shmdesc; REQUEST(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VERIFY_SHMPTR(stuff->shmseg, stuff->offset, FALSE, shmdesc, client); if ((stuff->sendEvent != xTrue) && (stuff->sendEvent != xFalse)) return BadValue; if (stuff->format == XYBitmap) { if (stuff->depth != 1) return BadMatch; length = PixmapBytePad(stuff->totalWidth, 1); } else if (stuff->format == XYPixmap) { if (pDraw->depth != stuff->depth) return BadMatch; length = PixmapBytePad(stuff->totalWidth, 1); length *= stuff->depth; } else if (stuff->format == ZPixmap) { if (pDraw->depth != stuff->depth) return BadMatch; length = PixmapBytePad(stuff->totalWidth, stuff->depth); } else { client->errorValue = stuff->format; return BadValue; } /* * There's a potential integer overflow in this check: * VERIFY_SHMSIZE(shmdesc, stuff->offset, length * stuff->totalHeight, * client); * the version below ought to avoid it */ if (stuff->totalHeight != 0 && length > (shmdesc->size - stuff->offset) / stuff->totalHeight) { client->errorValue = stuff->totalWidth; return BadValue; } if (stuff->srcX > stuff->totalWidth) { client->errorValue = stuff->srcX; return BadValue; } if (stuff->srcY > stuff->totalHeight) { client->errorValue = stuff->srcY; return BadValue; } if ((stuff->srcX + stuff->srcWidth) > stuff->totalWidth) { client->errorValue = stuff->srcWidth; return BadValue; } if ((stuff->srcY + stuff->srcHeight) > stuff->totalHeight) { client->errorValue = stuff->srcHeight; return BadValue; } if ((((stuff->format == ZPixmap) && (stuff->srcX == 0)) || ((stuff->format != ZPixmap) && (stuff->srcX < screenInfo.bitmapScanlinePad) && ((stuff->format == XYBitmap) || ((stuff->srcY == 0) && (stuff->srcHeight == stuff->totalHeight))))) && ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, stuff->totalWidth, stuff->srcHeight, stuff->srcX, stuff->format, shmdesc->addr + stuff->offset + (stuff->srcY * length)); else doShmPutImage(pDraw, pGC, stuff->depth, stuff->format, stuff->totalWidth, stuff->totalHeight, stuff->srcX, stuff->srcY, stuff->srcWidth, stuff->srcHeight, stuff->dstX, stuff->dstY, shmdesc->addr + stuff->offset); if (stuff->sendEvent) { xShmCompletionEvent ev = { .type = ShmCompletionCode, .drawable = stuff->drawable, .minorEvent = X_ShmPutImage, .majorEvent = ShmReqCode, .shmseg = stuff->shmseg, .offset = stuff->offset }; WriteEventsToClient(client, 1, (xEvent *) &ev); } return Success; } static int ProcShmGetImage(ClientPtr client) { DrawablePtr pDraw; long lenPer = 0, length; Mask plane = 0; xShmGetImageReply xgi; ShmDescPtr shmdesc; VisualID visual = None; RegionPtr pVisibleRegion = NULL; int rc; REQUEST(xShmGetImageReq); REQUEST_SIZE_MATCH(xShmGetImageReq); if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; return BadValue; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); if (pDraw->type == DRAWABLE_WINDOW) { if ( /* check for being viewable */ !((WindowPtr) pDraw)->realized || /* check for being on screen */ pDraw->x + stuff->x < 0 || pDraw->x + stuff->x + (int) stuff->width > pDraw->pScreen->width || pDraw->y + stuff->y < 0 || pDraw->y + stuff->y + (int) stuff->height > pDraw->pScreen->height || /* check for being inside of border */ stuff->x < -wBorderWidth((WindowPtr) pDraw) || stuff->x + (int) stuff->width > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || stuff->y < -wBorderWidth((WindowPtr) pDraw) || stuff->y + (int) stuff->height > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) return BadMatch; visual = wVisual(((WindowPtr) pDraw)); if (pDraw->type == DRAWABLE_WINDOW) pVisibleRegion = &((WindowPtr) pDraw)->borderClip; pDraw->pScreen->SourceValidate(pDraw, stuff->x, stuff->y, stuff->width, stuff->height, IncludeInferiors); } else { if (stuff->x < 0 || stuff->x + (int) stuff->width > pDraw->width || stuff->y < 0 || stuff->y + (int) stuff->height > pDraw->height) return BadMatch; visual = None; } xgi = (xShmGetImageReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .visual = visual, .depth = pDraw->depth }; if (stuff->format == ZPixmap) { length = PixmapBytePad(stuff->width, pDraw->depth) * stuff->height; } else { lenPer = PixmapBytePad(stuff->width, 1) * stuff->height; plane = ((Mask) 1) << (pDraw->depth - 1); /* only planes asked for */ length = lenPer * Ones(stuff->planeMask & (plane | (plane - 1))); } VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); xgi.size = length; if (length == 0) { /* nothing to do */ } else if (stuff->format == ZPixmap) { (*pDraw->pScreen->GetImage) (pDraw, stuff->x, stuff->y, stuff->width, stuff->height, stuff->format, stuff->planeMask, shmdesc->addr + stuff->offset); if (pVisibleRegion) XaceCensorImage(client, pVisibleRegion, PixmapBytePad(stuff->width, pDraw->depth), pDraw, stuff->x, stuff->y, stuff->width, stuff->height, stuff->format, shmdesc->addr + stuff->offset); } else { length = stuff->offset; for (; plane; plane >>= 1) { if (stuff->planeMask & plane) { (*pDraw->pScreen->GetImage) (pDraw, stuff->x, stuff->y, stuff->width, stuff->height, stuff->format, plane, shmdesc->addr + length); if (pVisibleRegion) XaceCensorImage(client, pVisibleRegion, BitmapBytePad(stuff->width), pDraw, stuff->x, stuff->y, stuff->width, stuff->height, stuff->format, shmdesc->addr + length); length += lenPer; } } } if (client->swapped) { swaps(&xgi.sequenceNumber); swapl(&xgi.length); swapl(&xgi.visual); swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), &xgi); return Success; } #ifdef PANORAMIX static int ProcPanoramiXShmPutImage(ClientPtr client) { int j, result, orig_x, orig_y; PanoramiXRes *draw, *gc; Bool sendEvent, isRoot; REQUEST(xShmPutImageReq); REQUEST_SIZE_MATCH(xShmPutImageReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; orig_x = stuff->dstX; orig_y = stuff->dstY; sendEvent = stuff->sendEvent; stuff->sendEvent = 0; FOR_NSCREENS(j) { if (!j) stuff->sendEvent = sendEvent; stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { stuff->dstX = orig_x - screenInfo.screens[j]->x; stuff->dstY = orig_y - screenInfo.screens[j]->y; } result = ProcShmPutImage(client); if (result != Success) break; } return result; } static int ProcPanoramiXShmGetImage(ClientPtr client) { PanoramiXRes *draw; DrawablePtr *drawables; DrawablePtr pDraw; xShmGetImageReply xgi; ShmDescPtr shmdesc; int i, x, y, w, h, format, rc; Mask plane = 0, planemask; long lenPer = 0, length, widthBytesLine; Bool isRoot; REQUEST(xShmGetImageReq); REQUEST_SIZE_MATCH(xShmGetImageReq); if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; return BadValue; } rc = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (rc != Success) return (rc == BadValue) ? BadDrawable : rc; if (draw->type == XRT_PIXMAP) return ProcShmGetImage(client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); x = stuff->x; y = stuff->y; w = stuff->width; h = stuff->height; format = stuff->format; planemask = stuff->planeMask; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; if (isRoot) { if ( /* check for being onscreen */ x < 0 || x + w > PanoramiXPixWidth || y < 0 || y + h > PanoramiXPixHeight) return BadMatch; } else { if ( /* check for being onscreen */ screenInfo.screens[0]->x + pDraw->x + x < 0 || screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth || screenInfo.screens[0]->y + pDraw->y + y < 0 || screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || /* check for being inside of border */ x < -wBorderWidth((WindowPtr) pDraw) || x + w > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || y < -wBorderWidth((WindowPtr) pDraw) || y + h > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) return BadMatch; } if (format == ZPixmap) { widthBytesLine = PixmapBytePad(w, pDraw->depth); length = widthBytesLine * h; } else { widthBytesLine = PixmapBytePad(w, 1); lenPer = widthBytesLine * h; plane = ((Mask) 1) << (pDraw->depth - 1); length = lenPer * Ones(planemask & (plane | (plane - 1))); } VERIFY_SHMSIZE(shmdesc, stuff->offset, length, client); drawables = calloc(PanoramiXNumScreens, sizeof(DrawablePtr)); if (!drawables) return BadAlloc; drawables[0] = pDraw; FOR_NSCREENS_FORWARD_SKIP(i) { rc = dixLookupDrawable(drawables + i, draw->info[i].id, client, 0, DixReadAccess); if (rc != Success) { free(drawables); return rc; } } FOR_NSCREENS_FORWARD(i) { drawables[i]->pScreen->SourceValidate(drawables[i], 0, 0, drawables[i]->width, drawables[i]->height, IncludeInferiors); } xgi = (xShmGetImageReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .visual = wVisual(((WindowPtr) pDraw)), .depth = pDraw->depth }; xgi.size = length; if (length == 0) { /* nothing to do */ } else if (format == ZPixmap) { XineramaGetImageData(drawables, x, y, w, h, format, planemask, shmdesc->addr + stuff->offset, widthBytesLine, isRoot); } else { length = stuff->offset; for (; plane; plane >>= 1) { if (planemask & plane) { XineramaGetImageData(drawables, x, y, w, h, format, plane, shmdesc->addr + length, widthBytesLine, isRoot); length += lenPer; } } } free(drawables); if (client->swapped) { swaps(&xgi.sequenceNumber); swapl(&xgi.length); swapl(&xgi.visual); swapl(&xgi.size); } WriteToClient(client, sizeof(xShmGetImageReply), &xgi); return Success; } static int ProcPanoramiXShmCreatePixmap(ClientPtr client) { ScreenPtr pScreen = NULL; PixmapPtr pMap = NULL; DrawablePtr pDraw; DepthPtr pDepth; int i, j, result, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); unsigned int width, height, depth; unsigned long size; PanoramiXRes *newPix; REQUEST_SIZE_MATCH(xShmCreatePixmapReq); client->errorValue = stuff->pid; if (!sharedPixmaps) return BadImplementation; LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); width = stuff->width; height = stuff->height; depth = stuff->depth; if (!width || !height || !depth) { client->errorValue = 0; return BadValue; } if (width > 32767 || height > 32767) return BadAlloc; if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) if (pDepth->depth == stuff->depth) goto CreatePmap; client->errorValue = stuff->depth; return BadValue; } CreatePmap: size = PixmapBytePad(width, depth) * height; if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; } /* thankfully, offset is unsigned */ if (stuff->offset + size < size) return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); if (!(newPix = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; newPix->u.pix.shared = TRUE; panoramix_setup_ids(newPix, client, stuff->pid); result = Success; FOR_NSCREENS(j) { ShmScrPrivateRec *screen_priv; pScreen = screenInfo.screens[j]; screen_priv = ShmGetScreenPriv(pScreen); pMap = (*screen_priv->shmFuncs->CreatePixmap) (pScreen, stuff->width, stuff->height, stuff->depth, shmdesc->addr + stuff->offset); if (pMap) { result = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess); if (result != Success) { pDraw->pScreen->DestroyPixmap(pMap); break; } dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = newPix->info[j].id; if (!AddResource(newPix->info[j].id, RT_PIXMAP, (void *) pMap)) { result = BadAlloc; break; } } else { result = BadAlloc; break; } } if (result != Success) { while (j--) FreeResource(newPix->info[j].id, RT_NONE); free(newPix); } else AddResource(stuff->pid, XRT_PIXMAP, newPix); return result; } #endif static PixmapPtr fbShmCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, char *addr) { PixmapPtr pPixmap; pPixmap = (*pScreen->CreatePixmap) (pScreen, 0, 0, pScreen->rootDepth, 0); if (!pPixmap) return NullPixmap; if (!(*pScreen->ModifyPixmapHeader) (pPixmap, width, height, depth, BitsPerPixel(depth), PixmapBytePad(width, depth), (void *) addr)) { (*pScreen->DestroyPixmap) (pPixmap); return NullPixmap; } return pPixmap; } static int ProcShmCreatePixmap(ClientPtr client) { PixmapPtr pMap; DrawablePtr pDraw; DepthPtr pDepth; int i, rc; ShmDescPtr shmdesc; ShmScrPrivateRec *screen_priv; REQUEST(xShmCreatePixmapReq); unsigned int width, height, depth; unsigned long size; REQUEST_SIZE_MATCH(xShmCreatePixmapReq); client->errorValue = stuff->pid; if (!sharedPixmaps) return BadImplementation; LEGAL_NEW_RESOURCE(stuff->pid, client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); width = stuff->width; height = stuff->height; depth = stuff->depth; if (!width || !height || !depth) { client->errorValue = 0; return BadValue; } if (width > 32767 || height > 32767) return BadAlloc; if (stuff->depth != 1) { pDepth = pDraw->pScreen->allowedDepths; for (i = 0; i < pDraw->pScreen->numDepths; i++, pDepth++) if (pDepth->depth == stuff->depth) goto CreatePmap; client->errorValue = stuff->depth; return BadValue; } CreatePmap: size = PixmapBytePad(width, depth) * height; if (sizeof(size) == 4 && BitsPerPixel(depth) > 8) { if (size < width * height) return BadAlloc; } /* thankfully, offset is unsigned */ if (stuff->offset + size < size) return BadAlloc; VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); screen_priv = ShmGetScreenPriv(pDraw->pScreen); pMap = (*screen_priv->shmFuncs->CreatePixmap) (pDraw->pScreen, stuff->width, stuff->height, stuff->depth, shmdesc->addr + stuff->offset); if (pMap) { rc = XaceHook(XACE_RESOURCE_ACCESS, client, stuff->pid, RT_PIXMAP, pMap, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { pDraw->pScreen->DestroyPixmap(pMap); return rc; } dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; if (AddResource(stuff->pid, RT_PIXMAP, (void *) pMap)) { return Success; } } return BadAlloc; } #ifdef SHM_FD_PASSING static void ShmBusfaultNotify(void *context) { ShmDescPtr shmdesc = context; ErrorF("shared memory 0x%x truncated by client\n", (unsigned int) shmdesc->resource); busfault_unregister(shmdesc->busfault); shmdesc->busfault = NULL; FreeResource (shmdesc->resource, RT_NONE); } static int ProcShmAttachFd(ClientPtr client) { int fd; ShmDescPtr shmdesc; REQUEST(xShmAttachFdReq); struct stat statb; SetReqFds(client, 1); REQUEST_SIZE_MATCH(xShmAttachFdReq); LEGAL_NEW_RESOURCE(stuff->shmseg, client); if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { client->errorValue = stuff->readOnly; return BadValue; } fd = ReadFdFromClient(client); if (fd < 0) return BadMatch; if (fstat(fd, &statb) < 0 || statb.st_size == 0) { close(fd); return BadMatch; } shmdesc = malloc(sizeof(ShmDescRec)); if (!shmdesc) { close(fd); return BadAlloc; } shmdesc->is_fd = TRUE; shmdesc->addr = mmap(NULL, statb.st_size, stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); close(fd); if (shmdesc->addr == ((char *) -1)) { free(shmdesc); return BadAccess; } shmdesc->refcnt = 1; shmdesc->writable = !stuff->readOnly; shmdesc->size = statb.st_size; shmdesc->resource = stuff->shmseg; shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc); if (!shmdesc->busfault) { munmap(shmdesc->addr, shmdesc->size); free(shmdesc); return BadAlloc; } shmdesc->next = Shmsegs; Shmsegs = shmdesc; if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc)) return BadAlloc; return Success; } static int shm_tmpfile(void) { const char *shmdirs[] = { "/run/shm", "/var/tmp", "/tmp", }; int fd; #ifdef HAVE_MEMFD_CREATE fd = memfd_create("xorg", MFD_CLOEXEC|MFD_ALLOW_SEALING); if (fd != -1) { fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK); DebugF ("Using memfd_create\n"); return fd; } #endif #ifdef O_TMPFILE for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) { fd = open(shmdirs[i], O_TMPFILE|O_RDWR|O_CLOEXEC|O_EXCL, 0666); if (fd >= 0) { DebugF ("Using O_TMPFILE\n"); return fd; } } ErrorF ("Not using O_TMPFILE\n"); #endif for (int i = 0; i < ARRAY_SIZE(shmdirs); i++) { char template[PATH_MAX]; snprintf(template, ARRAY_SIZE(template), "%s/shmfd-XXXXXX", shmdirs[i]); #ifdef HAVE_MKOSTEMP fd = mkostemp(template, O_CLOEXEC); #else fd = mkstemp(template); #endif if (fd < 0) continue; unlink(template); #ifndef HAVE_MKOSTEMP int flags = fcntl(fd, F_GETFD); if (flags != -1) { flags |= FD_CLOEXEC; (void) fcntl(fd, F_SETFD, flags); } #endif return fd; } return -1; } static int ProcShmCreateSegment(ClientPtr client) { int fd; ShmDescPtr shmdesc; REQUEST(xShmCreateSegmentReq); xShmCreateSegmentReply rep = { .type = X_Reply, .nfd = 1, .sequenceNumber = client->sequence, .length = 0, }; REQUEST_SIZE_MATCH(xShmCreateSegmentReq); LEGAL_NEW_RESOURCE(stuff->shmseg, client); if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { client->errorValue = stuff->readOnly; return BadValue; } fd = shm_tmpfile(); if (fd < 0) return BadAlloc; if (ftruncate(fd, stuff->size) < 0) { close(fd); return BadAlloc; } shmdesc = malloc(sizeof(ShmDescRec)); if (!shmdesc) { close(fd); return BadAlloc; } shmdesc->is_fd = TRUE; shmdesc->addr = mmap(NULL, stuff->size, stuff->readOnly ? PROT_READ : PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); if (shmdesc->addr == ((char *) -1)) { close(fd); free(shmdesc); return BadAccess; } shmdesc->refcnt = 1; shmdesc->writable = !stuff->readOnly; shmdesc->size = stuff->size; shmdesc->busfault = busfault_register_mmap(shmdesc->addr, shmdesc->size, ShmBusfaultNotify, shmdesc); if (!shmdesc->busfault) { close(fd); munmap(shmdesc->addr, shmdesc->size); free(shmdesc); return BadAlloc; } shmdesc->next = Shmsegs; Shmsegs = shmdesc; if (!AddResource(stuff->shmseg, ShmSegType, (void *) shmdesc)) { close(fd); return BadAlloc; } if (WriteFdToClient(client, fd, TRUE) < 0) { FreeResource(stuff->shmseg, RT_NONE); close(fd); return BadAlloc; } WriteToClient(client, sizeof (xShmCreateSegmentReply), &rep); return Success; } #endif /* SHM_FD_PASSING */ static int ProcShmDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data == X_ShmQueryVersion) return ProcShmQueryVersion(client); if (!client->local) return BadRequest; switch (stuff->data) { case X_ShmAttach: return ProcShmAttach(client); case X_ShmDetach: return ProcShmDetach(client); case X_ShmPutImage: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShmPutImage(client); #endif return ProcShmPutImage(client); case X_ShmGetImage: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShmGetImage(client); #endif return ProcShmGetImage(client); case X_ShmCreatePixmap: #ifdef PANORAMIX if (!noPanoramiXExtension) return ProcPanoramiXShmCreatePixmap(client); #endif return ProcShmCreatePixmap(client); #ifdef SHM_FD_PASSING case X_ShmAttachFd: return ProcShmAttachFd(client); case X_ShmCreateSegment: return ProcShmCreateSegment(client); #endif default: return BadRequest; } } static void _X_COLD SShmCompletionEvent(xShmCompletionEvent * from, xShmCompletionEvent * to) { to->type = from->type; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->drawable, to->drawable); cpswaps(from->minorEvent, to->minorEvent); to->majorEvent = from->majorEvent; cpswapl(from->shmseg, to->shmseg); cpswapl(from->offset, to->offset); } static int _X_COLD SProcShmQueryVersion(ClientPtr client) { REQUEST(xShmQueryVersionReq); swaps(&stuff->length); return ProcShmQueryVersion(client); } static int _X_COLD SProcShmAttach(ClientPtr client) { REQUEST(xShmAttachReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmAttachReq); swapl(&stuff->shmseg); swapl(&stuff->shmid); return ProcShmAttach(client); } static int _X_COLD SProcShmDetach(ClientPtr client) { REQUEST(xShmDetachReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmDetachReq); swapl(&stuff->shmseg); return ProcShmDetach(client); } static int _X_COLD SProcShmPutImage(ClientPtr client) { REQUEST(xShmPutImageReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmPutImageReq); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->totalWidth); swaps(&stuff->totalHeight); swaps(&stuff->srcX); swaps(&stuff->srcY); swaps(&stuff->srcWidth); swaps(&stuff->srcHeight); swaps(&stuff->dstX); swaps(&stuff->dstY); swapl(&stuff->shmseg); swapl(&stuff->offset); return ProcShmPutImage(client); } static int _X_COLD SProcShmGetImage(ClientPtr client) { REQUEST(xShmGetImageReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmGetImageReq); swapl(&stuff->drawable); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->planeMask); swapl(&stuff->shmseg); swapl(&stuff->offset); return ProcShmGetImage(client); } static int _X_COLD SProcShmCreatePixmap(ClientPtr client) { REQUEST(xShmCreatePixmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmCreatePixmapReq); swapl(&stuff->pid); swapl(&stuff->drawable); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->shmseg); swapl(&stuff->offset); return ProcShmCreatePixmap(client); } #ifdef SHM_FD_PASSING static int _X_COLD SProcShmAttachFd(ClientPtr client) { REQUEST(xShmAttachFdReq); SetReqFds(client, 1); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmAttachFdReq); swapl(&stuff->shmseg); return ProcShmAttachFd(client); } static int _X_COLD SProcShmCreateSegment(ClientPtr client) { REQUEST(xShmCreateSegmentReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xShmCreateSegmentReq); swapl(&stuff->shmseg); swapl(&stuff->size); return ProcShmCreateSegment(client); } #endif /* SHM_FD_PASSING */ static int _X_COLD SProcShmDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data == X_ShmQueryVersion) return SProcShmQueryVersion(client); if (!client->local) return BadRequest; switch (stuff->data) { case X_ShmAttach: return SProcShmAttach(client); case X_ShmDetach: return SProcShmDetach(client); case X_ShmPutImage: return SProcShmPutImage(client); case X_ShmGetImage: return SProcShmGetImage(client); case X_ShmCreatePixmap: return SProcShmCreatePixmap(client); #ifdef SHM_FD_PASSING case X_ShmAttachFd: return SProcShmAttachFd(client); case X_ShmCreateSegment: return SProcShmCreateSegment(client); #endif default: return BadRequest; } } void ShmExtensionInit(void) { ExtensionEntry *extEntry; int i; #ifdef MUST_CHECK_FOR_SHM_SYSCALL if (!CheckForShmSyscall()) { ErrorF("MIT-SHM extension disabled due to lack of kernel support\n"); return; } #endif if (!ShmRegisterPrivates()) return; sharedPixmaps = xFalse; { sharedPixmaps = xTrue; for (i = 0; i < screenInfo.numScreens; i++) { ShmScrPrivateRec *screen_priv = ShmInitScreenPriv(screenInfo.screens[i]); if (!screen_priv->shmFuncs) screen_priv->shmFuncs = &miFuncs; if (!screen_priv->shmFuncs->CreatePixmap) sharedPixmaps = xFalse; } if (sharedPixmaps) for (i = 0; i < screenInfo.numScreens; i++) { ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(screenInfo.screens[i]); screen_priv->destroyPixmap = screenInfo.screens[i]->DestroyPixmap; screenInfo.screens[i]->DestroyPixmap = ShmDestroyPixmap; } } ShmSegType = CreateNewResourceType(ShmDetachSegment, "ShmSeg"); if (ShmSegType && (extEntry = AddExtension(SHMNAME, ShmNumberEvents, ShmNumberErrors, ProcShmDispatch, SProcShmDispatch, ShmResetProc, StandardMinorOpcode))) { ShmReqCode = (unsigned char) extEntry->base; ShmCompletionCode = extEntry->eventBase; BadShmSegCode = extEntry->errorBase; SetResourceTypeErrorValue(ShmSegType, BadShmSegCode); EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; } } xorg-server-21.1.16/Xext/xvmain.c0000644000175000017500000006715214757411105012244 /*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. ******************************************************************/ /* ** File: ** ** xvmain.c --- Xv server extension main device independent module. ** ** Author: ** ** David Carver (Digital Workstation Engineering/Project Athena) ** ** Revisions: ** ** 04.09.91 Carver ** - change: stop video always generates an event even when video ** wasn't active ** ** 29.08.91 Carver ** - change: unrealizing windows no longer preempts video ** ** 11.06.91 Carver ** - changed SetPortControl to SetPortAttribute ** - changed GetPortControl to GetPortAttribute ** - changed QueryBestSize ** ** 28.05.91 Carver ** - fixed Put and Get requests to not preempt operations to same drawable ** ** 15.05.91 Carver ** - version 2.0 upgrade ** ** 19.03.91 Carver ** - fixed Put and Get requests to honor grabbed ports. ** - fixed Video requests to update di structure with new drawable, and ** client after calling ddx. ** ** 24.01.91 Carver ** - version 1.4 upgrade ** ** Notes: ** ** Port structures reference client structures in a two different ** ways: when grabs, or video is active. Each reference is encoded ** as fake client resources and thus when the client is goes away so ** does the reference (it is zeroed). No other action is taken, so ** video doesn't necessarily stop. It probably will as a result of ** other resources going away, but if a client starts video using ** none of its own resources, then the video will continue to play ** after the client disappears. ** ** */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "os.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "gcstruct.h" #include "extnsionst.h" #include "extinit.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" #include "input.h" #define GLOBAL #include #include #include "xvdix.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #include "xvdisp.h" static DevPrivateKeyRec XvScreenKeyRec; #define XvScreenKey (&XvScreenKeyRec) unsigned long XvExtensionGeneration = 0; unsigned long XvScreenGeneration = 0; unsigned long XvResourceGeneration = 0; int XvReqCode; int XvEventBase; int XvErrorBase; RESTYPE XvRTPort; RESTYPE XvRTEncoding; RESTYPE XvRTGrab; RESTYPE XvRTVideoNotify; RESTYPE XvRTVideoNotifyList; RESTYPE XvRTPortNotify; /* EXTERNAL */ static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); static Bool CreateResourceTypes(void); static Bool XvCloseScreen(ScreenPtr); static Bool XvDestroyPixmap(PixmapPtr); static Bool XvDestroyWindow(WindowPtr); static void XvResetProc(ExtensionEntry *); static int XvdiDestroyGrab(void *, XID); static int XvdiDestroyEncoding(void *, XID); static int XvdiDestroyVideoNotify(void *, XID); static int XvdiDestroyPortNotify(void *, XID); static int XvdiDestroyVideoNotifyList(void *, XID); static int XvdiDestroyPort(void *, XID); static int XvdiSendVideoNotify(XvPortPtr, DrawablePtr, int); /* ** XvExtensionInit ** ** */ void XvExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) return; /* Look to see if any screens were initialized; if not then init global variables so the extension can function */ if (XvScreenGeneration != serverGeneration) { if (!CreateResourceTypes()) { ErrorF("XvExtensionInit: Unable to allocate resource types\n"); return; } #ifdef PANORAMIX XineramaRegisterConnectionBlockCallback(XineramifyXv); #endif XvScreenGeneration = serverGeneration; } if (XvExtensionGeneration != serverGeneration) { XvExtensionGeneration = serverGeneration; extEntry = AddExtension(XvName, XvNumEvents, XvNumErrors, ProcXvDispatch, SProcXvDispatch, XvResetProc, StandardMinorOpcode); if (!extEntry) { FatalError("XvExtensionInit: AddExtensions failed\n"); } XvReqCode = extEntry->base; XvEventBase = extEntry->eventBase; XvErrorBase = extEntry->errorBase; EventSwapVector[XvEventBase + XvVideoNotify] = (EventSwapPtr) WriteSwappedVideoNotifyEvent; EventSwapVector[XvEventBase + XvPortNotify] = (EventSwapPtr) WriteSwappedPortNotifyEvent; SetResourceTypeErrorValue(XvRTPort, _XvBadPort); (void) MakeAtom(XvName, strlen(XvName), xTrue); } } static Bool CreateResourceTypes(void) { if (XvResourceGeneration == serverGeneration) return TRUE; XvResourceGeneration = serverGeneration; if (!(XvRTPort = CreateNewResourceType(XvdiDestroyPort, "XvRTPort"))) { ErrorF("CreateResourceTypes: failed to allocate port resource.\n"); return FALSE; } if (!(XvRTGrab = CreateNewResourceType(XvdiDestroyGrab, "XvRTGrab"))) { ErrorF("CreateResourceTypes: failed to allocate grab resource.\n"); return FALSE; } if (!(XvRTEncoding = CreateNewResourceType(XvdiDestroyEncoding, "XvRTEncoding"))) { ErrorF("CreateResourceTypes: failed to allocate encoding resource.\n"); return FALSE; } if (!(XvRTVideoNotify = CreateNewResourceType(XvdiDestroyVideoNotify, "XvRTVideoNotify"))) { ErrorF ("CreateResourceTypes: failed to allocate video notify resource.\n"); return FALSE; } if (! (XvRTVideoNotifyList = CreateNewResourceType(XvdiDestroyVideoNotifyList, "XvRTVideoNotifyList"))) { ErrorF ("CreateResourceTypes: failed to allocate video notify list resource.\n"); return FALSE; } if (!(XvRTPortNotify = CreateNewResourceType(XvdiDestroyPortNotify, "XvRTPortNotify"))) { ErrorF ("CreateResourceTypes: failed to allocate port notify resource.\n"); return FALSE; } return TRUE; } int XvScreenInit(ScreenPtr pScreen) { XvScreenPtr pxvs; if (XvScreenGeneration != serverGeneration) { if (!CreateResourceTypes()) { ErrorF("XvScreenInit: Unable to allocate resource types\n"); return BadAlloc; } #ifdef PANORAMIX XineramaRegisterConnectionBlockCallback(XineramifyXv); #endif XvScreenGeneration = serverGeneration; } if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) return BadAlloc; if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey)) { ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n"); } /* ALLOCATE SCREEN PRIVATE RECORD */ pxvs = malloc(sizeof(XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); return BadAlloc; } dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs); pxvs->DestroyPixmap = pScreen->DestroyPixmap; pxvs->DestroyWindow = pScreen->DestroyWindow; pxvs->CloseScreen = pScreen->CloseScreen; pScreen->DestroyPixmap = XvDestroyPixmap; pScreen->DestroyWindow = XvDestroyWindow; pScreen->CloseScreen = XvCloseScreen; return Success; } static Bool XvCloseScreen(ScreenPtr pScreen) { XvScreenPtr pxvs; pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); pScreen->DestroyPixmap = pxvs->DestroyPixmap; pScreen->DestroyWindow = pxvs->DestroyWindow; pScreen->CloseScreen = pxvs->CloseScreen; free(pxvs); dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); return (*pScreen->CloseScreen) (pScreen); } static void XvResetProc(ExtensionEntry * extEntry) { XvResetProcVector(); } DevPrivateKey XvGetScreenKey(void) { return XvScreenKey; } unsigned long XvGetRTPort(void) { return XvRTPort; } static void XvStopAdaptors(DrawablePtr pDrawable) { ScreenPtr pScreen = pDrawable->pScreen; XvScreenPtr pxvs = dixLookupPrivate(&pScreen->devPrivates, XvScreenKey); XvAdaptorPtr pa = pxvs->pAdaptors; int na = pxvs->nAdaptors; /* CHECK TO SEE IF THIS PORT IS IN USE */ while (na--) { XvPortPtr pp = pa->pPorts; int np = pa->nPorts; while (np--) { if (pp->pDraw == pDrawable) { XvdiSendVideoNotify(pp, pDrawable, XvPreempted); (void) (*pp->pAdaptor->ddStopVideo) (pp, pDrawable); pp->pDraw = NULL; pp->client = NULL; pp->time = currentTime; } pp++; } pa++; } } static Bool XvDestroyPixmap(PixmapPtr pPix) { ScreenPtr pScreen = pPix->drawable.pScreen; Bool status; if (pPix->refcnt == 1) XvStopAdaptors(&pPix->drawable); SCREEN_PROLOGUE(pScreen, DestroyPixmap); status = (*pScreen->DestroyPixmap) (pPix); SCREEN_EPILOGUE(pScreen, DestroyPixmap, XvDestroyPixmap); return status; } static Bool XvDestroyWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; Bool status; XvStopAdaptors(&pWin->drawable); SCREEN_PROLOGUE(pScreen, DestroyWindow); status = (*pScreen->DestroyWindow) (pWin); SCREEN_EPILOGUE(pScreen, DestroyWindow, XvDestroyWindow); return status; } static int XvdiDestroyPort(void *pPort, XID id) { return Success; } static int XvdiDestroyGrab(void *pGrab, XID id) { ((XvGrabPtr) pGrab)->client = NULL; return Success; } static int XvdiDestroyVideoNotify(void *pn, XID id) { /* JUST CLEAR OUT THE client POINTER FIELD */ ((XvVideoNotifyPtr) pn)->client = NULL; return Success; } static int XvdiDestroyPortNotify(void *pn, XID id) { /* JUST CLEAR OUT THE client POINTER FIELD */ ((XvPortNotifyPtr) pn)->client = NULL; return Success; } static int XvdiDestroyVideoNotifyList(void *pn, XID id) { XvVideoNotifyPtr npn, cpn; /* ACTUALLY DESTROY THE NOTIFY LIST */ cpn = (XvVideoNotifyPtr) pn; while (cpn) { npn = cpn->next; if (cpn->client) FreeResource(cpn->id, XvRTVideoNotify); free(cpn); cpn = npn; } return Success; } static int XvdiDestroyEncoding(void *value, XID id) { return Success; } static int XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) { XvVideoNotifyPtr pn; dixLookupResourceByType((void **) &pn, pDraw->id, XvRTVideoNotifyList, serverClient, DixReadAccess); while (pn) { xvEvent event = { .u.videoNotify.reason = reason, .u.videoNotify.time = currentTime.milliseconds, .u.videoNotify.drawable = pDraw->id, .u.videoNotify.port = pPort->id }; event.u.u.type = XvEventBase + XvVideoNotify; WriteEventsToClient(pn->client, 1, (xEventPtr) &event); pn = pn->next; } return Success; } int XvdiSendPortNotify(XvPortPtr pPort, Atom attribute, INT32 value) { XvPortNotifyPtr pn; pn = pPort->pNotify; while (pn) { xvEvent event = { .u.portNotify.time = currentTime.milliseconds, .u.portNotify.port = pPort->id, .u.portNotify.attribute = attribute, .u.portNotify.value = value }; event.u.u.type = XvEventBase + XvPortNotify; WriteEventsToClient(pn->client, 1, (xEventPtr) &event); pn = pn->next; } return Success; } #define CHECK_SIZE(dw, dh, sw, sh) { \ if(!dw || !dh || !sw || !sh) return Success; \ /* The region code will break these if they are too large */ \ if((dw > 32767) || (dh > 32767) || (sw > 32767) || (sh > 32767)) \ return BadValue; \ } int XvdiPutVideo(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { DrawablePtr pOldDraw; CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ UpdateCurrentTime(); /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if (pPort->grab.client && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED EVENTS TO ANY CLIENTS WHO WANT THEM */ pOldDraw = pPort->pDraw; if ((pOldDraw) && (pOldDraw != pDraw)) { XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); } (void) (*pPort->pAdaptor->ddPutVideo) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); if ((pPort->pDraw) && (pOldDraw != pDraw)) { pPort->client = client; XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); } pPort->time = currentTime; return Success; } int XvdiPutStill(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { int status; CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ UpdateCurrentTime(); /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if (pPort->grab.client && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } pPort->time = currentTime; status = (*pPort->pAdaptor->ddPutStill) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); return status; } int XvdiPutImage(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 src_x, INT16 src_y, CARD16 src_w, CARD16 src_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h, XvImagePtr image, unsigned char *data, Bool sync, CARD16 width, CARD16 height) { CHECK_SIZE(drw_w, drw_h, src_w, src_h); /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ UpdateCurrentTime(); /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if (pPort->grab.client && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } pPort->time = currentTime; return (*pPort->pAdaptor->ddPutImage) (pDraw, pPort, pGC, src_x, src_y, src_w, src_h, drw_x, drw_y, drw_w, drw_h, image, data, sync, width, height); } int XvdiGetVideo(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { DrawablePtr pOldDraw; CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ UpdateCurrentTime(); /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if (pPort->grab.client && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } /* CHECK TO SEE IF PORT IS IN USE; IF SO THEN WE MUST DELIVER INTERRUPTED EVENTS TO ANY CLIENTS WHO WANT THEM */ pOldDraw = pPort->pDraw; if ((pOldDraw) && (pOldDraw != pDraw)) { XvdiSendVideoNotify(pPort, pPort->pDraw, XvPreempted); } (void) (*pPort->pAdaptor->ddGetVideo) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); if ((pPort->pDraw) && (pOldDraw != pDraw)) { pPort->client = client; XvdiSendVideoNotify(pPort, pPort->pDraw, XvStarted); } pPort->time = currentTime; return Success; } int XvdiGetStill(ClientPtr client, DrawablePtr pDraw, XvPortPtr pPort, GCPtr pGC, INT16 vid_x, INT16 vid_y, CARD16 vid_w, CARD16 vid_h, INT16 drw_x, INT16 drw_y, CARD16 drw_w, CARD16 drw_h) { int status; CHECK_SIZE(drw_w, drw_h, vid_w, vid_h); /* UPDATE TIME VARIABLES FOR USE IN EVENTS */ UpdateCurrentTime(); /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if (pPort->grab.client && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } status = (*pPort->pAdaptor->ddGetStill) (pDraw, pPort, pGC, vid_x, vid_y, vid_w, vid_h, drw_x, drw_y, drw_w, drw_h); pPort->time = currentTime; return status; } int XvdiGrabPort(ClientPtr client, XvPortPtr pPort, Time ctime, int *p_result) { unsigned long id; TimeStamp time; UpdateCurrentTime(); time = ClientTimeToServerTime(ctime); if (pPort->grab.client && (client != pPort->grab.client)) { *p_result = XvAlreadyGrabbed; return Success; } if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, pPort->time) == EARLIER)) { *p_result = XvInvalidTime; return Success; } if (client == pPort->grab.client) { *p_result = Success; return Success; } id = FakeClientID(client->index); if (!AddResource(id, XvRTGrab, &pPort->grab)) { return BadAlloc; } /* IF THERE IS ACTIVE VIDEO THEN STOP IT */ if ((pPort->pDraw) && (client != pPort->client)) { XvdiStopVideo(NULL, pPort, pPort->pDraw); } pPort->grab.client = client; pPort->grab.id = id; pPort->time = currentTime; *p_result = Success; return Success; } int XvdiUngrabPort(ClientPtr client, XvPortPtr pPort, Time ctime) { TimeStamp time; UpdateCurrentTime(); time = ClientTimeToServerTime(ctime); if ((!pPort->grab.client) || (client != pPort->grab.client)) { return Success; } if ((CompareTimeStamps(time, currentTime) == LATER) || (CompareTimeStamps(time, pPort->time) == EARLIER)) { return Success; } /* FREE THE GRAB RESOURCE; AND SET THE GRAB CLIENT TO NULL */ FreeResource(pPort->grab.id, XvRTGrab); pPort->grab.client = NULL; pPort->time = currentTime; return Success; } int XvdiSelectVideoNotify(ClientPtr client, DrawablePtr pDraw, BOOL onoff) { XvVideoNotifyPtr pn, tpn, fpn; int rc; /* FIND VideoNotify LIST */ rc = dixLookupResourceByType((void **) &pn, pDraw->id, XvRTVideoNotifyList, client, DixWriteAccess); if (rc != Success && rc != BadValue) return rc; /* IF ONE DONES'T EXIST AND NO MASK, THEN JUST RETURN */ if (!onoff && !pn) return Success; /* IF ONE DOESN'T EXIST CREATE IT AND ADD A RESOURCE SO THAT THE LIST WILL BE DELETED WHEN THE DRAWABLE IS DESTROYED */ if (!pn) { if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = NULL; tpn->client = NULL; if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) return BadAlloc; } else { /* LOOK TO SEE IF ENTRY ALREADY EXISTS */ fpn = NULL; tpn = pn; while (tpn) { if (tpn->client == client) { if (!onoff) { tpn->client = NULL; FreeResource(tpn->id, XvRTVideoNotify); } return Success; } if (!tpn->client) fpn = tpn; /* TAKE NOTE OF FREE ENTRY */ tpn = tpn->next; } /* IF TURNING OFF, THEN JUST RETURN */ if (!onoff) return Success; /* IF ONE ISN'T FOUND THEN ALLOCATE ONE AND LINK IT INTO THE LIST */ if (fpn) { tpn = fpn; } else { if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = pn->next; pn->next = tpn; } } /* INIT CLIENT PTR IN CASE WE CAN'T ADD RESOURCE */ /* ADD RESOURCE SO THAT IF CLIENT EXITS THE CLIENT PTR WILL BE CLEARED */ tpn->client = NULL; tpn->id = FakeClientID(client->index); if (!AddResource(tpn->id, XvRTVideoNotify, tpn)) return BadAlloc; tpn->client = client; return Success; } int XvdiSelectPortNotify(ClientPtr client, XvPortPtr pPort, BOOL onoff) { XvPortNotifyPtr pn, tpn; /* SEE IF CLIENT IS ALREADY IN LIST */ tpn = NULL; pn = pPort->pNotify; while (pn) { if (!pn->client) tpn = pn; /* TAKE NOTE OF FREE ENTRY */ if (pn->client == client) break; pn = pn->next; } /* IS THE CLIENT ALREADY ON THE LIST? */ if (pn) { /* REMOVE IT? */ if (!onoff) { pn->client = NULL; FreeResource(pn->id, XvRTPortNotify); } return Success; } /* DIDN'T FIND IT; SO REUSE LIST ELEMENT IF ONE IS FREE OTHERWISE CREATE A NEW ONE AND ADD IT TO THE BEGINNING OF THE LIST */ if (!tpn) { if (!(tpn = malloc(sizeof(XvPortNotifyRec)))) return BadAlloc; tpn->next = pPort->pNotify; pPort->pNotify = tpn; } tpn->client = client; tpn->id = FakeClientID(client->index); if (!AddResource(tpn->id, XvRTPortNotify, tpn)) return BadAlloc; return Success; } int XvdiStopVideo(ClientPtr client, XvPortPtr pPort, DrawablePtr pDraw) { int status; /* IF PORT ISN'T ACTIVE THEN WE'RE DONE */ if (!pPort->pDraw || (pPort->pDraw != pDraw)) { XvdiSendVideoNotify(pPort, pDraw, XvStopped); return Success; } /* CHECK FOR GRAB; IF THIS CLIENT DOESN'T HAVE THE PORT GRABBED THEN INFORM CLIENT OF ITS FAILURE */ if ((client) && (pPort->grab.client) && (pPort->grab.client != client)) { XvdiSendVideoNotify(pPort, pDraw, XvBusy); return Success; } XvdiSendVideoNotify(pPort, pDraw, XvStopped); status = (*pPort->pAdaptor->ddStopVideo) (pPort, pDraw); pPort->pDraw = NULL; pPort->client = (ClientPtr) client; pPort->time = currentTime; return status; } int XvdiMatchPort(XvPortPtr pPort, DrawablePtr pDraw) { XvAdaptorPtr pa; XvFormatPtr pf; int nf; pa = pPort->pAdaptor; if (pa->pScreen != pDraw->pScreen) return BadMatch; nf = pa->nFormats; pf = pa->pFormats; while (nf--) { if (pf->depth == pDraw->depth) return Success; pf++; } return BadMatch; } int XvdiSetPortAttribute(ClientPtr client, XvPortPtr pPort, Atom attribute, INT32 value) { int status; status = (*pPort->pAdaptor->ddSetPortAttribute) (pPort, attribute, value); if (status == Success) XvdiSendPortNotify(pPort, attribute, value); return status; } int XvdiGetPortAttribute(ClientPtr client, XvPortPtr pPort, Atom attribute, INT32 *p_value) { return (*pPort->pAdaptor->ddGetPortAttribute) (pPort, attribute, p_value); } static void _X_COLD WriteSwappedVideoNotifyEvent(xvEvent * from, xvEvent * to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.videoNotify.sequenceNumber, to->u.videoNotify.sequenceNumber); cpswapl(from->u.videoNotify.time, to->u.videoNotify.time); cpswapl(from->u.videoNotify.drawable, to->u.videoNotify.drawable); cpswapl(from->u.videoNotify.port, to->u.videoNotify.port); } static void _X_COLD WriteSwappedPortNotifyEvent(xvEvent * from, xvEvent * to) { to->u.u.type = from->u.u.type; to->u.u.detail = from->u.u.detail; cpswaps(from->u.portNotify.sequenceNumber, to->u.portNotify.sequenceNumber); cpswapl(from->u.portNotify.time, to->u.portNotify.time); cpswapl(from->u.portNotify.port, to->u.portNotify.port); cpswapl(from->u.portNotify.value, to->u.portNotify.value); } void XvFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; free(pAdaptor->name); pAdaptor->name = NULL; if (pAdaptor->pEncodings) { XvEncodingPtr pEncode = pAdaptor->pEncodings; for (i = 0; i < pAdaptor->nEncodings; i++, pEncode++) free(pEncode->name); free(pAdaptor->pEncodings); pAdaptor->pEncodings = NULL; } free(pAdaptor->pFormats); pAdaptor->pFormats = NULL; free(pAdaptor->pPorts); pAdaptor->pPorts = NULL; if (pAdaptor->pAttributes) { XvAttributePtr pAttribute = pAdaptor->pAttributes; for (i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) free(pAttribute->name); free(pAdaptor->pAttributes); pAdaptor->pAttributes = NULL; } free(pAdaptor->pImages); pAdaptor->pImages = NULL; free(pAdaptor->devPriv.ptr); pAdaptor->devPriv.ptr = NULL; } void XvFillColorKey(DrawablePtr pDraw, CARD32 key, RegionPtr region) { ScreenPtr pScreen = pDraw->pScreen; ChangeGCVal pval[2]; BoxPtr pbox = RegionRects(region); int i, nbox = RegionNumRects(region); xRectangle *rects; GCPtr gc; gc = GetScratchGC(pDraw->depth, pScreen); if (!gc) return; pval[0].val = key; pval[1].val = IncludeInferiors; (void) ChangeGC(NullClient, gc, GCForeground | GCSubwindowMode, pval); ValidateGC(pDraw, gc); rects = xallocarray(nbox, sizeof(xRectangle)); if (rects) { for (i = 0; i < nbox; i++, pbox++) { rects[i].x = pbox->x1 - pDraw->x; rects[i].y = pbox->y1 - pDraw->y; rects[i].width = pbox->x2 - pbox->x1; rects[i].height = pbox->y2 - pbox->y1; } (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects); free(rects); } FreeScratchGC(gc); } xorg-server-21.1.16/Xext/xvdisp.c0000644000175000017500000013610414757411105012251 /*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, 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 names of Digital or MIT 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "scrnintstr.h" #include "windowstr.h" #include "pixmapstr.h" #include "gcstruct.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" #include #include #include "xvdix.h" #ifdef MITSHM #include #include "shmint.h" #endif #include "xvdisp.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" unsigned long XvXRTPort; #endif static int SWriteQueryExtensionReply(ClientPtr client, xvQueryExtensionReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->version); swaps(&rep->revision); WriteToClient(client, sz_xvQueryExtensionReply, rep); return Success; } static int SWriteQueryAdaptorsReply(ClientPtr client, xvQueryAdaptorsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_adaptors); WriteToClient(client, sz_xvQueryAdaptorsReply, rep); return Success; } static int SWriteQueryEncodingsReply(ClientPtr client, xvQueryEncodingsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_encodings); WriteToClient(client, sz_xvQueryEncodingsReply, rep); return Success; } static int SWriteAdaptorInfo(ClientPtr client, xvAdaptorInfo * pAdaptor) { swapl(&pAdaptor->base_id); swaps(&pAdaptor->name_size); swaps(&pAdaptor->num_ports); swaps(&pAdaptor->num_formats); WriteToClient(client, sz_xvAdaptorInfo, pAdaptor); return Success; } static int SWriteEncodingInfo(ClientPtr client, xvEncodingInfo * pEncoding) { swapl(&pEncoding->encoding); swaps(&pEncoding->name_size); swaps(&pEncoding->width); swaps(&pEncoding->height); swapl(&pEncoding->rate.numerator); swapl(&pEncoding->rate.denominator); WriteToClient(client, sz_xvEncodingInfo, pEncoding); return Success; } static int SWriteFormat(ClientPtr client, xvFormat * pFormat) { swapl(&pFormat->visual); WriteToClient(client, sz_xvFormat, pFormat); return Success; } static int SWriteAttributeInfo(ClientPtr client, xvAttributeInfo * pAtt) { swapl(&pAtt->flags); swapl(&pAtt->size); swapl(&pAtt->min); swapl(&pAtt->max); WriteToClient(client, sz_xvAttributeInfo, pAtt); return Success; } static int SWriteImageFormatInfo(ClientPtr client, xvImageFormatInfo * pImage) { swapl(&pImage->id); swapl(&pImage->red_mask); swapl(&pImage->green_mask); swapl(&pImage->blue_mask); swapl(&pImage->y_sample_bits); swapl(&pImage->u_sample_bits); swapl(&pImage->v_sample_bits); swapl(&pImage->horz_y_period); swapl(&pImage->horz_u_period); swapl(&pImage->horz_v_period); swapl(&pImage->vert_y_period); swapl(&pImage->vert_u_period); swapl(&pImage->vert_v_period); WriteToClient(client, sz_xvImageFormatInfo, pImage); return Success; } static int SWriteGrabPortReply(ClientPtr client, xvGrabPortReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, sz_xvGrabPortReply, rep); return Success; } static int SWriteGetPortAttributeReply(ClientPtr client, xvGetPortAttributeReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->value); WriteToClient(client, sz_xvGetPortAttributeReply, rep); return Success; } static int SWriteQueryBestSizeReply(ClientPtr client, xvQueryBestSizeReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->actual_width); swaps(&rep->actual_height); WriteToClient(client, sz_xvQueryBestSizeReply, rep); return Success; } static int SWriteQueryPortAttributesReply(ClientPtr client, xvQueryPortAttributesReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->num_attributes); swapl(&rep->text_size); WriteToClient(client, sz_xvQueryPortAttributesReply, rep); return Success; } static int SWriteQueryImageAttributesReply(ClientPtr client, xvQueryImageAttributesReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->num_planes); swapl(&rep->data_size); swaps(&rep->width); swaps(&rep->height); WriteToClient(client, sz_xvQueryImageAttributesReply, rep); return Success; } static int SWriteListImageFormatsReply(ClientPtr client, xvListImageFormatsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->num_formats); WriteToClient(client, sz_xvListImageFormatsReply, rep); return Success; } #define _WriteQueryAdaptorsReply(_c,_d) \ if ((_c)->swapped) SWriteQueryAdaptorsReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryAdaptorsReply, _d) #define _WriteQueryExtensionReply(_c,_d) \ if ((_c)->swapped) SWriteQueryExtensionReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryExtensionReply, _d) #define _WriteQueryEncodingsReply(_c,_d) \ if ((_c)->swapped) SWriteQueryEncodingsReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryEncodingsReply, _d) #define _WriteAdaptorInfo(_c,_d) \ if ((_c)->swapped) SWriteAdaptorInfo(_c, _d); \ else WriteToClient(_c, sz_xvAdaptorInfo, _d) #define _WriteAttributeInfo(_c,_d) \ if ((_c)->swapped) SWriteAttributeInfo(_c, _d); \ else WriteToClient(_c, sz_xvAttributeInfo, _d) #define _WriteEncodingInfo(_c,_d) \ if ((_c)->swapped) SWriteEncodingInfo(_c, _d); \ else WriteToClient(_c, sz_xvEncodingInfo, _d) #define _WriteFormat(_c,_d) \ if ((_c)->swapped) SWriteFormat(_c, _d); \ else WriteToClient(_c, sz_xvFormat, _d) #define _WriteGrabPortReply(_c,_d) \ if ((_c)->swapped) SWriteGrabPortReply(_c, _d); \ else WriteToClient(_c, sz_xvGrabPortReply, _d) #define _WriteGetPortAttributeReply(_c,_d) \ if ((_c)->swapped) SWriteGetPortAttributeReply(_c, _d); \ else WriteToClient(_c, sz_xvGetPortAttributeReply, _d) #define _WriteQueryBestSizeReply(_c,_d) \ if ((_c)->swapped) SWriteQueryBestSizeReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryBestSizeReply, _d) #define _WriteQueryPortAttributesReply(_c,_d) \ if ((_c)->swapped) SWriteQueryPortAttributesReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryPortAttributesReply, _d) #define _WriteQueryImageAttributesReply(_c,_d) \ if ((_c)->swapped) SWriteQueryImageAttributesReply(_c, _d); \ else WriteToClient(_c, sz_xvQueryImageAttributesReply, _d) #define _WriteListImageFormatsReply(_c,_d) \ if ((_c)->swapped) SWriteListImageFormatsReply(_c, _d); \ else WriteToClient(_c, sz_xvListImageFormatsReply, _d) #define _WriteImageFormatInfo(_c,_d) \ if ((_c)->swapped) SWriteImageFormatInfo(_c, _d); \ else WriteToClient(_c, sz_xvImageFormatInfo, _d) static int ProcXvQueryExtension(ClientPtr client) { xvQueryExtensionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .version = XvVersion, .revision = XvRevision }; /* REQUEST(xvQueryExtensionReq); */ REQUEST_SIZE_MATCH(xvQueryExtensionReq); _WriteQueryExtensionReply(client, &rep); return Success; } static int ProcXvQueryAdaptors(ClientPtr client) { xvFormat format; xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; int totalSize, na, nf, rc; int nameSize; XvAdaptorPtr pa; XvFormatPtr pf; WindowPtr pWin; ScreenPtr pScreen; XvScreenPtr pxvs; REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; pScreen = pWin->drawable.pScreen; pxvs = (XvScreenPtr) dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); if (!pxvs) { rep = (xvQueryAdaptorsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .num_adaptors = 0 }; _WriteQueryAdaptorsReply(client, &rep); return Success; } rep = (xvQueryAdaptorsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num_adaptors = pxvs->nAdaptors }; /* CALCULATE THE TOTAL SIZE OF THE REPLY IN BYTES */ totalSize = pxvs->nAdaptors * sz_xvAdaptorInfo; /* FOR EACH ADPATOR ADD UP THE BYTES FOR ENCODINGS AND FORMATS */ na = pxvs->nAdaptors; pa = pxvs->pAdaptors; while (na--) { totalSize += pad_to_int32(strlen(pa->name)); totalSize += pa->nFormats * sz_xvFormat; pa++; } rep.length = bytes_to_int32(totalSize); _WriteQueryAdaptorsReply(client, &rep); na = pxvs->nAdaptors; pa = pxvs->pAdaptors; while (na--) { ainfo.base_id = pa->base_id; ainfo.num_ports = pa->nPorts; ainfo.type = pa->type; ainfo.name_size = nameSize = strlen(pa->name); ainfo.num_formats = pa->nFormats; _WriteAdaptorInfo(client, &ainfo); WriteToClient(client, nameSize, pa->name); nf = pa->nFormats; pf = pa->pFormats; while (nf--) { format.depth = pf->depth; format.visual = pf->visual; _WriteFormat(client, &format); pf++; } pa++; } return Success; } static int ProcXvQueryEncodings(ClientPtr client) { xvEncodingInfo einfo; xvQueryEncodingsReply rep; int totalSize; int nameSize; XvPortPtr pPort; int ne; XvEncodingPtr pe; REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); rep = (xvQueryEncodingsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num_encodings = pPort->pAdaptor->nEncodings }; /* FOR EACH ENCODING ADD UP THE BYTES FOR ENCODING NAMES */ ne = pPort->pAdaptor->nEncodings; pe = pPort->pAdaptor->pEncodings; totalSize = ne * sz_xvEncodingInfo; while (ne--) { totalSize += pad_to_int32(strlen(pe->name)); pe++; } rep.length = bytes_to_int32(totalSize); _WriteQueryEncodingsReply(client, &rep); ne = pPort->pAdaptor->nEncodings; pe = pPort->pAdaptor->pEncodings; while (ne--) { einfo.encoding = pe->id; einfo.name_size = nameSize = strlen(pe->name); einfo.width = pe->width; einfo.height = pe->height; einfo.rate.numerator = pe->rate.numerator; einfo.rate.denominator = pe->rate.denominator; _WriteEncodingInfo(client, &einfo); WriteToClient(client, nameSize, pe->name); pe++; } return Success; } static int ProcXvPutVideo(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; GCPtr pGC; int status; REQUEST(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } return XvdiPutVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); } static int ProcXvPutStill(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; GCPtr pGC; int status; REQUEST(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } return XvdiPutStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); } static int ProcXvGetVideo(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; GCPtr pGC; int status; REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } return XvdiGetVideo(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); } static int ProcXvGetStill(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; GCPtr pGC; int status; REQUEST(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixReadAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } return XvdiGetStill(client, pDraw, pPort, pGC, stuff->vid_x, stuff->vid_y, stuff->vid_w, stuff->vid_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h); } static int ProcXvSelectVideoNotify(ClientPtr client) { DrawablePtr pDraw; int rc; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReceiveAccess); if (rc != Success) return rc; return XvdiSelectVideoNotify(client, pDraw, stuff->onoff); } static int ProcXvSelectPortNotify(ClientPtr client) { XvPortPtr pPort; REQUEST(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); return XvdiSelectPortNotify(client, pPort, stuff->onoff); } static int ProcXvGrabPort(ClientPtr client) { int result, status; XvPortPtr pPort; xvGrabPortReply rep; REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); status = XvdiGrabPort(client, pPort, stuff->time, &result); if (status != Success) { return status; } rep = (xvGrabPortReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .result = result }; _WriteGrabPortReply(client, &rep); return Success; } static int ProcXvUngrabPort(ClientPtr client) { XvPortPtr pPort; REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); return XvdiUngrabPort(client, pPort, stuff->time); } static int ProcXvStopVideo(ClientPtr client) { int ret; DrawablePtr pDraw; XvPortPtr pPort; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); if (ret != Success) return ret; return XvdiStopVideo(client, pPort, pDraw); } static int ProcXvSetPortAttribute(ClientPtr client) { int status; XvPortPtr pPort; REQUEST(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq); VALIDATE_XV_PORT(stuff->port, pPort, DixSetAttrAccess); if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; return BadAtom; } status = XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value); if (status == BadMatch) client->errorValue = stuff->attribute; else client->errorValue = stuff->value; return status; } static int ProcXvGetPortAttribute(ClientPtr client) { INT32 value; int status; XvPortPtr pPort; xvGetPortAttributeReply rep; REQUEST(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq); VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; return BadAtom; } status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value); if (status != Success) { client->errorValue = stuff->attribute; return status; } rep = (xvGetPortAttributeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .value = value }; _WriteGetPortAttributeReply(client, &rep); return Success; } static int ProcXvQueryBestSize(ClientPtr client) { unsigned int actual_width, actual_height; XvPortPtr pPort; xvQueryBestSizeReply rep; REQUEST(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); (*pPort->pAdaptor->ddQueryBestSize) (pPort, stuff->motion, stuff->vid_w, stuff->vid_h, stuff->drw_w, stuff->drw_h, &actual_width, &actual_height); rep = (xvQueryBestSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .actual_width = actual_width, .actual_height = actual_height }; _WriteQueryBestSizeReply(client, &rep); return Success; } static int ProcXvQueryPortAttributes(ClientPtr client) { int size, i; XvPortPtr pPort; XvAttributePtr pAtt; xvQueryPortAttributesReply rep; xvAttributeInfo Info; REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); VALIDATE_XV_PORT(stuff->port, pPort, DixGetAttrAccess); rep = (xvQueryPortAttributesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num_attributes = pPort->pAdaptor->nAttributes, .text_size = 0 }; for (i = 0, pAtt = pPort->pAdaptor->pAttributes; i < pPort->pAdaptor->nAttributes; i++, pAtt++) { rep.text_size += pad_to_int32(strlen(pAtt->name) + 1); } rep.length = (pPort->pAdaptor->nAttributes * sz_xvAttributeInfo) + rep.text_size; rep.length >>= 2; _WriteQueryPortAttributesReply(client, &rep); for (i = 0, pAtt = pPort->pAdaptor->pAttributes; i < pPort->pAdaptor->nAttributes; i++, pAtt++) { size = strlen(pAtt->name) + 1; /* pass the NULL */ Info.flags = pAtt->flags; Info.min = pAtt->min_value; Info.max = pAtt->max_value; Info.size = pad_to_int32(size); _WriteAttributeInfo(client, &Info); WriteToClient(client, size, pAtt->name); } return Success; } static int ProcXvPutImage(ClientPtr client) { DrawablePtr pDraw; XvPortPtr pPort; XvImagePtr pImage = NULL; GCPtr pGC; int status, i, size; CARD16 width, height; REQUEST(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } for (i = 0; i < pPort->pAdaptor->nImages; i++) { if (pPort->pAdaptor->pImages[i].id == stuff->id) { pImage = &(pPort->pAdaptor->pImages[i]); break; } } if (!pImage) return BadMatch; width = stuff->width; height = stuff->height; size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, NULL, NULL); size += sizeof(xvPutImageReq); size = bytes_to_int32(size); if ((width < stuff->width) || (height < stuff->height)) return BadValue; if (client->req_len < size) return BadLength; return XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h, pImage, (unsigned char *) (&stuff[1]), FALSE, stuff->width, stuff->height); } #ifdef MITSHM static int ProcXvShmPutImage(ClientPtr client) { ShmDescPtr shmdesc; DrawablePtr pDraw; XvPortPtr pPort; XvImagePtr pImage = NULL; GCPtr pGC; int status, size_needed, i; CARD16 width, height; REQUEST(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq); VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; return BadMatch; } status = XvdiMatchPort(pPort, pDraw); if (status != Success) { return status; } for (i = 0; i < pPort->pAdaptor->nImages; i++) { if (pPort->pAdaptor->pImages[i].id == stuff->id) { pImage = &(pPort->pAdaptor->pImages[i]); break; } } if (!pImage) return BadMatch; status = dixLookupResourceByType((void **) &shmdesc, stuff->shmseg, ShmSegType, serverClient, DixReadAccess); if (status != Success) return status; width = stuff->width; height = stuff->height; size_needed = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, NULL, NULL); if ((size_needed + stuff->offset) > shmdesc->size) return BadAccess; if ((width < stuff->width) || (height < stuff->height)) return BadValue; status = XvdiPutImage(client, pDraw, pPort, pGC, stuff->src_x, stuff->src_y, stuff->src_w, stuff->src_h, stuff->drw_x, stuff->drw_y, stuff->drw_w, stuff->drw_h, pImage, (unsigned char *) shmdesc->addr + stuff->offset, stuff->send_event, stuff->width, stuff->height); if ((status == Success) && stuff->send_event) { xShmCompletionEvent ev = { .type = ShmCompletionCode, .drawable = stuff->drawable, .minorEvent = xv_ShmPutImage, .majorEvent = XvReqCode, .shmseg = stuff->shmseg, .offset = stuff->offset }; WriteEventsToClient(client, 1, (xEvent *) &ev); } return status; } #else /* !MITSHM */ static int ProcXvShmPutImage(ClientPtr client) { return BadImplementation; } #endif #ifdef XvMCExtension #include "xvmcext.h" #endif static int ProcXvQueryImageAttributes(ClientPtr client) { xvQueryImageAttributesReply rep; int size, num_planes, i; CARD16 width, height; XvImagePtr pImage = NULL; XvPortPtr pPort; int *offsets; int *pitches; int planeLength; REQUEST(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); for (i = 0; i < pPort->pAdaptor->nImages; i++) { if (pPort->pAdaptor->pImages[i].id == stuff->id) { pImage = &(pPort->pAdaptor->pImages[i]); break; } } #ifdef XvMCExtension if (!pImage) pImage = XvMCFindXvImage(pPort, stuff->id); #endif if (!pImage) return BadMatch; num_planes = pImage->num_planes; if (!(offsets = malloc(num_planes << 3))) return BadAlloc; pitches = offsets + num_planes; width = stuff->width; height = stuff->height; size = (*pPort->pAdaptor->ddQueryImageAttributes) (pPort, pImage, &width, &height, offsets, pitches); rep = (xvQueryImageAttributesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = planeLength = num_planes << 1, .num_planes = num_planes, .width = width, .height = height, .data_size = size }; _WriteQueryImageAttributesReply(client, &rep); if (client->swapped) SwapLongs((CARD32 *) offsets, planeLength); WriteToClient(client, planeLength << 2, offsets); free(offsets); return Success; } static int ProcXvListImageFormats(ClientPtr client) { XvPortPtr pPort; XvImagePtr pImage; int i; xvListImageFormatsReply rep; xvImageFormatInfo info; REQUEST(xvListImageFormatsReq); REQUEST_SIZE_MATCH(xvListImageFormatsReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); rep = (xvListImageFormatsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num_formats = pPort->pAdaptor->nImages, .length = bytes_to_int32(pPort->pAdaptor->nImages * sz_xvImageFormatInfo) }; _WriteListImageFormatsReply(client, &rep); pImage = pPort->pAdaptor->pImages; for (i = 0; i < pPort->pAdaptor->nImages; i++, pImage++) { info.id = pImage->id; info.type = pImage->type; info.byte_order = pImage->byte_order; memcpy(&info.guid, pImage->guid, 16); info.bpp = pImage->bits_per_pixel; info.num_planes = pImage->num_planes; info.depth = pImage->depth; info.red_mask = pImage->red_mask; info.green_mask = pImage->green_mask; info.blue_mask = pImage->blue_mask; info.format = pImage->format; info.y_sample_bits = pImage->y_sample_bits; info.u_sample_bits = pImage->u_sample_bits; info.v_sample_bits = pImage->v_sample_bits; info.horz_y_period = pImage->horz_y_period; info.horz_u_period = pImage->horz_u_period; info.horz_v_period = pImage->horz_v_period; info.vert_y_period = pImage->vert_y_period; info.vert_u_period = pImage->vert_u_period; info.vert_v_period = pImage->vert_v_period; memcpy(&info.comp_order, pImage->component_order, 32); info.scanline_order = pImage->scanline_order; _WriteImageFormatInfo(client, &info); } return Success; } static int (*XvProcVector[xvNumRequests]) (ClientPtr) = { ProcXvQueryExtension, ProcXvQueryAdaptors, ProcXvQueryEncodings, ProcXvGrabPort, ProcXvUngrabPort, ProcXvPutVideo, ProcXvPutStill, ProcXvGetVideo, ProcXvGetStill, ProcXvStopVideo, ProcXvSelectVideoNotify, ProcXvSelectPortNotify, ProcXvQueryBestSize, ProcXvSetPortAttribute, ProcXvGetPortAttribute, ProcXvQueryPortAttributes, ProcXvListImageFormats, ProcXvQueryImageAttributes, ProcXvPutImage, ProcXvShmPutImage,}; int ProcXvDispatch(ClientPtr client) { REQUEST(xReq); UpdateCurrentTime(); if (stuff->data >= xvNumRequests) { return BadRequest; } return XvProcVector[stuff->data] (client); } /* Swapped Procs */ static int _X_COLD SProcXvQueryExtension(ClientPtr client) { REQUEST(xvQueryExtensionReq); REQUEST_SIZE_MATCH(xvQueryExtensionReq); swaps(&stuff->length); return XvProcVector[xv_QueryExtension] (client); } static int _X_COLD SProcXvQueryAdaptors(ClientPtr client) { REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); swaps(&stuff->length); swapl(&stuff->window); return XvProcVector[xv_QueryAdaptors] (client); } static int _X_COLD SProcXvQueryEncodings(ClientPtr client) { REQUEST(xvQueryEncodingsReq); REQUEST_SIZE_MATCH(xvQueryEncodingsReq); swaps(&stuff->length); swapl(&stuff->port); return XvProcVector[xv_QueryEncodings] (client); } static int _X_COLD SProcXvGrabPort(ClientPtr client) { REQUEST(xvGrabPortReq); REQUEST_SIZE_MATCH(xvGrabPortReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->time); return XvProcVector[xv_GrabPort] (client); } static int _X_COLD SProcXvUngrabPort(ClientPtr client) { REQUEST(xvUngrabPortReq); REQUEST_SIZE_MATCH(xvUngrabPortReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->time); return XvProcVector[xv_UngrabPort] (client); } static int _X_COLD SProcXvPutVideo(ClientPtr client) { REQUEST(xvPutVideoReq); REQUEST_SIZE_MATCH(xvPutVideoReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->vid_x); swaps(&stuff->vid_y); swaps(&stuff->vid_w); swaps(&stuff->vid_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); return XvProcVector[xv_PutVideo] (client); } static int _X_COLD SProcXvPutStill(ClientPtr client) { REQUEST(xvPutStillReq); REQUEST_SIZE_MATCH(xvPutStillReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->vid_x); swaps(&stuff->vid_y); swaps(&stuff->vid_w); swaps(&stuff->vid_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); return XvProcVector[xv_PutStill] (client); } static int _X_COLD SProcXvGetVideo(ClientPtr client) { REQUEST(xvGetVideoReq); REQUEST_SIZE_MATCH(xvGetVideoReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->vid_x); swaps(&stuff->vid_y); swaps(&stuff->vid_w); swaps(&stuff->vid_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); return XvProcVector[xv_GetVideo] (client); } static int _X_COLD SProcXvGetStill(ClientPtr client) { REQUEST(xvGetStillReq); REQUEST_SIZE_MATCH(xvGetStillReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swaps(&stuff->vid_x); swaps(&stuff->vid_y); swaps(&stuff->vid_w); swaps(&stuff->vid_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); return XvProcVector[xv_GetStill] (client); } static int _X_COLD SProcXvPutImage(ClientPtr client) { REQUEST(xvPutImageReq); REQUEST_AT_LEAST_SIZE(xvPutImageReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swapl(&stuff->id); swaps(&stuff->src_x); swaps(&stuff->src_y); swaps(&stuff->src_w); swaps(&stuff->src_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); swaps(&stuff->width); swaps(&stuff->height); return XvProcVector[xv_PutImage] (client); } #ifdef MITSHM static int _X_COLD SProcXvShmPutImage(ClientPtr client) { REQUEST(xvShmPutImageReq); REQUEST_SIZE_MATCH(xvShmPutImageReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); swapl(&stuff->gc); swapl(&stuff->shmseg); swapl(&stuff->id); swapl(&stuff->offset); swaps(&stuff->src_x); swaps(&stuff->src_y); swaps(&stuff->src_w); swaps(&stuff->src_h); swaps(&stuff->drw_x); swaps(&stuff->drw_y); swaps(&stuff->drw_w); swaps(&stuff->drw_h); swaps(&stuff->width); swaps(&stuff->height); return XvProcVector[xv_ShmPutImage] (client); } #else /* MITSHM */ #define SProcXvShmPutImage ProcXvShmPutImage #endif static int _X_COLD SProcXvSelectVideoNotify(ClientPtr client) { REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); swaps(&stuff->length); swapl(&stuff->drawable); return XvProcVector[xv_SelectVideoNotify] (client); } static int _X_COLD SProcXvSelectPortNotify(ClientPtr client) { REQUEST(xvSelectPortNotifyReq); REQUEST_SIZE_MATCH(xvSelectPortNotifyReq); swaps(&stuff->length); swapl(&stuff->port); return XvProcVector[xv_SelectPortNotify] (client); } static int _X_COLD SProcXvStopVideo(ClientPtr client) { REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->drawable); return XvProcVector[xv_StopVideo] (client); } static int _X_COLD SProcXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); REQUEST_SIZE_MATCH(xvSetPortAttributeReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->attribute); swapl(&stuff->value); return XvProcVector[xv_SetPortAttribute] (client); } static int _X_COLD SProcXvGetPortAttribute(ClientPtr client) { REQUEST(xvGetPortAttributeReq); REQUEST_SIZE_MATCH(xvGetPortAttributeReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->attribute); return XvProcVector[xv_GetPortAttribute] (client); } static int _X_COLD SProcXvQueryBestSize(ClientPtr client) { REQUEST(xvQueryBestSizeReq); REQUEST_SIZE_MATCH(xvQueryBestSizeReq); swaps(&stuff->length); swapl(&stuff->port); swaps(&stuff->vid_w); swaps(&stuff->vid_h); swaps(&stuff->drw_w); swaps(&stuff->drw_h); return XvProcVector[xv_QueryBestSize] (client); } static int _X_COLD SProcXvQueryPortAttributes(ClientPtr client) { REQUEST(xvQueryPortAttributesReq); REQUEST_SIZE_MATCH(xvQueryPortAttributesReq); swaps(&stuff->length); swapl(&stuff->port); return XvProcVector[xv_QueryPortAttributes] (client); } static int _X_COLD SProcXvQueryImageAttributes(ClientPtr client) { REQUEST(xvQueryImageAttributesReq); REQUEST_SIZE_MATCH(xvQueryImageAttributesReq); swaps(&stuff->length); swapl(&stuff->port); swapl(&stuff->id); swaps(&stuff->width); swaps(&stuff->height); return XvProcVector[xv_QueryImageAttributes] (client); } static int _X_COLD SProcXvListImageFormats(ClientPtr client) { REQUEST(xvListImageFormatsReq); REQUEST_SIZE_MATCH(xvListImageFormatsReq); swaps(&stuff->length); swapl(&stuff->port); return XvProcVector[xv_ListImageFormats] (client); } static int (*SXvProcVector[xvNumRequests]) (ClientPtr) = { SProcXvQueryExtension, SProcXvQueryAdaptors, SProcXvQueryEncodings, SProcXvGrabPort, SProcXvUngrabPort, SProcXvPutVideo, SProcXvPutStill, SProcXvGetVideo, SProcXvGetStill, SProcXvStopVideo, SProcXvSelectVideoNotify, SProcXvSelectPortNotify, SProcXvQueryBestSize, SProcXvSetPortAttribute, SProcXvGetPortAttribute, SProcXvQueryPortAttributes, SProcXvListImageFormats, SProcXvQueryImageAttributes, SProcXvPutImage, SProcXvShmPutImage,}; int _X_COLD SProcXvDispatch(ClientPtr client) { REQUEST(xReq); UpdateCurrentTime(); if (stuff->data >= xvNumRequests) { return BadRequest; } return SXvProcVector[stuff->data] (client); } #ifdef PANORAMIX static int XineramaXvStopVideo(ClientPtr client) { int result, i; PanoramiXRes *draw, *port; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->drawable = draw->info[i].id; stuff->port = port->info[i].id; result = ProcXvStopVideo(client); } } return result; } static int XineramaXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); PanoramiXRes *port; int result, i; REQUEST_SIZE_MATCH(xvSetPortAttributeReq); result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->port = port->info[i].id; result = ProcXvSetPortAttribute(client); } } return result; } #ifdef MITSHM static int XineramaXvShmPutImage(ClientPtr client) { REQUEST(xvShmPutImageReq); PanoramiXRes *draw, *gc, *port; Bool send_event; Bool isRoot; int result, i, x, y; REQUEST_SIZE_MATCH(xvShmPutImageReq); send_event = stuff->send_event; result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; x = stuff->drw_x; y = stuff->drw_y; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->drawable = draw->info[i].id; stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; if (isRoot) { stuff->drw_x -= screenInfo.screens[i]->x; stuff->drw_y -= screenInfo.screens[i]->y; } stuff->send_event = (send_event && !i) ? 1 : 0; result = ProcXvShmPutImage(client); } } return result; } #else #define XineramaXvShmPutImage ProcXvShmPutImage #endif static int XineramaXvPutImage(ClientPtr client) { REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutImageReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; x = stuff->drw_x; y = stuff->drw_y; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->drawable = draw->info[i].id; stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; if (isRoot) { stuff->drw_x -= screenInfo.screens[i]->x; stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutImage(client); } } return result; } static int XineramaXvPutVideo(ClientPtr client) { REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutVideoReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; x = stuff->drw_x; y = stuff->drw_y; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->drawable = draw->info[i].id; stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; if (isRoot) { stuff->drw_x -= screenInfo.screens[i]->x; stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutVideo(client); } } return result; } static int XineramaXvPutStill(ClientPtr client) { REQUEST(xvPutImageReq); PanoramiXRes *draw, *gc, *port; Bool isRoot; int result, i, x, y; REQUEST_AT_LEAST_SIZE(xvPutImageReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; x = stuff->drw_x; y = stuff->drw_y; FOR_NSCREENS_BACKWARD(i) { if (port->info[i].id) { stuff->drawable = draw->info[i].id; stuff->port = port->info[i].id; stuff->gc = gc->info[i].id; stuff->drw_x = x; stuff->drw_y = y; if (isRoot) { stuff->drw_x -= screenInfo.screens[i]->x; stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutStill(client); } } return result; } static Bool isImageAdaptor(XvAdaptorPtr pAdapt) { return (pAdapt->type & XvImageMask) && (pAdapt->nImages > 0); } static Bool hasOverlay(XvAdaptorPtr pAdapt) { int i; for (i = 0; i < pAdapt->nAttributes; i++) if (!strcmp(pAdapt->pAttributes[i].name, "XV_COLORKEY")) return TRUE; return FALSE; } static XvAdaptorPtr matchAdaptor(ScreenPtr pScreen, XvAdaptorPtr refAdapt, Bool isOverlay) { int i; XvScreenPtr xvsp = dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); /* Do not try to go on if xv is not supported on this screen */ if (xvsp == NULL) return NULL; /* if the adaptor has the same name it's a perfect match */ for (i = 0; i < xvsp->nAdaptors; i++) { XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; if (!strcmp(refAdapt->name, pAdapt->name)) return pAdapt; } /* otherwise we only look for XvImage adaptors */ if (!isImageAdaptor(refAdapt)) return NULL; /* prefer overlay/overlay non-overlay/non-overlay pairing */ for (i = 0; i < xvsp->nAdaptors; i++) { XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; if (isImageAdaptor(pAdapt) && isOverlay == hasOverlay(pAdapt)) return pAdapt; } /* but we'll take any XvImage pairing if we can get it */ for (i = 0; i < xvsp->nAdaptors; i++) { XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; if (isImageAdaptor(pAdapt)) return pAdapt; } return NULL; } void XineramifyXv(void) { XvScreenPtr xvsp0 = dixLookupPrivate(&screenInfo.screens[0]->devPrivates, XvGetScreenKey()); XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; int i, j, k; XvXRTPort = CreateNewResourceType(XineramaDeleteResource, "XvXRTPort"); if (!xvsp0 || !XvXRTPort) return; SetResourceTypeErrorValue(XvXRTPort, _XvBadPort); for (i = 0; i < xvsp0->nAdaptors; i++) { Bool isOverlay; XvAdaptorPtr refAdapt = xvsp0->pAdaptors + i; if (!(refAdapt->type & XvInputMask)) continue; MatchingAdaptors[0] = refAdapt; isOverlay = hasOverlay(refAdapt); FOR_NSCREENS_FORWARD_SKIP(j) MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay); /* now create a resource for each port */ for (j = 0; j < refAdapt->nPorts; j++) { PanoramiXRes *port = malloc(sizeof(PanoramiXRes)); if (!port) break; FOR_NSCREENS(k) { if (MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) port->info[k].id = MatchingAdaptors[k]->base_id + j; else port->info[k].id = 0; } AddResource(port->info[0].id, XvXRTPort, port); } } /* munge the dispatch vector */ XvProcVector[xv_PutVideo] = XineramaXvPutVideo; XvProcVector[xv_PutStill] = XineramaXvPutStill; XvProcVector[xv_StopVideo] = XineramaXvStopVideo; XvProcVector[xv_SetPortAttribute] = XineramaXvSetPortAttribute; XvProcVector[xv_PutImage] = XineramaXvPutImage; XvProcVector[xv_ShmPutImage] = XineramaXvShmPutImage; } #endif /* PANORAMIX */ void XvResetProcVector(void) { #ifdef PANORAMIX XvProcVector[xv_PutVideo] = ProcXvPutVideo; XvProcVector[xv_PutStill] = ProcXvPutStill; XvProcVector[xv_StopVideo] = ProcXvStopVideo; XvProcVector[xv_SetPortAttribute] = ProcXvSetPortAttribute; XvProcVector[xv_PutImage] = ProcXvPutImage; XvProcVector[xv_ShmPutImage] = ProcXvShmPutImage; #endif } xorg-server-21.1.16/Xext/xvmc.c0000644000175000017500000005456014757411105011716 #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "resource.h" #include "scrnintstr.h" #include "extnsionst.h" #include "extinit.h" #include "servermd.h" #include #include "xvdix.h" #include #include #include #include "xvmcext.h" #include "protocol-versions.h" #ifdef HAS_XVMCSHM #include #include #include #endif /* HAS_XVMCSHM */ #define DR_CLIENT_DRIVER_NAME_SIZE 48 #define DR_BUSID_SIZE 48 static DevPrivateKeyRec XvMCScreenKeyRec; #define XvMCScreenKey (&XvMCScreenKeyRec) static Bool XvMCInUse; int XvMCReqCode; int XvMCEventBase; static RESTYPE XvMCRTContext; static RESTYPE XvMCRTSurface; static RESTYPE XvMCRTSubpicture; int (*XvMCScreenInitProc)(ScreenPtr, int, XvMCAdaptorPtr) = NULL; typedef struct { int num_adaptors; XvMCAdaptorPtr adaptors; CloseScreenProcPtr CloseScreen; char clientDriverName[DR_CLIENT_DRIVER_NAME_SIZE]; char busID[DR_BUSID_SIZE]; int major; int minor; int patchLevel; } XvMCScreenRec, *XvMCScreenPtr; #define XVMC_GET_PRIVATE(pScreen) \ (XvMCScreenPtr)(dixLookupPrivate(&(pScreen)->devPrivates, XvMCScreenKey)) static int XvMCDestroyContextRes(void *data, XID id) { XvMCContextPtr pContext = (XvMCContextPtr) data; pContext->refcnt--; if (!pContext->refcnt) { XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext) (pContext); free(pContext); } return Success; } static int XvMCDestroySurfaceRes(void *data, XID id) { XvMCSurfacePtr pSurface = (XvMCSurfacePtr) data; XvMCContextPtr pContext = pSurface->context; XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface) (pSurface); free(pSurface); XvMCDestroyContextRes((void *) pContext, pContext->context_id); return Success; } static int XvMCDestroySubpictureRes(void *data, XID id) { XvMCSubpicturePtr pSubpict = (XvMCSubpicturePtr) data; XvMCContextPtr pContext = pSubpict->context; XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture) (pSubpict); free(pSubpict); XvMCDestroyContextRes((void *) pContext, pContext->context_id); return Success; } static int ProcXvMCQueryVersion(ClientPtr client) { xvmcQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .major = SERVER_XVMC_MAJOR_VERSION, .minor = SERVER_XVMC_MINOR_VERSION }; /* REQUEST(xvmcQueryVersionReq); */ REQUEST_SIZE_MATCH(xvmcQueryVersionReq); WriteToClient(client, sizeof(xvmcQueryVersionReply), &rep); return Success; } static int ProcXvMCListSurfaceTypes(ClientPtr client) { XvPortPtr pPort; int i; XvMCScreenPtr pScreenPriv; xvmcListSurfaceTypesReply rep; xvmcSurfaceInfo info; XvMCAdaptorPtr adaptor = NULL; XvMCSurfaceInfoPtr surface; int num_surfaces; REQUEST(xvmcListSurfaceTypesReq); REQUEST_SIZE_MATCH(xvmcListSurfaceTypesReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); if (XvMCInUse) { /* any adaptors at all */ ScreenPtr pScreen = pPort->pAdaptor->pScreen; if ((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ for (i = 0; i < pScreenPriv->num_adaptors; i++) { if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { adaptor = &(pScreenPriv->adaptors[i]); break; } } } } num_surfaces = (adaptor) ? adaptor->num_surfaces : 0; rep = (xvmcListSurfaceTypesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num = num_surfaces, .length = bytes_to_int32(num_surfaces * sizeof(xvmcSurfaceInfo)), }; WriteToClient(client, sizeof(xvmcListSurfaceTypesReply), &rep); for (i = 0; i < num_surfaces; i++) { surface = adaptor->surfaces[i]; info.surface_type_id = surface->surface_type_id; info.chroma_format = surface->chroma_format; info.max_width = surface->max_width; info.max_height = surface->max_height; info.subpicture_max_width = surface->subpicture_max_width; info.subpicture_max_height = surface->subpicture_max_height; info.mc_type = surface->mc_type; info.flags = surface->flags; WriteToClient(client, sizeof(xvmcSurfaceInfo), &info); } return Success; } static int ProcXvMCCreateContext(ClientPtr client) { XvPortPtr pPort; CARD32 *data = NULL; int dwords = 0; int i, result, adapt_num = -1; ScreenPtr pScreen; XvMCContextPtr pContext; XvMCScreenPtr pScreenPriv; XvMCAdaptorPtr adaptor = NULL; XvMCSurfaceInfoPtr surface = NULL; xvmcCreateContextReply rep; REQUEST(xvmcCreateContextReq); REQUEST_SIZE_MATCH(xvmcCreateContextReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; if (!XvMCInUse) /* no XvMC adaptors */ return BadMatch; if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ return BadMatch; for (i = 0; i < pScreenPriv->num_adaptors; i++) { if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { adaptor = &(pScreenPriv->adaptors[i]); adapt_num = i; break; } } if (adapt_num < 0) /* none this port */ return BadMatch; for (i = 0; i < adaptor->num_surfaces; i++) { if (adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { surface = adaptor->surfaces[i]; break; } } /* adaptor doesn't support this suface_type_id */ if (!surface) return BadMatch; if ((stuff->width > surface->max_width) || (stuff->height > surface->max_height)) return BadValue; if (!(pContext = malloc(sizeof(XvMCContextRec)))) { return BadAlloc; } pContext->pScreen = pScreen; pContext->adapt_num = adapt_num; pContext->context_id = stuff->context_id; pContext->surface_type_id = stuff->surface_type_id; pContext->width = stuff->width; pContext->height = stuff->height; pContext->flags = stuff->flags; pContext->refcnt = 1; result = (*adaptor->CreateContext) (pPort, pContext, &dwords, &data); if (result != Success) { free(pContext); return result; } if (!AddResource(pContext->context_id, XvMCRTContext, pContext)) { free(data); return BadAlloc; } rep = (xvmcCreateContextReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = dwords, .width_actual = pContext->width, .height_actual = pContext->height, .flags_return = pContext->flags }; WriteToClient(client, sizeof(xvmcCreateContextReply), &rep); if (dwords) WriteToClient(client, dwords << 2, data); free(data); return Success; } static int ProcXvMCDestroyContext(ClientPtr client) { void *val; int rc; REQUEST(xvmcDestroyContextReq); REQUEST_SIZE_MATCH(xvmcDestroyContextReq); rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->context_id, RT_NONE); return Success; } static int ProcXvMCCreateSurface(ClientPtr client) { CARD32 *data = NULL; int dwords = 0; int result; XvMCContextPtr pContext; XvMCSurfacePtr pSurface; XvMCScreenPtr pScreenPriv; xvmcCreateSurfaceReply rep; REQUEST(xvmcCreateSurfaceReq); REQUEST_SIZE_MATCH(xvmcCreateSurfaceReq); result = dixLookupResourceByType((void **) &pContext, stuff->context_id, XvMCRTContext, client, DixUseAccess); if (result != Success) return result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); if (!(pSurface = malloc(sizeof(XvMCSurfaceRec)))) return BadAlloc; pSurface->surface_id = stuff->surface_id; pSurface->surface_type_id = pContext->surface_type_id; pSurface->context = pContext; result = (*pScreenPriv->adaptors[pContext->adapt_num].CreateSurface) (pSurface, &dwords, &data); if (result != Success) { free(pSurface); return result; } if (!AddResource(pSurface->surface_id, XvMCRTSurface, pSurface)) { free(data); return BadAlloc; } rep = (xvmcCreateSurfaceReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = dwords }; WriteToClient(client, sizeof(xvmcCreateSurfaceReply), &rep); if (dwords) WriteToClient(client, dwords << 2, data); free(data); pContext->refcnt++; return Success; } static int ProcXvMCDestroySurface(ClientPtr client) { void *val; int rc; REQUEST(xvmcDestroySurfaceReq); REQUEST_SIZE_MATCH(xvmcDestroySurfaceReq); rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->surface_id, RT_NONE); return Success; } static int ProcXvMCCreateSubpicture(ClientPtr client) { Bool image_supported = FALSE; CARD32 *data = NULL; int i, result, dwords = 0; XvMCContextPtr pContext; XvMCSubpicturePtr pSubpicture; XvMCScreenPtr pScreenPriv; xvmcCreateSubpictureReply rep; XvMCAdaptorPtr adaptor; XvMCSurfaceInfoPtr surface = NULL; REQUEST(xvmcCreateSubpictureReq); REQUEST_SIZE_MATCH(xvmcCreateSubpictureReq); result = dixLookupResourceByType((void **) &pContext, stuff->context_id, XvMCRTContext, client, DixUseAccess); if (result != Success) return result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); adaptor = &(pScreenPriv->adaptors[pContext->adapt_num]); /* find which surface this context supports */ for (i = 0; i < adaptor->num_surfaces; i++) { if (adaptor->surfaces[i]->surface_type_id == pContext->surface_type_id) { surface = adaptor->surfaces[i]; break; } } if (!surface) return BadMatch; /* make sure this surface supports that xvimage format */ if (!surface->compatible_subpictures) return BadMatch; for (i = 0; i < surface->compatible_subpictures->num_xvimages; i++) { if (surface->compatible_subpictures->xvimage_ids[i] == stuff->xvimage_id) { image_supported = TRUE; break; } } if (!image_supported) return BadMatch; /* make sure the size is OK */ if ((stuff->width > surface->subpicture_max_width) || (stuff->height > surface->subpicture_max_height)) return BadValue; if (!(pSubpicture = malloc(sizeof(XvMCSubpictureRec)))) return BadAlloc; pSubpicture->subpicture_id = stuff->subpicture_id; pSubpicture->xvimage_id = stuff->xvimage_id; pSubpicture->width = stuff->width; pSubpicture->height = stuff->height; pSubpicture->num_palette_entries = 0; /* overwritten by DDX */ pSubpicture->entry_bytes = 0; /* overwritten by DDX */ pSubpicture->component_order[0] = 0; /* overwritten by DDX */ pSubpicture->component_order[1] = 0; pSubpicture->component_order[2] = 0; pSubpicture->component_order[3] = 0; pSubpicture->context = pContext; result = (*pScreenPriv->adaptors[pContext->adapt_num]. CreateSubpicture) (pSubpicture, &dwords, &data); if (result != Success) { free(pSubpicture); return result; } if (!AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture)) { free(data); return BadAlloc; } rep = (xvmcCreateSubpictureReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = dwords, .width_actual = pSubpicture->width, .height_actual = pSubpicture->height, .num_palette_entries = pSubpicture->num_palette_entries, .entry_bytes = pSubpicture->entry_bytes, .component_order[0] = pSubpicture->component_order[0], .component_order[1] = pSubpicture->component_order[1], .component_order[2] = pSubpicture->component_order[2], .component_order[3] = pSubpicture->component_order[3] }; WriteToClient(client, sizeof(xvmcCreateSubpictureReply), &rep); if (dwords) WriteToClient(client, dwords << 2, data); free(data); pContext->refcnt++; return Success; } static int ProcXvMCDestroySubpicture(ClientPtr client) { void *val; int rc; REQUEST(xvmcDestroySubpictureReq); REQUEST_SIZE_MATCH(xvmcDestroySubpictureReq); rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->subpicture_id, RT_NONE); return Success; } static int ProcXvMCListSubpictureTypes(ClientPtr client) { XvPortPtr pPort; xvmcListSubpictureTypesReply rep; XvMCScreenPtr pScreenPriv; ScreenPtr pScreen; XvMCAdaptorPtr adaptor = NULL; XvMCSurfaceInfoPtr surface = NULL; xvImageFormatInfo info; XvImagePtr pImage; int i, j; REQUEST(xvmcListSubpictureTypesReq); REQUEST_SIZE_MATCH(xvmcListSubpictureTypesReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; if (!dixPrivateKeyRegistered(XvMCScreenKey)) return BadMatch; /* No XvMC adaptors */ if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) return BadMatch; /* None this screen */ for (i = 0; i < pScreenPriv->num_adaptors; i++) { if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { adaptor = &(pScreenPriv->adaptors[i]); break; } } if (!adaptor) return BadMatch; for (i = 0; i < adaptor->num_surfaces; i++) { if (adaptor->surfaces[i]->surface_type_id == stuff->surface_type_id) { surface = adaptor->surfaces[i]; break; } } if (!surface) return BadMatch; rep = (xvmcListSubpictureTypesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .num = 0 }; if (surface->compatible_subpictures) rep.num = surface->compatible_subpictures->num_xvimages; rep.length = bytes_to_int32(rep.num * sizeof(xvImageFormatInfo)); WriteToClient(client, sizeof(xvmcListSubpictureTypesReply), &rep); for (i = 0; i < rep.num; i++) { pImage = NULL; for (j = 0; j < adaptor->num_subpictures; j++) { if (surface->compatible_subpictures->xvimage_ids[i] == adaptor->subpictures[j]->id) { pImage = adaptor->subpictures[j]; break; } } if (!pImage) return BadImplementation; info.id = pImage->id; info.type = pImage->type; info.byte_order = pImage->byte_order; memcpy(&info.guid, pImage->guid, 16); info.bpp = pImage->bits_per_pixel; info.num_planes = pImage->num_planes; info.depth = pImage->depth; info.red_mask = pImage->red_mask; info.green_mask = pImage->green_mask; info.blue_mask = pImage->blue_mask; info.format = pImage->format; info.y_sample_bits = pImage->y_sample_bits; info.u_sample_bits = pImage->u_sample_bits; info.v_sample_bits = pImage->v_sample_bits; info.horz_y_period = pImage->horz_y_period; info.horz_u_period = pImage->horz_u_period; info.horz_v_period = pImage->horz_v_period; info.vert_y_period = pImage->vert_y_period; info.vert_u_period = pImage->vert_u_period; info.vert_v_period = pImage->vert_v_period; memcpy(&info.comp_order, pImage->component_order, 32); info.scanline_order = pImage->scanline_order; WriteToClient(client, sizeof(xvImageFormatInfo), &info); } return Success; } static int ProcXvMCGetDRInfo(ClientPtr client) { xvmcGetDRInfoReply rep; XvPortPtr pPort; ScreenPtr pScreen; XvMCScreenPtr pScreenPriv; #ifdef HAS_XVMCSHM volatile CARD32 *patternP; #endif REQUEST(xvmcGetDRInfoReq); REQUEST_SIZE_MATCH(xvmcGetDRInfoReq); VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); pScreen = pPort->pAdaptor->pScreen; pScreenPriv = XVMC_GET_PRIVATE(pScreen); rep = (xvmcGetDRInfoReply) { .type = X_Reply, .sequenceNumber = client->sequence, .major = pScreenPriv->major, .minor = pScreenPriv->minor, .patchLevel = pScreenPriv->patchLevel, .nameLen = bytes_to_int32(strlen(pScreenPriv->clientDriverName) + 1), .busIDLen = bytes_to_int32(strlen(pScreenPriv->busID) + 1), .isLocal = 1 }; rep.length = rep.nameLen + rep.busIDLen; rep.nameLen <<= 2; rep.busIDLen <<= 2; /* * Read back to the client what she has put in the shared memory * segment she prepared for us. */ #ifdef HAS_XVMCSHM patternP = (CARD32 *) shmat(stuff->shmKey, NULL, SHM_RDONLY); if (-1 != (long) patternP) { volatile CARD32 *patternC = patternP; int i; CARD32 magic = stuff->magic; rep.isLocal = 1; i = 1024 / sizeof(CARD32); while (i--) { if (*patternC++ != magic) { rep.isLocal = 0; break; } magic = ~magic; } shmdt((char *) patternP); } #endif /* HAS_XVMCSHM */ WriteToClient(client, sizeof(xvmcGetDRInfoReply), &rep); if (rep.length) { WriteToClient(client, rep.nameLen, pScreenPriv->clientDriverName); WriteToClient(client, rep.busIDLen, pScreenPriv->busID); } return Success; } int (*ProcXvMCVector[xvmcNumRequest]) (ClientPtr) = { ProcXvMCQueryVersion, ProcXvMCListSurfaceTypes, ProcXvMCCreateContext, ProcXvMCDestroyContext, ProcXvMCCreateSurface, ProcXvMCDestroySurface, ProcXvMCCreateSubpicture, ProcXvMCDestroySubpicture, ProcXvMCListSubpictureTypes, ProcXvMCGetDRInfo}; static int ProcXvMCDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < xvmcNumRequest) return (*ProcXvMCVector[stuff->data]) (client); else return BadRequest; } static int _X_COLD SProcXvMCDispatch(ClientPtr client) { /* We only support local */ return BadImplementation; } void XvMCExtensionInit(void) { ExtensionEntry *extEntry; if (!dixPrivateKeyRegistered(XvMCScreenKey)) return; if (!(XvMCRTContext = CreateNewResourceType(XvMCDestroyContextRes, "XvMCRTContext"))) return; if (!(XvMCRTSurface = CreateNewResourceType(XvMCDestroySurfaceRes, "XvMCRTSurface"))) return; if (!(XvMCRTSubpicture = CreateNewResourceType(XvMCDestroySubpictureRes, "XvMCRTSubpicture"))) return; extEntry = AddExtension(XvMCName, XvMCNumEvents, XvMCNumErrors, ProcXvMCDispatch, SProcXvMCDispatch, NULL, StandardMinorOpcode); if (!extEntry) return; XvMCReqCode = extEntry->base; XvMCEventBase = extEntry->eventBase; SetResourceTypeErrorValue(XvMCRTContext, extEntry->errorBase + XvMCBadContext); SetResourceTypeErrorValue(XvMCRTSurface, extEntry->errorBase + XvMCBadSurface); SetResourceTypeErrorValue(XvMCRTSubpicture, extEntry->errorBase + XvMCBadSubpicture); } static Bool XvMCCloseScreen(ScreenPtr pScreen) { XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); pScreen->CloseScreen = pScreenPriv->CloseScreen; free(pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } int XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) { XvMCScreenPtr pScreenPriv; if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) return BadAlloc; if (!(pScreenPriv = malloc(sizeof(XvMCScreenRec)))) return BadAlloc; dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = XvMCCloseScreen; pScreenPriv->num_adaptors = num; pScreenPriv->adaptors = pAdapt; pScreenPriv->clientDriverName[0] = 0; pScreenPriv->busID[0] = 0; pScreenPriv->major = 0; pScreenPriv->minor = 0; pScreenPriv->patchLevel = 0; XvMCInUse = TRUE; return Success; } XvImagePtr XvMCFindXvImage(XvPortPtr pPort, CARD32 id) { XvImagePtr pImage = NULL; ScreenPtr pScreen = pPort->pAdaptor->pScreen; XvMCScreenPtr pScreenPriv; XvMCAdaptorPtr adaptor = NULL; int i; if (!dixPrivateKeyRegistered(XvMCScreenKey)) return NULL; if (!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) return NULL; for (i = 0; i < pScreenPriv->num_adaptors; i++) { if (pPort->pAdaptor == pScreenPriv->adaptors[i].xv_adaptor) { adaptor = &(pScreenPriv->adaptors[i]); break; } } if (!adaptor) return NULL; for (i = 0; i < adaptor->num_subpictures; i++) { if (adaptor->subpictures[i]->id == id) { pImage = adaptor->subpictures[i]; break; } } return pImage; } int xf86XvMCRegisterDRInfo(ScreenPtr pScreen, const char *name, const char *busID, int major, int minor, int patchLevel) { XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pScreen); strlcpy(pScreenPriv->clientDriverName, name, DR_CLIENT_DRIVER_NAME_SIZE); strlcpy(pScreenPriv->busID, busID, DR_BUSID_SIZE); pScreenPriv->major = major; pScreenPriv->minor = minor; pScreenPriv->patchLevel = patchLevel; return Success; } xorg-server-21.1.16/Xext/xvdisp.h0000644000175000017500000000010514757411105012245 extern void XineramifyXv(void); extern void XvResetProcVector(void); xorg-server-21.1.16/Xext/xres.c0000644000175000017500000010071614757411105011715 /* Copyright (c) 2002 XFree86 Inc */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "swaprep.h" #include "registry.h" #include #include "pixmapstr.h" #include "windowstr.h" #include "gcstruct.h" #include "extinit.h" #include "protocol-versions.h" #include "client.h" #include "list.h" #include "misc.h" #include #include "hashtable.h" #include "picturestr.h" #ifdef COMPOSITE #include "compint.h" #endif /** @brief Holds fragments of responses for ConstructClientIds. * * note: there is no consideration for data alignment */ typedef struct { struct xorg_list l; int bytes; /* data follows */ } FragmentList; #define FRAGMENT_DATA(ptr) ((void*) ((char*) (ptr) + sizeof(FragmentList))) /** @brief Holds structure for the generated response to ProcXResQueryClientIds; used by ConstructClientId* -functions */ typedef struct { int numIds; int resultBytes; struct xorg_list response; int sentClientMasks[MAXCLIENTS]; } ConstructClientIdCtx; /** @brief Holds the structure for information required to generate the response to XResQueryResourceBytes. In addition to response it contains information on the query as well, as well as some volatile information required by a few functions that cannot take that information directly via a parameter, as they are called via already-existing higher order functions. */ typedef struct { ClientPtr sendClient; int numSizes; int resultBytes; struct xorg_list response; int status; long numSpecs; xXResResourceIdSpec *specs; HashTable visitedResources; /* Used by AddSubResourceSizeSpec when AddResourceSizeValue is handling cross-references */ HashTable visitedSubResources; /* used when ConstructResourceBytesCtx is passed to AddResourceSizeValue2 via FindClientResourcesByType */ RESTYPE resType; /* used when ConstructResourceBytesCtx is passed to AddResourceSizeValueByResource from ConstructResourceBytesByResource */ xXResResourceIdSpec *curSpec; /** Used when iterating through a single resource's subresources @see AddSubResourceSizeSpec */ xXResResourceSizeValue *sizeValue; } ConstructResourceBytesCtx; /** @brief Allocate and add a sequence of bytes at the end of a fragment list. Call DestroyFragments to release the list. @param frags A pointer to head of an initialized linked list @param bytes Number of bytes to allocate @return Returns a pointer to the allocated non-zeroed region that is to be filled by the caller. On error (out of memory) returns NULL and makes no changes to the list. */ static void * AddFragment(struct xorg_list *frags, int bytes) { FragmentList *f = malloc(sizeof(FragmentList) + bytes); if (!f) { return NULL; } else { f->bytes = bytes; xorg_list_add(&f->l, frags->prev); return (char*) f + sizeof(*f); } } /** @brief Sends all fragments in the list to the client. Does not free anything. @param client The client to send the fragments to @param frags The head of the list of fragments */ static void WriteFragmentsToClient(ClientPtr client, struct xorg_list *frags) { FragmentList *it; xorg_list_for_each_entry(it, frags, l) { WriteToClient(client, it->bytes, (char*) it + sizeof(*it)); } } /** @brief Frees a list of fragments. Does not free() root node. @param frags The head of the list of fragments */ static void DestroyFragments(struct xorg_list *frags) { FragmentList *it, *tmp; xorg_list_for_each_entry_safe(it, tmp, frags, l) { xorg_list_del(&it->l); free(it); } } /** @brief Constructs a context record for ConstructClientId* functions to use */ static void InitConstructClientIdCtx(ConstructClientIdCtx *ctx) { ctx->numIds = 0; ctx->resultBytes = 0; xorg_list_init(&ctx->response); memset(ctx->sentClientMasks, 0, sizeof(ctx->sentClientMasks)); } /** @brief Destroys a context record, releases all memory (except the storage for *ctx itself) */ static void DestroyConstructClientIdCtx(ConstructClientIdCtx *ctx) { DestroyFragments(&ctx->response); } static Bool InitConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx, ClientPtr sendClient, long numSpecs, xXResResourceIdSpec *specs) { ctx->sendClient = sendClient; ctx->numSizes = 0; ctx->resultBytes = 0; xorg_list_init(&ctx->response); ctx->status = Success; ctx->numSpecs = numSpecs; ctx->specs = specs; ctx->visitedResources = ht_create(sizeof(XID), 0, ht_resourceid_hash, ht_resourceid_compare, NULL); if (!ctx->visitedResources) { return FALSE; } else { return TRUE; } } static void DestroyConstructResourceBytesCtx(ConstructResourceBytesCtx *ctx) { DestroyFragments(&ctx->response); ht_destroy(ctx->visitedResources); } static int ProcXResQueryVersion(ClientPtr client) { xXResQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .server_major = SERVER_XRES_MAJOR_VERSION, .server_minor = SERVER_XRES_MINOR_VERSION }; REQUEST_SIZE_MATCH(xXResQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.server_major); swaps(&rep.server_minor); } WriteToClient(client, sizeof(xXResQueryVersionReply), &rep); return Success; } static int ProcXResQueryClients(ClientPtr client) { /* REQUEST(xXResQueryClientsReq); */ xXResQueryClientsReply rep; int *current_clients; int i, num_clients; REQUEST_SIZE_MATCH(xXResQueryClientsReq); current_clients = xallocarray(currentMaxClients, sizeof(int)); num_clients = 0; for (i = 0; i < currentMaxClients; i++) { if (clients[i]) { current_clients[num_clients] = i; num_clients++; } } rep = (xXResQueryClientsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(num_clients * sz_xXResClient), .num_clients = num_clients }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.num_clients); } WriteToClient(client, sizeof(xXResQueryClientsReply), &rep); if (num_clients) { xXResClient scratch; for (i = 0; i < num_clients; i++) { scratch.resource_base = clients[current_clients[i]]->clientAsMask; scratch.resource_mask = RESOURCE_ID_MASK; if (client->swapped) { swapl(&scratch.resource_base); swapl(&scratch.resource_mask); } WriteToClient(client, sz_xXResClient, &scratch); } } free(current_clients); return Success; } static void ResFindAllRes(void *value, XID id, RESTYPE type, void *cdata) { int *counts = (int *) cdata; counts[(type & TypeMask) - 1]++; } static CARD32 resourceTypeAtom(int i) { CARD32 ret; const char *name = LookupResourceName(i); if (strcmp(name, XREGISTRY_UNKNOWN)) ret = MakeAtom(name, strlen(name), TRUE); else { char buf[40]; snprintf(buf, sizeof(buf), "Unregistered resource %i", i + 1); ret = MakeAtom(buf, strlen(buf), TRUE); } return ret; } static int ProcXResQueryClientResources(ClientPtr client) { REQUEST(xXResQueryClientResourcesReq); xXResQueryClientResourcesReply rep; int i, clientID, num_types; int *counts; REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); clientID = CLIENT_ID(stuff->xid); if ((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } counts = calloc(lastResourceType + 1, sizeof(int)); FindAllClientResources(clients[clientID], ResFindAllRes, counts); num_types = 0; for (i = 0; i <= lastResourceType; i++) { if (counts[i]) num_types++; } rep = (xXResQueryClientResourcesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(num_types * sz_xXResType), .num_types = num_types }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.num_types); } WriteToClient(client, sizeof(xXResQueryClientResourcesReply), &rep); if (num_types) { xXResType scratch; for (i = 0; i < lastResourceType; i++) { if (!counts[i]) continue; scratch.resource_type = resourceTypeAtom(i + 1); scratch.count = counts[i]; if (client->swapped) { swapl(&scratch.resource_type); swapl(&scratch.count); } WriteToClient(client, sz_xXResType, &scratch); } } free(counts); return Success; } static void ResFindResourcePixmaps(void *value, XID id, RESTYPE type, void *cdata) { SizeType sizeFunc = GetResourceTypeSizeFunc(type); ResourceSizeRec size = { 0, 0, 0 }; unsigned long *bytes = cdata; sizeFunc(value, id, &size); *bytes += size.pixmapRefSize; } static int ProcXResQueryClientPixmapBytes(ClientPtr client) { REQUEST(xXResQueryClientPixmapBytesReq); xXResQueryClientPixmapBytesReply rep; int clientID; unsigned long bytes; REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); clientID = CLIENT_ID(stuff->xid); if ((clientID >= currentMaxClients) || !clients[clientID]) { client->errorValue = stuff->xid; return BadValue; } bytes = 0; FindAllClientResources(clients[clientID], ResFindResourcePixmaps, (void *) (&bytes)); rep = (xXResQueryClientPixmapBytesReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .bytes = bytes, #ifdef _XSERVER64 .bytes_overflow = bytes >> 32 #else .bytes_overflow = 0 #endif }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.bytes); swapl(&rep.bytes_overflow); } WriteToClient(client, sizeof(xXResQueryClientPixmapBytesReply), &rep); return Success; } /** @brief Finds out if a client's information need to be put into the response; marks client having been handled, if that is the case. @param client The client to send information about @param mask The request mask (0 to send everything, otherwise a bitmask of X_XRes*Mask) @param ctx The context record that tells which clients and id types have been already handled @param sendMask Which id type are we now considering. One of X_XRes*Mask. @return Returns TRUE if the client information needs to be on the response, otherwise FALSE. */ static Bool WillConstructMask(ClientPtr client, CARD32 mask, ConstructClientIdCtx *ctx, int sendMask) { if ((!mask || (mask & sendMask)) && !(ctx->sentClientMasks[client->index] & sendMask)) { ctx->sentClientMasks[client->index] |= sendMask; return TRUE; } else { return FALSE; } } /** @brief Constructs a response about a single client, based on a certain client id spec @param sendClient Which client wishes to receive this answer. Used for byte endianness. @param client Which client are we considering. @param mask The client id spec mask indicating which information we want about this client. @param ctx The context record containing the constructed response and information on which clients and masks have been already handled. @return Return TRUE if everything went OK, otherwise FALSE which indicates a memory allocation problem. */ static Bool ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask, ConstructClientIdCtx *ctx) { xXResClientIdValue rep; rep.spec.client = client->clientAsMask; if (client->swapped) { swapl (&rep.spec.client); } if (WillConstructMask(client, mask, ctx, X_XResClientXIDMask)) { void *ptr = AddFragment(&ctx->response, sizeof(rep)); if (!ptr) { return FALSE; } rep.spec.mask = X_XResClientXIDMask; rep.length = 0; if (sendClient->swapped) { swapl (&rep.spec.mask); /* swapl (&rep.length, n); - not required for rep.length = 0 */ } memcpy(ptr, &rep, sizeof(rep)); ctx->resultBytes += sizeof(rep); ++ctx->numIds; } if (WillConstructMask(client, mask, ctx, X_XResLocalClientPIDMask)) { pid_t pid = GetClientPid(client); if (pid != -1) { void *ptr = AddFragment(&ctx->response, sizeof(rep) + sizeof(CARD32)); CARD32 *value = (void*) ((char*) ptr + sizeof(rep)); if (!ptr) { return FALSE; } rep.spec.mask = X_XResLocalClientPIDMask; rep.length = 4; if (sendClient->swapped) { swapl (&rep.spec.mask); swapl (&rep.length); } if (sendClient->swapped) { swapl (value); } memcpy(ptr, &rep, sizeof(rep)); *value = pid; ctx->resultBytes += sizeof(rep) + sizeof(CARD32); ++ctx->numIds; } } /* memory allocation errors earlier may return with FALSE */ return TRUE; } /** @brief Constructs a response about all clients, based on a client id specs @param client Which client which we are constructing the response for. @param numSpecs Number of client id specs in specs @param specs Client id specs @return Return Success if everything went OK, otherwise a Bad* (currently BadAlloc or BadValue) */ static int ConstructClientIds(ClientPtr client, int numSpecs, xXResClientIdSpec* specs, ConstructClientIdCtx *ctx) { int specIdx; for (specIdx = 0; specIdx < numSpecs; ++specIdx) { if (specs[specIdx].client == 0) { int c; for (c = 0; c < currentMaxClients; ++c) { if (clients[c]) { if (!ConstructClientIdValue(client, clients[c], specs[specIdx].mask, ctx)) { return BadAlloc; } } } } else { int clientID = CLIENT_ID(specs[specIdx].client); if ((clientID < currentMaxClients) && clients[clientID]) { if (!ConstructClientIdValue(client, clients[clientID], specs[specIdx].mask, ctx)) { return BadAlloc; } } } } /* memory allocation errors earlier may return with BadAlloc */ return Success; } /** @brief Response to XResQueryClientIds request introduced in XResProto v1.2 @param client Which client which we are constructing the response for. @return Returns the value returned from ConstructClientIds with the same semantics */ static int ProcXResQueryClientIds (ClientPtr client) { REQUEST(xXResQueryClientIdsReq); xXResClientIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff)); int rc; ConstructClientIdCtx ctx; InitConstructClientIdCtx(&ctx); REQUEST_AT_LEAST_SIZE(xXResQueryClientIdsReq); REQUEST_FIXED_SIZE(xXResQueryClientIdsReq, stuff->numSpecs * sizeof(specs[0])); rc = ConstructClientIds(client, stuff->numSpecs, specs, &ctx); if (rc == Success) { xXResQueryClientIdsReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(ctx.resultBytes), .numIds = ctx.numIds }; assert((ctx.resultBytes & 3) == 0); if (client->swapped) { swaps (&rep.sequenceNumber); swapl (&rep.length); swapl (&rep.numIds); } WriteToClient(client, sizeof(rep), &rep); WriteFragmentsToClient(client, &ctx.response); } DestroyConstructClientIdCtx(&ctx); return rc; } /** @brief Swaps xXResResourceIdSpec endianness */ static void SwapXResResourceIdSpec(xXResResourceIdSpec *spec) { swapl(&spec->resource); swapl(&spec->type); } /** @brief Swaps xXResResourceSizeSpec endianness */ static void SwapXResResourceSizeSpec(xXResResourceSizeSpec *size) { SwapXResResourceIdSpec(&size->spec); swapl(&size->bytes); swapl(&size->refCount); swapl(&size->useCount); } /** @brief Swaps xXResResourceSizeValue endianness */ static void SwapXResResourceSizeValue(xXResResourceSizeValue *rep) { SwapXResResourceSizeSpec(&rep->size); swapl(&rep->numCrossReferences); } /** @brief Swaps the response bytes */ static void SwapXResQueryResourceBytes(struct xorg_list *response) { struct xorg_list *it = response->next; int c; while (it != response) { xXResResourceSizeValue *value = FRAGMENT_DATA(it); it = it->next; for (c = 0; c < value->numCrossReferences; ++c) { xXResResourceSizeSpec *spec = FRAGMENT_DATA(it); SwapXResResourceSizeSpec(spec); it = it->next; } SwapXResResourceSizeValue(value); } } /** @brief Adds xXResResourceSizeSpec describing a resource's size into the buffer contained in the context. The resource is considered to be a subresource. @see AddResourceSizeValue @param[in] value The X resource object on which to add information about to the buffer @param[in] id The ID of the X resource @param[in] type The type of the X resource @param[in/out] cdata The context object of type ConstructResourceBytesCtx. Void pointer type is used here to satisfy the type FindRes */ static void AddSubResourceSizeSpec(void *value, XID id, RESTYPE type, void *cdata) { ConstructResourceBytesCtx *ctx = cdata; if (ctx->status == Success) { xXResResourceSizeSpec **prevCrossRef = ht_find(ctx->visitedSubResources, &value); if (!prevCrossRef) { Bool ok = TRUE; xXResResourceSizeSpec *crossRef = AddFragment(&ctx->response, sizeof(xXResResourceSizeSpec)); ok = ok && crossRef != NULL; if (ok) { xXResResourceSizeSpec **p; p = ht_add(ctx->visitedSubResources, &value); if (!p) { ok = FALSE; } else { *p = crossRef; } } if (!ok) { ctx->status = BadAlloc; } else { SizeType sizeFunc = GetResourceTypeSizeFunc(type); ResourceSizeRec size = { 0, 0, 0 }; sizeFunc(value, id, &size); crossRef->spec.resource = id; crossRef->spec.type = resourceTypeAtom(type); crossRef->bytes = size.resourceSize; crossRef->refCount = size.refCnt; crossRef->useCount = 1; ++ctx->sizeValue->numCrossReferences; ctx->resultBytes += sizeof(*crossRef); } } else { /* if we have visited the subresource earlier (from current parent resource), just increase its use count by one */ ++(*prevCrossRef)->useCount; } } } /** @brief Adds xXResResourceSizeValue describing a resource's size into the buffer contained in the context. In addition, the subresources are iterated and added as xXResResourceSizeSpec's by using AddSubResourceSizeSpec @see AddSubResourceSizeSpec @param[in] value The X resource object on which to add information about to the buffer @param[in] id The ID of the X resource @param[in] type The type of the X resource @param[in/out] cdata The context object of type ConstructResourceBytesCtx. Void pointer type is used here to satisfy the type FindRes */ static void AddResourceSizeValue(void *ptr, XID id, RESTYPE type, void *cdata) { ConstructResourceBytesCtx *ctx = cdata; if (ctx->status == Success && !ht_find(ctx->visitedResources, &id)) { Bool ok = TRUE; HashTable ht; HtGenericHashSetupRec htSetup = { .keySize = sizeof(void*) }; /* it doesn't matter that we don't undo the work done here * immediately. All but ht_init will be undone at the end * of the request and there can happen no failure after * ht_init, so we don't need to clean it up here in any * special way */ xXResResourceSizeValue *value = AddFragment(&ctx->response, sizeof(xXResResourceSizeValue)); if (!value) { ok = FALSE; } ok = ok && ht_add(ctx->visitedResources, &id); if (ok) { ht = ht_create(htSetup.keySize, sizeof(xXResResourceSizeSpec*), ht_generic_hash, ht_generic_compare, &htSetup); ok = ok && ht; } if (!ok) { ctx->status = BadAlloc; } else { SizeType sizeFunc = GetResourceTypeSizeFunc(type); ResourceSizeRec size = { 0, 0, 0 }; sizeFunc(ptr, id, &size); value->size.spec.resource = id; value->size.spec.type = resourceTypeAtom(type); value->size.bytes = size.resourceSize; value->size.refCount = size.refCnt; value->size.useCount = 1; value->numCrossReferences = 0; ctx->sizeValue = value; ctx->visitedSubResources = ht; FindSubResources(ptr, type, AddSubResourceSizeSpec, ctx); ctx->visitedSubResources = NULL; ctx->sizeValue = NULL; ctx->resultBytes += sizeof(*value); ++ctx->numSizes; ht_destroy(ht); } } } /** @brief A variant of AddResourceSizeValue that passes the resource type through the context object to satisfy the type FindResType @see AddResourceSizeValue @param[in] ptr The resource @param[in] id The resource ID @param[in/out] cdata The context object that contains the resource type */ static void AddResourceSizeValueWithResType(void *ptr, XID id, void *cdata) { ConstructResourceBytesCtx *ctx = cdata; AddResourceSizeValue(ptr, id, ctx->resType, cdata); } /** @brief Adds the information of a resource into the buffer if it matches the match condition. @see AddResourceSizeValue @param[in] ptr The resource @param[in] id The resource ID @param[in] type The resource type @param[in/out] cdata The context object as a void pointer to satisfy the type FindAllRes */ static void AddResourceSizeValueByResource(void *ptr, XID id, RESTYPE type, void *cdata) { ConstructResourceBytesCtx *ctx = cdata; xXResResourceIdSpec *spec = ctx->curSpec; if ((!spec->type || spec->type == type) && (!spec->resource || spec->resource == id)) { AddResourceSizeValue(ptr, id, type, ctx); } } /** @brief Add all resources of the client into the result buffer disregarding all those specifications that specify the resource by its ID. Those are handled by ConstructResourceBytesByResource @see ConstructResourceBytesByResource @param[in] aboutClient Which client is being considered @param[in/out] ctx The context that contains the resource id specifications as well as the result buffer */ static void ConstructClientResourceBytes(ClientPtr aboutClient, ConstructResourceBytesCtx *ctx) { int specIdx; for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) { xXResResourceIdSpec* spec = ctx->specs + specIdx; if (spec->resource) { /* these specs are handled elsewhere */ } else if (spec->type) { ctx->resType = spec->type; FindClientResourcesByType(aboutClient, spec->type, AddResourceSizeValueWithResType, ctx); } else { FindAllClientResources(aboutClient, AddResourceSizeValue, ctx); } } } /** @brief Add the sizes of all such resources that can are specified by their ID in the resource id specification. The scan can by limited to a client with the aboutClient parameter @see ConstructResourceBytesByResource @param[in] aboutClient Which client is being considered. This may be None to mean all clients. @param[in/out] ctx The context that contains the resource id specifications as well as the result buffer. In addition this function uses the curSpec field to keep a pointer to the current resource id specification in it, which can be used by AddResourceSizeValueByResource . */ static void ConstructResourceBytesByResource(XID aboutClient, ConstructResourceBytesCtx *ctx) { int specIdx; for (specIdx = 0; specIdx < ctx->numSpecs; ++specIdx) { xXResResourceIdSpec *spec = ctx->specs + specIdx; if (spec->resource) { int cid = CLIENT_ID(spec->resource); if (cid < currentMaxClients && (aboutClient == None || cid == aboutClient)) { ClientPtr client = clients[cid]; if (client) { ctx->curSpec = spec; FindAllClientResources(client, AddResourceSizeValueByResource, ctx); } } } } } /** @brief Build the resource size response for the given client (or all if not specified) per the parameters set up in the context object. @param[in] aboutClient Which client to consider or None for all clients @param[in/out] ctx The context object that contains the request as well as the response buffer. */ static int ConstructResourceBytes(XID aboutClient, ConstructResourceBytesCtx *ctx) { if (aboutClient) { int clientIdx = CLIENT_ID(aboutClient); ClientPtr client = NullClient; if ((clientIdx >= currentMaxClients) || !clients[clientIdx]) { ctx->sendClient->errorValue = aboutClient; return BadValue; } client = clients[clientIdx]; ConstructClientResourceBytes(client, ctx); ConstructResourceBytesByResource(aboutClient, ctx); } else { int clientIdx; ConstructClientResourceBytes(NULL, ctx); for (clientIdx = 0; clientIdx < currentMaxClients; ++clientIdx) { ClientPtr client = clients[clientIdx]; if (client) { ConstructClientResourceBytes(client, ctx); } } ConstructResourceBytesByResource(None, ctx); } return ctx->status; } /** @brief Implements the XResQueryResourceBytes of XResProto v1.2 */ static int ProcXResQueryResourceBytes (ClientPtr client) { REQUEST(xXResQueryResourceBytesReq); int rc; ConstructResourceBytesCtx ctx; REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); if (stuff->numSpecs > UINT32_MAX / sizeof(ctx.specs[0])) return BadLength; REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, stuff->numSpecs * sizeof(ctx.specs[0])); if (!InitConstructResourceBytesCtx(&ctx, client, stuff->numSpecs, (void*) ((char*) stuff + sz_xXResQueryResourceBytesReq))) { return BadAlloc; } rc = ConstructResourceBytes(stuff->client, &ctx); if (rc == Success) { xXResQueryResourceBytesReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(ctx.resultBytes), .numSizes = ctx.numSizes }; if (client->swapped) { swaps (&rep.sequenceNumber); swapl (&rep.length); swapl (&rep.numSizes); SwapXResQueryResourceBytes(&ctx.response); } WriteToClient(client, sizeof(rep), &rep); WriteFragmentsToClient(client, &ctx.response); } DestroyConstructResourceBytesCtx(&ctx); return rc; } static int ProcResDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XResQueryVersion: return ProcXResQueryVersion(client); case X_XResQueryClients: return ProcXResQueryClients(client); case X_XResQueryClientResources: return ProcXResQueryClientResources(client); case X_XResQueryClientPixmapBytes: return ProcXResQueryClientPixmapBytes(client); case X_XResQueryClientIds: return ProcXResQueryClientIds(client); case X_XResQueryResourceBytes: return ProcXResQueryResourceBytes(client); default: break; } return BadRequest; } static int _X_COLD SProcXResQueryVersion(ClientPtr client) { REQUEST_SIZE_MATCH(xXResQueryVersionReq); return ProcXResQueryVersion(client); } static int _X_COLD SProcXResQueryClientResources(ClientPtr client) { REQUEST(xXResQueryClientResourcesReq); REQUEST_SIZE_MATCH(xXResQueryClientResourcesReq); swapl(&stuff->xid); return ProcXResQueryClientResources(client); } static int _X_COLD SProcXResQueryClientPixmapBytes(ClientPtr client) { REQUEST(xXResQueryClientPixmapBytesReq); REQUEST_SIZE_MATCH(xXResQueryClientPixmapBytesReq); swapl(&stuff->xid); return ProcXResQueryClientPixmapBytes(client); } static int _X_COLD SProcXResQueryClientIds (ClientPtr client) { REQUEST(xXResQueryClientIdsReq); REQUEST_AT_LEAST_SIZE (xXResQueryClientIdsReq); swapl(&stuff->numSpecs); return ProcXResQueryClientIds(client); } /** @brief Implements the XResQueryResourceBytes of XResProto v1.2. This variant byteswaps request contents before issuing the rest of the work to ProcXResQueryResourceBytes */ static int _X_COLD SProcXResQueryResourceBytes (ClientPtr client) { REQUEST(xXResQueryResourceBytesReq); int c; xXResResourceIdSpec *specs = (void*) ((char*) stuff + sizeof(*stuff)); REQUEST_AT_LEAST_SIZE(xXResQueryResourceBytesReq); swapl(&stuff->numSpecs); REQUEST_FIXED_SIZE(xXResQueryResourceBytesReq, stuff->numSpecs * sizeof(specs[0])); for (c = 0; c < stuff->numSpecs; ++c) { SwapXResResourceIdSpec(specs + c); } return ProcXResQueryResourceBytes(client); } static int _X_COLD SProcResDispatch (ClientPtr client) { REQUEST(xReq); swaps(&stuff->length); switch (stuff->data) { case X_XResQueryVersion: return SProcXResQueryVersion(client); case X_XResQueryClients: /* nothing to swap */ return ProcXResQueryClients(client); case X_XResQueryClientResources: return SProcXResQueryClientResources(client); case X_XResQueryClientPixmapBytes: return SProcXResQueryClientPixmapBytes(client); case X_XResQueryClientIds: return SProcXResQueryClientIds(client); case X_XResQueryResourceBytes: return SProcXResQueryResourceBytes(client); default: break; } return BadRequest; } void ResExtensionInit(void) { (void) AddExtension(XRES_NAME, 0, 0, ProcResDispatch, SProcResDispatch, NULL, StandardMinorOpcode); } xorg-server-21.1.16/Xext/saver.c0000644000175000017500000012111614757411105012051 /* * Copyright (c) 1992 X Consortium 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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 X Consortium 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 X Consortium. * * Author: Keith Packard, MIT X Consortium */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "resource.h" #include "opaque.h" #include #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" #include "xace.h" #include "inputstr.h" #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" #endif #ifdef DPMSExtension #include #include "dpmsproc.h" #endif #include "protocol-versions.h" #include #include "extinit.h" static int ScreenSaverEventBase = 0; static Bool ScreenSaverHandle(ScreenPtr /* pScreen */ , int /* xstate */ , Bool /* force */ ); static Bool CreateSaverWindow(ScreenPtr /* pScreen */ ); static Bool DestroySaverWindow(ScreenPtr /* pScreen */ ); static void UninstallSaverColormap(ScreenPtr /* pScreen */ ); static void CheckScreenPrivate(ScreenPtr /* pScreen */ ); static void SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * /* from */ , xScreenSaverNotifyEvent * /* to */ ); static RESTYPE SuspendType; /* resource type for suspension records */ typedef struct _ScreenSaverSuspension *ScreenSaverSuspensionPtr; /* List of clients that are suspending the screensaver. */ static ScreenSaverSuspensionPtr suspendingClients = NULL; /* * clientResource is a resource ID that's added when the record is * allocated, so the record is freed and the screensaver resumed when * the client disconnects. count is the number of times the client has * requested the screensaver be suspended. */ typedef struct _ScreenSaverSuspension { ScreenSaverSuspensionPtr next; ClientPtr pClient; XID clientResource; int count; } ScreenSaverSuspensionRec; static int ScreenSaverFreeSuspend(void *value, XID id); /* * each screen has a list of clients requesting * ScreenSaverNotify events. Each client has a resource * for each screen it selects ScreenSaverNotify input for, * this resource is used to delete the ScreenSaverNotifyRec * entry from the per-screen queue. */ static RESTYPE SaverEventType; /* resource type for event masks */ typedef struct _ScreenSaverEvent *ScreenSaverEventPtr; typedef struct _ScreenSaverEvent { ScreenSaverEventPtr next; ClientPtr client; ScreenPtr screen; XID resource; CARD32 mask; } ScreenSaverEventRec; static int ScreenSaverFreeEvents(void * value, XID id); static Bool setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask); static unsigned long getEventMask(ScreenPtr pScreen, ClientPtr client); /* * when a client sets the screen saver attributes, a resource is * kept to be freed when the client exits */ static RESTYPE AttrType; /* resource type for attributes */ typedef struct _ScreenSaverAttr { ScreenPtr screen; ClientPtr client; XID resource; short x, y; unsigned short width, height, borderWidth; unsigned char class; unsigned char depth; VisualID visual; CursorPtr pCursor; PixmapPtr pBackgroundPixmap; PixmapPtr pBorderPixmap; Colormap colormap; unsigned long mask; /* no pixmaps or cursors */ unsigned long *values; } ScreenSaverAttrRec, *ScreenSaverAttrPtr; static int ScreenSaverFreeAttr(void *value, XID id); static void FreeAttrs(ScreenSaverAttrPtr pAttr); static void FreeScreenAttr(ScreenSaverAttrPtr pAttr); static void SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced); typedef struct _ScreenSaverScreenPrivate { ScreenSaverEventPtr events; ScreenSaverAttrPtr attr; Bool hasWindow; Colormap installedMap; } ScreenSaverScreenPrivateRec, *ScreenSaverScreenPrivatePtr; static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr pScreen); static DevPrivateKeyRec ScreenPrivateKeyRec; #define ScreenPrivateKey (&ScreenPrivateKeyRec) #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) #define SetScreenPrivate(s,v) \ dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v); #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) #define New(t) (malloc(sizeof (t))) static void CheckScreenPrivate(ScreenPtr pScreen) { SetupScreen(pScreen); if (!pPriv) return; if (!pPriv->attr && !pPriv->events && !pPriv->hasWindow && pPriv->installedMap == None) { free(pPriv); SetScreenPrivate(pScreen, NULL); pScreen->screensaver.ExternalScreenSaver = NULL; } } static ScreenSaverScreenPrivatePtr MakeScreenPrivate(ScreenPtr pScreen) { SetupScreen(pScreen); if (pPriv) return pPriv; pPriv = New(ScreenSaverScreenPrivateRec); if (!pPriv) return 0; pPriv->events = 0; pPriv->attr = 0; pPriv->hasWindow = FALSE; pPriv->installedMap = None; SetScreenPrivate(pScreen, pPriv); pScreen->screensaver.ExternalScreenSaver = ScreenSaverHandle; return pPriv; } static unsigned long getEventMask(ScreenPtr pScreen, ClientPtr client) { SetupScreen(pScreen); ScreenSaverEventPtr pEv; if (!pPriv) return 0; for (pEv = pPriv->events; pEv; pEv = pEv->next) if (pEv->client == client) return pEv->mask; return 0; } static Bool setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) { SetupScreen(pScreen); ScreenSaverEventPtr pEv, *pPrev; if (getEventMask(pScreen, client) == mask) return TRUE; if (!pPriv) { pPriv = MakeScreenPrivate(pScreen); if (!pPriv) return FALSE; } for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) if (pEv->client == client) break; if (mask == 0) { FreeResource(pEv->resource, SaverEventType); *pPrev = pEv->next; free(pEv); CheckScreenPrivate(pScreen); } else { if (!pEv) { pEv = New(ScreenSaverEventRec); if (!pEv) { CheckScreenPrivate(pScreen); return FALSE; } *pPrev = pEv; pEv->next = NULL; pEv->client = client; pEv->screen = pScreen; pEv->resource = FakeClientID(client->index); if (!AddResource(pEv->resource, SaverEventType, (void *) pEv)) return FALSE; } pEv->mask = mask; } return TRUE; } static void FreeAttrs(ScreenSaverAttrPtr pAttr) { PixmapPtr pPixmap; CursorPtr pCursor; if ((pPixmap = pAttr->pBackgroundPixmap) != 0) (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); if ((pPixmap = pAttr->pBorderPixmap) != 0) (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); if ((pCursor = pAttr->pCursor) != 0) FreeCursor(pCursor, (Cursor) 0); } static void FreeScreenAttr(ScreenSaverAttrPtr pAttr) { FreeAttrs(pAttr); free(pAttr->values); free(pAttr); } static int ScreenSaverFreeEvents(void *value, XID id) { ScreenSaverEventPtr pOld = (ScreenSaverEventPtr) value; ScreenPtr pScreen = pOld->screen; SetupScreen(pScreen); ScreenSaverEventPtr pEv, *pPrev; if (!pPriv) return TRUE; for (pPrev = &pPriv->events; (pEv = *pPrev) != 0; pPrev = &pEv->next) if (pEv == pOld) break; if (!pEv) return TRUE; *pPrev = pEv->next; free(pEv); CheckScreenPrivate(pScreen); return TRUE; } static int ScreenSaverFreeAttr(void *value, XID id) { ScreenSaverAttrPtr pOldAttr = (ScreenSaverAttrPtr) value; ScreenPtr pScreen = pOldAttr->screen; SetupScreen(pScreen); if (!pPriv) return TRUE; if (pPriv->attr != pOldAttr) return TRUE; FreeScreenAttr(pOldAttr); pPriv->attr = NULL; if (pPriv->hasWindow) { dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverActive); } CheckScreenPrivate(pScreen); return TRUE; } static int ScreenSaverFreeSuspend(void *value, XID id) { ScreenSaverSuspensionPtr data = (ScreenSaverSuspensionPtr) value; ScreenSaverSuspensionPtr *prev, this; /* Unlink and free the suspension record for the client */ for (prev = &suspendingClients; (this = *prev); prev = &this->next) { if (this == data) { *prev = this->next; free(this); break; } } /* Re-enable the screensaver if this was the last client suspending it. */ if (screenSaverSuspended && suspendingClients == NULL) { screenSaverSuspended = FALSE; /* The screensaver could be active, since suspending it (by design) doesn't prevent it from being forceably activated */ #ifdef DPMSExtension if (screenIsSaved != SCREEN_SAVER_ON && DPMSPowerLevel == DPMSModeOn) #else if (screenIsSaved != SCREEN_SAVER_ON) #endif { DeviceIntPtr dev; UpdateCurrentTimeIf(); nt_list_for_each_entry(dev, inputInfo.devices, next) NoticeTime(dev, currentTime); SetScreenSaverTimer(); } } return Success; } static void SendScreenSaverNotify(ScreenPtr pScreen, int state, Bool forced) { ScreenSaverScreenPrivatePtr pPriv; ScreenSaverEventPtr pEv; unsigned long mask; int kind; UpdateCurrentTimeIf(); mask = ScreenSaverNotifyMask; if (state == ScreenSaverCycle) mask = ScreenSaverCycleMask; pScreen = screenInfo.screens[pScreen->myNum]; pPriv = GetScreenPrivate(pScreen); if (!pPriv) return; if (pPriv->attr) kind = ScreenSaverExternal; else if (ScreenSaverBlanking != DontPreferBlanking) kind = ScreenSaverBlanked; else kind = ScreenSaverInternal; for (pEv = pPriv->events; pEv; pEv = pEv->next) { if (pEv->mask & mask) { xScreenSaverNotifyEvent ev = { .type = ScreenSaverNotify + ScreenSaverEventBase, .state = state, .timestamp = currentTime.milliseconds, .root = pScreen->root->drawable.id, .window = pScreen->screensaver.wid, .kind = kind, .forced = forced }; WriteEventsToClient(pEv->client, 1, (xEvent *) &ev); } } } static void _X_COLD SScreenSaverNotifyEvent(xScreenSaverNotifyEvent * from, xScreenSaverNotifyEvent * to) { to->type = from->type; to->state = from->state; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->timestamp, to->timestamp); cpswapl(from->root, to->root); cpswapl(from->window, to->window); to->kind = from->kind; to->forced = from->forced; } static void UninstallSaverColormap(ScreenPtr pScreen) { SetupScreen(pScreen); ColormapPtr pCmap; int rc; if (pPriv && pPriv->installedMap != None) { rc = dixLookupResourceByType((void **) &pCmap, pPriv->installedMap, RT_COLORMAP, serverClient, DixUninstallAccess); if (rc == Success) (*pCmap->pScreen->UninstallColormap) (pCmap); pPriv->installedMap = None; CheckScreenPrivate(pScreen); } } static Bool CreateSaverWindow(ScreenPtr pScreen) { SetupScreen(pScreen); ScreenSaverStuffPtr pSaver; ScreenSaverAttrPtr pAttr; WindowPtr pWin; int result; unsigned long mask; Colormap wantMap; ColormapPtr pCmap; pSaver = &pScreen->screensaver; if (pSaver->pWindow) { pSaver->pWindow = NullWindow; FreeResource(pSaver->wid, RT_NONE); if (pPriv) { UninstallSaverColormap(pScreen); pPriv->hasWindow = FALSE; CheckScreenPrivate(pScreen); } } if (!pPriv || !(pAttr = pPriv->attr)) return FALSE; pPriv->installedMap = None; if (GrabInProgress && GrabInProgress != pAttr->client->index) return FALSE; pWin = CreateWindow(pSaver->wid, pScreen->root, pAttr->x, pAttr->y, pAttr->width, pAttr->height, pAttr->borderWidth, pAttr->class, pAttr->mask, (XID *) pAttr->values, pAttr->depth, serverClient, pAttr->visual, &result); if (!pWin) return FALSE; if (!AddResource(pWin->drawable.id, RT_WINDOW, pWin)) return FALSE; mask = 0; if (pAttr->pBackgroundPixmap) { pWin->backgroundState = BackgroundPixmap; pWin->background.pixmap = pAttr->pBackgroundPixmap; pAttr->pBackgroundPixmap->refcnt++; mask |= CWBackPixmap; } if (pAttr->pBorderPixmap) { pWin->borderIsPixel = FALSE; pWin->border.pixmap = pAttr->pBorderPixmap; pAttr->pBorderPixmap->refcnt++; mask |= CWBorderPixmap; } if (pAttr->pCursor) { CursorPtr cursor; if (!pWin->optional) if (!MakeWindowOptional(pWin)) { FreeResource(pWin->drawable.id, RT_NONE); return FALSE; } cursor = RefCursor(pAttr->pCursor); if (pWin->optional->cursor) FreeCursor(pWin->optional->cursor, (Cursor) 0); pWin->optional->cursor = cursor; pWin->cursorIsNone = FALSE; CheckWindowOptionalNeed(pWin); mask |= CWCursor; } if (mask) (*pScreen->ChangeWindowAttributes) (pWin, mask); if (pAttr->colormap != None) (void) ChangeWindowAttributes(pWin, CWColormap, &pAttr->colormap, serverClient); MapWindow(pWin, serverClient); pPriv->hasWindow = TRUE; pSaver->pWindow = pWin; /* check and install our own colormap if it isn't installed now */ wantMap = wColormap(pWin); if (wantMap == None || IsMapInstalled(wantMap, pWin)) return TRUE; result = dixLookupResourceByType((void **) &pCmap, wantMap, RT_COLORMAP, serverClient, DixInstallAccess); if (result != Success) return TRUE; pPriv->installedMap = wantMap; (*pCmap->pScreen->InstallColormap) (pCmap); return TRUE; } static Bool DestroySaverWindow(ScreenPtr pScreen) { SetupScreen(pScreen); ScreenSaverStuffPtr pSaver; if (!pPriv || !pPriv->hasWindow) return FALSE; pSaver = &pScreen->screensaver; if (pSaver->pWindow) { pSaver->pWindow = NullWindow; FreeResource(pSaver->wid, RT_NONE); } pPriv->hasWindow = FALSE; CheckScreenPrivate(pScreen); UninstallSaverColormap(pScreen); return TRUE; } static Bool ScreenSaverHandle(ScreenPtr pScreen, int xstate, Bool force) { int state = 0; Bool ret = FALSE; ScreenSaverScreenPrivatePtr pPriv; switch (xstate) { case SCREEN_SAVER_ON: state = ScreenSaverOn; ret = CreateSaverWindow(pScreen); break; case SCREEN_SAVER_OFF: state = ScreenSaverOff; ret = DestroySaverWindow(pScreen); break; case SCREEN_SAVER_CYCLE: state = ScreenSaverCycle; pPriv = GetScreenPrivate(pScreen); if (pPriv && pPriv->hasWindow) ret = TRUE; } #ifdef PANORAMIX if (noPanoramiXExtension || !pScreen->myNum) #endif SendScreenSaverNotify(pScreen, state, force); return ret; } static int ProcScreenSaverQueryVersion(ClientPtr client) { xScreenSaverQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_SAVER_MAJOR_VERSION, .minorVersion = SERVER_SAVER_MINOR_VERSION }; REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, sizeof(xScreenSaverQueryVersionReply), &rep); return Success; } static int ProcScreenSaverQueryInfo(ClientPtr client) { REQUEST(xScreenSaverQueryInfoReq); xScreenSaverQueryInfoReply rep; int rc; ScreenSaverStuffPtr pSaver; DrawablePtr pDraw; CARD32 lastInput; ScreenSaverScreenPrivatePtr pPriv; REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixGetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, DixGetAttrAccess); if (rc != Success) return rc; pSaver = &pDraw->pScreen->screensaver; pPriv = GetScreenPrivate(pDraw->pScreen); UpdateCurrentTime(); lastInput = GetTimeInMillis() - LastEventTime(XIAllDevices).milliseconds; rep = (xScreenSaverQueryInfoReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .window = pSaver->wid }; if (screenIsSaved != SCREEN_SAVER_OFF) { rep.state = ScreenSaverOn; if (ScreenSaverTime) rep.tilOrSince = lastInput - ScreenSaverTime; else rep.tilOrSince = 0; } else { if (ScreenSaverTime) { rep.state = ScreenSaverOff; if (ScreenSaverTime < lastInput) rep.tilOrSince = 0; else rep.tilOrSince = ScreenSaverTime - lastInput; } else { rep.state = ScreenSaverDisabled; rep.tilOrSince = 0; } } rep.idle = lastInput; rep.eventMask = getEventMask(pDraw->pScreen, client); if (pPriv && pPriv->attr) rep.kind = ScreenSaverExternal; else if (ScreenSaverBlanking != DontPreferBlanking) rep.kind = ScreenSaverBlanked; else rep.kind = ScreenSaverInternal; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); swapl(&rep.tilOrSince); swapl(&rep.idle); swapl(&rep.eventMask); } WriteToClient(client, sizeof(xScreenSaverQueryInfoReply), &rep); return Success; } static int ProcScreenSaverSelectInput(ClientPtr client) { REQUEST(xScreenSaverSelectInputReq); DrawablePtr pDraw; int rc; REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixGetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_SCREENSAVER_ACCESS, client, pDraw->pScreen, DixSetAttrAccess); if (rc != Success) return rc; if (!setEventMask(pDraw->pScreen, client, stuff->eventMask)) return BadAlloc; return Success; } static int ScreenSaverSetAttributes(ClientPtr client) { REQUEST(xScreenSaverSetAttributesReq); DrawablePtr pDraw; WindowPtr pParent; ScreenPtr pScreen; ScreenSaverScreenPrivatePtr pPriv = 0; ScreenSaverAttrPtr pAttr = 0; int ret, len, class, bw, depth; unsigned long visual; int idepth, ivisual; Bool fOK; DepthPtr pDepth; WindowOptPtr ancwopt; unsigned int *pVlist; unsigned long *values = 0; unsigned long tmask, imask; unsigned long val; Pixmap pixID; PixmapPtr pPixmap; Cursor cursorID; CursorPtr pCursor; Colormap cmap; ColormapPtr pCmap; REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixGetAttrAccess); if (ret != Success) return ret; pScreen = pDraw->pScreen; pParent = pScreen->root; ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess); if (ret != Success) return ret; len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); if (Ones(stuff->mask) != len) return BadLength; if (!stuff->width || !stuff->height) { client->errorValue = 0; return BadValue; } switch (class = stuff->c_class) { case CopyFromParent: case InputOnly: case InputOutput: break; default: client->errorValue = class; return BadValue; } bw = stuff->borderWidth; depth = stuff->depth; visual = stuff->visualID; /* copied directly from CreateWindow */ if (class == CopyFromParent) class = pParent->drawable.class; if ((class != InputOutput) && (class != InputOnly)) { client->errorValue = class; return BadValue; } if ((class != InputOnly) && (pParent->drawable.class == InputOnly)) return BadMatch; if ((class == InputOnly) && ((bw != 0) || (depth != 0))) return BadMatch; if ((class == InputOutput) && (depth == 0)) depth = pParent->drawable.depth; ancwopt = pParent->optional; if (!ancwopt) ancwopt = FindWindowWithOptional(pParent)->optional; if (visual == CopyFromParent) visual = ancwopt->visual; /* Find out if the depth and visual are acceptable for this Screen */ if ((visual != ancwopt->visual) || (depth != pParent->drawable.depth)) { fOK = FALSE; for (idepth = 0; idepth < pScreen->numDepths; idepth++) { pDepth = (DepthPtr) &pScreen->allowedDepths[idepth]; if ((depth == pDepth->depth) || (depth == 0)) { for (ivisual = 0; ivisual < pDepth->numVids; ivisual++) { if (visual == pDepth->vids[ivisual]) { fOK = TRUE; break; } } } } if (fOK == FALSE) return BadMatch; } if (((stuff->mask & (CWBorderPixmap | CWBorderPixel)) == 0) && (class != InputOnly) && (depth != pParent->drawable.depth)) { return BadMatch; } if (((stuff->mask & CWColormap) == 0) && (class != InputOnly) && ((visual != ancwopt->visual) || (ancwopt->colormap == None))) { return BadMatch; } /* end of errors from CreateWindow */ pPriv = GetScreenPrivate(pScreen); if (pPriv && pPriv->attr) { if (pPriv->attr->client != client) return BadAccess; } if (!pPriv) { pPriv = MakeScreenPrivate(pScreen); if (!pPriv) return FALSE; } pAttr = New(ScreenSaverAttrRec); if (!pAttr) { ret = BadAlloc; goto bail; } /* over allocate for override redirect */ pAttr->values = values = xallocarray(len + 1, sizeof(unsigned long)); if (!values) { ret = BadAlloc; goto bail; } pAttr->screen = pScreen; pAttr->client = client; pAttr->x = stuff->x; pAttr->y = stuff->y; pAttr->width = stuff->width; pAttr->height = stuff->height; pAttr->borderWidth = stuff->borderWidth; pAttr->class = stuff->c_class; pAttr->depth = depth; pAttr->visual = visual; pAttr->colormap = None; pAttr->pCursor = NullCursor; pAttr->pBackgroundPixmap = NullPixmap; pAttr->pBorderPixmap = NullPixmap; /* * go through the mask, checking the values, * looking up pixmaps and cursors and hold a reference * to them. */ pAttr->mask = tmask = stuff->mask | CWOverrideRedirect; pVlist = (unsigned int *) (stuff + 1); while (tmask) { imask = lowbit(tmask); tmask &= ~imask; switch (imask) { case CWBackPixmap: pixID = (Pixmap) * pVlist; if (pixID == None) { *values++ = None; } else if (pixID == ParentRelative) { if (depth != pParent->drawable.depth) { ret = BadMatch; goto PatchUp; } *values++ = ParentRelative; } else { ret = dixLookupResourceByType((void **) &pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (ret == Success) { if ((pPixmap->drawable.depth != depth) || (pPixmap->drawable.pScreen != pScreen)) { ret = BadMatch; goto PatchUp; } pAttr->pBackgroundPixmap = pPixmap; pPixmap->refcnt++; pAttr->mask &= ~CWBackPixmap; } else { client->errorValue = pixID; goto PatchUp; } } break; case CWBackPixel: *values++ = (CARD32) *pVlist; break; case CWBorderPixmap: pixID = (Pixmap) * pVlist; if (pixID == CopyFromParent) { if (depth != pParent->drawable.depth) { ret = BadMatch; goto PatchUp; } *values++ = CopyFromParent; } else { ret = dixLookupResourceByType((void **) &pPixmap, pixID, RT_PIXMAP, client, DixReadAccess); if (ret == Success) { if ((pPixmap->drawable.depth != depth) || (pPixmap->drawable.pScreen != pScreen)) { ret = BadMatch; goto PatchUp; } pAttr->pBorderPixmap = pPixmap; pPixmap->refcnt++; pAttr->mask &= ~CWBorderPixmap; } else { client->errorValue = pixID; goto PatchUp; } } break; case CWBorderPixel: *values++ = (CARD32) *pVlist; break; case CWBitGravity: val = (CARD8) *pVlist; if (val > StaticGravity) { ret = BadValue; client->errorValue = val; goto PatchUp; } *values++ = val; break; case CWWinGravity: val = (CARD8) *pVlist; if (val > StaticGravity) { ret = BadValue; client->errorValue = val; goto PatchUp; } *values++ = val; break; case CWBackingStore: val = (CARD8) *pVlist; if ((val != NotUseful) && (val != WhenMapped) && (val != Always)) { ret = BadValue; client->errorValue = val; goto PatchUp; } *values++ = val; break; case CWBackingPlanes: *values++ = (CARD32) *pVlist; break; case CWBackingPixel: *values++ = (CARD32) *pVlist; break; case CWSaveUnder: val = (BOOL) * pVlist; if ((val != xTrue) && (val != xFalse)) { ret = BadValue; client->errorValue = val; goto PatchUp; } *values++ = val; break; case CWEventMask: *values++ = (CARD32) *pVlist; break; case CWDontPropagate: *values++ = (CARD32) *pVlist; break; case CWOverrideRedirect: if (!(stuff->mask & CWOverrideRedirect)) pVlist--; else { val = (BOOL) * pVlist; if ((val != xTrue) && (val != xFalse)) { ret = BadValue; client->errorValue = val; goto PatchUp; } } *values++ = xTrue; break; case CWColormap: cmap = (Colormap) * pVlist; ret = dixLookupResourceByType((void **) &pCmap, cmap, RT_COLORMAP, client, DixUseAccess); if (ret != Success) { client->errorValue = cmap; goto PatchUp; } if (pCmap->pVisual->vid != visual || pCmap->pScreen != pScreen) { ret = BadMatch; goto PatchUp; } pAttr->colormap = cmap; pAttr->mask &= ~CWColormap; break; case CWCursor: cursorID = (Cursor) * pVlist; if (cursorID == None) { *values++ = None; } else { ret = dixLookupResourceByType((void **) &pCursor, cursorID, RT_CURSOR, client, DixUseAccess); if (ret != Success) { client->errorValue = cursorID; goto PatchUp; } pAttr->pCursor = RefCursor(pCursor); pAttr->mask &= ~CWCursor; } break; default: ret = BadValue; client->errorValue = stuff->mask; goto PatchUp; } pVlist++; } if (pPriv->attr) FreeResource(pPriv->attr->resource, AttrType); pPriv->attr = pAttr; pAttr->resource = FakeClientID(client->index); if (!AddResource(pAttr->resource, AttrType, (void *) pAttr)) return BadAlloc; return Success; PatchUp: FreeAttrs(pAttr); bail: CheckScreenPrivate(pScreen); if (pAttr) free(pAttr->values); free(pAttr); return ret; } static int ScreenSaverUnsetAttributes(ClientPtr client) { REQUEST(xScreenSaverSetAttributesReq); DrawablePtr pDraw; ScreenSaverScreenPrivatePtr pPriv; int rc; REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixGetAttrAccess); if (rc != Success) return rc; pPriv = GetScreenPrivate(pDraw->pScreen); if (pPriv && pPriv->attr && pPriv->attr->client == client) { FreeResource(pPriv->attr->resource, AttrType); FreeScreenAttr(pPriv->attr); pPriv->attr = NULL; CheckScreenPrivate(pDraw->pScreen); } return Success; } static int ProcScreenSaverSetAttributes(ClientPtr client) { #ifdef PANORAMIX if (!noPanoramiXExtension) { REQUEST(xScreenSaverSetAttributesReq); PanoramiXRes *draw; PanoramiXRes *backPix = NULL; PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; int i, status, len; int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; XID orig_visual, tmp; REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); status = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (status != Success) return (status == BadValue) ? BadDrawable : status; len = stuff->length - bytes_to_int32(sizeof(xScreenSaverSetAttributesReq)); if (Ones(stuff->mask) != len) return BadLength; if ((Mask) stuff->mask & CWBackPixmap) { pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { status = dixLookupResourceByType((void **) &backPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (status != Success) return status; } } if ((Mask) stuff->mask & CWBorderPixmap) { pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { status = dixLookupResourceByType((void **) &bordPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (status != Success) return status; } } if ((Mask) stuff->mask & CWColormap) { cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if (tmp != CopyFromParent) { status = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); if (status != Success) return status; } } orig_visual = stuff->visualID; FOR_NSCREENS_BACKWARD(i) { stuff->drawable = draw->info[i].id; if (backPix) *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[i].id; if (bordPix) *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[i].id; if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[i].id; if (orig_visual != CopyFromParent) stuff->visualID = PanoramiXTranslateVisualID(i, orig_visual); status = ScreenSaverSetAttributes(client); } return status; } #endif return ScreenSaverSetAttributes(client); } static int ProcScreenSaverUnsetAttributes(ClientPtr client) { #ifdef PANORAMIX if (!noPanoramiXExtension) { REQUEST(xScreenSaverUnsetAttributesReq); PanoramiXRes *draw; int rc, i; REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); rc = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (rc != Success) return (rc == BadValue) ? BadDrawable : rc; for (i = PanoramiXNumScreens - 1; i > 0; i--) { stuff->drawable = draw->info[i].id; ScreenSaverUnsetAttributes(client); } stuff->drawable = draw->info[0].id; } #endif return ScreenSaverUnsetAttributes(client); } static int ProcScreenSaverSuspend(ClientPtr client) { ScreenSaverSuspensionPtr *prev, this; BOOL suspend; REQUEST(xScreenSaverSuspendReq); REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); /* * Old versions of XCB encode suspend as 1 byte followed by three * pad bytes (which are always cleared), instead of a 4 byte * value. Be compatible by just checking for a non-zero value in * all 32-bits. */ suspend = stuff->suspend != 0; /* Check if this client is suspending the screensaver */ for (prev = &suspendingClients; (this = *prev); prev = &this->next) if (this->pClient == client) break; if (this) { if (suspend == TRUE) this->count++; else if (--this->count == 0) FreeResource(this->clientResource, RT_NONE); return Success; } /* If we get to this point, this client isn't suspending the screensaver */ if (suspend == FALSE) return Success; /* * Allocate a suspension record for the client, and stop the screensaver * if it isn't already suspended by another client. We attach a resource ID * to the record, so the screensaver will be re-enabled and the record freed * if the client disconnects without reenabling it first. */ this = malloc(sizeof(ScreenSaverSuspensionRec)); if (!this) return BadAlloc; this->next = NULL; this->pClient = client; this->count = 1; this->clientResource = FakeClientID(client->index); if (!AddResource(this->clientResource, SuspendType, (void *) this)) { free(this); return BadAlloc; } *prev = this; if (!screenSaverSuspended) { screenSaverSuspended = TRUE; FreeScreenSaverTimer(); } return Success; } static int (*NormalVector[]) (ClientPtr /* client */ ) = { ProcScreenSaverQueryVersion, ProcScreenSaverQueryInfo, ProcScreenSaverSelectInput, ProcScreenSaverSetAttributes, ProcScreenSaverUnsetAttributes, ProcScreenSaverSuspend,}; static int ProcScreenSaverDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < ARRAY_SIZE(NormalVector)) return (*NormalVector[stuff->data]) (client); return BadRequest; } static int _X_COLD SProcScreenSaverQueryVersion(ClientPtr client) { REQUEST(xScreenSaverQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverQueryVersionReq); return ProcScreenSaverQueryVersion(client); } static int _X_COLD SProcScreenSaverQueryInfo(ClientPtr client) { REQUEST(xScreenSaverQueryInfoReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverQueryInfoReq); swapl(&stuff->drawable); return ProcScreenSaverQueryInfo(client); } static int _X_COLD SProcScreenSaverSelectInput(ClientPtr client) { REQUEST(xScreenSaverSelectInputReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverSelectInputReq); swapl(&stuff->drawable); swapl(&stuff->eventMask); return ProcScreenSaverSelectInput(client); } static int _X_COLD SProcScreenSaverSetAttributes(ClientPtr client) { REQUEST(xScreenSaverSetAttributesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xScreenSaverSetAttributesReq); swapl(&stuff->drawable); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swaps(&stuff->borderWidth); swapl(&stuff->visualID); swapl(&stuff->mask); SwapRestL(stuff); return ProcScreenSaverSetAttributes(client); } static int _X_COLD SProcScreenSaverUnsetAttributes(ClientPtr client) { REQUEST(xScreenSaverUnsetAttributesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverUnsetAttributesReq); swapl(&stuff->drawable); return ProcScreenSaverUnsetAttributes(client); } static int _X_COLD SProcScreenSaverSuspend(ClientPtr client) { REQUEST(xScreenSaverSuspendReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xScreenSaverSuspendReq); swapl(&stuff->suspend); return ProcScreenSaverSuspend(client); } static int (*SwappedVector[]) (ClientPtr /* client */ ) = { SProcScreenSaverQueryVersion, SProcScreenSaverQueryInfo, SProcScreenSaverSelectInput, SProcScreenSaverSetAttributes, SProcScreenSaverUnsetAttributes, SProcScreenSaverSuspend,}; static int _X_COLD SProcScreenSaverDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data < ARRAY_SIZE(NormalVector)) return (*SwappedVector[stuff->data]) (client); return BadRequest; } void ScreenSaverExtensionInit(void) { ExtensionEntry *extEntry; int i; ScreenPtr pScreen; if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return; AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr"); SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents, "SaverEvent"); SuspendType = CreateNewResourceType(ScreenSaverFreeSuspend, "SaverSuspend"); for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; SetScreenPrivate(pScreen, NULL); } if (AttrType && SaverEventType && SuspendType && (extEntry = AddExtension(ScreenSaverName, ScreenSaverNumberEvents, 0, ProcScreenSaverDispatch, SProcScreenSaverDispatch, NULL, StandardMinorOpcode))) { ScreenSaverEventBase = extEntry->eventBase; EventSwapVector[ScreenSaverEventBase] = (EventSwapPtr) SScreenSaverNotifyEvent; } } xorg-server-21.1.16/Xext/panoramiX.c0000644000175000017500000011346214757411105012674 /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef HAVE_DMX_CONFIG_H #include #endif #include #include #include #include #include "misc.h" #include "cursor.h" #include "cursorstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "gc.h" #include "gcstruct.h" #include "scrnintstr.h" #include "window.h" #include "windowstr.h" #include "pixmapstr.h" #include "panoramiX.h" #include #include "panoramiXsrv.h" #include "globals.h" #include "servermd.h" #include "resource.h" #include "picturestr.h" #include "xfixesint.h" #include "damageextint.h" #ifdef COMPOSITE #include "compint.h" #endif #include "extinit.h" #include "protocol-versions.h" #ifdef GLXPROXY extern VisualPtr glxMatchVisual(ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatchScreen); #endif /* * PanoramiX data declarations */ int PanoramiXPixWidth = 0; int PanoramiXPixHeight = 0; int PanoramiXNumScreens = 0; _X_EXPORT RegionRec PanoramiXScreenRegion = { {0, 0, 0, 0}, NULL }; static int PanoramiXNumDepths; static DepthPtr PanoramiXDepths; static int PanoramiXNumVisuals; static VisualPtr PanoramiXVisuals; RESTYPE XRC_DRAWABLE; RESTYPE XRT_WINDOW; RESTYPE XRT_PIXMAP; RESTYPE XRT_GC; RESTYPE XRT_COLORMAP; static Bool VisualsEqual(VisualPtr, ScreenPtr, VisualPtr); XineramaVisualsEqualProcPtr XineramaVisualsEqualPtr = &VisualsEqual; /* * Function prototypes */ static int panoramiXGeneration; static int ProcPanoramiXDispatch(ClientPtr client); static void PanoramiXResetProc(ExtensionEntry *); /* * External references for functions and data variables */ #include "panoramiXh.h" int (*SavedProcVector[256]) (ClientPtr client) = { NULL,}; static DevPrivateKeyRec PanoramiXGCKeyRec; #define PanoramiXGCKey (&PanoramiXGCKeyRec) static DevPrivateKeyRec PanoramiXScreenKeyRec; #define PanoramiXScreenKey (&PanoramiXScreenKeyRec) typedef struct { DDXPointRec clipOrg; DDXPointRec patOrg; const GCFuncs *wrapFuncs; } PanoramiXGCRec, *PanoramiXGCPtr; typedef struct { CreateGCProcPtr CreateGC; CloseScreenProcPtr CloseScreen; } PanoramiXScreenRec, *PanoramiXScreenPtr; static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr); static void XineramaChangeGC(GCPtr, unsigned long); static void XineramaCopyGC(GCPtr, unsigned long, GCPtr); static void XineramaDestroyGC(GCPtr); static void XineramaChangeClip(GCPtr, int, void *, int); static void XineramaDestroyClip(GCPtr); static void XineramaCopyClip(GCPtr, GCPtr); static const GCFuncs XineramaGCFuncs = { XineramaValidateGC, XineramaChangeGC, XineramaCopyGC, XineramaDestroyGC, XineramaChangeClip, XineramaDestroyClip, XineramaCopyClip }; #define Xinerama_GC_FUNC_PROLOGUE(pGC)\ PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) \ dixLookupPrivate(&(pGC)->devPrivates, PanoramiXGCKey); \ (pGC)->funcs = pGCPriv->wrapFuncs; #define Xinerama_GC_FUNC_EPILOGUE(pGC)\ pGCPriv->wrapFuncs = (pGC)->funcs;\ (pGC)->funcs = &XineramaGCFuncs; static Bool XineramaCloseScreen(ScreenPtr pScreen) { PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->CreateGC = pScreenPriv->CreateGC; if (pScreen->myNum == 0) RegionUninit(&PanoramiXScreenRegion); free(pScreenPriv); return (*pScreen->CloseScreen) (pScreen); } static Bool XineramaCreateGC(GCPtr pGC) { ScreenPtr pScreen = pGC->pScreen; PanoramiXScreenPtr pScreenPriv = (PanoramiXScreenPtr) dixLookupPrivate(&pScreen->devPrivates, PanoramiXScreenKey); Bool ret; pScreen->CreateGC = pScreenPriv->CreateGC; if ((ret = (*pScreen->CreateGC) (pGC))) { PanoramiXGCPtr pGCPriv = (PanoramiXGCPtr) dixLookupPrivate(&pGC->devPrivates, PanoramiXGCKey); pGCPriv->wrapFuncs = pGC->funcs; pGC->funcs = &XineramaGCFuncs; pGCPriv->clipOrg.x = pGC->clipOrg.x; pGCPriv->clipOrg.y = pGC->clipOrg.y; pGCPriv->patOrg.x = pGC->patOrg.x; pGCPriv->patOrg.y = pGC->patOrg.y; } pScreen->CreateGC = XineramaCreateGC; return ret; } static void XineramaValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw) { Xinerama_GC_FUNC_PROLOGUE(pGC); if ((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr) pDraw)->parent)) { /* the root window */ int x_off = pGC->pScreen->x; int y_off = pGC->pScreen->y; int new_val; new_val = pGCPriv->clipOrg.x - x_off; if (pGC->clipOrg.x != new_val) { pGC->clipOrg.x = new_val; changes |= GCClipXOrigin; } new_val = pGCPriv->clipOrg.y - y_off; if (pGC->clipOrg.y != new_val) { pGC->clipOrg.y = new_val; changes |= GCClipYOrigin; } new_val = pGCPriv->patOrg.x - x_off; if (pGC->patOrg.x != new_val) { pGC->patOrg.x = new_val; changes |= GCTileStipXOrigin; } new_val = pGCPriv->patOrg.y - y_off; if (pGC->patOrg.y != new_val) { pGC->patOrg.y = new_val; changes |= GCTileStipYOrigin; } } else { if (pGC->clipOrg.x != pGCPriv->clipOrg.x) { pGC->clipOrg.x = pGCPriv->clipOrg.x; changes |= GCClipXOrigin; } if (pGC->clipOrg.y != pGCPriv->clipOrg.y) { pGC->clipOrg.y = pGCPriv->clipOrg.y; changes |= GCClipYOrigin; } if (pGC->patOrg.x != pGCPriv->patOrg.x) { pGC->patOrg.x = pGCPriv->patOrg.x; changes |= GCTileStipXOrigin; } if (pGC->patOrg.y != pGCPriv->patOrg.y) { pGC->patOrg.y = pGCPriv->patOrg.y; changes |= GCTileStipYOrigin; } } (*pGC->funcs->ValidateGC) (pGC, changes, pDraw); Xinerama_GC_FUNC_EPILOGUE(pGC); } static void XineramaDestroyGC(GCPtr pGC) { Xinerama_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->DestroyGC) (pGC); Xinerama_GC_FUNC_EPILOGUE(pGC); } static void XineramaChangeGC(GCPtr pGC, unsigned long mask) { Xinerama_GC_FUNC_PROLOGUE(pGC); if (mask & GCTileStipXOrigin) pGCPriv->patOrg.x = pGC->patOrg.x; if (mask & GCTileStipYOrigin) pGCPriv->patOrg.y = pGC->patOrg.y; if (mask & GCClipXOrigin) pGCPriv->clipOrg.x = pGC->clipOrg.x; if (mask & GCClipYOrigin) pGCPriv->clipOrg.y = pGC->clipOrg.y; (*pGC->funcs->ChangeGC) (pGC, mask); Xinerama_GC_FUNC_EPILOGUE(pGC); } static void XineramaCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) { PanoramiXGCPtr pSrcPriv = (PanoramiXGCPtr) dixLookupPrivate(&pGCSrc->devPrivates, PanoramiXGCKey); Xinerama_GC_FUNC_PROLOGUE(pGCDst); if (mask & GCTileStipXOrigin) pGCPriv->patOrg.x = pSrcPriv->patOrg.x; if (mask & GCTileStipYOrigin) pGCPriv->patOrg.y = pSrcPriv->patOrg.y; if (mask & GCClipXOrigin) pGCPriv->clipOrg.x = pSrcPriv->clipOrg.x; if (mask & GCClipYOrigin) pGCPriv->clipOrg.y = pSrcPriv->clipOrg.y; (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); Xinerama_GC_FUNC_EPILOGUE(pGCDst); } static void XineramaChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { Xinerama_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); Xinerama_GC_FUNC_EPILOGUE(pGC); } static void XineramaCopyClip(GCPtr pgcDst, GCPtr pgcSrc) { Xinerama_GC_FUNC_PROLOGUE(pgcDst); (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); Xinerama_GC_FUNC_EPILOGUE(pgcDst); } static void XineramaDestroyClip(GCPtr pGC) { Xinerama_GC_FUNC_PROLOGUE(pGC); (*pGC->funcs->DestroyClip) (pGC); Xinerama_GC_FUNC_EPILOGUE(pGC); } int XineramaDeleteResource(void *data, XID id) { free(data); return 1; } typedef struct { int screen; int id; } PanoramiXSearchData; static Bool XineramaFindIDByScrnum(void *resource, XID id, void *privdata) { PanoramiXRes *res = (PanoramiXRes *) resource; PanoramiXSearchData *data = (PanoramiXSearchData *) privdata; return res->info[data->screen].id == data->id; } PanoramiXRes * PanoramiXFindIDByScrnum(RESTYPE type, XID id, int screen) { PanoramiXSearchData data; void *val; if (!screen) { dixLookupResourceByType(&val, id, type, serverClient, DixReadAccess); return val; } data.screen = screen; data.id = id; return LookupClientResourceComplex(clients[CLIENT_ID(id)], type, XineramaFindIDByScrnum, &data); } typedef struct _connect_callback_list { void (*func) (void); struct _connect_callback_list *next; } XineramaConnectionCallbackList; static XineramaConnectionCallbackList *ConnectionCallbackList = NULL; Bool XineramaRegisterConnectionBlockCallback(void (*func) (void)) { XineramaConnectionCallbackList *newlist; if (!(newlist = malloc(sizeof(XineramaConnectionCallbackList)))) return FALSE; newlist->next = ConnectionCallbackList; newlist->func = func; ConnectionCallbackList = newlist; return TRUE; } static void XineramaInitData(void) { int i, w, h; RegionNull(&PanoramiXScreenRegion); FOR_NSCREENS(i) { BoxRec TheBox; RegionRec ScreenRegion; ScreenPtr pScreen = screenInfo.screens[i]; TheBox.x1 = pScreen->x; TheBox.x2 = TheBox.x1 + pScreen->width; TheBox.y1 = pScreen->y; TheBox.y2 = TheBox.y1 + pScreen->height; RegionInit(&ScreenRegion, &TheBox, 1); RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion, &ScreenRegion); RegionUninit(&ScreenRegion); } PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width; PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height; FOR_NSCREENS_FORWARD_SKIP(i) { ScreenPtr pScreen = screenInfo.screens[i]; w = pScreen->x + pScreen->width; h = pScreen->y + pScreen->height; if (PanoramiXPixWidth < w) PanoramiXPixWidth = w; if (PanoramiXPixHeight < h) PanoramiXPixHeight = h; } } void XineramaReinitData(void) { RegionUninit(&PanoramiXScreenRegion); XineramaInitData(); } /* * PanoramiXExtensionInit(): * Called from InitExtensions in main(). * Register PanoramiXeen Extension * Initialize global variables. */ void PanoramiXExtensionInit(void) { int i; Bool success = FALSE; ExtensionEntry *extEntry; ScreenPtr pScreen = screenInfo.screens[0]; PanoramiXScreenPtr pScreenPriv; if (noPanoramiXExtension) return; if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) { noPanoramiXExtension = TRUE; return; } if (!dixRegisterPrivateKey (&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) { noPanoramiXExtension = TRUE; return; } PanoramiXNumScreens = screenInfo.numScreens; if (PanoramiXNumScreens == 1) { /* Only 1 screen */ noPanoramiXExtension = TRUE; return; } while (panoramiXGeneration != serverGeneration) { extEntry = AddExtension(PANORAMIX_PROTOCOL_NAME, 0, 0, ProcPanoramiXDispatch, SProcPanoramiXDispatch, PanoramiXResetProc, StandardMinorOpcode); if (!extEntry) break; /* * First make sure all the basic allocations succeed. If not, * run in non-PanoramiXeen mode. */ FOR_NSCREENS(i) { pScreen = screenInfo.screens[i]; pScreenPriv = malloc(sizeof(PanoramiXScreenRec)); dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey, pScreenPriv); if (!pScreenPriv) { noPanoramiXExtension = TRUE; return; } pScreenPriv->CreateGC = pScreen->CreateGC; pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CreateGC = XineramaCreateGC; pScreen->CloseScreen = XineramaCloseScreen; } XRC_DRAWABLE = CreateNewResourceClass(); XRT_WINDOW = CreateNewResourceType(XineramaDeleteResource, "XineramaWindow"); if (XRT_WINDOW) XRT_WINDOW |= XRC_DRAWABLE; XRT_PIXMAP = CreateNewResourceType(XineramaDeleteResource, "XineramaPixmap"); if (XRT_PIXMAP) XRT_PIXMAP |= XRC_DRAWABLE; XRT_GC = CreateNewResourceType(XineramaDeleteResource, "XineramaGC"); XRT_COLORMAP = CreateNewResourceType(XineramaDeleteResource, "XineramaColormap"); if (XRT_WINDOW && XRT_PIXMAP && XRT_GC && XRT_COLORMAP) { panoramiXGeneration = serverGeneration; success = TRUE; } SetResourceTypeErrorValue(XRT_WINDOW, BadWindow); SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap); SetResourceTypeErrorValue(XRT_GC, BadGC); SetResourceTypeErrorValue(XRT_COLORMAP, BadColor); } if (!success) { noPanoramiXExtension = TRUE; ErrorF(PANORAMIX_PROTOCOL_NAME " extension failed to initialize\n"); return; } XineramaInitData(); /* * Put our processes into the ProcVector */ for (i = 256; i--;) SavedProcVector[i] = ProcVector[i]; ProcVector[X_CreateWindow] = PanoramiXCreateWindow; ProcVector[X_ChangeWindowAttributes] = PanoramiXChangeWindowAttributes; ProcVector[X_DestroyWindow] = PanoramiXDestroyWindow; ProcVector[X_DestroySubwindows] = PanoramiXDestroySubwindows; ProcVector[X_ChangeSaveSet] = PanoramiXChangeSaveSet; ProcVector[X_ReparentWindow] = PanoramiXReparentWindow; ProcVector[X_MapWindow] = PanoramiXMapWindow; ProcVector[X_MapSubwindows] = PanoramiXMapSubwindows; ProcVector[X_UnmapWindow] = PanoramiXUnmapWindow; ProcVector[X_UnmapSubwindows] = PanoramiXUnmapSubwindows; ProcVector[X_ConfigureWindow] = PanoramiXConfigureWindow; ProcVector[X_CirculateWindow] = PanoramiXCirculateWindow; ProcVector[X_GetGeometry] = PanoramiXGetGeometry; ProcVector[X_TranslateCoords] = PanoramiXTranslateCoords; ProcVector[X_CreatePixmap] = PanoramiXCreatePixmap; ProcVector[X_FreePixmap] = PanoramiXFreePixmap; ProcVector[X_CreateGC] = PanoramiXCreateGC; ProcVector[X_ChangeGC] = PanoramiXChangeGC; ProcVector[X_CopyGC] = PanoramiXCopyGC; ProcVector[X_SetDashes] = PanoramiXSetDashes; ProcVector[X_SetClipRectangles] = PanoramiXSetClipRectangles; ProcVector[X_FreeGC] = PanoramiXFreeGC; ProcVector[X_ClearArea] = PanoramiXClearToBackground; ProcVector[X_CopyArea] = PanoramiXCopyArea; ProcVector[X_CopyPlane] = PanoramiXCopyPlane; ProcVector[X_PolyPoint] = PanoramiXPolyPoint; ProcVector[X_PolyLine] = PanoramiXPolyLine; ProcVector[X_PolySegment] = PanoramiXPolySegment; ProcVector[X_PolyRectangle] = PanoramiXPolyRectangle; ProcVector[X_PolyArc] = PanoramiXPolyArc; ProcVector[X_FillPoly] = PanoramiXFillPoly; ProcVector[X_PolyFillRectangle] = PanoramiXPolyFillRectangle; ProcVector[X_PolyFillArc] = PanoramiXPolyFillArc; ProcVector[X_PutImage] = PanoramiXPutImage; ProcVector[X_GetImage] = PanoramiXGetImage; ProcVector[X_PolyText8] = PanoramiXPolyText8; ProcVector[X_PolyText16] = PanoramiXPolyText16; ProcVector[X_ImageText8] = PanoramiXImageText8; ProcVector[X_ImageText16] = PanoramiXImageText16; ProcVector[X_CreateColormap] = PanoramiXCreateColormap; ProcVector[X_FreeColormap] = PanoramiXFreeColormap; ProcVector[X_CopyColormapAndFree] = PanoramiXCopyColormapAndFree; ProcVector[X_InstallColormap] = PanoramiXInstallColormap; ProcVector[X_UninstallColormap] = PanoramiXUninstallColormap; ProcVector[X_AllocColor] = PanoramiXAllocColor; ProcVector[X_AllocNamedColor] = PanoramiXAllocNamedColor; ProcVector[X_AllocColorCells] = PanoramiXAllocColorCells; ProcVector[X_AllocColorPlanes] = PanoramiXAllocColorPlanes; ProcVector[X_FreeColors] = PanoramiXFreeColors; ProcVector[X_StoreColors] = PanoramiXStoreColors; ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor; PanoramiXRenderInit(); PanoramiXFixesInit(); PanoramiXDamageInit(); #ifdef COMPOSITE PanoramiXCompositeInit(); #endif } Bool PanoramiXCreateConnectionBlock(void) { int i, j, length; Bool disable_backing_store = FALSE; int old_width, old_height; float width_mult, height_mult; xWindowRoot *root; xVisualType *visual; xDepth *depth; VisualPtr pVisual; ScreenPtr pScreen; /* * Do normal CreateConnectionBlock but faking it for only one screen */ if (!PanoramiXNumDepths) { ErrorF("Xinerama error: No common visuals\n"); return FALSE; } for (i = 1; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; if (pScreen->rootDepth != screenInfo.screens[0]->rootDepth) { ErrorF("Xinerama error: Root window depths differ\n"); return FALSE; } if (pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport) disable_backing_store = TRUE; } if (disable_backing_store) { for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; pScreen->backingStoreSupport = NotUseful; } } i = screenInfo.numScreens; screenInfo.numScreens = 1; if (!CreateConnectionBlock()) { screenInfo.numScreens = i; return FALSE; } screenInfo.numScreens = i; root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart); length = connBlockScreenStart + sizeof(xWindowRoot); /* overwrite the connection block */ root->nDepths = PanoramiXNumDepths; for (i = 0; i < PanoramiXNumDepths; i++) { depth = (xDepth *) (ConnectionInfo + length); depth->depth = PanoramiXDepths[i].depth; depth->nVisuals = PanoramiXDepths[i].numVids; length += sizeof(xDepth); visual = (xVisualType *) (ConnectionInfo + length); for (j = 0; j < depth->nVisuals; j++, visual++) { visual->visualID = PanoramiXDepths[i].vids[j]; for (pVisual = PanoramiXVisuals; pVisual->vid != visual->visualID; pVisual++); visual->class = pVisual->class; visual->bitsPerRGB = pVisual->bitsPerRGBValue; visual->colormapEntries = pVisual->ColormapEntries; visual->redMask = pVisual->redMask; visual->greenMask = pVisual->greenMask; visual->blueMask = pVisual->blueMask; } length += (depth->nVisuals * sizeof(xVisualType)); } connSetupPrefix.length = bytes_to_int32(length); for (i = 0; i < PanoramiXNumDepths; i++) free(PanoramiXDepths[i].vids); free(PanoramiXDepths); PanoramiXDepths = NULL; /* * OK, change some dimensions so it looks as if it were one big screen */ old_width = root->pixWidth; old_height = root->pixHeight; root->pixWidth = PanoramiXPixWidth; root->pixHeight = PanoramiXPixHeight; width_mult = (1.0 * root->pixWidth) / old_width; height_mult = (1.0 * root->pixHeight) / old_height; root->mmWidth *= width_mult; root->mmHeight *= height_mult; while (ConnectionCallbackList) { void *tmp; tmp = (void *) ConnectionCallbackList; (*ConnectionCallbackList->func) (); ConnectionCallbackList = ConnectionCallbackList->next; free(tmp); } return TRUE; } /* * This isn't just memcmp(), bitsPerRGBValue is skipped. markv made that * change way back before xf86 4.0, but the comment for _why_ is a bit * opaque, so I'm not going to question it for now. * * This is probably better done as a screen hook so DBE/EVI/GLX can add * their own tests, and adding privates to VisualRec so they don't have to * do their own back-mapping. */ static Bool VisualsEqual(VisualPtr a, ScreenPtr pScreenB, VisualPtr b) { return ((a->class == b->class) && (a->ColormapEntries == b->ColormapEntries) && (a->nplanes == b->nplanes) && (a->redMask == b->redMask) && (a->greenMask == b->greenMask) && (a->blueMask == b->blueMask) && (a->offsetRed == b->offsetRed) && (a->offsetGreen == b->offsetGreen) && (a->offsetBlue == b->offsetBlue)); } static void PanoramiXMaybeAddDepth(DepthPtr pDepth) { ScreenPtr pScreen; int j, k; Bool found = FALSE; FOR_NSCREENS_FORWARD_SKIP(j) { pScreen = screenInfo.screens[j]; for (k = 0; k < pScreen->numDepths; k++) { if (pScreen->allowedDepths[k].depth == pDepth->depth) { found = TRUE; break; } } } if (!found) return; j = PanoramiXNumDepths; PanoramiXNumDepths++; PanoramiXDepths = reallocarray(PanoramiXDepths, PanoramiXNumDepths, sizeof(DepthRec)); PanoramiXDepths[j].depth = pDepth->depth; PanoramiXDepths[j].numVids = 0; PanoramiXDepths[j].vids = NULL; } static void PanoramiXMaybeAddVisual(VisualPtr pVisual) { ScreenPtr pScreen; int j, k; Bool found = FALSE; FOR_NSCREENS_FORWARD_SKIP(j) { pScreen = screenInfo.screens[j]; found = FALSE; for (k = 0; k < pScreen->numVisuals; k++) { VisualPtr candidate = &pScreen->visuals[k]; if ((*XineramaVisualsEqualPtr) (pVisual, pScreen, candidate) #ifdef GLXPROXY && glxMatchVisual(screenInfo.screens[0], pVisual, pScreen) #endif ) { found = TRUE; break; } } if (!found) return; } /* found a matching visual on all screens, add it to the subset list */ j = PanoramiXNumVisuals; PanoramiXNumVisuals++; PanoramiXVisuals = reallocarray(PanoramiXVisuals, PanoramiXNumVisuals, sizeof(VisualRec)); memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec)); for (k = 0; k < PanoramiXNumDepths; k++) { if (PanoramiXDepths[k].depth == pVisual->nplanes) { PanoramiXDepths[k].vids = reallocarray(PanoramiXDepths[k].vids, PanoramiXDepths[k].numVids + 1, sizeof(VisualID)); PanoramiXDepths[k].vids[PanoramiXDepths[k].numVids] = pVisual->vid; PanoramiXDepths[k].numVids++; break; } } } extern void PanoramiXConsolidate(void) { int i; PanoramiXRes *root, *defmap, *saver; ScreenPtr pScreen = screenInfo.screens[0]; DepthPtr pDepth = pScreen->allowedDepths; VisualPtr pVisual = pScreen->visuals; PanoramiXNumDepths = 0; PanoramiXNumVisuals = 0; for (i = 0; i < pScreen->numDepths; i++) PanoramiXMaybeAddDepth(pDepth++); for (i = 0; i < pScreen->numVisuals; i++) PanoramiXMaybeAddVisual(pVisual++); root = malloc(sizeof(PanoramiXRes)); root->type = XRT_WINDOW; defmap = malloc(sizeof(PanoramiXRes)); defmap->type = XRT_COLORMAP; saver = malloc(sizeof(PanoramiXRes)); saver->type = XRT_WINDOW; FOR_NSCREENS(i) { ScreenPtr scr = screenInfo.screens[i]; root->info[i].id = scr->root->drawable.id; root->u.win.class = InputOutput; root->u.win.root = TRUE; saver->info[i].id = scr->screensaver.wid; saver->u.win.class = InputOutput; saver->u.win.root = TRUE; defmap->info[i].id = scr->defColormap; } AddResource(root->info[0].id, XRT_WINDOW, root); AddResource(saver->info[0].id, XRT_WINDOW, saver); AddResource(defmap->info[0].id, XRT_COLORMAP, defmap); } VisualID PanoramiXTranslateVisualID(int screen, VisualID orig) { ScreenPtr pOtherScreen = screenInfo.screens[screen]; VisualPtr pVisual = NULL; int i; for (i = 0; i < PanoramiXNumVisuals; i++) { if (orig == PanoramiXVisuals[i].vid) { pVisual = &PanoramiXVisuals[i]; break; } } if (!pVisual) return 0; /* if screen is 0, orig is already the correct visual ID */ if (screen == 0) return orig; /* found the original, now translate it relative to the backend screen */ for (i = 0; i < pOtherScreen->numVisuals; i++) { VisualPtr pOtherVisual = &pOtherScreen->visuals[i]; if ((*XineramaVisualsEqualPtr) (pVisual, pOtherScreen, pOtherVisual)) return pOtherVisual->vid; } return 0; } /* * PanoramiXResetProc() * Exit, deallocating as needed. */ static void PanoramiXResetProc(ExtensionEntry * extEntry) { int i; PanoramiXRenderReset(); PanoramiXFixesReset(); PanoramiXDamageReset(); #ifdef COMPOSITE PanoramiXCompositeReset (); #endif screenInfo.numScreens = PanoramiXNumScreens; for (i = 256; i--;) ProcVector[i] = SavedProcVector[i]; } int ProcPanoramiXQueryVersion(ClientPtr client) { /* REQUEST(xPanoramiXQueryVersionReq); */ xPanoramiXQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_PANORAMIX_MAJOR_VERSION, .minorVersion = SERVER_PANORAMIX_MINOR_VERSION }; REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), &rep); return Success; } int ProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); WindowPtr pWin; xPanoramiXGetStateReply rep; int rc; REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xPanoramiXGetStateReply) { .type = X_Reply, .state = !noPanoramiXExtension, .sequenceNumber = client->sequence, .length = 0, .window = stuff->window }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetStateReply), &rep); return Success; } int ProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); WindowPtr pWin; xPanoramiXGetScreenCountReply rep; int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xPanoramiXGetScreenCountReply) { .type = X_Reply, .ScreenCount = PanoramiXNumScreens, .sequenceNumber = client->sequence, .length = 0, .window = stuff->window }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.window); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), &rep); return Success; } int ProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); WindowPtr pWin; xPanoramiXGetScreenSizeReply rep; int rc; REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); if (stuff->screen >= PanoramiXNumScreens) return BadMatch; rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xPanoramiXGetScreenSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, /* screen dimensions */ .width = screenInfo.screens[stuff->screen]->width, .height = screenInfo.screens[stuff->screen]->height, .window = stuff->window, .screen = stuff->screen }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.width); swapl(&rep.height); swapl(&rep.window); swapl(&rep.screen); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), &rep); return Success; } int ProcXineramaIsActive(ClientPtr client) { /* REQUEST(xXineramaIsActiveReq); */ xXineramaIsActiveReply rep; REQUEST_SIZE_MATCH(xXineramaIsActiveReq); rep = (xXineramaIsActiveReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, #if 1 /* The following hack fools clients into thinking that Xinerama * is disabled even though it is not. */ .state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack #else .state = !noPanoramiXExtension; #endif }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.state); } WriteToClient(client, sizeof(xXineramaIsActiveReply), &rep); return Success; } int ProcXineramaQueryScreens(ClientPtr client) { /* REQUEST(xXineramaQueryScreensReq); */ CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens; xXineramaQueryScreensReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(number * sz_XineramaScreenInfo), .number = number }; REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.number); } WriteToClient(client, sizeof(xXineramaQueryScreensReply), &rep); if (!noPanoramiXExtension) { xXineramaScreenInfo scratch; int i; FOR_NSCREENS(i) { scratch.x_org = screenInfo.screens[i]->x; scratch.y_org = screenInfo.screens[i]->y; scratch.width = screenInfo.screens[i]->width; scratch.height = screenInfo.screens[i]->height; if (client->swapped) { swaps(&scratch.x_org); swaps(&scratch.y_org); swaps(&scratch.width); swaps(&scratch.height); } WriteToClient(client, sz_XineramaScreenInfo, &scratch); } } return Success; } static int ProcPanoramiXDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_PanoramiXQueryVersion: return ProcPanoramiXQueryVersion(client); case X_PanoramiXGetState: return ProcPanoramiXGetState(client); case X_PanoramiXGetScreenCount: return ProcPanoramiXGetScreenCount(client); case X_PanoramiXGetScreenSize: return ProcPanoramiXGetScreenSize(client); case X_XineramaIsActive: return ProcXineramaIsActive(client); case X_XineramaQueryScreens: return ProcXineramaQueryScreens(client); } return BadRequest; } #if X_BYTE_ORDER == X_LITTLE_ENDIAN #define SHIFT_L(v,s) (v) << (s) #define SHIFT_R(v,s) (v) >> (s) #else #define SHIFT_L(v,s) (v) >> (s) #define SHIFT_R(v,s) (v) << (s) #endif static void CopyBits(char *dst, int shiftL, char *src, int bytes) { /* Just get it to work. Worry about speed later */ int shiftR = 8 - shiftL; while (bytes--) { *dst |= SHIFT_L(*src, shiftL); *(dst + 1) |= SHIFT_R(*src, shiftR); dst++; src++; } } /* Caution. This doesn't support 2 and 4 bpp formats. We expect 1 bpp and planar data to be already cleared when presented to this function */ void XineramaGetImageData(DrawablePtr *pDrawables, int left, int top, int width, int height, unsigned int format, unsigned long planemask, char *data, int pitch, Bool isRoot) { RegionRec SrcRegion, ScreenRegion, GrabRegion; BoxRec SrcBox, *pbox; int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth; DrawablePtr pDraw = pDrawables[0]; char *ScratchMem = NULL; size = 0; /* find box in logical screen space */ SrcBox.x1 = left; SrcBox.y1 = top; if (!isRoot) { SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x; SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y; } SrcBox.x2 = SrcBox.x1 + width; SrcBox.y2 = SrcBox.y1 + height; RegionInit(&SrcRegion, &SrcBox, 1); RegionNull(&GrabRegion); depth = (format == XYPixmap) ? 1 : pDraw->depth; FOR_NSCREENS(i) { BoxRec TheBox; ScreenPtr pScreen; pDraw = pDrawables[i]; pScreen = pDraw->pScreen; TheBox.x1 = pScreen->x; TheBox.x2 = TheBox.x1 + pScreen->width; TheBox.y1 = pScreen->y; TheBox.y2 = TheBox.y1 + pScreen->height; RegionInit(&ScreenRegion, &TheBox, 1); inOut = RegionContainsRect(&ScreenRegion, &SrcBox); if (inOut == rgnPART) RegionIntersect(&GrabRegion, &SrcRegion, &ScreenRegion); RegionUninit(&ScreenRegion); if (inOut == rgnIN) { (*pScreen->GetImage) (pDraw, SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x, SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y, width, height, format, planemask, data); break; } else if (inOut == rgnOUT) continue; nbox = RegionNumRects(&GrabRegion); if (nbox) { pbox = RegionRects(&GrabRegion); while (nbox--) { w = pbox->x2 - pbox->x1; h = pbox->y2 - pbox->y1; ScratchPitch = PixmapBytePad(w, depth); sizeNeeded = ScratchPitch * h; if (sizeNeeded > size) { char *tmpdata = ScratchMem; ScratchMem = realloc(ScratchMem, sizeNeeded); if (ScratchMem) size = sizeNeeded; else { ScratchMem = tmpdata; break; } } x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x; y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y; (*pScreen->GetImage) (pDraw, x, y, w, h, format, planemask, ScratchMem); /* copy the memory over */ if (depth == 1) { int k, shift, leftover, index, index2; x = pbox->x1 - SrcBox.x1; y = pbox->y1 - SrcBox.y1; shift = x & 7; x >>= 3; leftover = w & 7; w >>= 3; /* clean up the edge */ if (leftover) { int mask = (1 << leftover) - 1; for (j = h, k = w; j--; k += ScratchPitch) ScratchMem[k] &= mask; } for (j = 0, index = (pitch * y) + x, index2 = 0; j < h; j++, index += pitch, index2 += ScratchPitch) { if (w) { if (!shift) memcpy(data + index, ScratchMem + index2, w); else CopyBits(data + index, shift, ScratchMem + index2, w); } if (leftover) { data[index + w] |= SHIFT_L(ScratchMem[index2 + w], shift); if ((shift + leftover) > 8) data[index + w + 1] |= SHIFT_R(ScratchMem[index2 + w], (8 - shift)); } } } else { j = BitsPerPixel(depth) >> 3; x = (pbox->x1 - SrcBox.x1) * j; y = pbox->y1 - SrcBox.y1; w *= j; for (j = 0; j < h; j++) { memcpy(data + (pitch * (y + j)) + x, ScratchMem + (ScratchPitch * j), w); } } pbox++; } RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion); if (!RegionNotEmpty(&SrcRegion)) break; } } free(ScratchMem); RegionUninit(&SrcRegion); RegionUninit(&GrabRegion); } xorg-server-21.1.16/Xext/panoramiXh.h0000644000175000017500000000616314757411105013050 /* * Server dispatcher function replacements */ extern int PanoramiXCreateWindow(ClientPtr client); extern int PanoramiXChangeWindowAttributes(ClientPtr client); extern int PanoramiXDestroyWindow(ClientPtr client); extern int PanoramiXDestroySubwindows(ClientPtr client); extern int PanoramiXChangeSaveSet(ClientPtr client); extern int PanoramiXReparentWindow(ClientPtr client); extern int PanoramiXMapWindow(ClientPtr client); extern int PanoramiXMapSubwindows(ClientPtr client); extern int PanoramiXUnmapWindow(ClientPtr client); extern int PanoramiXUnmapSubwindows(ClientPtr client); extern int PanoramiXConfigureWindow(ClientPtr client); extern int PanoramiXCirculateWindow(ClientPtr client); extern int PanoramiXGetGeometry(ClientPtr client); extern int PanoramiXTranslateCoords(ClientPtr client); extern int PanoramiXCreatePixmap(ClientPtr client); extern int PanoramiXFreePixmap(ClientPtr client); extern int PanoramiXChangeGC(ClientPtr client); extern int PanoramiXCopyGC(ClientPtr client); extern int PanoramiXCopyColormapAndFree(ClientPtr client); extern int PanoramiXCreateGC(ClientPtr client); extern int PanoramiXSetDashes(ClientPtr client); extern int PanoramiXSetClipRectangles(ClientPtr client); extern int PanoramiXFreeGC(ClientPtr client); extern int PanoramiXClearToBackground(ClientPtr client); extern int PanoramiXCopyArea(ClientPtr client); extern int PanoramiXCopyPlane(ClientPtr client); extern int PanoramiXPolyPoint(ClientPtr client); extern int PanoramiXPolyLine(ClientPtr client); extern int PanoramiXPolySegment(ClientPtr client); extern int PanoramiXPolyRectangle(ClientPtr client); extern int PanoramiXPolyArc(ClientPtr client); extern int PanoramiXFillPoly(ClientPtr client); extern int PanoramiXPolyFillArc(ClientPtr client); extern int PanoramiXPolyFillRectangle(ClientPtr client); extern int PanoramiXPutImage(ClientPtr client); extern int PanoramiXGetImage(ClientPtr client); extern int PanoramiXPolyText8(ClientPtr client); extern int PanoramiXPolyText16(ClientPtr client); extern int PanoramiXImageText8(ClientPtr client); extern int PanoramiXImageText16(ClientPtr client); extern int PanoramiXCreateColormap(ClientPtr client); extern int PanoramiXFreeColormap(ClientPtr client); extern int PanoramiXInstallColormap(ClientPtr client); extern int PanoramiXUninstallColormap(ClientPtr client); extern int PanoramiXAllocColor(ClientPtr client); extern int PanoramiXAllocNamedColor(ClientPtr client); extern int PanoramiXAllocColorCells(ClientPtr client); extern int PanoramiXStoreNamedColor(ClientPtr client); extern int PanoramiXFreeColors(ClientPtr client); extern int PanoramiXStoreColors(ClientPtr client); extern int PanoramiXAllocColorPlanes(ClientPtr client); #define PROC_EXTERN(pfunc) extern int pfunc(ClientPtr) PROC_EXTERN(ProcPanoramiXQueryVersion); PROC_EXTERN(ProcPanoramiXGetState); PROC_EXTERN(ProcPanoramiXGetScreenCount); PROC_EXTERN(ProcPanoramiXGetScreenSize); PROC_EXTERN(ProcXineramaQueryScreens); PROC_EXTERN(ProcXineramaIsActive); extern int SProcPanoramiXDispatch(ClientPtr client); extern int connBlockScreenStart; extern xConnSetupPrefix connSetupPrefix; extern int (*SavedProcVector[256]) (ClientPtr client); xorg-server-21.1.16/Xext/panoramiXprocs.c0000644000175000017500000022627614757411105013753 /***************************************************************** 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. ******************************************************************/ /* Massively rewritten by Mark Vojkovich */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "windowstr.h" #include "dixfontstr.h" #include "gcstruct.h" #include "colormapst.h" #include "scrnintstr.h" #include "opaque.h" #include "inputstr.h" #include "migc.h" #include "misc.h" #include "dixstruct.h" #include "panoramiX.h" #include "panoramiXsrv.h" #include "resource.h" #include "panoramiXh.h" #define XINERAMA_IMAGE_BUFSIZE (256*1024) #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ CWDontPropagate | CWOverrideRedirect | CWCursor ) int PanoramiXCreateWindow(ClientPtr client) { PanoramiXRes *parent, *newWin; PanoramiXRes *backPix = NULL; PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; REQUEST(xCreateWindowReq); int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; int result, len, j; int orig_x, orig_y; XID orig_visual, tmp; Bool parentIsRoot; REQUEST_AT_LEAST_SIZE(xCreateWindowReq); len = client->req_len - bytes_to_int32(sizeof(xCreateWindowReq)); if (Ones(stuff->mask) != len) return BadLength; result = dixLookupResourceByType((void **) &parent, stuff->parent, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; if (stuff->class == CopyFromParent) stuff->class = parent->u.win.class; if ((stuff->class == InputOnly) && (stuff->mask & (~INPUTONLY_LEGAL_MASK))) return BadMatch; if ((Mask) stuff->mask & CWBackPixmap) { pback_offset = Ones((Mask) stuff->mask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { result = dixLookupResourceByType((void **) &backPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & CWBorderPixmap) { pbord_offset = Ones((Mask) stuff->mask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &bordPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & CWColormap) { cmap_offset = Ones((Mask) stuff->mask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); if (result != Success) return result; } } if (!(newWin = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newWin->type = XRT_WINDOW; newWin->u.win.visibility = VisibilityNotViewable; newWin->u.win.class = stuff->class; newWin->u.win.root = FALSE; panoramix_setup_ids(newWin, client, stuff->wid); if (stuff->class == InputOnly) stuff->visual = CopyFromParent; orig_visual = stuff->visual; orig_x = stuff->x; orig_y = stuff->y; parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) || (stuff->parent == screenInfo.screens[0]->screensaver.wid); FOR_NSCREENS_BACKWARD(j) { stuff->wid = newWin->info[j].id; stuff->parent = parent->info[j].id; if (parentIsRoot) { stuff->x = orig_x - screenInfo.screens[j]->x; stuff->y = orig_y - screenInfo.screens[j]->y; } if (backPix) *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; if (bordPix) *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; if (orig_visual != CopyFromParent) stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (*SavedProcVector[X_CreateWindow]) (client); if (result != Success) break; } if (result == Success) AddResource(newWin->info[0].id, XRT_WINDOW, newWin); else free(newWin); return result; } int PanoramiXChangeWindowAttributes(ClientPtr client) { PanoramiXRes *win; PanoramiXRes *backPix = NULL; PanoramiXRes *bordPix = NULL; PanoramiXRes *cmap = NULL; REQUEST(xChangeWindowAttributesReq); int pback_offset = 0, pbord_offset = 0, cmap_offset = 0; int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); if (Ones(stuff->valueMask) != len) return BadLength; result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; if ((win->u.win.class == InputOnly) && (stuff->valueMask & (~INPUTONLY_LEGAL_MASK))) return BadMatch; if ((Mask) stuff->valueMask & CWBackPixmap) { pback_offset = Ones((Mask) stuff->valueMask & (CWBackPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pback_offset); if ((tmp != None) && (tmp != ParentRelative)) { result = dixLookupResourceByType((void **) &backPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->valueMask & CWBorderPixmap) { pbord_offset = Ones((Mask) stuff->valueMask & (CWBorderPixmap - 1)); tmp = *((CARD32 *) &stuff[1] + pbord_offset); if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &bordPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->valueMask & CWColormap) { cmap_offset = Ones((Mask) stuff->valueMask & (CWColormap - 1)); tmp = *((CARD32 *) &stuff[1] + cmap_offset); if (tmp != CopyFromParent) { result = dixLookupResourceByType((void **) &cmap, tmp, XRT_COLORMAP, client, DixReadAccess); if (result != Success) return result; } } FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; if (backPix) *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; if (bordPix) *((CARD32 *) &stuff[1] + pbord_offset) = bordPix->info[j].id; if (cmap) *((CARD32 *) &stuff[1] + cmap_offset) = cmap->info[j].id; result = (*SavedProcVector[X_ChangeWindowAttributes]) (client); } return result; } int PanoramiXDestroyWindow(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixDestroyAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_DestroyWindow]) (client); if (result != Success) break; } /* Since ProcDestroyWindow is using FreeResource, it will free our resource for us on the last pass through the loop above */ return result; } int PanoramiXDestroySubwindows(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixDestroyAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_DestroySubwindows]) (client); if (result != Success) break; } /* DestroySubwindows is using FreeResource which will free our resources for us on the last pass through the loop above */ return result; } int PanoramiXChangeSaveSet(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xChangeSaveSetReq); REQUEST_SIZE_MATCH(xChangeSaveSetReq); result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; result = (*SavedProcVector[X_ChangeSaveSet]) (client); if (result != Success) break; } return result; } int PanoramiXReparentWindow(ClientPtr client) { PanoramiXRes *win, *parent; int result, j; int x, y; Bool parentIsRoot; REQUEST(xReparentWindowReq); REQUEST_SIZE_MATCH(xReparentWindowReq); result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &parent, stuff->parent, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; x = stuff->x; y = stuff->y; parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) || (stuff->parent == screenInfo.screens[0]->screensaver.wid); FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; stuff->parent = parent->info[j].id; if (parentIsRoot) { stuff->x = x - screenInfo.screens[j]->x; stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ReparentWindow]) (client); if (result != Success) break; } return result; } int PanoramiXMapWindow(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_MapWindow]) (client); if (result != Success) break; } return result; } int PanoramiXMapSubwindows(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_MapSubwindows]) (client); if (result != Success) break; } return result; } int PanoramiXUnmapWindow(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_UnmapWindow]) (client); if (result != Success) break; } return result; } int PanoramiXUnmapSubwindows(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; result = (*SavedProcVector[X_UnmapSubwindows]) (client); if (result != Success) break; } return result; } int PanoramiXConfigureWindow(ClientPtr client) { PanoramiXRes *win; PanoramiXRes *sib = NULL; WindowPtr pWin; int result, j, len, sib_offset = 0, x = 0, y = 0; int x_offset = -1; int y_offset = -1; REQUEST(xConfigureWindowReq); REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); if (Ones(stuff->mask) != len) return BadLength; /* because we need the parent */ result = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW, client, DixWriteAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; if ((Mask) stuff->mask & CWSibling) { XID tmp; sib_offset = Ones((Mask) stuff->mask & (CWSibling - 1)); if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) { result = dixLookupResourceByType((void **) &sib, tmp, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; } } if (pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) || (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))) { if ((Mask) stuff->mask & CWX) { x_offset = 0; x = *((CARD32 *) &stuff[1]); } if ((Mask) stuff->mask & CWY) { y_offset = (x_offset == -1) ? 0 : 1; y = *((CARD32 *) &stuff[1] + y_offset); } } /* have to go forward or you get expose events before ConfigureNotify events */ FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; if (sib) *((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id; if (x_offset >= 0) *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x; if (y_offset >= 0) *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y; result = (*SavedProcVector[X_ConfigureWindow]) (client); if (result != Success) break; } return result; } int PanoramiXCirculateWindow(ClientPtr client) { PanoramiXRes *win; int result, j; REQUEST(xCirculateWindowReq); REQUEST_SIZE_MATCH(xCirculateWindowReq); result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; result = (*SavedProcVector[X_CirculateWindow]) (client); if (result != Success) break; } return result; } int PanoramiXGetGeometry(ClientPtr client) { xGetGeometryReply rep; DrawablePtr pDraw; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixGetAttrAccess); if (rc != Success) return rc; rep = (xGetGeometryReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .root = screenInfo.screens[0]->root->drawable.id, .depth = pDraw->depth, .width = pDraw->width, .height = pDraw->height, .x = 0, .y = 0, .borderWidth = 0 }; if (stuff->id == rep.root) { xWindowRoot *root = (xWindowRoot *) (ConnectionInfo + connBlockScreenStart); rep.width = root->pixWidth; rep.height = root->pixHeight; } else if (WindowDrawable(pDraw->type)) { WindowPtr pWin = (WindowPtr) pDraw; rep.x = pWin->origin.x - wBorderWidth(pWin); rep.y = pWin->origin.y - wBorderWidth(pWin); if ((pWin->parent == screenInfo.screens[0]->root) || (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)) { rep.x += screenInfo.screens[0]->x; rep.y += screenInfo.screens[0]->y; } rep.borderWidth = pWin->borderWidth; } WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); return Success; } int PanoramiXTranslateCoords(ClientPtr client) { INT16 x, y; REQUEST(xTranslateCoordsReq); int rc; WindowPtr pWin, pDst; xTranslateCoordsReply rep; REQUEST_SIZE_MATCH(xTranslateCoordsReq); rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess); if (rc != Success) return rc; rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess); if (rc != Success) return rc; rep = (xTranslateCoordsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .sameScreen = xTrue, .child = None }; if ((pWin == screenInfo.screens[0]->root) || (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { x = stuff->srcX - screenInfo.screens[0]->x; y = stuff->srcY - screenInfo.screens[0]->y; } else { x = pWin->drawable.x + stuff->srcX; y = pWin->drawable.y + stuff->srcY; } pWin = pDst->firstChild; while (pWin) { BoxRec box; if ((pWin->mapped) && (x >= pWin->drawable.x - wBorderWidth(pWin)) && (x < pWin->drawable.x + (int) pWin->drawable.width + wBorderWidth(pWin)) && (y >= pWin->drawable.y - wBorderWidth(pWin)) && (y < pWin->drawable.y + (int) pWin->drawable.height + wBorderWidth(pWin)) /* When a window is shaped, a further check * is made to see if the point is inside * borderSize */ && (!wBoundingShape(pWin) || RegionContainsPoint(wBoundingShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) ) { rep.child = pWin->drawable.id; pWin = (WindowPtr) NULL; } else pWin = pWin->nextSib; } rep.dstX = x - pDst->drawable.x; rep.dstY = y - pDst->drawable.y; if ((pDst == screenInfo.screens[0]->root) || (pDst->drawable.id == screenInfo.screens[0]->screensaver.wid)) { rep.dstX += screenInfo.screens[0]->x; rep.dstY += screenInfo.screens[0]->y; } WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); return Success; } int PanoramiXCreatePixmap(ClientPtr client) { PanoramiXRes *refDraw, *newPix; int result, j; REQUEST(xCreatePixmapReq); REQUEST_SIZE_MATCH(xCreatePixmapReq); client->errorValue = stuff->pid; result = dixLookupResourceByClass((void **) &refDraw, stuff->drawable, XRC_DRAWABLE, client, DixReadAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (!(newPix = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; newPix->u.pix.shared = FALSE; panoramix_setup_ids(newPix, client, stuff->pid); FOR_NSCREENS_BACKWARD(j) { stuff->pid = newPix->info[j].id; stuff->drawable = refDraw->info[j].id; result = (*SavedProcVector[X_CreatePixmap]) (client); if (result != Success) break; } if (result == Success) AddResource(newPix->info[0].id, XRT_PIXMAP, newPix); else free(newPix); return result; } int PanoramiXFreePixmap(ClientPtr client) { PanoramiXRes *pix; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; result = dixLookupResourceByType((void **) &pix, stuff->id, XRT_PIXMAP, client, DixDestroyAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = pix->info[j].id; result = (*SavedProcVector[X_FreePixmap]) (client); if (result != Success) break; } /* Since ProcFreePixmap is using FreeResource, it will free our resource for us on the last pass through the loop above */ return result; } int PanoramiXCreateGC(ClientPtr client) { PanoramiXRes *refDraw; PanoramiXRes *newGC; PanoramiXRes *stip = NULL; PanoramiXRes *tile = NULL; PanoramiXRes *clip = NULL; REQUEST(xCreateGCReq); int tile_offset = 0, stip_offset = 0, clip_offset = 0; int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xCreateGCReq); client->errorValue = stuff->gc; len = client->req_len - bytes_to_int32(sizeof(xCreateGCReq)); if (Ones(stuff->mask) != len) return BadLength; result = dixLookupResourceByClass((void **) &refDraw, stuff->drawable, XRC_DRAWABLE, client, DixReadAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if ((Mask) stuff->mask & GCTile) { tile_offset = Ones((Mask) stuff->mask & (GCTile - 1)); if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { result = dixLookupResourceByType((void **) &tile, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & GCStipple) { stip_offset = Ones((Mask) stuff->mask & (GCStipple - 1)); if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { result = dixLookupResourceByType((void **) &stip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & GCClipMask) { clip_offset = Ones((Mask) stuff->mask & (GCClipMask - 1)); if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { result = dixLookupResourceByType((void **) &clip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if (!(newGC = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newGC->type = XRT_GC; panoramix_setup_ids(newGC, client, stuff->gc); FOR_NSCREENS_BACKWARD(j) { stuff->gc = newGC->info[j].id; stuff->drawable = refDraw->info[j].id; if (tile) *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; if (stip) *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; if (clip) *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; result = (*SavedProcVector[X_CreateGC]) (client); if (result != Success) break; } if (result == Success) AddResource(newGC->info[0].id, XRT_GC, newGC); else free(newGC); return result; } int PanoramiXChangeGC(ClientPtr client) { PanoramiXRes *gc; PanoramiXRes *stip = NULL; PanoramiXRes *tile = NULL; PanoramiXRes *clip = NULL; REQUEST(xChangeGCReq); int tile_offset = 0, stip_offset = 0, clip_offset = 0; int result, len, j; XID tmp; REQUEST_AT_LEAST_SIZE(xChangeGCReq); len = client->req_len - bytes_to_int32(sizeof(xChangeGCReq)); if (Ones(stuff->mask) != len) return BadLength; result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; if ((Mask) stuff->mask & GCTile) { tile_offset = Ones((Mask) stuff->mask & (GCTile - 1)); if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) { result = dixLookupResourceByType((void **) &tile, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & GCStipple) { stip_offset = Ones((Mask) stuff->mask & (GCStipple - 1)); if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) { result = dixLookupResourceByType((void **) &stip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } if ((Mask) stuff->mask & GCClipMask) { clip_offset = Ones((Mask) stuff->mask & (GCClipMask - 1)); if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) { result = dixLookupResourceByType((void **) &clip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) return result; } } FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; if (tile) *((CARD32 *) &stuff[1] + tile_offset) = tile->info[j].id; if (stip) *((CARD32 *) &stuff[1] + stip_offset) = stip->info[j].id; if (clip) *((CARD32 *) &stuff[1] + clip_offset) = clip->info[j].id; result = (*SavedProcVector[X_ChangeGC]) (client); if (result != Success) break; } return result; } int PanoramiXCopyGC(ClientPtr client) { PanoramiXRes *srcGC, *dstGC; int result, j; REQUEST(xCopyGCReq); REQUEST_SIZE_MATCH(xCopyGCReq); result = dixLookupResourceByType((void **) &srcGC, stuff->srcGC, XRT_GC, client, DixReadAccess); if (result != Success) return result; result = dixLookupResourceByType((void **) &dstGC, stuff->dstGC, XRT_GC, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS(j) { stuff->srcGC = srcGC->info[j].id; stuff->dstGC = dstGC->info[j].id; result = (*SavedProcVector[X_CopyGC]) (client); if (result != Success) break; } return result; } int PanoramiXSetDashes(ClientPtr client) { PanoramiXRes *gc; int result, j; REQUEST(xSetDashesReq); REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_SetDashes]) (client); if (result != Success) break; } return result; } int PanoramiXSetClipRectangles(ClientPtr client) { PanoramiXRes *gc; int result, j; REQUEST(xSetClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_SetClipRectangles]) (client); if (result != Success) break; } return result; } int PanoramiXFreeGC(ClientPtr client) { PanoramiXRes *gc; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); result = dixLookupResourceByType((void **) &gc, stuff->id, XRT_GC, client, DixDestroyAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = gc->info[j].id; result = (*SavedProcVector[X_FreeGC]) (client); if (result != Success) break; } /* Since ProcFreeGC is using FreeResource, it will free our resource for us on the last pass through the loop above */ return result; } int PanoramiXClearToBackground(ClientPtr client) { PanoramiXRes *win; int result, j, x, y; Bool isRoot; REQUEST(xClearAreaReq); REQUEST_SIZE_MATCH(xClearAreaReq); result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) return result; x = stuff->x; y = stuff->y; isRoot = win->u.win.root; FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; if (isRoot) { stuff->x = x - screenInfo.screens[j]->x; stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ClearArea]) (client); if (result != Success) break; } return result; } /* For Window to Pixmap copies you're screwed since each screen's pixmap will look like what it sees on its screen. Unless the screens overlap and the window lies on each, the two copies will be out of sync. To remedy this we do a GetImage and PutImage in place of the copy. Doing this as a single Image isn't quite correct since it will include the obscured areas but we will have to fix this later. (MArk). */ int PanoramiXCopyArea(ClientPtr client) { int j, result, srcx, srcy, dstx, dsty, width, height; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; Bool srcShared, dstShared; REQUEST(xCopyAreaReq); REQUEST_SIZE_MATCH(xCopyAreaReq); result = dixLookupResourceByClass((void **) &src, stuff->srcDrawable, XRC_DRAWABLE, client, DixReadAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; srcShared = IS_SHARED_PIXMAP(src); result = dixLookupResourceByClass((void **) &dst, stuff->dstDrawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; dstShared = IS_SHARED_PIXMAP(dst); if (dstShared && srcShared) return (*SavedProcVector[X_CopyArea]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; if ((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; if ((src->type == XRT_WINDOW) && src->u.win.root) srcIsRoot = TRUE; srcx = stuff->srcX; srcy = stuff->srcY; dstx = stuff->dstX; dsty = stuff->dstY; width = stuff->width; height = stuff->height; if ((dst->type == XRT_PIXMAP) && (src->type == XRT_WINDOW)) { DrawablePtr drawables[MAXSCREENS]; DrawablePtr pDst; GCPtr pGC; char *data; int pitch, rc; FOR_NSCREENS(j) { rc = dixLookupDrawable(drawables + j, src->info[j].id, client, 0, DixGetAttrAccess); if (rc != Success) return rc; drawables[j]->pScreen->SourceValidate(drawables[j], 0, 0, drawables[j]->width, drawables[j]->height, IncludeInferiors); } pitch = PixmapBytePad(width, drawables[0]->depth); if (!(data = calloc(height, pitch))) return BadAlloc; XineramaGetImageData(drawables, srcx, srcy, width, height, ZPixmap, ~0, data, pitch, srcIsRoot); FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, DixWriteAccess); if (drawables[0]->depth != pDst->depth) { client->errorValue = stuff->dstDrawable; free(data); return BadMatch; } (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, width, height, 0, ZPixmap, data); if (dstShared) break; } free(data); if (pGC->graphicsExposures) { RegionRec rgn; int dx, dy; BoxRec sourceBox; dx = drawables[0]->x; dy = drawables[0]->y; if (srcIsRoot) { dx += screenInfo.screens[0]->x; dy += screenInfo.screens[0]->y; } sourceBox.x1 = min(srcx + dx, 0); sourceBox.y1 = min(srcy + dy, 0); sourceBox.x2 = max(sourceBox.x1 + width, 32767); sourceBox.y2 = max(sourceBox.y1 + height, 32767); RegionInit(&rgn, &sourceBox, 1); /* subtract the (screen-space) clips of the source drawables */ FOR_NSCREENS(j) { ScreenPtr screen = screenInfo.screens[j]; RegionPtr sd; if (pGC->subWindowMode == IncludeInferiors) sd = NotClippedByChildren((WindowPtr)drawables[j]); else sd = &((WindowPtr)drawables[j])->clipList; if (srcIsRoot) RegionTranslate(&rgn, -screen->x, -screen->y); RegionSubtract(&rgn, &rgn, sd); if (srcIsRoot) RegionTranslate(&rgn, screen->x, screen->y); if (pGC->subWindowMode == IncludeInferiors) RegionDestroy(sd); } /* -dx/-dy to get back to dest-relative, plus request offsets */ RegionTranslate(&rgn, -dx + dstx, -dy + dsty); /* intersect with gc clip; just one screen is fine because pixmap */ RegionIntersect(&rgn, &rgn, pGC->pCompositeClip); /* and expose */ SendGraphicsExpose(client, &rgn, dst->info[0].id, X_CopyArea, 0); RegionUninit(&rgn); } } else { DrawablePtr pDst = NULL, pSrc = NULL; GCPtr pGC = NULL; RegionRec totalReg; int rc; RegionNull(&totalReg); FOR_NSCREENS_BACKWARD(j) { RegionPtr pRgn; stuff->dstDrawable = dst->info[j].id; stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { stuff->srcX = srcx - screenInfo.screens[j]->x; stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { stuff->dstX = dstx - screenInfo.screens[j]->x; stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0, DixReadAccess); if (rc != Success) return rc; if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; return BadMatch; } } else pSrc = pDst; pRgn = (*pGC->ops->CopyArea) (pSrc, pDst, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY); if (pGC->graphicsExposures && pRgn) { if (srcIsRoot) { RegionTranslate(pRgn, screenInfo.screens[j]->x, screenInfo.screens[j]->y); } RegionAppend(&totalReg, pRgn); RegionDestroy(pRgn); } if (dstShared) break; } if (pGC->graphicsExposures) { Bool overlap; RegionValidate(&totalReg, &overlap); SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, X_CopyArea, 0); RegionUninit(&totalReg); } } return Success; } int PanoramiXCopyPlane(ClientPtr client) { int j, srcx, srcy, dstx, dsty, rc; PanoramiXRes *gc, *src, *dst; Bool srcIsRoot = FALSE; Bool dstIsRoot = FALSE; Bool srcShared, dstShared; DrawablePtr psrcDraw, pdstDraw = NULL; GCPtr pGC = NULL; RegionRec totalReg; REQUEST(xCopyPlaneReq); REQUEST_SIZE_MATCH(xCopyPlaneReq); rc = dixLookupResourceByClass((void **) &src, stuff->srcDrawable, XRC_DRAWABLE, client, DixReadAccess); if (rc != Success) return (rc == BadValue) ? BadDrawable : rc; srcShared = IS_SHARED_PIXMAP(src); rc = dixLookupResourceByClass((void **) &dst, stuff->dstDrawable, XRC_DRAWABLE, client, DixWriteAccess); if (rc != Success) return (rc == BadValue) ? BadDrawable : rc; dstShared = IS_SHARED_PIXMAP(dst); if (dstShared && srcShared) return (*SavedProcVector[X_CopyPlane]) (client); rc = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (rc != Success) return rc; if ((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; if ((src->type == XRT_WINDOW) && src->u.win.root) srcIsRoot = TRUE; srcx = stuff->srcX; srcy = stuff->srcY; dstx = stuff->dstX; dsty = stuff->dstY; RegionNull(&totalReg); FOR_NSCREENS_BACKWARD(j) { RegionPtr pRgn; stuff->dstDrawable = dst->info[j].id; stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { stuff->srcX = srcx - screenInfo.screens[j]->x; stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { stuff->dstX = dstx - screenInfo.screens[j]->x; stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); if (stuff->dstDrawable != stuff->srcDrawable) { rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; return BadMatch; } } else psrcDraw = pdstDraw; if (stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { client->errorValue = stuff->bitPlane; return BadValue; } pRgn = (*pGC->ops->CopyPlane) (psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY, stuff->bitPlane); if (pGC->graphicsExposures && pRgn) { RegionAppend(&totalReg, pRgn); RegionDestroy(pRgn); } if (dstShared) break; } if (pGC->graphicsExposures) { Bool overlap; RegionValidate(&totalReg, &overlap); SendGraphicsExpose(client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0); RegionUninit(&totalReg); } return Success; } int PanoramiXPolyPoint(ClientPtr client) { PanoramiXRes *gc, *draw; int result, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyPointReq); REQUEST_AT_LEAST_SIZE(xPolyPointReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyPoint]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); if (npoint > 0) { origPts = xallocarray(npoint, sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xPoint *pnts = (xPoint *) &stuff[1]; int i = (stuff->coordMode == CoordModePrevious) ? 1 : npoint; while (i--) { pnts->x -= x_off; pnts->y -= y_off; pnts++; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyPoint]) (client); if (result != Success) break; } free(origPts); return result; } else return Success; } int PanoramiXPolyLine(ClientPtr client) { PanoramiXRes *gc, *draw; int result, npoint, j; xPoint *origPts; Bool isRoot; REQUEST(xPolyLineReq); REQUEST_AT_LEAST_SIZE(xPolyLineReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyLine]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); if (npoint > 0) { origPts = xallocarray(npoint, sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xPoint *pnts = (xPoint *) &stuff[1]; int i = (stuff->coordMode == CoordModePrevious) ? 1 : npoint; while (i--) { pnts->x -= x_off; pnts->y -= y_off; pnts++; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyLine]) (client); if (result != Success) break; } free(origPts); return result; } else return Success; } int PanoramiXPolySegment(ClientPtr client) { int result, nsegs, i, j; PanoramiXRes *gc, *draw; xSegment *origSegs; Bool isRoot; REQUEST(xPolySegmentReq); REQUEST_AT_LEAST_SIZE(xPolySegmentReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolySegment]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); if (nsegs & 4) return BadLength; nsegs >>= 3; if (nsegs > 0) { origSegs = xallocarray(nsegs, sizeof(xSegment)); memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xSegment *segs = (xSegment *) &stuff[1]; for (i = nsegs; i--; segs++) { segs->x1 -= x_off; segs->x2 -= x_off; segs->y1 -= y_off; segs->y2 -= y_off; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolySegment]) (client); if (result != Success) break; } free(origSegs); return result; } else return Success; } int PanoramiXPolyRectangle(ClientPtr client) { int result, nrects, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRecs; REQUEST(xPolyRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyRectangle]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); if (nrects & 4) return BadLength; nrects >>= 3; if (nrects > 0) { origRecs = xallocarray(nrects, sizeof(xRectangle)); memcpy((char *) origRecs, (char *) &stuff[1], nrects * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xRectangle *rects = (xRectangle *) &stuff[1]; for (i = nrects; i--; rects++) { rects->x -= x_off; rects->y -= y_off; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyRectangle]) (client); if (result != Success) break; } free(origRecs); return result; } else return Success; } int PanoramiXPolyArc(ClientPtr client) { int result, narcs, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xArc *origArcs; REQUEST(xPolyArcReq); REQUEST_AT_LEAST_SIZE(xPolyArcReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyArc]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); narcs = (client->req_len << 2) - sizeof(xPolyArcReq); if (narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0) { origArcs = xallocarray(narcs, sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; for (i = narcs; i--; arcs++) { arcs->x -= x_off; arcs->y -= y_off; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyArc]) (client); if (result != Success) break; } free(origArcs); return result; } else return Success; } int PanoramiXFillPoly(ClientPtr client) { int result, count, j; PanoramiXRes *gc, *draw; Bool isRoot; DDXPointPtr locPts; REQUEST(xFillPolyReq); REQUEST_AT_LEAST_SIZE(xFillPolyReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_FillPoly]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); if (count > 0) { locPts = xallocarray(count, sizeof(DDXPointRec)); memcpy((char *) locPts, (char *) &stuff[1], count * sizeof(DDXPointRec)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { DDXPointPtr pnts = (DDXPointPtr) &stuff[1]; int i = (stuff->coordMode == CoordModePrevious) ? 1 : count; while (i--) { pnts->x -= x_off; pnts->y -= y_off; pnts++; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_FillPoly]) (client); if (result != Success) break; } free(locPts); return result; } else return Success; } int PanoramiXPolyFillRectangle(ClientPtr client) { int result, things, i, j; PanoramiXRes *gc, *draw; Bool isRoot; xRectangle *origRects; REQUEST(xPolyFillRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyFillRectangle]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); if (things & 4) return BadLength; things >>= 3; if (things > 0) { origRects = xallocarray(things, sizeof(xRectangle)); memcpy((char *) origRects, (char *) &stuff[1], things * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xRectangle *rects = (xRectangle *) &stuff[1]; for (i = things; i--; rects++) { rects->x -= x_off; rects->y -= y_off; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyFillRectangle]) (client); if (result != Success) break; } free(origRects); return result; } else return Success; } int PanoramiXPolyFillArc(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; int result, narcs, i, j; xArc *origArcs; REQUEST(xPolyFillArcReq); REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyFillArc]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); if (narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0) { origArcs = xallocarray(narcs, sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j) { if (j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { int x_off = screenInfo.screens[j]->x; int y_off = screenInfo.screens[j]->y; if (x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; for (i = narcs; i--; arcs++) { arcs->x -= x_off; arcs->y -= y_off; } } } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PolyFillArc]) (client); if (result != Success) break; } free(origArcs); return result; } else return Success; } int PanoramiXPutImage(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; int j, result, orig_x, orig_y; REQUEST(xPutImageReq); REQUEST_AT_LEAST_SIZE(xPutImageReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PutImage]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); orig_x = stuff->dstX; orig_y = stuff->dstY; FOR_NSCREENS_BACKWARD(j) { if (isRoot) { stuff->dstX = orig_x - screenInfo.screens[j]->x; stuff->dstY = orig_y - screenInfo.screens[j]->y; } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (*SavedProcVector[X_PutImage]) (client); if (result != Success) break; } return result; } int PanoramiXGetImage(ClientPtr client) { DrawablePtr drawables[MAXSCREENS]; DrawablePtr pDraw; PanoramiXRes *draw; xGetImageReply xgi; Bool isRoot; char *pBuf; int i, x, y, w, h, format, rc; Mask plane = 0, planemask; int linesDone, nlines, linesPerBuf; long widthBytesLine, length; REQUEST(xGetImageReq); REQUEST_SIZE_MATCH(xGetImageReq); if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; return BadValue; } rc = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixReadAccess); if (rc != Success) return (rc == BadValue) ? BadDrawable : rc; if (draw->type == XRT_PIXMAP) return (*SavedProcVector[X_GetImage]) (client); rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); if (rc != Success) return rc; if (!((WindowPtr) pDraw)->realized) return BadMatch; x = stuff->x; y = stuff->y; w = stuff->width; h = stuff->height; format = stuff->format; planemask = stuff->planeMask; isRoot = IS_ROOT_DRAWABLE(draw); if (isRoot) { /* check for being onscreen */ if (x < 0 || x + w > PanoramiXPixWidth || y < 0 || y + h > PanoramiXPixHeight) return BadMatch; } else { /* check for being onscreen and inside of border */ if (screenInfo.screens[0]->x + pDraw->x + x < 0 || screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth || screenInfo.screens[0]->y + pDraw->y + y < 0 || screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || x < -wBorderWidth((WindowPtr) pDraw) || x + w > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->width || y < -wBorderWidth((WindowPtr) pDraw) || y + h > wBorderWidth((WindowPtr) pDraw) + (int) pDraw->height) return BadMatch; } drawables[0] = pDraw; FOR_NSCREENS_FORWARD_SKIP(i) { rc = dixLookupDrawable(drawables + i, draw->info[i].id, client, 0, DixGetAttrAccess); if (rc != Success) return rc; } FOR_NSCREENS_FORWARD(i) { drawables[i]->pScreen->SourceValidate(drawables[i], 0, 0, drawables[i]->width, drawables[i]->height, IncludeInferiors); } xgi = (xGetImageReply) { .type = X_Reply, .sequenceNumber = client->sequence, .visual = wVisual(((WindowPtr) pDraw)), .depth = pDraw->depth }; if (format == ZPixmap) { widthBytesLine = PixmapBytePad(w, pDraw->depth); length = widthBytesLine * h; } else { widthBytesLine = BitmapBytePad(w); plane = ((Mask) 1) << (pDraw->depth - 1); /* only planes asked for */ length = widthBytesLine * h * Ones(planemask & (plane | (plane - 1))); } xgi.length = bytes_to_int32(length); if (widthBytesLine == 0 || h == 0) linesPerBuf = 0; else if (widthBytesLine >= XINERAMA_IMAGE_BUFSIZE) linesPerBuf = 1; else { linesPerBuf = XINERAMA_IMAGE_BUFSIZE / widthBytesLine; if (linesPerBuf > h) linesPerBuf = h; } if (!(pBuf = xallocarray(linesPerBuf, widthBytesLine))) return BadAlloc; WriteReplyToClient(client, sizeof(xGetImageReply), &xgi); if (linesPerBuf == 0) { /* nothing to do */ } else if (format == ZPixmap) { linesDone = 0; while (h - linesDone > 0) { nlines = min(linesPerBuf, h - linesDone); if (pDraw->depth == 1) memset(pBuf, 0, nlines * widthBytesLine); XineramaGetImageData(drawables, x, y + linesDone, w, nlines, format, planemask, pBuf, widthBytesLine, isRoot); WriteToClient(client, (int) (nlines * widthBytesLine), pBuf); linesDone += nlines; } } else { /* XYPixmap */ for (; plane; plane >>= 1) { if (planemask & plane) { linesDone = 0; while (h - linesDone > 0) { nlines = min(linesPerBuf, h - linesDone); memset(pBuf, 0, nlines * widthBytesLine); XineramaGetImageData(drawables, x, y + linesDone, w, nlines, format, plane, pBuf, widthBytesLine, isRoot); WriteToClient(client, (int)(nlines * widthBytesLine), pBuf); linesDone += nlines; } } } } free(pBuf); return Success; } /* The text stuff should be rewritten so that duplication happens at the GlyphBlt level. That is, loading the font and getting the glyphs should only happen once */ int PanoramiXPolyText8(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; int result, j; int orig_x, orig_y; REQUEST(xPolyTextReq); REQUEST_AT_LEAST_SIZE(xPolyTextReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyText8]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); orig_x = stuff->x; orig_y = stuff->y; FOR_NSCREENS_BACKWARD(j) { stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { stuff->x = orig_x - screenInfo.screens[j]->x; stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText8]) (client); if (result != Success) break; } return result; } int PanoramiXPolyText16(ClientPtr client) { PanoramiXRes *gc, *draw; Bool isRoot; int result, j; int orig_x, orig_y; REQUEST(xPolyTextReq); REQUEST_AT_LEAST_SIZE(xPolyTextReq); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_PolyText16]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); orig_x = stuff->x; orig_y = stuff->y; FOR_NSCREENS_BACKWARD(j) { stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { stuff->x = orig_x - screenInfo.screens[j]->x; stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText16]) (client); if (result != Success) break; } return result; } int PanoramiXImageText8(ClientPtr client) { int result, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_ImageText8]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); orig_x = stuff->x; orig_y = stuff->y; FOR_NSCREENS_BACKWARD(j) { stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { stuff->x = orig_x - screenInfo.screens[j]->x; stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText8]) (client); if (result != Success) break; } return result; } int PanoramiXImageText16(ClientPtr client) { int result, j; PanoramiXRes *gc, *draw; Bool isRoot; int orig_x, orig_y; REQUEST(xImageTextReq); REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1); result = dixLookupResourceByClass((void **) &draw, stuff->drawable, XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; if (IS_SHARED_PIXMAP(draw)) return (*SavedProcVector[X_ImageText16]) (client); result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) return result; isRoot = IS_ROOT_DRAWABLE(draw); orig_x = stuff->x; orig_y = stuff->y; FOR_NSCREENS_BACKWARD(j) { stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { stuff->x = orig_x - screenInfo.screens[j]->x; stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText16]) (client); if (result != Success) break; } return result; } int PanoramiXCreateColormap(ClientPtr client) { PanoramiXRes *win, *newCmap; int result, j, orig_visual; REQUEST(xCreateColormapReq); REQUEST_SIZE_MATCH(xCreateColormapReq); result = dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixReadAccess); if (result != Success) return result; if (!(newCmap = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; panoramix_setup_ids(newCmap, client, stuff->mid); orig_visual = stuff->visual; FOR_NSCREENS_BACKWARD(j) { stuff->mid = newCmap->info[j].id; stuff->window = win->info[j].id; stuff->visual = PanoramiXTranslateVisualID(j, orig_visual); result = (*SavedProcVector[X_CreateColormap]) (client); if (result != Success) break; } if (result == Success) AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); else free(newCmap); return result; } int PanoramiXFreeColormap(ClientPtr client) { PanoramiXRes *cmap; int result, j; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; result = dixLookupResourceByType((void **) &cmap, stuff->id, XRT_COLORMAP, client, DixDestroyAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; result = (*SavedProcVector[X_FreeColormap]) (client); if (result != Success) break; } /* Since ProcFreeColormap is using FreeResource, it will free our resource for us on the last pass through the loop above */ return result; } int PanoramiXCopyColormapAndFree(ClientPtr client) { PanoramiXRes *cmap, *newCmap; int result, j; REQUEST(xCopyColormapAndFreeReq); REQUEST_SIZE_MATCH(xCopyColormapAndFreeReq); client->errorValue = stuff->srcCmap; result = dixLookupResourceByType((void **) &cmap, stuff->srcCmap, XRT_COLORMAP, client, DixReadAccess | DixWriteAccess); if (result != Success) return result; if (!(newCmap = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; panoramix_setup_ids(newCmap, client, stuff->mid); FOR_NSCREENS_BACKWARD(j) { stuff->srcCmap = cmap->info[j].id; stuff->mid = newCmap->info[j].id; result = (*SavedProcVector[X_CopyColormapAndFree]) (client); if (result != Success) break; } if (result == Success) AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); else free(newCmap); return result; } int PanoramiXInstallColormap(ClientPtr client) { REQUEST(xResourceReq); int result, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; result = dixLookupResourceByType((void **) &cmap, stuff->id, XRT_COLORMAP, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; result = (*SavedProcVector[X_InstallColormap]) (client); if (result != Success) break; } return result; } int PanoramiXUninstallColormap(ClientPtr client) { REQUEST(xResourceReq); int result, j; PanoramiXRes *cmap; REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; result = dixLookupResourceByType((void **) &cmap, stuff->id, XRT_COLORMAP, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; result = (*SavedProcVector[X_UninstallColormap]) (client); if (result != Success) break; } return result; } int PanoramiXAllocColor(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorReq); REQUEST_SIZE_MATCH(xAllocColorReq); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_AllocColor]) (client); if (result != Success) break; } return result; } int PanoramiXAllocNamedColor(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xAllocNamedColorReq); REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_AllocNamedColor]) (client); if (result != Success) break; } return result; } int PanoramiXAllocColorCells(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorCellsReq); REQUEST_SIZE_MATCH(xAllocColorCellsReq); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_AllocColorCells]) (client); if (result != Success) break; } return result; } int PanoramiXAllocColorPlanes(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xAllocColorPlanesReq); REQUEST_SIZE_MATCH(xAllocColorPlanesReq); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_AllocColorPlanes]) (client); if (result != Success) break; } return result; } int PanoramiXFreeColors(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xFreeColorsReq); REQUEST_AT_LEAST_SIZE(xFreeColorsReq); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_FreeColors]) (client); } return result; } int PanoramiXStoreColors(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xStoreColorsReq); REQUEST_AT_LEAST_SIZE(xStoreColorsReq); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_StoreColors]) (client); if (result != Success) break; } return result; } int PanoramiXStoreNamedColor(ClientPtr client) { int result, j; PanoramiXRes *cmap; REQUEST(xStoreNamedColorReq); REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); client->errorValue = stuff->cmap; result = dixLookupResourceByType((void **) &cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (*SavedProcVector[X_StoreNamedColor]) (client); if (result != Success) break; } return result; } xorg-server-21.1.16/Xext/panoramiXSwap.c0000644000175000017500000000774014757411105013530 /***************************************************************** 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include "misc.h" #include "cursor.h" #include "cursorstr.h" #include "extnsionst.h" #include "dixstruct.h" #include "gc.h" #include "gcstruct.h" #include "scrnintstr.h" #include "window.h" #include "windowstr.h" #include "pixmapstr.h" #include "panoramiX.h" #include #include "panoramiXsrv.h" #include "globals.h" #include "panoramiXh.h" static int _X_COLD SProcPanoramiXQueryVersion(ClientPtr client) { REQUEST(xPanoramiXQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXQueryVersionReq); return ProcPanoramiXQueryVersion(client); } static int _X_COLD SProcPanoramiXGetState(ClientPtr client) { REQUEST(xPanoramiXGetStateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetStateReq); swapl(&stuff->window); return ProcPanoramiXGetState(client); } static int _X_COLD SProcPanoramiXGetScreenCount(ClientPtr client) { REQUEST(xPanoramiXGetScreenCountReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq); swapl(&stuff->window); return ProcPanoramiXGetScreenCount(client); } static int _X_COLD SProcPanoramiXGetScreenSize(ClientPtr client) { REQUEST(xPanoramiXGetScreenSizeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq); swapl(&stuff->window); swapl(&stuff->screen); return ProcPanoramiXGetScreenSize(client); } static int _X_COLD SProcXineramaIsActive(ClientPtr client) { REQUEST(xXineramaIsActiveReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaIsActiveReq); return ProcXineramaIsActive(client); } static int _X_COLD SProcXineramaQueryScreens(ClientPtr client) { REQUEST(xXineramaQueryScreensReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXineramaQueryScreensReq); return ProcXineramaQueryScreens(client); } int _X_COLD SProcPanoramiXDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_PanoramiXQueryVersion: return SProcPanoramiXQueryVersion(client); case X_PanoramiXGetState: return SProcPanoramiXGetState(client); case X_PanoramiXGetScreenCount: return SProcPanoramiXGetScreenCount(client); case X_PanoramiXGetScreenSize: return SProcPanoramiXGetScreenSize(client); case X_XineramaIsActive: return SProcXineramaIsActive(client); case X_XineramaQueryScreens: return SProcXineramaQueryScreens(client); } return BadRequest; } xorg-server-21.1.16/Xext/xace.c0000644000175000017500000002406714757411105011660 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "scrnintstr.h" #include "extnsionst.h" #include "pixmapstr.h" #include "regionstr.h" #include "gcstruct.h" #include "xacestr.h" _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = { 0 }; /* Special-cased hook functions. Called by Xserver. */ #undef XaceHookDispatch int XaceHookDispatch(ClientPtr client, int major) { /* Call the extension dispatch hook */ ExtensionEntry *ext = GetExtensionEntry(major); XaceExtAccessRec erec = { client, ext, DixUseAccess, Success }; if (ext) CallCallbacks(&XaceHooks[XACE_EXT_DISPATCH], &erec); /* On error, pretend extension doesn't exist */ return (erec.status == Success) ? Success : BadRequest; } int XaceHookPropertyAccess(ClientPtr client, WindowPtr pWin, PropertyPtr *ppProp, Mask access_mode) { XacePropertyAccessRec rec = { client, pWin, ppProp, access_mode, Success }; CallCallbacks(&XaceHooks[XACE_PROPERTY_ACCESS], &rec); return rec.status; } int XaceHookSelectionAccess(ClientPtr client, Selection ** ppSel, Mask access_mode) { XaceSelectionAccessRec rec = { client, ppSel, access_mode, Success }; CallCallbacks(&XaceHooks[XACE_SELECTION_ACCESS], &rec); return rec.status; } /* Entry point for hook functions. Called by Xserver. */ int XaceHook(int hook, ...) { union { XaceResourceAccessRec res; XaceDeviceAccessRec dev; XaceSendAccessRec send; XaceReceiveAccessRec recv; XaceClientAccessRec client; XaceExtAccessRec ext; XaceServerAccessRec server; XaceScreenAccessRec screen; XaceAuthAvailRec auth; XaceKeyAvailRec key; } u; int *prv = NULL; /* points to return value from callback */ va_list ap; /* argument list */ if (!XaceHooks[hook]) return Success; va_start(ap, hook); /* Marshal arguments for passing to callback. * Each callback has its own case, which sets up a structure to hold * the arguments and integer return parameter, or in some cases just * sets calldata directly to a single argument (with no return result) */ switch (hook) { case XACE_RESOURCE_ACCESS: u.res.client = va_arg(ap, ClientPtr); u.res.id = va_arg(ap, XID); u.res.rtype = va_arg(ap, RESTYPE); u.res.res = va_arg(ap, void *); u.res.ptype = va_arg(ap, RESTYPE); u.res.parent = va_arg(ap, void *); u.res.access_mode = va_arg(ap, Mask); u.res.status = Success; /* default allow */ prv = &u.res.status; break; case XACE_DEVICE_ACCESS: u.dev.client = va_arg(ap, ClientPtr); u.dev.dev = va_arg(ap, DeviceIntPtr); u.dev.access_mode = va_arg(ap, Mask); u.dev.status = Success; /* default allow */ prv = &u.dev.status; break; case XACE_SEND_ACCESS: u.send.client = va_arg(ap, ClientPtr); u.send.dev = va_arg(ap, DeviceIntPtr); u.send.pWin = va_arg(ap, WindowPtr); u.send.events = va_arg(ap, xEventPtr); u.send.count = va_arg(ap, int); u.send.status = Success; /* default allow */ prv = &u.send.status; break; case XACE_RECEIVE_ACCESS: u.recv.client = va_arg(ap, ClientPtr); u.recv.pWin = va_arg(ap, WindowPtr); u.recv.events = va_arg(ap, xEventPtr); u.recv.count = va_arg(ap, int); u.recv.status = Success; /* default allow */ prv = &u.recv.status; break; case XACE_CLIENT_ACCESS: u.client.client = va_arg(ap, ClientPtr); u.client.target = va_arg(ap, ClientPtr); u.client.access_mode = va_arg(ap, Mask); u.client.status = Success; /* default allow */ prv = &u.client.status; break; case XACE_EXT_ACCESS: u.ext.client = va_arg(ap, ClientPtr); u.ext.ext = va_arg(ap, ExtensionEntry *); u.ext.access_mode = DixGetAttrAccess; u.ext.status = Success; /* default allow */ prv = &u.ext.status; break; case XACE_SERVER_ACCESS: u.server.client = va_arg(ap, ClientPtr); u.server.access_mode = va_arg(ap, Mask); u.server.status = Success; /* default allow */ prv = &u.server.status; break; case XACE_SCREEN_ACCESS: case XACE_SCREENSAVER_ACCESS: u.screen.client = va_arg(ap, ClientPtr); u.screen.screen = va_arg(ap, ScreenPtr); u.screen.access_mode = va_arg(ap, Mask); u.screen.status = Success; /* default allow */ prv = &u.screen.status; break; case XACE_AUTH_AVAIL: u.auth.client = va_arg(ap, ClientPtr); u.auth.authId = va_arg(ap, XID); break; case XACE_KEY_AVAIL: u.key.event = va_arg(ap, xEventPtr); u.key.keybd = va_arg(ap, DeviceIntPtr); u.key.count = va_arg(ap, int); break; default: va_end(ap); return 0; /* unimplemented hook number */ } va_end(ap); /* call callbacks and return result, if any. */ CallCallbacks(&XaceHooks[hook], &u); return prv ? *prv : Success; } /* XaceHookIsSet * * Utility function to determine whether there are any callbacks listening on a * particular XACE hook. * * Returns non-zero if there is a callback, zero otherwise. */ int XaceHookIsSet(int hook) { if (hook < 0 || hook >= XACE_NUM_HOOKS) return 0; return XaceHooks[hook] != NULL; } /* XaceCensorImage * * Called after pScreen->GetImage to prevent pieces or trusted windows from * being returned in image data from an untrusted window. * * Arguments: * client is the client doing the GetImage. * pVisibleRegion is the visible region of the window. * widthBytesLine is the width in bytes of one horizontal line in pBuf. * pDraw is the source window. * x, y, w, h is the rectangle of image data from pDraw in pBuf. * format is the format of the image data in pBuf: ZPixmap or XYPixmap. * pBuf is the image data. * * Returns: nothing. * * Side Effects: * Any part of the rectangle (x, y, w, h) that is outside the visible * region of the window will be destroyed (overwritten) in pBuf. */ void XaceCensorImage(ClientPtr client, RegionPtr pVisibleRegion, long widthBytesLine, DrawablePtr pDraw, int x, int y, int w, int h, unsigned int format, char *pBuf) { RegionRec imageRegion; /* region representing x,y,w,h */ RegionRec censorRegion; /* region to obliterate */ BoxRec imageBox; int nRects; imageBox.x1 = pDraw->x + x; imageBox.y1 = pDraw->y + y; imageBox.x2 = pDraw->x + x + w; imageBox.y2 = pDraw->y + y + h; RegionInit(&imageRegion, &imageBox, 1); RegionNull(&censorRegion); /* censorRegion = imageRegion - visibleRegion */ RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion); nRects = RegionNumRects(&censorRegion); if (nRects > 0) { /* we have something to censor */ GCPtr pScratchGC = NULL; PixmapPtr pPix = NULL; xRectangle *pRects = NULL; Bool failed = FALSE; int depth = 1; int bitsPerPixel = 1; int i; BoxPtr pBox; /* convert region to list-of-rectangles for PolyFillRect */ pRects = malloc(nRects * sizeof(xRectangle)); if (!pRects) { failed = TRUE; goto failSafe; } for (pBox = RegionRects(&censorRegion), i = 0; i < nRects; i++, pBox++) { pRects[i].x = pBox->x1 - imageBox.x1; pRects[i].y = pBox->y1 - imageBox.y1; pRects[i].width = pBox->x2 - pBox->x1; pRects[i].height = pBox->y2 - pBox->y1; } /* use pBuf as a fake pixmap */ if (format == ZPixmap) { depth = pDraw->depth; bitsPerPixel = pDraw->bitsPerPixel; } pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h, depth, bitsPerPixel, widthBytesLine, (void *) pBuf); if (!pPix) { failed = TRUE; goto failSafe; } pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen); if (!pScratchGC) { failed = TRUE; goto failSafe; } ValidateGC(&pPix->drawable, pScratchGC); (*pScratchGC->ops->PolyFillRect) (&pPix->drawable, pScratchGC, nRects, pRects); failSafe: if (failed) { /* Censoring was not completed above. To be safe, wipe out * all the image data so that nothing trusted gets out. */ memset(pBuf, 0, (int) (widthBytesLine * h)); } free(pRects); if (pScratchGC) FreeScratchGC(pScratchGC); if (pPix) FreeScratchPixmapHeader(pPix); } RegionUninit(&imageRegion); RegionUninit(&censorRegion); } /* XaceCensorImage */ /* * Xtrans wrappers for use by modules */ int XaceGetConnectionNumber(ClientPtr client) { return GetClientFd(client); } int XaceIsLocal(ClientPtr client) { return ClientIsLocal(client); } xorg-server-21.1.16/Xext/xselinux_ext.c0000644000175000017500000004726114757411105013500 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "selection.h" #include "inputstr.h" #include "windowstr.h" #include "propertyst.h" #include "extnsionst.h" #include "extinit.h" #include "xselinuxint.h" #define CTX_DEV offsetof(SELinuxSubjectRec, dev_create_sid) #define CTX_WIN offsetof(SELinuxSubjectRec, win_create_sid) #define CTX_PRP offsetof(SELinuxSubjectRec, prp_create_sid) #define CTX_SEL offsetof(SELinuxSubjectRec, sel_create_sid) #define USE_PRP offsetof(SELinuxSubjectRec, prp_use_sid) #define USE_SEL offsetof(SELinuxSubjectRec, sel_use_sid) typedef struct { char *octx; char *dctx; CARD32 octx_len; CARD32 dctx_len; CARD32 id; } SELinuxListItemRec; /* * Extension Dispatch */ static char * SELinuxCopyContext(char *ptr, unsigned len) { char *copy = malloc(len + 1); if (!copy) return NULL; strncpy(copy, ptr, len); copy[len] = '\0'; return copy; } static int ProcSELinuxQueryVersion(ClientPtr client) { SELinuxQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .server_major = SELINUX_MAJOR_VERSION, .server_minor = SELINUX_MINOR_VERSION }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.server_major); swaps(&rep.server_minor); } WriteToClient(client, sizeof(rep), &rep); return Success; } static int SELinuxSendContextReply(ClientPtr client, security_id_t sid) { SELinuxGetContextReply rep; char *ctx = NULL; int len = 0; if (sid) { if (avc_sid_to_context_raw(sid, &ctx) < 0) return BadValue; len = strlen(ctx) + 1; } rep = (SELinuxGetContextReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(len), .context_len = len }; if (client->swapped) { swapl(&rep.length); swaps(&rep.sequenceNumber); swapl(&rep.context_len); } WriteToClient(client, sizeof(SELinuxGetContextReply), &rep); WriteToClient(client, len, ctx); freecon(ctx); return Success; } static int ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) { PrivateRec **privPtr = &client->devPrivates; security_id_t *pSid; char *ctx = NULL; char *ptr; int rc; REQUEST(SELinuxSetCreateContextReq); REQUEST_FIXED_SIZE(SELinuxSetCreateContextReq, stuff->context_len); if (stuff->context_len > 0) { ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len); if (!ctx) return BadAlloc; } ptr = dixLookupPrivate(privPtr, subjectKey); pSid = (security_id_t *) (ptr + offset); *pSid = NULL; rc = Success; if (stuff->context_len > 0) { if (security_check_context_raw(ctx) < 0 || avc_context_to_sid_raw(ctx, pSid) < 0) rc = BadValue; } free(ctx); return rc; } static int ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset) { security_id_t *pSid; char *ptr; REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq); if (offset == CTX_DEV) ptr = dixLookupPrivate(&serverClient->devPrivates, subjectKey); else ptr = dixLookupPrivate(&client->devPrivates, subjectKey); pSid = (security_id_t *) (ptr + offset); return SELinuxSendContextReply(client, *pSid); } static int ProcSELinuxSetDeviceContext(ClientPtr client) { char *ctx; security_id_t sid; DeviceIntPtr dev; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; int rc; REQUEST(SELinuxSetContextReq); REQUEST_FIXED_SIZE(SELinuxSetContextReq, stuff->context_len); if (stuff->context_len < 1) return BadLength; ctx = SELinuxCopyContext((char *) (stuff + 1), stuff->context_len); if (!ctx) return BadAlloc; rc = dixLookupDevice(&dev, stuff->id, client, DixManageAccess); if (rc != Success) goto out; if (security_check_context_raw(ctx) < 0 || avc_context_to_sid_raw(ctx, &sid) < 0) { rc = BadValue; goto out; } subj = dixLookupPrivate(&dev->devPrivates, subjectKey); subj->sid = sid; obj = dixLookupPrivate(&dev->devPrivates, objectKey); obj->sid = sid; rc = Success; out: free(ctx); return rc; } static int ProcSELinuxGetDeviceContext(ClientPtr client) { DeviceIntPtr dev; SELinuxSubjectRec *subj; int rc; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupDevice(&dev, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; subj = dixLookupPrivate(&dev->devPrivates, subjectKey); return SELinuxSendContextReply(client, subj->sid); } static int ProcSELinuxGetDrawableContext(ClientPtr client) { DrawablePtr pDraw; PrivateRec **privatePtr; SELinuxObjectRec *obj; int rc; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupDrawable(&pDraw, stuff->id, client, 0, DixGetAttrAccess); if (rc != Success) return rc; if (pDraw->type == DRAWABLE_PIXMAP) privatePtr = &((PixmapPtr) pDraw)->devPrivates; else privatePtr = &((WindowPtr) pDraw)->devPrivates; obj = dixLookupPrivate(privatePtr, objectKey); return SELinuxSendContextReply(client, obj->sid); } static int ProcSELinuxGetPropertyContext(ClientPtr client, void *privKey) { WindowPtr pWin; PropertyPtr pProp; SELinuxObjectRec *obj; int rc; REQUEST(SELinuxGetPropertyContextReq); REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetPropAccess); if (rc != Success) return rc; rc = dixLookupProperty(&pProp, pWin, stuff->property, client, DixGetAttrAccess); if (rc != Success) return rc; obj = dixLookupPrivate(&pProp->devPrivates, privKey); return SELinuxSendContextReply(client, obj->sid); } static int ProcSELinuxGetSelectionContext(ClientPtr client, void *privKey) { Selection *pSel; SELinuxObjectRec *obj; int rc; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupSelection(&pSel, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; obj = dixLookupPrivate(&pSel->devPrivates, privKey); return SELinuxSendContextReply(client, obj->sid); } static int ProcSELinuxGetClientContext(ClientPtr client) { ClientPtr target; SELinuxSubjectRec *subj; int rc; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupClient(&target, stuff->id, client, DixGetAttrAccess); if (rc != Success) return rc; subj = dixLookupPrivate(&target->devPrivates, subjectKey); return SELinuxSendContextReply(client, subj->sid); } static int SELinuxPopulateItem(SELinuxListItemRec * i, PrivateRec ** privPtr, CARD32 id, int *size) { SELinuxObjectRec *obj = dixLookupPrivate(privPtr, objectKey); SELinuxObjectRec *data = dixLookupPrivate(privPtr, dataKey); if (avc_sid_to_context_raw(obj->sid, &i->octx) < 0) return BadValue; if (avc_sid_to_context_raw(data->sid, &i->dctx) < 0) return BadValue; i->id = id; i->octx_len = bytes_to_int32(strlen(i->octx) + 1); i->dctx_len = bytes_to_int32(strlen(i->dctx) + 1); *size += i->octx_len + i->dctx_len + 3; return Success; } static void SELinuxFreeItems(SELinuxListItemRec * items, int count) { int k; for (k = 0; k < count; k++) { freecon(items[k].octx); freecon(items[k].dctx); } free(items); } static int SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec * items, int size, int count) { int rc, k, pos = 0; SELinuxListItemsReply rep; CARD32 *buf; buf = calloc(size, sizeof(CARD32)); if (size && !buf) { rc = BadAlloc; goto out; } /* Fill in the buffer */ for (k = 0; k < count; k++) { buf[pos] = items[k].id; if (client->swapped) swapl(buf + pos); pos++; buf[pos] = items[k].octx_len * 4; if (client->swapped) swapl(buf + pos); pos++; buf[pos] = items[k].dctx_len * 4; if (client->swapped) swapl(buf + pos); pos++; memcpy((char *) (buf + pos), items[k].octx, strlen(items[k].octx) + 1); pos += items[k].octx_len; memcpy((char *) (buf + pos), items[k].dctx, strlen(items[k].dctx) + 1); pos += items[k].dctx_len; } /* Send reply to client */ rep = (SELinuxListItemsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = size, .count = count }; if (client->swapped) { swapl(&rep.length); swaps(&rep.sequenceNumber); swapl(&rep.count); } WriteToClient(client, sizeof(SELinuxListItemsReply), &rep); WriteToClient(client, size * 4, buf); /* Free stuff and return */ rc = Success; free(buf); out: SELinuxFreeItems(items, count); return rc; } static int ProcSELinuxListProperties(ClientPtr client) { WindowPtr pWin; PropertyPtr pProp; SELinuxListItemRec *items; int rc, count, size, i; CARD32 id; REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); rc = dixLookupWindow(&pWin, stuff->id, client, DixListPropAccess); if (rc != Success) return rc; /* Count the number of properties and allocate items */ count = 0; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) count++; items = calloc(count, sizeof(SELinuxListItemRec)); if (count && !items) return BadAlloc; /* Fill in the items and calculate size */ i = 0; size = 0; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) { id = pProp->propertyName; rc = SELinuxPopulateItem(items + i, &pProp->devPrivates, id, &size); if (rc != Success) { SELinuxFreeItems(items, count); return rc; } i++; } return SELinuxSendItemsToClient(client, items, size, count); } static int ProcSELinuxListSelections(ClientPtr client) { Selection *pSel; SELinuxListItemRec *items; int rc, count, size, i; CARD32 id; REQUEST_SIZE_MATCH(SELinuxGetCreateContextReq); /* Count the number of selections and allocate items */ count = 0; for (pSel = CurrentSelections; pSel; pSel = pSel->next) count++; items = calloc(count, sizeof(SELinuxListItemRec)); if (count && !items) return BadAlloc; /* Fill in the items and calculate size */ i = 0; size = 0; for (pSel = CurrentSelections; pSel; pSel = pSel->next) { id = pSel->selection; rc = SELinuxPopulateItem(items + i, &pSel->devPrivates, id, &size); if (rc != Success) { SELinuxFreeItems(items, count); return rc; } i++; } return SELinuxSendItemsToClient(client, items, size, count); } static int ProcSELinuxDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_SELinuxQueryVersion: return ProcSELinuxQueryVersion(client); case X_SELinuxSetDeviceCreateContext: return ProcSELinuxSetCreateContext(client, CTX_DEV); case X_SELinuxGetDeviceCreateContext: return ProcSELinuxGetCreateContext(client, CTX_DEV); case X_SELinuxSetDeviceContext: return ProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: return ProcSELinuxGetDeviceContext(client); case X_SELinuxSetDrawableCreateContext: return ProcSELinuxSetCreateContext(client, CTX_WIN); case X_SELinuxGetDrawableCreateContext: return ProcSELinuxGetCreateContext(client, CTX_WIN); case X_SELinuxGetDrawableContext: return ProcSELinuxGetDrawableContext(client); case X_SELinuxSetPropertyCreateContext: return ProcSELinuxSetCreateContext(client, CTX_PRP); case X_SELinuxGetPropertyCreateContext: return ProcSELinuxGetCreateContext(client, CTX_PRP); case X_SELinuxSetPropertyUseContext: return ProcSELinuxSetCreateContext(client, USE_PRP); case X_SELinuxGetPropertyUseContext: return ProcSELinuxGetCreateContext(client, USE_PRP); case X_SELinuxGetPropertyContext: return ProcSELinuxGetPropertyContext(client, objectKey); case X_SELinuxGetPropertyDataContext: return ProcSELinuxGetPropertyContext(client, dataKey); case X_SELinuxListProperties: return ProcSELinuxListProperties(client); case X_SELinuxSetSelectionCreateContext: return ProcSELinuxSetCreateContext(client, CTX_SEL); case X_SELinuxGetSelectionCreateContext: return ProcSELinuxGetCreateContext(client, CTX_SEL); case X_SELinuxSetSelectionUseContext: return ProcSELinuxSetCreateContext(client, USE_SEL); case X_SELinuxGetSelectionUseContext: return ProcSELinuxGetCreateContext(client, USE_SEL); case X_SELinuxGetSelectionContext: return ProcSELinuxGetSelectionContext(client, objectKey); case X_SELinuxGetSelectionDataContext: return ProcSELinuxGetSelectionContext(client, dataKey); case X_SELinuxListSelections: return ProcSELinuxListSelections(client); case X_SELinuxGetClientContext: return ProcSELinuxGetClientContext(client); default: return BadRequest; } } static int _X_COLD SProcSELinuxQueryVersion(ClientPtr client) { return ProcSELinuxQueryVersion(client); } static int _X_COLD SProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) { REQUEST(SELinuxSetCreateContextReq); REQUEST_AT_LEAST_SIZE(SELinuxSetCreateContextReq); swapl(&stuff->context_len); return ProcSELinuxSetCreateContext(client, offset); } static int _X_COLD SProcSELinuxSetDeviceContext(ClientPtr client) { REQUEST(SELinuxSetContextReq); REQUEST_AT_LEAST_SIZE(SELinuxSetContextReq); swapl(&stuff->id); swapl(&stuff->context_len); return ProcSELinuxSetDeviceContext(client); } static int _X_COLD SProcSELinuxGetDeviceContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); swapl(&stuff->id); return ProcSELinuxGetDeviceContext(client); } static int _X_COLD SProcSELinuxGetDrawableContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); swapl(&stuff->id); return ProcSELinuxGetDrawableContext(client); } static int _X_COLD SProcSELinuxGetPropertyContext(ClientPtr client, void *privKey) { REQUEST(SELinuxGetPropertyContextReq); REQUEST_SIZE_MATCH(SELinuxGetPropertyContextReq); swapl(&stuff->window); swapl(&stuff->property); return ProcSELinuxGetPropertyContext(client, privKey); } static int _X_COLD SProcSELinuxGetSelectionContext(ClientPtr client, void *privKey) { REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); swapl(&stuff->id); return ProcSELinuxGetSelectionContext(client, privKey); } static int _X_COLD SProcSELinuxListProperties(ClientPtr client) { REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); swapl(&stuff->id); return ProcSELinuxListProperties(client); } static int _X_COLD SProcSELinuxGetClientContext(ClientPtr client) { REQUEST(SELinuxGetContextReq); REQUEST_SIZE_MATCH(SELinuxGetContextReq); swapl(&stuff->id); return ProcSELinuxGetClientContext(client); } static int _X_COLD SProcSELinuxDispatch(ClientPtr client) { REQUEST(xReq); swaps(&stuff->length); switch (stuff->data) { case X_SELinuxQueryVersion: return SProcSELinuxQueryVersion(client); case X_SELinuxSetDeviceCreateContext: return SProcSELinuxSetCreateContext(client, CTX_DEV); case X_SELinuxGetDeviceCreateContext: return ProcSELinuxGetCreateContext(client, CTX_DEV); case X_SELinuxSetDeviceContext: return SProcSELinuxSetDeviceContext(client); case X_SELinuxGetDeviceContext: return SProcSELinuxGetDeviceContext(client); case X_SELinuxSetDrawableCreateContext: return SProcSELinuxSetCreateContext(client, CTX_WIN); case X_SELinuxGetDrawableCreateContext: return ProcSELinuxGetCreateContext(client, CTX_WIN); case X_SELinuxGetDrawableContext: return SProcSELinuxGetDrawableContext(client); case X_SELinuxSetPropertyCreateContext: return SProcSELinuxSetCreateContext(client, CTX_PRP); case X_SELinuxGetPropertyCreateContext: return ProcSELinuxGetCreateContext(client, CTX_PRP); case X_SELinuxSetPropertyUseContext: return SProcSELinuxSetCreateContext(client, USE_PRP); case X_SELinuxGetPropertyUseContext: return ProcSELinuxGetCreateContext(client, USE_PRP); case X_SELinuxGetPropertyContext: return SProcSELinuxGetPropertyContext(client, objectKey); case X_SELinuxGetPropertyDataContext: return SProcSELinuxGetPropertyContext(client, dataKey); case X_SELinuxListProperties: return SProcSELinuxListProperties(client); case X_SELinuxSetSelectionCreateContext: return SProcSELinuxSetCreateContext(client, CTX_SEL); case X_SELinuxGetSelectionCreateContext: return ProcSELinuxGetCreateContext(client, CTX_SEL); case X_SELinuxSetSelectionUseContext: return SProcSELinuxSetCreateContext(client, USE_SEL); case X_SELinuxGetSelectionUseContext: return ProcSELinuxGetCreateContext(client, USE_SEL); case X_SELinuxGetSelectionContext: return SProcSELinuxGetSelectionContext(client, objectKey); case X_SELinuxGetSelectionDataContext: return SProcSELinuxGetSelectionContext(client, dataKey); case X_SELinuxListSelections: return ProcSELinuxListSelections(client); case X_SELinuxGetClientContext: return SProcSELinuxGetClientContext(client); default: return BadRequest; } } /* * Extension Setup / Teardown */ static void SELinuxResetProc(ExtensionEntry * extEntry) { SELinuxFlaskReset(); SELinuxLabelReset(); } void SELinuxExtensionInit(void) { /* Check SELinux mode on system, configuration file, and boolean */ if (!is_selinux_enabled()) { LogMessage(X_INFO, "SELinux: Disabled on system\n"); return; } if (selinuxEnforcingState == SELINUX_MODE_DISABLED) { LogMessage(X_INFO, "SELinux: Disabled in configuration file\n"); return; } if (!security_get_boolean_active("xserver_object_manager")) { LogMessage(X_INFO, "SELinux: Disabled by boolean\n"); return; } /* Set up XACE hooks */ SELinuxLabelInit(); SELinuxFlaskInit(); /* Add extension to server */ AddExtension(SELINUX_EXTENSION_NAME, SELinuxNumberEvents, SELinuxNumberErrors, ProcSELinuxDispatch, SProcSELinuxDispatch, SELinuxResetProc, StandardMinorOpcode); } xorg-server-21.1.16/Xext/xselinux_hooks.c0000644000175000017500000007230714757411105014022 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ /* * Portions of this code copyright (c) 2005 by Trusted Computer Solutions, Inc. * All rights reserved. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include #include #include #include "selection.h" #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include "propertyst.h" #include "extnsionst.h" #include "xacestr.h" #include "client.h" #define _XSELINUX_NEED_FLASK_MAP #include "xselinuxint.h" /* structure passed to auditing callback */ typedef struct { ClientPtr client; /* client */ DeviceIntPtr dev; /* device */ char *command; /* client's executable path */ unsigned id; /* resource id, if any */ int restype; /* resource type, if any */ int event; /* event type, if any */ Atom property; /* property name, if any */ Atom selection; /* selection name, if any */ char *extension; /* extension name, if any */ } SELinuxAuditRec; /* private state keys */ DevPrivateKeyRec subjectKeyRec; DevPrivateKeyRec objectKeyRec; DevPrivateKeyRec dataKeyRec; /* audit file descriptor */ static int audit_fd; /* atoms for window label properties */ static Atom atom_ctx; static Atom atom_client_ctx; /* The unlabeled SID */ static security_id_t unlabeled_sid; /* forward declarations */ static void SELinuxScreen(CallbackListPtr *, void *, void *); /* "true" pointer value for use as callback data */ static void *truep = (void *) 1; /* * Performs an SELinux permission check. */ static int SELinuxDoCheck(SELinuxSubjectRec * subj, SELinuxObjectRec * obj, security_class_t class, Mask mode, SELinuxAuditRec * auditdata) { /* serverClient requests OK */ if (subj->privileged) return Success; auditdata->command = subj->command; errno = 0; if (avc_has_perm(subj->sid, obj->sid, class, mode, &subj->aeref, auditdata) < 0) { if (mode == DixUnknownAccess) return Success; /* DixUnknownAccess requests OK ... for now */ if (errno == EACCES) return BadAccess; ErrorF("SELinux: avc_has_perm: unexpected error %d\n", errno); return BadValue; } return Success; } /* * Labels a newly connected client. */ static void SELinuxLabelClient(ClientPtr client) { int fd = XaceGetConnectionNumber(client); SELinuxSubjectRec *subj; SELinuxObjectRec *obj; char *ctx; subj = dixLookupPrivate(&client->devPrivates, subjectKey); obj = dixLookupPrivate(&client->devPrivates, objectKey); /* Try to get a context from the socket */ if (fd < 0 || getpeercon_raw(fd, &ctx) < 0) { /* Otherwise, fall back to a default context */ ctx = SELinuxDefaultClientLabel(); } /* For local clients, try and determine the executable name */ if (XaceIsLocal(client)) { /* Get cached command name if CLIENTIDS is enabled. */ const char *cmdname = GetClientCmdName(client); Bool cached = (cmdname != NULL); /* If CLIENTIDS is disabled, figure out the command name from * scratch. */ if (!cmdname) { pid_t pid = DetermineClientPid(client); if (pid != -1) DetermineClientCmd(pid, &cmdname, NULL); } if (!cmdname) goto finish; strncpy(subj->command, cmdname, COMMAND_LEN - 1); if (!cached) free((void *) cmdname); /* const char * */ } finish: /* Get a SID from the context */ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0) FatalError("SELinux: client %d: context_to_sid_raw(%s) failed\n", client->index, ctx); obj->sid = subj->sid; freecon(ctx); } /* * Labels initial server objects. */ static void SELinuxLabelInitial(void) { int i; XaceScreenAccessRec srec; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; char *ctx; void *unused; /* Do the serverClient */ subj = dixLookupPrivate(&serverClient->devPrivates, subjectKey); obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); subj->privileged = 1; /* Use the context of the X server process for the serverClient */ if (getcon_raw(&ctx) < 0) FatalError("SELinux: couldn't get context of X server process\n"); /* Get a SID from the context */ if (avc_context_to_sid_raw(ctx, &subj->sid) < 0) FatalError("SELinux: serverClient: context_to_sid(%s) failed\n", ctx); obj->sid = subj->sid; freecon(ctx); srec.client = serverClient; srec.access_mode = DixCreateAccess; srec.status = Success; for (i = 0; i < screenInfo.numScreens; i++) { /* Do the screen object */ srec.screen = screenInfo.screens[i]; SELinuxScreen(NULL, NULL, &srec); /* Do the default colormap */ dixLookupResourceByType(&unused, screenInfo.screens[i]->defColormap, RT_COLORMAP, serverClient, DixCreateAccess); } } /* * Labels new resource objects. */ static int SELinuxLabelResource(XaceResourceAccessRec * rec, SELinuxSubjectRec * subj, SELinuxObjectRec * obj, security_class_t class) { int offset; security_id_t tsid; /* Check for a create context */ if (rec->rtype & RC_DRAWABLE && subj->win_create_sid) { obj->sid = subj->win_create_sid; return Success; } if (rec->parent) offset = dixLookupPrivateOffset(rec->ptype); if (rec->parent && offset >= 0) { /* Use the SID of the parent object in the labeling operation */ PrivateRec **privatePtr = DEVPRIV_AT(rec->parent, offset); SELinuxObjectRec *pobj = dixLookupPrivate(privatePtr, objectKey); tsid = pobj->sid; } else { /* Use the SID of the subject */ tsid = subj->sid; } /* Perform a transition to obtain the final SID */ if (avc_compute_create(subj->sid, tsid, class, &obj->sid) < 0) { ErrorF("SELinux: a compute_create call failed!\n"); return BadValue; } return Success; } /* * Libselinux Callbacks */ static int SELinuxAudit(void *auditdata, security_class_t class, char *msgbuf, size_t msgbufsize) { SELinuxAuditRec *audit = auditdata; ClientPtr client = audit->client; char idNum[16]; const char *propertyName, *selectionName; int major = -1, minor = -1; if (client) { REQUEST(xReq); if (stuff) { major = client->majorOp; minor = client->minorOp; } } if (audit->id) snprintf(idNum, 16, "%x", audit->id); propertyName = audit->property ? NameForAtom(audit->property) : NULL; selectionName = audit->selection ? NameForAtom(audit->selection) : NULL; return snprintf(msgbuf, msgbufsize, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", (major >= 0) ? "request=" : "", (major >= 0) ? LookupRequestName(major, minor) : "", audit->command ? " comm=" : "", audit->command ? audit->command : "", audit->dev ? " xdevice=\"" : "", audit->dev ? audit->dev->name : "", audit->dev ? "\"" : "", audit->id ? " resid=" : "", audit->id ? idNum : "", audit->restype ? " restype=" : "", audit->restype ? LookupResourceName(audit->restype) : "", audit->event ? " event=" : "", audit->event ? LookupEventName(audit->event & 127) : "", audit->property ? " property=" : "", audit->property ? propertyName : "", audit->selection ? " selection=" : "", audit->selection ? selectionName : "", audit->extension ? " extension=" : "", audit->extension ? audit->extension : ""); } static int SELinuxLog(int type, const char *fmt, ...) _X_ATTRIBUTE_PRINTF(2, 3); static int SELinuxLog(int type, const char *fmt, ...) { va_list ap; char buf[MAX_AUDIT_MESSAGE_LENGTH]; int rc, aut; switch (type) { case SELINUX_INFO: aut = AUDIT_USER_MAC_POLICY_LOAD; break; case SELINUX_AVC: aut = AUDIT_USER_AVC; break; default: aut = AUDIT_USER_SELINUX_ERR; break; } va_start(ap, fmt); vsnprintf(buf, MAX_AUDIT_MESSAGE_LENGTH, fmt, ap); rc = audit_log_user_avc_message(audit_fd, aut, buf, NULL, NULL, NULL, 0); (void) rc; va_end(ap); LogMessageVerb(X_WARNING, 0, "%s", buf); return 0; } /* * XACE Callbacks */ static void SELinuxDevice(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceDeviceAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev }; security_class_t cls; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->dev->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { SELinuxSubjectRec *dsubj; dsubj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); if (subj->dev_create_sid) { /* Label the device with the create context */ obj->sid = subj->dev_create_sid; dsubj->sid = subj->dev_create_sid; } else { /* Label the device directly with the process SID */ obj->sid = subj->sid; dsubj->sid = subj->sid; } } cls = IsPointerDevice(rec->dev) ? SECCLASS_X_POINTER : SECCLASS_X_KEYBOARD; rc = SELinuxDoCheck(subj, obj, cls, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } static void SELinuxSend(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceSendAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj, ev_sid; SELinuxAuditRec auditdata = {.client = rec->client,.dev = rec->dev }; security_class_t class; int rc, i, type; if (rec->dev) subj = dixLookupPrivate(&rec->dev->devPrivates, subjectKey); else subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check send permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixSendAccess, &auditdata); if (rc != Success) goto err; /* Check send permission on specific event types */ for (i = 0; i < rec->count; i++) { type = rec->events[i].u.u.type; class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; rc = SELinuxEventToSID(type, obj->sid, &ev_sid); if (rc != Success) goto err; auditdata.event = type; rc = SELinuxDoCheck(subj, &ev_sid, class, DixSendAccess, &auditdata); if (rc != Success) goto err; } return; err: rec->status = rc; } static void SELinuxReceive(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceReceiveAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj, ev_sid; SELinuxAuditRec auditdata = {.client = NULL }; security_class_t class; int rc, i, type; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->pWin->devPrivates, objectKey); /* Check receive permission on window */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_DRAWABLE, DixReceiveAccess, &auditdata); if (rc != Success) goto err; /* Check receive permission on specific event types */ for (i = 0; i < rec->count; i++) { type = rec->events[i].u.u.type; class = (type & 128) ? SECCLASS_X_FAKEEVENT : SECCLASS_X_EVENT; rc = SELinuxEventToSID(type, obj->sid, &ev_sid); if (rc != Success) goto err; auditdata.event = type; rc = SELinuxDoCheck(subj, &ev_sid, class, DixReceiveAccess, &auditdata); if (rc != Success) goto err; } return; err: rec->status = rc; } static void SELinuxExtension(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceExtAccessRec *rec = calldata; SELinuxSubjectRec *subj, *serv; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->ext->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ /* XXX there should be a separate callback for this */ if (obj->sid == NULL) { security_id_t sid; serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey); rc = SELinuxExtensionToSID(rec->ext->name, &sid); if (rc != Success) { rec->status = rc; return; } /* Perform a transition to obtain the final SID */ if (avc_compute_create(serv->sid, sid, SECCLASS_X_EXTENSION, &obj->sid) < 0) { ErrorF("SELinux: a SID transition call failed!\n"); rec->status = BadValue; return; } } /* Perform the security check */ auditdata.extension = (char *) rec->ext->name; rc = SELinuxDoCheck(subj, obj, SECCLASS_X_EXTENSION, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } static void SELinuxSelection(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceSelectionAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj, *data; Selection *pSel = *rec->ppSel; Atom name = pSel->selection; Mask access_mode = rec->access_mode; SELinuxAuditRec auditdata = {.client = rec->client,.selection = name }; security_id_t tsid; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&pSel->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (access_mode & DixCreateAccess) { rc = SELinuxSelectionToSID(name, subj, &obj->sid, &obj->poly); if (rc != Success) obj->sid = unlabeled_sid; access_mode = DixSetAttrAccess; } /* If this is a polyinstantiated object, find the right instance */ else if (obj->poly) { rc = SELinuxSelectionToSID(name, subj, &tsid, NULL); if (rc != Success) { rec->status = rc; return; } while (pSel->selection != name || obj->sid != tsid) { if ((pSel = pSel->next) == NULL) break; obj = dixLookupPrivate(&pSel->devPrivates, objectKey); } if (pSel) *rec->ppSel = pSel; else { rec->status = BadMatch; return; } } /* Perform the security check */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SELECTION, access_mode, &auditdata); if (rc != Success) rec->status = rc; /* Label the content (advisory only) */ if (access_mode & DixSetAttrAccess) { data = dixLookupPrivate(&pSel->devPrivates, dataKey); if (subj->sel_create_sid) data->sid = subj->sel_create_sid; else data->sid = obj->sid; } } static void SELinuxProperty(CallbackListPtr *pcbl, void *unused, void *calldata) { XacePropertyAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj, *data; PropertyPtr pProp = *rec->ppProp; Atom name = pProp->propertyName; SELinuxAuditRec auditdata = {.client = rec->client,.property = name }; security_id_t tsid; int rc; /* Don't care about the new content check */ if (rec->access_mode & DixPostAccess) return; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&pProp->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (rec->access_mode & DixCreateAccess) { rc = SELinuxPropertyToSID(name, subj, &obj->sid, &obj->poly); if (rc != Success) { rec->status = rc; return; } } /* If this is a polyinstantiated object, find the right instance */ else if (obj->poly) { rc = SELinuxPropertyToSID(name, subj, &tsid, NULL); if (rc != Success) { rec->status = rc; return; } while (pProp->propertyName != name || obj->sid != tsid) { if ((pProp = pProp->next) == NULL) break; obj = dixLookupPrivate(&pProp->devPrivates, objectKey); } if (pProp) *rec->ppProp = pProp; else { rec->status = BadMatch; return; } } /* Perform the security check */ rc = SELinuxDoCheck(subj, obj, SECCLASS_X_PROPERTY, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; /* Label the content (advisory only) */ if (rec->access_mode & DixWriteAccess) { data = dixLookupPrivate(&pProp->devPrivates, dataKey); if (subj->prp_create_sid) data->sid = subj->prp_create_sid; else data->sid = obj->sid; } } static void SELinuxResource(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceResourceAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client }; Mask access_mode = rec->access_mode; PrivateRec **privatePtr; security_class_t class; int rc, offset; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); /* Determine if the resource object has a devPrivates field */ offset = dixLookupPrivateOffset(rec->rtype); if (offset < 0) { /* No: use the SID of the owning client */ class = SECCLASS_X_RESOURCE; privatePtr = &clients[CLIENT_ID(rec->id)]->devPrivates; obj = dixLookupPrivate(privatePtr, objectKey); } else { /* Yes: use the SID from the resource object itself */ class = SELinuxTypeToClass(rec->rtype); privatePtr = DEVPRIV_AT(rec->res, offset); obj = dixLookupPrivate(privatePtr, objectKey); } /* If this is a new object that needs labeling, do it now */ if (access_mode & DixCreateAccess && offset >= 0) { rc = SELinuxLabelResource(rec, subj, obj, class); if (rc != Success) { rec->status = rc; return; } } /* Collapse generic resource permissions down to read/write */ if (class == SECCLASS_X_RESOURCE) { access_mode = ! !(rec->access_mode & SELinuxReadMask); /* rd */ access_mode |= ! !(rec->access_mode & ~SELinuxReadMask) << 1; /* wr */ } /* Perform the security check */ auditdata.restype = rec->rtype; auditdata.id = rec->id; rc = SELinuxDoCheck(subj, obj, class, access_mode, &auditdata); if (rc != Success) rec->status = rc; /* Perform the background none check on windows */ if (access_mode & DixCreateAccess && rec->rtype == RT_WINDOW) { rc = SELinuxDoCheck(subj, obj, class, DixBlendAccess, &auditdata); if (rc != Success) ((WindowPtr) rec->res)->forcedBG = TRUE; } } static void SELinuxScreen(CallbackListPtr *pcbl, void *is_saver, void *calldata) { XaceScreenAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client }; Mask access_mode = rec->access_mode; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->screen->devPrivates, objectKey); /* If this is a new object that needs labeling, do it now */ if (access_mode & DixCreateAccess) { /* Perform a transition to obtain the final SID */ if (avc_compute_create(subj->sid, subj->sid, SECCLASS_X_SCREEN, &obj->sid) < 0) { ErrorF("SELinux: a compute_create call failed!\n"); rec->status = BadValue; return; } } if (is_saver) access_mode <<= 2; rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SCREEN, access_mode, &auditdata); if (rc != Success) rec->status = rc; } static void SELinuxClient(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceClientAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&rec->target->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_CLIENT, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } static void SELinuxServer(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceServerAccessRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; SELinuxAuditRec auditdata = {.client = rec->client }; int rc; subj = dixLookupPrivate(&rec->client->devPrivates, subjectKey); obj = dixLookupPrivate(&serverClient->devPrivates, objectKey); rc = SELinuxDoCheck(subj, obj, SECCLASS_X_SERVER, rec->access_mode, &auditdata); if (rc != Success) rec->status = rc; } /* * DIX Callbacks */ static void SELinuxClientState(CallbackListPtr *pcbl, void *unused, void *calldata) { NewClientInfoRec *pci = calldata; switch (pci->client->clientState) { case ClientStateInitial: SELinuxLabelClient(pci->client); break; default: break; } } static void SELinuxResourceState(CallbackListPtr *pcbl, void *unused, void *calldata) { ResourceStateInfoRec *rec = calldata; SELinuxSubjectRec *subj; SELinuxObjectRec *obj; WindowPtr pWin; if (rec->type != RT_WINDOW) return; if (rec->state != ResourceStateAdding) return; pWin = (WindowPtr) rec->value; subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey); if (subj->sid) { char *ctx; int rc = avc_sid_to_context_raw(subj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, pWin, atom_client_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); if (rc != Success) FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); } else FatalError("SELinux: Unexpected unlabeled client found\n"); obj = dixLookupPrivate(&pWin->devPrivates, objectKey); if (obj->sid) { char *ctx; int rc = avc_sid_to_context_raw(obj->sid, &ctx); if (rc < 0) FatalError("SELinux: Failed to get security context!\n"); rc = dixChangeWindowProperty(serverClient, pWin, atom_ctx, XA_STRING, 8, PropModeReplace, strlen(ctx), ctx, FALSE); if (rc != Success) FatalError("SELinux: Failed to set label property on window!\n"); freecon(ctx); } else FatalError("SELinux: Unexpected unlabeled window found\n"); } static int netlink_fd; static void SELinuxNetlinkNotify(int fd, int ready, void *data) { avc_netlink_check_nb(); } void SELinuxFlaskReset(void) { /* Unregister callbacks */ DeleteCallback(&ClientStateCallback, SELinuxClientState, NULL); DeleteCallback(&ResourceStateCallback, SELinuxResourceState, NULL); XaceDeleteCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); XaceDeleteCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); XaceDeleteCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); XaceDeleteCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); XaceDeleteCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); XaceDeleteCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); XaceDeleteCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); XaceDeleteCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); XaceDeleteCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); XaceDeleteCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); XaceDeleteCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); XaceDeleteCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); /* Tear down SELinux stuff */ audit_close(audit_fd); avc_netlink_release_fd(); RemoveNotifyFd(netlink_fd); avc_destroy(); } void SELinuxFlaskInit(void) { struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 }; char *ctx; int ret = TRUE; switch (selinuxEnforcingState) { case SELINUX_MODE_ENFORCING: LogMessage(X_INFO, "SELinux: Configured in enforcing mode\n"); avc_option.value = (char *) 1; break; case SELINUX_MODE_PERMISSIVE: LogMessage(X_INFO, "SELinux: Configured in permissive mode\n"); avc_option.value = (char *) 0; break; default: avc_option.type = AVC_OPT_UNUSED; break; } /* Set up SELinux stuff */ selinux_set_callback(SELINUX_CB_LOG, (union selinux_callback) SELinuxLog); selinux_set_callback(SELINUX_CB_AUDIT, (union selinux_callback) SELinuxAudit); if (selinux_set_mapping(map) < 0) { if (errno == EINVAL) { ErrorF ("SELinux: Invalid object class mapping, disabling SELinux support.\n"); return; } FatalError("SELinux: Failed to set up security class mapping\n"); } if (avc_open(&avc_option, 1) < 0) FatalError("SELinux: Couldn't initialize SELinux userspace AVC\n"); if (security_get_initial_context_raw("unlabeled", &ctx) < 0) FatalError("SELinux: Failed to look up unlabeled context\n"); if (avc_context_to_sid_raw(ctx, &unlabeled_sid) < 0) FatalError("SELinux: a context_to_SID call failed!\n"); freecon(ctx); /* Prepare for auditing */ audit_fd = audit_open(); if (audit_fd < 0) FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ if (!dixRegisterPrivateKey (subjectKey, PRIVATE_XSELINUX, sizeof(SELinuxSubjectRec)) || !dixRegisterPrivateKey(objectKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)) || !dixRegisterPrivateKey(dataKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec))) FatalError("SELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ atom_ctx = MakeAtom("_SELINUX_CONTEXT", 16, TRUE); if (atom_ctx == BAD_RESOURCE) FatalError("SELinux: Failed to create atom\n"); atom_client_ctx = MakeAtom("_SELINUX_CLIENT_CONTEXT", 23, TRUE); if (atom_client_ctx == BAD_RESOURCE) FatalError("SELinux: Failed to create atom\n"); netlink_fd = avc_netlink_acquire_fd(); SetNotifyFd(netlink_fd, SELinuxNetlinkNotify, X_NOTIFY_READ, NULL); /* Register callbacks */ ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SELinuxExtension, NULL); ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SELinuxResource, NULL); ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SELinuxDevice, NULL); ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SELinuxProperty, NULL); ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SELinuxSend, NULL); ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SELinuxReceive, NULL); ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SELinuxClient, NULL); ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SELinuxExtension, NULL); ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SELinuxServer, NULL); ret &= XaceRegisterCallback(XACE_SELECTION_ACCESS, SELinuxSelection, NULL); ret &= XaceRegisterCallback(XACE_SCREEN_ACCESS, SELinuxScreen, NULL); ret &= XaceRegisterCallback(XACE_SCREENSAVER_ACCESS, SELinuxScreen, truep); if (!ret) FatalError("SELinux: Failed to register one or more callbacks\n"); /* Label objects that were created before we could register ourself */ SELinuxLabelInitial(); } xorg-server-21.1.16/Xext/xselinux_label.c0000644000175000017500000002330614757411105013751 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "registry.h" #include "xselinuxint.h" /* selection and property atom cache */ typedef struct { SELinuxObjectRec prp; SELinuxObjectRec sel; } SELinuxAtomRec; /* dynamic array */ typedef struct { unsigned size; void **array; } SELinuxArrayRec; /* labeling handle */ static struct selabel_handle *label_hnd; /* Array of object classes indexed by resource type */ SELinuxArrayRec arr_types; /* Array of event SIDs indexed by event type */ SELinuxArrayRec arr_events; /* Array of property and selection SID structures */ SELinuxArrayRec arr_atoms; /* * Dynamic array helpers */ static void * SELinuxArrayGet(SELinuxArrayRec * rec, unsigned key) { return (rec->size > key) ? rec->array[key] : 0; } static int SELinuxArraySet(SELinuxArrayRec * rec, unsigned key, void *val) { if (key >= rec->size) { /* Need to increase size of array */ rec->array = reallocarray(rec->array, key + 1, sizeof(val)); if (!rec->array) return FALSE; memset(rec->array + rec->size, 0, (key - rec->size + 1) * sizeof(val)); rec->size = key + 1; } rec->array[key] = val; return TRUE; } static void SELinuxArrayFree(SELinuxArrayRec * rec, int free_elements) { if (free_elements) { unsigned i = rec->size; while (i) free(rec->array[--i]); } free(rec->array); rec->size = 0; rec->array = NULL; } /* * Looks up a name in the selection or property mappings */ static int SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec * obj, int map, int polymap) { const char *name = NameForAtom(atom); char *ctx; int rc = Success; obj->poly = 1; /* Look in the mappings of names to contexts */ if (selabel_lookup_raw(label_hnd, &ctx, name, map) == 0) { obj->poly = 0; } else if (errno != ENOENT) { ErrorF("SELinux: a property label lookup failed!\n"); return BadValue; } else if (selabel_lookup_raw(label_hnd, &ctx, name, polymap) < 0) { ErrorF("SELinux: a property label lookup failed!\n"); return BadValue; } /* Get a SID for context */ if (avc_context_to_sid_raw(ctx, &obj->sid) < 0) { ErrorF("SELinux: a context_to_SID_raw call failed!\n"); rc = BadAlloc; } freecon(ctx); return rc; } /* * Looks up the SID corresponding to the given property or selection atom */ int SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec ** obj_rtn) { SELinuxAtomRec *rec; SELinuxObjectRec *obj; int rc, map, polymap; rec = SELinuxArrayGet(&arr_atoms, atom); if (!rec) { rec = calloc(1, sizeof(SELinuxAtomRec)); if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) return BadAlloc; } if (prop) { obj = &rec->prp; map = SELABEL_X_PROP; polymap = SELABEL_X_POLYPROP; } else { obj = &rec->sel; map = SELABEL_X_SELN; polymap = SELABEL_X_POLYSELN; } if (!obj->sid) { rc = SELinuxAtomToSIDLookup(atom, obj, map, polymap); if (rc != Success) goto out; } *obj_rtn = obj; rc = Success; out: return rc; } /* * Looks up a SID for a selection/subject pair */ int SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec * subj, security_id_t * sid_rtn, int *poly_rtn) { int rc; SELinuxObjectRec *obj; security_id_t tsid; /* Get the default context and polyinstantiation bit */ rc = SELinuxAtomToSID(selection, 0, &obj); if (rc != Success) return rc; /* Check for an override context next */ if (subj->sel_use_sid) { tsid = subj->sel_use_sid; goto out; } tsid = obj->sid; /* Polyinstantiate if necessary to obtain the final SID */ if (obj->poly && avc_compute_member(subj->sid, obj->sid, SECCLASS_X_SELECTION, &tsid) < 0) { ErrorF("SELinux: a compute_member call failed!\n"); return BadValue; } out: *sid_rtn = tsid; if (poly_rtn) *poly_rtn = obj->poly; return Success; } /* * Looks up a SID for a property/subject pair */ int SELinuxPropertyToSID(Atom property, SELinuxSubjectRec * subj, security_id_t * sid_rtn, int *poly_rtn) { int rc; SELinuxObjectRec *obj; security_id_t tsid, tsid2; /* Get the default context and polyinstantiation bit */ rc = SELinuxAtomToSID(property, 1, &obj); if (rc != Success) return rc; /* Check for an override context next */ if (subj->prp_use_sid) { tsid = subj->prp_use_sid; goto out; } /* Perform a transition */ if (avc_compute_create(subj->sid, obj->sid, SECCLASS_X_PROPERTY, &tsid) < 0) { ErrorF("SELinux: a compute_create call failed!\n"); return BadValue; } /* Polyinstantiate if necessary to obtain the final SID */ if (obj->poly) { tsid2 = tsid; if (avc_compute_member(subj->sid, tsid2, SECCLASS_X_PROPERTY, &tsid) < 0) { ErrorF("SELinux: a compute_member call failed!\n"); return BadValue; } } out: *sid_rtn = tsid; if (poly_rtn) *poly_rtn = obj->poly; return Success; } /* * Looks up the SID corresponding to the given event type */ int SELinuxEventToSID(unsigned type, security_id_t sid_of_window, SELinuxObjectRec * sid_return) { const char *name = LookupEventName(type); security_id_t sid; char *ctx; type &= 127; sid = SELinuxArrayGet(&arr_events, type); if (!sid) { /* Look in the mappings of event names to contexts */ if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EVENT) < 0) { ErrorF("SELinux: an event label lookup failed!\n"); return BadValue; } /* Get a SID for context */ if (avc_context_to_sid_raw(ctx, &sid) < 0) { ErrorF("SELinux: a context_to_SID_raw call failed!\n"); freecon(ctx); return BadAlloc; } freecon(ctx); /* Cache the SID value */ if (!SELinuxArraySet(&arr_events, type, sid)) return BadAlloc; } /* Perform a transition to obtain the final SID */ if (avc_compute_create(sid_of_window, sid, SECCLASS_X_EVENT, &sid_return->sid) < 0) { ErrorF("SELinux: a compute_create call failed!\n"); return BadValue; } return Success; } int SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn) { char *ctx; /* Look in the mappings of extension names to contexts */ if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EXT) < 0) { ErrorF("SELinux: a property label lookup failed!\n"); return BadValue; } /* Get a SID for context */ if (avc_context_to_sid_raw(ctx, sid_rtn) < 0) { ErrorF("SELinux: a context_to_SID_raw call failed!\n"); freecon(ctx); return BadAlloc; } freecon(ctx); return Success; } /* * Returns the object class corresponding to the given resource type. */ security_class_t SELinuxTypeToClass(RESTYPE type) { void *tmp; tmp = SELinuxArrayGet(&arr_types, type & TypeMask); if (!tmp) { unsigned long class = SECCLASS_X_RESOURCE; if (type & RC_DRAWABLE) class = SECCLASS_X_DRAWABLE; else if (type == RT_GC) class = SECCLASS_X_GC; else if (type == RT_FONT) class = SECCLASS_X_FONT; else if (type == RT_CURSOR) class = SECCLASS_X_CURSOR; else if (type == RT_COLORMAP) class = SECCLASS_X_COLORMAP; else { /* Need to do a string lookup */ const char *str = LookupResourceName(type); if (!strcmp(str, "PICTURE")) class = SECCLASS_X_DRAWABLE; else if (!strcmp(str, "GLYPHSET")) class = SECCLASS_X_FONT; } tmp = (void *) class; SELinuxArraySet(&arr_types, type & TypeMask, tmp); } return (security_class_t) (unsigned long) tmp; } char * SELinuxDefaultClientLabel(void) { char *ctx; if (selabel_lookup_raw(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0) FatalError("SELinux: failed to look up remote-client context\n"); return ctx; } void SELinuxLabelInit(void) { struct selinux_opt selabel_option = { SELABEL_OPT_VALIDATE, (char *) 1 }; label_hnd = selabel_open(SELABEL_CTX_X, &selabel_option, 1); if (!label_hnd) FatalError("SELinux: Failed to open x_contexts mapping in policy\n"); } void SELinuxLabelReset(void) { selabel_close(label_hnd); label_hnd = NULL; /* Free local state */ SELinuxArrayFree(&arr_types, 0); SELinuxArrayFree(&arr_events, 0); SELinuxArrayFree(&arr_atoms, 1); } xorg-server-21.1.16/Xext/xselinux.h0000644000175000017500000000720614757411105012620 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifndef _XSELINUX_H #define _XSELINUX_H /* Extension info */ #define SELINUX_EXTENSION_NAME "SELinux" #define SELINUX_MAJOR_VERSION 1 #define SELINUX_MINOR_VERSION 1 #define SELinuxNumberEvents 0 #define SELinuxNumberErrors 0 /* Extension protocol */ #define X_SELinuxQueryVersion 0 #define X_SELinuxSetDeviceCreateContext 1 #define X_SELinuxGetDeviceCreateContext 2 #define X_SELinuxSetDeviceContext 3 #define X_SELinuxGetDeviceContext 4 #define X_SELinuxSetDrawableCreateContext 5 #define X_SELinuxGetDrawableCreateContext 6 #define X_SELinuxGetDrawableContext 7 #define X_SELinuxSetPropertyCreateContext 8 #define X_SELinuxGetPropertyCreateContext 9 #define X_SELinuxSetPropertyUseContext 10 #define X_SELinuxGetPropertyUseContext 11 #define X_SELinuxGetPropertyContext 12 #define X_SELinuxGetPropertyDataContext 13 #define X_SELinuxListProperties 14 #define X_SELinuxSetSelectionCreateContext 15 #define X_SELinuxGetSelectionCreateContext 16 #define X_SELinuxSetSelectionUseContext 17 #define X_SELinuxGetSelectionUseContext 18 #define X_SELinuxGetSelectionContext 19 #define X_SELinuxGetSelectionDataContext 20 #define X_SELinuxListSelections 21 #define X_SELinuxGetClientContext 22 typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD8 client_major; CARD8 client_minor; } SELinuxQueryVersionReq; typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD16 server_major; CARD16 server_minor; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } SELinuxQueryVersionReply; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD32 context_len; } SELinuxSetCreateContextReq; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; } SELinuxGetCreateContextReq; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD32 id; CARD32 context_len; } SELinuxSetContextReq; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD32 id; } SELinuxGetContextReq; typedef struct { CARD8 reqType; CARD8 SELinuxReqType; CARD16 length; CARD32 window; CARD32 property; } SELinuxGetPropertyContextReq; typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 context_len; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } SELinuxGetContextReply; typedef struct { CARD8 type; CARD8 pad1; CARD16 sequenceNumber; CARD32 length; CARD32 count; CARD32 pad2; CARD32 pad3; CARD32 pad4; CARD32 pad5; CARD32 pad6; } SELinuxListItemsReply; #endif /* _XSELINUX_H */ xorg-server-21.1.16/Xext/xselinuxint.h0000644000175000017500000006011414757411105013330 /************************************************************ Author: Eamon Walsh Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. ********************************************************/ #ifndef _XSELINUXINT_H #define _XSELINUXINT_H #include #include #include "globals.h" #include "dixaccess.h" #include "dixstruct.h" #include "privates.h" #include "resource.h" #include "registry.h" #include "inputstr.h" #include "xselinux.h" /* * Types */ #define COMMAND_LEN 64 /* subject state (clients and devices only) */ typedef struct { security_id_t sid; security_id_t dev_create_sid; security_id_t win_create_sid; security_id_t sel_create_sid; security_id_t prp_create_sid; security_id_t sel_use_sid; security_id_t prp_use_sid; struct avc_entry_ref aeref; char command[COMMAND_LEN]; int privileged; } SELinuxSubjectRec; /* object state */ typedef struct { security_id_t sid; int poly; } SELinuxObjectRec; /* * Globals */ extern DevPrivateKeyRec subjectKeyRec; #define subjectKey (&subjectKeyRec) extern DevPrivateKeyRec objectKeyRec; #define objectKey (&objectKeyRec) extern DevPrivateKeyRec dataKeyRec; #define dataKey (&dataKeyRec) /* * Label functions */ int SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec ** obj_rtn); int SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec * subj, security_id_t * sid_rtn, int *poly_rtn); int SELinuxPropertyToSID(Atom property, SELinuxSubjectRec * subj, security_id_t * sid_rtn, int *poly_rtn); int SELinuxEventToSID(unsigned type, security_id_t sid_of_window, SELinuxObjectRec * sid_return); int SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn); security_class_t SELinuxTypeToClass(RESTYPE type); char *SELinuxDefaultClientLabel(void); void SELinuxLabelInit(void); void SELinuxLabelReset(void); /* * Security module functions */ void SELinuxFlaskInit(void); void SELinuxFlaskReset(void); /* * Private Flask definitions */ /* Security class constants */ #define SECCLASS_X_DRAWABLE 1 #define SECCLASS_X_SCREEN 2 #define SECCLASS_X_GC 3 #define SECCLASS_X_FONT 4 #define SECCLASS_X_COLORMAP 5 #define SECCLASS_X_PROPERTY 6 #define SECCLASS_X_SELECTION 7 #define SECCLASS_X_CURSOR 8 #define SECCLASS_X_CLIENT 9 #define SECCLASS_X_POINTER 10 #define SECCLASS_X_KEYBOARD 11 #define SECCLASS_X_SERVER 12 #define SECCLASS_X_EXTENSION 13 #define SECCLASS_X_EVENT 14 #define SECCLASS_X_FAKEEVENT 15 #define SECCLASS_X_RESOURCE 16 #ifdef _XSELINUX_NEED_FLASK_MAP /* Mapping from DixAccess bits to Flask permissions */ static struct security_class_mapping map[] = { {"x_drawable", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "list_property", /* DixListPropAccess */ "get_property", /* DixGetPropAccess */ "set_property", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "list_child", /* DixListAccess */ "add_child", /* DixAddAccess */ "remove_child", /* DixRemoveAccess */ "hide", /* DixHideAccess */ "show", /* DixShowAccess */ "blend", /* DixBlendAccess */ "override", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "send", /* DixSendAccess */ "receive", /* DixReceiveAccess */ "", /* DixUseAccess */ "manage", /* DixManageAccess */ NULL}}, {"x_screen", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "saver_getattr", /* DixListPropAccess */ "saver_setattr", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "hide_cursor", /* DixHideAccess */ "show_cursor", /* DixShowAccess */ "saver_hide", /* DixBlendAccess */ "saver_show", /* DixGrabAccess */ NULL}}, {"x_gc", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ NULL}}, {"x_font", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "add_glyph", /* DixAddAccess */ "remove_glyph", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ NULL}}, {"x_colormap", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "add_color", /* DixAddAccess */ "remove_color", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "install", /* DixInstallAccess */ "uninstall", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ NULL}}, {"x_property", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "write", /* DixBlendAccess */ NULL}}, {"x_selection", {"read", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "setattr", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ NULL}}, {"x_cursor", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ NULL}}, {"x_client", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "", /* DixUseAccess */ "manage", /* DixManageAccess */ NULL}}, {"x_pointer", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "list_property", /* DixListPropAccess */ "get_property", /* DixGetPropAccess */ "set_property", /* DixSetPropAccess */ "getfocus", /* DixGetFocusAccess */ "setfocus", /* DixSetFocusAccess */ "", /* DixListAccess */ "add", /* DixAddAccess */ "remove", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "grab", /* DixGrabAccess */ "freeze", /* DixFreezeAccess */ "force_cursor", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ "manage", /* DixManageAccess */ "", /* DixDebugAccess */ "bell", /* DixBellAccess */ NULL}}, {"x_keyboard", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "destroy", /* DixDestroyAccess */ "create", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "list_property", /* DixListPropAccess */ "get_property", /* DixGetPropAccess */ "set_property", /* DixSetPropAccess */ "getfocus", /* DixGetFocusAccess */ "setfocus", /* DixSetFocusAccess */ "", /* DixListAccess */ "add", /* DixAddAccess */ "remove", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "grab", /* DixGrabAccess */ "freeze", /* DixFreezeAccess */ "force_cursor", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ "manage", /* DixManageAccess */ "", /* DixDebugAccess */ "bell", /* DixBellAccess */ NULL}}, {"x_server", {"record", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "", /* DixCreateAccess */ "getattr", /* DixGetAttrAccess */ "setattr", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "grab", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "", /* DixUseAccess */ "manage", /* DixManageAccess */ "debug", /* DixDebugAccess */ NULL}}, {"x_extension", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "", /* DixCreateAccess */ "query", /* DixGetAttrAccess */ "", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "", /* DixSendAccess */ "", /* DixReceiveAccess */ "use", /* DixUseAccess */ NULL}}, {"x_event", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "", /* DixCreateAccess */ "", /* DixGetAttrAccess */ "", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "send", /* DixSendAccess */ "receive", /* DixReceiveAccess */ NULL}}, {"x_synthetic_event", {"", /* DixReadAccess */ "", /* DixWriteAccess */ "", /* DixDestroyAccess */ "", /* DixCreateAccess */ "", /* DixGetAttrAccess */ "", /* DixSetAttrAccess */ "", /* DixListPropAccess */ "", /* DixGetPropAccess */ "", /* DixSetPropAccess */ "", /* DixGetFocusAccess */ "", /* DixSetFocusAccess */ "", /* DixListAccess */ "", /* DixAddAccess */ "", /* DixRemoveAccess */ "", /* DixHideAccess */ "", /* DixShowAccess */ "", /* DixBlendAccess */ "", /* DixGrabAccess */ "", /* DixFreezeAccess */ "", /* DixForceAccess */ "", /* DixInstallAccess */ "", /* DixUninstallAccess */ "send", /* DixSendAccess */ "receive", /* DixReceiveAccess */ NULL}}, {"x_resource", {"read", /* DixReadAccess */ "write", /* DixWriteAccess */ "write", /* DixDestroyAccess */ "write", /* DixCreateAccess */ "read", /* DixGetAttrAccess */ "write", /* DixSetAttrAccess */ "read", /* DixListPropAccess */ "read", /* DixGetPropAccess */ "write", /* DixSetPropAccess */ "read", /* DixGetFocusAccess */ "write", /* DixSetFocusAccess */ "read", /* DixListAccess */ "write", /* DixAddAccess */ "write", /* DixRemoveAccess */ "write", /* DixHideAccess */ "read", /* DixShowAccess */ "read", /* DixBlendAccess */ "write", /* DixGrabAccess */ "write", /* DixFreezeAccess */ "write", /* DixForceAccess */ "write", /* DixInstallAccess */ "write", /* DixUninstallAccess */ "write", /* DixSendAccess */ "read", /* DixReceiveAccess */ "read", /* DixUseAccess */ "write", /* DixManageAccess */ "read", /* DixDebugAccess */ "write", /* DixBellAccess */ NULL}}, {NULL} }; /* x_resource "read" bits from the list above */ #define SELinuxReadMask (DixReadAccess|DixGetAttrAccess|DixListPropAccess| \ DixGetPropAccess|DixGetFocusAccess|DixListAccess| \ DixShowAccess|DixBlendAccess|DixReceiveAccess| \ DixUseAccess|DixDebugAccess) #endif /* _XSELINUX_NEED_FLASK_MAP */ #endif /* _XSELINUXINT_H */ xorg-server-21.1.16/Xext/security.c0000644000175000017500000010541214757411105012601 /* Copyright 1996, 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "scrnintstr.h" #include "inputstr.h" #include "windowstr.h" #include "propertyst.h" #include "colormapst.h" #include "privates.h" #include "registry.h" #include "xacestr.h" #include "securitysrv.h" #include #include "extinit.h" #include "protocol-versions.h" /* Extension stuff */ static int SecurityErrorBase; /* first Security error number */ static int SecurityEventBase; /* first Security event number */ RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */ static RESTYPE RTEventClient; static CallbackListPtr SecurityValidateGroupCallback = NULL; /* Private state record */ static DevPrivateKeyRec stateKeyRec; #define stateKey (&stateKeyRec) /* This is what we store as client security state */ typedef struct { unsigned int haveState :1; unsigned int live :1; unsigned int trustLevel :2; XID authId; } SecurityStateRec; /* The only extensions that untrusted clients have access to */ static const char *SecurityTrustedExtensions[] = { "XC-MISC", "BIG-REQUESTS", NULL }; /* * Access modes that untrusted clients are allowed on trusted objects. */ static const Mask SecurityResourceMask = DixGetAttrAccess | DixReceiveAccess | DixListPropAccess | DixGetPropAccess | DixListAccess; static const Mask SecurityWindowExtraMask = DixRemoveAccess; static const Mask SecurityRootWindowExtraMask = DixReceiveAccess | DixSendAccess | DixAddAccess | DixRemoveAccess; static const Mask SecurityDeviceMask = DixGetAttrAccess | DixReceiveAccess | DixGetFocusAccess | DixGrabAccess | DixSetAttrAccess | DixUseAccess; static const Mask SecurityServerMask = DixGetAttrAccess | DixGrabAccess; static const Mask SecurityClientMask = DixGetAttrAccess; /* SecurityAudit * * Arguments: * format is the formatting string to be used to interpret the * remaining arguments. * * Returns: nothing. * * Side Effects: * Writes the message to the log file if security logging is on. */ static void _X_ATTRIBUTE_PRINTF(1, 2) SecurityAudit(const char *format, ...) { va_list args; if (auditTrailLevel < SECURITY_AUDIT_LEVEL) return; va_start(args, format); VAuditF(format, args); va_end(args); } /* SecurityAudit */ /* * Performs a Security permission check. */ static int SecurityDoCheck(SecurityStateRec * subj, SecurityStateRec * obj, Mask requested, Mask allowed) { if (!subj->haveState || !obj->haveState) return Success; if (subj->trustLevel == XSecurityClientTrusted) return Success; if (obj->trustLevel != XSecurityClientTrusted) return Success; if ((requested | allowed) == allowed) return Success; return BadAccess; } /* * Labels initial server objects. */ static void SecurityLabelInitial(void) { SecurityStateRec *state; /* Do the serverClient */ state = dixLookupPrivate(&serverClient->devPrivates, stateKey); state->trustLevel = XSecurityClientTrusted; state->haveState = TRUE; state->live = FALSE; } /* * Looks up a request name */ static _X_INLINE const char * SecurityLookupRequestName(ClientPtr client) { return LookupRequestName(client->majorOp, client->minorOp); } /* SecurityDeleteAuthorization * * Arguments: * value is the authorization to delete. * id is its resource ID. * * Returns: Success. * * Side Effects: * Frees everything associated with the authorization. */ static int SecurityDeleteAuthorization(void *value, XID id) { SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) value; unsigned short name_len, data_len; const char *name; char *data; int status; int i; OtherClientsPtr pEventClient; /* Remove the auth using the os layer auth manager */ status = AuthorizationFromID(pAuth->id, &name_len, &name, &data_len, &data); assert(status); status = RemoveAuthorization(name_len, name, data_len, data); assert(status); (void) status; /* free the auth timer if there is one */ if (pAuth->timer) TimerFree(pAuth->timer); /* send revoke events */ while ((pEventClient = pAuth->eventClients)) { /* send revocation event event */ xSecurityAuthorizationRevokedEvent are = { .type = SecurityEventBase + XSecurityAuthorizationRevoked, .authId = pAuth->id }; WriteEventsToClient(rClient(pEventClient), 1, (xEvent *) &are); FreeResource(pEventClient->resource, RT_NONE); } /* kill all clients using this auth */ for (i = 1; i < currentMaxClients; i++) if (clients[i]) { SecurityStateRec *state; state = dixLookupPrivate(&clients[i]->devPrivates, stateKey); if (state->haveState && state->authId == pAuth->id) CloseDownClient(clients[i]); } SecurityAudit("revoked authorization ID %lu\n", (unsigned long)pAuth->id); free(pAuth); return Success; } /* SecurityDeleteAuthorization */ /* resource delete function for RTEventClient */ static int SecurityDeleteAuthorizationEventClient(void *value, XID id) { OtherClientsPtr pEventClient, prev = NULL; SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) value; for (pEventClient = pAuth->eventClients; pEventClient; pEventClient = pEventClient->next) { if (pEventClient->resource == id) { if (prev) prev->next = pEventClient->next; else pAuth->eventClients = pEventClient->next; free(pEventClient); return Success; } prev = pEventClient; } /*NOTREACHED*/ return -1; /* make compiler happy */ } /* SecurityDeleteAuthorizationEventClient */ /* SecurityComputeAuthorizationTimeout * * Arguments: * pAuth is the authorization for which we are computing the timeout * seconds is the number of seconds we want to wait * * Returns: * the number of milliseconds that the auth timer should be set to * * Side Effects: * Sets pAuth->secondsRemaining to any "overflow" amount of time * that didn't fit in 32 bits worth of milliseconds */ static CARD32 SecurityComputeAuthorizationTimeout(SecurityAuthorizationPtr pAuth, unsigned int seconds) { /* maxSecs is the number of full seconds that can be expressed in * 32 bits worth of milliseconds */ CARD32 maxSecs = (CARD32) (~0) / (CARD32) MILLI_PER_SECOND; if (seconds > maxSecs) { /* only come here if we want to wait more than 49 days */ pAuth->secondsRemaining = seconds - maxSecs; return maxSecs * MILLI_PER_SECOND; } else { /* by far the common case */ pAuth->secondsRemaining = 0; return seconds * MILLI_PER_SECOND; } } /* SecurityStartAuthorizationTimer */ /* SecurityAuthorizationExpired * * This function is passed as an argument to TimerSet and gets called from * the timer manager in the os layer when its time is up. * * Arguments: * timer is the timer for this authorization. * time is the current time. * pval is the authorization whose time is up. * * Returns: * A new time delay in milliseconds if the timer should wait some * more, else zero. * * Side Effects: * Frees the authorization resource if the timeout period is really * over, otherwise recomputes pAuth->secondsRemaining. */ static CARD32 SecurityAuthorizationExpired(OsTimerPtr timer, CARD32 time, void *pval) { SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr) pval; assert(pAuth->timer == timer); if (pAuth->secondsRemaining) { return SecurityComputeAuthorizationTimeout(pAuth, pAuth->secondsRemaining); } else { FreeResource(pAuth->id, RT_NONE); return 0; } } /* SecurityAuthorizationExpired */ /* SecurityStartAuthorizationTimer * * Arguments: * pAuth is the authorization whose timer should be started. * * Returns: nothing. * * Side Effects: * A timer is started, set to expire after the timeout period for * this authorization. When it expires, the function * SecurityAuthorizationExpired will be called. */ static void SecurityStartAuthorizationTimer(SecurityAuthorizationPtr pAuth) { pAuth->timer = TimerSet(pAuth->timer, 0, SecurityComputeAuthorizationTimeout(pAuth, pAuth->timeout), SecurityAuthorizationExpired, pAuth); } /* SecurityStartAuthorizationTimer */ /* Proc functions all take a client argument, execute the request in * client->requestBuffer, and return a protocol error status. */ static int ProcSecurityQueryVersion(ClientPtr client) { /* REQUEST(xSecurityQueryVersionReq); */ xSecurityQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_SECURITY_MAJOR_VERSION, .minorVersion = SERVER_SECURITY_MINOR_VERSION }; REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), &rep); return Success; } /* ProcSecurityQueryVersion */ static int SecurityEventSelectForAuthorization(SecurityAuthorizationPtr pAuth, ClientPtr client, Mask mask) { OtherClients *pEventClient; for (pEventClient = pAuth->eventClients; pEventClient; pEventClient = pEventClient->next) { if (SameClient(pEventClient, client)) { if (mask == 0) FreeResource(pEventClient->resource, RT_NONE); else pEventClient->mask = mask; return Success; } } pEventClient = malloc(sizeof(OtherClients)); if (!pEventClient) return BadAlloc; pEventClient->mask = mask; pEventClient->resource = FakeClientID(client->index); pEventClient->next = pAuth->eventClients; if (!AddResource(pEventClient->resource, RTEventClient, (void *) pAuth)) { free(pEventClient); return BadAlloc; } pAuth->eventClients = pEventClient; return Success; } /* SecurityEventSelectForAuthorization */ static int ProcSecurityGenerateAuthorization(ClientPtr client) { REQUEST(xSecurityGenerateAuthorizationReq); int len; /* request length in CARD32s */ Bool removeAuth = FALSE; /* if bailout, call RemoveAuthorization? */ SecurityAuthorizationPtr pAuth = NULL; /* auth we are creating */ int err; /* error to return from this function */ XID authId; /* authorization ID assigned by os layer */ xSecurityGenerateAuthorizationReply rep; /* reply struct */ unsigned int trustLevel; /* trust level of new auth */ XID group; /* group of new auth */ CARD32 timeout; /* timeout of new auth */ CARD32 *values; /* list of supplied attributes */ char *protoname; /* auth proto name sent in request */ char *protodata; /* auth proto data sent in request */ unsigned int authdata_len; /* # bytes of generated auth data */ char *pAuthdata; /* generated auth data */ Mask eventMask; /* what events on this auth does client want */ /* check request length */ REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); len = bytes_to_int32(SIZEOF(xSecurityGenerateAuthorizationReq)); len += bytes_to_int32(stuff->nbytesAuthProto); len += bytes_to_int32(stuff->nbytesAuthData); values = ((CARD32 *) stuff) + len; len += Ones(stuff->valueMask); if (client->req_len != len) return BadLength; /* check valuemask */ if (stuff->valueMask & ~XSecurityAllAuthorizationAttributes) { client->errorValue = stuff->valueMask; return BadValue; } /* check timeout */ timeout = 60; if (stuff->valueMask & XSecurityTimeout) { timeout = *values++; } /* check trustLevel */ trustLevel = XSecurityClientUntrusted; if (stuff->valueMask & XSecurityTrustLevel) { trustLevel = *values++; if (trustLevel != XSecurityClientTrusted && trustLevel != XSecurityClientUntrusted) { client->errorValue = trustLevel; return BadValue; } } /* check group */ group = None; if (stuff->valueMask & XSecurityGroup) { group = *values++; if (SecurityValidateGroupCallback) { SecurityValidateGroupInfoRec vgi; vgi.group = group; vgi.valid = FALSE; CallCallbacks(&SecurityValidateGroupCallback, (void *) &vgi); /* if nobody said they recognized it, it's an error */ if (!vgi.valid) { client->errorValue = group; return BadValue; } } } /* check event mask */ eventMask = 0; if (stuff->valueMask & XSecurityEventMask) { eventMask = *values++; if (eventMask & ~XSecurityAllEventMasks) { client->errorValue = eventMask; return BadValue; } } protoname = (char *) &stuff[1]; protodata = protoname + bytes_to_int32(stuff->nbytesAuthProto); /* call os layer to generate the authorization */ authId = GenerateAuthorization(stuff->nbytesAuthProto, protoname, stuff->nbytesAuthData, protodata, &authdata_len, &pAuthdata); if ((XID) ~0L == authId) { err = SecurityErrorBase + XSecurityBadAuthorizationProtocol; goto bailout; } /* now that we've added the auth, remember to remove it if we have to * abort the request for some reason (like allocation failure) */ removeAuth = TRUE; /* associate additional information with this auth ID */ pAuth = malloc(sizeof(SecurityAuthorizationRec)); if (!pAuth) { err = BadAlloc; goto bailout; } /* fill in the auth fields */ pAuth->id = authId; pAuth->timeout = timeout; pAuth->group = group; pAuth->trustLevel = trustLevel; pAuth->refcnt = 0; /* the auth was just created; nobody's using it yet */ pAuth->secondsRemaining = 0; pAuth->timer = NULL; pAuth->eventClients = NULL; /* handle event selection */ if (eventMask) { err = SecurityEventSelectForAuthorization(pAuth, client, eventMask); if (err != Success) goto bailout; } if (!AddResource(authId, SecurityAuthorizationResType, pAuth)) { err = BadAlloc; goto bailout; } /* start the timer ticking */ if (pAuth->timeout != 0) SecurityStartAuthorizationTimer(pAuth); /* tell client the auth id and data */ rep = (xSecurityGenerateAuthorizationReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(authdata_len), .authId = authId, .dataLength = authdata_len }; if (client->swapped) { swapl(&rep.length); swaps(&rep.sequenceNumber); swapl(&rep.authId); swaps(&rep.dataLength); } WriteToClient(client, SIZEOF(xSecurityGenerateAuthorizationReply), &rep); WriteToClient(client, authdata_len, pAuthdata); SecurityAudit ("client %d generated authorization %lu trust %d timeout %lu group %lu events %lu\n", client->index, (unsigned long)pAuth->id, pAuth->trustLevel, (unsigned long)pAuth->timeout, (unsigned long)pAuth->group, (unsigned long)eventMask); /* the request succeeded; don't call RemoveAuthorization or free pAuth */ return Success; bailout: if (removeAuth) RemoveAuthorization(stuff->nbytesAuthProto, protoname, authdata_len, pAuthdata); free(pAuth); return err; } /* ProcSecurityGenerateAuthorization */ static int ProcSecurityRevokeAuthorization(ClientPtr client) { REQUEST(xSecurityRevokeAuthorizationReq); SecurityAuthorizationPtr pAuth; int rc; REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); rc = dixLookupResourceByType((void **) &pAuth, stuff->authId, SecurityAuthorizationResType, client, DixDestroyAccess); if (rc != Success) return rc; FreeResource(stuff->authId, RT_NONE); return Success; } /* ProcSecurityRevokeAuthorization */ static int ProcSecurityDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_SecurityQueryVersion: return ProcSecurityQueryVersion(client); case X_SecurityGenerateAuthorization: return ProcSecurityGenerateAuthorization(client); case X_SecurityRevokeAuthorization: return ProcSecurityRevokeAuthorization(client); default: return BadRequest; } } /* ProcSecurityDispatch */ static int _X_COLD SProcSecurityQueryVersion(ClientPtr client) { REQUEST(xSecurityQueryVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSecurityQueryVersionReq); swaps(&stuff->majorVersion); swaps(&stuff->minorVersion); return ProcSecurityQueryVersion(client); } /* SProcSecurityQueryVersion */ static int _X_COLD SProcSecurityGenerateAuthorization(ClientPtr client) { REQUEST(xSecurityGenerateAuthorizationReq); CARD32 *values; unsigned long nvalues; int values_offset; swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSecurityGenerateAuthorizationReq); swaps(&stuff->nbytesAuthProto); swaps(&stuff->nbytesAuthData); swapl(&stuff->valueMask); values_offset = bytes_to_int32(stuff->nbytesAuthProto) + bytes_to_int32(stuff->nbytesAuthData); if (values_offset > stuff->length - bytes_to_int32(sz_xSecurityGenerateAuthorizationReq)) return BadLength; values = (CARD32 *) (&stuff[1]) + values_offset; nvalues = (((CARD32 *) stuff) + stuff->length) - values; SwapLongs(values, nvalues); return ProcSecurityGenerateAuthorization(client); } /* SProcSecurityGenerateAuthorization */ static int _X_COLD SProcSecurityRevokeAuthorization(ClientPtr client) { REQUEST(xSecurityRevokeAuthorizationReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq); swapl(&stuff->authId); return ProcSecurityRevokeAuthorization(client); } /* SProcSecurityRevokeAuthorization */ static int _X_COLD SProcSecurityDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_SecurityQueryVersion: return SProcSecurityQueryVersion(client); case X_SecurityGenerateAuthorization: return SProcSecurityGenerateAuthorization(client); case X_SecurityRevokeAuthorization: return SProcSecurityRevokeAuthorization(client); default: return BadRequest; } } /* SProcSecurityDispatch */ static void _X_COLD SwapSecurityAuthorizationRevokedEvent(xSecurityAuthorizationRevokedEvent * from, xSecurityAuthorizationRevokedEvent * to) { to->type = from->type; to->detail = from->detail; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->authId, to->authId); } /* SecurityCheckDeviceAccess * * Arguments: * client is the client attempting to access a device. * dev is the device being accessed. * fromRequest is TRUE if the device access is a direct result of * the client executing some request and FALSE if it is a * result of the server trying to send an event (e.g. KeymapNotify) * to the client. * Returns: * TRUE if the device access should be allowed, else FALSE. * * Side Effects: * An audit message is generated if access is denied. */ static void SecurityDevice(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceDeviceAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; Mask allowed = SecurityDeviceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); if (rec->dev != inputInfo.keyboard) /* this extension only supports the core keyboard */ allowed = requested; if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security denied client %d keyboard access on request " "%s\n", rec->client->index, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } } /* SecurityResource * * This function gets plugged into client->CheckAccess and is called from * SecurityLookupIDByType/Class to determine if the client can access the * resource. * * Arguments: * client is the client doing the resource access. * id is the resource id. * rtype is its type or class. * access_mode represents the intended use of the resource; see * resource.h. * res is a pointer to the resource structure for this resource. * * Returns: * If access is granted, the value of rval that was passed in, else FALSE. * * Side Effects: * Disallowed resource accesses are audited. */ static void SecurityResource(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceResourceAccessRec *rec = calldata; SecurityStateRec *subj, *obj; int cid = CLIENT_ID(rec->id); Mask requested = rec->access_mode; Mask allowed = SecurityResourceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); /* disable background None for untrusted windows */ if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW)) if (subj->haveState && subj->trustLevel != XSecurityClientTrusted) ((WindowPtr) rec->res)->forcedBG = TRUE; /* additional permissions for specific resource types */ if (rec->rtype == RT_WINDOW) allowed |= SecurityWindowExtraMask; /* special checks for server-owned resources */ if (cid == 0) { if (rec->rtype & RC_DRAWABLE) /* additional operations allowed on root windows */ allowed |= SecurityRootWindowExtraMask; else if (rec->rtype == RT_COLORMAP) /* allow access to default colormaps */ allowed = requested; else /* allow read access to other server-owned resources */ allowed |= DixReadAccess; } if (clients[cid] != NULL) { obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, requested, allowed) == Success) return; } SecurityAudit("Security: denied client %d access %lx to resource 0x%lx " "of client %d on request %s\n", rec->client->index, (unsigned long)requested, (unsigned long)rec->id, cid, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; /* deny access */ } static void SecurityExtension(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceExtAccessRec *rec = calldata; SecurityStateRec *subj; int i = 0; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); if (subj->haveState && subj->trustLevel == XSecurityClientTrusted) return; while (SecurityTrustedExtensions[i]) if (!strcmp(SecurityTrustedExtensions[i++], rec->ext->name)) return; SecurityAudit("Security: denied client %d access to extension " "%s on request %s\n", rec->client->index, rec->ext->name, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } static void SecurityServer(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceServerAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; Mask allowed = SecurityServerMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&serverClient->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security: denied client %d access to server " "configuration request %s\n", rec->client->index, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } } static void SecurityClient(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceClientAccessRec *rec = calldata; SecurityStateRec *subj, *obj; Mask requested = rec->access_mode; Mask allowed = SecurityClientMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&rec->target->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security: denied client %d access to client %d on " "request %s\n", rec->client->index, rec->target->index, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } } static void SecurityProperty(CallbackListPtr *pcbl, void *unused, void *calldata) { XacePropertyAccessRec *rec = calldata; SecurityStateRec *subj, *obj; ATOM name = (*rec->ppProp)->propertyName; Mask requested = rec->access_mode; Mask allowed = SecurityResourceMask | DixReadAccess; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, requested, allowed) != Success) { SecurityAudit("Security: denied client %d access to property %s " "(atom 0x%x) window 0x%lx of client %d on request %s\n", rec->client->index, NameForAtom(name), name, (unsigned long)rec->pWin->drawable.id, wClient(rec->pWin)->index, SecurityLookupRequestName(rec->client)); rec->status = BadAccess; } } static void SecuritySend(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceSendAccessRec *rec = calldata; SecurityStateRec *subj, *obj; if (rec->client) { int i; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, DixSendAccess, 0) == Success) return; for (i = 0; i < rec->count; i++) if (rec->events[i].u.u.type != UnmapNotify && rec->events[i].u.u.type != ConfigureRequest && rec->events[i].u.u.type != ClientMessage) { SecurityAudit("Security: denied client %d from sending event " "of type %s to window 0x%lx of client %d\n", rec->client->index, LookupEventName(rec->events[i].u.u.type), (unsigned long)rec->pWin->drawable.id, wClient(rec->pWin)->index); rec->status = BadAccess; return; } } } static void SecurityReceive(CallbackListPtr *pcbl, void *unused, void *calldata) { XaceReceiveAccessRec *rec = calldata; SecurityStateRec *subj, *obj; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); obj = dixLookupPrivate(&wClient(rec->pWin)->devPrivates, stateKey); if (SecurityDoCheck(subj, obj, DixReceiveAccess, 0) == Success) return; SecurityAudit("Security: denied client %d from receiving an event " "sent to window 0x%lx of client %d\n", rec->client->index, (unsigned long)rec->pWin->drawable.id, wClient(rec->pWin)->index); rec->status = BadAccess; } /* SecurityClientStateCallback * * Arguments: * pcbl is &ClientStateCallback. * nullata is NULL. * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) * which contains information about client state changes. * * Returns: nothing. * * Side Effects: * * If a new client is connecting, its authorization ID is copied to * client->authID. If this is a generated authorization, its reference * count is bumped, its timer is cancelled if it was running, and its * trustlevel is copied to TRUSTLEVEL(client). * * If a client is disconnecting and the client was using a generated * authorization, the authorization's reference count is decremented, and * if it is now zero, the timer for this authorization is started. */ static void SecurityClientState(CallbackListPtr *pcbl, void *unused, void *calldata) { NewClientInfoRec *pci = calldata; SecurityStateRec *state; SecurityAuthorizationPtr pAuth; int rc; state = dixLookupPrivate(&pci->client->devPrivates, stateKey); switch (pci->client->clientState) { case ClientStateInitial: state->trustLevel = XSecurityClientTrusted; state->authId = None; state->haveState = TRUE; state->live = FALSE; break; case ClientStateRunning: state->authId = AuthorizationIDOfClient(pci->client); rc = dixLookupResourceByType((void **) &pAuth, state->authId, SecurityAuthorizationResType, serverClient, DixGetAttrAccess); if (rc == Success) { /* it is a generated authorization */ pAuth->refcnt++; state->live = TRUE; if (pAuth->refcnt == 1 && pAuth->timer) TimerCancel(pAuth->timer); state->trustLevel = pAuth->trustLevel; } break; case ClientStateGone: case ClientStateRetained: rc = dixLookupResourceByType((void **) &pAuth, state->authId, SecurityAuthorizationResType, serverClient, DixGetAttrAccess); if (rc == Success && state->live) { /* it is a generated authorization */ pAuth->refcnt--; state->live = FALSE; if (pAuth->refcnt == 0) SecurityStartAuthorizationTimer(pAuth); } break; default: break; } } /* SecurityResetProc * * Arguments: * extEntry is the extension information for the security extension. * * Returns: nothing. * * Side Effects: * Performs any cleanup needed by Security at server shutdown time. */ static void SecurityResetProc(ExtensionEntry * extEntry) { /* Unregister callbacks */ DeleteCallback(&ClientStateCallback, SecurityClientState, NULL); XaceDeleteCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); XaceDeleteCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); XaceDeleteCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); XaceDeleteCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); XaceDeleteCallback(XACE_SEND_ACCESS, SecuritySend, NULL); XaceDeleteCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); XaceDeleteCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); XaceDeleteCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); XaceDeleteCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); } /* SecurityExtensionInit * * Arguments: none. * * Returns: nothing. * * Side Effects: * Enables the Security extension if possible. */ void SecurityExtensionInit(void) { ExtensionEntry *extEntry; int ret = TRUE; SecurityAuthorizationResType = CreateNewResourceType(SecurityDeleteAuthorization, "SecurityAuthorization"); RTEventClient = CreateNewResourceType(SecurityDeleteAuthorizationEventClient, "SecurityEventClient"); if (!SecurityAuthorizationResType || !RTEventClient) return; RTEventClient |= RC_NEVERRETAIN; /* Allocate the private storage */ if (!dixRegisterPrivateKey (stateKey, PRIVATE_CLIENT, sizeof(SecurityStateRec))) FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); /* Register callbacks */ ret &= AddCallback(&ClientStateCallback, SecurityClientState, NULL); ret &= XaceRegisterCallback(XACE_EXT_DISPATCH, SecurityExtension, NULL); ret &= XaceRegisterCallback(XACE_RESOURCE_ACCESS, SecurityResource, NULL); ret &= XaceRegisterCallback(XACE_DEVICE_ACCESS, SecurityDevice, NULL); ret &= XaceRegisterCallback(XACE_PROPERTY_ACCESS, SecurityProperty, NULL); ret &= XaceRegisterCallback(XACE_SEND_ACCESS, SecuritySend, NULL); ret &= XaceRegisterCallback(XACE_RECEIVE_ACCESS, SecurityReceive, NULL); ret &= XaceRegisterCallback(XACE_CLIENT_ACCESS, SecurityClient, NULL); ret &= XaceRegisterCallback(XACE_EXT_ACCESS, SecurityExtension, NULL); ret &= XaceRegisterCallback(XACE_SERVER_ACCESS, SecurityServer, NULL); if (!ret) FatalError("SecurityExtensionSetup: Failed to register callbacks\n"); /* Add extension to server */ extEntry = AddExtension(SECURITY_EXTENSION_NAME, XSecurityNumberEvents, XSecurityNumberErrors, ProcSecurityDispatch, SProcSecurityDispatch, SecurityResetProc, StandardMinorOpcode); SecurityErrorBase = extEntry->errorBase; SecurityEventBase = extEntry->eventBase; EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = (EventSwapPtr) SwapSecurityAuthorizationRevokedEvent; SetResourceTypeErrorValue(SecurityAuthorizationResType, SecurityErrorBase + XSecurityBadAuthorization); /* Label objects that were created before we could register ourself */ SecurityLabelInitial(); } xorg-server-21.1.16/Xext/securitysrv.h0000644000175000017500000000601014757411105013333 /* Copyright 1996, 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. */ /* Xserver internals for Security extension - moved here from _SECURITY_SERVER section of */ #ifndef _SECURITY_SRV_H #define _SECURITY_SRV_H /* Allow client side portions of to compile */ #ifndef Status #define Status int #define NEED_UNDEF_Status #endif #ifndef Display #define Display void #define NEED_UNDEF_Display #endif #include #ifdef NEED_UNDEF_Status #undef Status #undef NEED_UNDEF_Status #endif #ifdef NEED_UNDEF_Display #undef Display #undef NEED_UNDEF_Display #endif #include "input.h" /* for DeviceIntPtr */ #include "property.h" /* for PropertyPtr */ #include "pixmap.h" /* for DrawablePtr */ #include "resource.h" /* for RESTYPE */ /* resource type to pass in LookupIDByType for authorizations */ extern RESTYPE SecurityAuthorizationResType; /* this is what we store for an authorization */ typedef struct { XID id; /* resource ID */ CARD32 timeout; /* how long to live in seconds after refcnt == 0 */ unsigned int trustLevel; /* trusted/untrusted */ XID group; /* see embedding extension */ unsigned int refcnt; /* how many clients connected with this auth */ unsigned int secondsRemaining; /* overflow time amount for >49 days */ OsTimerPtr timer; /* timer for this auth */ struct _OtherClients *eventClients; /* clients wanting events */ } SecurityAuthorizationRec, *SecurityAuthorizationPtr; typedef struct { XID group; /* the group that was sent in GenerateAuthorization */ Bool valid; /* did anyone recognize it? if so, set to TRUE */ } SecurityValidateGroupInfoRec; /* Give this value or higher to the -audit option to get security messages */ #define SECURITY_AUDIT_LEVEL 4 #endif /* _SECURITY_SRV_H */ xorg-server-21.1.16/Xext/xf86bigfont.c0000644000175000017500000005517114757411105013104 /* * BIGFONT extension for sharing font metrics between clients (if possible) * and for transmitting font metrics to clients in a compressed form. * * Copyright (c) 1999-2000 Bruno Haible * Copyright (c) 1999-2000 The XFree86 Project, Inc. */ /* THIS IS NOT AN X CONSORTIUM STANDARD */ /* * Big fonts suffer from the following: All clients that have opened a * font can access the complete glyph metrics array (the XFontStruct member * `per_char') directly, without going through a macro. Moreover these * glyph metrics are ink metrics, i.e. are not redundant even for a * fixed-width font. For a Unicode font, the size of this array is 768 KB. * * Problems: 1. It eats a lot of memory in each client. 2. All this glyph * metrics data is piped through the socket when the font is opened. * * This extension addresses these two problems for local clients, by using * shared memory. It also addresses the second problem for non-local clients, * by compressing the data before transmit by a factor of nearly 6. * * If you use this extension, your OS ought to nicely support shared memory. * This means: Shared memory should be swappable to the swap, and the limits * should be high enough (SHMMNI at least 64, SHMMAX at least 768 KB, * SHMALL at least 48 MB). It is a plus if your OS allows shmat() calls * on segments that have already been marked "removed", because it permits * these segments to be cleaned up by the OS if the X server is killed with * signal SIGKILL. * * This extension is transparently exploited by Xlib (functions XQueryFont, * XLoadQueryFont). */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #ifdef HAS_SHM #ifdef SVR4 #include #endif #if defined(__CYGWIN__) #include #include #endif #include #include #include #include #include #include #include #endif #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "gcstruct.h" #include "dixfontstr.h" #include "extnsionst.h" #include "extinit.h" #include "protocol-versions.h" #include #include "xf86bigfontsrv.h" static void XF86BigfontResetProc(ExtensionEntry * /* extEntry */ ); #ifdef HAS_SHM /* A random signature, transmitted to the clients so they can verify that the shared memory segment they are attaching to was really established by the X server they are talking to. */ static CARD32 signature; /* Index for additional information stored in a FontRec's devPrivates array. */ static int FontShmdescIndex; static unsigned int pagesize; static Bool badSysCall = FALSE; #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) || defined(__DragonFly__) static void SigSysHandler(int signo) { badSysCall = TRUE; } static Bool CheckForShmSyscall(void) { void (*oldHandler) (int); int shmid = -1; /* If no SHM support in the kernel, the bad syscall will generate SIGSYS */ oldHandler = OsSignal(SIGSYS, SigSysHandler); badSysCall = FALSE; shmid = shmget(IPC_PRIVATE, 4096, IPC_CREAT); if (shmid != -1) { /* Successful allocation - clean up */ shmctl(shmid, IPC_RMID, NULL); } else { /* Allocation failed */ badSysCall = TRUE; } OsSignal(SIGSYS, oldHandler); return !badSysCall; } #define MUST_CHECK_FOR_SHM_SYSCALL #endif #endif /* ========== Management of shared memory segments ========== */ #ifdef HAS_SHM #ifdef __linux__ /* On Linux, shared memory marked as "removed" can still be attached. Nice feature, because the kernel will automatically free the associated storage when the server and all clients are gone. */ #define EARLY_REMOVE #endif typedef struct _ShmDesc { struct _ShmDesc *next; struct _ShmDesc **prev; int shmid; char *attach_addr; } ShmDescRec, *ShmDescPtr; static ShmDescPtr ShmList = (ShmDescPtr) NULL; static ShmDescPtr shmalloc(unsigned int size) { ShmDescPtr pDesc; int shmid; char *addr; #ifdef MUST_CHECK_FOR_SHM_SYSCALL if (pagesize == 0) return (ShmDescPtr) NULL; #endif /* On some older Linux systems, the number of shared memory segments system-wide is 127. In Linux 2.4, it is 4095. Therefore there is a tradeoff to be made between allocating a shared memory segment on one hand, and allocating memory and piping the glyph metrics on the other hand. If the glyph metrics size is small, we prefer the traditional way. */ if (size < 3500) return (ShmDescPtr) NULL; pDesc = malloc(sizeof(ShmDescRec)); if (!pDesc) return (ShmDescPtr) NULL; size = (size + pagesize - 1) & -pagesize; shmid = shmget(IPC_PRIVATE, size, S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH); if (shmid == -1) { ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n", size, strerror(errno)); free(pDesc); return (ShmDescPtr) NULL; } if ((addr = shmat(shmid, 0, 0)) == (char *) -1) { ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n", size, strerror(errno)); shmctl(shmid, IPC_RMID, (void *) 0); free(pDesc); return (ShmDescPtr) NULL; } #ifdef EARLY_REMOVE shmctl(shmid, IPC_RMID, (void *) 0); #endif pDesc->shmid = shmid; pDesc->attach_addr = addr; if (ShmList) ShmList->prev = &pDesc->next; pDesc->next = ShmList; pDesc->prev = &ShmList; ShmList = pDesc; return pDesc; } static void shmdealloc(ShmDescPtr pDesc) { #ifndef EARLY_REMOVE shmctl(pDesc->shmid, IPC_RMID, (void *) 0); #endif shmdt(pDesc->attach_addr); if (pDesc->next) pDesc->next->prev = pDesc->prev; *pDesc->prev = pDesc->next; free(pDesc); } #endif /* Called when a font is closed. */ void XF86BigfontFreeFontShm(FontPtr pFont) { #ifdef HAS_SHM ShmDescPtr pDesc; /* If during shutdown of the server, XF86BigfontCleanup() has already * called shmdealloc() for all segments, we don't need to do it here. */ if (!ShmList) return; pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); if (pDesc) shmdealloc(pDesc); #endif } /* Called upon fatal signal. */ void XF86BigfontCleanup(void) { #ifdef HAS_SHM while (ShmList) shmdealloc(ShmList); #endif } /* Called when a server generation dies. */ static void XF86BigfontResetProc(ExtensionEntry * extEntry) { /* This function is normally called from CloseDownExtensions(), called * from main(). It will be followed by a call to FreeAllResources(), * which will call XF86BigfontFreeFontShm() for each font. Thus it * appears that we do not need to do anything in this function. -- * But I prefer to write robust code, and not keep shared memory lying * around when it's not needed any more. (Someone might close down the * extension without calling FreeAllResources()...) */ XF86BigfontCleanup(); } /* ========== Handling of extension specific requests ========== */ static int ProcXF86BigfontQueryVersion(ClientPtr client) { xXF86BigfontQueryVersionReply reply; REQUEST_SIZE_MATCH(xXF86BigfontQueryVersionReq); reply = (xXF86BigfontQueryVersionReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_XF86BIGFONT_MAJOR_VERSION, .minorVersion = SERVER_XF86BIGFONT_MINOR_VERSION, .uid = geteuid(), .gid = getegid(), #ifdef HAS_SHM .signature = signature, .capabilities = (client->local && !client->swapped) ? XF86Bigfont_CAP_LocalShm : 0 #else .signature = 0, .capabilities = 0 #endif }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swaps(&reply.majorVersion); swaps(&reply.minorVersion); swapl(&reply.uid); swapl(&reply.gid); swapl(&reply.signature); } WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), &reply); return Success; } static void swapCharInfo(xCharInfo * pCI) { swaps(&pCI->leftSideBearing); swaps(&pCI->rightSideBearing); swaps(&pCI->characterWidth); swaps(&pCI->ascent); swaps(&pCI->descent); swaps(&pCI->attributes); } /* static CARD32 hashCI (xCharInfo *p); */ #define hashCI(p) \ (CARD32)(((p->leftSideBearing << 27) + (p->leftSideBearing >> 5) + \ (p->rightSideBearing << 23) + (p->rightSideBearing >> 9) + \ (p->characterWidth << 16) + \ (p->ascent << 11) + (p->descent << 6)) ^ p->attributes) static int ProcXF86BigfontQueryFont(ClientPtr client) { FontPtr pFont; REQUEST(xXF86BigfontQueryFontReq); CARD32 stuff_flags; xCharInfo *pmax; xCharInfo *pmin; int nCharInfos; int shmid; #ifdef HAS_SHM ShmDescPtr pDesc = NULL; #else #define pDesc 0 #endif xCharInfo *pCI; CARD16 *pIndex2UniqIndex; CARD16 *pUniqIndex2Index; CARD32 nUniqCharInfos; #if 0 REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); #else switch (client->req_len) { case 2: /* client with version 1.0 libX11 */ stuff_flags = (client->local && !client->swapped ? XF86Bigfont_FLAGS_Shm : 0); break; case 3: /* client with version 1.1 libX11 */ stuff_flags = stuff->flags; break; default: return BadLength; } #endif if (dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess) != Success) return BadFont; /* procotol spec says only error is BadFont */ pmax = FONTINKMAX(pFont); pmin = FONTINKMIN(pFont); nCharInfos = (pmax->rightSideBearing == pmin->rightSideBearing && pmax->leftSideBearing == pmin->leftSideBearing && pmax->descent == pmin->descent && pmax->ascent == pmin->ascent && pmax->characterWidth == pmin->characterWidth) ? 0 : N2dChars(pFont); shmid = -1; pCI = NULL; pIndex2UniqIndex = NULL; pUniqIndex2Index = NULL; nUniqCharInfos = 0; if (nCharInfos > 0) { #ifdef HAS_SHM if (!badSysCall) pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); if (pDesc) { pCI = (xCharInfo *) pDesc->attach_addr; if (stuff_flags & XF86Bigfont_FLAGS_Shm) shmid = pDesc->shmid; } else { if (stuff_flags & XF86Bigfont_FLAGS_Shm && !badSysCall) pDesc = shmalloc(nCharInfos * sizeof(xCharInfo) + sizeof(CARD32)); if (pDesc) { pCI = (xCharInfo *) pDesc->attach_addr; shmid = pDesc->shmid; } else { #endif pCI = xallocarray(nCharInfos, sizeof(xCharInfo)); if (!pCI) return BadAlloc; #ifdef HAS_SHM } #endif /* Fill nCharInfos starting at pCI. */ { xCharInfo *prCI = pCI; int ninfos = 0; int ncols = pFont->info.lastCol - pFont->info.firstCol + 1; int row; for (row = pFont->info.firstRow; row <= pFont->info.lastRow && ninfos < nCharInfos; row++) { unsigned char chars[512]; xCharInfo *tmpCharInfos[256]; unsigned long count; int col; unsigned long i; i = 0; for (col = pFont->info.firstCol; col <= pFont->info.lastCol; col++) { chars[i++] = row; chars[i++] = col; } (*pFont->get_metrics) (pFont, ncols, chars, TwoD16Bit, &count, tmpCharInfos); for (i = 0; i < count && ninfos < nCharInfos; i++) { *prCI++ = *tmpCharInfos[i]; ninfos++; } } } #ifdef HAS_SHM if (pDesc && !badSysCall) { *(CARD32 *) (pCI + nCharInfos) = signature; if (!xfont2_font_set_private(pFont, FontShmdescIndex, pDesc)) { shmdealloc(pDesc); return BadAlloc; } } } #endif if (shmid == -1) { /* Cannot use shared memory, so remove-duplicates the xCharInfos using a temporary hash table. */ /* Note that CARD16 is suitable as index type, because nCharInfos <= 0x10000. */ CARD32 hashModulus; CARD16 *pHash2UniqIndex; CARD16 *pUniqIndex2NextUniqIndex; CARD32 NextIndex; CARD32 NextUniqIndex; CARD16 *tmp; CARD32 i, j; hashModulus = 67; if (hashModulus > nCharInfos + 1) hashModulus = nCharInfos + 1; tmp = xallocarray(4 * nCharInfos + 1, sizeof(CARD16)); if (!tmp) { if (!pDesc) free(pCI); return BadAlloc; } pIndex2UniqIndex = tmp; /* nCharInfos elements */ pUniqIndex2Index = tmp + nCharInfos; /* max. nCharInfos elements */ pUniqIndex2NextUniqIndex = tmp + 2 * nCharInfos; /* max. nCharInfos elements */ pHash2UniqIndex = tmp + 3 * nCharInfos; /* hashModulus (<= nCharInfos+1) elements */ /* Note that we can use 0xffff as end-of-list indicator, because even if nCharInfos = 0x10000, 0xffff can not occur as valid entry before the last element has been inserted. And once the last element has been inserted, we don't need the hash table any more. */ for (j = 0; j < hashModulus; j++) pHash2UniqIndex[j] = (CARD16) (-1); NextUniqIndex = 0; for (NextIndex = 0; NextIndex < nCharInfos; NextIndex++) { xCharInfo *p = &pCI[NextIndex]; CARD32 hashCode = hashCI(p) % hashModulus; for (i = pHash2UniqIndex[hashCode]; i != (CARD16) (-1); i = pUniqIndex2NextUniqIndex[i]) { j = pUniqIndex2Index[i]; if (pCI[j].leftSideBearing == p->leftSideBearing && pCI[j].rightSideBearing == p->rightSideBearing && pCI[j].characterWidth == p->characterWidth && pCI[j].ascent == p->ascent && pCI[j].descent == p->descent && pCI[j].attributes == p->attributes) break; } if (i != (CARD16) (-1)) { /* Found *p at Index j, UniqIndex i */ pIndex2UniqIndex[NextIndex] = i; } else { /* Allocate a new entry in the Uniq table */ if (hashModulus <= 2 * NextUniqIndex && hashModulus < nCharInfos + 1) { /* Time to increate hash table size */ hashModulus = 2 * hashModulus + 1; if (hashModulus > nCharInfos + 1) hashModulus = nCharInfos + 1; for (j = 0; j < hashModulus; j++) pHash2UniqIndex[j] = (CARD16) (-1); for (i = 0; i < NextUniqIndex; i++) pUniqIndex2NextUniqIndex[i] = (CARD16) (-1); for (i = 0; i < NextUniqIndex; i++) { j = pUniqIndex2Index[i]; p = &pCI[j]; hashCode = hashCI(p) % hashModulus; pUniqIndex2NextUniqIndex[i] = pHash2UniqIndex[hashCode]; pHash2UniqIndex[hashCode] = i; } p = &pCI[NextIndex]; hashCode = hashCI(p) % hashModulus; } i = NextUniqIndex++; pUniqIndex2NextUniqIndex[i] = pHash2UniqIndex[hashCode]; pHash2UniqIndex[hashCode] = i; pUniqIndex2Index[i] = NextIndex; pIndex2UniqIndex[NextIndex] = i; } } nUniqCharInfos = NextUniqIndex; /* fprintf(stderr, "font metrics: nCharInfos = %d, nUniqCharInfos = %d, hashModulus = %d\n", nCharInfos, nUniqCharInfos, hashModulus); */ } } { int nfontprops = pFont->info.nprops; int rlength = sizeof(xXF86BigfontQueryFontReply) + nfontprops * sizeof(xFontProp) + (nCharInfos > 0 && shmid == -1 ? nUniqCharInfos * sizeof(xCharInfo) + (nCharInfos + 1) / 2 * 2 * sizeof(CARD16) : 0); xXF86BigfontQueryFontReply *reply = calloc(1, rlength); char *p; if (!reply) { if (nCharInfos > 0) { if (shmid == -1) free(pIndex2UniqIndex); if (!pDesc) free(pCI); } return BadAlloc; } reply->type = X_Reply; reply->length = bytes_to_int32(rlength - sizeof(xGenericReply)); reply->sequenceNumber = client->sequence; reply->minBounds = pFont->info.ink_minbounds; reply->maxBounds = pFont->info.ink_maxbounds; reply->minCharOrByte2 = pFont->info.firstCol; reply->maxCharOrByte2 = pFont->info.lastCol; reply->defaultChar = pFont->info.defaultCh; reply->nFontProps = pFont->info.nprops; reply->drawDirection = pFont->info.drawDirection; reply->minByte1 = pFont->info.firstRow; reply->maxByte1 = pFont->info.lastRow; reply->allCharsExist = pFont->info.allExist; reply->fontAscent = pFont->info.fontAscent; reply->fontDescent = pFont->info.fontDescent; reply->nCharInfos = nCharInfos; reply->nUniqCharInfos = nUniqCharInfos; reply->shmid = shmid; reply->shmsegoffset = 0; if (client->swapped) { swaps(&reply->sequenceNumber); swapl(&reply->length); swapCharInfo(&reply->minBounds); swapCharInfo(&reply->maxBounds); swaps(&reply->minCharOrByte2); swaps(&reply->maxCharOrByte2); swaps(&reply->defaultChar); swaps(&reply->nFontProps); swaps(&reply->fontAscent); swaps(&reply->fontDescent); swapl(&reply->nCharInfos); swapl(&reply->nUniqCharInfos); swapl(&reply->shmid); swapl(&reply->shmsegoffset); } p = (char *) &reply[1]; { FontPropPtr pFP; xFontProp *prFP; int i; for (i = 0, pFP = pFont->info.props, prFP = (xFontProp *) p; i < nfontprops; i++, pFP++, prFP++) { prFP->name = pFP->name; prFP->value = pFP->value; if (client->swapped) { swapl(&prFP->name); swapl(&prFP->value); } } p = (char *) prFP; } if (nCharInfos > 0 && shmid == -1) { xCharInfo *pci; CARD16 *ps; int i, j; pci = (xCharInfo *) p; for (i = 0; i < nUniqCharInfos; i++, pci++) { *pci = pCI[pUniqIndex2Index[i]]; if (client->swapped) swapCharInfo(pci); } ps = (CARD16 *) pci; for (j = 0; j < nCharInfos; j++, ps++) { *ps = pIndex2UniqIndex[j]; if (client->swapped) { swaps(ps); } } } WriteToClient(client, rlength, reply); free(reply); if (nCharInfos > 0) { if (shmid == -1) free(pIndex2UniqIndex); if (!pDesc) free(pCI); } return Success; } } static int ProcXF86BigfontDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XF86BigfontQueryVersion: return ProcXF86BigfontQueryVersion(client); case X_XF86BigfontQueryFont: return ProcXF86BigfontQueryFont(client); default: return BadRequest; } } static int _X_COLD SProcXF86BigfontQueryVersion(ClientPtr client) { REQUEST(xXF86BigfontQueryVersionReq); swaps(&stuff->length); return ProcXF86BigfontQueryVersion(client); } static int _X_COLD SProcXF86BigfontQueryFont(ClientPtr client) { REQUEST(xXF86BigfontQueryFontReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86BigfontQueryFontReq); swapl(&stuff->id); return ProcXF86BigfontQueryFont(client); } static int _X_COLD SProcXF86BigfontDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XF86BigfontQueryVersion: return SProcXF86BigfontQueryVersion(client); case X_XF86BigfontQueryFont: return SProcXF86BigfontQueryFont(client); default: return BadRequest; } } void XFree86BigfontExtensionInit(void) { if (AddExtension(XF86BIGFONTNAME, XF86BigfontNumberEvents, XF86BigfontNumberErrors, ProcXF86BigfontDispatch, SProcXF86BigfontDispatch, XF86BigfontResetProc, StandardMinorOpcode)) { #ifdef HAS_SHM #ifdef MUST_CHECK_FOR_SHM_SYSCALL /* * Note: Local-clients will not be optimized without shared memory * support. Remote-client optimization does not depend on shared * memory support. Thus, the extension is still registered even * when shared memory support is not functional. */ if (!CheckForShmSyscall()) { ErrorF(XF86BIGFONTNAME " extension local-client optimization disabled due to lack of shared memory support in the kernel\n"); return; } #endif srand((unsigned int) time(NULL)); signature = ((unsigned int) (65536.0 / (RAND_MAX + 1.0) * rand()) << 16) + (unsigned int) (65536.0 / (RAND_MAX + 1.0) * rand()); /* fprintf(stderr, "signature = 0x%08X\n", signature); */ FontShmdescIndex = xfont2_allocate_font_private_index(); #if !defined(CSRG_BASED) && !defined(__CYGWIN__) pagesize = SHMLBA; #else #ifdef _SC_PAGESIZE pagesize = sysconf(_SC_PAGESIZE); #else pagesize = getpagesize(); #endif #endif #endif } } xorg-server-21.1.16/Xext/xf86bigfontsrv.h0000644000175000017500000000246514757411105013642 /* * Copyright © 2010 Yaakov Selkowitz * * 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, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice (including the * next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifndef _XF86BIGFONTSRV_H_ #define _XF86BIGFONTSRV_H_ #include extern void XF86BigfontFreeFontShm(FontPtr); extern void XF86BigfontCleanup(void); #endif xorg-server-21.1.16/Xext/dpms.c0000644000175000017500000002536114757411105011701 /***************************************************************** Copyright (c) 1996 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. ******************************************************************/ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include "opaque.h" #include #include "dpmsproc.h" #include "extinit.h" #include "scrnintstr.h" #include "windowstr.h" CARD16 DPMSPowerLevel = 0; Bool DPMSDisabledSwitch = FALSE; CARD32 DPMSStandbyTime = -1; CARD32 DPMSSuspendTime = -1; CARD32 DPMSOffTime = -1; Bool DPMSEnabled; Bool DPMSSupported(void) { int i; /* For each screen, check if DPMS is supported */ for (i = 0; i < screenInfo.numScreens; i++) if (screenInfo.screens[i]->DPMS != NULL) return TRUE; for (i = 0; i < screenInfo.numGPUScreens; i++) if (screenInfo.gpuscreens[i]->DPMS != NULL) return TRUE; return FALSE; } static Bool isUnblank(int mode) { switch (mode) { case SCREEN_SAVER_OFF: case SCREEN_SAVER_FORCER: return TRUE; case SCREEN_SAVER_ON: case SCREEN_SAVER_CYCLE: return FALSE; default: return TRUE; } } int DPMSSet(ClientPtr client, int level) { int rc, i; DPMSPowerLevel = level; if (level != DPMSModeOn) { if (isUnblank(screenIsSaved)) { rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverActive); if (rc != Success) return rc; } } else if (!isUnblank(screenIsSaved)) { rc = dixSaveScreens(client, SCREEN_SAVER_OFF, ScreenSaverReset); if (rc != Success) return rc; } for (i = 0; i < screenInfo.numScreens; i++) if (screenInfo.screens[i]->DPMS != NULL) screenInfo.screens[i]->DPMS(screenInfo.screens[i], level); for (i = 0; i < screenInfo.numGPUScreens; i++) if (screenInfo.gpuscreens[i]->DPMS != NULL) screenInfo.gpuscreens[i]->DPMS(screenInfo.gpuscreens[i], level); return Success; } static int ProcDPMSGetVersion(ClientPtr client) { /* REQUEST(xDPMSGetVersionReq); */ xDPMSGetVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = DPMSMajorVersion, .minorVersion = DPMSMinorVersion }; REQUEST_SIZE_MATCH(xDPMSGetVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xDPMSGetVersionReply), &rep); return Success; } static int ProcDPMSCapable(ClientPtr client) { /* REQUEST(xDPMSCapableReq); */ xDPMSCapableReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .capable = TRUE }; REQUEST_SIZE_MATCH(xDPMSCapableReq); if (client->swapped) { swaps(&rep.sequenceNumber); } WriteToClient(client, sizeof(xDPMSCapableReply), &rep); return Success; } static int ProcDPMSGetTimeouts(ClientPtr client) { /* REQUEST(xDPMSGetTimeoutsReq); */ xDPMSGetTimeoutsReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .standby = DPMSStandbyTime / MILLI_PER_SECOND, .suspend = DPMSSuspendTime / MILLI_PER_SECOND, .off = DPMSOffTime / MILLI_PER_SECOND }; REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.standby); swaps(&rep.suspend); swaps(&rep.off); } WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), &rep); return Success; } static int ProcDPMSSetTimeouts(ClientPtr client) { REQUEST(xDPMSSetTimeoutsReq); REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); if ((stuff->off != 0) && (stuff->off < stuff->suspend)) { client->errorValue = stuff->off; return BadValue; } if ((stuff->suspend != 0) && (stuff->suspend < stuff->standby)) { client->errorValue = stuff->suspend; return BadValue; } DPMSStandbyTime = stuff->standby * MILLI_PER_SECOND; DPMSSuspendTime = stuff->suspend * MILLI_PER_SECOND; DPMSOffTime = stuff->off * MILLI_PER_SECOND; SetScreenSaverTimer(); return Success; } static int ProcDPMSEnable(ClientPtr client) { Bool was_enabled = DPMSEnabled; REQUEST_SIZE_MATCH(xDPMSEnableReq); DPMSEnabled = TRUE; if (!was_enabled) SetScreenSaverTimer(); return Success; } static int ProcDPMSDisable(ClientPtr client) { /* REQUEST(xDPMSDisableReq); */ REQUEST_SIZE_MATCH(xDPMSDisableReq); DPMSSet(client, DPMSModeOn); DPMSEnabled = FALSE; return Success; } static int ProcDPMSForceLevel(ClientPtr client) { REQUEST(xDPMSForceLevelReq); REQUEST_SIZE_MATCH(xDPMSForceLevelReq); if (!DPMSEnabled) return BadMatch; if (stuff->level != DPMSModeOn && stuff->level != DPMSModeStandby && stuff->level != DPMSModeSuspend && stuff->level != DPMSModeOff) { client->errorValue = stuff->level; return BadValue; } DPMSSet(client, stuff->level); return Success; } static int ProcDPMSInfo(ClientPtr client) { /* REQUEST(xDPMSInfoReq); */ xDPMSInfoReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .power_level = DPMSPowerLevel, .state = DPMSEnabled }; REQUEST_SIZE_MATCH(xDPMSInfoReq); if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.power_level); } WriteToClient(client, sizeof(xDPMSInfoReply), &rep); return Success; } static int ProcDPMSDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_DPMSGetVersion: return ProcDPMSGetVersion(client); case X_DPMSCapable: return ProcDPMSCapable(client); case X_DPMSGetTimeouts: return ProcDPMSGetTimeouts(client); case X_DPMSSetTimeouts: return ProcDPMSSetTimeouts(client); case X_DPMSEnable: return ProcDPMSEnable(client); case X_DPMSDisable: return ProcDPMSDisable(client); case X_DPMSForceLevel: return ProcDPMSForceLevel(client); case X_DPMSInfo: return ProcDPMSInfo(client); default: return BadRequest; } } static int _X_COLD SProcDPMSGetVersion(ClientPtr client) { REQUEST(xDPMSGetVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSGetVersionReq); swaps(&stuff->majorVersion); swaps(&stuff->minorVersion); return ProcDPMSGetVersion(client); } static int _X_COLD SProcDPMSCapable(ClientPtr client) { REQUEST(xDPMSCapableReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSCapableReq); return ProcDPMSCapable(client); } static int _X_COLD SProcDPMSGetTimeouts(ClientPtr client) { REQUEST(xDPMSGetTimeoutsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSGetTimeoutsReq); return ProcDPMSGetTimeouts(client); } static int _X_COLD SProcDPMSSetTimeouts(ClientPtr client) { REQUEST(xDPMSSetTimeoutsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSSetTimeoutsReq); swaps(&stuff->standby); swaps(&stuff->suspend); swaps(&stuff->off); return ProcDPMSSetTimeouts(client); } static int _X_COLD SProcDPMSEnable(ClientPtr client) { REQUEST(xDPMSEnableReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSEnableReq); return ProcDPMSEnable(client); } static int _X_COLD SProcDPMSDisable(ClientPtr client) { REQUEST(xDPMSDisableReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSDisableReq); return ProcDPMSDisable(client); } static int _X_COLD SProcDPMSForceLevel(ClientPtr client) { REQUEST(xDPMSForceLevelReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSForceLevelReq); swaps(&stuff->level); return ProcDPMSForceLevel(client); } static int _X_COLD SProcDPMSInfo(ClientPtr client) { REQUEST(xDPMSInfoReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xDPMSInfoReq); return ProcDPMSInfo(client); } static int _X_COLD SProcDPMSDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_DPMSGetVersion: return SProcDPMSGetVersion(client); case X_DPMSCapable: return SProcDPMSCapable(client); case X_DPMSGetTimeouts: return SProcDPMSGetTimeouts(client); case X_DPMSSetTimeouts: return SProcDPMSSetTimeouts(client); case X_DPMSEnable: return SProcDPMSEnable(client); case X_DPMSDisable: return SProcDPMSDisable(client); case X_DPMSForceLevel: return SProcDPMSForceLevel(client); case X_DPMSInfo: return SProcDPMSInfo(client); default: return BadRequest; } } static void DPMSCloseDownExtension(ExtensionEntry *e) { DPMSSet(serverClient, DPMSModeOn); } void DPMSExtensionInit(void) { #define CONDITIONALLY_SET_DPMS_TIMEOUT(_timeout_value_) \ if (_timeout_value_ == -1) { /* not yet set from config */ \ _timeout_value_ = ScreenSaverTime; \ } CONDITIONALLY_SET_DPMS_TIMEOUT(DPMSStandbyTime) CONDITIONALLY_SET_DPMS_TIMEOUT(DPMSSuspendTime) CONDITIONALLY_SET_DPMS_TIMEOUT(DPMSOffTime) DPMSPowerLevel = DPMSModeOn; DPMSEnabled = DPMSSupported(); if (DPMSEnabled) AddExtension(DPMSExtensionName, 0, 0, ProcDPMSDispatch, SProcDPMSDispatch, DPMSCloseDownExtension, StandardMinorOpcode); } xorg-server-21.1.16/Xext/dpmsproc.h0000644000175000017500000000070114757411105012561 /* Prototypes for functions that the DDX must provide */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _DPMSPROC_H_ #define _DPMSPROC_H_ #include "dixstruct.h" extern int DPMSSet(ClientPtr client, int level); extern Bool DPMSSupported(void); extern CARD32 DPMSStandbyTime; extern CARD32 DPMSSuspendTime; extern CARD32 DPMSOffTime; extern CARD16 DPMSPowerLevel; extern Bool DPMSEnabled; extern Bool DPMSDisabledSwitch; #endif xorg-server-21.1.16/Xext/vidmode.c0000644000175000017500000020640714757411105012367 /* Copyright 1995 Kaleb S. KEITHLEY 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Kaleb S. KEITHLEY */ /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifdef XF86VIDMODE #include #include #include #include "misc.h" #include "dixstruct.h" #include "extnsionst.h" #include "scrnintstr.h" #include "servermd.h" #include "swaprep.h" #include "vidmodestr.h" #include "globals.h" #include "protocol-versions.h" static int VidModeErrorBase; static int VidModeAllowNonLocal; static DevPrivateKeyRec VidModeClientPrivateKeyRec; #define VidModeClientPrivateKey (&VidModeClientPrivateKeyRec) static DevPrivateKeyRec VidModePrivateKeyRec; #define VidModePrivateKey (&VidModePrivateKeyRec) /* This holds the client's version information */ typedef struct { int major; int minor; } VidModePrivRec, *VidModePrivPtr; #define VM_GETPRIV(c) ((VidModePrivPtr) \ dixLookupPrivate(&(c)->devPrivates, VidModeClientPrivateKey)) #define VM_SETPRIV(c,p) \ dixSetPrivate(&(c)->devPrivates, VidModeClientPrivateKey, p) #ifdef DEBUG #define DEBUG_P(x) DebugF(x"\n") #else #define DEBUG_P(x) /**/ #endif static DisplayModePtr VidModeCreateMode(void) { DisplayModePtr mode; mode = malloc(sizeof(DisplayModeRec)); if (mode != NULL) { mode->name = ""; mode->VScan = 1; /* divides refresh rate. default = 1 */ mode->Private = NULL; mode->next = mode; mode->prev = mode; } return mode; } static void VidModeCopyMode(DisplayModePtr modefrom, DisplayModePtr modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } static int VidModeGetModeValue(DisplayModePtr mode, int valtyp) { int ret = 0; switch (valtyp) { case VIDMODE_H_DISPLAY: ret = mode->HDisplay; break; case VIDMODE_H_SYNCSTART: ret = mode->HSyncStart; break; case VIDMODE_H_SYNCEND: ret = mode->HSyncEnd; break; case VIDMODE_H_TOTAL: ret = mode->HTotal; break; case VIDMODE_H_SKEW: ret = mode->HSkew; break; case VIDMODE_V_DISPLAY: ret = mode->VDisplay; break; case VIDMODE_V_SYNCSTART: ret = mode->VSyncStart; break; case VIDMODE_V_SYNCEND: ret = mode->VSyncEnd; break; case VIDMODE_V_TOTAL: ret = mode->VTotal; break; case VIDMODE_FLAGS: ret = mode->Flags; break; case VIDMODE_CLOCK: ret = mode->Clock; break; } return ret; } static void VidModeSetModeValue(DisplayModePtr mode, int valtyp, int val) { switch (valtyp) { case VIDMODE_H_DISPLAY: mode->HDisplay = val; break; case VIDMODE_H_SYNCSTART: mode->HSyncStart = val; break; case VIDMODE_H_SYNCEND: mode->HSyncEnd = val; break; case VIDMODE_H_TOTAL: mode->HTotal = val; break; case VIDMODE_H_SKEW: mode->HSkew = val; break; case VIDMODE_V_DISPLAY: mode->VDisplay = val; break; case VIDMODE_V_SYNCSTART: mode->VSyncStart = val; break; case VIDMODE_V_SYNCEND: mode->VSyncEnd = val; break; case VIDMODE_V_TOTAL: mode->VTotal = val; break; case VIDMODE_FLAGS: mode->Flags = val; break; case VIDMODE_CLOCK: mode->Clock = val; break; } return; } static int ClientMajorVersion(ClientPtr client) { VidModePrivPtr pPriv; pPriv = VM_GETPRIV(client); if (!pPriv) return 0; else return pPriv->major; } static int ProcVidModeQueryVersion(ClientPtr client) { xXF86VidModeQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .majorVersion = SERVER_XF86VIDMODE_MAJOR_VERSION, .minorVersion = SERVER_XF86VIDMODE_MINOR_VERSION }; DEBUG_P("XF86VidModeQueryVersion"); REQUEST_SIZE_MATCH(xXF86VidModeQueryVersionReq); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.majorVersion); swaps(&rep.minorVersion); } WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), &rep); return Success; } static int ProcVidModeGetModeLine(ClientPtr client) { REQUEST(xXF86VidModeGetModeLineReq); xXF86VidModeGetModeLineReply rep = { .type = X_Reply, .sequenceNumber = client->sequence }; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode; int dotClock; int ver; DEBUG_P("XF86VidModeGetModeline"); ver = ClientMajorVersion(client); REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); if (ver < 2) { rep.length = bytes_to_int32(SIZEOF(xXF86OldVidModeGetModeLineReply) - SIZEOF(xGenericReply)); } else { rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetModeLineReply) - SIZEOF(xGenericReply)); } if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetCurrentModeline(pScreen, &mode, &dotClock)) return BadValue; rep.dotclock = dotClock; rep.hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY); rep.hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART); rep.hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND); rep.htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL); rep.hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW); rep.vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY); rep.vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART); rep.vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND); rep.vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL); rep.flags = VidModeGetModeValue(mode, VIDMODE_FLAGS); DebugF("GetModeLine - scrn: %d clock: %ld\n", stuff->screen, (unsigned long) rep.dotclock); DebugF("GetModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", rep.hdisplay, rep.hsyncstart, rep.hsyncend, rep.htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", rep.vdisplay, rep.vsyncstart, rep.vsyncend, rep.vtotal, (unsigned long) rep.flags); /* * Older servers sometimes had server privates that the VidMode * extension made available. So to be compatible pretend that * there are no server privates to pass to the client. */ rep.privsize = 0; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.dotclock); swaps(&rep.hdisplay); swaps(&rep.hsyncstart); swaps(&rep.hsyncend); swaps(&rep.htotal); swaps(&rep.hskew); swaps(&rep.vdisplay); swaps(&rep.vsyncstart); swaps(&rep.vsyncend); swaps(&rep.vtotal); swapl(&rep.flags); swapl(&rep.privsize); } if (ver < 2) { xXF86OldVidModeGetModeLineReply oldrep = { .type = rep.type, .sequenceNumber = rep.sequenceNumber, .length = rep.length, .dotclock = rep.dotclock, .hdisplay = rep.hdisplay, .hsyncstart = rep.hsyncstart, .hsyncend = rep.hsyncend, .htotal = rep.htotal, .vdisplay = rep.vdisplay, .vsyncstart = rep.vsyncstart, .vsyncend = rep.vsyncend, .vtotal = rep.vtotal, .flags = rep.flags, .privsize = rep.privsize }; WriteToClient(client, sizeof(xXF86OldVidModeGetModeLineReply), &oldrep); } else { WriteToClient(client, sizeof(xXF86VidModeGetModeLineReply), &rep); } return Success; } static int ProcVidModeGetAllModeLines(ClientPtr client) { REQUEST(xXF86VidModeGetAllModeLinesReq); xXF86VidModeGetAllModeLinesReply rep; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode; int modecount, dotClock; int ver; DEBUG_P("XF86VidModeGetAllModelines"); REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; ver = ClientMajorVersion(client); pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; modecount = pVidMode->GetNumOfModes(pScreen); if (modecount < 1) return VidModeErrorBase + XF86VidModeExtensionDisabled; if (!pVidMode->GetFirstModeline(pScreen, &mode, &dotClock)) return BadValue; rep = (xXF86VidModeGetAllModeLinesReply) { .type = X_Reply, .length = SIZEOF(xXF86VidModeGetAllModeLinesReply) - SIZEOF(xGenericReply), .sequenceNumber = client->sequence, .modecount = modecount }; if (ver < 2) rep.length += modecount * sizeof(xXF86OldVidModeModeInfo); else rep.length += modecount * sizeof(xXF86VidModeModeInfo); rep.length >>= 2; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.modecount); } WriteToClient(client, sizeof(xXF86VidModeGetAllModeLinesReply), &rep); do { xXF86VidModeModeInfo mdinf = { .dotclock = dotClock, .hdisplay = VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), .hsyncstart = VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), .hsyncend = VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), .htotal = VidModeGetModeValue(mode, VIDMODE_H_TOTAL), .hskew = VidModeGetModeValue(mode, VIDMODE_H_SKEW), .vdisplay = VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), .vsyncstart = VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), .vsyncend = VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), .vtotal = VidModeGetModeValue(mode, VIDMODE_V_TOTAL), .flags = VidModeGetModeValue(mode, VIDMODE_FLAGS), .privsize = 0 }; if (client->swapped) { swapl(&mdinf.dotclock); swaps(&mdinf.hdisplay); swaps(&mdinf.hsyncstart); swaps(&mdinf.hsyncend); swaps(&mdinf.htotal); swapl(&mdinf.hskew); swaps(&mdinf.vdisplay); swaps(&mdinf.vsyncstart); swaps(&mdinf.vsyncend); swaps(&mdinf.vtotal); swapl(&mdinf.flags); swapl(&mdinf.privsize); } if (ver < 2) { xXF86OldVidModeModeInfo oldmdinf = { .dotclock = mdinf.dotclock, .hdisplay = mdinf.hdisplay, .hsyncstart = mdinf.hsyncstart, .hsyncend = mdinf.hsyncend, .htotal = mdinf.htotal, .vdisplay = mdinf.vdisplay, .vsyncstart = mdinf.vsyncstart, .vsyncend = mdinf.vsyncend, .vtotal = mdinf.vtotal, .flags = mdinf.flags, .privsize = mdinf.privsize }; WriteToClient(client, sizeof(xXF86OldVidModeModeInfo), &oldmdinf); } else { WriteToClient(client, sizeof(xXF86VidModeModeInfo), &mdinf); } } while (pVidMode->GetNextModeline(pScreen, &mode, &dotClock)); return Success; } #define MODEMATCH(mode,stuff) \ (VidModeGetModeValue(mode, VIDMODE_H_DISPLAY) == stuff->hdisplay \ && VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART) == stuff->hsyncstart \ && VidModeGetModeValue(mode, VIDMODE_H_SYNCEND) == stuff->hsyncend \ && VidModeGetModeValue(mode, VIDMODE_H_TOTAL) == stuff->htotal \ && VidModeGetModeValue(mode, VIDMODE_V_DISPLAY) == stuff->vdisplay \ && VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART) == stuff->vsyncstart \ && VidModeGetModeValue(mode, VIDMODE_V_SYNCEND) == stuff->vsyncend \ && VidModeGetModeValue(mode, VIDMODE_V_TOTAL) == stuff->vtotal \ && VidModeGetModeValue(mode, VIDMODE_FLAGS) == stuff->flags ) static int ProcVidModeAddModeLine(ClientPtr client) { REQUEST(xXF86VidModeAddModeLineReq); xXF86OldVidModeAddModeLineReq *oldstuff = (xXF86OldVidModeAddModeLineReq *) client->requestBuffer; xXF86VidModeAddModeLineReq newstuff; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode; int len; int dotClock; int ver; DEBUG_P("XF86VidModeAddModeline"); ver = ClientMajorVersion(client); if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeAddModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeAddModeLineReq)); } if (ver < 2) { /* convert from old format */ stuff = &newstuff; stuff->length = oldstuff->length; stuff->screen = oldstuff->screen; stuff->dotclock = oldstuff->dotclock; stuff->hdisplay = oldstuff->hdisplay; stuff->hsyncstart = oldstuff->hsyncstart; stuff->hsyncend = oldstuff->hsyncend; stuff->htotal = oldstuff->htotal; stuff->hskew = 0; stuff->vdisplay = oldstuff->vdisplay; stuff->vsyncstart = oldstuff->vsyncstart; stuff->vsyncend = oldstuff->vsyncend; stuff->vtotal = oldstuff->vtotal; stuff->flags = oldstuff->flags; stuff->privsize = oldstuff->privsize; stuff->after_dotclock = oldstuff->after_dotclock; stuff->after_hdisplay = oldstuff->after_hdisplay; stuff->after_hsyncstart = oldstuff->after_hsyncstart; stuff->after_hsyncend = oldstuff->after_hsyncend; stuff->after_htotal = oldstuff->after_htotal; stuff->after_hskew = 0; stuff->after_vdisplay = oldstuff->after_vdisplay; stuff->after_vsyncstart = oldstuff->after_vsyncstart; stuff->after_vsyncend = oldstuff->after_vsyncend; stuff->after_vtotal = oldstuff->after_vtotal; stuff->after_flags = oldstuff->after_flags; } DebugF("AddModeLine - scrn: %d clock: %ld\n", (int) stuff->screen, (unsigned long) stuff->dotclock); DebugF("AddModeLine - hdsp: %d hbeg: %d hend: %d httl: %d\n", stuff->hdisplay, stuff->hsyncstart, stuff->hsyncend, stuff->htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, (unsigned long) stuff->flags); DebugF(" after - scrn: %d clock: %ld\n", (int) stuff->screen, (unsigned long) stuff->after_dotclock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", stuff->after_hdisplay, stuff->after_hsyncstart, stuff->after_hsyncend, stuff->after_htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->after_vdisplay, stuff->after_vsyncstart, stuff->after_vsyncend, stuff->after_vtotal, (unsigned long) stuff->after_flags); if (len != stuff->privsize) return BadLength; if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; if (stuff->hsyncstart < stuff->hdisplay || stuff->hsyncend < stuff->hsyncstart || stuff->htotal < stuff->hsyncend || stuff->vsyncstart < stuff->vdisplay || stuff->vsyncend < stuff->vsyncstart || stuff->vtotal < stuff->vsyncend) return BadValue; if (stuff->after_hsyncstart < stuff->after_hdisplay || stuff->after_hsyncend < stuff->after_hsyncstart || stuff->after_htotal < stuff->after_hsyncend || stuff->after_vsyncstart < stuff->after_vdisplay || stuff->after_vsyncend < stuff->after_vsyncstart || stuff->after_vtotal < stuff->after_vsyncend) return BadValue; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (stuff->after_htotal != 0 || stuff->after_vtotal != 0) { Bool found = FALSE; if (pVidMode->GetFirstModeline(pScreen, &mode, &dotClock)) { do { if ((pVidMode->GetDotClock(pScreen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) { found = TRUE; break; } } while (pVidMode->GetNextModeline(pScreen, &mode, &dotClock)); } if (!found) return BadValue; } mode = VidModeCreateMode(); if (mode == NULL) return BadValue; VidModeSetModeValue(mode, VIDMODE_CLOCK, stuff->dotclock); VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); if (stuff->privsize) DebugF("AddModeLine - Privates in request have been ignored\n"); /* Check that the mode is consistent with the monitor specs */ switch (pVidMode->CheckModeForMonitor(pScreen, mode)) { case MODE_OK: break; case MODE_HSYNC: case MODE_H_ILLEGAL: free(mode); return VidModeErrorBase + XF86VidModeBadHTimings; case MODE_VSYNC: case MODE_V_ILLEGAL: free(mode); return VidModeErrorBase + XF86VidModeBadVTimings; default: free(mode); return VidModeErrorBase + XF86VidModeModeUnsuitable; } /* Check that the driver is happy with the mode */ if (pVidMode->CheckModeForDriver(pScreen, mode) != MODE_OK) { free(mode); return VidModeErrorBase + XF86VidModeModeUnsuitable; } pVidMode->SetCrtcForMode(pScreen, mode); pVidMode->AddModeline(pScreen, mode); DebugF("AddModeLine - Succeeded\n"); return Success; } static int ProcVidModeDeleteModeLine(ClientPtr client) { REQUEST(xXF86VidModeDeleteModeLineReq); xXF86OldVidModeDeleteModeLineReq *oldstuff = (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer; xXF86VidModeDeleteModeLineReq newstuff; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode; int len, dotClock; int ver; DEBUG_P("XF86VidModeDeleteModeline"); ver = ClientMajorVersion(client); if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeDeleteModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeDeleteModeLineReq)); } if (ver < 2) { /* convert from old format */ stuff = &newstuff; stuff->length = oldstuff->length; stuff->screen = oldstuff->screen; stuff->dotclock = oldstuff->dotclock; stuff->hdisplay = oldstuff->hdisplay; stuff->hsyncstart = oldstuff->hsyncstart; stuff->hsyncend = oldstuff->hsyncend; stuff->htotal = oldstuff->htotal; stuff->hskew = 0; stuff->vdisplay = oldstuff->vdisplay; stuff->vsyncstart = oldstuff->vsyncstart; stuff->vsyncend = oldstuff->vsyncend; stuff->vtotal = oldstuff->vtotal; stuff->flags = oldstuff->flags; stuff->privsize = oldstuff->privsize; } DebugF("DeleteModeLine - scrn: %d clock: %ld\n", (int) stuff->screen, (unsigned long) stuff->dotclock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", stuff->hdisplay, stuff->hsyncstart, stuff->hsyncend, stuff->htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, (unsigned long) stuff->flags); if (len != stuff->privsize) { DebugF("req_len = %ld, sizeof(Req) = %d, privsize = %ld, " "len = %d, length = %d\n", (unsigned long) client->req_len, (int) sizeof(xXF86VidModeDeleteModeLineReq) >> 2, (unsigned long) stuff->privsize, len, stuff->length); return BadLength; } if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetCurrentModeline(pScreen, &mode, &dotClock)) return BadValue; DebugF("Checking against clock: %d (%d)\n", VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), VidModeGetModeValue(mode, VIDMODE_V_TOTAL), VidModeGetModeValue(mode, VIDMODE_FLAGS)); if ((pVidMode->GetDotClock(pScreen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) return BadValue; if (!pVidMode->GetFirstModeline(pScreen, &mode, &dotClock)) return BadValue; do { DebugF("Checking against clock: %d (%d)\n", VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), VidModeGetModeValue(mode, VIDMODE_V_TOTAL), VidModeGetModeValue(mode, VIDMODE_FLAGS)); if ((pVidMode->GetDotClock(pScreen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) { pVidMode->DeleteModeline(pScreen, mode); DebugF("DeleteModeLine - Succeeded\n"); return Success; } } while (pVidMode->GetNextModeline(pScreen, &mode, &dotClock)); return BadValue; } static int ProcVidModeModModeLine(ClientPtr client) { REQUEST(xXF86VidModeModModeLineReq); xXF86OldVidModeModModeLineReq *oldstuff = (xXF86OldVidModeModModeLineReq *) client->requestBuffer; xXF86VidModeModModeLineReq newstuff; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode, modetmp; int len, dotClock; int ver; DEBUG_P("XF86VidModeModModeline"); ver = ClientMajorVersion(client); if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeModModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeModModeLineReq)); } if (ver < 2) { /* convert from old format */ stuff = &newstuff; stuff->length = oldstuff->length; stuff->screen = oldstuff->screen; stuff->hdisplay = oldstuff->hdisplay; stuff->hsyncstart = oldstuff->hsyncstart; stuff->hsyncend = oldstuff->hsyncend; stuff->htotal = oldstuff->htotal; stuff->hskew = 0; stuff->vdisplay = oldstuff->vdisplay; stuff->vsyncstart = oldstuff->vsyncstart; stuff->vsyncend = oldstuff->vsyncend; stuff->vtotal = oldstuff->vtotal; stuff->flags = oldstuff->flags; stuff->privsize = oldstuff->privsize; } DebugF("ModModeLine - scrn: %d hdsp: %d hbeg: %d hend: %d httl: %d\n", (int) stuff->screen, stuff->hdisplay, stuff->hsyncstart, stuff->hsyncend, stuff->htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, (unsigned long) stuff->flags); if (len != stuff->privsize) return BadLength; if (stuff->hsyncstart < stuff->hdisplay || stuff->hsyncend < stuff->hsyncstart || stuff->htotal < stuff->hsyncend || stuff->vsyncstart < stuff->vdisplay || stuff->vsyncend < stuff->vsyncstart || stuff->vtotal < stuff->vsyncend) return BadValue; if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetCurrentModeline(pScreen, &mode, &dotClock)) return BadValue; modetmp = VidModeCreateMode(); VidModeCopyMode(mode, modetmp); VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); if (stuff->privsize) DebugF("ModModeLine - Privates in request have been ignored\n"); /* Check that the mode is consistent with the monitor specs */ switch (pVidMode->CheckModeForMonitor(pScreen, modetmp)) { case MODE_OK: break; case MODE_HSYNC: case MODE_H_ILLEGAL: free(modetmp); return VidModeErrorBase + XF86VidModeBadHTimings; case MODE_VSYNC: case MODE_V_ILLEGAL: free(modetmp); return VidModeErrorBase + XF86VidModeBadVTimings; default: free(modetmp); return VidModeErrorBase + XF86VidModeModeUnsuitable; } /* Check that the driver is happy with the mode */ if (pVidMode->CheckModeForDriver(pScreen, modetmp) != MODE_OK) { free(modetmp); return VidModeErrorBase + XF86VidModeModeUnsuitable; } free(modetmp); VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); VidModeSetModeValue(mode, VIDMODE_H_SYNCEND, stuff->hsyncend); VidModeSetModeValue(mode, VIDMODE_H_TOTAL, stuff->htotal); VidModeSetModeValue(mode, VIDMODE_H_SKEW, stuff->hskew); VidModeSetModeValue(mode, VIDMODE_V_DISPLAY, stuff->vdisplay); VidModeSetModeValue(mode, VIDMODE_V_SYNCSTART, stuff->vsyncstart); VidModeSetModeValue(mode, VIDMODE_V_SYNCEND, stuff->vsyncend); VidModeSetModeValue(mode, VIDMODE_V_TOTAL, stuff->vtotal); VidModeSetModeValue(mode, VIDMODE_FLAGS, stuff->flags); pVidMode->SetCrtcForMode(pScreen, mode); pVidMode->SwitchMode(pScreen, mode); DebugF("ModModeLine - Succeeded\n"); return Success; } static int ProcVidModeValidateModeLine(ClientPtr client) { REQUEST(xXF86VidModeValidateModeLineReq); xXF86OldVidModeValidateModeLineReq *oldstuff = (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer; xXF86VidModeValidateModeLineReq newstuff; xXF86VidModeValidateModeLineReply rep; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode, modetmp = NULL; int len, status, dotClock; int ver; DEBUG_P("XF86VidModeValidateModeline"); ver = ClientMajorVersion(client); if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeValidateModeLineReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeValidateModeLineReq)); } if (ver < 2) { /* convert from old format */ stuff = &newstuff; stuff->length = oldstuff->length; stuff->screen = oldstuff->screen; stuff->dotclock = oldstuff->dotclock; stuff->hdisplay = oldstuff->hdisplay; stuff->hsyncstart = oldstuff->hsyncstart; stuff->hsyncend = oldstuff->hsyncend; stuff->htotal = oldstuff->htotal; stuff->hskew = 0; stuff->vdisplay = oldstuff->vdisplay; stuff->vsyncstart = oldstuff->vsyncstart; stuff->vsyncend = oldstuff->vsyncend; stuff->vtotal = oldstuff->vtotal; stuff->flags = oldstuff->flags; stuff->privsize = oldstuff->privsize; } DebugF("ValidateModeLine - scrn: %d clock: %ld\n", (int) stuff->screen, (unsigned long) stuff->dotclock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", stuff->hdisplay, stuff->hsyncstart, stuff->hsyncend, stuff->htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, (unsigned long) stuff->flags); if (len != stuff->privsize) return BadLength; if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; status = MODE_OK; if (stuff->hsyncstart < stuff->hdisplay || stuff->hsyncend < stuff->hsyncstart || stuff->htotal < stuff->hsyncend || stuff->vsyncstart < stuff->vdisplay || stuff->vsyncend < stuff->vsyncstart || stuff->vtotal < stuff->vsyncend) { status = MODE_BAD; goto status_reply; } pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetCurrentModeline(pScreen, &mode, &dotClock)) return BadValue; modetmp = VidModeCreateMode(); VidModeCopyMode(mode, modetmp); VidModeSetModeValue(modetmp, VIDMODE_H_DISPLAY, stuff->hdisplay); VidModeSetModeValue(modetmp, VIDMODE_H_SYNCSTART, stuff->hsyncstart); VidModeSetModeValue(modetmp, VIDMODE_H_SYNCEND, stuff->hsyncend); VidModeSetModeValue(modetmp, VIDMODE_H_TOTAL, stuff->htotal); VidModeSetModeValue(modetmp, VIDMODE_H_SKEW, stuff->hskew); VidModeSetModeValue(modetmp, VIDMODE_V_DISPLAY, stuff->vdisplay); VidModeSetModeValue(modetmp, VIDMODE_V_SYNCSTART, stuff->vsyncstart); VidModeSetModeValue(modetmp, VIDMODE_V_SYNCEND, stuff->vsyncend); VidModeSetModeValue(modetmp, VIDMODE_V_TOTAL, stuff->vtotal); VidModeSetModeValue(modetmp, VIDMODE_FLAGS, stuff->flags); if (stuff->privsize) DebugF("ValidateModeLine - Privates in request have been ignored\n"); /* Check that the mode is consistent with the monitor specs */ if ((status = pVidMode->CheckModeForMonitor(pScreen, modetmp)) != MODE_OK) goto status_reply; /* Check that the driver is happy with the mode */ status = pVidMode->CheckModeForDriver(pScreen, modetmp); status_reply: free(modetmp); rep = (xXF86VidModeValidateModeLineReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(SIZEOF(xXF86VidModeValidateModeLineReply) - SIZEOF(xGenericReply)), .status = status }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.status); } WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), &rep); DebugF("ValidateModeLine - Succeeded (status = %d)\n", status); return Success; } static int ProcVidModeSwitchMode(ClientPtr client) { REQUEST(xXF86VidModeSwitchModeReq); ScreenPtr pScreen; VidModePtr pVidMode; DEBUG_P("XF86VidModeSwitchMode"); REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; pVidMode->ZoomViewport(pScreen, (short) stuff->zoom); return Success; } static int ProcVidModeSwitchToMode(ClientPtr client) { REQUEST(xXF86VidModeSwitchToModeReq); xXF86OldVidModeSwitchToModeReq *oldstuff = (xXF86OldVidModeSwitchToModeReq *) client->requestBuffer; xXF86VidModeSwitchToModeReq newstuff; ScreenPtr pScreen; VidModePtr pVidMode; DisplayModePtr mode; int len, dotClock; int ver; DEBUG_P("XF86VidModeSwitchToMode"); ver = ClientMajorVersion(client); if (ver < 2) { REQUEST_AT_LEAST_SIZE(xXF86OldVidModeSwitchToModeReq); len = client->req_len - bytes_to_int32(sizeof(xXF86OldVidModeSwitchToModeReq)); } else { REQUEST_AT_LEAST_SIZE(xXF86VidModeSwitchToModeReq); len = client->req_len - bytes_to_int32(sizeof(xXF86VidModeSwitchToModeReq)); } if (ver < 2) { /* convert from old format */ stuff = &newstuff; stuff->length = oldstuff->length; stuff->screen = oldstuff->screen; stuff->dotclock = oldstuff->dotclock; stuff->hdisplay = oldstuff->hdisplay; stuff->hsyncstart = oldstuff->hsyncstart; stuff->hsyncend = oldstuff->hsyncend; stuff->htotal = oldstuff->htotal; stuff->hskew = 0; stuff->vdisplay = oldstuff->vdisplay; stuff->vsyncstart = oldstuff->vsyncstart; stuff->vsyncend = oldstuff->vsyncend; stuff->vtotal = oldstuff->vtotal; stuff->flags = oldstuff->flags; stuff->privsize = oldstuff->privsize; } DebugF("SwitchToMode - scrn: %d clock: %ld\n", (int) stuff->screen, (unsigned long) stuff->dotclock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", stuff->hdisplay, stuff->hsyncstart, stuff->hsyncend, stuff->htotal); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %ld\n", stuff->vdisplay, stuff->vsyncstart, stuff->vsyncend, stuff->vtotal, (unsigned long) stuff->flags); if (len != stuff->privsize) return BadLength; if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetCurrentModeline(pScreen, &mode, &dotClock)) return BadValue; if ((pVidMode->GetDotClock(pScreen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) return Success; if (!pVidMode->GetFirstModeline(pScreen, &mode, &dotClock)) return BadValue; do { DebugF("Checking against clock: %d (%d)\n", VidModeGetModeValue(mode, VIDMODE_CLOCK), dotClock); DebugF(" hdsp: %d hbeg: %d hend: %d httl: %d\n", VidModeGetModeValue(mode, VIDMODE_H_DISPLAY), VidModeGetModeValue(mode, VIDMODE_H_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_H_SYNCEND), VidModeGetModeValue(mode, VIDMODE_H_TOTAL)); DebugF(" vdsp: %d vbeg: %d vend: %d vttl: %d flags: %d\n", VidModeGetModeValue(mode, VIDMODE_V_DISPLAY), VidModeGetModeValue(mode, VIDMODE_V_SYNCSTART), VidModeGetModeValue(mode, VIDMODE_V_SYNCEND), VidModeGetModeValue(mode, VIDMODE_V_TOTAL), VidModeGetModeValue(mode, VIDMODE_FLAGS)); if ((pVidMode->GetDotClock(pScreen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) { if (!pVidMode->SwitchMode(pScreen, mode)) return BadValue; DebugF("SwitchToMode - Succeeded\n"); return Success; } } while (pVidMode->GetNextModeline(pScreen, &mode, &dotClock)); return BadValue; } static int ProcVidModeLockModeSwitch(ClientPtr client) { REQUEST(xXF86VidModeLockModeSwitchReq); ScreenPtr pScreen; VidModePtr pVidMode; REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); DEBUG_P("XF86VidModeLockModeSwitch"); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->LockZoom(pScreen, (short) stuff->lock)) return VidModeErrorBase + XF86VidModeZoomLocked; return Success; } static int ProcVidModeGetMonitor(ClientPtr client) { REQUEST(xXF86VidModeGetMonitorReq); xXF86VidModeGetMonitorReply rep = { .type = X_Reply, .sequenceNumber = client->sequence }; CARD32 *hsyncdata, *vsyncdata; ScreenPtr pScreen; VidModePtr pVidMode; int i, nHsync, nVrefresh; DEBUG_P("XF86VidModeGetMonitor"); REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; nHsync = pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_NHSYNC, 0).i; nVrefresh = pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_NVREFRESH, 0).i; if ((char *) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr) rep.vendorLength = strlen((char *) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr); else rep.vendorLength = 0; if ((char *) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr) rep.modelLength = strlen((char *) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr); else rep.modelLength = 0; rep.length = bytes_to_int32(SIZEOF(xXF86VidModeGetMonitorReply) - SIZEOF(xGenericReply) + (nHsync + nVrefresh) * sizeof(CARD32) + pad_to_int32(rep.vendorLength) + pad_to_int32(rep.modelLength)); rep.nhsync = nHsync; rep.nvsync = nVrefresh; hsyncdata = xallocarray(nHsync, sizeof(CARD32)); if (!hsyncdata) { return BadAlloc; } vsyncdata = xallocarray(nVrefresh, sizeof(CARD32)); if (!vsyncdata) { free(hsyncdata); return BadAlloc; } for (i = 0; i < nHsync; i++) { hsyncdata[i] = (unsigned short) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_HSYNC_LO, i)).f | (unsigned short) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_HSYNC_HI, i)).f << 16; } for (i = 0; i < nVrefresh; i++) { vsyncdata[i] = (unsigned short) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VREFRESH_LO, i)).f | (unsigned short) (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VREFRESH_HI, i)).f << 16; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); } WriteToClient(client, SIZEOF(xXF86VidModeGetMonitorReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, nHsync * sizeof(CARD32), hsyncdata); WriteSwappedDataToClient(client, nVrefresh * sizeof(CARD32), vsyncdata); if (rep.vendorLength) WriteToClient(client, rep.vendorLength, (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_VENDOR, 0)).ptr); if (rep.modelLength) WriteToClient(client, rep.modelLength, (pVidMode->GetMonitorValue(pScreen, VIDMODE_MON_MODEL, 0)).ptr); free(hsyncdata); free(vsyncdata); return Success; } static int ProcVidModeGetViewPort(ClientPtr client) { REQUEST(xXF86VidModeGetViewPortReq); xXF86VidModeGetViewPortReply rep; ScreenPtr pScreen; VidModePtr pVidMode; int x, y; DEBUG_P("XF86VidModeGetViewPort"); REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; pVidMode->GetViewPort(pScreen, &x, &y); rep = (xXF86VidModeGetViewPortReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .x = x, .y = y }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.x); swapl(&rep.y); } WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), &rep); return Success; } static int ProcVidModeSetViewPort(ClientPtr client) { REQUEST(xXF86VidModeSetViewPortReq); ScreenPtr pScreen; VidModePtr pVidMode; DEBUG_P("XF86VidModeSetViewPort"); REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->SetViewPort(pScreen, stuff->x, stuff->y)) return BadValue; return Success; } static int ProcVidModeGetDotClocks(ClientPtr client) { REQUEST(xXF86VidModeGetDotClocksReq); xXF86VidModeGetDotClocksReply rep; ScreenPtr pScreen; VidModePtr pVidMode; int n; int numClocks; CARD32 dotclock; int *Clocks = NULL; Bool ClockProg; DEBUG_P("XF86VidModeGetDotClocks"); REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; numClocks = pVidMode->GetNumOfClocks(pScreen, &ClockProg); rep = (xXF86VidModeGetDotClocksReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(SIZEOF(xXF86VidModeGetDotClocksReply) - SIZEOF(xGenericReply) + numClocks), .clocks = numClocks, .maxclocks = MAXCLOCKS, .flags = 0 }; if (!ClockProg) { Clocks = calloc(numClocks, sizeof(int)); if (!Clocks) return BadValue; if (!pVidMode->GetClocks(pScreen, Clocks)) { free(Clocks); return BadValue; } } if (ClockProg) { rep.flags |= CLKFLAG_PROGRAMABLE; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.clocks); swapl(&rep.maxclocks); swapl(&rep.flags); } WriteToClient(client, sizeof(xXF86VidModeGetDotClocksReply), &rep); if (!ClockProg) { for (n = 0; n < numClocks; n++) { dotclock = Clocks[n]; if (client->swapped) { WriteSwappedDataToClient(client, 4, (char *) &dotclock); } else { WriteToClient(client, 4, &dotclock); } } } free(Clocks); return Success; } static int ProcVidModeSetGamma(ClientPtr client) { REQUEST(xXF86VidModeSetGammaReq); ScreenPtr pScreen; VidModePtr pVidMode; DEBUG_P("XF86VidModeSetGamma"); REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->SetGamma(pScreen, ((float) stuff->red) / 10000., ((float) stuff->green) / 10000., ((float) stuff->blue) / 10000.)) return BadValue; return Success; } static int ProcVidModeGetGamma(ClientPtr client) { REQUEST(xXF86VidModeGetGammaReq); xXF86VidModeGetGammaReply rep; ScreenPtr pScreen; VidModePtr pVidMode; float red, green, blue; DEBUG_P("XF86VidModeGetGamma"); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (!pVidMode->GetGamma(pScreen, &red, &green, &blue)) return BadValue; rep = (xXF86VidModeGetGammaReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .red = (CARD32) (red * 10000.), .green = (CARD32) (green * 10000.), .blue = (CARD32) (blue * 10000.) }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.red); swapl(&rep.green); swapl(&rep.blue); } WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), &rep); return Success; } static int ProcVidModeSetGammaRamp(ClientPtr client) { CARD16 *r, *g, *b; int length; ScreenPtr pScreen; VidModePtr pVidMode; REQUEST(xXF86VidModeSetGammaRampReq); REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (stuff->size != pVidMode->GetGammaRampSize(pScreen)) return BadValue; length = (stuff->size + 1) & ~1; REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length * 6); r = (CARD16 *) &stuff[1]; g = r + length; b = g + length; if (!pVidMode->SetGammaRamp(pScreen, stuff->size, r, g, b)) return BadValue; return Success; } static int ProcVidModeGetGammaRamp(ClientPtr client) { CARD16 *ramp = NULL; int length; size_t ramplen = 0; xXF86VidModeGetGammaRampReply rep; ScreenPtr pScreen; VidModePtr pVidMode; REQUEST(xXF86VidModeGetGammaRampReq); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; if (stuff->size != pVidMode->GetGammaRampSize(pScreen)) return BadValue; length = (stuff->size + 1) & ~1; if (stuff->size) { if (!(ramp = xallocarray(length, 3 * sizeof(CARD16)))) return BadAlloc; ramplen = length * 3 * sizeof(CARD16); if (!pVidMode->GetGammaRamp(pScreen, stuff->size, ramp, ramp + length, ramp + (length * 2))) { free(ramp); return BadValue; } } rep = (xXF86VidModeGetGammaRampReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = (length >> 1) * 3, .size = stuff->size }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.size); SwapShorts((short *) ramp, length * 3); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampReply), &rep); if (stuff->size) { WriteToClient(client, ramplen, ramp); free(ramp); } return Success; } static int ProcVidModeGetGammaRampSize(ClientPtr client) { xXF86VidModeGetGammaRampSizeReply rep; ScreenPtr pScreen; VidModePtr pVidMode; REQUEST(xXF86VidModeGetGammaRampSizeReq); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; pScreen = screenInfo.screens[stuff->screen]; pVidMode = VidModeGetPtr(pScreen); if (pVidMode == NULL) return BadImplementation; rep = (xXF86VidModeGetGammaRampSizeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .size = pVidMode->GetGammaRampSize(pScreen) }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.size); } WriteToClient(client, sizeof(xXF86VidModeGetGammaRampSizeReply), &rep); return Success; } static int ProcVidModeGetPermissions(ClientPtr client) { xXF86VidModeGetPermissionsReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .permissions = XF86VM_READ_PERMISSION }; REQUEST(xXF86VidModeGetPermissionsReq); REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); if (stuff->screen >= screenInfo.numScreens) return BadValue; if (VidModeAllowNonLocal || client->local) { rep.permissions |= XF86VM_WRITE_PERMISSION; } if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.permissions); } WriteToClient(client, sizeof(xXF86VidModeGetPermissionsReply), &rep); return Success; } static int ProcVidModeSetClientVersion(ClientPtr client) { REQUEST(xXF86VidModeSetClientVersionReq); VidModePrivPtr pPriv; DEBUG_P("XF86VidModeSetClientVersion"); REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); if ((pPriv = VM_GETPRIV(client)) == NULL) { pPriv = malloc(sizeof(VidModePrivRec)); if (!pPriv) return BadAlloc; VM_SETPRIV(client, pPriv); } pPriv->major = stuff->major; pPriv->minor = stuff->minor; return Success; } static int ProcVidModeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XF86VidModeQueryVersion: return ProcVidModeQueryVersion(client); case X_XF86VidModeGetModeLine: return ProcVidModeGetModeLine(client); case X_XF86VidModeGetMonitor: return ProcVidModeGetMonitor(client); case X_XF86VidModeGetAllModeLines: return ProcVidModeGetAllModeLines(client); case X_XF86VidModeValidateModeLine: return ProcVidModeValidateModeLine(client); case X_XF86VidModeGetViewPort: return ProcVidModeGetViewPort(client); case X_XF86VidModeGetDotClocks: return ProcVidModeGetDotClocks(client); case X_XF86VidModeSetClientVersion: return ProcVidModeSetClientVersion(client); case X_XF86VidModeGetGamma: return ProcVidModeGetGamma(client); case X_XF86VidModeGetGammaRamp: return ProcVidModeGetGammaRamp(client); case X_XF86VidModeGetGammaRampSize: return ProcVidModeGetGammaRampSize(client); case X_XF86VidModeGetPermissions: return ProcVidModeGetPermissions(client); default: if (VidModeAllowNonLocal || client->local) { switch (stuff->data) { case X_XF86VidModeAddModeLine: return ProcVidModeAddModeLine(client); case X_XF86VidModeDeleteModeLine: return ProcVidModeDeleteModeLine(client); case X_XF86VidModeModModeLine: return ProcVidModeModModeLine(client); case X_XF86VidModeSwitchMode: return ProcVidModeSwitchMode(client); case X_XF86VidModeSwitchToMode: return ProcVidModeSwitchToMode(client); case X_XF86VidModeLockModeSwitch: return ProcVidModeLockModeSwitch(client); case X_XF86VidModeSetViewPort: return ProcVidModeSetViewPort(client); case X_XF86VidModeSetGamma: return ProcVidModeSetGamma(client); case X_XF86VidModeSetGammaRamp: return ProcVidModeSetGammaRamp(client); default: return BadRequest; } } else return VidModeErrorBase + XF86VidModeClientNotLocal; } } static int _X_COLD SProcVidModeQueryVersion(ClientPtr client) { REQUEST(xXF86VidModeQueryVersionReq); swaps(&stuff->length); return ProcVidModeQueryVersion(client); } static int _X_COLD SProcVidModeGetModeLine(ClientPtr client) { REQUEST(xXF86VidModeGetModeLineReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetModeLineReq); swaps(&stuff->screen); return ProcVidModeGetModeLine(client); } static int _X_COLD SProcVidModeGetAllModeLines(ClientPtr client) { REQUEST(xXF86VidModeGetAllModeLinesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetAllModeLinesReq); swaps(&stuff->screen); return ProcVidModeGetAllModeLines(client); } static int _X_COLD SProcVidModeAddModeLine(ClientPtr client) { xXF86OldVidModeAddModeLineReq *oldstuff = (xXF86OldVidModeAddModeLineReq *) client->requestBuffer; int ver; REQUEST(xXF86VidModeAddModeLineReq); ver = ClientMajorVersion(client); if (ver < 2) { swaps(&oldstuff->length); REQUEST_AT_LEAST_SIZE(xXF86OldVidModeAddModeLineReq); swapl(&oldstuff->screen); swaps(&oldstuff->hdisplay); swaps(&oldstuff->hsyncstart); swaps(&oldstuff->hsyncend); swaps(&oldstuff->htotal); swaps(&oldstuff->vdisplay); swaps(&oldstuff->vsyncstart); swaps(&oldstuff->vsyncend); swaps(&oldstuff->vtotal); swapl(&oldstuff->flags); swapl(&oldstuff->privsize); SwapRestL(oldstuff); } else { swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXF86VidModeAddModeLineReq); swapl(&stuff->screen); swaps(&stuff->hdisplay); swaps(&stuff->hsyncstart); swaps(&stuff->hsyncend); swaps(&stuff->htotal); swaps(&stuff->hskew); swaps(&stuff->vdisplay); swaps(&stuff->vsyncstart); swaps(&stuff->vsyncend); swaps(&stuff->vtotal); swapl(&stuff->flags); swapl(&stuff->privsize); SwapRestL(stuff); } return ProcVidModeAddModeLine(client); } static int _X_COLD SProcVidModeDeleteModeLine(ClientPtr client) { xXF86OldVidModeDeleteModeLineReq *oldstuff = (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer; int ver; REQUEST(xXF86VidModeDeleteModeLineReq); ver = ClientMajorVersion(client); if (ver < 2) { swaps(&oldstuff->length); REQUEST_AT_LEAST_SIZE(xXF86OldVidModeDeleteModeLineReq); swapl(&oldstuff->screen); swaps(&oldstuff->hdisplay); swaps(&oldstuff->hsyncstart); swaps(&oldstuff->hsyncend); swaps(&oldstuff->htotal); swaps(&oldstuff->vdisplay); swaps(&oldstuff->vsyncstart); swaps(&oldstuff->vsyncend); swaps(&oldstuff->vtotal); swapl(&oldstuff->flags); swapl(&oldstuff->privsize); SwapRestL(oldstuff); } else { swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXF86VidModeDeleteModeLineReq); swapl(&stuff->screen); swaps(&stuff->hdisplay); swaps(&stuff->hsyncstart); swaps(&stuff->hsyncend); swaps(&stuff->htotal); swaps(&stuff->hskew); swaps(&stuff->vdisplay); swaps(&stuff->vsyncstart); swaps(&stuff->vsyncend); swaps(&stuff->vtotal); swapl(&stuff->flags); swapl(&stuff->privsize); SwapRestL(stuff); } return ProcVidModeDeleteModeLine(client); } static int _X_COLD SProcVidModeModModeLine(ClientPtr client) { xXF86OldVidModeModModeLineReq *oldstuff = (xXF86OldVidModeModModeLineReq *) client->requestBuffer; int ver; REQUEST(xXF86VidModeModModeLineReq); ver = ClientMajorVersion(client); if (ver < 2) { swaps(&oldstuff->length); REQUEST_AT_LEAST_SIZE(xXF86OldVidModeModModeLineReq); swapl(&oldstuff->screen); swaps(&oldstuff->hdisplay); swaps(&oldstuff->hsyncstart); swaps(&oldstuff->hsyncend); swaps(&oldstuff->htotal); swaps(&oldstuff->vdisplay); swaps(&oldstuff->vsyncstart); swaps(&oldstuff->vsyncend); swaps(&oldstuff->vtotal); swapl(&oldstuff->flags); swapl(&oldstuff->privsize); SwapRestL(oldstuff); } else { swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXF86VidModeModModeLineReq); swapl(&stuff->screen); swaps(&stuff->hdisplay); swaps(&stuff->hsyncstart); swaps(&stuff->hsyncend); swaps(&stuff->htotal); swaps(&stuff->hskew); swaps(&stuff->vdisplay); swaps(&stuff->vsyncstart); swaps(&stuff->vsyncend); swaps(&stuff->vtotal); swapl(&stuff->flags); swapl(&stuff->privsize); SwapRestL(stuff); } return ProcVidModeModModeLine(client); } static int _X_COLD SProcVidModeValidateModeLine(ClientPtr client) { xXF86OldVidModeValidateModeLineReq *oldstuff = (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer; int ver; REQUEST(xXF86VidModeValidateModeLineReq); ver = ClientMajorVersion(client); if (ver < 2) { swaps(&oldstuff->length); REQUEST_AT_LEAST_SIZE(xXF86OldVidModeValidateModeLineReq); swapl(&oldstuff->screen); swaps(&oldstuff->hdisplay); swaps(&oldstuff->hsyncstart); swaps(&oldstuff->hsyncend); swaps(&oldstuff->htotal); swaps(&oldstuff->vdisplay); swaps(&oldstuff->vsyncstart); swaps(&oldstuff->vsyncend); swaps(&oldstuff->vtotal); swapl(&oldstuff->flags); swapl(&oldstuff->privsize); SwapRestL(oldstuff); } else { swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXF86VidModeValidateModeLineReq); swapl(&stuff->screen); swaps(&stuff->hdisplay); swaps(&stuff->hsyncstart); swaps(&stuff->hsyncend); swaps(&stuff->htotal); swaps(&stuff->hskew); swaps(&stuff->vdisplay); swaps(&stuff->vsyncstart); swaps(&stuff->vsyncend); swaps(&stuff->vtotal); swapl(&stuff->flags); swapl(&stuff->privsize); SwapRestL(stuff); } return ProcVidModeValidateModeLine(client); } static int _X_COLD SProcVidModeSwitchMode(ClientPtr client) { REQUEST(xXF86VidModeSwitchModeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeSwitchModeReq); swaps(&stuff->screen); swaps(&stuff->zoom); return ProcVidModeSwitchMode(client); } static int _X_COLD SProcVidModeSwitchToMode(ClientPtr client) { REQUEST(xXF86VidModeSwitchToModeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeSwitchToModeReq); swapl(&stuff->screen); return ProcVidModeSwitchToMode(client); } static int _X_COLD SProcVidModeLockModeSwitch(ClientPtr client) { REQUEST(xXF86VidModeLockModeSwitchReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeLockModeSwitchReq); swaps(&stuff->screen); swaps(&stuff->lock); return ProcVidModeLockModeSwitch(client); } static int _X_COLD SProcVidModeGetMonitor(ClientPtr client) { REQUEST(xXF86VidModeGetMonitorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetMonitorReq); swaps(&stuff->screen); return ProcVidModeGetMonitor(client); } static int _X_COLD SProcVidModeGetViewPort(ClientPtr client) { REQUEST(xXF86VidModeGetViewPortReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetViewPortReq); swaps(&stuff->screen); return ProcVidModeGetViewPort(client); } static int _X_COLD SProcVidModeSetViewPort(ClientPtr client) { REQUEST(xXF86VidModeSetViewPortReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeSetViewPortReq); swaps(&stuff->screen); swapl(&stuff->x); swapl(&stuff->y); return ProcVidModeSetViewPort(client); } static int _X_COLD SProcVidModeGetDotClocks(ClientPtr client) { REQUEST(xXF86VidModeGetDotClocksReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetDotClocksReq); swaps(&stuff->screen); return ProcVidModeGetDotClocks(client); } static int _X_COLD SProcVidModeSetClientVersion(ClientPtr client) { REQUEST(xXF86VidModeSetClientVersionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); swaps(&stuff->major); swaps(&stuff->minor); return ProcVidModeSetClientVersion(client); } static int _X_COLD SProcVidModeSetGamma(ClientPtr client) { REQUEST(xXF86VidModeSetGammaReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeSetGammaReq); swaps(&stuff->screen); swapl(&stuff->red); swapl(&stuff->green); swapl(&stuff->blue); return ProcVidModeSetGamma(client); } static int _X_COLD SProcVidModeGetGamma(ClientPtr client) { REQUEST(xXF86VidModeGetGammaReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaReq); swaps(&stuff->screen); return ProcVidModeGetGamma(client); } static int _X_COLD SProcVidModeSetGammaRamp(ClientPtr client) { int length; REQUEST(xXF86VidModeSetGammaRampReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXF86VidModeSetGammaRampReq); swaps(&stuff->size); swaps(&stuff->screen); length = ((stuff->size + 1) & ~1) * 6; REQUEST_FIXED_SIZE(xXF86VidModeSetGammaRampReq, length); SwapRestS(stuff); return ProcVidModeSetGammaRamp(client); } static int _X_COLD SProcVidModeGetGammaRamp(ClientPtr client) { REQUEST(xXF86VidModeGetGammaRampReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampReq); swaps(&stuff->size); swaps(&stuff->screen); return ProcVidModeGetGammaRamp(client); } static int _X_COLD SProcVidModeGetGammaRampSize(ClientPtr client) { REQUEST(xXF86VidModeGetGammaRampSizeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetGammaRampSizeReq); swaps(&stuff->screen); return ProcVidModeGetGammaRampSize(client); } static int _X_COLD SProcVidModeGetPermissions(ClientPtr client) { REQUEST(xXF86VidModeGetPermissionsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXF86VidModeGetPermissionsReq); swaps(&stuff->screen); return ProcVidModeGetPermissions(client); } static int _X_COLD SProcVidModeDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_XF86VidModeQueryVersion: return SProcVidModeQueryVersion(client); case X_XF86VidModeGetModeLine: return SProcVidModeGetModeLine(client); case X_XF86VidModeGetMonitor: return SProcVidModeGetMonitor(client); case X_XF86VidModeGetAllModeLines: return SProcVidModeGetAllModeLines(client); case X_XF86VidModeGetViewPort: return SProcVidModeGetViewPort(client); case X_XF86VidModeValidateModeLine: return SProcVidModeValidateModeLine(client); case X_XF86VidModeGetDotClocks: return SProcVidModeGetDotClocks(client); case X_XF86VidModeSetClientVersion: return SProcVidModeSetClientVersion(client); case X_XF86VidModeGetGamma: return SProcVidModeGetGamma(client); case X_XF86VidModeGetGammaRamp: return SProcVidModeGetGammaRamp(client); case X_XF86VidModeGetGammaRampSize: return SProcVidModeGetGammaRampSize(client); case X_XF86VidModeGetPermissions: return SProcVidModeGetPermissions(client); default: if (VidModeAllowNonLocal || client->local) { switch (stuff->data) { case X_XF86VidModeAddModeLine: return SProcVidModeAddModeLine(client); case X_XF86VidModeDeleteModeLine: return SProcVidModeDeleteModeLine(client); case X_XF86VidModeModModeLine: return SProcVidModeModModeLine(client); case X_XF86VidModeSwitchMode: return SProcVidModeSwitchMode(client); case X_XF86VidModeSwitchToMode: return SProcVidModeSwitchToMode(client); case X_XF86VidModeLockModeSwitch: return SProcVidModeLockModeSwitch(client); case X_XF86VidModeSetViewPort: return SProcVidModeSetViewPort(client); case X_XF86VidModeSetGamma: return SProcVidModeSetGamma(client); case X_XF86VidModeSetGammaRamp: return SProcVidModeSetGammaRamp(client); default: return BadRequest; } } else return VidModeErrorBase + XF86VidModeClientNotLocal; } } void VidModeAddExtension(Bool allow_non_local) { ExtensionEntry *extEntry; DEBUG_P("VidModeAddExtension"); if (!dixRegisterPrivateKey(VidModeClientPrivateKey, PRIVATE_CLIENT, 0)) return; if ((extEntry = AddExtension(XF86VIDMODENAME, XF86VidModeNumberEvents, XF86VidModeNumberErrors, ProcVidModeDispatch, SProcVidModeDispatch, NULL, StandardMinorOpcode))) { VidModeErrorBase = extEntry->errorBase; VidModeAllowNonLocal = allow_non_local; } } VidModePtr VidModeGetPtr(ScreenPtr pScreen) { return (VidModePtr) (dixLookupPrivate(&pScreen->devPrivates, VidModePrivateKey)); } VidModePtr VidModeInit(ScreenPtr pScreen) { if (!dixRegisterPrivateKey(VidModePrivateKey, PRIVATE_SCREEN, sizeof(VidModeRec))) return NULL; return VidModeGetPtr(pScreen); } #endif /* XF86VIDMODE */ xorg-server-21.1.16/Xext/hashtable.c0000644000175000017500000001563514757411105012674 #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "misc.h" #include "hashtable.h" /* HashResourceID */ #include "resource.h" #define INITHASHSIZE 6 #define MAXHASHSIZE 11 struct HashTableRec { int keySize; int dataSize; int elements; /* number of elements inserted */ int bucketBits; /* number of buckets is 1 << bucketBits */ struct xorg_list *buckets; /* array of bucket list heads */ HashFunc hash; HashCompareFunc compare; void *cdata; }; typedef struct { struct xorg_list l; void *key; void *data; } BucketRec, *BucketPtr; HashTable ht_create(int keySize, int dataSize, HashFunc hash, HashCompareFunc compare, void *cdata) { int c; int numBuckets; HashTable ht = malloc(sizeof(struct HashTableRec)); if (!ht) { return NULL; } ht->keySize = keySize; ht->dataSize = dataSize; ht->hash = hash; ht->compare = compare; ht->elements = 0; ht->bucketBits = INITHASHSIZE; numBuckets = 1 << ht->bucketBits; ht->buckets = xallocarray(numBuckets, sizeof(*ht->buckets)); ht->cdata = cdata; if (ht->buckets) { for (c = 0; c < numBuckets; ++c) { xorg_list_init(&ht->buckets[c]); } return ht; } else { free(ht); return NULL; } } void ht_destroy(HashTable ht) { int c; BucketPtr it, tmp; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { xorg_list_del(&it->l); free(it->key); free(it->data); free(it); } } free(ht->buckets); free(ht); } static Bool double_size(HashTable ht) { struct xorg_list *newBuckets; int numBuckets = 1 << ht->bucketBits; int newBucketBits = ht->bucketBits + 1; int newNumBuckets = 1 << newBucketBits; int c; newBuckets = xallocarray(newNumBuckets, sizeof(*ht->buckets)); if (newBuckets) { for (c = 0; c < newNumBuckets; ++c) { xorg_list_init(&newBuckets[c]); } for (c = 0; c < numBuckets; ++c) { BucketPtr it, tmp; xorg_list_for_each_entry_safe(it, tmp, &ht->buckets[c], l) { struct xorg_list *newBucket = &newBuckets[ht->hash(ht->cdata, it->key, newBucketBits)]; xorg_list_del(&it->l); xorg_list_add(&it->l, newBucket); } } free(ht->buckets); ht->buckets = newBuckets; ht->bucketBits = newBucketBits; return TRUE; } else { return FALSE; } } void * ht_add(HashTable ht, const void *key) { unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); struct xorg_list *bucket = &ht->buckets[index]; BucketRec *elem = calloc(1, sizeof(BucketRec)); if (!elem) { goto outOfMemory; } elem->key = malloc(ht->keySize); if (!elem->key) { goto outOfMemory; } /* we avoid signaling an out-of-memory error if dataSize is 0 */ elem->data = calloc(1, ht->dataSize); if (ht->dataSize && !elem->data) { goto outOfMemory; } xorg_list_add(&elem->l, bucket); ++ht->elements; memcpy(elem->key, key, ht->keySize); if (ht->elements > 4 * (1 << ht->bucketBits) && ht->bucketBits < MAXHASHSIZE) { if (!double_size(ht)) { --ht->elements; xorg_list_del(&elem->l); goto outOfMemory; } } /* if memory allocation has failed due to dataSize being 0, return a "dummy" pointer pointing at the of the key */ return elem->data ? elem->data : ((char*) elem->key + ht->keySize); outOfMemory: if (elem) { free(elem->key); free(elem->data); free(elem); } return NULL; } void ht_remove(HashTable ht, const void *key) { unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); struct xorg_list *bucket = &ht->buckets[index]; BucketPtr it; xorg_list_for_each_entry(it, bucket, l) { if (ht->compare(ht->cdata, key, it->key) == 0) { xorg_list_del(&it->l); --ht->elements; free(it->key); free(it->data); free(it); return; } } } void * ht_find(HashTable ht, const void *key) { unsigned index = ht->hash(ht->cdata, key, ht->bucketBits); struct xorg_list *bucket = &ht->buckets[index]; BucketPtr it; xorg_list_for_each_entry(it, bucket, l) { if (ht->compare(ht->cdata, key, it->key) == 0) { return it->data ? it->data : ((char*) it->key + ht->keySize); } } return NULL; } void ht_dump_distribution(HashTable ht) { int c; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { BucketPtr it; int n = 0; xorg_list_for_each_entry(it, &ht->buckets[c], l) { ++n; } printf("%d: %d\n", c, n); } } /* Picked the function from http://burtleburtle.net/bob/hash/doobs.html by Bob Jenkins, which is released in public domain */ static CARD32 one_at_a_time_hash(const void *data, int len) { CARD32 hash; int i; const char *key = data; for (hash=0, i=0; i> 6); } hash += (hash << 3); hash ^= (hash >> 11); hash += (hash << 15); return hash; } unsigned ht_generic_hash(void *cdata, const void *ptr, int numBits) { HtGenericHashSetupPtr setup = cdata; return one_at_a_time_hash(ptr, setup->keySize) & ~((~0U) << numBits); } int ht_generic_compare(void *cdata, const void *l, const void *r) { HtGenericHashSetupPtr setup = cdata; return memcmp(l, r, setup->keySize); } unsigned ht_resourceid_hash(void * cdata, const void * data, int numBits) { const XID* idPtr = data; XID id = *idPtr & RESOURCE_ID_MASK; (void) cdata; return HashResourceID(id, numBits); } int ht_resourceid_compare(void* cdata, const void* a, const void* b) { const XID* xa = a; const XID* xb = b; (void) cdata; return *xa < *xb ? -1 : *xa > *xb ? 1 : 0; } void ht_dump_contents(HashTable ht, void (*print_key)(void *opaque, void *key), void (*print_value)(void *opaque, void *value), void* opaque) { int c; int numBuckets = 1 << ht->bucketBits; for (c = 0; c < numBuckets; ++c) { BucketPtr it; int n = 0; printf("%d: ", c); xorg_list_for_each_entry(it, &ht->buckets[c], l) { if (n > 0) { printf(", "); } print_key(opaque, it->key); printf("->"); print_value(opaque, it->data); ++n; } printf("\n"); } } xorg-server-21.1.16/Xext/hashtable.h0000644000175000017500000001303714757411105012673 #ifndef HASHTABLE_H #define HASHTABLE_H 1 #include #include #include #include "list.h" /** @brief A hashing function. @param[in/out] cdata Opaque data that can be passed to HtInit that will eventually end up here @param[in] ptr The data to be hashed. The size of the data, if needed, can be configured via a record that can be passed via cdata. @param[in] numBits The number of bits this hash needs to have in the resulting hash @return A numBits-bit hash of the data */ typedef unsigned (*HashFunc)(void * cdata, const void * ptr, int numBits); /** @brief A comparison function for hashed keys. @param[in/out] cdata Opaque data that ca be passed to Htinit that will eventually end up here @param[in] l The left side data to be compared @param[in] r The right side data to be compared @return -1 if l < r, 0 if l == r, 1 if l > r */ typedef int (*HashCompareFunc)(void * cdata, const void * l, const void * r); struct HashTableRec; typedef struct HashTableRec *HashTable; /** @brief A configuration for HtGenericHash */ typedef struct { int keySize; } HtGenericHashSetupRec, *HtGenericHashSetupPtr; /** @brief ht_create initializes a hash table for a certain hash table configuration @param[out] ht The hash table structure to initialize @param[in] keySize The key size in bytes @param[in] dataSize The data size in bytes @param[in] hash The hash function to use for hashing keys @param[in] compare The comparison function for hashing keys @param[in] cdata Opaque data that will be passed to hash and comparison functions */ extern _X_EXPORT HashTable ht_create(int keySize, int dataSize, HashFunc hash, HashCompareFunc compare, void *cdata); /** @brief HtDestruct deinitializes the structure. It does not free the memory allocated to HashTableRec */ extern _X_EXPORT void ht_destroy(HashTable ht); /** @brief Adds a new key to the hash table. The key will be copied and a pointer to the value will be returned. The data will be initialized with zeroes. @param[in/out] ht The hash table @param[key] key The key. The contents of the key will be copied. @return On error NULL is returned, otherwise a pointer to the data associated with the newly inserted key. @note If dataSize is 0, a pointer to the end of the key may be returned to avoid returning NULL. Obviously the data pointed cannot be modified, as implied by dataSize being 0. */ extern _X_EXPORT void *ht_add(HashTable ht, const void *key); /** @brief Removes a key from the hash table along with its associated data, which will be free'd. */ extern _X_EXPORT void ht_remove(HashTable ht, const void *key); /** @brief Finds the associated data of a key from the hash table. @return If the key cannot be found, the function returns NULL. Otherwise it returns a pointer to the data associated with the key. @note If dataSize == 0, this function may return NULL even if the key has been inserted! If dataSize == NULL, use HtMember instead to determine if a key has been inserted. */ extern _X_EXPORT void *ht_find(HashTable ht, const void *key); /** @brief A generic hash function */ extern _X_EXPORT unsigned ht_generic_hash(void *cdata, const void *ptr, int numBits); /** @brief A generic comparison function. It compares data byte-wise. */ extern _X_EXPORT int ht_generic_compare(void *cdata, const void *l, const void *r); /** @brief A debugging function that dumps the distribution of the hash table: for each bucket, list the number of elements contained within. */ extern _X_EXPORT void ht_dump_distribution(HashTable ht); /** @brief A debugging function that dumps the contents of the hash table: for each bucket, list the elements contained within. */ extern _X_EXPORT void ht_dump_contents(HashTable ht, void (*print_key)(void *opaque, void *key), void (*print_value)(void *opaque, void *value), void* opaque); /** @brief A hashing function to be used for hashing resource IDs when used with HashTables. It makes no use of cdata, so that can be NULL. It uses HashXID underneath, and should HashXID be unable to hash the value, it switches into using the generic hash function. */ extern _X_EXPORT unsigned ht_resourceid_hash(void *cdata, const void * data, int numBits); /** @brief A comparison function to be used for comparing resource IDs when used with HashTables. It makes no use of cdata, so that can be NULL. */ extern _X_EXPORT int ht_resourceid_compare(void *cdata, const void *a, const void *b); #endif // HASHTABLE_H xorg-server-21.1.16/xfixes/0000755000175000017500000000000014757411133011222 5xorg-server-21.1.16/xfixes/meson.build0000644000175000017500000000037714757411105013312 srcs_xfixes = [ 'cursor.c', 'disconnect.c', 'region.c', 'saveset.c', 'select.c', 'xfixes.c', ] libxserver_xfixes = static_library('libxserver_xfixes', srcs_xfixes, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/xfixes/Makefile.am0000644000175000017500000000027614757411105013202 noinst_LTLIBRARIES = libxfixes.la AM_CFLAGS = $(DIX_CFLAGS) libxfixes_la_SOURCES = \ cursor.c \ disconnect.c \ region.c \ saveset.c \ select.c \ xfixes.c \ xfixes.h \ xfixesint.h xorg-server-21.1.16/xfixes/Makefile.in0000644000175000017500000006261714757411116013224 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = xfixes ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxfixes_la_LIBADD = am_libxfixes_la_OBJECTS = cursor.lo disconnect.lo region.lo saveset.lo \ select.lo xfixes.lo libxfixes_la_OBJECTS = $(am_libxfixes_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/cursor.Plo \ ./$(DEPDIR)/disconnect.Plo ./$(DEPDIR)/region.Plo \ ./$(DEPDIR)/saveset.Plo ./$(DEPDIR)/select.Plo \ ./$(DEPDIR)/xfixes.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxfixes_la_SOURCES) DIST_SOURCES = $(libxfixes_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxfixes.la AM_CFLAGS = $(DIX_CFLAGS) libxfixes_la_SOURCES = \ cursor.c \ disconnect.c \ region.c \ saveset.c \ select.c \ xfixes.c \ xfixes.h \ xfixesint.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xfixes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign xfixes/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxfixes.la: $(libxfixes_la_OBJECTS) $(libxfixes_la_DEPENDENCIES) $(EXTRA_libxfixes_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxfixes_la_OBJECTS) $(libxfixes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cursor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/disconnect.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/saveset.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xfixes.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/cursor.Plo -rm -f ./$(DEPDIR)/disconnect.Plo -rm -f ./$(DEPDIR)/region.Plo -rm -f ./$(DEPDIR)/saveset.Plo -rm -f ./$(DEPDIR)/select.Plo -rm -f ./$(DEPDIR)/xfixes.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/cursor.Plo -rm -f ./$(DEPDIR)/disconnect.Plo -rm -f ./$(DEPDIR)/region.Plo -rm -f ./$(DEPDIR)/saveset.Plo -rm -f ./$(DEPDIR)/select.Plo -rm -f ./$(DEPDIR)/xfixes.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/xfixes/cursor.c0000644000175000017500000007423414757411105012634 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Copyright © 2002 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 #endif #include "xfixesint.h" #include "scrnintstr.h" #include "cursorstr.h" #include "dixevents.h" #include "servermd.h" #include "mipointer.h" #include "inputstr.h" #include "windowstr.h" #include "xace.h" #include "list.h" #include "xibarriers.h" static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; static RESTYPE CursorWindowType; static DevPrivateKeyRec CursorScreenPrivateKeyRec; #define CursorScreenPrivateKey (&CursorScreenPrivateKeyRec) static void deleteCursorHideCountsForScreen(ScreenPtr pScreen); #define VERIFY_CURSOR(pCursor, cursor, client, access) \ do { \ int err; \ err = dixLookupResourceByType((void **) &pCursor, cursor, \ RT_CURSOR, client, access); \ if (err != Success) { \ client->errorValue = cursor; \ return err; \ } \ } while (0) /* * There is a global list of windows selecting for cursor events */ typedef struct _CursorEvent *CursorEventPtr; typedef struct _CursorEvent { CursorEventPtr next; CARD32 eventMask; ClientPtr pClient; WindowPtr pWindow; XID clientResource; } CursorEventRec; static CursorEventPtr cursorEvents; /* * Each screen has a list of clients which have requested * that the cursor be hid, and the number of times each * client has requested. */ typedef struct _CursorHideCountRec *CursorHideCountPtr; typedef struct _CursorHideCountRec { CursorHideCountPtr pNext; ClientPtr pClient; ScreenPtr pScreen; int hideCount; XID resource; } CursorHideCountRec; /* * Wrap DisplayCursor to catch cursor change events */ typedef struct _CursorScreen { DisplayCursorProcPtr DisplayCursor; CloseScreenProcPtr CloseScreen; CursorHideCountPtr pCursorHideCounts; } CursorScreenRec, *CursorScreenPtr; #define GetCursorScreen(s) ((CursorScreenPtr)dixLookupPrivate(&(s)->devPrivates, CursorScreenPrivateKey)) #define GetCursorScreenIfSet(s) GetCursorScreen(s) #define SetCursorScreen(s,p) dixSetPrivate(&(s)->devPrivates, CursorScreenPrivateKey, p) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) #define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt) /* The cursor doesn't show up until the first XDefineCursor() */ Bool CursorVisible = FALSE; Bool EnableCursor = TRUE; static CursorPtr CursorForDevice(DeviceIntPtr pDev) { if (pDev && pDev->spriteInfo && pDev->spriteInfo->sprite) { if (pDev->spriteInfo->anim.pCursor) return pDev->spriteInfo->anim.pCursor; return pDev->spriteInfo->sprite->current; } return NULL; } static CursorPtr CursorForClient(ClientPtr client) { return CursorForDevice(PickPointer(client)); } static Bool CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { CursorScreenPtr cs = GetCursorScreen(pScreen); CursorPtr pOldCursor = CursorForDevice(pDev); Bool ret; DisplayCursorProcPtr backupProc; Unwrap(cs, pScreen, DisplayCursor, backupProc); CursorVisible = CursorVisible && EnableCursor; if (cs->pCursorHideCounts != NULL || !CursorVisible) { ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor); } else { ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } if (pCursor != pOldCursor) { CursorEventPtr e; UpdateCurrentTimeIf(); for (e = cursorEvents; e; e = e->next) { if ((e->eventMask & XFixesDisplayCursorNotifyMask)) { xXFixesCursorNotifyEvent ev = { .type = XFixesEventBase + XFixesCursorNotify, .subtype = XFixesDisplayCursorNotify, .window = e->pWindow->drawable.id, .cursorSerial = pCursor ? pCursor->serialNumber : 0, .timestamp = currentTime.milliseconds, .name = pCursor ? pCursor->name : None }; WriteEventsToClient(e->pClient, 1, (xEvent *) &ev); } } } Wrap(cs, pScreen, DisplayCursor, backupProc); return ret; } static Bool CursorCloseScreen(ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen(pScreen); Bool ret; _X_UNUSED CloseScreenProcPtr close_proc; _X_UNUSED DisplayCursorProcPtr display_proc; Unwrap(cs, pScreen, CloseScreen, close_proc); Unwrap(cs, pScreen, DisplayCursor, display_proc); deleteCursorHideCountsForScreen(pScreen); ret = (*pScreen->CloseScreen) (pScreen); free(cs); return ret; } #define CursorAllEvents (XFixesDisplayCursorNotifyMask) static int XFixesSelectCursorInput(ClientPtr pClient, WindowPtr pWindow, CARD32 eventMask) { CursorEventPtr *prev, e; void *val; int rc; for (prev = &cursorEvents; (e = *prev); prev = &e->next) { if (e->pClient == pClient && e->pWindow == pWindow) { break; } } if (!eventMask) { if (e) { FreeResource(e->clientResource, 0); } return Success; } if (!e) { e = (CursorEventPtr) malloc(sizeof(CursorEventRec)); if (!e) return BadAlloc; e->next = 0; e->pClient = pClient; e->pWindow = pWindow; e->clientResource = FakeClientID(pClient->index); /* * Add a resource hanging from the window to * catch window destroy */ rc = dixLookupResourceByType(&val, pWindow->drawable.id, CursorWindowType, serverClient, DixGetAttrAccess); if (rc != Success) if (!AddResource(pWindow->drawable.id, CursorWindowType, (void *) pWindow)) { free(e); return BadAlloc; } if (!AddResource(e->clientResource, CursorClientType, (void *) e)) return BadAlloc; *prev = e; } e->eventMask = eventMask; return Success; } int ProcXFixesSelectCursorInput(ClientPtr client) { REQUEST(xXFixesSelectCursorInputReq); WindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~CursorAllEvents) { client->errorValue = stuff->eventMask; return BadValue; } return XFixesSelectCursorInput(client, pWin, stuff->eventMask); } static int GetBit(unsigned char *line, int x) { unsigned char mask; if (screenInfo.bitmapBitOrder == LSBFirst) mask = (1 << (x & 7)); else mask = (0x80 >> (x & 7)); /* XXX assumes byte order is host byte order */ line += (x >> 3); if (*line & mask) return 1; return 0; } int _X_COLD SProcXFixesSelectCursorInput(ClientPtr client) { REQUEST(xXFixesSelectCursorInputReq); REQUEST_SIZE_MATCH(xXFixesSelectCursorInputReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->eventMask); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } void _X_COLD SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from, xXFixesCursorNotifyEvent * to) { to->type = from->type; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->window, to->window); cpswapl(from->cursorSerial, to->cursorSerial); cpswapl(from->timestamp, to->timestamp); cpswapl(from->name, to->name); } static void CopyCursorToImage(CursorPtr pCursor, CARD32 *image) { int width = pCursor->bits->width; int height = pCursor->bits->height; int npixels = width * height; if (pCursor->bits->argb) memcpy(image, pCursor->bits->argb, npixels * sizeof(CARD32)); else { unsigned char *srcLine = pCursor->bits->source; unsigned char *mskLine = pCursor->bits->mask; int stride = BitmapBytePad(width); int x, y; CARD32 fg, bg; fg = (0xff000000 | ((pCursor->foreRed & 0xff00) << 8) | (pCursor->foreGreen & 0xff00) | (pCursor->foreBlue >> 8)); bg = (0xff000000 | ((pCursor->backRed & 0xff00) << 8) | (pCursor->backGreen & 0xff00) | (pCursor->backBlue >> 8)); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { if (GetBit(mskLine, x)) { if (GetBit(srcLine, x)) *image++ = fg; else *image++ = bg; } else *image++ = 0; } srcLine += stride; mskLine += stride; } } } int ProcXFixesGetCursorImage(ClientPtr client) { /* REQUEST(xXFixesGetCursorImageReq); */ xXFixesGetCursorImageReply *rep; CursorPtr pCursor; CARD32 *image; int npixels, width, height, rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageReq); pCursor = CursorForClient(client); if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, pCursor, RT_NONE, NULL, DixReadAccess); if (rc != Success) return rc; GetSpritePosition(PickPointer(client), &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; rep = calloc(sizeof(xXFixesGetCursorImageReply) + npixels * sizeof(CARD32), 1); if (!rep) return BadAlloc; rep->type = X_Reply; rep->sequenceNumber = client->sequence; rep->length = npixels; rep->width = width; rep->height = height; rep->x = x; rep->y = y; rep->xhot = pCursor->bits->xhot; rep->yhot = pCursor->bits->yhot; rep->cursorSerial = pCursor->serialNumber; image = (CARD32 *) (rep + 1); CopyCursorToImage(pCursor, image); if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->x); swaps(&rep->y); swaps(&rep->width); swaps(&rep->height); swaps(&rep->xhot); swaps(&rep->yhot); swapl(&rep->cursorSerial); SwapLongs(image, npixels); } WriteToClient(client, sizeof(xXFixesGetCursorImageReply) + (npixels << 2), rep); free(rep); return Success; } int _X_COLD SProcXFixesGetCursorImage(ClientPtr client) { REQUEST(xXFixesGetCursorImageReq); swaps(&stuff->length); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesSetCursorName(ClientPtr client) { CursorPtr pCursor; char *tchar; REQUEST(xXFixesSetCursorNameReq); Atom atom; REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess); tchar = (char *) &stuff[1]; atom = MakeAtom(tchar, stuff->nbytes, TRUE); if (atom == BAD_RESOURCE) return BadAlloc; pCursor->name = atom; return Success; } int _X_COLD SProcXFixesSetCursorName(ClientPtr client) { REQUEST(xXFixesSetCursorNameReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXFixesSetCursorNameReq); swapl(&stuff->cursor); swaps(&stuff->nbytes); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesGetCursorName(ClientPtr client) { CursorPtr pCursor; xXFixesGetCursorNameReply reply; REQUEST(xXFixesGetCursorNameReq); const char *str; int len; REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); VERIFY_CURSOR(pCursor, stuff->cursor, client, DixGetAttrAccess); if (pCursor->name) str = NameForAtom(pCursor->name); else str = ""; len = strlen(str); reply = (xXFixesGetCursorNameReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(len), .atom = pCursor->name, .nbytes = len }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.length); swapl(&reply.atom); swaps(&reply.nbytes); } WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply); WriteToClient(client, len, str); return Success; } int _X_COLD SProcXFixesGetCursorName(ClientPtr client) { REQUEST(xXFixesGetCursorNameReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesGetCursorNameReq); swapl(&stuff->cursor); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesGetCursorImageAndName(ClientPtr client) { /* REQUEST(xXFixesGetCursorImageAndNameReq); */ xXFixesGetCursorImageAndNameReply *rep; CursorPtr pCursor; CARD32 *image; int npixels; const char *name; int nbytes, nbytesRound; int width, height; int rc, x, y; REQUEST_SIZE_MATCH(xXFixesGetCursorImageAndNameReq); pCursor = CursorForClient(client); if (!pCursor) return BadCursor; rc = XaceHook(XACE_RESOURCE_ACCESS, client, pCursor->id, RT_CURSOR, pCursor, RT_NONE, NULL, DixReadAccess | DixGetAttrAccess); if (rc != Success) return rc; GetSpritePosition(PickPointer(client), &x, &y); width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; name = pCursor->name ? NameForAtom(pCursor->name) : ""; nbytes = strlen(name); nbytesRound = pad_to_int32(nbytes); rep = calloc(sizeof(xXFixesGetCursorImageAndNameReply) + npixels * sizeof(CARD32) + nbytesRound, 1); if (!rep) return BadAlloc; rep->type = X_Reply; rep->sequenceNumber = client->sequence; rep->length = npixels + bytes_to_int32(nbytesRound); rep->width = width; rep->height = height; rep->x = x; rep->y = y; rep->xhot = pCursor->bits->xhot; rep->yhot = pCursor->bits->yhot; rep->cursorSerial = pCursor->serialNumber; rep->cursorName = pCursor->name; rep->nbytes = nbytes; image = (CARD32 *) (rep + 1); CopyCursorToImage(pCursor, image); memcpy((image + npixels), name, nbytes); if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->x); swaps(&rep->y); swaps(&rep->width); swaps(&rep->height); swaps(&rep->xhot); swaps(&rep->yhot); swapl(&rep->cursorSerial); swapl(&rep->cursorName); swaps(&rep->nbytes); SwapLongs(image, npixels); } WriteToClient(client, sizeof(xXFixesGetCursorImageAndNameReply) + (npixels << 2) + nbytesRound, rep); free(rep); return Success; } int _X_COLD SProcXFixesGetCursorImageAndName(ClientPtr client) { REQUEST(xXFixesGetCursorImageAndNameReq); swaps(&stuff->length); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } /* * Find every cursor reference in the system, ask testCursor * whether it should be replaced with a reference to pCursor. */ typedef Bool (*TestCursorFunc) (CursorPtr pOld, void *closure); typedef struct { RESTYPE type; TestCursorFunc testCursor; CursorPtr pNew; void *closure; } ReplaceCursorLookupRec, *ReplaceCursorLookupPtr; static const RESTYPE CursorRestypes[] = { RT_WINDOW, RT_PASSIVEGRAB, RT_CURSOR }; static Bool ReplaceCursorLookup(void *value, XID id, void *closure) { ReplaceCursorLookupPtr rcl = (ReplaceCursorLookupPtr) closure; WindowPtr pWin; GrabPtr pGrab; CursorPtr pCursor = 0, *pCursorRef = 0; XID cursor = 0; switch (rcl->type) { case RT_WINDOW: pWin = (WindowPtr) value; if (pWin->optional) { pCursorRef = &pWin->optional->cursor; pCursor = *pCursorRef; } break; case RT_PASSIVEGRAB: pGrab = (GrabPtr) value; pCursorRef = &pGrab->cursor; pCursor = *pCursorRef; break; case RT_CURSOR: pCursorRef = 0; pCursor = (CursorPtr) value; cursor = id; break; } if (pCursor && pCursor != rcl->pNew) { if ((*rcl->testCursor) (pCursor, rcl->closure)) { CursorPtr curs = RefCursor(rcl->pNew); /* either redirect reference or update resource database */ if (pCursorRef) *pCursorRef = curs; else ChangeResourceValue(id, RT_CURSOR, curs); FreeCursor(pCursor, cursor); } } return FALSE; /* keep walking */ } static void ReplaceCursor(CursorPtr pCursor, TestCursorFunc testCursor, void *closure) { int clientIndex; int resIndex; ReplaceCursorLookupRec rcl; /* * Cursors exist only in the resource database, windows and grabs. * All of these are always pointed at by the resource database. Walk * the whole thing looking for cursors */ rcl.testCursor = testCursor; rcl.pNew = pCursor; rcl.closure = closure; /* for each client */ for (clientIndex = 0; clientIndex < currentMaxClients; clientIndex++) { if (!clients[clientIndex]) continue; for (resIndex = 0; resIndex < ARRAY_SIZE(CursorRestypes); resIndex++) { rcl.type = CursorRestypes[resIndex]; /* * This function walks the entire client resource database */ LookupClientResourceComplex(clients[clientIndex], rcl.type, ReplaceCursorLookup, (void *) &rcl); } } /* this "knows" that WindowHasNewCursor doesn't depend on its argument */ WindowHasNewCursor(screenInfo.screens[0]->root); } static Bool TestForCursor(CursorPtr pCursor, void *closure) { return (pCursor == (CursorPtr) closure); } int ProcXFixesChangeCursor(ClientPtr client) { CursorPtr pSource, pDestination; REQUEST(xXFixesChangeCursorReq); REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess | DixGetAttrAccess); VERIFY_CURSOR(pDestination, stuff->destination, client, DixWriteAccess | DixSetAttrAccess); ReplaceCursor(pSource, TestForCursor, (void *) pDestination); return Success; } int _X_COLD SProcXFixesChangeCursor(ClientPtr client) { REQUEST(xXFixesChangeCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesChangeCursorReq); swapl(&stuff->source); swapl(&stuff->destination); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } static Bool TestForCursorName(CursorPtr pCursor, void *closure) { Atom *pName = closure; return pCursor->name == *pName; } int ProcXFixesChangeCursorByName(ClientPtr client) { CursorPtr pSource; Atom name; char *tchar; REQUEST(xXFixesChangeCursorByNameReq); REQUEST_FIXED_SIZE(xXFixesChangeCursorByNameReq, stuff->nbytes); VERIFY_CURSOR(pSource, stuff->source, client, DixReadAccess | DixGetAttrAccess); tchar = (char *) &stuff[1]; name = MakeAtom(tchar, stuff->nbytes, FALSE); if (name) ReplaceCursor(pSource, TestForCursorName, &name); return Success; } int _X_COLD SProcXFixesChangeCursorByName(ClientPtr client) { REQUEST(xXFixesChangeCursorByNameReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXFixesChangeCursorByNameReq); swapl(&stuff->source); swaps(&stuff->nbytes); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } /* * Routines for manipulating the per-screen hide counts list. * This list indicates which clients have requested cursor hiding * for that screen. */ /* Return the screen's hide-counts list element for the given client */ static CursorHideCountPtr findCursorHideCount(ClientPtr pClient, ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc; for (pChc = cs->pCursorHideCounts; pChc != NULL; pChc = pChc->pNext) { if (pChc->pClient == pClient) { return pChc; } } return NULL; } static int createCursorHideCount(ClientPtr pClient, ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc; pChc = (CursorHideCountPtr) malloc(sizeof(CursorHideCountRec)); if (pChc == NULL) { return BadAlloc; } pChc->pClient = pClient; pChc->pScreen = pScreen; pChc->hideCount = 1; pChc->resource = FakeClientID(pClient->index); pChc->pNext = cs->pCursorHideCounts; cs->pCursorHideCounts = pChc; /* * Create a resource for this element so it can be deleted * when the client goes away. */ if (!AddResource(pChc->resource, CursorHideCountType, (void *) pChc)) return BadAlloc; return Success; } /* * Delete the given hide-counts list element from its screen list. */ static void deleteCursorHideCount(CursorHideCountPtr pChcToDel, ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc, pNext; CursorHideCountPtr pChcLast = NULL; pChc = cs->pCursorHideCounts; while (pChc != NULL) { pNext = pChc->pNext; if (pChc == pChcToDel) { free(pChc); if (pChcLast == NULL) { cs->pCursorHideCounts = pNext; } else { pChcLast->pNext = pNext; } return; } pChcLast = pChc; pChc = pNext; } } /* * Delete all the hide-counts list elements for this screen. */ static void deleteCursorHideCountsForScreen(ScreenPtr pScreen) { CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc, pTmp; pChc = cs->pCursorHideCounts; while (pChc != NULL) { pTmp = pChc->pNext; FreeResource(pChc->resource, 0); pChc = pTmp; } cs->pCursorHideCounts = NULL; } int ProcXFixesHideCursor(ClientPtr client) { WindowPtr pWin; CursorHideCountPtr pChc; REQUEST(xXFixesHideCursorReq); int ret; REQUEST_SIZE_MATCH(xXFixesHideCursorReq); ret = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (ret != Success) { client->errorValue = stuff->window; return ret; } /* * Has client hidden the cursor before on this screen? * If so, just increment the count. */ pChc = findCursorHideCount(client, pWin->drawable.pScreen); if (pChc != NULL) { pChc->hideCount++; return Success; } /* * This is the first time this client has hid the cursor * for this screen. */ ret = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, DixHideAccess); if (ret != Success) return ret; ret = createCursorHideCount(client, pWin->drawable.pScreen); if (ret == Success) { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsMaster(dev) && IsPointerDevice(dev)) CursorDisplayCursor(dev, pWin->drawable.pScreen, CursorForDevice(dev)); } } return ret; } int _X_COLD SProcXFixesHideCursor(ClientPtr client) { REQUEST(xXFixesHideCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesHideCursorReq); swapl(&stuff->window); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesShowCursor(ClientPtr client) { WindowPtr pWin; CursorHideCountPtr pChc; int rc; REQUEST(xXFixesShowCursorReq); REQUEST_SIZE_MATCH(xXFixesShowCursorReq); rc = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; return rc; } /* * Has client hidden the cursor on this screen? * If not, generate an error. */ pChc = findCursorHideCount(client, pWin->drawable.pScreen); if (pChc == NULL) { return BadMatch; } rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, DixShowAccess); if (rc != Success) return rc; pChc->hideCount--; if (pChc->hideCount <= 0) { FreeResource(pChc->resource, 0); } return Success; } int _X_COLD SProcXFixesShowCursor(ClientPtr client) { REQUEST(xXFixesShowCursorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesShowCursorReq); swapl(&stuff->window); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } static int CursorFreeClient(void *data, XID id) { CursorEventPtr old = (CursorEventPtr) data; CursorEventPtr *prev, e; for (prev = &cursorEvents; (e = *prev); prev = &e->next) { if (e == old) { *prev = e->next; free(e); break; } } return 1; } static int CursorFreeHideCount(void *data, XID id) { CursorHideCountPtr pChc = (CursorHideCountPtr) data; ScreenPtr pScreen = pChc->pScreen; DeviceIntPtr dev; deleteCursorHideCount(pChc, pChc->pScreen); for (dev = inputInfo.devices; dev; dev = dev->next) { if (IsMaster(dev) && IsPointerDevice(dev)) CursorDisplayCursor(dev, pScreen, CursorForDevice(dev)); } return 1; } static int CursorFreeWindow(void *data, XID id) { WindowPtr pWindow = (WindowPtr) data; CursorEventPtr e, next; for (e = cursorEvents; e; e = next) { next = e->next; if (e->pWindow == pWindow) { FreeResource(e->clientResource, 0); } } return 1; } int ProcXFixesCreatePointerBarrier(ClientPtr client) { REQUEST(xXFixesCreatePointerBarrierReq); REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices * sizeof(CARD16))); LEGAL_NEW_RESOURCE(stuff->barrier, client); return XICreatePointerBarrier(client, stuff); } int _X_COLD SProcXFixesCreatePointerBarrier(ClientPtr client) { REQUEST(xXFixesCreatePointerBarrierReq); int i; CARD16 *in_devices = (CARD16 *) &stuff[1]; REQUEST_AT_LEAST_SIZE(xXFixesCreatePointerBarrierReq); swaps(&stuff->length); swaps(&stuff->num_devices); REQUEST_FIXED_SIZE(xXFixesCreatePointerBarrierReq, pad_to_int32(stuff->num_devices * sizeof(CARD16))); swapl(&stuff->barrier); swapl(&stuff->window); swaps(&stuff->x1); swaps(&stuff->y1); swaps(&stuff->x2); swaps(&stuff->y2); swapl(&stuff->directions); for (i = 0; i < stuff->num_devices; i++) { swaps(in_devices + i); } return ProcXFixesVector[stuff->xfixesReqType] (client); } int ProcXFixesDestroyPointerBarrier(ClientPtr client) { REQUEST(xXFixesDestroyPointerBarrierReq); REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); return XIDestroyPointerBarrier(client, stuff); } int _X_COLD SProcXFixesDestroyPointerBarrier(ClientPtr client) { REQUEST(xXFixesDestroyPointerBarrierReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesDestroyPointerBarrierReq); swapl(&stuff->barrier); return ProcXFixesVector[stuff->xfixesReqType] (client); } Bool XFixesCursorInit(void) { int i; if (party_like_its_1989) CursorVisible = EnableCursor; else CursorVisible = FALSE; if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; CursorScreenPtr cs; cs = (CursorScreenPtr) calloc(1, sizeof(CursorScreenRec)); if (!cs) return FALSE; Wrap(cs, pScreen, CloseScreen, CursorCloseScreen); Wrap(cs, pScreen, DisplayCursor, CursorDisplayCursor); cs->pCursorHideCounts = NULL; SetCursorScreen(pScreen, cs); } CursorClientType = CreateNewResourceType(CursorFreeClient, "XFixesCursorClient"); CursorHideCountType = CreateNewResourceType(CursorFreeHideCount, "XFixesCursorHideCount"); CursorWindowType = CreateNewResourceType(CursorFreeWindow, "XFixesCursorWindow"); return CursorClientType && CursorHideCountType && CursorWindowType; } xorg-server-21.1.16/xfixes/disconnect.c0000644000175000017500000001147014757411105013441 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Copyright © 2002 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 #endif #include "xfixesint.h" #include "opaque.h" static DevPrivateKeyRec ClientDisconnectPrivateKeyRec; #define ClientDisconnectPrivateKey (&ClientDisconnectPrivateKeyRec) typedef struct _ClientDisconnect { int disconnect_mode; } ClientDisconnectRec, *ClientDisconnectPtr; #define GetClientDisconnect(s) \ ((ClientDisconnectPtr) dixLookupPrivate(&(s)->devPrivates, \ ClientDisconnectPrivateKey)) int ProcXFixesSetClientDisconnectMode(ClientPtr client) { ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); REQUEST(xXFixesSetClientDisconnectModeReq); pDisconnect->disconnect_mode = stuff->disconnect_mode; return Success; } int _X_COLD SProcXFixesSetClientDisconnectMode(ClientPtr client) { REQUEST(xXFixesSetClientDisconnectModeReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXFixesSetClientDisconnectModeReq); swapl(&stuff->disconnect_mode); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesGetClientDisconnectMode(ClientPtr client) { ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); xXFixesGetClientDisconnectModeReply reply; REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq); reply = (xXFixesGetClientDisconnectModeReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .disconnect_mode = pDisconnect->disconnect_mode, }; if (client->swapped) { swaps(&reply.sequenceNumber); swapl(&reply.disconnect_mode); } WriteToClient(client, sizeof(xXFixesGetClientDisconnectModeReply), &reply); return Success; } int _X_COLD SProcXFixesGetClientDisconnectMode(ClientPtr client) { REQUEST(xXFixesGetClientDisconnectModeReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesGetClientDisconnectModeReq); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } Bool XFixesShouldDisconnectClient(ClientPtr client) { ClientDisconnectPtr pDisconnect = GetClientDisconnect(client); if (!pDisconnect) return FALSE; if (dispatchExceptionAtReset & DE_TERMINATE) return (pDisconnect->disconnect_mode & XFixesClientDisconnectFlagTerminate); return FALSE; } Bool XFixesClientDisconnectInit(void) { if (!dixRegisterPrivateKey(&ClientDisconnectPrivateKeyRec, PRIVATE_CLIENT, sizeof(ClientDisconnectRec))) return FALSE; return TRUE; } xorg-server-21.1.16/xfixes/region.c0000644000175000017500000005723414757411105012603 /* * 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 #endif #include "xfixesint.h" #include "scrnintstr.h" #include #include #include #include RESTYPE RegionResType; static int RegionResFree(void *data, XID id) { RegionPtr pRegion = (RegionPtr) data; RegionDestroy(pRegion); return Success; } RegionPtr XFixesRegionCopy(RegionPtr pRegion) { RegionPtr pNew = RegionCreate(RegionExtents(pRegion), RegionNumRects(pRegion)); if (!pNew) return 0; if (!RegionCopy(pNew, pRegion)) { RegionDestroy(pNew); return 0; } return pNew; } Bool XFixesRegionInit(void) { RegionResType = CreateNewResourceType(RegionResFree, "XFixesRegion"); return RegionResType != 0; } int ProcXFixesCreateRegion(ClientPtr client) { int things; RegionPtr pRegion; REQUEST(xXFixesCreateRegionReq); REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq); LEGAL_NEW_RESOURCE(stuff->region, client); things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq); if (things & 4) return BadLength; things >>= 3; pRegion = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED); if (!pRegion) return BadAlloc; if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCreateRegion(ClientPtr client) { REQUEST(xXFixesCreateRegionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXFixesCreateRegionReq); swapl(&stuff->region); SwapRestS(stuff); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCreateRegionFromBitmap(ClientPtr client) { RegionPtr pRegion; PixmapPtr pPixmap; int rc; REQUEST(xXFixesCreateRegionFromBitmapReq); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupResourceByType((void **) &pPixmap, stuff->bitmap, RT_PIXMAP, client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->bitmap; return rc; } if (pPixmap->drawable.depth != 1) return BadMatch; pRegion = BitmapToRegion(pPixmap->drawable.pScreen, pPixmap); if (!pRegion) return BadAlloc; if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCreateRegionFromBitmap(ClientPtr client) { REQUEST(xXFixesCreateRegionFromBitmapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromBitmapReq); swapl(&stuff->region); swapl(&stuff->bitmap); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCreateRegionFromWindow(ClientPtr client) { RegionPtr pRegion; Bool copy = TRUE; WindowPtr pWin; int rc; REQUEST(xXFixesCreateRegionFromWindowReq); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupResourceByType((void **) &pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; return rc; } switch (stuff->kind) { case WindowRegionBounding: pRegion = wBoundingShape(pWin); if (!pRegion) { pRegion = CreateBoundingShape(pWin); copy = FALSE; } break; case WindowRegionClip: pRegion = wClipShape(pWin); if (!pRegion) { pRegion = CreateClipShape(pWin); copy = FALSE; } break; default: client->errorValue = stuff->kind; return BadValue; } if (copy && pRegion) pRegion = XFixesRegionCopy(pRegion); if (!pRegion) return BadAlloc; if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCreateRegionFromWindow(ClientPtr client) { REQUEST(xXFixesCreateRegionFromWindowReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromWindowReq); swapl(&stuff->region); swapl(&stuff->window); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCreateRegionFromGC(ClientPtr client) { RegionPtr pRegion, pClip; GCPtr pGC; int rc; REQUEST(xXFixesCreateRegionFromGCReq); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq); LEGAL_NEW_RESOURCE(stuff->region, client); rc = dixLookupGC(&pGC, stuff->gc, client, DixGetAttrAccess); if (rc != Success) return rc; if (pGC->clientClip) { pClip = (RegionPtr) pGC->clientClip; pRegion = XFixesRegionCopy(pClip); if (!pRegion) return BadAlloc; } else { return BadMatch; } if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCreateRegionFromGC(ClientPtr client) { REQUEST(xXFixesCreateRegionFromGCReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromGCReq); swapl(&stuff->region); swapl(&stuff->gc); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCreateRegionFromPicture(ClientPtr client) { RegionPtr pRegion; PicturePtr pPicture; REQUEST(xXFixesCreateRegionFromPictureReq); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq); LEGAL_NEW_RESOURCE(stuff->region, client); VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess); if (!pPicture->pDrawable) return RenderErrBase + BadPicture; if (pPicture->clientClip) { pRegion = XFixesRegionCopy((RegionPtr) pPicture->clientClip); if (!pRegion) return BadAlloc; } else { return BadMatch; } if (!AddResource(stuff->region, RegionResType, (void *) pRegion)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCreateRegionFromPicture(ClientPtr client) { REQUEST(xXFixesCreateRegionFromPictureReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCreateRegionFromPictureReq); swapl(&stuff->region); swapl(&stuff->picture); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesDestroyRegion(ClientPtr client) { REQUEST(xXFixesDestroyRegionReq); RegionPtr pRegion; REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); FreeResource(stuff->region, RT_NONE); return Success; } int _X_COLD SProcXFixesDestroyRegion(ClientPtr client) { REQUEST(xXFixesDestroyRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); swapl(&stuff->region); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesSetRegion(ClientPtr client) { int things; RegionPtr pRegion, pNew; REQUEST(xXFixesSetRegionReq); REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); things = (client->req_len << 2) - sizeof(xXFixesCreateRegionReq); if (things & 4) return BadLength; things >>= 3; pNew = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED); if (!pNew) return BadAlloc; if (!RegionCopy(pRegion, pNew)) { RegionDestroy(pNew); return BadAlloc; } RegionDestroy(pNew); return Success; } int _X_COLD SProcXFixesSetRegion(ClientPtr client) { REQUEST(xXFixesSetRegionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXFixesSetRegionReq); swapl(&stuff->region); SwapRestS(stuff); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCopyRegion(ClientPtr client) { RegionPtr pSource, pDestination; REQUEST(xXFixesCopyRegionReq); REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); if (!RegionCopy(pDestination, pSource)) return BadAlloc; return Success; } int _X_COLD SProcXFixesCopyRegion(ClientPtr client) { REQUEST(xXFixesCopyRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCopyRegionReq); swapl(&stuff->source); swapl(&stuff->destination); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesCombineRegion(ClientPtr client) { RegionPtr pSource1, pSource2, pDestination; REQUEST(xXFixesCombineRegionReq); REQUEST_SIZE_MATCH(xXFixesCombineRegionReq); VERIFY_REGION(pSource1, stuff->source1, client, DixReadAccess); VERIFY_REGION(pSource2, stuff->source2, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); switch (stuff->xfixesReqType) { case X_XFixesUnionRegion: if (!RegionUnion(pDestination, pSource1, pSource2)) return BadAlloc; break; case X_XFixesIntersectRegion: if (!RegionIntersect(pDestination, pSource1, pSource2)) return BadAlloc; break; case X_XFixesSubtractRegion: if (!RegionSubtract(pDestination, pSource1, pSource2)) return BadAlloc; break; } return Success; } int _X_COLD SProcXFixesCombineRegion(ClientPtr client) { REQUEST(xXFixesCombineRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesCombineRegionReq); swapl(&stuff->source1); swapl(&stuff->source2); swapl(&stuff->destination); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesInvertRegion(ClientPtr client) { RegionPtr pSource, pDestination; BoxRec bounds; REQUEST(xXFixesInvertRegionReq); REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); /* Compute bounds, limit to 16 bits */ bounds.x1 = stuff->x; bounds.y1 = stuff->y; if ((int) stuff->x + (int) stuff->width > MAXSHORT) bounds.x2 = MAXSHORT; else bounds.x2 = stuff->x + stuff->width; if ((int) stuff->y + (int) stuff->height > MAXSHORT) bounds.y2 = MAXSHORT; else bounds.y2 = stuff->y + stuff->height; if (!RegionInverse(pDestination, pSource, &bounds)) return BadAlloc; return Success; } int _X_COLD SProcXFixesInvertRegion(ClientPtr client) { REQUEST(xXFixesInvertRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); swapl(&stuff->source); swaps(&stuff->x); swaps(&stuff->y); swaps(&stuff->width); swaps(&stuff->height); swapl(&stuff->destination); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesTranslateRegion(ClientPtr client) { RegionPtr pRegion; REQUEST(xXFixesTranslateRegionReq); REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); RegionTranslate(pRegion, stuff->dx, stuff->dy); return Success; } int _X_COLD SProcXFixesTranslateRegion(ClientPtr client) { REQUEST(xXFixesTranslateRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); swapl(&stuff->region); swaps(&stuff->dx); swaps(&stuff->dy); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesRegionExtents(ClientPtr client) { RegionPtr pSource, pDestination; REQUEST(xXFixesRegionExtentsReq); REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); RegionReset(pDestination, RegionExtents(pSource)); return Success; } int _X_COLD SProcXFixesRegionExtents(ClientPtr client) { REQUEST(xXFixesRegionExtentsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesRegionExtentsReq); swapl(&stuff->source); swapl(&stuff->destination); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesFetchRegion(ClientPtr client) { RegionPtr pRegion; xXFixesFetchRegionReply *reply; xRectangle *pRect; BoxPtr pExtent; BoxPtr pBox; int i, nBox; REQUEST(xXFixesFetchRegionReq); REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); pExtent = RegionExtents(pRegion); pBox = RegionRects(pRegion); nBox = RegionNumRects(pRegion); reply = calloc(sizeof(xXFixesFetchRegionReply) + nBox * sizeof(xRectangle), 1); if (!reply) return BadAlloc; reply->type = X_Reply; reply->sequenceNumber = client->sequence; reply->length = nBox << 1; reply->x = pExtent->x1; reply->y = pExtent->y1; reply->width = pExtent->x2 - pExtent->x1; reply->height = pExtent->y2 - pExtent->y1; pRect = (xRectangle *) (reply + 1); for (i = 0; i < nBox; i++) { pRect[i].x = pBox[i].x1; pRect[i].y = pBox[i].y1; pRect[i].width = pBox[i].x2 - pBox[i].x1; pRect[i].height = pBox[i].y2 - pBox[i].y1; } if (client->swapped) { swaps(&reply->sequenceNumber); swapl(&reply->length); swaps(&reply->x); swaps(&reply->y); swaps(&reply->width); swaps(&reply->height); SwapShorts((INT16 *) pRect, nBox * 4); } WriteToClient(client, sizeof(xXFixesFetchRegionReply) + nBox * sizeof(xRectangle), (char *) reply); free(reply); return Success; } int _X_COLD SProcXFixesFetchRegion(ClientPtr client) { REQUEST(xXFixesFetchRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); swapl(&stuff->region); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesSetGCClipRegion(ClientPtr client) { GCPtr pGC; RegionPtr pRegion; ChangeGCVal vals[2]; int rc; REQUEST(xXFixesSetGCClipRegionReq); REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); rc = dixLookupGC(&pGC, stuff->gc, client, DixSetAttrAccess); if (rc != Success) return rc; VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess); if (pRegion) { pRegion = XFixesRegionCopy(pRegion); if (!pRegion) return BadAlloc; } vals[0].val = stuff->xOrigin; vals[1].val = stuff->yOrigin; ChangeGC(NullClient, pGC, GCClipXOrigin | GCClipYOrigin, vals); (*pGC->funcs->ChangeClip) (pGC, pRegion ? CT_REGION : CT_NONE, (void *) pRegion, 0); return Success; } int _X_COLD SProcXFixesSetGCClipRegion(ClientPtr client) { REQUEST(xXFixesSetGCClipRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); swapl(&stuff->gc); swapl(&stuff->region); swaps(&stuff->xOrigin); swaps(&stuff->yOrigin); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } typedef RegionPtr (*CreateDftPtr) (WindowPtr pWin); int ProcXFixesSetWindowShapeRegion(ClientPtr client) { WindowPtr pWin; RegionPtr pRegion; RegionPtr *pDestRegion; int rc; REQUEST(xXFixesSetWindowShapeRegionReq); REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); rc = dixLookupResourceByType((void **) &pWin, stuff->dest, RT_WINDOW, client, DixSetAttrAccess); if (rc != Success) { client->errorValue = stuff->dest; return rc; } VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess); switch (stuff->destKind) { case ShapeBounding: case ShapeClip: case ShapeInput: break; default: client->errorValue = stuff->destKind; return BadValue; } if (pRegion) { pRegion = XFixesRegionCopy(pRegion); if (!pRegion) return BadAlloc; if (!pWin->optional) MakeWindowOptional(pWin); switch (stuff->destKind) { default: case ShapeBounding: pDestRegion = &pWin->optional->boundingShape; break; case ShapeClip: pDestRegion = &pWin->optional->clipShape; break; case ShapeInput: pDestRegion = &pWin->optional->inputShape; break; } if (stuff->xOff || stuff->yOff) RegionTranslate(pRegion, stuff->xOff, stuff->yOff); } else { if (pWin->optional) { switch (stuff->destKind) { default: case ShapeBounding: pDestRegion = &pWin->optional->boundingShape; break; case ShapeClip: pDestRegion = &pWin->optional->clipShape; break; case ShapeInput: pDestRegion = &pWin->optional->inputShape; break; } } else pDestRegion = &pRegion; /* a NULL region pointer */ } if (*pDestRegion) RegionDestroy(*pDestRegion); *pDestRegion = pRegion; (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); SendShapeNotify(pWin, stuff->destKind); return Success; } int _X_COLD SProcXFixesSetWindowShapeRegion(ClientPtr client) { REQUEST(xXFixesSetWindowShapeRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); swapl(&stuff->dest); swaps(&stuff->xOff); swaps(&stuff->yOff); swapl(&stuff->region); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesSetPictureClipRegion(ClientPtr client) { PicturePtr pPicture; RegionPtr pRegion; REQUEST(xXFixesSetPictureClipRegionReq); REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess); if (!pPicture->pDrawable) return RenderErrBase + BadPicture; return SetPictureClipRegion(pPicture, stuff->xOrigin, stuff->yOrigin, pRegion); } int _X_COLD SProcXFixesSetPictureClipRegion(ClientPtr client) { REQUEST(xXFixesSetPictureClipRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); swapl(&stuff->picture); swapl(&stuff->region); swaps(&stuff->xOrigin); swaps(&stuff->yOrigin); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } int ProcXFixesExpandRegion(ClientPtr client) { RegionPtr pSource, pDestination; REQUEST(xXFixesExpandRegionReq); BoxPtr pTmp; BoxPtr pSrc; int nBoxes; int i; REQUEST_SIZE_MATCH(xXFixesExpandRegionReq); VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); nBoxes = RegionNumRects(pSource); pSrc = RegionRects(pSource); if (nBoxes) { pTmp = xallocarray(nBoxes, sizeof(BoxRec)); if (!pTmp) return BadAlloc; for (i = 0; i < nBoxes; i++) { pTmp[i].x1 = pSrc[i].x1 - stuff->left; pTmp[i].x2 = pSrc[i].x2 + stuff->right; pTmp[i].y1 = pSrc[i].y1 - stuff->top; pTmp[i].y2 = pSrc[i].y2 + stuff->bottom; } RegionEmpty(pDestination); for (i = 0; i < nBoxes; i++) { RegionRec r; RegionInit(&r, &pTmp[i], 0); RegionUnion(pDestination, pDestination, &r); } free(pTmp); } return Success; } int _X_COLD SProcXFixesExpandRegion(ClientPtr client) { REQUEST(xXFixesExpandRegionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXFixesExpandRegionReq); swapl(&stuff->source); swapl(&stuff->destination); swaps(&stuff->left); swaps(&stuff->right); swaps(&stuff->top); swaps(&stuff->bottom); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } #ifdef PANORAMIX #include "panoramiX.h" #include "panoramiXsrv.h" int PanoramiXFixesSetGCClipRegion(ClientPtr client) { REQUEST(xXFixesSetGCClipRegionReq); int result = Success, j; PanoramiXRes *gc; REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); if ((result = dixLookupResourceByType((void **) &gc, stuff->gc, XRT_GC, client, DixWriteAccess))) { client->errorValue = stuff->gc; return result; } FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; result = (*PanoramiXSaveXFixesVector[X_XFixesSetGCClipRegion]) (client); if (result != Success) break; } return result; } int PanoramiXFixesSetWindowShapeRegion(ClientPtr client) { int result = Success, j; PanoramiXRes *win; RegionPtr reg = NULL; REQUEST(xXFixesSetWindowShapeRegionReq); REQUEST_SIZE_MATCH(xXFixesSetWindowShapeRegionReq); if ((result = dixLookupResourceByType((void **) &win, stuff->dest, XRT_WINDOW, client, DixWriteAccess))) { client->errorValue = stuff->dest; return result; } if (win->u.win.root) VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess); FOR_NSCREENS_FORWARD(j) { ScreenPtr screen = screenInfo.screens[j]; stuff->dest = win->info[j].id; if (reg) RegionTranslate(reg, -screen->x, -screen->y); result = (*PanoramiXSaveXFixesVector[X_XFixesSetWindowShapeRegion]) (client); if (reg) RegionTranslate(reg, screen->x, screen->y); if (result != Success) break; } return result; } int PanoramiXFixesSetPictureClipRegion(ClientPtr client) { REQUEST(xXFixesSetPictureClipRegionReq); int result = Success, j; PanoramiXRes *pict; RegionPtr reg = NULL; REQUEST_SIZE_MATCH(xXFixesSetPictureClipRegionReq); if ((result = dixLookupResourceByType((void **) &pict, stuff->picture, XRT_PICTURE, client, DixWriteAccess))) { client->errorValue = stuff->picture; return result; } if (pict->u.pict.root) VERIFY_REGION_OR_NONE(reg, stuff->region, client, DixReadAccess); FOR_NSCREENS_BACKWARD(j) { ScreenPtr screen = screenInfo.screens[j]; stuff->picture = pict->info[j].id; if (reg) RegionTranslate(reg, -screen->x, -screen->y); result = (*PanoramiXSaveXFixesVector[X_XFixesSetPictureClipRegion]) (client); if (reg) RegionTranslate(reg, screen->x, screen->y); if (result != Success) break; } return result; } #endif xorg-server-21.1.16/xfixes/saveset.c0000644000175000017500000000473414757411105012767 /* * Copyright © 2002 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 #endif #include "xfixesint.h" int ProcXFixesChangeSaveSet(ClientPtr client) { Bool toRoot, map; int result; WindowPtr pWin; REQUEST(xXFixesChangeSaveSetReq); REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); result = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); if (result != Success) return result; if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) return BadMatch; if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete)) { client->errorValue = stuff->mode; return BadValue; } if ((stuff->target != SaveSetNearest) && (stuff->target != SaveSetRoot)) { client->errorValue = stuff->target; return BadValue; } if ((stuff->map != SaveSetMap) && (stuff->map != SaveSetUnmap)) { client->errorValue = stuff->map; return BadValue; } toRoot = (stuff->target == SaveSetRoot); map = (stuff->map == SaveSetMap); return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map); } int _X_COLD SProcXFixesChangeSaveSet(ClientPtr client) { REQUEST(xXFixesChangeSaveSetReq); REQUEST_SIZE_MATCH(xXFixesChangeSaveSetReq); swaps(&stuff->length); swapl(&stuff->window); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } xorg-server-21.1.16/xfixes/select.c0000644000175000017500000002023714757411105012570 /* * Copyright © 2002 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 #endif #include "xfixesint.h" #include "xace.h" static RESTYPE SelectionClientType, SelectionWindowType; static Bool SelectionCallbackRegistered = FALSE; /* * There is a global list of windows selecting for selection events * on every selection. This should be plenty efficient for the * expected usage, if it does become a problem, it should be easily * replaced with a hash table of some kind keyed off the selection atom */ typedef struct _SelectionEvent *SelectionEventPtr; typedef struct _SelectionEvent { SelectionEventPtr next; Atom selection; CARD32 eventMask; ClientPtr pClient; WindowPtr pWindow; XID clientResource; } SelectionEventRec; static SelectionEventPtr selectionEvents; static void XFixesSelectionCallback(CallbackListPtr *callbacks, void *data, void *args) { SelectionEventPtr e; SelectionInfoRec *info = (SelectionInfoRec *) args; Selection *selection = info->selection; int subtype; CARD32 eventMask; switch (info->kind) { case SelectionSetOwner: subtype = XFixesSetSelectionOwnerNotify; eventMask = XFixesSetSelectionOwnerNotifyMask; break; case SelectionWindowDestroy: subtype = XFixesSelectionWindowDestroyNotify; eventMask = XFixesSelectionWindowDestroyNotifyMask; break; case SelectionClientClose: subtype = XFixesSelectionClientCloseNotify; eventMask = XFixesSelectionClientCloseNotifyMask; break; default: return; } UpdateCurrentTimeIf(); for (e = selectionEvents; e; e = e->next) { if (e->selection == selection->selection && (e->eventMask & eventMask)) { xXFixesSelectionNotifyEvent ev = { .type = XFixesEventBase + XFixesSelectionNotify, .subtype = subtype, .window = e->pWindow->drawable.id, .owner = (subtype == XFixesSetSelectionOwnerNotify) ? selection->window : 0, .selection = e->selection, .timestamp = currentTime.milliseconds, .selectionTimestamp = selection->lastTimeChanged.milliseconds }; WriteEventsToClient(e->pClient, 1, (xEvent *) &ev); } } } static Bool CheckSelectionCallback(void) { if (selectionEvents) { if (!SelectionCallbackRegistered) { if (!AddCallback(&SelectionCallback, XFixesSelectionCallback, NULL)) return FALSE; SelectionCallbackRegistered = TRUE; } } else { if (SelectionCallbackRegistered) { DeleteCallback(&SelectionCallback, XFixesSelectionCallback, NULL); SelectionCallbackRegistered = FALSE; } } return TRUE; } #define SelectionAllEvents (XFixesSetSelectionOwnerNotifyMask |\ XFixesSelectionWindowDestroyNotifyMask |\ XFixesSelectionClientCloseNotifyMask) static int XFixesSelectSelectionInput(ClientPtr pClient, Atom selection, WindowPtr pWindow, CARD32 eventMask) { void *val; int rc; SelectionEventPtr *prev, e; rc = XaceHook(XACE_SELECTION_ACCESS, pClient, selection, DixGetAttrAccess); if (rc != Success) return rc; for (prev = &selectionEvents; (e = *prev); prev = &e->next) { if (e->selection == selection && e->pClient == pClient && e->pWindow == pWindow) { break; } } if (!eventMask) { if (e) { FreeResource(e->clientResource, 0); } return Success; } if (!e) { e = (SelectionEventPtr) malloc(sizeof(SelectionEventRec)); if (!e) return BadAlloc; e->next = 0; e->selection = selection; e->pClient = pClient; e->pWindow = pWindow; e->clientResource = FakeClientID(pClient->index); /* * Add a resource hanging from the window to * catch window destroy */ rc = dixLookupResourceByType(&val, pWindow->drawable.id, SelectionWindowType, serverClient, DixGetAttrAccess); if (rc != Success) if (!AddResource(pWindow->drawable.id, SelectionWindowType, (void *) pWindow)) { free(e); return BadAlloc; } if (!AddResource(e->clientResource, SelectionClientType, (void *) e)) return BadAlloc; *prev = e; if (!CheckSelectionCallback()) { FreeResource(e->clientResource, 0); return BadAlloc; } } e->eventMask = eventMask; return Success; } int ProcXFixesSelectSelectionInput(ClientPtr client) { REQUEST(xXFixesSelectSelectionInputReq); WindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if (stuff->eventMask & ~SelectionAllEvents) { client->errorValue = stuff->eventMask; return BadValue; } return XFixesSelectSelectionInput(client, stuff->selection, pWin, stuff->eventMask); } int _X_COLD SProcXFixesSelectSelectionInput(ClientPtr client) { REQUEST(xXFixesSelectSelectionInputReq); REQUEST_SIZE_MATCH(xXFixesSelectSelectionInputReq); swaps(&stuff->length); swapl(&stuff->window); swapl(&stuff->selection); swapl(&stuff->eventMask); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } void _X_COLD SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from, xXFixesSelectionNotifyEvent * to) { to->type = from->type; cpswaps(from->sequenceNumber, to->sequenceNumber); cpswapl(from->window, to->window); cpswapl(from->owner, to->owner); cpswapl(from->selection, to->selection); cpswapl(from->timestamp, to->timestamp); cpswapl(from->selectionTimestamp, to->selectionTimestamp); } static int SelectionFreeClient(void *data, XID id) { SelectionEventPtr old = (SelectionEventPtr) data; SelectionEventPtr *prev, e; for (prev = &selectionEvents; (e = *prev); prev = &e->next) { if (e == old) { *prev = e->next; free(e); CheckSelectionCallback(); break; } } return 1; } static int SelectionFreeWindow(void *data, XID id) { WindowPtr pWindow = (WindowPtr) data; SelectionEventPtr e, next; for (e = selectionEvents; e; e = next) { next = e->next; if (e->pWindow == pWindow) { FreeResource(e->clientResource, 0); } } return 1; } Bool XFixesSelectionInit(void) { SelectionClientType = CreateNewResourceType(SelectionFreeClient, "XFixesSelectionClient"); SelectionWindowType = CreateNewResourceType(SelectionFreeWindow, "XFixesSelectionWindow"); return SelectionClientType && SelectionWindowType; } xorg-server-21.1.16/xfixes/xfixes.c0000644000175000017500000002442014757411105012615 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010, 2021 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Copyright © 2002 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 #endif #include "xfixesint.h" #include "protocol-versions.h" #include "extinit.h" static unsigned char XFixesReqCode; int XFixesEventBase; int XFixesErrorBase; static DevPrivateKeyRec XFixesClientPrivateKeyRec; #define XFixesClientPrivateKey (&XFixesClientPrivateKeyRec) static int ProcXFixesQueryVersion(ClientPtr client) { int major, minor; XFixesClientPtr pXFixesClient = GetXFixesClient(client); xXFixesQueryVersionReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0 }; REQUEST(xXFixesQueryVersionReq); REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); if (version_compare(stuff->majorVersion, stuff->minorVersion, SERVER_XFIXES_MAJOR_VERSION, SERVER_XFIXES_MINOR_VERSION) < 0) { major = max(pXFixesClient->major_version, stuff->majorVersion); minor = stuff->minorVersion; } else { major = SERVER_XFIXES_MAJOR_VERSION; minor = SERVER_XFIXES_MINOR_VERSION; } pXFixesClient->major_version = major; rep.majorVersion = min(stuff->majorVersion, major); rep.minorVersion = minor; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swapl(&rep.majorVersion); swapl(&rep.minorVersion); } WriteToClient(client, sizeof(xXFixesQueryVersionReply), &rep); return Success; } /* Major version controls available requests */ static const int version_requests[] = { X_XFixesQueryVersion, /* before client sends QueryVersion */ X_XFixesGetCursorImage, /* Version 1 */ X_XFixesChangeCursorByName, /* Version 2 */ X_XFixesExpandRegion, /* Version 3 */ X_XFixesShowCursor, /* Version 4 */ X_XFixesDestroyPointerBarrier, /* Version 5 */ X_XFixesGetClientDisconnectMode, /* Version 6 */ }; int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr) = { /*************** Version 1 ******************/ ProcXFixesQueryVersion, ProcXFixesChangeSaveSet, ProcXFixesSelectSelectionInput, ProcXFixesSelectCursorInput, ProcXFixesGetCursorImage, /*************** Version 2 ******************/ ProcXFixesCreateRegion, ProcXFixesCreateRegionFromBitmap, ProcXFixesCreateRegionFromWindow, ProcXFixesCreateRegionFromGC, ProcXFixesCreateRegionFromPicture, ProcXFixesDestroyRegion, ProcXFixesSetRegion, ProcXFixesCopyRegion, ProcXFixesCombineRegion, ProcXFixesCombineRegion, ProcXFixesCombineRegion, ProcXFixesInvertRegion, ProcXFixesTranslateRegion, ProcXFixesRegionExtents, ProcXFixesFetchRegion, ProcXFixesSetGCClipRegion, ProcXFixesSetWindowShapeRegion, ProcXFixesSetPictureClipRegion, ProcXFixesSetCursorName, ProcXFixesGetCursorName, ProcXFixesGetCursorImageAndName, ProcXFixesChangeCursor, ProcXFixesChangeCursorByName, /*************** Version 3 ******************/ ProcXFixesExpandRegion, /*************** Version 4 ****************/ ProcXFixesHideCursor, ProcXFixesShowCursor, /*************** Version 5 ****************/ ProcXFixesCreatePointerBarrier, ProcXFixesDestroyPointerBarrier, /*************** Version 6 ****************/ ProcXFixesSetClientDisconnectMode, ProcXFixesGetClientDisconnectMode, }; static int ProcXFixesDispatch(ClientPtr client) { REQUEST(xXFixesReq); XFixesClientPtr pXFixesClient = GetXFixesClient(client); if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->xfixesReqType > version_requests[pXFixesClient->major_version]) return BadRequest; return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } static _X_COLD int SProcXFixesQueryVersion(ClientPtr client) { REQUEST(xXFixesQueryVersionReq); REQUEST_SIZE_MATCH(xXFixesQueryVersionReq); swaps(&stuff->length); swapl(&stuff->majorVersion); swapl(&stuff->minorVersion); return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } static int (*SProcXFixesVector[XFixesNumberRequests]) (ClientPtr) = { /*************** Version 1 ******************/ SProcXFixesQueryVersion, SProcXFixesChangeSaveSet, SProcXFixesSelectSelectionInput, SProcXFixesSelectCursorInput, SProcXFixesGetCursorImage, /*************** Version 2 ******************/ SProcXFixesCreateRegion, SProcXFixesCreateRegionFromBitmap, SProcXFixesCreateRegionFromWindow, SProcXFixesCreateRegionFromGC, SProcXFixesCreateRegionFromPicture, SProcXFixesDestroyRegion, SProcXFixesSetRegion, SProcXFixesCopyRegion, SProcXFixesCombineRegion, SProcXFixesCombineRegion, SProcXFixesCombineRegion, SProcXFixesInvertRegion, SProcXFixesTranslateRegion, SProcXFixesRegionExtents, SProcXFixesFetchRegion, SProcXFixesSetGCClipRegion, SProcXFixesSetWindowShapeRegion, SProcXFixesSetPictureClipRegion, SProcXFixesSetCursorName, SProcXFixesGetCursorName, SProcXFixesGetCursorImageAndName, SProcXFixesChangeCursor, SProcXFixesChangeCursorByName, /*************** Version 3 ******************/ SProcXFixesExpandRegion, /*************** Version 4 ****************/ SProcXFixesHideCursor, SProcXFixesShowCursor, /*************** Version 5 ****************/ SProcXFixesCreatePointerBarrier, SProcXFixesDestroyPointerBarrier, /*************** Version 6 ****************/ SProcXFixesSetClientDisconnectMode, SProcXFixesGetClientDisconnectMode, }; static _X_COLD int SProcXFixesDispatch(ClientPtr client) { REQUEST(xXFixesReq); XFixesClientPtr pXFixesClient = GetXFixesClient(client); if (pXFixesClient->major_version >= ARRAY_SIZE(version_requests)) return BadRequest; if (stuff->xfixesReqType > version_requests[pXFixesClient->major_version]) return BadRequest; return (*SProcXFixesVector[stuff->xfixesReqType]) (client); } void XFixesExtensionInit(void) { ExtensionEntry *extEntry; if (!dixRegisterPrivateKey (&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XFixesClientRec))) return; if (XFixesSelectionInit() && XFixesCursorInit() && XFixesRegionInit() && XFixesClientDisconnectInit() && (extEntry = AddExtension(XFIXES_NAME, XFixesNumberEvents, XFixesNumberErrors, ProcXFixesDispatch, SProcXFixesDispatch, NULL, StandardMinorOpcode)) != 0) { XFixesReqCode = (unsigned char) extEntry->base; XFixesEventBase = extEntry->eventBase; XFixesErrorBase = extEntry->errorBase; EventSwapVector[XFixesEventBase + XFixesSelectionNotify] = (EventSwapPtr) SXFixesSelectionNotifyEvent; EventSwapVector[XFixesEventBase + XFixesCursorNotify] = (EventSwapPtr) SXFixesCursorNotifyEvent; SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion); SetResourceTypeErrorValue(PointerBarrierType, XFixesErrorBase + BadBarrier); } } #ifdef PANORAMIX int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr); void PanoramiXFixesInit(void) { int i; for (i = 0; i < XFixesNumberRequests; i++) PanoramiXSaveXFixesVector[i] = ProcXFixesVector[i]; /* * Stuff in Xinerama aware request processing hooks */ ProcXFixesVector[X_XFixesSetGCClipRegion] = PanoramiXFixesSetGCClipRegion; ProcXFixesVector[X_XFixesSetWindowShapeRegion] = PanoramiXFixesSetWindowShapeRegion; ProcXFixesVector[X_XFixesSetPictureClipRegion] = PanoramiXFixesSetPictureClipRegion; } void PanoramiXFixesReset(void) { int i; for (i = 0; i < XFixesNumberRequests; i++) ProcXFixesVector[i] = PanoramiXSaveXFixesVector[i]; } #endif xorg-server-21.1.16/xfixes/xfixes.h0000644000175000017500000000360214757411105012621 /* * Copyright © 2002 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 #endif #ifndef _XFIXES_H_ #define _XFIXES_H_ #include "resource.h" extern RESTYPE RegionResType; extern int XFixesErrorBase; #define VERIFY_REGION(pRegion, rid, client, mode) \ do { \ int err; \ err = dixLookupResourceByType((void **) &pRegion, rid, \ RegionResType, client, mode); \ if (err != Success) { \ client->errorValue = rid; \ return err; \ } \ } while (0) #define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \ pRegion = 0; \ if (rid) VERIFY_REGION(pRegion, rid, client, mode); \ } extern RegionPtr XFixesRegionCopy(RegionPtr pRegion); #include "xibarriers.h" #endif /* _XFIXES_H_ */ xorg-server-21.1.16/xfixes/xfixesint.h0000644000175000017500000001645714757411105013350 /* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * Copyright 2010, 2021 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Copyright © 2002 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 #endif #ifndef _XFIXESINT_H_ #define _XFIXESINT_H_ #include #include #include "misc.h" #include "os.h" #include "dixstruct.h" #include "extnsionst.h" #include #include "windowstr.h" #include "selection.h" #include "xfixes.h" extern int XFixesEventBase; typedef struct _XFixesClient { CARD32 major_version; } XFixesClientRec, *XFixesClientPtr; #define GetXFixesClient(pClient) ((XFixesClientPtr)dixLookupPrivate(&(pClient)->devPrivates, XFixesClientPrivateKey)) extern int (*ProcXFixesVector[XFixesNumberRequests]) (ClientPtr); /* Save set */ int ProcXFixesChangeSaveSet(ClientPtr client); int SProcXFixesChangeSaveSet(ClientPtr client); /* Selection events */ int ProcXFixesSelectSelectionInput(ClientPtr client); int SProcXFixesSelectSelectionInput(ClientPtr client); void SXFixesSelectionNotifyEvent(xXFixesSelectionNotifyEvent * from, xXFixesSelectionNotifyEvent * to); Bool XFixesSelectionInit(void); /* Cursor notification */ Bool XFixesCursorInit(void); int ProcXFixesSelectCursorInput(ClientPtr client); int SProcXFixesSelectCursorInput(ClientPtr client); void SXFixesCursorNotifyEvent(xXFixesCursorNotifyEvent * from, xXFixesCursorNotifyEvent * to); int ProcXFixesGetCursorImage(ClientPtr client); int SProcXFixesGetCursorImage(ClientPtr client); /* Cursor names (Version 2) */ int ProcXFixesSetCursorName(ClientPtr client); int SProcXFixesSetCursorName(ClientPtr client); int ProcXFixesGetCursorName(ClientPtr client); int SProcXFixesGetCursorName(ClientPtr client); int ProcXFixesGetCursorImageAndName(ClientPtr client); int SProcXFixesGetCursorImageAndName(ClientPtr client); /* Cursor replacement (Version 2) */ int ProcXFixesChangeCursor(ClientPtr client); int SProcXFixesChangeCursor(ClientPtr client); int ProcXFixesChangeCursorByName(ClientPtr client); int SProcXFixesChangeCursorByName(ClientPtr client); /* Region objects (Version 2* */ Bool XFixesRegionInit(void); int ProcXFixesCreateRegion(ClientPtr client); int SProcXFixesCreateRegion(ClientPtr client); int ProcXFixesCreateRegionFromBitmap(ClientPtr client); int SProcXFixesCreateRegionFromBitmap(ClientPtr client); int ProcXFixesCreateRegionFromWindow(ClientPtr client); int SProcXFixesCreateRegionFromWindow(ClientPtr client); int ProcXFixesCreateRegionFromGC(ClientPtr client); int SProcXFixesCreateRegionFromGC(ClientPtr client); int ProcXFixesCreateRegionFromPicture(ClientPtr client); int SProcXFixesCreateRegionFromPicture(ClientPtr client); int ProcXFixesDestroyRegion(ClientPtr client); int SProcXFixesDestroyRegion(ClientPtr client); int ProcXFixesSetRegion(ClientPtr client); int SProcXFixesSetRegion(ClientPtr client); int ProcXFixesCopyRegion(ClientPtr client); int SProcXFixesCopyRegion(ClientPtr client); int ProcXFixesCombineRegion(ClientPtr client); int SProcXFixesCombineRegion(ClientPtr client); int ProcXFixesInvertRegion(ClientPtr client); int SProcXFixesInvertRegion(ClientPtr client); int ProcXFixesTranslateRegion(ClientPtr client); int SProcXFixesTranslateRegion(ClientPtr client); int ProcXFixesRegionExtents(ClientPtr client); int SProcXFixesRegionExtents(ClientPtr client); int ProcXFixesFetchRegion(ClientPtr client); int SProcXFixesFetchRegion(ClientPtr client); int ProcXFixesSetGCClipRegion(ClientPtr client); int SProcXFixesSetGCClipRegion(ClientPtr client); int ProcXFixesSetWindowShapeRegion(ClientPtr client); int SProcXFixesSetWindowShapeRegion(ClientPtr client); int ProcXFixesSetPictureClipRegion(ClientPtr client); int SProcXFixesSetPictureClipRegion(ClientPtr client); int ProcXFixesExpandRegion(ClientPtr client); int SProcXFixesExpandRegion(ClientPtr client); int PanoramiXFixesSetGCClipRegion(ClientPtr client); int PanoramiXFixesSetWindowShapeRegion(ClientPtr client); int PanoramiXFixesSetPictureClipRegion(ClientPtr client); /* Cursor Visibility (Version 4) */ int ProcXFixesHideCursor(ClientPtr client); int SProcXFixesHideCursor(ClientPtr client); int ProcXFixesShowCursor(ClientPtr client); int SProcXFixesShowCursor(ClientPtr client); /* Version 5 */ int ProcXFixesCreatePointerBarrier(ClientPtr client); int SProcXFixesCreatePointerBarrier(ClientPtr client); int ProcXFixesDestroyPointerBarrier(ClientPtr client); int SProcXFixesDestroyPointerBarrier(ClientPtr client); /* Version 6 */ Bool XFixesClientDisconnectInit(void); int ProcXFixesSetClientDisconnectMode(ClientPtr client); int ProcXFixesGetClientDisconnectMode(ClientPtr client); int SProcXFixesSetClientDisconnectMode(ClientPtr client); int SProcXFixesGetClientDisconnectMode(ClientPtr client); Bool XFixesShouldDisconnectClient(ClientPtr client); /* Xinerama */ #ifdef PANORAMIX extern int (*PanoramiXSaveXFixesVector[XFixesNumberRequests]) (ClientPtr); void PanoramiXFixesInit(void); void PanoramiXFixesReset(void); #endif #endif /* _XFIXESINT_H_ */ xorg-server-21.1.16/Xi/0000755000175000017500000000000014757411133010274 5xorg-server-21.1.16/Xi/meson.build0000644000175000017500000000241414757411105012356 srcs_xi = [ 'allowev.c', 'chgdctl.c', 'chgfctl.c', 'chgkbd.c', 'chgkmap.c', 'chgprop.c', 'chgptr.c', 'closedev.c', 'devbell.c', 'exevents.c', 'extinit.c', 'getbmap.c', 'getdctl.c', 'getfctl.c', 'getfocus.c', 'getkmap.c', 'getmmap.c', 'getprop.c', 'getselev.c', 'getvers.c', 'grabdev.c', 'grabdevb.c', 'grabdevk.c', 'gtmotion.c', 'listdev.c', 'opendev.c', 'queryst.c', 'selectev.c', 'sendexev.c', 'setbmap.c', 'setdval.c', 'setfocus.c', 'setmmap.c', 'setmode.c', 'ungrdev.c', 'ungrdevb.c', 'ungrdevk.c', 'xiallowev.c', 'xibarriers.c', 'xichangecursor.c', 'xichangehierarchy.c', 'xigetclientpointer.c', 'xigrabdev.c', 'xipassivegrab.c', 'xiproperty.c', 'xiquerydevice.c', 'xiquerypointer.c', 'xiqueryversion.c', 'xiselectev.c', 'xisetclientpointer.c', 'xisetdevfocus.c', 'xiwarppointer.c', ] libxserver_xi = static_library('libxserver_xi', srcs_xi, include_directories: inc, dependencies: common_dep, ) srcs_xi_stubs = ['stubs.c'] libxserver_xi_stubs = static_library('libxserver_xi_stubs', srcs_xi_stubs, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/Xi/Makefile.am0000644000175000017500000000320314757411105012245 noinst_LTLIBRARIES = libXi.la libXistubs.la AM_CFLAGS = $(DIX_CFLAGS) libXi_la_SOURCES = \ allowev.c \ allowev.h \ chgdctl.c \ chgdctl.h \ chgfctl.c \ chgfctl.h \ chgkbd.c \ chgkbd.h \ chgkmap.c \ chgkmap.h \ chgprop.c \ chgprop.h \ chgptr.c \ chgptr.h \ closedev.c \ closedev.h \ devbell.c \ devbell.h \ exevents.c \ exglobals.h \ extinit.c \ getbmap.c \ getbmap.h \ getdctl.c \ getdctl.h \ getfctl.c \ getfctl.h \ getfocus.c \ getfocus.h \ getkmap.c \ getkmap.h \ getmmap.c \ getmmap.h \ getprop.c \ getprop.h \ getselev.c \ getselev.h \ getvers.c \ getvers.h \ grabdev.c \ grabdev.h \ grabdevb.c \ grabdevb.h \ grabdevk.c \ grabdevk.h \ gtmotion.c \ gtmotion.h \ listdev.c \ listdev.h \ opendev.c \ opendev.h \ queryst.c \ queryst.h \ selectev.c \ selectev.h \ sendexev.c \ sendexev.h \ setbmap.c \ setbmap.h \ setdval.c \ setdval.h \ setfocus.c \ setfocus.h \ setmmap.c \ setmmap.h \ setmode.c \ setmode.h \ ungrdev.c \ ungrdev.h \ ungrdevb.c \ ungrdevb.h \ ungrdevk.c \ ungrdevk.h \ xiallowev.c \ xiallowev.h \ xibarriers.c \ xibarriers.h \ xichangecursor.c \ xichangecursor.h \ xichangehierarchy.c \ xichangehierarchy.h \ xigetclientpointer.c \ xigetclientpointer.h \ xigrabdev.c \ xigrabdev.h \ xipassivegrab.h \ xipassivegrab.c \ xiproperty.c \ xiproperty.h \ xiquerydevice.c \ xiquerydevice.h \ xiquerypointer.c \ xiquerypointer.h \ xiqueryversion.c \ xiqueryversion.h \ xiselectev.c \ xiselectev.h \ xisetclientpointer.c \ xisetclientpointer.h \ xisetdevfocus.c \ xisetdevfocus.h \ xiwarppointer.c \ xiwarppointer.h libXistubs_la_SOURCES = \ stubs.c xorg-server-21.1.16/Xi/Makefile.in0000644000175000017500000011100114757411114012252 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = Xi ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXi_la_LIBADD = am_libXi_la_OBJECTS = allowev.lo chgdctl.lo chgfctl.lo chgkbd.lo \ chgkmap.lo chgprop.lo chgptr.lo closedev.lo devbell.lo \ exevents.lo extinit.lo getbmap.lo getdctl.lo getfctl.lo \ getfocus.lo getkmap.lo getmmap.lo getprop.lo getselev.lo \ getvers.lo grabdev.lo grabdevb.lo grabdevk.lo gtmotion.lo \ listdev.lo opendev.lo queryst.lo selectev.lo sendexev.lo \ setbmap.lo setdval.lo setfocus.lo setmmap.lo setmode.lo \ ungrdev.lo ungrdevb.lo ungrdevk.lo xiallowev.lo xibarriers.lo \ xichangecursor.lo xichangehierarchy.lo xigetclientpointer.lo \ xigrabdev.lo xipassivegrab.lo xiproperty.lo xiquerydevice.lo \ xiquerypointer.lo xiqueryversion.lo xiselectev.lo \ xisetclientpointer.lo xisetdevfocus.lo xiwarppointer.lo libXi_la_OBJECTS = $(am_libXi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libXistubs_la_LIBADD = am_libXistubs_la_OBJECTS = stubs.lo libXistubs_la_OBJECTS = $(am_libXistubs_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/allowev.Plo ./$(DEPDIR)/chgdctl.Plo \ ./$(DEPDIR)/chgfctl.Plo ./$(DEPDIR)/chgkbd.Plo \ ./$(DEPDIR)/chgkmap.Plo ./$(DEPDIR)/chgprop.Plo \ ./$(DEPDIR)/chgptr.Plo ./$(DEPDIR)/closedev.Plo \ ./$(DEPDIR)/devbell.Plo ./$(DEPDIR)/exevents.Plo \ ./$(DEPDIR)/extinit.Plo ./$(DEPDIR)/getbmap.Plo \ ./$(DEPDIR)/getdctl.Plo ./$(DEPDIR)/getfctl.Plo \ ./$(DEPDIR)/getfocus.Plo ./$(DEPDIR)/getkmap.Plo \ ./$(DEPDIR)/getmmap.Plo ./$(DEPDIR)/getprop.Plo \ ./$(DEPDIR)/getselev.Plo ./$(DEPDIR)/getvers.Plo \ ./$(DEPDIR)/grabdev.Plo ./$(DEPDIR)/grabdevb.Plo \ ./$(DEPDIR)/grabdevk.Plo ./$(DEPDIR)/gtmotion.Plo \ ./$(DEPDIR)/listdev.Plo ./$(DEPDIR)/opendev.Plo \ ./$(DEPDIR)/queryst.Plo ./$(DEPDIR)/selectev.Plo \ ./$(DEPDIR)/sendexev.Plo ./$(DEPDIR)/setbmap.Plo \ ./$(DEPDIR)/setdval.Plo ./$(DEPDIR)/setfocus.Plo \ ./$(DEPDIR)/setmmap.Plo ./$(DEPDIR)/setmode.Plo \ ./$(DEPDIR)/stubs.Plo ./$(DEPDIR)/ungrdev.Plo \ ./$(DEPDIR)/ungrdevb.Plo ./$(DEPDIR)/ungrdevk.Plo \ ./$(DEPDIR)/xiallowev.Plo ./$(DEPDIR)/xibarriers.Plo \ ./$(DEPDIR)/xichangecursor.Plo \ ./$(DEPDIR)/xichangehierarchy.Plo \ ./$(DEPDIR)/xigetclientpointer.Plo ./$(DEPDIR)/xigrabdev.Plo \ ./$(DEPDIR)/xipassivegrab.Plo ./$(DEPDIR)/xiproperty.Plo \ ./$(DEPDIR)/xiquerydevice.Plo ./$(DEPDIR)/xiquerypointer.Plo \ ./$(DEPDIR)/xiqueryversion.Plo ./$(DEPDIR)/xiselectev.Plo \ ./$(DEPDIR)/xisetclientpointer.Plo \ ./$(DEPDIR)/xisetdevfocus.Plo ./$(DEPDIR)/xiwarppointer.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libXi_la_SOURCES) $(libXistubs_la_SOURCES) DIST_SOURCES = $(libXi_la_SOURCES) $(libXistubs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libXi.la libXistubs.la AM_CFLAGS = $(DIX_CFLAGS) libXi_la_SOURCES = \ allowev.c \ allowev.h \ chgdctl.c \ chgdctl.h \ chgfctl.c \ chgfctl.h \ chgkbd.c \ chgkbd.h \ chgkmap.c \ chgkmap.h \ chgprop.c \ chgprop.h \ chgptr.c \ chgptr.h \ closedev.c \ closedev.h \ devbell.c \ devbell.h \ exevents.c \ exglobals.h \ extinit.c \ getbmap.c \ getbmap.h \ getdctl.c \ getdctl.h \ getfctl.c \ getfctl.h \ getfocus.c \ getfocus.h \ getkmap.c \ getkmap.h \ getmmap.c \ getmmap.h \ getprop.c \ getprop.h \ getselev.c \ getselev.h \ getvers.c \ getvers.h \ grabdev.c \ grabdev.h \ grabdevb.c \ grabdevb.h \ grabdevk.c \ grabdevk.h \ gtmotion.c \ gtmotion.h \ listdev.c \ listdev.h \ opendev.c \ opendev.h \ queryst.c \ queryst.h \ selectev.c \ selectev.h \ sendexev.c \ sendexev.h \ setbmap.c \ setbmap.h \ setdval.c \ setdval.h \ setfocus.c \ setfocus.h \ setmmap.c \ setmmap.h \ setmode.c \ setmode.h \ ungrdev.c \ ungrdev.h \ ungrdevb.c \ ungrdevb.h \ ungrdevk.c \ ungrdevk.h \ xiallowev.c \ xiallowev.h \ xibarriers.c \ xibarriers.h \ xichangecursor.c \ xichangecursor.h \ xichangehierarchy.c \ xichangehierarchy.h \ xigetclientpointer.c \ xigetclientpointer.h \ xigrabdev.c \ xigrabdev.h \ xipassivegrab.h \ xipassivegrab.c \ xiproperty.c \ xiproperty.h \ xiquerydevice.c \ xiquerydevice.h \ xiquerypointer.c \ xiquerypointer.h \ xiqueryversion.c \ xiqueryversion.h \ xiselectev.c \ xiselectev.h \ xisetclientpointer.c \ xisetclientpointer.h \ xisetdevfocus.c \ xisetdevfocus.h \ xiwarppointer.c \ xiwarppointer.h libXistubs_la_SOURCES = \ stubs.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Xi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Xi/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libXi.la: $(libXi_la_OBJECTS) $(libXi_la_DEPENDENCIES) $(EXTRA_libXi_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXi_la_OBJECTS) $(libXi_la_LIBADD) $(LIBS) libXistubs.la: $(libXistubs_la_OBJECTS) $(libXistubs_la_DEPENDENCIES) $(EXTRA_libXistubs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libXistubs_la_OBJECTS) $(libXistubs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allowev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgdctl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgfctl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkbd.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgkmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgprop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chgptr.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devbell.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exevents.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extinit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getbmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdctl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfctl.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfocus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getkmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getmmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprop.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getselev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getvers.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grabdevk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtmotion.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/listdev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opendev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/queryst.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selectev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendexev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setbmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setdval.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setfocus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmmap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setmode.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ungrdevk.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiallowev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xibarriers.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangecursor.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xichangehierarchy.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigetclientpointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xigrabdev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xipassivegrab.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiproperty.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerydevice.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiquerypointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiqueryversion.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiselectev.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetclientpointer.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xisetdevfocus.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xiwarppointer.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/allowev.Plo -rm -f ./$(DEPDIR)/chgdctl.Plo -rm -f ./$(DEPDIR)/chgfctl.Plo -rm -f ./$(DEPDIR)/chgkbd.Plo -rm -f ./$(DEPDIR)/chgkmap.Plo -rm -f ./$(DEPDIR)/chgprop.Plo -rm -f ./$(DEPDIR)/chgptr.Plo -rm -f ./$(DEPDIR)/closedev.Plo -rm -f ./$(DEPDIR)/devbell.Plo -rm -f ./$(DEPDIR)/exevents.Plo -rm -f ./$(DEPDIR)/extinit.Plo -rm -f ./$(DEPDIR)/getbmap.Plo -rm -f ./$(DEPDIR)/getdctl.Plo -rm -f ./$(DEPDIR)/getfctl.Plo -rm -f ./$(DEPDIR)/getfocus.Plo -rm -f ./$(DEPDIR)/getkmap.Plo -rm -f ./$(DEPDIR)/getmmap.Plo -rm -f ./$(DEPDIR)/getprop.Plo -rm -f ./$(DEPDIR)/getselev.Plo -rm -f ./$(DEPDIR)/getvers.Plo -rm -f ./$(DEPDIR)/grabdev.Plo -rm -f ./$(DEPDIR)/grabdevb.Plo -rm -f ./$(DEPDIR)/grabdevk.Plo -rm -f ./$(DEPDIR)/gtmotion.Plo -rm -f ./$(DEPDIR)/listdev.Plo -rm -f ./$(DEPDIR)/opendev.Plo -rm -f ./$(DEPDIR)/queryst.Plo -rm -f ./$(DEPDIR)/selectev.Plo -rm -f ./$(DEPDIR)/sendexev.Plo -rm -f ./$(DEPDIR)/setbmap.Plo -rm -f ./$(DEPDIR)/setdval.Plo -rm -f ./$(DEPDIR)/setfocus.Plo -rm -f ./$(DEPDIR)/setmmap.Plo -rm -f ./$(DEPDIR)/setmode.Plo -rm -f ./$(DEPDIR)/stubs.Plo -rm -f ./$(DEPDIR)/ungrdev.Plo -rm -f ./$(DEPDIR)/ungrdevb.Plo -rm -f ./$(DEPDIR)/ungrdevk.Plo -rm -f ./$(DEPDIR)/xiallowev.Plo -rm -f ./$(DEPDIR)/xibarriers.Plo -rm -f ./$(DEPDIR)/xichangecursor.Plo -rm -f ./$(DEPDIR)/xichangehierarchy.Plo -rm -f ./$(DEPDIR)/xigetclientpointer.Plo -rm -f ./$(DEPDIR)/xigrabdev.Plo -rm -f ./$(DEPDIR)/xipassivegrab.Plo -rm -f ./$(DEPDIR)/xiproperty.Plo -rm -f ./$(DEPDIR)/xiquerydevice.Plo -rm -f ./$(DEPDIR)/xiquerypointer.Plo -rm -f ./$(DEPDIR)/xiqueryversion.Plo -rm -f ./$(DEPDIR)/xiselectev.Plo -rm -f ./$(DEPDIR)/xisetclientpointer.Plo -rm -f ./$(DEPDIR)/xisetdevfocus.Plo -rm -f ./$(DEPDIR)/xiwarppointer.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/allowev.Plo -rm -f ./$(DEPDIR)/chgdctl.Plo -rm -f ./$(DEPDIR)/chgfctl.Plo -rm -f ./$(DEPDIR)/chgkbd.Plo -rm -f ./$(DEPDIR)/chgkmap.Plo -rm -f ./$(DEPDIR)/chgprop.Plo -rm -f ./$(DEPDIR)/chgptr.Plo -rm -f ./$(DEPDIR)/closedev.Plo -rm -f ./$(DEPDIR)/devbell.Plo -rm -f ./$(DEPDIR)/exevents.Plo -rm -f ./$(DEPDIR)/extinit.Plo -rm -f ./$(DEPDIR)/getbmap.Plo -rm -f ./$(DEPDIR)/getdctl.Plo -rm -f ./$(DEPDIR)/getfctl.Plo -rm -f ./$(DEPDIR)/getfocus.Plo -rm -f ./$(DEPDIR)/getkmap.Plo -rm -f ./$(DEPDIR)/getmmap.Plo -rm -f ./$(DEPDIR)/getprop.Plo -rm -f ./$(DEPDIR)/getselev.Plo -rm -f ./$(DEPDIR)/getvers.Plo -rm -f ./$(DEPDIR)/grabdev.Plo -rm -f ./$(DEPDIR)/grabdevb.Plo -rm -f ./$(DEPDIR)/grabdevk.Plo -rm -f ./$(DEPDIR)/gtmotion.Plo -rm -f ./$(DEPDIR)/listdev.Plo -rm -f ./$(DEPDIR)/opendev.Plo -rm -f ./$(DEPDIR)/queryst.Plo -rm -f ./$(DEPDIR)/selectev.Plo -rm -f ./$(DEPDIR)/sendexev.Plo -rm -f ./$(DEPDIR)/setbmap.Plo -rm -f ./$(DEPDIR)/setdval.Plo -rm -f ./$(DEPDIR)/setfocus.Plo -rm -f ./$(DEPDIR)/setmmap.Plo -rm -f ./$(DEPDIR)/setmode.Plo -rm -f ./$(DEPDIR)/stubs.Plo -rm -f ./$(DEPDIR)/ungrdev.Plo -rm -f ./$(DEPDIR)/ungrdevb.Plo -rm -f ./$(DEPDIR)/ungrdevk.Plo -rm -f ./$(DEPDIR)/xiallowev.Plo -rm -f ./$(DEPDIR)/xibarriers.Plo -rm -f ./$(DEPDIR)/xichangecursor.Plo -rm -f ./$(DEPDIR)/xichangehierarchy.Plo -rm -f ./$(DEPDIR)/xigetclientpointer.Plo -rm -f ./$(DEPDIR)/xigrabdev.Plo -rm -f ./$(DEPDIR)/xipassivegrab.Plo -rm -f ./$(DEPDIR)/xiproperty.Plo -rm -f ./$(DEPDIR)/xiquerydevice.Plo -rm -f ./$(DEPDIR)/xiquerypointer.Plo -rm -f ./$(DEPDIR)/xiqueryversion.Plo -rm -f ./$(DEPDIR)/xiselectev.Plo -rm -f ./$(DEPDIR)/xisetclientpointer.Plo -rm -f ./$(DEPDIR)/xisetdevfocus.Plo -rm -f ./$(DEPDIR)/xiwarppointer.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/Xi/allowev.c0000644000175000017500000001024214757411105012027 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Function to allow frozen events to be routed from extension input devices. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "allowev.h" #include "dixevents.h" /*********************************************************************** * * This procedure allows frozen events to be routed. * */ int _X_COLD SProcXAllowDeviceEvents(ClientPtr client) { REQUEST(xAllowDeviceEventsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); swapl(&stuff->time); return (ProcXAllowDeviceEvents(client)); } /*********************************************************************** * * This procedure allows frozen events to be routed. * */ int ProcXAllowDeviceEvents(ClientPtr client) { TimeStamp time; DeviceIntPtr thisdev; int rc; REQUEST(xAllowDeviceEventsReq); REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; time = ClientTimeToServerTime(stuff->time); switch (stuff->mode) { case ReplayThisDevice: AllowSome(client, time, thisdev, NOT_GRABBED); break; case SyncThisDevice: AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT); break; case AsyncThisDevice: AllowSome(client, time, thisdev, THAWED); break; case AsyncOtherDevices: AllowSome(client, time, thisdev, THAW_OTHERS); break; case SyncAll: AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT); break; case AsyncAll: AllowSome(client, time, thisdev, THAWED_BOTH); break; default: client->errorValue = stuff->mode; return BadValue; } return Success; } xorg-server-21.1.16/Xi/allowev.h0000644000175000017500000000266714757411105012050 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef ALLOWEV_H #define ALLOWEV_H 1 int SProcXAllowDeviceEvents(ClientPtr /* client */ ); int ProcXAllowDeviceEvents(ClientPtr /* client */ ); #endif /* ALLOWEV_H */ xorg-server-21.1.16/Xi/chgdctl.c0000644000175000017500000002006314757411105011770 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Change Device control attributes for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include /* control constants */ #include "XIstubs.h" #include "exglobals.h" #include "exevents.h" #include "chgdctl.h" /*********************************************************************** * * This procedure changes the control attributes for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXChangeDeviceControl(ClientPtr client) { xDeviceCtl *ctl; REQUEST(xChangeDeviceControlReq); swaps(&stuff->length); REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); swaps(&stuff->control); ctl = (xDeviceCtl *) &stuff[1]; swaps(&ctl->control); swaps(&ctl->length); switch (stuff->control) { case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: case DEVICE_CORE: case DEVICE_ENABLE: case DEVICE_RESOLUTION: /* hmm. beer. *drool* */ break; } return (ProcXChangeDeviceControl(client)); } /*********************************************************************** * * Change the control attributes. * */ int ProcXChangeDeviceControl(ClientPtr client) { unsigned len; int i, status, ret = BadValue; DeviceIntPtr dev; xDeviceResolutionCtl *r; xChangeDeviceControlReply rep; AxisInfoPtr a; CARD32 *resolution; xDeviceEnableCtl *e; REQUEST(xChangeDeviceControlReq); REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceControlReq)); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) goto out; /* XTest devices are special, none of the below apply to them anyway */ if (IsXTestDevice(dev, NULL)) { ret = BadMatch; goto out; } rep = (xChangeDeviceControlReply) { .repType = X_Reply, .RepType = X_ChangeDeviceControl, .sequenceNumber = client->sequence, .length = 0, .status = Success, }; switch (stuff->control) { case DEVICE_RESOLUTION: r = (xDeviceResolutionCtl *) &stuff[1]; if ((len < bytes_to_int32(sizeof(xDeviceResolutionCtl))) || (len != bytes_to_int32(sizeof(xDeviceResolutionCtl)) + r->num_valuators)) { ret = BadLength; goto out; } if (!dev->valuator) { ret = BadMatch; goto out; } if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) { rep.status = AlreadyGrabbed; ret = Success; goto out; } resolution = (CARD32 *) (r + 1); if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) { ret = BadValue; goto out; } status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r); if (status == Success) { a = &dev->valuator->axes[r->first_valuator]; for (i = 0; i < r->num_valuators; i++) if (*(resolution + i) < (a + i)->min_resolution || *(resolution + i) > (a + i)->max_resolution) return BadValue; for (i = 0; i < r->num_valuators; i++) (a++)->resolution = *resolution++; ret = Success; } else if (status == DeviceBusy) { rep.status = DeviceBusy; ret = Success; } else { ret = BadMatch; } break; case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: /* Calibration is now done through properties, and never had any effect * on anything (in the open-source world). Thus, be honest. */ ret = BadMatch; break; case DEVICE_CORE: /* Sorry, no device core switching no more. If you want a device to * send core events, attach it to a master device */ ret = BadMatch; break; case DEVICE_ENABLE: e = (xDeviceEnableCtl *) &stuff[1]; if ((len != bytes_to_int32(sizeof(xDeviceEnableCtl)))) { ret = BadLength; goto out; } if (IsXTestDevice(dev, NULL)) status = !Success; else status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e); if (status == Success) { if (e->enable) EnableDevice(dev, TRUE); else DisableDevice(dev, TRUE); ret = Success; } else if (status == DeviceBusy) { rep.status = DeviceBusy; ret = Success; } else { ret = BadMatch; } break; default: ret = BadValue; } out: if (ret == Success) { devicePresenceNotify dpn = { .type = DevicePresenceNotify, .time = currentTime.milliseconds, .devchange = DeviceControlChanged, .deviceid = dev->id, .control = stuff->control }; SendEventToAllWindows(dev, DevicePresenceNotifyMask, (xEvent *) &dpn, 1); WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); } return ret; } /*********************************************************************** * * This procedure writes the reply for the xChangeDeviceControl function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXChangeDeviceControl(ClientPtr client, int size, xChangeDeviceControlReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/chgdctl.h0000644000175000017500000000315714757411105012002 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGDCTL_H #define CHGDCTL_H 1 int SProcXChangeDeviceControl(ClientPtr /* client */ ); int ProcXChangeDeviceControl(ClientPtr /* client */ ); void SRepXChangeDeviceControl(ClientPtr /* client */ , int /* size */ , xChangeDeviceControlReply * /* rep */ ); #endif /* CHGDCTL_H */ xorg-server-21.1.16/Xi/chgfctl.c0000644000175000017500000003616514757411105012004 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Change feedback control attributes for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include /* control constants */ #include "exglobals.h" #include "chgfctl.h" #define DO_ALL (-1) /*********************************************************************** * * This procedure changes the control attributes for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXChangeFeedbackControl(ClientPtr client) { REQUEST(xChangeFeedbackControlReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); swapl(&stuff->mask); return (ProcXChangeFeedbackControl(client)); } /****************************************************************************** * * This procedure changes KbdFeedbackClass data. * */ static int ChangeKbdFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, KbdFeedbackPtr k, xKbdFeedbackCtl * f) { KeybdCtrl kctrl; int t; int key = DO_ALL; if (client->swapped) { swaps(&f->length); swaps(&f->pitch); swaps(&f->duration); swapl(&f->led_mask); swapl(&f->led_values); } kctrl = k->ctrl; if (mask & DvKeyClickPercent) { t = f->click; if (t == -1) t = defaultKeyboardControl.click; else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } kctrl.click = t; } if (mask & DvPercent) { t = f->percent; if (t == -1) t = defaultKeyboardControl.bell; else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } kctrl.bell = t; } if (mask & DvPitch) { t = f->pitch; if (t == -1) t = defaultKeyboardControl.bell_pitch; else if (t < 0) { client->errorValue = t; return BadValue; } kctrl.bell_pitch = t; } if (mask & DvDuration) { t = f->duration; if (t == -1) t = defaultKeyboardControl.bell_duration; else if (t < 0) { client->errorValue = t; return BadValue; } kctrl.bell_duration = t; } if (mask & DvLed) { kctrl.leds &= ~(f->led_mask); kctrl.leds |= (f->led_mask & f->led_values); } if (mask & DvKey) { key = (KeyCode) f->key; if (key < 8 || key > 255) { client->errorValue = key; return BadValue; } if (!(mask & DvAutoRepeatMode)) return BadMatch; } if (mask & DvAutoRepeatMode) { int inx = (key >> 3); int kmask = (1 << (key & 7)); t = (CARD8) f->auto_repeat_mode; if (t == AutoRepeatModeOff) { if (key == DO_ALL) kctrl.autoRepeat = FALSE; else kctrl.autoRepeats[inx] &= ~kmask; } else if (t == AutoRepeatModeOn) { if (key == DO_ALL) kctrl.autoRepeat = TRUE; else kctrl.autoRepeats[inx] |= kmask; } else if (t == AutoRepeatModeDefault) { if (key == DO_ALL) kctrl.autoRepeat = defaultKeyboardControl.autoRepeat; else kctrl.autoRepeats[inx] &= ~kmask; kctrl.autoRepeats[inx] = (kctrl.autoRepeats[inx] & ~kmask) | (defaultKeyboardControl.autoRepeats[inx] & kmask); } else { client->errorValue = t; return BadValue; } } k->ctrl = kctrl; (*k->CtrlProc) (dev, &k->ctrl); return Success; } /****************************************************************************** * * This procedure changes PtrFeedbackClass data. * */ static int ChangePtrFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, PtrFeedbackPtr p, xPtrFeedbackCtl * f) { PtrCtrl pctrl; /* might get BadValue part way through */ if (client->swapped) { swaps(&f->length); swaps(&f->num); swaps(&f->denom); swaps(&f->thresh); } pctrl = p->ctrl; if (mask & DvAccelNum) { int accelNum; accelNum = f->num; if (accelNum == -1) pctrl.num = defaultPointerControl.num; else if (accelNum < 0) { client->errorValue = accelNum; return BadValue; } else pctrl.num = accelNum; } if (mask & DvAccelDenom) { int accelDenom; accelDenom = f->denom; if (accelDenom == -1) pctrl.den = defaultPointerControl.den; else if (accelDenom <= 0) { client->errorValue = accelDenom; return BadValue; } else pctrl.den = accelDenom; } if (mask & DvThreshold) { int threshold; threshold = f->thresh; if (threshold == -1) pctrl.threshold = defaultPointerControl.threshold; else if (threshold < 0) { client->errorValue = threshold; return BadValue; } else pctrl.threshold = threshold; } p->ctrl = pctrl; (*p->CtrlProc) (dev, &p->ctrl); return Success; } /****************************************************************************** * * This procedure changes IntegerFeedbackClass data. * */ static int ChangeIntegerFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, IntegerFeedbackPtr i, xIntegerFeedbackCtl * f) { if (client->swapped) { swaps(&f->length); swapl(&f->int_to_display); } i->ctrl.integer_displayed = f->int_to_display; (*i->CtrlProc) (dev, &i->ctrl); return Success; } /****************************************************************************** * * This procedure changes StringFeedbackClass data. * */ static int ChangeStringFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, StringFeedbackPtr s, xStringFeedbackCtl * f) { int i, j; KeySym *syms, *sup_syms; syms = (KeySym *) (f + 1); if (client->swapped) { swaps(&f->length); /* swapped num_keysyms in calling proc */ SwapLongs((CARD32 *) syms, f->num_keysyms); } if (f->num_keysyms > s->ctrl.max_symbols) return BadValue; sup_syms = s->ctrl.symbols_supported; for (i = 0; i < f->num_keysyms; i++) { for (j = 0; j < s->ctrl.num_symbols_supported; j++) if (*(syms + i) == *(sup_syms + j)) break; if (j == s->ctrl.num_symbols_supported) return BadMatch; } s->ctrl.num_symbols_displayed = f->num_keysyms; for (i = 0; i < f->num_keysyms; i++) *(s->ctrl.symbols_displayed + i) = *(syms + i); (*s->CtrlProc) (dev, &s->ctrl); return Success; } /****************************************************************************** * * This procedure changes BellFeedbackClass data. * */ static int ChangeBellFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, BellFeedbackPtr b, xBellFeedbackCtl * f) { int t; BellCtrl bctrl; /* might get BadValue part way through */ if (client->swapped) { swaps(&f->length); swaps(&f->pitch); swaps(&f->duration); } bctrl = b->ctrl; if (mask & DvPercent) { t = f->percent; if (t == -1) t = defaultKeyboardControl.bell; else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } bctrl.percent = t; } if (mask & DvPitch) { t = f->pitch; if (t == -1) t = defaultKeyboardControl.bell_pitch; else if (t < 0) { client->errorValue = t; return BadValue; } bctrl.pitch = t; } if (mask & DvDuration) { t = f->duration; if (t == -1) t = defaultKeyboardControl.bell_duration; else if (t < 0) { client->errorValue = t; return BadValue; } bctrl.duration = t; } b->ctrl = bctrl; (*b->CtrlProc) (dev, &b->ctrl); return Success; } /****************************************************************************** * * This procedure changes LedFeedbackClass data. * */ static int ChangeLedFeedback(ClientPtr client, DeviceIntPtr dev, long unsigned int mask, LedFeedbackPtr l, xLedFeedbackCtl * f) { LedCtrl lctrl; /* might get BadValue part way through */ if (client->swapped) { swaps(&f->length); swapl(&f->led_values); swapl(&f->led_mask); } f->led_mask &= l->ctrl.led_mask; /* set only supported leds */ f->led_values &= l->ctrl.led_mask; /* set only supported leds */ if (mask & DvLed) { lctrl.led_mask = f->led_mask; lctrl.led_values = f->led_values; (*l->CtrlProc) (dev, &lctrl); l->ctrl.led_values &= ~(f->led_mask); /* zero changed leds */ l->ctrl.led_values |= (f->led_mask & f->led_values); /* OR in set leds */ } return Success; } /*********************************************************************** * * Change the control attributes. * */ int ProcXChangeFeedbackControl(ClientPtr client) { unsigned len; DeviceIntPtr dev; KbdFeedbackPtr k; PtrFeedbackPtr p; IntegerFeedbackPtr i; StringFeedbackPtr s; BellFeedbackPtr b; LedFeedbackPtr l; int rc; REQUEST(xChangeFeedbackControlReq); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); len = stuff->length - bytes_to_int32(sizeof(xChangeFeedbackControlReq)); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (rc != Success) return rc; switch (stuff->feedbackid) { case KbdFeedbackClass: if (len != bytes_to_int32(sizeof(xKbdFeedbackCtl))) return BadLength; for (k = dev->kbdfeed; k; k = k->next) if (k->ctrl.id == ((xKbdFeedbackCtl *) &stuff[1])->id) return ChangeKbdFeedback(client, dev, stuff->mask, k, (xKbdFeedbackCtl *) &stuff[1]); break; case PtrFeedbackClass: if (len != bytes_to_int32(sizeof(xPtrFeedbackCtl))) return BadLength; for (p = dev->ptrfeed; p; p = p->next) if (p->ctrl.id == ((xPtrFeedbackCtl *) &stuff[1])->id) return ChangePtrFeedback(client, dev, stuff->mask, p, (xPtrFeedbackCtl *) &stuff[1]); break; case StringFeedbackClass: { xStringFeedbackCtl *f; REQUEST_AT_LEAST_EXTRA_SIZE(xChangeFeedbackControlReq, sizeof(xStringFeedbackCtl)); f = ((xStringFeedbackCtl *) &stuff[1]); if (client->swapped) { if (len < bytes_to_int32(sizeof(xStringFeedbackCtl))) return BadLength; swaps(&f->num_keysyms); } if (len != (bytes_to_int32(sizeof(xStringFeedbackCtl)) + f->num_keysyms)) return BadLength; for (s = dev->stringfeed; s; s = s->next) if (s->ctrl.id == ((xStringFeedbackCtl *) &stuff[1])->id) return ChangeStringFeedback(client, dev, stuff->mask, s, (xStringFeedbackCtl *) &stuff[1]); break; } case IntegerFeedbackClass: if (len != bytes_to_int32(sizeof(xIntegerFeedbackCtl))) return BadLength; for (i = dev->intfeed; i; i = i->next) if (i->ctrl.id == ((xIntegerFeedbackCtl *) &stuff[1])->id) return ChangeIntegerFeedback(client, dev, stuff->mask, i, (xIntegerFeedbackCtl *) & stuff[1]); break; case LedFeedbackClass: if (len != bytes_to_int32(sizeof(xLedFeedbackCtl))) return BadLength; for (l = dev->leds; l; l = l->next) if (l->ctrl.id == ((xLedFeedbackCtl *) &stuff[1])->id) return ChangeLedFeedback(client, dev, stuff->mask, l, (xLedFeedbackCtl *) &stuff[1]); break; case BellFeedbackClass: if (len != bytes_to_int32(sizeof(xBellFeedbackCtl))) return BadLength; for (b = dev->bell; b; b = b->next) if (b->ctrl.id == ((xBellFeedbackCtl *) &stuff[1])->id) return ChangeBellFeedback(client, dev, stuff->mask, b, (xBellFeedbackCtl *) &stuff[1]); break; default: break; } return BadMatch; } xorg-server-21.1.16/Xi/chgfctl.h0000644000175000017500000000270714757411105012004 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGFCTL_H #define CHGFCTL_H 1 int SProcXChangeFeedbackControl(ClientPtr /* client */ ); int ProcXChangeFeedbackControl(ClientPtr /* client */ ); #endif /* CHGFCTL_H */ xorg-server-21.1.16/Xi/chgkbd.c0000644000175000017500000000655114757411105011610 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to change the keyboard device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "globals.h" #include "exevents.h" #include "exglobals.h" #include "chgkbd.h" #include "chgptr.h" /*********************************************************************** * * This procedure changes the keyboard device. * */ int _X_COLD SProcXChangeKeyboardDevice(ClientPtr client) { REQUEST(xChangeKeyboardDeviceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); return (ProcXChangeKeyboardDevice(client)); } /*********************************************************************** * * This procedure is invoked to swap the request bytes if the server and * client have a different byte order. * */ int ProcXChangeKeyboardDevice(ClientPtr client) { /* REQUEST(xChangeKeyboardDeviceReq); */ REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); return BadDevice; } xorg-server-21.1.16/Xi/chgkbd.h0000644000175000017500000000267414757411105011617 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGKBD_H #define CHGKBD_H 1 int SProcXChangeKeyboardDevice(ClientPtr /* client */ ); int ProcXChangeKeyboardDevice(ClientPtr /* client */ ); #endif /* CHGKBD_H */ xorg-server-21.1.16/Xi/chgkmap.c0000644000175000017500000001010314757411105011764 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Change key mapping for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exevents.h" #include "exglobals.h" #include "chgkmap.h" /*********************************************************************** * * This procedure swaps the request when the client and * server have different byte orderings. * */ int _X_COLD SProcXChangeDeviceKeyMapping(ClientPtr client) { unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), count); return (ProcXChangeDeviceKeyMapping(client)); } /*********************************************************************** * * Change the device key mapping. * */ int ProcXChangeDeviceKeyMapping(ClientPtr client) { int ret; unsigned len; DeviceIntPtr dev; unsigned int count; REQUEST(xChangeDeviceKeyMappingReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); count = stuff->keyCodes * stuff->keySymsPerKeyCode; REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; len = stuff->length - bytes_to_int32(sizeof(xChangeDeviceKeyMappingReq)); ret = ChangeKeyMapping(client, dev, len, DeviceMappingNotify, stuff->firstKeyCode, stuff->keyCodes, stuff->keySymsPerKeyCode, (KeySym *) &stuff[1]); return ret; } xorg-server-21.1.16/Xi/chgkmap.h0000644000175000017500000000270714757411105012004 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGKMAP_H #define CHGKMAP_H 1 int SProcXChangeDeviceKeyMapping(ClientPtr /* client */ ); int ProcXChangeDeviceKeyMapping(ClientPtr /* client */ ); #endif /* CHGKMAP_H */ xorg-server-21.1.16/Xi/chgprop.c0000644000175000017500000001152014757411105012020 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Function to modify the dont-propagate-list for an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" #include #include #include "exevents.h" #include "exglobals.h" #include "chgprop.h" #include "grabdev.h" /*********************************************************************** * * This procedure returns the extension version. * */ int _X_COLD SProcXChangeDeviceDontPropagateList(ClientPtr client) { REQUEST(xChangeDeviceDontPropagateListReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); swapl(&stuff->window); swaps(&stuff->count); REQUEST_FIXED_SIZE(xChangeDeviceDontPropagateListReq, stuff->count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), stuff->count); return (ProcXChangeDeviceDontPropagateList(client)); } /*********************************************************************** * * This procedure changes the dont-propagate list for the specified window. * */ int ProcXChangeDeviceDontPropagateList(ClientPtr client) { int i, rc; WindowPtr pWin; struct tmask tmp[EMASKSIZE]; OtherInputMasks *others; REQUEST(xChangeDeviceDontPropagateListReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); if (stuff->length != bytes_to_int32(sizeof(xChangeDeviceDontPropagateListReq)) + stuff->count) return BadLength; rc = dixLookupWindow(&pWin, stuff->window, client, DixSetAttrAccess); if (rc != Success) return rc; if (stuff->mode != AddToList && stuff->mode != DeleteFromList) { client->errorValue = stuff->window; return BadMode; } if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->count, tmp, NULL, X_ChangeDeviceDontPropagateList)) != Success) return rc; others = wOtherInputMasks(pWin); if (!others && stuff->mode == DeleteFromList) return Success; for (i = 0; i < EMASKSIZE; i++) { if (tmp[i].mask == 0) continue; if (stuff->mode == DeleteFromList) tmp[i].mask = (others->dontPropagateMask[i] & ~tmp[i].mask); else if (others) tmp[i].mask |= others->dontPropagateMask[i]; if (DeviceEventSuppressForWindow(pWin, client, tmp[i].mask, i) != Success) return BadClass; } return Success; } xorg-server-21.1.16/Xi/chgprop.h0000644000175000017500000000272714757411105012036 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGPROP_H #define CHGPROP_H 1 int SProcXChangeDeviceDontPropagateList(ClientPtr /* client */ ); int ProcXChangeDeviceDontPropagateList(ClientPtr /* client */ ); #endif /* CHGPROP_H */ xorg-server-21.1.16/Xi/chgptr.c0000644000175000017500000000671414757411105011656 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to change the pointer device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include "dixevents.h" #include "exevents.h" #include "exglobals.h" #include "chgptr.h" /*********************************************************************** * * This procedure is invoked to swap the request bytes if the server and * client have a different byte order. * */ int _X_COLD SProcXChangePointerDevice(ClientPtr client) { REQUEST(xChangePointerDeviceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xChangePointerDeviceReq); return (ProcXChangePointerDevice(client)); } /*********************************************************************** * * This procedure changes the device used as the X pointer. * */ int ProcXChangePointerDevice(ClientPtr client) { /* REQUEST(xChangePointerDeviceReq); */ REQUEST_SIZE_MATCH(xChangePointerDeviceReq); return BadDevice; } xorg-server-21.1.16/Xi/chgptr.h0000644000175000017500000000276614757411105011666 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CHGPTR_H #define CHGPTR_H 1 int SProcXChangePointerDevice(ClientPtr /* client */ ); int ProcXChangePointerDevice(ClientPtr /* client */ ); void DeleteFocusClassDeviceStruct(DeviceIntPtr /* dev */ ); #endif /* CHGPTR_H */ xorg-server-21.1.16/Xi/closedev.c0000644000175000017500000001236514757411105012172 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to close an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include "XIstubs.h" #include "exglobals.h" #include "closedev.h" /*********************************************************************** * * This procedure closes an input device. * */ int _X_COLD SProcXCloseDevice(ClientPtr client) { REQUEST(xCloseDeviceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xCloseDeviceReq); return (ProcXCloseDevice(client)); } /*********************************************************************** * * Clear out event selections and passive grabs from a window for the * specified device. * */ static void DeleteDeviceEvents(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) { InputClientsPtr others; OtherInputMasks *pOthers; GrabPtr grab, next; if ((pOthers = wOtherInputMasks(pWin)) != 0) for (others = pOthers->inputClients; others; others = others->next) if (SameClient(others, client)) others->mask[dev->id] = NoEventMask; for (grab = wPassiveGrabs(pWin); grab; grab = next) { next = grab->next; if ((grab->device == dev) && (client->clientAsMask == CLIENT_BITS(grab->resource))) FreeResource(grab->resource, RT_NONE); } } /*********************************************************************** * * Walk through the window tree, deleting event selections for this client * from this device from all windows. * */ static void DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client) { WindowPtr p2; while (p1) { p2 = p1->firstChild; DeleteDeviceEvents(dev, p1, client); DeleteEventsFromChildren(dev, p2, client); p1 = p1->nextSib; } } /*********************************************************************** * * This procedure closes an input device. * */ int ProcXCloseDevice(ClientPtr client) { int rc, i; WindowPtr pWin, p1; DeviceIntPtr d; REQUEST(xCloseDeviceReq); REQUEST_SIZE_MATCH(xCloseDeviceReq); rc = dixLookupDevice(&d, stuff->deviceid, client, DixUseAccess); if (rc != Success) return rc; if (d->deviceGrab.grab && SameClient(d->deviceGrab.grab, client)) (*d->deviceGrab.DeactivateGrab) (d); /* release active grab */ /* Remove event selections from all windows for events from this device * and selected by this client. * Delete passive grabs from all windows for this device. */ for (i = 0; i < screenInfo.numScreens; i++) { pWin = screenInfo.screens[i]->root; DeleteDeviceEvents(d, pWin, client); p1 = pWin->firstChild; DeleteEventsFromChildren(d, p1, client); } return Success; } xorg-server-21.1.16/Xi/closedev.h0000644000175000017500000000265214757411105012175 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef CLOSEDEV_H #define CLOSEDEV_H 1 int SProcXCloseDevice(ClientPtr /* client */ ); int ProcXCloseDevice(ClientPtr /* client */ ); #endif /* CLOSEDEV_H */ xorg-server-21.1.16/Xi/devbell.c0000644000175000017500000001144514757411105012001 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to change the keyboard device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "devbell.h" /*********************************************************************** * * This procedure is invoked to swap the request bytes if the server and * client have a different byte order. * */ int _X_COLD SProcXDeviceBell(ClientPtr client) { REQUEST(xDeviceBellReq); swaps(&stuff->length); return (ProcXDeviceBell(client)); } /*********************************************************************** * * This procedure rings a bell on an extension device. * */ int ProcXDeviceBell(ClientPtr client) { DeviceIntPtr dev; KbdFeedbackPtr k; BellFeedbackPtr b; int rc, base; int newpercent; CARD8 class; void *ctrl; BellProcPtr proc; REQUEST(xDeviceBellReq); REQUEST_SIZE_MATCH(xDeviceBellReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixBellAccess); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = stuff->percent; return BadValue; } if (stuff->feedbackclass == KbdFeedbackClass) { for (k = dev->kbdfeed; k; k = k->next) if (k->ctrl.id == stuff->feedbackid) break; if (!k) { client->errorValue = stuff->feedbackid; return BadValue; } base = k->ctrl.bell; proc = k->BellProc; ctrl = (void *) &(k->ctrl); class = KbdFeedbackClass; } else if (stuff->feedbackclass == BellFeedbackClass) { for (b = dev->bell; b; b = b->next) if (b->ctrl.id == stuff->feedbackid) break; if (!b) { client->errorValue = stuff->feedbackid; return BadValue; } base = b->ctrl.percent; proc = b->BellProc; ctrl = (void *) &(b->ctrl); class = BellFeedbackClass; } else { client->errorValue = stuff->feedbackclass; return BadValue; } newpercent = (base * stuff->percent) / 100; if (stuff->percent < 0) newpercent = base + newpercent; else newpercent = base - newpercent + stuff->percent; if (proc == NULL) return BadValue; (*proc) (newpercent, dev, ctrl, class); return Success; } xorg-server-21.1.16/Xi/devbell.h0000644000175000017500000000264714757411105012012 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef DEVBELL_H #define DEVBELL_H 1 int SProcXDeviceBell(ClientPtr /* client */ ); int ProcXDeviceBell(ClientPtr /* client */ ); #endif /* DEVBELL_H */ xorg-server-21.1.16/Xi/exevents.c0000644000175000017500000032071114757411105012224 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /* * Copyright © 2010 Collabora Ltd. * Copyright © 2011 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Daniel Stone */ /******************************************************************** * * Routines to register and initialize extension input devices. * This also contains ProcessOtherEvent, the routine called from DDX * to route extension events. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include #include #include #include #include #include #include "windowstr.h" #include "miscstruct.h" #include "region.h" #include "exevents.h" #include "extnsionst.h" #include "exglobals.h" #include "eventstr.h" #include "dixevents.h" /* DeliverFocusedEvent */ #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" #include "listdev.h" /* for CopySwapXXXClass */ #include "xace.h" #include "xiquerydevice.h" /* For List*Info */ #include "eventconvert.h" #include "eventstr.h" #include "inpututils.h" #include "mi.h" #include #include "xkbsrv.h" #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) #define AllButtonsMask ( \ Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask ) Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , Bool /* ignoreSelectedEvents */ ); static Bool MakeInputMasks(WindowPtr /* pWin */ ); /* * Only let the given client know of core events which will affect its * interpretation of input events, if the client's ClientPointer (or the * paired keyboard) is the current device. */ int XIShouldNotify(ClientPtr client, DeviceIntPtr dev) { DeviceIntPtr current_ptr = PickPointer(client); DeviceIntPtr current_kbd = GetMaster(current_ptr, KEYBOARD_OR_FLOAT); if (dev == current_kbd || dev == current_ptr) return 1; return 0; } Bool IsPointerEvent(InternalEvent *event) { switch (event->any.type) { case ET_ButtonPress: case ET_ButtonRelease: case ET_Motion: /* XXX: enter/leave ?? */ return TRUE; default: break; } return FALSE; } Bool IsTouchEvent(InternalEvent *event) { switch (event->any.type) { case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: return TRUE; default: break; } return FALSE; } Bool IsGestureEvent(InternalEvent *event) { switch (event->any.type) { case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: return TRUE; default: break; } return FALSE; } Bool IsGestureBeginEvent(InternalEvent *event) { switch (event->any.type) { case ET_GesturePinchBegin: case ET_GestureSwipeBegin: return TRUE; default: break; } return FALSE; } Bool IsGestureEndEvent(InternalEvent *event) { switch (event->any.type) { case ET_GesturePinchEnd: case ET_GestureSwipeEnd: return TRUE; default: break; } return FALSE; } /** * @return the device matching the deviceid of the device set in the event, or * NULL if the event is not an XInput event. */ DeviceIntPtr XIGetDevice(xEvent *xE) { DeviceIntPtr pDev = NULL; if (xE->u.u.type == DeviceButtonPress || xE->u.u.type == DeviceButtonRelease || xE->u.u.type == DeviceMotionNotify || xE->u.u.type == ProximityIn || xE->u.u.type == ProximityOut || xE->u.u.type == DevicePropertyNotify) { int rc; int id; id = ((deviceKeyButtonPointer *) xE)->deviceid & ~MORE_EVENTS; rc = dixLookupDevice(&pDev, id, serverClient, DixUnknownAccess); if (rc != Success) ErrorF("[dix] XIGetDevice failed on XACE restrictions (%d)\n", rc); } return pDev; } /** * Copy the device->key into master->key and send a mapping notify to the * clients if appropriate. * master->key needs to be allocated by the caller. * * Device is the slave device. If it is attached to a master device, we may * need to send a mapping notify to the client because it causes the MD * to change state. * * Mapping notify needs to be sent in the following cases: * - different slave device on same master * - different master * * XXX: They way how the code is we also send a map notify if the slave device * stays the same, but the master changes. This isn't really necessary though. * * XXX: this gives you funny behaviour with the ClientPointer. When a * MappingNotify is sent to the client, the client usually responds with a * GetKeyboardMapping. This will retrieve the ClientPointer's keyboard * mapping, regardless of which keyboard sent the last mapping notify request. * So depending on the CP setting, your keyboard may change layout in each * app... * * This code is basically the old SwitchCoreKeyboard. */ void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master) { KeyClassPtr mk = master->key; if (device == master) return; mk->sourceid = device->id; if (!XkbDeviceApplyKeymap(master, device->key->xkbInfo->desc)) FatalError("Couldn't pivot keymap from device to core!\n"); } /** * Copies the feedback classes from device "from" into device "to". Classes * are duplicated (not just flipping the pointers). All feedback classes are * linked lists, the full list is duplicated. */ static void DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; if (from->intfeed) { IntegerFeedbackPtr *i, it; if (!to->intfeed) { classes = to->unused_classes; to->intfeed = classes->intfeed; classes->intfeed = NULL; } i = &to->intfeed; for (it = from->intfeed; it; it = it->next) { if (!(*i)) { *i = calloc(1, sizeof(IntegerFeedbackClassRec)); if (!(*i)) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*i)->CtrlProc = it->CtrlProc; (*i)->ctrl = it->ctrl; i = &(*i)->next; } } else if (to->intfeed && !from->intfeed) { classes = to->unused_classes; classes->intfeed = to->intfeed; to->intfeed = NULL; } if (from->stringfeed) { StringFeedbackPtr *s, it; if (!to->stringfeed) { classes = to->unused_classes; to->stringfeed = classes->stringfeed; classes->stringfeed = NULL; } s = &to->stringfeed; for (it = from->stringfeed; it; it = it->next) { if (!(*s)) { *s = calloc(1, sizeof(StringFeedbackClassRec)); if (!(*s)) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*s)->CtrlProc = it->CtrlProc; (*s)->ctrl = it->ctrl; s = &(*s)->next; } } else if (to->stringfeed && !from->stringfeed) { classes = to->unused_classes; classes->stringfeed = to->stringfeed; to->stringfeed = NULL; } if (from->bell) { BellFeedbackPtr *b, it; if (!to->bell) { classes = to->unused_classes; to->bell = classes->bell; classes->bell = NULL; } b = &to->bell; for (it = from->bell; it; it = it->next) { if (!(*b)) { *b = calloc(1, sizeof(BellFeedbackClassRec)); if (!(*b)) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*b)->BellProc = it->BellProc; (*b)->CtrlProc = it->CtrlProc; (*b)->ctrl = it->ctrl; b = &(*b)->next; } } else if (to->bell && !from->bell) { classes = to->unused_classes; classes->bell = to->bell; to->bell = NULL; } if (from->leds) { LedFeedbackPtr *l, it; if (!to->leds) { classes = to->unused_classes; to->leds = classes->leds; classes->leds = NULL; } l = &to->leds; for (it = from->leds; it; it = it->next) { if (!(*l)) { *l = calloc(1, sizeof(LedFeedbackClassRec)); if (!(*l)) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*l)->CtrlProc = it->CtrlProc; (*l)->ctrl = it->ctrl; if ((*l)->xkb_sli) XkbFreeSrvLedInfo((*l)->xkb_sli); (*l)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, NULL, *l); l = &(*l)->next; } } else if (to->leds && !from->leds) { classes = to->unused_classes; classes->leds = to->leds; to->leds = NULL; } } static void DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; /* XkbInitDevice (->XkbInitIndicatorMap->XkbFindSrvLedInfo) relies on the * kbdfeed to be set up properly, so let's do the feedback classes first. */ if (from->kbdfeed) { KbdFeedbackPtr *k, it; if (!to->kbdfeed) { classes = to->unused_classes; to->kbdfeed = classes->kbdfeed; if (!to->kbdfeed) InitKeyboardDeviceStruct(to, NULL, NULL, NULL); classes->kbdfeed = NULL; } k = &to->kbdfeed; for (it = from->kbdfeed; it; it = it->next) { if (!(*k)) { *k = calloc(1, sizeof(KbdFeedbackClassRec)); if (!*k) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*k)->BellProc = it->BellProc; (*k)->CtrlProc = it->CtrlProc; (*k)->ctrl = it->ctrl; if ((*k)->xkb_sli) XkbFreeSrvLedInfo((*k)->xkb_sli); (*k)->xkb_sli = XkbCopySrvLedInfo(from, it->xkb_sli, *k, NULL); k = &(*k)->next; } } else if (to->kbdfeed && !from->kbdfeed) { classes = to->unused_classes; classes->kbdfeed = to->kbdfeed; to->kbdfeed = NULL; } if (from->key) { if (!to->key) { classes = to->unused_classes; to->key = classes->key; if (!to->key) InitKeyboardDeviceStruct(to, NULL, NULL, NULL); else classes->key = NULL; } CopyKeyClass(from, to); } else if (to->key && !from->key) { classes = to->unused_classes; classes->key = to->key; to->key = NULL; } /* If a SrvLedInfoPtr's flags are XkbSLI_IsDefault, the names and maps * pointer point into the xkbInfo->desc struct. XkbCopySrvLedInfo * didn't update the pointers so we need to do it manually here. */ if (to->kbdfeed) { KbdFeedbackPtr k; for (k = to->kbdfeed; k; k = k->next) { if (!k->xkb_sli) continue; if (k->xkb_sli->flags & XkbSLI_IsDefault) { k->xkb_sli->names = to->key->xkbInfo->desc->names->indicators; k->xkb_sli->maps = to->key->xkbInfo->desc->indicators->maps; } } } /* We can't just copy over the focus class. When an app sets the focus, * it'll do so on the master device. Copying the SDs focus means losing * the focus. * So we only copy the focus class if the device didn't have one, * otherwise we leave it as it is. */ if (from->focus) { if (!to->focus) { WindowPtr *oldTrace; classes = to->unused_classes; to->focus = classes->focus; if (!to->focus) { to->focus = calloc(1, sizeof(FocusClassRec)); if (!to->focus) FatalError("[Xi] no memory for class shift.\n"); } else classes->focus = NULL; oldTrace = to->focus->trace; memcpy(to->focus, from->focus, sizeof(FocusClassRec)); to->focus->trace = reallocarray(oldTrace, to->focus->traceSize, sizeof(WindowPtr)); if (!to->focus->trace && to->focus->traceSize) FatalError("[Xi] no memory for trace.\n"); memcpy(to->focus->trace, from->focus->trace, from->focus->traceSize * sizeof(WindowPtr)); to->focus->sourceid = from->id; } } else if (to->focus) { classes = to->unused_classes; classes->focus = to->focus; to->focus = NULL; } } /* FIXME: this should really be shared with the InitValuatorAxisClassRec and * similar */ static void DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { ClassesPtr classes; /* Feedback classes must be copied first */ if (from->ptrfeed) { PtrFeedbackPtr *p, it; if (!to->ptrfeed) { classes = to->unused_classes; to->ptrfeed = classes->ptrfeed; classes->ptrfeed = NULL; } p = &to->ptrfeed; for (it = from->ptrfeed; it; it = it->next) { if (!(*p)) { *p = calloc(1, sizeof(PtrFeedbackClassRec)); if (!*p) { ErrorF("[Xi] Cannot alloc memory for class copy."); return; } } (*p)->CtrlProc = it->CtrlProc; (*p)->ctrl = it->ctrl; p = &(*p)->next; } } else if (to->ptrfeed && !from->ptrfeed) { classes = to->unused_classes; classes->ptrfeed = to->ptrfeed; to->ptrfeed = NULL; } if (from->valuator) { ValuatorClassPtr v; if (!to->valuator) { classes = to->unused_classes; to->valuator = classes->valuator; if (to->valuator) classes->valuator = NULL; } v = AllocValuatorClass(to->valuator, from->valuator->numAxes); if (!v) FatalError("[Xi] no memory for class shift.\n"); to->valuator = v; memcpy(v->axes, from->valuator->axes, v->numAxes * sizeof(AxisInfo)); v->sourceid = from->id; } else if (to->valuator && !from->valuator) { classes = to->unused_classes; classes->valuator = to->valuator; to->valuator = NULL; } if (from->button) { if (!to->button) { classes = to->unused_classes; to->button = classes->button; if (!to->button) { to->button = calloc(1, sizeof(ButtonClassRec)); if (!to->button) FatalError("[Xi] no memory for class shift.\n"); to->button->numButtons = from->button->numButtons; } else classes->button = NULL; } if (from->button->xkb_acts) { size_t maxbuttons = max(to->button->numButtons, from->button->numButtons); to->button->xkb_acts = xnfreallocarray(to->button->xkb_acts, maxbuttons, sizeof(XkbAction)); memset(to->button->xkb_acts, 0, maxbuttons * sizeof(XkbAction)); memcpy(to->button->xkb_acts, from->button->xkb_acts, from->button->numButtons * sizeof(XkbAction)); } else { free(to->button->xkb_acts); to->button->xkb_acts = NULL; } memcpy(to->button->labels, from->button->labels, from->button->numButtons * sizeof(Atom)); to->button->sourceid = from->id; } else if (to->button && !from->button) { classes = to->unused_classes; classes->button = to->button; to->button = NULL; } if (from->proximity) { if (!to->proximity) { classes = to->unused_classes; to->proximity = classes->proximity; if (!to->proximity) { to->proximity = calloc(1, sizeof(ProximityClassRec)); if (!to->proximity) FatalError("[Xi] no memory for class shift.\n"); } else classes->proximity = NULL; } memcpy(to->proximity, from->proximity, sizeof(ProximityClassRec)); to->proximity->sourceid = from->id; } else if (to->proximity) { classes = to->unused_classes; classes->proximity = to->proximity; to->proximity = NULL; } if (from->touch) { TouchClassPtr t, f; if (!to->touch) { classes = to->unused_classes; to->touch = classes->touch; if (!to->touch) { int i; to->touch = calloc(1, sizeof(TouchClassRec)); if (!to->touch) FatalError("[Xi] no memory for class shift.\n"); to->touch->num_touches = from->touch->num_touches; to->touch->touches = calloc(to->touch->num_touches, sizeof(TouchPointInfoRec)); for (i = 0; i < to->touch->num_touches; i++) TouchInitTouchPoint(to->touch, to->valuator, i); if (!to->touch) FatalError("[Xi] no memory for class shift.\n"); } else classes->touch = NULL; } t = to->touch; f = from->touch; t->sourceid = f->sourceid; t->max_touches = f->max_touches; t->mode = f->mode; t->buttonsDown = f->buttonsDown; t->state = f->state; t->motionMask = f->motionMask; /* to->touches and to->num_touches are separate on the master, * don't copy */ } /* Don't remove touch class if from->touch is non-existent. The to device * may have an active touch grab, so we need to keep the touch class record * around. */ if (from->gesture) { if (!to->gesture) { classes = to->unused_classes; to->gesture = classes->gesture; if (!to->gesture) { if (!InitGestureClassDeviceStruct(to, from->gesture->max_touches)) FatalError("[Xi] no memory for class shift.\n"); } else classes->gesture = NULL; } to->gesture->sourceid = from->gesture->sourceid; /* to->gesture->gesture is separate on the master, don't copy */ } /* Don't remove gesture class if from->gesture is non-existent. The to device * may have an active gesture grab, so we need to keep the gesture class record * around. */ } /** * Copies the CONTENT of the classes of device from into the classes in device * to. From and to are identical after finishing. * * If to does not have classes from currently has, the classes are stored in * to's devPrivates system. Later, we recover it again from there if needed. * Saves a few memory allocations. */ void DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dce) { input_lock(); /* generic feedback classes, not tied to pointer and/or keyboard */ DeepCopyFeedbackClasses(from, to); if ((dce->flags & DEVCHANGE_KEYBOARD_EVENT)) DeepCopyKeyboardClasses(from, to); if ((dce->flags & DEVCHANGE_POINTER_EVENT)) DeepCopyPointerClasses(from, to); input_unlock(); } /** * Send an XI2 DeviceChangedEvent to all interested clients. */ void XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce) { xXIDeviceChangedEvent *dcce; int rc; rc = EventToXI2((InternalEvent *) dce, (xEvent **) &dcce); if (rc != Success) { ErrorF("[Xi] event conversion from DCE failed with code %d\n", rc); return; } /* we don't actually swap if there's a NullClient, swapping is done * later when event is delivered. */ SendEventToAllWindows(device, XI_DeviceChangedMask, (xEvent *) dcce, 1); free(dcce); } static void ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce) { DeviceIntPtr slave; int rc; /* For now, we don't have devices that change physically. */ if (!IsMaster(device)) return; rc = dixLookupDevice(&slave, dce->sourceid, serverClient, DixReadAccess); if (rc != Success) return; /* Device has disappeared */ if (IsMaster(slave)) return; if (IsFloating(slave)) return; /* set floating since the event */ if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid) return; /* not our slave anymore, don't care */ /* FIXME: we probably need to send a DCE for the new slave now */ device->public.devicePrivate = slave->public.devicePrivate; /* FIXME: the classes may have changed since we generated the event. */ DeepCopyDeviceClasses(slave, device, dce); dce->deviceid = device->id; XISendDeviceChangedEvent(device, dce); } /** * Add state and motionMask to the filter for this event. The protocol * supports some extra masks for motion when a button is down: * ButtonXMotionMask and the DeviceButtonMotionMask to trigger only when at * least one button (or that specific button is down). These masks need to * be added to the filters for core/XI motion events. * * @param device The device to update the mask for * @param state The current button state mask * @param motion_mask The motion mask (DeviceButtonMotionMask or 0) */ static void UpdateDeviceMotionMask(DeviceIntPtr device, unsigned short state, Mask motion_mask) { Mask mask; mask = PointerMotionMask | state | motion_mask; SetMaskForEvent(device->id, mask, DeviceMotionNotify); SetMaskForEvent(device->id, mask, MotionNotify); } static void IncreaseButtonCount(DeviceIntPtr dev, int key, CARD8 *buttons_down, Mask *motion_mask, unsigned short *state) { if (dev->valuator) dev->valuator->motionHintWindow = NullWindow; (*buttons_down)++; *motion_mask = DeviceButtonMotionMask; if (dev->button->map[key] <= 5) *state |= (Button1Mask >> 1) << dev->button->map[key]; } static void DecreaseButtonCount(DeviceIntPtr dev, int key, CARD8 *buttons_down, Mask *motion_mask, unsigned short *state) { if (dev->valuator) dev->valuator->motionHintWindow = NullWindow; if (*buttons_down >= 1 && !--(*buttons_down)) *motion_mask = 0; if (dev->button->map[key] <= 5) *state &= ~((Button1Mask >> 1) << dev->button->map[key]); } /** * Update the device state according to the data in the event. * * return values are * DEFAULT ... process as normal * DONT_PROCESS ... return immediately from caller */ #define DEFAULT 0 #define DONT_PROCESS 1 int UpdateDeviceState(DeviceIntPtr device, DeviceEvent *event) { int i; int key = 0, last_valuator; KeyClassPtr k = NULL; ButtonClassPtr b = NULL; ValuatorClassPtr v = NULL; TouchClassPtr t = NULL; /* This event is always the first we get, before the actual events with * the data. However, the way how the DDX is set up, "device" will * actually be the slave device that caused the event. */ switch (event->type) { case ET_DeviceChanged: ChangeMasterDeviceClasses(device, (DeviceChangedEvent *) event); return DONT_PROCESS; /* event has been sent already */ case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: break; default: /* other events don't update the device */ return DEFAULT; } k = device->key; v = device->valuator; b = device->button; t = device->touch; key = event->detail.key; /* Update device axis */ /* Check valuators first */ last_valuator = -1; for (i = 0; i < MAX_VALUATORS; i++) { if (BitIsOn(&event->valuators.mask, i)) { if (!v) { ErrorF("[Xi] Valuators reported for non-valuator device '%s'. " "Ignoring event.\n", device->name); return DONT_PROCESS; } else if (v->numAxes < i) { ErrorF("[Xi] Too many valuators reported for device '%s'. " "Ignoring event.\n", device->name); return DONT_PROCESS; } last_valuator = i; } } for (i = 0; i <= last_valuator && i < v->numAxes; i++) { /* XXX: Relative/Absolute mode */ if (BitIsOn(&event->valuators.mask, i)) v->axisVal[i] = event->valuators.data[i]; } if (event->type == ET_KeyPress) { if (!k) return DONT_PROCESS; /* don't allow ddx to generate multiple downs, but repeats are okay */ if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat) return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; set_key_down(device, key, KEY_PROCESSED); } else if (event->type == ET_KeyRelease) { if (!k) return DONT_PROCESS; if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */ return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; set_key_up(device, key, KEY_PROCESSED); } else if (event->type == ET_ButtonPress) { if (!b) return DONT_PROCESS; if (button_is_down(device, key, BUTTON_PROCESSED)) return DONT_PROCESS; set_button_down(device, key, BUTTON_PROCESSED); if (!b->map[key]) return DONT_PROCESS; IncreaseButtonCount(device, key, &b->buttonsDown, &b->motionMask, &b->state); UpdateDeviceMotionMask(device, b->state, b->motionMask); } else if (event->type == ET_ButtonRelease) { if (!b) return DONT_PROCESS; if (!button_is_down(device, key, BUTTON_PROCESSED)) return DONT_PROCESS; if (IsMaster(device)) { DeviceIntPtr sd; /* * Leave the button down if any slave has the * button still down. Note that this depends on the * event being delivered through the slave first */ for (sd = inputInfo.devices; sd; sd = sd->next) { if (IsMaster(sd) || GetMaster(sd, MASTER_POINTER) != device) continue; if (!sd->button) continue; for (i = 1; i <= sd->button->numButtons; i++) if (sd->button->map[i] == key && button_is_down(sd, i, BUTTON_PROCESSED)) return DONT_PROCESS; } } set_button_up(device, key, BUTTON_PROCESSED); if (!b->map[key]) return DONT_PROCESS; DecreaseButtonCount(device, key, &b->buttonsDown, &b->motionMask, &b->state); UpdateDeviceMotionMask(device, b->state, b->motionMask); } else if (event->type == ET_ProximityIn) device->proximity->in_proximity = TRUE; else if (event->type == ET_ProximityOut) device->proximity->in_proximity = FALSE; else if (event->type == ET_TouchBegin) { BUG_RETURN_VAL(!b || !v, DONT_PROCESS); BUG_RETURN_VAL(!t, DONT_PROCESS); if (!b->map[key]) return DONT_PROCESS; if (!(event->flags & TOUCH_POINTER_EMULATED) || (event->flags & TOUCH_REPLAYING)) return DONT_PROCESS; IncreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, &t->state); UpdateDeviceMotionMask(device, t->state, DeviceButtonMotionMask); } else if (event->type == ET_TouchEnd) { BUG_RETURN_VAL(!b || !v, DONT_PROCESS); BUG_RETURN_VAL(!t, DONT_PROCESS); if (t->buttonsDown <= 0 || !b->map[key]) return DONT_PROCESS; if (!(event->flags & TOUCH_POINTER_EMULATED)) return DONT_PROCESS; DecreaseButtonCount(device, key, &t->buttonsDown, &t->motionMask, &t->state); UpdateDeviceMotionMask(device, t->state, DeviceButtonMotionMask); } return DEFAULT; } /** * A client that does not have the TouchOwnership mask set may not receive a * TouchBegin event if there is at least one grab active. * * @return TRUE if the client selected for ownership events on the given * window for this device, FALSE otherwise */ static inline Bool TouchClientWantsOwnershipEvents(ClientPtr client, DeviceIntPtr dev, WindowPtr win) { InputClients *iclient; nt_list_for_each_entry(iclient, wOtherInputMasks(win)->inputClients, next) { if (rClient(iclient) != client) continue; return xi2mask_isset(iclient->xi2mask, dev, XI_TouchOwnership); } return FALSE; } static void TouchSendOwnershipEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, int reason, XID resource) { int nev, i; InternalEvent *tel = InitEventList(GetMaximumEventsNum()); nev = GetTouchOwnershipEvents(tel, dev, ti, reason, resource, 0); for (i = 0; i < nev; i++) mieqProcessDeviceEvent(dev, tel + i, NULL); FreeEventList(tel, GetMaximumEventsNum()); } /** * Attempts to deliver a touch event to the given client. */ static Bool DeliverOneTouchEvent(ClientPtr client, DeviceIntPtr dev, TouchPointInfoPtr ti, GrabPtr grab, WindowPtr win, InternalEvent *ev) { int err; xEvent *xi2; Mask filter; Window child = DeepestSpriteWin(&ti->sprite)->drawable.id; /* FIXME: owner event handling */ /* If the client does not have the ownership mask set and is not * the current owner of the touch, only pretend we delivered */ if (!grab && ti->num_grabs != 0 && !TouchClientWantsOwnershipEvents(client, dev, win)) return TRUE; /* If we fail here, we're going to leave a client hanging. */ err = EventToXI2(ev, &xi2); if (err != Success) FatalError("[Xi] %s: XI2 conversion failed in %s" " (%d)\n", dev->name, __func__, err); FixUpEventFromWindow(&ti->sprite, xi2, win, child, FALSE); filter = GetEventFilter(dev, xi2); if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success) return FALSE; err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab); free(xi2); /* Returning the value from TryClientEvents isn't useful, since all our * resource-gone cleanups will update the delivery list anyway. */ return TRUE; } static void ActivateEarlyAccept(DeviceIntPtr dev, TouchPointInfoPtr ti) { ClientPtr client; XID error; GrabPtr grab = ti->listeners[0].grab; BUG_RETURN(ti->listeners[0].type != TOUCH_LISTENER_GRAB && ti->listeners[0].type != TOUCH_LISTENER_POINTER_GRAB); BUG_RETURN(!grab); client = rClient(grab); if (TouchAcceptReject(client, dev, XIAcceptTouch, ti->client_id, ti->listeners[0].window->drawable.id, &error) != Success) ErrorF("[Xi] Failed to accept touch grab after early acceptance.\n"); } /** * Find the oldest touch that still has a pointer emulation client. * * Pointer emulation can only be performed for the oldest touch. Otherwise, the * order of events seen by the client will be wrong. This function helps us find * the next touch to be emulated. * * @param dev The device to find touches for. */ static TouchPointInfoPtr FindOldestPointerEmulatedTouch(DeviceIntPtr dev) { TouchPointInfoPtr oldest = NULL; int i; for (i = 0; i < dev->touch->num_touches; i++) { TouchPointInfoPtr ti = dev->touch->touches + i; int j; if (!ti->active || !ti->emulate_pointer) continue; for (j = 0; j < ti->num_listeners; j++) { if (ti->listeners[j].type == TOUCH_LISTENER_POINTER_GRAB || ti->listeners[j].type == TOUCH_LISTENER_POINTER_REGULAR) break; } if (j == ti->num_listeners) continue; if (!oldest) { oldest = ti; continue; } if (oldest->client_id - ti->client_id < UINT_MAX / 2) oldest = ti; } return oldest; } /** * If the current owner has rejected the event, deliver the * TouchOwnership/TouchBegin to the next item in the sprite stack. */ static void TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti, TouchOwnershipEvent *ev) { TouchListener *listener = &ti->listeners[0]; /* new owner */ int accepted_early = listener->state == TOUCH_LISTENER_EARLY_ACCEPT; /* Deliver the ownership */ if (listener->state == TOUCH_LISTENER_AWAITING_OWNER || accepted_early) DeliverTouchEvents(dev, ti, (InternalEvent *) ev, listener->listener); else if (listener->state == TOUCH_LISTENER_AWAITING_BEGIN) { /* We can't punt to a pointer listener unless all older pointer * emulated touches have been seen already. */ if ((listener->type == TOUCH_LISTENER_POINTER_GRAB || listener->type == TOUCH_LISTENER_POINTER_REGULAR) && ti != FindOldestPointerEmulatedTouch(dev)) return; TouchEventHistoryReplay(ti, dev, listener->listener); } /* New owner has Begin/Update but not end. If touch is pending_finish, * emulate the TouchEnd now */ if (ti->pending_finish) { TouchEmitTouchEnd(dev, ti, 0, 0); /* If the last owner is not a touch grab, finalise the touch, we won't get more correspondence on this. */ if (ti->num_listeners == 1 && (ti->num_grabs == 0 || listener->grab->grabtype != XI2 || !xi2mask_isset(listener->grab->xi2mask, dev, XI_TouchBegin))) { TouchEndTouch(dev, ti); return; } } if (accepted_early) ActivateEarlyAccept(dev, ti); } /** * Check the oldest touch to see if it needs to be replayed to its pointer * owner. * * Touch event propagation is paused if it hits a pointer listener while an * older touch with a pointer listener is waiting on accept or reject. This * function will restart propagation of a paused touch if needed. * * @param dev The device to check touches for. */ static void CheckOldestTouch(DeviceIntPtr dev) { TouchPointInfoPtr oldest = FindOldestPointerEmulatedTouch(dev); if (oldest && oldest->listeners[0].state == TOUCH_LISTENER_AWAITING_BEGIN) TouchPuntToNextOwner(dev, oldest, NULL); } /** * Process a touch rejection. * * @param sourcedev The source device of the touch sequence. * @param ti The touchpoint info record. * @param resource The resource of the client rejecting the touch. * @param ev TouchOwnership event to send. Set to NULL if no event should be * sent. */ void TouchRejected(DeviceIntPtr sourcedev, TouchPointInfoPtr ti, XID resource, TouchOwnershipEvent *ev) { Bool was_owner = (resource == ti->listeners[0].listener); int i; /* Send a TouchEnd event to the resource being removed, but only if they * haven't received one yet already */ for (i = 0; i < ti->num_listeners; i++) { if (ti->listeners[i].listener == resource) { if (ti->listeners[i].state != TOUCH_LISTENER_HAS_END) TouchEmitTouchEnd(sourcedev, ti, TOUCH_REJECT, resource); break; } } /* Remove the resource from the listener list, updating * ti->num_listeners, as well as ti->num_grabs if it was a grab. */ TouchRemoveListener(ti, resource); /* If the current owner was removed and there are further listeners, deliver * the TouchOwnership or TouchBegin event to the new owner. */ if (ev && ti->num_listeners > 0 && was_owner) TouchPuntToNextOwner(sourcedev, ti, ev); else if (ti->num_listeners == 0) TouchEndTouch(sourcedev, ti); CheckOldestTouch(sourcedev); } /** * Processes a TouchOwnership event, indicating a grab has accepted the touch * it currently owns, or a grab or selection has been removed. Will generate * and send TouchEnd events to all clients removed from the delivery list, as * well as possibly sending the new TouchOwnership event. May end the * touchpoint if it is pending finish. */ static void ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev, DeviceIntPtr dev) { TouchPointInfoPtr ti = TouchFindByClientID(dev, ev->touchid); if (!ti) { DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n", dev->name, ev->type, ev->touchid); return; } if (ev->reason == XIRejectTouch) TouchRejected(dev, ti, ev->resource, ev); else if (ev->reason == XIAcceptTouch) { int i; /* For pointer-emulated listeners that ungrabbed the active grab, * the state was forced to TOUCH_LISTENER_HAS_END. Still go * through the motions of ending the touch if the listener has * already seen the end. This ensures that the touch record is ended in * the server. */ if (ti->listeners[0].state == TOUCH_LISTENER_HAS_END) TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[0].listener); /* The touch owner has accepted the touch. Send TouchEnd events to * everyone else, and truncate the list of listeners. */ for (i = 1; i < ti->num_listeners; i++) TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[i].listener); while (ti->num_listeners > 1) TouchRemoveListener(ti, ti->listeners[1].listener); /* Owner accepted after receiving end */ if (ti->listeners[0].state == TOUCH_LISTENER_HAS_END) TouchEndTouch(dev, ti); else ti->listeners[0].state = TOUCH_LISTENER_HAS_ACCEPTED; } else { /* this is the very first ownership event for a grab */ DeliverTouchEvents(dev, ti, (InternalEvent *) ev, ev->resource); } } /** * Copy the event's valuator information into the touchpoint, we may need * this for emulated TouchEnd events. */ static void TouchCopyValuatorData(DeviceEvent *ev, TouchPointInfoPtr ti) { int i; for (i = 0; i < ARRAY_SIZE(ev->valuators.data); i++) if (BitIsOn(ev->valuators.mask, i)) valuator_mask_set_double(ti->valuators, i, ev->valuators.data[i]); } /** * Given a touch event and a potential listener, retrieve info needed for * processing the event. * * @param dev The device generating the touch event. * @param ti The touch point info record for the touch event. * @param ev The touch event to process. * @param listener The touch event listener that may receive the touch event. * @param[out] client The client that should receive the touch event. * @param[out] win The window to deliver the event on. * @param[out] grab The grab to deliver the event through, if any. * @param[out] mask The XI 2.x event mask of the grab or selection, if any. * @return TRUE if an event should be delivered to the listener, FALSE * otherwise. */ static Bool RetrieveTouchDeliveryData(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, TouchListener * listener, ClientPtr *client, WindowPtr *win, GrabPtr *grab, XI2Mask **mask) { int rc; InputClients *iclients = NULL; *mask = NULL; if (listener->type == TOUCH_LISTENER_GRAB || listener->type == TOUCH_LISTENER_POINTER_GRAB) { *grab = listener->grab; BUG_RETURN_VAL(!*grab, FALSE); *client = rClient(*grab); *win = (*grab)->window; *mask = (*grab)->xi2mask; } else { rc = dixLookupResourceByType((void **) win, listener->listener, listener->resource_type, serverClient, DixSendAccess); if (rc != Success) return FALSE; if (listener->level == XI2) { int evtype; if (ti->emulate_pointer && listener->type == TOUCH_LISTENER_POINTER_REGULAR) evtype = GetXI2Type(TouchGetPointerEventType(ev)); else evtype = GetXI2Type(ev->any.type); nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, next) if (xi2mask_isset(iclients->xi2mask, dev, evtype)) break; BUG_RETURN_VAL(!iclients, FALSE); *mask = iclients->xi2mask; *client = rClient(iclients); } else if (listener->level == XI) { int xi_type = GetXIType(TouchGetPointerEventType(ev)); Mask xi_filter = event_get_filter_from_type(dev, xi_type); nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, next) if (iclients->mask[dev->id] & xi_filter) break; BUG_RETURN_VAL(!iclients, FALSE); *client = rClient(iclients); } else { int coretype = GetCoreType(TouchGetPointerEventType(ev)); Mask core_filter = event_get_filter_from_type(dev, coretype); OtherClients *oclients; /* all others */ nt_list_for_each_entry(oclients, (OtherClients *) wOtherClients(*win), next) if (oclients->mask & core_filter) break; /* if owner selected, oclients is NULL */ *client = oclients ? rClient(oclients) : wClient(*win); } *grab = NULL; } return TRUE; } static int DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, TouchListener * listener, ClientPtr client, WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) { InternalEvent motion, button; InternalEvent *ptrev = &motion; int nevents; DeviceIntPtr kbd; /* There may be a pointer grab on the device */ if (!grab) { grab = dev->deviceGrab.grab; if (grab) { win = grab->window; xi2mask = grab->xi2mask; client = rClient(grab); } } /* We don't deliver pointer events to non-owners */ if (!TouchResourceIsOwner(ti, listener->listener)) return !Success; if (!ti->emulate_pointer) return !Success; nevents = TouchConvertToPointerEvent(ev, &motion, &button); BUG_RETURN_VAL(nevents == 0, BadValue); /* Note that here we deliver only part of the events that are generated by the touch event: * * TouchBegin results in ButtonPress (motion is handled in DeliverEmulatedMotionEvent) * TouchUpdate results in Motion * TouchEnd results in ButtonRelease (motion is handled in DeliverEmulatedMotionEvent) */ if (nevents > 1) ptrev = &button; kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); event_set_state(dev, kbd, &ptrev->device_event); ptrev->device_event.corestate = event_get_corestate(dev, kbd); if (grab) { /* this side-steps the usual activation mechanisms, but... */ if (ev->any.type == ET_TouchBegin && !dev->deviceGrab.grab) ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */ else { int deliveries = 0; /* 'grab' is the passive grab, but if the grab isn't active, * don't deliver */ if (!dev->deviceGrab.grab) return !Success; if (grab->ownerEvents) { WindowPtr focus = NullWindow; WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite); deliveries = DeliverDeviceEvents(sprite_win, ptrev, grab, focus, dev); } if (!deliveries) deliveries = DeliverOneGrabbedEvent(ptrev, dev, grab->grabtype); /* We must accept the touch sequence once a pointer listener has * received one event past ButtonPress. */ if (deliveries && ev->any.type != ET_TouchBegin && !(ev->device_event.flags & TOUCH_CLIENT_ID)) TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); if (ev->any.type == ET_TouchEnd && ti->num_listeners == 1 && !dev->button->buttonsDown && dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) { (*dev->deviceGrab.DeactivateGrab) (dev); CheckOldestTouch(dev); return Success; } } } else { GrabPtr devgrab = dev->deviceGrab.grab; WindowPtr sprite_win = DeepestSpriteWin(dev->spriteInfo->sprite); DeliverDeviceEvents(sprite_win, ptrev, grab, win, dev); /* FIXME: bad hack * Implicit passive grab activated in response to this event. Store * the event. */ if (!devgrab && dev->deviceGrab.grab && dev->deviceGrab.implicitGrab) { TouchListener *l; GrabPtr g; devgrab = dev->deviceGrab.grab; g = AllocGrab(devgrab); BUG_WARN(!g); CopyPartialInternalEvent(dev->deviceGrab.sync.event, ev); /* The listener array has a sequence of grabs and then one event * selection. Implicit grab activation occurs through delivering an * event selection. Thus, we update the last listener in the array. */ l = &ti->listeners[ti->num_listeners - 1]; l->listener = g->resource; l->grab = g; //l->resource_type = RT_NONE; if (devgrab->grabtype != XI2 || devgrab->type != XI_TouchBegin) l->type = TOUCH_LISTENER_POINTER_GRAB; else l->type = TOUCH_LISTENER_GRAB; } } if (ev->any.type == ET_TouchBegin) listener->state = TOUCH_LISTENER_IS_OWNER; else if (ev->any.type == ET_TouchEnd) listener->state = TOUCH_LISTENER_HAS_END; return Success; } static void DeliverEmulatedMotionEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev) { DeviceEvent motion; if (ti->num_listeners) { ClientPtr client; WindowPtr win; GrabPtr grab; XI2Mask *mask; if (ti->listeners[0].type != TOUCH_LISTENER_POINTER_REGULAR && ti->listeners[0].type != TOUCH_LISTENER_POINTER_GRAB) return; motion = ev->device_event; motion.type = ET_TouchUpdate; motion.detail.button = 0; if (!RetrieveTouchDeliveryData(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], &client, &win, &grab, &mask)) return; DeliverTouchEmulatedEvent(dev, ti, (InternalEvent*)&motion, &ti->listeners[0], client, win, grab, mask); } else { InternalEvent button; int converted; converted = TouchConvertToPointerEvent(ev, (InternalEvent*)&motion, &button); BUG_WARN(converted == 0); if (converted) ProcessOtherEvent((InternalEvent*)&motion, dev); } } /** * Processes and delivers a TouchBegin, TouchUpdate, or a * TouchEnd event. * * Due to having rather different delivery semantics (see the Xi 2.2 protocol * spec for more information), this implements its own grab and event-selection * delivery logic. */ static void ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) { TouchClassPtr t = dev->touch; TouchPointInfoPtr ti; uint32_t touchid; int type = ev->any.type; int emulate_pointer = ! !(ev->device_event.flags & TOUCH_POINTER_EMULATED); DeviceIntPtr kbd; if (!t) return; touchid = ev->device_event.touchid; if (type == ET_TouchBegin && !(ev->device_event.flags & TOUCH_REPLAYING)) { ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, emulate_pointer); } else ti = TouchFindByClientID(dev, touchid); /* Active pointer grab */ if (emulate_pointer && dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab && (dev->deviceGrab.grab->grabtype == CORE || dev->deviceGrab.grab->grabtype == XI || !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))) { /* Active pointer grab on touch point and we get a TouchEnd - claim this * touchpoint accepted, otherwise clients waiting for ownership will * wait on this touchpoint until this client ungrabs, or the cows come * home, whichever is earlier */ if (ti && type == ET_TouchEnd) TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); else if (!ti && type != ET_TouchBegin) { /* Under the following circumstances we create a new touch record for an * existing touch: * * - The touch may be pointer emulated * - An explicit grab is active on the device * - The grab is a pointer grab * * This allows for an explicit grab to receive pointer events for an already * active touch. */ ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, emulate_pointer); if (!ti) { DebugF("[Xi] %s: Failed to create new dix record for explicitly " "grabbed touchpoint %d\n", dev->name, touchid); return; } TouchBuildSprite(dev, ti, ev); TouchSetupListeners(dev, ti, ev); } } if (!ti) { DebugF("[Xi] %s: Failed to get event %d for touchpoint %d\n", dev->name, type, touchid); goto out; } /* if emulate_pointer is set, emulate the motion event right * here, so we can ignore it for button event emulation. TouchUpdate * events which _only_ emulate motion just work normally */ if (emulate_pointer && (ev->any.type == ET_TouchBegin || (ev->any.type == ET_TouchEnd && ti->num_listeners > 0))) DeliverEmulatedMotionEvent(dev, ti, ev); if (emulate_pointer && IsMaster(dev)) CheckMotion(&ev->device_event, dev); kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); event_set_state(NULL, kbd, &ev->device_event); ev->device_event.corestate = event_get_corestate(NULL, kbd); /* Make sure we have a valid window trace for event delivery; must be * called after event type mutation. Touch end events are always processed * in order to end touch records. */ /* FIXME: check this */ if ((type == ET_TouchBegin && !(ev->device_event.flags & TOUCH_REPLAYING) && !TouchBuildSprite(dev, ti, ev)) || (type != ET_TouchEnd && ti->sprite.spriteTraceGood == 0)) return; TouchCopyValuatorData(&ev->device_event, ti); /* WARNING: the event type may change to TouchUpdate in * DeliverTouchEvents if a TouchEnd was delivered to a grabbing * owner */ DeliverTouchEvents(dev, ti, ev, ev->device_event.resource); if (ev->any.type == ET_TouchEnd) TouchEndTouch(dev, ti); out: if (emulate_pointer) UpdateDeviceState(dev, &ev->device_event); } static void ProcessBarrierEvent(InternalEvent *e, DeviceIntPtr dev) { Mask filter; WindowPtr pWin; BarrierEvent *be = &e->barrier_event; xEvent *ev; int rc; GrabPtr grab = dev->deviceGrab.grab; if (!IsMaster(dev)) return; if (dixLookupWindow(&pWin, be->window, serverClient, DixReadAccess) != Success) return; if (grab) be->flags |= XIBarrierDeviceIsGrabbed; rc = EventToXI2(e, &ev); if (rc != Success) { ErrorF("[Xi] event conversion from %s failed with code %d\n", __func__, rc); return; } /* A client has a grab, deliver to this client if the grab_window is the barrier window. Otherwise, deliver normally to the client. */ if (grab && CLIENT_ID(be->barrierid) == CLIENT_ID(grab->resource) && grab->window->drawable.id == be->window) { DeliverGrabbedEvent(e, dev, FALSE); } else { filter = GetEventFilter(dev, ev); DeliverEventsToWindow(dev, pWin, ev, 1, filter, NullGrab); } free(ev); } static BOOL IsAnotherGestureActiveOnMaster(DeviceIntPtr dev, InternalEvent* ev) { GestureClassPtr g = dev->gesture; if (g->gesture.active && g->gesture.sourceid != ev->gesture_event.sourceid) { return TRUE; } return FALSE; } /** * Processes and delivers a Gesture{Pinch,Swipe}{Begin,Update,End}. * * Due to having rather different delivery semantics (see the Xi 2.4 protocol * spec for more information), this implements its own grab and event-selection * delivery logic. */ void ProcessGestureEvent(InternalEvent *ev, DeviceIntPtr dev) { GestureInfoPtr gi; DeviceIntPtr kbd; Bool deactivateGestureGrab = FALSE; Bool delivered = FALSE; if (!dev->gesture) return; if (IsMaster(dev) && IsAnotherGestureActiveOnMaster(dev, ev)) return; if (IsGestureBeginEvent(ev)) gi = GestureBeginGesture(dev, ev); else gi = GestureFindActiveByEventType(dev, ev->any.type); if (!gi) { /* This may happen if gesture is no longer active or was never started. */ return; } kbd = GetMaster(dev, KEYBOARD_OR_FLOAT); event_set_state_gesture(kbd, &ev->gesture_event); if (IsGestureBeginEvent(ev)) GestureSetupListener(dev, gi, ev); if (IsGestureEndEvent(ev) && dev->deviceGrab.grab && dev->deviceGrab.fromPassiveGrab && GrabIsGestureGrab(dev->deviceGrab.grab)) deactivateGestureGrab = TRUE; delivered = DeliverGestureEventToOwner(dev, gi, ev); if (delivered && !deactivateGestureGrab && (IsGestureBeginEvent(ev) || IsGestureEndEvent(ev))) FreezeThisEventIfNeededForSyncGrab(dev, ev); if (IsGestureEndEvent(ev)) GestureEndGesture(gi); if (deactivateGestureGrab) (*dev->deviceGrab.DeactivateGrab) (dev); } /** * Process DeviceEvents and DeviceChangedEvents. */ static void ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) { GrabPtr grab; Bool deactivateDeviceGrab = FALSE; int key = 0, rootX, rootY; ButtonClassPtr b; int ret = 0; int corestate; DeviceIntPtr mouse = NULL, kbd = NULL; DeviceEvent *event = &ev->device_event; if (IsPointerDevice(device)) { kbd = GetMaster(device, KEYBOARD_OR_FLOAT); mouse = device; if (!kbd->key) /* can happen with floating SDs */ kbd = NULL; } else { mouse = GetMaster(device, POINTER_OR_FLOAT); kbd = device; if (!mouse->valuator || !mouse->button) /* may be float. SDs */ mouse = NULL; } corestate = event_get_corestate(mouse, kbd); event_set_state(mouse, kbd, event); ret = UpdateDeviceState(device, event); if (ret == DONT_PROCESS) return; b = device->button; if (IsMaster(device) || IsFloating(device)) CheckMotion(event, device); switch (event->type) { case ET_Motion: case ET_ButtonPress: case ET_ButtonRelease: case ET_KeyPress: case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: GetSpritePosition(device, &rootX, &rootY); event->root_x = rootX; event->root_y = rootY; NoticeEventTime((InternalEvent *) event, device); event->corestate = corestate; key = event->detail.key; break; default: break; } /* send KeyPress and KeyRelease events to XACE plugins */ if (XaceHookIsSet(XACE_KEY_AVAIL) && (event->type == ET_KeyPress || event->type == ET_KeyRelease)) { xEvent *core; int count; if (EventToCore(ev, &core, &count) == Success && count > 0) { XaceHook(XACE_KEY_AVAIL, core, device, 0); free(core); } } if (DeviceEventCallback && !syncEvents.playingEvents) { DeviceEventInfoRec eventinfo; SpritePtr pSprite = device->spriteInfo->sprite; /* see comment in EnqueueEvents regarding the next three lines */ if (ev->any.type == ET_Motion) ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; eventinfo.device = device; eventinfo.event = ev; CallCallbacks(&DeviceEventCallback, (void *) &eventinfo); } grab = device->deviceGrab.grab; switch (event->type) { case ET_KeyPress: /* Don't deliver focus events (e.g. from KeymapNotify when running * nested) to clients. */ if (event->source_type == EVENT_SOURCE_FOCUS) return; if (!grab && CheckDeviceGrabs(device, ev, 0)) return; break; case ET_KeyRelease: if (grab && device->deviceGrab.fromPassiveGrab && (key == device->deviceGrab.activatingKey) && GrabIsKeyboardGrab(device->deviceGrab.grab)) deactivateDeviceGrab = TRUE; break; case ET_ButtonPress: if (b->map[key] == 0) /* there's no button 0 */ return; event->detail.button = b->map[key]; if (!grab && CheckDeviceGrabs(device, ev, 0)) { /* if a passive grab was activated, the event has been sent * already */ return; } break; case ET_ButtonRelease: if (b->map[key] == 0) /* there's no button 0 */ return; event->detail.button = b->map[key]; if (grab && !b->buttonsDown && device->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(device->deviceGrab.grab)) deactivateDeviceGrab = TRUE; default: break; } /* Don't deliver focus events (e.g. from KeymapNotify when running * nested) to clients. */ if (event->source_type != EVENT_SOURCE_FOCUS) { if (grab) DeliverGrabbedEvent((InternalEvent *) event, device, deactivateDeviceGrab); else if (device->focus && !IsPointerEvent(ev)) DeliverFocusedEvent(device, (InternalEvent *) event, GetSpriteWindow(device)); else DeliverDeviceEvents(GetSpriteWindow(device), (InternalEvent *) event, NullGrab, NullWindow, device); } if (deactivateDeviceGrab == TRUE) { (*device->deviceGrab.DeactivateGrab) (device); if (!IsMaster (device) && !IsFloating (device)) { int flags, num_events = 0; InternalEvent dce; flags = (IsPointerDevice (device)) ? DEVCHANGE_POINTER_EVENT : DEVCHANGE_KEYBOARD_EVENT; UpdateFromMaster (&dce, device, flags, &num_events); BUG_WARN(num_events > 1); if (num_events == 1) ChangeMasterDeviceClasses(GetMaster (device, MASTER_ATTACHED), &dce.changed_event); } } event->detail.key = key; } /** * Main device event processing function. * Called from when processing the events from the event queue. * */ void ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) { verify_internal_event(ev); switch (ev->any.type) { case ET_RawKeyPress: case ET_RawKeyRelease: case ET_RawButtonPress: case ET_RawButtonRelease: case ET_RawMotion: case ET_RawTouchBegin: case ET_RawTouchUpdate: case ET_RawTouchEnd: DeliverRawEvent(&ev->raw_event, device); break; case ET_TouchBegin: case ET_TouchUpdate: case ET_TouchEnd: ProcessTouchEvent(ev, device); break; case ET_TouchOwnership: /* TouchOwnership events are handled separately from the rest, as they * have more complex semantics. */ ProcessTouchOwnershipEvent(&ev->touch_ownership_event, device); break; case ET_BarrierHit: case ET_BarrierLeave: ProcessBarrierEvent(ev, device); break; case ET_GesturePinchBegin: case ET_GesturePinchUpdate: case ET_GesturePinchEnd: case ET_GestureSwipeBegin: case ET_GestureSwipeUpdate: case ET_GestureSwipeEnd: ProcessGestureEvent(ev, device); break; default: ProcessDeviceEvent(ev, device); break; } } static int DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, TouchListener * listener, ClientPtr client, WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) { enum TouchListenerState state; int rc = Success; Bool has_ownershipmask; if (listener->type == TOUCH_LISTENER_POINTER_REGULAR || listener->type == TOUCH_LISTENER_POINTER_GRAB) { rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); if (rc == Success) { listener->state = TOUCH_LISTENER_IS_OWNER; /* async grabs cannot replay, so automatically accept this touch */ if (listener->type == TOUCH_LISTENER_POINTER_GRAB && dev->deviceGrab.grab && dev->deviceGrab.fromPassiveGrab && dev->deviceGrab.grab->pointerMode == GrabModeAsync) ActivateEarlyAccept(dev, ti); } goto out; } has_ownershipmask = xi2mask_isset(xi2mask, dev, XI_TouchOwnership); if (TouchResourceIsOwner(ti, listener->listener) || has_ownershipmask) rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); if (!TouchResourceIsOwner(ti, listener->listener)) { if (has_ownershipmask) state = TOUCH_LISTENER_AWAITING_OWNER; else state = TOUCH_LISTENER_AWAITING_BEGIN; } else { if (has_ownershipmask) TouchSendOwnershipEvent(dev, ti, 0, listener->listener); if (listener->type == TOUCH_LISTENER_REGULAR) state = TOUCH_LISTENER_HAS_ACCEPTED; else state = TOUCH_LISTENER_IS_OWNER; } listener->state = state; out: return rc; } static int DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, TouchListener * listener, ClientPtr client, WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) { int rc = Success; if (listener->type == TOUCH_LISTENER_POINTER_REGULAR || listener->type == TOUCH_LISTENER_POINTER_GRAB) { /* Note: If the active grab was ungrabbed, we already changed the * state to TOUCH_LISTENER_HAS_END but still get here. So we mustn't * actually send the event. * This is part two of the hack in DeactivatePointerGrab */ if (listener->state != TOUCH_LISTENER_HAS_END) { rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); /* Once we send a TouchEnd to a legacy listener, we're already well * past the accepting/rejecting stage (can only happen on * GrabModeSync + replay. This listener now gets the end event, * and we can continue. */ if (rc == Success) listener->state = TOUCH_LISTENER_HAS_END; } goto out; } /* A client is waiting for the begin, don't give it a TouchEnd */ if (listener->state == TOUCH_LISTENER_AWAITING_BEGIN) { listener->state = TOUCH_LISTENER_HAS_END; goto out; } /* Event in response to reject */ if (ev->device_event.flags & TOUCH_REJECT || (ev->device_event.flags & TOUCH_ACCEPT && !TouchResourceIsOwner(ti, listener->listener))) { /* Touch has been rejected, or accepted by its owner which is not this listener */ if (listener->state != TOUCH_LISTENER_HAS_END) rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); listener->state = TOUCH_LISTENER_HAS_END; } else if (TouchResourceIsOwner(ti, listener->listener)) { Bool normal_end = !(ev->device_event.flags & TOUCH_ACCEPT); /* FIXME: what about early acceptance */ if (normal_end && listener->state != TOUCH_LISTENER_HAS_END) rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); if ((ti->num_listeners > 1 || (ti->num_grabs > 0 && listener->state != TOUCH_LISTENER_HAS_ACCEPTED)) && (ev->device_event.flags & (TOUCH_ACCEPT | TOUCH_REJECT)) == 0) { ev->any.type = ET_TouchUpdate; ev->device_event.flags |= TOUCH_PENDING_END; ti->pending_finish = TRUE; } if (normal_end) listener->state = TOUCH_LISTENER_HAS_END; } out: return rc; } static int DeliverTouchEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, TouchListener * listener, ClientPtr client, WindowPtr win, GrabPtr grab, XI2Mask *xi2mask) { Bool has_ownershipmask = FALSE; int rc = Success; if (xi2mask) has_ownershipmask = xi2mask_isset(xi2mask, dev, XI_TouchOwnership); if (ev->any.type == ET_TouchOwnership) { ev->touch_ownership_event.deviceid = dev->id; if (!TouchResourceIsOwner(ti, listener->listener)) goto out; rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); listener->state = TOUCH_LISTENER_IS_OWNER; } else ev->device_event.deviceid = dev->id; if (ev->any.type == ET_TouchBegin) { rc = DeliverTouchBeginEvent(dev, ti, ev, listener, client, win, grab, xi2mask); } else if (ev->any.type == ET_TouchUpdate) { if (listener->type == TOUCH_LISTENER_POINTER_REGULAR || listener->type == TOUCH_LISTENER_POINTER_GRAB) DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); else if (TouchResourceIsOwner(ti, listener->listener) || has_ownershipmask) rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev); } else if (ev->any.type == ET_TouchEnd) rc = DeliverTouchEndEvent(dev, ti, ev, listener, client, win, grab, xi2mask); out: return rc; } /** * Delivers a touch events to all interested clients. For TouchBegin events, * will update ti->listeners, ti->num_listeners, and ti->num_grabs. * May also mutate ev (type and flags) upon successful delivery. If * @resource is non-zero, will only attempt delivery to the owner of that * resource. * * @return TRUE if the event was delivered at least once, FALSE otherwise */ void DeliverTouchEvents(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, XID resource) { int i; if (ev->any.type == ET_TouchBegin && !(ev->device_event.flags & (TOUCH_CLIENT_ID | TOUCH_REPLAYING))) TouchSetupListeners(dev, ti, ev); TouchEventHistoryPush(ti, &ev->device_event); for (i = 0; i < ti->num_listeners; i++) { GrabPtr grab = NULL; ClientPtr client; WindowPtr win; XI2Mask *mask; TouchListener *listener = &ti->listeners[i]; if (resource && listener->listener != resource) continue; if (!RetrieveTouchDeliveryData(dev, ti, ev, listener, &client, &win, &grab, &mask)) continue; DeliverTouchEvent(dev, ti, ev, listener, client, win, grab, mask); } } /** * Attempts to deliver a gesture event to the given client. */ static Bool DeliverOneGestureEvent(ClientPtr client, DeviceIntPtr dev, GestureInfoPtr gi, GrabPtr grab, WindowPtr win, InternalEvent *ev) { int err; xEvent *xi2; Mask filter; Window child = DeepestSpriteWin(&gi->sprite)->drawable.id; /* If we fail here, we're going to leave a client hanging. */ err = EventToXI2(ev, &xi2); if (err != Success) FatalError("[Xi] %s: XI2 conversion failed in %s" " (%d)\n", dev->name, __func__, err); FixUpEventFromWindow(&gi->sprite, xi2, win, child, FALSE); filter = GetEventFilter(dev, xi2); if (XaceHook(XACE_RECEIVE_ACCESS, client, win, xi2, 1) != Success) return FALSE; err = TryClientEvents(client, dev, xi2, 1, filter, filter, NullGrab); free(xi2); /* Returning the value from TryClientEvents isn't useful, since all our * resource-gone cleanups will update the delivery list anyway. */ return TRUE; } /** * Given a gesture event and a potential listener, retrieve info needed for processing the event. * * @param dev The device generating the gesture event. * @param ev The gesture event to process. * @param listener The gesture event listener that may receive the gesture event. * @param[out] client The client that should receive the gesture event. * @param[out] win The window to deliver the event on. * @param[out] grab The grab to deliver the event through, if any. * @return TRUE if an event should be delivered to the listener, FALSE * otherwise. */ static Bool RetrieveGestureDeliveryData(DeviceIntPtr dev, InternalEvent *ev, GestureListener* listener, ClientPtr *client, WindowPtr *win, GrabPtr *grab) { int rc; int evtype; InputClients *iclients = NULL; *grab = NULL; if (listener->type == GESTURE_LISTENER_GRAB || listener->type == GESTURE_LISTENER_NONGESTURE_GRAB) { *grab = listener->grab; BUG_RETURN_VAL(!*grab, FALSE); *client = rClient(*grab); *win = (*grab)->window; } else { rc = dixLookupResourceByType((void **) win, listener->listener, listener->resource_type, serverClient, DixSendAccess); if (rc != Success) return FALSE; /* note that we only will have XI2 listeners as listener->type == GESTURE_LISTENER_REGULAR */ evtype = GetXI2Type(ev->any.type); nt_list_for_each_entry(iclients, wOtherInputMasks(*win)->inputClients, next) if (xi2mask_isset(iclients->xi2mask, dev, evtype)) break; BUG_RETURN_VAL(!iclients, FALSE); *client = rClient(iclients); } return TRUE; } /** * Delivers a gesture to the owner, if possible and needed. Returns whether * an event was delivered. */ Bool DeliverGestureEventToOwner(DeviceIntPtr dev, GestureInfoPtr gi, InternalEvent *ev) { GrabPtr grab = NULL; ClientPtr client; WindowPtr win; if (!gi->has_listener || gi->listener.type == GESTURE_LISTENER_NONGESTURE_GRAB) { return 0; } if (!RetrieveGestureDeliveryData(dev, ev, &gi->listener, &client, &win, &grab)) return 0; ev->gesture_event.deviceid = dev->id; return DeliverOneGestureEvent(client, dev, gi, grab, win, ev); } int InitProximityClassDeviceStruct(DeviceIntPtr dev) { ProximityClassPtr proxc; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->proximity != NULL, FALSE); proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec)); if (!proxc) return FALSE; proxc->sourceid = dev->id; proxc->in_proximity = TRUE; dev->proximity = proxc; return TRUE; } /** * Initialise the device's valuators. The memory must already be allocated, * this function merely inits the matching axis (specified through axnum) to * sane values. * * It is a condition that (minval < maxval). * * @see InitValuatorClassDeviceStruct */ Bool InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval, int resolution, int min_res, int max_res, int mode) { AxisInfoPtr ax; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->valuator == NULL, FALSE); BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE); BUG_RETURN_VAL(minval > maxval && mode == Absolute, FALSE); ax = dev->valuator->axes + axnum; ax->min_value = minval; ax->max_value = maxval; ax->resolution = resolution; ax->min_resolution = min_res; ax->max_resolution = max_res; ax->label = label; ax->mode = mode; if (mode & OutOfProximity) dev->proximity->in_proximity = FALSE; return SetScrollValuator(dev, axnum, SCROLL_TYPE_NONE, 0, SCROLL_FLAG_NONE); } /** * Set the given axis number as a scrolling valuator. */ Bool SetScrollValuator(DeviceIntPtr dev, int axnum, enum ScrollType type, double increment, int flags) { AxisInfoPtr ax; int *current_ax; InternalEvent dce; DeviceIntPtr master; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->valuator == NULL, FALSE); BUG_RETURN_VAL(axnum >= dev->valuator->numAxes, FALSE); switch (type) { case SCROLL_TYPE_VERTICAL: current_ax = &dev->valuator->v_scroll_axis; break; case SCROLL_TYPE_HORIZONTAL: current_ax = &dev->valuator->h_scroll_axis; break; case SCROLL_TYPE_NONE: ax = &dev->valuator->axes[axnum]; ax->scroll.type = type; return TRUE; default: return FALSE; } if (increment == 0.0) return FALSE; if (*current_ax != -1 && axnum != *current_ax) { ax = &dev->valuator->axes[*current_ax]; if (ax->scroll.type == type && (flags & SCROLL_FLAG_PREFERRED) && (ax->scroll.flags & SCROLL_FLAG_PREFERRED)) return FALSE; } *current_ax = axnum; ax = &dev->valuator->axes[axnum]; ax->scroll.type = type; ax->scroll.increment = increment; ax->scroll.flags = flags; master = GetMaster(dev, MASTER_ATTACHED); CreateClassesChangedEvent(&dce, master, dev, DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE); XISendDeviceChangedEvent(dev, &dce.changed_event); /* if the current slave is us, update the master. If not, we'll update * whenever the next slave switch happens anyway. CMDC sends the event * for us */ if (master && master->lastSlave == dev) ChangeMasterDeviceClasses(master, &dce.changed_event); return TRUE; } int CheckGrabValues(ClientPtr client, GrabParameters *param) { if (param->grabtype != CORE && param->grabtype != XI && param->grabtype != XI2) { ErrorF("[Xi] grabtype is invalid. This is a bug.\n"); return BadImplementation; } if ((param->this_device_mode != GrabModeSync) && (param->this_device_mode != GrabModeAsync) && (param->this_device_mode != XIGrabModeTouch)) { client->errorValue = param->this_device_mode; return BadValue; } if ((param->other_devices_mode != GrabModeSync) && (param->other_devices_mode != GrabModeAsync) && (param->other_devices_mode != XIGrabModeTouch)) { client->errorValue = param->other_devices_mode; return BadValue; } if (param->modifiers != AnyModifier && param->modifiers != XIAnyModifier && (param->modifiers & ~AllModifiersMask)) { client->errorValue = param->modifiers; return BadValue; } if ((param->ownerEvents != xFalse) && (param->ownerEvents != xTrue)) { client->errorValue = param->ownerEvents; return BadValue; } return Success; } int GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int button, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask) { WindowPtr pWin, confineTo; CursorPtr cursor; GrabPtr grab; int rc, type = -1; Mask access_mode = DixGrabAccess; rc = CheckGrabValues(client, param); if (rc != Success) return rc; if (param->confineTo == None) confineTo = NullWindow; else { rc = dixLookupWindow(&confineTo, param->confineTo, client, DixSetAttrAccess); if (rc != Success) return rc; } if (param->cursor == None) cursor = NullCursor; else { rc = dixLookupResourceByType((void **) &cursor, param->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) { client->errorValue = param->cursor; return rc; } access_mode |= DixForceAccess; } if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (grabtype == XI) type = DeviceButtonPress; else if (grabtype == XI2) type = XI_ButtonPress; grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, mask, param, type, button, confineTo, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } /** * Grab the given key. */ int GrabKey(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, int key, GrabParameters *param, enum InputLevel grabtype, GrabMask *mask) { WindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; Mask access_mode = DixGrabAccess; int rc, type = -1; rc = CheckGrabValues(client, param); if (rc != Success) return rc; if ((dev->id != XIAllDevices && dev->id != XIAllMasterDevices) && k == NULL) return BadMatch; if (grabtype == XI) { if ((key > k->xkbInfo->desc->max_key_code || key < k->xkbInfo->desc->min_key_code) && (key != AnyKey)) { client->errorValue = key; return BadValue; } type = DeviceKeyPress; } else if (grabtype == XI2) type = XI_KeyPress; rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; grab = CreateGrab(client->index, dev, modifier_device, pWin, grabtype, mask, param, type, key, NULL, NULL); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } /* Enter/FocusIn grab */ int GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, GrabParameters *param, GrabMask *mask) { WindowPtr pWin; CursorPtr cursor; GrabPtr grab; Mask access_mode = DixGrabAccess; int rc; rc = CheckGrabValues(client, param); if (rc != Success) return rc; rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (param->cursor == None) cursor = NullCursor; else { rc = dixLookupResourceByType((void **) &cursor, param->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) { client->errorValue = param->cursor; return rc; } access_mode |= DixForceAccess; } if (param->this_device_mode == GrabModeSync || param->other_devices_mode == GrabModeSync) access_mode |= DixFreezeAccess; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, access_mode); if (rc != Success) return rc; grab = CreateGrab(client->index, dev, dev, pWin, XI2, mask, param, (type == XIGrabtypeEnter) ? XI_Enter : XI_FocusIn, 0, NULL, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } /* Touch grab */ int GrabTouchOrGesture(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr mod_dev, int type, GrabParameters *param, GrabMask *mask) { WindowPtr pWin; GrabPtr grab; int rc; rc = CheckGrabValues(client, param); if (rc != Success) return rc; rc = dixLookupWindow(&pWin, param->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGrabAccess); if (rc != Success) return rc; grab = CreateGrab(client->index, dev, mod_dev, pWin, XI2, mask, param, type, 0, NullWindow, NullCursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(client, grab); } int SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, Mask mask, Mask exclusivemasks) { int mskidx = dev->id; int i, ret; Mask check; InputClientsPtr others; check = (mask & exclusivemasks); if (wOtherInputMasks(pWin)) { if (check & wOtherInputMasks(pWin)->inputEvents[mskidx]) { /* It is illegal for two different clients to select on any of * the events for maskcheck. However, it is OK, for some client * to continue selecting on one of those events. */ for (others = wOtherInputMasks(pWin)->inputClients; others; others = others->next) { if (!SameClient(others, client) && (check & others->mask[mskidx])) return BadAccess; } } for (others = wOtherInputMasks(pWin)->inputClients; others; others = others->next) { if (SameClient(others, client)) { check = others->mask[mskidx]; others->mask[mskidx] = mask; if (mask == 0) { for (i = 0; i < EMASKSIZE; i++) if (i != mskidx && others->mask[i] != 0) break; if (i == EMASKSIZE) { RecalculateDeviceDeliverableEvents(pWin); if (ShouldFreeInputMasks(pWin, FALSE)) FreeResource(others->resource, RT_NONE); return Success; } } goto maskSet; } } } check = 0; if ((ret = AddExtensionClient(pWin, client, mask, mskidx)) != Success) return ret; maskSet: if (dev->valuator) if ((dev->valuator->motionHintWindow == pWin) && (mask & DevicePointerMotionHintMask) && !(check & DevicePointerMotionHintMask) && !dev->deviceGrab.grab) dev->valuator->motionHintWindow = NullWindow; RecalculateDeviceDeliverableEvents(pWin); return Success; } static void FreeInputClient(InputClientsPtr * other) { xi2mask_free(&(*other)->xi2mask); free(*other); *other = NULL; } static InputClientsPtr AllocInputClient(void) { return calloc(1, sizeof(InputClients)); } int AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) { InputClientsPtr others; if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; others = AllocInputClient(); if (!others) return BadAlloc; if (!pWin->optional->inputMasks && !MakeInputMasks(pWin)) goto bail; others->xi2mask = xi2mask_new(); if (!others->xi2mask) goto bail; others->mask[mskidx] = mask; others->resource = FakeClientID(client->index); others->next = pWin->optional->inputMasks->inputClients; pWin->optional->inputMasks->inputClients = others; if (!AddResource(others->resource, RT_INPUTCLIENT, (void *) pWin)) goto bail; return Success; bail: FreeInputClient(&others); return BadAlloc; } static Bool MakeInputMasks(WindowPtr pWin) { struct _OtherInputMasks *imasks; imasks = calloc(1, sizeof(struct _OtherInputMasks)); if (!imasks) return FALSE; imasks->xi2mask = xi2mask_new(); if (!imasks->xi2mask) { free(imasks); return FALSE; } pWin->optional->inputMasks = imasks; return TRUE; } static void FreeInputMask(OtherInputMasks ** imask) { xi2mask_free(&(*imask)->xi2mask); free(*imask); *imask = NULL; } #define XIPropagateMask (KeyPressMask | \ KeyReleaseMask | \ ButtonPressMask | \ ButtonReleaseMask | \ PointerMotionMask) void RecalculateDeviceDeliverableEvents(WindowPtr pWin) { InputClientsPtr others; struct _OtherInputMasks *inputMasks; /* default: NULL */ WindowPtr pChild, tmp; int i; pChild = pWin; while (1) { if ((inputMasks = wOtherInputMasks(pChild)) != 0) { xi2mask_zero(inputMasks->xi2mask, -1); for (others = inputMasks->inputClients; others; others = others->next) { for (i = 0; i < EMASKSIZE; i++) inputMasks->inputEvents[i] |= others->mask[i]; xi2mask_merge(inputMasks->xi2mask, others->xi2mask); } for (i = 0; i < EMASKSIZE; i++) inputMasks->deliverableEvents[i] = inputMasks->inputEvents[i]; for (tmp = pChild->parent; tmp; tmp = tmp->parent) if (wOtherInputMasks(tmp)) for (i = 0; i < EMASKSIZE; i++) inputMasks->deliverableEvents[i] |= (wOtherInputMasks(tmp)->deliverableEvents[i] & ~inputMasks->dontPropagateMask[i] & XIPropagateMask); } if (pChild->firstChild) { pChild = pChild->firstChild; continue; } while (!pChild->nextSib && (pChild != pWin)) pChild = pChild->parent; if (pChild == pWin) break; pChild = pChild->nextSib; } } int InputClientGone(WindowPtr pWin, XID id) { InputClientsPtr other, prev; if (!wOtherInputMasks(pWin)) return Success; prev = 0; for (other = wOtherInputMasks(pWin)->inputClients; other; other = other->next) { if (other->resource == id) { if (prev) { prev->next = other->next; FreeInputClient(&other); } else if (!(other->next)) { if (ShouldFreeInputMasks(pWin, TRUE)) { OtherInputMasks *mask = wOtherInputMasks(pWin); mask->inputClients = other->next; FreeInputMask(&mask); pWin->optional->inputMasks = (OtherInputMasks *) NULL; CheckWindowOptionalNeed(pWin); FreeInputClient(&other); } else { other->resource = FakeClientID(0); if (!AddResource(other->resource, RT_INPUTCLIENT, (void *) pWin)) return BadAlloc; } } else { wOtherInputMasks(pWin)->inputClients = other->next; FreeInputClient(&other); } RecalculateDeviceDeliverableEvents(pWin); return Success; } prev = other; } FatalError("client not on device event list"); } /** * Search for window in each touch trace for each device. Remove the window * and all its subwindows from the trace when found. The initial window * order is preserved. */ void WindowGone(WindowPtr win) { DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) { TouchClassPtr t = dev->touch; int i; if (!t) continue; for (i = 0; i < t->num_touches; i++) { SpritePtr sprite = &t->touches[i].sprite; int j; for (j = 0; j < sprite->spriteTraceGood; j++) { if (sprite->spriteTrace[j] == win) { sprite->spriteTraceGood = j; break; } } } } } int SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, xEvent *ev, Mask mask, int count) { WindowPtr pWin; WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */ WindowPtr spriteWin = GetSpriteWindow(d); if (dest == PointerWindow) pWin = spriteWin; else if (dest == InputFocus) { WindowPtr inputFocus; if (!d->focus) inputFocus = spriteWin; else inputFocus = d->focus->win; if (inputFocus == FollowKeyboardWin) inputFocus = inputInfo.keyboard->focus->win; if (inputFocus == NoneWin) return Success; /* If the input focus is PointerRootWin, send the event to where * the pointer is if possible, then perhaps propagate up to root. */ if (inputFocus == PointerRootWin) inputFocus = GetCurrentRootWindow(d); if (IsParent(inputFocus, spriteWin)) { effectiveFocus = inputFocus; pWin = spriteWin; } else effectiveFocus = pWin = inputFocus; } else dixLookupWindow(&pWin, dest, client, DixSendAccess); if (!pWin) return BadWindow; if ((propagate != xFalse) && (propagate != xTrue)) { client->errorValue = propagate; return BadValue; } ev->u.u.type |= 0x80; if (propagate) { for (; pWin; pWin = pWin->parent) { if (DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab)) return Success; if (pWin == effectiveFocus) return Success; if (wOtherInputMasks(pWin)) mask &= ~wOtherInputMasks(pWin)->dontPropagateMask[d->id]; if (!mask) break; } } else if (!XaceHook(XACE_SEND_ACCESS, client, NULL, pWin, ev, count)) DeliverEventsToWindow(d, pWin, ev, count, mask, NullGrab); return Success; } int SetButtonMapping(ClientPtr client, DeviceIntPtr dev, int nElts, BYTE * map) { int i; ButtonClassPtr b = dev->button; if (b == NULL) return BadMatch; if (nElts != b->numButtons) { client->errorValue = nElts; return BadValue; } if (BadDeviceMap(&map[0], nElts, 1, 255, &client->errorValue)) return BadValue; for (i = 0; i < nElts; i++) if ((b->map[i + 1] != map[i]) && BitIsOn(b->down, i + 1)) return MappingBusy; for (i = 0; i < nElts; i++) b->map[i + 1] = map[i]; return Success; } int ChangeKeyMapping(ClientPtr client, DeviceIntPtr dev, unsigned len, int type, KeyCode firstKeyCode, CARD8 keyCodes, CARD8 keySymsPerKeyCode, KeySym * map) { KeySymsRec keysyms; KeyClassPtr k = dev->key; if (k == NULL) return BadMatch; if (len != (keyCodes * keySymsPerKeyCode)) return BadLength; if ((firstKeyCode < k->xkbInfo->desc->min_key_code) || (firstKeyCode + keyCodes - 1 > k->xkbInfo->desc->max_key_code)) { client->errorValue = firstKeyCode; return BadValue; } if (keySymsPerKeyCode == 0) { client->errorValue = 0; return BadValue; } keysyms.minKeyCode = firstKeyCode; keysyms.maxKeyCode = firstKeyCode + keyCodes - 1; keysyms.mapWidth = keySymsPerKeyCode; keysyms.map = map; XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL, serverClient); return Success; } static void DeleteDeviceFromAnyExtEvents(WindowPtr pWin, DeviceIntPtr dev) { WindowPtr parent; /* Deactivate any grabs performed on this window, before making * any input focus changes. * Deactivating a device grab should cause focus events. */ if (dev->deviceGrab.grab && (dev->deviceGrab.grab->window == pWin)) (*dev->deviceGrab.DeactivateGrab) (dev); /* If the focus window is a root window (ie. has no parent) * then don't delete the focus from it. */ if (dev->focus && (pWin == dev->focus->win) && (pWin->parent != NullWindow)) { int focusEventMode = NotifyNormal; /* If a grab is in progress, then alter the mode of focus events. */ if (dev->deviceGrab.grab) focusEventMode = NotifyWhileGrabbed; switch (dev->focus->revert) { case RevertToNone: if (!ActivateFocusInGrab(dev, pWin, NoneWin)) DoFocusEvents(dev, pWin, NoneWin, focusEventMode); dev->focus->win = NoneWin; dev->focus->traceGood = 0; break; case RevertToParent: parent = pWin; do { parent = parent->parent; dev->focus->traceGood--; } while (!parent->realized); if (!ActivateFocusInGrab(dev, pWin, parent)) DoFocusEvents(dev, pWin, parent, focusEventMode); dev->focus->win = parent; dev->focus->revert = RevertToNone; break; case RevertToPointerRoot: if (!ActivateFocusInGrab(dev, pWin, PointerRootWin)) DoFocusEvents(dev, pWin, PointerRootWin, focusEventMode); dev->focus->win = PointerRootWin; dev->focus->traceGood = 0; break; case RevertToFollowKeyboard: { DeviceIntPtr kbd = GetMaster(dev, MASTER_KEYBOARD); if (!kbd || (kbd == dev && kbd != inputInfo.keyboard)) kbd = inputInfo.keyboard; if (kbd->focus->win) { if (!ActivateFocusInGrab(dev, pWin, kbd->focus->win)) DoFocusEvents(dev, pWin, kbd->focus->win, focusEventMode); dev->focus->win = FollowKeyboardWin; dev->focus->traceGood = 0; } else { if (!ActivateFocusInGrab(dev, pWin, NoneWin)) DoFocusEvents(dev, pWin, NoneWin, focusEventMode); dev->focus->win = NoneWin; dev->focus->traceGood = 0; } } break; } } if (dev->valuator) if (dev->valuator->motionHintWindow == pWin) dev->valuator->motionHintWindow = NullWindow; } void DeleteWindowFromAnyExtEvents(WindowPtr pWin, Bool freeResources) { int i; DeviceIntPtr dev; InputClientsPtr ic; struct _OtherInputMasks *inputMasks; for (dev = inputInfo.devices; dev; dev = dev->next) { DeleteDeviceFromAnyExtEvents(pWin, dev); } for (dev = inputInfo.off_devices; dev; dev = dev->next) DeleteDeviceFromAnyExtEvents(pWin, dev); if (freeResources) while ((inputMasks = wOtherInputMasks(pWin)) != 0) { ic = inputMasks->inputClients; for (i = 0; i < EMASKSIZE; i++) inputMasks->dontPropagateMask[i] = 0; FreeResource(ic->resource, RT_NONE); } } int MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer *pEvents, Mask mask) { DeviceIntPtr dev; dixLookupDevice(&dev, pEvents->deviceid & DEVICE_BITS, serverClient, DixReadAccess); if (!dev) return 0; if (pEvents->type == DeviceMotionNotify) { if (mask & DevicePointerMotionHintMask) { if (WID(dev->valuator->motionHintWindow) == pEvents->event) { return 1; /* don't send, but pretend we did */ } pEvents->detail = NotifyHint; } else { pEvents->detail = NotifyNormal; } } return 0; } void CheckDeviceGrabAndHintWindow(WindowPtr pWin, int type, deviceKeyButtonPointer *xE, GrabPtr grab, ClientPtr client, Mask deliveryMask) { DeviceIntPtr dev; dixLookupDevice(&dev, xE->deviceid & DEVICE_BITS, serverClient, DixGrabAccess); if (!dev) return; if (type == DeviceMotionNotify) dev->valuator->motionHintWindow = pWin; else if ((type == DeviceButtonPress) && (!grab) && (deliveryMask & DeviceButtonGrabMask)) { GrabPtr tempGrab; tempGrab = AllocGrab(NULL); if (!tempGrab) return; tempGrab->device = dev; tempGrab->resource = client->clientAsMask; tempGrab->window = pWin; tempGrab->ownerEvents = (deliveryMask & DeviceOwnerGrabButtonMask) ? TRUE : FALSE; tempGrab->eventMask = deliveryMask; tempGrab->keyboardMode = GrabModeAsync; tempGrab->pointerMode = GrabModeAsync; tempGrab->confineTo = NullWindow; tempGrab->cursor = NullCursor; tempGrab->next = NULL; (*dev->deviceGrab.ActivateGrab) (dev, tempGrab, currentTime, TRUE); FreeGrab(tempGrab); } } static Mask DeviceEventMaskForClient(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client) { InputClientsPtr other; if (!wOtherInputMasks(pWin)) return 0; for (other = wOtherInputMasks(pWin)->inputClients; other; other = other->next) { if (SameClient(other, client)) return other->mask[dev->id]; } return 0; } void MaybeStopDeviceHint(DeviceIntPtr dev, ClientPtr client) { WindowPtr pWin; GrabPtr grab = dev->deviceGrab.grab; pWin = dev->valuator->motionHintWindow; if ((grab && SameClient(grab, client) && ((grab->eventMask & DevicePointerMotionHintMask) || (grab->ownerEvents && (DeviceEventMaskForClient(dev, pWin, client) & DevicePointerMotionHintMask)))) || (!grab && (DeviceEventMaskForClient(dev, pWin, client) & DevicePointerMotionHintMask))) dev->valuator->motionHintWindow = NullWindow; } int DeviceEventSuppressForWindow(WindowPtr pWin, ClientPtr client, Mask mask, int maskndx) { struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); if (mask & ~XIPropagateMask) { client->errorValue = mask; return BadValue; } if (mask == 0) { if (inputMasks) inputMasks->dontPropagateMask[maskndx] = mask; } else { if (!inputMasks) AddExtensionClient(pWin, client, 0, 0); inputMasks = wOtherInputMasks(pWin); inputMasks->dontPropagateMask[maskndx] = mask; } RecalculateDeviceDeliverableEvents(pWin); if (ShouldFreeInputMasks(pWin, FALSE)) FreeResource(inputMasks->inputClients->resource, RT_NONE); return Success; } Bool ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) { int i; Mask allInputEventMasks = 0; struct _OtherInputMasks *inputMasks = wOtherInputMasks(pWin); for (i = 0; i < EMASKSIZE; i++) allInputEventMasks |= inputMasks->dontPropagateMask[i]; if (!ignoreSelectedEvents) for (i = 0; i < EMASKSIZE; i++) allInputEventMasks |= inputMasks->inputEvents[i]; if (allInputEventMasks == 0) return TRUE; else return FALSE; } /*********************************************************************** * * Walk through the window tree, finding all clients that want to know * about the Event. * */ static void FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, xEvent *ev, int count) { WindowPtr p2; while (p1) { p2 = p1->firstChild; DeliverEventsToWindow(dev, p1, ev, count, mask, NullGrab); FindInterestedChildren(dev, p2, mask, ev, count); p1 = p1->nextSib; } } /*********************************************************************** * * Send an event to interested clients in all windows on all screens. * */ void SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent *ev, int count) { int i; WindowPtr pWin, p1; for (i = 0; i < screenInfo.numScreens; i++) { pWin = screenInfo.screens[i]->root; if (!pWin) continue; DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab); p1 = pWin->firstChild; FindInterestedChildren(dev, p1, mask, ev, count); } } /** * Set the XI2 mask for the given client on the given window. * @param dev The device to set the mask for. * @param win The window to set the mask on. * @param client The client setting the mask. * @param len Number of bytes in mask. * @param mask Event mask in the form of (1 << eventtype) */ int XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, unsigned int len, unsigned char *mask) { OtherInputMasks *masks; InputClientsPtr others = NULL; masks = wOtherInputMasks(win); if (masks) { for (others = wOtherInputMasks(win)->inputClients; others; others = others->next) { if (SameClient(others, client)) { xi2mask_zero(others->xi2mask, dev->id); break; } } } if (len && !others) { if (AddExtensionClient(win, client, 0, 0) != Success) return BadAlloc; others = wOtherInputMasks(win)->inputClients; } if (others) { xi2mask_zero(others->xi2mask, dev->id); len = min(len, xi2mask_mask_size(others->xi2mask)); } if (len) { xi2mask_set_one_mask(others->xi2mask, dev->id, mask, len); } RecalculateDeviceDeliverableEvents(win); return Success; } xorg-server-21.1.16/Xi/exglobals.h0000644000175000017500000000530614757411105012350 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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. ********************************************************/ /***************************************************************** * * Globals referenced elsewhere in the server. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "privates.h" #ifndef EXGLOBALS_H #define EXGLOBALS_H 1 extern int IReqCode; extern int IEventBase; extern int BadDevice; extern int BadMode; extern int DeviceBusy; extern int BadClass; /* Note: only the ones needed in files other than extinit.c are declared */ extern const Mask DevicePointerMotionHintMask; extern const Mask DeviceFocusChangeMask; extern const Mask DeviceStateNotifyMask; extern const Mask DeviceMappingNotifyMask; extern const Mask DeviceOwnerGrabButtonMask; extern const Mask DeviceButtonGrabMask; extern const Mask DeviceButtonMotionMask; extern const Mask DevicePresenceNotifyMask; extern const Mask DevicePropertyNotifyMask; extern const Mask XIAllMasks; extern int DeviceValuator; extern int DeviceKeyPress; extern int DeviceKeyRelease; extern int DeviceButtonPress; extern int DeviceButtonRelease; extern int DeviceMotionNotify; extern int DeviceFocusIn; extern int DeviceFocusOut; extern int ProximityIn; extern int ProximityOut; extern int DeviceStateNotify; extern int DeviceKeyStateNotify; extern int DeviceButtonStateNotify; extern int DeviceMappingNotify; extern int ChangeDeviceNotify; extern int DevicePresenceNotify; extern int DevicePropertyNotify; extern RESTYPE RT_INPUTCLIENT; extern DevPrivateKeyRec XIClientPrivateKeyRec; #define XIClientPrivateKey (&XIClientPrivateKeyRec) #endif /* EXGLOBALS_H */ xorg-server-21.1.16/Xi/extinit.c0000644000175000017500000012542214757411105012051 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Dispatch routines and initialization routines for the X input extension. * */ #define NUMTYPES 15 #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include "gcstruct.h" /* pointer for extnsionst.h */ #include "extnsionst.h" /* extension entry */ #include #include #include #include #include "geext.h" /* extension interfaces for ge */ #include "dixevents.h" #include "exevents.h" #include "extinit.h" #include "exglobals.h" #include "swaprep.h" #include "privates.h" #include "protocol-versions.h" /* modules local to Xi */ #include "allowev.h" #include "chgdctl.h" #include "chgfctl.h" #include "chgkbd.h" #include "chgprop.h" #include "chgptr.h" #include "closedev.h" #include "devbell.h" #include "getbmap.h" #include "getdctl.h" #include "getfctl.h" #include "getfocus.h" #include "getkmap.h" #include "getmmap.h" #include "getprop.h" #include "getselev.h" #include "getvers.h" #include "grabdev.h" #include "grabdevb.h" #include "grabdevk.h" #include "gtmotion.h" #include "listdev.h" #include "opendev.h" #include "queryst.h" #include "selectev.h" #include "sendexev.h" #include "chgkmap.h" #include "setbmap.h" #include "setdval.h" #include "setfocus.h" #include "setmmap.h" #include "setmode.h" #include "ungrdev.h" #include "ungrdevb.h" #include "ungrdevk.h" #include "xiallowev.h" #include "xiselectev.h" #include "xigrabdev.h" #include "xipassivegrab.h" #include "xisetdevfocus.h" #include "xiproperty.h" #include "xichangecursor.h" #include "xichangehierarchy.h" #include "xigetclientpointer.h" #include "xiquerydevice.h" #include "xiquerypointer.h" #include "xiqueryversion.h" #include "xisetclientpointer.h" #include "xiwarppointer.h" #include "xibarriers.h" /* Masks for XI events have to be aligned with core event (partially anyway). * If DeviceButtonMotionMask is != ButtonMotionMask, event delivery * breaks down. The device needs the dev->button->motionMask. If DBMM is * the same as BMM, we can ensure that both core and device events can be * delivered, without the need for extra structures in the DeviceIntRec. */ const Mask DeviceProximityMask = (1L << 4); const Mask DeviceStateNotifyMask = (1L << 5); const Mask DevicePointerMotionHintMask = PointerMotionHintMask; const Mask DeviceButton1MotionMask = Button1MotionMask; const Mask DeviceButton2MotionMask = Button2MotionMask; const Mask DeviceButton3MotionMask = Button3MotionMask; const Mask DeviceButton4MotionMask = Button4MotionMask; const Mask DeviceButton5MotionMask = Button5MotionMask; const Mask DeviceButtonMotionMask = ButtonMotionMask; const Mask DeviceFocusChangeMask = (1L << 14); const Mask DeviceMappingNotifyMask = (1L << 15); const Mask ChangeDeviceNotifyMask = (1L << 16); const Mask DeviceButtonGrabMask = (1L << 17); const Mask DeviceOwnerGrabButtonMask = (1L << 17); const Mask DevicePresenceNotifyMask = (1L << 18); const Mask DevicePropertyNotifyMask = (1L << 19); const Mask XIAllMasks = (1L << 20) - 1; int ExtEventIndex; static struct dev_type { Atom type; const char *name; } dev_type[] = { {0, XI_KEYBOARD}, {0, XI_MOUSE}, {0, XI_TABLET}, {0, XI_TOUCHSCREEN}, {0, XI_TOUCHPAD}, {0, XI_BARCODE}, {0, XI_BUTTONBOX}, {0, XI_KNOB_BOX}, {0, XI_ONE_KNOB}, {0, XI_NINE_KNOB}, {0, XI_TRACKBALL}, {0, XI_QUADRATURE}, {0, XI_ID_MODULE}, {0, XI_SPACEBALL}, {0, XI_DATAGLOVE}, {0, XI_EYETRACKER}, {0, XI_CURSORKEYS}, {0, XI_FOOTMOUSE} }; CARD8 event_base[numInputClasses]; XExtEventInfo EventInfo[32]; static DeviceIntRec xi_all_devices; static DeviceIntRec xi_all_master_devices; /** * Dispatch vector. Functions defined in here will be called when the matching * request arrives. */ static int (*ProcIVector[]) (ClientPtr) = { NULL, /* 0 */ ProcXGetExtensionVersion, /* 1 */ ProcXListInputDevices, /* 2 */ ProcXOpenDevice, /* 3 */ ProcXCloseDevice, /* 4 */ ProcXSetDeviceMode, /* 5 */ ProcXSelectExtensionEvent, /* 6 */ ProcXGetSelectedExtensionEvents, /* 7 */ ProcXChangeDeviceDontPropagateList, /* 8 */ ProcXGetDeviceDontPropagateList, /* 9 */ ProcXGetDeviceMotionEvents, /* 10 */ ProcXChangeKeyboardDevice, /* 11 */ ProcXChangePointerDevice, /* 12 */ ProcXGrabDevice, /* 13 */ ProcXUngrabDevice, /* 14 */ ProcXGrabDeviceKey, /* 15 */ ProcXUngrabDeviceKey, /* 16 */ ProcXGrabDeviceButton, /* 17 */ ProcXUngrabDeviceButton, /* 18 */ ProcXAllowDeviceEvents, /* 19 */ ProcXGetDeviceFocus, /* 20 */ ProcXSetDeviceFocus, /* 21 */ ProcXGetFeedbackControl, /* 22 */ ProcXChangeFeedbackControl, /* 23 */ ProcXGetDeviceKeyMapping, /* 24 */ ProcXChangeDeviceKeyMapping, /* 25 */ ProcXGetDeviceModifierMapping, /* 26 */ ProcXSetDeviceModifierMapping, /* 27 */ ProcXGetDeviceButtonMapping, /* 28 */ ProcXSetDeviceButtonMapping, /* 29 */ ProcXQueryDeviceState, /* 30 */ ProcXSendExtensionEvent, /* 31 */ ProcXDeviceBell, /* 32 */ ProcXSetDeviceValuators, /* 33 */ ProcXGetDeviceControl, /* 34 */ ProcXChangeDeviceControl, /* 35 */ /* XI 1.5 */ ProcXListDeviceProperties, /* 36 */ ProcXChangeDeviceProperty, /* 37 */ ProcXDeleteDeviceProperty, /* 38 */ ProcXGetDeviceProperty, /* 39 */ /* XI 2 */ ProcXIQueryPointer, /* 40 */ ProcXIWarpPointer, /* 41 */ ProcXIChangeCursor, /* 42 */ ProcXIChangeHierarchy, /* 43 */ ProcXISetClientPointer, /* 44 */ ProcXIGetClientPointer, /* 45 */ ProcXISelectEvents, /* 46 */ ProcXIQueryVersion, /* 47 */ ProcXIQueryDevice, /* 48 */ ProcXISetFocus, /* 49 */ ProcXIGetFocus, /* 50 */ ProcXIGrabDevice, /* 51 */ ProcXIUngrabDevice, /* 52 */ ProcXIAllowEvents, /* 53 */ ProcXIPassiveGrabDevice, /* 54 */ ProcXIPassiveUngrabDevice, /* 55 */ ProcXIListProperties, /* 56 */ ProcXIChangeProperty, /* 57 */ ProcXIDeleteProperty, /* 58 */ ProcXIGetProperty, /* 59 */ ProcXIGetSelectedEvents, /* 60 */ ProcXIBarrierReleasePointer /* 61 */ }; /* For swapped clients */ static int (*SProcIVector[]) (ClientPtr) = { NULL, /* 0 */ SProcXGetExtensionVersion, /* 1 */ SProcXListInputDevices, /* 2 */ SProcXOpenDevice, /* 3 */ SProcXCloseDevice, /* 4 */ SProcXSetDeviceMode, /* 5 */ SProcXSelectExtensionEvent, /* 6 */ SProcXGetSelectedExtensionEvents, /* 7 */ SProcXChangeDeviceDontPropagateList, /* 8 */ SProcXGetDeviceDontPropagateList, /* 9 */ SProcXGetDeviceMotionEvents, /* 10 */ SProcXChangeKeyboardDevice, /* 11 */ SProcXChangePointerDevice, /* 12 */ SProcXGrabDevice, /* 13 */ SProcXUngrabDevice, /* 14 */ SProcXGrabDeviceKey, /* 15 */ SProcXUngrabDeviceKey, /* 16 */ SProcXGrabDeviceButton, /* 17 */ SProcXUngrabDeviceButton, /* 18 */ SProcXAllowDeviceEvents, /* 19 */ SProcXGetDeviceFocus, /* 20 */ SProcXSetDeviceFocus, /* 21 */ SProcXGetFeedbackControl, /* 22 */ SProcXChangeFeedbackControl, /* 23 */ SProcXGetDeviceKeyMapping, /* 24 */ SProcXChangeDeviceKeyMapping, /* 25 */ SProcXGetDeviceModifierMapping, /* 26 */ SProcXSetDeviceModifierMapping, /* 27 */ SProcXGetDeviceButtonMapping, /* 28 */ SProcXSetDeviceButtonMapping, /* 29 */ SProcXQueryDeviceState, /* 30 */ SProcXSendExtensionEvent, /* 31 */ SProcXDeviceBell, /* 32 */ SProcXSetDeviceValuators, /* 33 */ SProcXGetDeviceControl, /* 34 */ SProcXChangeDeviceControl, /* 35 */ SProcXListDeviceProperties, /* 36 */ SProcXChangeDeviceProperty, /* 37 */ SProcXDeleteDeviceProperty, /* 38 */ SProcXGetDeviceProperty, /* 39 */ SProcXIQueryPointer, /* 40 */ SProcXIWarpPointer, /* 41 */ SProcXIChangeCursor, /* 42 */ SProcXIChangeHierarchy, /* 43 */ SProcXISetClientPointer, /* 44 */ SProcXIGetClientPointer, /* 45 */ SProcXISelectEvents, /* 46 */ SProcXIQueryVersion, /* 47 */ SProcXIQueryDevice, /* 48 */ SProcXISetFocus, /* 49 */ SProcXIGetFocus, /* 50 */ SProcXIGrabDevice, /* 51 */ SProcXIUngrabDevice, /* 52 */ SProcXIAllowEvents, /* 53 */ SProcXIPassiveGrabDevice, /* 54 */ SProcXIPassiveUngrabDevice, /* 55 */ SProcXIListProperties, /* 56 */ SProcXIChangeProperty, /* 57 */ SProcXIDeleteProperty, /* 58 */ SProcXIGetProperty, /* 59 */ SProcXIGetSelectedEvents, /* 60 */ SProcXIBarrierReleasePointer /* 61 */ }; /***************************************************************** * * Globals referenced elsewhere in the server. * */ int IReqCode = 0; int IEventBase = 0; int BadDevice = 0; static int BadEvent = 1; int BadMode = 2; int DeviceBusy = 3; int BadClass = 4; int DeviceValuator; int DeviceKeyPress; int DeviceKeyRelease; int DeviceButtonPress; int DeviceButtonRelease; int DeviceMotionNotify; int DeviceFocusIn; int DeviceFocusOut; int ProximityIn; int ProximityOut; int DeviceStateNotify; int DeviceKeyStateNotify; int DeviceButtonStateNotify; int DeviceMappingNotify; int ChangeDeviceNotify; int DevicePresenceNotify; int DevicePropertyNotify; RESTYPE RT_INPUTCLIENT; /***************************************************************** * * Externs defined elsewhere in the X server. * */ extern XExtensionVersion XIVersion; /***************************************************************** * * Versioning support * */ DevPrivateKeyRec XIClientPrivateKeyRec; /***************************************************************** * * Declarations of local routines. * */ /************************************************************************* * * ProcIDispatch - main dispatch routine for requests to this extension. * This routine is used if server and client have the same byte ordering. * */ static int ProcIDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= ARRAY_SIZE(ProcIVector) || !ProcIVector[stuff->data]) return BadRequest; UpdateCurrentTimeIf(); return (*ProcIVector[stuff->data]) (client); } /******************************************************************************* * * SProcXDispatch * * Main swapped dispatch routine for requests to this extension. * This routine is used if server and client do not have the same byte ordering. * */ static int _X_COLD SProcIDispatch(ClientPtr client) { REQUEST(xReq); if (stuff->data >= ARRAY_SIZE(SProcIVector) || !SProcIVector[stuff->data]) return BadRequest; UpdateCurrentTimeIf(); return (*SProcIVector[stuff->data]) (client); } /********************************************************************** * * SReplyIDispatch * Swap any replies defined in this extension. * */ static void _X_COLD SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) { /* All we look at is the type field */ /* This is common to all replies */ if (rep->RepType == X_GetExtensionVersion) SRepXGetExtensionVersion(client, len, (xGetExtensionVersionReply *) rep); else if (rep->RepType == X_ListInputDevices) SRepXListInputDevices(client, len, (xListInputDevicesReply *) rep); else if (rep->RepType == X_OpenDevice) SRepXOpenDevice(client, len, (xOpenDeviceReply *) rep); else if (rep->RepType == X_SetDeviceMode) SRepXSetDeviceMode(client, len, (xSetDeviceModeReply *) rep); else if (rep->RepType == X_GetSelectedExtensionEvents) SRepXGetSelectedExtensionEvents(client, len, (xGetSelectedExtensionEventsReply *) rep); else if (rep->RepType == X_GetDeviceDontPropagateList) SRepXGetDeviceDontPropagateList(client, len, (xGetDeviceDontPropagateListReply *) rep); else if (rep->RepType == X_GetDeviceMotionEvents) SRepXGetDeviceMotionEvents(client, len, (xGetDeviceMotionEventsReply *) rep); else if (rep->RepType == X_GrabDevice) SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep); else if (rep->RepType == X_GetDeviceFocus) SRepXGetDeviceFocus(client, len, (xGetDeviceFocusReply *) rep); else if (rep->RepType == X_GetFeedbackControl) SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); else if (rep->RepType == X_GetDeviceKeyMapping) SRepXGetDeviceKeyMapping(client, len, (xGetDeviceKeyMappingReply *) rep); else if (rep->RepType == X_GetDeviceModifierMapping) SRepXGetDeviceModifierMapping(client, len, (xGetDeviceModifierMappingReply *) rep); else if (rep->RepType == X_SetDeviceModifierMapping) SRepXSetDeviceModifierMapping(client, len, (xSetDeviceModifierMappingReply *) rep); else if (rep->RepType == X_GetDeviceButtonMapping) SRepXGetDeviceButtonMapping(client, len, (xGetDeviceButtonMappingReply *) rep); else if (rep->RepType == X_SetDeviceButtonMapping) SRepXSetDeviceButtonMapping(client, len, (xSetDeviceButtonMappingReply *) rep); else if (rep->RepType == X_QueryDeviceState) SRepXQueryDeviceState(client, len, (xQueryDeviceStateReply *) rep); else if (rep->RepType == X_SetDeviceValuators) SRepXSetDeviceValuators(client, len, (xSetDeviceValuatorsReply *) rep); else if (rep->RepType == X_GetDeviceControl) SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep); else if (rep->RepType == X_ChangeDeviceControl) SRepXChangeDeviceControl(client, len, (xChangeDeviceControlReply *) rep); else if (rep->RepType == X_ListDeviceProperties) SRepXListDeviceProperties(client, len, (xListDevicePropertiesReply *) rep); else if (rep->RepType == X_GetDeviceProperty) SRepXGetDeviceProperty(client, len, (xGetDevicePropertyReply *) rep); else if (rep->RepType == X_XIQueryPointer) SRepXIQueryPointer(client, len, (xXIQueryPointerReply *) rep); else if (rep->RepType == X_XIGetClientPointer) SRepXIGetClientPointer(client, len, (xXIGetClientPointerReply *) rep); else if (rep->RepType == X_XIQueryVersion) SRepXIQueryVersion(client, len, (xXIQueryVersionReply *) rep); else if (rep->RepType == X_XIQueryDevice) SRepXIQueryDevice(client, len, (xXIQueryDeviceReply *) rep); else if (rep->RepType == X_XIGrabDevice) SRepXIGrabDevice(client, len, (xXIGrabDeviceReply *) rep); else if (rep->RepType == X_XIPassiveGrabDevice) SRepXIPassiveGrabDevice(client, len, (xXIPassiveGrabDeviceReply *) rep); else if (rep->RepType == X_XIListProperties) SRepXIListProperties(client, len, (xXIListPropertiesReply *) rep); else if (rep->RepType == X_XIGetProperty) SRepXIGetProperty(client, len, (xXIGetPropertyReply *) rep); else if (rep->RepType == X_XIGetSelectedEvents) SRepXIGetSelectedEvents(client, len, (xXIGetSelectedEventsReply *) rep); else if (rep->RepType == X_XIGetFocus) SRepXIGetFocus(client, len, (xXIGetFocusReply *) rep); else { FatalError("XINPUT confused sending swapped reply"); } } /************************************************************************ * * This function swaps the DeviceValuator event. * */ static void SEventDeviceValuator(deviceValuator * from, deviceValuator * to) { int i; INT32 *ip; *to = *from; swaps(&to->sequenceNumber); swaps(&to->device_state); ip = &to->valuator0; for (i = 0; i < 6; i++) { swapl(ip + i); } } static void SEventFocus(deviceFocus * from, deviceFocus * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); swapl(&to->window); } static void SDeviceStateNotifyEvent(deviceStateNotify * from, deviceStateNotify * to) { int i; INT32 *ip; *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); ip = &to->valuator0; for (i = 0; i < 3; i++) { swapl(ip + i); } } static void SDeviceKeyStateNotifyEvent(deviceKeyStateNotify * from, deviceKeyStateNotify * to) { *to = *from; swaps(&to->sequenceNumber); } static void SDeviceButtonStateNotifyEvent(deviceButtonStateNotify * from, deviceButtonStateNotify * to) { *to = *from; swaps(&to->sequenceNumber); } static void SChangeDeviceNotifyEvent(changeDeviceNotify * from, changeDeviceNotify * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); } static void SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); } static void SDevicePresenceNotifyEvent(devicePresenceNotify * from, devicePresenceNotify * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); swaps(&to->control); } static void SDevicePropertyNotifyEvent(devicePropertyNotify * from, devicePropertyNotify * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->time); swapl(&to->atom); } static void SDeviceLeaveNotifyEvent(xXILeaveEvent * from, xXILeaveEvent * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->root); swapl(&to->event); swapl(&to->child); swapl(&to->root_x); swapl(&to->root_y); swapl(&to->event_x); swapl(&to->event_y); swaps(&to->sourceid); swaps(&to->buttons_len); swapl(&to->mods.base_mods); swapl(&to->mods.latched_mods); swapl(&to->mods.locked_mods); } static void SDeviceChangedEvent(xXIDeviceChangedEvent * from, xXIDeviceChangedEvent * to) { int i, j; xXIAnyInfo *any; *to = *from; memcpy(&to[1], &from[1], from->length * 4); any = (xXIAnyInfo *) &to[1]; for (i = 0; i < to->num_classes; i++) { int length = any->length; switch (any->type) { case KeyClass: { xXIKeyInfo *ki = (xXIKeyInfo *) any; uint32_t *key = (uint32_t *) &ki[1]; for (j = 0; j < ki->num_keycodes; j++, key++) swapl(key); swaps(&ki->num_keycodes); } break; case ButtonClass: { xXIButtonInfo *bi = (xXIButtonInfo *) any; Atom *labels = (Atom *) ((char *) bi + sizeof(xXIButtonInfo) + pad_to_int32(bits_to_bytes (bi->num_buttons))); for (j = 0; j < bi->num_buttons; j++) swapl(&labels[j]); swaps(&bi->num_buttons); } break; case ValuatorClass: { xXIValuatorInfo *ai = (xXIValuatorInfo *) any; swapl(&ai->label); swapl(&ai->min.integral); swapl(&ai->min.frac); swapl(&ai->max.integral); swapl(&ai->max.frac); swapl(&ai->resolution); swaps(&ai->number); } break; } swaps(&any->type); swaps(&any->length); swaps(&any->sourceid); any = (xXIAnyInfo *) ((char *) any + length * 4); } swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swaps(&to->num_classes); swaps(&to->sourceid); } static void SDeviceEvent(xXIDeviceEvent * from, xXIDeviceEvent * to) { int i; char *ptr; char *vmask; memcpy(to, from, sizeof(xEvent) + from->length * 4); swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->detail); swapl(&to->root); swapl(&to->event); swapl(&to->child); swapl(&to->root_x); swapl(&to->root_y); swapl(&to->event_x); swapl(&to->event_y); swaps(&to->buttons_len); swaps(&to->valuators_len); swaps(&to->sourceid); swapl(&to->mods.base_mods); swapl(&to->mods.latched_mods); swapl(&to->mods.locked_mods); swapl(&to->mods.effective_mods); swapl(&to->flags); ptr = (char *) (&to[1]); ptr += from->buttons_len * 4; vmask = ptr; /* valuator mask */ ptr += from->valuators_len * 4; for (i = 0; i < from->valuators_len * 32; i++) { if (BitIsOn(vmask, i)) { swapl(((uint32_t *) ptr)); ptr += 4; swapl(((uint32_t *) ptr)); ptr += 4; } } } static void SDeviceHierarchyEvent(xXIHierarchyEvent * from, xXIHierarchyEvent * to) { int i; xXIHierarchyInfo *info; *to = *from; memcpy(&to[1], &from[1], from->length * 4); swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->flags); swaps(&to->num_info); info = (xXIHierarchyInfo *) &to[1]; for (i = 0; i < from->num_info; i++) { swaps(&info->deviceid); swaps(&info->attachment); info++; } } static void SXIPropertyEvent(xXIPropertyEvent * from, xXIPropertyEvent * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->property); } static void SRawEvent(xXIRawEvent * from, xXIRawEvent * to) { int i; FP3232 *values; unsigned char *mask; memcpy(to, from, sizeof(xEvent) + from->length * 4); swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->detail); mask = (unsigned char *) &to[1]; values = (FP3232 *) (mask + from->valuators_len * 4); for (i = 0; i < from->valuators_len * 4 * 8; i++) { if (BitIsOn(mask, i)) { /* for each bit set there are two FP3232 values on the wire, in * the order abcABC for data and data_raw. Here we swap as if * they were in aAbBcC order because it's easier and really * doesn't matter. */ swapl(&values->integral); swapl(&values->frac); values++; swapl(&values->integral); swapl(&values->frac); values++; } } swaps(&to->valuators_len); } static void STouchOwnershipEvent(xXITouchOwnershipEvent * from, xXITouchOwnershipEvent * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swaps(&to->sourceid); swapl(&to->touchid); swapl(&to->flags); swapl(&to->root); swapl(&to->event); swapl(&to->child); } static void SBarrierEvent(xXIBarrierEvent * from, xXIBarrierEvent * to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swapl(&to->time); swaps(&to->deviceid); swaps(&to->sourceid); swapl(&to->event); swapl(&to->root); swapl(&to->root_x); swapl(&to->root_y); swapl(&to->dx.integral); swapl(&to->dx.frac); swapl(&to->dy.integral); swapl(&to->dy.frac); swapl(&to->dtime); swapl(&to->barrier); swapl(&to->eventid); } static void SGesturePinchEvent(xXIGesturePinchEvent* from, xXIGesturePinchEvent* to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->detail); swapl(&to->root); swapl(&to->event); swapl(&to->child); swapl(&to->root_x); swapl(&to->root_y); swapl(&to->event_x); swapl(&to->event_y); swapl(&to->delta_x); swapl(&to->delta_y); swapl(&to->delta_unaccel_x); swapl(&to->delta_unaccel_y); swapl(&to->scale); swapl(&to->delta_angle); swaps(&to->sourceid); swapl(&to->mods.base_mods); swapl(&to->mods.latched_mods); swapl(&to->mods.locked_mods); swapl(&to->mods.effective_mods); swapl(&to->flags); } static void SGestureSwipeEvent(xXIGestureSwipeEvent* from, xXIGestureSwipeEvent* to) { *to = *from; swaps(&to->sequenceNumber); swapl(&to->length); swaps(&to->evtype); swaps(&to->deviceid); swapl(&to->time); swapl(&to->detail); swapl(&to->root); swapl(&to->event); swapl(&to->child); swapl(&to->root_x); swapl(&to->root_y); swapl(&to->event_x); swapl(&to->event_y); swapl(&to->delta_x); swapl(&to->delta_y); swapl(&to->delta_unaccel_x); swapl(&to->delta_unaccel_y); swaps(&to->sourceid); swapl(&to->mods.base_mods); swapl(&to->mods.latched_mods); swapl(&to->mods.locked_mods); swapl(&to->mods.effective_mods); swapl(&to->flags); } /** Event swapping function for XI2 events. */ void _X_COLD XI2EventSwap(xGenericEvent *from, xGenericEvent *to) { switch (from->evtype) { case XI_Enter: case XI_Leave: case XI_FocusIn: case XI_FocusOut: SDeviceLeaveNotifyEvent((xXILeaveEvent *) from, (xXILeaveEvent *) to); break; case XI_DeviceChanged: SDeviceChangedEvent((xXIDeviceChangedEvent *) from, (xXIDeviceChangedEvent *) to); break; case XI_HierarchyChanged: SDeviceHierarchyEvent((xXIHierarchyEvent *) from, (xXIHierarchyEvent *) to); break; case XI_PropertyEvent: SXIPropertyEvent((xXIPropertyEvent *) from, (xXIPropertyEvent *) to); break; case XI_Motion: case XI_KeyPress: case XI_KeyRelease: case XI_ButtonPress: case XI_ButtonRelease: case XI_TouchBegin: case XI_TouchUpdate: case XI_TouchEnd: SDeviceEvent((xXIDeviceEvent *) from, (xXIDeviceEvent *) to); break; case XI_TouchOwnership: STouchOwnershipEvent((xXITouchOwnershipEvent *) from, (xXITouchOwnershipEvent *) to); break; case XI_RawMotion: case XI_RawKeyPress: case XI_RawKeyRelease: case XI_RawButtonPress: case XI_RawButtonRelease: case XI_RawTouchBegin: case XI_RawTouchUpdate: case XI_RawTouchEnd: SRawEvent((xXIRawEvent *) from, (xXIRawEvent *) to); break; case XI_BarrierHit: case XI_BarrierLeave: SBarrierEvent((xXIBarrierEvent *) from, (xXIBarrierEvent *) to); break; case XI_GesturePinchBegin: case XI_GesturePinchUpdate: case XI_GesturePinchEnd: SGesturePinchEvent((xXIGesturePinchEvent*) from, (xXIGesturePinchEvent*) to); break; case XI_GestureSwipeBegin: case XI_GestureSwipeUpdate: case XI_GestureSwipeEnd: SGestureSwipeEvent((xXIGestureSwipeEvent*) from, (xXIGestureSwipeEvent*) to); break; default: ErrorF("[Xi] Unknown event type to swap. This is a bug.\n"); break; } } /************************************************************************** * * Record an event mask where there is no unique corresponding event type. * We can't call SetMaskForEvent, since that would clobber the existing * mask for that event. MotionHint and ButtonMotion are examples. * * Since extension event types will never be less than 64, we can use * 0-63 in the EventInfo array as the "type" to be used to look up this * mask. This means that the corresponding macros such as * DevicePointerMotionHint must have access to the same constants. * */ static void SetEventInfo(Mask mask, int constant) { EventInfo[ExtEventIndex].mask = mask; EventInfo[ExtEventIndex++].type = constant; } /************************************************************************** * * Assign the specified mask to the specified event. * */ static void SetMaskForExtEvent(Mask mask, int event) { int i; EventInfo[ExtEventIndex].mask = mask; EventInfo[ExtEventIndex++].type = event; if ((event < LASTEvent) || (event >= 128)) FatalError("MaskForExtensionEvent: bogus event number"); for (i = 0; i < MAXDEVICES; i++) SetMaskForEvent(i, mask, event); } /************************************************************************ * * This function sets up extension event types and masks. * */ static void FixExtensionEvents(ExtensionEntry * extEntry) { DeviceValuator = extEntry->eventBase; DeviceKeyPress = DeviceValuator + 1; DeviceKeyRelease = DeviceKeyPress + 1; DeviceButtonPress = DeviceKeyRelease + 1; DeviceButtonRelease = DeviceButtonPress + 1; DeviceMotionNotify = DeviceButtonRelease + 1; DeviceFocusIn = DeviceMotionNotify + 1; DeviceFocusOut = DeviceFocusIn + 1; ProximityIn = DeviceFocusOut + 1; ProximityOut = ProximityIn + 1; DeviceStateNotify = ProximityOut + 1; DeviceMappingNotify = DeviceStateNotify + 1; ChangeDeviceNotify = DeviceMappingNotify + 1; DeviceKeyStateNotify = ChangeDeviceNotify + 1; DeviceButtonStateNotify = DeviceKeyStateNotify + 1; DevicePresenceNotify = DeviceButtonStateNotify + 1; DevicePropertyNotify = DevicePresenceNotify + 1; event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; event_base[ValuatorClass] = DeviceMotionNotify; event_base[ProximityClass] = ProximityIn; event_base[FocusClass] = DeviceFocusIn; event_base[OtherClass] = DeviceStateNotify; BadDevice += extEntry->errorBase; BadEvent += extEntry->errorBase; BadMode += extEntry->errorBase; DeviceBusy += extEntry->errorBase; BadClass += extEntry->errorBase; SetMaskForExtEvent(KeyPressMask, DeviceKeyPress); SetCriticalEvent(DeviceKeyPress); SetMaskForExtEvent(KeyReleaseMask, DeviceKeyRelease); SetCriticalEvent(DeviceKeyRelease); SetMaskForExtEvent(ButtonPressMask, DeviceButtonPress); SetCriticalEvent(DeviceButtonPress); SetMaskForExtEvent(ButtonReleaseMask, DeviceButtonRelease); SetCriticalEvent(DeviceButtonRelease); SetMaskForExtEvent(DeviceProximityMask, ProximityIn); SetMaskForExtEvent(DeviceProximityMask, ProximityOut); SetMaskForExtEvent(DeviceStateNotifyMask, DeviceStateNotify); SetMaskForExtEvent(PointerMotionMask, DeviceMotionNotify); SetCriticalEvent(DeviceMotionNotify); SetEventInfo(DevicePointerMotionHintMask, _devicePointerMotionHint); SetEventInfo(DeviceButton1MotionMask, _deviceButton1Motion); SetEventInfo(DeviceButton2MotionMask, _deviceButton2Motion); SetEventInfo(DeviceButton3MotionMask, _deviceButton3Motion); SetEventInfo(DeviceButton4MotionMask, _deviceButton4Motion); SetEventInfo(DeviceButton5MotionMask, _deviceButton5Motion); SetEventInfo(DeviceButtonMotionMask, _deviceButtonMotion); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusIn); SetMaskForExtEvent(DeviceFocusChangeMask, DeviceFocusOut); SetMaskForExtEvent(DeviceMappingNotifyMask, DeviceMappingNotify); SetMaskForExtEvent(ChangeDeviceNotifyMask, ChangeDeviceNotify); SetEventInfo(DeviceButtonGrabMask, _deviceButtonGrab); SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); SetEventInfo(DevicePresenceNotifyMask, _devicePresence); SetMaskForExtEvent(DevicePropertyNotifyMask, DevicePropertyNotify); SetEventInfo(0, _noExtensionEvent); } /************************************************************************ * * This function restores extension event types and masks to their * initial state. * */ static void RestoreExtensionEvents(void) { int i, j; IReqCode = 0; IEventBase = 0; for (i = 0; i < ExtEventIndex - 1; i++) { if ((EventInfo[i].type >= LASTEvent) && (EventInfo[i].type < 128)) { for (j = 0; j < MAXDEVICES; j++) SetMaskForEvent(j, 0, EventInfo[i].type); } EventInfo[i].mask = 0; EventInfo[i].type = 0; } ExtEventIndex = 0; DeviceValuator = 0; DeviceKeyPress = 1; DeviceKeyRelease = 2; DeviceButtonPress = 3; DeviceButtonRelease = 4; DeviceMotionNotify = 5; DeviceFocusIn = 6; DeviceFocusOut = 7; ProximityIn = 8; ProximityOut = 9; DeviceStateNotify = 10; DeviceMappingNotify = 11; ChangeDeviceNotify = 12; DeviceKeyStateNotify = 13; DeviceButtonStateNotify = 13; DevicePresenceNotify = 14; DevicePropertyNotify = 15; BadDevice = 0; BadEvent = 1; BadMode = 2; DeviceBusy = 3; BadClass = 4; } /*********************************************************************** * * IResetProc. * Remove reply-swapping routine. * Remove event-swapping routine. * */ static void IResetProc(ExtensionEntry * unused) { ReplySwapVector[IReqCode] = ReplyNotSwappd; EventSwapVector[DeviceValuator] = NotImplemented; EventSwapVector[DeviceKeyPress] = NotImplemented; EventSwapVector[DeviceKeyRelease] = NotImplemented; EventSwapVector[DeviceButtonPress] = NotImplemented; EventSwapVector[DeviceButtonRelease] = NotImplemented; EventSwapVector[DeviceMotionNotify] = NotImplemented; EventSwapVector[DeviceFocusIn] = NotImplemented; EventSwapVector[DeviceFocusOut] = NotImplemented; EventSwapVector[ProximityIn] = NotImplemented; EventSwapVector[ProximityOut] = NotImplemented; EventSwapVector[DeviceStateNotify] = NotImplemented; EventSwapVector[DeviceKeyStateNotify] = NotImplemented; EventSwapVector[DeviceButtonStateNotify] = NotImplemented; EventSwapVector[DeviceMappingNotify] = NotImplemented; EventSwapVector[ChangeDeviceNotify] = NotImplemented; EventSwapVector[DevicePresenceNotify] = NotImplemented; EventSwapVector[DevicePropertyNotify] = NotImplemented; RestoreExtensionEvents(); free(xi_all_devices.name); free(xi_all_master_devices.name); XIBarrierReset(); } /*********************************************************************** * * Assign an id and type to an input device. * */ void AssignTypeAndName(DeviceIntPtr dev, Atom type, const char *name) { dev->xinput_type = type; dev->name = strdup(name); } /*********************************************************************** * * Make device type atoms. * */ static void MakeDeviceTypeAtoms(void) { int i; for (i = 0; i < NUMTYPES; i++) dev_type[i].type = MakeAtom(dev_type[i].name, strlen(dev_type[i].name), 1); } /***************************************************************************** * * SEventIDispatch * * Swap any events defined in this extension. */ #define DO_SWAP(func,type) func ((type *)from, (type *)to) static void _X_COLD SEventIDispatch(xEvent *from, xEvent *to) { int type = from->u.u.type & 0177; if (type == DeviceValuator) DO_SWAP(SEventDeviceValuator, deviceValuator); else if (type == DeviceKeyPress) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceKeyRelease) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceButtonPress) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceButtonRelease) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceMotionNotify) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceFocusIn) DO_SWAP(SEventFocus, deviceFocus); else if (type == DeviceFocusOut) DO_SWAP(SEventFocus, deviceFocus); else if (type == ProximityIn) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == ProximityOut) { SKeyButtonPtrEvent(from, to); to->u.keyButtonPointer.pad1 = from->u.keyButtonPointer.pad1; } else if (type == DeviceStateNotify) DO_SWAP(SDeviceStateNotifyEvent, deviceStateNotify); else if (type == DeviceKeyStateNotify) DO_SWAP(SDeviceKeyStateNotifyEvent, deviceKeyStateNotify); else if (type == DeviceButtonStateNotify) DO_SWAP(SDeviceButtonStateNotifyEvent, deviceButtonStateNotify); else if (type == DeviceMappingNotify) DO_SWAP(SDeviceMappingNotifyEvent, deviceMappingNotify); else if (type == ChangeDeviceNotify) DO_SWAP(SChangeDeviceNotifyEvent, changeDeviceNotify); else if (type == DevicePresenceNotify) DO_SWAP(SDevicePresenceNotifyEvent, devicePresenceNotify); else if (type == DevicePropertyNotify) DO_SWAP(SDevicePropertyNotifyEvent, devicePropertyNotify); else { FatalError("XInputExtension: Impossible event!\n"); } } /********************************************************************** * * IExtensionInit - initialize the input extension. * * Called from InitExtensions in main() or from QueryExtension() if the * extension is dynamically loaded. * * This extension has several events and errors. * * XI is mandatory nowadays, so if we fail to init XI, we die. */ void XInputExtensionInit(void) { ExtensionEntry *extEntry; XExtensionVersion thisversion = { XI_Present, SERVER_XI_MAJOR_VERSION, SERVER_XI_MINOR_VERSION, }; if (!dixRegisterPrivateKey (&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec))) FatalError("Cannot request private for XI.\n"); if (!XIBarrierInit()) FatalError("Could not initialize barriers.\n"); extEntry = AddExtension(INAME, IEVENTS, IERRORS, ProcIDispatch, SProcIDispatch, IResetProc, StandardMinorOpcode); if (extEntry) { IReqCode = extEntry->base; IEventBase = extEntry->eventBase; XIVersion = thisversion; MakeDeviceTypeAtoms(); RT_INPUTCLIENT = CreateNewResourceType((DeleteType) InputClientGone, "INPUTCLIENT"); if (!RT_INPUTCLIENT) FatalError("Failed to add resource type for XI.\n"); FixExtensionEvents(extEntry); ReplySwapVector[IReqCode] = (ReplySwapPtr) SReplyIDispatch; EventSwapVector[DeviceValuator] = SEventIDispatch; EventSwapVector[DeviceKeyPress] = SEventIDispatch; EventSwapVector[DeviceKeyRelease] = SEventIDispatch; EventSwapVector[DeviceButtonPress] = SEventIDispatch; EventSwapVector[DeviceButtonRelease] = SEventIDispatch; EventSwapVector[DeviceMotionNotify] = SEventIDispatch; EventSwapVector[DeviceFocusIn] = SEventIDispatch; EventSwapVector[DeviceFocusOut] = SEventIDispatch; EventSwapVector[ProximityIn] = SEventIDispatch; EventSwapVector[ProximityOut] = SEventIDispatch; EventSwapVector[DeviceStateNotify] = SEventIDispatch; EventSwapVector[DeviceKeyStateNotify] = SEventIDispatch; EventSwapVector[DeviceButtonStateNotify] = SEventIDispatch; EventSwapVector[DeviceMappingNotify] = SEventIDispatch; EventSwapVector[ChangeDeviceNotify] = SEventIDispatch; EventSwapVector[DevicePresenceNotify] = SEventIDispatch; GERegisterExtension(IReqCode, XI2EventSwap); memset(&xi_all_devices, 0, sizeof(xi_all_devices)); memset(&xi_all_master_devices, 0, sizeof(xi_all_master_devices)); xi_all_devices.id = XIAllDevices; xi_all_devices.name = strdup("XIAllDevices"); xi_all_master_devices.id = XIAllMasterDevices; xi_all_master_devices.name = strdup("XIAllMasterDevices"); inputInfo.all_devices = &xi_all_devices; inputInfo.all_master_devices = &xi_all_master_devices; XIResetProperties(); } else { FatalError("IExtensionInit: AddExtensions failed\n"); } } xorg-server-21.1.16/Xi/getbmap.c0000644000175000017500000001052014757411105011774 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to return the version of the extension. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "getbmap.h" /*********************************************************************** * * This procedure gets the button mapping for the specified device. * */ int _X_COLD SProcXGetDeviceButtonMapping(ClientPtr client) { REQUEST(xGetDeviceButtonMappingReq); swaps(&stuff->length); return (ProcXGetDeviceButtonMapping(client)); } /*********************************************************************** * * This procedure gets the button mapping for the specified device. * */ int ProcXGetDeviceButtonMapping(ClientPtr client) { DeviceIntPtr dev; xGetDeviceButtonMappingReply rep; ButtonClassPtr b; int rc; REQUEST(xGetDeviceButtonMappingReq); REQUEST_SIZE_MATCH(xGetDeviceButtonMappingReq); rep = (xGetDeviceButtonMappingReply) { .repType = X_Reply, .RepType = X_GetDeviceButtonMapping, .sequenceNumber = client->sequence, .nElts = 0, .length = 0 }; rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; b = dev->button; if (b == NULL) return BadMatch; rep.nElts = b->numButtons; rep.length = bytes_to_int32(rep.nElts); WriteReplyToClient(client, sizeof(xGetDeviceButtonMappingReply), &rep); WriteToClient(client, rep.nElts, &b->map[1]); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetDeviceButtonMapping function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceButtonMapping(ClientPtr client, int size, xGetDeviceButtonMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getbmap.h0000644000175000017500000000320514757411105012003 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETBMAP_H #define GETBMAP_H 1 int SProcXGetDeviceButtonMapping(ClientPtr /* client */ ); int ProcXGetDeviceButtonMapping(ClientPtr /* client */ ); void SRepXGetDeviceButtonMapping(ClientPtr /* client */ , int /* size */ , xGetDeviceButtonMappingReply * /* rep */ ); #endif /* GETBMAP_H */ xorg-server-21.1.16/Xi/getdctl.c0000644000175000017500000001601314757411105012006 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Get Device control attributes for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "getdctl.h" /*********************************************************************** * * This procedure gets the control attributes for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXGetDeviceControl(ClientPtr client) { REQUEST(xGetDeviceControlReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceControlReq); swaps(&stuff->control); return (ProcXGetDeviceControl(client)); } /*********************************************************************** * * This procedure copies DeviceResolution data, swapping if necessary. * */ static void CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, int length) { AxisInfoPtr a; xDeviceResolutionState *r; int i, *iptr; r = (xDeviceResolutionState *) buf; r->control = DEVICE_RESOLUTION; r->length = length; r->num_valuators = v->numAxes; buf += sizeof(xDeviceResolutionState); iptr = (int *) buf; for (i = 0, a = v->axes; i < v->numAxes; i++, a++) *iptr++ = a->resolution; for (i = 0, a = v->axes; i < v->numAxes; i++, a++) *iptr++ = a->min_resolution; for (i = 0, a = v->axes; i < v->numAxes; i++, a++) *iptr++ = a->max_resolution; if (client->swapped) { swaps(&r->control); swaps(&r->length); swapl(&r->num_valuators); iptr = (int *) buf; for (i = 0; i < (3 * v->numAxes); i++, iptr++) { swapl(iptr); } } } static void CopySwapDeviceCore(ClientPtr client, DeviceIntPtr dev, char *buf) { xDeviceCoreState *c = (xDeviceCoreState *) buf; c->control = DEVICE_CORE; c->length = sizeof(xDeviceCoreState); c->status = dev->coreEvents; c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); if (client->swapped) { swaps(&c->control); swaps(&c->length); } } static void CopySwapDeviceEnable(ClientPtr client, DeviceIntPtr dev, char *buf) { xDeviceEnableState *e = (xDeviceEnableState *) buf; e->control = DEVICE_ENABLE; e->length = sizeof(xDeviceEnableState); e->enable = dev->enabled; if (client->swapped) { swaps(&e->control); swaps(&e->length); } } /*********************************************************************** * * This procedure writes the reply for the xGetDeviceControl function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } /*********************************************************************** * * Get the state of the specified device control. * */ int ProcXGetDeviceControl(ClientPtr client) { int rc, total_length = 0; char *buf, *savbuf; DeviceIntPtr dev; xGetDeviceControlReply rep; REQUEST(xGetDeviceControlReq); REQUEST_SIZE_MATCH(xGetDeviceControlReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xGetDeviceControlReply) { .repType = X_Reply, .RepType = X_GetDeviceControl, .sequenceNumber = client->sequence, .length = 0 }; switch (stuff->control) { case DEVICE_RESOLUTION: if (!dev->valuator) return BadMatch; total_length = sizeof(xDeviceResolutionState) + (3 * sizeof(int) * dev->valuator->numAxes); break; case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: return BadMatch; case DEVICE_CORE: total_length = sizeof(xDeviceCoreState); break; case DEVICE_ENABLE: total_length = sizeof(xDeviceEnableState); break; default: return BadValue; } buf = (char *) malloc(total_length); if (!buf) return BadAlloc; savbuf = buf; switch (stuff->control) { case DEVICE_RESOLUTION: CopySwapDeviceResolution(client, dev->valuator, buf, total_length); break; case DEVICE_CORE: CopySwapDeviceCore(client, dev, buf); break; case DEVICE_ENABLE: CopySwapDeviceEnable(client, dev, buf); break; default: break; } rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); return Success; } xorg-server-21.1.16/Xi/getdctl.h0000644000175000017500000000314114757411105012011 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETDCTL_H #define GETDCTL_H 1 int SProcXGetDeviceControl(ClientPtr /* client */ ); int ProcXGetDeviceControl(ClientPtr /* client */ ); void SRepXGetDeviceControl(ClientPtr /* client */ , int /* size */ , xGetDeviceControlReply * /* rep */ ); #endif /* GETDCTL_H */ xorg-server-21.1.16/Xi/getfctl.c0000644000175000017500000002531114757411105012011 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Get feedback control attributes for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "getfctl.h" /*********************************************************************** * * This procedure gets the control attributes for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXGetFeedbackControl(ClientPtr client) { REQUEST(xGetFeedbackControlReq); swaps(&stuff->length); return (ProcXGetFeedbackControl(client)); } /*********************************************************************** * * This procedure copies KbdFeedbackClass data, swapping if necessary. * */ static void CopySwapKbdFeedback(ClientPtr client, KbdFeedbackPtr k, char **buf) { int i; xKbdFeedbackState *k2; k2 = (xKbdFeedbackState *) * buf; k2->class = KbdFeedbackClass; k2->length = sizeof(xKbdFeedbackState); k2->id = k->ctrl.id; k2->click = k->ctrl.click; k2->percent = k->ctrl.bell; k2->pitch = k->ctrl.bell_pitch; k2->duration = k->ctrl.bell_duration; k2->led_mask = k->ctrl.leds; k2->global_auto_repeat = k->ctrl.autoRepeat; for (i = 0; i < 32; i++) k2->auto_repeats[i] = k->ctrl.autoRepeats[i]; if (client->swapped) { swaps(&k2->length); swaps(&k2->pitch); swaps(&k2->duration); swapl(&k2->led_mask); swapl(&k2->led_values); } *buf += sizeof(xKbdFeedbackState); } /*********************************************************************** * * This procedure copies PtrFeedbackClass data, swapping if necessary. * */ static void CopySwapPtrFeedback(ClientPtr client, PtrFeedbackPtr p, char **buf) { xPtrFeedbackState *p2; p2 = (xPtrFeedbackState *) * buf; p2->class = PtrFeedbackClass; p2->length = sizeof(xPtrFeedbackState); p2->id = p->ctrl.id; p2->accelNum = p->ctrl.num; p2->accelDenom = p->ctrl.den; p2->threshold = p->ctrl.threshold; if (client->swapped) { swaps(&p2->length); swaps(&p2->accelNum); swaps(&p2->accelDenom); swaps(&p2->threshold); } *buf += sizeof(xPtrFeedbackState); } /*********************************************************************** * * This procedure copies IntegerFeedbackClass data, swapping if necessary. * */ static void CopySwapIntegerFeedback(ClientPtr client, IntegerFeedbackPtr i, char **buf) { xIntegerFeedbackState *i2; i2 = (xIntegerFeedbackState *) * buf; i2->class = IntegerFeedbackClass; i2->length = sizeof(xIntegerFeedbackState); i2->id = i->ctrl.id; i2->resolution = i->ctrl.resolution; i2->min_value = i->ctrl.min_value; i2->max_value = i->ctrl.max_value; if (client->swapped) { swaps(&i2->length); swapl(&i2->resolution); swapl(&i2->min_value); swapl(&i2->max_value); } *buf += sizeof(xIntegerFeedbackState); } /*********************************************************************** * * This procedure copies StringFeedbackClass data, swapping if necessary. * */ static void CopySwapStringFeedback(ClientPtr client, StringFeedbackPtr s, char **buf) { int i; xStringFeedbackState *s2; KeySym *kptr; s2 = (xStringFeedbackState *) * buf; s2->class = StringFeedbackClass; s2->length = sizeof(xStringFeedbackState) + s->ctrl.num_symbols_supported * sizeof(KeySym); s2->id = s->ctrl.id; s2->max_symbols = s->ctrl.max_symbols; s2->num_syms_supported = s->ctrl.num_symbols_supported; *buf += sizeof(xStringFeedbackState); kptr = (KeySym *) (*buf); for (i = 0; i < s->ctrl.num_symbols_supported; i++) *kptr++ = *(s->ctrl.symbols_supported + i); if (client->swapped) { swaps(&s2->length); swaps(&s2->max_symbols); swaps(&s2->num_syms_supported); kptr = (KeySym *) (*buf); for (i = 0; i < s->ctrl.num_symbols_supported; i++, kptr++) { swapl(kptr); } } *buf += (s->ctrl.num_symbols_supported * sizeof(KeySym)); } /*********************************************************************** * * This procedure copies LedFeedbackClass data, swapping if necessary. * */ static void CopySwapLedFeedback(ClientPtr client, LedFeedbackPtr l, char **buf) { xLedFeedbackState *l2; l2 = (xLedFeedbackState *) * buf; l2->class = LedFeedbackClass; l2->length = sizeof(xLedFeedbackState); l2->id = l->ctrl.id; l2->led_values = l->ctrl.led_values; l2->led_mask = l->ctrl.led_mask; if (client->swapped) { swaps(&l2->length); swapl(&l2->led_values); swapl(&l2->led_mask); } *buf += sizeof(xLedFeedbackState); } /*********************************************************************** * * This procedure copies BellFeedbackClass data, swapping if necessary. * */ static void CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) { xBellFeedbackState *b2; b2 = (xBellFeedbackState *) * buf; b2->class = BellFeedbackClass; b2->length = sizeof(xBellFeedbackState); b2->id = b->ctrl.id; b2->percent = b->ctrl.percent; b2->pitch = b->ctrl.pitch; b2->duration = b->ctrl.duration; if (client->swapped) { swaps(&b2->length); swaps(&b2->pitch); swaps(&b2->duration); } *buf += sizeof(xBellFeedbackState); } /*********************************************************************** * * This procedure writes the reply for the xGetFeedbackControl function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetFeedbackControl(ClientPtr client, int size, xGetFeedbackControlReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_feedbacks); WriteToClient(client, size, rep); } /*********************************************************************** * * Get the feedback control state. * */ int ProcXGetFeedbackControl(ClientPtr client) { int rc, total_length = 0; char *buf, *savbuf; DeviceIntPtr dev; KbdFeedbackPtr k; PtrFeedbackPtr p; IntegerFeedbackPtr i; StringFeedbackPtr s; BellFeedbackPtr b; LedFeedbackPtr l; xGetFeedbackControlReply rep; REQUEST(xGetFeedbackControlReq); REQUEST_SIZE_MATCH(xGetFeedbackControlReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; rep = (xGetFeedbackControlReply) { .repType = X_Reply, .RepType = X_GetFeedbackControl, .sequenceNumber = client->sequence, .length = 0, .num_feedbacks = 0 }; for (k = dev->kbdfeed; k; k = k->next) { rep.num_feedbacks++; total_length += sizeof(xKbdFeedbackState); } for (p = dev->ptrfeed; p; p = p->next) { rep.num_feedbacks++; total_length += sizeof(xPtrFeedbackState); } for (s = dev->stringfeed; s; s = s->next) { rep.num_feedbacks++; total_length += sizeof(xStringFeedbackState) + (s->ctrl.num_symbols_supported * sizeof(KeySym)); } for (i = dev->intfeed; i; i = i->next) { rep.num_feedbacks++; total_length += sizeof(xIntegerFeedbackState); } for (l = dev->leds; l; l = l->next) { rep.num_feedbacks++; total_length += sizeof(xLedFeedbackState); } for (b = dev->bell; b; b = b->next) { rep.num_feedbacks++; total_length += sizeof(xBellFeedbackState); } if (total_length == 0) return BadMatch; buf = (char *) malloc(total_length); if (!buf) return BadAlloc; savbuf = buf; for (k = dev->kbdfeed; k; k = k->next) CopySwapKbdFeedback(client, k, &buf); for (p = dev->ptrfeed; p; p = p->next) CopySwapPtrFeedback(client, p, &buf); for (s = dev->stringfeed; s; s = s->next) CopySwapStringFeedback(client, s, &buf); for (i = dev->intfeed; i; i = i->next) CopySwapIntegerFeedback(client, i, &buf); for (l = dev->leds; l; l = l->next) CopySwapLedFeedback(client, l, &buf); for (b = dev->bell; b; b = b->next) CopySwapBellFeedback(client, b, &buf); rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); return Success; } xorg-server-21.1.16/Xi/getfctl.h0000644000175000017500000000314514757411105012017 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETFCTL_H #define GETFCTL_H 1 int SProcXGetFeedbackControl(ClientPtr /* client */ ); int ProcXGetFeedbackControl(ClientPtr /* client */ ); void SRepXGetFeedbackControl(ClientPtr /* client */ , int /* size */ , xGetFeedbackControlReply * /* rep */ ); #endif /* GETFCTL_H */ xorg-server-21.1.16/Xi/getfocus.c0000644000175000017500000001073514757411105012204 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to get the focus for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "getfocus.h" /*********************************************************************** * * This procedure gets the focus for a device. * */ int _X_COLD SProcXGetDeviceFocus(ClientPtr client) { REQUEST(xGetDeviceFocusReq); swaps(&stuff->length); return (ProcXGetDeviceFocus(client)); } /*********************************************************************** * * This procedure gets the focus for a device. * */ int ProcXGetDeviceFocus(ClientPtr client) { DeviceIntPtr dev; FocusClassPtr focus; xGetDeviceFocusReply rep; int rc; REQUEST(xGetDeviceFocusReq); REQUEST_SIZE_MATCH(xGetDeviceFocusReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); if (rc != Success) return rc; if (!dev->focus) return BadDevice; rep = (xGetDeviceFocusReply) { .repType = X_Reply, .RepType = X_GetDeviceFocus, .sequenceNumber = client->sequence, .length = 0 }; focus = dev->focus; if (focus->win == NoneWin) rep.focus = None; else if (focus->win == PointerRootWin) rep.focus = PointerRoot; else if (focus->win == FollowKeyboardWin) rep.focus = FollowKeyboard; else rep.focus = focus->win->drawable.id; rep.time = focus->time.milliseconds; rep.revertTo = focus->revert; WriteReplyToClient(client, sizeof(xGetDeviceFocusReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the GetDeviceFocus function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceFocus(ClientPtr client, int size, xGetDeviceFocusReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->focus); swapl(&rep->time); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getfocus.h0000644000175000017500000000313014757411105012200 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETFOCUS_H #define GETFOCUS_H 1 int SProcXGetDeviceFocus(ClientPtr /* client */ ); int ProcXGetDeviceFocus(ClientPtr /* client */ ); void SRepXGetDeviceFocus(ClientPtr /* client */ , int /* size */ , xGetDeviceFocusReply * /* rep */ ); #endif /* GETFOCUS_H */ xorg-server-21.1.16/Xi/getkmap.c0000644000175000017500000001216514757411105012014 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Get the key mapping for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exglobals.h" #include "swaprep.h" #include "xkbsrv.h" #include "xkbstr.h" #include "getkmap.h" /*********************************************************************** * * This procedure gets the key mapping for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXGetDeviceKeyMapping(ClientPtr client) { REQUEST(xGetDeviceKeyMappingReq); swaps(&stuff->length); return (ProcXGetDeviceKeyMapping(client)); } /*********************************************************************** * * Get the device key mapping. * */ int ProcXGetDeviceKeyMapping(ClientPtr client) { xGetDeviceKeyMappingReply rep; DeviceIntPtr dev; XkbDescPtr xkb; KeySymsPtr syms; int rc; REQUEST(xGetDeviceKeyMappingReq); REQUEST_SIZE_MATCH(xGetDeviceKeyMappingReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; if (dev->key == NULL) return BadMatch; xkb = dev->key->xkbInfo->desc; if (stuff->firstKeyCode < xkb->min_key_code || stuff->firstKeyCode > xkb->max_key_code) { client->errorValue = stuff->firstKeyCode; return BadValue; } if (stuff->firstKeyCode + stuff->count > xkb->max_key_code + 1) { client->errorValue = stuff->count; return BadValue; } syms = XkbGetCoreMap(dev); if (!syms) return BadAlloc; rep = (xGetDeviceKeyMappingReply) { .repType = X_Reply, .RepType = X_GetDeviceKeyMapping, .sequenceNumber = client->sequence, .keySymsPerKeyCode = syms->mapWidth, .length = (syms->mapWidth * stuff->count) /* KeySyms are 4 bytes */ }; WriteReplyToClient(client, sizeof(xGetDeviceKeyMappingReply), &rep); client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; WriteSwappedDataToClient(client, syms->mapWidth * stuff->count * sizeof(KeySym), &syms->map[syms->mapWidth * (stuff->firstKeyCode - syms->minKeyCode)]); free(syms->map); free(syms); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetDeviceKeyMapping function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceKeyMapping(ClientPtr client, int size, xGetDeviceKeyMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getkmap.h0000644000175000017500000000315714757411105012022 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETKMAP_H #define GETKMAP_H 1 int SProcXGetDeviceKeyMapping(ClientPtr /* client */ ); int ProcXGetDeviceKeyMapping(ClientPtr /* client */ ); void SRepXGetDeviceKeyMapping(ClientPtr /* client */ , int /* size */ , xGetDeviceKeyMappingReply * /* rep */ ); #endif /* GETKMAP_H */ xorg-server-21.1.16/Xi/getmmap.c0000644000175000017500000001111714757411105012012 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Get the modifier mapping for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include /* Request macro */ #include "exglobals.h" #include "getmmap.h" /*********************************************************************** * * This procedure gets the modifier mapping for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXGetDeviceModifierMapping(ClientPtr client) { REQUEST(xGetDeviceModifierMappingReq); swaps(&stuff->length); return (ProcXGetDeviceModifierMapping(client)); } /*********************************************************************** * * Get the device Modifier mapping. * */ int ProcXGetDeviceModifierMapping(ClientPtr client) { DeviceIntPtr dev; xGetDeviceModifierMappingReply rep; KeyCode *modkeymap = NULL; int ret, max_keys_per_mod; REQUEST(xGetDeviceModifierMappingReq); REQUEST_SIZE_MATCH(xGetDeviceModifierMappingReq); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (ret != Success) return ret; ret = generate_modkeymap(client, dev, &modkeymap, &max_keys_per_mod); if (ret != Success) return ret; rep = (xGetDeviceModifierMappingReply) { .repType = X_Reply, .RepType = X_GetDeviceModifierMapping, .sequenceNumber = client->sequence, .numKeyPerModifier = max_keys_per_mod, /* length counts 4 byte quantities - there are 8 modifiers 1 byte big */ .length = max_keys_per_mod << 1 }; WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); WriteToClient(client, max_keys_per_mod * 8, modkeymap); free(modkeymap); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetDeviceModifierMapping function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceModifierMapping(ClientPtr client, int size, xGetDeviceModifierMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getmmap.h0000644000175000017500000000322114757411105012014 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETMMAP_H #define GETMMAP_H 1 int SProcXGetDeviceModifierMapping(ClientPtr /* client */ ); int ProcXGetDeviceModifierMapping(ClientPtr /* client */ ); void SRepXGetDeviceModifierMapping(ClientPtr /* client */ , int /* size */ , xGetDeviceModifierMappingReply * /* rep */ ); #endif /* GETMMAP_H */ xorg-server-21.1.16/Xi/getprop.c0000644000175000017500000001377514757411105012054 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Function to return the dont-propagate-list for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structs */ #include #include #include "exglobals.h" #include "swaprep.h" #include "getprop.h" extern XExtEventInfo EventInfo[]; extern int ExtEventIndex; /*********************************************************************** * * Handle a request from a client with a different byte order. * */ int _X_COLD SProcXGetDeviceDontPropagateList(ClientPtr client) { REQUEST(xGetDeviceDontPropagateListReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); swapl(&stuff->window); return (ProcXGetDeviceDontPropagateList(client)); } /*********************************************************************** * * This procedure lists the input devices available to the server. * */ int ProcXGetDeviceDontPropagateList(ClientPtr client) { CARD16 count = 0; int i, rc; XEventClass *buf = NULL, *tbuf; WindowPtr pWin; xGetDeviceDontPropagateListReply rep; OtherInputMasks *others; REQUEST(xGetDeviceDontPropagateListReq); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); rep = (xGetDeviceDontPropagateListReply) { .repType = X_Reply, .RepType = X_GetDeviceDontPropagateList, .sequenceNumber = client->sequence, .length = 0, .count = 0 }; rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if ((others = wOtherInputMasks(pWin)) != 0) { for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->dontPropagateMask[i], i, &count, COUNT); if (count) { rep.count = count; buf = xallocarray(rep.count, sizeof(XEventClass)); rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf; for (i = 0; i < EMASKSIZE; i++) tbuf = ClassFromMask(tbuf, others->dontPropagateMask[i], i, NULL, CREATE); } } WriteReplyToClient(client, sizeof(xGetDeviceDontPropagateListReply), &rep); if (count) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); free(buf); } return Success; } /*********************************************************************** * * This procedure gets a list of event classes from a mask word. * A single mask may translate to more than one event class. * */ XEventClass * ClassFromMask(XEventClass * buf, Mask mask, int maskndx, CARD16 *count, int mode) { int i, j; int id = maskndx; Mask tmask = 0x80000000; for (i = 0; i < 32; i++, tmask >>= 1) if (tmask & mask) { for (j = 0; j < ExtEventIndex; j++) if (EventInfo[j].mask == tmask) { if (mode == COUNT) (*count)++; else *buf++ = (id << 8) | EventInfo[j].type; } } return buf; } /*********************************************************************** * * This procedure writes the reply for the XGetDeviceDontPropagateList function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceDontPropagateList(ClientPtr client, int size, xGetDeviceDontPropagateListReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->count); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getprop.h0000644000175000017500000000361314757411105012047 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETPROP_H #define GETPROP_H 1 int SProcXGetDeviceDontPropagateList(ClientPtr /* client */ ); int ProcXGetDeviceDontPropagateList(ClientPtr /* client */ ); XEventClass *ClassFromMask(XEventClass * /* buf */ , Mask /* mask */ , int /* maskndx */ , CARD16 * /* count */ , int /* mode */ ); void SRepXGetDeviceDontPropagateList(ClientPtr /* client */ , int /* size */ , xGetDeviceDontPropagateListReply * /* rep */ ); #endif /* GETPROP_H */ xorg-server-21.1.16/Xi/getselev.c0000644000175000017500000001416214757411105012201 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to get the current selected events for a given window. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window struct */ #include "exglobals.h" #include "swaprep.h" #include "getprop.h" #include "getselev.h" /*********************************************************************** * * This procedure gets the current selected extension events. * */ int _X_COLD SProcXGetSelectedExtensionEvents(ClientPtr client) { REQUEST(xGetSelectedExtensionEventsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); swapl(&stuff->window); return (ProcXGetSelectedExtensionEvents(client)); } /*********************************************************************** * * This procedure gets the current device select mask, * if the client and server have a different byte ordering. * */ int ProcXGetSelectedExtensionEvents(ClientPtr client) { int i, rc, total_length = 0; xGetSelectedExtensionEventsReply rep; WindowPtr pWin; XEventClass *buf = NULL; XEventClass *tclient; XEventClass *aclient; OtherInputMasks *pOthers; InputClientsPtr others; REQUEST(xGetSelectedExtensionEventsReq); REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); rep = (xGetSelectedExtensionEventsReply) { .repType = X_Reply, .RepType = X_GetSelectedExtensionEvents, .sequenceNumber = client->sequence, .length = 0, .this_client_count = 0, .all_clients_count = 0 }; rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) return rc; if ((pOthers = wOtherInputMasks(pWin)) != 0) { for (others = pOthers->inputClients; others; others = others->next) for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->mask[i], i, &rep.all_clients_count, COUNT); for (others = pOthers->inputClients; others; others = others->next) if (SameClient(others, client)) { for (i = 0; i < EMASKSIZE; i++) ClassFromMask(NULL, others->mask[i], i, &rep.this_client_count, COUNT); break; } total_length = (rep.all_clients_count + rep.this_client_count) * sizeof(XEventClass); rep.length = bytes_to_int32(total_length); buf = (XEventClass *) malloc(total_length); tclient = buf; aclient = buf + rep.this_client_count; if (others) for (i = 0; i < EMASKSIZE; i++) tclient = ClassFromMask(tclient, others->mask[i], i, NULL, CREATE); for (others = pOthers->inputClients; others; others = others->next) for (i = 0; i < EMASKSIZE; i++) aclient = ClassFromMask(aclient, others->mask[i], i, NULL, CREATE); } WriteReplyToClient(client, sizeof(xGetSelectedExtensionEventsReply), &rep); if (total_length) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, total_length, buf); } free(buf); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetSelectedExtensionEvents function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetSelectedExtensionEvents(ClientPtr client, int size, xGetSelectedExtensionEventsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->this_client_count); swaps(&rep->all_clients_count); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getselev.h0000644000175000017500000000323014757411105012200 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETSELEV_H #define GETSELEV_H 1 int SProcXGetSelectedExtensionEvents(ClientPtr /* client */ ); int ProcXGetSelectedExtensionEvents(ClientPtr /* client */ ); void SRepXGetSelectedExtensionEvents(ClientPtr /* client */ , int /* size */ , xGetSelectedExtensionEventsReply * /* rep */ ); #endif /* GETSELEV_H */ xorg-server-21.1.16/Xi/getvers.c0000644000175000017500000001062114757411105012036 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to return the version of the extension. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exevents.h" #include "exglobals.h" #include "getvers.h" XExtensionVersion XIVersion; /*********************************************************************** * * Handle a request from a client with a different byte order than us. * */ int _X_COLD SProcXGetExtensionVersion(ClientPtr client) { REQUEST(xGetExtensionVersionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); swaps(&stuff->nbytes); return (ProcXGetExtensionVersion(client)); } /*********************************************************************** * * This procedure returns the major/minor version of the X Input extension. * */ int ProcXGetExtensionVersion(ClientPtr client) { xGetExtensionVersionReply rep; REQUEST(xGetExtensionVersionReq); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); if (stuff->length != bytes_to_int32(sizeof(xGetExtensionVersionReq) + stuff->nbytes)) return BadLength; rep = (xGetExtensionVersionReply) { .repType = X_Reply, .RepType = X_GetExtensionVersion, .sequenceNumber = client->sequence, .length = 0, .major_version = XIVersion.major_version, .minor_version = XIVersion.minor_version, .present = TRUE }; WriteReplyToClient(client, sizeof(xGetExtensionVersionReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetExtensionVersion function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetExtensionVersion(ClientPtr client, int size, xGetExtensionVersionReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->major_version); swaps(&rep->minor_version); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/getvers.h0000644000175000017500000000315714757411105012051 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GETVERS_H #define GETVERS_H 1 int SProcXGetExtensionVersion(ClientPtr /* client */ ); int ProcXGetExtensionVersion(ClientPtr /* client */ ); void SRepXGetExtensionVersion(ClientPtr /* client */ , int /* size */ , xGetExtensionVersionReply * /* rep */ ); #endif /* GETVERS_H */ xorg-server-21.1.16/Xi/grabdev.c0000644000175000017500000001573514757411105012004 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to grab an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exglobals.h" #include "dixevents.h" /* GrabDevice */ #include "grabdev.h" extern XExtEventInfo EventInfo[]; extern int ExtEventIndex; /*********************************************************************** * * Swap the request if the requestor has a different byte order than us. * */ int _X_COLD SProcXGrabDevice(ClientPtr client) { REQUEST(xGrabDeviceReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); swapl(&stuff->grabWindow); swapl(&stuff->time); swaps(&stuff->event_count); if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) return BadLength; SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDevice(client)); } /*********************************************************************** * * Grab an extension device. * */ int ProcXGrabDevice(ClientPtr client) { int rc; xGrabDeviceReply rep; DeviceIntPtr dev; GrabMask mask; struct tmask tmp[EMASKSIZE]; REQUEST(xGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count) return BadLength; rep = (xGrabDeviceReply) { .repType = X_Reply, .RepType = X_GrabDevice, .sequenceNumber = client->sequence, .length = 0, }; rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); if (rc != Success) return rc; if ((rc = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->event_count, tmp, dev, X_GrabDevice)) != Success) return rc; mask.xi = tmp[stuff->deviceid].mask; rc = GrabDevice(client, dev, stuff->other_devices_mode, stuff->this_device_mode, stuff->grabWindow, stuff->ownerEvents, stuff->time, &mask, XI, None, None, &rep.status); if (rc != Success) return rc; WriteReplyToClient(client, sizeof(xGrabDeviceReply), &rep); return Success; } /*********************************************************************** * * This procedure creates an event mask from a list of XEventClasses. * * Procedure is as follows: * An XEventClass is (deviceid << 8 | eventtype). For each entry in the list, * get the device. Then run through all available event indices (those are * set when XI starts up) and binary OR's the device's mask to whatever the * event mask for the given event type was. * If an error occurs, it is sent to the client. Errors are generated if * - if the device given in the event class is invalid * - if the device in the class list is not the device given as parameter (no * error if parameter is NULL) * * mask has to be size EMASKSIZE and pre-allocated. * * @param client The client to send the error to (if one occurs) * @param list List of event classes as sent from the client. * @param count Number of elements in list. * @param mask Preallocated mask (size EMASKSIZE). * @param dev The device we're creating masks for. * @param req The request we're processing. Used to fill in error fields. */ int CreateMaskFromList(ClientPtr client, XEventClass * list, int count, struct tmask *mask, DeviceIntPtr dev, int req) { int rc, i, j; int device; DeviceIntPtr tdev; memset(mask, 0, EMASKSIZE * sizeof(struct tmask)); for (i = 0; i < count; i++, list++) { device = *list >> 8; if (device > 255) return BadClass; rc = dixLookupDevice(&tdev, device, client, DixUseAccess); if (rc != BadDevice && rc != Success) return rc; if (rc == BadDevice || (dev != NULL && tdev != dev)) return BadClass; for (j = 0; j < ExtEventIndex; j++) if (EventInfo[j].type == (*list & 0xff)) { mask[device].mask |= EventInfo[j].mask; mask[device].dev = (void *) tdev; break; } } return Success; } /*********************************************************************** * * This procedure writes the reply for the XGrabDevice function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGrabDevice(ClientPtr client, int size, xGrabDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/grabdev.h0000644000175000017500000000352514757411105012003 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GRABDEV_H #define GRABDEV_H 1 int SProcXGrabDevice(ClientPtr /* client */ ); int ProcXGrabDevice(ClientPtr /* client */ ); int CreateMaskFromList(ClientPtr /* client */ , XEventClass * /* list */ , int /* count */ , struct tmask /* mask */ [], DeviceIntPtr /* dev */ , int /* req */ ); void SRepXGrabDevice(ClientPtr /* client */ , int /* size */ , xGrabDeviceReply * /* rep */ ); #endif /* GRABDEV_H */ xorg-server-21.1.16/Xi/grabdevb.c0000644000175000017500000001213514757411105012135 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to grab a button on an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exevents.h" #include "exglobals.h" #include "xace.h" #include "grabdev.h" #include "grabdevb.h" /*********************************************************************** * * Handle requests from clients with a different byte order. * */ int _X_COLD SProcXGrabDeviceButton(ClientPtr client) { REQUEST(xGrabDeviceButtonReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); swaps(&stuff->event_count); REQUEST_FIXED_SIZE(xGrabDeviceButtonReq, stuff->event_count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDeviceButton(client)); } /*********************************************************************** * * Grab a button on an extension device. * */ int ProcXGrabDeviceButton(ClientPtr client) { int ret; DeviceIntPtr dev; DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; GrabParameters param; GrabMask mask; REQUEST(xGrabDeviceButtonReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count) return BadLength; ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); if (ret != Success) return ret; if (stuff->modifier_device != UseXKeyboard) { ret = dixLookupDevice(&mdev, stuff->modifier_device, client, DixUseAccess); if (ret != Success) return ret; if (mdev->key == NULL) return BadMatch; } else { mdev = PickKeyboard(client); ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); if (ret != Success) return ret; } class = (XEventClass *) (&stuff[1]); /* first word of values */ if ((ret = CreateMaskFromList(client, class, stuff->event_count, tmp, dev, X_GrabDeviceButton)) != Success) return ret; param = (GrabParameters) { .grabtype = XI, .ownerEvents = stuff->ownerEvents, .this_device_mode = stuff->this_device_mode, .other_devices_mode = stuff->other_devices_mode, .grabWindow = stuff->grabWindow, .modifiers = stuff->modifiers }; mask.xi = tmp[stuff->grabbed_device].mask; ret = GrabButton(client, dev, mdev, stuff->button, ¶m, XI, &mask); return ret; } xorg-server-21.1.16/Xi/grabdevb.h0000644000175000017500000000267214757411105012147 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GRABDEVB_H #define GRABDEVB_H 1 int SProcXGrabDeviceButton(ClientPtr /* client */ ); int ProcXGrabDeviceButton(ClientPtr /* client */ ); #endif /* GRABDEVB_H */ xorg-server-21.1.16/Xi/grabdevk.c0000644000175000017500000001203314757411105012143 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to grab a key on an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exevents.h" #include "exglobals.h" #include "xace.h" #include "grabdev.h" #include "grabdevk.h" /*********************************************************************** * * Handle requests from clients with a different byte order. * */ int _X_COLD SProcXGrabDeviceKey(ClientPtr client) { REQUEST(xGrabDeviceKeyReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); swaps(&stuff->event_count); REQUEST_FIXED_SIZE(xGrabDeviceKeyReq, stuff->event_count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count); return (ProcXGrabDeviceKey(client)); } /*********************************************************************** * * Grab a key on an extension device. * */ int ProcXGrabDeviceKey(ClientPtr client) { int ret; DeviceIntPtr dev; DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; GrabParameters param; GrabMask mask; REQUEST(xGrabDeviceKeyReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count) return BadLength; ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); if (ret != Success) return ret; if (stuff->modifier_device != UseXKeyboard) { ret = dixLookupDevice(&mdev, stuff->modifier_device, client, DixUseAccess); if (ret != Success) return ret; if (mdev->key == NULL) return BadMatch; } else { mdev = PickKeyboard(client); ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); if (ret != Success) return ret; } class = (XEventClass *) (&stuff[1]); /* first word of values */ if ((ret = CreateMaskFromList(client, class, stuff->event_count, tmp, dev, X_GrabDeviceKey)) != Success) return ret; param = (GrabParameters) { .grabtype = XI, .ownerEvents = stuff->ownerEvents, .this_device_mode = stuff->this_device_mode, .other_devices_mode = stuff->other_devices_mode, .grabWindow = stuff->grabWindow, .modifiers = stuff->modifiers }; mask.xi = tmp[stuff->grabbed_device].mask; ret = GrabKey(client, dev, mdev, stuff->key, ¶m, XI, &mask); return ret; } xorg-server-21.1.16/Xi/grabdevk.h0000644000175000017500000000267214757411105012160 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GRABDEVK_H #define GRABDEVK_H 1 int SProcXGrabDeviceKey(ClientPtr /* client */ ); int ProcXGrabDeviceKey(ClientPtr /* client */ ); #endif /* GRABDEVK_H */ xorg-server-21.1.16/Xi/gtmotion.c0000644000175000017500000001356414757411105012230 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to get the motion history from an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exevents.h" #include "exglobals.h" #include "gtmotion.h" /*********************************************************************** * * Swap the request if server and client have different byte ordering. * */ int _X_COLD SProcXGetDeviceMotionEvents(ClientPtr client) { REQUEST(xGetDeviceMotionEventsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); swapl(&stuff->start); swapl(&stuff->stop); return (ProcXGetDeviceMotionEvents(client)); } /**************************************************************************** * * Get the motion history for an extension pointer devices. * */ int ProcXGetDeviceMotionEvents(ClientPtr client) { INT32 *coords = NULL, *bufptr; xGetDeviceMotionEventsReply rep; unsigned long i; int rc, num_events, axes, size = 0; unsigned long nEvents; DeviceIntPtr dev; TimeStamp start, stop; int length = 0; ValuatorClassPtr v; REQUEST(xGetDeviceMotionEventsReq); REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); if (rc != Success) return rc; v = dev->valuator; if (v == NULL || v->numAxes == 0) return BadMatch; if (dev->valuator->motionHintWindow) MaybeStopDeviceHint(dev, client); axes = v->numAxes; rep = (xGetDeviceMotionEventsReply) { .repType = X_Reply, .RepType = X_GetDeviceMotionEvents, .sequenceNumber = client->sequence, .length = 0, .nEvents = 0, .axes = axes, .mode = Absolute /* XXX we don't do relative at the moment */ }; start = ClientTimeToServerTime(stuff->start); stop = ClientTimeToServerTime(stuff->stop); if (CompareTimeStamps(start, stop) == LATER || CompareTimeStamps(start, currentTime) == LATER) { WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); return Success; } if (CompareTimeStamps(stop, currentTime) == LATER) stop = currentTime; num_events = v->numMotionEvents; if (num_events) { size = sizeof(Time) + (axes * sizeof(INT32)); rep.nEvents = GetMotionHistory(dev, (xTimecoord **) &coords, /* XXX */ start.milliseconds, stop.milliseconds, (ScreenPtr) NULL, FALSE); } if (rep.nEvents > 0) { length = bytes_to_int32(rep.nEvents * size); rep.length = length; } nEvents = rep.nEvents; WriteReplyToClient(client, sizeof(xGetDeviceMotionEventsReply), &rep); if (nEvents) { if (client->swapped) { bufptr = coords; for (i = 0; i < nEvents * (axes + 1); i++) { swapl(bufptr); bufptr++; } } WriteToClient(client, length * 4, coords); } free(coords); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetDeviceMotionEvents function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXGetDeviceMotionEvents(ClientPtr client, int size, xGetDeviceMotionEventsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->nEvents); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/gtmotion.h0000644000175000017500000000320614757411105012225 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef GTMOTION_H #define GTMOTION_H 1 int SProcXGetDeviceMotionEvents(ClientPtr /* client */ ); int ProcXGetDeviceMotionEvents(ClientPtr /* client */ ); void SRepXGetDeviceMotionEvents(ClientPtr /* client */ , int /* size */ , xGetDeviceMotionEventsReply * /* rep */ ); #endif /* GTMOTION_H */ xorg-server-21.1.16/Xi/listdev.c0000644000175000017500000003065114757411105012036 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Extension function to list the available input devices. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "extnsionst.h" #include "exevents.h" #include "xace.h" #include "xkbsrv.h" #include "xkbstr.h" #include "listdev.h" /*********************************************************************** * * This procedure lists the input devices available to the server. * */ int _X_COLD SProcXListInputDevices(ClientPtr client) { REQUEST(xListInputDevicesReq); swaps(&stuff->length); return (ProcXListInputDevices(client)); } /*********************************************************************** * * This procedure calculates the size of the information to be returned * for an input device. * */ static void SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size) { int chunks; *namesize += 1; if (d->name) *namesize += strlen(d->name); if (d->key != NULL) *size += sizeof(xKeyInfo); if (d->button != NULL) *size += sizeof(xButtonInfo); if (d->valuator != NULL) { chunks = ((int) d->valuator->numAxes + 19) / VPC; *size += (chunks * sizeof(xValuatorInfo) + d->valuator->numAxes * sizeof(xAxisInfo)); } } /*********************************************************************** * * This procedure copies data to the DeviceInfo struct, swapping if necessary. * * We need the extra byte in the allocated buffer, because the trailing null * hammers one extra byte, which is overwritten by the next name except for * the last name copied. * */ static void CopyDeviceName(char **namebuf, const char *name) { char *nameptr = *namebuf; if (name) { *nameptr++ = strlen(name); strcpy(nameptr, name); *namebuf += (strlen(name) + 1); } else { *nameptr++ = 0; *namebuf += 1; } } /*********************************************************************** * * This procedure copies ButtonClass information, swapping if necessary. * */ static void CopySwapButtonClass(ClientPtr client, ButtonClassPtr b, char **buf) { xButtonInfoPtr b2; b2 = (xButtonInfoPtr) * buf; b2->class = ButtonClass; b2->length = sizeof(xButtonInfo); b2->num_buttons = b->numButtons; if (client && client->swapped) { swaps(&b2->num_buttons); } *buf += sizeof(xButtonInfo); } /*********************************************************************** * * This procedure copies data to the DeviceInfo struct, swapping if necessary. * */ static void CopySwapDevice(ClientPtr client, DeviceIntPtr d, int num_classes, char **buf) { xDeviceInfoPtr dev; dev = (xDeviceInfoPtr) * buf; dev->id = d->id; dev->type = d->xinput_type; dev->num_classes = num_classes; if (IsMaster(d) && IsKeyboardDevice(d)) dev->use = IsXKeyboard; else if (IsMaster(d) && IsPointerDevice(d)) dev->use = IsXPointer; else if (d->valuator && d->button) dev->use = IsXExtensionPointer; else if (d->key && d->kbdfeed) dev->use = IsXExtensionKeyboard; else dev->use = IsXExtensionDevice; if (client->swapped) { swapl(&dev->type); } *buf += sizeof(xDeviceInfo); } /*********************************************************************** * * This procedure copies KeyClass information, swapping if necessary. * */ static void CopySwapKeyClass(ClientPtr client, KeyClassPtr k, char **buf) { xKeyInfoPtr k2; k2 = (xKeyInfoPtr) * buf; k2->class = KeyClass; k2->length = sizeof(xKeyInfo); k2->min_keycode = k->xkbInfo->desc->min_key_code; k2->max_keycode = k->xkbInfo->desc->max_key_code; k2->num_keys = k2->max_keycode - k2->min_keycode + 1; if (client && client->swapped) { swaps(&k2->num_keys); } *buf += sizeof(xKeyInfo); } /*********************************************************************** * * This procedure copies ValuatorClass information, swapping if necessary. * * Devices may have up to 255 valuators. The length of a ValuatorClass is * defined to be sizeof(ValuatorClassInfo) + num_axes * sizeof (xAxisInfo). * The maximum length is therefore (8 + 255 * 12) = 3068. However, the * length field is one byte. If a device has more than 20 valuators, we * must therefore return multiple valuator classes to the client. * */ static int CopySwapValuatorClass(ClientPtr client, DeviceIntPtr dev, char **buf) { int i, j, axes, t_axes; ValuatorClassPtr v = dev->valuator; xValuatorInfoPtr v2; AxisInfo *a; xAxisInfoPtr a2; for (i = 0, axes = v->numAxes; i < ((v->numAxes + 19) / VPC); i++, axes -= VPC) { t_axes = axes < VPC ? axes : VPC; if (t_axes < 0) t_axes = v->numAxes % VPC; v2 = (xValuatorInfoPtr) * buf; v2->class = ValuatorClass; v2->length = sizeof(xValuatorInfo) + t_axes * sizeof(xAxisInfo); v2->num_axes = t_axes; v2->mode = valuator_get_mode(dev, 0); v2->motion_buffer_size = v->numMotionEvents; if (client && client->swapped) { swapl(&v2->motion_buffer_size); } *buf += sizeof(xValuatorInfo); a = v->axes + (VPC * i); a2 = (xAxisInfoPtr) * buf; for (j = 0; j < t_axes; j++) { a2->min_value = a->min_value; a2->max_value = a->max_value; a2->resolution = a->resolution; if (client && client->swapped) { swapl(&a2->min_value); swapl(&a2->max_value); swapl(&a2->resolution); } a2++; a++; *buf += sizeof(xAxisInfo); } } return i; } static void CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes, char **classbuf) { if (dev->key != NULL) { CopySwapKeyClass(client, dev->key, classbuf); (*num_classes)++; } if (dev->button != NULL) { CopySwapButtonClass(client, dev->button, classbuf); (*num_classes)++; } if (dev->valuator != NULL) { (*num_classes) += CopySwapValuatorClass(client, dev, classbuf); } } /*********************************************************************** * * This procedure lists information to be returned for an input device. * */ static void ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev, char **devbuf, char **classbuf, char **namebuf) { CopyDeviceName(namebuf, d->name); CopySwapDevice(client, d, 0, devbuf); CopySwapClasses(client, d, &dev->num_classes, classbuf); } /*********************************************************************** * * This procedure checks if a device should be left off the list. * */ static Bool ShouldSkipDevice(ClientPtr client, DeviceIntPtr d) { /* don't send master devices other than VCP/VCK */ if (!IsMaster(d) || d == inputInfo.pointer ||d == inputInfo.keyboard) { int rc = XaceHook(XACE_DEVICE_ACCESS, client, d, DixGetAttrAccess); if (rc == Success) return FALSE; } return TRUE; } /*********************************************************************** * * This procedure lists the input devices available to the server. * * If this request is called by a client that has not issued a * GetExtensionVersion request with major/minor version set, we don't send the * complete device list. Instead, we only send the VCP, the VCK and floating * SDs. This resembles the setup found on XI 1.x machines. */ int ProcXListInputDevices(ClientPtr client) { xListInputDevicesReply rep; int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ int i = 0, size = 0; int total_length; char *devbuf, *classbuf, *namebuf, *savbuf; Bool *skip; xDeviceInfo *dev; DeviceIntPtr d; REQUEST_SIZE_MATCH(xListInputDevicesReq); rep = (xListInputDevicesReply) { .repType = X_Reply, .RepType = X_ListInputDevices, .sequenceNumber = client->sequence, .length = 0 }; /* allocate space for saving skip value */ skip = calloc(sizeof(Bool), inputInfo.numDevices); if (!skip) return BadAlloc; /* figure out which devices to skip */ numdevs = 0; for (d = inputInfo.devices; d; d = d->next, i++) { skip[i] = ShouldSkipDevice(client, d); if (skip[i]) continue; SizeDeviceInfo(d, &namesize, &size); numdevs++; } for (d = inputInfo.off_devices; d; d = d->next, i++) { skip[i] = ShouldSkipDevice(client, d); if (skip[i]) continue; SizeDeviceInfo(d, &namesize, &size); numdevs++; } /* allocate space for reply */ total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; devbuf = (char *) calloc(1, total_length); classbuf = devbuf + (numdevs * sizeof(xDeviceInfo)); namebuf = classbuf + size; savbuf = devbuf; /* fill in and send reply */ i = 0; dev = (xDeviceInfoPtr) devbuf; for (d = inputInfo.devices; d; d = d->next, i++) { if (skip[i]) continue; ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); } for (d = inputInfo.off_devices; d; d = d->next, i++) { if (skip[i]) continue; ListDeviceInfo(client, d, dev++, &devbuf, &classbuf, &namebuf); } rep.ndevices = numdevs; rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); free(skip); return Success; } /*********************************************************************** * * This procedure writes the reply for the XListInputDevices function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/listdev.h0000644000175000017500000000323614757411105012042 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef LISTDEV_H #define LISTDEV_H 1 #define VPC 20 /* Max # valuators per chunk */ int SProcXListInputDevices(ClientPtr /* client */ ); int ProcXListInputDevices(ClientPtr /* client */ ); void SRepXListInputDevices(ClientPtr /* client */ , int /* size */ , xListInputDevicesReply * /* rep */ ); #endif /* LISTDEV_H */ xorg-server-21.1.16/Xi/opendev.c0000644000175000017500000001320414757411105012017 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to open an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "windowstr.h" /* window structure */ #include "exglobals.h" #include "exevents.h" #include "opendev.h" extern CARD8 event_base[]; /*********************************************************************** * * This procedure swaps the request if the server and client have different * byte orderings. * */ int _X_COLD SProcXOpenDevice(ClientPtr client) { REQUEST(xOpenDeviceReq); swaps(&stuff->length); return (ProcXOpenDevice(client)); } /*********************************************************************** * * This procedure causes the server to open an input device. * */ int ProcXOpenDevice(ClientPtr client) { xInputClassInfo evbase[numInputClasses]; int j = 0; int status = Success; xOpenDeviceReply rep; DeviceIntPtr dev; REQUEST(xOpenDeviceReq); REQUEST_SIZE_MATCH(xOpenDeviceReq); status = dixLookupDevice(&dev, stuff->deviceid, client, DixUseAccess); if (status == BadDevice) { /* not open */ for (dev = inputInfo.off_devices; dev; dev = dev->next) if (dev->id == stuff->deviceid) break; if (dev == NULL) return BadDevice; } else if (status != Success) return status; if (IsMaster(dev)) return BadDevice; if (status != Success) return status; if (dev->key != NULL) { evbase[j].class = KeyClass; evbase[j++].event_type_base = event_base[KeyClass]; } if (dev->button != NULL) { evbase[j].class = ButtonClass; evbase[j++].event_type_base = event_base[ButtonClass]; } if (dev->valuator != NULL) { evbase[j].class = ValuatorClass; evbase[j++].event_type_base = event_base[ValuatorClass]; } if (dev->kbdfeed != NULL || dev->ptrfeed != NULL || dev->leds != NULL || dev->intfeed != NULL || dev->bell != NULL || dev->stringfeed != NULL) { evbase[j].class = FeedbackClass; evbase[j++].event_type_base = event_base[FeedbackClass]; } if (dev->focus != NULL) { evbase[j].class = FocusClass; evbase[j++].event_type_base = event_base[FocusClass]; } if (dev->proximity != NULL) { evbase[j].class = ProximityClass; evbase[j++].event_type_base = event_base[ProximityClass]; } evbase[j].class = OtherClass; evbase[j++].event_type_base = event_base[OtherClass]; rep = (xOpenDeviceReply) { .repType = X_Reply, .RepType = X_OpenDevice, .sequenceNumber = client->sequence, .length = bytes_to_int32(j * sizeof(xInputClassInfo)), .num_classes = j }; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); WriteToClient(client, j * sizeof(xInputClassInfo), evbase); return Success; } /*********************************************************************** * * This procedure writes the reply for the XOpenDevice function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXOpenDevice(ClientPtr client, int size, xOpenDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/opendev.h0000644000175000017500000000306514757411105012030 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef OPENDEV_H #define OPENDEV_H 1 int SProcXOpenDevice(ClientPtr /* client */ ); int ProcXOpenDevice(ClientPtr /* client */ ); void SRepXOpenDevice(ClientPtr /* client */ , int /* size */ , xOpenDeviceReply * /* rep */ ); #endif /* OPENDEV_H */ xorg-server-21.1.16/Xi/queryst.c0000644000175000017500000001245614757411105012103 /* Copyright 1998, 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. */ /*********************************************************************** * * Request to query the state of an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exevents.h" #include "exglobals.h" #include "xkbsrv.h" #include "xkbstr.h" #include "queryst.h" /*********************************************************************** * * This procedure allows a client to query the state of a device. * */ int _X_COLD SProcXQueryDeviceState(ClientPtr client) { REQUEST(xQueryDeviceStateReq); swaps(&stuff->length); return (ProcXQueryDeviceState(client)); } /*********************************************************************** * * This procedure allows frozen events to be routed. * */ int ProcXQueryDeviceState(ClientPtr client) { int rc, i; int num_classes = 0; int total_length = 0; char *buf, *savbuf; KeyClassPtr k; xKeyState *tk; ButtonClassPtr b; xButtonState *tb; ValuatorClassPtr v; xValuatorState *tv; xQueryDeviceStateReply rep; DeviceIntPtr dev; double *values; REQUEST(xQueryDeviceStateReq); REQUEST_SIZE_MATCH(xQueryDeviceStateReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixReadAccess); if (rc != Success && rc != BadAccess) return rc; v = dev->valuator; if (v != NULL && v->motionHintWindow != NULL) MaybeStopDeviceHint(dev, client); k = dev->key; if (k != NULL) { total_length += sizeof(xKeyState); num_classes++; } b = dev->button; if (b != NULL) { total_length += sizeof(xButtonState); num_classes++; } if (v != NULL) { total_length += (sizeof(xValuatorState) + (v->numAxes * sizeof(int))); num_classes++; } buf = (char *) calloc(total_length, 1); if (!buf) return BadAlloc; savbuf = buf; if (k != NULL) { tk = (xKeyState *) buf; tk->class = KeyClass; tk->length = sizeof(xKeyState); tk->num_keys = k->xkbInfo->desc->max_key_code - k->xkbInfo->desc->min_key_code + 1; if (rc != BadAccess) for (i = 0; i < 32; i++) tk->keys[i] = k->down[i]; buf += sizeof(xKeyState); } if (b != NULL) { tb = (xButtonState *) buf; tb->class = ButtonClass; tb->length = sizeof(xButtonState); tb->num_buttons = b->numButtons; if (rc != BadAccess) memcpy(tb->buttons, b->down, sizeof(b->down)); buf += sizeof(xButtonState); } if (v != NULL) { tv = (xValuatorState *) buf; tv->class = ValuatorClass; tv->length = sizeof(xValuatorState) + v->numAxes * 4; tv->num_valuators = v->numAxes; tv->mode = valuator_get_mode(dev, 0); tv->mode |= (dev->proximity && !dev->proximity->in_proximity) ? OutOfProximity : 0; buf += sizeof(xValuatorState); for (i = 0, values = v->axisVal; i < v->numAxes; i++) { if (rc != BadAccess) *((int *) buf) = *values; values++; if (client->swapped) { swapl((int *) buf); } buf += sizeof(int); } } rep = (xQueryDeviceStateReply) { .repType = X_Reply, .RepType = X_QueryDeviceState, .sequenceNumber = client->sequence, .length = bytes_to_int32(total_length), .num_classes = num_classes }; WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); if (total_length > 0) WriteToClient(client, total_length, savbuf); free(savbuf); return Success; } /*********************************************************************** * * This procedure writes the reply for the XQueryDeviceState function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXQueryDeviceState(ClientPtr client, int size, xQueryDeviceStateReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/queryst.h0000644000175000017500000000314114757411105012077 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef QUERYST_H #define QUERYST_H 1 int SProcXQueryDeviceState(ClientPtr /* client */ ); int ProcXQueryDeviceState(ClientPtr /* client */ ); void SRepXQueryDeviceState(ClientPtr /* client */ , int /* size */ , xQueryDeviceStateReply * /* rep */ ); #endif /* QUERYST_H */ xorg-server-21.1.16/Xi/selectev.c0000644000175000017500000001344214757411105012175 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to select input from an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include #include "exevents.h" #include "exglobals.h" #include "grabdev.h" #include "selectev.h" static int HandleDevicePresenceMask(ClientPtr client, WindowPtr win, XEventClass * cls, CARD16 *count) { int i, j; Mask mask; /* We use the device ID 256 to select events that aren't bound to * any device. For now we only handle the device presence event, * but this could be extended to other events that aren't bound to * a device. * * In order not to break in CreateMaskFromList() we remove the * entries with device ID 256 from the XEventClass array. */ mask = 0; for (i = 0, j = 0; i < *count; i++) { if (cls[i] >> 8 != 256) { cls[j] = cls[i]; j++; continue; } switch (cls[i] & 0xff) { case _devicePresence: mask |= DevicePresenceNotifyMask; break; } } *count = j; if (mask == 0) return Success; /* We always only use mksidx = AllDevices for events not bound to * devices */ if (AddExtensionClient(win, client, mask, XIAllDevices) != Success) return BadAlloc; RecalculateDeviceDeliverableEvents(win); return Success; } /*********************************************************************** * * Handle requests from clients with a different byte order. * */ int _X_COLD SProcXSelectExtensionEvent(ClientPtr client) { REQUEST(xSelectExtensionEventReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); swapl(&stuff->window); swaps(&stuff->count); REQUEST_FIXED_SIZE(xSelectExtensionEventReq, stuff->count * sizeof(CARD32)); SwapLongs((CARD32 *) (&stuff[1]), stuff->count); return (ProcXSelectExtensionEvent(client)); } /*********************************************************************** * * This procedure selects input from an extension device. * */ int ProcXSelectExtensionEvent(ClientPtr client) { int ret; int i; WindowPtr pWin; struct tmask tmp[EMASKSIZE]; REQUEST(xSelectExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); if (stuff->length != bytes_to_int32(sizeof(xSelectExtensionEventReq)) + stuff->count) return BadLength; ret = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess); if (ret != Success) return ret; if (HandleDevicePresenceMask(client, pWin, (XEventClass *) &stuff[1], &stuff->count) != Success) return BadAlloc; if ((ret = CreateMaskFromList(client, (XEventClass *) &stuff[1], stuff->count, tmp, NULL, X_SelectExtensionEvent)) != Success) return ret; for (i = 0; i < EMASKSIZE; i++) if (tmp[i].dev != NULL) { if (tmp[i].mask & ~XIAllMasks) { client->errorValue = tmp[i].mask; return BadValue; } if ((ret = SelectForWindow((DeviceIntPtr) tmp[i].dev, pWin, client, tmp[i].mask, DeviceButtonGrabMask)) != Success) return ret; } return Success; } xorg-server-21.1.16/Xi/selectev.h0000644000175000017500000000270214757411105012177 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SELECTEV_H #define SELECTEV_H 1 int SProcXSelectExtensionEvent(ClientPtr /* client */ ); int ProcXSelectExtensionEvent(ClientPtr /* client */ ); #endif /* SELECTEV_H */ xorg-server-21.1.16/Xi/sendexev.c0000644000175000017500000001316514757411105012206 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to send an extension event. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* Window */ #include "extnsionst.h" /* EventSwapPtr */ #include #include #include "exevents.h" #include "exglobals.h" #include "grabdev.h" #include "sendexev.h" extern int lastEvent; /* Defined in extension.c */ /*********************************************************************** * * Handle requests from clients with a different byte order than us. * */ int _X_COLD SProcXSendExtensionEvent(ClientPtr client) { CARD32 *p; int i; xEvent eventT = { .u.u.type = 0 }; xEvent *eventP; EventSwapPtr proc; REQUEST(xSendExtensionEventReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); swapl(&stuff->destination); swaps(&stuff->count); if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + bytes_to_int32(stuff->num_events * sizeof(xEvent))) return BadLength; eventP = (xEvent *) &stuff[1]; for (i = 0; i < stuff->num_events; i++, eventP++) { if (eventP->u.u.type == GenericEvent) { client->errorValue = eventP->u.u.type; return BadValue; } proc = EventSwapVector[eventP->u.u.type & 0177]; /* no swapping proc; invalid event type? */ if (proc == NotImplemented) { client->errorValue = eventP->u.u.type; return BadValue; } (*proc) (eventP, &eventT); *eventP = eventT; } p = (CARD32 *) (((xEvent *) &stuff[1]) + stuff->num_events); SwapLongs(p, stuff->count); return (ProcXSendExtensionEvent(client)); } /*********************************************************************** * * Send an event to some client, as if it had come from an extension input * device. * */ int ProcXSendExtensionEvent(ClientPtr client) { int ret, i; DeviceIntPtr dev; xEvent *first; XEventClass *list; struct tmask tmp[EMASKSIZE]; REQUEST(xSendExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); if (stuff->length != bytes_to_int32(sizeof(xSendExtensionEventReq)) + stuff->count + (stuff->num_events * bytes_to_int32(sizeof(xEvent)))) return BadLength; ret = dixLookupDevice(&dev, stuff->deviceid, client, DixWriteAccess); if (ret != Success) return ret; if (stuff->num_events == 0) return ret; /* The client's event type must be one defined by an extension. */ first = ((xEvent *) &stuff[1]); for (i = 0; i < stuff->num_events; i++) { if (!((EXTENSION_EVENT_BASE <= first[i].u.u.type) && (first[i].u.u.type < lastEvent))) { client->errorValue = first[i].u.u.type; return BadValue; } } list = (XEventClass *) (first + stuff->num_events); if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev, X_SendExtensionEvent)) != Success) return ret; ret = (SendEvent(client, dev, stuff->destination, stuff->propagate, (xEvent *) &stuff[1], tmp[stuff->deviceid].mask, stuff->num_events)); return ret; } xorg-server-21.1.16/Xi/sendexev.h0000644000175000017500000000267214757411105012214 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SENDEXEV_H #define SENDEXEV_H 1 int SProcXSendExtensionEvent(ClientPtr /* client */ ); int ProcXSendExtensionEvent(ClientPtr /* client */ ); #endif /* SENDEXEV_H */ xorg-server-21.1.16/Xi/setbmap.c0000644000175000017500000001104614757411105012014 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to change the button mapping of an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "exevents.h" #include "exglobals.h" #include "setbmap.h" /*********************************************************************** * * This procedure changes the button mapping. * */ int _X_COLD SProcXSetDeviceButtonMapping(ClientPtr client) { REQUEST(xSetDeviceButtonMappingReq); swaps(&stuff->length); return (ProcXSetDeviceButtonMapping(client)); } /*********************************************************************** * * This procedure lists the input devices available to the server. * */ int ProcXSetDeviceButtonMapping(ClientPtr client) { int ret; xSetDeviceButtonMappingReply rep; DeviceIntPtr dev; REQUEST(xSetDeviceButtonMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceButtonMappingReq); if (stuff->length != bytes_to_int32(sizeof(xSetDeviceButtonMappingReq) + stuff->map_length)) return BadLength; ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; rep = (xSetDeviceButtonMappingReply) { .repType = X_Reply, .RepType = X_SetDeviceButtonMapping, .sequenceNumber = client->sequence, .length = 0, .status = MappingSuccess }; ret = ApplyPointerMapping(dev, (CARD8 *) &stuff[1], stuff->map_length, client); if (ret == -1) return BadValue; else if (ret == MappingBusy) rep.status = ret; else if (ret != Success) return ret; WriteReplyToClient(client, sizeof(xSetDeviceButtonMappingReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the XSetDeviceButtonMapping function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXSetDeviceButtonMapping(ClientPtr client, int size, xSetDeviceButtonMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/setbmap.h0000644000175000017500000000320514757411105012017 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SETBMAP_H #define SETBMAP_H 1 int SProcXSetDeviceButtonMapping(ClientPtr /* client */ ); int ProcXSetDeviceButtonMapping(ClientPtr /* client */ ); void SRepXSetDeviceButtonMapping(ClientPtr /* client */ , int /* size */ , xSetDeviceButtonMappingReply * /* rep */ ); #endif /* SETBMAP_H */ xorg-server-21.1.16/Xi/setdval.c0000644000175000017500000001154014757411105012022 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to change the mode of an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "exglobals.h" #include "setdval.h" /*********************************************************************** * * Handle a request from a client with a different byte order. * */ int _X_COLD SProcXSetDeviceValuators(ClientPtr client) { REQUEST(xSetDeviceValuatorsReq); swaps(&stuff->length); return (ProcXSetDeviceValuators(client)); } /*********************************************************************** * * This procedure sets the value of valuators on an extension input device. * */ int ProcXSetDeviceValuators(ClientPtr client) { DeviceIntPtr dev; xSetDeviceValuatorsReply rep; int rc; REQUEST(xSetDeviceValuatorsReq); REQUEST_AT_LEAST_SIZE(xSetDeviceValuatorsReq); rep = (xSetDeviceValuatorsReply) { .repType = X_Reply, .RepType = X_SetDeviceValuators, .sequenceNumber = client->sequence, .length = 0, .status = Success }; if (stuff->length != bytes_to_int32(sizeof(xSetDeviceValuatorsReq)) + stuff->num_valuators) return BadLength; rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); if (rc != Success) return rc; if (dev->valuator == NULL) return BadMatch; if (IsXTestDevice(dev, NULL)) return BadMatch; if (stuff->first_valuator + stuff->num_valuators > dev->valuator->numAxes) return BadValue; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) rep.status = AlreadyGrabbed; else rep.status = SetDeviceValuators(client, dev, (int *) &stuff[1], stuff->first_valuator, stuff->num_valuators); if (rep.status != Success && rep.status != AlreadyGrabbed) return rep.status; WriteReplyToClient(client, sizeof(xSetDeviceValuatorsReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the XSetDeviceValuators function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXSetDeviceValuators(ClientPtr client, int size, xSetDeviceValuatorsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/setdval.h0000644000175000017500000000314514757411105012031 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SETDVAL_H #define SETDVAL_H 1 int SProcXSetDeviceValuators(ClientPtr /* client */ ); int ProcXSetDeviceValuators(ClientPtr /* client */ ); void SRepXSetDeviceValuators(ClientPtr /* client */ , int /* size */ , xSetDeviceValuatorsReply * /* rep */ ); #endif /* SETDVAL_H */ xorg-server-21.1.16/Xi/setfocus.c0000644000175000017500000000713714757411105012222 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to set the focus for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "windowstr.h" /* focus struct */ #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "dixevents.h" #include "exglobals.h" #include "setfocus.h" /*********************************************************************** * * This procedure sets the focus for a device. * */ int _X_COLD SProcXSetDeviceFocus(ClientPtr client) { REQUEST(xSetDeviceFocusReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xSetDeviceFocusReq); swapl(&stuff->focus); swapl(&stuff->time); return (ProcXSetDeviceFocus(client)); } /*********************************************************************** * * This procedure sets the focus for a device. * */ int ProcXSetDeviceFocus(ClientPtr client) { int ret; DeviceIntPtr dev; REQUEST(xSetDeviceFocusReq); REQUEST_SIZE_MATCH(xSetDeviceFocusReq); ret = dixLookupDevice(&dev, stuff->device, client, DixSetFocusAccess); if (ret != Success) return ret; if (!dev->focus) return BadDevice; ret = SetInputFocus(client, dev, stuff->focus, stuff->revertTo, stuff->time, TRUE); return ret; } xorg-server-21.1.16/Xi/setfocus.h0000644000175000017500000000267214757411105012226 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SETFOCUS_H #define SETFOCUS_H 1 int SProcXSetDeviceFocus(ClientPtr /* client */ ); int ProcXSetDeviceFocus(ClientPtr /* client */ ); #endif /* SETFOCUS_H */ xorg-server-21.1.16/Xi/setmmap.c0000644000175000017500000001140414757411105012025 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /******************************************************************** * * Set modifier mapping for an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include #include "exevents.h" #include "exglobals.h" #include "setmmap.h" /*********************************************************************** * * This procedure sets the modifier mapping for an extension device, * for clients on machines with a different byte ordering than the server. * */ int _X_COLD SProcXSetDeviceModifierMapping(ClientPtr client) { REQUEST(xSetDeviceModifierMappingReq); swaps(&stuff->length); return (ProcXSetDeviceModifierMapping(client)); } /*********************************************************************** * * Set the device Modifier mapping. * */ int ProcXSetDeviceModifierMapping(ClientPtr client) { int ret; xSetDeviceModifierMappingReply rep; DeviceIntPtr dev; REQUEST(xSetDeviceModifierMappingReq); REQUEST_AT_LEAST_SIZE(xSetDeviceModifierMappingReq); if (stuff->length != bytes_to_int32(sizeof(xSetDeviceModifierMappingReq)) + (stuff->numKeyPerModifier << 1)) return BadLength; rep = (xSetDeviceModifierMappingReply) { .repType = X_Reply, .RepType = X_SetDeviceModifierMapping, .sequenceNumber = client->sequence, .length = 0 }; ret = dixLookupDevice(&dev, stuff->deviceid, client, DixManageAccess); if (ret != Success) return ret; ret = change_modmap(client, dev, (KeyCode *) &stuff[1], stuff->numKeyPerModifier); if (ret == Success) ret = MappingSuccess; if (ret == MappingSuccess || ret == MappingBusy || ret == MappingFailed) { rep.success = ret; WriteReplyToClient(client, sizeof(xSetDeviceModifierMappingReply), &rep); } else if (ret == -1) { return BadValue; } else { return ret; } return Success; } /*********************************************************************** * * This procedure writes the reply for the XSetDeviceModifierMapping function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXSetDeviceModifierMapping(ClientPtr client, int size, xSetDeviceModifierMappingReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/setmmap.h0000644000175000017500000000322114757411105012030 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SETMMAP_H #define SETMMAP_H 1 int SProcXSetDeviceModifierMapping(ClientPtr /* client */ ); int ProcXSetDeviceModifierMapping(ClientPtr /* client */ ); void SRepXSetDeviceModifierMapping(ClientPtr /* client */ , int /* size */ , xSetDeviceModifierMappingReply * /* rep */ ); #endif /* SETMMAP_H */ xorg-server-21.1.16/Xi/setmode.c0000644000175000017500000001115214757411105012017 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to change the mode of an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include #include #include "XIstubs.h" #include "exglobals.h" #include "setmode.h" /*********************************************************************** * * Handle a request from a client with a different byte order. * */ int _X_COLD SProcXSetDeviceMode(ClientPtr client) { REQUEST(xSetDeviceModeReq); swaps(&stuff->length); return (ProcXSetDeviceMode(client)); } /*********************************************************************** * * This procedure sets the mode of a device. * */ int ProcXSetDeviceMode(ClientPtr client) { DeviceIntPtr dev; xSetDeviceModeReply rep; int rc; REQUEST(xSetDeviceModeReq); REQUEST_SIZE_MATCH(xSetDeviceModeReq); rep = (xSetDeviceModeReply) { .repType = X_Reply, .RepType = X_SetDeviceMode, .sequenceNumber = client->sequence, .length = 0 }; rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetAttrAccess); if (rc != Success) return rc; if (dev->valuator == NULL) return BadMatch; if (IsXTestDevice(dev, NULL)) return BadMatch; if ((dev->deviceGrab.grab) && !SameClient(dev->deviceGrab.grab, client)) rep.status = AlreadyGrabbed; else rep.status = SetDeviceMode(client, dev, stuff->mode); if (rep.status == Success) valuator_set_mode(dev, VALUATOR_MODE_ALL_AXES, stuff->mode); else if (rep.status != AlreadyGrabbed) { switch (rep.status) { case BadMatch: case BadImplementation: case BadAlloc: break; default: rep.status = BadMode; } return rep.status; } WriteReplyToClient(client, sizeof(xSetDeviceModeReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the XSetDeviceMode function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXSetDeviceMode(ClientPtr client, int size, xSetDeviceModeReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/setmode.h0000644000175000017500000000312314757411105012023 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef SETMODE_H #define SETMODE_H 1 int SProcXSetDeviceMode(ClientPtr /* client */ ); int ProcXSetDeviceMode(ClientPtr /* client */ ); void SRepXSetDeviceMode(ClientPtr /* client */ , int /* size */ , xSetDeviceModeReply * /* rep */ ); #endif /* SETMODE_H */ xorg-server-21.1.16/Xi/ungrdev.c0000644000175000017500000000733214757411105012036 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to release a grab of an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include "exglobals.h" #include "ungrdev.h" /*********************************************************************** * * Handle requests from a client with a different byte order. * */ int _X_COLD SProcXUngrabDevice(ClientPtr client) { REQUEST(xUngrabDeviceReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceReq); swapl(&stuff->time); return (ProcXUngrabDevice(client)); } /*********************************************************************** * * Release a grab of an extension device. * */ int ProcXUngrabDevice(ClientPtr client) { DeviceIntPtr dev; GrabPtr grab; TimeStamp time; int rc; REQUEST(xUngrabDeviceReq); REQUEST_SIZE_MATCH(xUngrabDeviceReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; grab = dev->deviceGrab.grab; time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client) && grab->grabtype == XI) (*dev->deviceGrab.DeactivateGrab) (dev); return Success; } xorg-server-21.1.16/Xi/ungrdev.h0000644000175000017500000000265714757411105012050 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef UNGRDEV_H #define UNGRDEV_H 1 int SProcXUngrabDevice(ClientPtr /* client */ ); int ProcXUngrabDevice(ClientPtr /* client */ ); #endif /* UNGRDEV_H */ xorg-server-21.1.16/Xi/ungrdevb.c0000644000175000017500000001163214757411105012176 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to release a grab of a button on an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exglobals.h" #include "dixgrabs.h" #include "ungrdevb.h" #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) /*********************************************************************** * * Handle requests from a client with a different byte order. * */ int _X_COLD SProcXUngrabDeviceButton(ClientPtr client) { REQUEST(xUngrabDeviceButtonReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); return (ProcXUngrabDeviceButton(client)); } /*********************************************************************** * * Release a grab of a button on an extension device. * */ int ProcXUngrabDeviceButton(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr mdev; WindowPtr pWin; GrabPtr temporaryGrab; int rc; REQUEST(xUngrabDeviceButtonReq); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); if (rc != Success) return rc; if (dev->button == NULL) return BadMatch; if (stuff->modifier_device != UseXKeyboard) { rc = dixLookupDevice(&mdev, stuff->modifier_device, client, DixReadAccess); if (rc != Success) return BadDevice; if (mdev->key == NULL) return BadMatch; } else mdev = PickKeyboard(client); rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if ((stuff->modifiers != AnyModifier) && (stuff->modifiers & ~AllModifiersMask)) return BadValue; temporaryGrab = AllocGrab(NULL); if (!temporaryGrab) return BadAlloc; temporaryGrab->resource = client->clientAsMask; temporaryGrab->device = dev; temporaryGrab->window = pWin; temporaryGrab->type = DeviceButtonPress; temporaryGrab->grabtype = XI; temporaryGrab->modifierDevice = mdev; temporaryGrab->modifiersDetail.exact = stuff->modifiers; temporaryGrab->modifiersDetail.pMask = NULL; temporaryGrab->detail.exact = stuff->button; temporaryGrab->detail.pMask = NULL; DeletePassiveGrabFromList(temporaryGrab); FreeGrab(temporaryGrab); return Success; } xorg-server-21.1.16/Xi/ungrdevb.h0000644000175000017500000000267214757411105012207 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef UNGRDEVB_H #define UNGRDEVB_H 1 int SProcXUngrabDeviceButton(ClientPtr /* client */ ); int ProcXUngrabDeviceButton(ClientPtr /* client */ ); #endif /* UNGRDEVB_H */ xorg-server-21.1.16/Xi/ungrdevk.c0000644000175000017500000001213214757411105012203 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /*********************************************************************** * * Request to release a grab of a key on an extension device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exglobals.h" #include "dixgrabs.h" #include "xkbsrv.h" #include "xkbstr.h" #include "ungrdevk.h" #define AllModifiersMask ( \ ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \ Mod3Mask | Mod4Mask | Mod5Mask ) /*********************************************************************** * * Handle requests from a client with a different byte order. * */ int _X_COLD SProcXUngrabDeviceKey(ClientPtr client) { REQUEST(xUngrabDeviceKeyReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); swapl(&stuff->grabWindow); swaps(&stuff->modifiers); return (ProcXUngrabDeviceKey(client)); } /*********************************************************************** * * Release a grab of a key on an extension device. * */ int ProcXUngrabDeviceKey(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr mdev; WindowPtr pWin; GrabPtr temporaryGrab; int rc; REQUEST(xUngrabDeviceKeyReq); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); if (rc != Success) return rc; if (dev->key == NULL) return BadMatch; if (stuff->modifier_device != UseXKeyboard) { rc = dixLookupDevice(&mdev, stuff->modifier_device, client, DixReadAccess); if (rc != Success) return BadDevice; if (mdev->key == NULL) return BadMatch; } else mdev = PickKeyboard(client); rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixSetAttrAccess); if (rc != Success) return rc; if (((stuff->key > dev->key->xkbInfo->desc->max_key_code) || (stuff->key < dev->key->xkbInfo->desc->min_key_code)) && (stuff->key != AnyKey)) return BadValue; if ((stuff->modifiers != AnyModifier) && (stuff->modifiers & ~AllModifiersMask)) return BadValue; temporaryGrab = AllocGrab(NULL); if (!temporaryGrab) return BadAlloc; temporaryGrab->resource = client->clientAsMask; temporaryGrab->device = dev; temporaryGrab->window = pWin; temporaryGrab->type = DeviceKeyPress; temporaryGrab->grabtype = XI; temporaryGrab->modifierDevice = mdev; temporaryGrab->modifiersDetail.exact = stuff->modifiers; temporaryGrab->modifiersDetail.pMask = NULL; temporaryGrab->detail.exact = stuff->key; temporaryGrab->detail.pMask = NULL; DeletePassiveGrabFromList(temporaryGrab); FreeGrab(temporaryGrab); return Success; } xorg-server-21.1.16/Xi/ungrdevk.h0000644000175000017500000000267214757411105012220 /************************************************************ Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 #endif #ifndef UNGRDEVK_H #define UNGRDEVK_H 1 int SProcXUngrabDeviceKey(ClientPtr /* client */ ); int ProcXUngrabDeviceKey(ClientPtr /* client */ ); #endif /* UNGRDEVK_H */ xorg-server-21.1.16/Xi/xiallowev.c0000644000175000017500000001000714757411105012367 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ /*********************************************************************** * * Request to allow some device events. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "mi.h" #include "eventstr.h" #include #include #include "exglobals.h" /* BadDevice */ #include "exevents.h" #include "xiallowev.h" int _X_COLD SProcXIAllowEvents(ClientPtr client) { REQUEST(xXIAllowEventsReq); REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->time); if (stuff->length > 3) { xXI2_2AllowEventsReq *req_xi22 = (xXI2_2AllowEventsReq *) stuff; REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq); swapl(&req_xi22->touchid); swapl(&req_xi22->grab_window); } return ProcXIAllowEvents(client); } int ProcXIAllowEvents(ClientPtr client) { TimeStamp time; DeviceIntPtr dev; int ret = Success; XIClientPtr xi_client; Bool have_xi22 = FALSE; REQUEST(xXI2_2AllowEventsReq); xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); if (version_compare(xi_client->major_version, xi_client->minor_version, 2, 2) >= 0) { REQUEST_AT_LEAST_SIZE(xXI2_2AllowEventsReq); have_xi22 = TRUE; } else { REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq); } ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (ret != Success) return ret; time = ClientTimeToServerTime(stuff->time); switch (stuff->mode) { case XIReplayDevice: AllowSome(client, time, dev, NOT_GRABBED); break; case XISyncDevice: AllowSome(client, time, dev, FREEZE_NEXT_EVENT); break; case XIAsyncDevice: AllowSome(client, time, dev, THAWED); break; case XIAsyncPairedDevice: if (IsMaster(dev)) AllowSome(client, time, dev, THAW_OTHERS); break; case XISyncPair: if (IsMaster(dev)) AllowSome(client, time, dev, FREEZE_BOTH_NEXT_EVENT); break; case XIAsyncPair: if (IsMaster(dev)) AllowSome(client, time, dev, THAWED_BOTH); break; case XIRejectTouch: case XIAcceptTouch: { int rc; WindowPtr win; if (!have_xi22) return BadValue; rc = dixLookupWindow(&win, stuff->grab_window, client, DixReadAccess); if (rc != Success) return rc; ret = TouchAcceptReject(client, dev, stuff->mode, stuff->touchid, stuff->grab_window, &client->errorValue); } break; default: client->errorValue = stuff->mode; ret = BadValue; } return ret; } xorg-server-21.1.16/Xi/xiallowev.h0000644000175000017500000000261014757411105012375 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XIALLOWEV_H #define XIALLOWEV_H 1 int ProcXIAllowEvents(ClientPtr client); int SProcXIAllowEvents(ClientPtr client); #endif /* XIALLOWEV_H */ xorg-server-21.1.16/Xi/xibarriers.c0000644000175000017500000006473314757411105012546 /* * Copyright 2012 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Copyright © 2002 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 #endif #include "xibarriers.h" #include "scrnintstr.h" #include "cursorstr.h" #include "dixevents.h" #include "servermd.h" #include "mipointer.h" #include "inputstr.h" #include "windowstr.h" #include "xace.h" #include "list.h" #include "exglobals.h" #include "eventstr.h" #include "mi.h" RESTYPE PointerBarrierType; static DevPrivateKeyRec BarrierScreenPrivateKeyRec; #define BarrierScreenPrivateKey (&BarrierScreenPrivateKeyRec) typedef struct PointerBarrierClient *PointerBarrierClientPtr; struct PointerBarrierDevice { struct xorg_list entry; int deviceid; Time last_timestamp; int barrier_event_id; int release_event_id; Bool hit; Bool seen; }; struct PointerBarrierClient { XID id; ScreenPtr screen; Window window; struct PointerBarrier barrier; struct xorg_list entry; /* num_devices/device_ids are devices the barrier applies to */ int num_devices; int *device_ids; /* num_devices */ /* per_device keeps track of devices actually blocked by barriers */ struct xorg_list per_device; }; typedef struct _BarrierScreen { struct xorg_list barriers; } BarrierScreenRec, *BarrierScreenPtr; #define GetBarrierScreen(s) ((BarrierScreenPtr)dixLookupPrivate(&(s)->devPrivates, BarrierScreenPrivateKey)) #define GetBarrierScreenIfSet(s) GetBarrierScreen(s) #define SetBarrierScreen(s,p) dixSetPrivate(&(s)->devPrivates, BarrierScreenPrivateKey, p) static struct PointerBarrierDevice *AllocBarrierDevice(void) { struct PointerBarrierDevice *pbd = NULL; pbd = malloc(sizeof(struct PointerBarrierDevice)); if (!pbd) return NULL; pbd->deviceid = -1; /* must be set by caller */ pbd->barrier_event_id = 1; pbd->release_event_id = 0; pbd->hit = FALSE; pbd->seen = FALSE; xorg_list_init(&pbd->entry); return pbd; } static void FreePointerBarrierClient(struct PointerBarrierClient *c) { struct PointerBarrierDevice *pbd = NULL, *tmp = NULL; xorg_list_for_each_entry_safe(pbd, tmp, &c->per_device, entry) { free(pbd); } free(c); } static struct PointerBarrierDevice *GetBarrierDevice(struct PointerBarrierClient *c, int deviceid) { struct PointerBarrierDevice *p, *pbd = NULL; xorg_list_for_each_entry(p, &c->per_device, entry) { if (p->deviceid == deviceid) { pbd = p; break; } } return pbd; } static BOOL barrier_is_horizontal(const struct PointerBarrier *barrier) { return barrier->y1 == barrier->y2; } static BOOL barrier_is_vertical(const struct PointerBarrier *barrier) { return barrier->x1 == barrier->x2; } /** * @return The set of barrier movement directions the movement vector * x1/y1 → x2/y2 represents. */ int barrier_get_direction(int x1, int y1, int x2, int y2) { int direction = 0; /* which way are we trying to go */ if (x2 > x1) direction |= BarrierPositiveX; if (x2 < x1) direction |= BarrierNegativeX; if (y2 > y1) direction |= BarrierPositiveY; if (y2 < y1) direction |= BarrierNegativeY; return direction; } /** * Test if the barrier may block movement in the direction defined by * x1/y1 → x2/y2. This function only tests whether the directions could be * blocked, it does not test if the barrier actually blocks the movement. * * @return TRUE if the barrier blocks the direction of movement or FALSE * otherwise. */ BOOL barrier_is_blocking_direction(const struct PointerBarrier * barrier, int direction) { /* Barriers define which way is ok, not which way is blocking */ return (barrier->directions & direction) != direction; } static BOOL inside_segment(int v, int v1, int v2) { if (v1 < 0 && v2 < 0) /* line */ return TRUE; else if (v1 < 0) /* ray */ return v <= v2; else if (v2 < 0) /* ray */ return v >= v1; else /* line segment */ return v >= v1 && v <= v2; } #define T(v, a, b) (((float)v) - (a)) / ((b) - (a)) #define F(t, a, b) ((t) * ((a) - (b)) + (a)) /** * Test if the movement vector x1/y1 → x2/y2 is intersecting with the * barrier. A movement vector with the startpoint or endpoint adjacent to * the barrier itself counts as intersecting. * * @param x1 X start coordinate of movement vector * @param y1 Y start coordinate of movement vector * @param x2 X end coordinate of movement vector * @param y2 Y end coordinate of movement vector * @param[out] distance The distance between the start point and the * intersection with the barrier (if applicable). * @return TRUE if the barrier intersects with the given vector */ BOOL barrier_is_blocking(const struct PointerBarrier * barrier, int x1, int y1, int x2, int y2, double *distance) { if (barrier_is_vertical(barrier)) { float t, y; t = T(barrier->x1, x1, x2); if (t < 0 || t > 1) return FALSE; /* Edge case: moving away from barrier. */ if (x2 > x1 && t == 0) return FALSE; y = F(t, y1, y2); if (!inside_segment(y, barrier->y1, barrier->y2)) return FALSE; *distance = sqrt((pow(y - y1, 2) + pow(barrier->x1 - x1, 2))); return TRUE; } else { float t, x; t = T(barrier->y1, y1, y2); if (t < 0 || t > 1) return FALSE; /* Edge case: moving away from barrier. */ if (y2 > y1 && t == 0) return FALSE; x = F(t, x1, x2); if (!inside_segment(x, barrier->x1, barrier->x2)) return FALSE; *distance = sqrt((pow(x - x1, 2) + pow(barrier->y1 - y1, 2))); return TRUE; } } #define HIT_EDGE_EXTENTS 2 static BOOL barrier_inside_hit_box(struct PointerBarrier *barrier, int x, int y) { int x1, x2, y1, y2; int dir; x1 = barrier->x1; x2 = barrier->x2; y1 = barrier->y1; y2 = barrier->y2; dir = ~(barrier->directions); if (barrier_is_vertical(barrier)) { if (dir & BarrierPositiveX) x1 -= HIT_EDGE_EXTENTS; if (dir & BarrierNegativeX) x2 += HIT_EDGE_EXTENTS; } if (barrier_is_horizontal(barrier)) { if (dir & BarrierPositiveY) y1 -= HIT_EDGE_EXTENTS; if (dir & BarrierNegativeY) y2 += HIT_EDGE_EXTENTS; } return x >= x1 && x <= x2 && y >= y1 && y <= y2; } static BOOL barrier_blocks_device(struct PointerBarrierClient *client, DeviceIntPtr dev) { int i; int master_id; /* Clients with no devices are treated as * if they specified XIAllDevices. */ if (client->num_devices == 0) return TRUE; master_id = GetMaster(dev, POINTER_OR_FLOAT)->id; for (i = 0; i < client->num_devices; i++) { int device_id = client->device_ids[i]; if (device_id == XIAllDevices || device_id == XIAllMasterDevices || device_id == master_id) return TRUE; } return FALSE; } /** * Find the nearest barrier client that is blocking movement from x1/y1 to x2/y2. * * @param dir Only barriers blocking movement in direction dir are checked * @param x1 X start coordinate of movement vector * @param y1 Y start coordinate of movement vector * @param x2 X end coordinate of movement vector * @param y2 Y end coordinate of movement vector * @return The barrier nearest to the movement origin that blocks this movement. */ static struct PointerBarrierClient * barrier_find_nearest(BarrierScreenPtr cs, DeviceIntPtr dev, int dir, int x1, int y1, int x2, int y2) { struct PointerBarrierClient *c, *nearest = NULL; double min_distance = INT_MAX; /* can't get higher than that in X anyway */ xorg_list_for_each_entry(c, &cs->barriers, entry) { struct PointerBarrier *b = &c->barrier; struct PointerBarrierDevice *pbd; double distance; pbd = GetBarrierDevice(c, dev->id); if (!pbd) continue; if (pbd->seen) continue; if (!barrier_is_blocking_direction(b, dir)) continue; if (!barrier_blocks_device(c, dev)) continue; if (barrier_is_blocking(b, x1, y1, x2, y2, &distance)) { if (min_distance > distance) { min_distance = distance; nearest = c; } } } return nearest; } /** * Clamp to the given barrier given the movement direction specified in dir. * * @param barrier The barrier to clamp to * @param dir The movement direction * @param[out] x The clamped x coordinate. * @param[out] y The clamped x coordinate. */ void barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y) { if (barrier_is_vertical(barrier)) { if ((dir & BarrierNegativeX) & ~barrier->directions) *x = barrier->x1; if ((dir & BarrierPositiveX) & ~barrier->directions) *x = barrier->x1 - 1; } if (barrier_is_horizontal(barrier)) { if ((dir & BarrierNegativeY) & ~barrier->directions) *y = barrier->y1; if ((dir & BarrierPositiveY) & ~barrier->directions) *y = barrier->y1 - 1; } } void input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, int current_x, int current_y, int dest_x, int dest_y, int *out_x, int *out_y, int *nevents, InternalEvent* events) { /* Clamped coordinates here refer to screen edge clamping. */ BarrierScreenPtr cs = GetBarrierScreen(screen); int x = dest_x, y = dest_y; int dir; struct PointerBarrier *nearest = NULL; PointerBarrierClientPtr c; Time ms = GetTimeInMillis(); BarrierEvent ev = { .header = ET_Internal, .type = 0, .length = sizeof (BarrierEvent), .time = ms, .deviceid = dev->id, .sourceid = dev->id, .dx = dest_x - current_x, .dy = dest_y - current_y, .root = screen->root->drawable.id, }; InternalEvent *barrier_events = events; DeviceIntPtr master; if (nevents) *nevents = 0; if (xorg_list_is_empty(&cs->barriers) || IsFloating(dev)) goto out; /** * This function is only called for slave devices, but pointer-barriers * are for master-devices only. Flip the device to the master here, * continue with that. */ master = GetMaster(dev, MASTER_POINTER); /* How this works: * Given the origin and the movement vector, get the nearest barrier * to the origin that is blocking the movement. * Clamp to that barrier. * Then, check from the clamped intersection to the original * destination, again finding the nearest barrier and clamping. */ dir = barrier_get_direction(current_x, current_y, x, y); while (dir != 0) { int new_sequence; struct PointerBarrierDevice *pbd; c = barrier_find_nearest(cs, master, dir, current_x, current_y, x, y); if (!c) break; nearest = &c->barrier; pbd = GetBarrierDevice(c, master->id); if (!pbd) continue; new_sequence = !pbd->hit; pbd->seen = TRUE; pbd->hit = TRUE; if (pbd->barrier_event_id == pbd->release_event_id) continue; ev.type = ET_BarrierHit; barrier_clamp_to_barrier(nearest, dir, &x, &y); if (barrier_is_vertical(nearest)) { dir &= ~(BarrierNegativeX | BarrierPositiveX); current_x = x; } else if (barrier_is_horizontal(nearest)) { dir &= ~(BarrierNegativeY | BarrierPositiveY); current_y = y; } ev.flags = 0; ev.event_id = pbd->barrier_event_id; ev.barrierid = c->id; ev.dt = new_sequence ? 0 : ms - pbd->last_timestamp; ev.window = c->window; pbd->last_timestamp = ms; /* root x/y is filled in later */ barrier_events->barrier_event = ev; barrier_events++; *nevents += 1; } xorg_list_for_each_entry(c, &cs->barriers, entry) { struct PointerBarrierDevice *pbd; int flags = 0; pbd = GetBarrierDevice(c, master->id); if (!pbd) continue; pbd->seen = FALSE; if (!pbd->hit) continue; if (barrier_inside_hit_box(&c->barrier, x, y)) continue; pbd->hit = FALSE; ev.type = ET_BarrierLeave; if (pbd->barrier_event_id == pbd->release_event_id) flags |= XIBarrierPointerReleased; ev.flags = flags; ev.event_id = pbd->barrier_event_id; ev.barrierid = c->id; ev.dt = ms - pbd->last_timestamp; ev.window = c->window; pbd->last_timestamp = ms; /* root x/y is filled in later */ barrier_events->barrier_event = ev; barrier_events++; *nevents += 1; /* If we've left the hit box, this is the * start of a new event ID. */ pbd->barrier_event_id++; } out: *out_x = x; *out_y = y; } static void sort_min_max(INT16 *a, INT16 *b) { INT16 A, B; if (*a < 0 || *b < 0) return; A = *a; B = *b; *a = min(A, B); *b = max(A, B); } static int CreatePointerBarrierClient(ClientPtr client, xXFixesCreatePointerBarrierReq * stuff, PointerBarrierClientPtr *client_out) { WindowPtr pWin; ScreenPtr screen; BarrierScreenPtr cs; int err; int size; int i; struct PointerBarrierClient *ret; CARD16 *in_devices; DeviceIntPtr dev; size = sizeof(*ret) + sizeof(DeviceIntPtr) * stuff->num_devices; ret = malloc(size); if (!ret) { return BadAlloc; } xorg_list_init(&ret->per_device); err = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); if (err != Success) { client->errorValue = stuff->window; goto error; } screen = pWin->drawable.pScreen; cs = GetBarrierScreen(screen); ret->screen = screen; ret->window = stuff->window; ret->num_devices = stuff->num_devices; if (ret->num_devices > 0) ret->device_ids = (int*)&ret[1]; else ret->device_ids = NULL; in_devices = (CARD16 *) &stuff[1]; for (i = 0; i < stuff->num_devices; i++) { int device_id = in_devices[i]; DeviceIntPtr device; if ((err = dixLookupDevice (&device, device_id, client, DixReadAccess))) { client->errorValue = device_id; goto error; } if (!IsMaster (device)) { client->errorValue = device_id; err = BadDevice; goto error; } ret->device_ids[i] = device_id; } /* Alloc one per master pointer, they're the ones that can be blocked */ xorg_list_init(&ret->per_device); nt_list_for_each_entry(dev, inputInfo.devices, next) { struct PointerBarrierDevice *pbd; if (dev->type != MASTER_POINTER) continue; pbd = AllocBarrierDevice(); if (!pbd) { err = BadAlloc; goto error; } pbd->deviceid = dev->id; input_lock(); xorg_list_add(&pbd->entry, &ret->per_device); input_unlock(); } ret->id = stuff->barrier; ret->barrier.x1 = stuff->x1; ret->barrier.x2 = stuff->x2; ret->barrier.y1 = stuff->y1; ret->barrier.y2 = stuff->y2; sort_min_max(&ret->barrier.x1, &ret->barrier.x2); sort_min_max(&ret->barrier.y1, &ret->barrier.y2); ret->barrier.directions = stuff->directions & 0x0f; if (barrier_is_horizontal(&ret->barrier)) ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX); if (barrier_is_vertical(&ret->barrier)) ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY); input_lock(); xorg_list_add(&ret->entry, &cs->barriers); input_unlock(); *client_out = ret; return Success; error: *client_out = NULL; FreePointerBarrierClient(ret); return err; } static int BarrierFreeBarrier(void *data, XID id) { struct PointerBarrierClient *c; Time ms = GetTimeInMillis(); DeviceIntPtr dev = NULL; ScreenPtr screen; c = container_of(data, struct PointerBarrierClient, barrier); screen = c->screen; for (dev = inputInfo.devices; dev; dev = dev->next) { struct PointerBarrierDevice *pbd; int root_x, root_y; BarrierEvent ev = { .header = ET_Internal, .type = ET_BarrierLeave, .length = sizeof (BarrierEvent), .time = ms, /* .deviceid */ .sourceid = 0, .barrierid = c->id, .window = c->window, .root = screen->root->drawable.id, .dx = 0, .dy = 0, /* .root_x */ /* .root_y */ /* .dt */ /* .event_id */ .flags = XIBarrierPointerReleased, }; if (dev->type != MASTER_POINTER) continue; pbd = GetBarrierDevice(c, dev->id); if (!pbd) continue; if (!pbd->hit) continue; ev.deviceid = dev->id; ev.event_id = pbd->barrier_event_id; ev.dt = ms - pbd->last_timestamp; GetSpritePosition(dev, &root_x, &root_y); ev.root_x = root_x; ev.root_y = root_y; mieqEnqueue(dev, (InternalEvent *) &ev); } input_lock(); xorg_list_del(&c->entry); input_unlock(); FreePointerBarrierClient(c); return Success; } static void add_master_func(void *res, XID id, void *devid) { struct PointerBarrier *b; struct PointerBarrierClient *barrier; struct PointerBarrierDevice *pbd; int *deviceid = devid; b = res; barrier = container_of(b, struct PointerBarrierClient, barrier); pbd = AllocBarrierDevice(); pbd->deviceid = *deviceid; input_lock(); xorg_list_add(&pbd->entry, &barrier->per_device); input_unlock(); } static void remove_master_func(void *res, XID id, void *devid) { struct PointerBarrierDevice *pbd; struct PointerBarrierClient *barrier; struct PointerBarrier *b; DeviceIntPtr dev; int *deviceid = devid; int rc; Time ms = GetTimeInMillis(); rc = dixLookupDevice(&dev, *deviceid, serverClient, DixSendAccess); if (rc != Success) return; b = res; barrier = container_of(b, struct PointerBarrierClient, barrier); pbd = GetBarrierDevice(barrier, *deviceid); if (!pbd) return; if (pbd->hit) { BarrierEvent ev = { .header = ET_Internal, .type =ET_BarrierLeave, .length = sizeof (BarrierEvent), .time = ms, .deviceid = *deviceid, .sourceid = 0, .dx = 0, .dy = 0, .root = barrier->screen->root->drawable.id, .window = barrier->window, .dt = ms - pbd->last_timestamp, .flags = XIBarrierPointerReleased, .event_id = pbd->barrier_event_id, .barrierid = barrier->id, }; mieqEnqueue(dev, (InternalEvent *) &ev); } input_lock(); xorg_list_del(&pbd->entry); input_unlock(); free(pbd); } void XIBarrierNewMasterDevice(ClientPtr client, int deviceid) { FindClientResourcesByType(client, PointerBarrierType, add_master_func, &deviceid); } void XIBarrierRemoveMasterDevice(ClientPtr client, int deviceid) { FindClientResourcesByType(client, PointerBarrierType, remove_master_func, &deviceid); } int XICreatePointerBarrier(ClientPtr client, xXFixesCreatePointerBarrierReq * stuff) { int err; struct PointerBarrierClient *barrier; struct PointerBarrier b; b.x1 = stuff->x1; b.x2 = stuff->x2; b.y1 = stuff->y1; b.y2 = stuff->y2; if (!barrier_is_horizontal(&b) && !barrier_is_vertical(&b)) return BadValue; /* no 0-sized barriers */ if (barrier_is_horizontal(&b) && barrier_is_vertical(&b)) return BadValue; /* no infinite barriers on the wrong axis */ if (barrier_is_horizontal(&b) && (b.y1 < 0 || b.y2 < 0)) return BadValue; if (barrier_is_vertical(&b) && (b.x1 < 0 || b.x2 < 0)) return BadValue; if ((err = CreatePointerBarrierClient(client, stuff, &barrier))) return err; if (!AddResource(stuff->barrier, PointerBarrierType, &barrier->barrier)) return BadAlloc; return Success; } int XIDestroyPointerBarrier(ClientPtr client, xXFixesDestroyPointerBarrierReq * stuff) { int err; void *barrier; err = dixLookupResourceByType((void **) &barrier, stuff->barrier, PointerBarrierType, client, DixDestroyAccess); if (err != Success) { client->errorValue = stuff->barrier; return err; } if (CLIENT_ID(stuff->barrier) != client->index) return BadAccess; FreeResource(stuff->barrier, RT_NONE); return Success; } int _X_COLD SProcXIBarrierReleasePointer(ClientPtr client) { xXIBarrierReleasePointerInfo *info; REQUEST(xXIBarrierReleasePointerReq); int i; swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); swapl(&stuff->num_barriers); if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo)) return BadLength; REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo)); info = (xXIBarrierReleasePointerInfo*) &stuff[1]; for (i = 0; i < stuff->num_barriers; i++, info++) { swaps(&info->deviceid); swapl(&info->barrier); swapl(&info->eventid); } return (ProcXIBarrierReleasePointer(client)); } int ProcXIBarrierReleasePointer(ClientPtr client) { int i; int err; struct PointerBarrierClient *barrier; struct PointerBarrier *b; xXIBarrierReleasePointerInfo *info; REQUEST(xXIBarrierReleasePointerReq); REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); if (stuff->num_barriers > UINT32_MAX / sizeof(xXIBarrierReleasePointerInfo)) return BadLength; REQUEST_FIXED_SIZE(xXIBarrierReleasePointerReq, stuff->num_barriers * sizeof(xXIBarrierReleasePointerInfo)); info = (xXIBarrierReleasePointerInfo*) &stuff[1]; for (i = 0; i < stuff->num_barriers; i++, info++) { struct PointerBarrierDevice *pbd; DeviceIntPtr dev; CARD32 barrier_id, event_id; _X_UNUSED CARD32 device_id; barrier_id = info->barrier; event_id = info->eventid; err = dixLookupDevice(&dev, info->deviceid, client, DixReadAccess); if (err != Success) { client->errorValue = BadDevice; return err; } err = dixLookupResourceByType((void **) &b, barrier_id, PointerBarrierType, client, DixReadAccess); if (err != Success) { client->errorValue = barrier_id; return err; } if (CLIENT_ID(barrier_id) != client->index) return BadAccess; barrier = container_of(b, struct PointerBarrierClient, barrier); pbd = GetBarrierDevice(barrier, dev->id); if (!pbd) { client->errorValue = dev->id; return BadDevice; } if (pbd->barrier_event_id == event_id) pbd->release_event_id = event_id; } return Success; } Bool XIBarrierInit(void) { int i; if (!dixRegisterPrivateKey(&BarrierScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; BarrierScreenPtr cs; cs = (BarrierScreenPtr) calloc(1, sizeof(BarrierScreenRec)); if (!cs) return FALSE; xorg_list_init(&cs->barriers); SetBarrierScreen(pScreen, cs); } PointerBarrierType = CreateNewResourceType(BarrierFreeBarrier, "XIPointerBarrier"); return PointerBarrierType; } void XIBarrierReset(void) { int i; for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; BarrierScreenPtr cs = GetBarrierScreen(pScreen); free(cs); SetBarrierScreen(pScreen, NULL); } } xorg-server-21.1.16/Xi/xibarriers.h0000644000175000017500000000221214757411105012533 #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef _XIBARRIERS_H_ #define _XIBARRIERS_H_ #include "resource.h" extern _X_EXPORT RESTYPE PointerBarrierType; struct PointerBarrier { INT16 x1, x2, y1, y2; CARD32 directions; }; int barrier_get_direction(int, int, int, int); BOOL barrier_is_blocking(const struct PointerBarrier *, int, int, int, int, double *); BOOL barrier_is_blocking_direction(const struct PointerBarrier *, int); void barrier_clamp_to_barrier(struct PointerBarrier *barrier, int dir, int *x, int *y); #include int XICreatePointerBarrier(ClientPtr client, xXFixesCreatePointerBarrierReq * stuff); int XIDestroyPointerBarrier(ClientPtr client, xXFixesDestroyPointerBarrierReq * stuff); Bool XIBarrierInit(void); void XIBarrierReset(void); int SProcXIBarrierReleasePointer(ClientPtr client); int ProcXIBarrierReleasePointer(ClientPtr client); void XIBarrierNewMasterDevice(ClientPtr client, int deviceid); void XIBarrierRemoveMasterDevice(ClientPtr client, int deviceid); #endif /* _XIBARRIERS_H_ */ xorg-server-21.1.16/Xi/xichangecursor.c0000644000175000017500000000643014757411105013406 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request to change a given device pointer's cursor. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" #include "input.h" #include "xichangecursor.h" /*********************************************************************** * * This procedure allows a client to set one pointer's cursor. * */ int _X_COLD SProcXIChangeCursor(ClientPtr client) { REQUEST(xXIChangeCursorReq); REQUEST_SIZE_MATCH(xXIChangeCursorReq); swaps(&stuff->length); swapl(&stuff->win); swapl(&stuff->cursor); swaps(&stuff->deviceid); return (ProcXIChangeCursor(client)); } int ProcXIChangeCursor(ClientPtr client) { int rc; WindowPtr pWin = NULL; DeviceIntPtr pDev = NULL; CursorPtr pCursor = NULL; REQUEST(xXIChangeCursorReq); REQUEST_SIZE_MATCH(xXIChangeCursorReq); rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixSetAttrAccess); if (rc != Success) return rc; if (!IsMaster(pDev) || !IsPointerDevice(pDev)) return BadDevice; if (stuff->win != None) { rc = dixLookupWindow(&pWin, stuff->win, client, DixSetAttrAccess); if (rc != Success) return rc; } if (stuff->cursor == None) { if (pWin == pWin->drawable.pScreen->root) pCursor = rootCursor; else pCursor = (CursorPtr) None; } else { rc = dixLookupResourceByType((void **) &pCursor, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) return rc; } ChangeWindowDeviceCursor(pWin, pDev, pCursor); return Success; } xorg-server-21.1.16/Xi/xichangecursor.h0000644000175000017500000000267614757411105013423 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef CHDEVCUR_H #define CHDEVCUR_H 1 int SProcXIChangeCursor(ClientPtr /* client */ ); int ProcXIChangeCursor(ClientPtr /* client */ ); #endif /* CHDEVCUR_H */ xorg-server-21.1.16/Xi/xichangehierarchy.c0000644000175000017500000003664414757411105014061 /* * Copyright 2007-2008 Peter Hutterer * Copyright 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request change in the device hierarchy. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" #include "geext.h" #include "misc.h" #include "xace.h" #include "xiquerydevice.h" /* for GetDeviceUse */ #include "xkbsrv.h" #include "xichangehierarchy.h" #include "xibarriers.h" /** * Send the current state of the device hierarchy to all clients. */ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) { xXIHierarchyEvent *ev; xXIHierarchyInfo *info; DeviceIntRec dummyDev; DeviceIntPtr dev; int i; if (!flags) return; ev = calloc(1, sizeof(xXIHierarchyEvent) + MAXDEVICES * sizeof(xXIHierarchyInfo)); if (!ev) return; ev->type = GenericEvent; ev->extension = IReqCode; ev->evtype = XI_HierarchyChanged; ev->time = GetTimeInMillis(); ev->flags = 0; ev->num_info = inputInfo.numDevices; info = (xXIHierarchyInfo *) &ev[1]; for (dev = inputInfo.devices; dev; dev = dev->next) { info->deviceid = dev->id; info->enabled = dev->enabled; info->use = GetDeviceUse(dev, &info->attachment); info->flags = flags[dev->id]; ev->flags |= info->flags; info++; } for (dev = inputInfo.off_devices; dev; dev = dev->next) { info->deviceid = dev->id; info->enabled = dev->enabled; info->use = GetDeviceUse(dev, &info->attachment); info->flags = flags[dev->id]; ev->flags |= info->flags; info++; } for (i = 0; i < MAXDEVICES; i++) { if (flags[i] & (XIMasterRemoved | XISlaveRemoved)) { info->deviceid = i; info->enabled = FALSE; info->flags = flags[i]; info->use = 0; ev->flags |= info->flags; ev->num_info++; info++; } } ev->length = bytes_to_int32(ev->num_info * sizeof(xXIHierarchyInfo)); memset(&dummyDev, 0, sizeof(dummyDev)); dummyDev.id = XIAllDevices; dummyDev.type = SLAVE; SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent *) ev, 1); free(ev); } /*********************************************************************** * * This procedure allows a client to change the device hierarchy through * adding new master devices, removing them, etc. * */ int _X_COLD SProcXIChangeHierarchy(ClientPtr client) { REQUEST(xXIChangeHierarchyReq); swaps(&stuff->length); return (ProcXIChangeHierarchy(client)); } static int add_master(ClientPtr client, xXIAddMasterInfo * c, int flags[MAXDEVICES]) { DeviceIntPtr ptr, keybd, XTestptr, XTestkeybd; char *name; int rc; name = calloc(c->name_len + 1, sizeof(char)); if (name == NULL) { rc = BadAlloc; goto unwind; } strncpy(name, (char *) &c[1], c->name_len); rc = AllocDevicePair(client, name, &ptr, &keybd, CorePointerProc, CoreKeyboardProc, TRUE); if (rc != Success) goto unwind; if (!c->send_core) ptr->coreEvents = keybd->coreEvents = FALSE; /* Allocate virtual slave devices for xtest events */ rc = AllocXTestDevice(client, name, &XTestptr, &XTestkeybd, ptr, keybd); if (rc != Success) { DeleteInputDeviceRequest(ptr); DeleteInputDeviceRequest(keybd); goto unwind; } ActivateDevice(ptr, FALSE); ActivateDevice(keybd, FALSE); flags[ptr->id] |= XIMasterAdded; flags[keybd->id] |= XIMasterAdded; ActivateDevice(XTestptr, FALSE); ActivateDevice(XTestkeybd, FALSE); flags[XTestptr->id] |= XISlaveAdded; flags[XTestkeybd->id] |= XISlaveAdded; if (c->enable) { EnableDevice(ptr, FALSE); EnableDevice(keybd, FALSE); flags[ptr->id] |= XIDeviceEnabled; flags[keybd->id] |= XIDeviceEnabled; EnableDevice(XTestptr, FALSE); EnableDevice(XTestkeybd, FALSE); flags[XTestptr->id] |= XIDeviceEnabled; flags[XTestkeybd->id] |= XIDeviceEnabled; } /* Attach the XTest virtual devices to the newly created master device */ AttachDevice(NULL, XTestptr, ptr); AttachDevice(NULL, XTestkeybd, keybd); flags[XTestptr->id] |= XISlaveAttached; flags[XTestkeybd->id] |= XISlaveAttached; for (int i = 0; i < currentMaxClients; i++) XIBarrierNewMasterDevice(clients[i], ptr->id); unwind: free(name); return rc; } static void disable_clientpointer(DeviceIntPtr dev) { int i; for (i = 0; i < currentMaxClients; i++) { ClientPtr client = clients[i]; if (client && client->clientPtr == dev) client->clientPtr = NULL; } } static DeviceIntPtr find_disabled_master(int type) { DeviceIntPtr dev; /* Once a master device is disabled it loses the pairing, so returning the first * match is good enough */ for (dev = inputInfo.off_devices; dev; dev = dev->next) { if (dev->type == type) return dev; } return NULL; } static int remove_master(ClientPtr client, xXIRemoveMasterInfo * r, int flags[MAXDEVICES]) { DeviceIntPtr dev, ptr, keybd, XTestptr, XTestkeybd; int rc = Success; if (r->return_mode != XIAttachToMaster && r->return_mode != XIFloating) return BadValue; rc = dixLookupDevice(&dev, r->deviceid, client, DixDestroyAccess); if (rc != Success) goto unwind; if (!IsMaster(dev)) { client->errorValue = r->deviceid; rc = BadDevice; goto unwind; } /* XXX: For now, don't allow removal of VCP, VCK */ if (dev == inputInfo.pointer || dev == inputInfo.keyboard) { rc = BadDevice; goto unwind; } if ((ptr = GetMaster(dev, MASTER_POINTER)) == NULL) ptr = find_disabled_master(MASTER_POINTER); BUG_RETURN_VAL(ptr == NULL, BadDevice); rc = dixLookupDevice(&ptr, ptr->id, client, DixDestroyAccess); if (rc != Success) goto unwind; if ((keybd = GetMaster(dev, MASTER_KEYBOARD)) == NULL) keybd = find_disabled_master(MASTER_KEYBOARD); BUG_RETURN_VAL(keybd == NULL, BadDevice); rc = dixLookupDevice(&keybd, keybd->id, client, DixDestroyAccess); if (rc != Success) goto unwind; XTestptr = GetXTestDevice(ptr); BUG_RETURN_VAL(XTestptr == NULL, BadDevice); rc = dixLookupDevice(&XTestptr, XTestptr->id, client, DixDestroyAccess); if (rc != Success) goto unwind; XTestkeybd = GetXTestDevice(keybd); BUG_RETURN_VAL(XTestkeybd == NULL, BadDevice); rc = dixLookupDevice(&XTestkeybd, XTestkeybd->id, client, DixDestroyAccess); if (rc != Success) goto unwind; disable_clientpointer(ptr); /* Disabling sends the devices floating, reattach them if * desired. */ if (r->return_mode == XIAttachToMaster) { DeviceIntPtr attached, newptr, newkeybd; rc = dixLookupDevice(&newptr, r->return_pointer, client, DixAddAccess); if (rc != Success) goto unwind; if (!IsMaster(newptr)) { client->errorValue = r->return_pointer; rc = BadDevice; goto unwind; } rc = dixLookupDevice(&newkeybd, r->return_keyboard, client, DixAddAccess); if (rc != Success) goto unwind; if (!IsMaster(newkeybd)) { client->errorValue = r->return_keyboard; rc = BadDevice; goto unwind; } for (attached = inputInfo.devices; attached; attached = attached->next) { if (!IsMaster(attached)) { if (GetMaster(attached, MASTER_ATTACHED) == ptr) { AttachDevice(client, attached, newptr); flags[attached->id] |= XISlaveAttached; } if (GetMaster(attached, MASTER_ATTACHED) == keybd) { AttachDevice(client, attached, newkeybd); flags[attached->id] |= XISlaveAttached; } } } } for (int i = 0; i < currentMaxClients; i++) XIBarrierRemoveMasterDevice(clients[i], ptr->id); /* disable the remove the devices, XTest devices must be done first else the sprites they rely on will be destroyed */ DisableDevice(XTestptr, FALSE); DisableDevice(XTestkeybd, FALSE); DisableDevice(keybd, FALSE); DisableDevice(ptr, FALSE); flags[XTestptr->id] |= XIDeviceDisabled | XISlaveDetached; flags[XTestkeybd->id] |= XIDeviceDisabled | XISlaveDetached; flags[keybd->id] |= XIDeviceDisabled; flags[ptr->id] |= XIDeviceDisabled; flags[XTestptr->id] |= XISlaveRemoved; flags[XTestkeybd->id] |= XISlaveRemoved; flags[keybd->id] |= XIMasterRemoved; flags[ptr->id] |= XIMasterRemoved; RemoveDevice(XTestptr, FALSE); RemoveDevice(XTestkeybd, FALSE); RemoveDevice(keybd, FALSE); RemoveDevice(ptr, FALSE); unwind: return rc; } static int detach_slave(ClientPtr client, xXIDetachSlaveInfo * c, int flags[MAXDEVICES]) { DeviceIntPtr dev; int rc; rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess); if (rc != Success) goto unwind; if (IsMaster(dev)) { client->errorValue = c->deviceid; rc = BadDevice; goto unwind; } /* Don't allow changes to XTest Devices, these are fixed */ if (IsXTestDevice(dev, NULL)) { client->errorValue = c->deviceid; rc = BadDevice; goto unwind; } ReleaseButtonsAndKeys(dev); AttachDevice(client, dev, NULL); flags[dev->id] |= XISlaveDetached; unwind: return rc; } static int attach_slave(ClientPtr client, xXIAttachSlaveInfo * c, int flags[MAXDEVICES]) { DeviceIntPtr dev; DeviceIntPtr newmaster; int rc; rc = dixLookupDevice(&dev, c->deviceid, client, DixManageAccess); if (rc != Success) goto unwind; if (IsMaster(dev)) { client->errorValue = c->deviceid; rc = BadDevice; goto unwind; } /* Don't allow changes to XTest Devices, these are fixed */ if (IsXTestDevice(dev, NULL)) { client->errorValue = c->deviceid; rc = BadDevice; goto unwind; } rc = dixLookupDevice(&newmaster, c->new_master, client, DixAddAccess); if (rc != Success) goto unwind; if (!IsMaster(newmaster)) { client->errorValue = c->new_master; rc = BadDevice; goto unwind; } if (!((IsPointerDevice(newmaster) && IsPointerDevice(dev)) || (IsKeyboardDevice(newmaster) && IsKeyboardDevice(dev)))) { rc = BadDevice; goto unwind; } ReleaseButtonsAndKeys(dev); AttachDevice(client, dev, newmaster); flags[dev->id] |= XISlaveAttached; unwind: return rc; } #define SWAPIF(cmd) if (client->swapped) { cmd; } int ProcXIChangeHierarchy(ClientPtr client) { xXIAnyHierarchyChangeInfo *any; size_t len; /* length of data remaining in request */ int rc = Success; int flags[MAXDEVICES] = { 0 }; enum { NO_CHANGE, FLUSH, CHANGED, } changes = NO_CHANGE; REQUEST(xXIChangeHierarchyReq); REQUEST_AT_LEAST_SIZE(xXIChangeHierarchyReq); if (!stuff->num_changes) return rc; len = ((size_t)client->req_len << 2) - sizeof(xXIChangeHierarchyReq); any = (xXIAnyHierarchyChangeInfo *) &stuff[1]; while (stuff->num_changes--) { if (len < sizeof(xXIAnyHierarchyChangeInfo)) { rc = BadLength; goto unwind; } SWAPIF(swaps(&any->type)); SWAPIF(swaps(&any->length)); if (len < ((size_t)any->length << 2)) return BadLength; #define CHANGE_SIZE_MATCH(type) \ do { \ if ((len < sizeof(type)) || (any->length != (sizeof(type) >> 2))) { \ rc = BadLength; \ goto unwind; \ } \ } while(0) switch (any->type) { case XIAddMaster: { xXIAddMasterInfo *c = (xXIAddMasterInfo *) any; /* Variable length, due to appended name string */ if (len < sizeof(xXIAddMasterInfo)) { rc = BadLength; goto unwind; } SWAPIF(swaps(&c->name_len)); if (c->name_len > (len - sizeof(xXIAddMasterInfo))) { rc = BadLength; goto unwind; } rc = add_master(client, c, flags); if (rc != Success) goto unwind; changes = FLUSH; break; } case XIRemoveMaster: { xXIRemoveMasterInfo *r = (xXIRemoveMasterInfo *) any; CHANGE_SIZE_MATCH(xXIRemoveMasterInfo); rc = remove_master(client, r, flags); if (rc != Success) goto unwind; changes = FLUSH; break; } case XIDetachSlave: { xXIDetachSlaveInfo *c = (xXIDetachSlaveInfo *) any; CHANGE_SIZE_MATCH(xXIDetachSlaveInfo); rc = detach_slave(client, c, flags); if (rc != Success) goto unwind; changes = CHANGED; break; } case XIAttachSlave: { xXIAttachSlaveInfo *c = (xXIAttachSlaveInfo *) any; CHANGE_SIZE_MATCH(xXIAttachSlaveInfo); rc = attach_slave(client, c, flags); if (rc != Success) goto unwind; changes = CHANGED; break; } default: break; } if (changes == FLUSH) { XISendDeviceHierarchyEvent(flags); memset(flags, 0, sizeof(flags)); changes = NO_CHANGE; } len -= any->length * 4; any = (xXIAnyHierarchyChangeInfo *) ((char *) any + any->length * 4); } unwind: if (changes != NO_CHANGE) XISendDeviceHierarchyEvent(flags); return rc; } xorg-server-21.1.16/Xi/xichangehierarchy.h0000644000175000017500000000317714757411105014061 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request change in the device hierarchy. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef CHDEVHIER_H #define CHDEVHIER_H 1 int SProcXIChangeHierarchy(ClientPtr /* client */ ); int ProcXIChangeHierarchy(ClientPtr /* client */ ); void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]); #endif /* CHDEVHIER_H */ xorg-server-21.1.16/Xi/xigetclientpointer.c0000644000175000017500000000661314757411105014305 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" #include "xigetclientpointer.h" /*********************************************************************** * This procedure allows a client to query another client's client pointer * setting. */ int _X_COLD SProcXIGetClientPointer(ClientPtr client) { REQUEST(xXIGetClientPointerReq); REQUEST_SIZE_MATCH(xXIGetClientPointerReq); swaps(&stuff->length); swapl(&stuff->win); return ProcXIGetClientPointer(client); } int ProcXIGetClientPointer(ClientPtr client) { int rc; ClientPtr winclient; xXIGetClientPointerReply rep; REQUEST(xXIGetClientPointerReq); REQUEST_SIZE_MATCH(xXIGetClientPointerReq); if (stuff->win != None) { rc = dixLookupClient(&winclient, stuff->win, client, DixGetAttrAccess); if (rc != Success) return BadWindow; } else winclient = client; rep = (xXIGetClientPointerReply) { .repType = X_Reply, .RepType = X_XIGetClientPointer, .sequenceNumber = client->sequence, .length = 0, .set = (winclient->clientPtr != NULL), .deviceid = (winclient->clientPtr) ? winclient->clientPtr->id : 0 }; WriteReplyToClient(client, sizeof(xXIGetClientPointerReply), &rep); return Success; } /*********************************************************************** * * This procedure writes the reply for the XGetClientPointer function, * if the client and server have a different byte ordering. * */ void _X_COLD SRepXIGetClientPointer(ClientPtr client, int size, xXIGetClientPointerReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->deviceid); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/xigetclientpointer.h0000644000175000017500000000315014757411105014303 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef GETCPTR_H #define GETCPTR_H 1 int SProcXIGetClientPointer(ClientPtr /* client */ ); int ProcXIGetClientPointer(ClientPtr /* client */ ); void SRepXIGetClientPointer(ClientPtr /* client */ , int /* size */ , xXIGetClientPointerReply * /* rep */ ); #endif /* GETCPTR_H */ xorg-server-21.1.16/Xi/xigrabdev.c0000644000175000017500000001211314757411105012330 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ /*********************************************************************** * * Request to grab or ungrab input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exglobals.h" /* BadDevice */ #include "exevents.h" #include "xigrabdev.h" #include "inpututils.h" int _X_COLD SProcXIGrabDevice(ClientPtr client) { REQUEST(xXIGrabDeviceReq); /* * Check here for at least the length of the struct we swap, then * let ProcXIGrabDevice check the full size after we swap mask_len. */ REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->grab_window); swapl(&stuff->cursor); swapl(&stuff->time); swaps(&stuff->mask_len); return ProcXIGrabDevice(client); } int ProcXIGrabDevice(ClientPtr client) { DeviceIntPtr dev; xXIGrabDeviceReply rep; int ret = Success; uint8_t status; GrabMask mask = { 0 }; int mask_len; unsigned int keyboard_mode; unsigned int pointer_mode; REQUEST(xXIGrabDeviceReq); REQUEST_FIXED_SIZE(xXIGrabDeviceReq, ((size_t) stuff->mask_len) * 4); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); if (ret != Success) return ret; if (!IsMaster(dev)) stuff->paired_device_mode = GrabModeAsync; if (IsKeyboardDevice(dev)) { keyboard_mode = stuff->grab_mode; pointer_mode = stuff->paired_device_mode; } else { keyboard_mode = stuff->paired_device_mode; pointer_mode = stuff->grab_mode; } if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1], stuff->mask_len * 4) != Success) return BadValue; mask.xi2mask = xi2mask_new(); if (!mask.xi2mask) return BadAlloc; mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4); /* FIXME: I think the old code was broken here */ xi2mask_set_one_mask(mask.xi2mask, dev->id, (unsigned char *) &stuff[1], mask_len); ret = GrabDevice(client, dev, pointer_mode, keyboard_mode, stuff->grab_window, stuff->owner_events, stuff->time, &mask, XI2, stuff->cursor, None /* confineTo */ , &status); xi2mask_free(&mask.xi2mask); if (ret != Success) return ret; rep = (xXIGrabDeviceReply) { .repType = X_Reply, .RepType = X_XIGrabDevice, .sequenceNumber = client->sequence, .length = 0, .status = status }; WriteReplyToClient(client, sizeof(rep), &rep); return ret; } int _X_COLD SProcXIUngrabDevice(ClientPtr client) { REQUEST(xXIUngrabDeviceReq); REQUEST_SIZE_MATCH(xXIUngrabDeviceReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->time); return ProcXIUngrabDevice(client); } int ProcXIUngrabDevice(ClientPtr client) { DeviceIntPtr dev; GrabPtr grab; int ret = Success; TimeStamp time; REQUEST(xXIUngrabDeviceReq); REQUEST_SIZE_MATCH(xXIUngrabDeviceReq); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (ret != Success) return ret; grab = dev->deviceGrab.grab; time = ClientTimeToServerTime(stuff->time); if ((CompareTimeStamps(time, currentTime) != LATER) && (CompareTimeStamps(time, dev->deviceGrab.grabTime) != EARLIER) && (grab) && SameClient(grab, client) && grab->grabtype == XI2) (*dev->deviceGrab.DeactivateGrab) (dev); return Success; } void _X_COLD SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/xigrabdev.h0000644000175000017500000000305214757411105012337 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XIGRABDEV_H #define XIGRABDEV_H 1 int ProcXIGrabDevice(ClientPtr client); int SProcXIGrabDevice(ClientPtr client); int ProcXIUngrabDevice(ClientPtr client); int SProcXIUngrabDevice(ClientPtr client); void SRepXIGrabDevice(ClientPtr client, int size, xXIGrabDeviceReply * rep); #endif /* XIGRABDEV_H */ xorg-server-21.1.16/Xi/xipassivegrab.h0000644000175000017500000000317314757411105013237 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XIPASSIVEGRAB_H #define XIPASSIVEGRAB_H 1 int SProcXIPassiveUngrabDevice(ClientPtr client); int ProcXIPassiveUngrabDevice(ClientPtr client); void SRepXIPassiveGrabDevice(ClientPtr client, int size, xXIPassiveGrabDeviceReply * rep); int ProcXIPassiveGrabDevice(ClientPtr client); int SProcXIPassiveGrabDevice(ClientPtr client); #endif /* XIPASSIVEGRAB_H */ xorg-server-21.1.16/Xi/xipassivegrab.c0000644000175000017500000003023214757411105013226 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ /*********************************************************************** * * Request to grab or ungrab input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "swaprep.h" #include "exglobals.h" /* BadDevice */ #include "exevents.h" #include "xipassivegrab.h" #include "dixgrabs.h" #include "misc.h" #include "inpututils.h" int _X_COLD SProcXIPassiveGrabDevice(ClientPtr client) { int i; uint32_t *mods; REQUEST(xXIPassiveGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->grab_window); swapl(&stuff->cursor); swapl(&stuff->time); swapl(&stuff->detail); swaps(&stuff->mask_len); swaps(&stuff->num_modifiers); REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq, ((uint32_t) stuff->mask_len + stuff->num_modifiers) *4); mods = (uint32_t *) &stuff[1] + stuff->mask_len; for (i = 0; i < stuff->num_modifiers; i++, mods++) { swapl(mods); } return ProcXIPassiveGrabDevice(client); } int ProcXIPassiveGrabDevice(ClientPtr client) { DeviceIntPtr dev, mod_dev; xXIPassiveGrabDeviceReply rep = { .repType = X_Reply, .RepType = X_XIPassiveGrabDevice, .sequenceNumber = client->sequence, .length = 0, .num_modifiers = 0 }; int i, ret = Success; uint32_t *modifiers; xXIGrabModifierInfo *modifiers_failed = NULL; GrabMask mask = { 0 }; GrabParameters param; void *tmp; int mask_len; uint32_t length; REQUEST(xXIPassiveGrabDeviceReq); REQUEST_FIXED_SIZE(xXIPassiveGrabDeviceReq, ((uint32_t) stuff->mask_len + stuff->num_modifiers) * 4); if (stuff->deviceid == XIAllDevices) dev = inputInfo.all_devices; else if (stuff->deviceid == XIAllMasterDevices) dev = inputInfo.all_master_devices; else { ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); if (ret != Success) { client->errorValue = stuff->deviceid; return ret; } } if (stuff->grab_type != XIGrabtypeButton && stuff->grab_type != XIGrabtypeKeycode && stuff->grab_type != XIGrabtypeEnter && stuff->grab_type != XIGrabtypeFocusIn && stuff->grab_type != XIGrabtypeTouchBegin && stuff->grab_type != XIGrabtypeGesturePinchBegin && stuff->grab_type != XIGrabtypeGestureSwipeBegin) { client->errorValue = stuff->grab_type; return BadValue; } if ((stuff->grab_type == XIGrabtypeEnter || stuff->grab_type == XIGrabtypeFocusIn || stuff->grab_type == XIGrabtypeTouchBegin || stuff->grab_type == XIGrabtypeGesturePinchBegin || stuff->grab_type == XIGrabtypeGestureSwipeBegin) && stuff->detail != 0) { client->errorValue = stuff->detail; return BadValue; } if (stuff->grab_type == XIGrabtypeTouchBegin && (stuff->grab_mode != XIGrabModeTouch || stuff->paired_device_mode != GrabModeAsync)) { client->errorValue = stuff->grab_mode; return BadValue; } /* XI2 allows 32-bit keycodes but thanks to XKB we can never * implement this. Just return an error for all keycodes that * cannot work anyway, same for buttons > 255. */ if (stuff->detail > 255) return XIAlreadyGrabbed; if (XICheckInvalidMaskBits(client, (unsigned char *) &stuff[1], stuff->mask_len * 4) != Success) return BadValue; mask.xi2mask = xi2mask_new(); if (!mask.xi2mask) return BadAlloc; mask_len = min(xi2mask_mask_size(mask.xi2mask), stuff->mask_len * 4); xi2mask_set_one_mask(mask.xi2mask, stuff->deviceid, (unsigned char *) &stuff[1], mask_len * 4); memset(¶m, 0, sizeof(param)); param.grabtype = XI2; param.ownerEvents = stuff->owner_events; param.grabWindow = stuff->grab_window; param.cursor = stuff->cursor; if (IsKeyboardDevice(dev)) { param.this_device_mode = stuff->grab_mode; param.other_devices_mode = stuff->paired_device_mode; } else { param.this_device_mode = stuff->paired_device_mode; param.other_devices_mode = stuff->grab_mode; } if (stuff->cursor != None) { ret = dixLookupResourceByType(&tmp, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (ret != Success) { client->errorValue = stuff->cursor; goto out; } } ret = dixLookupWindow((WindowPtr *) &tmp, stuff->grab_window, client, DixSetAttrAccess); if (ret != Success) goto out; ret = CheckGrabValues(client, ¶m); if (ret != Success) goto out; modifiers = (uint32_t *) &stuff[1] + stuff->mask_len; modifiers_failed = calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); if (!modifiers_failed) { ret = BadAlloc; goto out; } mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { uint8_t status = Success; param.modifiers = *modifiers; ret = CheckGrabValues(client, ¶m); if (ret != Success) goto out; switch (stuff->grab_type) { case XIGrabtypeButton: status = GrabButton(client, dev, mod_dev, stuff->detail, ¶m, XI2, &mask); break; case XIGrabtypeKeycode: status = GrabKey(client, dev, mod_dev, stuff->detail, ¶m, XI2, &mask); break; case XIGrabtypeEnter: case XIGrabtypeFocusIn: status = GrabWindow(client, dev, stuff->grab_type, ¶m, &mask); break; case XIGrabtypeTouchBegin: status = GrabTouchOrGesture(client, dev, mod_dev, XI_TouchBegin, ¶m, &mask); break; case XIGrabtypeGesturePinchBegin: status = GrabTouchOrGesture(client, dev, mod_dev, XI_GesturePinchBegin, ¶m, &mask); break; case XIGrabtypeGestureSwipeBegin: status = GrabTouchOrGesture(client, dev, mod_dev, XI_GestureSwipeBegin, ¶m, &mask); break; } if (status != GrabSuccess) { xXIGrabModifierInfo *info = modifiers_failed + rep.num_modifiers; info->status = status; info->modifiers = *modifiers; if (client->swapped) swapl(&info->modifiers); rep.num_modifiers++; rep.length += bytes_to_int32(sizeof(xXIGrabModifierInfo)); } } /* save the value before SRepXIPassiveGrabDevice swaps it */ length = rep.length; WriteReplyToClient(client, sizeof(rep), &rep); if (rep.num_modifiers) WriteToClient(client, length * 4, modifiers_failed); out: free(modifiers_failed); xi2mask_free(&mask.xi2mask); return ret; } void _X_COLD SRepXIPassiveGrabDevice(ClientPtr client, int size, xXIPassiveGrabDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_modifiers); WriteToClient(client, size, rep); } int _X_COLD SProcXIPassiveUngrabDevice(ClientPtr client) { int i; uint32_t *modifiers; REQUEST(xXIPassiveUngrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); swaps(&stuff->length); swapl(&stuff->grab_window); swaps(&stuff->deviceid); swapl(&stuff->detail); swaps(&stuff->num_modifiers); REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq, ((uint32_t) stuff->num_modifiers) << 2); modifiers = (uint32_t *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, modifiers++) swapl(modifiers); return ProcXIPassiveUngrabDevice(client); } int ProcXIPassiveUngrabDevice(ClientPtr client) { DeviceIntPtr dev, mod_dev; WindowPtr win; GrabPtr tempGrab; uint32_t *modifiers; int i, rc; REQUEST(xXIPassiveUngrabDeviceReq); REQUEST_FIXED_SIZE(xXIPassiveUngrabDeviceReq, ((uint32_t) stuff->num_modifiers) << 2); if (stuff->deviceid == XIAllDevices) dev = inputInfo.all_devices; else if (stuff->deviceid == XIAllMasterDevices) dev = inputInfo.all_master_devices; else { rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); if (rc != Success) return rc; } if (stuff->grab_type != XIGrabtypeButton && stuff->grab_type != XIGrabtypeKeycode && stuff->grab_type != XIGrabtypeEnter && stuff->grab_type != XIGrabtypeFocusIn && stuff->grab_type != XIGrabtypeTouchBegin && stuff->grab_type != XIGrabtypeGesturePinchBegin && stuff->grab_type != XIGrabtypeGestureSwipeBegin) { client->errorValue = stuff->grab_type; return BadValue; } if ((stuff->grab_type == XIGrabtypeEnter || stuff->grab_type == XIGrabtypeFocusIn || stuff->grab_type == XIGrabtypeTouchBegin) && stuff->detail != 0) { client->errorValue = stuff->detail; return BadValue; } /* We don't allow passive grabs for details > 255 anyway */ if (stuff->detail > 255) { client->errorValue = stuff->detail; return BadValue; } rc = dixLookupWindow(&win, stuff->grab_window, client, DixSetAttrAccess); if (rc != Success) return rc; mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); tempGrab = AllocGrab(NULL); if (!tempGrab) return BadAlloc; tempGrab->resource = client->clientAsMask; tempGrab->device = dev; tempGrab->window = win; switch (stuff->grab_type) { case XIGrabtypeButton: tempGrab->type = XI_ButtonPress; break; case XIGrabtypeKeycode: tempGrab->type = XI_KeyPress; break; case XIGrabtypeEnter: tempGrab->type = XI_Enter; break; case XIGrabtypeFocusIn: tempGrab->type = XI_FocusIn; break; case XIGrabtypeTouchBegin: tempGrab->type = XI_TouchBegin; break; case XIGrabtypeGesturePinchBegin: tempGrab->type = XI_GesturePinchBegin; break; case XIGrabtypeGestureSwipeBegin: tempGrab->type = XI_GestureSwipeBegin; break; } tempGrab->grabtype = XI2; tempGrab->modifierDevice = mod_dev; tempGrab->modifiersDetail.pMask = NULL; tempGrab->detail.exact = stuff->detail; tempGrab->detail.pMask = NULL; modifiers = (uint32_t *) &stuff[1]; for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { tempGrab->modifiersDetail.exact = *modifiers; DeletePassiveGrabFromList(tempGrab); } FreeGrab(tempGrab); return Success; } xorg-server-21.1.16/Xi/xiproperty.c0000644000175000017500000011135314757411105012610 /* * Copyright © 2006 Keith Packard * Copyright © 2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WAXIANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WAXIANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS 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. * */ /* This code is a modified version of randr/rrproperty.c */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "dix.h" #include "inputstr.h" #include #include #include #include #include "exglobals.h" #include "exevents.h" #include "swaprep.h" #include "xiproperty.h" #include "xserver-properties.h" /** * Properties used or alloced from inside the server. */ static struct dev_properties { Atom type; const char *name; } dev_properties[] = { {0, XI_PROP_ENABLED}, {0, XI_PROP_XTEST_DEVICE}, {0, XATOM_FLOAT}, {0, ACCEL_PROP_PROFILE_NUMBER}, {0, ACCEL_PROP_CONSTANT_DECELERATION}, {0, ACCEL_PROP_ADAPTIVE_DECELERATION}, {0, ACCEL_PROP_VELOCITY_SCALING}, {0, AXIS_LABEL_PROP}, {0, AXIS_LABEL_PROP_REL_X}, {0, AXIS_LABEL_PROP_REL_Y}, {0, AXIS_LABEL_PROP_REL_Z}, {0, AXIS_LABEL_PROP_REL_RX}, {0, AXIS_LABEL_PROP_REL_RY}, {0, AXIS_LABEL_PROP_REL_RZ}, {0, AXIS_LABEL_PROP_REL_HWHEEL}, {0, AXIS_LABEL_PROP_REL_DIAL}, {0, AXIS_LABEL_PROP_REL_WHEEL}, {0, AXIS_LABEL_PROP_REL_MISC}, {0, AXIS_LABEL_PROP_REL_VSCROLL}, {0, AXIS_LABEL_PROP_REL_HSCROLL}, {0, AXIS_LABEL_PROP_ABS_X}, {0, AXIS_LABEL_PROP_ABS_Y}, {0, AXIS_LABEL_PROP_ABS_Z}, {0, AXIS_LABEL_PROP_ABS_RX}, {0, AXIS_LABEL_PROP_ABS_RY}, {0, AXIS_LABEL_PROP_ABS_RZ}, {0, AXIS_LABEL_PROP_ABS_THROTTLE}, {0, AXIS_LABEL_PROP_ABS_RUDDER}, {0, AXIS_LABEL_PROP_ABS_WHEEL}, {0, AXIS_LABEL_PROP_ABS_GAS}, {0, AXIS_LABEL_PROP_ABS_BRAKE}, {0, AXIS_LABEL_PROP_ABS_HAT0X}, {0, AXIS_LABEL_PROP_ABS_HAT0Y}, {0, AXIS_LABEL_PROP_ABS_HAT1X}, {0, AXIS_LABEL_PROP_ABS_HAT1Y}, {0, AXIS_LABEL_PROP_ABS_HAT2X}, {0, AXIS_LABEL_PROP_ABS_HAT2Y}, {0, AXIS_LABEL_PROP_ABS_HAT3X}, {0, AXIS_LABEL_PROP_ABS_HAT3Y}, {0, AXIS_LABEL_PROP_ABS_PRESSURE}, {0, AXIS_LABEL_PROP_ABS_DISTANCE}, {0, AXIS_LABEL_PROP_ABS_TILT_X}, {0, AXIS_LABEL_PROP_ABS_TILT_Y}, {0, AXIS_LABEL_PROP_ABS_TOOL_WIDTH}, {0, AXIS_LABEL_PROP_ABS_VOLUME}, {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MAJOR}, {0, AXIS_LABEL_PROP_ABS_MT_TOUCH_MINOR}, {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MAJOR}, {0, AXIS_LABEL_PROP_ABS_MT_WIDTH_MINOR}, {0, AXIS_LABEL_PROP_ABS_MT_ORIENTATION}, {0, AXIS_LABEL_PROP_ABS_MT_POSITION_X}, {0, AXIS_LABEL_PROP_ABS_MT_POSITION_Y}, {0, AXIS_LABEL_PROP_ABS_MT_TOOL_TYPE}, {0, AXIS_LABEL_PROP_ABS_MT_BLOB_ID}, {0, AXIS_LABEL_PROP_ABS_MT_TRACKING_ID}, {0, AXIS_LABEL_PROP_ABS_MT_PRESSURE}, {0, AXIS_LABEL_PROP_ABS_MT_DISTANCE}, {0, AXIS_LABEL_PROP_ABS_MT_TOOL_X}, {0, AXIS_LABEL_PROP_ABS_MT_TOOL_Y}, {0, AXIS_LABEL_PROP_ABS_MISC}, {0, BTN_LABEL_PROP}, {0, BTN_LABEL_PROP_BTN_UNKNOWN}, {0, BTN_LABEL_PROP_BTN_WHEEL_UP}, {0, BTN_LABEL_PROP_BTN_WHEEL_DOWN}, {0, BTN_LABEL_PROP_BTN_HWHEEL_LEFT}, {0, BTN_LABEL_PROP_BTN_HWHEEL_RIGHT}, {0, BTN_LABEL_PROP_BTN_0}, {0, BTN_LABEL_PROP_BTN_1}, {0, BTN_LABEL_PROP_BTN_2}, {0, BTN_LABEL_PROP_BTN_3}, {0, BTN_LABEL_PROP_BTN_4}, {0, BTN_LABEL_PROP_BTN_5}, {0, BTN_LABEL_PROP_BTN_6}, {0, BTN_LABEL_PROP_BTN_7}, {0, BTN_LABEL_PROP_BTN_8}, {0, BTN_LABEL_PROP_BTN_9}, {0, BTN_LABEL_PROP_BTN_LEFT}, {0, BTN_LABEL_PROP_BTN_RIGHT}, {0, BTN_LABEL_PROP_BTN_MIDDLE}, {0, BTN_LABEL_PROP_BTN_SIDE}, {0, BTN_LABEL_PROP_BTN_EXTRA}, {0, BTN_LABEL_PROP_BTN_FORWARD}, {0, BTN_LABEL_PROP_BTN_BACK}, {0, BTN_LABEL_PROP_BTN_TASK}, {0, BTN_LABEL_PROP_BTN_TRIGGER}, {0, BTN_LABEL_PROP_BTN_THUMB}, {0, BTN_LABEL_PROP_BTN_THUMB2}, {0, BTN_LABEL_PROP_BTN_TOP}, {0, BTN_LABEL_PROP_BTN_TOP2}, {0, BTN_LABEL_PROP_BTN_PINKIE}, {0, BTN_LABEL_PROP_BTN_BASE}, {0, BTN_LABEL_PROP_BTN_BASE2}, {0, BTN_LABEL_PROP_BTN_BASE3}, {0, BTN_LABEL_PROP_BTN_BASE4}, {0, BTN_LABEL_PROP_BTN_BASE5}, {0, BTN_LABEL_PROP_BTN_BASE6}, {0, BTN_LABEL_PROP_BTN_DEAD}, {0, BTN_LABEL_PROP_BTN_A}, {0, BTN_LABEL_PROP_BTN_B}, {0, BTN_LABEL_PROP_BTN_C}, {0, BTN_LABEL_PROP_BTN_X}, {0, BTN_LABEL_PROP_BTN_Y}, {0, BTN_LABEL_PROP_BTN_Z}, {0, BTN_LABEL_PROP_BTN_TL}, {0, BTN_LABEL_PROP_BTN_TR}, {0, BTN_LABEL_PROP_BTN_TL2}, {0, BTN_LABEL_PROP_BTN_TR2}, {0, BTN_LABEL_PROP_BTN_SELECT}, {0, BTN_LABEL_PROP_BTN_START}, {0, BTN_LABEL_PROP_BTN_MODE}, {0, BTN_LABEL_PROP_BTN_THUMBL}, {0, BTN_LABEL_PROP_BTN_THUMBR}, {0, BTN_LABEL_PROP_BTN_TOOL_PEN}, {0, BTN_LABEL_PROP_BTN_TOOL_RUBBER}, {0, BTN_LABEL_PROP_BTN_TOOL_BRUSH}, {0, BTN_LABEL_PROP_BTN_TOOL_PENCIL}, {0, BTN_LABEL_PROP_BTN_TOOL_AIRBRUSH}, {0, BTN_LABEL_PROP_BTN_TOOL_FINGER}, {0, BTN_LABEL_PROP_BTN_TOOL_MOUSE}, {0, BTN_LABEL_PROP_BTN_TOOL_LENS}, {0, BTN_LABEL_PROP_BTN_TOUCH}, {0, BTN_LABEL_PROP_BTN_STYLUS}, {0, BTN_LABEL_PROP_BTN_STYLUS2}, {0, BTN_LABEL_PROP_BTN_TOOL_DOUBLETAP}, {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, {0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, {0, BTN_LABEL_PROP_BTN_GEAR_UP}, {0, XI_PROP_TRANSFORM} }; static long XIPropHandlerID = 1; static void send_property_event(DeviceIntPtr dev, Atom property, int what) { int state = (what == XIPropertyDeleted) ? PropertyDelete : PropertyNewValue; devicePropertyNotify event = { .type = DevicePropertyNotify, .deviceid = dev->id, .state = state, .atom = property, .time = currentTime.milliseconds }; xXIPropertyEvent xi2 = { .type = GenericEvent, .extension = IReqCode, .length = 0, .evtype = XI_PropertyEvent, .deviceid = dev->id, .time = currentTime.milliseconds, .property = property, .what = what }; SendEventToAllWindows(dev, DevicePropertyNotifyMask, (xEvent *) &event, 1); SendEventToAllWindows(dev, GetEventFilter(dev, (xEvent *) &xi2), (xEvent *) &xi2, 1); } static int list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) { XIPropertyPtr prop; Atom *atoms = NULL; int nprops = 0; for (prop = dev->properties.properties; prop; prop = prop->next) nprops++; if (nprops) { Atom *a; atoms = xallocarray(nprops, sizeof(Atom)); if (!atoms) return BadAlloc; a = atoms; for (prop = dev->properties.properties; prop; prop = prop->next, a++) *a = prop->propertyName; } *natoms = nprops; *atoms_return = atoms; return Success; } static int get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, BOOL delete, int offset, int length, int *bytes_after, Atom *type_return, int *format, int *nitems, int *length_return, char **data) { unsigned long n, len, ind; int rc; XIPropertyPtr prop; XIPropertyValuePtr prop_value; if (!ValidAtom(property)) { client->errorValue = property; return BadAtom; } if ((delete != xTrue) && (delete != xFalse)) { client->errorValue = delete; return BadValue; } if ((type != AnyPropertyType) && !ValidAtom(type)) { client->errorValue = type; return BadAtom; } for (prop = dev->properties.properties; prop; prop = prop->next) if (prop->propertyName == property) break; if (!prop) { *bytes_after = 0; *type_return = None; *format = 0; *nitems = 0; *length_return = 0; return Success; } rc = XIGetDeviceProperty(dev, property, &prop_value); if (rc != Success) { client->errorValue = property; return rc; } /* If the request type and actual type don't match. Return the property information, but not the data. */ if (((type != prop_value->type) && (type != AnyPropertyType))) { *bytes_after = prop_value->size; *format = prop_value->format; *length_return = 0; *nitems = 0; *type_return = prop_value->type; return Success; } /* Return type, format, value to client */ n = (prop_value->format / 8) * prop_value->size; /* size (bytes) of prop */ ind = offset << 2; /* If offset is invalid such that it causes "len" to be negative, it's a value error. */ if (n < ind) { client->errorValue = offset; return BadValue; } len = min(n - ind, 4 * length); *bytes_after = n - (ind + len); *format = prop_value->format; *length_return = len; if (prop_value->format) *nitems = len / (prop_value->format / 8); else *nitems = 0; *type_return = prop_value->type; *data = (char *) prop_value->data + ind; return Success; } static int check_change_property(ClientPtr client, Atom property, Atom type, int format, int mode, int nitems) { if ((mode != PropModeReplace) && (mode != PropModeAppend) && (mode != PropModePrepend)) { client->errorValue = mode; return BadValue; } if ((format != 8) && (format != 16) && (format != 32)) { client->errorValue = format; return BadValue; } if (!ValidAtom(property)) { client->errorValue = property; return BadAtom; } if (!ValidAtom(type)) { client->errorValue = type; return BadAtom; } return Success; } static int change_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, int format, int mode, int len, void *data) { int rc = Success; rc = XIChangeDeviceProperty(dev, property, type, format, mode, len, data, TRUE); if (rc != Success) client->errorValue = property; return rc; } /** * Return the atom assigned to the specified string or 0 if the atom isn't known * to the DIX. * * If name is NULL, None is returned. */ Atom XIGetKnownProperty(const char *name) { int i; if (!name) return None; for (i = 0; i < ARRAY_SIZE(dev_properties); i++) { if (strcmp(name, dev_properties[i].name) == 0) { if (dev_properties[i].type == None) { dev_properties[i].type = MakeAtom(dev_properties[i].name, strlen(dev_properties[i].name), TRUE); } return dev_properties[i].type; } } return 0; } void XIResetProperties(void) { int i; for (i = 0; i < ARRAY_SIZE(dev_properties); i++) dev_properties[i].type = None; } /** * Convert the given property's value(s) into @nelem_return integer values and * store them in @buf_return. If @nelem_return is larger than the number of * values in the property, @nelem_return is set to the number of values in the * property. * * If *@buf_return is NULL and @nelem_return is 0, memory is allocated * automatically and must be freed by the caller. * * Possible return codes. * Success ... No error. * BadMatch ... Wrong atom type, atom is not XA_INTEGER * BadAlloc ... NULL passed as buffer and allocation failed. * BadLength ... @buff is NULL but @nelem_return is non-zero. * * @param val The property value * @param nelem_return The maximum number of elements to return. * @param buf_return Pointer to an array of at least @nelem_return values. * @return Success or the error code if an error occurred. */ _X_EXPORT int XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return) { int i; int *buf; if (val->type != XA_INTEGER) return BadMatch; if (!*buf_return && *nelem_return) return BadLength; switch (val->format) { case 8: case 16: case 32: break; default: return BadValue; } buf = *buf_return; if (!buf && !(*nelem_return)) { buf = calloc(val->size, sizeof(int)); if (!buf) return BadAlloc; *buf_return = buf; *nelem_return = val->size; } else if (val->size < *nelem_return) *nelem_return = val->size; for (i = 0; i < val->size && i < *nelem_return; i++) { switch (val->format) { case 8: buf[i] = ((CARD8 *) val->data)[i]; break; case 16: buf[i] = ((CARD16 *) val->data)[i]; break; case 32: buf[i] = ((CARD32 *) val->data)[i]; break; } } return Success; } /** * Convert the given property's value(s) into @nelem_return float values and * store them in @buf_return. If @nelem_return is larger than the number of * values in the property, @nelem_return is set to the number of values in the * property. * * If *@buf_return is NULL and @nelem_return is 0, memory is allocated * automatically and must be freed by the caller. * * Possible errors returned: * Success * BadMatch ... Wrong atom type, atom is not XA_FLOAT * BadValue ... Wrong format, format is not 32 * BadAlloc ... NULL passed as buffer and allocation failed. * BadLength ... @buff is NULL but @nelem_return is non-zero. * * @param val The property value * @param nelem_return The maximum number of elements to return. * @param buf_return Pointer to an array of at least @nelem_return values. * @return Success or the error code if an error occurred. */ _X_EXPORT int XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return) { int i; float *buf; if (!val->type || val->type != XIGetKnownProperty(XATOM_FLOAT)) return BadMatch; if (val->format != 32) return BadValue; if (!*buf_return && *nelem_return) return BadLength; buf = *buf_return; if (!buf && !(*nelem_return)) { buf = calloc(val->size, sizeof(float)); if (!buf) return BadAlloc; *buf_return = buf; *nelem_return = val->size; } else if (val->size < *nelem_return) *nelem_return = val->size; for (i = 0; i < val->size && i < *nelem_return; i++) buf[i] = ((float *) val->data)[i]; return Success; } /* Registers a new property handler on the given device and returns a unique * identifier for this handler. This identifier is required to unregister the * property handler again. * @return The handler's identifier or 0 if an error occurred. */ long XIRegisterPropertyHandler(DeviceIntPtr dev, int (*SetProperty) (DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, BOOL checkonly), int (*GetProperty) (DeviceIntPtr dev, Atom property), int (*DeleteProperty) (DeviceIntPtr dev, Atom property)) { XIPropertyHandlerPtr new_handler; new_handler = calloc(1, sizeof(XIPropertyHandler)); if (!new_handler) return 0; new_handler->id = XIPropHandlerID++; new_handler->SetProperty = SetProperty; new_handler->GetProperty = GetProperty; new_handler->DeleteProperty = DeleteProperty; new_handler->next = dev->properties.handlers; dev->properties.handlers = new_handler; return new_handler->id; } void XIUnregisterPropertyHandler(DeviceIntPtr dev, long id) { XIPropertyHandlerPtr curr, prev = NULL; curr = dev->properties.handlers; while (curr && curr->id != id) { prev = curr; curr = curr->next; } if (!curr) return; if (!prev) /* first one */ dev->properties.handlers = curr->next; else prev->next = curr->next; free(curr); } static XIPropertyPtr XICreateDeviceProperty(Atom property) { XIPropertyPtr prop; prop = (XIPropertyPtr) malloc(sizeof(XIPropertyRec)); if (!prop) return NULL; prop->next = NULL; prop->propertyName = property; prop->value.type = None; prop->value.format = 0; prop->value.size = 0; prop->value.data = NULL; prop->deletable = TRUE; return prop; } static XIPropertyPtr XIFetchDeviceProperty(DeviceIntPtr dev, Atom property) { XIPropertyPtr prop; for (prop = dev->properties.properties; prop; prop = prop->next) if (prop->propertyName == property) return prop; return NULL; } static void XIDestroyDeviceProperty(XIPropertyPtr prop) { free(prop->value.data); free(prop); } /* This function destroys all of the device's property-related stuff, * including removing all device handlers. * DO NOT CALL FROM THE DRIVER. */ void XIDeleteAllDeviceProperties(DeviceIntPtr device) { XIPropertyPtr prop, next; XIPropertyHandlerPtr curr_handler, next_handler; UpdateCurrentTimeIf(); for (prop = device->properties.properties; prop; prop = next) { next = prop->next; send_property_event(device, prop->propertyName, XIPropertyDeleted); XIDestroyDeviceProperty(prop); } device->properties.properties = NULL; /* Now free all handlers */ curr_handler = device->properties.handlers; while (curr_handler) { next_handler = curr_handler->next; free(curr_handler); curr_handler = next_handler; } device->properties.handlers = NULL; } int XIDeleteDeviceProperty(DeviceIntPtr device, Atom property, Bool fromClient) { XIPropertyPtr prop, *prev; int rc = Success; for (prev = &device->properties.properties; (prop = *prev); prev = &(prop->next)) if (prop->propertyName == property) break; if (!prop) return Success; if (fromClient && !prop->deletable) return BadAccess; /* Ask handlers if we may delete the property */ if (device->properties.handlers) { XIPropertyHandlerPtr handler = device->properties.handlers; while (handler) { if (handler->DeleteProperty) rc = handler->DeleteProperty(device, prop->propertyName); if (rc != Success) return rc; handler = handler->next; } } if (prop) { UpdateCurrentTimeIf(); *prev = prop->next; send_property_event(device, prop->propertyName, XIPropertyDeleted); XIDestroyDeviceProperty(prop); } return Success; } int XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type, int format, int mode, unsigned long len, const void *value, Bool sendevent) { XIPropertyPtr prop; int size_in_bytes; unsigned long total_len; XIPropertyValuePtr prop_value; XIPropertyValueRec new_value; Bool add = FALSE; int rc; size_in_bytes = format >> 3; /* first see if property already exists */ prop = XIFetchDeviceProperty(dev, property); if (!prop) { /* just add to list */ prop = XICreateDeviceProperty(property); if (!prop) return BadAlloc; add = TRUE; mode = PropModeReplace; } prop_value = &prop->value; /* To append or prepend to a property the request format and type must match those of the already defined property. The existing format and type are irrelevant when using the mode "PropModeReplace" since they will be written over. */ if ((format != prop_value->format) && (mode != PropModeReplace)) return BadMatch; if ((prop_value->type != type) && (mode != PropModeReplace)) return BadMatch; new_value = *prop_value; if (mode == PropModeReplace) total_len = len; else total_len = prop_value->size + len; if (mode == PropModeReplace || len > 0) { void *new_data = NULL, *old_data = NULL; new_value.data = xallocarray(total_len, size_in_bytes); if (!new_value.data && total_len && size_in_bytes) { if (add) XIDestroyDeviceProperty(prop); return BadAlloc; } new_value.size = total_len; new_value.type = type; new_value.format = format; switch (mode) { case PropModeReplace: new_data = new_value.data; old_data = NULL; break; case PropModeAppend: new_data = (void *) (((char *) new_value.data) + (prop_value->size * size_in_bytes)); old_data = new_value.data; break; case PropModePrepend: new_data = new_value.data; old_data = (void *) (((char *) new_value.data) + (len * size_in_bytes)); break; } if (new_data) memcpy((char *) new_data, value, len * size_in_bytes); if (old_data) memcpy((char *) old_data, (char *) prop_value->data, prop_value->size * size_in_bytes); if (dev->properties.handlers) { XIPropertyHandlerPtr handler; BOOL checkonly = TRUE; /* run through all handlers with checkonly TRUE, then again with * checkonly FALSE. Handlers MUST return error codes on the * checkonly run, errors on the second run are ignored */ do { handler = dev->properties.handlers; while (handler) { if (handler->SetProperty) { input_lock(); rc = handler->SetProperty(dev, prop->propertyName, &new_value, checkonly); input_unlock(); if (checkonly && rc != Success) { free(new_value.data); if (add) XIDestroyDeviceProperty(prop); return rc; } } handler = handler->next; } checkonly = !checkonly; } while (!checkonly); } free(prop_value->data); *prop_value = new_value; } else if (len == 0) { /* do nothing */ } if (add) { prop->next = dev->properties.properties; dev->properties.properties = prop; } if (sendevent) { UpdateCurrentTimeIf(); send_property_event(dev, prop->propertyName, (add) ? XIPropertyCreated : XIPropertyModified); } return Success; } int XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value) { XIPropertyPtr prop = XIFetchDeviceProperty(dev, property); int rc; if (!prop) { *value = NULL; return BadAtom; } /* If we can, try to update the property value first */ if (dev->properties.handlers) { XIPropertyHandlerPtr handler = dev->properties.handlers; while (handler) { if (handler->GetProperty) { rc = handler->GetProperty(dev, prop->propertyName); if (rc != Success) { *value = NULL; return rc; } } handler = handler->next; } } *value = &prop->value; return Success; } int XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable) { XIPropertyPtr prop = XIFetchDeviceProperty(dev, property); if (!prop) return BadAtom; prop->deletable = deletable; return Success; } int ProcXListDeviceProperties(ClientPtr client) { Atom *atoms; xListDevicePropertiesReply rep; int natoms; DeviceIntPtr dev; int rc = Success; REQUEST(xListDevicePropertiesReq); REQUEST_SIZE_MATCH(xListDevicePropertiesReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixListPropAccess); if (rc != Success) return rc; rc = list_atoms(dev, &natoms, &atoms); if (rc != Success) return rc; rep = (xListDevicePropertiesReply) { .repType = X_Reply, .RepType = X_ListDeviceProperties, .sequenceNumber = client->sequence, .length = natoms, .nAtoms = natoms }; WriteReplyToClient(client, sizeof(xListDevicePropertiesReply), &rep); if (natoms) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); free(atoms); } return rc; } int ProcXChangeDeviceProperty(ClientPtr client) { REQUEST(xChangeDevicePropertyReq); DeviceIntPtr dev; unsigned long len; uint64_t totalSize; int rc; REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; rc = check_change_property(client, stuff->property, stuff->type, stuff->format, stuff->mode, stuff->nUnits); if (rc != Success) return rc; len = stuff->nUnits; if (len > (bytes_to_int32(0xffffffff - sizeof(xChangeDevicePropertyReq)))) return BadLength; totalSize = len * (stuff->format / 8); REQUEST_FIXED_SIZE(xChangeDevicePropertyReq, totalSize); rc = change_property(client, dev, stuff->property, stuff->type, stuff->format, stuff->mode, len, (void *) &stuff[1]); return rc; } int ProcXDeleteDeviceProperty(ClientPtr client) { REQUEST(xDeleteDevicePropertyReq); DeviceIntPtr dev; int rc; REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); return rc; } int ProcXGetDeviceProperty(ClientPtr client) { REQUEST(xGetDevicePropertyReq); DeviceIntPtr dev; int length; int rc, format, nitems, bytes_after; char *data; Atom type; xGetDevicePropertyReply reply; REQUEST_SIZE_MATCH(xGetDevicePropertyReq); if (stuff->delete) UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, stuff->delete ? DixSetPropAccess : DixGetPropAccess); if (rc != Success) return rc; rc = get_property(client, dev, stuff->property, stuff->type, stuff->delete, stuff->longOffset, stuff->longLength, &bytes_after, &type, &format, &nitems, &length, &data); if (rc != Success) return rc; reply = (xGetDevicePropertyReply) { .repType = X_Reply, .RepType = X_GetDeviceProperty, .sequenceNumber = client->sequence, .length = bytes_to_int32(length), .propertyType = type, .bytesAfter = bytes_after, .nItems = nitems, .format = format, .deviceid = dev->id }; if (stuff->delete && (reply.bytesAfter == 0)) send_property_event(dev, stuff->property, XIPropertyDeleted); WriteReplyToClient(client, sizeof(xGenericReply), &reply); if (length) { switch (reply.format) { case 32: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } WriteSwappedDataToClient(client, length, data); } /* delete the Property */ if (stuff->delete && (reply.bytesAfter == 0)) { XIPropertyPtr prop, *prev; for (prev = &dev->properties.properties; (prop = *prev); prev = &prop->next) { if (prop->propertyName == stuff->property) { *prev = prop->next; XIDestroyDeviceProperty(prop); break; } } } return Success; } int _X_COLD SProcXListDeviceProperties(ClientPtr client) { REQUEST(xListDevicePropertiesReq); REQUEST_SIZE_MATCH(xListDevicePropertiesReq); swaps(&stuff->length); return (ProcXListDeviceProperties(client)); } int _X_COLD SProcXChangeDeviceProperty(ClientPtr client) { REQUEST(xChangeDevicePropertyReq); REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); swaps(&stuff->length); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->nUnits); return (ProcXChangeDeviceProperty(client)); } int _X_COLD SProcXDeleteDeviceProperty(ClientPtr client) { REQUEST(xDeleteDevicePropertyReq); REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); swaps(&stuff->length); swapl(&stuff->property); return (ProcXDeleteDeviceProperty(client)); } int _X_COLD SProcXGetDeviceProperty(ClientPtr client) { REQUEST(xGetDevicePropertyReq); REQUEST_SIZE_MATCH(xGetDevicePropertyReq); swaps(&stuff->length); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->longOffset); swapl(&stuff->longLength); return (ProcXGetDeviceProperty(client)); } /* Reply swapping */ void _X_COLD SRepXListDeviceProperties(ClientPtr client, int size, xListDevicePropertiesReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->nAtoms); /* properties will be swapped later, see ProcXListDeviceProperties */ WriteToClient(client, size, rep); } void _X_COLD SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->propertyType); swapl(&rep->bytesAfter); swapl(&rep->nItems); /* data will be swapped, see ProcXGetDeviceProperty */ WriteToClient(client, size, rep); } /* XI2 Request/reply handling */ int ProcXIListProperties(ClientPtr client) { Atom *atoms; xXIListPropertiesReply rep; int natoms; DeviceIntPtr dev; int rc = Success; REQUEST(xXIListPropertiesReq); REQUEST_SIZE_MATCH(xXIListPropertiesReq); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixListPropAccess); if (rc != Success) return rc; rc = list_atoms(dev, &natoms, &atoms); if (rc != Success) return rc; rep = (xXIListPropertiesReply) { .repType = X_Reply, .RepType = X_XIListProperties, .sequenceNumber = client->sequence, .length = natoms, .num_properties = natoms }; WriteReplyToClient(client, sizeof(xXIListPropertiesReply), &rep); if (natoms) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); free(atoms); } return rc; } int ProcXIChangeProperty(ClientPtr client) { int rc; DeviceIntPtr dev; uint64_t totalSize; unsigned long len; REQUEST(xXIChangePropertyReq); REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; rc = check_change_property(client, stuff->property, stuff->type, stuff->format, stuff->mode, stuff->num_items); if (rc != Success) return rc; len = stuff->num_items; if (len > bytes_to_int32(0xffffffff - sizeof(xXIChangePropertyReq))) return BadLength; totalSize = len * (stuff->format / 8); REQUEST_FIXED_SIZE(xXIChangePropertyReq, totalSize); rc = change_property(client, dev, stuff->property, stuff->type, stuff->format, stuff->mode, len, (void *) &stuff[1]); return rc; } int ProcXIDeleteProperty(ClientPtr client) { DeviceIntPtr dev; int rc; REQUEST(xXIDeletePropertyReq); REQUEST_SIZE_MATCH(xXIDeletePropertyReq); UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, DixSetPropAccess); if (rc != Success) return rc; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; } rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); return rc; } int ProcXIGetProperty(ClientPtr client) { REQUEST(xXIGetPropertyReq); DeviceIntPtr dev; xXIGetPropertyReply reply; int length; int rc, format, nitems, bytes_after; char *data; Atom type; REQUEST_SIZE_MATCH(xXIGetPropertyReq); if (stuff->delete) UpdateCurrentTime(); rc = dixLookupDevice(&dev, stuff->deviceid, client, stuff->delete ? DixSetPropAccess : DixGetPropAccess); if (rc != Success) return rc; rc = get_property(client, dev, stuff->property, stuff->type, stuff->delete, stuff->offset, stuff->len, &bytes_after, &type, &format, &nitems, &length, &data); if (rc != Success) return rc; reply = (xXIGetPropertyReply) { .repType = X_Reply, .RepType = X_XIGetProperty, .sequenceNumber = client->sequence, .length = bytes_to_int32(length), .type = type, .bytes_after = bytes_after, .num_items = nitems, .format = format }; if (length && stuff->delete && (reply.bytes_after == 0)) send_property_event(dev, stuff->property, XIPropertyDeleted); WriteReplyToClient(client, sizeof(xXIGetPropertyReply), &reply); if (length) { switch (reply.format) { case 32: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } WriteSwappedDataToClient(client, length, data); } /* delete the Property */ if (stuff->delete && (reply.bytes_after == 0)) { XIPropertyPtr prop, *prev; for (prev = &dev->properties.properties; (prop = *prev); prev = &prop->next) { if (prop->propertyName == stuff->property) { *prev = prop->next; XIDestroyDeviceProperty(prop); break; } } } return Success; } int _X_COLD SProcXIListProperties(ClientPtr client) { REQUEST(xXIListPropertiesReq); REQUEST_SIZE_MATCH(xXIListPropertiesReq); swaps(&stuff->length); swaps(&stuff->deviceid); return (ProcXIListProperties(client)); } int _X_COLD SProcXIChangeProperty(ClientPtr client) { REQUEST(xXIChangePropertyReq); REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->num_items); return (ProcXIChangeProperty(client)); } int _X_COLD SProcXIDeleteProperty(ClientPtr client) { REQUEST(xXIDeletePropertyReq); REQUEST_SIZE_MATCH(xXIDeletePropertyReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); return (ProcXIDeleteProperty(client)); } int _X_COLD SProcXIGetProperty(ClientPtr client) { REQUEST(xXIGetPropertyReq); REQUEST_SIZE_MATCH(xXIGetPropertyReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->property); swapl(&stuff->type); swapl(&stuff->offset); swapl(&stuff->len); return (ProcXIGetProperty(client)); } void _X_COLD SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_properties); /* properties will be swapped later, see ProcXIListProperties */ WriteToClient(client, size, rep); } void _X_COLD SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->type); swapl(&rep->bytes_after); swapl(&rep->num_items); /* data will be swapped, see ProcXIGetProperty */ WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/xiproperty.h0000644000175000017500000000507614757411105012621 /* * Copyright © 2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XIPROPERTY_H #define XIPROPERTY_H 1 int ProcXListDeviceProperties(ClientPtr client); int ProcXChangeDeviceProperty(ClientPtr client); int ProcXDeleteDeviceProperty(ClientPtr client); int ProcXGetDeviceProperty(ClientPtr client); /* request swapping */ int SProcXListDeviceProperties(ClientPtr client); int SProcXChangeDeviceProperty(ClientPtr client); int SProcXDeleteDeviceProperty(ClientPtr client); int SProcXGetDeviceProperty(ClientPtr client); /* reply swapping */ void SRepXListDeviceProperties(ClientPtr client, int size, xListDevicePropertiesReply * rep); void SRepXGetDeviceProperty(ClientPtr client, int size, xGetDevicePropertyReply * rep); /* XI2 request/reply handling */ int ProcXIListProperties(ClientPtr client); int ProcXIChangeProperty(ClientPtr client); int ProcXIDeleteProperty(ClientPtr client); int ProcXIGetProperty(ClientPtr client); int SProcXIListProperties(ClientPtr client); int SProcXIChangeProperty(ClientPtr client); int SProcXIDeleteProperty(ClientPtr client); int SProcXIGetProperty(ClientPtr client); void SRepXIListProperties(ClientPtr client, int size, xXIListPropertiesReply * rep); void SRepXIGetProperty(ClientPtr client, int size, xXIGetPropertyReply * rep); void XIResetProperties(void); #endif /* XIPROPERTY_H */ xorg-server-21.1.16/Xi/xiquerydevice.c0000644000175000017500000004262014757411105013251 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ /** * @file Protocol handling for the XIQueryDevice request/reply. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include #include #include #include "xkbstr.h" #include "xkbsrv.h" #include "xserver-properties.h" #include "exevents.h" #include "xace.h" #include "inpututils.h" #include "exglobals.h" #include "privates.h" #include "xiquerydevice.h" static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr d); static int ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info); static int SizeDeviceInfo(DeviceIntPtr dev); static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info); int _X_COLD SProcXIQueryDevice(ClientPtr client) { REQUEST(xXIQueryDeviceReq); REQUEST_SIZE_MATCH(xXIQueryDeviceReq); swaps(&stuff->length); swaps(&stuff->deviceid); return ProcXIQueryDevice(client); } int ProcXIQueryDevice(ClientPtr client) { xXIQueryDeviceReply rep; DeviceIntPtr dev = NULL; int rc = Success; int i = 0, len = 0; char *info, *ptr; Bool *skip = NULL; REQUEST(xXIQueryDeviceReq); REQUEST_SIZE_MATCH(xXIQueryDeviceReq); if (stuff->deviceid != XIAllDevices && stuff->deviceid != XIAllMasterDevices) { rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } len += SizeDeviceInfo(dev); } else { skip = calloc(sizeof(Bool), inputInfo.numDevices); if (!skip) return BadAlloc; for (dev = inputInfo.devices; dev; dev = dev->next, i++) { skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); if (!skip[i]) len += SizeDeviceInfo(dev); } for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) { skip[i] = ShouldSkipDevice(client, stuff->deviceid, dev); if (!skip[i]) len += SizeDeviceInfo(dev); } } info = calloc(1, len); if (!info) { free(skip); return BadAlloc; } rep = (xXIQueryDeviceReply) { .repType = X_Reply, .RepType = X_XIQueryDevice, .sequenceNumber = client->sequence, .length = len / 4, .num_devices = 0 }; ptr = info; if (dev) { len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; rep.num_devices = 1; } else { i = 0; for (dev = inputInfo.devices; dev; dev = dev->next, i++) { if (!skip[i]) { len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; rep.num_devices++; } } for (dev = inputInfo.off_devices; dev; dev = dev->next, i++) { if (!skip[i]) { len = ListDeviceInfo(client, dev, (xXIDeviceInfo *) info); if (client->swapped) SwapDeviceInfo(dev, (xXIDeviceInfo *) info); info += len; rep.num_devices++; } } } len = rep.length * 4; WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); WriteToClient(client, len, ptr); free(ptr); free(skip); return rc; } void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_devices); /* Device info is already swapped, see ProcXIQueryDevice */ WriteToClient(client, size, rep); } /** * @return Whether the device should be included in the returned list. */ static Bool ShouldSkipDevice(ClientPtr client, int deviceid, DeviceIntPtr dev) { /* if all devices are not being queried, only master devices are */ if (deviceid == XIAllDevices || IsMaster(dev)) { int rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixGetAttrAccess); if (rc == Success) return FALSE; } return TRUE; } /** * @return The number of bytes needed to store this device's xXIDeviceInfo * (and its classes). */ static int SizeDeviceInfo(DeviceIntPtr dev) { int len = sizeof(xXIDeviceInfo); /* 4-padded name */ len += pad_to_int32(strlen(dev->name)); return len + SizeDeviceClasses(dev); } /* * @return The number of bytes needed to store this device's classes. */ int SizeDeviceClasses(DeviceIntPtr dev) { int len = 0; if (dev->button) { len += sizeof(xXIButtonInfo); len += dev->button->numButtons * sizeof(Atom); len += pad_to_int32(bits_to_bytes(dev->button->numButtons)); } if (dev->key) { XkbDescPtr xkb = dev->key->xkbInfo->desc; len += sizeof(xXIKeyInfo); len += (xkb->max_key_code - xkb->min_key_code + 1) * sizeof(uint32_t); } if (dev->valuator) { int i; len += (sizeof(xXIValuatorInfo)) * dev->valuator->numAxes; for (i = 0; i < dev->valuator->numAxes; i++) { if (dev->valuator->axes[i].scroll.type != SCROLL_TYPE_NONE) len += sizeof(xXIScrollInfo); } } if (dev->touch) len += sizeof(xXITouchInfo); if (dev->gesture) len += sizeof(xXIGestureInfo); return len; } /** * Get pointers to button information areas holding button mask and labels. */ static void ButtonInfoData(xXIButtonInfo *info, int *mask_words, unsigned char **mask, Atom **atoms) { *mask_words = bytes_to_int32(bits_to_bytes(info->num_buttons)); *mask = (unsigned char*) &info[1]; *atoms = (Atom*) ((*mask) + (*mask_words) * 4); } /** * Write button information into info. * @return Number of bytes written into info. */ int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState) { unsigned char *bits; Atom *labels; int mask_len; int i; if (!dev || !dev->button) return 0; info->type = ButtonClass; info->num_buttons = dev->button->numButtons; ButtonInfoData(info, &mask_len, &bits, &labels); info->length = bytes_to_int32(sizeof(xXIButtonInfo)) + info->num_buttons + mask_len; info->sourceid = dev->button->sourceid; memset(bits, 0, mask_len * 4); if (reportState) for (i = 0; i < dev->button->numButtons; i++) if (BitIsOn(dev->button->down, i)) SetBit(bits, i); memcpy(labels, dev->button->labels, dev->button->numButtons * sizeof(Atom)); return info->length * 4; } static void SwapButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info) { Atom *btn; int mask_len; unsigned char *mask; int i; ButtonInfoData(info, &mask_len, &mask, &btn); swaps(&info->type); swaps(&info->length); swaps(&info->sourceid); for (i = 0 ; i < info->num_buttons; i++, btn++) swapl(btn); swaps(&info->num_buttons); } /** * Write key information into info. * @return Number of bytes written into info. */ int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info) { int i; XkbDescPtr xkb = dev->key->xkbInfo->desc; uint32_t *kc; info->type = KeyClass; info->num_keycodes = xkb->max_key_code - xkb->min_key_code + 1; info->length = sizeof(xXIKeyInfo) / 4 + info->num_keycodes; info->sourceid = dev->key->sourceid; kc = (uint32_t *) &info[1]; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++, kc++) *kc = i; return info->length * 4; } static void SwapKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info) { uint32_t *key; int i; swaps(&info->type); swaps(&info->length); swaps(&info->sourceid); for (i = 0, key = (uint32_t *) &info[1]; i < info->num_keycodes; i++, key++) swapl(key); swaps(&info->num_keycodes); } /** * List axis information for the given axis. * * @return The number of bytes written into info. */ int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info, int axisnumber, Bool reportState) { ValuatorClassPtr v = dev->valuator; info->type = ValuatorClass; info->length = sizeof(xXIValuatorInfo) / 4; info->label = v->axes[axisnumber].label; info->min.integral = v->axes[axisnumber].min_value; info->min.frac = 0; info->max.integral = v->axes[axisnumber].max_value; info->max.frac = 0; info->value = double_to_fp3232(v->axisVal[axisnumber]); info->resolution = v->axes[axisnumber].resolution; info->number = axisnumber; info->mode = valuator_get_mode(dev, axisnumber); info->sourceid = v->sourceid; if (!reportState) info->value = info->min; return info->length * 4; } static void SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info) { swaps(&info->type); swaps(&info->length); swapl(&info->label); swapl(&info->min.integral); swapl(&info->min.frac); swapl(&info->max.integral); swapl(&info->max.frac); swapl(&info->value.integral); swapl(&info->value.frac); swapl(&info->resolution); swaps(&info->number); swaps(&info->sourceid); } int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber) { ValuatorClassPtr v = dev->valuator; AxisInfoPtr axis = &v->axes[axisnumber]; if (axis->scroll.type == SCROLL_TYPE_NONE) return 0; info->type = XIScrollClass; info->length = sizeof(xXIScrollInfo) / 4; info->number = axisnumber; switch (axis->scroll.type) { case SCROLL_TYPE_VERTICAL: info->scroll_type = XIScrollTypeVertical; break; case SCROLL_TYPE_HORIZONTAL: info->scroll_type = XIScrollTypeHorizontal; break; default: ErrorF("[Xi] Unknown scroll type %d. This is a bug.\n", axis->scroll.type); break; } info->increment = double_to_fp3232(axis->scroll.increment); info->sourceid = v->sourceid; info->flags = 0; if (axis->scroll.flags & SCROLL_FLAG_DONT_EMULATE) info->flags |= XIScrollFlagNoEmulation; if (axis->scroll.flags & SCROLL_FLAG_PREFERRED) info->flags |= XIScrollFlagPreferred; return info->length * 4; } static void SwapScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info) { swaps(&info->type); swaps(&info->length); swaps(&info->number); swaps(&info->sourceid); swaps(&info->scroll_type); swapl(&info->increment.integral); swapl(&info->increment.frac); } /** * List multitouch information * * @return The number of bytes written into info. */ int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch) { touch->type = XITouchClass; touch->length = sizeof(xXITouchInfo) >> 2; touch->sourceid = dev->touch->sourceid; touch->mode = dev->touch->mode; touch->num_touches = dev->touch->num_touches; return touch->length << 2; } static void SwapTouchInfo(DeviceIntPtr dev, xXITouchInfo * touch) { swaps(&touch->type); swaps(&touch->length); swaps(&touch->sourceid); } static Bool ShouldListGestureInfo(ClientPtr client) { /* libxcb 14.1 and older are not forwards-compatible with new device classes as it does not * properly ignore unknown device classes. Since breaking libxcb would break quite a lot of * applications, we instead report Gesture device class only if the client advertised support * for XI 2.4. Clients may still not work in cases when a client advertises XI 2.4 support * and then a completely separate module within the client uses broken libxcb to call * XIQueryDevice. */ XIClientPtr pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); if (pXIClient->major_version) { return version_compare(pXIClient->major_version, pXIClient->minor_version, 2, 4) >= 0; } return FALSE; } /** * List gesture information * * @return The number of bytes written into info. */ static int ListGestureInfo(DeviceIntPtr dev, xXIGestureInfo * gesture) { gesture->type = XIGestureClass; gesture->length = sizeof(xXIGestureInfo) >> 2; gesture->sourceid = dev->gesture->sourceid; gesture->num_touches = dev->gesture->max_touches; return gesture->length << 2; } static void SwapGestureInfo(DeviceIntPtr dev, xXIGestureInfo * gesture) { swaps(&gesture->type); swaps(&gesture->length); swaps(&gesture->sourceid); } int GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment) { DeviceIntPtr master = GetMaster(dev, MASTER_ATTACHED); int use; if (IsMaster(dev)) { DeviceIntPtr paired = GetPairedDevice(dev); use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard; *attachment = (paired ? paired->id : 0); } else if (!IsFloating(dev)) { use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard; *attachment = master->id; } else use = XIFloatingSlave; return use; } /** * Write the info for device dev into the buffer pointed to by info. * * @return The number of bytes used. */ static int ListDeviceInfo(ClientPtr client, DeviceIntPtr dev, xXIDeviceInfo * info) { char *any = (char *) &info[1]; int len = 0, total_len = 0; info->deviceid = dev->id; info->use = GetDeviceUse(dev, &info->attachment); info->num_classes = 0; info->name_len = strlen(dev->name); info->enabled = dev->enabled; total_len = sizeof(xXIDeviceInfo); len = pad_to_int32(info->name_len); memset(any, 0, len); strncpy(any, dev->name, info->name_len); any += len; total_len += len; total_len += ListDeviceClasses(client, dev, any, &info->num_classes); return total_len; } /** * Write the class info of the device into the memory pointed to by any, set * nclasses to the number of classes in total and return the number of bytes * written. */ int ListDeviceClasses(ClientPtr client, DeviceIntPtr dev, char *any, uint16_t * nclasses) { int total_len = 0; int len; int i; int rc; /* Check if the current device state should be suppressed */ rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess); if (dev->button) { (*nclasses)++; len = ListButtonInfo(dev, (xXIButtonInfo *) any, rc == Success); any += len; total_len += len; } if (dev->key) { (*nclasses)++; len = ListKeyInfo(dev, (xXIKeyInfo *) any); any += len; total_len += len; } for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++) { (*nclasses)++; len = ListValuatorInfo(dev, (xXIValuatorInfo *) any, i, rc == Success); any += len; total_len += len; } for (i = 0; dev->valuator && i < dev->valuator->numAxes; i++) { len = ListScrollInfo(dev, (xXIScrollInfo *) any, i); if (len) (*nclasses)++; any += len; total_len += len; } if (dev->touch) { (*nclasses)++; len = ListTouchInfo(dev, (xXITouchInfo *) any); any += len; total_len += len; } if (dev->gesture && ShouldListGestureInfo(client)) { (*nclasses)++; len = ListGestureInfo(dev, (xXIGestureInfo *) any); any += len; total_len += len; } return total_len; } static void SwapDeviceInfo(DeviceIntPtr dev, xXIDeviceInfo * info) { char *any = (char *) &info[1]; int i; /* Skip over name */ any += pad_to_int32(info->name_len); for (i = 0; i < info->num_classes; i++) { int len = ((xXIAnyInfo *) any)->length; switch (((xXIAnyInfo *) any)->type) { case XIButtonClass: SwapButtonInfo(dev, (xXIButtonInfo *) any); break; case XIKeyClass: SwapKeyInfo(dev, (xXIKeyInfo *) any); break; case XIValuatorClass: SwapValuatorInfo(dev, (xXIValuatorInfo *) any); break; case XIScrollClass: SwapScrollInfo(dev, (xXIScrollInfo *) any); break; case XITouchClass: SwapTouchInfo(dev, (xXITouchInfo *) any); break; case XIGestureClass: SwapGestureInfo(dev, (xXIGestureInfo *) any); break; } any += len * 4; } swaps(&info->deviceid); swaps(&info->use); swaps(&info->attachment); swaps(&info->num_classes); swaps(&info->name_len); } xorg-server-21.1.16/Xi/xiquerydevice.h0000644000175000017500000000412314757411105013252 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef QUERYDEV_H #define QUERYDEV_H 1 #include int SProcXIQueryDevice(ClientPtr client); int ProcXIQueryDevice(ClientPtr client); void SRepXIQueryDevice(ClientPtr client, int size, xXIQueryDeviceReply * rep); int SizeDeviceClasses(DeviceIntPtr dev); int ListDeviceClasses(ClientPtr client, DeviceIntPtr dev, char *any, uint16_t * nclasses); int GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment); int ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo * info, Bool reportState); int ListKeyInfo(DeviceIntPtr dev, xXIKeyInfo * info); int ListValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo * info, int axisnumber, Bool reportState); int ListScrollInfo(DeviceIntPtr dev, xXIScrollInfo * info, int axisnumber); int ListTouchInfo(DeviceIntPtr dev, xXITouchInfo * info); #endif /* QUERYDEV_H */ xorg-server-21.1.16/Xi/xiquerypointer.c0000644000175000017500000001563214757411105013475 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request to query the pointer location of an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" #include "eventconvert.h" #include "scrnintstr.h" #include "xkbsrv.h" #ifdef PANORAMIX #include "panoramiXsrv.h" #endif #include "inpututils.h" #include "xiquerypointer.h" /*********************************************************************** * * This procedure allows a client to query the pointer of a device. * */ int _X_COLD SProcXIQueryPointer(ClientPtr client) { REQUEST(xXIQueryPointerReq); REQUEST_SIZE_MATCH(xXIQueryPointerReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->win); return (ProcXIQueryPointer(client)); } int ProcXIQueryPointer(ClientPtr client) { int rc; xXIQueryPointerReply rep; DeviceIntPtr pDev, kbd; WindowPtr pWin, t; SpritePtr pSprite; XkbStatePtr state; char *buttons = NULL; int buttons_size = 0; /* size of buttons array */ XIClientPtr xi_client; Bool have_xi22 = FALSE; REQUEST(xXIQueryPointerReq); REQUEST_SIZE_MATCH(xXIQueryPointerReq); /* Check if client is compliant with XInput 2.2 or later. Earlier clients * do not know about touches, so we must report emulated button presses. 2.2 * and later clients are aware of touches, so we don't include emulated * button presses in the reply. */ xi_client = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); if (version_compare(xi_client->major_version, xi_client->minor_version, 2, 2) >= 0) have_xi22 = TRUE; rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixReadAccess); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } if (pDev->valuator == NULL || IsKeyboardDevice(pDev) || (!IsMaster(pDev) && !IsFloating(pDev))) { /* no attached devices */ client->errorValue = stuff->deviceid; return BadDevice; } rc = dixLookupWindow(&pWin, stuff->win, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->win; return rc; } if (pDev->valuator->motionHintWindow) MaybeStopHint(pDev, client); if (IsMaster(pDev)) kbd = GetMaster(pDev, MASTER_KEYBOARD); else kbd = (pDev->key) ? pDev : NULL; pSprite = pDev->spriteInfo->sprite; rep = (xXIQueryPointerReply) { .repType = X_Reply, .RepType = X_XIQueryPointer, .sequenceNumber = client->sequence, .length = 6, .root = (GetCurrentRootWindow(pDev))->drawable.id, .root_x = double_to_fp1616(pSprite->hot.x), .root_y = double_to_fp1616(pSprite->hot.y), .child = None }; if (kbd) { state = &kbd->key->xkbInfo->state; rep.mods.base_mods = state->base_mods; rep.mods.latched_mods = state->latched_mods; rep.mods.locked_mods = state->locked_mods; rep.group.base_group = state->base_group; rep.group.latched_group = state->latched_group; rep.group.locked_group = state->locked_group; } if (pDev->button) { int i; rep.buttons_len = bytes_to_int32(bits_to_bytes(256)); /* button map up to 255 */ rep.length += rep.buttons_len; buttons = calloc(rep.buttons_len, 4); if (!buttons) return BadAlloc; buttons_size = rep.buttons_len * 4; for (i = 1; i < pDev->button->numButtons; i++) if (BitIsOn(pDev->button->down, i)) SetBit(buttons, pDev->button->map[i]); if (!have_xi22 && pDev->touch && pDev->touch->buttonsDown > 0) SetBit(buttons, pDev->button->map[1]); } else rep.buttons_len = 0; if (pSprite->hot.pScreen == pWin->drawable.pScreen) { rep.same_screen = xTrue; rep.win_x = double_to_fp1616(pSprite->hot.x - pWin->drawable.x); rep.win_y = double_to_fp1616(pSprite->hot.y - pWin->drawable.y); for (t = pSprite->win; t; t = t->parent) if (t->parent == pWin) { rep.child = t->drawable.id; break; } } else { rep.same_screen = xFalse; rep.win_x = 0; rep.win_y = 0; } #ifdef PANORAMIX if (!noPanoramiXExtension) { rep.root_x += double_to_fp1616(screenInfo.screens[0]->x); rep.root_y += double_to_fp1616(screenInfo.screens[0]->y); if (stuff->win == rep.root) { rep.win_x += double_to_fp1616(screenInfo.screens[0]->x); rep.win_y += double_to_fp1616(screenInfo.screens[0]->y); } } #endif WriteReplyToClient(client, sizeof(xXIQueryPointerReply), &rep); if (buttons) WriteToClient(client, buttons_size, buttons); free(buttons); return Success; } /*********************************************************************** * * This procedure writes the reply for the XIQueryPointer function, * if the client and server have a different byte ordering. * */ void SRepXIQueryPointer(ClientPtr client, int size, xXIQueryPointerReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->root); swapl(&rep->child); swapl(&rep->root_x); swapl(&rep->root_y); swapl(&rep->win_x); swapl(&rep->win_y); swaps(&rep->buttons_len); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/xiquerypointer.h0000644000175000017500000000312114757411105013470 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef QUERYDP_H #define QUERYDP_H 1 int SProcXIQueryPointer(ClientPtr /* client */ ); int ProcXIQueryPointer(ClientPtr /* client */ ); void SRepXIQueryPointer(ClientPtr /* client */ , int /* size */ , xXIQueryPointerReply * /* rep */ ); #endif /* QUERYDP_H */ xorg-server-21.1.16/Xi/xiqueryversion.c0000644000175000017500000001110714757411105013473 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ /** * @file xiqueryversion.c * Protocol handling for the XIQueryVersion request/reply. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" #include #include #include #include "exglobals.h" #include "exevents.h" #include "xiqueryversion.h" #include "misc.h" extern XExtensionVersion XIVersion; /* defined in getvers.c */ /** * Return the supported XI version. * * Saves the version the client claims to support as well, for future * reference. */ int ProcXIQueryVersion(ClientPtr client) { xXIQueryVersionReply rep; XIClientPtr pXIClient; int major, minor; REQUEST(xXIQueryVersionReq); REQUEST_SIZE_MATCH(xXIQueryVersionReq); /* This request only exists after XI2 */ if (stuff->major_version < 2) { client->errorValue = stuff->major_version; return BadValue; } pXIClient = dixLookupPrivate(&client->devPrivates, XIClientPrivateKey); if (version_compare(XIVersion.major_version, XIVersion.minor_version, stuff->major_version, stuff->minor_version) > 0) { major = stuff->major_version; minor = stuff->minor_version; } else { major = XIVersion.major_version; minor = XIVersion.minor_version; } if (pXIClient->major_version) { /* Check to see if the client has only ever asked * for version 2.2 or higher */ if (version_compare(major, minor, 2, 2) >= 0 && version_compare(pXIClient->major_version, pXIClient->minor_version, 2, 2) >= 0) { /* As of version 2.2, Peter promises to never again break * backward compatibility, so we'll return the requested * version to the client but leave the server internal * version set to the highest requested value */ if (version_compare(major, minor, pXIClient->major_version, pXIClient->minor_version) > 0) { pXIClient->major_version = major; pXIClient->minor_version = minor; } } else { if (version_compare(major, minor, pXIClient->major_version, pXIClient->minor_version) < 0) { client->errorValue = stuff->major_version; return BadValue; } major = pXIClient->major_version; minor = pXIClient->minor_version; } } else { pXIClient->major_version = major; pXIClient->minor_version = minor; } rep = (xXIQueryVersionReply) { .repType = X_Reply, .RepType = X_XIQueryVersion, .sequenceNumber = client->sequence, .length = 0, .major_version = major, .minor_version = minor }; WriteReplyToClient(client, sizeof(xXIQueryVersionReply), &rep); return Success; } /* Swapping routines */ int _X_COLD SProcXIQueryVersion(ClientPtr client) { REQUEST(xXIQueryVersionReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq); swaps(&stuff->major_version); swaps(&stuff->minor_version); return (ProcXIQueryVersion(client)); } void _X_COLD SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->major_version); swaps(&rep->minor_version); WriteToClient(client, size, rep); } xorg-server-21.1.16/Xi/xiqueryversion.h0000644000175000017500000000301614757411105013500 /* * Copyright © 2009 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Authors: Peter Hutterer * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #ifndef QUERYVERSION_H #define QUERYVERSION_H 1 int SProcXIQueryVersion(ClientPtr client); int ProcXIQueryVersion(ClientPtr client); void SRepXIQueryVersion(ClientPtr client, int size, xXIQueryVersionReply * rep); #endif /* QUERYVERSION_H */ xorg-server-21.1.16/Xi/xiselectev.c0000644000175000017500000003423314757411105012537 /* * Copyright 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "dixstruct.h" #include "windowstr.h" #include "exglobals.h" #include "exevents.h" #include #include "inpututils.h" #include "xiselectev.h" /** * Ruleset: * - if A has XIAllDevices, B may select on device X * - If A has XIAllDevices, B may select on XIAllMasterDevices * - If A has XIAllMasterDevices, B may select on device X * - If A has XIAllMasterDevices, B may select on XIAllDevices * - if A has device X, B may select on XIAllDevices/XIAllMasterDevices */ static int check_for_touch_selection_conflicts(ClientPtr B, WindowPtr win, int deviceid, int evtype) { OtherInputMasks *inputMasks = wOtherInputMasks(win); InputClients *A = NULL; if (inputMasks) A = inputMasks->inputClients; for (; A; A = A->next) { DeviceIntPtr tmp; if (CLIENT_ID(A->resource) == B->index) continue; if (deviceid == XIAllDevices) tmp = inputInfo.all_devices; else if (deviceid == XIAllMasterDevices) tmp = inputInfo.all_master_devices; else dixLookupDevice(&tmp, deviceid, serverClient, DixReadAccess); if (!tmp) return BadImplementation; /* this shouldn't happen */ /* A has XIAllDevices */ if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_devices, evtype)) { if (deviceid == XIAllDevices) return BadAccess; } /* A has XIAllMasterDevices */ if (xi2mask_isset_for_device(A->xi2mask, inputInfo.all_master_devices, evtype)) { if (deviceid == XIAllMasterDevices) return BadAccess; } /* A has this device */ if (xi2mask_isset_for_device(A->xi2mask, tmp, evtype)) return BadAccess; } return Success; } /** * Check the given mask (in len bytes) for invalid mask bits. * Invalid mask bits are any bits above XI2LastEvent. * * @return BadValue if at least one invalid bit is set or Success otherwise. */ int XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len) { if (len >= XIMaskLen(XI2LASTEVENT)) { int i; for (i = XI2LASTEVENT + 1; i < len * 8; i++) { if (BitIsOn(mask, i)) { client->errorValue = i; return BadValue; } } } return Success; } int _X_COLD SProcXISelectEvents(ClientPtr client) { int i; int len; xXIEventMask *evmask; REQUEST(xXISelectEventsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); swapl(&stuff->win); swaps(&stuff->num_masks); len = stuff->length - bytes_to_int32(sizeof(xXISelectEventsReq)); evmask = (xXIEventMask *) &stuff[1]; for (i = 0; i < stuff->num_masks; i++) { if (len < bytes_to_int32(sizeof(xXIEventMask))) return BadLength; len -= bytes_to_int32(sizeof(xXIEventMask)); swaps(&evmask->deviceid); swaps(&evmask->mask_len); if (len < evmask->mask_len) return BadLength; len -= evmask->mask_len; evmask = (xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4); } return (ProcXISelectEvents(client)); } int ProcXISelectEvents(ClientPtr client) { int rc, num_masks; WindowPtr win; DeviceIntPtr dev; DeviceIntRec dummy; xXIEventMask *evmask; int *types = NULL; int len; REQUEST(xXISelectEventsReq); REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); if (stuff->num_masks == 0) return BadValue; rc = dixLookupWindow(&win, stuff->win, client, DixReceiveAccess); if (rc != Success) return rc; len = sz_xXISelectEventsReq; /* check request validity */ evmask = (xXIEventMask *) &stuff[1]; num_masks = stuff->num_masks; while (num_masks--) { len += sizeof(xXIEventMask) + evmask->mask_len * 4; if (bytes_to_int32(len) > stuff->length) return BadLength; if (evmask->deviceid != XIAllDevices && evmask->deviceid != XIAllMasterDevices) rc = dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); else { /* XXX: XACE here? */ } if (rc != Success) return rc; /* hierarchy event mask is not allowed on devices */ if (evmask->deviceid != XIAllDevices && evmask->mask_len >= 1) { unsigned char *bits = (unsigned char *) &evmask[1]; if (BitIsOn(bits, XI_HierarchyChanged)) { client->errorValue = XI_HierarchyChanged; return BadValue; } } /* Raw events may only be selected on root windows */ if (win->parent && evmask->mask_len >= 1) { unsigned char *bits = (unsigned char *) &evmask[1]; if (BitIsOn(bits, XI_RawKeyPress) || BitIsOn(bits, XI_RawKeyRelease) || BitIsOn(bits, XI_RawButtonPress) || BitIsOn(bits, XI_RawButtonRelease) || BitIsOn(bits, XI_RawMotion) || BitIsOn(bits, XI_RawTouchBegin) || BitIsOn(bits, XI_RawTouchUpdate) || BitIsOn(bits, XI_RawTouchEnd)) { client->errorValue = XI_RawKeyPress; return BadValue; } } if (evmask->mask_len >= 1) { unsigned char *bits = (unsigned char *) &evmask[1]; /* All three touch events must be selected at once */ if ((BitIsOn(bits, XI_TouchBegin) || BitIsOn(bits, XI_TouchUpdate) || BitIsOn(bits, XI_TouchOwnership) || BitIsOn(bits, XI_TouchEnd)) && (!BitIsOn(bits, XI_TouchBegin) || !BitIsOn(bits, XI_TouchUpdate) || !BitIsOn(bits, XI_TouchEnd))) { client->errorValue = XI_TouchBegin; return BadValue; } /* All three pinch gesture events must be selected at once */ if ((BitIsOn(bits, XI_GesturePinchBegin) || BitIsOn(bits, XI_GesturePinchUpdate) || BitIsOn(bits, XI_GesturePinchEnd)) && (!BitIsOn(bits, XI_GesturePinchBegin) || !BitIsOn(bits, XI_GesturePinchUpdate) || !BitIsOn(bits, XI_GesturePinchEnd))) { client->errorValue = XI_GesturePinchBegin; return BadValue; } /* All three swipe gesture events must be selected at once. Note that the XI_GestureSwipeEnd is at index 32 which is on the next 4-byte mask element */ if (evmask->mask_len == 1 && (BitIsOn(bits, XI_GestureSwipeBegin) || BitIsOn(bits, XI_GestureSwipeUpdate))) { client->errorValue = XI_GestureSwipeBegin; return BadValue; } if (evmask->mask_len >= 2 && (BitIsOn(bits, XI_GestureSwipeBegin) || BitIsOn(bits, XI_GestureSwipeUpdate) || BitIsOn(bits, XI_GestureSwipeEnd)) && (!BitIsOn(bits, XI_GestureSwipeBegin) || !BitIsOn(bits, XI_GestureSwipeUpdate) || !BitIsOn(bits, XI_GestureSwipeEnd))) { client->errorValue = XI_GestureSwipeBegin; return BadValue; } /* Only one client per window may select for touch or gesture events * on the same devices, including master devices. * XXX: This breaks if a device goes from floating to attached. */ if (BitIsOn(bits, XI_TouchBegin)) { rc = check_for_touch_selection_conflicts(client, win, evmask->deviceid, XI_TouchBegin); if (rc != Success) return rc; } if (BitIsOn(bits, XI_GesturePinchBegin)) { rc = check_for_touch_selection_conflicts(client, win, evmask->deviceid, XI_GesturePinchBegin); if (rc != Success) return rc; } if (BitIsOn(bits, XI_GestureSwipeBegin)) { rc = check_for_touch_selection_conflicts(client, win, evmask->deviceid, XI_GestureSwipeBegin); if (rc != Success) return rc; } } if (XICheckInvalidMaskBits(client, (unsigned char *) &evmask[1], evmask->mask_len * 4) != Success) return BadValue; evmask = (xXIEventMask *) (((unsigned char *) evmask) + evmask->mask_len * 4); evmask++; } if (bytes_to_int32(len) != stuff->length) return BadLength; /* Set masks on window */ evmask = (xXIEventMask *) &stuff[1]; num_masks = stuff->num_masks; while (num_masks--) { if (evmask->deviceid == XIAllDevices || evmask->deviceid == XIAllMasterDevices) { dummy.id = evmask->deviceid; dev = &dummy; } else dixLookupDevice(&dev, evmask->deviceid, client, DixUseAccess); if (XISetEventMask(dev, win, client, evmask->mask_len * 4, (unsigned char *) &evmask[1]) != Success) return BadAlloc; evmask = (xXIEventMask *) (((unsigned char *) evmask) + evmask->mask_len * 4); evmask++; } RecalculateDeliverableEvents(win); free(types); return Success; } int _X_COLD SProcXIGetSelectedEvents(ClientPtr client) { REQUEST(xXIGetSelectedEventsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); swapl(&stuff->win); return (ProcXIGetSelectedEvents(client)); } int ProcXIGetSelectedEvents(ClientPtr client) { int rc, i; WindowPtr win; char *buffer = NULL; xXIGetSelectedEventsReply reply; OtherInputMasks *masks; InputClientsPtr others = NULL; xXIEventMask *evmask = NULL; DeviceIntPtr dev; uint32_t length; REQUEST(xXIGetSelectedEventsReq); REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); rc = dixLookupWindow(&win, stuff->win, client, DixGetAttrAccess); if (rc != Success) return rc; reply = (xXIGetSelectedEventsReply) { .repType = X_Reply, .RepType = X_XIGetSelectedEvents, .sequenceNumber = client->sequence, .length = 0, .num_masks = 0 }; masks = wOtherInputMasks(win); if (masks) { for (others = wOtherInputMasks(win)->inputClients; others; others = others->next) { if (SameClient(others, client)) { break; } } } if (!others) { WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); return Success; } buffer = calloc(MAXDEVICES, sizeof(xXIEventMask) + pad_to_int32(XI2MASKSIZE)); if (!buffer) return BadAlloc; evmask = (xXIEventMask *) buffer; for (i = 0; i < MAXDEVICES; i++) { int j; const unsigned char *devmask = xi2mask_get_one_mask(others->xi2mask, i); if (i > 2) { rc = dixLookupDevice(&dev, i, client, DixGetAttrAccess); if (rc != Success) continue; } for (j = xi2mask_mask_size(others->xi2mask) - 1; j >= 0; j--) { if (devmask[j] != 0) { int mask_len = (j + 4) / 4; /* j is an index, hence + 4, not + 3 */ evmask->deviceid = i; evmask->mask_len = mask_len; reply.num_masks++; reply.length += sizeof(xXIEventMask) / 4 + evmask->mask_len; if (client->swapped) { swaps(&evmask->deviceid); swaps(&evmask->mask_len); } memcpy(&evmask[1], devmask, j + 1); evmask = (xXIEventMask *) ((char *) evmask + sizeof(xXIEventMask) + mask_len * 4); break; } } } /* save the value before SRepXIGetSelectedEvents swaps it */ length = reply.length; WriteReplyToClient(client, sizeof(xXIGetSelectedEventsReply), &reply); if (reply.num_masks) WriteToClient(client, length * 4, buffer); free(buffer); return Success; } void SRepXIGetSelectedEvents(ClientPtr client, int len, xXIGetSelectedEventsReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->num_masks); WriteToClient(client, len, rep); } xorg-server-21.1.16/Xi/xiselectev.h0000644000175000017500000000315614757411105012544 /* * Copyright 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XISELECTEVENTS_H #define XISELECTEVENTS_H 1 int SProcXISelectEvents(ClientPtr client); int ProcXISelectEvents(ClientPtr client); int SProcXIGetSelectedEvents(ClientPtr client); int ProcXIGetSelectedEvents(ClientPtr client); void SRepXIGetSelectedEvents(ClientPtr client, int len, xXIGetSelectedEventsReply * rep); #endif /* _XISELECTEVENTS_H_ */ xorg-server-21.1.16/Xi/xisetclientpointer.c0000644000175000017500000000615614757411105014323 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request to set the client pointer for the owner of the given window. * All subsequent calls that are ambiguous will choose the client pointer as * default value. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" #include "xisetclientpointer.h" int _X_COLD SProcXISetClientPointer(ClientPtr client) { REQUEST(xXISetClientPointerReq); REQUEST_SIZE_MATCH(xXISetClientPointerReq); swaps(&stuff->length); swapl(&stuff->win); swaps(&stuff->deviceid); return (ProcXISetClientPointer(client)); } int ProcXISetClientPointer(ClientPtr client) { DeviceIntPtr pDev; ClientPtr targetClient; int rc; REQUEST(xXISetClientPointerReq); REQUEST_SIZE_MATCH(xXISetClientPointerReq); rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixManageAccess); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } if (!IsMaster(pDev)) { client->errorValue = stuff->deviceid; return BadDevice; } pDev = GetMaster(pDev, MASTER_POINTER); if (stuff->win != None) { rc = dixLookupClient(&targetClient, stuff->win, client, DixManageAccess); if (rc != Success) return BadWindow; } else targetClient = client; rc = SetClientPointer(targetClient, pDev); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } return Success; } xorg-server-21.1.16/Xi/xisetclientpointer.h0000644000175000017500000000270314757411105014322 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef SETCPTR_H #define SETCPTR_H 1 int SProcXISetClientPointer(ClientPtr /* client */ ); int ProcXISetClientPointer(ClientPtr /* client */ ); #endif /* SETCPTR_H */ xorg-server-21.1.16/Xi/xisetdevfocus.c0000644000175000017500000000704614757411105013261 /* * Copyright 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ /*********************************************************************** * * Request to set and get an input device's focus. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include #include #include "exglobals.h" /* BadDevice */ #include "xisetdevfocus.h" int _X_COLD SProcXISetFocus(ClientPtr client) { REQUEST(xXISetFocusReq); REQUEST_AT_LEAST_SIZE(xXISetFocusReq); swaps(&stuff->length); swaps(&stuff->deviceid); swapl(&stuff->focus); swapl(&stuff->time); return ProcXISetFocus(client); } int _X_COLD SProcXIGetFocus(ClientPtr client) { REQUEST(xXIGetFocusReq); REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); swaps(&stuff->length); swaps(&stuff->deviceid); return ProcXIGetFocus(client); } int ProcXISetFocus(ClientPtr client) { DeviceIntPtr dev; int ret; REQUEST(xXISetFocusReq); REQUEST_AT_LEAST_SIZE(xXISetFocusReq); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixSetFocusAccess); if (ret != Success) return ret; if (!dev->focus) return BadDevice; return SetInputFocus(client, dev, stuff->focus, RevertToParent, stuff->time, TRUE); } int ProcXIGetFocus(ClientPtr client) { xXIGetFocusReply rep; DeviceIntPtr dev; int ret; REQUEST(xXIGetFocusReq); REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); ret = dixLookupDevice(&dev, stuff->deviceid, client, DixGetFocusAccess); if (ret != Success) return ret; if (!dev->focus) return BadDevice; rep = (xXIGetFocusReply) { .repType = X_Reply, .RepType = X_XIGetFocus, .sequenceNumber = client->sequence, .length = 0 }; if (dev->focus->win == NoneWin) rep.focus = None; else if (dev->focus->win == PointerRootWin) rep.focus = PointerRoot; else if (dev->focus->win == FollowKeyboardWin) rep.focus = FollowKeyboard; else rep.focus = dev->focus->win->drawable.id; WriteReplyToClient(client, sizeof(xXIGetFocusReply), &rep); return Success; } void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->focus); WriteToClient(client, len, rep); } xorg-server-21.1.16/Xi/xisetdevfocus.h0000644000175000017500000000304114757411105013255 /* * Copyright 2008 Red Hat, Inc. * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef XISETDEVFOCUS_H #define XISETDEVFOCUS_H 1 int SProcXISetFocus(ClientPtr client); int ProcXISetFocus(ClientPtr client); int SProcXIGetFocus(ClientPtr client); int ProcXIGetFocus(ClientPtr client); void SRepXIGetFocus(ClientPtr client, int len, xXIGetFocusReply * rep); #endif /* XISETDEVFOCUS_H */ xorg-server-21.1.16/Xi/xiwarppointer.c0000644000175000017500000001364314757411105013301 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ /*********************************************************************** * * Request to Warp the pointer location of an extension input device. * */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include /* for inputstr.h */ #include /* Request macro */ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ #include #include #include "extnsionst.h" #include "exevents.h" #include "exglobals.h" #include "mipointer.h" /* for miPointerUpdateSprite */ #include "xiwarppointer.h" /*********************************************************************** * * This procedure allows a client to warp the pointer of a device. * */ int _X_COLD SProcXIWarpPointer(ClientPtr client) { REQUEST(xXIWarpPointerReq); REQUEST_SIZE_MATCH(xXIWarpPointerReq); swaps(&stuff->length); swapl(&stuff->src_win); swapl(&stuff->dst_win); swapl(&stuff->src_x); swapl(&stuff->src_y); swaps(&stuff->src_width); swaps(&stuff->src_height); swapl(&stuff->dst_x); swapl(&stuff->dst_y); swaps(&stuff->deviceid); return (ProcXIWarpPointer(client)); } int ProcXIWarpPointer(ClientPtr client) { int rc; int x, y; WindowPtr dest = NULL; DeviceIntPtr pDev; SpritePtr pSprite; ScreenPtr newScreen; int src_x, src_y; int dst_x, dst_y; REQUEST(xXIWarpPointerReq); REQUEST_SIZE_MATCH(xXIWarpPointerReq); /* FIXME: panoramix stuff is missing, look at ProcWarpPointer */ rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixWriteAccess); if (rc != Success) { client->errorValue = stuff->deviceid; return rc; } if ((!IsMaster(pDev) && !IsFloating(pDev)) || (IsMaster(pDev) && !IsPointerDevice(pDev))) { client->errorValue = stuff->deviceid; return BadDevice; } if (stuff->dst_win != None) { rc = dixLookupWindow(&dest, stuff->dst_win, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->dst_win; return rc; } } pSprite = pDev->spriteInfo->sprite; x = pSprite->hotPhys.x; y = pSprite->hotPhys.y; src_x = stuff->src_x / (double) (1 << 16); src_y = stuff->src_y / (double) (1 << 16); dst_x = stuff->dst_x / (double) (1 << 16); dst_y = stuff->dst_y / (double) (1 << 16); if (stuff->src_win != None) { int winX, winY; WindowPtr src; rc = dixLookupWindow(&src, stuff->src_win, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->src_win; return rc; } winX = src->drawable.x; winY = src->drawable.y; if (src->drawable.pScreen != pSprite->hotPhys.pScreen || x < winX + src_x || y < winY + src_y || (stuff->src_width != 0 && winX + src_x + (int) stuff->src_width < 0) || (stuff->src_height != 0 && winY + src_y + (int) stuff->src_height < y) || !PointInWindowIsVisible(src, x, y)) return Success; } if (dest) { x = dest->drawable.x; y = dest->drawable.y; newScreen = dest->drawable.pScreen; } else newScreen = pSprite->hotPhys.pScreen; x += dst_x; y += dst_y; if (x < 0) x = 0; else if (x > newScreen->width) x = newScreen->width - 1; if (y < 0) y = 0; else if (y > newScreen->height) y = newScreen->height - 1; if (newScreen == pSprite->hotPhys.pScreen) { if (x < pSprite->physLimits.x1) x = pSprite->physLimits.x1; else if (x >= pSprite->physLimits.x2) x = pSprite->physLimits.x2 - 1; if (y < pSprite->physLimits.y1) y = pSprite->physLimits.y1; else if (y >= pSprite->physLimits.y2) y = pSprite->physLimits.y2 - 1; if (pSprite->hotShape) ConfineToShape(pDev, pSprite->hotShape, &x, &y); (*newScreen->SetCursorPosition) (pDev, newScreen, x, y, TRUE); } else if (!PointerConfinedToScreen(pDev)) { NewCurrentScreen(pDev, newScreen, x, y); } /* if we don't update the device, we get a jump next time it moves */ pDev->last.valuators[0] = x; pDev->last.valuators[1] = y; miPointerUpdateSprite(pDev); if (*newScreen->CursorWarpedTo) (*newScreen->CursorWarpedTo) (pDev, newScreen, client, dest, pSprite, x, y); /* FIXME: XWarpPointer is supposed to generate an event. It doesn't do it here though. */ return Success; } xorg-server-21.1.16/Xi/xiwarppointer.h0000644000175000017500000000267414757411105013310 /* * Copyright 2007-2008 Peter Hutterer * * 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, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. * * Author: Peter Hutterer, University of South Australia, NICTA */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef WARPDEVP_H #define WARPDEVP_H 1 int SProcXIWarpPointer(ClientPtr /* client */ ); int ProcXIWarpPointer(ClientPtr /* client */ ); #endif /* WARPDEVP_H */ xorg-server-21.1.16/Xi/stubs.c0000644000175000017500000001224714757411105011525 /************************************************************ Copyright 1989, 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 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. ********************************************************/ /* * stubs.c -- stub routines for the X server side of the XINPUT * extension. This file is mainly to be used only as documentation. * There is not much code here, and you can't get a working XINPUT * server just using this. * The Xvfb server uses this file so it will compile with the same * object files as the real X server for a platform that has XINPUT. * Xnest could do the same thing. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include #include "inputstr.h" #include #include #include "XIstubs.h" #include "xace.h" /**************************************************************************** * * Caller: ProcXSetDeviceMode * * Change the mode of an extension device. * This function is used to change the mode of a device from reporting * relative motion to reporting absolute positional information, and * vice versa. * The default implementation below is that no such devices are supported. * */ int SetDeviceMode(ClientPtr client, DeviceIntPtr dev, int mode) { return BadMatch; } /**************************************************************************** * * Caller: ProcXSetDeviceValuators * * Set the value of valuators on an extension input device. * This function is used to set the initial value of valuators on * those input devices that are capable of reporting either relative * motion or an absolute position, and allow an initial position to be set. * The default implementation below is that no such devices are supported. * */ int SetDeviceValuators(ClientPtr client, DeviceIntPtr dev, int *valuators, int first_valuator, int num_valuators) { return BadMatch; } /**************************************************************************** * * Caller: ProcXChangeDeviceControl * * Change the specified device controls on an extension input device. * */ int ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, xDeviceCtl * control) { return BadMatch; } /**************************************************************************** * * Caller: configAddDevice (and others) * * Add a new device with the specified options. * */ int NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, DeviceIntPtr *pdev) { return BadValue; } /**************************************************************************** * * Caller: configRemoveDevice (and others) * * Remove the specified device previously added. * */ void DeleteInputDeviceRequest(DeviceIntPtr dev) { RemoveDevice(dev, TRUE); } /**************************************************************************** * * Caller: configRemoveDevice (and others) * * Remove any traces of the input device specified in config_info. * This is only necessary if the ddx keeps information around beyond * the NewInputDeviceRequest/DeleteInputDeviceRequest * */ void RemoveInputDeviceTraces(const char *config_info) { } xorg-server-21.1.16/xkb/0000755000175000017500000000000014757411133010500 5xorg-server-21.1.16/xkb/meson.build0000644000175000017500000000136114757411105012562 srcs_xkb = [ 'ddxBeep.c', 'ddxCtrls.c', 'ddxLEDs.c', 'ddxLoad.c', 'maprules.c', 'xkmread.c', 'xkbtext.c', 'xkbfmisc.c', 'xkbout.c', 'xkb.c', 'xkbUtils.c', 'xkbEvents.c', 'xkbAccessX.c', 'xkbSwap.c', 'xkbLEDs.c', 'xkbInit.c', 'xkbActions.c', 'xkbPrKeyEv.c', 'XKBMisc.c', 'XKBAlloc.c', 'XKBGAlloc.c', 'XKBMAlloc.c', ] libxserver_xkb = static_library('libxserver_xkb', srcs_xkb, include_directories: inc, dependencies: common_dep, ) srcs_xkb_stubs = [ 'ddxKillSrv.c', 'ddxPrivate.c', 'ddxVT.c', ] libxserver_xkb_stubs = static_library('libxserver_xkb_stubs', srcs_xkb_stubs, include_directories: inc, dependencies: common_dep, ) xorg-server-21.1.16/xkb/Makefile.am0000644000175000017500000000160614757411105012456 noinst_LTLIBRARIES = libxkb.la libxkbstubs.la AM_CFLAGS = $(DIX_CFLAGS) DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ ddxLEDs.c \ ddxLoad.c DIX_SRCS = \ xkb.c \ xkbUtils.c \ xkbEvents.c \ xkbAccessX.c \ xkbSwap.c \ xkbLEDs.c \ xkbInit.c \ xkbActions.c \ xkbPrKeyEv.c # this should be replaced by a common library or something, ideally -d XKBFILE_SRCS = \ maprules.c \ xkmread.c \ xkbtext.c \ xkbfmisc.c \ xkbout.c X11_SRCS = \ XKBMisc.c \ XKBAlloc.c \ XKBGAlloc.c \ XKBMAlloc.c libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XKBFILE_SRCS) $(X11_SRCS) libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h xkbcompileddir = $(XKB_COMPILED_DIR) dist_xkbcompiled_DATA = README.compiled xorg-server-21.1.16/xkb/README.compiled0000644000175000017500000000120414757411105013067 The X server uses this directory to store the compiled version of the current keymap and/or any scratch keymaps used by clients. The X server or some other tool might destroy or replace the files in this directory, so it is not a safe place to store compiled keymaps for long periods of time. The default keymap for any server is usually stored in: X-default.xkm where is the display number of the server in question, which makes it possible for several servers *on the same host* to share the same directory. Unless the X server is modified, sharing this directory between servers on different hosts could cause problems. xorg-server-21.1.16/xkb/Makefile.in0000644000175000017500000010105514757411116012470 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = xkb ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_xkbcompiled_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxkb_la_LIBADD = am__objects_1 = ddxBeep.lo ddxCtrls.lo ddxLEDs.lo ddxLoad.lo am__objects_2 = xkb.lo xkbUtils.lo xkbEvents.lo xkbAccessX.lo \ xkbSwap.lo xkbLEDs.lo xkbInit.lo xkbActions.lo xkbPrKeyEv.lo am__objects_3 = maprules.lo xkmread.lo xkbtext.lo xkbfmisc.lo \ xkbout.lo am__objects_4 = XKBMisc.lo XKBAlloc.lo XKBGAlloc.lo XKBMAlloc.lo am_libxkb_la_OBJECTS = $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) libxkb_la_OBJECTS = $(am_libxkb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libxkbstubs_la_LIBADD = am_libxkbstubs_la_OBJECTS = ddxVT.lo ddxPrivate.lo ddxKillSrv.lo libxkbstubs_la_OBJECTS = $(am_libxkbstubs_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/XKBAlloc.Plo \ ./$(DEPDIR)/XKBGAlloc.Plo ./$(DEPDIR)/XKBMAlloc.Plo \ ./$(DEPDIR)/XKBMisc.Plo ./$(DEPDIR)/ddxBeep.Plo \ ./$(DEPDIR)/ddxCtrls.Plo ./$(DEPDIR)/ddxKillSrv.Plo \ ./$(DEPDIR)/ddxLEDs.Plo ./$(DEPDIR)/ddxLoad.Plo \ ./$(DEPDIR)/ddxPrivate.Plo ./$(DEPDIR)/ddxVT.Plo \ ./$(DEPDIR)/maprules.Plo ./$(DEPDIR)/xkb.Plo \ ./$(DEPDIR)/xkbAccessX.Plo ./$(DEPDIR)/xkbActions.Plo \ ./$(DEPDIR)/xkbEvents.Plo ./$(DEPDIR)/xkbInit.Plo \ ./$(DEPDIR)/xkbLEDs.Plo ./$(DEPDIR)/xkbPrKeyEv.Plo \ ./$(DEPDIR)/xkbSwap.Plo ./$(DEPDIR)/xkbUtils.Plo \ ./$(DEPDIR)/xkbfmisc.Plo ./$(DEPDIR)/xkbout.Plo \ ./$(DEPDIR)/xkbtext.Plo ./$(DEPDIR)/xkmread.Plo am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libxkb_la_SOURCES) $(libxkbstubs_la_SOURCES) DIST_SOURCES = $(libxkb_la_SOURCES) $(libxkbstubs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(xkbcompileddir)" DATA = $(dist_xkbcompiled_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libxkb.la libxkbstubs.la AM_CFLAGS = $(DIX_CFLAGS) DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ ddxLEDs.c \ ddxLoad.c DIX_SRCS = \ xkb.c \ xkbUtils.c \ xkbEvents.c \ xkbAccessX.c \ xkbSwap.c \ xkbLEDs.c \ xkbInit.c \ xkbActions.c \ xkbPrKeyEv.c # this should be replaced by a common library or something, ideally -d XKBFILE_SRCS = \ maprules.c \ xkmread.c \ xkbtext.c \ xkbfmisc.c \ xkbout.c X11_SRCS = \ XKBMisc.c \ XKBAlloc.c \ XKBGAlloc.c \ XKBMAlloc.c libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XKBFILE_SRCS) $(X11_SRCS) libxkbstubs_la_SOURCES = ddxVT.c ddxPrivate.c ddxKillSrv.c EXTRA_DIST = xkbDflts.h xkbgeom.h xkb.h xkbcompileddir = $(XKB_COMPILED_DIR) dist_xkbcompiled_DATA = README.compiled all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign xkb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign xkb/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libxkb.la: $(libxkb_la_OBJECTS) $(libxkb_la_DEPENDENCIES) $(EXTRA_libxkb_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxkb_la_OBJECTS) $(libxkb_la_LIBADD) $(LIBS) libxkbstubs.la: $(libxkbstubs_la_OBJECTS) $(libxkbstubs_la_DEPENDENCIES) $(EXTRA_libxkbstubs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libxkbstubs_la_OBJECTS) $(libxkbstubs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBAlloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBGAlloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBMAlloc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBMisc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxBeep.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxCtrls.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxKillSrv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxLEDs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxLoad.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxPrivate.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxVT.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maprules.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkb.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbAccessX.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbActions.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbEvents.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbInit.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbLEDs.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbPrKeyEv.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbSwap.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbUtils.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbfmisc.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbout.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbtext.Plo@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkmread.Plo@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_xkbcompiledDATA: $(dist_xkbcompiled_DATA) @$(NORMAL_INSTALL) @list='$(dist_xkbcompiled_DATA)'; test -n "$(xkbcompileddir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(xkbcompileddir)'"; \ $(MKDIR_P) "$(DESTDIR)$(xkbcompileddir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xkbcompileddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(xkbcompileddir)" || exit $$?; \ done uninstall-dist_xkbcompiledDATA: @$(NORMAL_UNINSTALL) @list='$(dist_xkbcompiled_DATA)'; test -n "$(xkbcompileddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(xkbcompileddir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(xkbcompileddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/XKBAlloc.Plo -rm -f ./$(DEPDIR)/XKBGAlloc.Plo -rm -f ./$(DEPDIR)/XKBMAlloc.Plo -rm -f ./$(DEPDIR)/XKBMisc.Plo -rm -f ./$(DEPDIR)/ddxBeep.Plo -rm -f ./$(DEPDIR)/ddxCtrls.Plo -rm -f ./$(DEPDIR)/ddxKillSrv.Plo -rm -f ./$(DEPDIR)/ddxLEDs.Plo -rm -f ./$(DEPDIR)/ddxLoad.Plo -rm -f ./$(DEPDIR)/ddxPrivate.Plo -rm -f ./$(DEPDIR)/ddxVT.Plo -rm -f ./$(DEPDIR)/maprules.Plo -rm -f ./$(DEPDIR)/xkb.Plo -rm -f ./$(DEPDIR)/xkbAccessX.Plo -rm -f ./$(DEPDIR)/xkbActions.Plo -rm -f ./$(DEPDIR)/xkbEvents.Plo -rm -f ./$(DEPDIR)/xkbInit.Plo -rm -f ./$(DEPDIR)/xkbLEDs.Plo -rm -f ./$(DEPDIR)/xkbPrKeyEv.Plo -rm -f ./$(DEPDIR)/xkbSwap.Plo -rm -f ./$(DEPDIR)/xkbUtils.Plo -rm -f ./$(DEPDIR)/xkbfmisc.Plo -rm -f ./$(DEPDIR)/xkbout.Plo -rm -f ./$(DEPDIR)/xkbtext.Plo -rm -f ./$(DEPDIR)/xkmread.Plo -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dist_xkbcompiledDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/XKBAlloc.Plo -rm -f ./$(DEPDIR)/XKBGAlloc.Plo -rm -f ./$(DEPDIR)/XKBMAlloc.Plo -rm -f ./$(DEPDIR)/XKBMisc.Plo -rm -f ./$(DEPDIR)/ddxBeep.Plo -rm -f ./$(DEPDIR)/ddxCtrls.Plo -rm -f ./$(DEPDIR)/ddxKillSrv.Plo -rm -f ./$(DEPDIR)/ddxLEDs.Plo -rm -f ./$(DEPDIR)/ddxLoad.Plo -rm -f ./$(DEPDIR)/ddxPrivate.Plo -rm -f ./$(DEPDIR)/ddxVT.Plo -rm -f ./$(DEPDIR)/maprules.Plo -rm -f ./$(DEPDIR)/xkb.Plo -rm -f ./$(DEPDIR)/xkbAccessX.Plo -rm -f ./$(DEPDIR)/xkbActions.Plo -rm -f ./$(DEPDIR)/xkbEvents.Plo -rm -f ./$(DEPDIR)/xkbInit.Plo -rm -f ./$(DEPDIR)/xkbLEDs.Plo -rm -f ./$(DEPDIR)/xkbPrKeyEv.Plo -rm -f ./$(DEPDIR)/xkbSwap.Plo -rm -f ./$(DEPDIR)/xkbUtils.Plo -rm -f ./$(DEPDIR)/xkbfmisc.Plo -rm -f ./$(DEPDIR)/xkbout.Plo -rm -f ./$(DEPDIR)/xkbtext.Plo -rm -f ./$(DEPDIR)/xkmread.Plo -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-dist_xkbcompiledDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ cscopelist-am ctags ctags-am distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_xkbcompiledDATA \ install-dvi install-dvi-am install-exec install-exec-am \ install-html install-html-am install-info install-info-am \ install-man install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-dist_xkbcompiledDATA .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/xkb/ddxBeep.c0000644000175000017500000002473314757411105012147 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include #include /*#define FALLING_TONE 1*/ /*#define RISING_TONE 1*/ #define FALLING_TONE 10 #define RISING_TONE 10 #define SHORT_TONE 50 #define SHORT_DELAY 60 #define LONG_TONE 75 #define VERY_LONG_TONE 100 #define LONG_DELAY 85 #define CLICK_DURATION 1 #define DEEP_PITCH 250 #define LOW_PITCH 500 #define MID_PITCH 1000 #define HIGH_PITCH 2000 #define CLICK_PITCH 1500 static unsigned long atomGeneration = 0; static Atom featureOn; static Atom featureOff; static Atom featureChange; static Atom ledOn; static Atom ledOff; static Atom ledChange; static Atom slowWarn; static Atom slowPress; static Atom slowReject; static Atom slowAccept; static Atom slowRelease; static Atom stickyLatch; static Atom stickyLock; static Atom stickyUnlock; static Atom bounceReject; static char doesPitch = 1; #define FEATURE_ON "AX_FeatureOn" #define FEATURE_OFF "AX_FeatureOff" #define FEATURE_CHANGE "AX_FeatureChange" #define LED_ON "AX_IndicatorOn" #define LED_OFF "AX_IndicatorOff" #define LED_CHANGE "AX_IndicatorChange" #define SLOW_WARN "AX_SlowKeysWarning" #define SLOW_PRESS "AX_SlowKeyPress" #define SLOW_REJECT "AX_SlowKeyReject" #define SLOW_ACCEPT "AX_SlowKeyAccept" #define SLOW_RELEASE "AX_SlowKeyRelease" #define STICKY_LATCH "AX_StickyLatch" #define STICKY_LOCK "AX_StickyLock" #define STICKY_UNLOCK "AX_StickyUnlock" #define BOUNCE_REJECT "AX_BounceKeyReject" #define MAKE_ATOM(a) MakeAtom(a,sizeof(a)-1,TRUE) static void _XkbDDXBeepInitAtoms(void) { featureOn = MAKE_ATOM(FEATURE_ON); featureOff = MAKE_ATOM(FEATURE_OFF); featureChange = MAKE_ATOM(FEATURE_CHANGE); ledOn = MAKE_ATOM(LED_ON); ledOff = MAKE_ATOM(LED_OFF); ledChange = MAKE_ATOM(LED_CHANGE); slowWarn = MAKE_ATOM(SLOW_WARN); slowPress = MAKE_ATOM(SLOW_PRESS); slowReject = MAKE_ATOM(SLOW_REJECT); slowAccept = MAKE_ATOM(SLOW_ACCEPT); slowRelease = MAKE_ATOM(SLOW_RELEASE); stickyLatch = MAKE_ATOM(STICKY_LATCH); stickyLock = MAKE_ATOM(STICKY_LOCK); stickyUnlock = MAKE_ATOM(STICKY_UNLOCK); bounceReject = MAKE_ATOM(BOUNCE_REJECT); return; } static CARD32 _XkbDDXBeepExpire(OsTimerPtr timer, CARD32 now, void *arg) { DeviceIntPtr dev = (DeviceIntPtr) arg; KbdFeedbackPtr feed; KeybdCtrl *ctrl; XkbSrvInfoPtr xkbInfo; CARD32 next; int pitch, duration; int oldPitch, oldDuration; Atom name; if ((dev == NULL) || (dev->key == NULL) || (dev->key->xkbInfo == NULL) || (dev->kbdfeed == NULL)) return 0; if (atomGeneration != serverGeneration) { _XkbDDXBeepInitAtoms(); atomGeneration = serverGeneration; } feed = dev->kbdfeed; ctrl = &feed->ctrl; xkbInfo = dev->key->xkbInfo; next = 0; pitch = oldPitch = ctrl->bell_pitch; duration = oldDuration = ctrl->bell_duration; name = None; switch (xkbInfo->beepType) { default: ErrorF("[xkb] Unknown beep type %d\n", xkbInfo->beepType); case _BEEP_NONE: duration = 0; break; /* When an LED is turned on, we want a high-pitched beep. * When the LED it turned off, we want a low-pitched beep. * If we cannot do pitch, we want a single beep for on and two * beeps for off. */ case _BEEP_LED_ON: if (name == None) name = ledOn; duration = SHORT_TONE; pitch = HIGH_PITCH; break; case _BEEP_LED_OFF: if (name == None) name = ledOff; duration = SHORT_TONE; pitch = LOW_PITCH; if (!doesPitch && xkbInfo->beepCount < 1) next = SHORT_DELAY; break; /* When a Feature is turned on, we want an up-siren. * When a Feature is turned off, we want a down-siren. * If we cannot do pitch, we want a single beep for on and two * beeps for off. */ case _BEEP_FEATURE_ON: if (name == None) name = featureOn; if (xkbInfo->beepCount < 1) { pitch = LOW_PITCH; duration = VERY_LONG_TONE; if (doesPitch) next = SHORT_DELAY; } else { pitch = MID_PITCH; duration = SHORT_TONE; } break; case _BEEP_FEATURE_OFF: if (name == None) name = featureOff; if (xkbInfo->beepCount < 1) { pitch = MID_PITCH; if (doesPitch) duration = VERY_LONG_TONE; else duration = SHORT_TONE; next = SHORT_DELAY; } else { pitch = LOW_PITCH; duration = SHORT_TONE; } break; /* Two high beeps indicate an LED or Feature changed * state, but that another LED or Feature is also on. * [[[WDW - This is not in AccessDOS ]]] */ case _BEEP_LED_CHANGE: if (name == None) name = ledChange; case _BEEP_FEATURE_CHANGE: if (name == None) name = featureChange; duration = SHORT_TONE; pitch = HIGH_PITCH; if (xkbInfo->beepCount < 1) { next = SHORT_DELAY; } break; /* Three high-pitched beeps are the warning that SlowKeys * is going to be turned on or off. */ case _BEEP_SLOW_WARN: if (name == None) name = slowWarn; duration = SHORT_TONE; pitch = HIGH_PITCH; if (xkbInfo->beepCount < 2) next = SHORT_DELAY; break; /* Click on SlowKeys press and accept. * Deep pitch when a SlowKey or BounceKey is rejected. * [[[WDW - Rejects are not in AccessDOS ]]] * If we cannot do pitch, we want single beeps. */ case _BEEP_SLOW_PRESS: if (name == None) name = slowPress; case _BEEP_SLOW_ACCEPT: if (name == None) name = slowAccept; case _BEEP_SLOW_RELEASE: if (name == None) name = slowRelease; duration = CLICK_DURATION; pitch = CLICK_PITCH; break; case _BEEP_BOUNCE_REJECT: if (name == None) name = bounceReject; case _BEEP_SLOW_REJECT: if (name == None) name = slowReject; duration = SHORT_TONE; pitch = DEEP_PITCH; break; /* Low followed by high pitch when a StickyKey is latched. * High pitch when a StickyKey is locked. * Low pitch when unlocked. * If we cannot do pitch, two beeps for latch, nothing for * lock, and two for unlock. */ case _BEEP_STICKY_LATCH: if (name == None) name = stickyLatch; duration = SHORT_TONE; if (xkbInfo->beepCount < 1) { next = SHORT_DELAY; pitch = LOW_PITCH; } else pitch = HIGH_PITCH; break; case _BEEP_STICKY_LOCK: if (name == None) name = stickyLock; if (doesPitch) { duration = SHORT_TONE; pitch = HIGH_PITCH; } break; case _BEEP_STICKY_UNLOCK: if (name == None) name = stickyUnlock; duration = SHORT_TONE; pitch = LOW_PITCH; if (!doesPitch && xkbInfo->beepCount < 1) next = SHORT_DELAY; break; } if (timer == NULL && duration > 0) { CARD32 starttime = GetTimeInMillis(); CARD32 elapsedtime; ctrl->bell_duration = duration; ctrl->bell_pitch = pitch; if (xkbInfo->beepCount == 0) { XkbHandleBell(0, 0, dev, ctrl->bell, (void *) ctrl, KbdFeedbackClass, name, None, NULL); } else if (xkbInfo->desc->ctrls->enabled_ctrls & XkbAudibleBellMask) { (*dev->kbdfeed->BellProc) (ctrl->bell, dev, (void *) ctrl, KbdFeedbackClass); } ctrl->bell_duration = oldDuration; ctrl->bell_pitch = oldPitch; xkbInfo->beepCount++; /* Some DDX schedule the beep and return immediately, others don't return until the beep is completed. We measure the time and if it's less than the beep duration, make sure not to schedule the next beep until after the current one finishes. */ elapsedtime = GetTimeInMillis(); if (elapsedtime > starttime) { /* watch out for millisecond counter overflow! */ elapsedtime -= starttime; } else { elapsedtime = 0; } if (elapsedtime < duration) { next += duration - elapsedtime; } } return next; } int XkbDDXAccessXBeep(DeviceIntPtr dev, unsigned what, unsigned which) { XkbSrvInfoRec *xkbInfo = dev->key->xkbInfo; CARD32 next; xkbInfo->beepType = what; xkbInfo->beepCount = 0; next = _XkbDDXBeepExpire(NULL, 0, (void *) dev); if (next > 0) { xkbInfo->beepTimer = TimerSet(xkbInfo->beepTimer, 0, next, _XkbDDXBeepExpire, (void *) dev); } return 1; } xorg-server-21.1.16/xkb/ddxCtrls.c0000644000175000017500000000517214757411105012357 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include #include void XkbDDXKeybdCtrlProc(DeviceIntPtr dev, KeybdCtrl * ctrl) { int realRepeat; realRepeat = ctrl->autoRepeat; if ((dev->kbdfeed) && (XkbDDXUsesSoftRepeat(dev))) ctrl->autoRepeat = 0; if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc) (*dev->key->xkbInfo->kbdProc) (dev, ctrl); ctrl->autoRepeat = realRepeat; return; } int XkbDDXUsesSoftRepeat(DeviceIntPtr pXDev) { return 1; } void XkbDDXChangeControls(DeviceIntPtr dev, XkbControlsPtr old, XkbControlsPtr new) { unsigned changed, i; unsigned char *rep_old, *rep_new, *rep_fb; changed = new->enabled_ctrls ^ old->enabled_ctrls; for (rep_old = old->per_key_repeat, rep_new = new->per_key_repeat, rep_fb = dev->kbdfeed->ctrl.autoRepeats, i = 0; i < XkbPerKeyBitArraySize; i++) { if (rep_old[i] != rep_new[i]) { rep_fb[i] = rep_new[i]; changed &= XkbPerKeyRepeatMask; } } if (changed & XkbPerKeyRepeatMask) { if (dev->kbdfeed->CtrlProc) (*dev->kbdfeed->CtrlProc) (dev, &dev->kbdfeed->ctrl); } return; } xorg-server-21.1.16/xkb/ddxLEDs.c0000644000175000017500000000437114757411105012057 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include #include static void XkbDDXUpdateIndicators(DeviceIntPtr dev, CARD32 new) { dev->kbdfeed->ctrl.leds = new; (*dev->kbdfeed->CtrlProc) (dev, &dev->kbdfeed->ctrl); return; } void XkbDDXUpdateDeviceIndicators(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, CARD32 new) { if (sli->fb.kf == dev->kbdfeed) XkbDDXUpdateIndicators(dev, new); else if (sli->class == KbdFeedbackClass) { KbdFeedbackPtr kf; kf = sli->fb.kf; if (kf && kf->CtrlProc) { (*kf->CtrlProc) (dev, &kf->ctrl); } } else if (sli->class == LedFeedbackClass) { LedFeedbackPtr lf; lf = sli->fb.lf; if (lf && lf->CtrlProc) { (*lf->CtrlProc) (dev, &lf->ctrl); } } return; } xorg-server-21.1.16/xkb/ddxLoad.c0000644000175000017500000003572214757411105012153 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include #include "xkb.h" #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\"" #define ERROR_PREFIX "\"> \"" #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\"" #define POST_ERROR_MSG2 "\"End of messages from xkbcomp\"" #if defined(WIN32) #define PATHSEPARATOR "\\" #else #define PATHSEPARATOR "/" #endif static unsigned LoadXKM(unsigned want, unsigned need, const char *keymap, XkbDescPtr *xkbRtrn); static void OutputDirectory(char *outdir, size_t size) { const char *directory = NULL; const char *pathsep = ""; int r = -1; #ifndef WIN32 /* Can we write an xkm and then open it too? */ if (access(XKM_OUTPUT_DIR, W_OK | X_OK) == 0) { directory = XKM_OUTPUT_DIR; if (XKM_OUTPUT_DIR[strlen(XKM_OUTPUT_DIR) - 1] != '/') pathsep = "/"; } #else directory = Win32TempDir(); pathsep = "\\"; #endif if (directory) r = snprintf(outdir, size, "%s%s", directory, pathsep); if (r < 0 || r >= size) { assert(strlen("/tmp/") < size); strcpy(outdir, "/tmp/"); } } /** * Callback invoked by XkbRunXkbComp. Write to out to talk to xkbcomp. */ typedef void (*xkbcomp_buffer_callback)(FILE *out, void *userdata); /** * Start xkbcomp, let the callback write into xkbcomp's stdin. When done, * return a strdup'd copy of the file name we've written to. */ static char * RunXkbComp(xkbcomp_buffer_callback callback, void *userdata) { FILE *out; char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX]; const char *emptystring = ""; char *xkbbasedirflag = NULL; const char *xkbbindir = emptystring; const char *xkbbindirsep = emptystring; #ifdef WIN32 /* WIN32 has no popen. The input must be stored in a file which is used as input for xkbcomp. xkbcomp does not read from stdin. */ char tmpname[PATH_MAX]; const char *xkmfile = tmpname; #else const char *xkmfile = "-"; #endif snprintf(keymap, sizeof(keymap), "server-%s", display); OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); #ifdef WIN32 strcpy(tmpname, Win32TempDir()); strcat(tmpname, "\\xkb_XXXXXX"); (void) mktemp(tmpname); #endif if (XkbBaseDirectory != NULL) { if (asprintf(&xkbbasedirflag, "\"-R%s\"", XkbBaseDirectory) == -1) xkbbasedirflag = NULL; } if (XkbBinDirectory != NULL) { int ld = strlen(XkbBinDirectory); int lps = strlen(PATHSEPARATOR); xkbbindir = XkbBinDirectory; if ((ld >= lps) && (strcmp(xkbbindir + ld - lps, PATHSEPARATOR) != 0)) { xkbbindirsep = PATHSEPARATOR; } } if (asprintf(&buf, "\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" " "-em1 %s -emp %s -eml %s \"%s%s.xkm\"", xkbbindir, xkbbindirsep, ((xkbDebugFlags < 2) ? 1 : ((xkbDebugFlags > 10) ? 10 : (int) xkbDebugFlags)), xkbbasedirflag ? xkbbasedirflag : "", xkmfile, PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1, xkm_output_dir, keymap) == -1) buf = NULL; free(xkbbasedirflag); if (!buf) { LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n"); return NULL; } #ifndef WIN32 out = Popen(buf, "w"); #else out = fopen(tmpname, "w"); #endif if (out != NULL) { /* Now write to xkbcomp */ (*callback)(out, userdata); #ifndef WIN32 if (Pclose(out) == 0) #else if (fclose(out) == 0 && System(buf) >= 0) #endif { if (xkbDebugFlags) DebugF("[xkb] xkb executes: %s\n", buf); free(buf); #ifdef WIN32 unlink(tmpname); #endif return xnfstrdup(keymap); } else { LogMessage(X_ERROR, "Error compiling keymap (%s) executing '%s'\n", keymap, buf); } #ifdef WIN32 /* remove the temporary file */ unlink(tmpname); #endif } else { #ifndef WIN32 LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp\n"); #else LogMessage(X_ERROR, "Could not open file %s\n", tmpname); #endif } free(buf); return NULL; } typedef struct { XkbDescPtr xkb; XkbComponentNamesPtr names; unsigned int want; unsigned int need; } XkbKeymapNamesCtx; static void xkb_write_keymap_for_names_cb(FILE *out, void *userdata) { XkbKeymapNamesCtx *ctx = userdata; #ifdef DEBUG if (xkbDebugFlags) { ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n"); XkbWriteXKBKeymapForNames(stderr, ctx->names, ctx->xkb, ctx->want, ctx->need); } #endif XkbWriteXKBKeymapForNames(out, ctx->names, ctx->xkb, ctx->want, ctx->need); } static Bool XkbDDXCompileKeymapByNames(XkbDescPtr xkb, XkbComponentNamesPtr names, unsigned want, unsigned need, char *nameRtrn, int nameRtrnLen) { char *keymap; Bool rc = FALSE; XkbKeymapNamesCtx ctx = { .xkb = xkb, .names = names, .want = want, .need = need }; keymap = RunXkbComp(xkb_write_keymap_for_names_cb, &ctx); if (keymap) { if(nameRtrn) strlcpy(nameRtrn, keymap, nameRtrnLen); free(keymap); rc = TRUE; } else if (nameRtrn) *nameRtrn = '\0'; return rc; } typedef struct { const char *keymap; size_t len; } XkbKeymapString; static void xkb_write_keymap_string_cb(FILE *out, void *userdata) { XkbKeymapString *s = userdata; fwrite(s->keymap, s->len, 1, out); } static unsigned int XkbDDXLoadKeymapFromString(DeviceIntPtr keybd, const char *keymap, int keymap_length, unsigned int want, unsigned int need, XkbDescPtr *xkbRtrn) { unsigned int have; char *map_name; XkbKeymapString map = { .keymap = keymap, .len = keymap_length }; *xkbRtrn = NULL; map_name = RunXkbComp(xkb_write_keymap_string_cb, &map); if (!map_name) { LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n"); return 0; } have = LoadXKM(want, need, map_name, xkbRtrn); free(map_name); return have; } static FILE * XkbDDXOpenConfigFile(const char *mapName, char *fileNameRtrn, int fileNameRtrnLen) { char buf[PATH_MAX], xkm_output_dir[PATH_MAX]; FILE *file; buf[0] = '\0'; if (mapName != NULL) { OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir)); if ((XkbBaseDirectory != NULL) && (xkm_output_dir[0] != '/') #ifdef WIN32 && (!isalpha(xkm_output_dir[0]) || xkm_output_dir[1] != ':') #endif ) { if (snprintf(buf, PATH_MAX, "%s/%s%s.xkm", XkbBaseDirectory, xkm_output_dir, mapName) >= PATH_MAX) buf[0] = '\0'; } else { if (snprintf(buf, PATH_MAX, "%s%s.xkm", xkm_output_dir, mapName) >= PATH_MAX) buf[0] = '\0'; } if (buf[0] != '\0') file = fopen(buf, "rb"); else file = NULL; } else file = NULL; if ((fileNameRtrn != NULL) && (fileNameRtrnLen > 0)) { strlcpy(fileNameRtrn, buf, fileNameRtrnLen); } return file; } static unsigned LoadXKM(unsigned want, unsigned need, const char *keymap, XkbDescPtr *xkbRtrn) { FILE *file; char fileName[PATH_MAX]; unsigned missing; file = XkbDDXOpenConfigFile(keymap, fileName, PATH_MAX); if (file == NULL) { LogMessage(X_ERROR, "Couldn't open compiled keymap file %s\n", fileName); return 0; } missing = XkmReadFile(file, need, want, xkbRtrn); if (*xkbRtrn == NULL) { LogMessage(X_ERROR, "Error loading keymap %s\n", fileName); fclose(file); (void) unlink(fileName); return 0; } else { DebugF("Loaded XKB keymap %s, defined=0x%x\n", fileName, (*xkbRtrn)->defined); } fclose(file); (void) unlink(fileName); return (need | want) & (~missing); } unsigned XkbDDXLoadKeymapByNames(DeviceIntPtr keybd, XkbComponentNamesPtr names, unsigned want, unsigned need, XkbDescPtr *xkbRtrn, char *nameRtrn, int nameRtrnLen) { XkbDescPtr xkb; *xkbRtrn = NULL; if ((keybd == NULL) || (keybd->key == NULL) || (keybd->key->xkbInfo == NULL)) xkb = NULL; else xkb = keybd->key->xkbInfo->desc; if ((names->keycodes == NULL) && (names->types == NULL) && (names->compat == NULL) && (names->symbols == NULL) && (names->geometry == NULL)) { LogMessage(X_ERROR, "XKB: No components provided for device %s\n", keybd->name ? keybd->name : "(unnamed keyboard)"); return 0; } else if (!XkbDDXCompileKeymapByNames(xkb, names, want, need, nameRtrn, nameRtrnLen)) { LogMessage(X_ERROR, "XKB: Couldn't compile keymap\n"); return 0; } return LoadXKM(want, need, nameRtrn, xkbRtrn); } Bool XkbDDXNamesFromRules(DeviceIntPtr keybd, const char *rules_name, XkbRF_VarDefsPtr defs, XkbComponentNamesPtr names) { char buf[PATH_MAX]; FILE *file; Bool complete; XkbRF_RulesPtr rules; if (!rules_name) return FALSE; if (snprintf(buf, PATH_MAX, "%s/rules/%s", XkbBaseDirectory, rules_name) >= PATH_MAX) { LogMessage(X_ERROR, "XKB: Rules name is too long\n"); return FALSE; } file = fopen(buf, "r"); if (!file) { LogMessage(X_ERROR, "XKB: Couldn't open rules file %s\n", buf); return FALSE; } rules = XkbRF_Create(); if (!rules) { LogMessage(X_ERROR, "XKB: Couldn't create rules struct\n"); fclose(file); return FALSE; } if (!XkbRF_LoadRules(file, rules)) { LogMessage(X_ERROR, "XKB: Couldn't parse rules file %s\n", rules_name); fclose(file); XkbRF_Free(rules, TRUE); return FALSE; } memset(names, 0, sizeof(*names)); complete = XkbRF_GetComponents(rules, defs, names); fclose(file); XkbRF_Free(rules, TRUE); if (!complete) LogMessage(X_ERROR, "XKB: Rules returned no components\n"); return complete; } static Bool XkbRMLVOtoKcCGST(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, XkbComponentNamesPtr kccgst) { XkbRF_VarDefsRec mlvo; mlvo.model = rmlvo->model; mlvo.layout = rmlvo->layout; mlvo.variant = rmlvo->variant; mlvo.options = rmlvo->options; return XkbDDXNamesFromRules(dev, rmlvo->rules, &mlvo, kccgst); } /** * Compile the given RMLVO keymap and return it. Returns the XkbDescPtr on * success or NULL on failure. If the components compiled are not a superset * or equal to need, the compilation is treated as failure. */ static XkbDescPtr XkbCompileKeymapForDevice(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, int need) { XkbDescPtr xkb = NULL; unsigned int provided; XkbComponentNamesRec kccgst = { 0 }; char name[PATH_MAX]; if (XkbRMLVOtoKcCGST(dev, rmlvo, &kccgst)) { provided = XkbDDXLoadKeymapByNames(dev, &kccgst, XkmAllIndicesMask, need, &xkb, name, PATH_MAX); if ((need & provided) != need) { if (xkb) { XkbFreeKeyboard(xkb, 0, TRUE); xkb = NULL; } } } XkbFreeComponentNames(&kccgst, FALSE); return xkb; } static XkbDescPtr KeymapOrDefaults(DeviceIntPtr dev, XkbDescPtr xkb) { XkbRMLVOSet dflts; if (xkb) return xkb; /* we didn't get what we really needed. And that will likely leave * us with a keyboard that doesn't work. Use the defaults instead */ LogMessage(X_ERROR, "XKB: Failed to load keymap. Loading default " "keymap instead.\n"); XkbGetRulesDflts(&dflts); xkb = XkbCompileKeymapForDevice(dev, &dflts, 0); XkbFreeRMLVOSet(&dflts, FALSE); return xkb; } XkbDescPtr XkbCompileKeymap(DeviceIntPtr dev, XkbRMLVOSet * rmlvo) { XkbDescPtr xkb; unsigned int need; if (!dev || !rmlvo) { LogMessage(X_ERROR, "XKB: No device or RMLVO specified\n"); return NULL; } /* These are the components we really really need */ need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask | XkmKeyNamesMask | XkmVirtualModsMask; xkb = XkbCompileKeymapForDevice(dev, rmlvo, need); return KeymapOrDefaults(dev, xkb); } XkbDescPtr XkbCompileKeymapFromString(DeviceIntPtr dev, const char *keymap, int keymap_length) { XkbDescPtr xkb; unsigned int need, provided; if (!dev || !keymap) { LogMessage(X_ERROR, "XKB: No device or keymap specified\n"); return NULL; } /* These are the components we really really need */ need = XkmSymbolsMask | XkmCompatMapMask | XkmTypesMask | XkmKeyNamesMask | XkmVirtualModsMask; provided = XkbDDXLoadKeymapFromString(dev, keymap, keymap_length, XkmAllIndicesMask, need, &xkb); if ((need & provided) != need) { if (xkb) { XkbFreeKeyboard(xkb, 0, TRUE); xkb = NULL; } } return KeymapOrDefaults(dev, xkb); } xorg-server-21.1.16/xkb/xkb.c0000644000175000017500000071076514757411105011367 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include "misc.h" #include "inputstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "extnsionst.h" #include "extinit.h" #include "xace.h" #include "xkb.h" #include "protocol-versions.h" #include #include int XkbEventBase; static int XkbErrorBase; int XkbReqCode; int XkbKeyboardErrorCode; CARD32 xkbDebugFlags = 0; static CARD32 xkbDebugCtrls = 0; static RESTYPE RT_XKBCLIENT; /***====================================================================***/ #define CHK_DEVICE(dev, id, client, access_mode, lf) {\ int why;\ int tmprc = lf(&(dev), id, client, access_mode, &why);\ if (tmprc != Success) {\ client->errorValue = _XkbErrCode2(why, id);\ return tmprc;\ }\ } #define CHK_KBD_DEVICE(dev, id, client, mode) \ CHK_DEVICE(dev, id, client, mode, _XkbLookupKeyboard) #define CHK_LED_DEVICE(dev, id, client, mode) \ CHK_DEVICE(dev, id, client, mode, _XkbLookupLedDevice) #define CHK_BELL_DEVICE(dev, id, client, mode) \ CHK_DEVICE(dev, id, client, mode, _XkbLookupBellDevice) #define CHK_ANY_DEVICE(dev, id, client, mode) \ CHK_DEVICE(dev, id, client, mode, _XkbLookupAnyDevice) #define CHK_ATOM_ONLY2(a,ev,er) {\ if (((a)==None)||(!ValidAtom((a)))) {\ (ev)= (XID)(a);\ return er;\ }\ } #define CHK_ATOM_ONLY(a) \ CHK_ATOM_ONLY2(a,client->errorValue,BadAtom) #define CHK_ATOM_OR_NONE3(a,ev,er,ret) {\ if (((a)!=None)&&(!ValidAtom((a)))) {\ (ev)= (XID)(a);\ (er)= BadAtom;\ return ret;\ }\ } #define CHK_ATOM_OR_NONE2(a,ev,er) {\ if (((a)!=None)&&(!ValidAtom((a)))) {\ (ev)= (XID)(a);\ return er;\ }\ } #define CHK_ATOM_OR_NONE(a) \ CHK_ATOM_OR_NONE2(a,client->errorValue,BadAtom) #define CHK_MASK_LEGAL3(err,mask,legal,ev,er,ret) {\ if ((mask)&(~(legal))) { \ (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\ (er)= BadValue;\ return ret;\ }\ } #define CHK_MASK_LEGAL2(err,mask,legal,ev,er) {\ if ((mask)&(~(legal))) { \ (ev)= _XkbErrCode2((err),((mask)&(~(legal))));\ return er;\ }\ } #define CHK_MASK_LEGAL(err,mask,legal) \ CHK_MASK_LEGAL2(err,mask,legal,client->errorValue,BadValue) #define CHK_MASK_MATCH(err,affect,value) {\ if ((value)&(~(affect))) { \ client->errorValue= _XkbErrCode2((err),((value)&(~(affect))));\ return BadMatch;\ }\ } #define CHK_MASK_OVERLAP(err,m1,m2) {\ if ((m1)&(m2)) { \ client->errorValue= _XkbErrCode2((err),((m1)&(m2)));\ return BadMatch;\ }\ } #define CHK_KEY_RANGE2(err,first,num,x,ev,er) {\ if (((unsigned)(first)+(num)-1)>(x)->max_key_code) {\ (ev)=_XkbErrCode4(err,(first),(num),(x)->max_key_code);\ return er;\ }\ else if ( (first)<(x)->min_key_code ) {\ (ev)=_XkbErrCode3(err+1,(first),xkb->min_key_code);\ return er;\ }\ } #define CHK_KEY_RANGE(err,first,num,x) \ CHK_KEY_RANGE2(err,first,num,x,client->errorValue,BadValue) #define CHK_REQ_KEY_RANGE2(err,first,num,r,ev,er) {\ if (((unsigned)(first)+(num)-1)>(r)->maxKeyCode) {\ (ev)=_XkbErrCode4(err,(first),(num),(r)->maxKeyCode);\ return er;\ }\ else if ( (first)<(r)->minKeyCode ) {\ (ev)=_XkbErrCode3(err+1,(first),(r)->minKeyCode);\ return er;\ }\ } #define CHK_REQ_KEY_RANGE(err,first,num,r) \ CHK_REQ_KEY_RANGE2(err,first,num,r,client->errorValue,BadValue) static Bool _XkbCheckRequestBounds(ClientPtr client, void *stuff, void *from, void *to) { char *cstuff = (char *)stuff; char *cfrom = (char *)from; char *cto = (char *)to; return cfrom < cto && cfrom >= cstuff && cfrom < cstuff + ((size_t)client->req_len << 2) && cto >= cstuff && cto <= cstuff + ((size_t)client->req_len << 2); } /***====================================================================***/ int ProcXkbUseExtension(ClientPtr client) { REQUEST(xkbUseExtensionReq); xkbUseExtensionReply rep; int supported; REQUEST_SIZE_MATCH(xkbUseExtensionReq); if (stuff->wantedMajor != SERVER_XKB_MAJOR_VERSION) { /* pre-release version 0.65 is compatible with 1.00 */ supported = ((SERVER_XKB_MAJOR_VERSION == 1) && (stuff->wantedMajor == 0) && (stuff->wantedMinor == 65)); } else supported = 1; if ((supported) && (!(client->xkbClientFlags & _XkbClientInitialized))) { client->xkbClientFlags = _XkbClientInitialized; if (stuff->wantedMajor == 0) client->xkbClientFlags |= _XkbClientIsAncient; } else if (xkbDebugFlags & 0x1) { ErrorF ("[xkb] Rejecting client %d (0x%lx) (wants %d.%02d, have %d.%02d)\n", client->index, (long) client->clientAsMask, stuff->wantedMajor, stuff->wantedMinor, SERVER_XKB_MAJOR_VERSION, SERVER_XKB_MINOR_VERSION); } rep = (xkbUseExtensionReply) { .type = X_Reply, .supported = supported, .sequenceNumber = client->sequence, .length = 0, .serverMajor = SERVER_XKB_MAJOR_VERSION, .serverMinor = SERVER_XKB_MINOR_VERSION }; if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.serverMajor); swaps(&rep.serverMinor); } WriteToClient(client, SIZEOF(xkbUseExtensionReply), &rep); return Success; } /***====================================================================***/ int ProcXkbSelectEvents(ClientPtr client) { unsigned legal; DeviceIntPtr dev; XkbInterestPtr masks; REQUEST(xkbSelectEventsReq); REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixUseAccess); if (((stuff->affectWhich & XkbMapNotifyMask) != 0) && (stuff->affectMap)) { client->mapNotifyMask &= ~stuff->affectMap; client->mapNotifyMask |= (stuff->affectMap & stuff->map); } if ((stuff->affectWhich & (~XkbMapNotifyMask)) == 0) return Success; masks = XkbFindClientResource((DevicePtr) dev, client); if (!masks) { XID id = FakeClientID(client->index); if (!AddResource(id, RT_XKBCLIENT, dev)) return BadAlloc; masks = XkbAddClientResource((DevicePtr) dev, client, id); } if (masks) { union { CARD8 *c8; CARD16 *c16; CARD32 *c32; } from, to; register unsigned bit, ndx, maskLeft, dataLeft, size; from.c8 = (CARD8 *) &stuff[1]; dataLeft = (stuff->length * 4) - SIZEOF(xkbSelectEventsReq); maskLeft = (stuff->affectWhich & (~XkbMapNotifyMask)); for (ndx = 0, bit = 1; (maskLeft != 0); ndx++, bit <<= 1) { if ((bit & maskLeft) == 0) continue; maskLeft &= ~bit; switch (ndx) { case XkbNewKeyboardNotify: to.c16 = &client->newKeyboardNotifyMask; legal = XkbAllNewKeyboardEventsMask; size = 2; break; case XkbStateNotify: to.c16 = &masks->stateNotifyMask; legal = XkbAllStateEventsMask; size = 2; break; case XkbControlsNotify: to.c32 = &masks->ctrlsNotifyMask; legal = XkbAllControlEventsMask; size = 4; break; case XkbIndicatorStateNotify: to.c32 = &masks->iStateNotifyMask; legal = XkbAllIndicatorEventsMask; size = 4; break; case XkbIndicatorMapNotify: to.c32 = &masks->iMapNotifyMask; legal = XkbAllIndicatorEventsMask; size = 4; break; case XkbNamesNotify: to.c16 = &masks->namesNotifyMask; legal = XkbAllNameEventsMask; size = 2; break; case XkbCompatMapNotify: to.c8 = &masks->compatNotifyMask; legal = XkbAllCompatMapEventsMask; size = 1; break; case XkbBellNotify: to.c8 = &masks->bellNotifyMask; legal = XkbAllBellEventsMask; size = 1; break; case XkbActionMessage: to.c8 = &masks->actionMessageMask; legal = XkbAllActionMessagesMask; size = 1; break; case XkbAccessXNotify: to.c16 = &masks->accessXNotifyMask; legal = XkbAllAccessXEventsMask; size = 2; break; case XkbExtensionDeviceNotify: to.c16 = &masks->extDevNotifyMask; legal = XkbAllExtensionDeviceEventsMask; size = 2; break; default: client->errorValue = _XkbErrCode2(33, bit); return BadValue; } if (stuff->clear & bit) { if (size == 2) to.c16[0] = 0; else if (size == 4) to.c32[0] = 0; else to.c8[0] = 0; } else if (stuff->selectAll & bit) { if (size == 2) to.c16[0] = ~0; else if (size == 4) to.c32[0] = ~0; else to.c8[0] = ~0; } else { if (dataLeft < (size * 2)) return BadLength; if (size == 2) { CHK_MASK_MATCH(ndx, from.c16[0], from.c16[1]); CHK_MASK_LEGAL(ndx, from.c16[0], legal); to.c16[0] &= ~from.c16[0]; to.c16[0] |= (from.c16[0] & from.c16[1]); } else if (size == 4) { CHK_MASK_MATCH(ndx, from.c32[0], from.c32[1]); CHK_MASK_LEGAL(ndx, from.c32[0], legal); to.c32[0] &= ~from.c32[0]; to.c32[0] |= (from.c32[0] & from.c32[1]); } else { CHK_MASK_MATCH(ndx, from.c8[0], from.c8[1]); CHK_MASK_LEGAL(ndx, from.c8[0], legal); to.c8[0] &= ~from.c8[0]; to.c8[0] |= (from.c8[0] & from.c8[1]); size = 2; } from.c8 += (size * 2); dataLeft -= (size * 2); } } if (dataLeft > 2) { ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n", dataLeft); return BadLength; } return Success; } return BadAlloc; } /***====================================================================***/ /** * Ring a bell on the given device for the given client. */ static int _XkbBell(ClientPtr client, DeviceIntPtr dev, WindowPtr pWin, int bellClass, int bellID, int pitch, int duration, int percent, int forceSound, int eventOnly, Atom name) { int base; void *ctrl; int oldPitch, oldDuration; int newPercent; if (bellClass == KbdFeedbackClass) { KbdFeedbackPtr k; if (bellID == XkbDfltXIId) k = dev->kbdfeed; else { for (k = dev->kbdfeed; k; k = k->next) { if (k->ctrl.id == bellID) break; } } if (!k) { client->errorValue = _XkbErrCode2(0x5, bellID); return BadValue; } base = k->ctrl.bell; ctrl = (void *) &(k->ctrl); oldPitch = k->ctrl.bell_pitch; oldDuration = k->ctrl.bell_duration; if (pitch != 0) { if (pitch == -1) k->ctrl.bell_pitch = defaultKeyboardControl.bell_pitch; else k->ctrl.bell_pitch = pitch; } if (duration != 0) { if (duration == -1) k->ctrl.bell_duration = defaultKeyboardControl.bell_duration; else k->ctrl.bell_duration = duration; } } else if (bellClass == BellFeedbackClass) { BellFeedbackPtr b; if (bellID == XkbDfltXIId) b = dev->bell; else { for (b = dev->bell; b; b = b->next) { if (b->ctrl.id == bellID) break; } } if (!b) { client->errorValue = _XkbErrCode2(0x6, bellID); return BadValue; } base = b->ctrl.percent; ctrl = (void *) &(b->ctrl); oldPitch = b->ctrl.pitch; oldDuration = b->ctrl.duration; if (pitch != 0) { if (pitch == -1) b->ctrl.pitch = defaultKeyboardControl.bell_pitch; else b->ctrl.pitch = pitch; } if (duration != 0) { if (duration == -1) b->ctrl.duration = defaultKeyboardControl.bell_duration; else b->ctrl.duration = duration; } } else { client->errorValue = _XkbErrCode2(0x7, bellClass); return BadValue; } newPercent = (base * percent) / 100; if (percent < 0) newPercent = base + newPercent; else newPercent = base - newPercent + percent; XkbHandleBell(forceSound, eventOnly, dev, newPercent, ctrl, bellClass, name, pWin, client); if ((pitch != 0) || (duration != 0)) { if (bellClass == KbdFeedbackClass) { KbdFeedbackPtr k; k = (KbdFeedbackPtr) ctrl; if (pitch != 0) k->ctrl.bell_pitch = oldPitch; if (duration != 0) k->ctrl.bell_duration = oldDuration; } else { BellFeedbackPtr b; b = (BellFeedbackPtr) ctrl; if (pitch != 0) b->ctrl.pitch = oldPitch; if (duration != 0) b->ctrl.duration = oldDuration; } } return Success; } int ProcXkbBell(ClientPtr client) { REQUEST(xkbBellReq); DeviceIntPtr dev; WindowPtr pWin; int rc; REQUEST_SIZE_MATCH(xkbBellReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_BELL_DEVICE(dev, stuff->deviceSpec, client, DixBellAccess); CHK_ATOM_OR_NONE(stuff->name); /* device-independent checks request for sane values */ if ((stuff->forceSound) && (stuff->eventOnly)) { client->errorValue = _XkbErrCode3(0x1, stuff->forceSound, stuff->eventOnly); return BadMatch; } if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = _XkbErrCode2(0x2, stuff->percent); return BadValue; } if (stuff->duration < -1) { client->errorValue = _XkbErrCode2(0x3, stuff->duration); return BadValue; } if (stuff->pitch < -1) { client->errorValue = _XkbErrCode2(0x4, stuff->pitch); return BadValue; } if (stuff->bellClass == XkbDfltXIClass) { if (dev->kbdfeed != NULL) stuff->bellClass = KbdFeedbackClass; else stuff->bellClass = BellFeedbackClass; } if (stuff->window != None) { rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; return rc; } } else pWin = NULL; /* Client wants to ring a bell on the core keyboard? Ring the bell on the core keyboard (which does nothing, but if that fails the client is screwed anyway), and then on all extension devices. Fail if the core keyboard fails but not the extension devices. this may cause some keyboards to ding and others to stay silent. Fix your client to use explicit keyboards to avoid this. dev is the device the client requested. */ rc = _XkbBell(client, dev, pWin, stuff->bellClass, stuff->bellID, stuff->pitch, stuff->duration, stuff->percent, stuff->forceSound, stuff->eventOnly, stuff->name); if ((rc == Success) && ((stuff->deviceSpec == XkbUseCoreKbd) || (stuff->deviceSpec == XkbUseCorePtr))) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess); if (rc == Success) _XkbBell(client, other, pWin, stuff->bellClass, stuff->bellID, stuff->pitch, stuff->duration, stuff->percent, stuff->forceSound, stuff->eventOnly, stuff->name); } } rc = Success; /* reset to success, that's what we got for the VCK */ } return rc; } /***====================================================================***/ int ProcXkbGetState(ClientPtr client) { REQUEST(xkbGetStateReq); DeviceIntPtr dev; xkbGetStateReply rep; XkbStateRec *xkb; REQUEST_SIZE_MATCH(xkbGetStateReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = &dev->key->xkbInfo->state; rep = (xkbGetStateReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0, .mods = XkbStateFieldFromRec(xkb) & 0xff, .baseMods = xkb->base_mods, .latchedMods = xkb->latched_mods, .lockedMods = xkb->locked_mods, .group = xkb->group, .lockedGroup = xkb->locked_group, .baseGroup = xkb->base_group, .latchedGroup = xkb->latched_group, .compatState = xkb->compat_state, .ptrBtnState = xkb->ptr_buttons }; if (client->swapped) { swaps(&rep.sequenceNumber); swaps(&rep.ptrBtnState); } WriteToClient(client, SIZEOF(xkbGetStateReply), &rep); return Success; } /***====================================================================***/ int ProcXkbLatchLockState(ClientPtr client) { int status; DeviceIntPtr dev, tmpd; XkbStateRec oldState, *newState; CARD16 changed; xkbStateNotify sn; XkbEventCauseRec cause; REQUEST(xkbLatchLockStateReq); REQUEST_SIZE_MATCH(xkbLatchLockStateReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_MASK_MATCH(0x01, stuff->affectModLocks, stuff->modLocks); CHK_MASK_MATCH(0x01, stuff->affectModLatches, stuff->modLatches); status = Success; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) { if (!tmpd->key || !tmpd->key->xkbInfo) continue; oldState = tmpd->key->xkbInfo->state; newState = &tmpd->key->xkbInfo->state; if (stuff->affectModLocks) { newState->locked_mods &= ~stuff->affectModLocks; newState->locked_mods |= (stuff->affectModLocks & stuff->modLocks); } if (status == Success && stuff->lockGroup) newState->locked_group = stuff->groupLock; if (status == Success && stuff->affectModLatches) status = XkbLatchModifiers(tmpd, stuff->affectModLatches, stuff->modLatches); if (status == Success && stuff->latchGroup) status = XkbLatchGroup(tmpd, stuff->groupLatch); if (status != Success) return status; XkbComputeDerivedState(tmpd->key->xkbInfo); changed = XkbStateChangedFlags(&oldState, newState); if (changed) { sn.keycode = 0; sn.eventType = 0; sn.requestMajor = XkbReqCode; sn.requestMinor = X_kbLatchLockState; sn.changed = changed; XkbSendStateNotify(tmpd, &sn); changed = XkbIndicatorsToUpdate(tmpd, changed, FALSE); if (changed) { XkbSetCauseXkbReq(&cause, X_kbLatchLockState, client); XkbUpdateIndicators(tmpd, changed, TRUE, NULL, &cause); } } } } return Success; } /***====================================================================***/ int ProcXkbGetControls(ClientPtr client) { xkbGetControlsReply rep; XkbControlsPtr xkb; DeviceIntPtr dev; REQUEST(xkbGetControlsReq); REQUEST_SIZE_MATCH(xkbGetControlsReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = dev->key->xkbInfo->desc->ctrls; rep = (xkbGetControlsReply) { .type = X_Reply, .deviceID = ((DeviceIntPtr) dev)->id, .sequenceNumber = client->sequence, .length = bytes_to_int32(SIZEOF(xkbGetControlsReply) - SIZEOF(xGenericReply)), .mkDfltBtn = xkb->mk_dflt_btn, .numGroups = xkb->num_groups, .groupsWrap = xkb->groups_wrap, .internalMods = xkb->internal.mask, .ignoreLockMods = xkb->ignore_lock.mask, .internalRealMods = xkb->internal.real_mods, .ignoreLockRealMods = xkb->ignore_lock.real_mods, .internalVMods = xkb->internal.vmods, .ignoreLockVMods = xkb->ignore_lock.vmods, .repeatDelay = xkb->repeat_delay, .repeatInterval = xkb->repeat_interval, .slowKeysDelay = xkb->slow_keys_delay, .debounceDelay = xkb->debounce_delay, .mkDelay = xkb->mk_delay, .mkInterval = xkb->mk_interval, .mkTimeToMax = xkb->mk_time_to_max, .mkMaxSpeed = xkb->mk_max_speed, .mkCurve = xkb->mk_curve, .axOptions = xkb->ax_options, .axTimeout = xkb->ax_timeout, .axtOptsMask = xkb->axt_opts_mask, .axtOptsValues = xkb->axt_opts_values, .axtCtrlsMask = xkb->axt_ctrls_mask, .axtCtrlsValues = xkb->axt_ctrls_values, .enabledCtrls = xkb->enabled_ctrls, }; memcpy(rep.perKeyRepeat, xkb->per_key_repeat, XkbPerKeyBitArraySize); if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.internalVMods); swaps(&rep.ignoreLockVMods); swapl(&rep.enabledCtrls); swaps(&rep.repeatDelay); swaps(&rep.repeatInterval); swaps(&rep.slowKeysDelay); swaps(&rep.debounceDelay); swaps(&rep.mkDelay); swaps(&rep.mkInterval); swaps(&rep.mkTimeToMax); swaps(&rep.mkMaxSpeed); swaps(&rep.mkCurve); swaps(&rep.axTimeout); swapl(&rep.axtCtrlsMask); swapl(&rep.axtCtrlsValues); swaps(&rep.axtOptsMask); swaps(&rep.axtOptsValues); swaps(&rep.axOptions); } WriteToClient(client, SIZEOF(xkbGetControlsReply), &rep); return Success; } int ProcXkbSetControls(ClientPtr client) { DeviceIntPtr dev, tmpd; XkbSrvInfoPtr xkbi; XkbControlsPtr ctrl; XkbControlsRec new, old; xkbControlsNotify cn; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; REQUEST(xkbSetControlsReq); REQUEST_SIZE_MATCH(xkbSetControlsReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->changeCtrls, XkbAllControlsMask); for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { if (!tmpd->key || !tmpd->key->xkbInfo) continue; if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) { xkbi = tmpd->key->xkbInfo; ctrl = xkbi->desc->ctrls; new = *ctrl; XkbSetCauseXkbReq(&cause, X_kbSetControls, client); if (stuff->changeCtrls & XkbInternalModsMask) { CHK_MASK_MATCH(0x02, stuff->affectInternalMods, stuff->internalMods); CHK_MASK_MATCH(0x03, stuff->affectInternalVMods, stuff->internalVMods); new.internal.real_mods &= ~(stuff->affectInternalMods); new.internal.real_mods |= (stuff->affectInternalMods & stuff->internalMods); new.internal.vmods &= ~(stuff->affectInternalVMods); new.internal.vmods |= (stuff->affectInternalVMods & stuff->internalVMods); new.internal.mask = new.internal.real_mods | XkbMaskForVMask(xkbi->desc, new.internal.vmods); } if (stuff->changeCtrls & XkbIgnoreLockModsMask) { CHK_MASK_MATCH(0x4, stuff->affectIgnoreLockMods, stuff->ignoreLockMods); CHK_MASK_MATCH(0x5, stuff->affectIgnoreLockVMods, stuff->ignoreLockVMods); new.ignore_lock.real_mods &= ~(stuff->affectIgnoreLockMods); new.ignore_lock.real_mods |= (stuff->affectIgnoreLockMods & stuff->ignoreLockMods); new.ignore_lock.vmods &= ~(stuff->affectIgnoreLockVMods); new.ignore_lock.vmods |= (stuff->affectIgnoreLockVMods & stuff->ignoreLockVMods); new.ignore_lock.mask = new.ignore_lock.real_mods | XkbMaskForVMask(xkbi->desc, new.ignore_lock.vmods); } CHK_MASK_MATCH(0x06, stuff->affectEnabledCtrls, stuff->enabledCtrls); if (stuff->affectEnabledCtrls) { CHK_MASK_LEGAL(0x07, stuff->affectEnabledCtrls, XkbAllBooleanCtrlsMask); new.enabled_ctrls &= ~(stuff->affectEnabledCtrls); new.enabled_ctrls |= (stuff->affectEnabledCtrls & stuff->enabledCtrls); } if (stuff->changeCtrls & XkbRepeatKeysMask) { if (stuff->repeatDelay < 1 || stuff->repeatInterval < 1) { client->errorValue = _XkbErrCode3(0x08, stuff->repeatDelay, stuff->repeatInterval); return BadValue; } new.repeat_delay = stuff->repeatDelay; new.repeat_interval = stuff->repeatInterval; } if (stuff->changeCtrls & XkbSlowKeysMask) { if (stuff->slowKeysDelay < 1) { client->errorValue = _XkbErrCode2(0x09, stuff->slowKeysDelay); return BadValue; } new.slow_keys_delay = stuff->slowKeysDelay; } if (stuff->changeCtrls & XkbBounceKeysMask) { if (stuff->debounceDelay < 1) { client->errorValue = _XkbErrCode2(0x0A, stuff->debounceDelay); return BadValue; } new.debounce_delay = stuff->debounceDelay; } if (stuff->changeCtrls & XkbMouseKeysMask) { if (stuff->mkDfltBtn > XkbMaxMouseKeysBtn) { client->errorValue = _XkbErrCode2(0x0B, stuff->mkDfltBtn); return BadValue; } new.mk_dflt_btn = stuff->mkDfltBtn; } if (stuff->changeCtrls & XkbMouseKeysAccelMask) { if (stuff->mkDelay < 1 || stuff->mkInterval < 1 || stuff->mkTimeToMax < 1 || stuff->mkMaxSpeed < 1 || stuff->mkCurve < -1000) { client->errorValue = _XkbErrCode2(0x0C, 0); return BadValue; } new.mk_delay = stuff->mkDelay; new.mk_interval = stuff->mkInterval; new.mk_time_to_max = stuff->mkTimeToMax; new.mk_max_speed = stuff->mkMaxSpeed; new.mk_curve = stuff->mkCurve; AccessXComputeCurveFactor(xkbi, &new); } if (stuff->changeCtrls & XkbGroupsWrapMask) { unsigned act, num; act = XkbOutOfRangeGroupAction(stuff->groupsWrap); switch (act) { case XkbRedirectIntoRange: num = XkbOutOfRangeGroupNumber(stuff->groupsWrap); if (num >= new.num_groups) { client->errorValue = _XkbErrCode3(0x0D, new.num_groups, num); return BadValue; } case XkbWrapIntoRange: case XkbClampIntoRange: break; default: client->errorValue = _XkbErrCode2(0x0E, act); return BadValue; } new.groups_wrap = stuff->groupsWrap; } CHK_MASK_LEGAL(0x0F, stuff->axOptions, XkbAX_AllOptionsMask); if (stuff->changeCtrls & XkbAccessXKeysMask) { new.ax_options = stuff->axOptions & XkbAX_AllOptionsMask; } else { if (stuff->changeCtrls & XkbStickyKeysMask) { new.ax_options &= ~(XkbAX_SKOptionsMask); new.ax_options |= (stuff->axOptions & XkbAX_SKOptionsMask); } if (stuff->changeCtrls & XkbAccessXFeedbackMask) { new.ax_options &= ~(XkbAX_FBOptionsMask); new.ax_options |= (stuff->axOptions & XkbAX_FBOptionsMask); } } if (stuff->changeCtrls & XkbAccessXTimeoutMask) { if (stuff->axTimeout < 1) { client->errorValue = _XkbErrCode2(0x10, stuff->axTimeout); return BadValue; } CHK_MASK_MATCH(0x11, stuff->axtCtrlsMask, stuff->axtCtrlsValues); CHK_MASK_LEGAL(0x12, stuff->axtCtrlsMask, XkbAllBooleanCtrlsMask); CHK_MASK_MATCH(0x13, stuff->axtOptsMask, stuff->axtOptsValues); CHK_MASK_LEGAL(0x14, stuff->axtOptsMask, XkbAX_AllOptionsMask); new.ax_timeout = stuff->axTimeout; new.axt_ctrls_mask = stuff->axtCtrlsMask; new.axt_ctrls_values = (stuff->axtCtrlsValues & stuff->axtCtrlsMask); new.axt_opts_mask = stuff->axtOptsMask; new.axt_opts_values = (stuff->axtOptsValues & stuff->axtOptsMask); } if (stuff->changeCtrls & XkbPerKeyRepeatMask) { memcpy(new.per_key_repeat, stuff->perKeyRepeat, XkbPerKeyBitArraySize); if (xkbi->repeatKey && !BitIsOn(new.per_key_repeat, xkbi->repeatKey)) { AccessXCancelRepeatKey(xkbi, xkbi->repeatKey); } } old = *ctrl; *ctrl = new; XkbDDXChangeControls(tmpd, &old, ctrl); if (XkbComputeControlsNotify(tmpd, &old, ctrl, &cn, FALSE)) { cn.keycode = 0; cn.eventType = 0; cn.requestMajor = XkbReqCode; cn.requestMinor = X_kbSetControls; XkbSendControlsNotify(tmpd, &cn); } sli = XkbFindSrvLedInfo(tmpd, XkbDfltXIClass, XkbDfltXIId, 0); if (sli) XkbUpdateIndicators(tmpd, sli->usesControls, TRUE, NULL, &cause); /* If sticky keys were disabled, clear all locks and latches */ if ((old.enabled_ctrls & XkbStickyKeysMask) && !(ctrl->enabled_ctrls & XkbStickyKeysMask)) XkbClearAllLatchesAndLocks(tmpd, xkbi, TRUE, &cause); } } return Success; } /***====================================================================***/ static int XkbSizeKeyTypes(XkbDescPtr xkb, xkbGetMapReply * rep) { XkbKeyTypeRec *type; unsigned i, len; len = 0; if (((rep->present & XkbKeyTypesMask) == 0) || (rep->nTypes < 1) || (!xkb) || (!xkb->map) || (!xkb->map->types)) { rep->present &= ~XkbKeyTypesMask; rep->firstType = rep->nTypes = 0; return 0; } type = &xkb->map->types[rep->firstType]; for (i = 0; i < rep->nTypes; i++, type++) { len += SIZEOF(xkbKeyTypeWireDesc); if (type->map_count > 0) { len += (type->map_count * SIZEOF(xkbKTMapEntryWireDesc)); if (type->preserve) len += (type->map_count * SIZEOF(xkbModsWireDesc)); } } return len; } static char * XkbWriteKeyTypes(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { XkbKeyTypePtr type; unsigned i; xkbKeyTypeWireDesc *wire; type = &xkb->map->types[rep->firstType]; for (i = 0; i < rep->nTypes; i++, type++) { register unsigned n; wire = (xkbKeyTypeWireDesc *) buf; wire->mask = type->mods.mask; wire->realMods = type->mods.real_mods; wire->virtualMods = type->mods.vmods; wire->numLevels = type->num_levels; wire->nMapEntries = type->map_count; wire->preserve = (type->preserve != NULL); if (client->swapped) { swaps(&wire->virtualMods); } buf = (char *) &wire[1]; if (wire->nMapEntries > 0) { xkbKTMapEntryWireDesc *ewire; XkbKTMapEntryPtr entry; ewire = (xkbKTMapEntryWireDesc *) buf; entry = type->map; for (n = 0; n < type->map_count; n++, ewire++, entry++) { ewire->active = entry->active; ewire->mask = entry->mods.mask; ewire->level = entry->level; ewire->realMods = entry->mods.real_mods; ewire->virtualMods = entry->mods.vmods; if (client->swapped) { swaps(&ewire->virtualMods); } } buf = (char *) ewire; if (type->preserve != NULL) { xkbModsWireDesc *pwire; XkbModsPtr preserve; pwire = (xkbModsWireDesc *) buf; preserve = type->preserve; for (n = 0; n < type->map_count; n++, pwire++, preserve++) { pwire->mask = preserve->mask; pwire->realMods = preserve->real_mods; pwire->virtualMods = preserve->vmods; if (client->swapped) { swaps(&pwire->virtualMods); } } buf = (char *) pwire; } } } return buf; } static int XkbSizeKeySyms(XkbDescPtr xkb, xkbGetMapReply * rep) { XkbSymMapPtr symMap; unsigned i, len; unsigned nSyms, nSymsThisKey; if (((rep->present & XkbKeySymsMask) == 0) || (rep->nKeySyms < 1) || (!xkb) || (!xkb->map) || (!xkb->map->key_sym_map)) { rep->present &= ~XkbKeySymsMask; rep->firstKeySym = rep->nKeySyms = 0; rep->totalSyms = 0; return 0; } len = rep->nKeySyms * SIZEOF(xkbSymMapWireDesc); symMap = &xkb->map->key_sym_map[rep->firstKeySym]; for (i = nSyms = 0; i < rep->nKeySyms; i++, symMap++) { nSymsThisKey = XkbNumGroups(symMap->group_info) * symMap->width; if (nSymsThisKey == 0) continue; nSyms += nSymsThisKey; } len += nSyms * 4; rep->totalSyms = nSyms; return len; } static int XkbSizeVirtualMods(XkbDescPtr xkb, xkbGetMapReply * rep) { register unsigned i, nMods, bit; if (((rep->present & XkbVirtualModsMask) == 0) || (rep->virtualMods == 0) || (!xkb) || (!xkb->server)) { rep->present &= ~XkbVirtualModsMask; rep->virtualMods = 0; return 0; } for (i = nMods = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (rep->virtualMods & bit) nMods++; } return XkbPaddedSize(nMods); } static char * XkbWriteKeySyms(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { register KeySym *pSym; XkbSymMapPtr symMap; xkbSymMapWireDesc *outMap; register unsigned i; symMap = &xkb->map->key_sym_map[rep->firstKeySym]; for (i = 0; i < rep->nKeySyms; i++, symMap++) { outMap = (xkbSymMapWireDesc *) buf; outMap->ktIndex[0] = symMap->kt_index[0]; outMap->ktIndex[1] = symMap->kt_index[1]; outMap->ktIndex[2] = symMap->kt_index[2]; outMap->ktIndex[3] = symMap->kt_index[3]; outMap->groupInfo = symMap->group_info; outMap->width = symMap->width; outMap->nSyms = symMap->width * XkbNumGroups(symMap->group_info); buf = (char *) &outMap[1]; if (outMap->nSyms == 0) continue; pSym = &xkb->map->syms[symMap->offset]; memcpy((char *) buf, (char *) pSym, outMap->nSyms * 4); if (client->swapped) { register int nSyms = outMap->nSyms; swaps(&outMap->nSyms); while (nSyms-- > 0) { swapl((int *) buf); buf += 4; } } else buf += outMap->nSyms * 4; } return buf; } static int XkbSizeKeyActions(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nActs; register KeyCode firstKey; if (((rep->present & XkbKeyActionsMask) == 0) || (rep->nKeyActs < 1) || (!xkb) || (!xkb->server) || (!xkb->server->key_acts)) { rep->present &= ~XkbKeyActionsMask; rep->firstKeyAct = rep->nKeyActs = 0; rep->totalActs = 0; return 0; } firstKey = rep->firstKeyAct; for (nActs = i = 0; i < rep->nKeyActs; i++) { if (xkb->server->key_acts[i + firstKey] != 0) nActs += XkbKeyNumActions(xkb, i + firstKey); } len = XkbPaddedSize(rep->nKeyActs) + (nActs * SIZEOF(xkbActionWireDesc)); rep->totalActs = nActs; return len; } static char * XkbWriteKeyActions(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; CARD8 *numDesc; XkbAnyAction *actDesc; numDesc = (CARD8 *) buf; for (i = 0; i < rep->nKeyActs; i++) { if (xkb->server->key_acts[i + rep->firstKeyAct] == 0) numDesc[i] = 0; else numDesc[i] = XkbKeyNumActions(xkb, (i + rep->firstKeyAct)); } buf += XkbPaddedSize(rep->nKeyActs); actDesc = (XkbAnyAction *) buf; for (i = 0; i < rep->nKeyActs; i++) { if (xkb->server->key_acts[i + rep->firstKeyAct] != 0) { unsigned int num; num = XkbKeyNumActions(xkb, (i + rep->firstKeyAct)); memcpy((char *) actDesc, (char *) XkbKeyActionsPtr(xkb, (i + rep->firstKeyAct)), num * SIZEOF(xkbActionWireDesc)); actDesc += num; } } buf = (char *) actDesc; return buf; } static int XkbSizeKeyBehaviors(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nBhvr; XkbBehavior *bhv; if (((rep->present & XkbKeyBehaviorsMask) == 0) || (rep->nKeyBehaviors < 1) || (!xkb) || (!xkb->server) || (!xkb->server->behaviors)) { rep->present &= ~XkbKeyBehaviorsMask; rep->firstKeyBehavior = rep->nKeyBehaviors = 0; rep->totalKeyBehaviors = 0; return 0; } bhv = &xkb->server->behaviors[rep->firstKeyBehavior]; for (nBhvr = i = 0; i < rep->nKeyBehaviors; i++, bhv++) { if (bhv->type != XkbKB_Default) nBhvr++; } len = nBhvr * SIZEOF(xkbBehaviorWireDesc); rep->totalKeyBehaviors = nBhvr; return len; } static char * XkbWriteKeyBehaviors(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; xkbBehaviorWireDesc *wire; XkbBehavior *pBhvr; wire = (xkbBehaviorWireDesc *) buf; pBhvr = &xkb->server->behaviors[rep->firstKeyBehavior]; for (i = 0; i < rep->nKeyBehaviors; i++, pBhvr++) { if (pBhvr->type != XkbKB_Default) { wire->key = i + rep->firstKeyBehavior; wire->type = pBhvr->type; wire->data = pBhvr->data; wire++; } } buf = (char *) wire; return buf; } static int XkbSizeExplicit(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nRtrn; if (((rep->present & XkbExplicitComponentsMask) == 0) || (rep->nKeyExplicit < 1) || (!xkb) || (!xkb->server) || (!xkb->server->explicit)) { rep->present &= ~XkbExplicitComponentsMask; rep->firstKeyExplicit = rep->nKeyExplicit = 0; rep->totalKeyExplicit = 0; return 0; } for (nRtrn = i = 0; i < rep->nKeyExplicit; i++) { if (xkb->server->explicit[i + rep->firstKeyExplicit] != 0) nRtrn++; } rep->totalKeyExplicit = nRtrn; len = XkbPaddedSize(nRtrn * 2); /* two bytes per non-zero explicit component */ return len; } static char * XkbWriteExplicit(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; char *start; unsigned char *pExp; start = buf; pExp = &xkb->server->explicit[rep->firstKeyExplicit]; for (i = 0; i < rep->nKeyExplicit; i++, pExp++) { if (*pExp != 0) { *buf++ = i + rep->firstKeyExplicit; *buf++ = *pExp; } } i = XkbPaddedSize(buf - start) - (buf - start); /* pad to word boundary */ return buf + i; } static int XkbSizeModifierMap(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nRtrn; if (((rep->present & XkbModifierMapMask) == 0) || (rep->nModMapKeys < 1) || (!xkb) || (!xkb->map) || (!xkb->map->modmap)) { rep->present &= ~XkbModifierMapMask; rep->firstModMapKey = rep->nModMapKeys = 0; rep->totalModMapKeys = 0; return 0; } for (nRtrn = i = 0; i < rep->nModMapKeys; i++) { if (xkb->map->modmap[i + rep->firstModMapKey] != 0) nRtrn++; } rep->totalModMapKeys = nRtrn; len = XkbPaddedSize(nRtrn * 2); /* two bytes per non-zero modmap component */ return len; } static char * XkbWriteModifierMap(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; char *start; unsigned char *pMap; start = buf; pMap = &xkb->map->modmap[rep->firstModMapKey]; for (i = 0; i < rep->nModMapKeys; i++, pMap++) { if (*pMap != 0) { *buf++ = i + rep->firstModMapKey; *buf++ = *pMap; } } i = XkbPaddedSize(buf - start) - (buf - start); /* pad to word boundary */ return buf + i; } static int XkbSizeVirtualModMap(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nRtrn; if (((rep->present & XkbVirtualModMapMask) == 0) || (rep->nVModMapKeys < 1) || (!xkb) || (!xkb->server) || (!xkb->server->vmodmap)) { rep->present &= ~XkbVirtualModMapMask; rep->firstVModMapKey = rep->nVModMapKeys = 0; rep->totalVModMapKeys = 0; return 0; } for (nRtrn = i = 0; i < rep->nVModMapKeys; i++) { if (xkb->server->vmodmap[i + rep->firstVModMapKey] != 0) nRtrn++; } rep->totalVModMapKeys = nRtrn; len = nRtrn * SIZEOF(xkbVModMapWireDesc); return len; } static char * XkbWriteVirtualModMap(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; xkbVModMapWireDesc *wire; unsigned short *pMap; wire = (xkbVModMapWireDesc *) buf; pMap = &xkb->server->vmodmap[rep->firstVModMapKey]; for (i = 0; i < rep->nVModMapKeys; i++, pMap++) { if (*pMap != 0) { wire->key = i + rep->firstVModMapKey; wire->vmods = *pMap; wire++; } } return (char *) wire; } static Status XkbComputeGetMapReplySize(XkbDescPtr xkb, xkbGetMapReply * rep) { int len; rep->minKeyCode = xkb->min_key_code; rep->maxKeyCode = xkb->max_key_code; len = XkbSizeKeyTypes(xkb, rep); len += XkbSizeKeySyms(xkb, rep); len += XkbSizeKeyActions(xkb, rep); len += XkbSizeKeyBehaviors(xkb, rep); len += XkbSizeVirtualMods(xkb, rep); len += XkbSizeExplicit(xkb, rep); len += XkbSizeModifierMap(xkb, rep); len += XkbSizeVirtualModMap(xkb, rep); rep->length += (len / 4); return Success; } static int XkbSendMap(ClientPtr client, XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len; char *desc, *start; len = (rep->length * 4) - (SIZEOF(xkbGetMapReply) - SIZEOF(xGenericReply)); start = desc = calloc(1, len); if (!start) return BadAlloc; if (rep->nTypes > 0) desc = XkbWriteKeyTypes(xkb, rep, desc, client); if (rep->nKeySyms > 0) desc = XkbWriteKeySyms(xkb, rep, desc, client); if (rep->nKeyActs > 0) desc = XkbWriteKeyActions(xkb, rep, desc, client); if (rep->totalKeyBehaviors > 0) desc = XkbWriteKeyBehaviors(xkb, rep, desc, client); if (rep->virtualMods) { register int sz, bit; for (i = sz = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (rep->virtualMods & bit) { desc[sz++] = xkb->server->vmods[i]; } } desc += XkbPaddedSize(sz); } if (rep->totalKeyExplicit > 0) desc = XkbWriteExplicit(xkb, rep, desc, client); if (rep->totalModMapKeys > 0) desc = XkbWriteModifierMap(xkb, rep, desc, client); if (rep->totalVModMapKeys > 0) desc = XkbWriteVirtualModMap(xkb, rep, desc, client); if ((desc - start) != (len)) { ErrorF ("[xkb] BOGUS LENGTH in write keyboard desc, expected %d, got %ld\n", len, (unsigned long) (desc - start)); } if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->present); swaps(&rep->totalSyms); swaps(&rep->totalActs); } WriteToClient(client, (i = SIZEOF(xkbGetMapReply)), rep); WriteToClient(client, len, start); free((char *) start); return Success; } int ProcXkbGetMap(ClientPtr client) { DeviceIntPtr dev; xkbGetMapReply rep; XkbDescRec *xkb; int n, status; REQUEST(xkbGetMapReq); REQUEST_SIZE_MATCH(xkbGetMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_OVERLAP(0x01, stuff->full, stuff->partial); CHK_MASK_LEGAL(0x02, stuff->full, XkbAllMapComponentsMask); CHK_MASK_LEGAL(0x03, stuff->partial, XkbAllMapComponentsMask); xkb = dev->key->xkbInfo->desc; rep = (xkbGetMapReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = (SIZEOF(xkbGetMapReply) - SIZEOF(xGenericReply)) >> 2, .present = stuff->partial | stuff->full, .minKeyCode = xkb->min_key_code, .maxKeyCode = xkb->max_key_code }; if (stuff->full & XkbKeyTypesMask) { rep.firstType = 0; rep.nTypes = xkb->map->num_types; } else if (stuff->partial & XkbKeyTypesMask) { if (((unsigned) stuff->firstType + stuff->nTypes) > xkb->map->num_types) { client->errorValue = _XkbErrCode4(0x04, xkb->map->num_types, stuff->firstType, stuff->nTypes); return BadValue; } rep.firstType = stuff->firstType; rep.nTypes = stuff->nTypes; } else rep.nTypes = 0; rep.totalTypes = xkb->map->num_types; n = XkbNumKeys(xkb); if (stuff->full & XkbKeySymsMask) { rep.firstKeySym = xkb->min_key_code; rep.nKeySyms = n; } else if (stuff->partial & XkbKeySymsMask) { CHK_KEY_RANGE(0x05, stuff->firstKeySym, stuff->nKeySyms, xkb); rep.firstKeySym = stuff->firstKeySym; rep.nKeySyms = stuff->nKeySyms; } else rep.nKeySyms = 0; rep.totalSyms = 0; if (stuff->full & XkbKeyActionsMask) { rep.firstKeyAct = xkb->min_key_code; rep.nKeyActs = n; } else if (stuff->partial & XkbKeyActionsMask) { CHK_KEY_RANGE(0x07, stuff->firstKeyAct, stuff->nKeyActs, xkb); rep.firstKeyAct = stuff->firstKeyAct; rep.nKeyActs = stuff->nKeyActs; } else rep.nKeyActs = 0; rep.totalActs = 0; if (stuff->full & XkbKeyBehaviorsMask) { rep.firstKeyBehavior = xkb->min_key_code; rep.nKeyBehaviors = n; } else if (stuff->partial & XkbKeyBehaviorsMask) { CHK_KEY_RANGE(0x09, stuff->firstKeyBehavior, stuff->nKeyBehaviors, xkb); rep.firstKeyBehavior = stuff->firstKeyBehavior; rep.nKeyBehaviors = stuff->nKeyBehaviors; } else rep.nKeyBehaviors = 0; rep.totalKeyBehaviors = 0; if (stuff->full & XkbVirtualModsMask) rep.virtualMods = ~0; else if (stuff->partial & XkbVirtualModsMask) rep.virtualMods = stuff->virtualMods; if (stuff->full & XkbExplicitComponentsMask) { rep.firstKeyExplicit = xkb->min_key_code; rep.nKeyExplicit = n; } else if (stuff->partial & XkbExplicitComponentsMask) { CHK_KEY_RANGE(0x0B, stuff->firstKeyExplicit, stuff->nKeyExplicit, xkb); rep.firstKeyExplicit = stuff->firstKeyExplicit; rep.nKeyExplicit = stuff->nKeyExplicit; } else rep.nKeyExplicit = 0; rep.totalKeyExplicit = 0; if (stuff->full & XkbModifierMapMask) { rep.firstModMapKey = xkb->min_key_code; rep.nModMapKeys = n; } else if (stuff->partial & XkbModifierMapMask) { CHK_KEY_RANGE(0x0D, stuff->firstModMapKey, stuff->nModMapKeys, xkb); rep.firstModMapKey = stuff->firstModMapKey; rep.nModMapKeys = stuff->nModMapKeys; } else rep.nModMapKeys = 0; rep.totalModMapKeys = 0; if (stuff->full & XkbVirtualModMapMask) { rep.firstVModMapKey = xkb->min_key_code; rep.nVModMapKeys = n; } else if (stuff->partial & XkbVirtualModMapMask) { CHK_KEY_RANGE(0x0F, stuff->firstVModMapKey, stuff->nVModMapKeys, xkb); rep.firstVModMapKey = stuff->firstVModMapKey; rep.nVModMapKeys = stuff->nVModMapKeys; } else rep.nVModMapKeys = 0; rep.totalVModMapKeys = 0; if ((status = XkbComputeGetMapReplySize(xkb, &rep)) != Success) return status; return XkbSendMap(client, xkb, &rep); } /***====================================================================***/ static int CheckKeyTypes(ClientPtr client, XkbDescPtr xkb, xkbSetMapReq * req, xkbKeyTypeWireDesc ** wireRtrn, int *nMapsRtrn, CARD8 *mapWidthRtrn, Bool doswap) { unsigned nMaps; register unsigned i, n; register CARD8 *map; register xkbKeyTypeWireDesc *wire = *wireRtrn; if (req->firstType > ((unsigned) xkb->map->num_types)) { *nMapsRtrn = _XkbErrCode3(0x01, req->firstType, xkb->map->num_types); return 0; } if (req->flags & XkbSetMapResizeTypes) { nMaps = req->firstType + req->nTypes; if (nMaps < XkbNumRequiredTypes) { /* canonical types must be there */ *nMapsRtrn = _XkbErrCode4(0x02, req->firstType, req->nTypes, 4); return 0; } } else if (req->present & XkbKeyTypesMask) { nMaps = xkb->map->num_types; if ((req->firstType + req->nTypes) > nMaps) { *nMapsRtrn = req->firstType + req->nTypes; return 0; } } else { *nMapsRtrn = xkb->map->num_types; for (i = 0; i < xkb->map->num_types; i++) { mapWidthRtrn[i] = xkb->map->types[i].num_levels; } return 1; } for (i = 0; i < req->firstType; i++) { mapWidthRtrn[i] = xkb->map->types[i].num_levels; } for (i = 0; i < req->nTypes; i++) { unsigned width; if (client->swapped && doswap) { swaps(&wire->virtualMods); } n = i + req->firstType; width = wire->numLevels; if (width < 1) { *nMapsRtrn = _XkbErrCode3(0x04, n, width); return 0; } else if ((n == XkbOneLevelIndex) && (width != 1)) { /* must be width 1 */ *nMapsRtrn = _XkbErrCode3(0x05, n, width); return 0; } else if ((width != 2) && ((n == XkbTwoLevelIndex) || (n == XkbKeypadIndex) || (n == XkbAlphabeticIndex))) { /* TWO_LEVEL, ALPHABETIC and KEYPAD must be width 2 */ *nMapsRtrn = _XkbErrCode3(0x05, n, width); return 0; } if (wire->nMapEntries > 0) { xkbKTSetMapEntryWireDesc *mapWire; xkbModsWireDesc *preWire; mapWire = (xkbKTSetMapEntryWireDesc *) &wire[1]; preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries]; for (n = 0; n < wire->nMapEntries; n++) { if (client->swapped && doswap) { swaps(&mapWire[n].virtualMods); } if (mapWire[n].realMods & (~wire->realMods)) { *nMapsRtrn = _XkbErrCode4(0x06, n, mapWire[n].realMods, wire->realMods); return 0; } if (mapWire[n].virtualMods & (~wire->virtualMods)) { *nMapsRtrn = _XkbErrCode3(0x07, n, mapWire[n].virtualMods); return 0; } if (mapWire[n].level >= wire->numLevels) { *nMapsRtrn = _XkbErrCode4(0x08, n, wire->numLevels, mapWire[n].level); return 0; } if (wire->preserve) { if (client->swapped && doswap) { swaps(&preWire[n].virtualMods); } if (preWire[n].realMods & (~mapWire[n].realMods)) { *nMapsRtrn = _XkbErrCode4(0x09, n, preWire[n].realMods, mapWire[n].realMods); return 0; } if (preWire[n].virtualMods & (~mapWire[n].virtualMods)) { *nMapsRtrn = _XkbErrCode3(0x0a, n, preWire[n].virtualMods); return 0; } } } if (wire->preserve) map = (CARD8 *) &preWire[wire->nMapEntries]; else map = (CARD8 *) &mapWire[wire->nMapEntries]; } else map = (CARD8 *) &wire[1]; mapWidthRtrn[i + req->firstType] = wire->numLevels; wire = (xkbKeyTypeWireDesc *) map; } for (i = req->firstType + req->nTypes; i < nMaps; i++) { mapWidthRtrn[i] = xkb->map->types[i].num_levels; } *nMapsRtrn = nMaps; *wireRtrn = wire; return 1; } static int CheckKeySyms(ClientPtr client, XkbDescPtr xkb, xkbSetMapReq * req, int nTypes, CARD8 *mapWidths, CARD16 *symsPerKey, xkbSymMapWireDesc ** wireRtrn, int *errorRtrn, Bool doswap) { register unsigned i; XkbSymMapPtr map; xkbSymMapWireDesc *wire = *wireRtrn; if (!(XkbKeySymsMask & req->present)) return 1; CHK_REQ_KEY_RANGE2(0x11, req->firstKeySym, req->nKeySyms, req, (*errorRtrn), 0); for (i = 0; i < req->nKeySyms; i++) { KeySym *pSyms; register unsigned nG; if (client->swapped && doswap) { swaps(&wire->nSyms); } nG = XkbNumGroups(wire->groupInfo); if (nG > XkbNumKbdGroups) { *errorRtrn = _XkbErrCode3(0x14, i + req->firstKeySym, nG); return 0; } if (nG > 0) { register int g, w; for (g = w = 0; g < nG; g++) { if (wire->ktIndex[g] >= (unsigned) nTypes) { *errorRtrn = _XkbErrCode4(0x15, i + req->firstKeySym, g, wire->ktIndex[g]); return 0; } if (mapWidths[wire->ktIndex[g]] > w) w = mapWidths[wire->ktIndex[g]]; } if (wire->width != w) { *errorRtrn = _XkbErrCode3(0x16, i + req->firstKeySym, wire->width); return 0; } w *= nG; symsPerKey[i + req->firstKeySym] = w; if (w != wire->nSyms) { *errorRtrn = _XkbErrCode4(0x16, i + req->firstKeySym, wire->nSyms, w); return 0; } } else if (wire->nSyms != 0) { *errorRtrn = _XkbErrCode3(0x17, i + req->firstKeySym, wire->nSyms); return 0; } pSyms = (KeySym *) &wire[1]; wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms]; } map = &xkb->map->key_sym_map[i]; for (; i <= (unsigned) xkb->max_key_code; i++, map++) { register int g, nG, w; nG = XkbKeyNumGroups(xkb, i); for (w = g = 0; g < nG; g++) { if (map->kt_index[g] >= (unsigned) nTypes) { *errorRtrn = _XkbErrCode4(0x18, i, g, map->kt_index[g]); return 0; } if (mapWidths[map->kt_index[g]] > w) w = mapWidths[map->kt_index[g]]; } symsPerKey[i] = w * nG; } *wireRtrn = wire; return 1; } static int CheckKeyActions(XkbDescPtr xkb, xkbSetMapReq * req, int nTypes, CARD8 *mapWidths, CARD16 *symsPerKey, CARD8 **wireRtrn, int *nActsRtrn) { int nActs; CARD8 *wire = *wireRtrn; register unsigned i; if (!(XkbKeyActionsMask & req->present)) return 1; CHK_REQ_KEY_RANGE2(0x21, req->firstKeyAct, req->nKeyActs, req, (*nActsRtrn), 0); for (nActs = i = 0; i < req->nKeyActs; i++) { if (wire[0] != 0) { if (wire[0] == symsPerKey[i + req->firstKeyAct]) nActs += wire[0]; else { *nActsRtrn = _XkbErrCode3(0x23, i + req->firstKeyAct, wire[0]); return 0; } } wire++; } if (req->nKeyActs % 4) wire += 4 - (req->nKeyActs % 4); *wireRtrn = (CARD8 *) (((XkbAnyAction *) wire) + nActs); *nActsRtrn = nActs; return 1; } static int CheckKeyBehaviors(XkbDescPtr xkb, xkbSetMapReq * req, xkbBehaviorWireDesc ** wireRtrn, int *errorRtrn) { register xkbBehaviorWireDesc *wire = *wireRtrn; register XkbServerMapPtr server = xkb->server; register unsigned i; unsigned first, last; if (((req->present & XkbKeyBehaviorsMask) == 0) || (req->nKeyBehaviors < 1)) { req->present &= ~XkbKeyBehaviorsMask; req->nKeyBehaviors = 0; return 1; } first = req->firstKeyBehavior; last = req->firstKeyBehavior + req->nKeyBehaviors - 1; if (first < req->minKeyCode) { *errorRtrn = _XkbErrCode3(0x31, first, req->minKeyCode); return 0; } if (last > req->maxKeyCode) { *errorRtrn = _XkbErrCode3(0x32, last, req->maxKeyCode); return 0; } for (i = 0; i < req->totalKeyBehaviors; i++, wire++) { if ((wire->key < first) || (wire->key > last)) { *errorRtrn = _XkbErrCode4(0x33, first, last, wire->key); return 0; } if ((wire->type & XkbKB_Permanent) && ((server->behaviors[wire->key].type != wire->type) || (server->behaviors[wire->key].data != wire->data))) { *errorRtrn = _XkbErrCode3(0x33, wire->key, wire->type); return 0; } if ((wire->type == XkbKB_RadioGroup) && ((wire->data & (~XkbKB_RGAllowNone)) > XkbMaxRadioGroups)) { *errorRtrn = _XkbErrCode4(0x34, wire->key, wire->data, XkbMaxRadioGroups); return 0; } if ((wire->type == XkbKB_Overlay1) || (wire->type == XkbKB_Overlay2)) { CHK_KEY_RANGE2(0x35, wire->key, 1, xkb, *errorRtrn, 0); } } *wireRtrn = wire; return 1; } static int CheckVirtualMods(XkbDescRec * xkb, xkbSetMapReq * req, CARD8 **wireRtrn, int *errorRtrn) { register CARD8 *wire = *wireRtrn; register unsigned i, nMods, bit; if (((req->present & XkbVirtualModsMask) == 0) || (req->virtualMods == 0)) return 1; for (i = nMods = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (req->virtualMods & bit) nMods++; } *wireRtrn = (wire + XkbPaddedSize(nMods)); return 1; } static int CheckKeyExplicit(XkbDescPtr xkb, xkbSetMapReq * req, CARD8 **wireRtrn, int *errorRtrn) { register CARD8 *wire = *wireRtrn; CARD8 *start; register unsigned i; int first, last; if (((req->present & XkbExplicitComponentsMask) == 0) || (req->nKeyExplicit < 1)) { req->present &= ~XkbExplicitComponentsMask; req->nKeyExplicit = 0; return 1; } first = req->firstKeyExplicit; last = first + req->nKeyExplicit - 1; if (first < req->minKeyCode) { *errorRtrn = _XkbErrCode3(0x51, first, req->minKeyCode); return 0; } if (last > req->maxKeyCode) { *errorRtrn = _XkbErrCode3(0x52, last, req->maxKeyCode); return 0; } start = wire; for (i = 0; i < req->totalKeyExplicit; i++, wire += 2) { if ((wire[0] < first) || (wire[0] > last)) { *errorRtrn = _XkbErrCode4(0x53, first, last, wire[0]); return 0; } if (wire[1] & (~XkbAllExplicitMask)) { *errorRtrn = _XkbErrCode3(0x52, ~XkbAllExplicitMask, wire[1]); return 0; } } wire += XkbPaddedSize(wire - start) - (wire - start); *wireRtrn = wire; return 1; } static int CheckModifierMap(XkbDescPtr xkb, xkbSetMapReq * req, CARD8 **wireRtrn, int *errRtrn) { register CARD8 *wire = *wireRtrn; CARD8 *start; register unsigned i; int first, last; if (((req->present & XkbModifierMapMask) == 0) || (req->nModMapKeys < 1)) { req->present &= ~XkbModifierMapMask; req->nModMapKeys = 0; return 1; } first = req->firstModMapKey; last = first + req->nModMapKeys - 1; if (first < req->minKeyCode) { *errRtrn = _XkbErrCode3(0x61, first, req->minKeyCode); return 0; } if (last > req->maxKeyCode) { *errRtrn = _XkbErrCode3(0x62, last, req->maxKeyCode); return 0; } start = wire; for (i = 0; i < req->totalModMapKeys; i++, wire += 2) { if ((wire[0] < first) || (wire[0] > last)) { *errRtrn = _XkbErrCode4(0x63, first, last, wire[0]); return 0; } } wire += XkbPaddedSize(wire - start) - (wire - start); *wireRtrn = wire; return 1; } static int CheckVirtualModMap(XkbDescPtr xkb, xkbSetMapReq * req, xkbVModMapWireDesc ** wireRtrn, int *errRtrn) { register xkbVModMapWireDesc *wire = *wireRtrn; register unsigned i; int first, last; if (((req->present & XkbVirtualModMapMask) == 0) || (req->nVModMapKeys < 1)) { req->present &= ~XkbVirtualModMapMask; req->nVModMapKeys = 0; return 1; } first = req->firstVModMapKey; last = first + req->nVModMapKeys - 1; if (first < req->minKeyCode) { *errRtrn = _XkbErrCode3(0x71, first, req->minKeyCode); return 0; } if (last > req->maxKeyCode) { *errRtrn = _XkbErrCode3(0x72, last, req->maxKeyCode); return 0; } for (i = 0; i < req->totalVModMapKeys; i++, wire++) { if ((wire->key < first) || (wire->key > last)) { *errRtrn = _XkbErrCode4(0x73, first, last, wire->key); return 0; } } *wireRtrn = wire; return 1; } static char * SetKeyTypes(XkbDescPtr xkb, xkbSetMapReq * req, xkbKeyTypeWireDesc * wire, XkbChangesPtr changes) { register unsigned i; unsigned first, last; CARD8 *map; if ((unsigned) (req->firstType + req->nTypes) > xkb->map->size_types) { i = req->firstType + req->nTypes; if (XkbAllocClientMap(xkb, XkbKeyTypesMask, i) != Success) { return NULL; } } if ((unsigned) (req->firstType + req->nTypes) > xkb->map->num_types) xkb->map->num_types = req->firstType + req->nTypes; for (i = 0; i < req->nTypes; i++) { XkbKeyTypePtr pOld; register unsigned n; if (XkbResizeKeyType(xkb, i + req->firstType, wire->nMapEntries, wire->preserve, wire->numLevels) != Success) { return NULL; } pOld = &xkb->map->types[i + req->firstType]; map = (CARD8 *) &wire[1]; pOld->mods.real_mods = wire->realMods; pOld->mods.vmods = wire->virtualMods; pOld->num_levels = wire->numLevels; pOld->map_count = wire->nMapEntries; pOld->mods.mask = pOld->mods.real_mods | XkbMaskForVMask(xkb, pOld->mods.vmods); if (wire->nMapEntries) { xkbKTSetMapEntryWireDesc *mapWire; xkbModsWireDesc *preWire; unsigned tmp; mapWire = (xkbKTSetMapEntryWireDesc *) map; preWire = (xkbModsWireDesc *) &mapWire[wire->nMapEntries]; for (n = 0; n < wire->nMapEntries; n++) { pOld->map[n].active = 1; pOld->map[n].mods.mask = mapWire[n].realMods; pOld->map[n].mods.real_mods = mapWire[n].realMods; pOld->map[n].mods.vmods = mapWire[n].virtualMods; pOld->map[n].level = mapWire[n].level; if (mapWire[n].virtualMods != 0) { tmp = XkbMaskForVMask(xkb, mapWire[n].virtualMods); pOld->map[n].active = (tmp != 0); pOld->map[n].mods.mask |= tmp; } if (wire->preserve) { pOld->preserve[n].real_mods = preWire[n].realMods; pOld->preserve[n].vmods = preWire[n].virtualMods; tmp = XkbMaskForVMask(xkb, preWire[n].virtualMods); pOld->preserve[n].mask = preWire[n].realMods | tmp; } } if (wire->preserve) map = (CARD8 *) &preWire[wire->nMapEntries]; else map = (CARD8 *) &mapWire[wire->nMapEntries]; } else map = (CARD8 *) &wire[1]; wire = (xkbKeyTypeWireDesc *) map; } first = req->firstType; last = first + req->nTypes - 1; /* last changed type */ if (changes->map.changed & XkbKeyTypesMask) { int oldLast; oldLast = changes->map.first_type + changes->map.num_types - 1; if (changes->map.first_type < first) first = changes->map.first_type; if (oldLast > last) last = oldLast; } changes->map.changed |= XkbKeyTypesMask; changes->map.first_type = first; changes->map.num_types = (last - first) + 1; return (char *) wire; } static char * SetKeySyms(ClientPtr client, XkbDescPtr xkb, xkbSetMapReq * req, xkbSymMapWireDesc * wire, XkbChangesPtr changes, DeviceIntPtr dev) { register unsigned i, s; XkbSymMapPtr oldMap; KeySym *newSyms; KeySym *pSyms; unsigned first, last; oldMap = &xkb->map->key_sym_map[req->firstKeySym]; for (i = 0; i < req->nKeySyms; i++, oldMap++) { pSyms = (KeySym *) &wire[1]; if (wire->nSyms > 0) { newSyms = XkbResizeKeySyms(xkb, i + req->firstKeySym, wire->nSyms); for (s = 0; s < wire->nSyms; s++) { newSyms[s] = pSyms[s]; } if (client->swapped) { for (s = 0; s < wire->nSyms; s++) { swapl(&newSyms[s]); } } } if (XkbKeyHasActions(xkb, i + req->firstKeySym)) XkbResizeKeyActions(xkb, i + req->firstKeySym, XkbNumGroups(wire->groupInfo) * wire->width); oldMap->kt_index[0] = wire->ktIndex[0]; oldMap->kt_index[1] = wire->ktIndex[1]; oldMap->kt_index[2] = wire->ktIndex[2]; oldMap->kt_index[3] = wire->ktIndex[3]; oldMap->group_info = wire->groupInfo; oldMap->width = wire->width; wire = (xkbSymMapWireDesc *) &pSyms[wire->nSyms]; } first = req->firstKeySym; last = first + req->nKeySyms - 1; if (changes->map.changed & XkbKeySymsMask) { int oldLast = (changes->map.first_key_sym + changes->map.num_key_syms - 1); if (changes->map.first_key_sym < first) first = changes->map.first_key_sym; if (oldLast > last) last = oldLast; } changes->map.changed |= XkbKeySymsMask; changes->map.first_key_sym = first; changes->map.num_key_syms = (last - first + 1); s = 0; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (XkbKeyNumGroups(xkb, i) > s) s = XkbKeyNumGroups(xkb, i); } if (s != xkb->ctrls->num_groups) { xkbControlsNotify cn; XkbControlsRec old; cn.keycode = 0; cn.eventType = 0; cn.requestMajor = XkbReqCode; cn.requestMinor = X_kbSetMap; old = *xkb->ctrls; xkb->ctrls->num_groups = s; if (XkbComputeControlsNotify(dev, &old, xkb->ctrls, &cn, FALSE)) XkbSendControlsNotify(dev, &cn); } return (char *) wire; } static char * SetKeyActions(XkbDescPtr xkb, xkbSetMapReq * req, CARD8 *wire, XkbChangesPtr changes) { register unsigned i, first, last; CARD8 *nActs = wire; XkbAction *newActs; wire += XkbPaddedSize(req->nKeyActs); for (i = 0; i < req->nKeyActs; i++) { if (nActs[i] == 0) xkb->server->key_acts[i + req->firstKeyAct] = 0; else { newActs = XkbResizeKeyActions(xkb, i + req->firstKeyAct, nActs[i]); memcpy((char *) newActs, (char *) wire, nActs[i] * SIZEOF(xkbActionWireDesc)); wire += nActs[i] * SIZEOF(xkbActionWireDesc); } } first = req->firstKeyAct; last = (first + req->nKeyActs - 1); if (changes->map.changed & XkbKeyActionsMask) { int oldLast; oldLast = changes->map.first_key_act + changes->map.num_key_acts - 1; if (changes->map.first_key_act < first) first = changes->map.first_key_act; if (oldLast > last) last = oldLast; } changes->map.changed |= XkbKeyActionsMask; changes->map.first_key_act = first; changes->map.num_key_acts = (last - first + 1); return (char *) wire; } static char * SetKeyBehaviors(XkbSrvInfoPtr xkbi, xkbSetMapReq * req, xkbBehaviorWireDesc * wire, XkbChangesPtr changes) { register unsigned i; int maxRG = -1; XkbDescPtr xkb = xkbi->desc; XkbServerMapPtr server = xkb->server; unsigned first, last; first = req->firstKeyBehavior; last = req->firstKeyBehavior + req->nKeyBehaviors - 1; memset(&server->behaviors[first], 0, req->nKeyBehaviors * sizeof(XkbBehavior)); for (i = 0; i < req->totalKeyBehaviors; i++) { if ((server->behaviors[wire->key].type & XkbKB_Permanent) == 0) { server->behaviors[wire->key].type = wire->type; server->behaviors[wire->key].data = wire->data; if ((wire->type == XkbKB_RadioGroup) && (((int) wire->data) > maxRG)) maxRG = wire->data + 1; } wire++; } if (maxRG > (int) xkbi->nRadioGroups) { if (xkbi->radioGroups) xkbi->radioGroups = reallocarray(xkbi->radioGroups, maxRG, sizeof(XkbRadioGroupRec)); else xkbi->radioGroups = calloc(maxRG, sizeof(XkbRadioGroupRec)); if (xkbi->radioGroups) { if (xkbi->nRadioGroups) memset(&xkbi->radioGroups[xkbi->nRadioGroups], 0, (maxRG - xkbi->nRadioGroups) * sizeof(XkbRadioGroupRec)); xkbi->nRadioGroups = maxRG; } else xkbi->nRadioGroups = 0; /* should compute members here */ } if (changes->map.changed & XkbKeyBehaviorsMask) { unsigned oldLast; oldLast = changes->map.first_key_behavior + changes->map.num_key_behaviors - 1; if (changes->map.first_key_behavior < req->firstKeyBehavior) first = changes->map.first_key_behavior; if (oldLast > last) last = oldLast; } changes->map.changed |= XkbKeyBehaviorsMask; changes->map.first_key_behavior = first; changes->map.num_key_behaviors = (last - first + 1); return (char *) wire; } static char * SetVirtualMods(XkbSrvInfoPtr xkbi, xkbSetMapReq * req, CARD8 *wire, XkbChangesPtr changes) { register int i, bit, nMods; XkbServerMapPtr srv = xkbi->desc->server; if (((req->present & XkbVirtualModsMask) == 0) || (req->virtualMods == 0)) return (char *) wire; for (i = nMods = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (req->virtualMods & bit) { if (srv->vmods[i] != wire[nMods]) { changes->map.changed |= XkbVirtualModsMask; changes->map.vmods |= bit; srv->vmods[i] = wire[nMods]; } nMods++; } } return (char *) (wire + XkbPaddedSize(nMods)); } static char * SetKeyExplicit(XkbSrvInfoPtr xkbi, xkbSetMapReq * req, CARD8 *wire, XkbChangesPtr changes) { register unsigned i, first, last; XkbServerMapPtr xkb = xkbi->desc->server; CARD8 *start; start = wire; first = req->firstKeyExplicit; last = req->firstKeyExplicit + req->nKeyExplicit - 1; memset(&xkb->explicit[first], 0, req->nKeyExplicit); for (i = 0; i < req->totalKeyExplicit; i++, wire += 2) { xkb->explicit[wire[0]] = wire[1]; } if (first > 0) { if (changes->map.changed & XkbExplicitComponentsMask) { int oldLast; oldLast = changes->map.first_key_explicit + changes->map.num_key_explicit - 1; if (changes->map.first_key_explicit < first) first = changes->map.first_key_explicit; if (oldLast > last) last = oldLast; } changes->map.first_key_explicit = first; changes->map.num_key_explicit = (last - first) + 1; } wire += XkbPaddedSize(wire - start) - (wire - start); return (char *) wire; } static char * SetModifierMap(XkbSrvInfoPtr xkbi, xkbSetMapReq * req, CARD8 *wire, XkbChangesPtr changes) { register unsigned i, first, last; XkbClientMapPtr xkb = xkbi->desc->map; CARD8 *start; start = wire; first = req->firstModMapKey; last = req->firstModMapKey + req->nModMapKeys - 1; memset(&xkb->modmap[first], 0, req->nModMapKeys); for (i = 0; i < req->totalModMapKeys; i++, wire += 2) { xkb->modmap[wire[0]] = wire[1]; } if (first > 0) { if (changes->map.changed & XkbModifierMapMask) { int oldLast; oldLast = changes->map.first_modmap_key + changes->map.num_modmap_keys - 1; if (changes->map.first_modmap_key < first) first = changes->map.first_modmap_key; if (oldLast > last) last = oldLast; } changes->map.first_modmap_key = first; changes->map.num_modmap_keys = (last - first) + 1; } wire += XkbPaddedSize(wire - start) - (wire - start); return (char *) wire; } static char * SetVirtualModMap(XkbSrvInfoPtr xkbi, xkbSetMapReq * req, xkbVModMapWireDesc * wire, XkbChangesPtr changes) { register unsigned i, first, last; XkbServerMapPtr srv = xkbi->desc->server; first = req->firstVModMapKey; last = req->firstVModMapKey + req->nVModMapKeys - 1; memset(&srv->vmodmap[first], 0, req->nVModMapKeys * sizeof(unsigned short)); for (i = 0; i < req->totalVModMapKeys; i++, wire++) { srv->vmodmap[wire->key] = wire->vmods; } if (first > 0) { if (changes->map.changed & XkbVirtualModMapMask) { int oldLast; oldLast = changes->map.first_vmodmap_key + changes->map.num_vmodmap_keys - 1; if (changes->map.first_vmodmap_key < first) first = changes->map.first_vmodmap_key; if (oldLast > last) last = oldLast; } changes->map.first_vmodmap_key = first; changes->map.num_vmodmap_keys = (last - first) + 1; } return (char *) wire; } #define _add_check_len(new) \ if (len > UINT32_MAX - (new) || len > req_len - (new)) goto bad; \ else len += new /** * Check the length of the SetMap request */ static int _XkbSetMapCheckLength(xkbSetMapReq *req) { size_t len = sz_xkbSetMapReq, req_len = req->length << 2; xkbKeyTypeWireDesc *keytype; xkbSymMapWireDesc *symmap; BOOL preserve; int i, map_count, nSyms; if (req_len < len) goto bad; /* types */ if (req->present & XkbKeyTypesMask) { keytype = (xkbKeyTypeWireDesc *)(req + 1); for (i = 0; i < req->nTypes; i++) { _add_check_len(XkbPaddedSize(sz_xkbKeyTypeWireDesc)); _add_check_len(keytype->nMapEntries * sz_xkbKTSetMapEntryWireDesc); preserve = keytype->preserve; map_count = keytype->nMapEntries; if (preserve) { _add_check_len(map_count * sz_xkbModsWireDesc); } keytype += 1; keytype = (xkbKeyTypeWireDesc *) ((xkbKTSetMapEntryWireDesc *)keytype + map_count); if (preserve) keytype = (xkbKeyTypeWireDesc *) ((xkbModsWireDesc *)keytype + map_count); } } /* syms */ if (req->present & XkbKeySymsMask) { symmap = (xkbSymMapWireDesc *)((char *)req + len); for (i = 0; i < req->nKeySyms; i++) { _add_check_len(sz_xkbSymMapWireDesc); nSyms = symmap->nSyms; _add_check_len(nSyms*sizeof(CARD32)); symmap += 1; symmap = (xkbSymMapWireDesc *)((CARD32 *)symmap + nSyms); } } /* actions */ if (req->present & XkbKeyActionsMask) { _add_check_len(req->totalActs * sz_xkbActionWireDesc + XkbPaddedSize(req->nKeyActs)); } /* behaviours */ if (req->present & XkbKeyBehaviorsMask) { _add_check_len(req->totalKeyBehaviors * sz_xkbBehaviorWireDesc); } /* vmods */ if (req->present & XkbVirtualModsMask) { _add_check_len(XkbPaddedSize(Ones(req->virtualMods))); } /* explicit */ if (req->present & XkbExplicitComponentsMask) { /* two bytes per non-zero explicit componen */ _add_check_len(XkbPaddedSize(req->totalKeyExplicit * sizeof(CARD16))); } /* modmap */ if (req->present & XkbModifierMapMask) { /* two bytes per non-zero modmap component */ _add_check_len(XkbPaddedSize(req->totalModMapKeys * sizeof(CARD16))); } /* vmodmap */ if (req->present & XkbVirtualModMapMask) { _add_check_len(req->totalVModMapKeys * sz_xkbVModMapWireDesc); } if (len == req_len) return Success; bad: ErrorF("[xkb] BOGUS LENGTH in SetMap: expected %ld got %ld\n", len, req_len); return BadLength; } /** * Check if the given request can be applied to the given device but don't * actually do anything, except swap values when client->swapped and doswap are both true. */ static int _XkbSetMapChecks(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values, Bool doswap) { XkbSrvInfoPtr xkbi; XkbDescPtr xkb; int error; int nTypes = 0, nActions; CARD8 mapWidths[XkbMaxLegalKeyCode + 1] = { 0 }; CARD16 symsPerKey[XkbMaxLegalKeyCode + 1] = { 0 }; XkbSymMapPtr map; int i; if (!dev->key) return 0; xkbi = dev->key->xkbInfo; xkb = xkbi->desc; if ((xkb->min_key_code != req->minKeyCode) || (xkb->max_key_code != req->maxKeyCode)) { if (client->xkbClientFlags & _XkbClientIsAncient) { /* pre 1.0 versions of Xlib have a bug */ req->minKeyCode = xkb->min_key_code; req->maxKeyCode = xkb->max_key_code; } else { if (!XkbIsLegalKeycode(req->minKeyCode)) { client->errorValue = _XkbErrCode3(2, req->minKeyCode, req->maxKeyCode); return BadValue; } if (req->minKeyCode > req->maxKeyCode) { client->errorValue = _XkbErrCode3(3, req->minKeyCode, req->maxKeyCode); return BadMatch; } } } /* nTypes/mapWidths/symsPerKey must be filled for further tests below, * regardless of client-side flags */ if (!CheckKeyTypes(client, xkb, req, (xkbKeyTypeWireDesc **) &values, &nTypes, mapWidths, doswap)) { client->errorValue = nTypes; return BadValue; } map = &xkb->map->key_sym_map[xkb->min_key_code]; for (i = xkb->min_key_code; i < xkb->max_key_code; i++, map++) { register int g, ng, w; ng = XkbNumGroups(map->group_info); for (w = g = 0; g < ng; g++) { if (map->kt_index[g] >= (unsigned) nTypes) { client->errorValue = _XkbErrCode4(0x13, i, g, map->kt_index[g]); return BadValue; } if (mapWidths[map->kt_index[g]] > w) w = mapWidths[map->kt_index[g]]; } symsPerKey[i] = w * ng; } if ((req->present & XkbKeySymsMask) && (!CheckKeySyms(client, xkb, req, nTypes, mapWidths, symsPerKey, (xkbSymMapWireDesc **) &values, &error, doswap))) { client->errorValue = error; return BadValue; } if ((req->present & XkbKeyActionsMask) && (!CheckKeyActions(xkb, req, nTypes, mapWidths, symsPerKey, (CARD8 **) &values, &nActions))) { client->errorValue = nActions; return BadValue; } if ((req->present & XkbKeyBehaviorsMask) && (!CheckKeyBehaviors (xkb, req, (xkbBehaviorWireDesc **) &values, &error))) { client->errorValue = error; return BadValue; } if ((req->present & XkbVirtualModsMask) && (!CheckVirtualMods(xkb, req, (CARD8 **) &values, &error))) { client->errorValue = error; return BadValue; } if ((req->present & XkbExplicitComponentsMask) && (!CheckKeyExplicit(xkb, req, (CARD8 **) &values, &error))) { client->errorValue = error; return BadValue; } if ((req->present & XkbModifierMapMask) && (!CheckModifierMap(xkb, req, (CARD8 **) &values, &error))) { client->errorValue = error; return BadValue; } if ((req->present & XkbVirtualModMapMask) && (!CheckVirtualModMap (xkb, req, (xkbVModMapWireDesc **) &values, &error))) { client->errorValue = error; return BadValue; } if (((values - ((char *) req)) / 4) != req->length) { ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after check)\n"); client->errorValue = values - ((char *) &req[1]); return BadLength; } return Success; } /** * Apply the given request on the given device. */ static int _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq * req, char *values) { XkbEventCauseRec cause; XkbChangesRec change; Bool sentNKN; XkbSrvInfoPtr xkbi; XkbDescPtr xkb; if (!dev->key) return Success; xkbi = dev->key->xkbInfo; xkb = xkbi->desc; XkbSetCauseXkbReq(&cause, X_kbSetMap, client); memset(&change, 0, sizeof(change)); sentNKN = FALSE; if ((xkb->min_key_code != req->minKeyCode) || (xkb->max_key_code != req->maxKeyCode)) { Status status; xkbNewKeyboardNotify nkn; nkn.deviceID = nkn.oldDeviceID = dev->id; nkn.oldMinKeyCode = xkb->min_key_code; nkn.oldMaxKeyCode = xkb->max_key_code; status = XkbChangeKeycodeRange(xkb, req->minKeyCode, req->maxKeyCode, &change); if (status != Success) return status; /* oh-oh. what about the other keyboards? */ nkn.minKeyCode = xkb->min_key_code; nkn.maxKeyCode = xkb->max_key_code; nkn.requestMajor = XkbReqCode; nkn.requestMinor = X_kbSetMap; nkn.changed = XkbNKN_KeycodesMask; XkbSendNewKeyboardNotify(dev, &nkn); sentNKN = TRUE; } if (req->present & XkbKeyTypesMask) { values = SetKeyTypes(xkb, req, (xkbKeyTypeWireDesc *) values, &change); if (!values) goto allocFailure; } if (req->present & XkbKeySymsMask) { values = SetKeySyms(client, xkb, req, (xkbSymMapWireDesc *) values, &change, dev); if (!values) goto allocFailure; } if (req->present & XkbKeyActionsMask) { values = SetKeyActions(xkb, req, (CARD8 *) values, &change); if (!values) goto allocFailure; } if (req->present & XkbKeyBehaviorsMask) { values = SetKeyBehaviors(xkbi, req, (xkbBehaviorWireDesc *) values, &change); if (!values) goto allocFailure; } if (req->present & XkbVirtualModsMask) values = SetVirtualMods(xkbi, req, (CARD8 *) values, &change); if (req->present & XkbExplicitComponentsMask) values = SetKeyExplicit(xkbi, req, (CARD8 *) values, &change); if (req->present & XkbModifierMapMask) values = SetModifierMap(xkbi, req, (CARD8 *) values, &change); if (req->present & XkbVirtualModMapMask) values = SetVirtualModMap(xkbi, req, (xkbVModMapWireDesc *) values, &change); if (((values - ((char *) req)) / 4) != req->length) { ErrorF("[xkb] Internal error! Bad length in XkbSetMap (after set)\n"); client->errorValue = values - ((char *) &req[1]); return BadLength; } if (req->flags & XkbSetMapRecomputeActions) { KeyCode first, last, firstMM, lastMM; if (change.map.num_key_syms > 0) { first = change.map.first_key_sym; last = first + change.map.num_key_syms - 1; } else first = last = 0; if (change.map.num_modmap_keys > 0) { firstMM = change.map.first_modmap_key; lastMM = firstMM + change.map.num_modmap_keys - 1; } else firstMM = lastMM = 0; if ((last > 0) && (lastMM > 0)) { if (firstMM < first) first = firstMM; if (lastMM > last) last = lastMM; } else if (lastMM > 0) { first = firstMM; last = lastMM; } if (last > 0) { unsigned check = 0; XkbUpdateActions(dev, first, (last - first + 1), &change, &check, &cause); if (check) XkbCheckSecondaryEffects(xkbi, check, &change, &cause); } } if (!sentNKN) XkbSendNotification(dev, &change, &cause); return Success; allocFailure: return BadAlloc; } int ProcXkbSetMap(ClientPtr client) { DeviceIntPtr dev, master; char *tmp; int rc; REQUEST(xkbSetMapReq); REQUEST_AT_LEAST_SIZE(xkbSetMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->present, XkbAllMapComponentsMask); /* first verify the request length carefully */ rc = _XkbSetMapCheckLength(stuff); if (rc != Success) return rc; tmp = (char *) &stuff[1]; /* Check if we can to the SetMap on the requested device. If this succeeds, do the same thing for all extension devices (if needed). If any of them fails, fail. */ rc = _XkbSetMapChecks(client, dev, stuff, tmp, TRUE); if (rc != Success) return rc; master = GetMaster(dev, MASTER_KEYBOARD); if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE); if (rc != Success) return rc; } } } } else { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev && (other != master || dev != master->lastSlave)) continue; rc = _XkbSetMapChecks(client, other, stuff, tmp, FALSE); if (rc != Success) return rc; } } /* We know now that we will succeed with the SetMap. In theory anyway. */ rc = _XkbSetMap(client, dev, stuff, tmp); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) _XkbSetMap(client, other, stuff, tmp); /* ignore rc. if the SetMap failed although the check above reported true there isn't much we can do. we still need to set all other devices, hoping that at least they stay in sync. */ } } } else { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if (other != dev && GetMaster(other, MASTER_KEYBOARD) != dev && (other != master || dev != master->lastSlave)) continue; _XkbSetMap(client, other, stuff, tmp); //ignore rc } } return Success; } /***====================================================================***/ static Status XkbComputeGetCompatMapReplySize(XkbCompatMapPtr compat, xkbGetCompatMapReply * rep) { unsigned size, nGroups; nGroups = 0; if (rep->groups != 0) { register int i, bit; for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (rep->groups & bit) nGroups++; } } size = nGroups * SIZEOF(xkbModsWireDesc); size += (rep->nSI * SIZEOF(xkbSymInterpretWireDesc)); rep->length = size / 4; return Success; } static int XkbSendCompatMap(ClientPtr client, XkbCompatMapPtr compat, xkbGetCompatMapReply * rep) { char *data; int size; if (rep->length > 0) { data = xallocarray(rep->length, 4); if (data) { register unsigned i, bit; xkbModsWireDesc *grp; XkbSymInterpretPtr sym = &compat->sym_interpret[rep->firstSI]; xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *) data; size = rep->length * 4; for (i = 0; i < rep->nSI; i++, sym++, wire++) { wire->sym = sym->sym; wire->mods = sym->mods; wire->match = sym->match; wire->virtualMod = sym->virtual_mod; wire->flags = sym->flags; memcpy((char *) &wire->act, (char *) &sym->act, sz_xkbActionWireDesc); if (client->swapped) { swapl(&wire->sym); } } if (rep->groups) { grp = (xkbModsWireDesc *) wire; for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (rep->groups & bit) { grp->mask = compat->groups[i].mask; grp->realMods = compat->groups[i].real_mods; grp->virtualMods = compat->groups[i].vmods; if (client->swapped) { swaps(&grp->virtualMods); } grp++; } } wire = (xkbSymInterpretWireDesc *) grp; } } else return BadAlloc; } else data = NULL; if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swaps(&rep->firstSI); swaps(&rep->nSI); swaps(&rep->nTotalSI); } WriteToClient(client, SIZEOF(xkbGetCompatMapReply), rep); if (data) { WriteToClient(client, size, data); free((char *) data); } return Success; } int ProcXkbGetCompatMap(ClientPtr client) { xkbGetCompatMapReply rep; DeviceIntPtr dev; XkbDescPtr xkb; XkbCompatMapPtr compat; REQUEST(xkbGetCompatMapReq); REQUEST_SIZE_MATCH(xkbGetCompatMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = dev->key->xkbInfo->desc; compat = xkb->compat; rep = (xkbGetCompatMapReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .deviceID = dev->id, .firstSI = stuff->firstSI, .nSI = stuff->nSI }; if (stuff->getAllSI) { rep.firstSI = 0; rep.nSI = compat->num_si; } else if ((((unsigned) stuff->nSI) > 0) && ((unsigned) (stuff->firstSI + stuff->nSI - 1) >= compat->num_si)) { client->errorValue = _XkbErrCode2(0x05, compat->num_si); return BadValue; } rep.nTotalSI = compat->num_si; rep.groups = stuff->groups; XkbComputeGetCompatMapReplySize(compat, &rep); return XkbSendCompatMap(client, compat, &rep); } /** * Apply the given request on the given device. * If dryRun is TRUE, then value checks are performed, but the device isn't * modified. */ static int _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev, xkbSetCompatMapReq * req, char *data, BOOL dryRun) { XkbSrvInfoPtr xkbi; XkbDescPtr xkb; XkbCompatMapPtr compat; int nGroups; unsigned i, bit; xkbi = dev->key->xkbInfo; xkb = xkbi->desc; compat = xkb->compat; if ((req->nSI > 0) || (req->truncateSI)) { xkbSymInterpretWireDesc *wire; if (req->firstSI > compat->num_si) { client->errorValue = _XkbErrCode2(0x02, compat->num_si); return BadValue; } wire = (xkbSymInterpretWireDesc *) data; wire += req->nSI; data = (char *) wire; } nGroups = 0; if (req->groups != 0) { for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (req->groups & bit) nGroups++; } } data += nGroups * SIZEOF(xkbModsWireDesc); if (((data - ((char *) req)) / 4) != req->length) { return BadLength; } /* Done all the checks we can do */ if (dryRun) return Success; data = (char *) &req[1]; if (req->nSI > 0) { xkbSymInterpretWireDesc *wire = (xkbSymInterpretWireDesc *) data; XkbSymInterpretPtr sym; unsigned int skipped = 0; if ((unsigned) (req->firstSI + req->nSI) > compat->size_si) { compat->num_si = compat->size_si = req->firstSI + req->nSI; compat->sym_interpret = reallocarray(compat->sym_interpret, compat->size_si, sizeof(XkbSymInterpretRec)); if (!compat->sym_interpret) { compat->num_si = compat->size_si = 0; return BadAlloc; } } else if (req->truncateSI) { compat->num_si = req->firstSI + req->nSI; } sym = &compat->sym_interpret[req->firstSI]; for (i = 0; i < req->nSI; i++, wire++) { if (client->swapped) { swapl(&wire->sym); } if (wire->sym == NoSymbol && wire->match == XkbSI_AnyOfOrNone && (wire->mods & 0xff) == 0xff && wire->act.type == XkbSA_XFree86Private) { ErrorF("XKB: Skipping broken Any+AnyOfOrNone(All) -> Private " "action from client\n"); skipped++; continue; } sym->sym = wire->sym; sym->mods = wire->mods; sym->match = wire->match; sym->flags = wire->flags; sym->virtual_mod = wire->virtualMod; memcpy((char *) &sym->act, (char *) &wire->act, SIZEOF(xkbActionWireDesc)); sym++; } if (skipped) { if (req->firstSI + req->nSI < compat->num_si) memmove(sym, sym + skipped, (compat->num_si - req->firstSI - req->nSI) * sizeof(*sym)); compat->num_si -= skipped; } data = (char *) wire; } else if (req->truncateSI) { compat->num_si = req->firstSI; } if (req->groups != 0) { xkbModsWireDesc *wire = (xkbModsWireDesc *) data; for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (req->groups & bit) { if (client->swapped) { swaps(&wire->virtualMods); } compat->groups[i].mask = wire->realMods; compat->groups[i].real_mods = wire->realMods; compat->groups[i].vmods = wire->virtualMods; if (wire->virtualMods != 0) { unsigned tmp; tmp = XkbMaskForVMask(xkb, wire->virtualMods); compat->groups[i].mask |= tmp; } data += SIZEOF(xkbModsWireDesc); wire = (xkbModsWireDesc *) data; } } } i = XkbPaddedSize((data - ((char *) req))); if ((i / 4) != req->length) { ErrorF("[xkb] Internal length error on read in _XkbSetCompatMap\n"); return BadLength; } if (dev->xkb_interest) { xkbCompatMapNotify ev; ev.deviceID = dev->id; ev.changedGroups = req->groups; ev.firstSI = req->firstSI; ev.nSI = req->nSI; ev.nTotalSI = compat->num_si; XkbSendCompatMapNotify(dev, &ev); } if (req->recomputeActions) { XkbChangesRec change; unsigned check; XkbEventCauseRec cause; XkbSetCauseXkbReq(&cause, X_kbSetCompatMap, client); memset(&change, 0, sizeof(XkbChangesRec)); XkbUpdateActions(dev, xkb->min_key_code, XkbNumKeys(xkb), &change, &check, &cause); if (check) XkbCheckSecondaryEffects(xkbi, check, &change, &cause); XkbSendNotification(dev, &change, &cause); } return Success; } int ProcXkbSetCompatMap(ClientPtr client) { DeviceIntPtr dev; char *data; int rc; REQUEST(xkbSetCompatMapReq); REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); data = (char *) &stuff[1]; /* check first using a dry-run */ rc = _XkbSetCompatMap(client, dev, stuff, data, TRUE); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { /* dry-run */ rc = _XkbSetCompatMap(client, other, stuff, data, TRUE); if (rc != Success) return rc; } } } } /* Yay, the dry-runs succeed. Let's apply */ rc = _XkbSetCompatMap(client, dev, stuff, data, FALSE); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { rc = _XkbSetCompatMap(client, other, stuff, data, FALSE); if (rc != Success) return rc; } } } } return Success; } /***====================================================================***/ int ProcXkbGetIndicatorState(ClientPtr client) { xkbGetIndicatorStateReply rep; XkbSrvLedInfoPtr sli; DeviceIntPtr dev; REQUEST(xkbGetIndicatorStateReq); REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, XkbXI_IndicatorStateMask); if (!sli) return BadAlloc; rep = (xkbGetIndicatorStateReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0, .state = sli->effectiveState }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.state); } WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), &rep); return Success; } /***====================================================================***/ static Status XkbComputeGetIndicatorMapReplySize(XkbIndicatorPtr indicators, xkbGetIndicatorMapReply * rep) { register int i, bit; int nIndicators; rep->realIndicators = indicators->phys_indicators; for (i = nIndicators = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (rep->which & bit) nIndicators++; } rep->length = (nIndicators * SIZEOF(xkbIndicatorMapWireDesc)) / 4; rep->nIndicators = nIndicators; return Success; } static int XkbSendIndicatorMap(ClientPtr client, XkbIndicatorPtr indicators, xkbGetIndicatorMapReply * rep) { int length; CARD8 *map; register int i; register unsigned bit; if (rep->length > 0) { CARD8 *to; to = map = xallocarray(rep->length, 4); if (map) { xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *) to; length = rep->length * 4; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (rep->which & bit) { wire->flags = indicators->maps[i].flags; wire->whichGroups = indicators->maps[i].which_groups; wire->groups = indicators->maps[i].groups; wire->whichMods = indicators->maps[i].which_mods; wire->mods = indicators->maps[i].mods.mask; wire->realMods = indicators->maps[i].mods.real_mods; wire->virtualMods = indicators->maps[i].mods.vmods; wire->ctrls = indicators->maps[i].ctrls; if (client->swapped) { swaps(&wire->virtualMods); swapl(&wire->ctrls); } wire++; } } to = (CARD8 *) wire; if ((to - map) != length) { client->errorValue = _XkbErrCode2(0xff, length); free(map); return BadLength; } } else return BadAlloc; } else map = NULL; if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->which); swapl(&rep->realIndicators); } WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), rep); if (map) { WriteToClient(client, length, map); free((char *) map); } return Success; } int ProcXkbGetIndicatorMap(ClientPtr client) { xkbGetIndicatorMapReply rep; DeviceIntPtr dev; XkbDescPtr xkb; XkbIndicatorPtr leds; REQUEST(xkbGetIndicatorMapReq); REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb = dev->key->xkbInfo->desc; leds = xkb->indicators; rep = (xkbGetIndicatorMapReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0, .which = stuff->which }; XkbComputeGetIndicatorMapReplySize(leds, &rep); return XkbSendIndicatorMap(client, leds, &rep); } /** * Apply the given map to the given device. Which specifies which components * to apply. */ static int _XkbSetIndicatorMap(ClientPtr client, DeviceIntPtr dev, int which, xkbIndicatorMapWireDesc * desc) { XkbSrvInfoPtr xkbi; XkbSrvLedInfoPtr sli; XkbEventCauseRec cause; int i, bit; xkbi = dev->key->xkbInfo; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, XkbXI_IndicatorMapsMask); if (!sli) return BadAlloc; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (which & bit) { sli->maps[i].flags = desc->flags; sli->maps[i].which_groups = desc->whichGroups; sli->maps[i].groups = desc->groups; sli->maps[i].which_mods = desc->whichMods; sli->maps[i].mods.mask = desc->mods; sli->maps[i].mods.real_mods = desc->mods; sli->maps[i].mods.vmods = desc->virtualMods; sli->maps[i].ctrls = desc->ctrls; if (desc->virtualMods != 0) { unsigned tmp; tmp = XkbMaskForVMask(xkbi->desc, desc->virtualMods); sli->maps[i].mods.mask = desc->mods | tmp; } desc++; } } XkbSetCauseXkbReq(&cause, X_kbSetIndicatorMap, client); XkbApplyLedMapChanges(dev, sli, which, NULL, NULL, &cause); return Success; } int ProcXkbSetIndicatorMap(ClientPtr client) { int i, bit; int nIndicators; DeviceIntPtr dev; xkbIndicatorMapWireDesc *from; int rc; REQUEST(xkbSetIndicatorMapReq); REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); if (stuff->which == 0) return Success; for (nIndicators = i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (stuff->which & bit) nIndicators++; } if (stuff->length != ((SIZEOF(xkbSetIndicatorMapReq) + (nIndicators * SIZEOF(xkbIndicatorMapWireDesc))) / 4)) { return BadLength; } from = (xkbIndicatorMapWireDesc *) &stuff[1]; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (stuff->which & bit) { if (client->swapped) { swaps(&from->virtualMods); swapl(&from->ctrls); } CHK_MASK_LEGAL(i, from->whichGroups, XkbIM_UseAnyGroup); CHK_MASK_LEGAL(i, from->whichMods, XkbIM_UseAnyMods); from++; } } from = (xkbIndicatorMapWireDesc *) &stuff[1]; rc = _XkbSetIndicatorMap(client, dev, stuff->which, from); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess); if (rc == Success) _XkbSetIndicatorMap(client, other, stuff->which, from); } } } return Success; } /***====================================================================***/ int ProcXkbGetNamedIndicator(ClientPtr client) { DeviceIntPtr dev; xkbGetNamedIndicatorReply rep; register int i = 0; XkbSrvLedInfoPtr sli; XkbIndicatorMapPtr map = NULL; REQUEST(xkbGetNamedIndicatorReq); REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixReadAccess); CHK_ATOM_ONLY(stuff->indicator); sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID, 0); if (!sli) return BadAlloc; i = 0; map = NULL; if ((sli->names) && (sli->maps)) { for (i = 0; i < XkbNumIndicators; i++) { if (stuff->indicator == sli->names[i]) { map = &sli->maps[i]; break; } } } rep = (xkbGetNamedIndicatorReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .deviceID = dev->id, .indicator = stuff->indicator }; if (map != NULL) { rep.found = TRUE; rep.on = ((sli->effectiveState & (1 << i)) != 0); rep.realIndicator = ((sli->physIndicators & (1 << i)) != 0); rep.ndx = i; rep.flags = map->flags; rep.whichGroups = map->which_groups; rep.groups = map->groups; rep.whichMods = map->which_mods; rep.mods = map->mods.mask; rep.realMods = map->mods.real_mods; rep.virtualMods = map->mods.vmods; rep.ctrls = map->ctrls; rep.supported = TRUE; } else { rep.found = FALSE; rep.on = FALSE; rep.realIndicator = FALSE; rep.ndx = XkbNoIndicator; rep.flags = 0; rep.whichGroups = 0; rep.groups = 0; rep.whichMods = 0; rep.mods = 0; rep.realMods = 0; rep.virtualMods = 0; rep.ctrls = 0; rep.supported = TRUE; } if (client->swapped) { swapl(&rep.length); swaps(&rep.sequenceNumber); swapl(&rep.indicator); swaps(&rep.virtualMods); swapl(&rep.ctrls); } WriteToClient(client, SIZEOF(xkbGetNamedIndicatorReply), &rep); return Success; } /** * Find the IM on the device. * Returns the map, or NULL if the map doesn't exist. * If the return value is NULL, led_return is undefined. Otherwise, led_return * is set to the led index of the map. */ static XkbIndicatorMapPtr _XkbFindNamedIndicatorMap(XkbSrvLedInfoPtr sli, Atom indicator, int *led_return) { XkbIndicatorMapPtr map; /* search for the right indicator */ map = NULL; if (sli->names && sli->maps) { int led; for (led = 0; (led < XkbNumIndicators) && (map == NULL); led++) { if (sli->names[led] == indicator) { map = &sli->maps[led]; *led_return = led; break; } } } return map; } /** * Creates an indicator map on the device. If dryRun is TRUE, it only checks * if creation is possible, but doesn't actually create it. */ static int _XkbCreateIndicatorMap(DeviceIntPtr dev, Atom indicator, int ledClass, int ledID, XkbIndicatorMapPtr * map_return, int *led_return, Bool dryRun) { XkbSrvLedInfoPtr sli; XkbIndicatorMapPtr map; int led; sli = XkbFindSrvLedInfo(dev, ledClass, ledID, XkbXI_IndicatorsMask); if (!sli) return BadAlloc; map = _XkbFindNamedIndicatorMap(sli, indicator, &led); if (!map) { /* find first unused indicator maps and assign the name to it */ for (led = 0, map = NULL; (led < XkbNumIndicators) && (map == NULL); led++) { if ((sli->names) && (sli->maps) && (sli->names[led] == None) && (!XkbIM_InUse(&sli->maps[led]))) { map = &sli->maps[led]; if (!dryRun) sli->names[led] = indicator; break; } } } if (!map) return BadAlloc; *led_return = led; *map_return = map; return Success; } static int _XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev, xkbSetNamedIndicatorReq * stuff) { unsigned int extDevReason; unsigned int statec, namec, mapc; XkbSrvLedInfoPtr sli; int led = 0; XkbIndicatorMapPtr map; DeviceIntPtr kbd; XkbEventCauseRec cause; xkbExtensionDeviceNotify ed; XkbChangesRec changes; int rc; rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass, stuff->ledID, &map, &led, FALSE); if (rc != Success || !map) /* oh-oh */ return rc; sli = XkbFindSrvLedInfo(dev, stuff->ledClass, stuff->ledID, XkbXI_IndicatorsMask); if (!sli) return BadAlloc; namec = mapc = statec = 0; extDevReason = 0; namec |= (1 << led); sli->namesPresent |= ((stuff->indicator != None) ? (1 << led) : 0); extDevReason |= XkbXI_IndicatorNamesMask; if (stuff->setMap) { map->flags = stuff->flags; map->which_groups = stuff->whichGroups; map->groups = stuff->groups; map->which_mods = stuff->whichMods; map->mods.mask = stuff->realMods; map->mods.real_mods = stuff->realMods; map->mods.vmods = stuff->virtualMods; map->ctrls = stuff->ctrls; mapc |= (1 << led); } if ((stuff->setState) && ((map->flags & XkbIM_NoExplicit) == 0)) { if (stuff->on) sli->explicitState |= (1 << led); else sli->explicitState &= ~(1 << led); statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led)); } memset((char *) &ed, 0, sizeof(xkbExtensionDeviceNotify)); memset((char *) &changes, 0, sizeof(XkbChangesRec)); XkbSetCauseXkbReq(&cause, X_kbSetNamedIndicator, client); if (namec) XkbApplyLedNameChanges(dev, sli, namec, &ed, &changes, &cause); if (mapc) XkbApplyLedMapChanges(dev, sli, mapc, &ed, &changes, &cause); if (statec) XkbApplyLedStateChanges(dev, sli, statec, &ed, &changes, &cause); kbd = dev; if ((sli->flags & XkbSLI_HasOwnState) == 0) kbd = inputInfo.keyboard; XkbFlushLedEvents(dev, kbd, sli, &ed, &changes, &cause); return Success; } int ProcXkbSetNamedIndicator(ClientPtr client) { int rc; DeviceIntPtr dev; int led = 0; XkbIndicatorMapPtr map; REQUEST(xkbSetNamedIndicatorReq); REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_LED_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); CHK_ATOM_ONLY(stuff->indicator); CHK_MASK_LEGAL(0x10, stuff->whichGroups, XkbIM_UseAnyGroup); CHK_MASK_LEGAL(0x11, stuff->whichMods, XkbIM_UseAnyMods); /* Dry-run for checks */ rc = _XkbCreateIndicatorMap(dev, stuff->indicator, stuff->ledClass, stuff->ledID, &map, &led, TRUE); if (rc != Success || !map) /* couldn't be created or didn't exist */ return rc; if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { rc = _XkbCreateIndicatorMap(other, stuff->indicator, stuff->ledClass, stuff->ledID, &map, &led, TRUE); if (rc != Success || !map) return rc; } } } /* All checks passed, let's do it */ rc = _XkbSetNamedIndicator(client, dev, stuff); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { _XkbSetNamedIndicator(client, other, stuff); } } } return Success; } /***====================================================================***/ static CARD32 _XkbCountAtoms(Atom *atoms, int maxAtoms, int *count) { register unsigned int i, bit, nAtoms; register CARD32 atomsPresent; for (i = nAtoms = atomsPresent = 0, bit = 1; i < maxAtoms; i++, bit <<= 1) { if (atoms[i] != None) { atomsPresent |= bit; nAtoms++; } } if (count) *count = nAtoms; return atomsPresent; } static char * _XkbWriteAtoms(char *wire, Atom *atoms, int maxAtoms, int swap) { register unsigned int i; Atom *atm; atm = (Atom *) wire; for (i = 0; i < maxAtoms; i++) { if (atoms[i] != None) { *atm = atoms[i]; if (swap) { swapl(atm); } atm++; } } return (char *) atm; } static Status XkbComputeGetNamesReplySize(XkbDescPtr xkb, xkbGetNamesReply * rep) { register unsigned which, length; register int i; rep->minKeyCode = xkb->min_key_code; rep->maxKeyCode = xkb->max_key_code; which = rep->which; length = 0; if (xkb->names != NULL) { if (which & XkbKeycodesNameMask) length++; if (which & XkbGeometryNameMask) length++; if (which & XkbSymbolsNameMask) length++; if (which & XkbPhysSymbolsNameMask) length++; if (which & XkbTypesNameMask) length++; if (which & XkbCompatNameMask) length++; } else which &= ~XkbComponentNamesMask; if (xkb->map != NULL) { if (which & XkbKeyTypeNamesMask) length += xkb->map->num_types; rep->nTypes = xkb->map->num_types; if (which & XkbKTLevelNamesMask) { XkbKeyTypePtr pType = xkb->map->types; int nKTLevels = 0; length += XkbPaddedSize(xkb->map->num_types) / 4; for (i = 0; i < xkb->map->num_types; i++, pType++) { if (pType->level_names != NULL) nKTLevels += pType->num_levels; } rep->nKTLevels = nKTLevels; length += nKTLevels; } } else { rep->nTypes = 0; rep->nKTLevels = 0; which &= ~(XkbKeyTypeNamesMask | XkbKTLevelNamesMask); } rep->minKeyCode = xkb->min_key_code; rep->maxKeyCode = xkb->max_key_code; rep->indicators = 0; rep->virtualMods = 0; rep->groupNames = 0; if (xkb->names != NULL) { if (which & XkbIndicatorNamesMask) { int nLeds; rep->indicators = _XkbCountAtoms(xkb->names->indicators, XkbNumIndicators, &nLeds); length += nLeds; if (nLeds == 0) which &= ~XkbIndicatorNamesMask; } if (which & XkbVirtualModNamesMask) { int nVMods; rep->virtualMods = _XkbCountAtoms(xkb->names->vmods, XkbNumVirtualMods, &nVMods); length += nVMods; if (nVMods == 0) which &= ~XkbVirtualModNamesMask; } if (which & XkbGroupNamesMask) { int nGroups; rep->groupNames = _XkbCountAtoms(xkb->names->groups, XkbNumKbdGroups, &nGroups); length += nGroups; if (nGroups == 0) which &= ~XkbGroupNamesMask; } if ((which & XkbKeyNamesMask) && (xkb->names->keys)) length += rep->nKeys; else which &= ~XkbKeyNamesMask; if ((which & XkbKeyAliasesMask) && (xkb->names->key_aliases) && (xkb->names->num_key_aliases > 0)) { rep->nKeyAliases = xkb->names->num_key_aliases; length += rep->nKeyAliases * 2; } else { which &= ~XkbKeyAliasesMask; rep->nKeyAliases = 0; } if ((which & XkbRGNamesMask) && (xkb->names->num_rg > 0)) length += xkb->names->num_rg; else which &= ~XkbRGNamesMask; } else { which &= ~(XkbIndicatorNamesMask | XkbVirtualModNamesMask); which &= ~(XkbGroupNamesMask | XkbKeyNamesMask | XkbKeyAliasesMask); which &= ~XkbRGNamesMask; } rep->length = length; rep->which = which; return Success; } static int XkbSendNames(ClientPtr client, XkbDescPtr xkb, xkbGetNamesReply * rep) { register unsigned i, length, which; char *start; char *desc; length = rep->length * 4; which = rep->which; if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->which); swaps(&rep->virtualMods); swapl(&rep->indicators); } start = desc = calloc(1, length); if (!start) return BadAlloc; if (xkb->names) { if (which & XkbKeycodesNameMask) { *((CARD32 *) desc) = xkb->names->keycodes; if (client->swapped) { swapl((int *) desc); } desc += 4; } if (which & XkbGeometryNameMask) { *((CARD32 *) desc) = xkb->names->geometry; if (client->swapped) { swapl((int *) desc); } desc += 4; } if (which & XkbSymbolsNameMask) { *((CARD32 *) desc) = xkb->names->symbols; if (client->swapped) { swapl((int *) desc); } desc += 4; } if (which & XkbPhysSymbolsNameMask) { register CARD32 *atm = (CARD32 *) desc; atm[0] = (CARD32) xkb->names->phys_symbols; if (client->swapped) { swapl(&atm[0]); } desc += 4; } if (which & XkbTypesNameMask) { *((CARD32 *) desc) = (CARD32) xkb->names->types; if (client->swapped) { swapl((int *) desc); } desc += 4; } if (which & XkbCompatNameMask) { *((CARD32 *) desc) = (CARD32) xkb->names->compat; if (client->swapped) { swapl((int *) desc); } desc += 4; } if (which & XkbKeyTypeNamesMask) { register CARD32 *atm = (CARD32 *) desc; register XkbKeyTypePtr type = xkb->map->types; for (i = 0; i < xkb->map->num_types; i++, atm++, type++) { *atm = (CARD32) type->name; if (client->swapped) { swapl(atm); } } desc = (char *) atm; } if (which & XkbKTLevelNamesMask && xkb->map) { XkbKeyTypePtr type = xkb->map->types; register CARD32 *atm; for (i = 0; i < rep->nTypes; i++, type++) { *desc++ = type->num_levels; } desc += XkbPaddedSize(rep->nTypes) - rep->nTypes; atm = (CARD32 *) desc; type = xkb->map->types; for (i = 0; i < xkb->map->num_types; i++, type++) { register unsigned l; if (type->level_names) { for (l = 0; l < type->num_levels; l++, atm++) { *atm = type->level_names[l]; if (client->swapped) { swapl(atm); } } desc += type->num_levels * 4; } } } if (which & XkbIndicatorNamesMask) { desc = _XkbWriteAtoms(desc, xkb->names->indicators, XkbNumIndicators, client->swapped); } if (which & XkbVirtualModNamesMask) { desc = _XkbWriteAtoms(desc, xkb->names->vmods, XkbNumVirtualMods, client->swapped); } if (which & XkbGroupNamesMask) { desc = _XkbWriteAtoms(desc, xkb->names->groups, XkbNumKbdGroups, client->swapped); } if (which & XkbKeyNamesMask) { for (i = 0; i < rep->nKeys; i++, desc += sizeof(XkbKeyNameRec)) { *((XkbKeyNamePtr) desc) = xkb->names->keys[i + rep->firstKey]; } } if (which & XkbKeyAliasesMask) { XkbKeyAliasPtr pAl; pAl = xkb->names->key_aliases; for (i = 0; i < rep->nKeyAliases; i++, pAl++, desc += 2 * XkbKeyNameLength) { *((XkbKeyAliasPtr) desc) = *pAl; } } if ((which & XkbRGNamesMask) && (rep->nRadioGroups > 0)) { register CARD32 *atm = (CARD32 *) desc; for (i = 0; i < rep->nRadioGroups; i++, atm++) { *atm = (CARD32) xkb->names->radio_groups[i]; if (client->swapped) { swapl(atm); } } desc += rep->nRadioGroups * 4; } } if ((desc - start) != (length)) { ErrorF("[xkb] BOGUS LENGTH in write names, expected %d, got %ld\n", length, (unsigned long) (desc - start)); } WriteToClient(client, SIZEOF(xkbGetNamesReply), rep); WriteToClient(client, length, start); free((char *) start); return Success; } int ProcXkbGetNames(ClientPtr client) { DeviceIntPtr dev; XkbDescPtr xkb; xkbGetNamesReply rep; REQUEST(xkbGetNamesReq); REQUEST_SIZE_MATCH(xkbGetNamesReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_LEGAL(0x01, stuff->which, XkbAllNamesMask); xkb = dev->key->xkbInfo->desc; rep = (xkbGetNamesReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0, .which = stuff->which, .nTypes = xkb->map->num_types, .firstKey = xkb->min_key_code, .nKeys = XkbNumKeys(xkb), .nKeyAliases = xkb->names ? xkb->names->num_key_aliases : 0, .nRadioGroups = xkb->names ? xkb->names->num_rg : 0 }; XkbComputeGetNamesReplySize(xkb, &rep); return XkbSendNames(client, xkb, &rep); } /***====================================================================***/ static CARD32 * _XkbCheckAtoms(CARD32 *wire, int nAtoms, int swapped, Atom *pError) { register int i; for (i = 0; i < nAtoms; i++, wire++) { if (swapped) { swapl(wire); } if ((((Atom) *wire) != None) && (!ValidAtom((Atom) *wire))) { *pError = ((Atom) *wire); return NULL; } } return wire; } static CARD32 * _XkbCheckMaskedAtoms(CARD32 *wire, int nAtoms, CARD32 present, int swapped, Atom *pError) { register unsigned i, bit; for (i = 0, bit = 1; (i < nAtoms) && (present); i++, bit <<= 1) { if ((present & bit) == 0) continue; if (swapped) { swapl(wire); } if ((((Atom) *wire) != None) && (!ValidAtom(((Atom) *wire)))) { *pError = (Atom) *wire; return NULL; } wire++; } return wire; } static Atom * _XkbCopyMaskedAtoms(Atom *wire, Atom *dest, int nAtoms, CARD32 present) { register int i, bit; for (i = 0, bit = 1; (i < nAtoms) && (present); i++, bit <<= 1) { if ((present & bit) == 0) continue; dest[i] = *wire++; } return wire; } static Bool _XkbCheckTypeName(Atom name, int typeNdx) { const char *str; str = NameForAtom(name); if ((strcmp(str, "ONE_LEVEL") == 0) || (strcmp(str, "TWO_LEVEL") == 0) || (strcmp(str, "ALPHABETIC") == 0) || (strcmp(str, "KEYPAD") == 0)) return FALSE; return TRUE; } /** * Check the device-dependent data in the request against the device. Returns * Success, or the appropriate error code. */ static int _XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq * stuff, CARD32 *data) { XkbDescRec *xkb; CARD32 *tmp; Atom bad = None; tmp = data; xkb = dev->key->xkbInfo->desc; if (stuff->which & XkbKeyTypeNamesMask) { int i; CARD32 *old; if (stuff->nTypes < 1) { client->errorValue = _XkbErrCode2(0x02, stuff->nTypes); return BadValue; } if ((unsigned) (stuff->firstType + stuff->nTypes - 1) >= xkb->map->num_types) { client->errorValue = _XkbErrCode4(0x03, stuff->firstType, stuff->nTypes, xkb->map->num_types); return BadValue; } if (((unsigned) stuff->firstType) <= XkbLastRequiredType) { client->errorValue = _XkbErrCode2(0x04, stuff->firstType); return BadAccess; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nTypes)) return BadLength; old = tmp; tmp = _XkbCheckAtoms(tmp, stuff->nTypes, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } for (i = 0; i < stuff->nTypes; i++, old++) { if (!_XkbCheckTypeName((Atom) *old, stuff->firstType + i)) client->errorValue = _XkbErrCode2(0x05, i); } } if (stuff->which & XkbKTLevelNamesMask) { unsigned i; XkbKeyTypePtr type; CARD8 *width; if (stuff->nKTLevels < 1) { client->errorValue = _XkbErrCode2(0x05, stuff->nKTLevels); return BadValue; } if ((unsigned) (stuff->firstKTLevel + stuff->nKTLevels - 1) >= xkb->map->num_types) { client->errorValue = _XkbErrCode4(0x06, stuff->firstKTLevel, stuff->nKTLevels, xkb->map->num_types); return BadValue; } width = (CARD8 *) tmp; tmp = (CARD32 *) (((char *) tmp) + XkbPaddedSize(stuff->nKTLevels)); if (!_XkbCheckRequestBounds(client, stuff, width, tmp)) return BadLength; type = &xkb->map->types[stuff->firstKTLevel]; for (i = 0; i < stuff->nKTLevels; i++, type++) { if (width[i] == 0) continue; else if (width[i] != type->num_levels) { client->errorValue = _XkbErrCode4(0x07, i + stuff->firstKTLevel, type->num_levels, width[i]); return BadMatch; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + width[i])) return BadLength; tmp = _XkbCheckAtoms(tmp, width[i], client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } } if (stuff->which & XkbIndicatorNamesMask) { if (stuff->indicators == 0) { client->errorValue = 0x08; return BadMatch; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + Ones(stuff->indicators))) return BadLength; tmp = _XkbCheckMaskedAtoms(tmp, XkbNumIndicators, stuff->indicators, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (stuff->which & XkbVirtualModNamesMask) { if (stuff->virtualMods == 0) { client->errorValue = 0x09; return BadMatch; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + Ones(stuff->virtualMods))) return BadLength; tmp = _XkbCheckMaskedAtoms(tmp, XkbNumVirtualMods, (CARD32) stuff->virtualMods, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (stuff->which & XkbGroupNamesMask) { if (stuff->groupNames == 0) { client->errorValue = 0x0a; return BadMatch; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + Ones(stuff->groupNames))) return BadLength; tmp = _XkbCheckMaskedAtoms(tmp, XkbNumKbdGroups, (CARD32) stuff->groupNames, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (stuff->which & XkbKeyNamesMask) { if (stuff->firstKey < (unsigned) xkb->min_key_code) { client->errorValue = _XkbErrCode3(0x0b, xkb->min_key_code, stuff->firstKey); return BadValue; } if (((unsigned) (stuff->firstKey + stuff->nKeys - 1) > xkb->max_key_code) || (stuff->nKeys < 1)) { client->errorValue = _XkbErrCode4(0x0c, xkb->max_key_code, stuff->firstKey, stuff->nKeys); return BadValue; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nKeys)) return BadLength; tmp += stuff->nKeys; } if ((stuff->which & XkbKeyAliasesMask) && (stuff->nKeyAliases > 0)) { if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + (stuff->nKeyAliases * 2))) return BadLength; tmp += stuff->nKeyAliases * 2; } if (stuff->which & XkbRGNamesMask) { if (stuff->nRadioGroups < 1) { client->errorValue = _XkbErrCode2(0x0d, stuff->nRadioGroups); return BadValue; } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + stuff->nRadioGroups)) return BadLength; tmp = _XkbCheckAtoms(tmp, stuff->nRadioGroups, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if ((tmp - ((CARD32 *) stuff)) != stuff->length) { client->errorValue = stuff->length; return BadLength; } return Success; } static int _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq * stuff) { XkbDescRec *xkb; XkbNamesRec *names; CARD32 *tmp; xkbNamesNotify nn; tmp = (CARD32 *) &stuff[1]; xkb = dev->key->xkbInfo->desc; names = xkb->names; if (XkbAllocNames(xkb, stuff->which, stuff->nRadioGroups, stuff->nKeyAliases) != Success) { return BadAlloc; } memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed = stuff->which; tmp = (CARD32 *) &stuff[1]; if (stuff->which & XkbKeycodesNameMask) names->keycodes = *tmp++; if (stuff->which & XkbGeometryNameMask) names->geometry = *tmp++; if (stuff->which & XkbSymbolsNameMask) names->symbols = *tmp++; if (stuff->which & XkbPhysSymbolsNameMask) names->phys_symbols = *tmp++; if (stuff->which & XkbTypesNameMask) names->types = *tmp++; if (stuff->which & XkbCompatNameMask) names->compat = *tmp++; if ((stuff->which & XkbKeyTypeNamesMask) && (stuff->nTypes > 0)) { register unsigned i; register XkbKeyTypePtr type; type = &xkb->map->types[stuff->firstType]; for (i = 0; i < stuff->nTypes; i++, type++) { type->name = *tmp++; } nn.firstType = stuff->firstType; nn.nTypes = stuff->nTypes; } if (stuff->which & XkbKTLevelNamesMask) { register XkbKeyTypePtr type; register unsigned i; CARD8 *width; width = (CARD8 *) tmp; tmp = (CARD32 *) (((char *) tmp) + XkbPaddedSize(stuff->nKTLevels)); type = &xkb->map->types[stuff->firstKTLevel]; for (i = 0; i < stuff->nKTLevels; i++, type++) { if (width[i] > 0) { if (type->level_names) { register unsigned n; for (n = 0; n < width[i]; n++) { type->level_names[n] = tmp[n]; } } tmp += width[i]; } } nn.firstLevelName = 0; nn.nLevelNames = stuff->nTypes; } if (stuff->which & XkbIndicatorNamesMask) { tmp = _XkbCopyMaskedAtoms(tmp, names->indicators, XkbNumIndicators, stuff->indicators); nn.changedIndicators = stuff->indicators; } if (stuff->which & XkbVirtualModNamesMask) { tmp = _XkbCopyMaskedAtoms(tmp, names->vmods, XkbNumVirtualMods, stuff->virtualMods); nn.changedVirtualMods = stuff->virtualMods; } if (stuff->which & XkbGroupNamesMask) { tmp = _XkbCopyMaskedAtoms(tmp, names->groups, XkbNumKbdGroups, stuff->groupNames); nn.changedVirtualMods = stuff->groupNames; } if (stuff->which & XkbKeyNamesMask) { memcpy((char *) &names->keys[stuff->firstKey], (char *) tmp, stuff->nKeys * XkbKeyNameLength); tmp += stuff->nKeys; nn.firstKey = stuff->firstKey; nn.nKeys = stuff->nKeys; } if (stuff->which & XkbKeyAliasesMask) { if (stuff->nKeyAliases > 0) { register int na = stuff->nKeyAliases; if (XkbAllocNames(xkb, XkbKeyAliasesMask, 0, na) != Success) return BadAlloc; memcpy((char *) names->key_aliases, (char *) tmp, stuff->nKeyAliases * sizeof(XkbKeyAliasRec)); tmp += stuff->nKeyAliases * 2; } else if (names->key_aliases != NULL) { free(names->key_aliases); names->key_aliases = NULL; names->num_key_aliases = 0; } nn.nAliases = names->num_key_aliases; } if (stuff->which & XkbRGNamesMask) { if (stuff->nRadioGroups > 0) { register unsigned i, nrg; nrg = stuff->nRadioGroups; if (XkbAllocNames(xkb, XkbRGNamesMask, nrg, 0) != Success) return BadAlloc; for (i = 0; i < stuff->nRadioGroups; i++) { names->radio_groups[i] = tmp[i]; } tmp += stuff->nRadioGroups; } else if (names->radio_groups) { free(names->radio_groups); names->radio_groups = NULL; names->num_rg = 0; } nn.nRadioGroups = names->num_rg; } if (nn.changed) { Bool needExtEvent; needExtEvent = (nn.changed & XkbIndicatorNamesMask) != 0; XkbSendNamesNotify(dev, &nn); if (needExtEvent) { XkbSrvLedInfoPtr sli; xkbExtensionDeviceNotify edev; register int i; register unsigned bit; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, XkbXI_IndicatorsMask); sli->namesPresent = 0; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (names->indicators[i] != None) sli->namesPresent |= bit; } memset(&edev, 0, sizeof(xkbExtensionDeviceNotify)); edev.reason = XkbXI_IndicatorNamesMask; edev.ledClass = KbdFeedbackClass; edev.ledID = dev->kbdfeed->ctrl.id; edev.ledsDefined = sli->namesPresent | sli->mapsPresent; edev.ledState = sli->effectiveState; edev.firstBtn = 0; edev.nBtns = 0; edev.supported = XkbXI_AllFeaturesMask; edev.unsupported = 0; XkbSendExtensionDeviceNotify(dev, client, &edev); } } return Success; } int ProcXkbSetNames(ClientPtr client) { DeviceIntPtr dev; CARD32 *tmp; Atom bad; int rc; REQUEST(xkbSetNamesReq); REQUEST_AT_LEAST_SIZE(xkbSetNamesReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->which, XkbAllNamesMask); /* check device-independent stuff */ tmp = (CARD32 *) &stuff[1]; if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbKeycodesNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbGeometryNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbSymbolsNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbPhysSymbolsNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbTypesNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } if (!_XkbCheckRequestBounds(client, stuff, tmp, tmp + 1)) return BadLength; if (stuff->which & XkbCompatNameMask) { tmp = _XkbCheckAtoms(tmp, 1, client->swapped, &bad); if (!tmp) { client->errorValue = bad; return BadAtom; } } /* start of device-dependent tests */ rc = _XkbSetNamesCheck(client, dev, stuff, tmp); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { rc = _XkbSetNamesCheck(client, other, stuff, tmp); if (rc != Success) return rc; } } } } /* everything is okay -- update names */ rc = _XkbSetNames(client, dev, stuff); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) _XkbSetNames(client, other, stuff); } } } /* everything is okay -- update names */ return Success; } /***====================================================================***/ #include "xkbgeom.h" #define XkbSizeCountedString(s) ((s)?((((2+strlen(s))+3)/4)*4):4) /** * Write the zero-terminated string str into wire as a pascal string with a * 16-bit length field prefixed before the actual string. * * @param wire The destination array, usually the wire struct * @param str The source string as zero-terminated C string * @param swap If TRUE, the length field is swapped. * * @return The input string in the format with a * (swapped) 16 bit string length, non-zero terminated. */ static char * XkbWriteCountedString(char *wire, const char *str, Bool swap) { CARD16 len, *pLen, paddedLen; if (!str) return wire; len = strlen(str); pLen = (CARD16 *) wire; *pLen = len; if (swap) { swaps(pLen); } paddedLen = pad_to_int32(sizeof(len) + len) - sizeof(len); strncpy(&wire[sizeof(len)], str, paddedLen); wire += sizeof(len) + paddedLen; return wire; } static int XkbSizeGeomProperties(XkbGeometryPtr geom) { register int i, size; XkbPropertyPtr prop; for (size = i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { size += XkbSizeCountedString(prop->name); size += XkbSizeCountedString(prop->value); } return size; } static char * XkbWriteGeomProperties(char *wire, XkbGeometryPtr geom, Bool swap) { register int i; register XkbPropertyPtr prop; for (i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { wire = XkbWriteCountedString(wire, prop->name, swap); wire = XkbWriteCountedString(wire, prop->value, swap); } return wire; } static int XkbSizeGeomKeyAliases(XkbGeometryPtr geom) { return geom->num_key_aliases * (2 * XkbKeyNameLength); } static char * XkbWriteGeomKeyAliases(char *wire, XkbGeometryPtr geom, Bool swap) { register int sz; sz = geom->num_key_aliases * (XkbKeyNameLength * 2); if (sz > 0) { memcpy(wire, (char *) geom->key_aliases, sz); wire += sz; } return wire; } static int XkbSizeGeomColors(XkbGeometryPtr geom) { register int i, size; register XkbColorPtr color; for (i = size = 0, color = geom->colors; i < geom->num_colors; i++, color++) { size += XkbSizeCountedString(color->spec); } return size; } static char * XkbWriteGeomColors(char *wire, XkbGeometryPtr geom, Bool swap) { register int i; register XkbColorPtr color; for (i = 0, color = geom->colors; i < geom->num_colors; i++, color++) { wire = XkbWriteCountedString(wire, color->spec, swap); } return wire; } static int XkbSizeGeomShapes(XkbGeometryPtr geom) { register int i, size; register XkbShapePtr shape; for (i = size = 0, shape = geom->shapes; i < geom->num_shapes; i++, shape++) { register int n; register XkbOutlinePtr ol; size += SIZEOF(xkbShapeWireDesc); for (n = 0, ol = shape->outlines; n < shape->num_outlines; n++, ol++) { size += SIZEOF(xkbOutlineWireDesc); size += ol->num_points * SIZEOF(xkbPointWireDesc); } } return size; } static char * XkbWriteGeomShapes(char *wire, XkbGeometryPtr geom, Bool swap) { int i; XkbShapePtr shape; xkbShapeWireDesc *shapeWire; for (i = 0, shape = geom->shapes; i < geom->num_shapes; i++, shape++) { register int o; XkbOutlinePtr ol; xkbOutlineWireDesc *olWire; shapeWire = (xkbShapeWireDesc *) wire; shapeWire->name = shape->name; shapeWire->nOutlines = shape->num_outlines; if (shape->primary != NULL) shapeWire->primaryNdx = XkbOutlineIndex(shape, shape->primary); else shapeWire->primaryNdx = XkbNoShape; if (shape->approx != NULL) shapeWire->approxNdx = XkbOutlineIndex(shape, shape->approx); else shapeWire->approxNdx = XkbNoShape; shapeWire->pad = 0; if (swap) { swapl(&shapeWire->name); } wire = (char *) &shapeWire[1]; for (o = 0, ol = shape->outlines; o < shape->num_outlines; o++, ol++) { register int p; XkbPointPtr pt; xkbPointWireDesc *ptWire; olWire = (xkbOutlineWireDesc *) wire; olWire->nPoints = ol->num_points; olWire->cornerRadius = ol->corner_radius; olWire->pad = 0; wire = (char *) &olWire[1]; ptWire = (xkbPointWireDesc *) wire; for (p = 0, pt = ol->points; p < ol->num_points; p++, pt++) { ptWire[p].x = pt->x; ptWire[p].y = pt->y; if (swap) { swaps(&ptWire[p].x); swaps(&ptWire[p].y); } } wire = (char *) &ptWire[ol->num_points]; } } return wire; } static int XkbSizeGeomDoodads(int num_doodads, XkbDoodadPtr doodad) { register int i, size; for (i = size = 0; i < num_doodads; i++, doodad++) { size += SIZEOF(xkbAnyDoodadWireDesc); if (doodad->any.type == XkbTextDoodad) { size += XkbSizeCountedString(doodad->text.text); size += XkbSizeCountedString(doodad->text.font); } else if (doodad->any.type == XkbLogoDoodad) { size += XkbSizeCountedString(doodad->logo.logo_name); } } return size; } static char * XkbWriteGeomDoodads(char *wire, int num_doodads, XkbDoodadPtr doodad, Bool swap) { register int i; xkbDoodadWireDesc *doodadWire; for (i = 0; i < num_doodads; i++, doodad++) { doodadWire = (xkbDoodadWireDesc *) wire; wire = (char *) &doodadWire[1]; memset(doodadWire, 0, SIZEOF(xkbDoodadWireDesc)); doodadWire->any.name = doodad->any.name; doodadWire->any.type = doodad->any.type; doodadWire->any.priority = doodad->any.priority; doodadWire->any.top = doodad->any.top; doodadWire->any.left = doodad->any.left; if (swap) { swapl(&doodadWire->any.name); swaps(&doodadWire->any.top); swaps(&doodadWire->any.left); } switch (doodad->any.type) { case XkbOutlineDoodad: case XkbSolidDoodad: doodadWire->shape.angle = doodad->shape.angle; doodadWire->shape.colorNdx = doodad->shape.color_ndx; doodadWire->shape.shapeNdx = doodad->shape.shape_ndx; if (swap) { swaps(&doodadWire->shape.angle); } break; case XkbTextDoodad: doodadWire->text.angle = doodad->text.angle; doodadWire->text.width = doodad->text.width; doodadWire->text.height = doodad->text.height; doodadWire->text.colorNdx = doodad->text.color_ndx; if (swap) { swaps(&doodadWire->text.angle); swaps(&doodadWire->text.width); swaps(&doodadWire->text.height); } wire = XkbWriteCountedString(wire, doodad->text.text, swap); wire = XkbWriteCountedString(wire, doodad->text.font, swap); break; case XkbIndicatorDoodad: doodadWire->indicator.shapeNdx = doodad->indicator.shape_ndx; doodadWire->indicator.onColorNdx = doodad->indicator.on_color_ndx; doodadWire->indicator.offColorNdx = doodad->indicator.off_color_ndx; break; case XkbLogoDoodad: doodadWire->logo.angle = doodad->logo.angle; doodadWire->logo.colorNdx = doodad->logo.color_ndx; doodadWire->logo.shapeNdx = doodad->logo.shape_ndx; wire = XkbWriteCountedString(wire, doodad->logo.logo_name, swap); break; default: ErrorF("[xkb] Unknown doodad type %d in XkbWriteGeomDoodads\n", doodad->any.type); ErrorF("[xkb] Ignored\n"); break; } } return wire; } static char * XkbWriteGeomOverlay(char *wire, XkbOverlayPtr ol, Bool swap) { register int r; XkbOverlayRowPtr row; xkbOverlayWireDesc *olWire; olWire = (xkbOverlayWireDesc *) wire; olWire->name = ol->name; olWire->nRows = ol->num_rows; olWire->pad1 = 0; olWire->pad2 = 0; if (swap) { swapl(&olWire->name); } wire = (char *) &olWire[1]; for (r = 0, row = ol->rows; r < ol->num_rows; r++, row++) { unsigned int k; XkbOverlayKeyPtr key; xkbOverlayRowWireDesc *rowWire; rowWire = (xkbOverlayRowWireDesc *) wire; rowWire->rowUnder = row->row_under; rowWire->nKeys = row->num_keys; rowWire->pad1 = 0; wire = (char *) &rowWire[1]; for (k = 0, key = row->keys; k < row->num_keys; k++, key++) { xkbOverlayKeyWireDesc *keyWire; keyWire = (xkbOverlayKeyWireDesc *) wire; memcpy(keyWire->over, key->over.name, XkbKeyNameLength); memcpy(keyWire->under, key->under.name, XkbKeyNameLength); wire = (char *) &keyWire[1]; } } return wire; } static int XkbSizeGeomSections(XkbGeometryPtr geom) { register int i, size; XkbSectionPtr section; for (i = size = 0, section = geom->sections; i < geom->num_sections; i++, section++) { size += SIZEOF(xkbSectionWireDesc); if (section->rows) { int r; XkbRowPtr row; for (r = 0, row = section->rows; r < section->num_rows; row++, r++) { size += SIZEOF(xkbRowWireDesc); size += row->num_keys * SIZEOF(xkbKeyWireDesc); } } if (section->doodads) size += XkbSizeGeomDoodads(section->num_doodads, section->doodads); if (section->overlays) { int o; XkbOverlayPtr ol; for (o = 0, ol = section->overlays; o < section->num_overlays; o++, ol++) { int r; XkbOverlayRowPtr row; size += SIZEOF(xkbOverlayWireDesc); for (r = 0, row = ol->rows; r < ol->num_rows; r++, row++) { size += SIZEOF(xkbOverlayRowWireDesc); size += row->num_keys * SIZEOF(xkbOverlayKeyWireDesc); } } } } return size; } static char * XkbWriteGeomSections(char *wire, XkbGeometryPtr geom, Bool swap) { register int i; XkbSectionPtr section; xkbSectionWireDesc *sectionWire; for (i = 0, section = geom->sections; i < geom->num_sections; i++, section++) { sectionWire = (xkbSectionWireDesc *) wire; sectionWire->name = section->name; sectionWire->top = section->top; sectionWire->left = section->left; sectionWire->width = section->width; sectionWire->height = section->height; sectionWire->angle = section->angle; sectionWire->priority = section->priority; sectionWire->nRows = section->num_rows; sectionWire->nDoodads = section->num_doodads; sectionWire->nOverlays = section->num_overlays; sectionWire->pad = 0; if (swap) { swapl(§ionWire->name); swaps(§ionWire->top); swaps(§ionWire->left); swaps(§ionWire->width); swaps(§ionWire->height); swaps(§ionWire->angle); } wire = (char *) §ionWire[1]; if (section->rows) { int r; XkbRowPtr row; xkbRowWireDesc *rowWire; for (r = 0, row = section->rows; r < section->num_rows; r++, row++) { rowWire = (xkbRowWireDesc *) wire; rowWire->top = row->top; rowWire->left = row->left; rowWire->nKeys = row->num_keys; rowWire->vertical = row->vertical; rowWire->pad = 0; if (swap) { swaps(&rowWire->top); swaps(&rowWire->left); } wire = (char *) &rowWire[1]; if (row->keys) { int k; XkbKeyPtr key; xkbKeyWireDesc *keyWire; keyWire = (xkbKeyWireDesc *) wire; for (k = 0, key = row->keys; k < row->num_keys; k++, key++) { memcpy(keyWire[k].name, key->name.name, XkbKeyNameLength); keyWire[k].gap = key->gap; keyWire[k].shapeNdx = key->shape_ndx; keyWire[k].colorNdx = key->color_ndx; if (swap) { swaps(&keyWire[k].gap); } } wire = (char *) &keyWire[row->num_keys]; } } } if (section->doodads) { wire = XkbWriteGeomDoodads(wire, section->num_doodads, section->doodads, swap); } if (section->overlays) { register int o; for (o = 0; o < section->num_overlays; o++) { wire = XkbWriteGeomOverlay(wire, §ion->overlays[o], swap); } } } return wire; } static Status XkbComputeGetGeometryReplySize(XkbGeometryPtr geom, xkbGetGeometryReply * rep, Atom name) { int len; if (geom != NULL) { len = XkbSizeCountedString(geom->label_font); len += XkbSizeGeomProperties(geom); len += XkbSizeGeomColors(geom); len += XkbSizeGeomShapes(geom); len += XkbSizeGeomSections(geom); len += XkbSizeGeomDoodads(geom->num_doodads, geom->doodads); len += XkbSizeGeomKeyAliases(geom); rep->length = len / 4; rep->found = TRUE; rep->name = geom->name; rep->widthMM = geom->width_mm; rep->heightMM = geom->height_mm; rep->nProperties = geom->num_properties; rep->nColors = geom->num_colors; rep->nShapes = geom->num_shapes; rep->nSections = geom->num_sections; rep->nDoodads = geom->num_doodads; rep->nKeyAliases = geom->num_key_aliases; rep->baseColorNdx = XkbGeomColorIndex(geom, geom->base_color); rep->labelColorNdx = XkbGeomColorIndex(geom, geom->label_color); } else { rep->length = 0; rep->found = FALSE; rep->name = name; rep->widthMM = rep->heightMM = 0; rep->nProperties = rep->nColors = rep->nShapes = 0; rep->nSections = rep->nDoodads = 0; rep->nKeyAliases = 0; rep->labelColorNdx = rep->baseColorNdx = 0; } return Success; } static int XkbSendGeometry(ClientPtr client, XkbGeometryPtr geom, xkbGetGeometryReply * rep, Bool freeGeom) { char *desc, *start; int len; if (geom != NULL) { start = desc = xallocarray(rep->length, 4); if (!start) return BadAlloc; len = rep->length * 4; desc = XkbWriteCountedString(desc, geom->label_font, client->swapped); if (rep->nProperties > 0) desc = XkbWriteGeomProperties(desc, geom, client->swapped); if (rep->nColors > 0) desc = XkbWriteGeomColors(desc, geom, client->swapped); if (rep->nShapes > 0) desc = XkbWriteGeomShapes(desc, geom, client->swapped); if (rep->nSections > 0) desc = XkbWriteGeomSections(desc, geom, client->swapped); if (rep->nDoodads > 0) desc = XkbWriteGeomDoodads(desc, geom->num_doodads, geom->doodads, client->swapped); if (rep->nKeyAliases > 0) desc = XkbWriteGeomKeyAliases(desc, geom, client->swapped); if ((desc - start) != (len)) { ErrorF ("[xkb] BOGUS LENGTH in XkbSendGeometry, expected %d, got %ld\n", len, (unsigned long) (desc - start)); } } else { len = 0; start = NULL; } if (client->swapped) { swaps(&rep->sequenceNumber); swapl(&rep->length); swapl(&rep->name); swaps(&rep->widthMM); swaps(&rep->heightMM); swaps(&rep->nProperties); swaps(&rep->nColors); swaps(&rep->nShapes); swaps(&rep->nSections); swaps(&rep->nDoodads); swaps(&rep->nKeyAliases); } WriteToClient(client, SIZEOF(xkbGetGeometryReply), rep); if (len > 0) WriteToClient(client, len, start); if (start != NULL) free((char *) start); if (freeGeom) XkbFreeGeometry(geom, XkbGeomAllMask, TRUE); return Success; } int ProcXkbGetGeometry(ClientPtr client) { DeviceIntPtr dev; xkbGetGeometryReply rep; XkbGeometryPtr geom; Bool shouldFree; Status status; REQUEST(xkbGetGeometryReq); REQUEST_SIZE_MATCH(xkbGetGeometryReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_ATOM_OR_NONE(stuff->name); geom = XkbLookupNamedGeometry(dev, stuff->name, &shouldFree); rep = (xkbGetGeometryReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0 }; status = XkbComputeGetGeometryReplySize(geom, &rep, stuff->name); if (status != Success) return status; else return XkbSendGeometry(client, geom, &rep, shouldFree); } /***====================================================================***/ static Status _GetCountedString(char **wire_inout, ClientPtr client, char **str) { char *wire, *next; CARD16 len; wire = *wire_inout; if (client->req_len < bytes_to_int32(wire + 2 - (char *) client->requestBuffer)) return BadValue; len = *(CARD16 *) wire; if (client->swapped) { swaps(&len); } next = wire + XkbPaddedSize(len + 2); /* Check we're still within the size of the request */ if (client->req_len < bytes_to_int32(next - (char *) client->requestBuffer)) return BadValue; *str = malloc(len + 1); if (!*str) return BadAlloc; memcpy(*str, &wire[2], len); *(*str + len) = '\0'; *wire_inout = next; return Success; } static Status _CheckSetDoodad(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { char *wire; xkbDoodadWireDesc *dWire; xkbAnyDoodadWireDesc any; xkbTextDoodadWireDesc text; XkbDoodadPtr doodad; Status status; dWire = (xkbDoodadWireDesc *) (*wire_inout); if (!_XkbCheckRequestBounds(client, req, dWire, dWire + 1)) return BadLength; any = dWire->any; wire = (char *) &dWire[1]; if (client->swapped) { swapl(&any.name); swaps(&any.top); swaps(&any.left); swaps(&any.angle); } CHK_ATOM_ONLY(dWire->any.name); doodad = XkbAddGeomDoodad(geom, section, any.name); if (!doodad) return BadAlloc; doodad->any.type = dWire->any.type; doodad->any.priority = dWire->any.priority; doodad->any.top = any.top; doodad->any.left = any.left; doodad->any.angle = any.angle; switch (doodad->any.type) { case XkbOutlineDoodad: case XkbSolidDoodad: if (dWire->shape.colorNdx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x40, geom->num_colors, dWire->shape.colorNdx); return BadMatch; } if (dWire->shape.shapeNdx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x41, geom->num_shapes, dWire->shape.shapeNdx); return BadMatch; } doodad->shape.color_ndx = dWire->shape.colorNdx; doodad->shape.shape_ndx = dWire->shape.shapeNdx; break; case XkbTextDoodad: if (dWire->text.colorNdx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x42, geom->num_colors, dWire->text.colorNdx); return BadMatch; } text = dWire->text; if (client->swapped) { swaps(&text.width); swaps(&text.height); } doodad->text.width = text.width; doodad->text.height = text.height; doodad->text.color_ndx = dWire->text.colorNdx; status = _GetCountedString(&wire, client, &doodad->text.text); if (status != Success) return status; status = _GetCountedString(&wire, client, &doodad->text.font); if (status != Success) { free (doodad->text.text); return status; } break; case XkbIndicatorDoodad: if (dWire->indicator.onColorNdx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x43, geom->num_colors, dWire->indicator.onColorNdx); return BadMatch; } if (dWire->indicator.offColorNdx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x44, geom->num_colors, dWire->indicator.offColorNdx); return BadMatch; } if (dWire->indicator.shapeNdx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x45, geom->num_shapes, dWire->indicator.shapeNdx); return BadMatch; } doodad->indicator.shape_ndx = dWire->indicator.shapeNdx; doodad->indicator.on_color_ndx = dWire->indicator.onColorNdx; doodad->indicator.off_color_ndx = dWire->indicator.offColorNdx; break; case XkbLogoDoodad: if (dWire->logo.colorNdx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x46, geom->num_colors, dWire->logo.colorNdx); return BadMatch; } if (dWire->logo.shapeNdx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x47, geom->num_shapes, dWire->logo.shapeNdx); return BadMatch; } doodad->logo.color_ndx = dWire->logo.colorNdx; doodad->logo.shape_ndx = dWire->logo.shapeNdx; status = _GetCountedString(&wire, client, &doodad->logo.logo_name); if (status != Success) return status; break; default: client->errorValue = _XkbErrCode2(0x4F, dWire->any.type); return BadValue; } *wire_inout = wire; return Success; } static Status _CheckSetOverlay(char **wire_inout, xkbSetGeometryReq *req, XkbGeometryPtr geom, XkbSectionPtr section, ClientPtr client) { register int r; char *wire; XkbOverlayPtr ol; xkbOverlayWireDesc *olWire; xkbOverlayRowWireDesc *rWire; wire = *wire_inout; olWire = (xkbOverlayWireDesc *) wire; if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) return BadLength; if (client->swapped) { swapl(&olWire->name); } CHK_ATOM_ONLY(olWire->name); ol = XkbAddGeomOverlay(section, olWire->name, olWire->nRows); rWire = (xkbOverlayRowWireDesc *) &olWire[1]; for (r = 0; r < olWire->nRows; r++) { register int k; xkbOverlayKeyWireDesc *kWire; XkbOverlayRowPtr row; if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) return BadLength; if (rWire->rowUnder > section->num_rows) { client->errorValue = _XkbErrCode4(0x20, r, section->num_rows, rWire->rowUnder); return BadMatch; } row = XkbAddGeomOverlayRow(ol, rWire->rowUnder, rWire->nKeys); kWire = (xkbOverlayKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++, kWire++) { if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) return BadLength; if (XkbAddGeomOverlayKey(ol, row, (char *) kWire->over, (char *) kWire->under) == NULL) { client->errorValue = _XkbErrCode3(0x21, r, k); return BadMatch; } } rWire = (xkbOverlayRowWireDesc *) kWire; } olWire = (xkbOverlayWireDesc *) rWire; wire = (char *) olWire; *wire_inout = wire; return Success; } static Status _CheckSetSections(XkbGeometryPtr geom, xkbSetGeometryReq * req, char **wire_inout, ClientPtr client) { Status status; register int s; char *wire; xkbSectionWireDesc *sWire; XkbSectionPtr section; wire = *wire_inout; if (req->nSections < 1) return Success; sWire = (xkbSectionWireDesc *) wire; for (s = 0; s < req->nSections; s++) { register int r; xkbRowWireDesc *rWire; if (!_XkbCheckRequestBounds(client, req, sWire, sWire + 1)) return BadLength; if (client->swapped) { swapl(&sWire->name); swaps(&sWire->top); swaps(&sWire->left); swaps(&sWire->width); swaps(&sWire->height); swaps(&sWire->angle); } CHK_ATOM_ONLY(sWire->name); section = XkbAddGeomSection(geom, sWire->name, sWire->nRows, sWire->nDoodads, sWire->nOverlays); if (!section) return BadAlloc; section->priority = sWire->priority; section->top = sWire->top; section->left = sWire->left; section->width = sWire->width; section->height = sWire->height; section->angle = sWire->angle; rWire = (xkbRowWireDesc *) &sWire[1]; for (r = 0; r < sWire->nRows; r++) { register int k; XkbRowPtr row; xkbKeyWireDesc *kWire; if (!_XkbCheckRequestBounds(client, req, rWire, rWire + 1)) return BadLength; if (client->swapped) { swaps(&rWire->top); swaps(&rWire->left); } row = XkbAddGeomRow(section, rWire->nKeys); if (!row) return BadAlloc; row->top = rWire->top; row->left = rWire->left; row->vertical = rWire->vertical; kWire = (xkbKeyWireDesc *) &rWire[1]; for (k = 0; k < rWire->nKeys; k++, kWire++) { XkbKeyPtr key; if (!_XkbCheckRequestBounds(client, req, kWire, kWire + 1)) return BadLength; key = XkbAddGeomKey(row); if (!key) return BadAlloc; memcpy(key->name.name, kWire->name, XkbKeyNameLength); key->gap = kWire->gap; key->shape_ndx = kWire->shapeNdx; key->color_ndx = kWire->colorNdx; if (key->shape_ndx >= geom->num_shapes) { client->errorValue = _XkbErrCode3(0x10, key->shape_ndx, geom->num_shapes); return BadMatch; } if (key->color_ndx >= geom->num_colors) { client->errorValue = _XkbErrCode3(0x11, key->color_ndx, geom->num_colors); return BadMatch; } } rWire = (xkbRowWireDesc *)kWire; } wire = (char *) rWire; if (sWire->nDoodads > 0) { register int d; for (d = 0; d < sWire->nDoodads; d++) { status = _CheckSetDoodad(&wire, req, geom, section, client); if (status != Success) return status; } } if (sWire->nOverlays > 0) { register int o; for (o = 0; o < sWire->nOverlays; o++) { status = _CheckSetOverlay(&wire, req, geom, section, client); if (status != Success) return status; } } sWire = (xkbSectionWireDesc *) wire; } wire = (char *) sWire; *wire_inout = wire; return Success; } static Status _CheckSetShapes(XkbGeometryPtr geom, xkbSetGeometryReq * req, char **wire_inout, ClientPtr client) { register int i; char *wire; wire = *wire_inout; if (req->nShapes < 1) { client->errorValue = _XkbErrCode2(0x06, req->nShapes); return BadValue; } else { xkbShapeWireDesc *shapeWire; XkbShapePtr shape; register int o; shapeWire = (xkbShapeWireDesc *) wire; for (i = 0; i < req->nShapes; i++) { xkbOutlineWireDesc *olWire; XkbOutlinePtr ol; if (!_XkbCheckRequestBounds(client, req, shapeWire, shapeWire + 1)) return BadLength; shape = XkbAddGeomShape(geom, shapeWire->name, shapeWire->nOutlines); if (!shape) return BadAlloc; olWire = (xkbOutlineWireDesc *) (&shapeWire[1]); for (o = 0; o < shapeWire->nOutlines; o++) { register int p; XkbPointPtr pt; xkbPointWireDesc *ptWire; if (!_XkbCheckRequestBounds(client, req, olWire, olWire + 1)) return BadLength; ol = XkbAddGeomOutline(shape, olWire->nPoints); if (!ol) return BadAlloc; ol->corner_radius = olWire->cornerRadius; ptWire = (xkbPointWireDesc *) &olWire[1]; for (p = 0, pt = ol->points; p < olWire->nPoints; p++, pt++, ptWire++) { if (!_XkbCheckRequestBounds(client, req, ptWire, ptWire + 1)) return BadLength; pt->x = ptWire->x; pt->y = ptWire->y; if (client->swapped) { swaps(&pt->x); swaps(&pt->y); } } ol->num_points = olWire->nPoints; olWire = (xkbOutlineWireDesc *)ptWire; } if (shapeWire->primaryNdx != XkbNoShape) shape->primary = &shape->outlines[shapeWire->primaryNdx]; if (shapeWire->approxNdx != XkbNoShape) shape->approx = &shape->outlines[shapeWire->approxNdx]; shapeWire = (xkbShapeWireDesc *) olWire; } wire = (char *) shapeWire; } if (geom->num_shapes != req->nShapes) { client->errorValue = _XkbErrCode3(0x07, geom->num_shapes, req->nShapes); return BadMatch; } *wire_inout = wire; return Success; } static Status _CheckSetGeom(XkbGeometryPtr geom, xkbSetGeometryReq * req, ClientPtr client) { register int i; Status status; char *wire; wire = (char *) &req[1]; status = _GetCountedString(&wire, client, &geom->label_font); if (status != Success) return status; for (i = 0; i < req->nProperties; i++) { char *name, *val; status = _GetCountedString(&wire, client, &name); if (status != Success) return status; status = _GetCountedString(&wire, client, &val); if (status != Success) { free(name); return status; } if (XkbAddGeomProperty(geom, name, val) == NULL) { free(name); free(val); return BadAlloc; } free(name); free(val); } if (req->nColors < 2) { client->errorValue = _XkbErrCode3(0x01, 2, req->nColors); return BadValue; } if (req->baseColorNdx > req->nColors) { client->errorValue = _XkbErrCode3(0x03, req->nColors, req->baseColorNdx); return BadMatch; } if (req->labelColorNdx > req->nColors) { client->errorValue = _XkbErrCode3(0x03, req->nColors, req->labelColorNdx); return BadMatch; } if (req->labelColorNdx == req->baseColorNdx) { client->errorValue = _XkbErrCode3(0x04, req->baseColorNdx, req->labelColorNdx); return BadMatch; } for (i = 0; i < req->nColors; i++) { char *name; status = _GetCountedString(&wire, client, &name); if (status != Success) return status; if (!XkbAddGeomColor(geom, name, geom->num_colors)) { free(name); return BadAlloc; } free(name); } if (req->nColors != geom->num_colors) { client->errorValue = _XkbErrCode3(0x05, req->nColors, geom->num_colors); return BadMatch; } geom->label_color = &geom->colors[req->labelColorNdx]; geom->base_color = &geom->colors[req->baseColorNdx]; if ((status = _CheckSetShapes(geom, req, &wire, client)) != Success) return status; if ((status = _CheckSetSections(geom, req, &wire, client)) != Success) return status; for (i = 0; i < req->nDoodads; i++) { status = _CheckSetDoodad(&wire, req, geom, NULL, client); if (status != Success) return status; } for (i = 0; i < req->nKeyAliases; i++) { if (!_XkbCheckRequestBounds(client, req, wire, wire + XkbKeyNameLength)) return BadLength; if (XkbAddGeomKeyAlias(geom, &wire[XkbKeyNameLength], wire) == NULL) return BadAlloc; wire += 2 * XkbKeyNameLength; } return Success; } static int _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq * stuff) { XkbDescPtr xkb; Bool new_name; xkbNewKeyboardNotify nkn; XkbGeometryPtr geom, old; XkbGeometrySizesRec sizes; Status status; xkb = dev->key->xkbInfo->desc; old = xkb->geom; xkb->geom = NULL; sizes.which = XkbGeomAllMask; sizes.num_properties = stuff->nProperties; sizes.num_colors = stuff->nColors; sizes.num_shapes = stuff->nShapes; sizes.num_sections = stuff->nSections; sizes.num_doodads = stuff->nDoodads; sizes.num_key_aliases = stuff->nKeyAliases; if ((status = XkbAllocGeometry(xkb, &sizes)) != Success) { xkb->geom = old; return status; } geom = xkb->geom; geom->name = stuff->name; geom->width_mm = stuff->widthMM; geom->height_mm = stuff->heightMM; if ((status = _CheckSetGeom(geom, stuff, client)) != Success) { XkbFreeGeometry(geom, XkbGeomAllMask, TRUE); xkb->geom = old; return status; } new_name = (xkb->names->geometry != geom->name); xkb->names->geometry = geom->name; if (old) XkbFreeGeometry(old, XkbGeomAllMask, TRUE); if (new_name) { xkbNamesNotify nn; memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed = XkbGeometryNameMask; XkbSendNamesNotify(dev, &nn); } nkn.deviceID = nkn.oldDeviceID = dev->id; nkn.minKeyCode = nkn.oldMinKeyCode = xkb->min_key_code; nkn.maxKeyCode = nkn.oldMaxKeyCode = xkb->max_key_code; nkn.requestMajor = XkbReqCode; nkn.requestMinor = X_kbSetGeometry; nkn.changed = XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev, &nkn); return Success; } int ProcXkbSetGeometry(ClientPtr client) { DeviceIntPtr dev; int rc; REQUEST(xkbSetGeometryReq); REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_ATOM_OR_NONE(stuff->name); rc = _XkbSetGeometry(client, dev, stuff); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) _XkbSetGeometry(client, other, stuff); } } } return Success; } /***====================================================================***/ int ProcXkbPerClientFlags(ClientPtr client) { DeviceIntPtr dev; xkbPerClientFlagsReply rep; XkbInterestPtr interest; Mask access_mode = DixGetAttrAccess | DixSetAttrAccess; REQUEST(xkbPerClientFlagsReq); REQUEST_SIZE_MATCH(xkbPerClientFlagsReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode); CHK_MASK_LEGAL(0x01, stuff->change, XkbPCF_AllFlagsMask); CHK_MASK_MATCH(0x02, stuff->change, stuff->value); interest = XkbFindClientResource((DevicePtr) dev, client); if (stuff->change) { client->xkbClientFlags &= ~stuff->change; client->xkbClientFlags |= stuff->value; } if (stuff->change & XkbPCF_AutoResetControlsMask) { Bool want; want = stuff->value & XkbPCF_AutoResetControlsMask; if (interest && !want) { interest->autoCtrls = interest->autoCtrlValues = 0; } else if (want && (!interest)) { XID id = FakeClientID(client->index); if (!AddResource(id, RT_XKBCLIENT, dev)) return BadAlloc; interest = XkbAddClientResource((DevicePtr) dev, client, id); if (!interest) return BadAlloc; } if (interest && want) { register unsigned affect; affect = stuff->ctrlsToChange; CHK_MASK_LEGAL(0x03, affect, XkbAllBooleanCtrlsMask); CHK_MASK_MATCH(0x04, affect, stuff->autoCtrls); CHK_MASK_MATCH(0x05, stuff->autoCtrls, stuff->autoCtrlValues); interest->autoCtrls &= ~affect; interest->autoCtrlValues &= ~affect; interest->autoCtrls |= stuff->autoCtrls & affect; interest->autoCtrlValues |= stuff->autoCtrlValues & affect; } } rep = (xkbPerClientFlagsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .supported = XkbPCF_AllFlagsMask, .value = client->xkbClientFlags & XkbPCF_AllFlagsMask, .autoCtrls = interest ? interest->autoCtrls : 0, .autoCtrlValues = interest ? interest->autoCtrlValues : 0, }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.supported); swapl(&rep.value); swapl(&rep.autoCtrls); swapl(&rep.autoCtrlValues); } WriteToClient(client, SIZEOF(xkbPerClientFlagsReply), &rep); return Success; } /***====================================================================***/ /* all latin-1 alphanumerics, plus parens, minus, underscore, slash */ /* and wildcards */ static unsigned char componentSpecLegal[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0xa7, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff }; /* same as above but accepts percent, plus and bar too */ static unsigned char componentExprLegal[] = { 0x00, 0x00, 0x00, 0x00, 0x20, 0xaf, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x87, 0xfe, 0xff, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xff, 0x7f, 0xff }; static char * GetComponentSpec(unsigned char **pWire, Bool allowExpr, int *errRtrn) { int len; register int i; unsigned char *wire, *str, *tmp, *legal; if (allowExpr) legal = &componentExprLegal[0]; else legal = &componentSpecLegal[0]; wire = *pWire; len = (*(unsigned char *) wire++); if (len > 0) { str = calloc(1, len + 1); if (str) { tmp = str; for (i = 0; i < len; i++) { if (legal[(*wire) / 8] & (1 << ((*wire) % 8))) *tmp++ = *wire++; else wire++; } if (tmp != str) *tmp++ = '\0'; else { free(str); str = NULL; } } else { *errRtrn = BadAlloc; } } else { str = NULL; } *pWire = wire; return (char *) str; } /***====================================================================***/ int ProcXkbListComponents(ClientPtr client) { DeviceIntPtr dev; xkbListComponentsReply rep; unsigned len; unsigned char *str; uint8_t size; int i; REQUEST(xkbListComponentsReq); REQUEST_AT_LEAST_SIZE(xkbListComponentsReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); /* The request is followed by six Pascal strings (i.e. size in characters * followed by a string pattern) describing what the client wants us to * list. We don't care, but might as well check they haven't got the * length wrong. */ str = (unsigned char *) &stuff[1]; for (i = 0; i < 6; i++) { size = *((uint8_t *)str); len = (str + size + 1) - ((unsigned char *) stuff); if ((XkbPaddedSize(len) / 4) > stuff->length) return BadLength; str += (size + 1); } if ((XkbPaddedSize(len) / 4) != stuff->length) return BadLength; rep = (xkbListComponentsReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = 0, .nKeymaps = 0, .nKeycodes = 0, .nTypes = 0, .nCompatMaps = 0, .nSymbols = 0, .nGeometries = 0, .extra = 0 }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.nKeymaps); swaps(&rep.nKeycodes); swaps(&rep.nTypes); swaps(&rep.nCompatMaps); swaps(&rep.nSymbols); swaps(&rep.nGeometries); swaps(&rep.extra); } WriteToClient(client, SIZEOF(xkbListComponentsReply), &rep); return Success; } /***====================================================================***/ int ProcXkbGetKbdByName(ClientPtr client) { DeviceIntPtr dev; DeviceIntPtr tmpd; DeviceIntPtr master; xkbGetKbdByNameReply rep = { 0 }; xkbGetMapReply mrep = { 0 }; xkbGetCompatMapReply crep = { 0 }; xkbGetIndicatorMapReply irep = { 0 }; xkbGetNamesReply nrep = { 0 }; xkbGetGeometryReply grep = { 0 }; XkbComponentNamesRec names = { 0 }; XkbDescPtr xkb, new; XkbEventCauseRec cause; unsigned char *str; char mapFile[PATH_MAX]; unsigned len; unsigned fwant, fneed, reported; int status; Bool geom_changed; XkbSrvLedInfoPtr old_sli; XkbSrvLedInfoPtr sli; Mask access_mode = DixGetAttrAccess | DixManageAccess; REQUEST(xkbGetKbdByNameReq); REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, access_mode); master = GetMaster(dev, MASTER_KEYBOARD); xkb = dev->key->xkbInfo->desc; status = Success; str = (unsigned char *) &stuff[1]; { char *keymap = GetComponentSpec(&str, TRUE, &status); /* keymap, unsupported */ if (keymap) { free(keymap); return BadMatch; } } names.keycodes = GetComponentSpec(&str, TRUE, &status); names.types = GetComponentSpec(&str, TRUE, &status); names.compat = GetComponentSpec(&str, TRUE, &status); names.symbols = GetComponentSpec(&str, TRUE, &status); names.geometry = GetComponentSpec(&str, TRUE, &status); if (status == Success) { len = str - ((unsigned char *) stuff); if ((XkbPaddedSize(len) / 4) != stuff->length) status = BadLength; } if (status != Success) { free(names.keycodes); free(names.types); free(names.compat); free(names.symbols); free(names.geometry); return status; } CHK_MASK_LEGAL(0x01, stuff->want, XkbGBN_AllComponentsMask); CHK_MASK_LEGAL(0x02, stuff->need, XkbGBN_AllComponentsMask); if (stuff->load) fwant = XkbGBN_AllComponentsMask; else fwant = stuff->want | stuff->need; if ((!names.compat) && (fwant & (XkbGBN_CompatMapMask | XkbGBN_IndicatorMapMask))) { names.compat = Xstrdup("%"); } if ((!names.types) && (fwant & (XkbGBN_TypesMask))) { names.types = Xstrdup("%"); } if ((!names.symbols) && (fwant & XkbGBN_SymbolsMask)) { names.symbols = Xstrdup("%"); } geom_changed = ((names.geometry != NULL) && (strcmp(names.geometry, "%") != 0)); if ((!names.geometry) && (fwant & XkbGBN_GeometryMask)) { names.geometry = Xstrdup("%"); geom_changed = FALSE; } memset(mapFile, 0, PATH_MAX); rep.type = X_Reply; rep.deviceID = dev->id; rep.sequenceNumber = client->sequence; rep.length = 0; rep.minKeyCode = xkb->min_key_code; rep.maxKeyCode = xkb->max_key_code; rep.loaded = FALSE; fwant = XkbConvertGetByNameComponents(TRUE, stuff->want) | XkmVirtualModsMask; fneed = XkbConvertGetByNameComponents(TRUE, stuff->need); rep.reported = XkbConvertGetByNameComponents(FALSE, fwant | fneed); if (stuff->load) { fneed |= XkmKeymapRequired; fwant |= XkmKeymapLegal; } if ((fwant | fneed) & XkmSymbolsMask) { fneed |= XkmKeyNamesIndex | XkmTypesIndex; fwant |= XkmIndicatorsIndex; } /* We pass dev in here so we can get the old names out if needed. */ rep.found = XkbDDXLoadKeymapByNames(dev, &names, fwant, fneed, &new, mapFile, PATH_MAX); rep.newKeyboard = FALSE; rep.pad1 = rep.pad2 = rep.pad3 = rep.pad4 = 0; stuff->want |= stuff->need; if (new == NULL) rep.reported = 0; else { if (stuff->load) rep.loaded = TRUE; if (stuff->load || ((rep.reported & XkbGBN_SymbolsMask) && (new->compat))) { XkbChangesRec changes; memset(&changes, 0, sizeof(changes)); XkbUpdateDescActions(new, new->min_key_code, XkbNumKeys(new), &changes); } if (new->map == NULL) rep.reported &= ~(XkbGBN_SymbolsMask | XkbGBN_TypesMask); else if (rep.reported & (XkbGBN_SymbolsMask | XkbGBN_TypesMask)) { mrep.type = X_Reply; mrep.deviceID = dev->id; mrep.sequenceNumber = client->sequence; mrep.length = ((SIZEOF(xkbGetMapReply) - SIZEOF(xGenericReply)) >> 2); mrep.minKeyCode = new->min_key_code; mrep.maxKeyCode = new->max_key_code; mrep.present = 0; mrep.totalSyms = mrep.totalActs = mrep.totalKeyBehaviors = mrep.totalKeyExplicit = mrep.totalModMapKeys = mrep.totalVModMapKeys = 0; if (rep.reported & (XkbGBN_TypesMask | XkbGBN_ClientSymbolsMask)) { mrep.present |= XkbKeyTypesMask; mrep.firstType = 0; mrep.nTypes = mrep.totalTypes = new->map->num_types; } else { mrep.firstType = mrep.nTypes = 0; mrep.totalTypes = 0; } if (rep.reported & XkbGBN_ClientSymbolsMask) { mrep.present |= (XkbKeySymsMask | XkbModifierMapMask); mrep.firstKeySym = mrep.firstModMapKey = new->min_key_code; mrep.nKeySyms = mrep.nModMapKeys = XkbNumKeys(new); } else { mrep.firstKeySym = mrep.firstModMapKey = 0; mrep.nKeySyms = mrep.nModMapKeys = 0; } if (rep.reported & XkbGBN_ServerSymbolsMask) { mrep.present |= XkbAllServerInfoMask; mrep.virtualMods = ~0; mrep.firstKeyAct = mrep.firstKeyBehavior = mrep.firstKeyExplicit = new->min_key_code; mrep.nKeyActs = mrep.nKeyBehaviors = mrep.nKeyExplicit = XkbNumKeys(new); mrep.firstVModMapKey = new->min_key_code; mrep.nVModMapKeys = XkbNumKeys(new); } else { mrep.virtualMods = 0; mrep.firstKeyAct = mrep.firstKeyBehavior = mrep.firstKeyExplicit = 0; mrep.nKeyActs = mrep.nKeyBehaviors = mrep.nKeyExplicit = 0; } XkbComputeGetMapReplySize(new, &mrep); rep.length += SIZEOF(xGenericReply) / 4 + mrep.length; } if (new->compat == NULL) rep.reported &= ~XkbGBN_CompatMapMask; else if (rep.reported & XkbGBN_CompatMapMask) { crep.type = X_Reply; crep.deviceID = dev->id; crep.sequenceNumber = client->sequence; crep.length = 0; crep.groups = XkbAllGroupsMask; crep.firstSI = 0; crep.nSI = crep.nTotalSI = new->compat->num_si; XkbComputeGetCompatMapReplySize(new->compat, &crep); rep.length += SIZEOF(xGenericReply) / 4 + crep.length; } if (new->indicators == NULL) rep.reported &= ~XkbGBN_IndicatorMapMask; else if (rep.reported & XkbGBN_IndicatorMapMask) { irep.type = X_Reply; irep.deviceID = dev->id; irep.sequenceNumber = client->sequence; irep.length = 0; irep.which = XkbAllIndicatorsMask; XkbComputeGetIndicatorMapReplySize(new->indicators, &irep); rep.length += SIZEOF(xGenericReply) / 4 + irep.length; } if (new->names == NULL) rep.reported &= ~(XkbGBN_OtherNamesMask | XkbGBN_KeyNamesMask); else if (rep.reported & (XkbGBN_OtherNamesMask | XkbGBN_KeyNamesMask)) { nrep.type = X_Reply; nrep.deviceID = dev->id; nrep.sequenceNumber = client->sequence; nrep.length = 0; nrep.minKeyCode = new->min_key_code; nrep.maxKeyCode = new->max_key_code; if (rep.reported & XkbGBN_OtherNamesMask) { nrep.which = XkbAllNamesMask; if (new->map != NULL) nrep.nTypes = new->map->num_types; else nrep.nTypes = 0; nrep.nKTLevels = 0; nrep.groupNames = XkbAllGroupsMask; nrep.virtualMods = XkbAllVirtualModsMask; nrep.indicators = XkbAllIndicatorsMask; nrep.nRadioGroups = new->names->num_rg; } else { nrep.which = 0; nrep.nTypes = 0; nrep.nKTLevels = 0; nrep.groupNames = 0; nrep.virtualMods = 0; nrep.indicators = 0; nrep.nRadioGroups = 0; } if (rep.reported & XkbGBN_KeyNamesMask) { nrep.which |= XkbKeyNamesMask; nrep.firstKey = new->min_key_code; nrep.nKeys = XkbNumKeys(new); nrep.nKeyAliases = new->names->num_key_aliases; if (nrep.nKeyAliases) nrep.which |= XkbKeyAliasesMask; } else { nrep.which &= ~(XkbKeyNamesMask | XkbKeyAliasesMask); nrep.firstKey = nrep.nKeys = 0; nrep.nKeyAliases = 0; } XkbComputeGetNamesReplySize(new, &nrep); rep.length += SIZEOF(xGenericReply) / 4 + nrep.length; } if (new->geom == NULL) rep.reported &= ~XkbGBN_GeometryMask; else if (rep.reported & XkbGBN_GeometryMask) { grep.type = X_Reply; grep.deviceID = dev->id; grep.sequenceNumber = client->sequence; grep.length = 0; grep.found = TRUE; grep.pad = 0; grep.widthMM = grep.heightMM = 0; grep.nProperties = grep.nColors = grep.nShapes = 0; grep.nSections = grep.nDoodads = 0; grep.baseColorNdx = grep.labelColorNdx = 0; XkbComputeGetGeometryReplySize(new->geom, &grep, None); rep.length += SIZEOF(xGenericReply) / 4 + grep.length; } } reported = rep.reported; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.found); swaps(&rep.reported); } WriteToClient(client, SIZEOF(xkbGetKbdByNameReply), &rep); if (reported & (XkbGBN_SymbolsMask | XkbGBN_TypesMask)) XkbSendMap(client, new, &mrep); if (reported & XkbGBN_CompatMapMask) XkbSendCompatMap(client, new->compat, &crep); if (reported & XkbGBN_IndicatorMapMask) XkbSendIndicatorMap(client, new->indicators, &irep); if (reported & (XkbGBN_KeyNamesMask | XkbGBN_OtherNamesMask)) XkbSendNames(client, new, &nrep); if (reported & XkbGBN_GeometryMask) XkbSendGeometry(client, new->geom, &grep, FALSE); if (rep.loaded) { XkbDescPtr old_xkb; xkbNewKeyboardNotify nkn; old_xkb = xkb; xkb = new; dev->key->xkbInfo->desc = xkb; new = old_xkb; /* so it'll get freed automatically */ XkbCopyControls(xkb, old_xkb); nkn.deviceID = nkn.oldDeviceID = dev->id; nkn.minKeyCode = new->min_key_code; nkn.maxKeyCode = new->max_key_code; nkn.oldMinKeyCode = xkb->min_key_code; nkn.oldMaxKeyCode = xkb->max_key_code; nkn.requestMajor = XkbReqCode; nkn.requestMinor = X_kbGetKbdByName; nkn.changed = XkbNKN_KeycodesMask; if (geom_changed) nkn.changed |= XkbNKN_GeometryMask; XkbSendNewKeyboardNotify(dev, &nkn); /* Update the map and LED info on the device itself, as well as * any slaves if it's an MD, or its MD if it's an SD and was the * last device used on that MD. */ for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { if (tmpd != dev && GetMaster(tmpd, MASTER_KEYBOARD) != dev && (tmpd != master || dev != master->lastSlave)) continue; if (tmpd != dev) XkbDeviceApplyKeymap(tmpd, xkb); if (tmpd->kbdfeed && tmpd->kbdfeed->xkb_sli) { old_sli = tmpd->kbdfeed->xkb_sli; tmpd->kbdfeed->xkb_sli = NULL; sli = XkbAllocSrvLedInfo(tmpd, tmpd->kbdfeed, NULL, 0); if (sli) { sli->explicitState = old_sli->explicitState; sli->effectiveState = old_sli->effectiveState; } tmpd->kbdfeed->xkb_sli = sli; XkbFreeSrvLedInfo(old_sli); } } } if ((new != NULL) && (new != xkb)) { XkbFreeKeyboard(new, XkbAllComponentsMask, TRUE); new = NULL; } XkbFreeComponentNames(&names, FALSE); XkbSetCauseXkbReq(&cause, X_kbGetKbdByName, client); XkbUpdateAllDeviceIndicators(NULL, &cause); return Success; } /***====================================================================***/ static int ComputeDeviceLedInfoSize(DeviceIntPtr dev, unsigned int what, XkbSrvLedInfoPtr sli) { int nNames, nMaps; register unsigned n, bit; if (sli == NULL) return 0; nNames = nMaps = 0; if ((what & XkbXI_IndicatorNamesMask) == 0) sli->namesPresent = 0; if ((what & XkbXI_IndicatorMapsMask) == 0) sli->mapsPresent = 0; for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (sli->names && sli->names[n] != None) { sli->namesPresent |= bit; nNames++; } if (sli->maps && XkbIM_InUse(&sli->maps[n])) { sli->mapsPresent |= bit; nMaps++; } } return (nNames * 4) + (nMaps * SIZEOF(xkbIndicatorMapWireDesc)); } static int CheckDeviceLedFBs(DeviceIntPtr dev, int class, int id, xkbGetDeviceInfoReply * rep, ClientPtr client) { int nFBs = 0; int length = 0; Bool classOk; if (class == XkbDfltXIClass) { if (dev->kbdfeed) class = KbdFeedbackClass; else if (dev->leds) class = LedFeedbackClass; else { client->errorValue = _XkbErrCode2(XkbErr_BadClass, class); return XkbKeyboardErrorCode; } } classOk = FALSE; if ((dev->kbdfeed) && ((class == KbdFeedbackClass) || (class == XkbAllXIClasses))) { KbdFeedbackPtr kf; classOk = TRUE; for (kf = dev->kbdfeed; (kf); kf = kf->next) { if ((id != XkbAllXIIds) && (id != XkbDfltXIId) && (id != kf->ctrl.id)) continue; nFBs++; length += SIZEOF(xkbDeviceLedsWireDesc); if (!kf->xkb_sli) kf->xkb_sli = XkbAllocSrvLedInfo(dev, kf, NULL, 0); length += ComputeDeviceLedInfoSize(dev, rep->present, kf->xkb_sli); if (id != XkbAllXIIds) break; } } if ((dev->leds) && ((class == LedFeedbackClass) || (class == XkbAllXIClasses))) { LedFeedbackPtr lf; classOk = TRUE; for (lf = dev->leds; (lf); lf = lf->next) { if ((id != XkbAllXIIds) && (id != XkbDfltXIId) && (id != lf->ctrl.id)) continue; nFBs++; length += SIZEOF(xkbDeviceLedsWireDesc); if (!lf->xkb_sli) lf->xkb_sli = XkbAllocSrvLedInfo(dev, NULL, lf, 0); length += ComputeDeviceLedInfoSize(dev, rep->present, lf->xkb_sli); if (id != XkbAllXIIds) break; } } if (nFBs > 0) { rep->nDeviceLedFBs = nFBs; rep->length += (length / 4); return Success; } if (classOk) client->errorValue = _XkbErrCode2(XkbErr_BadId, id); else client->errorValue = _XkbErrCode2(XkbErr_BadClass, class); return XkbKeyboardErrorCode; } static int SendDeviceLedInfo(XkbSrvLedInfoPtr sli, ClientPtr client) { xkbDeviceLedsWireDesc wire; int length; length = 0; wire.ledClass = sli->class; wire.ledID = sli->id; wire.namesPresent = sli->namesPresent; wire.mapsPresent = sli->mapsPresent; wire.physIndicators = sli->physIndicators; wire.state = sli->effectiveState; if (client->swapped) { swaps(&wire.ledClass); swaps(&wire.ledID); swapl(&wire.namesPresent); swapl(&wire.mapsPresent); swapl(&wire.physIndicators); swapl(&wire.state); } WriteToClient(client, SIZEOF(xkbDeviceLedsWireDesc), &wire); length += SIZEOF(xkbDeviceLedsWireDesc); if (sli->namesPresent | sli->mapsPresent) { register unsigned i, bit; if (sli->namesPresent) { CARD32 awire; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (sli->namesPresent & bit) { awire = (CARD32) sli->names[i]; if (client->swapped) { swapl(&awire); } WriteToClient(client, 4, &awire); length += 4; } } } if (sli->mapsPresent) { for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { xkbIndicatorMapWireDesc iwire; if (sli->mapsPresent & bit) { iwire.flags = sli->maps[i].flags; iwire.whichGroups = sli->maps[i].which_groups; iwire.groups = sli->maps[i].groups; iwire.whichMods = sli->maps[i].which_mods; iwire.mods = sli->maps[i].mods.mask; iwire.realMods = sli->maps[i].mods.real_mods; iwire.virtualMods = sli->maps[i].mods.vmods; iwire.ctrls = sli->maps[i].ctrls; if (client->swapped) { swaps(&iwire.virtualMods); swapl(&iwire.ctrls); } WriteToClient(client, SIZEOF(xkbIndicatorMapWireDesc), &iwire); length += SIZEOF(xkbIndicatorMapWireDesc); } } } } return length; } static int SendDeviceLedFBs(DeviceIntPtr dev, int class, int id, unsigned wantLength, ClientPtr client) { int length = 0; if (class == XkbDfltXIClass) { if (dev->kbdfeed) class = KbdFeedbackClass; else if (dev->leds) class = LedFeedbackClass; } if ((dev->kbdfeed) && ((class == KbdFeedbackClass) || (class == XkbAllXIClasses))) { KbdFeedbackPtr kf; for (kf = dev->kbdfeed; (kf); kf = kf->next) { if ((id == XkbAllXIIds) || (id == XkbDfltXIId) || (id == kf->ctrl.id)) { length += SendDeviceLedInfo(kf->xkb_sli, client); if (id != XkbAllXIIds) break; } } } if ((dev->leds) && ((class == LedFeedbackClass) || (class == XkbAllXIClasses))) { LedFeedbackPtr lf; for (lf = dev->leds; (lf); lf = lf->next) { if ((id == XkbAllXIIds) || (id == XkbDfltXIId) || (id == lf->ctrl.id)) { length += SendDeviceLedInfo(lf->xkb_sli, client); if (id != XkbAllXIIds) break; } } } if (length == wantLength) return Success; else return BadLength; } int ProcXkbGetDeviceInfo(ClientPtr client) { DeviceIntPtr dev; xkbGetDeviceInfoReply rep; int status, nDeviceLedFBs; unsigned length, nameLen; CARD16 ledClass, ledID; unsigned wanted; char *str; REQUEST(xkbGetDeviceInfoReq); REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; wanted = stuff->wanted; CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); CHK_MASK_LEGAL(0x01, wanted, XkbXI_AllDeviceFeaturesMask); if ((!dev->button) || ((stuff->nBtns < 1) && (!stuff->allBtns))) wanted &= ~XkbXI_ButtonActionsMask; if ((!dev->kbdfeed) && (!dev->leds)) wanted &= ~XkbXI_IndicatorsMask; nameLen = XkbSizeCountedString(dev->name); rep = (xkbGetDeviceInfoReply) { .type = X_Reply, .deviceID = dev->id, .sequenceNumber = client->sequence, .length = nameLen / 4, .present = wanted, .supported = XkbXI_AllDeviceFeaturesMask, .unsupported = 0, .nDeviceLedFBs = 0, .firstBtnWanted = 0, .nBtnsWanted = 0, .firstBtnRtrn = 0, .nBtnsRtrn = 0, .totalBtns = dev->button ? dev->button->numButtons : 0, .hasOwnState = (dev->key && dev->key->xkbInfo), .dfltKbdFB = dev->kbdfeed ? dev->kbdfeed->ctrl.id : XkbXINone, .dfltLedFB = dev->leds ? dev->leds->ctrl.id : XkbXINone, .devType = dev->xinput_type }; ledClass = stuff->ledClass; ledID = stuff->ledID; if (wanted & XkbXI_ButtonActionsMask) { if (stuff->allBtns) { stuff->firstBtn = 0; stuff->nBtns = dev->button->numButtons; } if ((stuff->firstBtn + stuff->nBtns) > dev->button->numButtons) { client->errorValue = _XkbErrCode4(0x02, dev->button->numButtons, stuff->firstBtn, stuff->nBtns); return BadValue; } else { rep.firstBtnWanted = stuff->firstBtn; rep.nBtnsWanted = stuff->nBtns; if (dev->button->xkb_acts != NULL) { XkbAction *act; register int i; rep.firstBtnRtrn = stuff->firstBtn; rep.nBtnsRtrn = stuff->nBtns; act = &dev->button->xkb_acts[rep.firstBtnWanted]; for (i = 0; i < rep.nBtnsRtrn; i++, act++) { if (act->type != XkbSA_NoAction) break; } rep.firstBtnRtrn += i; rep.nBtnsRtrn -= i; act = &dev->button->xkb_acts[rep.firstBtnRtrn + rep.nBtnsRtrn - 1]; for (i = 0; i < rep.nBtnsRtrn; i++, act--) { if (act->type != XkbSA_NoAction) break; } rep.nBtnsRtrn -= i; } rep.length += (rep.nBtnsRtrn * SIZEOF(xkbActionWireDesc)) / 4; } } if (wanted & XkbXI_IndicatorsMask) { status = CheckDeviceLedFBs(dev, ledClass, ledID, &rep, client); if (status != Success) return status; } length = rep.length * 4; nDeviceLedFBs = rep.nDeviceLedFBs; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.length); swaps(&rep.present); swaps(&rep.supported); swaps(&rep.unsupported); swaps(&rep.nDeviceLedFBs); swaps(&rep.dfltKbdFB); swaps(&rep.dfltLedFB); swapl(&rep.devType); } WriteToClient(client, SIZEOF(xkbGetDeviceInfoReply), &rep); str = malloc(nameLen); if (!str) return BadAlloc; XkbWriteCountedString(str, dev->name, client->swapped); WriteToClient(client, nameLen, str); free(str); length -= nameLen; if (rep.nBtnsRtrn > 0) { int sz; xkbActionWireDesc *awire; sz = rep.nBtnsRtrn * SIZEOF(xkbActionWireDesc); awire = (xkbActionWireDesc *) &dev->button->xkb_acts[rep.firstBtnRtrn]; WriteToClient(client, sz, awire); length -= sz; } if (nDeviceLedFBs > 0) { status = SendDeviceLedFBs(dev, ledClass, ledID, length, client); if (status != Success) return status; } else if (length != 0) { ErrorF("[xkb] Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); ErrorF("[xkb] Wrote %d fewer bytes than expected\n", length); return BadLength; } return Success; } static char * CheckSetDeviceIndicators(char *wire, DeviceIntPtr dev, int num, int *status_rtrn, ClientPtr client, xkbSetDeviceInfoReq * stuff) { xkbDeviceLedsWireDesc *ledWire; int i; XkbSrvLedInfoPtr sli; ledWire = (xkbDeviceLedsWireDesc *) wire; for (i = 0; i < num; i++) { if (!_XkbCheckRequestBounds(client, stuff, ledWire, ledWire + 1)) { *status_rtrn = BadLength; return (char *) ledWire; } if (client->swapped) { swaps(&ledWire->ledClass); swaps(&ledWire->ledID); swapl(&ledWire->namesPresent); swapl(&ledWire->mapsPresent); swapl(&ledWire->physIndicators); } sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID, XkbXI_IndicatorsMask); if (sli != NULL) { register int n; register unsigned bit; int nMaps, nNames; CARD32 *atomWire; xkbIndicatorMapWireDesc *mapWire; nMaps = nNames = 0; for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->namesPresent & bit) nNames++; if (ledWire->mapsPresent & bit) nMaps++; } atomWire = (CARD32 *) &ledWire[1]; if (nNames > 0) { for (n = 0; n < nNames; n++) { if (!_XkbCheckRequestBounds(client, stuff, atomWire, atomWire + 1)) { *status_rtrn = BadLength; return (char *) atomWire; } if (client->swapped) { swapl(atomWire); } CHK_ATOM_OR_NONE3(((Atom) (*atomWire)), client->errorValue, *status_rtrn, NULL); atomWire++; } } mapWire = (xkbIndicatorMapWireDesc *) atomWire; if (nMaps > 0) { for (n = 0; n < nMaps; n++) { if (!_XkbCheckRequestBounds(client, stuff, mapWire, mapWire + 1)) { *status_rtrn = BadLength; return (char *) mapWire; } if (client->swapped) { swaps(&mapWire->virtualMods); swapl(&mapWire->ctrls); } CHK_MASK_LEGAL3(0x21, mapWire->whichGroups, XkbIM_UseAnyGroup, client->errorValue, *status_rtrn, NULL); CHK_MASK_LEGAL3(0x22, mapWire->whichMods, XkbIM_UseAnyMods, client->errorValue, *status_rtrn, NULL); mapWire++; } } ledWire = (xkbDeviceLedsWireDesc *) mapWire; } else { /* SHOULD NEVER HAPPEN */ return (char *) ledWire; } } return (char *) ledWire; } static char * SetDeviceIndicators(char *wire, DeviceIntPtr dev, unsigned changed, int num, int *status_rtrn, ClientPtr client, xkbExtensionDeviceNotify * ev, xkbSetDeviceInfoReq * stuff) { xkbDeviceLedsWireDesc *ledWire; int i; XkbEventCauseRec cause; unsigned namec, mapc, statec; xkbExtensionDeviceNotify ed; XkbChangesRec changes; DeviceIntPtr kbd; memset((char *) &ed, 0, sizeof(xkbExtensionDeviceNotify)); memset((char *) &changes, 0, sizeof(XkbChangesRec)); XkbSetCauseXkbReq(&cause, X_kbSetDeviceInfo, client); ledWire = (xkbDeviceLedsWireDesc *) wire; for (i = 0; i < num; i++) { register int n; register unsigned bit; CARD32 *atomWire; xkbIndicatorMapWireDesc *mapWire; XkbSrvLedInfoPtr sli; namec = mapc = statec = 0; sli = XkbFindSrvLedInfo(dev, ledWire->ledClass, ledWire->ledID, XkbXI_IndicatorMapsMask); if (!sli) { /* SHOULD NEVER HAPPEN!! */ return (char *) ledWire; } atomWire = (CARD32 *) &ledWire[1]; if (changed & XkbXI_IndicatorNamesMask) { namec = sli->namesPresent | ledWire->namesPresent; memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom)); } if (ledWire->namesPresent) { sli->namesPresent = ledWire->namesPresent; memset((char *) sli->names, 0, XkbNumIndicators * sizeof(Atom)); for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->namesPresent & bit) { sli->names[n] = (Atom) *atomWire; if (sli->names[n] == None) ledWire->namesPresent &= ~bit; atomWire++; } } } mapWire = (xkbIndicatorMapWireDesc *) atomWire; if (changed & XkbXI_IndicatorMapsMask) { mapc = sli->mapsPresent | ledWire->mapsPresent; sli->mapsPresent = ledWire->mapsPresent; memset((char *) sli->maps, 0, XkbNumIndicators * sizeof(XkbIndicatorMapRec)); } if (ledWire->mapsPresent) { for (n = 0, bit = 1; n < XkbNumIndicators; n++, bit <<= 1) { if (ledWire->mapsPresent & bit) { sli->maps[n].flags = mapWire->flags; sli->maps[n].which_groups = mapWire->whichGroups; sli->maps[n].groups = mapWire->groups; sli->maps[n].which_mods = mapWire->whichMods; sli->maps[n].mods.mask = mapWire->mods; sli->maps[n].mods.real_mods = mapWire->realMods; sli->maps[n].mods.vmods = mapWire->virtualMods; sli->maps[n].ctrls = mapWire->ctrls; mapWire++; } } } if (changed & XkbXI_IndicatorStateMask) { statec = sli->effectiveState ^ ledWire->state; sli->explicitState &= ~statec; sli->explicitState |= (ledWire->state & statec); } if (namec) XkbApplyLedNameChanges(dev, sli, namec, &ed, &changes, &cause); if (mapc) XkbApplyLedMapChanges(dev, sli, mapc, &ed, &changes, &cause); if (statec) XkbApplyLedStateChanges(dev, sli, statec, &ed, &changes, &cause); kbd = dev; if ((sli->flags & XkbSLI_HasOwnState) == 0) kbd = inputInfo.keyboard; XkbFlushLedEvents(dev, kbd, sli, &ed, &changes, &cause); ledWire = (xkbDeviceLedsWireDesc *) mapWire; } return (char *) ledWire; } static int _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq * stuff) { char *wire; wire = (char *) &stuff[1]; if (stuff->change & XkbXI_ButtonActionsMask) { int sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); if (!_XkbCheckRequestBounds(client, stuff, wire, (char *) wire + sz)) return BadLength; if (!dev->button) { client->errorValue = _XkbErrCode2(XkbErr_BadClass, ButtonClass); return XkbKeyboardErrorCode; } if ((stuff->firstBtn + stuff->nBtns) > dev->button->numButtons) { client->errorValue = _XkbErrCode4(0x02, stuff->firstBtn, stuff->nBtns, dev->button->numButtons); return BadMatch; } wire += sz; } if (stuff->change & XkbXI_IndicatorsMask) { int status = Success; wire = CheckSetDeviceIndicators(wire, dev, stuff->nDeviceLedFBs, &status, client, stuff); if (status != Success) return status; } if (((wire - ((char *) stuff)) / 4) != stuff->length) return BadLength; return Success; } static int _XkbSetDeviceInfo(ClientPtr client, DeviceIntPtr dev, xkbSetDeviceInfoReq * stuff) { char *wire; xkbExtensionDeviceNotify ed; memset((char *) &ed, 0, SIZEOF(xkbExtensionDeviceNotify)); ed.deviceID = dev->id; wire = (char *) &stuff[1]; if (stuff->change & XkbXI_ButtonActionsMask) { int nBtns, sz, i; XkbAction *acts; DeviceIntPtr kbd; nBtns = dev->button->numButtons; acts = dev->button->xkb_acts; if (acts == NULL) { acts = calloc(nBtns, sizeof(XkbAction)); if (!acts) return BadAlloc; dev->button->xkb_acts = acts; } if (stuff->firstBtn + stuff->nBtns > nBtns) return BadValue; sz = stuff->nBtns * SIZEOF(xkbActionWireDesc); memcpy((char *) &acts[stuff->firstBtn], (char *) wire, sz); wire += sz; ed.reason |= XkbXI_ButtonActionsMask; ed.firstBtn = stuff->firstBtn; ed.nBtns = stuff->nBtns; if (dev->key) kbd = dev; else kbd = inputInfo.keyboard; acts = &dev->button->xkb_acts[stuff->firstBtn]; for (i = 0; i < stuff->nBtns; i++, acts++) { if (acts->type != XkbSA_NoAction) XkbSetActionKeyMods(kbd->key->xkbInfo->desc, acts, 0); } } if (stuff->change & XkbXI_IndicatorsMask) { int status = Success; wire = SetDeviceIndicators(wire, dev, stuff->change, stuff->nDeviceLedFBs, &status, client, &ed, stuff); if (status != Success) return status; } if ((stuff->change) && (ed.reason)) XkbSendExtensionDeviceNotify(dev, client, &ed); return Success; } int ProcXkbSetDeviceInfo(ClientPtr client) { DeviceIntPtr dev; int rc; REQUEST(xkbSetDeviceInfoReq); REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq); if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; CHK_ANY_DEVICE(dev, stuff->deviceSpec, client, DixManageAccess); CHK_MASK_LEGAL(0x01, stuff->change, XkbXI_AllFeaturesMask); rc = _XkbSetDeviceInfoCheck(client, dev, stuff); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { rc = _XkbSetDeviceInfoCheck(client, other, stuff); if (rc != Success) return rc; } } } } /* checks done, apply */ rc = _XkbSetDeviceInfo(client, dev, stuff); if (rc != Success) return rc; if (stuff->deviceSpec == XkbUseCoreKbd || stuff->deviceSpec == XkbUseCorePtr) { DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) { rc = _XkbSetDeviceInfo(client, other, stuff); if (rc != Success) return rc; } } } } return Success; } /***====================================================================***/ int ProcXkbSetDebuggingFlags(ClientPtr client) { CARD32 newFlags, newCtrls, extraLength; xkbSetDebuggingFlagsReply rep; int rc; REQUEST(xkbSetDebuggingFlagsReq); REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq); rc = XaceHook(XACE_SERVER_ACCESS, client, DixDebugAccess); if (rc != Success) return rc; newFlags = xkbDebugFlags & (~stuff->affectFlags); newFlags |= (stuff->flags & stuff->affectFlags); newCtrls = xkbDebugCtrls & (~stuff->affectCtrls); newCtrls |= (stuff->ctrls & stuff->affectCtrls); if (xkbDebugFlags || newFlags || stuff->msgLength) { ErrorF("[xkb] XkbDebug: Setting debug flags to 0x%lx\n", (long) newFlags); if (newCtrls != xkbDebugCtrls) ErrorF("[xkb] XkbDebug: Setting debug controls to 0x%lx\n", (long) newCtrls); } extraLength = (stuff->length << 2) - sz_xkbSetDebuggingFlagsReq; if (stuff->msgLength > 0) { char *msg; if (extraLength < XkbPaddedSize(stuff->msgLength)) { ErrorF ("[xkb] XkbDebug: msgLength= %d, length= %ld (should be %d)\n", stuff->msgLength, (long) extraLength, XkbPaddedSize(stuff->msgLength)); return BadLength; } msg = (char *) &stuff[1]; if (msg[stuff->msgLength - 1] != '\0') { ErrorF("[xkb] XkbDebug: message not null-terminated\n"); return BadValue; } ErrorF("[xkb] XkbDebug: %s\n", msg); } xkbDebugFlags = newFlags; xkbDebugCtrls = newCtrls; rep = (xkbSetDebuggingFlagsReply) { .type = X_Reply, .sequenceNumber = client->sequence, .length = 0, .currentFlags = newFlags, .currentCtrls = newCtrls, .supportedFlags = ~0, .supportedCtrls = ~0 }; if (client->swapped) { swaps(&rep.sequenceNumber); swapl(&rep.currentFlags); swapl(&rep.currentCtrls); swapl(&rep.supportedFlags); swapl(&rep.supportedCtrls); } WriteToClient(client, SIZEOF(xkbSetDebuggingFlagsReply), &rep); return Success; } /***====================================================================***/ static int ProcXkbDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_kbUseExtension: return ProcXkbUseExtension(client); case X_kbSelectEvents: return ProcXkbSelectEvents(client); case X_kbBell: return ProcXkbBell(client); case X_kbGetState: return ProcXkbGetState(client); case X_kbLatchLockState: return ProcXkbLatchLockState(client); case X_kbGetControls: return ProcXkbGetControls(client); case X_kbSetControls: return ProcXkbSetControls(client); case X_kbGetMap: return ProcXkbGetMap(client); case X_kbSetMap: return ProcXkbSetMap(client); case X_kbGetCompatMap: return ProcXkbGetCompatMap(client); case X_kbSetCompatMap: return ProcXkbSetCompatMap(client); case X_kbGetIndicatorState: return ProcXkbGetIndicatorState(client); case X_kbGetIndicatorMap: return ProcXkbGetIndicatorMap(client); case X_kbSetIndicatorMap: return ProcXkbSetIndicatorMap(client); case X_kbGetNamedIndicator: return ProcXkbGetNamedIndicator(client); case X_kbSetNamedIndicator: return ProcXkbSetNamedIndicator(client); case X_kbGetNames: return ProcXkbGetNames(client); case X_kbSetNames: return ProcXkbSetNames(client); case X_kbGetGeometry: return ProcXkbGetGeometry(client); case X_kbSetGeometry: return ProcXkbSetGeometry(client); case X_kbPerClientFlags: return ProcXkbPerClientFlags(client); case X_kbListComponents: return ProcXkbListComponents(client); case X_kbGetKbdByName: return ProcXkbGetKbdByName(client); case X_kbGetDeviceInfo: return ProcXkbGetDeviceInfo(client); case X_kbSetDeviceInfo: return ProcXkbSetDeviceInfo(client); case X_kbSetDebuggingFlags: return ProcXkbSetDebuggingFlags(client); default: return BadRequest; } } static int XkbClientGone(void *data, XID id) { DevicePtr pXDev = (DevicePtr) data; if (!XkbRemoveResourceClient(pXDev, id)) { ErrorF ("[xkb] Internal Error! bad RemoveResourceClient in XkbClientGone\n"); } return 1; } void XkbExtensionInit(void) { ExtensionEntry *extEntry; RT_XKBCLIENT = CreateNewResourceType(XkbClientGone, "XkbClient"); if (!RT_XKBCLIENT) return; if (!XkbInitPrivates()) return; if ((extEntry = AddExtension(XkbName, XkbNumberEvents, XkbNumberErrors, ProcXkbDispatch, SProcXkbDispatch, NULL, StandardMinorOpcode))) { XkbReqCode = (unsigned char) extEntry->base; XkbEventBase = (unsigned char) extEntry->eventBase; XkbErrorBase = (unsigned char) extEntry->errorBase; XkbKeyboardErrorCode = XkbErrorBase + XkbKeyboard; } return; } xorg-server-21.1.16/xkb/xkbUtils.c0000644000175000017500000022246314757411105012401 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 © 2008 Red Hat Inc. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include "os.h" #include #include #include #include #include #define XK_CYRILLIC #include #include "misc.h" #include "inputstr.h" #include "eventstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "xkbgeom.h" #include "xkb.h" /***====================================================================***/ int _XkbLookupAnyDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err) { int rc = XkbKeyboardErrorCode; if (id == XkbUseCoreKbd) id = PickKeyboard(client)->id; else if (id == XkbUseCorePtr) id = PickPointer(client)->id; rc = dixLookupDevice(pDev, id, client, access_mode); if (rc != Success) *xkb_err = XkbErr_BadDevice; return rc; } int _XkbLookupKeyboard(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err) { DeviceIntPtr dev; int rc; if (id == XkbDfltXIId) id = XkbUseCoreKbd; rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); if (rc != Success) return rc; dev = *pDev; if (!dev->key || !dev->key->xkbInfo) { *pDev = NULL; *xkb_err = XkbErr_BadClass; return XkbKeyboardErrorCode; } return Success; } int _XkbLookupBellDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err) { DeviceIntPtr dev; int rc; rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); if (rc != Success) return rc; dev = *pDev; if (!dev->kbdfeed && !dev->bell) { *pDev = NULL; *xkb_err = XkbErr_BadClass; return XkbKeyboardErrorCode; } return Success; } int _XkbLookupLedDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err) { DeviceIntPtr dev; int rc; if (id == XkbDfltXIId) id = XkbUseCorePtr; rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); if (rc != Success) return rc; dev = *pDev; if (!dev->kbdfeed && !dev->leds) { *pDev = NULL; *xkb_err = XkbErr_BadClass; return XkbKeyboardErrorCode; } return Success; } int _XkbLookupButtonDevice(DeviceIntPtr *pDev, int id, ClientPtr client, Mask access_mode, int *xkb_err) { DeviceIntPtr dev; int rc; rc = _XkbLookupAnyDevice(pDev, id, client, access_mode, xkb_err); if (rc != Success) return rc; dev = *pDev; if (!dev->button) { *pDev = NULL; *xkb_err = XkbErr_BadClass; return XkbKeyboardErrorCode; } return Success; } void XkbSetActionKeyMods(XkbDescPtr xkb, XkbAction *act, unsigned mods) { register unsigned tmp; switch (act->type) { case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods: if (act->mods.flags & XkbSA_UseModMapMods) act->mods.real_mods = act->mods.mask = mods; if ((tmp = XkbModActionVMods(&act->mods)) != 0) act->mods.mask |= XkbMaskForVMask(xkb, tmp); break; case XkbSA_ISOLock: if (act->iso.flags & XkbSA_UseModMapMods) act->iso.real_mods = act->iso.mask = mods; if ((tmp = XkbModActionVMods(&act->iso)) != 0) act->iso.mask |= XkbMaskForVMask(xkb, tmp); break; } return; } unsigned XkbMaskForVMask(XkbDescPtr xkb, unsigned vmask) { register int i, bit; register unsigned mask; for (mask = i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (vmask & bit) mask |= xkb->server->vmods[i]; } return mask; } /***====================================================================***/ void XkbUpdateKeyTypesFromCore(DeviceIntPtr pXDev, KeySymsPtr pCore, KeyCode first, CARD8 num, XkbChangesPtr changes) { XkbDescPtr xkb; unsigned key, nG, explicit; int types[XkbNumKbdGroups]; KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol}, *syms; XkbMapChangesPtr mc; xkb = pXDev->key->xkbInfo->desc; if (first + num - 1 > xkb->max_key_code) { /* 1/12/95 (ef) -- XXX! should allow XKB structures to grow */ num = xkb->max_key_code - first + 1; } mc = (changes ? (&changes->map) : NULL); syms = &pCore->map[(first - pCore->minKeyCode) * pCore->mapWidth]; for (key = first; key < (first + num); key++, syms += pCore->mapWidth) { explicit = xkb->server->explicit[key] & XkbExplicitKeyTypesMask; types[XkbGroup1Index] = XkbKeyKeyTypeIndex(xkb, key, XkbGroup1Index); types[XkbGroup2Index] = XkbKeyKeyTypeIndex(xkb, key, XkbGroup2Index); types[XkbGroup3Index] = XkbKeyKeyTypeIndex(xkb, key, XkbGroup3Index); types[XkbGroup4Index] = XkbKeyKeyTypeIndex(xkb, key, XkbGroup4Index); nG = XkbKeyTypesForCoreSymbols(xkb, pCore->mapWidth, syms, explicit, types, tsyms); XkbChangeTypesOfKey(xkb, key, nG, XkbAllGroupsMask, types, mc); memcpy((char *) XkbKeySymsPtr(xkb, key), (char *) tsyms, XkbKeyNumSyms(xkb, key) * sizeof(KeySym)); } if (changes->map.changed & XkbKeySymsMask) { CARD8 oldLast, newLast; oldLast = changes->map.first_key_sym + changes->map.num_key_syms - 1; newLast = first + num - 1; if (first < changes->map.first_key_sym) changes->map.first_key_sym = first; if (oldLast > newLast) newLast = oldLast; changes->map.num_key_syms = newLast - changes->map.first_key_sym + 1; } else { changes->map.changed |= XkbKeySymsMask; changes->map.first_key_sym = first; changes->map.num_key_syms = num; } return; } void XkbUpdateDescActions(XkbDescPtr xkb, KeyCode first, CARD8 num, XkbChangesPtr changes) { register unsigned key; for (key = first; key < (first + num); key++) { XkbApplyCompatMapToKey(xkb, key, changes); } if (changes->map.changed & (XkbVirtualModMapMask | XkbModifierMapMask)) { unsigned char newVMods[XkbNumVirtualMods]; register unsigned bit, i; unsigned present; memset(newVMods, 0, XkbNumVirtualMods); present = 0; for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) { if (xkb->server->vmodmap[key] == 0) continue; for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (bit & xkb->server->vmodmap[key]) { present |= bit; newVMods[i] |= xkb->map->modmap[key]; } } } for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if ((bit & present) && (newVMods[i] != xkb->server->vmods[i])) { changes->map.changed |= XkbVirtualModsMask; changes->map.vmods |= bit; xkb->server->vmods[i] = newVMods[i]; } } } if (changes->map.changed & XkbVirtualModsMask) XkbApplyVirtualModChanges(xkb, changes->map.vmods, changes); if (changes->map.changed & XkbKeyActionsMask) { CARD8 oldLast, newLast; oldLast = changes->map.first_key_act + changes->map.num_key_acts - 1; newLast = first + num - 1; if (first < changes->map.first_key_act) changes->map.first_key_act = first; if (newLast > oldLast) newLast = oldLast; changes->map.num_key_acts = newLast - changes->map.first_key_act + 1; } else { changes->map.changed |= XkbKeyActionsMask; changes->map.first_key_act = first; changes->map.num_key_acts = num; } return; } void XkbUpdateActions(DeviceIntPtr pXDev, KeyCode first, CARD8 num, XkbChangesPtr changes, unsigned *needChecksRtrn, XkbEventCausePtr cause) { XkbSrvInfoPtr xkbi; XkbDescPtr xkb; CARD8 *repeat; if (needChecksRtrn) *needChecksRtrn = 0; xkbi = pXDev->key->xkbInfo; xkb = xkbi->desc; repeat = xkb->ctrls->per_key_repeat; /* before letting XKB do any changes, copy the current core values */ if (pXDev->kbdfeed) memcpy(repeat, pXDev->kbdfeed->ctrl.autoRepeats, XkbPerKeyBitArraySize); XkbUpdateDescActions(xkb, first, num, changes); if ((pXDev->kbdfeed) && (changes->ctrls.changed_ctrls & XkbPerKeyRepeatMask)) { /* now copy the modified changes back to core */ memcpy(pXDev->kbdfeed->ctrl.autoRepeats, repeat, XkbPerKeyBitArraySize); if (pXDev->kbdfeed->CtrlProc) (*pXDev->kbdfeed->CtrlProc) (pXDev, &pXDev->kbdfeed->ctrl); } return; } KeySymsPtr XkbGetCoreMap(DeviceIntPtr keybd) { register int key, tmp; int maxSymsPerKey, maxGroup1Width; XkbDescPtr xkb; KeySymsPtr syms; int maxNumberOfGroups; if (!keybd || !keybd->key || !keybd->key->xkbInfo) return NULL; xkb = keybd->key->xkbInfo->desc; maxSymsPerKey = maxGroup1Width = 0; maxNumberOfGroups = 0; /* determine sizes */ for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) { if (XkbKeycodeInRange(xkb, key)) { int nGroups; int w; nGroups = XkbKeyNumGroups(xkb, key); tmp = 0; if (nGroups > 0) { if ((w = XkbKeyGroupWidth(xkb, key, XkbGroup1Index)) <= 2) tmp += 2; else tmp += w + 2; /* remember highest G1 width */ if (w > maxGroup1Width) maxGroup1Width = w; } if (nGroups > 1) { if (tmp <= 2) { if ((w = XkbKeyGroupWidth(xkb, key, XkbGroup2Index)) < 2) tmp += 2; else tmp += w; } else { if ((w = XkbKeyGroupWidth(xkb, key, XkbGroup2Index)) > 2) tmp += w - 2; } } if (nGroups > 2) tmp += XkbKeyGroupWidth(xkb, key, XkbGroup3Index); if (nGroups > 3) tmp += XkbKeyGroupWidth(xkb, key, XkbGroup4Index); if (tmp > maxSymsPerKey) maxSymsPerKey = tmp; if (nGroups > maxNumberOfGroups) maxNumberOfGroups = nGroups; } } if (maxSymsPerKey <= 0) return NULL; syms = calloc(1, sizeof(*syms)); if (!syms) return NULL; /* See Section 12.4 of the XKB Protocol spec. Because of the * single-group distribution for multi-group keyboards, we have to * have enough symbols for the largest group 1 to replicate across the * number of groups on the keyboard. e.g. a single-group key with 4 * symbols on a keyboard that has 3 groups -> 12 syms per key */ if (maxSymsPerKey < maxNumberOfGroups * maxGroup1Width) maxSymsPerKey = maxNumberOfGroups * maxGroup1Width; syms->mapWidth = maxSymsPerKey; syms->minKeyCode = xkb->min_key_code; syms->maxKeyCode = xkb->max_key_code; tmp = syms->mapWidth * (xkb->max_key_code - xkb->min_key_code + 1); syms->map = calloc(tmp, sizeof(*syms->map)); if (!syms->map) { free(syms); return NULL; } for (key = xkb->min_key_code; key <= xkb->max_key_code; key++) { KeySym *pCore, *pXKB; unsigned nGroups, groupWidth, n, nOut; nGroups = XkbKeyNumGroups(xkb, key); n = (key - xkb->min_key_code) * syms->mapWidth; pCore = &syms->map[n]; pXKB = XkbKeySymsPtr(xkb, key); nOut = 2; if (nGroups > 0) { groupWidth = XkbKeyGroupWidth(xkb, key, XkbGroup1Index); if (groupWidth > 0) pCore[0] = pXKB[0]; if (groupWidth > 1) pCore[1] = pXKB[1]; for (n = 2; n < groupWidth; n++) pCore[2 + n] = pXKB[n]; if (groupWidth > 2) nOut = groupWidth; } /* See XKB Protocol Sec, Section 12.4. A 1-group key with ABCDE on a 2 group keyboard must be duplicated across all groups as ABABCDECDE. */ if (nGroups == 1) { int idx, j; groupWidth = XkbKeyGroupWidth(xkb, key, XkbGroup1Index); /* AB..CDE... -> ABABCDE... */ if (groupWidth > 0 && syms->mapWidth >= 3) pCore[2] = pCore[0]; if (groupWidth > 1 && syms->mapWidth >= 4) pCore[3] = pCore[1]; /* ABABCDE... -> ABABCDECDE */ idx = 2 + groupWidth; while (groupWidth > 2 && idx < syms->mapWidth && idx < groupWidth * 2) { pCore[idx] = pCore[idx - groupWidth + 2]; idx++; } idx = 2 * groupWidth; if (idx < 4) idx = 4; /* 3 or more groups: ABABCDECDEABCDEABCDE */ for (j = 3; j <= maxNumberOfGroups; j++) for (n = 0; n < groupWidth && idx < maxSymsPerKey; n++) pCore[idx++] = pXKB[n]; } pXKB += XkbKeyGroupsWidth(xkb, key); nOut += 2; if (nGroups > 1) { groupWidth = XkbKeyGroupWidth(xkb, key, XkbGroup2Index); if (groupWidth > 0) pCore[2] = pXKB[0]; if (groupWidth > 1) pCore[3] = pXKB[1]; for (n = 2; n < groupWidth; n++) { pCore[nOut + (n - 2)] = pXKB[n]; } if (groupWidth > 2) nOut += (groupWidth - 2); } pXKB += XkbKeyGroupsWidth(xkb, key); for (n = XkbGroup3Index; n < nGroups; n++) { register int s; groupWidth = XkbKeyGroupWidth(xkb, key, n); for (s = 0; s < groupWidth; s++) { pCore[nOut++] = pXKB[s]; } pXKB += XkbKeyGroupsWidth(xkb, key); } } return syms; } void XkbSetRepeatKeys(DeviceIntPtr pXDev, int key, int onoff) { if (pXDev && pXDev->key && pXDev->key->xkbInfo) { xkbControlsNotify cn; XkbControlsPtr ctrls = pXDev->key->xkbInfo->desc->ctrls; XkbControlsRec old; old = *ctrls; if (key == -1) { /* global autorepeat setting changed */ if (onoff) ctrls->enabled_ctrls |= XkbRepeatKeysMask; else ctrls->enabled_ctrls &= ~XkbRepeatKeysMask; } else if (pXDev->kbdfeed) { ctrls->per_key_repeat[key / 8] = pXDev->kbdfeed->ctrl.autoRepeats[key / 8]; } if (XkbComputeControlsNotify(pXDev, &old, ctrls, &cn, TRUE)) XkbSendControlsNotify(pXDev, &cn); } return; } /* Applies a change to a single device, does not traverse the device tree. */ void XkbApplyMappingChange(DeviceIntPtr kbd, KeySymsPtr map, KeyCode first_key, CARD8 num_keys, CARD8 *modmap, ClientPtr client) { XkbDescPtr xkb = kbd->key->xkbInfo->desc; XkbEventCauseRec cause; XkbChangesRec changes; unsigned int check; memset(&changes, 0, sizeof(changes)); memset(&cause, 0, sizeof(cause)); if (map && first_key && num_keys) { check = 0; XkbSetCauseCoreReq(&cause, X_ChangeKeyboardMapping, client); XkbUpdateKeyTypesFromCore(kbd, map, first_key, num_keys, &changes); XkbUpdateActions(kbd, first_key, num_keys, &changes, &check, &cause); if (check) XkbCheckSecondaryEffects(kbd->key->xkbInfo, 1, &changes, &cause); } if (modmap) { /* A keymap change can imply a modmap change, se we prefer the * former. */ if (!cause.mjr) XkbSetCauseCoreReq(&cause, X_SetModifierMapping, client); check = 0; num_keys = xkb->max_key_code - xkb->min_key_code + 1; changes.map.changed |= XkbModifierMapMask; changes.map.first_modmap_key = xkb->min_key_code; changes.map.num_modmap_keys = num_keys; memcpy(kbd->key->xkbInfo->desc->map->modmap, modmap, MAP_LENGTH); XkbUpdateActions(kbd, xkb->min_key_code, num_keys, &changes, &check, &cause); if (check) XkbCheckSecondaryEffects(kbd->key->xkbInfo, 1, &changes, &cause); } XkbSendNotification(kbd, &changes, &cause); } void XkbDisableComputedAutoRepeats(DeviceIntPtr dev, unsigned key) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; xkbMapNotify mn; xkbi->desc->server->explicit[key] |= XkbExplicitAutoRepeatMask; memset(&mn, 0, sizeof(mn)); mn.changed = XkbExplicitComponentsMask; mn.firstKeyExplicit = key; mn.nKeyExplicit = 1; XkbSendMapNotify(dev, &mn); return; } unsigned XkbStateChangedFlags(XkbStatePtr old, XkbStatePtr new) { int changed; changed = (old->group != new->group ? XkbGroupStateMask : 0); changed |= (old->base_group != new->base_group ? XkbGroupBaseMask : 0); changed |= (old->latched_group != new->latched_group ? XkbGroupLatchMask : 0); changed |= (old->locked_group != new->locked_group ? XkbGroupLockMask : 0); changed |= (old->mods != new->mods ? XkbModifierStateMask : 0); changed |= (old->base_mods != new->base_mods ? XkbModifierBaseMask : 0); changed |= (old->latched_mods != new->latched_mods ? XkbModifierLatchMask : 0); changed |= (old->locked_mods != new->locked_mods ? XkbModifierLockMask : 0); changed |= (old->compat_state != new->compat_state ? XkbCompatStateMask : 0); changed |= (old->grab_mods != new->grab_mods ? XkbGrabModsMask : 0); if (old->compat_grab_mods != new->compat_grab_mods) changed |= XkbCompatGrabModsMask; changed |= (old->lookup_mods != new->lookup_mods ? XkbLookupModsMask : 0); if (old->compat_lookup_mods != new->compat_lookup_mods) changed |= XkbCompatLookupModsMask; changed |= (old->ptr_buttons != new->ptr_buttons ? XkbPointerButtonMask : 0); return changed; } static void XkbComputeCompatState(XkbSrvInfoPtr xkbi) { CARD16 grp_mask; XkbStatePtr state = &xkbi->state; XkbCompatMapPtr map; XkbControlsPtr ctrls; if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat) return; map = xkbi->desc->compat; grp_mask = map->groups[state->group].mask; state->compat_state = state->mods | grp_mask; state->compat_lookup_mods = state->lookup_mods | grp_mask; ctrls= xkbi->desc->ctrls; if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) { unsigned char grp = state->base_group+state->latched_group; if (grp >= ctrls->num_groups) grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls); grp_mask = map->groups[grp].mask; } state->compat_grab_mods = state->grab_mods | grp_mask; return; } unsigned XkbAdjustGroup(int group, XkbControlsPtr ctrls) { unsigned act; act = XkbOutOfRangeGroupAction(ctrls->groups_wrap); if (group < 0) { while (group < 0) { if (act == XkbClampIntoRange) { group = XkbGroup1Index; } else if (act == XkbRedirectIntoRange) { int newGroup; newGroup = XkbOutOfRangeGroupNumber(ctrls->groups_wrap); if (newGroup >= ctrls->num_groups) group = XkbGroup1Index; else group = newGroup; } else { group += ctrls->num_groups; } } } else if (group >= ctrls->num_groups) { if (act == XkbClampIntoRange) { group = ctrls->num_groups - 1; } else if (act == XkbRedirectIntoRange) { int newGroup; newGroup = XkbOutOfRangeGroupNumber(ctrls->groups_wrap); if (newGroup >= ctrls->num_groups) group = XkbGroup1Index; else group = newGroup; } else { group %= ctrls->num_groups; } } return group; } void XkbComputeDerivedState(XkbSrvInfoPtr xkbi) { XkbStatePtr state = &xkbi->state; XkbControlsPtr ctrls = xkbi->desc->ctrls; unsigned char grp; if (!state || !ctrls) return; state->mods = (state->base_mods | state->latched_mods | state->locked_mods); state->lookup_mods = state->mods & (~ctrls->internal.mask); state->grab_mods = state->lookup_mods & (~ctrls->ignore_lock.mask); state->grab_mods |= ((state->base_mods | state->latched_mods) & ctrls->ignore_lock.mask); grp = state->locked_group; if (grp >= ctrls->num_groups) state->locked_group = XkbAdjustGroup(XkbCharToInt(grp), ctrls); grp = state->locked_group + state->base_group + state->latched_group; if (grp >= ctrls->num_groups) state->group = XkbAdjustGroup(XkbCharToInt(grp), ctrls); else state->group = grp; XkbComputeCompatState(xkbi); return; } /***====================================================================***/ void XkbCheckSecondaryEffects(XkbSrvInfoPtr xkbi, unsigned which, XkbChangesPtr changes, XkbEventCausePtr cause) { if (which & XkbStateNotifyMask) { XkbStateRec old; old = xkbi->state; changes->state_changes |= XkbStateChangedFlags(&old, &xkbi->state); XkbComputeDerivedState(xkbi); } if (which & XkbIndicatorStateNotifyMask) XkbUpdateIndicators(xkbi->device, XkbAllIndicatorsMask, TRUE, changes, cause); return; } /***====================================================================***/ Bool XkbEnableDisableControls(XkbSrvInfoPtr xkbi, unsigned long change, unsigned long newValues, XkbChangesPtr changes, XkbEventCausePtr cause) { XkbControlsPtr ctrls; unsigned old; XkbSrvLedInfoPtr sli; ctrls = xkbi->desc->ctrls; old = ctrls->enabled_ctrls; ctrls->enabled_ctrls &= ~change; ctrls->enabled_ctrls |= (change & newValues); if (old == ctrls->enabled_ctrls) return FALSE; if (cause != NULL) { xkbControlsNotify cn; cn.numGroups = ctrls->num_groups; cn.changedControls = XkbControlsEnabledMask; cn.enabledControls = ctrls->enabled_ctrls; cn.enabledControlChanges = (ctrls->enabled_ctrls ^ old); cn.keycode = cause->kc; cn.eventType = cause->event; cn.requestMajor = cause->mjr; cn.requestMinor = cause->mnr; XkbSendControlsNotify(xkbi->device, &cn); } else { /* Yes, this really should be an XOR. If ctrls->enabled_ctrls_changes */ /* is non-zero, the controls in question changed already in "this" */ /* request and this change merely undoes the previous one. By the */ /* same token, we have to figure out whether or not ControlsEnabled */ /* should be set or not in the changes structure */ changes->ctrls.enabled_ctrls_changes ^= (ctrls->enabled_ctrls ^ old); if (changes->ctrls.enabled_ctrls_changes) changes->ctrls.changed_ctrls |= XkbControlsEnabledMask; else changes->ctrls.changed_ctrls &= ~XkbControlsEnabledMask; } sli = XkbFindSrvLedInfo(xkbi->device, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(xkbi->device, sli->usesControls, TRUE, changes, cause); return TRUE; } /***====================================================================***/ #define MAX_TOC 16 XkbGeometryPtr XkbLookupNamedGeometry(DeviceIntPtr dev, Atom name, Bool *shouldFree) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbDescPtr xkb = xkbi->desc; *shouldFree = 0; if (name == None) { if (xkb->geom != NULL) return xkb->geom; name = xkb->names->geometry; } if ((xkb->geom != NULL) && (xkb->geom->name == name)) return xkb->geom; *shouldFree = 1; return NULL; } void XkbConvertCase(register KeySym sym, KeySym * lower, KeySym * upper) { *lower = sym; *upper = sym; switch (sym >> 8) { case 0: /* Latin 1 */ if ((sym >= XK_A) && (sym <= XK_Z)) *lower += (XK_a - XK_A); else if ((sym >= XK_a) && (sym <= XK_z)) *upper -= (XK_a - XK_A); else if ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) *lower += (XK_agrave - XK_Agrave); else if ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) *upper -= (XK_agrave - XK_Agrave); else if ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) *lower += (XK_oslash - XK_Ooblique); else if ((sym >= XK_oslash) && (sym <= XK_thorn)) *upper -= (XK_oslash - XK_Ooblique); break; case 1: /* Latin 2 */ /* Assume the KeySym is a legal value (ignore discontinuities) */ if (sym == XK_Aogonek) *lower = XK_aogonek; else if (sym >= XK_Lstroke && sym <= XK_Sacute) *lower += (XK_lstroke - XK_Lstroke); else if (sym >= XK_Scaron && sym <= XK_Zacute) *lower += (XK_scaron - XK_Scaron); else if (sym >= XK_Zcaron && sym <= XK_Zabovedot) *lower += (XK_zcaron - XK_Zcaron); else if (sym == XK_aogonek) *upper = XK_Aogonek; else if (sym >= XK_lstroke && sym <= XK_sacute) *upper -= (XK_lstroke - XK_Lstroke); else if (sym >= XK_scaron && sym <= XK_zacute) *upper -= (XK_scaron - XK_Scaron); else if (sym >= XK_zcaron && sym <= XK_zabovedot) *upper -= (XK_zcaron - XK_Zcaron); else if (sym >= XK_Racute && sym <= XK_Tcedilla) *lower += (XK_racute - XK_Racute); else if (sym >= XK_racute && sym <= XK_tcedilla) *upper -= (XK_racute - XK_Racute); break; case 2: /* Latin 3 */ /* Assume the KeySym is a legal value (ignore discontinuities) */ if (sym >= XK_Hstroke && sym <= XK_Hcircumflex) *lower += (XK_hstroke - XK_Hstroke); else if (sym >= XK_Gbreve && sym <= XK_Jcircumflex) *lower += (XK_gbreve - XK_Gbreve); else if (sym >= XK_hstroke && sym <= XK_hcircumflex) *upper -= (XK_hstroke - XK_Hstroke); else if (sym >= XK_gbreve && sym <= XK_jcircumflex) *upper -= (XK_gbreve - XK_Gbreve); else if (sym >= XK_Cabovedot && sym <= XK_Scircumflex) *lower += (XK_cabovedot - XK_Cabovedot); else if (sym >= XK_cabovedot && sym <= XK_scircumflex) *upper -= (XK_cabovedot - XK_Cabovedot); break; case 3: /* Latin 4 */ /* Assume the KeySym is a legal value (ignore discontinuities) */ if (sym >= XK_Rcedilla && sym <= XK_Tslash) *lower += (XK_rcedilla - XK_Rcedilla); else if (sym >= XK_rcedilla && sym <= XK_tslash) *upper -= (XK_rcedilla - XK_Rcedilla); else if (sym == XK_ENG) *lower = XK_eng; else if (sym == XK_eng) *upper = XK_ENG; else if (sym >= XK_Amacron && sym <= XK_Umacron) *lower += (XK_amacron - XK_Amacron); else if (sym >= XK_amacron && sym <= XK_umacron) *upper -= (XK_amacron - XK_Amacron); break; case 6: /* Cyrillic */ /* Assume the KeySym is a legal value (ignore discontinuities) */ if (sym >= XK_Serbian_DJE && sym <= XK_Cyrillic_DZHE) *lower -= (XK_Serbian_DJE - XK_Serbian_dje); else if (sym >= XK_Serbian_dje && sym <= XK_Cyrillic_dzhe) *upper += (XK_Serbian_DJE - XK_Serbian_dje); else if (sym >= XK_Cyrillic_YU && sym <= XK_Cyrillic_HARDSIGN) *lower -= (XK_Cyrillic_YU - XK_Cyrillic_yu); else if (sym >= XK_Cyrillic_yu && sym <= XK_Cyrillic_hardsign) *upper += (XK_Cyrillic_YU - XK_Cyrillic_yu); break; case 7: /* Greek */ /* Assume the KeySym is a legal value (ignore discontinuities) */ if (sym >= XK_Greek_ALPHAaccent && sym <= XK_Greek_OMEGAaccent) *lower += (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent); else if (sym >= XK_Greek_alphaaccent && sym <= XK_Greek_omegaaccent && sym != XK_Greek_iotaaccentdieresis && sym != XK_Greek_upsilonaccentdieresis) *upper -= (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent); else if (sym >= XK_Greek_ALPHA && sym <= XK_Greek_OMEGA) *lower += (XK_Greek_alpha - XK_Greek_ALPHA); else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega && sym != XK_Greek_finalsmallsigma) *upper -= (XK_Greek_alpha - XK_Greek_ALPHA); break; } } static Bool _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) { void *tmp = NULL; int i; int gap; XkbKeyTypePtr stype = NULL, dtype = NULL; /* client map */ if (src->map) { if (!dst->map) { tmp = calloc(1, sizeof(XkbClientMapRec)); if (!tmp) return FALSE; dst->map = tmp; } if (src->map->syms) { if (src->map->size_syms != dst->map->size_syms) { tmp = reallocarray(dst->map->syms, src->map->size_syms, sizeof(KeySym)); if (!tmp) return FALSE; dst->map->syms = tmp; } memcpy(dst->map->syms, src->map->syms, src->map->size_syms * sizeof(KeySym)); } else { free(dst->map->syms); dst->map->syms = NULL; } dst->map->num_syms = src->map->num_syms; dst->map->size_syms = src->map->size_syms; gap = MAP_LENGTH - (src->max_key_code + 1); if (src->map->key_sym_map) { if (!dst->map->key_sym_map) { tmp = reallocarray(dst->map->key_sym_map, MAP_LENGTH, sizeof(XkbSymMapRec)); if (!tmp) return FALSE; dst->map->key_sym_map = tmp; } if (gap > 0) { memset((char *) &dst->map->key_sym_map[gap], 0, gap * sizeof(XkbSymMapRec)); } memcpy(dst->map->key_sym_map, src->map->key_sym_map, (src->max_key_code + 1) * sizeof(XkbSymMapRec)); } else { free(dst->map->key_sym_map); dst->map->key_sym_map = NULL; } if (src->map->types && src->map->num_types) { if (src->map->num_types > dst->map->size_types || !dst->map->types || !dst->map->size_types) { if (dst->map->types && dst->map->size_types) { tmp = reallocarray(dst->map->types, src->map->num_types, sizeof(XkbKeyTypeRec)); if (!tmp) return FALSE; dst->map->types = tmp; memset(dst->map->types + dst->map->num_types, 0, (src->map->num_types - dst->map->num_types) * sizeof(XkbKeyTypeRec)); } else { tmp = calloc(src->map->num_types, sizeof(XkbKeyTypeRec)); if (!tmp) return FALSE; dst->map->types = tmp; } } else if (src->map->num_types < dst->map->num_types && dst->map->types) { for (i = src->map->num_types, dtype = (dst->map->types + i); i < dst->map->num_types; i++, dtype++) { free(dtype->level_names); dtype->level_names = NULL; dtype->num_levels = 0; if (dtype->map_count) { free(dtype->map); free(dtype->preserve); } } } stype = src->map->types; dtype = dst->map->types; for (i = 0; i < src->map->num_types; i++, dtype++, stype++) { if (stype->num_levels && stype->level_names) { if (stype->num_levels != dtype->num_levels && dtype->num_levels && dtype->level_names && i < dst->map->num_types) { tmp = reallocarray(dtype->level_names, stype->num_levels, sizeof(Atom)); if (!tmp) continue; dtype->level_names = tmp; } else if (!dtype->num_levels || !dtype->level_names || i >= dst->map->num_types) { tmp = malloc(stype->num_levels * sizeof(Atom)); if (!tmp) continue; dtype->level_names = tmp; } dtype->num_levels = stype->num_levels; memcpy(dtype->level_names, stype->level_names, stype->num_levels * sizeof(Atom)); } else { if (dtype->num_levels && dtype->level_names && i < dst->map->num_types) free(dtype->level_names); dtype->num_levels = 0; dtype->level_names = NULL; } dtype->name = stype->name; memcpy(&dtype->mods, &stype->mods, sizeof(XkbModsRec)); if (stype->map_count) { if (stype->map) { if (stype->map_count != dtype->map_count && dtype->map_count && dtype->map && i < dst->map->num_types) { tmp = reallocarray(dtype->map, stype->map_count, sizeof(XkbKTMapEntryRec)); if (!tmp) return FALSE; dtype->map = tmp; } else if (!dtype->map_count || !dtype->map || i >= dst->map->num_types) { tmp = xallocarray(stype->map_count, sizeof(XkbKTMapEntryRec)); if (!tmp) return FALSE; dtype->map = tmp; } memcpy(dtype->map, stype->map, stype->map_count * sizeof(XkbKTMapEntryRec)); } else { if (dtype->map && i < dst->map->num_types) free(dtype->map); dtype->map = NULL; } if (stype->preserve) { if (stype->map_count != dtype->map_count && dtype->map_count && dtype->preserve && i < dst->map->num_types) { tmp = reallocarray(dtype->preserve, stype->map_count, sizeof(XkbModsRec)); if (!tmp) return FALSE; dtype->preserve = tmp; } else if (!dtype->preserve || !dtype->map_count || i >= dst->map->num_types) { tmp = xallocarray(stype->map_count, sizeof(XkbModsRec)); if (!tmp) return FALSE; dtype->preserve = tmp; } memcpy(dtype->preserve, stype->preserve, stype->map_count * sizeof(XkbModsRec)); } else { if (dtype->preserve && i < dst->map->num_types) free(dtype->preserve); dtype->preserve = NULL; } dtype->map_count = stype->map_count; } else { if (dtype->map_count && i < dst->map->num_types) { free(dtype->map); free(dtype->preserve); } dtype->map_count = 0; dtype->map = NULL; dtype->preserve = NULL; } } dst->map->size_types = src->map->num_types; dst->map->num_types = src->map->num_types; } else { if (dst->map->types) { for (i = 0, dtype = dst->map->types; i < dst->map->num_types; i++, dtype++) { free(dtype->level_names); if (dtype->map && dtype->map_count) free(dtype->map); if (dtype->preserve && dtype->map_count) free(dtype->preserve); } } free(dst->map->types); dst->map->types = NULL; dst->map->num_types = 0; dst->map->size_types = 0; } if (src->map->modmap) { if (!dst->map->modmap) { tmp = realloc(dst->map->modmap, MAP_LENGTH); if (!tmp) return FALSE; dst->map->modmap = tmp; } if (gap > 0) { memset(dst->map->modmap + gap, 0, gap); } memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1); } else { free(dst->map->modmap); dst->map->modmap = NULL; } } else { if (dst->map) XkbFreeClientMap(dst, XkbAllClientInfoMask, TRUE); } return TRUE; } static Bool _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) { void *tmp = NULL; int gap; /* server map */ if (src->server) { if (!dst->server) { tmp = calloc(1, sizeof(XkbServerMapRec)); if (!tmp) return FALSE; dst->server = tmp; } gap = MAP_LENGTH - (src->max_key_code + 1); if (src->server->explicit) { if (!dst->server->explicit) { tmp = realloc(dst->server->explicit, MAP_LENGTH); if (!tmp) return FALSE; dst->server->explicit = tmp; } if (gap > 0) memset(dst->server->explicit + gap, 0, gap); memcpy(dst->server->explicit, src->server->explicit, src->max_key_code + 1); } else { free(dst->server->explicit); dst->server->explicit = NULL; } if (src->server->acts) { if (src->server->size_acts != dst->server->size_acts) { tmp = reallocarray(dst->server->acts, src->server->size_acts, sizeof(XkbAction)); if (!tmp) return FALSE; dst->server->acts = tmp; } memcpy(dst->server->acts, src->server->acts, src->server->size_acts * sizeof(XkbAction)); } else { free(dst->server->acts); dst->server->acts = NULL; } dst->server->size_acts = src->server->size_acts; dst->server->num_acts = src->server->num_acts; if (src->server->key_acts) { if (!dst->server->key_acts) { tmp = reallocarray(dst->server->key_acts, MAP_LENGTH, sizeof(unsigned short)); if (!tmp) return FALSE; dst->server->key_acts = tmp; } if (gap > 0) memset((char *) &dst->server->key_acts[gap], 0, gap * sizeof(unsigned short)); memcpy(dst->server->key_acts, src->server->key_acts, (src->max_key_code + 1) * sizeof(unsigned short)); } else { free(dst->server->key_acts); dst->server->key_acts = NULL; } if (src->server->behaviors) { if (!dst->server->behaviors) { tmp = reallocarray(dst->server->behaviors, MAP_LENGTH, sizeof(XkbBehavior)); if (!tmp) return FALSE; dst->server->behaviors = tmp; } if (gap > 0) memset((char *) &dst->server->behaviors[gap], 0, gap * sizeof(XkbBehavior)); memcpy(dst->server->behaviors, src->server->behaviors, (src->max_key_code + 1) * sizeof(XkbBehavior)); } else { free(dst->server->behaviors); dst->server->behaviors = NULL; } memcpy(dst->server->vmods, src->server->vmods, XkbNumVirtualMods); if (src->server->vmodmap) { if (!dst->server->vmodmap) { tmp = reallocarray(dst->server->vmodmap, MAP_LENGTH, sizeof(unsigned short)); if (!tmp) return FALSE; dst->server->vmodmap = tmp; } if (gap > 0) memset((char *) &dst->server->vmodmap[gap], 0, gap * sizeof(unsigned short)); memcpy(dst->server->vmodmap, src->server->vmodmap, (src->max_key_code + 1) * sizeof(unsigned short)); } else { free(dst->server->vmodmap); dst->server->vmodmap = NULL; } } else { if (dst->server) XkbFreeServerMap(dst, XkbAllServerInfoMask, TRUE); } return TRUE; } static Bool _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst) { void *tmp = NULL; int gap; /* names */ if (src->names) { if (!dst->names) { dst->names = calloc(1, sizeof(XkbNamesRec)); if (!dst->names) return FALSE; } gap = MAP_LENGTH - (src->max_key_code + 1); if (src->names->keys) { if (!dst->names->keys) { tmp = reallocarray(dst->names->keys, MAP_LENGTH, sizeof(XkbKeyNameRec)); if (!tmp) return FALSE; dst->names->keys = tmp; } if (gap > 0) memset((char *) &dst->names->keys[gap], 0, gap * sizeof(XkbKeyNameRec)); memcpy(dst->names->keys, src->names->keys, (src->max_key_code + 1) * sizeof(XkbKeyNameRec)); } else { free(dst->names->keys); dst->names->keys = NULL; } if (src->names->num_key_aliases) { if (src->names->num_key_aliases != dst->names->num_key_aliases) { tmp = reallocarray(dst->names->key_aliases, src->names->num_key_aliases, sizeof(XkbKeyAliasRec)); if (!tmp) return FALSE; dst->names->key_aliases = tmp; } memcpy(dst->names->key_aliases, src->names->key_aliases, src->names->num_key_aliases * sizeof(XkbKeyAliasRec)); } else { free(dst->names->key_aliases); dst->names->key_aliases = NULL; } dst->names->num_key_aliases = src->names->num_key_aliases; if (src->names->num_rg) { if (src->names->num_rg != dst->names->num_rg) { tmp = reallocarray(dst->names->radio_groups, src->names->num_rg, sizeof(Atom)); if (!tmp) return FALSE; dst->names->radio_groups = tmp; } memcpy(dst->names->radio_groups, src->names->radio_groups, src->names->num_rg * sizeof(Atom)); } else { free(dst->names->radio_groups); dst->names->radio_groups = NULL; } dst->names->num_rg = src->names->num_rg; dst->names->keycodes = src->names->keycodes; dst->names->geometry = src->names->geometry; dst->names->symbols = src->names->symbols; dst->names->types = src->names->types; dst->names->compat = src->names->compat; dst->names->phys_symbols = src->names->phys_symbols; memcpy(dst->names->vmods, src->names->vmods, XkbNumVirtualMods * sizeof(Atom)); memcpy(dst->names->indicators, src->names->indicators, XkbNumIndicators * sizeof(Atom)); memcpy(dst->names->groups, src->names->groups, XkbNumKbdGroups * sizeof(Atom)); } else { if (dst->names) XkbFreeNames(dst, XkbAllNamesMask, TRUE); } return TRUE; } static Bool _XkbCopyCompat(XkbDescPtr src, XkbDescPtr dst) { void *tmp = NULL; /* compat */ if (src->compat) { if (!dst->compat) { dst->compat = calloc(1, sizeof(XkbCompatMapRec)); if (!dst->compat) return FALSE; } if (src->compat->sym_interpret && src->compat->num_si) { if (src->compat->num_si != dst->compat->size_si) { tmp = reallocarray(dst->compat->sym_interpret, src->compat->num_si, sizeof(XkbSymInterpretRec)); if (!tmp) return FALSE; dst->compat->sym_interpret = tmp; } memcpy(dst->compat->sym_interpret, src->compat->sym_interpret, src->compat->num_si * sizeof(XkbSymInterpretRec)); dst->compat->num_si = src->compat->num_si; dst->compat->size_si = src->compat->num_si; } else { if (dst->compat->sym_interpret && dst->compat->size_si) free(dst->compat->sym_interpret); dst->compat->sym_interpret = NULL; dst->compat->num_si = 0; dst->compat->size_si = 0; } memcpy(dst->compat->groups, src->compat->groups, XkbNumKbdGroups * sizeof(XkbModsRec)); } else { if (dst->compat) XkbFreeCompatMap(dst, XkbAllCompatMask, TRUE); } return TRUE; } static Bool _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) { void *tmp = NULL; int i = 0, j = 0, k = 0; XkbColorPtr scolor = NULL, dcolor = NULL; XkbDoodadPtr sdoodad = NULL, ddoodad = NULL; XkbOutlinePtr soutline = NULL, doutline = NULL; XkbPropertyPtr sprop = NULL, dprop = NULL; XkbRowPtr srow = NULL, drow = NULL; XkbSectionPtr ssection = NULL, dsection = NULL; XkbShapePtr sshape = NULL, dshape = NULL; /* geometry */ if (src->geom) { if (!dst->geom) { dst->geom = calloc(sizeof(XkbGeometryRec), 1); if (!dst->geom) return FALSE; } /* properties */ if (src->geom->num_properties) { /* If we've got more properties in the destination than * the source, run through and free all the excess ones * first. */ if (src->geom->num_properties < dst->geom->sz_properties) { for (i = src->geom->num_properties, dprop = dst->geom->properties + i; i < dst->geom->num_properties; i++, dprop++) { free(dprop->name); free(dprop->value); } } /* Reallocate and clear all new items if the buffer grows. */ if (!XkbGeomRealloc ((void **) &dst->geom->properties, dst->geom->sz_properties, src->geom->num_properties, sizeof(XkbPropertyRec), XKB_GEOM_CLEAR_EXCESS)) return FALSE; /* We don't set num_properties as we need it to try and avoid * too much reallocing. */ dst->geom->sz_properties = src->geom->num_properties; for (i = 0, sprop = src->geom->properties, dprop = dst->geom->properties; i < src->geom->num_properties; i++, sprop++, dprop++) { if (i < dst->geom->num_properties) { if (strlen(sprop->name) != strlen(dprop->name)) { tmp = realloc(dprop->name, strlen(sprop->name) + 1); if (!tmp) return FALSE; dprop->name = tmp; } if (strlen(sprop->value) != strlen(dprop->value)) { tmp = realloc(dprop->value, strlen(sprop->value) + 1); if (!tmp) return FALSE; dprop->value = tmp; } strcpy(dprop->name, sprop->name); strcpy(dprop->value, sprop->value); } else { dprop->name = xstrdup(sprop->name); dprop->value = xstrdup(sprop->value); } } /* ... which is already src->geom->num_properties. */ dst->geom->num_properties = dst->geom->sz_properties; } else { if (dst->geom->sz_properties) { for (i = 0, dprop = dst->geom->properties; i < dst->geom->num_properties; i++, dprop++) { free(dprop->name); free(dprop->value); } free(dst->geom->properties); dst->geom->properties = NULL; } dst->geom->num_properties = 0; dst->geom->sz_properties = 0; } /* colors */ if (src->geom->num_colors) { if (src->geom->num_colors < dst->geom->sz_colors) { for (i = src->geom->num_colors, dcolor = dst->geom->colors + i; i < dst->geom->num_colors; i++, dcolor++) { free(dcolor->spec); } } /* Reallocate and clear all new items if the buffer grows. */ if (!XkbGeomRealloc ((void **) &dst->geom->colors, dst->geom->sz_colors, src->geom->num_colors, sizeof(XkbColorRec), XKB_GEOM_CLEAR_EXCESS)) return FALSE; dst->geom->sz_colors = src->geom->num_colors; for (i = 0, scolor = src->geom->colors, dcolor = dst->geom->colors; i < src->geom->num_colors; i++, scolor++, dcolor++) { if (i < dst->geom->num_colors) { if (strlen(scolor->spec) != strlen(dcolor->spec)) { tmp = realloc(dcolor->spec, strlen(scolor->spec) + 1); if (!tmp) return FALSE; dcolor->spec = tmp; } strcpy(dcolor->spec, scolor->spec); } else { dcolor->spec = xstrdup(scolor->spec); } dcolor->pixel = scolor->pixel; } dst->geom->num_colors = dst->geom->sz_colors; } else { if (dst->geom->sz_colors) { for (i = 0, dcolor = dst->geom->colors; i < dst->geom->num_colors; i++, dcolor++) { free(dcolor->spec); } free(dst->geom->colors); dst->geom->colors = NULL; } dst->geom->num_colors = 0; dst->geom->sz_colors = 0; } /* shapes */ /* shapes break down into outlines, which break down into points. */ if (dst->geom->num_shapes) { for (i = 0, dshape = dst->geom->shapes; i < dst->geom->num_shapes; i++, dshape++) { for (j = 0, doutline = dshape->outlines; j < dshape->num_outlines; j++, doutline++) { if (doutline->sz_points) free(doutline->points); } if (dshape->sz_outlines) { free(dshape->outlines); dshape->outlines = NULL; } dshape->num_outlines = 0; dshape->sz_outlines = 0; } } if (src->geom->num_shapes) { /* Reallocate and clear all items. */ if (!XkbGeomRealloc ((void **) &dst->geom->shapes, dst->geom->sz_shapes, src->geom->num_shapes, sizeof(XkbShapeRec), XKB_GEOM_CLEAR_ALL)) return FALSE; for (i = 0, sshape = src->geom->shapes, dshape = dst->geom->shapes; i < src->geom->num_shapes; i++, sshape++, dshape++) { if (sshape->num_outlines) { tmp = calloc(sshape->num_outlines, sizeof(XkbOutlineRec)); if (!tmp) return FALSE; dshape->outlines = tmp; for (j = 0, soutline = sshape->outlines, doutline = dshape->outlines; j < sshape->num_outlines; j++, soutline++, doutline++) { if (soutline->num_points) { tmp = xallocarray(soutline->num_points, sizeof(XkbPointRec)); if (!tmp) return FALSE; doutline->points = tmp; memcpy(doutline->points, soutline->points, soutline->num_points * sizeof(XkbPointRec)); doutline->corner_radius = soutline->corner_radius; } doutline->num_points = soutline->num_points; doutline->sz_points = soutline->num_points; } } dshape->num_outlines = sshape->num_outlines; dshape->sz_outlines = sshape->num_outlines; dshape->name = sshape->name; dshape->bounds = sshape->bounds; dshape->approx = NULL; if (sshape->approx && sshape->num_outlines > 0) { const ptrdiff_t approx_idx = sshape->approx - sshape->outlines; if (approx_idx < dshape->num_outlines) { dshape->approx = dshape->outlines + approx_idx; } else { LogMessage(X_WARNING, "XKB: approx outline " "index is out of range\n"); } } dshape->primary = NULL; if (sshape->primary && sshape->num_outlines > 0) { const ptrdiff_t primary_idx = sshape->primary - sshape->outlines; if (primary_idx < dshape->num_outlines) { dshape->primary = dshape->outlines + primary_idx; } else { LogMessage(X_WARNING, "XKB: primary outline " "index is out of range\n"); } } } dst->geom->num_shapes = src->geom->num_shapes; dst->geom->sz_shapes = src->geom->num_shapes; } else { if (dst->geom->sz_shapes) { free(dst->geom->shapes); } dst->geom->shapes = NULL; dst->geom->num_shapes = 0; dst->geom->sz_shapes = 0; } /* sections */ /* sections break down into doodads, and also into rows, which break * down into keys. */ if (dst->geom->num_sections) { for (i = 0, dsection = dst->geom->sections; i < dst->geom->num_sections; i++, dsection++) { for (j = 0, drow = dsection->rows; j < dsection->num_rows; j++, drow++) { if (drow->num_keys) free(drow->keys); } if (dsection->num_rows) free(dsection->rows); /* cut and waste from geom/doodad below. */ for (j = 0, ddoodad = dsection->doodads; j < dsection->num_doodads; j++, ddoodad++) { if (ddoodad->any.type == XkbTextDoodad) { free(ddoodad->text.text); ddoodad->text.text = NULL; free(ddoodad->text.font); ddoodad->text.font = NULL; } else if (ddoodad->any.type == XkbLogoDoodad) { free(ddoodad->logo.logo_name); ddoodad->logo.logo_name = NULL; } } free(dsection->doodads); } dst->geom->num_sections = 0; } if (src->geom->num_sections) { /* Reallocate and clear all items. */ if (!XkbGeomRealloc ((void **) &dst->geom->sections, dst->geom->sz_sections, src->geom->num_sections, sizeof(XkbSectionRec), XKB_GEOM_CLEAR_ALL)) return FALSE; dst->geom->num_sections = src->geom->num_sections; dst->geom->sz_sections = src->geom->num_sections; for (i = 0, ssection = src->geom->sections, dsection = dst->geom->sections; i < src->geom->num_sections; i++, ssection++, dsection++) { *dsection = *ssection; if (ssection->num_rows) { tmp = calloc(ssection->num_rows, sizeof(XkbRowRec)); if (!tmp) return FALSE; dsection->rows = tmp; } dsection->num_rows = ssection->num_rows; dsection->sz_rows = ssection->num_rows; for (j = 0, srow = ssection->rows, drow = dsection->rows; j < ssection->num_rows; j++, srow++, drow++) { if (srow->num_keys) { tmp = xallocarray(srow->num_keys, sizeof(XkbKeyRec)); if (!tmp) return FALSE; drow->keys = tmp; memcpy(drow->keys, srow->keys, srow->num_keys * sizeof(XkbKeyRec)); } drow->num_keys = srow->num_keys; drow->sz_keys = srow->num_keys; drow->top = srow->top; drow->left = srow->left; drow->vertical = srow->vertical; drow->bounds = srow->bounds; } if (ssection->num_doodads) { tmp = calloc(ssection->num_doodads, sizeof(XkbDoodadRec)); if (!tmp) return FALSE; dsection->doodads = tmp; } else { dsection->doodads = NULL; } dsection->sz_doodads = ssection->num_doodads; for (k = 0, sdoodad = ssection->doodads, ddoodad = dsection->doodads; k < ssection->num_doodads; k++, sdoodad++, ddoodad++) { memcpy(ddoodad, sdoodad, sizeof(XkbDoodadRec)); if (sdoodad->any.type == XkbTextDoodad) { if (sdoodad->text.text) ddoodad->text.text = strdup(sdoodad->text.text); if (sdoodad->text.font) ddoodad->text.font = strdup(sdoodad->text.font); } else if (sdoodad->any.type == XkbLogoDoodad) { if (sdoodad->logo.logo_name) ddoodad->logo.logo_name = strdup(sdoodad->logo.logo_name); } } dsection->overlays = NULL; dsection->sz_overlays = 0; dsection->num_overlays = 0; } } else { if (dst->geom->sz_sections) { free(dst->geom->sections); } dst->geom->sections = NULL; dst->geom->num_sections = 0; dst->geom->sz_sections = 0; } /* doodads */ if (dst->geom->num_doodads) { for (i = src->geom->num_doodads, ddoodad = dst->geom->doodads + src->geom->num_doodads; i < dst->geom->num_doodads; i++, ddoodad++) { if (ddoodad->any.type == XkbTextDoodad) { free(ddoodad->text.text); ddoodad->text.text = NULL; free(ddoodad->text.font); ddoodad->text.font = NULL; } else if (ddoodad->any.type == XkbLogoDoodad) { free(ddoodad->logo.logo_name); ddoodad->logo.logo_name = NULL; } } dst->geom->num_doodads = 0; } if (src->geom->num_doodads) { /* Reallocate and clear all items. */ if (!XkbGeomRealloc ((void **) &dst->geom->doodads, dst->geom->sz_doodads, src->geom->num_doodads, sizeof(XkbDoodadRec), XKB_GEOM_CLEAR_ALL)) return FALSE; dst->geom->sz_doodads = src->geom->num_doodads; for (i = 0, sdoodad = src->geom->doodads, ddoodad = dst->geom->doodads; i < src->geom->num_doodads; i++, sdoodad++, ddoodad++) { memcpy(ddoodad, sdoodad, sizeof(XkbDoodadRec)); if (sdoodad->any.type == XkbTextDoodad) { if (sdoodad->text.text) ddoodad->text.text = strdup(sdoodad->text.text); if (sdoodad->text.font) ddoodad->text.font = strdup(sdoodad->text.font); } else if (sdoodad->any.type == XkbLogoDoodad) { if (sdoodad->logo.logo_name) ddoodad->logo.logo_name = strdup(sdoodad->logo.logo_name); } } dst->geom->num_doodads = dst->geom->sz_doodads; } else { if (dst->geom->sz_doodads) { free(dst->geom->doodads); } dst->geom->doodads = NULL; dst->geom->num_doodads = 0; dst->geom->sz_doodads = 0; } /* key aliases */ if (src->geom->num_key_aliases) { /* Reallocate but don't clear any items. There is no need * to clear anything because data is immediately copied * over the whole memory area with memcpy. */ if (!XkbGeomRealloc ((void **) &dst->geom->key_aliases, dst->geom->sz_key_aliases, src->geom->num_key_aliases, 2 * XkbKeyNameLength, XKB_GEOM_CLEAR_NONE)) return FALSE; dst->geom->sz_key_aliases = src->geom->num_key_aliases; memcpy(dst->geom->key_aliases, src->geom->key_aliases, src->geom->num_key_aliases * 2 * XkbKeyNameLength); dst->geom->num_key_aliases = dst->geom->sz_key_aliases; } else { free(dst->geom->key_aliases); dst->geom->key_aliases = NULL; dst->geom->num_key_aliases = 0; dst->geom->sz_key_aliases = 0; } /* font */ if (src->geom->label_font) { if (!dst->geom->label_font) { tmp = malloc(strlen(src->geom->label_font) + 1); if (!tmp) return FALSE; dst->geom->label_font = tmp; } else if (strlen(src->geom->label_font) != strlen(dst->geom->label_font)) { tmp = realloc(dst->geom->label_font, strlen(src->geom->label_font) + 1); if (!tmp) return FALSE; dst->geom->label_font = tmp; } strcpy(dst->geom->label_font, src->geom->label_font); i = XkbGeomColorIndex(src->geom, src->geom->label_color); dst->geom->label_color = &(dst->geom->colors[i]); i = XkbGeomColorIndex(src->geom, src->geom->base_color); dst->geom->base_color = &(dst->geom->colors[i]); } else { free(dst->geom->label_font); dst->geom->label_font = NULL; dst->geom->label_color = NULL; dst->geom->base_color = NULL; } dst->geom->name = src->geom->name; dst->geom->width_mm = src->geom->width_mm; dst->geom->height_mm = src->geom->height_mm; } else { if (dst->geom) { /* I LOVE THE DIFFERENT CALL SIGNATURE. REALLY, I DO. */ XkbFreeGeometry(dst->geom, XkbGeomAllMask, TRUE); dst->geom = NULL; } } return TRUE; } static Bool _XkbCopyIndicators(XkbDescPtr src, XkbDescPtr dst) { /* indicators */ if (src->indicators) { if (!dst->indicators) { dst->indicators = malloc(sizeof(XkbIndicatorRec)); if (!dst->indicators) return FALSE; } memcpy(dst->indicators, src->indicators, sizeof(XkbIndicatorRec)); } else { free(dst->indicators); dst->indicators = NULL; } return TRUE; } static Bool _XkbCopyControls(XkbDescPtr src, XkbDescPtr dst) { /* controls */ if (src->ctrls) { if (!dst->ctrls) { dst->ctrls = malloc(sizeof(XkbControlsRec)); if (!dst->ctrls) return FALSE; } memcpy(dst->ctrls, src->ctrls, sizeof(XkbControlsRec)); } else { free(dst->ctrls); dst->ctrls = NULL; } return TRUE; } /** * Copy an XKB map from src to dst, reallocating when necessary: if some * map components are present in one, but not in the other, the destination * components will be allocated or freed as necessary. * * Basic map consistency is assumed on both sides, so maps with random * uninitialised data (e.g. names->radio_grous == NULL, names->num_rg == 19) * _will_ cause failures. You've been warned. * * Returns TRUE on success, or FALSE on failure. If this function fails, * dst may be in an inconsistent state: all its pointers are guaranteed * to remain valid, but part of the map may be from src and part from dst. * */ Bool XkbCopyKeymap(XkbDescPtr dst, XkbDescPtr src) { if (!src || !dst) { DebugF("XkbCopyKeymap: src (%p) or dst (%p) is NULL\n", src, dst); return FALSE; } if (src == dst) return TRUE; if (!_XkbCopyClientMap(src, dst)) { DebugF("XkbCopyKeymap: failed to copy client map\n"); return FALSE; } if (!_XkbCopyServerMap(src, dst)) { DebugF("XkbCopyKeymap: failed to copy server map\n"); return FALSE; } if (!_XkbCopyIndicators(src, dst)) { DebugF("XkbCopyKeymap: failed to copy indicators\n"); return FALSE; } if (!_XkbCopyControls(src, dst)) { DebugF("XkbCopyKeymap: failed to copy controls\n"); return FALSE; } if (!_XkbCopyNames(src, dst)) { DebugF("XkbCopyKeymap: failed to copy names\n"); return FALSE; } if (!_XkbCopyCompat(src, dst)) { DebugF("XkbCopyKeymap: failed to copy compat map\n"); return FALSE; } if (!_XkbCopyGeom(src, dst)) { DebugF("XkbCopyKeymap: failed to copy geometry\n"); return FALSE; } dst->min_key_code = src->min_key_code; dst->max_key_code = src->max_key_code; return TRUE; } Bool XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc) { xkbNewKeyboardNotify nkn; Bool ret; if (!dst->key || !desc) return FALSE; memset(&nkn, 0, sizeof(xkbNewKeyboardNotify)); nkn.oldMinKeyCode = dst->key->xkbInfo->desc->min_key_code; nkn.oldMaxKeyCode = dst->key->xkbInfo->desc->max_key_code; nkn.deviceID = dst->id; nkn.oldDeviceID = dst->id; nkn.minKeyCode = desc->min_key_code; nkn.maxKeyCode = desc->max_key_code; nkn.requestMajor = XkbReqCode; nkn.requestMinor = X_kbSetMap; /* Near enough's good enough. */ nkn.changed = XkbNKN_KeycodesMask; if (desc->geom) nkn.changed |= XkbNKN_GeometryMask; ret = XkbCopyKeymap(dst->key->xkbInfo->desc, desc); if (ret) XkbSendNewKeyboardNotify(dst, &nkn); return ret; } Bool XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src) { return XkbDeviceApplyKeymap(dst, src->key->xkbInfo->desc); } int XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode) { XkbDescPtr xkb = xkbi->desc; int effectiveGroup = xkbState->group; if (!XkbKeycodeInRange(xkb, keycode)) return -1; if (effectiveGroup == XkbGroup1Index) return effectiveGroup; if (XkbKeyNumGroups(xkb, keycode) > 1U) { if (effectiveGroup >= XkbKeyNumGroups(xkb, keycode)) { unsigned int gi = XkbKeyGroupInfo(xkb, keycode); switch (XkbOutOfRangeGroupAction(gi)) { default: case XkbWrapIntoRange: effectiveGroup %= XkbKeyNumGroups(xkb, keycode); break; case XkbClampIntoRange: effectiveGroup = XkbKeyNumGroups(xkb, keycode) - 1; break; case XkbRedirectIntoRange: effectiveGroup = XkbOutOfRangeGroupInfo(gi); if (effectiveGroup >= XkbKeyNumGroups(xkb, keycode)) effectiveGroup = 0; break; } } } else effectiveGroup = XkbGroup1Index; return effectiveGroup; } /* Merge the lockedPtrButtons from all attached SDs for the given master * device into the MD's state. */ void XkbMergeLockedPtrBtns(DeviceIntPtr master) { DeviceIntPtr d = inputInfo.devices; XkbSrvInfoPtr xkbi = NULL; if (!IsMaster(master)) return; if (!master->key) return; xkbi = master->key->xkbInfo; xkbi->lockedPtrButtons = 0; for (; d; d = d->next) { if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key) continue; xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons; } } void XkbCopyControls(XkbDescPtr dst, XkbDescPtr src) { int i, nG, nTG; if (!dst || !src) return; *dst->ctrls = *src->ctrls; for (nG = nTG = 0, i = dst->min_key_code; i <= dst->max_key_code; i++) { nG = XkbKeyNumGroups(dst, i); if (nG >= XkbNumKbdGroups) { nTG = XkbNumKbdGroups; break; } if (nG > nTG) { nTG = nG; } } dst->ctrls->num_groups = nTG; } xorg-server-21.1.16/xkb/xkbEvents.c0000644000175000017500000010770114757411105012542 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include "inputstr.h" #include "exevents.h" #include "exglobals.h" #include "windowstr.h" #include #include "xkb.h" /***====================================================================***/ /* * This function sends out two kinds of notification: * - Core mapping notify events sent to clients for whom kbd is the * current core ('picked') keyboard _and_ have not explicitly * selected for XKB mapping notify events; * - Xi mapping events, sent unconditionally to all clients who have * explicitly selected for them (including those who have explicitly * selected for XKB mapping notify events!). */ static void XkbSendLegacyMapNotify(DeviceIntPtr kbd, CARD16 xkb_event, CARD16 changed, int first_key, int num_keys) { int i; int keymap_changed = 0; int modmap_changed = 0; CARD32 time = GetTimeInMillis(); if (xkb_event == XkbNewKeyboardNotify) { if (changed & XkbNKN_KeycodesMask) { keymap_changed = 1; modmap_changed = 1; } } else if (xkb_event == XkbMapNotify) { if (changed & XkbKeySymsMask) keymap_changed = 1; if (changed & XkbModifierMapMask) modmap_changed = 1; } if (!keymap_changed && !modmap_changed) return; /* 0 is serverClient. */ for (i = 1; i < currentMaxClients; i++) { if (!clients[i] || clients[i]->clientState != ClientStateRunning) continue; /* XKB allows clients to restrict the MappingNotify events sent to * them. This was broken for three years. Sorry. */ if (xkb_event == XkbMapNotify && (clients[i]->xkbClientFlags & _XkbClientInitialized) && !(clients[i]->mapNotifyMask & changed)) continue; /* Emulate previous server behaviour: any client which has activated * XKB will not receive core events emulated from a NewKeyboardNotify * at all. */ if (xkb_event == XkbNewKeyboardNotify && (clients[i]->xkbClientFlags & _XkbClientInitialized)) continue; /* Don't send core events to clients who don't know about us. */ if (!XIShouldNotify(clients[i], kbd)) continue; if (keymap_changed) { xEvent core_mn = { .u.u.type = MappingNotify }; core_mn.u.mappingNotify.request = MappingKeyboard; /* Clip the keycode range to what the client knows about, so it * doesn't freak out. */ if (first_key >= clients[i]->minKC) core_mn.u.mappingNotify.firstKeyCode = first_key; else core_mn.u.mappingNotify.firstKeyCode = clients[i]->minKC; if (first_key + num_keys - 1 <= clients[i]->maxKC) core_mn.u.mappingNotify.count = num_keys; else core_mn.u.mappingNotify.count = clients[i]->maxKC - clients[i]->minKC + 1; WriteEventsToClient(clients[i], 1, &core_mn); } if (modmap_changed) { xEvent core_mn = { .u.mappingNotify.request = MappingModifier, .u.mappingNotify.firstKeyCode = 0, .u.mappingNotify.count = 0 }; core_mn.u.u.type = MappingNotify; WriteEventsToClient(clients[i], 1, &core_mn); } } /* Hmm, maybe we can accidentally generate Xi events for core devices * here? Clients might be upset, but that seems better than the * alternative of stale keymaps. -ds */ if (keymap_changed) { deviceMappingNotify xi_mn = { .type = DeviceMappingNotify, .deviceid = kbd->id, .request = MappingKeyboard, .firstKeyCode = first_key, .count = num_keys, .time = time }; SendEventToAllWindows(kbd, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1); } if (modmap_changed) { deviceMappingNotify xi_mn = { .type = DeviceMappingNotify, .deviceid = kbd->id, .request = MappingModifier, .firstKeyCode = 0, .count = 0, .time = time }; SendEventToAllWindows(kbd, DeviceMappingNotifyMask, (xEvent *) &xi_mn, 1); } } /***====================================================================***/ void XkbSendNewKeyboardNotify(DeviceIntPtr kbd, xkbNewKeyboardNotify * pNKN) { int i; Time time = GetTimeInMillis(); CARD16 changed = pNKN->changed; pNKN->type = XkbEventCode + XkbEventBase; pNKN->xkbType = XkbNewKeyboardNotify; for (i = 1; i < currentMaxClients; i++) { if (!clients[i] || clients[i]->clientState != ClientStateRunning) continue; if (!(clients[i]->newKeyboardNotifyMask & changed)) continue; pNKN->sequenceNumber = clients[i]->sequence; pNKN->time = time; pNKN->changed = changed; if (clients[i]->swapped) { swaps(&pNKN->sequenceNumber); swapl(&pNKN->time); swaps(&pNKN->changed); } WriteToClient(clients[i], sizeof(xEvent), pNKN); if (changed & XkbNKN_KeycodesMask) { clients[i]->minKC = pNKN->minKeyCode; clients[i]->maxKC = pNKN->maxKeyCode; } } XkbSendLegacyMapNotify(kbd, XkbNewKeyboardNotify, changed, pNKN->minKeyCode, pNKN->maxKeyCode - pNKN->minKeyCode + 1); return; } /***====================================================================***/ void XkbSendStateNotify(DeviceIntPtr kbd, xkbStateNotify * pSN) { XkbSrvInfoPtr xkbi; XkbStatePtr state; XkbInterestPtr interest; Time time; register CARD16 changed, bState; interest = kbd->xkb_interest; if (!interest || !kbd->key || !kbd->key->xkbInfo) return; xkbi = kbd->key->xkbInfo; state = &xkbi->state; pSN->type = XkbEventCode + XkbEventBase; pSN->xkbType = XkbStateNotify; pSN->deviceID = kbd->id; pSN->time = time = GetTimeInMillis(); pSN->mods = state->mods; pSN->baseMods = state->base_mods; pSN->latchedMods = state->latched_mods; pSN->lockedMods = state->locked_mods; pSN->group = state->group; pSN->baseGroup = state->base_group; pSN->latchedGroup = state->latched_group; pSN->lockedGroup = state->locked_group; pSN->compatState = state->compat_state; pSN->grabMods = state->grab_mods; pSN->compatGrabMods = state->compat_grab_mods; pSN->lookupMods = state->lookup_mods; pSN->compatLookupMods = state->compat_lookup_mods; pSN->ptrBtnState = state->ptr_buttons; changed = pSN->changed; bState = pSN->ptrBtnState; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->stateNotifyMask & changed)) { pSN->sequenceNumber = interest->client->sequence; pSN->time = time; pSN->changed = changed; pSN->ptrBtnState = bState; if (interest->client->swapped) { swaps(&pSN->sequenceNumber); swapl(&pSN->time); swaps(&pSN->changed); swaps(&pSN->ptrBtnState); } WriteToClient(interest->client, sizeof(xEvent), pSN); } interest = interest->next; } return; } /***====================================================================***/ /* * This function sends out XKB mapping notify events to clients which * have explicitly selected for them. Core and Xi events are handled by * XkbSendLegacyMapNotify. */ void XkbSendMapNotify(DeviceIntPtr kbd, xkbMapNotify * pMN) { int i; CARD32 time = GetTimeInMillis(); CARD16 changed = pMN->changed; XkbSrvInfoPtr xkbi = kbd->key->xkbInfo; pMN->minKeyCode = xkbi->desc->min_key_code; pMN->maxKeyCode = xkbi->desc->max_key_code; pMN->type = XkbEventCode + XkbEventBase; pMN->xkbType = XkbMapNotify; pMN->deviceID = kbd->id; /* 0 is serverClient. */ for (i = 1; i < currentMaxClients; i++) { if (!clients[i] || clients[i]->clientState != ClientStateRunning) continue; if (!(clients[i]->mapNotifyMask & changed)) continue; pMN->time = time; pMN->sequenceNumber = clients[i]->sequence; pMN->changed = changed; if (clients[i]->swapped) { swaps(&pMN->sequenceNumber); swapl(&pMN->time); swaps(&pMN->changed); } WriteToClient(clients[i], sizeof(xEvent), pMN); } XkbSendLegacyMapNotify(kbd, XkbMapNotify, changed, pMN->firstKeySym, pMN->nKeySyms); } int XkbComputeControlsNotify(DeviceIntPtr kbd, XkbControlsPtr old, XkbControlsPtr new, xkbControlsNotify * pCN, Bool forceCtrlProc) { int i; CARD32 changedControls; changedControls = 0; if (!kbd || !kbd->kbdfeed) return 0; if (old->enabled_ctrls != new->enabled_ctrls) changedControls |= XkbControlsEnabledMask; if ((old->repeat_delay != new->repeat_delay) || (old->repeat_interval != new->repeat_interval)) changedControls |= XkbRepeatKeysMask; for (i = 0; i < XkbPerKeyBitArraySize; i++) if (old->per_key_repeat[i] != new->per_key_repeat[i]) changedControls |= XkbPerKeyRepeatMask; if (old->slow_keys_delay != new->slow_keys_delay) changedControls |= XkbSlowKeysMask; if (old->debounce_delay != new->debounce_delay) changedControls |= XkbBounceKeysMask; if ((old->mk_delay != new->mk_delay) || (old->mk_interval != new->mk_interval) || (old->mk_dflt_btn != new->mk_dflt_btn)) changedControls |= XkbMouseKeysMask; if ((old->mk_time_to_max != new->mk_time_to_max) || (old->mk_curve != new->mk_curve) || (old->mk_max_speed != new->mk_max_speed)) changedControls |= XkbMouseKeysAccelMask; if (old->ax_options != new->ax_options) changedControls |= XkbAccessXKeysMask; if ((old->ax_options ^ new->ax_options) & XkbAX_SKOptionsMask) changedControls |= XkbStickyKeysMask; if ((old->ax_options ^ new->ax_options) & XkbAX_FBOptionsMask) changedControls |= XkbAccessXFeedbackMask; if ((old->ax_timeout != new->ax_timeout) || (old->axt_ctrls_mask != new->axt_ctrls_mask) || (old->axt_ctrls_values != new->axt_ctrls_values) || (old->axt_opts_mask != new->axt_opts_mask) || (old->axt_opts_values != new->axt_opts_values)) { changedControls |= XkbAccessXTimeoutMask; } if ((old->internal.mask != new->internal.mask) || (old->internal.real_mods != new->internal.real_mods) || (old->internal.vmods != new->internal.vmods)) changedControls |= XkbInternalModsMask; if ((old->ignore_lock.mask != new->ignore_lock.mask) || (old->ignore_lock.real_mods != new->ignore_lock.real_mods) || (old->ignore_lock.vmods != new->ignore_lock.vmods)) changedControls |= XkbIgnoreLockModsMask; if (new->enabled_ctrls & XkbRepeatKeysMask) kbd->kbdfeed->ctrl.autoRepeat = TRUE; else kbd->kbdfeed->ctrl.autoRepeat = FALSE; if (kbd->kbdfeed && kbd->kbdfeed->CtrlProc && (changedControls || forceCtrlProc)) (*kbd->kbdfeed->CtrlProc) (kbd, &kbd->kbdfeed->ctrl); if ((!changedControls) && (old->num_groups == new->num_groups)) return 0; if (!kbd->xkb_interest) return 0; pCN->changedControls = changedControls; pCN->enabledControls = new->enabled_ctrls; pCN->enabledControlChanges = (new->enabled_ctrls ^ old->enabled_ctrls); pCN->numGroups = new->num_groups; return 1; } void XkbSendControlsNotify(DeviceIntPtr kbd, xkbControlsNotify * pCN) { int initialized; CARD32 changedControls, enabledControls, enabledChanges = 0; XkbSrvInfoPtr xkbi; XkbInterestPtr interest; Time time = 0; interest = kbd->xkb_interest; if (!interest || !kbd->key || !kbd->key->xkbInfo) return; xkbi = kbd->key->xkbInfo; initialized = 0; enabledControls = xkbi->desc->ctrls->enabled_ctrls; changedControls = pCN->changedControls; pCN->numGroups = xkbi->desc->ctrls->num_groups; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->ctrlsNotifyMask & changedControls)) { if (!initialized) { pCN->type = XkbEventCode + XkbEventBase; pCN->xkbType = XkbControlsNotify; pCN->deviceID = kbd->id; pCN->time = time = GetTimeInMillis(); enabledChanges = pCN->enabledControlChanges; initialized = 1; } pCN->changedControls = changedControls; pCN->enabledControls = enabledControls; pCN->enabledControlChanges = enabledChanges; pCN->sequenceNumber = interest->client->sequence; pCN->time = time; if (interest->client->swapped) { swaps(&pCN->sequenceNumber); swapl(&pCN->changedControls); swapl(&pCN->enabledControls); swapl(&pCN->enabledControlChanges); swapl(&pCN->time); } WriteToClient(interest->client, sizeof(xEvent), pCN); } interest = interest->next; } return; } static void XkbSendIndicatorNotify(DeviceIntPtr kbd, int xkbType, xkbIndicatorNotify * pEv) { int initialized; XkbInterestPtr interest; Time time = 0; CARD32 state, changed; interest = kbd->xkb_interest; if (!interest) return; initialized = 0; state = pEv->state; changed = pEv->changed; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (((xkbType == XkbIndicatorStateNotify) && (interest->iStateNotifyMask & changed)) || ((xkbType == XkbIndicatorMapNotify) && (interest->iMapNotifyMask & changed)))) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = xkbType; pEv->deviceID = kbd->id; pEv->time = time = GetTimeInMillis(); initialized = 1; } pEv->sequenceNumber = interest->client->sequence; pEv->time = time; pEv->changed = changed; pEv->state = state; if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); swapl(&pEv->changed); swapl(&pEv->state); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbHandleBell(BOOL force, BOOL eventOnly, DeviceIntPtr kbd, CARD8 percent, void *pCtrl, CARD8 class, Atom name, WindowPtr pWin, ClientPtr pClient) { xkbBellNotify bn; int initialized; XkbSrvInfoPtr xkbi; XkbInterestPtr interest; CARD8 id; CARD16 pitch, duration; Time time = 0; XID winID = 0; if (!kbd->key || !kbd->key->xkbInfo) return; xkbi = kbd->key->xkbInfo; if ((force || (xkbi->desc->ctrls->enabled_ctrls & XkbAudibleBellMask)) && (!eventOnly)) { if (kbd->kbdfeed->BellProc) (*kbd->kbdfeed->BellProc) (percent, kbd, (void *) pCtrl, class); } interest = kbd->xkb_interest; if ((!interest) || (force)) return; if (class == KbdFeedbackClass) { KeybdCtrl *pKeyCtrl = (KeybdCtrl *) pCtrl; id = pKeyCtrl->id; pitch = pKeyCtrl->bell_pitch; duration = pKeyCtrl->bell_duration; } else if (class == BellFeedbackClass) { BellCtrl *pBellCtrl = (BellCtrl *) pCtrl; id = pBellCtrl->id; pitch = pBellCtrl->pitch; duration = pBellCtrl->duration; } else return; initialized = 0; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->bellNotifyMask)) { if (!initialized) { time = GetTimeInMillis(); bn.type = XkbEventCode + XkbEventBase; bn.xkbType = XkbBellNotify; bn.deviceID = kbd->id; bn.bellClass = class; bn.bellID = id; bn.percent = percent; bn.eventOnly = (eventOnly != 0); winID = (pWin ? pWin->drawable.id : None); initialized = 1; } bn.sequenceNumber = interest->client->sequence; bn.time = time; bn.pitch = pitch; bn.duration = duration; bn.name = name; bn.window = winID; if (interest->client->swapped) { swaps(&bn.sequenceNumber); swapl(&bn.time); swaps(&bn.pitch); swaps(&bn.duration); swapl(&bn.name); swapl(&bn.window); } WriteToClient(interest->client, sizeof(xEvent), &bn); } interest = interest->next; } return; } void XkbSendAccessXNotify(DeviceIntPtr kbd, xkbAccessXNotify * pEv) { int initialized; XkbInterestPtr interest; Time time = 0; CARD16 sk_delay, db_delay; interest = kbd->xkb_interest; if (!interest) return; initialized = 0; sk_delay = pEv->slowKeysDelay; db_delay = pEv->debounceDelay; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->accessXNotifyMask & (1 << pEv->detail))) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbAccessXNotify; pEv->deviceID = kbd->id; pEv->time = time = GetTimeInMillis(); initialized = 1; } pEv->sequenceNumber = interest->client->sequence; pEv->time = time; pEv->slowKeysDelay = sk_delay; pEv->debounceDelay = db_delay; if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); swaps(&pEv->slowKeysDelay); swaps(&pEv->debounceDelay); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbSendNamesNotify(DeviceIntPtr kbd, xkbNamesNotify * pEv) { int initialized; XkbInterestPtr interest; Time time = 0; CARD16 changed, changedVirtualMods; CARD32 changedIndicators; interest = kbd->xkb_interest; if (!interest) return; initialized = 0; changed = pEv->changed; changedIndicators = pEv->changedIndicators; changedVirtualMods = pEv->changedVirtualMods; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->namesNotifyMask & pEv->changed)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbNamesNotify; pEv->deviceID = kbd->id; pEv->time = time = GetTimeInMillis(); initialized = 1; } pEv->sequenceNumber = interest->client->sequence; pEv->time = time; pEv->changed = changed; pEv->changedIndicators = changedIndicators; pEv->changedVirtualMods = changedVirtualMods; if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); swaps(&pEv->changed); swapl(&pEv->changedIndicators); swaps(&pEv->changedVirtualMods); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbSendCompatMapNotify(DeviceIntPtr kbd, xkbCompatMapNotify * pEv) { int initialized; XkbInterestPtr interest; Time time = 0; CARD16 firstSI = 0, nSI = 0, nTotalSI = 0; interest = kbd->xkb_interest; if (!interest) return; initialized = 0; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->compatNotifyMask)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbCompatMapNotify; pEv->deviceID = kbd->id; pEv->time = time = GetTimeInMillis(); firstSI = pEv->firstSI; nSI = pEv->nSI; nTotalSI = pEv->nTotalSI; initialized = 1; } pEv->sequenceNumber = interest->client->sequence; pEv->time = time; pEv->firstSI = firstSI; pEv->nSI = nSI; pEv->nTotalSI = nTotalSI; if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); swaps(&pEv->firstSI); swaps(&pEv->nSI); swaps(&pEv->nTotalSI); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbSendActionMessage(DeviceIntPtr kbd, xkbActionMessage * pEv) { int initialized; XkbSrvInfoPtr xkbi; XkbInterestPtr interest; Time time = 0; interest = kbd->xkb_interest; if (!interest || !kbd->key || !kbd->key->xkbInfo) return; xkbi = kbd->key->xkbInfo; initialized = 0; pEv->mods = xkbi->state.mods; pEv->group = xkbi->state.group; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->actionMessageMask)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbActionMessage; pEv->deviceID = kbd->id; pEv->sequenceNumber = interest->client->sequence; pEv->time = time = GetTimeInMillis(); initialized = 1; } pEv->sequenceNumber = interest->client->sequence; pEv->time = time; if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbSendExtensionDeviceNotify(DeviceIntPtr dev, ClientPtr client, xkbExtensionDeviceNotify * pEv) { int initialized; XkbInterestPtr interest; Time time = 0; CARD32 defined, state; CARD16 reason; interest = dev->xkb_interest; if (!interest) return; initialized = 0; reason = pEv->reason; defined = pEv->ledsDefined; state = pEv->ledState; while (interest) { if ((!interest->client->clientGone) && (interest->client->xkbClientFlags & _XkbClientInitialized) && (interest->extDevNotifyMask & reason)) { if (!initialized) { pEv->type = XkbEventCode + XkbEventBase; pEv->xkbType = XkbExtensionDeviceNotify; pEv->deviceID = dev->id; pEv->sequenceNumber = interest->client->sequence; pEv->time = time = GetTimeInMillis(); initialized = 1; } else { pEv->sequenceNumber = interest->client->sequence; pEv->time = time; pEv->ledsDefined = defined; pEv->ledState = state; pEv->reason = reason; pEv->supported = XkbXI_AllFeaturesMask; } if (interest->client->swapped) { swaps(&pEv->sequenceNumber); swapl(&pEv->time); swapl(&pEv->ledsDefined); swapl(&pEv->ledState); swaps(&pEv->reason); swaps(&pEv->supported); } WriteToClient(interest->client, sizeof(xEvent), pEv); } interest = interest->next; } return; } void XkbSendNotification(DeviceIntPtr kbd, XkbChangesPtr pChanges, XkbEventCausePtr cause) { XkbSrvLedInfoPtr sli; sli = NULL; if (pChanges->state_changes) { xkbStateNotify sn; sn.changed = pChanges->state_changes; sn.keycode = cause->kc; sn.eventType = cause->event; sn.requestMajor = cause->mjr; sn.requestMinor = cause->mnr; XkbSendStateNotify(kbd, &sn); } if (pChanges->map.changed) { xkbMapNotify mn; memset(&mn, 0, sizeof(xkbMapNotify)); mn.changed = pChanges->map.changed; mn.firstType = pChanges->map.first_type; mn.nTypes = pChanges->map.num_types; mn.firstKeySym = pChanges->map.first_key_sym; mn.nKeySyms = pChanges->map.num_key_syms; mn.firstKeyAct = pChanges->map.first_key_act; mn.nKeyActs = pChanges->map.num_key_acts; mn.firstKeyBehavior = pChanges->map.first_key_behavior; mn.nKeyBehaviors = pChanges->map.num_key_behaviors; mn.virtualMods = pChanges->map.vmods; mn.firstKeyExplicit = pChanges->map.first_key_explicit; mn.nKeyExplicit = pChanges->map.num_key_explicit; mn.firstModMapKey = pChanges->map.first_modmap_key; mn.nModMapKeys = pChanges->map.num_modmap_keys; mn.firstVModMapKey = pChanges->map.first_vmodmap_key; mn.nVModMapKeys = pChanges->map.num_vmodmap_keys; XkbSendMapNotify(kbd, &mn); } if ((pChanges->ctrls.changed_ctrls) || (pChanges->ctrls.enabled_ctrls_changes)) { xkbControlsNotify cn; memset(&cn, 0, sizeof(xkbControlsNotify)); cn.changedControls = pChanges->ctrls.changed_ctrls; cn.enabledControlChanges = pChanges->ctrls.enabled_ctrls_changes; cn.keycode = cause->kc; cn.eventType = cause->event; cn.requestMajor = cause->mjr; cn.requestMinor = cause->mnr; XkbSendControlsNotify(kbd, &cn); } if (pChanges->indicators.map_changes) { xkbIndicatorNotify in; if (sli == NULL) sli = XkbFindSrvLedInfo(kbd, XkbDfltXIClass, XkbDfltXIId, 0); memset(&in, 0, sizeof(xkbIndicatorNotify)); in.state = sli->effectiveState; in.changed = pChanges->indicators.map_changes; XkbSendIndicatorNotify(kbd, XkbIndicatorMapNotify, &in); } if (pChanges->indicators.state_changes) { xkbIndicatorNotify in; if (sli == NULL) sli = XkbFindSrvLedInfo(kbd, XkbDfltXIClass, XkbDfltXIId, 0); memset(&in, 0, sizeof(xkbIndicatorNotify)); in.state = sli->effectiveState; in.changed = pChanges->indicators.state_changes; XkbSendIndicatorNotify(kbd, XkbIndicatorStateNotify, &in); } if (pChanges->names.changed) { xkbNamesNotify nn; memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed = pChanges->names.changed; nn.firstType = pChanges->names.first_type; nn.nTypes = pChanges->names.num_types; nn.firstLevelName = pChanges->names.first_lvl; nn.nLevelNames = pChanges->names.num_lvls; nn.nRadioGroups = pChanges->names.num_rg; nn.changedVirtualMods = pChanges->names.changed_vmods; nn.changedIndicators = pChanges->names.changed_indicators; XkbSendNamesNotify(kbd, &nn); } if ((pChanges->compat.changed_groups) || (pChanges->compat.num_si > 0)) { xkbCompatMapNotify cmn; memset(&cmn, 0, sizeof(xkbCompatMapNotify)); cmn.changedGroups = pChanges->compat.changed_groups; cmn.firstSI = pChanges->compat.first_si; cmn.nSI = pChanges->compat.num_si; cmn.nTotalSI = kbd->key->xkbInfo->desc->compat->num_si; XkbSendCompatMapNotify(kbd, &cmn); } return; } /***====================================================================***/ void XkbFilterEvents(ClientPtr client, int nEvents, xEvent *xE) { DeviceIntPtr dev = NULL; XkbSrvInfoPtr xkbi; CARD8 type = xE[0].u.u.type; if (xE->u.u.type & EXTENSION_EVENT_BASE) dev = XIGetDevice(xE); if (!dev) dev = PickKeyboard(client); if (!dev->key) return; xkbi = dev->key->xkbInfo; if (client->xkbClientFlags & _XkbClientInitialized) { if ((xkbDebugFlags & 0x10) && (type == KeyPress || type == KeyRelease || type == DeviceKeyPress || type == DeviceKeyRelease)) DebugF("[xkb] XkbFilterWriteEvents (XKB client): state 0x%04x\n", xE[0].u.keyButtonPointer.state); if (dev->deviceGrab.grab != NullGrab && dev->deviceGrab.fromPassiveGrab && (type == KeyPress || type == KeyRelease || type == DeviceKeyPress || type == DeviceKeyRelease)) { unsigned int state, flags; flags = client->xkbClientFlags; state = xkbi->state.compat_grab_mods; if (flags & XkbPCF_GrabsUseXKBStateMask) { int group; if (flags & XkbPCF_LookupStateWhenGrabbed) { group = xkbi->state.group; state = xkbi->state.lookup_mods; } else { state = xkbi->state.grab_mods; group = xkbi->state.base_group + xkbi->state.latched_group; if (group < 0 || group >= xkbi->desc->ctrls->num_groups) group = XkbAdjustGroup(group, xkbi->desc->ctrls); } state = XkbBuildCoreState(state, group); } else if (flags & XkbPCF_LookupStateWhenGrabbed) { state = xkbi->state.compat_lookup_mods; } xE[0].u.keyButtonPointer.state = state; } } else { if ((xkbDebugFlags & 0x4) && (xE[0].u.u.type == KeyPress || xE[0].u.u.type == KeyRelease || xE[0].u.u.type == DeviceKeyPress || xE[0].u.u.type == DeviceKeyRelease)) { DebugF("[xkb] XKbFilterWriteEvents (non-XKB):\n"); DebugF("[xkb] event= 0x%04x\n", xE[0].u.keyButtonPointer.state); DebugF("[xkb] lookup= 0x%02x, grab= 0x%02x\n", xkbi->state.lookup_mods, xkbi->state.grab_mods); DebugF("[xkb] compat lookup= 0x%02x, grab= 0x%02x\n", xkbi->state.compat_lookup_mods, xkbi->state.compat_grab_mods); } if (type >= KeyPress && type <= MotionNotify) { CARD16 old, new; old = xE[0].u.keyButtonPointer.state & ~0x1f00; new = xE[0].u.keyButtonPointer.state & 0x1F00; if (old == XkbStateFieldFromRec(&xkbi->state)) new |= xkbi->state.compat_lookup_mods; else new |= xkbi->state.compat_grab_mods; xE[0].u.keyButtonPointer.state = new; } else if (type == EnterNotify || type == LeaveNotify) { xE[0].u.enterLeave.state &= 0x1F00; xE[0].u.enterLeave.state |= xkbi->state.compat_grab_mods; } else if (type >= DeviceKeyPress && type <= DeviceMotionNotify) { CARD16 old, new; deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) &xE[0]; old = kbp->state & ~0x1F00; new = kbp->state & 0x1F00; if (old == XkbStateFieldFromRec(&xkbi->state)) new |= xkbi->state.compat_lookup_mods; else new |= xkbi->state.compat_grab_mods; kbp->state = new; } } } /***====================================================================***/ XkbInterestPtr XkbFindClientResource(DevicePtr inDev, ClientPtr client) { DeviceIntPtr dev = (DeviceIntPtr) inDev; XkbInterestPtr interest; if (dev->xkb_interest) { interest = dev->xkb_interest; while (interest) { if (interest->client == client) { return interest; } interest = interest->next; } } return NULL; } XkbInterestPtr XkbAddClientResource(DevicePtr inDev, ClientPtr client, XID id) { DeviceIntPtr dev = (DeviceIntPtr) inDev; XkbInterestPtr interest; interest = dev->xkb_interest; while (interest) { if (interest->client == client) return ((interest->resource == id) ? interest : NULL); interest = interest->next; } interest = calloc(1, sizeof(XkbInterestRec)); if (interest) { interest->dev = dev; interest->client = client; interest->resource = id; interest->next = dev->xkb_interest; dev->xkb_interest = interest; return interest; } return NULL; } int XkbRemoveResourceClient(DevicePtr inDev, XID id) { XkbSrvInfoPtr xkbi; DeviceIntPtr dev = (DeviceIntPtr) inDev; XkbInterestPtr interest; Bool found; unsigned long autoCtrls, autoValues; ClientPtr client = NULL; found = FALSE; if (!dev->key || !dev->key->xkbInfo) return found; autoCtrls = autoValues = 0; if (dev->xkb_interest) { interest = dev->xkb_interest; if (interest && (interest->resource == id)) { dev->xkb_interest = interest->next; autoCtrls = interest->autoCtrls; autoValues = interest->autoCtrlValues; client = interest->client; free(interest); found = TRUE; } while ((!found) && (interest->next)) { if (interest->next->resource == id) { XkbInterestPtr victim = interest->next; interest->next = victim->next; autoCtrls = victim->autoCtrls; autoValues = victim->autoCtrlValues; client = victim->client; free(victim); found = TRUE; } interest = interest->next; } } if (found && autoCtrls && dev->key && dev->key->xkbInfo) { XkbEventCauseRec cause; xkbi = dev->key->xkbInfo; XkbSetCauseXkbReq(&cause, X_kbPerClientFlags, client); XkbEnableDisableControls(xkbi, autoCtrls, autoValues, NULL, &cause); } return found; } xorg-server-21.1.16/xkb/xkbAccessX.c0000644000175000017500000006753114757411105012635 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include "exglobals.h" #include #include "inputstr.h" #include "eventstr.h" #include "inpututils.h" #include #if !defined(WIN32) #include #endif int XkbDfltRepeatDelay = 660; int XkbDfltRepeatInterval = 40; #define DFLT_TIMEOUT_CTRLS (XkbAX_KRGMask|XkbStickyKeysMask|XkbMouseKeysMask) #define DFLT_TIMEOUT_OPTS (XkbAX_IndicatorFBMask) unsigned short XkbDfltAccessXTimeout = 120; unsigned int XkbDfltAccessXTimeoutMask = DFLT_TIMEOUT_CTRLS; static unsigned int XkbDfltAccessXTimeoutValues = 0; static unsigned int XkbDfltAccessXTimeoutOptionsMask = DFLT_TIMEOUT_OPTS; static unsigned int XkbDfltAccessXTimeoutOptionsValues = 0; unsigned int XkbDfltAccessXFeedback = XkbAccessXFeedbackMask; unsigned short XkbDfltAccessXOptions = XkbAX_AllOptionsMask & ~(XkbAX_IndicatorFBMask | XkbAX_SKReleaseFBMask | XkbAX_SKRejectFBMask); void AccessXComputeCurveFactor(XkbSrvInfoPtr xkbi, XkbControlsPtr ctrls) { xkbi->mouseKeysCurve = 1.0 + (((double) ctrls->mk_curve) * 0.001); xkbi->mouseKeysCurveFactor = (((double) ctrls->mk_max_speed) / pow((double) ctrls->mk_time_to_max, xkbi->mouseKeysCurve)); return; } void AccessXInit(DeviceIntPtr keybd) { XkbSrvInfoPtr xkbi = keybd->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; xkbi->shiftKeyCount = 0; xkbi->mouseKeysCounter = 0; xkbi->inactiveKey = 0; xkbi->slowKey = 0; xkbi->repeatKey = 0; xkbi->krgTimerActive = _OFF_TIMER; xkbi->beepType = _BEEP_NONE; xkbi->beepCount = 0; xkbi->mouseKeyTimer = NULL; xkbi->slowKeysTimer = NULL; xkbi->bounceKeysTimer = NULL; xkbi->repeatKeyTimer = NULL; xkbi->krgTimer = NULL; xkbi->beepTimer = NULL; xkbi->checkRepeat = NULL; ctrls->repeat_delay = XkbDfltRepeatDelay; ctrls->repeat_interval = XkbDfltRepeatInterval; ctrls->debounce_delay = 300; ctrls->slow_keys_delay = 300; ctrls->mk_delay = 160; ctrls->mk_interval = 40; ctrls->mk_time_to_max = 30; ctrls->mk_max_speed = 30; ctrls->mk_curve = 500; ctrls->mk_dflt_btn = 1; ctrls->ax_timeout = XkbDfltAccessXTimeout; ctrls->axt_ctrls_mask = XkbDfltAccessXTimeoutMask; ctrls->axt_ctrls_values = XkbDfltAccessXTimeoutValues; ctrls->axt_opts_mask = XkbDfltAccessXTimeoutOptionsMask; ctrls->axt_opts_values = XkbDfltAccessXTimeoutOptionsValues; if (XkbDfltAccessXTimeout) ctrls->enabled_ctrls |= XkbAccessXTimeoutMask; else ctrls->enabled_ctrls &= ~XkbAccessXTimeoutMask; ctrls->enabled_ctrls |= XkbDfltAccessXFeedback; ctrls->ax_options = XkbDfltAccessXOptions; AccessXComputeCurveFactor(xkbi, ctrls); return; } /************************************************************************/ /* */ /* AccessXKeyboardEvent */ /* */ /* Generate a synthetic keyboard event. */ /* */ /************************************************************************/ static void AccessXKeyboardEvent(DeviceIntPtr keybd, int type, BYTE keyCode, Bool isRepeat) { DeviceEvent event; init_device_event(&event, keybd, GetTimeInMillis(), EVENT_SOURCE_NORMAL); event.type = type; event.detail.key = keyCode; event.key_repeat = isRepeat; if (xkbDebugFlags & 0x8) { DebugF("[xkb] AXKE: Key %d %s\n", keyCode, (event.type == ET_KeyPress ? "down" : "up")); } XkbProcessKeyboardEvent(&event, keybd); return; } /* AccessXKeyboardEvent */ /************************************************************************/ /* */ /* AccessXKRGTurnOn */ /* */ /* Turn the keyboard response group on. */ /* */ /************************************************************************/ static void AccessXKRGTurnOn(DeviceIntPtr dev, CARD16 KRGControl, xkbControlsNotify * pCN) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; old = *ctrls; ctrls->enabled_ctrls |= (KRGControl & XkbAX_KRGMask); if (XkbComputeControlsNotify(dev, &old, ctrls, pCN, FALSE)) XkbSendControlsNotify(dev, pCN); cause.kc = pCN->keycode; cause.event = pCN->eventType; cause.mjr = pCN->requestMajor; cause.mnr = pCN->requestMinor; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(dev, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) XkbDDXAccessXBeep(dev, _BEEP_FEATURE_ON, KRGControl); return; } /* AccessXKRGTurnOn */ /************************************************************************/ /* */ /* AccessXKRGTurnOff */ /* */ /* Turn the keyboard response group off. */ /* */ /************************************************************************/ static void AccessXKRGTurnOff(DeviceIntPtr dev, xkbControlsNotify * pCN) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; old = *ctrls; ctrls->enabled_ctrls &= ~XkbAX_KRGMask; if (XkbComputeControlsNotify(dev, &old, ctrls, pCN, FALSE)) XkbSendControlsNotify(dev, pCN); cause.kc = pCN->keycode; cause.event = pCN->eventType; cause.mjr = pCN->requestMajor; cause.mnr = pCN->requestMinor; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(dev, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) { unsigned changes = old.enabled_ctrls ^ ctrls->enabled_ctrls; XkbDDXAccessXBeep(dev, _BEEP_FEATURE_OFF, changes); } return; } /* AccessXKRGTurnOff */ /************************************************************************/ /* */ /* AccessXStickyKeysTurnOn */ /* */ /* Turn StickyKeys on. */ /* */ /************************************************************************/ static void AccessXStickyKeysTurnOn(DeviceIntPtr dev, xkbControlsNotify * pCN) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; old = *ctrls; ctrls->enabled_ctrls |= XkbStickyKeysMask; xkbi->shiftKeyCount = 0; if (XkbComputeControlsNotify(dev, &old, ctrls, pCN, FALSE)) XkbSendControlsNotify(dev, pCN); cause.kc = pCN->keycode; cause.event = pCN->eventType; cause.mjr = pCN->requestMajor; cause.mnr = pCN->requestMinor; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(dev, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) { XkbDDXAccessXBeep(dev, _BEEP_FEATURE_ON, XkbStickyKeysMask); } return; } /* AccessXStickyKeysTurnOn */ /************************************************************************/ /* */ /* AccessXStickyKeysTurnOff */ /* */ /* Turn StickyKeys off. */ /* */ /************************************************************************/ static void AccessXStickyKeysTurnOff(DeviceIntPtr dev, xkbControlsNotify * pCN) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; old = *ctrls; ctrls->enabled_ctrls &= ~XkbStickyKeysMask; xkbi->shiftKeyCount = 0; if (XkbComputeControlsNotify(dev, &old, ctrls, pCN, FALSE)) XkbSendControlsNotify(dev, pCN); cause.kc = pCN->keycode; cause.event = pCN->eventType; cause.mjr = pCN->requestMajor; cause.mnr = pCN->requestMinor; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(dev, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) { XkbDDXAccessXBeep(dev, _BEEP_FEATURE_OFF, XkbStickyKeysMask); } #ifndef NO_CLEAR_LATCHES_FOR_STICKY_KEYS_OFF XkbClearAllLatchesAndLocks(dev, xkbi, FALSE, &cause); #endif return; } /* AccessXStickyKeysTurnOff */ static CARD32 AccessXKRGExpire(OsTimerPtr timer, CARD32 now, void *arg) { xkbControlsNotify cn; DeviceIntPtr dev = arg; XkbSrvInfoPtr xkbi = dev->key->xkbInfo; if (xkbi->krgTimerActive == _KRG_WARN_TIMER) { XkbDDXAccessXBeep(dev, _BEEP_SLOW_WARN, XkbStickyKeysMask); xkbi->krgTimerActive = _KRG_TIMER; return 4000; } xkbi->krgTimerActive = _OFF_TIMER; cn.keycode = xkbi->slowKeyEnableKey; cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; if (xkbi->desc->ctrls->enabled_ctrls & XkbSlowKeysMask) { AccessXKRGTurnOff(dev, &cn); LogMessage(X_INFO, "XKB SlowKeys are disabled.\n"); } else { AccessXKRGTurnOn(dev, XkbSlowKeysMask, &cn); LogMessage(X_INFO, "XKB SlowKeys are now enabled. Hold shift to disable.\n"); } xkbi->slowKeyEnableKey = 0; return 0; } static CARD32 AccessXRepeatKeyExpire(OsTimerPtr timer, CARD32 now, void *arg) { DeviceIntPtr dev = (DeviceIntPtr) arg; XkbSrvInfoPtr xkbi = dev->key->xkbInfo; if (xkbi->repeatKey == 0) return 0; if (xkbi->checkRepeat == NULL || xkbi->checkRepeat (dev, xkbi, xkbi->repeatKey)) AccessXKeyboardEvent(dev, ET_KeyPress, xkbi->repeatKey, TRUE); return xkbi->desc->ctrls->repeat_interval; } void AccessXCancelRepeatKey(XkbSrvInfoPtr xkbi, KeyCode key) { if (xkbi->repeatKey == key) xkbi->repeatKey = 0; return; } static CARD32 AccessXSlowKeyExpire(OsTimerPtr timer, CARD32 now, void *arg) { DeviceIntPtr keybd; XkbSrvInfoPtr xkbi; XkbDescPtr xkb; XkbControlsPtr ctrls; keybd = (DeviceIntPtr) arg; xkbi = keybd->key->xkbInfo; xkb = xkbi->desc; ctrls = xkb->ctrls; if (xkbi->slowKey != 0) { xkbAccessXNotify ev; KeySym *sym = XkbKeySymsPtr(xkb, xkbi->slowKey); ev.detail = XkbAXN_SKAccept; ev.keycode = xkbi->slowKey; ev.slowKeysDelay = ctrls->slow_keys_delay; ev.debounceDelay = ctrls->debounce_delay; XkbSendAccessXNotify(keybd, &ev); if (XkbAX_NeedFeedback(ctrls, XkbAX_SKAcceptFBMask)) XkbDDXAccessXBeep(keybd, _BEEP_SLOW_ACCEPT, XkbSlowKeysMask); AccessXKeyboardEvent(keybd, ET_KeyPress, xkbi->slowKey, FALSE); /* check for magic sequences */ if ((ctrls->enabled_ctrls & XkbAccessXKeysMask) && ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L))) xkbi->shiftKeyCount++; /* Start repeating if necessary. Stop autorepeating if the user * presses a non-modifier key that doesn't autorepeat. */ if (keybd->kbdfeed->ctrl.autoRepeat && ((xkbi->slowKey != xkbi->mouseKey) || (!xkbi->mouseKeysAccel)) && (ctrls->enabled_ctrls & XkbRepeatKeysMask)) { if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats, xkbi->slowKey)) { xkbi->repeatKey = xkbi->slowKey; xkbi->repeatKeyTimer = TimerSet(xkbi->repeatKeyTimer, 0, ctrls->repeat_delay, AccessXRepeatKeyExpire, (void *) keybd); } } } return 0; } static CARD32 AccessXBounceKeyExpire(OsTimerPtr timer, CARD32 now, void *arg) { XkbSrvInfoPtr xkbi = ((DeviceIntPtr) arg)->key->xkbInfo; xkbi->inactiveKey = 0; return 0; } static CARD32 AccessXTimeoutExpire(OsTimerPtr timer, CARD32 now, void *arg) { DeviceIntPtr dev = (DeviceIntPtr) arg; XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; xkbControlsNotify cn; XkbEventCauseRec cause; XkbSrvLedInfoPtr sli; if (xkbi->lastPtrEventTime) { unsigned timeToWait = (ctrls->ax_timeout * 1000); unsigned timeElapsed = (now - xkbi->lastPtrEventTime); if (timeToWait > timeElapsed) return timeToWait - timeElapsed; } old = *ctrls; xkbi->shiftKeyCount = 0; ctrls->enabled_ctrls &= ~ctrls->axt_ctrls_mask; ctrls->enabled_ctrls |= (ctrls->axt_ctrls_values & ctrls->axt_ctrls_mask); if (ctrls->axt_opts_mask) { ctrls->ax_options &= ~ctrls->axt_opts_mask; ctrls->ax_options |= (ctrls->axt_opts_values & ctrls->axt_opts_mask); } if (XkbComputeControlsNotify(dev, &old, ctrls, &cn, FALSE)) { cn.keycode = 0; cn.eventType = 0; cn.requestMajor = 0; cn.requestMinor = 0; XkbSendControlsNotify(dev, &cn); } XkbSetCauseUnknown(&cause); sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(dev, sli->usesControls, TRUE, NULL, &cause); if (ctrls->ax_options != old.ax_options) { unsigned set, cleared, bell; set = ctrls->ax_options & (~old.ax_options); cleared = (~ctrls->ax_options) & old.ax_options; if (set && cleared) bell = _BEEP_FEATURE_CHANGE; else if (set) bell = _BEEP_FEATURE_ON; else bell = _BEEP_FEATURE_OFF; XkbDDXAccessXBeep(dev, bell, XkbAccessXTimeoutMask); } xkbi->krgTimerActive = _OFF_TIMER; return 0; } /************************************************************************/ /* */ /* AccessXFilterPressEvent */ /* */ /* Filter events before they get any further if SlowKeys is turned on. */ /* In addition, this routine handles the ever so popular magic key */ /* acts for turning various accessibility features on/off. */ /* */ /* Returns TRUE if this routine has discarded the event. */ /* Returns FALSE if the event needs further processing. */ /* */ /************************************************************************/ Bool AccessXFilterPressEvent(DeviceEvent *event, DeviceIntPtr keybd) { XkbSrvInfoPtr xkbi = keybd->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; Bool ignoreKeyEvent = FALSE; KeyCode key = event->detail.key; KeySym *sym = XkbKeySymsPtr(xkbi->desc, key); if (ctrls->enabled_ctrls & XkbAccessXKeysMask) { /* check for magic sequences */ if ((sym[0] == XK_Shift_R) || (sym[0] == XK_Shift_L)) { xkbi->slowKeyEnableKey = key; if (XkbAX_NeedFeedback(ctrls, XkbAX_SlowWarnFBMask)) { xkbi->krgTimerActive = _KRG_WARN_TIMER; xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 4000, AccessXKRGExpire, (void *) keybd); } else { xkbi->krgTimerActive = _KRG_TIMER; xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 8000, AccessXKRGExpire, (void *) keybd); } if (!(ctrls->enabled_ctrls & XkbSlowKeysMask)) { CARD32 now = GetTimeInMillis(); if ((now - xkbi->lastShiftEventTime) > 15000) xkbi->shiftKeyCount = 1; else xkbi->shiftKeyCount++; xkbi->lastShiftEventTime = now; } } else { if (xkbi->krgTimerActive) { xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 0, NULL, NULL); xkbi->krgTimerActive = _OFF_TIMER; } } } /* Don't transmit the KeyPress if SlowKeys is turned on; * The wakeup handler will synthesize one for us if the user * has held the key long enough. */ if (ctrls->enabled_ctrls & XkbSlowKeysMask) { xkbAccessXNotify ev; /* If key was already pressed, ignore subsequent press events * from the server's autorepeat */ if (xkbi->slowKey == key) return TRUE; ev.detail = XkbAXN_SKPress; ev.keycode = key; ev.slowKeysDelay = ctrls->slow_keys_delay; ev.debounceDelay = ctrls->debounce_delay; XkbSendAccessXNotify(keybd, &ev); if (XkbAX_NeedFeedback(ctrls, XkbAX_SKPressFBMask)) XkbDDXAccessXBeep(keybd, _BEEP_SLOW_PRESS, XkbSlowKeysMask); xkbi->slowKey = key; xkbi->slowKeysTimer = TimerSet(xkbi->slowKeysTimer, 0, ctrls->slow_keys_delay, AccessXSlowKeyExpire, (void *) keybd); ignoreKeyEvent = TRUE; } /* Don't transmit the KeyPress if BounceKeys is turned on * and the user pressed the same key within a given time period * from the last release. */ else if ((ctrls->enabled_ctrls & XkbBounceKeysMask) && (key == xkbi->inactiveKey)) { if (XkbAX_NeedFeedback(ctrls, XkbAX_BKRejectFBMask)) XkbDDXAccessXBeep(keybd, _BEEP_BOUNCE_REJECT, XkbBounceKeysMask); ignoreKeyEvent = TRUE; } /* Start repeating if necessary. Stop autorepeating if the user * presses a non-modifier key that doesn't autorepeat. */ if (XkbDDXUsesSoftRepeat(keybd)) { if ((keybd->kbdfeed->ctrl.autoRepeat) && ((ctrls->enabled_ctrls & (XkbSlowKeysMask | XkbRepeatKeysMask)) == XkbRepeatKeysMask)) { if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats, key)) { if (xkbDebugFlags & 0x10) DebugF("Starting software autorepeat...\n"); if (xkbi->repeatKey == key) ignoreKeyEvent = TRUE; else { xkbi->repeatKey = key; xkbi->repeatKeyTimer = TimerSet(xkbi->repeatKeyTimer, 0, ctrls->repeat_delay, AccessXRepeatKeyExpire, (void *) keybd); } } } } /* Check for two keys being pressed at the same time. This section * essentially says the following: * * If StickyKeys is on, and a modifier is currently being held down, * and one of the following is true: the current key is not a modifier * or the currentKey is a modifier, but not the only modifier being * held down, turn StickyKeys off if the TwoKeys off ctrl is set. */ if ((ctrls->enabled_ctrls & XkbStickyKeysMask) && (xkbi->state.base_mods != 0) && (XkbAX_NeedOption(ctrls, XkbAX_TwoKeysMask))) { xkbControlsNotify cn; cn.keycode = key; cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; AccessXStickyKeysTurnOff(keybd, &cn); } if (!ignoreKeyEvent) XkbProcessKeyboardEvent(event, keybd); return ignoreKeyEvent; } /* AccessXFilterPressEvent */ /************************************************************************/ /* */ /* AccessXFilterReleaseEvent */ /* */ /* Filter events before they get any further if SlowKeys is turned on. */ /* In addition, this routine handles the ever so popular magic key */ /* acts for turning various accessibility features on/off. */ /* */ /* Returns TRUE if this routine has discarded the event. */ /* Returns FALSE if the event needs further processing. */ /* */ /************************************************************************/ Bool AccessXFilterReleaseEvent(DeviceEvent *event, DeviceIntPtr keybd) { XkbSrvInfoPtr xkbi = keybd->key->xkbInfo; XkbControlsPtr ctrls = xkbi->desc->ctrls; KeyCode key = event->detail.key; Bool ignoreKeyEvent = FALSE; /* Don't transmit the KeyRelease if BounceKeys is on and * this is the release of a key that was ignored due to * BounceKeys. */ if (ctrls->enabled_ctrls & XkbBounceKeysMask) { if ((key != xkbi->mouseKey) && (!BitIsOn(keybd->key->down, key))) ignoreKeyEvent = TRUE; xkbi->inactiveKey = key; xkbi->bounceKeysTimer = TimerSet(xkbi->bounceKeysTimer, 0, ctrls->debounce_delay, AccessXBounceKeyExpire, (void *) keybd); } /* Don't transmit the KeyRelease if SlowKeys is turned on and * the user didn't hold the key long enough. We know we passed * the key if the down bit was set by CoreProcessKeyboadEvent. */ if (ctrls->enabled_ctrls & XkbSlowKeysMask) { xkbAccessXNotify ev; unsigned beep_type; unsigned mask; ev.keycode = key; ev.slowKeysDelay = ctrls->slow_keys_delay; ev.debounceDelay = ctrls->debounce_delay; if (BitIsOn(keybd->key->down, key) || (xkbi->mouseKey == key)) { ev.detail = XkbAXN_SKRelease; beep_type = _BEEP_SLOW_RELEASE; mask = XkbAX_SKReleaseFBMask; } else { ev.detail = XkbAXN_SKReject; beep_type = _BEEP_SLOW_REJECT; mask = XkbAX_SKRejectFBMask; ignoreKeyEvent = TRUE; } XkbSendAccessXNotify(keybd, &ev); if (XkbAX_NeedFeedback(ctrls, mask)) { XkbDDXAccessXBeep(keybd, beep_type, XkbSlowKeysMask); } if (xkbi->slowKey == key) xkbi->slowKey = 0; } /* Stop Repeating if the user releases the key that is currently * repeating. */ if (xkbi->repeatKey == key) { xkbi->repeatKey = 0; } if ((ctrls->enabled_ctrls & XkbAccessXTimeoutMask) && (ctrls->ax_timeout > 0)) { xkbi->lastPtrEventTime = 0; xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, ctrls->ax_timeout * 1000, AccessXTimeoutExpire, (void *) keybd); xkbi->krgTimerActive = _ALL_TIMEOUT_TIMER; } else if (xkbi->krgTimerActive != _OFF_TIMER) { xkbi->krgTimer = TimerSet(xkbi->krgTimer, 0, 0, NULL, NULL); xkbi->krgTimerActive = _OFF_TIMER; } /* Keep track of how many times the Shift key has been pressed. * If it has been pressed and released 5 times in a row, toggle * the state of StickyKeys. */ if ((!ignoreKeyEvent) && (xkbi->shiftKeyCount)) { KeySym *pSym = XkbKeySymsPtr(xkbi->desc, key); if ((pSym[0] != XK_Shift_L) && (pSym[0] != XK_Shift_R)) { xkbi->shiftKeyCount = 0; } else if (xkbi->shiftKeyCount >= 5) { xkbControlsNotify cn; cn.keycode = key; cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; if (ctrls->enabled_ctrls & XkbStickyKeysMask) AccessXStickyKeysTurnOff(keybd, &cn); else AccessXStickyKeysTurnOn(keybd, &cn); xkbi->shiftKeyCount = 0; } } if (!ignoreKeyEvent) XkbProcessKeyboardEvent(event, keybd); return ignoreKeyEvent; } /* AccessXFilterReleaseEvent */ /************************************************************************/ /* */ /* ProcessPointerEvent */ /* */ /* This routine merely sets the shiftKeyCount and clears the keyboard */ /* response group timer (if necessary) on a mouse event. This is so */ /* multiple shifts with just the mouse and shift-drags with the mouse */ /* don't accidentally turn on StickyKeys or the Keyboard Response Group.*/ /* */ /************************************************************************/ extern int xkbDevicePrivateIndex; void ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) { DeviceIntPtr dev; XkbSrvInfoPtr xkbi = NULL; unsigned changed = 0; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); DeviceEvent *event = &ev->device_event; dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); if (dev && dev->key) { xkbi = dev->key->xkbInfo; xkbi->shiftKeyCount = 0; xkbi->lastPtrEventTime = event->time; } if (event->type == ET_ButtonPress) { changed |= XkbPointerButtonMask; } else if (event->type == ET_ButtonRelease) { if (IsMaster(dev)) { DeviceIntPtr source; int rc; rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess); if (rc != Success) ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid); else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) { DeviceIntPtr xtest_device; xtest_device = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); if (button_is_down(xtest_device, ev->device_event.detail.button, BUTTON_PROCESSED)) XkbFakeDeviceButton(dev, FALSE, event->detail.key); } } if (xkbi) xkbi->lockedPtrButtons &= ~(1 << (event->detail.key & 0x7)); changed |= XkbPointerButtonMask; } UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc); mouse->public.processInputProc(ev, mouse); COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc, xkbUnwrapProc); if (!xkbi) return; xkbi->state.ptr_buttons = (mouse->button) ? mouse->button->state : 0; /* clear any latched modifiers */ if (xkbi->state.latched_mods && (event->type == ET_ButtonRelease)) { unsigned changed_leds; XkbStateRec oldState; XkbSrvLedInfoPtr sli; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); oldState = xkbi->state; XkbLatchModifiers(dev, 0xFF, 0x00); XkbComputeDerivedState(xkbi); changed |= XkbStateChangedFlags(&oldState, &xkbi->state); if (changed & sli->usedComponents) { changed_leds = XkbIndicatorsToUpdate(dev, changed, FALSE); if (changed_leds) { XkbEventCauseRec cause; XkbSetCauseKey(&cause, (event->detail.key & 0x7), event->type); XkbUpdateIndicators(dev, changed_leds, TRUE, NULL, &cause); } } } if (((xkbi->flags & _XkbStateNotifyInProgress) == 0) && (changed != 0)) { xkbStateNotify sn; sn.keycode = event->detail.key; sn.eventType = event->type; sn.requestMajor = sn.requestMinor = 0; sn.changed = changed; XkbSendStateNotify(dev, &sn); } } /* ProcessPointerEvent */ xorg-server-21.1.16/xkb/xkbSwap.c0000644000175000017500000003416514757411105012213 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include "stdio.h" #include #include #include "misc.h" #include "inputstr.h" #include #include "xkbstr.h" #include "extnsionst.h" #include "xkb.h" /* * REQUEST SWAPPING */ static int _X_COLD SProcXkbUseExtension(ClientPtr client) { REQUEST(xkbUseExtensionReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbUseExtensionReq); swaps(&stuff->wantedMajor); swaps(&stuff->wantedMinor); return ProcXkbUseExtension(client); } static int _X_COLD SProcXkbSelectEvents(ClientPtr client) { REQUEST(xkbSelectEventsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq); swaps(&stuff->deviceSpec); swaps(&stuff->affectWhich); swaps(&stuff->clear); swaps(&stuff->selectAll); swaps(&stuff->affectMap); swaps(&stuff->map); if ((stuff->affectWhich & (~XkbMapNotifyMask)) != 0) { union { BOOL *b; CARD8 *c8; CARD16 *c16; CARD32 *c32; } from; register unsigned bit, ndx, maskLeft, dataLeft, size; from.c8 = (CARD8 *) &stuff[1]; dataLeft = (client->req_len * 4) - SIZEOF(xkbSelectEventsReq); maskLeft = (stuff->affectWhich & (~XkbMapNotifyMask)); for (ndx = 0, bit = 1; (maskLeft != 0); ndx++, bit <<= 1) { if (((bit & maskLeft) == 0) || (ndx == XkbMapNotify)) continue; maskLeft &= ~bit; if ((stuff->selectAll & bit) || (stuff->clear & bit)) continue; switch (ndx) { case XkbNewKeyboardNotify: case XkbStateNotify: case XkbNamesNotify: case XkbAccessXNotify: case XkbExtensionDeviceNotify: size = 2; break; case XkbControlsNotify: case XkbIndicatorStateNotify: case XkbIndicatorMapNotify: size = 4; break; case XkbBellNotify: case XkbActionMessage: case XkbCompatMapNotify: size = 1; break; default: client->errorValue = _XkbErrCode2(0x1, bit); return BadValue; } if (dataLeft < (size * 2)) return BadLength; if (size == 2) { swaps(&from.c16[0]); swaps(&from.c16[1]); } else if (size == 4) { swapl(&from.c32[0]); swapl(&from.c32[1]); } else { size = 2; } from.c8 += (size * 2); dataLeft -= (size * 2); } if (dataLeft > 2) { ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n", dataLeft); return BadLength; } } return ProcXkbSelectEvents(client); } static int _X_COLD SProcXkbBell(ClientPtr client) { REQUEST(xkbBellReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbBellReq); swaps(&stuff->deviceSpec); swaps(&stuff->bellClass); swaps(&stuff->bellID); swapl(&stuff->name); swapl(&stuff->window); swaps(&stuff->pitch); swaps(&stuff->duration); return ProcXkbBell(client); } static int _X_COLD SProcXkbGetState(ClientPtr client) { REQUEST(xkbGetStateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetStateReq); swaps(&stuff->deviceSpec); return ProcXkbGetState(client); } static int _X_COLD SProcXkbLatchLockState(ClientPtr client) { REQUEST(xkbLatchLockStateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbLatchLockStateReq); swaps(&stuff->deviceSpec); swaps(&stuff->groupLatch); return ProcXkbLatchLockState(client); } static int _X_COLD SProcXkbGetControls(ClientPtr client) { REQUEST(xkbGetControlsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetControlsReq); swaps(&stuff->deviceSpec); return ProcXkbGetControls(client); } static int _X_COLD SProcXkbSetControls(ClientPtr client) { REQUEST(xkbSetControlsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbSetControlsReq); swaps(&stuff->deviceSpec); swaps(&stuff->affectInternalVMods); swaps(&stuff->internalVMods); swaps(&stuff->affectIgnoreLockVMods); swaps(&stuff->ignoreLockVMods); swaps(&stuff->axOptions); swapl(&stuff->affectEnabledCtrls); swapl(&stuff->enabledCtrls); swapl(&stuff->changeCtrls); swaps(&stuff->repeatDelay); swaps(&stuff->repeatInterval); swaps(&stuff->slowKeysDelay); swaps(&stuff->debounceDelay); swaps(&stuff->mkDelay); swaps(&stuff->mkInterval); swaps(&stuff->mkTimeToMax); swaps(&stuff->mkMaxSpeed); swaps(&stuff->mkCurve); swaps(&stuff->axTimeout); swapl(&stuff->axtCtrlsMask); swapl(&stuff->axtCtrlsValues); swaps(&stuff->axtOptsMask); swaps(&stuff->axtOptsValues); return ProcXkbSetControls(client); } static int _X_COLD SProcXkbGetMap(ClientPtr client) { REQUEST(xkbGetMapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetMapReq); swaps(&stuff->deviceSpec); swaps(&stuff->full); swaps(&stuff->partial); swaps(&stuff->virtualMods); return ProcXkbGetMap(client); } static int _X_COLD SProcXkbSetMap(ClientPtr client) { REQUEST(xkbSetMapReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetMapReq); swaps(&stuff->deviceSpec); swaps(&stuff->present); swaps(&stuff->flags); swaps(&stuff->totalSyms); swaps(&stuff->totalActs); swaps(&stuff->virtualMods); return ProcXkbSetMap(client); } static int _X_COLD SProcXkbGetCompatMap(ClientPtr client) { REQUEST(xkbGetCompatMapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetCompatMapReq); swaps(&stuff->deviceSpec); swaps(&stuff->firstSI); swaps(&stuff->nSI); return ProcXkbGetCompatMap(client); } static int _X_COLD SProcXkbSetCompatMap(ClientPtr client) { REQUEST(xkbSetCompatMapReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetCompatMapReq); swaps(&stuff->deviceSpec); swaps(&stuff->firstSI); swaps(&stuff->nSI); return ProcXkbSetCompatMap(client); } static int _X_COLD SProcXkbGetIndicatorState(ClientPtr client) { REQUEST(xkbGetIndicatorStateReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetIndicatorStateReq); swaps(&stuff->deviceSpec); return ProcXkbGetIndicatorState(client); } static int _X_COLD SProcXkbGetIndicatorMap(ClientPtr client) { REQUEST(xkbGetIndicatorMapReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq); swaps(&stuff->deviceSpec); swapl(&stuff->which); return ProcXkbGetIndicatorMap(client); } static int _X_COLD SProcXkbSetIndicatorMap(ClientPtr client) { REQUEST(xkbSetIndicatorMapReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetIndicatorMapReq); swaps(&stuff->deviceSpec); swapl(&stuff->which); return ProcXkbSetIndicatorMap(client); } static int _X_COLD SProcXkbGetNamedIndicator(ClientPtr client) { REQUEST(xkbGetNamedIndicatorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetNamedIndicatorReq); swaps(&stuff->deviceSpec); swaps(&stuff->ledClass); swaps(&stuff->ledID); swapl(&stuff->indicator); return ProcXkbGetNamedIndicator(client); } static int _X_COLD SProcXkbSetNamedIndicator(ClientPtr client) { REQUEST(xkbSetNamedIndicatorReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbSetNamedIndicatorReq); swaps(&stuff->deviceSpec); swaps(&stuff->ledClass); swaps(&stuff->ledID); swapl(&stuff->indicator); swaps(&stuff->virtualMods); swapl(&stuff->ctrls); return ProcXkbSetNamedIndicator(client); } static int _X_COLD SProcXkbGetNames(ClientPtr client) { REQUEST(xkbGetNamesReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetNamesReq); swaps(&stuff->deviceSpec); swapl(&stuff->which); return ProcXkbGetNames(client); } static int _X_COLD SProcXkbSetNames(ClientPtr client) { REQUEST(xkbSetNamesReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetNamesReq); swaps(&stuff->deviceSpec); swaps(&stuff->virtualMods); swapl(&stuff->which); swapl(&stuff->indicators); swaps(&stuff->totalKTLevelNames); return ProcXkbSetNames(client); } static int _X_COLD SProcXkbGetGeometry(ClientPtr client) { REQUEST(xkbGetGeometryReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetGeometryReq); swaps(&stuff->deviceSpec); swapl(&stuff->name); return ProcXkbGetGeometry(client); } static int _X_COLD SProcXkbSetGeometry(ClientPtr client) { REQUEST(xkbSetGeometryReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetGeometryReq); swaps(&stuff->deviceSpec); swapl(&stuff->name); swaps(&stuff->widthMM); swaps(&stuff->heightMM); swaps(&stuff->nProperties); swaps(&stuff->nColors); swaps(&stuff->nDoodads); swaps(&stuff->nKeyAliases); return ProcXkbSetGeometry(client); } static int _X_COLD SProcXkbPerClientFlags(ClientPtr client) { REQUEST(xkbPerClientFlagsReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbPerClientFlagsReq); swaps(&stuff->deviceSpec); swapl(&stuff->change); swapl(&stuff->value); swapl(&stuff->ctrlsToChange); swapl(&stuff->autoCtrls); swapl(&stuff->autoCtrlValues); return ProcXkbPerClientFlags(client); } static int _X_COLD SProcXkbListComponents(ClientPtr client) { REQUEST(xkbListComponentsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbListComponentsReq); swaps(&stuff->deviceSpec); swaps(&stuff->maxNames); return ProcXkbListComponents(client); } static int _X_COLD SProcXkbGetKbdByName(ClientPtr client) { REQUEST(xkbGetKbdByNameReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbGetKbdByNameReq); swaps(&stuff->deviceSpec); swaps(&stuff->want); swaps(&stuff->need); return ProcXkbGetKbdByName(client); } static int _X_COLD SProcXkbGetDeviceInfo(ClientPtr client) { REQUEST(xkbGetDeviceInfoReq); swaps(&stuff->length); REQUEST_SIZE_MATCH(xkbGetDeviceInfoReq); swaps(&stuff->deviceSpec); swaps(&stuff->wanted); swaps(&stuff->ledClass); swaps(&stuff->ledID); return ProcXkbGetDeviceInfo(client); } static int _X_COLD SProcXkbSetDeviceInfo(ClientPtr client) { REQUEST(xkbSetDeviceInfoReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetDeviceInfoReq); swaps(&stuff->deviceSpec); swaps(&stuff->change); swaps(&stuff->nDeviceLedFBs); return ProcXkbSetDeviceInfo(client); } static int _X_COLD SProcXkbSetDebuggingFlags(ClientPtr client) { REQUEST(xkbSetDebuggingFlagsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSetDebuggingFlagsReq); swapl(&stuff->affectFlags); swapl(&stuff->flags); swapl(&stuff->affectCtrls); swapl(&stuff->ctrls); swaps(&stuff->msgLength); return ProcXkbSetDebuggingFlags(client); } int _X_COLD SProcXkbDispatch(ClientPtr client) { REQUEST(xReq); switch (stuff->data) { case X_kbUseExtension: return SProcXkbUseExtension(client); case X_kbSelectEvents: return SProcXkbSelectEvents(client); case X_kbBell: return SProcXkbBell(client); case X_kbGetState: return SProcXkbGetState(client); case X_kbLatchLockState: return SProcXkbLatchLockState(client); case X_kbGetControls: return SProcXkbGetControls(client); case X_kbSetControls: return SProcXkbSetControls(client); case X_kbGetMap: return SProcXkbGetMap(client); case X_kbSetMap: return SProcXkbSetMap(client); case X_kbGetCompatMap: return SProcXkbGetCompatMap(client); case X_kbSetCompatMap: return SProcXkbSetCompatMap(client); case X_kbGetIndicatorState: return SProcXkbGetIndicatorState(client); case X_kbGetIndicatorMap: return SProcXkbGetIndicatorMap(client); case X_kbSetIndicatorMap: return SProcXkbSetIndicatorMap(client); case X_kbGetNamedIndicator: return SProcXkbGetNamedIndicator(client); case X_kbSetNamedIndicator: return SProcXkbSetNamedIndicator(client); case X_kbGetNames: return SProcXkbGetNames(client); case X_kbSetNames: return SProcXkbSetNames(client); case X_kbGetGeometry: return SProcXkbGetGeometry(client); case X_kbSetGeometry: return SProcXkbSetGeometry(client); case X_kbPerClientFlags: return SProcXkbPerClientFlags(client); case X_kbListComponents: return SProcXkbListComponents(client); case X_kbGetKbdByName: return SProcXkbGetKbdByName(client); case X_kbGetDeviceInfo: return SProcXkbGetDeviceInfo(client); case X_kbSetDeviceInfo: return SProcXkbSetDeviceInfo(client); case X_kbSetDebuggingFlags: return SProcXkbSetDebuggingFlags(client); default: return BadRequest; } } xorg-server-21.1.16/xkb/xkbLEDs.c0000644000175000017500000010265414757411105012067 /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include #include #include "xkb.h" /***====================================================================***/ /* * unsigned * XkbIndicatorsToUpdate(dev,changed,check_devs_rtrn) * * Given a keyboard and a set of state components that have changed, * this function returns the indicators on the default keyboard * feedback that might be affected. It also reports whether or not * any extension devices might be affected in check_devs_rtrn. */ unsigned XkbIndicatorsToUpdate(DeviceIntPtr dev, unsigned long state_changes, Bool enable_changes) { register unsigned update = 0; XkbSrvLedInfoPtr sli; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); if (!sli) return update; if (state_changes & (XkbModifierStateMask | XkbGroupStateMask)) update |= sli->usesEffective; if (state_changes & (XkbModifierBaseMask | XkbGroupBaseMask)) update |= sli->usesBase; if (state_changes & (XkbModifierLatchMask | XkbGroupLatchMask)) update |= sli->usesLatched; if (state_changes & (XkbModifierLockMask | XkbGroupLockMask)) update |= sli->usesLocked; if (state_changes & XkbCompatStateMask) update |= sli->usesCompat; if (enable_changes) update |= sli->usesControls; return update; } /***====================================================================***/ /* * Bool *XkbApplyLEDChangeToKeyboard(xkbi,map,on,change) * * Some indicators "drive" the keyboard when their state is explicitly * changed, as described in section 9.2.1 of the XKB protocol spec. * This function updates the state and controls for the keyboard * specified by 'xkbi' to reflect any changes that are required * when the indicator described by 'map' is turned on or off. The * extent of the changes is reported in change, which must be defined. */ static Bool XkbApplyLEDChangeToKeyboard(XkbSrvInfoPtr xkbi, XkbIndicatorMapPtr map, Bool on, XkbChangesPtr change) { Bool ctrlChange, stateChange; XkbStatePtr state; if ((map->flags & XkbIM_NoExplicit) || ((map->flags & XkbIM_LEDDrivesKB) == 0)) return FALSE; ctrlChange = stateChange = FALSE; if (map->ctrls) { XkbControlsPtr ctrls = xkbi->desc->ctrls; unsigned old; old = ctrls->enabled_ctrls; if (on) ctrls->enabled_ctrls |= map->ctrls; else ctrls->enabled_ctrls &= ~map->ctrls; if (old != ctrls->enabled_ctrls) { change->ctrls.changed_ctrls = XkbControlsEnabledMask; change->ctrls.enabled_ctrls_changes = old ^ ctrls->enabled_ctrls; ctrlChange = TRUE; } } state = &xkbi->state; if ((map->groups) && ((map->which_groups & (~XkbIM_UseBase)) != 0)) { register int i; register unsigned bit, match; if (on) match = (map->groups) & XkbAllGroupsMask; else match = (~map->groups) & XkbAllGroupsMask; if (map->which_groups & (XkbIM_UseLocked | XkbIM_UseEffective)) { for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (bit & match) break; } if (map->which_groups & XkbIM_UseLatched) XkbLatchGroup(xkbi->device, 0); /* unlatch group */ state->locked_group = i; stateChange = TRUE; } else if (map->which_groups & (XkbIM_UseLatched | XkbIM_UseEffective)) { for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { if (bit & match) break; } state->locked_group = 0; XkbLatchGroup(xkbi->device, i); stateChange = TRUE; } } if ((map->mods.mask) && ((map->which_mods & (~XkbIM_UseBase)) != 0)) { if (map->which_mods & (XkbIM_UseLocked | XkbIM_UseEffective)) { register unsigned long old; old = state->locked_mods; if (on) state->locked_mods |= map->mods.mask; else state->locked_mods &= ~map->mods.mask; if (state->locked_mods != old) stateChange = TRUE; } if (map->which_mods & (XkbIM_UseLatched | XkbIM_UseEffective)) { register unsigned long newmods; newmods = state->latched_mods; if (on) newmods |= map->mods.mask; else newmods &= ~map->mods.mask; if (newmods != state->locked_mods) { newmods &= map->mods.mask; XkbLatchModifiers(xkbi->device, map->mods.mask, newmods); stateChange = TRUE; } } } return stateChange || ctrlChange; } /* * Bool * ComputeAutoState(map,state,ctrls) * * This function reports the effect of applying the specified * indicator map given the specified state and controls, as * described in section 9.2 of the XKB protocol specification. */ static Bool ComputeAutoState(XkbIndicatorMapPtr map, XkbStatePtr state, XkbControlsPtr ctrls) { Bool on; CARD8 mods, group; on = FALSE; mods = group = 0; if (map->which_mods & XkbIM_UseAnyMods) { if (map->which_mods & XkbIM_UseBase) mods |= state->base_mods; if (map->which_mods & XkbIM_UseLatched) mods |= state->latched_mods; if (map->which_mods & XkbIM_UseLocked) mods |= state->locked_mods; if (map->which_mods & XkbIM_UseEffective) mods |= state->mods; if (map->which_mods & XkbIM_UseCompat) mods |= state->compat_state; on = ((map->mods.mask & mods) != 0); on = on || ((mods == 0) && (map->mods.mask == 0) && (map->mods.vmods == 0)); } if (map->which_groups & XkbIM_UseAnyGroup) { if (map->which_groups & XkbIM_UseBase) group |= (1L << state->base_group); if (map->which_groups & XkbIM_UseLatched) group |= (1L << state->latched_group); if (map->which_groups & XkbIM_UseLocked) group |= (1L << state->locked_group); if (map->which_groups & XkbIM_UseEffective) group |= (1L << state->group); on = on || (((map->groups & group) != 0) || (map->groups == 0)); } if (map->ctrls) on = on || (ctrls->enabled_ctrls & map->ctrls); return on; } static void XkbUpdateLedAutoState(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, unsigned maps_to_check, xkbExtensionDeviceNotify * ed, XkbChangesPtr changes, XkbEventCausePtr cause) { DeviceIntPtr kbd; XkbStatePtr state; XkbControlsPtr ctrls; XkbChangesRec my_changes; xkbExtensionDeviceNotify my_ed; register unsigned i, bit, affected; register XkbIndicatorMapPtr map; unsigned oldState; if ((maps_to_check == 0) || (sli->maps == NULL) || (sli->mapsPresent == 0)) return; if (dev->key && dev->key->xkbInfo) kbd = dev; else kbd = inputInfo.keyboard; state = &kbd->key->xkbInfo->state; ctrls = kbd->key->xkbInfo->desc->ctrls; affected = maps_to_check; oldState = sli->effectiveState; sli->autoState &= ~affected; for (i = 0, bit = 1; (i < XkbNumIndicators) && (affected); i++, bit <<= 1) { if ((affected & bit) == 0) continue; affected &= ~bit; map = &sli->maps[i]; if ((!(map->flags & XkbIM_NoAutomatic)) && ComputeAutoState(map, state, ctrls)) sli->autoState |= bit; } sli->effectiveState = (sli->autoState | sli->explicitState); affected = sli->effectiveState ^ oldState; if (affected == 0) return; if (ed == NULL) { ed = &my_ed; memset((char *) ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason & XkbXI_IndicatorsMask) && ((ed->ledClass != sli->class) || (ed->ledID != sli->id))) { XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); } if ((kbd == dev) && (sli->flags & XkbSLI_IsDefault)) { if (changes == NULL) { changes = &my_changes; memset((char *) changes, 0, sizeof(XkbChangesRec)); } changes->indicators.state_changes |= affected; } ed->reason |= XkbXI_IndicatorStateMask; ed->ledClass = sli->class; ed->ledID = sli->id; ed->ledsDefined = sli->namesPresent | sli->mapsPresent; ed->ledState = sli->effectiveState; ed->unsupported = 0; ed->supported = XkbXI_AllFeaturesMask; if (changes != &my_changes) changes = NULL; if (ed != &my_ed) ed = NULL; if (changes || ed) XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); return; } void XkbUpdateAllDeviceIndicators(XkbChangesPtr changes, XkbEventCausePtr cause) { DeviceIntPtr edev; XkbSrvLedInfoPtr sli; for (edev = inputInfo.devices; edev != NULL; edev = edev->next) { if (edev->kbdfeed) { KbdFeedbackPtr kf; for (kf = edev->kbdfeed; kf != NULL; kf = kf->next) { if ((kf->xkb_sli == NULL) || (kf->xkb_sli->maps == NULL)) continue; sli = kf->xkb_sli; XkbUpdateLedAutoState(edev, sli, sli->mapsPresent, NULL, changes, cause); } } if (edev->leds) { LedFeedbackPtr lf; for (lf = edev->leds; lf != NULL; lf = lf->next) { if ((lf->xkb_sli == NULL) || (lf->xkb_sli->maps == NULL)) continue; sli = lf->xkb_sli; XkbUpdateLedAutoState(edev, sli, sli->mapsPresent, NULL, changes, cause); } } } return; } /***====================================================================***/ /* * void * XkbSetIndicators(dev,affect,values,cause) * * Attempts to change the indicators specified in 'affect' to the * states specified in 'values' for the default keyboard feedback * on the keyboard specified by 'dev.' Attempts to change indicator * state might be ignored or have no affect, depending on the XKB * indicator map for any affected indicators, as described in section * 9.2 of the XKB protocol specification. * * If 'changes' is non-NULL, this function notes any changes to the * keyboard state, controls, or indicator state that result from this * attempted change. If 'changes' is NULL, this function generates * XKB events to report any such changes to interested clients. * * If 'cause' is non-NULL, it specifies the reason for the change, * as reported in some XKB events. If it is NULL, this function * assumes that the change is the result of a core protocol * ChangeKeyboardMapping request. */ void XkbSetIndicators(DeviceIntPtr dev, CARD32 affect, CARD32 values, XkbEventCausePtr cause) { XkbSrvLedInfoPtr sli; XkbChangesRec changes; xkbExtensionDeviceNotify ed; unsigned side_affected; memset((char *) &changes, 0, sizeof(XkbChangesRec)); memset((char *) &ed, 0, sizeof(xkbExtensionDeviceNotify)); sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); sli->explicitState &= ~affect; sli->explicitState |= (affect & values); XkbApplyLedStateChanges(dev, sli, affect, &ed, &changes, cause); side_affected = 0; if (changes.state_changes != 0) side_affected |= XkbIndicatorsToUpdate(dev, changes.state_changes, FALSE); if (changes.ctrls.enabled_ctrls_changes) side_affected |= sli->usesControls; if (side_affected) { XkbUpdateLedAutoState(dev, sli, side_affected, &ed, &changes, cause); affect |= side_affected; } if (changes.state_changes || changes.ctrls.enabled_ctrls_changes) XkbUpdateAllDeviceIndicators(NULL, cause); XkbFlushLedEvents(dev, dev, sli, &ed, &changes, cause); return; } /***====================================================================***/ /***====================================================================***/ /* * void * XkbUpdateIndicators(dev,update,check_edevs,changes,cause) * * Applies the indicator maps for any indicators specified in * 'update' from the default keyboard feedback on the device * specified by 'dev.' * * If 'changes' is NULL, this function generates and XKB events * required to report the necessary changes, otherwise it simply * notes the indicators with changed state. * * If 'check_edevs' is TRUE, this function also checks the indicator * maps for any open extension devices that have them, and updates * the state of any extension device indicators as necessary. */ void XkbUpdateIndicators(DeviceIntPtr dev, register CARD32 update, Bool check_edevs, XkbChangesPtr changes, XkbEventCausePtr cause) { XkbSrvLedInfoPtr sli; sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateLedAutoState(dev, sli, update, NULL, changes, cause); if (check_edevs) XkbUpdateAllDeviceIndicators(changes, cause); return; } /***====================================================================***/ /***====================================================================***/ /* * void * XkbCheckIndicatorMaps(dev,sli,which) * * Updates the 'indicator accelerators' for the indicators specified * by 'which' in the feedback specified by 'sli.' The indicator * accelerators are internal to the server and are used to simplify * and speed up the process of figuring out which indicators might * be affected by a particular change in keyboard state or controls. */ void XkbCheckIndicatorMaps(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, unsigned which) { register unsigned i, bit; XkbIndicatorMapPtr map; XkbDescPtr xkb; if ((sli->flags & XkbSLI_HasOwnState) == 0) return; sli->usesBase &= ~which; sli->usesLatched &= ~which; sli->usesLocked &= ~which; sli->usesEffective &= ~which; sli->usesCompat &= ~which; sli->usesControls &= ~which; sli->mapsPresent &= ~which; xkb = dev->key->xkbInfo->desc; for (i = 0, bit = 1, map = sli->maps; i < XkbNumIndicators; i++, bit <<= 1, map++) { if (which & bit) { CARD8 what; if (!map || !XkbIM_InUse(map)) continue; sli->mapsPresent |= bit; what = (map->which_mods | map->which_groups); if (what & XkbIM_UseBase) sli->usesBase |= bit; if (what & XkbIM_UseLatched) sli->usesLatched |= bit; if (what & XkbIM_UseLocked) sli->usesLocked |= bit; if (what & XkbIM_UseEffective) sli->usesEffective |= bit; if (what & XkbIM_UseCompat) sli->usesCompat |= bit; if (map->ctrls) sli->usesControls |= bit; map->mods.mask = map->mods.real_mods; if (map->mods.vmods != 0) { map->mods.mask |= XkbMaskForVMask(xkb, map->mods.vmods); } } } sli->usedComponents = 0; if (sli->usesBase) sli->usedComponents |= XkbModifierBaseMask | XkbGroupBaseMask; if (sli->usesLatched) sli->usedComponents |= XkbModifierLatchMask | XkbGroupLatchMask; if (sli->usesLocked) sli->usedComponents |= XkbModifierLockMask | XkbGroupLockMask; if (sli->usesEffective) sli->usedComponents |= XkbModifierStateMask | XkbGroupStateMask; if (sli->usesCompat) sli->usedComponents |= XkbCompatStateMask; return; } /***====================================================================***/ /* * XkbSrvLedInfoPtr * XkbAllocSrvLedInfo(dev,kf,lf,needed_parts) * * Allocates an XkbSrvLedInfoPtr for the feedback specified by either * 'kf' or 'lf' on the keyboard specified by 'dev.' * * If 'needed_parts' is non-zero, this function makes sure that any * of the parts speicified therein are allocated. */ XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr dev, KbdFeedbackPtr kf, LedFeedbackPtr lf, unsigned needed_parts) { XkbSrvLedInfoPtr sli; Bool checkAccel; Bool checkNames; sli = NULL; checkAccel = checkNames = FALSE; if ((kf != NULL) && (kf->xkb_sli == NULL)) { kf->xkb_sli = sli = calloc(1, sizeof(XkbSrvLedInfoRec)); if (sli == NULL) return NULL; /* ALLOCATION ERROR */ if (dev->key && dev->key->xkbInfo) sli->flags = XkbSLI_HasOwnState; else sli->flags = 0; sli->class = KbdFeedbackClass; sli->id = kf->ctrl.id; sli->fb.kf = kf; sli->autoState = 0; sli->explicitState = kf->ctrl.leds; sli->effectiveState = kf->ctrl.leds; if ((kf == dev->kbdfeed) && (dev->key) && (dev->key->xkbInfo)) { XkbDescPtr xkb; xkb = dev->key->xkbInfo->desc; sli->flags |= XkbSLI_IsDefault; sli->physIndicators = xkb->indicators->phys_indicators; sli->names = xkb->names->indicators; sli->maps = xkb->indicators->maps; checkNames = checkAccel = TRUE; } else { sli->physIndicators = XkbAllIndicatorsMask; sli->names = NULL; sli->maps = NULL; } } else if ((kf != NULL) && ((kf->xkb_sli->flags & XkbSLI_IsDefault) != 0)) { XkbDescPtr xkb; xkb = dev->key->xkbInfo->desc; sli = kf->xkb_sli; sli->physIndicators = xkb->indicators->phys_indicators; if (xkb->names->indicators != sli->names) { checkNames = TRUE; sli->names = xkb->names->indicators; } if (xkb->indicators->maps != sli->maps) { checkAccel = TRUE; sli->maps = xkb->indicators->maps; } } else if ((lf != NULL) && (lf->xkb_sli == NULL)) { lf->xkb_sli = sli = calloc(1, sizeof(XkbSrvLedInfoRec)); if (sli == NULL) return NULL; /* ALLOCATION ERROR */ if (dev->key && dev->key->xkbInfo) sli->flags = XkbSLI_HasOwnState; else sli->flags = 0; sli->class = LedFeedbackClass; sli->id = lf->ctrl.id; sli->fb.lf = lf; sli->physIndicators = lf->ctrl.led_mask; sli->autoState = 0; sli->explicitState = lf->ctrl.led_values; sli->effectiveState = lf->ctrl.led_values; sli->maps = NULL; sli->names = NULL; } else return NULL; if ((sli->names == NULL) && (needed_parts & XkbXI_IndicatorNamesMask)) sli->names = calloc(XkbNumIndicators, sizeof(Atom)); if ((sli->maps == NULL) && (needed_parts & XkbXI_IndicatorMapsMask)) sli->maps = calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); if (checkNames) { register unsigned i, bit; sli->namesPresent = 0; for (i = 0, bit = 1; i < XkbNumIndicators; i++, bit <<= 1) { if (sli->names[i] != None) sli->namesPresent |= bit; } } if (checkAccel) XkbCheckIndicatorMaps(dev, sli, XkbAllIndicatorsMask); return sli; } void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli) { if ((sli->flags & XkbSLI_IsDefault) == 0) { free(sli->maps); free(sli->names); } sli->maps = NULL; sli->names = NULL; free(sli); return; } /* * XkbSrvLedInfoPtr * XkbCopySrvLedInfo(dev,src,kf,lf) * * Takes the given XkbSrvLedInfoPtr and duplicates it. A deep copy is made, * thus the new copy behaves like the original one and can be freed with * XkbFreeSrvLedInfo. */ XkbSrvLedInfoPtr XkbCopySrvLedInfo(DeviceIntPtr from, XkbSrvLedInfoPtr src, KbdFeedbackPtr kf, LedFeedbackPtr lf) { XkbSrvLedInfoPtr sli_new = NULL; if (!src) goto finish; sli_new = calloc(1, sizeof(XkbSrvLedInfoRec)); if (!sli_new) goto finish; memcpy(sli_new, src, sizeof(XkbSrvLedInfoRec)); if (sli_new->class == KbdFeedbackClass) sli_new->fb.kf = kf; else sli_new->fb.lf = lf; if (!(sli_new->flags & XkbSLI_IsDefault)) { sli_new->names = calloc(XkbNumIndicators, sizeof(Atom)); sli_new->maps = calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); } /* else sli_new->names/maps is pointing to dev->key->xkbInfo->desc->names->indicators; dev->key->xkbInfo->desc->names->indicators; */ finish: return sli_new; } /***====================================================================***/ /* * XkbSrvLedInfoPtr * XkbFindSrvLedInfo(dev,class,id,needed_parts) * * Finds the XkbSrvLedInfoPtr for the specified 'class' and 'id' * on the device specified by 'dev.' If the class and id specify * a valid device feedback, this function returns the existing * feedback or allocates a new one. * */ XkbSrvLedInfoPtr XkbFindSrvLedInfo(DeviceIntPtr dev, unsigned class, unsigned id, unsigned needed_parts) { XkbSrvLedInfoPtr sli; /* optimization to check for most common case */ if (((class == XkbDfltXIClass) && (id == XkbDfltXIId)) && (dev->kbdfeed)) { if (dev->kbdfeed->xkb_sli == NULL) { dev->kbdfeed->xkb_sli = XkbAllocSrvLedInfo(dev, dev->kbdfeed, NULL, needed_parts); } return dev->kbdfeed->xkb_sli; } sli = NULL; if (class == XkbDfltXIClass) { if (dev->kbdfeed) class = KbdFeedbackClass; else if (dev->leds) class = LedFeedbackClass; else return NULL; } if (class == KbdFeedbackClass) { KbdFeedbackPtr kf; for (kf = dev->kbdfeed; kf != NULL; kf = kf->next) { if ((id == XkbDfltXIId) || (id == kf->ctrl.id)) { if (kf->xkb_sli == NULL) kf->xkb_sli = XkbAllocSrvLedInfo(dev, kf, NULL, needed_parts); sli = kf->xkb_sli; break; } } } else if (class == LedFeedbackClass) { LedFeedbackPtr lf; for (lf = dev->leds; lf != NULL; lf = lf->next) { if ((id == XkbDfltXIId) || (id == lf->ctrl.id)) { if (lf->xkb_sli == NULL) lf->xkb_sli = XkbAllocSrvLedInfo(dev, NULL, lf, needed_parts); sli = lf->xkb_sli; break; } } } if (sli) { if ((sli->names == NULL) && (needed_parts & XkbXI_IndicatorNamesMask)) sli->names = calloc(XkbNumIndicators, sizeof(Atom)); if ((sli->maps == NULL) && (needed_parts & XkbXI_IndicatorMapsMask)) sli->maps = calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); } return sli; } /***====================================================================***/ void XkbFlushLedEvents(DeviceIntPtr dev, DeviceIntPtr kbd, XkbSrvLedInfoPtr sli, xkbExtensionDeviceNotify * ed, XkbChangesPtr changes, XkbEventCausePtr cause) { if (changes) { if (changes->indicators.state_changes) XkbDDXUpdateDeviceIndicators(dev, sli, sli->effectiveState); XkbSendNotification(kbd, changes, cause); memset((char *) changes, 0, sizeof(XkbChangesRec)); if (XkbAX_NeedFeedback (kbd->key->xkbInfo->desc->ctrls, XkbAX_IndicatorFBMask)) { if (sli->effectiveState) /* it appears that the which parameter is not used */ XkbDDXAccessXBeep(dev, _BEEP_LED_ON, XkbAccessXFeedbackMask); else XkbDDXAccessXBeep(dev, _BEEP_LED_OFF, XkbAccessXFeedbackMask); } } if (ed) { if (ed->reason) { if ((dev != kbd) && (ed->reason & XkbXI_IndicatorStateMask)) XkbDDXUpdateDeviceIndicators(dev, sli, sli->effectiveState); XkbSendExtensionDeviceNotify(dev, cause->client, ed); } memset((char *) ed, 0, sizeof(XkbExtensionDeviceNotify)); } return; } /***====================================================================***/ void XkbApplyLedNameChanges(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, unsigned changed_names, xkbExtensionDeviceNotify * ed, XkbChangesPtr changes, XkbEventCausePtr cause) { DeviceIntPtr kbd; XkbChangesRec my_changes; xkbExtensionDeviceNotify my_ed; if (changed_names == 0) return; if (dev->key && dev->key->xkbInfo) kbd = dev; else kbd = inputInfo.keyboard; if (ed == NULL) { ed = &my_ed; memset((char *) ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason & XkbXI_IndicatorsMask) && ((ed->ledClass != sli->class) || (ed->ledID != sli->id))) { XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); } if ((kbd == dev) && (sli->flags & XkbSLI_IsDefault)) { if (changes == NULL) { changes = &my_changes; memset((char *) changes, 0, sizeof(XkbChangesRec)); } changes->names.changed |= XkbIndicatorNamesMask; changes->names.changed_indicators |= changed_names; } ed->reason |= XkbXI_IndicatorNamesMask; ed->ledClass = sli->class; ed->ledID = sli->id; ed->ledsDefined = sli->namesPresent | sli->mapsPresent; ed->ledState = sli->effectiveState; ed->unsupported = 0; ed->supported = XkbXI_AllFeaturesMask; if (changes != &my_changes) changes = NULL; if (ed != &my_ed) ed = NULL; if (changes || ed) XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); return; } /***====================================================================***/ /* * void * XkbApplyLedMapChanges(dev,sli,changed_maps,changes,cause) * * Handles all of the secondary effects of the changes to the * feedback specified by 'sli' on the device specified by 'dev.' * * If 'changed_maps' specifies any indicators, this function generates * XkbExtensionDeviceNotify events and possibly IndicatorMapNotify * events to report the changes, and recalculates the effective * state of each indicator with a changed map. If any indicators * change state, the server generates XkbExtensionDeviceNotify and * XkbIndicatorStateNotify events as appropriate. * * If 'changes' is non-NULL, this function updates it to reflect * any changes to the keyboard state or controls or to the 'core' * indicator names, maps, or state. If 'changes' is NULL, this * function generates XKB events as needed to report the changes. * If 'dev' is not a keyboard device, any changes are reported * for the core keyboard. * * The 'cause' specifies the reason for the event (key event or * request) for the change, as reported in some XKB events. */ void XkbApplyLedMapChanges(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, unsigned changed_maps, xkbExtensionDeviceNotify * ed, XkbChangesPtr changes, XkbEventCausePtr cause) { DeviceIntPtr kbd; XkbChangesRec my_changes; xkbExtensionDeviceNotify my_ed; if (changed_maps == 0) return; if (dev->key && dev->key->xkbInfo) kbd = dev; else kbd = inputInfo.keyboard; if (ed == NULL) { ed = &my_ed; memset((char *) ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason & XkbXI_IndicatorsMask) && ((ed->ledClass != sli->class) || (ed->ledID != sli->id))) { XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); } if ((kbd == dev) && (sli->flags & XkbSLI_IsDefault)) { if (changes == NULL) { changes = &my_changes; memset((char *) changes, 0, sizeof(XkbChangesRec)); } changes->indicators.map_changes |= changed_maps; } XkbCheckIndicatorMaps(dev, sli, changed_maps); ed->reason |= XkbXI_IndicatorMapsMask; ed->ledClass = sli->class; ed->ledID = sli->id; ed->ledsDefined = sli->namesPresent | sli->mapsPresent; ed->ledState = sli->effectiveState; ed->unsupported = 0; ed->supported = XkbXI_AllFeaturesMask; XkbUpdateLedAutoState(dev, sli, changed_maps, ed, changes, cause); if (changes != &my_changes) changes = NULL; if (ed != &my_ed) ed = NULL; if (changes || ed) XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); return; } /***====================================================================***/ void XkbApplyLedStateChanges(DeviceIntPtr dev, XkbSrvLedInfoPtr sli, unsigned changed_leds, xkbExtensionDeviceNotify * ed, XkbChangesPtr changes, XkbEventCausePtr cause) { XkbSrvInfoPtr xkbi; DeviceIntPtr kbd; XkbChangesRec my_changes; xkbExtensionDeviceNotify my_ed; register unsigned i, bit, affected; XkbIndicatorMapPtr map; unsigned oldState; Bool kb_changed; if (changed_leds == 0) return; if (dev->key && dev->key->xkbInfo) kbd = dev; else kbd = inputInfo.keyboard; xkbi = kbd->key->xkbInfo; if (changes == NULL) { changes = &my_changes; memset((char *) changes, 0, sizeof(XkbChangesRec)); } kb_changed = FALSE; affected = changed_leds; oldState = sli->effectiveState; for (i = 0, bit = 1; (i < XkbNumIndicators) && (affected); i++, bit <<= 1) { if ((affected & bit) == 0) continue; affected &= ~bit; map = &sli->maps[i]; if (map->flags & XkbIM_NoExplicit) { sli->explicitState &= ~bit; continue; } if (map->flags & XkbIM_LEDDrivesKB) { Bool on = ((sli->explicitState & bit) != 0); if (XkbApplyLEDChangeToKeyboard(xkbi, map, on, changes)) kb_changed = TRUE; } } sli->effectiveState = (sli->autoState | sli->explicitState); affected = sli->effectiveState ^ oldState; if (ed == NULL) { ed = &my_ed; memset((char *) ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if (affected && (ed->reason & XkbXI_IndicatorsMask) && ((ed->ledClass != sli->class) || (ed->ledID != sli->id))) { XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); } if ((kbd == dev) && (sli->flags & XkbSLI_IsDefault)) changes->indicators.state_changes |= affected; if (affected) { ed->reason |= XkbXI_IndicatorStateMask; ed->ledClass = sli->class; ed->ledID = sli->id; ed->ledsDefined = sli->namesPresent | sli->mapsPresent; ed->ledState = sli->effectiveState; ed->unsupported = 0; ed->supported = XkbXI_AllFeaturesMask; } if (kb_changed) { XkbComputeDerivedState(kbd->key->xkbInfo); XkbUpdateLedAutoState(dev, sli, sli->mapsPresent, ed, changes, cause); } if (changes != &my_changes) changes = NULL; if (ed != &my_ed) ed = NULL; if (changes || ed) XkbFlushLedEvents(dev, kbd, sli, ed, changes, cause); if (kb_changed) XkbUpdateAllDeviceIndicators(NULL, cause); return; } xorg-server-21.1.16/xkb/xkbInit.c0000644000175000017500000005734614757411105012212 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "opaque.h" #include "property.h" #include "scrnintstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "xkbgeom.h" #include #include "xkbfile.h" #include "xkb.h" #define CREATE_ATOM(s) MakeAtom(s,sizeof(s)-1,1) #if defined(__alpha) || defined(__alpha__) #define LED_COMPOSE 2 #define LED_CAPS 3 #define LED_SCROLL 4 #define LED_NUM 5 #define PHYS_LEDS 0x1f #else #ifdef __sun #define LED_NUM 1 #define LED_SCROLL 2 #define LED_COMPOSE 3 #define LED_CAPS 4 #define PHYS_LEDS 0x0f #else #define LED_CAPS 1 #define LED_NUM 2 #define LED_SCROLL 3 #define PHYS_LEDS 0x07 #endif #endif #define MAX_TOC 16 typedef struct _SrvXkmInfo { DeviceIntPtr dev; FILE *file; XkbDescPtr xkb; } SrvXkmInfo; /***====================================================================***/ #ifndef XKB_DFLT_RULES_PROP #define XKB_DFLT_RULES_PROP TRUE #endif const char *XkbBaseDirectory = XKB_BASE_DIRECTORY; const char *XkbBinDirectory = XKB_BIN_DIRECTORY; static int XkbWantAccessX = 0; static char *XkbRulesDflt = NULL; static char *XkbModelDflt = NULL; static char *XkbLayoutDflt = NULL; static char *XkbVariantDflt = NULL; static char *XkbOptionsDflt = NULL; static char *XkbRulesUsed = NULL; static char *XkbModelUsed = NULL; static char *XkbLayoutUsed = NULL; static char *XkbVariantUsed = NULL; static char *XkbOptionsUsed = NULL; static XkbDescPtr xkb_cached_map = NULL; static Bool XkbWantRulesProp = XKB_DFLT_RULES_PROP; /***====================================================================***/ /** * Get the current default XKB rules. * Caller must free the data in rmlvo. */ void XkbGetRulesDflts(XkbRMLVOSet * rmlvo) { rmlvo->rules = strdup(XkbRulesDflt ? XkbRulesDflt : XKB_DFLT_RULES); rmlvo->model = strdup(XkbModelDflt ? XkbModelDflt : XKB_DFLT_MODEL); rmlvo->layout = strdup(XkbLayoutDflt ? XkbLayoutDflt : XKB_DFLT_LAYOUT); rmlvo->variant = strdup(XkbVariantDflt ? XkbVariantDflt : XKB_DFLT_VARIANT); rmlvo->options = strdup(XkbOptionsDflt ? XkbOptionsDflt : XKB_DFLT_OPTIONS); } void XkbFreeRMLVOSet(XkbRMLVOSet * rmlvo, Bool freeRMLVO) { if (!rmlvo) return; free(rmlvo->rules); free(rmlvo->model); free(rmlvo->layout); free(rmlvo->variant); free(rmlvo->options); if (freeRMLVO) free(rmlvo); else memset(rmlvo, 0, sizeof(XkbRMLVOSet)); } static Bool XkbWriteRulesProp(void) { int len, out; Atom name; char *pval; len = (XkbRulesUsed ? strlen(XkbRulesUsed) : 0); len += (XkbModelUsed ? strlen(XkbModelUsed) : 0); len += (XkbLayoutUsed ? strlen(XkbLayoutUsed) : 0); len += (XkbVariantUsed ? strlen(XkbVariantUsed) : 0); len += (XkbOptionsUsed ? strlen(XkbOptionsUsed) : 0); if (len < 1) return TRUE; len += 5; /* trailing NULs */ name = MakeAtom(_XKB_RF_NAMES_PROP_ATOM, strlen(_XKB_RF_NAMES_PROP_ATOM), 1); if (name == None) { ErrorF("[xkb] Atom error: %s not created\n", _XKB_RF_NAMES_PROP_ATOM); return TRUE; } pval = (char *) malloc(len); if (!pval) { ErrorF("[xkb] Allocation error: %s proprerty not created\n", _XKB_RF_NAMES_PROP_ATOM); return TRUE; } out = 0; if (XkbRulesUsed) { strcpy(&pval[out], XkbRulesUsed); out += strlen(XkbRulesUsed); } pval[out++] = '\0'; if (XkbModelUsed) { strcpy(&pval[out], XkbModelUsed); out += strlen(XkbModelUsed); } pval[out++] = '\0'; if (XkbLayoutUsed) { strcpy(&pval[out], XkbLayoutUsed); out += strlen(XkbLayoutUsed); } pval[out++] = '\0'; if (XkbVariantUsed) { strcpy(&pval[out], XkbVariantUsed); out += strlen(XkbVariantUsed); } pval[out++] = '\0'; if (XkbOptionsUsed) { strcpy(&pval[out], XkbOptionsUsed); out += strlen(XkbOptionsUsed); } pval[out++] = '\0'; if (out != len) { ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n", out, len); } dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8, PropModeReplace, len, pval, TRUE); free(pval); return TRUE; } void XkbInitRules(XkbRMLVOSet *rmlvo, const char *rules, const char *model, const char *layout, const char *variant, const char *options) { rmlvo->rules = rules ? xnfstrdup(rules) : NULL; rmlvo->model = model ? xnfstrdup(model) : NULL; rmlvo->layout = layout ? xnfstrdup(layout) : NULL; rmlvo->variant = variant ? xnfstrdup(variant) : NULL; rmlvo->options = options ? xnfstrdup(options) : NULL; } static void XkbSetRulesUsed(XkbRMLVOSet * rmlvo) { free(XkbRulesUsed); XkbRulesUsed = (rmlvo->rules ? Xstrdup(rmlvo->rules) : NULL); free(XkbModelUsed); XkbModelUsed = (rmlvo->model ? Xstrdup(rmlvo->model) : NULL); free(XkbLayoutUsed); XkbLayoutUsed = (rmlvo->layout ? Xstrdup(rmlvo->layout) : NULL); free(XkbVariantUsed); XkbVariantUsed = (rmlvo->variant ? Xstrdup(rmlvo->variant) : NULL); free(XkbOptionsUsed); XkbOptionsUsed = (rmlvo->options ? Xstrdup(rmlvo->options) : NULL); if (XkbWantRulesProp) XkbWriteRulesProp(); return; } void XkbSetRulesDflts(XkbRMLVOSet * rmlvo) { if (rmlvo->rules) { free(XkbRulesDflt); XkbRulesDflt = Xstrdup(rmlvo->rules); } if (rmlvo->model) { free(XkbModelDflt); XkbModelDflt = Xstrdup(rmlvo->model); } if (rmlvo->layout) { free(XkbLayoutDflt); XkbLayoutDflt = Xstrdup(rmlvo->layout); } if (rmlvo->variant) { free(XkbVariantDflt); XkbVariantDflt = Xstrdup(rmlvo->variant); } if (rmlvo->options) { free(XkbOptionsDflt); XkbOptionsDflt = Xstrdup(rmlvo->options); } return; } void XkbDeleteRulesUsed(void) { free(XkbRulesUsed); XkbRulesUsed = NULL; free(XkbModelUsed); XkbModelUsed = NULL; free(XkbLayoutUsed); XkbLayoutUsed = NULL; free(XkbVariantUsed); XkbVariantUsed = NULL; free(XkbOptionsUsed); XkbOptionsUsed = NULL; } void XkbDeleteRulesDflts(void) { free(XkbRulesDflt); XkbRulesDflt = NULL; free(XkbModelDflt); XkbModelDflt = NULL; free(XkbLayoutDflt); XkbLayoutDflt = NULL; free(XkbVariantDflt); XkbVariantDflt = NULL; free(XkbOptionsDflt); XkbOptionsDflt = NULL; XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE); xkb_cached_map = NULL; } #define DIFFERS(a, b) (strcmp((a) ? (a) : "", (b) ? (b) : "") != 0) static Bool XkbCompareUsedRMLVO(XkbRMLVOSet * rmlvo) { if (DIFFERS(rmlvo->rules, XkbRulesUsed) || DIFFERS(rmlvo->model, XkbModelUsed) || DIFFERS(rmlvo->layout, XkbLayoutUsed) || DIFFERS(rmlvo->variant, XkbVariantUsed) || DIFFERS(rmlvo->options, XkbOptionsUsed)) return FALSE; return TRUE; } #undef DIFFERS /***====================================================================***/ #include "xkbDflts.h" static Bool XkbInitKeyTypes(XkbDescPtr xkb) { if (xkb->defined & XkmTypesMask) return TRUE; initTypeNames(NULL); if (XkbAllocClientMap(xkb, XkbKeyTypesMask, num_dflt_types) != Success) return FALSE; if (XkbCopyKeyTypes(dflt_types, xkb->map->types, num_dflt_types) != Success) { return FALSE; } xkb->map->size_types = xkb->map->num_types = num_dflt_types; return TRUE; } static void XkbInitRadioGroups(XkbSrvInfoPtr xkbi) { xkbi->nRadioGroups = 0; xkbi->radioGroups = NULL; return; } static Status XkbInitCompatStructs(XkbDescPtr xkb) { register int i; XkbCompatMapPtr compat; if (xkb->defined & XkmCompatMapMask) return TRUE; if (XkbAllocCompatMap(xkb, XkbAllCompatMask, num_dfltSI) != Success) return BadAlloc; compat = xkb->compat; if (compat->sym_interpret) { compat->num_si = num_dfltSI; memcpy((char *) compat->sym_interpret, (char *) dfltSI, sizeof(dfltSI)); } for (i = 0; i < XkbNumKbdGroups; i++) { compat->groups[i] = compatMap.groups[i]; if (compat->groups[i].vmods != 0) { unsigned mask; mask = XkbMaskForVMask(xkb, compat->groups[i].vmods); compat->groups[i].mask = compat->groups[i].real_mods | mask; } else compat->groups[i].mask = compat->groups[i].real_mods; } return Success; } static void XkbInitSemantics(XkbDescPtr xkb) { XkbInitKeyTypes(xkb); XkbInitCompatStructs(xkb); return; } /***====================================================================***/ static Status XkbInitNames(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbNamesPtr names; Status rtrn; Atom unknown; xkb = xkbi->desc; if ((rtrn = XkbAllocNames(xkb, XkbAllNamesMask, 0, 0)) != Success) return rtrn; unknown = CREATE_ATOM("unknown"); names = xkb->names; if (names->keycodes == None) names->keycodes = unknown; if (names->geometry == None) names->geometry = unknown; if (names->phys_symbols == None) names->phys_symbols = unknown; if (names->symbols == None) names->symbols = unknown; if (names->types == None) names->types = unknown; if (names->compat == None) names->compat = unknown; if (!(xkb->defined & XkmVirtualModsMask)) { if (names->vmods[vmod_NumLock] == None) names->vmods[vmod_NumLock] = CREATE_ATOM("NumLock"); if (names->vmods[vmod_Alt] == None) names->vmods[vmod_Alt] = CREATE_ATOM("Alt"); if (names->vmods[vmod_AltGr] == None) names->vmods[vmod_AltGr] = CREATE_ATOM("ModeSwitch"); } if (!(xkb->defined & XkmIndicatorsMask) || !(xkb->defined & XkmGeometryMask)) { initIndicatorNames(NULL, xkb); if (names->indicators[LED_CAPS - 1] == None) names->indicators[LED_CAPS - 1] = CREATE_ATOM("Caps Lock"); if (names->indicators[LED_NUM - 1] == None) names->indicators[LED_NUM - 1] = CREATE_ATOM("Num Lock"); if (names->indicators[LED_SCROLL - 1] == None) names->indicators[LED_SCROLL - 1] = CREATE_ATOM("Scroll Lock"); #ifdef LED_COMPOSE if (names->indicators[LED_COMPOSE - 1] == None) names->indicators[LED_COMPOSE - 1] = CREATE_ATOM("Compose"); #endif } if (xkb->geom != NULL) names->geometry = xkb->geom->name; else names->geometry = unknown; return Success; } static Status XkbInitIndicatorMap(XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbIndicatorPtr map; XkbSrvLedInfoPtr sli; xkb = xkbi->desc; if (XkbAllocIndicatorMaps(xkb) != Success) return BadAlloc; if (!(xkb->defined & XkmIndicatorsMask)) { map = xkb->indicators; map->phys_indicators = PHYS_LEDS; map->maps[LED_CAPS - 1].flags = XkbIM_NoExplicit; map->maps[LED_CAPS - 1].which_mods = XkbIM_UseLocked; map->maps[LED_CAPS - 1].mods.mask = LockMask; map->maps[LED_CAPS - 1].mods.real_mods = LockMask; map->maps[LED_NUM - 1].flags = XkbIM_NoExplicit; map->maps[LED_NUM - 1].which_mods = XkbIM_UseLocked; map->maps[LED_NUM - 1].mods.mask = 0; map->maps[LED_NUM - 1].mods.real_mods = 0; map->maps[LED_NUM - 1].mods.vmods = vmod_NumLockMask; map->maps[LED_SCROLL - 1].flags = XkbIM_NoExplicit; map->maps[LED_SCROLL - 1].which_mods = XkbIM_UseLocked; map->maps[LED_SCROLL - 1].mods.mask = Mod3Mask; map->maps[LED_SCROLL - 1].mods.real_mods = Mod3Mask; } sli = XkbFindSrvLedInfo(xkbi->device, XkbDfltXIClass, XkbDfltXIId, 0); if (sli) XkbCheckIndicatorMaps(xkbi->device, sli, XkbAllIndicatorsMask); return Success; } static Status XkbInitControls(DeviceIntPtr pXDev, XkbSrvInfoPtr xkbi) { XkbDescPtr xkb; XkbControlsPtr ctrls; xkb = xkbi->desc; /* 12/31/94 (ef) -- XXX! Should check if controls loaded from file */ if (XkbAllocControls(xkb, XkbAllControlsMask) != Success) FatalError("Couldn't allocate keyboard controls\n"); ctrls = xkb->ctrls; if (!(xkb->defined & XkmSymbolsMask)) ctrls->num_groups = 1; ctrls->groups_wrap = XkbSetGroupInfo(1, XkbWrapIntoRange, 0); ctrls->internal.mask = 0; ctrls->internal.real_mods = 0; ctrls->internal.vmods = 0; ctrls->ignore_lock.mask = 0; ctrls->ignore_lock.real_mods = 0; ctrls->ignore_lock.vmods = 0; ctrls->enabled_ctrls = XkbAccessXTimeoutMask | XkbRepeatKeysMask | XkbMouseKeysAccelMask | XkbAudibleBellMask | XkbIgnoreGroupLockMask; if (XkbWantAccessX) ctrls->enabled_ctrls |= XkbAccessXKeysMask; AccessXInit(pXDev); return Success; } static Status XkbInitOverlayState(XkbSrvInfoPtr xkbi) { memset(xkbi->overlay_perkey_state, 0, sizeof(xkbi->overlay_perkey_state)); return Success; } static Bool InitKeyboardDeviceStructInternal(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, const char *keymap, int keymap_length, BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func) { int i; unsigned int check; XkbSrvInfoPtr xkbi; XkbDescPtr xkb; XkbSrvLedInfoPtr sli; XkbChangesRec changes; XkbEventCauseRec cause; XkbRMLVOSet rmlvo_dflts = { NULL }; BUG_RETURN_VAL(dev == NULL, FALSE); BUG_RETURN_VAL(dev->key != NULL, FALSE); BUG_RETURN_VAL(dev->kbdfeed != NULL, FALSE); BUG_RETURN_VAL(rmlvo && keymap, FALSE); if (!rmlvo && !keymap) { rmlvo = &rmlvo_dflts; XkbGetRulesDflts(rmlvo); } memset(&changes, 0, sizeof(changes)); XkbSetCauseUnknown(&cause); dev->key = calloc(1, sizeof(*dev->key)); if (!dev->key) { ErrorF("XKB: Failed to allocate key class\n"); return FALSE; } dev->key->sourceid = dev->id; dev->kbdfeed = calloc(1, sizeof(*dev->kbdfeed)); if (!dev->kbdfeed) { ErrorF("XKB: Failed to allocate key feedback class\n"); goto unwind_key; } xkbi = calloc(1, sizeof(*xkbi)); if (!xkbi) { ErrorF("XKB: Failed to allocate XKB info\n"); goto unwind_kbdfeed; } dev->key->xkbInfo = xkbi; if (xkb_cached_map && (keymap || (rmlvo && !XkbCompareUsedRMLVO(rmlvo)))) { XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE); xkb_cached_map = NULL; } if (xkb_cached_map) LogMessageVerb(X_INFO, 4, "XKB: Reusing cached keymap\n"); else { if (rmlvo) xkb_cached_map = XkbCompileKeymap(dev, rmlvo); else xkb_cached_map = XkbCompileKeymapFromString(dev, keymap, keymap_length); if (!xkb_cached_map) { ErrorF("XKB: Failed to compile keymap\n"); goto unwind_info; } } xkb = XkbAllocKeyboard(); if (!xkb) { ErrorF("XKB: Failed to allocate keyboard description\n"); goto unwind_info; } if (!XkbCopyKeymap(xkb, xkb_cached_map)) { ErrorF("XKB: Failed to copy keymap\n"); goto unwind_desc; } xkb->defined = xkb_cached_map->defined; xkb->flags = xkb_cached_map->flags; xkb->device_spec = xkb_cached_map->device_spec; xkbi->desc = xkb; if (xkb->min_key_code == 0) xkb->min_key_code = 8; if (xkb->max_key_code == 0) xkb->max_key_code = 255; i = XkbNumKeys(xkb) / 3 + 1; if (XkbAllocClientMap(xkb, XkbAllClientInfoMask, 0) != Success) goto unwind_desc; if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, i) != Success) goto unwind_desc; xkbi->dfltPtrDelta = 1; xkbi->device = dev; XkbInitSemantics(xkb); XkbInitNames(xkbi); XkbInitRadioGroups(xkbi); XkbInitControls(dev, xkbi); XkbInitIndicatorMap(xkbi); XkbInitOverlayState(xkbi); XkbUpdateActions(dev, xkb->min_key_code, XkbNumKeys(xkb), &changes, &check, &cause); if (!dev->focus) InitFocusClassDeviceStruct(dev); xkbi->kbdProc = ctrl_func; dev->kbdfeed->BellProc = bell_func; dev->kbdfeed->CtrlProc = XkbDDXKeybdCtrlProc; dev->kbdfeed->ctrl = defaultKeyboardControl; if (dev->kbdfeed->ctrl.autoRepeat) xkb->ctrls->enabled_ctrls |= XkbRepeatKeysMask; memcpy(dev->kbdfeed->ctrl.autoRepeats, xkb->ctrls->per_key_repeat, XkbPerKeyBitArraySize); sli = XkbFindSrvLedInfo(dev, XkbDfltXIClass, XkbDfltXIId, 0); if (sli) XkbCheckIndicatorMaps(dev, sli, XkbAllIndicatorsMask); else DebugF("XKB: No indicator feedback in XkbFinishInit!\n"); dev->kbdfeed->CtrlProc(dev, &dev->kbdfeed->ctrl); if (rmlvo) { XkbSetRulesDflts(rmlvo); XkbSetRulesUsed(rmlvo); } XkbFreeRMLVOSet(&rmlvo_dflts, FALSE); return TRUE; unwind_desc: XkbFreeKeyboard(xkb, 0, TRUE); unwind_info: free(xkbi); dev->key->xkbInfo = NULL; unwind_kbdfeed: free(dev->kbdfeed); dev->kbdfeed = NULL; unwind_key: free(dev->key); dev->key = NULL; return FALSE; } _X_EXPORT Bool InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo, BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func) { return InitKeyboardDeviceStructInternal(dev, rmlvo, NULL, 0, bell_func, ctrl_func); } _X_EXPORT Bool InitKeyboardDeviceStructFromString(DeviceIntPtr dev, const char *keymap, int keymap_length, BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func) { return InitKeyboardDeviceStructInternal(dev, NULL, keymap, keymap_length, bell_func, ctrl_func); } /***====================================================================***/ /* * Be very careful about what does and doesn't get freed by this * function. To reduce fragmentation, XkbInitDevice allocates a * single huge block per device and divides it up into most of the * fixed-size structures for the device. Don't free anything that * is part of this larger block. */ void XkbFreeInfo(XkbSrvInfoPtr xkbi) { free(xkbi->radioGroups); xkbi->radioGroups = NULL; if (xkbi->mouseKeyTimer) { TimerFree(xkbi->mouseKeyTimer); xkbi->mouseKeyTimer = NULL; } if (xkbi->slowKeysTimer) { TimerFree(xkbi->slowKeysTimer); xkbi->slowKeysTimer = NULL; } if (xkbi->bounceKeysTimer) { TimerFree(xkbi->bounceKeysTimer); xkbi->bounceKeysTimer = NULL; } if (xkbi->repeatKeyTimer) { TimerFree(xkbi->repeatKeyTimer); xkbi->repeatKeyTimer = NULL; } if (xkbi->krgTimer) { TimerFree(xkbi->krgTimer); xkbi->krgTimer = NULL; } xkbi->beepType = _BEEP_NONE; if (xkbi->beepTimer) { TimerFree(xkbi->beepTimer); xkbi->beepTimer = NULL; } if (xkbi->desc) { XkbFreeKeyboard(xkbi->desc, XkbAllComponentsMask, TRUE); xkbi->desc = NULL; } free(xkbi); return; } /***====================================================================***/ extern int XkbDfltRepeatDelay; extern int XkbDfltRepeatInterval; extern unsigned short XkbDfltAccessXTimeout; extern unsigned int XkbDfltAccessXTimeoutMask; extern unsigned int XkbDfltAccessXFeedback; extern unsigned short XkbDfltAccessXOptions; int XkbProcessArguments(int argc, char *argv[], int i) { if (strncmp(argv[i], "-xkbdir", 7) == 0) { if (++i < argc) { #if !defined(WIN32) && !defined(__CYGWIN__) if (getuid() != geteuid()) { LogMessage(X_WARNING, "-xkbdir is not available for setuid X servers\n"); return -1; } else #endif { if (strlen(argv[i]) < PATH_MAX) { XkbBaseDirectory = argv[i]; return 2; } else { LogMessage(X_ERROR, "-xkbdir pathname too long\n"); return -1; } } } else { return -1; } } else if ((strncmp(argv[i], "-accessx", 8) == 0) || (strncmp(argv[i], "+accessx", 8) == 0)) { int j = 1; if (argv[i][0] == '-') XkbWantAccessX = 0; else { XkbWantAccessX = 1; if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) { XkbDfltAccessXTimeout = atoi(argv[++i]); j++; if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) { /* * presumption that the reasonably useful range of * values fits in 0..MAXINT since SunOS 4 doesn't * have strtoul. */ XkbDfltAccessXTimeoutMask = (unsigned int) strtol(argv[++i], NULL, 16); j++; } if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) { if (argv[++i][0] == '1') XkbDfltAccessXFeedback = XkbAccessXFeedbackMask; else XkbDfltAccessXFeedback = 0; j++; } if (((i + 1) < argc) && (isdigit(argv[i + 1][0]))) { XkbDfltAccessXOptions = (unsigned short) strtol(argv[++i], NULL, 16); j++; } } } return j; } if ((strcmp(argv[i], "-ardelay") == 0) || (strcmp(argv[i], "-ar1") == 0)) { /* -ardelay int */ if (++i >= argc) UseMsg(); else XkbDfltRepeatDelay = (long) atoi(argv[i]); return 2; } if ((strcmp(argv[i], "-arinterval") == 0) || (strcmp(argv[i], "-ar2") == 0)) { /* -arinterval int */ if (++i >= argc) UseMsg(); else XkbDfltRepeatInterval = (long) atoi(argv[i]); return 2; } return 0; } void XkbUseMsg(void) { ErrorF ("[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]\n"); ErrorF(" enable/disable accessx key sequences\n"); ErrorF("-ardelay set XKB autorepeat delay\n"); ErrorF("-arinterval set XKB autorepeat interval\n"); } xorg-server-21.1.16/xkb/xkbActions.c0000644000175000017500000015260614757411105012702 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "exevents.h" #include "eventstr.h" #include #include "xkb.h" #include #include "mi.h" #include "mipointer.h" #include "inpututils.h" #include "dixgrabs.h" #define EXTENSION_EVENT_BASE 64 DevPrivateKeyRec xkbDevicePrivateKeyRec; static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x, int y); void xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, void *data) { xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device); ProcessInputProc backupproc; if (xkbPrivPtr->unwrapProc) xkbPrivPtr->unwrapProc = NULL; UNWRAP_PROCESS_INPUT_PROC(device, xkbPrivPtr, backupproc); proc(device, data); COND_WRAP_PROCESS_INPUT_PROC(device, xkbPrivPtr, backupproc, xkbUnwrapProc); } Bool XkbInitPrivates(void) { return dixRegisterPrivateKey(&xkbDevicePrivateKeyRec, PRIVATE_DEVICE, sizeof(xkbDeviceInfoRec)); } void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) { xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(device); WRAP_PROCESS_INPUT_PROC(device, xkbPrivPtr, proc, xkbUnwrapProc); } /***====================================================================***/ static XkbAction _FixUpAction(XkbDescPtr xkb, XkbAction *act) { static XkbAction fake; if (XkbIsPtrAction(act) && (!(xkb->ctrls->enabled_ctrls & XkbMouseKeysMask))) { fake.type = XkbSA_NoAction; return fake; } if (xkb->ctrls->enabled_ctrls & XkbStickyKeysMask) { if (act->any.type == XkbSA_SetMods) { fake.mods.type = XkbSA_LatchMods; fake.mods.mask = act->mods.mask; if (XkbAX_NeedOption(xkb->ctrls, XkbAX_LatchToLockMask)) fake.mods.flags = XkbSA_ClearLocks | XkbSA_LatchToLock; else fake.mods.flags = XkbSA_ClearLocks; return fake; } if (act->any.type == XkbSA_SetGroup) { fake.group.type = XkbSA_LatchGroup; if (XkbAX_NeedOption(xkb->ctrls, XkbAX_LatchToLockMask)) fake.group.flags = XkbSA_ClearLocks | XkbSA_LatchToLock; else fake.group.flags = XkbSA_ClearLocks; XkbSASetGroup(&fake.group, XkbSAGroup(&act->group)); return fake; } } return *act; } static XkbAction XkbGetKeyAction(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 key) { int effectiveGroup; int col; XkbDescPtr xkb; XkbKeyTypePtr type; XkbAction *pActs; static XkbAction fake; xkb = xkbi->desc; if (!XkbKeyHasActions(xkb, key) || !XkbKeycodeInRange(xkb, key)) { fake.type = XkbSA_NoAction; return fake; } pActs = XkbKeyActionsPtr(xkb, key); col = 0; effectiveGroup = XkbGetEffectiveGroup(xkbi, xkbState, key); if (effectiveGroup != XkbGroup1Index) col += (effectiveGroup * XkbKeyGroupsWidth(xkb, key)); type = XkbKeyKeyType(xkb, key, effectiveGroup); if (type->map != NULL) { register unsigned i, mods; register XkbKTMapEntryPtr entry; mods = xkbState->mods & type->mods.mask; for (entry = type->map, i = 0; i < type->map_count; i++, entry++) { if ((entry->active) && (entry->mods.mask == mods)) { col += entry->level; break; } } } if (pActs[col].any.type == XkbSA_NoAction) return pActs[col]; fake = _FixUpAction(xkb, &pActs[col]); return fake; } static XkbAction XkbGetButtonAction(DeviceIntPtr kbd, DeviceIntPtr dev, int button) { XkbAction fake; if ((dev->button) && (dev->button->xkb_acts)) { if (dev->button->xkb_acts[button - 1].any.type != XkbSA_NoAction) { fake = _FixUpAction(kbd->key->xkbInfo->desc, &dev->button->xkb_acts[button - 1]); return fake; } } fake.any.type = XkbSA_NoAction; return fake; } /***====================================================================***/ #define SYNTHETIC_KEYCODE 1 #define BTN_ACT_FLAG 0x100 static int _XkbFilterSetState(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (filter->keycode == 0) { /* initial press */ AccessXCancelRepeatKey(xkbi, keycode); filter->keycode = keycode; filter->active = 1; filter->filterOthers = ((pAction->mods.mask & XkbSA_ClearLocks) != 0); filter->priv = 0; filter->filter = _XkbFilterSetState; if (pAction->type == XkbSA_SetMods) { filter->upAction = *pAction; xkbi->setMods = pAction->mods.mask; } else { xkbi->groupChange = XkbSAGroup(&pAction->group); if (pAction->group.flags & XkbSA_GroupAbsolute) xkbi->groupChange -= xkbi->state.base_group; filter->upAction = *pAction; XkbSASetGroup(&filter->upAction.group, xkbi->groupChange); } } else if (filter->keycode == keycode) { if (filter->upAction.type == XkbSA_SetMods) { xkbi->clearMods = filter->upAction.mods.mask; if (filter->upAction.mods.flags & XkbSA_ClearLocks) { xkbi->state.locked_mods &= ~filter->upAction.mods.mask; } } else { if (filter->upAction.group.flags & XkbSA_ClearLocks) { xkbi->state.locked_group = 0; } xkbi->groupChange = -XkbSAGroup(&filter->upAction.group); } filter->active = 0; } else { filter->upAction.mods.flags &= ~XkbSA_ClearLocks; filter->filterOthers = 0; } return 1; } #define LATCH_KEY_DOWN 1 #define LATCH_PENDING 2 static int _XkbFilterLatchState(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (filter->keycode == 0) { /* initial press */ AccessXCancelRepeatKey(xkbi,keycode); filter->keycode = keycode; filter->active = 1; filter->filterOthers = 1; filter->priv = LATCH_KEY_DOWN; filter->filter = _XkbFilterLatchState; if (pAction->type == XkbSA_LatchMods) { filter->upAction = *pAction; xkbi->setMods = pAction->mods.mask; } else { xkbi->groupChange = XkbSAGroup(&pAction->group); if (pAction->group.flags & XkbSA_GroupAbsolute) xkbi->groupChange -= xkbi->state.base_group; filter->upAction = *pAction; XkbSASetGroup(&filter->upAction.group, xkbi->groupChange); } } else if (pAction && (filter->priv == LATCH_PENDING)) { if (((1 << pAction->type) & XkbSA_BreakLatch) != 0) { filter->active = 0; /* If one latch is broken, all latches are broken, so it's no use to find out which particular latch this filter tracks. */ xkbi->state.latched_mods = 0; xkbi->state.latched_group = 0; } } else if (filter->keycode == keycode && filter->priv != LATCH_PENDING){ /* The test above for LATCH_PENDING skips subsequent releases of the key after it has been released first time and the latch became pending. */ XkbControlsPtr ctrls = xkbi->desc->ctrls; int needBeep = ((ctrls->enabled_ctrls & XkbStickyKeysMask) && XkbAX_NeedFeedback(ctrls, XkbAX_StickyKeysFBMask)); if (filter->upAction.type == XkbSA_LatchMods) { unsigned char mask = filter->upAction.mods.mask; unsigned char common; xkbi->clearMods = mask; /* ClearLocks */ common = mask & xkbi->state.locked_mods; if ((filter->upAction.mods.flags & XkbSA_ClearLocks) && common) { mask &= ~common; xkbi->state.locked_mods &= ~common; if (needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_UNLOCK, XkbStickyKeysMask); } /* LatchToLock */ common = mask & xkbi->state.latched_mods; if ((filter->upAction.mods.flags & XkbSA_LatchToLock) && common) { unsigned char newlocked; mask &= ~common; newlocked = common & ~xkbi->state.locked_mods; if(newlocked){ xkbi->state.locked_mods |= newlocked; if (needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LOCK, XkbStickyKeysMask); } xkbi->state.latched_mods &= ~common; } /* Latch remaining modifiers, if any. */ if (mask) { xkbi->state.latched_mods |= mask; filter->priv = LATCH_PENDING; if (needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LATCH, XkbStickyKeysMask); } } else { xkbi->groupChange = -XkbSAGroup(&filter->upAction.group); /* ClearLocks */ if ((filter->upAction.group.flags & XkbSA_ClearLocks) && (xkbi->state.locked_group)) { xkbi->state.locked_group = 0; if (needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_UNLOCK, XkbStickyKeysMask); } /* LatchToLock */ else if ((filter->upAction.group.flags & XkbSA_LatchToLock) && (xkbi->state.latched_group)) { xkbi->state.locked_group += XkbSAGroup(&filter->upAction.group); xkbi->state.latched_group -= XkbSAGroup(&filter->upAction.group); if(XkbSAGroup(&filter->upAction.group) && needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LOCK, XkbStickyKeysMask); } /* Latch group */ else if(XkbSAGroup(&filter->upAction.group)){ xkbi->state.latched_group += XkbSAGroup(&filter->upAction.group); filter->priv = LATCH_PENDING; if (needBeep) XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LATCH, XkbStickyKeysMask); } } if (filter->priv != LATCH_PENDING) filter->active = 0; } else if (pAction && (filter->priv == LATCH_KEY_DOWN)) { /* Latch was broken before it became pending: degrade to a SetMods/SetGroup. */ if (filter->upAction.type == XkbSA_LatchMods) filter->upAction.type = XkbSA_SetMods; else filter->upAction.type = XkbSA_SetGroup; filter->filter = _XkbFilterSetState; filter->priv = 0; return filter->filter(xkbi, filter, keycode, pAction); } return 1; } static int _XkbFilterLockState(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (filter->keycode == 0) /* initial press */ AccessXCancelRepeatKey(xkbi, keycode); if (pAction && (pAction->type == XkbSA_LockGroup)) { if (pAction->group.flags & XkbSA_GroupAbsolute) xkbi->state.locked_group = XkbSAGroup(&pAction->group); else xkbi->state.locked_group += XkbSAGroup(&pAction->group); return 1; } if (filter->keycode == 0) { /* initial press */ filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->priv = xkbi->state.locked_mods & pAction->mods.mask; filter->filter = _XkbFilterLockState; filter->upAction = *pAction; if (!(filter->upAction.mods.flags & XkbSA_LockNoLock)) xkbi->state.locked_mods |= pAction->mods.mask; xkbi->setMods = pAction->mods.mask; } else if (filter->keycode == keycode) { filter->active = 0; xkbi->clearMods = filter->upAction.mods.mask; if (!(filter->upAction.mods.flags & XkbSA_LockNoUnlock)) xkbi->state.locked_mods &= ~filter->priv; } return 1; } #define ISO_KEY_DOWN 0 #define NO_ISO_LOCK 1 static int _XkbFilterISOLock(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (filter->keycode == 0) { /* initial press */ CARD8 flags = pAction->iso.flags; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 1; filter->priv = ISO_KEY_DOWN; filter->upAction = *pAction; filter->filter = _XkbFilterISOLock; if (flags & XkbSA_ISODfltIsGroup) { xkbi->groupChange = XkbSAGroup(&pAction->iso); xkbi->setMods = 0; } else { xkbi->setMods = pAction->iso.mask; xkbi->groupChange = 0; } if ((!(flags & XkbSA_ISONoAffectMods)) && (xkbi->state.base_mods)) { filter->priv = NO_ISO_LOCK; xkbi->state.locked_mods ^= xkbi->state.base_mods; } if ((!(flags & XkbSA_ISONoAffectGroup)) && (xkbi->state.base_group)) { /* 6/22/93 (ef) -- lock groups if group key is down first */ } if (!(flags & XkbSA_ISONoAffectPtr)) { /* 6/22/93 (ef) -- lock mouse buttons if they're down */ } } else if (filter->keycode == keycode) { CARD8 flags = filter->upAction.iso.flags; if (flags & XkbSA_ISODfltIsGroup) { xkbi->groupChange = -XkbSAGroup(&filter->upAction.iso); xkbi->clearMods = 0; if (filter->priv == ISO_KEY_DOWN) xkbi->state.locked_group += XkbSAGroup(&filter->upAction.iso); } else { xkbi->clearMods = filter->upAction.iso.mask; xkbi->groupChange = 0; if (filter->priv == ISO_KEY_DOWN) xkbi->state.locked_mods ^= filter->upAction.iso.mask; } filter->active = 0; } else if (pAction) { CARD8 flags = filter->upAction.iso.flags; switch (pAction->type) { case XkbSA_SetMods: case XkbSA_LatchMods: if (!(flags & XkbSA_ISONoAffectMods)) { pAction->type = XkbSA_LockMods; filter->priv = NO_ISO_LOCK; } break; case XkbSA_SetGroup: case XkbSA_LatchGroup: if (!(flags & XkbSA_ISONoAffectGroup)) { pAction->type = XkbSA_LockGroup; filter->priv = NO_ISO_LOCK; } break; case XkbSA_PtrBtn: if (!(flags & XkbSA_ISONoAffectPtr)) { pAction->type = XkbSA_LockPtrBtn; filter->priv = NO_ISO_LOCK; } break; case XkbSA_SetControls: if (!(flags & XkbSA_ISONoAffectCtrls)) { pAction->type = XkbSA_LockControls; filter->priv = NO_ISO_LOCK; } break; } } return 1; } static CARD32 _XkbPtrAccelExpire(OsTimerPtr timer, CARD32 now, void *arg) { XkbSrvInfoPtr xkbi = (XkbSrvInfoPtr) arg; XkbControlsPtr ctrls = xkbi->desc->ctrls; int dx, dy; if (xkbi->mouseKey == 0) return 0; if (xkbi->mouseKeysAccel) { if ((xkbi->mouseKeysCounter) < ctrls->mk_time_to_max) { double step; xkbi->mouseKeysCounter++; step = xkbi->mouseKeysCurveFactor * pow((double) xkbi->mouseKeysCounter, xkbi->mouseKeysCurve); if (xkbi->mouseKeysDX < 0) dx = floor(((double) xkbi->mouseKeysDX) * step); else dx = ceil(((double) xkbi->mouseKeysDX) * step); if (xkbi->mouseKeysDY < 0) dy = floor(((double) xkbi->mouseKeysDY) * step); else dy = ceil(((double) xkbi->mouseKeysDY) * step); } else { dx = xkbi->mouseKeysDX * ctrls->mk_max_speed; dy = xkbi->mouseKeysDY * ctrls->mk_max_speed; } if (xkbi->mouseKeysFlags & XkbSA_MoveAbsoluteX) dx = xkbi->mouseKeysDX; if (xkbi->mouseKeysFlags & XkbSA_MoveAbsoluteY) dy = xkbi->mouseKeysDY; } else { dx = xkbi->mouseKeysDX; dy = xkbi->mouseKeysDY; } XkbFakePointerMotion(xkbi->device, xkbi->mouseKeysFlags, dx, dy); return xkbi->desc->ctrls->mk_interval; } static int _XkbFilterPointerMove(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { int x, y; Bool accel; if (filter->keycode == 0) { /* initial press */ filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->priv = 0; filter->filter = _XkbFilterPointerMove; filter->upAction = *pAction; xkbi->mouseKeysCounter = 0; xkbi->mouseKey = keycode; accel = ((pAction->ptr.flags & XkbSA_NoAcceleration) == 0); x = XkbPtrActionX(&pAction->ptr); y = XkbPtrActionY(&pAction->ptr); XkbFakePointerMotion(xkbi->device, pAction->ptr.flags, x, y); AccessXCancelRepeatKey(xkbi, keycode); xkbi->mouseKeysAccel = accel && (xkbi->desc->ctrls->enabled_ctrls & XkbMouseKeysAccelMask); xkbi->mouseKeysFlags = pAction->ptr.flags; xkbi->mouseKeysDX = XkbPtrActionX(&pAction->ptr); xkbi->mouseKeysDY = XkbPtrActionY(&pAction->ptr); xkbi->mouseKeyTimer = TimerSet(xkbi->mouseKeyTimer, 0, xkbi->desc->ctrls->mk_delay, _XkbPtrAccelExpire, (void *) xkbi); } else if (filter->keycode == keycode) { filter->active = 0; if (xkbi->mouseKey == keycode) { xkbi->mouseKey = 0; xkbi->mouseKeyTimer = TimerSet(xkbi->mouseKeyTimer, 0, 0, NULL, NULL); } } return 0; } static int _XkbFilterPointerBtn(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (filter->keycode == 0) { /* initial press */ int button = pAction->btn.button; if (button == XkbSA_UseDfltButton) button = xkbi->desc->ctrls->mk_dflt_btn; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->priv = 0; filter->filter = _XkbFilterPointerBtn; filter->upAction = *pAction; filter->upAction.btn.button = button; switch (pAction->type) { case XkbSA_LockPtrBtn: if (((xkbi->lockedPtrButtons & (1 << button)) == 0) && ((pAction->btn.flags & XkbSA_LockNoLock) == 0)) { xkbi->lockedPtrButtons |= (1 << button); AccessXCancelRepeatKey(xkbi, keycode); XkbFakeDeviceButton(xkbi->device, 1, button); filter->upAction.type = XkbSA_NoAction; } break; case XkbSA_PtrBtn: { register int i, nClicks; AccessXCancelRepeatKey(xkbi, keycode); if (pAction->btn.count > 0) { nClicks = pAction->btn.count; for (i = 0; i < nClicks; i++) { XkbFakeDeviceButton(xkbi->device, 1, button); XkbFakeDeviceButton(xkbi->device, 0, button); } filter->upAction.type = XkbSA_NoAction; } else XkbFakeDeviceButton(xkbi->device, 1, button); } break; case XkbSA_SetPtrDflt: { XkbControlsPtr ctrls = xkbi->desc->ctrls; XkbControlsRec old; xkbControlsNotify cn; old = *ctrls; AccessXCancelRepeatKey(xkbi, keycode); switch (pAction->dflt.affect) { case XkbSA_AffectDfltBtn: if (pAction->dflt.flags & XkbSA_DfltBtnAbsolute) ctrls->mk_dflt_btn = XkbSAPtrDfltValue(&pAction->dflt); else { ctrls->mk_dflt_btn += XkbSAPtrDfltValue(&pAction->dflt); if (ctrls->mk_dflt_btn > 5) ctrls->mk_dflt_btn = 5; else if (ctrls->mk_dflt_btn < 1) ctrls->mk_dflt_btn = 1; } break; default: ErrorF ("Attempt to change unknown pointer default (%d) ignored\n", pAction->dflt.affect); break; } if (XkbComputeControlsNotify(xkbi->device, &old, xkbi->desc->ctrls, &cn, FALSE)) { cn.keycode = keycode; /* XXX: what about DeviceKeyPress? */ cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; XkbSendControlsNotify(xkbi->device, &cn); } } break; } return 0; } else if (filter->keycode == keycode) { int button = filter->upAction.btn.button; switch (filter->upAction.type) { case XkbSA_LockPtrBtn: if (((filter->upAction.btn.flags & XkbSA_LockNoUnlock) != 0) || ((xkbi->lockedPtrButtons & (1 << button)) == 0)) { break; } xkbi->lockedPtrButtons &= ~(1 << button); if (IsMaster(xkbi->device)) { XkbMergeLockedPtrBtns(xkbi->device); /* One SD still has lock set, don't post event */ if ((xkbi->lockedPtrButtons & (1 << button)) != 0) break; } /* fallthrough */ case XkbSA_PtrBtn: XkbFakeDeviceButton(xkbi->device, 0, button); break; } filter->active = 0; return 0; } return 1; } static int _XkbFilterControls(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { XkbControlsRec old; XkbControlsPtr ctrls; DeviceIntPtr kbd; unsigned int change; XkbEventCauseRec cause; kbd = xkbi->device; ctrls = xkbi->desc->ctrls; old = *ctrls; if (filter->keycode == 0) { /* initial press */ AccessXCancelRepeatKey(xkbi, keycode); filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; change = XkbActionCtrls(&pAction->ctrls); filter->priv = change; filter->filter = _XkbFilterControls; filter->upAction = *pAction; if (pAction->type == XkbSA_LockControls) { filter->priv = (ctrls->enabled_ctrls & change); change &= ~ctrls->enabled_ctrls; } if (change) { xkbControlsNotify cn; XkbSrvLedInfoPtr sli; ctrls->enabled_ctrls |= change; if (XkbComputeControlsNotify(kbd, &old, ctrls, &cn, FALSE)) { cn.keycode = keycode; /* XXX: what about DeviceKeyPress? */ cn.eventType = KeyPress; cn.requestMajor = 0; cn.requestMinor = 0; XkbSendControlsNotify(kbd, &cn); } XkbSetCauseKey(&cause, keycode, KeyPress); /* If sticky keys were disabled, clear all locks and latches */ if ((old.enabled_ctrls & XkbStickyKeysMask) && (!(ctrls->enabled_ctrls & XkbStickyKeysMask))) { XkbClearAllLatchesAndLocks(kbd, xkbi, FALSE, &cause); } sli = XkbFindSrvLedInfo(kbd, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(kbd, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) XkbDDXAccessXBeep(kbd, _BEEP_FEATURE_ON, change); } } else if (filter->keycode == keycode) { change = filter->priv; if (change) { xkbControlsNotify cn; XkbSrvLedInfoPtr sli; ctrls->enabled_ctrls &= ~change; if (XkbComputeControlsNotify(kbd, &old, ctrls, &cn, FALSE)) { cn.keycode = keycode; cn.eventType = KeyRelease; cn.requestMajor = 0; cn.requestMinor = 0; XkbSendControlsNotify(kbd, &cn); } XkbSetCauseKey(&cause, keycode, KeyRelease); /* If sticky keys were disabled, clear all locks and latches */ if ((old.enabled_ctrls & XkbStickyKeysMask) && (!(ctrls->enabled_ctrls & XkbStickyKeysMask))) { XkbClearAllLatchesAndLocks(kbd, xkbi, FALSE, &cause); } sli = XkbFindSrvLedInfo(kbd, XkbDfltXIClass, XkbDfltXIId, 0); XkbUpdateIndicators(kbd, sli->usesControls, TRUE, NULL, &cause); if (XkbAX_NeedFeedback(ctrls, XkbAX_FeatureFBMask)) XkbDDXAccessXBeep(kbd, _BEEP_FEATURE_OFF, change); } filter->keycode = 0; filter->active = 0; } return 1; } static int _XkbFilterActionMessage(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { XkbMessageAction *pMsg; DeviceIntPtr kbd; if ((filter->keycode != 0) && (filter->keycode != keycode)) return 1; /* This can happen if the key repeats, and the state (modifiers or group) changes meanwhile. */ if ((filter->keycode == keycode) && pAction && (pAction->type != XkbSA_ActionMessage)) return 1; kbd = xkbi->device; if (filter->keycode == 0) { /* initial press */ pMsg = &pAction->msg; if ((pMsg->flags & XkbSA_MessageOnRelease) || ((pMsg->flags & XkbSA_MessageGenKeyEvent) == 0)) { filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->priv = 0; filter->filter = _XkbFilterActionMessage; filter->upAction = *pAction; } if (pMsg->flags & XkbSA_MessageOnPress) { xkbActionMessage msg; msg.keycode = keycode; msg.press = 1; msg.keyEventFollows = ((pMsg->flags & XkbSA_MessageGenKeyEvent) != 0); memcpy((char *) msg.message, (char *) pMsg->message, XkbActionMessageLength); XkbSendActionMessage(kbd, &msg); } return ((pAction->msg.flags & XkbSA_MessageGenKeyEvent) != 0); } else if (filter->keycode == keycode) { pMsg = &filter->upAction.msg; if (pAction == NULL) { if (pMsg->flags & XkbSA_MessageOnRelease) { xkbActionMessage msg; msg.keycode = keycode; msg.press = 0; msg.keyEventFollows = ((pMsg->flags & XkbSA_MessageGenKeyEvent) != 0); memcpy((char *) msg.message, (char *) pMsg->message, XkbActionMessageLength); XkbSendActionMessage(kbd, &msg); } filter->keycode = 0; filter->active = 0; return ((pMsg->flags & XkbSA_MessageGenKeyEvent) != 0); } else if (memcmp(pMsg, pAction, 8) == 0) { /* Repeat: If we send the same message, avoid multiple messages on release from piling up. */ filter->keycode = 0; filter->active = 0; } } return 1; } static int _XkbFilterRedirectKey(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { DeviceEvent ev; int x, y; XkbStateRec old, old_prev; unsigned mods, mask; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(xkbi->device); ProcessInputProc backupproc; if ((filter->keycode != 0) && (filter->keycode != keycode)) return 1; /* This can happen if the key repeats, and the state (modifiers or group) changes meanwhile. */ if ((filter->keycode == keycode) && pAction && (pAction->type != XkbSA_RedirectKey)) return 1; /* never actually used uninitialised, but gcc isn't smart enough * to work that out. */ memset(&old, 0, sizeof(old)); memset(&old_prev, 0, sizeof(old_prev)); memset(&ev, 0, sizeof(ev)); GetSpritePosition(xkbi->device, &x, &y); ev.header = ET_Internal; ev.length = sizeof(DeviceEvent); ev.time = GetTimeInMillis(); ev.root_x = x; ev.root_y = y; /* redirect actions do not work across devices, therefore the following is * correct: */ ev.deviceid = xkbi->device->id; /* filter->priv must be set up by the caller for the initial press. */ ev.sourceid = filter->priv; if (filter->keycode == 0) { /* initial press */ if ((pAction->redirect.new_key < xkbi->desc->min_key_code) || (pAction->redirect.new_key > xkbi->desc->max_key_code)) { return 1; } filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->filter = _XkbFilterRedirectKey; filter->upAction = *pAction; ev.type = ET_KeyPress; ev.detail.key = pAction->redirect.new_key; mask = XkbSARedirectVModsMask(&pAction->redirect); mods = XkbSARedirectVMods(&pAction->redirect); if (mask) XkbVirtualModsToReal(xkbi->desc, mask, &mask); if (mods) XkbVirtualModsToReal(xkbi->desc, mods, &mods); mask |= pAction->redirect.mods_mask; mods |= pAction->redirect.mods; if (mask || mods) { old = xkbi->state; old_prev = xkbi->prev_state; xkbi->state.base_mods &= ~mask; xkbi->state.base_mods |= (mods & mask); xkbi->state.latched_mods &= ~mask; xkbi->state.latched_mods |= (mods & mask); xkbi->state.locked_mods &= ~mask; xkbi->state.locked_mods |= (mods & mask); XkbComputeDerivedState(xkbi); xkbi->prev_state = xkbi->state; } UNWRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc); xkbi->device->public.processInputProc((InternalEvent *) &ev, xkbi->device); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc, xkbUnwrapProc); if (mask || mods) { xkbi->state = old; xkbi->prev_state = old_prev; } return 0; } else { /* If it is a key release, or we redirect to another key, release the previous new_key. Otherwise, repeat. */ ev.detail.key = filter->upAction.redirect.new_key; if (pAction == NULL || ev.detail.key != pAction->redirect.new_key) { ev.type = ET_KeyRelease; filter->active = 0; } else { ev.type = ET_KeyPress; ev.key_repeat = TRUE; } mask = XkbSARedirectVModsMask(&filter->upAction.redirect); mods = XkbSARedirectVMods(&filter->upAction.redirect); if (mask) XkbVirtualModsToReal(xkbi->desc, mask, &mask); if (mods) XkbVirtualModsToReal(xkbi->desc, mods, &mods); mask |= filter->upAction.redirect.mods_mask; mods |= filter->upAction.redirect.mods; if (mask || mods) { old = xkbi->state; old_prev = xkbi->prev_state; xkbi->state.base_mods &= ~mask; xkbi->state.base_mods |= (mods & mask); xkbi->state.latched_mods &= ~mask; xkbi->state.latched_mods |= (mods & mask); xkbi->state.locked_mods &= ~mask; xkbi->state.locked_mods |= (mods & mask); XkbComputeDerivedState(xkbi); xkbi->prev_state = xkbi->state; } UNWRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc); xkbi->device->public.processInputProc((InternalEvent *) &ev, xkbi->device); COND_WRAP_PROCESS_INPUT_PROC(xkbi->device, xkbPrivPtr, backupproc, xkbUnwrapProc); if (mask || mods) { xkbi->state = old; xkbi->prev_state = old_prev; } /* We return 1 in case we have sent a release event because the new_key has changed. Then, subsequently, we will call this function again with the same pAction, which will create the press for the new new_key. */ return (pAction && ev.detail.key != pAction->redirect.new_key); } } static int _XkbFilterSwitchScreen(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { DeviceIntPtr dev = xkbi->device; if (dev == inputInfo.keyboard) return 0; if (filter->keycode == 0) { /* initial press */ filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->filter = _XkbFilterSwitchScreen; AccessXCancelRepeatKey(xkbi, keycode); XkbDDXSwitchScreen(dev, keycode, pAction); return 0; } else if (filter->keycode == keycode) { filter->active = 0; return 0; } return 1; } static int XkbHandlePrivate(DeviceIntPtr dev, KeyCode keycode, XkbAction *pAction) { XkbAnyAction *xkb_act = &(pAction->any); if (xkb_act->type == XkbSA_XFree86Private) { char msgbuf[XkbAnyActionDataSize + 1]; memcpy(msgbuf, xkb_act->data, XkbAnyActionDataSize); msgbuf[XkbAnyActionDataSize] = '\0'; if (strcasecmp(msgbuf, "prgrbs") == 0) { DeviceIntPtr tmp; LogMessage(X_INFO, "Printing all currently active device grabs:\n"); for (tmp = inputInfo.devices; tmp; tmp = tmp->next) if (tmp->deviceGrab.grab) PrintDeviceGrabInfo(tmp); LogMessage(X_INFO, "End list of active device grabs\n"); PrintPassiveGrabs(); } else if (strcasecmp(msgbuf, "ungrab") == 0) { LogMessage(X_INFO, "Ungrabbing devices\n"); UngrabAllDevices(FALSE); } else if (strcasecmp(msgbuf, "clsgrb") == 0) { LogMessage(X_INFO, "Clear grabs\n"); UngrabAllDevices(TRUE); } else if (strcasecmp(msgbuf, "prwins") == 0) { LogMessage(X_INFO, "Printing window tree\n"); PrintWindowTree(); } } return XkbDDXPrivate(dev, keycode, pAction); } static int _XkbFilterXF86Private(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { DeviceIntPtr dev = xkbi->device; if (dev == inputInfo.keyboard) return 0; if (filter->keycode == 0) { /* initial press */ filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->filter = _XkbFilterXF86Private; XkbHandlePrivate(dev, keycode, pAction); return 0; } else if (filter->keycode == keycode) { filter->active = 0; return 0; } return 1; } static int _XkbFilterDeviceBtn(XkbSrvInfoPtr xkbi, XkbFilterPtr filter, unsigned keycode, XkbAction *pAction) { if (xkbi->device == inputInfo.keyboard) return 0; if (filter->keycode == 0) { /* initial press */ DeviceIntPtr dev; int button; _XkbLookupButtonDevice(&dev, pAction->devbtn.device, serverClient, DixUnknownAccess, &button); if (!dev || !dev->public.on) return 1; button = pAction->devbtn.button; if ((button < 1) || (button > dev->button->numButtons)) return 1; filter->keycode = keycode; filter->active = 1; filter->filterOthers = 0; filter->priv = 0; filter->filter = _XkbFilterDeviceBtn; filter->upAction = *pAction; switch (pAction->type) { case XkbSA_LockDeviceBtn: if ((pAction->devbtn.flags & XkbSA_LockNoLock) || BitIsOn(dev->button->down, button)) return 0; XkbFakeDeviceButton(dev, TRUE, button); filter->upAction.type = XkbSA_NoAction; break; case XkbSA_DeviceBtn: if (pAction->devbtn.count > 0) { int nClicks, i; nClicks = pAction->btn.count; for (i = 0; i < nClicks; i++) { XkbFakeDeviceButton(dev, TRUE, button); XkbFakeDeviceButton(dev, FALSE, button); } filter->upAction.type = XkbSA_NoAction; } else XkbFakeDeviceButton(dev, TRUE, button); break; } } else if (filter->keycode == keycode) { DeviceIntPtr dev; int button; filter->active = 0; _XkbLookupButtonDevice(&dev, filter->upAction.devbtn.device, serverClient, DixUnknownAccess, &button); if (!dev || !dev->public.on) return 1; button = filter->upAction.btn.button; switch (filter->upAction.type) { case XkbSA_LockDeviceBtn: if ((filter->upAction.devbtn.flags & XkbSA_LockNoUnlock) || !BitIsOn(dev->button->down, button)) return 0; XkbFakeDeviceButton(dev, FALSE, button); break; case XkbSA_DeviceBtn: XkbFakeDeviceButton(dev, FALSE, button); break; } filter->active = 0; } return 0; } static XkbFilterPtr _XkbNextFreeFilter(XkbSrvInfoPtr xkbi) { register int i; if (xkbi->szFilters == 0) { xkbi->szFilters = 4; xkbi->filters = calloc(xkbi->szFilters, sizeof(XkbFilterRec)); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ } for (i = 0; i < xkbi->szFilters; i++) { if (!xkbi->filters[i].active) { xkbi->filters[i].keycode = 0; return &xkbi->filters[i]; } } xkbi->szFilters *= 2; xkbi->filters = reallocarray(xkbi->filters, xkbi->szFilters, sizeof(XkbFilterRec)); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ memset(&xkbi->filters[xkbi->szFilters / 2], 0, (xkbi->szFilters / 2) * sizeof(XkbFilterRec)); return &xkbi->filters[xkbi->szFilters / 2]; } static int _XkbApplyFilters(XkbSrvInfoPtr xkbi, unsigned kc, XkbAction *pAction) { register int i, send; send = 1; for (i = 0; i < xkbi->szFilters; i++) { if ((xkbi->filters[i].active) && (xkbi->filters[i].filter)) send = ((*xkbi->filters[i].filter) (xkbi, &xkbi->filters[i], kc, pAction) && send); } return send; } static int _XkbEnsureStateChange(XkbSrvInfoPtr xkbi) { Bool genStateNotify = FALSE; /* The state may change, so if we're not in the middle of sending a state * notify, prepare for it */ if ((xkbi->flags & _XkbStateNotifyInProgress) == 0) { xkbi->prev_state = xkbi->state; xkbi->flags |= _XkbStateNotifyInProgress; genStateNotify = TRUE; } return genStateNotify; } static void _XkbApplyState(DeviceIntPtr dev, Bool genStateNotify, int evtype, int key) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; int changed; XkbComputeDerivedState(xkbi); changed = XkbStateChangedFlags(&xkbi->prev_state, &xkbi->state); if (genStateNotify) { if (changed) { xkbStateNotify sn; sn.keycode = key; sn.eventType = evtype; sn.requestMajor = sn.requestMinor = 0; sn.changed = changed; XkbSendStateNotify(dev, &sn); } xkbi->flags &= ~_XkbStateNotifyInProgress; } changed = XkbIndicatorsToUpdate(dev, changed, FALSE); if (changed) { XkbEventCauseRec cause; XkbSetCauseKey(&cause, key, evtype); XkbUpdateIndicators(dev, changed, FALSE, NULL, &cause); } } void XkbPushLockedStateToSlaves(DeviceIntPtr master, int evtype, int key) { DeviceIntPtr dev; Bool genStateNotify; nt_list_for_each_entry(dev, inputInfo.devices, next) { if (!dev->key || GetMaster(dev, MASTER_KEYBOARD) != master) continue; genStateNotify = _XkbEnsureStateChange(dev->key->xkbInfo); dev->key->xkbInfo->state.locked_mods = master->key->xkbInfo->state.locked_mods; _XkbApplyState(dev, genStateNotify, evtype, key); } } static void XkbActionGetFilter(DeviceIntPtr dev, DeviceEvent *event, KeyCode key, XkbAction *act, int *sendEvent) { XkbSrvInfoPtr xkbi = dev->key->xkbInfo; XkbFilterPtr filter; /* For focus events, we only want to run actions which update our state to * (hopefully vaguely kinda) match that of the host server, rather than * actually execute anything. For example, if we enter our VT with * Ctrl+Alt+Backspace held down, we don't want to terminate our server * immediately, but we _do_ want Ctrl+Alt to be latched down, so if * Backspace is released and then pressed again, the server will terminate. * * This is pretty flaky, and we should in fact inherit the complete state * from the host server. There are some state combinations that we cannot * express by running the state machine over every key, e.g. if AltGr+Shift * generates a different state to Shift+AltGr. */ if (event->source_type == EVENT_SOURCE_FOCUS) { switch (act->type) { case XkbSA_SetMods: case XkbSA_SetGroup: case XkbSA_LatchMods: case XkbSA_LatchGroup: case XkbSA_LockMods: case XkbSA_LockGroup: break; default: *sendEvent = 1; return; } } switch (act->type) { case XkbSA_SetMods: case XkbSA_SetGroup: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterSetState(xkbi, filter, key, act); break; case XkbSA_LatchMods: case XkbSA_LatchGroup: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterLatchState(xkbi, filter, key, act); break; case XkbSA_LockMods: case XkbSA_LockGroup: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterLockState(xkbi, filter, key, act); break; case XkbSA_ISOLock: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterISOLock(xkbi, filter, key, act); break; case XkbSA_MovePtr: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterPointerMove(xkbi, filter, key, act); break; case XkbSA_PtrBtn: case XkbSA_LockPtrBtn: case XkbSA_SetPtrDflt: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterPointerBtn(xkbi, filter, key, act); break; case XkbSA_Terminate: *sendEvent = XkbDDXTerminateServer(dev, key, act); break; case XkbSA_SwitchScreen: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterSwitchScreen(xkbi, filter, key, act); break; case XkbSA_SetControls: case XkbSA_LockControls: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterControls(xkbi, filter, key, act); break; case XkbSA_ActionMessage: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterActionMessage(xkbi, filter, key, act); break; case XkbSA_RedirectKey: filter = _XkbNextFreeFilter(xkbi); /* redirect actions must create a new DeviceEvent. The * source device id for this event cannot be obtained from * xkbi, so we pass it here explicitly. The field deviceid * equals to xkbi->device->id. */ filter->priv = event->sourceid; *sendEvent = _XkbFilterRedirectKey(xkbi, filter, key, act); break; case XkbSA_DeviceBtn: case XkbSA_LockDeviceBtn: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterDeviceBtn(xkbi, filter, key, act); break; case XkbSA_XFree86Private: filter = _XkbNextFreeFilter(xkbi); *sendEvent = _XkbFilterXF86Private(xkbi, filter, key, act); break; } } void XkbHandleActions(DeviceIntPtr dev, DeviceIntPtr kbd, DeviceEvent *event) { int key, bit, i; XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int sendEvent; Bool genStateNotify; XkbAction act; Bool keyEvent; Bool pressEvent; ProcessInputProc backupproc; xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); keyc = kbd->key; xkbi = keyc->xkbInfo; key = event->detail.key; genStateNotify = _XkbEnsureStateChange(xkbi); xkbi->clearMods = xkbi->setMods = 0; xkbi->groupChange = 0; sendEvent = 1; keyEvent = ((event->type == ET_KeyPress) || (event->type == ET_KeyRelease)); pressEvent = ((event->type == ET_KeyPress) || (event->type == ET_ButtonPress)); if (pressEvent) { if (keyEvent) act = XkbGetKeyAction(xkbi, &xkbi->state, key); else { act = XkbGetButtonAction(kbd, dev, key); key |= BTN_ACT_FLAG; } sendEvent = _XkbApplyFilters(xkbi, key, &act); if (sendEvent) XkbActionGetFilter(dev, event, key, &act, &sendEvent); } else { if (!keyEvent) key |= BTN_ACT_FLAG; sendEvent = _XkbApplyFilters(xkbi, key, NULL); } if (xkbi->groupChange != 0) xkbi->state.base_group += xkbi->groupChange; if (xkbi->setMods) { for (i = 0, bit = 1; xkbi->setMods; i++, bit <<= 1) { if (xkbi->setMods & bit) { keyc->modifierKeyCount[i]++; xkbi->state.base_mods |= bit; xkbi->setMods &= ~bit; } } } if (xkbi->clearMods) { for (i = 0, bit = 1; xkbi->clearMods; i++, bit <<= 1) { if (xkbi->clearMods & bit) { keyc->modifierKeyCount[i]--; if (keyc->modifierKeyCount[i] <= 0) { xkbi->state.base_mods &= ~bit; keyc->modifierKeyCount[i] = 0; } xkbi->clearMods &= ~bit; } } } if (sendEvent) { DeviceIntPtr tmpdev; if (keyEvent) tmpdev = dev; else tmpdev = GetMaster(dev, POINTER_OR_FLOAT); UNWRAP_PROCESS_INPUT_PROC(tmpdev, xkbPrivPtr, backupproc); dev->public.processInputProc((InternalEvent *) event, tmpdev); COND_WRAP_PROCESS_INPUT_PROC(tmpdev, xkbPrivPtr, backupproc, xkbUnwrapProc); } else if (keyEvent) { FixKeyState(event, dev); } _XkbApplyState(dev, genStateNotify, event->type, key); XkbPushLockedStateToSlaves(dev, event->type, key); } int XkbLatchModifiers(DeviceIntPtr pXDev, CARD8 mask, CARD8 latches) { XkbSrvInfoPtr xkbi; XkbFilterPtr filter; XkbAction act; unsigned clear; if (pXDev && pXDev->key && pXDev->key->xkbInfo) { xkbi = pXDev->key->xkbInfo; clear = (mask & (~latches)); xkbi->state.latched_mods &= ~clear; /* Clear any pending latch to locks. */ act.type = XkbSA_NoAction; _XkbApplyFilters(xkbi, SYNTHETIC_KEYCODE, &act); act.type = XkbSA_LatchMods; act.mods.flags = 0; act.mods.mask = mask & latches; filter = _XkbNextFreeFilter(xkbi); _XkbFilterLatchState(xkbi, filter, SYNTHETIC_KEYCODE, &act); _XkbFilterLatchState(xkbi, filter, SYNTHETIC_KEYCODE, (XkbAction *) NULL); return Success; } return BadValue; } int XkbLatchGroup(DeviceIntPtr pXDev, int group) { XkbSrvInfoPtr xkbi; XkbFilterPtr filter; XkbAction act; if (pXDev && pXDev->key && pXDev->key->xkbInfo) { xkbi = pXDev->key->xkbInfo; act.type = XkbSA_LatchGroup; act.group.flags = 0; XkbSASetGroup(&act.group, group); filter = _XkbNextFreeFilter(xkbi); _XkbFilterLatchState(xkbi, filter, SYNTHETIC_KEYCODE, &act); _XkbFilterLatchState(xkbi, filter, SYNTHETIC_KEYCODE, (XkbAction *) NULL); return Success; } return BadValue; } /***====================================================================***/ void XkbClearAllLatchesAndLocks(DeviceIntPtr dev, XkbSrvInfoPtr xkbi, Bool genEv, XkbEventCausePtr cause) { XkbStateRec os; xkbStateNotify sn; sn.changed = 0; os = xkbi->state; if (os.latched_mods) { /* clear all latches */ XkbLatchModifiers(dev, ~0, 0); sn.changed |= XkbModifierLatchMask; } if (os.latched_group) { XkbLatchGroup(dev, 0); sn.changed |= XkbGroupLatchMask; } if (os.locked_mods) { xkbi->state.locked_mods = 0; sn.changed |= XkbModifierLockMask; } if (os.locked_group) { xkbi->state.locked_group = 0; sn.changed |= XkbGroupLockMask; } if (genEv && sn.changed) { CARD32 changed; XkbComputeDerivedState(xkbi); sn.keycode = cause->kc; sn.eventType = cause->event; sn.requestMajor = cause->mjr; sn.requestMinor = cause->mnr; sn.changed = XkbStateChangedFlags(&os, &xkbi->state); XkbSendStateNotify(dev, &sn); changed = XkbIndicatorsToUpdate(dev, sn.changed, FALSE); if (changed) { XkbUpdateIndicators(dev, changed, TRUE, NULL, cause); } } return; } /* * The event is injected into the event processing, not the EQ. Thus, * ensure that we restore the master after the event sequence to the * original set of classes. Otherwise, the master remains on the XTEST * classes and drops events that don't fit into the XTEST layout (e.g. * events with more than 2 valuators). * * FIXME: EQ injection in the processing stage is not designed for, so this * is a rather awkward hack. The event list returned by GetPointerEvents() * and friends is always prefixed with a DCE if the last _posted_ device was * different. For normal events, this sequence then resets the master during * the processing stage. Since we inject the PointerKey events in the * processing stage though, we need to manually reset to restore the * previous order, because the events already in the EQ must be sent for the * right device. * So we post-fix the event list we get from GPE with a DCE back to the * previous slave device. * * First one on drinking island wins! */ static void InjectPointerKeyEvents(DeviceIntPtr dev, int type, int button, int flags, ValuatorMask *mask) { ScreenPtr pScreen; InternalEvent *events; int nevents, i; DeviceIntPtr ptr, mpointer, lastSlave = NULL; Bool saveWait; if (IsMaster(dev)) { mpointer = GetMaster(dev, MASTER_POINTER); lastSlave = mpointer->lastSlave; ptr = GetXTestDevice(mpointer); } else if (IsFloating(dev)) ptr = dev; else return; events = InitEventList(GetMaximumEventsNum() + 1); input_lock(); pScreen = miPointerGetScreen(ptr); saveWait = miPointerSetWaitForUpdate(pScreen, FALSE); nevents = GetPointerEvents(events, ptr, type, button, flags, mask); if (IsMaster(dev) && (lastSlave && lastSlave != ptr)) UpdateFromMaster(&events[nevents], lastSlave, DEVCHANGE_POINTER_EVENT, &nevents); miPointerSetWaitForUpdate(pScreen, saveWait); for (i = 0; i < nevents; i++) mieqProcessDeviceEvent(ptr, &events[i], NULL); input_unlock(); FreeEventList(events, GetMaximumEventsNum()); } static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x, int y) { ValuatorMask mask; int gpe_flags = 0; /* ignore attached SDs */ if (!IsMaster(dev) && !IsFloating(dev)) return; if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) gpe_flags = POINTER_ABSOLUTE; else gpe_flags = POINTER_RELATIVE; valuator_mask_set_range(&mask, 0, 2, (int[]) { x, y}); InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, &mask); } void XkbFakeDeviceButton(DeviceIntPtr dev, Bool press, int button) { DeviceIntPtr ptr; int down; /* If dev is a slave device, and the SD is attached, do nothing. If we'd * post through the attached master pointer we'd get duplicate events. * * if dev is a master keyboard, post through the XTEST device * * if dev is a floating slave, post through the device itself. */ if (IsMaster(dev)) { DeviceIntPtr mpointer = GetMaster(dev, MASTER_POINTER); ptr = GetXTestDevice(mpointer); } else if (IsFloating(dev)) ptr = dev; else return; down = button_is_down(ptr, button, BUTTON_PROCESSED); if (press == down) return; InjectPointerKeyEvents(dev, press ? ButtonPress : ButtonRelease, button, 0, NULL); } xorg-server-21.1.16/xkb/xkbPrKeyEv.c0000644000175000017500000001626414757411105012626 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "exevents.h" #include "eventstr.h" #include #include #include "events.h" /***====================================================================***/ void XkbProcessKeyboardEvent(DeviceEvent *event, DeviceIntPtr keybd) { KeyClassPtr keyc = keybd->key; XkbSrvInfoPtr xkbi; int key; XkbBehavior behavior; unsigned ndx; xkbi = keyc->xkbInfo; key = event->detail.key; if (xkbDebugFlags & 0x8) DebugF("[xkb] XkbPKE: Key %d %s\n", key, (event->type == ET_KeyPress ? "down" : "up")); if (xkbi->repeatKey == key && event->type == ET_KeyRelease && !(xkbi->desc->ctrls->enabled_ctrls & XkbRepeatKeysMask)) AccessXCancelRepeatKey(xkbi, key); behavior = xkbi->desc->server->behaviors[key]; /* The "permanent" flag indicates a hard-wired behavior that occurs */ /* below XKB, such as a key that physically locks. XKB does not */ /* do anything to implement the behavior, but it *does* report that */ /* key is hardwired */ if (!(behavior.type & XkbKB_Permanent)) { switch (behavior.type) { case XkbKB_Default: /* Neither of these should happen in practice, but ignore them anyway. */ if (event->type == ET_KeyPress && !event->key_repeat && key_is_down(keybd, key, KEY_PROCESSED)) return; else if (event->type == ET_KeyRelease && !key_is_down(keybd, key, KEY_PROCESSED)) return; break; case XkbKB_Lock: if (event->type == ET_KeyRelease) return; else if (key_is_down(keybd, key, KEY_PROCESSED)) event->type = ET_KeyRelease; break; case XkbKB_RadioGroup: ndx = (behavior.data & (~XkbKB_RGAllowNone)); if (ndx < xkbi->nRadioGroups) { XkbRadioGroupPtr rg; if (event->type == ET_KeyRelease) return; rg = &xkbi->radioGroups[ndx]; if (rg->currentDown == event->detail.key) { if (behavior.data & XkbKB_RGAllowNone) { event->type = ET_KeyRelease; XkbHandleActions(keybd, keybd, event); rg->currentDown = 0; } return; } if (rg->currentDown != 0) { int tmpkey = event->detail.key; event->type = ET_KeyRelease; event->detail.key = rg->currentDown; XkbHandleActions(keybd, keybd, event); event->type = ET_KeyPress; event->detail.key = tmpkey; } rg->currentDown = key; } else ErrorF("[xkb] InternalError! Illegal radio group %d\n", ndx); break; case XkbKB_Overlay1: case XkbKB_Overlay2: { unsigned which; unsigned overlay_active_now; unsigned is_keyrelease = (event->type == ET_KeyRelease) ? 1 : 0; /* Remembers whether the key was pressed while overlay was down, * for when overlay is already released, but the key is not. */ unsigned key_was_overlaid = 0; if (behavior.type == XkbKB_Overlay1) which = XkbOverlay1Mask; else which = XkbOverlay2Mask; overlay_active_now = (xkbi->desc->ctrls->enabled_ctrls & which) ? 1 : 0; if ((unsigned char)key == key) { key_was_overlaid = BitIsOn(xkbi->overlay_perkey_state, key); if (!is_keyrelease) { if (overlay_active_now) SetBit(xkbi->overlay_perkey_state, key); } else { if (key_was_overlaid) ClearBit(xkbi->overlay_perkey_state, key); } } if ((overlay_active_now || key_was_overlaid) && (behavior.data >= xkbi->desc->min_key_code) && (behavior.data <= xkbi->desc->max_key_code)) { event->detail.key = behavior.data; } } break; default: ErrorF("[xkb] unknown key behavior 0x%04x\n", behavior.type); break; } } XkbHandleActions(keybd, keybd, event); return; } void ProcessKeyboardEvent(InternalEvent *ev, DeviceIntPtr keybd) { KeyClassPtr keyc = keybd->key; XkbSrvInfoPtr xkbi = NULL; ProcessInputProc backup_proc; xkbDeviceInfoPtr xkb_priv = XKBDEVICEINFO(keybd); DeviceEvent *event = &ev->device_event; int is_press = (event->type == ET_KeyPress); int is_release = (event->type == ET_KeyRelease); /* We're only interested in key events. */ if (!is_press && !is_release) { UNWRAP_PROCESS_INPUT_PROC(keybd, xkb_priv, backup_proc); keybd->public.processInputProc(ev, keybd); COND_WRAP_PROCESS_INPUT_PROC(keybd, xkb_priv, backup_proc, xkbUnwrapProc); return; } xkbi = keyc->xkbInfo; /* If AccessX filters are active, then pass it through to * AccessXFilter{Press,Release}Event; else, punt to * XkbProcessKeyboardEvent. * * If AXF[PK]E don't intercept anything (which they probably won't), * they'll punt through XPKE anyway. */ if ((xkbi->desc->ctrls->enabled_ctrls & XkbAllFilteredEventsMask)) { if (is_press) AccessXFilterPressEvent(event, keybd); else if (is_release) AccessXFilterReleaseEvent(event, keybd); return; } else { XkbProcessKeyboardEvent(event, keybd); } return; } xorg-server-21.1.16/xkb/maprules.c0000644000175000017500000007151014757411105012417 /************************************************************ Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #define X_INCLUDE_STRING_H #define XOS_USE_NO_LOCKING #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "dix.h" #include "os.h" #include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS #include /***====================================================================***/ #define DFLT_LINE_SIZE 128 typedef struct { int line_num; int sz_line; int num_line; char buf[DFLT_LINE_SIZE]; char *line; } InputLine; static void InitInputLine(InputLine * line) { line->line_num = 1; line->num_line = 0; line->sz_line = DFLT_LINE_SIZE; line->line = line->buf; return; } static void FreeInputLine(InputLine * line) { if (line->line != line->buf) free(line->line); line->line_num = 1; line->num_line = 0; line->sz_line = DFLT_LINE_SIZE; line->line = line->buf; return; } static int InputLineAddChar(InputLine * line, int ch) { if (line->num_line >= line->sz_line) { if (line->line == line->buf) { line->line = xallocarray(line->sz_line, 2); memcpy(line->line, line->buf, line->sz_line); } else { line->line = reallocarray(line->line, line->sz_line, 2); } line->sz_line *= 2; } line->line[line->num_line++] = ch; return ch; } #define ADD_CHAR(l,c) ((l)->num_line<(l)->sz_line?\ (int)((l)->line[(l)->num_line++]= (c)):\ InputLineAddChar(l,c)) static Bool GetInputLine(FILE * file, InputLine * line, Bool checkbang) { int ch; Bool endOfFile, spacePending, slashPending, inComment; endOfFile = FALSE; while ((!endOfFile) && (line->num_line == 0)) { spacePending = slashPending = inComment = FALSE; while (((ch = getc(file)) != '\n') && (ch != EOF)) { if (ch == '\\') { if ((ch = getc(file)) == EOF) break; if (ch == '\n') { inComment = FALSE; ch = ' '; line->line_num++; } } if (inComment) continue; if (ch == '/') { if (slashPending) { inComment = TRUE; slashPending = FALSE; } else { slashPending = TRUE; } continue; } else if (slashPending) { if (spacePending) { ADD_CHAR(line, ' '); spacePending = FALSE; } ADD_CHAR(line, '/'); slashPending = FALSE; } if (isspace(ch)) { while (isspace(ch) && (ch != '\n') && (ch != EOF)) { ch = getc(file); } if (ch == EOF) break; if ((ch != '\n') && (line->num_line > 0)) spacePending = TRUE; ungetc(ch, file); } else { if (spacePending) { ADD_CHAR(line, ' '); spacePending = FALSE; } if (checkbang && ch == '!') { if (line->num_line != 0) { DebugF("The '!' legal only at start of line\n"); DebugF("Line containing '!' ignored\n"); line->num_line = 0; inComment = 0; break; } } ADD_CHAR(line, ch); } } if (ch == EOF) endOfFile = TRUE; /* else line->num_line++;*/ } if ((line->num_line == 0) && (endOfFile)) return FALSE; ADD_CHAR(line, '\0'); return TRUE; } /***====================================================================***/ #define MODEL 0 #define LAYOUT 1 #define VARIANT 2 #define OPTION 3 #define KEYCODES 4 #define SYMBOLS 5 #define TYPES 6 #define COMPAT 7 #define GEOMETRY 8 #define MAX_WORDS 9 #define PART_MASK 0x000F #define COMPONENT_MASK 0x03F0 static const char *cname[MAX_WORDS] = { "model", "layout", "variant", "option", "keycodes", "symbols", "types", "compat", "geometry" }; typedef struct _RemapSpec { int number; int num_remap; struct { int word; int index; } remap[MAX_WORDS]; } RemapSpec; typedef struct _FileSpec { char *name[MAX_WORDS]; struct _FileSpec *pending; } FileSpec; typedef struct { const char *model; const char *layout[XkbNumKbdGroups + 1]; const char *variant[XkbNumKbdGroups + 1]; const char *options; } XkbRF_MultiDefsRec, *XkbRF_MultiDefsPtr; #define NDX_BUFF_SIZE 4 /***====================================================================***/ static char * get_index(char *str, int *ndx) { char ndx_buf[NDX_BUFF_SIZE]; char *end; if (*str != '[') { *ndx = 0; return str; } str++; end = strchr(str, ']'); if (end == NULL) { *ndx = -1; return str - 1; } if ((end - str) >= NDX_BUFF_SIZE) { *ndx = -1; return end + 1; } strlcpy(ndx_buf, str, 1 + end - str); *ndx = atoi(ndx_buf); return end + 1; } static void SetUpRemap(InputLine * line, RemapSpec * remap) { char *tok, *str; unsigned present, l_ndx_present, v_ndx_present; register int i; int len, ndx; _Xstrtokparams strtok_buf; Bool found; l_ndx_present = v_ndx_present = present = 0; str = &line->line[1]; len = remap->number; memset((char *) remap, 0, sizeof(RemapSpec)); remap->number = len; while ((tok = _XStrtok(str, " ", strtok_buf)) != NULL) { found = FALSE; str = NULL; if (strcmp(tok, "=") == 0) continue; for (i = 0; i < MAX_WORDS; i++) { len = strlen(cname[i]); if (strncmp(cname[i], tok, len) == 0) { if (strlen(tok) > len) { char *end = get_index(tok + len, &ndx); if ((i != LAYOUT && i != VARIANT) || *end != '\0' || ndx == -1) break; if (ndx < 1 || ndx > XkbNumKbdGroups) { DebugF("Illegal %s index: %d\n", cname[i], ndx); DebugF("Index must be in range 1..%d\n", XkbNumKbdGroups); break; } } else { ndx = 0; } found = TRUE; if (present & (1 << i)) { if ((i == LAYOUT && l_ndx_present & (1 << ndx)) || (i == VARIANT && v_ndx_present & (1 << ndx))) { DebugF("Component \"%s\" listed twice\n", tok); DebugF("Second definition ignored\n"); break; } } present |= (1 << i); if (i == LAYOUT) l_ndx_present |= 1 << ndx; if (i == VARIANT) v_ndx_present |= 1 << ndx; remap->remap[remap->num_remap].word = i; remap->remap[remap->num_remap++].index = ndx; break; } } if (!found) { fprintf(stderr, "Unknown component \"%s\" ignored\n", tok); } } if ((present & PART_MASK) == 0) { unsigned mask = PART_MASK; ErrorF("Mapping needs at least one of "); for (i = 0; (i < MAX_WORDS); i++) { if ((1L << i) & mask) { mask &= ~(1L << i); if (mask) DebugF("\"%s,\" ", cname[i]); else DebugF("or \"%s\"\n", cname[i]); } } DebugF("Illegal mapping ignored\n"); remap->num_remap = 0; return; } if ((present & COMPONENT_MASK) == 0) { DebugF("Mapping needs at least one component\n"); DebugF("Illegal mapping ignored\n"); remap->num_remap = 0; return; } remap->number++; return; } static Bool MatchOneOf(const char *wanted, const char *vals_defined) { const char *str, *next; int want_len = strlen(wanted); for (str = vals_defined, next = NULL; str != NULL; str = next) { int len; next = strchr(str, ','); if (next) { len = next - str; next++; } else { len = strlen(str); } if ((len == want_len) && (strncmp(wanted, str, len) == 0)) return TRUE; } return FALSE; } /***====================================================================***/ static Bool CheckLine(InputLine * line, RemapSpec * remap, XkbRF_RulePtr rule, XkbRF_GroupPtr group) { char *str, *tok; register int nread, i; FileSpec tmp; _Xstrtokparams strtok_buf; Bool append = FALSE; if (line->line[0] == '!') { if (line->line[1] == '$' || (line->line[1] == ' ' && line->line[2] == '$')) { char *gname = strchr(line->line, '$'); char *words = strchr(gname, ' '); if (!words) return FALSE; *words++ = '\0'; for (; *words; words++) { if (*words != '=' && *words != ' ') break; } if (*words == '\0') return FALSE; group->name = Xstrdup(gname); group->words = Xstrdup(words); for (i = 1, words = group->words; *words; words++) { if (*words == ' ') { *words++ = '\0'; i++; } } group->number = i; return TRUE; } else { SetUpRemap(line, remap); return FALSE; } } if (remap->num_remap == 0) { DebugF("Must have a mapping before first line of data\n"); DebugF("Illegal line of data ignored\n"); return FALSE; } memset((char *) &tmp, 0, sizeof(FileSpec)); str = line->line; for (nread = 0; (tok = _XStrtok(str, " ", strtok_buf)) != NULL; nread++) { str = NULL; if (strcmp(tok, "=") == 0) { nread--; continue; } if (nread > remap->num_remap) { DebugF("Too many words on a line\n"); DebugF("Extra word \"%s\" ignored\n", tok); continue; } tmp.name[remap->remap[nread].word] = tok; if (*tok == '+' || *tok == '|') append = TRUE; } if (nread < remap->num_remap) { DebugF("Too few words on a line: %s\n", line->line); DebugF("line ignored\n"); return FALSE; } rule->flags = 0; rule->number = remap->number; if (tmp.name[OPTION]) rule->flags |= XkbRF_Option; else if (append) rule->flags |= XkbRF_Append; else rule->flags |= XkbRF_Normal; rule->model = Xstrdup(tmp.name[MODEL]); rule->layout = Xstrdup(tmp.name[LAYOUT]); rule->variant = Xstrdup(tmp.name[VARIANT]); rule->option = Xstrdup(tmp.name[OPTION]); rule->keycodes = Xstrdup(tmp.name[KEYCODES]); rule->symbols = Xstrdup(tmp.name[SYMBOLS]); rule->types = Xstrdup(tmp.name[TYPES]); rule->compat = Xstrdup(tmp.name[COMPAT]); rule->geometry = Xstrdup(tmp.name[GEOMETRY]); rule->layout_num = rule->variant_num = 0; for (i = 0; i < nread; i++) { if (remap->remap[i].index) { if (remap->remap[i].word == LAYOUT) rule->layout_num = remap->remap[i].index; if (remap->remap[i].word == VARIANT) rule->variant_num = remap->remap[i].index; } } return TRUE; } static char * _Concat(char *str1, const char *str2) { int len; if ((!str1) || (!str2)) return str1; len = strlen(str1) + strlen(str2) + 1; str1 = realloc(str1, len * sizeof(char)); if (str1) strcat(str1, str2); return str1; } static void squeeze_spaces(char *p1) { char *p2; for (p2 = p1; *p2; p2++) { *p1 = *p2; if (*p1 != ' ') p1++; } *p1 = '\0'; } static Bool MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) { char *options; memset((char *) mdefs, 0, sizeof(XkbRF_MultiDefsRec)); mdefs->model = defs->model; options = Xstrdup(defs->options); if (options) squeeze_spaces(options); mdefs->options = options; if (defs->layout) { if (!strchr(defs->layout, ',')) { mdefs->layout[0] = defs->layout; } else { char *p; char *layout; int i; layout = Xstrdup(defs->layout); if (layout == NULL) return FALSE; squeeze_spaces(layout); mdefs->layout[1] = layout; p = layout; for (i = 2; i <= XkbNumKbdGroups; i++) { if ((p = strchr(p, ','))) { *p++ = '\0'; mdefs->layout[i] = p; } else { break; } } if (p && (p = strchr(p, ','))) *p = '\0'; } } if (defs->variant) { if (!strchr(defs->variant, ',')) { mdefs->variant[0] = defs->variant; } else { char *p; char *variant; int i; variant = Xstrdup(defs->variant); if (variant == NULL) return FALSE; squeeze_spaces(variant); mdefs->variant[1] = variant; p = variant; for (i = 2; i <= XkbNumKbdGroups; i++) { if ((p = strchr(p, ','))) { *p++ = '\0'; mdefs->variant[i] = p; } else { break; } } if (p && (p = strchr(p, ','))) *p = '\0'; } } return TRUE; } static void FreeMultiDefs(XkbRF_MultiDefsPtr defs) { free((void *) defs->options); free((void *) defs->layout[1]); free((void *) defs->variant[1]); } static void Apply(const char *src, char **dst) { if (src) { if (*src == '+' || *src == '|') { *dst = _Concat(*dst, src); } else { if (*dst == NULL) *dst = Xstrdup(src); } } } static void XkbRF_ApplyRule(XkbRF_RulePtr rule, XkbComponentNamesPtr names) { rule->flags &= ~XkbRF_PendingMatch; /* clear the flag because it's applied */ Apply(rule->keycodes, &names->keycodes); Apply(rule->symbols, &names->symbols); Apply(rule->types, &names->types); Apply(rule->compat, &names->compat); Apply(rule->geometry, &names->geometry); } static Bool CheckGroup(XkbRF_RulesPtr rules, const char *group_name, const char *name) { int i; char *p; XkbRF_GroupPtr group; for (i = 0, group = rules->groups; i < rules->num_groups; i++, group++) { if (!strcmp(group->name, group_name)) { break; } } if (i == rules->num_groups) return FALSE; for (i = 0, p = group->words; i < group->number; i++, p += strlen(p) + 1) { if (!strcmp(p, name)) { return TRUE; } } return FALSE; } static int XkbRF_CheckApplyRule(XkbRF_RulePtr rule, XkbRF_MultiDefsPtr mdefs, XkbComponentNamesPtr names, XkbRF_RulesPtr rules) { Bool pending = FALSE; if (rule->model != NULL) { if (mdefs->model == NULL) return 0; if (strcmp(rule->model, "*") == 0) { pending = TRUE; } else { if (rule->model[0] == '$') { if (!CheckGroup(rules, rule->model, mdefs->model)) return 0; } else { if (strcmp(rule->model, mdefs->model) != 0) return 0; } } } if (rule->option != NULL) { if (mdefs->options == NULL) return 0; if ((!MatchOneOf(rule->option, mdefs->options))) return 0; } if (rule->layout != NULL) { if (mdefs->layout[rule->layout_num] == NULL || *mdefs->layout[rule->layout_num] == '\0') return 0; if (strcmp(rule->layout, "*") == 0) { pending = TRUE; } else { if (rule->layout[0] == '$') { if (!CheckGroup(rules, rule->layout, mdefs->layout[rule->layout_num])) return 0; } else { if (strcmp(rule->layout, mdefs->layout[rule->layout_num]) != 0) return 0; } } } if (rule->variant != NULL) { if (mdefs->variant[rule->variant_num] == NULL || *mdefs->variant[rule->variant_num] == '\0') return 0; if (strcmp(rule->variant, "*") == 0) { pending = TRUE; } else { if (rule->variant[0] == '$') { if (!CheckGroup(rules, rule->variant, mdefs->variant[rule->variant_num])) return 0; } else { if (strcmp(rule->variant, mdefs->variant[rule->variant_num]) != 0) return 0; } } } if (pending) { rule->flags |= XkbRF_PendingMatch; return rule->number; } /* exact match, apply it now */ XkbRF_ApplyRule(rule, names); return rule->number; } static void XkbRF_ClearPartialMatches(XkbRF_RulesPtr rules) { register int i; XkbRF_RulePtr rule; for (i = 0, rule = rules->rules; i < rules->num_rules; i++, rule++) { rule->flags &= ~XkbRF_PendingMatch; } } static void XkbRF_ApplyPartialMatches(XkbRF_RulesPtr rules, XkbComponentNamesPtr names) { int i; XkbRF_RulePtr rule; for (rule = rules->rules, i = 0; i < rules->num_rules; i++, rule++) { if ((rule->flags & XkbRF_PendingMatch) == 0) continue; XkbRF_ApplyRule(rule, names); } } static void XkbRF_CheckApplyRules(XkbRF_RulesPtr rules, XkbRF_MultiDefsPtr mdefs, XkbComponentNamesPtr names, int flags) { int i; XkbRF_RulePtr rule; int skip; for (rule = rules->rules, i = 0; i < rules->num_rules; rule++, i++) { if ((rule->flags & flags) != flags) continue; skip = XkbRF_CheckApplyRule(rule, mdefs, names, rules); if (skip && !(flags & XkbRF_Option)) { for (; (i < rules->num_rules) && (rule->number == skip); rule++, i++); rule--; i--; } } } /***====================================================================***/ static char * XkbRF_SubstituteVars(char *name, XkbRF_MultiDefsPtr mdefs) { char *str, *outstr, *orig, *var; int len, ndx; orig = name; str = index(name, '%'); if (str == NULL) return name; len = strlen(name); while (str != NULL) { char pfx = str[1]; int extra_len = 0; if ((pfx == '+') || (pfx == '|') || (pfx == '_') || (pfx == '-')) { extra_len = 1; str++; } else if (pfx == '(') { extra_len = 2; str++; } var = str + 1; str = get_index(var + 1, &ndx); if (ndx == -1) { str = index(str, '%'); continue; } if ((*var == 'l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) len += strlen(mdefs->layout[ndx]) + extra_len; else if ((*var == 'm') && mdefs->model) len += strlen(mdefs->model) + extra_len; else if ((*var == 'v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) len += strlen(mdefs->variant[ndx]) + extra_len; if ((pfx == '(') && (*str == ')')) { str++; } str = index(&str[0], '%'); } name = malloc(len + 1); str = orig; outstr = name; while (*str != '\0') { if (str[0] == '%') { char pfx, sfx; str++; pfx = str[0]; sfx = '\0'; if ((pfx == '+') || (pfx == '|') || (pfx == '_') || (pfx == '-')) { str++; } else if (pfx == '(') { sfx = ')'; str++; } else pfx = '\0'; var = str; str = get_index(var + 1, &ndx); if (ndx == -1) { continue; } if ((*var == 'l') && mdefs->layout[ndx] && *mdefs->layout[ndx]) { if (pfx) *outstr++ = pfx; strcpy(outstr, mdefs->layout[ndx]); outstr += strlen(mdefs->layout[ndx]); if (sfx) *outstr++ = sfx; } else if ((*var == 'm') && (mdefs->model)) { if (pfx) *outstr++ = pfx; strcpy(outstr, mdefs->model); outstr += strlen(mdefs->model); if (sfx) *outstr++ = sfx; } else if ((*var == 'v') && mdefs->variant[ndx] && *mdefs->variant[ndx]) { if (pfx) *outstr++ = pfx; strcpy(outstr, mdefs->variant[ndx]); outstr += strlen(mdefs->variant[ndx]); if (sfx) *outstr++ = sfx; } if ((pfx == '(') && (*str == ')')) str++; } else { *outstr++ = *str++; } } *outstr++ = '\0'; if (orig != name) free(orig); return name; } /***====================================================================***/ Bool XkbRF_GetComponents(XkbRF_RulesPtr rules, XkbRF_VarDefsPtr defs, XkbComponentNamesPtr names) { XkbRF_MultiDefsRec mdefs; MakeMultiDefs(&mdefs, defs); memset((char *) names, 0, sizeof(XkbComponentNamesRec)); XkbRF_ClearPartialMatches(rules); XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal); XkbRF_ApplyPartialMatches(rules, names); XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Append); XkbRF_ApplyPartialMatches(rules, names); XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Option); XkbRF_ApplyPartialMatches(rules, names); if (names->keycodes) names->keycodes = XkbRF_SubstituteVars(names->keycodes, &mdefs); if (names->symbols) names->symbols = XkbRF_SubstituteVars(names->symbols, &mdefs); if (names->types) names->types = XkbRF_SubstituteVars(names->types, &mdefs); if (names->compat) names->compat = XkbRF_SubstituteVars(names->compat, &mdefs); if (names->geometry) names->geometry = XkbRF_SubstituteVars(names->geometry, &mdefs); FreeMultiDefs(&mdefs); return (names->keycodes && names->symbols && names->types && names->compat && names->geometry); } static XkbRF_RulePtr XkbRF_AddRule(XkbRF_RulesPtr rules) { if (rules->sz_rules < 1) { rules->sz_rules = 16; rules->num_rules = 0; rules->rules = calloc(rules->sz_rules, sizeof(XkbRF_RuleRec)); } else if (rules->num_rules >= rules->sz_rules) { rules->sz_rules *= 2; rules->rules = reallocarray(rules->rules, rules->sz_rules, sizeof(XkbRF_RuleRec)); } if (!rules->rules) { rules->sz_rules = rules->num_rules = 0; DebugF("Allocation failure in XkbRF_AddRule\n"); return NULL; } memset((char *) &rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec)); return &rules->rules[rules->num_rules++]; } static XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules) { if (rules->sz_groups < 1) { rules->sz_groups = 16; rules->num_groups = 0; rules->groups = calloc(rules->sz_groups, sizeof(XkbRF_GroupRec)); } else if (rules->num_groups >= rules->sz_groups) { rules->sz_groups *= 2; rules->groups = reallocarray(rules->groups, rules->sz_groups, sizeof(XkbRF_GroupRec)); } if (!rules->groups) { rules->sz_groups = rules->num_groups = 0; return NULL; } memset((char *) &rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec)); return &rules->groups[rules->num_groups++]; } Bool XkbRF_LoadRules(FILE * file, XkbRF_RulesPtr rules) { InputLine line; RemapSpec remap; XkbRF_RuleRec trule, *rule; XkbRF_GroupRec tgroup, *group; if (!(rules && file)) return FALSE; memset((char *) &remap, 0, sizeof(RemapSpec)); memset((char *) &tgroup, 0, sizeof(XkbRF_GroupRec)); InitInputLine(&line); while (GetInputLine(file, &line, TRUE)) { if (CheckLine(&line, &remap, &trule, &tgroup)) { if (tgroup.number) { if ((group = XkbRF_AddGroup(rules)) != NULL) { *group = tgroup; memset((char *) &tgroup, 0, sizeof(XkbRF_GroupRec)); } } else { if ((rule = XkbRF_AddRule(rules)) != NULL) { *rule = trule; memset((char *) &trule, 0, sizeof(XkbRF_RuleRec)); } } } line.num_line = 0; } FreeInputLine(&line); return TRUE; } Bool XkbRF_LoadRulesByName(char *base, char *locale, XkbRF_RulesPtr rules) { FILE *file; char buf[PATH_MAX]; Bool ok; if ((!base) || (!rules)) return FALSE; if (locale) { if (snprintf(buf, PATH_MAX, "%s-%s", base, locale) >= PATH_MAX) return FALSE; } else { if (strlen(base) + 1 > PATH_MAX) return FALSE; strcpy(buf, base); } file = fopen(buf, "r"); if ((!file) && (locale)) { /* fallback if locale was specified */ strcpy(buf, base); file = fopen(buf, "r"); } if (!file) return FALSE; ok = XkbRF_LoadRules(file, rules); fclose(file); return ok; } /***====================================================================***/ XkbRF_RulesPtr XkbRF_Create(void) { return calloc(1, sizeof(XkbRF_RulesRec)); } /***====================================================================***/ void XkbRF_Free(XkbRF_RulesPtr rules, Bool freeRules) { int i; XkbRF_RulePtr rule; XkbRF_GroupPtr group; if (!rules) return; if (rules->rules) { for (i = 0, rule = rules->rules; i < rules->num_rules; i++, rule++) { free((void *) rule->model); free((void *) rule->layout); free((void *) rule->variant); free((void *) rule->option); free((void *) rule->keycodes); free((void *) rule->symbols); free((void *) rule->types); free((void *) rule->compat); free((void *) rule->geometry); memset((char *) rule, 0, sizeof(XkbRF_RuleRec)); } free(rules->rules); rules->num_rules = rules->sz_rules = 0; rules->rules = NULL; } if (rules->groups) { for (i = 0, group = rules->groups; i < rules->num_groups; i++, group++) { free((void *) group->name); free(group->words); } free(rules->groups); rules->num_groups = 0; rules->groups = NULL; } if (freeRules) free(rules); return; } xorg-server-21.1.16/xkb/xkmread.c0000644000175000017500000012724514757411105012231 /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "xkbstr.h" #include "xkbsrv.h" #include "xkbgeom.h" Atom XkbInternAtom(char *str, Bool only_if_exists) { if (str == NULL) return None; return MakeAtom(str, strlen(str), !only_if_exists); } /***====================================================================***/ static void * XkmInsureSize(void *oldPtr, int oldCount, int *newCountRtrn, int elemSize) { int newCount = *newCountRtrn; if (oldPtr == NULL) { if (newCount == 0) return NULL; oldPtr = calloc(newCount, elemSize); } else if (oldCount < newCount) { oldPtr = reallocarray(oldPtr, newCount, elemSize); if (oldPtr != NULL) { char *tmp = (char *) oldPtr; memset(&tmp[oldCount * elemSize], 0, (newCount - oldCount) * elemSize); } } else if (newCount < oldCount) { *newCountRtrn = oldCount; } return oldPtr; } #define XkmInsureTypedSize(p,o,n,t) ((p)=((t *)XkmInsureSize((char *)(p),(o),(n),sizeof(t)))) static CARD8 XkmGetCARD8(FILE * file, int *pNRead) { int tmp; tmp = getc(file); if (pNRead && (tmp != EOF)) (*pNRead) += 1; return tmp; } static CARD16 XkmGetCARD16(FILE * file, int *pNRead) { CARD16 val; if ((fread(&val, 2, 1, file) == 1) && (pNRead)) (*pNRead) += 2; return val; } static CARD32 XkmGetCARD32(FILE * file, int *pNRead) { CARD32 val; if ((fread(&val, 4, 1, file) == 1) && (pNRead)) (*pNRead) += 4; return val; } static int XkmSkipPadding(FILE * file, unsigned pad) { register int i, nRead = 0; for (i = 0; i < pad; i++) { if (getc(file) != EOF) nRead++; } return nRead; } static int XkmGetCountedString(FILE * file, char *str, int max_len) { int count, nRead = 0; count = XkmGetCARD16(file, &nRead); if (count > 0) { int tmp; if (count > max_len) { tmp = fread(str, 1, max_len, file); while (tmp < count) { if ((getc(file)) != EOF) tmp++; else break; } } else { tmp = fread(str, 1, count, file); } nRead += tmp; } if (count >= max_len) str[max_len - 1] = '\0'; else str[count] = '\0'; count = XkbPaddedSize(nRead) - nRead; if (count > 0) nRead += XkmSkipPadding(file, count); return nRead; } /***====================================================================***/ static int ReadXkmVirtualMods(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes) { register unsigned int i, bit; unsigned int bound, named, tmp; int nRead = 0; if (XkbAllocServerMap(xkb, XkbVirtualModsMask, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmVirtualMods", 0); return -1; } bound = XkmGetCARD16(file, &nRead); named = XkmGetCARD16(file, &nRead); for (i = tmp = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (bound & bit) { xkb->server->vmods[i] = XkmGetCARD8(file, &nRead); if (changes) changes->map.vmods |= bit; tmp++; } } if ((i = XkbPaddedSize(tmp) - tmp) > 0) nRead += XkmSkipPadding(file, i); if (XkbAllocNames(xkb, XkbVirtualModNamesMask, 0, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmVirtualMods", 0); return -1; } for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { char name[100]; if (named & bit) { if (nRead += XkmGetCountedString(file, name, 100)) { xkb->names->vmods[i] = XkbInternAtom(name, FALSE); if (changes) changes->names.changed_vmods |= bit; } } } return nRead; } /***====================================================================***/ static int ReadXkmKeycodes(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes) { register int i; unsigned minKC, maxKC, nAl; int nRead = 0; char name[100]; XkbKeyNamePtr pN; name[0] = '\0'; nRead += XkmGetCountedString(file, name, 100); minKC = XkmGetCARD8(file, &nRead); maxKC = XkmGetCARD8(file, &nRead); if (xkb->min_key_code == 0) { xkb->min_key_code = minKC; xkb->max_key_code = maxKC; } else { if (minKC < xkb->min_key_code) xkb->min_key_code = minKC; if (maxKC > xkb->max_key_code) { _XkbLibError(_XkbErrBadValue, "ReadXkmKeycodes", maxKC); return -1; } } nAl = XkmGetCARD8(file, &nRead); nRead += XkmSkipPadding(file, 1); #define WANTED (XkbKeycodesNameMask|XkbKeyNamesMask|XkbKeyAliasesMask) if (XkbAllocNames(xkb, WANTED, 0, nAl) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmKeycodes", 0); return -1; } if (name[0] != '\0') { xkb->names->keycodes = XkbInternAtom(name, FALSE); } for (pN = &xkb->names->keys[minKC], i = minKC; i <= (int) maxKC; i++, pN++) { if (fread(pN, 1, XkbKeyNameLength, file) != XkbKeyNameLength) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeycodes", 0); return -1; } nRead += XkbKeyNameLength; } if (nAl > 0) { XkbKeyAliasPtr pAl; for (pAl = xkb->names->key_aliases, i = 0; i < nAl; i++, pAl++) { int tmp; tmp = fread(pAl, 1, 2 * XkbKeyNameLength, file); if (tmp != 2 * XkbKeyNameLength) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeycodes", 0); return -1; } nRead += 2 * XkbKeyNameLength; } if (changes) changes->names.changed |= XkbKeyAliasesMask; } if (changes) changes->names.changed |= XkbKeyNamesMask; return nRead; } /***====================================================================***/ static int ReadXkmKeyTypes(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes) { register unsigned i, n; unsigned num_types; int nRead = 0; int tmp; XkbKeyTypePtr type; xkmKeyTypeDesc wire; XkbKTMapEntryPtr entry; xkmKTMapEntryDesc wire_entry; char buf[100]; if ((tmp = XkmGetCountedString(file, buf, 100)) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeyTypes", 0); return -1; } nRead += tmp; if (buf[0] != '\0') { if (XkbAllocNames(xkb, XkbTypesNameMask, 0, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmKeyTypes", 0); return -1; } xkb->names->types = XkbInternAtom(buf, FALSE); } num_types = XkmGetCARD16(file, &nRead); nRead += XkmSkipPadding(file, 2); if (num_types < 1) return nRead; if (XkbAllocClientMap(xkb, XkbKeyTypesMask, num_types) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmKeyTypes", 0); return nRead; } xkb->map->num_types = num_types; if (num_types < XkbNumRequiredTypes) { _XkbLibError(_XkbErrMissingReqTypes, "ReadXkmKeyTypes", 0); return -1; } type = xkb->map->types; for (i = 0; i < num_types; i++, type++) { if ((int) fread(&wire, SIZEOF(xkmKeyTypeDesc), 1, file) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeyTypes", 0); return -1; } nRead += SIZEOF(xkmKeyTypeDesc); if (((i == XkbOneLevelIndex) && (wire.numLevels != 1)) || (((i == XkbTwoLevelIndex) || (i == XkbAlphabeticIndex) || ((i) == XkbKeypadIndex)) && (wire.numLevels != 2))) { _XkbLibError(_XkbErrBadTypeWidth, "ReadXkmKeyTypes", i); return -1; } tmp = wire.nMapEntries; XkmInsureTypedSize(type->map, type->map_count, &tmp, XkbKTMapEntryRec); if ((wire.nMapEntries > 0) && (type->map == NULL)) { _XkbLibError(_XkbErrBadValue, "ReadXkmKeyTypes", wire.nMapEntries); return -1; } for (n = 0, entry = type->map; n < wire.nMapEntries; n++, entry++) { if (fread(&wire_entry, SIZEOF(xkmKTMapEntryDesc), 1, file) < (int) 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeyTypes", 0); return -1; } nRead += SIZEOF(xkmKTMapEntryDesc); entry->active = (wire_entry.virtualMods == 0); entry->level = wire_entry.level; entry->mods.mask = wire_entry.realMods; entry->mods.real_mods = wire_entry.realMods; entry->mods.vmods = wire_entry.virtualMods; } nRead += XkmGetCountedString(file, buf, 100); if (((i == XkbOneLevelIndex) && (strcmp(buf, "ONE_LEVEL") != 0)) || ((i == XkbTwoLevelIndex) && (strcmp(buf, "TWO_LEVEL") != 0)) || ((i == XkbAlphabeticIndex) && (strcmp(buf, "ALPHABETIC") != 0)) || ((i == XkbKeypadIndex) && (strcmp(buf, "KEYPAD") != 0))) { _XkbLibError(_XkbErrBadTypeName, "ReadXkmKeyTypes", 0); return -1; } if (buf[0] != '\0') { type->name = XkbInternAtom(buf, FALSE); } else type->name = None; if (wire.preserve) { xkmModsDesc p_entry; XkbModsPtr pre; XkmInsureTypedSize(type->preserve, type->map_count, &tmp, XkbModsRec); if (type->preserve == NULL) { _XkbLibError(_XkbErrBadMatch, "ReadXkmKeycodes", 0); return -1; } for (n = 0, pre = type->preserve; n < wire.nMapEntries; n++, pre++) { if (fread(&p_entry, SIZEOF(xkmModsDesc), 1, file) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmKeycodes", 0); return -1; } nRead += SIZEOF(xkmModsDesc); pre->mask = p_entry.realMods; pre->real_mods = p_entry.realMods; pre->vmods = p_entry.virtualMods; } } if (wire.nLevelNames > 0) { int width = wire.numLevels; if (wire.nLevelNames > (unsigned) width) { _XkbLibError(_XkbErrBadMatch, "ReadXkmKeycodes", 0); return -1; } XkmInsureTypedSize(type->level_names, type->num_levels, &width, Atom); if (type->level_names != NULL) { for (n = 0; n < wire.nLevelNames; n++) { if ((tmp = XkmGetCountedString(file, buf, 100)) < 1) return -1; nRead += tmp; if (strlen(buf) == 0) type->level_names[n] = None; else type->level_names[n] = XkbInternAtom(buf, 0); } } } type->mods.mask = wire.realMods; type->mods.real_mods = wire.realMods; type->mods.vmods = wire.virtualMods; type->num_levels = wire.numLevels; type->map_count = wire.nMapEntries; } if (changes) { changes->map.changed |= XkbKeyTypesMask; changes->map.first_type = 0; changes->map.num_types = xkb->map->num_types; } return nRead; } /***====================================================================***/ static int ReadXkmCompatMap(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes) { register int i; unsigned num_si, groups; char name[100]; XkbSymInterpretPtr interp; xkmSymInterpretDesc wire; unsigned tmp; int nRead = 0; XkbCompatMapPtr compat; XkbAction *act; if ((tmp = XkmGetCountedString(file, name, 100)) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmCompatMap", 0); return -1; } nRead += tmp; if (name[0] != '\0') { if (XkbAllocNames(xkb, XkbCompatNameMask, 0, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmCompatMap", 0); return -1; } xkb->names->compat = XkbInternAtom(name, FALSE); } num_si = XkmGetCARD16(file, &nRead); groups = XkmGetCARD8(file, &nRead); nRead += XkmSkipPadding(file, 1); if (XkbAllocCompatMap(xkb, XkbAllCompatMask, num_si) != Success) return -1; compat = xkb->compat; compat->num_si = 0; interp = compat->sym_interpret; for (i = 0; i < num_si; i++) { tmp = fread(&wire, SIZEOF(xkmSymInterpretDesc), 1, file); nRead += tmp * SIZEOF(xkmSymInterpretDesc); interp->sym = wire.sym; interp->mods = wire.mods; interp->match = wire.match; interp->virtual_mod = wire.virtualMod; interp->flags = wire.flags; interp->act.type = wire.actionType; act = (XkbAction *) &interp->act; switch (interp->act.type) { case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods: act->mods.flags = wire.actionData[0]; act->mods.mask = wire.actionData[1]; act->mods.real_mods = wire.actionData[2]; act->mods.vmods1 = wire.actionData[3]; act->mods.vmods2 = wire.actionData[4]; break; case XkbSA_SetGroup: case XkbSA_LatchGroup: case XkbSA_LockGroup: act->group.flags = wire.actionData[0]; act->group.group_XXX = wire.actionData[1]; break; case XkbSA_MovePtr: act->ptr.flags = wire.actionData[0]; act->ptr.high_XXX = wire.actionData[1]; act->ptr.low_XXX = wire.actionData[2]; act->ptr.high_YYY = wire.actionData[3]; act->ptr.low_YYY = wire.actionData[4]; break; case XkbSA_PtrBtn: case XkbSA_LockPtrBtn: act->btn.flags = wire.actionData[0]; act->btn.count = wire.actionData[1]; act->btn.button = wire.actionData[2]; break; case XkbSA_DeviceBtn: case XkbSA_LockDeviceBtn: act->devbtn.flags = wire.actionData[0]; act->devbtn.count = wire.actionData[1]; act->devbtn.button = wire.actionData[2]; act->devbtn.device = wire.actionData[3]; break; case XkbSA_SetPtrDflt: act->dflt.flags = wire.actionData[0]; act->dflt.affect = wire.actionData[1]; act->dflt.valueXXX = wire.actionData[2]; break; case XkbSA_ISOLock: act->iso.flags = wire.actionData[0]; act->iso.mask = wire.actionData[1]; act->iso.real_mods = wire.actionData[2]; act->iso.group_XXX = wire.actionData[3]; act->iso.affect = wire.actionData[4]; act->iso.vmods1 = wire.actionData[5]; act->iso.vmods2 = wire.actionData[6]; break; case XkbSA_SwitchScreen: act->screen.flags = wire.actionData[0]; act->screen.screenXXX = wire.actionData[1]; break; case XkbSA_SetControls: case XkbSA_LockControls: act->ctrls.flags = wire.actionData[0]; act->ctrls.ctrls3 = wire.actionData[1]; act->ctrls.ctrls2 = wire.actionData[2]; act->ctrls.ctrls1 = wire.actionData[3]; act->ctrls.ctrls0 = wire.actionData[4]; break; case XkbSA_RedirectKey: act->redirect.new_key = wire.actionData[0]; act->redirect.mods_mask = wire.actionData[1]; act->redirect.mods = wire.actionData[2]; act->redirect.vmods_mask0 = wire.actionData[3]; act->redirect.vmods_mask1 = wire.actionData[4]; act->redirect.vmods0 = wire.actionData[4]; act->redirect.vmods1 = wire.actionData[5]; break; case XkbSA_DeviceValuator: act->devval.device = wire.actionData[0]; act->devval.v1_what = wire.actionData[1]; act->devval.v1_ndx = wire.actionData[2]; act->devval.v1_value = wire.actionData[3]; act->devval.v2_what = wire.actionData[4]; act->devval.v2_ndx = wire.actionData[5]; act->devval.v2_value = wire.actionData[6]; break; case XkbSA_XFree86Private: /* * Bugfix for broken xkbcomp: if we encounter an XFree86Private * action with Any+AnyOfOrNone(All), then we skip the interp as * broken. Versions of xkbcomp below 1.2.2 had a bug where they * would interpret a symbol that couldn't be found in an interpret * as Any. So, an XF86LogWindowTree+AnyOfOrNone(All) interp that * triggered the PrWins action would make every key without an * action trigger PrWins if libX11 didn't yet know about the * XF86LogWindowTree keysym. None too useful. * * We only do this for XFree86 actions, as the current XKB * dataset relies on Any+AnyOfOrNone(All) -> SetMods for Ctrl in * particular. * * See xkbcomp commits 2a473b906943ffd807ad81960c47530ee7ae9a60 and * 3caab5aa37decb7b5dc1642a0452efc3e1f5100e for more details. */ if (interp->sym == NoSymbol && interp->match == XkbSI_AnyOfOrNone && (interp->mods & 0xff) == 0xff) { ErrorF("XKB: Skipping broken Any+AnyOfOrNone(All) -> Private " "action from compiled keymap\n"); continue; } /* copy the kind of action */ memcpy(act->any.data, wire.actionData, XkbAnyActionDataSize); break; case XkbSA_Terminate: /* no args, kinda (note: untrue for xfree86). */ break; case XkbSA_ActionMessage: /* unsupported. */ break; } interp++; compat->num_si++; } if ((num_si > 0) && (changes)) { changes->compat.first_si = 0; changes->compat.num_si = compat->num_si; } if (groups) { register unsigned bit; for (i = 0, bit = 1; i < XkbNumKbdGroups; i++, bit <<= 1) { xkmModsDesc md; if (groups & bit) { tmp = fread(&md, SIZEOF(xkmModsDesc), 1, file); nRead += tmp * SIZEOF(xkmModsDesc); xkb->compat->groups[i].real_mods = md.realMods; xkb->compat->groups[i].vmods = md.virtualMods; if (md.virtualMods != 0) { unsigned mask; if (XkbVirtualModsToReal(xkb, md.virtualMods, &mask)) xkb->compat->groups[i].mask = md.realMods | mask; } else xkb->compat->groups[i].mask = md.realMods; } } if (changes) changes->compat.changed_groups |= groups; } return nRead; } static int ReadXkmIndicators(FILE * file, XkbDescPtr xkb, XkbChangesPtr changes) { register unsigned nLEDs; xkmIndicatorMapDesc wire; char buf[100]; unsigned tmp; int nRead = 0; if ((xkb->indicators == NULL) && (XkbAllocIndicatorMaps(xkb) != Success)) { _XkbLibError(_XkbErrBadAlloc, "indicator rec", 0); return -1; } if (XkbAllocNames(xkb, XkbIndicatorNamesMask, 0, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "indicator names", 0); return -1; } nLEDs = XkmGetCARD8(file, &nRead); nRead += XkmSkipPadding(file, 3); xkb->indicators->phys_indicators = XkmGetCARD32(file, &nRead); while (nLEDs-- > 0) { Atom name; XkbIndicatorMapPtr map; if ((tmp = XkmGetCountedString(file, buf, 100)) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmIndicators", 0); return -1; } nRead += tmp; if (buf[0] != '\0') name = XkbInternAtom(buf, FALSE); else name = None; if ((tmp = fread(&wire, SIZEOF(xkmIndicatorMapDesc), 1, file)) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmIndicators", 0); return -1; } nRead += tmp * SIZEOF(xkmIndicatorMapDesc); if (xkb->names) { xkb->names->indicators[wire.indicator - 1] = name; if (changes) changes->names.changed_indicators |= (1 << (wire.indicator - 1)); } map = &xkb->indicators->maps[wire.indicator - 1]; map->flags = wire.flags; map->which_groups = wire.which_groups; map->groups = wire.groups; map->which_mods = wire.which_mods; map->mods.mask = wire.real_mods; map->mods.real_mods = wire.real_mods; map->mods.vmods = wire.vmods; map->ctrls = wire.ctrls; } return nRead; } static XkbKeyTypePtr FindTypeForKey(XkbDescPtr xkb, Atom name, unsigned width, KeySym * syms) { if ((!xkb) || (!xkb->map)) return NULL; if (name != None) { register unsigned i; for (i = 0; i < xkb->map->num_types; i++) { if (xkb->map->types[i].name == name) { if (xkb->map->types[i].num_levels != width) DebugF("Group width mismatch between key and type\n"); return &xkb->map->types[i]; } } } if ((width < 2) || ((syms != NULL) && (syms[1] == NoSymbol))) return &xkb->map->types[XkbOneLevelIndex]; if (syms != NULL) { if (XkbKSIsLower(syms[0]) && XkbKSIsUpper(syms[1])) return &xkb->map->types[XkbAlphabeticIndex]; else if (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])) return &xkb->map->types[XkbKeypadIndex]; } return &xkb->map->types[XkbTwoLevelIndex]; } static int ReadXkmSymbols(FILE * file, XkbDescPtr xkb) { register int i, g, s, totalVModMaps; xkmKeySymMapDesc wireMap; char buf[100]; unsigned minKC, maxKC, groupNames, tmp; int nRead = 0; if ((tmp = XkmGetCountedString(file, buf, 100)) < 1) return -1; nRead += tmp; minKC = XkmGetCARD8(file, &nRead); maxKC = XkmGetCARD8(file, &nRead); groupNames = XkmGetCARD8(file, &nRead); totalVModMaps = XkmGetCARD8(file, &nRead); if (XkbAllocNames(xkb, XkbSymbolsNameMask | XkbPhysSymbolsNameMask | XkbGroupNamesMask, 0, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "physical names", 0); return -1; } if ((buf[0] != '\0') && (xkb->names)) { Atom name; name = XkbInternAtom(buf, 0); xkb->names->symbols = name; xkb->names->phys_symbols = name; } for (i = 0, g = 1; i < XkbNumKbdGroups; i++, g <<= 1) { if (groupNames & g) { if ((tmp = XkmGetCountedString(file, buf, 100)) < 1) return -1; nRead += tmp; if (!xkb->names) continue; if (buf[0] != '\0') { Atom name; name = XkbInternAtom(buf, 0); xkb->names->groups[i] = name; } else xkb->names->groups[i] = None; } } if (XkbAllocServerMap(xkb, XkbAllServerInfoMask, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "server map", 0); return -1; } if (XkbAllocClientMap(xkb, XkbAllClientInfoMask, 0) != Success) { _XkbLibError(_XkbErrBadAlloc, "client map", 0); return -1; } if (XkbAllocControls(xkb, XkbAllControlsMask) != Success) { _XkbLibError(_XkbErrBadAlloc, "controls", 0); return -1; } if ((xkb->map == NULL) || (xkb->server == NULL)) return -1; if (xkb->min_key_code < 8) xkb->min_key_code = minKC; if (xkb->max_key_code < 8) xkb->max_key_code = maxKC; if ((minKC >= 8) && (minKC < xkb->min_key_code)) xkb->min_key_code = minKC; if ((maxKC >= 8) && (maxKC > xkb->max_key_code)) { _XkbLibError(_XkbErrBadValue, "keys in symbol map", maxKC); return -1; } for (i = minKC; i <= (int) maxKC; i++) { Atom typeName[XkbNumKbdGroups]; XkbKeyTypePtr type[XkbNumKbdGroups]; if ((tmp = fread(&wireMap, SIZEOF(xkmKeySymMapDesc), 1, file)) < 1) { _XkbLibError(_XkbErrBadLength, "ReadXkmSymbols", 0); return -1; } nRead += tmp * SIZEOF(xkmKeySymMapDesc); memset((char *) typeName, 0, XkbNumKbdGroups * sizeof(Atom)); memset((char *) type, 0, XkbNumKbdGroups * sizeof(XkbKeyTypePtr)); if (wireMap.flags & XkmKeyHasTypes) { for (g = 0; g < XkbNumKbdGroups; g++) { if ((wireMap.flags & (1 << g)) && ((tmp = XkmGetCountedString(file, buf, 100)) > 0)) { typeName[g] = XkbInternAtom(buf, 1); nRead += tmp; } type[g] = FindTypeForKey(xkb, typeName[g], wireMap.width, NULL); if (type[g] == NULL) { _XkbLibError(_XkbErrMissingTypes, "ReadXkmSymbols", 0); return -1; } if (typeName[g] == type[g]->name) xkb->server->explicit[i] |= (1 << g); } } if (wireMap.flags & XkmRepeatingKey) { xkb->ctrls->per_key_repeat[i / 8] |= (1 << (i % 8)); xkb->server->explicit[i] |= XkbExplicitAutoRepeatMask; } else if (wireMap.flags & XkmNonRepeatingKey) { xkb->ctrls->per_key_repeat[i / 8] &= ~(1 << (i % 8)); xkb->server->explicit[i] |= XkbExplicitAutoRepeatMask; } xkb->map->modmap[i] = wireMap.modifier_map; if (XkbNumGroups(wireMap.num_groups) > 0) { KeySym *sym; int nSyms; if (XkbNumGroups(wireMap.num_groups) > xkb->ctrls->num_groups) xkb->ctrls->num_groups = wireMap.num_groups; nSyms = XkbNumGroups(wireMap.num_groups) * wireMap.width; sym = XkbResizeKeySyms(xkb, i, nSyms); if (!sym) return -1; for (s = 0; s < nSyms; s++) { *sym++ = XkmGetCARD32(file, &nRead); } if (wireMap.flags & XkmKeyHasActions) { XkbAction *act; act = XkbResizeKeyActions(xkb, i, nSyms); for (s = 0; s < nSyms; s++, act++) { tmp = fread(act, SIZEOF(xkmActionDesc), 1, file); nRead += tmp * SIZEOF(xkmActionDesc); } xkb->server->explicit[i] |= XkbExplicitInterpretMask; } } for (g = 0; g < XkbNumGroups(wireMap.num_groups); g++) { if (((xkb->server->explicit[i] & (1 << g)) == 0) || (type[g] == NULL)) { KeySym *tmpSyms; tmpSyms = XkbKeySymsPtr(xkb, i) + (wireMap.width * g); type[g] = FindTypeForKey(xkb, None, wireMap.width, tmpSyms); } xkb->map->key_sym_map[i].kt_index[g] = type[g] - (&xkb->map->types[0]); } xkb->map->key_sym_map[i].group_info = wireMap.num_groups; xkb->map->key_sym_map[i].width = wireMap.width; if (wireMap.flags & XkmKeyHasBehavior) { xkmBehaviorDesc b; tmp = fread(&b, SIZEOF(xkmBehaviorDesc), 1, file); nRead += tmp * SIZEOF(xkmBehaviorDesc); xkb->server->behaviors[i].type = b.type; xkb->server->behaviors[i].data = b.data; xkb->server->explicit[i] |= XkbExplicitBehaviorMask; } } if (totalVModMaps > 0) { xkmVModMapDesc v; for (i = 0; i < totalVModMaps; i++) { tmp = fread(&v, SIZEOF(xkmVModMapDesc), 1, file); nRead += tmp * SIZEOF(xkmVModMapDesc); if (tmp > 0) xkb->server->vmodmap[v.key] = v.vmods; } } return nRead; } static int ReadXkmGeomDoodad(FILE * file, XkbGeometryPtr geom, XkbSectionPtr section) { XkbDoodadPtr doodad; xkmDoodadDesc doodadWire; char buf[100]; unsigned tmp; int nRead = 0; nRead += XkmGetCountedString(file, buf, 100); tmp = fread(&doodadWire, SIZEOF(xkmDoodadDesc), 1, file); nRead += SIZEOF(xkmDoodadDesc) * tmp; doodad = XkbAddGeomDoodad(geom, section, XkbInternAtom(buf, FALSE)); if (!doodad) return nRead; doodad->any.type = doodadWire.any.type; doodad->any.priority = doodadWire.any.priority; doodad->any.top = doodadWire.any.top; doodad->any.left = doodadWire.any.left; switch (doodadWire.any.type) { case XkbOutlineDoodad: case XkbSolidDoodad: doodad->shape.angle = doodadWire.shape.angle; doodad->shape.color_ndx = doodadWire.shape.color_ndx; doodad->shape.shape_ndx = doodadWire.shape.shape_ndx; break; case XkbTextDoodad: doodad->text.angle = doodadWire.text.angle; doodad->text.width = doodadWire.text.width; doodad->text.height = doodadWire.text.height; doodad->text.color_ndx = doodadWire.text.color_ndx; nRead += XkmGetCountedString(file, buf, 100); doodad->text.text = Xstrdup(buf); nRead += XkmGetCountedString(file, buf, 100); doodad->text.font = Xstrdup(buf); break; case XkbIndicatorDoodad: doodad->indicator.shape_ndx = doodadWire.indicator.shape_ndx; doodad->indicator.on_color_ndx = doodadWire.indicator.on_color_ndx; doodad->indicator.off_color_ndx = doodadWire.indicator.off_color_ndx; break; case XkbLogoDoodad: doodad->logo.angle = doodadWire.logo.angle; doodad->logo.color_ndx = doodadWire.logo.color_ndx; doodad->logo.shape_ndx = doodadWire.logo.shape_ndx; nRead += XkmGetCountedString(file, buf, 100); doodad->logo.logo_name = Xstrdup(buf); break; default: /* report error? */ return nRead; } return nRead; } static int ReadXkmGeomOverlay(FILE * file, XkbGeometryPtr geom, XkbSectionPtr section) { char buf[100]; unsigned tmp; int nRead = 0; XkbOverlayPtr ol; XkbOverlayRowPtr row; xkmOverlayDesc olWire; xkmOverlayRowDesc rowWire; register int r; nRead += XkmGetCountedString(file, buf, 100); tmp = fread(&olWire, SIZEOF(xkmOverlayDesc), 1, file); nRead += tmp * SIZEOF(xkmOverlayDesc); ol = XkbAddGeomOverlay(section, XkbInternAtom(buf, FALSE), olWire.num_rows); if (!ol) return nRead; for (r = 0; r < olWire.num_rows; r++) { int k; xkmOverlayKeyDesc keyWire; tmp = fread(&rowWire, SIZEOF(xkmOverlayRowDesc), 1, file); nRead += tmp * SIZEOF(xkmOverlayRowDesc); row = XkbAddGeomOverlayRow(ol, rowWire.row_under, rowWire.num_keys); if (!row) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeomOverlay", 0); return nRead; } for (k = 0; k < rowWire.num_keys; k++) { tmp = fread(&keyWire, SIZEOF(xkmOverlayKeyDesc), 1, file); nRead += tmp * SIZEOF(xkmOverlayKeyDesc); memcpy(row->keys[k].over.name, keyWire.over, XkbKeyNameLength); memcpy(row->keys[k].under.name, keyWire.under, XkbKeyNameLength); } row->num_keys = rowWire.num_keys; } return nRead; } static int ReadXkmGeomSection(FILE * file, XkbGeometryPtr geom) { register int i; XkbSectionPtr section; xkmSectionDesc sectionWire; unsigned tmp; int nRead = 0; char buf[100]; Atom nameAtom; nRead += XkmGetCountedString(file, buf, 100); nameAtom = XkbInternAtom(buf, FALSE); tmp = fread(§ionWire, SIZEOF(xkmSectionDesc), 1, file); nRead += SIZEOF(xkmSectionDesc) * tmp; section = XkbAddGeomSection(geom, nameAtom, sectionWire.num_rows, sectionWire.num_doodads, sectionWire.num_overlays); if (!section) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeomSection", 0); return nRead; } section->top = sectionWire.top; section->left = sectionWire.left; section->width = sectionWire.width; section->height = sectionWire.height; section->angle = sectionWire.angle; section->priority = sectionWire.priority; if (sectionWire.num_rows > 0) { register int k; XkbRowPtr row; xkmRowDesc rowWire; XkbKeyPtr key; xkmKeyDesc keyWire; for (i = 0; i < sectionWire.num_rows; i++) { tmp = fread(&rowWire, SIZEOF(xkmRowDesc), 1, file); nRead += SIZEOF(xkmRowDesc) * tmp; row = XkbAddGeomRow(section, rowWire.num_keys); if (!row) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmKeycodes", 0); return nRead; } row->top = rowWire.top; row->left = rowWire.left; row->vertical = rowWire.vertical; for (k = 0; k < rowWire.num_keys; k++) { tmp = fread(&keyWire, SIZEOF(xkmKeyDesc), 1, file); nRead += SIZEOF(xkmKeyDesc) * tmp; key = XkbAddGeomKey(row); if (!key) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeomSection", 0); return nRead; } memcpy(key->name.name, keyWire.name, XkbKeyNameLength); key->gap = keyWire.gap; key->shape_ndx = keyWire.shape_ndx; key->color_ndx = keyWire.color_ndx; } } } if (sectionWire.num_doodads > 0) { for (i = 0; i < sectionWire.num_doodads; i++) { tmp = ReadXkmGeomDoodad(file, geom, section); nRead += tmp; if (tmp < 1) return nRead; } } if (sectionWire.num_overlays > 0) { for (i = 0; i < sectionWire.num_overlays; i++) { tmp = ReadXkmGeomOverlay(file, geom, section); nRead += tmp; if (tmp < 1) return nRead; } } return nRead; } static int ReadXkmGeometry(FILE * file, XkbDescPtr xkb) { register int i; char buf[100]; unsigned tmp; int nRead = 0; xkmGeometryDesc wireGeom; XkbGeometryPtr geom; XkbGeometrySizesRec sizes; nRead += XkmGetCountedString(file, buf, 100); tmp = fread(&wireGeom, SIZEOF(xkmGeometryDesc), 1, file); nRead += tmp * SIZEOF(xkmGeometryDesc); sizes.which = XkbGeomAllMask; sizes.num_properties = wireGeom.num_properties; sizes.num_colors = wireGeom.num_colors; sizes.num_shapes = wireGeom.num_shapes; sizes.num_sections = wireGeom.num_sections; sizes.num_doodads = wireGeom.num_doodads; sizes.num_key_aliases = wireGeom.num_key_aliases; if (XkbAllocGeometry(xkb, &sizes) != Success) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead; } geom = xkb->geom; geom->name = XkbInternAtom(buf, FALSE); geom->width_mm = wireGeom.width_mm; geom->height_mm = wireGeom.height_mm; nRead += XkmGetCountedString(file, buf, 100); geom->label_font = Xstrdup(buf); if (wireGeom.num_properties > 0) { char val[1024]; for (i = 0; i < wireGeom.num_properties; i++) { nRead += XkmGetCountedString(file, buf, 100); nRead += XkmGetCountedString(file, val, 1024); if (XkbAddGeomProperty(geom, buf, val) == NULL) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead; } } } if (wireGeom.num_colors > 0) { for (i = 0; i < wireGeom.num_colors; i++) { nRead += XkmGetCountedString(file, buf, 100); if (XkbAddGeomColor(geom, buf, i) == NULL) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead; } } } geom->base_color = &geom->colors[wireGeom.base_color_ndx]; geom->label_color = &geom->colors[wireGeom.label_color_ndx]; if (wireGeom.num_shapes > 0) { XkbShapePtr shape; xkmShapeDesc shapeWire; Atom nameAtom; for (i = 0; i < wireGeom.num_shapes; i++) { register int n; XkbOutlinePtr ol; xkmOutlineDesc olWire; nRead += XkmGetCountedString(file, buf, 100); nameAtom = XkbInternAtom(buf, FALSE); tmp = fread(&shapeWire, SIZEOF(xkmShapeDesc), 1, file); nRead += tmp * SIZEOF(xkmShapeDesc); shape = XkbAddGeomShape(geom, nameAtom, shapeWire.num_outlines); if (!shape) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead; } for (n = 0; n < shapeWire.num_outlines; n++) { register int p; xkmPointDesc ptWire; tmp = fread(&olWire, SIZEOF(xkmOutlineDesc), 1, file); nRead += tmp * SIZEOF(xkmOutlineDesc); ol = XkbAddGeomOutline(shape, olWire.num_points); if (!ol) { _XkbLibError(_XkbErrBadAlloc, "ReadXkmGeometry", 0); return nRead; } ol->num_points = olWire.num_points; ol->corner_radius = olWire.corner_radius; for (p = 0; p < olWire.num_points; p++) { tmp = fread(&ptWire, SIZEOF(xkmPointDesc), 1, file); nRead += tmp * SIZEOF(xkmPointDesc); ol->points[p].x = ptWire.x; ol->points[p].y = ptWire.y; if (ptWire.x < shape->bounds.x1) shape->bounds.x1 = ptWire.x; if (ptWire.x > shape->bounds.x2) shape->bounds.x2 = ptWire.x; if (ptWire.y < shape->bounds.y1) shape->bounds.y1 = ptWire.y; if (ptWire.y > shape->bounds.y2) shape->bounds.y2 = ptWire.y; } } if (shapeWire.primary_ndx != XkbNoShape) shape->primary = &shape->outlines[shapeWire.primary_ndx]; if (shapeWire.approx_ndx != XkbNoShape) shape->approx = &shape->outlines[shapeWire.approx_ndx]; } } if (wireGeom.num_sections > 0) { for (i = 0; i < wireGeom.num_sections; i++) { tmp = ReadXkmGeomSection(file, geom); nRead += tmp; if (tmp == 0) return nRead; } } if (wireGeom.num_doodads > 0) { for (i = 0; i < wireGeom.num_doodads; i++) { tmp = ReadXkmGeomDoodad(file, geom, NULL); nRead += tmp; if (tmp == 0) return nRead; } } if ((wireGeom.num_key_aliases > 0) && (geom->key_aliases)) { int sz = XkbKeyNameLength * 2; int num = wireGeom.num_key_aliases; if (fread(geom->key_aliases, sz, num, file) != num) { _XkbLibError(_XkbErrBadLength, "ReadXkmGeometry", 0); return -1; } nRead += (num * sz); geom->num_key_aliases = num; } return nRead; } Bool XkmProbe(FILE * file) { unsigned hdr, tmp; int nRead = 0; hdr = (('x' << 24) | ('k' << 16) | ('m' << 8) | XkmFileVersion); tmp = XkmGetCARD32(file, &nRead); if (tmp != hdr) { if ((tmp & (~0xff)) == (hdr & (~0xff))) { _XkbLibError(_XkbErrBadFileVersion, "XkmProbe", tmp & 0xff); } return 0; } return 1; } static Bool XkmReadTOC(FILE * file, xkmFileInfo * file_info, int max_toc, xkmSectionInfo * toc) { unsigned hdr, tmp; int nRead = 0; unsigned i, size_toc; hdr = (('x' << 24) | ('k' << 16) | ('m' << 8) | XkmFileVersion); tmp = XkmGetCARD32(file, &nRead); if (tmp != hdr) { if ((tmp & (~0xff)) == (hdr & (~0xff))) { _XkbLibError(_XkbErrBadFileVersion, "XkmReadTOC", tmp & 0xff); } else { _XkbLibError(_XkbErrBadFileType, "XkmReadTOC", tmp); } return 0; } if (fread(file_info, SIZEOF(xkmFileInfo), 1, file) != 1) return 0; size_toc = file_info->num_toc; if (size_toc > max_toc) { DebugF("Warning! Too many TOC entries; last %d ignored\n", size_toc - max_toc); size_toc = max_toc; } for (i = 0; i < size_toc; i++) { if (fread(&toc[i], SIZEOF(xkmSectionInfo), 1, file) != 1) return 0; } return 1; } /***====================================================================***/ #define MAX_TOC 16 unsigned XkmReadFile(FILE * file, unsigned need, unsigned want, XkbDescPtr *xkb) { register unsigned i; xkmSectionInfo toc[MAX_TOC], tmpTOC; xkmFileInfo fileInfo; unsigned tmp, nRead = 0; unsigned which = need | want; if (!XkmReadTOC(file, &fileInfo, MAX_TOC, toc)) return which; if ((fileInfo.present & need) != need) { _XkbLibError(_XkbErrIllegalContents, "XkmReadFile", need & (~fileInfo.present)); return which; } if (*xkb == NULL) *xkb = XkbAllocKeyboard(); for (i = 0; i < fileInfo.num_toc; i++) { fseek(file, toc[i].offset, SEEK_SET); tmp = fread(&tmpTOC, SIZEOF(xkmSectionInfo), 1, file); nRead = tmp * SIZEOF(xkmSectionInfo); if ((tmpTOC.type != toc[i].type) || (tmpTOC.format != toc[i].format) || (tmpTOC.size != toc[i].size) || (tmpTOC.offset != toc[i].offset)) { return which; } if ((which & (1 << tmpTOC.type)) == 0) { continue; } switch (tmpTOC.type) { case XkmVirtualModsIndex: tmp = ReadXkmVirtualMods(file, *xkb, NULL); break; case XkmTypesIndex: tmp = ReadXkmKeyTypes(file, *xkb, NULL); break; case XkmCompatMapIndex: tmp = ReadXkmCompatMap(file, *xkb, NULL); break; case XkmKeyNamesIndex: tmp = ReadXkmKeycodes(file, *xkb, NULL); break; case XkmIndicatorsIndex: tmp = ReadXkmIndicators(file, *xkb, NULL); break; case XkmSymbolsIndex: tmp = ReadXkmSymbols(file, *xkb); break; case XkmGeometryIndex: tmp = ReadXkmGeometry(file, *xkb); break; default: _XkbLibError(_XkbErrBadImplementation, XkbConfigText(tmpTOC.type, XkbMessage), 0); tmp = 0; break; } if (tmp > 0) { nRead += tmp; which &= ~(1 << toc[i].type); (*xkb)->defined |= (1 << toc[i].type); } if (nRead != tmpTOC.size) { _XkbLibError(_XkbErrBadLength, XkbConfigText(tmpTOC.type, XkbMessage), nRead - tmpTOC.size); } } return which; } xorg-server-21.1.16/xkb/xkbtext.c0000644000175000017500000011106714757411105012262 /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "dix.h" #include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include #include "xkbgeom.h" /***====================================================================***/ #define NUM_BUFFER 8 static struct textBuffer { int size; char *buffer; } textBuffer[NUM_BUFFER]; static int textBufferIndex; static char * tbGetBuffer(unsigned size) { struct textBuffer *tb; tb = &textBuffer[textBufferIndex]; textBufferIndex = (textBufferIndex + 1) % NUM_BUFFER; if (size > tb->size) { free(tb->buffer); tb->buffer = xnfalloc(size); tb->size = size; } return tb->buffer; } /***====================================================================***/ char * XkbAtomText(Atom atm, unsigned format) { const char *atmstr; char *rtrn, *tmp; atmstr = NameForAtom(atm); if (atmstr != NULL) { int len; len = strlen(atmstr) + 1; rtrn = tbGetBuffer(len); strlcpy(rtrn, atmstr, len); } else { rtrn = tbGetBuffer(1); rtrn[0] = '\0'; } if (format == XkbCFile) { for (tmp = rtrn; *tmp != '\0'; tmp++) { if ((tmp == rtrn) && (!isalpha(*tmp))) *tmp = '_'; else if (!isalnum(*tmp)) *tmp = '_'; } } return XkbStringText(rtrn, format); } /***====================================================================***/ char * XkbVModIndexText(XkbDescPtr xkb, unsigned ndx, unsigned format) { register int len; register Atom *vmodNames; char *rtrn; const char *tmp; char numBuf[20]; if (xkb && xkb->names) vmodNames = xkb->names->vmods; else vmodNames = NULL; tmp = NULL; if (ndx >= XkbNumVirtualMods) tmp = "illegal"; else if (vmodNames && (vmodNames[ndx] != None)) tmp = NameForAtom(vmodNames[ndx]); if (tmp == NULL) { snprintf(numBuf, sizeof(numBuf), "%d", ndx); tmp = numBuf; } len = strlen(tmp) + 1; if (format == XkbCFile) len += 4; rtrn = tbGetBuffer(len); if (format == XkbCFile) { strcpy(rtrn, "vmod_"); strncpy(&rtrn[5], tmp, len - 4); } else strncpy(rtrn, tmp, len); return rtrn; } #define VMOD_BUFFER_SIZE 512 char * XkbVModMaskText(XkbDescPtr xkb, unsigned modMask, unsigned mask, unsigned format) { register int i, bit; int len; char *mm, *rtrn; char *str, buf[VMOD_BUFFER_SIZE]; if ((modMask == 0) && (mask == 0)) { rtrn = tbGetBuffer(5); if (format == XkbCFile) sprintf(rtrn, "0"); else sprintf(rtrn, "none"); return rtrn; } if (modMask != 0) mm = XkbModMaskText(modMask, format); else mm = NULL; str = buf; buf[0] = '\0'; if (mask) { char *tmp; for (i = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (mask & bit) { tmp = XkbVModIndexText(xkb, i, format); len = strlen(tmp) + 1 + (str == buf ? 0 : 1); if (format == XkbCFile) len += 4; if ((str - buf) + len > VMOD_BUFFER_SIZE) continue; /* Skip */ if (str != buf) { if (format == XkbCFile) *str++ = '|'; else *str++ = '+'; len--; } if (format == XkbCFile) sprintf(str, "%sMask", tmp); else strcpy(str, tmp); str = &str[len - 1]; } } str = buf; } else str = NULL; if (mm) len = strlen(mm); else len = 0; if (str) len += strlen(str) + (mm == NULL ? 0 : 1); rtrn = tbGetBuffer(len + 1); rtrn[0] = '\0'; if (mm != NULL) { i = strlen(mm); if (i > len) i = len; strcpy(rtrn, mm); } else { i = 0; } if (str != NULL) { if (mm != NULL) { if (format == XkbCFile) strcat(rtrn, "|"); else strcat(rtrn, "+"); } strncat(rtrn, str, len - i); } rtrn[len] = '\0'; return rtrn; } static const char *modNames[XkbNumModifiers] = { "Shift", "Lock", "Control", "Mod1", "Mod2", "Mod3", "Mod4", "Mod5" }; char * XkbModIndexText(unsigned ndx, unsigned format) { char *rtrn; char buf[100]; if (format == XkbCFile) { if (ndx < XkbNumModifiers) snprintf(buf, sizeof(buf), "%sMapIndex", modNames[ndx]); else if (ndx == XkbNoModifier) snprintf(buf, sizeof(buf), "XkbNoModifier"); else snprintf(buf, sizeof(buf), "0x%02x", ndx); } else { if (ndx < XkbNumModifiers) strcpy(buf, modNames[ndx]); else if (ndx == XkbNoModifier) strcpy(buf, "none"); else snprintf(buf, sizeof(buf), "ILLEGAL_%02x", ndx); } rtrn = tbGetBuffer(strlen(buf) + 1); strcpy(rtrn, buf); return rtrn; } char * XkbModMaskText(unsigned mask, unsigned format) { register int i, bit; char buf[64], *rtrn; if ((mask & 0xff) == 0xff) { if (format == XkbCFile) strcpy(buf, "0xff"); else strcpy(buf, "all"); } else if ((mask & 0xff) == 0) { if (format == XkbCFile) strcpy(buf, "0"); else strcpy(buf, "none"); } else { char *str = buf; buf[0] = '\0'; for (i = 0, bit = 1; i < XkbNumModifiers; i++, bit <<= 1) { if (mask & bit) { if (str != buf) { if (format == XkbCFile) *str++ = '|'; else *str++ = '+'; } strcpy(str, modNames[i]); str = &str[strlen(str)]; if (format == XkbCFile) { strcpy(str, "Mask"); str += 4; } } } } rtrn = tbGetBuffer(strlen(buf) + 1); strcpy(rtrn, buf); return rtrn; } /***====================================================================***/ /*ARGSUSED*/ char * XkbConfigText(unsigned config, unsigned format) { static char *buf; buf = tbGetBuffer(32); switch (config) { case XkmSemanticsFile: strcpy(buf, "Semantics"); break; case XkmLayoutFile: strcpy(buf, "Layout"); break; case XkmKeymapFile: strcpy(buf, "Keymap"); break; case XkmGeometryFile: case XkmGeometryIndex: strcpy(buf, "Geometry"); break; case XkmTypesIndex: strcpy(buf, "Types"); break; case XkmCompatMapIndex: strcpy(buf, "CompatMap"); break; case XkmSymbolsIndex: strcpy(buf, "Symbols"); break; case XkmIndicatorsIndex: strcpy(buf, "Indicators"); break; case XkmKeyNamesIndex: strcpy(buf, "KeyNames"); break; case XkmVirtualModsIndex: strcpy(buf, "VirtualMods"); break; default: sprintf(buf, "unknown(%d)", config); break; } return buf; } /***====================================================================***/ char * XkbKeysymText(KeySym sym, unsigned format) { static char buf[32]; if (sym == NoSymbol) strcpy(buf, "NoSymbol"); else snprintf(buf, sizeof(buf), "0x%lx", (long) sym); return buf; } char * XkbKeyNameText(char *name, unsigned format) { char *buf; if (format == XkbCFile) { buf = tbGetBuffer(5); memcpy(buf, name, 4); buf[4] = '\0'; } else { int len; buf = tbGetBuffer(7); buf[0] = '<'; memcpy(&buf[1], name, 4); buf[5] = '\0'; len = strlen(buf); buf[len++] = '>'; buf[len] = '\0'; } return buf; } /***====================================================================***/ static const char *siMatchText[5] = { "NoneOf", "AnyOfOrNone", "AnyOf", "AllOf", "Exactly" }; const char * XkbSIMatchText(unsigned type, unsigned format) { static char buf[40]; const char *rtrn; switch (type & XkbSI_OpMask) { case XkbSI_NoneOf: rtrn = siMatchText[0]; break; case XkbSI_AnyOfOrNone: rtrn = siMatchText[1]; break; case XkbSI_AnyOf: rtrn = siMatchText[2]; break; case XkbSI_AllOf: rtrn = siMatchText[3]; break; case XkbSI_Exactly: rtrn = siMatchText[4]; break; default: snprintf(buf, sizeof(buf), "0x%x", type & XkbSI_OpMask); return buf; } if (format == XkbCFile) { if (type & XkbSI_LevelOneOnly) snprintf(buf, sizeof(buf), "XkbSI_LevelOneOnly|XkbSI_%s", rtrn); else snprintf(buf, sizeof(buf), "XkbSI_%s", rtrn); rtrn = buf; } return rtrn; } /***====================================================================***/ static const char *imWhichNames[] = { "base", "latched", "locked", "effective", "compat" }; char * XkbIMWhichStateMaskText(unsigned use_which, unsigned format) { int len; unsigned i, bit, tmp; char *buf; if (use_which == 0) { buf = tbGetBuffer(2); strcpy(buf, "0"); return buf; } tmp = use_which & XkbIM_UseAnyMods; for (len = i = 0, bit = 1; tmp != 0; i++, bit <<= 1) { if (tmp & bit) { tmp &= ~bit; len += strlen(imWhichNames[i]) + 1; if (format == XkbCFile) len += 9; } } buf = tbGetBuffer(len + 1); tmp = use_which & XkbIM_UseAnyMods; for (len = i = 0, bit = 1; tmp != 0; i++, bit <<= 1) { if (tmp & bit) { tmp &= ~bit; if (format == XkbCFile) { if (len != 0) buf[len++] = '|'; sprintf(&buf[len], "XkbIM_Use%s", imWhichNames[i]); buf[len + 9] = toupper(buf[len + 9]); } else { if (len != 0) buf[len++] = '+'; sprintf(&buf[len], "%s", imWhichNames[i]); } len += strlen(&buf[len]); } } return buf; } static const char *ctrlNames[] = { "repeatKeys", "slowKeys", "bounceKeys", "stickyKeys", "mouseKeys", "mouseKeysAccel", "accessXKeys", "accessXTimeout", "accessXFeedback", "audibleBell", "overlay1", "overlay2", "ignoreGroupLock" }; char * XkbControlsMaskText(unsigned ctrls, unsigned format) { int len; unsigned i, bit, tmp; char *buf; if (ctrls == 0) { buf = tbGetBuffer(5); if (format == XkbCFile) strcpy(buf, "0"); else strcpy(buf, "none"); return buf; } tmp = ctrls & XkbAllBooleanCtrlsMask; for (len = i = 0, bit = 1; tmp != 0; i++, bit <<= 1) { if (tmp & bit) { tmp &= ~bit; len += strlen(ctrlNames[i]) + 1; if (format == XkbCFile) len += 7; } } buf = tbGetBuffer(len + 1); tmp = ctrls & XkbAllBooleanCtrlsMask; for (len = i = 0, bit = 1; tmp != 0; i++, bit <<= 1) { if (tmp & bit) { tmp &= ~bit; if (format == XkbCFile) { if (len != 0) buf[len++] = '|'; sprintf(&buf[len], "Xkb%sMask", ctrlNames[i]); buf[len + 3] = toupper(buf[len + 3]); } else { if (len != 0) buf[len++] = '+'; sprintf(&buf[len], "%s", ctrlNames[i]); } len += strlen(&buf[len]); } } return buf; } /***====================================================================***/ char * XkbStringText(char *str, unsigned format) { char *buf; register char *in, *out; int len; Bool ok; if (str == NULL) { buf = tbGetBuffer(2); buf[0] = '\0'; return buf; } else if (format == XkbXKMFile) return str; for (ok = TRUE, len = 0, in = str; *in != '\0'; in++, len++) { if (!isprint(*in)) { ok = FALSE; switch (*in) { case '\n': case '\t': case '\v': case '\b': case '\r': case '\f': len++; break; default: len += 4; break; } } } if (ok) return str; buf = tbGetBuffer(len + 1); for (in = str, out = buf; *in != '\0'; in++) { if (isprint(*in)) *out++ = *in; else { *out++ = '\\'; if (*in == '\n') *out++ = 'n'; else if (*in == '\t') *out++ = 't'; else if (*in == '\v') *out++ = 'v'; else if (*in == '\b') *out++ = 'b'; else if (*in == '\r') *out++ = 'r'; else if (*in == '\f') *out++ = 'f'; else if ((*in == '\033') && (format == XkbXKMFile)) { *out++ = 'e'; } else { *out++ = '0'; sprintf(out, "%o", (unsigned char) *in); while (*out != '\0') out++; } } } *out++ = '\0'; return buf; } /***====================================================================***/ char * XkbGeomFPText(int val, unsigned format) { int whole, frac; char *buf; buf = tbGetBuffer(12); if (format == XkbCFile) { sprintf(buf, "%d", val); } else { whole = val / XkbGeomPtsPerMM; frac = val % XkbGeomPtsPerMM; if (frac != 0) sprintf(buf, "%d.%d", whole, frac); else sprintf(buf, "%d", whole); } return buf; } char * XkbDoodadTypeText(unsigned type, unsigned format) { char *buf; if (format == XkbCFile) { buf = tbGetBuffer(24); if (type == XkbOutlineDoodad) strcpy(buf, "XkbOutlineDoodad"); else if (type == XkbSolidDoodad) strcpy(buf, "XkbSolidDoodad"); else if (type == XkbTextDoodad) strcpy(buf, "XkbTextDoodad"); else if (type == XkbIndicatorDoodad) strcpy(buf, "XkbIndicatorDoodad"); else if (type == XkbLogoDoodad) strcpy(buf, "XkbLogoDoodad"); else sprintf(buf, "UnknownDoodad%d", type); } else { buf = tbGetBuffer(12); if (type == XkbOutlineDoodad) strcpy(buf, "outline"); else if (type == XkbSolidDoodad) strcpy(buf, "solid"); else if (type == XkbTextDoodad) strcpy(buf, "text"); else if (type == XkbIndicatorDoodad) strcpy(buf, "indicator"); else if (type == XkbLogoDoodad) strcpy(buf, "logo"); else sprintf(buf, "unknown%d", type); } return buf; } static const char *actionTypeNames[XkbSA_NumActions] = { "NoAction", "SetMods", "LatchMods", "LockMods", "SetGroup", "LatchGroup", "LockGroup", "MovePtr", "PtrBtn", "LockPtrBtn", "SetPtrDflt", "ISOLock", "Terminate", "SwitchScreen", "SetControls", "LockControls", "ActionMessage", "RedirectKey", "DeviceBtn", "LockDeviceBtn" }; const char * XkbActionTypeText(unsigned type, unsigned format) { static char buf[32]; const char *rtrn; if (type <= XkbSA_LastAction) { rtrn = actionTypeNames[type]; if (format == XkbCFile) { snprintf(buf, sizeof(buf), "XkbSA_%s", rtrn); return buf; } return rtrn; } snprintf(buf, sizeof(buf), "Private"); return buf; } /***====================================================================***/ static int TryCopyStr(char *to, const char *from, int *pLeft) { register int len; if (*pLeft > 0) { len = strlen(from); if (len < ((*pLeft) - 3)) { strcat(to, from); *pLeft -= len; return TRUE; } } *pLeft = -1; return FALSE; } /*ARGSUSED*/ static Bool CopyNoActionArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { return TRUE; } static Bool CopyModActionArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbModAction *act; unsigned tmp; act = &action->mods; tmp = XkbModActionVMods(act); TryCopyStr(buf, "modifiers=", sz); if (act->flags & XkbSA_UseModMapMods) TryCopyStr(buf, "modMapMods", sz); else if (act->real_mods || tmp) { TryCopyStr(buf, XkbVModMaskText(xkb, act->real_mods, tmp, XkbXKBFile), sz); } else TryCopyStr(buf, "none", sz); if (act->type == XkbSA_LockMods) return TRUE; if (act->flags & XkbSA_ClearLocks) TryCopyStr(buf, ",clearLocks", sz); if (act->flags & XkbSA_LatchToLock) TryCopyStr(buf, ",latchToLock", sz); return TRUE; } /*ARGSUSED*/ static Bool CopyGroupActionArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbGroupAction *act; char tbuf[32]; act = &action->group; TryCopyStr(buf, "group=", sz); if (act->flags & XkbSA_GroupAbsolute) snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act) + 1); else if (XkbSAGroup(act) < 0) snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act)); else snprintf(tbuf, sizeof(tbuf), "+%d", XkbSAGroup(act)); TryCopyStr(buf, tbuf, sz); if (act->type == XkbSA_LockGroup) return TRUE; if (act->flags & XkbSA_ClearLocks) TryCopyStr(buf, ",clearLocks", sz); if (act->flags & XkbSA_LatchToLock) TryCopyStr(buf, ",latchToLock", sz); return TRUE; } /*ARGSUSED*/ static Bool CopyMovePtrArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbPtrAction *act; int x, y; char tbuf[32]; act = &action->ptr; x = XkbPtrActionX(act); y = XkbPtrActionY(act); if ((act->flags & XkbSA_MoveAbsoluteX) || (x < 0)) snprintf(tbuf, sizeof(tbuf), "x=%d", x); else snprintf(tbuf, sizeof(tbuf), "x=+%d", x); TryCopyStr(buf, tbuf, sz); if ((act->flags & XkbSA_MoveAbsoluteY) || (y < 0)) snprintf(tbuf, sizeof(tbuf), ",y=%d", y); else snprintf(tbuf, sizeof(tbuf), ",y=+%d", y); TryCopyStr(buf, tbuf, sz); if (act->flags & XkbSA_NoAcceleration) TryCopyStr(buf, ",!accel", sz); return TRUE; } /*ARGSUSED*/ static Bool CopyPtrBtnArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbPtrBtnAction *act; char tbuf[32]; act = &action->btn; TryCopyStr(buf, "button=", sz); if ((act->button > 0) && (act->button < 6)) { snprintf(tbuf, sizeof(tbuf), "%d", act->button); TryCopyStr(buf, tbuf, sz); } else TryCopyStr(buf, "default", sz); if (act->count > 0) { snprintf(tbuf, sizeof(tbuf), ",count=%d", act->count); TryCopyStr(buf, tbuf, sz); } if (action->type == XkbSA_LockPtrBtn) { switch (act->flags & (XkbSA_LockNoUnlock | XkbSA_LockNoLock)) { case XkbSA_LockNoLock: TryCopyStr(buf, ",affect=unlock", sz); break; case XkbSA_LockNoUnlock: TryCopyStr(buf, ",affect=lock", sz); break; case XkbSA_LockNoUnlock | XkbSA_LockNoLock: TryCopyStr(buf, ",affect=neither", sz); break; default: TryCopyStr(buf, ",affect=both", sz); break; } } return TRUE; } /*ARGSUSED*/ static Bool CopySetPtrDfltArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbPtrDfltAction *act; char tbuf[32]; act = &action->dflt; if (act->affect == XkbSA_AffectDfltBtn) { TryCopyStr(buf, "affect=button,button=", sz); if ((act->flags & XkbSA_DfltBtnAbsolute) || (XkbSAPtrDfltValue(act) < 0)) snprintf(tbuf, sizeof(tbuf), "%d", XkbSAPtrDfltValue(act)); else snprintf(tbuf, sizeof(tbuf), "+%d", XkbSAPtrDfltValue(act)); TryCopyStr(buf, tbuf, sz); } return TRUE; } static Bool CopyISOLockArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbISOAction *act; char tbuf[64]; memset(tbuf, 0, sizeof(tbuf)); act = &action->iso; if (act->flags & XkbSA_ISODfltIsGroup) { TryCopyStr(tbuf, "group=", sz); if (act->flags & XkbSA_GroupAbsolute) snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act) + 1); else if (XkbSAGroup(act) < 0) snprintf(tbuf, sizeof(tbuf), "%d", XkbSAGroup(act)); else snprintf(tbuf, sizeof(tbuf), "+%d", XkbSAGroup(act)); TryCopyStr(buf, tbuf, sz); } else { unsigned tmp; tmp = XkbModActionVMods(act); TryCopyStr(buf, "modifiers=", sz); if (act->flags & XkbSA_UseModMapMods) TryCopyStr(buf, "modMapMods", sz); else if (act->real_mods || tmp) { if (act->real_mods) { TryCopyStr(buf, XkbModMaskText(act->real_mods, XkbXKBFile), sz); if (tmp) TryCopyStr(buf, "+", sz); } if (tmp) TryCopyStr(buf, XkbVModMaskText(xkb, 0, tmp, XkbXKBFile), sz); } else TryCopyStr(buf, "none", sz); } TryCopyStr(buf, ",affect=", sz); if ((act->affect & XkbSA_ISOAffectMask) == 0) TryCopyStr(buf, "all", sz); else { int nOut = 0; if ((act->affect & XkbSA_ISONoAffectMods) == 0) { TryCopyStr(buf, "mods", sz); nOut++; } if ((act->affect & XkbSA_ISONoAffectGroup) == 0) { snprintf(tbuf, sizeof(tbuf), "%sgroups", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if ((act->affect & XkbSA_ISONoAffectPtr) == 0) { snprintf(tbuf, sizeof(tbuf), "%spointer", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if ((act->affect & XkbSA_ISONoAffectCtrls) == 0) { snprintf(tbuf, sizeof(tbuf), "%scontrols", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } } return TRUE; } /*ARGSUSED*/ static Bool CopySwitchScreenArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbSwitchScreenAction *act; char tbuf[32]; act = &action->screen; if ((act->flags & XkbSA_SwitchAbsolute) || (XkbSAScreen(act) < 0)) snprintf(tbuf, sizeof(tbuf), "screen=%d", XkbSAScreen(act)); else snprintf(tbuf, sizeof(tbuf), "screen=+%d", XkbSAScreen(act)); TryCopyStr(buf, tbuf, sz); if (act->flags & XkbSA_SwitchApplication) TryCopyStr(buf, ",!same", sz); else TryCopyStr(buf, ",same", sz); return TRUE; } /*ARGSUSED*/ static Bool CopySetLockControlsArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbCtrlsAction *act; unsigned tmp; char tbuf[32]; act = &action->ctrls; tmp = XkbActionCtrls(act); TryCopyStr(buf, "controls=", sz); if (tmp == 0) TryCopyStr(buf, "none", sz); else if ((tmp & XkbAllBooleanCtrlsMask) == XkbAllBooleanCtrlsMask) TryCopyStr(buf, "all", sz); else { int nOut = 0; if (tmp & XkbRepeatKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sRepeatKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbSlowKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sSlowKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbBounceKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sBounceKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbStickyKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sStickyKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbMouseKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sMouseKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbMouseKeysAccelMask) { snprintf(tbuf, sizeof(tbuf), "%sMouseKeysAccel", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbAccessXKeysMask) { snprintf(tbuf, sizeof(tbuf), "%sAccessXKeys", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbAccessXTimeoutMask) { snprintf(tbuf, sizeof(tbuf), "%sAccessXTimeout", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbAccessXFeedbackMask) { snprintf(tbuf, sizeof(tbuf), "%sAccessXFeedback", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbAudibleBellMask) { snprintf(tbuf, sizeof(tbuf), "%sAudibleBell", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbOverlay1Mask) { snprintf(tbuf, sizeof(tbuf), "%sOverlay1", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbOverlay2Mask) { snprintf(tbuf, sizeof(tbuf), "%sOverlay2", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } if (tmp & XkbIgnoreGroupLockMask) { snprintf(tbuf, sizeof(tbuf), "%sIgnoreGroupLock", (nOut > 0 ? "+" : "")); TryCopyStr(buf, tbuf, sz); nOut++; } } return TRUE; } /*ARGSUSED*/ static Bool CopyActionMessageArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbMessageAction *act; unsigned all; char tbuf[32]; act = &action->msg; all = XkbSA_MessageOnPress | XkbSA_MessageOnRelease; TryCopyStr(buf, "report=", sz); if ((act->flags & all) == 0) TryCopyStr(buf, "none", sz); else if ((act->flags & all) == all) TryCopyStr(buf, "all", sz); else if (act->flags & XkbSA_MessageOnPress) TryCopyStr(buf, "KeyPress", sz); else TryCopyStr(buf, "KeyRelease", sz); snprintf(tbuf, sizeof(tbuf), ",data[0]=0x%02x", act->message[0]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[1]=0x%02x", act->message[1]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[2]=0x%02x", act->message[2]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[3]=0x%02x", act->message[3]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[4]=0x%02x", act->message[4]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[5]=0x%02x", act->message[5]); TryCopyStr(buf, tbuf, sz); return TRUE; } static Bool CopyRedirectKeyArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbRedirectKeyAction *act; char tbuf[32], *tmp; unsigned kc; unsigned vmods, vmods_mask; act = &action->redirect; kc = act->new_key; vmods = XkbSARedirectVMods(act); vmods_mask = XkbSARedirectVModsMask(act); if (xkb && xkb->names && xkb->names->keys && (kc <= xkb->max_key_code) && (xkb->names->keys[kc].name[0] != '\0')) { char *kn; kn = XkbKeyNameText(xkb->names->keys[kc].name, XkbXKBFile); snprintf(tbuf, sizeof(tbuf), "key=%s", kn); } else snprintf(tbuf, sizeof(tbuf), "key=%d", kc); TryCopyStr(buf, tbuf, sz); if ((act->mods_mask == 0) && (vmods_mask == 0)) return TRUE; if ((act->mods_mask == XkbAllModifiersMask) && (vmods_mask == XkbAllVirtualModsMask)) { tmp = XkbVModMaskText(xkb, act->mods, vmods, XkbXKBFile); TryCopyStr(buf, ",mods=", sz); TryCopyStr(buf, tmp, sz); } else { if ((act->mods_mask & act->mods) || (vmods_mask & vmods)) { tmp = XkbVModMaskText(xkb, act->mods_mask & act->mods, vmods_mask & vmods, XkbXKBFile); TryCopyStr(buf, ",mods= ", sz); TryCopyStr(buf, tmp, sz); } if ((act->mods_mask & (~act->mods)) || (vmods_mask & (~vmods))) { tmp = XkbVModMaskText(xkb, act->mods_mask & (~act->mods), vmods_mask & (~vmods), XkbXKBFile); TryCopyStr(buf, ",clearMods= ", sz); TryCopyStr(buf, tmp, sz); } } return TRUE; } /*ARGSUSED*/ static Bool CopyDeviceBtnArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbDeviceBtnAction *act; char tbuf[32]; act = &action->devbtn; snprintf(tbuf, sizeof(tbuf), "device= %d", act->device); TryCopyStr(buf, tbuf, sz); TryCopyStr(buf, ",button=", sz); snprintf(tbuf, sizeof(tbuf), "%d", act->button); TryCopyStr(buf, tbuf, sz); if (act->count > 0) { snprintf(tbuf, sizeof(tbuf), ",count=%d", act->count); TryCopyStr(buf, tbuf, sz); } if (action->type == XkbSA_LockDeviceBtn) { switch (act->flags & (XkbSA_LockNoUnlock | XkbSA_LockNoLock)) { case XkbSA_LockNoLock: TryCopyStr(buf, ",affect=unlock", sz); break; case XkbSA_LockNoUnlock: TryCopyStr(buf, ",affect=lock", sz); break; case XkbSA_LockNoUnlock | XkbSA_LockNoLock: TryCopyStr(buf, ",affect=neither", sz); break; default: TryCopyStr(buf, ",affect=both", sz); break; } } return TRUE; } /*ARGSUSED*/ static Bool CopyOtherArgs(XkbDescPtr xkb, XkbAction *action, char *buf, int *sz) { XkbAnyAction *act; char tbuf[32]; act = &action->any; snprintf(tbuf, sizeof(tbuf), "type=0x%02x", act->type); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[0]=0x%02x", act->data[0]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[1]=0x%02x", act->data[1]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[2]=0x%02x", act->data[2]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[3]=0x%02x", act->data[3]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[4]=0x%02x", act->data[4]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[5]=0x%02x", act->data[5]); TryCopyStr(buf, tbuf, sz); snprintf(tbuf, sizeof(tbuf), ",data[6]=0x%02x", act->data[6]); TryCopyStr(buf, tbuf, sz); return TRUE; } typedef Bool (*actionCopy) (XkbDescPtr /* xkb */ , XkbAction * /* action */ , char * /* buf */ , int * /* sz */ ); static actionCopy copyActionArgs[XkbSA_NumActions] = { CopyNoActionArgs /* NoAction */ , CopyModActionArgs /* SetMods */ , CopyModActionArgs /* LatchMods */ , CopyModActionArgs /* LockMods */ , CopyGroupActionArgs /* SetGroup */ , CopyGroupActionArgs /* LatchGroup */ , CopyGroupActionArgs /* LockGroup */ , CopyMovePtrArgs /* MovePtr */ , CopyPtrBtnArgs /* PtrBtn */ , CopyPtrBtnArgs /* LockPtrBtn */ , CopySetPtrDfltArgs /* SetPtrDflt */ , CopyISOLockArgs /* ISOLock */ , CopyNoActionArgs /* Terminate */ , CopySwitchScreenArgs /* SwitchScreen */ , CopySetLockControlsArgs /* SetControls */ , CopySetLockControlsArgs /* LockControls */ , CopyActionMessageArgs /* ActionMessage */ , CopyRedirectKeyArgs /* RedirectKey */ , CopyDeviceBtnArgs /* DeviceBtn */ , CopyDeviceBtnArgs /* LockDeviceBtn */ }; #define ACTION_SZ 256 char * XkbActionText(XkbDescPtr xkb, XkbAction *action, unsigned format) { char buf[ACTION_SZ], *tmp; int sz; if (format == XkbCFile) { snprintf(buf, sizeof(buf), "{ %20s, { 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x, 0x%02x } }", XkbActionTypeText(action->type, XkbCFile), action->any.data[0], action->any.data[1], action->any.data[2], action->any.data[3], action->any.data[4], action->any.data[5], action->any.data[6]); } else { snprintf(buf, sizeof(buf), "%s(", XkbActionTypeText(action->type, XkbXKBFile)); sz = ACTION_SZ - strlen(buf) + 2; /* room for close paren and NULL */ if (action->type < (unsigned) XkbSA_NumActions) (*copyActionArgs[action->type]) (xkb, action, buf, &sz); else CopyOtherArgs(xkb, action, buf, &sz); TryCopyStr(buf, ")", &sz); } tmp = tbGetBuffer(strlen(buf) + 1); if (tmp != NULL) strcpy(tmp, buf); return tmp; } char * XkbBehaviorText(XkbDescPtr xkb, XkbBehavior * behavior, unsigned format) { char buf[256], *tmp; if (format == XkbCFile) { if (behavior->type == XkbKB_Default) snprintf(buf, sizeof(buf), "{ 0, 0 }"); else snprintf(buf, sizeof(buf), "{ %3d, 0x%02x }", behavior->type, behavior->data); } else { unsigned type, permanent; type = behavior->type & XkbKB_OpMask; permanent = ((behavior->type & XkbKB_Permanent) != 0); if (type == XkbKB_Lock) { snprintf(buf, sizeof(buf), "lock= %s", (permanent ? "Permanent" : "TRUE")); } else if (type == XkbKB_RadioGroup) { int g; g = ((behavior->data) & (~XkbKB_RGAllowNone)) + 1; if (XkbKB_RGAllowNone & behavior->data) { snprintf(buf, sizeof(buf), "allowNone,"); tmp = &buf[strlen(buf)]; } else tmp = buf; if (permanent) sprintf(tmp, "permanentRadioGroup= %d", g); else sprintf(tmp, "radioGroup= %d", g); } else if ((type == XkbKB_Overlay1) || (type == XkbKB_Overlay2)) { int ndx, kc; char *kn; ndx = ((type == XkbKB_Overlay1) ? 1 : 2); kc = behavior->data; if ((xkb) && (xkb->names) && (xkb->names->keys)) kn = XkbKeyNameText(xkb->names->keys[kc].name, XkbXKBFile); else { static char tbuf[8]; snprintf(tbuf, sizeof(tbuf), "%d", kc); kn = tbuf; } if (permanent) snprintf(buf, sizeof(buf), "permanentOverlay%d= %s", ndx, kn); else snprintf(buf, sizeof(buf), "overlay%d= %s", ndx, kn); } } tmp = tbGetBuffer(strlen(buf) + 1); if (tmp != NULL) strcpy(tmp, buf); return tmp; } /***====================================================================***/ char * XkbIndentText(unsigned size) { static char buf[32]; register int i; if (size > 31) size = 31; for (i = 0; i < size; i++) { buf[i] = ' '; } buf[size] = '\0'; return buf; } xorg-server-21.1.16/xkb/xkbfmisc.c0000644000175000017500000003652214757411105012401 /************************************************************ Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "dix.h" #include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include #include "xkbgeom.h" #include "xkb.h" unsigned _XkbKSCheckCase(KeySym ks) { unsigned set, rtrn; set = (ks & (~0xff)) >> 8; rtrn = 0; switch (set) { case 0: /* latin 1 */ if (((ks >= XK_A) && (ks <= XK_Z)) || ((ks >= XK_Agrave) && (ks <= XK_THORN) && (ks != XK_multiply))) { rtrn |= _XkbKSUpper; } if (((ks >= XK_a) && (ks <= XK_z)) || ((ks >= XK_ssharp) && (ks <= XK_ydiaeresis) && (ks != XK_division))) { rtrn |= _XkbKSLower; } break; case 1: /* latin 2 */ if (((ks >= XK_Aogonek) && (ks <= XK_Zabovedot) && (ks != XK_breve)) || ((ks >= XK_Racute) && (ks <= XK_Tcedilla))) { rtrn |= _XkbKSUpper; } if (((ks >= XK_aogonek) && (ks <= XK_zabovedot) && (ks != XK_ogonek) && (ks != XK_caron) && (ks != XK_doubleacute)) || ((ks >= XK_racute) && (ks <= XK_tcedilla))) { rtrn |= _XkbKSLower; } break; case 2: /* latin 3 */ if (((ks >= XK_Hstroke) && (ks <= XK_Jcircumflex)) || ((ks >= XK_Cabovedot) && (ks <= XK_Scircumflex))) { rtrn |= _XkbKSUpper; } if (((ks >= XK_hstroke) && (ks <= XK_jcircumflex)) || ((ks >= XK_cabovedot) && (ks <= XK_scircumflex))) { rtrn |= _XkbKSLower; } break; case 3: /* latin 4 */ if (((ks >= XK_Rcedilla) && (ks <= XK_Tslash)) || (ks == XK_ENG) || ((ks >= XK_Amacron) && (ks <= XK_Umacron))) { rtrn |= _XkbKSUpper; } if ((ks == XK_kra) || ((ks >= XK_rcedilla) && (ks <= XK_tslash)) || (ks == XK_eng) || ((ks >= XK_amacron) && (ks <= XK_umacron))) { rtrn |= _XkbKSLower; } break; case 18: /* latin 8 */ if ((ks == XK_Wcircumflex) || (ks == XK_Ycircumflex) || (ks == XK_Babovedot) || (ks == XK_Dabovedot) || (ks == XK_Fabovedot) || (ks == XK_Mabovedot) || (ks == XK_Pabovedot) || (ks == XK_Sabovedot) || (ks == XK_Tabovedot) || (ks == XK_Wgrave) || (ks == XK_Wacute) || (ks == XK_Wdiaeresis) || (ks == XK_Ygrave)) { rtrn |= _XkbKSUpper; } if ((ks == XK_wcircumflex) || (ks == XK_ycircumflex) || (ks == XK_babovedot) || (ks == XK_dabovedot) || (ks == XK_fabovedot) || (ks == XK_mabovedot) || (ks == XK_pabovedot) || (ks == XK_sabovedot) || (ks == XK_tabovedot) || (ks == XK_wgrave) || (ks == XK_wacute) || (ks == XK_wdiaeresis) || (ks == XK_ygrave)) { rtrn |= _XkbKSLower; } break; case 19: /* latin 9 */ if ((ks == XK_OE) || (ks == XK_Ydiaeresis)) { rtrn |= _XkbKSUpper; } if (ks == XK_oe) { rtrn |= _XkbKSLower; } break; } return rtrn; } /***===================================================================***/ static Bool XkbWriteSectionFromName(FILE * file, const char *sectionName, const char *name) { fprintf(file, " xkb_%-20s { include \"%s\" };\n", sectionName, name); return TRUE; } #define NEED_DESC(n) ((!n)||((n)[0]=='+')||((n)[0]=='|')||(strchr((n),'%'))) #define COMPLETE(n) ((n)&&(!NEED_DESC(n))) /* ARGSUSED */ static void _AddIncl(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, int index, void *priv) { if ((priv) && (strcmp((char *) priv, "%") != 0)) fprintf(file, " include \"%s\"\n", (char *) priv); return; } Bool XkbWriteXKBKeymapForNames(FILE * file, XkbComponentNamesPtr names, XkbDescPtr xkb, unsigned want, unsigned need) { const char *tmp; unsigned complete; XkbNamesPtr old_names; int multi_section; unsigned wantNames, wantConfig, wantDflts; complete = 0; if (COMPLETE(names->keycodes)) complete |= XkmKeyNamesMask; if (COMPLETE(names->types)) complete |= XkmTypesMask; if (COMPLETE(names->compat)) complete |= XkmCompatMapMask; if (COMPLETE(names->symbols)) complete |= XkmSymbolsMask; if (COMPLETE(names->geometry)) complete |= XkmGeometryMask; want |= (complete | need); if (want & XkmSymbolsMask) want |= XkmKeyNamesMask | XkmTypesMask; if (want == 0) return FALSE; if (xkb) { old_names = xkb->names; xkb->defined = 0; /* Wow would it ever be neat if we didn't need this noise. */ if (xkb->names && xkb->names->keys) xkb->defined |= XkmKeyNamesMask; if (xkb->map && xkb->map->types) xkb->defined |= XkmTypesMask; if (xkb->compat) xkb->defined |= XkmCompatMapMask; if (xkb->map && xkb->map->num_syms) xkb->defined |= XkmSymbolsMask; if (xkb->indicators) xkb->defined |= XkmIndicatorsMask; if (xkb->geom) xkb->defined |= XkmGeometryMask; } else { old_names = NULL; } wantConfig = want & (~complete); if (xkb != NULL) { if (wantConfig & XkmTypesMask) { if ((!xkb->map) || (xkb->map->num_types < XkbNumRequiredTypes)) wantConfig &= ~XkmTypesMask; } if (wantConfig & XkmCompatMapMask) { if ((!xkb->compat) || (xkb->compat->num_si < 1)) wantConfig &= ~XkmCompatMapMask; } if (wantConfig & XkmSymbolsMask) { if ((!xkb->map) || (!xkb->map->key_sym_map)) wantConfig &= ~XkmSymbolsMask; } if (wantConfig & XkmIndicatorsMask) { if (!xkb->indicators) wantConfig &= ~XkmIndicatorsMask; } if (wantConfig & XkmKeyNamesMask) { if ((!xkb->names) || (!xkb->names->keys)) wantConfig &= ~XkmKeyNamesMask; } if ((wantConfig & XkmGeometryMask) && (!xkb->geom)) wantConfig &= ~XkmGeometryMask; } else { wantConfig = 0; } complete |= wantConfig; wantDflts = 0; wantNames = want & (~complete); if ((xkb != NULL) && (old_names != NULL)) { if (wantNames & XkmTypesMask) { if (old_names->types != None) { tmp = NameForAtom(old_names->types); names->types = Xstrdup(tmp); } else { wantDflts |= XkmTypesMask; } complete |= XkmTypesMask; } if (wantNames & XkmCompatMapMask) { if (old_names->compat != None) { tmp = NameForAtom(old_names->compat); names->compat = Xstrdup(tmp); } else wantDflts |= XkmCompatMapMask; complete |= XkmCompatMapMask; } if (wantNames & XkmSymbolsMask) { if (old_names->symbols == None) return FALSE; tmp = NameForAtom(old_names->symbols); names->symbols = Xstrdup(tmp); complete |= XkmSymbolsMask; } if (wantNames & XkmKeyNamesMask) { if (old_names->keycodes != None) { tmp = NameForAtom(old_names->keycodes); names->keycodes = Xstrdup(tmp); } else wantDflts |= XkmKeyNamesMask; complete |= XkmKeyNamesMask; } if (wantNames & XkmGeometryMask) { if (old_names->geometry == None) return FALSE; tmp = NameForAtom(old_names->geometry); names->geometry = Xstrdup(tmp); complete |= XkmGeometryMask; wantNames &= ~XkmGeometryMask; } } if (complete & XkmCompatMapMask) complete |= XkmIndicatorsMask | XkmVirtualModsMask; else if (complete & (XkmSymbolsMask | XkmTypesMask)) complete |= XkmVirtualModsMask; if (need & (~complete)) return FALSE; if ((complete & XkmSymbolsMask) && ((XkmKeyNamesMask | XkmTypesMask) & (~complete))) return FALSE; multi_section = 1; if (((complete & XkmKeymapRequired) == XkmKeymapRequired) && ((complete & (~XkmKeymapLegal)) == 0)) { fprintf(file, "xkb_keymap \"default\" {\n"); } else if (((complete & XkmSemanticsRequired) == XkmSemanticsRequired) && ((complete & (~XkmSemanticsLegal)) == 0)) { fprintf(file, "xkb_semantics \"default\" {\n"); } else if (((complete & XkmLayoutRequired) == XkmLayoutRequired) && ((complete & (~XkmLayoutLegal)) == 0)) { fprintf(file, "xkb_layout \"default\" {\n"); } else if (XkmSingleSection(complete & (~XkmVirtualModsMask))) { multi_section = 0; } else { return FALSE; } wantNames = complete & (~(wantConfig | wantDflts)); if (wantConfig & XkmKeyNamesMask) XkbWriteXKBKeycodes(file, xkb, FALSE, FALSE, _AddIncl, names->keycodes); else if (wantDflts & XkmKeyNamesMask) fprintf(stderr, "Default symbols not implemented yet!\n"); else if (wantNames & XkmKeyNamesMask) XkbWriteSectionFromName(file, "keycodes", names->keycodes); if (wantConfig & XkmTypesMask) XkbWriteXKBKeyTypes(file, xkb, FALSE, FALSE, _AddIncl, names->types); else if (wantDflts & XkmTypesMask) fprintf(stderr, "Default types not implemented yet!\n"); else if (wantNames & XkmTypesMask) XkbWriteSectionFromName(file, "types", names->types); if (wantConfig & XkmCompatMapMask) XkbWriteXKBCompatMap(file, xkb, FALSE, FALSE, _AddIncl, names->compat); else if (wantDflts & XkmCompatMapMask) fprintf(stderr, "Default interps not implemented yet!\n"); else if (wantNames & XkmCompatMapMask) XkbWriteSectionFromName(file, "compatibility", names->compat); if (wantConfig & XkmSymbolsMask) XkbWriteXKBSymbols(file, xkb, FALSE, FALSE, _AddIncl, names->symbols); else if (wantNames & XkmSymbolsMask) XkbWriteSectionFromName(file, "symbols", names->symbols); if (wantConfig & XkmGeometryMask) XkbWriteXKBGeometry(file, xkb, FALSE, FALSE, _AddIncl, names->geometry); else if (wantNames & XkmGeometryMask) XkbWriteSectionFromName(file, "geometry", names->geometry); if (multi_section) fprintf(file, "};\n"); return TRUE; } /***====================================================================***/ int XkbFindKeycodeByName(XkbDescPtr xkb, char *name, Bool use_aliases) { register int i; if ((!xkb) || (!xkb->names) || (!xkb->names->keys)) return 0; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (strncmp(xkb->names->keys[i].name, name, XkbKeyNameLength) == 0) return i; } if (!use_aliases) return 0; if (xkb->geom && xkb->geom->key_aliases) { XkbKeyAliasPtr a; a = xkb->geom->key_aliases; for (i = 0; i < xkb->geom->num_key_aliases; i++, a++) { if (strncmp(name, a->alias, XkbKeyNameLength) == 0) return XkbFindKeycodeByName(xkb, a->real, FALSE); } } if (xkb->names && xkb->names->key_aliases) { XkbKeyAliasPtr a; a = xkb->names->key_aliases; for (i = 0; i < xkb->names->num_key_aliases; i++, a++) { if (strncmp(name, a->alias, XkbKeyNameLength) == 0) return XkbFindKeycodeByName(xkb, a->real, FALSE); } } return 0; } unsigned XkbConvertGetByNameComponents(Bool toXkm, unsigned orig) { unsigned rtrn; rtrn = 0; if (toXkm) { if (orig & XkbGBN_TypesMask) rtrn |= XkmTypesMask; if (orig & XkbGBN_CompatMapMask) rtrn |= XkmCompatMapMask; if (orig & XkbGBN_SymbolsMask) rtrn |= XkmSymbolsMask; if (orig & XkbGBN_IndicatorMapMask) rtrn |= XkmIndicatorsMask; if (orig & XkbGBN_KeyNamesMask) rtrn |= XkmKeyNamesMask; if (orig & XkbGBN_GeometryMask) rtrn |= XkmGeometryMask; } else { if (orig & XkmTypesMask) rtrn |= XkbGBN_TypesMask; if (orig & XkmCompatMapMask) rtrn |= XkbGBN_CompatMapMask; if (orig & XkmSymbolsMask) rtrn |= XkbGBN_SymbolsMask; if (orig & XkmIndicatorsMask) rtrn |= XkbGBN_IndicatorMapMask; if (orig & XkmKeyNamesMask) rtrn |= XkbGBN_KeyNamesMask; if (orig & XkmGeometryMask) rtrn |= XkbGBN_GeometryMask; if (orig != 0) rtrn |= XkbGBN_OtherNamesMask; } return rtrn; } /***====================================================================***/ #define UNMATCHABLE(c) (((c)=='(')||((c)==')')||((c)=='/')) Bool XkbNameMatchesPattern(char *name, char *ptrn) { while (ptrn[0] != '\0') { if (name[0] == '\0') { if (ptrn[0] == '*') { ptrn++; continue; } return FALSE; } if (ptrn[0] == '?') { if (UNMATCHABLE(name[0])) return FALSE; } else if (ptrn[0] == '*') { if ((!UNMATCHABLE(name[0])) && XkbNameMatchesPattern(name + 1, ptrn)) return TRUE; return XkbNameMatchesPattern(name, ptrn + 1); } else if (ptrn[0] != name[0]) return FALSE; name++; ptrn++; } /* if we get here, the pattern is exhausted (-:just like me:-) */ return name[0] == '\0'; } xorg-server-21.1.16/xkb/xkbout.c0000644000175000017500000010311114757411105012074 /************************************************************ Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include #include #include #include #include "misc.h" #include "inputstr.h" #include "dix.h" #include "xkbstr.h" #define XKBSRV_NEED_FILE_FUNCS 1 #include #include "xkbgeom.h" #include "xkbfile.h" #define VMOD_HIDE_VALUE 0 #define VMOD_SHOW_VALUE 1 #define VMOD_COMMENT_VALUE 2 static Bool WriteXKBVModDecl(FILE * file, XkbDescPtr xkb, int showValue) { register int i, nMods; Atom *vmodNames; if (xkb == NULL) return FALSE; if (xkb->names != NULL) vmodNames = xkb->names->vmods; else vmodNames = NULL; for (i = nMods = 0; i < XkbNumVirtualMods; i++) { if ((vmodNames != NULL) && (vmodNames[i] != None)) { if (nMods == 0) fprintf(file, " virtual_modifiers "); else fprintf(file, ","); fprintf(file, "%s", XkbAtomText(vmodNames[i], XkbXKBFile)); if ((showValue != VMOD_HIDE_VALUE) && (xkb->server) && (xkb->server->vmods[i] != XkbNoModifierMask)) { if (showValue == VMOD_COMMENT_VALUE) { fprintf(file, "/* = %s */", XkbModMaskText(xkb->server->vmods[i], XkbXKBFile)); } else { fprintf(file, "= %s", XkbModMaskText(xkb->server->vmods[i], XkbXKBFile)); } } nMods++; } } if (nMods > 0) fprintf(file, ";\n\n"); return TRUE; } /***====================================================================***/ static Bool WriteXKBAction(FILE * file, XkbDescPtr xkb, XkbAnyAction * action) { fprintf(file, "%s", XkbActionText(xkb, (XkbAction *) action, XkbXKBFile)); return TRUE; } /***====================================================================***/ Bool XkbWriteXKBKeycodes(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void *priv) { Atom kcName; register unsigned i; const char *alternate; if ((!xkb) || (!xkb->names) || (!xkb->names->keys)) { _XkbLibError(_XkbErrMissingNames, "XkbWriteXKBKeycodes", 0); return FALSE; } kcName = xkb->names->keycodes; if (kcName != None) fprintf(file, "xkb_keycodes \"%s\" {\n", XkbAtomText(kcName, XkbXKBFile)); else fprintf(file, "xkb_keycodes {\n"); fprintf(file, " minimum = %d;\n", xkb->min_key_code); fprintf(file, " maximum = %d;\n", xkb->max_key_code); for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (xkb->names->keys[i].name[0] != '\0') { if (XkbFindKeycodeByName(xkb, xkb->names->keys[i].name, TRUE) != i) alternate = "alternate "; else alternate = ""; fprintf(file, " %s%6s = %d;\n", alternate, XkbKeyNameText(xkb->names->keys[i].name, XkbXKBFile), i); } } if (xkb->indicators != NULL) { for (i = 0; i < XkbNumIndicators; i++) { const char *type; if (xkb->indicators->phys_indicators & (1 << i)) type = " "; else type = " virtual "; if (xkb->names->indicators[i] != None) { fprintf(file, "%sindicator %d = \"%s\";\n", type, i + 1, XkbAtomText(xkb->names->indicators[i], XkbXKBFile)); } } } if (xkb->names->key_aliases != NULL) { XkbKeyAliasPtr pAl; pAl = xkb->names->key_aliases; for (i = 0; i < xkb->names->num_key_aliases; i++, pAl++) { fprintf(file, " alias %6s = %6s;\n", XkbKeyNameText(pAl->alias, XkbXKBFile), XkbKeyNameText(pAl->real, XkbXKBFile)); } } if (addOn) (*addOn) (file, xkb, topLevel, showImplicit, XkmKeyNamesIndex, priv); fprintf(file, "};\n\n"); return TRUE; } Bool XkbWriteXKBKeyTypes(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void *priv) { register unsigned i, n; XkbKeyTypePtr type; XkbKTMapEntryPtr entry; if ((!xkb) || (!xkb->map) || (!xkb->map->types)) { _XkbLibError(_XkbErrMissingTypes, "XkbWriteXKBKeyTypes", 0); return FALSE; } if (xkb->map->num_types < XkbNumRequiredTypes) { _XkbLibError(_XkbErrMissingReqTypes, "XkbWriteXKBKeyTypes", 0); return 0; } if ((xkb->names == NULL) || (xkb->names->types == None)) fprintf(file, "xkb_types {\n\n"); else fprintf(file, "xkb_types \"%s\" {\n\n", XkbAtomText(xkb->names->types, XkbXKBFile)); WriteXKBVModDecl(file, xkb, (showImplicit ? VMOD_COMMENT_VALUE : VMOD_HIDE_VALUE)); type = xkb->map->types; for (i = 0; i < xkb->map->num_types; i++, type++) { fprintf(file, " type \"%s\" {\n", XkbAtomText(type->name, XkbXKBFile)); fprintf(file, " modifiers= %s;\n", XkbVModMaskText(xkb, type->mods.real_mods, type->mods.vmods, XkbXKBFile)); entry = type->map; for (n = 0; n < type->map_count; n++, entry++) { char *str; str = XkbVModMaskText(xkb, entry->mods.real_mods, entry->mods.vmods, XkbXKBFile); fprintf(file, " map[%s]= Level%d;\n", str, entry->level + 1); if ((type->preserve) && ((type->preserve[n].real_mods) || (type->preserve[n].vmods))) { fprintf(file, " preserve[%s]= ", str); fprintf(file, "%s;\n", XkbVModMaskText(xkb, type->preserve[n]. real_mods, type->preserve[n].vmods, XkbXKBFile)); } } if (type->level_names != NULL) { Atom *name = type->level_names; for (n = 0; n < type->num_levels; n++, name++) { if ((*name) == None) continue; fprintf(file, " level_name[Level%d]= \"%s\";\n", n + 1, XkbAtomText(*name, XkbXKBFile)); } } fprintf(file, " };\n"); } if (addOn) (*addOn) (file, xkb, topLevel, showImplicit, XkmTypesIndex, priv); fprintf(file, "};\n\n"); return TRUE; } static Bool WriteXKBIndicatorMap(FILE * file, XkbDescPtr xkb, Atom name, XkbIndicatorMapPtr led, XkbFileAddOnFunc addOn, void *priv) { fprintf(file, " indicator \"%s\" {\n", NameForAtom(name)); if (led->flags & XkbIM_NoExplicit) fprintf(file, " !allowExplicit;\n"); if (led->flags & XkbIM_LEDDrivesKB) fprintf(file, " indicatorDrivesKeyboard;\n"); if (led->which_groups != 0) { if (led->which_groups != XkbIM_UseEffective) { fprintf(file, " whichGroupState= %s;\n", XkbIMWhichStateMaskText(led->which_groups, XkbXKBFile)); } fprintf(file, " groups= 0x%02x;\n", led->groups); } if (led->which_mods != 0) { if (led->which_mods != XkbIM_UseEffective) { fprintf(file, " whichModState= %s;\n", XkbIMWhichStateMaskText(led->which_mods, XkbXKBFile)); } fprintf(file, " modifiers= %s;\n", XkbVModMaskText(xkb, led->mods.real_mods, led->mods.vmods, XkbXKBFile)); } if (led->ctrls != 0) { fprintf(file, " controls= %s;\n", XkbControlsMaskText(led->ctrls, XkbXKBFile)); } if (addOn) (*addOn) (file, xkb, FALSE, TRUE, XkmIndicatorsIndex, priv); fprintf(file, " };\n"); return TRUE; } Bool XkbWriteXKBCompatMap(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void *priv) { register unsigned i; XkbSymInterpretPtr interp; if ((!xkb) || (!xkb->compat) || (!xkb->compat->sym_interpret)) { _XkbLibError(_XkbErrMissingCompatMap, "XkbWriteXKBCompatMap", 0); return FALSE; } if ((xkb->names == NULL) || (xkb->names->compat == None)) fprintf(file, "xkb_compatibility {\n\n"); else fprintf(file, "xkb_compatibility \"%s\" {\n\n", XkbAtomText(xkb->names->compat, XkbXKBFile)); WriteXKBVModDecl(file, xkb, (showImplicit ? VMOD_COMMENT_VALUE : VMOD_HIDE_VALUE)); fprintf(file, " interpret.useModMapMods= AnyLevel;\n"); fprintf(file, " interpret.repeat= FALSE;\n"); fprintf(file, " interpret.locking= FALSE;\n"); interp = xkb->compat->sym_interpret; for (i = 0; i < xkb->compat->num_si; i++, interp++) { fprintf(file, " interpret %s+%s(%s) {\n", ((interp->sym == NoSymbol) ? "Any" : XkbKeysymText(interp->sym, XkbXKBFile)), XkbSIMatchText(interp->match, XkbXKBFile), XkbModMaskText(interp->mods, XkbXKBFile)); if (interp->virtual_mod != XkbNoModifier) { fprintf(file, " virtualModifier= %s;\n", XkbVModIndexText(xkb, interp->virtual_mod, XkbXKBFile)); } if (interp->match & XkbSI_LevelOneOnly) fprintf(file, " useModMapMods=level1;\n"); if (interp->flags & XkbSI_LockingKey) fprintf(file, " locking= TRUE;\n"); if (interp->flags & XkbSI_AutoRepeat) fprintf(file, " repeat= TRUE;\n"); fprintf(file, " action= "); WriteXKBAction(file, xkb, &interp->act); fprintf(file, ";\n"); fprintf(file, " };\n"); } for (i = 0; i < XkbNumKbdGroups; i++) { XkbModsPtr gc; gc = &xkb->compat->groups[i]; if ((gc->real_mods == 0) && (gc->vmods == 0)) continue; fprintf(file, " group %d = %s;\n", i + 1, XkbVModMaskText(xkb, gc-> real_mods, gc->vmods, XkbXKBFile)); } if (xkb->indicators) { for (i = 0; i < XkbNumIndicators; i++) { XkbIndicatorMapPtr map = &xkb->indicators->maps[i]; if ((map->flags != 0) || (map->which_groups != 0) || (map->groups != 0) || (map->which_mods != 0) || (map->mods.real_mods != 0) || (map->mods.vmods != 0) || (map->ctrls != 0)) { WriteXKBIndicatorMap(file, xkb, xkb->names->indicators[i], map, addOn, priv); } } } if (addOn) (*addOn) (file, xkb, topLevel, showImplicit, XkmCompatMapIndex, priv); fprintf(file, "};\n\n"); return TRUE; } Bool XkbWriteXKBSymbols(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void *priv) { register unsigned i, tmp; XkbClientMapPtr map; XkbServerMapPtr srv; Bool showActions; if (!xkb) { _XkbLibError(_XkbErrMissingSymbols, "XkbWriteXKBSymbols", 0); return FALSE; } map = xkb->map; if ((!map) || (!map->syms) || (!map->key_sym_map)) { _XkbLibError(_XkbErrMissingSymbols, "XkbWriteXKBSymbols", 0); return FALSE; } if ((!xkb->names) || (!xkb->names->keys)) { _XkbLibError(_XkbErrMissingNames, "XkbWriteXKBSymbols", 0); return FALSE; } if ((xkb->names == NULL) || (xkb->names->symbols == None)) fprintf(file, "xkb_symbols {\n\n"); else fprintf(file, "xkb_symbols \"%s\" {\n\n", XkbAtomText(xkb->names->symbols, XkbXKBFile)); for (tmp = i = 0; i < XkbNumKbdGroups; i++) { if (xkb->names->groups[i] != None) { fprintf(file, " name[group%d]=\"%s\";\n", i + 1, XkbAtomText(xkb->names->groups[i], XkbXKBFile)); tmp++; } } if (tmp > 0) fprintf(file, "\n"); srv = xkb->server; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { Bool simple; if ((int) XkbKeyNumSyms(xkb, i) < 1) continue; if (XkbFindKeycodeByName(xkb, xkb->names->keys[i].name, TRUE) != i) continue; simple = TRUE; fprintf(file, " key %6s {", XkbKeyNameText(xkb->names->keys[i].name, XkbXKBFile)); if (srv->explicit) { if (((srv->explicit[i] & XkbExplicitKeyTypesMask) != 0) || (showImplicit)) { int typeNdx, g; Bool multi; const char *comment = " "; if ((srv->explicit[i] & XkbExplicitKeyTypesMask) == 0) comment = "//"; multi = FALSE; typeNdx = XkbKeyKeyTypeIndex(xkb, i, 0); for (g = 1; (g < XkbKeyNumGroups(xkb, i)) && (!multi); g++) { if (XkbKeyKeyTypeIndex(xkb, i, g) != typeNdx) multi = TRUE; } if (multi) { for (g = 0; g < XkbKeyNumGroups(xkb, i); g++) { typeNdx = XkbKeyKeyTypeIndex(xkb, i, g); if (srv->explicit[i] & (1 << g)) { fprintf(file, "\n%s type[group%d]= \"%s\",", comment, g + 1, XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } else if (showImplicit) { fprintf(file, "\n// type[group%d]= \"%s\",", g + 1, XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } } } else { fprintf(file, "\n%s type= \"%s\",", comment, XkbAtomText(map->types[typeNdx].name, XkbXKBFile)); } simple = FALSE; } if (((srv->explicit[i] & XkbExplicitAutoRepeatMask) != 0) && (xkb->ctrls != NULL)) { if (xkb->ctrls->per_key_repeat[i / 8] & (1 << (i % 8))) fprintf(file, "\n repeat= Yes,"); else fprintf(file, "\n repeat= No,"); simple = FALSE; } if ((xkb->server != NULL) && (xkb->server->vmodmap != NULL) && (xkb->server->vmodmap[i] != 0)) { if ((srv->explicit[i] & XkbExplicitVModMapMask) != 0) { fprintf(file, "\n virtualMods= %s,", XkbVModMaskText(xkb, 0, xkb->server->vmodmap[i], XkbXKBFile)); } else if (showImplicit) { fprintf(file, "\n// virtualMods= %s,", XkbVModMaskText(xkb, 0, xkb->server->vmodmap[i], XkbXKBFile)); } } } switch (XkbOutOfRangeGroupAction(XkbKeyGroupInfo(xkb, i))) { case XkbClampIntoRange: fprintf(file, "\n groupsClamp,"); break; case XkbRedirectIntoRange: fprintf(file, "\n groupsRedirect= Group%d,", XkbOutOfRangeGroupNumber(XkbKeyGroupInfo(xkb, i)) + 1); break; } if (srv->behaviors != NULL) { unsigned type; type = srv->behaviors[i].type & XkbKB_OpMask; if (type != XkbKB_Default) { simple = FALSE; fprintf(file, "\n %s,", XkbBehaviorText(xkb, &srv->behaviors[i], XkbXKBFile)); } } if ((srv->explicit == NULL) || showImplicit || ((srv->explicit[i] & XkbExplicitInterpretMask) != 0)) showActions = XkbKeyHasActions(xkb, i); else showActions = FALSE; if (((unsigned) XkbKeyNumGroups(xkb, i) > 1) || showActions) simple = FALSE; if (simple) { KeySym *syms; unsigned s; syms = XkbKeySymsPtr(xkb, i); fprintf(file, " [ "); for (s = 0; s < XkbKeyGroupWidth(xkb, i, XkbGroup1Index); s++) { if (s != 0) fprintf(file, ", "); fprintf(file, "%15s", XkbKeysymText(*syms++, XkbXKBFile)); } fprintf(file, " ] };\n"); } else { unsigned g, s; KeySym *syms; XkbAction *acts; syms = XkbKeySymsPtr(xkb, i); acts = XkbKeyActionsPtr(xkb, i); for (g = 0; g < XkbKeyNumGroups(xkb, i); g++) { if (g != 0) fprintf(file, ","); fprintf(file, "\n symbols[Group%d]= [ ", g + 1); for (s = 0; s < XkbKeyGroupWidth(xkb, i, g); s++) { if (s != 0) fprintf(file, ", "); fprintf(file, "%15s", XkbKeysymText(syms[s], XkbXKBFile)); } fprintf(file, " ]"); syms += XkbKeyGroupsWidth(xkb, i); if (showActions) { fprintf(file, ",\n actions[Group%d]= [ ", g + 1); for (s = 0; s < XkbKeyGroupWidth(xkb, i, g); s++) { if (s != 0) fprintf(file, ", "); WriteXKBAction(file, xkb, (XkbAnyAction *) &acts[s]); } fprintf(file, " ]"); acts += XkbKeyGroupsWidth(xkb, i); } } fprintf(file, "\n };\n"); } } if (map && map->modmap) { for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (map->modmap[i] != 0) { register int n, bit; for (bit = 1, n = 0; n < XkbNumModifiers; n++, bit <<= 1) { if (map->modmap[i] & bit) { char buf[5]; memcpy(buf, xkb->names->keys[i].name, 4); buf[4] = '\0'; fprintf(file, " modifier_map %s { <%s> };\n", XkbModIndexText(n, XkbXKBFile), buf); } } } } } if (addOn) (*addOn) (file, xkb, topLevel, showImplicit, XkmSymbolsIndex, priv); fprintf(file, "};\n\n"); return TRUE; } static Bool WriteXKBOutline(FILE * file, XkbShapePtr shape, XkbOutlinePtr outline, int lastRadius, int first, int indent) { register int i; XkbPointPtr pt; char *iStr; fprintf(file, "%s", iStr = XkbIndentText(first)); if (first != indent) iStr = XkbIndentText(indent); if (outline->corner_radius != lastRadius) { fprintf(file, "corner= %s,", XkbGeomFPText(outline->corner_radius, XkbMessage)); if (shape != NULL) { fprintf(file, "\n%s", iStr); } } if (shape) { if (outline == shape->approx) fprintf(file, "approx= "); else if (outline == shape->primary) fprintf(file, "primary= "); } fprintf(file, "{"); for (pt = outline->points, i = 0; i < outline->num_points; i++, pt++) { if (i == 0) fprintf(file, " "); else if ((i % 4) == 0) fprintf(file, ",\n%s ", iStr); else fprintf(file, ", "); fprintf(file, "[ %3s, %3s ]", XkbGeomFPText(pt->x, XkbXKBFile), XkbGeomFPText(pt->y, XkbXKBFile)); } fprintf(file, " }"); return TRUE; } static Bool WriteXKBDoodad(FILE * file, unsigned indent, XkbGeometryPtr geom, XkbDoodadPtr doodad) { register char *i_str; XkbShapePtr shape; XkbColorPtr color; i_str = XkbIndentText(indent); fprintf(file, "%s%s \"%s\" {\n", i_str, XkbDoodadTypeText(doodad->any.type, XkbMessage), XkbAtomText(doodad->any.name, XkbMessage)); fprintf(file, "%s top= %s;\n", i_str, XkbGeomFPText(doodad->any.top, XkbXKBFile)); fprintf(file, "%s left= %s;\n", i_str, XkbGeomFPText(doodad->any.left, XkbXKBFile)); fprintf(file, "%s priority= %d;\n", i_str, doodad->any.priority); switch (doodad->any.type) { case XkbOutlineDoodad: case XkbSolidDoodad: if (doodad->shape.angle != 0) { fprintf(file, "%s angle= %s;\n", i_str, XkbGeomFPText(doodad->shape.angle, XkbXKBFile)); } if (doodad->shape.color_ndx != 0) { fprintf(file, "%s color= \"%s\";\n", i_str, XkbShapeDoodadColor(geom, &doodad->shape)->spec); } shape = XkbShapeDoodadShape(geom, &doodad->shape); fprintf(file, "%s shape= \"%s\";\n", i_str, XkbAtomText(shape->name, XkbXKBFile)); break; case XkbTextDoodad: if (doodad->text.angle != 0) { fprintf(file, "%s angle= %s;\n", i_str, XkbGeomFPText(doodad->text.angle, XkbXKBFile)); } if (doodad->text.width != 0) { fprintf(file, "%s width= %s;\n", i_str, XkbGeomFPText(doodad->text.width, XkbXKBFile)); } if (doodad->text.height != 0) { fprintf(file, "%s height= %s;\n", i_str, XkbGeomFPText(doodad->text.height, XkbXKBFile)); } if (doodad->text.color_ndx != 0) { color = XkbTextDoodadColor(geom, &doodad->text); fprintf(file, "%s color= \"%s\";\n", i_str, XkbStringText(color->spec, XkbXKBFile)); } fprintf(file, "%s XFont= \"%s\";\n", i_str, XkbStringText(doodad->text.font, XkbXKBFile)); fprintf(file, "%s text= \"%s\";\n", i_str, XkbStringText(doodad->text.text, XkbXKBFile)); break; case XkbIndicatorDoodad: shape = XkbIndicatorDoodadShape(geom, &doodad->indicator); color = XkbIndicatorDoodadOnColor(geom, &doodad->indicator); fprintf(file, "%s onColor= \"%s\";\n", i_str, XkbStringText(color->spec, XkbXKBFile)); color = XkbIndicatorDoodadOffColor(geom, &doodad->indicator); fprintf(file, "%s offColor= \"%s\";\n", i_str, XkbStringText(color->spec, XkbXKBFile)); fprintf(file, "%s shape= \"%s\";\n", i_str, XkbAtomText(shape->name, XkbXKBFile)); break; case XkbLogoDoodad: fprintf(file, "%s logoName= \"%s\";\n", i_str, XkbStringText(doodad->logo.logo_name, XkbXKBFile)); if (doodad->shape.angle != 0) { fprintf(file, "%s angle= %s;\n", i_str, XkbGeomFPText(doodad->logo.angle, XkbXKBFile)); } if (doodad->shape.color_ndx != 0) { fprintf(file, "%s color= \"%s\";\n", i_str, XkbLogoDoodadColor(geom, &doodad->logo)->spec); } shape = XkbLogoDoodadShape(geom, &doodad->logo); fprintf(file, "%s shape= \"%s\";\n", i_str, XkbAtomText(shape->name, XkbXKBFile)); break; } fprintf(file, "%s};\n", i_str); return TRUE; } /*ARGSUSED*/ static Bool WriteXKBOverlay(FILE * file, unsigned indent, XkbGeometryPtr geom, XkbOverlayPtr ol) { register char *i_str; int r, k, nOut; XkbOverlayRowPtr row; XkbOverlayKeyPtr key; i_str = XkbIndentText(indent); if (ol->name != None) { fprintf(file, "%soverlay \"%s\" {\n", i_str, XkbAtomText(ol->name, XkbMessage)); } else fprintf(file, "%soverlay {\n", i_str); for (nOut = r = 0, row = ol->rows; r < ol->num_rows; r++, row++) { for (k = 0, key = row->keys; k < row->num_keys; k++, key++) { char *over, *under; over = XkbKeyNameText(key->over.name, XkbXKBFile); under = XkbKeyNameText(key->under.name, XkbXKBFile); if (nOut == 0) fprintf(file, "%s %6s=%6s", i_str, under, over); else if ((nOut % 4) == 0) fprintf(file, ",\n%s %6s=%6s", i_str, under, over); else fprintf(file, ", %6s=%6s", under, over); nOut++; } } fprintf(file, "\n%s};\n", i_str); return TRUE; } static Bool WriteXKBSection(FILE * file, XkbSectionPtr s, XkbGeometryPtr geom) { register int i; XkbRowPtr row; int dfltKeyColor = 0; fprintf(file, " section \"%s\" {\n", XkbAtomText(s->name, XkbXKBFile)); if (s->rows && (s->rows->num_keys > 0)) { dfltKeyColor = s->rows->keys[0].color_ndx; fprintf(file, " key.color= \"%s\";\n", XkbStringText(geom->colors[dfltKeyColor].spec, XkbXKBFile)); } fprintf(file, " priority= %d;\n", s->priority); fprintf(file, " top= %s;\n", XkbGeomFPText(s->top, XkbXKBFile)); fprintf(file, " left= %s;\n", XkbGeomFPText(s->left, XkbXKBFile)); fprintf(file, " width= %s;\n", XkbGeomFPText(s->width, XkbXKBFile)); fprintf(file, " height= %s;\n", XkbGeomFPText(s->height, XkbXKBFile)); if (s->angle != 0) { fprintf(file, " angle= %s;\n", XkbGeomFPText(s->angle, XkbXKBFile)); } for (i = 0, row = s->rows; i < s->num_rows; i++, row++) { fprintf(file, " row {\n"); fprintf(file, " top= %s;\n", XkbGeomFPText(row->top, XkbXKBFile)); fprintf(file, " left= %s;\n", XkbGeomFPText(row->left, XkbXKBFile)); if (row->vertical) fprintf(file, " vertical;\n"); if (row->num_keys > 0) { register int k; register XkbKeyPtr key; int forceNL = 0; int nThisLine = 0; fprintf(file, " keys {\n"); for (k = 0, key = row->keys; k < row->num_keys; k++, key++) { XkbShapePtr shape; if (key->color_ndx != dfltKeyColor) forceNL = 1; if (k == 0) { fprintf(file, " "); nThisLine = 0; } else if (((nThisLine % 2) == 1) || (forceNL)) { fprintf(file, ",\n "); forceNL = nThisLine = 0; } else { fprintf(file, ", "); nThisLine++; } shape = XkbKeyShape(geom, key); fprintf(file, "{ %6s, \"%s\", %3s", XkbKeyNameText(key->name.name, XkbXKBFile), XkbAtomText(shape->name, XkbXKBFile), XkbGeomFPText(key->gap, XkbXKBFile)); if (key->color_ndx != dfltKeyColor) { fprintf(file, ", color=\"%s\"", XkbKeyColor(geom, key)->spec); forceNL = 1; } fprintf(file, " }"); } fprintf(file, "\n };\n"); } fprintf(file, " };\n"); } if (s->doodads != NULL) { XkbDoodadPtr doodad; for (i = 0, doodad = s->doodads; i < s->num_doodads; i++, doodad++) { WriteXKBDoodad(file, 8, geom, doodad); } } if (s->overlays != NULL) { XkbOverlayPtr ol; for (i = 0, ol = s->overlays; i < s->num_overlays; i++, ol++) { WriteXKBOverlay(file, 8, geom, ol); } } fprintf(file, " }; // End of \"%s\" section\n\n", XkbAtomText(s->name, XkbXKBFile)); return TRUE; } Bool XkbWriteXKBGeometry(FILE * file, XkbDescPtr xkb, Bool topLevel, Bool showImplicit, XkbFileAddOnFunc addOn, void *priv) { register unsigned i, n; XkbGeometryPtr geom; if ((!xkb) || (!xkb->geom)) { _XkbLibError(_XkbErrMissingGeometry, "XkbWriteXKBGeometry", 0); return FALSE; } geom = xkb->geom; if (geom->name == None) fprintf(file, "xkb_geometry {\n\n"); else fprintf(file, "xkb_geometry \"%s\" {\n\n", XkbAtomText(geom->name, XkbXKBFile)); fprintf(file, " width= %s;\n", XkbGeomFPText(geom->width_mm, XkbXKBFile)); fprintf(file, " height= %s;\n\n", XkbGeomFPText(geom->height_mm, XkbXKBFile)); if (geom->key_aliases != NULL) { XkbKeyAliasPtr pAl; pAl = geom->key_aliases; for (i = 0; i < geom->num_key_aliases; i++, pAl++) { fprintf(file, " alias %6s = %6s;\n", XkbKeyNameText(pAl->alias, XkbXKBFile), XkbKeyNameText(pAl->real, XkbXKBFile)); } fprintf(file, "\n"); } if (geom->base_color != NULL) fprintf(file, " baseColor= \"%s\";\n", XkbStringText(geom->base_color->spec, XkbXKBFile)); if (geom->label_color != NULL) fprintf(file, " labelColor= \"%s\";\n", XkbStringText(geom->label_color->spec, XkbXKBFile)); if (geom->label_font != NULL) fprintf(file, " xfont= \"%s\";\n", XkbStringText(geom->label_font, XkbXKBFile)); if ((geom->num_colors > 0) && (showImplicit)) { XkbColorPtr color; for (color = geom->colors, i = 0; i < geom->num_colors; i++, color++) { fprintf(file, "// color[%d]= \"%s\"\n", i, XkbStringText(color->spec, XkbXKBFile)); } fprintf(file, "\n"); } if (geom->num_properties > 0) { XkbPropertyPtr prop; for (prop = geom->properties, i = 0; i < geom->num_properties; i++, prop++) { fprintf(file, " %s= \"%s\";\n", prop->name, XkbStringText(prop->value, XkbXKBFile)); } fprintf(file, "\n"); } if (geom->num_shapes > 0) { XkbShapePtr shape; XkbOutlinePtr outline; int lastR; for (shape = geom->shapes, i = 0; i < geom->num_shapes; i++, shape++) { lastR = 0; fprintf(file, " shape \"%s\" {", XkbAtomText(shape->name, XkbXKBFile)); outline = shape->outlines; if (shape->num_outlines > 1) { for (n = 0; n < shape->num_outlines; n++, outline++) { if (n == 0) fprintf(file, "\n"); else fprintf(file, ",\n"); WriteXKBOutline(file, shape, outline, lastR, 8, 8); lastR = outline->corner_radius; } fprintf(file, "\n };\n"); } else { WriteXKBOutline(file, NULL, outline, lastR, 1, 8); fprintf(file, " };\n"); } } } if (geom->num_sections > 0) { XkbSectionPtr section; for (section = geom->sections, i = 0; i < geom->num_sections; i++, section++) { WriteXKBSection(file, section, geom); } } if (geom->num_doodads > 0) { XkbDoodadPtr doodad; for (i = 0, doodad = geom->doodads; i < geom->num_doodads; i++, doodad++) { WriteXKBDoodad(file, 4, geom, doodad); } } if (addOn) (*addOn) (file, xkb, topLevel, showImplicit, XkmGeometryIndex, priv); fprintf(file, "};\n\n"); return TRUE; } xorg-server-21.1.16/xkb/XKBMisc.c0000644000175000017500000007427614757411105012043 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include "misc.h" #include "inputstr.h" #include #define XKBSRV_NEED_FILE_FUNCS #include /***====================================================================***/ #define CORE_SYM(i) (imap->num_types)) { nSyms[i] = xkb->map->types[types_inout[i]].num_levels; if (nSyms[i] > groupsWidth) groupsWidth = nSyms[i]; } else { types_inout[i] = XkbTwoLevelIndex; /* don't really know, yet */ nSyms[i] = 2; } } if (nSyms[XkbGroup1Index] < 2) nSyms[XkbGroup1Index] = 2; if (nSyms[XkbGroup2Index] < 2) nSyms[XkbGroup2Index] = 2; /* Step 2: Copy the symbols from the core ordering to XKB ordering */ /* symbols in the core are in the order: */ /* G1L1 G1L2 G2L1 G2L2 [G1L[3-n]] [G2L[3-n]] [G3L*] [G3L*] */ xkb_syms_rtrn[XKB_OFFSET(XkbGroup1Index, 0)] = CORE_SYM(0); xkb_syms_rtrn[XKB_OFFSET(XkbGroup1Index, 1)] = CORE_SYM(1); for (i = 2; i < nSyms[XkbGroup1Index]; i++) { xkb_syms_rtrn[XKB_OFFSET(XkbGroup1Index, i)] = CORE_SYM(2 + i); } xkb_syms_rtrn[XKB_OFFSET(XkbGroup2Index, 0)] = CORE_SYM(2); xkb_syms_rtrn[XKB_OFFSET(XkbGroup2Index, 1)] = CORE_SYM(3); tmp = 2 + (nSyms[XkbGroup1Index] - 2); /* offset to extra group2 syms */ for (i = 2; i < nSyms[XkbGroup2Index]; i++) { xkb_syms_rtrn[XKB_OFFSET(XkbGroup2Index, i)] = CORE_SYM(tmp + i); } /* Special case: if only the first group is explicit, and the symbols * replicate across all groups, then we have a Section 12.4 replication */ if ((protected & ~XkbExplicitKeyType1Mask) == 0) { int j, width = nSyms[XkbGroup1Index]; replicated = TRUE; /* Check ABAB in ABABCDECDEABCDE */ if ((width > 0 && CORE_SYM(0) != CORE_SYM(2)) || (width > 1 && CORE_SYM(1) != CORE_SYM(3))) replicated = FALSE; /* Check CDECDE in ABABCDECDEABCDE */ for (i = 2; i < width && replicated; i++) { if (CORE_SYM(2 + i) != CORE_SYM(i + width)) replicated = FALSE; } /* Check ABCDE in ABABCDECDEABCDE */ for (j = 2; replicated && j < XkbNumKbdGroups && map_width >= width * (j + 1); j++) { for (i = 0; i < width && replicated; i++) { if (CORE_SYM(((i < 2) ? i : 2 + i)) != CORE_SYM(i + width * j)) replicated = FALSE; } } } if (replicated) { nSyms[XkbGroup2Index] = 0; nSyms[XkbGroup3Index] = 0; nSyms[XkbGroup4Index] = 0; nGroups = 1; } else { tmp = nSyms[XkbGroup1Index] + nSyms[XkbGroup2Index]; if ((tmp >= map_width) && ((protected & (XkbExplicitKeyType3Mask | XkbExplicitKeyType4Mask)) == 0)) { nSyms[XkbGroup3Index] = 0; nSyms[XkbGroup4Index] = 0; nGroups = 2; } else { nGroups = 3; for (i = 0; i < nSyms[XkbGroup3Index]; i++, tmp++) { xkb_syms_rtrn[XKB_OFFSET(XkbGroup3Index, i)] = CORE_SYM(tmp); } if ((tmp < map_width) || (protected & XkbExplicitKeyType4Mask)) { nGroups = 4; for (i = 0; i < nSyms[XkbGroup4Index]; i++, tmp++) { xkb_syms_rtrn[XKB_OFFSET(XkbGroup4Index, i)] = CORE_SYM(tmp); } } else { nSyms[XkbGroup4Index] = 0; } } } /* steps 3&4: alphanumeric expansion, assign canonical types */ empty = 0; for (i = 0; i < nGroups; i++) { KeySym *syms; syms = &xkb_syms_rtrn[XKB_OFFSET(i, 0)]; if ((nSyms[i] > 1) && (syms[1] == NoSymbol) && (syms[0] != NoSymbol)) { KeySym upper, lower; XkbConvertCase(syms[0], &lower, &upper); if (upper != lower) { xkb_syms_rtrn[XKB_OFFSET(i, 0)] = lower; xkb_syms_rtrn[XKB_OFFSET(i, 1)] = upper; if ((protected & (1 << i)) == 0) types_inout[i] = XkbAlphabeticIndex; } else if ((protected & (1 << i)) == 0) { types_inout[i] = XkbOneLevelIndex; /* nSyms[i]= 1; */ } } if (((protected & (1 << i)) == 0) && (types_inout[i] == XkbTwoLevelIndex)) { if (XkbKSIsKeypad(syms[0]) || XkbKSIsKeypad(syms[1])) types_inout[i] = XkbKeypadIndex; else { KeySym upper, lower; XkbConvertCase(syms[0], &lower, &upper); if ((syms[0] == lower) && (syms[1] == upper)) types_inout[i] = XkbAlphabeticIndex; } } if (syms[0] == NoSymbol) { register int n; Bool found; for (n = 1, found = FALSE; (!found) && (n < nSyms[i]); n++) { found = (syms[n] != NoSymbol); } if (!found) empty |= (1 << i); } } /* step 5: squoosh out empty groups */ if (empty) { for (i = nGroups - 1; i >= 0; i--) { if (((empty & (1 << i)) == 0) || (protected & (1 << i))) break; nGroups--; } } if (nGroups < 1) return 0; /* step 6: replicate group 1 into group two, if necessary */ if ((nGroups > 1) && ((empty & (XkbGroup1Mask | XkbGroup2Mask)) == XkbGroup2Mask)) { if ((protected & (XkbExplicitKeyType1Mask | XkbExplicitKeyType2Mask)) == 0) { nSyms[XkbGroup2Index] = nSyms[XkbGroup1Index]; types_inout[XkbGroup2Index] = types_inout[XkbGroup1Index]; memcpy((char *) &xkb_syms_rtrn[2], (char *) xkb_syms_rtrn, 2 * sizeof(KeySym)); } else if (types_inout[XkbGroup1Index] == types_inout[XkbGroup2Index]) { memcpy((char *) &xkb_syms_rtrn[nSyms[XkbGroup1Index]], (char *) xkb_syms_rtrn, nSyms[XkbGroup1Index] * sizeof(KeySym)); } } /* step 7: check for all groups identical or all width 1 * * Special feature: if group 1 has an explicit type and all other groups * have canonical types with same symbols, we assume it's info lost from * the core replication. */ if (nGroups > 1) { Bool sameType, allOneLevel, canonical = TRUE; allOneLevel = (xkb->map->types[types_inout[0]].num_levels == 1); for (i = 1, sameType = TRUE; (allOneLevel || sameType) && (i < nGroups); i++) { sameType = (sameType && (types_inout[i] == types_inout[XkbGroup1Index])); if (allOneLevel) allOneLevel = (xkb->map->types[types_inout[i]].num_levels == 1); if (types_inout[i] > XkbLastRequiredType) canonical = FALSE; } if (((sameType) || canonical) && (!(protected & (XkbExplicitKeyTypesMask & ~XkbExplicitKeyType1Mask)))) { register int s; Bool identical; for (i = 1, identical = TRUE; identical && (i < nGroups); i++) { KeySym *syms; if (nSyms[i] != nSyms[XkbGroup1Index]) identical = FALSE; syms = &xkb_syms_rtrn[XKB_OFFSET(i, 0)]; for (s = 0; identical && (s < nSyms[i]); s++) { if (syms[s] != xkb_syms_rtrn[s]) identical = FALSE; } } if (identical) nGroups = 1; } if (allOneLevel && (nGroups > 1)) { KeySym *syms; syms = &xkb_syms_rtrn[nSyms[XkbGroup1Index]]; nSyms[XkbGroup1Index] = 1; for (i = 1; i < nGroups; i++) { xkb_syms_rtrn[i] = syms[0]; syms += nSyms[i]; nSyms[i] = 1; } } } return nGroups; } static XkbSymInterpretPtr _XkbFindMatchingInterp(XkbDescPtr xkb, KeySym sym, unsigned int real_mods, unsigned int level) { register unsigned i; XkbSymInterpretPtr interp, rtrn; CARD8 mods; rtrn = NULL; interp = xkb->compat->sym_interpret; for (i = 0; i < xkb->compat->num_si; i++, interp++) { if ((interp->sym == NoSymbol) || (sym == interp->sym)) { int match; if ((level == 0) || ((interp->match & XkbSI_LevelOneOnly) == 0)) mods = real_mods; else mods = 0; switch (interp->match & XkbSI_OpMask) { case XkbSI_NoneOf: match = ((interp->mods & mods) == 0); break; case XkbSI_AnyOfOrNone: match = ((mods == 0) || ((interp->mods & mods) != 0)); break; case XkbSI_AnyOf: match = ((interp->mods & mods) != 0); break; case XkbSI_AllOf: match = ((interp->mods & mods) == interp->mods); break; case XkbSI_Exactly: match = (interp->mods == mods); break; default: match = 0; break; } if (match) { if (interp->sym != NoSymbol) { return interp; } else if (rtrn == NULL) { rtrn = interp; } } } } return rtrn; } static void _XkbAddKeyChange(KeyCode *pFirst, unsigned char *pNum, KeyCode newKey) { KeyCode last; last = (*pFirst) + (*pNum); if (newKey < *pFirst) { *pFirst = newKey; *pNum = (last - newKey) + 1; } else if (newKey > last) { *pNum = (last - *pFirst) + 1; } return; } static void _XkbSetActionKeyMods(XkbDescPtr xkb, XkbAction *act, unsigned mods) { unsigned tmp; switch (act->type) { case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods: if (act->mods.flags & XkbSA_UseModMapMods) act->mods.real_mods = act->mods.mask = mods; if ((tmp = XkbModActionVMods(&act->mods)) != 0) { XkbVirtualModsToReal(xkb, tmp, &tmp); act->mods.mask |= tmp; } break; case XkbSA_ISOLock: if (act->iso.flags & XkbSA_UseModMapMods) act->iso.real_mods = act->iso.mask = mods; if ((tmp = XkbModActionVMods(&act->iso)) != 0) { XkbVirtualModsToReal(xkb, tmp, &tmp); act->iso.mask |= tmp; } break; } return; } #define IBUF_SIZE 8 Bool XkbApplyCompatMapToKey(XkbDescPtr xkb, KeyCode key, XkbChangesPtr changes) { KeySym *syms; unsigned char explicit, mods; XkbSymInterpretPtr *interps, ibuf[IBUF_SIZE]; int n, nSyms, found; unsigned changed, tmp; if ((!xkb) || (!xkb->map) || (!xkb->map->key_sym_map) || (!xkb->compat) || (!xkb->compat->sym_interpret) || (key < xkb->min_key_code) || (key > xkb->max_key_code)) { return FALSE; } if (((!xkb->server) || (!xkb->server->key_acts)) && (XkbAllocServerMap(xkb, XkbAllServerInfoMask, 0) != Success)) { return FALSE; } changed = 0; /* keeps track of what has changed in _this_ call */ explicit = xkb->server->explicit[key]; if (explicit & XkbExplicitInterpretMask) /* nothing to do */ return TRUE; mods = (xkb->map->modmap ? xkb->map->modmap[key] : 0); nSyms = XkbKeyNumSyms(xkb, key); syms = XkbKeySymsPtr(xkb, key); if (nSyms > IBUF_SIZE) { interps = calloc(nSyms, sizeof(XkbSymInterpretPtr)); if (interps == NULL) { interps = ibuf; nSyms = IBUF_SIZE; } } else { interps = ibuf; } found = 0; for (n = 0; n < nSyms; n++) { unsigned level = (n % XkbKeyGroupsWidth(xkb, key)); interps[n] = NULL; if (syms[n] != NoSymbol) { interps[n] = _XkbFindMatchingInterp(xkb, syms[n], mods, level); if (interps[n] && interps[n]->act.type != XkbSA_NoAction) found++; else interps[n] = NULL; } } /* 1/28/96 (ef) -- XXX! WORKING HERE */ if (!found) { if (xkb->server->key_acts[key] != 0) { xkb->server->key_acts[key] = 0; changed |= XkbKeyActionsMask; } } else { XkbAction *pActs; unsigned int new_vmodmask; changed |= XkbKeyActionsMask; pActs = XkbResizeKeyActions(xkb, key, nSyms); if (!pActs) { if (nSyms > IBUF_SIZE) free(interps); return FALSE; } new_vmodmask = 0; for (n = 0; n < nSyms; n++) { if (interps[n]) { unsigned effMods; pActs[n] = *((XkbAction *) &interps[n]->act); if ((n == 0) || ((interps[n]->match & XkbSI_LevelOneOnly) == 0)) { effMods = mods; if (interps[n]->virtual_mod != XkbNoModifier) new_vmodmask |= (1 << interps[n]->virtual_mod); } else effMods = 0; _XkbSetActionKeyMods(xkb, &pActs[n], effMods); } else pActs[n].type = XkbSA_NoAction; } if (((explicit & XkbExplicitVModMapMask) == 0) && (xkb->server->vmodmap[key] != new_vmodmask)) { changed |= XkbVirtualModMapMask; xkb->server->vmodmap[key] = new_vmodmask; } if (interps[0]) { if ((interps[0]->flags & XkbSI_LockingKey) && ((explicit & XkbExplicitBehaviorMask) == 0)) { xkb->server->behaviors[key].type = XkbKB_Lock; changed |= XkbKeyBehaviorsMask; } if (((explicit & XkbExplicitAutoRepeatMask) == 0) && (xkb->ctrls)) { CARD8 old; old = BitIsOn(xkb->ctrls->per_key_repeat, key); if (interps[0]->flags & XkbSI_AutoRepeat) SetBit(xkb->ctrls->per_key_repeat, key); else ClearBit(xkb->ctrls->per_key_repeat, key); if (changes && old != BitIsOn(xkb->ctrls->per_key_repeat, key)) changes->ctrls.changed_ctrls |= XkbPerKeyRepeatMask; } } } if ((!found) || (interps[0] == NULL)) { if (((explicit & XkbExplicitAutoRepeatMask) == 0) && (xkb->ctrls)) { CARD8 old; old = BitIsOn(xkb->ctrls->per_key_repeat, key); SetBit(xkb->ctrls->per_key_repeat, key); if (changes && (old != BitIsOn(xkb->ctrls->per_key_repeat, key))) changes->ctrls.changed_ctrls |= XkbPerKeyRepeatMask; } if (((explicit & XkbExplicitBehaviorMask) == 0) && (xkb->server->behaviors[key].type == XkbKB_Lock)) { xkb->server->behaviors[key].type = XkbKB_Default; changed |= XkbKeyBehaviorsMask; } } if (changes) { XkbMapChangesPtr mc; mc = &changes->map; tmp = (changed & mc->changed); if (tmp & XkbKeyActionsMask) _XkbAddKeyChange(&mc->first_key_act, &mc->num_key_acts, key); else if (changed & XkbKeyActionsMask) { mc->changed |= XkbKeyActionsMask; mc->first_key_act = key; mc->num_key_acts = 1; } if (tmp & XkbKeyBehaviorsMask) { _XkbAddKeyChange(&mc->first_key_behavior, &mc->num_key_behaviors, key); } else if (changed & XkbKeyBehaviorsMask) { mc->changed |= XkbKeyBehaviorsMask; mc->first_key_behavior = key; mc->num_key_behaviors = 1; } if (tmp & XkbVirtualModMapMask) _XkbAddKeyChange(&mc->first_vmodmap_key, &mc->num_vmodmap_keys, key); else if (changed & XkbVirtualModMapMask) { mc->changed |= XkbVirtualModMapMask; mc->first_vmodmap_key = key; mc->num_vmodmap_keys = 1; } mc->changed |= changed; } if (interps != ibuf) free(interps); return TRUE; } Status XkbChangeTypesOfKey(XkbDescPtr xkb, int key, int nGroups, unsigned groups, int *newTypesIn, XkbMapChangesPtr changes) { XkbKeyTypePtr pOldType, pNewType; register int i; int width, nOldGroups, oldWidth, newTypes[XkbNumKbdGroups]; if ((!xkb) || (!XkbKeycodeInRange(xkb, key)) || (!xkb->map) || (!xkb->map->types) || (!newTypesIn) || ((groups & XkbAllGroupsMask) == 0) || (nGroups > XkbNumKbdGroups)) { return BadMatch; } if (nGroups == 0) { for (i = 0; i < XkbNumKbdGroups; i++) { xkb->map->key_sym_map[key].kt_index[i] = XkbOneLevelIndex; } i = xkb->map->key_sym_map[key].group_info; i = XkbSetNumGroups(i, 0); xkb->map->key_sym_map[key].group_info = i; XkbResizeKeySyms(xkb, key, 0); XkbResizeKeyActions(xkb, key, 0); return Success; } nOldGroups = XkbKeyNumGroups(xkb, key); oldWidth = XkbKeyGroupsWidth(xkb, key); for (width = i = 0; i < nGroups; i++) { if (groups & (1 << i)) newTypes[i] = newTypesIn[i]; else if (i < nOldGroups) newTypes[i] = XkbKeyKeyTypeIndex(xkb, key, i); else if (nOldGroups > 0) newTypes[i] = XkbKeyKeyTypeIndex(xkb, key, XkbGroup1Index); else newTypes[i] = XkbTwoLevelIndex; if (newTypes[i] > xkb->map->num_types) return BadMatch; pNewType = &xkb->map->types[newTypes[i]]; if (pNewType->num_levels > width) width = pNewType->num_levels; } if ((xkb->ctrls) && (nGroups > xkb->ctrls->num_groups)) xkb->ctrls->num_groups = nGroups; if ((width != oldWidth) || (nGroups != nOldGroups)) { KeySym oldSyms[XkbMaxSymsPerKey], *pSyms; int nCopy; if (nOldGroups == 0) { pSyms = XkbResizeKeySyms(xkb, key, width * nGroups); if (pSyms != NULL) { i = xkb->map->key_sym_map[key].group_info; i = XkbSetNumGroups(i, nGroups); xkb->map->key_sym_map[key].group_info = i; xkb->map->key_sym_map[key].width = width; for (i = 0; i < nGroups; i++) { xkb->map->key_sym_map[key].kt_index[i] = newTypes[i]; } return Success; } return BadAlloc; } pSyms = XkbKeySymsPtr(xkb, key); memcpy(oldSyms, pSyms, XkbKeyNumSyms(xkb, key) * sizeof(KeySym)); pSyms = XkbResizeKeySyms(xkb, key, width * nGroups); if (pSyms == NULL) return BadAlloc; memset(pSyms, 0, width * nGroups * sizeof(KeySym)); for (i = 0; (i < nGroups) && (i < nOldGroups); i++) { pOldType = XkbKeyKeyType(xkb, key, i); pNewType = &xkb->map->types[newTypes[i]]; if (pNewType->num_levels > pOldType->num_levels) nCopy = pOldType->num_levels; else nCopy = pNewType->num_levels; memcpy(&pSyms[i * width], &oldSyms[i * oldWidth], nCopy * sizeof(KeySym)); } if (XkbKeyHasActions(xkb, key)) { XkbAction oldActs[XkbMaxSymsPerKey], *pActs; pActs = XkbKeyActionsPtr(xkb, key); memcpy(oldActs, pActs, XkbKeyNumSyms(xkb, key) * sizeof(XkbAction)); pActs = XkbResizeKeyActions(xkb, key, width * nGroups); if (pActs == NULL) return BadAlloc; memset(pActs, 0, width * nGroups * sizeof(XkbAction)); for (i = 0; (i < nGroups) && (i < nOldGroups); i++) { pOldType = XkbKeyKeyType(xkb, key, i); pNewType = &xkb->map->types[newTypes[i]]; if (pNewType->num_levels > pOldType->num_levels) nCopy = pOldType->num_levels; else nCopy = pNewType->num_levels; memcpy(&pActs[i * width], &oldActs[i * oldWidth], nCopy * sizeof(XkbAction)); } } i = xkb->map->key_sym_map[key].group_info; i = XkbSetNumGroups(i, nGroups); xkb->map->key_sym_map[key].group_info = i; xkb->map->key_sym_map[key].width = width; } width = 0; for (i = 0; i < nGroups; i++) { xkb->map->key_sym_map[key].kt_index[i] = newTypes[i]; if (xkb->map->types[newTypes[i]].num_levels > width) width = xkb->map->types[newTypes[i]].num_levels; } xkb->map->key_sym_map[key].width = width; if (changes != NULL) { if (changes->changed & XkbKeySymsMask) { _XkbAddKeyChange(&changes->first_key_sym, &changes->num_key_syms, key); } else { changes->changed |= XkbKeySymsMask; changes->first_key_sym = key; changes->num_key_syms = 1; } } return Success; } /***====================================================================***/ Bool XkbVirtualModsToReal(XkbDescPtr xkb, unsigned virtual_mask, unsigned *mask_rtrn) { register int i, bit; register unsigned mask; if ((xkb == NULL) || (xkb->server == NULL)) { *mask_rtrn = 0; return FALSE; } if (virtual_mask == 0) { *mask_rtrn = 0; return TRUE; } for (i = mask = 0, bit = 1; i < XkbNumVirtualMods; i++, bit <<= 1) { if (virtual_mask & bit) mask |= xkb->server->vmods[i]; } *mask_rtrn = mask; return TRUE; } /***====================================================================***/ static Bool XkbUpdateActionVirtualMods(XkbDescPtr xkb, XkbAction *act, unsigned changed) { unsigned int tmp; switch (act->type) { case XkbSA_SetMods: case XkbSA_LatchMods: case XkbSA_LockMods: if (((tmp = XkbModActionVMods(&act->mods)) & changed) != 0) { XkbVirtualModsToReal(xkb, tmp, &tmp); act->mods.mask = act->mods.real_mods; act->mods.mask |= tmp; return TRUE; } break; case XkbSA_ISOLock: if ((((tmp = XkbModActionVMods(&act->iso)) != 0) & changed) != 0) { XkbVirtualModsToReal(xkb, tmp, &tmp); act->iso.mask = act->iso.real_mods; act->iso.mask |= tmp; return TRUE; } break; } return FALSE; } static void XkbUpdateKeyTypeVirtualMods(XkbDescPtr xkb, XkbKeyTypePtr type, unsigned int changed, XkbChangesPtr changes) { register unsigned int i; unsigned int mask; XkbVirtualModsToReal(xkb, type->mods.vmods, &mask); type->mods.mask = type->mods.real_mods | mask; if ((type->map_count > 0) && (type->mods.vmods != 0)) { XkbKTMapEntryPtr entry; for (i = 0, entry = type->map; i < type->map_count; i++, entry++) { if (entry->mods.vmods != 0) { XkbVirtualModsToReal(xkb, entry->mods.vmods, &mask); entry->mods.mask = entry->mods.real_mods | mask; /* entry is active if vmods are bound */ entry->active = (mask != 0); } else entry->active = 1; } } if (changes) { int type_ndx; type_ndx = type - xkb->map->types; if ((type_ndx < 0) || (type_ndx > xkb->map->num_types)) return; if (changes->map.changed & XkbKeyTypesMask) { int last; last = changes->map.first_type + changes->map.num_types - 1; if (type_ndx < changes->map.first_type) { changes->map.first_type = type_ndx; changes->map.num_types = (last - type_ndx) + 1; } else if (type_ndx > last) { changes->map.num_types = (type_ndx - changes->map.first_type) + 1; } } else { changes->map.changed |= XkbKeyTypesMask; changes->map.first_type = type_ndx; changes->map.num_types = 1; } } return; } Bool XkbApplyVirtualModChanges(XkbDescPtr xkb, unsigned changed, XkbChangesPtr changes) { register int i; unsigned int checkState = 0; if ((!xkb) || (!xkb->map) || (changed == 0)) return FALSE; for (i = 0; i < xkb->map->num_types; i++) { if (xkb->map->types[i].mods.vmods & changed) XkbUpdateKeyTypeVirtualMods(xkb, &xkb->map->types[i], changed, changes); } if (changed & xkb->ctrls->internal.vmods) { unsigned int newMask; XkbVirtualModsToReal(xkb, xkb->ctrls->internal.vmods, &newMask); newMask |= xkb->ctrls->internal.real_mods; if (xkb->ctrls->internal.mask != newMask) { xkb->ctrls->internal.mask = newMask; if (changes) { changes->ctrls.changed_ctrls |= XkbInternalModsMask; checkState = TRUE; } } } if (changed & xkb->ctrls->ignore_lock.vmods) { unsigned int newMask; XkbVirtualModsToReal(xkb, xkb->ctrls->ignore_lock.vmods, &newMask); newMask |= xkb->ctrls->ignore_lock.real_mods; if (xkb->ctrls->ignore_lock.mask != newMask) { xkb->ctrls->ignore_lock.mask = newMask; if (changes) { changes->ctrls.changed_ctrls |= XkbIgnoreLockModsMask; checkState = TRUE; } } } if (xkb->indicators != NULL) { XkbIndicatorMapPtr map; map = &xkb->indicators->maps[0]; for (i = 0; i < XkbNumIndicators; i++, map++) { if (map->mods.vmods & changed) { unsigned int newMask; XkbVirtualModsToReal(xkb, map->mods.vmods, &newMask); newMask |= map->mods.real_mods; if (newMask != map->mods.mask) { map->mods.mask = newMask; if (changes) { changes->indicators.map_changes |= (1 << i); checkState = TRUE; } } } } } if (xkb->compat != NULL) { XkbCompatMapPtr compat; compat = xkb->compat; for (i = 0; i < XkbNumKbdGroups; i++) { unsigned int newMask; XkbVirtualModsToReal(xkb, compat->groups[i].vmods, &newMask); newMask |= compat->groups[i].real_mods; if (compat->groups[i].mask != newMask) { compat->groups[i].mask = newMask; if (changes) { changes->compat.changed_groups |= (1 << i); checkState = TRUE; } } } } if (xkb->map && xkb->server) { int highChange = 0, lowChange = -1; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (XkbKeyHasActions(xkb, i)) { register XkbAction *pAct; register int n; pAct = XkbKeyActionsPtr(xkb, i); for (n = XkbKeyNumActions(xkb, i); n > 0; n--, pAct++) { if ((pAct->type != XkbSA_NoAction) && XkbUpdateActionVirtualMods(xkb, pAct, changed)) { if (lowChange < 0) lowChange = i; highChange = i; } } } } if (changes && (lowChange > 0)) { /* something changed */ if (changes->map.changed & XkbKeyActionsMask) { int last; if (changes->map.first_key_act < lowChange) lowChange = changes->map.first_key_act; last = changes->map.first_key_act + changes->map.num_key_acts - 1; if (last > highChange) highChange = last; } changes->map.changed |= XkbKeyActionsMask; changes->map.first_key_act = lowChange; changes->map.num_key_acts = (highChange - lowChange) + 1; } } return checkState; } xorg-server-21.1.16/xkb/XKBAlloc.c0000644000175000017500000002520714757411105012170 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include "misc.h" #include "inputstr.h" #include #include "xkbgeom.h" #include #include /***===================================================================***/ /*ARGSUSED*/ Status XkbAllocCompatMap(XkbDescPtr xkb, unsigned which, unsigned nSI) { XkbCompatMapPtr compat; XkbSymInterpretRec *prev_interpret; if (!xkb) return BadMatch; if (xkb->compat) { if (xkb->compat->size_si >= nSI) return Success; compat = xkb->compat; compat->size_si = nSI; if (compat->sym_interpret == NULL) compat->num_si = 0; prev_interpret = compat->sym_interpret; compat->sym_interpret = reallocarray(compat->sym_interpret, nSI, sizeof(XkbSymInterpretRec)); if (compat->sym_interpret == NULL) { free(prev_interpret); compat->size_si = compat->num_si = 0; return BadAlloc; } if (compat->num_si != 0) { memset(&compat->sym_interpret[compat->num_si], 0, (compat->size_si - compat->num_si) * sizeof(XkbSymInterpretRec)); } return Success; } compat = calloc(1, sizeof(XkbCompatMapRec)); if (compat == NULL) return BadAlloc; if (nSI > 0) { compat->sym_interpret = calloc(nSI, sizeof(XkbSymInterpretRec)); if (!compat->sym_interpret) { free(compat); return BadAlloc; } } compat->size_si = nSI; compat->num_si = 0; memset((char *) &compat->groups[0], 0, XkbNumKbdGroups * sizeof(XkbModsRec)); xkb->compat = compat; return Success; } void XkbFreeCompatMap(XkbDescPtr xkb, unsigned which, Bool freeMap) { register XkbCompatMapPtr compat; if ((xkb == NULL) || (xkb->compat == NULL)) return; compat = xkb->compat; if (freeMap) which = XkbAllCompatMask; if (which & XkbGroupCompatMask) memset((char *) &compat->groups[0], 0, XkbNumKbdGroups * sizeof(XkbModsRec)); if (which & XkbSymInterpMask) { if ((compat->sym_interpret) && (compat->size_si > 0)) free(compat->sym_interpret); compat->size_si = compat->num_si = 0; compat->sym_interpret = NULL; } if (freeMap) { free(compat); xkb->compat = NULL; } return; } /***===================================================================***/ Status XkbAllocNames(XkbDescPtr xkb, unsigned which, int nTotalRG, int nTotalAliases) { XkbNamesPtr names; if (xkb == NULL) return BadMatch; if (xkb->names == NULL) { xkb->names = calloc(1, sizeof(XkbNamesRec)); if (xkb->names == NULL) return BadAlloc; } names = xkb->names; if ((which & XkbKTLevelNamesMask) && (xkb->map != NULL) && (xkb->map->types != NULL)) { register int i; XkbKeyTypePtr type; type = xkb->map->types; for (i = 0; i < xkb->map->num_types; i++, type++) { if (type->level_names == NULL) { type->level_names = calloc(type->num_levels, sizeof(Atom)); if (type->level_names == NULL) return BadAlloc; } } } if ((which & XkbKeyNamesMask) && (names->keys == NULL)) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadValue; names->keys = calloc((xkb->max_key_code + 1), sizeof(XkbKeyNameRec)); if (names->keys == NULL) return BadAlloc; } if ((which & XkbKeyAliasesMask) && (nTotalAliases > 0)) { if (names->key_aliases == NULL) { names->key_aliases = calloc(nTotalAliases, sizeof(XkbKeyAliasRec)); } else if (nTotalAliases > names->num_key_aliases) { XkbKeyAliasRec *prev_aliases = names->key_aliases; names->key_aliases = reallocarray(names->key_aliases, nTotalAliases, sizeof(XkbKeyAliasRec)); if (names->key_aliases != NULL) { memset(&names->key_aliases[names->num_key_aliases], 0, (nTotalAliases - names->num_key_aliases) * sizeof(XkbKeyAliasRec)); } else { free(prev_aliases); } } if (names->key_aliases == NULL) { names->num_key_aliases = 0; return BadAlloc; } names->num_key_aliases = nTotalAliases; } if ((which & XkbRGNamesMask) && (nTotalRG > 0)) { if (names->radio_groups == NULL) { names->radio_groups = calloc(nTotalRG, sizeof(Atom)); } else if (nTotalRG > names->num_rg) { Atom *prev_radio_groups = names->radio_groups; names->radio_groups = reallocarray(names->radio_groups, nTotalRG, sizeof(Atom)); if (names->radio_groups != NULL) { memset(&names->radio_groups[names->num_rg], 0, (nTotalRG - names->num_rg) * sizeof(Atom)); } else { free(prev_radio_groups); } } if (names->radio_groups == NULL) return BadAlloc; names->num_rg = nTotalRG; } return Success; } void XkbFreeNames(XkbDescPtr xkb, unsigned which, Bool freeMap) { XkbNamesPtr names; if ((xkb == NULL) || (xkb->names == NULL)) return; names = xkb->names; if (freeMap) which = XkbAllNamesMask; if (which & XkbKTLevelNamesMask) { XkbClientMapPtr map = xkb->map; if ((map != NULL) && (map->types != NULL)) { register int i; register XkbKeyTypePtr type; type = map->types; for (i = 0; i < map->num_types; i++, type++) { free(type->level_names); type->level_names = NULL; } } } if ((which & XkbKeyNamesMask) && (names->keys != NULL)) { free(names->keys); names->keys = NULL; names->num_keys = 0; } if ((which & XkbKeyAliasesMask) && (names->key_aliases)) { free(names->key_aliases); names->key_aliases = NULL; names->num_key_aliases = 0; } if ((which & XkbRGNamesMask) && (names->radio_groups)) { free(names->radio_groups); names->radio_groups = NULL; names->num_rg = 0; } if (freeMap) { free(names); xkb->names = NULL; } return; } /***===================================================================***/ /*ARGSUSED*/ Status XkbAllocControls(XkbDescPtr xkb, unsigned which) { if (xkb == NULL) return BadMatch; if (xkb->ctrls == NULL) { xkb->ctrls = calloc(1, sizeof(XkbControlsRec)); if (!xkb->ctrls) return BadAlloc; } return Success; } /*ARGSUSED*/ static void XkbFreeControls(XkbDescPtr xkb, unsigned which, Bool freeMap) { if (freeMap && (xkb != NULL) && (xkb->ctrls != NULL)) { free(xkb->ctrls); xkb->ctrls = NULL; } return; } /***===================================================================***/ Status XkbAllocIndicatorMaps(XkbDescPtr xkb) { if (xkb == NULL) return BadMatch; if (xkb->indicators == NULL) { xkb->indicators = calloc(1, sizeof(XkbIndicatorRec)); if (!xkb->indicators) return BadAlloc; } return Success; } static void XkbFreeIndicatorMaps(XkbDescPtr xkb) { if ((xkb != NULL) && (xkb->indicators != NULL)) { free(xkb->indicators); xkb->indicators = NULL; } return; } /***====================================================================***/ XkbDescRec * XkbAllocKeyboard(void) { XkbDescRec *xkb; xkb = calloc(1, sizeof(XkbDescRec)); if (xkb) xkb->device_spec = XkbUseCoreKbd; return xkb; } void XkbFreeKeyboard(XkbDescPtr xkb, unsigned which, Bool freeAll) { if (xkb == NULL) return; if (freeAll) which = XkbAllComponentsMask; if (which & XkbClientMapMask) XkbFreeClientMap(xkb, XkbAllClientInfoMask, TRUE); if (which & XkbServerMapMask) XkbFreeServerMap(xkb, XkbAllServerInfoMask, TRUE); if (which & XkbCompatMapMask) XkbFreeCompatMap(xkb, XkbAllCompatMask, TRUE); if (which & XkbIndicatorMapMask) XkbFreeIndicatorMaps(xkb); if (which & XkbNamesMask) XkbFreeNames(xkb, XkbAllNamesMask, TRUE); if ((which & XkbGeometryMask) && (xkb->geom != NULL)) { XkbFreeGeometry(xkb->geom, XkbGeomAllMask, TRUE); /* PERHAPS BONGHITS etc */ xkb->geom = NULL; } if (which & XkbControlsMask) XkbFreeControls(xkb, XkbAllControlsMask, TRUE); if (freeAll) free(xkb); return; } /***====================================================================***/ void XkbFreeComponentNames(XkbComponentNamesPtr names, Bool freeNames) { if (names) { free(names->keycodes); free(names->types); free(names->compat); free(names->symbols); free(names->geometry); memset(names, 0, sizeof(XkbComponentNamesRec)); } if (freeNames) free(names); } xorg-server-21.1.16/xkb/XKBGAlloc.c0000644000175000017500000006403314757411105012277 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include "misc.h" #include "inputstr.h" #include #include "xkbgeom.h" /***====================================================================***/ static void _XkbFreeGeomLeafElems(Bool freeAll, int first, int count, unsigned short *num_inout, unsigned short *sz_inout, char **elems, unsigned int elem_sz) { if ((freeAll) || (*elems == NULL)) { *num_inout = *sz_inout = 0; free(*elems); *elems = NULL; return; } if ((first >= (*num_inout)) || (first < 0) || (count < 1)) return; if (first + count >= (*num_inout)) { /* truncating the array is easy */ (*num_inout) = first; } else { char *ptr; int extra; ptr = *elems; extra = ((*num_inout) - (first + count)) * elem_sz; if (extra > 0) memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz], extra); (*num_inout) -= count; } return; } typedef void (*ContentsClearFunc) (char * /* priv */ ); static void _XkbFreeGeomNonLeafElems(Bool freeAll, int first, int count, unsigned short *num_inout, unsigned short *sz_inout, char **elems, unsigned int elem_sz, ContentsClearFunc freeFunc) { register int i; register char *ptr; if (freeAll) { first = 0; count = (*num_inout); } else if ((first >= (*num_inout)) || (first < 0) || (count < 1)) return; else if (first + count > (*num_inout)) count = (*num_inout) - first; if (*elems == NULL) return; if (freeFunc) { ptr = *elems; ptr += first * elem_sz; for (i = 0; i < count; i++) { (*freeFunc) (ptr); ptr += elem_sz; } } if (freeAll) { (*num_inout) = (*sz_inout) = 0; free(*elems); *elems = NULL; } else if (first + count >= (*num_inout)) *num_inout = first; else { i = ((*num_inout) - (first + count)) * elem_sz; ptr = *elems; memmove(&ptr[first * elem_sz], &ptr[(first + count) * elem_sz], i); (*num_inout) -= count; } return; } /***====================================================================***/ static void _XkbClearProperty(char *prop_in) { XkbPropertyPtr prop = (XkbPropertyPtr) prop_in; free(prop->name); prop->name = NULL; free(prop->value); prop->value = NULL; return; } void XkbFreeGeomProperties(XkbGeometryPtr geom, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, &geom->num_properties, &geom->sz_properties, (char **) &geom->properties, sizeof(XkbPropertyRec), _XkbClearProperty); return; } /***====================================================================***/ void XkbFreeGeomKeyAliases(XkbGeometryPtr geom, int first, int count, Bool freeAll) { _XkbFreeGeomLeafElems(freeAll, first, count, &geom->num_key_aliases, &geom->sz_key_aliases, (char **) &geom->key_aliases, sizeof(XkbKeyAliasRec)); return; } /***====================================================================***/ static void _XkbClearColor(char *color_in) { XkbColorPtr color = (XkbColorPtr) color_in; free(color->spec); return; } void XkbFreeGeomColors(XkbGeometryPtr geom, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, &geom->num_colors, &geom->sz_colors, (char **) &geom->colors, sizeof(XkbColorRec), _XkbClearColor); return; } /***====================================================================***/ void XkbFreeGeomPoints(XkbOutlinePtr outline, int first, int count, Bool freeAll) { _XkbFreeGeomLeafElems(freeAll, first, count, &outline->num_points, &outline->sz_points, (char **) &outline->points, sizeof(XkbPointRec)); return; } /***====================================================================***/ static void _XkbClearOutline(char *outline_in) { XkbOutlinePtr outline = (XkbOutlinePtr) outline_in; if (outline->points != NULL) XkbFreeGeomPoints(outline, 0, outline->num_points, TRUE); return; } void XkbFreeGeomOutlines(XkbShapePtr shape, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, &shape->num_outlines, &shape->sz_outlines, (char **) &shape->outlines, sizeof(XkbOutlineRec), _XkbClearOutline); return; } /***====================================================================***/ static void _XkbClearShape(char *shape_in) { XkbShapePtr shape = (XkbShapePtr) shape_in; if (shape->outlines) XkbFreeGeomOutlines(shape, 0, shape->num_outlines, TRUE); return; } void XkbFreeGeomShapes(XkbGeometryPtr geom, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, &geom->num_shapes, &geom->sz_shapes, (char **) &geom->shapes, sizeof(XkbShapeRec), _XkbClearShape); return; } /***====================================================================***/ void XkbFreeGeomOverlayKeys(XkbOverlayRowPtr row, int first, int count, Bool freeAll) { _XkbFreeGeomLeafElems(freeAll, first, count, &row->num_keys, &row->sz_keys, (char **) &row->keys, sizeof(XkbOverlayKeyRec)); return; } /***====================================================================***/ void XkbFreeGeomKeys(XkbRowPtr row, int first, int count, Bool freeAll) { _XkbFreeGeomLeafElems(freeAll, first, count, &row->num_keys, &row->sz_keys, (char **) &row->keys, sizeof(XkbKeyRec)); return; } /***====================================================================***/ static void _XkbClearRow(char *row_in) { XkbRowPtr row = (XkbRowPtr) row_in; if (row->keys != NULL) XkbFreeGeomKeys(row, 0, row->num_keys, TRUE); return; } void XkbFreeGeomRows(XkbSectionPtr section, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, §ion->num_rows, §ion->sz_rows, (char **) §ion->rows, sizeof(XkbRowRec), _XkbClearRow); } /***====================================================================***/ static void _XkbClearSection(char *section_in) { XkbSectionPtr section = (XkbSectionPtr) section_in; if (section->rows != NULL) XkbFreeGeomRows(section, 0, section->num_rows, TRUE); if (section->doodads != NULL) { XkbFreeGeomDoodads(section->doodads, section->num_doodads, TRUE); section->doodads = NULL; } return; } void XkbFreeGeomSections(XkbGeometryPtr geom, int first, int count, Bool freeAll) { _XkbFreeGeomNonLeafElems(freeAll, first, count, &geom->num_sections, &geom->sz_sections, (char **) &geom->sections, sizeof(XkbSectionRec), _XkbClearSection); return; } /***====================================================================***/ static void _XkbClearDoodad(char *doodad_in) { XkbDoodadPtr doodad = (XkbDoodadPtr) doodad_in; switch (doodad->any.type) { case XkbTextDoodad: { free(doodad->text.text); doodad->text.text = NULL; free(doodad->text.font); doodad->text.font = NULL; } break; case XkbLogoDoodad: { free(doodad->logo.logo_name); doodad->logo.logo_name = NULL; } break; } return; } void XkbFreeGeomDoodads(XkbDoodadPtr doodads, int nDoodads, Bool freeAll) { register int i; register XkbDoodadPtr doodad; if (doodads) { for (i = 0, doodad = doodads; i < nDoodads; i++, doodad++) { _XkbClearDoodad((char *) doodad); } if (freeAll) free(doodads); } return; } void XkbFreeGeometry(XkbGeometryPtr geom, unsigned which, Bool freeMap) { if (geom == NULL) return; if (freeMap) which = XkbGeomAllMask; if ((which & XkbGeomPropertiesMask) && (geom->properties != NULL)) XkbFreeGeomProperties(geom, 0, geom->num_properties, TRUE); if ((which & XkbGeomColorsMask) && (geom->colors != NULL)) XkbFreeGeomColors(geom, 0, geom->num_colors, TRUE); if ((which & XkbGeomShapesMask) && (geom->shapes != NULL)) XkbFreeGeomShapes(geom, 0, geom->num_shapes, TRUE); if ((which & XkbGeomSectionsMask) && (geom->sections != NULL)) XkbFreeGeomSections(geom, 0, geom->num_sections, TRUE); if ((which & XkbGeomDoodadsMask) && (geom->doodads != NULL)) { XkbFreeGeomDoodads(geom->doodads, geom->num_doodads, TRUE); geom->doodads = NULL; geom->num_doodads = geom->sz_doodads = 0; } if ((which & XkbGeomKeyAliasesMask) && (geom->key_aliases != NULL)) XkbFreeGeomKeyAliases(geom, 0, geom->num_key_aliases, TRUE); if (freeMap) { free(geom->label_font); geom->label_font = NULL; free(geom); } return; } /***====================================================================***/ /** * Resize and clear an XKB geometry item array. The array size may * grow or shrink unlike in _XkbGeomAlloc. * * @param buffer[in,out] buffer to reallocate and clear * @param szItems[in] currently allocated item count for "buffer" * @param nrItems[in] required item count for "buffer" * @param itemSize[in] size of a single item in "buffer" * @param clearance[in] items to clear after reallocation * * @see _XkbGeomAlloc * * @return TRUE if reallocation succeeded. Otherwise FALSE is returned * and contents of "buffer" aren't touched. */ Bool XkbGeomRealloc(void **buffer, int szItems, int nrItems, int itemSize, XkbGeomClearance clearance) { void *items; int clearBegin; /* Check validity of arguments. */ if (!buffer) return FALSE; items = *buffer; if (!((items && (szItems > 0)) || (!items && !szItems))) return FALSE; /* Check if there is need to resize. */ if (nrItems != szItems) if (!(items = reallocarray(items, nrItems, itemSize))) return FALSE; /* Clear specified items to zero. */ switch (clearance) { case XKB_GEOM_CLEAR_EXCESS: clearBegin = szItems; break; case XKB_GEOM_CLEAR_ALL: clearBegin = 0; break; case XKB_GEOM_CLEAR_NONE: default: clearBegin = nrItems; break; } if (items && (clearBegin < nrItems)) memset((char *) items + (clearBegin * itemSize), 0, (nrItems - clearBegin) * itemSize); *buffer = items; return TRUE; } static Status _XkbGeomAlloc(void **old, unsigned short *num, unsigned short *total, int num_new, size_t sz_elem) { if (num_new < 1) return Success; if ((*old) == NULL) *num = *total = 0; if ((*num) + num_new <= (*total)) return Success; *total = (*num) + num_new; if (!XkbGeomRealloc(old, *num, *total, sz_elem, XKB_GEOM_CLEAR_EXCESS)) { free(*old); (*old) = NULL; *total = *num = 0; return BadAlloc; } return Success; } #define _XkbAllocProps(g,n) _XkbGeomAlloc((void *)&(g)->properties,\ &(g)->num_properties,&(g)->sz_properties,\ (n),sizeof(XkbPropertyRec)) #define _XkbAllocColors(g,n) _XkbGeomAlloc((void *)&(g)->colors,\ &(g)->num_colors,&(g)->sz_colors,\ (n),sizeof(XkbColorRec)) #define _XkbAllocShapes(g,n) _XkbGeomAlloc((void *)&(g)->shapes,\ &(g)->num_shapes,&(g)->sz_shapes,\ (n),sizeof(XkbShapeRec)) #define _XkbAllocSections(g,n) _XkbGeomAlloc((void *)&(g)->sections,\ &(g)->num_sections,&(g)->sz_sections,\ (n),sizeof(XkbSectionRec)) #define _XkbAllocDoodads(g,n) _XkbGeomAlloc((void *)&(g)->doodads,\ &(g)->num_doodads,&(g)->sz_doodads,\ (n),sizeof(XkbDoodadRec)) #define _XkbAllocKeyAliases(g,n) _XkbGeomAlloc((void *)&(g)->key_aliases,\ &(g)->num_key_aliases,&(g)->sz_key_aliases,\ (n),sizeof(XkbKeyAliasRec)) #define _XkbAllocOutlines(s,n) _XkbGeomAlloc((void *)&(s)->outlines,\ &(s)->num_outlines,&(s)->sz_outlines,\ (n),sizeof(XkbOutlineRec)) #define _XkbAllocRows(s,n) _XkbGeomAlloc((void *)&(s)->rows,\ &(s)->num_rows,&(s)->sz_rows,\ (n),sizeof(XkbRowRec)) #define _XkbAllocPoints(o,n) _XkbGeomAlloc((void *)&(o)->points,\ &(o)->num_points,&(o)->sz_points,\ (n),sizeof(XkbPointRec)) #define _XkbAllocKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbKeyRec)) #define _XkbAllocOverlays(s,n) _XkbGeomAlloc((void *)&(s)->overlays,\ &(s)->num_overlays,&(s)->sz_overlays,\ (n),sizeof(XkbOverlayRec)) #define _XkbAllocOverlayRows(o,n) _XkbGeomAlloc((void *)&(o)->rows,\ &(o)->num_rows,&(o)->sz_rows,\ (n),sizeof(XkbOverlayRowRec)) #define _XkbAllocOverlayKeys(r,n) _XkbGeomAlloc((void *)&(r)->keys,\ &(r)->num_keys,&(r)->sz_keys,\ (n),sizeof(XkbOverlayKeyRec)) Status XkbAllocGeometry(XkbDescPtr xkb, XkbGeometrySizesPtr sizes) { XkbGeometryPtr geom; Status rtrn; if (xkb->geom == NULL) { xkb->geom = calloc(1, sizeof(XkbGeometryRec)); if (!xkb->geom) return BadAlloc; } geom = xkb->geom; if ((sizes->which & XkbGeomPropertiesMask) && ((rtrn = _XkbAllocProps(geom, sizes->num_properties)) != Success)) { goto BAIL; } if ((sizes->which & XkbGeomColorsMask) && ((rtrn = _XkbAllocColors(geom, sizes->num_colors)) != Success)) { goto BAIL; } if ((sizes->which & XkbGeomShapesMask) && ((rtrn = _XkbAllocShapes(geom, sizes->num_shapes)) != Success)) { goto BAIL; } if ((sizes->which & XkbGeomSectionsMask) && ((rtrn = _XkbAllocSections(geom, sizes->num_sections)) != Success)) { goto BAIL; } if ((sizes->which & XkbGeomDoodadsMask) && ((rtrn = _XkbAllocDoodads(geom, sizes->num_doodads)) != Success)) { goto BAIL; } if ((sizes->which & XkbGeomKeyAliasesMask) && ((rtrn = _XkbAllocKeyAliases(geom, sizes->num_key_aliases)) != Success)) { goto BAIL; } return Success; BAIL: XkbFreeGeometry(geom, XkbGeomAllMask, TRUE); xkb->geom = NULL; return rtrn; } /***====================================================================***/ XkbPropertyPtr XkbAddGeomProperty(XkbGeometryPtr geom, char *name, char *value) { register int i; register XkbPropertyPtr prop; if ((!geom) || (!name) || (!value)) return NULL; for (i = 0, prop = geom->properties; i < geom->num_properties; i++, prop++) { if ((prop->name) && (strcmp(name, prop->name) == 0)) { free(prop->value); prop->value = strdup(value); return prop; } } if ((geom->num_properties >= geom->sz_properties) && (_XkbAllocProps(geom, 1) != Success)) { return NULL; } prop = &geom->properties[geom->num_properties]; prop->name = strdup(name); if (!prop->name) return NULL; prop->value = strdup(value); if (!prop->value) { free(prop->name); prop->name = NULL; return NULL; } geom->num_properties++; return prop; } XkbKeyAliasPtr XkbAddGeomKeyAlias(XkbGeometryPtr geom, char *aliasStr, char *realStr) { register int i; register XkbKeyAliasPtr alias; if ((!geom) || (!aliasStr) || (!realStr) || (!aliasStr[0]) || (!realStr[0])) return NULL; for (i = 0, alias = geom->key_aliases; i < geom->num_key_aliases; i++, alias++) { if (strncmp(alias->alias, aliasStr, XkbKeyNameLength) == 0) { memset(alias->real, 0, XkbKeyNameLength); memcpy(alias->real, realStr, strnlen(realStr, XkbKeyNameLength)); return alias; } } if ((geom->num_key_aliases >= geom->sz_key_aliases) && (_XkbAllocKeyAliases(geom, 1) != Success)) { return NULL; } alias = &geom->key_aliases[geom->num_key_aliases]; memset(alias, 0, sizeof(XkbKeyAliasRec)); memcpy(alias->alias, aliasStr, strnlen(aliasStr, XkbKeyNameLength)); memcpy(alias->real, realStr, strnlen(realStr, XkbKeyNameLength)); geom->num_key_aliases++; return alias; } XkbColorPtr XkbAddGeomColor(XkbGeometryPtr geom, char *spec, unsigned int pixel) { register int i; register XkbColorPtr color; if ((!geom) || (!spec)) return NULL; for (i = 0, color = geom->colors; i < geom->num_colors; i++, color++) { if ((color->spec) && (strcmp(color->spec, spec) == 0)) { color->pixel = pixel; return color; } } if ((geom->num_colors >= geom->sz_colors) && (_XkbAllocColors(geom, 1) != Success)) { return NULL; } color = &geom->colors[geom->num_colors]; color->pixel = pixel; color->spec = strdup(spec); if (!color->spec) return NULL; geom->num_colors++; return color; } XkbOutlinePtr XkbAddGeomOutline(XkbShapePtr shape, int sz_points) { XkbOutlinePtr outline; if ((!shape) || (sz_points < 0)) return NULL; if ((shape->num_outlines >= shape->sz_outlines) && (_XkbAllocOutlines(shape, 1) != Success)) { return NULL; } outline = &shape->outlines[shape->num_outlines]; memset(outline, 0, sizeof(XkbOutlineRec)); if ((sz_points > 0) && (_XkbAllocPoints(outline, sz_points) != Success)) return NULL; shape->num_outlines++; return outline; } XkbShapePtr XkbAddGeomShape(XkbGeometryPtr geom, Atom name, int sz_outlines) { XkbShapePtr shape; register int i; if ((!geom) || (!name) || (sz_outlines < 0)) return NULL; if (geom->num_shapes > 0) { for (shape = geom->shapes, i = 0; i < geom->num_shapes; i++, shape++) { if (name == shape->name) return shape; } } if ((geom->num_shapes >= geom->sz_shapes) && (_XkbAllocShapes(geom, 1) != Success)) return NULL; shape = &geom->shapes[geom->num_shapes]; memset(shape, 0, sizeof(XkbShapeRec)); if ((sz_outlines > 0) && (_XkbAllocOutlines(shape, sz_outlines) != Success)) return NULL; shape->name = name; shape->primary = shape->approx = NULL; geom->num_shapes++; return shape; } XkbKeyPtr XkbAddGeomKey(XkbRowPtr row) { XkbKeyPtr key; if (!row) return NULL; if ((row->num_keys >= row->sz_keys) && (_XkbAllocKeys(row, 1) != Success)) return NULL; key = &row->keys[row->num_keys++]; memset(key, 0, sizeof(XkbKeyRec)); return key; } XkbRowPtr XkbAddGeomRow(XkbSectionPtr section, int sz_keys) { XkbRowPtr row; if ((!section) || (sz_keys < 0)) return NULL; if ((section->num_rows >= section->sz_rows) && (_XkbAllocRows(section, 1) != Success)) return NULL; row = §ion->rows[section->num_rows]; memset(row, 0, sizeof(XkbRowRec)); if ((sz_keys > 0) && (_XkbAllocKeys(row, sz_keys) != Success)) return NULL; section->num_rows++; return row; } XkbSectionPtr XkbAddGeomSection(XkbGeometryPtr geom, Atom name, int sz_rows, int sz_doodads, int sz_over) { register int i; XkbSectionPtr section; if ((!geom) || (name == None) || (sz_rows < 0)) return NULL; for (i = 0, section = geom->sections; i < geom->num_sections; i++, section++) { if (section->name != name) continue; if (((sz_rows > 0) && (_XkbAllocRows(section, sz_rows) != Success)) || ((sz_doodads > 0) && (_XkbAllocDoodads(section, sz_doodads) != Success)) || ((sz_over > 0) && (_XkbAllocOverlays(section, sz_over) != Success))) return NULL; return section; } if ((geom->num_sections >= geom->sz_sections) && (_XkbAllocSections(geom, 1) != Success)) return NULL; section = &geom->sections[geom->num_sections]; if ((sz_rows > 0) && (_XkbAllocRows(section, sz_rows) != Success)) return NULL; if ((sz_doodads > 0) && (_XkbAllocDoodads(section, sz_doodads) != Success)) { if (section->rows) { free(section->rows); section->rows = NULL; section->sz_rows = section->num_rows = 0; } return NULL; } section->name = name; geom->num_sections++; return section; } XkbDoodadPtr XkbAddGeomDoodad(XkbGeometryPtr geom, XkbSectionPtr section, Atom name) { XkbDoodadPtr old, doodad; register int i, nDoodads; if ((!geom) || (name == None)) return NULL; if ((section != NULL) && (section->num_doodads > 0)) { old = section->doodads; nDoodads = section->num_doodads; } else { old = geom->doodads; nDoodads = geom->num_doodads; } for (i = 0, doodad = old; i < nDoodads; i++, doodad++) { if (doodad->any.name == name) return doodad; } if (section) { if ((section->num_doodads >= geom->sz_doodads) && (_XkbAllocDoodads(section, 1) != Success)) { return NULL; } doodad = §ion->doodads[section->num_doodads++]; } else { if ((geom->num_doodads >= geom->sz_doodads) && (_XkbAllocDoodads(geom, 1) != Success)) return NULL; doodad = &geom->doodads[geom->num_doodads++]; } memset(doodad, 0, sizeof(XkbDoodadRec)); doodad->any.name = name; return doodad; } XkbOverlayKeyPtr XkbAddGeomOverlayKey(XkbOverlayPtr overlay, XkbOverlayRowPtr row, char *over, char *under) { register int i; XkbOverlayKeyPtr key; XkbSectionPtr section; XkbRowPtr row_under; Bool found; if ((!overlay) || (!row) || (!over) || (!under)) return NULL; section = overlay->section_under; if (row->row_under >= section->num_rows) return NULL; row_under = §ion->rows[row->row_under]; for (i = 0, found = FALSE; i < row_under->num_keys; i++) { if (strncmp(under, row_under->keys[i].name.name, XkbKeyNameLength) == 0) { found = TRUE; break; } } if (!found) return NULL; if ((row->num_keys >= row->sz_keys) && (_XkbAllocOverlayKeys(row, 1) != Success)) return NULL; key = &row->keys[row->num_keys]; memcpy(key->under.name, under, strnlen(under, XkbKeyNameLength)); memcpy(key->over.name, over, strnlen(over, XkbKeyNameLength)); row->num_keys++; return key; } XkbOverlayRowPtr XkbAddGeomOverlayRow(XkbOverlayPtr overlay, int row_under, int sz_keys) { register int i; XkbOverlayRowPtr row; if ((!overlay) || (sz_keys < 0)) return NULL; if (row_under >= overlay->section_under->num_rows) return NULL; for (i = 0; i < overlay->num_rows; i++) { if (overlay->rows[i].row_under == row_under) { row = &overlay->rows[i]; if ((row->sz_keys < sz_keys) && (_XkbAllocOverlayKeys(row, sz_keys) != Success)) { return NULL; } return &overlay->rows[i]; } } if ((overlay->num_rows >= overlay->sz_rows) && (_XkbAllocOverlayRows(overlay, 1) != Success)) return NULL; row = &overlay->rows[overlay->num_rows]; memset(row, 0, sizeof(XkbOverlayRowRec)); if ((sz_keys > 0) && (_XkbAllocOverlayKeys(row, sz_keys) != Success)) return NULL; row->row_under = row_under; overlay->num_rows++; return row; } XkbOverlayPtr XkbAddGeomOverlay(XkbSectionPtr section, Atom name, int sz_rows) { register int i; XkbOverlayPtr overlay; if ((!section) || (name == None) || (sz_rows == 0)) return NULL; for (i = 0, overlay = section->overlays; i < section->num_overlays; i++, overlay++) { if (overlay->name == name) { if ((sz_rows > 0) && (_XkbAllocOverlayRows(overlay, sz_rows) != Success)) return NULL; return overlay; } } if ((section->num_overlays >= section->sz_overlays) && (_XkbAllocOverlays(section, 1) != Success)) return NULL; overlay = §ion->overlays[section->num_overlays]; if ((sz_rows > 0) && (_XkbAllocOverlayRows(overlay, sz_rows) != Success)) return NULL; overlay->name = name; overlay->section_under = section; section->num_overlays++; return overlay; } xorg-server-21.1.16/xkb/XKBMAlloc.c0000644000175000017500000007632114757411105012310 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include "misc.h" #include "inputstr.h" #include #define XKBSRV_NEED_FILE_FUNCS #include /***====================================================================***/ Status XkbAllocClientMap(XkbDescPtr xkb, unsigned which, unsigned nTotalTypes) { XkbClientMapPtr map; if ((xkb == NULL) || ((nTotalTypes > 0) && (nTotalTypes < XkbNumRequiredTypes))) return BadValue; if ((which & XkbKeySymsMask) && ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code))) { DebugF("bad keycode (%d,%d) in XkbAllocClientMap\n", xkb->min_key_code, xkb->max_key_code); return BadValue; } if (xkb->map == NULL) { map = calloc(1, sizeof(XkbClientMapRec)); if (map == NULL) return BadAlloc; xkb->map = map; } else map = xkb->map; if ((which & XkbKeyTypesMask) && (nTotalTypes > 0)) { if (map->types == NULL) { map->types = calloc(nTotalTypes, sizeof(XkbKeyTypeRec)); if (map->types == NULL) return BadAlloc; map->num_types = 0; map->size_types = nTotalTypes; } else if (map->size_types < nTotalTypes) { XkbKeyTypeRec *prev_types = map->types; map->types = reallocarray(map->types, nTotalTypes, sizeof(XkbKeyTypeRec)); if (map->types == NULL) { free(prev_types); map->num_types = map->size_types = 0; return BadAlloc; } map->size_types = nTotalTypes; memset(&map->types[map->num_types], 0, ((map->size_types - map->num_types) * sizeof(XkbKeyTypeRec))); } } if (which & XkbKeySymsMask) { int nKeys = XkbNumKeys(xkb); if (map->syms == NULL) { map->size_syms = (nKeys * 15) / 10; map->syms = calloc(map->size_syms, sizeof(KeySym)); if (!map->syms) { map->size_syms = 0; return BadAlloc; } map->num_syms = 1; map->syms[0] = NoSymbol; } if (map->key_sym_map == NULL) { map->key_sym_map = calloc(MAP_LENGTH, sizeof(XkbSymMapRec)); if (map->key_sym_map == NULL) return BadAlloc; } } if (which & XkbModifierMapMask) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadMatch; if (map->modmap == NULL) { map->modmap = calloc(MAP_LENGTH, sizeof(unsigned char)); if (map->modmap == NULL) return BadAlloc; } } return Success; } Status XkbAllocServerMap(XkbDescPtr xkb, unsigned which, unsigned nNewActions) { register int i; XkbServerMapPtr map; if (xkb == NULL) return BadMatch; if (xkb->server == NULL) { map = calloc(1, sizeof(XkbServerMapRec)); if (map == NULL) return BadAlloc; for (i = 0; i < XkbNumVirtualMods; i++) { map->vmods[i] = XkbNoModifierMask; } xkb->server = map; } else map = xkb->server; if (which & XkbExplicitComponentsMask) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadMatch; if (map->explicit == NULL) { map->explicit = calloc(MAP_LENGTH, sizeof(unsigned char)); if (map->explicit == NULL) return BadAlloc; } } if (which & XkbKeyActionsMask) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadMatch; if (nNewActions < 1) nNewActions = 1; if (map->acts == NULL) { map->acts = calloc((nNewActions + 1), sizeof(XkbAction)); if (map->acts == NULL) return BadAlloc; map->num_acts = 1; map->size_acts = nNewActions + 1; } else if ((map->size_acts - map->num_acts) < nNewActions) { unsigned need; XkbAction *prev_acts = map->acts; need = map->num_acts + nNewActions; map->acts = reallocarray(map->acts, need, sizeof(XkbAction)); if (map->acts == NULL) { free(prev_acts); map->num_acts = map->size_acts = 0; return BadAlloc; } map->size_acts = need; memset(&map->acts[map->num_acts], 0, ((map->size_acts - map->num_acts) * sizeof(XkbAction))); } if (map->key_acts == NULL) { map->key_acts = calloc(MAP_LENGTH, sizeof(unsigned short)); if (map->key_acts == NULL) return BadAlloc; } } if (which & XkbKeyBehaviorsMask) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadMatch; if (map->behaviors == NULL) { map->behaviors = calloc(MAP_LENGTH, sizeof(XkbBehavior)); if (map->behaviors == NULL) return BadAlloc; } } if (which & XkbVirtualModMapMask) { if ((!XkbIsLegalKeycode(xkb->min_key_code)) || (!XkbIsLegalKeycode(xkb->max_key_code)) || (xkb->max_key_code < xkb->min_key_code)) return BadMatch; if (map->vmodmap == NULL) { map->vmodmap = calloc(MAP_LENGTH, sizeof(unsigned short)); if (map->vmodmap == NULL) return BadAlloc; } } return Success; } /***====================================================================***/ static Status XkbCopyKeyType(XkbKeyTypePtr from, XkbKeyTypePtr into) { if ((!from) || (!into)) return BadMatch; free(into->map); into->map = NULL; free(into->preserve); into->preserve = NULL; free(into->level_names); into->level_names = NULL; *into = *from; if ((from->map) && (into->map_count > 0)) { into->map = calloc(into->map_count, sizeof(XkbKTMapEntryRec)); if (!into->map) return BadAlloc; memcpy(into->map, from->map, into->map_count * sizeof(XkbKTMapEntryRec)); } if ((from->preserve) && (into->map_count > 0)) { into->preserve = calloc(into->map_count, sizeof(XkbModsRec)); if (!into->preserve) return BadAlloc; memcpy(into->preserve, from->preserve, into->map_count * sizeof(XkbModsRec)); } if ((from->level_names) && (into->num_levels > 0)) { into->level_names = calloc(into->num_levels, sizeof(Atom)); if (!into->level_names) return BadAlloc; memcpy(into->level_names, from->level_names, into->num_levels * sizeof(Atom)); } return Success; } Status XkbCopyKeyTypes(XkbKeyTypePtr from, XkbKeyTypePtr into, int num_types) { register int i, rtrn; if ((!from) || (!into) || (num_types < 0)) return BadMatch; for (i = 0; i < num_types; i++) { if ((rtrn = XkbCopyKeyType(from++, into++)) != Success) return rtrn; } return Success; } Status XkbResizeKeyType(XkbDescPtr xkb, int type_ndx, int map_count, Bool want_preserve, int new_num_lvls) { XkbKeyTypePtr type; KeyCode matchingKeys[XkbMaxKeyCount], nMatchingKeys; if ((type_ndx < 0) || (type_ndx >= xkb->map->num_types) || (map_count < 0) || (new_num_lvls < 1)) return BadValue; switch (type_ndx) { case XkbOneLevelIndex: if (new_num_lvls != 1) return BadMatch; break; case XkbTwoLevelIndex: case XkbAlphabeticIndex: case XkbKeypadIndex: if (new_num_lvls != 2) return BadMatch; break; } type = &xkb->map->types[type_ndx]; if (map_count == 0) { free(type->map); type->map = NULL; free(type->preserve); type->preserve = NULL; type->map_count = 0; } else { XkbKTMapEntryRec *prev_map = type->map; if ((map_count > type->map_count) || (type->map == NULL)) type->map = reallocarray(type->map, map_count, sizeof(XkbKTMapEntryRec)); if (!type->map) { free(prev_map); return BadAlloc; } if (want_preserve) { XkbModsRec *prev_preserve = type->preserve; if ((map_count > type->map_count) || (type->preserve == NULL)) { type->preserve = reallocarray(type->preserve, map_count, sizeof(XkbModsRec)); } if (!type->preserve) { free(prev_preserve); return BadAlloc; } } else { free(type->preserve); type->preserve = NULL; } type->map_count = map_count; } if ((new_num_lvls > type->num_levels) || (type->level_names == NULL)) { Atom *prev_level_names = type->level_names; type->level_names = reallocarray(type->level_names, new_num_lvls, sizeof(Atom)); if (!type->level_names) { free(prev_level_names); return BadAlloc; } } /* * Here's the theory: * If the width of the type changed, we might have to resize the symbol * maps for any keys that use the type for one or more groups. This is * expensive, so we'll try to cull out any keys that are obviously okay: * In any case: * - keys that have a group width <= the old width are okay (because * they could not possibly have been associated with the old type) * If the key type increased in size: * - keys that already have a group width >= to the new width are okay * + keys that have a group width >= the old width but < the new width * might have to be enlarged. * If the key type decreased in size: * - keys that have a group width > the old width don't have to be * resized (because they must have some other wider type associated * with some group). * + keys that have a group width == the old width might have to be * shrunk. * The possibilities marked with '+' require us to examine the key types * associated with each group for the key. */ memset(matchingKeys, 0, XkbMaxKeyCount * sizeof(KeyCode)); nMatchingKeys = 0; if (new_num_lvls > type->num_levels) { int nTotal; KeySym *newSyms; int width, match, nResize; register int i, g, nSyms; nResize = 0; for (nTotal = 1, i = xkb->min_key_code; i <= xkb->max_key_code; i++) { width = XkbKeyGroupsWidth(xkb, i); if (width < type->num_levels || width >= new_num_lvls) { nTotal += XkbKeyNumSyms(xkb,i); continue; } for (match = 0, g = XkbKeyNumGroups(xkb, i) - 1; (g >= 0) && (!match); g--) { if (XkbKeyKeyTypeIndex(xkb, i, g) == type_ndx) { matchingKeys[nMatchingKeys++] = i; match = 1; } } if (!match) nTotal += XkbKeyNumSyms(xkb, i); else { nTotal += XkbKeyNumGroups(xkb, i) * new_num_lvls; nResize++; } } if (nResize > 0) { int nextMatch; xkb->map->size_syms = (nTotal * 15) / 10; newSyms = calloc(xkb->map->size_syms, sizeof(KeySym)); if (newSyms == NULL) return BadAlloc; nextMatch = 0; nSyms = 1; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { if (matchingKeys[nextMatch] == i) { KeySym *pOld; nextMatch++; width = XkbKeyGroupsWidth(xkb, i); pOld = XkbKeySymsPtr(xkb, i); for (g = XkbKeyNumGroups(xkb, i) - 1; g >= 0; g--) { memcpy(&newSyms[nSyms + (new_num_lvls * g)], &pOld[width * g], width * sizeof(KeySym)); } xkb->map->key_sym_map[i].offset = nSyms; nSyms += XkbKeyNumGroups(xkb, i) * new_num_lvls; } else { memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i), XkbKeyNumSyms(xkb, i) * sizeof(KeySym)); xkb->map->key_sym_map[i].offset = nSyms; nSyms += XkbKeyNumSyms(xkb, i); } } type->num_levels = new_num_lvls; free(xkb->map->syms); xkb->map->syms = newSyms; xkb->map->num_syms = nSyms; return Success; } } else if (new_num_lvls < type->num_levels) { int width, match; register int g, i; for (i = xkb->min_key_code; i <= xkb->max_key_code; i++) { width = XkbKeyGroupsWidth(xkb, i); if (width < type->num_levels) continue; for (match = 0, g = XkbKeyNumGroups(xkb, i) - 1; (g >= 0) && (!match); g--) { if (XkbKeyKeyTypeIndex(xkb, i, g) == type_ndx) { matchingKeys[nMatchingKeys++] = i; match = 1; } } } } if (nMatchingKeys > 0) { int key, firstClear; register int i, g; if (new_num_lvls > type->num_levels) firstClear = type->num_levels; else firstClear = new_num_lvls; for (i = 0; i < nMatchingKeys; i++) { KeySym *pSyms; int width, nClear; key = matchingKeys[i]; width = XkbKeyGroupsWidth(xkb, key); nClear = width - firstClear; pSyms = XkbKeySymsPtr(xkb, key); for (g = XkbKeyNumGroups(xkb, key) - 1; g >= 0; g--) { if (XkbKeyKeyTypeIndex(xkb, key, g) == type_ndx) { if (nClear > 0) memset(&pSyms[g * width + firstClear], 0, nClear * sizeof(KeySym)); } } } } type->num_levels = new_num_lvls; return Success; } KeySym * XkbResizeKeySyms(XkbDescPtr xkb, int key, int needed) { register int i, nSyms, nKeySyms; unsigned nOldSyms; KeySym *newSyms; if (needed == 0) { xkb->map->key_sym_map[key].offset = 0; return xkb->map->syms; } nOldSyms = XkbKeyNumSyms(xkb, key); if (nOldSyms >= (unsigned) needed) { return XkbKeySymsPtr(xkb, key); } if (xkb->map->size_syms - xkb->map->num_syms >= (unsigned) needed) { if (nOldSyms > 0) { memcpy(&xkb->map->syms[xkb->map->num_syms], XkbKeySymsPtr(xkb, key), nOldSyms * sizeof(KeySym)); } if ((needed - nOldSyms) > 0) { memset(&xkb->map-> syms[xkb->map->num_syms + XkbKeyNumSyms(xkb, key)], 0, (needed - nOldSyms) * sizeof(KeySym)); } xkb->map->key_sym_map[key].offset = xkb->map->num_syms; xkb->map->num_syms += needed; return &xkb->map->syms[xkb->map->key_sym_map[key].offset]; } xkb->map->size_syms += (needed > 32 ? needed : 32); newSyms = calloc(xkb->map->size_syms, sizeof(KeySym)); if (newSyms == NULL) return NULL; newSyms[0] = NoSymbol; nSyms = 1; for (i = xkb->min_key_code; i <= (int) xkb->max_key_code; i++) { int nCopy; nCopy = nKeySyms = XkbKeyNumSyms(xkb, i); if ((nKeySyms == 0) && (i != key)) continue; if (i == key) nKeySyms = needed; if (nCopy != 0) memcpy(&newSyms[nSyms], XkbKeySymsPtr(xkb, i), nCopy * sizeof(KeySym)); if (nKeySyms > nCopy) memset(&newSyms[nSyms + nCopy], 0, (nKeySyms - nCopy) * sizeof(KeySym)); xkb->map->key_sym_map[i].offset = nSyms; nSyms += nKeySyms; } free(xkb->map->syms); xkb->map->syms = newSyms; xkb->map->num_syms = nSyms; return &xkb->map->syms[xkb->map->key_sym_map[key].offset]; } static unsigned _ExtendRange(unsigned int old_flags, unsigned int flag, KeyCode newKC, KeyCode *old_min, unsigned char *old_num) { if ((old_flags & flag) == 0) { old_flags |= flag; *old_min = newKC; *old_num = 1; } else { int last = (*old_min) + (*old_num) - 1; if (newKC < *old_min) { *old_min = newKC; *old_num = (last - newKC) + 1; } else if (newKC > last) { *old_num = (newKC - (*old_min)) + 1; } } return old_flags; } Status XkbChangeKeycodeRange(XkbDescPtr xkb, int minKC, int maxKC, XkbChangesPtr changes) { int tmp; if ((!xkb) || (minKC < XkbMinLegalKeyCode) || (maxKC > XkbMaxLegalKeyCode)) return BadValue; if (minKC > maxKC) return BadMatch; if (minKC < xkb->min_key_code) { if (changes) changes->map.min_key_code = minKC; tmp = xkb->min_key_code - minKC; if (xkb->map) { if (xkb->map->key_sym_map) { memset((char *) &xkb->map->key_sym_map[minKC], 0, tmp * sizeof(XkbSymMapRec)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeySymsMask, minKC, &changes->map. first_key_sym, &changes->map. num_key_syms); } } if (xkb->map->modmap) { memset((char *) &xkb->map->modmap[minKC], 0, tmp); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbModifierMapMask, minKC, &changes->map. first_modmap_key, &changes->map. num_modmap_keys); } } } if (xkb->server) { if (xkb->server->behaviors) { memset((char *) &xkb->server->behaviors[minKC], 0, tmp * sizeof(XkbBehavior)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeyBehaviorsMask, minKC, &changes->map. first_key_behavior, &changes->map. num_key_behaviors); } } if (xkb->server->key_acts) { memset((char *) &xkb->server->key_acts[minKC], 0, tmp * sizeof(unsigned short)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeyActionsMask, minKC, &changes->map. first_key_act, &changes->map. num_key_acts); } } if (xkb->server->vmodmap) { memset((char *) &xkb->server->vmodmap[minKC], 0, tmp * sizeof(unsigned short)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbVirtualModMapMask, minKC, &changes->map. first_modmap_key, &changes->map. num_vmodmap_keys); } } } if ((xkb->names) && (xkb->names->keys)) { memset((char *) &xkb->names->keys[minKC], 0, tmp * sizeof(XkbKeyNameRec)); if (changes) { changes->names.changed = _ExtendRange(changes->names.changed, XkbKeyNamesMask, minKC, &changes->names.first_key, &changes->names.num_keys); } } xkb->min_key_code = minKC; } if (maxKC > xkb->max_key_code) { if (changes) changes->map.max_key_code = maxKC; tmp = MAP_LENGTH - xkb->max_key_code; if (xkb->map) { if (xkb->map->key_sym_map) { memset((char *) &xkb->map->key_sym_map[xkb->max_key_code], 0, tmp * sizeof(XkbSymMapRec)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeySymsMask, maxKC, &changes->map. first_key_sym, &changes->map. num_key_syms); } } if (xkb->map->modmap) { memset((char *) &xkb->map->modmap[xkb->max_key_code], 0, tmp); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbModifierMapMask, maxKC, &changes->map. first_modmap_key, &changes->map. num_modmap_keys); } } } if (xkb->server) { if (xkb->server->behaviors) { memset((char *) &xkb->server->behaviors[xkb->max_key_code], 0, tmp * sizeof(XkbBehavior)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeyBehaviorsMask, maxKC, &changes->map. first_key_behavior, &changes->map. num_key_behaviors); } } if (xkb->server->key_acts) { memset((char *) &xkb->server->key_acts[xkb->max_key_code], 0, tmp * sizeof(unsigned short)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbKeyActionsMask, maxKC, &changes->map. first_key_act, &changes->map. num_key_acts); } } if (xkb->server->vmodmap) { memset((char *) &xkb->server->vmodmap[xkb->max_key_code], 0, tmp * sizeof(unsigned short)); if (changes) { changes->map.changed = _ExtendRange(changes->map.changed, XkbVirtualModMapMask, maxKC, &changes->map. first_modmap_key, &changes->map. num_vmodmap_keys); } } } if ((xkb->names) && (xkb->names->keys)) { memset((char *) &xkb->names->keys[xkb->max_key_code], 0, tmp * sizeof(XkbKeyNameRec)); if (changes) { changes->names.changed = _ExtendRange(changes->names.changed, XkbKeyNamesMask, maxKC, &changes->names.first_key, &changes->names.num_keys); } } xkb->max_key_code = maxKC; } return Success; } XkbAction * XkbResizeKeyActions(XkbDescPtr xkb, int key, int needed) { register int i, nActs; XkbAction *newActs; if (needed == 0) { xkb->server->key_acts[key] = 0; return NULL; } if (XkbKeyHasActions(xkb, key) && (XkbKeyNumSyms(xkb, key) >= (unsigned) needed)) return XkbKeyActionsPtr(xkb, key); if (xkb->server->size_acts - xkb->server->num_acts >= (unsigned) needed) { xkb->server->key_acts[key] = xkb->server->num_acts; xkb->server->num_acts += needed; return &xkb->server->acts[xkb->server->key_acts[key]]; } xkb->server->size_acts = xkb->server->num_acts + needed + 8; newActs = calloc(xkb->server->size_acts, sizeof(XkbAction)); if (newActs == NULL) return NULL; newActs[0].type = XkbSA_NoAction; nActs = 1; for (i = xkb->min_key_code; i <= (int) xkb->max_key_code; i++) { int nKeyActs, nCopy; if ((xkb->server->key_acts[i] == 0) && (i != key)) continue; nCopy = nKeyActs = XkbKeyNumActions(xkb, i); if (i == key) { nKeyActs = needed; if (needed < nCopy) nCopy = needed; } if (nCopy > 0) memcpy(&newActs[nActs], XkbKeyActionsPtr(xkb, i), nCopy * sizeof(XkbAction)); if (nCopy < nKeyActs) memset(&newActs[nActs + nCopy], 0, (nKeyActs - nCopy) * sizeof(XkbAction)); xkb->server->key_acts[i] = nActs; nActs += nKeyActs; } free(xkb->server->acts); xkb->server->acts = newActs; xkb->server->num_acts = nActs; return &xkb->server->acts[xkb->server->key_acts[key]]; } void XkbFreeClientMap(XkbDescPtr xkb, unsigned what, Bool freeMap) { XkbClientMapPtr map; if ((xkb == NULL) || (xkb->map == NULL)) return; if (freeMap) what = XkbAllClientInfoMask; map = xkb->map; if (what & XkbKeyTypesMask) { if (map->types != NULL) { if (map->num_types > 0) { register int i; XkbKeyTypePtr type; for (i = 0, type = map->types; i < map->num_types; i++, type++) { free(type->map); type->map = NULL; free(type->preserve); type->preserve = NULL; type->map_count = 0; free(type->level_names); type->level_names = NULL; } } free(map->types); map->num_types = map->size_types = 0; map->types = NULL; } } if (what & XkbKeySymsMask) { free(map->key_sym_map); map->key_sym_map = NULL; if (map->syms != NULL) { free(map->syms); map->size_syms = map->num_syms = 0; map->syms = NULL; } } if ((what & XkbModifierMapMask) && (map->modmap != NULL)) { free(map->modmap); map->modmap = NULL; } if (freeMap) { free(xkb->map); xkb->map = NULL; } return; } void XkbFreeServerMap(XkbDescPtr xkb, unsigned what, Bool freeMap) { XkbServerMapPtr map; if ((xkb == NULL) || (xkb->server == NULL)) return; if (freeMap) what = XkbAllServerInfoMask; map = xkb->server; if ((what & XkbExplicitComponentsMask) && (map->explicit != NULL)) { free(map->explicit); map->explicit = NULL; } if (what & XkbKeyActionsMask) { free(map->key_acts); map->key_acts = NULL; if (map->acts != NULL) { free(map->acts); map->num_acts = map->size_acts = 0; map->acts = NULL; } } if ((what & XkbKeyBehaviorsMask) && (map->behaviors != NULL)) { free(map->behaviors); map->behaviors = NULL; } if ((what & XkbVirtualModMapMask) && (map->vmodmap != NULL)) { free(map->vmodmap); map->vmodmap = NULL; } if (freeMap) { free(xkb->server); xkb->server = NULL; } return; } xorg-server-21.1.16/xkb/ddxVT.c0000644000175000017500000000310714757411105011615 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include int XkbDDXSwitchScreen(DeviceIntPtr dev, KeyCode key, XkbAction *act) { return 1; } xorg-server-21.1.16/xkb/ddxPrivate.c0000644000175000017500000000031414757411105012673 #ifdef HAVE_DIX_CONFIG_H #include #endif #include #include "windowstr.h" #include int XkbDDXPrivate(DeviceIntPtr dev, KeyCode key, XkbAction *act) { return 0; } xorg-server-21.1.16/xkb/ddxKillSrv.c0000644000175000017500000000320114757411105012645 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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 #endif #include #include #include #include #include "inputstr.h" #include "scrnintstr.h" #include "windowstr.h" #include int XkbDDXTerminateServer(DeviceIntPtr dev, KeyCode key, XkbAction *act) { if (dev != inputInfo.keyboard) GiveUp(1); return 0; } xorg-server-21.1.16/xkb/xkbDflts.h0000644000175000017500000003455714757411105012367 /* This file generated automatically by xkbcomp */ /* DO NOT EDIT */ #ifdef HAVE_DIX_CONFIG_H #include #endif #ifndef DEFAULT_H #define DEFAULT_H 1 #define GET_ATOM(d,s) MakeAtom(s,strlen(s),1) #define DPYTYPE char * #define NUM_KEYS 1 #define vmod_NumLock 0 #define vmod_Alt 1 #define vmod_LevelThree 2 #define vmod_AltGr 3 #define vmod_ScrollLock 4 #define vmod_NumLockMask (1<<0) #define vmod_AltMask (1<<1) #define vmod_LevelThreeMask (1<<2) #define vmod_AltGrMask (1<<3) #define vmod_ScrollLockMask (1<<4) /* types name is "default" */ static Atom lnames_ONE_LEVEL[1]; static XkbKTMapEntryRec map_TWO_LEVEL[1] = { {1, 1, {ShiftMask, ShiftMask, 0}} }; static Atom lnames_TWO_LEVEL[2]; static XkbKTMapEntryRec map_ALPHABETIC[2] = { {1, 1, {ShiftMask, ShiftMask, 0}}, {1, 0, {LockMask, LockMask, 0}} }; static XkbModsRec preserve_ALPHABETIC[2] = { {0, 0, 0}, {LockMask, LockMask, 0} }; static Atom lnames_ALPHABETIC[2]; static XkbKTMapEntryRec map_KEYPAD[2] = { {1, 1, {ShiftMask, ShiftMask, 0}}, {0, 1, {0, 0, vmod_NumLockMask}} }; static Atom lnames_KEYPAD[2]; static XkbKTMapEntryRec map_PC_BREAK[1] = { {1, 1, {ControlMask, ControlMask, 0}} }; static Atom lnames_PC_BREAK[2]; static XkbKTMapEntryRec map_PC_SYSRQ[1] = { {0, 1, {0, 0, vmod_AltMask}} }; static Atom lnames_PC_SYSRQ[2]; static XkbKTMapEntryRec map_CTRL_ALT[1] = { {0, 1, {ControlMask, ControlMask, vmod_AltMask}} }; static Atom lnames_CTRL_ALT[2]; static XkbKTMapEntryRec map_THREE_LEVEL[3] = { {1, 1, {ShiftMask, ShiftMask, 0}}, {0, 2, {0, 0, vmod_LevelThreeMask}}, {0, 2, {ShiftMask, ShiftMask, vmod_LevelThreeMask}} }; static Atom lnames_THREE_LEVEL[3]; static XkbKTMapEntryRec map_SHIFT_ALT[1] = { {0, 1, {ShiftMask, ShiftMask, vmod_AltMask}} }; static Atom lnames_SHIFT_ALT[2]; static XkbKeyTypeRec dflt_types[] = { { {0, 0, 0}, 1, 0, NULL, NULL, None, lnames_ONE_LEVEL}, { {ShiftMask, ShiftMask, 0}, 2, 1, map_TWO_LEVEL, NULL, None, lnames_TWO_LEVEL}, { {ShiftMask | LockMask, ShiftMask | LockMask, 0}, 2, 2, map_ALPHABETIC, preserve_ALPHABETIC, None, lnames_ALPHABETIC}, { {ShiftMask, ShiftMask, vmod_NumLockMask}, 2, 2, map_KEYPAD, NULL, None, lnames_KEYPAD}, { {ControlMask, ControlMask, 0}, 2, 1, map_PC_BREAK, NULL, None, lnames_PC_BREAK}, { {0, 0, vmod_AltMask}, 2, 1, map_PC_SYSRQ, NULL, None, lnames_PC_SYSRQ}, { {ControlMask, ControlMask, vmod_AltMask}, 2, 1, map_CTRL_ALT, NULL, None, lnames_CTRL_ALT}, { {ShiftMask, ShiftMask, vmod_LevelThreeMask}, 3, 3, map_THREE_LEVEL, NULL, None, lnames_THREE_LEVEL}, { {ShiftMask, ShiftMask, vmod_AltMask}, 2, 1, map_SHIFT_ALT, NULL, None, lnames_SHIFT_ALT} }; #define num_dflt_types ARRAY_SIZE(dflt_types) static void initTypeNames(DPYTYPE dpy) { dflt_types[0].name = GET_ATOM(dpy, "ONE_LEVEL"); lnames_ONE_LEVEL[0] = GET_ATOM(dpy, "Any"); dflt_types[1].name = GET_ATOM(dpy, "TWO_LEVEL"); lnames_TWO_LEVEL[0] = GET_ATOM(dpy, "Base"); lnames_TWO_LEVEL[1] = GET_ATOM(dpy, "Shift"); dflt_types[2].name = GET_ATOM(dpy, "ALPHABETIC"); lnames_ALPHABETIC[0] = GET_ATOM(dpy, "Base"); lnames_ALPHABETIC[1] = GET_ATOM(dpy, "Caps"); dflt_types[3].name = GET_ATOM(dpy, "KEYPAD"); lnames_KEYPAD[0] = GET_ATOM(dpy, "Base"); lnames_KEYPAD[1] = GET_ATOM(dpy, "Number"); dflt_types[4].name = GET_ATOM(dpy, "PC_BREAK"); lnames_PC_BREAK[0] = GET_ATOM(dpy, "Base"); lnames_PC_BREAK[1] = GET_ATOM(dpy, "Control"); dflt_types[5].name = GET_ATOM(dpy, "PC_SYSRQ"); lnames_PC_SYSRQ[0] = GET_ATOM(dpy, "Base"); lnames_PC_SYSRQ[1] = GET_ATOM(dpy, "Alt"); dflt_types[6].name = GET_ATOM(dpy, "CTRL+ALT"); lnames_CTRL_ALT[0] = GET_ATOM(dpy, "Base"); lnames_CTRL_ALT[1] = GET_ATOM(dpy, "Ctrl+Alt"); dflt_types[7].name = GET_ATOM(dpy, "THREE_LEVEL"); lnames_THREE_LEVEL[0] = GET_ATOM(dpy, "Base"); lnames_THREE_LEVEL[1] = GET_ATOM(dpy, "Shift"); lnames_THREE_LEVEL[2] = GET_ATOM(dpy, "Level3"); dflt_types[8].name = GET_ATOM(dpy, "SHIFT+ALT"); lnames_SHIFT_ALT[0] = GET_ATOM(dpy, "Base"); lnames_SHIFT_ALT[1] = GET_ATOM(dpy, "Shift+Alt"); } /* compat name is "default" */ static XkbSymInterpretRec dfltSI[69] = { {XK_ISO_Level2_Latch, 0x0000, XkbSI_LevelOneOnly | XkbSI_Exactly, ShiftMask, 255, {XkbSA_LatchMods, {0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Eisu_Shift, 0x0000, XkbSI_Exactly, LockMask, 255, {XkbSA_NoAction, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Eisu_toggle, 0x0000, XkbSI_Exactly, LockMask, 255, {XkbSA_NoAction, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Kana_Shift, 0x0000, XkbSI_Exactly, LockMask, 255, {XkbSA_NoAction, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Kana_Lock, 0x0000, XkbSI_Exactly, LockMask, 255, {XkbSA_NoAction, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Shift_Lock, 0x0000, XkbSI_AnyOf, ShiftMask | LockMask, 255, {XkbSA_LockMods, {0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Num_Lock, 0x0000, XkbSI_AnyOf, 0xff, 0, {XkbSA_LockMods, {0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}}}, {XK_Alt_L, 0x0000, XkbSI_AnyOf, 0xff, 1, {XkbSA_SetMods, {0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Alt_R, 0x0000, XkbSI_AnyOf, 0xff, 1, {XkbSA_SetMods, {0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Scroll_Lock, 0x0000, XkbSI_AnyOf, 0xff, 4, {XkbSA_LockMods, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Lock, 0x0000, XkbSI_AnyOf, 0xff, 255, {XkbSA_ISOLock, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Level3_Shift, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOf, 0xff, 2, {XkbSA_SetMods, {0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00}}}, {XK_ISO_Level3_Latch, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOf, 0xff, 2, {XkbSA_LatchMods, {0x03, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00}}}, {XK_Mode_switch, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOfOrNone, 0xff, 3, {XkbSA_SetGroup, {0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_1, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_End, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_2, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_Down, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_3, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_Next, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00}}}, {XK_KP_4, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Left, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_6, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Right, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_7, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_Home, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_8, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_Up, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_9, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_Prior, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_MovePtr, {0x00, 0x00, 0x01, 0xff, 0xff, 0x00, 0x00}}}, {XK_KP_5, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Begin, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_F1, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Divide, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_F2, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Multiply, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_F3, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Subtract, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x04, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Separator, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Add, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_0, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Insert, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Decimal, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_KP_Delete, 0x0001, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Button_Dflt, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Button1, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Button2, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Button3, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_DblClick_Dflt, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_DblClick1, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_DblClick2, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_DblClick3, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_PtrBtn, {0x00, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Drag_Dflt, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Drag1, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Drag2, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_Drag3, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockPtrBtn, {0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_EnableKeys, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockControls, {0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00}}}, {XK_Pointer_Accelerate, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockControls, {0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00}}}, {XK_Pointer_DfltBtnNext, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00}}}, {XK_Pointer_DfltBtnPrev, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_SetPtrDflt, {0x00, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00}}}, {XK_AccessX_Enable, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockControls, {0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00}}}, {XK_Terminate_Server, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_Terminate, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Group_Latch, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOfOrNone, 0xff, 3, {XkbSA_LatchGroup, {0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Next_Group, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOfOrNone, 0xff, 3, {XkbSA_LockGroup, {0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Prev_Group, 0x0000, XkbSI_LevelOneOnly | XkbSI_AnyOfOrNone, 0xff, 3, {XkbSA_LockGroup, {0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_First_Group, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockGroup, {0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {XK_ISO_Last_Group, 0x0000, XkbSI_AnyOfOrNone, 0xff, 255, {XkbSA_LockGroup, {0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00}}}, {NoSymbol, 0x0000, XkbSI_Exactly, LockMask, 255, {XkbSA_LockMods, {0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00}}}, {NoSymbol, 0x0000, XkbSI_AnyOf, 0xff, 255, {XkbSA_SetMods, {0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}} }; #define num_dfltSI ARRAY_SIZE(dfltSI) static XkbCompatMapRec compatMap = { dfltSI, { /* group compatibility */ {0, 0, 0}, {0, 0, vmod_AltGrMask}, {0, 0, vmod_AltGrMask}, {0, 0, vmod_AltGrMask} }, num_dfltSI, num_dfltSI }; static void initIndicatorNames(DPYTYPE dpy, XkbDescPtr xkb) { xkb->names->indicators[0] = GET_ATOM(dpy, "Caps Lock"); xkb->names->indicators[1] = GET_ATOM(dpy, "Num Lock"); xkb->names->indicators[2] = GET_ATOM(dpy, "Shift Lock"); xkb->names->indicators[3] = GET_ATOM(dpy, "Mouse Keys"); xkb->names->indicators[4] = GET_ATOM(dpy, "Scroll Lock"); xkb->names->indicators[5] = GET_ATOM(dpy, "Group 2"); } #endif /* DEFAULT_H */ xorg-server-21.1.16/xkb/xkbgeom.h0000644000175000017500000004206514757411105012233 /************************************************************ Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. 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 Silicon Graphics not be used in advertising or publicity pertaining to distribution of the software without specific prior written permission. Silicon Graphics makes no representation about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON GRAPHICS 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. ********************************************************/ #ifndef _XKBGEOM_H_ #define _XKBGEOM_H_ #include "xkbstr.h" #define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias #define XkbAddGeomColor SrvXkbAddGeomColor #define XkbAddGeomDoodad SrvXkbAddGeomDoodad #define XkbAddGeomKey SrvXkbAddGeomKey #define XkbAddGeomOutline SrvXkbAddGeomOutline #define XkbAddGeomOverlay SrvXkbAddGeomOverlay #define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow #define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey #define XkbAddGeomProperty SrvXkbAddGeomProperty #define XkbAddGeomRow SrvXkbAddGeomRow #define XkbAddGeomSection SrvXkbAddGeomSection #define XkbAddGeomShape SrvXkbAddGeomShape #define XkbAllocGeometry SrvXkbAllocGeometry #define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases #define XkbFreeGeomColors SrvXkbFreeGeomColors #define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads #define XkbFreeGeomProperties SrvXkbFreeGeomProperties #define XkbFreeGeomKeys SrvXkbFreeGeomKeys #define XkbFreeGeomRows SrvXkbFreeGeomRows #define XkbFreeGeomSections SrvXkbFreeGeomSections #define XkbFreeGeomPoints SrvXkbFreeGeomPoints #define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines #define XkbFreeGeomShapes SrvXkbFreeGeomShapes #define XkbFreeGeometry SrvXkbFreeGeometry typedef struct _XkbProperty { char *name; char *value; } XkbPropertyRec, *XkbPropertyPtr; typedef struct _XkbColor { unsigned int pixel; char *spec; } XkbColorRec, *XkbColorPtr; typedef struct _XkbPoint { short x; short y; } XkbPointRec, *XkbPointPtr; typedef struct _XkbBounds { short x1, y1; short x2, y2; } XkbBoundsRec, *XkbBoundsPtr; #define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) #define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) typedef struct _XkbOutline { unsigned short num_points; unsigned short sz_points; unsigned short corner_radius; XkbPointPtr points; } XkbOutlineRec, *XkbOutlinePtr; typedef struct _XkbShape { Atom name; unsigned short num_outlines; unsigned short sz_outlines; XkbOutlinePtr outlines; XkbOutlinePtr approx; XkbOutlinePtr primary; XkbBoundsRec bounds; } XkbShapeRec, *XkbShapePtr; #define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) typedef struct _XkbShapeDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short color_ndx; unsigned short shape_ndx; } XkbShapeDoodadRec, *XkbShapeDoodadPtr; #define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) #define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbTextDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; short width; short height; unsigned short color_ndx; char *text; char *font; } XkbTextDoodadRec, *XkbTextDoodadPtr; #define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) typedef struct _XkbIndicatorDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short shape_ndx; unsigned short on_color_ndx; unsigned short off_color_ndx; } XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; #define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) #define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) #define XkbSetIndicatorDoodadOnColor(g,d,c) \ ((d)->on_color_ndx= (c)-&(g)->colors[0]) #define XkbSetIndicatorDoodadOffColor(g,d,c) \ ((d)->off_color_ndx= (c)-&(g)->colors[0]) #define XkbSetIndicatorDoodadShape(g,d,s) \ ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbLogoDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; unsigned short color_ndx; unsigned short shape_ndx; char *logo_name; } XkbLogoDoodadRec, *XkbLogoDoodadPtr; #define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) #define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) #define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) #define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) typedef struct _XkbAnyDoodad { Atom name; unsigned char type; unsigned char priority; short top; short left; short angle; } XkbAnyDoodadRec, *XkbAnyDoodadPtr; typedef union _XkbDoodad { XkbAnyDoodadRec any; XkbShapeDoodadRec shape; XkbTextDoodadRec text; XkbIndicatorDoodadRec indicator; XkbLogoDoodadRec logo; } XkbDoodadRec, *XkbDoodadPtr; #define XkbUnknownDoodad 0 #define XkbOutlineDoodad 1 #define XkbSolidDoodad 2 #define XkbTextDoodad 3 #define XkbIndicatorDoodad 4 #define XkbLogoDoodad 5 typedef struct _XkbKey { XkbKeyNameRec name; short gap; unsigned char shape_ndx; unsigned char color_ndx; } XkbKeyRec, *XkbKeyPtr; #define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) #define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) #define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) #define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) typedef struct _XkbRow { short top; short left; unsigned short num_keys; unsigned short sz_keys; int vertical; XkbKeyPtr keys; XkbBoundsRec bounds; } XkbRowRec, *XkbRowPtr; typedef struct _XkbSection { Atom name; unsigned char priority; short top; short left; unsigned short width; unsigned short height; short angle; unsigned short num_rows; unsigned short num_doodads; unsigned short num_overlays; unsigned short sz_rows; unsigned short sz_doodads; unsigned short sz_overlays; XkbRowPtr rows; XkbDoodadPtr doodads; XkbBoundsRec bounds; struct _XkbOverlay *overlays; } XkbSectionRec, *XkbSectionPtr; typedef struct _XkbOverlayKey { XkbKeyNameRec over; XkbKeyNameRec under; } XkbOverlayKeyRec, *XkbOverlayKeyPtr; typedef struct _XkbOverlayRow { unsigned short row_under; unsigned short num_keys; unsigned short sz_keys; XkbOverlayKeyPtr keys; } XkbOverlayRowRec, *XkbOverlayRowPtr; typedef struct _XkbOverlay { Atom name; XkbSectionPtr section_under; unsigned short num_rows; unsigned short sz_rows; XkbOverlayRowPtr rows; XkbBoundsPtr bounds; } XkbOverlayRec, *XkbOverlayPtr; typedef struct _XkbGeometry { Atom name; unsigned short width_mm; unsigned short height_mm; char *label_font; XkbColorPtr label_color; XkbColorPtr base_color; unsigned short sz_properties; unsigned short sz_colors; unsigned short sz_shapes; unsigned short sz_sections; unsigned short sz_doodads; unsigned short sz_key_aliases; unsigned short num_properties; unsigned short num_colors; unsigned short num_shapes; unsigned short num_sections; unsigned short num_doodads; unsigned short num_key_aliases; XkbPropertyPtr properties; XkbColorPtr colors; XkbShapePtr shapes; XkbSectionPtr sections; XkbDoodadPtr doodads; XkbKeyAliasPtr key_aliases; } XkbGeometryRec; #define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) #define XkbGeomPropertiesMask (1<<0) #define XkbGeomColorsMask (1<<1) #define XkbGeomShapesMask (1<<2) #define XkbGeomSectionsMask (1<<3) #define XkbGeomDoodadsMask (1<<4) #define XkbGeomKeyAliasesMask (1<<5) #define XkbGeomAllMask (0x3f) typedef struct _XkbGeometrySizes { unsigned int which; unsigned short num_properties; unsigned short num_colors; unsigned short num_shapes; unsigned short num_sections; unsigned short num_doodads; unsigned short num_key_aliases; } XkbGeometrySizesRec, *XkbGeometrySizesPtr; /** * Specifies which items should be cleared in an XKB geometry array * when the array is reallocated. */ typedef enum { XKB_GEOM_CLEAR_NONE, /* Don't clear any items, just reallocate. */ XKB_GEOM_CLEAR_EXCESS, /* Clear new extra items after reallocation. */ XKB_GEOM_CLEAR_ALL /* Clear all items after reallocation. */ } XkbGeomClearance; extern XkbPropertyPtr XkbAddGeomProperty(XkbGeometryPtr /* geom */ , char * /* name */ , char * /* value */ ); extern XkbKeyAliasPtr XkbAddGeomKeyAlias(XkbGeometryPtr /* geom */ , char * /* alias */ , char * /* real */ ); extern XkbColorPtr XkbAddGeomColor(XkbGeometryPtr /* geom */ , char * /* spec */ , unsigned int /* pixel */ ); extern XkbOutlinePtr XkbAddGeomOutline(XkbShapePtr /* shape */ , int /* sz_points */ ); extern XkbShapePtr XkbAddGeomShape(XkbGeometryPtr /* geom */ , Atom /* name */ , int /* sz_outlines */ ); extern XkbKeyPtr XkbAddGeomKey(XkbRowPtr /* row */ ); extern XkbRowPtr XkbAddGeomRow(XkbSectionPtr /* section */ , int /* sz_keys */ ); extern XkbSectionPtr XkbAddGeomSection(XkbGeometryPtr /* geom */ , Atom /* name */ , int /* sz_rows */ , int /* sz_doodads */ , int /* sz_overlays */ ); extern XkbOverlayPtr XkbAddGeomOverlay(XkbSectionPtr /* section */ , Atom /* name */ , int /* sz_rows */ ); extern XkbOverlayRowPtr XkbAddGeomOverlayRow(XkbOverlayPtr /* overlay */ , int /* row_under */ , int /* sz_keys */ ); extern XkbOverlayKeyPtr XkbAddGeomOverlayKey(XkbOverlayPtr /* overlay */ , XkbOverlayRowPtr /* row */ , char * /* over */ , char * /* under */ ); extern XkbDoodadPtr XkbAddGeomDoodad(XkbGeometryPtr /* geom */ , XkbSectionPtr /* section */ , Atom /* name */ ); extern void XkbFreeGeomKeyAliases(XkbGeometryPtr /* geom */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomColors(XkbGeometryPtr /* geom */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomDoodads(XkbDoodadPtr /* doodads */ , int /* nDoodads */ , Bool /* freeAll */ ); extern void XkbFreeGeomProperties(XkbGeometryPtr /* geom */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomOverlayKeys(XkbOverlayRowPtr /* row */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomOverlayRows(XkbOverlayPtr /* overlay */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomOverlays(XkbSectionPtr /* section */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomKeys(XkbRowPtr /* row */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomRows(XkbSectionPtr /* section */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomSections(XkbGeometryPtr /* geom */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomPoints(XkbOutlinePtr /* outline */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomOutlines(XkbShapePtr /* shape */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeomShapes(XkbGeometryPtr /* geom */ , int /* first */ , int /* count */ , Bool /* freeAll */ ); extern void XkbFreeGeometry(XkbGeometryPtr /* geom */ , unsigned int /* which */ , Bool /* freeMap */ ); extern Bool XkbGeomRealloc(void ** /* buffer */ , int /* szItems */ , int /* nrItems */ , int /* itemSize */ , XkbGeomClearance /* clearance */ ); extern Status XkbAllocGeomProps(XkbGeometryPtr /* geom */ , int /* nProps */ ); extern Status XkbAllocGeomKeyAliases(XkbGeometryPtr /* geom */ , int /* nAliases */ ); extern Status XkbAllocGeomColors(XkbGeometryPtr /* geom */ , int /* nColors */ ); extern Status XkbAllocGeomShapes(XkbGeometryPtr /* geom */ , int /* nShapes */ ); extern Status XkbAllocGeomSections(XkbGeometryPtr /* geom */ , int /* nSections */ ); extern Status XkbAllocGeomOverlays(XkbSectionPtr /* section */ , int /* num_needed */ ); extern Status XkbAllocGeomOverlayRows(XkbOverlayPtr /* overlay */ , int /* num_needed */ ); extern Status XkbAllocGeomOverlayKeys(XkbOverlayRowPtr /* row */ , int /* num_needed */ ); extern Status XkbAllocGeomDoodads(XkbGeometryPtr /* geom */ , int /* nDoodads */ ); extern Status XkbAllocGeomSectionDoodads(XkbSectionPtr /* section */ , int /* nDoodads */ ); extern Status XkbAllocGeomOutlines(XkbShapePtr /* shape */ , int /* nOL */ ); extern Status XkbAllocGeomRows(XkbSectionPtr /* section */ , int /* nRows */ ); extern Status XkbAllocGeomPoints(XkbOutlinePtr /* ol */ , int /* nPts */ ); extern Status XkbAllocGeomKeys(XkbRowPtr /* row */ , int /* nKeys */ ); extern Status XkbAllocGeometry(XkbDescPtr /* xkb */ , XkbGeometrySizesPtr /* sizes */ ); extern Bool XkbComputeShapeTop(XkbShapePtr /* shape */ , XkbBoundsPtr /* bounds */ ); extern Bool XkbComputeShapeBounds(XkbShapePtr /* shape */ ); extern Bool XkbComputeRowBounds(XkbGeometryPtr /* geom */ , XkbSectionPtr /* section */ , XkbRowPtr /* row */ ); extern Bool XkbComputeSectionBounds(XkbGeometryPtr /* geom */ , XkbSectionPtr /* section */ ); extern char *XkbFindOverlayForKey(XkbGeometryPtr /* geom */ , XkbSectionPtr /* wanted */ , char * /* under */ ); #endif /* _XKBGEOM_H_ */ xorg-server-21.1.16/xkb/xkb.h0000644000175000017500000000247014757411105011357 #ifndef _XKB_H #define _XKB_H extern int ProcXkbUseExtension(ClientPtr client); extern int ProcXkbSelectEvents(ClientPtr client); extern int ProcXkbBell(ClientPtr client); extern int ProcXkbGetState(ClientPtr client); extern int ProcXkbLatchLockState(ClientPtr client); extern int ProcXkbGetControls(ClientPtr client); extern int ProcXkbSetControls(ClientPtr client); extern int ProcXkbGetMap(ClientPtr client); extern int ProcXkbSetMap(ClientPtr client); extern int ProcXkbGetCompatMap(ClientPtr client); extern int ProcXkbSetCompatMap(ClientPtr client); extern int ProcXkbGetIndicatorState(ClientPtr client); extern int ProcXkbGetIndicatorMap(ClientPtr client); extern int ProcXkbSetIndicatorMap(ClientPtr client); extern int ProcXkbGetNamedIndicator(ClientPtr client); extern int ProcXkbSetNamedIndicator(ClientPtr client); extern int ProcXkbGetNames(ClientPtr client); extern int ProcXkbSetNames(ClientPtr client); extern int ProcXkbGetGeometry(ClientPtr client); extern int ProcXkbSetGeometry(ClientPtr client); extern int ProcXkbPerClientFlags(ClientPtr client); extern int ProcXkbListComponents(ClientPtr client); extern int ProcXkbGetKbdByName(ClientPtr client); extern int ProcXkbGetDeviceInfo(ClientPtr client); extern int ProcXkbSetDeviceInfo(ClientPtr client); extern int ProcXkbSetDebuggingFlags(ClientPtr client); #endif xorg-server-21.1.16/Makefile.am0000644000175000017500000000771614757411105011702 AUTOMAKE_OPTIONS=nostdinc # Required for automake < 1.14 ACLOCAL_AMFLAGS = -I m4 if COMPOSITE COMPOSITE_DIR=composite endif if GLX GLX_DIR=glx endif if DBE DBE_DIR=dbe endif if RECORD RECORD_DIR=record endif if DRI3 DRI3_DIR=dri3 endif if PRESENT PRESENT_DIR=present endif if PSEUDORAMIX PSEUDORAMIX_DIR=pseudoramiX endif if GLAMOR GLAMOR_DIR=glamor endif SUBDIRS = \ doc \ man \ include \ dix \ fb \ mi \ Xext \ miext \ os \ randr \ render \ Xi \ xkb \ $(PSEUDORAMIX_DIR) \ $(DBE_DIR) \ $(RECORD_DIR) \ xfixes \ damageext \ $(COMPOSITE_DIR) \ $(GLX_DIR) \ $(PRESENT_DIR) \ $(DRI3_DIR) \ exa \ $(GLAMOR_DIR) \ config \ hw \ test if XORG aclocaldir = $(datadir)/aclocal aclocal_DATA = xorg-server.m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xorg-server.pc endif EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh README.md DISTCHECK_CONFIGURE_FLAGS=\ --with-xkb-path=$(XKB_BASE_DIRECTORY) \ --with-xkb-bin-directory=$(XKB_BIN_DIRECTORY) \ --with-xkb-output='$${datadir}/X11/xkb/compiled' .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL DIST_SUBDIRS = \ doc \ man \ include \ dix \ fb \ mi \ Xext \ miext \ os \ pseudoramiX \ randr \ render \ Xi \ xkb \ dbe \ record \ xfixes \ damageext \ composite \ glx \ exa \ glamor \ config \ dri3 \ present \ hw \ test # gross hack relink: all $(AM_V_at)$(MAKE) -C hw relink install-headers: Makefile +find . -name Makefile | while read m; do \ if grep -q install-sdkHEADERS $$m; then \ (cd `dirname "$$m"` && make install-sdkHEADERS) \ fi \ done distcheck-hook: cd $(srcdir) && \ meson setup _distcheck_build && \ meson configure _distcheck_build && \ ninja -C _distcheck_build && \ rm -rf _distcheck_build && \ cd - EXTRA_DIST += \ meson_options.txt \ include/xorg-config.h.meson.in \ include/xwin-config.h.meson.in \ hw/xfree86/loader/symbol-test.c \ composite/meson.build \ config/meson.build \ damageext/meson.build \ dbe/meson.build \ dix/meson.build \ doc/dtrace/meson.build \ doc/meson.build \ dri3/meson.build \ exa/meson.build \ fb/meson.build \ glamor/meson.build \ glx/meson.build \ hw/kdrive/ephyr/meson.build \ hw/kdrive/meson.build \ hw/kdrive/src/meson.build \ hw/meson.build \ hw/vfb/meson.build \ hw/xfree86/common/meson.build \ hw/xfree86/ddc/meson.build \ hw/xfree86/dixmods/meson.build \ hw/xfree86/doc/meson.build \ hw/xfree86/dri2/meson.build \ hw/xfree86/dri/meson.build \ hw/xfree86/drivers/inputtest/meson.build \ hw/xfree86/drivers/modesetting/meson.build \ hw/xfree86/exa/meson.build \ hw/xfree86/fbdevhw/meson.build \ hw/xfree86/glamor_egl/meson.build \ hw/xfree86/i2c/meson.build \ hw/xfree86/int10/meson.build \ hw/xfree86/loader/meson.build \ hw/xfree86/meson.build \ hw/xfree86/modes/meson.build \ hw/xfree86/os-support/meson.build \ hw/xfree86/parser/meson.build \ hw/xfree86/ramdac/meson.build \ hw/xfree86/shadowfb/meson.build \ hw/xfree86/vgahw/meson.build \ hw/xfree86/x86emu/meson.build \ hw/xfree86/xkb/meson.build \ hw/xnest/meson.build \ hw/xquartz/bundle/meson.build \ hw/xquartz/GL/meson.build \ hw/xquartz/mach-startup/meson.build \ hw/xquartz/meson.build \ hw/xquartz/pbproxy/meson.build \ hw/xquartz/xpr/meson.build \ hw/xwin/dri/meson.build \ hw/xwin/glx/meson.build \ hw/xwin/meson.build \ hw/xwin/winclipboard/meson.build \ include/meson.build \ meson.build \ miext/damage/meson.build \ miext/rootless/meson.build \ miext/shadow/meson.build \ miext/sync/meson.build \ mi/meson.build \ os/meson.build \ present/meson.build \ pseudoramiX/meson.build \ randr/meson.build \ record/meson.build \ render/meson.build \ test/bigreq/meson.build \ test/bigreq/request-length.c \ test/damage/meson.build \ test/damage/primitives.c \ test/meson.build \ test/sync/meson.build \ test/sync/sync.c \ Xext/meson.build \ xfixes/meson.build \ Xi/meson.build \ xkb/meson.build DISTCLEANFILES = buildDateTime.h xorg-server-21.1.16/configure0000755000175000017500000403311014757411114011544 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.72 for xorg-server 21.1.16. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case e in #( e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else case e in #( e) exitcode=1; echo positional parameters were not saved. ;; esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else case e in #( e) as_have_required=no ;; esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi ;; esac fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: https://gitlab.freedesktop.org/xorg/xserver/issues $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi ;; esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' t clear :clear s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated as_awk_strverscmp=' # Use only awk features that work with 7th edition Unix awk (1978). # My, what an old awk you have, Mr. Solaris! END { while (length(v1) && length(v2)) { # Set d1 to be the next thing to compare from v1, and likewise for d2. # Normally this is a single character, but if v1 and v2 contain digits, # compare them as integers and fractions as strverscmp does. if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) { # Split v1 and v2 into their leading digit string components d1 and d2, # and advance v1 and v2 past the leading digit strings. for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1) d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1) if (d1 ~ /^0/) { if (d2 ~ /^0/) { # Compare two fractions. while (d1 ~ /^0/ && d2 ~ /^0/) { d1 = substr(d1, 2); len1-- d2 = substr(d2, 2); len2-- } if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) { # The two components differ in length, and the common prefix # contains only leading zeros. Consider the longer to be less. d1 = -len1 d2 = -len2 } else { # Otherwise, compare as strings. d1 = "x" d1 d2 = "x" d2 } } else { # A fraction is less than an integer. exit 1 } } else { if (d2 ~ /^0/) { # An integer is greater than a fraction. exit 2 } else { # Compare two integers. d1 += 0 d2 += 0 } } } else { # The normal case, without worrying about digits. d1 = substr(v1, 1, 1); v1 = substr(v1, 2) d2 = substr(v2, 1, 1); v2 = substr(v2, 2) } if (d1 < d2) exit 1 if (d1 > d2) exit 2 } # Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10), # which mishandles some comparisons of empty strings to integers. if (length(v2)) exit 1 if (length(v1)) exit 2 } ' SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' PACKAGE_VERSION='21.1.16' PACKAGE_STRING='xorg-server 21.1.16' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/xorg/xserver/issues' PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_config_libobj_dir=os enable_year2038=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS DIX_CFLAGS RELEASE_DATE SYSCONFDIR PROJECTROOT XEPHYR_FALSE XEPHYR_TRUE KDRIVE_LIBS KDRIVE_LOCAL_LIBS KDRIVE_MAIN_LIB KDRIVE_PURE_LIBS KDRIVE_CFLAGS KDRIVE_PURE_INCS KDRIVE_INCS XEPHYR_INCS XEPHYR_LIBS XEPHYR_CFLAGS KDRIVE_FALSE KDRIVE_TRUE STANDALONE_XPBPROXY_FALSE STANDALONE_XPBPROXY_TRUE XQUARTZ_SPARKLE_FALSE XQUARTZ_SPARKLE_TRUE XQUARTZ_FALSE XQUARTZ_TRUE am__fastdepOBJC_FALSE am__fastdepOBJC_TRUE OBJCDEPMODE OBJCFLAGS OBJCLINK OBJCCLD OBJC PSEUDORAMIX_FALSE PSEUDORAMIX_TRUE XPBPROXY_LIBS XPBPROXY_CFLAGS XQUARTZ_LIBS XWIN_WINDOWS_DRI_FALSE XWIN_WINDOWS_DRI_TRUE XWIN_GLX_WINDOWS_FALSE XWIN_GLX_WINDOWS_TRUE XWIN_FALSE XWIN_TRUE KHRONOS_SPEC_DIR KHRONOS_OPENGL_REGISTRY_LIBS KHRONOS_OPENGL_REGISTRY_CFLAGS PYTHON3 XWIN_SYS_LIBS XWIN_SERVER_NAME XWIN_LIBS WINDOWSDRI_LIBS WINDOWSDRI_CFLAGS XWINMODULES_LIBS XWINMODULES_CFLAGS WINDRES GLAMOR_EGL_FALSE GLAMOR_EGL_TRUE GBM_LIBS GBM_CFLAGS GLAMOR_LIBS GLAMOR_CFLAGS GLAMOR_FALSE GLAMOR_TRUE XORG_DRIVER_INPUT_INPUTTEST_FALSE XORG_DRIVER_INPUT_INPUTTEST_TRUE XORG_DRIVER_MODESETTING_FALSE XORG_DRIVER_MODESETTING_TRUE XORG_BUS_PLATFORM_FALSE XORG_BUS_PLATFORM_TRUE DGA_FALSE DGA_TRUE SOLARIS_VT_FALSE SOLARIS_VT_TRUE LNXAPM_FALSE LNXAPM_TRUE LNXACPI_FALSE LNXACPI_TRUE XORG_BUS_SPARC_FALSE XORG_BUS_SPARC_TRUE XORG_BUS_BSDPCI_FALSE XORG_BUS_BSDPCI_TRUE XORG_BUS_PCI_FALSE XORG_BUS_PCI_TRUE XORG_FALSE XORG_TRUE abi_extension abi_xinput abi_videodrv abi_ansic logdir sysconfigdir extdir sdkdir driverdir moduledir DEFAULT_XDG_DATA_HOME_LOGDIR DEFAULT_XDG_DATA_HOME DEFAULT_LOGPREFIX DEFAULT_LOGDIR DEFAULT_LIBRARY_PATH DEFAULT_MODULE_PATH XCONFIGDIR XF86CONFIGFILE XCONFIGFILE XF86CONFIGDIR XORG_CFLAGS XORG_OS_SUBDIR XORG_INCS XORG_SYS_LIBS XORG_LIBS XORG_MODULES_LIBS XORG_MODULES_CFLAGS DGA_LIBS DGA_CFLAGS SOLARIS_INOUT_ARCH PCI_TXT_IDS_PATH PCIACCESS_LIBS PCIACCESS_CFLAGS symbol_visibility LIBXCVT_LIBS LIBXCVT_CFLAGS XNEST_SYS_LIBS XNEST_LIBS XNEST_FALSE XNEST_TRUE XNESTMODULES_LIBS XNESTMODULES_CFLAGS XVFB_SYS_LIBS XVFB_LIBS XVFB_FALSE XVFB_TRUE NO_UNDEFINED_FALSE NO_UNDEFINED_TRUE CYGWIN_FALSE CYGWIN_TRUE XORG_DRIVER_LIBS LD_NO_UNDEFINED_FLAG LD_EXPORT_SYMBOLS_FLAG UTILS_SYS_LIBS XSERVER_SYS_LIBS XSERVER_LIBS HAVE_LIBUNWIND_FALSE HAVE_LIBUNWIND_TRUE LIBUNWIND_LIBS LIBUNWIND_CFLAGS XSERVERLIBS_LIBS XSERVERLIBS_CFLAGS XSERVERCFLAGS_LIBS XSERVERCFLAGS_CFLAGS SHA1_CFLAGS SHA1_LIBS OPENSSL_LIBS OPENSSL_CFLAGS LIBSHA1_LIBS LIBSHA1_CFLAGS MAIN_LIB OS_LIB DIX_LIB DEBUG_FALSE DEBUG_TRUE VENDOR_NAME_SHORT DRI_DRIVER_PATH BASE_FONT_PATH SERVER_MISC_CONFIG_PATH COMPILEDDEFAULTFONTPATH XF86VIDMODE_FALSE XF86VIDMODE_TRUE XDMAUTH_FALSE XDMAUTH_TRUE XDMCP_FALSE XDMCP_TRUE XDMCP_LIBS XDMCP_CFLAGS XKB_DFLT_OPTIONS XKB_DFLT_VARIANT XKB_DFLT_LAYOUT XKB_DFLT_MODEL XKB_DFLT_RULES XKB_COMPILED_DIR XKM_OUTPUT_DIR XKB_BIN_DIRECTORY XKB_BASE_DIRECTORY INT10MODULE_FALSE INT10MODULE_TRUE VGAHW_FALSE VGAHW_TRUE XF86UTILS_FALSE XF86UTILS_TRUE DPMSExtension_FALSE DPMSExtension_TRUE XF86BIGFONT_FALSE XF86BIGFONT_TRUE DBE_FALSE DBE_TRUE XCSECURITY_FALSE XCSECURITY_TRUE SELINUX_LIBS SELINUX_CFLAGS XSELINUX_FALSE XSELINUX_TRUE XACE_FALSE XACE_TRUE XINERAMA_FALSE XINERAMA_TRUE PRESENT_FALSE PRESENT_TRUE GLX_SYS_LIBS GLX_DEFINES HASHTABLE_FALSE HASHTABLE_TRUE GLX_FALSE GLX_TRUE GL_LIBS GL_CFLAGS XLIB_LIBS XLIB_CFLAGS LIBDRM_LIBS LIBDRM_CFLAGS DRI3_FALSE DRI3_TRUE XSHMFENCE_FALSE XSHMFENCE_TRUE XSHMFENCE_LIBS XSHMFENCE_CFLAGS BUSFAULT_FALSE BUSFAULT_TRUE DRI3PROTO_LIBS DRI3PROTO_CFLAGS DRI2_FALSE DRI2_TRUE DRI2PROTO_LIBS DRI2PROTO_CFLAGS DRI_FALSE DRI_TRUE CLIENTIDS_FALSE CLIENTIDS_TRUE RES_FALSE RES_TRUE SCREENSAVER_FALSE SCREENSAVER_TRUE RECORD_FALSE RECORD_TRUE MITSHM_FALSE MITSHM_TRUE COMPOSITE_FALSE COMPOSITE_TRUE XVMC_FALSE XVMC_TRUE XV_FALSE XV_TRUE CONFIG_WSCONS_FALSE CONFIG_WSCONS_TRUE NEED_DBUS_FALSE NEED_DBUS_TRUE SUID_WRAPPER_FALSE SUID_WRAPPER_TRUE SUID_WRAPPER_DIR SYSTEMD_LOGIND_FALSE SYSTEMD_LOGIND_TRUE CONFIG_HAL_FALSE CONFIG_HAL_TRUE HAL_LIBS HAL_CFLAGS HAVE_DBUS_FALSE HAVE_DBUS_TRUE DBUS_LIBS DBUS_CFLAGS CONFIG_UDEV_KMS_FALSE CONFIG_UDEV_KMS_TRUE CONFIG_UDEV_FALSE CONFIG_UDEV_TRUE UDEV_LIBS UDEV_CFLAGS HAVE_SYSTEMD_DAEMON_FALSE HAVE_SYSTEMD_DAEMON_TRUE SYSTEMD_DAEMON_LIBS SYSTEMD_DAEMON_CFLAGS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC ax_pthread_config SDK_REQUIRED_MODULES PIXMAN_LIBS PIXMAN_CFLAGS INT10_STUB_FALSE INT10_STUB_TRUE INT10_X86EMU_FALSE INT10_X86EMU_TRUE INT10_VM86_FALSE INT10_VM86_TRUE SECURE_RPC_FALSE SECURE_RPC_TRUE INSTALL_SETUID_FALSE INSTALL_SETUID_TRUE XQUARTZ_SPARKLE_FEED_URL XQUARTZ_SPARKLE BUNDLE_VERSION_STRING BUNDLE_VERSION BUNDLE_ID_PREFIX APPLE_APPLICATION_NAME APPLE_APPLICATIONS_DIR FONT100DPIDIR FONT75DPIDIR FONTTYPE1DIR FONTTTFDIR FONTOTFDIR FONTMISCDIR FONTROOTDIR SPARC64_VIDEO_FALSE SPARC64_VIDEO_TRUE PPC_VIDEO_FALSE PPC_VIDEO_TRUE I386_VIDEO_FALSE I386_VIDEO_TRUE ARM_VIDEO_FALSE ARM_VIDEO_TRUE ALPHA_VIDEO_FALSE ALPHA_VIDEO_TRUE GLX_ARCH_DEFINES FREEBSD_KLDLOAD_FALSE FREEBSD_KLDLOAD_TRUE FBDEVHW_FALSE FBDEVHW_TRUE AGP_FALSE AGP_TRUE LIBBSD_LIBS LIBBSD_CFLAGS POLL_FALSE POLL_TRUE LIBOBJS DLOPEN_LIBS SPECIAL_DTRACE_OBJECTS_FALSE SPECIAL_DTRACE_OBJECTS_TRUE XSERVER_DTRACE_FALSE XSERVER_DTRACE_TRUE DTRACE TRADITIONALCPPFLAGS RAWCPPFLAGS RAWCPP CPP YFLAGS YACC LEXLIB LEX_OUTPUT_ROOT LEX LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR FILECMD NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP LIBTOOL OBJDUMP DLLTOOL AS LN_S am__fastdepCCAS_FALSE am__fastdepCCAS_TRUE CCASDEPMODE CCASFLAGS CCAS HAVE_LD_WRAP_FALSE HAVE_LD_WRAP_TRUE ENABLE_UNIT_TESTS_FALSE ENABLE_UNIT_TESTS_TRUE XORG_MALLOC_DEBUG_ENV HAVE_XSLTPROC_FALSE HAVE_XSLTPROC_TRUE XSLTPROC HAVE_FOP_FALSE HAVE_FOP_TRUE FOP HAVE_XMLTO_FALSE HAVE_XMLTO_TRUE HAVE_XMLTO_TEXT_FALSE HAVE_XMLTO_TEXT_TRUE XMLTO ENABLE_DEVEL_DOCS_FALSE ENABLE_DEVEL_DOCS_TRUE ENABLE_DOCS_FALSE ENABLE_DOCS_TRUE HAVE_STYLESHEETS_FALSE HAVE_STYLESHEETS_TRUE XSL_STYLESHEET STYLESHEET_SRCDIR XORG_SGML_PATH HAVE_DOXYGEN_FALSE HAVE_DOXYGEN_TRUE HAVE_DOT_FALSE HAVE_DOT_TRUE HAVE_DOT DOT DOXYGEN MAN_SUBSTS XORG_MAN_PAGE ADMIN_MAN_DIR DRIVER_MAN_DIR MISC_MAN_DIR FILE_MAN_DIR LIB_MAN_DIR APP_MAN_DIR ADMIN_MAN_SUFFIX DRIVER_MAN_SUFFIX MISC_MAN_SUFFIX FILE_MAN_SUFFIX LIB_MAN_SUFFIX APP_MAN_SUFFIX SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build INSTALL_CMD PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG CHANGELOG_CMD STRICT_CFLAGS CWARNFLAGS BASE_CFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V CSCOPE ETAGS CTAGS am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_selective_werror enable_strict_compilation with_doxygen enable_docs enable_devel_docs with_xmlto with_fop with_xsltproc enable_unit_tests enable_static enable_shared with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile with_dtrace enable_agp enable_werror enable_debug with_int10 with_vendor_name with_vendor_name_short with_vendor_web with_module_dir with_log_dir with_builder_addr with_builderstring enable_listen_tcp enable_listen_unix enable_listen_local with_fallback_input_driver with_fontrootdir with_fontmiscdir with_fontotfdir with_fontttfdir with_fonttype1dir with_font75dpidir with_font100dpidir with_default_font_path with_xkb_path with_xkb_output with_default_xkb_rules with_default_xkb_model with_default_xkb_layout with_default_xkb_variant with_default_xkb_options with_serverconfig_path with_apple_applications_dir with_apple_application_name with_bundle_id_prefix with_bundle_version with_bundle_version_string enable_sparkle with_sparkle_feed_url enable_visibility with_khronos_spec_dir enable_composite enable_mitshm enable_xres enable_record enable_xv enable_xvmc enable_dga enable_screensaver enable_xdmcp enable_xdm_auth_1 enable_glx enable_dri enable_dri2 enable_dri3 enable_present enable_xinerama enable_xf86vidmode enable_xace enable_xselinux enable_xcsecurity enable_dbe enable_xf86bigfont enable_dpms enable_config_udev enable_config_udev_kms enable_config_hal enable_config_wscons enable_xfree86_utils enable_vgahw enable_int10_module enable_windowsdri enable_libdrm enable_clientids enable_pciaccess enable_linux_acpi enable_linux_apm enable_systemd_logind enable_suid_wrapper enable_xorg enable_xvfb enable_xnest enable_xquartz enable_standalone_xpbproxy enable_xwin enable_glamor enable_xf86_input_inputtest enable_kdrive enable_xephyr enable_libunwind enable_xshmfence enable_install_setuid enable_unix_transport enable_tcp_transport enable_ipv6 enable_local_transport enable_secure_rpc enable_input_thread with_systemd_daemon enable_xtrans_send_fds with_xkb_bin_directory with_sha1 enable_year2038 ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR DOXYGEN DOT XMLTO FOP XSLTPROC XORG_MALLOC_DEBUG_ENV CCAS CCASFLAGS LT_SYS_LIBRARY_PATH YACC YFLAGS CPP LIBBSD_CFLAGS LIBBSD_LIBS PIXMAN_CFLAGS PIXMAN_LIBS SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS UDEV_CFLAGS UDEV_LIBS DBUS_CFLAGS DBUS_LIBS HAL_CFLAGS HAL_LIBS DRI2PROTO_CFLAGS DRI2PROTO_LIBS DRI3PROTO_CFLAGS DRI3PROTO_LIBS XSHMFENCE_CFLAGS XSHMFENCE_LIBS LIBDRM_CFLAGS LIBDRM_LIBS XLIB_CFLAGS XLIB_LIBS GL_CFLAGS GL_LIBS SELINUX_CFLAGS SELINUX_LIBS XDMCP_CFLAGS XDMCP_LIBS LIBSHA1_CFLAGS LIBSHA1_LIBS OPENSSL_CFLAGS OPENSSL_LIBS XSERVERCFLAGS_CFLAGS XSERVERCFLAGS_LIBS XSERVERLIBS_CFLAGS XSERVERLIBS_LIBS LIBUNWIND_CFLAGS LIBUNWIND_LIBS XNESTMODULES_CFLAGS XNESTMODULES_LIBS LIBXCVT_CFLAGS LIBXCVT_LIBS PCIACCESS_CFLAGS PCIACCESS_LIBS DGA_CFLAGS DGA_LIBS XORG_MODULES_CFLAGS XORG_MODULES_LIBS GLAMOR_CFLAGS GLAMOR_LIBS GBM_CFLAGS GBM_LIBS XWINMODULES_CFLAGS XWINMODULES_LIBS WINDOWSDRI_CFLAGS WINDOWSDRI_LIBS KHRONOS_OPENGL_REGISTRY_CFLAGS KHRONOS_OPENGL_REGISTRY_LIBS XPBPROXY_CFLAGS XPBPROXY_LIBS XEPHYR_CFLAGS XEPHYR_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: '$ac_option' Try '$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF 'configure' configures xorg-server 21.1.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, 'make install' will install all the files in '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify an installation prefix other than '$ac_default_prefix' using '--prefix', for instance '--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/xorg-server] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of xorg-server 21.1.16:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-selective-werror Turn off selective compiler errors. (default: enabled) --enable-strict-compilation Enable all warnings from compiler and make them errors (default: disabled) --enable-docs Enable building the documentation (default: yes) --enable-devel-docs Enable building the developer documentation (default: yes) --enable-unit-tests Enable building unit test cases (default: auto) --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-agp Enable AGP support (default: auto) --enable-werror Obsolete - use --enable-strict-compilation instead --enable-debug Enable debugging (default: disabled) --enable-listen-tcp Listen on TCP by default (default:disabled) --disable-listen-unix Listen on Unix by default (default:enabled) --disable-listen-local Listen on local by default (default:enabled) --enable-sparkle Enable updating of X11.app using the Sparkle Framework (default: disabled) --enable-visibility Enable symbol visibility (default: auto) --disable-composite Build Composite extension (default: enabled) --disable-mitshm Build SHM extension (default: auto) --disable-xres Build XRes extension (default: enabled) --disable-record Build Record extension (default: enabled) --disable-xv Build Xv extension (default: enabled) --disable-xvmc Build XvMC extension (default: enabled) --disable-dga Build DGA extension (default: auto) --disable-screensaver Build ScreenSaver extension (default: enabled) --disable-xdmcp Build XDMCP extension (default: auto) --disable-xdm-auth-1 Build XDM-Auth-1 extension (default: auto) --disable-glx Build GLX extension (default: enabled) --enable-dri Build DRI extension (default: auto) --enable-dri2 Build DRI2 extension (default: auto) --enable-dri3 Build DRI3 extension (default: auto) --disable-present Build Present extension (default: enabled) --disable-xinerama Build Xinerama extension (default: enabled) --disable-xf86vidmode Build XF86VidMode extension (default: auto) --disable-xace Build X-ACE extension (default: enabled) --enable-xselinux Build SELinux extension (default: disabled) --enable-xcsecurity Build Security extension (default: disabled) --disable-dbe Build DBE extension (default: enabled) --enable-xf86bigfont Build XF86 Big Font extension (default: disabled) --disable-dpms Build DPMS extension (default: enabled) --enable-config-udev Build udev support (default: auto) --enable-config-udev-kms Build udev kms support (default: auto) --disable-config-hal Build HAL support (default: auto) --enable-config-wscons Build wscons config support (default: auto) --enable-xfree86-utils Build xfree86 DDX utilities (default: enabled) --enable-vgahw Build Xorg with vga access (default: enabled) --enable-int10-module Build Xorg with int10 module (default: enabled) --enable-windowsdri Build XWin with WindowsDRI extension (default: auto) --enable-libdrm Build Xorg with libdrm support (default: enabled) --disable-clientids Build Xorg with client ID tracking (default: enabled) --enable-pciaccess Build Xorg with pciaccess library (default: enabled) --disable-linux-acpi Disable building ACPI support on Linux (if available). --disable-linux-apm Disable building APM support on Linux (if available). --enable-systemd-logind Build systemd-logind support (default: auto) --enable-suid-wrapper Build suid-root wrapper for legacy driver support on rootless xserver systems (default: no) --enable-xorg Build Xorg server (default: auto) --enable-xvfb Build Xvfb server (default: yes) --enable-xnest Build Xnest server (default: auto) --enable-xquartz Build Xquartz server for OS-X (default: auto) --enable-standalone-xpbproxy Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no) --enable-xwin Build XWin server (default: auto) --enable-glamor Build glamor dix module (default: auto) --enable-xf86-input-inputtest Build Xorg test input driver (default: yes) --enable-kdrive Build kdrive servers (default: no) --enable-xephyr Build the kdrive Xephyr server (default: auto) --enable-libunwind Use libunwind for backtracing (default: auto) --disable-xshmfence Disable xshmfence (default: auto) --enable-install-setuid Install Xorg server as owned by root with setuid bit (default: auto) --enable-unix-transport Enable UNIX domain socket transport --enable-tcp-transport Enable TCP socket transport --enable-ipv6 Enable IPv6 support --enable-local-transport Enable os-specific local transport --enable-secure-rpc Enable Secure RPC --enable-input-thread Enable input threads --disable-xtrans-send-fds Use Xtrans support for fd passing (default: auto) --enable-year2038 support timestamps after 2038 Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-doxygen Use doxygen to regenerate documentation (default: auto) --with-xmlto Use xmlto to regenerate documentation (default: auto) --with-fop Use fop to regenerate documentation (default: auto) --with-xsltproc Use xsltproc for the transformation of XML documents (default: auto) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-dtrace=PATH Enable dtrace probes (default: enabled if dtrace found) --with-int10=BACKEND int10 backend: vm86, x86emu or stub --with-vendor-name=VENDOR Vendor string reported by the server --with-vendor-name-short=VENDOR Short version of vendor string reported by the server --with-vendor-web=URL Vendor web address reported by the server --with-module-dir=DIR Directory where modules are installed (default: $libdir/xorg/modules) --with-log-dir=DIR Directory where log files are kept (default: $localstatedir/log) --with-builder-addr=ADDRESS Builder address (default: xorg@lists.freedesktop.org) --with-builderstring=BUILDERSTRING Additional builder string --with-fallback-input-driver=$FALLBACK_INPUT_DRIVER Input driver fallback if the requested driver for a device is unavailable --with-fontrootdir=DIR Path to root directory for font files --with-fontmiscdir=DIR Path to misc files [FONTROOTDIR/misc] --with-fontotfdir=DIR Path to OTF files [FONTROOTDIR/OTF] --with-fontttfdir=DIR Path to TTF files [FONTROOTDIR/TTF] --with-fonttype1dir=DIR Path to Type1 files [FONTROOTDIR/Type1] --with-font75dpidir=DIR Path to 75dpi files [FONTROOTDIR/75dpi] --with-font100dpidir=DIR Path to 100dpi files [FONTROOTDIR/100dpi] --with-default-font-path=PATH Comma separated list of font dirs --with-xkb-path=PATH Path to XKB base dir (default: auto) --with-xkb-output=PATH Path to XKB output dir (default: ${datadir}/X11/xkb/compiled) --with-default-xkb-rules=RULES Keyboard ruleset (default: base/evdev) --with-default-xkb-model=MODEL Keyboard model (default: pc105) --with-default-xkb-layout=LAYOUT Keyboard layout (default: us) --with-default-xkb-variant=VARIANT Keyboard variant (default: (none)) --with-default-xkb-options=OPTIONS Keyboard layout options (default: (none)) --with-serverconfig-path=PATH Directory where ancillary server config files are installed (default: ${libdir}/xorg) --with-apple-applications-dir=PATH Path to the Applications directory (default: /Applications/Utilities) --with-apple-application-name=NAME Name for the .app (default: X11) --with-bundle-id-prefix=RDNS_PREFIX Prefix to use for bundle identifiers (default: org.x) --with-bundle-version=VERSION Version to use for X11.app's CFBundleVersion (default: 21.1.16) --with-bundle-version-string=VERSION Version to use for X11.app's CFBundleShortVersionString (default: 21.1.16) --with-sparkle-feed-url=URL URL for the Sparkle feed (default: https://www.xquartz.org/releases/sparkle/release.xml) --with-khronos-spec-dir=PATH Path to Khronos OpenGL registry database files (default: auto) --with-systemd-daemon support systemd socket activation (default: auto) --with-xkb-bin-directory=DIR Directory containing xkbcomp program (default: auto) --with-sha1=libc|libmd|libnettle|nettlestatic|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI choose SHA1 implementation Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path DOXYGEN Path to doxygen command DOT Path to the dot graphics utility XMLTO Path to xmlto command FOP Path to fop command XSLTPROC Path to xsltproc command XORG_MALLOC_DEBUG_ENV Environment variables to enable memory checking in tests CCAS assembler compiler command (defaults to CC) CCASFLAGS assembler compiler flags (defaults to CFLAGS) LT_SYS_LIBRARY_PATH User-defined run-time library search path. YACC The 'Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: 'bison -y', 'byacc', 'yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of '-d' given by some make applications. CPP C preprocessor LIBBSD_CFLAGS C compiler flags for LIBBSD, overriding pkg-config LIBBSD_LIBS linker flags for LIBBSD, overriding pkg-config PIXMAN_CFLAGS C compiler flags for PIXMAN, overriding pkg-config PIXMAN_LIBS linker flags for PIXMAN, overriding pkg-config SYSTEMD_DAEMON_CFLAGS C compiler flags for SYSTEMD_DAEMON, overriding pkg-config SYSTEMD_DAEMON_LIBS linker flags for SYSTEMD_DAEMON, overriding pkg-config UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config UDEV_LIBS linker flags for UDEV, overriding pkg-config DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config DBUS_LIBS linker flags for DBUS, overriding pkg-config HAL_CFLAGS C compiler flags for HAL, overriding pkg-config HAL_LIBS linker flags for HAL, overriding pkg-config DRI2PROTO_CFLAGS C compiler flags for DRI2PROTO, overriding pkg-config DRI2PROTO_LIBS linker flags for DRI2PROTO, overriding pkg-config DRI3PROTO_CFLAGS C compiler flags for DRI3PROTO, overriding pkg-config DRI3PROTO_LIBS linker flags for DRI3PROTO, overriding pkg-config XSHMFENCE_CFLAGS C compiler flags for XSHMFENCE, overriding pkg-config XSHMFENCE_LIBS linker flags for XSHMFENCE, overriding pkg-config LIBDRM_CFLAGS C compiler flags for LIBDRM, overriding pkg-config LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config XLIB_CFLAGS C compiler flags for XLIB, overriding pkg-config XLIB_LIBS linker flags for XLIB, overriding pkg-config GL_CFLAGS C compiler flags for GL, overriding pkg-config GL_LIBS linker flags for GL, overriding pkg-config SELINUX_CFLAGS C compiler flags for SELINUX, overriding pkg-config SELINUX_LIBS linker flags for SELINUX, overriding pkg-config XDMCP_CFLAGS C compiler flags for XDMCP, overriding pkg-config XDMCP_LIBS linker flags for XDMCP, overriding pkg-config LIBSHA1_CFLAGS C compiler flags for LIBSHA1, overriding pkg-config LIBSHA1_LIBS linker flags for LIBSHA1, overriding pkg-config OPENSSL_CFLAGS C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS linker flags for OPENSSL, overriding pkg-config XSERVERCFLAGS_CFLAGS C compiler flags for XSERVERCFLAGS, overriding pkg-config XSERVERCFLAGS_LIBS linker flags for XSERVERCFLAGS, overriding pkg-config XSERVERLIBS_CFLAGS C compiler flags for XSERVERLIBS, overriding pkg-config XSERVERLIBS_LIBS linker flags for XSERVERLIBS, overriding pkg-config LIBUNWIND_CFLAGS C compiler flags for LIBUNWIND, overriding pkg-config LIBUNWIND_LIBS linker flags for LIBUNWIND, overriding pkg-config XNESTMODULES_CFLAGS C compiler flags for XNESTMODULES, overriding pkg-config XNESTMODULES_LIBS linker flags for XNESTMODULES, overriding pkg-config LIBXCVT_CFLAGS C compiler flags for LIBXCVT, overriding pkg-config LIBXCVT_LIBS linker flags for LIBXCVT, overriding pkg-config PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config PCIACCESS_LIBS linker flags for PCIACCESS, overriding pkg-config DGA_CFLAGS C compiler flags for DGA, overriding pkg-config DGA_LIBS linker flags for DGA, overriding pkg-config XORG_MODULES_CFLAGS C compiler flags for XORG_MODULES, overriding pkg-config XORG_MODULES_LIBS linker flags for XORG_MODULES, overriding pkg-config GLAMOR_CFLAGS C compiler flags for GLAMOR, overriding pkg-config GLAMOR_LIBS linker flags for GLAMOR, overriding pkg-config GBM_CFLAGS C compiler flags for GBM, overriding pkg-config GBM_LIBS linker flags for GBM, overriding pkg-config XWINMODULES_CFLAGS C compiler flags for XWINMODULES, overriding pkg-config XWINMODULES_LIBS linker flags for XWINMODULES, overriding pkg-config WINDOWSDRI_CFLAGS C compiler flags for WINDOWSDRI, overriding pkg-config WINDOWSDRI_LIBS linker flags for WINDOWSDRI, overriding pkg-config KHRONOS_OPENGL_REGISTRY_CFLAGS C compiler flags for KHRONOS_OPENGL_REGISTRY, overriding pkg-config KHRONOS_OPENGL_REGISTRY_LIBS linker flags for KHRONOS_OPENGL_REGISTRY, overriding pkg-config XPBPROXY_CFLAGS C compiler flags for XPBPROXY, overriding pkg-config XPBPROXY_LIBS linker flags for XPBPROXY, overriding pkg-config XEPHYR_CFLAGS C compiler flags for XEPHYR, overriding pkg-config XEPHYR_LIBS linker flags for XEPHYR, overriding pkg-config Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF xorg-server configure 21.1.16 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (void); below. */ #include #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else case e in #( e) eval "$3=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 ;; esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else case e in #( e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status ;; esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break else case e in #( e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break else case e in #( e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done else case e in #( e) ac_lo= ac_hi= ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid else case e in #( e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else case e in #( e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) eval "$3=yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" else case e in #( e) eval "$4=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by xorg-server $as_me 21.1.16, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See 'config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (char **p, int i) { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* C89 style stringification. */ #define noexpand_stringify(a) #a const char *stringified = noexpand_stringify(arbitrary+token=sequence); /* C89 style token pasting. Exercises some of the corner cases that e.g. old MSVC gets wrong, but not very hard. */ #define noexpand_concat(a,b) a##b #define expand_concat(a,b) noexpand_concat(a,b) extern int vA; extern int vbee; #define aye A #define bee B int *pvA = &expand_concat(v,aye); int *pvbee = &noexpand_concat(v,bee); /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' /* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif // See if C++-style comments work. #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Work around memory leak warnings. free (ia); // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' /* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" # Auxiliary files required by this configure script. ac_aux_files="ltmain.sh config.guess config.sub compile missing install-sh" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else case e in #( e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; esac fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu RELEASE_DATE="2025-02-25" RELEASE_NAME="Caramel Ice Cream" am__api_version='1.16' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. case $as_dir in #(( ./ | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir ;; esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 printf %s "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was 's,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 printf %s "checking for a race-free mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 else case e in #( e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS ;; esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use plain mkdir -p, # in the hope it doesn't have the bugs of ancient mkdir. MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 printf "%s\n" "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AWK+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 printf "%s\n" "$AWK" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AWK" && break done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval test \${ac_cv_prog_make_${ac_make}_set+y} then : printf %s "(cached) " >&6 else case e in #( e) cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make ;; esac fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } SET_MAKE= else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='xorg-server' VERSION='21.1.16' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi if test -z "$ETAGS"; then ETAGS=etags fi if test -z "$CSCOPE"; then CSCOPE=cscope fi # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 printf "%s\n" "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test ${enable_dependency_tracking+y} then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else case e in #( e) ac_file='' ;; esac fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See 'config.log' for more details" "$LINENO" 5; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will # work properly (i.e., refer to 'conftest.exe'), while it won't with # 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); if (!f) return 1; return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use '--host'. See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext \ conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else case e in #( e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See 'config.log' for more details" "$LINENO" 5; } ;; esac fi rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else case e in #( e) ac_compiler_gnu=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else case e in #( e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 ;; esac fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC ;; esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else case e in #( e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" ;; esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 printf %s "checking whether $CC understands -c and -o together... " >&6; } if test ${am_cv_prog_cc_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes else case e in #( e) ac_cv_safe_to_define___extensions__=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 #include mbstate_t x; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h if test $ac_cv_header_minix_config_h = yes then : MINIX=yes printf "%s\n" "#define _MINIX 1" >>confdefs.h printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h else case e in #( e) MINIX= ;; esac fi if test $ac_cv_safe_to_define___extensions__ = yes then : printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h fi if test $ac_cv_should_define__xopen_source = yes then : printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h fi # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else case e in #( e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; esac fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_fn_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___clang__" = xyes then : CLANGCC="yes" else case e in #( e) CLANGCC="no" ;; esac fi ac_fn_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes then : INTELCC="yes" else case e in #( e) INTELCC="no" ;; esac fi ac_fn_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl___SUNPRO_C" = xyes then : SUNCC="yes" else case e in #( e) SUNCC="no" ;; esac fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then as_fn_error $? "pkg-config not found" "$LINENO" 5 fi # Make sure we can run config.sub. $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else case e in #( e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Check whether --enable-selective-werror was given. if test ${enable_selective_werror+y} then : enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval else case e in #( e) SELECTIVE_WERROR=yes ;; esac fi # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then BASE_CFLAGS="-v" else BASE_CFLAGS="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wall" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 printf %s "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wall" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-arith" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 printf %s "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-arith" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-declarations" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 printf %s "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-declarations" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat=2" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 printf %s "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat=2" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wformat" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 printf %s "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wformat" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wstrict-prototypes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 printf %s "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wstrict-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-prototypes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 printf %s "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-prototypes" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnested-externs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 printf %s "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnested-externs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wbad-function-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 printf %s "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wbad-function-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wold-style-definition" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 printf %s "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wold-style-definition" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -fd" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5 printf %s "checking if $CC supports -fd... " >&6; } cacheid=xorg_cv_cc_flag__fd if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -fd" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wdeclaration-after-statement" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 printf %s "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wdeclaration-after-statement" found="yes" fi fi # This chunk adds additional warnings that could catch undesired effects. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wunused" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 printf %s "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wunused" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wuninitialized" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 printf %s "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wuninitialized" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wshadow" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 printf %s "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wshadow" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-noreturn" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 printf %s "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-format-attribute" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 printf %s "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wredundant-decls" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5 printf %s "checking if $CC supports -Wredundant-decls... " >&6; } cacheid=xorg_cv_cc_flag__Wredundant_decls if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wlogical-op" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5 printf %s "checking if $CC supports -Wlogical-op... " >&6; } cacheid=xorg_cv_cc_flag__Wlogical_op if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op" found="yes" fi fi # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidentally get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=implicit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 printf %s "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=implicit" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 printf %s "checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_NO_EXPLICIT_TYPE_GIVEN__errwarn_E_NO_IMPLICIT_DECL_ALLOWED if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=nonnull" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 printf %s "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=nonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=init-self" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 printf %s "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=init-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=main" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 printf %s "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=main" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=missing-braces" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 printf %s "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=missing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=sequence-point" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 printf %s "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=sequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=return-type" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 printf %s "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=return-type" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 printf %s "checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_FUNC_HAS_NO_RETURN_STMT if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_FUNC_HAS_NO_RETURN_STMT" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=trigraphs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 printf %s "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=trigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=array-bounds" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 printf %s "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=array-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=write-strings" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 printf %s "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=write-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=address" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 printf %s "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=address" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=int-to-pointer-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 printf %s "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=int-to-pointer-cast" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 printf %s "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -errwarn=E_BAD_PTR_INT_COMBINATION" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=pointer-to-int-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 printf %s "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Werror=pointer-to-int-cast" found="yes" fi fi # Also -errwarn=E_BAD_PTR_INT_COMBINATION else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&5 printf "%s\n" "$as_me: WARNING: You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT" >&2;} xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wimplicit" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 printf %s "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wimplicit" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wnonnull" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 printf %s "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wnonnull" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Winit-self" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 printf %s "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Winit-self" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmain" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 printf %s "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmain" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wmissing-braces" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 printf %s "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wmissing-braces" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wsequence-point" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 printf %s "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wsequence-point" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wreturn-type" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 printf %s "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wreturn-type" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wtrigraphs" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 printf %s "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wtrigraphs" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Warray-bounds" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 printf %s "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Warray-bounds" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wwrite-strings" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 printf %s "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wwrite-strings" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Waddress" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 printf %s "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Waddress" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wint-to-pointer-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 printf %s "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wint-to-pointer-cast" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Wpointer-to-int-cast" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 printf %s "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then BASE_CFLAGS="$BASE_CFLAGS -Wpointer-to-int-cast" found="yes" fi fi fi CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi # Check whether --enable-strict-compilation was given. if test ${enable_strict_compilation+y} then : enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval else case e in #( e) STRICT_COMPILE=no ;; esac fi STRICT_CFLAGS="" xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -pedantic" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 printf %s "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -pedantic" found="yes" fi fi xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 printf %s "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror" found="yes" fi fi if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -errwarn" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 printf %s "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -errwarn" found="yes" fi fi # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. xorg_testset_save_CFLAGS="$CFLAGS" if test "x$xorg_testset_cc_unknown_warning_option" = "x" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 printf %s "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if test ${xorg_cv_cc_flag_unknown_warning_option+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unknown_warning_option=yes else case e in #( e) xorg_cv_cc_flag_unknown_warning_option=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 printf "%s\n" "$xorg_cv_cc_flag_unknown_warning_option" >&6; } xorg_testset_cc_unknown_warning_option=$xorg_cv_cc_flag_unknown_warning_option CFLAGS="$xorg_testset_save_CFLAGS" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "x" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi CFLAGS="$CFLAGS -Werror=unused-command-line-argument" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 printf %s "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if test ${xorg_cv_cc_flag_unused_command_line_argument+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; _ACEOF if ac_fn_c_try_compile "$LINENO" then : xorg_cv_cc_flag_unused_command_line_argument=yes else case e in #( e) xorg_cv_cc_flag_unused_command_line_argument=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 printf "%s\n" "$xorg_cv_cc_flag_unused_command_line_argument" >&6; } xorg_testset_cc_unused_command_line_argument=$xorg_cv_cc_flag_unused_command_line_argument CFLAGS="$xorg_testset_save_CFLAGS" fi found="no" if test $found = "no" ; then if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unknown-warning-option" fi if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then CFLAGS="$CFLAGS -Werror=unused-command-line-argument" fi CFLAGS="$CFLAGS -Werror=attributes" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 printf %s "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval test \${$cacheid+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval $cacheid=yes else case e in #( e) eval $cacheid=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 printf "%s\n" "$supported" >&6; } if test "$supported" = "yes" ; then STRICT_CFLAGS="$STRICT_CFLAGS -Werror=attributes" found="yes" fi fi if test "x$STRICT_COMPILE" = "xyes"; then BASE_CFLAGS="$BASE_CFLAGS $STRICT_CFLAGS" CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` _ACEOF PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi printf "%s\n" "#define PACKAGE_VERSION_MINOR $PVM" >>confdefs.h PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi printf "%s\n" "#define PACKAGE_VERSION_PATCHLEVEL $PVP" >>confdefs.h CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ touch \$(top_srcdir)/ChangeLog; \ echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ touch \$(top_srcdir)/INSTALL; \ echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" case $host_os in solaris*) # Solaris 2.0 - 11.3 use SysV man page section numbers, so we # check for a man page file found in later versions that use # traditional section numbers instead { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for /usr/share/man/man7/attributes.7" >&5 printf %s "checking for /usr/share/man/man7/attributes.7... " >&6; } if test ${ac_cv_file__usr_share_man_man7_attributes_7+y} then : printf %s "(cached) " >&6 else case e in #( e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/usr/share/man/man7/attributes.7"; then ac_cv_file__usr_share_man_man7_attributes_7=yes else ac_cv_file__usr_share_man_man7_attributes_7=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__usr_share_man_man7_attributes_7" >&5 printf "%s\n" "$ac_cv_file__usr_share_man_man7_attributes_7" >&6; } if test "x$ac_cv_file__usr_share_man_man7_attributes_7" = xyes then : SYSV_MAN_SECTIONS=false else case e in #( e) SYSV_MAN_SECTIONS=true ;; esac fi ;; *) SYSV_MAN_SECTIONS=false ;; esac if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi XORG_MAN_PAGE="X Version 11" MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" # Check whether --enable-silent-rules was given. if test ${enable_silent_rules+y} then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 printf %s "checking whether $am_make supports nested variables... " >&6; } if test ${am_cv_make_support_nested_variables+y} then : printf %s "(cached) " >&6 else case e in #( e) if printf "%s\n" 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' # Check whether --with-doxygen was given. if test ${with_doxygen+y} then : withval=$with_doxygen; use_doxygen=$withval else case e in #( e) use_doxygen=auto ;; esac fi if test "x$use_doxygen" = x"auto"; then # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DOXYGEN+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 printf "%s\n" "$DOXYGEN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$DOXYGEN" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - documentation targets will be skipped" >&5 printf "%s\n" "$as_me: WARNING: doxygen not found - documentation targets will be skipped" >&2;} have_doxygen=no else have_doxygen=yes fi elif test "x$use_doxygen" = x"yes" ; then # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DOXYGEN+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DOXYGEN="$DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DOXYGEN="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi DOXYGEN=$ac_cv_path_DOXYGEN if test -n "$DOXYGEN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOXYGEN" >&5 printf "%s\n" "$DOXYGEN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$DOXYGEN" = "x"; then as_fn_error $? "--with-doxygen=yes specified but doxygen not found in PATH" "$LINENO" 5 fi have_doxygen=yes elif test "x$use_doxygen" = x"no" ; then if test "x$DOXYGEN" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&5 printf "%s\n" "$as_me: WARNING: ignoring DOXYGEN environment variable since --with-doxygen=no was specified" >&2;} fi have_doxygen=no else as_fn_error $? "--with-doxygen expects 'yes' or 'no'" "$LINENO" 5 fi if test "$have_doxygen" = yes; then # scrape the doxygen version { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the doxygen version" >&5 printf %s "checking the doxygen version... " >&6; } doxygen_version=`$DOXYGEN --version 2>/dev/null` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $doxygen_version" >&5 printf "%s\n" "$doxygen_version" >&6; } as_arg_v1=$doxygen_version as_arg_v2=1.6.1 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null case $? in #( 1) : if test "x$use_doxygen" = xauto; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&5 printf "%s\n" "$as_me: WARNING: doxygen version $doxygen_version found, but 1.6.1 needed" >&2;} have_doxygen=no else as_fn_error $? "doxygen version $doxygen_version found, but 1.6.1 needed" "$LINENO" 5 fi ;; #( 0) : ;; #( 2) : ;; #( *) : ;; esac fi HAVE_DOT=no if test "x$have_doxygen" = "xyes"; then # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DOT+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DOT="$DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DOT="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi DOT=$ac_cv_path_DOT if test -n "$DOT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5 printf "%s\n" "$DOT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$DOT" != "x"; then HAVE_DOT=yes fi fi if test "$HAVE_DOT" = "yes"; then HAVE_DOT_TRUE= HAVE_DOT_FALSE='#' else HAVE_DOT_TRUE='#' HAVE_DOT_FALSE= fi if test "$have_doxygen" = yes; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X.Org SGML entities >= 1.8" >&5 printf %s "checking for X.Org SGML entities >= 1.8... " >&6; } XORG_SGML_PATH= if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.8\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools >= 1.8") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools` else : fi # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing # the path and the name of the doc stylesheet if test "x$XORG_SGML_PATH" != "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XORG_SGML_PATH" >&5 printf "%s\n" "$XORG_SGML_PATH" >&6; } STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$XSL_STYLESHEET" != "x"; then HAVE_STYLESHEETS_TRUE= HAVE_STYLESHEETS_FALSE='#' else HAVE_STYLESHEETS_TRUE='#' HAVE_STYLESHEETS_FALSE= fi # Check whether --enable-docs was given. if test ${enable_docs+y} then : enableval=$enable_docs; build_docs=$enableval else case e in #( e) build_docs=yes ;; esac fi if test x$build_docs = xyes; then ENABLE_DOCS_TRUE= ENABLE_DOCS_FALSE='#' else ENABLE_DOCS_TRUE='#' ENABLE_DOCS_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 printf %s "checking whether to build documentation... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $build_docs" >&5 printf "%s\n" "$build_docs" >&6; } # Check whether --enable-devel-docs was given. if test ${enable_devel_docs+y} then : enableval=$enable_devel_docs; build_devel_docs=$enableval else case e in #( e) build_devel_docs=yes ;; esac fi if test x$build_devel_docs = xyes; then ENABLE_DEVEL_DOCS_TRUE= ENABLE_DEVEL_DOCS_FALSE='#' else ENABLE_DEVEL_DOCS_TRUE='#' ENABLE_DEVEL_DOCS_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build developer documentation" >&5 printf %s "checking whether to build developer documentation... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $build_devel_docs" >&5 printf "%s\n" "$build_devel_docs" >&6; } # Check whether --with-xmlto was given. if test ${with_xmlto+y} then : withval=$with_xmlto; use_xmlto=$withval else case e in #( e) use_xmlto=auto ;; esac fi if test "x$use_xmlto" = x"auto"; then # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XMLTO+y} then : printf %s "(cached) " >&6 else case e in #( e) case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_XMLTO="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 printf "%s\n" "$XMLTO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$XMLTO" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto not found - documentation targets will be skipped" >&5 printf "%s\n" "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;} have_xmlto=no else have_xmlto=yes fi elif test "x$use_xmlto" = x"yes" ; then # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XMLTO+y} then : printf %s "(cached) " >&6 else case e in #( e) case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_XMLTO="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 printf "%s\n" "$XMLTO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$XMLTO" = "x"; then as_fn_error $? "--with-xmlto=yes specified but xmlto not found in PATH" "$LINENO" 5 fi have_xmlto=yes elif test "x$use_xmlto" = x"no" ; then if test "x$XMLTO" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5 printf "%s\n" "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;} fi have_xmlto=no else as_fn_error $? "--with-xmlto expects 'yes' or 'no'" "$LINENO" 5 fi # Test for a minimum version of xmlto, if provided. if test "$have_xmlto" = yes; then # scrape the xmlto version { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the xmlto version" >&5 printf %s "checking the xmlto version... " >&6; } xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xmlto_version" >&5 printf "%s\n" "$xmlto_version" >&6; } as_arg_v1=$xmlto_version as_arg_v2=0.0.20 awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null case $? in #( 1) : if test "x$use_xmlto" = xauto; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&5 printf "%s\n" "$as_me: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;} have_xmlto=no else as_fn_error $? "xmlto version $xmlto_version found, but 0.0.20 needed" "$LINENO" 5 fi ;; #( 0) : ;; #( 2) : ;; #( *) : ;; esac fi # Test for the ability of xmlto to generate a text target # # NOTE: xmlto 0.0.27 or higher return a non-zero return code in the # following test for empty XML docbook files. # For compatibility reasons use the following empty XML docbook file and if # it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF if test "$have_xmlto" = yes then : if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1 then : have_xmlto_text=yes else case e in #( e) # Try it again with a non-empty XML file. cat > conftest.xml << "EOF" EOF if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1 then : have_xmlto_text=yes else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xmlto cannot generate text format, this format skipped" >&5 printf "%s\n" "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;} ;; esac fi ;; esac fi fi rm -f conftest.xml if test $have_xmlto_text = yes; then HAVE_XMLTO_TEXT_TRUE= HAVE_XMLTO_TEXT_FALSE='#' else HAVE_XMLTO_TEXT_TRUE='#' HAVE_XMLTO_TEXT_FALSE= fi if test "$have_xmlto" = yes; then HAVE_XMLTO_TRUE= HAVE_XMLTO_FALSE='#' else HAVE_XMLTO_TRUE='#' HAVE_XMLTO_FALSE= fi # Check whether --with-fop was given. if test ${with_fop+y} then : withval=$with_fop; use_fop=$withval else case e in #( e) use_fop=auto ;; esac fi if test "x$use_fop" = x"auto"; then # Extract the first word of "fop", so it can be a program name with args. set dummy fop; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_FOP+y} then : printf %s "(cached) " >&6 else case e in #( e) case $FOP in [\\/]* | ?:[\\/]*) ac_cv_path_FOP="$FOP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_FOP="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi FOP=$ac_cv_path_FOP if test -n "$FOP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 printf "%s\n" "$FOP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$FOP" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: fop not found - documentation targets will be skipped" >&5 printf "%s\n" "$as_me: WARNING: fop not found - documentation targets will be skipped" >&2;} have_fop=no else have_fop=yes fi elif test "x$use_fop" = x"yes" ; then # Extract the first word of "fop", so it can be a program name with args. set dummy fop; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_FOP+y} then : printf %s "(cached) " >&6 else case e in #( e) case $FOP in [\\/]* | ?:[\\/]*) ac_cv_path_FOP="$FOP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_FOP="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi FOP=$ac_cv_path_FOP if test -n "$FOP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 printf "%s\n" "$FOP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$FOP" = "x"; then as_fn_error $? "--with-fop=yes specified but fop not found in PATH" "$LINENO" 5 fi have_fop=yes elif test "x$use_fop" = x"no" ; then if test "x$FOP" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&5 printf "%s\n" "$as_me: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&2;} fi have_fop=no else as_fn_error $? "--with-fop expects 'yes' or 'no'" "$LINENO" 5 fi # Test for a minimum version of fop, if provided. if test "$have_fop" = yes; then HAVE_FOP_TRUE= HAVE_FOP_FALSE='#' else HAVE_FOP_TRUE='#' HAVE_FOP_FALSE= fi # Preserves the interface, should it be implemented later # Check whether --with-xsltproc was given. if test ${with_xsltproc+y} then : withval=$with_xsltproc; use_xsltproc=$withval else case e in #( e) use_xsltproc=auto ;; esac fi if test "x$use_xsltproc" = x"auto"; then # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XSLTPROC+y} then : printf %s "(cached) " >&6 else case e in #( e) case $XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 printf "%s\n" "$XSLTPROC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$XSLTPROC" = "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: xsltproc not found - cannot transform XML documents" >&5 printf "%s\n" "$as_me: WARNING: xsltproc not found - cannot transform XML documents" >&2;} have_xsltproc=no else have_xsltproc=yes fi elif test "x$use_xsltproc" = x"yes" ; then # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_XSLTPROC+y} then : printf %s "(cached) " >&6 else case e in #( e) case $XSLTPROC in [\\/]* | ?:[\\/]*) ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_XSLTPROC="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi XSLTPROC=$ac_cv_path_XSLTPROC if test -n "$XSLTPROC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 printf "%s\n" "$XSLTPROC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$XSLTPROC" = "x"; then as_fn_error $? "--with-xsltproc=yes specified but xsltproc not found in PATH" "$LINENO" 5 fi have_xsltproc=yes elif test "x$use_xsltproc" = x"no" ; then if test "x$XSLTPROC" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&5 printf "%s\n" "$as_me: WARNING: ignoring XSLTPROC environment variable since --with-xsltproc=no was specified" >&2;} fi have_xsltproc=no else as_fn_error $? "--with-xsltproc expects 'yes' or 'no'" "$LINENO" 5 fi if test "$have_xsltproc" = yes; then HAVE_XSLTPROC_TRUE= HAVE_XSLTPROC_FALSE='#' else HAVE_XSLTPROC_TRUE='#' HAVE_XSLTPROC_FALSE= fi # Check for different types of support on different platforms case $host_os in solaris*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for umem_alloc in -lumem" >&5 printf %s "checking for umem_alloc in -lumem... " >&6; } if test ${ac_cv_lib_umem_umem_alloc+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lumem $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char umem_alloc (void); int main (void) { return umem_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_umem_umem_alloc=yes else case e in #( e) ac_cv_lib_umem_umem_alloc=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_umem_umem_alloc" >&5 printf "%s\n" "$ac_cv_lib_umem_umem_alloc" >&6; } if test "x$ac_cv_lib_umem_umem_alloc" = xyes then : malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default' fi ;; *-gnu*) # GNU libc - Value is used as a single byte bit pattern, # both directly and inverted, so should not be 0 or 255. malloc_debug_env='MALLOC_PERTURB_=15' ;; darwin*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' ;; *bsd*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1' ;; esac # User supplied flags override default flags if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" fi XORG_MALLOC_DEBUG_ENV=$malloc_debug_env # Check whether --enable-unit-tests was given. if test ${enable_unit_tests+y} then : enableval=$enable_unit_tests; enable_unit_tests=$enableval else case e in #( e) enable_unit_tests=auto ;; esac fi if test "x$enable_unit_tests" != xno; then ENABLE_UNIT_TESTS_TRUE= ENABLE_UNIT_TESTS_FALSE='#' else ENABLE_UNIT_TESTS_TRUE='#' ENABLE_UNIT_TESTS_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build unit test cases" >&5 printf %s "checking whether to build unit test cases... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_unit_tests" >&5 printf "%s\n" "$enable_unit_tests" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-wrap,exit" >&5 printf %s "checking whether the linker accepts -Wl,-wrap,exit... " >&6; } if test ${xorg_cv_linker_flags__Wl__wrap_exit+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_save_FLAGS=$LDFLAGS LDFLAGS="-Wl,-wrap,exit" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include void __wrap_exit(int status) { return; } int main (void) { exit(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : xorg_cv_linker_flags__Wl__wrap_exit=yes else case e in #( e) xorg_cv_linker_flags__Wl__wrap_exit=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$ax_save_FLAGS ;; esac fi eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__wrap_exit { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5 printf "%s\n" "$xorg_check_linker_flags" >&6; } if test "x$xorg_check_linker_flags" = xyes; then have_ld_wrap=yes else have_ld_wrap=no fi # Not having ld wrap when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes" -a "xoptional" != "xoptional"; then if test "x$have_ld_wrap" = x"no"; then as_fn_error $? "--enable-unit-tests=yes specified but ld -wrap support is not available" "$LINENO" 5 fi fi if test "$have_ld_wrap" = yes; then HAVE_LD_WRAP_TRUE= HAVE_LD_WRAP_FALSE='#' else HAVE_LD_WRAP_TRUE='#' HAVE_LD_WRAP_FALSE= fi # ac_config_headers="$ac_config_headers include/do-not-use-config.h" ac_config_headers="$ac_config_headers include/xorg-server.h" ac_config_headers="$ac_config_headers include/dix-config.h" ac_config_headers="$ac_config_headers include/xorg-config.h" ac_config_headers="$ac_config_headers include/xkb-config.h" ac_config_headers="$ac_config_headers include/xwin-config.h" ac_config_headers="$ac_config_headers include/version-config.h" # By default we simply use the C compiler to build assembly code. test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_CCAS_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CCAS_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CCAS_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CCAS_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3; then am__fastdepCCAS_TRUE= am__fastdepCCAS_FALSE='#' else am__fastdepCCAS_TRUE='#' am__fastdepCCAS_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "no, using $LN_S" >&6; } fi case `pwd` in *\ * | *\ *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 printf "%s\n" "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.7' macro_revision='2.4.7' ltmain=$ac_aux_dir/ltmain.sh # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 printf %s "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: printf" >&5 printf "%s\n" "printf" >&6; } ;; print*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 printf "%s\n" "print -r" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cat" >&5 printf "%s\n" "cat" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in sed gsed do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 printf %s "checking for fgrep... " >&6; } if test ${ac_cv_path_FGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in fgrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in #( *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 printf "%s\n" "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test ${with_gnu_ld+y} then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else case e in #( e) with_gnu_ld=no ;; esac fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 printf %s "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 printf %s "checking for GNU ld... " >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 printf %s "checking for non-GNU ld... " >&6; } fi if test ${lt_cv_path_LD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 printf "%s\n" "$LD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 printf %s "checking if the linker ($LD) is GNU ld... " >&6; } if test ${lt_cv_prog_gnu_ld+y} then : printf %s "(cached) " >&6 else case e in #( e) # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 printf "%s\n" "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 printf %s "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test ${lt_cv_path_NM+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 printf "%s\n" "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 printf "%s\n" "$DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DUMPBIN+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 printf "%s\n" "$ac_ct_DUMPBIN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 printf %s "checking the name lister ($NM) interface... " >&6; } if test ${lt_cv_nm_interface+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 printf "%s\n" "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 printf %s "checking the maximum length of command line arguments... " >&6; } if test ${lt_cv_sys_max_cmd_len+y} then : printf %s "(cached) " >&6 else case e in #( e) i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 printf "%s\n" "$lt_cv_sys_max_cmd_len" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 printf %s "checking how to convert $build file names to $host format... " >&6; } if test ${lt_cv_to_host_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 printf "%s\n" "$lt_cv_to_host_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 printf %s "checking how to convert $build file names to toolchain format... " >&6; } if test ${lt_cv_to_tool_file_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 printf "%s\n" "$lt_cv_to_tool_file_cmd" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 printf %s "checking for $LD option to reload object files... " >&6; } if test ${lt_cv_ld_reload_flag+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_reload_flag='-r' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 printf "%s\n" "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}file", so it can be a program name with args. set dummy ${ac_tool_prefix}file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FILECMD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$FILECMD"; then ac_cv_prog_FILECMD="$FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_FILECMD="${ac_tool_prefix}file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi FILECMD=$ac_cv_prog_FILECMD if test -n "$FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FILECMD" >&5 printf "%s\n" "$FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_FILECMD"; then ac_ct_FILECMD=$FILECMD # Extract the first word of "file", so it can be a program name with args. set dummy file; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_FILECMD+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_FILECMD"; then ac_cv_prog_ac_ct_FILECMD="$ac_ct_FILECMD" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_FILECMD="file" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_FILECMD=$ac_cv_prog_ac_ct_FILECMD if test -n "$ac_ct_FILECMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_FILECMD" >&5 printf "%s\n" "$ac_ct_FILECMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_FILECMD" = x; then FILECMD=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac FILECMD=$ac_ct_FILECMD fi else FILECMD="$ac_cv_prog_FILECMD" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 printf %s "checking how to recognize dependent libraries... " >&6; } if test ${lt_cv_deplibs_check_method+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='$FILECMD -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly* | midnightbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=$FILECMD case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=$FILECMD lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 printf "%s\n" "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 printf %s "checking how to associate runtime and link libraries... " >&6; } if test ${lt_cv_sharedlib_from_linklib_cmd+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 printf "%s\n" "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} # Use ARFLAGS variable as AR's operation code to sync the variable naming with # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have # higher priority because thats what people were doing historically (setting # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS # variable obsoleted/removed. test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} lt_ar_flags=$AR_FLAGS # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override # by AR_FLAGS because that was never working and AR_FLAGS is about to die. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 printf %s "checking for archiver @FILE support... " >&6; } if test ${lt_cv_ar_at_file+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 printf "%s\n" "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 printf "%s\n" "$STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_STRIP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 printf "%s\n" "$ac_ct_STRIP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 printf %s "checking command to parse $NM output from $compiler object... " >&6; } if test ${lt_cv_sys_global_symbol_pipe+y} then : printf %s "(cached) " >&6 else case e in #( e) # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="$SED -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++ or ICC, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ;; esac fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ok" >&5 printf "%s\n" "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 printf %s "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test ${with_sysroot+y} then : withval=$with_sysroot; else case e in #( e) with_sysroot=no ;; esac fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 printf "%s\n" "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 printf "%s\n" "${lt_sysroot:-no}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 printf %s "checking for a working dd... " >&6; } if test ${ac_cv_path_lt_DD+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in dd do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 printf "%s\n" "$ac_cv_path_lt_DD" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 printf %s "checking how to truncate binary pipes... " >&6; } if test ${lt_cv_truncate_bin+y} then : printf %s "(cached) " >&6 else case e in #( e) printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 printf "%s\n" "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test ${enable_libtool_lock+y} then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `$FILECMD conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `$FILECMD conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `$FILECMD conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `$FILECMD conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `$FILECMD conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 printf %s "checking whether the C compiler needs -belf... " >&6; } if test ${lt_cv_cc_needs_belf+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_cc_needs_belf=yes else case e in #( e) lt_cv_cc_needs_belf=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 printf "%s\n" "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `$FILECMD conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 printf "%s\n" "$MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_MANIFEST_TOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 printf "%s\n" "$ac_ct_MANIFEST_TOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 printf %s "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if test ${lt_cv_path_mainfest_tool+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 printf "%s\n" "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 printf "%s\n" "$DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DSYMUTIL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 printf "%s\n" "$ac_ct_DSYMUTIL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 printf "%s\n" "$NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_NMEDIT+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 printf "%s\n" "$ac_ct_NMEDIT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 printf "%s\n" "$LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_LIPO+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 printf "%s\n" "$ac_ct_LIPO" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 printf "%s\n" "$OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 printf "%s\n" "$ac_ct_OTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 printf "%s\n" "$OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OTOOL64+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 printf "%s\n" "$ac_ct_OTOOL64" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 printf %s "checking for -single_module linker flag... " >&6; } if test ${lt_cv_apple_cc_single_mod+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 printf "%s\n" "$lt_cv_apple_cc_single_mod" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 printf %s "checking for -exported_symbols_list linker flag... " >&6; } if test ${lt_cv_ld_exported_symbols_list+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_ld_exported_symbols_list=yes else case e in #( e) lt_cv_ld_exported_symbols_list=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 printf "%s\n" "$lt_cv_ld_exported_symbols_list" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 printf %s "checking for -force_load linker flag... " >&6; } if test ${lt_cv_ld_force_load+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5 $AR $AR_FLAGS libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 printf "%s\n" "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) case $MACOSX_DEPLOYMENT_TARGET,$host in 10.[012],*|,*powerpc*-darwin[5-8]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi # Set options # Check whether --enable-static was given. if test ${enable_static+y} then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_static=no ;; esac fi enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AS+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi AS=$ac_cv_prog_AS if test -n "$AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 printf "%s\n" "$AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AS+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 printf "%s\n" "$ac_ct_AS" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 printf "%s\n" "$DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DLLTOOL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 printf "%s\n" "$ac_ct_DLLTOOL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 printf "%s\n" "$OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_OBJDUMP+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 printf "%s\n" "$ac_ct_OBJDUMP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump enable_dlopen=no # Check whether --enable-shared was given. if test ${enable_shared+y} then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_shared=yes ;; esac fi # Check whether --with-pic was given. if test ${with_pic+y} then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) pic_mode=default ;; esac fi # Check whether --enable-fast-install was given. if test ${enable_fast_install+y} then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else case e in #( e) enable_fast_install=yes ;; esac fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 printf %s "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test ${with_aix_soname+y} then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else case e in #( e) if test ${lt_cv_with_aix_soname+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_with_aix_soname=aix ;; esac fi with_aix_soname=$lt_cv_with_aix_soname ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 printf "%s\n" "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 printf %s "checking for objdir... " >&6; } if test ${lt_cv_objdir+y} then : printf %s "(cached) " >&6 else case e in #( e) rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 printf "%s\n" "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir printf "%s\n" "#define LT_OBJDIR \"$lt_cv_objdir/\"" >>confdefs.h case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC and # ICC, which need '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 printf %s "checking for ${ac_tool_prefix}file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for file" >&5 printf %s "checking for file... " >&6; } if test ${lt_cv_path_MAGIC_CMD+y} then : printf %s "(cached) " >&6 else case e in #( e) case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 printf "%s\n" "$MAGIC_CMD" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 printf %s "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test ${lt_cv_prog_compiler_rtti_exceptions+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 printf "%s\n" "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | $SED 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 printf %s "checking for $compiler option to produce PIC... " >&6; } if test ${lt_cv_prog_compiler_pic+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic=$lt_prog_compiler_pic ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 printf %s "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test ${lt_cv_prog_compiler_pic_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 printf %s "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test ${lt_cv_prog_compiler_static_works+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 printf "%s\n" "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 printf %s "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test ${lt_cv_prog_compiler_c_o+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 printf "%s\n" "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 printf %s "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 printf "%s\n" "$hard_links" >&6; } if test no = "$hard_links"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 printf "%s\n" "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 printf %s "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if test ${lt_cv_aix_libpath_+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi ;; esac fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++ or Intel C++ Compiler. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl* | icl*) # Native MSVC or ICC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC and ICC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly* | midnightbsd*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 printf %s "checking if $CC understands -b... " >&6; } if test ${lt_cv_prog_compiler__b+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 printf "%s\n" "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 printf %s "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if test ${lt_cv_irix_exported_symbol+y} then : printf %s "(cached) " >&6 else case e in #( e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : lt_cv_irix_exported_symbol=yes else case e in #( e) lt_cv_irix_exported_symbol=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 printf "%s\n" "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes file_list_spec='@' ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 printf "%s\n" "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 printf %s "checking whether -lc should be explicitly linked in... " >&6; } if test ${lt_cv_archive_cmds_need_lc+y} then : printf %s "(cached) " >&6 else case e in #( e) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 printf "%s\n" "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 printf %s "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl* | *,icl*) # Native MSVC or ICC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC and ICC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly* | midnightbsd*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if test ${lt_cv_shlibpath_overrides_runpath+y} then : printf %s "(cached) " >&6 else case e in #( e) lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir ;; esac fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 printf "%s\n" "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 printf %s "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 printf "%s\n" "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; esac fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes then : lt_cv_dlopen=shl_load else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char shl_load (void); int main (void) { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes else case e in #( e) ac_cv_lib_dld_shl_load=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else case e in #( e) ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : lt_cv_dlopen=dlopen else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 printf %s "checking for dlopen in -lsvld... " >&6; } if test ${ac_cv_lib_svld_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_svld_dlopen=yes else case e in #( e) ac_cv_lib_svld_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 printf "%s\n" "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 printf %s "checking for dld_link in -ldld... " >&6; } if test ${ac_cv_lib_dld_dld_link+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dld_link (void); int main (void) { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_dld_link=yes else case e in #( e) ac_cv_lib_dld_dld_link=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 printf "%s\n" "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 printf %s "checking whether a program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 printf "%s\n" "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 printf %s "checking whether a statically linked program can dlopen itself... " >&6; } if test ${lt_cv_dlopen_self_static+y} then : printf %s "(cached) " >&6 else case e in #( e) if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 printf "%s\n" "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 printf %s "checking whether stripping libraries is possible... " >&6; } if test -z "$STRIP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case $host_os in darwin*) # FIXME - insert some real tests, host_os isn't really good enough striplib="$STRIP -x" old_striplib="$STRIP -S" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; freebsd*) if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then old_striplib="$STRIP --strip-debug" striplib="$STRIP --strip-unneeded" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi fi # Report what library types will actually be built { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 printf %s "checking if libtool supports shared libraries... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 printf "%s\n" "$can_build_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 printf %s "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 printf "%s\n" "$enable_shared" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 printf %s "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 printf "%s\n" "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 printf "%s\n" "$PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then as_fn_error $? "pkg-config not found" "$LINENO" 5 fi for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_LEX+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 printf "%s\n" "$LEX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %{ #ifdef __cplusplus extern "C" #endif int yywrap(void); %} %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ #ifdef __cplusplus yyless ((yyinput () != 0)); #else yyless ((input () != 0)); #endif } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int yywrap (void) { return 1; } int main (void) { return ! yylex (); } _ACEOF { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 printf %s "checking for lex output file root... " >&6; } if test ${ac_cv_prog_lex_root+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_prog_lex_root=unknown { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 printf "%s\n" "$ac_cv_prog_lex_root" >&6; } if test "$ac_cv_prog_lex_root" = unknown then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} LEX=: LEXLIB= fi LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test ${LEXLIB+y} then : else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 printf %s "checking for lex library... " >&6; } if test ${ac_cv_lib_lex+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_LIBS="$LIBS" ac_found=false for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do case $ac_cv_lib_lex in #( 'none needed') : ;; #( 'not found') : break ;; #( *) : LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( *) : ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_found=: fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if $ac_found; then break fi done LIBS="$ac_save_LIBS" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 printf "%s\n" "$ac_cv_lib_lex" >&6; } if test "$ac_cv_lib_lex" = 'not found' then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} LEX=: LEXLIB= elif test "$ac_cv_lib_lex" = 'none needed' then : LEXLIB='' else case e in #( e) LEXLIB=$ac_cv_lib_lex ;; esac fi ac_save_LIBS="$LIBS" LIBS= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5 printf %s "checking for library containing yywrap... " >&6; } if test ${ac_cv_search_yywrap+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char yywrap (void); int main (void) { return yywrap (); ; return 0; } _ACEOF for ac_lib in '' fl l do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_yywrap=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_yywrap+y} then : break fi done if test ${ac_cv_search_yywrap+y} then : else case e in #( e) ac_cv_search_yywrap=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5 printf "%s\n" "$ac_cv_search_yywrap" >&6; } ac_res=$ac_cv_search_yywrap if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" LEXLIB="$LIBS" fi LIBS="$ac_save_LIBS" ;; esac fi if test "$LEX" != : then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 printf %s "checking whether yytext is a pointer... " >&6; } if test ${ac_cv_prog_lex_yytext_pointer+y} then : printf %s "(cached) " >&6 else case e in #( e) # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h fi fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_YACC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 printf "%s\n" "$YACC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" # Check whether --enable-largefile was given. if test ${enable_largefile+y} then : enableval=$enable_largefile; fi if test "$enable_largefile,$enable_year2038" != no,no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5 printf %s "checking for $CC option to enable large file support... " >&6; } if test ${ac_cv_sys_largefile_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CC="$CC" ac_opt_found=no for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do if test x"$ac_opt" != x"none needed" then : CC="$ac_save_CC $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef FTYPE # define FTYPE off_t #endif /* Check that FTYPE can represent 2**63 - 1 correctly. We can't simply define LARGE_FTYPE to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 && LARGE_FTYPE % 2147483647 == 1) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_opt" = x"none needed" then : # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. CC="$CC -DFTYPE=ino_t" if ac_fn_c_try_compile "$LINENO" then : else case e in #( e) CC="$CC -D_FILE_OFFSET_BITS=64" if ac_fn_c_try_compile "$LINENO" then : ac_opt='-D_FILE_OFFSET_BITS=64' fi rm -f core conftest.err conftest.$ac_objext conftest.beam ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam fi ac_cv_sys_largefile_opts=$ac_opt ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CC="$ac_save_CC" test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; } ac_have_largefile=yes case $ac_cv_sys_largefile_opts in #( "none needed") : ;; #( "supported through gnulib") : ;; #( "support not detected") : ac_have_largefile=no ;; #( "-D_FILE_OFFSET_BITS=64") : printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h ;; #( "-D_LARGE_FILES=1") : printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h ;; #( "-n32") : CC="$CC -n32" ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; esac if test "$enable_year2038" != no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5 printf %s "checking for $CC option for timestamps after 2038... " >&6; } if test ${ac_cv_sys_year2038_opts+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_save_CPPFLAGS="$CPPFLAGS" ac_opt_found=no for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do if test x"$ac_opt" != x"none needed" then : CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that time_t can represent 2**32 - 1 correctly. */ #define LARGE_TIME_T \\ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 && LARGE_TIME_T % 65537 == 0) ? 1 : -1]; int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_sys_year2038_opts="$ac_opt" ac_opt_found=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_opt_found = no || break done CPPFLAGS="$ac_save_CPPFLAGS" test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; } ac_have_year2038=yes case $ac_cv_sys_year2038_opts in #( "none needed") : ;; #( "support not detected") : ac_have_year2038=no ;; #( "-D_TIME_BITS=64") : printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h ;; #( "-D__MINGW_USE_VC2005_COMPAT") : printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h ;; #( "-U_USE_32_BIT_TIME_T"*) : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It will stop working after mid-January 2038. Remove _USE_32BIT_TIME_T from the compiler flags. See 'config.log' for more details" "$LINENO" 5; } ;; #( *) : as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; esac fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else case e in #( e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : break fi done ac_cv_prog_CPP=$CPP ;; esac fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else case e in #( e) # Broken: fails on valid input. continue ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue else case e in #( e) # Passes both tests. ac_preproc_ok=: break ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : else case e in #( e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See 'config.log' for more details" "$LINENO" 5; } ;; esac fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cpp", so it can be a program name with args. set dummy ${ac_tool_prefix}cpp; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_RAWCPP+y} then : printf %s "(cached) " >&6 else case e in #( e) case $RAWCPP in [\\/]* | ?:[\\/]*) ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" for as_dir in $as_dummy do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_RAWCPP="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi RAWCPP=$ac_cv_path_RAWCPP if test -n "$RAWCPP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RAWCPP" >&5 printf "%s\n" "$RAWCPP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_path_RAWCPP"; then ac_pt_RAWCPP=$RAWCPP # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_RAWCPP+y} then : printf %s "(cached) " >&6 else case e in #( e) case $ac_pt_RAWCPP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_RAWCPP="$ac_pt_RAWCPP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" for as_dir in $as_dummy do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_RAWCPP="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac ;; esac fi ac_pt_RAWCPP=$ac_cv_path_ac_pt_RAWCPP if test -n "$ac_pt_RAWCPP"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_RAWCPP" >&5 printf "%s\n" "$ac_pt_RAWCPP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_RAWCPP" = x; then RAWCPP="${CPP}" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RAWCPP=$ac_pt_RAWCPP fi else RAWCPP="$ac_cv_path_RAWCPP" fi # Check for flag to avoid builtin definitions - assumes unix is predefined, # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -undef" >&5 printf %s "checking if $RAWCPP requires -undef... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ Does cpp redefine unix ? _ACEOF if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } # under Cygwin unix is still defined even with -undef elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS="-undef -ansi" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with -ansi" >&5 printf "%s\n" "yes, with -ansi" >&6; } else as_fn_error $? "${RAWCPP} defines unix with or without -undef. I don't know what to do." "$LINENO" 5 fi fi rm -f conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if $RAWCPP requires -traditional" >&5 printf %s "checking if $RAWCPP requires -traditional... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ Does cpp preserve "whitespace"? _ACEOF if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then TRADITIONALCPPFLAGS="-traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else as_fn_error $? "${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." "$LINENO" 5 fi fi rm -f conftest.$ac_ext # Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow # easier overrides at build time. XSERVER_CFLAGS='$(CWARNFLAGS)' if test "x$GCC" = xyes ; then XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing" fi # Check whether --with-dtrace was given. if test ${with_dtrace+y} then : withval=$with_dtrace; WDTRACE=$withval else case e in #( e) WDTRACE=auto ;; esac fi if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DTRACE+y} then : printf %s "(cached) " >&6 else case e in #( e) case $DTRACE in [\\/]* | ?:[\\/]*) ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/usr/sbin" for as_dir in $as_dummy do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_DTRACE="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not_found" ;; esac ;; esac fi DTRACE=$ac_cv_path_DTRACE if test -n "$DTRACE"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 printf "%s\n" "$DTRACE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$DTRACE" = "xnot_found" ; then if test "x$WDTRACE" = "xyes" ; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "dtrace requested but not found See 'config.log' for more details" "$LINENO" 5; } fi WDTRACE="no" else ac_fn_c_check_header_compile "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sdt_h" = xyes then : HAS_SDT_H="yes" else case e in #( e) HAS_SDT_H="no" ;; esac fi if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then WDTRACE="no" fi fi fi if test "x$WDTRACE" != "xno" ; then printf "%s\n" "#define XSERVER_DTRACE 1" >>confdefs.h # Solaris/OpenSolaris require dtrace -G to build dtrace probe information into # object files, and require linking with those as relocatable objects, not .a # archives. MacOS X handles all this in the normal compiler toolchain, and on # some releases (like Tiger), will error out on dtrace -G. For now, other # platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux # ports appear to, based on my web searches, but have not yet been tested). case $host_os in darwin*) SPECIAL_DTRACE_OBJECTS=no ;; *) SPECIAL_DTRACE_OBJECTS=yes ;; esac fi if test "x$WDTRACE" != "xno"; then XSERVER_DTRACE_TRUE= XSERVER_DTRACE_FALSE='#' else XSERVER_DTRACE_TRUE='#' XSERVER_DTRACE_FALSE= fi if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"; then SPECIAL_DTRACE_OBJECTS_TRUE= SPECIAL_DTRACE_OBJECTS_FALSE='#' else SPECIAL_DTRACE_OBJECTS_TRUE='#' SPECIAL_DTRACE_OBJECTS_FALSE= fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main (void) { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" else case e in #( e) eval "$as_ac_Header=no" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char opendir (void); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else case e in #( e) ac_cv_search_opendir=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char opendir (void); int main (void) { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else case e in #( e) ac_cv_search_opendir=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # Autoupdate added the next two lines to ensure that your configure # script's behavior did not change. They are probably safe to remove. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else case e in #( e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" EGREP_TRADITIONAL=$EGREP ac_cv_path_EGREP_TRADITIONAL=$EGREP ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes then : printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes then : printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "stropts.h" "ac_cv_header_stropts_h" "$ac_includes_default" if test "x$ac_cv_header_stropts_h" = xyes then : printf "%s\n" "#define HAVE_STROPTS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fnmatch.h" "ac_cv_header_fnmatch_h" "$ac_includes_default" if test "x$ac_cv_header_fnmatch_h" = xyes then : printf "%s\n" "#define HAVE_FNMATCH_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mkdev_h" = xyes then : printf "%s\n" "#define HAVE_SYS_MKDEV_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysmacros_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SYSMACROS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/utsname.h" "ac_cv_header_sys_utsname_h" "$ac_includes_default" if test "x$ac_cv_header_sys_utsname_h" = xyes then : printf "%s\n" "#define HAVE_SYS_UTSNAME_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* IBM XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes else case e in #( e) ac_cv_c_const=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for typeof syntax and keyword spelling" >&5 printf %s "checking for typeof syntax and keyword spelling... " >&6; } if test ${ac_cv_c_typeof+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_c_typeof=no for ac_kw in typeof __typeof__ no; do test $ac_kw = no && break cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { int value; typedef struct { char a [1 + ! (($ac_kw (value)) (($ac_kw (value)) 0 < ($ac_kw (value)) -1 ? ($ac_kw (value)) - 1 : ~ (~ ($ac_kw (value)) 0 << sizeof ($ac_kw (value)))))]; } ac__typeof_type_; return (! ((void) ((ac__typeof_type_ *) 0), 0)); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_typeof=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext test $ac_cv_c_typeof != no && break done ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_typeof" >&5 printf "%s\n" "$ac_cv_c_typeof" >&6; } if test $ac_cv_c_typeof != no; then printf "%s\n" "#define HAVE_TYPEOF 1" >>confdefs.h if test $ac_cv_c_typeof != typeof; then printf "%s\n" "#define typeof $ac_cv_c_typeof" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO" then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else case e in #( e) ac_cv_c_bigendian=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } int main (int argc, char **argv) { /* Intimidate the compiler so that it does not optimize the arrays away. */ char *p = argv[0]; ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; return use_ascii (argc) == use_ebcdic (*p); } _ACEOF if ac_fn_c_try_link "$LINENO" then : if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no else case e in #( e) ac_cv_c_bigendian=yes ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf "%s\n" "#define X_BYTE_ORDER X_BIG_ENDIAN" >>confdefs.h ;; #( no) printf "%s\n" "#define X_BYTE_ORDER X_LITTLE_ENDIAN" >>confdefs.h ;; #( universal) printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 printf %s "checking size of unsigned long... " >&6; } if test ${ac_cv_sizeof_unsigned_long+y} then : printf %s "(cached) " >&6 else case e in #( e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default" then : else case e in #( e) if test "$ac_cv_type_unsigned_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long) See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 printf "%s\n" "$ac_cv_sizeof_unsigned_long" >&6; } printf "%s\n" "#define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long" >>confdefs.h if test "$ac_cv_sizeof_unsigned_long" = 8; then printf "%s\n" "#define _XSERVER64 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default " if test "x$ac_cv_type_pid_t" = xyes then : else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ LLP64 #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' else case e in #( e) ac_pid_type='__int64' ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h ;; esac fi ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char dlopen (void); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else case e in #( e) ac_cv_lib_dl_dlopen=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : DLOPEN_LIBS="-ldl" fi ;; esac fi ac_fn_c_check_func "$LINENO" "backtrace" "ac_cv_func_backtrace" if test "x$ac_cv_func_backtrace" = xyes then : printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" if test "x$ac_cv_func_geteuid" = xyes then : printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid" if test "x$ac_cv_func_getuid" = xyes then : printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" if test "x$ac_cv_func_issetugid" = xyes then : printf "%s\n" "#define HAVE_ISSETUGID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getresuid" "ac_cv_func_getresuid" if test "x$ac_cv_func_getresuid" = xyes then : printf "%s\n" "#define HAVE_GETRESUID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" if test "x$ac_cv_func_getdtablesize" = xyes then : printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" if test "x$ac_cv_func_getifaddrs" = xyes then : printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getpeereid" "ac_cv_func_getpeereid" if test "x$ac_cv_func_getpeereid" = xyes then : printf "%s\n" "#define HAVE_GETPEEREID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getpeerucred" "ac_cv_func_getpeerucred" if test "x$ac_cv_func_getpeerucred" = xyes then : printf "%s\n" "#define HAVE_GETPEERUCRED 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getprogname" "ac_cv_func_getprogname" if test "x$ac_cv_func_getprogname" = xyes then : printf "%s\n" "#define HAVE_GETPROGNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getzoneid" "ac_cv_func_getzoneid" if test "x$ac_cv_func_getzoneid" = xyes then : printf "%s\n" "#define HAVE_GETZONEID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes then : printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "posix_fallocate" "ac_cv_func_posix_fallocate" if test "x$ac_cv_func_posix_fallocate" = xyes then : printf "%s\n" "#define HAVE_POSIX_FALLOCATE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "seteuid" "ac_cv_func_seteuid" if test "x$ac_cv_func_seteuid" = xyes then : printf "%s\n" "#define HAVE_SETEUID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "shmctl64" "ac_cv_func_shmctl64" if test "x$ac_cv_func_shmctl64" = xyes then : printf "%s\n" "#define HAVE_SHMCTL64 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" if test "x$ac_cv_func_vasprintf" = xyes then : printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" if test "x$ac_cv_func_vsnprintf" = xyes then : printf "%s\n" "#define HAVE_VSNPRINTF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "walkcontext" "ac_cv_func_walkcontext" if test "x$ac_cv_func_walkcontext" = xyes then : printf "%s\n" "#define HAVE_WALKCONTEXT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" if test "x$ac_cv_func_setitimer" = xyes then : printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" if test "x$ac_cv_func_poll" = xyes then : printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "epoll_create1" "ac_cv_func_epoll_create1" if test "x$ac_cv_func_epoll_create1" = xyes then : printf "%s\n" "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mkostemp" "ac_cv_func_mkostemp" if test "x$ac_cv_func_mkostemp" = xyes then : printf "%s\n" "#define HAVE_MKOSTEMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create" if test "x$ac_cv_func_memfd_create" = xyes then : printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" if test "x$ac_cv_func_sigprocmask" = xyes then : printf "%s\n" "#define HAVE_SIGPROCMASK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isastream" "ac_cv_func_isastream" if test "x$ac_cv_func_isastream" = xyes then : printf "%s\n" "#define HAVE_ISASTREAM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" if test "x$ac_cv_func_reallocarray" = xyes then : printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" reallocarray.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strcasecmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" if test "x$ac_cv_func_strcasestr" = xyes then : printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strcasestr.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" if test "x$ac_cv_func_strlcat" = xyes then : printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strlcat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes then : printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strlcpy.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "strndup" "ac_cv_func_strndup" if test "x$ac_cv_func_strndup" = xyes then : printf "%s\n" "#define HAVE_STRNDUP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" strndup.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS strndup.$ac_objext" ;; esac ;; esac fi ac_fn_c_check_func "$LINENO" "timingsafe_memcmp" "ac_cv_func_timingsafe_memcmp" if test "x$ac_cv_func_timingsafe_memcmp" = xyes then : printf "%s\n" "#define HAVE_TIMINGSAFE_MEMCMP 1" >>confdefs.h else case e in #( e) case " $LIBOBJS " in *" timingsafe_memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS timingsafe_memcmp.$ac_objext" ;; esac ;; esac fi if test "x$ac_cv_func_poll" = "xyes"; then POLL_TRUE= POLL_FALSE='#' else POLL_TRUE='#' POLL_FALSE= fi # Checks for non-standard functions and fallback to libbsd if we can # We only check for arc4random_buf, because if we have that, we don't # need/use getentropy. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char arc4random_buf (void); int main (void) { return arc4random_buf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : TRY_LIBBSD="no" else case e in #( e) TRY_LIBBSD="yes" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "x$TRY_LIBBSD" = "xyes" then : pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libbsd-overlay" >&5 printf %s "checking for libbsd-overlay... " >&6; } if test -n "$LIBBSD_CFLAGS"; then pkg_cv_LIBBSD_CFLAGS="$LIBBSD_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbsd-overlay\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbsd-overlay") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBSD_CFLAGS=`$PKG_CONFIG --cflags "libbsd-overlay" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBBSD_LIBS"; then pkg_cv_LIBBSD_LIBS="$LIBBSD_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libbsd-overlay\""; } >&5 ($PKG_CONFIG --exists --print-errors "libbsd-overlay") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBBSD_LIBS=`$PKG_CONFIG --libs "libbsd-overlay" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBBSD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libbsd-overlay" 2>&1` else LIBBSD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libbsd-overlay" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBBSD_PKG_ERRORS" >&5 : elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } : else LIBBSD_CFLAGS=$pkg_cv_LIBBSD_CFLAGS LIBBSD_LIBS=$pkg_cv_LIBBSD_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } CFLAGS="$CFLAGS $LIBBSD_CFLAGS" LIBS="$LIBS $LIBBSD_LIBS" fi fi ac_fn_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes then : ac_have_decl=1 else case e in #( e) ac_have_decl=0 ;; esac fi printf "%s\n" "#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 printf %s "checking for egrep -e... " >&6; } if test ${ac_cv_path_EGREP_TRADITIONAL+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in grep ggrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then : fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi if test "$ac_cv_path_EGREP_TRADITIONAL" then : ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" else case e in #( e) if test -z "$EGREP_TRADITIONAL"; then ac_path_EGREP_TRADITIONAL_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_prog in egrep do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. # Check for GNU $ac_path_EGREP_TRADITIONAL case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; #( *) ac_count=0 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_TRADITIONAL_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL fi ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SO_PEERCRED in sys/socket.h" >&5 printf %s "checking for SO_PEERCRED in sys/socket.h... " >&6; } if test ${xorg_cv_sys_have_so_peercred+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef SO_PEERCRED yes_have_so_peercred #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "yes_have_so_peercred" >/dev/null 2>&1 then : xorg_cv_sys_have_so_peercred=yes else case e in #( e) xorg_cv_sys_have_so_peercred=no ;; esac fi rm -rf conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_sys_have_so_peercred" >&5 printf "%s\n" "$xorg_cv_sys_have_so_peercred" >&6; } if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xno && test "x$xorg_cv_sys_have_so_peercred" = xno ; then printf "%s\n" "#define NO_LOCAL_CLIENT_CRED 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 printf %s "checking for sqrt in -lm... " >&6; } if test ${ac_cv_lib_m_sqrt+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char sqrt (void); int main (void) { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_sqrt=yes else case e in #( e) ac_cv_lib_m_sqrt=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 printf "%s\n" "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes then : printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h LIBS="-lm $LIBS" fi ac_fn_c_check_func "$LINENO" "cbrt" "ac_cv_func_cbrt" if test "x$ac_cv_func_cbrt" = xyes then : printf "%s\n" "#define HAVE_CBRT 1" >>confdefs.h fi # Check whether --enable-agp was given. if test ${enable_agp+y} then : enableval=$enable_agp; AGP=$enableval else case e in #( e) AGP=auto ;; esac fi if test "x$AGP" = "xauto" ; then for ac_header in linux/agpgart.h sys/agpio.h sys/agpgart.h do : as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | sed "$as_sed_sh"` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_$ac_header" | sed "$as_sed_cpp"` 1 _ACEOF AGP=yes fi done fi if test "x$AGP" = xyes; then AGP_TRUE= AGP_FALSE='#' else AGP_TRUE='#' AGP_FALSE= fi for ac_header in linux/fb.h do : ac_fn_c_check_header_compile "$LINENO" "linux/fb.h" "ac_cv_header_linux_fb_h" "$ac_includes_default" if test "x$ac_cv_header_linux_fb_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_FB_H 1" >>confdefs.h FBDEV=yes fi done if test "x$FBDEV" = xyes; then FBDEVHW_TRUE= FBDEVHW_FALSE='#' else FBDEVHW_TRUE='#' FBDEVHW_FALSE= fi for ac_header in sys/linker.h do : ac_fn_c_check_header_compile "$LINENO" "sys/linker.h" "ac_cv_header_sys_linker_h" "#include " if test "x$ac_cv_header_sys_linker_h" = xyes then : printf "%s\n" "#define HAVE_SYS_LINKER_H 1" >>confdefs.h ac_cv_sys_linker_h=yes else case e in #( e) ac_cv_sys_linker_h=no ;; esac fi done if test "x$ac_cv_sys_linker_h" = xyes; then FREEBSD_KLDLOAD_TRUE= FREEBSD_KLDLOAD_FALSE='#' else FREEBSD_KLDLOAD_TRUE='#' FREEBSD_KLDLOAD_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SYSV IPC" >&5 printf %s "checking for SYSV IPC... " >&6; } if test ${ac_cv_sysv_ipc+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main (void) { { int id; id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR); if (id < 0) return -1; return shmctl(id, IPC_RMID, 0); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_sysv_ipc=yes else case e in #( e) ac_cv_sysv_ipc=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sysv_ipc" >&5 printf "%s\n" "$ac_cv_sysv_ipc" >&6; } if test "x$ac_cv_sysv_ipc" = xyes; then printf "%s\n" "#define HAVE_SYSV_IPC 1" >>confdefs.h fi if test -c /dev/xf86 ; then printf "%s\n" "#define HAS_APERTURE_DRV 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "execinfo.h" "ac_cv_header_execinfo_h" "$ac_includes_default" if test "x$ac_cv_header_execinfo_h" = xyes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lc" >&5 printf %s "checking for backtrace in -lc... " >&6; } if test ${ac_cv_lib_c_backtrace+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char backtrace (void); int main (void) { return backtrace (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_c_backtrace=yes else case e in #( e) ac_cv_lib_c_backtrace=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_backtrace" >&5 printf "%s\n" "$ac_cv_lib_c_backtrace" >&6; } if test "x$ac_cv_lib_c_backtrace" = xyes then : printf "%s\n" "#define HAVE_BACKTRACE 1" >>confdefs.h printf "%s\n" "#define HAVE_EXECINFO_H 1" >>confdefs.h fi fi DEFAULT_INT10="x86emu" case $host_cpu in alpha*) ALPHA_VIDEO=yes case $host_os in *freebsd*) SYS_LIBS=-lio ;; *netbsd*) printf "%s\n" "#define USE_ALPHA_PIO 1" >>confdefs.h ;; esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" ;; arm*) ARM_VIDEO=yes DEFAULT_INT10="stub" ;; i*86) I386_VIDEO=yes case $host_os in *freebsd*) printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h ;; *dragonfly*) printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h ;; *netbsd*) printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h SYS_LIBS=-li386 ;; *openbsd*) printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h SYS_LIBS=-li386 ;; esac ;; powerpc*) PPC_VIDEO=yes case $host_os in *freebsd*) DEFAULT_INT10=stub ;; esac ;; sparc*) SPARC64_VIDEO=yes BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; x86_64*|amd64*) I386_VIDEO=yes case $host_os in *freebsd*) printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h ;; *dragonfly*) printf "%s\n" "#define USE_DEV_IO 1" >>confdefs.h ;; *netbsd*) printf "%s\n" "#define USE_I386_IOPL 1" >>confdefs.h SYS_LIBS=-lx86_64 ;; *openbsd*) printf "%s\n" "#define USE_AMD64_IOPL 1" >>confdefs.h SYS_LIBS=-lamd64 ;; esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; ia64*) GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; s390*) GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; esac if test "x$ALPHA_VIDEO" = xyes; then ALPHA_VIDEO_TRUE= ALPHA_VIDEO_FALSE='#' else ALPHA_VIDEO_TRUE='#' ALPHA_VIDEO_FALSE= fi if test "x$ARM_VIDEO" = xyes; then ARM_VIDEO_TRUE= ARM_VIDEO_FALSE='#' else ARM_VIDEO_TRUE='#' ARM_VIDEO_FALSE= fi if test "x$I386_VIDEO" = xyes; then I386_VIDEO_TRUE= I386_VIDEO_FALSE='#' else I386_VIDEO_TRUE='#' I386_VIDEO_FALSE= fi if test "x$PPC_VIDEO" = xyes; then PPC_VIDEO_TRUE= PPC_VIDEO_FALSE='#' else PPC_VIDEO_TRUE='#' PPC_VIDEO_FALSE= fi if test "x$SPARC64_VIDEO" = xyes; then SPARC64_VIDEO_TRUE= SPARC64_VIDEO_FALSE='#' else SPARC64_VIDEO_TRUE='#' SPARC64_VIDEO_FALSE= fi DRI=no case $host_os in *freebsd* | *dragonfly*) case $host_os in kfreebsd*-gnu) ;; *) printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h ;; esac printf "%s\n" "#define PCCONS_SUPPORT 1" >>confdefs.h printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h printf "%s\n" "#define SYSCONS_SUPPORT 1" >>confdefs.h DRI=yes ;; *netbsd*) printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h printf "%s\n" "#define PCCONS_SUPPORT 1" >>confdefs.h printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h printf "%s\n" "#define WSCONS_SUPPORT 1" >>confdefs.h DRI=yes ;; *openbsd*) printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h printf "%s\n" "#define PCVT_SUPPORT 1" >>confdefs.h printf "%s\n" "#define WSCONS_SUPPORT 1" >>confdefs.h ;; *linux*) DRI=yes ;; *solaris*) DRI=yes ;; darwin*) printf "%s\n" "#define CSRG_BASED 1" >>confdefs.h ;; cygwin*|mingw*) CFLAGS="$CFLAGS -DFD_SETSIZE=512" ;; esac PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` VENDOR_RELEASE="((10000000) + (($PVMAJOR) * 100000) + (($PVM) * 1000) + $PVP)" VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" VENDOR_NAME="The X.Org Foundation" VENDOR_NAME_SHORT="X.Org" VENDOR_WEB="http://wiki.x.org" # Check whether --enable-werror was given. if test ${enable_werror+y} then : enableval=$enable_werror; as_fn_error $? "--enable-werror has been replaced by --enable-strict-compilation" "$LINENO" 5 fi # Check whether --enable-debug was given. if test ${enable_debug+y} then : enableval=$enable_debug; DEBUGGING=$enableval else case e in #( e) DEBUGGING=no ;; esac fi # Check whether --with-int10 was given. if test ${with_int10+y} then : withval=$with_int10; INT10="$withval" else case e in #( e) INT10="$DEFAULT_INT10" ;; esac fi # Check whether --with-vendor-name was given. if test ${with_vendor_name+y} then : withval=$with_vendor_name; VENDOR_NAME="$withval" fi # Check whether --with-vendor-name-short was given. if test ${with_vendor_name_short+y} then : withval=$with_vendor_name_short; VENDOR_NAME_SHORT="$withval" fi # Check whether --with-vendor-web was given. if test ${with_vendor_web+y} then : withval=$with_vendor_web; VENDOR_WEB="$withval" fi # Check whether --with-module-dir was given. if test ${with_module_dir+y} then : withval=$with_module_dir; moduledir="$withval" else case e in #( e) moduledir="${libdir}/xorg/modules" ;; esac fi # Check whether --with-log-dir was given. if test ${with_log_dir+y} then : withval=$with_log_dir; logdir="$withval" else case e in #( e) logdir="$localstatedir/log" ;; esac fi # Check whether --with-builder-addr was given. if test ${with_builder_addr+y} then : withval=$with_builder_addr; BUILDERADDR="$withval" else case e in #( e) BUILDERADDR="xorg@lists.freedesktop.org" ;; esac fi # Check whether --with-builderstring was given. if test ${with_builderstring+y} then : withval=$with_builderstring; BUILDERSTRING="$withval" fi # Check whether --enable-listen-tcp was given. if test ${enable_listen_tcp+y} then : enableval=$enable_listen_tcp; LISTEN_TCP=$enableval else case e in #( e) LISTEN_TCP=no ;; esac fi # Check whether --enable-listen-unix was given. if test ${enable_listen_unix+y} then : enableval=$enable_listen_unix; LISTEN_UNIX=$enableval else case e in #( e) LISTEN_UNIX=yes ;; esac fi # Check whether --enable-listen-local was given. if test ${enable_listen_local+y} then : enableval=$enable_listen_local; LISTEN_LOCAL=$enableval else case e in #( e) LISTEN_LOCAL=yes ;; esac fi case $host_os in linux*) FALLBACK_INPUT_DRIVER="libinput" ;; *) FALLBACK_INPUT_DRIVER="" ;; esac # Check whether --with-fallback-input-driver was given. if test ${with_fallback_input_driver+y} then : withval=$with_fallback_input_driver; FALLBACK_INPUT_DRIVER=$withval fi if test "x$FALLBACK_INPUT_DRIVER" = "xno"; then FALLBACK_INPUT_DRIVER="" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fallback input driver" >&5 printf %s "checking for fallback input driver... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FALLBACK_INPUT_DRIVER" >&5 printf "%s\n" "$FALLBACK_INPUT_DRIVER" >&6; } printf "%s\n" "#define FALLBACK_INPUT_DRIVER \"$FALLBACK_INPUT_DRIVER\"" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for root directory for font files" >&5 printf %s "checking for root directory for font files... " >&6; } # Check whether --with-fontrootdir was given. if test ${with_fontrootdir+y} then : withval=$with_fontrootdir; FONTROOTDIR="$withval" fi # if --with-fontrootdir not specified... if test "x${FONTROOTDIR}" = "x"; then FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` fi # ...and if pkg-config didn't find fontdir in fontutil.pc... if test "x${FONTROOTDIR}" = "x"; then FONTROOTDIR="${datadir}/fonts/X11" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTROOTDIR}" >&5 printf "%s\n" "${FONTROOTDIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for misc files" >&5 printf %s "checking for directory for misc files... " >&6; } # Check whether --with-fontmiscdir was given. if test ${with_fontmiscdir+y} then : withval=$with_fontmiscdir; FONTMISCDIR="${withval}" else case e in #( e) FONTMISCDIR='${FONTROOTDIR}/misc' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTMISCDIR}" >&5 printf "%s\n" "${FONTMISCDIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for OTF files" >&5 printf %s "checking for directory for OTF files... " >&6; } # Check whether --with-fontotfdir was given. if test ${with_fontotfdir+y} then : withval=$with_fontotfdir; FONTOTFDIR="${withval}" else case e in #( e) FONTOTFDIR='${FONTROOTDIR}/OTF' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTOTFDIR}" >&5 printf "%s\n" "${FONTOTFDIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for TTF files" >&5 printf %s "checking for directory for TTF files... " >&6; } # Check whether --with-fontttfdir was given. if test ${with_fontttfdir+y} then : withval=$with_fontttfdir; FONTTTFDIR="${withval}" else case e in #( e) FONTTTFDIR='${FONTROOTDIR}/TTF' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTTTFDIR}" >&5 printf "%s\n" "${FONTTTFDIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for Type1 files" >&5 printf %s "checking for directory for Type1 files... " >&6; } # Check whether --with-fonttype1dir was given. if test ${with_fonttype1dir+y} then : withval=$with_fonttype1dir; FONTTYPE1DIR="${withval}" else case e in #( e) FONTTYPE1DIR='${FONTROOTDIR}/Type1' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONTTYPE1DIR}" >&5 printf "%s\n" "${FONTTYPE1DIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for 75dpi files" >&5 printf %s "checking for directory for 75dpi files... " >&6; } # Check whether --with-font75dpidir was given. if test ${with_font75dpidir+y} then : withval=$with_font75dpidir; FONT75DPIDIR="${withval}" else case e in #( e) FONT75DPIDIR='${FONTROOTDIR}/75dpi' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONT75DPIDIR}" >&5 printf "%s\n" "${FONT75DPIDIR}" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for directory for 100dpi files" >&5 printf %s "checking for directory for 100dpi files... " >&6; } # Check whether --with-font100dpidir was given. if test ${with_font100dpidir+y} then : withval=$with_font100dpidir; FONT100DPIDIR="${withval}" else case e in #( e) FONT100DPIDIR='${FONTROOTDIR}/100dpi' ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${FONT100DPIDIR}" >&5 printf "%s\n" "${FONT100DPIDIR}" >&6; } DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/" case $host_os in darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; esac # Check whether --with-default-font-path was given. if test ${with_default_font_path+y} then : withval=$with_default_font_path; FONTPATH="$withval" else case e in #( e) FONTPATH="${DEFAULT_FONT_PATH}" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default font path" >&5 printf %s "checking for default font path... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FONTPATH" >&5 printf "%s\n" "$FONTPATH" >&6; } # Check whether --with-xkb-path was given. if test ${with_xkb_path+y} then : withval=$with_xkb_path; XKBPATH="$withval" else case e in #( e) XKBPATH="auto" ;; esac fi # Check whether --with-xkb-output was given. if test ${with_xkb_output+y} then : withval=$with_xkb_output; XKBOUTPUT="$withval" else case e in #( e) XKBOUTPUT="compiled" ;; esac fi # Check whether --with-default-xkb-rules was given. if test ${with_default_xkb_rules+y} then : withval=$with_default_xkb_rules; XKB_DFLT_RULES="$withval" else case e in #( e) XKB_DFLT_RULES="" ;; esac fi # Check whether --with-default-xkb-model was given. if test ${with_default_xkb_model+y} then : withval=$with_default_xkb_model; XKB_DFLT_MODEL="$withval" else case e in #( e) XKB_DFLT_MODEL="pc105" ;; esac fi # Check whether --with-default-xkb-layout was given. if test ${with_default_xkb_layout+y} then : withval=$with_default_xkb_layout; XKB_DFLT_LAYOUT="$withval" else case e in #( e) XKB_DFLT_LAYOUT="us" ;; esac fi # Check whether --with-default-xkb-variant was given. if test ${with_default_xkb_variant+y} then : withval=$with_default_xkb_variant; XKB_DFLT_VARIANT="$withval" else case e in #( e) XKB_DFLT_VARIANT="" ;; esac fi # Check whether --with-default-xkb-options was given. if test ${with_default_xkb_options+y} then : withval=$with_default_xkb_options; XKB_DFLT_OPTIONS="$withval" else case e in #( e) XKB_DFLT_OPTIONS="" ;; esac fi # Check whether --with-serverconfig-path was given. if test ${with_serverconfig_path+y} then : withval=$with_serverconfig_path; SERVERCONFIG="$withval" else case e in #( e) SERVERCONFIG="${libdir}/xorg" ;; esac fi # Check whether --with-apple-applications-dir was given. if test ${with_apple_applications_dir+y} then : withval=$with_apple_applications_dir; APPLE_APPLICATIONS_DIR="${withval}" else case e in #( e) APPLE_APPLICATIONS_DIR="/Applications/Utilities" ;; esac fi # Check whether --with-apple-application-name was given. if test ${with_apple_application_name+y} then : withval=$with_apple_application_name; APPLE_APPLICATION_NAME="${withval}" else case e in #( e) APPLE_APPLICATION_NAME="X11" ;; esac fi # Check whether --with-bundle-id-prefix was given. if test ${with_bundle_id_prefix+y} then : withval=$with_bundle_id_prefix; BUNDLE_ID_PREFIX="${withval}" fi printf "%s\n" "#define BUNDLE_ID_PREFIX \"$BUNDLE_ID_PREFIX\"" >>confdefs.h # Check whether --with-bundle-version was given. if test ${with_bundle_version+y} then : withval=$with_bundle_version; BUNDLE_VERSION="${withval}" else case e in #( e) BUNDLE_VERSION="21.1.16" ;; esac fi # Check whether --with-bundle-version-string was given. if test ${with_bundle_version_string+y} then : withval=$with_bundle_version_string; BUNDLE_VERSION_STRING="${withval}" else case e in #( e) BUNDLE_VERSION_STRING="${PACKAGE_VERSION}" ;; esac fi # Check whether --enable-sparkle was given. if test ${enable_sparkle+y} then : enableval=$enable_sparkle; XQUARTZ_SPARKLE="${enableval}" else case e in #( e) XQUARTZ_SPARKLE="no" ;; esac fi # Check whether --with-sparkle-feed-url was given. if test ${with_sparkle_feed_url+y} then : withval=$with_sparkle_feed_url; XQUARTZ_SPARKLE_FEED_URL="${withval}" else case e in #( e) XQUARTZ_SPARKLE_FEED_URL="https://www.xquartz.org/releases/sparkle/release.xml" ;; esac fi # Check whether --enable-visibility was given. if test ${enable_visibility+y} then : enableval=$enable_visibility; SYMBOL_VISIBILITY=$enableval else case e in #( e) SYMBOL_VISIBILITY=auto ;; esac fi # Check whether --with-khronos-spec-dir was given. if test ${with_khronos_spec_dir+y} then : withval=$with_khronos_spec_dir; KHRONOS_SPEC_DIR="${withval}" else case e in #( e) KHRONOS_SPEC_DIR=auto ;; esac fi # Check whether --enable-composite was given. if test ${enable_composite+y} then : enableval=$enable_composite; COMPOSITE=$enableval else case e in #( e) COMPOSITE=yes ;; esac fi # Check whether --enable-mitshm was given. if test ${enable_mitshm+y} then : enableval=$enable_mitshm; MITSHM=$enableval else case e in #( e) MITSHM=auto ;; esac fi # Check whether --enable-xres was given. if test ${enable_xres+y} then : enableval=$enable_xres; RES=$enableval else case e in #( e) RES=yes ;; esac fi # Check whether --enable-record was given. if test ${enable_record+y} then : enableval=$enable_record; RECORD=$enableval else case e in #( e) RECORD=yes ;; esac fi # Check whether --enable-xv was given. if test ${enable_xv+y} then : enableval=$enable_xv; XV=$enableval else case e in #( e) XV=yes ;; esac fi # Check whether --enable-xvmc was given. if test ${enable_xvmc+y} then : enableval=$enable_xvmc; XVMC=$enableval else case e in #( e) XVMC=yes ;; esac fi # Check whether --enable-dga was given. if test ${enable_dga+y} then : enableval=$enable_dga; DGA=$enableval else case e in #( e) DGA=auto ;; esac fi # Check whether --enable-screensaver was given. if test ${enable_screensaver+y} then : enableval=$enable_screensaver; SCREENSAVER=$enableval else case e in #( e) SCREENSAVER=yes ;; esac fi # Check whether --enable-xdmcp was given. if test ${enable_xdmcp+y} then : enableval=$enable_xdmcp; XDMCP=$enableval else case e in #( e) XDMCP=auto ;; esac fi # Check whether --enable-xdm-auth-1 was given. if test ${enable_xdm_auth_1+y} then : enableval=$enable_xdm_auth_1; XDMAUTH=$enableval else case e in #( e) XDMAUTH=auto ;; esac fi # Check whether --enable-glx was given. if test ${enable_glx+y} then : enableval=$enable_glx; GLX=$enableval else case e in #( e) GLX=yes ;; esac fi # Check whether --enable-dri was given. if test ${enable_dri+y} then : enableval=$enable_dri; DRI=$enableval fi # Check whether --enable-dri2 was given. if test ${enable_dri2+y} then : enableval=$enable_dri2; DRI2=$enableval else case e in #( e) DRI2=auto ;; esac fi # Check whether --enable-dri3 was given. if test ${enable_dri3+y} then : enableval=$enable_dri3; DRI3=$enableval else case e in #( e) DRI3=auto ;; esac fi # Check whether --enable-present was given. if test ${enable_present+y} then : enableval=$enable_present; PRESENT=$enableval else case e in #( e) PRESENT=yes ;; esac fi # Check whether --enable-xinerama was given. if test ${enable_xinerama+y} then : enableval=$enable_xinerama; XINERAMA=$enableval else case e in #( e) XINERAMA=yes ;; esac fi # Check whether --enable-xf86vidmode was given. if test ${enable_xf86vidmode+y} then : enableval=$enable_xf86vidmode; XF86VIDMODE=$enableval else case e in #( e) XF86VIDMODE=auto ;; esac fi # Check whether --enable-xace was given. if test ${enable_xace+y} then : enableval=$enable_xace; XACE=$enableval else case e in #( e) XACE=yes ;; esac fi # Check whether --enable-xselinux was given. if test ${enable_xselinux+y} then : enableval=$enable_xselinux; XSELINUX=$enableval else case e in #( e) XSELINUX=no ;; esac fi # Check whether --enable-xcsecurity was given. if test ${enable_xcsecurity+y} then : enableval=$enable_xcsecurity; XCSECURITY=$enableval else case e in #( e) XCSECURITY=no ;; esac fi # Check whether --enable-dbe was given. if test ${enable_dbe+y} then : enableval=$enable_dbe; DBE=$enableval else case e in #( e) DBE=yes ;; esac fi # Check whether --enable-xf86bigfont was given. if test ${enable_xf86bigfont+y} then : enableval=$enable_xf86bigfont; XF86BIGFONT=$enableval else case e in #( e) XF86BIGFONT=no ;; esac fi # Check whether --enable-dpms was given. if test ${enable_dpms+y} then : enableval=$enable_dpms; DPMSExtension=$enableval else case e in #( e) DPMSExtension=yes ;; esac fi # Check whether --enable-config-udev was given. if test ${enable_config_udev+y} then : enableval=$enable_config_udev; CONFIG_UDEV=$enableval else case e in #( e) CONFIG_UDEV=auto ;; esac fi # Check whether --enable-config-udev-kms was given. if test ${enable_config_udev_kms+y} then : enableval=$enable_config_udev_kms; CONFIG_UDEV_KMS=$enableval else case e in #( e) CONFIG_UDEV_KMS=auto ;; esac fi # Check whether --enable-config-hal was given. if test ${enable_config_hal+y} then : enableval=$enable_config_hal; CONFIG_HAL=$enableval else case e in #( e) CONFIG_HAL=auto ;; esac fi # Check whether --enable-config-wscons was given. if test ${enable_config_wscons+y} then : enableval=$enable_config_wscons; CONFIG_WSCONS=$enableval else case e in #( e) CONFIG_WSCONS=auto ;; esac fi # Check whether --enable-xfree86-utils was given. if test ${enable_xfree86_utils+y} then : enableval=$enable_xfree86_utils; XF86UTILS=$enableval else case e in #( e) XF86UTILS=yes ;; esac fi # Check whether --enable-vgahw was given. if test ${enable_vgahw+y} then : enableval=$enable_vgahw; VGAHW=$enableval else case e in #( e) VGAHW=yes ;; esac fi # Check whether --enable-int10-module was given. if test ${enable_int10_module+y} then : enableval=$enable_int10_module; INT10MODULE=$enableval else case e in #( e) INT10MODULE=yes ;; esac fi # Check whether --enable-windowsdri was given. if test ${enable_windowsdri+y} then : enableval=$enable_windowsdri; WINDOWSDRI=$enableval else case e in #( e) WINDOWSDRI=auto ;; esac fi # Check whether --enable-libdrm was given. if test ${enable_libdrm+y} then : enableval=$enable_libdrm; DRM=$enableval else case e in #( e) DRM=yes ;; esac fi # Check whether --enable-clientids was given. if test ${enable_clientids+y} then : enableval=$enable_clientids; CLIENTIDS=$enableval else case e in #( e) CLIENTIDS=yes ;; esac fi # Check whether --enable-pciaccess was given. if test ${enable_pciaccess+y} then : enableval=$enable_pciaccess; PCI=$enableval else case e in #( e) PCI=yes ;; esac fi # Check whether --enable-linux_acpi was given. if test ${enable_linux_acpi+y} then : enableval=$enable_linux_acpi; enable_linux_acpi=$enableval else case e in #( e) enable_linux_acpi=yes ;; esac fi # Check whether --enable-linux_apm was given. if test ${enable_linux_apm+y} then : enableval=$enable_linux_apm; enable_linux_apm=$enableval else case e in #( e) enable_linux_apm=yes ;; esac fi # Check whether --enable-systemd-logind was given. if test ${enable_systemd_logind+y} then : enableval=$enable_systemd_logind; SYSTEMD_LOGIND=$enableval else case e in #( e) SYSTEMD_LOGIND=auto ;; esac fi # Check whether --enable-suid-wrapper was given. if test ${enable_suid_wrapper+y} then : enableval=$enable_suid_wrapper; SUID_WRAPPER=$enableval else case e in #( e) SUID_WRAPPER=no ;; esac fi # Check whether --enable-xorg was given. if test ${enable_xorg+y} then : enableval=$enable_xorg; XORG=$enableval else case e in #( e) XORG=auto ;; esac fi # Check whether --enable-xvfb was given. if test ${enable_xvfb+y} then : enableval=$enable_xvfb; XVFB=$enableval else case e in #( e) XVFB=yes ;; esac fi # Check whether --enable-xnest was given. if test ${enable_xnest+y} then : enableval=$enable_xnest; XNEST=$enableval else case e in #( e) XNEST=auto ;; esac fi # Check whether --enable-xquartz was given. if test ${enable_xquartz+y} then : enableval=$enable_xquartz; XQUARTZ=$enableval else case e in #( e) XQUARTZ=auto ;; esac fi # Check whether --enable-standalone-xpbproxy was given. if test ${enable_standalone_xpbproxy+y} then : enableval=$enable_standalone_xpbproxy; STANDALONE_XPBPROXY=$enableval else case e in #( e) STANDALONE_XPBPROXY=no ;; esac fi # Check whether --enable-xwin was given. if test ${enable_xwin+y} then : enableval=$enable_xwin; XWIN=$enableval else case e in #( e) XWIN=auto ;; esac fi # Check whether --enable-glamor was given. if test ${enable_glamor+y} then : enableval=$enable_glamor; GLAMOR=$enableval else case e in #( e) GLAMOR=auto ;; esac fi # Check whether --enable-xf86-input-inputtest was given. if test ${enable_xf86_input_inputtest+y} then : enableval=$enable_xf86_input_inputtest; XORG_DRIVER_INPUT_INPUTTEST=$enableval else case e in #( e) XORG_DRIVER_INPUT_INPUTTEST=yes ;; esac fi # Check whether --enable-kdrive was given. if test ${enable_kdrive+y} then : enableval=$enable_kdrive; KDRIVE=$enableval else case e in #( e) KDRIVE=no ;; esac fi # Check whether --enable-xephyr was given. if test ${enable_xephyr+y} then : enableval=$enable_xephyr; XEPHYR=$enableval else case e in #( e) XEPHYR=auto ;; esac fi # Check whether --enable-libunwind was given. if test ${enable_libunwind+y} then : enableval=$enable_libunwind; LIBUNWIND="$enableval" else case e in #( e) LIBUNWIND="auto" ;; esac fi # Check whether --enable-xshmfence was given. if test ${enable_xshmfence+y} then : enableval=$enable_xshmfence; XSHMFENCE="$enableval" else case e in #( e) XSHMFENCE="auto" ;; esac fi # Check whether --enable-install-setuid was given. if test ${enable_install_setuid+y} then : enableval=$enable_install_setuid; SETUID=$enableval else case e in #( e) SETUID=auto ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if we can install the Xorg server as root" >&5 printf %s "checking to see if we can install the Xorg server as root... " >&6; } if test "x$SETUID" = "xauto" ; then case $host_os in cygwin*) SETUID="no" ;; mingw*) SETUID="no" ;; darwin*) SETUID="no" ;; *) case $host_cpu in sparc) SETUID="no" ;; *) SETUID="yes" ;; esac esac if test "x$SETUID" = xyes; then touch testfile chown root testfile > /dev/null 2>&1 || SETUID="no" rm -f testfile fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SETUID" >&5 printf "%s\n" "$SETUID" >&6; } if test "x$SETUID" = "xyes"; then INSTALL_SETUID_TRUE= INSTALL_SETUID_FALSE='#' else INSTALL_SETUID_TRUE='#' INSTALL_SETUID_FALSE= fi # Transport selection macro from xtrans.m4 case $host_os in mingw*) unixdef="no" ;; *) unixdef="yes" ;; esac # Check whether --enable-unix-transport was given. if test ${enable_unix_transport+y} then : enableval=$enable_unix_transport; UNIXCONN=$enableval else case e in #( e) UNIXCONN=$unixdef ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support UNIX socket connections" >&5 printf %s "checking if Xtrans should support UNIX socket connections... " >&6; } if test "$UNIXCONN" = "yes"; then printf "%s\n" "#define UNIXCONN 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $UNIXCONN" >&5 printf "%s\n" "$UNIXCONN" >&6; } # Check whether --enable-tcp-transport was given. if test ${enable_tcp_transport+y} then : enableval=$enable_tcp_transport; TCPCONN=$enableval else case e in #( e) TCPCONN=yes ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support TCP socket connections" >&5 printf %s "checking if Xtrans should support TCP socket connections... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TCPCONN" >&5 printf "%s\n" "$TCPCONN" >&6; } if test "$TCPCONN" = "yes"; then printf "%s\n" "#define TCPCONN 1" >>confdefs.h # SVR4 hides these in libraries other than libc { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 printf %s "checking for library containing socket... " >&6; } if test ${ac_cv_search_socket+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char socket (void); int main (void) { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_socket+y} then : break fi done if test ${ac_cv_search_socket+y} then : else case e in #( e) ac_cv_search_socket=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 printf "%s\n" "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 printf %s "checking for library containing gethostbyname... " >&6; } if test ${ac_cv_search_gethostbyname+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gethostbyname (void); int main (void) { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_gethostbyname+y} then : break fi done if test ${ac_cv_search_gethostbyname+y} then : else case e in #( e) ac_cv_search_gethostbyname=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 printf "%s\n" "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 printf %s "checking for main in -lws2_32... " >&6; } if test ${ac_cv_lib_ws2_32_main+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ws2_32_main=yes else case e in #( e) ac_cv_lib_ws2_32_main=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 printf "%s\n" "$ac_cv_lib_ws2_32_main" >&6; } if test "x$ac_cv_lib_ws2_32_main" = xyes then : printf "%s\n" "#define HAVE_LIBWS2_32 1" >>confdefs.h LIBS="-lws2_32 $LIBS" fi fi # Needs to come after above checks for libsocket & libnsl for SVR4 systems # Check whether --enable-ipv6 was given. if test ${enable_ipv6+y} then : enableval=$enable_ipv6; IPV6CONN=$enableval else case e in #( e) ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes then : IPV6CONN=yes else case e in #( e) IPV6CONN=no ;; esac fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if IPv6 support should be built" >&5 printf %s "checking if IPv6 support should be built... " >&6; } if test "$IPV6CONN" = "yes"; then printf "%s\n" "#define IPv6 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $IPV6CONN" >&5 printf "%s\n" "$IPV6CONN" >&6; } # 4.3BSD-Reno added a new member to struct sockaddr_in ac_fn_c_check_member "$LINENO" "struct sockaddr_in" "sin_len" "ac_cv_member_struct_sockaddr_in_sin_len" " #include #include #include " if test "x$ac_cv_member_struct_sockaddr_in_sin_len" = xyes then : printf "%s\n" "#define BSD44SOCKETS 1" >>confdefs.h fi # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " $ac_includes_default #include " if test "x$ac_cv_type_socklen_t" = xyes then : printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h fi # XPG4v2/UNIX95 added msg_control - check to see if we need to define # _XOPEN_SOURCE to get it (such as on Solaris) ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " $ac_includes_default #include " if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes then : fi # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then unset ac_cv_member_struct_msghdr_msg_control { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5 printf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=600" >&6;} ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " #define _XOPEN_SOURCE 600 $ac_includes_default #include " if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes then : printf "%s\n" "#define _XOPEN_SOURCE 600" >>confdefs.h fi fi # If that didn't work, fall back to XPG5/UNIX98 with C89 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then unset ac_cv_member_struct_msghdr_msg_control { printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5 printf "%s\n" "$as_me: trying again with _XOPEN_SOURCE=500" >&6;} ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " #define _XOPEN_SOURCE 500 $ac_includes_default #include " if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes then : printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h fi fi fi case $host_os in solaris*) localdef="yes" ;; *) localdef="no" ;; esac # Check whether --enable-local-transport was given. if test ${enable_local_transport+y} then : enableval=$enable_local_transport; LOCALCONN=$enableval else case e in #( e) LOCALCONN=$localdef ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Xtrans should support os-specific local connections" >&5 printf %s "checking if Xtrans should support os-specific local connections... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LOCALCONN" >&5 printf "%s\n" "$LOCALCONN" >&6; } if test "$LOCALCONN" = "yes"; then printf "%s\n" "#define LOCALCONN 1" >>confdefs.h fi # Other functions Xtrans may need ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes then : printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes then : printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h fi # Secure RPC detection macro from xtrans.m4 # Check whether --enable-secure-rpc was given. if test ${enable_secure_rpc+y} then : enableval=$enable_secure_rpc; SECURE_RPC=$enableval else case e in #( e) SECURE_RPC="try" ;; esac fi if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then FOUND_SECURE_RPC="no" for ac_func in authdes_seccreate authdes_create do : as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF FOUND_SECURE_RPC="yes" fi done if test "x$FOUND_SECURE_RPC" = "xno" ; then if test "x$SECURE_RPC" = "xyes" ; then as_fn_error $? "Secure RPC requested, but required functions not found" "$LINENO" 5 fi SECURE_RPC="no" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getsecretkey" >&5 printf %s "checking for library containing getsecretkey... " >&6; } if test ${ac_cv_search_getsecretkey+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char getsecretkey (void); int main (void) { return getsecretkey (); ; return 0; } _ACEOF for ac_lib in '' rpcsvc do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO" then : ac_cv_search_getsecretkey=$ac_res fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext if test ${ac_cv_search_getsecretkey+y} then : break fi done if test ${ac_cv_search_getsecretkey+y} then : else case e in #( e) ac_cv_search_getsecretkey=no ;; esac fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getsecretkey" >&5 printf "%s\n" "$ac_cv_search_getsecretkey" >&6; } ac_res=$ac_cv_search_getsecretkey if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi SECURE_RPC="yes" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if Secure RPC authentication (\"SUN-DES-1\") should be supported" >&5 printf %s "checking if Secure RPC authentication (\"SUN-DES-1\") should be supported... " >&6; } if test "x$SECURE_RPC" = "xyes" ; then printf "%s\n" "#define SECURE_RPC 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SECURE_RPC" >&5 printf "%s\n" "$SECURE_RPC" >&6; } if test "x$SECURE_RPC" = xyes; then SECURE_RPC_TRUE= SECURE_RPC_FALSE='#' else SECURE_RPC_TRUE='#' SECURE_RPC_FALSE= fi if test "x$INT10" = xvm86; then INT10_VM86_TRUE= INT10_VM86_FALSE='#' else INT10_VM86_TRUE='#' INT10_VM86_FALSE= fi if test "x$INT10" = xx86emu; then INT10_X86EMU_TRUE= INT10_X86EMU_FALSE='#' else INT10_X86EMU_TRUE='#' INT10_X86EMU_FALSE= fi if test "x$INT10" = xstub; then INT10_STUB_TRUE= INT10_STUB_FALSE='#' else INT10_STUB_TRUE='#' INT10_STUB_FALSE= fi case $host_os in cygwin* | mingw*) CONFIG_HAL=no CONFIG_UDEV=no CONFIG_UDEV_KMS=no DGA=no DRM=no DRI2=no DRI3=no INT10MODULE=no PCI=no VGAHW=no XF86UTILS=no XF86VIDMODE=no XSELINUX=no SYMBOL_VISIBILITY=no ;; darwin*) PCI=no INT10MODULE=no VGAHW=no DRM=no DRI2=no DRI3=no if test x$XQUARTZ = xauto; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xquartz" >&5 printf %s "checking whether to build Xquartz... " >&6; } if test ${xorg_cv_Carbon_framework+y} then : printf %s "(cached) " >&6 else case e in #( e) save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -framework Carbon" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ char FSFindFolder(); int main() { FSFindFolder(); return 0;} _ACEOF if ac_fn_c_try_link "$LINENO" then : xorg_cv_Carbon_framework=yes else case e in #( e) xorg_cv_Carbon_framework=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_Carbon_framework" >&5 printf "%s\n" "$xorg_cv_Carbon_framework" >&6; } if test "X$xorg_cv_Carbon_framework" = Xyes; then XQUARTZ=yes else XQUARTZ=no fi fi if test "x$XQUARTZ" = xyes ; then XQUARTZ=yes XVFB=no XNEST=no DGA=no DPMSExtension=no XF86VIDMODE=no fi ;; gnu*) DRM=no DRI2=no DRI3=no ;; *) XQUARTZ=no ;; esac XEXT_INC='-I$(top_srcdir)/Xext' XEXT_LIB='$(top_builddir)/Xext/libXext.la' VIDEOPROTO="videoproto" COMPOSITEPROTO="compositeproto >= 0.4" RECORDPROTO="recordproto >= 1.13.99.1" SCRNSAVERPROTO="scrnsaverproto >= 1.1" RESOURCEPROTO="resourceproto >= 1.2.0" DRIPROTO="xf86driproto >= 2.1.0" DRI2PROTO="dri2proto >= 2.8" DRI3PROTO="dri3proto >= 1.2" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" DGAPROTO="xf86dgaproto >= 2.0.99.1" GLPROTO="glproto >= 1.4.17" VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" APPLEWMPROTO="applewmproto >= 1.4" LIBXSHMFENCE="xshmfence >= 1.1" XPROTO="xproto >= 7.0.31" RANDRPROTO="randrproto >= 1.6.0" RENDERPROTO="renderproto >= 0.11" XEXTPROTO="xextproto >= 7.2.99.901" INPUTPROTO="inputproto >= 2.3.99.1" KBPROTO="kbproto >= 1.0.3" FONTSPROTO="fontsproto >= 2.1.3" FIXESPROTO="fixesproto >= 6.0" DAMAGEPROTO="damageproto >= 1.1" XCMISCPROTO="xcmiscproto >= 1.2.0" BIGREQSPROTO="bigreqsproto >= 1.1.0" XTRANS="xtrans >= 1.3.5" PRESENTPROTO="presentproto >= 1.2" LIBAPPLEWM="applewm >= 1.4" LIBDRI="dri >= 7.8.0" LIBDRM="libdrm >= 2.4.89" LIBEGL="egl" LIBGBM="gbm >= 10.2.0" LIBGL="gl >= 1.2" LIBXEXT="xext >= 1.0.99.4" LIBXFONT="xfont2 >= 2.0.0" LIBXI="xi >= 1.2.99.1" LIBXTST="xtst >= 1.0.99.2" LIBPCIACCESS="pciaccess >= 0.12.901" LIBUDEV="libudev >= 143" LIBSELINUX="libselinux >= 2.0.86" LIBDBUS="dbus-1 >= 1.0" LIBPIXMAN="pixman-1 >= 0.27.2" LIBXCVT="libxcvt" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBPIXMAN" >&5 printf %s "checking for $LIBPIXMAN... " >&6; } if test -n "$PIXMAN_CFLAGS"; then pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$LIBPIXMAN" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PIXMAN_LIBS"; then pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$LIBPIXMAN" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPIXMAN" 2>&1` else PIXMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPIXMAN" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PIXMAN_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($LIBPIXMAN) were not met: $PIXMAN_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PIXMAN_CFLAGS and PIXMAN_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PIXMAN_CFLAGS and PIXMAN_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN" # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc ac_fn_check_decl "$LINENO" "PTHREAD_MUTEX_RECURSIVE" "ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_PTHREAD_MUTEX_RECURSIVE" = xyes then : HAVE_RECURSIVE_MUTEX=yes else case e in #( e) HAVE_RECURSIVE_MUTEX=no ;; esac fi THREAD_DEFAULT=no if test "x$HAVE_RECURSIVE_MUTEX" = "xyes" ; then THREAD_DEFAULT=yes fi case $host_os in mingw*) THREAD_DEFAULT=no ;; *) esac # Check whether --enable-input-thread was given. if test ${enable_input_thread+y} then : enableval=$enable_input_thread; INPUTTHREAD=$enableval else case e in #( e) INPUTTHREAD=$THREAD_DEFAULT ;; esac fi if test "x$INPUTTHREAD" = "xyes" ; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ax_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 printf %s "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char pthread_join (void); int main (void) { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test x"$ax_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case ${host_os} in solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" ;; darwin*) ax_pthread_flags="-pthread $ax_pthread_flags" ;; netbsd*) # use libc stubs, don't link against libpthread, to allow # dynamic loading ax_pthread_flags="" ;; esac # Clang doesn't consider unrecognized options an error unless we specify # -Werror. We throw in some extra Clang-specific options to ensure that # this doesn't happen for GCC, which also accepts -Werror. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler needs -Werror to reject unknown flags" >&5 printf %s "checking if compiler needs -Werror to reject unknown flags... " >&6; } save_CFLAGS="$CFLAGS" ax_pthread_extra_flags="-Werror" CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void); int main (void) { foo() ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case e in #( e) ax_pthread_extra_flags= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$save_CFLAGS" if test x"$ax_pthread_ok" = xno; then for flag in $ax_pthread_flags; do case $flag in none) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 printf %s "checking whether pthreads work without any flags... " >&6; } ;; -*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 printf %s "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ax_pthread_config+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ax_pthread_config"; then ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ax_pthread_config="yes" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" fi ;; esac fi ax_pthread_config=$ac_cv_prog_ax_pthread_config if test -n "$ax_pthread_config"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 printf "%s\n" "$ax_pthread_config" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test x"$ax_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 printf %s "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void routine(void *a) { a = 0; } static void *start_routine(void *a) { return a; } int main (void) { pthread_t th; pthread_attr_t attr; pthread_create(&th, 0, start_routine, 0); pthread_join(th, 0); pthread_attr_init(&attr); pthread_cleanup_push(routine, 0); pthread_cleanup_pop(0) /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 printf "%s\n" "$ax_pthread_ok" >&6; } if test "x$ax_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$ax_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 printf %s "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int attr = $attr; return attr /* ; */ ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : attr_name=$attr; break fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 printf "%s\n" "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then printf "%s\n" "#define PTHREAD_CREATE_JOINABLE $attr_name" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 printf %s "checking if more special flags are required for pthreads... " >&6; } flag=no case ${host_os} in aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; osf* | hpux*) flag="-D_REENTRANT";; solaris*) if test "$GCC" = "yes"; then flag="-D_REENTRANT" else # TODO: What about Clang on Solaris? flag="-mt -D_REENTRANT" fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $flag" >&5 printf "%s\n" "$flag" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 printf %s "checking for PTHREAD_PRIO_INHERIT... " >&6; } if test ${ax_cv_PTHREAD_PRIO_INHERIT+y} then : printf %s "(cached) " >&6 else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = PTHREAD_PRIO_INHERIT; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ax_cv_PTHREAD_PRIO_INHERIT=yes else case e in #( e) ax_cv_PTHREAD_PRIO_INHERIT=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 printf "%s\n" "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" then : printf "%s\n" "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: compile with *_r variant if test "x$GCC" != xyes; then case $host_os in aix*) case "x/$CC" in #( x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : #handle absolute path differently from PATH based program lookup case "x$CC" in #( x/*) : if as_fn_executable_p ${CC}_r then : PTHREAD_CC="${CC}_r" fi ;; #( *) : for ac_prog in ${CC}_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PTHREAD_CC+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 printf "%s\n" "$PTHREAD_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" ;; esac ;; #( *) : ;; esac ;; esac fi fi test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$ax_pthread_ok" = xyes; then printf "%s\n" "#define HAVE_PTHREAD 1" >>confdefs.h : else ax_pthread_ok=no as_fn_error $? "threaded input requested but no pthread support has been found" "$LINENO" 5 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" printf "%s\n" "#define INPUTTHREAD 1" >>confdefs.h save_LIBS="$LIBS" LIBS="$LIBS $SYS_LIBS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(const char*)" >&5 printf %s "checking for pthread_setname_np(const char*)... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { pthread_setname_np("example") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID 1" >>confdefs.h else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np(pthread_t, const char*)" >&5 printf %s "checking for pthread_setname_np(pthread_t, const char*)... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { pthread_setname_np(pthread_self(), "example") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP_WITH_TID 1" >>confdefs.h else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" fi REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES" LIBSYSTEMD="libsystemd >= 209" # Check whether --with-systemd-daemon was given. if test ${with_systemd_daemon+y} then : withval=$with_systemd_daemon; WITH_SYSTEMD_DAEMON=$withval else case e in #( e) WITH_SYSTEMD_DAEMON=auto ;; esac fi if test "x$WITH_SYSTEMD_DAEMON" = "xyes" -o "x$WITH_SYSTEMD_DAEMON" = "xauto" ; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBSYSTEMD" >&5 printf %s "checking for $LIBSYSTEMD... " >&6; } if test -n "$SYSTEMD_DAEMON_CFLAGS"; then pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "$LIBSYSTEMD" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SYSTEMD_DAEMON_LIBS"; then pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSYSTEMD\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBSYSTEMD") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "$LIBSYSTEMD" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1` else SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSYSTEMD" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd-daemon" >&5 printf %s "checking for libsystemd-daemon... " >&6; } if test -n "$SYSTEMD_DAEMON_CFLAGS"; then pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SYSTEMD_DAEMON_LIBS"; then pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` else SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 HAVE_SYSTEMD_DAEMON=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_SYSTEMD_DAEMON=no else SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_SYSTEMD_DAEMON=yes; LIBSYSTEMD_DAEMON=libsystemd-daemon fi elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsystemd-daemon" >&5 printf %s "checking for libsystemd-daemon... " >&6; } if test -n "$SYSTEMD_DAEMON_CFLAGS"; then pkg_cv_SYSTEMD_DAEMON_CFLAGS="$SYSTEMD_DAEMON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SYSTEMD_DAEMON_LIBS"; then pkg_cv_SYSTEMD_DAEMON_LIBS="$SYSTEMD_DAEMON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SYSTEMD_DAEMON_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` else SYSTEMD_DAEMON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SYSTEMD_DAEMON_PKG_ERRORS" >&5 HAVE_SYSTEMD_DAEMON=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_SYSTEMD_DAEMON=no else SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_SYSTEMD_DAEMON=yes; LIBSYSTEMD_DAEMON=libsystemd-daemon fi else SYSTEMD_DAEMON_CFLAGS=$pkg_cv_SYSTEMD_DAEMON_CFLAGS SYSTEMD_DAEMON_LIBS=$pkg_cv_SYSTEMD_DAEMON_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_SYSTEMD_DAEMON=yes; LIBSYSTEMD_DAEMON="$LIBSYSTEMD" fi if test "x$HAVE_SYSTEMD_DAEMON" = xyes; then printf "%s\n" "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h REQUIRED_LIBS="$REQUIRED_LIBS $LIBSYSTEMD_DAEMON" elif test "x$WITH_SYSTEMD_DAEMON" = xyes; then as_fn_error $? "systemd support requested but no library has been found" "$LINENO" 5 fi fi if test "x$HAVE_SYSTEMD_DAEMON" = "xyes"; then HAVE_SYSTEMD_DAEMON_TRUE= HAVE_SYSTEMD_DAEMON_FALSE='#' else HAVE_SYSTEMD_DAEMON_TRUE='#' HAVE_SYSTEMD_DAEMON_FALSE= fi if test "x$CONFIG_UDEV" = xyes && test "x$CONFIG_HAL" = xyes; then as_fn_error $? "Hotplugging through both libudev and hal not allowed" "$LINENO" 5 fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBUDEV" >&5 printf %s "checking for $LIBUDEV... " >&6; } if test -n "$UDEV_CFLAGS"; then pkg_cv_UDEV_CFLAGS="$UDEV_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UDEV_CFLAGS=`$PKG_CONFIG --cflags "$LIBUDEV" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$UDEV_LIBS"; then pkg_cv_UDEV_LIBS="$UDEV_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBUDEV\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBUDEV") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_UDEV_LIBS=`$PKG_CONFIG --libs "$LIBUDEV" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then UDEV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBUDEV" 2>&1` else UDEV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBUDEV" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$UDEV_PKG_ERRORS" >&5 HAVE_LIBUDEV=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_LIBUDEV=no else UDEV_CFLAGS=$pkg_cv_UDEV_CFLAGS UDEV_LIBS=$pkg_cv_UDEV_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_LIBUDEV=yes fi if test "x$CONFIG_UDEV" = xauto; then CONFIG_UDEV="$HAVE_LIBUDEV" fi if test "x$CONFIG_UDEV" = xyes; then CONFIG_UDEV_TRUE= CONFIG_UDEV_FALSE='#' else CONFIG_UDEV_TRUE='#' CONFIG_UDEV_FALSE= fi if test "x$CONFIG_UDEV" = xyes; then CONFIG_HAL=no if test "x$CONFIG_UDEV_KMS" = xauto; then CONFIG_UDEV_KMS="$HAVE_LIBUDEV" fi if ! test "x$HAVE_LIBUDEV" = xyes; then as_fn_error $? "udev configuration API requested, but libudev is not installed" "$LINENO" 5 fi printf "%s\n" "#define CONFIG_UDEV 1" >>confdefs.h if test "x$CONFIG_UDEV_KMS" = xyes; then printf "%s\n" "#define CONFIG_UDEV_KMS 1" >>confdefs.h fi SAVE_LIBS=$LIBS SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $UDEV_CFLAGS" LIBS=$UDEV_LIBS ac_fn_c_check_func "$LINENO" "udev_monitor_filter_add_match_tag" "ac_cv_func_udev_monitor_filter_add_match_tag" if test "x$ac_cv_func_udev_monitor_filter_add_match_tag" = xyes then : printf "%s\n" "#define HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "udev_enumerate_add_match_tag" "ac_cv_func_udev_enumerate_add_match_tag" if test "x$ac_cv_func_udev_enumerate_add_match_tag" = xyes then : printf "%s\n" "#define HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG 1" >>confdefs.h fi LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS fi if test "x$CONFIG_UDEV_KMS" = xyes; then CONFIG_UDEV_KMS_TRUE= CONFIG_UDEV_KMS_FALSE='#' else CONFIG_UDEV_KMS_TRUE='#' CONFIG_UDEV_KMS_FALSE= fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBDBUS" >&5 printf %s "checking for $LIBDBUS... " >&6; } if test -n "$DBUS_CFLAGS"; then pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "$LIBDBUS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DBUS_LIBS"; then pkg_cv_DBUS_LIBS="$DBUS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "$LIBDBUS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDBUS" 2>&1` else DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDBUS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 HAVE_DBUS=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_DBUS=no else DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS DBUS_LIBS=$pkg_cv_DBUS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_DBUS=yes fi if test "x$HAVE_DBUS" = xyes; then printf "%s\n" "#define HAVE_DBUS 1" >>confdefs.h fi if test "x$HAVE_DBUS" = xyes; then HAVE_DBUS_TRUE= HAVE_DBUS_FALSE='#' else HAVE_DBUS_TRUE='#' HAVE_DBUS_FALSE= fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for hal" >&5 printf %s "checking for hal... " >&6; } if test -n "$HAL_CFLAGS"; then pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 ($PKG_CONFIG --exists --print-errors "hal") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HAL_CFLAGS=`$PKG_CONFIG --cflags "hal" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$HAL_LIBS"; then pkg_cv_HAL_LIBS="$HAL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"hal\""; } >&5 ($PKG_CONFIG --exists --print-errors "hal") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_HAL_LIBS=`$PKG_CONFIG --libs "hal" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "hal" 2>&1` else HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "hal" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$HAL_PKG_ERRORS" >&5 HAVE_HAL=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_HAL=no else HAL_CFLAGS=$pkg_cv_HAL_CFLAGS HAL_LIBS=$pkg_cv_HAL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_HAL=yes fi if test "x$CONFIG_HAL" = xauto; then CONFIG_HAL="$HAVE_HAL" fi if test "x$CONFIG_HAL" = xyes; then if ! test "x$HAVE_HAL" = xyes; then as_fn_error $? "HAL hotplug API requested, but HAL is not installed." "$LINENO" 5 fi printf "%s\n" "#define CONFIG_HAL 1" >>confdefs.h NEED_DBUS="yes" fi if test "x$CONFIG_HAL" = xyes; then CONFIG_HAL_TRUE= CONFIG_HAL_FALSE='#' else CONFIG_HAL_TRUE='#' CONFIG_HAL_FALSE= fi if test "x$SYSTEMD_LOGIND" = xauto; then if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then SYSTEMD_LOGIND=yes else SYSTEMD_LOGIND=no fi fi if test "x$SYSTEMD_LOGIND" = xyes; then if ! test "x$HAVE_DBUS" = xyes; then as_fn_error $? "systemd-logind requested, but D-Bus is not installed." "$LINENO" 5 fi if ! test "x$CONFIG_UDEV" = xyes ; then as_fn_error $? "systemd-logind is only supported in combination with udev configuration." "$LINENO" 5 fi printf "%s\n" "#define SYSTEMD_LOGIND 1" >>confdefs.h NEED_DBUS="yes" fi if test "x$SYSTEMD_LOGIND" = xyes; then SYSTEMD_LOGIND_TRUE= SYSTEMD_LOGIND_FALSE='#' else SYSTEMD_LOGIND_TRUE='#' SYSTEMD_LOGIND_FALSE= fi if test "x$SUID_WRAPPER" = xyes; then prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$libexecdir\"" eval ac_define_dir="\"$ac_define_dir\"" SUID_WRAPPER_DIR="$ac_define_dir" printf "%s\n" "#define SUID_WRAPPER_DIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE SETUID="no" fi if test "x$SUID_WRAPPER" = xyes; then SUID_WRAPPER_TRUE= SUID_WRAPPER_FALSE='#' else SUID_WRAPPER_TRUE='#' SUID_WRAPPER_FALSE= fi if test "x$NEED_DBUS" = xyes; then printf "%s\n" "#define NEED_DBUS 1" >>confdefs.h fi if test "x$NEED_DBUS" = xyes; then NEED_DBUS_TRUE= NEED_DBUS_FALSE='#' else NEED_DBUS_TRUE='#' NEED_DBUS_FALSE= fi if test "x$CONFIG_WSCONS" = xauto; then case $host_os in *openbsd*) CONFIG_WSCONS=yes; ;; *) CONFIG_WSCONS=no; ;; esac fi if test "x$CONFIG_WSCONS" = xyes; then CONFIG_WSCONS_TRUE= CONFIG_WSCONS_FALSE='#' else CONFIG_WSCONS_TRUE='#' CONFIG_WSCONS_FALSE= fi if test "x$CONFIG_WSCONS" = xyes; then printf "%s\n" "#define CONFIG_WSCONS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for glibc..." >&5 printf %s "checking for glibc...... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GLIBC__ #error #endif _ACEOF if ac_fn_c_try_cpp "$LINENO" then : glibc=yes else case e in #( e) glibc=no ;; esac fi rm -f conftest.err conftest.i conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $glibc" >&5 printf "%s\n" "$glibc" >&6; } for ac_func in clock_gettime do : ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" if test "x$ac_cv_func_clock_gettime" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h have_clock_gettime=yes else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char clock_gettime (void); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else case e in #( e) ac_cv_lib_rt_clock_gettime=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes then : have_clock_gettime=-lrt else case e in #( e) have_clock_gettime=no ;; esac fi ;; esac fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a useful monotonic clock ..." >&5 printf %s "checking for a useful monotonic clock ...... " >&6; } if ! test "x$have_clock_gettime" = xno; then if ! test "x$have_clock_gettime" = xyes; then CLOCK_LIBS="$have_clock_gettime" else CLOCK_LIBS="" fi LIBS_SAVE="$LIBS" LIBS="$CLOCK_LIBS" CPPFLAGS_SAVE="$CPPFLAGS" if test x"$glibc" = xyes; then CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" fi if test "$cross_compiling" = yes then : MONOTONIC_CLOCK="cross compiling" else case e in #( e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(int argc, char *argv[]) { struct timespec tp; if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) return 0; else return 1; } _ACEOF if ac_fn_c_try_run "$LINENO" then : MONOTONIC_CLOCK=yes else case e in #( e) MONOTONIC_CLOCK=no ;; esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac fi if test "$MONOTONIC_CLOCK" = "cross compiling"; then ac_fn_check_decl "$LINENO" "CLOCK_MONOTONIC" "ac_cv_have_decl_CLOCK_MONOTONIC" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_CLOCK_MONOTONIC" = xyes then : MONOTONIC_CLOCK="guessing yes" else case e in #( e) MONOTONIC_CLOCK=no ;; esac fi fi LIBS="$LIBS_SAVE" CPPFLAGS="$CPPFLAGS_SAVE" else MONOTONIC_CLOCK=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MONOTONIC_CLOCK" >&5 printf "%s\n" "$MONOTONIC_CLOCK" >&6; } if test "$MONOTONIC_CLOCK" = "guessing yes"; then MONOTONIC_CLOCK=yes fi if test "x$MONOTONIC_CLOCK" = xyes; then printf "%s\n" "#define MONOTONIC_CLOCK 1" >>confdefs.h LIBS="$LIBS $CLOCK_LIBS" fi if test "x$XV" = xyes; then XV_TRUE= XV_FALSE='#' else XV_TRUE='#' XV_FALSE= fi if test "x$XV" = xyes; then printf "%s\n" "#define XV 1" >>confdefs.h printf "%s\n" "#define XvExtension 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi if test "x$XVMC" = xyes; then XVMC_TRUE= XVMC_FALSE='#' else XVMC_TRUE='#' XVMC_FALSE= fi if test "x$XVMC" = xyes; then printf "%s\n" "#define XvMCExtension 1" >>confdefs.h fi if test "x$COMPOSITE" = xyes; then COMPOSITE_TRUE= COMPOSITE_FALSE='#' else COMPOSITE_TRUE='#' COMPOSITE_FALSE= fi if test "x$COMPOSITE" = xyes; then printf "%s\n" "#define COMPOSITE 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' COMPOSITE_INC='-I$(top_srcdir)/composite' fi if test "x$MITSHM" = xauto; then MITSHM="$ac_cv_sysv_ipc" fi if test "x$MITSHM" = xyes; then MITSHM_TRUE= MITSHM_FALSE='#' else MITSHM_TRUE='#' MITSHM_FALSE= fi if test "x$MITSHM" = xyes; then printf "%s\n" "#define MITSHM 1" >>confdefs.h printf "%s\n" "#define HAS_SHM 1" >>confdefs.h fi if test "x$RECORD" = xyes; then RECORD_TRUE= RECORD_FALSE='#' else RECORD_TRUE='#' RECORD_FALSE= fi if test "x$RECORD" = xyes; then printf "%s\n" "#define XRECORD 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" RECORD_LIB='$(top_builddir)/record/librecord.la' fi if test "x$SCREENSAVER" = xyes; then SCREENSAVER_TRUE= SCREENSAVER_FALSE='#' else SCREENSAVER_TRUE='#' SCREENSAVER_FALSE= fi if test "x$SCREENSAVER" = xyes; then printf "%s\n" "#define SCREENSAVER 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO" fi HASHTABLE=no if test "x$RES" = xyes; then RES_TRUE= RES_FALSE='#' else RES_TRUE='#' RES_FALSE= fi if test "x$RES" = xyes; then printf "%s\n" "#define RES 1" >>confdefs.h HASHTABLE=yes REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" fi if test "x$LISTEN_TCP" = xyes; then printf "%s\n" "#define LISTEN_TCP 1" >>confdefs.h fi if test "x$LISTEN_UNIX" = xyes; then printf "%s\n" "#define LISTEN_UNIX 1" >>confdefs.h fi if test "x$LISTEN_LOCAL" = xyes; then printf "%s\n" "#define LISTEN_LOCAL 1" >>confdefs.h fi # The XRes extension may support client ID tracking only if it has # been specifically enabled. Client ID tracking is implicitly not # supported if XRes extension is disabled. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to track client ids" >&5 printf %s "checking whether to track client ids... " >&6; } if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then printf "%s\n" "#define CLIENTIDS 1" >>confdefs.h else CLIENTIDS=no fi if test "x$CLIENTIDS" = xyes; then case $host_os in openbsd*) SYS_LIBS="$SYS_LIBS -lkvm" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CLIENTIDS" >&5 printf "%s\n" "$CLIENTIDS" >&6; } if test "x$CLIENTIDS" = xyes; then CLIENTIDS_TRUE= CLIENTIDS_FALSE='#' else CLIENTIDS_TRUE='#' CLIENTIDS_FALSE= fi if test "x$DRI" = xyes; then DRI_TRUE= DRI_FALSE='#' else DRI_TRUE='#' DRI_FALSE= fi if test "x$DRI" = xyes; then printf "%s\n" "#define XF86DRI 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $DRI2PROTO" >&5 printf %s "checking for $DRI2PROTO... " >&6; } if test -n "$DRI2PROTO_CFLAGS"; then pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI2PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI2PROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DRI2PROTO_LIBS"; then pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI2PROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DRI2PROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI2PROTO_LIBS=`$PKG_CONFIG --libs "$DRI2PROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI2PROTO" 2>&1` else DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI2PROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI2PROTO_PKG_ERRORS" >&5 HAVE_DRI2PROTO=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_DRI2PROTO=no else DRI2PROTO_CFLAGS=$pkg_cv_DRI2PROTO_CFLAGS DRI2PROTO_LIBS=$pkg_cv_DRI2PROTO_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_DRI2PROTO=yes fi case "$DRI2,$HAVE_DRI2PROTO" in yes,no) as_fn_error $? "DRI2 requested, but dri2proto not found." "$LINENO" 5 ;; yes,yes | auto,yes) printf "%s\n" "#define DRI2 1" >>confdefs.h DRI2=yes LIBGL="gl >= 1.2" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" ;; esac if test "x$DRI2" = xyes; then DRI2_TRUE= DRI2_FALSE='#' else DRI2_TRUE='#' DRI2_FALSE= fi # Check whether --enable-xtrans-send-fds was given. if test ${enable_xtrans_send_fds+y} then : enableval=$enable_xtrans_send_fds; XTRANS_SEND_FDS=$enableval else case e in #( e) XTRANS_SEND_FDS=auto ;; esac fi case "x$XTRANS_SEND_FDS" in xauto) case "$host_os" in linux*|solaris*|freebsd*|dragonfly*|openbsd*) XTRANS_SEND_FDS=yes ;; *) XTRANS_SEND_FDS=no ;; esac esac case "x$XTRANS_SEND_FDS" in xyes) printf "%s\n" "#define XTRANS_SEND_FDS 1" >>confdefs.h ;; esac case "$DRI3,$XTRANS_SEND_FDS" in yes,yes | auto,yes) ;; yes,no) as_fn_error $? "DRI3 requested, but xtrans fd passing support not found." "$LINENO" 5 DRI3=no ;; no,*) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xtrans fd passing support not found." >&5 printf "%s\n" "$as_me: DRI3 disabled because xtrans fd passing support not found." >&6;} DRI3=no ;; esac pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $DRI3PROTO" >&5 printf %s "checking for $DRI3PROTO... " >&6; } if test -n "$DRI3PROTO_CFLAGS"; then pkg_cv_DRI3PROTO_CFLAGS="$DRI3PROTO_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI3PROTO_CFLAGS=`$PKG_CONFIG --cflags "$DRI3PROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DRI3PROTO_LIBS"; then pkg_cv_DRI3PROTO_LIBS="$DRI3PROTO_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DRI3PROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DRI3PROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DRI3PROTO_LIBS=`$PKG_CONFIG --libs "$DRI3PROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DRI3PROTO" 2>&1` else DRI3PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DRI3PROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DRI3PROTO_PKG_ERRORS" >&5 HAVE_DRI3PROTO=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_DRI3PROTO=no else DRI3PROTO_CFLAGS=$pkg_cv_DRI3PROTO_CFLAGS DRI3PROTO_LIBS=$pkg_cv_DRI3PROTO_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_DRI3PROTO=yes fi case "$DRI3,$HAVE_DRI3PROTO" in yes,yes | auto,yes) REQUIRED_MODULES="$REQUIRED_MODULES dri3proto" ;; yes,no) as_fn_error $? "DRI3 requested, but dri3proto not found." "$LINENO" 5 DRI3=no ;; no,*) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because dri3proto not found." >&5 printf "%s\n" "$as_me: DRI3 disabled because dri3proto not found." >&6;} DRI3=no ;; esac ac_fn_c_check_func "$LINENO" "sigaction" "ac_cv_func_sigaction" if test "x$ac_cv_func_sigaction" = xyes then : printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h fi BUSFAULT=no case x"$ac_cv_func_sigaction" in xyes) printf "%s\n" "#define HAVE_SIGACTION 1" >>confdefs.h BUSFAULT=yes ;; esac case x"$BUSFAULT" in xyes) printf "%s\n" "#define BUSFAULT 1" >>confdefs.h ;; esac if test x"$BUSFAULT" = xyes; then BUSFAULT_TRUE= BUSFAULT_FALSE='#' else BUSFAULT_TRUE='#' BUSFAULT_FALSE= fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBXSHMFENCE" >&5 printf %s "checking for $LIBXSHMFENCE... " >&6; } if test -n "$XSHMFENCE_CFLAGS"; then pkg_cv_XSHMFENCE_CFLAGS="$XSHMFENCE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSHMFENCE_CFLAGS=`$PKG_CONFIG --cflags "$LIBXSHMFENCE" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XSHMFENCE_LIBS"; then pkg_cv_XSHMFENCE_LIBS="$XSHMFENCE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXSHMFENCE\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXSHMFENCE") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSHMFENCE_LIBS=`$PKG_CONFIG --libs "$LIBXSHMFENCE" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1` else XSHMFENCE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXSHMFENCE" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XSHMFENCE_PKG_ERRORS" >&5 HAVE_XSHMFENCE=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_XSHMFENCE=no else XSHMFENCE_CFLAGS=$pkg_cv_XSHMFENCE_CFLAGS XSHMFENCE_LIBS=$pkg_cv_XSHMFENCE_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_XSHMFENCE=yes fi if test "x$XSHMFENCE" = "xauto"; then XSHMFENCE="$HAVE_XSHMFENCE" fi if test "x$XSHMFENCE" = "xyes"; then if test "x$HAVE_XSHMFENCE" != "xyes"; then as_fn_error $? "xshmfence requested but not installed." "$LINENO" 5 fi printf "%s\n" "#define HAVE_XSHMFENCE 1" >>confdefs.h REQUIRED_LIBS="$REQUIRED_LIBS $LIBXSHMFENCE" fi if test "x$XSHMFENCE" = xyes; then XSHMFENCE_TRUE= XSHMFENCE_FALSE='#' else XSHMFENCE_TRUE='#' XSHMFENCE_FALSE= fi case "$DRI3,$XSHMFENCE" in yes,yes | auto,yes) ;; yes,no) as_fn_error $? "DRI3 requested, but xshmfence not found." "$LINENO" 5 DRI3=no ;; no,*) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 disabled because xshmfence not found." >&5 printf "%s\n" "$as_me: DRI3 disabled because xshmfence not found." >&6;} DRI3=no ;; esac case x"$DRI3" in xyes|xauto) DRI3=yes printf "%s\n" "#define DRI3 1" >>confdefs.h DRI3_LIB='$(top_builddir)/dri3/libdri3.la' SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: DRI3 enabled" >&5 printf "%s\n" "$as_me: DRI3 enabled" >&6;}; ;; esac if test "x$DRI3" = xyes; then DRI3_TRUE= DRI3_FALSE='#' else DRI3_TRUE='#' DRI3_FALSE= fi if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$XORG" = xyes; then if test "x$DRM" = xyes; then printf "%s\n" "#define WITH_LIBDRM 1" >>confdefs.h pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBDRM" >&5 printf %s "checking for $LIBDRM... " >&6; } if test -n "$LIBDRM_CFLAGS"; then pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "$LIBDRM" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBDRM_LIBS"; then pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBDRM\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBDRM") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "$LIBDRM" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBDRM" 2>&1` else LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBDRM" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBDRM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($LIBDRM) were not met: $LIBDRM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBDRM_CFLAGS and LIBDRM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBDRM_CFLAGS and LIBDRM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi fi if test "x$GLX" = xyes; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x11" >&5 printf %s "checking for x11... " >&6; } if test -n "$XLIB_CFLAGS"; then pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XLIB_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XLIB_LIBS"; then pkg_cv_XLIB_LIBS="$XLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XLIB_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XLIB_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (x11) were not met: $XLIB_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XLIB_CFLAGS and XLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XLIB_CFLAGS and XLIB_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XLIB_CFLAGS=$pkg_cv_XLIB_CFLAGS XLIB_LIBS=$pkg_cv_XLIB_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $GLPROTO $LIBGL" >&5 printf %s "checking for $GLPROTO $LIBGL... " >&6; } if test -n "$GL_CFLAGS"; then pkg_cv_GL_CFLAGS="$GL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5 ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "$GLPROTO $LIBGL" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GL_LIBS"; then pkg_cv_GL_LIBS="$GL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$GLPROTO \$LIBGL\""; } >&5 ($PKG_CONFIG --exists --print-errors "$GLPROTO $LIBGL") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "$GLPROTO $LIBGL" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1` else GL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$GLPROTO $LIBGL" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GL_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($GLPROTO $LIBGL) were not met: $GL_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GL_CFLAGS and GL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GL_CFLAGS and GL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else GL_CFLAGS=$pkg_cv_GL_CFLAGS GL_LIBS=$pkg_cv_GL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi printf "%s\n" "#define GLXEXT 1" >>confdefs.h HASHTABLE=yes GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la' GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS" else GLX=no fi if test "x$GLX" = xyes; then GLX_TRUE= GLX_FALSE='#' else GLX_TRUE='#' GLX_FALSE= fi if test "x$HASHTABLE" = xyes; then HASHTABLE_TRUE= HASHTABLE_FALSE='#' else HASHTABLE_TRUE='#' HASHTABLE_FALSE= fi if test "x$PRESENT" = xyes; then PRESENT_TRUE= PRESENT_FALSE='#' else PRESENT_TRUE='#' PRESENT_FALSE= fi if test "x$PRESENT" = xyes; then printf "%s\n" "#define PRESENT 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO" PRESENT_INC='-I$(top_srcdir)/present' PRESENT_LIB='$(top_builddir)/present/libpresent.la' fi if test "x$XINERAMA" = xyes; then XINERAMA_TRUE= XINERAMA_FALSE='#' else XINERAMA_TRUE='#' XINERAMA_FALSE= fi if test "x$XINERAMA" = xyes; then printf "%s\n" "#define XINERAMA 1" >>confdefs.h printf "%s\n" "#define PANORAMIX 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" fi if test "x$XACE" = xyes; then XACE_TRUE= XACE_FALSE='#' else XACE_TRUE='#' XACE_FALSE= fi if test "x$XACE" = xyes; then printf "%s\n" "#define XACE 1" >>confdefs.h fi if test "x$XSELINUX" = xyes; then XSELINUX_TRUE= XSELINUX_FALSE='#' else XSELINUX_TRUE='#' XSELINUX_FALSE= fi if test "x$XSELINUX" = xyes; then if test "x$XACE" != xyes; then as_fn_error $? "cannot build SELinux extension without X-ACE" "$LINENO" 5 fi for ac_header in libaudit.h do : ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" if test "x$ac_cv_header_libaudit_h" = xyes then : printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h else case e in #( e) as_fn_error $? "SELinux extension requires audit system headers" "$LINENO" 5 ;; esac fi done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for audit_open in -laudit" >&5 printf %s "checking for audit_open in -laudit... " >&6; } if test ${ac_cv_lib_audit_audit_open+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-laudit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char audit_open (void); int main (void) { return audit_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_audit_audit_open=yes else case e in #( e) ac_cv_lib_audit_audit_open=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_audit_audit_open" >&5 printf "%s\n" "$ac_cv_lib_audit_audit_open" >&6; } if test "x$ac_cv_lib_audit_audit_open" = xyes then : printf "%s\n" "#define HAVE_LIBAUDIT 1" >>confdefs.h LIBS="-laudit $LIBS" else case e in #( e) as_fn_error $? "SELinux extension requires audit system library" "$LINENO" 5 ;; esac fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBSELINUX" >&5 printf %s "checking for $LIBSELINUX... " >&6; } if test -n "$SELINUX_CFLAGS"; then pkg_cv_SELINUX_CFLAGS="$SELINUX_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_CFLAGS=`$PKG_CONFIG --cflags "$LIBSELINUX" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$SELINUX_LIBS"; then pkg_cv_SELINUX_LIBS="$SELINUX_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBSELINUX\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBSELINUX") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_SELINUX_LIBS=`$PKG_CONFIG --libs "$LIBSELINUX" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then SELINUX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBSELINUX" 2>&1` else SELINUX_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBSELINUX" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$SELINUX_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($LIBSELINUX) were not met: $SELINUX_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables SELINUX_CFLAGS and SELINUX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables SELINUX_CFLAGS and SELINUX_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else SELINUX_CFLAGS=$pkg_cv_SELINUX_CFLAGS SELINUX_LIBS=$pkg_cv_SELINUX_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi SELINUX_LIBS="$SELINUX_LIBS -laudit" printf "%s\n" "#define XSELINUX 1" >>confdefs.h fi if test "x$XCSECURITY" = xyes; then XCSECURITY_TRUE= XCSECURITY_FALSE='#' else XCSECURITY_TRUE='#' XCSECURITY_FALSE= fi if test "x$XCSECURITY" = xyes; then if test "x$XACE" != xyes; then as_fn_error $? "cannot build Security extension without X-ACE" "$LINENO" 5 fi printf "%s\n" "#define XCSECURITY 1" >>confdefs.h fi if test "x$DBE" = xyes; then DBE_TRUE= DBE_FALSE='#' else DBE_TRUE='#' DBE_FALSE= fi if test "x$DBE" = xyes; then printf "%s\n" "#define DBE 1" >>confdefs.h DBE_LIB='$(top_builddir)/dbe/libdbe.la' DBE_INC='-I$(top_srcdir)/dbe' fi if test "x$XF86BIGFONT" = xyes; then XF86BIGFONT_TRUE= XF86BIGFONT_FALSE='#' else XF86BIGFONT_TRUE='#' XF86BIGFONT_FALSE= fi if test "x$XF86BIGFONT" = xyes; then printf "%s\n" "#define XF86BIGFONT 1" >>confdefs.h REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO" fi if test "x$DPMSExtension" = xyes; then DPMSExtension_TRUE= DPMSExtension_FALSE='#' else DPMSExtension_TRUE='#' DPMSExtension_FALSE= fi if test "x$DPMSExtension" = xyes; then printf "%s\n" "#define DPMSExtension 1" >>confdefs.h fi printf "%s\n" "#define RENDER 1" >>confdefs.h RENDER_LIB='$(top_builddir)/render/librender.la' RENDER_INC='-I$(top_srcdir)/render' printf "%s\n" "#define RANDR 1" >>confdefs.h RANDR_LIB='$(top_builddir)/randr/librandr.la' RANDR_INC='-I$(top_srcdir)/randr' printf "%s\n" "#define XFIXES 1" >>confdefs.h FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' FIXES_INC='-I$(top_srcdir)/xfixes' printf "%s\n" "#define DAMAGE 1" >>confdefs.h DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' DAMAGE_INC='-I$(top_srcdir)/damageext' MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' # XINPUT extension is integral part of the server printf "%s\n" "#define XINPUT 1" >>confdefs.h XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' if test "x$XF86UTILS" = xyes; then XF86UTILS_TRUE= XF86UTILS_FALSE='#' else XF86UTILS_TRUE='#' XF86UTILS_FALSE= fi if test "x$VGAHW" = xyes; then VGAHW_TRUE= VGAHW_FALSE='#' else VGAHW_TRUE='#' VGAHW_FALSE= fi if test "x$INT10MODULE" = xyes; then INT10MODULE_TRUE= INT10MODULE_FALSE='#' else INT10MODULE_TRUE='#' INT10MODULE_FALSE= fi printf "%s\n" "#define SHAPE 1" >>confdefs.h if test "x$XKBPATH" = "xauto"; then XKBPATH=$(pkg-config --variable datadir xkbcomp || echo ${datadir})/X11/xkb fi prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XKBPATH\"" eval ac_define_dir="\"$ac_define_dir\"" XKB_BASE_DIRECTORY="$ac_define_dir" printf "%s\n" "#define XKB_BASE_DIRECTORY \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE # Check whether --with-xkb-bin-directory was given. if test ${with_xkb_bin_directory+y} then : withval=$with_xkb_bin_directory; XKB_BIN_DIRECTORY="$withval" else case e in #( e) XKB_BIN_DIRECTORY="auto" ;; esac fi if test "x$XKB_BIN_DIRECTORY" = "xauto"; then XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp) if test -z $XKB_BIN_DIRECTORY; then XKB_BIN_DIRECTORY="$bindir" fi fi prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XKB_BIN_DIRECTORY\"" eval ac_define_dir="\"$ac_define_dir\"" XKB_BIN_DIRECTORY="$ac_define_dir" printf "%s\n" "#define XKB_BIN_DIRECTORY \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` if [ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ] ; then XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" fi XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'` XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'` prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XKBOUTPUT\"" eval ac_define_dir="\"$ac_define_dir\"" XKM_OUTPUT_DIR="$ac_define_dir" printf "%s\n" "#define XKM_OUTPUT_DIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE if test "x$XKB_DFLT_RULES" = x; then case $host_os in linux*) XKB_DFLT_RULES="evdev" ;; *) XKB_DFLT_RULES="base" ;; esac fi printf "%s\n" "#define XKB_DFLT_RULES \"$XKB_DFLT_RULES\"" >>confdefs.h printf "%s\n" "#define XKB_DFLT_MODEL \"$XKB_DFLT_MODEL\"" >>confdefs.h printf "%s\n" "#define XKB_DFLT_LAYOUT \"$XKB_DFLT_LAYOUT\"" >>confdefs.h printf "%s\n" "#define XKB_DFLT_VARIANT \"$XKB_DFLT_VARIANT\"" >>confdefs.h printf "%s\n" "#define XKB_DFLT_OPTIONS \"$XKB_DFLT_OPTIONS\"" >>confdefs.h XKB_LIB='$(top_builddir)/xkb/libxkb.la' XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xdmcp" >&5 printf %s "checking for xdmcp... " >&6; } if test -n "$XDMCP_CFLAGS"; then pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XDMCP_CFLAGS=`$PKG_CONFIG --cflags "xdmcp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XDMCP_LIBS"; then pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xdmcp\""; } >&5 ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XDMCP_LIBS=`$PKG_CONFIG --libs "xdmcp" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xdmcp" 2>&1` else XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xdmcp" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XDMCP_PKG_ERRORS" >&5 have_libxdmcp="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } have_libxdmcp="no" else XDMCP_CFLAGS=$pkg_cv_XDMCP_CFLAGS XDMCP_LIBS=$pkg_cv_XDMCP_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } have_libxdmcp="yes" fi if test "x$XDMCP" = xauto; then if test "x$have_libxdmcp" = xyes; then XDMCP=yes else XDMCP=no fi fi if test "x$XDMAUTH" = xauto; then if test "x$have_libxdmcp" = xyes; then XDMAUTH=yes else XDMAUTH=no fi fi if test "x$XDMCP" = xyes; then XDMCP_TRUE= XDMCP_FALSE='#' else XDMCP_TRUE='#' XDMCP_FALSE= fi if test "x$XDMCP" = xyes; then printf "%s\n" "#define XDMCP 1" >>confdefs.h REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" XDMCP_MODULES="xdmcp" fi if test "x$XDMAUTH" = xyes; then XDMAUTH_TRUE= XDMAUTH_FALSE='#' else XDMAUTH_TRUE='#' XDMAUTH_FALSE= fi if test "x$XDMAUTH" = xyes; then printf "%s\n" "#define HASXDMAUTH 1" >>confdefs.h if ! test "x$XDMCP" = xyes; then REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" XDMCP_MODULES="xdmcp" fi fi if test "x$XF86VIDMODE" = xauto; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$VIDMODEPROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$VIDMODEPROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then XF86VIDMODE=yes else XF86VIDMODE=no fi fi if test "x$XF86VIDMODE" = xyes; then printf "%s\n" "#define XF86VIDMODE 1" >>confdefs.h fi if test "x$XF86VIDMODE" = xyes; then XF86VIDMODE_TRUE= XF86VIDMODE_FALSE='#' else XF86VIDMODE_TRUE='#' XF86VIDMODE_FALSE= fi prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$FONTPATH\"" eval ac_define_dir="\"$ac_define_dir\"" COMPILEDDEFAULTFONTPATH="$ac_define_dir" printf "%s\n" "#define COMPILEDDEFAULTFONTPATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$SERVERCONFIG\"" eval ac_define_dir="\"$ac_define_dir\"" SERVER_MISC_CONFIG_PATH="$ac_define_dir" printf "%s\n" "#define SERVER_MISC_CONFIG_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$FONTROOTDIR\"" eval ac_define_dir="\"$ac_define_dir\"" BASE_FONT_PATH="$ac_define_dir" printf "%s\n" "#define BASE_FONT_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$dridriverdir\"" eval ac_define_dir="\"$ac_define_dir\"" DRI_DRIVER_PATH="$ac_define_dir" printf "%s\n" "#define DRI_DRIVER_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE printf "%s\n" "#define XVENDORNAME \"$VENDOR_NAME\"" >>confdefs.h printf "%s\n" "#define XVENDORNAMESHORT \"$VENDOR_NAME_SHORT\"" >>confdefs.h printf "%s\n" "#define XORG_MAN_VERSION \"$VENDOR_MAN_VERSION\"" >>confdefs.h printf "%s\n" "#define BUILDERADDR \"$BUILDERADDR\"" >>confdefs.h printf "%s\n" "#define BUILDERSTRING \"$BUILDERSTRING\"" >>confdefs.h printf "%s\n" "#define VENDOR_NAME \"$VENDOR_NAME\"" >>confdefs.h printf "%s\n" "#define VENDOR_NAME_SHORT \"$VENDOR_NAME_SHORT\"" >>confdefs.h printf "%s\n" "#define VENDOR_RELEASE $VENDOR_RELEASE" >>confdefs.h printf "%s\n" "#define VENDOR_MAN_VERSION \"$VENDOR_MAN_VERSION\"" >>confdefs.h if test "x$DEBUGGING" = xyes; then printf "%s\n" "#define DEBUG 1" >>confdefs.h fi if test "x$DEBUGGING" = xyes; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi printf "%s\n" "#define XTEST 1" >>confdefs.h printf "%s\n" "#define XSYNC 1" >>confdefs.h printf "%s\n" "#define XCMISC 1" >>confdefs.h printf "%s\n" "#define BIGREQS 1" >>confdefs.h if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then DIX_LIB='$(top_builddir)/dix/dix.O' OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)' else DIX_LIB='$(top_builddir)/dix/libdix.la' OS_LIB='$(top_builddir)/os/libos.la' fi MAIN_LIB='$(top_builddir)/dix/libmain.la' MI_LIB='$(top_builddir)/mi/libmi.la' MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' MI_INC='-I$(top_srcdir)/mi' FB_LIB='$(top_builddir)/fb/libfb.la' FB_INC='-I$(top_srcdir)/fb' MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync' MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la' CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' # SHA1 hashing # Check whether --with-sha1 was given. if test ${with_sha1+y} then : withval=$with_sha1; fi ac_fn_c_check_func "$LINENO" "SHA1Init" "ac_cv_func_SHA1Init" if test "x$ac_cv_func_SHA1Init" = xyes then : HAVE_SHA1_IN_LIBC=yes fi if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then with_sha1=libc fi if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then as_fn_error $? "libc requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xlibc; then printf "%s\n" "#define HAVE_SHA1_IN_LIBC 1" >>confdefs.h SHA1_LIBS="" fi ac_fn_c_check_func "$LINENO" "CC_SHA1_Init" "ac_cv_func_CC_SHA1_Init" if test "x$ac_cv_func_CC_SHA1_Init" = xyes then : HAVE_SHA1_IN_COMMONCRYPTO=yes fi if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then with_sha1=CommonCrypto fi if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then as_fn_error $? "CommonCrypto requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xCommonCrypto; then printf "%s\n" "#define HAVE_SHA1_IN_COMMONCRYPTO 1" >>confdefs.h SHA1_LIBS="" fi ac_fn_c_check_header_compile "$LINENO" "wincrypt.h" "ac_cv_header_wincrypt_h" "#include " if test "x$ac_cv_header_wincrypt_h" = xyes then : HAVE_SHA1_IN_CRYPTOAPI=yes fi if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then with_sha1=CryptoAPI fi if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then as_fn_error $? "CryptoAPI requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xCryptoAPI; then printf "%s\n" "#define HAVE_SHA1_IN_CRYPTOAPI 1" >>confdefs.h SHA1_LIBS="" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1Init in -lmd" >&5 printf %s "checking for SHA1Init in -lmd... " >&6; } if test ${ac_cv_lib_md_SHA1Init+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SHA1Init (void); int main (void) { return SHA1Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_md_SHA1Init=yes else case e in #( e) ac_cv_lib_md_SHA1Init=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_md_SHA1Init" >&5 printf "%s\n" "$ac_cv_lib_md_SHA1Init" >&6; } if test "x$ac_cv_lib_md_SHA1Init" = xyes then : HAVE_LIBMD=yes fi if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then with_sha1=libmd fi if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then as_fn_error $? "libmd requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xlibmd; then printf "%s\n" "#define HAVE_SHA1_IN_LIBMD 1" >>confdefs.h SHA1_LIBS=-lmd fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libsha1" >&5 printf %s "checking for libsha1... " >&6; } if test -n "$LIBSHA1_CFLAGS"; then pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBSHA1_LIBS"; then pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsha1\""; } >&5 ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsha1" 2>&1` else LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsha1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBSHA1_PKG_ERRORS" >&5 HAVE_LIBSHA1=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_LIBSHA1=no else LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_LIBSHA1=yes fi if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then with_sha1=libsha1 fi if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then as_fn_error $? "libsha1 requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xlibsha1; then printf "%s\n" "#define HAVE_SHA1_IN_LIBSHA1 1" >>confdefs.h SHA1_LIBS=-lsha1 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nettle_sha1_init in -lnettle" >&5 printf %s "checking for nettle_sha1_init in -lnettle... " >&6; } if test ${ac_cv_lib_nettle_nettle_sha1_init+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnettle $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char nettle_sha1_init (void); int main (void) { return nettle_sha1_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nettle_nettle_sha1_init=yes else case e in #( e) ac_cv_lib_nettle_nettle_sha1_init=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nettle_nettle_sha1_init" >&5 printf "%s\n" "$ac_cv_lib_nettle_nettle_sha1_init" >&6; } if test "x$ac_cv_lib_nettle_nettle_sha1_init" = xyes then : HAVE_LIBNETTLE=yes fi if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then with_sha1=libnettle fi if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then as_fn_error $? "libnettle requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xlibnettle; then printf "%s\n" "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h SHA1_LIBS=-lnettle fi if test "x$with_sha1" = xnettlestatic && test "x$HAVE_LIBNETTLE" != xyes; then as_fn_error $? "nettlestatic requested but libnettle not found" "$LINENO" 5 fi if test "x$with_sha1" = xnettlestatic; then printf "%s\n" "#define HAVE_SHA1_IN_LIBNETTLE 1" >>confdefs.h SHA1_LIBS=-l:libnettle.a fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5 printf %s "checking for gcry_md_open in -lgcrypt... " >&6; } if test ${ac_cv_lib_gcrypt_gcry_md_open+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char gcry_md_open (void); int main (void) { return gcry_md_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gcrypt_gcry_md_open=yes else case e in #( e) ac_cv_lib_gcrypt_gcry_md_open=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5 printf "%s\n" "$ac_cv_lib_gcrypt_gcry_md_open" >&6; } if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes then : HAVE_LIBGCRYPT=yes fi if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then with_sha1=libgcrypt fi if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then as_fn_error $? "libgcrypt requested but not found" "$LINENO" 5 fi if test "x$with_sha1" = xlibgcrypt; then printf "%s\n" "#define HAVE_SHA1_IN_LIBGCRYPT 1" >>confdefs.h SHA1_LIBS=-lgcrypt fi # We don't need all of the OpenSSL libraries, just libcrypto { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1_Init in -lcrypto" >&5 printf %s "checking for SHA1_Init in -lcrypto... " >&6; } if test ${ac_cv_lib_crypto_SHA1_Init+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char SHA1_Init (void); int main (void) { return SHA1_Init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_crypto_SHA1_Init=yes else case e in #( e) ac_cv_lib_crypto_SHA1_Init=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_SHA1_Init" >&5 printf "%s\n" "$ac_cv_lib_crypto_SHA1_Init" >&6; } if test "x$ac_cv_lib_crypto_SHA1_Init" = xyes then : HAVE_LIBCRYPTO=yes fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 printf %s "checking for openssl... " >&6; } if test -n "$OPENSSL_CFLAGS"; then pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OPENSSL_LIBS"; then pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1` else OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 HAVE_OPENSSL_PKC=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_OPENSSL_PKC=no else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_OPENSSL_PKC=yes fi if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then if test "x$with_sha1" = x; then with_sha1=libcrypto fi else if test "x$with_sha1" = xlibcrypto; then as_fn_error $? "OpenSSL libcrypto requested but not found" "$LINENO" 5 fi fi if test "x$with_sha1" = xlibcrypto; then if test "x$HAVE_LIBCRYPTO" = xyes; then SHA1_LIBS=-lcrypto else SHA1_LIBS="$OPENSSL_LIBS" SHA1_CFLAGS="$OPENSSL_CFLAGS" fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SHA1 implementation" >&5 printf %s "checking for SHA1 implementation... " >&6; } if test "x$with_sha1" = x; then as_fn_error $? "No suitable SHA1 implementation found" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_sha1" >&5 printf "%s\n" "$with_sha1" >&6; } pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $REQUIRED_MODULES $REQUIRED_LIBS" >&5 printf %s "checking for $REQUIRED_MODULES $REQUIRED_LIBS... " >&6; } if test -n "$XSERVERCFLAGS_CFLAGS"; then pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSERVERCFLAGS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XSERVERCFLAGS_LIBS"; then pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSERVERCFLAGS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` else XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($REQUIRED_MODULES $REQUIRED_LIBS) were not met: $XSERVERCFLAGS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XSERVERCFLAGS_CFLAGS and XSERVERCFLAGS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XSERVERCFLAGS_CFLAGS=$pkg_cv_XSERVERCFLAGS_CFLAGS XSERVERCFLAGS_LIBS=$pkg_cv_XSERVERCFLAGS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $REQUIRED_LIBS" >&5 printf %s "checking for $REQUIRED_LIBS... " >&6; } if test -n "$XSERVERLIBS_CFLAGS"; then pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSERVERLIBS_CFLAGS=`$PKG_CONFIG --cflags "$REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XSERVERLIBS_LIBS"; then pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XSERVERLIBS_LIBS=`$PKG_CONFIG --libs "$REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1` else XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$REQUIRED_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XSERVERLIBS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($REQUIRED_LIBS) were not met: $XSERVERLIBS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS and XSERVERLIBS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XSERVERLIBS_CFLAGS and XSERVERLIBS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XSERVERLIBS_CFLAGS=$pkg_cv_XSERVERLIBS_CFLAGS XSERVERLIBS_LIBS=$pkg_cv_XSERVERLIBS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libunwind" >&5 printf %s "checking for libunwind... " >&6; } if test -n "$LIBUNWIND_CFLAGS"; then pkg_cv_LIBUNWIND_CFLAGS="$LIBUNWIND_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_CFLAGS=`$PKG_CONFIG --cflags "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBUNWIND_LIBS"; then pkg_cv_LIBUNWIND_LIBS="$LIBUNWIND_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libunwind\""; } >&5 ($PKG_CONFIG --exists --print-errors "libunwind") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBUNWIND_LIBS=`$PKG_CONFIG --libs "libunwind" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libunwind" 2>&1` else LIBUNWIND_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libunwind" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBUNWIND_PKG_ERRORS" >&5 HAVE_LIBUNWIND=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_LIBUNWIND=no else LIBUNWIND_CFLAGS=$pkg_cv_LIBUNWIND_CFLAGS LIBUNWIND_LIBS=$pkg_cv_LIBUNWIND_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_LIBUNWIND=yes fi if test "x$LIBUNWIND" = "xauto"; then LIBUNWIND="$HAVE_LIBUNWIND" fi if test "x$LIBUNWIND" = "xyes"; then if test "x$HAVE_LIBUNWIND" != "xyes"; then as_fn_error $? "libunwind requested but not installed." "$LINENO" 5 fi printf "%s\n" "#define HAVE_LIBUNWIND 1" >>confdefs.h fi if test "x$LIBUNWIND" = xyes; then HAVE_LIBUNWIND_TRUE= HAVE_LIBUNWIND_FALSE='#' else HAVE_LIBUNWIND_TRUE='#' HAVE_LIBUNWIND_FALSE= fi # Autotools has some unfortunate issues with library handling. In order to # get a server to rebuild when a dependency in the tree is changed, it must # be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be # listed there, or some versions of autotools will break (especially if a -L # is required to find the library). So, we keep two sets of libraries # detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which # will go into the _DEPENDENCIES and _LDADD of the server, and # NAMESPACE_SYS_LIBS which will go into only the _LDADD. The # NAMESPACEMODULES_LIBS detected from pkgconfig should always go in # NAMESPACE_SYS_LIBS. # # XSERVER_LIBS is the set of in-tree libraries which all servers require. # XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers # require. # XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" UTILS_SYS_LIBS="${SYS_LIBS}" # The Xorg binary needs to export symbols so that they can be used from modules # Some platforms require extra flags to do this. libtool should set the # necessary flags for each platform when -export-dynamic is passed to it. LD_EXPORT_SYMBOLS_FLAG="-export-dynamic" LD_NO_UNDEFINED_FLAG= XORG_DRIVER_LIBS= case "$host_os" in cygwin*) LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a" LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a" XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined" CYGWIN=yes ;; solaris*) # We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT # that we can link against for testing if the system linker is new # enough to support -z parent= for verifying loadable modules # are only calling functions defined in either the loading program or # the libraries they're linked with. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(int argc, char **argv) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : mv conftest$EXEEXT conftest.parent { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the linker accepts -Wl,-z,parent=conftest.parent -G" >&5 printf %s "checking whether the linker accepts -Wl,-z,parent=conftest.parent -G... " >&6; } if test ${xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G+y} then : printf %s "(cached) " >&6 else case e in #( e) ax_save_FLAGS=$LDFLAGS LDFLAGS="-Wl,-z,parent=conftest.parent -G" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ extern int main(int argc, char **argv); int call_main(void) { return main(0, (void *)0); } _ACEOF if ac_fn_c_try_link "$LINENO" then : xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=yes else case e in #( e) xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$ax_save_FLAGS ;; esac fi eval xorg_check_linker_flags=$xorg_cv_linker_flags__Wl__z_parent_conftest_parent__G { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $xorg_check_linker_flags" >&5 printf "%s\n" "$xorg_check_linker_flags" >&6; } if test "x$xorg_check_linker_flags" = xyes; then LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg" # Not set yet, since this gets exported in xorg-server.pc to all the drivers, # and they're not all fixed to build correctly with it yet. # XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg" else : fi rm -f conftest.parent fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext ;; esac if test x"$CYGWIN" = xyes; then CYGWIN_TRUE= CYGWIN_FALSE='#' else CYGWIN_TRUE='#' CYGWIN_FALSE= fi if test x"$LD_NO_UNDEFINED_FLAG" != x; then NO_UNDEFINED_TRUE= NO_UNDEFINED_FALSE='#' else NO_UNDEFINED_TRUE='#' NO_UNDEFINED_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SVR4 needs to be defined" >&5 printf %s "checking if SVR4 needs to be defined... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(SVR4) || defined(__svr4__) || defined(__SVR4) I_AM_SVR4 #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP_TRADITIONAL "I_AM_SVR4" >/dev/null 2>&1 then : printf "%s\n" "#define SVR4 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi rm -rf conftest* XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xvfb DDX" >&5 printf %s "checking whether to build Xvfb DDX... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XVFB" >&5 printf "%s\n" "$XVFB" >&6; } if test "x$XVFB" = xyes; then XVFB_TRUE= XVFB_FALSE='#' else XVFB_TRUE='#' XVFB_FALSE= fi if test "x$XVFB" = xyes; then XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBXEXT x11 xau $XDMCP_MODULES" >&5 printf %s "checking for $LIBXEXT x11 xau $XDMCP_MODULES... " >&6; } if test -n "$XNESTMODULES_CFLAGS"; then pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XNESTMODULES_LIBS"; then pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1` else XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XNESTMODULES_PKG_ERRORS" >&5 have_xnest=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } have_xnest=no else XNESTMODULES_CFLAGS=$pkg_cv_XNESTMODULES_CFLAGS XNESTMODULES_LIBS=$pkg_cv_XNESTMODULES_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } have_xnest=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xnest DDX" >&5 printf %s "checking whether to build Xnest DDX... " >&6; } if test "x$XNEST" = xauto; then XNEST="$have_xnest" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XNEST" >&5 printf "%s\n" "$XNEST" >&6; } if test "x$XNEST" = xyes; then XNEST_TRUE= XNEST_FALSE='#' else XNEST_TRUE='#' XNEST_FALSE= fi if test "x$XNEST" = xyes; then if test "x$have_xnest" = xno; then as_fn_error $? "Xnest build explicitly requested, but required modules not found." "$LINENO" 5 fi XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg DDX" >&5 printf %s "checking whether to build Xorg DDX... " >&6; } if test "x$XORG" = xauto; then XORG="yes" case $host_os in cygwin*) XORG="no" ;; mingw*) XORG="no" ;; darwin*) XORG="no" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XORG" >&5 printf "%s\n" "$XORG" >&6; } if test "x$XORG" = xyes; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBXCVT" >&5 printf %s "checking for $LIBXCVT... " >&6; } if test -n "$LIBXCVT_CFLAGS"; then pkg_cv_LIBXCVT_CFLAGS="$LIBXCVT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXCVT_CFLAGS=`$PKG_CONFIG --cflags "$LIBXCVT" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBXCVT_LIBS"; then pkg_cv_LIBXCVT_LIBS="$LIBXCVT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBXCVT\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBXCVT") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXCVT_LIBS=`$PKG_CONFIG --libs "$LIBXCVT" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBXCVT" 2>&1` else LIBXCVT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBXCVT" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXCVT_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($LIBXCVT) were not met: $LIBXCVT_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXCVT_CFLAGS and LIBXCVT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBXCVT_CFLAGS and LIBXCVT_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else LIBXCVT_CFLAGS=$pkg_cv_LIBXCVT_CFLAGS LIBXCVT_LIBS=$pkg_cv_LIBXCVT_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS $LIBXCVT_CFLAGS -DHAVE_XORG_CONFIG_H" XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" XORG_SYS_LIBS="$XORG_SYS_LIBS $LIBXCVT_LIBS" symbol_visibility= have_visibility=disabled if test x$SYMBOL_VISIBILITY != xno; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for symbol visibility support" >&5 printf %s "checking for symbol visibility support... " >&6; } if test x$GCC = xyes; then VISIBILITY_CFLAGS="-fvisibility=hidden" else if test x$SUNCC = xyes; then VISIBILITY_CFLAGS="-xldscope=hidden" else have_visibility=no fi fi if test x$have_visibility != xno; then save_CFLAGS="$CFLAGS" proto_inc=`$PKG_CONFIG --cflags xproto` CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include extern _X_HIDDEN int hidden_int; extern _X_EXPORT int public_int; extern _X_HIDDEN int hidden_int_func(void); extern _X_EXPORT int public_int_func(void); int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : have_visibility=yes else case e in #( e) have_visibility=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$save_CFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_visibility" >&5 printf "%s\n" "$have_visibility" >&6; } if test x$have_visibility != xno; then symbol_visibility=$VISIBILITY_CFLAGS XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" fi fi xorg_bus_bsdpci=no xorg_bus_sparc=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build Xorg PCI functions" >&5 printf %s "checking whether to build Xorg PCI functions... " >&6; } if test "x$PCI" = xyes; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $LIBPCIACCESS" >&5 printf %s "checking for $LIBPCIACCESS... " >&6; } if test -n "$PCIACCESS_CFLAGS"; then pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "$LIBPCIACCESS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PCIACCESS_LIBS"; then pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$LIBPCIACCESS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$LIBPCIACCESS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "$LIBPCIACCESS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1` else PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$LIBPCIACCESS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PCIACCESS_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($LIBPCIACCESS) were not met: $PCIACCESS_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PCIACCESS_CFLAGS and PCIACCESS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS" XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $LIBDRM_LIBS" XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS" printf "%s\n" "#define XSERVER_LIBPCIACCESS 1" >>confdefs.h prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$PCI_TXT_IDS_DIR\"" eval ac_define_dir="\"$ac_define_dir\"" PCI_TXT_IDS_PATH="$ac_define_dir" printf "%s\n" "#define PCI_TXT_IDS_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE case $host_os in gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*) xorg_bus_bsdpci="yes" ;; esac case $host_cpu in sparc*) xorg_bus_sparc="yes" ;; esac else if test "x$CONFIG_UDEV_KMS" = xyes; then as_fn_error $? "Platform device enumeration requires libpciaccess" "$LINENO" 5 fi if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then as_fn_error $? "Cannot build int10 without libpciaccess" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCI" >&5 printf "%s\n" "$PCI" >&6; } if test "x$CONFIG_UDEV_KMS" = xyes; then printf "%s\n" "#define XSERVER_PLATFORM_BUS 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSERVER_PLATFORM_BUS" >&5 printf "%s\n" "$XSERVER_PLATFORM_BUS" >&6; } case $host_os in linux*) XORG_OS_SUBDIR="linux" linux_acpi="no" case $host_cpu in i*86|amd64*|x86_64*|ia64*) linux_acpi=$enable_linux_acpi ;; *) ;; esac for ac_header in linux/apm_bios.h do : ac_fn_c_check_header_compile "$LINENO" "linux/apm_bios.h" "ac_cv_header_linux_apm_bios_h" "$ac_includes_default" if test "x$ac_cv_header_linux_apm_bios_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_APM_BIOS_H 1" >>confdefs.h linux_apm=$enable_linux_apm fi done ;; freebsd* | kfreebsd*-gnu | dragonfly*) XORG_OS_SUBDIR="bsd" ;; netbsd*) XORG_OS_SUBDIR="bsd" ;; openbsd*) XORG_OS_SUBDIR="bsd" ;; solaris*) XORG_OS_SUBDIR="solaris" ac_fn_c_check_header_compile "$LINENO" "sys/kd.h" "ac_cv_header_sys_kd_h" "$ac_includes_default" if test "x$ac_cv_header_sys_kd_h" = xyes then : printf "%s\n" "#define HAVE_SYS_KD_H 1" >>confdefs.h fi for ac_header in sys/vt.h do : ac_fn_c_check_header_compile "$LINENO" "sys/vt.h" "ac_cv_header_sys_vt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_vt_h" = xyes then : printf "%s\n" "#define HAVE_SYS_VT_H 1" >>confdefs.h solaris_vt=yes else case e in #( e) solaris_vt=no ;; esac fi done # Check for minimum supported release { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking Solaris version" >&5 printf %s "checking Solaris version... " >&6; } OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'` if test "${OS_MINOR}" -ge 7 ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Solaris ${OS_MINOR}" >&5 printf "%s\n" "Solaris ${OS_MINOR}" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&5 printf "%s\n" "Solaris \`echo ${host_os}|$SED -e 's/^.*solaris//\`" >&6; } fi if test "${OS_MINOR}" -lt 8 ; then as_fn_error $? "This release no longer supports Solaris versions older than Solaris 8." "$LINENO" 5 fi ac_fn_check_decl "$LINENO" "_LP64" "ac_cv_have_decl__LP64" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl__LP64" = xyes then : SOLARIS_64="yes" else case e in #( e) SOLARIS_64="no" ;; esac fi case $host_cpu in sparc*) SOLARIS_INOUT_ARCH="sparcv8plus" ;; i*86|x86_64*) if test x$SOLARIS_64 = xyes ; then SOLARIS_INOUT_ARCH="amd64" else SOLARIS_INOUT_ARCH="ia32" fi ;; *) as_fn_error $? "Unsupported Solaris platform. Only SPARC & x86 \ are supported on Solaris in this release. If you are \ interested in porting Xorg to your platform, please email \ xorg@lists.freedesktop.org." "$LINENO" 5 ;; esac ;; gnu*) XORG_OS_SUBDIR="hurd" ;; cygwin*) XORG_OS_SUBDIR="stub" ;; *) XORG_OS_SUBDIR="stub" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Your OS is unknown. If you are interested in porting Xorg to your platform, please email xorg@lists.freedesktop.org." >&5 printf "%s\n" "$as_me: Your OS is unknown. If you are interested in porting Xorg to your platform, please email xorg@lists.freedesktop.org." >&6;} ;; esac if test "x$DGA" = xauto; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $DGAPROTO" >&5 printf %s "checking for $DGAPROTO... " >&6; } if test -n "$DGA_CFLAGS"; then pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DGA_LIBS"; then pkg_cv_DGA_LIBS="$DGA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1` else DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 DGA=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } DGA=no else DGA_CFLAGS=$pkg_cv_DGA_CFLAGS DGA_LIBS=$pkg_cv_DGA_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } DGA=yes fi fi if test "x$DGA" = xyes; then XORG_MODULES="$XORG_MODULES $DGAPROTO" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $DGAPROTO" >&5 printf %s "checking for $DGAPROTO... " >&6; } if test -n "$DGA_CFLAGS"; then pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DGA_CFLAGS=`$PKG_CONFIG --cflags "$DGAPROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$DGA_LIBS"; then pkg_cv_DGA_LIBS="$DGA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$DGAPROTO\""; } >&5 ($PKG_CONFIG --exists --print-errors "$DGAPROTO") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_DGA_LIBS=`$PKG_CONFIG --libs "$DGAPROTO" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$DGAPROTO" 2>&1` else DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$DGAPROTO" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$DGA_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($DGAPROTO) were not met: $DGA_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables DGA_CFLAGS and DGA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables DGA_CFLAGS and DGA_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else DGA_CFLAGS=$pkg_cv_DGA_CFLAGS DGA_LIBS=$pkg_cv_DGA_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi printf "%s\n" "#define DGA 1" >>confdefs.h printf "%s\n" "#define XFreeXDGA 1" >>confdefs.h fi if test "x$XF86VIDMODE" = xyes; then XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" fi if test -n "$XORG_MODULES"; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XORG_MODULES" >&5 printf %s "checking for $XORG_MODULES... " >&6; } if test -n "$XORG_MODULES_CFLAGS"; then pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_MODULES_CFLAGS=`$PKG_CONFIG --cflags "$XORG_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XORG_MODULES_LIBS"; then pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_MODULES_LIBS=`$PKG_CONFIG --libs "$XORG_MODULES" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XORG_MODULES" 2>&1` else XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XORG_MODULES" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XORG_MODULES_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($XORG_MODULES) were not met: $XORG_MODULES_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XORG_MODULES_CFLAGS and XORG_MODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XORG_MODULES_CFLAGS and XORG_MODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XORG_MODULES_CFLAGS=$pkg_cv_XORG_MODULES_CFLAGS XORG_MODULES_LIBS=$pkg_cv_XORG_MODULES_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" fi if test "x$DRM" = xyes -a "x$DRI2" = xyes; then XORG_DRIVER_MODESETTING=yes fi XF86CONFIGFILE="xorg.conf" XF86CONFIGDIR="xorg.conf.d" LOGPREFIX="Xorg." XDG_DATA_HOME=".local/share" XDG_DATA_HOME_LOGDIR="xorg" printf "%s\n" "#define XORG_SERVER 1" >>confdefs.h printf "%s\n" "#define XORGSERVER 1" >>confdefs.h printf "%s\n" "#define XFree86Server 1" >>confdefs.h printf "%s\n" "#define XORG_VERSION_CURRENT $VENDOR_RELEASE" >>confdefs.h printf "%s\n" "#define NEED_XF86_TYPES 1" >>confdefs.h printf "%s\n" "#define NEED_XF86_PROTOTYPES 1" >>confdefs.h printf "%s\n" "#define __XSERVERNAME__ \"Xorg\"" >>confdefs.h prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XF86CONFIGFILE\"" eval ac_define_dir="\"$ac_define_dir\"" XCONFIGFILE="$ac_define_dir" printf "%s\n" "#define XCONFIGFILE \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XF86CONFIGFILE\"" eval ac_define_dir="\"$ac_define_dir\"" XF86CONFIGFILE="$ac_define_dir" printf "%s\n" "#define XF86CONFIGFILE \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XF86CONFIGDIR\"" eval ac_define_dir="\"$ac_define_dir\"" XCONFIGDIR="$ac_define_dir" printf "%s\n" "#define XCONFIGDIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$moduledir\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_MODULE_PATH="$ac_define_dir" printf "%s\n" "#define DEFAULT_MODULE_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$libdir\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_LIBRARY_PATH="$ac_define_dir" printf "%s\n" "#define DEFAULT_LIBRARY_PATH \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$logdir\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_LOGDIR="$ac_define_dir" printf "%s\n" "#define DEFAULT_LOGDIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$LOGPREFIX\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_LOGPREFIX="$ac_define_dir" printf "%s\n" "#define DEFAULT_LOGPREFIX \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XDG_DATA_HOME\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_XDG_DATA_HOME="$ac_define_dir" printf "%s\n" "#define DEFAULT_XDG_DATA_HOME \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$XDG_DATA_HOME_LOGDIR\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_XDG_DATA_HOME_LOGDIR="$ac_define_dir" printf "%s\n" "#define DEFAULT_XDG_DATA_HOME_LOGDIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE printf "%s\n" "#define __VENDORDWEBSUPPORT__ \"$VENDOR_WEB\"" >>confdefs.h if test "x$VGAHW" = xyes; then printf "%s\n" "#define WITH_VGAHW 1" >>confdefs.h fi driverdir="$moduledir/drivers" sdkdir="$includedir/xorg" extdir="$includedir/X11/extensions" sysconfigdir="$datadir/X11/$XF86CONFIGDIR" # stuff the ABI versions into the pc file too extract_abi() { grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' } abi_ansic=`extract_abi ANSIC` abi_videodrv=`extract_abi VIDEODRV` abi_xinput=`extract_abi XINPUT` abi_extension=`extract_abi EXTENSION` fi if test "x$XORG" = xyes; then XORG_TRUE= XORG_FALSE='#' else XORG_TRUE='#' XORG_FALSE= fi if test "x$PCI" = xyes; then XORG_BUS_PCI_TRUE= XORG_BUS_PCI_FALSE='#' else XORG_BUS_PCI_TRUE='#' XORG_BUS_PCI_FALSE= fi if test "x$xorg_bus_bsdpci" = xyes; then XORG_BUS_BSDPCI_TRUE= XORG_BUS_BSDPCI_FALSE='#' else XORG_BUS_BSDPCI_TRUE='#' XORG_BUS_BSDPCI_FALSE= fi if test "x$xorg_bus_sparc" = xyes; then XORG_BUS_SPARC_TRUE= XORG_BUS_SPARC_FALSE='#' else XORG_BUS_SPARC_TRUE='#' XORG_BUS_SPARC_FALSE= fi if test "x$linux_acpi" = xyes; then LNXACPI_TRUE= LNXACPI_FALSE='#' else LNXACPI_TRUE='#' LNXACPI_FALSE= fi if test "x$linux_apm" = xyes; then LNXAPM_TRUE= LNXAPM_FALSE='#' else LNXAPM_TRUE='#' LNXAPM_FALSE= fi if test "x$solaris_vt" = xyes; then SOLARIS_VT_TRUE= SOLARIS_VT_FALSE='#' else SOLARIS_VT_TRUE='#' SOLARIS_VT_FALSE= fi if test "x$DGA" = xyes; then DGA_TRUE= DGA_FALSE='#' else DGA_TRUE='#' DGA_FALSE= fi if test "x$CONFIG_UDEV_KMS" = xyes; then XORG_BUS_PLATFORM_TRUE= XORG_BUS_PLATFORM_FALSE='#' else XORG_BUS_PLATFORM_TRUE='#' XORG_BUS_PLATFORM_FALSE= fi if test "x$XORG_DRIVER_MODESETTING" = xyes; then XORG_DRIVER_MODESETTING_TRUE= XORG_DRIVER_MODESETTING_FALSE='#' else XORG_DRIVER_MODESETTING_TRUE='#' XORG_DRIVER_MODESETTING_FALSE= fi if test "x$XORG_DRIVER_INPUT_INPUTTEST" = xyes; then XORG_DRIVER_INPUT_INPUTTEST_TRUE= XORG_DRIVER_INPUT_INPUTTEST_FALSE='#' else XORG_DRIVER_INPUT_INPUTTEST_TRUE='#' XORG_DRIVER_INPUT_INPUTTEST_FALSE= fi if test "x$GLAMOR" = xauto; then if echo "$XORG" "$XEPHYR" | grep -q yes ; then GLAMOR=yes fi fi if test "x$GLAMOR" = xyes; then GLAMOR_TRUE= GLAMOR_FALSE='#' else GLAMOR_TRUE='#' GLAMOR_FALSE= fi if test "x$GLAMOR" = xyes; then printf "%s\n" "#define GLAMOR 1" >>confdefs.h pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for epoxy" >&5 printf %s "checking for epoxy... " >&6; } if test -n "$GLAMOR_CFLAGS"; then pkg_cv_GLAMOR_CFLAGS="$GLAMOR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5 ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLAMOR_CFLAGS=`$PKG_CONFIG --cflags "epoxy" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GLAMOR_LIBS"; then pkg_cv_GLAMOR_LIBS="$GLAMOR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy\""; } >&5 ($PKG_CONFIG --exists --print-errors "epoxy") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GLAMOR_LIBS=`$PKG_CONFIG --libs "epoxy" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GLAMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "epoxy" 2>&1` else GLAMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "epoxy" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GLAMOR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (epoxy) were not met: $GLAMOR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GLAMOR_CFLAGS and GLAMOR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables GLAMOR_CFLAGS and GLAMOR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else GLAMOR_CFLAGS=$pkg_cv_GLAMOR_CFLAGS GLAMOR_LIBS=$pkg_cv_GLAMOR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.4.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "epoxy >= 1.4.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then printf "%s\n" "#define GLAMOR_HAS_EGL_QUERY_DMABUF 1" >>confdefs.h fi if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"epoxy >= 1.5.4\""; } >&5 ($PKG_CONFIG --exists --print-errors "epoxy >= 1.5.4") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then printf "%s\n" "#define GLAMOR_HAS_EGL_QUERY_DRIVER 1" >>confdefs.h fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for \"$LIBGBM\"" >&5 printf %s "checking for \"$LIBGBM\"... " >&6; } if test -n "$GBM_CFLAGS"; then pkg_cv_GBM_CFLAGS="$GBM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5 ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GBM_CFLAGS=`$PKG_CONFIG --cflags ""$LIBGBM"" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$GBM_LIBS"; then pkg_cv_GBM_LIBS="$GBM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"\$LIBGBM\"\""; } >&5 ($PKG_CONFIG --exists --print-errors ""$LIBGBM"") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_GBM_LIBS=`$PKG_CONFIG --libs ""$LIBGBM"" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then GBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs ""$LIBGBM"" 2>&1` else GBM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs ""$LIBGBM"" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$GBM_PKG_ERRORS" >&5 GBM=no elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } GBM=no else GBM_CFLAGS=$pkg_cv_GBM_CFLAGS GBM_LIBS=$pkg_cv_GBM_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } GBM=yes fi if test "x$GBM" = xyes; then printf "%s\n" "#define GLAMOR_HAS_GBM 1" >>confdefs.h ac_fn_check_decl "$LINENO" "GBM_BO_USE_LINEAR" "ac_cv_have_decl_GBM_BO_USE_LINEAR" "#include #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_GBM_BO_USE_LINEAR" = xyes then : printf "%s\n" "#define GLAMOR_HAS_GBM_LINEAR 1" >>confdefs.h fi if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 17.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gbm >= 17.1.0") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then printf "%s\n" "#define GBM_BO_WITH_MODIFIERS 1" >>confdefs.h fi else if test "x$XORG" = xyes; then as_fn_error $? "Glamor for Xorg requires $LIBGBM" "$LINENO" 5 fi fi fi if test "x$GBM" = xyes; then GLAMOR_EGL_TRUE= GLAMOR_EGL_FALSE='#' else GLAMOR_EGL_TRUE='#' GLAMOR_EGL_FALSE= fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build XWin DDX" >&5 printf %s "checking whether to build XWin DDX... " >&6; } if test "x$XWIN" = xauto; then case $host_os in cygwin*) XWIN="yes" ;; mingw*) XWIN="yes" ;; *) XWIN="no" ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XWIN" >&5 printf "%s\n" "$XWIN" >&6; } if test "x$XWIN" = xyes; then prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$logdir\"" eval ac_define_dir="\"$ac_define_dir\"" DEFAULT_LOGDIR="$ac_define_dir" printf "%s\n" "#define DEFAULT_LOGDIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE printf "%s\n" "#define XORG_VERSION_CURRENT $VENDOR_RELEASE" >>confdefs.h printf "%s\n" "#define __VENDORDWEBSUPPORT__ \"$VENDOR_WEB\"" >>confdefs.h if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_WINDRES+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 printf "%s\n" "$WINDRES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_WINDRES"; then ac_ct_WINDRES=$WINDRES # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_WINDRES+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$ac_ct_WINDRES"; then ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_WINDRES="windres" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES if test -n "$ac_ct_WINDRES"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 printf "%s\n" "$ac_ct_WINDRES" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_WINDRES" = x; then WINDRES="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac WINDRES=$ac_ct_WINDRES fi else WINDRES="$ac_cv_prog_WINDRES" fi pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" >&5 printf %s "checking for xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes... " >&6; } if test -n "$XWINMODULES_CFLAGS"; then pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XWINMODULES_LIBS"; then pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes\""; } >&5 ($PKG_CONFIG --exists --print-errors "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>&1` else XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XWINMODULES_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes) were not met: $XWINMODULES_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XWINMODULES_CFLAGS and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XWINMODULES_CFLAGS and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XWINMODULES_CFLAGS=$pkg_cv_XWINMODULES_CFLAGS XWINMODULES_LIBS=$pkg_cv_XWINMODULES_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi if test "x$WINDOWSDRI" = xauto; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then WINDOWSDRI=yes else WINDOWSDRI=no fi fi if test "x$WINDOWSDRI" = xyes ; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for windowsdriproto" >&5 printf %s "checking for windowsdriproto... " >&6; } if test -n "$WINDOWSDRI_CFLAGS"; then pkg_cv_WINDOWSDRI_CFLAGS="$WINDOWSDRI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_WINDOWSDRI_CFLAGS=`$PKG_CONFIG --cflags "windowsdriproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$WINDOWSDRI_LIBS"; then pkg_cv_WINDOWSDRI_LIBS="$WINDOWSDRI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"windowsdriproto\""; } >&5 ($PKG_CONFIG --exists --print-errors "windowsdriproto") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_WINDOWSDRI_LIBS=`$PKG_CONFIG --libs "windowsdriproto" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "windowsdriproto" 2>&1` else WINDOWSDRI_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "windowsdriproto" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$WINDOWSDRI_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (windowsdriproto) were not met: $WINDOWSDRI_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS and WINDOWSDRI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables WINDOWSDRI_CFLAGS and WINDOWSDRI_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else WINDOWSDRI_CFLAGS=$pkg_cv_WINDOWSDRI_CFLAGS WINDOWSDRI_LIBS=$pkg_cv_WINDOWSDRI_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi case $host_os in cygwin*) XWIN_SERVER_NAME=XWin printf "%s\n" "#define HAS_DEVWINDOWS 1" >>confdefs.h ;; mingw*) XWIN_SERVER_NAME=Xming printf "%s\n" "#define RELOCATE_PROJECTROOT 1" >>confdefs.h printf "%s\n" "#define HAS_WINSOCK 1" >>confdefs.h XWIN_SYS_LIBS="-lpthread -lws2_32" ;; esac XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" if test "x$DEBUGGING" = xyes; then printf "%s\n" "#define CYGDEBUG 1" >>confdefs.h printf "%s\n" "#define CYGWINDOWING_DEBUG 1" >>confdefs.h printf "%s\n" "#define CYGMULTIWINDOW_DEBUG 1" >>confdefs.h fi printf "%s\n" "#define DDXOSVERRORF 1" >>confdefs.h printf "%s\n" "#define DDXBEFORERESET 1" >>confdefs.h if test "x$XWIN" = xyes && test "x$GLX" = xyes ; then # Extract the first word of "python3", so it can be a program name with args. set dummy python3; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PYTHON3+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -n "$PYTHON3"; then ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_PYTHON3="python3" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi ;; esac fi PYTHON3=$ac_cv_prog_PYTHON3 if test -n "$PYTHON3"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5 printf "%s\n" "$PYTHON3" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test -z "$PYTHON3"; then as_fn_error $? "python3 not found" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python module lxml" >&5 printf %s "checking for python module lxml... " >&6; } $PYTHON3 -c "import lxml;" if test $? -ne 0 ; then as_fn_error $? "not found" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for khronos-opengl-registry" >&5 printf %s "checking for khronos-opengl-registry... " >&6; } if test -n "$KHRONOS_OPENGL_REGISTRY_CFLAGS"; then pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS="$KHRONOS_OPENGL_REGISTRY_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5 ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS=`$PKG_CONFIG --cflags "khronos-opengl-registry" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$KHRONOS_OPENGL_REGISTRY_LIBS"; then pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS="$KHRONOS_OPENGL_REGISTRY_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"khronos-opengl-registry\""; } >&5 ($PKG_CONFIG --exists --print-errors "khronos-opengl-registry") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS=`$PKG_CONFIG --libs "khronos-opengl-registry" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "khronos-opengl-registry" 2>&1` else KHRONOS_OPENGL_REGISTRY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "khronos-opengl-registry" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$KHRONOS_OPENGL_REGISTRY_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (khronos-opengl-registry) were not met: $KHRONOS_OPENGL_REGISTRY_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables KHRONOS_OPENGL_REGISTRY_CFLAGS and KHRONOS_OPENGL_REGISTRY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else KHRONOS_OPENGL_REGISTRY_CFLAGS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_CFLAGS KHRONOS_OPENGL_REGISTRY_LIBS=$pkg_cv_KHRONOS_OPENGL_REGISTRY_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir` fi fi fi if test "x$XWIN" = xyes; then XWIN_TRUE= XWIN_FALSE='#' else XWIN_TRUE='#' XWIN_FALSE= fi if test "x$XWIN" = xyes && test "x$GLX" = xyes; then XWIN_GLX_WINDOWS_TRUE= XWIN_GLX_WINDOWS_FALSE='#' else XWIN_GLX_WINDOWS_TRUE='#' XWIN_GLX_WINDOWS_FALSE= fi if test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes; then XWIN_WINDOWS_DRI_TRUE= XWIN_WINDOWS_DRI_FALSE='#' else XWIN_WINDOWS_DRI_TRUE='#' XWIN_WINDOWS_DRI_FALSE= fi if test "x$XQUARTZ" = xyes; then printf "%s\n" "#define XQUARTZ 1" >>confdefs.h printf "%s\n" "#define ROOTLESS 1" >>confdefs.h XQUARTZ_LIBS="$COMPOSITE_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for xp_init in -lXplugin" >&5 printf %s "checking for xp_init in -lXplugin... " >&6; } if test ${ac_cv_lib_Xplugin_xp_init+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lXplugin $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char xp_init (void); int main (void) { return xp_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_Xplugin_xp_init=yes else case e in #( e) ac_cv_lib_Xplugin_xp_init=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xplugin_xp_init" >&5 printf "%s\n" "$ac_cv_lib_Xplugin_xp_init" >&6; } if test "x$ac_cv_lib_Xplugin_xp_init" = xyes then : : fi CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $APPLEWMPROTO $LIBAPPLEWM xfixes x11" >&5 printf %s "checking for $APPLEWMPROTO $LIBAPPLEWM xfixes x11... " >&6; } if test -n "$XPBPROXY_CFLAGS"; then pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XPBPROXY_CFLAGS=`$PKG_CONFIG --cflags "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XPBPROXY_LIBS"; then pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$APPLEWMPROTO \$LIBAPPLEWM xfixes x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "$APPLEWMPROTO $LIBAPPLEWM xfixes x11") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XPBPROXY_LIBS=`$PKG_CONFIG --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1` else XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$APPLEWMPROTO $LIBAPPLEWM xfixes x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XPBPROXY_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($APPLEWMPROTO $LIBAPPLEWM xfixes x11) were not met: $XPBPROXY_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XPBPROXY_CFLAGS and XPBPROXY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XPBPROXY_CFLAGS and XPBPROXY_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XPBPROXY_CFLAGS=$pkg_cv_XPBPROXY_CFLAGS XPBPROXY_LIBS=$pkg_cv_XPBPROXY_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi if test "x$XQUARTZ_SPARKLE" = xyes ; then printf "%s\n" "#define XQUARTZ_SPARKLE 1" >>confdefs.h fi if test "x$STANDALONE_XPBPROXY" = xyes ; then printf "%s\n" "#define STANDALONE_XPBPROXY 1" >>confdefs.h fi fi if test "x$XQUARTZ" = xyes -o "x$XWIN" = xyes ; then PSEUDORAMIX_TRUE= PSEUDORAMIX_FALSE='#' else PSEUDORAMIX_TRUE='#' PSEUDORAMIX_FALSE= fi # Support for objc in autotools is minimal and not documented. OBJC='$(CC)' OBJCLD='$(CCLD)' OBJCLINK='$(LINK)' OBJCFLAGS='$(CFLAGS)' # internal, undocumented automake func follows :( depcc="$OBJC" am_compiler_list='gcc3 gcc' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 printf %s "checking dependency style of $depcc... " >&6; } if test ${am_cv_OBJC_dependencies_compiler_type+y} then : printf %s "(cached) " >&6 else case e in #( e) if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_OBJC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_OBJC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_OBJC_dependencies_compiler_type=none fi ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_OBJC_dependencies_compiler_type" >&5 printf "%s\n" "$am_cv_OBJC_dependencies_compiler_type" >&6; } OBJCDEPMODE=depmode=$am_cv_OBJC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_OBJC_dependencies_compiler_type" = gcc3; then am__fastdepOBJC_TRUE= am__fastdepOBJC_FALSE='#' else am__fastdepOBJC_TRUE='#' am__fastdepOBJC_FALSE= fi if test "x$XQUARTZ" = xyes; then XQUARTZ_TRUE= XQUARTZ_FALSE='#' else XQUARTZ_TRUE='#' XQUARTZ_FALSE= fi if test "x$XQUARTZ_SPARKLE" != "xno"; then XQUARTZ_SPARKLE_TRUE= XQUARTZ_SPARKLE_FALSE='#' else XQUARTZ_SPARKLE_TRUE='#' XQUARTZ_SPARKLE_FALSE= fi if test "x$STANDALONE_XPBPROXY" = xyes; then STANDALONE_XPBPROXY_TRUE= STANDALONE_XPBPROXY_FALSE='#' else STANDALONE_XPBPROXY_TRUE='#' STANDALONE_XPBPROXY_FALSE= fi XEPHYR_LIBS= XEPHYR_INCS= if test x$KDRIVE = xyes; then KDRIVE_TRUE= KDRIVE_FALSE='#' else KDRIVE_TRUE='#' KDRIVE_FALSE= fi if test "$KDRIVE" = yes; then XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil xcb-aux xcb-image xcb-icccm xcb-shm >= 1.9.3 xcb-keysyms xcb-randr xcb-xkb" if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv" fi if test "x$DRI" = xyes && test "x$GLX" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBDRM xcb-glx xcb-xf86dri > 1.6" fi if test "x$GLAMOR" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS x11-xcb" fi if test "x$XEPHYR" = xauto; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XEPHYR_REQUIRED_LIBS" >&5 printf %s "checking for $XEPHYR_REQUIRED_LIBS... " >&6; } if test -n "$XEPHYR_CFLAGS"; then pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XEPHYR_LIBS"; then pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1` else XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEPHYR_PKG_ERRORS" >&5 XEPHYR="no" elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } XEPHYR="no" else XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } XEPHYR="yes" fi elif test "x$XEPHYR" = xyes ; then pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XEPHYR_REQUIRED_LIBS" >&5 printf %s "checking for $XEPHYR_REQUIRED_LIBS... " >&6; } if test -n "$XEPHYR_CFLAGS"; then pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEPHYR_CFLAGS=`$PKG_CONFIG --cflags "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$XEPHYR_LIBS"; then pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\""; } >&5 ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XEPHYR_LIBS=`$PKG_CONFIG --libs "$XEPHYR_REQUIRED_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1` else XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$XEPHYR_REQUIRED_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$XEPHYR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($XEPHYR_REQUIRED_LIBS) were not met: $XEPHYR_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XEPHYR_CFLAGS and XEPHYR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables XEPHYR_CFLAGS and XEPHYR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See 'config.log' for more details" "$LINENO" 5; } else XEPHYR_CFLAGS=$pkg_cv_XEPHYR_CFLAGS XEPHYR_LIBS=$pkg_cv_XEPHYR_LIBS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi fi # Xephyr needs nanosleep() which is in librt on Solaris ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" if test "x$ac_cv_func_nanosleep" = xyes then : else case e in #( e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 printf %s "checking for nanosleep in -lrt... " >&6; } if test ${ac_cv_lib_rt_nanosleep+y} then : printf %s "(cached) " >&6 else case e in #( e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. The 'extern "C"' is for builds by C++ compilers; although this is not generally supported in C code supporting it here has little cost and some practical benefit (sr 110532). */ #ifdef __cplusplus extern "C" #endif char nanosleep (void); int main (void) { return nanosleep (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_nanosleep=yes else case e in #( e) ac_cv_lib_rt_nanosleep=no ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 printf "%s\n" "$ac_cv_lib_rt_nanosleep" >&6; } if test "x$ac_cv_lib_rt_nanosleep" = xyes then : XEPHYR_LIBS="$XEPHYR_LIBS -lrt" fi ;; esac fi # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" KDRIVE_CFLAGS="$XSERVER_CFLAGS" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' KDRIVE_MAIN_LIB="$MAIN_LIB" KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB" KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" fi if test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes; then XEPHYR_TRUE= XEPHYR_FALSE='#' else XEPHYR_TRUE='#' XEPHYR_FALSE= fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef __GLIBC__ #error not glibc #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$prefix\"" eval ac_define_dir="\"$ac_define_dir\"" PROJECTROOT="$ac_define_dir" printf "%s\n" "#define PROJECTROOT \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE prefix_NONE= exec_prefix_NONE= test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix eval ac_define_dir="\"$sysconfdir\"" eval ac_define_dir="\"$ac_define_dir\"" SYSCONFDIR="$ac_define_dir" printf "%s\n" "#define SYSCONFDIR \"$ac_define_dir\"" >>confdefs.h test "$prefix_NONE" && prefix=NONE test "$exec_prefix_NONE" && exec_prefix=NONE DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" ac_config_commands="$ac_config_commands sdksyms" if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: *********************************************** Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available! ***********************************************" >&5 printf "%s\n" "$as_me: WARNING: *********************************************** Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available! ***********************************************" >&2;} fi ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/inputtest/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/gtf/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile test/Makefile xserver.ent xorg-server.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # 'ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 printf %s "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 printf "%s\n" "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOT_TRUE}" && test -z "${HAVE_DOT_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_STYLESHEETS_TRUE}" && test -z "${HAVE_STYLESHEETS_FALSE}"; then as_fn_error $? "conditional \"HAVE_STYLESHEETS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DOCS_TRUE}" && test -z "${ENABLE_DOCS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEVEL_DOCS_TRUE}" && test -z "${ENABLE_DEVEL_DOCS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEVEL_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XMLTO_TEXT_TRUE}" && test -z "${HAVE_XMLTO_TEXT_FALSE}"; then as_fn_error $? "conditional \"HAVE_XMLTO_TEXT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then as_fn_error $? "conditional \"HAVE_XMLTO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FOP_TRUE}" && test -z "${HAVE_FOP_FALSE}"; then as_fn_error $? "conditional \"HAVE_FOP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_XSLTPROC_TRUE}" && test -z "${HAVE_XSLTPROC_FALSE}"; then as_fn_error $? "conditional \"HAVE_XSLTPROC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_UNIT_TESTS_TRUE}" && test -z "${ENABLE_UNIT_TESTS_FALSE}"; then as_fn_error $? "conditional \"ENABLE_UNIT_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LD_WRAP_TRUE}" && test -z "${HAVE_LD_WRAP_FALSE}"; then as_fn_error $? "conditional \"HAVE_LD_WRAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCCAS_TRUE}" && test -z "${am__fastdepCCAS_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCCAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi # Check whether --enable-year2038 was given. if test ${enable_year2038+y} then : enableval=$enable_year2038; fi if test -z "${XSERVER_DTRACE_TRUE}" && test -z "${XSERVER_DTRACE_FALSE}"; then as_fn_error $? "conditional \"XSERVER_DTRACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SPECIAL_DTRACE_OBJECTS_TRUE}" && test -z "${SPECIAL_DTRACE_OBJECTS_FALSE}"; then as_fn_error $? "conditional \"SPECIAL_DTRACE_OBJECTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${POLL_TRUE}" && test -z "${POLL_FALSE}"; then as_fn_error $? "conditional \"POLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AGP_TRUE}" && test -z "${AGP_FALSE}"; then as_fn_error $? "conditional \"AGP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FBDEVHW_TRUE}" && test -z "${FBDEVHW_FALSE}"; then as_fn_error $? "conditional \"FBDEVHW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FREEBSD_KLDLOAD_TRUE}" && test -z "${FREEBSD_KLDLOAD_FALSE}"; then as_fn_error $? "conditional \"FREEBSD_KLDLOAD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ALPHA_VIDEO_TRUE}" && test -z "${ALPHA_VIDEO_FALSE}"; then as_fn_error $? "conditional \"ALPHA_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ARM_VIDEO_TRUE}" && test -z "${ARM_VIDEO_FALSE}"; then as_fn_error $? "conditional \"ARM_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${I386_VIDEO_TRUE}" && test -z "${I386_VIDEO_FALSE}"; then as_fn_error $? "conditional \"I386_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PPC_VIDEO_TRUE}" && test -z "${PPC_VIDEO_FALSE}"; then as_fn_error $? "conditional \"PPC_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SPARC64_VIDEO_TRUE}" && test -z "${SPARC64_VIDEO_FALSE}"; then as_fn_error $? "conditional \"SPARC64_VIDEO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_SETUID_TRUE}" && test -z "${INSTALL_SETUID_FALSE}"; then as_fn_error $? "conditional \"INSTALL_SETUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SECURE_RPC_TRUE}" && test -z "${SECURE_RPC_FALSE}"; then as_fn_error $? "conditional \"SECURE_RPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INT10_VM86_TRUE}" && test -z "${INT10_VM86_FALSE}"; then as_fn_error $? "conditional \"INT10_VM86\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INT10_X86EMU_TRUE}" && test -z "${INT10_X86EMU_FALSE}"; then as_fn_error $? "conditional \"INT10_X86EMU\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INT10_STUB_TRUE}" && test -z "${INT10_STUB_FALSE}"; then as_fn_error $? "conditional \"INT10_STUB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SYSTEMD_DAEMON_TRUE}" && test -z "${HAVE_SYSTEMD_DAEMON_FALSE}"; then as_fn_error $? "conditional \"HAVE_SYSTEMD_DAEMON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONFIG_UDEV_TRUE}" && test -z "${CONFIG_UDEV_FALSE}"; then as_fn_error $? "conditional \"CONFIG_UDEV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONFIG_UDEV_KMS_TRUE}" && test -z "${CONFIG_UDEV_KMS_FALSE}"; then as_fn_error $? "conditional \"CONFIG_UDEV_KMS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DBUS_TRUE}" && test -z "${HAVE_DBUS_FALSE}"; then as_fn_error $? "conditional \"HAVE_DBUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONFIG_HAL_TRUE}" && test -z "${CONFIG_HAL_FALSE}"; then as_fn_error $? "conditional \"CONFIG_HAL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SYSTEMD_LOGIND_TRUE}" && test -z "${SYSTEMD_LOGIND_FALSE}"; then as_fn_error $? "conditional \"SYSTEMD_LOGIND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SUID_WRAPPER_TRUE}" && test -z "${SUID_WRAPPER_FALSE}"; then as_fn_error $? "conditional \"SUID_WRAPPER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NEED_DBUS_TRUE}" && test -z "${NEED_DBUS_FALSE}"; then as_fn_error $? "conditional \"NEED_DBUS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CONFIG_WSCONS_TRUE}" && test -z "${CONFIG_WSCONS_FALSE}"; then as_fn_error $? "conditional \"CONFIG_WSCONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XV_TRUE}" && test -z "${XV_FALSE}"; then as_fn_error $? "conditional \"XV\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XVMC_TRUE}" && test -z "${XVMC_FALSE}"; then as_fn_error $? "conditional \"XVMC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPOSITE_TRUE}" && test -z "${COMPOSITE_FALSE}"; then as_fn_error $? "conditional \"COMPOSITE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MITSHM_TRUE}" && test -z "${MITSHM_FALSE}"; then as_fn_error $? "conditional \"MITSHM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RECORD_TRUE}" && test -z "${RECORD_FALSE}"; then as_fn_error $? "conditional \"RECORD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SCREENSAVER_TRUE}" && test -z "${SCREENSAVER_FALSE}"; then as_fn_error $? "conditional \"SCREENSAVER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${RES_TRUE}" && test -z "${RES_FALSE}"; then as_fn_error $? "conditional \"RES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CLIENTIDS_TRUE}" && test -z "${CLIENTIDS_FALSE}"; then as_fn_error $? "conditional \"CLIENTIDS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DRI_TRUE}" && test -z "${DRI_FALSE}"; then as_fn_error $? "conditional \"DRI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DRI2_TRUE}" && test -z "${DRI2_FALSE}"; then as_fn_error $? "conditional \"DRI2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUSFAULT_TRUE}" && test -z "${BUSFAULT_FALSE}"; then as_fn_error $? "conditional \"BUSFAULT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XSHMFENCE_TRUE}" && test -z "${XSHMFENCE_FALSE}"; then as_fn_error $? "conditional \"XSHMFENCE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DRI3_TRUE}" && test -z "${DRI3_FALSE}"; then as_fn_error $? "conditional \"DRI3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GLX_TRUE}" && test -z "${GLX_FALSE}"; then as_fn_error $? "conditional \"GLX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HASHTABLE_TRUE}" && test -z "${HASHTABLE_FALSE}"; then as_fn_error $? "conditional \"HASHTABLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PRESENT_TRUE}" && test -z "${PRESENT_FALSE}"; then as_fn_error $? "conditional \"PRESENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XINERAMA_TRUE}" && test -z "${XINERAMA_FALSE}"; then as_fn_error $? "conditional \"XINERAMA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XACE_TRUE}" && test -z "${XACE_FALSE}"; then as_fn_error $? "conditional \"XACE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XSELINUX_TRUE}" && test -z "${XSELINUX_FALSE}"; then as_fn_error $? "conditional \"XSELINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XCSECURITY_TRUE}" && test -z "${XCSECURITY_FALSE}"; then as_fn_error $? "conditional \"XCSECURITY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DBE_TRUE}" && test -z "${DBE_FALSE}"; then as_fn_error $? "conditional \"DBE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XF86BIGFONT_TRUE}" && test -z "${XF86BIGFONT_FALSE}"; then as_fn_error $? "conditional \"XF86BIGFONT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DPMSExtension_TRUE}" && test -z "${DPMSExtension_FALSE}"; then as_fn_error $? "conditional \"DPMSExtension\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XF86UTILS_TRUE}" && test -z "${XF86UTILS_FALSE}"; then as_fn_error $? "conditional \"XF86UTILS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${VGAHW_TRUE}" && test -z "${VGAHW_FALSE}"; then as_fn_error $? "conditional \"VGAHW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INT10MODULE_TRUE}" && test -z "${INT10MODULE_FALSE}"; then as_fn_error $? "conditional \"INT10MODULE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XDMCP_TRUE}" && test -z "${XDMCP_FALSE}"; then as_fn_error $? "conditional \"XDMCP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XDMAUTH_TRUE}" && test -z "${XDMAUTH_FALSE}"; then as_fn_error $? "conditional \"XDMAUTH\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XF86VIDMODE_TRUE}" && test -z "${XF86VIDMODE_FALSE}"; then as_fn_error $? "conditional \"XF86VIDMODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then as_fn_error $? "conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBUNWIND_TRUE}" && test -z "${HAVE_LIBUNWIND_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBUNWIND\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CYGWIN_TRUE}" && test -z "${CYGWIN_FALSE}"; then as_fn_error $? "conditional \"CYGWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then as_fn_error $? "conditional \"NO_UNDEFINED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XVFB_TRUE}" && test -z "${XVFB_FALSE}"; then as_fn_error $? "conditional \"XVFB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XNEST_TRUE}" && test -z "${XNEST_FALSE}"; then as_fn_error $? "conditional \"XNEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_TRUE}" && test -z "${XORG_FALSE}"; then as_fn_error $? "conditional \"XORG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_BUS_PCI_TRUE}" && test -z "${XORG_BUS_PCI_FALSE}"; then as_fn_error $? "conditional \"XORG_BUS_PCI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_BUS_BSDPCI_TRUE}" && test -z "${XORG_BUS_BSDPCI_FALSE}"; then as_fn_error $? "conditional \"XORG_BUS_BSDPCI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_BUS_SPARC_TRUE}" && test -z "${XORG_BUS_SPARC_FALSE}"; then as_fn_error $? "conditional \"XORG_BUS_SPARC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LNXACPI_TRUE}" && test -z "${LNXACPI_FALSE}"; then as_fn_error $? "conditional \"LNXACPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${LNXAPM_TRUE}" && test -z "${LNXAPM_FALSE}"; then as_fn_error $? "conditional \"LNXAPM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SOLARIS_VT_TRUE}" && test -z "${SOLARIS_VT_FALSE}"; then as_fn_error $? "conditional \"SOLARIS_VT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DGA_TRUE}" && test -z "${DGA_FALSE}"; then as_fn_error $? "conditional \"DGA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_BUS_PLATFORM_TRUE}" && test -z "${XORG_BUS_PLATFORM_FALSE}"; then as_fn_error $? "conditional \"XORG_BUS_PLATFORM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_DRIVER_MODESETTING_TRUE}" && test -z "${XORG_DRIVER_MODESETTING_FALSE}"; then as_fn_error $? "conditional \"XORG_DRIVER_MODESETTING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XORG_DRIVER_INPUT_INPUTTEST_TRUE}" && test -z "${XORG_DRIVER_INPUT_INPUTTEST_FALSE}"; then as_fn_error $? "conditional \"XORG_DRIVER_INPUT_INPUTTEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GLAMOR_TRUE}" && test -z "${GLAMOR_FALSE}"; then as_fn_error $? "conditional \"GLAMOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GLAMOR_EGL_TRUE}" && test -z "${GLAMOR_EGL_FALSE}"; then as_fn_error $? "conditional \"GLAMOR_EGL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XWIN_TRUE}" && test -z "${XWIN_FALSE}"; then as_fn_error $? "conditional \"XWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XWIN_GLX_WINDOWS_TRUE}" && test -z "${XWIN_GLX_WINDOWS_FALSE}"; then as_fn_error $? "conditional \"XWIN_GLX_WINDOWS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XWIN_WINDOWS_DRI_TRUE}" && test -z "${XWIN_WINDOWS_DRI_FALSE}"; then as_fn_error $? "conditional \"XWIN_WINDOWS_DRI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PSEUDORAMIX_TRUE}" && test -z "${PSEUDORAMIX_FALSE}"; then as_fn_error $? "conditional \"PSEUDORAMIX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepOBJC_TRUE}" && test -z "${am__fastdepOBJC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepOBJC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XQUARTZ_TRUE}" && test -z "${XQUARTZ_FALSE}"; then as_fn_error $? "conditional \"XQUARTZ\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XQUARTZ_SPARKLE_TRUE}" && test -z "${XQUARTZ_SPARKLE_FALSE}"; then as_fn_error $? "conditional \"XQUARTZ_SPARKLE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${STANDALONE_XPBPROXY_TRUE}" && test -z "${STANDALONE_XPBPROXY_FALSE}"; then as_fn_error $? "conditional \"STANDALONE_XPBPROXY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${KDRIVE_TRUE}" && test -z "${KDRIVE_FALSE}"; then as_fn_error $? "conditional \"KDRIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XEPHYR_TRUE}" && test -z "${XEPHYR_FALSE}"; then as_fn_error $? "conditional \"XEPHYR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case e in #( e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else case e in #( e) as_fn_append () { eval $1=\$$1\$2 } ;; esac fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else case e in #( e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } ;; esac fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by xorg-server $as_me 21.1.16, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ '$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ xorg-server config.status 21.1.16 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: '$1' Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: '$1' Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' FILECMD='`$ECHO "$FILECMD" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ FILECMD \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "include/do-not-use-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/do-not-use-config.h" ;; "include/xorg-server.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-server.h" ;; "include/dix-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dix-config.h" ;; "include/xorg-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xorg-config.h" ;; "include/xkb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xkb-config.h" ;; "include/xwin-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/xwin-config.h" ;; "include/version-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/version-config.h" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "sdksyms") CONFIG_COMMANDS="$CONFIG_COMMANDS sdksyms" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "glx/Makefile") CONFIG_FILES="$CONFIG_FILES glx/Makefile" ;; "include/Makefile") CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; "composite/Makefile") CONFIG_FILES="$CONFIG_FILES composite/Makefile" ;; "damageext/Makefile") CONFIG_FILES="$CONFIG_FILES damageext/Makefile" ;; "dbe/Makefile") CONFIG_FILES="$CONFIG_FILES dbe/Makefile" ;; "dix/Makefile") CONFIG_FILES="$CONFIG_FILES dix/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/dtrace/Makefile") CONFIG_FILES="$CONFIG_FILES doc/dtrace/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "fb/Makefile") CONFIG_FILES="$CONFIG_FILES fb/Makefile" ;; "glamor/Makefile") CONFIG_FILES="$CONFIG_FILES glamor/Makefile" ;; "record/Makefile") CONFIG_FILES="$CONFIG_FILES record/Makefile" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; "mi/Makefile") CONFIG_FILES="$CONFIG_FILES mi/Makefile" ;; "miext/Makefile") CONFIG_FILES="$CONFIG_FILES miext/Makefile" ;; "miext/sync/Makefile") CONFIG_FILES="$CONFIG_FILES miext/sync/Makefile" ;; "miext/damage/Makefile") CONFIG_FILES="$CONFIG_FILES miext/damage/Makefile" ;; "miext/shadow/Makefile") CONFIG_FILES="$CONFIG_FILES miext/shadow/Makefile" ;; "miext/rootless/Makefile") CONFIG_FILES="$CONFIG_FILES miext/rootless/Makefile" ;; "os/Makefile") CONFIG_FILES="$CONFIG_FILES os/Makefile" ;; "pseudoramiX/Makefile") CONFIG_FILES="$CONFIG_FILES pseudoramiX/Makefile" ;; "randr/Makefile") CONFIG_FILES="$CONFIG_FILES randr/Makefile" ;; "render/Makefile") CONFIG_FILES="$CONFIG_FILES render/Makefile" ;; "xkb/Makefile") CONFIG_FILES="$CONFIG_FILES xkb/Makefile" ;; "Xext/Makefile") CONFIG_FILES="$CONFIG_FILES Xext/Makefile" ;; "Xi/Makefile") CONFIG_FILES="$CONFIG_FILES Xi/Makefile" ;; "xfixes/Makefile") CONFIG_FILES="$CONFIG_FILES xfixes/Makefile" ;; "exa/Makefile") CONFIG_FILES="$CONFIG_FILES exa/Makefile" ;; "dri3/Makefile") CONFIG_FILES="$CONFIG_FILES dri3/Makefile" ;; "present/Makefile") CONFIG_FILES="$CONFIG_FILES present/Makefile" ;; "hw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/Makefile" ;; "hw/xfree86/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Makefile" ;; "hw/xfree86/Xorg.sh") CONFIG_FILES="$CONFIG_FILES hw/xfree86/Xorg.sh" ;; "hw/xfree86/common/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/common/Makefile" ;; "hw/xfree86/ddc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ddc/Makefile" ;; "hw/xfree86/dixmods/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dixmods/Makefile" ;; "hw/xfree86/doc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/doc/Makefile" ;; "hw/xfree86/dri/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri/Makefile" ;; "hw/xfree86/dri2/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/Makefile" ;; "hw/xfree86/dri2/pci_ids/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/dri2/pci_ids/Makefile" ;; "hw/xfree86/drivers/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/Makefile" ;; "hw/xfree86/drivers/inputtest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/inputtest/Makefile" ;; "hw/xfree86/drivers/modesetting/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/drivers/modesetting/Makefile" ;; "hw/xfree86/exa/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/Makefile" ;; "hw/xfree86/exa/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/exa/man/Makefile" ;; "hw/xfree86/fbdevhw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/Makefile" ;; "hw/xfree86/fbdevhw/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/fbdevhw/man/Makefile" ;; "hw/xfree86/glamor_egl/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/glamor_egl/Makefile" ;; "hw/xfree86/i2c/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/i2c/Makefile" ;; "hw/xfree86/int10/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/int10/Makefile" ;; "hw/xfree86/loader/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/loader/Makefile" ;; "hw/xfree86/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/man/Makefile" ;; "hw/xfree86/modes/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/modes/Makefile" ;; "hw/xfree86/os-support/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/Makefile" ;; "hw/xfree86/os-support/bsd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bsd/Makefile" ;; "hw/xfree86/os-support/bus/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/bus/Makefile" ;; "hw/xfree86/os-support/hurd/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/hurd/Makefile" ;; "hw/xfree86/os-support/misc/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/misc/Makefile" ;; "hw/xfree86/os-support/linux/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/linux/Makefile" ;; "hw/xfree86/os-support/solaris/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/solaris/Makefile" ;; "hw/xfree86/os-support/stub/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/os-support/stub/Makefile" ;; "hw/xfree86/parser/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/parser/Makefile" ;; "hw/xfree86/ramdac/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/ramdac/Makefile" ;; "hw/xfree86/shadowfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/shadowfb/Makefile" ;; "hw/xfree86/vgahw/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/vgahw/Makefile" ;; "hw/xfree86/x86emu/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/x86emu/Makefile" ;; "hw/xfree86/xkb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/xkb/Makefile" ;; "hw/xfree86/utils/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/Makefile" ;; "hw/xfree86/utils/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/man/Makefile" ;; "hw/xfree86/utils/gtf/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xfree86/utils/gtf/Makefile" ;; "hw/vfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/Makefile" ;; "hw/vfb/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/man/Makefile" ;; "hw/xnest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/Makefile" ;; "hw/xnest/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/man/Makefile" ;; "hw/xwin/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/Makefile" ;; "hw/xwin/dri/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/dri/Makefile" ;; "hw/xwin/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/glx/Makefile" ;; "hw/xwin/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/man/Makefile" ;; "hw/xwin/winclipboard/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/winclipboard/Makefile" ;; "hw/xquartz/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/Makefile" ;; "hw/xquartz/GL/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/GL/Makefile" ;; "hw/xquartz/bundle/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/bundle/Makefile" ;; "hw/xquartz/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/man/Makefile" ;; "hw/xquartz/mach-startup/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/mach-startup/Makefile" ;; "hw/xquartz/pbproxy/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/pbproxy/Makefile" ;; "hw/xquartz/xpr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/xpr/Makefile" ;; "hw/kdrive/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/Makefile" ;; "hw/kdrive/ephyr/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/Makefile" ;; "hw/kdrive/ephyr/man/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/ephyr/man/Makefile" ;; "hw/kdrive/src/Makefile") CONFIG_FILES="$CONFIG_FILES hw/kdrive/src/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "xserver.ent") CONFIG_FILES="$CONFIG_FILES xserver.ent" ;; "xorg-server.pc") CONFIG_FILES="$CONFIG_FILES xorg-server.pc" ;; *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else printf "%s\n" "/* $configure_input */" >&1 \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 printf "%s\n" "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See 'config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build static libraries. build_old_libs=$enable_static # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # A file(cmd) program that detects file types. FILECMD=$lt_FILECMD # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive (by configure). lt_ar_flags=$lt_ar_flags # Flags to create an archive. AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"} # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? $SED '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; "sdksyms":C) touch hw/xfree86/sdksyms.dep ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi xorg-server-21.1.16/configure.ac0000644000175000017500000025350314757411105012131 dnl Copyright © 2003-2007 Keith Packard, Daniel Stone dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl Authors: Keith Packard dnl Daniel Stone dnl an unwitting cast of miscellaneous others dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) AC_INIT([xorg-server], 21.1.16, [https://gitlab.freedesktop.org/xorg/xserver/issues], xorg-server) RELEASE_DATE="2025-02-25" RELEASE_NAME="Caramel Ice Cream" AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-xz]) AC_USE_SYSTEM_EXTENSIONS # Require xorg-macros minimum of 1.14 for XORG_COMPILER_BRAND in XORG_DEFAULT_OPTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.14 or later before running autoconf/autogen])]) XORG_MACROS_VERSION(1.14) XORG_DEFAULT_OPTIONS XORG_WITH_DOXYGEN(1.6.1) XORG_CHECK_SGML_DOCTOOLS(1.8) XORG_ENABLE_DOCS XORG_ENABLE_DEVEL_DOCS XORG_WITH_XMLTO(0.0.20) XORG_WITH_FOP XORG_WITH_XSLTPROC XORG_ENABLE_UNIT_TESTS XORG_LD_WRAP([optional]) m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install font-util 1.1 or later before running autoconf/autogen])]) XORG_FONT_MACROS_VERSION(1.1) dnl this gets generated by autoheader, and thus contains all the defines. we dnl don't ever actually use it, internally. AC_CONFIG_HEADERS(include/do-not-use-config.h) dnl xorg-server.h is an external header, designed to be included by loadable dnl drivers. AC_CONFIG_HEADERS(include/xorg-server.h) dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just dnl dix/). AC_CONFIG_HEADERS(include/dix-config.h) dnl xorg-config.h covers the Xorg DDX. AC_CONFIG_HEADERS(include/xorg-config.h) dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs. AC_CONFIG_HEADERS(include/xkb-config.h) dnl xwin-config.h covers the XWin DDX. AC_CONFIG_HEADERS(include/xwin-config.h) dnl version-config.h covers the version numbers so they can be bumped without dnl forcing an entire recompile.x AC_CONFIG_HEADERS(include/version-config.h) AM_PROG_AS AC_PROG_LN_S LT_PREREQ([2.2]) LT_INIT([disable-static win32-dll]) PKG_PROG_PKG_CONFIG AC_PROG_LEX AC_PROG_YACC AC_SYS_LARGEFILE XORG_PROG_RAWCPP # Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow # easier overrides at build time. XSERVER_CFLAGS='$(CWARNFLAGS)' dnl Explicitly add -fno-strict-aliasing since this option should disappear dnl from util-macros CWARNFLAGS if test "x$GCC" = xyes ; then XSERVER_CFLAGS="$XSERVER_CFLAGS -fno-strict-aliasing" fi dnl Check for dtrace program (needed to build Xserver dtrace probes) dnl Also checks for , since some Linux distros have an dnl ISDN trace program named dtrace AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], [Enable dtrace probes (default: enabled if dtrace found)]), [WDTRACE=$withval], [WDTRACE=auto]) if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) if test "x$DTRACE" = "xnot_found" ; then if test "x$WDTRACE" = "xyes" ; then AC_MSG_FAILURE([dtrace requested but not found]) fi WDTRACE="no" else AC_CHECK_HEADER(sys/sdt.h, [HAS_SDT_H="yes"], [HAS_SDT_H="no"]) if test "x$WDTRACE" = "xauto" -a "x$HAS_SDT_H" = "xno" ; then WDTRACE="no" fi fi fi if test "x$WDTRACE" != "xno" ; then AC_DEFINE(XSERVER_DTRACE, 1, [Define to 1 if the DTrace Xserver provider probes should be built in.]) # Solaris/OpenSolaris require dtrace -G to build dtrace probe information into # object files, and require linking with those as relocatable objects, not .a # archives. MacOS X handles all this in the normal compiler toolchain, and on # some releases (like Tiger), will error out on dtrace -G. For now, other # platforms with Dtrace ports are assumed to support -G (the FreeBSD and Linux # ports appear to, based on my web searches, but have not yet been tested). case $host_os in darwin*) SPECIAL_DTRACE_OBJECTS=no ;; *) SPECIAL_DTRACE_OBJECTS=yes ;; esac fi AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes"]) AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h \ fnmatch.h sys/mkdev.h sys/sysmacros.h sys/utsname.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_TYPEOF AC_C_BIGENDIAN(AC_DEFINE(X_BYTE_ORDER, X_BIG_ENDIAN, [byte order]), AC_DEFINE(X_BYTE_ORDER, X_LITTLE_ENDIAN, [byte order])) AC_CHECK_SIZEOF([unsigned long]) if test "$ac_cv_sizeof_unsigned_long" = 8; then AC_DEFINE(_XSERVER64, 1, [Define to 1 if unsigned long is 64 bits.]) fi AC_TYPE_PID_T dnl Check to see if dlopen is in default libraries (like Solaris, which dnl has it in libc), or if libdl is needed to get it. AC_CHECK_FUNC([dlopen], [], AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) AC_SUBST(DLOPEN_LIBS) dnl Checks for library functions. AC_CHECK_FUNCS([backtrace geteuid getuid issetugid getresuid \ getdtablesize getifaddrs getpeereid getpeerucred getprogname getzoneid \ mmap posix_fallocate seteuid shmctl64 strncasecmp vasprintf vsnprintf \ walkcontext setitimer poll epoll_create1 mkostemp memfd_create \ sigprocmask isastream]) AC_CONFIG_LIBOBJ_DIR([os]) AC_REPLACE_FUNCS([reallocarray strcasecmp strcasestr strlcat strlcpy strndup\ timingsafe_memcmp]) AM_CONDITIONAL(POLL, [test "x$ac_cv_func_poll" = "xyes"]) # Checks for non-standard functions and fallback to libbsd if we can # We only check for arc4random_buf, because if we have that, we don't # need/use getentropy. AC_LINK_IFELSE([AC_LANG_CALL([], [arc4random_buf])], [TRY_LIBBSD="no"], [TRY_LIBBSD="yes"]) AS_IF([test "x$TRY_LIBBSD" = "xyes"], [PKG_CHECK_MODULES([LIBBSD], [libbsd-overlay], [ CFLAGS="$CFLAGS $LIBBSD_CFLAGS" LIBS="$LIBS $LIBBSD_LIBS" ], [:])]) AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include ]]) dnl Check for SO_PEERCRED #define AC_CACHE_CHECK([for SO_PEERCRED in sys/socket.h], [xorg_cv_sys_have_so_peercred], [AC_EGREP_CPP(yes_have_so_peercred,[ #include #include #ifdef SO_PEERCRED yes_have_so_peercred #endif ], [xorg_cv_sys_have_so_peercred=yes], [xorg_cv_sys_have_so_peercred=no])]) dnl define NO_LOCAL_CLIENT_CRED if no getpeereid, getpeerucred or SO_PEERCRED if test "x$ac_cv_func_getpeereid" = xno && test "x$ac_cv_func_getpeerucred" = xno && test "x$xorg_cv_sys_have_so_peercred" = xno ; then AC_DEFINE([NO_LOCAL_CLIENT_CRED], 1, [Define to 1 if no local socket credentials interface exists]) fi dnl Find the math library, then check for cbrt function in it. AC_CHECK_LIB(m, sqrt) AC_CHECK_FUNCS([cbrt]) dnl AGPGART headers AC_ARG_ENABLE(agp, AS_HELP_STRING([--enable-agp], [Enable AGP support (default: auto)]), [AGP=$enableval], [AGP=auto]) if test "x$AGP" = "xauto" ; then AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h sys/agpgart.h], AGP=yes) fi AM_CONDITIONAL(AGP, [test "x$AGP" = xyes]) dnl fbdev header AC_CHECK_HEADERS([linux/fb.h], FBDEV=yes) AM_CONDITIONAL(FBDEVHW, [test "x$FBDEV" = xyes]) dnl FreeBSD kldload support (sys/linker.h) AC_CHECK_HEADERS([sys/linker.h], [ac_cv_sys_linker_h=yes], [ac_cv_sys_linker_h=no], [#include ]) AM_CONDITIONAL(FREEBSD_KLDLOAD, [test "x$ac_cv_sys_linker_h" = xyes]) AC_CACHE_CHECK([for SYSV IPC], ac_cv_sysv_ipc, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include #include #include ]],[[ { int id; id = shmget(IPC_PRIVATE, 512, S_IRUSR | S_IWUSR); if (id < 0) return -1; return shmctl(id, IPC_RMID, 0); }]])], [ac_cv_sysv_ipc=yes], [ac_cv_sysv_ipc=no])]) if test "x$ac_cv_sysv_ipc" = xyes; then AC_DEFINE(HAVE_SYSV_IPC, 1, [Define to 1 if SYSV IPC is available]) fi dnl OpenBSD /dev/xf86 aperture driver if test -c /dev/xf86 ; then AC_DEFINE(HAS_APERTURE_DRV, 1, [System has /dev/xf86 aperture driver]) fi dnl glibc backtrace support check AC_CHECK_HEADER([execinfo.h],[ AC_CHECK_LIB(c, backtrace, [ AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h]) ])] ) dnl --------------------------------------------------------------------------- dnl Bus options and CPU capabilities. Replaces logic in dnl hw/xfree86/os-support/bus/Makefile.am, among others. dnl --------------------------------------------------------------------------- DEFAULT_INT10="x86emu" dnl Override defaults as needed for specific platforms: case $host_cpu in alpha*) ALPHA_VIDEO=yes case $host_os in *freebsd*) SYS_LIBS=-lio ;; *netbsd*) AC_DEFINE(USE_ALPHA_PIO, 1, [NetBSD PIO alpha IO]) ;; esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64 -mieee" ;; arm*) ARM_VIDEO=yes DEFAULT_INT10="stub" ;; i*86) I386_VIDEO=yes case $host_os in *freebsd*) AC_DEFINE(USE_DEV_IO) ;; *dragonfly*) AC_DEFINE(USE_DEV_IO) ;; *netbsd*) AC_DEFINE(USE_I386_IOPL) SYS_LIBS=-li386 ;; *openbsd*) AC_DEFINE(USE_I386_IOPL) SYS_LIBS=-li386 ;; esac ;; powerpc*) PPC_VIDEO=yes case $host_os in *freebsd*) DEFAULT_INT10=stub ;; esac ;; sparc*) SPARC64_VIDEO=yes BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c" GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; x86_64*|amd64*) I386_VIDEO=yes case $host_os in *freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; *dragonfly*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;; *netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl]) SYS_LIBS=-lx86_64 ;; *openbsd*) AC_DEFINE(USE_AMD64_IOPL, 1, [BSD AMD64 iopl]) SYS_LIBS=-lamd64 ;; esac GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; ia64*) GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; s390*) GLX_ARCH_DEFINES="-D__GLX_ALIGN64" ;; esac AC_SUBST(GLX_ARCH_DEFINES) dnl BSD *_video.c selection AM_CONDITIONAL(ALPHA_VIDEO, [test "x$ALPHA_VIDEO" = xyes]) AM_CONDITIONAL(ARM_VIDEO, [test "x$ARM_VIDEO" = xyes]) AM_CONDITIONAL(I386_VIDEO, [test "x$I386_VIDEO" = xyes]) AM_CONDITIONAL(PPC_VIDEO, [test "x$PPC_VIDEO" = xyes]) AM_CONDITIONAL(SPARC64_VIDEO, [test "x$SPARC64_VIDEO" = xyes]) DRI=no dnl it would be nice to autodetect these *CONS_SUPPORTs case $host_os in *freebsd* | *dragonfly*) case $host_os in kfreebsd*-gnu) ;; *) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; esac AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(SYSCONS_SUPPORT, 1, [System has syscons console]) DRI=yes ;; *netbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) DRI=yes ;; *openbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) AC_DEFINE(PCVT_SUPPORT, 1, [System has PC console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) ;; *linux*) DRI=yes ;; *solaris*) DRI=yes ;; darwin*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) ;; cygwin*|mingw*) CFLAGS="$CFLAGS -DFD_SETSIZE=512" ;; esac dnl augment XORG_RELEASE_VERSION for our snapshot number and to expose the dnl major number PVMAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1` dnl Convert to the old-style 1.x.y version scheme used up to 1.20.x for dnl backwards compatibility VENDOR_RELEASE="((10000000) + (($PVMAJOR) * 100000) + (($PVM) * 1000) + $PVP)" VENDOR_MAN_VERSION="Version ${PACKAGE_VERSION}" VENDOR_NAME="The X.Org Foundation" VENDOR_NAME_SHORT="X.Org" VENDOR_WEB="http://wiki.x.org" dnl Build options. AC_ARG_ENABLE(werror, AS_HELP_STRING([--enable-werror], [Obsolete - use --enable-strict-compilation instead]), AC_MSG_ERROR([--enable-werror has been replaced by --enable-strict-compilation])) AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debugging (default: disabled)]), [DEBUGGING=$enableval], [DEBUGGING=no]) AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND], [int10 backend: vm86, x86emu or stub]), [INT10="$withval"], [INT10="$DEFAULT_INT10"]) AC_ARG_WITH(vendor-name, AS_HELP_STRING([--with-vendor-name=VENDOR], [Vendor string reported by the server]), [ VENDOR_NAME="$withval" ], []) AC_ARG_WITH(vendor-name-short, AS_HELP_STRING([--with-vendor-name-short=VENDOR], [Short version of vendor string reported by the server]), [ VENDOR_NAME_SHORT="$withval" ], []) AC_ARG_WITH(vendor-web, AS_HELP_STRING([--with-vendor-web=URL], [Vendor web address reported by the server]), [ VENDOR_WEB="$withval" ], []) AC_ARG_WITH(module-dir, AS_HELP_STRING([--with-module-dir=DIR], [Directory where modules are installed (default: $libdir/xorg/modules)]), [ moduledir="$withval" ], [ moduledir="${libdir}/xorg/modules" ]) AC_ARG_WITH(log-dir, AS_HELP_STRING([--with-log-dir=DIR], [Directory where log files are kept (default: $localstatedir/log)]), [ logdir="$withval" ], [ logdir="$localstatedir/log" ]) AC_ARG_WITH(builder-addr, AS_HELP_STRING([--with-builder-addr=ADDRESS], [Builder address (default: xorg@lists.freedesktop.org)]), [ BUILDERADDR="$withval" ], [ BUILDERADDR="xorg@lists.freedesktop.org" ]) AC_ARG_WITH(builderstring, AS_HELP_STRING([--with-builderstring=BUILDERSTRING], [Additional builder string]), [ BUILDERSTRING="$withval" ] [ ]) AC_ARG_ENABLE(listen-tcp, AS_HELP_STRING([--enable-listen-tcp], [Listen on TCP by default (default:disabled)]), [LISTEN_TCP=$enableval], [LISTEN_TCP=no]) AC_ARG_ENABLE(listen-unix, AS_HELP_STRING([--disable-listen-unix], [Listen on Unix by default (default:enabled)]), [LISTEN_UNIX=$enableval], [LISTEN_UNIX=yes]) AC_ARG_ENABLE(listen-local, AS_HELP_STRING([--disable-listen-local], [Listen on local by default (default:enabled)]), [LISTEN_LOCAL=$enableval], [LISTEN_LOCAL=yes]) case $host_os in linux*) FALLBACK_INPUT_DRIVER="libinput" ;; *) FALLBACK_INPUT_DRIVER="" ;; esac AC_ARG_WITH(fallback-input-driver, AC_HELP_STRING([--with-fallback-input-driver=$FALLBACK_INPUT_DRIVER], [Input driver fallback if the requested driver for a device is unavailable]), [ FALLBACK_INPUT_DRIVER=$withval ], []) if test "x$FALLBACK_INPUT_DRIVER" = "xno"; then FALLBACK_INPUT_DRIVER="" fi AC_MSG_CHECKING([for fallback input driver]) AC_MSG_RESULT([$FALLBACK_INPUT_DRIVER]) AC_DEFINE_UNQUOTED(FALLBACK_INPUT_DRIVER, ["$FALLBACK_INPUT_DRIVER"], [ Fallback input driver ]) dnl Determine font path XORG_FONTROOTDIR XORG_FONTSUBDIR(FONTMISCDIR, fontmiscdir, misc) XORG_FONTSUBDIR(FONTOTFDIR, fontotfdir, OTF) XORG_FONTSUBDIR(FONTTTFDIR, fontttfdir, TTF) XORG_FONTSUBDIR(FONTTYPE1DIR, fonttype1dir, Type1) XORG_FONTSUBDIR(FONT75DPIDIR, font75dpidir, 75dpi) XORG_FONTSUBDIR(FONT100DPIDIR, font100dpidir, 100dpi) dnl Uses --with-default-font-path if set, otherwise uses standard dnl subdirectories of FONTROOTDIR. Some distros set the default font path to dnl "catalogue:/etc/X11/fontpath.d,built-ins" DEFAULT_FONT_PATH="${FONTMISCDIR}/,${FONTTTFDIR}/,${FONTOTFDIR}/,${FONTTYPE1DIR}/,${FONT100DPIDIR}/,${FONT75DPIDIR}/" case $host_os in darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; esac AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), [ FONTPATH="$withval" ], [ FONTPATH="${DEFAULT_FONT_PATH}" ]) AC_MSG_CHECKING([for default font path]) AC_MSG_RESULT([$FONTPATH]) AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: auto)]), [ XKBPATH="$withval" ], [ XKBPATH="auto" ]) AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), [ XKBOUTPUT="$withval" ], [ XKBOUTPUT="compiled" ]) AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES], [Keyboard ruleset (default: base/evdev)]), [ XKB_DFLT_RULES="$withval" ], [ XKB_DFLT_RULES="" ]) AC_ARG_WITH(default-xkb-model, AS_HELP_STRING([--with-default-xkb-model=MODEL], [Keyboard model (default: pc105)]), [ XKB_DFLT_MODEL="$withval" ], [ XKB_DFLT_MODEL="pc105" ]) AC_ARG_WITH(default-xkb-layout, AS_HELP_STRING([--with-default-xkb-layout=LAYOUT], [Keyboard layout (default: us)]), [ XKB_DFLT_LAYOUT="$withval" ], [ XKB_DFLT_LAYOUT="us" ]) AC_ARG_WITH(default-xkb-variant, AS_HELP_STRING([--with-default-xkb-variant=VARIANT], [Keyboard variant (default: (none))]), [ XKB_DFLT_VARIANT="$withval" ], [ XKB_DFLT_VARIANT="" ]) AC_ARG_WITH(default-xkb-options, AS_HELP_STRING([--with-default-xkb-options=OPTIONS], [Keyboard layout options (default: (none))]), [ XKB_DFLT_OPTIONS="$withval" ], [ XKB_DFLT_OPTIONS="" ]) AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), [ SERVERCONFIG="$withval" ], [ SERVERCONFIG="${libdir}/xorg" ]) AC_ARG_WITH(apple-applications-dir,AS_HELP_STRING([--with-apple-applications-dir=PATH], [Path to the Applications directory (default: /Applications/Utilities)]), [ APPLE_APPLICATIONS_DIR="${withval}" ], [ APPLE_APPLICATIONS_DIR="/Applications/Utilities" ]) AC_SUBST([APPLE_APPLICATIONS_DIR]) AC_ARG_WITH(apple-application-name,AS_HELP_STRING([--with-apple-application-name=NAME], [Name for the .app (default: X11)]), [ APPLE_APPLICATION_NAME="${withval}" ], [ APPLE_APPLICATION_NAME="X11" ]) AC_SUBST([APPLE_APPLICATION_NAME]) AC_ARG_WITH(bundle-id-prefix, AS_HELP_STRING([--with-bundle-id-prefix=RDNS_PREFIX], [Prefix to use for bundle identifiers (default: org.x)]), [ BUNDLE_ID_PREFIX="${withval}" ]) AC_SUBST([BUNDLE_ID_PREFIX]) AC_DEFINE_UNQUOTED(BUNDLE_ID_PREFIX, "$BUNDLE_ID_PREFIX", [Prefix to use for bundle identifiers]) m4_define(DEFAULT_BUNDLE_VERSION, m4_esyscmd([echo ]AC_PACKAGE_VERSION[ | cut -f1-3 -d. | tr -d '\n'])) AC_ARG_WITH(bundle-version, AS_HELP_STRING([--with-bundle-version=VERSION], [Version to use for X11.app's CFBundleVersion (default: ]DEFAULT_BUNDLE_VERSION[)]), [ BUNDLE_VERSION="${withval}" ], [ BUNDLE_VERSION="DEFAULT_BUNDLE_VERSION" ]) AC_SUBST([BUNDLE_VERSION]) AC_ARG_WITH(bundle-version-string, AS_HELP_STRING([--with-bundle-version-string=VERSION], [Version to use for X11.app's CFBundleShortVersionString (default: ]AC_PACKAGE_VERSION[)]), [ BUNDLE_VERSION_STRING="${withval}" ], [ BUNDLE_VERSION_STRING="${PACKAGE_VERSION}" ]) AC_SUBST([BUNDLE_VERSION_STRING]) AC_ARG_ENABLE(sparkle,AS_HELP_STRING([--enable-sparkle], [Enable updating of X11.app using the Sparkle Framework (default: disabled)]), [ XQUARTZ_SPARKLE="${enableval}" ], [ XQUARTZ_SPARKLE="no" ]) AC_SUBST([XQUARTZ_SPARKLE]) AC_ARG_WITH(sparkle-feed-url, AS_HELP_STRING([--with-sparkle-feed-url=URL], [URL for the Sparkle feed (default: https://www.xquartz.org/releases/sparkle/release.xml)]), [ XQUARTZ_SPARKLE_FEED_URL="${withval}" ], [ XQUARTZ_SPARKLE_FEED_URL="https://www.xquartz.org/releases/sparkle/release.xml" ]) AC_SUBST([XQUARTZ_SPARKLE_FEED_URL]) AC_ARG_ENABLE(visibility, AS_HELP_STRING([--enable-visibility], [Enable symbol visibility (default: auto)]), [SYMBOL_VISIBILITY=$enableval], [SYMBOL_VISIBILITY=auto]) dnl GLX build options AC_ARG_WITH(khronos-spec-dir, AS_HELP_STRING([--with-khronos-spec-dir=PATH], [Path to Khronos OpenGL registry database files (default: auto)]), [KHRONOS_SPEC_DIR="${withval}"], [KHRONOS_SPEC_DIR=auto]) dnl Extensions. AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) AC_ARG_ENABLE(mitshm, AS_HELP_STRING([--disable-mitshm], [Build SHM extension (default: auto)]), [MITSHM=$enableval], [MITSHM=auto]) AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes extension (default: enabled)]), [RES=$enableval], [RES=yes]) AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto]) AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) AC_ARG_ENABLE(glx, AS_HELP_STRING([--disable-glx], [Build GLX extension (default: enabled)]), [GLX=$enableval], [GLX=yes]) AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) AC_ARG_ENABLE(dri2, AS_HELP_STRING([--enable-dri2], [Build DRI2 extension (default: auto)]), [DRI2=$enableval], [DRI2=auto]) AC_ARG_ENABLE(dri3, AS_HELP_STRING([--enable-dri3], [Build DRI3 extension (default: auto)]), [DRI3=$enableval], [DRI3=auto]) AC_ARG_ENABLE(present, AS_HELP_STRING([--disable-present], [Build Present extension (default: enabled)]), [PRESENT=$enableval], [PRESENT=yes]) AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--enable-xselinux], [Build SELinux extension (default: disabled)]), [XSELINUX=$enableval], [XSELINUX=no]) AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) AC_ARG_ENABLE(config-udev, AS_HELP_STRING([--enable-config-udev], [Build udev support (default: auto)]), [CONFIG_UDEV=$enableval], [CONFIG_UDEV=auto]) AC_ARG_ENABLE(config-udev-kms, AS_HELP_STRING([--enable-config-udev-kms], [Build udev kms support (default: auto)]), [CONFIG_UDEV_KMS=$enableval], [CONFIG_UDEV_KMS=auto]) AC_ARG_ENABLE(config-hal, AS_HELP_STRING([--disable-config-hal], [Build HAL support (default: auto)]), [CONFIG_HAL=$enableval], [CONFIG_HAL=auto]) AC_ARG_ENABLE(config-wscons, AS_HELP_STRING([--enable-config-wscons], [Build wscons config support (default: auto)]), [CONFIG_WSCONS=$enableval], [CONFIG_WSCONS=auto]) AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with vga access (default: enabled)]), [VGAHW=$enableval], [VGAHW=yes]) AC_ARG_ENABLE(int10-module, AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes]) AC_ARG_ENABLE(windowsdri, AS_HELP_STRING([--enable-windowsdri], [Build XWin with WindowsDRI extension (default: auto)]), [WINDOWSDRI=$enableval], [WINDOWSDRI=auto]) AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes]) AC_ARG_ENABLE(clientids, AS_HELP_STRING([--disable-clientids], [Build Xorg with client ID tracking (default: enabled)]), [CLIENTIDS=$enableval], [CLIENTIDS=yes]) AC_ARG_ENABLE(pciaccess, AS_HELP_STRING([--enable-pciaccess], [Build Xorg with pciaccess library (default: enabled)]), [PCI=$enableval], [PCI=yes]) AC_ARG_ENABLE(linux_acpi, AS_HELP_STRING([--disable-linux-acpi], [Disable building ACPI support on Linux (if available).]), [enable_linux_acpi=$enableval], [enable_linux_acpi=yes]) AC_ARG_ENABLE(linux_apm, AS_HELP_STRING([--disable-linux-apm], [Disable building APM support on Linux (if available).]), [enable_linux_apm=$enableval], [enable_linux_apm=yes]) AC_ARG_ENABLE(systemd-logind, AS_HELP_STRING([--enable-systemd-logind], [Build systemd-logind support (default: auto)]), [SYSTEMD_LOGIND=$enableval], [SYSTEMD_LOGIND=auto]) AC_ARG_ENABLE(suid-wrapper, AS_HELP_STRING([--enable-suid-wrapper], [Build suid-root wrapper for legacy driver support on rootless xserver systems (default: no)]), [SUID_WRAPPER=$enableval], [SUID_WRAPPER=no]) dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto]) AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor], [Build glamor dix module (default: auto)]), [GLAMOR=$enableval], [GLAMOR=auto]) AC_ARG_ENABLE(xf86-input-inputtest, AS_HELP_STRING([--enable-xf86-input-inputtest], [Build Xorg test input driver (default: yes)]), [XORG_DRIVER_INPUT_INPUTTEST=$enableval], [XORG_DRIVER_INPUT_INPUTTEST=yes]) dnl kdrive and its subsystems AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) dnl kdrive options AC_ARG_ENABLE(libunwind, AS_HELP_STRING([--enable-libunwind], [Use libunwind for backtracing (default: auto)]), [LIBUNWIND="$enableval"], [LIBUNWIND="auto"]) AC_ARG_ENABLE(xshmfence, AS_HELP_STRING([--disable-xshmfence], [Disable xshmfence (default: auto)]), [XSHMFENCE="$enableval"], [XSHMFENCE="auto"]) dnl chown/chmod to be setuid root as part of build dnl Replaces InstallXserverSetUID in imake AC_ARG_ENABLE(install-setuid, AS_HELP_STRING([--enable-install-setuid], [Install Xorg server as owned by root with setuid bit (default: auto)]), [SETUID=$enableval], [SETUID=auto]) AC_MSG_CHECKING([to see if we can install the Xorg server as root]) if test "x$SETUID" = "xauto" ; then case $host_os in cygwin*) SETUID="no" ;; mingw*) SETUID="no" ;; darwin*) SETUID="no" ;; *) case $host_cpu in sparc) SETUID="no" ;; *) SETUID="yes" ;; esac esac if test "x$SETUID" = xyes; then touch testfile chown root testfile > /dev/null 2>&1 || SETUID="no" rm -f testfile fi fi AC_MSG_RESULT([$SETUID]) AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro dnl was not expanded, since xorg-server with no transport types is rather useless. dnl dnl If you're seeing an error here, be sure you installed the lib/xtrans module dnl first and if it's not in the default location, that you set the ACLOCAL dnl environment variable to find it, such as: dnl ACLOCAL="aclocal -I ${PREFIX}/share/aclocal" m4_pattern_forbid([^XTRANS_CONNECTION_FLAGS$]) # Transport selection macro from xtrans.m4 XTRANS_CONNECTION_FLAGS # Secure RPC detection macro from xtrans.m4 XTRANS_SECURE_RPC_FLAGS AM_CONDITIONAL(SECURE_RPC, [test "x$SECURE_RPC" = xyes]) AM_CONDITIONAL(INT10_VM86, [test "x$INT10" = xvm86]) AM_CONDITIONAL(INT10_X86EMU, [test "x$INT10" = xx86emu]) AM_CONDITIONAL(INT10_STUB, [test "x$INT10" = xstub]) dnl DDX Detection... Yes, it's ugly to have it here... but we need to dnl handle this early on so that we don't require unsupported extensions case $host_os in cygwin* | mingw*) CONFIG_HAL=no CONFIG_UDEV=no CONFIG_UDEV_KMS=no DGA=no DRM=no DRI2=no DRI3=no INT10MODULE=no PCI=no VGAHW=no XF86UTILS=no XF86VIDMODE=no XSELINUX=no SYMBOL_VISIBILITY=no ;; darwin*) PCI=no INT10MODULE=no VGAHW=no DRM=no DRI2=no DRI3=no if test x$XQUARTZ = xauto; then AC_CACHE_CHECK([whether to build Xquartz],xorg_cv_Carbon_framework,[ save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -framework Carbon" AC_LINK_IFELSE([AC_LANG_SOURCE([char FSFindFolder(); int main() { FSFindFolder(); return 0;}])], [xorg_cv_Carbon_framework=yes], [xorg_cv_Carbon_framework=no]) LDFLAGS=$save_LDFLAGS]) if test "X$xorg_cv_Carbon_framework" = Xyes; then XQUARTZ=yes else XQUARTZ=no fi fi if test "x$XQUARTZ" = xyes ; then XQUARTZ=yes XVFB=no XNEST=no DGA=no DPMSExtension=no XF86VIDMODE=no fi ;; gnu*) DRM=no DRI2=no DRI3=no ;; *) XQUARTZ=no ;; esac dnl --------------------------------------------------------------------------- dnl Extension section dnl --------------------------------------------------------------------------- XEXT_INC='-I$(top_srcdir)/Xext' XEXT_LIB='$(top_builddir)/Xext/libXext.la' dnl Optional modules VIDEOPROTO="videoproto" COMPOSITEPROTO="compositeproto >= 0.4" RECORDPROTO="recordproto >= 1.13.99.1" SCRNSAVERPROTO="scrnsaverproto >= 1.1" RESOURCEPROTO="resourceproto >= 1.2.0" DRIPROTO="xf86driproto >= 2.1.0" DRI2PROTO="dri2proto >= 2.8" DRI3PROTO="dri3proto >= 1.2" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" DGAPROTO="xf86dgaproto >= 2.0.99.1" GLPROTO="glproto >= 1.4.17" VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" APPLEWMPROTO="applewmproto >= 1.4" LIBXSHMFENCE="xshmfence >= 1.1" dnl Required modules XPROTO="xproto >= 7.0.31" RANDRPROTO="randrproto >= 1.6.0" RENDERPROTO="renderproto >= 0.11" XEXTPROTO="xextproto >= 7.2.99.901" INPUTPROTO="inputproto >= 2.3.99.1" KBPROTO="kbproto >= 1.0.3" FONTSPROTO="fontsproto >= 2.1.3" FIXESPROTO="fixesproto >= 6.0" DAMAGEPROTO="damageproto >= 1.1" XCMISCPROTO="xcmiscproto >= 1.2.0" BIGREQSPROTO="bigreqsproto >= 1.1.0" XTRANS="xtrans >= 1.3.5" PRESENTPROTO="presentproto >= 1.2" dnl List of libraries that require a specific version LIBAPPLEWM="applewm >= 1.4" LIBDRI="dri >= 7.8.0" LIBDRM="libdrm >= 2.4.89" LIBEGL="egl" LIBGBM="gbm >= 10.2.0" LIBGL="gl >= 1.2" LIBXEXT="xext >= 1.0.99.4" LIBXFONT="xfont2 >= 2.0.0" LIBXI="xi >= 1.2.99.1" LIBXTST="xtst >= 1.0.99.2" LIBPCIACCESS="pciaccess >= 0.12.901" LIBUDEV="libudev >= 143" LIBSELINUX="libselinux >= 2.0.86" LIBDBUS="dbus-1 >= 1.0" LIBPIXMAN="pixman-1 >= 0.27.2" LIBXCVT="libxcvt" dnl Pixman is always required, but we separate it out so we can link dnl specific modules against it PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN) REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" dnl Core modules for most extensions, et al. SDK_REQUIRED_MODULES="$XPROTO $RANDRPROTO $RENDERPROTO $XEXTPROTO $INPUTPROTO $KBPROTO $FONTSPROTO $LIBPIXMAN" # Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc AC_SUBST(SDK_REQUIRED_MODULES) AC_CHECK_DECL([PTHREAD_MUTEX_RECURSIVE], [HAVE_RECURSIVE_MUTEX=yes], [HAVE_RECURSIVE_MUTEX=no], [[#include ]]) THREAD_DEFAULT=no if test "x$HAVE_RECURSIVE_MUTEX" = "xyes" ; then THREAD_DEFAULT=yes fi case $host_os in mingw*) THREAD_DEFAULT=no ;; *) esac AC_ARG_ENABLE(input-thread, AS_HELP_STRING([--enable-input-thread], [Enable input threads]), [INPUTTHREAD=$enableval], [INPUTTHREAD=$THREAD_DEFAULT]) if test "x$INPUTTHREAD" = "xyes" ; then AX_PTHREAD(,AC_MSG_ERROR([threaded input requested but no pthread support has been found])) SYS_LIBS="$SYS_LIBS $PTHREAD_LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" AC_DEFINE(INPUTTHREAD, 1, [Use a separate input thread]) save_LIBS="$LIBS" LIBS="$LIBS $SYS_LIBS" dnl MacOS X 10.6 & higher AC_MSG_CHECKING(for pthread_setname_np(const char*)) AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [pthread_setname_np("example")])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID,1, [Have function pthread_setname_np(const char*)])], [AC_MSG_RESULT(no)]) dnl GNU libc 2.12 & higher, Solaris 11.3 & higher AC_MSG_CHECKING(for pthread_setname_np(pthread_t, const char*)) AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [pthread_setname_np(pthread_self(), "example")])], [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_WITH_TID,1, [Have function pthread_setname_np(pthread_t, const char*)])], [AC_MSG_RESULT(no)]) LIBS="$save_LIBS" fi REQUIRED_MODULES="$FIXESPROTO $DAMAGEPROTO $XCMISCPROTO $XTRANS $BIGREQSPROTO $SDK_REQUIRED_MODULES" dnl systemd socket activation dnl activate the code in libxtrans that grabs systemd's socket fds dnl libsystemd-daemon was moved into libsystemd in version 209 LIBSYSTEMD="libsystemd >= 209" AC_ARG_WITH([systemd-daemon], AS_HELP_STRING([--with-systemd-daemon], [support systemd socket activation (default: auto)]), [WITH_SYSTEMD_DAEMON=$withval], [WITH_SYSTEMD_DAEMON=auto]) if test "x$WITH_SYSTEMD_DAEMON" = "xyes" -o "x$WITH_SYSTEMD_DAEMON" = "xauto" ; then PKG_CHECK_MODULES([SYSTEMD_DAEMON], [$LIBSYSTEMD], [HAVE_SYSTEMD_DAEMON=yes; LIBSYSTEMD_DAEMON="$LIBSYSTEMD"], [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon], [HAVE_SYSTEMD_DAEMON=yes; LIBSYSTEMD_DAEMON=libsystemd-daemon], [HAVE_SYSTEMD_DAEMON=no])]) if test "x$HAVE_SYSTEMD_DAEMON" = xyes; then AC_DEFINE(HAVE_SYSTEMD_DAEMON, 1, [Define to 1 if libsystemd-daemon is available]) REQUIRED_LIBS="$REQUIRED_LIBS $LIBSYSTEMD_DAEMON" elif test "x$WITH_SYSTEMD_DAEMON" = xyes; then AC_MSG_ERROR([systemd support requested but no library has been found]) fi fi AM_CONDITIONAL([HAVE_SYSTEMD_DAEMON], [test "x$HAVE_SYSTEMD_DAEMON" = "xyes"]) if test "x$CONFIG_UDEV" = xyes && test "x$CONFIG_HAL" = xyes; then AC_MSG_ERROR([Hotplugging through both libudev and hal not allowed]) fi PKG_CHECK_MODULES(UDEV, $LIBUDEV, [HAVE_LIBUDEV=yes], [HAVE_LIBUDEV=no]) if test "x$CONFIG_UDEV" = xauto; then CONFIG_UDEV="$HAVE_LIBUDEV" fi AM_CONDITIONAL(CONFIG_UDEV, [test "x$CONFIG_UDEV" = xyes]) if test "x$CONFIG_UDEV" = xyes; then CONFIG_HAL=no if test "x$CONFIG_UDEV_KMS" = xauto; then CONFIG_UDEV_KMS="$HAVE_LIBUDEV" fi if ! test "x$HAVE_LIBUDEV" = xyes; then AC_MSG_ERROR([udev configuration API requested, but libudev is not installed]) fi AC_DEFINE(CONFIG_UDEV, 1, [Use libudev for input hotplug]) if test "x$CONFIG_UDEV_KMS" = xyes; then AC_DEFINE(CONFIG_UDEV_KMS, 1, [Use libudev for kms enumeration]) fi SAVE_LIBS=$LIBS SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $UDEV_CFLAGS" LIBS=$UDEV_LIBS AC_CHECK_FUNCS([udev_monitor_filter_add_match_tag]) AC_CHECK_FUNCS([udev_enumerate_add_match_tag]) LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS fi AM_CONDITIONAL(CONFIG_UDEV_KMS, [test "x$CONFIG_UDEV_KMS" = xyes]) PKG_CHECK_MODULES(DBUS, $LIBDBUS, [HAVE_DBUS=yes], [HAVE_DBUS=no]) if test "x$HAVE_DBUS" = xyes; then AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support]) fi AM_CONDITIONAL(HAVE_DBUS, [test "x$HAVE_DBUS" = xyes]) PKG_CHECK_MODULES(HAL, hal, [HAVE_HAL=yes], [HAVE_HAL=no]) if test "x$CONFIG_HAL" = xauto; then CONFIG_HAL="$HAVE_HAL" fi if test "x$CONFIG_HAL" = xyes; then if ! test "x$HAVE_HAL" = xyes; then AC_MSG_ERROR([HAL hotplug API requested, but HAL is not installed.]) fi AC_DEFINE(CONFIG_HAL, 1, [Use the HAL hotplug API]) NEED_DBUS="yes" fi AM_CONDITIONAL(CONFIG_HAL, [test "x$CONFIG_HAL" = xyes]) if test "x$SYSTEMD_LOGIND" = xauto; then if test "x$HAVE_DBUS" = xyes -a "x$CONFIG_UDEV" = xyes ; then SYSTEMD_LOGIND=yes else SYSTEMD_LOGIND=no fi fi if test "x$SYSTEMD_LOGIND" = xyes; then if ! test "x$HAVE_DBUS" = xyes; then AC_MSG_ERROR([systemd-logind requested, but D-Bus is not installed.]) fi if ! test "x$CONFIG_UDEV" = xyes ; then AC_MSG_ERROR([systemd-logind is only supported in combination with udev configuration.]) fi AC_DEFINE(SYSTEMD_LOGIND, 1, [Enable systemd-logind integration]) NEED_DBUS="yes" fi AM_CONDITIONAL(SYSTEMD_LOGIND, [test "x$SYSTEMD_LOGIND" = xyes]) if test "x$SUID_WRAPPER" = xyes; then dnl This is a define so that if some platforms want to put the wrapper dnl somewhere else this can be easily changed AC_DEFINE_DIR(SUID_WRAPPER_DIR, libexecdir, [Where to install the Xorg binary and Xorg.wrap]) SETUID="no" fi AM_CONDITIONAL(SUID_WRAPPER, [test "x$SUID_WRAPPER" = xyes]) if test "x$NEED_DBUS" = xyes; then AC_DEFINE(NEED_DBUS, 1, [Enable D-Bus core]) fi AM_CONDITIONAL(NEED_DBUS, [test "x$NEED_DBUS" = xyes]) if test "x$CONFIG_WSCONS" = xauto; then case $host_os in *openbsd*) CONFIG_WSCONS=yes; ;; *) CONFIG_WSCONS=no; ;; esac fi AM_CONDITIONAL(CONFIG_WSCONS, [test "x$CONFIG_WSCONS" = xyes]) if test "x$CONFIG_WSCONS" = xyes; then AC_DEFINE(CONFIG_WSCONS, 1, [Use wscons for input auto configuration]) fi AC_MSG_CHECKING([for glibc...]) AC_PREPROC_IFELSE([AC_LANG_SOURCE([ #include #ifndef __GLIBC__ #error #endif ])], glibc=yes, glibc=no) AC_MSG_RESULT([$glibc]) AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], [have_clock_gettime=no])]) AC_MSG_CHECKING([for a useful monotonic clock ...]) if ! test "x$have_clock_gettime" = xno; then if ! test "x$have_clock_gettime" = xyes; then CLOCK_LIBS="$have_clock_gettime" else CLOCK_LIBS="" fi LIBS_SAVE="$LIBS" LIBS="$CLOCK_LIBS" CPPFLAGS_SAVE="$CPPFLAGS" if test x"$glibc" = xyes; then CPPFLAGS="$CPPFLAGS -D_POSIX_C_SOURCE=200112L" fi AC_RUN_IFELSE([AC_LANG_SOURCE([ #include int main(int argc, char *argv[[]]) { struct timespec tp; if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) return 0; else return 1; } ])], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], [MONOTONIC_CLOCK="cross compiling"]) if test "$MONOTONIC_CLOCK" = "cross compiling"; then AC_CHECK_DECL([CLOCK_MONOTONIC],[MONOTONIC_CLOCK="guessing yes"],[MONOTONIC_CLOCK=no],[#include ]) fi LIBS="$LIBS_SAVE" CPPFLAGS="$CPPFLAGS_SAVE" else MONOTONIC_CLOCK=no fi AC_MSG_RESULT([$MONOTONIC_CLOCK]) if test "$MONOTONIC_CLOCK" = "guessing yes"; then MONOTONIC_CLOCK=yes fi if test "x$MONOTONIC_CLOCK" = xyes; then AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()]) LIBS="$LIBS $CLOCK_LIBS" fi AM_CONDITIONAL(XV, [test "x$XV" = xyes]) if test "x$XV" = xyes; then AC_DEFINE(XV, 1, [Support Xv extension]) AC_DEFINE(XvExtension, 1, [Build Xv extension]) REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi AM_CONDITIONAL(XVMC, [test "x$XVMC" = xyes]) if test "x$XVMC" = xyes; then AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) fi AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then AC_DEFINE(COMPOSITE, 1, [Support Composite Extension]) REQUIRED_MODULES="$REQUIRED_MODULES $COMPOSITEPROTO" COMPOSITE_LIB='$(top_builddir)/composite/libcomposite.la' COMPOSITE_INC='-I$(top_srcdir)/composite' fi if test "x$MITSHM" = xauto; then MITSHM="$ac_cv_sysv_ipc" fi AM_CONDITIONAL(MITSHM, [test "x$MITSHM" = xyes]) if test "x$MITSHM" = xyes; then AC_DEFINE(MITSHM, 1, [Support MIT-SHM extension]) AC_DEFINE(HAS_SHM, 1, [Support SHM]) fi AM_CONDITIONAL(RECORD, [test "x$RECORD" = xyes]) if test "x$RECORD" = xyes; then AC_DEFINE(XRECORD, 1, [Support Record extension]) REQUIRED_MODULES="$REQUIRED_MODULES $RECORDPROTO" RECORD_LIB='$(top_builddir)/record/librecord.la' fi AM_CONDITIONAL(SCREENSAVER, [test "x$SCREENSAVER" = xyes]) if test "x$SCREENSAVER" = xyes; then AC_DEFINE(SCREENSAVER, 1, [Support MIT-SCREEN-SAVER extension]) REQUIRED_MODULES="$REQUIRED_MODULES $SCRNSAVERPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $SCRNSAVERPROTO" fi HASHTABLE=no AM_CONDITIONAL(RES, [test "x$RES" = xyes]) if test "x$RES" = xyes; then AC_DEFINE(RES, 1, [Support X resource extension]) HASHTABLE=yes REQUIRED_MODULES="$REQUIRED_MODULES $RESOURCEPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $RESOURCEPROTO" fi if test "x$LISTEN_TCP" = xyes; then AC_DEFINE(LISTEN_TCP, 1, [Listen on TCP socket]) fi if test "x$LISTEN_UNIX" = xyes; then AC_DEFINE(LISTEN_UNIX, 1, [Listen on Unix socket]) fi if test "x$LISTEN_LOCAL" = xyes; then AC_DEFINE(LISTEN_LOCAL, 1, [Listen on local socket]) fi # The XRes extension may support client ID tracking only if it has # been specifically enabled. Client ID tracking is implicitly not # supported if XRes extension is disabled. AC_MSG_CHECKING([whether to track client ids]) if test "x$RES" = xyes && test "x$CLIENTIDS" = xyes; then AC_DEFINE(CLIENTIDS, 1, [Support client ID tracking]) else CLIENTIDS=no fi if test "x$CLIENTIDS" = xyes; then case $host_os in openbsd*) SYS_LIBS="$SYS_LIBS -lkvm" ;; esac fi AC_MSG_RESULT([$CLIENTIDS]) AM_CONDITIONAL(CLIENTIDS, [test "x$CLIENTIDS" = xyes]) AM_CONDITIONAL(DRI, test "x$DRI" = xyes) if test "x$DRI" = xyes; then AC_DEFINE(XF86DRI, 1, [Build DRI extension]) REQUIRED_MODULES="$REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRIPROTO $GLPROTO $LIBDRI" fi PKG_CHECK_MODULES([DRI2PROTO], $DRI2PROTO, [HAVE_DRI2PROTO=yes], [HAVE_DRI2PROTO=no]) case "$DRI2,$HAVE_DRI2PROTO" in yes,no) AC_MSG_ERROR([DRI2 requested, but dri2proto not found.]) ;; yes,yes | auto,yes) AC_DEFINE(DRI2, 1, [Build DRI2 extension]) DRI2=yes LIBGL="gl >= 1.2" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" ;; esac AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) AC_ARG_ENABLE(xtrans-send-fds, AS_HELP_STRING([--disable-xtrans-send-fds], [Use Xtrans support for fd passing (default: auto)]), [XTRANS_SEND_FDS=$enableval], [XTRANS_SEND_FDS=auto]) case "x$XTRANS_SEND_FDS" in xauto) case "$host_os" in linux*|solaris*|freebsd*|dragonfly*|openbsd*) XTRANS_SEND_FDS=yes ;; *) XTRANS_SEND_FDS=no ;; esac esac case "x$XTRANS_SEND_FDS" in xyes) AC_DEFINE(XTRANS_SEND_FDS, 1, [Enable xtrans fd passing support]) ;; esac case "$DRI3,$XTRANS_SEND_FDS" in yes,yes | auto,yes) ;; yes,no) AC_MSG_ERROR([DRI3 requested, but xtrans fd passing support not found.]) DRI3=no ;; no,*) ;; *) AC_MSG_NOTICE([DRI3 disabled because xtrans fd passing support not found.]) DRI3=no ;; esac PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO, [HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no]) case "$DRI3,$HAVE_DRI3PROTO" in yes,yes | auto,yes) REQUIRED_MODULES="$REQUIRED_MODULES dri3proto" ;; yes,no) AC_MSG_ERROR([DRI3 requested, but dri3proto not found.]) DRI3=no ;; no,*) ;; *) AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.]) DRI3=no ;; esac AC_CHECK_FUNCS([sigaction]) BUSFAULT=no case x"$ac_cv_func_sigaction" in xyes) AC_DEFINE(HAVE_SIGACTION, 1, [Have sigaction function]) BUSFAULT=yes ;; esac case x"$BUSFAULT" in xyes) AC_DEFINE(BUSFAULT, 1, [Include busfault OS API]) ;; esac AM_CONDITIONAL(BUSFAULT, test x"$BUSFAULT" = xyes) PKG_CHECK_MODULES([XSHMFENCE], $LIBXSHMFENCE, [HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no]) if test "x$XSHMFENCE" = "xauto"; then XSHMFENCE="$HAVE_XSHMFENCE" fi if test "x$XSHMFENCE" = "xyes"; then if test "x$HAVE_XSHMFENCE" != "xyes"; then AC_MSG_ERROR([xshmfence requested but not installed.]) fi AC_DEFINE(HAVE_XSHMFENCE, 1, [Have xshmfence support]) REQUIRED_LIBS="$REQUIRED_LIBS $LIBXSHMFENCE" fi AM_CONDITIONAL(XSHMFENCE, [test "x$XSHMFENCE" = xyes]) case "$DRI3,$XSHMFENCE" in yes,yes | auto,yes) ;; yes,no) AC_MSG_ERROR([DRI3 requested, but xshmfence not found.]) DRI3=no ;; no,*) ;; *) AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.]) DRI3=no ;; esac case x"$DRI3" in xyes|xauto) DRI3=yes AC_DEFINE(DRI3, 1, [Build DRI3 extension]) DRI3_LIB='$(top_builddir)/dri3/libdri3.la' SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO" AC_MSG_NOTICE([DRI3 enabled]); ;; esac AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes) if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes || test "x$XORG" = xyes; then if test "x$DRM" = xyes; then AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support]) PKG_CHECK_MODULES([LIBDRM], $LIBDRM) fi fi if test "x$GLX" = xyes; then PKG_CHECK_MODULES([XLIB], [x11]) PKG_CHECK_MODULES([GL], $GLPROTO $LIBGL) AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) HASHTABLE=yes GLX_LIBS='$(top_builddir)/glx/libglx.la $(top_builddir)/glx/libglxvnd.la' GLX_SYS_LIBS="$GLX_SYS_LIBS $GL_LIBS" else GLX=no fi AM_CONDITIONAL(GLX, test "x$GLX" = xyes) AM_CONDITIONAL(HASHTABLE, test "x$HASHTABLE" = xyes) AC_SUBST([GLX_DEFINES]) AC_SUBST([GLX_SYS_LIBS]) AM_CONDITIONAL(PRESENT, [test "x$PRESENT" = xyes]) if test "x$PRESENT" = xyes; then AC_DEFINE(PRESENT, 1, [Support Present extension]) REQUIRED_MODULES="$REQUIRED_MODULES $PRESENTPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $PRESENTPROTO" PRESENT_INC='-I$(top_srcdir)/present' PRESENT_LIB='$(top_builddir)/present/libpresent.la' fi AM_CONDITIONAL(XINERAMA, [test "x$XINERAMA" = xyes]) if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" fi AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) if test "x$XACE" = xyes; then AC_DEFINE(XACE, 1, [Build X-ACE extension]) fi AM_CONDITIONAL(XSELINUX, [test "x$XSELINUX" = xyes]) if test "x$XSELINUX" = xyes; then if test "x$XACE" != xyes; then AC_MSG_ERROR([cannot build SELinux extension without X-ACE]) fi AC_CHECK_HEADERS([libaudit.h], [], AC_MSG_ERROR([SELinux extension requires audit system headers])) AC_CHECK_LIB(audit, audit_open, [], AC_MSG_ERROR([SELinux extension requires audit system library])) PKG_CHECK_MODULES([SELINUX], $LIBSELINUX) SELINUX_LIBS="$SELINUX_LIBS -laudit" AC_DEFINE(XSELINUX, 1, [Build SELinux extension]) fi AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) if test "x$XCSECURITY" = xyes; then if test "x$XACE" != xyes; then AC_MSG_ERROR([cannot build Security extension without X-ACE]) fi AC_DEFINE(XCSECURITY, 1, [Build Security extension]) fi AM_CONDITIONAL(DBE, [test "x$DBE" = xyes]) if test "x$DBE" = xyes; then AC_DEFINE(DBE, 1, [Support DBE extension]) DBE_LIB='$(top_builddir)/dbe/libdbe.la' DBE_INC='-I$(top_srcdir)/dbe' fi AM_CONDITIONAL(XF86BIGFONT, [test "x$XF86BIGFONT" = xyes]) if test "x$XF86BIGFONT" = xyes; then AC_DEFINE(XF86BIGFONT, 1, [Support XF86 Big font extension]) REQUIRED_MODULES="$REQUIRED_MODULES $BIGFONTPROTO" SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $BIGFONTPROTO" fi AM_CONDITIONAL(DPMSExtension, [test "x$DPMSExtension" = xyes]) if test "x$DPMSExtension" = xyes; then AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi AC_DEFINE(RENDER, 1, [Support RENDER extension]) RENDER_LIB='$(top_builddir)/render/librender.la' RENDER_INC='-I$(top_srcdir)/render' AC_DEFINE(RANDR, 1, [Support RANDR extension]) RANDR_LIB='$(top_builddir)/randr/librandr.la' RANDR_INC='-I$(top_srcdir)/randr' AC_DEFINE(XFIXES,1,[Support XFixes extension]) FIXES_LIB='$(top_builddir)/xfixes/libxfixes.la' FIXES_INC='-I$(top_srcdir)/xfixes' AC_DEFINE(DAMAGE,1,[Support Damage extension]) DAMAGE_LIB='$(top_builddir)/damageext/libdamageext.la' DAMAGE_INC='-I$(top_srcdir)/damageext' MIEXT_DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la' MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' # XINPUT extension is integral part of the server AC_DEFINE(XINPUT, 1, [Support X Input extension]) XI_LIB='$(top_builddir)/Xi/libXi.la' XI_INC='-I$(top_srcdir)/Xi' AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) AM_CONDITIONAL(VGAHW, test "x$VGAHW" = xyes) AM_CONDITIONAL(INT10MODULE, test "x$INT10MODULE" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) if test "x$XKBPATH" = "xauto"; then XKBPATH=$(pkg-config --variable datadir xkbcomp || echo ${datadir})/X11/xkb fi AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) AC_ARG_WITH(xkb-bin-directory, AS_HELP_STRING([--with-xkb-bin-directory=DIR], [Directory containing xkbcomp program (default: auto)]), [XKB_BIN_DIRECTORY="$withval"], [XKB_BIN_DIRECTORY="auto"]) if test "x$XKB_BIN_DIRECTORY" = "xauto"; then XKB_BIN_DIRECTORY=$(pkg-config --variable bindir xkbcomp) if test -z $XKB_BIN_DIRECTORY; then XKB_BIN_DIRECTORY="$bindir" fi fi AC_DEFINE_DIR(XKB_BIN_DIRECTORY, XKB_BIN_DIRECTORY, [Path to XKB bin dir]) dnl Make sure XKM_OUTPUT_DIR is an absolute path XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" fi dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed dnl XKB_COMPILED_DIR (used in Makefiles) must not or install-sh gets confused XKBOUTPUT=`echo $XKBOUTPUT/ | $SED 's|/*$|/|'` XKB_COMPILED_DIR=`echo $XKBOUTPUT | $SED 's|/*$||'` AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) AC_SUBST(XKB_COMPILED_DIR) if test "x$XKB_DFLT_RULES" = x; then case $host_os in linux*) dnl doesn't take AutoAddDevices into account, but whatever. XKB_DFLT_RULES="evdev" ;; *) XKB_DFLT_RULES="base" ;; esac fi AC_DEFINE_UNQUOTED(XKB_DFLT_RULES, ["$XKB_DFLT_RULES"], [Default XKB ruleset]) AC_DEFINE_UNQUOTED(XKB_DFLT_MODEL, ["$XKB_DFLT_MODEL"], [Default XKB model]) AC_DEFINE_UNQUOTED(XKB_DFLT_LAYOUT, ["$XKB_DFLT_LAYOUT"], [Default XKB layout]) AC_DEFINE_UNQUOTED(XKB_DFLT_VARIANT, ["$XKB_DFLT_VARIANT"], [Default XKB variant]) AC_DEFINE_UNQUOTED(XKB_DFLT_OPTIONS, ["$XKB_DFLT_OPTIONS"], [Default XKB options]) AC_SUBST([XKB_DFLT_RULES]) AC_SUBST([XKB_DFLT_MODEL]) AC_SUBST([XKB_DFLT_LAYOUT]) AC_SUBST([XKB_DFLT_VARIANT]) AC_SUBST([XKB_DFLT_OPTIONS]) XKB_LIB='$(top_builddir)/xkb/libxkb.la' XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' REQUIRED_MODULES="$REQUIRED_MODULES xkbfile" PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) if test "x$XDMCP" = xauto; then if test "x$have_libxdmcp" = xyes; then XDMCP=yes else XDMCP=no fi fi if test "x$XDMAUTH" = xauto; then if test "x$have_libxdmcp" = xyes; then XDMAUTH=yes else XDMAUTH=no fi fi AM_CONDITIONAL(XDMCP, [test "x$XDMCP" = xyes]) if test "x$XDMCP" = xyes; then AC_DEFINE(XDMCP, 1, [Support XDM Control Protocol]) REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" XDMCP_MODULES="xdmcp" fi AM_CONDITIONAL(XDMAUTH, [test "x$XDMAUTH" = xyes]) if test "x$XDMAUTH" = xyes; then AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1]) if ! test "x$XDMCP" = xyes; then REQUIRED_LIBS="$REQUIRED_LIBS xdmcp" XDMCP_MODULES="xdmcp" fi fi if test "x$XF86VIDMODE" = xauto; then PKG_CHECK_EXISTS($VIDMODEPROTO, [XF86VIDMODE=yes], [XF86VIDMODE=no]) fi if test "x$XF86VIDMODE" = xyes; then AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) fi AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes]) AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path]) AC_DEFINE_DIR(BASE_FONT_PATH, FONTROOTDIR, [Default base font path]) dridriverdir=`$PKG_CONFIG --variable=dridriverdir dri` AC_DEFINE_DIR(DRI_DRIVER_PATH, dridriverdir, [Default DRI driver path]) AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_NAME"], [Vendor name]) AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_NAME_SHORT"], [Short vendor name]) AC_DEFINE_UNQUOTED(XORG_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address]) AC_DEFINE_UNQUOTED(BUILDERSTRING, ["$BUILDERSTRING"], [Builder string]) AC_SUBST([VENDOR_NAME_SHORT]) AC_DEFINE_UNQUOTED(VENDOR_NAME, ["$VENDOR_NAME"], [Vendor name]) AC_DEFINE_UNQUOTED(VENDOR_NAME_SHORT, ["$VENDOR_NAME_SHORT"], [Vendor name]) AC_DEFINE_UNQUOTED(VENDOR_RELEASE, [$VENDOR_RELEASE], [Vendor release]) AC_DEFINE_UNQUOTED(VENDOR_MAN_VERSION, ["$VENDOR_MAN_VERSION"], [Vendor man version]) if test "x$DEBUGGING" = xyes; then AC_DEFINE(DEBUG, 1, [Enable debugging code]) fi AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) AC_DEFINE(XTEST, 1, [Support XTest extension]) AC_DEFINE(XSYNC, 1, [Support XSync extension]) AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then DIX_LIB='$(top_builddir)/dix/dix.O' OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)' else DIX_LIB='$(top_builddir)/dix/libdix.la' OS_LIB='$(top_builddir)/os/libos.la' fi AC_SUBST([DIX_LIB]) AC_SUBST([OS_LIB]) MAIN_LIB='$(top_builddir)/dix/libmain.la' AC_SUBST([MAIN_LIB]) MI_LIB='$(top_builddir)/mi/libmi.la' MI_EXT_LIB='$(top_builddir)/mi/libmiext.la' MI_INC='-I$(top_srcdir)/mi' FB_LIB='$(top_builddir)/fb/libfb.la' FB_INC='-I$(top_srcdir)/fb' MIEXT_SHADOW_INC='-I$(top_srcdir)/miext/shadow' MIEXT_SHADOW_LIB='$(top_builddir)/miext/shadow/libshadow.la' MIEXT_SYNC_INC='-I$(top_srcdir)/miext/sync' MIEXT_SYNC_LIB='$(top_builddir)/miext/sync/libsync.la' CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include' # SHA1 hashing AC_ARG_WITH([sha1], [AS_HELP_STRING([--with-sha1=libc|libmd|libnettle|nettlestatic|libgcrypt|libcrypto|libsha1|CommonCrypto|CryptoAPI], [choose SHA1 implementation])]) AC_CHECK_FUNC([SHA1Init], [HAVE_SHA1_IN_LIBC=yes]) if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_LIBC" = xyes; then with_sha1=libc fi if test "x$with_sha1" = xlibc && test "x$HAVE_SHA1_IN_LIBC" != xyes; then AC_MSG_ERROR([libc requested but not found]) fi if test "x$with_sha1" = xlibc; then AC_DEFINE([HAVE_SHA1_IN_LIBC], [1], [Use libc SHA1 functions]) SHA1_LIBS="" fi AC_CHECK_FUNC([CC_SHA1_Init], [HAVE_SHA1_IN_COMMONCRYPTO=yes]) if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_COMMONCRYPTO" = xyes; then with_sha1=CommonCrypto fi if test "x$with_sha1" = xCommonCrypto && test "x$HAVE_SHA1_IN_COMMONCRYPTO" != xyes; then AC_MSG_ERROR([CommonCrypto requested but not found]) fi if test "x$with_sha1" = xCommonCrypto; then AC_DEFINE([HAVE_SHA1_IN_COMMONCRYPTO], [1], [Use CommonCrypto SHA1 functions]) SHA1_LIBS="" fi dnl stdcall functions cannot be tested with AC_CHECK_LIB AC_CHECK_HEADER([wincrypt.h], [HAVE_SHA1_IN_CRYPTOAPI=yes], [], [#include ]) if test "x$with_sha1" = x && test "x$HAVE_SHA1_IN_CRYPTOAPI" = xyes; then with_sha1=CryptoAPI fi if test "x$with_sha1" = xCryptoAPI && test "x$HAVE_SHA1_IN_CRYPTOAPI" != xyes; then AC_MSG_ERROR([CryptoAPI requested but not found]) fi if test "x$with_sha1" = xCryptoAPI; then AC_DEFINE([HAVE_SHA1_IN_CRYPTOAPI], [1], [Use CryptoAPI SHA1 functions]) SHA1_LIBS="" fi AC_CHECK_LIB([md], [SHA1Init], [HAVE_LIBMD=yes]) if test "x$with_sha1" = x && test "x$HAVE_LIBMD" = xyes; then with_sha1=libmd fi if test "x$with_sha1" = xlibmd && test "x$HAVE_LIBMD" != xyes; then AC_MSG_ERROR([libmd requested but not found]) fi if test "x$with_sha1" = xlibmd; then AC_DEFINE([HAVE_SHA1_IN_LIBMD], [1], [Use libmd SHA1 functions]) SHA1_LIBS=-lmd fi PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then with_sha1=libsha1 fi if test "x$with_sha1" = xlibsha1 && test "x$HAVE_LIBSHA1" != xyes; then AC_MSG_ERROR([libsha1 requested but not found]) fi if test "x$with_sha1" = xlibsha1; then AC_DEFINE([HAVE_SHA1_IN_LIBSHA1], [1], [Use libsha1 for SHA1]) SHA1_LIBS=-lsha1 fi AC_CHECK_LIB([nettle], [nettle_sha1_init], [HAVE_LIBNETTLE=yes]) if test "x$with_sha1" = x && test "x$HAVE_LIBNETTLE" = xyes; then with_sha1=libnettle fi if test "x$with_sha1" = xlibnettle && test "x$HAVE_LIBNETTLE" != xyes; then AC_MSG_ERROR([libnettle requested but not found]) fi if test "x$with_sha1" = xlibnettle; then AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1], [Use libnettle SHA1 functions]) SHA1_LIBS=-lnettle fi if test "x$with_sha1" = xnettlestatic && test "x$HAVE_LIBNETTLE" != xyes; then AC_MSG_ERROR([nettlestatic requested but libnettle not found]) fi if test "x$with_sha1" = xnettlestatic; then AC_DEFINE([HAVE_SHA1_IN_LIBNETTLE], [1], [Use static libnettle SHA1 functions]) SHA1_LIBS=-l:libnettle.a fi AC_CHECK_LIB([gcrypt], [gcry_md_open], [HAVE_LIBGCRYPT=yes]) if test "x$with_sha1" = x && test "x$HAVE_LIBGCRYPT" = xyes; then with_sha1=libgcrypt fi if test "x$with_sha1" = xlibgcrypt && test "x$HAVE_LIBGCRYPT" != xyes; then AC_MSG_ERROR([libgcrypt requested but not found]) fi if test "x$with_sha1" = xlibgcrypt; then AC_DEFINE([HAVE_SHA1_IN_LIBGCRYPT], [1], [Use libgcrypt SHA1 functions]) SHA1_LIBS=-lgcrypt fi # We don't need all of the OpenSSL libraries, just libcrypto AC_CHECK_LIB([crypto], [SHA1_Init], [HAVE_LIBCRYPTO=yes]) PKG_CHECK_MODULES([OPENSSL], [openssl], [HAVE_OPENSSL_PKC=yes], [HAVE_OPENSSL_PKC=no]) if test "x$HAVE_LIBCRYPTO" = xyes || test "x$HAVE_OPENSSL_PKC" = xyes; then if test "x$with_sha1" = x; then with_sha1=libcrypto fi else if test "x$with_sha1" = xlibcrypto; then AC_MSG_ERROR([OpenSSL libcrypto requested but not found]) fi fi if test "x$with_sha1" = xlibcrypto; then if test "x$HAVE_LIBCRYPTO" = xyes; then SHA1_LIBS=-lcrypto else SHA1_LIBS="$OPENSSL_LIBS" SHA1_CFLAGS="$OPENSSL_CFLAGS" fi fi AC_MSG_CHECKING([for SHA1 implementation]) if test "x$with_sha1" = x; then AC_MSG_ERROR([No suitable SHA1 implementation found]) fi AC_MSG_RESULT([$with_sha1]) AC_SUBST(SHA1_LIBS) AC_SUBST(SHA1_CFLAGS) PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no]) if test "x$LIBUNWIND" = "xauto"; then LIBUNWIND="$HAVE_LIBUNWIND" fi if test "x$LIBUNWIND" = "xyes"; then if test "x$HAVE_LIBUNWIND" != "xyes"; then AC_MSG_ERROR([libunwind requested but not installed.]) fi AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support]) fi AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes]) # Autotools has some unfortunate issues with library handling. In order to # get a server to rebuild when a dependency in the tree is changed, it must # be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be # listed there, or some versions of autotools will break (especially if a -L # is required to find the library). So, we keep two sets of libraries # detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which # will go into the _DEPENDENCIES and _LDADD of the server, and # NAMESPACE_SYS_LIBS which will go into only the _LDADD. The # NAMESPACEMODULES_LIBS detected from pkgconfig should always go in # NAMESPACE_SYS_LIBS. # # XSERVER_LIBS is the set of in-tree libraries which all servers require. # XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers # require. # XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) UTILS_SYS_LIBS="${SYS_LIBS}" AC_SUBST([UTILS_SYS_LIBS]) # The Xorg binary needs to export symbols so that they can be used from modules # Some platforms require extra flags to do this. libtool should set the # necessary flags for each platform when -export-dynamic is passed to it. LD_EXPORT_SYMBOLS_FLAG="-export-dynamic" LD_NO_UNDEFINED_FLAG= XORG_DRIVER_LIBS= case "$host_os" in cygwin*) LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-all,--out-implib,lib\$@.a" LD_NO_UNDEFINED_FLAG="-no-undefined -Wl,\$(top_builddir)/hw/xfree86/libXorg.exe.a" XORG_DRIVER_LIBS="-lXorg.exe -L\${moduledir} -lshadow -lfb -no-undefined" CYGWIN=yes ;; solaris*) # We use AC_LINK_IFELSE to generate a temporary program conftest$EXEEXT # that we can link against for testing if the system linker is new # enough to support -z parent= for verifying loadable modules # are only calling functions defined in either the loading program or # the libraries they're linked with. AC_LINK_IFELSE( [AC_LANG_SOURCE([int main(int argc, char **argv) { return 0; }])], [mv conftest$EXEEXT conftest.parent XORG_CHECK_LINKER_FLAGS([-Wl,-z,parent=conftest.parent -G], [LD_NO_UNDEFINED_FLAG="-Wl,-z,defs -Wl,-z,parent=\$(top_builddir)/hw/xfree86/Xorg" # Not set yet, since this gets exported in xorg-server.pc to all the drivers, # and they're not all fixed to build correctly with it yet. # XORG_DRIVER_LIBS="-Wl,-z,defs -Wl,-z,parent=${bindir}/Xorg" ],[], [AC_LANG_SOURCE([extern int main(int argc, char **argv); int call_main(void) { return main(0, (void *)0); }])]) rm -f conftest.parent ]) ;; esac AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) AC_SUBST([LD_NO_UNDEFINED_FLAG]) AC_SUBST([XORG_DRIVER_LIBS]) AM_CONDITIONAL([CYGWIN], [test x"$CYGWIN" = xyes]) AM_CONDITIONAL([NO_UNDEFINED], [test x"$LD_NO_UNDEFINED_FLAG" != x]) dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so dnl we need to replicate that here until those can all be fixed AC_MSG_CHECKING([if SVR4 needs to be defined]) AC_EGREP_CPP([I_AM_SVR4],[ #if defined(SVR4) || defined(__svr4__) || defined(__SVR4) I_AM_SVR4 #endif ],[ AC_DEFINE([SVR4],1,[Define to 1 on systems derived from System V Release 4]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SYNC_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC $DBE_INC $PRESENT_INC" dnl --------------------------------------------------------------------------- dnl DDX section. dnl --------------------------------------------------------------------------- dnl Xvfb DDX AC_MSG_CHECKING([whether to build Xvfb DDX]) AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XVFB_LIBS]) AC_SUBST([XVFB_SYS_LIBS]) fi dnl Xnest DDX PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) AC_MSG_CHECKING([whether to build Xnest DDX]) if test "x$XNEST" = xauto; then XNEST="$have_xnest" fi AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then if test "x$have_xnest" = xno; then AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.]) fi XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $RENDER_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $MAIN_LIB $DIX_LIB $OS_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) fi dnl Xorg DDX AC_MSG_CHECKING([whether to build Xorg DDX]) if test "x$XORG" = xauto; then XORG="yes" case $host_os in cygwin*) XORG="no" ;; mingw*) XORG="no" ;; darwin*) XORG="no" ;; esac fi AC_MSG_RESULT([$XORG]) if test "x$XORG" = xyes; then PKG_CHECK_MODULES([LIBXCVT], $LIBXCVT) XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common' XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS $LIBXCVT_CFLAGS -DHAVE_XORG_CONFIG_H" XORG_LIBS="$COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $XI_LIB $XKB_LIB" XORG_SYS_LIBS="$XORG_SYS_LIBS $LIBXCVT_LIBS" dnl ================================================================== dnl symbol visibility symbol_visibility= have_visibility=disabled if test x$SYMBOL_VISIBILITY != xno; then AC_MSG_CHECKING(for symbol visibility support) if test x$GCC = xyes; then VISIBILITY_CFLAGS="-fvisibility=hidden" else if test x$SUNCC = xyes; then VISIBILITY_CFLAGS="-xldscope=hidden" else have_visibility=no fi fi if test x$have_visibility != xno; then save_CFLAGS="$CFLAGS" proto_inc=`$PKG_CONFIG --cflags xproto` CFLAGS="$CFLAGS $VISIBILITY_CFLAGS $proto_inc" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ [#include extern _X_HIDDEN int hidden_int; extern _X_EXPORT int public_int; extern _X_HIDDEN int hidden_int_func(void); extern _X_EXPORT int public_int_func(void);]], [])], have_visibility=yes, have_visibility=no) CFLAGS=$save_CFLAGS fi AC_MSG_RESULT([$have_visibility]) if test x$have_visibility != xno; then symbol_visibility=$VISIBILITY_CFLAGS XORG_CFLAGS="$XORG_CFLAGS $VISIBILITY_CFLAGS" XSERVER_CFLAGS="$XSERVER_CFLAGS $VISIBILITY_CFLAGS" fi fi dnl added to xorg-server.pc AC_SUBST([symbol_visibility]) dnl =================================================================== dnl =================================================================== dnl ================= beginning of PCI configuration ================== dnl =================================================================== xorg_bus_bsdpci=no xorg_bus_sparc=no AC_MSG_CHECKING([whether to build Xorg PCI functions]) if test "x$PCI" = xyes; then PKG_CHECK_MODULES([PCIACCESS], $LIBPCIACCESS) SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $LIBPCIACCESS" XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $LIBDRM_LIBS" XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS $LIBDRM_CFLAGS" AC_DEFINE(XSERVER_LIBPCIACCESS, 1, [Use libpciaccess for all pci manipulation]) AC_DEFINE_DIR(PCI_TXT_IDS_PATH, PCI_TXT_IDS_DIR, [Default PCI text file ID path]) case $host_os in gnu* | freebsd* | kfreebsd*-gnu | netbsd* | openbsd* | solaris* | dragonfly*) xorg_bus_bsdpci="yes" ;; esac case $host_cpu in sparc*) xorg_bus_sparc="yes" ;; esac else if test "x$CONFIG_UDEV_KMS" = xyes; then AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) fi if test "x$INT10MODULE" = xyes && test "x$INT10" != xstub; then AC_MSG_ERROR([Cannot build int10 without libpciaccess]) fi fi AC_MSG_RESULT([$PCI]) if test "x$CONFIG_UDEV_KMS" = xyes; then AC_DEFINE(XSERVER_PLATFORM_BUS, 1, [X server supports platform device enumeration]) fi AC_MSG_RESULT([$XSERVER_PLATFORM_BUS]) dnl =================================================================== dnl ==================== end of PCI configuration ===================== dnl =================================================================== case $host_os in linux*) XORG_OS_SUBDIR="linux" linux_acpi="no" case $host_cpu in i*86|amd64*|x86_64*|ia64*) linux_acpi=$enable_linux_acpi ;; *) ;; esac dnl APM header AC_CHECK_HEADERS([linux/apm_bios.h], [linux_apm=$enable_linux_apm]) ;; freebsd* | kfreebsd*-gnu | dragonfly*) XORG_OS_SUBDIR="bsd" ;; netbsd*) XORG_OS_SUBDIR="bsd" ;; openbsd*) XORG_OS_SUBDIR="bsd" ;; solaris*) XORG_OS_SUBDIR="solaris" AC_CHECK_HEADERS([sys/kd.h]) AC_CHECK_HEADERS([sys/vt.h], [solaris_vt=yes], [solaris_vt=no]) # Check for minimum supported release AC_MSG_CHECKING([Solaris version]) OS_MINOR=`echo ${host_os}|$SED -e 's/^.*solaris2\.//' -e s'/\..*$//'` if test "${OS_MINOR}" -ge 7 ; then AC_MSG_RESULT(Solaris ${OS_MINOR}) else AC_MSG_RESULT(Solaris `echo ${host_os}|$SED -e 's/^.*solaris//`) fi if test "${OS_MINOR}" -lt 8 ; then AC_MSG_ERROR([This release no longer supports Solaris versions older than Solaris 8.]) fi AC_CHECK_DECL([_LP64], [SOLARIS_64="yes"], [SOLARIS_64="no"]) case $host_cpu in sparc*) SOLARIS_INOUT_ARCH="sparcv8plus" ;; i*86|x86_64*) if test x$SOLARIS_64 = xyes ; then SOLARIS_INOUT_ARCH="amd64" else SOLARIS_INOUT_ARCH="ia32" fi ;; *) AC_MSG_ERROR([Unsupported Solaris platform. Only SPARC & x86 \ are supported on Solaris in this release. If you are \ interested in porting Xorg to your platform, please email \ xorg@lists.freedesktop.org.]) ;; esac AC_SUBST([SOLARIS_INOUT_ARCH]) ;; gnu*) XORG_OS_SUBDIR="hurd" ;; cygwin*) XORG_OS_SUBDIR="stub" ;; *) XORG_OS_SUBDIR="stub" AC_MSG_NOTICE([m4_text_wrap(m4_join([ ], [Your OS is unknown.], [If you are interested in porting Xorg to your platform,], [please email xorg@lists.freedesktop.org.]))]) ;; esac if test "x$DGA" = xauto; then PKG_CHECK_MODULES(DGA, $DGAPROTO, [DGA=yes], [DGA=no]) fi if test "x$DGA" = xyes; then XORG_MODULES="$XORG_MODULES $DGAPROTO" PKG_CHECK_MODULES(DGA, $DGAPROTO) AC_DEFINE(DGA, 1, [Support DGA extension]) AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) fi if test "x$XF86VIDMODE" = xyes; then XORG_MODULES="$XORG_MODULES $VIDMODEPROTO" fi if test -n "$XORG_MODULES"; then PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES]) XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" fi if test "x$DRM" = xyes -a "x$DRI2" = xyes; then XORG_DRIVER_MODESETTING=yes fi AC_SUBST([XORG_LIBS]) AC_SUBST([XORG_SYS_LIBS]) AC_SUBST([XORG_INCS]) AC_SUBST([XORG_OS_SUBDIR]) AC_SUBST([XORG_CFLAGS]) dnl these only go in xorg-config.h XF86CONFIGFILE="xorg.conf" XF86CONFIGDIR="xorg.conf.d" AC_SUBST(XF86CONFIGDIR) LOGPREFIX="Xorg." XDG_DATA_HOME=".local/share" XDG_DATA_HOME_LOGDIR="xorg" AC_DEFINE(XORG_SERVER, 1, [Building Xorg server]) AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) AC_DEFINE(__XSERVERNAME__, "Xorg", [Name of X server]) AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(XCONFIGDIR, XF86CONFIGDIR, [Name of configuration directory]) AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path]) AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location]) AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default logfile prefix]) AC_DEFINE_DIR(DEFAULT_XDG_DATA_HOME, XDG_DATA_HOME, [Default XDG_DATA dir under HOME]) AC_DEFINE_DIR(DEFAULT_XDG_DATA_HOME_LOGDIR, XDG_DATA_HOME_LOGDIR, [Default log dir under XDG_DATA_HOME]) AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) if test "x$VGAHW" = xyes; then AC_DEFINE(WITH_VGAHW, 1, [Building vgahw module]) fi driverdir="$moduledir/drivers" AC_SUBST([moduledir]) AC_SUBST([driverdir]) sdkdir="$includedir/xorg" extdir="$includedir/X11/extensions" sysconfigdir="$datadir/X11/$XF86CONFIGDIR" AC_SUBST([sdkdir]) AC_SUBST([extdir]) AC_SUBST([sysconfigdir]) AC_SUBST([logdir]) # stuff the ABI versions into the pc file too extract_abi() { grep ^.define.*${1}_VERSION ${srcdir}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }' } abi_ansic=`extract_abi ANSIC` abi_videodrv=`extract_abi VIDEODRV` abi_xinput=`extract_abi XINPUT` abi_extension=`extract_abi EXTENSION` AC_SUBST([abi_ansic]) AC_SUBST([abi_videodrv]) AC_SUBST([abi_xinput]) AC_SUBST([abi_extension]) fi AM_CONDITIONAL([XORG], [test "x$XORG" = xyes]) AM_CONDITIONAL([XORG_BUS_PCI], [test "x$PCI" = xyes]) AM_CONDITIONAL([XORG_BUS_BSDPCI], [test "x$xorg_bus_bsdpci" = xyes]) AM_CONDITIONAL([XORG_BUS_SPARC], [test "x$xorg_bus_sparc" = xyes]) AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes]) AM_CONDITIONAL([LNXAPM], [test "x$linux_apm" = xyes]) AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes]) AM_CONDITIONAL([DGA], [test "x$DGA" = xyes]) AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes]) AM_CONDITIONAL([XORG_DRIVER_MODESETTING], [test "x$XORG_DRIVER_MODESETTING" = xyes]) AM_CONDITIONAL([XORG_DRIVER_INPUT_INPUTTEST], [test "x$XORG_DRIVER_INPUT_INPUTTEST" = xyes]) dnl glamor if test "x$GLAMOR" = xauto; then if echo "$XORG" "$XEPHYR" | grep -q yes ; then GLAMOR=yes fi fi AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes]) if test "x$GLAMOR" = xyes; then AC_DEFINE(GLAMOR, 1, [Build glamor]) PKG_CHECK_MODULES([GLAMOR], [epoxy]) PKG_CHECK_EXISTS(epoxy >= 1.4.4, [AC_DEFINE(GLAMOR_HAS_EGL_QUERY_DMABUF, 1, [Have GLAMOR_HAS_EGL_QUERY_DMABUF])], []) PKG_CHECK_EXISTS(epoxy >= 1.5.4, [AC_DEFINE(GLAMOR_HAS_EGL_QUERY_DRIVER, 1, [Have GLAMOR_HAS_EGL_QUERY_DRIVER])], []) PKG_CHECK_MODULES(GBM, "$LIBGBM", [GBM=yes], [GBM=no]) if test "x$GBM" = xyes; then AC_DEFINE(GLAMOR_HAS_GBM, 1, [Build glamor with GBM-based EGL support]) AC_CHECK_DECL(GBM_BO_USE_LINEAR, [AC_DEFINE(GLAMOR_HAS_GBM_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], [], [#include #include ]) dnl 17.1.0 is required for gbm_bo_create_with_modifiers PKG_CHECK_EXISTS(gbm >= 17.1.0, [AC_DEFINE(GBM_BO_WITH_MODIFIERS, 1, [Have gbm_bo_create_with_modifiers])], []) else if test "x$XORG" = xyes; then AC_MSG_ERROR([Glamor for Xorg requires $LIBGBM]) fi fi fi AM_CONDITIONAL([GLAMOR_EGL], [test "x$GBM" = xyes]) dnl XWin DDX AC_MSG_CHECKING([whether to build XWin DDX]) if test "x$XWIN" = xauto; then case $host_os in cygwin*) XWIN="yes" ;; mingw*) XWIN="yes" ;; *) XWIN="no" ;; esac fi AC_MSG_RESULT([$XWIN]) if test "x$XWIN" = xyes; then AC_DEFINE_DIR(DEFAULT_LOGDIR, logdir, [Default log location]) AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) AC_CHECK_TOOL(WINDRES, windres) PKG_CHECK_MODULES([XWINMODULES],[xcb-aux xcb-composite xcb-image xcb-ewmh xcb-icccm xcb-xfixes]) if test "x$WINDOWSDRI" = xauto; then PKG_CHECK_EXISTS([windowsdriproto], [WINDOWSDRI=yes], [WINDOWSDRI=no]) fi if test "x$WINDOWSDRI" = xyes ; then PKG_CHECK_MODULES(WINDOWSDRI, [windowsdriproto]) fi case $host_os in cygwin*) XWIN_SERVER_NAME=XWin AC_DEFINE(HAS_DEVWINDOWS,1,[Cygwin has /dev/windows for signaling new win32 messages]) ;; mingw*) XWIN_SERVER_NAME=Xming AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location]) AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets]) XWIN_SYS_LIBS="-lpthread -lws2_32" ;; esac XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" AC_SUBST(XWIN_LIBS) AC_SUBST(XWIN_SERVER_NAME) AC_SUBST(XWIN_SYS_LIBS) if test "x$DEBUGGING" = xyes; then AC_DEFINE(CYGDEBUG, 1, [Simple debug messages]) AC_DEFINE(CYGWINDOWING_DEBUG, 1, [Debug messages for window handling]) AC_DEFINE(CYGMULTIWINDOW_DEBUG, 1, [Debug window manager]) fi AC_DEFINE(DDXOSVERRORF, 1, [Use OsVendorVErrorF]) AC_DEFINE(DDXBEFORERESET, 1, [Use ddxBeforeReset ]) dnl XWin requires OpenGL spec files in order to generate wrapper code for native GL functions if [test "x$XWIN" = xyes && test "x$GLX" = xyes] ; then AC_CHECK_PROG(PYTHON3, python3, python3) if test -z "$PYTHON3"; then AC_MSG_ERROR([python3 not found]) fi AC_MSG_CHECKING(for python module lxml) $PYTHON3 -c "import lxml;" if test $? -ne 0 ; then AC_MSG_ERROR([not found]) fi AC_MSG_RESULT(yes) if test "x$KHRONOS_SPEC_DIR" = "xauto" ; then PKG_CHECK_MODULES([KHRONOS_OPENGL_REGISTRY], [khronos-opengl-registry]) KHRONOS_SPEC_DIR=`pkg-config khronos-opengl-registry --variable=specdir` fi AC_SUBST(KHRONOS_SPEC_DIR) fi fi AM_CONDITIONAL(XWIN, [test "x$XWIN" = xyes]) AM_CONDITIONAL(XWIN_GLX_WINDOWS, [test "x$XWIN" = xyes && test "x$GLX" = xyes]) AM_CONDITIONAL(XWIN_WINDOWS_DRI, [test "x$XWIN" = xyes && test "x$WINDOWSDRI" = xyes]) dnl Darwin / OS X DDX if test "x$XQUARTZ" = xyes; then AC_DEFINE(XQUARTZ,1,[Have Quartz]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) XQUARTZ_LIBS="$COMPOSITE_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $PRESENT_LIB" AC_SUBST([XQUARTZ_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) CFLAGS="${CFLAGS} -DROOTLESS_WORKAROUND -DROOTLESS_SAFEALPHA -DNO_ALLOCA" PKG_CHECK_MODULES(XPBPROXY, $APPLEWMPROTO $LIBAPPLEWM xfixes x11) if test "x$XQUARTZ_SPARKLE" = xyes ; then AC_DEFINE(XQUARTZ_SPARKLE,1,[Support application updating through sparkle.]) fi if test "x$STANDALONE_XPBPROXY" = xyes ; then AC_DEFINE(STANDALONE_XPBPROXY,1,[Build a standalone xpbproxy]) fi fi AM_CONDITIONAL(PSEUDORAMIX, [test "x$XQUARTZ" = xyes -o "x$XWIN" = xyes ]) # Support for objc in autotools is minimal and not documented. OBJC='$(CC)' OBJCLD='$(CCLD)' OBJCLINK='$(LINK)' OBJCFLAGS='$(CFLAGS)' AC_SUBST([OBJC]) AC_SUBST([OBJCCLD]) AC_SUBST([OBJCLINK]) AC_SUBST([OBJCFLAGS]) # internal, undocumented automake func follows :( _AM_DEPENDENCIES([OBJC]) AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes]) AM_CONDITIONAL(XQUARTZ_SPARKLE, [test "x$XQUARTZ_SPARKLE" != "xno"]) AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) dnl kdrive DDX XEPHYR_LIBS= XEPHYR_INCS= AM_CONDITIONAL(KDRIVE, [test x$KDRIVE = xyes]) if test "$KDRIVE" = yes; then XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-render xcb-renderutil xcb-aux xcb-image xcb-icccm xcb-shm >= 1.9.3 xcb-keysyms xcb-randr xcb-xkb" if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv" fi if test "x$DRI" = xyes && test "x$GLX" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBDRM xcb-glx xcb-xf86dri > 1.6" fi if test "x$GLAMOR" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS x11-xcb" fi if test "x$XEPHYR" = xauto; then PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [XEPHYR="yes"], [XEPHYR="no"]) elif test "x$XEPHYR" = xyes ; then PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS) fi # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' KDRIVE_PURE_INCS="$KDRIVE_INC $MIEXT_SYNC_INC $MIEXT_DAMAGE_INC $MIEXT_SHADOW_INC $XEXT_INC $FB_INC $MI_INC" KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" KDRIVE_CFLAGS="$XSERVER_CFLAGS" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $DRI3_LIB $PRESENT_LIB $MIEXT_SYNC_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.la' KDRIVE_MAIN_LIB="$MAIN_LIB" KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB" KDRIVE_LIBS="$KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" AC_SUBST([XEPHYR_LIBS]) AC_SUBST([XEPHYR_INCS]) fi AC_SUBST([KDRIVE_INCS]) AC_SUBST([KDRIVE_PURE_INCS]) AC_SUBST([KDRIVE_CFLAGS]) AC_SUBST([KDRIVE_PURE_LIBS]) AC_SUBST([KDRIVE_MAIN_LIB]) AC_SUBST([KDRIVE_LOCAL_LIBS]) AC_SUBST([KDRIVE_LIBS]) AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) dnl and the rest of these are generic, so they're in config.h dnl dnl though, thanks to the passing of some significant amount of time, the dnl above is probably a complete fallacy, and you should not rely on it. dnl but this is still actually better than imake, honest. -daniels AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include #ifndef __GLIBC__ #error not glibc #endif ]], [])], [AC_DEFINE(_GNU_SOURCE, 1, [ Enable GNU and other extensions to the C environment for glibc])]) AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [sysconfdir]) AC_SUBST([RELEASE_DATE]) DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" AC_SUBST([DIX_CFLAGS]) AC_SUBST([libdir]) AC_SUBST([exec_prefix]) AC_SUBST([prefix]) AC_CONFIG_COMMANDS([sdksyms], [touch hw/xfree86/sdksyms.dep]) if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then AC_MSG_WARN([ *********************************************** Neither HAL nor udev backend will be enabled. Input device hotplugging will not be available! ***********************************************]) fi AC_CONFIG_FILES([ Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/dtrace/Makefile man/Makefile fb/Makefile glamor/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/sync/Makefile miext/damage/Makefile miext/shadow/Makefile miext/rootless/Makefile os/Makefile pseudoramiX/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile dri3/Makefile present/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/Xorg.sh hw/xfree86/common/Makefile hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/doc/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/dri2/pci_ids/Makefile hw/xfree86/drivers/Makefile hw/xfree86/drivers/inputtest/Makefile hw/xfree86/drivers/modesetting/Makefile hw/xfree86/exa/Makefile hw/xfree86/exa/man/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/fbdevhw/man/Makefile hw/xfree86/glamor_egl/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/man/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/stub/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xkb/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/man/Makefile hw/xfree86/utils/gtf/Makefile hw/vfb/Makefile hw/vfb/man/Makefile hw/xnest/Makefile hw/xnest/man/Makefile hw/xwin/Makefile hw/xwin/dri/Makefile hw/xwin/glx/Makefile hw/xwin/man/Makefile hw/xwin/winclipboard/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/man/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/ephyr/man/Makefile hw/kdrive/src/Makefile test/Makefile xserver.ent xorg-server.pc ]) AC_OUTPUT xorg-server-21.1.16/aclocal.m40000644000175000017500000044404714757411113011507 # generated automatically by aclocal 1.16.5 -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],, [m4_warning([this file was generated for autoconf 2.72. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) dnl fontutil.m4. Generated from fontutil.m4.in by configure. dnl dnl This file comes from X.Org's font-util 1.4.1 dnl dnl Copyright (c) 2009, 2023, Oracle and/or its affiliates. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl dnl -------------------------------------------------------------------- dnl dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. # XORG_FONT_MACROS_VERSION(required-version) # ------------------------------------------ # Minimum version: 1.1.0 # # If you're using a macro added in Version 1.1 or newer, include this in # your configure.ac with the minimum required version, such as: # XORG_FONT_MACROS_VERSION(1.1) # # To ensure that this macro is defined, also add: # m4_ifndef([XORG_FONT_MACROS_VERSION], # [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_FONT_MACROS_VERSION],[ m4_define([vers_have], [1.4.1]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])]) m4_if(m4_version_compare(vers_have, [$1]), -1, [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])]) m4_undefine([vers_have]) m4_undefine([maj_have]) m4_undefine([maj_needed]) ]) # XORG_FONT_MACROS_VERSION # XORG_FONT_CHECK_{maps}() # ------------------------ # Minimum version: 1.0.0 # These macros add --enable/disable-{maps} where {maps} are ISO8859-*, # JISX0201 or KOI8_R. By default, they are all enabled. AC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)]) AC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)]) AC_DEFUN([XORG_FONT_CHECK_JISX0201], [XORG_FONT_CHECK_ENCODING(JISX0201)]) AC_DEFUN([XORG_FONT_CHECK_KOI8_R], [XORG_FONT_CHECK_ENCODING(KOI8-R)]) # XORG_FONT_CHECK_ENCODING(encoding) # ---------------------------------- # Minimum version: 1.1.0 # This macro adds --enable/disable-, enabled by default. # It replaced individual copies of this code in the above macros in 1.1. # Currently assumes encoding names will be all upper-case - add m4_toupper # calls if this is not true in the future. AC_DEFUN([XORG_FONT_CHECK_ENCODING],[ AC_ARG_ENABLE(m4_tolower($1), AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), [Build $1 fonts (default: yes)]), [AS_TR_SH($1)=$enableval]) AC_MSG_CHECKING([whether to build $1 fonts]) AC_MSG_RESULT($[AS_TR_SH($1)]) AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) ]) # XORG_FONT_CHECK_ENCODING # XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) # ----------------------------------------------------- # Minimum version: 1.1.0 # Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. # Add a shorthand --enable/disable-all-encodings option. AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ AC_ARG_ENABLE([all-encodings], AS_HELP_STRING([--disable-all-encodings], [Disable building of all font encodings]), [m4_foreach_w([enc], [$1], [ AS_TR_SH(enc)=$enableval ])], [m4_foreach_w([enc], [$1], [ AS_TR_SH(enc)=yes ])]) m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) ]) # XORG_FONT_CHECK_ENCODING_LIST # XORG_FONT_REQUIRED_PROG(VARNAME, progname) # ------------------------------------------ # Minimum version: 1.1.0 # # Simple wrapper around AC_PATH_PROG that errors if not found # AC_DEFUN([XORG_FONT_REQUIRED_PROG],[ AC_PATH_PROG($1, $2) if test x"$$1" = x; then AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) fi ]) # XORG_FONT_FCCACHE() # ------------------- # Minimum version: 1.1.0 # # Set FCCACHE to path to fc-cache (fontconfig cache builder) if found # Set RUN_FCCACHE to a rule suitable for substituting into a makefile # to run fc-cache if found and not installing to $DESTDIR and not # cross-compiling # # fc-cache is optional, not required, and should be skipped when making # packages (installing to $DESTDIR) or cross-compiling # AC_DEFUN([XORG_FONT_FCCACHE],[ AC_PATH_PROG(FCCACHE, fc-cache) FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"' if test x"$FCCACHE" = x || test x"$cross_compiling" != x"no" ; then RUN_FCCACHE="${FCCACHE_WARN}" else RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else' RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)" fi AC_SUBST([RUN_FCCACHE]) ]) # XORG_FONT_MKFONTDIR() # ------------------- # Minimum version: 1.3.0 # # Set MKFONTDIR to path to mkfontdir. # # If cross-compiling, and if mkdir is not found, use a shell command # which warns mkfontdir needs to be run on the target # # If not cross-compiling, mkfontdir must be found # AC_DEFUN([XORG_FONT_MKFONTDIR],[ if test x"$cross_compiling" != x"no" ; then AC_PATH_PROG(MKFONTDIR, mkfontdir, "") MKFONTDIR_WARN='echo "** Warning: mkfontdir not run" ; echo "** Run mkfontdir manually on host system"' if test x"$MKFONTDIR" = x; then MKFONTDIR="${MKFONTDIR_WARN} ; echo '** mkfontdir'" fi else XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir) fi AC_SUBST([MKFONTDIR]) ]) # XORG_FONT_COMMON_UTILS() # ------------------------ # Minimum version: 1.1.0 # # Call XORG_FONT_REQUIRED_PROG for programs needed for all font types AC_DEFUN([XORG_FONT_COMMON_UTILS],[ XORG_FONT_FCCACHE XORG_FONT_MKFONTDIR ]) # XORG_FONT_SCALED_UTILS() # ------------------------ # Minimum version: 1.1.0 # # Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts # (TrueType, OpenType, Type1) AC_DEFUN([XORG_FONT_SCALED_UTILS],[ XORG_FONT_COMMON_UTILS XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale) ]) # XORG_FONT_BDF_UTILS() # --------------------- # Minimum version: 1.1.0 # # Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts # Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the # PCF output files created by bdftopcf AC_DEFUN([XORG_FONT_BDF_UTILS],[ XORG_FONT_COMMON_UTILS XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf) XORG_FONT_CHECK_COMPRESSION ]) # XORG_FONT_CHECK_COMPRESSION() # ----------------------------- # Minimum version: 1.1.0 # # Offer a --with-compression flag to control what compression method is # used for pcf font files. Offers all the methods currently supported # by libXfont, including no compression. # # If COMPRESS_FLAGS is not set, and the compression method has flags needed # for reproducible builds, such as gzip -n to not record timestamp, will # set COMPRESS_FLAGS to those options. AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[ AC_MSG_CHECKING([font compression method]) AC_ARG_WITH(compression, [AS_HELP_STRING([--with-compression=], [compression method to use on pcf fonts])], [compression="$withval"], [compression="yes"]) if test x"$compression" = "xyes" ; then compression="gzip" fi AC_MSG_RESULT([${compression}]) case ${compression} in *compress) COMPRESS_SUFFIX=".Z" ;; *gzip) COMPRESS_SUFFIX=".gz" ; COMPRESS_FLAGS="${COMPRESS_FLAGS--n}" ;; *bzip2) COMPRESS_SUFFIX=".bz2" ;; no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;; *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;; esac if test x"$COMPRESS_SUFFIX" != "x" ; then XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression}) fi AC_MSG_CHECKING([options to font compression command]) AC_MSG_RESULT([${COMPRESS_FLAGS:-none}]) AC_SUBST([COMPRESS_FLAGS]) AC_SUBST([COMPRESS_SUFFIX]) ]) # XORG_FONT_UCS2ANY() # ------------------- # Minimum version: 1.1.0 # # Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting # Unicode-encoded BDF format bitmap fonts into subsets for older encodings. # Also call pkg-config to find the directory with the encoding files needed # by ucs2any, and export it as MAPFILES_PATH to the Makefiles AC_DEFUN([XORG_FONT_UCS2ANY],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any) PKG_CHECK_MODULES(MAPS, [fontutil]) AC_MSG_CHECKING([for ucs2any encoding data files]) MAPFILES_PATH=`$PKG_CONFIG --variable=mapdir fontutil` AC_SUBST(MAPFILES_PATH) AC_MSG_RESULT([${MAPFILES_PATH}]) ]) # XORG_FONT_FC_CONFDIR() # -------------------- # Minimum version: 1.2.0 # # Sets FC_CONFDIR to the fontconfig config directory # (which should be --with-confdir=... when building fontconfig) # found from: # --with-fc-confdir=... # pkg-config --variable=confdir fontconfig # ${sysconfdir}/fonts AC_DEFUN([XORG_FONT_FC_CONFDIR],[ dnl Ensure $PKG_CONFIG is set first AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_MSG_CHECKING([for fontconfig's configuration directory]) AC_ARG_WITH(fc-confdir, AS_HELP_STRING([--with-fc-confdir=DIR], [Path to fontconfig's configuration directory]), [FC_CONFDIR="$withval"]) # if --with-fc-confdir was not specified if test "x${FC_CONFDIR}" = "x"; then FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` fi # ...and if pkg-config didn't find confdir in fontconfig.pc... if test "x${FC_CONFDIR}" = "x"; then FC_CONFDIR="${sysconfdir}/fonts" fi AC_SUBST(FC_CONFDIR) AC_MSG_RESULT([${FC_CONFDIR}]) ]) # XORG_FONTROOTDIR() # -------------------- # Minimum version: 1.1.0 # # Sets FONTROOTDIR to the root directory for font files. Uses the first # found from: # --with-fontrootdir # pkg-config --variable=fontrootdir fontutil # ${datadir}/fonts/X11 AC_DEFUN([XORG_FONTROOTDIR],[ dnl Ensure $PKG_CONFIG is set first AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AC_MSG_CHECKING([for root directory for font files]) AC_ARG_WITH(fontrootdir, AS_HELP_STRING([--with-fontrootdir=DIR], [Path to root directory for font files]), [FONTROOTDIR="$withval"]) # if --with-fontrootdir not specified... if test "x${FONTROOTDIR}" = "x"; then FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil` fi # ...and if pkg-config didn't find fontdir in fontutil.pc... if test "x${FONTROOTDIR}" = "x"; then FONTROOTDIR="${datadir}/fonts/X11" fi AC_SUBST(FONTROOTDIR) AC_MSG_RESULT([${FONTROOTDIR}]) ]) # XORG_FONTSUBDIR(variable, flag, subdir) # --------------------------------------- # Minimum version: 1.1.0 # # Offer a --with- flag to control directory for font installation # Default is the specified of the font root directory. # Sets to the selected directory AC_DEFUN([XORG_FONTSUBDIR],[ AC_REQUIRE([XORG_FONTROOTDIR]) AC_MSG_CHECKING([for directory for $3 files]) AC_ARG_WITH($2, [AS_HELP_STRING([--with-$2=DIR], [Path to $3 files [FONTROOTDIR/$3]])], [$1="${withval}"], [$1='${FONTROOTDIR}/$3']) AC_SUBST($1) AC_MSG_RESULT([${$1}]) ]) # XORG_FONTSUBDIR # XORG_FONTDIR(subdir) # -------------------- # Minimum version: 1.1.0 # # Offer a --with-fontdir flag to control directory for font installation # Default is the specified subdir of the font root directory. # Sets FONTDIR to the selected directory AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) # pkg.m4 - Macros to locate and use pkg-config. -*- Autoconf -*- # serial 12 (pkg-config-0.29.2) dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.2]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION], [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. dnl dnl If pkg-config is not found or older than specified, it will result dnl in an empty PKG_CONFIG variable. To avoid widespread issues with dnl scripts not checking it, ACTION-IF-NOT-FOUND defaults to aborting. dnl You can specify [PKG_CONFIG=false] as an action instead, which would dnl result in pkg-config tests failing, but no bogus error messages. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then m4_default([$2], [AC_MSG_ERROR([pkg-config not found])]) fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurrence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR dnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------ dnl dnl Prepare a "--with-" configure option using the lowercase dnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and dnl PKG_CHECK_MODULES in a single macro. AC_DEFUN([PKG_WITH_MODULES], [ m4_pushdef([with_arg], m4_tolower([$1])) m4_pushdef([description], [m4_default([$5], [build with ]with_arg[ support])]) m4_pushdef([def_arg], [m4_default([$6], [auto])]) m4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) m4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) m4_case(def_arg, [yes],[m4_pushdef([with_without], [--without-]with_arg)], [m4_pushdef([with_without],[--with-]with_arg)]) AC_ARG_WITH(with_arg, AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, [AS_TR_SH([with_]with_arg)=def_arg]) AS_CASE([$AS_TR_SH([with_]with_arg)], [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], [auto],[PKG_CHECK_MODULES([$1],[$2], [m4_n([def_action_if_found]) $3], [m4_n([def_action_if_not_found]) $4])]) m4_popdef([with_arg]) m4_popdef([description]) m4_popdef([def_arg]) ])dnl PKG_WITH_MODULES dnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ----------------------------------------------- dnl dnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES dnl check._[VARIABLE-PREFIX] is exported as make variable. AC_DEFUN([PKG_HAVE_WITH_MODULES], [ PKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) AM_CONDITIONAL([HAVE_][$1], [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) ])dnl PKG_HAVE_WITH_MODULES dnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, dnl [DESCRIPTION], [DEFAULT]) dnl ------------------------------------------------------ dnl dnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after dnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make dnl and preprocessor variable. AC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], [ PKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2023, Oracle and/or its affiliates. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. # XORG_MACROS_VERSION(required-version) # ------------------------------------- # Minimum version: 1.1.0 # # If you're using a macro added in Version 1.1 or newer, include this in # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # # To ensure that this macro is defined, also add: # m4_ifndef([XORG_MACROS_VERSION], # [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ m4_define([vers_have], [1.20.1]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) m4_if(m4_version_compare(vers_have, [$1]), -1, [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) m4_undefine([vers_have]) m4_undefine([maj_have]) m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() # ------------------ # Minimum version: 1.0.0 # # Find cpp program and necessary flags for use in pre-processing text files # such as man pages and config files AC_DEFUN([XORG_PROG_RAWCPP],[ AC_REQUIRE([AC_PROG_CPP]) AC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) # Check for flag to avoid builtin definitions - assumes unix is predefined, # which is not the best choice for supporting other OS'es, but covers most # of the ones we need for now. AC_MSG_CHECKING([if $RAWCPP requires -undef]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef AC_MSG_RESULT([yes]) # under Cygwin unix is still defined even with -undef elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS="-undef -ansi" AC_MSG_RESULT([yes, with -ansi]) else AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_MSG_CHECKING([if $RAWCPP requires -traditional]) AC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then AC_MSG_RESULT([no]) else if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve "'` -eq 1 ; then TRADITIONALCPPFLAGS="-traditional" RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" AC_MSG_RESULT([yes]) else AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) fi fi rm -f conftest.$ac_ext AC_SUBST(RAWCPPFLAGS) AC_SUBST(TRADITIONALCPPFLAGS) ]) # XORG_PROG_RAWCPP # XORG_MANPAGE_SECTIONS() # ----------------------- # Minimum version: 1.0.0 # # Determine which sections man pages go in for the different man page types # on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. # Not sure if there's any better way than just hardcoding by OS name. # Override default settings by setting environment variables # Added MAN_SUBSTS in version 1.8 # Added AC_PROG_SED in version 1.8 AC_DEFUN([XORG_MANPAGE_SECTIONS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_SED]) case $host_os in solaris*) # Solaris 2.0 - 11.3 use SysV man page section numbers, so we # check for a man page file found in later versions that use # traditional section numbers instead AC_CHECK_FILE([/usr/share/man/man7/attributes.7], [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) ;; *) SYSV_MAN_SECTIONS=false ;; esac if test x$APP_MAN_SUFFIX = x ; then APP_MAN_SUFFIX=1 fi if test x$APP_MAN_DIR = x ; then APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' fi if test x$LIB_MAN_SUFFIX = x ; then LIB_MAN_SUFFIX=3 fi if test x$LIB_MAN_DIR = x ; then LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' fi if test x$FILE_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) FILE_MAN_SUFFIX=4 ;; *) FILE_MAN_SUFFIX=5 ;; esac fi if test x$FILE_MAN_DIR = x ; then FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' fi if test x$MISC_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) MISC_MAN_SUFFIX=5 ;; *) MISC_MAN_SUFFIX=7 ;; esac fi if test x$MISC_MAN_DIR = x ; then MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' fi if test x$DRIVER_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) DRIVER_MAN_SUFFIX=7 ;; *) DRIVER_MAN_SUFFIX=4 ;; esac fi if test x$DRIVER_MAN_DIR = x ; then DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' fi if test x$ADMIN_MAN_SUFFIX = x ; then case $SYSV_MAN_SECTIONS in true) ADMIN_MAN_SUFFIX=1m ;; *) ADMIN_MAN_SUFFIX=8 ;; esac fi if test x$ADMIN_MAN_DIR = x ; then ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' fi AC_SUBST([APP_MAN_SUFFIX]) AC_SUBST([LIB_MAN_SUFFIX]) AC_SUBST([FILE_MAN_SUFFIX]) AC_SUBST([MISC_MAN_SUFFIX]) AC_SUBST([DRIVER_MAN_SUFFIX]) AC_SUBST([ADMIN_MAN_SUFFIX]) AC_SUBST([APP_MAN_DIR]) AC_SUBST([LIB_MAN_DIR]) AC_SUBST([FILE_MAN_DIR]) AC_SUBST([MISC_MAN_DIR]) AC_SUBST([DRIVER_MAN_DIR]) AC_SUBST([ADMIN_MAN_DIR]) XORG_MAN_PAGE="X Version 11" AC_SUBST([XORG_MAN_PAGE]) MAN_SUBSTS="\ -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" AC_SUBST([MAN_SUBSTS]) ]) # XORG_MANPAGE_SECTIONS # XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) # ------------------------ # Minimum version: 1.7.0 # # Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent # provided by xorg-sgml-doctools, if installed. AC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ AC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) XORG_SGML_PATH= PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], [m4_ifval([$1],[:], [if test x"$cross_compiling" != x"yes" ; then AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], [XORG_SGML_PATH=$prefix/share/sgml]) fi]) ]) # Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing # the path and the name of the doc stylesheet if test "x$XORG_SGML_PATH" != "x" ; then AC_MSG_RESULT([$XORG_SGML_PATH]) STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl else AC_MSG_RESULT([no]) fi AC_SUBST(XORG_SGML_PATH) AC_SUBST(STYLESHEET_SRCDIR) AC_SUBST(XSL_STYLESHEET) AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) ]) # XORG_CHECK_SGML_DOCTOOLS # XORG_CHECK_LINUXDOC # ------------------- # Minimum version: 1.0.0 # # Defines the variable MAKE_TEXT if the necessary tools and # files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) AC_REQUIRE([XORG_WITH_PS2PDF]) AC_PATH_PROG(LINUXDOC, linuxdoc) AC_MSG_CHECKING([whether to build documentation]) if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then BUILDDOC=yes else BUILDDOC=no fi AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) AC_MSG_RESULT([$BUILDDOC]) AC_MSG_CHECKING([whether to build pdf documentation]) if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes else BUILDPDFDOC=no fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" MAKE_PDF="$PS2PDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_LINUXDOC # XORG_CHECK_DOCBOOK # ------------------- # Minimum version: 1.0.0 # # Checks for the ability to build output formats from SGML DocBook source. # For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ AC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) BUILDTXTDOC=no BUILDPDFDOC=no BUILDPSDOC=no BUILDHTMLDOC=no AC_PATH_PROG(DOCBOOKPS, docbook2ps) AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) AC_PATH_PROG(DOCBOOKHTML, docbook2html) AC_PATH_PROG(DOCBOOKTXT, docbook2txt) AC_MSG_CHECKING([whether to build text documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && test x$BUILD_TXTDOC != xno; then BUILDTXTDOC=yes fi AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) AC_MSG_RESULT([$BUILDTXTDOC]) AC_MSG_CHECKING([whether to build PDF documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && test x$BUILD_PDFDOC != xno; then BUILDPDFDOC=yes fi AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) AC_MSG_RESULT([$BUILDPDFDOC]) AC_MSG_CHECKING([whether to build PostScript documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && test x$BUILD_PSDOC != xno; then BUILDPSDOC=yes fi AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) AC_MSG_RESULT([$BUILDPSDOC]) AC_MSG_CHECKING([whether to build HTML documentation]) if test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && test x$BUILD_HTMLDOC != xno; then BUILDHTMLDOC=yes fi AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) AC_MSG_RESULT([$BUILDHTMLDOC]) MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" AC_SUBST(MAKE_TEXT) AC_SUBST(MAKE_PS) AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK # XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-xmlto option, it allows maximum flexibility in making decisions # as whether or not to use the xmlto package. When DEFAULT is not specified, # --with-xmlto assumes 'auto'. # # Interface to module: # HAVE_XMLTO: used in makefiles to conditionally generate documentation # XMLTO: returns the path of the xmlto program found # returns the path set by the user in the environment # --with-xmlto: 'yes' user instructs the module to use xmlto # 'no' user instructs the module not to use xmlto # # Added in version 1.10.0 # HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation # xmlto for text output requires either lynx, links, or w3m browsers # # If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XMLTO],[ AC_ARG_VAR([XMLTO], [Path to xmlto command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xmlto, AS_HELP_STRING([--with-xmlto], [Use xmlto to regenerate documentation (default: ]_defopt[)]), [use_xmlto=$withval], [use_xmlto=]_defopt) m4_undefine([_defopt]) if test "x$use_xmlto" = x"auto"; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) have_xmlto=no else have_xmlto=yes fi elif test "x$use_xmlto" = x"yes" ; then AC_PATH_PROG([XMLTO], [xmlto]) if test "x$XMLTO" = "x"; then AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) fi have_xmlto=yes elif test "x$use_xmlto" = x"no" ; then if test "x$XMLTO" != "x"; then AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) fi have_xmlto=no else AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) fi # Test for a minimum version of xmlto, if provided. m4_ifval([$1], [if test "$have_xmlto" = yes; then # scrape the xmlto version AC_MSG_CHECKING([the xmlto version]) xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$xmlto_version]) AS_VERSION_COMPARE([$xmlto_version], [$1], [if test "x$use_xmlto" = xauto; then AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) have_xmlto=no else AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) fi]) fi]) # Test for the ability of xmlto to generate a text target # # NOTE: xmlto 0.0.27 or higher return a non-zero return code in the # following test for empty XML docbook files. # For compatibility reasons use the following empty XML docbook file and if # it fails try it again with a non-empty XML file. have_xmlto_text=no cat > conftest.xml << "EOF" EOF AS_IF([test "$have_xmlto" = yes], [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], [# Try it again with a non-empty XML file. cat > conftest.xml << "EOF" EOF AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], [have_xmlto_text=yes], [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) rm -f conftest.xml AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) ]) # XORG_WITH_XMLTO # XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) # -------------------------------------------- # Minimum version: 1.12.0 # Minimum version for optional DEFAULT argument: 1.12.0 # # XSLT (Extensible Stylesheet Language Transformations) is a declarative, # XML-based language used for the transformation of XML documents. # The xsltproc command line tool is for applying XSLT stylesheets to XML documents. # It is used under the cover by xmlto to generate html files from DocBook/XML. # The XSLT processor is often used as a standalone tool for transformations. # It should not be assumed that this tool is used only to work with documnetation. # When DEFAULT is not specified, --with-xsltproc assumes 'auto'. # # Interface to module: # HAVE_XSLTPROC: used in makefiles to conditionally generate documentation # XSLTPROC: returns the path of the xsltproc program found # returns the path set by the user in the environment # --with-xsltproc: 'yes' user instructs the module to use xsltproc # 'no' user instructs the module not to use xsltproc # have_xsltproc: returns yes if xsltproc found in PATH or no # # If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_XSLTPROC],[ AC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xsltproc, AS_HELP_STRING([--with-xsltproc], [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), [use_xsltproc=$withval], [use_xsltproc=]_defopt) m4_undefine([_defopt]) if test "x$use_xsltproc" = x"auto"; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) have_xsltproc=no else have_xsltproc=yes fi elif test "x$use_xsltproc" = x"yes" ; then AC_PATH_PROG([XSLTPROC], [xsltproc]) if test "x$XSLTPROC" = "x"; then AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) fi have_xsltproc=yes elif test "x$use_xsltproc" = x"no" ; then if test "x$XSLTPROC" != "x"; then AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) fi have_xsltproc=no else AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) ]) # XORG_WITH_XSLTPROC # XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.15.0 # # PERL (Practical Extraction and Report Language) is a language optimized for # scanning arbitrary text files, extracting information from those text files, # and printing reports based on that information. # # When DEFAULT is not specified, --with-perl assumes 'auto'. # # Interface to module: # HAVE_PERL: used in makefiles to conditionally scan text files # PERL: returns the path of the perl program found # returns the path set by the user in the environment # --with-perl: 'yes' user instructs the module to use perl # 'no' user instructs the module not to use perl # have_perl: returns yes if perl found in PATH or no # # If the user sets the value of PERL, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PERL],[ AC_ARG_VAR([PERL], [Path to perl command]) # Preserves the interface, should it be implemented later m4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(perl, AS_HELP_STRING([--with-perl], [Use perl for extracting information from files (default: ]_defopt[)]), [use_perl=$withval], [use_perl=]_defopt) m4_undefine([_defopt]) if test "x$use_perl" = x"auto"; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_WARN([perl not found - cannot extract information and report]) have_perl=no else have_perl=yes fi elif test "x$use_perl" = x"yes" ; then AC_PATH_PROG([PERL], [perl]) if test "x$PERL" = "x"; then AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) fi have_perl=yes elif test "x$use_perl" = x"no" ; then if test "x$PERL" != "x"; then AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) fi have_perl=no else AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) ]) # XORG_WITH_PERL # XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-asciidoc option, it allows maximum flexibility in making decisions # as whether or not to use the asciidoc package. When DEFAULT is not specified, # --with-asciidoc assumes 'auto'. # # Interface to module: # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation # ASCIIDOC: returns the path of the asciidoc program found # returns the path set by the user in the environment # --with-asciidoc: 'yes' user instructs the module to use asciidoc # 'no' user instructs the module not to use asciidoc # # If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_ASCIIDOC],[ AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(asciidoc, AS_HELP_STRING([--with-asciidoc], [Use asciidoc to regenerate documentation (default: ]_defopt[)]), [use_asciidoc=$withval], [use_asciidoc=]_defopt) m4_undefine([_defopt]) if test "x$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) have_asciidoc=no else have_asciidoc=yes fi elif test "x$use_asciidoc" = x"yes" ; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) if test "x$ASCIIDOC" = "x"; then AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) fi have_asciidoc=yes elif test "x$use_asciidoc" = x"no" ; then if test "x$ASCIIDOC" != "x"; then AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) fi have_asciidoc=no else AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_asciidoc" = yes; then # scrape the asciidoc version AC_MSG_CHECKING([the asciidoc version]) asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` AC_MSG_RESULT([$asciidoc_version]) AS_VERSION_COMPARE([$asciidoc_version], [$1], [if test "x$use_asciidoc" = xauto; then AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) have_asciidoc=no else AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) ]) # XORG_WITH_ASCIIDOC # XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) # ------------------------------------------- # Minimum version: 1.5.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional DOT checking: 1.18.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-doxygen option, it allows maximum flexibility in making decisions # as whether or not to use the doxygen package. When DEFAULT is not specified, # --with-doxygen assumes 'auto'. # # Interface to module: # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation # DOXYGEN: returns the path of the doxygen program found # returns the path set by the user in the environment # --with-doxygen: 'yes' user instructs the module to use doxygen # 'no' user instructs the module not to use doxygen # # If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_DOXYGEN],[ AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) AC_ARG_VAR([DOT], [Path to the dot graphics utility]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(doxygen, AS_HELP_STRING([--with-doxygen], [Use doxygen to regenerate documentation (default: ]_defopt[)]), [use_doxygen=$withval], [use_doxygen=]_defopt) m4_undefine([_defopt]) if test "x$use_doxygen" = x"auto"; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) have_doxygen=no else have_doxygen=yes fi elif test "x$use_doxygen" = x"yes" ; then AC_PATH_PROG([DOXYGEN], [doxygen]) if test "x$DOXYGEN" = "x"; then AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) fi have_doxygen=yes elif test "x$use_doxygen" = x"no" ; then if test "x$DOXYGEN" != "x"; then AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) fi have_doxygen=no else AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) fi m4_ifval([$1], [if test "$have_doxygen" = yes; then # scrape the doxygen version AC_MSG_CHECKING([the doxygen version]) doxygen_version=`$DOXYGEN --version 2>/dev/null` AC_MSG_RESULT([$doxygen_version]) AS_VERSION_COMPARE([$doxygen_version], [$1], [if test "x$use_doxygen" = xauto; then AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) have_doxygen=no else AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) fi]) fi]) dnl Check for DOT if we have doxygen. The caller decides if it is mandatory dnl HAVE_DOT is a variable that can be used in your doxygen.in config file: dnl HAVE_DOT = @HAVE_DOT@ HAVE_DOT=no if test "x$have_doxygen" = "xyes"; then AC_PATH_PROG([DOT], [dot]) if test "x$DOT" != "x"; then HAVE_DOT=yes fi fi AC_SUBST([HAVE_DOT]) AM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) ]) # XORG_WITH_DOXYGEN # XORG_WITH_GROFF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-groff option, it allows maximum flexibility in making decisions # as whether or not to use the groff package. When DEFAULT is not specified, # --with-groff assumes 'auto'. # # Interface to module: # HAVE_GROFF: used in makefiles to conditionally generate documentation # HAVE_GROFF_MM: the memorandum macros (-mm) package # HAVE_GROFF_MS: the -ms macros package # GROFF: returns the path of the groff program found # returns the path set by the user in the environment # --with-groff: 'yes' user instructs the module to use groff # 'no' user instructs the module not to use groff # # Added in version 1.9.0: # HAVE_GROFF_HTML: groff has dependencies to output HTML format: # pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. # psselect from the psutils package. # the ghostcript package. Refer to the grohtml man pages # # If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. # # OS and distros often splits groff in a basic and full package, the former # having the groff program and the later having devices, fonts and macros # Checking for the groff executable is not enough. # # If macros are missing, we cannot assume that groff is useless, so we don't # unset HAVE_GROFF or GROFF env variables. # HAVE_GROFF_?? can never be true while HAVE_GROFF is false. # AC_DEFUN([XORG_WITH_GROFF],[ AC_ARG_VAR([GROFF], [Path to groff command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(groff, AS_HELP_STRING([--with-groff], [Use groff to regenerate documentation (default: ]_defopt[)]), [use_groff=$withval], [use_groff=]_defopt) m4_undefine([_defopt]) if test "x$use_groff" = x"auto"; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_WARN([groff not found - documentation targets will be skipped]) have_groff=no else have_groff=yes fi elif test "x$use_groff" = x"yes" ; then AC_PATH_PROG([GROFF], [groff]) if test "x$GROFF" = "x"; then AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) fi have_groff=yes elif test "x$use_groff" = x"no" ; then if test "x$GROFF" != "x"; then AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) fi have_groff=no else AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) fi # We have groff, test for the presence of the macro packages if test "x$have_groff" = x"yes"; then AC_MSG_CHECKING([for ${GROFF} -ms macros]) if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then groff_ms_works=yes else groff_ms_works=no fi AC_MSG_RESULT([$groff_ms_works]) AC_MSG_CHECKING([for ${GROFF} -mm macros]) if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then groff_mm_works=yes else groff_mm_works=no fi AC_MSG_RESULT([$groff_mm_works]) fi # We have groff, test for HTML dependencies, one command per package if test "x$have_groff" = x"yes"; then AC_PATH_PROGS(GS_PATH, [gs gswin32c]) AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) AC_PATH_PROG(PSSELECT_PATH, [psselect]) if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then have_groff_html=yes else have_groff_html=no AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) fi fi # Set Automake conditionals for Makefiles AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF # XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) # --------------------------------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # Minimum version for optional MIN-VERSION argument: 1.15.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-fop option, it allows maximum flexibility in making decisions # as whether or not to use the fop package. When DEFAULT is not specified, # --with-fop assumes 'auto'. # # Interface to module: # HAVE_FOP: used in makefiles to conditionally generate documentation # FOP: returns the path of the fop program found # returns the path set by the user in the environment # --with-fop: 'yes' user instructs the module to use fop # 'no' user instructs the module not to use fop # # If the user sets the value of FOP, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], [Use fop to regenerate documentation (default: ]_defopt[)]), [use_fop=$withval], [use_fop=]_defopt) m4_undefine([_defopt]) if test "x$use_fop" = x"auto"; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_WARN([fop not found - documentation targets will be skipped]) have_fop=no else have_fop=yes fi elif test "x$use_fop" = x"yes" ; then AC_PATH_PROG([FOP], [fop]) if test "x$FOP" = "x"; then AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) fi have_fop=yes elif test "x$use_fop" = x"no" ; then if test "x$FOP" != "x"; then AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) fi have_fop=no else AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) fi # Test for a minimum version of fop, if provided. m4_ifval([$1], [if test "$have_fop" = yes; then # scrape the fop version AC_MSG_CHECKING([for fop minimum version]) fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` AC_MSG_RESULT([$fop_version]) AS_VERSION_COMPARE([$fop_version], [$1], [if test "x$use_fop" = xauto; then AC_MSG_WARN([fop version $fop_version found, but $1 needed]) have_fop=no else AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) fi]) fi]) AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP # XORG_WITH_M4([MIN-VERSION]) # --------------------------- # Minimum version: 1.19.0 # # This macro attempts to locate an m4 macro processor which supports # -I option and is only useful for modules relying on M4 in order to # expand macros in source code files. # # Interface to module: # M4: returns the path of the m4 program found # returns the path set by the user in the environment # AC_DEFUN([XORG_WITH_M4], [ AC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], [AC_MSG_ERROR([could not find m4 that supports -I option])], [$PATH:/usr/gnu/bin])]) AC_SUBST([M4], [$ac_cv_path_M4]) ]) # XORG_WITH_M4 # XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 # Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-ps2pdf option, it allows maximum flexibility in making decisions # as whether or not to use the ps2pdf package. When DEFAULT is not specified, # --with-ps2pdf assumes 'auto'. # # Interface to module: # HAVE_PS2PDF: used in makefiles to conditionally generate documentation # PS2PDF: returns the path of the ps2pdf program found # returns the path set by the user in the environment # --with-ps2pdf: 'yes' user instructs the module to use ps2pdf # 'no' user instructs the module not to use ps2pdf # # If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. # AC_DEFUN([XORG_WITH_PS2PDF],[ AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(ps2pdf, AS_HELP_STRING([--with-ps2pdf], [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) m4_undefine([_defopt]) if test "x$use_ps2pdf" = x"auto"; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) have_ps2pdf=no else have_ps2pdf=yes fi elif test "x$use_ps2pdf" = x"yes" ; then AC_PATH_PROG([PS2PDF], [ps2pdf]) if test "x$PS2PDF" = "x"; then AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) fi have_ps2pdf=yes elif test "x$use_ps2pdf" = x"no" ; then if test "x$PS2PDF" != "x"; then AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) fi have_ps2pdf=no else AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) fi AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) ]) # XORG_WITH_PS2PDF # XORG_ENABLE_DOCS (enable_docs=yes) # ---------------- # Minimum version: 1.6.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a builder to skip all # documentation targets except traditional man pages. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DOCS: used in makefiles to conditionally generate documentation # --enable-docs: 'yes' user instructs the module to generate docs # 'no' user instructs the module not to generate docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ m4_define([docs_default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], [Enable building the documentation (default: ]docs_default[)]), [build_docs=$enableval], [build_docs=]docs_default) m4_undefine([docs_default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) ]) # XORG_ENABLE_DOCS # XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all developer documentation. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs # --enable-devel-docs: 'yes' user instructs the module to generate developer docs # 'no' user instructs the module not to generate developer docs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ m4_define([devel_default], m4_default([$1], [yes])) AC_ARG_ENABLE(devel-docs, AS_HELP_STRING([--enable-devel-docs], [Enable building the developer documentation (default: ]devel_default[)]), [build_devel_docs=$enableval], [build_devel_docs=]devel_default) m4_undefine([devel_default]) AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) AC_MSG_CHECKING([whether to build developer documentation]) AC_MSG_RESULT([$build_devel_docs]) ]) # XORG_ENABLE_DEVEL_DOCS # XORG_ENABLE_SPECS (enable_specs=yes) # ---------------- # Minimum version: 1.6.0 # # This macro enables a builder to skip all functional specification targets. # Combined with the specific tool checking macros XORG_WITH_*, it provides # maximum flexibility in controlling documentation building. # Refer to: # XORG_WITH_XMLTO --with-xmlto # XORG_WITH_ASCIIDOC --with-asciidoc # XORG_WITH_DOXYGEN --with-doxygen # XORG_WITH_FOP --with-fop # XORG_WITH_GROFF --with-groff # XORG_WITH_PS2PDF --with-ps2pdf # # Interface to module: # ENABLE_SPECS: used in makefiles to conditionally generate specs # --enable-specs: 'yes' user instructs the module to generate specs # 'no' user instructs the module not to generate specs # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_SPECS],[ m4_define([spec_default], m4_default([$1], [yes])) AC_ARG_ENABLE(specs, AS_HELP_STRING([--enable-specs], [Enable building the specs (default: ]spec_default[)]), [build_specs=$enableval], [build_specs=]spec_default) m4_undefine([spec_default]) AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) ]) # XORG_ENABLE_SPECS # XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) # ---------------------------------------------- # Minimum version: 1.13.0 # # This macro enables a builder to enable/disable unit testing # It makes no assumption about the test cases implementation # Test cases may or may not use Automake "Support for test suites" # They may or may not use the software utility library GLib # # When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL # ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. # The variable enable_unit_tests is used by other macros in this file. # # Interface to module: # ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests # enable_unit_tests: used in configure.ac for additional configuration # --enable-unit-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ AC_BEFORE([$0], [XORG_WITH_GLIB]) AC_BEFORE([$0], [XORG_LD_WRAP]) AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], [Enable building unit test cases (default: ]_defopt[)]), [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_unit_tests]) ]) # XORG_ENABLE_UNIT_TESTS # XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) # ------------------------------------------------------ # Minimum version: 1.17.0 # # This macro enables a builder to enable/disable integration testing # It makes no assumption about the test cases' implementation # Test cases may or may not use Automake "Support for test suites" # # Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support # usually requires less dependencies and may be built and run under less # stringent environments than integration tests. # # Interface to module: # ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests # enable_integration_tests: used in configure.ac for additional configuration # --enable-integration-tests: 'yes' user instructs the module to build tests # 'no' user instructs the module not to build tests # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ AC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], [Enable building integration test cases (default: ]_defopt[)]), [enable_integration_tests=$enableval], [enable_integration_tests=]_defopt) m4_undefine([_defopt]) AM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], [test "x$enable_integration_tests" != xno]) AC_MSG_CHECKING([whether to build unit test cases]) AC_MSG_RESULT([$enable_integration_tests]) ]) # XORG_ENABLE_INTEGRATION_TESTS # XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) # ---------------------------------------- # Minimum version: 1.13.0 # # GLib is a library which provides advanced data structures and functions. # This macro enables a module to test for the presence of Glib. # # When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit # test support usually requires less dependencies and may be built and run under # less stringent environments than integration tests. # # Interface to module: # HAVE_GLIB: used in makefiles to conditionally build targets # with_glib: used in configure.ac to know if GLib has been found # --with-glib: 'yes' user instructs the module to use glib # 'no' user instructs the module not to use glib # AC_DEFUN([XORG_WITH_GLIB],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], [Use GLib library for unit testing (default: ]_defopt[)]), [with_glib=$withval], [with_glib=]_defopt) m4_undefine([_defopt]) have_glib=no # Do not probe GLib if user explicitly disabled unit testing if test "x$enable_unit_tests" != x"no"; then # Do not probe GLib if user explicitly disabled it if test "x$with_glib" != x"no"; then m4_ifval( [$1], [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] ) fi fi # Not having GLib when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Having unit testing disabled when GLib has been explicitly requested is an error if test "x$enable_unit_tests" = x"no"; then if test "x$with_glib" = x"yes"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) fi fi # Not having GLib when it has been explicitly requested is an error if test "x$with_glib" = x"yes"; then if test "x$have_glib" = x"no"; then AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) fi fi AM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) ]) # XORG_WITH_GLIB # XORG_LD_WRAP([required|optional]) # --------------------------------- # Minimum version: 1.13.0 # # Check if linker supports -wrap, passed via compiler flags # # When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. # Otherwise the value of $enable_unit_tests is blank. # # Argument added in 1.16.0 - default is "required", to match existing behavior # of returning an error if enable_unit_tests is yes, and ld -wrap is not # available, an argument of "optional" allows use when some unit tests require # ld -wrap and others do not. # AC_DEFUN([XORG_LD_WRAP],[ XORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], [AC_LANG_PROGRAM([#include void __wrap_exit(int status) { return; }], [exit(0);])]) # Not having ld wrap when unit testing has been explicitly requested is an error if test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then if test "x$have_ld_wrap" = x"no"; then AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) fi fi AM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) # ]) # XORG_LD_WRAP # XORG_CHECK_LINKER_FLAGS # ----------------------- # SYNOPSIS # # XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) # # DESCRIPTION # # Check whether the given linker FLAGS work with the current language's # linker, or whether they give an error. # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # PROGRAM-SOURCE is the program source to link with, if needed # # NOTE: Based on AX_CHECK_COMPILER_FLAGS. # # LICENSE # # Copyright (c) 2009 Mike Frysinger # Copyright (c) 2009 Steven G. Johnson # Copyright (c) 2009 Matteo Frigo # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well.# AC_DEFUN([XORG_CHECK_LINKER_FLAGS], [AC_MSG_CHECKING([whether the linker accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$LDFLAGS LDFLAGS="$1" AC_LINK_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) LDFLAGS=$ax_save_FLAGS]) eval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) AC_MSG_RESULT($xorg_check_linker_flags) if test "x$xorg_check_linker_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ]) # XORG_CHECK_LINKER_FLAGS # XORG_MEMORY_CHECK_FLAGS # ----------------------- # Minimum version: 1.16.0 # # This macro attempts to find appropriate memory checking functionality # for various platforms which unit testing code may use to catch various # forms of memory allocation and access errors in testing. # # Interface to module: # XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging # Usually added to TESTS_ENVIRONMENT in Makefile.am # # If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. # AC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], [Environment variables to enable memory checking in tests]) # Check for different types of support on different platforms case $host_os in solaris*) AC_CHECK_LIB([umem], [umem_alloc], [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) ;; *-gnu*) # GNU libc - Value is used as a single byte bit pattern, # both directly and inverted, so should not be 0 or 255. malloc_debug_env='MALLOC_PERTURB_=15' ;; darwin*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' ;; *bsd*) malloc_debug_env='MallocPreScribble=1 MallocScribble=1' ;; esac # User supplied flags override default flags if test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" fi AC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) ]) # XORG_WITH_LINT # XORG_CHECK_MALLOC_ZERO # ---------------------- # Minimum version: 1.0.0 # # Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if # malloc(0) returns NULL. Packages should add one of these cflags to # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) AC_MSG_CHECKING([whether malloc(0) returns NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then AC_CACHE_VAL([xorg_cv_malloc0_returns_null], [AC_RUN_IFELSE([AC_LANG_PROGRAM([ #include ],[ char *m0, *r0, *c0, *p; m0 = malloc(0); p = malloc(10); r0 = realloc(p,0); c0 = calloc(0,10); exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); ])], [xorg_cv_malloc0_returns_null=yes], [xorg_cv_malloc0_returns_null=no])]) MALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null fi AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" else MALLOC_ZERO_CFLAGS="" XMALLOC_ZERO_CFLAGS="" XTMALLOC_ZERO_CFLAGS="" fi AC_SUBST([MALLOC_ZERO_CFLAGS]) AC_SUBST([XMALLOC_ZERO_CFLAGS]) AC_SUBST([XTMALLOC_ZERO_CFLAGS]) ]) # XORG_CHECK_MALLOC_ZERO # XORG_WITH_LINT() # ---------------- # Minimum version: 1.1.0 # # This macro enables the use of a tool that flags some suspicious and # non-portable constructs (likely to be bugs) in C language source code. # It will attempt to locate the tool and use appropriate options. # There are various lint type tools on different platforms. # # Interface to module: # LINT: returns the path to the tool found on the platform # or the value set to LINT on the configure cmd line # also an Automake conditional # LINT_FLAGS: an Automake variable with appropriate flags # # --with-lint: 'yes' user instructs the module to use lint # 'no' user instructs the module not to use lint (default) # # If the user sets the value of LINT, AC_PATH_PROG skips testing the path. # If the user sets the value of LINT_FLAGS, they are used verbatim. # AC_DEFUN([XORG_WITH_LINT],[ AC_ARG_VAR([LINT], [Path to a lint-style command]) AC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) # Obtain platform specific info like program name and options # The lint program on FreeBSD and NetBSD is different from the one on Solaris case $host_os in *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) lint_name=splint lint_options="-badflag" ;; *freebsd* | *netbsd*) lint_name=lint lint_options="-u -b" ;; *solaris*) lint_name=lint lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" ;; esac # Test for the presence of the program (either guessed by the code or spelled out by the user) if test "x$use_lint" = x"yes" ; then AC_PATH_PROG([LINT], [$lint_name]) if test "x$LINT" = "x"; then AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) fi elif test "x$use_lint" = x"no" ; then if test "x$LINT" != "x"; then AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) fi else AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) fi # User supplied flags override default flags if test "x$LINT_FLAGS" != "x"; then lint_options=$LINT_FLAGS fi AC_SUBST([LINT_FLAGS],[$lint_options]) AM_CONDITIONAL(LINT, [test "x$LINT" != x]) ]) # XORG_WITH_LINT # XORG_LINT_LIBRARY(LIBNAME) # -------------------------- # Minimum version: 1.1.0 # # Sets up flags for building lint libraries for checking programs that call # functions in the library. # # Interface to module: # LINTLIB - Automake variable with the name of lint library file to make # MAKE_LINT_LIB - Automake conditional # # --enable-lint-library: - 'yes' user instructs the module to created a lint library # - 'no' user instructs the module not to create a lint library (default) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" = x"yes" ; then LINTLIB=llib-l$1.ln if test "x$LINT" = "x"; then AC_MSG_ERROR([Cannot make lint library without --with-lint]) fi elif test "x$make_lint_lib" != x"no" ; then AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) fi AC_SUBST(LINTLIB) AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY # XORG_COMPILER_BRAND # ------------------- # Minimum version: 1.14.0 # # Checks for various brands of compilers and sets flags as appropriate: # GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" # GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" # clang compiler - sets CLANGCC to "yes" # Intel compiler - sets INTELCC to "yes" # Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" # AC_DEFUN([XORG_COMPILER_BRAND], [ AC_LANG_CASE( [C], [ dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC dnl and complains that AC_PROG_CC_C99 is obsolete m4_version_prereq([2.70], [AC_REQUIRE([AC_PROG_CC])], [AC_REQUIRE([AC_PROG_CC_C99])]) ], [C++], [ AC_REQUIRE([AC_PROG_CXX]) ] ) AC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) ]) # XORG_COMPILER_BRAND # XORG_TESTSET_CFLAG(, , [, ...]) # --------------- # Minimum version: 1.16.0 # # Test if the compiler works when passed the given flag as a command line argument. # If it succeeds, the flag is appended to the given variable. If not, it tries the # next flag in the list until there are no more options. # # Note that this does not guarantee that the compiler supports the flag as some # compilers will simply ignore arguments that they do not understand, but we do # attempt to weed out false positives by using -Werror=unknown-warning-option and # -Werror=unused-command-line-argument # AC_DEFUN([XORG_TESTSET_CFLAG], [ m4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) m4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) AC_LANG_COMPILER_REQUIRE AC_LANG_CASE( [C], [ dnl autoconf-2.70 folded AC_PROG_CC_C99 into AC_PROG_CC dnl and complains that AC_PROG_CC_C99 is obsolete m4_version_prereq([2.70], [AC_REQUIRE([AC_PROG_CC])], [AC_REQUIRE([AC_PROG_CC_C99])]) define([PREFIX], [C]) define([CACHE_PREFIX], [cc]) define([COMPILER], [$CC]) ], [C++], [ define([PREFIX], [CXX]) define([CACHE_PREFIX], [cxx]) define([COMPILER], [$CXX]) ] ) [xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi if test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" fi found="no" m4_foreach([flag], m4_cdr($@), [ if test $found = "no" ; then if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" fi if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" fi PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], [eval $cacheid=yes], [eval $cacheid=no])]) PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" eval supported=\$$cacheid AC_MSG_RESULT([$supported]) if test "$supported" = "yes" ; then $1="$$1 ]flag[" found="yes" fi fi ]) ]) # XORG_TESTSET_CFLAG # XORG_COMPILER_FLAGS # --------------- # Minimum version: 1.16.0 # # Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line # arguments supported by the selected compiler which do NOT alter the generated # code. These arguments will cause the compiler to print various warnings # during compilation AND turn a conservative set of warnings into errors. # # The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in # future versions of util-macros as options are added to new compilers. # AC_DEFUN([XORG_COMPILER_FLAGS], [ AC_REQUIRE([XORG_COMPILER_BRAND]) AC_ARG_ENABLE(selective-werror, AS_HELP_STRING([--disable-selective-werror], [Turn off selective compiler errors. (default: enabled)]), [SELECTIVE_WERROR=$enableval], [SELECTIVE_WERROR=yes]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) # -v is too short to test reliably with XORG_TESTSET_CFLAG if test "x$SUNCC" = "xyes"; then [BASE_]PREFIX[FLAGS]="-v" else [BASE_]PREFIX[FLAGS]="" fi # This chunk of warnings were those that existed in the legacy CWARNFLAGS XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) AC_LANG_CASE( [C], [ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) ] ) # This chunk adds additional warnings that could catch undesired effects. XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) # These are currently disabled because they are noisy. They will be enabled # in the future once the codebase is sufficiently modernized to silence # them. For now, I don't want them to drown out the other warnings. # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) # XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) # Turn some warnings into errors, so we don't accidentally get successful builds # when there are problems that should be fixed. if test "x$SELECTIVE_WERROR" = "xyes" ; then XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION else AC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) fi AC_SUBST([BASE_]PREFIX[FLAGS]) ]) # XORG_COMPILER_FLAGS # XORG_CWARNFLAGS # --------------- # Minimum version: 1.2.0 # Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) # # Defines CWARNFLAGS to enable C compiler warnings. # # This function is deprecated because it defines -fno-strict-aliasing # which alters the code generated by the compiler. If -fno-strict-aliasing # is needed, then it should be added explicitly in the module when # it is updated to use BASE_CFLAGS. # AC_DEFUN([XORG_CWARNFLAGS], [ AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_REQUIRE([XORG_COMPILER_BRAND]) AC_LANG_CASE( [C], [ CWARNFLAGS="$BASE_CFLAGS" if test "x$GCC" = xyes ; then CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" fi AC_SUBST(CWARNFLAGS) ] ) ]) # XORG_CWARNFLAGS # XORG_STRICT_OPTION # ----------------------- # Minimum version: 1.3.0 # # Add configure option to enable strict compilation flags, such as treating # warnings as fatal errors. # If --enable-strict-compilation is passed to configure, adds strict flags to # $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. # # Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or # when strict compilation is unconditionally desired. AC_DEFUN([XORG_STRICT_OPTION], [ AC_REQUIRE([XORG_CWARNFLAGS]) AC_REQUIRE([XORG_COMPILER_FLAGS]) AC_ARG_ENABLE(strict-compilation, AS_HELP_STRING([--enable-strict-compilation], [Enable all warnings from compiler and make them errors (default: disabled)]), [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) AC_LANG_CASE( [C], [ define([PREFIX], [C]) ], [C++], [ define([PREFIX], [CXX]) ] ) [STRICT_]PREFIX[FLAGS]="" XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) # Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not # activate it with -Werror, so we add it here explicitly. XORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) if test "x$STRICT_COMPILE" = "xyes"; then [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) fi AC_SUBST([STRICT_]PREFIX[FLAGS]) AC_SUBST([BASE_]PREFIX[FLAGS]) AC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) ]) # XORG_STRICT_OPTION # XORG_DEFAULT_NOCODE_OPTIONS # --------------------------- # Minimum version: 1.20.0 # # Defines default options for X.Org modules which don't compile code, # such as fonts, bitmaps, cursors, and docs. # AC_DEFUN([XORG_DEFAULT_NOCODE_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_RELEASE_VERSION XORG_CHANGELOG XORG_INSTALL XORG_MANPAGE_SECTIONS m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) ]) # XORG_DEFAULT_NOCODE_OPTIONS # XORG_DEFAULT_OPTIONS # -------------------- # Minimum version: 1.3.0 # # Defines default options for X.Org modules which compile code. # AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_COMPILER_FLAGS XORG_CWARNFLAGS XORG_STRICT_OPTION XORG_DEFAULT_NOCODE_OPTIONS ]) # XORG_DEFAULT_OPTIONS # XORG_INSTALL() # ---------------- # Minimum version: 1.4.0 # # Defines the variable INSTALL_CMD as the command to copy # INSTALL from $prefix/share/util-macros. # AC_DEFUN([XORG_INSTALL], [ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) macros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` INSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ mv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ || (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ touch \$(top_srcdir)/INSTALL; \ echo 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" AC_SUBST([INSTALL_CMD]) ]) # XORG_INSTALL dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_RELEASE_VERSION # -------------------- # Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. AC_DEFUN([XORG_RELEASE_VERSION],[ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | cut -d . -f 1`], [Major version of this package]) PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` if test "x$PVM" = "x"; then PVM="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], [$PVM], [Minor version of this package]) PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], [$PVP], [Patch version of this package]) ]) # XORG_CHANGELOG() # ---------------- # Minimum version: 1.2.0 # # Defines the variable CHANGELOG_CMD as the command to generate # ChangeLog from git. # # AC_DEFUN([XORG_CHANGELOG], [ CHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ touch \$(top_srcdir)/ChangeLog; \ echo 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" AC_SUBST([CHANGELOG_CMD]) ]) # XORG_CHANGELOG dnl dnl Copyright (c) 2005, Oracle and/or its affiliates. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), dnl to deal in the Software without restriction, including without limitation dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, dnl and/or sell copies of the Software, and to permit persons to whom the dnl Software is furnished to do so, subject to the following conditions: dnl dnl The above copyright notice and this permission notice (including the next dnl paragraph) shall be included in all copies or substantial portions of the dnl Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER dnl DEALINGS IN THE SOFTWARE. dnl # XTRANS_TCP_FLAGS() # ------------------ # Find needed libraries for TCP sockets, and check for IPv6 support AC_DEFUN([XTRANS_TCP_FLAGS],[ # SVR4 hides these in libraries other than libc AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(gethostbyname, [nsl]) if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then AC_CHECK_LIB([ws2_32],[main]) fi # Needs to come after above checks for libsocket & libnsl for SVR4 systems AC_ARG_ENABLE(ipv6, AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), [IPV6CONN=$enableval], [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) AC_MSG_CHECKING([if IPv6 support should be built]) if test "$IPV6CONN" = "yes"; then AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) fi AC_MSG_RESULT($IPV6CONN) # 4.3BSD-Reno added a new member to struct sockaddr_in AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE([BSD44SOCKETS],1, [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ #include #include #include ]) # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. AC_CHECK_TYPES([socklen_t], [], [], [ AC_INCLUDES_DEFAULT #include ]) # XPG4v2/UNIX95 added msg_control - check to see if we need to define # _XOPEN_SOURCE to get it (such as on Solaris) AC_CHECK_MEMBER([struct msghdr.msg_control], [], [], [ AC_INCLUDES_DEFAULT #include ]) # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then unset ac_cv_member_struct_msghdr_msg_control AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600]) AC_CHECK_MEMBER([struct msghdr.msg_control], [AC_DEFINE([_XOPEN_SOURCE], [600], [Defined if needed to expose struct msghdr.msg_control]) ], [], [ #define _XOPEN_SOURCE 600 AC_INCLUDES_DEFAULT #include ]) fi # If that didn't work, fall back to XPG5/UNIX98 with C89 if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then unset ac_cv_member_struct_msghdr_msg_control AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500]) AC_CHECK_MEMBER([struct msghdr.msg_control], [AC_DEFINE([_XOPEN_SOURCE], [500], [Defined if needed to expose struct msghdr.msg_control]) ], [], [ #define _XOPEN_SOURCE 500 AC_INCLUDES_DEFAULT #include ]) fi ]) # XTRANS_TCP_FLAGS # XTRANS_CONNECTION_FLAGS() # ------------------------- # Standard checks for which Xtrans transports to use by the Xorg packages # that use Xtrans functions AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ AC_REQUIRE([AC_CANONICAL_HOST]) [case $host_os in mingw*) unixdef="no" ;; *) unixdef="yes" ;; esac] AC_ARG_ENABLE(unix-transport, AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) if test "$UNIXCONN" = "yes"; then AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) fi AC_MSG_RESULT($UNIXCONN) AC_ARG_ENABLE(tcp-transport, AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), [TCPCONN=$enableval], [TCPCONN=yes]) AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) AC_MSG_RESULT($TCPCONN) if test "$TCPCONN" = "yes"; then AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) XTRANS_TCP_FLAGS fi [case $host_os in solaris*) localdef="yes" ;; *) localdef="no" ;; esac] AC_ARG_ENABLE(local-transport, AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), [LOCALCONN=$enableval], [LOCALCONN=$localdef]) AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) AC_MSG_RESULT($LOCALCONN) if test "$LOCALCONN" = "yes"; then AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) fi # Other functions Xtrans may need AC_CHECK_FUNCS([strcasecmp strlcpy]) ]) # XTRANS_CONNECTION_FLAGS # XTRANS_SECURE_RPC_FLAGS() # ------------------------- # Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS # so that any necessary networking libraries are already found AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], [AC_REQUIRE([XTRANS_TCP_FLAGS]) AC_ARG_ENABLE(secure-rpc, AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), [SECURE_RPC=$enableval], [SECURE_RPC="try"]) if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then FOUND_SECURE_RPC="no" AC_CHECK_FUNCS([authdes_seccreate authdes_create], [FOUND_SECURE_RPC="yes"]) if test "x$FOUND_SECURE_RPC" = "xno" ; then if test "x$SECURE_RPC" = "xyes" ; then AC_MSG_ERROR([Secure RPC requested, but required functions not found]) fi SECURE_RPC="no" else dnl FreeBSD keeps getsecretkey in librpcsvc AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) SECURE_RPC="yes" fi fi AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) if test "x$SECURE_RPC" = "xyes" ; then AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) fi AC_MSG_RESULT($SECURE_RPC) ]) # XTRANS_SECURE_RPC_FLAGS # Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_AS # ---------- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code. AC_REQUIRE([AC_PROG_CC]) test "${CCAS+set}" = set || CCAS=$CC test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl m4_ifdef([_$0_ALREADY_INIT], [m4_fatal([$0 expanded multiple times ]m4_defn([_$0_ALREADY_INIT]))], [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) # Variables for tags utilities; see am/tags.am if test -z "$CTAGS"; then CTAGS=ctags fi AC_SUBST([CTAGS]) if test -z "$ETAGS"; then ETAGS=etags fi AC_SUBST([ETAGS]) if test -z "$CSCOPE"; then CSCOPE=cscope fi AC_SUBST([CSCOPE]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then MISSING="\${SHELL} '$am_aux_dir/missing'" fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/ac_define_dir.m4]) m4_include([m4/ax_pthread.m4]) m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) xorg-server-21.1.16/Makefile.in0000644000175000017500000011614714757411114011712 # Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = xserver.ent xorg-server.pc CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(aclocaldir)" \ "$(DESTDIR)$(pkgconfigdir)" DATA = $(aclocal_DATA) $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/xorg-server.pc.in \ $(srcdir)/xserver.ent.in COPYING ChangeLog INSTALL README.md \ compile config.guess config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.xz GZIP_ENV = --best DIST_TARGETS = dist-xz dist-gzip # Exists only to be overridden by the user if desired. AM_DISTCHECK_DVI_TARGET = dvi distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = nostdinc # Required for automake < 1.14 ACLOCAL_AMFLAGS = -I m4 @COMPOSITE_TRUE@COMPOSITE_DIR = composite @GLX_TRUE@GLX_DIR = glx @DBE_TRUE@DBE_DIR = dbe @RECORD_TRUE@RECORD_DIR = record @DRI3_TRUE@DRI3_DIR = dri3 @PRESENT_TRUE@PRESENT_DIR = present @PSEUDORAMIX_TRUE@PSEUDORAMIX_DIR = pseudoramiX @GLAMOR_TRUE@GLAMOR_DIR = glamor SUBDIRS = \ doc \ man \ include \ dix \ fb \ mi \ Xext \ miext \ os \ randr \ render \ Xi \ xkb \ $(PSEUDORAMIX_DIR) \ $(DBE_DIR) \ $(RECORD_DIR) \ xfixes \ damageext \ $(COMPOSITE_DIR) \ $(GLX_DIR) \ $(PRESENT_DIR) \ $(DRI3_DIR) \ exa \ $(GLAMOR_DIR) \ config \ hw \ test @XORG_TRUE@aclocaldir = $(datadir)/aclocal @XORG_TRUE@aclocal_DATA = xorg-server.m4 @XORG_TRUE@pkgconfigdir = $(libdir)/pkgconfig @XORG_TRUE@pkgconfig_DATA = xorg-server.pc EXTRA_DIST = xorg-server.pc.in xorg-server.m4 autogen.sh README.md \ meson_options.txt include/xorg-config.h.meson.in \ include/xwin-config.h.meson.in hw/xfree86/loader/symbol-test.c \ composite/meson.build config/meson.build damageext/meson.build \ dbe/meson.build dix/meson.build doc/dtrace/meson.build \ doc/meson.build dri3/meson.build exa/meson.build \ fb/meson.build glamor/meson.build glx/meson.build \ hw/kdrive/ephyr/meson.build hw/kdrive/meson.build \ hw/kdrive/src/meson.build hw/meson.build hw/vfb/meson.build \ hw/xfree86/common/meson.build hw/xfree86/ddc/meson.build \ hw/xfree86/dixmods/meson.build hw/xfree86/doc/meson.build \ hw/xfree86/dri2/meson.build hw/xfree86/dri/meson.build \ hw/xfree86/drivers/inputtest/meson.build \ hw/xfree86/drivers/modesetting/meson.build \ hw/xfree86/exa/meson.build hw/xfree86/fbdevhw/meson.build \ hw/xfree86/glamor_egl/meson.build hw/xfree86/i2c/meson.build \ hw/xfree86/int10/meson.build hw/xfree86/loader/meson.build \ hw/xfree86/meson.build hw/xfree86/modes/meson.build \ hw/xfree86/os-support/meson.build \ hw/xfree86/parser/meson.build hw/xfree86/ramdac/meson.build \ hw/xfree86/shadowfb/meson.build hw/xfree86/vgahw/meson.build \ hw/xfree86/x86emu/meson.build hw/xfree86/xkb/meson.build \ hw/xnest/meson.build hw/xquartz/bundle/meson.build \ hw/xquartz/GL/meson.build hw/xquartz/mach-startup/meson.build \ hw/xquartz/meson.build hw/xquartz/pbproxy/meson.build \ hw/xquartz/xpr/meson.build hw/xwin/dri/meson.build \ hw/xwin/glx/meson.build hw/xwin/meson.build \ hw/xwin/winclipboard/meson.build include/meson.build \ meson.build miext/damage/meson.build \ miext/rootless/meson.build miext/shadow/meson.build \ miext/sync/meson.build mi/meson.build os/meson.build \ present/meson.build pseudoramiX/meson.build randr/meson.build \ record/meson.build render/meson.build test/bigreq/meson.build \ test/bigreq/request-length.c test/damage/meson.build \ test/damage/primitives.c test/meson.build \ test/sync/meson.build test/sync/sync.c Xext/meson.build \ xfixes/meson.build Xi/meson.build xkb/meson.build DISTCHECK_CONFIGURE_FLAGS = \ --with-xkb-path=$(XKB_BASE_DIRECTORY) \ --with-xkb-bin-directory=$(XKB_BIN_DIRECTORY) \ --with-xkb-output='$${datadir}/X11/xkb/compiled' DIST_SUBDIRS = \ doc \ man \ include \ dix \ fb \ mi \ Xext \ miext \ os \ pseudoramiX \ randr \ render \ Xi \ xkb \ dbe \ record \ xfixes \ damageext \ composite \ glx \ exa \ glamor \ config \ dri3 \ present \ hw \ test DISTCLEANFILES = buildDateTime.h all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): xserver.ent: $(top_builddir)/config.status $(srcdir)/xserver.ent.in cd $(top_builddir) && $(SHELL) ./config.status $@ xorg-server.pc: $(top_builddir)/config.status $(srcdir)/xorg-server.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-aclocalDATA: $(aclocal_DATA) @$(NORMAL_INSTALL) @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(aclocaldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(aclocaldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(aclocaldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(aclocaldir)" || exit $$?; \ done uninstall-aclocalDATA: @$(NORMAL_UNINSTALL) @list='$(aclocal_DATA)'; test -n "$(aclocaldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(aclocaldir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(aclocaldir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-aclocalDATA install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-aclocalDATA uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \ distclean-generic distclean-libtool distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-aclocalDATA install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-aclocalDATA \ uninstall-am uninstall-pkgconfigDATA .PRECIOUS: Makefile .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL # gross hack relink: all $(AM_V_at)$(MAKE) -C hw relink install-headers: Makefile +find . -name Makefile | while read m; do \ if grep -q install-sdkHEADERS $$m; then \ (cd `dirname "$$m"` && make install-sdkHEADERS) \ fi \ done distcheck-hook: cd $(srcdir) && \ meson setup _distcheck_build && \ meson configure _distcheck_build && \ ninja -C _distcheck_build && \ rm -rf _distcheck_build && \ cd - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: xorg-server-21.1.16/xorg-server.pc.in0000644000175000017500000000073714757411105013056 prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ datarootdir=@datarootdir@ moduledir=@moduledir@ sdkdir=@sdkdir@ sysconfigdir=@sysconfigdir@ abi_ansic=@abi_ansic@ abi_videodrv=@abi_videodrv@ abi_xinput=@abi_xinput@ abi_extension=@abi_extension@ Name: xorg-server Description: Modular X.Org X Server Version: @PACKAGE_VERSION@ Requires.private: @SDK_REQUIRED_MODULES@ Cflags: -I${sdkdir} @symbol_visibility@ Libs: -L${libdir} @XORG_DRIVER_LIBS@ xorg-server-21.1.16/xserver.ent.in0000644000175000017500000000024514757411105012447 xorg-server-21.1.16/COPYING0000644000175000017500000027107714757411105010704 The following is the 'standard copyright' agreed upon by most contributors, and is currently the canonical license preferred by the X.Org Foundation. This is a slight variant of the common MIT license form published by the Open Source Initiative at http://www.opensource.org/licenses/mit-license.php Copyright holders of new code should use this license statement where possible, and insert their name to this list. Please sort by surname for people, and by the full name for other entities (e.g. Juliusz Chroboczek sorts before Intel Corporation sorts before Daniel Stone). Copyright © 2011 Dave Airlie Copyright © 2000-2001 Juliusz Chroboczek Copyright © 1998 Egbert Eich Copyright © 2006-2007 Intel Corporation Copyright © 2006 Nokia Corporation Copyright © 2006-2008 Peter Hutterer Copyright © 2006 Adam Jackson Copyright © 2009-2010 NVIDIA Corporation Copyright © 1987, 2003-2006, 2008-2010 Oracle and/or its affiliates. Copyright © 1999 Keith Packard Copyright © 2007-2009 Red Hat, Inc. Copyright © 2005-2008 Daniel Stone Copyright © 2006-2009 Simon Thum Copyright © 2003-2008, 2013 Geert Uytterhoeven Copyright © 2006 Luc Verhaegen 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 AUTHORS OR COPYRIGHT HOLDERS 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. The following licenses are 'legacy': usually MIT/X11 licenses with the name of the copyright holder(s) in the license statement, but also some BSD-like licenses. Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. Copyright (C) Colin Harrison 2005-2008 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE XFREE86 PROJECT 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 XFree86 Project 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 XFree86 Project. Copyright 1997 by The XFree86 Project, Inc. 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 the XFree86 Project, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The Xfree86 Project, Inc. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE XFREE86 PROJECT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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 1985-1998, 2001 The Open Group Copyright 2002 Red Hat Inc., Durham, North Carolina. 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 (c) 1987, 1989-1990, 1992-1995 X Consortium 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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 X Consortium 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 X Consortium. Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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. Copyright © 1999-2000 SuSE, Inc. Copyright © 2007 Red Hat, Inc. 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 SuSE not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. SuSE makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE 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 1987-1991, 1993 by Digital Equipment Corporation, Maynard, Massachusetts. Copyright 1991 Massachusetts Institute of Technology, Cambridge, Massachusetts. Copyright 1991, 1993 Olivetti Research Limited, Cambridge, England. 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. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts, Copyright 1994 Quarterdeck Office Systems. 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 names of Digital and Quarterdeck not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. DIGITAL AND QUARTERDECK DISCLAIM 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. Copyright 1997 Digital Equipment Corporation. All rights reserved. This software is furnished under license and may be used and copied only in accordance with the following terms and conditions. Subject to these conditions, you may download, copy, install, use, modify and distribute this software in source and/or binary form. No title or ownership is transferred hereby. 1) Any source code used, modified or distributed must reproduce and retain this copyright notice and list of conditions as they appear in the source file. 2) No right is granted to use any trade name, trademark, or logo of Digital Equipment Corporation. Neither the "Digital Equipment Corporation" name nor any trademark or logo of Digital Equipment Corporation may be used to endorse or promote products derived from this software without the prior written permission of Digital Equipment Corporation. 3) This software is provided "AS-IS" and any express or implied warranties, including but not limited to, any implied warranties of merchantability, fitness for a particular purpose, or non-infringement are disclaimed. In no event shall DIGITAL be liable for any damages whatsoever, and in particular, DIGITAL shall not be liable for special, indirect, consequential, or incidental damages or damages for lost profits, loss of revenue or loss of use, whether such damages arise in contract, negligence, tort, under statute, in equity, at law or otherwise, even if advised of the possibility of such damage. Copyright (c) 1991, 1996-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. SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice including the dates of first publication and either this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ 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 SILICON GRAPHICS, INC. 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. Copyright (c) 1994, 1995 Hewlett-Packard Company 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 HEWLETT-PACKARD COMPANY 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 Hewlett-Packard Company 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 Hewlett-Packard Company. Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. 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 Hewlett-Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HEWLETT-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. Copyright 2001-2004 Red Hat Inc., Durham, North Carolina. Copyright (c) 2003 by the XFree86 Project, Inc. Copyright 2004-2005 Red Hat Inc., Raleigh, North Carolina. All Rights Reserved. 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 on the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS 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. Copyright © 2008 Red Hat, Inc. Partly based on code Copyright © 2000 SuSE, Inc. 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 Red Hat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Red Hat makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Red Hat DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Red Hat 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. 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 SuSE not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. SuSE makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE 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 © 2006 Red Hat, Inc. (C) Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT, INC, OR PRECISION INSIGHT AND/OR THEIR SUPPLIERS 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. Copyright (c) 1995 X Consortium Copyright 2004 Red Hat Inc., Durham, North Carolina. All Rights Reserved. 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 on the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT, THE X CONSORTIUM, AND/OR THEIR SUPPLIERS 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 X Consortium 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 X Consortium. Copyright 1998-2000 Precision Insight, Inc., Cedar Park, Texas. Copyright 2000 VA Linux Systems, Inc. Copyright (c) 2002, 2008, 2009 Apple Computer, Inc. Copyright (c) 2003-2004 Torrey T. Lyons. All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS 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. (C) Copyright IBM Corporation 2003 All Rights Reserved. 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 on the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL VA LINUX SYSTEM, IBM AND/OR THEIR SUPPLIERS 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. (C) Copyright IBM Corporation 2004-2005 All Rights Reserved. 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, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL IBM, AND/OR THEIR SUPPLIERS 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. Copyright (c) 1997 Metro Link Incorporated 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 X CONSORTIUM 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 Metro Link shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Metro Link. Copyright 1995-1998 by Metro Link, Inc. Copyright (c) 1997 Matthieu Herrb 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 Metro Link, Inc. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Metro Link, Inc. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. METRO LINK, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL METRO LINK, INC. 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 1998 by Metro Link Incorporated 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 Metro Link Incorporated not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Metro Link Incorporated makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. METRO LINK INCORPORATED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL METRO LINK INCORPORATED 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 (c) 2000 by Conectiva S.A. (http://www.conectiva.com) 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 CONECTIVA LINUX 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 Conectiva Linux shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Conectiva Linux. Copyright (c) 2001, Andy Ritger aritger@nvidia.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. o Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. o Neither the name of NVIDIA nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright 1992 Vrije Universiteit, The Netherlands 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 the Vrije Universiteit not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The Vrije Universiteit makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. The Vrije Universiteit DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL The Vrije Universiteit 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 1998 by Concurrent Computer Corporation 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 Concurrent Computer Corporation not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Concurrent Computer Corporation makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. CONCURRENT COMPUTER CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL CONCURRENT COMPUTER CORPORATION 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 © 2004 Nokia 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 Nokia not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Nokia makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. NOKIA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NOKIA 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. (c)Copyright 1988,1991 Adobe Systems Incorporated. All rights reserved. Permission to use, copy, modify, distribute, and sublicense this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notices appear in all copies and that both those copyright notices and this permission notice appear in supporting documentation and that the name of Adobe Systems Incorporated not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. No trademark license to use the Adobe trademarks is hereby granted. If the Adobe trademark "Display PostScript"(tm) is used to describe this software, its functionality or for any other purpose, such use shall be limited to a statement that this software works in conjunction with the Display PostScript system. Proper trademark attribution to reflect Adobe's ownership of the trademark shall be given whenever any such reference to the Display PostScript system is made. ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE. Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems Incorporated which may be registered in certain jurisdictions. Copyright 1989 Network Computing Devices, Inc., Mountain View, California. 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 N.C.D. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. N.C.D. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Copyright (c) 1987 by the Regents of the University of California 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. The University of California makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Copyright 1992, 1993 Data General Corporation; Copyright 1992, 1993 OMRON Corporation 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 neither the name OMRON or DATA GENERAL be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission of the party whose name is to be used. Neither OMRON or DATA GENERAL make any representation about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OMRON AND DATA GENERAL EACH DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OMRON OR DATA GENERAL 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 © 1998-2004, 2006 Keith Packard Copyright © 2000-2002 Keith Packard, member of The XFree86 Project, Inc. Copyright (c) 2002 Apple Computer, Inc. Copyright (c) 2003 Torrey T. Lyons. All Rights Reserved. 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. Copyright © 1999 Keith Packard Copyright © 2000 Compaq Computer Corporation Copyright © 2002 MontaVista Software Inc. Copyright © 2005 OpenedHand Ltd. Copyright © 2006 Nokia Corporation 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 the authors and/or copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The authors and/or copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE AUTHORS AND/OR COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS AND/OR COPYRIGHT HOLDERS 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 1993 by Davor Matic 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. Davor Matic makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. Copyright (C) 2001-2004 Harold L Hunt II All Rights Reserved. Copyright (C) Colin Harrison 2005-2008 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 HAROLD L HUNT II 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 Harold L Hunt II shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Harold L Hunt II. Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. 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 Thomas Roell not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Thomas Roell makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELL 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 1990,91 by Thomas Roell, Dinkelscherben, Germany Copyright 1993 by David Wexelblat 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 names of Thomas Roell and David Wexelblat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Thomas Roell and David Wexelblat makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THOMAS ROELL AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELL OR DAVID WEXELBLAT 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 1990,91,92,93 by Thomas Roell, Germany. Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. 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 Thomas Roell nor SGCS be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Thomas Roell nor SGCS makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS 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 1998 by Alan Hourihane, Wigan, England. Copyright 2000-2002 by Alan Hourihane, Flint Mountain, North Wales. 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 Alan Hourihane not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Alan Hourihane makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. ALAN HOURIHANE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ALAN HOURIHANE 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 1995 Kaleb S. KEITHLEY 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 Kaleb S. KEITHLEY 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 Kaleb S. KEITHLEY shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Kaleb S. KEITHLEY Copyright (c) 1997 Matthieu Herrb 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 Matthieu Herrb not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Matthieu Herrb makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. MATTHIEU HERRB DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MATTHIEU HERRB 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 2004, Egbert Eich 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 EGBERT EICH BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Egbert Eich shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from Egbert Eich. Copyright 1993 by David Wexelblat Copyright 2005 by Kean Johnston Copyright 1993 by David McCullough 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 David Wexelblat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. David Wexelblat makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL DAVID WEXELBLAT 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 1992 by Orest Zborowski Copyright 1993 by David Wexelblat 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 names of Orest Zborowski and David Wexelblat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Orest Zborowski and David Wexelblat make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OREST ZBOROWSKI AND DAVID WEXELBLAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID WEXELBLAT 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 1992 by Orest Zborowski Copyright 1993 by David Dawes 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 names of Orest Zborowski and David Dawes not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Orest Zborowski and David Dawes make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OREST ZBOROWSKI AND DAVID DAWES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OREST ZBOROWSKI OR DAVID DAWES 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 1995-1999 by Frederic Lepied, France. 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 Frederic Lepied not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Frederic Lepied makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. FREDERIC LEPIED DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL FREDERIC LEPIED 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 1992 by Rich Murphey Copyright 1993 by David Wexelblat 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 names of Rich Murphey and David Wexelblat not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Rich Murphey and David Wexelblat make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT 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 1992 by Rich Murphey Copyright 1993 by David Dawes 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 names of Rich Murphey and David Dawes not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Rich Murphey and David Dawes make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. RICH MURPHEY AND DAVID DAWES DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID DAWES 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-2004 Anders Carlsson 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 Anders Carlsson not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Anders Carlsson makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. ANDERS CARLSSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ANDERS CARLSSON 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 (C) 2003 Anders Carlsson Copyright © 2003-2004 Eric Anholt Copyright © 2004 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 Eric Anholt not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Eric Anholt makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ERIC ANHOLT 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 (c) 1998 Todd C. Miller Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR ANY SPECIAL, DIRECT, 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-2004 Philip Blundell 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 Philip Blundell not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Philip Blundell makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL PHILIP BLUNDELL 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 (c) 1994-2003 by The XFree86 Project, Inc. Copyright 1997 by Metro Link, Inc. Copyright 2003 by David H. Dawes. Copyright 2003 by X-Oz Technologies. Copyright (c) 2004, X.Org Foundation 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) and author(s) 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 copyright holder(s) and author(s). Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany Copyright 1993 by David Wexelblat Copyright 1999 by David Holland Copyright © 2000 Compaq Computer Corporation Copyright © 2002 Hewlett-Packard Company Copyright © 2004, 2005 Red Hat, Inc. Copyright © 2004 Nicholas Miell Copyright © 2005 Trolltech AS Copyright © 2006 Intel Corporation Copyright © 2006-2007 Keith Packard Copyright © 2008 Red Hat, Inc Copyright © 2008 George Sapountzis 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 the copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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 © 2000 Keith Packard, member of The XFree86 Project, Inc. 2005 Lars Knoll & Zack Rusin, Trolltech 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. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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 1987, 1998 The Open Group Copyright © 1998-1999, 2001 The XFree86 Project, Inc. Copyright © 2000 VA Linux Systems, Inc. Copyright (c) 2000, 2001 Nokia Home Communications Copyright © 2007, 2008 Red Hat, Inc. All rights reserved. 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, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. 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 OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. Copyright 1996 by Thomas E. Dickey 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 the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 1998-1999 Precision Insight, Inc., Cedar Park, Texas. Copyright (c) 2001 Andreas Monitzer. Copyright (c) 2001-2004 Greg Parker. Copyright (c) 2001-2004 Torrey T. Lyons Copyright (c) 2002-2003 Apple Computer, Inc. Copyright (c) 2004-2005 Alexander Gottwald Copyright (c) 2002-2009 Apple Inc. Copyright (c) 2007 Jeremy Huddleston All Rights Reserved. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 ABOVE LISTED COPYRIGHT HOLDER(S) 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(s) of the above copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. Copyright (C) 1999,2000 by Eric Sunshine Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 AUTHOR 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 author 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 author. Copyright © 2002 David Dawes 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 AUTHOR(S) 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 author(s) 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 author(s). Copyright (C) 1996-1999 SciTech Software, Inc. Copyright (C) David Mosberger-Tang Copyright (C) 1999 Egbert Eich Copyright (C) 2008 Bart Trojanowski, Symbio Technologies, LLC 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 the authors not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The authors makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE AUTHORS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS 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 2005-2006 Luc Verhaegen. 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. Copyright 1995 by Robin Cutshaw Copyright 2000 by Egbert Eich Copyright 2002 by David Dawes 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 names of the above listed copyright holder(s) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The above listed copyright holder(s) make(s) no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM(S) ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) 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 1997-2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 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 Marc Aurele La France not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Marc Aurele La France makes no representations about the suitability of this software for any purpose. It is provided "as-is" without express or implied warranty. MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL MARC AURELE LA FRANCE 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 1990, 1991 by Thomas Roell, Dinkelscherben, Germany Copyright 1992 by David Dawes Copyright 1992 by Jim Tsillas Copyright 1992 by Rich Murphey Copyright 1992 by Robert Baron Copyright 1992 by Orest Zborowski Copyright 1993 by Vrije Universiteit, The Netherlands Copyright 1993 by David Wexelblat Copyright 1994, 1996 by Holger Veit Copyright 1997 by Takis Psarogiannakopoulos Copyright 1994-2003 by The XFree86 Project, Inc 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 names of the above listed copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. The above listed copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE ABOVE LISTED COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDERS 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 2001-2005 by J. Kean Johnston 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 J. Kean Johnston not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. J. Kean Johnston makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. J. KEAN JOHNSTON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL J. KEAN JOHNSTON 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 (C) 2000 Jakub Jelinek (jakub@redhat.com) 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, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 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 JAKUB JELINEK 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. Copyright 1997,1998 by UCHIYAMA Yasushi 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 UCHIYAMA Yasushi not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. UCHIYAMA Yasushi makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. UCHIYAMA YASUSHI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL UCHIYAMA YASUSHI 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 (C) 2000 Keith Packard 2004 Eric Anholt 2005 Zack Rusin 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 copyright holders not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Copyright holders make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS 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. (C) Copyright IBM Corporation 2002-2007 All Rights Reserved. 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 on the rights to use, copy, modify, merge, publish, distribute, sub license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) 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 NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS 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. Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that this permission notice appear in supporting documentation. 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 AUTHOR 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. Copyright © 2007 OpenedHand Ltd 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 OpenedHand Ltd not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. OpenedHand Ltd makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. OpenedHand Ltd DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL OpenedHand Ltd 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 (c) 1987, 1990, 1993 The Regents of the University of California. All rights reserved. This code is derived from software contributed to Berkeley by Chris Torek. This code is derived from software contributed to Berkeley by Michael Rendell of Memorial University of Newfoundland. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. xorg-server-21.1.16/ChangeLog0000644000175000017500003573300614757411132011426 commit b7f84e6d509c004a7abb514af75b94cb907d451b Author: Olivier Fourdan Date: Tue Feb 25 15:38:07 2025 +0100 xserver 21.1.16 Signed-off-by: Olivier Fourdan Part-of: commit a2c0f84c1cd0c92918f08f83f562c2e324cd4cbb Author: Olivier Fourdan Date: Mon Jan 20 17:10:31 2025 +0100 sync: Apply changes last in SyncChangeAlarmAttributes() SyncChangeAlarmAttributes() would apply the various changes while checking for errors. If one of the changes triggers an error, the changes for the trigger, counter or delta value would remain, possibly leading to inconsistent changes. Postpone the actual changes until we're sure nothing else can go wrong. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit c285798984c6bb99e454a33772cde23d394d3dcd) Part-of: commit 043a4e959b8590ff37b72cd3440328ec3e39699f Author: Olivier Fourdan Date: Mon Jan 20 17:06:07 2025 +0100 sync: Do not fail SyncAddTriggerToSyncObject() We do not want to return a failure at the very last step in SyncInitTrigger() after having all changes applied. SyncAddTriggerToSyncObject() must not fail on memory allocation, if the allocation of the SyncTriggerList fails, trigger a FatalError() instead. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 8cbc90c8817306af75a60f494ec9dbb1061e50db) Part-of: commit 330b4068212c02548b53d19c0078ddc75c36a724 Author: Olivier Fourdan Date: Mon Jan 20 16:54:30 2025 +0100 sync: Check values before applying changes In SyncInitTrigger(), we would set the CheckTrigger function before validating the counter value. As a result, if the counter value overflowed, we would leave the function SyncInitTrigger() with the CheckTrigger applied but without updating the trigger object. To avoid that issue, move the portion of code checking for the trigger check value before updating the CheckTrigger function. Related to CVE-2025-26601, ZDI-CAN-25870 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit f52cea2f93a0c891494eb3334894442a92368030) Part-of: commit e708ad021753d603580d314c48b93d3adf459c5f Author: Olivier Fourdan Date: Mon Jan 20 16:52:01 2025 +0100 sync: Do not let sync objects uninitialized When changing an alarm, the change mask values are evaluated one after the other, changing the trigger values as requested and eventually, SyncInitTrigger() is called. SyncInitTrigger() will evaluate the XSyncCACounter first and may free the existing sync object. Other changes are then evaluated and may trigger an error and an early return, not adding the new sync object. This can be used to cause a use after free when the alarm eventually triggers. To avoid the issue, delete the existing sync object as late as possible only once we are sure that no further error will cause an early exit. CVE-2025-26601, ZDI-CAN-25870 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 16a1242d0ffc7f45ed3c595ee7564b5c04287e0b) Part-of: commit 826cef825fe49a275deb28e85b8c714b697f5efa Author: Olivier Fourdan Date: Mon Dec 16 16:18:04 2024 +0100 dix: Dequeue pending events on frozen device on removal When a device is removed while still frozen, the events queued for that device remain while the device itself is freed. As a result, replaying the events will cause a use after free. To avoid the issue, make sure to dequeue and free any pending events on a frozen device when removed. CVE-2025-26600, ZDI-CAN-25871 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 6e0f332ba4c8b8c9a9945dc9d7989bfe06f80e14) Part-of: commit d09125fbb3b997ed77b7f008f8bd30328ba69fbb Author: Olivier Fourdan Date: Mon Jan 13 16:09:43 2025 +0100 composite: initialize border clip even when pixmap alloc fails If it fails to allocate the pixmap, the function compAllocPixmap() would return early and leave the borderClip region uninitialized, which may lead to the use of uninitialized value as reported by valgrind: Conditional jump or move depends on uninitialised value(s) at 0x4F9B33: compClipNotify (compwindow.c:317) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Conditional jump or move depends on uninitialised value(s) at 0x48EEDBC: pixman_region_translate (pixman-region.c:2233) by 0x4F9255: RegionTranslate (regionstr.h:312) by 0x4F9B7E: compClipNotify (compwindow.c:319) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Conditional jump or move depends on uninitialised value(s) at 0x48EEE33: UnknownInlinedFun (pixman-region.c:2241) by 0x48EEE33: pixman_region_translate (pixman-region.c:2225) by 0x4F9255: RegionTranslate (regionstr.h:312) by 0x4F9B7E: compClipNotify (compwindow.c:319) by 0x484FC9: miComputeClips (mivaltree.c:476) by 0x48559A: miValidateTree (mivaltree.c:679) by 0x4F0685: MapWindow (window.c:2693) by 0x4A344A: ProcMapWindow (dispatch.c:922) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Uninitialised value was created by a heap allocation at 0x4841866: malloc (vg_replace_malloc.c:446) by 0x4F47BC: compRedirectWindow (compalloc.c:171) by 0x4FA8AD: compCreateWindow (compwindow.c:592) by 0x4EBB89: CreateWindow (window.c:925) by 0x4A2E6E: ProcCreateWindow (dispatch.c:768) by 0x4A25B5: Dispatch (dispatch.c:560) by 0x4B082A: dix_main (main.c:282) by 0x429233: main (stubmain.c:34) Fix compAllocPixmap() to initialize the border clip even if the creation of the backing pixmap has failed, to avoid depending later on uninitialized border clip values. Related to CVE-2025-26599, ZDI-CAN-25851 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit b07192a8bedb90b039dc0f70ae69daf047ff9598) Part-of: commit 7169628a1715f8203665f9805c714ed111907914 Author: Olivier Fourdan Date: Tue Dec 17 15:19:45 2024 +0100 composite: Handle failure to redirect in compRedirectWindow() The function compCheckRedirect() may fail if it cannot allocate the backing pixmap. In that case, compRedirectWindow() will return a BadAlloc error. However that failure code path will shortcut the validation of the window tree marked just before, which leaves the validate data partly initialized. That causes a use of uninitialized pointer later. The fix is to not shortcut the call to compHandleMarkedWindows() even in the case of compCheckRedirect() returning an error. CVE-2025-26599, ZDI-CAN-25851 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit c1ff84bef2569b4ba4be59323cf575d1798ba9be) Part-of: commit 32decb1efb89341881de8266f3dd1c3356981bfd Author: Olivier Fourdan Date: Mon Dec 16 11:25:11 2024 +0100 Xi: Fix barrier device search The function GetBarrierDevice() would search for the pointer device based on its device id and return the matching value, or supposedly NULL if no match was found. Unfortunately, as written, it would return the last element of the list if no matching device id was found which can lead to out of bounds memory access. Fix the search function to return NULL if not matching device is found, and adjust the callers to handle the case where the device cannot be found. CVE-2025-26598, ZDI-CAN-25740 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit bba9df1a9d57234c76c0b93f88dacb143d01bca2) Part-of: commit 8cb23fac62e05d7340e320b2db0dd3e8538d1fba Author: Olivier Fourdan Date: Thu Nov 28 14:09:04 2024 +0100 xkb: Fix buffer overflow in XkbChangeTypesOfKey() If XkbChangeTypesOfKey() is called with nGroups == 0, it will resize the key syms to 0 but leave the key actions unchanged. If later, the same function is called with a non-zero value for nGroups, this will cause a buffer overflow because the key actions are of the wrong size. To avoid the issue, make sure to resize both the key syms and key actions when nGroups is 0. CVE-2025-26597, ZDI-CAN-25683 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 0e4ed94952b255c04fe910f6a1d9c852878dcd64) Part-of: commit b4293650b50efe7832cf9eac71217ad8d6341e02 Author: Olivier Fourdan Date: Thu Nov 28 11:49:34 2024 +0100 xkb: Fix computation of XkbSizeKeySyms The computation of the length in XkbSizeKeySyms() differs from what is actually written in XkbWriteKeySyms(), leading to a heap overflow. Fix the calculation in XkbSizeKeySyms() to match what kbWriteKeySyms() does. CVE-2025-26596, ZDI-CAN-25543 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 80d69f01423fc065c950e1ff4e8ddf9f675df773) Part-of: commit ea526ccb20d222196494b2adf9da52dab68a8997 Author: Olivier Fourdan Date: Wed Nov 27 14:41:45 2024 +0100 xkb: Fix buffer overflow in XkbVModMaskText() The code in XkbVModMaskText() allocates a fixed sized buffer on the stack and copies the virtual mod name. There's actually two issues in the code that can lead to a buffer overflow. First, the bound check mixes pointers and integers using misplaced parenthesis, defeating the bound check. But even though, if the check fails, the data is still copied, so the stack overflow will occur regardless. Change the logic to skip the copy entirely if the bound check fails. CVE-2025-26595, ZDI-CAN-25545 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 11fcda8753e994e15eb915d28cf487660ec8e722) Part-of: commit 5f0c4e0bf254c8b4552da276d01b1b80881b4e26 Author: Peter Hutterer Date: Wed Dec 4 15:49:43 2024 +1000 dix: keep a ref to the rootCursor CreateCursor returns a cursor with refcount 1 - that refcount is used by the resource system, any caller needs to call RefCursor to get their own reference. That happens correctly for normal cursors but for our rootCursor we keep a variable to the cursor despite not having a ref for ourselves. Fix this by reffing/unreffing the rootCursor to ensure our pointer is valid. Related to CVE-2025-26594, ZDI-CAN-25544 Reviewed-by: Olivier Fourdan (cherry picked from commit b0a09ba6020147961acc62d9c73d807b4cccd9f7) Part-of: commit 9e5ac777d0dfa9d4d78dd68558869489117c3f2c Author: Olivier Fourdan Date: Wed Nov 27 11:27:05 2024 +0100 Cursor: Refuse to free the root cursor If a cursor reference count drops to 0, the cursor is freed. The root cursor however is referenced with a specific global variable, and when the root cursor is freed, the global variable may still point to freed memory. Make sure to prevent the rootCursor from being explicitly freed by a client. CVE-2025-26594, ZDI-CAN-25544 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative v2: Explicitly forbid XFreeCursor() on the root cursor (Peter Hutterer ) v3: Return BadCursor instead of BadValue (Michel Dänzer ) Signed-off-by: Olivier Fourdan Suggested-by: Peter Hutterer Reviewed-by: Peter Hutterer (cherry picked from commit 01642f263f12becf803b19be4db95a4a83f94acc) Part-of: commit 32887f6ca479be268b7c867b924f80d3fd1611db Author: Olivier Fourdan Date: Tue Feb 25 18:47:05 2025 +0100 test: Fix xsync test The xsync test is relying on the values being changed even in the case of a BadMatch value. Typically, it updates the delta but does not update the test type comparison, so when passing a negative value, it generates a BadMatch. That's actually not correct, and that will fail with the new fixes that check the validity of the values prior to apply the changes. Fix the test by updating the test type as needed. Signed-off-by: Olivier Fourdan (cherry picked from commit 05e54fefafbcec11d847b9f8127bcd4820a20625) Part-of: commit 0c6a7750f2ac9158ace8161f94f7e3bd4c9f5263 Author: Doug Brown Date: Mon Jul 15 19:44:23 2024 -0700 dri2: Protect against dri2ClientPrivate assertion failures If DRI2ScreenInit hasn't been called yet, DRI2Authenticate and DRI2CreateDrawable2 cause the X server to crash. This has been observed to happen on multiple modern Linux distros in various conditions, including QEMU and VMware VMs. Make these functions more robust in order to prevent the crash. This patch was originally provided by Bernhard Übelacker and expanded upon by Mark Wagner. Signed-off-by: Doug Brown Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1053 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1534 (cherry picked from commit a0834009cfb10b8982a1f2b47b8ed00de254c2c3) Part-of: commit a651eefc9e525072d99413c1aeabd01858c50819 Author: Daniel Kahn Gillmor Date: Fri Jan 3 14:41:59 2025 -0500 autotools: enable static use of Nettle for SHA1 Debian builds xserver 21 using autotools. When debian builds xserver-xorg for constrained environments like the installer, it wants to build against the static library of libnettle for SHA1, see debian/patches/03_static-nettle.diff in the debian repository at https://salsa.debian.org/xorg-team/xserver/xorg-server.git This modification of configure.ac makes it possible to build static nettle when needed, while preserving the build to use nettle with a dynamic library when passing a different configuration option. Part-of: commit e183b62e42f49fa297b5667a82199c7e76fc0a81 Author: Olivier Fourdan Date: Wed Jan 15 09:40:34 2025 +0100 os/connection: Make sure partial is initialized Following the change in Xtrans 1.5 that allows for partial connections to succeed, we need to make sure partial is properly initialized at first, otherwise we rely on an uninitialized variable. Signed-off-by: Olivier Fourdan Suggested-by: Twaik Yont Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1783 (cherry picked from commit 080fb49eff4de7ec3a29214994d1403e4d877f6a) Part-of: commit 6115eb1f65dc5198da01042e70d571d85286c31c Author: Olivier Fourdan Date: Fri Jan 10 15:02:54 2025 +0100 xkb: Always use MAP_LENGTH keymap size Generating the modifier modmap, the helper function generate_modkeymap() would check the entire range up to the MAP_LENGTH. However, the given keymap might have less keycodes than MAP_LENGTH, in which case we would go beyond the size of the modmap, as reported by ASAN: ==ERROR: AddressSanitizer: heap-buffer-overflow READ of size 1 at 0x5110001c225b thread T0 #0 0x5e7369393873 in generate_modkeymap ../dix/inpututils.c:309 #1 0x5e736930dcce in ProcGetModifierMapping ../dix/devices.c:1794 #2 0x5e7369336489 in Dispatch ../dix/dispatch.c:550 #3 0x5e736934407d in dix_main ../dix/main.c:275 #5 0x7e46d47b2ecb in __libc_start_main #6 0x5e73691be324 in _start (xserver/build/hw/xwayland/Xwayland) Address is located 0 bytes after 219-byte region allocated by thread T0 here: #0 0x7e46d4cfc542 in realloc #1 0x5e73695aa90e in _XkbCopyClientMap ../xkb/xkbUtils.c:1142 #2 0x5e73695aa90e in XkbCopyKeymap ../xkb/xkbUtils.c:1966 #3 0x5e73695b1b2f in XkbDeviceApplyKeymap ../xkb/xkbUtils.c:2023 #4 0x5e73691c6c18 in keyboard_handle_keymap ../hw/xwayland/xwayland-input.c:1194 As MAP_LENGTH is used in various code paths where the max keycode might not be easily available, best is to always use MAP_LENGTH to allocate the keymaps so that the code never run past the buffer size. If the max key code is smaller than the MAP_LENGTH limit, fill-in the gap with zeros. That also simplifies the code slightly as we do not constantly need to reallocate the keymap to adjust to the max key code size. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1780 Signed-off-by: Olivier Fourdan (cherry picked from commit 92bcebfd7e248f695503c0a6e7bee80be4c96834) Part-of: commit 309ec5a4a71aa189bcf1eb4263d0d34375051856 Author: Alan Coopersmith Date: Thu Oct 24 15:51:53 2024 -0700 modesetting: avoid memory leak when ms_present_check_unflip() returns FALSE Found by Oracle Parfait 13.3 static analyzer: Memory leak [memory-leak]: Memory leak of pointer event allocated with calloc(1, 16) at line 470 of hw/xfree86/drivers/modesetting/present.c in function 'ms_present_unflip'. event allocated at line 431 with calloc(1, 16) event leaks when ms_present_check_unflip(...) == 0 at line 438 and i >= config->num_crtc at line 445 Fixes: 13c7d53df ("modesetting: Implement page flipping support for Present.") Signed-off-by: Alan Coopersmith (cherry picked from commit bf63d9b34ef3a24427f884f66a387119dd5cdb8c) Part-of: commit fbb636bf6b9f8017cf4f905210d15b86a257dad9 Author: Alan Coopersmith Date: Sat Oct 12 17:33:24 2024 -0700 dix: limit checks to MAX_VALUATORS when generating Xi events Previously, it was looping through sizeof(ev->valuators.mask) * 8 valuators, where valuators.mask is defined as an array of (MAX_VALUATORS + 7) / 8 entries. Since MAX_VALUATORS is defined as 36, this made it actually loop through 40 entries. The last 4 bits in this array should never be set, so we should never access memory outside the bounds of the arrays defined to be exactly MAX_VALUATORS in length, but we can make the static analyzer happier and not waste time checking bits that should never be set. Found by Oracle Parfait 13.3 static analyzer: Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 741 of dix/eventconvert.c in function 'eventToDeviceEvent'. Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 808 of dix/eventconvert.c in function 'eventToRawEvent'. Read outside array bounds [read-outside-array-bounds]: In array dereference of ev->valuators.data_raw[i] with index i Array size is 36 elements (of 8 bytes each), index >= 0 and index <= 39 at line 809 of dix/eventconvert.c in function 'eventToRawEvent'. Fixes: b2ba77bac ("dix: add EventToXI2 and GetXI2Type.") Signed-off-by: Alan Coopersmith (cherry picked from commit b65eea43dd18cdf6d389b7f82ee55ae764c3bf31) Part-of: commit abfd0215946c23c36a4b1c689ea6b8b7d277e991 Author: Alan Coopersmith Date: Sat Oct 12 17:01:03 2024 -0700 dix: fix button offset when generating DeviceButtonStateNotify events Found by Oracle Parfait 13.3 static analyzer: Buffer Overflow in STD C function [buffer-overflow-call-stdc]: Buffer overflow in call to memcpy. Buffer &bev->buttons[4] of size 24 is written at an offset of 28 Array size is 28 bytes, index is 32 at line 743 of dix/enterleave.c in function 'DeliverStateNotifyEvent'. Fixes: a85f0d6b9 ("Xi: fix use of button->down - bitflags instead of int arrays.") Reviewed-by: Peter Hutterer Signed-off-by: Alan Coopersmith (cherry picked from commit 4b073d65bb5e1f4accb7ed280c8926134582b7ab) Part-of: commit 5406ddd003c95e2fcbb0411a7afff4daaa9b59f9 Author: Alan Coopersmith Date: Sat Oct 12 16:38:55 2024 -0700 render: avoid NULL pointer dereference if PictureFindVisual returns NULL Found by Oracle Parfait 13.3: Null pointer dereference [null-pointer-deref]: Read from null pointer pVisual at line 257 of dix/colormap.c in function 'CreateColormap'. Null pointer introduced at line 412 of render/picture.c in function 'PictureFindVisual'. Constant 'NULL' passed into function CreateColormap, argument pVisual, from call at line 431 in function 'PictureInitIndexedFormat'. Function PictureFindVisual may return constant 'NULL' at line 412, called at line 429. Fixes: d4a101d4e ("Integration of DAMAGE-XFIXES branch to trunk") Signed-off-by: Alan Coopersmith (cherry picked from commit 7af077dd2f939b76e7d6ba84250368b6649fb777) Part-of: commit cec3e55ec96a660a1884fc99784efb4536e557bb Author: Alan Coopersmith Date: Sat Oct 12 16:12:13 2024 -0700 Xi: avoid NULL pointer dereference if GetXTestDevice returns NULL The comments in that function say "This only happens if master is a slave device. don't do that" but static analysis doesn't respect that. Found by Oracle Parfait 13.3: Null pointer dereference [null-pointer-deref]: Read from null pointer XTestptr at line 274 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer introduced at line 691 of Xext/xtest.c in function 'GetXTestDevice'. Function GetXTestDevice may return constant 'NULL' at line 691, called at line 273 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer dereference [null-pointer-deref]: Read from null pointer XTestkeybd at line 279 of Xi/xichangehierarchy.c in function 'remove_master'. Null pointer introduced at line 691 of Xext/xtest.c in function 'GetXTestDevice'. Function GetXTestDevice may return constant 'NULL' at line 691, called at line 278 of Xi/xichangehierarchy.c in function 'remove_master'. Fixes: 0814f511d ("input: store the master device's ID in the devPrivate for XTest devices.") Signed-off-by: Alan Coopersmith (cherry picked from commit d10589cc09c68ad09bebd3a4155c44d1b8f2614b) Part-of: commit 23b3b7199c69d0052830c2b219ba06cb26950f51 Author: Alan Coopersmith Date: Sat Oct 12 15:55:06 2024 -0700 xfree86: avoid memory leak on realloc failure Found by Oracle Parfait 13.3 static analyzer: Memory leak [memory-leak]: Memory leak of pointer optname allocated with asprintf(&optname, "\"%s\"", p->name) at line 326 of hw/xfree86/common/xf86Configure.c in function 'configureDeviceSection'. optname allocated at line 309 with asprintf(&optname, "\"%s\"", p->name) Fixes: code inherited from XFree86 Signed-off-by: Alan Coopersmith (cherry picked from commit fa711c486a2c2c958c71d7bd8ac0efe552558717) Part-of: commit cbc2c654e4099e4d8a35e625e010fd73e7a75521 Author: Alan Coopersmith Date: Mon Sep 9 16:21:46 2024 -0700 os: NextDPMSTimeout: mark intentional fallthroughs in switch The comment at the top of the function tells humans the fallthroughs are intentional, but gcc doesn't parse that. Clears 3 -Wimplicit-fallthrough warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit b306df5a6060beea82b5157c3603593527b220b0) Part-of: commit e38c23e5b81693a1b23ed91e4ecdead08615ab25 Author: Tj Date: Fri Jul 19 19:50:56 2024 +0200 xfree86: fbdevhw: fix pci detection on recent Linux Linux kernel v6.9 has changed the symlink to point to the parent device. This breaks fbdev_open() detection logic. Change it to use the subsystem symlink instead which will remain stable. Kernel v6.8: [ 14.067] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0 [ 14.067] (II) fbdev_open() buf=../../devices/platform/vesa-framebuffer.0/graphics/fb0 Kernel v6.9: [ 15.609] (II) fbdev_open() sysfs_path=/sys/class/graphics/fb0 [ 15.609] (II) fbdev_open() buf=../../devices/pci0000:00/0000:00:01.0/vesa-framebuffer.0/graphics/fb0 Originally found in automated Debian ISO QA testing [0] and confirmed in Linux [1]. Tested on kernels v6.9.7 and v6.8.12 [0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1075713 [1] https://lore.kernel.org/lkml/lLyvPFC_APGHNfyGNHRpQy5izBikkaTPOpHooZIT3fFAoJPquSI31ZMueA99XTdr8ysir3X7O7IMdc6za-0m79vr_claeparHhoRouVgHOI=@proton.me/ Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1714 Signed-off-by: Tj Reviewed-by: Thomas Zimmermann Reviewed-by: Enrico Weigelt, metux IT consult (cherry picked from commit 728b54528d37ffa27b07c9b181c5ed8d2d359379) Part-of: commit ac48573a9bc943572621aa4d0254f32fca58f7d4 Author: Olivier Fourdan Date: Mon Sep 23 09:27:21 2024 +0200 os: Fix NULL pointer dereference RemoveHost() can be called from DisableLocalHost() with a NULL client, but doesn't actually check whether the given client pointer is valid on error and assigns the error value unconditionally, leading to a possible NULL pointer dereference and a crash of the Xserver. To avoid the issue, simply check whether the client pointer is not NULL prior to assign the errorValue. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1752 See-also: https://bugzilla.redhat.com/2313799 Signed-off-by: Olivier Fourdan (cherry picked from commit 57a446c0f98693bd2e0263e91213344d870f4e03) Part-of: commit f241e4f884be062f947f5dab35465549b8bffdf8 Author: Peter Hutterer Date: Tue Jan 30 11:11:54 2024 +1000 Xi: when removing a master search for a disabled paired device If either the master pointer or keyboard was disabled, the respective GetMaster() call returns NULL, causing a segfault later accessing the deviceid. Fix this by looking in the off_devices list for any master device of the type we're looking for. Master devices lose the pairing when disabled (on enabling a keyboard we simply pair with the first available unpaired pointer). And for readability, split the device we get from the protocol request into a new "dev" variable instead of re-using ptr. Fixes #1611 (cherry picked from commit e7c876ab0b0daa546a23d4ef82537fdf8fd88e04) Part-of: commit de2e2e8d45eaffd8b961d22ba91d45ed4ffb9ea0 Author: Peter Hutterer Date: Tue Jan 30 10:44:58 2024 +1000 dix: don't push the XKB state to a non-existing master keyboard If our master keyboard is disabled, GetMaster() returns NULL and we segfault in XkbPushLockedStateToSlaves(). Fixes 45fb3a934dc0db51584aba37c2f9d73deff9191d Fixes #1611 (cherry picked from commit 9b983fecf999b9f50946973f2379a5ce00491cad) Part-of: commit 743f66d6a29d439aac7b9ef2816009f311d58aec Author: Olivier Fourdan Date: Mon Jul 29 11:54:15 2024 +0200 glamor: Fix possible double-free If glamor_link_glsl_prog() fails, we may jump to the failed code path which frees the variable vs_prog_string and fs_prog_string. But those variables were already freed just before, so in that case we end up freeing the memory twice. Simply move the free at the end of the success code path so we are sure to free the values only once, either in the successful of failed code paths. Fixes: 2906ee5e4 - glamor: Fix leak in glamor_build_program() Signed-off-by: Olivier Fourdan (cherry picked from commit 34ea020344ef5f2ea8ffce78c7e1abd6436b21ec) Part-of: commit 3bda7d119a289bc7706123b0544bb6ff792986ad Author: Patrik Jakobsson Date: Wed Jun 9 20:58:59 2021 +0200 modesetting: Fix dirty updates for sw rotation Rotation is broken for all drm drivers not providing hardware rotation support. Drivers that give direct access to vram and not needing dirty updates still work but only by accident. The problem is caused by modesetting not sending the correct fb_id to drmModeDirtyFB() and passing the damage rects in the rotated state and not as the crtc expects them. This patch takes care of both problems. Signed-off-by: Patrik Jakobsson (cherry picked from commit db9e9d45e8ba73510f11eb9e534c176102f6623e) Part-of: commit b5f1b211b4bbbf4049b422b0e08e02efaaf7a26a Author: Matt Turner Date: Tue Dec 17 12:39:36 2024 -0500 xserver 21.1.15 Part-of: commit 203e0667d21953737537d1991ec76b768fe588ae Author: Matt Turner Date: Mon Dec 16 22:38:24 2024 -0500 hw/xfree86: Fix -Wincompatible-pointer-types sbus compile failure ``` ../hw/xfree86/common/xf86sbusBus.c: In function ‘xf86SbusConfigureNewDev’: ../hw/xfree86/common/xf86sbusBus.c:751:21: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type [-Wincompatible-pointer-types] 751 | XNFasprintf(&GDev->busID, "SBUS:%s", promPath); | ^~~~~~~~~~~~ | | | const char ** ``` Apply the same fix as in commit e1e01d2e3 ("xfree86/common: Warning fixes. Mostly const string handling.") (cherry picked from commit bdacb100bf6a551bc9045f7f0048cbb99eb3db5a) Part-of: commit 1958e0f25b6b46940625b407a5e15b39fa648b26 Author: Matt Turner Date: Mon Dec 16 22:38:03 2024 -0500 hw/xfree86: Fix -Wmissing-prototypes warnings None of these functions are used elsewhere in the Xserver nor in any of the xf86-video-sun* DDXs. (cherry picked from commit 00a96cd82a7be08f421dcbe3aa628fdbc7c8d856) Part-of: commit c3144adcbc01d4f9f4d1e42323fc51be689bee17 Author: Eric Curtin Date: Fri Dec 16 11:10:12 2022 +0000 config: add a quirk for Apple Silicon appledrm Xorg server does not correctly select the DCP for the display without a quirk on Apple Silicon. Signed-off-by: Eric Curtin Suggested-by: Hector Martin (cherry picked from commit 39934a656a44722d16a80bf4db411c53e2d67b38) Part-of: commit 1a836cd47be8177cb3ab3ac2bc90e926c24c0cac Author: Alan Coopersmith Date: Wed Oct 30 10:34:14 2024 -0700 dix-config.h: add HAVE_SOCKLEN_T definition Needed to build with IPv6 disabled using gcc 14 on some platforms to avoid: In file included from /usr/X11/include/X11/Xtrans/transport.c:67, from xstrans.c:17: /usr/X11/include/X11/Xtrans/Xtranssock.c: In function ‘_XSERVTransSocketOpen’: /usr/X11/include/X11/Xtrans/Xtranssock.c:467:28: error: passing argument 5 of ‘getsockopt’ from incompatible pointer type [-Wincompatible-pointer-types] 467 | (char *) &val, &len) == 0 && val < 64 * 1024) | ^~~~ | | | size_t * {aka long unsigned int *} (Backport to xserver-21.1-branch of commit a1b5aa5a7f12adc43720a5ae11e6c. Backport adds autoconf equivalent to meson change from master branch.) Signed-off-by: Alan Coopersmith Part-of: commit 18c9cd6ab799cf8bd7fb90b4965455bece0046c3 Author: Joaquim Monteiro Date: Sun Jun 23 21:23:47 2024 +0100 os: Fix siHostnameAddrMatch in the case where h_addr isn't defined When IPv6 support isn't enabled, and h_addr isn't defined, there is no for loop, so the break statement is invalid. Signed-off-by: Joaquim Monteiro (cherry picked from commit a6a993f9508ff0bd6f19695b2dfaef170c652525) Part-of: commit e8302b707d6fddf8e27daa0b3ef70fd3efec823c Author: Joaquim Monteiro Date: Sun Jun 23 21:17:25 2024 +0100 os: Fix assignment with incompatible pointer type struct hostent->h_addr_list is of type char**, not const char**. GCC considers this an error when in C99 mode or later. Signed-off-by: Joaquim Monteiro (cherry picked from commit 0ddcd8785199c08d9bded3c767a3b1227c670999) Part-of: commit b25ad9b8f0ebcc3ebe09ce9991410c60f3a8b2ce Author: José Expósito Date: Tue Oct 29 14:40:34 2024 +0100 xserver 21.1.14 Signed-off-by: José Expósito Part-of: commit ba1d14f8eff2a123bd7ff4d48c02e1d5131358e0 Author: Matthieu Herrb Date: Thu Oct 10 10:37:28 2024 +0200 xkb: Fix buffer overflow in _XkbSetCompatMap() The _XkbSetCompatMap() function attempts to resize the `sym_interpret` buffer. However, It didn't update its size properly. It updated `num_si` only, without updating `size_si`. This may lead to local privilege escalation if the server is run as root or remote code execution (e.g. x11 over ssh). CVE-2024-9632, ZDI-CAN-24756 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Reviewed-by: Peter Hutterer Tested-by: Peter Hutterer Reviewed-by: José Expósito (cherry picked from commit 85b776571487f52e756f68a069c768757369bfe3) Part-of: commit e3e14369c62a3647b8f125d9dcb7072f370c10f1 Author: Matthieu Herrb Date: Sat Oct 14 19:06:22 2023 +0200 Fix a double-free on syntax error without a new line. $ echo "#foo\nfoo" > custom_config $ X -config custom_config will trigger the double free because the contents of xf86_lex_val.str have been realloc()ed aready when free is called in read.c:209. This copies the lex token and adds all the necessary free() calls to avoid leaking it (cherry picked from commit fbc034e847a3862a0a28e5872135a3c502da6518) Part-of: commit 4adb5d589f4bb90bf0ff9f1c88096ce60c41286c Author: Matthieu Herrb Date: Sat Feb 17 16:47:38 2024 +0100 Return NULL in *cmdname if the client argv or argv[0] is NULL (cherry picked from commit 59f5445a7ff3ee1468d86f03943c976c790c0893) Part-of: commit 5f9cac4c34e6212e3e4fc22ff4c182d6013eeafc Author: Matthieu Herrb Date: Fri Nov 11 14:58:02 2022 +0100 Don't crash if the client argv or argv[0] is NULL. Report from bauerm at pestilenz dot org. (cherry picked from commit a8512146ba9f475a384a35337f51c7730ba7b4ce) Part-of: commit 9d310679476abb150b8b9055ad44132ffbfa0e3b Author: Enrico Weigelt, metux IT consult Date: Thu Feb 15 16:15:02 2024 +0100 Xnest: fix broken exposure events Xnest fails to properly pass through expose events: the coordinates are miscalculated in xnestCollectExposures(), before miSendExposures() is called. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1735 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/132 Fixes: 605e6764df - Fix Motif menu drawing in Xnest Backport-Of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1397 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 00d0eba826bbf4b35becbd3fab1ee10e8b3bb89d Author: Alan Coopersmith Date: Sun Sep 8 13:27:45 2024 -0700 dix: FindBestPixel: fix implicit fallthrough warning Signed-off-by: Alan Coopersmith (cherry picked from commit 9c9e1afeb277030380daa9b22f88b05e1af783a0) Part-of: commit 52813e32f26c16b8210dbf5e4e2be7b8a4406360 Author: Alan Coopersmith Date: Sun Sep 8 13:21:14 2024 -0700 dix: GetPairedDevice: check if GetMaster returned NULL Clears warning from gcc 14.1: ../dix/devices.c: In function ‘GetPairedDevice’: ../dix/devices.c:2734:15: warning: dereference of NULL ‘dev’ [CWE-476] [-Wanalyzer-null-dereference] 2734 | return dev->spriteInfo? dev->spriteInfo->paired: NULL; | ~~~^~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit e6fc0861d8016ab31536329acac6d6de4bc64164) Part-of: commit 65644c32b8062dd73b10e5f9092dfb833f469719 Author: Alan Coopersmith Date: Sun Sep 8 11:59:07 2024 -0700 dix: HashResourceID: use unsigned integers for bit shifting Clears warning from gcc 14.1: ../dix/resource.c: In function ‘HashResourceID’: ../dix/resource.c:691:44: warning: left shift of negative value [-Wshift-negative-value] 691 | return (id ^ (id >> numBits)) & ~((~0) << numBits); | ^~ Signed-off-by: Alan Coopersmith (cherry picked from commit 26a7ab09eae24fda6cbf51e03f974c7572e80e69) Part-of: commit f12dd2436f2b70dc2fb8e29bee9dfaf907764ca0 Author: Alan Coopersmith Date: Sun Sep 8 11:15:03 2024 -0700 dix: ProcListProperties: skip unneeded work if numProps is 0 No real harm, but clears warning from gcc 14.1: ../dix/property.c: In function ‘ProcListProperties’: ..//dix/property.c:605:27: warning: dereference of NULL ‘temppAtoms’ [CWE-476] [-Wanalyzer-null-dereference] 605 | *temppAtoms++ = pProp->propertyName; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 39f337fd497d6fd95efaae9ff5a62d60b49e16aa) Part-of: commit 83a9950d7a8e365d13acaa1c38136d1b9068f4be Author: Alan Coopersmith Date: Sun Sep 8 11:03:41 2024 -0700 dix: dixChangeWindowProperty: don't call memcpy if malloc failed It shouldn't matter, since it would have a length of 0, but it clears warnings from gcc 14.1: ../dix/property.c: In function ‘dixChangeWindowProperty’: ../dix/property.c:287:9: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 287 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../dix/property.c:324:13: warning: use of possibly-NULL ‘data’ where non-null expected [CWE-690] [-Wanalyzer-possible-null-argument] 324 | memcpy(data, value, totalSize); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 10cafd0bbebfbb92c4e73088ba168ef96fcb983c) Part-of: commit 3bca0f56fa509c57715ad9f2f1742d73f6ffee6d Author: Alan Coopersmith Date: Sun Sep 8 10:41:33 2024 -0700 dix: InitPredictableAccelerationScheme: avoid memory leak on failure Clears warning from gcc 14.1: ../dix/ptrveloc.c: In function ‘InitPredictableAccelerationScheme’: ../dix/ptrveloc.c:149:9: warning: leak of ‘’ [CWE-401] [-Wanalyzer-malloc-leak] 149 | free(vel); | ^~~~~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 462d13c2f6dc25adea1f19e6b621f97b997236af) Part-of: commit 6cefa3a592ce433a203ddc69e0d5bd1d8a0504fd Author: Alan Coopersmith Date: Sun Sep 8 10:03:08 2024 -0700 dix: CreateScratchGC: avoid dereference of pointer we just set to NULL Clears warning from gcc 14.1: ../dix/gc.c: In function ‘CreateScratchGC’: ../dix/gc.c:818:28: warning: dereference of NULL ‘pGC’ [CWE-476] [-Wanalyzer-null-dereference] 818 | pGC->graphicsExposures = FALSE; Signed-off-by: Alan Coopersmith (cherry picked from commit 7ee3a520184b355820923bc7a955d0834eb8afbd) Part-of: commit abaf3c6f204a42006ce1da4fc6d8206477d302e5 Author: Alan Coopersmith Date: Sun Sep 8 09:57:36 2024 -0700 dix: enterleave.c: fix implicit fallthrough warnings Clears 7 -Wimplicit-fallthrough warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit 0cb826e3d0fd366914c34ab18e5917930f6695b4) Part-of: commit 0f10584ec43eb29512ac9c4748eccc7b1d60988b Author: Alan Coopersmith Date: Sun Sep 8 09:45:54 2024 -0700 dix: SetFontPath: don't set errorValue on Success Clears warning from gcc 14.1: ../dix/dixfonts.c: In function ‘SetFontPath’: ../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1697 | client->errorValue = bad; | ~~~~~~~~~~~~~~~~~~~^~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit 1a86fba0d9ae2e107e3ed23519ab3b84d2e5240e) Part-of: commit f9a5bc6532f76758f7a7fd44047731541ebd23d5 Author: Alan Coopersmith Date: Sun Sep 8 09:28:19 2024 -0700 dix: PolyText: fully initialize local_closure Clears warning from gcc 14.1: ../dix/dixfonts.c:1352:15: warning: use of uninitialized value ‘*c.data’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] 1352 | free(c->data); | ~^~~~~~ Signed-off-by: Alan Coopersmith (cherry picked from commit d78836a3a6b827a282957c48898f9ba4cb0dbcf5) Part-of: commit 02e6639547361578e856a079814caef08db5260f Author: Alan Coopersmith Date: Sun Sep 8 09:17:17 2024 -0700 dix: check for calloc() failure in Xi event conversion routines Clears up 12 -Wanalyzer-possible-null-dereference warnings from gcc 14.1 Signed-off-by: Alan Coopersmith (cherry picked from commit 25762834c9a5da3a7c672d89a7da73297252d905) Part-of: commit 111dc7058891bd01b117f3984cf5ac701011e053 Author: Peter Hutterer Date: Mon Jan 22 14:22:12 2024 +1000 dix: fix valuator copy/paste error in the DeviceStateNotify event Fixes 219c54b8a3337456ce5270ded6a67bcde53553d5 (cherry picked from commit 133e0d651c5d12bf01999d6289e84e224ba77adc) Part-of: commit 408432fbd0f51d2404bfcfc60f20de8bac1f6178 Author: Konstantin Date: Sun Jun 26 00:01:54 2022 +0300 glamor: make use of GL_EXT_texture_format_BGRA8888 For 24 and 32 bit depth pictures xserver uses PICT_x8r8g8b8 and PICT_a8r8g8b8 formats, which must be backed with GL_BGRA format. It is present in OpenGL ES 2.0 only with GL_EXT_texture_format_BGRA8888 extension. We require such extension in glamor_init, so, why not to make use of it? Fixes #1208 Fixes #1354 Signed-off-by: Konstantin Pugin Reviewed-by: Adam Jackson Reviewed-by: Emma Anholt (cherry picked from commit 24cd5f34f8edcc6621ed9c0f2b1a3df08de7488d) Part-of: commit 03bbf4b1214b4e9aad153a5969c32264234fe4da Author: Alexey Date: Fri Jun 24 15:12:54 2022 +0000 Fixed mirrored glyphs on big-endian machines (cherry picked from commit 4cf89222701d73d46c098be9fcc8d9eb6d96f885) Part-of: commit b08cb8141b544788d8607fa31e69c089acdb4fa4 Author: Enrico Weigelt, metux IT consult Date: Wed Jul 31 15:11:27 2024 +0200 Xnest: cursor: fix potentially uninitialized memory It's safer to zero-out the cursor-private memory on allocation, instead of relying on being cleared initialized somewhere later. Fixes: 3f3ff971ec - Replace X-allocation functions with their C89 counterparts Backport-Of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1652 Signed-off-by: Enrico Weigelt, metux IT consult Part-of: commit 68129d7369f30e1448f587598d3e2c015329ae38 Author: Olivier Fourdan Date: Tue Jul 23 17:11:55 2024 +0200 build: Drop libxcvt requirement from SDK_REQUIRED_MODULES The SDK doed not need libxcvt, only Xorg and Xwayland do. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1721 Fixes: a4ab57cb7 - build: Add dependency on libxcvt Signed-off-by: Olivier Fourdan Part-of: commit 8407181c7dfe14086d99697af0b86120320ab73e Author: José Expósito Date: Fri Jan 19 13:05:51 2024 +0100 ephyr: Fix incompatible pointer type build error Fix a compilation error on 32 bits architectures with gcc 14: ephyr_glamor_xv.c: In function ‘ephyr_glamor_xv_init’: ephyr_glamor_xv.c:154:31: error: assignment to ‘SetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, int, void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom, INT32, void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, long int, void *)’} [-Wincompatible-pointer-types] 154 | adaptor->SetPortAttribute = ephyr_glamor_xv_set_port_attribute; | ^ ephyr_glamor_xv.c:155:31: error: assignment to ‘GetPortAttributeFuncPtr’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, int *, void *)’} from incompatible pointer type ‘int (*)(KdScreenInfo *, Atom, INT32 *, void *)’ {aka ‘int (*)(struct _KdScreenInfo *, long unsigned int, long int *, void *)’} [-Wincompatible-pointer-types] 155 | adaptor->GetPortAttribute = ephyr_glamor_xv_get_port_attribute; | ^ Build error logs: https://koji.fedoraproject.org/koji/taskinfo?taskID=111964273 Signed-off-by: José Expósito (cherry picked from commit e89edec497bac581ca9b614fb00c25365580f045) Part-of: commit be2767845d6ed3c6dbd25a151051294d0908a995 Author: Matt Turner Date: Fri Apr 12 13:09:23 2024 -0400 xserver 21.1.13 Signed-off-by: Matt Turner commit b4ea6f9eb6b9dfb25e92f617889db21348710173 Author: Olivier Fourdan Date: Fri Apr 5 15:24:49 2024 +0200 render: Avoid possible double-free in ProcRenderAddGlyphs() ProcRenderAddGlyphs() adds the glyph to the glyphset using AddGlyph() and then frees it using FreeGlyph() to decrease the reference count, after AddGlyph() has increased it. AddGlyph() however may chose to reuse an existing glyph if it's already in the glyphSet, and free the glyph that was given, in which case the caller function, ProcRenderAddGlyphs() will call FreeGlyph() on an already freed glyph, as reported by ASan: READ of size 4 thread T0 #0 in FreeGlyph xserver/render/glyph.c:252 #1 in ProcRenderAddGlyphs xserver/render/render.c:1174 #2 in Dispatch xserver/dix/dispatch.c:546 #3 in dix_main xserver/dix/main.c:271 #4 in main xserver/dix/stubmain.c:34 #5 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #6 in __libc_start_main_impl ../csu/libc-start.c:360 #7 (/usr/bin/Xwayland+0x44fe4) Address is located 0 bytes inside of 64-byte region freed by thread T0 here: #0 in __interceptor_free libsanitizer/asan/asan_malloc_linux.cpp:52 #1 in _dixFreeObjectWithPrivates xserver/dix/privates.c:538 #2 in AddGlyph xserver/render/glyph.c:295 #3 in ProcRenderAddGlyphs xserver/render/render.c:1173 #4 in Dispatch xserver/dix/dispatch.c:546 #5 in dix_main xserver/dix/main.c:271 #6 in main xserver/dix/stubmain.c:34 #7 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 previously allocated by thread T0 here: #0 in __interceptor_malloc libsanitizer/asan/asan_malloc_linux.cpp:69 #1 in AllocateGlyph xserver/render/glyph.c:355 #2 in ProcRenderAddGlyphs xserver/render/render.c:1085 #3 in Dispatch xserver/dix/dispatch.c:546 #4 in dix_main xserver/dix/main.c:271 #5 in main xserver/dix/stubmain.c:34 #6 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 SUMMARY: AddressSanitizer: heap-use-after-free xserver/render/glyph.c:252 in FreeGlyph To avoid that, make sure not to free the given glyph in AddGlyph(). v2: Simplify the test using the boolean returned from AddGlyph() (Michel) v3: Simplify even more by not freeing the glyph in AddGlyph() (Peter) Fixes: bdca6c3d1 - render: fix refcounting of glyphs during ProcRenderAddGlyphs Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1659 Signed-off-by: Olivier Fourdan Part-of: (cherry picked from commit 337d8d48b618d4fc0168a7b978be4c3447650b04) commit f54647dfa6e45481282c3650019449379059f113 Author: Willem Jan Palenstijn Date: Sun Mar 31 14:56:58 2024 +0200 mi: fix rounding issues around zero in miPointerSetPosition Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/577 This patch replaces the instances of trunc in miPointerSetPosition by floor, thereby removing the incorrect behaviour with subpixel pointer locations between -1 and 0. This is the relevant code fragment: /* In the event we actually change screen or we get confined, we just * drop the float component on the floor * FIXME: only drop remainder for ConstrainCursorHarder, not for screen * crossings */ if (x != trunc(*screenx)) *screenx = x; if (y != trunc(*screeny)) *screeny = y; The behaviour of this code does not match its comment for subpixel coordinates between -1 and 0. For example, if *screenx is -0.5, the preceding code would (correctly) clamp x to 0, but this would not be detected by this condition, since 0 == trunc(-0.5), leaving *screenx at -0.5, out of bounds. This causes undesirable behaviour in GTK3 code using xi2, where negative subpixel coordinates like this would (to all appearances randomly) remove the focus from windows aligned with the zero boundary when the mouse hits the left or top screen boundaries. The other occurences of trunc in miPointerSetPosition have a more subtle effect which would prevent proper clamping if there is a pointer limit at a negative integer rather than at 0. This patch changes these to floor for consistency. Signed-off-by: Willem Jan Palenstijn Part-of: (cherry picked from commit 0ee4ed286ea238e2ba2ca57227c3e66aca11f56b) commit 101caa1b03bc26b718f4618eb24104add5d14a4b Author: Povilas Kanapickas Date: Wed Apr 3 23:43:42 2024 +0300 xserver 21.1.12 Signed-off-by: Povilas Kanapickas commit 1173156404be826f50f453ca11bda28ccb5a5268 Author: Peter Hutterer Date: Tue Jan 30 13:13:35 2024 +1000 render: fix refcounting of glyphs during ProcRenderAddGlyphs Previously, AllocateGlyph would return a new glyph with refcount=0 and a re-used glyph would end up not changing the refcount at all. The resulting glyph_new array would thus have multiple entries pointing to the same non-refcounted glyphs. AddGlyph may free a glyph, resulting in a UAF when the same glyph pointer is then later used. Fix this by returning a refcount of 1 for a new glyph and always incrementing the refcount for a re-used glyph, followed by dropping that refcount back down again when we're done with it. CVE-2024-31083, ZDI-CAN-22880 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Part-of: (cherry picked from commit bdca6c3d1f5057eeb31609b1280fc93237b00c77) commit 0e34d8ebc98a0ba6f9f0a2f8f5045761bccc45d3 Author: Alan Coopersmith Date: Fri Mar 22 19:07:34 2024 -0700 Xquartz: ProcAppleDRICreatePixmap needs to use unswapped length to send reply CVE-2024-31082 Fixes: 14205ade0 ("XQuartz: appledri: Fix byte swapping in replies") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 6c684d035c06fd41c727f0ef0744517580864cef) commit cea92ca78f900bfb4c9a5540dfd631e065b9151b Author: Alan Coopersmith Date: Fri Mar 22 18:56:27 2024 -0700 Xi: ProcXIPassiveGrabDevice needs to use unswapped length to send reply CVE-2024-31081 Fixes: d220d6907 ("Xi: add GrabButton and GrabKeysym code.") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 3e77295f888c67fc7645db5d0c00926a29ffecee) commit 8a7cd0e3ef194610300c1a38fb5a5423b23dd6a5 Author: Alan Coopersmith Date: Fri Mar 22 18:51:45 2024 -0700 Xi: ProcXIGetSelectedEvents needs to use unswapped length to send reply CVE-2024-31080 Reported-by: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69762 Fixes: 53e821ab4 ("Xi: add request processing for XIGetSelectedEvents.") Signed-off-by: Alan Coopersmith Part-of: (cherry picked from commit 96798fc1967491c80a4d0c8d9e0a80586cb2152b) commit 5ca3a95135d9c89753e2af19da5a2615ea2be1c3 Author: Alan Coopersmith Date: Thu Mar 21 18:08:35 2024 -0700 Xext: SProcSyncCreateFence needs to swap drawable id too Otherwise it causes the server to return BadDrawable giving a byte-swapped resource id instead of the real id the client sent. Reported-by: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69762 Fixes: 397dfd9f8 ("Create/Destroy/Trigger/Reset/Query Fence Sync objs") Signed-off-by: Alan Coopersmith --- (cherry picked from commit e6573baa7d99a77f44229b9a96a41bbda57e2387) Part-of: commit 5d7272f05d9ef6bef93419febee3c9dfc63ec055 Author: Peter Hutterer Date: Sat Mar 23 10:42:33 2024 -0700 Allow disabling byte-swapped clients The X server swapping code is a huge attack surface, much of this code is untested and prone to security issues. The use-case of byte-swapped clients is very niche, so allow users to disable this if they don't need it, using either a config option or commandline flag. For Xorg, this adds the ServerFlag "AllowByteSwappedClients" "off". For all DDX, this adds the commandline options +byteswappedclients and -byteswappedclients to enable or disable, respectively. Fixes #1201 Signed-off-by: Peter Hutterer --- (cherry picked from commit 412777664a20dd3561b936c02c96571a756fe9b2) (cherry picked from commit af5cd5acc9012e527ee869f8e98bf6c2e9a02ca4) Backport to server-21.1-branch modified to keep byte-swapping enabled by default but easy to disable by users or admins (or even by distros shipping an xorg.conf.d fragment in their packages). Signed-off-by: Alan Coopersmith Part-of: commit 8a46a463f631ed52613d67f4088924acbbb6ca20 Author: Matthieu Herrb Date: Sun Dec 5 22:05:08 2021 +0100 Initialize Mode->name in xf86CVTMode() This was overlooked when converting the function to use libxcvt. Bring back name initialization from old code. This was causing a segfault in xf86LookupMode() if modes where name is NULL are present the modePool list. Signed-off-by: Matthieu Herrb --- (cherry picked from ed11c4d443ad2e82512df64358d38008e0ee7693) Reported-by: "Sergiy" Part-of: commit f653d9a0af912e577fab5c02b2a4eb380d33e8bb Author: Yusuf Khan Date: Sat Feb 17 12:38:10 2024 -0800 hw/xfree86: fix NULL pointer refrence to mode name Potentially, the pointer to the mode name could be unset, this can occur with the xf86-video-nv DDX, in that case there isnt much we can do except check if the next mode is any better. Signed-off-by: Yusuf Khan --- (cherry picked from db3aa4e03b180244e8b4b02272c49f1e0c48b463) Part-of: commit 8b75ec34dfbe435cd3a17e64138e22a37395a6d8 Author: Povilas Kanapickas Date: Sun Dec 19 18:11:07 2021 +0200 dix: Fix use after free in input device shutdown This fixes access to freed heap memory via dev->master. E.g. when running BarrierNotify.ReceivesNotifyEvents/7 test from xorg-integration-tests: ==24736==ERROR: AddressSanitizer: heap-use-after-free on address 0x619000065020 at pc 0x55c450e2b9cf bp 0x7fffc532fd20 sp 0x7fffc532fd10 READ of size 4 at 0x619000065020 thread T0 #0 0x55c450e2b9ce in GetMaster ../../../dix/devices.c:2722 #1 0x55c450e9d035 in IsFloating ../../../dix/events.c:346 #2 0x55c4513209c6 in GetDeviceUse ../../../Xi/xiquerydevice.c:525 ../../../Xi/xichangehierarchy.c:95 #4 0x55c450e3455c in RemoveDevice ../../../dix/devices.c:1204 ../../../hw/xfree86/common/xf86Xinput.c:1142 #6 0x55c450e17b04 in CloseDeviceList ../../../dix/devices.c:1038 #7 0x55c450e1de85 in CloseDownDevices ../../../dix/devices.c:1068 #8 0x55c450e837ef in dix_main ../../../dix/main.c:302 #9 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) #11 0x55c450d0113d in _start (/usr/lib/xorg/Xorg+0x117713d) 0x619000065020 is located 160 bytes inside of 912-byte region [0x619000064f80,0x619000065310) freed by thread T0 here: (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10d7cf) #1 0x55c450e19f1c in CloseDevice ../../../dix/devices.c:1014 #2 0x55c450e343a4 in RemoveDevice ../../../dix/devices.c:1186 ../../../hw/xfree86/common/xf86Xinput.c:1142 #4 0x55c450e17b04 in CloseDeviceList ../../../dix/devices.c:1038 #5 0x55c450e1de85 in CloseDownDevices ../../../dix/devices.c:1068 #6 0x55c450e837ef in dix_main ../../../dix/main.c:302 #7 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) previously allocated by thread T0 here: (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10ddc6) #1 0x55c450e1c57b in AddInputDevice ../../../dix/devices.c:259 #2 0x55c450e34840 in AllocDevicePair ../../../dix/devices.c:2755 #3 0x55c45130318f in add_master ../../../Xi/xichangehierarchy.c:152 ../../../Xi/xichangehierarchy.c:465 #5 0x55c4512cb9f5 in ProcIDispatch ../../../Xi/extinit.c:390 #6 0x55c450e6a92b in Dispatch ../../../dix/dispatch.c:551 #7 0x55c450e834b7 in dix_main ../../../dix/main.c:272 #8 0x55c4517a8d93 in main ../../../dix/stubmain.c:34 (/lib/x86_64-linux-gnu/libc.so.6+0x28564) The problem is caused by dev->master being not reset when disabling the device, which then causes dangling pointer when the master device itself is being deleted when exiting whole server. Note that RecalculateMasterButtons() requires dev->master to be still valid, so we can reset it only at the end of function. Signed-off-by: Povilas Kanapickas (cherry picked from commit 1801fe0ac3926882d47d7e1ad6c0518a2cdffd41) commit 31407c0199da877b359b2e37bb371804321279b7 Author: José Expósito Date: Tue Jan 16 10:15:15 2024 +0100 xserver 21.1.11 Signed-off-by: José Expósito commit a4f0e9466f3bc7073a8f0c28a581211c2d7adf0e Author: Olivier Fourdan Date: Wed Dec 6 11:51:56 2023 +0100 ephyr,xwayland: Use the proper private key for cursor The cursor in DIX is actually split in two parts, the cursor itself and the cursor bits, each with their own devPrivates. The cursor itself includes the cursor bits, meaning that the cursor bits devPrivates in within structure of the cursor. Both Xephyr and Xwayland were using the private key for the cursor bits to store the data for the cursor, and when using XSELINUX which comes with its own special devPrivates, the data stored in that cursor bits' devPrivates would interfere with the XSELINUX devPrivates data and the SELINUX security ID would point to some other unrelated data, causing a crash in the XSELINUX code when trying to (re)use the security ID. CVE-2024-0409 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer (cherry picked from commit 2ef0f1116c65d5cb06d7b6d83f8a1aea702c94f7) commit 8d825f72da71d6c38cbb02cf2ee2dd9e0e0f50f2 Author: Olivier Fourdan Date: Wed Dec 6 12:09:41 2023 +0100 glx: Call XACE hooks on the GLX buffer The XSELINUX code will label resources at creation by checking the access mode. When the access mode is DixCreateAccess, it will call the function to label the new resource SELinuxLabelResource(). However, GLX buffers do not go through the XACE hooks when created, hence leaving the resource actually unlabeled. When, later, the client tries to create another resource using that drawable (like a GC for example), the XSELINUX code would try to use the security ID of that object which has never been labeled, get a NULL pointer and crash when checking whether the requested permissions are granted for subject security ID. To avoid the issue, make sure to call the XACE hooks when creating the GLX buffers. Credit goes to Donn Seeley for providing the patch. CVE-2024-0408 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer (cherry picked from commit e5e8586a12a3ec915673edffa10dc8fe5e15dac3) commit 5c4816afa7722ea47d1a7dea983a953e7b454d26 Author: Peter Hutterer Date: Fri Jan 5 09:40:27 2024 +1000 dix: when disabling a master, float disabled slaved devices too Disabling a master device floats all slave devices but we didn't do this to already-disabled slave devices. As a result those devices kept their reference to the master device resulting in access to already freed memory if the master device was removed before the corresponding slave device. And to match this behavior, also forcibly reset that pointer during CloseDownDevices(). Related to CVE-2024-21886, ZDI-CAN-22840 (cherry picked from commit 26769aa71fcbe0a8403b7fb13b7c9010cc07c3a8) commit 7b5694368b3f3b039fb523e66b816c1323f3cc39 Author: José Expósito Date: Fri Dec 22 18:28:31 2023 +0100 Xi: do not keep linked list pointer during recursion The `DisableDevice()` function is called whenever an enabled device is disabled and it moves the device from the `inputInfo.devices` linked list to the `inputInfo.off_devices` linked list. However, its link/unlink operation has an issue during the recursive call to `DisableDevice()` due to the `prev` pointer pointing to a removed device. This issue leads to a length mismatch between the total number of devices and the number of device in the list, leading to a heap overflow and, possibly, to local privilege escalation. Simplify the code that checked whether the device passed to `DisableDevice()` was in `inputInfo.devices` or not and find the previous device after the recursion. CVE-2024-21886, ZDI-CAN-22840 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit bc1fdbe46559dd947674375946bbef54dd0ce36b) commit 6236342157b9ddc9a4ebb3438e469a8cb37eaecb Author: Peter Hutterer Date: Thu Jan 4 10:01:24 2024 +1000 Xi: flush hierarchy events after adding/removing master devices The `XISendDeviceHierarchyEvent()` function allocates space to store up to `MAXDEVICES` (256) `xXIHierarchyInfo` structures in `info`. If a device with a given ID was removed and a new device with the same ID added both in the same operation, the single device ID will lead to two info structures being written to `info`. Since this case can occur for every device ID at once, a total of two times `MAXDEVICES` info structures might be written to the allocation. To avoid it, once one add/remove master is processed, send out the device hierarchy event for the current state and continue. That event thus only ever has exactly one of either added/removed in it (and optionally slave attached/detached). CVE-2024-21885, ZDI-CAN-22744 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 4a5e9b1895627d40d26045bd0b7ef3dce503cbd1) commit 8887cb1f27c72324b50383b644cefb960e21f5ff Author: Peter Hutterer Date: Thu Dec 21 13:48:10 2023 +1000 Xi: when creating a new ButtonClass, set the number of buttons There's a racy sequence where a master device may copy the button class from the slave, without ever initializing numButtons. This leads to a device with zero buttons but a button class which is invalid. Let's copy the numButtons value from the source - by definition if we don't have a button class yet we do not have any other slave devices with more than this number of buttons anyway. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit df3c65706eb169d5938df0052059f3e0d5981b74) commit 7173a8911ebeaa7c9c12bd64a2ba9c8685c6593c Author: Peter Hutterer Date: Mon Dec 18 12:26:20 2023 +1000 dix: fix DeviceStateNotify event calculation The previous code only made sense if one considers buttons and keys to be mutually exclusive on a device. That is not necessarily true, causing a number of issues. This function allocates and fills in the number of xEvents we need to send the device state down the wire. This is split across multiple 32-byte devices including one deviceStateNotify event and optional deviceKeyStateNotify, deviceButtonStateNotify and (possibly multiple) deviceValuator events. The previous behavior would instead compose a sequence of [state, buttonstate, state, keystate, valuator...]. This is not protocol correct, and on top of that made the code extremely convoluted. Fix this by streamlining: add both button and key into the deviceStateNotify and then append the key state and button state, followed by the valuators. Finally, the deviceValuator events contain up to 6 valuators per event but we only ever sent through 3 at a time. Let's double that troughput. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 219c54b8a3337456ce5270ded6a67bcde53553d5) commit c494debaa76c923621e6b9f54bbd59ed47842b30 Author: Peter Hutterer Date: Mon Dec 18 14:27:50 2023 +1000 dix: Allocate sufficient xEvents for our DeviceStateNotify If a device has both a button class and a key class and numButtons is zero, we can get an OOB write due to event under-allocation. This function seems to assume a device has either keys or buttons, not both. It has two virtually identical code paths, both of which assume they're applying to the first event in the sequence. A device with both a key and button class triggered a logic bug - only one xEvent was allocated but the deviceStateNotify pointer was pushed on once per type. So effectively this logic code: int count = 1; if (button && nbuttons > 32) count++; if (key && nbuttons > 0) count++; if (key && nkeys > 32) count++; // this is basically always true // count is at 2 for our keys + zero button device ev = alloc(count * sizeof(xEvent)); FixDeviceStateNotify(ev); if (button) FixDeviceStateNotify(ev++); if (key) FixDeviceStateNotify(ev++); // santa drops into the wrong chimney here If the device has more than 3 valuators, the OOB is pushed back - we're off by one so it will happen when the last deviceValuator event is written instead. Fix this by allocating the maximum number of events we may allocate. Note that the current behavior is not protocol-correct anyway, this patch fixes only the allocation issue. Note that this issue does not trigger if the device has at least one button. While the server does not prevent a button class with zero buttons, it is very unlikely. CVE-2024-0229, ZDI-CAN-22678 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit ece23be888a93b741aa1209d1dbf64636109d6a5) commit 4e78bc3a6e593f70aa5306b314edbec03d2f9081 Author: Peter Hutterer Date: Thu Dec 14 11:29:49 2023 +1000 dix: allocate enough space for logical button maps Both DeviceFocusEvent and the XIQueryPointer reply contain a bit for each logical button currently down. Since buttons can be arbitrarily mapped to anything up to 255 make sure we have enough bits for the maximum mapping. CVE-2023-6816, ZDI-CAN-22664, ZDI-CAN-22665 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 9e2ecb2af8302dedc49cb6a63ebe063c58a9e7e3) commit c338d19f743ca5872ff74d6f2ce5d37d3b7f4a2a Author: Michael Wyraz Date: Fri Oct 14 15:07:27 2022 +0200 Removing the code that deletes an existing monitor in RRMonitorAdd In commit 7e1f86d4 monitor support was added to randr. At this time it seemed to be reasonable not to have more than one (virtual) monitor on a particular physical display. The code was never changed since. Nowadays, extremely large displays exists (4k displays, ultra-wide displays). In some use cases it makes sense to split these large physical displays into multiple virtual monitors. An example are ultra-wide screens that can be split into 2 monitors. The change in this commit makes this work. Besides that, removing a monitor in a function that is called "RRMonitorAdd" is bad practice and causes unexpected behaviour. commit 15e2409776014b41c77f7da7aeb9520613994d27 Author: Peter Hutterer Date: Wed Dec 13 11:12:59 2023 +1000 xserver 21.1.10 Signed-off-by: Peter Hutterer commit a7bda3080d2b44eae668cdcec7a93095385b9652 Author: Peter Hutterer Date: Tue Nov 28 15:19:04 2023 +1000 Xi: allocate enough XkbActions for our buttons button->xkb_acts is supposed to be an array sufficiently large for all our buttons, not just a single XkbActions struct. Allocating insufficient memory here means when we memcpy() later in XkbSetDeviceInfo we write into memory that wasn't ours to begin with, leading to the usual security ooopsiedaisies. CVE-2023-6377, ZDI-CAN-22412, ZDI-CAN-22413 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 0c1a93d319558fe3ab2d94f51d174b4f93810afd) commit 58e83c683950ac9e253ab05dd7a13a8368b70a3c Author: Peter Hutterer Date: Mon Nov 27 16:27:49 2023 +1000 randr: avoid integer truncation in length check of ProcRRChange*Property Affected are ProcRRChangeProviderProperty and ProcRRChangeOutputProperty. See also xserver@8f454b79 where this same bug was fixed for the core protocol and XI. This fixes an OOB read and the resulting information disclosure. Length calculation for the request was clipped to a 32-bit integer. With the correct stuff->nUnits value the expected request size was truncated, passing the REQUEST_FIXED_SIZE check. The server then proceeded with reading at least stuff->num_items bytes (depending on stuff->format) from the request and stuffing whatever it finds into the property. In the process it would also allocate at least stuff->nUnits bytes, i.e. 4GB. CVE-2023-6478, ZDI-CAN-22561 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative (cherry picked from commit 14f480010a93ff962fef66a16412fafff81ad632) commit c1ad8df2fc570c482af832681260864b98c47791 Author: nerdopolis Date: Tue Jan 11 18:41:42 2022 -0500 xephyr: Don't check for SeatId anymore After a change for the xserver to automatically determine the seat based on the XDG_SEAT variable, xephyr stopped working. This was because of an old feature where xephyr used to handle evdev directly. This was dropped some time ago, and now this check is not needed (cherry picked from commit 4c03b67d334b05b814239420776f2fdd4c4a98ac) commit 6197bea02eec072c19aa5365962e89949e674099 Author: Peter Hutterer Date: Wed Oct 25 11:05:28 2023 +1000 xserver 21.1.9 Signed-off-by: Peter Hutterer commit 3e290b3c7c3018acf1f08979d014fe3941c94f84 Author: Peter Hutterer Date: Thu Oct 5 12:19:45 2023 +1000 mi: reset the PointerWindows reference on screen switch PointerWindows[] keeps a reference to the last window our sprite entered - changes are usually handled by CheckMotion(). If we switch between screens via XWarpPointer our dev->spriteInfo->sprite->win is set to the new screen's root window. If there's another window at the cursor location CheckMotion() will trigger the right enter/leave events later. If there is not, it skips that process and we never trigger LeaveWindow() - PointerWindows[] for the device still refers to the previous window. If that window is destroyed we have a dangling reference that will eventually cause a use-after-free bug when checking the window hierarchy later. To trigger this, we require: - two protocol screens - XWarpPointer to the other screen's root window - XDestroyWindow before entering any other window This is a niche bug so we hack around it by making sure we reset the PointerWindows[] entry so we cannot have a dangling pointer. This doesn't handle Enter/Leave events correctly but the previous code didn't either. CVE-2023-5380, ZDI-CAN-21608 This vulnerability was discovered by: Sri working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson (cherry picked from commit 564ccf2ce9616620456102727acb8b0256b7bbd7) commit f2922f6ffa871b0d549878303ca09bc53cdadcf8 Author: Peter Hutterer Date: Tue Oct 3 11:53:05 2023 +1000 Xi/randr: fix handling of PropModeAppend/Prepend The handling of appending/prepending properties was incorrect, with at least two bugs: the property length was set to the length of the new part only, i.e. appending or prepending N elements to a property with P existing elements always resulted in the property having N elements instead of N + P. Second, when pre-pending a value to a property, the offset for the old values was incorrect, leaving the new property with potentially uninitalized values and/or resulting in OOB memory writes. For example, prepending a 3 element value to a 5 element property would result in this 8 value array: [N, N, N, ?, ?, P, P, P ] P, P ^OOB write The XI2 code is a copy/paste of the RandR code, so the bug exists in both. CVE-2023-5367, ZDI-CAN-22153 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 541ab2ecd41d4d8689e71855d93e492bc554719a) commit 2c33ee9f1d6da648a5176795608eb3138ef46e49 Author: Sam James Date: Wed Aug 2 12:33:19 2023 +0100 Switch to libbsd-overlay This is more portable than libbsd as everything Just Works, even on BSD systems, and is the recommended method of consuming libbsd nowadays. It also helpfully lets things work with glibc-provided functions for new enough glibc. [For the 21.1.x backport, take inspiration from @alanc's commit to libxdmcp at https://gitlab.freedesktop.org/xorg/lib/libxdmcp/-/commit/c01da8ebd0969efd15388ce999e121127cc46f67.] Closes: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/973 Co-authored-by: Guillem Jover (cherry picked from commit 94945a52746ee2612c6cd394692f49e2ed5fc56b) Signed-off-by: Sam James commit b98fc07d3442a289c6bef82df50dd0a2d01de71a Author: Adam Jackson Date: Thu Feb 2 12:26:27 2023 -0500 present: Send a PresentConfigureNotify event for destroyed windows This enables fixing a deadlock case on the client side, where the client ends up blocked waiting for a Present event that will never come because the window was destroyed. The new PresentWindowDestroyed flag allows the client to avoid blocking indefinitely. Signed-off-by: Adam Jackson See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/116 See-also: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6685 Reviewed-by: Michel Dänzer (cherry picked from commit 462b06033e66a32308d940eb5fc47f5e4c914dc0) commit 7c791b15504cc86a929acaa88161f012cdbba59f Author: Olivier Fourdan Date: Wed Mar 29 13:58:30 2023 +0200 xserver 21.1.8 Signed-off-by: Olivier Fourdan commit fb51d5dd53b02422ea3b6f36bd017488d41f472d Author: Olivier Fourdan Date: Mon Mar 13 11:08:47 2023 +0100 composite: Fix use-after-free of the COW ZDI-CAN-19866/CVE-2023-1393 If a client explicitly destroys the compositor overlay window (aka COW), we would leave a dangling pointer to that window in the CompScreen structure, which will trigger a use-after-free later. Make sure to clear the CompScreen pointer to the COW when the latter gets destroyed explicitly by the client. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson (cherry picked from commit 26ef545b3502f61ca722a7a3373507e88ef64110) commit 6bed5cfd515b9634ecf73fb884e4ec3388e8b7eb Author: Benno Schulenberg Date: Mon Mar 27 20:03:56 2023 +0200 xkbUtils: use existing symbol names instead of deleted deprecated ones Symbols `XK_Cyrillic_DZHE` and `XK_Serbian_DZE` were pure synonyms. (cherry picked from commit 6153c71cfb4698f1a416266564ecc748e4a25f2c) commit af9111ac7fa399a5a33fbfa145060e1850f41e0e Author: Peter Hutterer Date: Tue Feb 7 10:30:37 2023 +1000 xserver 21.1.7 Signed-off-by: Peter Hutterer commit 9ca7d3f61a88ae6cf47fdf139b6215d745db976b Author: Peter Hutterer Date: Wed Jan 25 11:41:40 2023 +1000 Xi: fix potential use-after-free in DeepCopyPointerClasses CVE-2023-0494, ZDI-CAN-19596 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 0ba6d8c37071131a49790243cdac55392ecf71ec) commit 4b925d388f76764dcb02dfd1cd7276262dcd7d74 Author: Mike Gorse Date: Wed Jan 25 02:02:48 2023 +0000 dix: Use CopyPartialInternalEvent in EnqueueEvent The event might be a DeviceEvent allocated on the stack, in AccessXKeyboardEvent for instance. Fixes out-of-bounds read. Signed-off-by: Mike Gorse (cherry picked from commit 2ef5ef57bd37a8bec2ac454053b283c6f87c3b40) commit 44d6c82ac82a78d904a6d47387ac363d9699b891 Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 10:38:41 2023 -0800 darwin: Implement DetermineClientCmd for macOS Withoug a proper implementation of DetermineClientCmd, clients that connect via an ssh tunnel are miscategorized as local. This results in failures when we try to use SCM_RIGHTS (eg: in MIT-SHM). Fixes: https://github.com/XQuartz/XQuartz/issues/314 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 0ea9b595891f2f31915538192961f3404d9ca699) commit 1317083fbc407dc9dbb04ba5b98187b75222a16f Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 12:19:05 2023 -0800 os: Use LOCAL_PEERPID from sys/un.h if it is available to detemine the pid when falling back on getpeereids() This provides a way to determine the pid of a peer connection on systems like darwin that do not support getpeerucred() nor SO_PEERCRED. Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 8a4ab2287398773a4868c220662d93bf84ec6241) commit a6c49106cef36e84eb11d64e325465250b7678be Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 12:02:54 2023 -0800 os: Update GetLocalClientCreds to prefer getpeerucred() or SO_PEERCRED over getpeereid() GetLocalClientCreds() was preferring getpeereid() above other implementations. getpeereid(), however, only returns the effective uid and gid of the peer, leaving the pid unset. When this happens, we are unable to use the pid to determine the peer's command line arguments and incorrectly treat ssh-tunneled traffic as local. To address this, we now prioritize getpeerucred() or SO_PEERCRED as those two implementations will return the pid in addition to uid and gid. Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 165d5c1260edcb998c5cf31d3969723c7452aa7f) commit a220f53cb81248d06fb6f044c102c6ab8bffe2d5 Author: Jeremy Huddleston Sequoia Date: Wed Jan 18 10:44:27 2023 -0800 os: Update AllocNewConnection() debug logging to include whether or not the client is local Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 2577291f010e07173d0fc8b310ac355928f8ed7d) commit 07f9689507eee11bdbc2828ac1319fbde91ad27c Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 22:25:49 2022 -0800 Revert "meson: Don't build COMPOSITE for XQuartz" This will allow us to remove build-time conditionalization on COMPOSITE while still allowing XQuartz to disable it and use ROOTLESS. This reverts commit 5f2d652377995c0c0c3cf07463b5018450661d13 (cherry picked from commit 66e7b7349dffda6fef51ed029fdc91b787ca4c08) commit 8ea43dd8bf8f8f2cb82a2a1f2c004ee873e7810d Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 22:23:43 2022 -0800 xquartz: Disable COMPOSITE at runtime Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 2567388a2957cef526df1b7efb2684aa74feb641) commit aa0d8d440c39beb276cd26723d822728ce394e01 Author: Jeremy Huddleston Sequoia Date: Tue Jan 17 07:33:19 2023 -0800 xquartz: Update the about box copyright to 2023 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 15077090d371a2679d274c5d129a3102762d18ec) commit 8feba178f8b73b983033c197c384c580a6397a41 Author: Jeremy Huddleston Sequoia Date: Sat Jan 14 23:33:59 2023 -0800 xquartz: Fix building with autoconf Regressed-in: 5d302c378d9d21b34db2434425b766ac4f05de89 Signed-off-by: Jeremy Huddleston Sequoia commit c8ef9e38187e00dbaf956893f987e15e8f42f61c Author: Olivier Fourdan Date: Tue Jul 12 14:44:48 2022 +0200 dix: Fix overzealous caching of ResourceClientBits() Commit c7311654 cached the value of ResourceClientBits(), but that value depends on the `MaxClients` value set either from the command line or from the configuration file. For the latter, a call to ResourceClientBits() is issued before the configuration file is read, meaning that the cached value is from the default, not from the maximum number of clients set in the configuration file. That obviously causes all sort of issues, including memory corruption and crashes of the Xserver when reaching the default limit value. To avoid that issue, also keep the LimitClient value, and recompute the ilog2() value if that changes, as on startup when the value is set from the the xorg.conf ServerFlags section. v2: Drop the `cache == 0` test Rename cache vars Fixes: c7311654 - dix: cache ResourceClientBits() value Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1310 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson (cherry picked from commit 2efa6d659508346358a1ef27b2393e18843f66a3) commit a0216de2367429788be4ef430026ada215106ff5 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 23:45:13 2022 -0800 rootless: Add additional debug logging to help triage XQuartz fb/rootless/damage crashes Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 07ed1a623a4b36cdb741a322008ba53d913dc765) commit 264272f3d76e4f1e50d984640c57de77aca9ba37 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 17:07:46 2022 -0800 xquartz: Use xorg_backtrace() instead of rolling our own for debugging Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit d1a9a50792110683ae3f993eeeffeee79cf9cbce) commit 20f380c6d93be3ef561251584163d1fe1ae2d966 Author: Jeremy Huddleston Sequoia Date: Wed Dec 21 01:18:11 2022 -0800 xquartz: Ignore SIGPIPE at process launch Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9a66690eaf67c19b90e07f39b16436d34b59e27a) commit 59b6fc88ed9f4b22397a568c2483e4c558856ffa Author: Olivier Fourdan Date: Mon Dec 19 10:46:20 2022 +0100 xserver 21.1.6 Signed-off-by: Olivier Fourdan commit b7760d41c177983c2f2fca2ebdb8105628291720 Author: Peter Hutterer Date: Mon Dec 19 10:06:45 2022 +1000 Xext: fix invalid event type mask in XTestSwapFakeInput In commit b320ca0 the mask was inadvertently changed from octal 0177 to hexadecimal 0x177. Fixes commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63 Xtest: disallow GenericEvents in XTestSwapFakeInput Found by Stuart Cassoff Signed-off-by: Peter Hutterer (cherry picked from commit bb1711b7fba42f2a0c7d1c09beee241a1b2bcc30) commit 69ab3bcaa0f6a5adef6ec19161eb856a4744b32c Author: Peter Hutterer Date: Wed Jul 13 11:23:09 2022 +1000 xkb: fix some possible memleaks in XkbGetKbdByName GetComponentByName returns an allocated string, so let's free that if we fail somewhere. Signed-off-by: Peter Hutterer (cherry picked from commit 18f91b950e22c2a342a4fbc55e9ddf7534a707d2) commit 5dbb2b52cfeab212b5c9b7e344692a6384efdc4c Author: Peter Hutterer Date: Tue Jul 5 12:06:20 2022 +1000 xkb: proof GetCountedString against request length attacks GetCountedString did a check for the whole string to be within the request buffer but not for the initial 2 bytes that contain the length field. A swapped client could send a malformed request to trigger a swaps() on those bytes, writing into random memory. Signed-off-by: Peter Hutterer (cherry picked from commit 11beef0b7f1ed290348e45618e5fa0d2bffcb72e) commit becf9d51c33a21e7700b18bb2324f466bb966de5 Author: Jeremy Huddleston Sequoia Date: Wed Dec 14 00:13:34 2022 -0800 xquartz: Fix some formatting Signed-off-by: Jeremy Huddleston Sequoia commit 61d18bed664769b1d94ea1320e27f71560a01af2 Author: John D Pell Date: Tue Jul 13 23:46:28 2021 -0700 XQuartz: stub: Call LSOpenApplication instead of fork()/exec() Reviewed-by: Jeremy Huddleston Sequoia commit f292fbfaac0c653ee49bbb24deb3add2b5da602f Author: Peter Hutterer Date: Wed Dec 14 11:34:41 2022 +1000 xserver 21.1.5 Signed-off-by: Peter Hutterer commit e860bbce4fdb169e84033529331ae2666e679de7 Author: Peter Hutterer Date: Mon Dec 5 15:55:54 2022 +1000 xkb: reset the radio_groups pointer to NULL after freeing it Unlike other elements of the keymap, this pointer was freed but not reset. On a subsequent XkbGetKbdByName request, the server may access already freed memory. CVE-2022-4283, ZDI-CAN-19530 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit ccdd431cd8f1cabae9d744f0514b6533c438908c) commit 8a1fa008b2f90abce6cabb27d9bc2ed76d07b678 Author: Peter Hutterer Date: Tue Nov 29 13:26:57 2022 +1000 Xi: avoid integer truncation in length check of ProcXIChangeProperty This fixes an OOB read and the resulting information disclosure. Length calculation for the request was clipped to a 32-bit integer. With the correct stuff->num_items value the expected request size was truncated, passing the REQUEST_FIXED_SIZE check. The server then proceeded with reading at least stuff->num_items bytes (depending on stuff->format) from the request and stuffing whatever it finds into the property. In the process it would also allocate at least stuff->num_items bytes, i.e. 4GB. The same bug exists in ProcChangeProperty and ProcXChangeDeviceProperty, so let's fix that too. CVE-2022-46344, ZDI-CAN 19405 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 8f454b793e1f13c99872c15f0eed1d7f3b823fe8) commit 40f431de8a76f737c68ae659fee8472583f15e49 Author: Peter Hutterer Date: Tue Nov 29 13:24:00 2022 +1000 Xi: return an error from XI property changes if verification failed Both ProcXChangeDeviceProperty and ProcXIChangeProperty checked the property for validity but didn't actually return the potential error. Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b8a84cb0f2807b07ab70ca9915fcdee21301b8ca) commit d6c7de9eadca980c8ce3b3b7752b67bfa95e6f31 Author: Peter Hutterer Date: Tue Nov 29 14:53:07 2022 +1000 Xext: free the screen saver resource when replacing it This fixes a use-after-free bug: When a client first calls ScreenSaverSetAttributes(), a struct ScreenSaverAttrRec is allocated and added to the client's resources. When the same client calls ScreenSaverSetAttributes() again, a new struct ScreenSaverAttrRec is allocated, replacing the old struct. The old struct was freed but not removed from the clients resources. Later, when the client is destroyed the resource system invokes ScreenSaverFreeAttr and attempts to clean up the already freed struct. Fix this by letting the resource system free the old attrs instead. CVE-2022-46343, ZDI-CAN 19404 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 842ca3ccef100ce010d1d8f5f6d6cc1915055900) commit 67927cc41f452228188bbe2aa34a9ee4a9ce0c6b Author: Peter Hutterer Date: Wed Nov 30 11:20:40 2022 +1000 Xext: free the XvRTVideoNotify when turning off from the same client This fixes a use-after-free bug: When a client first calls XvdiSelectVideoNotify() on a drawable with a TRUE onoff argument, a struct XvVideoNotifyRec is allocated. This struct is added twice to the resources: - as the drawable's XvRTVideoNotifyList. This happens only once per drawable, subsequent calls append to this list. - as the client's XvRTVideoNotify. This happens for every client. The struct keeps the ClientPtr around once it has been added for a client. The idea, presumably, is that if the client disconnects we can remove all structs from the drawable's list that match the client (by resetting the ClientPtr to NULL), but if the drawable is destroyed we can remove and free the whole list. However, if the same client then calls XvdiSelectVideoNotify() on the same drawable with a FALSE onoff argument, only the ClientPtr on the existing struct was set to NULL. The struct itself remained in the client's resources. If the drawable is now destroyed, the resource system invokes XvdiDestroyVideoNotifyList which frees the whole list for this drawable - including our struct. This function however does not free the resource for the client since our ClientPtr is NULL. Later, when the client is destroyed and the resource system invokes XvdiDestroyVideoNotify, we unconditionally set the ClientPtr to NULL. On a struct that has been freed previously. This is generally frowned upon. Fix this by calling FreeResource() on the second call instead of merely setting the ClientPtr to NULL. This removes the struct from the client resources (but not from the list), ensuring that it won't be accessed again when the client quits. Note that the assignment tpn->client = NULL; is superfluous since the XvdiDestroyVideoNotify function will do this anyway. But it's left for clarity and to match a similar invocation in XvdiSelectPortNotify. CVE-2022-46342, ZDI-CAN 19400 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b79f32b57cc0c1186b2899bce7cf89f7b325161b) commit a6c0d7b142e762a6b9934a23e060ea91ff5afcea Author: Peter Hutterer Date: Tue Nov 29 13:55:32 2022 +1000 Xi: disallow passive grabs with a detail > 255 The XKB protocol effectively prevents us from ever using keycodes above 255. For buttons it's theoretically possible but realistically too niche to worry about. For all other passive grabs, the detail must be zero anyway. This fixes an OOB write: ProcXIPassiveUngrabDevice() calls DeletePassiveGrabFromList with a temporary grab struct which contains tempGrab->detail.exact = stuff->detail. For matching existing grabs, DeleteDetailFromMask is called with the stuff->detail value. This function creates a new mask with the one bit representing stuff->detail cleared. However, the array size for the new mask is 8 * sizeof(CARD32) bits, thus any detail above 255 results in an OOB array write. CVE-2022-46341, ZDI-CAN 19381 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit 51eb63b0ee1509c6c6b8922b0e4aa037faa6f78b) commit 936d34bdff4c479ccd0405fc221ff8e4c6c7014d Author: Peter Hutterer Date: Tue Nov 29 12:55:45 2022 +1000 Xtest: disallow GenericEvents in XTestSwapFakeInput XTestSwapFakeInput assumes all events in this request are sizeof(xEvent) and iterates through these in 32-byte increments. However, a GenericEvent may be of arbitrary length longer than 32 bytes, so any GenericEvent in this list would result in subsequent events to be misparsed. Additional, the swapped event is written into a stack-allocated struct xEvent (size 32 bytes). For any GenericEvent longer than 32 bytes, swapping the event may thus smash the stack like an avocado on toast. Catch this case early and return BadValue for any GenericEvent. Which is what would happen in unswapped setups anyway since XTest doesn't support GenericEvent. CVE-2022-46340, ZDI-CAN 19265 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer Acked-by: Olivier Fourdan (cherry picked from commit b320ca0ffe4c0c872eeb3a93d9bde21f765c7c63) commit 5f2d652377995c0c0c3cf07463b5018450661d13 Author: Jeremy Huddleston Sequoia Date: Sun Nov 27 15:04:13 2022 -0800 meson: Don't build COMPOSITE for XQuartz Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9c0373366988cc0b909ba31e61c43cc46e054b40) commit 3dee0aac2c0ed4538880b65ee528e4633d103592 Author: Jeremy Huddleston Sequoia Date: Thu Nov 24 10:58:26 2022 -0800 xquartz: Move default applications list outside of the main executable This will allow side-wide customization. Fixes: https://github.com/XQuartz/XQuartz/issues/274 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit e654de80ed560c480efc072d876808b1d78da052) commit 5d302c378d9d21b34db2434425b766ac4f05de89 Author: Jeremy Huddleston Sequoia Date: Thu Nov 24 11:04:08 2022 -0800 xquartz: Remove unused macro (X11LIBDIR) Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 3dbd809c0e2d8da4191dd4a3fd4abdd14be0d838) commit 6bf62381d0a1fb54226a10f9d0e6b03aff12f3aa Author: Povilas Kanapickas Date: Tue Jul 12 16:09:23 2022 +0300 xserver 21.1.4 commit 06b23cccb1166fcccc2f5fe7259b3ef9e1d0f32e Author: Peter Hutterer Date: Tue Jul 5 11:11:06 2022 +1000 xkb: add request length validation for XkbSetGeometry No validation of the various fields on that report were done, so a malicious client could send a short request that claims it had N sections, or rows, or keys, and the server would process the request for N sections, running out of bounds of the actual request data. Fix this by adding size checks to ensure our data is valid. ZDI-CAN 16062, CVE-2022-2319. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Peter Hutterer (cherry picked from commit 6907b6ea2b4ce949cb07271f5b678d5966d9df42) commit e3a530540f2f13739b0233ec51d7a3985a7ec4be Author: Peter Hutterer Date: Tue Jul 5 09:50:41 2022 +1000 xkb: swap XkbSetDeviceInfo and XkbSetDeviceInfoCheck XKB often uses a FooCheck and Foo function pair, the former is supposed to check all values in the request and error out on BadLength, BadValue, etc. The latter is then called once we're confident the values are good (they may still fail on an individual device, but that's a different topic). In the case of XkbSetDeviceInfo, those functions were incorrectly named, with XkbSetDeviceInfo ending up as the checker function and XkbSetDeviceInfoCheck as the setter function. As a result, the setter function was called before the checker function, accessing request data and modifying device state before we ensured that the data is valid. In particular, the setter function relied on values being already byte-swapped. This in turn could lead to potential OOB memory access. Fix this by correctly naming the functions and moving the length checks over to the checker function. These were added in 87c64fc5b0 to the wrong function, probably due to the incorrect naming. Fixes ZDI-CAN 16070, CVE-2022-2320. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Introduced in c06e27b2f6fd9f7b9f827623a48876a225264132 Signed-off-by: Peter Hutterer (cherry picked from commit dd8caf39e9e15d8f302e54045dd08d8ebf1025dc) commit e75840565775dc95b848b366aeed44066a9d8a28 Author: Peter Hutterer Date: Tue Jul 5 12:40:47 2022 +1000 xkb: switch to array index loops to moving pointers Most similar loops here use a pointer that advances with each loop iteration, let's do the same here for consistency. No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan (cherry picked from commit f1070c01d616c5f21f939d5ebc533738779451ac) commit f3d9c6ff12b5a8a1a9f316b096d5573060747ff9 Author: Jeremy Huddleston Sequoia Date: Mon Jul 4 14:16:43 2022 -0700 xquartz: Add missing files to distribution tarball Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1346 Signed-off-by: Jeremy Huddleston Sequoia commit 147c17fc786c268ec51dc0f0655e69f6493f7ef2 Author: Jeremy Huddleston Sequoia Date: Sat Jul 2 14:15:50 2022 -0700 XQuartz: Improve type safety for X11Controller's application menu editor Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4cfdc5af31ae8282903d0f65cff858330b9f9d1a) commit 9e2fc7e2484be7c577ee5baf3765734beef9adc2 Author: Jeremy Huddleston Sequoia Date: Sat Jul 2 14:17:18 2022 -0700 xquartz: Fix a possible crash when editing the Application menu due to mutaing immutable arrays Crashing on exception: -[__NSCFArray replaceObjectAtIndex:withObject:]: mutating method sent to immutable object Application Specific Backtrace 0: 0 CoreFoundation 0x00007ff80d2c5e9b __exceptionPreprocess + 242 1 libobjc.A.dylib 0x00007ff80d027e48 objc_exception_throw + 48 2 CoreFoundation 0x00007ff80d38167b _CFThrowFormattedException + 194 3 CoreFoundation 0x00007ff80d382a25 -[__NSCFArray removeObjectAtIndex:].cold.1 + 0 4 CoreFoundation 0x00007ff80d2e6c0b -[__NSCFArray replaceObjectAtIndex:withObject:] + 119 5 X11.bin 0x00000001003180f9 -[X11Controller tableView:setObjectValue:forTableColumn:row:] + 169 Fixes: https://github.com/XQuartz/XQuartz/issues/267 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit dfd057996b26420309c324ec844a5ba6dd07eda3) commit 86ace20398a6c559e89213622538134b72e448b1 Author: Jeremy Huddleston Sequoia Date: Fri Jul 1 14:26:06 2022 -0700 xquartz: Use correct defines when building to support Sparkle updates Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit aa636b97c66343b25e508b9c73d8505e8c11b1d9) commit 855b96a85bc0711460a2542573a9a3959d1bfefa Author: Povilas Kanapickas Date: Sun Dec 19 16:51:39 2021 +0200 xfree86: Fix event data alignment in inputtest driver This fixes address sanitizer errors when running unit tests. The additional copying may reduce performance by a small amount, but we don't care about that because this driver is used for testing only. Signed-off-by: Povilas Kanapickas (cherry picked from commit 7d2014e7d523e10623203582b9f573303750f087) commit 9d05ee10c231edacc69b342677ae8c3cc32f97e5 Author: Povilas Kanapickas Date: Sun Jan 16 10:42:15 2022 +0200 dix: Don't send touch end to clients that do async grab without touches GTK3 menu widget creates a selection for touch and other events and after receiving touch events creates an async grab that excludes touch events. Unfortunately it relies on X server not sending the touch end event in order to function properly. Sending touch end event will cause it to think that the initiating touch ended and when it actually ends, the ButtonRelease event will make it think that the menu should be closed. As a result, the menu will be open only for the duration of the touch making it useless. This commit reverts f682e0563f736ed2c2c612ed575e05b6e3db945e. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1255 Signed-off-by: Povilas Kanapickas (cherry picked from commit 43e934a19f644cddedae73602e86429c9dc5074a) commit b713e717c34d539486f661c03a0f1b35b3208d21 Author: Povilas Kanapickas Date: Sun Jan 23 22:18:52 2022 +0200 dix: Correctly save replayed event into GrabInfoRec When processing events we operate on InternalEvent pointers. They may actually refer to a an instance of DeviceEvent, GestureEvent or any other event that comprises the InternalEvent union. This works well in practice because we always look into event type before doing anything, except in the case of copying the event. *dst_event = *src_event would copy whole InternalEvent event and would cause out of bounds read in case the pointed to event was not InternalEvent but e.g. DeviceEvent. This regression has been introduced in 23a8b62d34344575f9df9d057fb74bfefa94a77b. Fixes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1261 Signed-off-by: Povilas Kanapickas (cherry picked from commit 6ef5c05728f8b18170fbc8415d7502495a08670b) commit cd3d21d8c44a35c22b7eca61a58bb5620b116102 Author: Samuel Thibault Date: Wed Jan 26 00:05:55 2022 +0100 xkb: fix XkbSetMap when changing a keysym without changing a keytype As the comment says: "symsPerKey/mapWidths must be filled regardless of client-side flags" so we always have to call CheckKeyTypes which will notably fill mapWidths and nTypes. That is needed for CheckKeySyms to work since it checks the width. Without it, any request with XkbKeySymsMask but not XkbKeyTypesMask will fail because of the missing width information, for instance this: XkbDescPtr xkb; if (!(xkb = XkbGetMap (dpy, XkbKeyTypesMask|XkbKeySymsMask, XkbUseCoreKbd))) { fprintf (stderr, "ERROR getting map\n"); exit(1); } XFlush (dpy); XSync (dpy, False); XkbMapChangesRec changes = { .changed = 0 }; int oneGroupType[XkbNumKbdGroups] = { XkbOneLevelIndex }; if (XkbChangeTypesOfKey(xkb, keycode, 1, XkbGroup1Mask, oneGroupType, &changes)) { fprintf(stderr, "ERROR changing type of key\n"); exit(1); } XkbKeySymEntry(xkb,keycode,0,0) = keysym; if (!XkbChangeMap(dpy,xkb,&changes)) { fprintf(stderr, "ERROR changing map\n"); exit(1); } XkbFreeKeyboard (xkb, 0, TRUE); XFlush (dpy); XSync (dpy, False); This had being going under the radar since about ever until commit de940e06f8733d87bbb857aef85d830053442cfe ("xkb: fix key type index check in _XkbSetMapChecks") fixed checking the values of kt_index, which was previously erroneously ignoring errors and ignoring all other checks, just because nTypes was not set, precisely because CheckKeyTypes was not called. Note: yes, CheckKeyTypes is meant to be callable without XkbKeyTypesMask, it does properly check for that and just fills nTypes and mapWidths in that case. Signed-off-by: Samuel Thibault (cherry picked from commit 0217cc6e0cf5013366105a90f5f91ccc4bab5425) commit f575524314e9f20a1ff639f6bd65386cdbd083f4 Author: Povilas Kanapickas Date: Thu Feb 3 20:04:52 2022 +0200 Revert "os: Try to discover the current seat with the XDG_SEAT var first" This reverts commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee. commit 419fbf639d8f53d39449c157a9554bd5482ed64f Author: Jeremy Huddleston Sequoia Date: Sun Jun 26 10:31:54 2022 -0700 XQuartz: Add TCC reason keys to Info.plist Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 9ce7264889e36fddbdf6bac332225ad6f628ad5d) commit 66ac50090dd191f1b16daf338ca3b46d9147fbbd Author: Jeremy Huddleston Sequoia Date: Sun Jun 26 02:40:20 2022 -0700 XQuartz: Build the bundle trampoline when using meson This brings the change for e1fdc856aedfcb4788011415930a0c6861df5123 into meson based builds Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b00cf4aef881e00533f995c141c3586749cd7ca1) commit 033d93a021e86dd5ce9b2b3a1554a72c7031a7f2 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 17:08:53 2022 -0700 meson: Support building Xnest and Xorg on darwin Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit ef8101560eefd6160df6d4b57ddb65ea2328c441) commit 433f53a1a08390a038176b7c1207512cf1dd3f44 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:19:06 2022 -0700 tests: Fix build failure from missing micmap.c FAILED: test/tests clang -o test/tests test/tests.p/.._mi_miinitext.c.o test/tests.p/fixes.c.o test/tests.p/input.c.o test/tests.p/list.c.o test/tests.p/misc.c.o test/tests.p/signal-logging.c.o test/tests.p/string.c.o test/tests.p/test_xkb.c.o test/tests.p/tests-common.c.o test/tests.p/tests.c.o test/tests.p/touch.c.o test/tests.p/xfree86.c.o test/tests.p/xtest.c.o test/tests.p/hashtabletest.c.o -Wl,-dead_strip_dylibs -Wl,-headerpad_max_install_names -Wl,-undefined,error -fvisibility=hidden -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -O0 -g3 -gdwarf-2 -mmacosx-version-min=10.9 -Werror=unguarded-availability-new -Werror=format -Werror=objc-method-access -Werror=incompatible-pointer-types -F/Applications/Utilities/XQuartz.app/Contents/Frameworks -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk -arch x86_64 -Wl,-rpath,/opt/X11/lib mi/liblibxserver_mi.a dix/liblibxserver_dix.a composite/liblibxserver_composite.a damageext/liblibxserver_damageext.a dbe/liblibxserver_dbe.a randr/liblibxserver_randr.a miext/damage/liblibxserver_miext_damage.a render/liblibxserver_render.a present/liblibxserver_present.a Xext/liblibxserver_xext.a miext/sync/liblibxserver_miext_sync.a xfixes/liblibxserver_xfixes.a Xi/liblibxserver_xi.a xkb/liblibxserver_xkb.a record/liblibxserver_record.a os/liblibxserver_os.a os/liblibxlibc.a glx/liblibglxvnd.a hw/xfree86/common/libxorg_common.a hw/xfree86/loader/libxorg_loader.a hw/xfree86/ddc/libxorg_ddc.a hw/xfree86/xkb/libxorg_xkb.a hw/xfree86/i2c/libxorg_i2c.a hw/xfree86/modes/libxorg_modes.a hw/xfree86/os-support/libxorg_os_support.a hw/xfree86/parser/libxorg_parser.a hw/xfree86/ramdac/libxorg_ramdac.a fb/liblibxserver_fb.a Xext/liblibxserver_xext_vidmode.a dix/liblibxserver_main.a config/liblibxserver_config.a /opt/X11/lib/libpixman-1.dylib /opt/X11/lib/libxcvt.dylib /opt/X11/lib/libxkbfile.dylib /opt/X11/lib/libXfont2.dylib /opt/X11/lib/libXdmcp.dylib -lm /opt/X11/lib/libxshmfence.dylib -ldl -lpthread /opt/X11/lib/libXau.dylib /opt/X11/lib/libGL.dylib Undefined symbols for architecture x86_64: "_micmapScrPrivateKeyRec", referenced from: _DGAInstallCmap in libxorg_common.a(xf86DGA.c.o) _xf86HandleColormaps in libxorg_common.a(xf86cmap.c.o) _CMapInstallColormap in libxorg_common.a(xf86cmap.c.o) _CMapEnterVT in libxorg_common.a(xf86cmap.c.o) _CMapSwitchMode in libxorg_common.a(xf86cmap.c.o) _CMapSetDGAMode in libxorg_common.a(xf86cmap.c.o) _CMapChangeGamma in libxorg_common.a(xf86cmap.c.o) ... ld: symbol(s) not found for architecture x86_64 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 6645ff59069d603806d749e8af73893cf88d2c06) commit 3868f364728ae0cc35621bbfdd36bfa2e3f09fda Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:05:46 2022 -0700 xf86-input-inputtest: Fix build on systems without SOCK_NONBLOCK Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 707f23dab8787b4154011186206dc9964e2ebc11) commit afcaaac96767d773422512e755e5ad3691a0627c Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 19:51:39 2022 -0700 print_edid: Fix a format string error ../hw/xfree86/ddc/print_edid.c:511:20: error: format specifies type 'unsigned short' but the argument has type 'int' [-Werror,-Wformat] det_mon->type - DS_VENDOR); ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 199b8c0853c92ce19a589186f326621477401b74) commit 6bb98fc62ddf8b0dd90f7b0b45978a0d0425ed5a Author: Jeremy Huddleston Sequoia Date: Tue Jun 21 11:46:14 2022 -0700 xquartz: Update autotools-based builds of XQuartz to account for recent changes Signed-off-by: Jeremy Huddleston Sequoia commit 4ea6f661edbbd84b3f2b308675bd2aa848b53746 Author: Jeremy Huddleston Sequoia Date: Mon Jun 20 20:32:26 2022 -0700 Revert "meson: Bump requirement to meson-0.50.0" This bump is causing issues with our CI. Sorry about that. This reverts commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 (cherry picked from commit 8cd0397e5b4c1f0e0add1fea67f82b811214bf3e) commit a6a20a7c40f86b5586286aaa614e6b64a5987d82 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 23:06:40 2022 -0700 meson: Provide options to set CFBundleVersion and CFBundleVersionString in XQuartz Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4f5999826aa478ba5f138e74cfccdf3b854c8e54) commit 37285e6252ce3afca5bc205121f83271548dfca9 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 19:56:26 2022 -0700 xquartz: Update copyright for 2022 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b12f5dc62d964d0279e1fa9403259cfd8e491285) commit 96e7b55c5d6898a6715b62d5e01581617d218997 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 19:55:44 2022 -0700 xquartz: Update Sparkle configuration to use SUPublicEDKey Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 1d90bef30c4dfe13dd5e70fea606a02380cbcee6) commit 6465263be8ae98283f8e99a3e95d04e786386040 Author: Jeremy Huddleston Sequoia Date: Sun Jun 19 22:18:16 2022 -0700 meson: Bump requirement to meson-0.50.0 WARNING: Project specifies a minimum meson_version '>= 0.47.0' but uses features which were added in newer versions: * 0.50.0: {'install arg in configure_file'} Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 0a27f96d1d0e474b308be982fa7069d3ae0d9892) commit e48acd9c40c09b7c66a7bfc6650afc216ba78cca Author: Jeremy Huddleston Sequoia Date: Thu Jun 16 00:10:26 2022 -0700 XQuartz: Ensure scroll events are delivered to a single window (not both X11 and AppKit) Fixes: https://github.com/XQuartz/XQuartz/issues/130 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 4532b696c644cb7f21e96cf76d3e6b21ccc0e309) commit 140d9a0f75194d4079d5cd1e4ad4683c6f47683e Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 14:21:01 2021 -0800 xquartz: Fold spaces related preferences into NSUserDefaults+XQuartzDefaults Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit f40610e0b4f2b4ae54ef6bbff756cb4a60e17e3b) commit 03ec5b132f0b3e07f9340faaacaa2455717fd8d1 Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 14:00:14 2021 -0800 xquartz pbproxy: Adopt NSUserDefaults+XQuartzDefaults for preferences Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 6134c73aebc3f928639e8f802be49ec8ecc17e66) commit 6df6178bb917f596ec2f61a3aabf99eea620b6ec Author: Jeremy Huddleston Sequoia Date: Fri Feb 19 22:49:11 2021 -0800 xquartz: Create a separate category for organizing user preferences Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit 963ba6d9adf578ec8d7ed12ae22dece76b895172) commit c6c1cba397ffa203123a8a6690dee728089e7325 Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 22:32:56 2016 -0700 os/connection: Improve abstraction for launchd secure sockets This changes away from hard-coding the /tmp/launch-* path to now supporting a generic [.] format for $DISPLAY. cf-libxcb: d978a4f69b30b630f28d07f1003cf290284d24d8 Signed-off-by: Jeremy Huddleston Sequoia CC: Adam Jackson (cherry picked from commit 83d0d911069d502232d719882cd1c5cd090defa1) commit 663af2f17eec2cc064f3d1e25e00fb840c441964 Author: Jeremy Huddleston Sequoia Date: Sun Jun 12 22:06:01 2022 -0700 X11Application: Ensure TIS operations are done on the main thread Fixes: https://github.com/XQuartz/XQuartz/issues/205 Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit b1afcecc61d841f95e786e4f4f84184f91d149f1) commit bd3564cf377deace41b359740331d84e3086e916 Author: Jeremy Huddleston Sequoia Date: Fri Apr 23 02:15:30 2021 -0700 rootless: Dead code removal (ROOTLESS_REDISPLAY_DELAY is already defined) Signed-off-by: Jeremy Huddleston Sequoia (cherry picked from commit c11b55f3c0c64645bca964aece825de0bdd92b1f) commit 53173fdab492f0f638f6616fcf01af0b9ea6338d Author: Olivier Fourdan Date: Thu Jan 20 10:20:38 2022 +0100 render: Fix build with gcc 12 The xserver fails to compile with the latest gcc 12: render/picture.c: In function ‘CreateSolidPicture’: render/picture.c:874:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[16]’ [-Werror=array-bounds] 874 | pPicture->pSourcePict->type = SourcePictTypeSolidFill; | ^~ render/picture.c:868:45: note: object of size 16 allocated by ‘malloc’ 868 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ render/picture.c: In function ‘CreateLinearGradientPicture’: render/picture.c:906:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] 906 | pPicture->pSourcePict->linear.type = SourcePictTypeLinear; | ^~ render/picture.c:899:45: note: object of size 32 allocated by ‘malloc’ 899 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ render/picture.c: In function ‘CreateConicalGradientPicture’: render/picture.c:989:26: error: array subscript ‘union _SourcePict[0]’ is partly outside array bounds of ‘unsigned char[32]’ [-Werror=array-bounds] 989 | pPicture->pSourcePict->conical.type = SourcePictTypeConical; | ^~ render/picture.c:982:45: note: object of size 32 allocated by ‘malloc’ 982 | pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors ninja: build stopped: subcommand failed. This is because gcc 12 has become stricter and raises a warning now. Fix the warning/error by allocating enough memory to store the union struct. Signed-off-by: Olivier Fourdan Acked-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1256 (cherry picked from commit c6b0dcb82d4db07a2f32c09a8c09c85a5f57248e) commit 69774044716039fa70655b3bc6dd6a4ff4535cfd Author: Błażej Szczygieł Date: Thu Jan 13 00:47:27 2022 +0100 present: Check for NULL to prevent crash Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1275 Signed-off-by: Błażej Szczygieł Tested-by: Aaron Plattner (cherry picked from commit 22d5818851967408bb7c903cb345b7ca8766094c) commit 85397cc2efe8fa73461cd21afe700829b2eca768 Author: Povilas Kanapickas Date: Mon Jan 3 00:23:30 2022 +0200 xserver 21.1.3 Signed-off-by: Povilas Kanapickas commit 001feb6692b77254db6a4906a82fa1bdadfd7b85 Author: Adam Jackson Date: Tue Oct 26 11:46:37 2021 -0400 glx/dri: Filter out fbconfigs that don't have a supported pixmap format For depth 30 in particular it's not uncommon for the DDX to not have a configured pixmap format. Since the client expects to back both GLXPixmaps and GLXPbuffers with X Pixmaps, trying to use an x2rgb10 fbconfig would fail along various paths to CreatePixmap. Filter these fbconfigs out so the client can't ask for something that we know won't work. (cherry picked from commit f6c070a1ac05801c52ae60efb7dc4b3142653b7d) commit 66890ca569291a53ea9cdc6ec19070173e522260 Author: Jocelyn Falempe Date: Fri Dec 17 10:18:25 2021 +0100 xf86/logind: fix missing call to vtenter if the platform device is not paused If there is one platform device, which is not paused nor resumed, systemd_logind_vtenter() will never get called. This break suspend/resume, and switching to VT on system with Nvidia proprietary driver. This is a regression introduced by f5bd039633fa83 So now call systemd_logind_vtenter() if there are no paused platform devices. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1271 Fixes: f5bd0396 - xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume Signed-off-by: Jocelyn Falempe Tested-by: Olivier Fourdan Reviewed-by: Hans de Goede commit fec0e2501b424ec6cfbf4c7983727acfafea0ccb Author: Jocelyn Falempe Date: Thu Dec 16 15:46:43 2021 +0100 xf86/logind: Fix compilation error when built without logind/platform bus This was introduced by commit 8eb1396d Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1269 Fixes: da9d012a9 - xf86/logind: Fix drm_drop_master before vt_reldisp Signed-off-by: Jocelyn Falempe Reviewed-by: Hans de Goede commit 8223a9d6d9ed2b9a4c1e6373f6ab854fdbda9ead Author: Matthieu Herrb Date: Tue Nov 16 23:38:46 2021 +0100 Convert more funcs to use InternalEvent. This fixes a crash when a DeviceEvent struct converted to InteralEvent was beeing copied as InternalEvent (and thus causing out of bounds reads) in ActivateGrabNoDelivery() in events.c: 3876 *grabinfo->sync.event = *real_event; Possible fix for https://gitlab.freedesktop.org/xorg/xserver/-/issues/1253 Signed-off-by: Matthieu Herrb (cherry picked from commit 5b8817a019845e1066c373022133985a0e2d718f) commit b27eaa72837eebe80adfe6c257a71a6b9eaf66ee Author: nerdopolis Date: Fri Oct 8 18:15:29 2021 -0400 os: Try to discover the current seat with the XDG_SEAT var first (cherry picked from commit ca1dfdc9aa4b548de624d3a9af5147a998ba3d79) commit 9852b29380673484aea25771a3e812c8e8a40393 Author: Povilas Kanapickas Date: Wed Dec 15 15:46:09 2021 +0200 xserver 21.1.2 Signed-off-by: Povilas Kanapickas commit 9fe2991075aca3321d59d03f3e45faca6cb718b8 Author: Sam James Date: Wed Dec 15 10:41:22 2021 +0200 hw/xfree86: fix sbus build for SPARC Initially reported downstream in Gentoo. Manifests with errors like: ``` gnu/bin/ld: hw/xfree86/common/libxorg_common.a(xf86fbBus.c.o): in function `xf86ClaimFbSlot': xf86fbBus.c:(.text+0x20): undefined reference to `sbusSlotClaimed' /usr/lib/gcc/sparc-unknown-linux-gnu/11.2.0/../../../../sparc-unknown-linux-gnu/bin/ld: xf86fbBus.c:(.text+0x2c): undefined reference to `sbusSlotClaimed' ``` While we use the headers in meson.build, we don't reference xf86sbusBus.c which defines the missing symbols like sbusSlotClaimed. Bug: https://bugs.gentoo.org/828513 Signed-off-by: Sam James (cherry picked from commit 6c1a1fcc4bff90546ebc954f428c6df97005ea50) commit 0b67785cd13e65d37416f75ab938bdc49cf4732f Author: Povilas Kanapickas Date: Wed Dec 15 10:41:21 2021 +0200 render: Fix out of bounds access in SProcRenderCompositeGlyphs() ZDI-CAN-14192, CVE-2021-4008 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas (cherry picked from commit ebce7e2d80e7c80e1dda60f2f0bc886f1106ba60) commit 7209982d2a89f2e27d2f83f8952e9512be813aa4 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:20 2021 +0200 Xext: Fix out of bounds access in SProcScreenSaverSuspend() ZDI-CAN-14951, CVE-2021-4010 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas (cherry picked from commit 6c4c53010772e3cb4cb8acd54950c8eec9c00d21) commit 6f09e7d3913a8188e32062f5e196bebb06bab140 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:19 2021 +0200 xfixes: Fix out of bounds access in *ProcXFixesCreatePointerBarrier() ZDI-CAN-14950, CVE-2021-4009 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas (cherry picked from commit b5196750099ae6ae582e1f46bd0a6dad29550e02) commit a82d523edb30e5856adca9f258ac716108c71f19 Author: Povilas Kanapickas Date: Wed Dec 15 10:41:18 2021 +0200 record: Fix out of bounds access in SwapCreateRegister() ZDI-CAN-14952, CVE-2021-4011 This vulnerability was discovered and the fix was suggested by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Povilas Kanapickas (cherry picked from commit e56f61c79fc3cee26d83cda0f84ae56d5979f768) commit a39218d99c6961dda0142d9956eb7404a37d9bd2 Author: Matthieu Herrb Date: Wed Dec 15 10:41:17 2021 +0200 remove the PRE_RELEASE message. With the new numbering scheme, XORG_VERISON_SNAP doesn't mean a pre-release version anymore. Signed-off-by: Matthieu Herrb (cherry picked from commit 4de9666b6d3c86660d728ddfc13d88700e5ff20d) commit fc2eb7e8cc19a41e034f2f4286af58f8b4825d65 Author: Matt Turner Date: Tue Dec 7 21:39:58 2021 -0800 test: #undef NDEBUG so assert is not compiled away (cherry picked from commit d189102c783653a10931051175de24277a157331) commit 7caf29ca6607ddf4c19a81d19c0f4acc6deb8936 Author: Povilas Kanapickas Date: Sat Nov 13 16:42:36 2021 +0200 meson: Correctly set DDXOSVERRORF and DDXBEFORERESET on xwin This worked with autotools, but not meson build system. Signed-off-by: Povilas Kanapickas (cherry picked from commit 04c93b98e9e4593aa2e6701bb08f5e27c3544d8a) commit 101791f80fdefea738421a414177899db7c76e83 Author: Jonathan Gray Date: Fri Dec 3 19:17:18 2021 +1100 glamor: fix free of uninitialised pointers Attempting to run fvwm on a x61/965gm with xserver 1.21.1 with the modesetting driver on OpenBSD/amd64 would cause the xserver to reliably crash. I tracked this down to the free() calls introduced in 2906ee5e4a722138cccb3265a615da7705a52589 (d1ca47e1242b51c79cec7287f52c36c8e494706b in branch). clang also warns about this: glamor_program.c:296:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'vs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:296:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:290:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:288:9: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] glamor_program.c:277:13: warning: variable 'fs_prog_string' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized] Signed-off-by: Jonathan Gray Reviewed-by: Olivier Fourdan Fixes: 2906ee5e4 ("glamor: Fix leak in glamor_build_program()") (cherry picked from commit 5ac6319776b13f96a2b336da4b35237618a5b001) commit 2c6989f81e62bac05a583c39fa09a06172d1ece5 Author: Peter Hutterer Date: Thu Dec 2 10:41:03 2021 +1000 xkb: fix XkbSetMap check for the keytypes count The previous if/else condition resulted in us always setting the key type count to the current number of key types. Split this up correctly. Regression introduced in de940e06f8733d87bbb857aef85d830053442cfe Fixes #1249 Signed-off-by: Peter Hutterer (cherry picked from commit be16bd8543f80ad2933ec9c37f082617c7084165) commit 49444ce9f7ad34fff6ff94a9db95337f4bfd7b03 Author: Povilas Kanapickas Date: Sat Nov 13 17:23:54 2021 +0200 Revert "hw/xfree86: Propagate physical dimensions from DRM connector" Quite a lot of applications currently expect the screen DPI exposed by the X server to be 96 even when the real display DPI is different. Additionally, currently Xwayland completely ignores any hardware information and sets the DPI to 96. Accordingly the new behavior, even if it fixes a bug, should not be enabled automatically to all users. A better solution would be to make the default DPI stay as is and enable the correct behavior with a command line option (maybe -dpi auto, or similar). For now let's just revert the bug fix. This reverts commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d. Signed-off-by: Povilas Kanapickas (cherry picked from commit 35af1299e73483eaf93d913a960e1d1738bc7de6) commit 6f11b3c803898e0effe6ade2ae951f5758936152 Author: Dave Airlie Date: Thu Nov 11 06:35:19 2021 +1000 dri2: add crocus to the list of va_gl users (cherry picked from commit a7b0a7fabd137183cc42a5edb15697e354c4450c) commit 8eb1396d3ecfd2bf968105a99759ae9445bdf768 Author: Jocelyn Falempe Date: Thu Nov 18 14:51:21 2021 +0100 xf86/logind: Fix drm_drop_master before vt_reldisp When switching to VT, the ioctl DRM_DROP_MASTER must be done before the ioctl VT_RELDISP. Otherwise the kernel can't change the modesetting reliably, and this leads to the console not showing up in some cases, like after unplugging a docking station with a DP or HDMI monitor. Before doing the VT_RELDISP, send a dbus message to logind, to pause the drm device, so logind will do the ioctl DRM_DROP_MASTER. With this patch, it changes the order logind will send the resume event, and drm will be sent last instead of first. so there is a also fix to call systemd_logind_vtenter() at the right time. Signed-off-by: Jocelyn Falempe Reviewed-by: Hans de Goede (cherry picked from commit da9d012a9c760896941769d4127e3cfb1a7a9f03) commit 6834f977a5eadbc3289f27b2bb83997132a39fdd Author: Jocelyn Falempe Date: Thu Nov 18 14:45:42 2021 +0100 xf86/logind: fix call systemd_logind_vtenter after receiving drm device resume logind send the resume event for input devices and drm device, in any order. if we call vt_enter before logind resume the drm device, it leads to a driver error, because logind has not done the DRM_IOCTL_SET_MASTER on it. Keep the old workaround to make sure we call systemd_logind_vtenter at least once if there are no platform device Signed-off-by: Jocelyn Falempe Reviewed-by: Hans de Goede (cherry picked from commit f5bd039633fa8360a10bd2aabb0111571f6275b0) commit 0ed7b1224ef17ff3d27e791e03e0d98dd6373c8a Author: nerdopolis Date: Fri Oct 8 21:51:43 2021 -0400 xfree86: On Linux, while only seat0 can have TTYs, don't assmume all seat0s have TTYs (cherry picked from commit b8c12aac651d626c5120e6e8e18b42e7528caf43) commit 6b997fb74e5c9473ee3989fca8d592a3a0d16067 Author: Povilas Kanapickas Date: Sun Nov 7 01:33:56 2021 +0200 xserver 21.1.1 Signed-off-by: Povilas Kanapickas commit 70a0c48ff3bb7e3392035ef333cc5c8453508f33 Author: Povilas Kanapickas Date: Sat Nov 6 20:09:48 2021 +0200 Makefile.am: Add missing meson build files to release tarball commit db0da823f55734baf4c1e4de680e7091f33aac17 Author: Matthieu Herrb Date: Sun Oct 31 11:28:28 2021 +0100 Make xf86CompatOutput() return NULL when there are no privates Some drivers (mach64 w/o DRI for instance) don't initialize privates. Signed-off-by: Matthieu Herrb (cherry picked from commit 80eeff3ebac772e25c9107199989e677457dbe06) commit fdb266ff814f6abb6ce006ecbac5ba78a92cdbca Author: Jon Turney Date: Tue Nov 2 14:04:08 2021 +0000 s/__/@/ in inputtestdrv manpage Update manpage subsitution style for 2e497bf8 (cherry picked from commit 0099412ea4347b02e61ea21946f309f2535cc07b) commit 27a0ee32ccef8d621aaa758c804fc9a5ceeb5a56 Author: Povilas Kanapickas Date: Wed Oct 27 13:36:45 2021 +0300 xserver 21.1 Signed-off-by: Povilas Kanapickas commit d4944ceda1727180bbee1c582b4ac0796c2748cc Author: Mario Kleiner Date: Mon Oct 18 08:14:04 2021 +0200 Fix RandR leasing for more than 1 simultaneously active lease. Due to a switched order of parameters in the xorg_list_add() call inside ProcRRCreateLease(), adding a new lease for RandR output leasing does not actually add the new RRLeasePtr lease record to the list of existing leases for a X-Screen, but instead replaces the existing list with a new list that has the new lease as the only element, and probably leaks a bit of memory. Therefore the server "forgets" all active leases for a screen, except for the last added lease. If multiple leases are created in a session, then destruction of all leases but the last one will fail in many cases, e.g., during server shutdown in RRCloseScreen(), or resource destruction, e.g., in RRCrtcDestroyResource(). Most importantly, it fails if a client simply close(fd)'es the DRM master descriptor to release a lease, quits, gets killed or crashes. In this case the kernel will destroy the lease and shut down the display output, then send a lease event via udev to the ddx, which e.g., in the modesetting-ddx will trigger a call to drmmode_validate_leases(). That function is supposed to detect the released lease and tell the server to terminate the lease on the server side as well, via xf86CrtcLeaseTerminated(), but this doesn't happen for all the leases the server has forgotten. The end result is a dead video output, as the server won't reinitialize the crtc's corresponding to the terminated but forgotten lease. This bug was observed when using the amdvlk AMD OSS Vulkan driver and trying to lease multiple VKDisplay's, and also under Mesa radv, as both Mesa Vulkan/WSI/Display and amdvlk terminate leases by simply close()ing the lease fd, not by sending explicit RandR protocol requests to free leases. Leasing worked, but ending a session with multiple active leases ended in a lot of unpleasant darkness. Fixing the wrong argument order to xorg_list_add() fixes the problem. Tested on single-X-Screen and dual-X-Screen setups, with one, two or three active leases. Please merge this for the upcoming server 21.1 branch. Merging into server 1.20 would also make a lot of sense. Fixes: e4e3447603b5fd3a38a92c3f972396d1f81168ad Signed-off-by: Mario Kleiner Cc: Keith Packard (cherry picked from commit f467f85ca1f780d5c7cf3c20888e399708d761ac) commit e59faa4b8cc5aaa19474a5e7ca3a99d08006f8c5 Author: Povilas Kanapickas Date: Thu Oct 14 17:33:40 2021 +0300 xserver 21.1 RC 2 commit 3fb94f3c5ca73f15a78dbc6904380b9b9e402bf4 Author: Alex Richardson Date: Fri Jul 23 09:23:45 2021 +0100 dix/privates.c: Avoid undefined behaviour after realloc() Adding the offset between the realloc result and the old allocation to update pointers into the new allocation is undefined behaviour: the old pointers are no longer valid after realloc() according to the C standard. While this works on almost all architectures and compilers, it causes problems on architectures that track pointer bounds (e.g. CHERI or Arm's Morello): the DevPrivateKey pointers will still have the bounds of the previous allocation and therefore any dereference will result in a run-time trap. I found this due to a crash (dereferencing an invalid capability) while trying to run `XVnc` on a CHERI-RISC-V system. With this commit I can successfully connect to the XVnc instance running inside a QEMU with a VNC viewer on my host. This also changes the check whether the allocation was moved to use uintptr_t instead of a pointer since according to the C standard: "The value of a pointer becomes indeterminate when the object it points to (or just past) reaches the end of its lifetime." Casting to an integer type avoids this undefined behaviour. Signed-off-by: Alex Richardson (cherry picked from commit f9f705bf3cf0d169d54a70f235cc99e106dbda43) commit b89fdd523e2c9e9b0cdf37b263833c4b0a8868b8 Author: nerdopolis Date: Thu Sep 30 08:51:18 2021 -0400 xf86: Accept devices with the 'simpledrm' driver. SimpleDRM 'devices' are a fallback device, and do not have a busid so they are getting skipped. This will allow simpledrm to work with the modesetting driver (cherry picked from commit b9218fadf3c09d83566549279d68886d8258f79c) commit fbc690ccaf12d6536951d0ba403dfbb92c7c4115 Author: Mario Kleiner Date: Fri Oct 1 09:47:41 2021 +0200 modesetting: Consider RandR primary output for selectioh of sync crtc. The "sync crtc" is the crtc used to drive the display timing of a drawable under DRI2 and DRI3/Present. If a drawable intersects multiple video outputs, then normally the crtc is chosen which has the largest intersection area with the drawable. If multiple outputs / crtc's have exacty the same intersection area then the crtc chosen was simply the first one with maximum intersection. Iow. the choice was random, depending on plugging order of displays. This adds the ability to choose a preferred output in such a tie situation. The RandR output marked as "primary output" is chosen on such a tie. This new behaviour and its implementation is consistent with other video ddx drivers. See amdgpu-ddx, ati-ddx and nouveau-ddx for reference. This commit is a straightforward port from amdgpu-ddx. Signed-off-by: Mario Kleiner (cherry picked from commit 4b75e65766a9ef3a26d4c1c9d7af9fc6d1d7be5b) commit 22f4ff1026eeffc566f87453d7f1f70dc23ad4e0 Author: Mario Kleiner Date: Fri Oct 1 08:49:10 2021 +0200 modesetting: Handle mixed VRR and non-VRR display setups better. In a setup with both VRR capable and non-VRR capable displays, it was so far inconsistent if the driver would allow use of VRR support or not, as "is_connector_vrr_capable" was set to whatever the capabilities of the last added drm output were. Iow. the plugging order of monitors determined the outcome. Fix this: Now if at least one display is VRR capable, the driver will treat an X-Screen as capable for VRR, plugging order no longer matters. Tested with a dual-display setup with one VRR monitor and one non-VRR monitor. This is also beneficial with the new Option "AsyncFlipSecondaries". When we are at it, also add some so far missing description of the "VariableRefresh" driver option, copied from amdgpu-ddx. Signed-off-by: Mario Kleiner (cherry picked from commit 017ce263376aa64a495c4d71a140a24b1dff7054) commit 0d0986bf3b924ccb26e4bc6a8c06aed41f238683 Author: Mario Kleiner Date: Fri Oct 1 07:42:01 2021 +0200 modesetting: Enable GAMMA_LUT for lut's with up to 4096 slots. A lut size of 4096 slots has been verified to work correctly, as tested with amdgpu-kms. Intel Tigerlake Gen12 hw has a very large GAMMA_LUT size of 262145 slots, but also issues with its current GAMMA_LUT implementation, as of Linux 5.14. Therefore we keep GAMMA_LUT off for large lut's. This currently excludes Intel Icelake, Tigerlake and later. This can be overriden via the "UseGammaLUT" boolean xorg.conf option to force use of GAMMA_LUT on or off. See following link for the Tigerlake situation: https://gitlab.freedesktop.org/drm/intel/-/issues/3916#note_1085315 Signed-off-by: Mario Kleiner (cherry picked from commit 66e5a5bb12c58413a4d71781c5a7f63f675bfe55) commit bc1327e6de82da560c97f66c9c196d9bbd2d24be Author: Ray Strode Date: Mon Oct 4 14:27:54 2021 -0400 xkb: Drop check for XkbSetMapResizeTypes Commit 446ff2d3177087b8173fa779fa5b77a2a128988b added checks to prevalidate the size of incoming SetMap requests. That commit checks for the XkbSetMapResizeTypes flag to be set before allowing key types data to be processed. key types data can be changed or even just sent wholesale unchanged without the number of key types changing, however. The check for XkbSetMapResizeTypes rejects those legitimate requests. In particular, XkbChangeMap never sets XkbSetMapResizeTypes and so always fails now any time XkbKeyTypesMask is in the changed mask. This commit drops the check for XkbSetMapResizeTypes in flags when prevalidating the request length. (cherry picked from commit 8b7f4d3259e8b7d1eb3d8a83e8852989e869596a) commit b87536682c185b6a825525d01e95e264018c0997 Author: Mario Kleiner Date: Tue Sep 14 07:52:33 2021 +0200 Revert "modesetting: Only use GAMMA_LUT if its size is 1024" This reverts commit 617f591fc44e24413e1f91017d16734999bbbac1. The problem described in that commit exists, but the two preceeding commits with improvements to the servers RandR code should avoid the mentioned problems while allowing the use of GAMMA_LUT's instead of legacy gamma lut. Use of legacy gamma lut's is not a good fix, because it will reduce color output precision of gpu's with more than 1024 GAMMA_LUT slots, e.g., AMD, ARM MALI and KOMEDA with 4096 slot luts, and some Mediathek parts with 512 slot luts. On KOMEDA, legacy lut's are completely unsupported by the kms driver, so gamma correction gets disabled. The situation is especially bad on Intel Icelake and later: Use of legacy gamma tables will cause the kms driver to switch to hardware legacy lut's with 256 slots, 8 bit wide, without interpolation. This way color output precision is restricted to 8 bpc and any deep color / HDR output (10 bpc, fp16, fixed point 16) becomes impossible. The latest Intel gen gpu's would have worse color precision than parts which are more than 10 years old. Signed-off-by: Mario Kleiner (cherry picked from commit 545fa90cbf37a4c18f013dabc9f3bfb8310a5a98) commit 473a48660fc8a326312df2d5925017ce8152c7db Author: Mario Kleiner Date: Tue Sep 14 07:51:46 2021 +0200 xfree86: Let xf86RandR12CrtcComputeGamma() deal with non-power-of-2 sizes. The assumption in the upsampling code was that the crtc->gamma_size size of the crtc's gamma table is a power of two. This is true for almost all current driver + gpu combos at least on Linux, with typical sizes of 256, 512, 1024 or 4096 slots. However, Intel Gen-11 Icelake and later are outliers, as their gamma table has 2^18 + 1 slots, very big and not a power of two! Try to make upsampling behave at least reasonable: Replicate the last gamma value to fill up remaining crtc->gamma_red/green/blue slots, which would normally stay uninitialized. This is important, because while the intel display driver does not actually use all 2^18+1 values passed as part of a GAMMA_LUT, it does need the very last slot, which would not get initialized by the old code. This should hopefully create reasonable behaviour with Icelake+ but is untested on the actual Intel hw due to lack of suitable hw. Signed-off-by: Mario Kleiner (cherry picked from commit 7326e131df3d1373dd796d9e2d931e81a3536bad) commit b33f487a7ca276e11214eb45b87aab970ca43d79 Author: Mario Kleiner Date: Tue Sep 14 07:40:49 2021 +0200 xfree86: Avoid crash in xf86RandR12CrtcSetGamma() memcpy path. If randrp->palette_size is zero, the memcpy() path can read past the end of the randr_crtc's gammaRed/Green/Blue tables if the hw crtc's gamma_size is greater than the randr_crtc's gammaSize. Avoid this by clamping the to-be-copied size to the smaller of both sizes. Note that during regular server startup, the memcpy() path is only taken initially twice, but then a suitable palette is created for use during a session. Therefore during an actual running X-Session, the xf86RandR12CrtcComputeGamma() will be used, which makes sure that data is properly up- or down-sampled for mismatching source and target crtc gamma sizes. This should avoid reading past randr_crtc gamma memory for gpu's with big crtc->gamma_size, e.g., AMD/MALI/KOMEDA 4096 slots, or Intel Icelake and later with 262145 slots. Tested against modesetting-ddx and amdgpu-ddx under screen color depth 24 (8 bpc) and 30 (10 bpc) to make sure that clamping happens properly. This is an alternative fix for the one attempted in commit 617f591fc44e24413e1f91017d16734999bbbac1. Signed-off-by: Mario Kleiner (cherry picked from commit 966f567432e91762382db09129f8fb4e2e434437) commit d1ca47e1242b51c79cec7287f52c36c8e494706b Author: Olivier Fourdan Date: Tue Sep 14 16:32:45 2021 +0200 glamor: Fix leak in glamor_build_program() Fix the possible leak of `vs_prog_string` and `fs_prog_string` in case of failure, as reported by covscan. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Reviewed-by: Michel Dänzer (cherry picked from commit 2906ee5e4a722138cccb3265a615da7705a52589) commit d00e7dfc9da165810a578fa0910475686e1fa51c Author: Povilas Kanapickas Date: Tue Sep 21 23:35:42 2021 +0300 xserver 21.1 RC 1 Signed-off-by: Povilas Kanapickas commit 4ee66f574a70948ca90a5db94dd666a389a5ff3e Author: Povilas Kanapickas Date: Wed Sep 15 21:49:17 2021 +0300 Drop XWayland DDX commit 72c5d153c920d769802ed73a1b9bfd0d32e7c178 Author: Aaron Plattner Date: Fri Sep 10 11:02:00 2021 -0700 xfree86: NUL-terminate strings in hwEnableIO The Linux version of xf86EnableIO calls a helper function called hwEnableIO(). Except on Alpha, this function reads /proc/ioports looking for the 'keyboard' and 'timer' ports, extracts the port ranges, and enables access to them. It does this by reading 4 bytes from the string for the start port number and 4 bytes for the last port number, passing those to atoi(). However, it doesn't add a fifth byte for a NUL terminator, so some implementations of atoi() read past the end of this string, triggering an AddressSanitizer error: ==1383==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fff71fd5b74 at pc 0x7fe1be0de3e0 bp 0x7fff71fd5ae0 sp 0x7fff71fd5288 READ of size 5 at 0x7fff71fd5b74 thread T0 #0 0x7fe1be0de3df in __interceptor_atoi /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520 #1 0x564971adcc45 in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:138 #2 0x564971adce87 in xf86EnableIO ../hw/xfree86/os-support/linux/lnx_video.c:174 #3 0x5649719f6a30 in InitOutput ../hw/xfree86/common/xf86Init.c:439 #4 0x564971585924 in dix_main ../dix/main.c:190 #5 0x564971b6246e in main ../dix/stubmain.c:34 #6 0x7fe1bdab6b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24) #7 0x564971490e9d in _start (/home/aaron/git/x/xserver/build.asan/hw/xfree86/Xorg+0xb2e9d) Address 0x7fff71fd5b74 is located in stack of thread T0 at offset 100 in frame #0 0x564971adc96a in hwEnableIO ../hw/xfree86/os-support/linux/lnx_video.c:118 This frame has 3 object(s): [32, 40) 'n' (line 120) [64, 72) 'buf' (line 122) [96, 100) 'target' (line 122) <== Memory access at offset 100 overflows this variable HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork (longjmp and C++ exceptions *are* supported) SUMMARY: AddressSanitizer: stack-buffer-overflow /build/gcc/src/gcc/libsanitizer/asan/asan_interceptors.cpp:520 in __interceptor_atoi Shadow bytes around the buggy address: 0x10006e3f2b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x10006e3f2b60: 00 00 f1 f1 f1 f1 00 f2 f2 f2 00 f2 f2 f2[04]f3 0x10006e3f2b70: f3 f3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x10006e3f2b80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 0x10006e3f2b90: f1 f1 f8 f2 00 f2 f2 f2 f8 f3 f3 f3 00 00 00 00 0x10006e3f2ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 0x10006e3f2bb0: f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc ==1383==ABORTING Fix this by NUL-terminating the string. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193#note_1053306 Signed-off-by: Aaron Plattner commit 617f591fc44e24413e1f91017d16734999bbbac1 Author: Aaron Plattner Date: Thu Sep 9 15:29:50 2021 -0700 modesetting: Only use GAMMA_LUT if its size is 1024 GAMMA_LUT sizes other than 1024 cause a crash during startup if the memcpy() calls in xf86RandR12CrtcSetGamma() read past the end of the legacy X11 / XVidMode gamma ramp. This is a problem on Intel ICL / GEN11 platforms because they report a GAMMA_LUT size of 262145. Since it's not clear that the modesetting driver will generate a proper gamma ramp at that size even if xf86RandR12CrtcSetGamma() is fixed, just disable use of GAMMA_LUT for sizes other than 1024 for now. This will cause the modesetting driver to disable the CTM property and fall back to the legacy gamma LUT. Signed-off-by: Aaron Plattner Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1193 Tested-by: Mark Herbert commit e59e24c8779de65db87b8c07bc3f2abb479be082 Author: Povilas Kanapickas Date: Mon Sep 6 22:41:32 2021 +0300 glamor: Fix handling of 1-bit pixmaps Since 8702c938b33b9ec180d64754eb922515c7c4a98b the pixmap formats are handled in a single place. In the process of conversion the difference between pixmap formats that can be uploaded and those that can be rendered on GL side has been lost. This affects only 1-bit pixmaps: as they aren't supported on GL, but can be converted to a R8 or A8 format for rendering (see glamor_get_tex_format_type_from_pictformat()). To work around this we add a separate flag that specifies whether the format actually supports rendering in GL, convert all checks to use this flag and then add 1-bit pixmap formats that don't support rendering in GL. Fixes: 8702c938b33b9ec180d64754eb922515c7c4a98b Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1210 Acked-by: Olivier Fourdan Tested-by: Olivier Fourdan Reviewed-by: Adam Jackson Signed-off-by: Povilas Kanapickas commit 68f01c0f02ece4f6efe9ce18be81244246a1e114 Author: Mario Kleiner Date: Mon Aug 30 05:42:04 2021 +0200 modesetting: Add option for non-vsynced flips for "secondary" outputs. Whenever an unredirected fullscreen window uses pageflipping for a DRI3/Present PresentPixmap() operation and the X-Screen has more than one active output, multiple crtc's need to execute pageflips. Only after the last flip has completed can the PresentPixmap operation as a whole complete. If a sync_flip is requested for the present, then the current implementation will synchronize each pageflip to the vblank of its associated crtc. This provides tear-free image presentation across all outputs, but introduces a different artifact, if not all outputs run at the same refresh rate with perfect synchrony: The slowest output throttles the presentation rate, and present completion is delayed to flip completion of the "latest" output to complete. This means degraded performance, e.g., a dual-display setup with a 144 Hz monitor and a 60 Hz monitor will always be throttled to at most 60 fps. It also means non-constant present rate if refresh cycles drift against each other, creating complex "beat patterns", tremors, stutters and periodic slowdowns - quite irritating! Such a scenario will be especially annoying if one uses multiple outputs in "mirror mode" aka "clone mode". One output will usually be the "production output" with the highest quality and fastest display attached, whereas a secondary mirror output just has a cheaper display for monitoring attached. Users care about perfect and perfectly timed tear-free presentation on the "production output", but cares less about quality on the secondary "mirror output". They are willing to trade quality on secondary outputs away in exchange for better presentation timing on the "production output". One example use case for such production + monitoring displays are neuroscience / medical science applications where one high quality display device is used to present visual animations to test subjects or patients in a fMRI scanner room (production display), whereas an operator monitors the same visual animations from a control room on a lower quality display. Presentation timing needs to be perfect, and animations high-speed and tear-free for the production display, whereas quality and timing don't matter for the monitoring display. This commit gives users the option to choose such a trade-off as opt-in: It adds a new boolean option "AsyncFlipSecondaries" to the device section of xorg.conf. If this option is specified as true, then DRI3 pageflip behaviour changes as follows: 1. The "reference crtc" for a windows PresentPixmap operation does a vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized flip, as requested by the caller, just as in the past. Typically flips will be requested to be vblank synchronized for tear-free presentation. The "reference crtc" is the one chosen by the caller to drive presentation timing (as specified by PresentPixmap()'s "target_msc", "divisor", "remainder" parameters and implemented by vblank events) and to deliver Present completion timestamps (msc and ust) extracted from its pageflip completion event. 2. All other crtc's, which also page-flip in a multi-display configuration, will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and not synchronized to vblank. This allows the PresentPixmap operation to complete with little delay compared to a single-display present, especially if the different crtc's run at different video refresh rates or their refresh cycles are not perfectly synchronized, but drift against each other. The downside is potential tearing artifacts on all outputs apart from the one of the "reference crtc". Successfully tested on a AMD gpu with single-display, dual-display and triple-display setups, and with single-X-Screen as well as dual-X-Screen "ZaphodHeads" configurations. Please consider merging this commit for the upcoming server 1.21 branch. Signed-off-by: Mario Kleiner commit 1fd5dec11bbb85e87f70a39f1c1b59af95a7feaf Author: Ignacio Casal Quinteiro Date: Tue Sep 7 16:58:10 2021 +0200 touchevents: set the screen pointer after checking the device is enabled If the device is disabled the sprite is NULL so we get a seg fault commit b3b81c8c2090cd49410960a021baf0d27fdd2ab3 Author: Povilas Kanapickas Date: Fri Sep 3 14:33:15 2021 +0300 Drop DMX DDX It turns out xdmx currently crashes when any client attempts to use GL and it has been in such state for about 14 years. There was a patch to fix the problem [1] 4 years ago, but it never got merged. The last activity on any bugs referring to xdmx has been more than 4 years ago. Given such situation, I find it unlikely that anyone is still using xdmx and just having the code is a drain of resources. [1]: https://lists.x.org/archives/xorg-devel/2017-June/053919.html Signed-off-by: Povilas Kanapickas commit 8f8ebf870b55c9875b7cfd8ef69c1df02d589b4a Author: Mario Kleiner Date: Sat Aug 28 02:27:20 2021 +0200 modesetting: Allow Present flips with mismatched stride on atomic drivers. When using DRI3+Present with PRIME render offload, sometimes there is a mismatch between the stride of the to-be-presented Pixmap and the frontbuffer. The current code would reject a pageflip present in this case if atomic modesetting is not enabled, ie. always, as atomic modesetting is disabled by default due to brokeness in the current modesetting-ddx. Fullscreen presents without page flipping however trigger the copy path as fallback, which causes not only unreliable presentation timing and degraded performance, but also massive tearing artifacts due to rendering to the framebuffer without any hardware sync to vblank. Tearing is extra awful on modesetting-ddx because glamor afaics seems to use drawing of a textured triangle strip for the copy implementation, not a dedicated blitter engine. The rasterization pattern creates extra awful tearing artifacts. We can do better: According to a tip from Michel Daenzer (thanks!), at least atomic modesetting capable kms drivers should be able to reliably change scanout stride during a pageflip, even if atomic modesetting is not actually enabled for the modesetting client. This commit adds detection logic to find out if the underlying kms driver is atomic_modeset_capable, and if so, it no longer rejects page flip presents on mismatched stride between new Pixmap and frontbuffer. We (ab)use a call to drmSetClientCap(ms->fd, DRM_CLIENT_CAP_ATOMIC, 0); for this purpose. The call itself has no practical effect, as it requests disabling atomic mode, although atomic mode is disabled by default. However, the return value of drmSetClientCap() tells us if the underlying kms driver is atomic modesetting capable: An atomic driver will return 0 for success. A legacy non-atomic driver will return a non-zero error code, either -EINVAL for early atomic Linux versions 4.0 - 4.19 (or for non-atomic Linux 3.x and earlier), or -EOPNOTSUPP for Linux 4.20 and later. Testing on a MacBookPro 2017 with Intel Kabylake display server gpu + AMD Polaris11 as prime renderoffload gpu, X-Server master + Mesa 21.0.3 show improvement from unbearable tearing to perfect, despite a stride mismatch between display gpu and Pixmap of 11776 Bytes vs. 11520 Bytes. That this is correct behaviour was also confirmed by comparing the behaviour and .check_flip implementation of the patched modesetting-ddx against the current intel-ddx SNA Present implementation. Please consider merging this patch before the server-1.21 branch point. This patch could also be cherry-picked into the server 1.20 branch to fix the same limitation. Signed-off-by: Mario Kleiner commit 7d34b1f2b7c612c3171e0b9758b5fc094bc33f63 Author: Simon Ser Date: Fri Jun 18 11:04:45 2021 +0200 xwayland: add -noTouchPointerEmulation In some scenarios, the Wayland compositor might have more knowledge than the X11 server and may be able to perform pointer emulation for touch events better. Add a command-line switch to allow compositors to turn Xwayland pointer emulation off. Signed-off-by: Simon Ser commit 7c63c582a17b206a33b57a70dd61e7919a6ef9fe Author: Mario Kleiner Date: Thu Aug 26 17:06:49 2021 +0200 Revert "glamor: Enable modifier support for xfree86 too" This reverts commit 9b8999411033c9473cd68e92e4690a91aecf5b95. Turns out that defaulting glamor_egl->dmabuf_capable = TRUE breaks kms page-flipping on various Mesa+Linux/DRM-KMS+hardware combos, resulting in broken presentation timing, degraded performance and awful tearing. E.g., my testing shows that X-Server master + Mesa 21.2 + Linux 5.3 on Intel Kabylake has broken pageflipping. Similar behaviour was observed in the past on RaspberryPi 4/400 with VideoCore-6 by myself and others, and iirc by myself on some AMD gpu's, although my memories of the latter are a bit dim. Cfe. https://gitlab.freedesktop.org/mesa/mesa/-/issues/3601 and possibly https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/254 for related problems. The reason for pageflip failure on the modesetting-ddx under DRI3/Present seems to be the following sequence: 1. Atomic modesetting for the modesetting-ddx is broken and therefore both disabled by default in the modesetting-ddx itself and also force-disabled by the Linux kernel since quite a while. If the kernel detects drmSetClientCap(fd, DRM_CLIENT_CAP_ATOMIC, 1); from the X-Server, it will reject the request, as a countermeasure to all the past and current brokeness. 2. Without DRM_CLIENT_CAP_ATOMIC we don't get the implied universal planes support (DRM_CLIENT_CAP_UNIVERSAL_PLANES). 3. Without DRM_CLIENT_CAP_UNIVERSAL_PLANES, drmModeGetPlaneResources() will only return overlay planes, but not primary- or cursor planes. 4. As modesetting-ddx drmmode_crtc_create_planes() function can only operate on primary planes, but can't get any from drmModeGetPlaneResources(), the drmmode_crtc_create_planes() mostly turns into a no-op, never executes populate_format_modifiers() and therefore the Linux kernels DRM-KMS driver is not ever queried for the list of scanout/pageflip capable DRM format modifiers. Iow. the drmmode_crtc->formats[i].modifiers list stays empty with zero drmmode_crtc->formats[i].num_modifiers. 5. The list from step 4 provides the format+modifiers for intersection which would get returned by the X-Servers DRI3 backend as response to a xcb_dri3_get_supported_modifiers_window_modifiers() request. Given an empty list was returned in step 4, this will lead to return of an empty modifiers list by xcb_dri3_get_supported_modifiers_window_modifiers(). 6. Both Mesa's DRI3/Present OpenGL backbuffer allocation logic and iirc Mesa/Vulkan/WSI/X11's swapchain image allocation logic use the list from xcb_dri3_get_supported_modifiers_window_modifiers() for format+ modifier selection for scanout/pageflip capable buffers. Cfe. Mesa's dri3_alloc_render_buffer() function. Due to the empty list, the Mesa code falls back to the format+modifiers reported by xcb_dri3_get_supported_modifiers_screen_modifiers() instead. This list contains all modifiers reported by GLAMOR as result of glamor_get_formats() and glamor_get_modifiers(), which in turn are query results from Mesa eglQueryDmaBufFormatsEXT() and eglQueryDmaBufModifiersEXT(). Iow. all format+modifiers which are supported for rendering are considered for the OpenGL backbuffers and Vulkan swapchain buffers. 7. Depending on kms driver + gpu combo and Mesa version, such buffers are often not direct-scanout / pageflip capable, and so pageflipping can't be used for DRI3/Present of fullscreen windows. Whenever the system has to fallback to copies instead of pageflips, the results are broken presentation timing, degraded performance and quite horrible tearing, as the current DRI3/Present implementation does not perform any hardware synchronization of copy presents to the start of vblank or similar. By defaulting glamor_egl->dmabuf_capable = FALSE instead, as the server 1.20 branch does, we avoid this failure: 1. glamor_get_modifiers() turns into a no-op and returns false, not reporting any supported dmabuf modifiers to the servers DRI3 code, ie. the servers cache_formats_and_modifiers() function can't retrieve and cache any format+modifiers. Therefore the servers DRI3 code now also reports an empty format+modifiers list when Mesa does a xcb_dri3_get_supported_modifiers_screen_modifiers() query. 2. Mesa's buffer allocation code therefore falls back to using the old DRI image extensions createImage() function to allocate buffers with use flags __DRI_IMAGE_USE_SCANOUT | __DRI_IMAGE_USE_BACKBUFFER and our OpenGL backbuffers / Vulkan swapchain images get allocated in a direct-scanout / pageflip capable format. Pageflipping works, timing and performance is good, presentation is tear-free. Please consider merging this for branching the X-Server 1.21 branch. Signed-off-by: Mario Kleiner commit c5a9287dcf8d77ab104d56ac27ad6b1ff957fdfb Author: Jon Turney Date: Wed May 12 16:51:26 2021 +0100 Don't underlink inputtest on targets which require complete linkage Don't underlink inputtest on targets which require complete linkage (e.g. when building for PE/COFF) commit d68b50ec032fe4f02bde817abfd30328ec96a11c Author: Jon Turney Date: Sat Jul 10 17:38:01 2021 +0100 Fix compilation with windows.h from latest w32api misc.h has complex logic (checking MAXSHORT is undefined etc.) controlling if it includes assert.h or not. Including windows.h from w32api 9.0.0 now trips over that, causing assert.h to not be included, causing various errors, e.g. In file included from ../include/cursor.h:53, from ../include/dix.h:54, from ../os/osdep.h:139, from ../hw/xwin/winauth.c:40: ../include/privates.h: In function ‘dixGetPrivateAddr’: ../include/privates.h:121:5: error: implicit declaration of function ‘assert’ [-Werror=implicit-function-declaration] Fix this by IWYU in privates.h commit ab86be0ed9233d6683daf00d359c562b12e137c8 Author: Mario Kleiner Date: Fri Aug 27 19:27:29 2021 +0200 modesetting: Fix VRR window property handling. A misplaced error check can cause this failure scenario, and does so reliably as tested on Ubuntu 21.04 with KDE Plasma 5 desktop within the first few seconds of login session startup, rendering VRR under modesetting-ddx unusable: 1. Some X11 client application changes some window property. 2. ms_change_property() is called as part of the property change handling call chain (client->requestVector[X_ChangeProperty]). It removes itself temporarily from the call chain - or so it thinks, hooking up saved_change_property instead. 3. ret = saved_change_property(client) is called and fails temporarily for some non-critical reason. 4. The misplaced error check returns early (error abort), without first restoring ms_change_property() as initial X_ChangeProperty handler in the call chain again. -> Now ms_change_property() has removed itself permanently from the property handler call chain for the remainder of the X session and VRR property changes on windows are no longer handled, ie. VRR no longer gets enabled/disabled in response to window VRR property changes. Place the error check at the proper place, just as it is correctly done by amdgpu-ddx, and in modesetting-ddx ms_delete_property() function. Verified to fix VRR handling with an AMD gpu under KDE desktop session. Please consider merging before branching the server 1.21 branch. Signed-off-by: Mario Kleiner commit 18d3131f9a332096825c09106a931c427246ddb7 Author: Povilas Kanapickas Date: Thu Aug 5 22:43:54 2021 +0300 meson: Implement developer documentation build Signed-off-by: Povilas Kanapickas commit 722da1c62caad961ce09fc226daf84465f4b7a7e Author: Povilas Kanapickas Date: Fri Aug 6 15:21:53 2021 +0300 meson: Add option to disable libdrm support Signed-off-by: Povilas Kanapickas commit 1f720dc9a319bb66e2f5f28568614e81aa9e9e4d Author: Adam Jackson Date: Tue Aug 17 16:06:57 2021 -0400 dmx: Fix some redeclaration warnings from gcc 11 Of the form: ../hw/dmx/config/xdmxconfig.c:68:26: warning: redundant redeclaration of ‘dmxConfigEntry’ [-Wredundant-decls] 68 | extern DMXConfigEntryPtr dmxConfigEntry; | ^~~~~~~~~~~~~~ commit b49f0f9b323d66056aa9cd88f9ca1a124037bf32 Author: Adam Jackson Date: Tue Aug 17 16:04:40 2021 -0400 xkb: Silence a warning from gcc 11 I get this: In function ‘TryCopyStr’, inlined from ‘CopyISOLockArgs’ at ../xkb/xkbtext.c:875:9: ../xkb/xkbtext.c:720:13: warning: ‘tbuf’ may be used uninitialized [-Wmaybe-uninitialized] 720 | strcat(to, from); | ^~~~~~~~~~~~~~~~ ../xkb/xkbtext.c: In function ‘CopyISOLockArgs’: : note: by argument 1 of type ‘const char *’ to ‘__builtin_strlen’ declared here ../xkb/xkbtext.c:871:10: note: ‘tbuf’ declared here 871 | char tbuf[64]; | ^~~~ Just initialize tbuf so it definitely works. commit c1138d8ec8d029de54261e355c0e5da0b001044a Author: Adam Jackson Date: Fri Jul 9 15:30:16 2021 -0400 xinput: Silence a warning from gcc 11 [45/388] Compiling C object Xi/liblibxserver_xi.a.p/xichangehierarchy.c.o ../Xi/xichangehierarchy.c:61:32: warning: argument 1 of type ‘int[256]’ with mismatched bound [-Warray-parameter=] 61 | XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) | ~~~~^~~~~~~~~~~~~~~~~ In file included from ../Xi/xichangehierarchy.c:54: ../Xi/xichangehierarchy.h:42:37: note: previously declared as ‘int[]’ 42 | void XISendDeviceHierarchyEvent(int flags[]); | ~~~~^~~~~~~ commit f3a98334e6a56858853f3894b0f48ee040741410 Author: Adam Jackson Date: Fri Jul 9 15:26:47 2021 -0400 selinux: Stop using security_context_t This is apparently deprecated now and is and was always just char *. commit 6f63873da55de33e51c1f6849a65501e380f19bc Author: Simon Ser Date: Mon Jul 5 15:30:16 2021 +0200 xwayland: fix xdg_output leak The xdg_output wasn't cleaned up when destroying the xwl_output. Signed-off-by: Simon Ser commit 659260a0b7c1cef6060bd62a83deb03e3fa472b1 Author: Demi Marie Obenour Date: Fri Aug 6 13:23:08 2021 -0400 More missing version checks in SProcs The bug in XFixes was also found in GenericEvent and Damage. commit e4dabe8d9395d60699aa9831626920adaa847680 Author: Roman Gilg Date: Sat Aug 7 14:15:07 2021 +0200 Remove build-only include from public header The dix-config.h file is not installed, but dix.h is. The include makes the compilation of external drivers fail (for example the libinput driver). The Xserver compilation also works without the include, so just remove it. Signed-off-by: Roman Gilg commit 31fb35a7afc782e857bf60e524e7d966dbcd2551 Author: Demi Marie Obenour Date: Tue Jul 20 22:58:42 2021 -0400 XFixes: add version check for byteswapped clients The version check for byteswapped clients was missing. commit 7eba412072afdc9d27896410872e40364a8010bf Author: Olivier Fourdan Date: Fri Mar 26 15:48:23 2021 +0100 xfree86: Move xf86CVTMode() function The xf86CVTMode() was implemented in a standalone source file because it was being used for both the xfree86 API and the standalone cvt utility. Now that the cvt utility is removed (as part of libxcvt) we can move the small xf86CVTMode() function with the rest of the xf86Modes sources. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit f2781e95369583259991cd3add6f90f33be32171 Author: Olivier Fourdan Date: Thu Mar 25 10:27:31 2021 +0100 xfree86/cvt: Drop cvt utility The cvt utility is now replaced by the standalone version found in libxcvt, no need to build the one in xfree86 anymore. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit f788289bdcc4f04bd2fb62552df1c8c1ae0aea45 Author: Olivier Fourdan Date: Thu Mar 25 10:19:55 2021 +0100 xfree86: Use libxcvt Replace the local implementation of the VESA CVT standard timing modelines generator with the one from libxct to avoid code duplication. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit 6ea2c001f9d23c91113b937fb99053e262d21df6 Author: Olivier Fourdan Date: Thu Mar 25 10:17:49 2021 +0100 xwayland: Use libxcvt Xwayland is using a copy of the CVT generator found in Xorg. Rather than duplicating the code within the xserver tree, use the libxcvt implementation instead. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit a4ab57cb748674823744a8ef5a0b416ee553efe8 Author: Olivier Fourdan Date: Thu Mar 25 10:16:31 2021 +0100 build: Add dependency on libxcvt libxcvt is a library providing a standalone version of the X server implementation of the VESA CVT standard timing modelines generator. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1142 Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner commit 84897891e5e7eb44068cda22284dca70c6cfd1a2 Author: Olivier Fourdan Date: Fri Jul 9 15:11:51 2021 +0200 ci: Install libxcvt from git Signed-off-by: Olivier Fourdan commit 5c2592cbb19f996c4bb87bca4e4e46ab911d4bec Author: Demi Marie Obenour Date: Tue Jul 20 22:37:26 2021 -0400 Add do-while loops to DIX macros This ensures they will behave properly in conditionals and always require a trailing semicolon. commit d83c84bd9dc7fbd3588ce70b0c8bf0f63ed29ff3 Author: Alex Richardson Date: Fri Jul 23 09:24:50 2021 +0100 Mark the dixChangeWindowProperty() value argument as const It is copied using memcpy() and not modified so we can add const. This fixes a -Wincompatible-pointer-types-discards-qualifiers compiler warning that was failing a -Werror XVnc build for me. Signed-off-by: Alex Richardson commit fb5322ce2819260c07e06ab22b47df0a5d19f07d Author: Zoltán Böszörményi Date: Thu Jul 8 06:14:21 2021 +0200 glamoregl: Initialize glamor on the main device This allows e.g. an UDL device (driven by llvmpipe) to be automatically set up with GPU acceleration via reverse PRIME. The result is e.g.: # DISPLAY=:0.2 xrandr --listproviders Providers: number : 2 Provider 0: id: 0xec cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 1 outputs: 1 associated providers: 1 name:modesetting Provider 1: id: 0x12c cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:Intel Signed-off-by: Zoltán Böszörményi commit f08bc32f5abc23ea715c15e8e86150434cc99e4f Author: Zoltán Böszörményi Date: Thu Jul 8 06:13:24 2021 +0200 xf86: Assign GPUs to screens according to configuration If there is an explicit configuration, assign the RandR provider of the GPUDevice to the screen it was specified for. If there is no configuration (default case) the screen number is still 0 so it doesn't change behaviour. The result is e.g: # DISPLAY=:0.2 xrandr --listproviders Providers: number : 2 Provider 0: id: 0xd2 cap: 0x2, Sink Output crtcs: 1 outputs: 1 associated providers: 0 name:modesetting Provider 1: id: 0xfd cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:Intel Signed-off-by: Zoltán Böszörményi commit cd567415cc5645f8cdc78e85e8887e5cce76e6d7 Author: Zoltán Böszörményi Date: Thu Jul 8 06:09:44 2021 +0200 xf86: Extract screen configuration matching into its own function Signed-off-by: Zoltán Böszörményi commit 16571b8926a5a7ba5a1885b36a16857addbe8f41 Author: Boris-Barboris Date: Tue Jun 22 00:51:08 2021 +0300 Don't hardcode fps for fake screen Currently, when main hardware screen is powered-off, X server initializes fake screen's timer with 1 second update interval. Streaming software like Nomachine or Vnc, as well as desktop input automation suffers from it, since it will forever be stuck on 1 fps until the display is turned back on. This commit adds command line option -fakescreenfps that allows the user to change the default fake screen timer. Signed-off-by: Baranin Alexander commit 8836b9d243444031b6396d39d345f2f83b5fa6a9 Author: Łukasz Spintzyk Date: Thu Jul 22 13:12:05 2021 +0200 modesetting: unflip not possible when glamor is not set This is fixing crashes of xfce when running under qemu commit d6c02ffd9c910637f6b3b7249507998e9e45f93c Author: Łukasz Spintzyk Date: Mon Jul 19 14:25:28 2021 +0200 present: fallback get_crtc to return crtc belonging to screen with present extension Since crtc can belong to secondary output that may not have present extension enabled we should fallback to first enabled crtc or fake crtc. Fix for issue xorg/xserver#1195 commit f6f2f203bcde47c334836191982d77bbbbbf533c Author: Michel Dänzer Date: Thu May 20 19:00:10 2021 +0200 present: Drop flip_idler member from present_vblank_rec It's redundant with the pixmap member of struct xwl_present_event. Acked-by: Olivier Fourdan commit 212cfbcf68d279f2b3494e79fe8e3fbaabeba77c Author: Michel Dänzer Date: Wed May 12 15:25:51 2021 +0200 xwayland/present: Use present_vblank_ptr instead of xwl_present_event* Where the latter isn't really needed. Acked-by: Olivier Fourdan commit fe8c7855f3a85f156c792a3f18a175138407054b Author: Michel Dänzer Date: Wed May 12 12:51:32 2021 +0200 xwayland/present: Fold xwl_present_release_event into _free_event The only difference was unhooking from the vblank.event_queue list, which is already done by xwl_present_flip_notify_vblank in xwl_present_msc_bump. commit 31d2ebca77fcabec81194ae6dcd724c699b1b513 Author: Michel Dänzer Date: Mon May 10 18:33:43 2021 +0200 xwayland/present: Drop target_msc member from struct xwl_present_event Use present_vblank_rec::exec_msc instead. Acked-by: Olivier Fourdan commit 495ec596640e26b6995c93eedc922d2702ad64ad Author: Michel Dänzer Date: Mon May 10 19:04:07 2021 +0200 xwayland/present: Drop pending member from struct xwl_present_event We are handling two cases here: the active flip or the pending flip. For the pending flip (event->pending == TRUE), we called xwl_present_release_pixmap. For the active flip (event->pending == FALSE), we called xwl_present_release_event. However, xwl_present_flip_notify_vblank already unhooked event->vblank.event_queue. So this was effectively the same as calling xwl_present_release_pixmap. Acked-by: Olivier Fourdan commit f73340445fe1da9ae9bc3197eb2ef41589aa2a4e Author: Michel Dänzer Date: Fri May 7 18:16:23 2021 +0200 xwayland/present: Drop list member from struct xwl_present_event Use present_vblank_rec::event_queue instead. The changes in xwl_present_execute shouldn't really be needed, since we should never hit queue_vblank in present_execute_wait. But let's be safe rather than sorry, plus this simplifies the code. Acked-by: Olivier Fourdan commit aac31d2758d4e84774b633ec108d18f0bad6ef64 Author: Michel Dänzer Date: Fri May 7 17:58:27 2021 +0200 xwayland/present: Drop exec_queue member from struct xwl_present_window Doesn't serve any purpose anymore. Acked-by: Olivier Fourdan commit f8c086b2145d1c9364e9b43ff4d796791d8af169 Author: Michel Dänzer Date: Fri May 7 17:55:13 2021 +0200 xwayland/present: Fold xwl_present_event_notify into its caller Can just call xwl_present_execute directly. This allows dropping the window member from struct xwl_present_window as well. Acked-by: Olivier Fourdan commit c30f3d08acb01a41df0fe7176f237137f3039480 Author: Michel Dänzer Date: Fri May 7 17:49:07 2021 +0200 xwayland/present: Use exec_queue for deferring completion events We clear the vblank->pixmap field, so next time xwl_present_execute falls through to present_execute_post. Acked-by: Olivier Fourdan commit 4503c8d9ea7df5bda470501e638a730d91d718c9 Author: Michel Dänzer Date: Fri May 7 12:56:30 2021 +0200 xwayland/present: Fold xwl_present_idle_notify into its caller Allows simplification by avoiding indirection. Acked-by: Olivier Fourdan commit b2a06e0700fa48c1e77fc687e6af39a4bb7c2ceb Author: Michel Dänzer Date: Fri May 7 12:34:49 2021 +0200 xwayland/present: Drop sync_flip member of struct xwl_present_window The same information can be determined from the flip queue. Acked-by: Olivier Fourdan commit fc53e3c536b5a338c595b5724c7d0b4734e45871 Author: Michel Dänzer Date: Thu May 6 18:42:46 2021 +0200 xwaland/present: Drop flip_pending member of struct xwl_present_window Use the first element of the flip_queue list for the same purpose. Acked-by: Olivier Fourdan commit c592c66625d964e8ed1f3fcfc01a245e4c8a8015 Author: Michel Dänzer Date: Fri May 7 12:21:44 2021 +0200 xwayland/present: Fold xwl_present_flip_notify into its callers No need for them to be separate anymore. Acked-by: Olivier Fourdan commit 42301760802ea1cbe3698797c2bfb3a91ee02430 Author: Michel Dänzer Date: Fri Apr 23 12:59:55 2021 +0200 xwayland/present: Embed present_vblank_rec in xwl_present_event This allows for various simplifications. Use the pointer to the struct memory as the event ID. In contrast to the SCMD code for Xorg (where pending DRM events cannot be cancelled), this is safe here, because we can destroy pending Wayland callbacks. So we can't get a callback with a stale pointer to freed memory. Remove xwl_present_window::release_list in favour of present_vblank_rec::window_list. Remove xwl_present_event::xwl_present_window in favour of present_vblank_rec::window. xwl_present_free_event is never called for a NULL pointer anymore, no need to check. v2: * Restore DestroyWindow wrapping order to make sure present_destroy_window doesn't call xwl_present_abort_vblank. Acked-by: Olivier Fourdan commit 61cc5d96ed281a082d8dd414506dea0084e446fd Author: Michel Dänzer Date: Wed May 5 15:02:25 2021 +0200 present: Refactor present_vblank_init helper ouf of _vblank_create Allows embedding into another struct. Acked-by: Olivier Fourdan commit 35f173ddb606f9fbac7957e427fe28a377204cfe Author: Michel Dänzer Date: Thu Apr 29 18:44:04 2021 +0200 xwayland/present: Drop abort member of struct xwl_present_event We can call xwl_present_free_event unconditionally from xwl_present_abort_vblank, since the sync_callback is already destroyed in xwl_present_cleanup. Acked-by: Olivier Fourdan commit 0517460301cbf9c6ed3020ef1dd0cd1df94ea178 Author: Michel Dänzer Date: Tue May 11 12:56:53 2021 +0200 xwayland/present: Simplify calls to Xwayland-private functions Change parameter types to what's really needed, or just fold the function into its only caller. Acked-by: Olivier Fourdan commit 490248ea70d3fe923446e17312880ae63590d45c Author: Michel Dänzer Date: Mon Apr 19 12:59:56 2021 +0200 xwayland/present: Rename present_wnmd_* functions to xwl_present_* The WNMD indirection is gone. Acked-by: Olivier Fourdan commit 0c0cbbc7cb4fa917a2b33494efb6dc03e5de9051 Author: Michel Dänzer Date: Wed Apr 21 17:15:27 2021 +0200 present: Remove present_wnmd_info_rec Doesn't serve any purpose anymore. Acked-by: Olivier Fourdan commit 561c63d0f13a8c6379ed05338172570f93dbce37 Author: Michel Dänzer Date: Mon Apr 19 18:41:59 2021 +0200 xwayland/present: Merge present_wnmd_flips_stop & xwl_present_flips_stop Just use the latter instead of the former elsewhere. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit a67f16fde1ff094c3ec4fffe8a7269b30c7b8668 Author: Michel Dänzer Date: Mon Apr 19 18:53:36 2021 +0200 xwayland/present: Fold present_wnmd_get_ust_msc into its callers Just use xwl_present_get_ust_msc directly. No need for the indirection anymore. Acked-by: Olivier Fourdan commit 080c1ca3f57b4226f34624b0cd2171ffbbc2be4f Author: Michel Dänzer Date: Mon Apr 19 18:46:23 2021 +0200 xwayland/present: Fold present_wnmd_queue_vblank into its callers Just use xwl_present_queue_vblank directly. No need for the indirection anymore. Acked-by: Olivier Fourdan commit c22887bc7a83e9b8ad112aadaec069b0366fc38e Author: Michel Dänzer Date: Mon Apr 19 18:51:06 2021 +0200 xwayland/present: Fold present_wnmd_get_crtc into present_wnmd_pixmap And use xwl_present_get_crtc directly. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit cb35ff596ec4e4fc6a4e96d55e280cdf399791e1 Author: Michel Dänzer Date: Mon Apr 19 18:34:07 2021 +0200 xwayland/present: Fold present_wnmd_check_flip into its callers Mainly into xwl_present_check_flip, and call that from present_wnmd_check_flip_window. No need for them to be separate anymore. Acked-by: Olivier Fourdan commit 7b78cf6b3ae386b9df2483692041dfa38a91bedb Author: Michel Dänzer Date: Mon Apr 19 18:26:55 2021 +0200 xwayland/present: Simplify query_capabilities No need for the WNMD indirection anymore. Acked-by: Olivier Fourdan commit 244403ec8718d782d57a830ece9357a75a0dd70b Author: Michel Dänzer Date: Mon Apr 19 18:01:52 2021 +0200 xwayland/present: Fold present_wnmd_abort_vblank into its only caller No need for them to be separate anymore. Acked-by: Olivier Fourdan commit f7adbc2166b7a4662cbd69507d8cbac11034c87e Author: Michel Dänzer Date: Mon Apr 19 18:06:22 2021 +0200 xwayland/present: Drop present_wnmd_flush in favour of xwl_present_flush No need for the indirection anymore. Acked-by: Olivier Fourdan commit 7fd114365d694360540bc46cd615aa47373be0a8 Author: Michel Dänzer Date: Mon Apr 19 19:02:32 2021 +0200 xwayland/present: Fold present_wnmd_flip into present_wnmd_execute No need for the indirection anymore. Acked-by: Olivier Fourdan commit 2e1dcd731f98a8beceee699cc57b7082f98916c4 Author: Michel Dänzer Date: Tue Apr 20 19:01:12 2021 +0200 xwayland/present: Fold present_wnmd_screen_init into xwl_present_init No need for them to be separate anymore. Acked-by: Olivier Fourdan commit b6419359b6b11ec659f59cc74075fcf049591425 Author: Michel Dänzer Date: Wed Apr 21 12:50:02 2021 +0200 present: Move present_wnmd.c contents to hw/xwayland/xwayland-present.c This will allow eliminating indirections and making the Xwayland Present code more efficient and easier to follow. While this technically changes the Xorg video driver ABI, I don't know of any drivers using the dropped present_wnmd_* symbols, and I doubt a Xorg driver could make use of them as is anyway. (As a bonus, Xorg no longer links any Xwayland specific Present code) v2: * Wrap DestroyWindow before initializing Present, so that present_destroy_window runs before xwl_present_cleanup. Avoids crash due to present_destroy_window calling xwl_present_* functions when xwl_present_window was already freed. (Olivier Fourdan) Acked-by: Olivier Fourdan commit c35a716b02921e2fcae5fe89295a99c6dd5dec8c Author: Michel Dänzer Date: Fri Apr 16 18:45:39 2021 +0200 present: Fold wnmd_init_mode_hooks into wnmd_screen_init Preparation for moving WNMD code to hw/xwayland. No functional change intended. Acked-by: Olivier Fourdan commit 10bdd87fe49cbd9b4c4b584024d663b928d3f1be Author: Michel Dänzer Date: Fri Apr 16 18:43:48 2021 +0200 present: Move present_wnmd_screen_init to present_wnmd.c Now all WNMD code is in present_wnmd.c. Acked-by: Olivier Fourdan commit b6d54b0f5d2fb3dc8a4b2812bfee94112c332256 Author: Michel Dänzer Date: Wed Apr 21 17:01:36 2021 +0200 present: Dispatch clear_window_flip via present_screen_priv hook Eliminates special cases in present_destroy_window. Acked-by: Olivier Fourdan commit 93666ebe37a9c8d64b814c7af6b895f89ca5ff88 Author: Michel Dänzer Date: Wed Apr 21 18:39:36 2021 +0200 present: Remove create_event_id hook Each present_vblank_create caller generates and sets the ID afterwards. Acked-by: Olivier Fourdan commit 44f705a5b6b4f79682c5e649eb718a193e01ec47 Author: Michel Dänzer Date: Mon Apr 19 18:19:30 2021 +0200 present: Pass capabilities to present_vblank_create by value Preparation for moving WNMD code to hw/xwayland. No functional change intended. Acked-by: Olivier Fourdan commit 86e645bcfaea63bc3f91e4ccbbc19569929b92c3 Author: Michel Dänzer Date: Fri Jul 2 12:41:34 2021 +0200 xwayland/eglstream: Drop xwl_eglstream_set_window_pixmap Not sure why we'd need to abandon a pending stream for a pixmap just because it's no longer a window pixmap. Let's try not to. Reviewed-by: Olivier Fourdan commit ba8763c27b2ebc91850abfcaf32ae972e80142e7 Author: Michel Dänzer Date: Fri Jul 2 12:57:21 2021 +0200 xwayland/eglstream: Consolidate pending_cb destruction Into a new xwl_eglstream_destroy_pending_stream helper. Reviewed-by: Olivier Fourdan commit 204f10c29e0f323e7829ecf48e0f002be96e194d Author: Michel Dänzer Date: Wed Jul 7 18:53:35 2021 +0200 xwayland: Call RRTellChanged if the RandR configuration may have changed This makes sure RandR events are sent to interested clients as needed. This was happening implicitly in some cases, but not in others, e.g. if the root window size didn't change. If this were to call RRTellChanged more often than necessary in some cases, that should be harmless, as it only sends events if something has actually changed since last time. Should fix https://bugzilla.redhat.com/show_bug.cgi?id=1979892 . v2: * Call RRTellChanged at the very end of update_screen_size, just in case. Reviewed-by: Olivier Fourdan commit a6d178b6af4bb4cd7ba28299c3ddd9d90bcbaaa5 Author: Michel Dänzer Date: Wed Jul 7 18:51:02 2021 +0200 randr: Bail from RRTellChanged if there's no root window yet This can happen if RRTellChanged is called during initialization. Continuing in that case makes no sense conceptually: * Any event sent over the wire requires a corresponding window. * No root window probably means there can't be any clients which could receive the events. In practice, it would result in a crash down the road due to dereferencing the NULL ScreenRec::root pointer. Reviewed-by: Olivier Fourdan commit 7e20c8b7b8357eb8986f89e85be22ab1c29f2ca4 Author: Matt Turner Date: Thu Jul 8 12:15:13 2021 -0700 Build xz tarballs instead of bzip2 Signed-off-by: Matt Turner commit a9552868697cae02e37e67ae774a072885f202f8 Author: Dave Airlie Date: Thu Jul 1 06:48:55 2021 +1000 glamor: add EXT_gpu_shader4 support This enables a number of the GLSL 1.30 paths on GPUs that have EXT_gpu_shader4 but don't have GLSL 1.30 exposed. (Intel gen4/5 mainly) Reviewed-by: Adam Jackson commit a2f5b917f511fca1c9b1501495664e2f63c2e1b0 Author: Dave Airlie Date: Fri Jul 2 04:52:23 2021 +1000 glamor: add glamor_glsl_has_ints wrapper This should make adding gpu shader4 support cleaner Reviewed-by: Adam Jackson commit b4f55712da4d7294bfeb6cffc45b572fd999d800 Author: Povilas Kanapickas Date: Mon Jul 5 21:40:55 2021 +0300 xserver 21.0.99.1 Signed-off-by: Povilas Kanapickas commit b67e514dbb59bffc23b75d47ca7f24e96c4aeb05 Author: Povilas Kanapickas Date: Sat Jun 26 09:44:39 2021 +0300 meson: Fix warnings when reading back and checking feature flags Meson does not like comparing things of different types which is a problem when reading back values of feature flags as they may contain either false (bool) or 1 (string). Since there is a strong reason why we use false when the feature does not exist, we work around this issue by always converting the returned value to int via to_int(). Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1190 Signed-off-by: Povilas Kanapickas commit b2a0de4f072fdcc0fb20a0853f7edaf714add9d9 Author: Adam Jackson Date: Tue Jun 22 12:39:56 2021 -0400 xfixes: Allow the client to upgrade the fixes protocol version If you say FixesQueryVersion twice we remember whatever the second version number was. With just libXfixes this isn't an issue because the request is hidden in extension setup, but libxcb-xfixes doesn't do that for you, which means the second one can _lower_ the requested fixes version, disabling requests that the client thought it had enabled. Paper over this by allowing the version number to be raised but not lowered. Also go ahead and delete the minor version number from the client state since xfixes doesn't have minor versions (yet, anyway). commit 7d509b6f342d9732b567dc4efa867ea24919853b Author: Olivier Fourdan Date: Fri Apr 30 09:56:05 2021 +0200 xwayland/eglstream: Remove stream validity To avoid an EGL stream in the wrong state, if the window pixmap changed before the stream was connected, we would still keep the pending stream but mark it as invalid. Once the callback is received, the pending would be simply discarded. But all of this is actually to avoid a bug in egl-wayland, there should not be any problem with Xwayland destroying an EGL stream while the compositor is still using it. With that bug now fixed in egl-wayland 1.1.7, we can safely drop all that logic from Xwayland EGLstream backend. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1189 commit 2be9f795bc15012dc912f595003e01bb6aa66f54 Author: Olivier Fourdan Date: Wed Jun 23 11:35:17 2021 +0200 xwayland/eglstream: Keep pending stream if the pixmap didn't change If the pixmap does not actually change in set_window_pixmap(), there is no need to invalidate the pending stream, if there's one. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit 2531ee02450e3be3549daa09407557c3addeba02 Author: orbea Date: Wed Jun 23 05:50:21 2021 -0700 hw/dmx/config: Link directly with libdmxconfig.a When building xserver with slibtool (https://dev.midipix.org/cross/slibtool) the build will fail. /usr/bin/ld: cannot find -ldmxconfig This is because xserver creates libdmxconfig.a internally and then links with the linker flag -ldmxconfig. However according to automake documentation the -lfoo linker flags should only be used for external dependencies and all internal libraries should be linked with the libtool archive file (.la) or the static archive (.a) when the former is not available. GNU libtool is far more permissive and happens to silently obscure this issue while slibtool fails because it instead sees '-L./.libs -ldmxconfig'. commit 2f53d1cf7304574a516f6868822307648bc35333 Author: Povilas Kanapickas Date: Wed Apr 7 18:22:05 2021 +0300 config: Fix platform busid parsing when there is no ID_PATH prop On at least Lenovo Thinkpad E585 udev does not have ID_PATH property for the drm node (see https://gitlab.freedesktop.org/xorg/xserver/-/issues/993). While this is likely udev bug, this causes the device to be not recognized as attribs->busid is NULL, which causes platform_find_pci_info to be not called and corresponding xf86_platform_devices[i]->pdev to be NULL. At this moment pdev being NULL will cause a crash, but this is a different bug. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 Fixes: 0816e8fc linux: Make platform device probe less fragile Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit d4b38e111946b934d0f8438dc295dd9f7316318c Author: Olivier Certner Date: Tue Feb 9 10:49:00 2021 +0100 os: Properly report failure to link lock file Stop assuming that a failure to link always means that the file indeed exists. In case of other failure (e.g., permissions), the user would get an inconsistent "Can't read lock file" message. Signed-off-by: Olivier Certner commit d66b7ec12986efd4f32fcc84cdaacbd04ec98ccb Author: Łukasz Spintzyk Date: Wed Jun 23 15:26:23 2021 +0200 xfree86: Fix out of array bound access to xf86Entities Signed-off-by: Łukasz Spintzyk commit 0d93bbfa2cfacbb73741f8bed0e32fa1a656b928 Author: Povilas Kanapickas Date: Fri Mar 26 00:51:02 2021 +0200 xfree86: Fix potentially NULL reference to platform device's PCI device xf86_platform_devices[i].pdev may be NULL in cases we fail to parse the busid in config_udev_odev_setup_attribs() (see also [1], [2]) such as when udev does not give use ID_PATH. This in turn leads to platform_find_pci_info() being not called and pdev being NULL. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076 Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit 303763941f9941e2e215a3c978b72de495478033 Author: Povilas Kanapickas Date: Fri Mar 26 00:51:01 2021 +0200 xfree86: Consistently check for reference to primaryBus pci_device This is the only place where we don't check whether primaryBus.id.plat->pdev is not NULL before accessing its members. It may be NULL in cases we fail to parse the busid in config_udev_odev_setup_attribs() (see also [1], [2]) such as when udev does not give use ID_PATH. This in turn leads to platform_find_pci_info() being not called and pdev being NULL in one of the items within the xf86_platform_devices array. For this to cause a crash we only need it to become the primaryBus device. [1]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/993 [2]: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1076 Signed-off-by: Povilas Kanapickas commit b9722d39cd619ac55c2cfbb5644eabb84ff57f1b Author: Povilas Kanapickas Date: Thu Jun 17 18:00:50 2021 +0300 configure.ac: Switch project version to 20.x.y style Reviewed-by: Zoltán Böszörményi Signed-off-by: Povilas Kanapickas commit ef89b6648e2a806237a6d2fa598e1b9c83f128b4 Author: Zoltán Böszörményi Date: Mon Jun 21 12:12:41 2021 +0200 xfree86: Fix NULL pointer dereference crash screenp->displays[count] (passed to configDisplay() in configScreen()) is NULL if there is no Virtual setting in the configuration. Fixes: f8a6be04d0c7e6a99824ff888ad6c010960c5c21 ("xfree86: Change displays array to pointers array to fix invalid pointer issues after table reallocation") Signed-off-by: Zoltán Böszörményi commit aad61e8e03311eb8bae4f7db59e65634733eadc2 Author: Olivier Fourdan Date: Fri Jun 18 14:52:55 2021 +0200 glx: Fix use after free in MakeCurrent The fix from commit c468d34c7 - "glx: Set ContextTag for all contexts" is actually incomplete, it correctly sets the context tag for direct contexts as well, but would fail to mark the context's currentClient. As a result, when the context is destroyed, it would be freed immediately rather than being just scheduled for deletion, even though it is still current for some client. leading to a use-after-free. Make sure to also set the context's currentClient for direct contexts as well, not just indirect ones. Signed-off-by: Olivier Fourdan Fixes: c468d34c7 - "glx: Set ContextTag for all contexts" Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1186 Reviewed-by: Adam Jackson commit 021b3c2f778e718338f232b94880fc3ae9092085 Author: Povilas Kanapickas Date: Tue Jun 15 12:40:47 2021 +0300 configure.ac: Bump inputproto dep to 2.3.99.1 This should have been part of 6cbcbc81525b131b5b94409ea870af663d5c28bb. Signed-off-by: Povilas Kanapickas commit 05b3c681ea2f478c0cb941c2f8279919cf78de6d Author: Daniel Strnad Date: Tue May 19 15:52:35 2020 +0200 hw/xfree86: Propagate physical dimensions from DRM connector Physical dimmension of display can be obtained not just by configuration or DDC, but also directly from kernel via drmModeGetConnector(). Until now xserver silently discarded these values even when no configuration nor EDID were present and fallbacked to default DPI. commit f8a6be04d0c7e6a99824ff888ad6c010960c5c21 Author: Łukasz Spintzyk Date: Tue Jun 8 20:02:21 2021 +0200 xfree86: Change displays array to pointers array to fix invalid pointer issues after table reallocation There are rare cases when xf86SetDepthBpp is resizing displays array in confScreen. As that array is shared between set of ScrnInfoRec's then realloc might invalidate chached DispPtr display values in otheres ScrnInfoRec objects. If we will change displays array as an array of pointers to DispRec then cached DispRec pointers in ScrnInfoRec won't be invalid after reallocation of displays array. Signed-off-by: Łukasz Spintzyk commit 1a1bd5cf7a1a3364afb625f020e1c013fbabfbb6 Author: Povilas Kanapickas Date: Fri Apr 16 16:15:35 2021 +0300 modesetting: Add a limit on async page flip error log frequency In certain circumstances we will have a lot of flip errors without a reasonable way to prevent them. In such case we reduce the number of logged messages to at least not fill the error logs. The details are as follows: At least on i915 hardware support for async page flip support depends on the used modifiers which themselves can change dynamically for a screen. This results in the following problems: - We can't know about whether a particular CRTC will be able to do an async flip without hardcoding the same logic as the kernel as there's no interface to query this information. - There is no way to give this information to an application, because the protocol of the present extension does not specify anything about changing of the capabilities on runtime or the need to re-query them. Even if the above was solved, the only benefit would be avoiding a roundtrip to the kernel and reduced amount of error logs. The former does not seem to be a good enough benefit compared to the amount of work that would need to be done. The latter is solved in this commit. Reviewed-by: Eero Tamminen Signed-off-by: Povilas Kanapickas commit 9992245c5f7821de1fbd866f43f0afe55080ed67 Author: Povilas Kanapickas Date: Fri Apr 16 16:15:34 2021 +0300 modesetting: Extract flip failure logging to a single place Reviewed-by: Eero Tamminen Signed-off-by: Povilas Kanapickas commit 9adb13e296baead53112a268ddfd291195742c71 Author: Jose Maria Casanova Crespo Date: Tue Jun 8 14:52:17 2021 +0200 glamor: Avoid using GL_QUADS on V3D Like in 0e3f1252dacdc3194 ("glamor: Avoid using GL_QUADS on VC4") this will avoid mesa to fallback doing conversion for QUADS primitives. Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Emma Anholt commit 104c7c50485238a1e8c2090dc96126e9624ef870 Author: Michel Dänzer Date: Tue May 18 18:02:59 2021 +0200 xwayland/present: Move wl_buffer check into xwl_glamor_check_flip Keeps the glamor specific code together more. Reviewed-by: Olivier Fourdan commit 3641c24bd012d032ec289cde312a9a5a3ba8c3bf Author: Michel Dänzer Date: Tue May 18 17:56:50 2021 +0200 xwayland/eglstream: Handle xwl_pixmap_get returning NULL In xwl_glamor_eglstream_get_wl_buffer_for_pixmap. This can likely be hit now with an SHM pixmap via the Present flip path. There might be other corner cases. Fixes: f3eb1684fa50 "xwayland: enable MIT-SHM shared pixmaps" Reviewed-by: Olivier Fourdan commit d163e0a1d5ec54cc726d45a239a0777d0a84d610 Author: Michel Dänzer Date: Fri Jun 11 18:25:01 2021 +0200 ci: Fix UPSTREAM_REPO -> FDO_UPSTREAM_REPO The latter is what ci-templates expect. Fixes: ab73c16930d6 "ci: Update to the latest templates" Reviewed-by: Simon Ser commit 7e7c147105ac704a7b33bdee0f85dc9ccdd8f747 Author: Lukasz Spintzyk Date: Mon Jun 7 09:30:46 2021 +0200 modesetting: Disable reverse prime offload mode for displays running on evdi,udl This mode for displays running on evdi/udl as side effect of failed glamor_egl_init reverse_prime_offload_mode was initialized to FALSE After Mesa upgrade to 21.0.0 GL_RENDERER is not llvmpipe that results in successful glamor_egl_init and reverse_prime_offload_mode enabled. This commit is explicitly disabling reverse_prime_offload_mode for evdi and udl drivers Signed-off-by: Łukasz Spintzyk commit c468d34c7208c9041f9c077b54a00ae9cccad6a3 Author: Olivier Fourdan Date: Thu Jun 3 17:51:01 2021 +0200 glx: Set ContextTag for all contexts Currently, xorgGlxMakeCurrent() would set the context tag only for indirect GLX contexts. However, several other places expect to find a context for the tag or they would raise a GLXBadContextTag error, such as WaitGL() or WaitX(). Set the context tag for direct contexts as well, to avoid raising an error and possibly killing the client. Thanks to Erik Kurzinger for spotting the issue. Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 6b47321bc6138bcd737b36e038aba904d56f1cf6 Author: Olivier Fourdan Date: Wed Apr 28 13:33:29 2021 +0200 dix: Add optional terminate delay When the command line option "-terminate" is used, it could be interesting to give it an optional grace period to let the Xserver running for a little longer in case a new connection occurs. This adds an optional parameter to the "-terminate" command line option for this purpose. v2: Use a delay in seconds instead of milliseconds (Martin Peres ) v3: Clarify man page entry, ensure terminateDelay is always >= 0, simplify TimerFree(). (Peter Hutterer ) Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit e167299f6050d85778e62ed2a1e544ceef6452fc Author: Olivier Fourdan Date: Fri Feb 19 12:03:39 2021 +0100 xfixes: Add ClientDisconnectMode With Wayland compositors now being able to start Xwayland on demand, the next logical step is to be able to stop Xwayland when there is no more need for it. The Xserver itself is capable of terminating itself once all X11 clients are gone, yet in a typical full session, there are a number of X11 clients running continuously (e.g. the Xsettings daemon, IBus, etc.). Those always-running clients will prevent the Xserver from terminating, because the actual number of X11 clients will never drop to 0. Worse, the X11 window manager of a Wayland compositor also counts as an X11 client, hence also preventing Xwayland from stopping. Some compositors such as mutter use the XRes extension to query the X11 clients connected, match their PID with the actual executable name and compare those with a list of executables that can be ignored when deciding to kill the Xserver. But that's not just clumsy, it is also racy, because a new X11 client might initiate a connection the X11 server right when the compositor is about to kill it. To solve this issue directly at the Xserver level, this add new entries to the XFixes extension to let the X11 clients themselves specify the disconnect mode they expect. Typically, those X11 daemon clients would specify the disconnect mode XFixesClientDisconnectFlagTerminate to let the Xserver know that they should not be accounted for when checking the remaining clients prior to terminate. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit b7a85e44da91d1663d5b4eabac06327c92a80f91 Author: Erik Kurzinger Date: Thu Dec 10 14:24:32 2020 -0800 glx: don't create implicit GLXWindow if one already exists If a GLXMakeCurrent request specifies an X window as its drawable, __glXGetDrawable will implicitly create a GLXWindow for it. However, the client may have already explicitly created a GLXWindow for that X window. If that happens, two __glXDrawableRes resources will be added to the window. If the explicitly-created GLXWindow is later destroyed by the client, DrawableGone will call FreeResourceByType on the X window, but this will actually free the resource for the implicitly-created GLXWindow, since that one would be at the head of the list. Then if the X window is destroyed after that, the resource for the explicitly-created GLXWindow will be freed. But that GLXWindow was already destroyed above. This crashes the server when it tries to call the destroyed GLXWindow's destructor. It also means the implicitly-created GLXWindow would have been leaked since the FreeResourceByType call mentioned above skips calling the destructor. To fix this, if __glXGetDrawable is given an X window, it should check if there is already a GLXWindow associated with it, and only create an implicit one if there is not. Signed-off-by: Erik Kurzinger Reviewed-by: Adam Jackson commit 8274dd664335cd72739a1107f174e7a974a9ea24 Author: Jan Beich Date: Sun May 30 19:49:43 2021 +0000 meson: provide fallback for *proto dependencies Meson has a built-in facility to use bundled versions of dependencies if system packages are too old. Enable for xorgproto after 8e504d8b36eb: Run-time dependency xproto found: YES 7.0.33 Run-time dependency randrproto found: YES 1.6.0 Run-time dependency renderproto found: YES 0.11.1 Run-time dependency xextproto found: YES 7.3.0 Dependency inputproto found: NO found 2.3.2 but need: '>= 2.3.99.1' Found CMake: /usr/local/bin/cmake (3.20.2) Run-time dependency inputproto found: NO (tried pkgconfig and cmake) Looking for a fallback subproject for the dependency inputproto meson.build:73:0: ERROR: Neither a subproject directory nor a xorgproto.wrap file was found. commit 34a58d7714025bc1043bf5282358406eb10e4b8e Author: Olivier Fourdan Date: Thu May 20 16:46:33 2021 +0200 xwayland/eglstream: Log when GL_OES_EGL_image is missing That will dramatically affect performance, might as well log when we cannot use GL_OES_EGL_image with the NVIDIA closed-source driver. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit fae58e9b03696a3890f9c876306c68ffa6f9ff30 Author: Olivier Fourdan Date: Mon May 17 18:20:57 2021 +0200 xwayland/eglstream: Use "nvidia" for GLVND If the EGLStream backend is able to use hardware acceleration with the NVIDIA closed source driver, we should use the "nvidia" GLX implementation instead of the one from Mesa to take advantage of the NVIDIA hardware accelerated rendering. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 24fc8aea1e4bbaba780f1a316fba797a0198f603 Author: Olivier Fourdan Date: Thu May 20 12:11:42 2021 +0200 xwayland: Add preferred GLVND vendor to xwl_screen If Xwayland's EGLstream backend supports hardware acceleration with the NVIDIA closed-source driver, the GLX library also needs to be one shipped by NVIDIA, that's what GLVND is for. Add a new member to the xwl_screen that the backend can optionally set to the preferred GLVND vendor to use. If not set, "mesa" is assumed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2de5ded3c6d73c1672d2cb14d603cb23fcd477e5 Author: Niveditha Rau Date: Tue May 11 15:08:41 2021 -0700 glx: Check for byte-swapping in SetReplyHeader Check for the need to byte-swap when attempting to display GL apps between a big-endian server and little-endian client or vice versa. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1127 commit bcb1de600a7656e4ee6434a8d2e2772ca9fd0473 Author: Adam Jackson Date: Thu Apr 22 11:47:29 2021 -0400 glx: Fix error return code in GLXGetDrawableAttributes This should only ever throw GLXBadDrawable, says the protocol spec. commit eb6f8daca5dc15af321d0bcc54cd6cb8b6779257 Author: Povilas Kanapickas Date: Sun May 30 13:26:48 2021 +0300 Xi: Work around broken libxcb that doesn't ignore unknown device classes libxcb 14.1 and older are not forwards-compatible with new device classes as it does not properly ignore unknown device classes. Since breaking libxcb would break quite a lot of applications, we instead report Gesture device class only if the client advertised support for XI 2.4. Clients may still not work in cases when a client advertises XI 2.4 support and then a completely separate module within the client uses broken libxcb to call XIQueryDevice. Signed-off-by: Povilas Kanapickas commit 7e692633fb9ab8e1ed2a88c3abb4fe04144c0a80 Author: Povilas Kanapickas Date: Sun May 30 13:26:47 2021 +0300 Xi: Implement gesture support for XIQueryDevice commit 0886254f96f40e59193ccbb0e3acbd5ae92dbaa3 Author: Povilas Kanapickas Date: Sun May 30 13:26:46 2021 +0300 xfree86: Bump input minor ABI due to addition touchpad gestures Signed-off-by: Povilas Kanapickas commit 1cdc3b5d146818993c5a9436d17e1d0888054c38 Author: Povilas Kanapickas Date: Sun May 30 13:26:45 2021 +0300 xfree86: Implement gesture support for test input driver commit dccc0275f4f3740cc625fb60ab1d014d6ec10709 Author: Povilas Kanapickas Date: Sun May 30 13:26:44 2021 +0300 Bump XI protocol version to 2.4 commit 75feb1366809bfb6d50734c10ab11258783a2e9d Author: Povilas Kanapickas Date: Sun May 30 13:26:43 2021 +0300 Xi: Include gestures among events that may freeze device commit 5163fc8bc28ce8bc2703cddcd9f2775ebc311766 Author: Povilas Kanapickas Date: Sun May 30 13:26:42 2021 +0300 Implement gesture processing logic commit d3c52df16105de5ac37e196a49b173e426caf417 Author: Povilas Kanapickas Date: Sun May 30 13:26:41 2021 +0300 hw/xfree86: Implement public APIs to submit gesture events commit 100a2ad6da4ba90f8d489c7a2ed3f3f0ac879a6f Author: Povilas Kanapickas Date: Sun May 30 13:26:40 2021 +0300 dix: Implement gesture event submission code path commit 7656a9c8dddbc57adfd4fd05f8e26b1845ac8738 Author: Povilas Kanapickas Date: Sun May 30 13:26:39 2021 +0300 dix: Implement internal gesture state handling commit 0bf4123fd3bc945d150884e6ea38bd2b81c0994b Author: Povilas Kanapickas Date: Sun May 30 13:26:38 2021 +0300 dix: Implement gesture event fixups before delivery commit 227f601de31aabf6aaa897477e42e6b7f8f7c963 Author: Povilas Kanapickas Date: Sun May 30 13:26:37 2021 +0300 xi: Implement conversions from internal to Xi2 gesture event structs commit f3462178caf09a8777b8671eb03949b75c8ee07a Author: Povilas Kanapickas Date: Sun May 30 13:26:36 2021 +0300 test/xi2: Verify that XI_GestureSwipeEnd is ignored when outside mask commit 407a2234b32d9cb3fed2cc7e8069bb41b98e143f Author: Povilas Kanapickas Date: Sun May 30 13:26:35 2021 +0300 test/xi2: Update tests for gesture event types commit f83f7dbb1c1be406b82da9bca12be3c43d6bfeee Author: Povilas Kanapickas Date: Sun May 30 13:26:34 2021 +0300 xi: Bump max supported XI2 event type commit 81909546397eb180ed8983bdb80f5673dbae71ac Author: Povilas Kanapickas Date: Sun May 30 13:26:33 2021 +0300 xi: Implement selection logic for gesture event types commit 080bac39c844bd16b7e1493797c6e7644badf0ab Author: Povilas Kanapickas Date: Sun May 30 13:26:32 2021 +0300 xi: Implement grab support for new gesture event types commit b544a1fdb8fa7e7efc7dde66089e901d957061d9 Author: Povilas Kanapickas Date: Sun May 30 13:26:31 2021 +0300 xi: Implement internal gesture event struct commit 22fa31ed561ed1e78bf3651f28e11882b1eac51f Author: Povilas Kanapickas Date: Sun May 30 13:26:30 2021 +0300 dix: Add new internal event enums for gesture events commit 8e504d8b36eb8f23bf8cfa46143d046cc6b8ea51 Author: Povilas Kanapickas Date: Sun May 30 13:26:29 2021 +0300 meson: Depend on inputproto 2.3.99.1 Signed-off-by: Povilas Kanapickas commit 2acde60147797393e0ee9428cff0f74cdc0a9227 Author: Povilas Kanapickas Date: Sun May 30 13:26:28 2021 +0300 .gitlab-ci: Install xorgproto 2021.4.99.2 from git This is required for the support of upcoming XI 2.4 protocol. Signed-off-by: Povilas Kanapickas commit 236d1775509404b0dcf44873422dd8652b1e9588 Author: Claes Nästén Date: Fri May 14 13:57:10 2021 +0000 os: include unistd.h when HAVE_PSTACK is defined On Solaris when HAVE_PSTACK is defined unistd.h needs to be included to avoid implicit declarations of pipe, read, execle etc. commit 7515c23a416825f0db51f9b445279b12d5918ebf Author: Erik Kurzinger Date: Tue May 11 17:00:21 2021 -0400 xwayland/eglstream: flush stream after eglSwapBuffers When eglSwapBuffers inserts a new frame into a window's stream, there may be a delay before the state of the consumer end of the stream is updated to reflect this. If the subsequent wl_surface_attach, wl_surface_damage, wl_surface_commit calls are received by the compositor before then, it will (typically) re-use the previous frame acquired from the stream instead of the latest one. This can leave the window displaying out-of-date contents, which might never be updated thereafter. To fix this, after calling eglSwapBuffers, xwl_glamor_eglstream_post_damage should call eglStreamFlushNV. This call will block until it can be guaranteed that the state of the consumer end of the stream has been updated to reflect that a new frame is available. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1171 Signed-off-by: Erik Kurzinger commit f3eb1684fa5008ad7c881f798a5efb7441b23035 Author: Simon Ser Date: Mon Apr 19 22:49:56 2021 +0200 xwayland: enable MIT-SHM shared pixmaps Allow X11 clients to create shared pixmaps via the MIT-SHM extension under Xwayland. Tested with a wlroots patch [1]. Also add a few assertions to make sure we have wl_buffers where we need them. [1]: https://github.com/swaywm/wlroots/pull/2875 Signed-off-by: Simon Ser Acked-by: Michel Dänzer commit 3d33d885fcd1215a74c1819278cf6f9557c9860b Author: Erik Kurzinger Date: Fri May 14 08:26:49 2021 -0400 xwayland/eglstream: allow commits to dma-buf backed pixmaps As of commit 098e0f52 xwl_glamor_eglstream_allow_commits will not allow commits if the xwl_pixmap does not have an EGLSurface. This is valid for pixmaps backed by an EGLStream, however pixmaps backed by a dma-buf for OpenGL or Vulkan rendering will never have an EGLSurface. Unlike EGLStream backed pixmaps, though, glamor will render directly to the buffer that Xwayland passes to the compositor. Hence, they don't require the intermediate copy in xwl_glamor_eglstream_post_damage that EGLStream backed pixmaps do, so there is no need for an EGLSurface. Signed-off-by: Erik Kurzinger Acked-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 012350e3db47fef0404346f55968032e62004fcf Author: Olivier Fourdan Date: Fri Apr 30 16:23:10 2021 +0200 xwayland/eglstream: Set ALU to GXCopy for blitting The EGLstream backend's post damage function uses a shader and glDrawArrays() to copy the data from the glamor's pixmap texture prior to do the eglSwapBuffers(). However, glDrawArrays() can be affected by the GL state, and therefore not reliably produce the expected copy, causing the content of the buffer to be corrupted. Make sure to set the ALU to GXCopy prior to call glDrawArrays() to get the expected result. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer commit d85bfa6ab7495281516f3a4b05dc1ff0b2c4bf91 Author: Olivier Fourdan Date: Tue May 4 10:56:38 2021 +0200 xwayland/eglstream: Do not always increment pixmap refcnt on commit Currently, the EGLstream backend would increment the pixmap refcount for each commit, and decrease that refcount on the wl_buffer release callback. But that's relying on the compositor sending us a release callback for each commit, otherwise the pixmap refcount will keep increasing and the pixmap will be leaked. So instead, increment the refcount on the pixmap only when we have not received a release notification for the wl_buffer, to avoid increasing the pixmap refcount more than once without a corresponding release event. This way, if the pixmap is still in use when released on the X11 side, the EGL stream will be kept until the compositor releases it. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit b583395cd38ad101c7541bd8b0e91143ced44703 Author: Olivier Fourdan Date: Fri Apr 30 09:02:29 2021 +0200 xwayland/eglstream: Check eglSwapBuffers() EGLstream's post_damage() would unconditionally return success regardless of the actual status of the eglSwapBuffers(). Yet, if eglSwapBuffers() fails, we should not post the corresponding damage as they wouldn't match the actual content of the buffer. Use the eglSwapBuffers() return value as the return value for post_damage() and do not take a refrence on the pixmap if it fails. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a45799971083c47082d085d3732a5b12692cf75b Author: Olivier Fourdan Date: Mon Apr 19 14:52:38 2021 +0200 xwayland/eglstream: Fix calloc/malloc Use calloc() instead of malloc() like the rest of the code. Also fix the arguments of calloc() calls to match the definition which is calloc(size_t nmemb, size_t size). This is a cleanup patch, no functional change. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 098e0f52c088c6eb52c7e54c5a11cefabd480908 Author: Olivier Fourdan Date: Mon Apr 19 18:11:19 2021 +0200 xwayland/eglstream: Do not commit without surface The EGL surface for the xwl_pixmap is created once the stream is ready and valid. If the pixmap's EGL surface fails, for whatever reason, the xwl_pixmap will be unusable and will end up as an invalid wl_buffer. Make sure we do not allow commits in that case and recreate the xwl_pixmap/stream. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit bee2ebb29f0999862ab39af26c673c00af40b082 Author: Olivier Fourdan Date: Tue Apr 27 14:17:19 2021 +0200 xwayland/eglstream: Drop the list of pending streams Now that the pending stream is associated with the xwl_pixmap for EGLStream and the xwl_pixmap itself is associated to the pixmap, we have a reliable way to get to those data from any pending stream. As a result, the list of pending streams that we keep in the EGLStream global structure becomes useless. So we can drop the pending stream's xwl_pixmap and also the list of pending streams altogether, and save us a walk though that list for each callback. Signed-off-by: Olivier Fourdan Suggested-by: Michel Dänzer Reviewed-by: Michel Dänzer commit e19bf86c17ef9c802fea24410cc6b1f51a19ce7f Author: Olivier Fourdan Date: Wed Apr 14 17:31:08 2021 +0200 xwayland/eglstream: Keep a reference to the pixmap Commit affc47452 - "xwayland: Drop the separate refcount for the xwl_pixmap" removed the separate reference counter for the xwl_pixmap which holds the EGLStream. While that works fine for the common case, if the window's pixmap is changed before the stream is ready, the older pixmap will be destroyed and the xwl_pixmap along with it, even if the compositor is still using the stream. The code that was removed with commit affc47452 was taking care of that by increasing the separate reference counter for the xwl_pixmap, but it no longer the case. As a result, we may end up with the EGL stream in the wrong state when trying to use it, which will cascade down into all sort of issues. To avoid the problem, increase the reference count on the pixmap when it is marked as invalid in EGLStream's SetWindowPixmap(). This way, the xwl_pixmap and the EGLStream are kept until released by the compositor, even when the pixmap changes before stream is ready. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Fixes: affc47452 xwayland: Drop the separate refcount for the xwl_pixmap https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit cb61ecc7291cfbed2f76d4437cd7450b8e4dab00 Author: Olivier Fourdan Date: Fri Apr 16 10:38:23 2021 +0200 xwayland/eglstream: Dissociate pending stream from window Previously, we would have pending streams associated with top level X11 windows, keeping temporary accounting for the pending streams before they get fully initialized for the xwl_pixmap which would be associated with X11 pixmaps. If the window content changes before the stream is ready, the corresponding pending stream would be marked as invalid and the pending stream would be eventually removed once the stream becomes ready. Since commit affc47452 - "xwayland: Drop the separate refcount for the xwl_pixmap", we no longer keep a separate reference counter for the xwl_pixmap, but rather tie it to the X11 pixmap lifespan. Yet, the pending stream would still be associated with the X11 toplevel window. Dissociate the pending streams from the X11 toplevel window, to keep it tied only to the xwl_pixmap so that we can have: - pixmap <-> xwl_pixmap - xwl_pixmap <-> pending stream Of course, the pending streams remain temporary and get removed as soon as the ready callback is triggered, but the pending streams are not linked to the X11 window anymore which can change their content, and therefore their X11 pixmap at any time. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit cc596bcfb273eeab82ac3d59867668af8bad2abf Author: Olivier Fourdan Date: Thu Apr 1 08:46:52 2021 +0200 xwayland/eglstream: Add more error checking eglCreateStreamKHR() can fail and return EGL_NO_STREAM_KHR, in which case there is no point in trying to create a buffer from it. Similarly, eglCreateStreamProducerSurfaceKHR() also fail and return EGL_NO_SURFACE, which in turn will be used in eglMakeCurrent() as draw/read surface, and therefore would mean no draw/read buffer. In those cases, log the error, and bail out early. That won't solve the issue but will help with investigating the root cause of issues with EGLStream backend. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 823f3254fabd16e5e721da57cd260beac9b8f8bd Author: Olivier Fourdan Date: Thu Apr 15 10:59:36 2021 +0200 xwayland/eglstream: Small refactoring Some functions are called "callback" whereas they are not longer callback functions or "unref" while they no longer deal with a reference counter anymore, which is quite confusing. Rename those functions to be more explicit. Also, the pending streams can be destroyed in different places, move the common code to separate function to avoid duplicating code and help with readability of the code. Signed-off-by: Olivier Fourdan Acked-by: Michel Dänzer commit 85244d2a2081d61a2e4a06e847041f638de01e3f Author: Olivier Fourdan Date: Wed Mar 31 09:49:35 2021 +0200 xwayland/eglstream: Check framebuffer status The EGLStream backend would sometime generate GL errors trying to draw to the framebuffer, which gives an invalid buffer, which in turn would generate a Wayland error from the compositor which is fatal to the client. Check the framebuffer status and bail out early if it's not complete, to avoid getting into trouble later. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 252cbad316f43edc08aa5c844789398a58ba270c Author: Olivier Fourdan Date: Wed Mar 31 13:57:45 2021 +0200 xwayland/glamor: Add return status to post_damage If the glamor backend failed to post damage, the caller should do the same to avoid a failure to attach the buffer to the Wayland surface. Change the API of Xwayland's glamor backend post_damage() to return a status so that xwl_window_post_damage() can tell whether the callee failed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 3b265c59a6456f6e4abfb9e1694237bc56f1776a Author: Olivier Fourdan Date: Tue Mar 30 08:48:25 2021 +0200 glamor: Dump backtrace on GL error Currrently, when a GL error is triggered, glamor would log the error which may not be sufficient to trace it back to the cause of the error. Also dump the backtrace which may give more information as to where the error comes from. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 25d2f4948f0abd39e099b8ac69b7cb1dab38a10a Author: Olivier Fourdan Date: Mon Mar 29 15:01:15 2021 +0200 xwayland: Check buffer prior to attaching it If the buffer is NULL, do not even try to attach it, and risk a Wayland protocol error which would be fatal to us. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 4f0889e98306d30a37aba0fadb1fd3790c13205a Author: Olivier Fourdan Date: Mon Mar 29 14:22:56 2021 +0200 xwayland/eglstream: Check buffer creation EGLStream wl_eglstream_display_create_stream() may fail, yet Xwayland would try to attach the buffer which may cause a fatal Wayland protocol error raised by the compositor. Check if the buffer creation worked, and fail gracefully otherwise (like wayland-eglsurface does). Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/-/issues/1156 commit 4f6fbd5009ae533cf0b3bbe382502254f9276a01 Author: Erik Kurzinger Date: Tue Apr 27 07:23:44 2021 -0400 xwayland-eglstream: fix X11 rendering to flipping GL / VK window If a window is being used for direct rendering with OpenGL or Vulkan, and is using the flipping path for presentation, it's pixmap will be set to a dma-buf backed pixmap created by the client-side GL driver. However, this means that xwl_glamor_eglstream_post_damage won't work since it requires that the pixmap has an EGLSurface that it can render to, which dma-buf backed pixmaps do not. In this case, though, xwl_glamor_eglstream_post_damage is not necessary since glamor will have rendered directly to the pixmap, so we can simply pass it directly to the compositor. There's no need for the intermediate copy we normally do in that function. Therefore, this change adds an early-return case to post_damage for dma-buf backed pixmaps, and removes the corresponding asserts from that function and allow_commits. Signed-off-by: Erik Kurzinger Acked-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a50a0e348542bf32fb4239ee05a485772837f2f3 Author: qarmin Date: Tue Apr 28 22:05:02 2020 +0200 glxcmds: Fix possible out of bounds commit 3ea46f9336693d713ab63f422fffce42f9060a2c Author: Mazlan, Hazwan Arif Date: Thu Jul 30 10:12:27 2020 +0800 dri2: Sync i965_pci_ids.h from mesa iris_pci_ids.h Copied TGL PCI ID from MESA iris_pci_ids.h This update brings in a significant number of new platform ID's Sync up until commit f02ae698 Signed-off-by: Mazlan, Hazwan Arif commit d3933a24d1abdcb56f45e6076cb84a1110674a8a Author: Jon Turney Date: Tue Apr 23 17:59:29 2019 +0100 CI: Add an x86 MinGW-w64 cross build Only cross-build for x86 MinGW-w64, as x64 MinGW-w64 will probably require fixing LLP64 issues. I don't know any source for pre-built cross-dependencies of the X server, so build these from git. Don't build with GLX enabled, so I don't have to deal with cross-building mesa and it's dependencies, for the moment. commit 7e142cb2a848acb6af986fa91d254d4c23963b24 Author: luporl Date: Wed Dec 9 11:11:15 2020 -0300 xserver: fix RGB mask handling On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was crashing in some cases. For instance, when twm was started and the background was clicked to open its menu, X crashed with a segmentation fault, trying to dereference a null pointer at CreatePicture(). There were 2 issues with xorg-server handling of RGB masks that caused the pointer above to be null and thus the crash: - wrong use of ffs() to get the RGB offsets from the masks - overflow when shifting a 16-bit integer This change fixes both issues. They happen when the system is BE but has a video adapter using a little-endian (LE) ARGB32 framebuffer. In order to display the correct colors, this setup requires a BE RGBA32 color format to be used by X, by setting the RGB masks appropriately, that didn't work properly because of the issues above. commit 5be3b80b8d084ca5721be8791910d5827d1b6014 Author: Łukasz Spintzyk Date: Fri Sep 18 14:32:01 2020 +0200 modesetting: Remove few common functions from ms namespace A lot of that code is the same as in xf86-amdgpu and xf86-nouveau drivers. By removing that functions from ms namespace we can move that code to common implementation. Signed-off-by: Łukasz Spintzyk commit c282be503e267afdd050df837d4cf61e0e7287b7 Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:53 2020 +0200 modesetting: remove unnecessary ms_covering_xf86_crtc dup of ms_covering_randr_crtc Signed-off-by: Łukasz Spintzyk commit b923364c5ec8251e81b4aa5fd451d9d7bb038009 Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:47 2020 +0200 modesetting: Find crtc on secondary outputs as fallback instead of returning primary crtc Signed-off-by: Łukasz Spintzyk commit d2dce22b6775c772282ac2c0e224ef9685ab34fa Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:34 2020 +0200 present: fix msc offset calculation in screen mode Instead of getting the current msc value from the window crtc, which not exist take the last saved msc value saved in the window_priv struct Signed-off-by: Łukasz Spintzyk commit 908deb0895f9fe345d70be933d251ea10511d30a Author: Łukasz Spintzyk Date: Fri Sep 18 14:31:25 2020 +0200 present: Use crtc's screen present operation for syncing Signed-off-by: Łukasz Spintzyk commit d03c0de77ba36bb5221d00ac84dcdd6aae0df453 Author: Łukasz Spintzyk Date: Fri Sep 18 14:29:25 2020 +0200 modesetting: Initialize present extension despite glamor is disabled Signed-off-by: Łukasz Spintzyk commit 7aaf54a1884f71dc363f0b884e57bcb67407a6cd Author: Matthieu Herrb Date: Sun Mar 21 18:38:57 2021 +0100 Fix XChangeFeedbackControl() request underflow CVE-2021-3472 / ZDI-CAN-1259 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 66ce61983db0a067e48143750c4d5557d5638b1c Author: Peter Hutterer Date: Thu Mar 18 09:59:17 2021 +1000 xkb: silence a compiler warning xkb.c: In function ‘ProcXkbSetMap’: xkb.c:2747:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 2747 | DeviceIntPtr master = GetMaster(dev, MASTER_KEYBOARD); Signed-off-by: Peter Hutterer commit f6b8f8c071a575e54645aeb0bd3cb37377b0e4d3 Author: Peter Hutterer Date: Thu Mar 18 09:44:53 2021 +1000 xkb: don't require a trailing slash for the XKM output dir Rework the function to use a single snprintf call instead of a mix of strcpy/strcats. This now also appends a trailing slash where needed so we don't rely on the build system to set this for us. Also, since /tmp/ is the fallback and we never check if everything succeeded, assert if we can't use /tmp/. This will never be triggered anyway, the only caller to OutputDirectory() uses sizeof(PATH_MAX-sized array). Follow-up from 6c51818a0f55282cbe5a870f58ca82ca45ee472d Signed-off-by: Peter Hutterer commit eceafd4a2d159f5c2b789ad77ee283c2aa848a59 Author: Jan Beich Date: Fri Apr 9 14:44:13 2021 +0000 meson: switch getpeer* checks to autotools style Checking for function "getpeereid" : YES Checking for function "getpeerucred" : NO [...] include/meson.build:182:7: ERROR: Argument to "not" is not a boolean. Fixes: 68c2cfadd6d3 ("meson: Make sure defines are either set to 1 or not defined") commit 9f8421af637942e5d9963828f4ce55f456410603 Author: Jan Beich Date: Fri Apr 9 15:22:22 2021 +0000 meson: check pthread_setname_np like autotools FreeBSD < 12.2 and OpenBSD only have pthread_set_name_np. As libpthread isn't in scope use -Werror to trip the check. Header has symbol "PTHREAD_MUTEX_RECURSIVE" : YES Checking if "pthread_setname_np(tid, name)" compiles: YES os/inputthread.c:326:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "InputThread"); ^ os/inputthread.c:447:5: error: implicit declaration of function 'pthread_setname_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setname_np (pthread_self(), "MainThread"); ^ Fixes: c20e7b5e2222 ("meson: Automatically detect HAVE_PTHREAD_SETNAME_NP") commit 38e875904b039ec1889e7c81eb1d577a4f69b26d Author: Erik Kurzinger Date: Thu Dec 3 14:57:51 2020 -0800 xwayland: implement pixmap_from_buffers for the eglstream backend Provides an implementation for the pixmap_from_buffers DRI3 function for xwayland's eglstream backend. This will be used by the NVIDIA GLX driver to pass buffers from client applications to the server. These can then be presented using the PRESENT extension. To hopefully make this less error-prone, we also introduce a "type" field for this struct to distinguish between xwl_pixmaps for the new DRI3-created pixmaps and those for the existing glamor-created pixmaps. Additionally, the patch enables wnmd present mode with the eglstream backend. This involves creating a wl_buffer for the provided dma-buf before importing it into EGL and passing this to the compositor so it can be scanned out directly if possible. Since both backends now support this present mode, the HAS_PRESENT_FLIP flag is no longer needed, so it can be removed. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit bc99dd2127f12f1aae55971c09a2792eeaa98444 Author: Erik Kurzinger Date: Wed Mar 3 11:56:41 2021 +0100 xwayland: Add check_flip() glamor backend function This is preliminary work for hardware accelerated rendering with the NVIDIA driver. This exposes a new glamor backend function, check_flip, which can be used to control whether flipping is supported for the given pixmap. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit 400d4d0fdd55192f394e1a8273dfb2423c895ec0 Author: Erik Kurzinger Date: Fri Feb 12 12:09:27 2021 -0800 xwayland: move formats and modifiers functions to common glamor code This is preliminary work for hardware accelerated rendering with the NVIDIA driver. This moves the modifiers and formats functions previously only available to the GBM backend to the common glamor code so that it can be used by both the GBM and EGLStream backends. Reviewed-by: Michel Dänzer Acked-by: Olivier Fourdan Signed-off-by: Erik Kurzinger commit ae225417c0a0828ffb24e11eb4b968c34692e25a Author: Olivier Fourdan Date: Wed Mar 3 09:55:12 2021 +0100 xwayland: Move dmabuf interface to common glamor code This is preliminary work for hardware accelerated rendering with the NVIDIA driver. The EGLStream backend can possibly also use the dmabuf interface, so move the relevant code from the GBM specific source to the common bits. Signed-off-by: Olivier Fourdan commit d231ce2d9ce9644e77e8dbe8c5a23eeb11e85b55 Author: Povilas Kanapickas Date: Wed Apr 7 22:16:43 2021 +0300 meson: Disable LTO for tests `-flto=auto` together with `-Wl,-wrap` causes link errors at least in certain compilers (e.g. GCC 10.2.0). Since this is reoccurring issue (internet search shows similar problems with GCC 4.6 a decade ago) let's disable LTO for tests even if it's disabled elsewhere. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1116 Signed-off-by: Povilas Kanapickas commit 68c2cfadd6d31f0787bc35dbafe32d7dfd638e27 Author: Povilas Kanapickas Date: Mon Apr 5 16:24:47 2021 +0300 meson: Make sure defines are either set to 1 or not defined This will make the behavior of meson consistent with autotools. The configuration macros are exposed to public headers so any inconsistency is likely to break code for anyone who's not careful to use #ifdef instead of #if. Signed-off-by: Povilas Kanapickas commit faff5bbdf5dec53101a9d8f624f45262016154c1 Author: Povilas Kanapickas Date: Mon Apr 5 16:24:46 2021 +0300 meson: Sync the name of INPUTTHREAD conf macro with autotools build The rest of dix code uses INPUTTHREAD, so having a different name in meson configuration was an oversight. Fixes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/936 Signed-off-by: Povilas Kanapickas commit b25795462f4754ec2e3c677a41dea33ed1be79da Author: Povilas Kanapickas Date: Mon Apr 5 16:24:48 2021 +0300 meson: Add missing pthread dependency for libxserver_os library Signed-off-by: Povilas Kanapickas commit 9582ef4efc72afa9f84b6469b5f81ce5dd8eb15d Author: Povilas Kanapickas Date: Mon Apr 5 16:24:45 2021 +0300 meson: Fix typo in libxserver_os dependencies for openbsd This has not been tested, but os_deps is not used anywhere in the file, so it's likely this was a typo. Signed-off-by: Povilas Kanapickas commit 689496ed657ef055869f5eda7e09ff35edff30cc Author: Povilas Kanapickas Date: Wed Apr 7 21:55:03 2021 +0300 meson: Switch project version to 20.x.y style commit 2df55813d0f553050ff06065a67e90f678db593a Author: Povilas Kanapickas Date: Wed Apr 7 21:55:02 2021 +0300 meson: Drop version subpatch handling commit 5d3679104aaeabac585894606ad317b433b65238 Author: Adam Jackson Date: Wed Apr 7 21:55:01 2021 +0300 meson.build: Keep the protocol version looking like xserver 1.20.x did This effectively changes the versioning to be as if xserver 21.0 was xserver 1.21.0. This should keep any client-side version checks that know about the Xorg 7.0 -> xserver 1.0 epoch from getting confused. commit 3e4e70db10a4b2d531ccd649c18317ea2a49d256 Author: George Matsumura Date: Wed Apr 7 17:28:46 2021 -0600 meson: Fix DragonFly BSD identifier in meson build files This changes the operating system identifier tested against host_machine.system() in meson build files from "dragonflybsd" to the officially stable "dragonfly". Signed-off-by: George Matsumura commit 199f278a1b7570b1cb6e24b8bedb4d721b3c9938 Author: Edouard Gaulué Date: Tue Mar 16 20:59:17 2021 +0100 French text in Preferences Pane Review commit 65b27d82f2c6c3eecbc7370765ee7c036b245b2f Author: Jeremy Huddleston Sequoia Date: Sun Apr 4 16:10:28 2021 -0700 xquartz: Call PseudoramiXExtensionInit() through InitOutput() just like xwin Fixes: https://github.com/XQuartz/XQuartz/issues/140 Signed-off-by: Jeremy Huddleston Sequoia commit 34e2a64ce00c219d64b8169b774661d5727c45c7 Author: Pascal VITOUX Date: Fri Nov 27 16:54:59 2020 +0000 xfree86: fix gtf support detection for EDID 1.4 According to the "VESA Enhanced EDID Standard", all GTF compliant displays are continuous frequency. The GTF support flags in 'Display Range Limits Descriptor' cannot be used if the display is a non-continuous frequency multi-mode display. Closes #1105 Signed-off-by: Pascal VITOUX Fixes: 6a79a737 ("xfree86: add drm modes on non-GTF panels") Reviewed-by: Aaron Ma aaron.ma@canonical.com commit b75d0cca28aaae5cd21ad76ad2822138fac2882a Author: Aaron Plattner Date: Fri Feb 19 11:47:13 2021 -0800 modesetting: Defer crtc gamma size upgrade to drmmode_setup_colormap Rather than trying to create a gamma ramp array of the appropriate size in drmmode_crtc_init when the GAMMA_LUT property should be used, just flag the crtc as wanting to use the GAMMA_LUT property and then replace the gamma ramp later, right before calling xf86HandleColormaps. This avoids a problem during initial startup where xf86RandR12CreateObjects12 hard-codes a gamma ramp size of 256, causing xf86RandR12CrtcSetGamma to read past the end of the DIX layer's RandR gamma ramp array: PreInit drmmode_pre_init drmmode_crtc_init crtc->gamma_size = 1024 ScreenInit xf86CrtcScreenInit xf86RandR12Init xf86RandR12Init12 xf86RandR12CreateObjects12 RRCrtcCreate randr_crtc->gammaSize = 0 xf86RandR12InitGamma(pScrn, 256) RRCrtcGammaSetSize randr_crtc->gammaSize = 256 xf86RandR12InitGamma xf86RandR12CrtcInitGamma RRCrtcGammaSet xf86RandR12CrtcSetGamma // crtc->gamma_size is 1024 here, while randr_crtc->gammaRed // is a 256-element array. memcpy(crtc->gamma_red, randr_crtc->gammaRed, crtc->gamma_size * sizeof(crtc->gamma_red[0])); drmmode_setup_colormap xf86HandleColormaps xf86RandR12InitGamma RRCrtcGammaSetSize randr_crtc->gammaSize = 1024 Fixes: 245b9db0 - modesetting: Use GAMMA_LUT when available Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1126 Signed-off-by: Aaron Plattner Reviewed-by: Robert Morell commit ab8f8c98418db6954b17d93280b7b526fc1d3f7c Author: Jeremie Courreges-Anglas Date: Thu Jan 21 23:52:15 2021 +0100 xserver/os: safer IPv6 "kame hack" fix, only override sin6_scope_id if zero This helps on KAME-based systems which want to get rid of this hack. The assumption is that if sin6_scope_id is set, then the interface index is no longer embedded in the address. Signed-off-by: Jeremie Courreges-Anglas commit aeed57d722f2eb978c17fd7e859334d34af38d05 Author: Povilas Kanapickas Date: Fri Mar 26 00:09:41 2021 +0200 xkb: Fix parsing of XkbSA_DeviceValuator action type The xkb spec defines that the 7th element of the DeviceValuator key action description is "valuator 2 value". This error most likely was accidentally introduced as a copy-paste error in edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f. Signed-off-by: Povilas Kanapickas commit a3931ec6f43857aeed7feac5d223d7db6728145e Author: Povilas Kanapickas Date: Thu Mar 25 22:46:33 2021 +0200 xfree86: Create a symlink X -> Xorg when installing using meson This brings the behavior closer than what we currently have with autotools-based build system. Meson does not currently have native support for symlinks. See https://github.com/mesonbuild/meson/issues/1602. Signed-off-by: Povilas Kanapickas commit 09cd65233e0f5c04e7e3d063decf357f239a65f6 Author: Povilas Kanapickas Date: Thu Mar 25 22:48:56 2021 +0200 xfree86: Set appropriate install_mode for suid_wrapper commit 88b5e1a219a16dd66be6302dbf88ec93d317f991 Author: Povilas Kanapickas Date: Thu Mar 25 22:48:55 2021 +0200 meson: Bump min meson version to 0.47 to get install_mode support commit 82d2156ba7b4e592a2ceb5da767b690862852caa Author: Povilas Kanapickas Date: Thu Mar 25 22:51:39 2021 +0200 xfree86: Fix meson overwriting suid wrapper with the wrapped executable Meson gets confused when there are two targets of the same name within the same directory, so we use a different intermediate name. This is a problem with the Xorg SUID wrapper which has the same filename as the real Xorg executable and is configured in the same meson.build file. This commit works around this by using a different filename in build stage and renaming only when installing. Signed-off-by: Povilas Kanapickas commit ba51acb1de752924c389cedbca39b5dc63679ee6 Author: Povilas Kanapickas Date: Thu Mar 25 22:57:56 2021 +0200 miext: Remove if check which is always true In both cases we check for width > 0 just above, and the variable is not modified between the checks, so the condition is always true. Signed-off-by: Povilas Kanapickas commit 99e7ccffb38b4c93ff0c73586ec72a7fb78cae53 Author: Povilas Kanapickas Date: Thu Mar 25 23:18:14 2021 +0200 dix: Fix URL to description of focus in/out model The current URL points to an unrelated patch for acpid. Signed-off-by: Povilas Kanapickas commit 1b7dca27eb44eac9cb0a8d1463d968872c76f4d5 Author: Simon Ser Date: Thu Feb 18 12:04:48 2021 +0100 xwayland: remove wl_log_set_handler_client workaround This bumps the minimum Wayland version to 1.5 (released in 2014). Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer Reviewed-by: Olivier Fourdan Reviewed-by: Martin Peres commit 6c51818a0f55282cbe5a870f58ca82ca45ee472d Author: Michel Dänzer Date: Fri Mar 5 15:23:53 2021 +0100 meson: Make sure XKM_OUTPUT_DIR has a trailing slash RunXkbComp passes an invalid file path to xkbcomp if there's no trailing slash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1146 Suggested-by: Dylan Baker commit 376eaadde36f80fcbe6b0391a3385e77b4602854 Author: Jan Beich Date: Fri Mar 5 22:50:51 2021 +0000 meson: hide C API if Xorg is disabled (like autotools) When building only Xwayland using Meson some files are always installed. This causes package conflict if Xwayland is built separately from Xorg. include/xorg/compositeext.h include/xorg/damage.h include/xorg/damagestr.h include/xorg/dbestruct.h include/xorg/dri3.h include/xorg/fb.h include/xorg/fboverlay.h include/xorg/fbpict.h include/xorg/fbrop.h include/xorg/geext.h include/xorg/geint.h include/xorg/glyphstr.h include/xorg/mi.h include/xorg/micmap.h include/xorg/micoord.h include/xorg/migc.h include/xorg/miline.h include/xorg/mioverlay.h include/xorg/mipict.h include/xorg/mipointer.h include/xorg/mipointrst.h include/xorg/mistruct.h include/xorg/misync.h include/xorg/misyncfd.h include/xorg/misyncshm.h include/xorg/misyncstr.h include/xorg/mizerarc.h include/xorg/panoramiX.h include/xorg/panoramiXsrv.h include/xorg/picture.h include/xorg/picturestr.h include/xorg/present.h include/xorg/presentext.h include/xorg/randrstr.h include/xorg/rrtransform.h include/xorg/shadow.h include/xorg/shmint.h include/xorg/syncsdk.h include/xorg/vndserver.h include/xorg/wfbrename.h include/xorg/xace.h include/xorg/xacestr.h include/xorg/xorg-server.h include/xorg/xvdix.h include/xorg/xvmcext.h share/aclocal/xorg-server.m4 Reviewed-by: Michel Dänzer commit 4ae36f418ed683532b0b6991e4a1e7d56740b845 Author: Jeremy Huddleston Sequoia Date: Mon Mar 8 21:02:40 2021 -0800 xquartz: Ensure the mouse pointer is shown when switching to a native macOS alert or window Fixes: https://github.com/XQuartz/XQuartz/issues/100 Signed-off-by: Jeremy Huddleston Sequoia commit b2d96b5cd459963a9587ee9c86afc9266ba3d02b Author: Matthieu Herrb Date: Sat Feb 27 11:30:18 2021 +0100 Avoid sequences of malloc(0) / free() by checking the length. This has an impact on heap fragmentation. Signed-off-by: Matthieu Herrb commit 15a413e11d186a9206a39a9b2fe4b72c065d5918 Author: Jeremy Huddleston Sequoia Date: Mon Feb 22 23:02:42 2021 -0800 xquartz: Update meson build to remove deleted files Signed-off-by: Jeremy Huddleston Sequoia commit e59848548a462f1a0ac751bb8bb6afe56258cf4e Author: Jeremy Huddleston Sequoia Date: Fri Mar 5 22:57:24 2021 -0800 xquartz: Fix appFlags build failure with macOS 10.15+ SDKs Signed-off-by: Jeremy Huddleston Sequoia commit 69e087caa4fdfcc303080c021ba463afcf4290c7 Author: Olivier Fourdan Date: Fri Feb 5 11:36:15 2021 +0100 xwayland: Fix path in pkg-config with autoconf When using autoconf/automake to build Xwayland, the actual path to Xwayland is not fully qualified and refers to the "exec_prefix". As a result, the path provided by the generated pkg-config file is wrong when using autoconf to build the Xserver. Fix the xwayland.pc file to also set the variable "prefix" and "exec_prefix" so that the path to Xwayland is fully resolved. Add those variables to the meson build as well for good measure. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Acked-by: Michel Dänzer commit d7391f383ddca5089586b4d04fede56169a1a85e Author: Olivier Fourdan Date: Thu Mar 4 14:13:41 2021 +0100 xwayland: Fix LeaveNotify for relative pointer Since commit 20c78f38, we use the relative pointer for enter/leave events. However, sprite_check_lost_focus() which verifies whether the pointer has left an Xwayland surface still explicitly check for the absolute pointer. As a result, no LeaveNotify event is emitted anymore now when the pointer crosses from an Xwayland surface to a Wayland native one. Make sure to check the last slave device against get_pointer_event() as well, not just the absolute pointer. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Acked-by: Roman Gilg Tested-by: Roman Gilg Reviewed-by: Peter Hutterer Fixes: 20c78f38 - xwayland: use get_pointer_device() for enter/leave handling too commit a5367face12d8e4162bc49a60b5d13955a7fb293 Author: Jacob Cherry Date: Wed Mar 3 17:50:31 2021 +0000 xfree86: Fix autoconfig secondary GPU devices The code path added by commit 69e4b8e6 (xfree86: attempt to autoconfig gpu slave devices (v3)) assumes that it will only be run if the primary device on the screen is the first device in xf86configptr->conf_device_lst. While this is true most of the time, there are two specific cases where this assumption fails. First, if the first device in conf_device_lst is assigned to a different seat than the running X server, it will be skipped by the previous FIND_SUITABLE macro usage. Second, if the primary device was explicitly assigned to the screen but auto_gpu_device is still set and no secondary devices were explicitly listed, that device may not be the first device in conf_device_lst. When the first device in conf_device_lst is not the primary device assigned to the screen, two problems emerge. First, the first device in conf_device_lst will never be assigned to the screen as a secondary device. Second, the primary device is additionally assigned to the screen as a secondary device. The combination of these problems causes certain otherwise valid configurations to be invalid. For example, if a primary device is assigned to a screen and a secondary device is listed in the config but not explicitly assigned to the screen, then one order of the device sections results in a usable PRIME or Reverse PRIME setup and the other order does not. This commit removes the assumption that the primary device is the first device in conf_device_lst by starting the loop from the start of conf_device_lst and skipping the primary device when it is encountered. Signed-off-by: Jacob Cherry commit 97ed0048e45f4909a0c164b27e768af8c9364068 Author: Olivier Fourdan Date: Fri Dec 18 17:53:33 2020 +0100 xwayland: Delay cursor visibility update Xwayland won't emulate XWarpPointer requests if the cursor is visible, this is to avoid having the cursor jumping on screen and preventing random X11 clients from controlling the pointer in Wayland, while allowing games which use that mechanism with a hidden cursor to work in Xwayland. There are, however, games which tend to do it in the wrong order, i.e. show the cursor before moving the pointer, and because Xwayland will not allow an X11 client to move the pointer while the cursor is visible, the requests will fail. Add a workaround for such X11 clients, when the cursor is being shown, keep it invisible until the cursor is actually moved. This way, X11 clients which show their cursor just before moving it would still have a chance to succeed. v2: Add a timeout to show the cursor for well behaved clients. v3: Some cleanup (Michel) v4: Do not cancel cursor delay when updating the cursor to avoid delaying cursor visibility indefinitely if the client keeps settings different cursors (Michel) Signed-off-by: Olivier Fourdan Tested-by: Jaap Buurman jaapbuurman@gmail.com Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/734 commit 9d329a0fb17c1a7840408d329ee2e2a04d357387 Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 21:49:58 2021 -0800 xquartz: Remove a check for NSAppKitVersionNumber >= NSAppKitVersionNumber10_7 This check is always true on our supported systems. Signed-off-by: Jeremy Huddleston Sequoia commit 839b49ac05c3285434d8487b48d8b52323187e44 Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 21:49:14 2021 -0800 xquartz: Don't include strndup.c any more since we no longer support 10.8 and older Signed-off-by: Jeremy Huddleston Sequoia commit 677eb6827bd68bdf29e3539d1e10e9872896efec Author: Jeremy Huddleston Sequoia Date: Sun Feb 21 20:58:42 2021 -0800 xquartz: Add a launch trampoline to better integrate with modern versions of macOS Fixes: https://github.com/XQuartz/XQuartz/issues/6 Signed-off-by: Jeremy Huddleston Sequoia commit 25035229b73742f9e6a96ac3e535b30b5c6196a8 Author: Jeremy Huddleston Sequoia Date: Fri Feb 19 23:16:56 2021 -0800 xquartz: Don't process AppKit events if we haven't finished initializing Signed-off-by: Jeremy Huddleston Sequoia commit 487286d47260782d331229af10df17711cbca1ea Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 17:24:14 2021 -0800 xquartz: Allocate each fbconfig separately A change during the 1.20 development cycle resulted in fbconfigs being walked and deallocated individually during __glXScreenDestroy. This change now avoids a use-after-free caused by that change. ==50859==ERROR: AddressSanitizer: heap-use-after-free on address 0x00010d3819c8 at pc 0x0001009d4230 bp 0x00016feca7a0 sp 0x00016feca798 READ of size 8 at 0x00010d3819c8 thread T5 #0 0x1009d422c in __glXScreenDestroy glxscreens.c:448 #1 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510 #2 0x1009d2734 in glxCloseScreen glxscreens.c:169 #3 0x100740a24 in dix_main main.c:325 #4 0x10023ed50 in server_thread quartzStartup.c:65 #5 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #6 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) 0x00010d3819c8 is located 200 bytes inside of 12800-byte region [0x00010d381900,0x00010d384b00) freed by thread T5 here: #0 0x101477ba8 in wrap_free+0x98 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fba8) #1 0x1009d4240 in __glXScreenDestroy glxscreens.c:449 #2 0x10091cc98 in __glXAquaScreenDestroy indirect.c:510 #3 0x1009d2734 in glxCloseScreen glxscreens.c:169 #4 0x100740a24 in dix_main main.c:325 #5 0x10023ed50 in server_thread quartzStartup.c:65 #6 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #7 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) previously allocated by thread T5 here: #0 0x101477e38 in wrap_calloc+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3fe38) #1 0x100925a40 in __glXAquaCreateVisualConfigs visualConfigs.c:116 #2 0x10091cb24 in __glXAquaScreenProbe+0x224 (X11.bin:arm64+0x100730b24) #3 0x1009cd840 in xorgGlxServerInit glxext.c:528 #4 0x10074539c in _CallCallbacks dixutils.c:743 #5 0x100932a70 in CallCallbacks callback.h:83 #6 0x100932478 in GlxExtensionInit vndext.c:244 #7 0x10020a364 in InitExtensions miinitext.c:267 #8 0x10073fe7c in dix_main main.c:197 #9 0x10023ed50 in server_thread quartzStartup.c:65 #10 0x199ae7fd0 in _pthread_start+0x13c (libsystem_pthread.dylib:arm64e+0x6fd0) #11 0x199ae2d38 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d38) Regressed-in: 4b0a3cbab131eb453e2b3fc0337121969258a7be CC: Giuseppe Bilotta Signed-off-by: Jeremy Huddleston Sequoia commit 6a83fb51b7a8b2e167e7d6380229b69e5452f91f Author: Jeremy Huddleston Sequoia Date: Sat Feb 20 15:17:18 2021 -0800 xquartz: Fix a compiler warning about const incompatible pointer assignment driWrap.c:541:30: error: assigning to 'GCOps *' (aka 'struct _GCOps *') from 'const GCOps *' (aka 'const struct _GCOps *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] pGCPriv->originalOps = pGC->ops; ^ ~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia commit a3ddcdd56c246e2226c7cdf372c2a1294eb6d888 Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 23:16:15 2021 -0800 xquartz: Fix build with sparkle enabled Signed-off-by: Jeremy Huddleston Sequoia commit 279bcbd9cf9e557a6789d6e4cede8e8799c3788e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 12:43:53 2021 -0800 xquartz: Silence a compiler warning about missing internal methods on NSApplication Signed-off-by: Jeremy Huddleston Sequoia commit fe89c70e472a9da0541b798eea60c5362b49a99d Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 22:19:21 2021 -0800 xquartz: Rewrite Window menu handling to not depend on X11App.windowsMenu.numberOfItems being correct in -awakeFromNib Fixes: https://github.com/XQuartz/XQuartz/issues/56 Signed-off-by: Jeremy Huddleston Sequoia commit 41aed8f69634ec61ea0e40fff1cfdaf868be843e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 15:41:29 2021 -0800 xquartz: Convert X11Controller ivars into @properties Signed-off-by: Jeremy Huddleston Sequoia commit c2750e1fab774c8e6675ecf284124ff55b5be9cf Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 14:39:46 2021 -0800 xquartz: Convert X11Application ivars into @properties Signed-off-by: Jeremy Huddleston Sequoia commit f51b97b0de2e562e341f2d72c5f00a74c71a159f Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 14:47:50 2021 -0800 xquartz: Fold quartzCommon.h into quartz.h Everything declared in it comes from quartz.c, so match reality. Signed-off-by: Jeremy Huddleston Sequoia commit 4b4500c48f06e7ef41cd94f417e49b3f4f1412ae Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 13:00:43 2021 -0800 xquartz: Fold away some unnecessary hops to X11Controller through X11Application Signed-off-by: Jeremy Huddleston Sequoia commit 39c0e1c0ab6a0a89a71f26446973c779ca7fd927 Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 09:41:30 2021 -0800 xquartz: Fold away array_with_strings_and_numbers and simplify with more modern Objective-C Signed-off-by: Jeremy Huddleston Sequoia commit 87f8fe1f74f10faf0ffc84f03539799ad4c2465e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 09:33:56 2021 -0800 xqaurtz: Remove message_kit_thread() and use dispatch instead Signed-off-by: Jeremy Huddleston Sequoia commit 94e4e173486c2a94ddcfd2d0515e1ee6731f6656 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 23:58:53 2021 -0800 xquartz: Use objc_autoreleasePoolPush / objc_autoreleasePoolPop directly in QuartzBlockHandler It violates @autoreleasepool best practices, and this helps collapse quartzCocoa.m into quartz.c Signed-off-by: Jeremy Huddleston Sequoia commit fba421f700498fa382089df47942df36a2d75ce6 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 22:04:55 2021 -0800 xquartz: Minor code modernization -- @autoreleasepool adoption Signed-off-by: Jeremy Huddleston Sequoia commit 318f8a4a8a47a0ce4bbbf4290469e933602c9b30 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 20:55:06 2021 -0800 xquartz: Remove some dead code for compatibility with older nibs Signed-off-by: Jeremy Huddleston Sequoia commit 72a39dccf99191fbfbb4b399c446fd017d55f24e Author: Jeremy Huddleston Sequoia Date: Thu Feb 18 16:05:34 2021 -0800 xquartz: Remove a workaround for AppKit versions older than Lion Signed-off-by: Jeremy Huddleston Sequoia commit 7e2875035800887f3f41f75cba4299088daf939a Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 15:45:45 2021 -0800 xquartz: Fix applications menu table background color for dark mode Fixes: https://github.com/XQuartz/XQuartz/issues/32 Signed-off-by: Jeremy Huddleston Sequoia commit 85beee9885a8e65960fbbde2de9aa28598b4d6ae Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 15:16:26 2021 -0800 xquartz: Apply Xcode 12.4 automatic updates to nibs Signed-off-by: Jeremy Huddleston Sequoia commit 4e892aa6e132447e43d7bae7e3aca4f1fb172f93 Author: Jeremy Huddleston Sequoia Date: Wed Feb 17 13:38:31 2021 -0800 xquartz: Update the about box copyright to 2021 Signed-off-by: Jeremy Huddleston Sequoia commit c9a3b14c1472632afaff340f73a77a2b961f195a Author: Jeremy Huddleston Sequoia Date: Mon Feb 1 16:27:38 2021 -0800 xquartz: Ensure we call into TIS on the main thread There is a place where this code was called on the main thread. We're using a rather nasty anti-pattern to just call a block inline rather than synchonously calling it on the main thread if we're already on the main thread. This code could use a good overhaul, but I don't have time to rip it apart right now. This will address the immediate issue. Fixes: https://github.com/XQuartz/XQuartz/issues/40 Fixes: https://github.com/XQuartz/XQuartz/issues/48 Signed-off-by: Jeremy Huddleston Sequoia commit af17b5c499ded807395c7ef02254d5af8ddc4667 Author: Povilas Kanapickas Date: Mon Feb 15 14:52:32 2021 +0200 dix: Use correct listener to deliver touch end events This fixes an problem left in f682e0563f736ed2c2c612ed575e05b6e3db945e due to an incorrect cherry-pick. We must use old listener->listener to deliver the touch event. Otherwise grab won't let the event through and the abovementioned commit has no effect. Signed-off-by: Povilas Kanapickas commit 20c78f38a0b33b88bc82a2bcd54d2e6c74a4c132 Author: Peter Hutterer Date: Tue Feb 16 14:48:13 2021 +1000 xwayland: use get_pointer_device() for enter/leave handling too In Weston, clicking the window decoration of an Xwayland client gives us a wl_pointer.button event immediately followed by a wl_pointer.leave event. The leave event does not contain any button state information, so the button remains logically down in the DIX. Once the pointer button is released, a wl_pointer.enter event is sent with the current button state (zero). This needs to trigger a ButtonRelease event but for that we need to ensure that the device is the same as the one we send ButtonPress events through. Fixes a regression introduced in a4095162ca923992a8cfae6d0f09ff9f8144762a. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit dee2bb033e78e2f4aae7f5708c3d4fc74a9957de Author: Olivier Fourdan Date: Mon Feb 15 11:33:56 2021 +0100 dix: Guard against non-existing PtrFeedbackPtr Trying to change the pointer control settings on a device without PtrFeedbackPtr would be a bug and a crash in the Xserver. Guard against that case by returning early with a BadImplementation error, that might kill the X11 client but the Xserver would survive. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 commit ab76272a7d2bff997985893c89147412a7360310 Author: Olivier Fourdan Date: Mon Feb 15 11:23:59 2021 +0100 xwayland: Add PtrFeedback to the touch device Trying to change the acceleration/threshold on Xwayland cannot work, and the corresponding handler xwl_pointer_control() is a no-op. Yet, an X11 client trying to change those on the touch device may possibly cause a crash because the touch device in Xwayland doesn't set that. Initialize the touch device's PtrFeedback to make sure that just cannot happen. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1137 commit a4095162ca923992a8cfae6d0f09ff9f8144762a Author: Olivier Fourdan Date: Thu Feb 11 11:42:01 2021 +0100 xwayland: Use relative device for buttons/axis We are using the relative pointer for motion events, but buttons and axis events still go through the absolute pointer device. That means additional DeviceChanged events that could be avoided if the buttons and axis events were coming from the same device as motion events. Route those events to the relative pointer if available so that motion, buttons and axis events come from the same device (most of the time). Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 1abab61dc23d585860bc847bcecb1b0315977c27 Author: Olivier Fourdan Date: Thu Feb 11 15:32:34 2021 +0100 xwayland: Add wheel axis to relative pointer The relative pointer only has 2 axis, if we want to route the mouse wheel events to that device, we need to add the axis definition, similar to what is done for the absolute pointer. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 71817928247971566903d56c0571db61b7933747 Author: Olivier Fourdan Date: Tue Feb 9 13:33:05 2021 +0100 xwayland: Split dispatch_pointer_motion_event This is a cleanup patch, no functional change. Split the function dispatch_pointer_motion_event() into three separate simpler functions, relative motion with a warp emulator, relative motion and absolute motion. This makes the code a lot easier to read for me, rather than having everything in a single function with nested if/else conditions. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit c5c5322ad69b0751f16c785a479b2989b8794235 Author: Olivier Fourdan Date: Tue Feb 9 13:04:59 2021 +0100 xwayland: Use relative values for raw events Xwayland supports relative motion events from the Wayland compositor via the relative-pointer protocol, and converts those to the absolute range in device units for raw events. Some X11 clients however wrongly assume relative values in the axis values even for devices explicitly labeled as absolute. While this is a bug in the client, such applications would work fine in plain Xorg but not with Xwayland. To avoid that issue, use the relative values for raw events without conversion, so that such application continue to work in Xwayland. Thanks Peter for figuring out the root cause. v2: Don't duplicate relative and absolute events (Peter) v3: Use POINTER_RAWONLY (Peter) Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit ebdb2e264676c3b27a708328348efe73e0d3c8c2 Author: Olivier Fourdan Date: Tue Feb 9 13:01:21 2021 +0100 xwayland: Use a resolution of 0 for relative motion That's what evdev/libinput drivers do. Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit b5e1f13681090fc327dc2cabee1dc123273e785b Author: Olivier Fourdan Date: Thu Feb 11 09:48:12 2021 +0100 dix: Add POINTER_RAWONLY flag This add a new flag POINTER_RAWONLY for GetPointerEvents() which does pretty much the opposite of POINTER_NORAW. Basically, this tells GetPointerEvents() that we only want the DeviceChanged events and any raw events for this motion but no actual motion events. This is preliminary work for Xwayland to be able to use relative motion events for raw events. Xwayland would use absolute events for raw events, but some X11 clients (wrongly) assume raw events to be always relative. To allow such clients to work with Xwayland, it needs to switch to relative raw events (if those are available from the Wayland compositor). However, Xwayland cannot use relative motion events for actual pointer location because that would cause a drift over time, the pointer being actually controlled by the Wayland compositor. So Xwayland needs to be able to send only relative raw events, hence this API. Bump the ABI_XINPUT_VERSION minor version to reflect that API addition. v2: Actually avoid sending motion events (Peter) v3: Keep sending raw emulated events with RAWONLY (Peter) Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Related: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1130 commit 213129012bc0fe508a8a4180ffda1ef661894049 Author: Povilas Kanapickas Date: Sun Dec 20 00:48:22 2020 +0200 Xi: Deliver pointer emulated touch events to grabbing client Delivery of emulated events usually happens only to the owning client. If there are grabs, only the grabbing client may receive these events. This logic does not work during the touch event replay in DeactivatePointerGrab(), as the previous grab is no longer in the listener queue of the touch, so the next owner gets whole emulated event sequence. This may trigger implicit grabs. After replay, DeactivatePointerGrab() will update the global grab without regard to this new implicit grab, which leads to issues down the line. This change is effectively the same as 35e5a76cc1 except that the change is limited to only emulated pointer events. Otherwise, in the case of a device grab we end up not sending any touch events to clients that selected XI_TouchOwnership event and should get touch events before they get ownership of touch sequence. Fixes #7 https://bugs.freedesktop.org/show_bug.cgi?id=96536 commit 30e11535afb3c4efc3a5cef640de44c7cd9bb561 Author: Povilas Kanapickas Date: Sun Dec 20 00:48:21 2020 +0200 Revert "Xi: Use current device active grab to deliver touch events if any" This reverts commit 98e3db2ac43d4a3f13475cb160c8ce0155ac7d61. commit f682e0563f736ed2c2c612ed575e05b6e3db945e Author: Povilas Kanapickas Date: Mon Feb 8 05:21:29 2021 +0200 dix: Send touch end to clients that do async grab without touch events If a XI2 client started listening to touches due to a selection and then creates an active async grab that does not include touch events, then it currently won't get the touch end event which will produce inconsistent view of the pending touches. Note that we only need to consider touch listeners and can ignore pointer emulation. Under XI2 if a active grab replaces a passive implicit grab and the active grab does not include the button release event, the client won't get it either. commit c7730cfe5577ebde006d408f502766d8c3a73670 Author: Olivier Fourdan Date: Wed May 13 16:48:55 2020 +0200 xwayland: Translate keyboard grabs on the root window When an X11 client issues an active grab on the keyboard, Xwayland forward this to the Wayland compositor using the Xwayland specific protocol "xwayland-keyboard-grab" if it can find the corresponding Xwayland window. Some X11 clients (typically older games) however try to issue the keyboard grab on the X11 root window, which has obviously no matching Xwayland window. In such a case, the grab is simply ignored and the game will not work as expected. To workaround that issue, if an X11 client issues a keyboard grab on the root window, Xwayland will search for a toplevel window belonging to the same X11 client that it can use as the grab window instead. This way, the grab can be forwarded to the Wayland compositor that can either grant or deny the request based on the window and its internal policies. The heuristic picks the first realized toplevel window belonging to the client so that the Wayland compositor will send it the keyboard events, and the Xserver grab mechanism will then take care of routing the events to the expected X11 window by itself. v2: Make the test more clear (Dor Askayo ) Signed-off-by: Olivier Fourdan Acked-by: Jonas Ådahl See-also: https://gitlab.gnome.org/GNOME/mutter/-/issues/1249 commit 520e7a1310ddc25b30bcaa0ea3eeaa6c4d137c8c Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 15:03:46 2021 -0800 xquartz: Ensure that NSRunAlertPanel() is run on the main thread Fixes: https://github.com/XQuartz/XQuartz/issues/30 Signed-off-by: Jeremy Huddleston Sequoia commit 7d0bb7ed061458698ff27856976939b261e73b23 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:46:02 2021 -0800 xquartz: Remove support for older versions of libXplugin Signed-off-by: Jeremy Huddleston Sequoia commit 5e7c0762e6fdaefc9b8257c0f875432b1877c49e Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:43:01 2021 -0800 xquartz: Remove unused include of AvailabilityMacros.h from various sources Signed-off-by: Jeremy Huddleston Sequoia commit 59f22341a8b4cd468d6f37fb17dd7fde347e430b Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:40:48 2021 -0800 xquartz: Remove support for building for i386 Signed-off-by: Jeremy Huddleston Sequoia commit aea15a76593f98205e44f20632178dc384c02d57 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:35:17 2021 -0800 xquartz: Remove support for Mountain Lion and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit c0b2d3e099a60f55b18ca9c30373000f12d40fe2 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:33:22 2021 -0800 xquartz: Remove support for Lion and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit cc9cf6f085be6e8264f925a11d67a12ad47a042b Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:29:52 2021 -0800 xquartz: Remove support for SnowLeopard and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit f699aac2ea2cf6a3e2d3bdcb2d8179e103de1d4e Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:09:50 2021 -0800 xquartz: Remove check for libdispatch now that we don't support pre-SnowLeopard Signed-off-by: Jeremy Huddleston Sequoia commit 5ad49102722274f53b9b011082d9e0f202fcd9a4 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:23:18 2021 -0800 xquartz: Remove support for Leopard and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 6e6db055f8b517ae9d63351d4c00fd480cb6b54a Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:18:35 2021 -0800 xquartz: Remove support for Tiger and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 20b86c4060c1d4fbc099675d5100fe17e4ac0147 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:12:34 2021 -0800 os: Remove support for Tiger and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 74aef85bd88a1fdb22d445ad14975232a7bebdd7 Author: Jeremy Huddleston Sequoia Date: Wed Jan 27 13:25:54 2021 -0800 xquartz: Remove support for Panther and earlier versions of macOS Signed-off-by: Jeremy Huddleston Sequoia commit 0e272ac458fbd530787273073473e566b0ac306e Author: Jim DeLaHunt Date: Mon Dec 11 00:08:52 2017 -0800 Fix typo "XQaurtz" in Xquartz.man commit 5429791b1cf7f6cabf6c64aad0a4b1b5418253c9 Author: Olivier Fourdan Date: Thu Jan 28 17:11:44 2021 +0100 Revert "mi: Shortcut miDoCopy/miCopyArea based on clipList" This reverts commit f665a9c9e6c8643f3050378249db3088ae3057be. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1108 Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1128 commit 3cdac5ba07a79761652d960e0e907601f82718bc Author: Olivier Fourdan Date: Wed Sep 9 10:51:24 2020 +0200 mi: List extensions in usage message Not all extensions can be enabled or disabled at runtime, list the extensions which can from the help message rather than on error only. v2: * Print the header message in the ListStaticExtensions() (Peter Hutterer) * Do not export ListStaticExtensions() as Xserver API Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit a81c98e42a954580ca0d43c89169dc2069c87b96 Author: Olivier Fourdan Date: Tue Sep 8 18:34:48 2020 +0200 mi: Don't log the full extension list on disable When enabling or disabling an extension which is not known to the Xserver, it will log an error message and list the extensions it knows about. That clutters the logs when the Xserver is Xwayland spawned by the Wayland compositor who doesn't actually know the list of extensions enabled at build time in the Xserver. Considering that disabling a non-existing extension is a no-op anyway, list all the extensions available only when attempting to enable an extension which the Xserver doesn't know about. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4341f1da728e4c67187b48865faf06c1312bcdff Author: Misha Gusarov Date: Wed Jan 27 12:37:51 2021 +0000 xwayland: Add -verbose option as in xfree86 Makes it easier to debug Xwayland problems. Signed-off-by: Misha Gusarov commit 0148a15da1616a868d71abe1b56e3f28cc79533c Author: Julien Cristau Date: Wed Jan 6 10:20:53 2021 +0100 compiler.h: don't define inb/outb and friends on mips The definition relies on IOPortBase, which is only ever set in hw/xfree86/os-support/bsd/arm_video.c This caused build failures on linux/mips with GCC 10, due to this change (from https://gcc.gnu.org/gcc-10/changes.html#c): "GCC now defaults to -fno-common. As a result, global variable accesses are more efficient on various targets. In C, global variables with multiple tentative definitions now result in linker errors. With -fcommon such definitions are silently merged during linking." As a result anything including compiler.h would get its own definition of IOPortBase and the linker would error out. commit f08ab719df921e1269691553daf56853380fb241 Author: Michel Dänzer Date: Thu Dec 17 18:58:28 2020 +0100 ci: Test ninja dist in meson jobs While this isn't critical yet, it might become so at some point, so let's make sure it keeps working. Don't set the PIGLIT/XTEST_DIR variables for ninja dist, testing XTS once against each DDX is enough (as part of ninja test). Requires git in the docker image. v2: * Drop /usr/local/bin/xkbcomp symlink, no longer needed with xkbcomp 1.4.1 (Peter Hutterer) commit 099eb6261cfb4a7a674ead467a8a9dfb2ee173d8 Author: Michel Dänzer Date: Fri Jan 15 18:32:30 2021 +0100 ci: Build xkbcomp 1.4.1 for the docker image This is a requirement for testing meson dist in CI. commit 9716c4193fd4db7cdf3c6d7fb32d4ad2919cbe46 Author: Olivier Fourdan Date: Fri Jan 22 10:29:29 2021 +0100 xwayland: Add new pkg-config variable for listenfd Since commit b3f3d65e, xwayland now supports the command line option "-listenfd" for passing file descriptors and marked "-listen" as deprecated for this specific purpose. Add a new pkg-config variable "have_listenfd" to the xwayland.pc so that compositors can know this is available and use listenfd in place of the deprecated option. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Jonas Ådahl commit a9269808f394955f213e34303c2c14fd61c35ab5 Author: Erik Kurzinger Date: Thu Jan 7 07:00:33 2021 -0800 xwayland: remove unused parameter of xwl_glamor_pixmap_get_wl_buffer There are currently no callers that make use of the "created" output parameter of xwl_glamor_pixmap_get_wl_buffer. Remove it, along with the corresponding argument of the associated EGL backend entrypoint. commit 532245798085a67b5ff906778f88373d5bcd2e4c Author: Povilas Kanapickas Date: Tue Dec 22 07:30:46 2020 +0200 xfree86/inputtest: Drop extraneous linux-specific include Signed-off-by: Povilas Kanapickas commit 3ab3083cc20534c83a5a35f0af1f2779f8df0b7b Author: Povilas Kanapickas Date: Sun Dec 20 01:11:43 2020 +0200 xi: Don't deliver emulated motion when there's no owner for touch end Pointer-emulated touch events should only be delivered to the client that owns the sequence even if it's a core client that became the effective owner of the sequency by selecting for pointer press and movement. Currently the emulated events are delivered like this already (see TouchResourceIsOwner() check in DeliverEmulatedMotionEvent()), except in the case of TouchEnd, in which case the generated motion event is still delivered to some client that's not necessarily the owner of the touch sequence. We already know whether a touch sequence that is about to emulate a pointer event has an owner, we just need to check that. This further allows to simplify DeliverEmulatedMotionEvent() as it won't ever be called for non-owned touch events. https://bugs.freedesktop.org/show_bug.cgi?id=60394 Signed-off-by: Povilas Kanapickas commit 365cbbfc4b99f7d9937d1b8b61f1483556a5b57a Author: Adam Jackson Date: Fri Dec 18 09:36:30 2020 -0500 os, shm: fcntl()'s third argument is integer, not pointer All of these uses were attempting to set FD_CLOEXEC, which happens to be (1<<0). Since flags is going to be aligned in memory, its address is never going to have the low bit set, so we were never actually setting what we meant to. Fixes: xorg/xserver#1114 commit 5e3900904ddc27f3d5580ce3a07929469d82fb5e Author: Povilas Kanapickas Date: Fri Dec 18 04:39:07 2020 +0200 xfree86: Use different scroll increment than libinput in inputtest drv Signed-off-by: Povilas Kanapickas commit 58465a3dd90c3bc698ba9ebb2c4a516df6ff7dfd Author: Povilas Kanapickas Date: Thu Dec 17 03:08:06 2020 +0200 xfree86: Add scroll axes to touch devices in inputtest driver Signed-off-by: Povilas Kanapickas commit 91a8013990a967bfd8c4145c4a79b86cc495a205 Author: Povilas Kanapickas Date: Thu Dec 17 03:08:05 2020 +0200 xfree86: Add support for pressure valuator axis in inputtest driver Signed-off-by: Povilas Kanapickas commit 742b87f7ee5abd1406a77ac1baacbc43759bd275 Author: Povilas Kanapickas Date: Thu Dec 17 03:08:04 2020 +0200 xfree86: Fix axis labels for PointerAbsolute input of inputtest driver Signed-off-by: Povilas Kanapickas commit e4a9f0bb4e36cffe4f7021bfa27753a9f42df2ff Author: Olivier Fourdan Date: Mon Dec 14 15:38:42 2020 +0100 xwayland: Remove unneeded variable Just a small code cleanup, there is no need to allocate a variable only to check the return value of eglInitialize(). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Tony Lindgren commit 95be87db986470c8fce5ea91af0bbf3177f1de36 Author: Olivier Fourdan Date: Mon Dec 14 10:06:12 2020 +0100 xwayland: Refactor glamor EGL init Glamor requires at least big GL 2.1 or GLES2, therefore Xwayland tries to initialize first GL and then GLES2 if that fails. It does that all in one single function which makes the code slightly complicated, move the initialization of big-GL and GLES2 to separate functions to help with readability of the code. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Tony Lindgren commit 65673b02ef28884da3267fe1be579c20e2cddfa6 Author: Tony Lindgren Date: Tue Dec 1 12:54:36 2020 +0200 xwayland: fix GL version check for GLES only devices We currently bail out early for GLES only devices, and call epoxy_gl_version() too early for GLES only that will make GLES only devices return NULL for glGetString(GL_RENDERER). Let's also add a check to see if we need to recreate the context to avoid pointless warnings for GLES only devices as suggested by Olivier Fourdan . Fixes: a506b4ec - xwayland: make context current to check GL version Signed-off-by: Tony Lindgren commit 5d73a8b59e0d01d1ee4cb484e4b43563cec2eee9 Author: Fabrice Fontaine Date: Thu Dec 10 22:32:59 2020 +0100 meson.build: KMS support also depends on dri2 Kernel modesettings support also depends on dri2, see ./hw/xfree86/drivers/modesetting/meson.build So update meson.build to reflect the changes made in configure.ac by commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee Signed-off-by: Fabrice Fontaine commit 8c0afc9eb26a0866301072dec30717885fd14305 Author: Povilas Kanapickas Date: Sat Oct 10 02:09:05 2020 +0300 xfree86: Implement a test input driver Signed-off-by: Povilas Kanapickas commit f95d81e88be07f43c91660e675d077ccd9ee47a9 Author: Olivier Fourdan Date: Mon Dec 7 14:21:56 2020 +0100 xwayland: Hold window buffer until released The window buffer mechanism would free the pixmap and its corresponding Wayland buffer as soon as window buffers are disposed. Typically when the X11 window is unrealized, the current window buffer is still used by the Wayland compositor and yet Xwayland will destroy the buffer. As a matter of fact, Xwayland should not destroy the Wayland buffer before the wl_buffer.release event is received. Add a reference counter to the window buffer similar to the to pixmap reference counter to keep the buffer around until the release callback is received. Increase that reference counter on the buffer which will be attached to the surface, and drop that reference when receiving the release callback notification. v2: Use a specific reference counter on the buffer rather than relying on the pixmap refcnt (Michel Dänzer ) Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Acked-by: Martin Peres commit 85d8eac4bcf44c077bb82aaae10ae45feb9c4e72 Author: Olivier Fourdan Date: Mon Dec 7 14:09:58 2020 +0100 xwayland: Hold cursor buffer until released The cursor code would destroy the buffer as soon as the cursor is unrealized on X11 side. Yet, the Wayland compositor may still be using the buffer as long as a released callback has not been received. Increase the reference counter on the pixmap to hold a reference on the pixmap when attaching it to the surface and use the new pixmap release callback mechanism to release that reference when the buffer is released. Signed-off-by: Olivier Fourdan Acked-by: Martin Peres Reviewed-by: Michel Dänzer commit 79afbd608b7e6abc5d6d0f7e1fb6e460500c7934 Author: Olivier Fourdan Date: Thu Dec 10 10:10:05 2020 +0100 xwayland: Factorize common cursor code The seat and tablet cursor functions are very similar, factorize the commonalities to simplify the code and reduce the copy/paste. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 36e353bcf428c4e6a31292ffa749ea6395cba4a3 Author: Prabhu Sundararaj Date: Wed Nov 25 08:02:41 2020 +0100 Remove check for useSIGIO option Commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 removed the option to configure useSIGIO option. Indeed, the xfree86 SIGIO support was reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. As a result, useSIGIO is no longer needed and can dropped Fixes: 6a5a4e60 - Remove SIGIO support for input [v5] Closes: xorg/xserver#1107 Reviewed-by: Adam Jackson Signed-off-by: Prabhu Sundararaj Signed-off-by: Mylène Josserand Signed-off-by: Fabrice Fontaine commit 95539ab37baa1292d1f2daaa552f9741b0364cad Author: Mariusz Ceier Date: Wed Dec 2 12:29:15 2020 +0100 xwayland: Replace LogMessage with LogMessageVerb LogMessage logs only when the XLOG_VERBOSITY is >= 1, but by default XLOG_VERBOSITY is 0, so for example warning about deprected -listen parameter is never shown when running "Xwayland -listen 32 -help". Signed-off-by: Mariusz Ceier commit 74627d13c75cab7aa73c0e713feae0934e780ba0 Author: Michal Srb Date: Thu Jun 21 13:44:04 2018 +0200 xkb: Fix heap overflow caused by optimized away min. Calling strlen on char[4] that does not need to contain '\0' is wrong and X server may end up running into uninitialized memory. In addition GCC 8 is clever enough that it knows that strlen on char[4] can return 0, 1, 2, 3 or cause undefined behavior. With this knowledge it can optimize away the min(..., 4). In reality it can cause the memcpy to be called with bigger size than 4 and overflow the destination buffer. Fixes: 83913de25d35 (xkb: Silence some compiler warnings) Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/288 Signed-off-by: Matt Turner commit 446ff2d3177087b8173fa779fa5b77a2a128988b Author: Matthieu Herrb Date: Thu Nov 12 19:15:07 2020 +0100 Check SetMap request length carefully. Avoid out of bounds memory accesses on too short request. ZDI-CAN 11572 / CVE-2020-14360 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 87c64fc5b0db9f62f4e361444f4b60501ebf67b9 Author: Matthieu Herrb Date: Sun Oct 11 17:05:09 2020 +0200 Fix XkbSetDeviceInfo() and SetDeviceIndicators() heap overflows ZDI-CAN 11389 / CVE-2020-25712 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 11652706b0aa7d2609b710db0bd1262c5f6ed596 Author: Michel Dänzer Date: Fri Nov 20 16:54:02 2020 +0100 present/wnmd: Translate update region to screen space The region as passed in is in the source pixmap's coordinate space, so intersecting it with the clipList (which is in screen space) resulted in disappointment. Fixes Firefox popups such as the hamburger menu when using the EGL backend. v2: * Drop vblank->x/y_off from RegionTranslate call, since they're always 0 here (present_wnmd_check_flip rejects flips for x/y_off != 0). Reported-by: Robert Mader Tested-by: Robert Mader Reviewed-by: Olivier Fourdan Tested-by: Joakim Tjernlund # v1 commit b0530fe42286f340032566ce0bf22a5e9ddfe67f Author: Michel Dänzer Date: Tue Jan 28 18:51:53 2020 +0100 glx: Remove unused bswap_CARD64 GCC warned about it: ../../../glx/indirect_dispatch_swap.c:85:1: warning: ‘bswap_CARD64’ defined but not used [-Wunused-function] 85 | bswap_CARD64(const void *src) | ^~~~~~~~~~~~ commit 3ce05a44f3d9b114af936f39e3f44552c5bf2c43 Author: Olivier Fourdan Date: Thu Nov 26 14:39:32 2020 +0100 modesetting: Fix build with DebugPresent() enabled By default, the macro DebugPresent() is a no-op but it can be enabled at build time for debugging purpose. However, doing so prevents the code to build because one debug statement tries to make use of a non-existent variable: present.c: In function ‘ms_present_queue_vblank’: present.c:147:18: error: ‘vbl’ undeclared (first use in this function) 147 | vbl.request.sequence)); | ^~~ present.c:49:32: note: in definition of macro ‘DebugPresent’ 49 | #define DebugPresent(x) ErrorF x | ^ Fix the build with DebugPresent() by removing the vbl variable from the debug message. Signed-off-by: Olivier Fourdan commit 95b79aa907789a16f736097abe959e906f86f63a Author: Erik Kurzinger Date: Fri Nov 13 14:36:14 2020 -0800 GLX: fix context render type queries Querying the GLX_RENDER_TYPE of a GLX context via glXQueryContext will currently return the render type of the context's FB config, which is a bitmask of GLX_RGBA_BIT / GLX_COLOR_INDEX_BIT / ... values. However, this query should really return the render type that was specified when creating the context, which is one of GLX_RGBA_TYPE / GLX_COLOR_INDEX_TYPE / .... To enable this, save the render type when creating a new context (defaulting to GLX_RGBA_TYPE if unspecified), and then include this value in the context attributes sent to clients. commit 9c81b8f5b5d7bc987f73e8ef01a81e61205e58ee Author: Fabrice Fontaine Date: Wed Jan 8 22:51:42 2020 +0100 configure.ac: KMS support also depends on dri2 Kernel modesettings support also depends on dri2, see http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 Fix #479 Signed-off-by: Bernd Kuhls [Patch retrieved (with a small update of commit message) from: https://git.buildroot.net/buildroot/tree/package/x11r7/xserver_xorg-server/1.20.6/0001-modesettings-needs-dri2.patch] Signed-off-by: Fabrice Fontaine commit 682167475c1930f80a68de58e522ac08dbb35fa8 Author: Böszörményi Zoltán Date: Thu Nov 14 09:29:20 2019 +0100 Introduce and use BUS_USB With !155, the device bus ID received via udev is constructed properly with the "usb:" prefix. But, it is not enough to make the following line to work in Section "Device": BusID "usb:0:1.2:1.0" Introduce BUS_USB, so the prefix can be distinguished from BUS_PCI and check the supplied BusID value against device->attribs->busid in xf86PlatformDeviceCheckBusID(). Signed-off-by: Böszörményi Zoltán commit c0dcadad6c18b06ddc6e349d7c58bfccb715ff55 Author: Reza Arbab Date: Wed Mar 27 11:45:02 2019 -0500 linux: Fix udev ID_PATH parsing for udl devices The ID_PATH for a udl device looks like this: $ udevadm info /dev/dri/card2 | grep -w ID_PATH E: ID_PATH=pci-0000:00:14.0-usb-0:9.1:1.0 The parsing added in 0816e8fca6194 ("linux: Make platform device probe less fragile"), sets OdevAttributes::busid to "pci:0000:00:14.0", where drmGetBusid() would have returned "3-9.1:1.0". Identifying this as a "pci:*" device eventually causes the vendor/device id check in probeSingleDevice() to fail, because a USB controller isn't a supported device: $ udevadm info --path=/devices/pci0000:00/0000:00:14.0 | grep -e VENDOR -e ID_PCI_CLASS E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller E: ID_VENDOR_FROM_DATABASE=Intel Corporation Instead of parsing out "pci:0000:00:14.0" in this case, use "usb:0:9.1:1.0" so the device probe will succeed. Fixes: 0816e8fca6194 ("linux: Make platform device probe less fragile") Signed-off-by: Reza Arbab commit af4622d3f90382225afb83e3896cb6f236f30c0a Author: Aaron Plattner Date: Fri Nov 20 19:43:25 2020 -0800 modesetting: Add missing copyright notices I forgot to add these in commits 4fefe73fe, b6985d6b3, 245b9db03, and 4e670f128. Signed-off-by: Aaron Plattner commit 07e6935030c8f0a757bce0a90c54b59d8bf47df6 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:40 2020 +0300 test/xi2: Fix mask size in XISelectEvents test XI2LASTEVENT identifies the bit number, not the mask size in bits. The mask size in bits is XI2LASTEVENT + 1 and the mask size in bytes is (XI2LASTEVENT + 8) / 8 or XI2MASKSIZE. commit f5220117e970a40c09babe199709bb2db69c4311 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:39 2020 +0300 dix: Extract FreezeThisEventIfNeededForSyncGrab() commit 36f8dacc0652ddc5657e70942269f1f9e22710c6 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:37 2020 +0300 dix: Extract ActivateGrabNoDeliver() commit 23a8b62d34344575f9df9d057fb74bfefa94a77b Author: Povilas Kanapickas Date: Sat Oct 10 02:51:36 2020 +0300 dix: Store replayed event into GrabInfoRec struct as InternalEvent* commit 8bd8b3af1931629db548d39bb390edbef4315b0b Author: Povilas Kanapickas Date: Sat Oct 10 02:51:35 2020 +0300 dix: Rename LISTENER_* to TOUCH_LISTENER_* commit f6e0bf68333f7edb02e3b937bc164f6591da2320 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:34 2020 +0300 Xi: Make check_for_touch_selection_conflicts() more generic commit 56d720592155c55617728e8ddf1ba8192fe5d46c Author: Povilas Kanapickas Date: Sat Oct 10 02:51:33 2020 +0300 dix: Extract DeliverDeviceClassesChangedEvent() utility function commit 5b0c5344b7131f0812bcbf070194adaa2175d150 Author: Povilas Kanapickas Date: Sat Oct 10 02:51:32 2020 +0300 dix: Extract CopySprite() utility commit acd819ac07bf66165f5d44af4a224f68c31bc30d Author: Povilas Kanapickas Date: Sat Oct 10 02:51:31 2020 +0300 dix: Extract FixUpXI2DeviceEventFromWindow() commit bb7aab6afe8655fc40ecff49791889b6512bb6a0 Author: Jon Turney Date: Sat Nov 21 15:45:49 2020 +0000 hw/xwin: Fix building with -fno-common Provide an actual definition of noDriExtension where used, rather than a tentative definition in a header, to fix compilation with -fno-common (the default with gcc 10). commit d18dcecbe08a9ff22e43f12b6b7679a6ef1a6eb0 Author: Olivier Fourdan Date: Mon Nov 2 10:24:45 2020 +0100 xwayland: Clean up pending eglstream on pixmap destroy EGLStream implementation in Xwayland keeps a list of pending streams for a window. If the windows's pixmap is destroyed while there is a pending stream, the pending stream will point to freed memory once the callback is triggered. Make sure to cancel the pending stream if there's one when the pixmap is destroyed. v2: * Use xorg_list_for_each_entry() instead of the safe variant (Michel Dänzer ) Signed-off-by: Olivier Fourdan Tested-by: Karol Szuster Acked-by: Michel Dänzer Closes https://gitlab.freedesktop.org/xorg/xserver/-/issues/1096 commit 662b2bcb84d5782aff1b93732eb010b0b43e5706 Author: Olivier Fourdan Date: Tue Sep 22 09:54:15 2020 +0200 xwayland: Use the pixmap release callback with EGLStream Commit 77658741 - "xwayland: Add buffer release callback" added an API to deal with Wayland buffer release callbacks. The EGLstream implementation has its own wl_buffer callback, move that to the buffer release API instead so we don't have to deal with Wayland buffers directly and match the other Xwayland pixmap backend implementations. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Tested-by: Erik Kurzinger commit e538601128c1a8bb4247a817da2bbb3f671811b3 Author: Alan Coopersmith Date: Sun Nov 1 15:52:48 2020 -0800 int10: wrap entire V_ADDR_R* macros in parens for safer expansion Resolves warnings from Oracle Parfait static analyser: Error: Misleading macro Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '|' operator has higher precedence than ternary '?:' operator inside macro body at line 431 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 431 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 431 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 442 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 442 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '|' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 441 Misleading macro [misleading-macro]: misleading evaluation of ternary '?:' operator in expansion of macro V_ADDR_RB due to missing parentheses at line 392 of hw/xfree86/int10/generic.c. '<<' operator has higher precedence than ternary '?:' operator inside macro body at line 443 low precedence ternary '?:' operator is hidden by expansion of macro V_ADDR_RB at line 443 Signed-off-by: Alan Coopersmith commit a6574033f464c7cde02bce8f1b130ff6b2b2d9eb Author: Alan Coopersmith Date: Sun Nov 1 15:45:08 2020 -0800 xkb: always set *mask_rtrn in XkbVirtualModsToReal Resolves warning from Oracle Parfait static analyser: Error: Uninitialised memory Uninitialised memory variable [uninitialised-mem-var] (CWE 457): Possible access to uninitialised memory referenced by variable 'mask' at line 721 of xkb/XKBMisc.c in function 'XkbUpdateKeyTypeVirtualMods'. Path in callee avoiding write at line 720 mask allocated at line 718 Signed-off-by: Alan Coopersmith commit 034e792662a1c0c6ab52190e457b1f017bec01c6 Author: Alan Coopersmith Date: Sun Nov 1 13:55:59 2020 -0800 dmx: example code should set a good example Resolves warning from Oracle Parfait static analyser: Error: Unchecked result Unchecked result [unchecked-result-call-X]: Unchecked return value from call to XOpenDisplay. Value display must be ch ecked to ensure this function was successful. at line 73 of hw/dmx/examples/xbell.c in function 'main'. Signed-off-by: Alan Coopersmith commit d00594ebc7941a5491ad5583d6890ab7dc2ffc43 Author: Alan Coopersmith Date: Sun Nov 1 13:38:21 2020 -0800 AddInputDevice: only need to check once if we failed to calloc dev Resolves warning from Oracle Parfait static analyser: Warning: Impossible or redundant condition Impossible or redundant condition [impossible-redundant-condition]: Condition 'dev != NULL' of branch is determined by previous branch at line 270 of dix/devices.c in function 'AddInputDevice'. Condition 'dev != NULL' from this branch implies following branch is always true at line 262 Fixes: commit 493ad83323 Signed-off-by: Alan Coopersmith commit 250db8708ac7ab11356b42faa493b6f1ba753013 Author: Michel Dänzer Date: Tue Sep 15 11:49:20 2020 +0200 xwayland: Add and hook up test script It runs XTS via piglit on (non-rootless) Xwayland on weston using the headless backend. Xwayland might use glamor if enabled in the build, but we're making sure it uses software rendering. v2: * Use weston-info to wait for weston to be ready, instead of just a fixed sleep. (Martin Peres) v3: * Build wayland 1.18 & weston 9.0 locally, since the packages in Debian buster are too old for current Xwayland. Acked-by: Olivier Fourdan commit 821399a9c920323e4934a2fd6375b86a151fa83c Author: Michel Dänzer Date: Wed Nov 11 12:45:36 2020 +0100 ci: Base docker image on Debian buster instead of testing By its nature, testing incurs a risk of breaking something every time we bump the image. This requires building wayland-protocols locally, since the package in buster is too old for current Xwayland. Acked-by: Olivier Fourdan commit ab73c16930d67e5c80a23727804850406309b787 Author: Michel Dänzer Date: Wed Sep 16 16:32:02 2020 +0200 ci: Update to the latest templates They now ensure the image is up to date in forked projects, and we no longer need to reconstruct the image name. Acked-by: Olivier Fourdan commit 852d6d49109a3f0a9a73c86f5d5165d2c8dc5cbe Author: Michel Dänzer Date: Thu Nov 12 12:19:09 2020 +0100 ci: Explicitly list packages needed to build xserver Instead of relying on apt-get build-dep. Acked-by: Olivier Fourdan commit 8469935fe26659219560f425c7b35d564ad77324 Author: Michel Dänzer Date: Thu Nov 12 12:01:45 2020 +0100 ci: Use a variable for ephemeral packages So that they only need to be listed once. Acked-by: Olivier Fourdan commit 996ba1b99a7212471d3c24359056c412de70c28d Author: Michel Dänzer Date: Wed Nov 11 18:22:28 2020 +0100 ci: Remove rendercheck Git tree Noticed this was missing while making changes in this area. Acked-by: Olivier Fourdan commit 8fc84a00254f642947397276e14d7740f502895d Author: Michel Dänzer Date: Wed Nov 11 19:02:50 2020 +0100 ci: Set GIT_STRATEGY=none for the container build job It doesn't need a full checkout of the xserver Git tree, so this can save some time and resources. Acked-by: Olivier Fourdan commit 9a7515943f5a9b70567512cdc48cb2f688b3284b Author: Michel Dänzer Date: Wed Sep 16 12:55:35 2020 +0200 ci: Use $FDO_CI_CONCURRENT if set To take advantage of more than 4 CPU cores available to the container. Acked-by: Olivier Fourdan commit 28ed4b95e90fb225fc32cfdce16df603ab600fcd Author: Olivier Fourdan Date: Tue Nov 10 10:40:05 2020 +0100 xwayland: Add a man page Xwayland was missing a man page, add one. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit d14cef853af52408e7ddba31b72cf5ac14389754 Author: Olivier Fourdan Date: Tue Nov 10 10:02:39 2020 +0100 xwayland: Do not list option "-eglstream" if not supported As Xwayland is usually spawned by the Wayland server/compositor, its command line options are not always adjustable. Yet, if EGLStream is not supported in a given Xwayland build, the option will do nothing (yet we must still accept it otherwise Xwayland would refuse to run if the Wayland compositor uses it). If Xwayland was built without support for EGLStream, there is not point in showing the option in the help message though. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit d163f938a00c177c5ff28e779993f18ee69476d4 Author: Olivier Fourdan Date: Tue Nov 10 09:53:57 2020 +0100 xwayland: Add help entry for -shm The command line options "-shm" is used to instruct Xwayland to prefer shared-memory for passing buffers to the Wayland server, rather than using glamor and DRI3. The option was there from the beginning, yet not documented in the "-help" message. Signed-off-by: Olivier Fourdan Reviewed-by: Martin Peres commit df3aa4922fd7e256169e541188b724f67ca948e1 Author: Michel Dänzer Date: Fri Nov 6 10:14:19 2020 +0100 xwayland: Make window_get_client_toplevel non-recursive Noticed while reading the code. Reviewed-by: Olivier Fourdan commit 899cebb76ab7754fea49f7babcd64a7e94052cc8 Author: Olivier Fourdan Date: Tue Oct 27 16:33:55 2020 +0100 configure: Build hashtable for Xres and glvnd With autoconf, hashtable support is built along with Xres support. Yet, glvnd also use it, so when disabling Xres from configure, the build will fail at link time because hashtable functions are not available. Untie the build of hashtable from Xres support, just like meson build does. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1091 commit 606ba7fc51e5420646f75c4e672fbe61eb7c7e6e Author: Olivier Fourdan Date: Thu Nov 5 18:35:54 2020 +0100 xwayland: Create an xwl_window for toplevel only One general assumption in Xwayland is that the xwl_window remains the same for all the child windows of the toplevel window. When mapping a new X11 window, ensure_surface_for_window() checks for an existing xwl_window by using xwl_window_get() which will just check for the registered xwl_window for the window. That means that a client mapping a child window of an existing window with a xwl_window will get another different xwl_window. If an X11 client issues a Present request on the parent window, hence placed underneath its child window of the same size, the Wayland compositor may not send the frame callback event for the parent's Wayland surface which is reckoned to be not visible, obscured behind the other Wayland surface for the child X11 window. That bug affects some games running in wine which may get 1 fps because the repaint occurs only on timeout with a long interval (as with, e.g. https://bugs.winehq.org/show_bug.cgi?id=47066) Fix ensure_surface_for_window() by using xwl_window_from_window() which will walk the window tree, so that a child window won't get another xwl_window than its parent. https://gitlab.freedesktop.org/xorg/xserver/-/issues/1099 See-also: https://bugs.winehq.org/show_bug.cgi?id=47066 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit ffd02d9b26bd560849c407a6dd4f5c4d7d2c1736 Author: Olivier Fourdan Date: Mon Nov 2 15:44:31 2020 +0100 xwayland: non-rootless requires the XDG-WM-Base protocol When running non-rootless, Xwayland requires that the Wayland compositor supports the XDG-WM-Base protocol. Check for XDG-WM-Base protocol support at startup and exit cleanly if missing rather than segfaulting later in ensure_surface_for_window() while trying to use xdg_wm_base_get_xdg_surface(). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Simon Ser commit 7a7e55c5c1d6461a9f4d9a4e0129c1c6e1fd3d66 Author: Alex Goins Date: Mon Oct 5 18:19:52 2020 -0500 glamor: Update pixmap's devKind when making it exportable When making a pixmap exportable, glamor will currently create a temporary exported pixmap backed by a GBM bo, with the devKind updated to the stride of the bo. However, when the backing of the exported pixmap is swapped into the original, the devKind of the original is not updated. Some GBM bos may get implicitly padded, in which case the devKind of the pixmap will not match the stride of the backing bo. For example, an 800x600 pixmap will have a devKind of 3200, but the bo's stride will be 3328. This can cause corruption with PRIME, when the sink uses the wrong stride to display the shared pixmap. This commit changes glamor_make_pixmap_exportable() to update the devKind of the original pixmap after it swaps exported pixmap's backing into it, keeping everything consistent. Fixes issue #1018. Signed-off-by: Alex Goins Signed-off-by: Aaron Plattner Reviewed-by: Michel Dänzer commit affc47452507d7e4605fd8c9a16db078e4f2aea2 Author: Adam Jackson Date: Tue Sep 22 16:13:00 2020 -0400 xwayland: Drop the separate refcount for the xwl_pixmap Instead, bump the pixmap's refcount at the bottom of post_damage to reflect the compositor's hold on the buffer, and "destroy" the pixmap in the buffer release callback (which will dec the pixmap's refcount and free if necessary). Signed-off-by: Adam Jackson commit 4e670f1281ad75c5673b6ac75645036d810da8d9 Author: Aaron Plattner Date: Fri Oct 25 00:06:40 2019 -0700 modesetting: Add CTM RandR property When the "CTM" (color transform matrix) modesetting property is available, create a corresponding RandR property. To match the format of the property available in the amdgpu driver, expose it as an array of 18 32-bit XA_INTEGERs representing a 3x3 matrix in row-major order, where each entry is a S31.32 sign-magnitude fixed-point number with the fractional part listed first. Signed-off-by: Aaron Plattner Acked-by: Michel Dänzer Reviewed-by: James Jones commit 245b9db03a1e1189b992409283e3d88b5d56e62d Author: Aaron Plattner Date: Thu Oct 24 13:46:35 2019 -0700 modesetting: Use GAMMA_LUT when available If the kernel exposes GAMMA_LUT and GAMMA_LUT_SIZE properties and the size is not what the server has pre-configured for the crtc, free the old gamma ramp memory allocated by the server and replace it with new allocations of the appropriate size. In addition, when GAMMA_LUT is available, use drmModeCreatePropertyBlob() and drmModeObjectSetProperty() to set the gamma ramp rather than using the legacy drmModeCrtcSetGamma() function. Add a new option "UseGammaLUT" to allow disabling this new behavior and falling back to drmModeCrtcSetGamma() unconditionally. Signed-off-by: Aaron Plattner commit b6985d6b3fb3e9ae36f638b0fd65cfad3d4bbd46 Author: Aaron Plattner Date: Thu Oct 24 13:41:39 2019 -0700 modesetting: Query properties even in non-atomic mode Modeset properties can be set even when ms->atomic_modeset is disabled by using the drmModeObjectSetProperty() function. This will be necessary in a later change in order to set the GAMMA_LUT and CTM properties. Signed-off-by: Aaron Plattner commit 4fefe73feaee31a992b284963599d63feb598807 Author: Aaron Plattner Date: Tue Oct 22 10:06:30 2019 -0700 modesetting: Store property values in drmmode_prop_info_rec A later change will need to read the value of the GAMMA_LUT_SIZE property. Signed-off-by: Aaron Plattner commit 1626e9fa77c0d3715d38ededd43656aa6d942bd9 Author: Peter Harris Date: Wed Sep 30 16:01:06 2020 -0400 glx: set errorValue when returning GLXBadFBConfig client->errorValue is already set in validGlxFBConfig. Set it in __glXDisp_CreateContextAttribsARB for consistency. Signed-off-by: Peter Harris commit 96d19e898acb56d8fc6e6febbc6498f67cdd66a0 Author: Adam Jackson Date: Thu Sep 24 17:08:27 2020 -0400 glx: Implement GLX_EXT_get_drawable_type Trivial extension to let the client query whether this is a window pixmap or pbuffer. Mostly for Mesa's convenience when setting up drawable state, but plausibly useful for apps and middleware as well. Upstream OpenGL Registry merge request: https://github.com/KhronosGroup/OpenGL-Registry/pull/425 commit c15dd0ba4893f79f7181e783cb1ba404edca917a Author: Bernhard Übelacker Date: Sun Sep 27 18:03:48 2020 +0200 os: Fix instruction pointer written in xorg_backtrace The address retrieved in "pip.start_ip" is not necessarily the same address as unw_get_proc_name finds as nearest symbol and returns in "off". Therefore using "pip.start_ip + off" is not reliable, at least visible in the binaries from the Debian repository. Bug-Debian: https://bugs.debian.org/971088 Signed-off-by: Bernhard Übelacker commit acc581c96f16fe3c097dfd0da4ff33f7b104597d Author: Dor Askayo Date: Sat Sep 26 15:54:45 2020 +0300 dri3: Add missing libdrm dependency in Makefile.am Fixes: 0ce93e5ba774 "dri3: Include dix-config.h instead of xorg-config.h" Signed-off-by: Dor Askayo commit efb3abddd49fb75bd6d0e31046fed43d258c93da Author: Kishore Kadiyala Date: Sat Sep 19 01:28:14 2020 +0530 modesetting: keep going if a modeset fails on EnterVT There was a time when setting a mode on a CRTC would not depend on the associated connector's state. If a mode had been set successfully once, it would mean it would work later on. This changed with the introduction of new connectors type that now require a link training sequence (DP, HDMI 2.0), and that means that some events may have happened while the X server was not master that would then prevent the mode from successfully be restored to its previous state. This patch relaxes the requirement that all modes should be restored on EnterVT, or the entire X-Server would go down by allowing modesets to fail (with some warnings). If a modeset fails, the CRTC will be disabled, and a RandR event will be sent for the desktop environment to fix the situation as well as possible. Additional patches might be needed to make sure that the user would never be left with all screens black in some scenarios. v2 (Martin Peres): - whitespace fixes - remove the uevent handling (it is done in a previous patch) - improve the commit message - reduce the size of the patch by not changing lines needlessly - return FALSE if one modeset fails in ignore mode - add comments/todos to explain why we do things - disable the CRTCs that failed the modeset Signed-off-by: Kishore Kadiyala Signed-off-by: Martin Peres Reviewed-by: Daniel Vetter Tested-by: Kishore Kadiyala Closes: #1010 commit 293cf660c95d7ba36510bcc4114d7fd5c5f3801c Author: Martin Peres Date: Fri Apr 24 18:06:16 2020 +0300 modesetting: check the kms state on EnterVT Normally, we would receive a uevent coming from Linux's DRM subsystem, which would trigger the check for disappearing/appearing resources. However, this event is not received when X is not master (another VT is selected), and so the userspace / desktop environment would not be notified about the changes that happened while X wasn't master. To fix the issue, this patch forces a refresh on EnterVT by splitting the kms-checking code from the uevent handling into its own (exported) function called drmmode_update_kms_state. This function is then called from both the uevent-handling function, and on EnterVT right before restoring the modes. Signed-off-by: Martin Peres Reviewed-by: Daniel Vetter Acked-by: Kishore Kadiyala Tested-by: Kishore Kadiyala commit 4c00369024c9754e670fca37804711fef2980e2f Author: Povilas Kanapickas Date: Tue Sep 22 20:53:49 2020 +0300 Bump input minor ABI due to addition of input event drain callback Signed-off-by: Povilas Kanapickas commit 5eb985e3531b69d3ddc4dc0d4b69b4280b1626f8 Author: Povilas Kanapickas Date: Thu Sep 17 00:55:17 2020 +0300 mi: Add a callback to notify driver about input event submission This is useful for mock input drivers that control the server in integration tests. Given that input submission happens on a different thread than processing, it's otherwise impossible for the driver to synchronize with the completion of the processing of submitted events. Signed-off-by: Povilas Kanapickas commit a5f439dcd21b4fda093cb382bb1a758b434a1444 Author: Olivier Fourdan Date: Mon Sep 14 15:39:10 2020 +0200 xwayland: Remove pending stream reference when freeing The EGLStream backend keeps a queue of pending streams for each Xwayland window. However, when this pending queue is freed, the corresponding private data may not be cleared (typically if the pixmap for this window has changed before the compositor finished attaching the consumer for the window's pixmap's original eglstream), leading to a use-after-free and a crash when trying to use that data as the window pixmap. Make sure to clear the private data when the pending stream is freed. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1055 Signed-off-by: Olivier Fourdan Tested-by: Karol Szuster Reviewed-by: Adam Jackson commit 0b86c0c36241989d7e9662d007c5297fe22ae8b5 Author: Olivier Fourdan Date: Mon Sep 14 14:35:22 2020 +0200 xwayland: Add a flag for n-buffers in EGL backend Using multiple window buffers crashes with EGLStream, which does not need it anyway as this is handled through EGL directly. Add a flag to the EGL backend to indicate whether it would benefit from multiple buffers and use this in the get_buffer() function. Thanks to Adam Jackson for pointing out that issue with EGLStream. v2: Fix logical test (Adam Jackson ) Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit ae84f14fb554e5ad54c51c2e6d52ab4a68bf7a0a Author: Olivier Fourdan Date: Mon Sep 14 14:26:34 2020 +0200 xwayland: Add a flag to expose EGL backend features The present flip does not work with the EGLStream backend. Similarly, the EGLStream backend does not require the buffer to be flushed as eglSwapBuffers() should take care of this. Instead of actually checking the backend in use in the present code, add a flag in the form of a bitfield to the EGL backend to indicate its features and requirements. This should not introduce any functional change. v2: Fix logical test (Adam Jackson ) Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 239ebdc9e447d4f836d0c2aa6068c6064fffb46c Author: Greg V Date: Tue Sep 15 17:41:04 2020 +0300 xwayland: use drmGetNodeTypeFromFd for checking if a node is a render one Major/minor numbers are a.. major (ha) source of pain in FreeBSD porting. In this case, Xwayland was thinking that /dev/dri/card0 is already a render node, because the st_rdev on FreeBSD was passing the Linux-style check, and because of the assumption, acceleration would fail because various ioctls like AMDGPU_INFO would be denied on the non-render node. Switch to libdrm's function that already works correctly on all platforms. Signed-off-by: Greg V Reviewed-by: Emmanuel Vadot commit add3df2001a2eadc41c47683f50fdc0fd8b14964 Author: Michel Dänzer Date: Tue Sep 15 11:43:16 2020 +0200 Consolidate fourcc.h Move the copy in hw/xfree86/common to include/, and remove the one in hw/kdrive/src/. Fixes DIX glamor code including an xfree86 DDX header. commit 62d8c1cc69e273199c9eb23e87b8631d32c56d33 Author: Michel Dänzer Date: Tue Sep 15 11:41:34 2020 +0200 present: Include dix-config.h instead of xorg-config.h This is DIX code. commit 0ce93e5ba774a53459bac8c23016c5d3232038eb Author: Michel Dänzer Date: Tue Sep 15 11:38:55 2020 +0200 dri3: Include dix-config.h instead of xorg-config.h This is DIX code. commit 97f858d336a85cb49de6275918793c773d5d9db1 Author: Uday Kiran Pichika Date: Wed Aug 19 16:20:15 2020 +0530 modesetting: Allow users to opt-in VRR support Fetch VariableRefresh option value from X conf file for modesetting backend DDX driver. This option defaults to false, and must be set to "true" in conf file for variable refresh support in the DDX driver. Signed-off-by: Uday Kiran Pichika commit ede2c32ce116138ddf081932ea2c33bd6f4b6990 Author: Uday Kiran Pichika Date: Thu Jun 18 16:07:33 2020 +0530 modesetting: Detect changes to the _VARIABLE_REFRESH window properties Window wrappers gets the notification when the window properties changes. These wrappers are mainly used to keep track of per-window _VARIABLE_REFRESH property values. These changes have been ported from AMDGPU Signed-off-by: Uday Kiran Pichika commit 9823ea4ed24db76b1e61d69a8da8f7599857d02a Author: Uday Kiran Pichika Date: Thu Jun 18 11:31:31 2020 +0530 modesetting: Lay the foundation for enabling VRR These changes have been ported from AMD GPU DDX driver. This patch adds support for setting the CRTC variable refresh property for suitable windows flipping via the Present extension. In order for a window to be suitable for variable refresh it must have the _VARIABLE_REFRESH property set by the MESA and inform Modesetting DDX driver with window property updates. Then the window must pass the checks required to be suitable for Present extension flips - it must cover the entire X screen and no other window may already be flipping. And also DRM connector should be VRR capable. With these conditions met every CRTC for the X screen will have their variable refresh property set to true. Kernel Changes to support this feature in I915 driver is under development. Tested with DOTA2, Xonotic and custom GLX apps. Signed-off-by: Uday Kiran Pichika commit 42878790708c2a9ecdbb81f635e5e3a34842e34c Author: Michel Dänzer Date: Fri Sep 4 13:03:35 2020 +0200 present/wnmd: Remove no-op present_wnmd_flip_destroy Reviewed-by: Roman Gilg commit 59c40b0ee7cd864dd098f5ac41bbfe96e7bd0e9b Author: Michel Dänzer Date: Fri Sep 4 13:02:04 2020 +0200 present/wnmd: Remove dead present_wnmd_can_window_flip present_can_window_flip is only called from the Xorg modesetting driver, never in WNMD mode. Reviewed-by: Roman Gilg commit b6b1161fd7ac409156fb69439897bcabdeacf393 Author: Michel Dänzer Date: Fri Sep 4 12:50:00 2020 +0200 present/wnmd: Remove dead check from present_wnmd_check_flip present_wnmd_toplvl_pixmap_window returns a window with the same window pixmap, so the check could never fail. Reviewed-by: Roman Gilg commit 4c25356d6cd908c5030c70e712076dff318ac00d Author: Michel Dänzer Date: Thu Aug 27 18:36:15 2020 +0200 xwayland: Check window pixmap in xwl_present_check_flip2 We can only flip if the window pixmap matches that of the toplevel window. Doing so regardless could cause the toplevel window pixmap to get destroyed while it was still referenced by the window, resulting in use-after-free and likely a crash. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1033 Reviewed-by: Olivier Fourdan Reviewed-by: Roman Gilg commit 7ac303c7b1e3b1be79ba3648e217798683e65a99 Author: Michel Dänzer Date: Fri Aug 28 11:57:39 2020 +0200 present/wnmd: Can't use page flipping for windows clipped by children Noticed this was missing while working on the following fix. v2: * Dropped present_wnmd_can_window_flip hunk (that function is never called, will be cleaned up in a follow-up MR). Reviewed-by: Olivier Fourdan # v1 Reviewed-by: Roman Gilg commit 727df0a74e75982f4352f0a3e574fcf6db3372f7 Author: Roman Gilg Date: Mon Aug 10 19:14:28 2020 +0200 xwayland: Replace need_rotate boolean with simple check on xdg-output The need_rotate variable is only used once anymore and had semantics which lead to errors in the past. In particular when negated we are dealing with a double negation. The variable gets replaced with a simple check on the xdg-output directly. Signed-off-by: Roman Gilg commit da791ed9fdc715dcbe73c60a4c4ab2d385ab28e4 Author: Roman Gilg Date: Thu Aug 13 16:55:03 2020 +0200 Revert "xserver: Fix a typo" This reverts commit 427f8bc00981703abe3153b6da575faa69fe2748. When receiving an output update for the mode size we need to rotate the stored width and height values if and only if we have an xdg-output for this output since in this case the stored values describe the output's size in logical space, i.e. rotated. The here reverted commit made a code change with which we would not rotate though when an xdg-output was available since in this case the need_rotate variable was set to False what caused in the check afterwards the first branch to execute. commit 92f4a9ade3c97bda833b0e10f10856b2542f793c Author: Roman Gilg Date: Mon Aug 10 19:01:52 2020 +0200 xwayland: Switch width and height argument order That is just a small style-change to the output_get_new_size function. The function before did take first the height and then the width argument, what is unusual since resolutions are normally named the other way around, for example 1920x1080. Also compare the update_screen_size function. Therefore change the order of arguments for output_get_new_size. Signed-off-by: Roman Gilg commit 1805383d9eb17ef8ac159366c684ac85b3d53731 Author: Roman Gilg Date: Mon Aug 10 18:58:56 2020 +0200 xwayland: simplify output_get_new_size function We can just read out the xdg_output field of the provided xwl_output to check if a rotation is necessary or not. This makes the function easier to understand. Additionally some documentation is added. Signed-off-by: Roman Gilg commit 919f1f46fc67dae93b2b3f278fcbfc77af34ec58 Author: Michel Dänzer Date: Mon Aug 31 12:10:43 2020 +0200 xfree86: Take second reference for SavedCursor in xf86CursorSetCursor The same pointer is kept in CurrentCursor as well, therefore two RefCursor calls are needed. Fixes use-after-free after switching VTs. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1067 commit 2902b78535ecc6821cc027351818b28a5c7fdbdc Author: Matthieu Herrb Date: Tue Aug 18 14:55:01 2020 +0200 Fix XRecordRegisterClients() Integer underflow CVE-2020-14362 ZDI-CAN-11574 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 144849ea27230962227e62a943b399e2ab304787 Author: Matthieu Herrb Date: Tue Aug 18 14:52:29 2020 +0200 Fix XkbSelectEvents() integer underflow CVE-2020-14361 ZDI-CAN 11573 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit c940cc8b6c0a2983c1ec974f1b3f019795dd4cff Author: Matthieu Herrb Date: Tue Aug 18 14:49:04 2020 +0200 Fix XIChangeHierarchy() integer underflow CVE-2020-14346 / ZDI-CAN-11429 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit f7cd1276bbd4fe3a9700096dec33b52b8440788d Author: Matthieu Herrb Date: Tue Aug 18 14:46:32 2020 +0200 Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb commit 1cccb486d48a5d2e7649836b993805bb65dc09e3 Author: Michel Dänzer Date: Tue Jul 28 18:40:47 2020 +0200 present/wnmd: Execute copies at target_msc-1 already It always takes one update cycle for the copy to become visible on the host windowing system, so waiting for the target MSC resulted in 1 cycle delay. We re-use the idle list for copies which were executed but need their completion event sent. Fixes black seams when resizing the "Builder" sub-window of GDK_BACKEND=x11 gtk4-demo on Xwayland (see https://gitlab.gnome.org/GNOME/mutter/-/issues/1290#note_873557). Unfortunately, this cannot completely fix the seams with apps which queue up multiple frames in advance, since there's always at least one queued frame corresponding to the old window size. But it should at least help a little in that case as well. v2: * Bug fix: Don't update exec_msc in present_wnmd_check_flip_window. (Roman Gilg) * Use exec_msc = target_msc - 1 instead of exec_msc--, and add a comment, for clarity. v3: * Drop exec_msc = target_msc again in present_wnmd_execute. * present_execute_copy should never set vblank->queued in present_wnmd_execute now, so replace that branch with an assertion. (Roman Gilg) Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit d14ea667feccf085c7d66a7c63f380975e07af66 Author: Michel Dänzer Date: Tue Jul 28 18:53:45 2020 +0200 present/wnmd: Move up present_wnmd_queue_vblank Allowing it to be called from more functions than before. No functional change. Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit b0b3159abd8001fa3f6dfc44a288a95a62aa5cf6 Author: Michel Dänzer Date: Wed Aug 12 17:38:33 2020 +0200 present: Add present_vblank::exec_msc field For tracking the MSC when the present can be executed separately from the target MSC. Allows removing the requeue field instead, plus more later. v2: * Rename wait_msc → exec_msc (Roman Gilg) * Use exec_msc = target_msc instead of exec_msc++, for clarity. * Bug fix: Set exec_msc = target_msc also if present_flip returned false in present_execute. v3: * Set exec_msc = target_msc also if present_wnmd_flip returned false in present_wnmd_execute, for consistency. v4: * Specifically check for exec_msc == crtc_msc + 1 in present_execute_wait/copy, to avoid re-introducing https://bugs.freedesktop.org/show_bug.cgi?id=94596 . Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit 4c92dea952f7fed19857904f0f552900257ef4b9 Author: Michel Dänzer Date: Tue Jul 28 18:48:42 2020 +0200 present: Move flip target_msc adjustment out of present_vblank_create Preparation for different handling between SCMD & WNMD. No functional change intended. Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit 032af35657aa95c6bbdb74ff8c72e535b9b56cfa Author: Michel Dänzer Date: Fri Jul 24 18:21:05 2020 +0200 glamor: Fix glamor_poly_fill_rect_gl xRectangle::width/height handling (Using GLSL 1.30 or newer) The width/height members of xRectangle are unsigned, but they were being interpreted as signed when converting to floating point for the vertex shader, producing incorrect drawing for values > 32767. v2: * Use separate GL_UNSIGNED_SHORT vertex attribute for width/height. (Eric Anholt) Reviewed-by: Eric Anholt commit b22b4da980b763af5124f26627cad93983542d6b Author: Adam Jackson Date: Fri Aug 14 19:19:46 2020 -0400 glamor: Fix debugging callback setup on GLES You will not find GL_ARB_* extensions in a GLES context by definition, the droid you're looking for is named GL_KHR_debug. Reviewed-by: Eric Anholt Reviewed-by: Michel Dänzer commit 5c20e4b834145f590c68dbc98e33c7d3d710001a Author: Olivier Fourdan Date: Wed Jun 3 10:17:13 2020 +0200 xwayland: Disable the MIT-SCREEN-SAVER extension when rootless Xwayland is just a Wayland client, no X11 screensaver should be expected to work reliably on Xwayland when running rootless because Xwayland cannot grab the input devices so it has no way to actually lock the screen managed by the Wayland compositor. Turn off the screensaver on Xwayland when running rootless by setting the screensaver timeout and interval and their default values to zero and disable the MIT-SCREEN-SAVER extension. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1051 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Peter Hutterer commit aac28e162e5108510065ad4c323affd6deffd816 Author: Matthieu Herrb Date: Sat Jul 25 19:33:50 2020 +0200 fix for ZDI-11426 Avoid leaking un-initalized memory to clients by zeroing the whole pixmap on initial allocation. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 9d8e7c4828747f6bba438528c6ef6e2577b50522 Author: Ignacio Casal Quinteiro Date: Thu Jul 16 10:19:43 2020 +0200 XKB: Add debug key actions for grabs & window tree Replicate 7d2543a3cb3089241982ce4f8984fd723d5312a1 but for all types of X servers commit c24eb7e31e750d2b9ba8f1b72f53b07a57495395 Author: Roman Gilg Date: Tue Jul 28 20:24:50 2020 +0200 xwayland: Simplify Present event handling code Instead of optionally return early when an event is aborted and potentially clean it up in there we can only optionally inform Present if not aborted and afterwards clean it up if required. Saves some lines of code and conditional branches. Signed-off-by: Roman Gilg commit 06901e12c07691112b91b26b0c2000f8971e48b5 Author: Jon Turney Date: Thu Jun 4 13:25:45 2020 +0100 meson: Also ignore kms, kms_udev, hal options on Cygwin commit 4c2d1fe0454ca2b7c13e600a31f6733705c1c7b9 Author: Jon Turney Date: Wed Jul 29 20:32:49 2020 +0100 hw/xwin: Update for renames in xserver/output API Update commit ea47af87 renaming master_pixmap to primary_pixmap in struct PixmapRec. commit 9fbd3e43dd9e13700df96b508c3d97f77e2b9f7e Author: Huacai Chen Date: Sun Jul 5 05:59:58 2020 -0400 linux: Fix platform device probe for DT-based PCI On a DT-base PCI platform, the sysfs path of vga device is like this: /sys/devices/platform/bus@10000000/1a000000.pci/pci0000:00/0000:00:11.0/0000:04:00.0. Then the ID_PATH from udev is platform-1a000000.pci-pci-0000:04:00.0 and the BusID will be pci-0000:04:00.0, which causes Xorg start fail. This is because config_udev_odev_setup_attribs() use strstr() to search the first "pci-" in ID_PATH. To fix this, we implement a strrstr() function and use it to search the last "pci-" in ID_PATH, which can get a correct BusID. Signed-off-by: Huacai Chen commit 591916ea9e7a77f68f436b4a541402d9deadfe64 Author: Roman Gilg Date: Fri Jul 24 12:21:37 2020 +0200 present: Check valid region in window mode flips For Pixmap flips to have well defined outcomes the window must be contained by the valid region if such region was specified. The valid region is inserted as an argument to the check in window mode. Setting this argument is missing in screen mode as well but we ignore it for now and only add it to window mode. It seems there are none or only very few clients actually making use of valid regions at the moment. For simplicity we therefore just check if a valid region was set by the client and in this case do never flip, independently of the window being contained by the region or not. Signed-off-by: Roman Gilg commit bf794bd7bfa3bdcf7de95ce237eb50ecc6ec11d2 Author: Roman Gilg Date: Tue Jul 14 14:32:25 2020 +0200 present: Remove superfluous set abort flip function in window mode The function is never called from present_screen.c in contrast to the behavior in screen mode. In present_wnmd.c we can simply remove the function which does an unnecessary check of the property before setting it and directly set the property at the two locations the function was called previously. Signed-off-by: Roman Gilg commit ab880b8b9e8d67a05fcb085097c94bbddf7dcb95 Author: Roman Gilg Date: Sun Jul 12 13:42:31 2020 +0200 present: Idle vblanks any time in window mode With the newly introduced separate API method for idling a presented Pixmap in window mode we can simplify the logic by allowing calls to it at any point in time. This is done by setting the flip_idler flag if the Pixmap was idled before being presented. Signed-off-by: Roman Gilg commit 932c6baca274f57beab51cd0dff1f7fa934e0ed0 Author: Roman Gilg Date: Sat Jul 11 19:15:46 2020 +0200 present: Notify via distinct API functions in window mode Notifying Present about events' states was done prior with the single function present_wnmd_event_notify just like in screen mode. But it is more intelligible if at least in window mode we make use of three different functions with names that directly indicate what their purpose is: * present_wnmd_event_notify only for queued events feedback. * present_wnmd_flip_notify for when a presentation occured (flip). * present_wnmd_idle_notify for when the Pixmap of the event can be reused. This is an API-breaking change in regards to window mode. DDX written against the previous version won't work anymore. It is assumed that there only exists the XWayland DDX at the moment using the window mode such that this is not an issue for the overall ecosystem. Signed-off-by: Roman Gilg commit f8211095c3d94307225318902598e8f79d038f26 Author: Roman Gilg Date: Sat Feb 15 01:58:22 2020 +0100 xwayland: Rename present event lists Rename the lists release_queue to release_list and event_list to wait_list. The prior names release_queue and event_list were ambiguous: in both are event- like vblanks which can be removed from the lists in random order. In the release_queue can be flips that are already released but still wait for the sync or frame callback but normally the release comes later. In the event_list are queued events waiting for a later msc. Signed-off-by: Roman Gilg commit 0db326e5ca3dd244dda502c8261801c04ff792ab Author: Roman Gilg Date: Wed Jul 8 10:24:41 2020 +0200 xwayland: Remove unused xwl_screen entry In xwl_present_window an xwl_screen entry was declared but never actually used. Signed-off-by: Roman Gilg commit 495bf63a7df066672d9d44dedeb1f49658a247d8 Author: Alex Goins Date: Thu Jul 2 20:03:06 2020 -0500 randr: Re-add removed NULL checks to xf86RandR12.c Commit 1e3f9ea1 removed some NULL checks from xf86RandR12.c, on the premise that they can't be reached unless RandR has already been initialized. For threesuch calls, that's not true: xf86Crtc.c::xf86CrtcScreenInit(): if (c == config->num_crtc) { xf86RandR12SetRotations(screen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270 | RR_Reflect_X | RR_Reflect_Y); xf86RandR12SetTransformSupport(screen, TRUE); } else { xf86RandR12SetRotations(screen, RR_Rotate_0); xf86RandR12SetTransformSupport(screen, FALSE); } xf86Crtc.c::xf86CrtcCloseScreen(): xf86RandR12CloseScreen(screen); This change adds checks back to xf86RandR12Set{Rotations,TransformSupport}() and xf86RandR12CloseScreen(), checking that xf86RandR12KeyRec has been registered. Without this, X will hit an assert that causes it to abort. Signed-off-by: Alex Goins commit 8eeff5d7880c6885ee6f206355599f13d739afa7 Author: Alex Goins Date: Thu Jul 2 20:12:43 2020 -0500 randr: Check rrPrivKey in RRHasScanoutPixmap() RRHasScanoutPixmap() is called from xf86CheckHWCursor(), regardless of whether or not RandR has been initialized. As mentioned in commit 4226c6d, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d, fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by: Alex Goins commit 6172bd2b41a7ce158b9052af3e373318e5e4381c Author: Alex Goins Date: Thu Jul 2 18:39:11 2020 -0500 randr: Check rrPrivKey before autobinding GPU screens RRProviderAutoConfigGpuScreen() is called from outside RandR, so there is no guarantee that RandR has been initialized when it is called. As mentioned in commit 4226c6d, it's possible that RandR has not been initialized if the server is configured with Xinerama and there is more than one X screen. Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion key->initialized' failed. Just as in commit 4226c6d, fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. Signed-off-by: Alex Goins commit e33453f9111b21e4814d628e6ae00bc7b200f404 Author: Michel Dänzer Date: Fri Jul 10 18:56:42 2020 +0200 xwayland: Handle NULL xwl_seat in xwl_seat_can_emulate_pointer_warp This can happen e.g. with weston's headless backend. Reviewed-by: Olivier Fourdan commit ddb86e94c07a269dfc9cd80543f9f6a2c3e934a2 Author: Emmanuel Gil Peyrot Date: Sat Jul 11 19:47:40 2020 +0200 xwayland: Remove harmless duplicated #include commit a137dd5f79d272a57c6704143dc9c25a9b59c927 Author: Emmanuel Gil Peyrot Date: Sat Jul 11 19:34:59 2020 +0200 xwayland: Use memfd_create() when available This (so-far) Linux-only API lets users create file descriptors purely in memory, without any backing file on the filesystem and the race condition which could ensue when unlink()ing it. It also allows seals to be placed on the file, ensuring to every other process that we won’t be allowed to shrink the contents, potentially causing a SIGBUS when they try reading it. This patch is best viewed with the -w option of git log -p. This is a port of this commit from Weston: https://gitlab.freedesktop.org/wayland/weston/-/commit/deae98ef45e060b8412a5edd195fb0c7c14f0321 Fixes #848. Signed-off-by: Emmanuel Gil Peyrot commit ba0e789b912671c724a21b3a30291247718bcf7d Author: Lyude Paul Date: Tue Jul 14 18:32:39 2020 -0400 xwayland: Store xwl_tablet_pad in its own private key When a slave device causes the master virtual pointer device to change device types, the device's private data pointer (device->public.devicePrivate) is also changed to match the type of the slave device. This can be a problem though, as tablet pad devices will set the device's private data pointer to their own xwl_tablet_pad struct. This can cause us to dereference the pointer as the wrong type, and result in a segfault: Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault. wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792 792 va_start(ap, opcode); (gdb) bt 0 wl_proxy_marshal (proxy=0x51, opcode=opcode@entry=0) at src/wayland-client.c:792 1 0x00005610b27b6c55 in wl_pointer_set_cursor (hotspot_y=0, hotspot_x=0, surface=0x0, serial=, wl_pointer=) at /usr/include/wayland-client-protocol.h:4610 2 xwl_seat_set_cursor (xwl_seat=xwl_seat@entry=0x5610b46d5d10) at xwayland-cursor.c:137 3 0x00005610b27b6ecd in xwl_set_cursor (device=, screen=, cursor=, x=, y=) at xwayland-cursor.c:249 4 0x00005610b2800b46 in miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:468 5 miPointerUpdateSprite (pDev=0x5610b4501a30) at mipointer.c:410 6 0x00005610b2800e56 in miPointerDisplayCursor (pCursor=0x5610b4b35740, pScreen=0x5610b3d54410, pDev=0x5610b4501a30) at mipointer.c:206 7 miPointerDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at mipointer.c:194 8 0x00005610b27ed62b in CursorDisplayCursor (pDev=, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at cursor.c:168 9 0x00005610b28773ee in AnimCurDisplayCursor (pDev=0x5610b4501a30, pScreen=0x5610b3d54410, pCursor=0x5610b4b35740) at animcur.c:197 10 0x00005610b28eb4ca in ChangeToCursor (pDev=0x5610b4501a30, cursor=0x5610b4b35740) at events.c:938 11 0x00005610b28ec99f in WindowHasNewCursor (pWin=pWin@entry=0x5610b4b2e0c0) at events.c:3362 12 0x00005610b291102d in ChangeWindowAttributes (pWin=0x5610b4b2e0c0, vmask=, vlist=vlist@entry=0x5610b4c41dcc, client=client@entry=0x5610b4b2c900) at window.c:1561 13 0x00005610b28db8e3 in ProcChangeWindowAttributes (client=0x5610b4b2c900) at dispatch.c:746 14 0x00005610b28e1e5b in Dispatch () at dispatch.c:497 15 0x00005610b28e5f34 in dix_main (argc=16, argv=0x7ffc7a601b68, envp=) at main.c:276 16 0x00007f8828cde042 in __libc_start_main (main=0x5610b27ae930
, argc=16, argv=0x7ffc7a601b68, init=, fini=, rtld_fini=, stack_end=0x7ffc7a601b58) at ../csu/libc-start.c:308 17 0x00005610b27ae96e in _start () at cursor.c:1064 Simple reproducer in gnome-shell: open up an Xwayland window, press some tablet buttons, lock and unlock the screen. Repeat if it doesn't crash the first time. So, let's fix this by registering our own device-specific private key for storing a backpointer to xwl_tablet_pad, so that all input devices have their private data pointers set to their respective xwl_seat. Reviewed-by: Peter Hutterer Signed-off-by: Lyude Paul commit 85a6fd11c723888ca093785a3df43066fdca9c33 Author: Roman Gilg Date: Wed Jul 8 17:08:55 2020 +0200 xwayland: Damage surface in surface-relative coordinates In 9141196d positional coordinates were added to the damage call of pixmap flips. The damage box coordinates are in screen space though and we need to convert them first to surface-relative ones by substracting the origin of the window. Signed-off-by: Roman Gilg commit ed624544d4aef72db8dd575ad55ef5e206c54757 Author: Michel Dänzer Date: Fri Jul 10 11:01:10 2020 +0200 xfree86: Bump ABI_VIDEODRV_VERSION to 25.2 This gives out of tree drivers a fighting chance to build against both sides of https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/468 . Reviewed-by: Dave Airlie commit ea47af87f692b291a988834c6f14d73a08cb1d75 Author: Dave Airlie Date: Mon Jul 6 07:00:50 2020 +1000 xserver/output: rename some badly named variables/APIs. This is an API and ABI break Reviewed-by: Peter Hutterer commit 15b7738389b36ec2739d4f599539bcb7c2be89a1 Author: Dave Airlie Date: Mon Jul 6 07:00:04 2020 +1000 exa: rename some badly named variables Reviewed-by: Peter Hutterer commit 5188603ff7d25186c9076fefeceba825f3a40d47 Author: Olivier Fourdan Date: Mon Apr 20 11:29:16 2020 +0200 xwayland: Add a pkg-config file for Xwayland Xwayland is usually spawned by the Wayland compositor which sets the command line options. If a command line option is not supported, Xwayland will fail to start. That somehow makes the Xwayland command line option sort of ABI, the Wayland compositor need to know if a particular option is supported by Xwayland at build time. Also, currently, Xwayland is being installed along with the rest of the common executable programs that users may run, which is sub-optimal because, well, Xwayland is not a common executable program, it's meant to be a proxy between the Wayland compositor and the legacy X11 clients which wouldn't be able to run on Wayland otherwise. Xwayland would be better installed in `libexec` but that directory is (purposedly) not in the user `PATH` and therefore the Wayland compositor may not be able to find Xwayland in that case. To solve both problems (which options are supported by Xwayland and where to look for it), add a `pkg-config` file specifically for Xwayland which gives the full path to Xwayland (`xwayland`) and which options it supports (using `pkg-config` variables). The `pkg-config` file also provides the `Version` so the build scripts can check for a particular version if necessary. Obviously, Wayland compositors are not required to use the `pkg-config` file and can continue to use whatever mechanism they deem preferable. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2beefda5a80e5a016c32c1da733f9415a121179d Author: Michel Dänzer Date: Tue Mar 17 12:55:34 2020 +0100 xwayland: Move xwl_surface_damage definition to xwayland-screen.c It was already declared in xwayland-screen.h, and only takes a screen parameter, no window ones. Reviewed-by: Olivier Fourdan commit 12af425acd3f4a3a8aa85352857b130b0006b83c Author: Michel Dänzer Date: Thu Jun 25 17:56:41 2020 +0200 xwayland: Rename xwl_pixmap_cb → xwl_buffer_release_cb Seems clearer. While we're at it, also drop the unused pixmap parameter. Reviewed-by: Olivier Fourdan commit 9eb0b4f731e21952f93e168900f10bf07e261107 Author: Michel Dänzer Date: Thu Jun 25 17:49:27 2020 +0200 xwayland: Remove xwl_present_event::buffer_released in favor of ::pixmap No need for the separate boolean. Reviewed-by: Olivier Fourdan commit 9141196d3104ab37385c3e385deaa70c002dd184 Author: Michel Dänzer Date: Tue Mar 17 12:58:12 2020 +0100 xwayland: Propagate damage x1/y1 coordinates in xwl_present_flip This couldn't have worked correctly for non-0 x1/y1. Noticed by inspection. Reviewed-by: Simon Ser commit 0006aecba097b437f96a462075494d68bdad24c1 Author: Alan Coopersmith Date: Sun Jul 5 13:18:45 2020 -0700 doc: Update URLs in Xserver-DTrace.xml Signed-off-by: Alan Coopersmith commit 23e83724df4809fd7857cc609c33ce7e8d3021a4 Author: Alan Coopersmith Date: Sun Jul 5 13:07:33 2020 -0700 Fix spelling/wording issues Most (but not all) of these were found by using codespell --builtin clear,rare,usage,informal,code,names but not everything reported by that was fixed. Signed-off-by: Alan Coopersmith commit b0413b6e99c6b5fbc04229ce64ddf1f41b08e63e Author: Olivier Fourdan Date: Tue Jun 2 11:23:46 2020 +0200 xwayland: Use a fixed DPI value for core protocol The way Xwayland works (like all Wayland clients), it first queries the Wayland registry, set up all relevant protocols and then initializes its own structures. That means Xwayland will get the Wayland outputs from the Wayland compositor, compute the physical size of the combined outputs and set the corresponding Xwayland screen properties accordingly. Then it creates the X11 screen using fbScreenInit() but does so by using a default DPI value of 96. That value is used to set the physical size of the X11 screen, hence overriding the value computed from the actual physical size provided by the Wayland compositor. As a result, the DPI computed by tools such as xdpyinfo will always be 96 regardless of the actual screen size and resolution. However, if the Wayland outputs get reconfigured, or new outputs added, or existing outputs removed, Xwayland will recompute and update the physical size of the screen, leading to an unexpected change of DPI. To avoid that discrepancy, use a fixed size DPI (defaults to 96, and can be set using the standard command lime option "-dpi") and compute a physical screen size to match that DPI setting. Note that only affects legacy core protocols, X11 clients can still get the actual physical output size as reported by the Wayland compositor using the RandR protocol, which also allows for the size to be 0 if the size is unknown or meaningless. Signed-off-by: Olivier Fourdan Reviewed-by: Simon Ser Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/731 commit 6748a4094158d2bde1630b915a5318f9f22c8e0a Author: SimonP Date: Tue Jun 9 13:26:48 2020 +0200 xwayland: Initialise values in xwlVidModeGetGamma() ProcVidModeGetGamma() relies on GetGamma() to initialise values if it returns TRUE. Without this, we're sending uninitialised values to clients. Fixes: xorg/xserver#1040 commit d35f68336b0a462dc660797d1779581f348af04e Author: Sjoerd Simons Date: Fri Apr 10 16:34:06 2020 +0200 xwayland: Fix crashes when there is no pointer When running with a weston session without a pointer device (thus with the wl_seat not having a pointer) xwayland pointer warping and pointer confining should simply be ignored to avoid crashes. Signed-off-by: Sjoerd Simons commit 73480f172aeced074dd9301ae4d97f7d2f3a9a45 Author: Jose Maria Casanova Crespo Date: Fri May 15 18:33:11 2020 +0200 modesetting: Fix front_bo leak at drmmode_xf86crtc_resize on XRandR rotation Since the introduction of "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" the fb_id isn't initialited at drmmode_xf86crtc_resize. Rotate operation of XRandR uses rotate_bo. So in this case the fb_id associated to the front_bo is not initialized at drmmode_set_mode_major. So fd_id remains 0. As every call to drmmode_xf86crtc_resize allocates a new front_bo we should destroy unconditionally the old_front_bo if operation success. So we free the allocated GBM handles. This avoids crashing xserver with a OOM in the RPI4 1Gb at 4k resolution after 3 series xrandr rotations from normal to left and vice versa reported at https://github.com/raspberrypi/firmware/issues/1345 Signed-off-by: Jose Maria Casanova Crespo Reviewed-by: Keith Packard Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1024 Fixes: 8774532121 "modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize" commit b67052742980fd3ec669100048da71e09aa61358 Author: Michel Dänzer Date: Fri Jun 19 18:10:18 2020 +0200 xwayland: Free all remaining events in xwl_present_cleanup These events aren't reachable after xwl_present_cleanup, so they're leaked if we don't free them first. This requires storing the pixmap pointer in struct xwl_present_window. Luckily, the buffer pointer isn't used for anything, so just replace that. v2: * Bump pixmap reference count in xwl_present_flip and drop it in xwl_present_free_event, fixes use-after-free in the latter due to the pixmap already being destroyed. Reviewed-by: Dave Airlie commit 1beffba699e2cc3f23039d2177c025bc127966de Author: Michel Dänzer Date: Fri Jun 19 18:14:35 2020 +0200 xwayland: Always use xwl_present_free_event for freeing Present events Minor cleanup, and will make the next change simpler. No functional change intended. Reviewed-by: Dave Airlie commit 1bdedc8dbb9d035b85444c2558a137470ff52113 Author: Michel Dänzer Date: Fri Jun 19 17:24:42 2020 +0200 present/wnmd: Free flip_queue entries in present_wnmd_clear_window_flip When present_wnmd_clear_window_flip is done, present_destroy_window frees struct present_window_priv, and the events in the flip queue become unreachable. So if we don't free them first, they're leaked. Also drop the call to present_wnmd_set_abort_flip, which just sets a flag in struct present_window_priv and thus can't have any observable effect after present_destroy_window. Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1042 Reviewed-by: Dave Airlie commit bc9dd1c71c3722284ffaa7183f4119151b25a44f Author: Michel Dänzer Date: Fri Jun 19 17:02:40 2020 +0200 present/wnmd: Keep pixmap pointer in present_wnmd_clear_window_flip The comment was incorrect: Any reference held by the window (see present_wnmd_execute) is in addition to the one in struct present_vblank (see present_vblank_create). So if we don't drop the latter, the pixmap will be leaked. Reviewed-by: Dave Airlie commit 7ae221ad5774756766dc78a73d71f4163ac7b1c6 Author: Martin Weber Date: Fri Jun 19 16:51:15 2020 +0200 hw/xfree86: Avoid cursor use after free During a VT-Switch a raw pointer to the shared cursor object is saved which is then freed (in case of low refcount) by a call to xf86CursorSetCursor with argument pCurs = NullCursor. This leads to a dangling pointer which can follow in a use after free. This fix ensures that there is a shared handle saved for the VT-Switch cycle. Reviewed-by: Michel Dänzer commit 6a79a737e2c0bc730ee693b4ea4a1530c108be4e Author: Aaron Ma Date: Sat Apr 11 17:29:35 2020 +0800 xfree86: add drm modes on non-GTF panels EDID1.4 replaced GTF Bit with Continuous or Non-Continuous Frequency Display. Check the "Display Range Limits Descriptor" for GTF support. If panel doesn't support GTF, then add gtf modes. Otherwise X will only show the modes in "Detailed Timing Descriptor". V2: Coding style changes. V3: Coding style changes, remove unused variate. V4: remove unused variate. BugLink: https://gitlab.freedesktop.org/drm/intel/issues/313 Signed-off-by: Aaron Ma Reviewed-by: Adam Jackson commit d6558477d7a264c2132bc977b51d80fc0277d1e0 Author: Simon Ser Date: Tue Jun 2 15:40:16 2020 +0200 xwayland: allow using linux-dmabuf with DRM_FORMAT_MOD_INVALID When the linux-dmabuf protocol is available, prefer it over the old wl_drm protocol. Previously wl_drm was used when modifiers aren't supported, however linux-dmabuf supports formats without modifiers too. In this case, linux-dmabuf will send a DRM_FORMAT_MOD_INVALID modifier for each supported format [1]. This allows compositors to better handle these buffers, getting a DMA-BUF and implementing features like direct scan-out. A similar logic has been implemented for EGL [2]. DRM_FORMAT_MOD_INVALID is now stored in the xwl_screen->formats list. glamor_get_modifiers still returns FALSE with zero modifiers if the only advertised modifier is DRM_FORMAT_MOD_INVALID. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/fb9b2a87317c77e26283da5f6c9559d709f6fdcd [2]: https://gitlab.freedesktop.org/mesa/mesa/-/commit/c376865f5eeca535c4aa8e33bcf166052c1ce2f2 Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer commit c0e13cbf5a56e1fdd1e4ce58ebdefb6d2904e4b3 Author: Simon Ser Date: Tue Jun 2 15:28:38 2020 +0200 xwayland: only use linux-dmabuf if format/modifier was advertised Previously, linux-dmabuf was used unconditionally if the buffer had a modifier. However creating a linux-dmabuf buffer with a format/modifier which hasn't been advertised will fail. Change xwl_glamor_gbm_get_wl_buffer_for_pixmap to use linux-dmabuf when the format/modifier has been advertised only. Signed-off-by: Simon Ser Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1035 Tested-by: Emmanuel Gil Peyrot Reviewed-by: Michel Dänzer commit 9c8d2744584868aa2655bf3ec047f2f9669e4291 Author: Simon Ser Date: Mon May 4 10:53:57 2020 +0200 xwayland: don't use GBM_BO_USE_SCANOUT This flag should only be used when the caller intends to display the buffer on a hardware plane. Xwayland isn't a DRM client, so it doesn't make sense to use this flag. This change will allow the driver to potentially use buffer parameters that are more optimized. Signed-off-by: Simon Ser Reviewed-by: Daniel Stone Reviewed-by: Michel Dänzer commit fc4f248544f207ffd68303da22ea1e27beb3729f Author: Adam Jackson Date: Fri Jun 5 14:33:03 2020 -0400 xwayland: Set the vendor name for GLX_EXT_libglvnd Without this the client library will flail around looking for a default provider, probably one named "indirect", and that defeats the point of having the EGL provider for direct context support in the first place. This assumes that "mesa" will work, of course, and in general it should. Mesa drivers will DTRT through the DRI3 setup path, and if our glamor is atop something non-Mesa then you should fall back to llvmpipe like 1.20. In the future it might be useful to differentiate the vendor here based on whether glamor is using gbm or streams. Fixes: xorg/xserver#1032 commit 5dc16f6fec672c10fc26dcaaf00df0f6bed0ef9a Author: Matthieu Herrb Date: Tue Jun 2 17:32:11 2020 +0200 Remove BSD APM support. None of the current BSD is actually using this code. (checked DragonFly 5.8.1, FreeBSD 11.2, NetBSD 9.0 and OpenBSD 6.7) Signed-off-by: Matthieu Herrb commit b5b529799a20f8a262066daeb726307c0631f208 Author: Jan Beich Date: Sun Feb 9 15:28:10 2020 +0000 meson: split udev from udev_kms which requires systemd DragonFly and FreeBSD can use xf86-input-libinput with config/udev. ld: error: undefined symbol: xf86PlatformDeviceProbe >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformDeviceCheckBusID >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformProbeDev) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: xf86PlatformReprobeDevice >>> referenced by xf86platformBus.c >>> xf86platformBus.c.o:(xf86platformVTProbe) in archive hw/xfree86/common/libxorg_common.a ld: error: undefined symbol: NewGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_added) in archive config/liblibxserver_config.a ld: error: undefined symbol: DeleteGPUDeviceRequest >>> referenced by udev.c >>> udev.c.o:(device_removed) in archive config/liblibxserver_config.a commit be731e0bdc7d76ad3782d5b533b6bcc8378f41ad Author: Jan Beich Date: Sun Feb 9 15:12:39 2020 +0000 glx: unbreak on Unix without /usr/include/drm In file included from ../glx/glxdri2.c:35: /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found #include ^~~~~~~ In file included from ../glx/glxdriswrast.c:39: /usr/local/include/GL/internal/dri_interface.h:43:10: fatal error: 'drm.h' file not found #include ^~~~~~~ commit f2cf236da8e8fefd6f503ceb0a448c5ad9651024 Author: Jan Beich Date: Sat Nov 16 18:40:36 2019 +0000 os: unbreak xsha1 on FreeBSD ../os/xsha1.c:36:10: fatal error: 'sha1.h' file not found #include ^~~~~~~~ ../os/xsha1.c:45:5: error: implicit declaration of function 'SHA1Init' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Init(ctx); ^ ../os/xsha1.c:54:5: error: implicit declaration of function 'SHA1Update' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Update(sha1_ctx, data, size); ^ ../os/xsha1.c:63:5: error: implicit declaration of function 'SHA1Final' is invalid in C99 [-Werror,-Wimplicit-function-declaration] SHA1Final(result, sha1_ctx); ^ commit 4195e8035645007be313ade79032b8d561ceec6c Author: Olivier Fourdan Date: Tue May 5 15:40:43 2020 +0200 xwayland: Clear private on device removal Xwayland uses the device private to point to the `xwl_seat`. Device may be removed at any time, including on suspend. On resume, if the DIX code ends up calling a function that requires the `xwl_seat` such as `xwl_set_cursor()` we may end up pointing at random data. Make sure the clear the device private data on removal so that we don't try to use it and crash later. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer https://gitlab.freedesktop.org/xorg/xserver/issues/709 commit 6ef1b0108ebe98c58fe5e00c86de52452c817518 Author: Peter Hutterer Date: Fri May 8 10:54:31 2020 +1000 gitlab CI: use the fdo ci-templates repository wayland/ci-templates was moved to freedesktop/ci-templates, everything else stayed the same so the sha is still valid. Signed-off-by: Peter Hutterer Acked-by: Michel Dänzer commit 421ce458f1d295015c108eb32f9611e527649cf8 Author: Simon Ser Date: Mon May 4 18:20:17 2020 +0200 xwayland: import DMA-BUFs with GBM_BO_USE_RENDERING only Drop GBM_BO_USE_SCANOUT from the GBM_BO_IMPORT_FD import, add GBM_BO_USE_RENDERING to the GBM_BO_IMPORT_FD_MODIFIER import. If the DMA-BUF cannot be scanned out, gbm_bo_import with GBM_BO_USE_SCANOUT will fail. However Xwayland doesn't need to scan-out the buffer and can work fine without scanout. Glamor only needs GBM_BO_USE_RENDERING. Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer Reviewed-by: Daniel Stone commit 0777cf46d7260f3d0c7fe82af5c94137d1e4f3de Author: Carlos Garnacho Date: Thu May 7 20:15:14 2020 +0200 xwayland: Improve checks for confined_to on InputOnly windows In this pretty Wine/Proton specific kludge, we try to handle confining grabs on InputOnly windows by trying to find the InputOutput window that the pointer would get visually confined to. The grabbing window and the visible window come from different clients, so we used to simply resort to the pointer focus. This is troublesome though, as the call may happen very soon at a time that the toplevel wasn't yet mapped by the Wayland compositor, so the pointer focus may well be out of date soon. In these situations, it does seem that even though the confining grab happens too early to have the wayland surface mapped, the xserver view of the WindowPtr does already reflect the size. Use this to find out the better window to assign the confining grab to, one whose geometry fully contains the InputOnly window's. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit f486e2fdaa1b252405a3aee90bd495b8b4c851f2 Author: Olivier Fourdan Date: Tue May 5 10:38:50 2020 +0200 xwayland: Remove undeeded test xwl_seat_maybe_lock_on_hidden_cursor() checks that the value of cursor_confinement_window is not NULL, yet there is no code path that could lead to this. Remove the test for cursor_confinement_window being set, it's useless. Signed-off-by: Olivier Fourdan Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit baa8d12e464664b5ad3c591be05a0087482790ca Author: Olivier Fourdan Date: Thu Apr 30 13:55:42 2020 +0200 xwayland: Lock on entering surface if needed When an X11 client issues a ConfinePointer wit ha hidden cursor, Xwayland may translate that as a pointer lock. However, if the pointer is located on another window at the time, the request may be ignored, even if the pointer later enters the window. To avoid that issue, check again if locking the pointer with a hidden cursor is needed when pointer enters a surface. Signed-off-by: Olivier Fourdan Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit 1345f804a88efc11c58f8388983d34445d3e5928 Author: Olivier Fourdan Date: Tue Mar 24 16:33:16 2020 +0100 xwayland: confine motion events to the confined window When an X11 client has an active grab on the pointer, all events are reported relative to the window with the grab. For Xwayland, if an X11 client has a grab with a pointer confinement active, while pointer focus is on another window, motion events should not be reported to the client with the grab, because that sets the X11 client appart, the events would be reported when the pointer is on any X11 window but not on Wayland native surfaces. Therefore, if the pointer is confined on a window and that window differs from the actual pointer focus window, just pretend we lost pointer focus to another window. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962 Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit 5929b789f9c6531ee257504a7be9c9e3a49b30eb Author: Olivier Fourdan Date: Tue Mar 24 16:12:38 2020 +0100 xwayland: Do not lock the pointer on the wrong window If a client issues a grab on the pointer while the cursor is on another X11 window, and then hides the cursor, we may end up locking the pointer onto that other window. Then a button click might end up moving the focus away from the window which issued the grab, leaving the whole setup in a mixed up state. Typically, if the pointer is on another X11 window, we should not try to lock the pointer, so that it can be moved back to the window which actually issues the grab (and hence the pointer confinement). Typically, this is the same as an X11 client issuing a pointer grab while the cursor is on another Wayland native window. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/962 Reviewed-by: Carlos Garnacho Reviewed-by: Peter Hutterer commit a5151f58cf98d1696d60a3577dc50851f159da8a Author: Alan Coopersmith Date: Sun May 10 17:46:33 2020 -0700 Update URL's in man pages Mostly http->https conversions, but also replaces gitweb.fd.o with gitlab.fd.o, and xquartz.macosforge.org with xquartz.org. Signed-off-by: Alan Coopersmith commit 9bf33bab32fdfbe68b287947f55906ff0ac67f04 Author: Martin Weber Date: Fri May 8 16:45:50 2020 +0200 test: Fix struct initialization warning commit 462beb5338a44390e2fff03096942b035b509830 Author: Christopher Chavez Date: Sat Apr 25 05:09:51 2020 +0000 XQuartz: recognize F16-F20 and Menu keys Signed-off-by: Christopher Chavez commit 9937183e4bd2e96154bb4724805f74341ae84bd6 Author: Alexander Volkov Date: Tue Apr 21 12:38:03 2020 +0300 Fix build with gcc 9.3.0's -Werror=alloc-size-larger-than= commit 89f42b88216c0899977dd3861cbf13c5bae321d8 Author: Alexander Volkov Date: Tue Apr 21 01:01:21 2020 +0300 gitlab-ci: Bump DEBIAN_TAG to build with gcc 9.3.0 commit 9890e91265cb58c0cddc4de3c8845d18ae6e5a77 Author: Tobias Stoeckmann Date: Sun Apr 19 15:29:43 2020 +0200 hw/xfree86: Support ACPI without APM. On systems with ACPI but disabled APM (e.g. --disable-linux-apm) the code does not compile due to preprocessor directives. If APM is disabled, the final return statement is considered to be part of ACPI's last if-statement, leading to a function which has no final return statement at all. I have refactored the code so ACPI and APM are independent of each other. Signed-off-by: Tobias Stoeckmann commit 785e59060c00129e47da6c0877604a56d7e0e32f Author: Olivier Fourdan Date: Fri Apr 24 17:45:49 2020 +0200 xwayland: Fix infinite loop at startup Mutter recently added headless tests, and when running those tests the Wayland compositor runs for a very short time. Xwayland is spawned by the Wayland compositor and upon startup will query the various Wayland protocol supported by the compositor. To do so, it will do a roundtrip to the Wayland server waiting for events it expects. If the Wayland compositor terminates before Xwayland has got the replies it expects, it will loop indefinitely calling `wl_display_roundtrip()` continuously. To avoid that issue, add a new `xwl_screen_roundtrip()` that checks for the returned value from `wl_display_roundtrip()` and fails if it is negative. Signed-off-by: Olivier Fourdan Reviewed-by: Roman Gilg Reviewed-by: Jonas Ådahl commit 2fe13a1f448ff27925f92a557f145bab9ab91a0e Author: Jon Turney Date: Fri Feb 11 16:10:36 2011 +0000 hw/xwin: Drop call to setlocale() Since we now only work with UTF-8 (or ISO8859-1) text in the clipboard, we don't need to setlocale(). commit f269e01e1a783227c88b395cf6f55dcadeb751c9 Author: Jon Turney Date: Mon Jul 2 17:25:53 2018 +0100 hw/xwin: Consistently use BOOL type from Xmd.h This avoids including Xdefs.h, which means we avoid all the issues with _XSERVER64 effecting how types are defined by that. commit 4055fed1e7933c05afe143cbd18743c1ff1c7fee Author: Jon Turney Date: Sun Jul 1 15:53:42 2018 +0100 hw/xwin: Remove XSetAuthorization() for helper clients All helper client code now uses xcb, so calling XSetAuthorization() is no longer needed. This is the last reference to libX11 from helper clients, so linking with x11-xcb and libX11 is no longer required. Also drop (unneeded?) linking with libXau. Also drop installing these prerequistes on AppvVeyor. Also move prototypes for functions in winauth.c from win.h into a new header, winauth.h, and include that where needed. commit 9e02e023b08e24d4213ca14d99612e4cf5ef2f1e Author: Jon Turney Date: Sat Jun 30 16:00:16 2018 +0100 hw/xwin: xcbify clipboard integration Convert clipboard integration code from libX11 to xcb This drops support for COMPOUND_TEXT. Presumably some ancient (pre-2000) clients exist which support that, but not UTF8_STRING, but we don't have an example to test with. (Given the nature of the thing, the users of those clients probably work in CJK languages) Supporting COMPOUND_TEXT would also involve writing (or extracting from Xlib) support for the ISO 2022 encoding. v2: Fix the length of text property set by a SelectionRequest The length of the text property is not neccessarily the same as the length of the clipboard text before it is d2u converted (specifically, if that contains any '\r\n' sequences, it will be shorter as they are now just '\n') commit f4936de73c094e35eb293f32ab470347741a4fa0 Author: Jon Turney Date: Sun Jul 1 12:11:19 2018 +0100 hw/xwin: Remove nounicodeclipboard option Always use CF_UNICODETEXT clipboard format. Windows will automatically down-convert to CF_TEXT for clients which request that. This is subtly different in one way: if CF_TEXT is requested, we now post CF_UNICODETEXT and it is converted to CF_TEXT *in the locale of the requesting process*. Previously, we would convert to CF_TEXT *in our locale* and post that. It looks like the code in the !X_HAVE_UTF8_STRING case didn't actually work correctly, but fortunately that has never been true... commit 9f51dfdec37c991173c7a580fd1c279cfe09142e Author: Jon Turney Date: Sat Jun 30 16:15:52 2018 +0100 hw/xwin: Remove support for pre-Vista Win32 clipboard API The original Win32 clipboard API is widely regarded as terrible, since it relies on clients co-operatively managing the clipboard viewer chain, and a single buggy client can break it for all other clients. The last Windows version only supporting that API was Windows XP (5.1), EOLed in 2014. (This requires MinGW-w64 w32api 6.0.0 or later for Add/RemoveClipboardListener correctly exported by the x86_64 user32 implib) commit 9a4b62798bf4bcc2828a2a485e878e7d4447d03d Author: Jon Turney Date: Fri Apr 26 02:26:44 2019 +0100 hw/xwin: Fix lingering uses of libX11 types and values commit d7010cd93a381f1fc0cc681ddb70df9371370644 Author: Jon Turney Date: Thu Nov 19 18:06:28 2015 +0000 hw/xwin: Warn about too large Windows -> X clipboard pastes XChangeProperty() requests larger than the ~16MB permitted even with BigReq will fail BadLength commit 56a91f20671402a8c6f60c40e5e4e18f7978c740 Author: Jon Turney Date: Wed Nov 18 21:27:23 2015 +0000 hw/xwin: Implement INCR protocol for X clipboard -> Windows clipboard Also, relax the timeout mechanism so it allows 1 second between events, rather than 1 second for the entire transfer, as transfers of large pastes can take more than 1 second. Also, prefer UTF8_STRING encoding to COMPOUND_TEXT encoding commit 4f95d87d66b6a6e11aa8616c9242e0907ffee66b Author: Michael Stapelberg Date: Thu Mar 26 21:53:58 2020 +0100 Xorg: honor AutoRepeat option This option was implemented before the drivers were split in ≈2006, and e.g. XWin still supports it. With this commit, Xorg regains support, so that the following configuration can be used to set the repeat rate for all keyboard devices without having to modify Xorg command-line flags or having to automate xset(1): Section "InputClass" Identifier "system-keyboard" MatchIsKeyboard "on" Option "XkbLayout" "de" Option "XkbVariant" "neo" Option "AutoRepeat" "250 30" EndSection Signed-off-by: Michael Stapelberg commit 5684d436e2b65cd0fe305460e437a2f69af29865 Author: Adam Jackson Date: Thu Apr 19 14:49:22 2018 -0400 xinput: Remove PropagateMask Initialized to a constant value, never modified, never varied by device. Signed-off-by: Adam Jackson commit 4520ec9bd54b261fa2b210e9550d76087ef06259 Author: Adam Jackson Date: Thu Apr 19 14:42:47 2018 -0400 xinput: Remove ExtExclusiveMasks Initialized to a constant value, never modified, never varied by device. Signed-off-by: Adam Jackson commit 1e29f3ea3eb63cfcb78a463ee0345ec22a013033 Author: Adam Jackson Date: Thu Mar 5 16:32:56 2020 -0500 glx: Require screens match for share contexts for classic CreateContext The GLX_ARB_create_context path (with which this should all get unified, someday, sigh) already enforces this, but the classic path does not. It's effectively assumed by the implementation anyway, so let's enforce it rather than do crashy things. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit b56e501092169a9c0a60663d832ee71898a8bc4b Author: Vasily Khoruzhick Date: Fri Mar 20 20:36:25 2020 -0700 glx: fixup symbol name for get_extensions function glxProbeDriver() concatenates __DRI_DRIVER_GET_EXTENSIONS with driver name to get symbol name for get_extension function. Unfortunately that doesn't work for drivers that have hyphen in their name, e.g. sun4i-drm -- get_extensions() for these uses underscore instead. As result dlsym() doesn't find get_extension() function and AIGLX initialization fails resulting in following message in Xorg.0.log: (EE) AIGLX error: sun4i-drm does not export required DRI extension Replace all non-alpha-numeric characters with underscore to fix the issue. Signed-off-by: Vasily Khoruzhick commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f Author: Michel Dänzer Date: Tue Mar 17 11:45:22 2020 +0100 xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window We were only calling xwl_present_unrealize_window for the toplevel window, but the list can contain entries from child windows as well, in which case we were leaving dangling pointers to freed memory. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000 Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present flips and normal updates" Reviewed-by: Olivier Fourdan Tested-by: Olivier Fourdan commit 5b9010fa6b0ab0971dddf5108d5a5046c05180b0 Author: Yuriy Vasilev Date: Fri Mar 6 20:22:19 2020 +0300 modesetting: add support for GBM_FORMAT_ARGB1555 Reviewed-by: Michel Dänzer Signed-off-by: Yuriy Vasilev commit 8315fc4ea2e04598ce0c7e9771786a9334f0d456 Author: Yuriy Vasilev Date: Thu Mar 5 17:02:26 2020 +0300 modesetting: add support for GBM_FORMAT_RGB565 This allow x-server to run with -depth 16. Reviewed-by: Michel Dänzer Signed-off-by: Yuriy Vasilev commit 3d6efc4aaff80301c0b10b7b6ba297eb5e54c1a0 Author: mntmn Date: Sat Feb 22 17:25:15 2020 +0100 xwayland: port rooted xwayland from wl_shell to xdg-shell protocol Recently, rooted Xwayland crashes on wlroots-based compositors, because wlroots removed the deprecated wl_shell protocol. This MR fixes this by changing the code in question to the xdg-shell protocol. My motivation do this: on etnaviv-based embedded platforms, rooted Xwayland is much faster and doesn't cause UI rendering bugs compared to rootless Xwayland. Signed-off-by: Lukas F. Hartmann commit de940e06f8733d87bbb857aef85d830053442cfe Author: Peter Harris Date: Thu Nov 14 14:06:21 2019 -0500 xkb: fix key type index check in _XkbSetMapChecks This code block was moved from a function that returns 0 for failure to a function that returns 0 for Success in commit 649293f6b634e6305b6737a841d6e9d0f0065d6c. Change the return value to BadValue to match the other checks in _XkbSetMapChecks. Set nTypes to xkb->map->num_types when XkbKeyTypesMask is not set, to allow requests with the XkbKeyTypesMask flag unset in stuff->present to succeed. Fixes a potential heap smash when client->swapped is true, because the remainder of the request will not be swapped after "return 0", but _XkbSetMap will be called anyway (because 0 is Success). Signed-off-by: Peter Harris commit 270e439739e023463e7e0719a4eede69d45f7a3f Author: Peter Harris Date: Thu Nov 14 14:00:31 2019 -0500 xkb: only swap once in XkbSetMap The server swaps part of the request in _XkbSetMapChecks instead of SProcXkbSetMap (presumably because walking the XkbSetMap request is hard, and we don't want to maintain another copy of that code). Swap the first time _XkbSetMapChecks is called, not the second time. Signed-off-by: Peter Harris commit d4faab8708779df265239b203ed5f020bff681bf Author: Hans de Goede Date: Mon Nov 4 15:01:18 2019 +0100 xwayland: Remove unnecessary xwl_window_is_toplevel() check from xwl_output_set_window_randr_emu_props() Since the recent fix to call xwl_output_set_window_randr_emu_props() from ensure_surface_for_window(), it is now only called on a toplevel window, so the is-toplevel check is not necessary for the xwl_output_set_window_randr_emu_props() case. This commit moves the check to xwl_output_set_randr_emu_prop_callback() so that we only do it when we are walking over all Windows of a client to update the property on a change of the emulated resolution. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 148f428dfccf606b932a00d5a00af06e8dca8a7e Author: Hans de Goede Date: Mon Nov 4 14:32:29 2019 +0100 xwayland: Fix setting of _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop on new windows For window-manager managed windows, xwl_realize_window is only called for the window-manager's decoration window and not for the actual client window on which we should set the _XWAYLAND_RANDR_EMU_MONITOR_RECTS prop. Usualy this is not a problem since we walk all client windows to update the property when the resolution is changed through a randr call. But for apps which first do the randr change and only then create their window this does not work, and our xwl_output_set_window_randr_emu_props call in xwl_realize_window is a no-op as that is only called for the wm decoration window and not for the actual client's window. This commit fixes this by making ensure_surface_for_window() call xwl_output_set_window_randr_emu_props on the first and only child of window-manager managed windows. Note this also removes the non-functional xwl_output_set_window_randr_emu_props call from xwl_realize_window, which was intended to do this, but does not work. This fixes apps using the ogre3d library always running at the monitors native resolution. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 4cfc2677f5c82ca5db0919de549b9b077f1ba113 Author: Hans de Goede Date: Mon Nov 4 11:46:49 2019 +0100 xwayland: Call xwl_window_check_resolution_change_emulation() on newly created O-R windows Some clients, which use vidmode to change the resolution when going fullscreen, create an override-redirect window and never trigger the screen->ResizeWindow callback we rely on to do the xwl_window_check_resolution_change_emulation(). This causes us to not apply a viewport to them, causing the fullscreen window to not fill the entire monitor. This commit adds a call to xwl_window_check_resolution_change_emulation() at the end of ensure_surface_for_window() to fix this. Note that ensure_surface_for_window() exits early without creating an xwl_window for new windows which will not be backed by a wayland surface and which thus will not have an xwl_window. This fixes ClanLib-0.6.x and alleggl-4.4.x using apps not properly fullscreening. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 88342353de45e64f408c38bb10cd1506ba0f159a Author: Hans de Goede Date: Mon Oct 7 14:27:49 2019 +0200 xwayland: Fix emulated modes not being removed when screen rotation is used The code building the mode-list does the following to deal with screen rotation: if (need_rotate || xwl_output->rotation & (RR_Rotate_0 | RR_Rotate_180)) { mode_width = xwl_output->width; mode_height = xwl_output->height; } else { mode_width = xwl_output->height; mode_height = xwl_output->width; } This means we need to do something similar in xwl_output_set_emulated_mode() to determine if the mode being set is the actual (not-emulated) output mode and we this should remove any emulated modes set by the client. All callers of xwl_output_set_emulated_mode always pass a mode pointer to a member of xwl_output->randr_output->modes, so we do not need to duplicate this code, instead we can simply check that the passed in mode is modes[0] which always is the actual output mode. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 10df0437a2b142e61c4d84ffffa9592ac6846ef1 Author: Hans de Goede Date: Thu Jan 9 11:00:36 2020 +0100 xwayland: Also hook screen's MoveWindow method Not only hook the ResizeWindow method of the screen (which really is MoveAndResize) but also hook the MoveWindow method for checking if we need to setup a viewport for resolution change emulation. Our resolution change emulation check if the windows origin matches the monitors origin and the windows origin can also be changed by just a move without being resized. Also checking on a move becomes esp. important when we move to checking on changes to the top-level non-window-manager client (X11)Window instead of on changes to the xwl_window later on in this patch series. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 4fc107460a349a1a46f0e5251e6fd2a31f4c0428 Author: Hans de Goede Date: Wed Jan 15 14:36:45 2020 +0100 xwayland: Also check resolution-change-emulation when the xwl_window itself moves The recent change to use the top-level non-window-manager Window drawable coordinates from xwl_window_check_resolution_change_emulation() in combination with only calling it on a resize when the top-level window is moved breaks things with mutter/gnome-shell. When fullscreening a X11 window, mutter moves its window-decoration Window wrapping the top-level Window to the monitor's origin coordinates (e.g. 0x0) last. This updates the top-level's drawable coordinates, but as the actual MoveWindow is called on the wrapper Window and not on the toplevel we do not call xwl_window_check_resolution_change_emulation() and we never enable the viewport. This commit fixes this by also calling xwl_window_check_resolution_change_emulation() if the Window being moved is an xwl_window itself. Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 6d98f840da6dfcf2a69e03a1b3fa0bf602ba1f27 Author: Roman Gilg Date: Fri Jan 3 17:55:28 2020 +0100 xwayland: Check emulation on client toplevel resize When a reparented window is resized directly check the emulation instead of doing this only when the window manager parent window is resized, what might never happen. For that to work we need to make sure that we compare the current size of the client toplevel when looking for an emulated mode. Changes by Hans de Goede: - Remove xwl_window x, y, width and height members as those are no longer used. - Add check for xwl_window_from_window() returning NULL. Signed-off-by: Roman Gilg Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 060f10062eb1761515b762b46cba56c7a53db72c Author: Roman Gilg Date: Wed Jan 15 10:07:58 2020 +0100 xwayland: Make window_get_none_wm_owner return a Window instead of a Client Make window_get_none_wm_owner return the first non-wm-window instead of the owner (client) of the first non-wm-window and rename it to window_get_client_toplevel to match its new behavior. This is a preparation patch for switching to using the drawable coordinates in xwl_window_should_enable_viewport() Changes by Hans de Goede: - Split this change out into a separate patch for easier reviewing - Rename window_get_none_wm_owner to window_get_client_toplevel to match its new behavior Signed-off-by: Roman Gilg Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit a69f7fbb54efc8ffad320c8afd23cb41fc9edc27 Author: Roman Gilg Date: Fri Jan 3 17:27:28 2020 +0100 xwayland: Recurse on finding the none-wm owner An X11 window manager might add a chain of parent windows when reparenting to a decoration window. That is for example the case for KWin, which reparents client windows to one decoration and another wrapper parent window. Account for that by a recursion into the tree. For now assume as before that all X11 window managers reparent with one child only for these parent windows. Changes by Hans de Goede: - Move the xwl_window_is_toplevel() from a later patch in this series here as it really belongs together with these changes - Drop no longer necessary xwl_window argument from window_get_none_wm_owner parameters Signed-off-by: Roman Gilg Reviewed-by: Hans de Goede Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 948e02872feb641a176b3af82b6ef1201c97bb16 Author: Roman Gilg Date: Fri Jan 3 17:12:14 2020 +0100 xwayland: Reuse viewport instead of recreating When a viewport is already created we can reuse this object instead of destroying it and getting a new one for updating the source rectangle and destination size. Signed-off-by: Roman Gilg Reviewed-by: Hans de Goede Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit ded89300c1dd541f59fe6e93c5c69d7fe7088244 Author: Hans de Goede Date: Mon Jan 27 11:08:00 2020 +0100 xwayland: Cache client-id for the window-manager client Instead of iterating over all clients which are listening for events on the root window and checking if the client we are dealing with is the one listening for SubstructureRedirectMask | ResizeRedirectMask events and thus is the window-manager, cache the client-id of the window-manager in xwl_screen and use that when checking if a client is the window-manager. Note that we cache and compare the client-id rather then the ClienPtr, this saves reading the ClientPtr from the global clients array when doing the comparison. Suggested-by: Olivier Fourdan Acked-by: Olivier Fourdan Signed-off-by: Hans de Goede commit 1e44861aba449eec81d69b1da3a6e6f88676e04f Author: Roman Gilg Date: Mon May 27 23:01:53 2019 +0200 present: Rename window_msc variable in present function The value is not the current msc of the window, but the target value the client sets independently of the window speicific msc offset. Make this clearer. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit d3c1b223cec2b475c4f1661d7e5dc5238d08d8f6 Author: Roman Gilg Date: Mon May 27 22:58:49 2019 +0200 present: Move scmd-update-window-crtc function Move the code portion down. That way it is at a similar position as in the window mode file. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 8c2dcc5f800438d2b4545d21a515e013e6aac484 Author: Roman Gilg Date: Mon May 27 22:49:23 2019 +0200 present: Code cleanup of window to crtc timings update Make the code more readable by going through some logical abort conditions. Also make the function only about updating the crtc msc value and not about also returning the next target msc. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 4d89ba0058457d51f2e1a132c0b7fc8a3ec5c76d Author: Roman Gilg Date: Mon May 27 22:42:34 2019 +0200 present: Unfold and annotate the target-msc getter Unfold and extensively annotate the target-msc adjustment function, to make it easier to understand what's happening and why. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 99e55f1b955e2db442184756fcd8b95791fd71de Author: Roman Gilg Date: Mon May 27 22:32:22 2019 +0200 present: Adjust timings with value arguments We can use value arguments instead of pointers when adjusting the timings by returning the adjusted value. This improves the readability. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit 4709d24f8e3ef5ee79085b77401eaacd7e1690c7 Author: Olivier Fourdan Date: Fri Feb 14 15:20:59 2020 +0100 xwayland: Add version command line option Xorg supports the '-version' command line option, add something similar to Xwayland. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/976 Signed-off-by: Olivier Fourdan Reviewed-by: Jonas Ådahl Reviewed-by: Michel Dänzer commit ee9f6e20de1408d572dc1eba33f3d2a8501d7da5 Author: Adam Jackson Date: Tue Aug 27 18:10:38 2019 -0400 meson: Add support for libunwind commit 42aaf37241fedfd6a0f72b255f2d45d6ea34d8c6 Author: Zoltán Böszörményi Date: Wed Feb 12 21:29:52 2020 +0000 Fix modesetting device matching through kmsdev device path xf86platformProbeDev didn't check the device path, fix it. This is a problem when trying to set up a non-PCI device via explicit xorg.conf.d configuration. An USB DisplayLink device, being non-PCI was always set up as a GPU device assigned to screen 0 instead of a regular framebuffer, potentially having its own dedicated screen, despite such configuration as below. Only the relevant parts of the configuration are quoted, it's part of a larger context with an Intel chip that has 3 outputs: * DP1 connected to an LCD panel, * VGA1 connected to an external monitor, * HDMI1 unconnected and having no user visible connector Section "ServerFlags" Option "AutoBindGPU" "false" EndSection ... Section "Device" Identifier "Intel2" Driver "intel" BusID "PCI:0:2:0" Screen 2 Option "Monitor-HDMI1" "HDMI1" Option "ZaphodHeads" "HDMI1" EndSection Section "Device" Identifier "UDL" Driver "modesetting" Option "kmsdev" "/dev/dri/card0" #BusID "usb:0:1.2:1.0" Option "Monitor-DVI-I-1" "DVI-I-1" Option "ShadowFB" "on" Option "DoubleShadow" "on" EndSection ... Section "Screen" Identifier "SCREEN2" Option "AutoServerLayout" "on" Device "UDL" GPUDevice "Intel2" Monitor "Monitor-DVI-I-1" SubSection "Display" Modes "1024x768" Depth 24 EndSubSection EndSection Section "ServerLayout" Identifier "LAYOUT" Option "AutoServerLayout" "on" Screen 0 "SCREEN" Screen 1 "SCREEN1" RightOf "SCREEN" Screen 2 "SCREEN2" RightOf "SCREEN1" EndSection On the particular machine I was trying to set up an UDL device, I found the following structure was being used to match the device to a platform device while I was debugging the issue: xf86_platform_devices[0] == Intel, /dev/dri/card1, primary platform device xf86_platform_devices[1] == UDL, /dev/dri/card0 devList[0] == "Intel0", ZaphodHeads: DP1 devList[1] == "Intel1", ZaphodHeads: VGA1 devList[2] == "UDL" devList[3] == "Intel2", ZaphodHeads: HDMI1 (intended GPU device to UDL) When xf86platformProbeDev() matched the UDL device, the BusID check failed in both cases of: * BusID "usb:0:1.2:1.0" was specified * Option "kmsdev" "/dev/dri/card0" was specified As a result, xf86platformProbeDev() went on to call probeSingleDevice() with xf86_platform_devices[0] and devList[2], resulting in the UDL device being set up as a GPU device assigned to the first screen instead of as a framebuffer on the third screen as the configuration specified. Checking Option "kmsdev" in code code may be a layering violation. But the modesetting driver is actually part of the Xorg sources instead of being an external driver, so he "kmsdev" path knowledge may be used here. Signed-off-by: Böszörményi Zoltán commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a Author: Michel Dänzer Date: Fri Feb 7 12:15:07 2020 +0100 xwayland: Call glamor_block_handler from xwl_screen_post_damage In between the two phases introduced by the previous change. This makes sure all pending drawing to the new buffers is flushed before they're committed to the Wayland server. commit f88d9b1f779835302e02e255fcd45989db7f488d Author: Michel Dänzer Date: Fri Feb 7 12:06:39 2020 +0100 xwayland: Split up xwl_screen_post_damage into two phases The first phase sets the new surface properties for all damaged windows, then the second phase commits all surface updates. This is preparatory for the next change, there should be no observable change in behaviour (other than the order of Wayland protocol requests). Reviewed-by: Adam Jackson commit 7b33c2d3f31fe03f88cc26f08590f2baf1a6ef36 Author: Michel Dänzer Date: Thu Feb 6 18:45:19 2020 +0100 Revert "xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook" This reverts commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15. To be replaced with a better solution. Reviewed-by: Adam Jackson commit 1310346d6052c91910f526cbdcc81061fe6abd94 Author: Michel Dänzer Date: Mon Feb 10 18:48:05 2020 +0100 gitlab-ci: Add meson build job with glamor disabled To prevent breakage with glamor disabled from creeping in again. Reviewed-by: Adam Jackson commit 72ccd7f540a36185ecdb62324c68496fb57e65fe Author: Michel Dänzer Date: Mon Feb 10 18:44:11 2020 +0100 gitlab-ci: Drop "-build-and-test" job name suffix It's long and kind of redundant. Reviewed-by: Adam Jackson commit 49553049e871d03e9e26672843de8712d20f688a Author: Michel Dänzer Date: Mon Feb 10 18:57:42 2020 +0100 modesetting: Remove local variable only used with glamor enabled Resulted in a build failure with -Werror: ../hw/xfree86/drivers/modesetting/drmmode_display.c: In function ‘drmmode_crtc_set_mode’: ../hw/xfree86/drivers/modesetting/drmmode_display.c:759:15: error: unused variable ‘screen’ [-Werror=unused-variable] 759 | ScreenPtr screen = crtc->scrn->pScreen; | ^~~~~~ Fixes: c66c548eabf0 "modesetting: Call glamor_finish from drmmode_crtc_set_mode" Reviewed-by: Adam Jackson commit 0cb9fa7949d6c5398de220fbdbe1e262e943fcbb Author: Michel Dänzer Date: Mon Feb 10 18:41:44 2020 +0100 modesetting: Fix build with glamor disabled Fixes: cb1b1e184723 "modesetting: Indirect the glamor API through LoaderSymbol" Reviewed-by: Adam Jackson commit bfb36a5806196e257958907bfcdd71c24acc5d37 Author: Pekka Paalanen Date: Mon Feb 10 16:07:41 2020 +0100 randr: auto-bind of GPU is a config change When a GPU is auto-bound adding more outputs to a screen, that needs to count as a configuration change on that screen so that a WM listening for RRScreenChangeNotify gets notified and handles it as a hotplug. This is particularly for cases where the outputs are already connected. Otherwise nothing might happen. Issue #909 describes a real world case where plugging in a DisplayLink dock with a monitor already connected is sometimes left inactive by GNOME. That issue is a race, and requires adding a sleep(5); as the first thing in NewGPUDeviceRequest() to reproduce reliably. With the sleep, the monitor in the dock will never activate automatically. Add this fix over the sleep, and the issue is gone. This fix was originally developed on a branch replicating Ubuntu 19.04 patch set based on xserver 1.20.4. Testing on master branch was impossible due to xorg/xserver#910. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/909 Signed-off-by: Pekka Paalanen Reviewed-by: Michel Dänzer commit 3aa754c3637694a2a3083b8fd9fba0bc862b1a67 Author: David Seifert Date: Wed Feb 5 11:32:24 2020 +0100 Always use `-fno-common` in CI * This prevents issues from creeping back in at a later stage. commit 1cfdd1a96580733df3625bcea3384ffee3dc92df Author: Dave Airlie Date: Tue Feb 4 16:02:06 2020 +1000 modesetting: remove unnecessary error message, fix zaphod leases I introduced this error with the MST hotplug code, but it can trigger on zaphod setups, and is perfectly fine. There is no support for MST/hotplug on zaphod setups currently, so we can just skip over the dynamic connector handling here. However we shouldn't skip over the lease handling so move it into the codepath. Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support (MST) (v3)") Reviewed-by: Michel Dänzer Signed-off-by: Dave Airlie commit 9e85aa9c1fbf51ef00674e3a91aded4083a14a15 Author: Michel Dänzer Date: Thu Jan 30 12:29:03 2020 +0100 xwayland/glamor-gbm: Add xwl_glamor_gbm_post_damage hook It flushes any pending drawing to the kernel, to make sure it'll be visible to the Wayland server. Without this, it was possible for the Wayland server to process surface commits before Xwayland got around to flushing the corresponding drawing, which could result in stale or even completely random window contents being visible. v2: * Make EGL backend post_damage hook mandatory, don't check for NULL in xwl_glamor_post_damage. (Olivier Fourdan) Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Reviewed-by: Olivier Fourdan commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2 Author: Michel Dänzer Date: Mon Jan 27 17:47:10 2020 +0100 xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL Avoids a crash in xf86RotatePrepare -> DamageRegister during CreateScreenResources if rotation or another transform is configured for any connected RandR output in xorg.conf. The generic rotation/transform code generally can't work without the root window currently. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969 Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate" Acked-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 578371616e09364318c9fb2371a693d438b31b29 Author: Daniel Llewellyn Date: Wed Jan 29 21:33:24 2020 +0000 os: Ignore dying client in ResetCurrentRequest You might as well, it's harmless. Better, some cleanup code (like DRI2 swap wait) needs to run both normally and at client exit, so it simplifies the callers to not need to check first. See 4308f5d3 for a similar example. Props: @ajax (Adam Jackson) Fixes: xorg/xserver#211 Signed-off-by: Daniel Llewellyn commit b6a5389e1789d63c6c61983b973b8559953afc88 Author: Michel Dänzer Date: Tue Jan 28 18:39:10 2020 +0100 gitlab-ci: Enable -Werror in the meson build job There are no warnings left, so let's prevent new ones from creeping back in. commit 794fd7e563ca9430a4a29a8e9f1923c07c23a480 Author: Michel Dänzer Date: Tue Jan 28 18:35:45 2020 +0100 tests/misc: Drop redundant screenInfo declaration GCC warned about it: ../test/misc.c:36:19: warning: redundant redeclaration of ‘screenInfo’ [-Wredundant-decls] 36 | extern ScreenInfo screenInfo; | ^~~~~~~~~~ In file included from ../test/misc.c:30: ../include/scrnintstr.h:688:29: note: previous declaration of ‘screenInfo’ was here 688 | extern _X_EXPORT ScreenInfo screenInfo; | ^~~~~~~~~~ commit 4287604425e7ff905036541829896d1ddf7c65d0 Author: Michel Dänzer Date: Tue Jan 28 18:31:13 2020 +0100 Xephyr: Cast "red" to char* for xcb_aux_parse_color xcb_aux_parse_color takes a non-const pointer, even though it doesn't modify the string or take ownership of its memory. Avoids the following warning from GCC: ../hw/kdrive/ephyr/hostx.c: In function ‘hostx_init’: ../hw/kdrive/ephyr/hostx.c:683:30: warning: passing argument 1 of ‘xcb_aux_parse_color’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 683 | if (!xcb_aux_parse_color("red", &red, &green, &blue)) { | ^~~~~ In file included from ../hw/kdrive/ephyr/hostx.c:50: /usr/include/xcb/xcb_aux.h:194:27: note: expected ‘char *’ but argument is of type ‘const char *’ 194 | xcb_aux_parse_color(char *color_name, | ~~~~~~^~~~~~~~~~ commit 65387391a551fff6fec808d48b9bf4b6181cb050 Author: Michel Dänzer Date: Tue Jan 28 18:22:45 2020 +0100 loader: strdup const string assigned to local variable name There's a free(name) at the end of the function. GCC warned about this: ../hw/xfree86/loader/loadmod.c: In function ‘LoadModule’: ../hw/xfree86/loader/loadmod.c:702:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 702 | m = name = "int10"; | ^ commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27 Author: Adam Jackson Date: Tue Jan 28 13:26:41 2020 -0500 Revert "dri2: Don't make reference to noClientException" It's true that the value would always be -1, if it's not zero, but it's usually zero is the problem. As a result we return failure from otherwise successful indirect GLX paths, which isn't very nice of us. This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd. Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211 commit 435d41d5ffe5467f43225b59411ca9f9a05c10a6 Author: David Seifert Date: Fri Jan 24 12:49:44 2020 +0100 Fix building with `-fno-common` * GCC 10 will switch the default to `-fno-common`. https://gcc.gnu.org/PR85678 Bug: https://bugs.gentoo.org/705880 Signed-off-by: Matt Turner commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564 Author: George Matsumura Date: Thu Dec 26 23:01:26 2019 +0000 Restrict 1x1 pixmap filling optimization to GXcopy This restricts an optimization whereby the filling of 1x1 pixmaps went around the driver-provided function to cases where the source color is meant to be directly copied to the destination, as opposed to other operations which should produce different destination values than just the foreground color. Signed-off-by: George Matsumura Reviewed-by: Michel Dänzer commit 0839b0523a01067cb9c9b53ebdd9ce4c00f0eb12 Author: E5ten Date: Wed Jan 15 17:36:06 2020 +0000 meson: add prefix to serverconfigdir fixes #853 commit a24a786fc8490fda08b15c3dab6fa6750f008ecb Author: Michel Dänzer Date: Tue Jan 14 09:23:34 2020 +0100 modesetting: Explicitly #include "mi.h" For the miClearDrawable prototype. Apparently it doesn't get pulled in for some build configurations, breaking the build. Reviewed-by: Kenneth Graunke commit 25ca99df38a2c28c25ab20a917e68442285f2353 Author: Kenneth Graunke Date: Mon Jan 13 23:34:49 2020 -0800 configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson build but neglected to add it to autotools. v2: Also update dix-config.h.in Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver") Reviewed-by: Michel Dänzer [v1] Reviewed-by: Eric Engestrom [v1] Reviewed-by: Matt Turner commit 49456e0a37fac7bc9d1f01bc1519fb0d699956db Author: Fabrice Fontaine Date: Fri Dec 27 23:33:37 2019 +0100 hw/xfree86/common/xf86Init.c: fix build without glx Since commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b, an include on glxvndabi.h has been added to hw/xfree86/common/xf86Init.c However, if glx is disabled through --disable-glx and GLX headers are not installed in the build's environment, build fails on: In file included from xf86Init.c:81: ../../../include/glxvndabi.h:64:10: fatal error: GL/glxproto.h: No such file or directory 64 | #include | ^~~~~~~~~~~~~~~ Fix this failure by removing this include which does not seem to be needed (an other option would have been to keep it under an ifdef GLXEXT block) Fixes: - http://autobuild.buildroot.org/results/de838a843f97673d1381a55fd4e9b07164693913 Signed-off-by: Fabrice Fontaine commit 26004df63c25061586a967f3586795a75280acc2 Author: Lubomir Rintel Date: Wed Dec 25 18:54:03 2019 +0100 glamor_egl: Reject OpenGL < 2.1 early on The Etnaviv driver on GC2000 reports desktop OpenGL 1.3 but also OpenGL ES 2.0. However, with the modesetting driver, GLES2 never gets a chance: [ 11233.393] Require OpenGL version 2.1 or later. [ 11233.393] (EE) modeset(0): Failed to initialize glamor at ScreenInit() time. [ 11233.393] (EE) Fatal server error: [ 11233.395] (EE) AddScreen/ScreenInit failed for driver 0 Let's reject old desktop GL early on, just like XWayland seems to do. This is perhaps a slightly bit more complicated that one would expect, since we need to call eglMakeCurrent() before we query the GL version. Signed-off-by: Lubomir Rintel commit 98bfee6a1b901a6f886d74dcc9fd3cbb68838375 Author: Michel Dänzer Date: Mon Dec 23 09:26:17 2019 +0100 xwayland: Include xwayland-window.h from xwayland-glamor-eglstream.c Fixes build failure. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/954 Fixes: 89e32d00f6e0 "xwayland: Move Xwayland windows to its own sources" Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit e914fb16adcab8807a280450d5cdfff4bbdce96b Author: Michel Dänzer Date: Mon Dec 23 09:53:26 2019 +0100 gitlab-ci: Install libnvidia-egl-wayland-dev package In order to build-test the Xwayland eglstream code. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit a52122c7f2697361f53e82ac384ff3f4eba24c76 Author: Michel Dänzer Date: Mon Dec 23 09:32:07 2019 +0100 gitlab-ci: Use sorted lists of distro packages, one per line This will make it easier to review changes. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 37a64ede3b545cda9edde65c65c02054d2da43cb Author: Michel Dänzer Date: Mon Dec 23 09:51:43 2019 +0100 gitlab-ci: Strip down docker image contents more Making the image significantly smaller. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 23b72d8e4b624ffd81a35e3b62be2430051a6ffa Author: Michel Dänzer Date: Mon Dec 23 09:35:09 2019 +0100 gitlab-ci: Use -j4 instead of -j$(proc) The shared GitLab CI runners are configured for jobs making use of up to 4 CPU cores, attempting to use more may overload them. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 9107a610deb130d0e4ddee92d6ca9a08a8e103f3 Author: Michel Dänzer Date: Mon Dec 23 10:41:32 2019 +0100 gitlab-ci: Use host-mapped directory for ccache Same as done in Mesa. Reviewed-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 4226c6d0329df440551b7b91ae573a82c64a1ac9 Author: Aaron Plattner Date: Thu Dec 26 13:40:17 2019 -0800 modesetting: Check whether RandR was initialized before calling rrGetScrPriv Calling rrGetScrPriv when RandR isn't initialized causes an assertion failure that aborts the server: Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed. Thread 1 "Xorg" received signal SIGABRT, Aborted. 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 (gdb) bt #0 0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff7892897 in abort () from /usr/lib/libc.so.6 #2 0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6 #3 0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:121 #5 0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:136 #6 0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 ) at ../include/privates.h:166 #7 0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335 #8 0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744 #9 0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214 #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34 This can happen, for example, if the server is configured with Xinerama and there is more than one X screen: Section "ServerLayout" Identifier "crash" Screen 0 "modesetting" Screen 1 "dummy" RightOf "modesetting" Option "Xinerama" EndSection Section "Device" Identifier "modesetting" Driver "modesetting" EndSection Section "Screen" Identifier "modesetting" Device "modesetting" EndSection Section "Device" Identifier "dummy" Driver "dummy" EndSection Section "Screen" Identifier "dummy" Device "dummy" EndSection The problem does not reproduce if there is only one X screen because of this code in xf86RandR12Init: #ifdef PANORAMIX /* XXX disable RandR when using Xinerama */ if (!noPanoramiXExtension) { if (xf86NumScreens == 1) noPanoramiXExtension = TRUE; else return TRUE; } #endif Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu driver does: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388 Signed-off-by: Aaron Plattner Reviewed-by: Michel Dänzer commit b1ee4036bfd59dfd506ed8312b63edffc913b1c1 Author: Michel Dänzer Date: Mon Dec 23 10:06:25 2019 +0100 gitlab-ci: Mark jobs as interruptible Allowing redundant pipelines to be automatically cancelled. commit 1e9c63beddb3010bb1f6eb96679410ca0aca037e Author: Michel Dänzer Date: Mon Dec 23 10:03:20 2019 +0100 gitlab-ci: Turn .retry YAML anchor into .ci-run-policy template To match Mesa. commit 456dff1bf890459840718339279dcb84d36531eb Author: Alex Goins Date: Thu Dec 12 20:18:53 2019 -0600 modesetting: Fix msSharePixmapBacking Segfault Regression Commit cb1b1e184 modified msSharePixmapBacking() to derive modesettingPtr from the 'screen' argument. Unfortunately, the name of the argument is misleading -- the screen is the slave screen. If the master is modesetting, and the slave is not modesetting, it will segfault. To fix the problem, this change derives modesettingPtr from ppix->drawable.pScreen. This method is already used when calling ms->glamor.shareable_fd_from_pixmap() later in the function. To avoid future issues, this change also renames the 'screen' argument to 'slave'. Signed-off-by: Alex Goins Reviewed-by: Michel Dänzer commit 58155baeac494c95a45d99d44dd9307e8aedd2af Author: Olivier Fourdan Date: Wed Dec 18 15:00:11 2019 +0100 xwayland: Cleanup and remove `xwayland.h` Now that each source and header should be in order, we can safely cleaup the last remaining bits from the main `xwayland.h` which is not needed anymore and can be removed. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit c830bd847fa5b60db95dcbb54dde3868f2a31a9a Author: Olivier Fourdan Date: Wed Dec 18 10:33:16 2019 +0100 xwayland: Remove `MODIFIER_META` definition It's nowhere to be used. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4c644fd792e642fc566f7b0b08bc000ecf641a50 Author: Olivier Fourdan Date: Wed Dec 18 14:13:34 2019 +0100 xwayland: Move Xwayland GLX declaration Move the Xwayland GLX declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 808a0a038b945171e0c6e18093fe1b9daeafe26a Author: Olivier Fourdan Date: Wed Dec 18 11:18:22 2019 +0100 xwayland: Move Xwayland vidmode declaration Move the Xwayland vidmode declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit e8ba8a94e120abf78886ca809f0bf01e7258367c Author: Olivier Fourdan Date: Wed Dec 18 10:56:34 2019 +0100 xwayland: Move Xwayland CVT declaration Move the Xwayland CVT declaration to its own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0617c635fa3577965c5fa198ed4e57da8fee919d Author: Olivier Fourdan Date: Wed Dec 18 10:03:43 2019 +0100 xwayland: Separate Xwayland screen code Move Xwayland screen related code to a separate source file and header. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 211609a9387a5fb0df83ef6ddea59ef817ea2f59 Author: Olivier Fourdan Date: Wed Dec 18 10:45:17 2019 +0100 xwayland: Move Xwayland cursor declarations Move the Xwayland cursor declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit aaeeb10b74920110c36efe069a47722bda5063dd Author: Olivier Fourdan Date: Tue Dec 17 18:02:17 2019 +0100 xwayland: Move Xwayland output declarations Move the Xwayland output declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 091b24f13e3a9cf46f1c55ba0ba3f35e0bb41a59 Author: Olivier Fourdan Date: Tue Dec 17 17:40:21 2019 +0100 xwayland: Move Xwayland input declarations Move the Xwayland input declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit e23d2223d89ee9ae7977b028f2a6522707e921d6 Author: Olivier Fourdan Date: Tue Dec 17 17:18:11 2019 +0100 xwayland: Move Xwayland present declarations Move the Xwayland Present declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit d780bdc2fdaeb94b873a9b6dd05a3ab636840ce7 Author: Olivier Fourdan Date: Tue Dec 17 17:07:58 2019 +0100 xwayland: Separate Xwayland pixmap code Move Xwayland generic pixmap code to a separate source file and header. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 89e32d00f6e03fcdab267bfd9f0b0c5c2747d380 Author: Olivier Fourdan Date: Tue Dec 17 15:07:07 2019 +0100 xwayland: Move Xwayland windows to its own sources Over time, Xwayland main source file `xwayland.c` has grown in size which makes it look cluttered and harder to read. Move the code dealing with Xwayland window to its own source and header files. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 3a59650ba74e9d97473fa39269fdb74ad7e1cd43 Author: Olivier Fourdan Date: Mon Dec 16 17:23:30 2019 +0100 xwayland: Move GLAMOR declarations to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the GLAMOR relevant declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 177c8a230232d114cdbe1650bd22a396d182f5f8 Author: Olivier Fourdan Date: Mon Dec 16 17:07:02 2019 +0100 xwayland: Move SHM declarations to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the SHM relevant declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit c20e61fddc8c2b8838533f23f54c1c5acea3e05f Author: Olivier Fourdan Date: Tue Dec 17 08:48:51 2019 +0100 xwayland: Move Xwayland structures to their own header Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the Xwayland structures declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 5bfca0038e92d61e58d4dc1a54748faef8273023 Author: Michel Dänzer Date: Wed Dec 18 18:18:50 2019 +0100 glamor: Only use dual blending with GLSL >= 1.30 It can't be used with older GLSL. Fixes a crash when attempting to anyway. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97 Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass." Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 846e81ecb83f30b555ce71a32cd6965d7b9939a5 Author: Michel Dänzer Date: Tue Dec 17 18:39:17 2019 +0100 xwayland: Create duplicate TrueColor GLXFBConfigs for Composite Similar to what is done in Xorg. Not doing this prevented apps from using GLX with a Composite visual, e.g. Firefox WebRender or Chromium. v2: * Fix inverted direct_color test, fixes Chromium as well. * Drop Composite extension guards, since other Xwayland code calls compRedirectWindow/compUnredirectWindow unconditionally anyway. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/921 Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider" Reviewed-by: Adam Jackson # v1 commit 02e7a497ceacef490921a8ae7115cd9f28a66dec Author: Michel Dänzer Date: Tue Dec 17 18:43:07 2019 +0100 xwayland: Fix duplicate "direct_color" comment to say "double_buffer" Fixes: 8469241592b94b "xwayland: Add EGL-backed GLX provider" Reviewed-by: Adam Jackson commit 9b31358c52e951883bf7c01c953a9da080542244 Author: Michel Dänzer Date: Wed Nov 27 18:56:05 2019 +0100 xwayland: Use frame callbacks for Present vblank events Instead of only the fallback timer. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854 v2: * Drop unused frame_callback member of struct xwl_present_window (Olivier Fourdan) Reviewed-by: Olivier Fourdan commit c5067feaeea115761f0a72f37407c6e5e943d1a1 Author: Michel Dänzer Date: Wed Nov 27 18:04:06 2019 +0100 xwayland: Use single frame callback for Present flips and normal updates Using a list of Present windows that need to be called back. This prepares for the following change, there should be no change in observed behaviour. v2: * Use xwl_window_create_frame_callback instead of making the frame_listener struct non-static (Olivier Fourdan) Reviewed-by: Olivier Fourdan commit f80eea0529b2cfb805a9c7d4994a4235451131e3 Author: Michel Dänzer Date: Fri Dec 13 18:26:35 2019 +0100 xwayland: Add xwl_window_create_frame_callback helper This will be used by the following changes. No functional change intended. Reviewed-by: Olivier Fourdan commit 46e5236bbe0ca90f1c2a480c54d3f729d4930dfb Author: Olivier Fourdan Date: Thu Dec 12 13:50:16 2019 +0100 xwayland: Take border width into account Damage coordinates are relative to the drawable, (0,0) being the top left corner inside the border. Therefore, when applying damages or accumulating damages between window buffers, we need to take the window border width into account as well, otherwise the updates might be only partial or misplaced. Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 1cb886bc2a3e556b15779300350ec8867b4f907e Author: Olivier Fourdan Date: Fri Dec 13 11:10:03 2019 +0100 xwayland: Recycle window buffers when setting pixmap Right now, we would recycle the window buffers whenever the window the window is resized. This, however, is not sufficient to guarantee that the buffers are up to date, since changing the window border width for example would not trigger a `WindowResize` (the border being outside the window). Make sure we recycle the buffers on `SetWindowPixmap` to ensure that the buffers will be recycled whenever the pixmap size is changed. Related: https://gitlab.freedesktop.org/xorg/xserver/issues/951 Suggested-by: Michel Dänzer Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 71c3a97142265804d64f443bd1ddb68ac356f8a3 Author: dslater38 Date: Thu Dec 12 04:54:46 2019 +0000 XWin: Fix infinite loop in GetShift() GetShift(int mask) can be called with mask==0, causing it to go into an infinite loop. Note: GetShift(mask) will return 0 for a mask of both 0 and -1. The assumption is that if mask == 0, then the corresponding bits for which we're calculating the shift, are also 0. commit 0c729bb958375fbd8fb6811ff1ecc88bd9f80282 Author: Peter Hutterer Date: Thu Dec 12 09:23:47 2019 +1000 gitlab CI: update to the latest version of the ci-templates Primarily to fix the skopeo copy issue that causes pipelines to fail right now, see ci-templates commit 0a9bdd33a98f05af67. Signed-off-by: Peter Hutterer commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f Author: Michel Dänzer Date: Fri Nov 29 09:40:13 2019 +0100 xwayland: Do flush GPU work in xwl_present_flush The Present code sends the idle notification event to the client after xwl_present_flush returns. If we don't flush our GPU work here, the client may race to draw another frame to the same buffer, so we may end up copying (parts of) that new frame instead of the one we meant to. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835 Reviewed-by: Olivier Fourdan commit cd999f08c608458d6207110ed237c3a78441870b Author: Olivier Fourdan Date: Fri Oct 25 16:28:50 2019 +0200 xwayland: Use multiple window buffers Xwayland takes care of not attaching a new buffer if a frame callback is pending. Yet, the existing buffer (which was previously attached) may still be updated from the X11 side, causing unexpected visual glitches to the buffer. Add multiple buffering to the xwl_window and alternate between buffers, to leave the Wayland buffer untouched between frame callbacks and avoid stuttering or tearing issues. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/835 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 1c6f875f52d74d2137161399e134c4888c4eadf2 Author: Olivier Fourdan Date: Wed Nov 6 11:49:33 2019 +0100 xwayland: Add multiple window buffering support Add a mechanism to create, recycle and destroy window buffers when needed. Typically, this adds a new `xwl_window_buffer` structure which represents a buffer for a given Xwayland window. Each Xwayland window has two different pools of buffers: - The available buffers pool: Those are buffers which where created previously and that have either not been submitted to the compositor or submitted and released. - The unavailable buffers pool: Those are typically the buffers which are being used by the compositor, awaiting a release. Initially, an Xwayland window starts with both pools empty. As soon as a new buffer is needed, it's either created (if there is none available) or picked from the pool of available buffers. Once submitted to the compositor, the buffer is moved to the pool of unavailable buffers. When the corresponding `wl_buffer` is released by the compositor, it is moved back to pool of available buffers again to be reused when needed. To avoid keeping too many buffers around doing nothing, a garbage collection of older, unused buffers also takes care of disposing the buffers being unused for some time. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 77658741869f6a01cec0bdf49827494fb0f06edf Author: Olivier Fourdan Date: Wed Oct 30 13:17:34 2019 +0100 xwayland: Add buffer release callback The API `wl_buffer_add_listener` is misleading in the sense that there can be only one `wl_buffer` release callback, and trying to add a new listener when once is already in place will lead to a protocol error. The Xwayland EGL backends may need to set up their own `wl_buffer` release listener, meaning that there is no way to our own `wl_buffer` release callback. To avoid the problem, add our own callback API to be notified when the `wl_buffer` associated with an `xwl_pixmap` is released, triggered from the different `xwl_pixmap` implementations. Also update the Present code to use the new buffer release callback API. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e Author: Kenneth Graunke Date: Thu Nov 21 23:03:50 2019 -0800 modesetting: Use EGL_MESA_query_driver to select DRI driver if possible New now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver name; if successful, we use that as the DRI driver name. Following the existing dri2.c logic, we also use the same name for the VDPAU driver, except for i965 (and now iris), where we switch to the "va_gl" fallback. This allows us to bypass the PCI ID lists in xserver and centralize the driver selection mechanism inside Mesa. The hope is that we no longer have to update these lists for any future hardware. commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 Author: Kenneth Graunke Date: Thu Nov 21 23:01:28 2019 -0800 glamor: Add a function to get the driver name via EGL_MESA_query_driver This maps to eglGetDisplayDriverName if EGL_MESA_query_render is supported, otherwise it returns NULL. commit 60003023fa5b301dd621da4797f8a93035ebeeca Author: Michel Dänzer Date: Fri Nov 22 18:32:38 2019 +0100 modesetting: Use glamor_clear_pixmap in drmmode_clear_pixmap Should be slightly more efficient. Reviewed-by: Adam Jackson commit 9ba13bac9dd076f166ff0d063fc144b904a40d12 Author: Michel Dänzer Date: Mon Nov 18 18:06:28 2019 +0100 modesetting: Clear new screen pixmap storage on RandR resize Fixes random garbage being visible intermittently. Reviewed-by: Adam Jackson commit 327df450ffcf5bda5b4254db0208d355860d1010 Author: Michel Dänzer Date: Fri Nov 22 17:51:22 2019 +0100 xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate If a new rotate buffer was allocated. This makes sure the new buffer has valid transformed contents when it starts being displayed. Reviewed-by: Adam Jackson commit c66c548eabf06835cb0cb906598fb87c7bb30cf4 Author: Michel Dänzer Date: Fri Nov 22 17:58:12 2019 +0100 modesetting: Call glamor_finish from drmmode_crtc_set_mode This makes sure any pending drawing to a new scanout buffer will be visible from the start. This makes the finish call in drmmode_copy_fb superfluous, so remove it. Reviewed-by: Adam Jackson commit 06ef320e9bc1f1098df9cd5581f072528f28128e Author: Michel Dänzer Date: Fri Nov 22 18:05:04 2019 +0100 modesetting: Add glamor_finish() convenience macro This will simplify backporting the following fix to the 1.20 branch. Reviewed-by: Adam Jackson commit e6ab7f9f342f463092c45226f3294074351fdd5e Author: Matt Turner Date: Thu Nov 21 11:23:18 2019 -0500 xfree86: Test presence of isastream() isastream() was never more than a stub in glibc, and was removed in glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented XSI STREAMS declarations"). Bug: https://bugs.gentoo.org/700838 Reviewed-by: Julien Cristau Signed-off-by: Matt Turner commit ebf549db2d9341d99e0d0847b948dd798d98f7dc Author: Dor Askayo Date: Fri Nov 22 17:12:03 2019 +0100 glamor: make sure the correct FBO is cleared This also removes an unnecesary call to glDrawBuffer. Signed-off-by: Dor Askayo Fixes: 0e9a0c20 - "xwayland: clear pixmaps after creation in rootless mode" Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/933 Reviewed-by: Michel Dänzer commit cb1b1e184723fc4748b9a28736fa07fdc5c2990c Author: Adam Jackson Date: Mon Nov 18 16:46:44 2019 -0500 Revert "Revert "modesetting: Indirect the glamor API through LoaderSymbol"" Now that we've fixed LoaderSymbolFromModule this should work properly. This reverts commit 5c7c6d5cffa98e4749185af9211d7642b57673d8. Reviewed-by: Michel Dänzer commit ab61c16ef07fde6eb7110c63c344c54eb2a2d117 Author: Adam Jackson Date: Mon Nov 18 16:43:50 2019 -0500 loader: Make LoaderSymbolFromModule take a ModuleDescPtr The thing you get back from xf86LoadSubModule is a ModuleDescPtr, not a dlsym handle. We don't expose ModuleDescPtr to the drivers, so change LoaderSymbolFromModule to cast its void * argument to a ModuleDescPtr. Reviewed-by: Michel Dänzer commit 4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8 Author: Aaron Plattner Date: Tue Nov 19 10:08:51 2019 -0800 os: Don't crash in AttendClient if the client is gone If a client is in the process of being closed down, then its client->osPrivate pointer will be set to NULL by CloseDownConnection. This can cause a crash if freeing the client's resources results in a call to AttendClient. For example, if the client has a pending sync fence: Thread 1 "X" received signal SIGSEGV, Segmentation fault. AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942 (gdb) bt #0 AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942 #1 0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=) at ../Xext/sync.c:694 #2 0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120 #3 0x00005571c3dbbc69 in FreeFence (obj=, id=) at ../Xext/sync.c:1909 #4 0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880 #5 0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1146 #6 FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1109 #7 0x00005571c3d5525f in CloseDownClient (client=0x5571c4aed9a0) at ../dix/dispatch.c:3473 #8 0x00005571c3d55eeb in Dispatch () at ../dix/dispatch.c:492 #9 0x00005571c3d59e96 in dix_main (argc=3, argv=0x7ffe7854bc28, envp=) at ../dix/main.c:276 #10 0x00007fea4837cb6b in __libc_start_main (main=0x5571c3d1d060
, argc=3, argv=0x7ffe7854bc28, init=, fini=, rtld_fini=, stack_end=0x7ffe7854bc18) at ../csu/libc-start.c:308 #11 0x00005571c3d1d09a in _start () at ../Xext/sync.c:2378 (gdb) print client->osPrivate $1 = (void *) 0x0 Since the client is about to be freed, its ignore count doesn't matter and AttendClient can simply be a no-op. Check for client->clientGone in AttendClient and remove similar checks from two callers that had them. Signed-off-by: Aaron Plattner commit 66da95a172c4941b75ffedcdaa0138c0a48f11fb Author: Olivier Fourdan Date: Tue Nov 12 10:03:55 2019 +0100 xwayland: Do not discard frame callbacks on allow commits Currently, when a X11 client (usually the X11 window manager from a Wayland compositor) changes the value of the X11 property `_XWAYLAND_ALLOW_COMMITS` from `false` to `true`, all pending frame callbacks on the window are discarded so that the commit occurs immediately. Weston uses that mechanism to prevent the content of the window from showing before it's ready when mapping the window initially, but discarding the pending frame callbacks has no effect on the initial mapping of the X11 window since at that point there cannot be any frame callback on a surface which hasn't been committed yet anyway. However, discarding pending frame callbacks can be problematic if we were to use the same `_XWAYLAND_ALLOW_COMMITS` mechanism to prevent damages to be posted before the X11 toplevel is updated completely (including the window decorations from the X11 window manager). Remove the portion of code discarding the pending frame callback, Xwayland should always wait for a pending frame callback if there's one before posting new damages. Signed-off-by: Olivier Fourdan Reviewed-by: Pekka Paalanen Reviewed-by: Michel Dänzer https://gitlab.freedesktop.org/xorg/xserver/merge_requests/333 commit 4f984fc06bd57cabfa38f6191f10714878dc8969 Author: Olivier Fourdan Date: Mon Nov 18 17:28:45 2019 +0100 present/wnmd: Relax assertion on CRTC on abort_vblank() Currently, the function `present_wnmd_abort_vblank()` would fail if the given `crtc` is NULL. However, `xwl_present_get_crtc()` can return `NULL` under some circumstances, which would cause an unexpected termination of Xwayland in such a case, caused by the assertion failure being triggered. Remove the assertion, considering that the `crtc` isn't actually used in neither `present_wnmd_abort_vblank()` nor `xwl_present_abort_vblank()`. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/937 commit 5c7c6d5cffa98e4749185af9211d7642b57673d8 Author: Michel Dänzer Date: Fri Nov 15 11:32:38 2019 +0100 Revert "modesetting: Indirect the glamor API through LoaderSymbol" This reverts commit dd63f717fe8636315343f421f4f2ee299258f079. Caused a crash at least on some systems. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/934 commit dd63f717fe8636315343f421f4f2ee299258f079 Author: Adam Jackson Date: Tue Oct 8 13:11:09 2019 -0400 modesetting: Indirect the glamor API through LoaderSymbol Prerequisite for building all of xserver with -z now. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit 45f35a0c6666c5f35df482948e0c8e91167429ef Author: Adam Jackson Date: Tue Oct 8 12:52:28 2019 -0400 modesetting: Indirect the shadow API through LoaderSymbol Prerequisite for building all of xserver with -z now. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit 8760fab0a15805bdd12bb8f12bb1c665fde86cc2 Author: Adam Jackson Date: Tue Oct 8 13:29:22 2019 -0400 loader: Move LoaderSymbolFromModule() to public API Bare LoaderSymbol() isn't really a great API, this is more of a direct map to dlsym like you want. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 commit e5e9a8ca91d1c087edd8788a110251ad940dbc94 Author: Aaron Plattner Date: Wed Nov 6 10:45:43 2019 -0800 xfree86: Call ScreenInit for protocol screens before GPU screens During startup, the xfree86 DDX's InitOutput() calls PreInit for protocol screens first, and then GPU screens. On teardown, dix_main() calls CloseScreen in the reverse order: GPU screens first starting with the last one and then working backwards, and then protocol screens also in reverse order. InitOutput() calls ScreenInit in the wrong order: for GPU screens first and then for protocol screens. This causes a problem for drivers that have global state that is tied to the first screen that calls ScreenInit. Fix this by simply re-ordering the for loops to call PreInit for protocol screens first and then for GPU screens second. commit 562c7888be538c4d043ec1f374a9d9afa0b305a4 Author: Alex Goins Date: Tue Sep 17 18:36:35 2019 -0500 modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc() ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX private. Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an rrScrPrivPtr DDX private. Given that we can derive all of the information we need from RandR, we can support these screens by avoiding the use of xf86Crtc. This change implements an RandR-based path for ms_present_get_crtc(), allowing drawables to successfully fall back to syncing to the primary output, even if the slave doesn't have an xf86CrtcConfigPtr DDX private. Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private, drawables will fall back to 1 FPS if they overlap an output on that slave. Signed-off-by: Alex Goins commit 797e7a0ceb673fe2870c673e248835526a84d000 Author: Alex Goins Date: Tue Sep 17 18:03:34 2019 -0500 modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private. ms_covering_crtc() assumes that they do, which can result in a segfault. Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer before dereferencing it. This will still mean that ms_covering_crtc() can't fall back to the primary output when a drawable overlaps a slave output (going to the 1 FPS default instead), but it won't segfault. Signed-off-by: Alex Goins commit 3ef9029ace4245d9f8929aa71e22bc6a6f40b7b3 Author: Alex Goins Date: Wed Aug 28 18:24:16 2019 -0500 modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall back to if a drawable is overlapping a slave output. If the primary output is a slave output, RRFirstOutput() will return a slave output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the output's devPrivate, which is invalid for non-modesetting outputs, and can crash. Changing RRFirstOutput() could have unintended side effects for other callers, so this change replaces the call to RRFirstOutput() with ms_first_output(). ms_first_output() ignores the primary output if it doesn't match the given ScreenPtr, choosing the first connected output instead. Signed-off-by: Alex Goins commit c82f814313a813d7e1a2d7d3b1f7561810446b34 Author: Alex Goins Date: Wed Sep 4 12:25:31 2019 -0500 randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown During server teardown, mrootdraw is NULL, which can cause segfaults if master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just skip it. Signed-off-by: Alex Goins commit fe439596b99db65bbae35eff1ea0b79db167f8d6 Author: Arthur Williams Date: Thu Oct 17 22:47:37 2019 -0700 include: Increase the number of max. input devices to 256. Extending the decade old f0124ed93, to increase the number of input devices from 40 to 256. 40 translates at most 9 MD, while 256 will allow 63 MD. It is an arbitrary number, but people are hitting the current limit under reasonable conditions. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64793 Signed-off-by: Arthur Williams commit eddad048e35cbf0968d0f892009a248359a15ecd Author: Olivier Fourdan Date: Wed Oct 30 15:33:39 2019 +0100 xwayland: Cosmetic, fix indentation For some reason, indentation for EGL backend hooks was broken. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 4a857b161ce1202c60ac464c8eb6de358fed5508 Author: Olivier Fourdan Date: Wed Oct 30 13:11:28 2019 +0100 xwayland/shm: Use `calloc()` Currently, Xwayland pixmap SHM code uses `malloc()` to allocate the xwl_pixmap. Use `calloc()` instead, as the EGLstream backend does, as it is safer (initializing the allocated data to 0). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0d4667b65a81047fe5d5af537d295c64cfa08d9c Author: Olivier Fourdan Date: Wed Oct 30 11:50:24 2019 +0100 xwayland/glamor-gbm: Use `calloc()` Currently, glamor GBM backend uses `malloc()` to allocate the xwl_pixmap. Use `calloc()` instead, as the EGLstream backend does, as it is safer (initializing the allocated data to 0). Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 2c5acdef3aab52d0a416aee3654a63328847f22e Author: Olivier Fourdan Date: Thu Oct 31 09:04:19 2019 +0100 xwayland/eglstream: Fix order of `calloc()` args The definition by the manual is `calloc(size_t nmemb, size_t size)`. Swap the arguments of calloc() calls to match the definition. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee Author: Dor Askayo Date: Thu Nov 7 12:25:42 2019 +0100 xwayland: clear pixmaps after creation in rootless mode When a pixmap is created with a backing FBO, the FBO should be cleared to avoid rendering uninitialized memory. This could happen when the pixmap is rendered without being filled in its entirety. One example is when a top-level window without a background is resized. The pixmap would be reallocated to prepare for more pixels, but uninitialized memory would be rendered in the resize offset until the client sends a frame that fills these additional pixels. Another example is when a new top-level window is created without a background. Uninitialized memory would be rendered after the pixmap is allocated and before the client sends its first frame. This issue is only apparent in OpenGL implementations that don't zero the VRAM of allocated buffers by default, such as RadeonSI. Signed-off-by: Dor Askayo Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636 Reviewed-by: Michel Dänzer commit a506b4ecb6c54fd0388e628520eec75ea3bcb27c Author: Olivier Fourdan Date: Wed Nov 6 15:37:22 2019 +0100 xwayland: make context current to check GL version `glGetString(GL_VERSION)` will return NULL without a current context. Commit dabc7d8b (“xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor”) would check the context is created, but it is made current just after, so the call to `epoxy_gl_version()` would return 0, hence defeating the version check. Make the context current prior to call `epoxy_gl_version()`. Fixes: dabc7d8b - xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/932 https://gitlab.freedesktop.org/xorg/xserver/merge_requests/324 Signed-off-by: Olivier Fourdan commit dabc7d8bf2d964460286168b52899c42b3369f8d Author: Adam Jackson Date: Wed Oct 30 11:20:40 2019 -0400 xwayland: Fall back to GLES2 if we don't get at least GL 2.1 in glamor Some particularly unfortunate hardware (Intel gen3, mostly) will give you GLES2 but not GL 2.1. Fall back to GLES2 for such cases so you still get accelerated GLX. commit 741bd73429e337071f49509ddcc5fb392e20b0f6 Author: Hans de Goede Date: Mon Nov 4 20:03:17 2019 +0100 glamor/xwayland: Define EGL_NO_X11 Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS, EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers shipped with libglvnd. This fixes the xserver not building with the libglvnd-1.2.0 headers: In file included from /usr/include/EGL/eglplatform.h:128, from /usr/include/epoxy/egl_generated.h:11, from /usr/include/epoxy/egl.h:46, from glamor_priv.h:43, from glamor_composite_glyphs.c:25: /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC' 222 | *GC; | ^~ In file included from glamor.h:34, from glamor_priv.h:32, from glamor_composite_glyphs.c:25: ../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here 282 | } GC; | ^~ Signed-off-by: Hans de Goede commit 622eea366aaf162479eaabd93c88fa04efe98bcc Author: Jon Turney Date: Sat Oct 26 17:12:26 2019 +0100 meson: Add sha1 library options v2: Set the define for xha1.c programatically, rather than using loads of conditionals. commit 417e4553f143820acc33998898bbd5c3d4567bcd Author: Adam Jackson Date: Wed Oct 9 12:07:00 2019 -0400 misprite: Stop wrapping GetImage/GetSpans SourceValidate handles this for us consistently now. Reviewed-by: Michel Dänzer commit 77f614eb331b0240c699f7aef13a8046c9c2c70a Author: Adam Jackson Date: Wed Oct 9 12:05:56 2019 -0400 composite: Stop wrapping GetImage/GetSpans SourceValidate handles this for us consistently now. Reviewed-by: Michel Dänzer commit 516e75dbb6bbf97c7af9c2226242ffd9259fec11 Author: Adam Jackson Date: Wed Oct 9 11:57:18 2019 -0400 dix: Call SourceValidate before GetImage This ensures that any prep work for the drawable we're about to read from is already done before we call down to GetImage. This should be no functional change as most of the callers with a non-trivial SourceValidate are already wrapping GetImage and doing the equivalent thing, but we'll be simplifying that shortly. More importantly this ensures that if any of that prep work would generate events - like automatic compositing flushing rendering to a parent pixmap which then triggers damage - then it happens entirely before we start writing the GetImage reply header. Note that we do not do the same for GetSpans, but that's okay. The only way to get to GetSpans is through miCopyArea or miCopyPlane - where the callers must already call SourceValidate - or miGetImage - which this commit now protects with SourceValidate. Fixes: xorg/xserver#902 Reviewed-by: Michel Dänzer commit ff310903f34ac34c916ad74e919d1ac12aea4715 Author: Adam Jackson Date: Wed Oct 9 11:27:12 2019 -0400 mi: Add a default no-op miSourceValidate Slightly simplifies the callers since they don't need to check for non-NULL anymore. I do extremely hate the workarounds here to suppress misprite taking the cursor down though. Surely there's a better way. Reviewed-by: Michel Dänzer commit 89a9927b1e5ac416441a33b44abddf8372edfe6a Author: Adam Jackson Date: Wed Oct 16 14:44:49 2019 -0400 include: Remove now-empty site.h commit ff4e2c24ec599ecdbd24eb181afb50f896beb46d Author: Adam Jackson Date: Wed Oct 16 14:43:36 2019 -0400 dix: Move default screensaver defaults into globals.c commit 43fc5307804edc9a09e7ad8794a02b5e18c4f9db Author: Adam Jackson Date: Wed Oct 16 14:41:20 2019 -0400 include: Move some input-related default #defines to input.h commit 2d1ed64d2aedb1af5476ba011bbd36ddcf00c311 Author: Adam Jackson Date: Wed Oct 16 14:33:43 2019 -0400 dix: Remove -to option to set the default connection timeout One minute is admittedly arbitrary, but again, pretty sure this never gets set on the command line in practice. commit 46a275522f8692b8fc20043ec7a5e74d43448f0b Author: Adam Jackson Date: Wed Oct 16 14:30:18 2019 -0400 xdmcp: Remove unconfigurable COMPILEDDISPLAYCLASS commit 66eb933ec91724a351b7368cf7171adb108299fb Author: Adam Jackson Date: Wed Oct 16 14:28:33 2019 -0400 os: Remove unconfigurable DEFAULT_ACCESS_CONTROL macro commit 56ea4c769c2d65df2de86009e8e499f39a8a3d4d Author: Adam Jackson Date: Wed Oct 16 14:21:06 2019 -0400 dix: Remove -fn and -fc options to set default text/cursor fonts I strongly suspect these never get used in the wild, and it's not an especially useful thing to do in any case. commit 4ebce1ed8b63decb0919146a034f0c80ac47c3cd Author: Adam Jackson Date: Wed Oct 16 13:56:34 2019 -0400 os: Move log verbosity defaults into os/log.c There's not any configuration knobs for this so there's no real reason to leave them in a configgy header. commit e21371984def00b0e0b5cfc976bfd1756a2905d4 Author: Adam Jackson Date: Wed Oct 16 13:52:54 2019 -0400 include: Remove unused default value for COMPILEDDEFAULTFONTPATH Again, we're setting this at configure time now. commit f58fee67b1730798a57629da2f496c9fa594d143 Author: Adam Jackson Date: Wed Oct 16 13:51:41 2019 -0400 include: Remove unused default value for VENDOR_RELEASE We're always setting this in the appropriate blah-config.h now. commit 4b936ebcaaa80cc1dc1a51f110c7ecd77b06950e Author: Adam Jackson Date: Wed Oct 16 13:51:11 2019 -0400 include: Remove unused VENDOR_STRING commit ec659f021e62338018ac09ea61c3f4baa4fdf6e2 Author: Adam Jackson Date: Wed Oct 16 13:49:13 2019 -0400 dix: Remove now-unused SetVendorString commit fc671085ee52c6599005e2359930bebe6195ca83 Author: Adam Jackson Date: Wed Oct 16 13:42:15 2019 -0400 dmx: Stop overriding the vendor string commit 0e4bd71d02d09c320e76280ae8f14df169387507 Author: Ville Syrjälä Date: Tue Sep 3 16:44:56 2019 +0300 modesetting: Fix possible_crtcs Populate outout possible_crtcs as the union of possible_crtcs from the encoders rather than the intersection. Otherwise we're easily left with possible_crtcs==0 when all the possible encoders have non-overlapping possible_crtcs. No idea what the magic 0x7f is about, but keep it around in case it matters. Signed-off-by: Ville Syrjälä commit 334f1107146a2e6ebf6f7743b77aec2ad5c46f75 Author: Alexander Tsoy Date: Mon Sep 23 18:23:40 2019 +0300 configure: Set libdrm flags correctly if only XORG is enabled This fixes modesetting driver build failure which can be triggered with the following configure options: $ ./configure --disable-dri --disable-dri2 --disable-dri3 --disable-config-udev --enable-xorg Bugzilla: https://bugs.gentoo.org/689768 Signed-off-by: Alexander Tsoy Reviewed-by: Emil Velikov commit a1e3dfa50a9a9a41c93c12f19f40d97c56ddf850 Author: Jon Turney Date: Sat Oct 26 18:43:01 2019 +0100 xquartz: Remove trailing quote to fix build Fix xquartz build after typo in 3c78d637 ("global: Remove BUILD_DATE and BUILD_TIME") commit 0cf15714e1253f4ef61bb5e1f825b318a48b3cac Author: Keith Packard Date: Thu May 16 12:24:01 2019 -0700 modesetting: typo in drmmode_display.c -- ',' instead of ';' at end of line This seems like a simple typo to me; thanks to C it isn't caught by the compiler. Signed-off-by: Keith Packard commit 427f8bc00981703abe3153b6da575faa69fe2748 Author: Robert Mader Date: Wed Oct 16 19:14:06 2019 +0200 xserver: Fix a typo If `need_rotate` is TRUE, we should check for the right rotate. commit 55482c1caf4dbe7f4735b75366bd4acd81937fc1 Author: Adam Jackson Date: Tue Oct 15 13:40:01 2019 -0400 render: Fix undefined shift in xRenderColorToCard32 Delightfully this is undefined even though CARD16 is an "unsigned" type, because it's an unsigned short, which C promotes to signed int because everything is stupid. commit 592525386ad81cf9c8816f42f01a5bea01034e98 Author: Adam Jackson Date: Tue Oct 15 13:32:36 2019 -0400 dix: Fix undefined memset in _dixInitScreenPrivates Again, memset(0, ...) is undefined. commit f44ac101c523a0439bd1a864850e3c1a4e154549 Author: Adam Jackson Date: Tue Oct 15 13:21:37 2019 -0400 record: Fix undefined memcpy in RecordAClientStateChange If we don't have any recording contexts just skip all this. Note this also skips a pointless trip through malloc(0)/free. commit 9155e0c7c6696ec8c657e32bf41a08f88a8f3d0d Author: Adam Jackson Date: Tue Oct 15 13:16:17 2019 -0400 mi: Fix undefined memcpy in mieqGrowQueue The first time we get here, eventQueue->events is NULL. commit 6fe7c43fa52ffa9b91887ea7f8044e54b12637c9 Author: Adam Jackson Date: Tue Oct 15 13:10:35 2019 -0400 dix: Fix undefined shift in ht_generic_hash The hits keep coming. commit 1e5f478b7e1183d38ad07d1f5e68fdc9680f2eb8 Author: Adam Jackson Date: Tue Oct 15 13:08:57 2019 -0400 dix: Fix undefined shift in HashResourceID Again, we need all of the bits of an unsigned int to make this work. commit 3671a3ee88dac3cf1a301adf27dc2b43b069815b Author: Adam Jackson Date: Tue Oct 15 13:01:27 2019 -0400 mi: Fix undefined shift in miSetVisualTypesAndMasks The masks we end up building will occupy all 32 bits of an unsigned int, which means we had better build the shifts out of unsigned ints, because left-shifting a signed int all the way into the sign bit is undefined. commit a41d45eedc0c217c28def47acbd8759e31706b96 Author: Adam Jackson Date: Tue Oct 15 11:59:39 2019 -0400 dix: Fix undefined memset in dixInitPrivates When we set these up initially, no subsystems have allocated any privates yet, so the storage address will be null, and memset(NULL, ...) is undefined. commit 535f14656a2a42f0cca13a4264e8111300e5806d Author: Michel Dänzer Date: Mon Oct 14 12:48:24 2019 +0200 Revert https://gitlab.freedesktop.org/xorg/xserver/merge_requests/235 Caused assertion failures / crashes with Xorg. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/916 commit 5315f988d9f175e4850f4259f691a68d95ce7ac2 Author: Hans de Goede Date: Mon Sep 2 17:32:45 2019 +0200 xwayland: Set _XWAYLAND_RANDR_EMU_MONITOR_RECTS property for resolution emulation Apps using randr to change the resolution when going fullscreen, in combination with _NET_WM_STATE_FULLSCREEN to tell the window-manager (WM) to make their window fullscreen, expect the WM to give the fullscreen window the size of the emulated resolution as would happen when run under Xorg (*). We need the WM to emulate this behavior for these apps to work correctly, with Xwaylands resolution change emulation. For the WM to emulate this, it needs to know about the emulated resolution for the Windows owning client for each monitor. This commit adds a _XWAYLAND_RANDR_EMU_MONITOR_RECTS property, which contains 4 Cardinals (32 bit integers) per monitor with resolution emulation info. Window-managers can use this to get the emulated resolution for the client and size the window correctly. *) Since under Xorg the resolution will actually be changed and after that going fullscreen through NET_WM_STATE_FULLSCREEN will size the window to be equal to the new resolution. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0c305dbff8a44f3fa3d6aefd372a967029a7a527 Author: Hans de Goede Date: Mon Aug 26 12:26:34 2019 +0200 xwayland: xwl_window_should_enable_viewport: Add extra test Games based on the allegro gaming library or on ClanLib-1.0 do not size their window to match the fullscreen resolution, instead they use a window covering the entire screen, drawing only the fullscreen resolution part of it. This commit adds a check for these games, so that we correctly apply a viewport to them making fullscreen work properly for these games under Xwayland. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 38de6260816674b5430144cc38a8a27d93d1bf19 Author: Hans de Goede Date: Tue Jul 9 09:31:13 2019 +0200 xwayland: Add vidmode mode changing emulation support Add support for fake mode changes using viewport, for apps which want to change the resolution when going fullscreen. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit bcad1b813a04b9f3ff225f57a4baad09bd6315b9 Author: Hans de Goede Date: Mon Jul 8 18:35:27 2019 +0200 xwayland: Add xwlVidModeGetCurrentRRMode helper to the vidmode code crtc->mode reflects the mode set through the xrandr extension, once we add support for also changing the mode through the vidmode extension this will no longer correctly reflect the emulated resolution. Add a new xwlVidModeGetCurrentRRMode helper which determines the mode by looking at the emulated_mode instead. Likewise add a xwlVidModeGetRRMode helper and use that in xwlVidModeCheckModeForMonitor/xwlVidModeCheckModeForDriver to allow any mode listed in the randr_output's mode list. This is a preparation patch for adding emulated mode/resolution change support to Xwayland's XF86 vidmode extension emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 43c80078126f6f33c6ab7d3cf4668733bde03366 Author: Hans de Goede Date: Mon Jul 8 14:00:27 2019 +0200 xwayland: Add xwlRRModeToDisplayMode() helper function This is a preparation patch for adding emulated mode/resolution change support to Xwayland's XF86 vidmode extension emulation, using the Wayland viewport extension. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit d99b9ff0f237d15e7eb507484493c73b393d5dba Author: Hans de Goede Date: Tue Jul 2 11:55:26 2019 +0200 xwayland: Add support for randr-resolution change emulation using viewport Add support for per client randr-resolution change emulation using viewport, for apps which want to change the resolution when going fullscreen. Partly based on earlier work on this by Robert Mader Note SDL2 and SFML do not restore randr resolution when going from fullscreen -> windowed, I believe this is caused by us still reporting the desktop resolution when they query the resolution. This is not a problem because when windowed the toplevel window size includes the window-decorations so it never matches the emulated resolution. One exception would be the window being resizable in Windowed mode and the user resizing the window so that including decorations it matches the emulated resolution *and* the window being at pos 0x0. But this is an extreme corner case. Still I will submit patches upstream to SDL2 and SFML to always restore the desktop resolution under Xwayland, disabling resolution emulation all together when going windowed. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit aca0a588eb40a5e6669094a2ab7f71ca0ba06b16 Author: Hans de Goede Date: Thu Aug 29 23:04:36 2019 +0200 xwayland: Add support for storing per client per output emulated resolution Add support for storing per output randr/vidmode emulated resolution into the per client data. Since we do not have a free/delete callback for the client this uses a simple static array. The entries are tied to a specific output by the server_output_id, with a server_output_id of 0 indicating a free slot (0 is the "None" Wayland object id). Note that even if we were to store this in a linked list, we would still need the server_output_id as this is *per client* *per output*. This is a preparation patch for adding randr/vidmode resolution change emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 905cb8b9e27add5f49a45fe167a0005bf05218bc Author: Hans de Goede Date: Thu Aug 29 22:45:12 2019 +0200 xwayland: Add per client private data Add per client private data, which for now is empty. This is a preparation patch for adding randr/vidmode resolution change emulation. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit e89872f51aa834fa9d94a4ca4822f03b0341ab4f Author: Robert Mader Date: Mon Jan 22 17:57:38 2018 +0100 xwayland: Use RandR 1.2 interface (rev 2) This adds the RandR 1.2 interface to xwayland and allows modes advertised by the compositor to be set in an undistructive manner. With this patch, applications that try to set the resolution will usually succeed and work while other apps using the same xwayland instance are not affected at all. The RandR 1.2 interface will be needed to implement fake-mode-setting and already makes applications work much cleaner and predictive when a mode was set. [hdegoede@redhat.com: Make crtc_set only succeed if the mode matches the desktop resolution] Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0d656d796071fb637e4969ea800855fe5d1c9728 Author: Hans de Goede Date: Wed Jun 26 16:46:54 2019 +0200 xwayland: Add fake output modes to xrandr output mode lists This is a preparation patch for adding support for apps which want to change the resolution when they go fullscreen because they are hardcoded to render at a specific resolution, e.g. 640x480. Follow up patches will fake the mode-switch these apps want by using WPviewport to scale there pixmap to cover the entire output. Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 7c6f17790d3aedb164481264b0f05a8a14103731 Author: Robert Mader Date: Tue Jul 2 12:03:12 2019 +0200 xwayland: Use buffer_damage instead of surface damage if available When a viewport is set, damage will only work properly when using wl_surface_damage_buffer instead of wl_surface_damage. When no viewport is set, there should be no difference between surface and buffer damage. This is a preparation patch for using viewport to add support for fake mode-changes through xrandr for apps which want to change the resolution when going fullscreen. Changes by Hans de Goede : -Split the damage changes out into their own patch -Add xwl_surface_damage helper -Also use buffer_damage / the new helper for the present and cursor code Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 47bba4625339592d08b375bcd8e51029c0000850 Author: Robert Mader Date: Mon Jan 22 22:02:32 2018 +0100 xwayland: Add wp_viewport wayland extension support This commit adds support for the wayland wp_viewport extension, note nothing uses this yet. This is a preparation patch for adding support for fake mode-changes through xrandr for apps which want to change the resolution when going fullscreen. [hdegoede@redhat.com: Split the code for the extension out into its own patch] Reviewed-by: Olivier Fourdan Acked-by: Michel Dänzer Signed-off-by: Hans de Goede commit 834a467af978ac7a24ed17b8c8e58b6cddb4faf9 Author: Hans de Goede Date: Thu Aug 29 14:18:28 2019 +0200 dix: Add GetCurrentClient helper Request-handlers as registered in the requestVector array, always get passed the clientPtr for the client which sent the request. But the implementation of many request-handlers typically consists of a generic handler calling implementation specific callbacks and / or various helpers often multiple levels deep and in many cases the clientPtr does not get passed to the callbacks / helpers. This means that in some places where we would like to have access to the current-client, we cannot easily access it and fixing this would require a lot of work and often would involve ABI breakage. This commit adds a GetCurrentClient helper which can be used as a shortcut to get access to the clienPtr for the currently being processed request without needing a lot of refactoring and ABI breakage. Note using this new GetCurrentClient helper is only safe for code which only runs from the main thread, this new variable MUST NOT be used by code which runs from signal handlers or from the input-thread. The specific use-case which resulted in the creation of this patch is adding support for emulation of randr / vidmode resolution changes to Xwayland. This emulation will not actually change the monitor resolution instead it will scale any window with a size which exactly matches the requested resolution to fill the entire monitor. The main use-case for this is games which are hard-coded to render at a specific resolution and have sofar relied on randr / vidmode to change the monitor resolution when going fullscreen. To make this emulation as robust as possible (e.g. avoid accidentally scaling windows from other apps) we want to make the emulated resolution a per client state. But e.g. the RRSetCrtc function does not take a client pointer; and is a (used) part of the Xorg server ABI (note the problem is not just limited to RRSetCrtc). Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit b2a0d6065d86b8bf409ffae41180662560c42ce7 Author: Emil Velikov Date: Fri Jul 12 14:45:16 2019 +0100 vfb: add DRI3/glamor support This commit adds DRI3/glamor support, effectively translating into hardware GPU support. Theoretically it should be possible to use DRM/GPU drivers such as virtio or vgem, although only the intel i915 driver is currently tested. Since Xvfb does no modeset, it opens the render node. Currently that is fixed to "/dev/dri/renderD128" and will be tweaked with future commits. Specific use-cases are left for the reader - testing glamor, GL driver or others. v2: Drop GLAMOR_NO_XV, use GLAMOR_FOR_XORG instead (Michel Dänzer) v3: Fix build w/o glamor v4: - Split out glamor dependency patch for meson (Pekka) - Enhance commit message (Pekka) - Use O_CLOEXEC with open() (Pekka) - Enhance error path, memory leak comments (Pekka) Signed-off-by: Emil Velikov commit 9e574a5bd828e813ff31bdd5cbec52539534a958 Author: Emil Velikov Date: Mon Sep 23 16:23:02 2019 +0100 meson: glamor depends on gbm and epoxy mark as such Currently glamor depends on epoxy and gbm, even the autotools build enforces that. Follow suite and do the same for the meson build. v1: Split out from larger patch (Pekka) Signed-off-by: Emil Velikov commit 86c8458f3d09d2c4fb68de7e6ab515739e8f8b3c Author: Emil Velikov Date: Fri Jul 12 11:34:44 2019 +0100 vfb: clarify code flow in vfbScreenInit v2: Enhance commit message (Pekka) Signed-off-by: Emil Velikov commit 744c419cb4eaed4006b5f0f319b72d7ffa9fbc6d Author: Emil Velikov Date: Fri Jul 19 10:53:19 2019 +0100 glamor: check for non NULL pixmap at close_screen DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before they call into CloseScreen. At the same time Xvfb (support for glamor coming with later commit) do. As such the pixmap will be NULL and we'll crash out. Signed-off-by: Emil Velikov commit 7667180fb9dbd606e40c000aefc807371d2fb478 Author: Emil Velikov Date: Fri Jul 19 10:53:19 2019 +0100 glamor_egl: check for non NULL pixmap at egl_close_screen DDX such as Xorg, Xwayland & Xephyr do not destroy the pixmap before they call into CloseScreen. At the same time Xvfb (support for glamor coming with later commit) do. As such the pixmap will be NULL and we'll crash out. Signed-off-by: Emil Velikov commit 15354fb68f09eecceec5747a58cd16e6ce9236ca Author: Emil Velikov Date: Fri Jul 19 15:57:52 2019 +0100 glamor_egl: override the CloseScreen/DestroyPixmap earlier Currently we wrap the EGL CloseScreen/DestroyPixmap callbacks after the glamor ones. Thus upon teardown, we'll end calling things in the wrong order. Signed-off-by: Emil Velikov commit 89597eeba6e7a3418caa375f19f8dd303219881c Author: Emil Velikov Date: Thu Jul 18 14:04:33 2019 +0100 glamor_egl: remove unneeded xf86 includes/GLAMOR_FOR_XORG As of last commit, all of glamor_egl ix xf86 agnostic, so adjust the includes and drop the GLAMOR_FOR_XORG instances. Note the macro is still used for glamor_xv_init() which pulls xf86. v2: Drop GLAMOR_FOR_XORG guards (Michel Dänzer) Signed-off-by: Emil Velikov commit f3ab3d0c6123c8e7ddd3be6142f721590d153848 Author: Emil Velikov Date: Thu Jul 18 13:57:02 2019 +0100 glamor_egl: disable modifiers via glamor_init() Currently we parse through xf86Info.debug to check if we the modifiers should be disabled. Handle that within DDX and pass GLAMOR_NO_MODIFIERS into the glamor_init() flags. This allows individual DDX control over the setting - say when modifiers are woking OK with one implementation and not the other. Most importantly, this removes the final xf86 piece from the codebase. Signed-off-by: Emil Velikov commit 4018811838c344ee92d10e60789853e4ba512612 Author: Emil Velikov Date: Wed Jul 17 16:07:43 2019 +0100 glamor_egl: don't use ScrnInfoRec::privates Move from the xf86 specific ScrnInfoRec::privates, to the dix private handling. Since there's no FreeScreen function in ScreenPtr, fold the former within the existing CloseScreen. Users, such as modesetting are updated, and out of tree drivers will need equivalent, yet trivial, patch. Note: we need to ensure that the screen private is unset and the screen callbacks are restored in our CloseScreen function. Signed-off-by: Emil Velikov commit 1b5183b26d9977d46f6624126a2b2b6d77a74659 Author: Emil Velikov Date: Thu Jul 18 15:58:13 2019 +0100 glamor_egl: move glamor_egl_cleanup() further up We'll use the function within glamor_egl_close_screen() with next patch. Signed-off-by: Emil Velikov commit 6a557167366b8b1352709397df50649d5665b755 Author: Emil Velikov Date: Tue Jul 16 17:50:13 2019 +0100 glamor/egl: remove unused function pointers The following two members of glamor_egl_screen_private has been unused for a little while now. CreateScreenResources CloseScreen Signed-off-by: Emil Velikov commit 52a2a052aa3ab92b07c185c1fc2bf4ee2d727f4d Author: Emil Velikov Date: Fri Jul 12 17:47:27 2019 +0100 glamor_egl: use LogMessage over xf86DrvMsg Much of glamor already use LogMessage() so we might as well be consistent. This effectively paves the way of making glamor-egl xf86 agnostic. Signed-off-by: Emil Velikov commit 3340ddf37743fdf197dfc16a97107435ff53c6e4 Author: Adam Jackson Date: Wed Oct 9 16:03:17 2019 -0400 meson: Apparently 1.2 is < 1.2.0 Siiiigh. commit c7486613b0dc586f93f6ba293d9b55c69995b05c Author: Adam Jackson Date: Wed Oct 9 15:17:47 2019 -0400 meson: Fix another reference to "gl" 9.2.0 Previous commit e6ef2b12 missed a spot. commit e6ef2b12404dfec7f23592a3524d2a63d9d25802 Author: Marvin Schmidt Date: Tue Sep 24 09:58:43 2019 +0200 build: glx: Lower gl version to work with libglvnd When using mesa with libglvnd support, mesa will no longer install the gl, glx, egl pkg-config files but instead let libglvnd provide them. libglvnd maintainers decided to change the versioning as it was mesa-specific previously. Now the libraries have versions of the API they expose[1]. This causes problems when building the X server: checking for glproto >= 1.4.17 gl >= 9.2.0... no configure: error: Package requirements (glproto >= 1.4.17 gl >= 9.2.0) were not met: Requested 'gl >= 9.2.0' but version of gl is 1.2 Lower the version requirement to 1.2 to allow building against libglvnd provided libraries [1] https://github.com/NVIDIA/libglvnd/commit/0dfaea2bcb7cdcc785f95e244223bd004a2d7fba commit afd80cfcd5ed7cd45d72620e74df86b016f81f3a Author: Jon Turney Date: Mon Sep 16 12:43:20 2019 +0100 Revert "appveyor: Drop building Xorg server" This reverts commit a9537cfdd1ed9656f4e29225af8861418b4fd682. This is buildable again since !244 commit e693c9657f98c334e9921ca2f8ebf710497c0c6a Author: Arthur Williams Date: Sun Oct 6 11:55:35 2019 -0700 dix: Check for NULL spriteInfo in GetPairedDevice There is a race when reseting the XServer that causes spriteInfo to be NULL in GetPairedDevice resulting a segfault and subsequent crash. The problem was noticed when opening a connection, creating master devices, destroying master devices and closing the connection during testing. Signed-off-by: Arthur Williams commit a505ecba1048048c168472e4b4a92c13f92b0613 Author: Sven Joachim Date: Fri Oct 4 10:29:31 2019 +0200 gitlab-ci: Add a manpage substitutions regression test This catches the broken manpages in the autoconf build which appeared after commit 2e497bf887ac ("man: s/__/@/g") and were only partly rectified by commit 0445705a8bbf ("man: Fix automake seddery"). Reviewed-by: Michel Dänzer commit de0d39f825cce7422986011ee9d5db91f15e2987 Author: Sven Joachim Date: Wed Oct 2 18:26:07 2019 +0200 modesetting: Fix broken manpage in autoconf build The autoconf build for the modesetting driver still relied on xorg-macros.m4 for string replacements and did not include the top-level manpages.am. As a result, no substitutions took place after commit 2e497bf887aca832dc0dd30d071c5288ab5c1e15. This should be a candidate for the 1.20 branch. Reviewed-by: Michel Dänzer commit 726e4230c6ffe3148f9877eba32287cfe8d158c1 Author: Sven Joachim Date: Wed Oct 2 18:25:17 2019 +0200 xwayland: Add more files to .gitignore Also sort the file again, missed in commit c8c276c9569b. commit b2de577f6388c6dd7a463e5cebb8b1366bb45d1f Author: Adam Jackson Date: Tue Jul 23 14:33:45 2019 -0400 xfree86: Merge vbe into int10 There's not really a good reason to keep these separate, the vbe code requires int10 and is not very large. This change eliminates the build-time options for vbe; if you build int10, you get vbe. Gitlab: https://gitlab.freedesktop.org/xorg/xserver/issues/692 Reviewed-by: Emil Velikov commit e7b5af451c101608d8cc003e8dd0ff83ded17146 Author: Sven Joachim Date: Mon Sep 30 18:44:25 2019 +0200 .dir-locals.el: Add missing final newline commit 47387916fb84f8f9c7931eb7162d1663a6023467 Author: Sven Joachim Date: Mon Sep 30 18:43:13 2019 +0200 Fix various spelling errors commit 2a9268e4a0ba7b062ded4d361be3119d887aac41 Author: Adam Jackson Date: Tue Sep 3 11:20:58 2019 -0400 dri2: Set fallback driver names for Intel and AMD chips i965 and radeonsi, respectively, are the drivers that have been receiving new hardware support. It's really silly to need to update the server side to know specific new devices IDs every time a new ASIC comes out. Reviewed-by: Michel Dänzer commit cbdde938cbaf604741cd057fac743859ada342ec Author: Adam Jackson Date: Fri Sep 27 11:43:52 2019 -0400 modesetting: Reduce "glamor initialization failed" message to X_INFO This might be an error or not, for example refusing to work on llvmpipe is normal and expected. glamor_egl_init() will print X_ERROR messages if appropriate, so we don't need to here. Reviewed-by: Michel Dänzer commit 0d8cc7bb180468fee72330f40d87f6e9db7b42c0 Author: Michel Dänzer Date: Mon Sep 23 18:35:41 2019 +0200 miext/sync: Make struct _SyncObject::initialized fully ABI compatible With a 32-bit build, putting the initialized field at the end of the struct bumped the struct size from 20 bytes to 24, changing the layout of other structs embedding struct _SyncObject. While this would be acceptable on master, it caused crashes with 1.20. Making the initialized field a char and putting it in the hole before the beingDestroyed field restores the 32-bit ABI as well. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/892 Reviewed-by: Aaron Plattner Reviewed-by: Alex Goins commit 6036e845271800b2e268f5cba9283ce07a7fad3a Author: Alan Coopersmith Date: Mon Sep 23 16:28:42 2019 -0700 meson: fix builds on Solaris 11.4 Signed-off-by: Alan Coopersmith commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3 Author: Alan Coopersmith Date: Mon Sep 23 15:12:01 2019 -0700 ospoll: Fix Solaris ports implementation to build on Solaris 11.4 Wrong version got committed, but wasn't noticed since it only builds with meson, not autoconf. Signed-off-by: Alan Coopersmith commit cca4bc342cacdbd1ce819c08af2f4795f6a704c3 Author: Andres Rodriguez Date: Fri Sep 6 18:32:44 2019 -0400 xf86: Disable unused crtc functions when a lease is revoked This fixes 'non-desktop' displays staying powered on after their lease has been revoked. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111620 Cc: Keith Packard Signed-off-by: Andres Rodriguez commit 0f19381f4906e3100cd43544f1cad82d2a933c63 Author: Olivier Fourdan Date: Tue Jul 9 11:08:27 2019 +0200 xwayland: Don't create wl_buffer backing pixmap In non-rootless mode, not all pixmaps need a wl_buffer backing. Suggested-by: Twaik Yont (@twaik) in #834 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit edf964434eac10ffbe27cc883e3ab95505669aee Author: Jonas Ådahl Date: Fri Sep 13 17:11:27 2019 +0200 xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of modifiers for various reasons. Handle this gracefully by ignoring it. Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd result in empty windows provided by Xwayland. Signed-off-by: Jonas Ådahl Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 429ee86ab949d6e49c07491a88d6b8d8babc3246 Author: Martin Weber Date: Wed Sep 18 14:29:05 2019 +0200 udev: Fixed NULL pointer argument of strcmp Signed-off-by: Martin Weber commit bcf2dd0cd20825ccf4284c67f678ad37ecd1d2b1 Author: Jon Turney Date: Fri Feb 19 21:53:00 2016 +0000 hw/xwin: Add -icon option to set the screen window icon in windowed mode Add an -icon option to set the screen window icon in windowed mode Allow cygwin paths in an icon-specification Update man pages and system.XWinrc appropriately Also, log an error if the icon specified for TRAYICON cannot be loaded Also, fix a bug in appending a '\' to IconDirectory only if it doesn't already end with one, which was fortunately benign. Note: LoadImageComma would be simpler if we just stated that XWinrc paths are Cygwin paths on Cygwin, Windows paths on MinGW, but that could break existing .XWinrc files Note: Given that we can specify paths in an icon-specifier, I'm not sure what IconDirectory wins us. v2: Fix formatting problems in man page additions v3: Fix some more s/_/@/g in man pages commit ac5d3a200a6d4bdb9ae4a9ef6f2238cf185d38e5 Author: Alan Coopersmith Date: Tue Sep 10 17:28:36 2019 -0700 meson: don't require xf86bigfontproto if not building xf86bigfont support Signed-off-by: Alan Coopersmith commit 7ad1d0d384085fb480e00547c22a3e8a14b514ea Author: Carlos Garnacho Date: Sat Jul 20 00:16:43 2019 +0200 xwayland: Allow passing a fd for set up clients This FD also triggers the "wait for WM_S0" paths, so that the compositor may set up a "maintenance line" for Xwayland, for services that are essential to run before any client (eg. xrdb). Those services would use this FD, disguised as an extra display connection. This -initfd can be seen as a generalization of -wm, a Wayland compositor may use -initfd to launch its WM and any other clients that should start up, or it may use -wm as a dedicated connection for the WM and optionally use -initfd for the misc. startup clients. If either of -wm or -initfd is passed, Xwayland will expect a selection notification on WM_S0 before incorporating the FDs in -listen to the poll list. Also, correct a minor typo in the listenfd argument output, give → given. Signed-off-by: Carlos Garnacho commit 78cc8b6f9613fc71f6ecc7e8848d54364a250634 Author: Carlos Garnacho Date: Mon Jan 7 15:33:35 2019 +0100 xwayland: Handle the case of windows being realized before redirection If Xwayland gets to realize a window meant for composition before the compositor redirected windows (i.e. redirect mode is not RedirectDrawManual yet), the window would stay "invisible" as we wouldn't create a wl_surface/wl_shell_surface for it at any later point. This scenario may happen if the wayland compositor sets up a X11 socket upfront, but waits to raise Xwayland until there are X11 clients. In this case the first data on the socket is the client's, the compositor can hardly beat that in order to redirect subwindows before the client realizes a Window. In order to jump across this hurdle, allow the late creation of a matching (shell) surface for the WindowPtr on SetWindowPixmapProc, so it is ensured to be created after the compositor set up redirection. Signed-off-by: Carlos Garnacho Reviewed-by: Michel Dänzer Reviewed-by: Olivier Fourdan commit c2e8ae964052944312c5023ca7ea5c41a92990e5 Author: Carlos Garnacho Date: Mon Jan 7 15:33:31 2019 +0100 xwayland: Refactor surface creation into a separate function This is just called from xwl_window_realize() ATM, but will be useful in future commits. Signed-off-by: Carlos Garnacho commit 4e50440ae20c537d6a4edf356cda67dd33d4e5a8 Author: Carlos Garnacho Date: Mon Jan 7 15:20:05 2019 +0100 xwayland: Separate DamagePtr into separate window data This will be dissociated in future commits to handle the cases where windows are being realized before there is a compositor handling redirection. In that case, we still want the DamagePtr to be registered upfront on RealizeWindowProc before a corresponding xwl_window might be created. Most notably, it cannot be lazily created on SetWindowPixmapProc as damage accounting gets broken. Signed-off-by: Carlos Garnacho commit 07463a40458ecc52d935b1a0bd820f6d9664da22 Author: Simon Ser Date: Tue Sep 3 13:10:33 2019 +0300 ci: bump DEBIAN_TAG The previous commit requires wayland-protocols 1.18. Bump DEBIAN_TAG to re-generate the Debian image and get the wayland-protocols update. Signed-off-by: Simon Ser Reviewed-by: Michel Dänzer commit 01ed478c65227ae961d33bc1daf4a64da84f15a6 Author: Simon Ser Date: Mon Sep 2 22:42:17 2019 +0300 xwayland: add support for xdg-output-unstable-v1 version 3 This adds support for xdg-output-unstable-v1 version 3, added in [1]. This new version deprecates zxdg_output_v1.done and replaces it with wl_output.done. If the version is high enough, there's no need to wait for both an xdg_output.done event and a wl_output.done event -- we only care about wl_output.done. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/commit/962dd535372c8e4681374c23d2603cbe06cd7031 Signed-off-by: Simon Ser Reviewed-by: Olivier Fourdan commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e Author: Maarten Lankhorst Date: Thu Apr 25 11:46:41 2019 +0200 modesetting: Disable atomic support by default The atomic driver has issues with modesetting when stealing connectors from a different crtc, a black screen when doing rotation on a different crtc, and in general is just a mapping of the legacy helpers to atomic. This is already done in the kernel, so just fallback to legacy by default until this is fixed. Please backport to 1.20, as we don't want to enable it for everyone there. It breaks for existing users. The fixes to make the xserver more atomic have been pending on the mailing list for ages. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030 References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits Signed-off-by: Maarten Lankhorst commit 7d0e660e0e2808e098ab9d4de843e9b31c64af21 Author: Adam Jackson Date: Tue Aug 27 15:54:42 2019 -0400 meson: Add dtrace support commit e0e051a3920e3e2731d35807e00d30ba9ef7f122 Author: Adam Jackson Date: Tue Aug 27 15:50:23 2019 -0400 dtrace: s/#if/#ifdef/ for XSERVER_DTRACE No functional change, matches meson style. commit 7968d10fadd37eabd811481e1d47fe01706269f3 Author: Adam Jackson Date: Tue Aug 27 15:48:59 2019 -0400 dtrace: Move Xserver.d from dix/ to include/ dix/ is typically not in the include path, and this properly belongs in include anyway since it's needed from os/ too. commit 4fa43fc5134bedf50904ec634f9a63d0570b0827 Author: Adam Jackson Date: Tue Aug 27 15:43:50 2019 -0400 dtrace: Remove Xserver-dtrace.h.in hack This was a workaround for very old versions of dtrace(1) that didn't support the -h switch. We no longer support such old OSes. commit f8c85961c8fcb283e4ed6fc2b942428e4da2d093 Author: Adam Jackson Date: Thu Aug 22 15:07:18 2019 -0400 glx: Disable GLX_EXT_import_context if !enableIndirectGLX GLX_EXT_import_context allows multiple clients to share the same indirect context. If you can't create an indirect context, you're certainly not going to be able to share one. Hide the extension from the server string if we've disabled indirect contexts. This turns piglit's tests from fail to skip when indirect contexts are disabled. Since GLX_EXT_import_context has been supported in xfree86-derived servers since day 1 (it was included in the initial GLX code drop from SGI), this is now also a hint to the client that indirect contexts are unlikely to work at all. Reviewed-by: Michel Dänzer commit 4f27d1e05f67eb8953a9bbed7e6f34b03456c64f Author: Christopher Chavez Date: Sat Jul 27 10:51:57 2019 -0500 XQuartz: translate additional mouse buttons Old behavior was to translate the middle mouse button, as well as every other button that isn't the left or right mouse button, to act as the middle mouse button (2). New behavior is to translate only the middle mouse button to 2, and translate higher-numbered buttons to 8 and higher. This allows additional mouse buttons to behave under XQuartz more like they do by default under X11 on other platforms (e.g. Linux and BSD distributions). Signed-off-by: Christopher Chavez commit 436fd7e8b4966c305ea9c43f3c14c2ca04c35539 Author: Adam Jackson Date: Wed Jan 23 11:47:44 2019 -0500 render: Break PICT_a4 The Render protocol requires this format, but it is wrong to do so. We are not aware of any hardware with a real 4bpp implementation of this format. Some GL hardware may have GL_LUMINANCE4_ALPHA4_EXT, and may also be able to wire L to 1, but that would win you none of memory, quality, or (likely) performance over A8. Any attempt to use this format is therefore likely a (painful) software fallback. Pleasantly (and given the above, unsurprisingly) it seems to be unused in the wild. None of the major toolkits will try to use it, and rendercheck does not in fact validate that all of the "standard" picture formats exist. Drop the explicit A4 setup from picture format initialization. Note that the DDXes are not changed and still expose a depth-4 pixmap format, but we only add picture formats for True/DirectColor-credible depths (i.e. depth >= 15). Implements: xorg/proto/xorgproto!1 Signed-off-by: Adam Jackson commit 0c5179c280a193a1dbbe29160906087f06eae6f2 Author: Ville Syrjälä Date: Tue Aug 20 17:46:09 2019 +0300 modesetting: Update props for dynamically added outputs Dynamically added outputs should have their properties properly updated as well. Otherwise we're left with an output with many of its propeties not exposed. Signed-off-by: Ville Syrjälä Reviewed-by: Michel Dänzer commit 194ba38728b34a76885275dae153057c8afaf72e Author: Adam Jackson Date: Mon Aug 19 14:27:54 2019 -0400 miext/sync: Fix needless ABI change The initialized field was added in: commit 82f01ad7869e3f2be51e41a8246dab5982bbc36a Author: Alex Goins Date: Wed Apr 10 13:48:02 2019 -0500 xsync: Add resource inside of SyncCreate, export SyncCreate But it added this field not at the end of SyncObject. It may not have been _usefully_ possible to create those from another extension prior to that commit, but that's still an ABI-incompatible change. commit 95dcc81cb122e5a4c5b38e84ef46eb872b2e1431 Author: Adam Jackson Date: Fri Aug 16 14:56:19 2019 -0400 glx: Fix previous context validation in xorgGlxMakeCurrent vnd has already verified that the context tag is valid before this gets called, and we only set the context tag private data to non-null for indirect clients. Mesa happens to be buggy and doesn't send MakeCurrent requests nearly as much as it should for direct contexts, but if you fix that, then unbinding a direct context would fail here with GLXBadContextTag. Sadly Mesa will still need to carry a workaround here for broken servers, but we should still fix the server. commit aed62f8fbea3f618f97ee0105b2d430c8cddf8f5 Author: Olivier Fourdan Date: Thu Aug 1 13:34:13 2019 +0200 meson/xwayland: No libdrm nor epoxy without glamor When building Xwayland with neither DRI nor GLamor support enabled with the Meson build system, the resulting binary would still link against libdrm and epoxy even though those are not used/needed. Make sure we require and link against libdrm and epoxy only if needed. Signed-off-by: Olivier Fourdan commit e8a85ba818a82d8c5acacc53dfc4fdfff573ae90 Author: Olivier Fourdan Date: Thu Aug 1 13:28:48 2019 +0200 meson: Build miext/sync for Xwayland When using the Meson build system, miext/sync would be build only for dri3. As a result, when building with Meson without DRI3 enabled, Xwayland would fail to link because `miSyncShmScreenInit()` is nowhere to be found. Make sure to build miext/sync for either DRI3 or Xwayland. Signed-off-by: Olivier Fourdan commit c0bbc29ae59737ea0e55fd9c8b65133010d32b80 Author: Olivier Fourdan Date: Thu Aug 1 09:48:59 2019 +0200 meson: Move requirements in a single place Some modules are required in multiple places in the meson file. Move the actual requirements to the top of the file as a variable so that updating a version does not require changing the actual value in multiple places. Signed-off-by: Olivier Fourdan commit bf758660c9c0e20abd141a1215e2e2b1ac342097 Author: Olivier Fourdan Date: Thu Aug 1 13:39:47 2019 +0200 configure/xwayland: No libdrm nor epoxy without glamor When building Xwayland without neither DRI nor GLamor support enabled with the autotools build system, the resulting binary would still link against libdrm and epoxy even though those are not used/needed. Make sure we require and link against libdrm and epoxy only if needed. Signed-off-by: Olivier Fourdan commit 5096fcd492b1efd178773748e5f42177439426d6 Author: Adam Jackson Date: Wed Aug 14 14:10:07 2019 -0400 composite: Be more paranoid in compDestroyDamage Consider these two facts: - You can't rely on resource deletion order - damageDestroyWindow automatically destroys any damage listener connected to the doomed window Now consider a redirected window being destroyed. If the damage associated with the redirection is destroyed before the window, then when compFreeClientWindow tries to unredirect the window, the call to compSetParentPixmap may see that cw->damageRegistered is still true, and call DamageUnregister(NULL) (because compDestroyDamage already zeroed out cw->damage), and you get a backtrace that looks like: #6 #7 DamageUnregister (pDamage=0x0) at damage.c:1773 <----------------- #8 0x000000000051f767 in compSetParentPixmap (pWin=pWin@entry=0x28489c0) at compalloc.c:646 #9 0x000000000051fa01 in compFreeClientWindow (pWin=0x28489c0, id=) at compalloc.c:291 #10 0x000000000051a499 in FreeCompositeClientWindow (value=, ccwid=) at compext.c:74 #11 0x0000000000597932 in doFreeResource (res=0x28494c0, skip=0) at resource.c:880 #12 0x000000000059850e in FreeResource (id=857, skipDeleteFuncType=skipDeleteFuncType@entry=0) at resource.c:910 #13 0x000000000051ee01 in compUnredirectWindow (pClient=0x1f6b4e0, pWin=pWin@entry=0x28489c0, update=update@entry=0) at compalloc.c:336 #14 0x000000000051b723 in compCheckBackingStore (pWin=0x28489c0) at compinit.c:131 #15 compChangeWindowAttributes (pWin=0x28489c0, mask=) at compinit.c:152 #16 0x000000000051d1f9 in compDestroyWindow (pWin=0x28489c0) at compwindow.c:664 #17 0x00000000004d85be in damageDestroyWindow (pWindow=0x28489c0) at damage.c:1570 #18 0x00000000004896f0 in DbeDestroyWindow (pWin=0x28489c0) at dbe.c:1326 #19 0x00000000004d229e in present_destroy_window (window=0x28489c0) at present_screen.c:163 #20 0x000000000059c4e4 in FreeWindowResources (pWin=pWin@entry=0x28489c0) at window.c:1032 #21 0x000000000059f2c6 in DeleteWindow (value=0x28489c0, wid=) at window.c:1101 #22 0x0000000000597932 in doFreeResource (res=0x2843bd0, skip=skip@entry=0) at resource.c:880 #23 0x0000000000598b0c in FreeClientResources (client=client@entry=0x2848560) at resource.c:1146 #24 0x0000000000572e2f in CloseDownClient (client=0x2848560) at dispatch.c:3473 Fix this by zeroing out more of the CompWindowPtr when the damage is destroyed, so that any further calls into composite will avoid touching cw->damage. commit 3c78d637553a5ed207cd67a6f84b9b1fffe5b91f Author: Adam Jackson Date: Wed Aug 14 14:51:56 2019 -0400 global: Remove BUILD_DATE and BUILD_TIME All this does is make reproducible builds impossible. commit 61aa40aeb3d4efefda47f245ed4b83a1a19b1d4c Author: Matt Turner Date: Fri Aug 9 20:22:29 2019 -0700 dix: Assert noPanoramiXExtension is false in PanoramiX code When compiling with link time optimization, GCC thinks it's discovered undefined behavior: events.c: In function 'XineramaConfineCursorToWindow': events.c:609:13: warning: iteration 2147483647 invokes undefined behavior [-Waggressive-loop-optimizations] events.c:609:11: note: within this loop events.c:605:49: warning: array subscript -1 is below array bounds of 'struct _Window *[16]' [-Warray-bounds] events.c:606:31: warning: array subscript -1 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] events.c:610:39: warning: array subscript -2 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] events.c:617:38: warning: array subscript -2 is below array bounds of 'struct _Window *[16]' [-Warray-bounds] events.c:619:35: warning: array subscript -2 is below array bounds of 'struct _Screen *[16]' [-Warray-bounds] This results from i = PanoramiXNumScreens - 1; RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize); off_x = screenInfo.screens[i]->x; off_y = screenInfo.screens[i]->y; where GCC believes that PanoramiXNumScreens might be 0. Unfortunately GCC is just smart enough to be an annoyance because this case is not actually possible: XineramaConfineCursorToWindow() is only called when noPanoramiXExtension is false, and if noPanoramiXExtension is false then PanoramiXNumScreens must be >1 (see PanoramiXExtensionInit()). So, add an assert(!noPanoramiXExtension), which to my surprise provides GCC with information even in release builds and lets GCC understand that the code is not doing anything that is undefined behavior. I chose this solution instead of the proposed assert(i >= 0) because the same pattern occurs in CheckVirtualMotion() but is inside an 'if (!noPanoramiXExtension)' and does not generate any warnings. Fixes: xorg/xserver#590 Signed-off-by: Matt Turner commit c69b37e8da87c9f76dbf4add7340a77ea443c760 Author: Hans de Goede Date: Thu Aug 8 21:56:59 2019 +0200 modesetting: Only log 1 error for consecutive flip failures Only log 1 error for consecutive flip failures, instead of filling the log and the disk with errors for each attempted flip. Despite our best efforts we may end up with a BO which gets refused when we try to import it as a framebuffer, see e.g. : https://bugs.freedesktop.org/show_bug.cgi?id=111306 This should not happen, but as the above bugs shows sometimes it does and chances are it will happen again. Note ideally we should check if the import is possible at ms_present_check_flip time, like the amdgpu code is doing since: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/35 but that requires a chunk of refactoring work on the modesetting driver, so for now this will have to do. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 3dc838f77d9a9417adf6a03cc82aa4e9337153a7 Author: Hans de Goede Date: Thu Aug 8 21:54:51 2019 +0200 modesetting: Improve page-flip error reporting Before this commit ms_do_pageflip logged a single error for both the drmmode_bo_import failure path as well as for the queue_flip_on_crtc path. This commit splits this into 2 separate error logs so that it is clear what the cause of the flip-failure is. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 12821852f0d82ecef686262382c84b2c1625a99f Author: Hans de Goede Date: Mon Jul 15 14:35:49 2019 +0200 modesetting: Avoid duplicate error messages on present-flip errors Currently on present-flip failures we log 2 messages for each failure, 1 from ms_do_pageflip and then another one from ms_present_flip which is the caller of ms_do_pageflip. This commit adds a log_prefix argument to ms_do_pageflip so that its log messages can show if it is a DRI2 or a Present flip which fails and removes the redundant error message from ms_present_flip. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 078277e4d92f05a90c4715d61b89b9d9d38d68ea Author: Dave Airlie Date: Fri Aug 17 09:49:24 2012 +1000 xf86: autobind GPUs to the screen This is a modified version of a patch we've been carry-ing in Fedora and RHEL for years now. This patch automatically adds secondary GPUs to the master as output sink / offload source making e.g. the use of slave-outputs just work, with requiring the user to manually run "xrandr --setprovideroutputsource" before he can hookup an external monitor to his hybrid graphics laptop. There is one problem with this patch, which is why it was not upstreamed before. What to do when a secondary GPU gets detected really is a policy decission (e.g. one may want to autobind PCI GPUs but not USB ones) and as such should be under control of the Desktop Environment. Unconditionally adding autobinding support to the xserver will result in races between the DE dealing with the hotplug of a secondary GPU and the server itself dealing with it. However we've waited for years for any Desktop Environments to actually start doing some sort of autoconfiguration of secondary GPUs and there is still not a single DE dealing with this, so I believe that it is time to upstream this now. To avoid potential future problems if any DEs get support for doing secondary GPU configuration themselves, the new autobind functionality is made optional. Since no DEs currently support doing this themselves it is enabled by default. When DEs grow support for doing this themselves they can disable the servers autobinding through the servers cmdline or a xorg.conf snippet. Signed-off-by: Dave Airlie [hdegoede@redhat.com: Make configurable, fix with nvidia, submit upstream] Signed-off-by: Hans de Goede Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov --- Changes in v2: -Make the default enabled instead of installing a xorg.conf snippet which enables it unconditionally Changes in v3: -Handle GPUScreen autoconfig in randr/rrprovider.c, looking at rrScrPriv->provider, rather then in hw/xfree86/modes/xf86Crtc.c looking at xf86CrtcConfig->provider. This fixes the autoconfig not working with the nvidia binary driver commit fbd2bb9dd047a206b9c8cfaca62079c8d866c617 Author: Hans de Goede Date: Thu Aug 1 12:38:35 2019 +0200 mi: Use GC clipregion instead of drawable in miDoCopy/miCopyArea As discussed in issue #829 the "mi: Shortcut miDoCopy/miCopyArea based on clipList" change leads to pointer-trails (area under pointer not restored when it moves) when using a software cursor. Checking pGC->pCompositeClip instead of pDstDrawable->clipList fixes this problem. Fixes: #829 Signed-off-by: Hans de Goede commit 0aaac8d783e78c040a70a55ba8d67809abd7e625 Author: Hans de Goede Date: Mon Jun 24 21:46:26 2019 +0200 modesetting: Disable pageflipping when using a swcursor The miPointerSpriteFunc swcursor code expects there to only be a single framebuffer and when the cursor moves it will undo the damage of the previous draw, potentially overwriting what ever is there in a new framebuffer installed after a flip. This leads to all kind of artifacts, so we need to disable pageflipping when a swcursor is used. The code for this has shamelessly been copied from the xf86-video-amdgpu code. Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/828 Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 0331153b227c1cadf94f912cc02949d7159b02a2 Author: Hans de Goede Date: Mon Jun 24 21:49:59 2019 +0200 modesetting: Fix compiler warning Fix the following compiler warning: drmmode_display.c: In function ‘drmmode_create_bo’: drmmode_display.c:1019:9: warning: ISO C90 forbids mixed declarations and code [ 1019 | uint32_t num_modifiers; | ^~~~~~~~ Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 13f359fa838a9b5e855fbbee9c2f79bad84a1ace Author: Hans de Goede Date: Mon Jun 24 21:20:06 2019 +0200 modesetting: Remove obsolete, unused msPixmapPrivate declaration and macro When the pixmapPrivateKeyRec was moved from a global to being embedded inside the drmmode_rec these 2 where missed, clean them up. Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit f9e7cdf65901665cf5a4efc4df3164337229f3ac Author: Hans de Goede Date: Mon Aug 5 17:12:01 2019 +0200 xf86: dri2: Use va_gl as VDPAU driver for Intel i965 GPUs The modesetting driver (which now often is used with Intel GPUs), relies on DRI2ScreenInit() to setup the DRI and VDPAU driver names. Before this commit it would always assign the same name to the 2 names, but the VDPAU driver for i965 GPUs should be va_gl. This commit adds a special case for the i965 case, replacing the VDPAU driver name with "va_gl" if the GPU is using the i965 driver for DRI. Note this commit adds a FIXME comment for a related memory leak, that leak was already present and fixing it falls outside of the scope of this commit. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1413733 Cc: kwizart@gmail.com Reviewed-by: Emil Velikov Signed-off-by: Hans de Goede commit 6f41bf31051ec915cb4316421d3b7eddfebdd8c6 Author: Ross Burton Date: Thu Aug 1 15:24:51 2019 +0100 sdksyms.sh: don't embed the build path This script generates a header that has a comment containing the build path for no real reason. As this source can end up deployed on targets in debug packages this means there is both potentially sensitive information leakage about the build environment, and a source of change for reproducible builds. commit b7dae57f1d50ca3c8197f894c445a00b92a3ee9c Author: Alan Coopersmith Date: Sun Aug 4 10:28:51 2019 -0700 Fix NO_UNDEFINED build with statically linked fb Stop trying to link to a shared library we no longer build Fixes: commit c1703cdf3b - "xfree86: Link fb statically" Signed-off-by: Alan Coopersmith commit f107bde1e2e8c67eb42d0a5c757c0a1c777b0327 Author: Olivier Fourdan Date: Wed Jul 31 11:14:37 2019 +0200 xwayland: Fix build warning without glamor Building Xwayland without glamor support would raise a warning at build time: xwayland.c: In function ‘xwl_screen_init’: xwayland.c:980:10: warning: unused variable ‘use_eglstreams’ 980 | Bool use_eglstreams = FALSE; | ^~~~~~~~~~~~~~ When building without glamor support, we cannot have EGL Streams support either, the two being related. So we do not need to declare the variable `use_eglstreams` if glamor is not enabled. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 8587bbd85adaa92a429257a7b6f75e60f56cd603 Author: Olivier Fourdan Date: Wed Jul 31 09:25:09 2019 +0200 xwayland: Fix build without glamor When building Xwayland without glamor support enabled using automake, the build would fail at link time trying to find `glamor_block_handler`: /usr/bin/ld: xwayland-glx.o: in function `egl_drawable_wait_x': hw/xwayland/xwayland-glx.c:102: undefined reference to `glamor_block_handler' Make sure we don't try to build `xwayland-glx.c` without glamor in the Xwayland Makefile. Note: Meson build is fine because it's already build only with glamor enabled. Fixes: commit 8469241 - "xwayland: Add EGL-backed GLX provider" Signed-off-by: Olivier Fourdan commit a026972776b303fa640f54e5e8f0fc1abf879071 Author: Jon Turney Date: Mon Mar 16 15:43:07 2015 +0000 Clarify authorization failure reason strings sent back to the client commit c1703cdf3b0d6663fcac68598eefe324ae4e1e71 Author: Adam Jackson Date: Tue Jul 23 11:54:15 2019 -0400 xfree86: Link fb statically There's no real benefit to leaving this loadable, virtually every driver is going to load it. Reviewed-by: Jon Turney commit d9ec525059dbe96fc893c73c0362be2a6dd73e85 Author: Olivier Fourdan Date: Tue Jul 23 11:01:47 2019 +0200 xwayland: Do not free a NULL GBM bo Both `gbm_bo_create()` and `gbm_bo_create_with_modifiers()` can fail and return `NULL`. If that occurs, `xwl_glamor_gbm_create_pixmap()` will not create a pixmap for the (NULL) GBM bo, but would still try to free the bo which leads to a crash in mesa: [...] #7 #8 in gbm_bo_destroy (bo=0x0) at ../src/gbm/main/gbm.c:439 #9 in xwl_glamor_gbm_create_pixmap () at xwayland-glamor-gbm.c:245 #10 in ProcCreatePixmap () at dispatch.c:1440 #11 in Dispatch () at dispatch.c:478 #12 in dix_main () at main.c:276 To avoid the crash, only free the GBM bo if not `NULL`. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Bugzilla: https://bugzilla.redhat.com/1729925 commit 454b3a826edb5fc6d0fea3a9cfd1a5e8fc568747 Author: Adam Jackson Date: Mon Jul 22 13:51:06 2019 -0400 hw: Rename boolean config value field from bool to boolean "bool" conflicts with C++ (meh) and stdbool.h (ngh alright fine). This is a driver-visible change and will likely break the build for mach64, but it can be fixed by simply using xf86ReturnOptValBool like every other driver. Signed-off-by: Adam Jackson commit 074c98cf5365c3d534f7c62ad6dbdd332883b46b Author: Paolo Borelli Date: Mon Jul 22 12:46:31 2019 +0200 Xvfb: set rotations ret value commit a9537cfdd1ed9656f4e29225af8861418b4fd682 Author: Jon Turney Date: Sun Jul 21 14:43:24 2019 +0100 appveyor: Drop building Xorg server (Temporarily) drop building Xorg server (since this doesn't work after a530b6e8) until we come up with a better solution. (See #692) commit 401ff618cf5bb93648c05f025dfa96b0324e94b7 Author: Jon Turney Date: Sat Jul 6 17:58:12 2019 +0100 appveyor: Workaround a Cygwin setup bug Run Cygwin's setup a second time to workaround for it's defective handling of obsolete packages. (Specifically, python3-lxml is currently obsoleted by python36-lxml, but that doesn't get installed on the first run) commit 011b87a8c6e68b992ed27db4e93ae1f1e6dc508f Author: Yaakov Selkowitz Date: Wed Oct 29 14:05:52 2014 +0000 hw/xwin: Add EWMH properties for describing multiple desktops to the root window mate-terminal apparently requires these to be present to work We just set them to describe one desktop, for the moment. It seems we can safely ignore the _NET_WM_DESKTOP property on child windows, and any _NET_WM_DESKTOP messages, as we only support one desktop for windows to be on. Signed-off-by: Jon Turney commit 3d493e91ab66c8f66efaded6b81c87385863b843 Author: Colin Harrison Date: Tue Aug 28 15:30:23 2018 +0100 hw/xwin: Respect -notrayicon option on taskbar restart commit a588e6f81b1d8dfb9076358e5039d3ee6628a50f Author: Jon Turney Date: Thu Jul 2 22:21:28 2015 +0100 hw/xwin: Rename WM_WM_MAP{2,3} to WM_WM_MAP_{UN,}MANAGED WM_WM_MAP was removed in 52e05b92 Rename WM_WM_MAP2 as WM_WM_MAP_UNMANAGED (meaning an override-redirect window, which manages it's own activation) Rename WM_WM_MAP3 as WM_WM_MAP_MANAGED (meaning a normal window, which is activated when clicked) commit a47e7eb247d5c61be43d31b32887dee1dc89ba67 Author: Jon Turney Date: Fri May 9 22:09:38 2014 +0100 hw/xwin: Log counts of pixel formats which couldn't be used Log a count of pixel formats which couldn't be used for various reasons commit 82225aab81d581e943c67c679695a1d15757d69d Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:45:46 2019 +0200 vfb: set gamma size to avoid xrandr to complain about it missing commit 492639f5e167b12ef81c4e4fa0e6a2749cbfe3a0 Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:39:29 2019 +0200 vfb: factor out method to free a single screen info commit 356ffd6729861bc9d0cd059fd8a99d7135fe50dd Author: Ignacio Casal Quinteiro Date: Wed Jul 17 14:18:47 2019 +0200 vfb: no need for else if we are returning commit d0850241c6218f61127c45c2f95d6e791c3fea44 Author: Adam Jackson Date: Mon Jul 15 11:38:44 2019 -0400 xwayland: Expand the RANDR screen size limits There's not really a good way to query this from the wayland server, so just set the maximum to the X11 protocol limits. While we're at it, lower the minimum screen size to something implausibly small too, just in case. Fixes: xorg/xserver#850 Reviewed-by: Michel Dänzer commit fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba Author: Olivier Fourdan Date: Mon Jul 1 13:20:39 2019 +0200 compiler.h: Do not include sys/io.h on ARM with glibc on ARM hasn't worked for a long, long time, so it was removed it from glibc upstream. Remove the include to avoid a compilation failure on ARM with glibc. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840 commit ce9455b5ee389b100a9b7da76b79690d97211b7a Author: Olivier Fourdan Date: Fri Jun 28 16:55:11 2019 +0200 xwayland: Update screen pixmap on output resize Running Xwayland non-rootless and resizing the output would lead to a crash while trying to update the larger areas of the root window. Make sure we resize the backing pixmap according to the new output size to avoid the crash. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/834 Reviewed-by: Michel Dänzer commit a530b6e8923f2b9153a773c8618a1e2f41619288 Author: Adam Jackson Date: Tue Apr 30 18:01:27 2019 -0400 meson: Fix libshadow.so linkage Don't link against fb, it's the driver's responsibility to load that first. Underlinking like this is unpleasant but this matches what autotools does. Fixes: xorg/xserver#540 commit a8d9ebeb43583e8d8ef182ac15adbdce256d4867 Author: Matt Roper Date: Wed Jun 26 09:34:46 2019 -0700 dri2: Sync i965_pci_ids.h from mesa Copied from Mesa with no modifications. This update brings in a significant number of new platform ID's. Syncs with mesa up to commit e334a595e ("intel/icl: Add new ICL PCI-IDs"). Signed-off-by: Matt Roper commit 2f0dd1816d556eef8c4b691330d39f13e1ed93f0 Author: Michel Dänzer Date: Wed Jul 3 11:53:56 2019 +0200 Revert "present/scmd: Check that the flip and screen pixmap pitches match" This reverts commit ef91da2757050652c724f6e674e8b1acf5d0cb31. I thought this couldn't work under any circumstances, but I was wrong, and drivers are already checking for cases that really cannot work. Fixes issue #839. commit fabc4219622f3c0b41b1cb897c46e092377059e3 Author: Samuel Thibault Date: Mon Jul 1 02:33:26 2019 +0200 Fix crash on XkbSetMap Since group_info and width are used for the key actions allocations, when modifying them we need to take care of reallocation key actions if needed. commit 8469bfead9515ab3644f1769a1ff51466ba8ffee Author: Samuel Thibault Date: Mon Jul 1 02:31:02 2019 +0200 Fix crash on XkbSetMap Some devices may not have keyboard information. Fixes #574 commit ff6b771eeea763c19d057e8741a2cadb37db9b68 Author: Jon Turney Date: Thu Mar 8 14:25:54 2018 +0000 hw/xwin: Improve data returned for RANDR queries Set a linear gamma ramp. This avoids the xrandr command always warning 'Failed to get size of gamma for output default' (perhaps we should be using GDI GetDeviceGammaRamp(), if possible?) Make CRTC report non-zero physical dimensions initially commit 2549ab2065ad293139d4e82e5d5a5ea13f7257c9 Author: Jon Turney Date: Fri Mar 9 14:16:01 2018 +0000 hw/xwin: Always keep RANDR fake mode information up to date The rrGetInfo hook is not called for all RANDR requests (e.g. RRGetOutputInfo), so we must always keep the fake mode information up to date, rather than doing it lazily in the rrGetInfo hook) Because we are so bad, most GTK+3 versions treat the output name 'default' specially, and don't try to use RANDR with it. But versions 3.21.6 to 3.22.24, don't do this, and get badly confused by a CRTC with size 0x0. See: https://bugzilla.gnome.org/show_bug.cgi?id=771033 https://bugzilla.gnome.org/show_bug.cgi?id=780101 Future work: Rather than reporting a single fake CRTC with a mode matching the entire virtual display, the fake CRTCs we report should match our 'pseudo-xinerama' monitors commit b078e03410f5f2a004ab9732eb6e5ed24da3edcf Author: Jon Turney Date: Wed Apr 19 14:50:38 2017 +0100 hw/xwin: Make QueryMonitor() slightly less insane Make QueryMonitor() slightly less insane, making it return TRUE if the specified monitor exists, rather than always returning TRUE (which we are uselessly checking, and then also checking if the specified monitor exists) (Note that EnumDisplayMonitors() doesn't seem to have meaningful way to return errors, see 5940580f) Also: Spamming the long UseMsg() after "Invalid monitor number" isn't very helpful. Also: If we are exiting in ddxProcessArgument() due to an error in options, use a non-zero exit status. commit 8f7e4b56d2e0abd09526c7d0eeee15bfb754e557 Author: Jon Turney Date: Sun Oct 8 22:17:40 2017 +0100 hw/xwin: Fix transposed RaiseVolume and LowerVolume scan codes commit bfcaaecc552c7a3d85f6309b8079eb8e6fda8779 Author: Colin Harrison Date: Sat Jun 30 13:43:11 2018 +0100 hw/xwin: Add the Belgian (Comma) keyboard layout commit 188f461463fcc60432f9d7a76ad69ec97631db5d Author: Colin Harrison Date: Thu Feb 22 13:18:42 2018 +0000 hw/xwin: Add Russian keyboard layout commit e39dc0f5b7c88c9ba670383658846a1f658cbc47 Author: Adam Jackson Date: Thu Jun 20 12:15:31 2019 -0400 present: Require presentproto 1.2 The PresentOptionSuboptimal support code is not optional (once you've enabled building Present at all), so require a protocol package version that defines what we need. Fixes: xorg/xserver#821 commit 9acff309434a8029bcce1b22530043459bb71791 Author: Adam Jackson Date: Wed Jun 19 14:23:56 2019 -0400 linux: Fix platform device PCI detection for complex bus topologies Suppose you're in a Hyper-V guest and are trying to use PCI passthrough. The ID_PATH that udev will construct for that looks something like "acpi-VMBUS:00-pci-b8c8:00:00.0", and obviously looking for "pci-" in the first four characters of that is going to not work. Instead, strstr. I suppose it's possible you could have _multiple_ PCI buses in the path, in which case you'd want strrstr, if that were a thing. commit b3f3d65ed302baf78befe45eed458e666e1ff143 Author: Olivier Fourdan Date: Wed Jun 19 09:19:24 2019 +0200 xwayland: Add "-listenfd" option Using the existing command line option "-listen" for passing file descriptors between the Wayland compositor and Xwayland is misleading, Xwayland should add is own command line option for that specific use. As XWayland is spawned by the Wayland compositor, we cannot just change the option, as that would break all existing Wayland compositors using Xwayland, so we add a new options "-listenfd" and mark the previous one as deprecated and log a warning, but it still works for backward compatibility. Signed-off-by: Olivier Fourdan https://gitlab.freedesktop.org/xorg/xserver/merge_requests/214 commit 4a287cc2b6d849c29b43af07d93fa0048d8d6e90 Author: Olivier Fourdan Date: Tue Jun 18 10:41:02 2019 +0200 xwayland: Allow for regular transport types for listen Xwayland uses the command line option “-listen” to pass file descriptors from the Wayland compositor. That breaks the traditional, documented behavior of the “-listen” command line option which is to enable a transport type. Checks if the given option starts with a digit, otherwise treat it as a regular transport type. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/817 Suggested-by: Rodrigo Exterckötter Tjäder Signed-off-by: Olivier Fourdan commit 0dc0cef4959dfb16d8334f235150733e634e2ba9 Author: Adam Jackson Date: Tue Jun 18 14:52:04 2019 -0400 xwayland-glx: Fix GLX visual mask setup a2rgb10 configs would end up with channel masks corresponding to argb8888. This would confuse the GLX core code into matching an a2rgb10 config to the root window visual, and that would make things look wrong and bad. Fix this by handling more cases. We're still not fully general here, and this could still be wrong on big-endian. The XXX comment about doing something less ugly still applies, ideally we would get this information out of EGL instead of making lucky guesses. Still, better than it was. Fixes: xorg/xserver#824 commit 2afee831a439add6cca5b7fa8c76a9de4326b2b7 Author: Jon Turney Date: Thu Jan 5 13:17:59 2017 +0000 hw/xwin: Add an option to use alpha channel in multiwindow mode Add an option to turn on the use of the X window's alpha channel in multiwindow mode, i.e. this uses the X window's alpha channel for compositing into the native desktop. This works on W7/Vista (using DwmEnableBlurBehindWindow()), and Windows 10 (using the undocumented SetWindowCompositionAttribute()), but not on Windows 8/8.1 -compositewm must be enabled for this to be useful, as we only have a pixmap with an alpha channel for the X window in that case. The framebuffer/root window doesn't have one (unless perhaps you are using the rootless extension, maybe...). v2: Update meson.build Future work: A window property to control use of alpha? Option to turn off blur on W7/Vista Implement _NET_WM_WINDOW_OPACITY commit 2e1bc743734cc1e1043c8f2c9497a5a172507bc9 Author: Jon Turney Date: Tue Dec 1 19:33:38 2015 +0000 hw/xwin: Set convenience variables for WM_CREATE as well Set convenience variables in winTopLevelWindowProc() for WM_CREATE as well. commit f67918353a14dad8aa75c965e036d106e7d2d1a4 Author: Jon Turney Date: Sat Nov 7 19:44:09 2015 +0000 hw/xwin: Improve performance of -compositewm I think that a major cost in the current implementation is doing a CreateDIBSection()/DestroyObject() on every refresh. So provide our own CreatePixmap() instead, which does the CreateDIBSection(), once. Testcase: glxgears or foobillard with direct swrast Testcase: scrolling in a full-screen xterm v2: Fix handling of RENDER Scratch Pixmaps (A problem easily shown with gitk or emacs) v3: Note that we don't own screen pixmap to release in DestroyPixmap Log if unimplemented slow-path ever gets hit commit 6865fe71477206d989f982235fc32be4ff164ccd Author: Jon Turney Date: Mon Aug 10 20:16:16 2015 +0100 hw/xwin: Avoid artefacts when resizing a window Fill the area outside the current window size with black, rather than leaking framebuffer contents or leaving it undrawn. commit ebcea16e71cd9c037351f2dc4527ca696346c8a6 Author: Jon Turney Date: Mon Aug 3 16:47:38 2015 +0100 hw/xwin: A simpleminded attempt at composition Rather than drawing the window contents from the shadow framebuffer, use Composite extension redirection to cause the server to maintain a bitmap image of each top-level X window, and draw the window contents from that, so that window contents which are occluded in the framebuffer show correctly in the task bar and task switcher previews. v2: Fix incorrect use of memset() found by gcc5 hw/xwin/winshadgdi.c: In function ‘winBltExposedWindowRegionShadowGDI’: hw/xwin/winshadgdi.c:861:9: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args] v3: Turn on -compositewm by default v4: Ignore -swcursor if -compositewm -swcursor is not compatible with -compositewm (because the window contents are drawn from an off-screen pixmap, not from the screen pixmap, where the software cursor will be drawn). v5: Update meson.build also Add -compositewm option to help output Update CI to install prerequisites commit adebc376b9fbda53d234a27f11eea9a0b945b50e Author: Jon Turney Date: Mon Aug 3 15:59:40 2015 +0100 hw/xwin: Push multiwindow wndproc WM_PAINT down into drawing engine Push the multiwindow wndproc WM_PAINT handling down into the drawing engine. Only the GDI engine is supported in multiwindow mode currently, so we only need to do this in the GDI engine. commit 065f73353bfa5667e0fb4f42e338978b40e86652 Author: Jon Turney Date: Mon Aug 3 11:39:36 2015 +0100 hw/xwin: Align winBltExposedRegionsShadowGDI with winTopLevelWindowProc's WM_PAINT Make winBltExposedRegionsShadowGDI() do the same stuff that winTopLevelWindowProc()'s WM_PAINT handler does. Note that winBltExposedRegionsShadowGDI() is currently used 1) in windowed mode when the GDI engine is selected, and 2) in multiwindow mode when "Hide Root Window" is off. commit f4cdbf640b6440df4af784ca35e1b1340965cc10 Author: Peter Hutterer Date: Wed May 29 16:19:55 2019 +1000 Xi: return AlreadyGrabbed for key grabs > 255 We can't have high keycodes because everything in XKB relies on 8 bits. XI2's API allows for 32-bit keycodes so we have to take those but nothing in the server is really ready for this. The effect of this right now is that any high keycode grab is clipped to 255 and thus ends up grabbing a different key instead. https://bugzilla.redhat.com/show_bug.cgi?id=1697804 Signed-off-by: Peter Hutterer commit dea4a74621294391ce5901bb3339e1b8e7151efc Author: Carlos Garnacho Date: Wed May 22 17:51:04 2019 +0200 xwayland: Reset scheduled frames after hiding tablet cursor Hiding the tablet tool cursor results in it being hidden forever after. This is due to the stale frame callback that will neither be disposed or replaced. This can be reproduced in krita (X11) as the pointer cursor is hidden while over the canvas. Clearing the frame callback ensures the correct behavior in future xwl_tablet_tool_set_cursor() calls (i.e. a new cursor surface being displayed, and a new frame callback created), and is 1:1 with xwl_seat_set_cursor() for pointers. Signed-off-by: Carlos Garnacho commit 26fe29f4fa53cbb7d51892e2cf397c084093812f Author: Olivier Fourdan Date: Fri Apr 26 13:37:09 2019 +0200 glamor: Make pixmap exportable from `gbm_bo_from_pixmap()` If a pixmap is not exportable, `glamor_gbm_bo_from_pixmap()` would fail and the modesettings driver would consequently fail to do its page flip, which both prevents Present from working and also fill up the logs with error messages such as: (EE) modeset(0): Failed to get GBM bo for flip to new front. (EE) modeset(0): present flip failed Refactor the code so that `glamor_gbm_bo_from_pixmap()` takes care of making the pixmap exportable. Signed-off-by: Olivier Fourdan Signed-off-by: Yuxuan Shui yshui@hadean.com See-also: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/131 Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/68 Fixes: 86b2d8740a "glamor: Reallocate pixmap storage without modifiers if necessary" commit 48f4ab750955106cd650bb5d3fb1c44d7696aafa Author: Olivier Fourdan Date: Tue Mar 12 17:25:41 2019 +0100 xwayland: check `glamor_set_pixmap_texture()` status With `glamor_set_pixmap_texture()` returning its status, remove the hack and use the return value. Signed-off-by: Olivier Fourdan commit 9e37e41fa78a33b95fd78e92b74b961086ab712b Author: Olivier Fourdan Date: Tue Mar 12 17:15:10 2019 +0100 glamor: return status from `glamor_set_pixmap_texture()` Chnage the API for `glamor_set_pixmap_texture()` to return a status, so that the caller can know whether it succeeded or not. Signed-off-by: Olivier Fourdan commit fc6380a11be4c6202ed72f241dd9ee8c7c24671d Author: Olivier Fourdan Date: Tue Mar 12 15:38:03 2019 +0100 xwayland: Check status in GBM pixmap creation The current code in `xwl_glamor_gbm_create_pixmap_for_bo()` may fail in several cases that are not checked for: - `eglCreateImageKHR()` may have failed to create the image, - `glEGLImageTargetTexture2DOES()` may fail and set an error, - `glamor_set_pixmap_texture()` may fail for very large pixmaps because the corresponding FBO could not be created. Trying to upload content to a pixmap with no texture will crash Mesa, glamor and Xwayland, e.g.: XXX fail to create fbo. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x29) (EE) 1: libpthread.so.0 (funlockfile+0x50) (EE) 2: libc.so.6 (__memmove_avx_unaligned_erms+0x215) (EE) 3: dri/i965_dri.so (_mesa_format_convert+0xab3) (EE) 4: dri/i965_dri.so (_mesa_texstore+0x205) (EE) 5: dri/i965_dri.so (store_texsubimage+0x28c) (EE) 6: dri/i965_dri.so (intel_upload_tex+0x13b) (EE) 7: dri/i965_dri.so (texture_sub_image+0x134) (EE) 8: dri/i965_dri.so (texsubimage_err+0x150) (EE) 9: dri/i965_dri.so (_mesa_TexSubImage2D+0x48) (EE) 10: Xwayland (glamor_upload_boxes+0x246) (EE) 11: Xwayland (glamor_copy+0x4d1) (EE) 12: Xwayland (miCopyRegion+0x96) (EE) 13: Xwayland (miDoCopy+0x43c) (EE) 14: Xwayland (glamor_copy_area+0x24) (EE) 15: Xwayland (damageCopyArea+0xba) (EE) 16: Xwayland (compCopyWindow+0x31c) (EE) 17: Xwayland (damageCopyWindow+0xd3) (EE) 18: Xwayland (miResizeWindow+0x7b7) (EE) 19: Xwayland (compResizeWindow+0x3a) (EE) 20: Xwayland (ConfigureWindow+0xa96) (EE) 21: Xwayland (ProcConfigureWindow+0x7d) (EE) 22: Xwayland (Dispatch+0x320) (EE) 23: Xwayland (dix_main+0x366) (EE) 24: libc.so.6 (__libc_start_main+0xf3) (EE) 25: Xwayland (_start+0x2e) (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Check for the possible cases of failure above and fallback to the regular glamor pixmap creation when an error is detected. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/661 commit 766bf01b21306ec6bcf5ca884c0af15bdcde25f6 Author: Adam Jackson Date: Thu May 16 15:48:14 2019 -0400 glamor: Fix more fallback paths with non-GXcopy rop with GLES Desktop GL can handle arbitrary rops here, GLES can't. The switch statement attempts to optimize some cases that GLES can still handle if we precompute the right pixel value, but we were then throwing that pixel value away and using gc->fgPixel anyway. Fix this, and now xts-render passes against glamor+gles. commit 8469241592b94b002a975274a596ca0dcdd9563f Author: Adam Jackson Date: Wed May 8 14:09:00 2019 -0400 xwayland: Add EGL-backed GLX provider Without this we're using driswrast to set up GLX visuals. This is unfortunate because llvmpipe does not expose multisample configs, so various apps that expect them will fail. With this we just query the capabilities of the EGL that's backing glamor, and reflect that to the GLX clients. This also paves the way for xserver to stop being a DRI driver loader, which is nice. Fixes: xorg/xserver#640 Fixes: xorg/xserver#643 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=98272 Reviewed-by: Olivier Fourdan Signed-off-by: Adam Jackson commit b4231d69028adc8123801a7552b40a15ea928d1b Author: Aaron Plattner Date: Tue May 21 10:50:42 2019 -0700 GLX: Set GlxServerExports::{major,minor}Version Commit 56c0a71fdd94a008e5d746261f70a713c4767f93 incremented the GLXSERVER_VENDOR_ABI_MINOR_VERSION define, but this define was not actually being used to set glxServer.minorVersion. Update the initializer for glxServer to use the correct version numbers. Signed-off-by: Aaron Plattner commit 0a07446318f248b65fcbc8ab8a73ead51153f09e Author: Olivier Fourdan Date: Thu May 9 10:36:19 2019 +0200 xwayland: Avoid a crash on pointer enter with a grab On pointer enter notification, Xwayland checks for an existing pointer warp with a `NULL` sprite. In turn, `xwl_pointer_warp_emulator_maybe_lock()` checks for an existing grab and the destination window using `XYToWindow()` which does not check for the actual sprite not being `NULL`. So, in some cases, when the pointer enters the surface and there is an existing X11 grab which is not an ownerEvents grab, Xwayland would crash trying to dereference the `NULL` sprite pointer: #0 __GI_raise () #1 __GI_abort () at abort.c:79 #2 OsAbort () at utils.c:1351 #3 AbortServer () at log.c:879 #4 FatalError () at log.c:1017 #5 OsSigHandler () at osinit.c:156 #6 OsSigHandler () at osinit.c:110 #7 #8 XYToWindow (pSprite=0x0, x=0, y=0) at events.c:2880 #9 xwl_pointer_warp_emulator_maybe_lock () at xwayland-input.c:2673 #10 pointer_handle_enter () at xwayland-input.c:434 Avoid the crash by simply checking for the sprite being not `NULL` in `xwl_pointer_warp_emulator_maybe_lock()` Signed-off-by: Olivier Fourdan Bugzilla: https://bugzilla.redhat.com/1708119 commit 965eda947d4c847c6e520317b57024b4586507ec Author: Jon Turney Date: Thu Apr 25 23:11:08 2019 +0100 mi: Provide ffs when compiling using MinGW I don't know how I feel about the promise made in 2e7f790b :) commit a838c840a3f8c55157615f072b9a3c3a4b476b37 Author: Jon Turney Date: Thu Apr 25 22:44:49 2019 +0100 os: Ensure sigset_t is provided when compiling for MinGW Only _sigset_t is defined by MinGW's signal.h commit 7b4b030df8f9c994f3dc60cf85e74d234464af28 Author: Jon Turney Date: Thu Jul 28 14:46:15 2016 +0100 configure: Check for sigprocmask MinGW defines SIG_BLOCK, but doesn't have signal masks, so rather than checking for SIG_BLOCK, add a configure check for sigprocmask. v2: Also add check to meson.build commit 6c5d048095379a85f1862429b9049edc1c82e167 Author: Jon Turney Date: Thu Jul 28 14:09:51 2016 +0100 os: Fix build of xserver_poll.c on MinGW Include winsock.h for definition of fd_set type and select() Future work: Maybe this also needs some error checking for fd > FD_SETSIZE? commit 246b729df87e94e405a8b257f34a22fa2719d30c Author: Jon Turney Date: Thu Jul 28 14:26:38 2016 +0100 configure: Force --disable-input-thread for MinGW I don't think an input thread can ever be useful on Windows. There is a pthread emulation, so having the thread itself isn't much of a problem. However, there is no device to wait on for Windows events, and even if we were to replace select() with WFMO, Windows wants to send events for a window to the thread which created that window. So, disable input thread by default for MinGW v2: Also add similar to meson.build commit 29a8baa031a87ef44d1e5320ecec5015d26fd385 Merge: 2aec5c3c8 56c0a71fd Author: Aaron Plattner Date: Fri May 17 08:39:50 2019 -0700 Merge commit 'refs/merge-requests/194/head' of gitlab.freedesktop.org:xorg/xserver commit 56c0a71fdd94a008e5d746261f70a713c4767f93 Author: Kyle Brenneman Date: Thu May 2 07:17:21 2019 -0600 GLX: Add a function to change a clients vendor list. Add a new function, GlxServerExports::setClientScreenVendor, which will change the vendor that handles GLX requests for a screen, but only for requests from a specific client. v2: Increment the GLXVND minor version number. v3: Note the GLXVND version requirement for setClientScreenVendor. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 8b67ec7cc6fda243480a5a8ca118b66242f3eb2c Author: Kyle Brenneman Date: Wed May 8 08:44:54 2019 -0600 GLX: Use the sending client for looking up XID's When GlxGetXIDMap looks up an unknown XID, it will now look up a vendor based on the screen number for the XID and the client that sent the current request. In GlxGetXIDMap, if the XID is for a regular X window, then it won't be in the (XID -> vendor) mapping, so we have to look up a vendor by screen number. With this change, GlxGetXIDMap will use the (screen -> vendor) map for whichever client sent the current request, instead of using the global (screen -> vendor) map. Since GlxGetXIDMap doesn't take a ClientPtr argument, GlxDispatchRequest will store the client for the current request in a global variable. That way, the ABI for GLXVND doesn't need to change. v2: Fix an error check in GlxDispatchRequest. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 37a36a6b5b887d5c5a17a6931ceba8ad5d1bb6d5 Author: Kyle Brenneman Date: Thu Oct 19 15:14:51 2017 -0600 GLX: Add a per-client vendor mapping. Each client now has its own (screen, vendor) mapping. Currently, it's just a copy of the global mapping, but later changes will allow it to change. Signed-off-by: Aaron Plattner Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson commit 2aec5c3c812ffe4a85b5e62452b244819a812dd6 Author: Adam Jackson Date: Tue May 14 12:39:23 2019 -0400 glx: Fix potential crashes in glXWait{GL,X} glxc->drawPriv will be NULL if the context is direct, or if it is current but without a bound drawable. Mesa's libGL won't normally emit protocol for direct contexts for these calls, but a malign client could still crash the server. commit a0f738a67327ca1315bacdf543c28cc3046989dc Author: brian Date: Thu May 2 16:25:50 2019 -0500 Fixed ioperm calls in hwEnableIO commit bb46e785405891775a30636a647e40a7dc4d1ca7 Author: Topi Miettinen Date: Wed May 1 18:07:03 2019 +0300 os: add support for systemd notification It can take some time for Xorg to start. If Xorg runs as a systemd service and other services are based on it, they have no way to determine when Xorg is really ready to accept requests. Let's use sd_notify() provided by libsystemd to signal systemd for readiness. If Xorg has not been started as a systemd service, this won't do anything. Signed-off-by: Topi Miettinen commit 9d25408a59d6273f1c4c994de9cc53f488a8ec3c Author: Adam Richter Date: Thu May 2 15:02:36 2019 -0700 assert(a && b) --> assert(a); assert(b) Separate each statement of the form "assert(a && b);" into "assert(a);" and "assert(b);" for more precise diagnostics, except for this clever use in drmmode_display.c where it was used to pass a hint to developers: assert(num_infos <= 32 && "update return type"); commit dd1aebccf2e1722ac10fb73ed438251785283b8d Author: Jon Turney Date: Sat Apr 20 13:50:57 2019 +0100 travis: Suppress uninteresting warnings on OSX Suppress uninteresting warnings on OSX that we are drowning in, turned on by default in meson. commit f0e22a76c93c98d67dbd5c966812b2901de5ed49 Author: Jon Turney Date: Fri Apr 19 15:37:22 2019 +0100 travis: Add OSX meson build to matrix Unfortunately, a 'brew update' is currently needed to get the meson >= 0.46.0 required by xserver. commit 0bdfa5bc0ab050ce74c2289178f2f89790e2c8ef Author: Jon Turney Date: Sat Apr 20 01:24:21 2019 +0100 travis: Don't produce fat binaries on OSX Trying to build fat binaries for multiple arches tickles a bug [1] in the framework detector in meson 0.50. Workaround this by not bothering building for x86, which is probably no great loss :S https://github.com/mesonbuild/meson/issues/5290 commit 655b1eb32e3f7f9ba587e878a691fbc9195e81f5 Author: Jon Turney Date: Thu Apr 18 17:06:41 2019 +0100 meson: Convert xquartz from autotools Differences from autotools: * Autotools defined NO_ALLOCA for OSX builds. I don't think we need this anymore as Xalloc.h is no longer used anywhere in the xserver. * X11.bin is linked with -u,miDCInitialize, and then libserver_mi provided to satisfy (just) that. It's been that way since the commit which added it. We can't write the equivalent in meson due to linker argument ordering issues, but do we really need to? * An explicit -Dsecure-rpc=false is required for OSX, since in meson we don't do the checks that XTRANS_SECURE_RPC_FLAGS did for the existence of the specific RPC functions required. commit e5f4c7c80b3f15b1941c530e58fbded0fd06a97e Author: Jon Turney Date: Fri Apr 19 14:03:58 2019 +0100 xquartz: Fix a typo in man page substitution The typo fixed in d69460159 was still present for this setting when added in ac439842. meson warns that there is no substitution with this name. commit ecf62b7ba6e7eba1a3f3a50d46eaf9f4f11550c4 Author: Jon Turney Date: Fri Apr 19 14:01:48 2019 +0100 meson: Build rootless extension commit b4ed20c4f118031305f6ce76dda4e325950b2958 Author: Jon Turney Date: Sat Apr 20 12:45:11 2019 +0100 Promote file containing date & time build was configured to top-level Promote the generated file containing the date & time build was configured to top-level. Rename it from xf86Build.h to buildDateTIme.h. Use it as well in XQuartz, stringize BUILD_DATE when needed. commit 71cff63c06a6b494dc8921270535f33fb78bd32b Author: Adam Richter Date: Wed May 1 15:22:15 2019 -0700 hw/dmx/glxProxy/glxcmds.c CreateContext(): free glxc->real_ids and glxc in a couple of error branches, per complaints from cppcheck. commit b6eb8cf03f5850d13ec21101ec1783a444aefcab Author: Adam Richter Date: Wed May 1 15:22:02 2019 -0700 hw/xfree86/os-support/linux/lnx_agp.c xf86GetAGPInfo(): free(info) in an error path, caught by cppcheck. commit 99904a3a7b10f8a8314e7ab6b8c4af41cb445693 Author: Adam Richter Date: Wed May 1 15:21:48 2019 -0700 hw/xwin/glx/indirect.c glxWinScreenProbe(): Add free(screen) that was missing from an error path. Caught by cppcheck. commit 007d812a832cf32b02542bbae13a3997e655171a Author: Adam Jackson Date: Tue Apr 30 13:40:43 2019 -0400 glx: Fix GLX_CONTEXT_RELEASE_BEHAVIOR_ARB handling None of this was getting compiled because we hadn't defined the macro (and aren't getting them from because reasons). Fix that. Fixes: xorg/xserver#684 commit a2302de6feb43dd10b159661d5fe7d2036c6c020 Author: Jon Turney Date: Thu Oct 13 14:20:14 2016 +0100 hw/xwin: Remove mwextwm mode This has always been described as 'experimental' We don't think this has any users: This mode has been disabled in Cygwin packages since March 2016. We've never provided the xwinwm WM for x86_64 Cygwin. No one has even asked where the option has gone. This leaves XQuartz as the only user of the rootless extension. Remove --enable-windowswm configure option Remove multiwindowextwm stuff from Makefiles Remove -mwextwm option Remove -mwextwm from man-page and help Un-ifdef XWIN_MULTIWINDOWEXTWM v2: Remove rootless include paths Remove windowswmproto from meson.build commit 504468d2cf56c6588342249c4625a0bfadf0751d Author: Jon Turney Date: Fri Apr 26 19:46:05 2019 +0100 meson: Don't use strndup() unless it's prototyped A workaround for https://github.com/mesonbuild/meson/issues/3672 MinGW-w64 gcc has a built-in strndup, but it's not in the C library and MinGW-w64 headers don't prototype it. Don't try to use it, as that will cause an undefined reference if gcc decides that an out-of-line call is appropriate. commit d3a528c91ec77b29d4d70091f5eb6939919a19ab Author: Jon Turney Date: Thu Apr 25 23:21:46 2019 +0100 Remove unneeded include of dix.h from strcasestr.c In the meson build, functions to make up for the shortcomings of libc are compiled into a separate library. We don't bother making the pixman headers available (reasonably enough) to this compilation, but they are required indirectly by dix.h. Just remove this unneeded include. commit fd52110ec44b97359c2d75bb54047e6de10ed856 Author: Jon Turney Date: Fri Apr 26 01:09:25 2019 +0100 meson: Don't try to build tests on Windows Most of these could be made to work, but would need to be ported off using fork and poll... commit 50b8670fdf7ab9195617145c229d8fae8519f5a9 Author: Jon Turney Date: Fri Apr 26 01:00:28 2019 +0100 meson: Require clock_gettime() as well for MONOTONIC_CLOCK As configure.ac, require that clock_gettime() exists as well to use MONOTONIC_CLOCK (MinGW provides the define, but not the function) commit 92a52611f6ee2777cb11d5125c04a983b9a662d1 Author: Jon Turney Date: Fri Apr 26 00:46:09 2019 +0100 meson: Link with ws2_32 for socket functions on Windows commit d21224cd150e28c2868c8d194e68fe4474cdce1b Author: Jon Turney Date: Fri Apr 26 00:32:29 2019 +0100 meson: Don't set UNIXCONN on Windows As XTRANS_CONNECTION_FLAGS did, don't try to build unix socket support on Windows. commit 93a1cdcc78bc909e25a224b76ae8f6a90322d0ba Author: Jon Turney Date: Thu Apr 25 14:53:38 2019 +0100 meson: Fix hw/xwin for -Dglx=false hw/xwin/meson.build:140:0: ERROR: Unknown variable "xwin_windowsdri". hw/xwin/meson.build:141:0: ERROR: Unknown variable "xwin_glx". commit 331850ce6f0c48a1cfc489da2a27ca0220997a2f Author: Jon Turney Date: Thu Apr 25 14:39:58 2019 +0100 meson: Fix value of libglxvnd in -Dglx=false build hw/vfb/meson.build:7:0: ERROR: '' is not a target. commit c2feeca1b008fb01b2128daef2dc361dfb193a41 Author: Jon Turney Date: Sun Apr 28 21:56:20 2019 +0100 meson: Absence of dri.pc is an error if building with GLX Currently, this can error if dri.pc isn't found, as we can't then get the value of pkgconfig variable from it: include/meson.build:199:10: ERROR: 'dri' is not a pkgconfig dependency I think we need DRI_DRIVER_PATH (only) when building GLX, even if dri2/3 isn't enabled, so we know where to load swrast_dri.so from. (For autotools, configure.ac directly calls `pkg-config --variable=dridriverdir dri`, the backticks swallowing any error, causing the value of this define to be empty if dri.pc isn't present) commit 1f5742d27187fabba0c556b50ebfcd9fddfdcf2b Author: Jon Turney Date: Mon Dec 17 12:01:59 2018 +0000 meson: Fix building unit tests when protocol headers aren't in default include path commit f013979507da96377fad0e58b0699d9de051bb39 Author: Jon Turney Date: Thu Apr 18 11:37:32 2019 +0100 xquartz: Add stub ddxInputThread() Omitted from 4ad21c32 commit 836f93de99b35050d78d61d3654f7c5655184144 Author: Fabrice Fontaine Date: Fri Apr 19 10:19:50 2019 +0200 hw/xwayland/Makefile.am: fix build without glx Commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b added libglxvnd.la to Xwayland_LDFLAGS but GLX can be disabled through --disable-glx. In this case, build fails on: make[3]: *** No rule to make target '../../glx/libglxvnd.la', needed by 'Xwayland'. Stop. make[3]: *** Waiting for unfinished jobs.... Fixes: - http://autobuild.buildroot.org/results/397f8098c57fc6c88aa12dc8d35ebb1b933d52ef Signed-off-by: Fabrice Fontaine commit 0854732d55a76cdb584306e8e653c2bcd292a7cb Author: Diego Viola Date: Fri Apr 19 22:13:46 2019 -0300 ephyr: fix typo: rquires -> requires Signed-off-by: Diego Viola commit 9c7ebf259f49f5e63906f572a1101747ac023b72 Author: Jon Turney Date: Sun Sep 17 14:55:04 2017 +0100 appveyor: Use ccache Reduces i686 cygwin no-change build time from ~7 minutes to ~2.5 minutes commit 16d851375994332844fd434ed91fc6c0c24f8983 Author: Jon Turney Date: Thu Apr 18 12:44:40 2019 +0100 appveyor: Drop cleaning of packaged libtool .la files Not needed as meson doesn't use libtool. I think they've all been rebuilt now, in any case... commit f3e6002d79aa51633ef06e34c2b13553ae008218 Author: Jon Turney Date: Thu Apr 18 12:01:54 2019 +0100 appveyor: Drop trying to preserve build artefacts We stopped staging them in 1519475a, so this did nothing. commit 883530835d463124fcc9bc6143ef139819f6c981 Author: Jon Turney Date: Thu Apr 18 12:07:34 2019 +0100 appveyor: Drop installing unnecessary packages Drop installing packages which were used by the autotools build (or maybe even monolithic build!) but are no longer required by the meson build Also, alphabetically sort within tools, protocol headers, devel libraries, miscellaneous groups to match [1] [1] https://x.cygwin.com/docs/cg/prog-build-prerequisites.html Also, update to require xkbcomp-devel, split from xkbcomp commit 6370cf026ae0d752b0f28d4a25fd22c60fea26f0 Author: Jon Turney Date: Wed Aug 8 17:29:55 2018 +0100 appveyor: Reformat an absurdly long line in .appveyor.yml Using YAML line-folding doesn't seem possible, as setup doesn't tolerate spaces between package names, so instead drop some unneeded double quotes, double quote the whole thing and escape newlines commit 7f962c70b6d9c346477f23f6c15211e749110078 Author: Alex Goins Date: Wed Apr 10 13:48:02 2019 -0500 xsync: Add resource inside of SyncCreate, export SyncCreate As shown by DRI3 adding the SyncCreateFenceFromFD() function, extensions may want to create a fence, then initialize it in their own way. This currently can't be done without adding a function directly to Xext/sync.c due to the fact that the RTFence resource type is private and there is no external interface to add to it. To facilitate other X extensions creating fences and initializing them, this change exports SyncCreate() and adds the resource directly within it. Callers no longer need to call AddResource() after SyncCreate(), they only need to initialize the SyncObject. To prevent FreeFence() and FreeCounter() from segfaulting if the call to AddResource() fails before the sync object is initialized, this adds a new 'initialized' parameter to SyncObject that, when FALSE, causes FreeFence() and FreeCounter() to skip de-initialization and simply free the object. Initialization after adding the resource shouldn't otherwise be a problem due to the single-threaded nature of X. Signed-off-by: Alex Goins Reviewed-by: James Jones Signed-off-by: Aaron Plattner commit 8702c938b33b9ec180d64754eb922515c7c4a98b Author: Eric Anholt Date: Tue Mar 26 15:10:49 2019 -0700 glamor: Introduce a central place for our pixmap format/type handling. We had various helper functions trying to come up with the internalformat/format/type/render formats for pixmaps, and it's much nicer to just detect what those should be once at startup. This gives us a chance to do the right thing for GLES. It also, notably, fixes our format/type for depth 15 and 16 setup for desktop GL, so that we actually allocate 16bpp (GL_RGB/565) on most drivers instead of 32bpp (GL_RGB/UBYTE). GLES still has regressions over desktop (2 regressions in llvmpipe XTS, many in rendercheck), but I think this is a good baseline. Signed-off-by: Eric Anholt commit c94da112a77bfc8c6b45ffe31c04e6b7931a3c9a Author: Eric Anholt Date: Tue Mar 26 16:57:24 2019 -0700 glamor: Plumb the pixmap through fbo creation instead of a "format" For GLES, we're going to need a lot more logic for picking the iformat/format/type of texture setup, so we'll want the pixmap's depth and is_cbcr flag. Signed-off-by: Eric Anholt commit 34485be2560ea6f96a849b5d05edb1de28caf2f3 Author: Eric Anholt Date: Tue Mar 26 15:58:59 2019 -0700 glamor: Stop trying to store the pixmap's "format" in glamor_pixmap_fbo. "format" is a bit of a confused term (internalformat vs GL format), and all we really needed was "is this GL_RED?" Signed-off-by: Eric Anholt commit 1b2e224d7dca9d6d86d6150ba0a5ddf0abee1f22 Author: Eric Anholt Date: Tue Mar 26 15:02:38 2019 -0700 glamor: Switch the gl_flavor to a boolean is_gles. There are only 2 flavors we are distinguishing -- GL versions are handled separately. Signed-off-by: Eric Anholt commit 2764128e9fe775fabe28b0b9be427c16754e7128 Author: Jon Turney Date: Wed Apr 17 11:43:57 2019 +0100 Fix missing prototype warning for xf86_find_platform_device_by_devnum() ../hw/kdrive/src/kdrive.c:999:1: warning: no previous prototype for ‘xf86_find_platform_device_by_devnum’ [-Wmissing-prototypes] Place the same guards around this stub as are around including the hotplug.h header which declares the prototype. commit ba59427abae3a8b260e66fcfab90c9de96c3e01c Author: Jon Turney Date: Wed Apr 17 11:37:56 2019 +0100 Fix maybe-uninitialized warning in xf86NewInputDevice() If SYSTEMD_LOGIND is not defined, systemd_logind_take_fd is defined as a macro evaluating to -1 by systemd-logind.h, leaving paused uninitialized. ../hw/xfree86/common/xf86Xinput.c: In function ‘xf86NewInputDevice’: ../hw/xfree86/common/xf86Xinput.c:919:16: warning: ‘paused’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xfree86/common/xf86Xinput.c:877:10: note: ‘paused’ was declared here commit 7c266cafed14b38c039091651069ae9888c3a8ae Author: Jon Turney Date: Wed Apr 17 11:37:11 2019 +0100 Fix old-style definition warning for xf86OSInputThreadInit() ../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’: ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition] commit 6975807945d12c07f00e18df7fafeff43efa0267 Author: Adam Jackson Date: Thu Mar 14 16:37:35 2019 -0400 dix: Remove WindowRec::backStorage This is only being set, never read. commit 0f477cc68bbfe37555f73313dcc50b303c3ca210 Author: Adam Jackson Date: Thu Mar 14 16:34:40 2019 -0400 dix, composite: Optimize setting window backing store state We hide CWBackingStore from the screen hook if nothing's actually changing, which means compChangeWindowAttributes no longer needs to compare the requested state with the present one. commit 4e101e7e3b4d3e6cdb38f1cd60a764aaade5c4a2 Author: Adam Jackson Date: Thu Mar 14 16:19:02 2019 -0400 mi: Simplify a conditional in miHandleExposures miHandleExposures does two things: computes the region for which to generate expose events, and (if the destination is a window) paints the exposed regions with the background. The bit of this conditional we're deleting here asserts that the source is either a pixmap or a window without backing store. The only other possibility is a window _with_ backing store. In the old backing store implementation, this was where you would recover bits from backing store. Since our "backing store" is the redirected window pixmap, we know we've already copied all we could, because CopyArea had already seen the entire window pixmap. So now in that third case, we are still drawing to a pixmap (so there's no background to paint) and we are still not generating events, so we can exit early. The comment above the function about recovering bits from backing store is clearly misleading, so delete that too. commit 147ed28bbf78f6b75a22b21458785aea536e44f8 Author: Aaron Plattner Date: Wed Apr 3 13:11:14 2019 -0700 xfree86: Export xf86GPUScreens and xf86NumGPUScreens Drivers may need to loop over the allocated screens during PreInit, for example to consolidate xorg.conf options that apply to a GPU device as a whole. Currently, this works for protocol screens becuase x86Screens is exported, but does not work for GPU screens. Export xf86GPUScreens and xf86NumGPUScreens for consistency with xf86Screens and xf86NumScreens. Signed-off-by: Aaron Plattner commit 0a005c4fe4fccc9bb6c3a5266065f8437621fdb9 Author: Eric Anholt Date: Thu Apr 4 16:26:26 2019 -0700 test: Fix meson build with xvfb disabled. Fixes #678 Signed-off-by: Eric Anholt commit 8ab80fd5057f3d954ac6dc310cc8773e9694a0b1 Author: Dave Airlie Date: Fri Mar 29 08:44:07 2019 +1000 xf86: set status to connected for monitors enabled in conf If the user sets Option "Enable" "TRUE" for a monitor, the X server will connect the connector a crtc but tell the user it is disconnected. However the user in this case is mutter, when it gets it's view of the output configuration it sees the output is disconnected and never sets it up again, which seems like the right thing to do. If we let the user enable a monitor, lets just set it as always connected. Reviewed-by: Olivier Fourdan Signed-off-by: Dave Airlie commit f1790339d0c4cf09aa1b3f68c01d66eab1901718 Author: Jon Turney Date: Sun Mar 31 16:35:16 2019 +0100 tests: Always separate rendercheck -f and -o options with a space commit fee147d75eef91be8cbfdd77dd444cc65c29b038 Author: Michel Dänzer Date: Fri Mar 29 10:12:40 2019 +0100 gitlab-ci: Retry jobs after runner system failures Up to twice, for a total of 3 attempts maximum. This will hopefully avoid spurious CI pipeline failures due to intermittent GitLab/docker infrastructure issues. Inspired by https://gitlab.freedesktop.org/mesa/mesa/commit/6140ed3d2c5409bcdb5c0879411690ef222b086c Reviewed-by: Eric Anholt commit b5ef99f26ab5fdc5e9b4f63c977de3cb0f4d5d4f Author: Michel Dänzer Date: Fri Mar 29 10:01:20 2019 +0100 gitlab-ci: Simplify autotools job script Drop the verbose test log output, matching the meson job script. Reviewed-by: Eric Anholt commit 35561d4d1e2bc168affdadd74e73ae5321c43a8a Author: Michel Dänzer Date: Fri Mar 29 09:58:21 2019 +0100 gitlab-ci: Simplify meson job script This way, the second ninja command line will be visible again as well in the job output. Reviewed-by: Eric Anholt commit 4adda1f6359fd96436dd61d0250b84f55b2fd277 Author: Roman Gilg Date: Fri Mar 29 10:55:31 2019 +0100 present: Call present_vblank_scrap in screen mode This cleans up some code duplication. No functional change. Signed-off-by: Roman Gilg Reviewed-by: Michel Dänzer commit d7b1753d446ecde3ff58e3de39a634c3137473c8 Author: Peter Hutterer Date: Mon Mar 25 13:19:41 2019 +1000 dix: leave last.valuators alone on slave switch Terms: dev->last.valuator[] is the last value given to us by the driver dev->valuator.axisVal[] is the last value sent to the client dev->last.scroll[] is the abs value of the scroll axis as given by the driver, used for button emulation calculation (and the remainder) This function updates the device's last.valuator state based on the current master axis state. This way, relative motion continues fluidly when switching between devices. Before mouse 2 comes into effect, it's valuator state is updated to wherever the pointer currently is so the relative event applies on top of that. This can only work for x/y axes, all other axes aren't guaranteed to have the same meaning and/or may not be present: - xtest device: no valuator 2 - mouse: valuator 2 is horizontal scroll axis - tablet: valuator 2 is pressure Scaling the current value from the pressure range into the range for horizontal scrolling makes no sense. And it causes scroll jumps: - scroll down, last.valuator == axisVal == 20 - xdotool click 1, the XTest device doesn't have that valuator - scroll up - updateSlaveDeviceCoords reset last.valuator to 0 (axisVal == 20) - DeviceClassesChangedEvent includes value 20 for the axis - event is processed, last.value changes from 0 to -1 - axisVal is updated to -1, causing a jump of -21 The same applies when we switch from tablet to mouse wheel if the pressure value is 0 on proximity out (basically guaranteed). So let's drop this code altogether and only leave the scaling for the relative x/y motion. Signed-off-by: Peter Hutterer commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5 Author: Eric Anholt Date: Mon Mar 25 16:30:18 2019 -0700 glamor: Fix a compiler warning since the recent OOM fixes. Signed-off-by: Eric Anholt commit a63d796ce02ae94a016e6ec027fdf0d4bff68805 Author: Eric Anholt Date: Tue Mar 26 11:30:55 2019 -0700 gitlab-ci: Build and test glamor using Xephyr. I keep wanting this when reviewing people's glamor patches. Signed-off-by: Eric Anholt commit ce5242fa2eef25c9921311480401bda6cd8952be Author: Eric Anholt Date: Tue Mar 26 13:38:22 2019 -0700 gitlab-ci: Build and install a current version of rendercheck. For really testing glamor, we want it installed. Use master instead of whatever version is in repos, because we'll want to update when new tests are added. Signed-off-by: Eric Anholt commit 2a2f0ac3a99f32e6e5cc23003360534400d8f445 Author: Eric Anholt Date: Tue Mar 26 13:35:41 2019 -0700 gitlab-ci: Make shallow clones of git trees we'll be nuking at the end. We only check out master, and delete .git when we're done, so save the bandwidth. Signed-off-by: Eric Anholt commit 0dc271690b0841473e442ffbf97464876234a7c8 Author: Eric Anholt Date: Tue Mar 26 13:33:09 2019 -0700 gitlab-ci: Don't bother building piglit. We don't use any of piglit's tests, just the framework. Signed-off-by: Eric Anholt commit 8c1dac5f83fba8fcd51f68214c0c5cf5d14ed2a7 Author: Eric Anholt Date: Tue Mar 26 12:58:39 2019 -0700 gitlab-ci: Install Mesa so we can test glamor. We need the DRI swrast driver (for GLX in vfb), and also libgl (for libepoxy in glamor) Signed-off-by: Eric Anholt commit 3f3c489e51e1b8a82adee9c7c5942dadf218b70d Author: Eric Anholt Date: Tue Mar 26 11:06:00 2019 -0700 test: Trim the Render ops that we test the composite paths on. We cover all Render ops under the "blend" group, so when we're doing the cross products of some formats for the masking operation, skip most of the ops (covering just zero, one, and src/dst alpha blend factors along with a definitely non-glamor-accelerated one) . All the tests now complete in <20s of runtime on my skylake. Signed-off-by: Eric Anholt commit 58c168ad93d770a3c48cc07daaa8a2acd1c0729d Author: Eric Anholt Date: Tue Mar 26 10:21:29 2019 -0700 test: Execute rendercheck tests without using piglit. This gets us parallelism between rendercheck tests at the cost of spinning up more Xvfbs, and nicer logging of the tests that are run. Signed-off-by: Eric Anholt commit 82aab622952197003799d756f06881b2c7df48bc Author: Eric Anholt Date: Wed Mar 27 09:47:41 2019 -0700 docker: Stop dumping long-summary and meson test logs in the CI logs. I've found that it's hard to find the original error in a dump full of xserver debug spam for the passing cases, and when I needed to look at this I end up using a proper editor on the file from the artifacts view anyway. Signed-off-by: Eric Anholt commit 05ded049acaa90ba07295f939910c22bb1e10e3a Author: Eric Anholt Date: Tue Mar 26 13:43:05 2019 -0700 test: Skip a few tests on glamor that are known to fail on llvmpipe. Signed-off-by: Eric Anholt commit 30369c6345250d71ef9ca5b12e4991c601e350c6 Author: Eric Anholt Date: Wed Mar 27 09:45:34 2019 -0700 gitlab-ci: Add a note about where to manage your containers. Michel noted that I could do this instead of bumping the tag as I developed, so leave that note for the next person. Signed-off-by: Eric Anholt commit 164a37eac2a5e7390f69ce152796df54e2f00d98 Author: Eric Anholt Date: Tue Mar 26 10:59:27 2019 -0700 simple-xinit: Introduce an escaped "--" argument. For testing xephyr-glamor on top of Xvfb in CI better, I want to be able to make one command line describing the nested server invocation, but that means I need to get two simple-xinits to split client/server on different "--" arguments. Signed-off-by: Eric Anholt commit 29aed56ec72d2e95dba8975eb44f385a5f6ef1ff Author: Eric Anholt Date: Tue Mar 26 12:26:34 2019 -0700 simple-xinit: Avoid hanging if the server fails to set up the display fd. Early fatal errors may leave us with nothing in the displayfd pipe, and we'd block forever. Signed-off-by: Eric Anholt commit f7069723093de585d082cfd98f0191d163569a78 Author: Benjamin Tissoires Date: Mon Mar 18 11:09:29 2019 +0100 CI: use wayland-ci-templates to manage the images There shouldn't be a difference for users, but this way we do manage all of our containers from freedesktop.org Signed-off-by: Benjamin Tissoires Reviewed-by: Michel Dänzer commit 5a549c957a873bd44ab351e627828905ee7dbf18 Author: Michael Biebl Date: Wed Jan 24 04:05:47 2018 +0100 Revert "systemd-logind: Monitor systemd-logind going away" systemd-logind since version 234 (released 2017-07-12) supports being restarted without losing state [1]. From the systemd NEWS file [2]: * systemd-logind may now be restarted without losing state. It stores the file descriptors for devices it manages in the system manager using the FDSTORE= mechanism. Please note that further changes in other components may be required to make use of this (for example Xorg has code to listen for stops of systemd-logind and terminate itself when logind is stopped or restarted, in order to avoid using stale file descriptors for graphical devices, which is now counterproductive and must be reverted in order for restarts of systemd-logind to be safe. See https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101.) This reverts commit dc48bd653c7e1013e2d69e3f59ae3cbc0c893473. Closes: #531 [1] https://github.com/systemd/systemd/pull/5600 [2] https://github.com/systemd/systemd/commit/9f09a95a7e6127f526c0ef7b6fd060cc0b01cdcc commit f3567600cff5e91cbc2110cd72ce3fefbb8cab3a Author: Jon Turney Date: Thu Mar 14 17:15:52 2019 +0000 meson: handle missing xkbcomp.pc better Applying get_pkgconfig_variable() to a not-found dependency was always documented as an error, but meson 0.49 now actually raises an error[1]: meson.build:110:4: ERROR: 'xkbcomp' is not a pkgconfig dependency Check xkbcomp_dep is a suitable dependency type before applying get_pkgconfig_variable() to it. [1] but this is more by accident than design (see the discusssion at [2] et seq.), so who knows where things will come to rest... [2] https://github.com/mesonbuild/meson/pull/4444#issuecomment-442443301 commit ef91da2757050652c724f6e674e8b1acf5d0cb31 Author: Michel Dänzer Date: Wed Feb 27 18:29:50 2019 +0100 present/scmd: Check that the flip and screen pixmap pitches match If they don't, flipping will result in corrupted display. Test case: * Run Xorg at 1920x1080 with no window manager * glxgears -geometry 2048x1080 commit 9114c4341cec91ed41c9527c88200b7712357951 Author: Jon Turney Date: Wed Mar 13 13:25:02 2019 +0000 meson: Drop a meson version check Drop some code conditional on meson version, which is not needed since 7e046b94 bumped the minimum meson version commit c020769dbfb965740c8441d8242b738ef572a7c9 Author: Jon Turney Date: Wed Mar 13 14:57:14 2019 +0000 Add xf86OSInputThreadInit to stub os-support as well stub os support also needs to provide xf86OSInputThreadInit, omitted in ea1527a8 commit 2e18eec6f03cc4d9d5bf62853c65d341b363f4b3 Author: Michel Dänzer Date: Fri Mar 8 18:49:04 2019 +0100 xwayland/present: Destroy sync_callback in xwl_present_cleanup xwl_present_cleanup frees the struct xwl_present_window memory, so if there's a pending callback, we have to destroy it to prevent use-after-free in xwl_present_sync_callback. Should fix issue #645. Reviewed-by: Olivier Fourdan commit f665a9c9e6c8643f3050378249db3088ae3057be Author: Adam Jackson Date: Tue Sep 30 12:26:28 2014 -0400 mi: Shortcut miDoCopy/miCopyArea based on clipList This is maybe one more comparison, but it catches FullyObscured windows slightly earlier, so it's kind of a wash. The important thing is this allows for paintable but unmapped windows, which will have non-empty clipList. commit 3904216b01fd9dabee65e6cb120fa8aad5e8b459 Author: Adam Jackson Date: Wed Mar 6 17:03:58 2019 -0500 dix: Outdent Unmap{Window,Subwindows} a bit No functional change, just folding some conditionals together. commit 74479a99ecf18fdfdafd033b5efd8d785dd12c28 Author: Olivier Fourdan Date: Fri Mar 8 18:19:16 2019 +0100 glamor: pixmap FBO may not be allocated If `_glamor_create_tex()` fails to allocate the FBO because of GL_OUT_OF_MEMORY error, the `pixmap_priv->fbo` is NULL. However, `glamor_get_pixmap_texture()` doesn't actually check whether the `pixmap_priv->fbo` is NULL and will segfault with a NULL pointer dereference trying to access the `pixmap_priv->fbo->tex`. Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/647 commit 8c4e8d9eff03cefc987f13c900b0a47403946127 Author: Paul Kocialkowski Date: Mon Mar 4 11:52:43 2019 +0100 glamor: Fallback to system memory for RW PBO buffer allocation We currently support two modes of operation for RW PBO buffers: one that allocates a pack buffer with GL memory and one that uses system memory when the former is not supported. Since allocation with system memory is less likely to fail, add a fallback to system memory when GL memory failed instead of bailing out. Signed-off-by: Paul Kocialkowski commit de6b3fac1f26075ce915006c914c4a4755617715 Author: Paul Kocialkowski Date: Mon Mar 4 11:38:20 2019 +0100 glamor: Propagate glamor_prepare_access failures in copy helpers glamor_prepare_access can fail for a few reasons, especially when failing to allocate a PBO buffer. Take this in account and bail in the copy helpers that call the helper when a failure happens. Signed-off-by: Paul Kocialkowski commit bc2e12239f86e5a4acd220744f42eb83ba55d328 Author: Paul Kocialkowski Date: Mon Mar 4 11:47:11 2019 +0100 glamor: Error out on out-of-memory when allocating PBO for FBO access Packed buffer allocation (which happens at glBufferData time with the buffer bound) can fail when there is no GL memory left. Pick up the error when it happens, print a proper error message, do some cleanup and bail. Signed-off-by: Paul Kocialkowski commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c Author: Paul Kocialkowski Date: Mon Mar 4 11:24:26 2019 +0100 glamor: Propagate FBO allocation failure for picture to texture upload When uploading a picture to a texture, glamor_upload_picture_to_texture calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO. The FBO will be allocated if the picture's drawable pixmap does not have one already, which can fail when there is no GL memory left. glamor_upload_picture_to_texture checks that the call succeeded and will enter the failure path if it did not. However, unlike many other functions in glamor, this one has ret set to TRUE initially, so it needs to be set to FALSE when a failure happens. Otherwise, the error is not propagated and the failure path return TRUE. This leads to a fault when trying to access the FBO pointer later on. Signed-off-by: Paul Kocialkowski commit e51ebc18a7fb5b30213b3b5e743cba1f2e7a0e83 Author: Andy Ritger Date: Wed Feb 13 13:20:52 2019 -0800 xfree86/modes: Add "NoOutputInitialSize" option Normally, the X server infers the initial screen size based on any connected outputs. However, if no outputs are connected, the X server picks a default screen size of 1024 x 768. This option overrides the default screen size to use when no outputs are connected. In contrast to the "Virtual" Display SubSection entry, which applies unconditionally, "NoOutputInitialSize" is only used if no outputs are detected when the X server starts. Parse this option in the new exported helper function xf86AssignNoOutputInitialSize(), so that other XFree86 loadable drivers can use it, even if they don't use xf86InitialConfiguration(). Signed-off-by: Andy Ritger Reviewed-by: Keith Packard commit 7e046b9467784451769af3a03db46e3c690063b0 Author: Adam Jackson Date: Tue Mar 5 11:31:29 2019 -0500 meson: Bump required meson version to 0.46 We were being naughty: WARNING: Project specifies a minimum meson_version '>= 0.42.0' but uses features which were added in newer versions: * 0.46.0: {'compiler.has_multi_link_argument', 'compiler.has_link_argument'} commit 0ec9a13c2a207e98e2dd6b352552c0e069af0727 Author: Michel Dänzer Date: Wed Feb 27 16:47:40 2019 +0100 Revert "gitlab-ci: Only run docker-image stage if relevant source files change" This reverts commit 8694395fcfd407190db74f31064960e484747377. Some scenarios have come to light where this failed to ensure the docker image exists: * If the master branch of a forked repository is used for an MR which doesn't modify .gitlab-ci.yml, the docker-image job may not run. * If the docker-image job of the first pipeline in a forked repository is cancelled or fails for any reason, and .gitlab-ci.yml isn't modified for the next pipeline run. commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed Author: Alan Coopersmith Date: Thu Feb 21 15:38:07 2019 -0800 os-support/solaris: Set IOPL for input thread too Since the Solaris kernel tracks IOPL per thread, and doesn't inherit raised IOPL levels when creating a new thread, we need to turn it on in the input thread for input drivers like vmmouse that need register access to work correctly. Signed-off-by: Alan Coopersmith commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc Author: Alan Coopersmith Date: Thu Feb 21 15:35:38 2019 -0800 Add xf86OSInputThreadInit call from common layer into os-support layer Allows os backends to run additional code as necessary to set up the input thread. Signed-off-by: Alan Coopersmith commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c Author: Alan Coopersmith Date: Thu Feb 21 15:22:57 2019 -0800 Add ddxInputThread call from os layer into ddx layer Allows ddx's to run additional code as necessary to set up the input thread. Signed-off-by: Alan Coopersmith commit 7533fa9bd5a4a0f7743d553be186514d684308c8 Author: Alan Coopersmith Date: Thu Feb 21 14:51:22 2019 -0800 os-support/solaris: Drop ExtendedEnabled global variable Keeping track of kernel state in user space doesn't buy us anything, and introduces bugs, as we were keeping global state but the Solaris kernel tracks IOPL per thread. Signed-off-by: Alan Coopersmith commit 432fad04e7aaad1f10d732a51665ecbe934246c6 Author: Michel Dänzer Date: Fri Feb 22 10:22:49 2019 +0100 gitlab-ci: Run make distcheck in autotools build & test job We don't set the PIGLIT_DIR and XTS_DIR environment variables for make distcheck for now, otherwise it complains about files left behind by piglit. commit f9bbc9d5ead5cf298f0e3e0b7ac5229af830f6e7 Author: Michel Dänzer Date: Fri Feb 22 10:21:27 2019 +0100 glx,xquartz: Fix make distcheck Guard BUILT_SOURCES and CLEANFILES by XWIN_GLX_WINDOWS/XQUARTZ. commit 2f12c8017508f23195db92503435fc3ef183da4b Author: Michel Dänzer Date: Tue Feb 19 18:37:53 2019 +0100 gitlab-ci: Add autotools build & test job commit b577df77451d34e28cfef3bda5031a43caeba90a Author: Michel Dänzer Date: Thu Feb 14 17:39:24 2019 +0100 gitlab-ci: Use ccache Meson picks it up automatically. Based on: * https://gitlab.freedesktop.org/mesa/mesa/merge_requests/240 * https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/ * https://stackoverflow.com/questions/53659419/ccache-no-hits-in-gitlab-ci v2 based on the corresponding Mesa change: * Quote CCACHE_(BASE)DIR environment variables. * Clear ccache stats in before_script. * Move cache stanza to the build-and-test job, the cache isn't used in the docker-image job. Reviewed-by: Adam Jackson # v1 commit 537f06e21ee2c4c88ee062c26555338257e043ef Author: Michel Dänzer Date: Tue Feb 19 18:16:16 2019 +0100 gitlab-ci: Add ccache to docker image, and leave in autotools We're going to make use of these in build & test jobs. commit f6753c117ef0f83499d5e2d6dda226fec9ddf803 Author: Alexander Volkov Date: Mon Feb 11 18:54:10 2019 +0300 shm: Use memfd_create when possible It doesn't require shared memory dir and thus allows to avoid cases when this dir is detected incorrectly, as in https://bugreports.qt.io/browse/QTBUG-71440 Signed-off-by: Alexander Volkov commit 678d64aa2e929368b6d6f2b83bbf5540c4fa292d Author: Peter Hutterer Date: Fri Feb 8 13:29:14 2019 +1000 Xi: lock the input thread for any pointer barrier list manipulation The input thread checks the barriers for pointer positioning, swapping the list out from underneath is considered impolite. Reported-by: Michel Dänzer Signed-off-by: Peter Hutterer Reviewed-by: Michel Dänzer commit fede384962edd175b1a2ce6edd8d2ef9b0fd74f0 Author: Michel Dänzer Date: Mon Feb 11 18:32:07 2019 +0100 gitlab-ci: Don't rely on $CI_PROJECT_NAME The name of a forked repository can be changed later, in which case this would fail to refer to the main repository. Pointed out by Eric Engestrom in https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 . commit 8694395fcfd407190db74f31064960e484747377 Author: Michel Dänzer Date: Thu Feb 7 17:35:13 2019 +0100 gitlab-ci: Only run docker-image stage if relevant source files change Otherwise there's normally no need to run it. It will also run when a new branch is created, which ensures that the docker image always exists (e.g. in a newly forked repository). Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143 commit 8f8d358bad2d33de36686e8405ade8b5b921cafd Author: Adam Jackson Date: Tue Jul 8 12:36:10 2014 -0400 ramdac: Remove core ramdac code Now that there are no ramdac drivers this can go. Signed-off-by: Adam Jackson commit f0385fb420158ac3bc1c4c325431ffc5c62344bb Author: Adam Jackson Date: Fri Feb 28 16:07:27 2014 -0500 ramdac: Remove ramdac drivers External RAMDACs are a very 1996 kind of thing, this code really doesn't belong in the server. Signed-off-by: Adam Jackson commit 937a5b78a2f6ea771132ff0f9ece708a23c1bdad Author: Peter Harris Date: Wed Jan 30 14:51:07 2019 -0500 os: Fix GetTimeInMicros resolution GetTimeInMillis is called first, which sets clockid to CLOCK_MONOTONIC_COARSE, which is typically much lower resolution than the callers of GetTimeInMicros want. Prior to a779fda224bee0c4d27636503367e55ae93b33c2, GetTimeInMillis and GetTimeInMicros did not share a clockid. Restore the clockid split to fix the granularity of GetTimeInMicros. Signed-off-by: Peter Harris commit a093a88531599832811a1ba5cb85101af91a545e Author: Michel Dänzer Date: Tue Jan 29 18:59:09 2019 +0100 present/wnmd: Allow flipping if the window pixmap matches the toplevel's Instead of testing window->redirectDraw. With Xwayland, the toplevel window is always redirected, so this would unnecessarily preclude flipping there in some cases, e.g. with wlroots based Wayland compositors or with fullscreen X11 windows in weston. Fixes issue #631. commit ff560488558deb299b0822a3e3bc66672f4c690f Author: Adam Jackson Date: Wed Jan 23 14:23:40 2019 -0500 dri2: Stop pretending VGA arbitration matters The VGA arbiter controls the PCI bus' routing of legacy VGA resources, specifically the video memory aperture at 0xa0000-0xb0000 (640k should be etc.) and a handful of I/O ports. Since 128k is far too small for a real framebuffer these days, every driver instead maps a linear version of VRAM through the PCI BAR. And no DRI2 drivers ever need I/O port access, because all operations they might be used for (legacy VGA CRTC setup, mostly) happen on the kernel side. In other words, this just works, and we can stop breaking it. Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie commit d3a26bbf618507e1ca05b2bc99a880075b77db77 Author: A. Wilcox Date: Sat Jan 26 15:37:56 2019 -0600 DRI2: Add another Coffeelake PCI ID A user of Adélie Linux reported that modesetting wasn't working properly on their Intel i7-9700K-integrated UHD 630 GPU. Xorg.0.log showed: [ 131.902] (EE) modeset(0): [DRI2] No driver mapping found for PCI device 0x8086 / 0x3e98 [ 131.902] (EE) modeset(0): Failed to initialize the DRI2 extension. Indeed, that PCI ID is missing from i965_pci_ids. Adding it fixed the issue and allowed the system to work with i965_dri under modesetting. commit 709c6562975c3bea10dd0571527a4aac79a6bf6f Author: Adam Jackson Date: Tue Oct 16 12:58:25 2018 -0400 vnd: Fix a silly memory leak 'disp' was already allocated by LookupVendorPrivDispatch above, clobbering it will do no good. Signed-off-by: Adam Jackson commit bf991a5f989c5e6e726a3731f468b7b7d65d9f4a Author: Adam Jackson Date: Wed Jan 16 14:20:17 2019 -0500 mi: When {en,dis}abling extensions, match names case-insensitively Both because extension names are inconsistently capitalized on the wire, and because the table we're walking spells it COMPOSITE not Composite. The latter is certainly also a bug, but there's no reason for us to be that strict. Signed-off-by: Adam Jackson commit 086c2e3de55bbf0cbc1d97f7dc2db70a7f5e69e3 Author: Adam Jackson Date: Mon Jan 14 12:42:00 2019 -0500 dri3: Fix XACE access mode for open and get_supported_modifiers Neither opening a screen nor querying its modifiers confers the right to attach the buffer for any particular pixmap. GetAttr seems more correct. Fixes: xorg/xserver#550 commit 6c1d720047b193f138e877e994cb4a4fb8e73753 Author: Adam Jackson Date: Tue Oct 30 11:37:32 2018 -0400 agp: Make the legacy AGP interface optional The only thing using this anymore is the i810 driver, so this can safely be disabled on non-i686 builds. Signed-off-by: Adam Jackson commit 1e3f9ea14cced2ee894d072c977507ad43cb59c5 Author: Adam Jackson Date: Fri Jan 11 11:38:34 2019 -0500 randr: Remove funky indirection around the xf86 screen private key All of the null checks here are redundant, you can't get to those paths unless RANDR's already been initialized. Delete them, and remove the pointer too. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 30044b2253c2dd51e1aedb2f897159c657ca8f0d Author: Michel Dänzer Date: Wed Dec 5 18:31:27 2018 +0100 xfree86/modes: Don't clobber gamma LUT of compatibility output's CRTC If the driver calls xf86HandleColormaps, CMapChangeGamma updates the HW gamma LUT of all CRTCs via xf86RandR12LoadPalette. However, xf86RandR12ChangeGamma was then clobbering the gamma LUT of the RandR 1.2 compatibility output's CRTC with the gamma curves computed from the screen's global gamma values. Fix this by bailing if xf86RandR12LoadPalette is installed. Fixes: 02ff0a5d7e32 "xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error" commit cc05c01925755310f027c61daa29648a10155f96 Author: Rohan Garg Date: Thu Dec 13 19:15:01 2018 +0100 glamor/glamor_egl.c: EGL_NATIVE_PIXMAP_KHR do not require contexts From https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_pixmap.txt * If is EGL_NATIVE_PIXMAP_KHR, and is not EGL_NO_CONTEXT, the error EGL_BAD_PARAMETER is generated. Fixes: a5321ea4 ("Allow to create textured pixmaps from gbm_bo without using gem names") commit 88dd4cea51f7e461cb4859c06bfe641890caa97b Author: Rohan Garg Date: Thu Dec 13 17:46:27 2018 +0100 glamor/egl: Drop a implicit depends on EGL_KHR_no_config_context Not all platforms provide EGL_KHR_no_config_context, this ensures that eglCreateContext works on such platforms by querying for a config. commit e3fb178617a579c98877a3baae14c4dfe4d55db8 Author: Maya Rashish Date: Thu Jan 10 14:55:17 2019 +0200 xfree86: Try nouveau on NetBSD as well. commit bf2a7bb4ffbd199882fe4bd183561469833a9e6b Author: Maya Rashish Date: Thu Jan 10 18:39:33 2019 +0200 Fix typo in error message commit e8295c50209f2963fa2823e8de7e8363a38cd2d1 Author: Olivier Fourdan Date: Tue Jan 8 12:48:53 2019 +0100 xwayland: handle case without any crtc Xwayland creates and destroys the CRTC along with the Wayland outputs, so there is possibly a case where the number of CRTC drops to 0. However, `xwl_present_get_crtc()` always return `crtcs[0]` which is invalid when `numCrtcs` is 0. That leads to crash if a client queries the Present capabilities when there is no CRTC, the backtrace looks like: #0 raise() from libc.so #1 abort() from libc.so #2 OsAbort() at utils.c:1350 #3 AbortServer() at log.c:879 #4 FatalError() at log.c:1017 #5 OsSigHandler() at osinit.c:156 #6 OsSigHandler() at osinit.c:110 #7 #8 main_arena() from libc.so #9 proc_present_query_capabilities() at present_request.c:236 #10 Dispatch() at dispatch.c:478 #11 dix_main() at main.c:276 To avoid returning an invalid pointer (`crtcs[0]`) in that case, simply check for `numCrtcs` being 0 and return `NULL` in that case. Thanks to Michel Dänzer for pointing this as a possible cause of the crash. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Bugzilla: https://bugzilla.redhat.com/1609181 commit bf5613f888e837641b9e16aacb36ffb43a9cccda Author: Roman Gilg Date: Wed Jan 2 21:55:23 2019 +0100 xwayland: Fix wm_fd readin with no listen_fds Since 08843efc KWin was not able to start a Wayland session. Independently of listen_fd_count add_client_fd must be called. Same holds for the wm_selection_callback. Therefore just remove the condition. Bugzilla: https://bugs.freedesktop.org/109220 Signed-off-by: Roman Gilg commit 7fb6338c68e158053295cb448faa5c559aa9990c Author: Alan Coopersmith Date: Tue Jan 1 16:49:32 2019 -0800 os: Report errors opening authorization file (#469) Fixes: xorg/xserver#469 Signed-off-by: Alan Coopersmith commit a3d01ee9d0b5e523b0771e2a26542ac15e29a33f Author: Michel Dänzer Date: Wed Dec 19 10:11:22 2018 +0100 glamor: Remove unused format_for_pixmap helper Reviewed-by: Eric Anholt commit 2e256e8260648619e407b1de70fe43cf32819247 Author: Michel Dänzer Date: Wed Dec 19 11:10:10 2018 +0100 glamor: Allow HW acceleration for more RENDER formats As long as the storage format is compatible. v2: * Remove explicit cases for formats handled by the default case. Reviewed-by: Eric Anholt commit 7e6faa5b3c05e0b7149ee840403885b0b40b5827 Author: Michel Dänzer Date: Wed Dec 19 10:06:23 2018 +0100 glamor: Check that storage format is compatible with RENDER format Fixes x2r10g10b10 related rendercheck failures. Reviewed-by: Eric Anholt commit d12881ea1d95bc8b189582da9e847a801927acce Author: Michel Dänzer Date: Fri Dec 14 16:19:46 2018 +0100 Revert "ci: Work around broken python UTF8 handling in the CI docker image" This reverts commit 899d260701ff783254f8ead91dab8dc515d554f6. No longer necessary with the previous changes. Reviewed-by: Eric Anholt commit bc6998b728749015bfd93a85fbae48af777c9a34 Author: Michel Dänzer Date: Fri Dec 14 17:25:41 2018 +0100 gitlab-ci: Set LC_ALL=C.UTF-8 Although piglit could now handle non-ASCII characters in the environment, meson was still failing without this (even though it's using Python 3). Reviewed-by: Eric Anholt commit 4aaaf69229be574d6d11084225ecd91446a15170 Author: Michel Dänzer Date: Wed Oct 10 10:31:12 2018 +0200 test: Use .../piglit instead of .../piglit-*.py The latter use Python 2 and break with any non-ASCII characters in the environment, the former uses Python 3 and works fine in that case. Reviewed-by: Eric Anholt commit f56d8e2282a3d1344aa1300c78faede0071a3bfa Author: Michel Dänzer Date: Fri Dec 14 11:04:24 2018 +0100 gitlab-ci: Docker image can be generated as part of pipeline This removes the dependency on an externally generated docker image, and should make it easier to update the docker image or make other changes related to it. This is based on Debian testing, because I'm most familiar with Debian. But it should be easy to base it on another distro. v2: * Use kaniko instead of docker-in-docker for image generation, so it can also work in unprivileged runners. * Drop piglit.conf & tetexec.cfg overrides, just make sure the files in the image work. commit ed44f9cd6a4ccf6de7dda70432764b4da10f3f44 Author: Michel Dänzer Date: Thu Dec 13 18:29:31 2018 +0100 Drop Travis Linux build in favour of GitLab CI Fold build-travis-deps.sh into .gitlab-ci.yml. Preparation for the next change, which would break the Travis Linux build. Reviewed-by: Eric Anholt commit 0e541b10933377572373da48d1f2932ff095dcde Author: Jon Turney Date: Thu Dec 13 23:00:32 2018 +0000 meson: Add misc unit tests v2: has_link_argument requires meson 0.46.0 commit fde27b9b4814b18aca6ec587bd3cfe9ab04b0c72 Author: Peter Hutterer Date: Wed Nov 28 10:05:49 2018 +1000 test: fix failing tests Broken since 69d8ea4a49793a94f821d1a328856901a1c02a5a because our fake screen didn't have a root window and writing the XKB rules prop would happily segfault. Fix this by setting up the required bits. Signed-off-by: Peter Hutterer Tested-by: Michel Dänzer michel.daenzer@amd.com commit a7472da94136ef977b8d6af956a15767736236ea Author: Michel Daenzer Date: Wed Dec 12 18:34:36 2018 +0100 Make artifacts of piglit results if job fails Can be useful for figuring out what caused the failure. commit c1bb392b1df4023e9dec489facfa221a53499ddc Author: Michel Daenzer Date: Wed Dec 12 12:55:57 2018 +0100 travis: Use a single meson invocation The prefix setting didn't take for some reason. commit c73116540205c20162befe935ef608f4bed3af0a Author: Olivier Fourdan Date: Fri Nov 30 13:09:53 2018 +0100 dix: cache ResourceClientBits() value The `LimitClient` is set once and for all at startup, whereas the function `ResourceClientBits()` which returns the client field offset within the XID based on the value of `LimitClient` can be called repeatedly. Small optimization, cache the result of `ilog2()`, that saves running the same loop over and over each time `ResourceClientBits()` is called. Signed-off-by: Olivier Fourdan commit 48b1af2718ab81c66f565438553415c05f1faa5c Author: Ilia Mirkin Date: Mon Dec 10 23:34:11 2018 -0500 modesetting: fix conn_id termination and potential overrun by 1 byte Noticed when porting this logic to xf86-video-nouveau, and valgrind complained about conditional jump based on uninitialized data. Signed-off-by: Ilia Mirkin Reviewed-by: Pekka Paalanen commit 899d260701ff783254f8ead91dab8dc515d554f6 Author: Adam Jackson Date: Tue Dec 11 12:30:59 2018 -0500 ci: Work around broken python UTF8 handling in the CI docker image Gitlab very kindly exposes the details of the git commit message (among much else) in the environment. Unfortunately, piglit tries to handle the environment in non-UTF8-safe ways, which means if the top-of-tree commit mentions non-ASCII characters (say, in the author's name) then all the tests fail and so does the pipeline. Fortunately none of those variables are things our piglit invocation needs. Since I've failed to rebuild the docker image as yet, just clear the likely variables from the environment before running piglit. This-makes-me: ☹ commit 82ed89c0f8b18d8214430580dc80c8d3e37bef33 Author: Adam Jackson Date: Thu Nov 29 14:48:11 2018 -0500 automake: Distribute meson's configure header templates Fixes: xorg/xserver#17 commit a425eee6dce3b0cfd18b591907e8302a91b648c6 Author: Lionel Landwerlin Date: Fri Nov 9 12:34:59 2018 +0000 present: fix compile warning with debug traces Signed-off-by: Lionel Landwerlin commit 7a44e8d4007b9c3ca55a5cc3f5e98601565311c7 Author: Lyude Paul Date: Tue Nov 13 20:14:10 2018 -0500 modesetting: Actually disable CRTCs in legacy mode Believe it or not, somehow we've never done this in legacy mode! We currently simply change the DPMS property on the CRTC's output's respective DRM connector, but this means that we're just setting the CRTC as inactive-not disabled. From the perspective of the kernel, this means that any shared resources used by the CRTC are still in use. This can cause problems for drivers that are not yet fully atomic, despite using the atomic helpers internally. For instance: if CRTC-1 and CRTC-2 are still enabled and use shared resources within the kernel (an MST topology, for example), and then userspace tries to go enable CRTC-3 on the same topology this might suddenly fail if CRTC-3 needs the shared resources CRTC-1 and CRTC-2 are using. While I don't know of any situations in the mainline kernel that actually trigger this, future plans for reworking the atomic check of MST drivers are absolutely going to make this into a real issue (they already are in my WIP branches for the kernel). So: actually do the right thing here and disable CRTCs when they're not going to be used anymore, even in legacy mode. Signed-off-by: Lyude Paul commit 17a22ad948009badbc79bbcd9a067004c98f5744 Author: Alan Coopersmith Date: Sun Nov 25 12:56:29 2018 -0800 Update configure.ac bug URL for gitlab migration Signed-off-by: Alan Coopersmith commit 5d097c2a20fce44cdb9d5c302d46bc7fa16edfec Author: Alan Coopersmith Date: Sun Nov 18 15:49:27 2018 -0800 Update README for gitlab migration Signed-off-by: Alan Coopersmith commit e6cd1c9bdefe83e7d99b703a68d26eebb451f889 Author: Michel Dänzer Date: Thu Nov 15 17:16:59 2018 +0100 xwayland: Don't take buffer release queue into account for frame timer The buffer release queue has two kinds of entries: * Pending async flips. * Completed flips waiting for their buffer to be released by the Wayland compositor. xwl_present_timer_callback neither completes async flips nor releases buffers, so the timer isn't needed for the buffer release queue. commit f541615342ce6bfb0e6d4e68deb3a924a87e8ba9 Author: Michel Dänzer Date: Fri Nov 9 17:18:53 2018 +0100 xwayland: Don't need xwl_window anymore in xwl_present_queue_vblank Fixes issue #12. Presumably the problem was that Present operations on unmapped windows were executed immediately instead of only when reaching the target MSC. commit 8c9538573cb9a342897eb3fb4b0c1e4ed917bd0e Author: Michel Dänzer Date: Thu Nov 1 18:24:28 2018 +0100 xwayland: Add xwl_present_unrealize_window When a window is unrealized, a pending frame callback may never be called, which could result in repeatedly freezing until the frame timer fires after a second. Fixes these symptoms when switching from fullscreen to windowed mode in sauerbraten. commit 6b016d58d23d16eaae9908a92ed90547d1926317 Author: Michel Dänzer Date: Thu Nov 1 18:44:24 2018 +0100 xwayland: Replace xwl_window::present_window with ::present_flipped There's no need to keep track of the window which last performed a Present flip. This fixes crashes due to the assertion in xwl_present_flips_stop failing. Fixes issue #10. The damage generated by a flip only needs to be ignored once, then xwl_window::present_flipped can be cleared. This may fix freezing in the (hypothetical) scenario where Present flips are performed on a window, followed by other drawing requests using the window as the destination, but nothing triggering xwl_present_flips_stop. The damage from the latter drawing requests would continue being ignored. commit 8738ce85df535bdfdfecfce1c0d64e209cc6e508 Author: Ray Strode Date: Fri Nov 16 14:36:55 2018 -0500 dix: ensure work queues are cleared on reset If the server resets, most client workqueues are cleaned up as the clients are killed. The one exception is the server's client, which is exempt from the killing spree. If that client has a queued work procedure active, it won't get cleared on reset. This commit ensures it gets cleared too. commit 364d64981549544213e2bca8de6ff8a5b2b5a69e Author: Samuel Thibault Date: Tue Oct 30 18:43:51 2018 +0100 dix: do not send focus event when grab actually does not change c67f2eac5651 ("dix: always send focus event on grab change") made dix always sent events when it's a NotifyGrab or NotifyUngrab, even if from == to, because 'from' can just come from a previous XSetInputFocus call. However, when an application calls XGrabKeyboard several times on the same window, we are now sending spurious FocusOut+FocusIn with NotifyGrab, even if the grab does not actually change. This makes screen readers for blind people spuriously emit activity events which disturb screen reading workflow when e.g. switching between menus. This commit avoids calling DoFocusEvents in that precise case, i.e. when oldWin is a previous grab and the new grab is the same window. Signed-off-by: Samuel Thibault Reviewed-by: Adam Jackson commit 82f8cf8990009f6cac567814dd6b7fd41cfad82d Author: Manoj Gupta Date: Tue Nov 13 11:35:25 2018 -0800 config/udev: Include header to use major/minor glibc 2.25 has dropped sys/sysmacros.h from sys/types.h, so add it explicitly in config/udev.c. This is similar to the commit 84e3b96b531363e47f6789aacfcae4aa60135e2e Signed-off-by: Manoj Gupta Reviewed-by: Adam Jackson commit fbdd4d679a7d020f78f7b877033b83e00f5a0f73 Author: Michal Srb Date: Mon Nov 12 13:51:48 2018 +0100 dix/window: Use ConfigureWindow instead of MoveWindow The screensaver can regularly move its window to random offsets. It should use the ConfigureWindow function instead of calling the Screen's MoveWindow directly. Some MoveWindow implementations, such as compMoveWindow, rely on Screen's ConfigNotify being called first as it happens in ConfigureWindow. Reviewed-by: Adam Jackson commit 23752b3ef889ada7b705c51f478f5817e5caaed3 Author: Adam Jackson Date: Thu Oct 25 13:13:13 2018 -0400 os: Establish new connections synchronously not on the work queue This contortion made a bit more sense before we got SetNotifyFd and friends, but now there's no need for it. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 69d8ea4a49793a94f821d1a328856901a1c02a5a Author: Adam Jackson Date: Thu Oct 25 11:22:19 2018 -0400 xkb: Write the _XKB_RULES_NAMES window property synchronously I can't think of a good reason why this would need to be deferred to the work queue. When we get to this point we're never in the middle of request processing, so we can't corrupt the event/reply stream. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 0a95a8ae625accaf0ef5e2372ef7f65a52658d9d Author: Adam Jackson Date: Tue Oct 23 15:07:48 2018 -0400 xwayland: Move command line fd initialization to InitOutput Again, as this is DDX state not screen state, run it from DDX setup not screen setup. Signed-off-by: Adam Jackson commit 08843efc5940563a2275c654804c999cfc772987 Author: Adam Jackson Date: Tue Oct 23 14:33:24 2018 -0400 xwayland: Move wm_fd and listen_fds out of xwl_screen There are logically server state not screen state. Not that multiple screens works, at the moment, but that's no excuse to be sloppy. Signed-off-by: Adam Jackson commit 2118e4471be037f2e642f35ff0494aa09177c9ee Author: Marco Trevisan (Treviño) Date: Sat Oct 27 03:54:09 2018 +0200 dix/events: reuse grab pointer value commit 35e5a76cc1d02801fadd49d12e60664b02e4bebc Author: Marco Trevisan (Treviño) Date: Fri Oct 26 19:52:49 2018 +0200 Xi: Use current device active grab to deliver touch events if any When Retrieving touch delivery data we need to check if we have an active grab on such device, and in that case use it to delivery events. If we don't do this, when rejecting the touch events in DeactivatePointerGrab, we will end-up in creating an implicit grab that will change the device deviceGrab's state, causing a recursion during TouchEndTouch. Fixes #7 https://bugs.freedesktop.org/show_bug.cgi?id=96536 commit 700505144fcdd55b4bd1f6c30b7aa01bf848af11 Author: Alan Coopersmith Date: Sat Nov 10 15:00:31 2018 -0800 Remove obsolete B16 & B32 tags in struct definitions They were defined as empty macros on all platforms except for the long unsupported Cray systems which needed to use bitfields to define types smaller than 64-bits. Signed-off-by: Alan Coopersmith commit 6ef025a8728282db6a233bde55789b114f916abb Author: Michel Dänzer Date: Tue Nov 6 11:33:19 2018 +0100 Revert "dix: Work around non-premultiplied ARGB cursor data harder" This reverts commit b45c74f0f2868689e7ed695b33e8c60cd378df0b. It broke the cursor in other games. Apparently those use cursor data with premultiplied alpha, but with some pixels having r/g/b values larger than the alpha value (which corresponds to original r/g/b values > 1.0), triggering the workaround. Seems the cure turned out worse than the disease, so revert. Bugzilla: https://bugs.freedesktop.org/108650 commit c901adc327bce4c0d19caf350cbcb0cd5254f306 Author: Adam Jackson Date: Wed Oct 31 11:43:33 2018 -0400 modesetting: Hush an unimportant log message Verbosity level 0 is "always print", just make it a normal message. Signed-off-by: Adam Jackson commit 52451f1f89890e3088c6fd9d7da0708fd9263950 Author: Adam Jackson Date: Wed Sep 5 12:10:20 2018 -0400 dix: De-ugly the prototype for Add{GPU,}Screen commit e50c85f4ebf559a3bac4817b41074c43d4691779 Author: Eric Anholt Date: Fri Oct 26 17:47:30 2018 -0700 Fix segfault on probing a non-PCI platform device on a system with PCI. Some Broadcom set-top-box boards have PCI busses, but the GPU is still probed through DT. We would dereference a null busid here in that case. Signed-off-by: Eric Anholt commit 3297a1c871a25647d9d08b5f528e640cc2a1d2c2 Author: Adam Jackson Date: Wed Oct 24 16:30:40 2018 -0400 include: Remove ___CLIENTSIGNALALL_DEFINED___ copypasta ___CLIENTSIGNAL_DEFINED___ is a hack to work around the declaration of ClientSignal both in our own headers and in , the latter of which is properly part of libXfont (1, only) but packaged in xorgproto because we have made some mistakes. ClientSignalAll needs no such workaround. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 06f448d4af905412b1e0b4074f7763ec85f2b6e8 Author: Adam Jackson Date: Wed Oct 24 16:23:04 2018 -0400 include: Stop including Despite being packaged in xorgproto (formerly fontsproto), fontproto.h is actually a list of the ABI libXfont version 1 expected of the X server. We switched to libXfont2 three years ago, this is unnecessary. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit ace551d8a2603e37b18237a52f62d627c75d9e2a Author: Michel Dänzer Date: Thu Oct 18 17:42:01 2018 +0200 xwayland: Complete "synchronous" Present flips from xwl_present_msc_bump Completing them from xwl_present_sync_callback had at least two issues: * It was before the MSC was incremented in xwl_present_frame_callback, so the MSC value in the completion event could be lower than the target specified by the client. This could cause hangs with the Mesa Vulkan drivers. * It allowed clients to run at a frame-rate higher than the Wayland compositor's frame-rate, wasting energy on generating frames which were never displayed. This isn't expected to happen unless the client specified PresentOptionAsync (in which case flips are still completed from xwl_present_sync_callback, allowing higher frame-rates). v2: * Make xwl_present_has_events return true when there's a pending "synchronous" flip, so those complete after at most ~1 second even if the Wayland server doesn't send a frame event. Bugzilla: https://bugs.freedesktop.org/106713 commit 2bfc46d4147dc0bec4cdbb80431a0f4cc1d3b030 Author: Michel Dänzer Date: Thu Oct 18 17:36:24 2018 +0200 xwayland: Rename xwl_present_events_notify to xwl_present_msc_bump And consolidate more code from xwl_present_timer_callback and xwl_present_frame_callback in it. commit 5e8b9a3a563047e3998d45e761f7a50e4b0f6cb3 Author: Michel Dänzer Date: Wed Oct 24 11:23:05 2018 +0200 xwayland: Use xwl_present_reset_timer in xwl_present_timer_callback Apart from simplifying the code, this should also prevent a condition (which might only be possible with the following fix) reported in https://gitlab.freedesktop.org/wayland/weston/issues/115#note_52467: 1. xwl_present_timer_callback indirectly calls xwl_present_reset_timer -> xwl_present_free_timer 2. xwl_present_timer_callback then returns a non-0 value, so DoTimer calls TimerSet with the old xwl_present_window->frame_timer pointer which was freed in step 1 => use after free Calling xwl_present_reset_timer explicitly passes NULL to TimerSet if step 1 freed xwl_present_window->frame_timer, and it will allocate a new one. commit 036794bebce72a3fa2f95996d2e537ff568e0ff1 Author: Olivier Fourdan Date: Fri Oct 19 16:04:32 2018 +0200 xwayland: do not crash if `gbm_bo_create()` fails The function `xwl_glamor_gbm_create_pixmap()` first creates a buffer objects and then creates the xwl_pixmap from it. However, `xwl_glamor_gbm_create_pixmap_for_bo()` is not called if the buffer object creation fails, and `xwl_glamor_gbm_create_pixmap()` simply returns `glamor_create_pixmap()`. The problem with this is that if `xwl_glamor_gbm_create_pixmap_for_bo()` is not called then neither is `xwl_pixmap_set_private()` and further calls to `xwl_pixmap_get()` will return NULL and cause a NULL pointer dereference if the return value is not checked: #0 xwl_glamor_gbm_get_wl_buffer_for_pixmap () at hw/xwayland/xwayland-glamor-gbm.c:248 #1 xwl_window_post_damage () at hw/xwayland/xwayland.c:697 #2 xwl_display_post_damage () at hw/xwayland/xwayland.c:759 #3 block_handler () at hw/xwayland/xwayland.c:890 #4 BlockHandler () at dix/dixutils.c:388 #5 WaitForSomething () at os/WaitFor.c:201 #6 Dispatch () at dix/dispatch.c:421 #7 dix_main () at dix/main.c:276 #8 __libc_start_main () at ../csu/libc-start.c:308 #9 _start () (gdb) print xwl_pixmap $1 = (struct xwl_pixmap *) 0x0 Make sure we check for `xwl_pixmap_get()` returned value where relevant and fail gracefully if this is the case. See also: https://gitlab.gnome.org/GNOME/mutter/issues/340 Signed-off-by: Olivier Fourdan Reviewed-by: Marco Trevisan Reviewed-by: Peter Hutterer commit 32abc222880119eba0adf17897c3d8d1cc1f17db Author: Olivier Fourdan Date: Mon Oct 22 11:54:31 2018 +0200 present: Remove `present_event_abandon()` This has never been actually implemented, do not tempt people to use it. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Daenzer Reviewed-by: Peter Hutterer commit b768b7d6cec41b8b320c468ec41aab5a8b49b27b Author: Olivier Fourdan Date: Mon Oct 22 11:48:25 2018 +0200 present/wnmd: Fix use after free on CRTC removal Xwayland will add and remove CRTCs as Wayland outputs are added or removed. If there is a pending flip when this occurs, the `xwl_present_sync_callback()` will be triggered after the Xwayland output's RRCtrcPtr has been destroyed, hence causing a crash in Xwayland while trying to use freed memory: #1 abort () #2 OsAbort () at utils.c:1350 #3 AbortServer () at log.c:877 #4 FatalError () at log.c:1015 #5 OsSigHandler () at osinit.c:156 #6 #7 dixGetPrivate () at ../include/privates.h:122 #8 dixLookupPrivate () at ../include/privates.h:166 #9 present_screen_priv () at present_priv.h:198 #10 present_wnmd_flip () at present_wnmd.c:358 #11 present_wnmd_execute () at present_wnmd.c:466 #12 present_wnmd_re_execute () at present_wnmd.c:80 #13 xwl_present_sync_callback () at xwayland-present.c:287 #14 ffi_call_unix64 () from /lib64/libffi.so.6 #15 ffi_call () from /lib64/libffi.so.6 #16 wl_closure_invoke () at src/connection.c:1006 #17 dispatch_event () at src/wayland-client.c:1427 #18 dispatch_queue () at src/wayland-client.c:1573 #19 wl_display_dispatch_queue_pending () at src/wayland-client.c:1815 #20 wl_display_dispatch_pending () at src/wayland-client.c:1878 #21 xwl_read_events () at xwayland.c:814 #22 ospoll_wait () at ospoll.c:651 #23 WaitForSomething () at WaitFor.c:208 #24 Dispatch () at ../include/list.h:220 #25 dix_main () at main.c:276 To avoid the issue, get the `ScreenPtr` from the window instead of the CRTC that might have been just freed, `xwl_present_flip()` has no use for the CRTC anyway. Bugzilla: https://bugs.freedesktop.org/108249 Suggested-by: Michel Daenzer Signed-off-by: Olivier Fourdan Reviewed-by: Michel Daenzer Reviewed-by: Peter Hutterer commit 8d048a1fd3e3806c408192d33e62859f5bc5c343 Author: Adam Jackson Date: Tue Oct 23 14:28:21 2018 -0400 os: Factor out CHECK_FOR_REQUIRED_ARGUMENTS Lifted from vfb. xfree86 had almost the same thing but unparameterized, port it to the vfb style. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit b45c74f0f2868689e7ed695b33e8c60cd378df0b Author: Michel Dänzer Date: Thu Oct 25 10:50:03 2018 +0200 dix: Work around non-premultiplied ARGB cursor data harder Turns out some apps (e.g. the Civilization VI game) use non-premultiplied cursor data which doesn't have any pixels with 0 alpha but non-0 non-alpha, but can still result in visual artifacts. This uses the method suggested by Kamil in https://bugs.freedesktop.org/92309#c19: check for pixels where any colour component value is larger than the alpha value, which isn't possible with premultiplied alpha. There can still be non-premultiplied data which won't be caught by this, but that should result in slightly incorrect colours and/or blending at the worst, not wildly incorrect colours such as shown in the bug report below. Bugzilla: https://bugs.freedesktop.org/108355 Suggested-by: Kamil Paral commit 248d164eae27f1f310266d78e52f13f64362f81e Author: Matthieu Herrb Date: Tue Oct 23 21:29:09 2018 +0200 LogFilePrep: add a comment to the unsafe format string. CVE-2018-14665 also made it possible to exploit this to access memory. With -logfile forbidden when running with elevated privileges this is no longer an issue. Signed-off-by: Matthieu Herrb Reviewed-by: Adam Jackson commit 50c0cf885a6e91c0ea71fb49fa8f1b7c86fe330e Author: Matthieu Herrb Date: Tue Oct 23 21:29:08 2018 +0200 Disable -logfile and -modulepath when running with elevated privileges Could cause privilege elevation and/or arbitrary files overwrite, when the X server is running with elevated privileges (ie when Xorg is installed with the setuid bit set and started by a non-root user). CVE-2018-14665 Issue reported by Narendra Shinde and Red Hat. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Adam Jackson commit 08ff37d05a04a1ceed6086cfceae9c34331cb633 Author: Andreas Fett Date: Mon Oct 22 22:03:22 2018 +0200 os/xdmcp: Fix binding of ipv6 source address Choose the socket fd of the correct address family based on the address family of the argument to the -from option. Fixes: xorg/xserver#4 commit 96e00730e7ab4a5a2bea453b0ce84e4f8c93acd8 Author: Adam Jackson Date: Wed Oct 24 15:00:09 2018 -0400 xfree86: bump video ABI version to 25.0 Signed-off-by: Adam Jackson commit cb0de153bf0c486da7e968ab0f258c9c0c9ed34a Author: Michel Dänzer Date: Fri Oct 19 18:27:37 2018 +0200 xwayland: Plug leaks in xwl_present_sync_callback xwl_present_window->sync_callback was leaked. The event memory was leaked if the corresponding buffer had already been released. commit 53d32c94f39b4a89f70fed2e102c5fb5d6cae8bc Author: Adam Jackson Date: Tue Oct 23 14:09:55 2018 -0400 dix: Remove the magic WhenMapped backing store hack Automatic compositing exists, if that's what you want then use it. Signed-off-by: Adam Jackson commit 382c26dade81a4c629307a3bfe6f5cca5af640e0 Author: Michel Dänzer Date: Fri Oct 5 12:24:23 2018 +0200 glamor: Add support for exporting depth 15/8 pixmaps This allows X to run with glamor at these depths. commit a2d188c7db1baaf21b42c2e8bccf54c8d5486548 Author: Olivier Fourdan Date: Mon Oct 8 16:38:01 2018 +0200 xwayland: keep `xwl_present_timer_callback()` private `xwl_present_timer_callback()` is initially marked a private and later implemented as public. Let's keep that private, shall we. Signed-off-by: Olivier Fourdan commit 0816e8fca6194dfb4cc94c3a7fcb2c7f2a921386 Author: Adam Jackson Date: Tue Sep 18 14:37:51 2018 -0400 linux: Make platform device probe less fragile At the point where xf86BusProbe runs we haven't yet taken our own VT, which means we can't perform drm "master" operations on the device. This is tragic, because we need master to fish the bus id string out of the kernel, which we can only do after drmSetInterfaceVersion, which for some reason stores that string on the device not the file handle and thus needs master access. Fortunately we know the format of the busid string, and it happens to almost be the same as the ID_PATH variable from udev. Use that instead and stop calling drmSetInterfaceVersion. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 71703e4e8bd00719eefad53c2ed6c604079f87ea Author: rpm-build Date: Wed Oct 17 09:00:59 2018 +1000 xfree86: ensure the readlink buffer is null-terminated Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit ff91c696ff8f5f56da40e107cb5c321539758a81 Author: Michal Srb Date: Tue Oct 16 09:32:13 2018 +0200 xfree86: Only switch to original VT if it is active. If the X server is terminated while its VT is not active, it should not change the current VT. v2: Query current state in xf86CloseConsole using VT_GETSTATE instead of keeping track in xf86VTEnter/xf86VTLeave/etc. commit 7c25439f0db4c20a4eab4ed44262eb396305f58a Author: Peter Hutterer Date: Tue Oct 16 10:37:16 2018 +1000 xwayland: fix a realloc OOM error case Found by coverity Signed-off-by: Peter Hutterer commit bd5fe7593fd0df236f3b2be1f062166ddba7d67c Author: Peter Hutterer Date: Tue Oct 16 09:42:51 2018 +1000 xfree86: fix readlink call Misplaced parenthesis caused us to compare the sizeof, not the readlink return value. Signed-off-by: Peter Hutterer commit dda2323d239a48e50ac9fd6617d7b630d8a14235 Author: Peter Hutterer Date: Tue Oct 16 09:39:54 2018 +1000 xwayland: make a if noop clearer to the compiler/coverity Signed-off-by: Peter Hutterer commit fc78bcca21e767697de6ad4d8e03b6728856f613 Author: Adam Jackson Date: Wed Oct 10 14:09:11 2018 -0400 fbdevhw: Refuse to touch PCI devices on the fallback probe path Fixes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-fbdev/issues/9 Signed-off-by: Adam Jackson commit af151895f3cb1755a7a5631f2398a3d3b219cbef Author: Adam Jackson Date: Fri Oct 5 14:50:20 2018 -0400 glamor/egl: Avoid crashing on broken configurations 0a9415cf apparently can tickle bugs in the GL stack where glGetString returns NULL, presumably because the eglMakeCurrent() didn't manage to actually install a dispatch table and you're hitting a stub function. That's clearly not our bug, but if it happens we should at least not crash. Notice this case and fail gently. Signed-off-by: Adam Jackson commit 32677ce03d793a1f2aa8871112eb3d19b3cb762f Author: Alexander Volkov Date: Mon Feb 26 19:41:18 2018 +0300 os/xdmcp: Don't create a new socket in XdmcpReset() xdmcpSocket survives during the reset, there is no need to create a new one. This commit restores logic that was broken by 49c0f2413d32fdfe36e45861fcb32aaeab633094 in Xorg 1.19. Signed-off-by: Alexander Volkov commit 1bd5d0a53c5ff4169c5a6704c1c4b276f998b938 Author: Pierre Ossman Date: Wed Oct 3 10:28:52 2018 +0200 Switch automatic composite update to WorkQueue It is currently (ab)using the screen BlockHandler callback to do this. But this can cause problems with other extension as their block handlers might have executed before Composite's. And the operations Composite does might result in them wanting to change timeouts. Practically this caused problems for TigerVNC's VNC extension which failed to send out updates for Composite's screen updates. commit 43a0f9a5dbb469f4f403a8530f33be67618933b8 Author: Adam Jackson Date: Mon Oct 1 11:42:37 2018 -0400 modesetting: Don't free(dst) in drmmode_prop_info_copy The destination is always either on the stack or in the middle of some struct. Signed-off-by: Adam Jackson commit 361894497c6802b62c2da4a3dc7e98939fb24404 Author: Olivier Fourdan Date: Wed Sep 26 15:40:32 2018 +0200 xwayland: search for a render node to use wl_drm's protocol "device" event provides the path to the DRM device, which may not be a render node, thus causing Xwayland to fall back to DRM authentication which may fail if the user has switched to another VT while Xwayland is starting. Search for a render node corresponding to the given DRM device and try to use it instead, as render nodes do not need DRM authentication and Xwayland can make use of them if it can find one. Closes: https://bugs.freedesktop.org/108038 Signed-off-by: Olivier Fourdan commit 03b2125005b1c8d4eb62a4173a74458bbe72807b Author: Adam Jackson Date: Tue Aug 7 15:40:13 2018 -0400 dix: Remove LegalModifier() This hasn't done anything besides return TRUE in a long long time. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit a23eba2a91024d27da45e5aee1f4215f7ec2ae82 Author: Adam Jackson Date: Mon Nov 20 14:28:13 2017 -0500 dix: Merge AbortDDX into ddxGiveUp These are so close to identical that most DDXes implement one in terms of the other. All the relevant cases can be distinguished by the error code, so merge the functions together to make things simpler. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d78ac2f15913bf6f00e06986cc7db0ade9ebd806 Author: Adam Jackson Date: Tue Aug 7 15:16:16 2018 -0400 mi: Factor out miSaveScreen Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0a9415cf793babed1f28c61f8047d51de04f1528 Author: Adam Jackson Date: Fri Sep 14 11:33:43 2018 -0400 glamor_egl: Don't initialize on llvmpipe Mesa started supporting GL_OES_EGL_image on llvmpipe in 17.3, after this commit: commit bbdeddd5fd0b797e1e281f058338b3da4d98029d Author: Gurchetan Singh Date: Tue Aug 1 14:49:33 2017 -0700 st/dri: add drisw image extension That's pretty cool, but it means glamor now thinks it can initialize on llvmpipe. This is almost certainly not what anyone wants, as glamor on llvmpipe is pretty much uniformly slower than fb. This fixes both Xorg and Xwayland to refuse glamor in such a setup. Xephyr is left alone, both because glamor is not the default there and because Xephyr+glamor+llvmpipe is one of the easier ways to get xts to exercise glamor. The (very small) downside of this change is that you lose DRI3 support. This wouldn't have helped you very much (since an lp glamor blit is slower than a pixman blit), but it would eliminate the PutImage overhead for llvmpipe's glXSwapBuffers. A future change should add DRI3 support for the fb-only case. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit feca61cdb5351bbe178f7083938a973703aff866 Author: Jon Turney Date: Thu Sep 27 22:23:14 2018 +0100 test: Initialize the pixmap in damage test commit d1c00c859c6676fbb540420c9055788bc19cb18f Author: Adam Jackson Date: Tue Aug 28 15:58:54 2018 -0400 xfree86: Remove -flippixels No supported driver supports 1bpp anymore, nor has in a very long time. This option only worked with vgahw anyway. Signed-off-by: Adam Jackson commit 2bd631810d910975a5df55c0e76b02856d53688d Author: Adam Jackson Date: Thu Sep 13 16:11:23 2018 -0400 automake: Fix Linux build with --disable-apm --disable-acpi Fixes: accd32a4 (xorg: Remove the XF86PM define.) Signed-off-by: Adam Jackson commit 89901e14d2f98def2399fd0546838721e7ac452d Author: Eric Anholt Date: Wed Sep 19 18:02:41 2018 -0700 test: Add the start of a testsuite for damage. Inspired by the previous bug, build something we can use to write damage testcases, including testing for the bug. Signed-off-by: Eric Anholt commit bc36594e0eb8bfa5a673bcfd8c8168f70994a1df Author: Cedric Roux Date: Wed Sep 12 19:14:18 2018 +0200 miext/damage: take care of the coordinate mode in damagePolyPoint The mode (CoordModeOrigin or CoordModePrevious) was not taken into account when computing the box. The result was a bad drawing of points in some situations (on my hardware/software configuration, calling XDrawString followed by XDrawPoints in the mode CoordModePrevious). Signed-off-by: Cedric Roux Signed-off-by: Eric Anholt commit 734b2d6907f730571a2805cbc53fe7056190f19e Author: Olivier Fourdan Date: Thu Sep 20 16:32:29 2018 +0200 xwayland: Use `double` for `xwl_tablet_tool` So we do not lose subpixel precision in Xwayland. Suggested-by: Peter Hutterer Signed-off-by: Olivier Fourdan Closes: https://gitlab.freedesktop.org/libinput/libinput/issues/138 commit 2f424df0ca340b1c4e47d9461b04a2c5ec3ec649 Author: Jon Turney Date: Tue May 2 14:00:47 2017 +0100 hw/xwin/glx: Fix logging about WGL pxfs with overlays Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit d63f9dddeb0c656af2b8c6135cc40a76f0b5604f Author: Jon Turney Date: Fri Jul 15 15:18:36 2016 +0100 hw/xwin/glx: Use multisample attributes with wglChoosePixelFormatARB() Seems like this was omitted in error Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e3398d921be74df9c5d23408f39e70548df896d8 Author: Jon Turney Date: Fri Jul 15 15:15:18 2016 +0100 hw/xwin/glx: Add GLX_ARB_framebuffer_sRGB extension v2: Fix a bogus warning about a missing pixelformat attribute issued for every pixelformat when WGL_ARB_framebuffer_sRGB isn't available Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 1fc240c6877e44fc9e6d85837dc2d27e26193291 Author: Jon Turney Date: Fri Jul 15 13:46:45 2016 +0100 hw/xwin/glx: publish GLX create_context extensions Future work: To properly support GLX_ARB_create_context in indirect mode, we need to use wglCreateContextAttribsARB() rather than wglCreateContext(), when attribs are provided, rather than just dropping attribs on the floor, as we currently do. That probably entails removing the deferred context creation and instead using a temporary window, as direct WGL does. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 67b47d50dfb5f7a994ae44708d1b1ef1c42537b5 Author: Jon Turney Date: Fri Jul 15 14:06:32 2016 +0100 hw/xwin/glx: Add support for float format fbconfig GLX extensions v2: Set renderType more correctly Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6be9681eb9eb6645b19c09f7b3b6d5b5bef8866d Author: Jon Turney Date: Fri Jul 15 14:02:10 2016 +0100 hw/xwin/glx: Make WGL -> GLX extension mapping table-driven Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit ad6b4113cd27e7c57908081c0a20ab956d418f06 Author: Jon Turney Date: Thu Jul 24 12:26:22 2014 +0100 hw/xwin/glx: Fallback to ChoosePixelFormat() if wglChoosePixelFormatARB() fails In glxWinSetPixelFormat() handle the case where wglChoosePixelFormatARB() fails and fallback to ChoosePixelFormat() It seems for some drivers, wglChoosePixelFormatARB() can fail when the provided DC doesn't belong to the driver (e.g. it's a compatible DC for a bitmap, so allow a fallback to ChoosePixelFormat() if it fails. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c0adf404a25407995dae79664ef4875ce093497 Author: Jon Turney Date: Sat Jan 11 16:35:31 2014 +0000 hw/xwin/glx: Don't create fbConfigs for un-accelerated pixelFormats Exposing these pixelFormats is problematic: they are provided by the 'GDI Generic' renderer, which doesn't support the same set of extensions as the IGD providing the more capable pixelFormats. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6a2ce6c5da9456b97683db6224f38ef3b02cce4b Author: Ross Burton Date: Thu Sep 20 13:21:34 2018 +0100 compiler.h: only use inx/outx on ARM with glibc musl only implements inx/outx on x86, so check for __GLIBC__ instead of __linux__. Signed-off-by: Ross Burton commit 5f65a6246fe752764045dd1e38912f1dccec71e4 Author: Ross Burton Date: Thu Sep 20 20:12:24 2018 +0100 xorg-server.m4: just all cflags instead of just sdkdir Instead of fetching just the sdkdir variable of xorg-server using pkg-config, simply get all of the CFLAGS. Aside from completeness, this helps builds in sysroots as pkg-config knows what to do with --cflags but doesn't remap arbitrary variables. Signed-off-by: Ross Burton commit 19f6cb570becbc4e355807199c6e251fc7935132 Author: Eric Anholt Date: Wed Sep 19 13:28:06 2018 -0700 shm: Pick the shm dir at run time, not build time. Prodding the builder's filesystem for tmp dirs doesn't necessarily tell you anything about what the actual host's filesystem is going to look like, so we should just try the dirs at runtime. Signed-off-by: Eric Anholt commit 804a9b4f57107fa2d0ed1ae0becda5bebaffe6e1 Author: Eric Anholt Date: Wed Sep 19 13:20:12 2018 -0700 shm: reindent shm_tmpfile to follow our standards. Signed-off-by: Eric Anholt commit b8b64cd627232a1fed791b8baf562900144bf186 Author: Eric Anholt Date: Wed Sep 19 13:12:40 2018 -0700 xorg: Don't log "Build Operating System: Linux 4.9.0-5-amd64 x86_64 Debian" I don't think this is useful information to have in the log, and it's a bunch of autotools and meson logic to produce it. Signed-off-by: Eric Anholt commit bfa6e84641fc7473fc2eb7e0e872e6b9fc339c2a Author: Eric Anholt Date: Wed Sep 19 13:07:16 2018 -0700 meson: Add configure option and autodetection of HAVE_INPUTTHREAD. Signed-off-by: Eric Anholt commit a56da0ff2814f86af08668610327082b8e2f4308 Author: Adam Jackson Date: Wed Sep 12 17:19:38 2018 -0400 include: Remove now-dead declarations 60ec8ead broke the autotools build: sdksyms.o:(.data+0x58): undefined reference to `InitConnectionLimits' sdksyms.o:(.data+0x2ec8): undefined reference to `xf86ServerName' collect2: error: ld returned 1 exit status Makefile:811: recipe for target 'Xorg' failed Likewise 3a4d7c79 for InitConnectionLimits. Signed-off-by: Adam Jackson commit a2c1260958fb8b4ec81b9107c5d1ca222cc7d770 Author: Adam Jackson Date: Mon Aug 27 15:02:50 2018 -0400 xfree86: Remove vestigial lastScrnFlag Only the mga XAA code ever set this (hence the compat macro), since XAA is long gone this can go too. Signed-off-by: Adam Jackson commit c7414f4d07b69a4b2f0d0af06f032393cf5fe6aa Author: Adam Jackson Date: Wed Aug 22 14:57:05 2018 -0400 xfree86: Remove NoTrapSignals This was dangerous on UMS and largely pointless on KMS. commit d1aeaad5c6fc614c28129f5d2717c12ff7320081 Author: Adam Jackson Date: Wed Aug 22 12:30:32 2018 -0400 xfree86: Remove a fallback path we never hit If it's really this important we should just do it and not complain. We never do it so it must not matter. Signed-off-by: Adam Jackson commit 771980fc02c79bb44e8cee48da9ba159e6baeaa6 Author: Adam Jackson Date: Mon Aug 20 17:01:24 2018 -0400 xfree86: Remove some not-terribly-useful debugging I'm sure printing the address of function pointers in modules you'd loaded might have made sense back when we rolled our own dlopen, but we got better. Signed-off-by: Adam Jackson commit 6a094185d14db6818d98a320c59e0c4d7d43d5a8 Author: Adam Jackson Date: Wed Aug 22 11:18:58 2018 -0400 xfree86: Remove some redundant zero-fill for ScrnInfoRec xf86AllocateScreen() callocs these for us. Signed-off-by: Adam Jackson commit 60ec8eadc370a9b06cc3f105974c0c6b8ad1bb4e Author: Adam Jackson Date: Tue Aug 21 15:09:03 2018 -0400 xfree86: Remove unused xf86GetServerName() Signed-off-by: Adam Jackson commit a41ccaa0857146e986f11360d4f2aeb3913af9a6 Author: Adam Jackson Date: Wed Sep 12 15:45:52 2018 -0400 gitlab: Skip the docker-in-docker step No idea which cult's cargo I was looking at there. Cuts about a minute off the build time. Signed-off-by: Adam Jackson commit 3a4d7c79e7fb14c6f914db921c3dce1c22f62cd9 Author: Adam Jackson Date: Wed Aug 29 15:48:28 2018 -0400 dix: Remove MaxClients This variable was no longer being read anywhere. MAXCLIENTS the macro is the compile-time maximum limit, LIMITCLIENTS the macro is the default limit, LimitClients the variable is the limit for the current server. Signed-off-by: Adam Jackson commit 7d689f049c3cc16b8e0cb0103a384a2ceb84ea33 Author: Adam Jackson Date: Wed Aug 29 15:42:20 2018 -0400 xfree86: Fix Option "MaxClients" validation The old code would not in fact validate the option value, though it might complain about it in the log. It also didn't let you set some legal values that the -maxclients command line option would. Signed-off-by: Adam Jackson commit d791c8e5abc174ae589d954b0beb51d232f60019 Author: Adam Jackson Date: Mon Aug 27 16:42:42 2018 -0400 dga: Make shutdown less magical and/or terrifying DGAShutdown() walks every screen and attempts to reset the mode. That's maybe a reasonable thing to do, although the explicit loop is certainly a bad smell. In ddxGiveUp it's called after we've torn down the vga arbiter - and in fact most of the rest of screen state - which is... very very bad. The other place it's called is from the Control-Alt-BackSpace handler, where we don't even attempt to do vga arb setup, and where in any case we're going to escape the main loop eventually anyway. Move all that cleanup work inside DGACloseScreen. This means it happens earlier in server teardown than previously, but not in a way you're ever going to be upset about. Signed-off-by: Adam Jackson commit 3d06d111b272d495c2f12779097a3d9f1e632603 Author: Adam Jackson Date: Mon Aug 27 16:39:10 2018 -0400 dga: Simplify mieq handler registration Signed-off-by: Adam Jackson commit 801977e8252f87f9ab156c7e02ad00fb1d70f8e5 Author: Adam Jackson Date: Mon Aug 27 16:34:20 2018 -0400 mi: Hush mieqSetHandler for no-op changes If we set the handler to the thing it's already set to, that's fine. Signed-off-by: Adam Jackson commit ba0f5d854f4db52974ab5cd09191303b01b075ff Author: Dave Airlie Date: Wed Sep 12 11:39:32 2018 +1000 devices: break after finding and removing device from lists Coverity complains about a use after free in here after the freeing, I can't follow the linked list so well, but whot says the device can only be on one list once, so break should fix it. Signed-off-by: Dave Airlie commit c4591ea17110b5c318a5ef4b0f17a4eea306ea71 Author: Dave Airlie Date: Wed Sep 12 11:12:51 2018 +1000 mibltblt: free prgnSrcClip on error path. Pointed out by coverity. Signed-off-by: Dave Airlie commit 758393951233d1b2520cf4cefd33ec4288a3880a Author: Dave Airlie Date: Wed Sep 12 11:09:40 2018 +1000 xkb: fix what looks to be a copy-paste error with first vs firstMM Pointed out by coverity. Signed-off-by: Dave Airlie commit cad3a1a82da3c8421b5cc98af27a779a38b5c709 Author: Dave Airlie Date: Wed Sep 12 11:05:45 2018 +1000 posix_tty: free leak of xf86SetStrOption return value. Pointed out by coverity. Signed-off-by: Dave Airlie commit b6c29a881eb49300fddfd0187cb10891f5257d3b Author: Dave Airlie Date: Wed Sep 12 10:56:40 2018 +1000 modesetting: get pEnt after error checks This saves us having to make sure we clean it up. Pointed out by coverity. Signed-off-by: Dave Airlie commit f0a5c0d1fdaeee3cd701215f4f57b7eacaf783c2 Author: Dave Airlie Date: Wed Sep 12 10:52:25 2018 +1000 glamor: fix leak of fs_getcolor_source. This is created using XNFstrdup, so it needs to be freed. Pointed out by coverity. Signed-off-by: Dave Airlie commit c7fa6a0a0d4ad28ee21b8dd9ad4fbe33f462bc71 Author: Dave Airlie Date: Wed Sep 12 10:50:21 2018 +1000 fboverlay: move bpp checks above malloc Avoids having to free the malloced object. Pointed out by coverity. Signed-off-by: Dave Airlie commit 51ae6126dcf3e234d0f678f02934bc9515abb8ae Author: Dave Airlie Date: Wed Sep 12 10:33:04 2018 +1000 xi: free modifiers_failed on error path. (v2) Pointed out by coverity. v2: set modifies_failed to NULL at start (whot) Signed-off-by: Dave Airlie commit 3439929c510501929c6ef1d90477c33bf8838632 Author: Dave Airlie Date: Wed Sep 12 10:30:13 2018 +1000 shm: move shmsize verify before allocating the drawable. Otherwise if the VERIFY_SHMSIZE macro fails we leak the drawables we allocated earlier. Noticed by coverity scan. Signed-off-by: Dave Airlie commit 047794e3503774c576a815cc170663cbcff198dd Author: Adam Jackson Date: Tue Sep 11 10:33:25 2018 -0400 xselinux: warning fix ../Xext/xselinux_ext.c: In function ‘SELinuxExtensionInit’: ../Xext/xselinux_ext.c:692:21: warning: variable ‘extEntry’ set but not used [-Wunused-but-set-variable] Signed-off-by: Adam Jackson commit f4115bcc8c5f9d30ccfca5d5a7fc27acded02864 Author: Julien Isorce Date: Tue Sep 11 10:28:33 2018 -0700 glamor: add support for NV12 in Xv Useful when video decoders only output NV12. Currently glamor Xv only supports I420 and YV12. Note that Intel's sna supports I420, YV12, YUY2, UYVY, NV12. Test: xvinfo | grep NV12 Test: gst-launch-1.0 videotestsrc ! video/x-raw, format=NV12 ! xvimagesink v2: Combine the two texture2Ds on u_sampler. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit 44f5885686a30776160891e09cd4453afb9d5ade Author: Julien Isorce Date: Thu Sep 6 15:38:14 2018 -0700 glamor: add support for GL_RG Allow to upload the CbCr plane of an NV12 image into a GL texture. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit f98ff253c722da3f5ad747e6813752f9e74c54b5 Author: Julien Isorce Date: Thu Sep 6 15:38:13 2018 -0700 xfree86: define FOURCC_NV12 and XVIMAGE_NV12 Useful for glamor. Signed-off-by: Julien Isorce Tested-by: Olivier Fourdan Reviewed-by: Alex Deucher commit fc855216028e6a34b667c11e198aea405fb4bc00 Author: Adam Jackson Date: Thu Aug 9 09:55:23 2018 -0400 Remove old region API conversion scripts This was eight years ago, if you still need these you're in a bad place. Signed-off-by: Adam Jackson commit c4f3e42fe316c90a73908a838ce64abbb28fe0a2 Author: Adam Jackson Date: Wed Aug 29 16:07:59 2018 -0400 modesetting: Document Option "DoubleShadow" in the man page Signed-off-by: Adam Jackson commit 0dc2c419e11cf28b8fa1e607d4cf2d15f2eb2306 Author: Adam Jackson Date: Wed Aug 29 15:57:46 2018 -0400 modesetting: Lie less in the man page We don't support 8bpp, and we do have acceleration. Signed-off-by: Adam Jackson commit 3f31f56929e80001970e3821ed8b10c6075df8e6 Author: Olivier Fourdan Date: Wed Sep 5 10:49:27 2018 +0200 xwayland: Remove xwl_present_window from privates on cleanup Xwayland's `xwl_destroy_window()` invokes `xwl_present_cleanup()` before the common `DestroyWindow()`. But then `DestroyWindow()` calls `present_destroy_window()` which will possibly end up in `xwl_present_abort_vblank()` which will try to access data that was previously freed by `xwl_present_cleanup()`: Invalid read of size 8 at 0x434184: xwl_present_abort_vblank (xwayland-present.c:378) by 0x53785B: present_wnmd_abort_vblank (present_wnmd.c:651) by 0x53695A: present_free_window_vblank (present_screen.c:87) by 0x53695A: present_destroy_window (present_screen.c:152) by 0x42A90D: xwl_destroy_window (xwayland.c:653) by 0x584298: compDestroyWindow (compwindow.c:613) by 0x53CEE3: damageDestroyWindow (damage.c:1570) by 0x4F1BB8: DbeDestroyWindow (dbe.c:1326) by 0x46F7F6: FreeWindowResources (window.c:1031) by 0x472847: DeleteWindow (window.c:1099) by 0x46B54C: doFreeResource (resource.c:880) by 0x46C706: FreeClientResources (resource.c:1146) by 0x446ADE: CloseDownClient (dispatch.c:3473) Address 0x182abde0 is 80 bytes inside a block of size 112 free'd at 0x4C2FDAC: free (vg_replace_malloc.c:530) by 0x42A937: xwl_destroy_window (xwayland.c:647) by 0x584298: compDestroyWindow (compwindow.c:613) by 0x53CEE3: damageDestroyWindow (damage.c:1570) by 0x4F1BB8: DbeDestroyWindow (dbe.c:1326) by 0x46F7F6: FreeWindowResources (window.c:1031) by 0x472847: DeleteWindow (window.c:1099) by 0x46B54C: doFreeResource (resource.c:880) by 0x46C706: FreeClientResources (resource.c:1146) by 0x446ADE: CloseDownClient (dispatch.c:3473) by 0x446DA5: ProcKillClient (dispatch.c:3279) by 0x4476AF: Dispatch (dispatch.c:479) Block was alloc'd at at 0x4C30B06: calloc (vg_replace_malloc.c:711) by 0x433F46: xwl_present_window_get_priv (xwayland-present.c:54) by 0x434228: xwl_present_get_crtc (xwayland-present.c:302) by 0x539728: proc_present_query_capabilities (present_request.c:227) by 0x4476AF: Dispatch (dispatch.c:479) by 0x44B5B5: dix_main (main.c:276) by 0x75F611A: (below main) (libc-start.c:308) This is because `xwl_present_cleanup()` frees the memory but does not remove it from the window's privates, and `xwl_present_abort_vblank()` will still find it and hence try to access that freed memory... Remove `xwl_present_window` from window's privates on cleanup so that no other function can find and reuse that data once it's freed. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1616269 Signed-off-by: Olivier Fourdan commit 53ce2ba0a19af9c549f47a4cc678afcebeb6087e Author: Lionel Landwerlin Date: Tue Aug 28 21:30:05 2018 +0100 xwayland: fix access to invalid pointer xwl_output->randr_crtc is used in the update_screen_size() function : ==5331== Invalid read of size 4 ==5331== at 0x15263D: update_screen_size (xwayland-output.c:190) ==5331== by 0x152C48: xwl_output_remove (xwayland-output.c:413) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== by 0x27574B: Dispatch (dispatch.c:421) ==5331== by 0x279945: dix_main (main.c:276) ==5331== Address 0x1aacb5f4 is 36 bytes inside a block of size 154 free'd ==5331== at 0x48369EB: free (vg_replace_malloc.c:530) ==5331== by 0x1F8AE8: RROutputDestroyResource (rroutput.c:421) ==5331== by 0x29A2AC: doFreeResource (resource.c:880) ==5331== by 0x29AE5B: FreeResource (resource.c:910) ==5331== by 0x152BE0: xwl_output_remove (xwayland-output.c:408) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== Block was alloc'd at ==5331== at 0x48357BF: malloc (vg_replace_malloc.c:299) ==5331== by 0x1F93E0: RROutputCreate (rroutput.c:83) ==5331== by 0x152A75: xwl_output_create (xwayland-output.c:361) ==5331== by 0x14BE59: registry_global (xwayland.c:764) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) Signed-off-by: Lionel Landwerlin Reviewed-by: Daniel Stone commit 75448671abe2c6ae3745eb5d2ed2e76df2de9c41 Author: Olivier Fourdan Date: Wed Sep 5 15:20:17 2018 +0200 glx: check for indirect context in CreateContextAttribsARB() Commit 99f0365b "Add a command line argument for disabling indirect GLX" added a test to check if indirect context are enabled in `DoCreateContext()` but `__glXDisp_CreateContextAttribsARB()` doesn't use `DoCreateContext()` and doesn't check if indirect context is enabled. As a result, clients can still manage to create indirect contexts using `glXCreateContextAttribsARB()` even if indirect contexts are disabled, which can possibly crash Xservers such as Xwayland or Xephyr when the context is destroyed. To avoid the issue, check for `enableIndirectGLX` in `__glXDisp_CreateContextAttribsARB()` as well. Fixes: 99f0365b "Add a command line argument for disabling indirect GLX" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107508 Signed-off-by: Olivier Fourdan commit ce271535adb6974e0a43bb64c8ed7a5dcaff67a2 Author: Lionel Landwerlin Date: Mon Aug 27 01:04:45 2018 +0100 present: fix freed pointer access When a vblank has been marked as aborted, it's going to be free in the flip_notify function when stopped. We can't notify it after it's stopped because the pointer is invalid. Valgrind backtrace: ==5331== Invalid read of size 8 ==5331== at 0x212B4D: present_vblank_notify (present_vblank.c:34) ==5331== by 0x21439B: present_wnmd_flip_notify (present_wnmd.c:194) ==5331== by 0x21439B: present_wnmd_event_notify (present_wnmd.c:228) ==5331== by 0x156216: xwl_present_sync_callback (xwayland-present.c:282) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== by 0x27574B: Dispatch (dispatch.c:421) ==5331== Address 0x1b44dc98 is 40 bytes inside a block of size 184 free'd ==5331== at 0x48369EB: free (vg_replace_malloc.c:530) ==5331== by 0x213B0A: present_wnmd_free_idle_vblanks (present_wnmd.c:118) ==5331== by 0x213B0A: present_wnmd_flips_stop (present_wnmd.c:161) ==5331== by 0x2143EF: present_wnmd_flip_notify (present_wnmd.c:192) ==5331== by 0x2143EF: present_wnmd_event_notify (present_wnmd.c:228) ==5331== by 0x156216: xwl_present_sync_callback (xwayland-present.c:282) ==5331== by 0x6570FCD: ffi_call_unix64 (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x657093E: ffi_call (in /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4) ==5331== by 0x4DDB183: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD79D8: ??? (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x4DD8EA3: wl_display_dispatch_queue_pending (in /usr/lib/x86_64-linux-gnu/libwayland-client.so.0.3.0) ==5331== by 0x14BCCA: xwl_read_events (xwayland.c:814) ==5331== by 0x2AC0D0: ospoll_wait (ospoll.c:651) ==5331== by 0x2A5322: WaitForSomething (WaitFor.c:208) ==5331== Block was alloc'd at ==5331== at 0x48377D5: calloc (vg_replace_malloc.c:711) ==5331== by 0x212D9F: present_vblank_create (present_vblank.c:69) ==5331== by 0x214014: present_wnmd_pixmap (present_wnmd.c:610) ==5331== by 0x21576C: proc_present_pixmap (present_request.c:150) ==5331== by 0x27599D: Dispatch (dispatch.c:479) ==5331== by 0x279945: dix_main (main.c:276) ==5331== by 0x633AB16: (below main) (libc-start.c:310) v2: Still notify aborted flips (Roman) Signed-off-by: Lionel Landwerlin Reviewed-by: Daniel Stone Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107314 Reviewed-by: Roman Gilg Tested-by: Roman Gilg commit b3f64786a3fd428f7fdccd8c884478fd62b70c16 Author: Eric Anholt Date: Tue Sep 4 20:52:57 2018 -0700 glamor: Add support for exporting depth 16 pixmaps. With a patch to mesa to expose rgb565 pbuffers even on a server with only depth 24 and 32 visuals, fixes dEQP-EGL.functional.render.single_context.gles2.rgb565_pbuffer. Those pbuffers (or at least something renderable with 565) are required by the current CTS for GLES3, and having the server support DRI3 on those pixmaps means that we can avoid having a different path for EGL pbuffers compared to pixmaps. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit b84e7f1c2293f22bd9fcd92a6a82601f94a060a5 Author: Lyude Paul Date: Thu Sep 6 16:40:06 2018 -0400 meson: Fix building with -Ddga=false We forget to assign a value to xf86dgaproto_dep if -Ddga=false, which causes the meson build to fail: meson.build:448:0: ERROR: Unknown variable "xf86dgaproto_dep". A full log can be found at /home/lyudess/build/xserver/meson-logs/meson-log.txt FAILED: build.ninja So, just set it to an empty dependency to fix that. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit a9a5bd0020dc76040d9b3722c0c88ccb12132dc0 Author: Jon Turney Date: Mon Aug 27 12:41:22 2018 +0100 hw/xwin: Fix 'make distcheck' Add internal.h to SOURCES, omitted from 126c1cfa Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit cd285922cdec966825e47220b1182a57abc1ff90 Author: Scott Anderson Date: Mon Aug 6 18:09:26 2018 +1200 xwayland: use wayland axis_discrete event This prevents multiple scroll events happening for wayland compositors which send axis values other than 10. For example, libinput will typically return 15 for each scroll wheel step, and if a wayland compositor sends those to xwayland without normalising them, 2 scroll wheel steps will end up as 3 xorg scroll events. By listening for the discrete_axis event, this will now correctly send only 2 xorg scroll events. The wayland protocol gurantees that there will always be an axis event following an axis_discrete event. However, it does not gurantee that other events (including other axis_discrete+axis pairs) will not happen in between them. So we must keep a list of outstanding axis_discrete events. Signed-off-by: Scott Anderson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f79e5368512b72bb463925983d265b070261b7aa Author: Jim Qu Date: Mon Aug 27 13:37:38 2018 +0800 modesetting: code refactor for PRIME sync The X will be crashed on the system with other DDX driver, such as amdgpu. show the log like: randr: falling back to unsynchronized pixmap sharing (EE) (EE) Backtrace: (EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4e) (EE) 1: /usr/lib/xorg/Xorg (0x55cb0151a000+0x1b5ce9) (EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7f1587a1d000+0x11390) (EE) (EE) Segmentation fault at address 0x0 (EE) The issue is that modesetting as the master, and amdgpu as the slave. Thus, when the master attempts to access pSlavePixPriv in ms_dirty_update(), problems result due to the fact that it's accessing AMD's 'ppriv' using the modesetting structure definition. Apart from fixing crash issue, the patch fix other issue in master interface in which driver should refer to master pixmap. Signed-off-by: Jim Qu Reviewed-by: Alex Goins commit 8a3ae555efb02b3811cca0bfb4ddaf8fe1457778 Author: Eric Anholt Date: Thu Aug 9 13:02:41 2018 -0700 meson: Add an option to build XSELINUX. Dependencies are ported from the automake build. v2: Make it a tristate defaulting to 'auto'. Use pkg-config for libaudit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a90f33721eba7f2dbde4a7278f1a213d696c85e9 Author: Alex Goins Date: Tue Aug 14 15:05:46 2018 -0500 randr: rrCheckPixmapBounding should only increase screen size The purpose of rrCheckPixmapBounding() is to make sure that the fb is large enough to accommodate the region scanned out by a GPU screen. Currently, however, it will actually shrink the fb if it's larger than it needs to be. This is a problem when combining PRIME output slaving with arbitrary transforms with xrandr. Although arbitrary transforms are not supposed to constrain the size of the fb (https://lists.freedesktop.org/archives/xorg-devel/2018-January/055563.html), xrandr will use RRSetScreenSize to resize the desktop to accommodate scaling transforms, e.g. scaling a 1920x1080 display to 3840x2160 will result in a desktop size of 3840x2160. In the case of PRIME, rrCheckPixmapBounding() will be called after RRSetScreenSize() and it will resize the fb back down to what it would be without the scaling transform, e.g. 1920x1080. This represents divergence in behavior between PRIME and non-PRIME outputs. I had originally made rrCheckPixmapBounding() account for arbitrary transforms, but realized that the fb being large enough to accommodate arbitrary transforms is not a hard requirement enforced in the server. Instead, this change simply makes it so that rrCheckPixmapBounding() will only resize the fb to be larger than it already is, preventing it from stepping on prior requests to increase the size of the fb. Signed-off-by: Alex Goins Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 1fc20b985cc888345bc8c6fce7b43f10ce71fe43 Author: Eric Anholt Date: Tue Aug 7 16:23:19 2018 -0700 meson: Add detection of libsystemd-daemon. This enables Xtrans's systemd socket activation. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 4ba786677050684c8801201f6bd83ce884f2885e Author: Eric Anholt Date: Tue Aug 7 16:23:18 2018 -0700 meson: Get close to parity with autotools for CLIENTIDS tracking. The client ID is only needed for XRes, and autotools build ignores the --clientids= arg if xres is disabled. We haven't made a meson option for disabling tracking client ids (is it actually worth a build option?), so just make this depend on xres. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit e047da37becc23a8d2549d8f264aaa18e4965186 Author: Eric Anholt Date: Tue Aug 7 16:23:17 2018 -0700 meson: Add missing setup of the NO_LOCAL_CLIENT_CRED define. Ported from autotools. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 049d2346abee091f18e6f62bcf7331267c2ba656 Author: Eric Anholt Date: Tue Aug 7 16:23:16 2018 -0700 meson: Make FALLBACK_INPUT_DRIVER configurable in meson. This makes us match the featureset of autotools, and also fixes the non-Linux default value to match. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 97bd8bc9cb6d910420627760288696e2a0c5d226 Author: Eric Anholt Date: Tue Aug 7 16:23:14 2018 -0700 meson: Make xf86vidmodeproto mandatory. This is silly to have optional based on detection of the protocol headers, particularly now that we have a single protocol header repo to install. Reviewed-by: Peter Hutterer Signed-off-by: Eric Anholt commit db53c439ba785a16f789918fe66da6ba161a0742 Author: Eric Anholt Date: Tue Aug 7 16:23:13 2018 -0700 meson: Add linking to x86 iopl libs on BSDs. Ported from automake. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 9869512cbf1bd87146f59106c0c71bda76cc0dcc Author: Eric Anholt Date: Tue Aug 7 16:23:12 2018 -0700 meson: Add HAVE_LIBDISPATCH define to xquartz build. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 843e44adf17b2828991a26ac3f8f82cf2fa63bd3 Author: Eric Anholt Date: Tue Aug 7 16:23:11 2018 -0700 meson: Add PIO access support for FreeBSD and NetBSD on Alpha. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 513d52d58915f291c0f706b67b8dc73f45de109f Author: Eric Anholt Date: Tue Aug 7 16:23:10 2018 -0700 meson, automake: Drop unused USESTDRES cflag setup. Nothing in tree references the flag. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit d0545847a06f375586927ea66c521a039439f708 Author: vadym.shovkoplias Date: Thu Aug 9 12:25:08 2018 -0400 autotools: Handle case when bindir var in xkbcomp.pc is absent Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107521 Fixes: 726839459cb (autotools: Derive xkb configuration from xkbcomp.pc) Reviewed-by: Adam Jackson Signed-off-by: vadym.shovkoplias commit 4fe02b8da3ca58500f7e6e017e388907cf4a8b73 Author: Peter Hutterer Date: Wed Aug 8 15:22:41 2018 +1000 dix: check_modmap_change() returns Success, not true Not sure what if anything calls XSetDeviceModifierMapping() but this would've failed all the time. check_modmap_change() returns Success but we were treating it like a boolean. Fix this. Reported-by: Adam Jackson Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit c20e7b5e2222c0cae2a487264748fa5db711e6e4 Author: Eric Anholt Date: Wed Aug 1 13:49:54 2018 -0700 meson: Automatically detect HAVE_PTHREAD_SETNAME_NP Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 86c9245838b95e8a0c37fa61d835112933c738f0 Author: Eric Anholt Date: Wed Aug 1 13:49:53 2018 -0700 meson: Try to hook up BSD APM build configuration. I don't have a BSD to test on, but this should do the same as what autotools did. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit accd32a466a1a87ab45b5422dff2ef5a9c867049 Author: Eric Anholt Date: Wed Aug 1 13:49:52 2018 -0700 xorg: Remove the XF86PM define. We already have pm_noop.c being built most of the time for the no-OS-PM case, so just switch to always using it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 708ddfbda1391468d66957e247f51854b39db5fa Author: Eric Anholt Date: Wed Aug 1 13:49:51 2018 -0700 automake,meson: Remove HAVE_LIBUDEV define. CONFIG_UDEV and CONFIG_UDEV_KMS are the actual defines that are used in the C code. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 7deaf990079b94c70d263d8f1e16bb954bd2917f Author: Eric Anholt Date: Wed Aug 1 13:49:50 2018 -0700 meson: Automatically detect support for XTRANS_SEND_FDs. The SCM_RIGHTS flag seems to be the thing that xtrans depends on, and meson makes the check easy without needing a build option. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit e3e5265743a3536f15c8b7ae521848a646cdc189 Author: Eric Anholt Date: Wed Aug 1 13:49:49 2018 -0700 meson: Remove XXX for libconfig in kdrive. This is already included in ephyr (the only kdrive server left) Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 1ef7aed3e2bb2af32330f19b1e7560000512ddfe Author: Keith Packard Date: Tue Jun 26 09:20:00 2018 -0700 During reset/shutdown, clean up leases in DIX instead of each driver Instead of having every video driver loop over any pending leases to free them during CloseScreen, do this up in the DIX layer by terminating leases when a leased CRTC or Output is destroyed and (just to make sure), also terminating leases in RRCloseScreen. The latter should "never" get invoked as any lease should be associated with a resource which was destroyed. This is required as by the time the driver's CloseScreen function is invoked, we've already freed all of the DIX randr structures and no longer have any way to reference the leases Signed-off-by: Keith Packard Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 Cc: Thomas Hellstrom commit d625e16918ef9104863709eb108346464767c444 Author: Takashi Iwai Date: Thu Jul 19 14:38:19 2018 +0200 modesetting: Fix cirrus 24bpp breakage The recent rewrite of modesetting driver broke the 24bpp support. As typically found on cirrus KMS, it leads to a blank screen, spewing the error like: failed to add fb -22 (EE) modeset(0): failed to set mode: Invalid argument The culript is that the wrong bpp value of the front buffer is passed to drmModeAddFB(). Fix it by replacing with the back buffer bpp, drmmode->kbpp. Signed-off-by: Takashi Iwai Tested-by: Stefan Dirsch Reviewed-by: Adam Jackson commit cdec2b3c195d1d080207ef01c55ff14b45370010 Author: Olivier Fourdan Date: Wed Jul 25 16:33:23 2018 +0200 xwayland: Enable DRI3 for glamor glamor_fds_from_pixmap() will bail out early if DRI3 is not enabled, unfortunately Xwayland's glamor code would not set it as enabled which would lead to blank pixmaps when using texture from pixmap. Make sure to mark DRI3 as enabled from glamor_egl_screen_init() in Xwayland. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107287 Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap") Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit ce2dde9ed0243a18ae18af0879134f7c1afbd700 Author: emersion Date: Fri Jul 13 15:51:26 2018 -0400 xwayland: rotate logical size for RRMode The logical size is the size of the output in the global compositor space. The mode width/height should be scaled as in the logical size, but shouldn't be transformed. Thus we need to rotate back the logical size to be able to use it as the mode width/height. This fixes issues with pointer input on transformed outputs. Signed-Off-By: Simon Ser Reviewed-by: Olivier Fourdan commit 93cafb0828d2e24bd14616df1aa9883fb843dd6c Author: Peter Hutterer Date: Wed Jul 18 13:22:43 2018 +1000 Xext: dynamically allocate the PanoramiXDepths[j].vids array Control flow is: PanoramiXMaybeAddDepth() allocates an array size 240 (pDepth->numVisuals) PanoramiXMaybeAddVisual() finds up to 270 matches (pScreen->numVisuals) and writes those into the previously allocated array. This caused invalid reads/writes followed by eventually a double-free abort. Reproduced with xorg-integration-tests server test XineramaTest.ScreenCrossing/* (and a bunch of others). Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1c7f34e99ff9750979a03ae20c6be1f2b42c284c Author: Stefan Agner Date: Thu Dec 22 15:41:06 2016 +0100 modesetting: Fix 16 bit depth/bpp mode When setting DefaultDepth to 16 in the Screen section, the current code requests a 32 bpp framebuffer, however the X-Server seems to assumes 16 bpp. Fixes commit 21217d02168d ("modesetting: Implement 32->24 bpp conversion in shadow update") Reviewed-by: Adam Jackson Signed-off-by: Stefan Agner commit d95a1310ef8e08a93a28f9766d1b4093f7891404 Author: Lyude Paul Date: Fri Jun 22 12:49:47 2018 -0400 meson: ensure the libc has RPC functions when secure-rpc is enabled Currently our meson.build just makes the assumption that the libc is going to provide RPC functions. This doesn't actually seem to be the case on Fedora, which causes compilation to fail unexpectedly: ../../Projects/xserver/os/rpcauth.c:47:10: fatal error: rpc/rpc.h: No such file or directory #include ^~~~~~~~~~~ compilation terminated. So, in the event that we can't use libtirpc ensure that we actually check whether or not the libc provides rpc/rpc.h. If it doesn't, raise an error. Reviewed-by: Adam Jackson Signed-off-by: Lyude Paul commit d83efc47b7a524b4f8d4a993c27a3e402a98fa7c Author: Keith Packard Date: Tue Jun 26 16:34:29 2018 -0700 xf86-video-modesetting: Lease planes as well if using atomic If we're using atomic modesetting, then we're also using universal planes, and so the lease we create needs to include the plane. Signed-off-by: Keith Packard Reviewed-by: Daniel Stone commit 4a11f66e4690f9e94dc61cb264f5ef78dbdb255a Author: Keith Packard Date: Tue Jun 26 14:05:31 2018 -0700 xf86-video-modesetting: Don't enable UNIVERSAL_PLANES separately We don't want universal_planes unless we're using atomic APIs for modesetting, and the kernel already enables universal_planes automatically when atomic is enabled. If we enable universal_planes when we're not using atomic, then we won't have selected a plane for each crtc, and this will break lease creation which requires planes for each output when universal_planes is enabled. Signed-off-by: Keith Packard Reviewed-by: Daniel Stone commit 2faf4cef8bcf9bb2034a27219a656ea7221afc6c Author: Keith Packard Date: Thu Jun 28 11:45:16 2018 -0700 xfree86: Wrap RRCrtcIsLeased and RROutputIsLeased to check for DIX structures Before DIX structures are allocated for crtcs and outputs, we don't want to call DIX randr code with NULL pointers. This can happen if the driver sets video modes early in server initialization, which Nouveau does in zaphod mode. Cc: thellstrom@vmware.com Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106772 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c55a44a9a86aaece17c1a2e73c77e3e665c4888e Author: Keith Packard Date: Thu Jun 28 11:45:15 2018 -0700 xfree86: Reset randr_crtc and randr_output early in xf86CrtcCloseScreen The DIX crtc and output structures are freed when their resources are destroyed, which happens before CloseScreen is called. As a result, we know these pointers are invalid and referencing them during any of the remaining CloseScreen sequence will be bad. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard Cc: thellstrom@vmware.com Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=106960 commit 49283e238a0ba6051034ae635e5970891f17f9df Author: Jon Turney Date: Sat Jun 30 12:53:35 2018 +0100 meson: use absolute paths in manpage substitutions paths returned by get_option('foodir') are potentially relative to prefix Noticed when comparing manpages generated by a meson build with those generated by an autotools build Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 38ff29ec8ead0a293f50ac52146199babe4205ca Author: Keith Packard Date: Thu Jan 18 18:07:29 2018 -0800 modesetting: Allow a DRM fd to be passed on command line with -masterfd [v2] This lets an application open a suitable DRM device and pass the file descriptor to the mode setting driver through an X server command line option, '-masterfd'. There's a companion application, xlease, which creates a DRM master by leasing an output from another X server. That is available at git clone git://people.freedesktop.org/~keithp/xlease v2: Always print usage, but note that it can't be used if setuid/gid Suggested-by: Lyude Paul Signed-off-by: Keith Packard Reviewed-by: Lyude Paul commit 2f39b2a07805194fdd7def30d941666963d6e670 Author: Laurent Carlier Date: Sat Jun 16 13:00:01 2018 +0200 meson: Add configuration of listening on tcp, unix and local bugzilla: https://bugs.kde.org/show_bug.cgi?id=395419 bugzilla: https://bugs.archlinux.org/task/59025 Signed-off-by: Laurent Carlier Reviewed-by: Aaron Plattner Signed-off-by: Peter Hutterer commit c41d4ff48f72aa964afd131b59e1538295d062dc Author: Lyude Paul Date: Wed Jun 27 20:29:42 2018 -0400 modesetting: Fix uninitialized memory usage in drmmode_crtc_get_fb_id() This really sucked to find out :( Signed-off-by: Lyude Paul Reviewed-by: Karol Herbst commit 9f02855e7a1b7a3c1e2ee7bfbc73e87c29126920 Author: Thomas Hellstrom Date: Wed Jun 20 19:23:48 2018 +0200 glamor: Work around GEM usage v2 KMS drivers are not required to support GEM. In particular, vmwgfx doesn't support flink and handles and names are identical. Getting a bo name should really be part of a lower level API, if needed, but in the mean time work around this by setting the name identical to the handle if GEM isn't supported. This fixes modesetting driver dri2 on vmwgfx. Reviewed-by: Deepak Rawat Signed-off-by: Thomas Hellstrom commit dc90b1c3c328f1d0b022a234b69ef32bda7ccb01 Author: Lyude Paul Date: Wed Jun 20 19:12:32 2018 -0400 randr: Scream when creating a shared pixmap fails This seems like a problem worth screaming about. Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie commit 186a21c4bac744ffe645c8d1a6dda2d41c6d33d8 Author: Lyude Paul Date: Wed Jun 20 19:12:31 2018 -0400 glamor: Unbreak glamor_fd_from_pixmap() When support for allocating GBM BOs with modifiers was added, glamor_fd_from_pixmap() was changed so that it would return an error if it got a bo with modifiers set from glamor_fds_from_pixmap(). The problem is that on systems that support BOs with modifiers, glamor_fds_from_pixmap() will always return BOs with modifiers. This means that glamor_fd_from_pixmap() was broken entirely, which broke a number of other things including glamor_shareable_fd_from_pixmap(), which meant that modesetting using multiple GPUs with the modesetting DDX was also broken. Easy reproducer: - Find a laptop with DRI prime that has outputs connected to the dedicated GPU and integrated GPU - Try to enable one display on each using the modesetting DDX - Fail Since there isn't a way to ask for no modifiers from glamor_fds_from_pixmap, we create a shared _glamor_fds_from_pixmap() function used by both glamor_fds_from_pixmap() and glamor_fd_from_pixmap() that calls down to the appropriate glamor_egl_fd*_from_pixmap() function. Signed-off-by: Lyude Paul Reviewed-by: Dave Airlie Cc: Louis-Francis Ratté-Boulianne Fixes: c8c276c956 ("glamor: Implement PixmapFromBuffers and BuffersFromPixmap") commit c12f1bd4b76088ea66e3bec9ab9721a52b20cdf2 Author: Lyude Paul Date: Thu Jun 7 20:30:34 2018 -0400 modesetting: Also disable CRTC in drmmode_output_disable() So, this did actually work on older kernels at one point in time, however it seems that this working was a result of some of the Linux kernel's atomic modesetting helpers not preserving the CRTC's enabled state in the right spots. This was fixed in: 846c7dfc1193 ("drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2") As a result, atomic commits which simply disassociate a DRM connector with it's CRTC while leaving the CRTC in an enabled state aren't enough to disable the CRTC, and result in the atomic commit failing. This currently can cause issues with MST hotplugging where X will end up failing to disable the MST outputs after they've left the system. A simple reproducer: - Start up Xorg - Connect an MST hub with displays connected to it - Remove the hub - Now there should be CRTCs stuck on the orphaned MST connectors, and X won't be able to reclaim them. Signed-off-by: Lyude Paul Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Dave Airlie commit 5a8b886a956773669ceb2a2bcacd59184bcc7c99 Author: Adam Jackson Date: Mon Jun 11 15:10:04 2018 -0400 configure: Remove unused CONFIGFILE This isn't used for anything, which is just as well, because /etc/xorg.conf is not in fact a path xserver will try to use. Bugzilla: https://bugs.freedesktop.org/8890 Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner commit a85e94a50c94b07574c8701a3ff3c1243f4257f4 Author: Olivier Fourdan Date: Fri Jun 15 08:57:12 2018 +0200 modesetting: use drmmode_bo_import() for rotate_fb drmmode_shadow_allocate() still uses drmModeAddFB() which may fail if the format is not as expected, preventing from using a rotated output. Change it to use the new function drmmode_bo_import() which takes care of calling the drmModeAddFB2() API. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106715 Signed-off-by: Olivier Fourdan Tested-by: Tomas Pelka Reviewed-by: Lyude Paul commit f5aace7a27d6d61068dcae46c9756b669ab51d50 Author: John Lumby Date: Tue Jun 26 17:14:34 2018 -0700 Change the DPMS initialization to be conditional on not set from config Any DPMS timeout values set in ServerFlags section of the xorg.conf are being overwritten by DPMS extension initialization. Therefore change the DPMS initialization of timeout values to be conditional on not set from config. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106963 Signed-off-by: John Lumby Reviewed-by: Emil Velikov Signed-off-by: Keith Packard commit f33cb4264387ed14a586ba080885b4d21e4aa48b Author: Damien Leone Date: Mon Jun 18 16:24:28 2018 -0700 os: Recompute whether any clients are ready after check_timers() If a driver calls AttendClient() from within a timer callback we need to re-compute the local 'are_ready' to prevent the attended client from waiting until WaitForSomething() times out. This is a fix similar to commit 9ed5b263. Signed-off-by: Damien Leone Reviewed-by: Keith Packard commit 92daeb31fa3235dc791e0444b072ec4bbc6e35ab Author: Olivier Fourdan Date: Mon Jun 11 09:21:08 2018 +0200 xwayland: mandatory EGL backend API The API init_wl_registry() and has_wl_interfaces() are marked as being optional, but both GBM And EGLStream backends implement them so there is point in keeping those optional. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan commit 792359057bd54548555674d2d309c0cfeebac12d Author: Olivier Fourdan Date: Mon Jun 11 09:13:30 2018 +0200 xwayland: simplify xwl_glamor_pixmap_get_wl_buffer() When retrieving the Wayland buffer from a pixmap, if the buffer already exists, the GBM backend will return that existing buffer. However, as seen with the Present issues, if the call had previously passed a wrong size, that buffer will remain at the wrong size for as long as the buffer exists, which is error prone. Considering that the width/height passed to get_wl_buffer() is always the actual pixmap drawable size, and considering that the EGLStream backend makes no use of the size either, there is really no point in passing the width/height around. Simplify the xwl_glamor_pixmap_get_wl_buffer() and EGL backends API by removing the pixmap size, and use the drawable size instead. Signed-off-by: Olivier Fourdan commit bdadaa25f5c1f62d30d8e76b4ebfcef414ed9c90 Author: Olivier Fourdan Date: Tue Jun 5 19:38:45 2018 +0200 xwayland: EGL_IMG_context_priority required by EGLStream xwl_glamor_eglstream_init_egl() uses "EGL_IMG_context_priority" extension, make sure it's actually available before using it. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 5d843f6947538dabde258584a5795e0b25ea8779 Author: Olivier Fourdan Date: Tue Jun 5 19:38:44 2018 +0200 xwayland: check for EGLStream backend explicitly Now that we have separate backends for EGLStream and GBM, we can explicitly check for the EGLStream backend to disable present support in that case. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit d7185a84b60ed03aaa84eb522dcff365218e7211 Author: Olivier Fourdan Date: Tue Jun 5 19:38:43 2018 +0200 xwayland: refactor EGL backends for wayland registry To be able to check for availability of the Wayland interfaces required to run a given EGL backend (either GBM or EGLStream for now), we need to have each backend structures and vfuncs in place before we enter the Wayland registry dance. That basically means that we should init all backends at first, connect to the Wayland compositor and query the available interfaces and then decide which backend is available and should be used (or none if either the Wayland interfaces or the EGL extensions are not available). For this purpose, hold an egl_backend struct for each backend we are to consider prior to connect to the Wayland display so that, when we get to query the Wayland interfaces, everything is in place for each backend to handle the various Wayland interfaces. Eventually, when we need to chose which EGL backend to use for glamor, the available Wayland interfaces and EGL extensions available are all known to Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 48f037a27c45b571c9750ac812977ac0a33ab12b Author: Olivier Fourdan Date: Tue Jun 5 19:38:42 2018 +0200 xwayland: move EGL backend init to glamor Move EGL backends initialization to its own function in xwayland-glamor.c Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit f2fcb4877e976d078b0eb4755177170467341484 Author: Olivier Fourdan Date: Tue Jun 5 19:38:41 2018 +0200 xwayland: Add Wayland interfaces check Introduces a new egl_backend function to let the EGL backend check for the presence of the required Wayland interfaces. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit b74b0f18b8d3032317e38453ee63ae9efd33a098 Author: Olivier Fourdan Date: Tue Jun 5 19:38:40 2018 +0200 xwayland: move egl_backend to its own struct EGL backend availability requires both EGL extensions and Wayland interfaces to be present, so we will need to consider multiple backends during initialization. As a preliminary work, move the egl_backend to its own struct so that we can have more than one backend at any given time. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit de004eefc60ec595f5d6d81658468e082f8df930 Author: Olivier Fourdan Date: Tue Jun 5 19:38:39 2018 +0200 xwayland: skip drm authentication with render node If using a render node, we can skip DRM authentication. Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit b823b43dca143810146f563d09e8996058b9d09e Author: Olivier Fourdan Date: Tue Jun 5 19:38:38 2018 +0200 xwayland: GBM should fail w/out "GL_OES_EGL_image" Surely, we should fail to init GBM backend if "GL_OES_EGL_image" is missing. This seems to have been lost with commit 1545e2dba ("xwayland: Decouple GBM from glamor"). Suggested-by: Emil Velikov Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit 78ce4aa979ff3f5870fbc12a7e5c53547084a61a Author: Olivier Fourdan Date: Tue Jun 5 19:38:37 2018 +0200 xwayland: swap "name" and "id" in init_wl_registry() Both xwl_glamor_init_wl_registry() and the Wayland global registry handler use the interface id/name in that order, using name/id in the egl_backend vfunc makes things confusing and error prone. Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit f6b2109c1b49484af772df518314ec8e8432febe Author: Olivier Fourdan Date: Tue Jun 5 19:38:36 2018 +0200 xwayland: move glamor specific routines Functions such as: xwl_glamor_egl_supports_device_probing() xwl_glamor_egl_get_devices() xwl_glamor_egl_device_has_egl_extensions() Are of no use outside of EGLStream support, move them to the relevant source file. Similarly, the other glamor functions such as: xwl_glamor_init() xwl_screen_set_drm_interface() xwl_screen_set_dmabuf_interface() xwl_glamor_pixmap_get_wl_buffer() xwl_glamor_init_wl_registry() xwl_glamor_post_damage() xwl_glamor_allow_commits() xwl_glamor_egl_make_current() Are useless without glamor support enabled, move those within a a "#ifdef XWL_HAS_GLAMOR" in xwayland.h Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov commit d31a7be15e259275599a9f67e0d921471ae64913 Author: Olivier Fourdan Date: Tue Jun 5 19:37:58 2018 +0200 xwayland: make xwl_output_get_xdg_output() static Make xwl_output_get_xdg_output() private, it doesn't need to be available elsewhere. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit e16a6da79dea793a335be70ba07d5e1c1295b5eb Author: Olivier Fourdan Date: Tue Jun 5 19:37:57 2018 +0200 xwayland: do not disable glamor if EGLStream failed EGLStream requires glamor, but the opposite is not true. So if someone passes "-eglstream" with a GPU which does not support EGLStream, we could maybe still try GBM and be lucky. That allows Wayland compositors to pass "-eglstream" regardless of the actual hardware, if they want to enable EGLStream on GPU which support it. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 44560af02823239e1b5b236e8cb365b5bdf24b6a Author: Olivier Fourdan Date: Tue Jun 5 19:37:56 2018 +0200 xwayland: process Wayland events after adding screen When we're done adding a new screen, we need to process any pending Wayland events again. Hence we don't end up processing xdg_output events unexpectedly when glamor is disabled. Be that because "-shm" was passed or "-eglstream" has failed. Failing to do that could lead to a crash at startup: Xwayland: dixGetPrivateAddr: Assertion `key->initialized' failed. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler) (EE) 1: libpthread.so.0 (funlockfile) (EE) 2: libc.so.6 (gsignal) (EE) 3: libc.so.6 (abort) (EE) 4: libc.so.6 (?+0x0) (EE) 5: libc.so.6 (__assert_fail) (EE) 6: Xwayland (dixGetPrivateAddr) (EE) 7: Xwayland (_fbGetWindowPixmap) (EE) 8: Xwayland (getDrawableDamageRef) (EE) 9: Xwayland (damageRegionProcessPending) (EE) 10: Xwayland (damagePolyFillRect) (EE) 11: Xwayland (miPaintWindow) (EE) 12: Xwayland (miWindowExposures) (EE) 13: Xwayland (miHandleValidateExposures) (EE) 14: Xwayland (SetRootClip) (EE) 15: Xwayland (update_screen_size) (EE) 16: Xwayland (apply_output_change) (EE) 17: libffi.so.6 (ffi_call_unix64) (EE) 18: libffi.so.6 (ffi_call) (EE) 19: libwayland-client.so.0 (wl_log_set_handler_client) (EE) 20: libwayland-client.so.0 (_init) (EE) 21: libwayland-client.so.0 (wl_display_dispatch_queue_pending) (EE) 22: libwayland-client.so.0 (wl_display_roundtrip_queue) (EE) 23: Xwayland (InitInput) (EE) 24: Xwayland (dix_main) (EE) 25: libc.so.6 (__libc_start_main) (EE) 26: Xwayland (_start) (EE) (EE) Fatal server error: (EE) Caught signal 6 (Aborted). Server aborting (EE) Aborted (core dumped) Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit dbde3fec32641ae23389cffa12a04d3608936795 Author: Olivier Fourdan Date: Tue Jun 5 19:37:55 2018 +0200 xwayland: "EGL_EXT_device_base" required for EGLStream eglQueryDevicesEXT() would abort if the required extensions are not available, meaning that enabling “-eglstream” on a non-EGLStream capable hardware would lead to an abort(). Check that "EGL_EXT_device_base" extension is available and bail out early if not, so we don't abort() later in eglQueryDevicesEXT(). Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 06c31e782e360363238cf20e7afd3e4990a2c304 Author: Olivier Fourdan Date: Tue Jun 5 19:37:54 2018 +0200 xwayland: allow "-eglstream" option The command line option "-eglstream" used to enable EGLStream support for NVidia GPU was made available only when Xwayland was built with EGLStream support enabled. Wayland compositors who spawn Xwayland have no easy way to tell whether or not Xwayland was built with EGLStream support enabled, and adding "-eglstream" command line option to Xwayland when it wasn't built with EGLStream support would prevent Xwayland from starting (“Unrecognized option” error). Make sure we support the command line option "-eglstream" regardless of EGLStream support in Xwayland. Obviously, if Xwayland was built without EGLStream support, this has no effect. Signed-off-by: Olivier Fourdan Reviewed-by: Lyude Paul Reviewed-by: Emil Velikov commit 707d0f912b916e7546c4f7e7a5f7023a53e74615 Author: Vladimir Panteleev Date: Wed Jun 20 13:37:45 2018 +0000 glx/vndcmds: Fix vendor hash table key size The keySize parameter of the hashing/comparison functions was incorrectly specified to be sizeof(void*), even though the keys of this hashtable are CARD32. Fixes address sanitizer failure on 64-bit builds. Reviewed-by: Adam Jackson commit 0170e200f546e4b3430bd07a70551436cf44b0be Author: Peter Hutterer Date: Mon Jun 11 09:04:22 2018 +1000 xwayland: add "tablet" into the tablet device names Changes the device name from "xwayland-stylus" to "xwayland-tablet stylus". This doesn't fully address #26 but it goes a little step into making it more human-readable. https://gitlab.freedesktop.org/wayland/wayland/issues/26 Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit ec7e2b54c5b4a34b2a077082967bc3ead30e227e Author: Alexander Volkov Date: Tue Jun 5 13:05:39 2018 +0300 Xext/shm: Refuse to work for remote clients Avoid access to System V shared memory segment on the X server side for clients forwarded via SSH. Also prevent them from hanging while waiting for the reply from the ShmCreateSegment request. v2: Allow ShmQueryVersion request even for remote clients Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=11080 Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 5c95be38e5af28108d8c6c08dfe08d1dfcb7ed42 Author: Michał Górny Date: Mon Jun 11 17:17:31 2018 -0400 xfree86: Makefile shouldn't rely on superuser being named 'root' Change the 'chown' statement in Makefile.am to use the numeric UID of superuser instead of relying on the name 'root'. Bugzilla: https://bugs.freedesktop.org/27726 Signed-off-by: Adam Jackson Signed-off-by: Michał Górny Reviewed-by: Peter Hutterer commit 166ac294aefe21a6cfcc0e7a4c9525eef49c2f0c Author: Matt Turner Date: Tue May 22 21:10:55 2018 -0700 xfree86: Inline xf86{Read,Write}Mmio{8,16,32} on alpha In commit 9db2af6f757e (xfree86: Remove xf86{Map,Unmap}VidMem) we somehow stopped exporting xf86{Read,Write}Mmio{8,16,32}. Since the function pointer indirection was intended to support dense vs sparse and sparse support is now gone, we can just make the functions static inline in compiler.h and avoid all of this. Bugzilla: https://bugs.gentoo.org/548906 Tested-by: Christopher May-Townsend Reviewed-by: Adam Jackson Signed-off-by: Matt Turner commit 1993f147d08170f07a72e43f0a0f27687e16967b Author: Olivier Fourdan Date: Fri Jun 8 16:23:44 2018 +0200 xwayland: use pixmap size on present flip If the pixmap size does not match the present box size, flickering occurs. This can happen when the client changes its size (e.g. switching to fullscreen), and since the buffer is kept as long as the pixmap is valid, once the buffer is created, it remains at the wrong (old) size and causes continuous flickering. Use the actual pixmap's drawable size instead of the present box to create the buffer so that it's sized appropriately. Bugzilla: https://bugs.freedesktop.org/106841 Fixes: 0fb2cca193e6 "xwayland: Preliminary support for Present's new window flip mode" Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer Reviewed-by: Roman Gilg commit 10eec2ccb11701fe29ab246acd6c0bdc2991b775 Author: Michel Dänzer Date: Thu Jun 7 17:55:21 2018 +0200 present/wnmd: Preserve window pixmap's screen_x/y on flip The incorrect values could result in the new pixmap's contents getting corrupted down the line. v2: * Guard screen_x/y lines by #ifdef COMPOSITE Bugzilla: https://bugs.freedesktop.org/106841 Fixes: 029608dd8020 "present: Add window flip mode" Reviewed-by: Adam Jackson # v1 Reviewed-by: Keith Packard # v1 Reviewed-by: Roman Gilg Tested-by: Olivier Fourdan # v1 commit 6300049a9a4b84789a2e8141f5cad17adf22185c Author: Dave Airlie Date: Tue May 29 10:39:22 2018 +1000 xwayland: fix typo in non-modifier fallback path Pointed out on irc by q66. Reviewed-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 40586cc4f8faa271d62fd84fe98c41debb878984 Author: Roman Kapl Date: Thu Jun 7 03:31:42 2018 +0200 Xi: add forgotten byte-swaps for Valuator fields This has caused nonsensical values in xinput output. Signed-off-by: Roman Kapl Signed-off-by: Peter Hutterer commit cefbc6a9356e5c6cf935b61557efa897762defae Author: Roman Kapl Date: Thu Jun 7 03:31:41 2018 +0200 Xi: fix byte-swapping of button labels The byte-swapping code forgot that the xXIButtonInfo is followed by a button mask, not directly by the button labels. This resulted in client crashes in cross-endian setups, for example in `xinput list --long`, since the client got an invalid atom. A new function was introduced to get the right positions for the label and mask data. Signed-off-by: Roman Kapl Signed-off-by: Peter Hutterer commit 9b8999411033c9473cd68e92e4690a91aecf5b95 Author: Adam Jackson Date: Wed Jun 6 15:56:26 2018 -0400 glamor: Enable modifier support for xfree86 too This was left disabled in 1.20.0, it's time to start being sure it works. Signed-off-by: Adam Jackson Acked-by: Keith Packard Acked-by: Daniel Stone commit 3ebef6ab850675e1091df2125ebdfbb147436e6c Author: Michel Dänzer Date: Fri Jun 1 11:57:15 2018 +0200 exa: Use PictureMatchFormat for source-only picture format description Their pFormat member is NULL, which resulted in a crash in miRenderColorToPixel. Fixes: 8171d4c2d67b "render: Store and use all 16bpc of precision for solid pixels (v2.1)" Reviewed-by: Adam Jackson commit 4d5950ce14676f970d9de97380929a93948b98f2 Author: Michel Dänzer Date: Wed May 23 11:18:02 2018 +0200 glamor: Propagate glamor_fds_from_pixmap error in glamor_fd_from_pixmap glamor_fds_from_pixmap returns 0 on error, but we were treating that as success, continuing with uninitialized stride and fd values. Also bail if the offset isn't 0, same as in dri3_fd_from_pixmap. v2: * Reduce to a simple one-liner fix (Emil Velikov) Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov commit 3da999a0390407d512bf784e4faf01482bfff9ea Author: Michel Dänzer Date: Wed May 23 11:38:13 2018 +0200 glamor: Always return 0 from glamor_fds_from_pixmap on error This matches what glamor_egl_fds_from_pixmap and dri3_fds_from_pixmap do and what proc_dri3_buffers_from_pixmap expects. Fixes: c8c276c9569b "glamor: Implement PixmapFromBuffers and BuffersFromPixmap" Reviewed-by: Emil Velikov commit 315c63c41d833700c505e4f21ffac4c59e1e3b2c Author: Michel Dänzer Date: Fri May 18 11:23:01 2018 +0200 modesetting: Pass O_CLOEXEC when opening a DRM device We don't want DRM file descriptors to leak to child processes. Reviewed-by: Keith Packard Signed-off-by: Michel Dänzer commit ab53e2859facecc0486344679dc01ea31fb427e9 Author: Michel Dänzer Date: Fri May 18 11:23:00 2018 +0200 xfree86: Fix O_CLOEXEC usage in lnx_platform It was passing O_CLOEXEC as permission bits instead of as a flag. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard commit 1e9d5533e3c08fc22099d6dd0f11fa642ab4f1b0 Author: Chris Wilson Date: Sun Apr 15 15:40:05 2018 +0100 os/WaitFor: Use the simpler xorg_list_for_each_entry() As we are not freeing elements while iterating the list of timers, we can forgo using the safe variant, and reduce the number of pointer dances required for the insertion sort. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 6115d8b40ce0c91620b6d5e7d18e0da704409f89 Author: Chris Wilson Date: Sun Apr 15 15:40:04 2018 +0100 os/WaitFor: Use xorg_list_append() Currently, we use xorg_list_add(new, head->prev) which is functionaly equivalent to xorg_list_append(), but with more pointer chasing, so reduce the strain on the reader and compiler by using the simpler append(). Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 7437b6dbdee050f8ebb3a79b9077d051c91880c3 Author: Lukas F. Hartmann Date: Tue May 15 21:51:56 2018 +0200 glamor_init: clamp GLSL to 120 if platform doesn't have instanced arrays Hi, I upgraded Xwayland and the assorted libraries from git masters today, and noticed that glamor wouldn't work anymore on i.MX6/etnaviv. The error was: No provider of glVertexAttribDivisor found. Requires one of: Desktop OpenGL 3.3 OpenGL ES 3.0 GL extension "GL_ANGLE_instanced_arrays" GL extension "GL_ARB_instanced_arrays" GL extension "GL_EXT_instanced_arrays" GL extension "GL_NV_instanced_arrays" The problem is that etnaviv offers GLSL 140 on GL 2.1 and glamor rendering assumes that glVertexAttribDivisor() is always available on GLSL>=130, which is not the case here. Forcing GLSL 120 makes glamor work fine again on this platform. After chatting with ajax in #xorg-devel, the following solution was proposed. This is my first time of submitting a patch, so please excuse me and advise if I'm doing it wrong ;) Cheers Lukas (mntmn) Reviewed-by: Eric Anholt commit 3ab32a537840c6e6d6228b4ba62f98fbf5224f8a Author: Bas Nieuwenhuizen Date: Sun May 13 15:31:37 2018 +0200 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Fixes using GL with the modesetting driver for me. Seems we were way behind on this one, time to look into something more scalable? Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Alex Deucher commit 27eff10bfa1a02da7338a82e2312d2080e3e5876 Author: Jon Turney Date: Sun May 13 19:36:05 2018 +0100 meson: don't put literal 'PACKAGE_STRING' and 'XORG_MAN_PAGE' in man pages Instead, substitute the same values as autotools does Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 47321bb455b1226c04711241496e62667eea34ea Author: Jon Turney Date: Sun May 13 19:36:04 2018 +0100 meson: don't install xorg wrapper manpages if suid-wrapper isn't being used Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 08a3583b5b2f812cc7f039aebd74ff9b1cb0dbcd Author: Jon Turney Date: Sun May 13 19:36:03 2018 +0100 meson: install xwinclip and Xwinrc man pages Omitted from a1e8dc05 Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit f50afa19fd67ca8a059eb909814a4d673bcb5a31 Author: Adam Jackson Date: Mon May 14 14:08:01 2018 -0400 Post-1.20 version bump Signed-off-by: Adam Jackson commit 82f8fc5ffc0065537896ec43ae60d67d9a164c75 Author: Adam Jackson Date: Thu May 10 12:24:11 2018 -0400 xserver 1.20 Signed-off-by: Adam Jackson commit b6bf68b8416ec4b717eb78703fb63789c68e509a Author: Aaron Plattner Date: Wed May 2 12:54:26 2018 -0700 meson: Fix module_dir configuration (v2) meson.build has code to set the module_dir variable to ${libdir}/xorg/modules if the module_dir option string is empty. However, this has several problems: 1. The variable is only used for an unused @moduledir@ substitution in the man page. The rule for xorg-server.pc uses option('module_dir') directly instead. 2. The 'module_dir' option has a default value of 'xorg/modules' so the above rule doesn't do anything by default. 3. The xorg-server.pc rule uses ${exec_prefix}/option('module_dir'), so the effect of #2 is that the default moduledir is different between autoconf and meson. E.g. if ${prefix} is /X, then you get autoconf: moduledir=/X/lib/xorg/modules meson: moduledir=/X/xorg/modules Fix this by using the module_dir variable when generating xorg-server.pc, and by using join_paths() to assign module_dir unconditionally. v2: Keep the 'xorg/modules' default path, but use join_paths() unconditionally (Thierry Reding) Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer commit 9d628ee5facf6318368d5b8ca181e083adcffe8c Author: Roman Gilg Date: Wed May 2 21:32:48 2018 +0200 modesetting: set gbm as dependency in meson build Modifiers support needs gbm as a dependency. Without setting the dependency included headers are not found reliably and the build might fail if the headers are not placed in the default system include paths. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 0445705a8bbf76a5532997823ea8110daff26c6d Author: Adam Jackson Date: Mon May 7 17:21:20 2018 -0400 man: Fix automake seddery Because this is an automakefile, things inside @@ get expanded, which means your sed ends up saying s|/var/log|/var/log| and your manual pages still have @logdir@ in them. Fix this by hiding the @s inside a trivial character range, which keeps the pattern preserved all the way into the Makefile. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 9f21872ad8591c1f6f8ea1e466f212c3582d3c33 Author: Adam Jackson Date: Mon May 7 17:21:19 2018 -0400 glx: Be sure to set an error for ghost contexts Otherwise the caller is going to return garbage memory for the error value. Signed-off-by: Adam Jackson commit b9f415cbad47412bfb218cf7375d0c2856a27d1b Author: Adam Jackson Date: Mon May 7 17:21:18 2018 -0400 present: Fix swapping of PresentCompleteNotify events The code would fall through to the PresentIdleNotify case, and nothing good would come of it. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit cc66777d85f3509b0f9dfc9210d0a0415a2a388d Author: Adam Jackson Date: Mon May 7 17:21:17 2018 -0400 xwayland: Don't create a "fake" crtc for Present We probably don't want a fake crtc to be visible to clients, and we definitely don't want to generate events every time we create such a fake (which would happen as a side effect from RRCrtcCreate hitting RRTellChanged). As it happens we're not actually using that crtc for anything because xwayland doesn't store any state on the crtc object, so it suffices to use the real crtc for the screen. Signed-off-by: Adam Jackson Tested-by: Roman Gilg Reviewed-by: Roman Gilg commit b23a0e4ded62500f2c248f23962ff5ac718467e6 Author: Eric Anholt Date: Mon May 7 16:46:20 2018 -0700 xwayland: Fix a 32-bit build warning. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit ef95331603ff31d3643360c399b3865db5b0b97d Author: Eric Anholt Date: Mon May 7 16:46:19 2018 -0700 dri3: Switch fds_from_pixmap to stdint types. Again, this was causing 32-bit build warnings due to mixing CARD* and stdint. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 4c754b01fafc4b042d9918c05a71157f6fa6392a Author: Eric Anholt Date: Mon May 7 16:46:18 2018 -0700 dri3: Switch get_modifiers to using stdint. We were mixing stdint and CARD* types, causing compiler warnings on 32-bit. Just switch over to stdint, which is what we'd like the server to be using long term, anyway. Reviewed-by: Adam Jackson commit 5e86484a183f051d7a8a67ea13c23a3d6e69e76b Author: Eric Anholt Date: Mon May 7 16:46:17 2018 -0700 dri3: Switch get_drawable_modifiers to using stdint. We were mixing stdint and CARD* types, causing compiler warnings on 32-bit. Just switch over to stdint, which is what we'd like the server to be using long term, anyway. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 4ec02b573ef2424965d7ce2d33d150ddb92ec544 Author: Eric Anholt Date: Mon May 7 16:46:16 2018 -0700 randr: Fix a compiler warning on 32-bit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit e1ccd0fa0e1081edf8a2c69ce6e8e3f67a4aecba Author: Eric Anholt Date: Mon May 7 16:46:15 2018 -0700 dix: Fix a warning about GetTimeInMillis return value in XFont2. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit cf838f5ca81e0c967902b74fb1971bc6fac5c601 Author: Roman Gilg Date: Fri May 4 03:07:31 2018 +0200 xwayland: persistent window struct on present Instead of reusing xwl_window introduce a persistent window struct for every window, that asks for Present flips. This struct saves all relevant data and is only freed on window destroy. Signed-off-by: Roman Gilg Tested-by: Olivier Fourdan commit c9afd8cb5ec975b189ab7b678e1f997d6a2ba5ee Author: Mario Kleiner Date: Sun May 6 07:34:31 2018 +0200 modesetting: Fix and improve ms_kernel_msc_to_crtc_msc() The old 32-Bit wraparound handling didn't actually work, due to some integer casting bug, and the mapping was ill equipped to deal with input from the new true 64-bit GetCrtcSequence/QueueCrtcSequence api's introduced in Linux 4.15. For 32-Bit truncated input from pageflip events and old vblank events and old drmWaitVblank ioctl, implement new wraparound handling, which also allows to deal with wraparound in the other direction, e.g., if a 32-Bit truncated sequence value is passed in, whose true 64-Bit in-kernel hw value is within 2^30 counts of the previous processed value, but whose 32-bit truncated sequence value happens to lie just above or below a 2^32 boundary, iow. one of the two values 'sequence' vs. 'msc_prev' lies above a 2^32 border, the other one below it. The method is directly translated from Mesa's proven implementation of the INTEL_swap_events extension, where a true underlying 64-Bit wide swapbuffers count (SBC) needs to get reconstructed from a 32-Bit LSB truncated SBC transported over the X11 protocol wire. Same conditions apply, ie. successive true 64-Bit SBC values are close to each other, but don't always get received in strictly monotonically increasing order. See Mesa commit cc5ddd584d17abd422ae4d8e83805969485740d9 ("glx: Handle out-of-sequence swap completion events correctly. (v2)") for explanation. Additionally add a separate path for true 64-bit msc input originating from Linux 4.15+ drmCrtcGetSequence/QueueSequence ioctl's and corresponding 64-bit vblank events. True 64-bit msc's don't need remapping and must be passed through. As a reliability bonus, they are also used here to update the tracking values msc_prev and ms_high with perfect 64-Bit ground truth as baseline for mapping msc from pageflip completion events, because pageflip events are always 32-bit wide, even when the new kernel api's are used. Because each pageflip(-event) is always preceeded close in time (and vblank count) by a drmCrtcQueueSequence queued event or drmCrtcGetSequence query as part of DRI2 or DRI3+Present swap scheduling, we can be certain that each pageflip event will get its truncated 32-bit msc remapped reliably to the true 64-bit msc of flip completion whenever the sequence api is available, ie. on Linux 4.15 or later. Note: In principle at least the 32-bit mapping path could also be backported to earlier server branches, as this seems to be broken for at least server 1.16 to 1.19. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Keith Packard Cc: Michel Dänzer commit 73f0ed2d928afc692ed057eb3d7627328a6e5b12 Author: Mario Kleiner Date: Fri May 4 14:14:10 2018 +0200 modesetting: Remove ms_crtc_msc_to_kernel_msc(). The function is ported from intel-ddx uxa backend around 2013, where its stated purpose was to apply a vblank_offset to msc values to correct for problems with those kernel provided msc values. Some (somewhat magic and puzzling to myself) heuristic tried to guess if provided values were unreasonable and tried to adapt the corrective vblank_offset to account for that. Except: It wasn't applied to kernel provided msc values, but the values delivered by clients via DRI2 or Present, so valid client targetmsc values, e.g., requesting a vblank event > 1000 vblanks in the future, triggered the offset correction in arbitrarily wrong ways, leading to wrong msc values being returned and thereby vblank events queued to the kernel for the wrong time. This causes glXSwapBuffersMscOML and glXWaitForMscOML to swap / return immediately whenever a swap/wait in > 1000 vblanks is requested. The original code was also written to only deal with 32 bit mscs, but server 1.20 modesetting ddx can now use new Linux 4.15+ kernel vblank api to process true 64 bit msc's, which may confuse the heuristic even more due to 32 bit integer truncation/wrapping. This code caused various problems in the intel-ddx in the past since year 2013, and was removed there in 2015 by Chris Wilson in commit 42ebe2ef9646be5c4586868cf332b4cd79bb4618: " uxa: Remove the filtering of bogus Present MSC values If the intention was to filter the return values from the kernel, the filtering would have been applied to the kernel values and not to the incoming values from Present. This filtering introduces crazy integer promotion and truncation bugs all because Present feeds garbage into its vblank requests. " Indeed, i found a Mesa bug yesterday which can cause Mesa's PresentPixmap request to spuriously feed garbage targetMSC's into the driver under some conditions. However, while other video drivers seem to cope relatively well with that, modesetting ddx causes KDE-5's plasmashell to lock up badly quite frequently, and my suspicion is that the code removed in this commit is one major source of the extra fragility. Also my own tests fail for any swap scheduled more than 1000 vblanks into the future, which is not uncommon for some scientific applications. Iow. modesetting's swap scheduling seems to be more robust without this function afaics. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Chris Wilson Cc: Keith Packard Tested-by: Mike Lothian commit f5ded22e14e2e15390eff8e01ce32de496ae0e86 Author: Aaron Plattner Date: Fri May 4 10:48:17 2018 -0700 meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf' The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf': XF86CONFIGFILE="xorg.conf" AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) Later, the X server passes that into DoSubstitution() which expands the path: DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf") This returns "/etc/X11/xorg.conf". The Meson build, on the other hand, sets XCONFIGFILE to join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this results in '/etc/xorg.conf', resulting in DoSubstitution returning '/etc/X11/etc/xorg.conf'. Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'. Signed-off-by: Aaron Plattner Reviewed-by: Thierry Reding commit 1a3e4a2f6722048c5c7c4c1a9d6748e68a895a3e Author: Aaron Plattner Date: Fri May 4 15:09:22 2018 -0700 meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir')) 'libdir' defaults to 'lib', so running X -showDefaultLibPath just prints 'lib' instead of '/usr/lib' or '/usr/local/lib'. Use joint_paths() to get the correct full path. Signed-off-by: Aaron Plattner Reviewed-by: Thierry Reding commit 1dcd784a677c58e77c368a676fd9dbd3159db94f Author: Anuj Phogat Date: Thu May 3 11:29:11 2018 -0700 dri2: Sync i965_pci_ids.h from mesa Copied from Mesa with no modifications. Gives us Cofeelake platform names updates and sync on Kaby Lake, Ice Lake PCI IDs. Acked-by: Kenneth Graunke Signed-off-by: Anuj Phogat commit 4191b59bd5458ea3a8b0d5272bdcd250fee1e129 Author: Adam Jackson Date: Wed May 2 15:09:52 2018 -0400 meson: Fix build with three-component version numbers Otherwise: include/meson.build:5:0: ERROR: Index 3 out of bounds of array of size 3. Signed-off-by: Adam Jackson commit 531e1648fc0da03816ecc57481479e6fc6a45ac3 Author: Adam Jackson Date: Wed Apr 25 13:39:18 2018 -0400 gitlab-ci: Add for gitlab.freedesktop.org Looks quite a bit like the travis path, doesn't it? Still, nice to not rely on an external service if we don't have to. Signed-off-by: Adam Jackson commit 22285a6f1c5fa6ba22f4214c4ccc09e27d1925f6 Author: Roman Gilg Date: Fri Apr 20 17:10:06 2018 +0200 present: fix msc offset calculation in window mode Instead of getting the current msc value from the window, which might be different to old one directly take the last saved msc value saved in the window_priv struct. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit d7297b00444b0e2cd936fbfb08206a575ab8c29d Author: Chris Wilson Date: Mon Apr 30 15:19:53 2018 -0700 randr: Account for panning and transforms when constraining the cursor commit 56c90e29f04727c903bd0f084d23bf44eb1a0a11 [1.10.99.901] Author: Adam Jackson Date: Mon Nov 15 14:29:14 2010 -0500 randr: Add RRConstrainCursorHarder introduced a regression as it ignored the effect of panning and transforms upon the crtc bounds. The result was that the cursor would be constrained to the visible area even though the panning arena was much bigger, or the cursor was constrained to a region that did not even match the visible area when the output was transformed or reflected. This supercedes the hack introduced by commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d [1.12.99.904] Author: Rui Matos Date: Mon Jul 30 14:32:12 2012 -0400 xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled which disabled the cursor constraints if a panning mode was active, but did not fix the regression with arbitrary output transforms. Signed-off-by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39949 Reviewed-by: Adam Jackson Cc: Rui Matos commit a843c61456b2046fb1780415f17162b503243af7 Author: Roman Gilg Date: Fri Apr 20 17:07:42 2018 +0200 xwayland: restrict present cleanup to presenting and top parent window Clean up only if the request points to the presenting window or its top parent window. Since in this case all events are removed unconditionally, always stop the timer. Reviewed-by: Adam Jackson Signed-off-by: Roman Gilg commit 975d3a509667579b81d88616b91491472059354d Author: Adam Jackson Date: Mon Apr 30 14:10:26 2018 -0400 xwayland: Avoid using epoxy_has_egl() There's no real point - if we don't have EGL then the extension check is also going to fail - and the entrypoint is new in 1.5.0, which we don't need to require yet. Signed-off-by: Adam Jackson Reviewed-by: Mario Kleiner commit d6f2272f44ce1a7a96ae04fdbde8708514c60771 Author: Adam Jackson Date: Mon Apr 30 14:07:44 2018 -0400 meson: Bump version number here too Signed-off-by: Adam Jackson commit 6cace4990abc2386b6ea68536b321994d264c295 Author: Louis-Francis Ratté-Boulianne Date: Thu Apr 26 11:04:15 2018 -0400 modesetting: Fix GBM objects leak when checking for flip GBM objects were never destroyed after looking for format and modifier compatibility when deciding whether flipping or copying a presented pixmap. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106106 Signed-off-by: Louis-Francis Ratté-Boulianne commit e00ada9fbbddf4570fe38c3ceeb922af7afcfd1a Author: Mario Kleiner Date: Mon Apr 30 09:06:09 2018 +0200 glamor: Don't fail in glamor_get_formats if not dmabuf_capable. If dmabuf_capable is false, because the server "dmabuf_capable" debug flag isn't set, treat it as successfull query with zero returned formats, instead of failure. This allows the servers cache_formats_and_modifiers() function to cache the fact that formats are not supported during the current server generation, instead of pointless retesting at every invocation. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson commit 55db3c9cfc1bc92a53b75b99e8fa49a32d7efe63 Author: Mario Kleiner Date: Mon Apr 30 09:06:08 2018 +0200 dri3: Robustly clamp to 1.0 if not all screens support 1.2 Checking for dri3_screen_info_rec.version >= 2 is insufficient, as some shipping drivers, e.g., intel-ddx, nouveau-ddx, set the version to DRI3_SCREEN_INFO_VERSION, ie. to whatever version the installed servers headers define. On server 1.20 that would be version 2, but the drivers still don't support the v1.2 hooks. Make sure all hooks are defined before reporting v1.2. Also make clamping of reported version to minimum of client or server robust against possible future clients with possible majorVersion >= 2.0. Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Daniel Stone commit fbc5c5cd532962d2df96a04e5c8cc0d21b47b08a Author: Mario Kleiner Date: Mon Apr 30 09:06:07 2018 +0200 dri3: Fix error handling in dri3_buffer_from_pixmap request. The old info->fd_from_pixmap() driver hook, which is preferentially used in dri3_fd_from_pixmap(), can return error codes other than -1, e.g., -EINVAL (-22) on nouveau-ddx. Not handling the error causes a broken/corrupted X-Connection resulting from a failed request. This fixes failure of sddm-greeter to start up under nouveau-ddx with DRI3 enabled and DRI3 protocol version properly clamped to 1.0 by the server (see followup patch). Fixes: 75bba3aedcb0 ("dri3: Use single-FD screen call for single-FD request") Signed-off-by: Mario Kleiner Reviewed-by: Adam Jackson Cc: Daniel Stone commit 19d006ee3db4b4635ef9ef5c92562f3ffeddb305 Author: Adam Jackson Date: Tue Apr 24 16:08:26 2018 -0400 dri3: Clamp to 1.0 if not all screens support 1.2 Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 352a5ac87fd344936b759a5766eb74271e7d295d Author: Mario Kleiner Date: Tue Apr 24 10:17:26 2018 +0200 dri3: Fix DRI3.2 support for drivers other than modesetting-ddx. Both xf86-video-intel and xf86-video-nouveau cause OpenGL clients to fail when used with DRI3 on server 1.20 with Mesa 18.1. Reason is that the servers DRI3 version is now unconditionally reported as DRI3 1.2 to 1.2 capable clients. This causes clients using Mesa 18.1 to use the new DRI 3.2 requests DRI3GetSupportedModifiers, DRI3PixmapFromBuffers, etc. Drivers other than modesetting-ddx do not support the needed hooks like info->pixmap_from_fds or info->get_formats, info->get_modifiers. Unfortunately we can't simply report the servers DRI3 version as 1.0 in this case, as the reported version can not be specific to a X-Screen, and different screens may have drivers with different capabilities. Luckily the server has fallbacks to ->pixmap_from_fd, ->fd_from_pixmap, and simply reporting an empty set of supported modifiers for the DRI3GetSupportedModifiers request if the ddx doesn't support DRI 3.2. Clients like Mesa 18.1's dri3 loader respond to the empty set of reported modifiers by falling back to a dri driver selected buffer format (image->createImageWithModifiers responds to a NULL modifier_list by acting like ->createImage()). This works, but Mesa 18.1 will still try to use the DRI3PixmapFromBuffers request to create the corresponding pixmap, just passing in a modifier that corresponds to whatever tiling the dri driver selected by default. To prevent this request - and thereby the client - from failing with a BadImplementation error, remove the check for modifier == DRM_MOD_FORMAT_INVALID in the pixmap_from_fd fallback path of dri3_pixmap_from_fds() and trust that if we hit the fallback path then the client will have passed a buffer with some driver specific default tiling that can be handled by pixmap_from_fd. Another approach would be for Mesa's dri3 loader to keep track how a buffer was created (with explicit modifiers or not), and then call DRI3PixmapFromBuffers or DRI3PixmapFromBuffer, but then any future DRI3 client implementation would need to be fixed, so the server side is probably the better place for this. Tested on Intel Ivybridge and NVidia Pascal. Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Tested-by: Mike Lothian Reviewed-by: Adam Jackson commit c6ab21022ce876f9c1409db4bb1967134f9f6dbe Author: Adam Jackson Date: Tue Apr 24 17:03:07 2018 -0400 xserver 1.20 RC5 Signed-off-by: Adam Jackson commit c593d843f6305dd8bc5fa7762273d319a223abc4 Author: Daniel Stone Date: Tue Apr 24 21:27:47 2018 +0100 dri3: Don't call vfuncs on old DRI3 screens Only call the get_supported_modifiers vfunc if the DRI3 screen struct is sufficiently new. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson commit 54ac09717cd8c49259f53a4a227d903ebe8e0a32 Author: Lyude Paul Date: Fri Apr 20 14:38:05 2018 -0400 xwayland: Add glamor egl_backend for EGLStreams This adds initial support for displaying Xwayland applications through the use of EGLStreams and nvidia's custom wayland protocol by adding another egl_backend driver. This also adds some additional egl_backend hooks that are required to make things work properly. EGLStreams work a lot differently then the traditional way of handling buffers with wayland. Unfortunately, there are also a LOT of various pitfalls baked into it's design that need to be explained. This has a very large and unfortunate implication: direct rendering is, for the time being at least, impossible to do through EGLStreams. The main reason being that the EGLStream spec mandates that we lose the entire color buffer contents with each eglSwapBuffers(), which goes against X's requirement of not losing data with pixmaps. no way to use an allocated EGLSurface as the storage for glamor rendering like we do with GBM, we have to rely on blitting each pixmap to it's respective EGLSurface producer each frame. In order to pull this off, we add two different additional egl_backend hooks that GBM opts out of implementing: - egl_backend.allow_commits for holding off displaying any EGLStream backed pixmaps until the point where it's stream is completely initialized and ready for use - egl_backend.post_damage for blitting the content of the EGLStream surface producer before Xwayland actually damages and commits the wl_surface to the screen. The other big pitfall here is that using nvidia's wayland-eglstreams helper library is also not possible for the most part. All of it's API for creating and destroying streams rely on being able to perform a roundtrip in order to bring each stream to completion since the wayland compositor must perform it's job of connecting a consumer to each EGLstream. Because Xwayland has to potentially handle both responding to the wayland compositor and it's own X clients, the situation of the wayland compositor being one of our X clients must be considered. If we perform a roundtrip with the Wayland compositor, it's possible that the wayland compositor might currently be connected to us as an X client and thus hang while both Xwayland and the wayland compositor await responses from eachother. To avoid this, we work directly with the wayland protocol and use wl_display_sync() events along with release() events to set up and destroy EGLStreams asynchronously alongside handling X clients. Additionally, since setting up EGLStreams is not an atomic operation we have to take into consideration the fact that an EGLStream can potentially be created in response to a window resize, then immediately deleted due to another pending window resize in the same X client's pending reqests before Xwayland hits the part of it's event loop where we read from the wayland compositor. To make this even more painful, we also have to take into consideration that since EGLStreams are not atomic that it's possible we could delete wayland resources for an EGLStream before the compositor even finishes using them and thus run into errors. So, we use quite a bit of tracking logic to keep EGLStream objects alive until we know the compositor isn't using them (even if this means the stream outlives the pixmap it backed). While the default backend for glamor remains GBM, this patch exists for users who have had to deal with the reprecussion of their GPU manufacturers ignoring the advice of upstream and the standardization of GBM across most major GPU manufacturers. It is not intended to be a final solution to the GBM debate, but merely a baindaid so our users don't have to suffer from the consequences of companies avoiding working upstream. New drivers are strongly encouraged not to use this as a backend, and use GBM like everyone else. We even spit this out as an error from Xwayland when using the eglstream backend. Signed-off-by: Lyude Paul Acked-by: Daniel Stone Reviewed-by: Adam Jackson commit 994f781007079176e0247ee64af5696d34debcde Author: Lyude Paul Date: Fri Apr 20 14:38:04 2018 -0400 xwayland: Add xwayland-config.h Just a small autogenerated header that will soon contain more then just one macro. Signed-off-by: Lyude Paul Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson commit 1545e2dbadcb147d7d52b546d053149de866a031 Author: Lyude Paul Date: Fri Apr 20 14:38:03 2018 -0400 xwayland: Decouple GBM from glamor This takes all of the gbm related code in wayland-glamor.c and moves it into it's own EGL backend for Xwayland, xwayland-glamor-gbm.c. Additionally, we add the egl_backend struct into xwl_screen in order to provide hooks for alternative EGL backends such as nvidia's EGLStreams. Signed-off-by: Lyude Paul Reviewed-by: Lyude Paul Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson commit d2d664df974ac5a55d5819f0379fcdac05d22fa3 Author: Adam Jackson Date: Mon Apr 23 17:21:09 2018 -0400 vfb: Fix man page in re depth 32 is not a valid depth, and the default is now 24 not 8. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 79a7137557d33d4e92713ae8cabe838c44fea488 Author: Adam Jackson Date: Mon Apr 23 16:19:15 2018 -0400 glx: Require depth > 12 for GLX visuals fb is happy to do TrueColor to 8bpp drawables, but mesa is not. Depth 12 is the biggest pseudocolor anyone ever really did, and 15 is the least truecolor. Without this Xvfb at depth 8 would "have" GLX, but no vendors would actually back any of the screens. libGL will attempt to call GLXQueryServerString to figure out the GLX version, and vnd will throw an error because there's no vendor to dispatch that to, and then clients crash. Signed-off-by: Adam Jackson commit 818885e6198cf2883155cb3d2e22c8c7bc4239fb Author: Adam Jackson Date: Mon Apr 23 16:19:14 2018 -0400 vnd: Disable GLX if no vendors successfully initialized Signed-off-by: Adam Jackson commit fc25bceb515e5c18eecdebf5933c3e05cdac1a5a Author: Adam Jackson Date: Mon Apr 23 16:19:13 2018 -0400 dix: Allow an extension to disable itself GLX registers an extension before we know if there are any screens that can actually do it. It's inconvenient to shrink the extension list, so instead allow the extension to simply zero out its base opcode to indicate that it needed to panic and disable itself. Signed-off-by: Adam Jackson commit 73a1cb9c92c936c2c1ae3d69fed743e21916d687 Author: Adam Jackson Date: Mon Apr 23 16:19:12 2018 -0400 dix: Factor out extension availability check Signed-off-by: Adam Jackson commit 9d5af632fde0373babfa32e66a59cfbf26ed7e5d Author: Adam Jackson Date: Mon Apr 23 15:21:14 2018 -0400 animcur: Fix crash when removing a master device Reproducer: $ Xvfb -ac -noreset :1 & $ DISPLAY=:1 xinput create-master touch1 $ DISPLAY=:1 xinput remove-master "touch1 pointer" Bugzilla: https://bugs.freedesktop.org/105761 Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 8275903956d7876519fa55fb805669dc301bf243 Author: Thomas Klausner Date: Mon Apr 23 14:56:17 2018 -0400 sdksyms: Cope with __pid_t and __uint32_t Kludge sdksyms.c generator to not fail on GetClientPid. It returns pid_t which on NetBSD is #define pid_t __pid_t This slightly alters the GCC preprocessor output which this fragile code could not deal with when using GCC 5+ Signed-off-by: Adam Jackson commit e29d783278608544a208f211231a6a3ad2f8fa09 Author: Mario Kleiner Date: Fri Apr 20 19:59:40 2018 +0200 modesetting: Only use modifiers on kms drivers which do support them. Use the DRM_CAP_ADDFB2_MODIFIERS query to make sure the kms driver supports modifiers in the addfb2 ioctl, and fall back to addfb ioctl without modifiers if modifiers are unsupported. E.g., as of Linux 4.17, nouveau-kms so far does not suppport modifiers and gets angry if drmModeAddFB2WithModifiers() is called (-> failure to set a video mode -> blank screen), but Mesa's nvc0+ gallium driver causes gbm_bo_get_modifier() to return a valid modifier by translating the default tiling of bo's created via gbm_bo_create() into a modifier other than DRM_FORMAT_MOD_INVALID (see Mesa's nvc0_miptree_get_modifier()). Testing for != DRM_FORMAT_MOD_INVALID is apparently not sufficient for safe use of drmModeAddFB2WithModifiers. Bonus: Handle potential failure of populate_format_modifiers(). The required DRM_CAP is defined since libdrm v2.4.65, and we require v2.4.89+ for the server, so we can use it unconditionally. Tested on intel-kms, radeon-kms, nouveau-kms. Fixes failure on NVidia Pascal. Fixes: 2f807c2324b4 ("modesetting: Add support for multi-plane pixmaps when page-flipping") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Louis-Francis Ratté-Boulianne commit fe4d1876b4f01c0b0e1916d548c398789f196164 Author: Lyude Paul Date: Wed Apr 18 17:57:54 2018 -0400 meson: Fix indenting in glx/meson.build No functional changes, just fixing a tabs vs. space error I noticed Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 4e28a6a223c4f9d0f5defe0313a94e22e0416787 Author: Lyude Paul Date: Wed Apr 18 18:09:15 2018 -0400 meson: Ensure we always build Xext/hashtable.c for glx Seems that while glxvnd relies on some of the hashtable functions in Xext, we only build hashtable support for Xext if we're also building the res extension. This leads to some errors if you try to build glx without res enabled: glx/liblibglxvnd.a(vndcmds.c.o): In function `LookupVendorPrivDispatch': /home/lyudess/Projects/xserver/glx/vndcmds.c:65: undefined reference to `ht_find' /home/lyudess/Projects/xserver/glx/vndcmds.c:67: undefined reference to `ht_add' glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchInit': /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_compare' /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_hash' /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_create' glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchReset': /home/lyudess/Projects/xserver/glx/vndcmds.c:468: undefined reference to `ht_destroy' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. So, make sure that hashtable.c gets both for both glx and res Reviewed-by: Adam Jackson Signed-off-by: Lyude Paul commit 3b4671f9e9c85f23e7593652e1482b11dc3ad4af Author: Olivier Fourdan Date: Thu Apr 19 09:13:23 2018 +0200 xwayland: Clean up all frame callbacks Regardless of the order we un-realize windows. Suggested-by: Roman Gilg Signed-off-by: Olivier Fourdan Reviewed-by: Roman Gilg commit 8b8f9007cc56fdcee5479876e88e06b7f8b6de35 Author: Olivier Fourdan Date: Wed Apr 18 16:02:02 2018 +0200 xwayland: avoid using freed xwl_window on unrealize xwl_unrealize_window() would use freed xwl_window which can lead to various memory corruption and crashes, as reported by valgrind: Invalid read of size 8 at 0x42C802: xwl_present_cleanup (xwayland-present.c:84) by 0x42BA67: xwl_unrealize_window (xwayland.c:601) by 0x541EE9: compUnrealizeWindow (compwindow.c:285) by 0x57E1FA: UnrealizeTree (window.c:2816) by 0x581189: UnmapWindow (window.c:2874) by 0x54EB26: ProcUnmapWindow (dispatch.c:879) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) Address 0xf520f60 is 96 bytes inside a block of size 184 free'd at 0x4C2EDAC: free (vg_replace_malloc.c:530) by 0x42B9FB: xwl_unrealize_window (xwayland.c:624) by 0x541EE9: compUnrealizeWindow (compwindow.c:285) by 0x57E1FA: UnrealizeTree (window.c:2816) by 0x581189: UnmapWindow (window.c:2874) by 0x54EB26: ProcUnmapWindow (dispatch.c:879) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) Block was alloc'd at at 0x4C2FB06: calloc (vg_replace_malloc.c:711) by 0x42B307: xwl_realize_window (xwayland.c:488) by 0x541E59: compRealizeWindow (compwindow.c:268) by 0x57DA40: RealizeTree (window.c:2617) by 0x580B28: MapWindow (window.c:2694) by 0x54EA2A: ProcMapWindow (dispatch.c:845) by 0x554B7D: Dispatch (dispatch.c:479) by 0x558BE5: dix_main (main.c:276) by 0x7C4B1BA: (below main) (libc-start.c:308) This is because UnrealizeTree() traverses the tree from top to bottom, which invalidates the assumption that if the Window doesn't feature an xwl_window on its own, it's the xwl_window of its first ancestor with one. This reverts commit 82df2ce3 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 12a6b189fb17894d2c3851b70a396bbf41f444c6 Author: David Woodhouse Date: Tue Apr 17 22:22:21 2018 +0100 glamor: fix glamor_xv_query_image_attributes() for odd-width images Images which are one pixel wider than a multiple of 8 are being handled incorrectly. Other drivers round up the width to a multiple of two before they start calculating. Do the same. https://bugzilla.gnome.org/show_bug.cgi?id=795235 Reviewed-by: Adam Jackson Signed-off-by: David Woodhouse commit ac7a4bf44c68c5f323375974b208d4530fb5b60f Author: Chris Wilson Date: Sun Apr 15 15:40:03 2018 +0100 os/WaitFor: Check timers on every iteration Currently we only check timer expiry if there are no client fd (or other input) waiting to be serviced. This makes it very easy to starve the timers with long request queues, and so miss critical timestamps. The timer subsystem is just another input waiting to be serviced, so evaluate it on every loop like all the others, at the cost of calling GetTimeInMillis() slightly more frequently. (A more invasive and likely OS specific alternative would be to move the timer wheel to the local equivalent of timerfd, and treat it as an input fd to the event loop exactly equivalent to all the others, and so also serviced on every pass. The trade-off being that the kernel timer wheel is likely more efficiently integrated with epoll, but individual updates to each timer would then require syscalls.) Reviewed-by: Peter Harris Signed-off-by: Chris Wilson commit 78b6f940217c127f0f345b7710aa5994c6ded99c Author: Adam Jackson Date: Mon Apr 16 14:08:27 2018 -0400 modesetting: Fix inverted check in dri2 WaitMSC ms_queue_vblank() returns false on failure. Reported-by: Chris Wilson Signed-off-by: Adam Jackson Reviewed-by: Frank Binns Tested-by: Mike Lothian commit 4e92c51ce4d6ab50c1507a23a01c6be0d1954d79 Author: Mario Kleiner Date: Mon Apr 16 08:14:47 2018 +0200 dri3: Fix dri3_buffers_from_pixmap request. Sending pixmap depth and bpp was omitted, so the Mesa X11 + EGL + DRI3 side of things always failed to dri3_create_image_khr_pixmap_from_buffers(), which led to failure of X11 + EGL compositing under DRI3 under, e.g., KDE Plasma 5. Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests") Signed-off-by: Mario Kleiner Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Reviewed-by: Louis-Francis Ratté-Boulianne Tested-by: Mike Lothian commit a98a95b798a0062783ae6fd2135ad488af5efcfd Author: Matt Turner Date: Sun Apr 15 23:37:45 2018 -0700 modesetting: Move GBM code inside #ifdef GLAMOR_HAS_GBM Fixes a compilation error without Glamor. Bugzilla: https://bugs.gentoo.org/653288 Signed-off-by: Matt Turner Reviewed-by: Olivier Fourdan commit c3ae963a7b19e05b8296aae8b6354587756d48fa Author: Olivier Fourdan Date: Mon Apr 16 09:39:09 2018 +0200 xwayland: Fix build without glamor Present support in Xwayland relies on glamor, make sure Xwayland can be built without glamor by moving references to Present code inside the conditional GLAMOR_HAS_GBM. Reported-by: Matt Turner Signed-off-by: Olivier Fourdan Reviewed-by: Matt Turner Reviewed-by: Roman Gilg commit bf147f67b2b7170fcc5cca07192f6b195dce85e5 Author: Adam Jackson Date: Thu Apr 12 17:24:08 2018 -0400 xwayland: Don't crash on WarpPointer(dest_w = None) Turns out that's legal, and xts exercises it, and we crash: Thread 1 "Xwayland" received signal SIGSEGV, Segmentation fault. dixGetPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:122 122 return (char *) (*privates) + key->offset; (gdb) bt #0 dixGetPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:122 #1 dixLookupPrivate (key=0x813660 , privates=0x20) at ../../include/privates.h:166 #2 xwl_window_of_top (window=0x0) at xwayland.c:128 #3 xwl_cursor_warped_to (device=, screen=0x268b6e0, client=, window=0x0, sprite=0x300bb30, x=2400, y=1350) at xwayland.c:292 #4 0x00000000005622ec in ProcWarpPointer (client=0x32755d0) at events.c:3618 In this case, x/y are the screen-space coordinates where the pointer ends up, and we need to look up the (X) window there. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit d7269b49c3408f93a6cb8e28ddc3dda88224620a Author: Emil Velikov Date: Wed Apr 11 18:51:16 2018 +0100 configure.ac: make use of wayland-scanner.pc Replace the current (incorrect) assumption that wayland-scanner is located in the wayland-client prefix. Make use of the wayland_scanner variable in wayland-scanner.pc It was introduced back in 2013 and we already require newer wayland bits Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 0031bbad8400d35699664d18c0d8fc2e9e82d8a7 Author: Adam Jackson Date: Wed Apr 11 15:39:33 2018 -0400 sdksyms: Skip empty symbols Apparently on NetBSD we can hit failures like this: sdksyms.c:1773:15: error: expected expression before ',' token (void *) &, /* ../../dri3/dri3.h:110 */ I've been unable to reproduce that locally (even in a NetBSD vm), but an obvious workaround might be to just notice empty symbol names and ignore them rather than emit invalid C code. Tested-by: Thomas Klausner Signed-off-by: Adam Jackson commit d61e516c847b9ff7e89e6be269050032070c1ad3 Author: Adam Jackson Date: Tue Apr 10 15:45:02 2018 -0400 xserver 1.20 RC4 Signed-off-by: Adam Jackson commit a42992a4cca49cedd3930f5694c7a16e4f614b36 Author: Emil Velikov Date: Mon Apr 2 16:41:24 2018 +0100 dri3: rework format/modifier caching Cut down the unnecessary malloc/memcpy/free by utilising the explicit copy provided by the client. But above all: do so, after ensuring we get valid data from the implementation. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 71a069fd7fbe815d386fc1b3c44cda732cff7af0 Author: Emil Velikov Date: Mon Apr 2 16:41:23 2018 +0100 glamor: zero num_formats from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit ac48724639e0a6a9e421b3b4e545d8506fd6bf5d Author: Emil Velikov Date: Mon Apr 2 16:41:22 2018 +0100 xwayland: zero num_formats from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit e2f45002fc3c53c6196935447b8fe77d0850175b Author: Emil Velikov Date: Mon Apr 2 16:41:20 2018 +0100 dri3: check for ::get_drawable_modifiers failure Currently if the function fails, we'll fall into two false assumptions: - the the count is zero - that the storage pointer is safe for free() I've just fixed the former (in glamor + xwayland) and have no plans on adding yet another workaround for the latter. Simply zero both variables. Regardless if the implementation is missing the callback or it foobars with output variables (normally a bad idea). Bonus points - this fixes a bug where we feed garbage to free() further down ;-) Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 150e4b12ad160b093899107ed586aa0cb258879e Author: Emil Velikov Date: Mon Apr 2 16:41:19 2018 +0100 glamor: zero num_modifiers from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit b36a14c0b0e7e38406622eb5ff0666a8b8bc50f4 Author: Emil Velikov Date: Mon Apr 2 16:41:18 2018 +0100 xwayland: zero num_modifiers from the start The caller may ignore the return value (will be addressed with later commit) so simply zero the count from the get-go. We're pretty much do so, in all cases but one :-\ Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit a83ceec868a6d544bc7775a753b67aa40d0d0efc Author: Emil Velikov Date: Mon Apr 2 16:41:15 2018 +0100 dri3: simplify dri3_open() implementation Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 9a159f37e00ed47ec8cbff7c57d8787b8f5685f5 Author: Emil Velikov Date: Mon Apr 2 16:41:14 2018 +0100 dri3: annotate fds/strides/offsets arrays as const It makes it perfectly clear that we should not be modifying them. Should help highlight issues like the one fixed with previous commit. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 877fa0c66469628748dbd01506f15ddc4f11b849 Author: Emil Velikov Date: Mon Apr 2 16:41:13 2018 +0100 xwayland: don't close() fds we don't own The glamor_pixmap_from_fds error path erroneously closes the fds. We don't own them, plus the caller closes them after the function in called. Fixes: cef12efc15c ("glamor: Implement GetSupportedModifiers") Cc: Louis-Francis Ratté-Boulianne Cc: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 66b632bb068672f507212b00bd313b5040bf1a39 Author: Emil Velikov Date: Mon Apr 2 16:41:12 2018 +0100 dri3: annotate the dri3_screen_info data as const dri3_screen_info is the user provide dispatch. Something that we do not and should not change. When using the _ptr typecast + const the compiler barfs at us (rightfully so), so use the _rec one. [Silence a new const mismatch warning too - ajax] Fixes: 56313829886 ("dri3: Add DRI3 extension") Cc: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit c67f2eac56518163981af59f5accb7c79bc00f6a Author: Samuel Thibault Date: Mon Apr 9 14:35:30 2018 +0200 dix: always send focus event on grab change Focus events are useless when 'from' and 'to' are the same. But when this is the result of a (Un)GrabKeyboard request, we should always send them, including when the window manager had previously used XSetInputFocus to specify the focus on a window which happens to be now taking a grab. This is notably needed for window manager using XI to always get keyboard events even during grabs, so they can determine exactly when grabbing is active. Signed-off-by: Samuel Thibault Reviewed-by: Peter Hutterer commit 14be894b3f7976c133fc186e0e3c475606bab241 Author: Michal Srb Date: Tue Aug 1 10:29:03 2017 +0200 Xext: Fix memory leaks in hashtable. Do not forget to delete key and value of every item and the hashtable itself. commit 1326ee0bc5eb858c3c00847b3ba65134e4ca2e2d Author: Michal Srb Date: Tue Feb 13 10:33:30 2018 +0100 glx: Do not call into Composite if it is disabled. Otherwise X server crashes if GLX is enabled and Composite disabled. For example the compIsAlternateVisual function will try to lookup CompScreenPtr using the CompScreenPrivateKey, but that was never initialized if Composite is disabled. Fixes: f84e59a4f4. ("glx: Duplicate relevant fbconfigs for compositing visuals") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104993 Signed-off-by: Michal Srb commit b9764b8489cabd15b50c360cfbd799fdab0883fd Author: Jon Turney Date: Tue Apr 3 16:54:00 2018 +0100 hw/xwin/glx: Allocate fbconfigs correctly 4b0a3cba fixed leaking of GLX fbconfigs, so now xwin needs to allocate them correctly (individually, rather than all at once), so they can be freed successfully. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e0a137ce5d653063604fa8d16c8498b8ac3ab3a7 Author: Kyle Brenneman Date: Fri Apr 6 12:42:33 2018 -0600 GLX: Fix a use after free error with the GLVND vendor handle. The GLVND layer will destroy all of the vendor handles at the end of each server generation, but the GLX module then tries to re-use the same (now-freed) handle in xorgGlxServerInit at the start of the next generation. In xorgGlxCloseExtension, explicitly destroy the vendor handle and set it to NULL so that the next call to xorgGlxServerInit will recreate it. Reviewed-by: Adam Jackson commit 31c1489eeb8c5391cd978303989de167819f0041 Author: Peter Hutterer Date: Fri Apr 6 12:28:56 2018 +1000 xfree86: drop KDSKBMUTE handling This was never merged upstream. It was a Fedora kernel patch but dropped from Fedora in 2013 with kernel 3.12. The reason for the KDSKBMUTE proposal has been fixed in systemd in Feb 2013, systemd 198. https://lists.freedesktop.org/archives/systemd-devel/2013-February/008795.html Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 74aef564a7faea4410e92fa606216ab877b0d452 Author: Adam Jackson Date: Thu Apr 5 13:24:13 2018 -0400 xwayland: Silence a build warning if we can [735/786] Generating 'hw/xwayland/Xwayland@exe/relative-pointer-unstable-v1-protocol.c'. Using "code" is deprecated - use private-code or public-code. See the help page for details. Use private-code if wayland-scanner is new enough. Signed-off-by: Adam Jackson commit 6f0903ddc905f44272b85942323a467d82fef644 Author: Adam Jackson Date: Thu Apr 5 13:09:38 2018 -0400 dix: Hush an almost certainly bogus warning ../dix/getevents.c: In function ‘transformAbsolute’: ../dix/getevents.c:1195:28: warning: ‘oy’ may be used uninitialized in this function [-Wmaybe-uninitialized] struct pixman_f_vector p = {.v = {*x, *y, 1} }; ^ ../dix/getevents.c:1234:22: note: ‘oy’ was declared here double x, y, ox, oy; ^~ This one is truly special. Even though both ox and oy are set and read along the same paths, only oy is marked for this warning! Initializing just oy = 0.0 fixes it entirely, but let's not make a weird thing weirder. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 57e872301f5e836be2efb8f952f9c9711650b447 Author: Adam Jackson Date: Thu Apr 5 13:07:09 2018 -0400 mi: Hush an almost certainly bogus warning In file included from ../mi/miexpose.c:83: ../mi/miexpose.c: In function ‘miHandleExposures’: ../include/regionstr.h:174:22: warning: ‘expBox.y2’ may be used uninitialized in this function [-Wmaybe-uninitialized] (_pReg)->extents = *(_pBox); ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../mi/miexpose.c:139:12: note: ‘expBox.y2’ was declared here BoxRec expBox; ^~~~~~ etc. It's initialized if (extents), and then only read if (extents), but gcc doesn't seem to figure that out. Whatever, bzero it to be explicit. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 83913de25d35709b3ab7b0ab124b73924145d2dd Author: Adam Jackson Date: Thu Apr 5 12:59:11 2018 -0400 xkb: Silence some compiler warnings Of the form: ../xkb/XKBGAlloc.c: In function ‘SrvXkbAddGeomKeyAlias’: ../xkb/XKBGAlloc.c:591:13: warning: ‘strncpy’ specified bound 4 equals destination size [-Wstringop-truncation] strncpy(alias->real, realStr, XkbKeyNameLength); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is intentional; the code that reads from these fields never reads more than 4 bytes anyway. Rephrase things in terms of memcpy so that's clear. Obviously this is awful but in XKB awful is par. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit d13cd3862e9ccd35c91a06680d02f2fc8fd03420 Author: Adam Jackson Date: Thu Apr 5 12:48:26 2018 -0400 dmx: Silence a string truncation warning. ../hw/dmx/config/dmxparse.c: In function ‘dmxConfigCreateOption’: ../hw/dmx/config/dmxparse.c:385:13: warning: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation] strncpy(option->string + offset, p->string, len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/config/dmxparse.c:383:23: note: length computed here int len = strlen(p->string); ^~~~~~~~~~~~~~~~~ The thing it's warning about is intentional, the surrounding code does its own nul-termination. Make that obvious by using memcpy instead. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 176f26e96ab9958c84c98c88f31729d0240c420e Author: Adam Jackson Date: Thu Apr 5 12:45:51 2018 -0400 dmx: Clean up some argument parsing code This threw: ../hw/dmx/input/dmxarg.c: In function ‘dmxArgParse’: ../hw/dmx/input/dmxarg.c:128:5: warning: ‘strncpy’ specified bound depends on the length of the source argument [-Wstringop-overflow=] strncpy(tmp, string, len); ^~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/input/dmxarg.c:126:11: note: length computed here len = strlen(string) + 2; ^~~~~~~~~~~~~~ This code predates xstrtokenize, but that's no excuse. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit be99072a1a20af44d2457b8c86bd9041f61efa79 Author: Adam Jackson Date: Thu Apr 5 12:35:59 2018 -0400 dmx: Fix a read-from-uninitialized warning ../hw/dmx/dmxpixmap.c: In function ‘dmxBitmapToRegion’: ../include/regionstr.h:174:22: warning: ‘Box.x1’ may be used uninitialized in this function [-Wmaybe-uninitialized] (_pReg)->extents = *(_pBox); ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../hw/dmx/dmxpixmap.c:208:12: note: ‘Box.x1’ was declared here BoxRec Box; ^~~ Signed-off-by: Adam Jackson Acked-by: Keith Packard commit c3b190f9da3a8cd6f98c127220683dd20aed0f9b Author: Adam Jackson Date: Thu Apr 5 12:31:04 2018 -0400 dmx: Fix some snprintf warnings. snprintf doesn't terminate the string if it truncates, so things like this are lurking crashers: ../hw/dmx/dmxprop.c: In function ‘dmxPropertyIdentifier.part.0’: ../hw/dmx/dmxprop.c:94:36: warning: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 123 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "%s:%s:%s", DMX_IDENT, hostname, display); ^~ ~~~~~~~~ ../hw/dmx/dmxprop.c:94:5: note: ‘snprintf’ output 7 or more bytes (assuming 262) into a destination of size 128 snprintf(buf, sizeof(buf), "%s:%s:%s", DMX_IDENT, hostname, display); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../hw/dmx/dmxprop.c: In function ‘dmxPropertyWindow’: ../hw/dmx/dmxprop.c:372:36: warning: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size between 0 and 127 [-Wformat-truncation=] snprintf(buf, sizeof(buf), "%s,%d", id, dmxScreen->index); ^~ ../hw/dmx/dmxprop.c:372:5: note: ‘snprintf’ output between 3 and 140 bytes into a destination of size 128 snprintf(buf, sizeof(buf), "%s,%d", id, dmxScreen->index); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We could be more precise about termination, but meh. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 4c1453393feaebd688571ed1ba16c21703119ced Author: Adam Jackson Date: Thu Apr 5 12:21:53 2018 -0400 gtf: Warning fix ../hw/xfree86/utils/gtf/gtf.c: In function ‘print_fb_mode’: ../hw/xfree86/utils/gtf/gtf.c:241:50: warning: cast from function call of type ‘double’ to non-matching type ‘int’ [-Wbad-function-cast] printf(" timings %d %d %d %d %d %d %d\n", (int) rint(1000000.0 / m->pclk), /* pixclock in picoseconds */ That's pretty nitpicky of you, gcc, but at least it's easy to fix. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 99f9b077c62e14ba955b9c1f7afda47f7799d317 Author: Daniel Stone Date: Thu Apr 5 16:47:39 2018 +0100 modesetting: Actually get framebuffer ID We would fail to get the FB ID if it wasn't already imported, since we were checking to see if the pointer was NULL (it never was) rather than if the content of the pointer was 0. Signed-off-by: Daniel Stone Reported-by: Olivier Fourdan Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit 8ff1cdb2bff72a37e75004f562737dd0af6daf14 Author: Daniel Stone Date: Thu Apr 5 15:00:38 2018 +0100 dri3: Set stride and size for old clients For old clients using the fd_from_pixmap entrypoint, make sure we set stride and size correctly. Noticed by inspection. Signed-off-by: Daniel Stone commit 78574a66b5b286e26839877640592980de089d64 Author: Daniel Stone Date: Thu Apr 5 14:58:40 2018 +0100 modesetting: Don't reuse iterator in nested loop drmmode_crtc_set_mode has a loop nested inside another loop, where both of them were using 'i' as the loop iterator. Rename it to avoid an infinite loop. Signed-off-by: Daniel Stone Reported-by: Michel Dänzer Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Adam Jackson commit ce2a4313dd31084f7766af59b8477cabe029bf44 Author: Mario Kleiner Date: Wed Apr 4 03:49:02 2018 +0200 modesetting: Fix page flipping harder under DRI 3.2. Non-atomic kms drivers like radeon-kms (or nouveau-kms with default setting of "atomic ioctl disabled") don't export any formats, so num_formats == 0. Some atomic drivers (nouveau-kms with boot param nouveau.atomic=1, or intel-kms on, e.g., Linux 4.13) expose num_formats == 0, or don't expose any modifiers, so num_modifiers == 0. Let the drmmode_is_format_supported() check pass in these cases to allow page flipping, as it works just fine. Tested on NV-96 for nouveau, HD-5770 for radeon, Intel Ivybridge with Linux 4.13 and drm-next to fix page flipping. Fixes: 9d147305b404 ("modesetting: Check if buffer format is supported when flipping") Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 44e7098367b87c79470d6760753e42014be7ca01 Author: Louis-Francis Ratté-Boulianne Date: Wed Apr 4 00:01:15 2018 -0400 modesetting: Have consistent state when using atomic modesetting We need to make sure that the atomic commit are consistent or else the kernel will reject it. For example, when moving a CRTC from one output to another one, the first output CRTC_ID property needs to be reset. Also if the second output was using another CRTC beforehands, it needs to be disabled to avoid an inconsistent state. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Daniel Stone Reviewed-by: Adam Jackson commit bc4d278132956ec3c43695f1bd34083ef5fe7f22 Author: Louis-Francis Ratté-Boulianne Date: Wed Apr 4 00:01:14 2018 -0400 modesetting: Use atomic modesetting to set DPMS mode CRTCs and outputs needs to be enabled/disabled when the current DPMS mode is changed. We also try to do it in an atomic commit when possible. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Daniel Stone Reviewed-by: Adam Jackson commit 23c67987a337beb91292f8e318d566941453baa3 Author: Daniel Stone Date: Wed Apr 4 16:16:38 2018 +0100 glamor: Add fd_from_pixmap hook Add a fd_from_pixmap (singular) hook to go with fds_from_pixmap, which will ensure that the pixmap is allocated without modifiers and is thus exportable to non-modifier-aware clients. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 9c407f0a1b40128fc65b19b6a499f1d4dae6f702 Author: Daniel Stone Date: Wed Apr 4 16:16:37 2018 +0100 glamor: Fall back to non-modifier allocations If we try to allocate with particular modifiers but it fails, try to fall back to non-modifier allocations. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 86b2d8740a330deafe8a9bbf0402705a43efbb42 Author: Daniel Stone Date: Wed Apr 4 16:16:36 2018 +0100 glamor: Reallocate pixmap storage without modifiers if necessary If we need a pixmap's storage to be exported to a context in which we aren't aware of modifiers, reallocate the buffer again without modifiers. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit aab5c46ccbe769830cae383330fd62c074a0d2f7 Author: Daniel Stone Date: Wed Apr 4 16:16:35 2018 +0100 glamor: Push make_exportable into callers Rather than calling make_exportable from the get_bo entrypoint, make sure that someone has already explicitly requested the pixmap be exportable. This is technically an ABI break in that it changes observable behaviour, but no driver other than modesetting has ever used get_bo. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 1b9fa3b64ca420eb54b5e5f28074c326e1fbe825 Author: Daniel Stone Date: Wed Apr 4 16:16:34 2018 +0100 glamor: Track if BO allocation used modifiers Keep track of whether or not we fed modifiers into GBM when we allocated a BO. We'll use this later inside Glamor, to reallocate buffer storage if we allocate buffer storage using modifiers, and a non-modifier-aware client requests an export of that pixmap. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 0e9504e10c4363e24a83f1a82e6a4b9f5fd8f846 Author: Daniel Stone Date: Wed Apr 4 16:16:33 2018 +0100 drmmode: Track if BO allocation used modifiers Keep track of whether or not we fed modifiers into GBM when we allocated a BO. We'll use this later inside Glamor, to reallocate buffer storage if we allocate buffer storage using modifiers, and a non-modifier-aware client requests an export of that pixmap. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 75bba3aedcb04132a4fe2806680cd38a8f2bd206 Author: Daniel Stone Date: Wed Apr 4 16:16:32 2018 +0100 dri3: Use single-FD screen call for single-FD request When importing client buffers into Pixmaps, we can use the fds_to_pixmap hook for both single-FD and multi-FD client requests without any harm. For the other direction of exporting Pixmap buffers to client FDs, create a new helper which calls the old pixmap_to_fd hook if available. This allows the implementation to ensure that the Pixmap storage is accessible to clients not aware of multiple planes or modifiers, e.g. by reallocating and copying. This makes it possible to run a compositing manager on an old GLX/EGL stack on top of an X server which allocates internal buffer storage using exotic modifiers from modifier-aware GBM/EGL/KMS. Signed-off-by: Daniel Stone Reported-by: Adam Jackson Reviewed-by: Adam Jackson commit 574069c2912893a9b9fd3d701eb3ad4784e31553 Author: Aaron Plattner Date: Mon Apr 2 15:04:08 2018 -0700 xfree86: Restore newline before "X Protocol Version" string The newline before the protocl version got lost in commit 6cbefc3e0a33b380c147c533914437c7798d9b93. Prior to that commit, the release date printed a newline at the end: X.Org X Server 1.19.6 Release Date: 2017-12-20 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.14.12-1-ARCH x86_64 Now, that string gets run together with the version: X.Org X Server 1.19.99.903 (1.20.0 RC 3)X Protocol Version 11, Revision 0 Build Operating System: Linux Since the version string printing has a variety of #ifdefs in it, just add the newline to the begining of the protocol version string. Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit df6cbf7a2b3b45be6910afb34459d30ca7783c16 Author: Adam Jackson Date: Mon Apr 2 15:44:50 2018 -0400 xserver 1.20 RC3 Signed-off-by: Adam Jackson commit f580116f3c89b3c086655cbd441f84e50115ea78 Author: Louis-Francis Ratté-Boulianne Date: Thu Mar 29 01:07:26 2018 -0400 modesetting: Fix reported size when using atomic modesetting The framebuffer can include multiple CRTCs in multi-monitors setup. So we shouldn't use the buffer size but the CRTC size instead. Rotated displays are shadowed, so we don't need to worry about it there. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan Reviewed-by: Daniel Stone commit ce7d5087cfe1d2df756d93b7f567b3c0b0a7f6a8 Author: Louis-Francis Ratté-Boulianne Date: Thu Mar 29 01:07:25 2018 -0400 modesetting: Ignore alpha channel when importing BOs for modesetting Fixes a regression caused by modifiers support. For some hw to continue working even if not supporting ARGB8888 and ARGB2101010 formats, we assume that all imported BOs are opaque. Signed-off-by: Louis-Francis Ratté-Boulianne Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 85b3fc18606e56d01734defb0e9fa04182f9fc1c Author: Olivier Fourdan Date: Thu Mar 29 09:42:08 2018 +0200 modesetting: Use actual crtc position for pageflip Otherwise the same content is shown on all outputs. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit a10f1c9e08b982029186028b144d9243a2ebdde3 Author: Emil Velikov Date: Mon Apr 2 18:51:21 2018 +0100 docs: remove resource management references The code referenced was removed back in 2009. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 32c07e6b83fdb5b0ed99fc6b1eaa18064f6c3527 Author: Emil Velikov Date: Mon Apr 2 18:51:20 2018 +0100 docs: purge some ISA references The respective ISA functions were dropped back in 2008 Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 80d4098411ad96b662e830db06e59a7ab7f5c9d3 Author: Thierry Reding Date: Thu Mar 29 13:07:56 2018 +0200 meson: Add pixman-1 to required modules in xorg-server.pc pixman headers will be included for builds of external modules against the xorg-server SDK. Make sure pixman is listed as a required module so that the correct CFLAGS will be added. Note that the xorg-server.pc generated by the autotools-based build has many more modules listed, but this seems to be enough to build at least some of the external drivers against an X server built with Meson (I've tested with xf86-input-libinput, xf86-video-nouveau and xf86-video-ati). Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit 88c7b8bf4bae080ecb879fe7e3f8be2bede6f0a6 Author: Thierry Reding Date: Thu Mar 29 13:07:55 2018 +0200 meson: Distribute more SDK headers Install missing headers to the SDK directory to allow external modules to properly build against the SDK. After this commit, the list of files installed in the SDK include directory is the same as the list of files installed by the autotools-based build. Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit f3b0a2aee21f12f3332bf598d3ba0fcbd2832f95 Author: Thierry Reding Date: Thu Mar 29 13:07:54 2018 +0200 meson: Remove usage of pkg-config --variable=includedir Querying a pkg-config variable using the --variable option produces the value of the given variable as stored in the pkg-config file and should not be used to add directories to the include search path. The reason for this is that it breaks cross-compilation, because header files are installed relative to the host sysroot. pkg-config supports a PKG_CONFIG_SYSROOT_DIR environment variable that points to this sysroot and will prepend that to the path of directories in -I or -L options in pkg-config's Cflags, Libs or Libs.private keywords. However, because no context can be inferred from variable names, as opposed to the keywords with fixed meaning, the sysroot path will not be prepended to them. The build system is responsible for doing so if necessary since it is aware of the context in which the variable is used. Adding the include directory returned by pkg-config to the include path leaks build system information into the cross-build and break with very confusing errors such as this: In file included from include/misc.h:82:0, from dix/atom.c:55: /usr/include/pthread.h:682:6: warning: '__regparm__' attribute directive ignored [-Wattributes] __cleanup_fct_attribute; ^~~~~~~~~~~~~~~~~~~~~~~ or this: In file included from include/misc.h:139:0, from dix/atom.c:55: /usr/include/stdlib.h:133:8: error: '_Float128' is not supported on this target extern _Float128 strtof128 (const char *__restrict __nptr, ^~~~~~~~~ Fix this by replacing the include directory with the appropriate xproto dependency required to add the correct include directory to the compile command for subdirectories that are missing the dependency. As detailed above, this gives pkg-config the opportunity to prepend the sysroot for all paths in -I compiler options. Reviewed-by: Adam Jackson Signed-off-by: Thierry Reding commit 1c002bc43472063cf8599abb0d6d7367e30456e2 Author: Tobias Klausmann Date: Fri Mar 30 22:32:13 2018 +0200 modesetting/drmmode: add NULL pointer check in drmmode_output_dpms drmmode_output_dpms is called especially with !output->crtc found in xf86DisableUnusedFunctions so we have to guard for it, else the server segfaults: 0 0x00007fdc1706054b in drmmode_output_dpms (output=0x55e15243c210, mode=3) at drmmode_display.c:2243 1 0x000055e1500b6873 in xf86DisableUnusedFunctions (pScrn=0x55e152133f00) at xf86Crtc.c:3021 2 0x000055e1500be940 in xf86RandR12CrtcSet (pScreen=, randr_crtc=0x55e1524b2b90, randr_mode=0x0, x=0, y=0, rotation=, num_randr_outputs=0, randr_outputs=0x0) at xf86RandR12.c:1244 3 0x000055e1500fa1c2 in RRCrtcSet (crtc=, mode=0x0, x=0, y=0, rotation=rotation@entry=1, numOutputs=numOutputs@entry=0, outputs=0x0) at rrcrtc.c:763 4 0x000055e1500fba9e in ProcRRSetCrtcConfig (client=0x55e152bfae50) at rrcrtc.c:1390 5 0x000055e150044008 in Dispatch () at dispatch.c:478 6 0x000055e150047ff8 in dix_main (argc=13, argv=0x7ffc68561038, envp=) at main.c:276 7 0x00007fdc1a0c6a87 in __libc_start_main () at /lib64/libc.so.6 8 0x000055e150031d0a in _start () at ../sysdeps/x86_64/start.S:120 Fixes: ba0c75177 ("modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_*") Signed-off-by: Tobias Klausmann Reviewed-by: Adam Jackson commit 258081759fa70202a2e6134eeee4fe25ca54bedb Author: Tobias Klausmann Date: Fri Mar 30 22:31:46 2018 +0200 glamor: sanitze handling of "Debug" Option for "dmabuf_capable" With the appearance of the this new Option the X Server would crash if the option is not set. Default dmabuf_capable to off/FALSE for now - a user without knowledge about this option does not want to enable it until its save. Fixes: d11d5bb80 ("glamor: Hide new DRI behind Option "Debug" "dmabuf_capable") Signed-off-by: Tobias Klausmann Reviewed-by: Adam Jackson commit debf75bd0b0ddfec82dad9580efa7d19479b55df Author: Adam Jackson Date: Wed Mar 28 15:47:33 2018 -0400 xserver 1.20 RC2 Signed-off-by: Adam Jackson commit 726839459cb887a60361cb4779f9871c03f372b1 Author: Adam Jackson Date: Wed Mar 28 16:11:18 2018 -0400 autotools: Derive xkb configuration from xkbcomp.pc ... if available, falling back to the current heuristics otherwise. This _finally_ gets me to being able to run util/modular/release.sh without overriding $prefix. Signed-off-by: Adam Jackson commit d11d5bb80d21f2aaa54ddf2f26a50aa6ef31d2fa Author: Adam Jackson Date: Wed Mar 28 12:46:01 2018 -0400 glamor: Hide new DRI behind Option "Debug" "dmabuf_capable" ... for xfree86, at least for now. Things appear to work for Xwayland but not yet for modesetting. Hopefully we can fix that before 1.20 but in the meantime this makes testing both paths easier than a rebuild. Signed-off-by: Adam Jackson commit df13ea7da9174d2e1c732985d9b7a9a35a6916bc Author: Adam Jackson Date: Wed Mar 28 12:46:00 2018 -0400 xfree86: Add Option "Debug" to ServerFlags This provides a generic way to control obscure runtime behavior knobs without making interface promises. Signed-off-by: Adam Jackson commit c95361465ee98dd97a99778d8a31be88fe9e4c4f Author: Antoine Martin Date: Wed Mar 28 15:16:02 2018 -0400 os: Fix -logfile when used with -displayfd Trivial way to reproduce the bug: $ Xorg -logfile /tmp/mylog -config /etc/xpra/xorg.conf -displayfd 2 The server then moans: Failed to rename log file "/tmp/mylog" to "/tmp/mylog": No such file or directory And the log file is created but immediately renamed to "/tmp/mylog.old". This is caused by the changes to the log file handling introduced by this commit: https://cgit.freedesktop.org/xorg/xserver/commit/?id=edcb6426f20c3be5dd5f50b76a686754aef2f64e To fix this, only rename the logfile if the log filename contains the magic substitution string "%s". Signed-off-by: Antoine Martin Reviewed-by: Alan Coopersmith commit b355e55f500c18d55d0ac241e5f7e826ed62f555 Author: Olivier Fourdan Date: Wed Mar 28 12:17:48 2018 +0200 automake: Fix 'make dist' Automake would skip a few meson files that would prevent to build with meson a dist file previously generated by automake. Signed-off-by: Olivier Fourdan Reviewed-by: Thierry Reding commit 16639ab77d14cecb7d03fd2d5c796c2fb1714c18 Author: Kyle Brenneman Date: Fri Mar 2 17:58:07 2018 -0700 Don't delete GLX's extensionInitCallback list during a reset. When a callback list is initialized using CreateCallbackList via AddCallback, the list gets added to the listsToCleanup array, and as a result the list gets deleted at the end of the server generation. But, vendor libraries add themselves to that callback list only once, not once per generation, so if you delete the list, then no vendor will register itself on the next generation, and GLX breaks. Instead, use a static CallbackListRec for the extensionInitCallback list. That way, it doesn't get added to listsToCleanup, and doesn't get deleted during a reset. Reviewed-by: Adam Jackson commit 7004a7c3c983b4453756b92341bf22790b1eb98d Author: Daniel Stone Date: Fri Mar 23 13:50:23 2018 +0000 modesetting/drmmode: Remove unused flink call We don't use flink in the GetFB import path anymore, as we do an FD-based import instead. Signed-off-by: Daniel Stone Reviewed-by: Emil Velikov commit be087778a0eae3093ffdbba3ff7c9f3863d8e1d4 Author: Roman Gilg Date: Tue Mar 13 16:00:57 2018 +0100 xwayland: Activate Present flips in rootless mode with Glamor Link the newly introduced support for Present flips. For now flips can only be used in rootless mode together with Glamor. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 07750ff3c084c6549a5612d1f935a9a3ab3df67c Author: Roman Gilg Date: Tue Mar 13 16:00:55 2018 +0100 xwayland: Implement queuing present vblanks Queue present events to msc values. Fake msc events with a refresh rate of about 60fps when flips are not possible. When flips are executed rely on frame callbacks with a slow updating timer as fallback. This is important for applications, that want to limit their framerate. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 86df366973de1c10da5fbdc57d1ff12b681c321f Author: Roman Gilg Date: Tue Mar 13 16:00:54 2018 +0100 xwayland: Add fallback timer for msc counting When the compositor is not sending frame callbacks while we still wait on buffer release events fake a continuous msc counter with a timer. Having this timer is a prerequisite for queuing events. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 0fb2cca193e60b731c8e75a2a7e795477fb5fd8f Author: Roman Gilg Date: Tue Mar 13 16:00:53 2018 +0100 xwayland: Preliminary support for Present's new window flip mode Introduce support for Present's window flip mode. The support is not yet complete, but works reasonable well for the most important use case, that is fullscreen applications. We take a Present flip and if the xwl_window->window has the same dimensions as the presenting window, the flip is represented by a wl_buffer and attached to the main wl_surface of the xwl_window. After commit we are listening for the sync callback in order to tell Present, that the pixmap flip is not longer pending, for the frame callback in order to update the msc counter and for the buffer release callback in order to tell Present that the pixmap is idle again. The following functionality is missing from this patch: * (slowed down) flips in case the compositor is not sending frame callbacks, * queuing events to MSC times, * per window flips for child windows with smaller size than the xwl_window. To make use of this functionality Xwayland must run rootless and with Glamor/GBM. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 8fba2a03f1410f3bc7504e218ac1e5c964279ea2 Author: Roman Gilg Date: Tue Mar 13 16:00:52 2018 +0100 xwayland: Add arguments to glamor_pixmap_get_wl_buffer Add arguments to give the caller more information and control over the creation of a wl_buffer with GBM, in particular let the caller determine the size of the buffer. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 902429f077325b98e30ede2710bd7a88440d2937 Author: Roman Gilg Date: Tue Mar 13 16:00:51 2018 +0100 present: Add exported init function of window flip mode Allow drivers now to initialize window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit a337949f99bc473ea0ae0af64736eae3d5b39399 Author: Roman Gilg Date: Tue Mar 13 16:00:50 2018 +0100 present: Add cleanups for window flip mode Make sure that vblanks and windows get cleaned up correctly in window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 66a5c0bccb222ad8b9b57b10490c3041e1b3f05e Author: Roman Gilg Date: Tue Mar 13 16:00:49 2018 +0100 present: In window flip mode report damage on flip to driver Calculate damage before trying to flip and report it to the driver. This allows drivers to optimize their rendering. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 029608dd80204ac96423ef79ec46c1a18bbdd5ff Author: Roman Gilg Date: Tue Mar 13 16:00:48 2018 +0100 present: Add window flip mode In contrast to screen flip mode this mode: * supports flips per windows (these windows currently need to have the same size as their parent windows with the same pixmap), * sends pixmap idle signals to the client only after the driver has given an additional event notify. This patch only introduces the new mode as a stub. It additionally needs a driver hook, such that it can get initialized and appropriate cleanup functions. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 8d370fcdcaed210d9f4afc1650aa8b161c7fbb44 Author: Roman Gilg Date: Tue Mar 13 16:00:47 2018 +0100 present: Add driver facing window flip mode hooks To enable special functionality of window flips introduce for window flips a separate set of driver facing function hooks. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 7b071b4e440313254398f06eb59b1596a6d3e8fe Author: Roman Gilg Date: Tue Mar 13 16:00:46 2018 +0100 present: Adapt flip mode API hooks for window flip mode Flipping pixmaps per window needs additional arguments in the flip mode API. Add these as preperation for window flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 92b91b8cf34a38de39281044d8441b6cabe87a85 Author: Roman Gilg Date: Tue Mar 13 16:00:45 2018 +0100 present: Add flip_idler vblank property Introduce vblank property for flip modes, that demand explicite allowance by the driver for vblanks to become idle. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 84e47f3fe68f05f7b0b762e96acd4c95fa8000ca Author: Roman Gilg Date: Tue Mar 13 16:00:44 2018 +0100 present: Add present_window_priv properties for window flip mode For window flip mode data about flips needs to be stored per window. Add properties to 'present_window_priv' and initialize them on creation. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 3aaaac0be573fb09a206966075d81ebe0510ca23 Author: Roman Gilg Date: Tue Mar 13 16:00:43 2018 +0100 present: Refactor present_screen_init To initialize easily different flip modes, refactor 'present_screen_init'. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 6d813bbd5ea0fc38a8114c08368a7954eeb2ef37 Author: Roman Gilg Date: Tue Mar 13 16:00:42 2018 +0100 present: Add more hooks to internal flip mode API Add hooks to query caps, get crtcs, abort vblanks and destroy a flip. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 6a338b5959ca5a9e5260d71b6a739a5c672d77e7 Author: Roman Gilg Date: Tue Mar 13 16:00:41 2018 +0100 present: Move timings adjustment in common part of flip mode API To reduce future code duplication refactor timings adjustment out as a separate function. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 84112a1d0b221c00d7d3c23fd5b97687e6e3749a Author: Roman Gilg Date: Tue Mar 13 16:00:40 2018 +0100 present: Add flip mode API hook for present_can_window_flip Flip modes can now have different implementations of present_can_window_flip. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 1db7cf0429eabf33f8e2b55a15db4d1f87e1fb95 Author: Roman Gilg Date: Tue Mar 13 16:00:39 2018 +0100 present: Add flip mode API hook for present_pixmap Make present_pixmap a common function callable by any flip mode. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 679ffbf5f39822ea508e50f1b7c92a2a9e79f7bb Author: Roman Gilg Date: Tue Mar 13 16:00:38 2018 +0100 present: Refactor execute in separate file To be shared by multiple flip modes, refactor execute functionality, such that logical chunks can go in new separate file. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 1e7d8902bfe7cfb79c41b14fc6b50bcbe4f7c800 Author: Roman Gilg Date: Tue Mar 13 16:00:37 2018 +0100 present: Add flip mode API hooks for several functions Add 'queue_vblank', 'flush' and 're_execute' hooks, that are supposed to be shared with other flip modes. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 5365ece70a75a05df3d6351767d19c3edcf0305d Author: Roman Gilg Date: Tue Mar 13 16:00:36 2018 +0100 present: Move vblank functionality in seperate file With the new internal flip mode API move vblank creation and so on into a seperate file, such that it can be shared between flip modes. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit c5c50c6db1e71e976596750277b1a618704c04aa Author: Roman Gilg Date: Tue Mar 13 16:00:35 2018 +0100 present: Preliminary internal flip mode API Add some basic function hooks to our future present-internal flip mode API, that will allow us to share functionality in between modes and move more code in separate files. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit dda7efec36b495e100e670e057d7ef5022ef3976 Author: Roman Gilg Date: Tue Mar 13 16:00:34 2018 +0100 present: Move screen flip functionality in separate file As a preperation for future flip mode alternatives move most of the functionality from 'present.c' into a separate file. Leave some functions needed by future other flip modes in 'present.c'. Signed-off-by: Roman Gilg Reviewed-by: Adam Jackson commit 4303deae78c4e2a60856be87bf87cd1643c268f5 Author: Thierry Reding Date: Wed Mar 28 14:04:38 2018 +0200 meson: Properly extract ABI versions for xorg-server.pc The newline in the middle of the awk expression confuses Meson and causes it to pass only the string before the newline to awk, which will subsequently fail because it encounters an unterminated string. One fix would be to escape the newlines ('\\n'), but that causes the newline to end up in the pkg-config file and separate the ABI version lines by blank lines. Instead, simply drop the newlines to make the generated pkg-config file look more like the one generated as part of the autotools-based build. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 465b38cadd573ce50eca959f4b56bf4a6a638d91 Author: Thierry Reding Date: Wed Mar 28 14:04:37 2018 +0200 meson: Fix generation of xorg-server.pc Meson stores relative paths for includedir, libdir and friends. These have to be concatenated with the ${prefix} or ${exec_prefix} variables to create a working pkg-config file. While at it, set a default value for the module_dir option so that it points to the same location as used in the autotools-based build. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit d905e3330fd4f9b15a0277b22d608705787cb8bc Author: Thierry Reding Date: Wed Mar 28 14:04:36 2018 +0200 meson: Fill in missing data for xorg-server.h Provide more values for the definitions in xorg-server.h for Meson builds. The only missing defines left after this are _BSD_SOURCE, _POSIX_SOURCE and _XOPEN_SOURCE, but Meson seems to already define these via the command-line if necessary. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 0babe78ed5afec8a06a517346f39b5ebd003773c Author: Thierry Reding Date: Wed Mar 28 14:04:35 2018 +0200 meson: Generate xorg-server.h Some drivers (such as xf86-input-libinput) require the xorg-server.h to build. Generate it and install it so that it can be used by users. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit b04ff31b9d471822fe96ed63eda93fc4cd8c22d0 Author: Thierry Reding Date: Wed Mar 28 14:04:34 2018 +0200 dix: Remove unused definitions from dix-config.h.in There is no code around that will ever define values for the WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end up commented out and are therefore completely useless. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit c62a8b60b9a07092ebebf9aeb67a0c39c583aabe Author: Thierry Reding Date: Wed Mar 28 14:04:33 2018 +0200 xorg: Remove unused definitions from xorg-server.h.in There is no code around that will ever define values for the XLOADABLE, WORKING_UNALIGNED_INT or XORG_RELEASE symbols, so they will always end up commented out and are therefore completely useless. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 66402fcd8280b393d3992121c0bcff9c646c97ed Author: Thierry Reding Date: Wed Mar 28 14:04:32 2018 +0200 meson: Fix build if Xdmcp is missing Xdmcp is an optional dependency, so make sure the build succeeds if it is missing. Signed-off-by: Thierry Reding Reviewed-by: Adam Jackson commit 0a7dabc86c1a7b8d91a5d22ad12fbf03d859f43e Author: Adam Jackson Date: Mon Mar 26 14:57:07 2018 -0400 meson: Add option to set default font path (v2) The autotools build gets this from some macros in fontutil, but they're just wrappers around pkgconfig. v2: Use same default as autotools (Keith Packard) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a26195d5c1eba86ada8f43e775c4190683e0f874 Author: Adam Jackson Date: Tue Mar 27 12:58:15 2018 -0400 Revert "suid touchup" Pushed the wrong thing, sigh. This reverts commit 73a0562615aa1adfb934b953e23b1e69b126db4f. commit 73a0562615aa1adfb934b953e23b1e69b126db4f Author: Adam Jackson Date: Tue Mar 27 12:06:38 2018 -0400 suid touchup commit 64b3227374f7f161e610df735f376fcc5bb0fd58 Author: Adam Jackson Date: Tue Mar 27 10:47:05 2018 -0400 autotools: Fix excessive \-escaping that broke the build Signed-off-by: Adam Jackson commit d3e8af99dc1139fac3307bbcb0046500b3feff11 Author: Adam Jackson Date: Mon Mar 26 18:43:02 2018 -0400 meson: Fix install path for 10-quirks.conf Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 84507507ea03db2f6197b94c160bbee9768c4baa Author: Adam Jackson Date: Mon Mar 26 18:43:01 2018 -0400 meson: Install xorg-server.m4 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8c684f59d517db0812fbad5fc6bcd90c7c810493 Author: Adam Jackson Date: Mon Mar 26 18:43:00 2018 -0400 meson: Generate xorg-server.pc Otherwise external drivers can't build against us. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 9b67303a52f5380bc96862624778b101f6379527 Author: Adam Jackson Date: Mon Mar 26 18:42:59 2018 -0400 meson: Install the dmx utilities And add the forgotten dmxrminput to the list. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit f9ef293cf612e50830ff316d67066ea544905dc9 Author: Adam Jackson Date: Mon Mar 26 18:42:58 2018 -0400 meson: Build cvt and gtf Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a1e8dc05163956de9ab73e567f86b91cb8790c0f Author: Adam Jackson Date: Mon Mar 26 18:42:57 2018 -0400 meson: Install man pages Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 1e0df64738d6924151adbbd4b040df80178cfa6b Author: Adam Jackson Date: Mon Mar 26 18:42:55 2018 -0400 meson: Build Xorg suid wrapper Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ab063cf96779c521618c022d4f669f69e3d9cc8f Author: Adam Jackson Date: Mon Mar 26 18:42:54 2018 -0400 meson: Fix installing protocol.txt One fix the constructed path, two actually install it. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit e3baacacda29afe524b3e4cab78ca057241c0551 Author: Adam Jackson Date: Mon Mar 26 18:42:53 2018 -0400 meson: Add libdrm to hw/xfree86/common's dependencies Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 2e497bf887aca832dc0dd30d071c5288ab5c1e15 Author: Adam Jackson Date: Mon Mar 26 18:42:52 2018 -0400 man: s/__/@/g A cosmetic change for automake (though we have to replicate some of xorg-macros.m4 in manpages.am now), but meson's configure_file() wants @-delimited strings. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 6cbefc3e0a33b380c147c533914437c7798d9b93 Author: Adam Jackson Date: Mon Mar 26 18:42:51 2018 -0400 autotools: Stop caring about XORG_DATE Signed-off-by: Adam Jackson Acked-by: Keith Packard commit ba0c75177239ced7037d74cf61590377f6d075bb Author: Adam Jackson Date: Thu Mar 22 14:47:21 2018 -0400 modesetting: Fix up some XXX from removing GLAMOR_HAS_DRM_* Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 757e0ee1884f2a34a287d632462e3bc689eccb3d Author: Mario Kleiner Date: Mon Mar 12 17:57:50 2018 +0100 modesetting: Fix page flipping under DRI 3.2. The check for "no modifier specified" in drmmode_is_format_supported() should check for DRM_FORMAT_MOD_INVALID, not for zero, as zero actually means DRM_FORMAT_MOD_LINEAR. This allows page-flipping again when appropriate, as tested under nouveau and ati drivers. Fixes: 9d147305b404 ("modesetting: Check if buffer format is supported when flipping") Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 136b45e0c0f5b96b5ce014681d77756dc47f0768 Author: Adam Jackson Date: Fri Mar 16 18:03:18 2018 -0400 travis: Drop Xcode 8.2 Travis has only so many OSX builders, presumably due to the EULA requiring that it be run on Apple-branded hardware. They're also really slow to provision, presumably because they're virtual machines and not containers. In any case it's not something I'm willing to be punished for. Signed-off-by: Adam Jackson commit 243a34e170c4a7cc5d38b78f7409704adf703e9b Author: Adam Jackson Date: Fri Mar 16 18:28:19 2018 -0400 travis: Bump rawhide image The image now has enough mojo to run xts, hooray! Note there's a couple of ugly bits in here. The piglit config fragment and stock tetexec.cfg reflect missing features from the test suites (using an installed copy of xts, figuring out the xserver test matrix at runtime, etc.), I'll be happy to remove them once the tests are fixed. Signed-off-by: Adam Jackson commit 610055809f4030bd0e7312c6b0c561fdfe6e0183 Author: Eric Engestrom Date: Tue Mar 13 10:55:22 2018 +0000 exa: promise not to touch the data when swapping pointers exa/exa.c:525:10: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] swap(pExaGC, pGC, funcs); ^ Signed-off-by: Eric Engestrom Reviewed-by: Emil Velikov commit d36128a72acac4d54813c52c93efefad2dc9af41 Author: Alexander Volkov Date: Mon Mar 12 15:12:10 2018 +0300 Xext/shm: Downgrade from error to debug log output about success Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 319af6f471912160ab3eb6395ef50f9950063d43 Author: Nicolai Hähnle Date: Tue Mar 13 17:46:37 2018 -0400 glx: honor LIBGL_DRIVERS_PATH when loading DRI drivers Allow switching to another driver build without a full installation. Glamor already takes LIBGL_DRIVERS_PATH into account, so this change makes sure that the same driver is used in both parts of the server. Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker commit 75a869a4e7c06072380931b714ac83b1037d3bbe Author: Nicolai Hähnle Date: Tue Mar 13 17:46:36 2018 -0400 xfree86: replace all uses of xf86PrivsElevated with PrivsElevated [... but leave it defined and exported, since we're ABI-frozen - ajax] Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker restore abi commit 1b6910af12cfefcc293be2f4144986fe3b56a36b Author: Nicolai Hähnle Date: Tue Mar 13 17:46:35 2018 -0400 os: use PrivsElevated instead of a manual check Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker commit 9ef602de46de2beae1d6231dc72a1a783a26122f Author: Nicolai Hähnle Date: Tue Mar 13 17:46:34 2018 -0400 os: move xf86PrivsElevated here Having different types of code all trying to check for elevated privileges is a bad idea. This implementation is the most thorough one. Signed-off-by: Nicolai Hähnle Reviewed-by: Ben Crocker Reviewed-by: Antoine Martin Tested-by: Ben Crocker Reviewed-by: Emil Velikov commit 1519475a4382066707276d7463c7c6e52c382caa Author: Adam Jackson Date: Wed Mar 14 15:29:15 2018 -0400 appveyor: use meson i686 cygwin build time with autotools: 16:22 i686 cygwin build time with meson: 6:56 Signed-off-by: Adam Jackson commit 2415ef5b228f5a235377decde95cb146c6642ea9 Author: Adam Jackson Date: Tue Mar 20 14:00:33 2018 -0400 meson: Add the x(org)proto headers to the include path Without this meson won't properly use headers installed into a non-default location. Signed-off-by: Adam Jackson commit 21e8a4a1b993a9b1abd4a7510cd3d8a152be998b Author: Emil Velikov Date: Wed Mar 7 18:45:33 2018 +0000 modesetting: remove fallback DRM_CAP_* defines All the macros are available in the libdrm that we depend on. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit d2568c058745ea66353fefa8f7296a6f37795905 Author: Emil Velikov Date: Wed Mar 7 18:45:32 2018 +0000 modesetting: remove always true DRM_IOCTL_CRTC_QUEUE_SEQUENCE guard We already require libdrm 2.4.89 which provides the definition plus guarding kernel UABI like that is generally a bad idea. See previous commit for details why :-) Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit f368428ab84c14f32f52e50b880d9353fbb87181 Author: Emil Velikov Date: Wed Mar 7 18:45:31 2018 +0000 modesetting: remove always true defined(DRM_CAP_PRIME) guards The macro was available in libdrm for ages. Furthermore having a guard like this is a very bad idea. Building on an old server will result in a missing run-time functionality. Since it's UABI one can use a local fallback, old kernels will return -EINVAL and the fallback path will kick in. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 22b489d27365d2513bf1cab6da92254e3bdbcf41 Author: Emil Velikov Date: Wed Mar 7 18:45:30 2018 +0000 Remove always true GLAMOR_HAS_DRM_* guards With earlier commit the required version was bumped to 2.4.89, thus the guards always evaluate to true. Fixes: e4e3447603b ("Add RandR leases with modesetting driver support [v6]") Cc: Keith Packard Cc: Daniel Stone Cc: Louis-Francis Ratté-Boulianne Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit e0748b10a8621066b404d713a76826907da777b9 Author: Emil Velikov Date: Wed Mar 7 18:45:29 2018 +0000 configure: remove libdrm version check We already require said version. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 8718d46157b9317554aba3e01b9919a1c0c28026 Author: Adam Jackson Date: Wed Mar 14 16:43:09 2018 -0400 ci: Ignore builds for branches aimed at other CI services Make appveyor ignore builds for /travis.*/ and vice versa. If you're only testing a Windows change, building for OSX and Linux too is a bit rude. Signed-off-by: Adam Jackson commit ae5c0dd199a5fbfbdf7a2d6b8c1b28c410289106 Author: Emil Velikov Date: Tue Mar 13 18:38:49 2018 +0000 dri3: cap the version returned to the client As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 563138298868 ("dri3: Add DRI3 extension") Cc: Daniel Stone Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 6a5d51e0823b43280e3646b7a0c919a3b76146ea Author: Emil Velikov Date: Mon Mar 19 16:04:43 2018 +0000 present: cap the version returned to the client As per the protocol, the server should not return version greater than the one supported by the client. Add a spec quote and tweak the numbers accordingly. Fixes: 5c5c1b77982 ("present: Add Present extension") Cc: Thierry Reding Cc: Daniel Stone Cc: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit abb9b58d1af9a0286162e52ef9db390d0c950fc1 Author: Thierry Reding Date: Fri Mar 16 14:24:21 2018 +0100 present: Advertise protocol version 1.2 Everything is implemented to support protocol version 1.2. Make it official. Reviewed-by: Daniel Stone Signed-off-by: Thierry Reding Reviewed-by: Emil Velikov commit 7fc89251ef5e7363dfbf6d831ed448bbcd8519b8 Author: Alan Coopersmith Date: Sun Mar 4 13:00:05 2018 -0800 Revert "modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD" This reverts commit 8c455db0ebb6e5313ca81428bb6dd75ef12aaa15. Since xf86platformBus.h is only included when XSERVER_PLATFORM_BUS is defined, and configure.ac only defines that on systems with udev, this commit breaks the build on non-udev systems like Solaris. Signed-off-by: Alan Coopersmith commit edf08bd654dcdf31da9a592513b218bbd9f64cc6 Author: Adam Jackson Date: Wed Mar 14 12:10:27 2018 -0400 appveyor: Switch to xorgproto Also build with -j2, the builder VM has two cores. Signed-off-by: Adam Jackson commit 8f628033bed408c4de215ca117fa2fa2d9f9d5cd Author: Adam Jackson Date: Wed Mar 14 12:54:16 2018 -0400 travis: Update OSX build Install and use xorgproto, and build with optimization as clang has warnings that only work above -O0. Also expand the build matrix for both Xcode 8.3 and 9.2. Both images are OSX 10.12 at the moment so this is really just a way to test with clang 8 vs 9. Signed-off-by: Adam Jackson commit 1ca092f990e67c7dccf5790a72c41e84711c28a8 Author: Adam Jackson Date: Wed Mar 14 13:13:54 2018 -0400 travis: Switch linux build from stretch to rawhide Stretch's Mesa is too far behind, and building Mesa to build xserver is not the sort of problem we're trying to solve here. But our Travis scripts run inside a docker image, and that image can be whatever, so since I have to keep rawhide building anyway let's switch to that for now. The dockerfile can be found at: https://github.com/nwnk/xserver-travis The $DISTRO part of the change is foreshadowing for the day we readd a (probably sid-based) debian image; patches for other environments are welcome. Signed-off-by: Adam Jackson commit 17d30369f4445e1693a1b75dc6620bbc21ec8e61 Author: Michel Dänzer Date: Wed Mar 14 16:48:23 2018 +0100 randr: Initialize RROuptutRec::nonDesktop Flagged by valgrind: ==13695== Conditional jump or move depends on uninitialised value(s) ==13695== at 0x22461C: RRNoticePropertyChange (rrproperty.c:150) ==13695== by 0x22461C: RRChangeOutputProperty (rrproperty.c:263) ==13695== by 0x222FC4: RROutputSetNonDesktop (rroutput.c:333) ==13695== by 0x22319C: RROutputCreate (rroutput.c:122) ==13695== by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734) ==13695== by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375) ==13695== by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895) ==13695== by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778) ==13695== by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436) ==13695== by 0x161444: AddGPUScreen (dispatch.c:3966) ==13695== by 0x1A3E46: InitOutput (xf86Init.c:763) ==13695== by 0x1654A7: dix_main (main.c:193) ==13695== by 0x7041A86: (below main) (libc-start.c:310) ==13695== Uninitialised value was created by a heap allocation ==13695== at 0x4C2CB8F: malloc (vg_replace_malloc.c:299) ==13695== by 0x223083: RROutputCreate (rroutput.c:83) ==13695== by 0x1E1CE9: xf86RandR12CreateObjects12 (xf86RandR12.c:1734) ==13695== by 0x1E1CE9: xf86RandR12Init12 (xf86RandR12.c:2375) ==13695== by 0x1E1CE9: xf86RandR12Init (xf86RandR12.c:895) ==13695== by 0x1D469B: xf86CrtcScreenInit (xf86Crtc.c:778) ==13695== by 0xC095A54: RADEONScreenInit_KMS (radeon_kms.c:2436) ==13695== by 0x161444: AddGPUScreen (dispatch.c:3966) ==13695== by 0x1A3E46: InitOutput (xf86Init.c:763) ==13695== by 0x1654A7: dix_main (main.c:193) ==13695== by 0x7041A86: (below main) (libc-start.c:310) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 52048ce29f872192478fece3887b7bc1c8aace7d Author: Keith Packard Date: Mon Mar 12 12:14:44 2018 -0700 Xext/saver: Swap ScreenSaverSuspend 'suspend' field. Handle old XCB clients. This field was defined as a Bool in the protocol headers and BOOL in xcb. Bool is not a valid type for protocol fields. It is defined as 'int' by Xdefs.h, which we expect to be 32-bits on all machines. The protocol headers and xcb have patches posted to switch to CARD32, which is at least well defined. This change adds the necessary byte swapping to handle other-endian clients with this 32-bit field, and then changes the request processing to compare all 32-bits against zero so that it works with both new and old clients. On MSB machines, Xlib will continue to work properly, but old XCB will not interoperate with the X server (either before or after this patch). Signed-off-by: Keith Packard Reviewed-by: Mihai Moldovan Reviewed-by: Adam Jackson commit beda6afb3c33adbf77637141f05631081894e93a Author: Mario Kleiner Date: Fri Mar 9 04:58:20 2018 +0100 glamor/xwayland: Add depth 30 format mapping for DRI 3.2 as well. Signed-off-by: Mario Kleiner Reviewed-by: Daniel Stone commit 07c369e05ac116901dacc20f4742622bdca2784f Author: Jon Turney Date: Thu Mar 8 12:34:26 2018 +0000 meson: Require libdrm for dri1/2/3 when configured 'auto' as well as 'true' If dri1/2/3 are configured for auto-detection, libdrm is required, as well as the corresponding proto. (Practically we will always have the corresponding protos now, as they are part of xorgproto). Signed-off-by: Jon Turney Reviewed-by: Emil Velikov commit f69cd2024ef25e7fd2bd2d7012e33ce16eeb79ff Author: Adam Jackson Date: Thu Mar 8 11:13:16 2018 -0500 os: Define {ReadFdFrom,WriteFdTo}Client unconditionally Otherwise this is broken on cygwin: rrlease.c: In function ‘ProcRRCreateLease’: rrlease.c:305:9: error: implicit declaration of function ‘WriteFdToClient’ [-Werror=implicit-function-declaration] if (WriteFdToClient(client, fd, TRUE) < 0) { Signed-off-by: Adam Jackson commit 90e0cdd42dfda2accfadffa5c550712696902e14 Author: Rodrigo Vivi Date: Wed Mar 7 07:46:20 2018 -0800 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Geminilake and Kaby Lake platform names updates and sync on Coffee Lake PCI IDs. Cc: Timo Aaltonen Signed-off-by: Rodrigo Vivi Reviewed-by: Adam Jackson commit 43576b901151a1f32209f476249a4de6980b654f Author: Michel Dänzer Date: Tue Mar 6 10:53:19 2018 +0100 glamor: Restore glamor_fd_from_pixmap and glamor_pixmap_from_fd They're part of the 1.20 RC1 ABI, and actually used by external drivers. Also, requiring drivers which don't support the new functionality in DRI3 1.2 to switch to the new interfaces seems unreasonable. Signed-off-by: Michel Dänzer Reviewed-by: Daniel Stone commit 5d3fd3856b718cfbc87d17f1de698ced94923c78 Author: Samir Benmendil Date: Sat Mar 3 01:41:12 2018 +0000 xkb: XkbSetMap on the lastSlave needs to change the master The layout needs to be set on the master too if the layout is changed on the device that was last used by the master. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=85256 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91571 Signed-off-by: Samir Benmendil Acked-by: Daniel Stone commit ce8da936464cc78ec31de6e970e1353ffecf2547 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:46 2018 +0000 dri3: Enable DRI3 version 1.2 Enable DRI3 v1.2 now that all functions have been implemented and that there is at least one backend implementing the driver hooks (modesetting/glamor). Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 8d0d89715984e321315631dd6667e05813d26e03 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:45 2018 +0000 glamor: Use gbm_bo_create_with_modifiers for internal pixmap allocation Using modifier might allow the driver to use a more optimal format (e.g. tiled/compressed). Let's try to use those if possible. v2: Don't filter out multi-plane modifiers Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit cef12efc15ca1444d6d8cd839116b318a4668692 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:44 2018 +0000 glamor: Implement GetSupportedModifiers Implement function added in DRI3 v1.1. A newest version of libepoxy (>= 1.4.4) is required as earlier versions use a problematic version of Khronos EXT_image_dma_buf_import_modifiers spec. v4: Only send scanout-supported modifiers if flipping is possible v5: Fix memory corruption in XWayland (uninitialized pointer) Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit c8c276c9569b3ca1e695682a5443f1b615c606bd Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:43 2018 +0000 glamor: Implement PixmapFromBuffers and BuffersFromPixmap It relies on GBM >= 17.1.0 where we can import BO with multiple planes and a format modifier (GBM_BO_IMPORT_FD_MODIFIER). v2: Properly free fds in Xwayland [Also add glamor_egl_ext.h to Makefile.am for distcheck's sake - ajax] Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 9d147305b4048dcec7ea4eda3eeea83f843f7788 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:42 2018 +0000 modesetting: Check if buffer format is supported when flipping Add support for 'check_flip2' so that the present core can know why it is impossible to flip in that scenario. The core can then let know the client that the buffer format/modifier is suboptimal. v2: No longer need to implement 'check_flip' Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit e375f29662ad7589cc6d8d179846da9b8a897122 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:41 2018 +0000 modesetting: Create scanout buffers using supported modifiers Use most optimal buffer format (e.g. tiled/compressed) available for scanout. v2: Don't use multi-plane modifier to create scanout buffer v3: Add flag to retrieve modifiers set from enabled CRTCs only v4: Fix uses when GBM/EGL driver doesn't support modifiers Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit ca1c390ec7bf617c0147d69cf874dadce28e903b Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:40 2018 +0000 modesetting: Get supported formats/modifiers for scanout Retrieve IN_FORMATS property from the plane. It gives the allowed formats and modifiers for BO allocation. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 9817c14f6a2ea5db44459659131c13f403716df1 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:39 2018 +0000 modesetting: Use atomic modesetting to configure output/CRTCs To make sure we also use the same primary plane and to avoid mixing uses of two APIs, it is better to always use the atomic modesetting API when possible. v2: Don't use mode_output->connector_id Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 2f807c2324b46fbd9a557e7a4f177a392d5851b3 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:38 2018 +0000 modesetting: Add support for multi-plane pixmaps when page-flipping This allows the uses of CCS compressed or tiled pixmaps as BOs when page-flipping. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 4023d537341b9c36b9bb248c206e40694e4b08d2 Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:37 2018 +0000 modesetting: Use atomic modesetting API for pageflip if available In order to flip between compressed and uncompressed buffers - something drmModePageFlip explicitly bans us from doing - we need to port use the atomic modesetting API. It's only 'fake' atomic though given we still commit for each CRTC separately and CRTC and connector properties are not set with the atomic API. The helper functions to retrieve DRM properties have been borrowed from Weston. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit e2ef3b44fa697f2ed453767e98da72ea56d4046f Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:36 2018 +0000 present: Send PresentCompleteModeSuboptimalCopy appropriately Add 'check_flip2' hook for driver to let know the core about why flipping is not possible ('reason'). If it is because of unsupported buffer format/modifier, a PresentCompleteNotify event is sent to the client with the PresentCompleteModeSuboptimalCopy mode. v2: Check for PresentOptionSuboptimal and check driver version before using 'check_flip2'. v3: Only require one of 'check_flip' or 'check_flip2' to be implemented by the driver. Refactor reasons list to enum Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Daniel Stone Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 6e7c40f62db66f5b59b2cf59f1e6a26e4fd21bda Author: Louis-Francis Ratté-Boulianne Date: Wed Feb 28 01:19:35 2018 +0000 dri3: Add multi-planar/modifier buffer requests Initial implementation for DRI3 v1.1. Only the DRI3 implementation is there, backends need to implement the proper hooks. Version is still set to 1.0 so clients shouldn't use the new requests yet. v2: Use depth/bpp instead of DRM formats in requests v3: Remove DMA fence requests from v1.1 Add screen/drawable modifier sets v4: Free array returned by 'get_drawable_modifiers()' v5: Fix FD leak Signed-off-by: Daniel Stone Signed-off-by: Louis-Francis Ratté-Boulianne Acked-by: Keith Packard Reviewed-by: Adam Jackson commit 0ff4074224ea370e021d79526c63cef91356730d Author: Keith Packard Date: Fri Mar 2 17:05:04 2018 -0800 Require libdrm 2.4.89 or newer Both autotools and meson build systems had complicated logic around what version of libdrm to require for various options. Remove that and just check for a new enough version to support all of the options which need libdrm. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 43ffd572592d26bb78decfdf55e643bdfb011d3f Author: Laurent Carlier Date: Thu Mar 1 12:58:16 2018 +0100 meson: Make SHM extension optional v2: check for header 'sys/shm.h' Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit de4565727a0bb199365d33e3c98d9ddd3e0de6f2 Author: Laurent Carlier Date: Thu Mar 1 12:57:27 2018 +0100 meson: get rid of useless HAVE_SYSV_IPC Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit e02afb94783a25c21b07e44a7b615acdd86fa3f7 Author: Laurent Carlier Date: Thu Mar 1 12:56:28 2018 +0100 meson: Make ACPI support optional v2: Define HAVE_ACPI in dix-config.h Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 238219e7312e2b5d972a8620b02379009686a005 Author: Laurent Carlier Date: Thu Mar 1 12:55:11 2018 +0100 meson: Make APM support optional v2: Define HAVE_APM in dix-config.h Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 2af0a50a4bb9be9f58681d417ceb9a7029caaf3b Author: Adam Jackson Date: Wed Feb 28 11:23:41 2018 -0500 randr: Fix a crash on initialization with GPU screens RRSetChanged (immediately above) was immune to screens with no master, but RRTellChanged was not: Thread 1 "X" received signal SIGSEGV, Segmentation fault. RRTellChanged (pScreen=) at ../../randr/randr.c:576 576 mastersp = rrGetScrPriv(master); (gdb) bt #0 RRTellChanged (pScreen=) at ../../randr/randr.c:576 #1 0x000055555566f1e9 in RRNoticePropertyChange (value=0x555555bfbf28, property=70, output=0x555555bfef10) at ../../randr/rrproperty.c:153 #2 RRChangeOutputProperty (output=output@entry=0x555555bfef10, property=, type=type@entry=19, format=format@entry=32, mode=, mode@entry=0, len=len@entry=1, value=0x7fffffffe77c, sendevent=1, pending=0) at ../../randr/rrproperty.c:263 #3 0x000055555566dba5 in RROutputSetNonDesktop (output=output@entry=0x555555bfef10, nonDesktop=nonDesktop@entry=0) at ../../randr/rroutput.c:333 ... Reported-by: Michel Dänzer Signed-off-by: Adam Jackson commit cf485c659d93c92b26c4390402575f061eb175f6 Author: Adam Jackson Date: Wed Feb 28 12:18:28 2018 -0500 xserver 1.20 RC 1 Signed-off-by: Adam Jackson commit afccb266edc8b2ca014aec5b2a67bb1627f29fe9 Author: Adam Jackson Date: Wed Feb 28 12:26:26 2018 -0500 glx: Add vndserver.h to the SDK Also unbreak 'make distcheck', sigh autotools. Signed-off-by: Adam Jackson commit 85ff1cdbd3286838e512fe7c70af149a8743b6fe Author: Emil Velikov Date: Tue Feb 27 17:05:50 2018 +0000 protocol.txt: add GLX req. 35 - SetClientInfo2ARB Noticed while skimming for the typo'd version ;-) Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit e4e3447603b5fd3a38a92c3f972396d1f81168ad Author: Keith Packard Date: Mon Feb 12 13:51:56 2018 -0800 Add RandR leases with modesetting driver support [v6] This adds support for RandR CRTC/Output leases through the modesetting driver, creating a lease using new kernel infrastructure and returning that to a client through an fd which will have access to only those resources. v2: Restore CRTC mode when leases terminate When a lease terminates for a crtc we have saved data for, go ahead and restore the saved mode. v3: Report RR_Rotate_0 rotations for leased crtcs. Ignore leased CRTCs when selecting screen size. Stop leasing encoders, the kernel doesn't do that anymore. Turn off crtc->enabled while leased so that modesetting ignores them. Check lease status before calling any driver mode functions When starting a lease, mark leased CRTCs as disabled and hide their cursors. Also, check to see if there are other non-leased CRTCs which are driving leased Outputs and mark them as disabled as well. Sometimes an application will lease an idle crtc instead of the one already associated with the leased output. When terminating a lease, reset any CRTCs which are driving outputs that are no longer leased so that they start working again. This required splitting the DIX level lease termination code into two pieces, one to remove the lease from the system (RRLeaseTerminated) and a new function that frees the lease data structure (RRLeaseFree). v4: Report RR_Rotate_0 rotation for leased crtcs. v5: Terminate all leases on server reset. Leases hang around after the associated client exits so that the client doesn't need to occupy an X server client slot and consume a file descriptor once it has gotten the output resources necessary. Any leases still hanging around when the X server resets or shuts down need to be cleaned up by calling the kernel to terminate the lease and freeing any DIX structures. Note that we cannot simply use the existing drmmode_terminate_lease function on each lease as that wants to also reset the video mode, and during server shut down that modesetting: Validate leases on VT enter The kernel doesn't allow any master ioctls to run when another VT is active, including simple things like listing the active leases. To deal with that, we check the list of leases whenever the X server VT is activated. xfree86: hide disabled cursors when resetting after lease termination The lessee may well have played with cursors and left one active on our screen. Just tell the kernel to turn it off. v6: Add meson build infrastructure [Also bumped libdrm requirement - ajax] Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 023d4aba8d45e9e3630b944ecfb650c081799b96 Author: Keith Packard Date: Mon Feb 12 13:51:55 2018 -0800 xf86-video-modesetting: Create CONNECTOR_ID properties for outputs [v2] This lets a DRM client map between X outputs and kernel connectors. v2: Change CONNECTOR_ID to enum -- Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 39573605050f6253d14a4786bb79ce2b48537039 Author: Keith Packard Date: Mon Feb 12 13:51:54 2018 -0800 randr: Support "non-desktop" property Tracks changes to the non-desktop property so that when non-zero, outputs will always appear to be disconnected. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b91c787c4cd2d20685db69426c539938c556128a Author: Keith Packard Date: Mon Feb 12 13:51:53 2018 -0800 xf86-video-modesetting: Record non-desktop kernel property at PreInit time Save any value of the kernel non-desktop property in the xf86Output structure to avoid non-desktop outputs in the default configuration. [Also bump randrproto requirement to a version that defines RR_PROPERTY_NON_DESKTOP - ajax] Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fabbaa8d6260da14fe5b7ca0f3f8748af16253a2 Author: Keith Packard Date: Mon Feb 12 13:51:52 2018 -0800 xfree86/modes: Check for non-desktop monitors during PreInit [v2] At startup, we want to ignore non-desktop monitors unless we don't find any desktop monitors. Because there are no DIX RandR resources allocated, let the driver store this information in a new field in the xf86Output structure and then use that value to help decide whether to include an output as part of the default configuration. v2: Suggested-by: Michel Dänzer Bump XF86_CRTC_VERSION from 7 to 8. This will let out-of-tree drivers know whether this field is available. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 80d4f4b6c20288aa3e0c9908d5d845fc0088a662 Author: Mario Kleiner Date: Tue Feb 27 03:05:32 2018 +0100 modesetting: Enable screen color depth 30 support. glamor now supports depth 30, so allow use of it. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit 7bc86c7d2346eadb3aafe1550ec55e63f2a3b3e5 Author: Mario Kleiner Date: Tue Feb 27 03:05:31 2018 +0100 modesetting: Adapt xf86HandleColorMaps() for > 24 color depth. (v2) This retains old behavior for depths <= 24, but allows gamma table and colormap updates to work properly at depth 30. This needs the xf86Randr12CrtcComputeGamma() fix for depth 30 from a previous commit to work. Otherwise the server will work, but gamma table updates will silently fail, iow. the server would always run with a default identity gamma lut. v2: Simplify as proposed by Michel. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin (v1) commit b5f9fcd50a999a00128c0cc3f6e7d1f66182c9d5 Author: Mario Kleiner Date: Tue Feb 27 03:05:30 2018 +0100 xfree86/modes: Adapt xf86Randr12CrtcComputeGamma() for depth 30. (v2) At screen depths > 24 bit, the color palettes passed into xf86Randr12CrtcComputeGamma() can have a larger number of slots than the crtc's hardware lut. E.g., at depth 30, 1024 palette slots vs. 256 hw lut slots. This palette size > crtc gamma size case is not handled yet and leads to silent failure, so gamma table updates do not happen. Add a new subsampling path for this case. This makes lut updates work again, as tested with the xgamma utility (uses XF86VidMode extension) and some RandR based gamma ramp animation. v2: Better resampling when subsampling the palette, as proposed by Ville. Now reaches the max index of the palette and deals with non-power-of-two sizes. Thanks. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin (v1) Cc: commit 125201408ddd51ca8ea961a7338a6ad299e5816c Author: Mario Kleiner Date: Tue Feb 27 03:05:29 2018 +0100 glamor: Bump version to 1.0.1 to signal depth 30 support. Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin commit 7a687da24c9d3c9e40ffa426631bf355322d470e Author: Mario Kleiner Date: Tue Feb 27 03:05:28 2018 +0100 glamor: Enable composite acceleration for rgb10 formats. (v2) Specifically for xrgb2101010 format. Tested on KDE Plasma-5 with XRender based composite acceleration backend. Much smoother and faster. (v2) Dropped argb2101010, because of depth 32 confusion with argb8888, as pointed out by Eric. Thanks! Signed-off-by: Mario Kleiner Reviewed-by: Antoine Martin commit c326c717c8dbf4a3f0c64a031fbe6030e73ff355 Author: Mario Kleiner Date: Tue Feb 27 03:05:27 2018 +0100 glamor: Fix loose ends in color depth 30 support. This makes it work properly with OpenGL based desktop compositing, as tested with EGL and GLX based compositing under OpenGL-2/3, and also artifact free with XRender based 2D compositing. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit 9ab5d91c6c228e8f5b34e4b30c5104aed6c41958 Author: Mario Kleiner Date: Tue Feb 27 03:05:26 2018 +0100 glamor: Make Xv extension initialize at depth 30. Support x-screens of depth 30, so init doesn't fail. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Reviewed-by: Antoine Martin commit efe9e3e9ff96a06f50d94dc93ad2c19085fa3d09 Author: Mario Kleiner Date: Tue Feb 27 06:51:59 2018 +0100 modesetting: Fix fallback for lack of new vblank kernel API. Turns out that the kernel DRM ioctl handling returns EINVAL instead of ENOTTY if one tries to call the new drmCrtcGetSequence() or drmCrtcQueueSequence() ioctl's introduced in Linux 4.15 on an older kernel where they are missing. This causes the fallback code not to fall back to the old drmWaitVblank() ioctl and thereby failure of vblank stuff. E.g., on Linux 4.13, glxgears -info runs unthrottled at 10000 fps instead of 60 fps. Also breakage of OML_sync_control extension. Check for errno != EINVAL before setting has_queue_sequence = TRUE. Additionally in case of supported drmCrtcQueueSequence(), set has_queue_sequence = TRUE on success, or we might get at least a temporary failure in ms_queue_vblank(). One slight ambiguity is that we can also get EINVAL if drm_crtc_vblank_get() fails in the kernel, so if that happened at first invocation of the new api, we'd fall back to drmWaitVblank() and then fail there, instead of failing in the new api, but the end result would be the same. Fixes: 44d5f2eb8a2f ("xf86-video-modesetting: Support new vblank kernel API [v2]") Signed-off-by: Mario Kleiner Cc: Keith Packard Reviewed-by: Keith Packard commit 8171d4c2d67b2990a278dc018ac32534c3afe606 Author: Adam Jackson Date: Fri Feb 23 16:08:10 2018 -0500 render: Store and use all 16bpc of precision for solid pixels (v2.1) This plumbs the full width color for solid pictures through to fb, exa, and glamor. External drivers and acceleration code may wish to make a similar change for sufficiently new servers. v2: Don't break ABI (Michel Dänzer) v2.1: Use the (correct) full color in fb too (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 92272378064a878ce7a62852b877d674bcad89cd Author: Jeffrey Smith Date: Thu Feb 15 06:46:55 2018 -0600 modesetting: Do not close uninitialized dri2 screen If a dri2 screen is not successfully initialized, attempting to close it results in a null dereference. Maintain a flag indicating whether the dri2 screen was successfully initialized, and check it before attempting to close the dri2 screen. https://bugzilla.redhat.com/show_bug.cgi?id=1485811 https://bugzilla.redhat.com/show_bug.cgi?id=1493805 https://bugzilla.redhat.com/show_bug.cgi?id=1534459 https://bugzilla.redhat.com/show_bug.cgi?id=1541745 https://bugs.freedesktop.org/show_bug.cgi?id=101282 Signed-off-by: Jeff Smith commit aa29298416a6323fad1681a019dbcd54867b66c4 Author: Adam Jackson Date: Mon Feb 26 15:26:35 2018 -0500 glamor: unifdef XORG_VERSION_CURRENT This is always true now that glamor is in-tree. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 059879b3edb104014959426f953e1faf103d99ff Author: Adam Jackson Date: Mon Feb 26 13:58:26 2018 -0500 xquartz: Fix linking with glxvnd Signed-off-by: Adam Jackson commit 22a3ffe68c9c498e0b6b74ebcf1404becda8e2b1 Author: Michel Dänzer Date: Mon Feb 26 17:30:57 2018 +0100 glx: Don't pass NULL to glxGetClient These guards were dropped by the commit below, but it turns out they're needed. Fixes crash on VT switch. Fixes: d8ec33fe0542 ("glx: Use vnd layer for dispatch (v4)") Bugzilla: https://bugs.freedesktop.org/105233 Signed-off-by: Michel Dänzer Reviewed-by: Adam Jackson commit 528c94c6501db936882cd06338e2250a0b884b36 Author: Adam Jackson Date: Tue Feb 20 11:03:46 2018 -0500 glx: Fix indirect no-config contexts We would throw BadValue here for the GLX_SCREEN attribute. The upper dispatch layer already checks this, we can ignore it here. Signed-off-by: Adam Jackson commit a63ab81f6be7ad46b7e2d98a50aef4da5e664847 Author: Adam Jackson Date: Tue Feb 20 11:03:45 2018 -0500 glx: Enable GLX_ARB_create_context_no_error (v2) This is mostly for the client library's convenience, if this extension is listed then it can know the attribute won't be rejected. Note that we don't honor this attribute for indirect contexts. That's fine, we don't want to introduce undefined behavior into a potentially privileged process. v2: Remember to ignore the attribute (Eric Anholt) Signed-off-by: Adam Jackson commit 701f3a206d6f71c4754f457e95e2b954cf0b80c7 Author: Adam Jackson Date: Fri Feb 23 16:08:11 2018 -0500 render: Simplify miCompositeRects Make a solid-fill picture for this instead of a 1x1 pixmap. In principle the backend can accelerate this directly, and we also get to preserve all the bits of the fill color. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 9339fa87d03204b29d47eb8c9406f701517b3514 Author: Adam Jackson Date: Thu Feb 22 16:53:22 2018 -0500 render: Cosmetic cleanup to default format creation Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ddf752eafe951bb9723aabf2579c4725a6ffc9de Author: Adam Jackson Date: Thu Feb 22 16:53:21 2018 -0500 render: Remove some 24bpp handling This can't happen anymore. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit efd84bff238f8e12bf652525990d36baada8785b Author: Peter Harris Date: Thu Feb 22 18:07:38 2018 -0500 composite: Fix use-after-free in compReparentWindow If an implicitly redirected window is unredirected by the reparent operation, cw will be a stale pointer. Signed-off-by: Peter Harris Reviewed-by: Keith Packard commit ac13d740bf14ba8799d4dfbee1f6f99a297dbc7e Author: Emil Velikov Date: Wed Feb 21 17:12:15 2018 +0000 mi: Mention extension loading in verbose logs Listing the extensions is useful, despite being annoying for normal usecases. Print it only when extra (lvl 3) vebose is requested. v2: Move the logging to InitExtensions(), as requested by Adam. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 9237c5e2878c088a6cd26ea380763465a9e67012 Author: Emil Velikov Date: Mon Feb 19 15:18:11 2018 +0000 docs: correct LoadExtensionList() documentation Add the missing arguments to the function signature. Fixes: e46820fb897 ("miinitext: introduce LoadExtensionList() to replace over LoadExtension()") Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 089a1b0f9fa2e80457dc3d5f05c84565c9113a21 Author: Emil Velikov Date: Mon Feb 19 15:18:10 2018 +0000 glx: set the version we implement in GlxServerExports Set the major/minor version it's currently implemented, not the one provided by the GLXSERVER_VENDOR_ABI_{MAJOR,MINOR}_VERSION macros. Those are identical for now, but can change in the future. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit edc00e020310d8f53ebc16295c373fe84ec6ec87 Author: Emil Velikov Date: Mon Feb 19 15:18:09 2018 +0000 glx: use C99 initializers for GlxServerExports Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 7fc757986947ad89d76fc0fd3d69f5fdeefc9055 Author: Emil Velikov Date: Mon Feb 19 15:18:08 2018 +0000 glx: NULL check the correct argument in dispatch_GLXVendorPriv malloc can return NULL, unlike GetVendorDispatchFunc. The latter provides DispatchBadRequest. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 1310241e8d606687811c7394811fe337c3e4de11 Author: Emil Velikov Date: Mon Feb 19 15:18:07 2018 +0000 glx: keep glvnd_vendor a private [static] variable Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit a054532668cbbb152d0d7acfcce1e03e884bb491 Author: Jason Ekstrand Date: Tue Feb 20 09:41:39 2018 -0800 xwayland: Fix backwards need_rotate logic (v2) When xdg_output support was added to Xwayland, need_rotate parameter was added to output_get_new_size where true gave you the old pre-xdg_output behavior and false gave the new behavior. Unfortunately, the two places where this is called, need_rotate was set backwards. This caused input get clampped to the wrong dimensions. Also, the logic for deciding whether or not to flip was wrong because, if need_rotate was false, it would always flip which is not what you want. v2 (Daniel Stone): - Fix output_get_new_size so that it doesn't flip the dimensions when need_rotate is false. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Stone Reviewed-by: Olivier Fourdan commit 343ee7d07565a75b90e6489c5c29f772dca79c43 Author: Alexander Volkov Date: Tue Feb 20 18:07:18 2018 +0300 Xephyr: Avoid calling xcb_shm_detach() twice This call was forgotten to be removed in 90996f5909aab4bc9aa4011a6a6d0555a7aa3adf in which hostx_destroy_shm_segment() was introduced, which itself does it. Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 5ba0ba93e127a8c460b013e3c6851dd186377c27 Author: Laurent Carlier Date: Sun Feb 18 10:58:35 2018 +0100 meson: Make DGA extension optional Signed-off-by: Laurent Carlier commit e790bc621b8f55489e35b1de260c649d8d105d63 Author: Laurent Carlier Date: Sun Feb 18 10:58:34 2018 +0100 dga: #if XFreeXDGA → #ifdef XFreeXDGA ../include/events.h:32:14: error: #if with no expression Signed-off-by: Laurent Carlier commit ce4e20f80ff64a5a8b9f344e2507128f379e0715 Author: Laurent Carlier Date: Sun Feb 18 10:58:33 2018 +0100 meson: Make Xv and XvMC extensions optional Just mimic autoconf file, XvMC can't be enabled without Xv Signed-off-by: Laurent Carlier commit 82d9e99bf99660537a11d9475369c43814cad664 Author: Laurent Carlier Date: Sun Feb 18 10:58:32 2018 +0100 meson: Xephyr Requires xcb-shm version 1.9.3 or newer Sync with commit 8510f542e5474b719f7d7edba7ef0cc05af0271e Signed-off-by: Laurent Carlier commit 272fa1817091117d078a22252a03d3161dfc7b0f Author: Jeffrey Smith Date: Thu Feb 15 23:47:46 2018 -0600 os: avoid uninitialized offsets in backtrace When xorg_backtrace calls unw_get_proc_name and an error occurs, offset might not be set for the current frame. Initialize offset for each frame so that the offset from another frame cannot be used inadvertently. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 6f9d29040cd9f4723a2e6c1e5d2ec8104efc0710 Author: Jon Turney Date: Fri Feb 16 16:44:37 2018 +0000 hw/xwin: Update for glxvnd - Link with libglxvnd in meson.build - Call xorgGlxCreateVendor() like all other DDX Signed-off-by: Jon Turney commit 500cc4a029efce9b962ab8fbb10da9f87d83372e Author: Adam Jackson Date: Wed Feb 14 17:21:43 2018 -0500 dmx: warning fix /home/ajax/git/xserver/at/../hw/dmx/input/dmxinputinit.c: In function ‘dmxInputInit’: /home/ajax/git/xserver/at/../hw/dmx/input/dmxinputinit.c:1019:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] int found; Signed-off-by: Adam Jackson commit 9bcddaf9619d01cdbf965cedb9f86a08ed6dc524 Author: Adam Jackson Date: Wed Feb 14 17:20:16 2018 -0500 dri2: warning fix /home/ajax/git/xserver/at/../glx/glxdri2.c: In function ‘create_driver_context’: /home/ajax/git/xserver/at/../glx/glxdri2.c:444:5: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] const __DRIconfig *driConfig = config ? config->driConfig : NULL; I don't know why autotools has decided not to be C99 but at least it's trivial to fix. Signed-off-by: Adam Jackson commit 133bd4443be6b76a36afadfae0905b832e998165 Author: Adam Jackson Date: Wed Jan 10 13:05:48 2018 -0500 glx: Large commands are context state, not client state There's no reason a multithreaded client shouldn't be allowed to interleave other requests (for other contexts) with a RenderLarge. Move the check into __glXForceCurrent, and store the state in the context not the client. Signed-off-by: Adam Jackson commit 5d87e4f71355272c8da38c83f493b826623301cc Author: Adam Jackson Date: Wed Jan 10 13:05:47 2018 -0500 miinitext: Remove separate extension toggle list This was only separate because GLX was loadable. The frontend is now linked statically, so we can use the static extension list directly. Signed-off-by: Adam Jackson commit 67c303fff303f94b62f03a76de97116c6ebcfda9 Author: Adam Jackson Date: Wed Jan 10 13:05:46 2018 -0500 miinitext: Load GLX on the mi path Add a stub for Xnest so it continues to link, but otherwise we support GLX on every server so there's no need to make every DDX add it. Signed-off-by: Adam Jackson commit d8ec33fe0542141aed1d9016d2ecaf52da944b4b Author: Adam Jackson Date: Wed Jan 10 13:05:45 2018 -0500 glx: Use vnd layer for dispatch (v4) The big change here is MakeCurrent and context tag tracking. We now delegate context tags entirely to the vnd layer, and simply store a pointer to the context state as the tag data. If a context is deleted while it's current, we allocate a fake ID for the context and move the context state there, so the tag data still points to a real context. As a result we can stop trying so hard to detach the client from contexts at disconnect time and just let resource destruction handle it. Since vnd handles all the MakeCurrent protocol now, our request handlers for it can just be return BadImplementation. We also remove a bunch of LEGAL_NEW_RESOURCE, because now by the time we're called vnd has already allocated its tracking resource on that XID. v2: Update to match v2 of the vnd import, and remove more redundant work like request length checks. v3: Add/remove the XID map from the vendor private thunk, not the backend. (Kyle Brenneman) v4: Fix deletion of ghost contexts (Kyle Brenneman) Signed-off-by: Adam Jackson commit 8753218beae641e5c5ac2c2ba598cfb99a893cf4 Author: Kyle Brenneman Date: Wed Jan 10 13:05:44 2018 -0500 glx: Import glxvnd server module (v2) This is based on an out-of-tree module written by Kyle: https://github.com/kbrenneman/libglvnd/tree/server-libglx I (ajax) did a bunch of cosmetic fixes, ported it off xfree86 API, added request length checks, and fixed a minor bug or two. v2: Use separate functions to set/get a context tag's private data, and call the backend's MakeCurrent when a client disconnects to unbind the context. (Kyle Brenneman) Signed-off-by: Adam Jackson commit d1fdddeb76328ab84d9a181a5c72b90013f0f0a6 Author: Laurent Carlier Date: Tue Feb 13 22:33:51 2018 +0100 meson: Make Security extension optional Just mimic autoconf file, Security extension needs X-ACE extension Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 43ef94068e072228446484bf58c0624b9b9649ac Author: Laurent Carlier Date: Tue Feb 13 22:33:50 2018 +0100 meson: Make more extensions optional Just mimic autoconf file for xf86bigfont, screensaver, xres, xace and xinerama extensions Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 3203dd175bd71ef4d154578165d930eec29afddb Author: Laurent Carlier Date: Tue Feb 13 22:33:49 2018 +0100 meson: Make DPMS extension optional Just mimic autoconf file, DPMS is disabled with Xquartz Signed-off-by: Laurent Carlier Reviewed-by: Adam Jackson commit 2c3e137b786dab4a8002a4934fbcf4ef0742f473 Author: Adam Jackson Date: Wed Feb 14 14:10:44 2018 -0500 dmx: #if PANORAMIX → #ifdef PANORAMIX Signed-off-by: Adam Jackson commit ceaf4277447407a7430b9bc3205462fbdbae0e39 Author: Adam Jackson Date: Mon Feb 12 15:35:05 2018 -0500 xfixes: Restore monitoring of animated cursors This was broken by: commit aa6651f83c698e8cc40de61aad36c73ca7a6adcf Author: Adam Jackson Date: Thu Jun 8 16:23:12 2017 -0400 xfixes: Remove the CursorCurrent array As of that change we look up the current cursor dynamically instead of trying to track every time it's set through ->DisplayCursor. That would work, except the 'bits' of an animated cursor is a transparent 1x1 pixel. So now, look up whether there's an animated cursor, and use its current frame if so. Signed-off-by: Adam Jackson commit 0b7a5700ad3d65e408a2fae00bdee867a8d2e1a8 Author: Adam Jackson Date: Mon Feb 12 15:35:04 2018 -0500 animcur: Change which CursorPtr we save in external state Formerly spriteInfo->anim.pCursor would point to the animated cursor (or NULL if not animated). That value would also be available in spriteInfo->sprite->current, so instead lets use anim.pCursor to point to the current animation element. Signed-off-by: Adam Jackson commit 8510f542e5474b719f7d7edba7ef0cc05af0271e Author: Alexander Volkov Date: Wed Feb 7 14:08:50 2018 +0300 Xephyr: Require xcb-shm version 1.9.3 or newer It's needed for FD-passing. Signed-off-by: Alexander Volkov Reviewed-by: Adam Jackson commit 2ff6eaad85fd702e3cc597c44ccf2210570004ea Author: Roman Gilg Date: Fri Feb 9 23:40:42 2018 +0100 Correct xorg_list_is_empty return value description The helper xorg_list_is_empty returns True when the list is empty and not when it contains one or more elements. Signed-off-by: Roman Gilg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bebcc8477c8070ade9dd4be7299c718baeab3d7a Author: Mario Kleiner Date: Mon Feb 5 11:20:41 2018 +0100 glx: Only assign 8 bpc fbconfigs for composite visuals. Commit 91c42093b248 ("glx: Duplicate relevant fbconfigs for compositing visuals") adds many new depth 32 fbconfigs as composite visuals. On a X-Screen running at depth 24, this also adds bgra 10-10-10-2 fbconigs, as they also have config.rgbBits == 32, but these are not displayable on a depth 24 screen, leading to visually corrupted desktops under some compositors, e.g., fdo bug 104597 "Compton weird colors" when running compton with "compton --backend glx". Be more conservative for now and only select fbconfigs with 8 bpc red, green, blue components for composite visuals. Fixes: 91c42093b248 ("glx: Duplicate relevant fbconfigs for compositing visuals") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104597 Signed-off-by: Mario Kleiner Reviewed-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit 98edb9a35e2cdd61355656b82975d7f2b6a9f0e6 Author: Lyude Paul Date: Tue Feb 6 12:41:47 2018 -0500 xwayland: Don't process cursor warping without an xwl_seat Unfortunately, on my machine Xwayland immediately crashes when I try to start it. gdb backtrace: #0 0x00007ffff74f0e79 in wl_proxy_marshal () from target:/lib64/libwayland-client.so.0 #1 0x0000000000413172 in zwp_confined_pointer_v1_destroy (zwp_confined_pointer_v1=0x700000000) at hw/xwayland/Xwayland@exe/pointer-constraints-unstable-v1-client-protocol.h:612 #2 0x0000000000418bc0 in xwl_seat_destroy_confined_pointer (xwl_seat=0x8ba2a0) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2839 #3 0x0000000000418c09 in xwl_seat_unconfine_pointer (xwl_seat=0x8ba2a0) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2849 #4 0x0000000000410d97 in xwl_cursor_confined_to (device=0xa5a000, screen=0x8b9d80, window=0x9bdb70) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland.c:328 #5 0x00000000004a8571 in ConfineCursorToWindow (pDev=0xa5a000, pWin=0x9bdb70, generateEvents=1, confineToScreen=0) at /home/lyudess/Projects/xserver/dix/events.c:900 #6 0x00000000004a94b7 in ScreenRestructured (pScreen=0x8b9d80) at /home/lyudess/Projects/xserver/dix/events.c:1387 #7 0x0000000000502386 in RRScreenSizeNotify (pScreen=0x8b9d80) at /home/lyudess/Projects/xserver/randr/rrscreen.c:160 #8 0x000000000041a83c in update_screen_size (xwl_output=0x8e7670, width=3840, height=2160) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:203 #9 0x000000000041a9f0 in apply_output_change (xwl_output=0x8e7670) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:252 #10 0x000000000041aaeb in xdg_output_handle_done (data=0x8e7670, xdg_output=0x8e7580) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-output.c:307 #11 0x00007ffff50e9d1e in ffi_call_unix64 () at ../src/x86/unix64.S:76 #12 0x00007ffff50e968f in ffi_call (cif=, fn=, rvalue=, avalue=) at ../src/x86/ffi64.c:525 #13 0x00007ffff74f3d8b in wl_closure_invoke () from target:/lib64/libwayland-client.so.0 #14 0x00007ffff74f0928 in dispatch_event.isra () from target:/lib64/libwayland-client.so.0 #15 0x00007ffff74f1be4 in wl_display_dispatch_queue_pending () from target:/lib64/libwayland-client.so.0 #16 0x00007ffff74f200b in wl_display_roundtrip_queue () from target:/lib64/libwayland-client.so.0 #17 0x0000000000418cad in InitInput (argc=12, argv=0x7fffffffd9c8) at /home/lyudess/Projects/xserver/hw/xwayland/xwayland-input.c:2867 #18 0x00000000004a20e3 in dix_main (argc=12, argv=0x7fffffffd9c8, envp=0x7fffffffda30) at /home/lyudess/Projects/xserver/dix/main.c:250 #19 0x0000000000420cb2 in main (argc=12, argv=0x7fffffffd9c8, envp=0x7fffffffda30) at /home/lyudess/Projects/xserver/dix/stubmain.c:34 This appears to be the result of xwl_cursor_confined_to() and xwl_screen_get_default_seat(). While not against protocol, mutter ends up sending xdg_output before wl_seat. xwl_screen_get_default_seat() makes the naïve assumption that we always have a valid seat, we end up returning a pointer to the empty list itself instead of an actual seat and causing ourselves to segfault. So, actually return NULL in xwl_screen_get_default_seat() if the seat list is empty, and skip any pointer confinement processing in xwl_cursor_confined_to() when we don't have a seat setup yet. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit fd21b282dc88936043a23baa4ec053a2811319a7 Author: Jeff Smith Date: Sun Feb 4 23:17:54 2018 -0600 xfree86: Only call PreInit handler if it exists for device DoConfigure() attempts to call the PreInit handler on a device without checking that the handler exists. Check that the PreInit handler exists for a device before attempting to call it. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit e81031f3fda0f8b4237224b13c016759eaa52449 Author: Jeff Smith Date: Sun Feb 4 23:17:53 2018 -0600 xfree86: Allocate sufficienct space for dev2screen array When the dev2screen is sized to xf86NumDrivers in DoConfigure(), subsequent code may attempt to write past the end of the array. Size the dev2screen array to nDevToConfig instead. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 1a24a0ae7b1a7400735530a21ac8c0247723223d Author: Jeff Smith Date: Sun Feb 4 23:17:52 2018 -0600 xfree86: Do not use uninitialized pointer during probe Commits b5dffbb and d75ffcd introduce code in xf86platformProbe() that references a member of xf86configptr. However, when using the "-configure" option, xf86configptr may not be initialized when xf86platformProbe() is called. Avoid referencing a member of xf86configptr if uninitialized. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100405 Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 1e23f03dd5fb6c981ef6d64c084f72fc6820ed71 Author: Jan Beich Date: Fri Jul 7 16:31:48 2017 +0200 shm, xwayland: prefer atomic close-on-exec without O_TMPFILE Signed-off-by: Jan Beich Reviewed-by: Adam Jackson commit 3e3b8a40fee77d1af6ca0c2946ff276d555ddea8 Author: Michal Srb Date: Mon Mar 27 15:03:38 2017 +0300 modesetting: Check for -1 before converting to unsigned int. dri2.c:516:21: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (front->name < 0) Prevents a failure from being ignored. commit a9f68688f313752b1c6dfcbf6bf54f8c41fd811d Author: Michal Srb Date: Mon Mar 27 15:03:37 2017 +0300 xfree86: Silence always true condition warning. xf86pciBus.c:1464:21: warning: comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare] if (pVideo->bus < 256) The code used to be in xf86FormatPciBusNumber and compared parameter which was int, but since b967bf2a it was inlined now it works with uint8_t. commit b75835a4358065378142691bf4a20140981a410f Author: Raimonds Cicans Date: Mon Nov 6 15:26:33 2017 +0200 Xdmx: fix input driver initialization code paths Problem: Xdmx exit with error "(Fatal Error) dmx: Unknown input argument: " if local input driver is specified (example: -input local,usb-kbd,usb-mou). Cause: code block for remote input drivers is placed in code path common for all drivers. Fix: affected code block moved to remote input driver code path part. Signed-off-by: Raimonds Cicans Reviewed-by: Adam Jackson commit cbf09619f2355d14c103eff69aaf191cca614c06 Author: Adam Jackson Date: Mon Nov 6 12:56:05 2017 -0500 meson: Get more xkb configuration from xkbcomp.pc Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 93c16b0524711cd3cd8e32f151c53b5d6522e967 Author: Alexander Volkov Date: Fri Feb 2 15:17:15 2018 +0300 Xephyr: Call forgotten XShmDetach if can't mmap SHM segment Reviewed-by: Adam Jackson commit 6b26a7bda9efa93440734ede0382a3e9a6761365 Author: Alex Goins Date: Mon Jan 8 18:44:25 2018 -0800 randr: Fix rotation check in ProcRRSetScreenSize() ProcRRSetScreenSize() does bounds checking to ensure that none of the CRTCs have a viewport that extends beyond the new screen size. In doing so, it accounts for if the CRTC is rotated 90 or 270 degrees, swapping width and height. However, it does so by testing if crtc->rotation is equal to RR_Rotate_90 or RR_Rotate_270. crtc->rotation is a bit mask, and it includes reflection as well as rotation. If a CRTC is reflected as well as rotated, it will incorrectly fail this test, resulting in incorrect dimensions being used to verify the validity of the new screen size. In some cases, this can cause valid uses of ProcRRSetScreenSize() to fail with BadMatch. This patch fixes the issue by testing that the bits RR_Rotate_90 or RR_Rotate_270 are set, rather than testing for equality. Signed-off-by: Alex Goins Reviewed-by: Michel Dänzer commit 90996f5909aab4bc9aa4011a6a6d0555a7aa3adf Author: Alexander Volkov Date: Wed Jan 31 15:36:36 2018 +0300 Xephyr: Prefer using MIT-SHM FD-passing when possible This makes the shared memory visible only for the Xephyr and the X server to which it is connected. Signed-off-by: Alexander Volkov Reviewed-by: Keith Packard commit 8a220bd83c3e23de7e07d3976bfc1248c38558d4 Author: Alexander Volkov Date: Wed Jan 31 15:36:35 2018 +0300 Xephyr: Extract functions to create/delete shared memory segments Signed-off-by: Alexander Volkov Reviewed-by: Keith Packard commit 510e7d0d869dcc008b1e11e21961f2c1c3cb9cd3 Author: Jeff Smith Date: Tue Dec 26 22:10:52 2017 -0600 os: Always return microseconds from GetTimeInMicros() When a monotonic clock is not available, GetTimeInMicros() returns the time in nanoseconds. Instead, return the time in microseconds, as the name indicates. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 94e7ca6a5667eeb13c078496a07d3e6cf1ec95cc Author: Giuseppe Bilotta Date: Wed Jan 31 17:33:48 2018 +0100 rrmonitor: allocate using the correct type Monitor outputs are of type RROutput, not RRCrtc. (Which are both XID, so this makes no difference in practice, other than being technically correct.) Signed-off-by: Giuseppe Bilotta Reviewed-by: Adam Jackson commit ff410c56bfd6dcdf5d252ef0ba3f4c6fde91774b Author: Jeff Smith Date: Fri Jan 26 06:25:22 2018 -0600 glamor: tidy up some gradient color formulas - Avoid some needlessly complex equations for calculating the color at a point in a gradient field. - Avoid calculating certain values multiple times. - Use similar variable names across the two versions of the get_color function where practical. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 3bd17dff1ac5a4685a5da92a9982f621effee658 Author: Jeff Smith Date: Fri Jan 26 06:25:21 2018 -0600 glamor: remove unused variables in linear gradient shader Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 5815c7b5951fd46d69e5c40144b64e516c7afdbf Author: Jeff Smith Date: Fri Jan 26 06:25:20 2018 -0600 glamor: fix no-reflect case for gradients When compositing a no-reflect gradient, 'before' the gradient is empty, but 'after' the gradient is padded with the final color. Both sides are supposed to be empty. This is fixed by moving the virtual stops to match the first and last client-supplied stops for no-reflect gradients, then causing everything 'before' the initial virtual stop and 'after' the final virtual stop to emit rgba(0,0,0,0). This does not impact gradients using the other reflect modes. Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 3e377e238f7257fd01e56a4a25dfd77e033673e4 Author: Jeff Smith Date: Fri Jan 26 06:25:19 2018 -0600 glamor: fix repeat-reflect case in linear gradient shader If _pt_distance is negative, it causes the final distance to be negative in the repeat-reflect case. Moving the scaling by _pt_distance earlier avoids this problem, and simplifies some equations as a bonus. Bugzilla: https://bugs.freedesktop.org/98508 Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit 9b7b8720ebc8028b14796a66d0a21b002682a83c Author: Jeff Smith Date: Sat Jan 27 00:14:02 2018 -0600 edid: use value returned from pruning duplicate modes xf86PruneDuplicateModes is passed a linked list of modes, and after pruning the duplicate nodes, the new head of the list is returned. If the first element is removed, the head of the list will change and the returned value needs to be assigned. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103722 Thanks: John Lumby Signed-off-by: Jeff Smith Reviewed-by: Adam Jackson commit dd00e5466a0e4ea313d1860824da4123692827ed Author: Adam Jackson Date: Wed Jan 24 15:40:22 2018 -0500 xfree86: Remove broken RANDR disabling logic (v4) The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) v4: Check whether the RANDR private key is initialized before trying to use it to look up the screen private. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 9a416a478c1a29d1aa12c394acf21fb1b4a3aca9 Author: Hawking Zhang Date: Thu Jan 25 18:03:57 2018 +0100 glamor: Add 30bit RGB color format support Signed-off-by: Hawking Zhang [ Michel Dänzer: Adapt to glamor changes since 1.19 ] Signed-off-by: Michel Dänzer Acked-by: Alex Deucher commit fc8b7d05e74a6351df56ad8b17216aeb0dcc016b Author: Olivier Fourdan Date: Thu Jan 25 13:43:09 2018 +0100 xwayland: place a manual redirect on windows Place a manual redirect on windows on xwl_realize_window() and remove it on xwl_unrealize_window() to avoid the X11 window manager removing its redirect before Xwayland has unrealized the window (e.g. if the X11 window manager has terminated unexpectedly) Suggested by Daniel Stone Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 3362422e8413dd9f231cfac50ce0a0862525b1bf Author: Olivier Fourdan Date: Wed Jan 24 17:45:37 2018 +0100 xwayland: remove dirty window unconditionally on unrealize This is a rare occurrence of a crash in Xwayland for which I don't have the reproducing steps, just a core file. The backtrace looks as follow: #0 raise () from /usr/lib64/libc.so.6 #1 abort () from /usr/lib64/libc.so.6 #2 OsAbort () at utils.c:1361 #3 AbortServer () at log.c:877 #4 FatalError () at log.c:1015 #5 OsSigHandler () at osinit.c:154 #6 #7 xwl_glamor_pixmap_get_wl_buffer () at xwayland-glamor.c:162 #8 xwl_screen_post_damage () at xwayland.c:514 #9 block_handler () at xwayland.c:665 #10 BlockHandler () at dixutils.c:388 #11 WaitForSomething () at WaitFor.c:219 #12 Dispatch () at dispatch.c:422 #13 dix_main () at main.c:287 The crash is caused by dereferencing “xwl_pixmap->buffer” in xwl_glamor_pixmap_get_wl_buffer() because “xwl_pixmap” is NULL. Reason for this is because the corresponding pixmap is from the root window and xwayland is rootless by default. This can happen if the window was mapped, redirected, damaged and unredirected immediately, before the damage is processed by Xwayland. Make sure to remove the dirty window from the damage list on unrealize to prevent this from happening. Credit goes to Adam Jackson and Daniel Stone for finding the root cause the issue. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 29a5423abd4bc6cb7bb800924a27b5d90951e408 Author: Jason Gerecke Date: Tue Nov 7 11:09:44 2017 -0800 xwayland: Support for BTN_STYLUS3 kernel events BTN_STYLUS3 has been introduced by the Linux 4.15 kernel to report the status of the third button present on Wacom's new "Pro Pen 3D" stylus. Treat this button like xf86-input-wacom and send a button 8 event ("navigate back") when received from Wayland. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 71348e99a8e6a95542e483b93839168ca8f51f81 Author: Michal Srb Date: Mon Nov 27 09:59:01 2017 +0100 os/inputthread: Force unlock when stopping thread. The inputthread is kept locked all the time while X server's VT is not active. If the X server is terminated while not active, it will be stuck forever in InputThreadFini waiting for the thread to join, but it wouldn't because it is locked. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103782 Signed-off-by: Michal Srb Reviewed-by: Adam Jackson commit d5c23b29487d5ff440abf5ed0beb22c00f21e387 Author: Peter Harris Date: Thu Dec 14 12:21:19 2017 -0500 composite: Propagate damagedDescendants when reparented If a window that is fully covered by an automatic-redirected descendant (even implicitly, eg. via BackingStores) is reparented, the automatic updates could be broken if the new parent is not marked as having damaged descendants. Fix this issue by propagating the damagedDescendants flag whenever a window is reparented. Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit ac138f9b31b0fba00742edbc3326afe66e28099a Author: Rinat Ibragimov Date: Tue Oct 24 01:43:43 2017 +0300 modesetting: setup colormap Signed-off-by: Rinat Ibragimov Reviewed-by: Michel Dänzer commit 5cb330cd5d887b20351604ac080e8b71a4e28be7 Author: Adam Jackson Date: Wed Jan 24 15:24:00 2018 -0500 Revert "xfree86: Remove broken RANDR disabling logic (v3)" Tsk. This broke vesa for me, the rrGetScrPriv in InitOutput will crash if randr's screen private key hasn't been initialized yet. That seems dumb, but let's not leave it broken. This reverts commit c08d7c1cdde6a844338ed4c3645b00bf25843a31. commit c08d7c1cdde6a844338ed4c3645b00bf25843a31 Author: Adam Jackson Date: Tue Jan 23 12:10:52 2018 -0500 xfree86: Remove broken RANDR disabling logic (v3) The only way to get at xf86Info.disableRandR from configuration is Option "RANDR" "foo" in ServerFlags, which probably nobody is using seeing as it's not documented. The other way it could be set is if a screen supports RANDR 1.2, in which case we set it to avoid trying to use the RANDR 1.1 compat code. If the second screen is not 1.2-aware then this would mean we don't do RANDR setup on the second screen at all, which would almost certainly crash the first time you try to do RANDR operations on the second screen. Fix that all by deletion, and just check whether the screen already has RANDR initialized before installing the stub support. If you want to disable RANDR, use the Extensions section of xorg.conf instead. v2: Also remove a now entirely pointless log message, telling you to ignore a line we will no longer print. v3: Explain the fallback path in InitOutput. (Keith Packard) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit da8de2a7f6ab52ef52039b0dc9978260232a34a6 Author: Olivier Fourdan Date: Thu Sep 7 17:43:16 2017 +0200 xwayland: Add optional xdg-output support The xdg-output protocol aims at describing outputs in way which is more in line with the concept of an output on desktop oriented systems. For now it just features the position and logical size which describe the output position and size in the global compositor space. This is however much useful for Xwayland to advertise the output size and position to X11 clients which need this to configure their surfaces in the global compositor space as the compositor may apply a different scale from what is advertised by the output scaling property (to achieve fractional scaling, for example). This was added in wayland-protocols 1.10. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 75408f53d4e203e462b2f13ea4b06264f0e59ad2 Author: Michel Dänzer Date: Wed Jan 24 12:28:38 2018 +0100 xf86XvMCScreenInit: Clear pScreenPriv->dixinfo when freeing pAdapt Fixes double-free later in xf86XvMCCloseScreen, which would generally cause fireworks. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 76732f498f1e73fb081841a04faf068660f3d5c7 Author: Michel Dänzer Date: Wed Jan 24 11:40:50 2018 +0100 Revert "present: Only send PresentCompleteNotify events to the presenting client" This reverts commit 5c00e693631475679c1c2504e03177652ec7de28. It broke the Gallium nine state tracker, which makes PresentPixmap requests on one display connection and processes the corresponding events on another one. The issue that motivated this change is prevented on the client side by https://cgit.freedesktop.org/mesa/mesa/commit/?id=7b0e8264dd21ae05521d08d41fecd84139401fef Bugzilla: https://bugs.freedesktop.org/104678 commit f704620e5db8305c54c6b6981657d801dbf6849b Author: Adam Jackson Date: Wed Jan 10 13:05:43 2018 -0500 glx: Move provider setup interface to glx_extinit.h Keeps us from needing to add glx/ to the include path everywhere, since we can't add it to the dix include path because the header file names conflict with glxproxy. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c2b2f06aa03fe738301ebaa82f220d9cfed5ab1a Author: Adam Jackson Date: Wed Jan 10 13:05:42 2018 -0500 miinitext: General cleanup (v2) This really just wants to be the list of disable booleans and initialization functions, and nothing else. Stop including the protocol headers from extinit.h, remove a stray mention of xgl, and move an XInput declaration to a better place. v2: A bunch of drivers assume they'll get the DPMS tokens implicitly, so add it to globals.h. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 4d5aab66c052795c7f0381a3dfc7293c9a41e441 Author: Keith Packard Date: Thu Dec 21 18:54:39 2017 -0800 xfree86: Disable cursor whenever turning off CRTC during modeset This makes sure the CRTC's cursor is hidden before we hand the CRTC over to some other application. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer Reviewed-by: Alex Deucher commit 29f79bedf2c80241ba4b482db6ead08a5709a982 Author: Keith Packard Date: Thu Dec 21 18:54:37 2017 -0800 randr: Declare incoming property values const RRChangeOutputProperty and RRConfigureOutputProperty should not modify their parameters, and callers may want to pass pointers to fixed data, so declare the value pointers as const in both cases. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a12485ed846b852ca14d17d1e58c8b0f2399e577 Author: Keith Packard Date: Thu Dec 21 18:54:34 2017 -0800 xf86-video-modesetting: Update property values at detect and uevent time We were updating the link-status property when a uevent came in, but we also want to update the non-desktop property, and potentially others as well. We also want to check at detect time in case we don't get a hotplug event. This patch updates every property provided by the kernel, sending changes to DIX so it can track things as well. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 44d5f2eb8a2f92571698adec39ac569b71da5a1b Author: Keith Packard Date: Thu Dec 21 18:54:33 2017 -0800 xf86-video-modesetting: Support new vblank kernel API [v2] drmCrtcGetSequence returns the current vblank sequence and time. drmCrtcQueueSequence queues an event for delivery at a specified vblank sequence. Use these (when available) in preference to drmWaitVBlank. v2: Remove FIRST_PIXEL_OUT_FLAG. This has been removed from the kernel API. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 627dfc2f836a3a1fc6afbd3f2335f88f5ca55ffd Author: Adam Jackson Date: Mon Jan 22 15:43:05 2018 -0500 automake: Fix 'make distcheck' Add some missing meson.builds to the distball, and update the meson build test to work when the distcheck srcdir != builddir. The test build directory will be $(srcdir)/_distcheck_build so srcdir will need to be writable; this shouldn't be too much to ask I hope. Signed-off-by: Adam Jackson commit 2d29daf4c69385513a322002570ec2c41cfc838f Author: Jon Turney Date: Thu Jan 18 16:18:12 2018 +0000 meson.build: Fix hw/xwin build when dependencies are installed in a non-default location Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 514d2c243e01b114de304ea72226bbf8772b1b11 Author: Jon Turney Date: Wed Jan 17 13:43:47 2018 +0000 meson: Use and prefer tirpc for Secure RPC authentication Reviewed-by: Adam Jackson commit f72587ecc7e1dedfb20a999a0e600b83c06a1b29 Author: Pekka Paalanen Date: Wed Dec 20 13:18:45 2017 +0200 xwayland: reduce over-damage If an X11 app draws a little here, some there, and a tiny bit in the opposite corner, using RegionExtents for the damage to be sent to the Wayland compositor will cause massive over-damaging. However, we cannot blindly send an arbitrary number of damage rectangles, because there is a risk of overflowing the Wayland connection. If that happens, it triggers an abort in libwayland-client. Try to be more accurate with the damage by sending up to 256 rectangles per window, and fall back to extents otherwise. The number is completely arbitrary. Signed-off-by: Pekka Paalanen Reviewed-by: Daniel Stone commit a5e9bcad7ad0887f804905b482894b85751519fb Author: Martin Wilck Date: Tue Jan 9 20:33:09 2018 +0100 xfree86: add default modes for 16:9 and 16:10 Improve the user experience for users with wide screens by adding standard 16:9 and 16:10 modes to extramodes, as suggested previously (https://lists.x.org/archives/xorg-devel/2016-February/048866.html). Tested successfully on my laptop. Feedback welcome. See also https://bugs.freedesktop.org/show_bug.cgi?id=37858. Signed-off-by: Martin Wilck Reviewed-by: Adam Jackson commit 528cf6fcee1839cb829652a49c1b1bf45d6a37fb Author: David Weinehall Date: Thu Jan 18 15:12:46 2018 +0200 sync: Fix diffgreater comparison xsync: Fix diffgreater comparison While transitioning from CARD64 to int64, the GreaterThan call was mistakenly transformed into ">=". Part of this was fixed already in commit 8060196a3e80a3c0ad2c0abbe459416821cd366c This patch fixes the remaining issue. Signed-off-by: David Weinehall Reviewed-by: Keith Packard commit 32b42627217917337553121191e9bc3b423b8d99 Author: Keith Packard Date: Tue Jan 16 11:44:37 2018 -0800 modesetting: Use seq instead of msc in ms_queue_vblank failure path When the call to queue a vblank event fails, we need to clean up by removing the user-space queue entry. That is indexed by the local sequence number, not by the kernel vblank count. The call in this case was just passing the wrong value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 15d91df47424127b9e8d0d73692e2196c79dd3fe Author: Adam Jackson Date: Wed Jan 10 12:07:41 2018 -0500 x86emu: Teach the debug code about varargs With -Wformat-nonliteral and a debug build you'd get yelled at here: ../hw/xfree86/x86emu/x86emu/debug.h:188:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] To fix this, rewrite the printf code to actually use varargs and the appropriate format attribute. All callers of DECODE_PRINTF() pass a string with no % specifiers, so we pass that as the argument to printf("%s"). For DECODE_PRINTF2() we just pass the args through. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1274015186a8457c38c3b5dcc9965c62f1d2a7a6 Author: Adam Jackson Date: Mon Jan 8 15:50:29 2018 -0500 build: Remove <*dbm.h> checks Formerly used by the rgb database code, which hasn't been a thing in over a decade. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c3fbe2bbff19c67179f52b8dcd27b576a958fde7 Author: Adam Jackson Date: Mon Jan 8 15:50:28 2018 -0500 meson: Enable SUN-DES-1 auth code Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 4d82a150b2ee29c1025408cdb9ece255452a81bd Author: Adam Jackson Date: Tue Jan 9 11:48:10 2018 -0500 animcur: Handle allocation failure for the animation timer Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner commit de60245e05c0d2528d4ff42557a044387e53315c Author: Adam Jackson Date: Tue Jan 9 10:54:05 2018 -0500 animcur: Fix transitions between animated cursors We weren't cancelling the old timer when changing cursors, making things go all crashy. Logically we could always cancel the timer first, but then we'd have to call TimerSet to re-arm ourselves, and GetTimeInMillis is potentially expensive. Reported-by: https://devtalk.nvidia.com/default/topic/1028172/linux/titan-v-ubuntu-16-04lts-and-387-34-driver-crashes-badly/post/5230967/#5230967 Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner commit a09fbe6c82efc674fc3790c7ffad7df70866a7df Author: Adam Jackson Date: Wed Dec 13 11:44:38 2017 -0500 glx: Stop printing messages about what GLX extensions we enable glxinfo already exists, use it. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov commit 4ed8d5c9463cbef0693d98eb9faf7f9c2222c383 Author: Adam Jackson Date: Tue Nov 14 15:33:54 2017 -0500 ddc: Port some paranoia from drm_edid.c Avoid adding a "standard" mode timing if we've already got a matching detailed timing. To help with that, parse CEA blocks for detailed timings before doing standard or established timings. Signed-off-by: Adam Jackson commit 652913cd9474946bcb29271602bacfd98f46ad0b Author: Adam Jackson Date: Wed Dec 13 14:53:56 2017 -0500 os: Fix a type error in the IPv6 XDMCP code Building with strict-aliasing rightly chirps here: ../os/xdmcp.c: In function ‘XdmcpRegisterConnection’: ../os/xdmcp.c:489:31: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] &((struct sockaddr_in6 *) &address)->sin6_addr.s6_addr[12]; ^~~~~~~~~~~~ We have "const char *address", so &address here is a char ** (i.e., it points to the slot on the stack containing the pointer to the character array passed in as an argument). Casting that to a struct sockaddr_in6 * is wrong, because it means that area of the stack will be reinterpreted as a struct sockaddr_in6. Instead, cast address, not &address. Signed-off-by: Adam Jackson commit da4ffb2f6a0b5a039ae1362ae71e9b47441f90d2 Author: Jon Turney Date: Fri Dec 22 18:44:01 2017 +0000 meson: Correct the option for disabled int10 from 'disabled' to 'false' Fix meson_option.txt to align with the check of the int10 option against 'disabled', not 'false' in hw/xfree/meson.build, to see if it shouldn't be built at all. This keeps everything consistent that 'false' always turns things off. Not noticed before as options weren't validated against choices until meson 0.43 Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit c601c8faf54ff9e3bcbc653421828d71042deef7 Author: Helmut Grohne Date: Thu Dec 21 11:48:15 2017 +0100 build: guess availability of monotonic clock for cross compilation When cross compiling, the value of MONOTONIC_CLOCK would be "cross compiling", because AC_RUN_IFELSE doesn't work. However when enabling wayland, a monotonic clock is required and configure aborts. We change detection of CLOCK_MONOTONIC to degrade it gracefully from a run check to a declaration check in case of cross compilation based on the assumption that most systems will have a monotonic clock and those that don't won't be able to run Xwayland anyway. The trade-off essentially is either "always fail cross compilation" or "produce an unusable Xwayland for unusual platform" and this commit switches to the latter. Signed-off-by: Helmut Grohne Bug-Debian: https://bugs.debian.org/882531 Reviewed-by: Adam Jackson commit a309323328d9d6e0bf5d9ea1d75920e53b9beef3 Author: Peter Hutterer Date: Fri Jan 5 11:58:42 2018 +1000 config: fix NULL value detection for ID_INPUT being unset Erroneous condition caused us to keep going with all devices that didn't have ID_INPUT set. Fixes: 5aad81445c8c3d6 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104382 Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit dbfbe58b94ec07a45fd6170f96bffec55051724e Author: Corentin Rossignon Date: Thu Jan 4 08:34:01 2018 +0100 glamor: Specify GLSL version for xv shader SAMPLE is a GLSL keyword in newer OpenGL version. This fix issue with gnome-shell and playing video using xv Signed-off-by: Corentin Rossignon Bugzilla: https://bugs.freedesktop.org/104405 Reviewed-by: Adam Jackson commit ab54bc295cd05281e55bd4d9c37216c0a929fc83 Author: Adam Jackson Date: Thu Oct 26 15:33:14 2017 -0400 animcur: Stop tracking the last display time in the SpriteInfoRec Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit 094a63d56fbfb9e23210cc9ac538fb198af37cee Author: Adam Jackson Date: Thu Oct 26 15:24:39 2017 -0400 animcur: Run the timer from the device, not the screen This is very slightly more efficient since the callback now doesn't need to walk every input device, instead we know exactly which device's cursor is being updated. AnimCurTimerNotify() gets outdented nicely as a result. A more important side effect is that we can stop using the TimerAbsolute mode and just pass in the relative delay. In AnimCurSetCursorPosition, we no longer need to rearm the timer with the new screen; it is enough to update the device's state. In AnimCurDisplayCursor we need to notice when we're switching from animated cursor to regular and cancel the existing timer. Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit cc3241a712684f8c7147f5688e9ee3ecb5a93b87 Author: Adam Jackson Date: Thu Oct 26 13:53:06 2017 -0400 animcur: Return the next interval directly from the timer callback If the return value is non-zero here, DoTimer() will automatically rearm the timer for the new (relative) delay. 'soonest' is in absolute time, so subtract off 'now' and return that. Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit 3abbdb7318018584a27220737bd92081ce8ee67c Author: Adam Jackson Date: Thu Oct 26 13:40:57 2017 -0400 animcur: Use fixed-size screen private Reviewed-by: Robert Morell Tested-by: Robert Morell Signed-off-by: Adam Jackson commit f615cb62d47cb24ea31718e8226df53ce6651c91 Author: Lukáš Krejčí Date: Sat Dec 30 23:46:45 2017 +0100 Xorg.wrap: Ensure correct ordering of post-install hook The install rule of Xorg.wrap is currently a dependency of the install-data target instead of the install-exec target. The build also uses install-exec-hook to change the ownership and set the SUID bit on the Xorg.wrap binary. The problem is that install-exec-hook is only ordered respective to the install-exec target, the rules of install-data may or may not have been executed. If install-exec-hook runs before the Xorg.wrap binary is in place, a message similar to the following will be present in the build log: chown: cannot access '/pkgdir/usr/lib/xorg-server/Xorg.wrap': No such file or directory make[6]: [Makefile:1151: install-exec-hook] Error 1 (ignored) All that needs to be done is to change the name of the program variable to contain 'exec' for the install rule to depend on the install-exec target. Excerpt from the Automake manual, chapter 12.2 The Two Parts of Install: "Any variable using a user-defined directory prefix with ‘exec’ in the name (e.g., myexecbin_PROGRAMS) is installed by install-exec. All other user-defined prefixes are installed by install-data." https://bugs.freedesktop.org/show_bug.cgi?id=104419 Signed-off-by: Lukáš Krejčí Acked-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 170c95978530f6373bdf4488116902b273f3abf4 Author: Olivier Fourdan Date: Fri Dec 15 16:43:47 2017 +0100 xwayland: avoid race condition on new keymap When the Wayland compositor notifies of a new keymap, for the first X11 client using the keyboard, the last slave keyboard used might still not be set (i.e. “lastSlave” is still NULL). As a result, the new keymap is not applied, and the first X11 window will have the wrong keymap set initially. Apply the new keymap to the master keyboard as long as there's one. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=791383 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c72049530503ebde493cfcd22156105557ea18d3 Author: Konstantin Kharlamov Date: Sun Dec 17 23:23:02 2017 +0300 modesetting: simplify bailing on calloc fail The "done" label restores crtc-> {x,y,rotation,mode}, frees output_id. Doing the calloc() before writing to those values frees us from necessity to restore them if calloc fails, and allows to merge "if (mode)" block. Signed-off-by: Konstantin Kharlamov Signed-off-by: Peter Hutterer commit c2954b16c8730c7ed8441fd8dba25900f3aed265 Author: Tapani Pälli Date: Tue Nov 28 09:23:29 2017 +0200 glx: do not pick sRGB config for 32-bit RGBA visual This fixes blending issues seen with kwin and gnome-shell when 32bit visual has sRGB capability set. Reviewed-by: Adam Jackson Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103699 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103646 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103655 commit cf7517675d988c2d1ff967d6d162a17acbdad466 Author: Keith Packard Date: Wed Aug 2 21:34:52 2017 -0700 xfree86: Hold input_lock across SPRITE functions in VGA arbiter Avoid scrambling the sprite functions wrapper. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101995 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3265d0c81f7a501258fa91e49fcc137714b4af5e Author: Jon Turney Date: Tue Oct 10 13:43:40 2017 +0100 meson: Add dependency on generated code fragments in hw/xwin/glx/ Somehow I'd managed to write this with this dependency missing, so this only works correctly when the generated files already exist and the correct automatic dependencies generated, but fails on a clean build. Including generated files with a .c extension into the sources for a target causes meson to want to compile them (and it seems to be hard to say "make the directory containing this generated file available to include"). So, change the extension of included generated C fragments to .ic Update the autotools build to align. Signed-off-by: Jon Turney commit edda951fa5145a50915611ee0e9e459074117700 Author: Peter Harris Date: Thu Oct 12 16:48:37 2017 -0400 os: Add epoll-like port implementation for Solaris x11perf -noop with 200 xlogos connected is slightly faster with ports: before after Operation ---------- ----------------- -------------------- 18400000.0 19200000.0 (1.04) X protocol NoOperation Acked-by: Keith Packard Signed-off-by: Peter Harris commit 83c04ee6eae1edc80528203fb515425108171cd8 Author: Peter Harris Date: Thu Oct 12 16:48:36 2017 -0400 os: Add epoll-like pollset implementation for AIX AIX's poll only allows FD_SETSIZE entries in the fd list, which is insufficient for expanded MaxClients. As a bonus, x11perf -noop with ~250 xlogos connected is slightly faster with pollset: before after Operation --------- ---------------- -------------------- 5750000.0 5990000.0 (1.04) X protocol NoOperation Signed-off-by: Peter Harris Acked-by: Keith Packard commit bed28300999a07514d741abe5c748adf234e18a6 Author: Adam Jackson Date: Mon Nov 20 15:43:07 2017 -0500 kdrive: remove KdSignalWrapper etc. This no longer does anything useful. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 4353d83f60766824a65f183716616eee8e17bb24 Author: Adam Jackson Date: Mon Nov 20 15:43:06 2017 -0500 xfree86: remove xf86CaughtSignal etc. This no longer does anything useful. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 9c72887939f319e185d2726d9d9a4191b9d12efd Author: Adam Jackson Date: Mon Nov 20 15:43:05 2017 -0500 os: Make OsSignalHandler ask for core dumps for signo != SIGQUIT SIGQUIT is a normal termination request, but any other signal we handle here wants a core. This has the effect of making FatalError's call to AbortServer trigger the if (CoreDump) OsAbort(); path. This will allow us to remove some DDX code that has the same net effect. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 0a255dceb79ee28a88667d5bd23cf989dbf9bed8 Author: Adam Jackson Date: Mon Nov 20 15:43:04 2017 -0500 xfree86: Remove xf86InterceptSignals The only consumer of this is the Linux vm86 backend for int10 (which you should not use), and there all it serves to do is make signals generated by the vm86 task non-fatal. In practice this error appears never to happen, and marching ahead with root privileges after arbitrary code has raised a signal seems like a poor plan. Remove the usage in the vm86 code, making this error fatal. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit 722c8035dcf3ae0b18841066fe4ee030277274bc Author: Adam Jackson Date: Mon Nov 20 15:43:03 2017 -0500 xfree86: Remove xf86InterceptSigIll This was added in ~2004 for the sis driver, to detect whether it could use SSE for memcpy. Charmingly, the code to check whether that feature exists in the server is: #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,13,0) #define SISCHECKOSSSE /* Automatic check OS for SSE; requires SigIll facility */ #endif Which means it has never worked in any modular server release. A less gross way to do this is to check for SSE support with getauxval() or /proc/cpuinfo or similar. Since no driver is using the existing intercept mechanism, drop it. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan Reviewed-by: Dave Airlie commit fe46cbea0f19959d469ca4d1f09be379dc7b1e45 Author: Olivier Fourdan Date: Tue Nov 21 14:45:13 2017 +0100 xwayland: Give up “cleanly“ on Wayland socket errors Xwayland is a pretty standard Wayland client, we want to be able to capture core dumps on crashes. Yet using "-core" causes any FatalError() to generate a core dump, meaning that we would get a core file for all Wayland server crashes, which would generate a lot of false positives. Instead of using FatalError() on Wayland socket errors, give up cleanly to avoid dumping core files when "-core" is used. See also: https://bugzilla.gnome.org/show_bug.cgi?id=790502 and: https://bugzilla.gnome.org/show_bug.cgi?id=789086 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6883ae43eb72fe4e2651c1dca209563323fad2db Author: Tomasz Śniatowski Date: Wed Dec 6 12:16:17 2017 +0100 os: Fix strtok/free crash in ComputeLocalClient Don't reuse cmd for strtok output to ensure the proper pointer is freed afterwards. The code incorrectly assumed the pointer returned by strtok(cmd, ":") would always point to cmd. However, strtok(str, sep) != str if str begins with sep. This caused an invalid-free crash when running a program under X with a name beginning with a colon. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=104123 Signed-off-by: Tomasz Śniatowski Reviewed-by: Michel Dänzer commit aa6651f83c698e8cc40de61aad36c73ca7a6adcf Author: Adam Jackson Date: Thu Jun 8 16:23:12 2017 -0400 xfixes: Remove the CursorCurrent array We're not wrapping all the ways a cursor can be destroyed, so this array ends up with stale data. Rather than try harder to wrap more code paths, just look up the cursor when we need it. Signed-off-by: Adam Jackson commit 3db7707df3cfd8ba62c10d08c7c731ec18ea8ddf Author: Adam Jackson Date: Wed Dec 6 15:12:20 2017 -0500 test: Fix build dependency for bigreq test libxcb-xinput isn't a thing in whichever Ubuntu it is that Travis is using. The test is already optional, make it more so. Signed-off-by: Adam Jackson commit 9f7a9be13d6449c00c86d3035374f4f543654b3f Author: Olivier Fourdan Date: Tue Dec 5 09:59:06 2017 +0100 dix: avoid deferencing NULL PtrCtrl PtrCtrl really makes sense for relative pointing device only, absolute devices such as touch devices do not have any PtrCtrl set. In some cases, if the client issues a XGetPointerControl() immediatlely after a ChangeMasterDeviceClasses() copied the touch device to the VCP, a NULL pointer dereference will occur leading to a crash of Xwayland. Check whether the PtrCtrl is not NULL in ProcGetPointerControl() and return the default control values otherwise, to avoid the NULL pointer dereference. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519533 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 60f4646ae10f0b57790fce46682baa531512b53e Author: Carlos Garnacho Date: Mon Dec 4 16:55:13 2017 +0100 xwayland: Keep separate variables for pointer and tablet foci The tablet/stylus interfaces reused xwl_seat->focus_window, which would leave a somewhat inconsistent state of that variable for wl_pointer purposes (basically, everything) if the pointer happened to lay on the same surface than the stylus while proximity_out happens. We just want the stylus xwl_window to correctly determine we have stylus focus, and to correctly translate surface-local coordinates to root coordinates, this can be done using a different variable. Signed-off-by: Carlos Garnacho Acked-by: Jason Gerecke Tested-by: Olivier Fourdan commit 97ac59b1ed3624f7c04e54dd3e3dadfa46a8f170 Author: Olivier Fourdan Date: Wed Sep 27 18:01:01 2017 +0200 xwayland: Fix non-argb cursor conversion From the bug: "What happens if bits->width is less than 8? :)" Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103012 Signed-off-by: Olivier Fourdan Reviewed-by: Emil Velikov Reviewed-by: Daniel Stone commit a4c1e290824d0e40191ad26019b705f61c11e113 Author: Adam Jackson Date: Tue Nov 14 15:15:03 2017 -0500 glx: Implement GLX_EXT_no_config_context (v2) Only enabled for the DRI backends at the moment. In principle WGL/CGL could support this - it's sort of implied by GL 3.0 support - but in practice their implementations back GLX drawables with native drawables (and not anonymous FBOs), so they would need either a corresponding window system binding extension or significant implementation work. v2: Require that the two screen numbers match, per v4 of spec. Khronos: https://github.com/KhronosGroup/OpenGL-Registry/pull/102 Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit f0fffa926a5771e0e604fe9a48178b0514ca5d41 Author: Adam Jackson Date: Tue Nov 14 15:15:02 2017 -0500 glx: Prepare __glXGetDrawable for no-config contexts Any proper (GLX 1.3) drawable will already have a bound config, but if we're doing the GLX 1.2 thing of making a Window current, we need to infer the config from the window's Visual. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 5d667df6ea1634191a26f9a7c26bc883701d62b0 Author: Adam Jackson Date: Tue Nov 14 15:15:01 2017 -0500 glx: Fix glXQueryContext for GLX_FBCONFIG_ID and GLX_RENDER_TYPE (v2) Just never filled in, oops. Seems to have gone unnoticed because normally glXQueryContext simply returns the values filled in by the client library when the context was created. The only path by which you normally get to a GLXQueryContext request is glXImportContext, and then only if the context is already indirect. However, that's a statement about Mesa's libGL (and anything else that inherited that bit of the SGI SI more or less intact). Nothing prevents a mischeivous client from issuing that request of a direct context, and if they did we'd be in trouble because we never bothered to preserve the associated fbconfig in the context state, so we'd crash looking up GLX_VISUAL_ID_EXT. So let's fix that too. v2: Fixed missing preservation of the config in DRI2 (Eric Anholt) Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 78b2ce1410dda758537d52398223ca9b757883bc Author: Daniel Martin Date: Mon Nov 20 10:47:43 2017 +0100 modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN CMAP_LOAD_EVEN_IF_OFFSCREEN has been encapsulated since the import of xf86-video-modesetting into the tree. Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit d563443381142fbc0b102422d7e7389bf3621331 Author: Daniel Martin Date: Mon Nov 20 10:47:42 2017 +0100 modesetting: Remove unused define DRV_ERROR Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit 6804875662363764683a86c1614e4cf3cc70a20a Author: Daniel Martin Date: Mon Nov 20 10:47:41 2017 +0100 modesetting: Reset output_id if drmModeGetConnector failed If drmModeGetConnector() fails in drmmode_output_detect(), we have to reset the output_id to -1 too. Yet another spot leading to a potential NULL dereference when handling the mode_output member as output_id was != -1. Though, this case should be very hard to hit. Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit e20b1016de22e893d5468960988ddd5677c11d98 Author: Daniel Martin Date: Mon Nov 20 10:47:40 2017 +0100 modesetting: Fix log msg if pixmap creation failed Add a missing new-line character and make the message more verbose than "Failed". Reviewed-by: Adam Jackson Signed-off-by: Daniel Martin commit 02981fe1a844e101c81037df79fc147f217f3bf9 Author: Daniel Martin Date: Mon Nov 20 10:47:39 2017 +0100 xfree86: Fix set but not used warnings in lnx_platform Those warnings are generated, when building without systemd support: ../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’: ../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ ../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable] int major, minor, fd; ^~~~~ In this case the functions are macros, which don't use theese arguments. v2: Add comments, why the warnings appear. Suggested by Emil Velikov Reviewed-by: Emil Velikov Signed-off-by: Daniel Martin commit 918afeecbc63d70413e222efdb2ac4cfb16eae9e Author: Daniel Martin Date: Mon Nov 20 10:47:38 2017 +0100 os/xdmcp: Honour -once when session is dead Terminate a dead session when -once was passed. Don't restart it. Signed-off-by: Daniel Martin Reviewed-by: Walter Harms commit 559954aaa8d811a22cf918cc16a7d618e12201a0 Author: Michel Dänzer Date: Mon Oct 2 11:33:43 2017 +0200 present: Only send PresentCompleteNotify events to the presenting client We were sending the events to all clients listening for them on the window. But clients can get confused by events from another client, and I can't imagine any case where receiving events from other clients would be required. v2: * Also restrict events sent to additional windows to the presenting client * Don't shorten line lengths Reviewed-by: Keith Packard commit fc7fb5bbe1c8f787e53500b9a2ca4af815f310d1 Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:21 2017 +0100 randr: free crtc->outputs on destroy Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit 16381d186e7c791031392ed8afcfd33009854e9e Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:20 2017 +0100 randr: always realloc crtcs and outputs When the last crtc (resp. output) is destroyed, the rrScrPriv crtcs (resp. outputs) fields do not get cleared, which can lead to a situation where the private's numCrtcs (resp. numOutputs) field is zero, but the associated memory is still allocated. Just checking if numCrtcs (resp. numOutputs) is zero is thus not a good criteria to determine whetehr to use a realloc or a malloc. Since crtcs (resp. outputs) are NULL-initialized anyway, relying on numCrtcs (resp. numOutputs) is actually unnecessary, because reallocation of a NULL ptr is equivalent to a malloc anyway. Therefore, just use realloc() unconditionally, and ensure that the fields are properly initialized. Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit fb5ee77b91a93e27801006be8ee34d27984e7fa6 Author: Giuseppe Bilotta Date: Thu Nov 9 10:21:19 2017 +0100 randr: rrGetScreenResources: initialize memory Similarly to bb766ef11227bd8c71ac65845d1930edd0eda40d, ensure that the extra padding is set to 0. Reviewed-by: Adam Jackson Signed-off-by: Giuseppe Bilotta commit 307c124d6bcfe26057767b2c0990dc9ac66b9c93 Author: Adam Jackson Date: Tue Nov 14 15:59:35 2017 -0500 glx: Only flush indirect contexts in MakeCurrent (v2) If the context is direct none of the GL commands were issued by this process, the server couldn't flush them even if it wanted to. v2: Fix embarassingly obvious boolean inversion (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 66e8eaa456a0f200c0649c56a2e34914daa88065 Author: Adam Jackson Date: Thu Nov 2 16:10:50 2017 -0400 glamor: Drop the non-VAO rendering path GLES spells this extension as GL_OES_vertex_array_object, but it is functionally equivalent to the GL_ARB version. Mesa has supported both since 9.0, let's go ahead and require it. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit dbda03d5d15bec8fdff64bc8545875c39da81777 Author: Adam Jackson Date: Mon Nov 6 16:41:14 2017 -0500 glx: Drop references to This header is a truly ancient remnant of the SGI SI code, which used the same struct for visual/fbconfig state on both sides of the wire. We're not using this struct ourselves so let's stop depending on the header. Signed-off-by: Adam Jackson commit eafcd009f1fe3e554219a428237ef1c71d1ba506 Author: Adam Jackson Date: Tue Oct 24 14:33:19 2017 -0400 xres: Return the atom naming the type, not its internal type number Signed-off-by: Adam Jackson commit 68556d74b49e99d3490166c446079f7d5de26ca4 Author: Hector Martin Date: Wed Nov 15 03:12:31 2017 +0900 edid: fix off-by-one error in CEA mode numbering The CEA extension short video descriptors contain the VIC, which starts at 1, not 0. Reviewed-by: Adam Jackson Signed-off-by: Hector Martin commit 9bd5a198dc5383d0d2a1e28f7aa4270132eca5db Author: Adam Jackson Date: Tue Jul 11 15:37:07 2017 -0400 glamor: Remove unused glamor_create_screen_resources Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 081675f7ffda0cce20b395874d6e5755fb6600a0 Author: Adam Jackson Date: Fri Jul 14 14:52:01 2017 -0400 glamor: Un-inline glamor_[gs]et_screen_private text data bss dec hex filename 2134764 45210 128704 2308678 233a46 build/hw/kdrive/ephyr/Xephyr.before 2129972 45210 128704 2303886 23278e build/hw/kdrive/ephyr/Xephyr.after Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 6dff5e5d49a21bc749e44f0e8cb390690ece750d Author: Adam Jackson Date: Mon Jul 10 10:56:58 2017 -0400 xwayland: Stop printing the EGL version It doesn't matter, none of this matters. Acked-by: Olivier Fourdan Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit c57f63829f0077b5a3e5968f8405e087a4490485 Author: Adam Jackson Date: Wed Sep 13 15:44:15 2017 -0400 dmx: Use noGlxExtension like other DDXes Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit fd0eafb18426da14601d5c0d0a50092c49a7aff8 Author: Adam Jackson Date: Mon Nov 6 16:07:41 2017 -0500 glx: Fix typos that break GLX_ARB_context_flush_control The trailing \n are just wrong here, __glXEnableExtension wants a string without them. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer Reviewed-by: Emil Velikov commit 2e7f790b5770589ae2f97ee363ecd33fdb362c24 Author: Adam Jackson Date: Mon Nov 6 15:25:34 2017 -0500 dix: Remove ffs.c Your libc has ffs, I promise. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 4d15a2645f00995618d8687edf1fb0f4b2316ace Author: Adam Jackson Date: Mon Nov 6 15:25:33 2017 -0500 os: Remove mffs() This was always wide enough to work on an fd_mask ("mask" ffs presumably). We don't operate on fd_masks anymore, so this can go. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 4b0a3cbab131eb453e2b3fc0337121969258a7be Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:31 2017 +0100 glx: free fbconfigs on destroy Reviewed-by: Eric Engestrom Signed-off-by: Giuseppe Bilotta commit bb766ef11227bd8c71ac65845d1930edd0eda40d Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:29 2017 +0100 randr: ProcRRGetOutputInfo: initialize memory Running Xephyr under valgrind reveals that we're sending some uninitialized memory over the wire (particularly, the leftover padding that comes from rounding extraLen to the next 32-bit multiple). Solve by calloc()ing the memory instead of malloc()ing (the alternative would be to memset just the padding, but I'm not sure it's more convenient.) Signed-off-by: Giuseppe Bilotta Reviewed-by: Adam Jackson commit 6828645916505a5925db5c2c2e816fee4e1050e5 Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:28 2017 +0100 Xephyr: free driverPrivates on Fini Reviewed-by: Eric Engestrom commit b2167015043a458e9cf93b827b43eb5b7c552ce9 Author: Giuseppe Bilotta Date: Sat Nov 4 23:06:27 2017 +0100 xkb: initialize tsyms This fixes some “Conditional jump depends on uninitialized value(s)” errors spotted by valgrind. Reviewed-by: Eric Engestrom Signed-off-by: Giuseppe Bilotta commit 2dafa1bdafe583587431a5f6ebee6ec371c61a8d Author: Giuseppe Bilotta Date: Thu Nov 2 21:27:59 2017 +0100 dix/window: fix typos Reviewed-by: Adam Jackson commit f84e59a4f474d22860bac8aec2947798a86db69b Author: Thomas Hellstrom Date: Tue Sep 26 17:28:12 2017 -0700 glx: Duplicate relevant fbconfigs for compositing visuals Previously, before GLX_OML_swap_method was fixed, both the X server and client ignored the swapMethod fbconfig value, which meant that, if the dri driver thought it exposed more than one swapMethod, it actually just exported a duplicated set of fbconfigs. When fixing GLX_OML_swap_method and restricting the choice for built-in visuals to a single swap method that meant we didn't have that many fbconfigs to choose from when pairing the compositing visual with an fbconfig, resulting in the fbconfig paired with the compositing visual becoming too restrictive for some applications, (at least for kwin). This problem would also happen if the dri driver only exposed a single swap method to begin with. So, to make sure the compositing visual gets a good enough fbconfig, duplicate fbconfigs that are suitable for compositing visuals and make sure these duplicated fbconfigs can be used only by compositing visuals. For duplicated fbconfigs not paired with a compositing visual, construct new compositing visuals, making compositing clients able to choose visuals / fbconfig more adapted to their needs. This is in some sense equivalent to adding a new "TRUECOLOR_COMPOSITING" GLX visualtype. Fixes: 4486d199bd3b ("glx: Fix visual fbconfig matching with respect to swap method") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102806 Signed-off-by: Thomas Hellstrom Tested-By: Nick Sarnie Tested-by: Fredrik Höglund Reviewed-by: Adam Jackson commit 30f4d440ebc3517fdcc1d3c6a422a8fbf3af1f23 Author: Eric Anholt Date: Tue Oct 31 12:22:31 2017 -0700 xkb: Print the xkbcomp path being executed when we fail to compile. I don't know how many times I've had a broken server due to a bad directory to xkbcomp, and only finding the whole path has shown me where I went wrong. Reviewed-by: Peter Hutterer commit 14af8bee242fe40af0e91c61465d6720aaa60e97 Author: Eric Anholt Date: Mon Oct 9 17:14:32 2017 -0700 test: Add a test for the overflow bug in bigreqs. The failing struct comes from the python test written by Michal Srb . v2: Use a drawable (root window) and gc, so that PolyLines hopefully actually tries processing things. However, the request seems to process successfully so the poll() just stalls out. However, this does let us distinguish between detecting the bigrequests error and not, at least. v3: Clean up the description of what we expect the poll() call to do. v4: Use XI2 instead of PolyLine to trigger a predictable error. We know the server replies with BadValue for a zero num_masks argument. So if we send a bigreq with a num_masks 0 and a length 0, we can just check whether we get killed (good) or a BadValue (bad). It doesn't test for specific memory overflows or crashes, but based on the assumption that we shouldn't look at *any* BigReq of size 0, this seems to be sufficient. Signed-off-by: Eric Anholt Signed-off-by: Peter Hutterer commit 5aad81445c8c3d6b7b30d503cfe26027fa482870 Author: Peter Hutterer Date: Tue Sep 26 15:21:59 2017 +1000 config/udev: consider ID_INPUT_FOO=0 as 'unset' Historically we didn't need to care about this case but more devices are having invalid types set and they cannot be unset with a hwdb entry (which doesn't handle the empty string). Allow for "0" to mean "unset" because anything else would be crazy anyway. Signed-off-by: Peter Hutterer commit d5379b350fb63e42e604361c21ad9832b4c791b9 Author: Daniel Martin Date: Fri Oct 27 16:11:56 2017 +0200 Use ARRAY_SIZE all over the tree Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with the ARRAY_SIZE macro from dix.h when possible. A semantic patch for coccinelle has been used first. Additionally, a few macros have been inlined as they had only one or two users. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 15a32ee5d1fffa171bb05af9a0e5b472e4af1488 Author: Daniel Martin Date: Fri Oct 27 16:11:55 2017 +0200 test: signal-logging: Fix looping signed number tests unsigned_tests[] was used to compute the amount of signed numbers to test. Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 0bcc65f2bf479c6a74ac70bb5b5181d6834dded6 Author: Daniel Martin Date: Fri Oct 27 16:11:54 2017 +0200 test: input: Fix used uninitialized warning in dix_event_to_core input.c: In function ‘dix_event_to_core’: ../include/inputstr.h:61:55: warning: ‘*((void *)&ev+80)’ is used uninitialized in this function [-Wuninitialized] #define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7))) ^~ Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 04a305121fbc08ecc2ef345ee7155d6087a43fd1 Author: Daniel Martin Date: Fri Oct 27 16:11:53 2017 +0200 modesetting: Fix potential buffer overflow If one misconfigures a ZaphodHeads value (more than 20 characters without a delimiter), we get an overflow of our buffer. Use xstrtokenize() instead of writing/fixing our own tokenizer. Signed-off-by: Daniel Martin Reviewed-by: Eric Engestrom commit 2230e6c8af92b041821eee0ea6210eda82c74106 Author: Adam Jackson Date: Tue Oct 24 14:28:34 2017 -0400 glamor: Unconditionalize GLAMOR_TEXTURED_LARGE_PIXMAP Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1edac5c1ceb8b21af45b20397ff64177ad22466c Author: Adam Jackson Date: Tue Oct 24 14:28:33 2017 -0400 glamor: Unconditionalize GLAMOR_PIXMAP_DYNAMIC_UPLOAD Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 13409b91b1936330dbf19bacefa4b48d0b6843b8 Author: Adam Jackson Date: Tue Oct 24 14:28:32 2017 -0400 glamor: Unconditionalize GLAMOR_GRADIENT_SHADER Effectively always true anyway. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 266d9868ca1cf77b7d315d607b515f081a9f45c3 Author: Alex Goins Date: Thu Oct 19 20:02:30 2017 -0700 xf86-video-modesetting: Fix ms_queue_vblank(flags = MS_QUEUE_RELATIVE) Change 677c32bc refactored all usages of drmWaitVBlank() into a helper function, ms_queue_vblank(). ms_queue_vblank() takes in an MS_QUEUE_RELATIVE flag to indicate that the sequence number is relative rather than absolute, but still treats the actual sequence number as absolute, passing it through ms_crtc_msc_to_kernel_msc() unconditionally before calling drmWaitVBlank(). ms_crtc_msc_to_kernel_msc() works by subtracting a vblank offset from the provided sequence number, which only makes sense for absolute sequence numbers. In the case of PRIME Sync, drmmode_SharedPixmapPrsentOnVBlank() passes in 1, which results in a large negative vblank offset. After subtracting, we're left with a relative sequence number of 100,000+, i.e. wait for 100,000+ vblanks... In the relative case we want to pass in the sequence number unmodified. Simply add a check to do this. Signed-off-by: Alex Goins Reviewed-by: Keith Packard commit 68d95e759f8b6ebca6bd52e69e6bc34cc174f8ca Author: Alex Goins Date: Tue Oct 24 18:39:13 2017 -0700 ramdac: Check ScreenPriv != NULL in xf86ScreenSetCursor() Similar to change cba5a10f, xf86ScreenSetCursor() would dereference ScreenPriv without NULL checking it. If Option "SWCursor" is specified, ScreenPriv == NULL. Without this fix, it is observed that setting Option "SWCursor" "on" on the modesetting driver in a PRIME configuration will segfault the server. It is important to return success rather than failure in the instance that ScreenPriv == NULL and pCurs == NullCursor, because otherwise xf86SetCursor() can fall into infinite recursion: xf86SetCursor(pCurs) calls xf86ScreenSetCursor(pCurs), and if FALSE, calls xf86SetCursor(NullCursor). If xf86ScreenSetCursor(NullCursor) returns FALSE, it calls xf86SetCursor(NullCursor) again and this repeats forever. Signed-off-by: Alex Goins Reviewed-by: Dave Airlie commit 04163fe8c66ae6683a1384fd1bd91ea85f9892ee Author: Adam Jackson Date: Tue Oct 24 13:03:09 2017 -0400 meson: Use [ true, false, auto ] for tristate values For symmetry with the boolean options. I really do not want to care whether an option is a tristate if I'm trying to set it explicitly. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit c2c6e9e68a8815420233c996acdd29ba572b1f0e Author: Adam Jackson Date: Tue Oct 24 14:38:13 2017 -0400 dix: Don't track the XKB client versions in the ClientRec XKB stores some stuff in the ClientRec that, style-wise, should probably be in a client private. vMinor tracks the client's idea of the XKB minor version, but is never read, we can just nuke it. vMajor is only used for a bug-compat workaround for X11R6.0-vintage clients. We're only using though (1<<4) for xkbClientFlags in the protocol, so we can pack that field down to a u8 and store the bug-compat flag there. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit bc5fb8c0928498c32dc33680d40d50e6db5879b6 Author: Adam Jackson Date: Tue Oct 24 14:38:12 2017 -0400 dix: Don't vary the ClientRec ABI at build time Just no. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 0c3ad9d1e06294b4f66717798afa4f5dfa505469 Author: Adam Jackson Date: Mon Oct 23 15:34:26 2017 -0400 travis: Bump linux Dockerfile to v7 for new meson Signed-off-by: Adam Jackson commit 4d53e30651c0fe5f7be38ae8529fa49846d39549 Author: Lyude Paul Date: Mon Oct 23 16:21:19 2017 -0400 meson: Don't use '' in link_with, ever String arguments as elements in the array passed to the link_with argument in meson's executable() functions are not valid and will end up causing the build file generation to file. This actually ended up exposing a bug in meson that caused it not to report where in the meson.build file it was failing: https://github.com/mesonbuild/meson/pull/2527 The proper way to have a variable that can contain either an empty link target or an actual link target is: some_target = [] if some_cond some_target = static_library(...) endif This way if some_cond is False, some_target gets set to [], gets passed to executable() in the link_with array, and then gets removed by array flattening. This also unbreaks Xwayland builds with -Dglx=false, the thing that originally made me notice this. Signed-off-by: Lyude Paul Reviewed-by: Jon Turney commit 5893e72a20ffa5cfcd6d0c7c5c934b92546d76c3 Author: Jon Turney Date: Tue Oct 24 12:07:08 2017 +0100 travis: Fix OSX build Turn off homebrew autoupdating before installing ccache, to avoid: /usr/local/Homebrew/Library/Homebrew/brew.rb:12:in `
': Homebrew must be run under Ruby 2.3! You're running 2.0.0. (RuntimeError) Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit f44935cdb7321af242ce9f242975f096807b97f7 Author: Daniel Martin Date: Mon Oct 23 10:31:21 2017 +0200 modesetting: Use helper to fetch drmModeProperty(Blob)s Replace the various loops to lookup drmModeProperty(Blob)s by introducing helper functions. Signed-off-by: Daniel Martin commit 6abdb54a11dac4e8854ff94ecdcb90a14321ab31 Author: Daniel Martin Date: Mon Oct 23 10:31:20 2017 +0200 modesetting: Fix leak of tile_blob in drmmode_output_destroy And drmModeFreePropertyBlob() can handle NULL pointers, no need to check edid_blob. Signed-off-by: Daniel Martin commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad Author: Daniel Martin Date: Fri Oct 20 10:05:35 2017 +0200 modesetting: Check crtc before searching link-status property No need to lookup the link-status property if we don't have a crtc. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 8c455db0ebb6e5313ca81428bb6dd75ef12aaa15 Author: Daniel Martin Date: Fri Oct 20 10:05:34 2017 +0200 modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD XF86_PDEV_SERVER_FD is defined since: commit 5fb641a29bfb4a33da964e1e9af523f3472015c6 Author: Hans de Goede Date: Mon Jan 13 12:03:46 2014 +0100 hotplug: Extend OdevAttributes for server-managed fd support ifdef'ing for it is a leftover from the external xf86-video-modesetting. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 66d8cbf8ce9285a8771118e46daa44faa73ad847 Author: Daniel Martin Date: Fri Oct 20 10:05:33 2017 +0200 modesetting: Fix warning of unused variable if not GLAMOR_HAS_GBM ../hw/xfree86/drivers/modesetting/driver.c: In function ‘redisplay_dirty’: ../hw/xfree86/drivers/modesetting/driver.c:586:20: warning: unused variable ‘ms’ [-Wunused-variable] modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen)); Move the variable ms into #ifdef GLAMOR_HAS_GBM, where it is used. Signed-off-by: Daniel Martin Reviewed-by: Adam Jackson commit 6d7e1d1de06336c9b49a253810afda8ac4e9f7b2 Author: Lyude Paul Date: Fri Oct 13 15:44:32 2017 -0400 meson: Don't forget to define DEBUG! Changes since v2: - Don't enable by default for debugoptimized builds Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 0debe011901b87f686e2a76ce5edc150b04bf9d1 Author: Lyude Paul Date: Fri Oct 13 15:44:31 2017 -0400 meson: Silence -Wformat-nonliteral for x86emu Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit cbca18c5516084ee540255df52e116209f1c1cbe Author: Lyude Paul Date: Fri Oct 13 15:44:30 2017 -0400 x86emu: Fix type conversion warnings on x86_64 with DEBUG Warnings come from the fact that PRIx32 is not used for printing 32 bit values instead of "%lx", and "%lx" evaluates to a 64 bit long on 64 bit systems while PRIx32 always evaluates to the right type for the respective arch. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit 01470ce0a9628abc8af4fe7b960f0d1eced8cd46 Author: Lyude Paul Date: Fri Oct 13 15:44:29 2017 -0400 fbdevhw: Fix inconsistent #if DEBUG usage fbdevhw is the only file in X's source that actually uses #if DEBUG to check for debugging instead of #ifdef DEBUG. This is contrary to everything else that checks the DEBUG macro in the source, so let's make it consistent and in turn, make our meson files a little simpler. Signed-off-by: Lyude Paul Reviewed-by: Adam Jackson commit c66d65a645332bbf055a1c49f092636139eb9285 Author: Eric Anholt Date: Wed Jul 26 16:54:40 2017 -0700 glamor: Use GL_MESA_tile_raster_order for overlapping blits. Improves Raspberry Pi 3 x11perf -copywinwin500 from ~480/sec to ~700/sec. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 885636b7d42b3c7b151fc386d358184db004ce45 Author: Nikolay Martynov Date: Wed Sep 13 23:23:13 2017 -0400 XShmGetImage: fix censoring It looks like offsets calculated during image censoring are wrong. This results in black (empty) images returns. This fix is very similar to 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f that was applied to XGetImage Visually this fixes chromium/firefox window sharing in multiscreen configurations - without this patch most of the windows on 'secodnary' screens are black. This also should fix https://bugs.freedesktop.org/show_bug.cgi?id=101730. Signed-off-by: Nikolay Martynov Reviewed-by: Adam Jackson commit a10b4fcdc016d7ac56e5bb35f7f844af41016efe Author: Jon Turney Date: Tue Oct 10 14:28:33 2017 +0100 meson: Fix linkage of loadable modules for PE/COFF For the loadable modules it makes sense to build for PE/COFF targets, link those loadable modules with the import library for the Xorg executable, so that symbols provided by the executable can be satisfied at link time (as required by PE/COFF). Since this uses the syntax of using the returned build target object from an executable() with an implib: kwarg to link_with:, introduced in meson 0.42 and a syntax error with older meson, also update the minimum meson version which we require in project() to that. Signed-off-by: Jon Turney commit d43b1ca852562882fc6930afc36a982801e3be87 Author: Jon Turney Date: Tue Oct 10 14:28:32 2017 +0100 meson: Fix underlinkage of shadow loadable module Future work: probably some other modules are underlinked? Signed-off-by: Jon Turney commit 10cba7d54668698741510374ee63dec7a3cc3647 Author: Lyude Paul Date: Wed Oct 11 18:03:45 2017 -0400 meson: Add xkb_bin_dir option Now that we can actually configure all of the directories xkb uses for finding things, we can (finally, but only with meson) finally make it so that with the correct meson configuration the Xserver will "just work" without any additional changes to the installation prefix after building. For the people like me who have since scripted this part out of their build process and forgotten about it, building and installing the X server into a non-standard prefix has always required the following (or something else that makes sure that X has a valid xkbcomp configuration) commands be run right after doing the installation: # start in root of prefix you installed X to mkdir -pv share/X11/xkb/rules ln -s /usr/share/X11/xkb/rules/evdev share/X11/xkb/rules/ rm -f bin/xkbcomp ln -s /usr/bin/xkbcomp bin/ The one last piece of getting rid of this post-install junk is making sure that we can control the directory that X uses for finding the xkbcomp binary from meson so we can point it at the system provided xkbcomp (/usr/bin/xkbcomp or similar). So, this patch adds a configuration option for controlling this called xkb_bin_dir. Signed-off-by: Lyude Paul Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone commit b747da5e25be944337a9cd1415506fc06b70aa81 Author: Nathan Kidd Date: Fri Jan 9 10:15:46 2015 -0500 Unvalidated extra length in ProcEstablishConnection (CVE-2017-12176) Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 4ca68b878e851e2136c234f40a25008297d8d831 Author: Nathan Kidd Date: Fri Jan 9 10:09:14 2015 -0500 dbe: Unvalidated variable-length request in ProcDbeGetVisualInfo (CVE-2017-12177) v2: Protect against integer overflow (Alan Coopersmith) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 859b08d523307eebde7724fd1a0789c44813e821 Author: Nathan Kidd Date: Wed Dec 24 16:22:18 2014 -0500 Xi: fix wrong extra length check in ProcXIChangeHierarchy (CVE-2017-12178) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit d088e3c1286b548a58e62afdc70bb40981cdb9e8 Author: Nathan Kidd Date: Fri Jan 9 10:04:41 2015 -0500 Xi: integer overflow and unvalidated length in (S)ProcXIBarrierReleasePointer [jcristau: originally this patch fixed the same issue as commit 211e05ac85 "Xi: Test exact size of XIBarrierReleasePointer", with the addition of these checks] This addresses CVE-2017-12179 Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Jeremy Huddleston Sequoia Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 1b1d4c04695dced2463404174b50b3581dbd857b Author: Nathan Kidd Date: Sun Dec 21 01:10:03 2014 -0500 hw/xfree86: unvalidated lengths This addresses: CVE-2017-12180 in XFree86-VidModeExtension CVE-2017-12181 in XFree86-DGA CVE-2017-12182 in XFree86-DRI Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 55caa8b08c84af2b50fbc936cf334a5a93dd7db5 Author: Nathan Kidd Date: Fri Jan 9 11:43:05 2015 -0500 xfixes: unvalidated lengths (CVE-2017-12183) v2: Use before swap (Jeremy Huddleston Sequoia) v3: Fix wrong XFixesCopyRegion checks (Alan Coopersmith) Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Jeremy Huddleston Sequoia Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit cad5a1050b7184d828aef9c1dd151c3ab649d37e Author: Nathan Kidd Date: Fri Jan 9 09:57:23 2015 -0500 Unvalidated lengths v2: Add overflow check and remove unnecessary check (Julien Cristau) This addresses: CVE-2017-12184 in XINERAMA CVE-2017-12185 in MIT-SCREEN-SAVER CVE-2017-12186 in X-Resource CVE-2017-12187 in RENDER Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau Signed-off-by: Nathan Kidd Signed-off-by: Julien Cristau commit 9c23685009aa96f4b861dcc5d2e01dbee00c4dd9 Author: Michal Srb Date: Fri Jul 7 17:04:03 2017 +0200 os: Make sure big requests have sufficient length. A client can send a big request where the 32B "length" field has value 0. When the big request header is removed and the length corrected, the value will underflow to 0xFFFFFFFF. Functions processing the request later will think that the client sent much more data and may touch memory beyond the receive buffer. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit c2f2b25ab55c67f9f3ad07c02fa746eae7c61196 Author: Louis-Francis Ratté-Boulianne Date: Wed Sep 27 01:19:58 2017 -0400 present: Check the whole exec queue on event Later events are sometimes added in front of the queue (e.g. if page flipping fails) so we need to check the whole queue on event. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Michel Dänzer commit 677c32bcda98a96585bb1f66b57e0755a157b772 Author: Keith Packard Date: Fri Sep 29 08:48:33 2017 -0700 xf86-video-modesetting: Add ms_queue_vblank helper [v3] This provides an API wrapper around the kernel interface for queueing a vblank event, simplifying all of the callers. v2: Fix missing '|' in computing vbl.request.type v3: Remove spurious bit of next patch (thanks, Michel Dänzer) Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 94f11ca5cf011ef123bd222cabeaef6f424d76ac Author: Keith Packard Date: Thu Jul 27 10:08:32 2017 -0700 xkb: Handle xkb formated string output safely (CVE-2017-13723) Generating strings for XKB data used a single shared static buffer, which offered several opportunities for errors. Use a ring of resizable buffers instead, to avoid problems when strings end up longer than anticipated. Reviewed-by: Michal Srb Signed-off-by: Keith Packard Signed-off-by: Julien Cristau commit eaf1f72ed8994b708d94ec2de7b1a99f5c4a39b8 Author: Michal Srb Date: Thu Jul 27 11:54:26 2017 +0200 xkb: Escape non-printable characters correctly. XkbStringText escapes non-printable characters using octal numbers. Such escape sequence would be at most 5 characters long ("\0123"), so it reserves 5 bytes in the buffer. Due to char->unsigned int conversion, it would print much longer string for negative numbers. Reviewed-by: Keith Packard Signed-off-by: Julien Cristau commit b95f25af141d33a65f6f821ea9c003f66a01e1f1 Author: Michal Srb Date: Fri Jul 28 16:27:10 2017 +0200 Xext/shm: Validate shmseg resource id (CVE-2017-13721) Otherwise it can belong to a non-existing client and abort X server with FatalError "client not in use", or overwrite existing segment of another existing client. Signed-off-by: Julien Cristau commit db465bae533f85e7f900deb96efecc831c9d550b Author: Adam Jackson Date: Wed Sep 27 14:31:39 2017 -0400 meson: Port default warning flags from xorg-macros Well, almost all of them. No -Wdeclaration-after-statement because that's legal in C99, and in the limited ways we use it, more readable. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 40c90ead044aa3fab79280d7a5ca5ad8e390029e Author: Adam Jackson Date: Wed Sep 27 14:31:38 2017 -0400 meson: Check for HAVE_TYPEOF Without this, exa's gc swap macros trigger gcc's -Wdiscarded-qualifiers. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 712b02ec72b98291b78e17dcb1073a13c4a1086e Author: Adam Jackson Date: Wed Sep 27 14:31:37 2017 -0400 meson: Default to gnu99 We don't really require all of C99, but enough that it's not worth bothering with the distinction, especially if your toolchain is new enough that meson is a thing for you. We could do strict C99 if we really insisted on spelling it __typeof__, but who wants that? Nobody, that's who. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 041f25afa81dfc7e7ef350d5b955d2d5912846c9 Author: Adam Jackson Date: Wed Sep 27 14:31:36 2017 -0400 test: const correctness fix ../test/sync/sync.c: In function ‘main’: ../test/sync/sync.c:288:40: warning: initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] xcb_query_extension_reply_t *ext = xcb_get_extension_data(c, &xcb_sync_id); ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 1d1ff1142a5a3904175f45d2f52bbdffb0249e57 Author: Adam Jackson Date: Wed Sep 27 14:31:35 2017 -0400 dmx: More const correctness Fixes several dozen cases like: ../hw/dmx/examples/ev.c: In function ‘main’: ../hw/dmx/examples/ev.c:147:29: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] tmp = "X"; ^ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit eb25facb37ef74eab83060b75f8205ce1538817f Author: Adam Jackson Date: Wed Sep 27 14:31:34 2017 -0400 dmx: Fix a silly redeclaration bug ../hw/dmx/dmx.c:66:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls] extern int PanoramiXNumScreens; ^~~~~~~~~~~~~~~~~~~ In file included from ../hw/dmx/dmx.c:65:0: ../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here extern _X_EXPORT int PanoramiXNumScreens; ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8060196a3e80a3c0ad2c0abbe459416821cd366c Author: Louis-Francis Ratté-Boulianne Date: Wed Sep 27 01:24:28 2017 -0400 sync: Fix delta value check While transitionning from CARD64 to int64, the GreaterThan call as mistakenly been transformed into ">=". That was at least causing problems with Mutter. Signed-off-by: Louis-Francis Ratté-Boulianne Reviewed-by: Adam Jackson commit 37f4e7651a2fd51efa613a08a1e705553be33e76 Author: Keith Packard Date: Mon Sep 25 16:18:22 2017 -0700 modesetting: Skip no-longer-present connectors when resetting BAD links Outputs may have NULL mode_output (connector) pointers if the connector disappears while the server is running. Skip these when resetting outputs with BAD link status. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 147b4602f9c47e8977d13b1cbb6566f86dba8647 Author: Adam Jackson Date: Mon Sep 25 15:06:44 2017 -0400 xfree86: Hush some warnings when Xv is disabled Spotted by Appveyor: xf86Crtc.c:3281:1: warning: ‘xf86_crtc_box_area’ defined but not used [-Wunused-function] xf86_crtc_box_area(BoxPtr box) ^~~~~~~~~~~~~~~~~~ xf86Crtc.c:3268:1: warning: ‘x86_crtc_box’ defined but not used [-Wunused-function] x86_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box) ^~~~~~~~~~~~ xf86Crtc.c:3256:1: warning: ‘x86_crtc_box_intersect’ defined but not used [-Wunused-function] x86_crtc_box_intersect(BoxPtr dest, BoxPtr a, BoxPtr b) ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 0888b22fea71118b1a9a238134b3b8d1dc659734 Author: Adam Jackson Date: Mon Sep 25 15:01:32 2017 -0400 test: Fix a thinko in simple-xinit Spotted by clang courtesy of the shiny new OSX Travis target: simple-xinit.c:90:65: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [10]' [-Wsizeof-array-decay] ret = read(displayfd, display_string, sizeof(display_string - 1)); Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 84e3b96b531363e47f6789aacfcae4aa60135e2e Author: Nick Sarnie Date: Sat Sep 23 17:35:48 2017 -0400 suid: Include sysmacros.h to fix build after glibc-2.25 [Added HAVE_SYS_SYSMACROS_H guard - ajax] Signed-off-by: Nick Sarnie Reviewed-by: Adam Jackson commit 0b00440678fa22c1c1ca4a292b67db3ab8676969 Author: Jon Turney Date: Fri Sep 22 15:25:05 2017 +0100 travis: Also build on OSX Signed-off-by: Jon Turney Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit c30eca688781deb06b25a6a08297cb855aeb6ed2 Author: Jon Turney Date: Fri Sep 22 13:54:01 2017 +0100 meson: Make it possible to build for 32-bit targets Setting glx_align64 to '' gives a null string in the arguments list passed to the compiler. This is taken as an input filename, leading to: "cc: error: : No such file or directory" Instead, assign an empty list to glx_align64, which gets flattened to nothing in the arguments list. Signed-off-by: Jon Turney Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2c2e1b6f57753a82c7ca144a57950f9e2d76199e Author: Adam Jackson Date: Wed Aug 30 14:58:24 2017 -0400 glx: Be a bit more paranoid in glx client cleanup This would probably crash (via double-free) if you had multiple GPUs and an indirect context. Signed-off-by: Adam Jackson commit d770f9293296d2d3c4e49e94130ff68c0890f625 Author: Daniel Stone Date: Wed Sep 20 07:22:13 2017 -0700 meson: Use dependency version_compare() We can check the version on an existing dependency, rather than spinning up pkg-config again just to check the right version. Signed-off-by: Daniel Stone commit 86a89dd6020f59964c0e924acbfae9d5a51e3148 Author: Daniel Stone Date: Wed Sep 20 07:22:12 2017 -0700 Build: Use dri3proto/libdrm CFLAGS Make sure we get the CFLAGS required for building DRI3 into the command line. Signed-off-by: Daniel Stone commit 294670682120c65001b36369d6395003704f4ac1 Author: Eric Anholt Date: Mon Sep 18 17:34:33 2017 -0700 sync: Clean up a bit of header formatting. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e0f872207aa203adb85e825c311ed50fe3a3af60 Author: Eric Anholt Date: Mon Sep 18 17:34:32 2017 -0700 sync: Convert from "CARD64" to int64_t. The extension was using the name CARD64 to represent 64-bit values, with a #define from CARD64 to XSyncValue, a struct with a pair of 32-bit values representing a signed 64-bit value. This interfered with protocol headers using CARD64 to try to actually store a uint64_t. Now that stdint.h exists, let's just use that here, instead. v2: Fix alarm delta changes. v3: Do the potentially overflowing math as uint and convert to int afterward, out of C spec paranoia. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 5cbfa276541e6a621cf9c4b44b75323e90a5bd4c Author: Eric Anholt Date: Mon Sep 18 17:34:31 2017 -0700 test: Add basic SYNC tests. I couldn't find any, and I was modifying the implementation, so I had to write some. I would like the test to end with a "make sure there weren't any stray unchecked errors", but I didn't figure out how to do that. v2: Extend sync tests to cover alarm delta and waitvalue changes. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 3336291fc68444ee65b48ba675ec947e505fed57 Author: Eric Anholt Date: Mon Sep 18 17:34:30 2017 -0700 test: Return error from simple-xinit if the client crashes. I want to be able to call client tests with simple-xinit, so assertion failures should be an error. v2: Clean up identical returns. Signed-off-by: Eric Anholt commit a8eeb332ccf4d13b3fdcc382397bd3ea45e76212 Author: Eric Anholt Date: Mon Sep 18 17:34:29 2017 -0700 meson: Add Xvfb and Xephyr-glamor testing. The Xvfb tests are passing and Xephyr-glamor is failing for me, but it fails identically on autotools. It's disabled on Travis for now because the >10 minutes of silence during testing times out the entire build. v2: Fix the disable on travis. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a09743c9300f805d6527368ddcf44f5dccd4b366 Author: Eric Anholt Date: Mon Sep 18 17:34:28 2017 -0700 meson: Move Xvfb build under an option. Autotools also had it as an option. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit de3b61869140768335daed0e855a5ae4bdb75020 Author: Jon Turney Date: Fri Sep 15 14:36:52 2017 +0100 Add an .appveyor.yml for AppVeyor CI This currently does an autotools build using Cygwin. Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit 7d0728d6c42f9200b90c58e0357776018de18496 Author: Jon Turney Date: Fri Sep 15 14:36:51 2017 +0100 Revert "dmx: fix linking" Since commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056, "dmx: fix linking", linking dmx is broken for me: CCLD Xdmx.exe ../../render/.libs/librender.a(glyph.o): In function `HashGlyph': /wip/xserver/build.x86_64/../render/glyph.c:168: undefined reference to `x_sha1_init' /wip/xserver/build.x86_64/../render/glyph.c:174: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:177: undefined reference to `x_sha1_update' /wip/xserver/build.x86_64/../render/glyph.c:180: undefined reference to `x_sha1_final' ../../render/.libs/librender.a(mipict.o): In function `miClipPictureReg': /wip/xserver/build.x86_64/../render/mipict.c:233: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:234: undefined reference to `pixman_region_n_rects' /wip/xserver/build.x86_64/../render/mipict.c:235: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:236: undefined reference to `pixman_region_rectangles' /wip/xserver/build.x86_64/../render/mipict.c:248: undefined reference to `pixman_region_init' /wip/xserver/build.x86_64/../render/mipict.c:251: undefined reference to `pixman_region_not_empty' /wip/xserver/build.x86_64/../render/mipict.c:261: undefined reference to `pixman_region_not_empty' ../../render/.libs/librender.a(mipict.o): In function `miComputeCompositeRegion': /wip/xserver/build.x86_64/../render/mipict.c:340: undefined reference to `pixman_region_init' The change this was fixing appears to be effectively reverted by 542d9f6807ac06b70f564ccab10af69fa21a1221, so just revert commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056. Signed-off-by: Jon Turney Reviewed-by: Adam Jackson commit fbd80b2c8ebe9fd41229dc5438524d107c071ff1 Author: Dawid Kurek Date: Thu Jul 6 14:51:11 2017 +0200 modesetting: Blacklist EVDI devices from PRIME sync UDL (usb) devices are blacklisted because of they weird behaviour when it comes to vblank events. As EVDI uses very similar model of handling vblanks it should be treated similarly. When doing a page flip, EVDI does not wait for real vblank, but simulates it by adding constant delay. It also does not support DRM_IOCTL_WAIT_VBLANK. In contrast to UDL, EVDI uses platform devices, thus instead of 'usb' in path they all have 'platform'. It is possible to blacklist by 'platform', so without explicitly saying 'evdi', but it might be misleading when it comes to real reason for it. Signed-off-by: Dawid Kurek commit eac1a2e37b833c179b587107230805ea1fb3dfda Author: Emil Velikov Date: Thu Aug 3 19:43:28 2017 +0100 dri2: sort DRI2InfoPtr::version checking in ascending order Makes it easer to follow if 8 is between 7 and 9 ;-) Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 82df2ce38c560915f8c6574052bd56215b649072 Author: Roman Gilg Date: Tue Aug 22 15:38:26 2017 +0200 xwayland: Avoid repeatedly looping through window ancestor chain Calling xwl_window_from_window means looping through the window ancestor chain whenever it is called on a child window or on an automatically redirected window. Since these properties and the potential ancestor's xwl_window are constant between window realization and unrealization, we can omit the looping by always putting the respective xwl_window in the Window's private field on its realization. If the Window doesn't feature an xwl_window on its own, it's the xwl_window of its first ancestor with one. Signed-off-by: Roman Gilg Reviewed-by: Pekka Paalanen commit 1089d5d518a315963a8cda6c7d47a0ce09de0979 Author: Olivier Fourdan Date: Thu Mar 2 11:03:15 2017 +0100 xwayland: add envvar XWAYLAND_NO_GLAMOR Not all compositors allow for customizing the Xwayland command line, gnome-shell/mutter for example have the command line and path to Xwayland binary hardcoded, which makes it harder for users to disable glamor acceleration in Xwayland (glamor being used by default). Add an environment variable XWAYLAND_NO_GLAMOR to disable glamor support in Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Eric Engestrom commit 5abaa50b292798370a665ace5eec56fd830be226 Author: Eric Anholt Date: Fri Sep 1 12:22:59 2017 -0700 meson: Move the BUILD_DATE/TIME setup to configure time. By having it as a custom_target with build_always, every "ninja -C build" would rebuild Xorg for the new date/time, even if the rest of Xorg didn't change. We could build the rest of Xorg into a static lib, and regenerate date/time when the static lib changes and link that into a final Xorg, but BUILD_DATE/TIME is such a dubious feature (compared to including a git sha, which is easy with meson) it doesn't seem worth the build time cost. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 05e7e8b587dd9d37e8beadc72ab993f028c47fa1 Author: Eric Anholt Date: Fri Sep 1 12:22:58 2017 -0700 meson: Include BUILD_DATE in the meson xf86Build.h. Due to a typo, I only had BUILD_TIME present. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 2b080a14c87fc9e5f77fc3361297ac332aa04f02 Author: Eric Anholt Date: Fri Sep 1 12:22:57 2017 -0700 meson: Respect SOURCE_DATE_EPOCH for reproducible builds. This just copies over Chris Lamb's code from autotools. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 937ed782ae5e4e0da739f0630d1681b3754f0281 Author: Chris Lamb Date: Fri Sep 1 12:22:56 2017 -0700 configure.ac: Make BUILD_{DATE, TIME} respect SOURCE_DATE_EPOCH if set Whilst working on the Reproducible Builds effort [0], we noticed that xorg-server could not be built reproducibly. One reason is because it embeds a "current" build and date time. This should be compatible with both GNU and BSD date(1). [0] https://reproducible-builds.org/ v2: Fix change in Y-M-D format that broke the build. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a49379b6045453c7b787cc638db6afd0d14dce9c Author: Adam Jackson Date: Tue Sep 12 16:53:24 2017 -0400 fb: Check whether the window is enabled directly ... instead of its root window. Xwayland's rootless mode empties the root window border clip since its root window has no storage, but redirected windows (the only kind it can show) will have a non-empty border clip anyway, cf. the #ifdef COMPOSITE in miComputeClips. With this change, non-glamor Xwayland's GetImage actually works. Other acceleration layers may need to change to account for this, but this appears to be safe for the existing open source drivers. Only the xfree86 DDX has any problem with losing its framebuffer on VT switch, and even then only for UMS drivers (which excludes glamor, uxa, and sna from consideration). This leaves exa, which already contains code to evict pixmaps to host memory on VT switch. Since the xfree86 core will still empty the root clip on VT switch, while the root window itself may not contain a valid image we won't try to touch it, but GetImage from a redirected window will now work even when switched away. Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 9869dcb349b49f6d4cc2fab5d927cd8b1d1f463c Author: Olivier Fourdan Date: Wed Jul 26 16:00:38 2017 +0200 glamor: Avoid overflow between box32 and box16 box glamor_compute_transform_clipped_regions() uses a temporary box32 internally which is copied back to a box16 to init the regions16, thus causing a potential overflow. If an overflow occurs, the given region is invalid and the pixmap init region will fail. Simply check that the coordinates won't overflow when copying back to the box16, avoiding a crash later down the line in glamor. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101894 Signed-off-by: Olivier Fourdan Tested-by: Fabrice Bellet Reviewed-by: Adam Jackson commit bd353e9b84e013fc34ed730319d5b63d20977903 Author: Olivier Fourdan Date: Wed Jul 26 16:00:37 2017 +0200 glamor: handle NULL source picture COMPOSITE_REGION() can pass NULL as a source picture, make sure we handle that nicely in both glamor_composite_clipped_region() and glamor_composite_choose_shader(). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101894 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 4486d199bd3bcb5b2b8ad9bc54eb11604d9bd653 Author: Thomas Hellstrom Date: Wed Sep 6 16:27:54 2017 +0200 glx: Fix visual fbconfig matching with respect to swap method For the built in visuals, we'd typically select the "best" fbconfig without considering the swap method. If the client then requests a specific swap method, say GLX_SWAP_COPY_OML, it may well happen that the first fbconfig matching requirements would have been paired with the 32-bit compositing visual, and the client would render a potentially transparent window. Fix this so that we try to match fbconfigs with the same swap method to all built-in visuals. That would guarantee that selecting a specific swap- method would not influence the chance of getting a compositing visual. Signed-off-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit 0fc26310d5b09213c65f50bde444a1758172b016 Author: Thomas Hellstrom Date: Wed Sep 6 16:27:53 2017 +0200 glx: Work around a GLX_OML swap method in older dri drivers The swapMethod config member would typically contain an arbitrary value on older dri drivers. Fix this so that if we detect an illegal value, return GLX_SWAP_UNDEFINED_OML. Signed-off-by: Thomas Hellstrom Reviewed-by: Adam Jackson commit da29a15874229d78ec61946eacdbbed9871e3664 Author: Emil Velikov Date: Thu Sep 29 18:36:43 2016 +0100 glx: remove unused systemTimeExtension Not even a single DRI2/DRISW driver in mesa ever used this. Appears to be a dri1 artefact copy/pasted in the dri2/drisw codebase. Signed-off-by: Emil Velikov Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit ea82ececbf85a7ac3d0931687f44c57534fde17c Author: Peter Hutterer Date: Wed Sep 6 11:53:02 2017 +1000 test: fix compiler warning signal-logging.c:182:12: warning: suggest parentheses around assignment used as truth value [-Wparentheses] Signed-off-by: Peter Hutterer commit e12e02b2e6ee4582ba902ec1d1e5309abc78e282 Author: Emil Velikov Date: Sun Apr 17 17:24:53 2016 +0100 glamor: use the lowercase xnf.*alloc API Signed-off-by: Emil Velikov Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 17e488570067cdf499c7ad17ab198508c6f1531d Author: Emil Velikov Date: Sun Apr 17 17:24:52 2016 +0100 xwayland: use the lowercase xnf.*alloc API Signed-off-by: Emil Velikov Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit cdd0352ba05d4d8482aaca41797e05d40e58da36 Author: Olivier Fourdan Date: Thu Aug 31 10:23:00 2017 +0200 xwayland: Fix a segfault with pointer locking Xwayland would crash in some circumstances while trying to issue a pointer locking when the cursor is hidden when there is no seat focus window set. The crash signature looks like: #0 zwp_pointer_constraints_v1_lock_pointer () #1 xwl_pointer_warp_emulator_lock () at xwayland-input.c:2584 #2 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2756 #3 xwl_seat_maybe_lock_on_hidden_cursor () at xwayland-input.c:2765 #4 xwl_seat_cursor_visibility_changed () at xwayland-input.c:2768 #5 xwl_set_cursor () at xwayland-cursor.c:245 #6 miPointerUpdateSprite () at mipointer.c:468 #7 miPointerDisplayCursor () at mipointer.c:206 #8 CursorDisplayCursor () at cursor.c:150 #9 AnimCurDisplayCursor () at animcur.c:220 #10 ChangeToCursor () at events.c:936 #11 ActivatePointerGrab () at events.c:1542 #12 GrabDevice () at events.c:5120 #13 ProcGrabPointer () at events.c:4908 #14 Dispatch () at dispatch.c:478 #15 dix_main () at main.c:276 xwl_pointer_warp_emulator_lock() tries to use the surface from the xwl_seat->focus_window leading to a NULL pointer dereference when that value is NULL. Check that xwl_seat->focus_window is not NULL earlier in the stack in xwl_seat_maybe_lock_on_hidden_cursor() and return early if not the case to avoid the crash. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=102474 Signed-off-by: Olivier Fourdan Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3fbc3c3eefd3803d0c4e86e42595d8a891aeb5f2 Author: Olivier Fourdan Date: Fri Sep 1 09:35:33 2017 +0200 xwayland: No grab handler without protocol support If the compositor has no support for the Xwayland keyboard grab protocol, there is no need to set-up our keyboard grab handler. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aabf65d2a0206bd1a9c6e9a9f3153ded873dfd43 Author: Adam Jackson Date: Wed Aug 30 15:11:45 2017 -0400 os: Fix warning in LockServer The meson build gives me: ../os/utils.c: In function ‘LockServer’: ../os/utils.c:310:40: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); ^~~~~~~~~ ../os/utils.c:310:5: note: ‘snprintf’ output between 12 and 13 bytes into a destination of size 12 snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Which seems to be due to the %d part meaning that a negative number's - sign would be one wider than we're expecting. Fine, just coerce it to unsigned. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 3bc32a7f593cbd2747237621135ef5196bc1e15a Author: Adam Jackson Date: Tue Aug 22 12:19:56 2017 -0400 glx: Fix error generation for non-reply vendor private requests Discarding the return value here is just wrong. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 591ac95f73b1c1ea681c45e4da9afa2b1d505abe Author: Emil Velikov Date: Tue Aug 22 11:48:31 2017 +0100 xwin: automake: remove unused {SRCS, DEFS}_{NATIVEGDI, PRIMARYFB} Left over from the following commits: 8465ee788fd xwin: Remove native GDI engine (v2) c79f824bf66 xwin: Remove primary DirectDraw engine v2: drop leading - in the makefile Cc: Adam Jackson Signed-off-by: Emil Velikov Reviewed-by: Jon Turney (v1) commit 69fe6156ec6cd37657d4e5af1c6f21ebf72b8fd7 Author: Emil Velikov Date: Tue Aug 22 11:48:30 2017 +0100 xwin: remove always true/set XWIN_RANDR conditional/define Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 8f1a200d0be261a60bb9e8e72d8704cef2d91cd4 Author: Emil Velikov Date: Tue Aug 22 11:48:29 2017 +0100 xwin: remove always true/set XWIN_MULTIWINDOW conditional/define v2: drop trailing endif (Jon) Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 9d00f6190a8e5cc4ebda9b315d7c0a0782b58501 Author: Emil Velikov Date: Tue Aug 22 11:48:28 2017 +0100 xwin: remove always true/set XWIN_CLIPBOARD conditional/define v2: drop trailing endif (Jon) Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 1ef65692258136d6e36d0d9d6c5efad9877c9ceb Author: Emil Velikov Date: Tue Aug 22 11:48:27 2017 +0100 os: make MitGenerateCookie() independent of XCSECURITY Analogous to previous commit. Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 292ee7151631cabbd928847a5a2ca47e14a06b75 Author: Emil Velikov Date: Tue Aug 22 11:48:26 2017 +0100 os: make GenerateRandomData() independent of XCSECURITY The function itself does not depend on the macro. Move it outside of the ifdef guard and remove the identical copy in XWIN. This is step 1 towards removing the duplication in winauth.c and moving the OS specifics to os/ Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 8aee1f40eaa3527c90698d6826ce8314b8b5a92a Author: Emil Velikov Date: Tue Aug 22 11:48:25 2017 +0100 xwin/glx: remove unused __GLXWinScreen::glx_enable_bits All the relevant code already uses the ::base::glx_enable_bits one. Signed-off-by: Emil Velikov Reviewed-by: Jon Turney commit 43878fa8772d8642f601d65e78d2f702ecc0de41 Author: Adam Jackson Date: Wed Aug 16 14:49:18 2017 -0400 glx: Remove some unused stuff from glxserver.h Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Keith Packard commit 3d81abba9ca2f9d57b4c293e3b7fcb32ef853f44 Author: Adam Jackson Date: Wed Aug 16 14:49:17 2017 -0400 glx: Inline some reply swapping code Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher commit 51bab63b7353319c51ec2f1adaed95d86e4f6119 Author: Adam Jackson Date: Wed Aug 16 14:49:16 2017 -0400 glx: Remove True/False defines Those are xlib spellings, we say TRUE/FALSE pretty consistently elsewhere in the server. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Keith Packard commit 8e3b26ceaa86eaf98a78f6b84f46a4a86aed8ef8 Author: Michel Dänzer Date: Fri Apr 14 19:08:41 2017 +0900 Make PixmapDirtyUpdateRec::src a DrawablePtr This allows making the master screen's pixmap_dirty_list entries explicitly reflect that we're now tracking the root window instead of the screen pixmap, in order to allow Present page flipping on master outputs while there are active slave outputs. Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly easier for drivers. Reviewed-by: Adam Jackson commit c52f77e4ca2cda878da341a6228e6411eec7b1a0 Author: Peter Harris Date: Mon Aug 14 15:54:36 2017 -0400 meson: Fix epoll detection The epoll code depends on epoll_create1, not epoll_create. Signed-off-by: Peter Harris Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 27500ee82e97ef8a6b3199c2d7b623523c1ee2c1 Author: Eric Anholt Date: Mon Jul 10 12:08:29 2017 -0700 glamor: Scissor Render composite operations to the bounds of the drawing. Unlike the previous two fixes, this one introduces new GL calls and statechanges of the scissor. However, given that our Render drawing already does CPU side transformation and inefficient box upload, this shouldn't be a limiting factor for Render acceleration. Surprisingly, it improves x11perf -comppixwin10 -repeat 1 -reps 10000 on i965 by 3.21191% +/- 1.79977% (n=50). v2: Make the jump to the exit land after scissor disable. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e6ab3b1109e72a1512c6b7b92dd84525ad8c8052 Author: Eric Anholt Date: Thu Jul 6 16:15:17 2017 -0700 glamor: Scissor CopyArea to the bounds of the drawing. Like the previous fix to rectangles, this reduces the area drawn on tiled renderers by letting the CPU-side tile setup know what tiles might be drawn at all. Surprisingly, it improves x11perf -copypixwin1 -repeat 1 -reps 10000 on i965 by 2.93185% +/- 1.5561% (n=90). v2: Drop extra glamor_bounds_union_box() from previous debugging (caught by Mark Marshall). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) commit 60cc7e367a2a5e6014f193105dafd47a4d598fd9 Author: Eric Anholt Date: Thu Jul 6 15:43:14 2017 -0700 glamor: Scissor rectangle drawing to the bounds of the rects. Scissors provide a critical hint to tiled renderers as to what tiles need to be load/stored because they could be modified by the rendering. The bounds calculation here is limited to when we have a small number of rects (large enough to cover rounded window corners, but probably not xeyes) to avoid overhead on desktop GL. No performance difference on i965 with x11perf -rect1 -repeat 1 -reps 10000 (n=50) v2: Clamp rectangle bounds addition. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f2110157713cf22c8b5c46a0d5416fdb033c27d3 Author: Eric Anholt Date: Tue May 9 15:48:27 2017 -0700 test: Remove unused ddxstubs.c Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f80119120c487581ac050ce741808f7c8f438f35 Author: Adam Jackson Date: Thu Jul 27 16:02:28 2017 -0400 composite: Make compIsAlternateVisual safe even if Composite is off As of ea483af9 we're calling this unconditionally from the GLX code so the synthetic visual is in a lower select group. If Composite has been disabled then GetCompScreen() will return NULL, and this would crash. Rather than force the caller to check first, just always return FALSE if Composite is disabled (which is correct, since none of the visuals will be synthetic in that case). Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner commit b06a85e7fd6ddac58dd97e5d7ce3b5ea9553c8f6 Author: Emil Velikov Date: Mon Jul 31 14:13:48 2017 +0100 glx: remove unused GlxSetVisualConfigs stub The function was an empty since 2008 at least. Drop it since no drivers use it any more. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit e8f190b445ae10b12896ee396cd8d57f6b6b8cc4 Author: Eric Anholt Date: Fri Aug 4 13:19:01 2017 -0700 travis: Request a new docker image with xkb-data and xkbcomp installed. Xvfb was erroring out with: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. (EE) Fatal server error: (EE) Failed to activate virtual core keyboard: 2(EE) With this change, we can now run my xsync regression test on Travis. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit b62e486c4e3d7411f3e70b610af7f8b9dd5e8a73 Author: Eric Anholt Date: Fri Aug 4 13:19:00 2017 -0700 travis: Set prefix to /usr, so we find xkbcomp. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 2d50e32e0ba1045f8c73a14335743ae98121d102 Author: Eric Anholt Date: Tue Aug 1 13:11:25 2017 -0700 meson: Fix xwayland build since xwayland-keyboard-grab. The version detect was erroring out with 1.9 protos installed, and we weren't building the new code. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0a448d133f4f1c913b1c2cb05accff31c74a3dbf Author: Olivier Fourdan Date: Wed Jul 12 11:51:08 2017 +0200 xwayland: Add grab protocol support The keyboard grabbing protocol for Xwayland is included in wayland-protocol 1.9. Update the wayland-protocol required version in both configure and meson builds and add support for this new protocol in Xwayland. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit abe49b009064c38823fac17c373fd5f1a390b3ab Author: Jan Beich Date: Fri Jul 7 19:59:05 2017 +0200 dix: unbreak --with-dtrace (default) on FreeBSD 11.1+ gmake[2]: Entering directory '/path/to/xserver/dix' /usr/sbin/dtrace -G -C -o dtrace-dix.o -s ../dix/Xserver.d .libs/atom.o ... dtrace: failed to compile script ../dix/Xserver.d: line 26: useless declaration gmake[2]: *** [Makefile:1007: dtrace-dix.o] Error 1 Signed-off-by: Jan Beich Reviewed-by: Alan Coopersmith commit c967e4cd8ba50034b6e02d87df10d04edf15ccf6 Author: Emil Velikov Date: Mon Jul 31 14:06:48 2017 +0100 glx: don't export __glXDRISWRastProvider The symbol is used only internally and is not part of the API/ABI. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit c09e906d61a0855a8202e58ba72ed6bb3b08f37f Author: Emil Velikov Date: Mon Jul 31 14:06:47 2017 +0100 glx: fix typo becuase -> because Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit db0dd06ddf47d5190f2349ed8b0e71caa9e8e1eb Author: Adam Jackson Date: Thu Jul 27 16:02:33 2017 -0400 glx: Allow arbitrary context attributes for direct contexts For direct contexts, most context attributes don't require any particular awareness on the part of the server. Examples include GLX_ARB_create_context_no_error and GLX_ARB_context_flush_control, where all of the behavior change lives in the renderer; since that's on the client side for a direct context, there's no reason for the X server to validate the attribute. The context attributes will still be validated on the client side, and we still validate attributes for indirect contexts since the server implementation might need to handle them. For example, the indirect code might internally use ARB_context_flush_control for all contexts, in which case it would need to manually emit glFlush when the client switches between two indirect contexts that didn't request the no-flush attribute. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 3050d277616ef472a24d8ccd24afcbf8e31ed80e Author: Adam Jackson Date: Tue Jun 27 11:18:48 2017 -0400 xfree86: Fix X -configure driver sort yet again There were two bugs here: The comparison function was not stable when one or more of the drivers being compared is a fallback, and the last driver in the list would never be moved. Signed-off-by: Adam Jackson commit 6f9939525c31f1f2d8d6c137a46404278384b4bf Author: Adam Jackson Date: Mon Jun 26 12:43:54 2017 -0400 modesetting: Fix PCI initialization on non-zero domains libdrm's busid matching for the legacy three-integer bus string format simply ignores the domain number, rather than what we were doing here of packing the domain into the bus number. Whatever, just use the existing code to build a busid string, since that gets the domain right. Signed-off-by: Adam Jackson commit d16133e3e293fe16b291114d344fbd5a61d5ed65 Author: Jeremy Huddleston Sequoia Date: Thu Jul 20 19:48:26 2017 -0700 glx: Only include compositeext.h if COMPOSITE is supported Regressed-in: ea483af99a6351323afe00a0b630cd63310efdb1 Signed-off-by: Jeremy Huddleston Sequoia commit dd0b721c977e88d7c3830cc2a672c2793bca4fa0 Author: Jeremy Huddleston Sequoia Date: Tue Jul 18 21:35:49 2017 -0700 XQuartz: Hack around an issue that can occur on macOS due to background apps incorrectly stealing focus Works around . Tested-by: Martin Otte Tested-by: Tom Lane Signed-off-by: Jeremy Huddleston Sequoia commit 211e05ac85a294ef361b9f80d689047fa52b9076 Author: Michal Srb Date: Fri Jul 7 17:21:46 2017 +0200 Xi: Test exact size of XIBarrierReleasePointer Otherwise a client can send any value of num_barriers and cause reading or swapping of values on heap behind the receive buffer. Signed-off-by: Peter Hutterer commit abb031e731f5c159add1b3351de9c4bb121bf00a Author: Rodrigo Vivi Date: Thu Jun 29 13:29:58 2017 -0700 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Coffee Lake and Cannon Lake PCI IDs. Signed-off-by: Rodrigo Vivi Acked-by: Kenneth Graunke commit 05a4396f08c83d9261b8ad16908d9e2730bd4bbf Author: Emil Velikov Date: Thu Jun 29 02:17:06 2017 +0100 glamor: update "required EGL extensions" comment The extensions listed have not been needed in a while. Replace with the only remaining requirement. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 04511a0476b5c860e7d157b01080dff94d935f74 Author: Adam Jackson Date: Thu Jun 29 10:32:00 2017 -0400 wayland: Sync drm.xml with Mesa ... where it is named src/egl/wayland/wayland-drm/wayland-drm.xml and has its requests sorted by protocol version number, avoiding a warning from wayland-scanner. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit ce393de0efb8626d15f3b97c97916971a6aefebd Author: Dave Airlie Date: Fri Jun 23 09:29:13 2017 +1000 modesetting: handle NULL cursor in drmmode_set_cursor. We had a bug reported with a touchscreen where we could end up in here with a NULL cursor, so let's not crash the X server. Signed-off-by: Dave Airlie Reviewed-and-Tested-by: Daniel Martin Signed-off-by: Peter Hutterer commit 43527d31810fe94a5eb4b2543bbc8eb26b1654b7 Author: Peter Hutterer Date: Tue Jul 4 06:51:58 2017 +1000 xfree86: link to libinput(4) from the xorg.conf man page Signed-off-by: Peter Hutterer Reviewed-by: Pekka Paalanen commit edaad0eff48219787d27f7723cd3d4d9b293de96 Author: Adam Jackson Date: Thu Jun 29 13:57:37 2017 -0400 automake: Add hw/xfree86/xkb/meson.build to EXTRA_DIST Signed-off-by: Adam Jackson commit 06419a5b17180126d2507c8699229e07f5b2c434 Author: Emil Velikov Date: Thu Jun 29 01:55:25 2017 +0100 glamor: remove no longer needed KHR_gl_texture_2D_image requirement The code that needed it was introduced with commit 7cfd9cc2327 ("Add DRI3 support to glamor") back in 2013. And was nuked a couple of years ago with commit 51984dddfcc ("glamor: Delay making pixmaps shareable until we need to.") Signed-off-by: Emil Velikov Reviewed-by: Eric Anholt commit 47a7b63f7455eaeacb634fd800e924f2087dacbd Author: Jon TURNEY Date: Mon Jun 26 14:54:06 2017 +0100 meson: Use --export-all-symbols when building PE/COFF objects Reviewed-by: Adam Jackson commit b34abb3d2da46339d59a0feefd2240790a6a6a0e Author: Jon TURNEY Date: Mon Jun 26 14:54:05 2017 +0100 meson: Shuffle around subdirs so we build Xorg loadable modules after Xorg Reviewed-by: Adam Jackson commit fbdd73fac68383c93f6f5c6a7615860503039999 Author: Jon TURNEY Date: Mon Jun 26 14:54:04 2017 +0100 Move statically linked xorgxkb files from dixmods to a separate directory [ajax: Fixed test/Makefile.am as well] Reviewed-by: Adam Jackson commit 5c8fb7d128e312e6c01cd40c7ada072c4b5f3776 Author: Adam Jackson Date: Wed Jun 21 15:58:43 2017 -0400 xfree86: Move DRICreatePCIBusID to xf86Pci.h xf86str.h is parsed into sdksyms unconditionally but the symbol is only defined when building with PCI support. Move the decl to a header that sdksyms only parses when building PCI support. Signed-off-by: Adam Jackson Reviewed-by: Jon Turney commit 525db17e04d5cabaeefd20e38cebe7d606047a76 Author: Adam Jackson Date: Fri Jun 16 15:44:52 2017 -0400 glx/drisw: Use scratch GCs for swrastPutImage The scratch GC defaults to the same state as our persistent GCs. Except for the "draw" GC, which would generate graphics exposures for... well, no reason really, PutImage doesn't generate graphics exposures. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit ecc5e362985d1f649c29ac5f93be19851eaf7d87 Author: Adam Jackson Date: Fri Jun 16 15:44:51 2017 -0400 glx/drisw: Remove unused glx_enable_bits Sloppy of me! Signed-off-by: Adam Jackson Acked-by: Keith Packard commit a6c23ef31a4e5aea19ddabdf4a0760f4c48f1ebe Author: Adam Jackson Date: Fri Jun 16 15:44:50 2017 -0400 glx/dri2: Don't chirp when falling back to software This isn't an error if the screen isn't accelerated in the first place. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 0b1831d043028f7dd6accca19a81e2abd9a145b5 Author: Adam Jackson Date: Fri Jun 16 15:44:49 2017 -0400 glx: Remove some indirection around EXT_texture_from_pixmap Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit c33541e59e338cd53f89d94a6898555d350e84aa Author: Adam Jackson Date: Fri Jun 16 15:44:48 2017 -0400 glx: Remove __glXReply Static data bad, hulk smash. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit d6db66811643d3762716f6b144a7358572216a4f Author: Adam Jackson Date: Fri Jun 16 15:44:47 2017 -0400 dmx: Remove some not-very-interesting debug prints gcc/glibc think the snprintf in dmxExecOS() might truncate. Yes, it might, and we also don't care. Just delete all this. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 17ad6e5d5616039021455bc821d6ee2497f7ebde Author: Adam Jackson Date: Fri Jun 16 15:44:46 2017 -0400 dmx: Silence an unused-result warning Modern glibc is very insistent that you care about whether write() succeeds: ../hw/dmx/input/usb-keyboard.c: In function ‘kbdUSBCtrl’: ../hw/dmx/input/usb-keyboard.c:292:9: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result] write(priv->fd, &event, sizeof(event)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit fbc4da6fef2a0d2111284a19c26d83686ebcbd1f Author: Adam Jackson Date: Fri Jun 16 15:44:44 2017 -0400 xfree86: Move DRICreatePCIBusID to the PCI code This symbol is used by some DRI2+ drivers and there's nothing DRI1-specific about it. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit b723da8390d2fe1bf048247302416b37972a0cc3 Author: Adam Jackson Date: Fri Jun 16 15:44:43 2017 -0400 xfree86: Remove unused xf86EnableVTSwitch Signed-off-by: Adam Jackson Acked-by: Keith Packard commit f44e0af4daaad5b18d79f2076bc98d6e79f638af Author: Adam Jackson Date: Fri Jun 16 15:44:42 2017 -0400 dix: Remove extension aliases This appears to be essentially unused. The only known client-side library for the SELinux extension is xcb, which does not look for the name "Flask". The "SGI-GLX" alias for GLX appears to be a bit of superstition at this point, NVIDIA's driver does not expose it and Mesa does not check for it. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 88e807d4fa90165868929190f601beef18252f57 Author: Adam Jackson Date: Fri Jun 16 15:44:41 2017 -0400 include: Remove some unused macros Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit d2e57f71ad16f1e677dd542a8bc0db87dfa9791d Author: Michel Dänzer Date: Mon Jun 19 19:05:32 2017 +0900 xfree86: Document BusID PCI domain format in ddxDesign.xml Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 3b0fd9421add9f0ca8958ced0f39b2da21143c22 Author: Michel Dänzer Date: Mon Jun 19 19:05:31 2017 +0900 xfree86: Document BusID PCI domain format in xorg.conf manpage Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 8e00dc59b51da7e0d3978c26b1884c4767aa2dc2 Author: Michel Dänzer Date: Mon Jun 19 19:05:30 2017 +0900 xfree86: Fix printing of PCI domain/bus in xf86MatchPciInstances It was attempting to use the @ format accepted by the BusID stanza, but the two values were swapped. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit e905b19a53f96013c4417bec993a1dea5a3b0a5f Author: Michel Dänzer Date: Mon Jun 19 19:05:29 2017 +0900 xfree86: Print BusID stanza compatible bus IDs for found devices The PCI domain has to be specified like this: "PCI:@::" Example before: (--) PCI:*(0:0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (0:1:0:0) 1002:6939:1458:229d [...] after: (--) PCI:*(0@0:1:0) 1002:130f:1043:85cb [...] (--) PCI: (1@0:0:0) 1002:6939:1458:229d [...] Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit fb212f2c1bcfb015112aa665dd1f25d9b80f86fc Author: Jon Turney Date: Sat Jun 17 14:32:30 2017 +0100 meson: Make VBE and VGAHW modules optional Don't build them on platforms where they aren't meaningful. Note that autoconf defines WITH_VGAHW when building the VGAHW module, but that doesn't seem to be used anywhere, so we just drop that. Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 6d2b7d33678e7a881ebdb5ceb4a32509ad3ee930 Author: Jon Turney Date: Thu May 4 14:08:48 2017 +0100 meson: Restore stub ossupport Don't build BSD ossupport when there is no specific support, build stubs Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 4212c884c423e5ce2cd3b4d67c0d656475fddc79 Author: Michel Dänzer Date: Fri Jun 16 11:30:03 2017 +0900 xfree86/modes: Use RRTransformEqual in xf86RandR12CrtcSet The memcmp didn't catch when e.g. only the filter changed. Tested by alternately running xrandr --output DVI-I-0 --scale-from 3840x2160 --filter bilinear xrandr --output DVI-I-0 --scale-from 3840x2160 --filter nearest Reviewed-by: Aaron Plattner commit 091af80be48c37f16c679d35fc12ad33e6b0cd74 Author: Aaron Plattner Date: Thu Jun 15 14:28:27 2017 -0700 randr: Use RRTransformEqual in RRCrtcPendingTransform Currently, RRCrtcPendingTransform returns false unless the transformation matrix itself is changing. This makes RRCrtcSet skip doing anything if the only thing that is changing is the transform filter. There's already a function for comparing RRTransformPtrs, so use that instead. Tested by running xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter nearest follwed by xrandr --output DP-1 --mode 1920x1080 --rate 144 --scale 0.5x0.5 --filter bilinear Signed-off-by: Aaron Plattner Reviewed-and-Tested-by: Michel Dänzer commit ba336b24052122b136486961c82deac76bbde455 Author: Michal Srb Date: Wed May 24 15:54:42 2017 +0300 Xi: Do not try to swap GenericEvent. The SProcXSendExtensionEvent must not attempt to swap GenericEvent because it is assuming that the event has fixed size and gives the swapping function xEvent-sized buffer. A GenericEvent would be later rejected by ProcXSendExtensionEvent anyway. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8caed4df36b1f802b4992edcfd282cbeeec35d9d Author: Michal Srb Date: Wed May 24 15:54:41 2017 +0300 Xi: Verify all events in ProcXSendExtensionEvent. The requirement is that events have type in range EXTENSION_EVENT_BASE..lastEvent, but it was tested only for first event of all. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 215f894965df5fb0bb45b107d84524e700d2073c Author: Michal Srb Date: Wed May 24 15:54:40 2017 +0300 dix: Disallow GenericEvent in SendEvent request. The SendEvent request holds xEvent which is exactly 32 bytes long, no more, no less. Both ProcSendEvent and SProcSendEvent verify that the received data exactly match the request size. However nothing stops the client from passing in event with xEvent::type = GenericEvent and any value of xGenericEvent::length. In the case of ProcSendEvent, the event will be eventually passed to WriteEventsToClient which will see that it is Generic event and copy the arbitrary length from the receive buffer (and possibly past it) and send it to the other client. This allows clients to copy unitialized heap memory out of X server or to crash it. In case of SProcSendEvent, it will attempt to swap the incoming event by calling a swapping function from the EventSwapVector array. The swapped event is written to target buffer, which in this case is local xEvent variable. The xEvent variable is 32 bytes long, but the swapping functions for GenericEvents expect that the target buffer has size matching the size of the source GenericEvent. This allows clients to cause stack buffer overflows. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 05442de962d3dc624f79fc1a00eca3ffc5489ced Author: Michal Srb Date: Wed May 24 15:54:39 2017 +0300 Xi: Zero target buffer in SProcXSendExtensionEvent. Make sure that the xEvent eventT is initialized with zeros, the same way as in SProcSendEvent. Some event swapping functions do not overwrite all 32 bytes of xEvent structure, for example XSecurityAuthorizationRevoked. Two cooperating clients, one swapped and the other not, can send XSecurityAuthorizationRevoked event to each other to retrieve old stack data from X server. This can be potentialy misused to go around ASLR or stack-protector. Signed-off-by: Michal Srb Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d82c3cee02a99cf7861d1effaa5c7d38683a7783 Author: Eric Anholt Date: Thu Jun 1 13:59:54 2017 -0700 travis: Enable ccache. We bind-mount the cache directory into the container. Cuts build time from about 4 minutes to 2. Signed-off-by: Eric Anholt commit 01dfb65ee2e34148718d3f95dfd4629024edba84 Author: Eric Anholt Date: Thu Jun 1 12:29:12 2017 -0700 travis: Add a build script for Travis CI. This currently does a meson build using a docker image I've prepared. The Dockerfile source is at: https://github.com/anholt/xserver-travis Docker proved to be necessary to cut the build time per Travis push. If some day we end up using meson in more of the X stack, we may be able to move more dependencies out of the docker image and into the CI build (putting the I in CI). Until then, we'll have to do docker image rebuilds when dependencies are added/updated. To enable Travis CI on your github repository, see the first two steps of the docs at: https://docs.travis-ci.com/user/getting-started/ Once you do that, pushing branches to your github repo will trigger builds, which will send you email if they fail. Current build status can be veiewed your account on travis-ci.org: https://travis-ci.org/anholt/xserver commit fda2b064a0ebd223e8a39fd19f5c5ad1da0776e8 Author: Eric Anholt Date: Thu Jun 1 12:29:11 2017 -0700 meson: Fix test for whether we've built glamor-EGL. This matches the test we use for going into the glamor_egl subdir in ../../meson.build. commit 75bf302ed20f4b9794f71f84c1da2b9fcd689356 Author: Eric Anholt Date: Fri Jun 2 09:12:41 2017 -0700 dmx: Remove includes of glxtokens.h Our top-level glx.h include already provides all of the tokens we use, and fixes redefinition warnings in the meson build. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f3689f637f5ac0fb6c231a470e65b39aa5e9ba20 Author: Keith Packard Date: Wed May 17 09:57:29 2017 -0700 os: Set oc->fd to -1 when connection is closed This ensures that we don't use the now-closed file descriptor in the future. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit d05c754e1bde895589fb514d8f518afeccecbc05 Author: Keith Packard Date: Wed May 17 09:57:28 2017 -0700 os: Check oc->trans_conn before using oc->fd in YieldControlNoInput oc->trans_conn is set to NULL when the connection is closed. At this point, oc->fd is no longer valid and shouldn't be used. Move dereference of oc->fd up into YieldControlNoInput where the state of oc->trans_conn can be checked in a single place. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 448a5586e9235bee9648d89e4103ed48e6237c15 Author: Keith Packard Date: Wed May 17 09:57:27 2017 -0700 os: Don't call ospoll_listen/ospoll_mute after connection is closed In set_poll_client, check oc->trans_conn to make sure the connection is still running before changing the ospoll configuration of the file descriptor in case some other bit of the server is now using this file descriptor. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 523d35e3e1c703a655386f6348a4bfb4291c3969 Author: Keith Packard Date: Wed May 17 09:57:26 2017 -0700 os: Use CloseDownFileDescriptor from AbortClient, including ospoll_remove AbortClient performs most of the same operations as CloseDownFileDescriptor except that it doesn't call ospoll_remove, leaving that unaware that the file descriptor has been closed. If the file descriptor is re-used before the server comes back around to clean up, and that new file descriptor is passed to SetNotifyFd, then that function will mistakenly re-interpret the stale ClientPtr returned by ospoll_data as a struct notify * instead and mangle data badly. To fix this, the patch does: 1) Change CloseDownFileDescriptor so that it can be called multiple times on the same OsCommPtr. The calls related to the file descriptor are moved inside the check for trans_conn and oc->trans_conn is set to NULL after cleaning up. 2) Move the XdmcpCloseDisplay call into CloseDownFileDescriptor. I don't think the actually matters as we just need to know at some point that the session client has exited. Moving it avoids the possibility of having this accidentally trigger from another client with the same fd which closes down at around the same time. 3) Change AbortClient to call CloseDownFileDescriptor. This makes sure that all of the fd-related clean up happens in the same way everywhere, in particular ensures that ospoll is notified about the closed file descriptor at the time it is closed and not some time later. Debian-bug: https://bugs.debian.org/862824 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5d941ccb0b30399d505b48bff894c95cc3023bbe Author: Keith Packard Date: Wed May 17 09:57:25 2017 -0700 os: Eliminate ConnectionTranslation This infrastructure is no longer read, only written; the mapping from fd to client is now handled by ospoll. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c86fc56b10b603b41ae37057eedfa9c86b609752 Author: Keith Packard Date: Mon Jun 12 17:46:51 2017 -0700 glamor: Clarify variable names in glamor_copy_cpu_fbo This function creates a temporary pixmap to hold data being moved from the source to the destination. However, it labeled all of the variables associated with this as src_, which makes it confusing to read the code. Rename them tmp_ instead. Also fix the comment describing the function to note that it copies from CPU to GPU, not GPU to GPU. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit ffda82ed04d28feae2e001dbd0c32d6c795d90b1 Author: Michel Dänzer Date: Tue Jun 6 18:42:06 2017 +0900 glamor: Fix temporary pixmap coordinate offsets The previous values happened to work in basic cases, but not in general if the destination is a subwindow or has a border. Fixes crash with xli, which moves a large subwindow inside a smaller parent window for scrolling. No regressions with xterm, x11perf -copyplane or the xscreensaver phosphor hack. Bug: https://bugs.debian.org/857983 Reviewed-by: Keith Packard commit d4995a3936ae283b9080fdaa0905daa669ebacfc Author: Adam Jackson Date: Mon Jun 12 14:43:23 2017 -0400 modesetting: Validate the atom for enum properties The client could have said anything here, and if what they said doesn't actually name an atom NameForAtom() will return NULL, and strcmp() will be unhappy about that. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7c7a540f1e1d6b5466e1c9aa28476a2d7273d5ed Author: Jason Gerecke Date: Fri Jun 9 16:02:07 2017 -0700 xwayland: Implement tablet_tool_wheel for scrolling The 'tablet_tool_wheel' function for tablet scrolling was added back in 8a1defcc634 but left unimplemented. This commit fills in the necessary details, using the "clicks" count as the number of discrete scroll up/down events to send. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fbc9814975fe82be25becf1a55d4f8d34298a956 Author: Jason Gerecke Date: Fri Jun 9 16:02:06 2017 -0700 xwayland: Correct off-by-one error in tablet button numbering The 'tablet_tool_frame' function treats the button masks as though they are zero-indexed, but 'tablet_tool_button_state' treats them as one- indexed. The result is that an e.g. middle click event recieved from Wayland will be sent from the X server as a right-click instead. Fixes: 773b04748d0 ("xwayland: handle button events after motion events") Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d5e2f271ad93e50412ff3605fb25cb9622f437e0 Author: Carlos Garnacho Date: Sun May 28 15:56:22 2017 +0200 xwayland: Remove two unused proc pointers. Xwayland doesn't override these, so we don't need defining those in the xwl_screen struct. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 95febc42cadf392a888104ad6d5cf4f34fdde7d5 Author: Carlos Garnacho Date: Sun May 28 15:56:21 2017 +0200 Xi: Use WarpPointerProc hook on XI pointer warping implementation Just like we do with XWarpPointer's. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ca17f3e9fd3b59fdc5ffd0e5d78e4db6ddc87aa1 Author: Carlos Garnacho Date: Sun May 28 15:56:20 2017 +0200 xwayland: Lock the pointer if it is confined and has no cursor In the typical pattern in games of "hide cursor, grab with a confineTo, warp constantly the pointer to the middle of the window" the last warping step is actually rather optional. Some games may choose to just set up a grab with confineTo argument, and trust that they'll get correct relative X/Y axis values despite the hidden cursor hitting the confinement window edge. To cater for these cases, lock the pointer whenever there is a pointer confinement and the cursor is hidden. This ensures the pointer position is in sync with the compositor's when it's next shown again, and more importantly resorts to the relative pointer for event delivery. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 513e3bd3870fdb8a8e0e2e52c0fa93872300bc8b Author: Carlos Garnacho Date: Sun May 28 15:56:19 2017 +0200 xwayland: Update root window size when desktop size changes This fixes grabs on InputOnly windows whose parent is the root window failing with GrabNotViewable. This is due to window->borderSize/windowSize being computed as clipped by its parent, resulting in a null region. Setting up the right size on the root window makes the InputOnly size correct too, so the GrabNotViewable paths aren't hit anymore. Signed-off-by: Carlos Garnacho Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fafdb0cc9697eb53635ed1e78bec1d4cd87ab3a2 Author: Carlos Garnacho Date: Sun May 28 15:56:18 2017 +0200 xwayland: "Accept" confineTo on InputOnly windows Of sorts, actually make it confine to the pointer focus, as the InputOnly window is entirely invisible to xwayland accounting, we don't have a xwl_window for it. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c217fcb4c4640ffd2fefee63c6fcd7ea5e64b942 Author: Carlos Garnacho Date: Sun May 28 15:56:17 2017 +0200 xwayland: Allow pointer warp on root/None window Of sorts, as we can't honor pointer warping across the whole root window coordinates, peek the pointer focus in these cases. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f065721e6fa6e9057cca4eadaf145a4dc22a08d2 Author: Carlos Garnacho Date: Sun May 28 15:56:16 2017 +0200 dix: assume warping on the RootWindow always happens on visible coords If the root window borderClip region is null, the PointInWindowIsVisible() check fails if pointer warping is attempted on the root window, making the warping operation bail out early. Assume coordinates always lay inside the root window for this case, the actual position will be clamped later within screen coordinates anyway. Signed-off-by: Carlos Garnacho Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7c88977d338a01aca866e52c9e736f8857fb9ae4 Author: Michel Dänzer Date: Fri May 26 12:30:13 2017 +0900 glamor: Store the actual EGL/GLX context pointer in lastGLContext Fixes subtle breakage which could sometimes trigger after a server reset with multiple screens using glamor: Screen A enters glamor_close_screen last and calls various cleanup functions, which at some point call glamor_make_current to make sure screen A's GL context is current. This sets lastGLContext to screen A's &glamor_priv->ctx. Finally, glamor_close_screen calls glamor_release_screen_priv, which calls free(glamor_priv). Later, screen B enters glamor_init, which allocates a new glamor_priv. With bad luck, this can return the same pointer which was previously used for screen A's glamor_priv. So when screen B's glamor_init calls glamor_make_current, lastGLContext == &glamor_priv->ctx, so MakeCurrent isn't called for screen B's GL context, and the following OpenGL API calls triggered by glamor_init mess up screen A's GL context. The observed end result of this was a crash in glamor_get_vbo_space because glamor_priv->vbo didn't match the GL context, though there might be other possible outcomes. Assigning the actual GL context pointer to lastGLContext prevents this by preventing the false negative test in glamor_make_current. Reviewed-by: Keith Packard Reviewed-by: Eric Anholt commit d164c10850609c96fd46c8441efd40940b06dfe0 Author: Michel Dänzer Date: Thu May 25 16:19:35 2017 +0900 xfree86: Add Option "PreferCloneMode" When the default behaviour was changed from clone mode to horizontal extended layout, a boolean ScrnInfoRec member preferClone was introduced to choose the old default behaviour. Option "PreferCloneMode" allows setting this preferClone member. Reviewed-by: Alex Deucher commit 87db150d8a572d8983a234663aaaab9cb8b6c98d Author: Eric Anholt Date: Thu Jun 1 10:07:55 2017 -0700 glamor: Remove the "delayed fallback" code. The usage of this died with the old core rendering code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 72ddad7a97fa062bf9967d221c9a5520ebe33352 Author: Eric Anholt Date: Wed May 17 11:36:07 2017 -0700 glamor: Drop glamor_set_screen_pixmap(). All that was left here was updating the FBO's size. However, the FBO size was always set correctly already through glamor_set_pixmap_texture() from whoever had attached a new BO to the pixmap. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 49b12cb7360608b14caef5facb12f146d0bd15e6 Author: Eric Anholt Date: Wed May 17 11:33:16 2017 -0700 glamor: Stop tracking the screen_fbo. This means we no longer get "s" for on-screen drawing in glamor_debug, and there's only "m" (CPU memory) or "f" (Any GPU memory, aka FBOs). That seems fine to me. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit fd0d2523a33620b36cd478925ddac5cf70f9c409 Author: Eric Anholt Date: Tue May 9 15:33:21 2017 -0700 glamor_egl: Stop saving the EGL major/minor version. We don't use them for anything. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1f38a31ed3969471cbed69c61edb971f6cff5287 Author: Jon Turney Date: Sun May 7 20:53:04 2017 +0100 Add meson.build for XWin server (v2) This needs a meson with PRs #1784, #1792 and #1794 Future work: remove conditionals which are always on, and simplify redundant CYGDEBUG conditionals Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 36b9dac212a0f8a287cdbd35db152a5eb5cbc744 Author: Jon Turney Date: Tue May 9 12:59:19 2017 +0100 hw/xwin: Remove pretense of Xv support Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 793af4d3f945b1d59eb2f84e625b581ea90b0066 Author: Jon Turney Date: Sun May 7 20:31:55 2017 +0100 hw/xwin: Don't unconditionally include rootless.h Don't unconditionally include rootless.h, and so we don't need to add rootless to the include path unless building MWEXTWM. Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit d8ccfb132602be88e640cc87ea58496e0445aab7 Author: Eric Anholt Date: Thu Jun 1 16:46:02 2017 -0700 meson: Fix enabling of xshmfence. I misspelled the enable flag, so DRI3 would throw BadImplementation when you tried to start any GL app. Same as in c7be7a688a78a34f61b90c0d95914e14b90b0cdc, we also convert it to #ifdef for consistency. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 4f29366f1e5678505fb882143c9b4a892d5b8273 Author: Lyude Date: Tue May 30 16:39:49 2017 -0400 xwayland: Don't load extension list more than once When running an Xwayland server from the command line, we end up resetting the server every time all of the clients connected to the server leave. This would be fine, except that xwayland makes the mistake of unconditionally calling LoadExtensionList(). This causes us to setup the glxExtension twice in a row which means that when we lose our last client on the second server generation, we end up trying to call the glx destructors twice in a row resulting in a segfault: (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x70845bf] (EE) 2: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32897d) [0x1196e5bd] (EE) 3: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x328a45) [0x1196e745] (EE) 4: /usr/lib64/dri/swrast_dri.so (__driDriverGetExtensions_virtio_gpu+0x32665f) [0x11969f7f] (EE) 5: Xwayland (__glXDRIscreenDestroy+0x30) [0x54686e] (EE) 6: Xwayland (glxCloseScreen+0x3f) [0x5473db] (EE) 7: Xwayland (glxCloseScreen+0x53) [0x5473ef] (EE) 8: Xwayland (dix_main+0x7b6) [0x44c8c9] (EE) 9: Xwayland (main+0x28) [0x61c503] (EE) 10: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x72b1401] (EE) 11: Xwayland (_start+0x2a) [0x4208fa] (EE) 12: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x18 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Easy reproduction recipe: - Start an Xwayland session with the default settings - Open a window - Close that window - Open another window - Close that window - Total annihilation occurs Signed-off-by: Lyude Reviewed-by: Michel Dänzer Signed-off-by: Peter Hutterer commit 2fbf62b2fb3dcb29551251d09aa695715bb754f4 Author: Jason Gerecke Date: Fri May 26 14:27:19 2017 -0700 xfree86: Fix interpretation of xf86WaitForInput timeout Commit aa6717ce2 switched xf86WaitForInput from using select(2) to using poll(2). Before this change, the timeout was interpreted as being in microseconds; afterwards it is fed directly to xorg_poll which interprets it as being in milliseconds. This results in the function potentially blocking 1000x longer than intended. This commit scales down the timeout argument before passing it to xorg_poll, being careful to ensure the result is not rounded down due to integer division. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 96af794dc648eadcd596893412d7530e92cb5421 Author: Peter Hutterer Date: Fri May 5 09:04:35 2017 +1000 xfree86: up the path name size to 512 in xf86MatchDriverFromFiles ./hw/xfree86/common/xf86pciBus.c: In function ‘xf86MatchDriverFromFiles’: ../hw/xfree86/common/xf86pciBus.c:1330:52: warning: ‘snprintf’ output may be truncated before the last format character [-Wformat-truncation=] snprintf(path_name, sizeof(path_name), "%s/%s", ^~~~~~~ ../hw/xfree86/common/xf86pciBus.c:1330:13: note: ‘snprintf’ output between 2 dirent->d_name is 256, so sprintf("%s/%s") into a 256 buffer gives us: and 257 bytes into a destination of size 256 Signed-off-by: Peter Hutterer commit bf3a591fdc5c98f7cab232bf5ec39902947ae2e5 Author: Peter Hutterer Date: Mon May 8 10:07:51 2017 +1000 fb: remove some superfluous empty lines Signed-off-by: Peter Hutterer commit 933d80ba93cf9b5d32ce8673d60810c128debdab Author: Adam Jackson Date: Thu May 18 11:19:53 2017 -0400 misprite: Clean up some preprocessor abuse Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit 57c223002c61c8ceb84fa7a02a3c1579517996f3 Author: Adam Jackson Date: Thu May 18 11:19:52 2017 -0400 misprite: Remove some dead cache variables Unused since Keith ported misprite to damage in '04. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit d0675e96f1fc8501324c88afa648a9d394f35587 Author: Eric Anholt Date: Tue May 16 11:37:23 2017 -0700 glamor_egl: Drop glamor_egl_create_textured_screen_ext(). The function hasn't been doing anything useful since keithp's resource freeing fixes in 2014. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit c36f56808ffbefc4a3dcf61dfad17f62aeb8e16c Author: Eric Anholt Date: Wed May 17 17:06:44 2017 -0700 glamor_egl: Automatically choose a GLES2 context if desktop GL fails. GLES2 support has been requested multiple times, and we've had this code laying around trying to implement it. The GLES2 implementation is not quite there yet (some pixel transfer failures), but it shouldn't take much fixing at this point. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f6bf5f1c7475ff1b19b0e8c3e71c1224d5b6bc82 Author: Eric Anholt Date: Wed May 17 17:06:43 2017 -0700 glamor_egl: Remove check for KHR_surfaceless_context_* Those extensions don't exist. There's only surfaceless_context. Signed-off-by: Eric Anholt Reviewed-by: Emil Velikov commit 6e793ae08510639d011f638bcfc5246b9cccd1ae Author: Eric Anholt Date: Tue May 16 11:37:21 2017 -0700 glamor_egl: Drop warning about indirect GLX and GLES2. Indirect GLX uses its own context and doesn't care what glamor is using. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 59de50d6ef3331ee03eb82d4acba45aa75c70d42 Author: Eric Anholt Date: Tue May 16 11:37:20 2017 -0700 glamor_egl: Avoid flink names in glamor_egl_create_textured_pixmap(). Using flink is banned on render nodes, and they needlessly expose our screen pixmap contents to any authenticated client. This also incidentally drops the dependency on EGL_MESA_drm_image. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5d6f17d913bd4de0b4594585c0a8ba4f717a2a78 Author: Eric Anholt Date: Tue May 16 11:37:19 2017 -0700 glamor_egl: Drop dead "cpp" field It's been unused since the initial import. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 37618e810b70c24bb8a97dce844963ed1a99f897 Author: Eric Anholt Date: Tue May 16 11:37:18 2017 -0700 glamor_egl: Drop dead gl_context_depth. This was replaced in 4afe15d8bfd575c010ed1868697a7922a37ab378, but not deleted. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit a6a751e5d8962b01abc2a92ec35300f68cb38d94 Author: Eric Anholt Date: Tue May 16 11:37:17 2017 -0700 glamor_egl: Drop unnecessary check for KHR_gl_renderbuffer_image. I couldn't find it being used anywhere in the history of the code. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 40a153ee452390f713f7e5638af320a70defe106 Author: Eric Anholt Date: Tue May 16 11:37:16 2017 -0700 glamor_egl: Always require the gbm-based image import path. This has been associated with dri3 for now, but we need to use it elsewhere in order to avoid flink. The extensions have been implemented for long enough that I couldn't find when it was that we turned them on. Oddly, we already required renderbuffer import support, which is basically as hard to implement as texture import. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt Acked-by: Daniel Stone commit b1b71b7a8b2d2c5d8f4afa67b75d10d4e7cbaa20 Author: Eric Anholt Date: Tue May 16 11:37:15 2017 -0700 glamor_egl: Drop the has_gem flag. We're using GBM, so we know we've got GEM. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 32957d9faeb8b0e968a23d91ed7391c0465dd1b9 Author: Eric Anholt Date: Tue May 16 11:37:14 2017 -0700 modesetting: Drop code for GLAMOR && !GLAMOR_HAS_GBM. The glamor_egl module that the GLAMOR paths are using is only built if GLAMOR_HAS_GBM is true, and there's no plan for implementing the module without GBM. Simplify modesetting's code as a result. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5102ea38eb7331aeb1258cd148fd374cf0cbf8f2 Author: Eric Anholt Date: Tue May 16 11:37:13 2017 -0700 glamor_egl: Unifdef GLAMOR_HAS_GBM. We only build this code with GBM, and supporting non-GBM well would be invasive. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5064153c79d8b18767c0ade7635680a2f396f296 Author: Eric Anholt Date: Tue May 16 11:37:12 2017 -0700 glamor_egl: Print a useful identifying string on initialization. The EGL version is not used anywhere in the glamor code, so it's not interesting. And when saying that we've started using GL acceleration, it's nice to know what GL we're actually using. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit fd96ff7fb325f54cb06c2bf5b8c37c75457b5c42 Author: Jon Turney Date: Tue Apr 18 10:44:55 2017 +0100 hw/xwin: Fix -Wunused-function warning for MessageName() in non-debug builds ../hw/xwin/winmultiwindowwm.c:188:1: warning: ‘MessageName’ defined but not used [-Wunused-function] Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit e49f5947eda578d8b029f42fb4ec9c90f413b4b3 Author: Jon Turney Date: Tue Apr 18 10:45:07 2017 +0100 hw/xwin: Fix -Wmaybe-uninitialized warnings in engine CloseScreen wrappers ../hw/xwin/winshadgdi.c: In function ‘winCloseScreenShadowGDI’: ../hw/xwin/winshadgdi.c:632:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadgdi.c:579:10: note: ‘fReturn’ was declared here ../hw/xwin/winshadddnl.c: In function ‘winCloseScreenShadowDDNL’: ../hw/xwin/winshadddnl.c:711:12: warning: ‘fReturn’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winshadddnl.c:661:10: note: ‘fReturn’ was declared here Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 319daa7a9fa8bcfdefb08d7770912775af22ad99 Author: Jon Turney Date: Wed Apr 19 13:30:27 2017 +0100 hw/xwin: Fix -Wmaybe-uninitialized warning in winWindowProc This is possibly an actual bug in failing to check we successfully retrieved the monitor size before using it to set the X screen size. ../hw/xwin/winwndproc.c: In function ‘winWindowProc’: ../hw/xwin/winwndproc.c:283:55: warning: ‘dwHeight’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:32: note: ‘dwHeight’ was declared here ../hw/xwin/winwndproc.c:281:54: warning: ‘dwWidth’ may be used uninitialized in this function [-Wmaybe-uninitialized] ../hw/xwin/winwndproc.c:240:23: note: ‘dwWidth’ was declared here Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 7a90c9b24e6776c8f1fa43df4268f79a465c0d4e Author: Jon Turney Date: Tue Apr 18 10:32:31 2017 +0100 xfree86: Hide unused variables when !XSERVER_LIBPCIACCESS ../hw/xfree86/common/xf86Config.c: In function ‘xf86HandleConfigFile’: ../hw/xfree86/common/xf86Config.c:2278:10: warning: unused variable ‘singlecard’ [-Wunused-variable] ../hw/xfree86/common/xf86Config.c:2277:17: warning: unused variable ‘scanptr’ [-Wunused-variable] Signed-off-by: Jon Turney Reviewed-by: Yaakov Selkowitz commit 7a19a3e093a62a779c3cab8c28930adcb1604e0d Author: Peter Hutterer Date: Mon May 8 10:24:34 2017 +1000 xfree86: build a shared lib identical to Xorg Because we can use a shared lib in dlsym() for the symbol loader test, but we can't use the executable. v2: Drop a stray ' ' and rebase on 820a4cbe9fe, by anholt Signed-off-by: Peter Hutterer Reviewed-by: Eric Anholt commit 49c742557457ff9200a10f32daadfcea50d4911c Author: Adam Jackson Date: Thu May 11 17:17:55 2017 -0400 meson: Fix CLOCK_MONOTONIC test C99 isn't enough on its own to get POSIX feature sets defined. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Tested-by: Pekka Paalanen commit 152375f4e4f1ee4833129802730b36af8d0f7e1a Author: Adam Jackson Date: Thu May 11 17:17:54 2017 -0400 os, xfree86: Stop being so weird about Whatever problem this is trying to fix, we don't care. Just include the thing and stop worrying about whether _POSIX_SOURCE is defined. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith Reviewed-by: Julien Cristau Tested-by: Pekka Paalanen commit d9e23ea4228575344e3b4c0443cecc5eb75356e4 Author: Keith Packard Date: Wed May 10 21:50:45 2017 -0700 dix: Remove clients from input and output ready queues after closing Delay removing the client from these two queues until all potential I/O has completed in case we mark the client as ready for reading or with pending output during the close operation. Bugzilla: https://bugs.freedesktop.org/100957 Signed-off-by: Keith Packard Tested-by: Nick Sarnie Reviewed-by: Michel Dänzer commit c394f6b27329d212d2a8b9b3c6da1ef7847c46f3 Author: Julien Cristau Date: Thu May 11 08:42:16 2017 +0200 Replace all checks for 'linux' macro with '__linux__' gcc -std=c99 does not define the former, and it's a horrible namespace confusion anyway. Signed-off-by: Julien Cristau Reviewed-by: Adam Jackson Tested-by: Pekka Paalanen commit 6634ffc4d26846dcf892f27682f9021f6d9956a9 Author: Julien Cristau Date: Thu May 11 08:42:15 2017 +0200 Drop workaround for pre-glibc linux It seems unlikely anyone still needs to build against libc4/libc5. Reviewed-by: Adam Jackson Signed-off-by: Julien Cristau commit 318257029578a30e29c191befa94a20ad07f97d4 Author: Frank Binns Date: Thu May 11 14:00:19 2017 +0100 hw/xfree86: fix comment typo Signed-off-by: Frank Binns commit 0848390d51f93ecfb9342cffe1cda46a65cfc07b Author: Adam Jackson Date: Wed May 10 11:14:57 2017 -0400 xephyr: Fix regeneration I had said: commit c42311a9d7d2e5a67bdb7f4fa32032b4feba59b1 Author: Adam Jackson Date: Fri Mar 24 15:58:54 2017 -0400 kdrive: Remove KdOsFuncs Only the Init slot was used, and Xephyr can just as easily do that initialization directly. And I'd've been right, but I forgot to make that initialization only happen on startup (i.e. when serverGeneration == 1). Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Adam Jackson commit 0ff2fb128bf35dffaa302f15e9ae004b65ee0827 Author: Peter Harris Date: Tue May 9 19:39:47 2017 -0400 meson: Detect strlcat/strlcpy/reallocarray in libbsd If we're linking with libbsd anyway, we might as well use the functions it provides instead of compiling our replacements. Signed-off-by: Peter Harris Reviewed-by: Eric Anholt commit c4c002d1ca80bd69776387dafb9c5bb082c72e48 Author: Peter Harris Date: Tue May 9 19:39:46 2017 -0400 meson: Only detect each function once Use conf_data outside of include/ to avoid re-running detection of the same functions. Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit 03d6275e6094a5ede5a70f05bbbdde653a9fd9e0 Author: Peter Harris Date: Tue May 9 19:39:45 2017 -0400 meson: Detect more functions Set HAVE_REALLOCARRAY, HAVE_SIGACTION, HAVE_STRCASESTR, HAVE_STRLCAT, HAVE_STRLCPY, HAVE_TIMINGSAFE_MEMCMP, and BUSFAULT. Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit ba1599610b1889545be8a9314dce8a740a2764d3 Author: Peter Harris Date: Tue May 9 19:39:44 2017 -0400 meson: Detect arc4random_buf Reviewed-by: Eric Anholt Signed-off-by: Peter Harris commit e67ca940473e249c7b9712ce6d515310ed1e4cf9 Author: Jon TURNEY Date: Mon May 8 11:40:22 2017 +0100 meson: An empty array is not a dependency object Using the meson idiom of initializing a variaible to an empty array to represent a null value does not work well for a variable expected to hold a dependency object, as trying to apply found() to it will fail (currently). I think this can be demonstrated by configuing with Dglamor=no, then gbm_dep is set to [] in meson.build, and then tested with found() in include/meson.build. Use dependency('') to create an empty dependency. Future work: In the autotools build GBM is required if build_xorg & build_glamor. I suspect that it was also required for build_xwayland & build_glamor, but that was never checked. That test seems to have gone missing in meson.build, the required:false when checking for gbm should possibly be dropped? Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit 16054647abfc9fe5f71d0098e17415e45fa28199 Author: Jon TURNEY Date: Mon May 8 11:40:21 2017 +0100 meson: Refine build_dbus As in autotools build, only turn on build_dbus (build dbus-core.c) if it's needed by build_hal or build_systemd_logind, not just because dbus is available. Building dbus-core.c without NEED_DBUS defined fails, as the contents of dbus-core.h are turned off. Signed-off-by: Jon Turney Acked-by: Eric Anholt commit 820a4cbe9fef36bc97a7107ccc74a785180e227a Author: Jon TURNEY Date: Tue May 9 12:23:48 2017 +0100 meson: Make driprotos and libdrm optional Add options for DRI{1,2,3} shmfence is required for DRI3 libdrm is required for any DRI{1,2,3} Consolidate calls to dependency('libdrm') Set WITH_LIBDRM when building with libdrm v2: Initialize libxserver_dri3 to [] Manually flatten libxserver, since meson doesn't (currently) Use version_compare rather than circumloctions with dependency() Signed-off-by: Jon Turney Reviewed-by: Eric Anholt commit fdb11e2274f1d1069cdc9ff7b3655288c1b42cf4 Author: Jon TURNEY Date: Mon May 8 11:40:18 2017 +0100 meson: Don't require xf86dgaproto This dependency is never used, and build_dga is hardwired to false later on, anyhow. Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit 5bff2a68560837fc402905fef6244ce794c47843 Author: Jon TURNEY Date: Mon May 8 11:40:17 2017 +0100 meson: Nettle is required if it's the only SHA1 choice Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit 95e5fa04762fa0f04ac1349708d9e33c30205a96 Author: Jon TURNEY Date: Mon May 8 11:40:16 2017 +0100 meson: Remove stray whitespace Reviewed-by: Eric Anholt Signed-off-by: Jon Turney commit e9dbecf7c259f7e8b610fa93f97ea55f5dafa7af Author: Adam Jackson Date: Wed May 10 10:56:16 2017 -0400 timingsafe_memcmp: Fix meson build Include dix-config.h first to pick up _GNU_SOURCE so we get the definition for sigset_t. Reported-by: Pekka Paalanen Signed-off-by: Adam Jackson commit 5d3b6cc221aff5b9322b31aa6f5ae922271bc7d8 Author: Karol Kosik Date: Wed Jul 22 16:42:07 2015 -0700 xfree86: Improved autoconfig drivers matching Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. v2: Re-commit the patch reverted in 2388f5e583d4ab2ee12f2b087d381b64aed3f7d5, with Aaron Plattner's fix squashed in (by anholt). Signed-off-by: Karol Kosik Signed-off-by: Aaron Plattner Signed-off-by: Eric Anholt Reviewed-by: Aaron Plattner (v1) Reviewed-by: Emil Velikov (v1) Tested-by: Peter Hutterer Tested-by: Eric Anholt commit 2388f5e583d4ab2ee12f2b087d381b64aed3f7d5 Author: Eric Anholt Date: Tue May 9 13:37:59 2017 -0700 Revert "xfree86: Improved autoconfig drivers matching" This reverts commit 112d0d7d01b98fb0d67910281dd1feeec125247b. It broke Xorg for Adam, Peter, and myself, by failing hard when a module load failed. Signed-off-by: Eric Anholt commit 1dd14e7a499428cf7215b49a9319199545bcd6cb Author: Eric Anholt Date: Mon May 8 10:36:30 2017 -0700 meson: Use link_whole() not link_with(), for the Xorg dixmods. I clearly hadn't run ninja test, since fb no longer had any of the fb symbols in it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit a06bb73053d9df56d9070ce325a43af3a3c7a6a2 Author: Lyude Date: Thu May 4 18:04:31 2017 -0400 xwayland: Unconditionally initialize lists in init_tablet_manager_seat() In the event that xwayland gets launched on a wayland compositor that doesn't yet have support for wp_tablet_manager, we end up skipping the initialization of the lists. This is wrong, because regardless of whether or not a tablet is present we still attempt to traverse these lists later in xwl_set_cursor(), expecting that if the lists are empty from no tablet manager that we simply won't execute any loop iterations. (EE) (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x3b) [0x4982f9] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7f73722545bf] (EE) 2: Xwayland (xwl_set_cursor+0x9f) [0x429974] (EE) 3: Xwayland (miPointerUpdateSprite+0x261) [0x4fe1ca] (EE) 4: Xwayland (mieqProcessInputEvents+0x239) [0x4f8d33] (EE) 5: Xwayland (ProcessInputEvents+0x9) [0x4282f0] (EE) 6: Xwayland (Dispatch+0x42) [0x43e2d4] (EE) 7: Xwayland (dix_main+0x5c9) [0x44c6dc] (EE) 8: Xwayland (main+0x28) [0x61c523] (EE) 9: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f7371e9d401] (EE) 10: Xwayland (_start+0x2a) [0x4208fa] (EE) 11: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x28 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Reproduced when trying to run upstream xwayland under fedora 25's weston package. Signed-off-by: Lyude Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5f83b951ac7e0e6bbd766a9bb860283e32808c90 Author: Jon TURNEY Date: Thu May 4 13:46:26 2017 +0100 meson: Fix typo in xephyr option description Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit ce6741f6ac63493d6b903f8f58b83bf571baf4b9 Author: Jon TURNEY Date: Thu May 4 13:46:25 2017 +0100 meson: Fix typoed filename Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 492534813302ef95538f485401fbcf6eccbd0026 Author: Jon TURNEY Date: Thu May 4 13:46:24 2017 +0100 meson: Make xf86vidmode optional Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 3b3ce4a55b0c1f83eff37fb8544156e8961f3fa3 Author: Jon TURNEY Date: Thu May 4 13:46:23 2017 +0100 meson: Test to build xserver_poll.c was inverted Test to build xserver_poll.c was inverted compared to autoconf. Build xserver_poll.c if poll is missing. Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 4b7dd6d1aa53bdeee2e3fd0c0a73f6ce40495682 Author: Adam Jackson Date: Wed May 3 15:40:08 2017 -0400 Makefile.am: make 'make distcheck' verify the meson build Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Peter Hutterer commit 111a5615a60565f7b68a7fa69dbac3d289d80c9e Author: Peter Hutterer Date: Wed May 3 15:40:07 2017 -0400 Makefile.am: add the meson files to the tarball While we're shipping both build systems, we'll likely have 'make dist' generated tarballs - those tarballs should be buildable with meson to have more exposure. List them all explicitly since the list isn't likely to change much. Signed-off-by: Peter Hutterer Reviewed-by: Eric Engestrom Reviewed-by: Eric Anholt commit 11c133aafe63c776bde502057243d67fe2c630c8 Author: Eric Anholt Date: Wed May 3 15:33:46 2017 -0700 meson: Fix kdrive build. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b7376fb933ac1b0c1771535c14cf77029eccb7f5 Author: Adam Jackson Date: Fri Mar 24 15:58:55 2017 -0400 kdrive: Remove dead slots from KdCardFuncs Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c42311a9d7d2e5a67bdb7f4fa32032b4feba59b1 Author: Adam Jackson Date: Fri Mar 24 15:58:54 2017 -0400 kdrive: Remove KdOsFuncs Only the Init slot was used, and Xephyr can just as easily do that initialization directly. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c0375dced38674ed98562529530d89ff02c48100 Author: Adam Jackson Date: Fri Mar 24 15:58:53 2017 -0400 kdrive: static and dead code cleanup Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d732c36597fab2e9bc4f2aa72cf1110997697557 Author: Adam Jackson Date: Thu Apr 27 14:45:25 2017 -0400 xfree86: Silence a new glibc warning glibc would like to stop declaring major()/minor() macros in because that header gets included absolutely everywhere and unix device major/minor is perhaps usually not what's expected. Fair enough. If one includes as well then glibc knows we meant it and doesn't warn, so do that if it exists. Signed-off-by: Adam Jackson commit c3147a20065b212fac78eb29c9bb9e150f9b22f5 Author: Adam Jackson Date: Thu Apr 27 14:45:24 2017 -0400 dmx: Fix decl mismatch for XRT_WINDOW Building xserver with meson -Db_lto=true found this! Check it: ../hw/dmx/dmx.c:66:22: warning: type of ‘XRT_WINDOW’ does not match original declaration [-Wlto-type-mismatch] extern unsigned long XRT_WINDOW; ^ ../include/resource.h:58:18: note: type ‘RESTYPE’ should match type ‘long unsigned int’ typedef uint32_t RESTYPE; ^ ../Xext/panoramiX.c:85:9: note: ‘XRT_WINDOW’ was previously declared here RESTYPE XRT_WINDOW; ^ ../Xext/panoramiX.c:85:9: note: code may be misoptimized unless -fno-strict-aliasing is used I have never managed successfully to build xserver with LTO with autotools, so, score one for meson. Get the decl from panoramiXsrv.h, which includes panoramiX.h first anyway. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit ea275cd3d5fb561c6aed7876f486e1124082426c Author: Eric Anholt Date: Fri Apr 28 15:09:38 2017 -0700 meson: Fix glx build with DRI2 disabled. A common meson pattern is to use empty arrays for optional sources and dependencies, since it generally iterates over trees of arrays looking for values. A value of '' will actually go looking for ''. Daniel Stone Signed-off-by: Eric Anholt commit 62f727c7ea359b7bdf58d9b827731a082b47553d Author: Eric Anholt Date: Fri Apr 28 15:09:37 2017 -0700 meson: use link_with for Xorg's shared modules as well as Xorg. I converted Xorg when meson 0.40 came out, but fumbled my grep and forgot that I had instances of the .extract_all_objects() workaround in dixmods, too. Signed-off-by: Eric Anholt Reviewed-by: Daniel Stone commit e2f68296ffb8e40035c0ebd949b67d1e2e424e11 Author: Keith Packard Date: Sat Apr 29 00:26:10 2017 -0700 os: Mark client as ready to read when closing due to write failure [100863] This makes sure the server will go look at the client again, notice that the FD is no longer valid and close the client down. Bugzilla: https://bugs.freedesktop.org/100863 Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit a82971b07035ee9a4e3ed01326e7c1eab34b5a19 Author: Keith Packard Date: Sat Apr 29 00:21:47 2017 -0700 os: un-duplicate code to close client on write failure There are three copies of the same short sequence of operations to close down a client when a write error occurs. Create a new function, AbortClient, which performs these operations and then call it from the three places. Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit 8475e6360ce31551d50fd63a26f7a44d1e8928f2 Author: Peter Hutterer Date: Tue Feb 7 15:04:46 2017 +1000 xwayland: add tablet pad support Hooked up a bit differently to the other tools. Those tools can be static for all and be re-used. The wacom driver initializes the pad with the correct number of buttons though and we can't do this until we have the pad done event. If the tablet is removed and we plug a different one in, we should initialize that correctly, so unlike the other tools the pad is properly removed and re-initialized on plug. Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit f471b5b8eb451b442554517c7cb6f0aa90d218c4 Author: Carlos Garnacho Date: Fri Nov 4 19:58:04 2016 +0100 xwayland: update cursor on tablet tools in proximity Each xwl_tablet_tool gets a xwl_cursor, as on wayland each of those will get an independent cursor that can be set through zwp_tablet_tool.set_cursor. However, all tools (and the pointer) share conceptually the same VCP on Xwayland, so have cursor changes trigger a xwl_cursor update on every tool (and the pointer, again). Maybe Xwayland could keep track of the most recent device and only update that cursor to get better visual results, but this is simpler, and it's going to be odd anyway... Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 6d1ad39fe6c18220dd39b0653fd1e4145140e2dc Author: Carlos Garnacho Date: Fri Nov 4 19:36:10 2016 +0100 xwayland: Refactor cursor management into xwl_cursor This struct takes away the cursor info in xwl_seat, and has an update function so we can share the frame handling code across several xwl_cursors. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 773b04748d0c839bc8b12e33f74bb8d11c447f5b Author: Peter Hutterer Date: Tue Feb 7 12:23:46 2017 +1000 xwayland: handle button events after motion events Make sure the button events are sent after the motion events into the new position. Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 8a1defcc634daddbb3570519d69ec5c9e39a8b56 Author: Jason Gerecke Date: Fri Oct 14 14:31:46 2016 -0700 xwayland: Handle tablet_tool events Translates Wayland tablet events into corresponding X11 tablet events. As with the prior commit, these events are modeled after those created by the xf86-input-wacom driver to maximize compatibility with existing applications. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 5812d1c28f4fb7b7de8b96a81415a21425561fd4 Author: Jason Gerecke Date: Fri Jan 15 17:01:38 2016 -0800 xwayland: Handle wp_tablet events Creates and maintains the canonical trio of X devices (stylus, eraser, and cursor) to be shared by all connected tablets. A per-tablet trio could be created instead, but there are very few benefits to such a configuration since all tablets still ultimately share control of a single master pointer. The three X devices are modeled after those created by xf86-input-wacom but use a generic maximum X and Y that should be large enough to accurately represent values from even the largest currently-available tablets. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 47c4415912b5b16b115135be365beb370858df76 Author: Jason Gerecke Date: Fri Oct 14 14:50:18 2016 -0700 xwayland: Listen for wp_tablet_seat events The wp_tablet_seat interface provides us with notifications as tablets, tools, and pads are connected to the system. Add listener functions and store references to the obtained devices. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 7d48b758a601ce0252ebd21297a7c42263adfaaf Author: Jason Gerecke Date: Fri Jan 15 17:29:37 2016 -0800 xwayland: Bind to wp_tablet_manager if available and get its seats If we're notified about the existence of the wp_tablet_manager interface, we bind to it so that we can make use of any tablets that are (or later become) available. For each seat that exists or comes into existance at a later point, obtain the associated tablet_seat. Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 89c841915ac4fba6d2a5ad0051c778f1a76ffbf3 Author: Jason Gerecke Date: Thu Oct 13 10:39:46 2016 -0700 xwayland: Depend on wayland-protocols to build tablet protocol headers Signed-off-by: Jason Gerecke Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Acked-by: Ping Cheng commit 59554eaa6c4d3d3c170a4be4fc385a86d05c5558 Author: Adam Jackson Date: Thu Apr 27 13:23:56 2017 -0400 meson: Build libvbe.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2f1a1be46c3366a47657fe7550bc59fb99acf91c Author: Adam Jackson Date: Thu Apr 27 13:19:11 2017 -0400 meson: Build libshadowfb.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit bdce17959cd17fa6d46a1df361b53b5855ff62e8 Author: Adam Jackson Date: Thu Apr 27 13:15:55 2017 -0400 meson: Build libvgahw.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 5c7d92362b25670856091663e70d3e0dc2350efb Author: Adam Jackson Date: Thu Apr 27 13:10:33 2017 -0400 meson: Build libfbdevhw.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6413a87bcd3bfb91ac1536b41c37af0c6e47a9b6 Author: Adam Jackson Date: Thu Apr 27 12:58:54 2017 -0400 meson: Build libwfb.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1597297067fd14d479a2279ad1ab20082317271a Author: Adam Jackson Date: Thu Apr 27 12:50:13 2017 -0400 meson: Build libglx.so Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 47f047462dcb492203ff569a2b1528bff8cd3ff3 Author: Adam Jackson Date: Thu Apr 27 11:49:11 2017 -0400 meson: Fix linking the dmx utilities Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 5d785693a8843d18be806ea9f8caecc2dcbf1007 Author: Adam Jackson Date: Thu Apr 27 11:47:11 2017 -0400 meson: Factor out the AC_REPLACE_FUNCS stuff to its own library This is all just stuff we wish we had in libc, and some of this gets used in eg. the dmx utilities build, so split it to its own library to avoid pulling in xserver stuff. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 8659aac2ccc6649477f601908e1a4062fad8635e Author: Adam Jackson Date: Thu Apr 27 12:52:29 2017 -0400 meson: Fix a typo "bulid" isn't valid anything, and build_xwayland was already defined above. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 112d0d7d01b98fb0d67910281dd1feeec125247b Author: Karol Kosik Date: Wed Jul 22 16:42:07 2015 -0700 xfree86: Improved autoconfig drivers matching Implementation of new drivers matching algorithm. New approach doesn't add duplicate drivers and ease drivers matching phase. Signed-off-by: Karol Kosik Reviewed-by: Aaron Plattner Reviewed-by: Emil Velikov commit 1549e30372756cfdb85379fd8d93c769297ab6e6 Author: Eric Anholt Date: Sat Mar 11 10:24:04 2017 -0800 Add a Meson build system alongside autotools. This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest, and Xdmx so far. The outline of Xquartz/Xwin support is in tree, but hasn't been built yet. The unit tests are also not done. The intent is to build this as a complete replacement for the autotools system, then eventually replace autotools. meson is faster to generate the build, faster to run the bulid, shorter to write the build files in, and less error-prone than autotools. v2: Fix indentation nits, move version declaration to project(), use existing meson_options for version-config.h's vendor name/web. Signed-off-by: Eric Anholt Acked-by: Keith Packard Reviewed-by: Peter Hutterer commit c7be7a688a78a34f61b90c0d95914e14b90b0cdc Author: Eric Anholt Date: Tue Apr 25 16:03:00 2017 -0700 Use #ifdef instead of #if for features to make Meson easier. We mostly use #ifdef throughout the tree, and this lets the generated config.h files just be #define TOKEN instead of #define TOKEN 1. Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit ace6bfd5901e19045371f9bd18b997b37f55b589 Author: Eric Anholt Date: Tue Apr 25 16:02:59 2017 -0700 dix: Remove a redundant #define Found when the meson conversion set the symbol to defined, instead of defined to 1. Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 27a6b9f7c84c914d0f5909ec1069d72f5035bc04 Author: Michel Dänzer Date: Wed Apr 26 18:31:08 2017 +0900 os: Handle SIGABRT Without this, assertion failures can make life hard for users and those trying to help them. v2: * Change commit log wording slightly to "can make life hard", since apparently e.g. logind can alleviate that somewhat. * Set default handler for SIGABRT in hw/xfree86/common/xf86Init.c:InstallSignalHandlers() and hw/xquartz/quartz.c:QuartzInitOutput() (Eric Anholt) Reviewed-by: Eric Anholt Signed-off-by: Michel Dänzer commit 23f2f1932a1d3f36468eaf735ae34934d246567b Author: Eric Anholt Date: Tue Apr 25 11:33:50 2017 -0700 modesetting: Add the "DPI" connector type. The number for it was merged to drm_mode.h in kernel 4.7, and the output_names[] array just requires that we slot in new strings in order. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit fec9607c8e0a84dc86466c638d00b502f21ec622 Author: Eric Anholt Date: Fri Apr 21 12:03:45 2017 -0700 Remove support for unaligned swaps. The previous misc.h code went out of its way to allow swapping of unaligned pointers to values. However, the members of an X request/response are always naturally aligned within the struct, and the buffers containing a request/response will also be aligned to at least 8 bytes, so we can just drop it. text data bss dec hex filename before: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg after: 2214919 51552 132016 2398487 249917 hw/xfree86/Xorg Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4552238960fc05ff885bcabbc24d1489370fbd89 Author: Eric Anholt Date: Tue Mar 28 13:09:30 2017 -0700 Add unit tests for the byte swapping macros. Peter noted a weirdness in my new bswap code, which could use some tests to justify it. Signed-off-by: Eric Anholt Reviewed-by: Peter Hutterer commit 563b6ee873b898c0f3e3671cf6adaf91def5d92a Author: Eric Anholt Date: Mon Mar 27 14:59:06 2017 -0700 Rewrite the byte swapping macros. The clever pointer tricks were actually not working, and we were doing the byte-by-byte moves in general. By just doing the memcpy and obvious byte swap code, we end up generating actual byte swap instructions, thanks to optimizing compilers. text data bss dec hex filename before: 2240807 51552 132016 2424375 24fe37 hw/xfree86/Xorg after: 2215167 51552 132016 2398735 249a0f hw/xfree86/Xorg Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 5ef4e785131bb30e774a8175099c0432537533fa Author: Eric Anholt Date: Fri Mar 31 17:38:27 2017 -0700 Remove default defines of some directories. The build defines these, so having the defaults is just a way for the build system's configuration to get out of sync with the code. v2: Drop #ifndefs around the other two defines. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit da27ca84b4324b68037d6ec19a73b9e0a5ef10bc Author: Eric Anholt Date: Fri Mar 31 17:33:52 2017 -0700 xorg: Change __XCONFIGFILE__ to XCONFIGFILE (and DIR) to fix scan.c. parser/scan.c was checking for #ifdef XCONFIGFILE and XCONFIGDIR and defaulting to "xorg.conf", and "xorg.conf.d", so if you had changed __XCONFIGFILE__ to anything else, it would have got out of sync. Settle on the name without gratuitous underscores. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f81343dd2fff49c70f53e3efdd40f8f89a38e460 Author: Alan Coopersmith Date: Sat Apr 22 18:10:42 2017 -0700 Mark test_data static in Xinput protocol tests to avoid clashes Fixes warning from Solaris linker: ld: warning: symbol 'test_data' has differing sizes: (file tests-protocol-xigetselectedevents.o value=0x418; file tests-protocol-xigetclientpointer.o value=0x18); tests-protocol-xigetselectedevents.o definition taken Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7bfb87a2137853295ecc9e544a15626cfd773a02 Author: Olivier Fourdan Date: Fri Apr 21 09:05:51 2017 +0200 glamor: an FBO is not needed for Xv pixmaps It appears that on some hardware/diver combo such as nv30/nouveau, using GL_ALPHA as format for 8-bit depth will cause an incomplete attachment error (GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT) when trying to bind the texture. As a result, the FBO is NULL and glamor segfaults when trying to access the FBO width/height in pixmap_priv_get_scale() in glamor_xv_render(). This happens with glamor-xv which uses 8-bit pixmaps, meaning that on such hardware/driver, trying to play a video using Xv will lead to a crash of the Xserver. This affects Xwayland, Xephyr, modesetting driver with glamor accel. But the use of an FBO is not actually needed for glamox-xv, so by disabling FBO at pixmap creation, we can avoid the issue entirely. Fix suggested by Eric Anholt Signed-off-by: Olivier Fourdan Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100710 Fixes: https://bugzilla.redhat.com/1412814 Reviewed-by: Eric Anholt commit be80a3cb48a7860b9ed985b123f4d8a3b4ae3c89 Author: Eric Anholt Date: Mon Mar 27 14:21:43 2017 -0700 glx: Use the same endian swapping as the rest of the server. This dumps a ton of configure-time checks for system endian macros. Given that we're marking the mixed-endian fixup code as cold, getting at the system macros is a waste of code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit dae97e1bb4d4f86db118c22dfeea0eef0d3f8bdd Author: Eric Anholt Date: Thu Mar 23 17:06:17 2017 -0700 configure: Stop checking for XdmcpWrap As far back as the initial import, it seems to have been exposed, and there's no explanation why the test happened in the initial xserver import. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit cc882af336c8963a2cba0c93e29869ef59b19818 Author: Roman Gilg Date: Tue Apr 11 15:52:58 2017 +0200 xwayland: Small comment edit Be more precise in describing the return value. Signed-off-by: Roman Gilg Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit 41dafcc2a2942fc4c94ce3cbafc4a1b413c460c3 Author: Michel Dänzer Date: Wed Apr 12 17:58:05 2017 +0900 xfree86/modes: Make colormap/gamma glue code work with RandR disabled E.g. because Xinerama is enabled. Fixes crash on startup and wrong colours in that case. Bugzilla: https://bugs.freedesktop.org/100293 Bugzilla: https://bugs.freedesktop.org/100294 Fixes: 62f44052573b ("xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2") Tested-by: Mariusz Bialonczyk Reviewed-by: Alex Deucher commit bcee1b76aa0db8525b491485e90b8740763d7de6 Author: Martin Peres Date: Mon Apr 10 16:48:21 2017 +0300 modesetting: re-set the crtc's mode when link-status goes BAD Despite all the careful planning of the kernel, a link may become insufficient to handle the currently-set mode. At this point, the kernel should mark this particular configuration as being broken and potentially prune the mode before setting the offending connector's link-status to BAD and send the userspace a hotplug event. This may happen right after a modeset or later on. Upon receiving a hot-plug event, we iterate through the connectors to re-apply the currently-set mode on all the connectors that have a link-status property set to BAD. The kernel may be able to get the link to work by dropping to using a lower link bpp (with the same display bpp). However, the modeset may fail if the kernel has pruned the mode, so to make users aware of this problem a warning is outputed in the logs to warn about having a potentially-black display. This patch does not modify the current behaviour of always propagating the events to the randr clients. This allows desktop environments to re-probe the connectors and select a new resolution based on the new (currated) mode list if a mode disapeared. This behaviour is expected in order to pass the Display Port compliance tests. Signed-off-by: Martin Peres Reviewed-by: Eric Anholt commit ea91996a9c2081d0692f5c2f79a9fda9effba358 Author: Daniel Stone Date: Tue Apr 11 07:55:00 2017 +0100 README: Add link to fd.o CoC The Contributor Covenant applies to all fd.o-hosted resources, including lists and Bugzilla. Add a note to the README, reminding people to act like human beings. Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit 8bdf340e478524262c85fb81687d7f02b14ad71c Author: Daniel Stone Date: Tue Apr 11 07:54:59 2017 +0100 README: HTTPS everywhere All fd.o HTTP services are now HTTPS-only (with redirects, but still). Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit 14d2fe74f4e51c5b37eab4b7475c804a0340b530 Author: Adam Jackson Date: Fri Apr 7 10:24:54 2017 -0400 xephyr: Check for host XVideo support before trying to use it Otherwise xcb will treat our attempt to send xv requests as a connection error (quite reasonably: we're asking it to emit a request for which there is no defined major opcode), and we'll die quietly the first time we hit KdBlockhandler. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 7dfb9608d080b46a7b21b57dc8aa2f52670addce Author: Adam Jackson Date: Wed Apr 5 13:21:10 2017 -0400 glx: Remove enter/leave server API Dead code since: commit 8aacf47e1778d8b72811b025a82452b933d3c1f2 Author: Adam Jackson Date: Fri Oct 4 12:58:19 2013 -0400 glx: Remove DRI1 AIGLX (v2) Signed-off-by: Adam Jackson commit 0c8e6ed85810e96d84173a52d628863802a78d82 Author: Daniel Stone Date: Fri Apr 7 14:27:58 2017 +0100 modesetting: Set correct DRM event context version DRM_EVENT_CONTEXT_VERSION is the latest context version supported by whatever version of libdrm is present. modesetting was blindly asserting it supported whatever version that may be, even if it actually didn't. With libdrm 2.4.78, setting a higher context version than 2 will attempt to call the page_flip_handler2 vfunc if it was non-NULL, which being a random chunk of stack memory, it might well have been. Set the version as 2, which should be bumped only with the appropriate version checks. Reviewed-by: Adam Jackson Signed-off-by: Daniel Stone commit e4d0757fc2620fd3182448c5e4b5a55a509594d3 Author: Adam Jackson Date: Wed Mar 29 11:35:32 2017 -0400 xfree86: Remove driver entity hooks and private No driver is using these, as far as I know. v2: Tripwire the entity hook arguments to xf86Config*Entity, fix documentation (Eric Anholt) Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 33604187674ec78b2c0bf7f67af250acc80cf23a Author: Adam Jackson Date: Fri Mar 24 12:30:58 2017 -0400 dpms: Consolidate a bunch of stuff into Xext/dpms.c Most of this is a legacy of the old "extmod" design where you could load _some_ extensions dynamically but only if the server had been built with support for them in the first place. Note that since we now only initialize the DPMS extension if at least one screen supports it, we no longer need DPMSCapableFlag: if it would be false, we would never read its value. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 7f1ef9289d974fc2bacc968ae0b5d7714382cb9e Author: Adam Jackson Date: Fri Mar 24 12:30:57 2017 -0400 dix: Lift DPMS to a screen hook Following on from the previous change, this adds a DPMS hook to the ScreenRec and uses that to infer DPMS support. As a result we can drop the dpms stub code from Xext. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8ed0b00fceb34cdb54a0ea113c3cdff3b4c9e7e1 Author: Adam Jackson Date: Fri Mar 24 12:30:56 2017 -0400 xfree86: Clean up DPMS support Rather than setting up a per-screen private, just conditionally initialize ScrnInfoRec::DPMSSet based on the config options, and inspect that to determine whether DPMS is supported. We also move the "turn the screen back on at CloseScreen" logic into the DPMS extension's (new) reset hook. This would be a behavior change for the non-xfree86 servers, if any of them had non-stub DPMS support. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 21eda7464d0e13ac6558edaf6531c3d3251e05df Author: Tobias Stoeckmann Date: Sun Mar 12 14:21:38 2017 +0100 dmx: Fix null pointer dereference A null pointer dereference can occur in dmxSync, because TimerForce does not handle a null pointer. dmxSyncTimer is set to NULL a few lines above on a certain condition, which happened on my machine. The explicit NULL check allowed me to start Xdmx again without a segmentation fault. Reviewed-by: Adam Jackson commit 5cdfcdef819efa6406807254cb3c7aba6ba5475e Author: Matt Turner Date: Thu Mar 23 19:37:46 2017 -0700 xkb: Correct type of XkbDfltAccessXOptions. Declared as unsigned short in xkb/xkbAccessX.c. Signed-off-by: Matt Turner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f4b78286ea8d4c94a913a02a3579cbe55e8f1f6b Author: Adam Jackson Date: Mon Mar 20 13:08:19 2017 -0400 glx: Fix MakeCurrent with no drawables GLX_ARB_create_context, which we aspire to support, allows making GL 3.0 or newer contexts current with null current drawables. Strictly this might not be legal for pre-3.0 contexts, but there's no harm in allowing it anyway. Signed-off-by: Adam Jackson commit e2e50c509718ea8c7f4684dc18f5ce66e526792b Author: Eric Anholt Date: Wed Mar 22 15:11:35 2017 -0700 xserver: Unifdef HAVE_CONFIG_H The X Server never generates a global config.h, and instead all these paths are including dix-config.h or xorg-config.h. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 266af991c8e41e62f054ac9870468a9ba2aaa9f2 Author: Eric Anholt Date: Wed Mar 22 15:11:34 2017 -0700 glamor: Fix some formatting that confused the unifdef command. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 2da405759fbabd4b918838a0de728c1911b4a2fa Author: Eric Anholt Date: Wed Mar 22 15:11:33 2017 -0700 xserver: Check the right HAVE_*_CONFIG_H. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 190c2adf4a237a4c0dc13d7566ca91662271d3e4 Author: Eric Anholt Date: Wed Mar 22 15:11:32 2017 -0700 kdrive: Drop kdrive-config.h. It had nothing left in it that was used but wasn't in dix-config.h. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 5c7ed785e3bdb9f0fbf8fbfdc93b5fdd2b2c7dbf Author: Eric Anholt Date: Wed Mar 22 15:11:31 2017 -0700 kdrive: Remove vestiges of TSLIB support. The actual code was gone in 27819950e4158326e0f83a30f2e8968b932625ef, but some checks remained. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit 1b1a8c481773e15142202a7b761d614b33f12577 Author: Eric Anholt Date: Wed Mar 22 15:11:30 2017 -0700 kdrive: Unifdef KDRIVE_EVDEV. ajax deleted the evdev driver in the removal of fbdev and the linux backend. Reviewed-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Eric Anholt commit ad6689b7db0a4b0d22716acedae98462a68ea1ae Author: Mariusz Bialonczyk Date: Fri Mar 17 11:20:22 2017 +0100 configure.ac: fix checking for libdrm version after 9232835bd No matter what libdrm version was installed, it always set the GLAMOR_HAS_DRM_NAME_FROM_FD_2 conditional to 1. This obviously leads to compilation problems. Fixes: 9232835bd16b ("glamor: use drmGetDeviceNameFromFD2 when available") Signed-off-by: Mariusz Bialonczyk Reviewed-and-Tested-by: Qiang Yu commit eb2cf11724df5cbe0be3cce1ad4c61ba61e8ec6b Author: Michel Dänzer Date: Thu Mar 23 12:42:37 2017 +0900 Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite There is no pixmap associated with source-only pictures. Fixes Xephyr -fakexa crashing on startup. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Peter Hutterer commit fdc79fe72bc0b97776df2c3a664076c60e08a87c Author: Michel Dänzer Date: Thu Mar 9 17:34:55 2017 +0900 edid: Prune duplicates after adding modes from DDC Multiple calls to xf86EdidMonitorSet (which can be triggered e.g. by running xrandr) would potentially keep adding the same modes, causing the Monitor->Modes list to keep growing larger and using up more memory. Fix this by calling xf86PruneDuplicateModes after adding the modes returned by xf86DDCGetModes. This makes sure there's only one instance of each unique mode in the list. v2: * Replace semicolon with {} for empty for loop (Emil Velikov) * Slightly tweak commit log to avoid minor inaccuracy about what xf86PruneDuplicateModes does Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99521 Signed-off-by: Michel Dänzer Reviewed-by: Emil Velikov commit 4e76c2711740b775242170d8e5ee56c7e6829cce Author: Adam Jackson Date: Mon Mar 20 13:42:12 2017 -0400 dix: Remove PRIVATE_DAMAGE None of this is actually wired up to anything, so we can also remove the devPrivates from the DamageRec. The DamageExtRec is what would need devPrivates for selinux labeling, in principle. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 40c12a76c2ae57adefd3b1d412387ebbfe2fb784 Author: Tobias Stoeckmann Date: Sun Mar 19 17:55:07 2017 +0100 record: Fix OOB access in ProcRecordUnregisterClients If a client sends a RecordUnregisterClients request with an nClients field larger than INT_MAX / 4, an integer overflow leads to an out of boundary access in RecordSanityCheckClientSpecifiers. An example line with libXtst would be: XRecordUnregisterClients(dpy, rc, clients, 0x40000001); Reviewed-by: Adam Jackson commit 1ad230682338a9d2fc6eca6966a5bebb007df32c Author: Adam Jackson Date: Mon Sep 26 13:28:42 2016 -0400 glamor: Avoid software fallback for planemasked ZPixmap GetImage Same trick as in fb: just do a normal GetImage and deal with the planemask on the CPU if you have to. Since the software fallback hit for glamor is pretty brutal, this is a much more impressive win for glamor than it was for fb: 11100.0 87700.0 (7.901) (copy 0xaaaaaaaa) ShmGetImage 10x10 square 9840.0 47800.0 (4.858) (copy 0xaaaaaaaa) ShmGetImage 100x100 square 1550.0 4240.0 (2.735) (copy 0xaaaaaaaa) ShmGetImage 500x500 square 9450.0 78900.0 (8.349) (0xaaaaaaaa) GetImage 10x10 square 6910.0 30900.0 (4.472) (0xaaaaaaaa) GetImage 100x100 square 431.0 2020.0 (4.687) (0xaaaaaaaa) GetImage 500x500 square Measured with Xephyr -glamor on Skylake GT3e. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 4aa35c46dab72bc945981f6fd29e494133bc2b0a Author: Adam Jackson Date: Wed Sep 28 11:18:34 2016 -0400 fb: Handle ZPixmap planemask in GetImage the other way around Formerly we'd zero the image data and then pull out a plane at a time. It's faster to apply the planemask after the fact, since that turns the GetImage into a memcpy: 100000.0 101000.0 (1.010) (copy 0xaaaaaaaa) ShmGetImage 10x10 square 42400.0 59400.0 (1.401) (copy 0xaaaaaaaa) ShmGetImage 100x100 square 3040.0 5280.0 (1.737) (copy 0xaaaaaaaa) ShmGetImage 500x500 square 96100.0 95200.0 (0.991) (0xaaaaaaaa) GetImage 10x10 square 29600.0 36800.0 (1.243) (0xaaaaaaaa) GetImage 100x100 square 1850.0 2620.0 (1.416) (0xaaaaaaaa) GetImage 500x500 square Measured with Xvfb at depth 24 on Skylake i7-6560U. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 368f60d461421fe5e2bbd90652d6ac858dbff8fe Author: Kenneth Graunke Date: Fri Mar 17 13:45:04 2017 -0700 dri2: Sync i965_pci_ids.h from Mesa. Copied from Mesa with no modifications. Gives us Geminilake PCI IDs. Signed-off-by: Kenneth Graunke Acked-by: Eric Anholt commit 8805a48ed35afb2ca66315656c1575ae5a01c639 Author: Olivier Fourdan Date: Fri Mar 17 15:58:26 2017 +0100 glamor: avoid a crash if texture allocation failed Texture creation in _glamor_create_tex() can fail if a GL_OUT_OF_MEMORY is raised, in which case the texture returned is zero. But the texture value is not checked in glamor_create_fbo() and glamor will abort in glamor_pixmap_ensure_fb() because the fbo->tex is 0: Truncated backtrace: Thread no. 1 (10 frames) #4 glamor_pixmap_ensure_fb at glamor_fbo.c:57 #5 glamor_create_fbo_from_tex at glamor_fbo.c:112 #6 glamor_create_fbo at glamor_fbo.c:159 #7 glamor_create_fbo_array at glamor_fbo.c:210 #8 glamor_create_pixmap at glamor.c:226 #9 compNewPixmap at compalloc.c:536 #10 compAllocPixmap at compalloc.c:605 #11 compCheckRedirect at compwindow.c:167 #12 compRealizeWindow at compwindow.c:267 #13 RealizeTree at window.c:2617 Check the value returned by _glamor_create_tex() in glamor_create_fbo() and return NULL in the texture is zero. All callers of glamor_create_fbo() actually check the returned value and will use a fallback code path if it's NULL. Please cherry-pick this to active stable branches. Bugzilla: https://bugzilla.redhat.com/1433305 Signed-off-by: Olivier Fourdan Reviewed-by: Eric Anholt commit 0803918e64262482035f042e5e1f2a571d3dea1b Author: Adam Jackson Date: Sat Sep 24 19:40:52 2016 -0400 fb: Remove 24bpp support (v3) v2: - Require power-of-two bpp in ScreenInit - Eliminate fbCreatePixmapBpp v3 - Squash in the exa and glamor changes so we can remove pRotatedPixmap in the same stroke. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e33be78e2ab63abc84aa0baddff90bcefa9c183a Author: Adam Jackson Date: Fri Feb 28 13:19:00 2014 -0500 xfree86: Remove 24bpp pixmap format support (v2) There's really no reason to pretend to support this, apps hate it, all we're doing is giving people a way to injure themselves. It doesn't work anyway with any Radeon, any NVIDIA chip, or any Intel chip since i810. Rip out all the logic for handling 24bpp pixmaps and framebuffers, and silently ignore the old options that would ask for it. The cirrus alpine driver has been updated to default to 16bpp, and both it and the i810 driver can now use the 32->24 conversion code in shadow if they want. All other drivers support 32bpp. Configurations that explicitly request 24bpp in order to fit in VRAM will be broken now though. v2: Fix command line options to silently ignore 24bpp rather than fail Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 83c4297d2c4fd501a9d36bc0cb7d357a8d22394c Author: Adam Jackson Date: Fri Mar 17 12:40:03 2017 -0400 ephyr: Don't clobber bitsPerPixel when using glamor This ends up passing 0 as the bpp argument to fb screen setup, which is not really the best plan. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit fe0b297420fc1de8a7fab28457d0864b3182e967 Author: Eric Anholt Date: Wed Mar 15 17:51:46 2017 -0700 glamor: Fix dashed line rendering. We were binding the screen pixmap as the dash and sampling its alpha, which is usually just 1.0 (no dashing at all). Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 5b5ba7dc3d544868035b7088e9aac62eb2511e10 Author: Adam Jackson Date: Thu Mar 16 14:19:37 2017 -0400 Revert "sdksyms: Tighten up the symbols we add to the magic table" Enough people are reporting build issues pointing at this commit that it's not worth the benefit. This reverts commit 3dad57b121fdf001e75fffa7e3007a9a0a154f67. commit e337de2d488a124e5fee0fdcb882567b68f1767d Author: Adam Jackson Date: Wed Nov 2 12:49:25 2016 -0400 xinerama: Implement graphics exposures for window->pixmap copies (v4) This code is using GetImage to accumulate a logical view of the window image (since the windows will be clipped to their containing screen), and then PutImage to load that back into the pixmap. What it wasn't doing was constructing a region for the obscured areas of the window and emitting graphics exposures for same. v2: Fix coordinate translation when the source is the root window v3: Create sourceBox with the right coordinates initially instead of translating (Keith Packard) v4: Clamp the region to 15 bits to avoid overflow (Keith Packard) Signed-off-by: Adam Jackson commit f1f865e909090406841a9b9416ea6259a75c2086 Author: Adam Jackson Date: Mon Jan 23 11:31:36 2017 -0500 parser: Fix crash when xf86nameCompare(s1 = x, s2 = NULL) Signed-off-by: Adam Jackson commit 455051a0f1d2bc84f605c325f647bd64d414c47d Author: Olivier Fourdan Date: Tue Mar 14 15:06:34 2017 +0100 glamor: Check glamor_set_destination_drawable() return value Check the value returned by glamor_set_destination_drawable() and use the fallback code path where possible. Bugzilla: https://bugzilla.redhat.com/1417575 Signed-off-by: Olivier Fourdan commit 04b4bad7c048fd077fe839f10634c99ef1e488af Author: Olivier Fourdan Date: Tue Mar 14 14:58:26 2017 +0100 glamor: glamor_set_destination_drawable() can fail The fbo_array of a given glamor pixmap can be NULL in some cases, as glamor_create_fbo_array() can fail to allocate the FBO array. If this is the case, glamor_pixmap_fbo_at() will return NULL even though the box index is valid, and glamor_set_destination_drawable() simply assumes glamor_pixmap_fbo_at() will return an FBO prior to pass the value to glamor_set_destination_pixmap_fbo(), which will segfault. We need a way for glamor_set_destination_drawable() to fail safely and let the caller know about the failure. Add a boolean return value to glamor_set_destination_drawable() for that purpose. Bugzilla: https://bugzilla.redhat.com/1417575 Signed-off-by: Olivier Fourdan commit b0ce1d088a863492f5de11e4dbde10af4261d892 Author: Olivier Fourdan Date: Tue Mar 14 15:22:32 2017 +0100 Xephyr: Check screen resources creation success If the screen pixmap or the corresponding texture creation with glamor fails, exit cleanly with an error message instead of segfaulting. Fixes: https://bugzilla.redhat.com/1431633 Reviewed-by: Michel Dänzer Signed-off-by: Olivier Fourdan commit f40ff18c96e02ff18a367bf53feeb4bd8ee952a0 Author: Olivier Fourdan Date: Tue Mar 14 15:22:31 2017 +0100 glamor: Check for NULL pixmap in glamor_get_pixmap_texture() glamor_create_pixmap() would return a NullPixmap if the given size is larger than the maximum size of a pixmap. But glamor_get_pixmap_texture() won't check if the given pixmap is non-null, leading to a segfault if glamor_create_pixmap() failed. This can be reproduced by passing Xephyr a very large screen width, e.g.: $ Xephyr -glamor -screen 32768x1024 :10 (EE) (EE) Backtrace: (EE) 0: Xephyr (OsSigHandler+0x29) (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) (EE) 2: Xephyr (glamor_get_pixmap_texture+0x30) (EE) 3: Xephyr (ephyr_glamor_create_screen_resources+0xc6) (EE) 4: Xephyr (ephyrCreateResources+0x98) (EE) 5: Xephyr (dix_main+0x275) (EE) 6: /lib64/libc.so.6 (__libc_start_main+0xf1) (EE) 7: Xephyr (_start+0x2a) (EE) 8: ? (?+0x2a) [0x2a] (EE) (EE) Segmentation fault at address 0x0 (EE) Fatal server error: (EE) Caught signal 11 (Segmentation fault). Server aborting (EE) Aborted (core dumped) Bugzilla: https://bugzilla.redhat.com/1431633 Reviewed-by: Michel Dänzer Signed-off-by: Olivier Fourdan commit 646bc74cded8b77d57312ae858a2ed01b0d17c21 Author: Adam Jackson Date: Fri Mar 3 14:51:51 2017 -0500 test: Fix distcheck failures Signed-off-by: Adam Jackson commit bca221609004aecbcc8928382ad29ce319d2eb6f Author: Jon TURNEY Date: Mon Mar 6 17:44:19 2017 +0000 xfree86: work around a sdksyms problem with gcc5 on Cygwin The linemarkers in the preprocessor output from gcc5 on Cygwin have canonicalized paths to included files (e.g. xserver/build/../include/misc.h is canonicalized to xserver/build/include/misc.h). (see gcc svn rev 210264, which causes the transformation performed by -fcanonical-system-headers to be applied to all include pathnames) These canonicalized paths won't match $topdir, so sdksyms doesn't look at the contents of those headers for sdk exported symbols. Workaround this by canonicalizing all the paths we consider, using readlink. v2: Keep a cache of readlink results so it isn't quite so dreadfully slow. Reviewed-by: Adam Jackson commit ac15d4cecca377c5c31ab852c39bbd554ca48fe2 Author: Tobias Stoeckmann Date: Mon Mar 13 19:13:14 2017 +0100 render: Fix out of boundary heap access ProcRenderCreateRadialGradient and ProcRenderCreateConicalGradient must be protected against an integer overflow during length check. This is already included in ProcRenderCreateLinearGradient since the fix for CVE-2008-2362. This can only be successfully exploited on a 32 bit system for an out of boundary read later on. Validated by using ASAN. Reviewed-by: Adam Jackson commit 0c1574d9882a91b2c1a046bf4ac5a9b138a37965 Author: Michel Dänzer Date: Thu Mar 9 18:13:31 2017 +0900 glamor: Fix typo: "vec2_pos" -> "vec2 pos" Fixes crash when trying to use dashed lines: Failed to compile VS: 0:8(2): error: `vec2_pos' undeclared Trivial. Fixes: d8161aeb5089 ("glamor: Fix missing declaration in dash vertex shader") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99943 commit 937527f9798d573ec82c2c508821899c229c018f Author: Olivier Fourdan Date: Wed Mar 8 10:32:22 2017 +0100 xwayland: Monitor client states to destroy callbacks Client resources can survive the client itself, in which case we may end up in our sync callback trying to access client's data after it's been freed/reclaimed. Add a ClientStateCallback handler to monitor the client state changes and clear the sync callback set up by the glamor drm code if any. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=100040 Tested-by: Mark B Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit 669eb0a65430678fe97de9405e4e42dcb4417ed2 Author: Jon Turney Date: Wed Mar 8 23:46:27 2017 +0000 test: Use correct signature for XISetEventMask wrapper This looks like it's always been wrong, but didn't matter before the single test binary changes as the wrapper was only in place for tests which didn't care about it's effects, so didn't forward to the real implementation. (see the changes to protocol-xiselectevents.c in 773fc07e) This fixes the protocol_xigetselectedevents_test for me. I'm a bit surprised that passes for anyone at the moment. Signed-off-by: Jon Turney Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9232835bd16b6948442f7a4588fb9376782cb814 Author: Qiang Yu Date: Tue Mar 7 11:53:23 2017 +0800 glamor: use drmGetDeviceNameFromFD2 when available This is for glamor can support fd from DRM render node which is useful for a render only DDX. Reviewed-by: Adam Jackson Signed-off-by: Qiang Yu commit d4b7e0eaa4b2e97ce1dec653a2ae7d9621fe1431 Author: Olivier Fourdan Date: Tue Mar 7 10:28:35 2017 +0100 xwayland: clear cursor frame callback After an X cursor is unrealized, the seat's corresponding x_cursor is cleared, but if a frame callback was pending at the time, it will remain and thus prevent any further cursor update, leaving the window with no cursor. Make sure to destroy the frame callback, if any, when that occurs, so that next time a cursor needs to be set, it won't be ignored for a frame callback that will never be triggered. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389327 Signed-off-by: Olivier Fourdan Reviewed-by: Pekka Paalanen Reviewed-by: Rui Matos commit 64ca14b85e45b13628396f21d1903e311f92a9e1 Author: Olivier Fourdan Date: Thu Mar 2 10:19:26 2017 +0100 xwayland: make sure client is not gone in sync callback in XWayland, dri3_send_open_reply() is called from a sync callback, so there is a possibility that the client might be gone when we get to the callback eventually, which leads to a crash in _XSERVTransSendFd() from WriteFdToClient() . Check if clientGone has been set in the sync callback handler to avoid this. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99149 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100040 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1416553 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan Tested-by: Mark B commit 5c44169caed811e59a65ba346de1cadb46d266ec Author: Adam Jackson Date: Thu Mar 2 17:20:30 2017 -0500 os: Squash missing declaration warning for timingsafe_memcmp timingsafe_memcmp.c:21:1: warning: no previous prototype for ‘timingsafe_memcmp’ [-Wmissing-prototypes] timingsafe_memcmp(const void *b1, const void *b2, size_t len) Signed-off-by: Adam Jackson commit 0d7f05ed99b71a4641415c9f26e245c3bb24a9a0 Author: Adam Jackson Date: Wed Mar 1 16:13:59 2017 -0500 miarc: "Cache" arc span data for dashed arcs This avoids recomputing the span data for every dash. x11perf thinks this is a pretty modest speedup: 832919.4 840471.1 ( 1.009) 100-pixel dashed ellipse 672353.1 680652.2 ( 1.012) 100-pixel double-dashed ellipse 13748.9 24287.9 ( 1.767) 100-pixel wide dashed ellipse 9236.3 21298.2 ( 2.306) 100-pixel wide double-dashed ellipse But part of the reason it's so modest there is that the arcs are relatively small (100 pixel diameter at line width 10, so ~6000 pixels) and the dashes relatively large (30 on 20 off so ~6 dashes per quadrant). With larger arcs and finer dashes this is much more impressive. A fairly trivial testcase of a single 15000x13000 arc with the default {2, 2} dash pattern drops from ~3500 milliseconds to 10 milliseconds. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 849c825855b82caf44d25edb8155bc9f17869256 Author: Adam Jackson Date: Wed Mar 1 16:13:58 2017 -0500 miarc: Make the caller free the arc span data drawArc does some fairly expensive computation, but it's only sensitive to arc width/height. Thread the span data up through the call chain so it's at least possible for the caller to cache things. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 9426c5500b72e1fe004fef4c3b259023c4ec49f7 Author: Adam Jackson Date: Wed Mar 1 16:13:57 2017 -0500 miarc: Style cleanup for miWideArc Outdent, normalize comment formatting, and use 'goto out' idiom for error paths. No functional change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit fe5c340046c8cf755b92763a49b2dc475e856a76 Author: Olivier Fourdan Date: Wed Mar 1 08:51:31 2017 +0100 xwayland: do not set checkRepeat on master kbd keyboard_check_repeat() fetches the XWayland seat from the dev->public.devicePrivate do do its thing. If a key event is sent programmatically through Xtest, our device is the virtual core keyboard and that has a dev->public.devicePrivate of NULL, leading to a segfault in keyboard_check_repeat(). This is the case with "antimicro" which sends key events based on the joystick buttons. Don't set the checkRepeat handler on the VCK since it cannot possibly work anyway and it has no effect on the actual checkRepeat intended functionality. Bugzilla: https://bugzilla.redhat.com/1416244 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 27819950e4158326e0f83a30f2e8968b932625ef Author: Adam Jackson Date: Thu Feb 16 12:46:23 2017 -0500 kdrive: Remove now-unused linux backend With Xfbdev gone this has no consumers. Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit feed7e3f982a7ac14f6fe85ed2e1ec4a83700841 Author: Adam Jackson Date: Thu Feb 16 12:46:22 2017 -0500 xfbdev: Remove With the shadow framebuffer overallocation bug fixed (ref below), Xorg + fbdev has tens to hundreds of kilobytes more baseline memory usage than Xfbdev. That's not nothing, but it's little enough that we should focus our efforts on the server that actually gets development attention. https://cgit.freedesktop.org/xorg/driver/xf86-video-fbdev/commit/?id=2c5eba8 Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit 35fbcb3f9987758bc26a87d5d7c033f4367cbd39 Author: Adam Jackson Date: Thu Feb 16 12:46:21 2017 -0500 xfake: Remove We already have Xvfb for a dummy DDX. Signed-off-by: Adam Jackson Acked-by: Alex Deucher commit 3dad57b121fdf001e75fffa7e3007a9a0a154f67 Author: Adam Jackson Date: Thu Feb 16 14:00:03 2017 -0500 sdksyms: Tighten up the symbols we add to the magic table The code as written would match anything declared extern. _X_EXPORT is what we really mean here. That's a macro, so check for what it expands to and skip if not found. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 386fbbe410a1168b724136e54cf3bd37fb64ad4e Author: Matthieu Herrb Date: Wed Mar 1 20:28:34 2017 +0100 Brown bag commit to fix 957e8d (arc4random_buf() support) - typo in #ifdef check - also need to add AC_CHECK_FUNCS([arc4random_buf]) Reported-by Eric Engestrom. Thanks Reviewed-by: Adam Jackson Signed-off-by: Matthieu Herrb commit dc7ceda90fdedb2212f105095fe8d449bfdb0eb4 Author: Adam Jackson Date: Thu Feb 16 14:56:45 2017 -0500 dispatch: Mark swapped dispatch as _X_COLD This touches everything that ends up in the Xorg binary; the big missing part is GLX since that's all generated code. Cuts about 14k from the binary on amd64. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 8c9909a99292b2fb4a86de694bb0029f61e35662 Author: Olivier Fourdan Date: Tue Feb 28 14:27:52 2017 +0100 xwayland: Make sure we have a focus window During the InitInput() phase, the wayland events get dequeued so we can possibly end up calling dispatch_pointer_motion_event(). If this occurs before xwl_seat->focus_window is set, it leads to a NULL pointer derefence and a segfault. Check for xwl_seat->focus_window in both pointer_handle_frame() and relative_pointer_handle_relative_motion() prior to calling dispatch_pointer_motion_event() like it's done in pointer_handle_motion(). Bugzilla: https://bugzilla.redhat.com/1410804 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c9cbdada755f1d00d164bef7833f1aef139ffeb0 Author: Adam Jackson Date: Mon Feb 20 10:24:14 2017 -0500 vfb: Bump default depth to 24 Signed-off-by: Adam Jackson Acked-by: Keith Packard Reviewed-by: Eric Anholt commit 2855f759b1e7bf7f5e57cac36c1f0d0e5ac1a683 Author: Matthieu Herrb Date: Tue Feb 28 19:18:56 2017 +0100 auth: remove AuthToIDFunc and associated functions. Not used anymore. And the current code for MitToId has a use-after-free() issue. [Also remove the actual implementations - ajax] Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 957e8db38f27932d353e86e9aa69cf16778b18f1 Author: Matthieu Herrb Date: Tue Feb 28 19:18:43 2017 +0100 Use arc4random_buf(3) if available to generate cookies. Reviewed-by: Adam Jackson Signed-off-by: Matthieu Herrb commit d7ac755f0b618eb1259d93c8a16ec6e39a18627c Author: Matthieu Herrb Date: Tue Feb 28 19:18:25 2017 +0100 Use timingsafe_memcmp() to compare MIT-MAGIC-COOKIES CVE-2017-2624 Provide the function definition for systems that don't have it. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 1b12249fd6d4d3b566043d556503f3f625b9b4ba Author: Peter Hutterer Date: Thu Feb 23 10:21:49 2017 +1000 os: log a bug whenever WriteToClient is called from the input thread The input thread should generate events, not send them. Make it easier to find the instances where it's doing so. Signed-off-by: Peter Hutterer Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit 7d7788e0f2fbbf5d05cb918df11a5e1b7e047e48 Author: Olivier Fourdan Date: Fri Feb 17 09:16:24 2017 +0100 Revert "xwayland: bump wayland-protocols version to 1.7" This reverts commit 371ff0c969a38a0013688391bbd7375bc7b6f933. Reviewed-by: Adam Jackson commit 9f4d308cdad957a354912f17febe5bcad7f44812 Author: Pekka Paalanen Date: Wed Nov 23 13:30:53 2016 +0200 xwayland: use _XWAYLAND_ALLOW_COMMITS property The X11 window manager (XWM) of a Wayland compositor can use the _XWAYLAND_ALLOW_COMMITS property to control when Xwayland sends wl_surface.commit requests. If the property is not set, the behaviour remains what it was. XWM uses the property to inhibit commits until the window is ready to be shown. This gives XWM time to set up the window decorations and internal state before Xwayland does the first commit. XWM can use this to ensure the first commit carries fully drawn decorations and the window management state is correct when the window becomes visible. Setting the property to zero inhibits further commits, and setting it to non-zero allows commits. Deleting the property allows commits. When the property is changed from zero to non-zero, there will be a commit on next block_handler() call provided that some damage has been recorded. Without this patch (i.e. with the old behaviour) Xwayland can and will commit the surface very soon as the application window has been realized and drawn into. This races with XWM and may cause visible glitches. v3: - introduced a simple setter for xwl_window::allow_commits - split xwl_window_property_allow_commits() out of xwl_property_callback() - check MakeAtom(_XWAYLAND_ALLOW_COMMITS) v2: - use PropertyStateCallback instead of XACE, based on the patch "xwayland: Track per-window support for netwm frame sync" by Adam Jackson - check property type is XA_CARDINAL - drop a useless memcpy() Weston Bug: https://phabricator.freedesktop.org/T7622 Reviewed-by: Adam Jackson Signed-off-by: Pekka Paalanen commit a6308cea602f688ac653e3466cd57767e02093a9 Author: Pekka Paalanen Date: Thu Nov 24 11:54:44 2016 +0200 xwayland: fix 'buffer' may be used uninitialized warning Fix the following warning due to --disable-glamor: CC Xwayland-xwayland.o In file included from /home/pq/local/include/wayland-client.h:40:0, from xwayland.h:35, from xwayland.c:26: xwayland.c: In function ‘block_handler’: /home/pq/local/include/wayland-client-protocol.h:3446:2: warning: ‘buffer’ may be used uninitialized in this function [-Wmaybe-uninitialized] wl_proxy_marshal((struct wl_proxy *) wl_surface, ^ xwayland.c:466:23: note: ‘buffer’ was declared here struct wl_buffer *buffer; ^ Signed-off-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit f7b8560f23ac5582e2f97dc9f6de32a42e61e520 Author: Pekka Paalanen Date: Thu Nov 24 11:45:25 2016 +0200 xwayland: refactor into xwl_window_post_damage() Refactor xwl_screen_post_damage() and split the window specific code into a new function xwl_window_post_damage(). This is a pure refactoring, there are no behavioral changes. An assert is added to xwl_window_post_damage() to ensure frame callbacks are not leaked if a future patch changes the call. Signed-off-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit 8e3f9ce6c06e7605832c55dfd180396f66ec8b66 Author: Adam Jackson Date: Sat Jul 12 12:45:23 2014 -0400 dix: Add a callback chain for window property state change This will be used by in-server features that need to react to property changes. The first one will be _XWAYLAND_ALLOW_COMMITS. Signed-off-by: Adam Jackson [Pekka: add commit message body] Signed-off-by: Pekka Paalanen commit 50bcea8be337ea983e464f2b5b8b2dc6d1024532 Author: Adam Jackson Date: Sat Jul 12 12:39:21 2014 -0400 dix: Pass the whole property into deliverPropertyNotifyEvent Instead of just the atom. No functional change. Signed-off-by: Adam Jackson Signed-off-by: Pekka Paalanen commit fde5cd78488f3370c92397868ca78929296f7ad1 Author: Mihail Konev Date: Tue Jan 31 20:16:35 2017 +0500 tests: Fix guards for ld -wrap Fixes XQuartz build. Regressed-in: 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit d8161aeb50891ae10c5656487ce8f982deed5f9f Author: Dr.-Ing. Dieter Jurzitza Date: Thu Feb 23 12:57:26 2017 -0500 glamor: Fix missing declaration in dash vertex shader Fixes a GLSL compilation error: Failed to compile VS: 0:13(43): error: `pos' undeclared 0:13(14): error: operands to arithmetic operators must be numeric 0:13(13): error: operands to arithmetic operators must be numeric Tested-by: Stefan Dirsch Reviewed-by: Adam Jackson commit acdb5bf2de57c0080d2a6e730c788a0a428e13dc Author: Chris Wilson Date: Fri Feb 17 08:18:52 2017 +0000 os: Fix iteration over busfaults Fixes a regression from commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a Author: Keith Packard Date: Sun Nov 3 13:12:40 2013 -0800 Trap SIGBUS to handle truncated shared memory segments that causes the SIGBUS handler to fail to chain up correctly and corrupts nearby memory instead. Signed-off-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dcb63deb1b6337781943a7bea5bb2b04c6d76b55 Author: Chris Wilson Date: Wed Feb 22 14:56:28 2017 +0000 inputthread: Initialise inputThreadInfo->changed before use ==8734== Thread 2 InputThread: ==8734== Conditional jump or move depends on uninitialised value(s) ==8734== at 0x2FDB05: InputThreadDoWork (inputthread.c:333) ==8734== by 0x6924423: start_thread (pthread_create.c:333) ==8734== by 0x6C229BE: clone (clone.S:105) Signed-off-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 23d85c54421ebdd12460566918fcb7f309d2ee30 Author: Olivier Fourdan Date: Fri Feb 17 14:13:51 2017 +0100 os: remove unused define MAX_TIMES_PER Remove leftover from commit e10ba9e, MAX_TIMES_PER is not used anymore. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8b170c4447868c8d4656cf2143f009db20885f3a Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 mi: Add include guards to migc.h Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit e161853f380a0b176c81284024066cb2776136c3 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 fb: Remove stray references to fbHasVisualTypes Removed in 84e8de12. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 4c7d229582a97e07014091909745ac7dc4d5e93e Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 fb: Remove unused fbGetFreeCompClip macro Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 706e6d9cd074da606016ed4ecff51e9c2a822087 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 wfb: Hide init function decls behind FB_ACCESS_WRAPPER Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 790c1c0b10968776440a962e1fc6d1d3157b1559 Author: Adam Jackson Date: Thu Feb 16 13:00:24 2017 -0500 wfb: Add missing rename for fbGlyphs Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit a6566f9e4dbf9ea9568a14e22cb5d004e10dbd4d Author: Michel Dänzer Date: Thu Feb 16 16:13:56 2017 +0900 prime: Clear PixmapDirtyUpdateRec::damage when it's destroyed The root window, and by extension any damage records referencing it, may be destroyed before shared pixmaps referencing it, which resulted in use-after-free / double-free in PixmapStopDirtyTracking. Fixes: b5b292896f64 ("prime: Sync shared pixmap from root window instead of screen pixmap") Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 371ff0c969a38a0013688391bbd7375bc7b6f933 Author: Olivier Fourdan Date: Thu Feb 16 10:43:06 2017 +0100 xwayland: bump wayland-protocols version to 1.7 Xwayland support for pointer locking in confinement requires wayland-protocols version 1.7 or later. Update the required version in configure.ac to match the minimal required version of wayland-protocols. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 5d29b493666f728eccd8dd91992ea020bd4be9f9 Author: Adam Jackson Date: Tue Feb 14 15:30:56 2017 -0500 xfree86: Reorganize the reserved ScrnInfoRec slots First, move them to the end of the struct, for marginally better cache locality for the struct members that actually have meaning; move the existing slots at the end of the struct up near some others with similar meanings. Second, only keep four slots each of integer, data pointer, and function pointer; we've rarely used this escape hatch so this is still plenty. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 47db92473f7da2b7d6775ff681ec747009f8cf3f Author: Adam Jackson Date: Tue Feb 14 15:30:55 2017 -0500 xfree86: Remove unused chipID/Rev from ScrnInfoRec Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 4dcf68e41857cdf78387a6232160cba5cb467fb0 Author: Adam Jackson Date: Tue Feb 14 15:30:54 2017 -0500 xfree86: Remove memClk from ScrnInfoRec Never set by the core, not used in any modern driver. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 0b6f2806029493afa246b4472ee88fc173976c5a Author: Adam Jackson Date: Tue Feb 14 15:30:53 2017 -0500 xfree86: Remove Option "BiosBase" (v2) Just no. The ddxDesign chunk removes the whole para about xf86FixPciResource, since it turns out that function doesn't exist at all anymore. The only drivers that reference this at all are i128 and mga, and even then only in the non-pciaccess path. v2: - Update commentary about i128/mga - Don't remove the BiosBase keyword from the config parser since that would turn a no-op into a fatal error (Aaron Plattner) Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 76ef102be3b47d23ebfaaaa04fb5cfc0511d43f1 Author: Adam Jackson Date: Tue Feb 14 15:30:52 2017 -0500 xfree86: Drop virtualFrom from ScrnInfoRec Seriously not worth the effort of tracking this, especially now that competent drivers don't have a limit. The sis driver does inspect this member, but hilariously does so only so it can print the same information as the core does. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 5a945f54e738f6e9c5a489febdd8b87cd8a41210 Author: Adam Jackson Date: Tue Feb 14 15:30:51 2017 -0500 xfree86: Remove max[HV]Value from ScrnInfoRec Only mach64 and rendition actually use this feature. Everyone else just checks it in their ValidMode hook, they can too. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 3e1a23281dd64ee7457f36208cac77c01846a28f Author: Adam Jackson Date: Tue Feb 14 15:30:50 2017 -0500 xfree86: Fix a comment about ScrnInfoRec We don't actually need (or intend) to keep this struct the same across revisions. Reviewed-by: Alex Deucher Reviewed-by: Aaron Plattner Acked-by: Keith Packard Signed-off-by: Adam Jackson commit 4c00609c370dab130b69207cb2684c2b92bd3084 Author: Alan Coopersmith Date: Sun Feb 12 09:35:21 2017 -0800 DetermineClientCmd: try using /proc/pid/cmdline on Solaris too Solaris 11.3.5 introduced support for /proc/pid/cmdline, so try it first, and if we can't open it, then fallback to /proc/pid/psinfo as we did before. Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 3f9507ed2f7246b2c8cf2bbc430cc99c5f35c92a Author: Adam Jackson Date: Thu Feb 9 13:53:41 2017 -0500 xfree86: Bump video ABI to 24.0 c02f6a68 changed the layout of xf86CrtcFuncs. Signed-off-by: Adam Jackson commit 058809c43ec578a407cf40d4c3e54a42503e3562 Author: Olivier Fourdan Date: Wed Feb 8 09:23:20 2017 +0100 xwayland: Apply output rotation for screen size Previously, we would swap the width/height of the Xwayland output based on the output rotation, so that the overall screen size would match the actual rotation of each output. Problem is the RandR's ConstrainCursorHarder() handler will also apply the output rotation, meaning that when the output is rotated, the pointer will be constrained within the wrong dimension. Moreover, XRandR assumes the original output width/height are unchanged when the output is rotated, so by changing the Xwayland output width and height based on rotation, Xwayland causes XRandr to report the wrong output sizes (an output of size 1024x768 rotated left or right should remain 1024x768, not 768x1024). So to avoid this issue and keep things consistent between Wayland and Xwayland outputs, leave the actual width/height unchanged but apply the rotation when computing the screen size. This fixes both the output size being wrong in "xrandr -q" and the pointer being constrained in the wrong dimension with rotated with weston. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99663 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit afeace27d3818274b75d59375771dc964d2f56bb Author: Olivier Fourdan Date: Tue Feb 7 15:31:22 2017 +0100 xwayland: CRTC should support all rotations If the Wayland compositor sets a rotation on the output, Xwayland translates the transformation as an xrandr rotation for the given output. However, if the rotation is not supported by the CRTC, this is not a valid setup and xrandr queries will fail. Pretend we support all rotations and reflections so that the configuration remains a valid xrandr setup. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99663 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 38696ea56854e055c31bd2730adfc7c39aa115b0 Author: Michel Dänzer Date: Tue Feb 7 17:38:23 2017 +0900 damage: Validate source pictures bound to windows before unwrapping The lower layers also do this, but no damage may be reported there, since we unwrap before calling down. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99220 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 1c78bec9ca3cd1975a38bf5ebdba7dea65b309ab Author: Svitozar Cherepii Date: Fri Feb 3 01:49:04 2017 +0200 xwayland: Add hack for FWXGA resolution #99574 For some applications (like fullscreen games) it matters for XRandr resolution to be correctly set and equal to root window resolution. In XServer there is already hack for this, adapted it for XWayland. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=99574 Signed-off-by: Svitozar Cherepii Tested-by: Svitozar Cherepii Acked-by: Olivier Fourdan commit 542d9f6807ac06b70f564ccab10af69fa21a1221 Author: Michel Dänzer Date: Wed Feb 1 18:35:57 2017 +0900 present: Allow flipping with PRIME slave outputs Works fine now. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit b5b292896f647c85f03f53b20b2f03c0e94de428 Author: Michel Dänzer Date: Wed Feb 1 18:35:56 2017 +0900 prime: Sync shared pixmap from root window instead of screen pixmap The screen pixmap doesn't receive updates while there's a Present flip window. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit eb04b20160d706d4e0e67122d0adb1e723c0da92 Author: Michael Thayer Date: Fri Sep 30 15:18:45 2016 +0200 modesetting: allow switching from software to hardware cursors (v5). Currently if modesetting ever fails to set a hardware cursor it will switch to using a software cursor and never go back. Change this to only permanently switch to a software cursor if -ENXIO is returned (which means hardware cursors not supported), and to otherwise still try a hardware cursor first every time a new one is set. This is needed because hardware may be able to handle some cursors in hardware and others not, or virtual hardware may be able to handle hardware cursors at some times and not others. Changes since v1, v2 and v3: * take into account the switch to load_cursor_argb_check * keep the permanent software cursor fall-back if -ENXIO is returned * move parts of v3 into separate patches Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit ecd0a62323f26b333c49bddd7237dd5118482a35 Author: Michael Thayer Date: Fri Sep 30 08:02:09 2016 +0200 modesetting: Immediately handle failure to set HW cursor, v5 Based on v4 by Alexandre Courbot There is currently no reliable way to report failure to set a HW cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM ioctl fails (which currently happens at least with modesetting on Tegra for format incompatibility reasons). As failures are currently handled by setting the HW cursor size to (0,0), the fallback to SW cursor will not happen until the next time the cursor changes and xf86CursorSetCursor() is called again. In the meantime, the cursor will be invisible to the user. This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans. This allows to propagate errors up to xf86CursorSetCursor(), which can then fall back to using the SW cursor immediately. v5: - Removed parts of patch already committed as part of 14c21ea1. - Adjusted code slightly to match surrounding code. - Effectively reverted af916477 which is made unnecessary by this patch. Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit c02f6a687c3d6bd0727322b055ee788f8fefa005 Author: Michael Thayer Date: Thu Sep 29 20:23:12 2016 +0200 xfree86: Immediately handle failure to set HW cursor, v5 Based on v4 by Alexandre Courbot There is currently no reliable way to report failure to set a HW cursor. Still such failures can happen if e.g. the MODE_CURSOR DRM ioctl fails (which currently happens at least with modesetting on Tegra for format incompatibility reasons). As failures are currently handled by setting the HW cursor size to (0,0), the fallback to SW cursor will not happen until the next time the cursor changes and xf86CursorSetCursor() is called again. In the meantime, the cursor will be invisible to the user. This patch addresses that by adding _xf86CrtcFuncs::set_cursor_check and _xf86CursorInfoRec::ShowCursorCheck hook variants that return booleans. This allows to propagate errors up to xf86CursorSetCursor(), which can then fall back to using the SW cursor immediately. v5: Updated the patch to apply to current git HEAD, split up into two patches (server and modesetting driver) and adjusted the code slightly to match surrounding code. I also removed the new exported function ShowCursorCheck(), as instead just changing ShowCursor() to return Bool should not affect its current callers. Reviewed-by: Adam Jackson Signed-off-by: Michael Thayer commit 3ef16dfb9830bd6b41ae428f4f213ae0c35c1056 Author: Mihail Konev Date: Sat Feb 4 00:03:24 2017 +0500 dmx: fix linking Reviewed-by: Adam Jackson commit e50da50118408a195d4d2e1b39817fe7c4447c56 Author: Adam Jackson Date: Wed Jan 25 15:08:25 2017 -0500 dri1: Remove some dead event code Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 0702f2e840370be53d129fc5e3c243dac47ee720 Author: Peter Hutterer Date: Tue Feb 7 11:44:51 2017 +1000 xwayland: replace hardcoded function name with __func__ in error msg Signed-off-by: Peter Hutterer Reviewed-by: Pekka Paalanen Reviewed-by: Olivier Fourdan commit 3eb964e25243056dd998f52d3b00171b71c89189 Author: Chris Wilson Date: Fri Jan 20 09:49:19 2017 +0000 xfree86: Take input_lock() for xf86ScreenCheckHWCursor commit cfddd919cce4178baba07959e5e862d02e166522 Author: Chris Wilson Date: Mon Jan 16 22:36:34 2017 +0000 xfree86: Take input lock for xf86TransparentCursor commit 7198a6d4e74f684cb383b3e0f70dd2bae405e6e7 Author: Chris Wilson Date: Mon Jan 16 22:17:36 2017 +0000 xfree86: Take the input lock for xf86RecolorCursor xf86RecolorCursor() may be called directly from XRecolorCursor as well as from xf86ScreenSetCursor(). In the latter case, the input lock is already held, but not for the former and so we need to add a wrapper function that acquires the input lock before performing xf86RecolorCursor() References: https://bugs.freedesktop.org/show_bug.cgi?id=99358 commit bb9128fdc86decd6f6e3b0e145011a8c08b1d2b5 Author: Qiang Yu Date: Thu Jan 26 18:13:53 2017 +0800 present: disable page flip only when a slave crtc is active This prevents the tearing of moving window in a composite WM desktop when output slave is attached but none of its crtc is really active. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 45e0eb4b156f2155687cce268b07f10540fc507b Author: Michel Dänzer Date: Thu Jan 26 16:24:03 2017 +0900 loader: Handle mod->VersionInfo == NULL This can happen when a module fails to load: Program received signal SIGSEGV, Segmentation fault. UnloadModule (_mod=0x5555559d9280) at ../../../../hw/xfree86/loader/loadmod.c:848 848 name = mod->VersionInfo->modname; (gdb) bt #0 UnloadModule (_mod=0x5555559d9280) at ../../../../hw/xfree86/loader/loadmod.c:848 #1 0x00005555555ddd1b in LoadModule (module=module@entry=0x5555559c7ce0 "fbdev", options=0x0, modreq=modreq@entry=0x0, errmaj=errmaj@entry=0x7fffffffe8ec) at ../../../../hw/xfree86/loader/loadmod.c:824 #2 0x00005555555edfe9 in xf86LoadModules (list=list@entry=0x5555559dcf50, optlist=optlist@entry=0x0) at ../../../../hw/xfree86/common/xf86Init.c:1506 #3 0x00005555555ee7bc in InitOutput (pScreenInfo=pScreenInfo@entry=0x5555559abf80 , argc=argc@entry=4, argv=argv@entry=0x7fffffffeb18) at ../../../../hw/xfree86/common/xf86Init.c:484 #4 0x00005555555a885c in dix_main (argc=4, argv=0x7fffffffeb18, envp=) at ../../dix/main.c:197 #5 0x00007ffff5d582b1 in __libc_start_main (main=0x555555593130
, argc=4, argv=0x7fffffffeb18, init=, fini=, rtld_fini=, stack_end=0x7fffffffeb08) at ../csu/libc-start.c:291 #6 0x000055555559316a in _start () Fixes: 8e83eacb9e2d ("loader: Remove unused path and name from ModuleDescPtr") Signed-off-by: Michel Dänzer Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7617a0a180a2cd3427a8ffa9534152df6a8fecbf Author: Qiang Yu Date: Wed Jan 11 13:59:22 2017 +0800 dri2: refine dri2_probe_driver_name (v2) V2: 1. update comment 2. check bustype if PCI 3. configure add libdrm version check for drmGetDevice Get PCI information from info->fd with drmGetDevice instead of assuming the info->fd is the first entity of scrn which is not true for multi entities scrn. Signed-off-by: Qiang Yu Reviewed-by: Emil Velikov commit b1a6986395f85b0194646a34b49367086dc9239d Author: Martin Peres Date: Wed Jan 25 17:29:15 2017 +0200 tests: shuffle around the linking order to please GNU ld Classic GNU ld resolves symbol dependencies only forward, while GOLD seems to work regardless of the specified library order. Suggested-by: Eero Tamminen Reviewed-by: Mihail Konev Signed-off-by: Martin Peres commit cc0f173ea2936d1405e382329c1bd58c7af67ea7 Author: Adam Jackson Date: Thu Apr 14 15:56:46 2016 -0400 loader: Learn about the joy of snprintf Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 8e83eacb9e2d2c6c2b9f8cdb9e82c976a0237f24 Author: Adam Jackson Date: Thu Apr 14 15:30:35 2016 -0400 loader: Remove unused path and name from ModuleDescPtr Just a waste of memory. Path was never referenced at all, and name was only used when unloading the module; we can just as well get the module's internal idea of its name from VersionInfo. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 8920dca0091675f1202c1198336cd4d8e0259100 Author: Adam Jackson Date: Thu Apr 14 11:45:58 2016 -0400 loader: Remove unused arguments from LoadModule Nobody was ever calling this with a non-null argument for subdir list or pattern list. Having done this, InitSubdirs is only ever called with a NULL argument, so it's really just a complicated way of duplicating the default list; we can remove that and just walk the list directly. The minor error code was only ever used to distinguish among two cases of LDR_BADUSAGE. Whatever. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ba726ba6a73efe1bd19708b058f481f28068a85b Author: Adam Jackson Date: Thu Apr 14 11:30:02 2016 -0400 loader: Turn LoaderListDirs into LoaderListDir Callers only ever use this for a single directory anyway. While we're at it, also move xf86DriverListFromCompile near its only user in the X -configure code (and inline it out of existence), and remove LoaderFreeDirList as it's unused (since X -configure is just going to exit anyway, none of that code cares about cleanup). Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit c54a9ca152898ec2ffe50f6d5b70d483b85c1c34 Author: Adam Jackson Date: Thu Apr 14 11:17:22 2016 -0400 loader: Move loader list details to internal header There's no reason a driver should ever care about this. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d55284e8638ede15be851aa8a19a98dbbff0ce20 Author: Adam Jackson Date: Wed Apr 13 16:06:50 2016 -0400 xfree86: Remove a stray reference to font modules Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d7879c46724a36bfd9a3a08e49903d001ffbf93e Author: Adam Jackson Date: Wed Apr 13 15:58:33 2016 -0400 xfree86: Fix up some bad indentation indent(1) gets confused by function-like macros with no trailing semicolon, which is fair enough really. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5c577da5f3a65c68d2ee12e4afca8f20c3e8ccf4 Author: Adam Jackson Date: Thu Jul 14 15:42:18 2016 -0400 xfree86: Remove DriverRec1 compat struct The idea here is that the driver might have once been old enough to not have the driverFunc slot in DriverRec, with the module ABI not having changed when it was added. That was ages ago, and drivers always declare themselves with DriverRec not DriverRec1, so uninitialized slots will simply be zero. Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 2e3ad7e2506d9eb6667a5f229b5213d215451a5a Author: Adam Jackson Date: Wed Apr 13 15:50:39 2016 -0400 loader: Remove silly "unspecified" version handling Everybody using this functionality specifies a major version, which makes sense. If you don't care about a minor version, that's equivalent to saying you require minor >= 0, so just say so; likewise patch level. Likewise ABI class is always specified. Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ef533a912d18db31456b29a18c8bced649309565 Author: Adam Jackson Date: Tue Mar 1 08:29:06 2016 -0500 loader: Remove unused loader error codes and dead enum The enum has been unused since at least the removal of elfloader. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7e3cccf8e4426a4b25a7a94d52775d334693572f Author: Adam Jackson Date: Wed Apr 13 14:59:27 2016 -0400 loader: Include fewer headers from xf86Module.h This looks like more, but only if you don't compare it to the number pulled in by misc.h. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 49fa76801348f6d044128f7ec743693d0759d683 Author: Adam Jackson Date: Fri Jun 5 11:01:30 2015 -0400 loader: Don't add internal/ to the search path Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 97bd6e453676516891250389ec0fd695c110087c Author: Adam Jackson Date: Fri Jun 5 10:58:20 2015 -0400 loader: Remove *GetOS This API is dumb. uname(3) exists, feel free to use it, but ideally write to the interface not to the OS. There are a couple of drivers using this API, they could all reasonably just not. This also removes the OS name from the loader subdirectory path search. Having /usr/lib/xorg shared across OSes is a non-goal here. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit a6fcb15472bb7663ae917f5913bf07b6d3c7f186 Author: Adam Jackson Date: Mon Jun 16 11:30:18 2014 -0400 loader: Port from xfree86 to dix API Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 778cfc59762cdf528cf8672bfb5696844e91ebc3 Author: Emil Velikov Date: Sun Apr 17 21:07:30 2016 +0100 xfree86: flatten pathlist management in the loader Now that users can set the path only via LoaderSetPath(), we can simplify things. Reviewed-by: Eric Anholt Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 7b71055fc65242a9c4b651e72bb07dbb3f00c4e6 Author: Emil Velikov Date: Sun Apr 17 21:07:29 2016 +0100 xfree86: remove dummy/dead function prototype for LoadDriver Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 57eec704c3ddea0fecea2d8fbd1c3547f0b8fccf Author: Emil Velikov Date: Sun Apr 17 21:07:27 2016 +0100 xfree86: remove references to LoadSubModule's path from the doc Afaics the argument hasn't been part of the API since the documentation has been converted to xml with commit fc6ebe1e1d3 "Convert LinuxDoc documents to DocBook/XML" Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit 2196bb50383bd96d364f799018c0693c9309ed7f Author: Emil Velikov Date: Sun Apr 17 21:07:28 2016 +0100 xfree86: remove unused path from the LoadModule API Similar to its little brother - LoadSubModule. Currently all call sites provide NULL anyway ;-) Reviewed-by: Aaron Plattner Reviewed-by: Julien Cristau Signed-off-by: Emil Velikov commit ea483af99a6351323afe00a0b630cd63310efdb1 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 glx: Move Composite's synthetic visuals to a different select group Should you find yourself using a 16bpp display while also using a compositor, you poor soul, you may find that your GLX applications behave strangely; in particular, glxgears will be transparent. This is because it clears to (0,0,0,0) which is transparent if you honor alpha, and it will choose the synthetic visual because it has the most available r/g/b bits. To avoid this, bump synthetic visuals to a higher (less-preferred) select group. Unless the client explicitly asks for non-zero alpha bits, this will prefer any rgb565 visual ahead of the argb8888 visual. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 43efaa6e4fd903229dc9c508da4177ad4bbdd4d8 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 glx: Send GLX_VISUAL_SELECT_GROUP_SGIX attribute for visuals We already send this for fbconfigs. Mesa happens to implement glXChooseVisual relative to the fbconfig data, but that might not be true of NVIDIA's libGL. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ef2345aaa28461a76f77c65240ce5facc180f98e Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 composite: Export compIsAlternateVisual Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit bccbaf7c113b1300071601879002682ebbe8b1c1 Author: Adam Jackson Date: Thu Jan 19 17:20:49 2017 -0500 composite: Remove a misleading comment This comment is above compIsAlternateVisual, which used to be the only thing determining whether implicit redirect was needed. It's not anymore due to the redirection exception list. That job is now performed by compImplicitRedirect, whose code is self-explanitory. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 86463981361064dd0352ec215abf1696ce7fc5ea Author: Olivier Fourdan Date: Tue Jan 24 18:08:30 2017 +0100 glamor: Two pass won't work on memory pixmaps When selecting "CA_TWO_PASS" in glamor_composite_clipped_region() when the hardware does not support "GL_ARB_blend_func_extended", we call glamor_composite_choose_shader() twice in a row, which in turn calls glamor_pixmap_ensure_fbo(). On memory pixmaps, the first call will set the FBO and the second one will fail an assertion in glamor_upload_picture_to_texture() because the FBO is already set. Bail out earlier when the mask pixmap is in memory and the hardware capabilities would require to use two pass, so that the assertion is not failed and the rendering is correct. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99346 Signed-off-by: Olivier Fourdan Reviewed-by: Eric Anholt commit e7b8b7b131d8283c96ed0aff4593ab41441b5d3b Author: Adam Jackson Date: Thu Jan 19 17:30:40 2017 -0500 kdrive: Remove non-evdev input drivers Use evdev. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit d740e1830a7ef32433fdf338c1e04dc6c9a927cb Author: Adam Jackson Date: Thu Jan 19 17:30:39 2017 -0500 dmx: Remove non-evdev hardware input drivers Use evdev. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 6f531b0cdf8c9d7f711dd46071a26c50db3f1a16 Author: Mihail Konev Date: Sat Jan 14 12:51:45 2017 +0500 tests: Fix typo Remove redundrant/incorrect automake assignment. Buglink: https://lists.x.org/archives/xorg-devel/2017-January/052320.html Reported-by: Michel Dänzer Signed-off-by: Mihail Konev Reviewed-by: Jon Turney commit 3f8c2f94483bf0b96e129c97ef4950170a3f05b4 Author: Giuseppe Bilotta Date: Fri Jan 13 18:44:01 2017 +0100 tests: Fix without-dtrace build Signed-off-by: Giuseppe Bilotta Reviewed-by: Mihail Konev Signed-off-by: Mihail Konev commit b44bef513bd83249036cb5a237dc20eb6088c17c Author: Adam Jackson Date: Mon Jan 16 14:59:40 2017 -0500 Revert "tests: fix --disable-xorg build" Pushed the wrong thing. This reverts commit 730fd8c05f56da21894691bbd2e7ff37f67b45f4. commit 730fd8c05f56da21894691bbd2e7ff37f67b45f4 Author: Mihail Konev Date: Sat Jan 14 15:19:30 2017 +0500 tests: fix --disable-xorg build commit 704a867f8fb7652a8b7d5569bbe44e188457db4e Author: Mihail Konev Date: Thu Jan 12 13:21:12 2017 +0500 tests: Remove obsolete libxservertest.la Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 23f6dbc96e47be6cbeed78cc9ef303987c3e29a9 Author: Mihail Konev Date: Thu Jan 12 13:21:11 2017 +0500 tests: Move test/{xi1,xi2}/tests to test/ Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit ead5064581665ff40c177dd1b447949f1420e209 Author: Mihail Konev Date: Thu Jan 12 13:21:10 2017 +0500 tests: Convert test/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 773fc07e4c2f816966809492a924a9bd1a15d059 Author: Mihail Konev Date: Thu Jan 12 13:21:09 2017 +0500 tests: Convert test/xi2/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 371576f64baa99c4ab1e736fbae7975a32577275 Author: Mihail Konev Date: Thu Jan 12 13:21:08 2017 +0500 tests: Convert test/xi1/ to single binary Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit ff66bca3e8797db709e03572d296358dc4b95653 Author: Mihail Konev Date: Thu Jan 12 13:21:07 2017 +0500 tests: Refactor wraps into protocol-common.c Part of refactoring the tests into a single binary, to make partial rebuild slightly faster and less verbose. Prepares for joining test/xi2/protocol-* into a single binary. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 45546219e117c1b6129fd9f9be2ce5b592486feb Author: Mihail Konev Date: Tue Jan 3 23:40:18 2017 +0500 tests: Avoid libtool message The "copying selected object files" message appears as some source files have the same name, and some objects are included twice. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit 785053d033e73d2deb0ded4b97eabfd881991978 Author: Keith Packard Date: Mon Jan 9 18:10:21 2017 -0800 AttendClient of grab-pervious client must queue to saved_ready_clients [v2] A client which is attended while a grab is blocking execution of its requests needs to be placed in the saved_ready_clients list so that it will get scheduled once the grab terminates. Otherwise, if the client never sends another request, there is no way for it to be placed in the ready_clients list. v2: Wrap comment above mark_client_saved_ready. Remove test for OS_COMM_IGNORED which will always be true. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99333 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 436da935bde43076f3052a758a463ed080e8a747 Author: Qiang Yu Date: Tue Jan 10 18:51:57 2017 +0800 modesetting: cleanup pci device open Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit 555e0a42d138ac8d83af62638752a1bebad602d6 Author: Qiang Yu Date: Tue Jan 10 18:51:55 2017 +0800 randr: fix xserver crash when xrandr setprovideroutputsource xrandr --setprovideroutputsource Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU: Assertion `new->isGPU' failed. GPUScreen is not allowed to be sink output. Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit 1012510620de7dadd0ab18b19a8e11facd884601 Author: Qiang Yu Date: Tue Jan 10 18:51:54 2017 +0800 xfree86: fix wrong usage of xf86optionListMerge Signed-off-by: Qiang Yu Reviewed-by: Hans de Goede Signed-off-by: Peter Hutterer commit e473b2bc016adacfe3fa47fdf6a8ce9f8cddff62 Author: Michel Dänzer Date: Fri Nov 25 17:34:05 2016 +0900 present: Only call present_flip_notify if vblank->queued == FALSE We are no longer using the present_flip_queue list only for presents which have already been submitted to the driver for page flipping, but also for those which we are queueing up to be flipped later, marked with vblank->queued == TRUE. We were incorrectly calling present_flip_notify for such entries, failing the assertion in present_flip_notify (or presumably resulting in other undesirable behaviour with assertions disabled). Reproduction recipe: Run the JavaFX test case referenced by https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out of it while it's fullscreen. May take a few attempts to hit the assertion failure. Fixes: bab0f450a719 ("present: Fix presentation of flips out of order") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854 Reviewed-by: Alex Deucher commit 9d32b71c93cf6187e9320c99ae857e34a51b7102 Author: Mihail Konev Date: Wed Jan 4 07:08:51 2017 +0500 xkb: Match key releases with an overlaid press Testcase: In ~/.xbindkeysrc: "xterm &" XF86LaunchA In ~/ov.xkb: xkb_keymap { xkb_keycodes { include "evdev" }; xkb_types { include "complete" }; xkb_compat { include "complete" interpret Overlay1_Enable+AnyOfOrNone(all) { action= SetControls(controls=Overlay1); }; }; xkb_symbols { include "pc+inet(evdev)+us" key { [ Overlay1_Enable ] }; key { overlay1 = }; // Insert+1 => 2 key { overlay1 = }; // Insert+~ => XF86LaunchA }; xkb_geometry { include "pc(pc104)" }; }; Apply this layout: 'xkbcomp ~/ov.xkb $DISPLAY'. Run "xbindkeys -n -v" In the exact order: - press Insert - press Tilde - release Insert - wait - release Tilde Keyboard input in the new terminal window(s) would be locked until another Insert+Tilde . Reported-by: Mariusz Mazur Signed-off-by: Mihail Konev Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 29a4f3db60fdeaef7bca3aa2746bb43a1850fddd Author: Adam Jackson Date: Mon Jan 2 15:38:08 2017 -0500 glamor: Squash unused variable warning Accidentally introduced in 05e19644. Signed-off-by: Adam Jackson commit 9874f73e88678c9eacbcba05e52336fc63a32712 Author: Kai-Heng Feng Date: Thu Dec 15 13:56:38 2016 +0800 edid: Add quirk for ADA 1024x600 7" display. Detailed mode reports 108 mm x 68 mm which is for smaller display. Maximum image size reports 15 cm x 10 cm which aligns with its physical size, use this size instead. Signed-off-by: Kai-Heng Feng Acked-by: Alex Deucher commit 1b42f9505ff3a39b441464f553442079b750fe88 Author: Peter Hutterer Date: Thu Dec 8 14:32:06 2016 +1000 os: return 0 from check_timers if we touched any of them Fixes a regression introduced in 0b2f30834b1a9f. If a driver posts input events during a timer function (wacom and synaptics do this during tap timeouts), ProcessInputEvents() is not called for these events. There are no new events on any fds, so the events just sit in the queue waiting for something else to happen. Fix this by simply returning 0 from check_timers if we ran at least one of them or reset them all. This way the callers ospoll_wait will exit and continue with normal processing. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit c96c860b6420adf0d004707a323af30491a1d7d3 Author: Michal Srb Date: Mon Dec 12 17:45:22 2016 +0200 xinerama: Swap the response in RRXineramaWriteMonitor Reviewed-by: Adam Jackson commit 05e19644250698aa126a60bc671e85425df784d1 Author: Hans De Goede Date: Tue Dec 20 13:00:43 2016 +0100 glamor: Trust eglGetPlatformDisplayEXT if it exists If the libEGL we are using has eglGetPlatformDisplayEXT, yet it still returns NULL, then this very likely means that it does not support the type (e.g. EGL_PLATFORM_GBM_MESA) passed in, and then returning NULL is the right thing to do. This avoids falling back to an eglGetDisplay() implementation which does not understands the passed in gbm handle, treats it as a pointer to something else completely, followed by a crash sooner or later. Specifically this fixes using the nvidia binary driver, with nvidia's libEGL + the modesetting driver on a secondary GPU crashing inside glamor_egl_init() sometimes. Cc: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 5b74e260e009d8bdf26433724495802b85cce7c3 Author: Mihail Konev Date: Thu Dec 29 12:37:18 2016 +0500 os,dix: Depend custom libs on libs, not objects The custom os/os.O library reuses *.o files of os/libos.la. The current rule assumes automake puts all the objects into per-target am__*_la_OBJECTS variable. At least with AC_REPLACE_FUNCS, this no longer holds (as wanted objects are put into LTLIBOBJS instead). Depend on automake's result, the *.la library instead, to express demand of any its dependencies being built. Should be fixing randomly occuring "undefined reference to `strlcpy'" errors when linking Xvfb and other DDX-es that could use os.O. Reviewed-by: Adam Jackson Signed-off-by: Mihail Konev commit b5dffbbac193aa640ffcfa0a431c21b862854e53 Author: Hans De Goede Date: Mon Dec 12 17:03:17 2016 +0100 xfree86: Add ModulePath support for OutputClass config Sections Allow OutputClass config snippets to modify the module-path. Note that any specified ModulePaths will be pre-pended to the normal ModulePath. The idea behind this is that any output hardware specific modules should have preference over the normal modules. One use-case for this is the nvidia binary driver, this allows a config snippet like this: Section "OutputClass" MatchDriver "nvidia" Modulepath "/usr/lib64/nvidia/modules" EndSection To get the nvidia glx specific glx module loaded, but only when the nvidia kernel driver is loaded. Together with the glvnd work done recently, this allows the nouveau + mesa and nvidia-binary userspace stacks to co-exist on the same system without any ldconfig / xorg.conf tweaking and the xserver will automatically do the right thing depending on which kernel driver (nouveau or nvidia) is loaded. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit d75ffcdbf8c1e3c8e0d46debcd533a9f2560f0a8 Author: Hans De Goede Date: Mon Dec 12 17:03:16 2016 +0100 xfree86: Allow overriding primary GPU detection from an OutputClass section Allow using: Option "PrimaryGPU" "yes" In an OutputClass section to override the default primary GPU device selection which selects the GPU used as output by the firmware. If multiple output devices match an OutputClass section with the PrimaryGPU option set, the first one enumerated becomes the primary GPU. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit ab1a65b7755d081b41188104b21f4d21eaa3187b Author: Hans De Goede Date: Mon Dec 12 17:03:15 2016 +0100 xfree86: xf86platformProbe: split finding pci-info and setting primary GPU This is a preparation patch for allowing an OutputClass section to override the default primary GPU device selection. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 9cd3cc75269d9196898487b5712ee47b8291e077 Author: Hans De Goede Date: Mon Dec 12 17:03:14 2016 +0100 xfree86: Add options support for OutputClass Options Add support for setting options in OutputClass Sections and having these applied to any matching output devices. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 08b84d72878e43401e99059c3c926dfa42a360c3 Author: Hans De Goede Date: Mon Dec 12 17:03:13 2016 +0100 xfree86: Make OutputClassMatches take a xf86_platform_device Make OutputClassMatches directly take a xf86_platform_device as argument, rather then an index into xf86_platform_devices. This makes things easier for callers which already have a xf86_platform_device pointer. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit c57c1e53ea3d76ebba5b2a23b7260817d3e6b921 Author: Hans De Goede Date: Mon Dec 12 17:03:12 2016 +0100 xfree86: Free devlist returned by xf86MatchDevice xf86MatchDevice returns a dynamically allocated list of GDevPtr-s, free this when we're done with it. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 32e632e85894eddc3ace83f16f1e973b1be478fe Author: Adam Jackson Date: Mon Dec 12 13:08:17 2016 -0500 Revert "damage: Make damageRegionProcessPending take a damage not a drawable" The commit message makes the assertion that the code below damage is not allowed to change whether there's a damage monitor for the drawable. That turns out not to be the case! exa's mixed code, at least, will create and destroy a damage in PrepareAccess. The destroy path can then be catastrophic, as damageRegionProcessPending will attempt to RegionEmpty memory from the middle of a freed block. I'd wanted that invariant for performance, but faster isn't worth broken, so revert it. I think what exa's doing is reasonable, so the better way to improve performance for the unmonitored case is to either revisit dynamically wrapping into the GC, or inline damage into dix. This reverts commit 4e124203f2260daaf54155f4a05fe469733e0b97. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389886 Signed-off-by: Adam Jackson commit 6dd65a6e9bd41237afe7615bea1cc9510e82781a Author: Adam Jackson Date: Fri Dec 9 14:52:38 2016 -0500 shadow: Remove unused shadowAlloc Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8d985c1e696bf46edaea0021f03f6f613ce37860 Author: Adam Jackson Date: Fri Dec 9 14:52:37 2016 -0500 shadow: Macro cleanup shadowDamage is just obfuscation. The other two macros won't work outside shadow.c since the private key is in fact static there (meaning the extern decl is a lie). Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit a530dc2a62349d922de77a75786a3795102aec11 Author: Adam Jackson Date: Fri Dec 9 14:52:36 2016 -0500 shadow: Remove indirection stubs These are no longer used in the drivers. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 1ae09800863992cfb1d5d21c600e2bc29e3b6ab2 Author: Adam Jackson Date: Fri Dec 9 14:52:35 2016 -0500 shadow: Lift 32->24 conversion from modesetting to dix Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 2b486f052d8a7d3bada9eb2615aa19d79e999cbe Author: Adam Jackson Date: Fri Dec 9 14:52:34 2016 -0500 shadowfb: Rename this particular shadow.c to shadowfb.c So as not to conflict with the one in miext/shadow. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 98caba9f5669291e84f8610cc3071a9ac2df205f Author: Adam Jackson Date: Fri Dec 9 14:52:29 2016 -0500 dix: Clear graphicsExposures for scratch GCs in one place ... instead of in all the CreateScratchGC callers. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit e900a00f8dc5a1db63bafddd4ad1cde744975db1 Author: Adam Jackson Date: Fri Dec 9 14:52:28 2016 -0500 dix: Rename (and retype) PixmapPerDepth[1] to defaultStipple Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8b335d9068fe4e1f1423a4d86c22b69ffcb819a5 Author: Ben Crocker Date: Tue Nov 15 16:34:38 2016 -0500 Fix a segfault that occurs if xorg.conf.d is absent: In InitOutput, if xf86HandleConfigFile returns CONFIG_NOFILE (which it does if no config file or directory is present), the autoconfig flag is set, causing xf86AutoConfig to be called later on. xf86AutoConfig calls xf86OutputClassDriverList via the call tree: xf86AutoConfig => listPossibleVideoDrivers => xf86PlatformMatchDriver => xf86OutputClassDriverList and xf86OutputClassDriverList attempts to traverse a linked list that is a member of the XF86ConfigRec struct pointed to by the global xf86configptr, which is NULL at this point because the XF86ConfigRec struct is only allocated (by xf86readConfigFile) AFTER the config file and directory have been successfully opened; the CONFIG_NOFILE return from xf86HandleConfigFile occurs BEFORE the call to xf86readConfigFile which allocates the XF86ConfigRec struct. Rx: In read.c (for symmetry with xf86freeConfig, which already appears in this file), add a new function xf86allocateConfig which tests the value of xf86configptr and, if it's NULL, allocates the XF86ConfigRec struct and deposits the pointer in xf86configptr. In xf86Parser.h, add a prototype for the new xf86allocateConfig function. Back in read.c, #include "xf86Config.h". In xf86readConfigFile, change the open-code call to calloc to a call to the new xf86allocateConfig function. In xf86AutoConfig.c, add a call to the new xf86allocateConfig function to the beginning of xf86AutoConfig to make sure the XF86ConfigRec struct is allocated. Reviewed-by: Adam Jackson Signed-off-by: Ben Crocker commit b365c5d16894a259dbf29db4ca2640d8ed768063 Author: Pekka Paalanen Date: Wed Dec 7 15:43:06 2016 +0200 test: fix distributing scripts Fix the following error on 'make distcheck': make[6]: *** No rule to make target 'scripts/xvfb-piglit.sh', needed by 'scripts/xvfb-piglit.sh.log'. Stop. make[6]: Leaving directory '/home/pq/git/xserver/xorg-server-1.19.99.1/_build/sub/test' Makefile:1367: recipe for target 'check-TESTS' failed The setup to trigger this is: $ ./configure --prefix=/home/pq/local --disable-docs --disable-devel-docs --enable-xwayland --disable-xorg --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin --enable-debug SCRIPT_TESTS is populated conditionally, but we should distribute the scripts in any case. Reviewed-by: Adam Jackson Signed-off-by: Pekka Paalanen commit f31875510d818ba517f082e124adb294db906e51 Author: Adam Jackson Date: Tue Dec 6 14:11:11 2016 -0500 composite: Fix repaint of borders (v2) When going from border width zero to a non-zero border width, the Composite extension is informed via the ConfigNotify callback. The call-chain looks like this: compConfigNotify -> compReallocPixmap -> compSetPixmap -> TraverseTree -> compSetPixmapVisitWindow. However, at this time, pWindow->borderWidth was not yet updated. Thus, HasBorder() is false and the window border will not be repainted. To fix this, thread the new bw through to the window visitor, and inspect that rather than HasBorder(). For the other callers of compSetPixmap the border does not change size, so we can pass pWin->borderWidth instead. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98499 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 75c4f6e412e07c5d416fa9ad8d7defd972d2baa9 Author: Hans de Goede Date: Fri Sep 30 12:29:09 2016 +0200 xfree86: Try harder to find atleast 1 non GPU Screen If we did not find any non GPU Screens, try again ignoring the notion of any video devices being the primary device. This fixes Xorg exiting with a "no screens found" error when using virtio-vga in a virtual-machine and when using a device driven by simpledrm. This is a somewhat ugly solution, but it is the best I can come up with without major surgery to the bus and probe code. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 7121b03d324fccf687d49b63c53da7c8d93038c9 Author: Hans de Goede Date: Fri Sep 30 11:59:04 2016 +0200 xfree86: Make adding unclaimed devices as GPU devices a separate step This is primarily a preparation patch for fixing the xserver exiting with a "no screens found" error even though there are supported video cards, due to the server not recognizing any card as the primary card. This also fixes the (mostly theoretical) case of a platformBus capable driver adding a device as GPUscreen before a driver which only supports the old PCI probe method gets a chance to claim it as a normal screen. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit b72d161cad15bec9dd082d30521c5383be526c56 Author: Hans de Goede Date: Tue Sep 27 14:30:10 2016 +0200 xfree86: Remove redundant ServerIsNotSeat0 check from xf86CallDriverProbe If foundScreen is TRUE, then all the code below the removed if will not execute until we reach the return foundScreen; at the end, so this entire if block is redundant. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit a46afee84d45fbff4e4dad9376afc95bbcc31d7c Author: Hans de Goede Date: Tue Nov 22 14:53:20 2016 +0100 randr: rrCheckPixmapBounding: do not shrink the screen_pixmap The purpose of rrCheckPixmapBounding is to make sure that the screen_pixmap is *large* enough for the slave-output which crtc is being configured. However until now rrCheckPixmapBounding would also shrink the screen_pixmap in certain scenarios leading to various problems. For example: Take a laptop with its internalscreen on a slave-output and currently disabled and an external monitor at 1920x1080+0+0. Now lets say that we want to drive the external monitor at its native resolution of 2560x1440 and have the internal screen mirror the top left part of the external monitor, so we run: $ xrandr --output eDP --mode 1920x1080 --pos 0x0 --output HDMI \ --mode 2560x1440 --pos 0x0 Here xrandr utility first calls RRSetScreenSize to 2560x1440, then it calls RRSetCrtc 1920x1080+0+0 on the eDP, since this is a slave output, rrCheckPixmapBounding gets called and resizes the screen_pixmap to 1920x1080, undoing the RRSetScreenSize. Then RRSetCrtc 2560x1440+0+0 gets called on the HDMI, depending on crtc->transforms this will either result in a BadValue error from ProcRRSetCrtcConfig; or it will succeed, but the monitor ends up running at 2560x1440 while showing a 1920x1080 screen_pixmap + black borders on the right and bottom. Neither of which is what we want. This commit removes the troublesome shrinking behavior, fixing this. Note: 1) One could argue that this will leave us with a too large screen_pixmap in some cases, but rrCheckPixmapBounding only gets called for slave outputs, so xrandr clients already must manually shrink the screen_pixmap after disabling crtcs in normal setups. 2) An alternative approach would be to also call rrCheckPixmapBounding on RRSetCrtc on normal (non-slave) outputs, but that would result in 2 unnecessary resizes of the screen_pixmap in the above example, which seems undesirable. Cc: Nikhil Mahale Cc: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 3b624aa9a9df86dc7d48149e0f18ca223b4355f1 Author: Hans de Goede Date: Tue Nov 22 14:48:14 2016 +0100 randr: rrCheckPixmapBounding: Do not substract crtc non 0 x,y from screen size The purpose of rrCheckPixmapBounding is to make sure that the screen_pixmap is large enough for the slave-output which crtc is being configured. This should include crtc->x and crtc->y, otherwise the crtc might still end up scanning out an area outside of the screen-pixmap. For example: Take a laptop with an external monitor on a slave-output at 1920x1080+0+0 and its internal-screen at 3840x2160+1920+0 and in gnome-settings-daemon move the external monitor to be on the ri ght of the internal screen rather then on the left. First g-s-d will do a RRSetScreenSize to 5760*2160 (which is a nop), then it calls RRSetCrtc to move the slave output to 1920x1080+3840+0, since this is a slave output, rrCheckPixmapBounding gets called, since the 2 crtcs now overlap the code before this commit would shrinks the screen_pixmap to 3180*2160. Then g-s-d calls RRSetCrtc to move the internal screen to 3180*2160+0+0. And we end up with the slave-output configured to scan-out an area which completely falls outside of the screen-pixmap (and end up with a black display on the external monitor). This commit fixes this by not substracting the x1 and y1 coordinates of the union-ed region when determining the new screen_pixmap size. Cc: Nikhil Mahale Cc: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit e1d30075c923f96a375895d74ea12a3c92a640c6 Author: Adam Jackson Date: Tue Nov 22 10:51:24 2016 -0500 configure: Enable glamor when building just Xwayland Signed-off-by: Adam Jackson Acked-by: Daniel Stone Reviewed-by: Pekka Paalanen Tested-by: Pekka Paalanen Reviewed-by: Eric Anholt commit 59ad0e6a416d8e23f9d962af67a16ee28ec7867b Author: Olivier Fourdan Date: Wed Nov 30 09:42:43 2016 +0100 xwayland: Fix use after free of cursors Sometimes, Xwayland will try to use a cursor that has just been freed, leading to a crash when trying to access that cursor data either in miPointerUpdateSprite() or AnimCurTimerNotify(). CheckMotion() updates the pointer's cursor based on which xwindow XYToWindow() returns, and Xwayland implements its own xwl_xy_to_window() to fake a crossing to the root window when the pointer has left the Wayland surface but is still within the xwindow. But after an xwindow is unrealized, the last xwindow used to match the xwindows is cleared so two consecutive calls to xwl_xy_to_window() may not return the same xwindow. To avoid this issue, update the last_xwindow based on enter and leave notifications instead of xwl_xy_to_window(), and check if the xwindow found by the regular miXYToWindow() is a child of the known last xwindow, so that multiple consecutive calls to xwl_xy_to_window() return the same xwindow, being either the one found by miXYToWindow() or the root window. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1385258 Signed-off-by: Olivier Fourdan Tested-by: Vít Ondruch Tested-by: Satish Balay Reviewed-by: Jonas Ådahl commit f43207c1c4a8487600cf3ea116c10437417c861b Author: Olivier Fourdan Date: Thu Nov 3 09:59:30 2016 +0100 glamor: restore vfunc handlers on init failure In glamor_init(), if the minimum requirements are not met, glamor may fail after setting up its own CloseScreen() and DestroyPixmap() routines, leading to a crash when either of the two routines is called if glamor failed to complete its initialization, e.g: (EE) Backtrace: (EE) 0: Xwayland (OsSigHandler+0x29) (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) (EE) 2: Xwayland (glamor_sync_close+0x2a) (EE) 3: Xwayland (glamor_close_screen+0x52) (EE) 4: Xwayland (CursorCloseScreen+0x88) (EE) 5: Xwayland (AnimCurCloseScreen+0xa4) (EE) 6: Xwayland (present_close_screen+0x42) (EE) 7: Xwayland (dix_main+0x4f9) (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf1) (EE) 9: Xwayland (_start+0x2a) Restore the previous CloseScreen() and DestroyPixmap() vfunc handlers in case of failure when checking for the minimum requirements, so that if any of the requirement is not met we don't leave the CloseScreen() and DestroyPixmap() from glamor handlers in place. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1390018 Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede Reviewed-by: Eric Anholt commit d6a6e1d6abb110ff00ad31b94cd29d92ca7c71a5 Author: Peter Hutterer Date: Fri Nov 11 15:28:50 2016 +1000 Xi: when creating a new master device, update barries for all clients The previous code only worked when the barrier was created by the same client as the one calling XIChangeDeviceHierarchy. http://bugzilla.redhat.com/show_bug.cgi?id=1384432 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 5611585b87ce48428a66f98ece319a083f55d205 Author: Rui Matos Date: Thu Nov 24 19:56:18 2016 +0100 xwayland: Don't send KeyRelease events on wl_keyboard::leave Commits 816015648ffe660ddaa0f7d4d192e555b723c372 and fee0827a9a695600765f3d04376fc9babe497401 made it so that wl_keyboard::enter doesn't result in X clients getting KeyPress events while still updating our internal xkb state to be in sync with the host compositor. wl_keyboard::leave needs to be handled in the same way as its semantics from an X client POV should be the same as an X grab getting triggered, i.e. X clients shouldn't get KeyRelease events for keys that are still down at that point. This patch uses LeaveNotify for these events on wl_keyboard::leave and changes the current use of KeymapNotify to EnterNotify instead just to keep some symmetry between both cases. On ProcessDeviceEvent() we still need to deactivate X grabs if needed for KeyReleases. Signed-off-by: Rui Matos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2de37eb71b928f6f50c109536c2f7b77293ad8e3 Author: Pekka Paalanen Date: Wed Nov 23 09:54:27 2016 +0200 xwayland: fix order of calloc() args The definition by the manual is: calloc(size_t nmemb, size_t size) Swap the arguments of calloc() calls to be the right way around. Presumably this makes no functional difference, but better follow the spec. Signed-off-by: Pekka Paalanen Signed-off-by: Peter Hutterer commit cf8860786c3e301486cd2853bc82977ba75e6b17 Author: Rhys Kidd Date: Fri Oct 28 22:44:30 2016 -0400 test: Fix stray Makefile reference to removed os test Fixes the following warning: test/Makefile.am:69: warning: variable 'os_LDADD' is defined but no program or test/Makefile.am:69: library has 'os' as canonical name (possible typo) Introduced upon the removal of test/os in: commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Rhys Kidd Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit f0f8d5bb535814d5803df541b0ef4cb0354fabbe Author: Keith Packard Date: Fri Nov 18 09:48:28 2016 -0800 Bump to post-1.19 development version Signed-off-by: Keith Packard commit 45af7fcb522464922831005d63cc362dc09f19a9 Author: Olivier Fourdan Date: Thu Nov 10 09:36:40 2016 +0100 xwayland: Remove MIPOINTER() definition Not needed anymore now that mipointer exposes an API for that, miPointerInvalidateSprite() Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7e5c9bdf73e4185ac4cf7f044da0793a5cc3e62c Author: Keith Packard Date: Tue Nov 15 08:12:05 2016 -0800 Bump version to 1.19.0 Signed-off-by: Keith Packard commit ea8efb3a997e15d27d362762e6c85d59487f9864 Author: Keith Packard Date: Wed Nov 2 13:25:33 2016 -0700 dix: Make sure client is not in output_pending chain after closed (RH 1382444) I think it is possible that output could get queued to a client during CloseDownClient. After it is removed from the pending queue, active grabs are released, the client is awoken if sleeping and any work queue entries related to the client are processed. To fix this, move the call removing it from the output_pending chain until after clientGone has been set and then check clientGone in output_pending_mark. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1382444 Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 7513da40a656317ad3aa101651d29373de99c798 Author: Timo Aaltonen Date: Wed Nov 2 17:18:11 2016 +0200 dri2: Sync i965_pci_ids.h from mesa Import changes from these mesa commits: 85ea8deb26da420 i965: Removing PCI IDs that are no longer listed as Kabylake. bdff2e554735ed9 i956: Add more Kabylake PCI IDs. f1fa8b4a1ca73fa i965/bxt: Add 2x6 variant d1ab544bb883d04 i965/chv: Display proper branding 20e8ee36627f874 i965/skl: Update Skylake renderer strings 644c8a515192d28 i965/skl: Add two missing device IDs Reviewed-by: Adam Jackson Signed-off-by: Timo Aaltonen commit 4cfee398726adf89db4b632ade7d6cab8b78282e Author: Ian Ray Date: Wed May 25 10:41:53 2016 +0300 xwayland-shm: block signals during fallocate posix_fallocate() does an explicit rollback if it gets EINTR, and this is a problem on slow systems because when the allocation size is sufficiently large posix_fallocate() will always be interrupted by the smart scheduler's SIGALRM. Changes since v1 - big comment in the code to explain what is going on Reviewed-by: Adam Jackson Signed-off-by: Ian Ray Acked-by: Pekka Paalanen Acked-by: Daniel Stone commit 512e75a23b7f6339593c3ae6942f0c420a975fd3 Author: Keith Packard Date: Fri Oct 28 09:32:42 2016 -0700 Bump to 1.18.99.902 (1.19 RC2) Signed-off-by: Keith Packard commit c85f81825e196e96337347e0ce3a538fb2e38f16 Author: Keith Packard Date: Fri Oct 28 09:28:32 2016 -0700 dix: Bump MAXHASHSIZE for the resource db [v2] [This was originally a workaround for a client-side resource leak: http://lists.freedesktop.org/archives/xorg-devel/2012-November/034555.html Obviously that's a broken app, but the performance problem it illustrates - that walking the linked list ends up burning all your CPU time - is real enough. - ajax] v2: Replace with a shorter code sequence which computes the same results for all but numBits == 7 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 356db2340f5b473a7191c7969586ca5b0396c48f Merge: 9ed5b2635 03d99ef72 Author: Keith Packard Date: Fri Oct 28 09:05:54 2016 -0700 Merge remote-tracking branch 'jturney/master' commit 9ed5b263542e5245317927828f0515db6c0a54c8 Author: Keith Packard Date: Fri Oct 28 08:04:43 2016 -0700 os: Recompute whether any clients are ready after ProcessWorkQueue() (bug 98030) If a work proc wakes up a sleeping client and it is ready to execute, we need to re-compute the local 'are_ready' value before deciding what timeout value to use in WaitForSomething. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98030 Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 2c91f3235a4e1655e18cb014922529161051ffbb Author: Keith Packard Date: Wed Oct 5 09:41:44 2016 -0700 ephyr: Leave window unmapped for -glamor-skip-present [v2] If we're never painting anything in the window, we probably don't need to map it. v2: Drop ephyr_glamor_gles2 from hostx.c Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit cba5a10fd93310702cad9dbe1e6d48da99f5552f Author: Alex Goins Date: Wed Oct 26 11:03:49 2016 -0700 ramdac: Check sPriv != NULL in xf86CheckHWCursor() xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option "SWCursor" is specified, sPriv == NULL. In this case we should assume that HW cursors are not supported. Signed-off-by: Alex Goins Reviewed-by: Andy Ritger Signed-off-by: Keith Packard commit 03d99ef729178dd99268f185fb45320a29382091 Author: Jon Turney Date: Thu Oct 6 22:13:07 2016 +0100 glx/dri2: Don't build DRI loader if DRI2 isn't enabled This partially reverts 501d8e2b. Signed-off-by: Jon Turney Reviewed-by: Emil Velikov commit 5cb328338684d8e5b03913c47475bfcd7acffec4 Author: Peter Hutterer Date: Wed Oct 26 12:21:16 2016 +0200 inputthread: On Linux leave the main thread's name as-is On Linux, setting the main thread's name changes the program name (/proc/self/comm). Setting it to MainThread breaks scripts that rely on the command name, e.g. ps -C Xorg. Signed-off-by: Peter Hutterer Signed-off-by: Hans de Goede commit 007f8ee61a35ceda36b43e772a9a1074b8e27a06 Author: Olivier Fourdan Date: Fri Oct 21 10:11:45 2016 +0200 xwayland: Activate and enable touch devices On some random condition, a touch event may trigger a crash in Xwayland in GetTouchEvents(). The (simplified) backtrace goes as follow: (gdb) bt #0 GetTouchEvents() at getevents.c:1892 #1 QueueTouchEvents() at getevents.c:1866 #2 xwl_touch_send_event() at xwayland-input.c:652 #5 wl_closure_invoke() from libwayland-client.so.0 #6 dispatch_event() from libwayland-client.so.0 #7 wl_display_dispatch_queue_pending() from libwayland-client.so.0 #8 xwl_read_events() at xwayland.c:483 #9 ospoll_wait() at ospoll.c:412 #10 WaitForSomething() at WaitFor.c:222 #11 Dispatch() at dispatch.c:412 #12 dix_main() at main.c:287 #13 __libc_start_main() at libc-start.c:289 #14 _start () The crash occurs when trying to access the sprite associated with the touch device, which appears to be NULL. Reason being the device itself is more a keyboard device than a touch device. Moreover, it appears the device is neither enabled nor activated (inited=0, enabled=0) which doesn't seem right, but matches the code in init_touch() from xwayland-input.c which would enable the device if it was previously existing and otherwise would create the device but not activate it. Make sure we do activate and enable touch devices just like we do for other input devices such as keyboard and pointer. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit f68ba7b81ffe765380664fccc92f3e689c6c48c2 Author: Rui Matos Date: Tue Oct 25 19:24:49 2016 +0200 xwayland: Transform pointer enter event coordinates Pointer enter event coordinates are surface relative and we need them to be screen relative for pScreen->SetCursorPosition(). https://bugzilla.gnome.org/show_bug.cgi?id=758283 Signed-off-by: Rui Matos Reviewed-by: Eric Engestrom Reviewed-by: Jonas Ådahl Signed-off-by: Hans de Goede commit f5c6d751d08c6de77c2ca49ba2a48f8023758cef Author: Nikhil Mahale Date: Sat Oct 22 17:40:51 2016 +0530 modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT Commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 had already unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT but commit 9257b1252da9092ddc676fec9aabe2b33dfad272 didn't notice that. Signed-off-by: Nikhil Mahale Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4aaeeda4774397dd6d80aa240ca623ae795ec5dc Author: Hans de Goede Date: Tue Oct 18 16:10:19 2016 +0200 xfree86: Xorg.wrap: Do not require root rights for cards with 0 outputs Prior to this commit the Xorg.wrap code to detect if root rights are necessary checked for DRM_IOCTL_MODE_GETRESOURCES succeeding *and* reporting more then 0 output connectors. DRM_IOCTL_MODE_GETRESOURCES succeeding alone is enough to differentiate between old drm only cards (which need ums and thus root) and kms capable cards. Some hybrid gfx laptops have 0 output connectors on one of their 2 GPUs, resulting in Xorg needlessly running as root. This commits removes the res.count_connectors > 0 check, fixing this. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 7d91063aca4e4d326c294e246bc2dc36cb05318e Author: Michel Dänzer Date: Mon Oct 17 18:48:44 2016 +0900 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit f6ff2e974c5de3071c899eba828789f1d4d8645a Author: Mihail Konev Date: Sat Oct 15 04:13:43 2016 +0000 modesetting: fix glamor ifdef Add a missing ifdef needed for --disable-glamor. Signed-off-by: Mihail Konev Reviewed-by: Jon Turney Signed-off-by: Hans de Goede commit 8fee6a917b6468e1b116d922f86484498874fb5c Author: Mihail Konev Date: Fri Oct 14 02:40:59 2016 +0000 xwin: make glx optional again Commit 501d8e2b removed --enable-aiglx, but made xwin always be --enable-glx. Signed-off-by: Mihail Konev Reviewed-by: Emil Velikov Reviewed-by: Jon Turney Signed-off-by: Hans de Goede commit d13cb974426f7f1110b0bdb08c4ebb46ff8975f7 Author: Peter Hutterer Date: Fri Oct 21 06:27:57 2016 +1000 ddx: add new call to purge input devices that weren't added Special case for the systemd-logind case in xfree86: when we're vt-switched away and a device is plugged in, we get a paused fd from logind. Since we can't probe the device or do anything with it, we store that device in the xfree86 and handle it later when we vt-switch back. The device is not added to inputInfo.devices until that time. When the device is removed while still vt-switched away, the the config system never notifies the DDX. It only runs through inputInfo.devices and our device was never added to that. When a device is plugged in, removed, and plugged in again while vt-switched away, we have two entries in the xfree86-specific list that refer to the same device node, both pending for addition later. On VT switch back, the first one (the already removed one) will be added successfully, the second one (the still plugged-in one) fails. Since the fd is correct, the device works until it is removed again. The removed devices' config_info (i.e. the syspath) doesn't match the actual device we addded tough (the input number increases with each plug), it doesn't get removed, the fd remains open and we lose track of the fd count. Plugging the device in again leads to a dead device. Fix this by adding a call to notify the DDX to purge any remainders of devices with the given config_info, that's the only identifiable bit we have at this point. https://bugs.freedesktop.org/show_bug.cgi?id=97928 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 8fcf2fa78f09257933b17e7dc9a03a2034e3076f Author: Peter Hutterer Date: Thu Oct 20 15:45:46 2016 +1000 xfree86: swap the list of paused devices to an xorg_list No functional changes but it makes it easier to remove elements from the middle of the list (future patch). We don't have an init call into this file, so the list is manually initialized. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 28d8855cd4e3be8831fb1c17bf1d205bd8465d1e Author: Peter Hutterer Date: Thu Oct 20 15:25:51 2016 +1000 xfree86: use the right option traversal list to search for an option They're identically laid-out structs but let's use the right type to search for our desired value. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 7fc96fb02dade4a86f2fc038f3cf5f2d9c0cda00 Author: Emil Velikov Date: Fri Oct 21 19:06:00 2016 +0100 glamor: don't look for non-existing EGL_KHR_platform_base The extension does not exist in the registry, thus needs to know they're using EGL 1.5 in order to determine the eglGetPlatformDisplay function pointer is valid. Thus brings us into some lovely circular dependency. Since mesa won't be able (in the foreseeable future) to export the KHR flavour of extension (another way one could assume that EGL 1.5 is available) just drop all the heuristics and use the EGL_EXT_platform_base extension. In practise (checked with the Mali driver) any EGL 1.5 driver will advertise support for EGL_EXT_platform_base. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 5dcb0666b82f5ab00f3d22e86f05ac14b0d5341e Author: Mihail Konev Date: Sat Oct 15 17:59:05 2016 +0000 os/inputthread: Ensure pollfd refreshing When putting a device node into a poll-request list, do not overwrite a "please-remove" element with the same fd, so that a closed device file is ospoll_remove'd prior to being ospoll_add'ed. Before, the opposite order was possible, resulting in ospoll_add considering the newly opened file being already polled, should it have a fd for which the "please-remove" has not been procesed yet. In this case, no further events would be seen from the device. Signed-off-by: Mihail Konev Regressed-in: 52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97880 Patchwork: https://patchwork.freedesktop.org/patch/113763/ Hit-and-Reduced-by: Hans de Goede Reviewed-and-Reduced-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9cf0bd4d4507dca6234024605b14724713f2109e Author: Michel Dänzer Date: Wed Oct 5 18:28:45 2016 +0900 xf86Cursor: Take the input lock in xf86Set/MoveCursor Prevents the HW cursor from intermittently jumping around when the cursor image is changed while the cursor is being moved. This is hardly noticeable in normal operation but can be quite confusing when stepping through these codepaths in a debugger. Reviewed-by: Hans de Goede commit 011ce3297d924e78ef0254b0451561946bd8be8d Author: Michel Dänzer Date: Wed Oct 5 18:01:29 2016 +0900 xf86Cursor: Use PRIME master xf86CursorScreenRec::HotX/Y for slaves xf86CursorScreenRec::HotX/Y contain 0 for PRIME slave screens. Fixes incorrect HW cursor position on PRIME slave screens. Also hoist the hotspot translation out from xf86ScreenSet/MoveCursor to xf86Set/MoveCursor, since the hotspot position is a property of the cursor, not the screen. v2: * Squash patches 1 & 2 of the v1 series, since it's basically the same problem * Use the master screen's xf86CursorScreenRec::HotX/Y instead of CursorRec::bits->x/yhot, since CursorRec::bits can be NULL (Hans de Goede) Reviewed-by: Hans de Goede commit e3f53aa3a8dfc323c75837cd41e35b8e895d547e Author: Adam Jackson Date: Thu Oct 6 14:42:34 2016 -0400 glx/dri2: Don't include drm headers They're not needed, and they won't be present on win32. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 97a8353ec1192d8d3bd2ebb99e5687cb91427e09 Author: Peter Harris Date: Thu Sep 29 11:17:48 2016 -0400 Fix id in error when resource does not exist Always set client->errorValue before returning an error. Test program: int main(int argc, char *argv[]) { int screen = 0; xcb_connection_t *c = xcb_connect(NULL, &screen); if (!c) { printf("Cannot connect\n"); return 1; } xcb_void_cookie_t tok = xcb_free_gc_checked(c, BAD_VALUE); xcb_g_context_error_t *err = (xcb_g_context_error_t *)xcb_request_check(c, tok); if (!err) { printf("Unexpected request success\n"); return 1; } if (err->bad_value != BAD_VALUE) { printf("Error: Got 0x%X, expected 0x%X\n", err->bad_value, BAD_VALUE); return 1; } printf("Success! Got expected bad value of 0x%X\n", BAD_VALUE); return 0; } Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit f4a41155479e68bf55740c1dfffafc78e4c02087 Author: Adam Jackson Date: Wed Oct 5 12:34:34 2016 -0400 glamor: Use eglGetPlatformDisplay{,EXT} if we can eglGetDisplay forces the implementation to guess which kind of display it's been handed. glvnd does something different from Mesa, and in general it's impossible for the library to get this right. Add a new inline that gets the logic right, and works around a quirk in epoxy. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 95d3980c7c991b2cc8dcadac173635641ae15865 Author: Michel Dänzer Date: Wed Oct 5 17:29:36 2016 +0900 test: Use $XSERVER_BUILDDIR for Xvfb executable path Fixes make check with out-of-tree builds. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Reviewed-by: Eric Anholt commit cc69d4f110bd8a87b9e6c238ebebf8d85cbd93ec Author: Emil Velikov Date: Thu Sep 29 18:35:04 2016 +0100 xfree86/dri: remove libdrm runtime checks As of last commit all the places in our configure.ac require version 2.3.1 (released back in 2007) or later. With the latter introducing the 1.3.0 version, as returned by drmGetLibVersion. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 962962e978e5cededc20e577a36f77eb24d14bda Author: Emil Velikov Date: Thu Sep 29 18:35:03 2016 +0100 configure.ac: bump the required libdrm version to 2.3.1 It fixes a bug where the version reported by drmGetLibVersion() was 'wrong'. See libdrm commit 79038751ffe("libdrm: add support for server side functionality in libdrm") for details. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 74a8b320fa5068cd86d8b8b8e73fa92caae9a8a6 Author: Emil Velikov Date: Thu Sep 29 18:35:02 2016 +0100 configure.ac: use $LIBDRM over libdrm when using pkg-config The former contains the minimum required version which is required. Strictly speaking Xephyr/Xwayland may require version greater than the current 2.3.0, although I've personally haven't checked the specifics. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson commit 45e1220486139c483a69366323f8f590beffa19d Author: Emil Velikov Date: Thu Sep 29 18:35:01 2016 +0100 configure.ac: default to DRI=yes on solaris platforms Afaict there's little-to-no reason/way one would want xserver without DRI support on Solaris platforms. This will allow us to simplify/fix all the libdrm detection in the next commit. Cc: Alan Coopersmith Signed-off-by: Emil Velikov Reviewed-by: Alan Coopersmith Reviewed-by: Adam Jackson commit 501d8e2beb337e072c93c9310fcd927a099b9c3b Author: Emil Velikov Date: Thu Sep 29 18:41:19 2016 +0100 configure.ac: remove --enable-aiglx option Presently the option guards both direct and accelerated indirect GLX. As such when one toggles it off they end up without any acceleration. Remove the option all together until we have the time to split/rework things. Cc: Jon Turney Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 7ec350ddd42479595f0ea88f86085af941913617 Author: Emil Velikov Date: Thu Sep 29 18:41:18 2016 +0100 xfree86: remove aiglx cmd/xorg.conf option The option is misleading and using it leads to disabling both direct and accelerated indirect GLX. In such cases the xserver GLX attempts to match DRISW (IGLX) configs with the DRI2/3 ones (direct GLX) leading to all sorts of fun experience. Remove the option until we get a clear split and control over direct vs indirect GLX. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 04ef8558a731bf070abf1b40c7e6b54aad8f5f31 Author: Emil Velikov Date: Thu Sep 29 18:41:17 2016 +0100 glx: drisw is not accelerated IGLX, reflect that in log messages The messages from glxdricommon.c (used by drisw) still have the A, but at least we're don't have it locally. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 1c2fcb95484777ca9aa80b3f814ad64e81f825f1 Author: Olivier Fourdan Date: Wed Oct 5 08:36:21 2016 +0200 glamor: Fix pixmap offset for bitplane in glamor_copy_fbo_cpu Commit cba28d5 - "glamor: Handle bitplane in glamor_copy_fbo_cpu" introduced a regression as the computed pixmap offset would not match the actual coordinates and write data elsewhere in memory causing a segfault in fbBltOne(). Translate the pixmap coordinates so that the data is read and written at the correct location. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97974 Signed-off-by: Olivier Fourdan Reviewed-and-Tested-by: Michel Dänzer commit a6e85e6330adcdcbcd939c0963daaecc96d41a2a Author: Jonas Ådahl Date: Tue Sep 13 15:17:08 2016 +0800 xwayland: Add pointer warp emulator Emulate pointer warps by locking the pointer and sending relative motion events instead of absolute. X will keep track of the "fake" pointer cursor position given the relative motion events, and the client warping the cursor will warp the faked cursor position. Various requirements need to be met for the pointer warp emulator to enable: The cursor must be invisible: since it would not be acceptable that a fake cursor position would be different from the visual representation of the cursor, emulation can only be done when there is no visual representation done by the Wayland compositor. Thus, for the emulator to enable, the cursor must be hidden, and would the cursor be displayed while the emulator is active, the emulator would be destroyed. The window that is warped within must be likely to have pointer focus. For example, warping outside of the window region will be ignored. The pointer warp emulator will disable itself once the fake cursor position leaves the window region, or the cursor is made visible. This makes various games depending on pointer warping (such as 3D first-person shooters and stategy games using click-to-drag-map like things) work. Signed-off-by: Jonas Ådahl commit 467ab142fff926e1475440dd5f649a49f45808fa Author: Jonas Ådahl Date: Tue Sep 13 15:17:07 2016 +0800 xwayland: Translate a pointer grab with confineTo to pointer confinement Translate grabbing a pointer device with confineTo set to a window into confining the Wayland pointer using the pointer constraints protocol. This makes clients that depend on the pointer not going outside of the window region, such as certain games and virtual machines viewers, to function more properly. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit ca7b593fbe54bc9a0b44037e62e4b4401cbd375e Author: Jonas Ådahl Date: Thu Sep 29 10:42:13 2016 +0800 xwayland: Bind pointer constraints global Will be used by the pointer warp emulator. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit c14a8c6cc0fcd56c380d1220c2a8f04b74edee93 Author: Jonas Ådahl Date: Tue Sep 13 15:17:05 2016 +0800 xwayland: Put getting a xwl_window from a Window in a helper Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit b4644ce8d3420447a8e5a2339238968da0a59de7 Author: Jonas Ådahl Date: Tue Sep 13 15:17:04 2016 +0800 xwayland: Set unaccelerated pointer motion delta if available If there was an relative pointer motion within the same frame as an absolute pointer motion, provide both the absolute coordinate and the unaccelerated delta when setting the valuator mask. If a frame contained only a relative motion, queue an absolute motion with an unchanged position, but still pass the unaccelerated motion event. If the wl_seat advertised by the compositor is not new enough, assume each relative and absolute pointer motion arrives within their own separate frames. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit aa9634d03bc2434dfd25476529eccb14e46fcfdc Author: Jonas Ådahl Date: Tue Sep 13 15:17:03 2016 +0800 xwayland: Dispatch pointer motion events on wl_pointer.frame if possible Wait until wl_pointer.frame with dispatching the pointer motion event, if wl_pointer.frame is supported by the compositor. This will later be used to combine unaccelerated motion deltas with the absolute motion delta. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 42e8902395cb27af5c28306abd577a92c467a62d Author: Krzysztof Sobiecki Date: Tue Sep 13 22:23:49 2016 +0800 xwayland: Add a new input device used for pointer warping/locking Generating relative and absolute movement events from the same input device is problematic, because an absolute pointer device doesn't expect to see any relative motion events. To be able to generate relative pointer motion events including unaccelerated deltas, create a secondary pointer device 'xwayland-relative-pointer', and use that for emitting relative motion events. Signed-off-by: Krzysztof Sobiecki Signed-off-by: Jonas Ådahl commit 011ada724afdba8955f1d4844b306e61390eead8 Author: Jonas Ådahl Date: Tue Sep 13 15:17:01 2016 +0800 xwayland: Move pointer button initialization into helper We'll later use this for initializing buttons for the relative pointer since they need to be the same. Signed-off-by: Jonas Ådahl commit a77d0715c6272cc1778a54dccd8cb68dc28cd761 Author: Jonas Ådahl Date: Tue Sep 13 15:17:00 2016 +0800 xwayland: Split up device class init/release into functions Put device class initialization in init_[device_class](xwl_seat) and releasing in release_[device class](xwl_seat). The purpose is to make it easier to add more type of initialization here later, without making the function too large. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 9037ba736a0424feee2fb6ac20cf7687613dc452 Author: Jonas Ådahl Date: Thu Sep 29 10:40:01 2016 +0800 xwayland: Bind the relative pointer manager Will be used for getting unaccelerated motion events and later for relative motions used by a pointer warp emulator. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit 0fae3be0686cae746e03d6e4592f97278cc2275d Author: Jonas Ådahl Date: Tue Sep 13 15:16:57 2016 +0800 dix: Add valuator_mask_set_absolute_unaccelerated Add a valuator mask setter for setting absolute coordinate combined with unaccelerated motion deltas. This will later be used by Xwayland to combine a wl_pointer.motion() event with the unaccelerated delta of a wp_relative_pointer.relative_motion() event. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer commit bbd4854f81ebba1119202c5f6ff4679c62afec1f Author: Carlos Garnacho Date: Tue Sep 27 19:03:26 2016 +0200 xwayland: Apply touch abs axes transformation before posting events The way we map the touch absolute device to screen coordinates can't work across wl_output mode and geometry events. Instead, set up a fixed coordinate space, and transform touch events according to the screen coordinate space as they happen. Reviewed-by: Adam Jackson Signed-off-by: Carlos Garnacho commit ee526285882995289846648f3122c4295e3e8284 Author: Carlos Garnacho Date: Wed Sep 28 12:35:36 2016 +0200 xwayland: Apply "last pointer window" check only to the pointer device The checks in xwayland's XYToWindow handler pretty much assumes that the sprite is managed by the wl_pointer, which is not entirely right, given 1) The Virtual Core Pointer may be controlled from other interfaces, and 2) there may be other SpriteRecs than the VCP's. This makes XYToWindow calls return a sprite trace with just the root window if any of those two assumptions are broken, eg. on touch events. So turn the check upside down, first assume that the default XYToWindow proc behavior is right, and later cut down the spriteTrace if the current device happens to be the pointer and is out of focus. We work our way to the device's lastSlave here so as not to break assumption #1 above. Reviewed-by: Adam Jackson Signed-off-by: Carlos Garnacho Acked-by: Olivier Fourdan commit 2b6a068d21997ca812e665ed058e72eb4626c129 Author: Keith Packard Date: Mon Oct 3 15:37:03 2016 -0700 fb: XYPixmap format PutImage includes all planes in depth Unlike GetImage, for which the provided planemask restricts the data delivered, for PutImage in XYPixmap format, all of the planes in the drawable depth are sent and those outside the plane mask are simply ignored. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c9b8ce73927a43ed82b267d1c1985445f24827cc Author: Mark Yao Date: Fri Sep 30 16:42:35 2016 +0800 glamor: spans: fixup wrong count on glDrawArrays In commit 9e9fcf5 (glamor: Add a helper function for the common GL_QUADS fallback pattern.), the glDrawArrays count change was accidentally changed to nbox. Fixes xlogo with MESA_GL_VERSION_OVERRIDE=2.1 and MESA_GLSL_VERSION_OVERRIDE=120 Signed-off-by: Mark Yao Reviewed-by: Eric Anholt commit 2aca2dadda4cc9c378049457885d33a4eede9768 Author: Eric Anholt Date: Sat Sep 24 14:42:28 2016 -0700 glamor: Fix link failure on GLES2. Current Mesa requires that the precision qualifier on uniforms matches between stages, even if (as in this case) the uniform isn't used in one of the stages. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 20fcdfcf39497fe44d2a3200338523effb8e2bc6 Author: Eric Anholt Date: Sat Sep 24 14:30:27 2016 -0700 glamor: Remove #if 0-ed picture dumping code. I don't think anybody has run this code since it was pulled into the server. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4b5326aeba539249fcded91bf7806a708eeca651 Author: Eric Anholt Date: Sat Sep 24 14:04:14 2016 -0700 glamor: Remove many unused glamor util functions. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 117d614d1ba324bdb02c50a430c2e0d22a384f03 Author: Eric Anholt Date: Sat Sep 24 22:26:17 2016 +0300 glamor: Require GL_OES_texture_border_clamp for GLES2. The extension came out in 2000, and all Mesa-supported hardware that can do glamor supports it. We were already relying on the ARB version being present on desktop. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7a5ddf8da5ed817aa2dd6f7af1b9197a5ceec60b Author: Adam Jackson Date: Wed Sep 28 15:27:20 2016 -0400 test: Re-enable a couple of GetImage tests Fixed in 6c6f09aac. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit c7a9161da5eb80ef0444601621b52314255b0ce5 Author: Francois Tigeot Date: Fri Sep 23 11:36:49 2016 +0200 Enable XTRANS_SEND_FDS on FreeBSD, DragonFly and OpenBSD This code is based on local patches which had been sitting in FreeBSD and OpenBSD ports. Reviewed-by: Matthieu Herrb Signed-off-by: François Tigeot commit 6c6f09aac7f1d1367a042087b7681c7fdf1d1e0f Author: Keith Packard Date: Sun Sep 25 14:19:08 2016 +0300 xace: Don't censor window borders GetImage is allowed to return window border contents, so don't remove that from the returned image. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 380c2ca25ec4dd330f938e382ff4af60bc253785 Author: Hans de Goede Date: Fri Sep 23 14:11:52 2016 +0300 XF86VidMode: Fix free() on walked pointer Based on: https://patchwork.freedesktop.org/patch/85636/ Rewritten to just not walk the pointer. Signed-off-by: Hans de Goede Reviewed-by: Emi Velikov commit 220d327ee00ec1278d50d4ba8cd20612e8b77c8f Author: Hans de Goede Date: Fri Sep 23 14:06:52 2016 +0300 Xext: Fix a memory leak Based on: https://patchwork.freedesktop.org/patch/85636/ Rewritten to also free the resources allocated by panoramix_setup_ids(). Signed-off-by: Hans de Goede Reviewed-by: Emi Velikov commit 3abf791ab82cb3dc7eacd0317fe0262a71340753 Author: Michael Thayer Date: Fri Sep 16 17:51:25 2016 +0200 modesetting: only fall back to drmModeSetCursor() on -EINVAL This change effectively reverts commit 074cf58. We were falling back from drmModeSetCursor2() to drmModeSetCursor() whenever the first failed. This fall-back only makes sense on pre-mid-2013 kernels which implemented the cursor_set hook but not cursor_set2, and in this case the call to drmModeSetCursor2() will always return -EINVAL. Specifically, a return value of -ENXIO usually means that neither are supported. Signed-off-by: Michael Thayer [hdegoede@redhat.com: initialize ret to -EINVAL] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 363f4273dd4aec3e26cc57ecb6c20f27e6c813d8 Author: Daniel Martin Date: Fri Dec 11 12:05:22 2015 +0100 modesetting: Consume all available udev events at once We get multiple udev events for actions like docking a laptop into its station or plugging a monitor to the station. By consuming as much events as we can, we reduce the number of output re-evalutions. I.e. having a Lenovo X250 in a ThinkPad Ultra Dock and plugging a monitor to the station generates 5 udev events. Or having 2 monitors attached to the station and docking the laptop generates 7 events. It depends on the timing how many events can consumed at once. Signed-off-by: Daniel Martin [hdegoede@redhat.com: Keep goto out so that we always call RRGetInfo()] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit ea91db4b83312e791dcae935b8720f49a3861d72 Author: Qiang Yu Date: Thu Sep 8 21:24:58 2016 +0800 config: fix GPUDevice fail when AutoAddGPU off + BusID This fix is for the following xorg.conf can work: Section "ServerFlags" Option "AutoAddGPU" "off" EndSection Section "Device" Identifier "Amd" Driver "ati" BusID "PCI:1:0:0" EndSection Section "Device" Identifier "Intel" Driver "modesetting" BusID "pci:0:2:0" EndSection Section "Screen" Identifier "Screen0" Device "Intel" GPUDevice "Amd" EndSection Without AutoAddGPU off, modesetting DDX will also be loaded for GPUDevice. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit ca8d88e50310a0d440a127c22a0a383cc149f408 Author: Laszlo Ersek Date: Wed Sep 7 15:08:06 2016 +0200 xfree86: recognize primary BUS_PCI device in xf86IsPrimaryPlatform() The new platform bus code and the old PCI bus code overlap. Platform bus can handle any type of device, including PCI devices, whereas the PCI code can only handle PCI devices. Some drivers only support the old style PCI-probe methods, but the primary device detection code is server based, not driver based; so we might end up with a primary device which only has a PCI bus-capable driver, but was detected as primary by the platform code, or the other way around. (The above paragraph was shamelessly stolen from Hans de Goede, and customized.) The latter case applies to QEMU's virtio-gpu-pci device: it is detected as a BUS_PCI primary device, but we actually probe it first (with the modesetting driver) through xf86platformProbeDev(). The xf86IsPrimaryPlatform() function doesn't recognize the device as primary (it bails out as soon as it sees BUS_PCI); instead, we add the device as a secondary graphics card under "autoAddGPU". In turn, the success of this automatic probing-as-GPU prevents xf86CallDriverProbe() from proceeding to the PCI probing. The result is that the server exits with no primary devices detected. Commit cf66471353ac ("xfree86: use udev to provide device enumeration for kms devices (v10)") added "cross-bus" matching to xf86IsPrimaryPci(). Port that now to xf86IsPrimaryPlatform(), so that we can probe virtio-gpu-pci as a primary card in platform bus code. Cc: Adam Jackson Cc: Dave Airlie Cc: Hans de Goede Cc: Keith Packard Cc: Marcin Juszkiewicz Signed-off-by: Laszlo Ersek Tested-By: Marcin Juszkiewicz Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 44968da376c880e096225f149f78673aa4c6e5e0 Author: Kyle Guinn Date: Fri Sep 23 15:03:34 2016 +0300 xfree86: Fix null pointer dereference Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93675 Signed-off-by: Kyle Guinn [hdegoede@redhat.com: Simplify by adding 2 if conds together with &&] Signed-off-by: Hans de Goede commit 127e0569ca8dbf774df8f83d4c59bbbbf2e25a20 Author: David CARLIER Date: Fri Sep 23 14:17:12 2016 +0300 xfree86: small memory leaks fixes A couple of memory leaks fixes and avoiding bit shifting on an unitialized value. [hdegoede@redhat.com: Split out some non free fixes in separate patches] [hdegoede@redhat.com: Don't touch ancient (and weird) os/rpcauth.c code] Signed-off-by: Hans de Goede commit d51cce7992508f366758fa13dd93be24df0947ed Author: Adam Jackson Date: Tue Jul 5 13:07:09 2016 -0400 xephyr: Don't crash if the server advertises zero xv adaptors Useless as an XVideo implementation with zero adaptors might be, it's apparently a thing in the wild. Catch this case and bail out of xv init if it happens. Signed-off-by: Adam Jackson Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 445271ec00f25405fa5ed0e149dd4a9d9f6098d4 Author: Hans de Goede Date: Fri Jul 1 17:36:02 2016 +0200 glx: Always enable EXT_texture_from_pixmap for DRI swrast glx Prior to commit f95645c6f700 ("glx: Don't enable EXT_texture_from_pixmap unconditionally") DRI glx would always advertise EXT_texture_from_pixmap. That commit moved the setting of the extension in the extension bits from __glXInitExtensionEnableBits to its callers so that __glXInitExtensionEnableBits can be used more generally, but at the same time made the setting of EXT_texture_from_pixmap conditionally on __DRI_TEX_BUFFER being present. This has result in an unintended behavior change which breaks e.g. compositors running on llvmpipe. This commit makes the DRI swrast glx code advertise EXT_texture_from_pixmap unconditionally again fixing this. Fixes: f95645c6f700 ("glx: Don't enable EXT_texture_from_pixmap unconditionally") Signed-off-by: Hans de Goede --- Changes in v2: -Only add unconditional advertising of GLX_EXT_texture_from_pixmap to glxdriswrast.c, do not also add it to glxdri2.c commit 02ff0a5d7e32ce8460d6d0669f532d65ad212fcd Author: Hans de Goede Date: Sat Sep 17 11:33:13 2016 +0200 xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error Commit b4e46c0444bb ("xfree86: Hook up colormaps and RandR 1.2 gamma code") dropped the providing of a pScrn->ChangeGamma callback from the xf86RandR12 code. Leaving pScrn->ChangeGamma NULL in most cases. This triggers the BadImplementation error in xf86ChangeGamma() : if (pScrn->ChangeGamma) return (*pScrn->ChangeGamma) (pScrn, gamma); return BadImplementation; Which causes X-apps using XF86VidModeSetGamma to crash with a X protocol error. This commit fixes this by re-introducing the xf86RandR12ChangeGamma helper removed by the commit and adjusting it to work with the new combined palette / gamma code. Fixes: b4e46c0444bb ("xfree86: Hook up colormaps and RandR 1.2 gamma code") Signed-off-by: Hans de Goede Reviewed-by: Alex Deucher commit a58dd678bf952560e5422845e186d80a189953fe Author: Hans de Goede Date: Sat Sep 17 11:42:09 2016 +0200 xf86RandR12: Move calculating of shift inside init_one_component This is a preparation patch to allow easier usage of init_one_component outside of xf86RandR12CrtcInitGamma. Signed-off-by: Hans de Goede Reviewed-by: Alex Deucher commit 299cbb92670fdb83c24c3ef6327eb9d66b8be92a Author: Hans de Goede Date: Thu Sep 15 14:35:52 2016 +0200 modesetting: Fix reverse prime update lagging on secondary GPU outputs When using secondary GPU outputs the primary GPU's blockhandler will copy changes from its framebuffer to a pixmap shared with the secondary GPU. In reverse prime setups the secondary GPU's blockhandler will do another copy from the shared pixmap to its own framebuffer. Before this commit, if the primary GPU's blockhandler would run after the secondary GPU's blockhandler and no events were pending, then the secondary GPU's blockhandler would not run until some events came in (WaitForSomething() would block in the poll call), resulting in the secondary GPU output sometimes showing stale contents (e.g. a just closed window) for easily up to 10 seconds. This commit fixes this by setting the timeout passed into the blockhandler to 0 if any shared pixmaps were updated by the primary GPU, forcing an immediate re-run of all blockhandlers. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit e8695100b17b758359fc4897dbe995231ed224fc Author: Hans de Goede Date: Thu Sep 15 14:28:35 2016 +0200 modesetting: Fix reverse prime partial update issues on secondary GPU outputs When using reverse prime we do 2 copies, 1 from the primary GPU's framebuffer to a shared pixmap and 1 from the shared pixmap to the secondary GPU's framebuffer. This means that on the primary GPU side the copy MUST be finished, before we start the second copy (before the secondary GPU's driver starts processing the damage on the shared pixmap). This fixes secondary outputs sometimes showning (some) old fb contents, because of the 2 copies racing with each other, for an example of what this looks like see: https://fedorapeople.org/~jwrdegoede/IMG_20160915_130555.jpg Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit 862a3dab287b5186a958d0131d70779468348e3e Author: Olivier Fourdan Date: Thu Sep 22 09:38:50 2016 +0200 xwayland: Clear up x_cursor on UnrealizeCursor() In Xwayland's xwl_unrealize_cursor(), the x_cursor is cleared up only when a device value is provided to the UnrealizeCursor() routine, but if the device is NULL as called from FreeCursor(), the corresponding x_cursor for the xwl_seat is left untouched. This might cause a segfault when trying to access the unrealized cursor's devPrivates in xwl_seat_set_cursor(). A possible occurrence of this is the client changing the cursor, the Xserver calling FreeCursor() which does UnrealizeCursor() and then the Wayland server sending a pointer enter event, which invokes xwl_seat_set_cursor() while the seat's x_cursor has just been unrealized. To avoid this, walk through all the xwl_seats and clear up all x_cursor matching the cursor being unrealized. Signed-off-by: Olivier Fourdan Reviewed-by: Jonas Ådahl Reviewed-by: Hans de Goede commit b79eaf1184f6514ede9dcd9baaa24a40ef724a15 Author: Olivier Fourdan Date: Thu Sep 15 15:59:07 2016 +0200 xwayland: handle EAGAIN on Wayland fd wl_display_flush() can fail with EAGAIN and Xwayland would make this a fatal error. When this happens, it means that Xwayland has flooded the Wayland file descriptor, either because the Wayland compositor cannot cope or more likely because of a deadlock situation where the Wayland compositor is blocking, waiting for an X reply while Xwayland tries to write data to the Wayland file descriptor. The general consensus to avoid the deadlock is for the Wayland compositor to never issue blocking X11 roundtrips, but in practice blocking rountrips can occur in various places, including Xlib calls themselves so this is not always achievable without major surgery in the Wayland compositor/Window manager. What this patch does is to avoid dispatching to the Wayland file descriptor until it becomes available for writing again, while at the same time continue processing X11 requests to release the deadlock. This is not perfect, as there is still the possibility of another X client hammering the connection and we'll still fail writing to the Wayland connection eventually, but this improves things enough to avoid a 100% repeatable crash with vlc and gtkperf. Also, it is worth considering that window managers and Wayland compositors such as mutter already have a higher priority than other regular X clients thanks to XSyncSetPriority(), mitigating the risk. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1278159 Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=763400 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 36e1a058c5826398ceea9dba6c166ae40c75646e Author: Rui Matos Date: Fri Feb 5 14:44:29 2016 +0100 xwayland: Close the shm fd as early as possible Keeping the shm fd open beyond pixmap creation means we can easily reach the open file descriptor limit if an X client asks us to create that many pixmaps. Instead, let's get the wl_buffer immediatly so that we can destroy the shm pool and close the fd before being asked to create more. Tested-by: Olivier Fourdan Reviewed-by: Olivier Fourdan commit fd4a6dc06fcf8671d616af52025e19200c79e404 Author: Adam Jackson Date: Tue Sep 27 17:15:12 2016 -0400 glamor: Fall back to software for CopyPlane if we need to glUniform4ui is available starting in GL{,ES} 3.0. Technically it's also in EXT_gpu_shader4, but that's not worth supporting. There was also a MESA_shading_language_130 spec proposed at one point; if that ever gets finished, we can update epoxy to know about it and fix up the feature check. Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit c49e820f796c27cbd2907709576a3fb672acd453 Author: Eric Anholt Date: Sun Sep 25 13:30:22 2016 -0700 test: Run xts against Xephyr -glamor when present v2: Drop x8r8g8b8 skip, now that it's fixed. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 5392ea5525082ceeb3aad50d9168baee2abc860e Author: Eric Anholt Date: Sun Sep 25 13:30:21 2016 -0700 test: Switch our testing X server to being spawned with simple-xinit Once I introduced a second X server being tested, I found that startx hit races in choosing a display. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 283840c295c69aa3729f3f0aa2bf3ef83b1c220f Author: Eric Anholt Date: Sun Sep 25 13:30:20 2016 -0700 test: Update piglit HTML even when tests all pass I was confused by the behavior I'd written before. keithp and mattst88 responded with shock that I would have made it so surprising, as well. v2: Point to index.html instead of problems.html, which won't exist if we had no problems. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 022fea767cd29d256fb99159df89cc25d339e787 Author: Eric Anholt Date: Sun Sep 25 13:30:19 2016 -0700 test: Fix parsing of piglit results The "dmesg-fail" line was matching our "fail" regex, so if you didn't have those we would ignore fails. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 7fe5b9c02cf90b81532cb6dee3ec75c90c72c27c Author: Eric Anholt Date: Sun Sep 25 13:30:18 2016 -0700 test: Make the piglit-running script callable with an arbitrary server v2: Check that SERVER_COMMAND is set. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 7ac130a0664b43b6ba5324548c8f7ab8230f7199 Author: Eric Anholt Date: Sun Sep 25 13:30:17 2016 -0700 test: Add a little xinit-like program for starting servers for testing The normal xinit is racy because it doesn't use -displayfd. This implements the bare minimum for testing purposes, using -displayfd to sequence starting the client, and avoids adding yet another dependency to the server. v2: Fix asprintf error checks. v3: Add error checking for fork(), clarify calloc() arg. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 8d5e0c07b965d545c925c34be95d41c29135a63a Author: Eric Anholt Date: Sun Sep 25 13:30:16 2016 -0700 test: Handle srcdir != builddir in Xvfb testing Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit add49792608171feef8090f7520cfa02d2daae9c Author: Eric Anholt Date: Sun Sep 25 13:30:15 2016 -0700 ephyr: Add a mode for skipping redisplay in glamor This speeds up headless testing of Xephyr -glamor with softpipe from "a test per minute or so" to "a test every few seconds". Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 453f813bb4afd39eb5b6b3c4a822894e04b6b11b Author: Eric Anholt Date: Sat Sep 24 14:37:28 2016 +0300 glamor: Properly handle mask formats without alpha. Even if the pixmap's storage has alpha, it may have been uploaded with garbage in the alpha channel, so we need to force the shader to set alpha to 1. This was broken way back in 355334fcd99e4dce62e2be1e27290c9a74ea944f. Fixes rendercheck -t composite -f x8r8g8b8. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 905c877f094eb6cfe905d64e34fdd01a72dd8103 Author: Eric Anholt Date: Tue Sep 20 12:24:38 2016 +0100 glamor: Require that pixmap depths match for Render copies. The copy optimization in d37329cba42fa8e72fe4be8a7be18e512268b5bd replicated a bug from last time we did a copy optimization: CopyArea is only defined for matching depths. This is only a problem at 15 vs 16 depth right now (24 vs 32 would also have matching Render formats, but they should work) but be strict in case we store other depths differently in the future. Fixes rendercheck -t blend -o src -f x4r4g4b4,x3r4g4b4 v2: Drop excessive src->depth == dst->depth check that snuck in. v3: Switch back to src->depth == dst->depth v4: Touch up commit message (s/bpp/depth). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit b87a07567421af05622197eec91a71e4fca4f79e Author: Eric Anholt Date: Tue Sep 20 12:14:36 2016 +0100 glamor: Fix some awful formatting of some fallback debug code. This was clearly x-indent.sh damage. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ba199cb90157cefab01183f2e2c909895df73321 Author: Mark Kettenis Date: Tue Nov 17 22:31:21 2015 +0100 glamor: Make glamor_sync_init work with --disable-xshmfence Signed-off-by: Mark Kettenis Signed-off-by: Eric Anholt Reviewed-by: Hans de Goede commit 8bb4b11298c285d2cd1eb28e65729933ec386829 Author: Matthieu Herrb Date: Fri Sep 23 16:56:06 2016 +0300 glamor: Make glamor_name_from_pixmap work without DRI3 This function is used by the modesetting driver to implement DRI2 and shouldn't fail on systems that don't support DRI3. v2: Drop stale commit message wording, fix compiler warning (by anholt) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 128d40b2dd0a26a075a67854455d4208afaa01ca Author: Eric Engestrom Date: Sat Apr 2 19:53:18 2016 +0100 glamor: fix spelling mistakes v2: Fix "orignal" too (review feedback by ajax, change by anholt)_ Signed-off-by: Eric Engestrom Reviewed-by: Eric Anholt commit ade315386cee9a65a3885c65e96256880ac6f00a Author: Keith Packard Date: Fri Sep 23 09:52:21 2016 +0300 Require xproto 7.0.31 xproto 7.0.30 had a typo which caused compiles to fail on anything other than clang Signed-off-by: Keith Packard commit f72ff1f7ac784f3911fe2f8d746f62f7709f0edc Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 09:34:50 2016 -0700 XQuartz: Silence an expected TSan warning This code is safe. If the data race fails, the result is that we take the lock and recheck. ================== WARNING: ThreadSanitizer: data race (pid=31401) Read of size 1 at 0x00010f5d2500 by thread T11: #0 wait_for_mieq_init darwinEvents.c:102 (X11.bin+0x00010003155a) #1 -[X11Application(Private) sendX11NSEvent:] X11Application.m:1330 (X11.bin+0x00010001d652) #2 __28-[X11Application sendEvent:]_block_invoke X11Application.m:476 (X11.bin+0x00010001887f) #3 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b) #4 _dispatch_client_callout :33 (libdispatch.dylib+0x0000000020ef) Previous write of size 1 at 0x00010f5d2500 by thread T8: [failed to restore the stack] Location is global 'mieqInitialized' at 0x00010f5d2500 (X11.bin+0x000100599500) Thread T11 (tid=4367138, running) created by thread T-1 [failed to restore the stack] Thread T8 (tid=4367130, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d2d) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039b96) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd54) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5b2) #5 server_main quartzStartup.c:136 (X11.bin+0x000100039fbb) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e25) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e09) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056a4) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race darwinEvents.c:102 in wait_for_mieq_init ================== Signed-off-by: Jeremy Huddleston Sequoia commit 7d6ebf3f4e4d517bb846d15a5deb131da19a267c Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 00:21:44 2016 -0700 XQuartz: Adopt input_lock() and input_unlock() This allows us to remove darwinEvents_lock() and darwinEvents_unlock() and remove the serverRunning hack from dix Signed-off-by: Jeremy Huddleston Sequoia commit 8bc4727f475321a8adcbbd859f3f8dd9eeb64aa4 Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 23:17:19 2016 -0700 XQuartz: pbproxy shouldn't need to wait for server initialization. Just block on the socket like every other client does. Signed-off-by: Jeremy Huddleston Sequoia commit 81493d30981d7deb38f57bca2a35487add5ea509 Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 23:13:20 2016 -0700 XQuartz: Remove X11ApplicationFatalError AppKit handles crashes on app launch with their own dialog now, so we shouldn't need to do this ourselves. Signed-off-by: Jeremy Huddleston Sequoia commit 9153ec8464336c280f2a6e79ffa443104bbeb98c Author: Jeremy Huddleston Sequoia Date: Sun Sep 18 22:45:16 2016 -0700 XQuartz: Don't respond to SIGALRM on the AppKit thread ================== WARNING: ThreadSanitizer: data race (pid=69627) Write of size 8 at 0x00010dae73f8 by main thread (mutexes: write M262): #0 SmartScheduleTimer utils.c:1245 (X11.bin+0x0001004b21f9) #1 __tsan::CallUserSignalHandler(__tsan::ThreadState*, bool, bool, bool, int, my_siginfo_t*, void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000279f6) #2 __CFRunLoopRun :77 (CoreFoundation+0x000000087e17) #3 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #4 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #5 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #6 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #7 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #8 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #9 start :29 (libdyld.dylib+0x000000005254) Previous read of size 8 at 0x00010dae73f8 by thread T7: [failed to restore the stack] Location is global 'SmartScheduleTime' at 0x00010dae73f8 (X11.bin+0x0001005b03f8) Mutex M262 (0x7d300000bd10) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 __CFRunLoopCreate :77 (CoreFoundation+0x000000054e63) #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #8 start :29 (libdyld.dylib+0x000000005254) Thread T7 (tid=4051693, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x0001000398dd) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039813) #3 X11ApplicationMain X11Application.m:1286 (X11.bin+0x00010001c804) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #5 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race utils.c:1245 in SmartScheduleTimer ================== ================== WARNING: ThreadSanitizer: signal handler spoils errno (pid=69627) #0 SmartScheduleTimer utils.c:1244 (X11.bin+0x0001004b21a0) #1 __CFRunLoopRun :77 (CoreFoundation+0x000000087e17) #2 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a062) #3 server_main quartzStartup.c:127 (X11.bin+0x000100039b6b) #4 do_start_x11_server bundle-main.c:436 (X11.bin+0x0001000022c5) #5 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x0001000042a9) #6 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100004b44) #7 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #8 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: signal handler spoils errno utils.c:1244 in SmartScheduleTimer ================== Signed-off-by: Jeremy Huddleston Sequoia commit 2740dc1937e8ab32b4930f4086c302e6602a7bad Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 01:25:13 2016 -0700 dix: Silence TSan warnings when checking for pending input V2: Moves InputCheckPending() into dix.h Bumps required version of xproto to 7.0.30 ================== WARNING: ThreadSanitizer: data race (pid=4943) Read of size 4 at 0x00010c4e3854 by thread T8: #0 WaitForSomething WaitFor.c:237 (X11.bin+0x00010049216c) #1 Dispatch dispatch.c:413 (X11.bin+0x000100352ed9) #2 dix_main main.c:287 (X11.bin+0x00010036e894) #3 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Previous write of size 4 at 0x00010c4e3854 by thread T12 (mutexes: write M856, write M1976): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448d14) #1 DarwinSendDDXEvent darwinEvents.c:641 (X11.bin+0x000100033613) #2 DarwinProcessFDAdditionQueue_thread darwinEvents.c:338 (X11.bin+0x000100032039) Location is global 'miEventQueue' at 0x00010c4e3850 (X11.bin+0x0001005ab854) Mutex M856 (0x00010c4c8c80) created at: #0 pthread_mutex_lock :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000321fe) #1 DarwinListenOnOpenFD darwinEvents.c:300 (X11.bin+0x000100031607) #2 socket_handoff bundle-main.c:288 (X11.bin+0x000100002b40) #3 __do_request_fd_handoff_socket_block_invoke bundle-main.c:379 (X11.bin+0x0001000029ba) #4 __tsan::invoke_and_release_block(void*) :144 (libclang_rt.tsan_osx_dynamic.dylib+0x00000005d97b) #5 _dispatch_client_callout :33 (libdispatch.dylib+0x0000000020ef) Mutex M1976 (0x00010c4e3d68) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:343 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d7f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069f1a) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467095) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440399) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x0001000303bb) #8 AddScreen dispatch.c:3908 (X11.bin+0x00010036c417) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fdeb) #10 dix_main main.c:197 (X11.bin+0x00010036e228) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) Thread T8 (tid=4198779, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039dad) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039c16) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cde4) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a642) #5 server_main quartzStartup.c:136 (X11.bin+0x00010003a03b) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002eb5) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e99) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x000100005734) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) Thread T12 (tid=4198797, running) created by thread T8 at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread darwinEvents.c:121 (X11.bin+0x000100031ecf) #2 DarwinEQInit darwinEvents.c:365 (X11.bin+0x000100031860) #3 InitInput darwin.c:571 (X11.bin+0x00010002ea09) #4 dix_main main.c:261 (X11.bin+0x00010036e7ce) #5 server_thread quartzStartup.c:66 (X11.bin+0x000100039e63) SUMMARY: ThreadSanitizer: data race WaitFor.c:237 in WaitForSomething ================== ================== WARNING: ThreadSanitizer: data race (pid=22841) Write of size 4 at 0x000105bbd864 by main thread (mutexes: write M1945): #0 mieqEnqueue mieq.c:263 (X11.bin+0x000100448cf4) #1 DarwinSendDDXEvent darwinEvents.c:642 (X11.bin+0x000100033693) #2 -[X11Controller set_window_menu:] X11Controller.m:275 (X11.bin+0x0001000222fd) #3 -[X11Application set_window_menu:] X11Application.m:486 (X11.bin+0x000100018b44) #4 -[X11Application handleMachMessage:] X11Application.m:177 (X11.bin+0x000100016678) #5 __NSFireMachPort :69 (Foundation+0x00000009b62b) #6 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #7 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #8 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65) #9 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49) #10 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4) #11 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #12 start :29 (libdyld.dylib+0x000000005254) Previous read of size 4 at 0x000105bbd864 by thread T7: #0 Dispatch dispatch.c:434 (X11.bin+0x000100352fc8) #1 dix_main main.c:287 (X11.bin+0x00010036e874) #2 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Location is global 'miEventQueue' at 0x000105bbd860 (X11.bin+0x0001005ab864) Mutex M1945 (0x000105bbdd78) created at: #0 pthread_mutex_init :144 (libclang_rt.tsan_osx_dynamic.dylib+0x0000000253c3) #1 input_lock inputthread.c:103 (X11.bin+0x00010049fd10) #2 TimerSet WaitFor.c:348 (X11.bin+0x0001004926c2) #3 RootlessQueueRedisplay rootlessScreen.c:594 (X11.bin+0x000100065d3f) #4 RootlessInstallColormap rootlessScreen.c:514 (X11.bin+0x000100069eda) #5 miSpriteInstallColormap misprite.c:562 (X11.bin+0x000100467075) #6 miCreateDefColormap micmap.c:270 (X11.bin+0x000100440379) #7 DarwinScreenInit darwin.c:285 (X11.bin+0x00010003036b) #8 AddScreen dispatch.c:3914 (X11.bin+0x00010036c3f7) #9 InitOutput darwin.c:671 (X11.bin+0x00010002fd9b) #10 dix_main main.c:197 (X11.bin+0x00010036e208) #11 server_thread quartzStartup.c:66 (X11.bin+0x000100039e23) Thread T7 (tid=4257217, running) created by main thread at: #0 pthread_create :144 (libclang_rt.tsan_osx_dynamic.dylib+0x000000024490) #1 create_thread quartzStartup.c:78 (X11.bin+0x000100039d6d) #2 QuartzInitServer quartzStartup.c:95 (X11.bin+0x000100039bd6) #3 X11ApplicationMain X11Application.m:1238 (X11.bin+0x00010001cd94) #4 X11ControllerMain X11Controller.m:984 (X11.bin+0x00010002a5f2) #5 server_main quartzStartup.c:136 (X11.bin+0x000100039ffb) #6 do_start_x11_server bundle-main.c:436 (X11.bin+0x000100002e65) #7 _Xstart_x11_server mach_startupServer.c:189 (X11.bin+0x000100004e49) #8 mach_startup_server mach_startupServer.c:399 (X11.bin+0x0001000056e4) #9 mach_msg_server mach_msg.c:563 (libsystem_kernel.dylib+0x000000012186) #10 start :29 (libdyld.dylib+0x000000005254) SUMMARY: ThreadSanitizer: data race mieq.c:263 in mieqEnqueue ================== Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard commit 7ff8a74945c0cb525a2d197e28426fd098a407cf Author: Keith Packard Date: Thu Sep 22 02:53:46 2016 +0300 os: Clear saved poll events in listen so that edge triggering works When a client is marked as write blocked, clear any old 'write ready' bit in the osfds structure so that a new indication of write ready (which is marked as edge trigggered) will trigger the callback. Signed-off-by: Keith Packard Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Tested-by: Matthieu Herrb commit 1d365f1ffe0362732b64e565db6ae8af718758f2 Author: Keith Packard Date: Thu Sep 22 02:53:45 2016 +0300 os: Ready clients with pending output aren't flushed, so set NewOutputPending When a client with pending output is ready (has request data pending), FlushAllOutput will skip it to get all of the requests processed before sending any queued output. That means FlushAllOutput is going to return with some output pending to a client which isn't known to be write blocked. And that means NewOutputPending needs to be set so that FlushAllOutput will get called again to actually go flush this client. It might be interesting to try just flushing the client to send any queued data along the way. This patch just restores the server behavior to what it was before the ospoll changes. Signed-off-by: Keith Packard Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Tested-by: Matthieu Herrb commit d0c5d205a919fc1d2eb599356090b58b1bf0176d Author: Jeremy Huddleston Sequoia Date: Mon Sep 19 01:13:02 2016 -0700 dix: Make InitCoreDevices() failures more verbose. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5794bdd52821463acf691c4230741f6b4289669b Author: Mihail Konev Date: Wed Sep 14 11:47:15 2016 +0100 xkb: fix turbo-repeat of RedirectKey-ed keysyms RedirectKey() action had been broken by commit 2e6190. A dropped check caused over-intense autorepeat of keysyms enriched with the action. Previous to this commit, the check wrapped the entire switch() block, which was dropped with the move to a separate function. Restore the checking. Signed-off-by: Mihail Konev Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit fc1c358b955258ce675e49490de7c3b8ddee2b76 Author: Keith Packard Date: Mon Sep 19 09:02:57 2016 -0700 Bump to 1.18.99.901 (1.19 RC1) Signed-off-by: Keith Packard commit 5998da7855750dd947288349a0b14e65db1e3c8c Author: Jonas Ådahl Date: Tue Sep 13 15:16:56 2016 +0800 dix: Incroduce CursorConfinedTo vfunc in Screen This function will be called when a pointer is grabbed non-root window set as the 'confineTo'. This will enable the ddx to handle the confinement their own way. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit daf48a3aba7d5c42d7156f0d0e2b1d8aae423303 Author: Jonas Ådahl Date: Tue Sep 13 15:16:55 2016 +0800 dix: Introduce CursorWarpedTo vfunc in Screen This new vfunc will be called, if set, after a client has issued a WarpPointer request. This is necessary for implementing pointer warp emulation in Xwayland. Signed-off-by: Jonas Ådahl Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 3ef51c5c74297937002668b0c507fa88550db67e Author: Keith Packard Date: Fri Sep 16 10:03:49 2016 -0700 Bump version to 1.18.99.2 Prepare for 1.19 RC1 Signed-off-by: Keith Packard commit 86038dfd42d6f6da9646ef2f87b2ab8ccba98e02 Author: Keith Packard Date: Fri Sep 16 10:56:15 2016 -0700 os: Add 'ospoll.h' to Makefile.am Distribute this source file. Signed-off-by: Keith Packard commit 56972d007dcde93693cb9e39931978b744942e5b Author: Keith Packard Date: Fri Sep 16 10:55:27 2016 -0700 include: Add 'xserver_poll.h' to Makefile.am Make sure this file is included in the tarball. Signed-off-by: Keith Packard commit 61b159f5a79130a9661064d3f0143e5d6107985a Author: Keith Packard Date: Fri Sep 16 10:54:37 2016 -0700 hw/xwin: Add 'dri' to DIST_SUBDIRS This creates the needed Makefile.in files during 'make dist' or 'make distcheck' Signed-off-by: Keith Packard commit 93f474e49b24abc673cb9cf5ea16fac296dce312 Author: Keith Packard Date: Fri Sep 16 10:43:09 2016 -0700 Remove 'dixfontstubs.h' from include EXTRA_DIST This file was removed when moving to the new libXfont API, but accidentally left in EXTRA_DIST. Signed-off-by: Keith Packard commit 5b9f3ea2501a886fb74e5248e82a95e76443f1e8 Author: Michel Dänzer Date: Thu Jan 14 18:09:44 2016 +0900 xfree86/modes: Set RandR primary output from CreateScreenResources Fixes XRRGetOutputPrimary and xrandr not reporting a primary output after startup. This was especially confusing when an output was explicitly marked as primary using Option "Primary" in Section "Monitor". Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit bd8ecd9be1568b59258b6d2f78530ede345b7c7a Author: Michel Dänzer Date: Fri Sep 16 09:51:31 2016 -0700 Add SyncSharedPixmap ScreenRec hook Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 7f6fa4e449f5a7215bbf60ce8c874e163a7453a9 Author: Qiang Yu Date: Mon Sep 5 18:05:42 2016 +0800 modesetting: fix compile error when --disable-glamor Move ms_flush_drm_events out of GLAMOR ifdef. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97586 Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit d81f9ce12aa4ac54b9c2b8c74c2f827c1f3e739a Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 03:07:44 2016 -0700 dix/dispatch: Fix SmartScheduleClient interval adjustment to use best rather than pClient pClient does not contain a live value after the transition to lists https://bugs.freedesktop.org/show_bug.cgi?id=97765 Application Specific Information: X.Org X Server 1.18.99.1 Build Date: 20160910 ================================================================= ==16921==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000108ce3834 at pc 0x000108880766 bp 0x7000045f76c0 sp 0x7000045f76b8 READ of size 4 at 0x000108ce3834 thread T6 #0 0x108880765 in SmartScheduleClient dispatch.c:365 #1 0x10887ecc5 in Dispatch dispatch.c:422 #2 0x1088c05f1 in dix_main main.c:301 #3 0x1082aabba in server_thread quartzStartup.c:66 #4 0x7fffc5f16aaa in _pthread_body (libsystem_pthread.dylib+0x3aaa) #5 0x7fffc5f169f6 in _pthread_start (libsystem_pthread.dylib+0x39f6) #6 0x7fffc5f161fc in thread_start (libsystem_pthread.dylib+0x31fc) Regressed-in: 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 265c4e66533243b60d92cffc7769ecadb0292c8d Merge: 3caf671ed f5f4d32ac Author: Keith Packard Date: Thu Sep 15 21:32:46 2016 -0700 Merge remote-tracking branch 'jturney/master' commit 3caf671ed2a8a79856409a109355fc0f393d7aed Author: Keith Packard Date: Wed Sep 14 22:40:32 2016 -0700 config/dbus: Initialize dbus fd to -1 so teardown doesn't use fd 0 The dbus teardown code is called when the server fatal errors even if that is before dbus has ever been initialized. By statically initializing the value of bus_info.fd, we avoid calling RemoveNotifyFd on stdin. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Peter Hutterer commit f5f4d32ac7c250cfbfb94883ce7d7e46151e89f0 Author: Jon Turney Date: Thu Jul 24 12:29:41 2014 +0100 Add Windows-DRI extension If windowsdriproto headers are available, build a Windows-DRI extension, which supports requests to enable local clients to directly render GL to a Windows drawable: - a query to check if WGL is being used on a screen - a query to map a fbconfigID to a native pixelformatindex - a query to map a drawable to a native handle Windows-DRI can only be useful if we are using WGL, so make an note if WGL is active on a screen. Make validGlxDrawable() public Adjust glxWinSetPixelFormat() so it doesn't require a context, just a screen and config. That enables factoring out the deferred drawable creation code as glxWinDeferredCreateDrawable() Enhance glxWinDeferredCreateDrawable(), so that pixmaps are placed into a file mapping, so they exist in memory which can be shared with the direct rendering process. Currently, this file mapping is accessed by a name generated from the XID. This will not be unique across multiple server instances. It would perhaps be better, although more complicated, to use an anonymous file mapping, and then duplicate the handle for the direct rendering process. Use glxWinDeferredCreateDrawable() to ensure the native handle exists for the Windows-DRI query to map a drawable to native handle. v2: Various printf format warning fixes v3: Fix format warnings on x86 Move some uninteresting windows-dri output to debug log level v4: check for windowsdriproto when --enable-windowsdri use windowsdriproto_CFLAGS Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 52d6a1e832a5e62289dd4f32824ae16a78dfd7e8 Author: Keith Packard Date: Thu Sep 8 11:02:30 2016 -0600 Hold input lock for deviceProc This ensures that the deviceProc is never called while the input thread is processing data from the device. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dfc91f0f630f9e0500fc28b18e3f2851024d719f Author: Keith Packard Date: Thu Sep 8 11:02:31 2016 -0600 Hold input lock while calling input device SetProperty callback This keeps the input driver SetProperty function from being called while input events are being processed. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c4799f186b31e579721f5874c897f3f46db6ad0a Author: Alan Coopersmith Date: Sat Sep 10 21:14:19 2016 -0700 os: Use pthread_setname_np to set thread names if available Autoconf logic borrowed from glib Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia commit 75c1d04650f63464263c159d2e95364482be724f Author: Alan Coopersmith Date: Sat Sep 10 21:08:01 2016 -0700 os: OsSigHandler should not show rtld errors for unrelated signals If RTLD_DI_SETSIGNAL is set to let us turn runtime linker/loader errors into catchable signals, then we should only show the errors when catching that signal, instead of tossing out red herrings to distract people with unrelated crashes long after their last failed symbol lookup (especially when using drivers built to support multiple API's by checking which symbols are available before calling them). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Reviewed-by: Aaron Plattner commit 065eb6612492bacf4d7caaad90e35dafc2cbf7ea Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 19:56:52 2016 -0700 os/inputthread: Fix setting of cloexec on file descriptors O_CLOEXEC is not a file bit. It is not setable with F_SETFL. One must use it when calling open(2). To set it cloexec on an existing fd, F_SETFD and FD_CLOEXEC must be used. This also fixes a build failure regression on configurations that don't have O_CLOEXEC defined. cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html Regressed-in: 30ac7567980a1eb79d084a63e0e74e1d9a3af673 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau commit a5769de0f5399053e9864b753fa9755220d65ae0 Author: Jeremy Huddleston Sequoia Date: Sun Sep 11 19:47:47 2016 -0700 Xext/shm: Fix usage of F_GETFD to match standard flags = fcntl(fd, F_GETFD) is compliant. fcntl(fd, F_GETFD, &flags) is non-compliant (Linux extension?) cf: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Julien Cristau commit 7def2fea30060d47780dc1eedc91fada5ae1934f Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 23:37:46 2016 -0700 Xquartz: Update for removal of AddEnabledDevice and RemoveEnabledDevice Regressed-in: be5a513fee6cbf29ef7570e57eb0436d70fbd88c Signed-off-by: Jeremy Huddleston Sequoia commit 4f4ecd0f41cf1c710d3ef1626b747847e6184f4c Author: Jeremy Huddleston Sequoia Date: Sat Sep 10 22:16:11 2016 -0700 XQuartz: Cleanup CPPFLAGS that are no longer necessary on darwin Signed-off-by: Jeremy Huddleston Sequoia commit 33d595255d4206df0d136014de33100817cbe344 Author: Jeremy Huddleston Sequoia Date: Sun May 29 14:01:38 2016 -0700 XQuartz: Fix the issue where the h key could be come "stuck" after hiding XQuartz with cmd-h The issue was that we set a flag to ignore the k key's up event when sent the cmd-h down event, but because the cmd-h keycode hides XQuartz, we became !_x_active by the time the event is delivered which caused us to go down a differnet codepath rather than getting a chance to ignore it. We then incorrectly ignored the next h up key. https://bugs.freedesktop.org/show_bug.cgi?id=92648 Signed-off-by: Jeremy Huddleston Sequoia commit d8e05c04758cbcd7b5c11362cb28ce017d50098b Author: Hans de Goede Date: Wed Aug 24 15:00:13 2016 +0200 modesetting: Fall back to primary crtc for vblank for drawables on slave outputs This fixes glxgears running at 1 fps when fully covering a slave-output and the modesetting driver is used for the master gpu. Reported-by: Peter Wu Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 7ade8ba10e1e767bb510343c86573bc5d4804b92 Author: Hans de Goede Date: Wed Aug 24 14:55:27 2016 +0200 modesetting: ms_covering_crtc: Allow calling on non modesetting Screens 99% of the code in ms_covering_crtc is video-driver agnostic. Add a screen_is_ms parameter when when FALSE skips the one ms specific check, this will allow calling ms_covering_crtc on slave GPUs. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 238248d67e6a422f31e8864c0b15d693a658cdac Author: Hans de Goede Date: Mon Aug 15 12:02:54 2016 +0200 modesetting: Implement DRI2InfoRec version 9 callbacks Implement the CreateBuffer2 / DestroyBuffer2 / CopyRegion2 DRI2InfoRec version 9 callbacks, this is necessary for being an offload source provider with DRI2. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 03a7c50202f61030830ff639fccf52091e02156c Author: Hans de Goede Date: Mon Aug 15 10:44:57 2016 +0200 modesetting: ms_dri2_create_buffer: check screen of existing front buffers If a frontbuffer drawable already has a pixmap, make sure it was created on the right screen. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 35c4e96ed1d372dd161480be8cddcd2d4549e449 Author: Hans de Goede Date: Mon Sep 12 12:47:59 2016 +0200 randr: Fix crtc_bounds when using rotation combined with reflection Before this commit crtc_bounds() did not take reflection into account, when using reflection with 0 / 180 degree rotation this was not an issue because of the default in the switch-case doing the right thing. But when using 90 / 270 degree rotation we would also end up in the default which is wrong in this case. This would lead to the cursor being constrained to a height x height area of the monitor. This commit masks out the reflection bits for the switch-case, making crtc_bounds return the correct bounds and fixing the problematic cursor constraining. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 7b634067c13045671685a9f00bfbac626ed68f94 Author: Dave Airlie Date: Wed Jul 15 10:15:51 2015 +1000 xf86Cursor: Add hw cursor support for prime Currently with PRIME if we detect a secondary GPU, we switch to using SW cursors, this isn't optimal, esp for the intel/nvidia combinations, we have no choice for the USB offload devices. This patch checks on each slave screen if hw cursors are enabled, and also calls set cursor and move cursor on all screens. Cc: Aaron Plattner Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit df88008f92f85ef96d9fe48ac509d027570424eb Author: Hans de Goede Date: Tue Sep 6 11:48:31 2016 +0200 xf86Cursor: Deal with rotation on GPU screens using a hw-cursor When a slave-output is rotated the transformation is done on the blit from master to slave GPU, so crtc->transform_in_use is not set, but we still need to adjust the mouse position for things to work. This commit modifies xf86_crtc_transform_cursor_position to not rely on crtc->f_framebuffer_to_crtc, so that it can be used with GPU screens too and always calls it for crtcs with any form of rotation. Note not using crtc->f_framebuffer_to_crtc means that crtc->transform will not be taken into account, that is ok, because when we've a transform active hw-cursors are not used and xf86_crtc_transform_cursor_position will never get called. Signed-off-by: Hans de Goede Reviewed-and-Tested-by: Michel Dänzer commit f82fd47016628e8bcdcba3aab506a919fe8c49d8 Author: Hans de Goede Date: Tue Sep 6 11:50:50 2016 +0200 xf86Cursor: Fix xf86_crtc_rotate_coord using width/height wrongly xf86_crtc_rotate_coord should be the exact inverse operation of xf86_crtc_rotate_coord_back, but when calculating x / y for 90 / 270 degrees rotation it was using height to calculate x / width to calculate y, instead of the otherway around. This was likely not noticed before since xf86_crtc_rotate_coord until now was only used with cursor_info->MaxWidth and cursor_info->MaxHeight, which are usally the same. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit b0b04cb266a62675dd7cde97111ebe7c1552db9a Author: Hans de Goede Date: Tue Sep 6 13:14:35 2016 +0200 xf86Cursor: Fix xf86CurrentCursor to work on slave GPU Screens The CurrentCursor is always attached to the master GPU. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 71fecc84e9ceb11ff61c912bdaa3fc959ec36bef Author: Dave Airlie Date: Tue Sep 6 13:02:32 2016 +0200 xf86Cursor: Add xf86CheckHWCursor() helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit 2eefb53f58854ef9d34859583207ec37d3c3047a Author: Hans de Goede Date: Tue Sep 6 13:15:36 2016 +0200 randr: Add RRHasScanoutPixmap helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Hans de Goede Reviewed-by: Michel Dänzer commit a52530a655438f03919d47f6edd11287efff47bb Author: Dave Airlie Date: Tue Sep 6 12:50:14 2016 +0200 dix: Add dixPrivatesCreated helper function This is a preparation patch for adding prime hw-cursor support. Signed-off-by: Dave Airlie Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer commit 3fe4107643ba029dd48e3d12ec9bc97d07112300 Author: Hans de Goede Date: Thu Sep 8 09:30:31 2016 +0200 glamor: Fix crash when master gpu is using glamor and another gpu is hotplugged When a GPU gets hotplugged while X is already running, glamor_egl_init() gets called and changes the current egl context, without updating lastGLContext, potentially causing the next glamor call on another GPU to run in the wrong context. This causes glamor to e.g. crash in the next glamor_create_pixmap() call (called through the master's screen->CreatePixmap), note this is not the only troublesome entry point I've seen other backtraces when using a compositing window manager. Set lastGLContext to NULL to force the next glamor_make_current() call to set the right context. Note that we cannot use glamor_make_current() here to replace the eglMakeCurrent() call and update lastGLContext for us because glamor_make_current takes a glamor_priv struct as argument and that has not been created yet when glamor_egl_init() gets called. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit 1075af8a6c26009c04db30a6d6d1f10070568ab1 Author: Hans de Goede Date: Mon Aug 15 11:10:15 2016 +0200 modesetting: Remove some dead code The "if (pixmap) ..." block this commit removes is inside an "if (pixmap == NULL) ..." block, so it will never execute. Signed-off-by: Hans de Goede Reviewed-by: Aaron Plattner commit dfa295b29c20b174f80ab823eef41e5211a6a921 Author: Hans de Goede Date: Wed Aug 24 14:13:19 2016 +0200 modesetting: ms_covering_crtc: Remove unused arguments, make static Remove unused arguments from ms_covering_crtc, make it static as it is only used in vblank.c. While at it also change its first argument from a ScrnInfoPtr to a ScreenPtr, this makes the next patch in this patch-set cleaner. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit cb7b145a25452de8b549e8c8e9ec3bcc752e55dc Author: Hans de Goede Date: Wed Aug 17 12:03:41 2016 +0200 modesetting: Fix msSharePixmapBacking returning a non-linear bo glamor_fd_from_pixmap() may return a tiled bo, which is not suitable for sharing with another GPU as tiling usually is GPU specific. Switch to glamor_shareable_fd_from_pixmap(), which always returns a linear bo. This fixes mis-rendering when running the mode setting driver on the master gpu in a dual-gpu setup and running an opengl app with DRI_PRIME=1. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit a74d553cb97d545148bd2f81b7bd021cca94e076 Author: Hans de Goede Date: Tue Aug 23 12:18:56 2016 +0200 glamor: Add glamor_shareable_fd_from_pixmap() Add glamor_shareable_fd_from_pixmap function to get dma-buf fds suitable for sharing across GPUs (not using GPU specific tiling). This is necessary for the modesetting driver to correctly implement the DRI2 SharePixmapBacking callback. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit 527c6baa294d17c5eca1d87ac941844872e90dac Author: Ran Benita Date: Wed Aug 29 12:33:34 2012 +0300 xkb: fix check for appending '|' character when applying rules There are two ways to separate multiple files in XKB include statements: '+' will cause the later file to override the first in case of conflict, while '|' will cause it augment it (this is done by xkbcomp). '!' is unrelated here. Currently, if someone tries to use '|' in a rule instead of '+', it won't have any effect. Since '|' is practically never used, this wasn't noticed. Signed-off-by: Ran Benita Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 392da389d7b0e9dd970741dcd5321a4e0fd3aef5 Author: Adam Jackson Date: Wed Mar 30 14:04:04 2016 -0400 glx: Fix computation of GLX_X_RENDERABLE fbconfig attribute >From the GLX spec: "GLX_X_RENDERABLE is a boolean indicating whether X can be used to render into a drawable created with the GLXFBConfig. This attribute is True if the GLXFBConfig supports GLX windows and/or pixmaps." Every backend was setting this to true unconditionally, and then the core ignored that value and sent true unconditionally on its own. This is broken for ARB_fbconfig_float and EXT_fbconfig_packed_float, which only apply to pbuffers, which are not renderable from non-GLX APIs. Instead compute GLX_X_RENDERABLE from the supported drawable types. The dri backends were getting _that_ wrong too, so fix that as well. This is not a functional change, as there are no mesa drivers that claim to support __DRI_ATTRIB_{UNSIGNED_,}FLOAT_BIT yet. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 589f42e9830e66a7e26475fc9a8b91034b5aad86 Author: Rui Matos Date: Sun Jun 26 19:48:23 2016 +0200 xwayland: Process queued events before making wayland mods effective Since xwayland's initial commit we have had a check to not process wayland modifier events while one of our surfaces has keyboard focus since the normal xkb event processing keeps our internal modifier state up to date and if we use the modifiers we get from the compositor we mess up that state. This was slightly changed in commit 10e9116b3f709bec6d6a50446c1341441a0564e4 to allow the xkb group to be set from the wayland event while we have focus in case the compositor triggers a group switch. There's a better solution to the original problem though. Processing queued events before overriding the xkb state with the compositor's allows those events to be sent properly modified to X clients while any further events will be modified with the wayland modifiers as intended. This allows us to fully take in the wayland modifiers, including depressed ones, which fixes an issue where we wouldn't be aware of already pressed modifiers on enter. Signed-off-by: Rui Matos Tested-by: Olivier Fourdan Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit deae9c7e846e244e5d62b2dcfb6663fde0e12cbb Author: Eric Anholt Date: Wed Aug 31 17:00:00 2016 -0700 test: Run some XTS5 integration tests against Xvfb if possible. By default the tests will be skipped. However, if you set XTEST_DIR to the repo of a built X Test Suite and PIGLIT_DIR to a piglit repo (no build necessary), make check will run piglit's xts-render tests against Xvfb. We could run more of XTS5, but I haven't spent the time identifying what additional subset would be worth running, since much of it is only really testing the client libraries. We want to make sure that we keep the runtime down, and this subset of the test suite took 92 seconds according to piglit. Reviewed-by: Adam Jackson commit f06aef31c0b2ab62d915a469a399d82a1a73ac28 Author: Qiang Yu Date: Mon Aug 22 18:14:18 2016 +0800 modesetting: add DRI2 page flip support Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 4a839da6274b76424ee7cbc2deba2693e97e8186 Author: Qiang Yu Date: Mon Aug 22 18:14:17 2016 +0800 modesetting: move common page flip handle to pageflip.c The common page flip handle framework can be shared with DRI2 page flip. Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 4f1eb7864b61d0c992c5eff3339085e887792048 Author: Qiang Yu Date: Mon Aug 22 18:14:16 2016 +0800 modesetting: move ms_do_pageflip to pageflip.c Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit a586bf9ccf60b2cc66953555e82eeb6a8e0b4ca9 Author: Qiang Yu Date: Mon Aug 22 18:14:15 2016 +0800 modesetting: make ms_do_pageflip generic for share with DRI2 Signed-off-by: Qiang Yu Reviewed-by: Michel Dänzer commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd Author: Adam Jackson Date: Tue Jun 28 15:54:44 2016 -0400 dri2: Don't make reference to noClientException noClientException is now never filled in with a meaningful value, it's always -1. The sole caller of this function disregards the error value in any case. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit dff435568b40286df2bf7a66e870f9ae5f4eb9bd Author: Adam Jackson Date: Tue Jun 28 15:54:43 2016 -0400 dri3: Don't do return client->noClientException Hasn't been necessary since: commit 92ed75ac59e2d3af149cddb962efd05fc8487750 Author: Jamey Sharp Date: Mon May 10 20:22:05 2010 -0700 Eliminate boilerplate around client->noClientException. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 65493c0b73f6ee65b2a8fcaa4a15b0c453ff72b1 Author: Adam Jackson Date: Tue Jun 28 15:54:42 2016 -0400 sync: Don't do return client->noClientException Hasn't been necessary since: commit 92ed75ac59e2d3af149cddb962efd05fc8487750 Author: Jamey Sharp Date: Mon May 10 20:22:05 2010 -0700 Eliminate boilerplate around client->noClientException. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit bc3eed379ee5b4176db848708799fb2d5db16531 Author: Hans De Goede Date: Wed Aug 31 15:37:20 2016 +0200 modesetting: Hide cursor when initializing crtc When Xorg gets started directly from a wayland-gdm the crtc still has the wayland hw cursor set. Combine this with Xorg immediately falling back to a sw cursor because a slave-output has a monitor attached at startup; and we end up with the wayland hardware cursor overlay fixed in its last position + the Xorg sw cursor resulting in 2 cursors. This commit fixes this by hiding any left-over cursors when initializing the crtc. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 6c984ac9a737304ab5e26de90c76a79d970b6e33 Author: Hans De Goede Date: Wed Aug 31 16:11:11 2016 +0200 modesetting: Do not use function local static variables The modesetting driver may be driving 2 screens (slave and master gpu), which may have different behavior wrt hardware cursor support. So stop using static variables and instead store the hw-cursor support related data in a per screen struct. While at it actually make it per crtc data as in theory different crtc's could have different hw-cursor support. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard commit d8c288ec371a853bcd023217f34893a0efae65ea Author: Michael Thayer Date: Wed Aug 24 08:48:13 2016 +1000 xi2: fix FocusIn grabs Fix a couple of copy-and-paste errors preventing FocusIn grabs from working. Perhaps the extension version should be bumped though to distinguish between working and non-working extension versions. Signed-off-by: Michael Thayer Reviewed-by: Peter Hutterer commit 25e4f9ee68b99c2810efdb6cd8c56affa45e1fea Author: Peter Hutterer Date: Tue Aug 23 13:43:42 2016 +1000 xfree86: print the module name together with the load failure message We're happily printing the error to stdout but not which module caused it... That's in the Xorg.log but that's at least one click away. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit be334f42a198a25e817e6dab43dd0e30aa1cd4f8 Author: Michel Dänzer Date: Thu Aug 18 09:40:34 2016 +0900 glamor: Declare "pos" in the composite glyph GLSL 1.20 vertex shader Fixes shader compile failure: Failed to compile VS: 0:13(43): error: `pos' undeclared 0:13(14): error: operands to arithmetic operators must be numeric 0:13(13): error: operands to arithmetic operators must be numeric Program source: #define ATLAS_DIM_INV 0.000976562500000000 attribute vec2 primitive; attribute vec2 source; varying vec2 glyph_pos; uniform vec2 fill_offset; uniform vec2 fill_size_inv; varying vec2 fill_pos; uniform vec4 v_matrix; void main() { gl_Position.xy = primitive.xy * v_matrix.xz + v_matrix.yw; gl_Position.zw = vec2(0.0,1.0); glyph_pos = source.xy * ATLAS_DIM_INV; fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv; } (EE) Fatal server error: (EE) GLSL compile failure Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97300 Reviewed-by: Keith Packard commit cba28d572ac799391beacd89d57e69d0d7ed70e7 Author: Michel Dänzer Date: Tue Jul 12 12:25:13 2016 +0900 glamor: Handle bitplane in glamor_copy_fbo_cpu This can significantly speed up at least some CopyPlane cases, e.g. indirectly for stippled fills. v2: * Make temporary pixmap the same size as the destination pixmap (instead of the destination drawable size), and fix coordinate parameters passed to fbCopyXtoX and glamor_upload_boxes. Fixes incorrect rendering with x11perf -copyplane* and crashes with the xscreensaver phosphor hack. v3: * Make the change a bit more compact and hopefully more readable by re-using the existing src_* locals in the bitplane case as well. Reported-by: Keith Raghubar Reviewed-by: Alex Deucher Acked-by: Eric Anholt commit 6e5bec261c3f7af069b57618d6c82b070dc4579d Author: Olivier Fourdan Date: Thu Jun 23 15:31:30 2016 +0200 wayland: Emulate crossing for native window Emitting a LeaveNotify event every time the pointer leaves an X11 window may confuse focus follow mouse mode in window managers such as mutter/gnome-shell. Keep the previously found X window and compare against the new one, and if they match then it means the pointer has left an Xwayland window for a native Wayland surface, only in this case fake the crossing to the root window. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 48c5c23a1b250c7f9d7a1747c76e4669ebf752cf Author: Hans De Goede Date: Mon Aug 8 14:53:59 2016 +0200 Fix Xorg -configure not working anymore Xorg -configure relies on the bus implementation, e.g. xf86pciBus.c to call xf86AddBusDeviceToConfigure(). The new xf86platformBus code does not have support for this. Almost all drivers support both the xf86platformBus and xf86pciBus nowadays, and the generic xf86Bus xf86CallDriverProbe() function prefers the new xf86platformBus probe method when available. Since the platformBus paths do not call xf86AddBusDeviceToConfigure() this results in Xorg -configure failing with the following error: "No devices to configure. Configuration failed.". Adding support for the xf86Configure code to xf86platformBus.c is non trivial and since we advise users to normally run without any Xorg.conf at all not worth the trouble. However some users still want to use Xorg -configure to generate a template config file, this commit implements a minimal fix to make things work again for PCI devices by skipping the platform probe method when xf86DoConfigure is set. This has been tested on a system with integrated intel graphics, with both the intel and modesetting drivers and restores Xorg -configure functionality on both cases. Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 6acd0d098add5a14f23d326ac6ee8cebab14b86a Author: Adam Jackson Date: Wed Aug 17 10:32:28 2016 -0400 test: Remember to swap the window argument to XIQueryPointer Before 5c69cb60 this wouldn't matter, because ProcXIQueryPointer manually emitted its own error before (bogusly) returning Success to the main loop. Since these tests only look at the return value of the dispatch function we'd think things succeeded even when we'd generated an error. With that fixed, the test code's failure to swap the window id would make dixLookupWindow (rightly) throw BadWindow. Reviewed-and-Tested-by: Michel Dänzer Signed-off-by: Adam Jackson commit 5c69cb604a144bdced7d066eaca574aa44e8cb36 Author: Adam Jackson Date: Mon Jun 20 12:57:12 2016 -0400 xinput: Let top-level dispatch generate the error ... instead of calling SendErrorToClient ourselves. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 2f981c06a5b9b9eab5e8a9b1d0a18281c0d1033f Author: Adam Jackson Date: Mon Jun 20 12:57:11 2016 -0400 xv: Remove some dumb calls SendErrorToClient We already generate errors from the top level when non-Success is returned from a dispatch function, so really we were emitting errors twice. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit 0bfa6bf9def43fd14bc79a302b912454e82999b1 Author: Adam Jackson Date: Mon Jun 20 12:57:10 2016 -0400 xwayland: Fix relinking when dix changes Without this a change in eg Xext/ wouldn't relink Xwayland, making you wonder why your changes didn't have any effect. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone commit bf2ca502b9cd07044cba56499d5c092deb9d73f5 Author: Keith Packard Date: Mon Aug 15 22:25:56 2016 -0700 config: Hold input lock across udev socket handling This avoids having the server running inside libudev from two threads at once, which it appears to not like. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit de5291c04b05772e6da599a475baa1b19dcae07a Author: Olivier Fourdan Date: Mon Aug 8 17:25:35 2016 +0200 present: Free the fake_present OsTimerPtr Plug a leak in present_fake_queue_vblank() where the OsTimer would not be freed. 492,608 (482,816 direct, 9,792 indirect) bytes in 15,088 blocks are definitely lost in loss record 3,954 of 3,954 at 0x4C2ABDE: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x586B19: TimerSet (WaitFor.c:433) by 0x4F1AA9: present_fake_queue_vblank (present_fake.c:108) by 0x4F15E0: present_pixmap (present.c:954) by 0x4F23B4: proc_present_pixmap (present_request.c:138) by 0x552BCE: Dispatch (dispatch.c:430) by 0x556C22: dix_main (main.c:300) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97065 Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer commit d21b53673b9de052004e761fd1299d2e788b44b8 Author: Michel Dänzer Date: Wed Aug 3 10:19:20 2016 +0900 present: Call set_abort_flip / restore_screen_pixmap in clear_window_flip We were asserting that these were called before from other places, but that isn't always the case, e.g. during server shutdown. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96951 Reported-and-Tested-by: Tod Jackson Reviewed-by: Hans de Goede Signed-off-by: Michel Dänzer commit 9f04fa3babaaabe0ed5bf4aa2563755bc6c45723 Author: Michel Dänzer Date: Wed Aug 3 10:19:19 2016 +0900 present: Make present_restore_screen_pixmap handle screen->root == NULL Easier than dealing with it in all paths that can end up here during server shutdown. Signed-off-by: Michel Dänzer Reviewed-by: Hans de Goede commit 4cbf1fb1f978ecd975770cebbb330dc10f712b77 Author: Olivier Fourdan Date: Mon Aug 8 17:57:57 2016 +0200 xwayland: Avoid double free of RRCrtc and RROutput At shutdown, the Xserver will free all its resources which includes the RRCrtc and RROutput created. Xwayland would do the same in its xwl_output_destroy() called from xwl_close_screen(), leading to a double free of existing RRCrtc RROutput: Invalid read of size 4 at 0x4CDA10: RRCrtcDestroy (rrcrtc.c:689) by 0x426E75: xwl_output_destroy (xwayland-output.c:301) by 0x424144: xwl_close_screen (xwayland.c:117) by 0x460E17: CursorCloseScreen (cursor.c:187) by 0x4EB5A3: AnimCurCloseScreen (animcur.c:106) by 0x4EF431: present_close_screen (present_screen.c:64) by 0x556D40: dix_main (main.c:354) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Address 0xbb1fc30 is 0 bytes inside a block of size 728 free'd at 0x4C2BDB0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4CCE5F: RRCrtcDestroyResource (rrcrtc.c:719) by 0x577541: doFreeResource (resource.c:895) by 0x5787B5: FreeClientResources (resource.c:1161) by 0x578862: FreeAllResources (resource.c:1176) by 0x556C54: dix_main (main.c:323) by 0x6F0D290: (below main) (in /usr/lib/libc-2.24.so) Block was alloc'd at at 0x4C2CA6A: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4CC6DB: RRCrtcCreate (rrcrtc.c:76) by 0x426D1C: xwl_output_create (xwayland-output.c:264) by 0x4232EC: registry_global (xwayland.c:431) by 0x76CB1C7: ffi_call_unix64 (in /usr/lib/libffi.so.6.0.4) by 0x76CAC29: ffi_call (in /usr/lib/libffi.so.6.0.4) by 0x556CEFD: wl_closure_invoke (connection.c:935) by 0x5569CBF: dispatch_event.isra.4 (wayland-client.c:1310) by 0x556AF13: dispatch_queue (wayland-client.c:1456) by 0x556AF13: wl_display_dispatch_queue_pending (wayland-client.c:1698) by 0x556B33A: wl_display_roundtrip_queue (wayland-client.c:1121) by 0x42371C: xwl_screen_init (xwayland.c:631) by 0x552F60: AddScreen (dispatch.c:3864) And: Invalid read of size 4 at 0x522890: RROutputDestroy (rroutput.c:348) by 0x42684E: xwl_output_destroy (xwayland-output.c:302) by 0x423CF4: xwl_close_screen (xwayland.c:118) by 0x4B6377: CursorCloseScreen (cursor.c:187) by 0x539503: AnimCurCloseScreen (animcur.c:106) by 0x53D081: present_close_screen (present_screen.c:64) by 0x43DBF0: dix_main (main.c:354) by 0x7068730: (below main) (libc-start.c:289) Address 0xc403190 is 0 bytes inside a block of size 154 free'd at 0x4C2CD5A: free (vg_replace_malloc.c:530) by 0x521DF3: RROutputDestroyResource (rroutput.c:389) by 0x45DA61: doFreeResource (resource.c:895) by 0x45ECFD: FreeClientResources (resource.c:1161) by 0x45EDC2: FreeAllResources (resource.c:1176) by 0x43DB04: dix_main (main.c:323) by 0x7068730: (below main) (libc-start.c:289) Block was alloc'd at at 0x4C2BBAD: malloc (vg_replace_malloc.c:299) by 0x52206B: RROutputCreate (rroutput.c:84) by 0x426763: xwl_output_create (xwayland-output.c:270) by 0x422EDC: registry_global (xwayland.c:432) by 0x740FC57: ffi_call_unix64 (unix64.S:76) by 0x740F6B9: ffi_call (ffi64.c:525) by 0x5495A9D: wl_closure_invoke (connection.c:949) by 0x549283F: dispatch_event.isra.4 (wayland-client.c:1274) by 0x5493A13: dispatch_queue (wayland-client.c:1420) by 0x5493A13: wl_display_dispatch_queue_pending (wayland-client.c:1662) by 0x5493D2E: wl_display_roundtrip_queue (wayland-client.c:1085) by 0x4232EC: xwl_screen_init (xwayland.c:632) by 0x439F50: AddScreen (dispatch.c:3864) Split xwl_output_destroy() into xwl_output_destroy() which frees the wl_output and the xwl_output structure, and xwl_output_remove() which does the RRCrtcDestroy() and RROutputDestroy() and call the latter only when an output is effectively removed. An additional benefit, on top of avoiding a double free, is to avoid updating the screen size at shutdown. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit b380f3ac51f40ffefcde7d3db5c4c149f274246d Author: Michel Dänzer Date: Tue Aug 2 17:53:01 2016 +0900 dix: Pass ClientPtr to FlushCallback This change has two effects: 1. Only calls FlushCallbacks when we're actually flushing data to a client. The unnecessary FlushCallback calls could cause significant performance degradation with compositing, which is significantly reduced even without any driver changes. 2. By passing the ClientPtr to FlushCallbacks, drivers can completely eliminate unnecessary flushing of GPU commands by keeping track of whether we're flushing any XDamageNotify events to the client for which the corresponding rendering commands haven't been flushed to the GPU yet. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 92b3cd32066aa5befa67a408cc079cd2ce4c077e Author: Aaron Plattner Date: Tue Aug 2 10:34:07 2016 -0700 xace: Fix XaceCensorImage to actually censor the right part of the image The caller passes arguments into XaceCensorImage that are in window-relative coordinates. However, the pBuf that it uses to construct a temporary pixmap has its origin at (x, y) relative to the window in question. The code to convert the censor region into boxes adjusts for the Y coordinate, but leaves the X coordinate alone. The result is that if x is not zero, it censors the wrong part of the image. Fix this by just translating censorRegion into pixmap-relative coordinates and using the resulting boxes as-is. Reported-by: Fabien Lelaquais Link: https://lists.x.org/archives/xorg/2016-August/058165.html Reviewed-by: Adam Jackson Signed-off-by: Aaron Plattner commit 4d586118c113f3c0a6e95ed2d3fc7f9d03a4e362 Author: Olivier Fourdan Date: Tue Aug 2 11:24:41 2016 +0200 xwayland: Plug memleak in frame callbacks The frame callback set up via wl_surface_frame() needs to be freed with wl_callback_destroy() or we'll leak memory. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97065 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 611b3b1d40f58035582480a3d7cfa77cb288cbc6 Author: Matthieu Herrb Date: Sun Jul 31 12:13:03 2016 +0200 Autoconfig: Fix the loop adding dectected drivers to the list of screens This loop was written in a buggy style, causing a NULL driver ptr to be passed to copyScreen(). copyScreen() only uses that to generate an identifier string, so this is mostly harmless on systems that accept NULL for asprintf() "%s" format. (the generated identifiers are off by one wrt the driver names and the last one contains NULL. For systems that don't accept NULL for '%s' this would cause a segmentation fault when this code is used (no xorg.conf, but partial config in xorg.conf.d for instance). Signed-off-by: Matthieu Herrb Reviewed-by: Keith Packard commit 88820f1c7b66cbc98d3f19efca24c9f52410d9f9 Author: Emily Deng Date: Mon Jul 25 16:12:53 2016 +0800 xfree86: vgaarb: Initialize local variable rsrc_decodes In function xf86VGAarbiterScrnInit when the "pEnt->bus.type" is BUS_PLATFORM, the "pScrn->vgaDev" won't be set, so the "pScrn->vgaDev" is equal to zero. The variable "rsrc_decodes" in function "xf86VGAarbiterAllowDRI" is not initialized. So it will occur error when "pScrn->vgaDev == 0", and "vga_count > 1". For this case, as "pScrn->vgaDev == 0", the function "pci_device_vgaarb_get_info" will only set the value of "vga_count", but won't set the value of "rsrc_decodes", so it will has two different return values for function "xf86VGAarbiterAllowDRI" in different platforms. One platform will return TRUE, as the "rsrc_decodes" 's default value is 0, but another platform will return FALSE, as the "rsrc_decodes" 's default value is "32767", this will cause disable direct rendering. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96937 Signed-off-by: Emily Deng Reviewed-by: Michel Dänzer commit fa2bc06407665ee074f5914d0f83d4114b20fc8e Author: Keith Packard Date: Fri Aug 12 17:40:55 2016 -0700 dix: Avoid writing uninitialized bytes in deliverPropertyNotifyEvent Make sure the whole event is initialized, instead of leaving the pad bytes unset. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 67fc5d68f967d19236221b2c0c2e0fe45acf560f Author: Keith Packard Date: Sat Aug 13 09:02:15 2016 -0700 os: Abandon loop after poll call when array of fds has changed If a file descriptor is added or removed from an ospoll callback, then the arrays containing file descriptor information will have all of their indices changed, so the loop state is no longer consistent. Just bail out and let the caller come back around to try again. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 7d6fffb6013cfc718d884cc549d7a8fef37240cf Author: Keith Packard Date: Fri Aug 12 15:23:55 2016 -0700 os: Delay freeing of epoll_wait return pointers until epoll is idle. Instead of freeing the struct ospollfd elements when the fd is removed by the user, delay that until epoll is idle so that we are sure no epoll_event structures could contain the stale pointer. This handles cases where an fd is removed from the ospoll callback interface, and also in case the OS keeps stale pointers around after the call to epoll_ctl with EPOLL_CTL_DEL. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 69b782aa75bc06f11b8f9b532d5213f252c4c6c4 Author: Keith Packard Date: Fri Jul 29 17:45:45 2016 -0700 xfree86: Set pScrn->pScreen before driver ScreenInit is called Any code called from the driver ScreenInit may want to refer to pScrn->pScreen. As the function passed to AddScreen is the first place the DDX sees a new screen, the generic code needs to make sure that value is set before passing control to the video driver's initialization code. This was found by running a driver which didn't bother to set this value when the initial colormap was installed; xf86RandR12LoadPalette tried to use pScrn->pScreen and crashed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97124 Signed-off-by: Keith Packard Reviewed-and-Tested-by: Michel Dänzer commit 387d6b5df3e11de5cb88db8a559128fcb62e4e5a Merge: d2558f063 8bb9d460f Author: Keith Packard Date: Sat Aug 13 09:12:19 2016 -0700 Merge remote-tracking branch 'daenzer/for-master' commit d2558f063a034a827247b66b4c5adbffe79dc0e7 Author: Keith Packard Date: Thu Aug 11 17:28:38 2016 -0700 Build glamor when Xorg or Xephyr are built. Requires gbm when building Xorg so that xf86-video-modesetting will work. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede Reviewed-by: Eric Anholt commit 2b9f8ae98602d2abda7c363900f39a5bd3768a4c Author: Keith Packard Date: Thu Aug 11 21:32:59 2016 -0700 mi: Remove spurious call to OsReleaseSignals from mieqGrowQueue This call wasn't converted to 'input_unlock()' when the SIGIO code was removed from the server, and so when the queue growing was reworked to be done from the input thread, it got left sitting here. As the caller now manages the lock, we don't need to switch this to input_unlock at this point. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f399919e13c994452f7219163b2a4b1fa015242e Author: Peter Hutterer Date: Fri Aug 12 13:59:56 2016 +1000 xfree86: lock input during PreInit This is a problem for the libinput driver that uses the same context across multiple devices. The driver may be halfway through setting up an input device (and the only way to do so is to add it to libinput) when the input thread comes in an reads events. This then causes mayhem when data is dereferenced that hasn't been set up yet. In my case the cause was the call to libinput_path_remove_device() inside preinit racing with evdev_dispatch_device() handling of ENODEV. The sequence was: - thread 2 gets an event and calls evdev_dispatch_device() - thread 1 calls libinput_path_remove_device() which sets the device->source to NULL - thread 2 reads from the fd, gets ENODEV and now removes the device->source, dereferencing the null-pointer This is the one I could reproduce the most, but there are other potential pitfalls that affect any driver that uses the same fd for multiple devices. Avoid all this and wrap PreInit into the lock. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit dd4e21cb3a6e692e834ec34bec42944202b3e085 Author: Peter Hutterer Date: Fri Aug 12 12:06:18 2016 +1000 xfree86: fix unbalanced input_lock/unlock in xf86NewInputDevice() If a device couldn't be enabled we left the lock hanging. This patch also removes the leftover OsReleaseSignals() call, now unnecessary. Note that input_unlock() is later than previously OsReleaseSignals(). RemoveDevice() manipulates the input device and its file descriptors, it's safer to put the input_unlock() call after RemoveDevice() to avoid events coming in while the device is being removed. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit bf31d6f43e5ce04891a96b226a975379e2e2ba71 Author: Keith Packard Date: Thu Aug 11 12:34:54 2016 -0700 os: Allow re-registering fd with InputThreadRegisterDev Calling InputThreadRegisterDev twice with the same fd should replace the existing function and args instead of creating a new entry with the same fd. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2df2815d6ae0c2ffb9e0a084d61ee3585f5116df Author: Peter Hutterer Date: Tue Aug 9 17:35:58 2016 +1000 os: append, rather than prepend, any new input thread fds xf86AddEnabledDevice() prepends the new fd to the list, xf86RemoveEnabledDevice() then searches for a matching fd and removes that entry. If this is done for the same fd (and since we lose all information but the actual fd) we usually unregister virtual devices in reverse order, causing a dereference of already released memory. Case in point: - the wacom driver calls xf86AddEnabledDevice() once for the physical device, then multiple times for the virtual subdevices - when the physical device is unplugged, the driver calls xf86RemoveEnabledDevice() for the physical device - all we have is the fd, so we end up removing the last virtual device from the fd set - xf86DeleteInput() frees the physical device's pInfo - the fd goes crazy with ENODEV, but a read_input() now passes the already freed pInfo for the physical device - boom Fix this by appending to the fd list to provide bug-for-bug compatibility with the old SIGIO code. This needs to be fixed in the driver, but meanwhile not crashing the server provides for better user experience. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a446ff84de2dd29439521f6e87d75bde3bbf002c Author: Michel Dänzer Date: Fri Jul 29 17:38:21 2016 +0900 xfree86/modes: Handle no palette case better in xf86RandR12CrtcSetGamma Just use the RandR gamma ramp directly. Fixes random on-monitor colours with drivers which don't call xf86HandleColormaps, e.g. modesetting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97154 Reviewed-by: Alex Deucher commit d3d4ff0ed4d4679b7983b1a3ea267ff945f7643c Author: Kenneth Graunke Date: Thu Jul 28 07:28:51 2016 -0700 modesetting: Delete dead drmmode_bo_for_pixmap function. Embarassingly, it looks like I introduced this dead function in commit 13c7d53df8dac45ea2a685826cd45a39bcb51657 a year ago. Nothing ever used it, not even then. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt commit 8bb9d460fbc82ee5d6f87e1d11cfa52f4f3072ee Author: Michel Dänzer Date: Fri Jul 29 17:38:21 2016 +0900 xfree86/modes: Handle no palette case better in xf86RandR12CrtcSetGamma Just use the RandR gamma ramp directly. Fixes random on-monitor colours with drivers which don't call xf86HandleColormaps, e.g. modesetting. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97154 Reviewed-by: Alex Deucher commit c833c0866f2f8f829185667efe3d6dfa5979a9e8 Author: Michel Dänzer Date: Fri Jul 29 18:41:06 2016 +0900 present: Handle event mask updates as specified v2 From the Present extension specification: An event context is associated with a specific window; using an existing event context with a different window generates a Match error. If eventContext specifies an existing event context, then if eventMask is empty, PresentSelectInput deletes the specified context, otherwise the specified event context is changed to select a different set of events. If eventContext is an unused XID, then if eventMask is empty no operation is performed. Otherwise, a new event context is created selecting the specified events. Without this change, there's no way for a client to explicitly change or destroy an existing event mask entry. Trying to do so as specified above would just result in a protocol error. v2: (Keith Packard) * Use dixLookupResourceByType instead of walking window_priv->events * Return BadMatch if the existing event context is associated with a different window or client * Call LEGAL_NEW_RESOURCE again when creating a new event context * Drop invalid "leak fix" Signed-off-by: Michel Dänzer Signed-off-by: Keith Packard Reviewed-by: Keith Packard Reviewed-by: Kenneth Graunke commit 0924ac014d7caadab0b15ba69cd0a09cfe8a01da Author: Michel Dänzer Date: Tue Jul 26 17:28:33 2016 +0900 present: Only call restore_screen_pixmap once from set_abort_flip present_restore_screen_pixmap's work doesn't need to be done several times for the same pending flip. Fixes a crash if the X server quits while a flip is pending, in which case present_set_abort_flip may be called several times, including when screen->root is already cleared to NULL. Reviewed-by: Hans de Goede commit b4e46c0444bb09f4af59d9d13acc939a0fbbc6d6 Author: Michel Dänzer Date: Sat Nov 28 16:50:47 2015 +0900 xfree86: Hook up colormaps and RandR 1.2 gamma code v6 Instead of breaking the former when the driver supports the latter, hook them up so that the hardware LUTs reflect the combination of the current colourmap and gamma states. I.e. combine the colourmap, the global gamma value/ramp and the RandR 1.2 per-CRTC gamma ramps into one combined LUT per CRTC. Fixes e.g. gamma sliders not working in games. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27222 v2: * Initialize palette_size and palette struct members, fixes crash on server startup. v3: * Free randrp->palette in xf86RandR12CloseScreen, fixes memory leak. v4: * Call CMapUnwrapScreen if xf86RandR12InitGamma fails (Emil Velikov). * Still allow xf86HandleColormaps to be called with a NULL loadPalette parameter in the xf86_crtc_supports_gamma case. v5: * Clean up inner loops in xf86RandR12CrtcComputeGamma (Keith Packard) * Move palette update out of per-CRTC loop in xf86RandR12LoadPalette (Keith Packard) v6: * Handle reallocarray failure in xf86RandR12LoadPalette (Keith Packard) Reviewed-by: Keith Packard commit 17213b74fd7fc4c4e2fe7a3781e7422dd482a0ab Author: Michel Dänzer Date: Tue Jun 21 16:44:20 2016 +0900 xfree86/modes: Remove xf86RandR12CrtcGetGamma This would normally return the same values the core RandR code passed to xf86RandR12CrtcSetGamma before, which is rather pointless. The only possible exception would be if a driver tried initializing crtc->gamma_red/green/blue to reflect the hardware LUT state on startup, but that can't work correctly if whatever set the LUT before the server started was running at a different depth. Even the pointless round-trip case will no longer work with the following change. Reviewed-by: Keith Packard commit 62f44052573b475a7b4c24f8e2da9bd6a8f1bd70 Author: Michel Dänzer Date: Tue Jun 21 15:41:45 2016 +0900 xfree86/modes: Move gamma initialization to xf86RandR12Init12 v2 RRCrtcGammaSetSize cannot be used yet in xf86InitialConfiguration, because randr_crtc isn't allocated yet at that point, but a following change will require RRCrtcGammaSetSize to be called from xf86RandR12CrtcInitGamma. v2: * Bail from xf86RandR12CrtcInitGamma if !crtc->funcs->gamma_set (Keith Packard) Reviewed-by: Keith Packard commit 0b2f30834b1a9f4a03542e25c5f54ae800df57e2 Author: Keith Packard Date: Sun May 29 17:47:29 2016 -0700 os: Clean up WaitFor.c Do all timer stuff before blocking, avoiding a bunch of duplicate code and merge common code in WaitForSomething. The WaitForSomething changes need a bit of explanation to show that the new code is effectively equivalent to the old. Eliding error checking and trivial bits we've got: Before: if (ready clients) timeout = 0 else compute timeout i = poll if (i <= 0) { if (ready clients) return TRUE; if (input) return FALSE; if (any ready timers) { run timers return FALSE; } } else { if (input) return FALSE; if (any ready timers) { run timers return FALSE; } if (ready clients) return TRUE; } After: if (ready clients) timeout = 0; else compute timeout run_timers poll if (input) return FALSE; if (ready clients) return TRUE; The old code would return TRUE if there were ready clients and input pending. Dispatch would then schedule that ready client, but before processing any requests, it would notice that there was input pending and go process it. The new code just checks for input first, which is effectively the same. If the poll timed out and there weren't clients ready, then timers would get run. If the poll didn't time out, then timers would get run, even if there were clients now ready. Now, if the timeout interval was zero, that means that the timers must have been ready *before* poll was invoked. In this case, we should simply run the timers before calling poll -- no sense calling poll just to discard any data that it generates. If the timeout interval was non-zero, and poll didn't timeout, then either there aren't any timers to run, or we got a surprise and hit a timer exactly as a client became ready to run. This is the one case where the new code is different from the old; the new code delays the timer call until the next time WaitForSomething is called. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2ab8b1dcd37900e5e2f11007d7c0cd0545209482 Author: Keith Packard Date: Sun May 29 19:48:25 2016 -0700 os: Use xorg_list for struct _OsTimerRec No sense having an open-coded linked list here, plus the doubly linked list is more efficient Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 50779c494d4682103b96db440021e56e44311b6b Author: Keith Packard Date: Sun May 29 12:45:53 2016 -0700 os: Remove CheckConnections poll provides per-fd notification of failure, so we don't need CheckConnections anymore. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f0275b1e5a4787da1f4d5507165315a000c22b33 Author: Keith Packard Date: Thu May 26 00:19:55 2016 -0700 os: Leave stdin and stdout open There's no reason to close these now that we don't care what file descriptors we use. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8217c29d2d8b29bd66bc54fee3fe5cb3385a05c7 Author: Keith Packard Date: Wed May 25 23:43:49 2016 -0700 Allow 1024 and 2048 for LimitClients There's no reason not to offer ridiculous numbers of clients; only a few static data structures are arrays of this length. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e0edb963fe09582f23a4b55da4f8840173e7a1ee Author: Keith Packard Date: Tue May 24 21:04:14 2016 -0700 os: eliminate fd value limits for clients With no code depending on the range of file descriptors, checking for that can be eliminated. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 30bc0732f959bbc63f318c06d48de080d495da32 Author: Keith Packard Date: Tue May 24 21:12:33 2016 -0700 os: Use ospoll for input thread [v2] Replace use of select(2) to avoid fd limits. Note that InputThreadFillPipe used select as well, but none of the files passed were non-blocking, so there was no need for that code at all. v2: Keep ospoll API usage single threaded to avoid re-entrancy issues Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f993091e7db81b0420e23c485378cba112278839 Author: Keith Packard Date: Thu May 26 10:40:44 2016 -0700 os: Switch server to poll(2) [v3] Eliminates all of the fd_set mangling in the server main thread v2: Listen for POLLOUT while writes are blocked. v3: Only mark client not ready on EAGAIN return from read Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8f1edf4bd3a1f050ce9eeb5eac45dd1a8f7a6d5e Author: Keith Packard Date: Thu May 19 13:59:54 2016 -0700 dix: Use list for ready clients This converts the dispatch loop into using a list of ready clients instead of an array. This changes the WaitForSomething API so that it notifies DIX when a client becomes ready to read, instead of returning the set of ready clients. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d6eff3c31e8289881a3aa9b858e5710d0f741db0 Author: Keith Packard Date: Thu May 26 10:20:45 2016 -0700 os: Add ospoll interface [v2] This provides a wrapper around poll or epoll providing a callback-based interface for monitoring activity on a large set of file descriptors. v2: use xserver_poll API instead of poll. Don't use WSAPoll as that is broken. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d403aca70a07e1401cb93738f1af5961582a2e47 Author: Keith Packard Date: Mon Jul 18 15:58:42 2016 -0700 Switch poll() users to xserver_poll() This uses the wrapper in case we need to emulate poll with select as we do on Windows. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 711c36558f50943c8342f25ad210281134887a3d Author: Brian M. Clapper Date: Mon Jul 11 18:30:05 2016 -0400 os: Add poll emulation for mingw [v2] v2: rename as 'xserver_poll' to avoid potential library name collisions. Provide 'xserver_poll.h' which uses the system poll where available and falls back to this emulation otherwise. Autodetects when this is required, building the emulation only then Source: https://github.com/bmc/poll Signed-off-by: Adam Jackson commit 2a79be9e4dd1b6ba00b69ff40bc5257ec84d34da Author: Jon Turney Date: Tue Jul 19 13:35:37 2016 +0100 hw/xwin: Update BlockHandler function signature Update for removal of fdset from Block/Wakeup handler API in 9d15912a Signed-off-by: Jon Turney Reviewed-by: Keith Packard commit 60a91031d13e4d29c383087120e318f6b528b6e5 Author: Jon Turney Date: Tue Jul 19 13:35:36 2016 +0100 hw/xwin: Update for removal of AddEnabledDevice Update for removal of AddEnabledDevice in be5a513f. Use SetNotifyFd instead. Signed-off-by: Jon Turney Reviewed-by: Keith Packard commit 7f2d690725292e7b5a44c813c9456da426256873 Author: Peter Hutterer Date: Mon Jun 27 10:17:14 2016 +1000 xfree86: if ATTR_KEYBOARD is set, match for keyboards ATTR_KEY maps to ID_INPUT_KEY which is set for any device with keys. ID_INPUT_KEYBOARD and thus ATTR_KEYBOARD is set for devices that are actual keyboards (and have a set of expected keys). Hand-written match rules may only apply ID_INPUT_KEYBOARD, so make sure we match on that too. Arguably we should've been matching on ATTR_KEYBOARD only all along but changing that likely introduces regressions. Reported-by: Marty Plummer Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 4b311d23e84356bd0e9e736aeed7448dd6382118 Author: Adam Jackson Date: Mon Jul 18 12:46:51 2016 -0400 modesetting: resubmit dirty rects on EINVAL (v2) This error code can mean we're submitting more rects at once than the driver can handle. If that happens, resubmit one at a time. v2: Make the rect submit loop more error-proof (Walter Harms) Signed-off-by: Adam Jackson Reviewed-by: Michael Thayer commit 8d3a368d8980e37e7e8c57065dc901ce809887c6 Author: Keith Packard Date: Wed Jun 1 22:47:29 2016 -0700 os: InputThreadFillPipe doesn't need select or poll The file descriptors passed to InputThreadFillPipe are always blocking, so there's no need to use Select (or poll). Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ef7ddbe242ed4c461f816663fb88646e41f1c21b Author: Keith Packard Date: Wed Jun 1 22:35:09 2016 -0700 os: Move ETEST macro from io.c to osdep.h This lets other code share this functionality Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 0d294462a5af08ada654c588fad921ed7a22749b Author: Keith Packard Date: Sun May 29 15:06:36 2016 -0700 os: Add X_NOTIFY_ERROR value This provides a way to report errors on file descriptors that is better defined than "any bits which are not READ or WRITE". Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e6636b438322a9a2f2270ad9d60bf3dfc72be0b3 Author: Keith Packard Date: Thu May 26 10:30:56 2016 -0700 os: Compute timeout in milliseconds instead of struct timeval The timeout resolution offered in the AdjustWaitForDelay call is only milliseconds, so passing around the timeout as a pointer to a struct timeval is not helpful. Doing everything in milliseconds up to the point of the select call simplifies the code without affecting functionality at all. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a414db021575accff64abad6f1047245e81c7476 Author: Keith Packard Date: Thu May 19 15:08:05 2016 -0700 dix: Intermediate GrabServer state 'GrabKickout' not needed The intermediate grabState, "GrabKickout", was used to trigger dispatch into going back to WaitForSomething after doing a GrabServer so that the set of ready clients would be recomputed to match what the server should be processing. As we only process one client per WaitForSomething call, we will always hit WaitForSomething after finishing the current client, and so don't need any special case here. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7762a602c1dfdd8cfcf2b8c2281cf4d683d05216 Author: Keith Packard Date: Thu May 19 15:05:55 2016 -0700 dix/os: Merge priority computation into SmartScheduleClient Instead of having scheduling done in two places (one in WaitForSomething, and the other in SmartScheduleClient), just stick all of the scheduling in SmartScheduleClient. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4af00242ef1e39499b932d12423fdf449296090a Author: Keith Packard Date: Mon May 30 01:49:46 2016 -0700 Bump ABI versions to reflect block/wakeup handler API changes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit be5a513fee6cbf29ef7570e57eb0436d70fbd88c Author: Keith Packard Date: Mon Dec 7 15:12:14 2015 -0800 Remove AddEnabledDevice and AddGeneralSocket APIs All uses of these interfaces should instead be using the NotifyFd API instead. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9d15912aa475b733bbb20efc367a67dacad63bf1 Author: Keith Packard Date: Tue Sep 1 18:51:14 2015 -0700 Remove fd_set from Block/Wakeup handler API This removes the last uses of fd_set from the server interfaces outside of the OS layer itself. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fb0802113b4c57819cba15d64baf79bf4148607e Author: Keith Packard Date: Tue Sep 1 11:20:04 2015 -0700 Remove readmask from screen block/wakeup handler With no users of the interface needing the readmask anymore, we can remove it from the argument passed to these functions. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 410bc047480a9f98df678dc850bc6b99c3cfb5bf Author: Keith Packard Date: Mon Dec 7 15:03:10 2015 -0800 dmx: Eliminate use of AddEnabledDevice [v2] Use SetNotifyFd instead, with the hope that someday someone will come fix this to be more efficient -- right now, the wakeup handler is doing the event reading, instead of the notify callback. v2: no need to patch dmxsigio.c as it has been removed. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6299ef3d749d6f978d3d38d42f711ac56bf382eb Author: Keith Packard Date: Thu Aug 27 11:49:35 2015 -0700 modesetting: Use passed-in fd for drm event monitoring NotifyFd callback This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6bf7b49f6711c7ed1837283dc04f93f4c1b77ecc Author: Keith Packard Date: Thu Aug 27 11:47:26 2015 -0700 hw/kdrive: Use passed-in fd for kdrive/linux APM monitoring [v2] This is a cleanup, proposed by Adam Jackson, but wasn't merged with the original NotifyFD changes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 55c2e1a3aa587c58a74066724e11e30b3df267b8 Author: Keith Packard Date: Mon Dec 7 15:11:33 2015 -0800 xnest: Use SetNotifyFd to receive events Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 24e65bf0db57bf4ac70386c0a0e8275b73edd2fb Author: Keith Packard Date: Thu Dec 3 01:02:02 2015 -0600 hw/xfree86: Use NotifyFd for other input fd wakeups Remove code in xf86Wakeup for dealing with other input and switch to using the new NotifyFd interface. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c3fea428aed919826130ef8ebdb2cceb445a845b Author: Keith Packard Date: Tue May 24 20:51:31 2016 -0700 os: Use NotifyFd for ErrorConnMax Instead of open-coding a single FD wait, use NotifyFd to wait for the FD to become readable before returning the error message. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 559aac2d71250e3137aaa582e2a59a918ddf21b7 Author: Keith Packard Date: Tue May 24 21:59:38 2016 -0700 dmx: Switch from select(2) to poll(2) for input Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit aa6717ce213e79735c72afc5ec9cc1f9c0297e09 Author: Keith Packard Date: Tue May 24 21:36:18 2016 -0700 xfree86: Switch from select(2) to poll(2) xf86WaitForInput and the xf86 SIGIO handling code. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 81135991a583b3b30a90e82ddc1d5c86d57bf00b Author: Keith Packard Date: Tue May 24 21:19:13 2016 -0700 kdrive: switch from select(2) to poll(2) This avoids fd limits Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 05a793f5b3c40747d5a92a076def7f4fb673c7e7 Author: Keith Packard Date: Tue Sep 1 18:50:55 2015 -0700 dix: Switch to the libXfont2 API (v2) This new libXfont API eliminates exposing internal X server symbols to the font library, replacing those with a struct full of the entire API needed to use that library. v2: Use libXfont2 instead of libXfont_2 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 950ffb8d6fd1480f305e38c571bda44f247f1de2 Author: Eric Anholt Date: Fri Nov 6 12:27:42 2015 -0800 glamor: Remove the FBO cache. It is a modest performance improvement (2.7% on Intel), with the significant downside that it keeps extra pixmap contents laying around for 1000 BlockHandlers without the ability for the system to purge them when under memory pressure, and tiled renderers don't know that we could avoid reading their current contents when beginning to render again. We could use the FB invalidate functions, but they aren't always available, aren't hooked up well in Mesa, and would eat into the performance gains of having the cache. [ajax: rebased to master] Reviewed-by: Adam Jackson commit e8e36755abb17872d669b88d33ca9adc511029a0 Author: Michel Dänzer Date: Fri Jul 1 12:34:20 2016 +0900 glamor: Translate solid text background region after clipping Fixes incorrect clipping for redirected windows which don't happen to be located at the top left corner of the screen. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742 Signed-off-by: Michel Dänzer Reviewed-by: Adam Jackson commit 32a9504c69183485b0b796fa3966cd1e39992365 Author: Adam Jackson Date: Tue Jul 12 10:04:18 2016 -0400 xfree86: Fix fallback driver sort order for Xorg -configure (v2) The intent here was that fallback drivers would be at the end of the list in order, but if a fallback driver happened to be at the end of the list already that's not what would happen. Rather than open-code something smarter, just use qsort. Note that qsort puts things in ascending order, so somewhat backwardsly fallbacks are greater than native drivers, and vesa is greater than modesetting. v2: Use strcmp to compare non-fallback drivers so we get a predictable result if your libc's qsort isn't stable (Keith Packard) Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 4926845a57fa8b53e18ea7d3434bf5539e9b7782 Author: Andrew Eikum Date: Wed Jul 6 14:13:09 2016 -0500 shm: Also censor images returned by ShmGetImage We currently censor images from dix's GetImage, but not from ShmGetImage. This is a method to bypass XACE, creating a potential leak. We should censor in both methods. Reviewed-by: Adam Jackson Signed-off-by: Andrew Eikum commit 9fcb554e9bfdf3eed2c2250d89150e3e7b907f01 Author: Adam Jackson Date: Fri Jul 8 15:17:05 2016 -0400 xwayland: Only force monotonic clock once Otherwise on regeneration we get: (EE) BUG: triggered 'if (clockid)' (EE) BUG: utils.c:440 in ForceClockId() (EE) (EE) Backtrace: (EE) 0: ./hw/xwayland/Xwayland (ForceClockId+0x5c) [0x47713c] (EE) 1: ./hw/xwayland/Xwayland (OsInit+0x25) [0x4763d5] (EE) 2: ./hw/xwayland/Xwayland (dix_main+0x11c) [0x43e60c] (EE) 3: /lib64/libc.so.6 (__libc_start_main+0xf1) [0x7f627b2f9731] (EE) 4: ./hw/xwayland/Xwayland (_start+0x29) [0x4238e9] (EE) 5: ? (?+0x29) [0x29] Signed-off-by: Adam Jackson Reviewed-by: Jonas Ådahl commit cf6730c503f8090a5d1b80918fe253fc2c5bc090 Author: Rui Matos Date: Wed Jul 13 19:19:09 2016 +0200 xwayland: Update RR state on wl_output.done instead of wl_output.mode Otherwise if the geometry changes but the mode doesn't we end up with the previous geometry from RR's point of view. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710 Reviewed-by: Jonas Ådahl Signed-off-by: Rui Matos commit 401a8d6e1379133863e3271374dc21850d0d3cab Author: Michel Dänzer Date: Tue Jun 28 17:22:47 2016 +0900 dix: Work around non-premultiplied ARGB cursor data Some games incorrectly use non-premultiplied ARGB cursor data, presumably because that's what Windows uses. On some hardware (and with SWcursor), this breaks areas of the cursor which are supposed to be transparent (and presumably also translucent areas, but that's less noticeable). This change checks for pixels with alpha == 0 and any non-alpha component != 0. If any such pixel is found, the data is assumed to be non-premultiplied and fixed up by multiplying the RGB components with the alpha component. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 033888e7766d226a179357d970223428c19c4b53 Author: Hans De Goede Date: Thu Jul 7 10:55:04 2016 +0200 linux: Do not try to open /dev/vc/0, fix error msg when /dev/tty0 open fails /dev/vc/0 is a devfs thing which is long dead, so stop trying to open /dev/vc/0, besides being a (small) code cleanup this will also fix the "parse_vt_settings: Cannot open /dev/tty0 (%s)\n" error message to display the actual error, rather then the -ENOENT from also trying /dev/vc/0. BugLink: https://patchwork.freedesktop.org/patch/8768/ Reported-by: Chad Versace Suggested-by: Julien Cristau Signed-off-by: Hans de Goede Reviewed-by: Julien Cristau Reviewed-by: Chad Versace commit ce24f3aa5815e03c2d501d1504f6c0162b219801 Author: Alex Goins Date: Thu Jul 7 14:50:03 2016 -0700 modesetting: NULL assignment for drmmode_set_target_scanout_target_cpu Commit 80e64dae: "modesetting: Implement PRIME syncing as a sink" originally was supposed to have this line, but it was dropped as part of the merge process. Foregoing the NULL assignment causes a ton of problems with dereferencing uninitialized memory. Signed-off-by: Alex Goins Reviewed-by: Dave Airlie commit df8e86931eb19c196ed2afc85d89525ef8cb711b Author: agoins Date: Thu Jun 16 20:06:48 2016 -0700 randr: Add ability to turn PRIME sync off Adds an output parameter to disable PRIME synchronization. Output parameter is created when the user calls 'xrandr --setprovideroutputsource ' to prevent polluting output parameters of non-PRIME configurations. Defaults to on, so if the user wants PRIME synchronization they don't need to do anything. If the user wishes to disable PRIME synchronization when they first set up PRIME, they can run 'xrandr --output --set "PRIME Synchronization" 0' after running 'xrandr --setprovideroutputsource ', but before 'xrandr --auto'. If the user wishes to enable or disable PRIME synchronization after PRIME has already been set up, they can run 'xrandr --output --set "PRIME Synchronization" <0 or 1>' at any time, xrandr will trigger a modeset, which will tear down and setup PRIME in the configuration they requested on CRTCs associated with that output. randrstr.h: Add central definition of the output property name. rrcrtc.c: Add function rrGetPixmapSharingSyncProp() to query the status of the output property. Add function rrSetPixmapSharingSyncProp() to set the output property. Add 'sync' parameter to rrSetupPixmapSharing(), which when false will use single buffering even if the required ABI functions are supported. Changes rrSetupPixmapSharing() to only report an error if falling back to single buffering when the user requested synchronization. Change RRCrtcSet() to use rrPixmapSharingSyncProp() to query the status of the output property and feed it into rrSetupPixmapSharing() using the 'sync' parameter. rrprovider.c: Add RR(Init/Fini)PrimeSyncProps(), functions to create and destroy the PRIME synchronization output property. Add a call to RRInitPrimeSyncProps() in ProcRRSetProviderOutputSource(), such that the output property is created when the user requests PRIME. Add a call to RRFiniPrimeSyncProps() in RRProviderDestroy(). v1: Initial commit v2: Unchanged v3: Add /* TODO */ for handling different sources with different outputs Make rrSetupPixmapSharing() set the output property to 0 if it has to fall back, to avoid user confusion. Make rr(Get)PixmapSharingSyncProp() check the current value if there isn't a pending value v4: Unchanged v5: Unchanged v6: Rebase onto ToT v7: Unchanged Signed-off-by: Alex Goins commit 60ad701a6a8cb9f1eacb72acfe2cb8d3b7a865dc Author: Hans de Goede Date: Tue Jun 14 11:58:01 2016 +0200 modesetting: Load on GPU-s with 0 outputs In newer laptops with switchable graphics, the GPU may have 0 outputs, in this case the modesetting driver should still load if the GPU is SourceOffload capable, so that it can be used as an offload source provider. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit 94a1c77259ce39ba59ad87615df39b570ffab435 Author: Hans de Goede Date: Thu Jun 16 15:21:03 2016 +0200 modesetting: Fix swapping of provider sink / source capabilities When a card has import capability it can be an offload _sink_, not a source and vice versa for export capability. This commit fixes the modesetting driver to properly set these capabilities, this went unnoticed sofar because most gpus have both import and export capability. Signed-off-by: Hans de Goede Reviewed-by: Eric Engestrom commit fcbafdfd79fd03205bc324e23b6d4e4d4f7180e1 Author: Adam Jackson Date: Wed Jul 22 12:14:08 2015 -0400 modesetting: Implement a double-buffered shadow mode Server GPUs often have a VNC feature attached to allow remote console. The controller implementing this feature is usually not very powerful, and we can easily swamp it with work. This is made somewhat worse by damage over-reporting the size of the dirty region, and a whole lot worse by applications (or shells) that update the screen with identical pixel content as was already there. Fix this by double-buffering the shadow fb, using memcmp to identify dirty tiles on each update pass. Since both shadows are in host memory the memcmp is cheap, and worth it given the win in network bandwidth. The tile size is somewhat arbitrarily chosen to be one cacheline wide at 32bpp on Intel Core. By default we enable this behaviour for (a subset of) known server GPUs; the heuristic could use work. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit 75e660e379d921a53eb7c3bc9c2e412fa58aec02 Author: Adam Jackson Date: Wed Jul 22 12:14:07 2015 -0400 modesetting: Drop some non-functional triple-buffering variables Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Hans de Goede commit 21217d02168d1883b2d1f64399aec494f96a8b9d Author: Dave Airlie Date: Wed Jul 22 12:14:06 2015 -0400 modesetting: Implement 32->24 bpp conversion in shadow update 24bpp front buffers tend to be the least well tested path for client rendering. On the qemu cirrus emulation, and on some Matrox G200 server chips, the hardware can't do 32bpp at all. It's better to just allocate a 32bpp shadow and downconvert in the upload hook than expose a funky pixmap format to clients. [ajax: Ported from RHEL and separate modesetting driver, lifted kbpp into the drmmode struct, cleaned up commit message, fixed 16bpp] Reviewed-by: Adam Jackson Signed-off-by: Dave Airlied Reviewed-by: Alex Deucher [hdegoede@redhat.com: rebase, also use kbpp for rotate shadow fb] Signed-off-by: Hans de Goede commit af916477c65a083ec496ac3f088d766b410e8b6e Author: Takashi Iwai Date: Mon Feb 16 17:00:55 2015 +0100 modesetting: Fix hw cursor check at the first call With the previous patch, the modesetting driver can now return whether the driver supports hw cursor. However, it alone doesn't suffice, unfortunately. drmmode_load_cursor_argb_check() is called in the following chain: xf86CursorSetCursor() -> xf86SetCursor() -> xf86DriverLoadCursorARGB() -> xf86_load_cursor_argb() -> xf86_crtc_load_cursor_argb() -> drmmode_load_cursor_argb_check() *but* at first with drmmode_crtc->cursor_up = FALSE. Then the function doesn't actually set the cursor but returns TRUE unconditionally. The actual call of drmmode_set_cursor() is done at first via the show_cursor callback, and there is no check of sw cursor fallback any longer at this place. Since it's called only once per cursor setup, so the xserver still thinks as if the hw cursor is supported. This patch is an ad hoc fix to correct the behavior somehow: it does call drmmode_set_cursor() at the very first time even if cursor_up is FALSE, then quickly hides again. In that way, whether the hw cursor is supported is evaluated in the right place at the right time. Of course, it might be more elegant if we have a more proper mechanism to fall back to sw cursor at any call path. But it'd need more rework, so I leave this workaround as is for now. Signed-off-by: Takashi Iwai Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit 14c21ea1c9496638b1feb8e6145c440fb4f1d14b Author: Takashi Iwai Date: Mon Feb 16 17:00:54 2015 +0100 modesetting: Use load_cursor_argb_check for sw cursor fallback The modesetting driver still has an everlasting bug of invisible cursor on cirrus and other KMS drivers where no hardware cursor is supported. This patch is a part of an attempt to address it. This patch particularly converts the current load_cursor_argb callback of modesetting driver to load_cursor_argb_check so that it can return whether the driver handles the hw cursor or falls back to the sw cursor. Signed-off-by: Takashi Iwai Reviewed-by: Kenneth Graunke [hdegoede@redhat.com: Add extra comment suggested by Kenneth] Signed-off-by: Hans de Goede commit 074cf58769b38550a3f35d5ecb73333330cb2aed Author: Takashi Iwai Date: Mon Feb 16 17:00:53 2015 +0100 modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2 The error value isn't always -EINVAL, e.g. the kernel drm core returns -ENXIO when the corresponding ops doesn't exist. Without this fix, DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it shouldn't. Signed-off-by: Takashi Iwai Reviewed-by: Michel Dänzer Reviewed-by: Kenneth Graunke Signed-off-by: Hans de Goede commit 3762edded8e6e973f71419937e16bea262a266b8 Author: Adam Jackson Date: Wed Jun 29 14:07:32 2016 -0400 configure: Tell AC_REPLACE_FUNCS where to find replacements Fixes weird link errors of the form: CCLD Xvfb ../../Xext/.libs/libXext.a(xvmc.o): In function `xf86XvMCRegisterDRInfo': /home/ajax/git/xserver/Xext/xvmc.c:828: undefined reference to `strlcpy' /home/ajax/git/xserver/Xext/xvmc.c:829: undefined reference to `strlcpy' ../../os/os.O: In function `siHostnameAddrMatch': /home/ajax/git/xserver/os/access.c:1821: undefined reference to `strlcpy' ../../os/os.O: In function `AuthAudit': /home/ajax/git/xserver/os/connection.c:555: undefined reference to `strlcpy' /home/ajax/git/xserver/os/connection.c:574: undefined reference to `strlcpy' ../../os/os.O:/home/ajax/git/xserver/os/log.c:972: more undefined references to `strlcpy' follow collect2: error: ld returned 1 exit status Makefile:688: recipe for target 'Xvfb' failed make[3]: *** [Xvfb] Error 1 Makefile:749: recipe for target 'all-recursive' failed make[2]: *** [all-recursive] Error 1 Makefile:608: recipe for target 'all-recursive' failed make[1]: *** [all-recursive] Error 1 Makefile:776: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit d135100d6b17e54262a12aeaebe0fe2fe48da3bb Author: Peter Hutterer Date: Tue Jun 28 11:42:41 2016 +1000 xkb: add a cause to the xkb indicator update after a keymap change Regression introduce by ac164e58870d which calls XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into the stack and we triggered a NULL-pointer dereference. In theory a NULL cause is acceptable since we don't actually change modifier state here. Instead of updating all places to check for NULL just set the cause to the client request and go to the pub. https://bugs.freedesktop.org/show_bug.cgi?id=96384 Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau Reviewed-by: Daniel Stone commit b83dede9cb930cf55249ad8e935f3c4d4328e2d9 Author: Alex Goins Date: Thu Jun 16 20:06:56 2016 -0700 modesetting: Implement PRIME syncing as a source Implements (Start/Stop)FlippingPixmapTracking, PresentSharedPixmap, and RequestSharedPixmapNotifyDamage, the source functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a source with PRIME synchronization. v1: N/A v2: N/A v3: N/A v4: Initial commit v5: Move disabling of reverse PRIME on sink to sink commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 44cb9578c0e5e10568826bc3ecbed97d358bba3c Author: Alex Goins Date: Thu Jun 16 20:06:55 2016 -0700 modesetting: Disable Reverse PRIME for i915 Reverse PRIME seems to be designed with discrete graphics as a sink in mind, designed to do an extra copy from sysmem to vidmem to prevent a discrete chip from needing to scan out from sysmem. The criteria it used to detect this case is if we are a GPU screen and Glamor accelerated. It's possible for i915 to fulfill these conditions, despite the fact that the additional copy doesn't make sense for i915. Normally, you could just set AccelMethod = none as an option for the device and call it a day. However, when running with modesetting as both the sink and the source, Glamor must be enabled. Ideally, you would be able to set AccelMethod individually for devices using the same driver, but there seems to be a bug in X option parsing that makes all devices on a driver inherit the options from the first detected device. Thus, glamor needs to be enabled for all or for none until that bug (if it's even a bug) is fixed. Nonetheless, it probably doesn't make sense to do the extra copy on i915 even if Glamor is enabled for the device, so this is more user friendly by not requiring users to disable acceleration for i915. v1: N/A v2: N/A v3: N/A v4: Initial commit v5: Unchanged v6: Rebase onto ToT v7: NULL check and free drmVersionPtr Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit f6fef2a171366156c4c6807de7fe086f04f41b7b Author: Alex Goins Date: Thu Jun 16 20:06:54 2016 -0700 modesetting: Blacklist USB transport devices from PRIME sync UDL (USB 2.0 DisplayLink DRM driver) and other drivers for USB transport devices have strange semantics when it comes to vblank events, due to their inability to get the actual vblank info. When doing a page flip, UDL instantly raises a vblank event without waiting for vblank. It also has no support for DRM_IOCTL_WAIT_VBLANK, and has some strange behavior with how it handles damage when page flipping. It's possible to get something semi-working by hacking around these issues, but even then there isn't much value-add vs single buffered PRIME, and it reduces maintainability and adds additional risks to the modesetting driver when running with more well-behaved DRM drivers. Work needs to be done on UDL in order to properly support synchronized PRIME. For now, just blacklist it, causing RandR to fall back to unsynchronized PRIME. This patch originally blacklisted UDL by name, but it was pointed out that there are other USB transport device drivers with similar limitations, so it was expanded to blacklist all USB transport devices. v1: N/A v2: N/A v3: Initial commit v4: Move check to driver.c for consistency/visibility v5: Refactor to accomodate earlier changes v6: Rebase onto ToT v7: Expand to blacklist all USB transport devices, not just UDL Signed-off-by: Alex Goins Reviewed-by: Hans de Goede Reviewed-by: Dave Airlie commit 500853086dd5fbfe6d2b3e30923fdc4d8c262cf0 Author: Alex Goins Date: Thu Jun 16 20:06:53 2016 -0700 modesetting: Suspend and resume flipping with DPMS DPMS would prevent page flip / vblank events from being raised, freezing the screen until PRIME flipping was reinitialized. To handle DPMS cleanly, suspend PRIME page flipping when DPMS mode is not on, and resume it when DPMS mode is on. v1: Initial commit v2: Moved flipping_active check from previous commit to here v3: Unchanged v4: Unchanged v5: Move flipping_active check to sink support commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 80e64dae8af1eb3bb225b00fd800c6924883cf46 Author: Alex Goins Date: Thu Jun 16 20:06:52 2016 -0700 modesetting: Implement PRIME syncing as a sink Implements (Enable/Disable)SharedPixmapFlipping and SharedPixmapNotifyDamage, the sink functions for PRIME synchronization and double buffering. Allows modesetting driver to be used as a sink with PRIME synchronization. Changes dispatch_slave_dirty to flush damage from both scanout pixmaps. Changes drmmode_set_scanout_pixmap*() functions to drmmode_set_target_scanout_pixmap*() that take an additional parameter PixmapPtr *target. Then, treat *target as it did prime_pixmap. This allows me to use it to explicitly set both prime_pixmap and prime_pixmap_back individually. drmmode_set_scanout_pixmap() without the extra parameter remains to cover the single-buffered case, but only works if we aren't already double buffered. driver.c: Add plumbing for rr(Enable/Disable)SharedPixmapFlipping and SharedPixmapNotifyDamage. Change dispatch_dirty_crtc to dispatch_dirty_pixmap, which functions the same but flushes damage associated with a ppriv instead of the crtc, and chanage dispatch_slave_dirty to use it on both scanout pixmaps if applicable. drmmode_display.h: Add flip_seq field to msPixmapPrivRec to keep track of the event handler associated with a given pixmap, if any. Add wait_for_damage field to msPixmapPrivRec to keep track if we have requested a damage notification from the source. Add enable_flipping field to drmmode_crtc_private_rec to keep track if flipping is enabled or disabled. Add prime_pixmap_back to drmmode_crtc_private_rec to keep track of back buffer internally. Add declarations for drmmode_SetupPageFlipFence(), drmmode_EnableSharedPixmapFlipping(), drmmode_DisableSharedPixmapFlipping, drmmode_SharedPixmapFlip(), and drmmode_SharedPixmapPresentOnVBlank(). Move slave damage from crtc to ppriv. drmmode_display.c: Change drmmode_set_scanout_pixmap*() functions to drmmode_set_target_scanout_pixmap*() that take an additional parameter PixmapPtr *target for explicitly setting different scanout pixmaps. Add definitions for functions drmmode_SharedPixmapFlip(), drmmode_SharedPixmapPresentOnVBlank(), drmmode_SharedPixmapPresent(), drmmode_SharedPixmapVBlankEventHandler(), drmmode_SharedPixmapVBlankEventAbort(), drmmode_EnableSharedPixmapFlipping(), and drmmode_DisableSharedPixmapFlipping, drmmode_InitSharedPixmapFlipping(), and drmmode_FiniSharedPixmapFlipping, along with struct vblank_event_args. The control flow is as follows: pScrPriv->rrEnableSharedPixmapFlipping() makes its way to drmmode_EnableSharedPixmapFlipping(), which sets enable_flipping to TRUE and sets both scanout pixmaps prime_pixmap and prime_pixmap_back. When setting a mode, if prime_pixmap is defined, modesetting driver will call drmmode_InitSharedPixmapFlipping(), which if flipping is enabled will call drmmode_SharedPixmapPresent() on scanout_pixmap_back. drmmode_SharedPixmapPresent() requests that for the source to present on the given buffer using master->PresentSharedPixmap(). If it succeeds, it will then attempt to flip to that buffer using drmmode_SharedPixmapFlip(). Flipping shouldn't fail, but if it does, it will raise a warning and try drmmode_SharedPixmapPresent() again on the next vblank using drmmode_SharedPixmapPresentOnVBlank(). master->PresentSharedPixmap() could fail, in most cases because there is no outstanding damage on the mscreenpix tracked by the shared pixmap. In this case, drmmode_SharedPixmapPresent() will attempt to use master->RequestSharedPixmapNotifyDamage() to request for the source driver to call slave->SharedPixmapNotifyDamage() in response to damage on mscreenpix. This will ultimately call into drmmode_SharedPixmapPresentOnVBlank() to retry drmmode_SharedPixmapPresent() on the next vblank after accumulating damage. drmmode_SharedPixmapFlip() sets up page flip event handler by packing struct vblank_event_args with the necessary parameters, and registering drmmode_SharedPixmapVBlankEventHandler() and drmmode_SharedPixmapVBlankEventAbort() with the modesetting DRM event handler queue. Then, it uses the drmModePageFlip() to flip on the next vblank and raise an event. drmmode_SharedPixmapPresentOnVBlank() operates similarly to drmmode_SharedPixmapFlip(), but uses drmWaitVBlank() instead of drmModePageFlip() to raise the event without flipping. On the next vblank, DRM will raise an event that will ultimately be handled by drmmode_SharedPixmapVBlankEventHandler(). If we flipped, it will update prime_pixmap and prime_pixmap_back to reflect that frontTarget is now being displayed, and use drmmode_SharedPixmapPresent(backTarget) to start the process again on the now-hidden shared pixmap. If we didn't flip, it will just use drmmode_SharedPixmapPresent(frontTarget) to start the process again on the still-hidden shared pixmap. Note that presentation generally happens asynchronously, so with these changes alone tearing is reduced, but we can't always guarantee that the present will finish before the flip. These changes are meant to be paired with changes to the sink DRM driver that makes flips wait on fences attached to dmabuf backed buffers. The source driver is responsible for attaching the fences and signaling them when presentation is finished. Note that because presentation is requested in response to a vblank, PRIME sources will now conform to the sink's refresh rate. At teardown, pScrPriv->rrDisableSharedPixmapFlipping() will be called, making its way to drmmode_FiniSharedPixmapFlipping(). There, the event handlers for prime_pixmap and prime_pixmap_back are aborted, freeing the left over parameter structure. Then, prime_pixmap and prime_pixmap back are unset as scanout pixmaps. Register and tear down slave damage per-scanout pixmap instead of per-crtc. v1: Initial commit v2: Renamed PresentTrackedFlippingPixmap to PresentSharedPixmap Renamed flipSeq to flip_seq Warn if flip failed Use SharedPixmapNotifyDamage to retry on next vblank after damage v3: Refactor to accomodate moving (rr)StartFlippingPixmapTracking and (rr)(Enable/Disable)SharedPixmapFlipping to rrScrPrivRec from ScreenRec Do damage tracking on both scanout pixmaps v4: Tweaks to commit message v5: Revise for internal storage of prime pixmap ptrs Move disabling for reverse PRIME from source commit to here Use drmmode_set_target_scanout_pixmap*() to set scanout pixmaps internally to EnableSharedPixmapFlipping(). Don't support flipping if ms->drmmode.pageflip == FALSE. Move flipping_active check to this commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 378c85a8848679eaa3c2881f3ba8b686e59df25e Author: Alex Goins Date: Thu Jun 16 20:06:51 2016 -0700 modesetting: Always load ms->drmmode.pageflip ms->drmmode.pageflip was only loaded from options if ms->drmmode.glamor was defined, otherwise it would always assume FALSE. PRIME Synchronization requires ms->drmmode.pageflip even if we aren't using glamor, so load it unconditionally. v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit b773a9c8126222e5fed2904d012fbf917a9f22fd Author: Alex Goins Date: Thu Jun 16 20:06:50 2016 -0700 modesetting: Always tear down scanout pixmap drmmode_set_scanout_pixmap_(cpu/gpu) would only do teardown if ppix == NULL. This meant that if there were consecutive calls to SetScanoutPixmap(ppix != NULL) without calls to SetScanoutPixmap(ppix == NULL) in between, earlier calls would be leaked. RRReplaceScanoutPixmap() does this today. Instead, when setting a scanout pixmap, always do teardown of the existing scanout pixmap before setting up the new one. Then, if there is no new one to set up, stop there. This maintains the previous behavior in all cases except those with multiple consecutive calls to SetScanoutPixmap(ppix != NULL). v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit f4c37eeee7953df1fe0e3196eda452acf0078e61 Author: Alex Goins Date: Thu Jun 16 20:06:49 2016 -0700 modesetting: Internal storage of scanout pixmaps modesetting relied on randr_crtc->scanout_pixmap being consistent with calls to SetScanoutPixmap, which is very fragile and makes a lot of assumptions about the caller's behavior. For example, RRReplaceScanoutPixmap(), when dropping off with !size_fits, will set randr_crtc->scanout_pixmap = NULL and then call SetScanoutPixmap. Without this patch, drmmode_set_scanout_pixmap_(cpu/gpu) will think that there is no scanout pixmap to tear down, because it's already been set to NULL. By keeping track of the scanout pixmap in its internal state, modesetting can avoid these types of bugs and reduce constraints on calling conventions. v1: N/A v2: N/A v3: N/A v4: N/A v5: Initial commit v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit 1bdbc7e764ed7bf7c1ae46287dec368aa7c7e80d Author: Alex Goins Date: Thu Jun 16 20:06:47 2016 -0700 randr/xf86: Add PRIME Synchronization / Double Buffer Changes PRIME to use double buffering and synchronization if all required driver functions are available. rrcrtc.c: Changes rrSetupPixmapSharing() to use double buffering and synchronization in the case that all required driver functions are available. Otherwise, falls back to unsynchronized single buffer. Changes RRCrtcDetachScanoutPixmap() to properly clean up in the case of double buffering. Moves StopPixmapTracking() from rrDestroySharedPixmap() to RRCrtcDetachScanoutPixmap(). Changes RRReplaceScanoutPixmap() to fail if we are using double buffering, as it would need a second ppix parameter to function with double buffering, and AFAICT no driver I've implemented double buffered source support in uses RRReplaceScanoutPixmap(). randrstr.h: Adds scanout_pixmap_back to struct _rrCrtc to facilitate PRIME double buffering. xf86Crtc.h: Adds current_scanout_back to _xf86Crtc to facilitate detection of changes to it in xf86RandR12CrtcSet(). xf86RandR12.c: Changes xf86RandR12CrtcSet() to detect changes in scanout_pixmap_back. Adds scanout_pixmap_back to struct _rrCrtc to facilitate PRIME double buffering. v1: Initial commit v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap v3: Refactor to accomodate moving (rr)StartFlippingPixmapTracking and (rr)(Enable/Disable)SharedPixmapFlipping to rrScrPrivRec from ScreenRec Add fallback if flipping funcs fail v4: Detach scanout pixmap when destroying scanout_pixmap_back, to avoid dangling pointers in some drivers v5: Disable RRReplaceScanoutPixmap for double-buffered PRIME, it would need an ABI change with support for 2 pixmaps if it were to be supported, but AFAICT no driver that actually supports double-buffered PRIME uses it. Refactor to use rrEnableSharedPixmapFlipping() as a substitute for rrCrtcSetScanoutPixmap() in the flipping case. Remove extraneous pSlaveScrPriv from DetachScanoutPixmap() Remove extraneous protopix and pScrPriv from rrSetupPixmapSharing() v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit b601f96a5915a2c486b389483b291797e6fdf617 Author: Alex Goins Date: Thu Jun 16 20:06:46 2016 -0700 xf86: Add PRIME flipping functions to Screen Adds typedefs for (*RRStartFlippingPixmapTrackingProcPtr), (*RREnableSharedPixmapFlippingProcPtr), and (*RRDisableSharedPixmapFlippingProcPtr) in randrstr.h. Adds typedefs for (*PresentSharedPixmapProcPtr), (*SharedPixmapNotifyDamageProcPtr), (*RequestSharedPixmapNotifyDamageProcPtr), and (*StopFlippingPixmapTrackingProcPtr) in scrnintstr.h. Adds RR(Enable/Disable)SharedPixmapFlipping, and RRStartFlippingPixmapTracking to rrScrnPrivRec. Adds StopFlippingPixmapTracking, PresentSharedPixmap, SharedPixmapNotifyDamage, and RequestSharedPixmapNotifyDamage to ScreenRec. rrScrnPrivRec used for functions that use RandR-private data types, and ScreenRec used for the rest. RREnableSharedPixmapFlipping will allow the sink driver to setup for flipping between two shared pixmaps. RRDisableSharedPixmapFlipping will allow the sink driver to do teardown associated with flipping between two shared pixmaps. (RRStart/Stop)FlippingPixmapTracking are merely the double-buffered equivalents of (Start/Stop)PixmapTracking, allowing the source driver to do whatever setup and teardown necessary for presenting on the two shared pixmaps. PresentSharedPixmap is a function exposed by the source driver for the X server or sink driver to call to request a present on a given shared pixmap. This way, presents can be driven by the sink's vblank instead of a timer or similar mechanism. SharedPixmapNotifyDamage and RequestSharedPixmapNotifyDamage are OPTIONAL (even for double-buffered PRIME) functions exposed by the sink driver and the source driver, respectively. By calling master->RequestSharedPixmapNotifyDamage(ppix), the sink driver can request for the source driver to call slave->SharedPixmapNotifyDamage(ppix) in response to damage on the master screen pixmap tracked by ppix. v1: Initial commit v2: Rename PresentTrackedFlippingPixmap to PresentSharedPixmap Add SharedPixmapNotifyDamage / RequestSharedPixmapNotifyDamage v3: Add RRCrtcPtr as a parameter to StartFlippingPixmapTracking Move functions that use RandR-private data types to rrScrnPrivRec. v4: Unchanged v5: Add front and back parameters to RREnableSharedPixmapFlippingProcPtr v6: Rebase onto ToT v7: Unchanged Reviewed-by: Dave Airlie Signed-off-by: Alex Goins commit ef1578e736887aadf209172f48daa9eaec25b3db Author: Jon Turney Date: Sun Feb 28 00:53:24 2016 +0000 hw/xwin: Fix a typo in "Remove Shadow DirectDraw engine" Commit 7a22912e "Remove Shadow DirectDraw engine" contained a typo, changing the fullscreen && DirectDraw check in WM_DISPLAYCHANGE to fullscreen || DirectDraw This causes disruptive depth changes to be improperly handled Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 0a0c1bd93259c208184d6ad974ba55658191af0c Author: Jon Turney Date: Fri Feb 26 18:03:04 2016 +0000 hw/xwin: Fix a crash trying to reload window icons when not in multiwindow mode ReloadEnumWindowsProc() accesses window privates, which are only valid in multiwindow mode, but is called in all modes. Fix this potential crash by not doing this unless in multiwindow mode. Reproduction steps: 1/ XWin -mwextwm 2/ Run a client which creates an X window e.g. xterm 3/ Right click on notification area icon, and choose 'Reload .XWinrc' from the menu Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 91ae2571458c50d9f782190d9f80815b770aefac Author: Colin Harrison Date: Fri Feb 26 16:46:15 2016 +0000 hw/xwin: Fix a crash which occurs if focus returns to XWin after xkbcomp has failed If WM_FOCUS is received while the "core devices failed" fatal error (due to xkbcomp failing) is displayed, winRestoreModeKeyState() attempts to dereference a NULL InputInfo.keyboard->key pointer. Signed-off-by: Colin Harrison Reviewed-by: Jon Turney commit 4b123e0f61eb55e59d30bf442499cf3b3f621c3b Author: Jon Turney Date: Tue Aug 4 16:05:05 2015 +0100 hw/xwin: Make window maximizable if a maximium size larger than virtual desktop size is specified Firefox 38 has a WM_NORMAL_HINTS with a maximum size of 32767x32767. Don't remove the maximize control from the window frame if the maximum size is bigger than the virtual desktop size, as maximizing the window will not exceed the maximium size. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 504bf495f9b3adea1ba650469223511f81709714 Author: Jon Turney Date: Wed Jul 8 19:12:22 2015 +0100 hw/xwin: Detect invalid options in combination with -nodecoration Detect invalid options in combination with -nodecoration These are particularly problematic as -nodecoration implies a default of -nomultimonitors, for some reason, which will gives rendering issues with -multiwindow. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e1b983b55e4cefcf976c8f92d608af8216a56927 Author: Jon Turney Date: Tue Nov 11 11:46:25 2014 +0000 hw/xwin: Default to -noresize when -fullscreen is used Currently, just using -fullscreen fails in winValidateArgs(), as the default -resize=randr is incompatible with -fullscreen. Set the default resize mode to -noresize if -fullscreen is used. Also, rename enum value notAllowed -> resizeNotAllowed for clarity. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 42f7cd5d92f2046e1b5c264b3d76c3afda624a55 Author: Jon Turney Date: Sat Oct 11 14:49:16 2014 +0100 hw/xwin: Tell LogInit() to backup previous logfile as .old Future work: Do we really need to call LogInit() in so many different places? Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 197419838273eddbd0bd34890771799f4bebbc07 Author: Jon Turney Date: Fri Sep 26 13:18:33 2014 +0100 hw/xwin: Downgrade some uninformative, always-emitted log output to debug Downgrade from error to debug some uninformative, always-emitted log output about thread synchronization during initialization Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 17c8bf348eea4f12ce7cb4ca7db0d0576e28c982 Author: Jon Turney Date: Tue Apr 28 16:04:40 2015 +0100 hw/xwin: Check for just the hostname in window title When -hostintitle is enabled, only use the hostname, not a FQDN from WM_CLIENT_MACHINE, when checking if the window title already contains it Also restructure GetWindowName() to fix a potential memory leak. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit c05c4360eea245b3ef5f3a355b95dcd63244ef70 Author: Jon Turney Date: Mon Sep 22 14:40:41 2014 +0100 hw/xwin: Use _NET_WM_NAME for window titles in multiwindow mode Use _NET_WM_NAME in preference to WM_NAME for window title Update window title when _NET_WM_NAME property changes We should always have been doing this, but some qt5 examples only set _NET_WM_NAME, so now it's become more important... Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 866d8299abc4315d4836292aeac4abe0b686fc10 Author: Jon Turney Date: Thu Mar 13 17:53:44 2014 +0000 hw/xwin: Remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows In multiwindow mode, remove decorations from _NET_WM_WINDOW_TYPE_SPLASH type windows. Some programs use _NET_WM_WINDOW_TYPE_SPLASH_SCREEN in error, so also accept that as equivalent. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 356b9129067dd0e1dc62e893d47a1e9b033885bd Author: Jon Turney Date: Thu Apr 7 17:40:56 2016 +0100 hw/xwin: Use Bool type in winShowWindowOnTaskbar() prototype Use the Bool type from X11/Xdefs.h for winShowWindowOnTaskbar(). This is the boolean type we should be using inside the X server, rather than BOOL, which evaluates to either the Win32 API type, or the Xlib API type, depending on the context... Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 7397a2191f333a8632109873cc60d13ca4d550b0 Author: Olivier Fourdan Date: Tue Jun 21 13:54:35 2016 +0200 xwayland-input: Fake crossing to rootwin This partially reverts commit c1565f3. When the pointer moves from an X11 window to a Wayland native window, no LeaveNotify event is emitted which can lead to various unexpected behaviors like tooltips remaining visible after the pointer has left the window. Yet the pointer_handle_leave() is called and so is the DIX CheckMotion() but since the pointer enters a Wayland native window with no other Xwayland window matching, DoEnterLeaveEvents() does not get invoked and therefore no LeaveNotify event is sent to the X11 client at the time the pointer leaves the window for a Wayland native surface. Restore the XYToWindow() handler in xwayland-input that was previously removed with commit c1565f3 and use that handler to pretend that the pointer entered the root window in this case so that the LeaveNotify event is emitted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96437 Signed-off-by: Olivier Fourdan Acked-by: Daniel Stone Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 111a045dcf0912dc5b178c18acda479b3972876b Author: Adam Jackson Date: Tue Jun 21 11:45:17 2016 -0400 Revert "XDMCP: For IPv6 add link local addresses to the end of the list" This reverts commit fdd448cd39b4ca84a28d73fc628911070437b703. commit fdd448cd39b4ca84a28d73fc628911070437b703 Author: Reinhard Max Date: Thu Apr 28 15:21:15 2016 +0200 XDMCP: For IPv6 add link local addresses to the end of the list For link local addresses the XDMCP server would need to either know the interface thru a scope identifier or try all available interfaces. If they don't this address will fail in which case the XDMCP server could still try the other addresses passed - however some only try the first address and then give up. Even if this seems to be the wrong place to fix this it seems to be easier than fixing all display servers. [ajax: Cleaned up commit message] Reviewed-by: Adam Jackson commit ce82ae1964b2115a780786676c614546297a79c9 Author: Adam Jackson Date: Tue Feb 2 14:10:49 2016 -0500 res: Account for GLXPixmap references too GLX_EXT_tetxure_from_pixmap operates on a GLXPixmap, which takes a reference on the backing pixmap; that GLXPixmap might be long-lived, so we should account for it in ResQueryClientPixmapBytes. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 5d6ad0d3a7611c4dff2d79b6af9eb5c0885656ef Author: Adam Jackson Date: Tue Feb 2 13:49:37 2016 -0500 res: Fix accounting of redirected window pixmaps for Composite The previous change removed the special case that matched resources of CompositeClientWindowType and walked back from that to the window pixmap. That was intentional, since that logic was broken anyway. CCWTs don't map 1:1 to references on the backing pixmap; a window redirected by multiple clients (say, by the server since it's on the synthetic visual, and then manually by a compositor) would have a window pixmap refcount of 1, but would have those bytes accounted twice. The right thing is to have Composite wrap window accounting, and add the pixmap bytes once and only once for the redirection reference. Note that the view from the client can still be non-intuitive in the face of Composite. xcompmgr, for example, holds _two_ references to each window pixmap (one each from CompositeNameWindowPixmap and RenderCreatePicture), so a synthetic-visual window will have its bytes split 2/3 to xcompmgr and 1/3 to the server-client. Nothing to be done about that, and at least this way we're not over-accounting. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 4f8a72034c4a2654bfc16d929e09a69d1cc138ef Author: Adam Jackson Date: Tue Feb 2 13:46:42 2016 -0500 res: Simplify QueryClientPixmapBytes I suspect this code predates the common resource hooks for computing sizes. It's ugly in any case since the Resource extension shouldn't need to know which extensions can take a reference on pixmaps. Instead, let's just walk every resource for the client and sum up all the pixmap bytes that way. This might be slightly slower since we're calling the size func once for every resource. On the other hand, it might be slightly faster since we only walk the resource table once instead of 3-5 times. Probably a wash, and not really a performance path in any case. Acked-by: Michel Dänzer Signed-off-by: Adam Jackson commit 263c5333a54107efac702a54d7e6329ae25ff4e0 Author: Michel Dänzer Date: Fri Dec 25 18:32:46 2015 +0900 xfree86/modes: Simplify in_range logic in xf86_crtc_set_cursor_position Consolidate to a single if/else statement and eliminate the redundant local variable in_range and assignments to x/y. Reviewed-by: Adam Jackson commit a991b1ec30344c16d318d2c0640f9e5d380193e0 Author: Michel Dänzer Date: Mon Feb 1 16:07:22 2016 +0900 xfree86/modes: Disambiguate driverIsPerformingTransform The driver can now specify exactly which aspects of the transform it wants to handle via XF86DriverTransform* flags. Since the driver can now choose whether it wants to receive transformed or untransformed cursor coordinates, xf86CrtcTransformCursorPos no longer needs to be available to drivers, so make it static. Reviewed-by: Adam Jackson commit aad96f85005f8eab27df62049d619092865a9b16 Author: Michel Dänzer Date: Fri Dec 25 18:28:47 2015 +0900 xfree86/modes: Fix HW cursor clipping for driverIsPerformingTransform (v2) Even if the driver is handling the transform, we still need to transform the cursor position for clipping, otherwise we may hide the HW cursor when the cursor is actually inside the area covered by the CRTC. v2: Use crtc_x/y local variables for clarity Reviewed-by: Adam Jackson commit 828887b6f4a997b6468da565a88b6fe9afcda191 Author: Keith Packard Date: Tue Jun 14 13:45:27 2016 -0700 ephyr: Process only the last expose or configure available from the server Delay expose or configure processing until the event queue is empty so that we don't end up processing a long series of events one at a time. Expose events already have a check waiting for the last in a series, this further improves that by discarding multiple series of events. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c17a41794507d6d04c850e9e1bc04fc60c31de18 Author: Keith Packard Date: Sat Jun 4 19:55:07 2016 -0700 ephyr: Process queued X events before blocking [v2] If we end up reading all pending X events in the course of other server execution, then our notify FD callback won't get invoked and we won't process them. Fix this by noting that there are queued events in the block handler, setting the poll timeout to zero and queuing a work proc to clear the event queue. v2: use a work proc to clear the event queue rather than doing it in the block handler directly. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f3248eba6e2d0c099025f8e9a4874b431246eac7 Author: Keith Packard Date: Tue Jun 14 13:19:49 2016 -0700 ephyr: Handle window resize when using glamor Under glamor, we need to re-create the screen pixmap at the new size so that we can ask glamor for the associated texture. Fortunately, we can simply use ephyr_glamor_create_screen_resources to create the new pixmap. Because this is being done after the server has started, we need to walk the window heirarchy and reset any windows pointing at the old pixmap. I could easily be convinced that this TraverseTree should be moved to miSetScreenPixmap. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 235d21670dcff224807ff719c7fa86212058ec46 Author: Keith Packard Date: Tue Jun 14 13:16:03 2016 -0700 ephyr: Don't configure window while responding to configure events This leads to and endless sequence of window resizes. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fb1edccf3c90c626f120b3c399657f24d3f7901e Author: Keith Packard Date: Thu May 26 12:11:46 2016 -0700 dix: Call screen block/wakeup handlers closest to blocking [v3] The screen block and wakeup handlers are the only ones which provide a well known ordering between the wrapping layers; placing these as close as possible to the server blocking provides a way for the driver to control the flow of execution correctly. Switch the shadow code to run in the screen block handler so that it now occurrs just before the server goes to sleep. Switch glamor to call down to the driver after it has executed its own block handler piece, in case the driver needs to perform additional flushing work after glamor has called glFlush. These changes ensure that the following modules update the screen in the correct order: animated cursors (uses RegisterBlockAndWakeupHandlers dynamically) composite (dynamic wrapping) misprite (dynamic wrapping) shadow (static wrapping) glamor (static wrapping) driver (static wrapping) It looks like there's still a bit of confusion between composite and misprite; if composite updates after misprite, then it's possible you'd exit the block handler chain with the cursor left hidden. To fix that, misprite should be wrapping during ScreenInit time and not unwrapping. And composite might as well join in that fun, just to make things consistent. [v2] Unwrap BlockHandler in shadowCloseScreen (ajax) [v3] ephyr: Use screen block handler for flushing changes ephyr needs to make sure it calls glXSwapBuffers after glamor finishes its rendering. As the screen block handler is now called last, we have to use that instead of a registered block/wakeup handler to make sure the GL rendering is done before we copy it to the front buffer. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a134d1e7eada0ac90fb622f45833c87b72c9aa06 Author: Guilherme Quentel Melo Date: Tue May 10 00:29:58 2016 +0000 glx: avoid memory leak when using indirect rendering When multiple processes are using GL with indirect rendering a race condition can make drawables refcount never drop to zero. This situation could happen when there are many X clients using indirect GLX: 1 - client1: calls glXMakeCurrent 2 - client2: calls glXMakeCurrent This is the first context switch for this client. So old_context_tag=0 3 - client1: calls glXRender For the client, its context is already current. For the server side lastGLContext points to client2's context. Reviewed-by: Adam Jackson Signed-off-by: Guilherme Quentel Melo commit 266cf39a8f108e2f365a9772f4ee4d9fca88eb36 Merge: fa7b70a9b 848089e0d Author: Adam Jackson Date: Mon Jun 20 11:21:40 2016 -0400 Merge remote-tracking branch 'hans/for-master' commit fa7b70a9b895789ec57562bbba0bc052fc91d134 Author: Keith Packard Date: Tue Jun 14 17:36:16 2016 -0700 kdrive: Only enable threaded input if we have input devices When there aren't any devices, the input thread is going to be pretty lonely, so don't bother to even start it. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6f2a5b8cdf7b1e913a1e0581e65195dd10f04ca3 Author: Jason Gerecke Date: Fri Jun 17 08:44:41 2016 -0700 xwayland: Expose all NBUTTONS buttons on the pointer The call to 'InitButtonClassDeviceStruct' which initializes the pointer buttons only results in the first three buttons being created due to a hardcoded '3'. In order to expose all the buttons defined in the btn_labels array, we subtitute 'NBUTTONS' in its place. Signed-off-by: Jason Gerecke Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 72df6e2a3a5020696902b70fe940934ef0a681c4 Author: Jason Gerecke Date: Fri Jun 17 08:44:40 2016 -0700 xwayland: Use correct labels when initializing pointer valuators Signed-off-by: Jason Gerecke Reviewed-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit dab5b3922c50f73712a8ea0cb9742c4bc7d7ab1d Author: Jason Gerecke Date: Fri Jun 17 08:44:39 2016 -0700 xwayland: Fix whitespace errors Substitute a few errant tab characters with eight spaces to conform to the prevailing style. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 848089e0dde38f043c85332785520946103e77c1 Author: Lyude Paul Date: Mon Jun 13 15:31:02 2016 -0400 modesetting: Clear drmmode->fb_id before unflipping [fix copied from 40191d82370e in xf86-video-ati] Without this, we end up setting rotated CRTCs back to their previous framebuffer right after we perform a rotation. Reproducer: - Have two monitors connected at the same resolution - Rotate one monitor from normal straight to inverted - Watch as the monitor you didn't rotate either freezes or shows intense flickering Signed-off-by: Lyude Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 4313122dea0df9affc280ee698e929489061ccc6 Author: Hans de Goede Date: Wed Jun 1 15:14:32 2016 +0200 modesetting: Only add main fb if necessary If we're doing reverse-prime; or doing rotation the main fb is not used, and there is no reason to add it in this case. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 877453212166fdc912e0d687cdecee11aba563b5 Author: Hans de Goede Date: Wed Jun 1 15:11:05 2016 +0200 modesetting: Remove unnecessary fb addition from drmmode_xf86crtc_resize drmmode_set_mode_major() is the only user of drmmode->fb_id and will create it if necessary. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 210d83ad492f0e91889472eaae549106d9b4ebf5 Author: Hans de Goede Date: Wed Jun 1 15:07:22 2016 +0200 modesetting: Set ppix->fb_id to 0 after removing the fb This ensures the fb gets re-added when a shared pixmap is re-used for a second drmmode_set_scanout_pixmap_cpu call. Note currently the xserver never re-uses a shared pixmap in this way, so this is mostly a sanity fix. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit b8ef71fb07a8ba9587aeaca942b4de20b59266ca Author: Hans de Goede Date: Wed Jun 1 14:59:38 2016 +0200 modesetting: Properly cleanup fb for reverse-prime-offload drmmode_set_scanout_pixmap_gpu(pix) adds drmmod->fb_id through a call to drmmode_xf86crtc_resize(), but on a subsequent drmmode_set_scanout_pixmap_gpu(NULL) it would not remove the fb. This keeps the crtc marked as busy, which causes the dgpu to not being able to runtime suspend, after an output attached to the dgpu has been used once. Which causes burning through an additional 10W of power and the laptop to run quite hot. This commit adds the missing remove fb call, allowing the dgpu to runtime suspend after an external monitor has been plugged into the laptop. Note this also makes drmmode_set_scanout_pixmap_gpu(NULL) match the behavior of drmmode_set_scanout_pixmap_cpu(NULL) which was already removing the fb. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 15595d29c2c3992f260a3314f26fa691f1e5cec8 Author: Nikhil Mahale Date: Thu May 26 21:50:16 2016 +0530 randr: Adjust master's last set time with slaves In prime configurations master's last set time may not be latest and greatest, adjust it with slaves last set time, pick up greatest one. Otherwise xserver may end with events which has lastSetTime < lastConfigTime even if that's not the case and confuse xrandr client. [hdegoede: rebase on "xrandrprovider: Do not use separate lists for unbound / source / offload slaves"] Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 5c7af02b103790ac1fb6a71822788892c70290b6 Author: Hans de Goede Date: Fri May 13 15:58:10 2016 +0200 xrandrprovider: Do not use separate lists for unbound / source / offload slaves A single provider can be both a offload and source slave at the same time, the use of seperate lists breaks in this case e.g. : xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 0 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 0 name:modesetting xrandr --setprovideroutputsource 1 0x7b xrandr --listproviders Providers: number : 2 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 1 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 1 name:modesetting xrandr --setprovideroffloadsink 1 0x7b xrandr --listproviders Providers: number : 3 Provider 0: id: 0x7b cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 2 associated providers: 2 name:modesetting Provider 1: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Provider 2: id: 0x46 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 5 associated providers: 2 name:modesetting Not good. The problem is that the provider with id 0x46 now is on both the output_slave_list and the offload_slave_list of the master screen. This commit fixes this by unifying all 3 lists into a single slaves list. Note that this does change the struct _Screen definition, so this is an ABI break. I do not expect any of the drivers to actually use the removed / changed fields so a recompile should suffice. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit bab0f450a719a11799491043b82c2f293fed27fe Author: Chris Wilson Date: Sat Feb 14 09:58:44 2015 +0000 present: Fix presentation of flips out of order The flip queue currently only holds events submitted to the driver for flipping, awaiting the completion notifier. It is short. We therefore can speed up interrupt processing by keeping the small number of events ready to be flipped on the end of the flip queue. By appending the events to the flip_queue in the order that they become ready, we also resolve one issue causing Present to display frames out of order. Signed-off-by: Chris Wilson Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Hans de Goede commit fbe660b7652b945bdd8e3eb0780179d83cc7de96 Author: Chris Wilson Date: Sat Feb 14 09:58:43 2015 +0000 present: Improve scaling of vblank handler With large numbers of queued vblank, the list iteration on every interupt dominates processing time. If we reorder the list to be in ascending event order, then not only is also likely to be in order for notification queries (i.e. the notification will be near the start of the list), we can also stop iterating when past the target event_id. Signed-off-by: Chris Wilson Reviewed-and-tested-by: Mario Kleiner Signed-off-by: Hans de Goede commit c6511d0142040654140bdedd6f03d43af0abba21 Author: Maarten Lankhorst Date: Wed Oct 2 15:47:54 2013 +0200 exa: only draw valid trapezoids Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484 If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly. A similar fix should also be applied to pixman. Signed-off-by: Maarten Lankhorst Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 2d6230e77348e550c90e00c007b113ce38c81d12 Author: Keith Packard Date: Tue Jun 14 17:09:07 2016 -0700 glamor: Use DestroyPixmap instead of FreePicture for glyph atlas pixmap Nice of FreePicture to take a void * instead of a PicturPtr so that this error wasn't caught by the compiler. Noticed when resetting the X server left a dangling pixmap around. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit edd24aa50b17849b904a3ac5429e333bac9bac9c Author: Olivier Fourdan Date: Mon Jun 6 09:22:28 2016 +0200 wayland: clear resource for pixmap on unrealize On cursor unrealize, the associated pixmap is destroyed, make sure we clear the pointer from the private resource and check for the value being non-null when setting or destroying the cursor. Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246 commit 941aeb3b92e644923bd112eef8023f033a140ee6 Author: Olivier Fourdan Date: Fri May 13 08:58:58 2016 +0200 randr: Do not update ConnectionInfo if NULL RRScreenSizeNotify() will update the connection information block, but if this occurs during initialization before ConnectionInfo is even initialized, this will lead to a crash. Simply check for ConnectionInfo prior to update it to avoid the crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6a6bbc3b756706bdade01434f1ee8d8cbe7dd854 Author: Olivier Fourdan Date: Thu May 12 14:51:51 2016 +0200 xwayland: Restore wl_display_roundtrip() in InitInput This partially revert commit 984be78 The rountrip in Xwayland's InitInput() is unlikely the culprit for the crash reported in bug 95337, even though it's triggered from InitInput(). Startup goes like this: xwl_screen_init() xwl_output_create() wl_display_roundtrip() InitInput() wl_display_roundtrip() ConnectionInfo initialized What happens in bug 95337 is that some output data is already available when we reach InitInput()'s wl_display_roundtrip() and therefore we end up trying to update the ConnectionInfo's data from RR routines before ConnectionInfo is actually initialized. Removing the wl_display_roundtrip() from InitInput() will not fix the issue (although it would make it less lileky to happen), because xwl_screen_init() also does a wl_display_roundtrip() after creating the output, so the race that led to bug 95337 remains. However, re-setting the xwl_screen->expecting_event to 0 again in InitInput() still doesn't seem right. so this part is not restored (thus a partial revert). Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 commit 6cb34816afa95d9214199c363f9b4bb5ecbae77b Author: Adam Jackson Date: Fri Apr 29 14:22:52 2016 -0400 xace: Remove the audit hooks and tune dispatch There are no in-tree consumers of the audit hooks, and they are in any case redundant with the dtrace dispatch hooks. Neither is there any in-tree user of the core request dispatch hook. The extension hook is only used for non-default security cases, but in the absence of LTO we always have to take the function call into XaceHookDispatch to find out that there's no callback registered. Cc: Eamon Walsh Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit da9fec4eddd554b4b709ba58b4436aef5a76cd51 Author: Eric Biggers Date: Thu Jun 9 19:45:15 2016 -0500 Allow ConstantDeceleration < 1.0 As documented in xorg.conf(5), a value of ConstantDeceleration between 0 and 1 will speed up the pointer. However, values less than 1 actually had no effect. Fix this. Note that this bug only affected "ConstantDeceleration" as configured through xorg.conf, not "Device Accel Constant Deceleration" as configured through xinput. The property handler AccelSetDecelProperty() also did not need to be changed, as it did not limit the values of the property. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=92766 Signed-off-by: Eric Biggers Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7cf80b9714864c3c4eb9898ff1b7d657ecd16df7 Author: Adam Jackson Date: Wed Jun 1 14:27:23 2016 -0400 xfree86: Don't swallow ±iglx command line flag We want to notice that it's set, but still pass it through to dix. Return 0 to indicate this. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer commit 4653793de3860f2d83a39919af348527bc719794 Author: Olivier Fourdan Date: Wed Jun 8 17:10:11 2016 +0200 wayland: Remove unused field in xwl_screen Can't find any reference of pointer_limbo_window in the code, let's remove it. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit c69bd15e00aea2610834d05f63777f9bf20eca34 Author: Peter Hutterer Date: Wed Jun 1 14:38:54 2016 +1000 Allow compile-time selection of a fallback input driver A new --with-fallback-input-driver=foo option allows selecting a fallback driver for the server if the driver configured for the device is not found. Note that this only applies when the device has a driver assigned and that module fails to load, devices without a driver are ignored as usual. This avoids the situation where a configuration assigns e.g. the synaptics driver but that driver is not available on the system, resulting in a dead device. A fallback driver can at least provides some functionality. This becomes more important as we move towards making other driver true leaf nodes that can be installed/uninstalled as requested. Specifically, wacom and synaptics, a config that assigns either driver should be viable even when the driver itself is not (yet) installed on the system. It is up to the distributions to make sure that the fallback driver is always installed. The fallback driver can be disabled with --without-fallback-input-driver and is disabled by default on non-Linux systems because we don't have generic drivers on those platforms. Default driver on Linux is libinput, evdev is the only other serious candidate here. Sample log output: [ 3274.421] (II) config/udev: Adding input device SynPS/2 Synaptics TouchPad (/dev/input/event4) [ 3274.421] (**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad weird driver" [ 3274.421] (II) LoadModule: "banana" [ 3274.422] (WW) Warning, couldn't open module banana [ 3274.422] (II) UnloadModule: "banana" [ 3274.422] (II) Unloading banana [ 3274.422] (EE) Failed to load module "banana" (module does not exist, 0) [ 3274.422] (EE) No input driver matching `banana' [ 3274.422] (II) Falling back to input driver `libinput' .. server proceeds to assign libinput, init the device, world peace and rainbows everywhere, truly what a sight. Shame about the banana though. Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit a6b6e8ba026acedef6336b17adf06aebddd5f22f Author: Dave Airlie Date: Fri May 6 10:46:14 2016 +1000 prime: clean up slave bo properly. (v3) This is an ABI break, in that we now pass NULL to a function that hasn't accepted it before. Alex Goins had a different patch for this but it wasn't symmetrical, it freed something in a very different place than it allocated it, this attempts to retain symmetry in the releasing of the backing bo. v2: use a new toplevel API, though it still passes NULL to something that wasn't expecting it. v3: pass -1 instead of 0. Signed-off-by: Dave Airlie Tested-by: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Alex Goins commit aa5390aa83be55f887e3b4f78681b4f3d3386eb5 Author: Adam Jackson Date: Mon May 9 14:18:32 2016 -0400 xfree86: Remove redundant parse of AIGLX server flag Not visible in the patch, but the same stanza is repeated below inside the #ifdef GLXEXT. There's no reason to bother with checking it if we built without GLXEXT so remove the unconditional one. Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 166d4c817897f5aa197f639bf06b5b3e04994496 Author: Michel Dänzer Date: Fri Jun 3 10:25:20 2016 +0900 xwayland: Call eglBindAPI after eglInitialize Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Signed-off-by: Michel Dänzer Reviewed-by: Pekka Paalanen commit d798b8318adf298bc23166e74f31e49805f0d881 Author: Michel Dänzer Date: Fri Jun 3 10:25:19 2016 +0900 glamor: Call eglBindAPI after eglInitialize Current Mesa Git master checks that the EGL display actually supports the API passed to eglBindAPI, which can only succeed after eglInitialize. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96344 Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 5bcdd1cc753d8e60c249eeacba695653af1a39d8 Author: Adam Jackson Date: Tue Jun 7 15:52:15 2016 -0400 dix: Update some comments to reflect the new non-SIGIO input model Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 48a9b29b0a09b865492d60e8a7cd2a94864fbb3f Author: Adam Jackson Date: Tue Jun 7 15:52:14 2016 -0400 xfree86: Undocument UseSIGIO in xorg.conf The doc text is wrong at this point, input processing isn't going to vary based on this, so we shouldn't say it does. The only thing this _does_ get used for is DRI1 SwapBuffers (on everything but savage), and if you disable it you're not going to get DRI1 at all, so we really shouldn't even mention it. Still, leave the option wired up to the parser so we don't break any DRI1-driver-using setup relying on it being disabled, and so we don't complain about unused options elsewhere. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 2725dd024de33e96555cbf6ff28184a64d515c3c Author: Adam Jackson Date: Tue Jun 7 15:52:13 2016 -0400 dri1: Hide the SIGIO details from drivers Not being used, and not likely to be useful. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 95ce2bccdcdc88355262674a636c342c946914da Author: Adam Jackson Date: Tue Jun 7 15:52:12 2016 -0400 dmx: Remove SIGIO input support here too This code was broken anyway. Note that DEVICE_OFF would make dmx think _no_ devices were using SIGIO anymore, which means 'xinput disable' on your mouse would probably do weird things to your keyboard too. Rather than try to repair that and keep SIGIO working on this one niche DDX, just rip it out and use the thread model like everyone else. Signed-off-by: Adam Jackson Acked-by: Keith Packard commit 6178b1c91cfc9e860914acc6f0be2f2d2e07a124 Author: Adam Jackson Date: Tue Jun 7 15:52:11 2016 -0400 dix: Use OsSignal() not signal() As the man page for the latter states: The effects of signal() in a multithreaded process are unspecified. We already have an interface to call sigaction() instead, use it. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 8174daa6bd3f0c792425a5ebef63a6a9ce7d00a4 Author: Keith Packard Date: Sun Jun 5 12:32:19 2016 -0700 os: Do timers under input lock, not blocked signals Timer processing can happen on either the main thread or the input thread. As a result, it must be done under the input lock. Signals are unrelated to timers now that SIGIO isn't used for input processing, so stop blocking signals while processing timers. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 88e981e7088198fabea6c322c58f371d91578b6a Author: Olivier Fourdan Date: Wed Mar 9 10:33:50 2016 +0100 xwayland: sync event queue to check compositor reply Read and dispatch pending Wayland events to make sure we do not miss a possible reply from the compositor prior to discard a key repeat. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 26ad25a0ed1d99f3cacb711793c830cb5249580e Author: Olivier Fourdan Date: Wed Mar 9 11:17:27 2016 +0100 xwayland: refactor Wayland event handling To be able to reuse some code. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 239705a6feefaddf90be9541a054ebd8c8c10d81 Author: Olivier Fourdan Date: Wed Mar 9 10:31:58 2016 +0100 xwayland: add a server sync before repeating keys Key repeat is handled by the X server, but input events need to be processed and forwarded by the Wayland compositor first. Make sure the Wayland compositor is actually processing events, to avoid repeating keys in Xwayland while the Wayland compositor cannot deal with input events for whatever reason, thus not dispatching key release events, leading to repeated keys while the user has already released the key. Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=762618 Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit fda5675f9d257d583ea0683adf863c5e1e51e30c Author: Olivier Fourdan Date: Wed Mar 9 10:31:13 2016 +0100 xkb: add hook to allow/deny AccessX key repeat The xserver generates the key repeat by itself. But when used with another server processing inputs first (e.g. a Wayland compositor), the other server may be busy dealing with some other things and not queue up key release events in time. Add a vfunc in XkbSrvInfo to possibly add a check before re-emitting a keypress event in the AccessX timer handler, so that the key repeat has a chance to be denied if the server processing the input is not ready. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer commit 3735ab965a4642273d070840bda4e827991e5219 Merge: 7c77c42fe 43dbc556f Author: Keith Packard Date: Thu Jun 2 07:47:16 2016 -0700 Merge remote-tracking branch 'daenzer/for-master' commit 7c77c42fe87316e5c68611f03b0bda96656c4a4c Author: Keith Packard Date: Fri May 27 17:36:57 2016 -0700 dix: Don't update current time in the middle of input event processing In patch 137ac094e7ab8c871f3b36e40ad826ac797f0e26, Adam moved an expensive call to UpdateCurrentTime out of the main dispatch loop. That's a good change as the original fix from Chase was a bit expensive. However, it breaks grab processing and so a couple of the calls to UpdateCurrenTime need to be removed. Input event processing can generate a stream of events; a button press that activates a grab will send a press followed by a sequence of enter/leave events. All of these should have the same time stamp on the wire as they occur at the 'same' time. More importantly, the grab time recorded in the device is pulled from currentTime after all of the events are delivered, so if currentTime doesn't match the time in the device event, then future grab modifications will fail as the time marked in the device will be 'later' than the grab time known to the client (which is defined as the timestamp from the activating input event). A bit of history here -- it used to be that currentTime was driven *entirely* by input events; those timestamps didn't even have to be related to the system time in any way. Then we started doing ICCCM stuff and people got confused when PropertyNotify events would have the same timestamp even when delivered minutes apart because no input events were delivered. We added code in the server to go update the time, but only if no input events were pending (so that the clock "wouldn't" go backwards). The only places where this is necessary is in request processing which may generate an event with a timestamp, and there only at the very top of the request processing code so that the whole request would be processed at the 'same time', just like events. cc: Chase Douglas cc: Peter Hutterer cc: Adam Jackson Signed-off-by: Keith Packard Tested-by: Michel Dänzer Acked-by: Peter Hutterer commit ce6546337487c052b5dd3c04d3d8d4b09d691c3d Author: Keith Packard Date: Tue May 31 09:38:17 2016 -0700 os: Initialize NotifyFds earlier in startup If the server calls AbortServer during the first-time initialization (which can happen if you start the server on an already using DISPLAY), then the dbus code will shut down and call the notify fd interface. If the notify fd list hasn't been initialized, the server will crash. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f0756793e4c30278164d7a5cc483ce6a311c58dc Author: Keith Packard Date: Tue May 31 09:14:17 2016 -0700 os: Lock input while messing with input device list The list of input devices may be changed by hotplugging while the server is active, and those changes may come from either the main thread or the input thread. That means the list of input devices needs to be protected by a mutex. This prevents input drivers from receiving I/O ready callbacks after removing a device. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit a779fda224bee0c4d27636503367e55ae93b33c2 Author: Jonas Ådahl Date: Tue May 24 18:46:42 2016 +0800 xwayland: Use the CLOCK_MONOTONIC clock By default the X server will try CLOCK_MONOTONIC_COARSE before CLOCK_MONOTONIC, while A Wayland compositor may only support getting their timestamps from the CLOCK_MONOTONIC clock. This causes various issues since it may happen that a timestamp from CLOCK_MONOTONIC retrieved before a sending an X request will still be "later" than the timestamp the X server than gets after receiving the request, due to the fact that CLOCK_MONOTONIC_COARSE has a lower resolution. To avoid these issues, make Xwayland always use CLOCK_MONOTONIC, so that it becomes possible for Wayland compositor only supporting CLOCK_MONOTONIC and X server to use the same clock. Signed-off-by: Jonas Ådahl Acked-by: Daniel Stone Tested-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 43dbc556f3a4d743b9121d6cfc21961be4a9da56 Author: Michel Dänzer Date: Thu Dec 24 16:43:44 2015 +0900 xfree86/modes: Remove xf86_reload_cursors v2 No longer needed now that xf86CursorResetCursor is getting called for each CRTC configuration change. v2: Keep xf86_reload_cursors as a deprecated empty inline function until all drivers stop calling it. (Adam Jackson) Reviewed-by: Adam Jackson commit e156c0ccb530897d3a428255bd5585f7ea7b9b41 Author: Michel Dänzer Date: Wed Mar 30 18:23:04 2016 +0900 os: Use strtok instead of xstrtokenize in ComputeLocalClient Fixes leaking the memory pointed to by the members of the array returned by xstrtokenize. Reviewed-by: Adam Jackson commit 5ff75da317539e87cca429185d710d0eeb9d9222 Author: Michel Dänzer Date: Thu May 26 19:01:59 2016 +0900 glamor: Cannot use copies when accessing outside of composite source Commit b64108fa ("glamor: Check for composite operations which are equivalent to copies") failed to copy conditions from exaComposite which ensure that the composite operation doesn't access outside of the source picture. This fixes rendercheck regressions from the commit above. Reviewed-by: Keith Packard commit 84e0d5d63c393fc36e91433cd7897e776e82528c Author: Michel Dänzer Date: Fri May 27 16:58:19 2016 +0900 xfree86/modes: Assign xf86_config->cursor in xf86_load_cursor_image v2 Fixes a crash on startup in the radeon driver's drmmode_show_cursor() due to xf86_config->cursor == NULL, because no CRTC was enabled yet, so xf86_crtc_load_cursor_image was never called. (Also use scrn->pScreen instead of xf86ScrnToScreen(scrn)) v2: Set xf86_config->cursor at the beginning of xf86_load_cursor_image instead of at the end. Reviewed-by: Keith Packard commit 28b2c880a9dbfd91e82397a0f22482d258a8b670 Author: Keith Packard Date: Sun May 29 19:11:50 2016 -0700 xfree86: Provide xf86BlockSIGIO and xf86ReleaseSIGIO as wrappers for input mutex Threaded input doesn't use SIGIO anymore, but existing drivers using xf86BlockSIGIO and xf86ReleaseSIGIO probably want to lock the input mutex during those operations. Provide inline functions to do this which are marked as 'deprecated' so that drivers will get warnings until they are changed. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 2bed654be7001407ae65f7128440340fd3c1f083 Author: Keith Packard Date: Sun May 29 19:05:13 2016 -0700 dix: Remove bogus input_mutex and input_mutex_count definitions from globals.c These are local to inputthread.c; the ones in globals.c aren't declared in any header file. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 06bdc3bc1aeca2635d0f711ac7eef34796e28339 Author: Keith Packard Date: Sun May 29 01:14:59 2016 -0700 os: fix input_mutex_count off-by-one in input_force_unlock input_force_unlock was mis-using input_mutex_lock and leaving it set to -1. As this is executed from OsInit at each server generation, on the second time through, the mutex would be left locked (!) due to the trylock call. This caused input to fail after the first server reset. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit de3620065945f199a203afb831cac99bb8bff75b Author: Keith Packard Date: Fri May 27 17:51:01 2016 -0700 xfree86: Remove event reading code from xf86Wakeup Oops. This didn't get removed when xfree86 was converted over to use the input thread. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit c9703007ea77a8aa5aba4e7bc7367814526056fe Author: Keith Packard Date: Sat May 28 10:34:07 2016 -0700 Add ax_pthread.m4 to m4/ Threaded input requires AX_PTHREAD, which is provided by this file. Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit c07b796b47ae7f5a616d5e8e02ab0f84dc438a93 Author: Keith Packard Date: Sun May 29 18:38:18 2016 -0700 xfree86: Bump ABI versions threaded input can affect drivers that use OsBlockSIGIO when dealing with cursors. Signed-off-by: Keith Packard Requested-by: Peter Hutterer commit 24e4c6db25aef7a057f3f384f1e2ce67e66fa40e Author: Keith Packard Date: Sun May 29 18:43:00 2016 -0700 test: Actually verify that two equivalent touch points are the same I typo'd when fixing this at Peter's request and left off the '2' from the second variable name. Signed-off-by: Keith Packard commit 1338bfa81c6eddc66f07c15225c3feff062182ce Author: Keith Packard Date: Fri May 27 01:56:39 2016 -0700 test: Make touch test reflect new ability to realloc touch array [v2] Threaded input allows the input code to call malloc while processing events. In this case, that's in the middle of processing touch events and needing to resize the touch buffer. This test was expecting the old behaviour where touch points would get dropped if the buffer was full. The fix is to check for the new behaviour instead. [v2] * make sure two finding two equivalent touches return the same touch object * check to make sure the queue resizes by the expected amount Changes provided by Peter Hutterer Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 8b9b4387e8473810f6174519ee76818fcaae725d Author: Keith Packard Date: Fri May 27 10:55:02 2016 -0700 glamor: Adjust for drawable x/y in composite's copy optimization Patch b64108fa305e956e4edaae9d53071ff0abee268e added a short cut that identifies composite operations that can be performed with a simple copy instead. glamor_copy works in absolute coordinates, so the dx and dy values passed in need to be converted from drawable-relative to absolute by adding the drawable x/y values. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 0d16a0c3b95d4ac446a07d8b95e634de5cb8055f Author: Keith Packard Date: Thu May 26 10:22:17 2016 -0700 os: Increase default client buffer to 16kB This matches a change made in xcb and improves performance for a small increase in memory usage. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 714736124f2bfba9ede076eff3bf017f986ce6c4 Author: Keith Packard Date: Fri May 27 02:02:48 2016 -0700 modesetting: Use new xf86CurrentCursor API Use this instead of the (now deprecated) cursor pointer in the xf86CrtcConfigRec. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit e69061e605c66084056cf2064dcc5d4c6c8aa0cf Author: Keith Packard Date: Tue Dec 8 14:26:50 2015 -0800 kdrive: Use threaded input Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit a977c9c4d07a04c0c7b3713a21eefb92a8d3005b Author: Keith Packard Date: Tue Dec 8 14:53:08 2015 -0800 xfree86: Use threaded input mechanism [v2] Switch the XFree86 DDX over to threaded input v2: Rewrite comment in xf86Helper about silken mouse Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit f84703b50cc908a127f4ad923ebbf56f8f244c0d Author: Keith Packard Date: Tue Dec 8 14:20:21 2015 -0800 dix: Reallocate touchpoint buffer at input event time [v2] Now that input is threaded, malloc can be used at event time to resize the touchpoint buffer as needed.x v2: Remove "Need to grow the queue means dropping events." from comment as it no longer applies. (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit e2df803fcabd7c2d2fc7991c794856378dcb5489 Author: Keith Packard Date: Tue Dec 8 19:53:36 2015 -0800 mi: Grow event queue while reading events Now that events are read at normal process time, we can use malloc to grow the event queue instead of discarding events. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 30ac7567980a1eb79d084a63e0e74e1d9a3af673 Author: Keith Packard Date: Tue Dec 8 11:37:51 2015 -0800 Create a threaded mechanism for input [v7] The current SIGIO signal handler method, used at generation of input events, has a bunch of oddities. This patch introduces an alternative way using a thread, which is used to select() all input device file descriptors. A mutex was used to control the access to input structures by the main and input threads. Two pipes to emit alert events (such hotplug ones) and guarantee the proper communication between them was also used. Co-authored-by: Fernando Carrijo Signed-off-by: Tiago Vignatti v2: Fix non-Xorg link. Enable where supported by default. This also splits out the actual enabling of input threads to DDX-specific patches which follow v3: Make the input lock recursive v4: Use regular RECURSIVE_MUTEXes instead of rolling our own Respect the --disable-input-thread configuration option by providing stubs that expose the same API/ABI. Respond to style comments from Peter Hutterer. v5: use __func__ in inputthread debug and error mesages. Respond to style comments from Peter Hutterer. v6: use AX_PTHREAD instead of inlining pthread tests. Suggested by Emil Velikov v7: Use pthread_sigmask instead of sigprocmask when using threads Suggested by Adam Jackson Signed-off-by: Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 728c9570a05f03bd90343ff6f5b1a8fd3988864c Author: Keith Packard Date: Wed Dec 9 14:27:05 2015 -0800 xkb: Hold input lock across injected key event processing This makes the code more consistent with other versions of out-of-queue event processing Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 05d549d60440126105d5a70272e72ea2319724bd Author: Keith Packard Date: Thu Dec 17 22:21:46 2015 -0800 xfree86: Remove unnecessary errno save/restore in xf86ReadInput When this code was called from SIGIO, saving and restoring errno could possibly have made sense in some strange environment. Now that this will not be called from a signal handler, there is no reason to do that. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 0bbb5aabf794720fa99ae5ea3f55138ded159705 Author: Keith Packard Date: Mon May 16 21:33:41 2016 -0500 kdrive: Don't lock input across read in KdNotifyFd We won't need these locks with the new threaded input code as it holds the input lock across all of the input device I/O operations. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99 Author: Keith Packard Date: Tue Dec 8 14:39:46 2015 -0800 Remove SIGIO support for input [v5] This removes all of the SIGIO handling support used for input throughout the X server, preparing the way for using threads for input handling instead. Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls to stub functions input_lock/input_unlock so that we don't lose this information. xfree86 SIGIO support is reworked to use internal versions of OsBlockSIGIO and OsReleaseSIGIO. v2: Don't change locking order (Peter Hutterer) v3: Comment weird && FALSE in xf86Helper.c Leave errno save/restore in xf86ReadInput Squash with stub adding patch (Peter Hutterer) v4: Leave UseSIGIO config parameter so that existing config files don't break (Peter Hutterer) v5: Split a couple of independent patch bits out of kinput.c (Peter Hutterer) Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 8cf832c288dec13cbf3c25478a8ccef52d61f3db Author: Keith Packard Date: Mon May 16 21:28:48 2016 -0500 kdrive: Remove unneeded AddEnabledDevice/RemoveEnabledDevice calls kdrive uses the NotifyFd interface, which handles all of the necessary fd configuration in the OS layer. Having it also use the old EnableDevice interfaces is incorrect. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 4fca18dc03669bada75175df289fbee41275208e Author: Adam Jackson Date: Mon May 9 13:28:08 2016 -0400 xfree86: Add IndirectGLX server flag (v2) Not all display managers make it easy (or possible) to modify the command line flags passed to the server, so add a way to get to it from xorg.conf. v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan Coopersmith) Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 181a4bd0cc436f89582408196038ff37032f9bac Author: Keith Packard Date: Fri May 13 16:19:38 2016 -0700 glamor: Preserve GL_RED bits in R channel when destination is GL_RED [v2] A1 and A8 pixmaps are usually stored in the Red channel to conform with more recent GL versions. When using these pixmaps as mask values, that works great. When using these pixmaps as source values, then the value we want depends on what the destination looks like. For RGBA or RGB destinations, then we want to use the Red channel for A values and leave RGB all set to zero. For A destinations, then we want to leave the R values in the Red channel so that they end up in the Red channel of the output. This patch adds a helper function, glamor_bind_texture, which performs the glBindTexture call along with setting the swizzle parameter correctly for the Red channel. The swizzle parameter for the Alpha channel doesn't depend on the destination as it's safe to leave it always swizzled from the Red channel. This fixes incorrect rendering in firefox for this page: https://gfycat.com/HoarseCheapAmericankestrel while not breaking rendering for this page: https://feedly.com v2: Add change accidentally left in patch for missing glDisable(GL_COLOR_LOGIC_OP). Found by Emil Velikov Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63397 Signed-off-by: Keith Packard Tested-by: Michel Dänzer commit b07bc700b3cf2f5c8912fc5b9e0dad2baf395525 Author: Keith Packard Date: Sat May 14 08:22:17 2016 -0700 glamor: glamor_make_current sooner in glamor_composite_with_shader glamor_make_current is supposed to be called before any GL APIs. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit 743b6f231e999d8b2909228412266dc13cc433c5 Author: Keith Packard Date: Fri May 13 04:25:43 2016 -0700 glamor: Disable logic ops when doing compositing [v4] If the logic op gets left enabled, it overrides the blending operation, causing incorrect contents on the display. v2: Disable only on non-ES2, but disable even for PictOpSrc v3: Found another place this is needed in glamor_composite_set_shader_blend v4: Remove change dependent on new glamor_set_composite_texture API. This belongs in a different patch. Found by Emil Velikov Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit f5670b4a7eb3b43fa20017f89192394930eae6f4 Author: Keith Packard Date: Wed Mar 9 11:13:14 2016 -0800 xfree86: Set xf86CrtcConfigRec cursor pointer to NULL in HideCursor This makes the cursor pointer held by xf86Cursors.c get reset to NULL whenever the cursor isn't displayed, and means that the reference count held in xf86Cursor.c is sufficient to cover the reference in xf86Cursors.c. As HideCursor may be called in the cursor loading path after UseHWCursor or UseHWCursorARGB when HARDWARE_CURSOR_UPDATE_UNHIDDEN isn't set in the Flags field, the setting of the cursor pointer had to be moved to the LoadCursor paths. LoadCursorARGBCheck gets the cursor pointer, but LoadCursorImageCheck does not. For LoadCursorImageCheck, I added a new function, xf86CurrentCursor, which returns the current cursor. With this new function, we can eliminate the cursor pointer from the xf86CrtcConfigRec, once drivers are converted over to use it. Signed-off-by: Keith Packard Acked-by: Peter Hutterer commit b64108fa305e956e4edaae9d53071ff0abee268e Author: Michel Dänzer Date: Wed May 25 19:09:23 2016 +0900 glamor: Check for composite operations which are equivalent to copies Increases x11perf -compwinwin500 numbers by a factor of 10 for me with radeonsi. Conditions copied from exaComposite(). Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 4711ebc174206b5a50e6ae8a7f974cd835e4ebd3 Author: Michel Dänzer Date: Tue May 24 18:12:42 2016 +0900 glamor: Fix sampling outside of RGBx source/mask pictures RENDER requires that sampling outside of any source/mask picture results in alpha == 0.0. The OpenGL border colour cannot set alpha = 0.0 if the texture format doesn't have an alpha channel, so we have to use the RepeatFix handling in that case. Also, only force alpha = 1.0 when sampling inside of RGBx source/mask pictures. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94514 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 4d649d51770cace4d7c1e51d9a199ac7a056c30a Author: Keith Packard Date: Wed May 18 16:03:48 2016 -0500 mi: Remove miPointerRec from API This moves the definition of miPointerRec from mipointrst.h to mipointer.c so that it is no longer visible in the API, allowing it to be changed while the API/ABI is frozen. Reviewed-by: Pekka Paalanen Signed-off-by: Keith Packard commit 3f9015b6dc9e7e9c97f8717dea6af9f4d8523f2e Author: Keith Packard Date: Wed May 18 16:03:47 2016 -0500 xwayland: Move sprite invalidation logic into mipointer This creates a function that invalidates the current sprite and forces a sprite image reload the next time the sprite is checked, moving that logic out of the xwayland sources and allowing the miPointerRec structure to be removed from the server API. Signed-off-by: Keith Packard Reviewed-by: Pekka Paalanen commit 4e124203f2260daaf54155f4a05fe469733e0b97 Author: Adam Jackson Date: Tue May 3 11:24:58 2016 -0400 damage: Make damageRegionProcessPending take a damage not a drawable In the case where there's no damage monitor on the drawable, we look that fact up twice: once before rendering to decide whether to compute damage, and again after to decide whether to append it. This is wasted effort, as the layer below us is effectively not allowed to change whether there's a damage monitor for the drawable, but there's no way the compiler can know that. Instead, look it up once up front, and change the check macros and damageRegionProcessPending to take a damage not a drawable. v2: Explicitly pass pDamage to the macros as well (Michel Dänzer) Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 1bb932bf1417ff319a594d7e40f6813a26936784 Author: Jeremy Huddleston Sequoia Date: Sat May 7 00:43:33 2016 -0700 XQuartz: Fix default CFBundleVersion m4/shell variable name collision broke the case when the configure option was not used Signed-off-by: Jeremy Huddleston Sequoia commit 2fbf5c2f91d33efbda573c4be036248b1d8ed7f1 Author: Andrew Comminos Date: Tue Dec 29 23:41:27 2015 -0800 Input: Send XI2 FocusOut NotifyPointer events to the pointer window. This changes XInput 2's propagation of NotifyPointer focus out events to include the pointer window as well, similar to core events. This fixes a potential permanent focus in GDK when the focus moves to PointerRoot. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93539 Signed-off-by: Andrew Comminos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 984be789d5935bc7f695dc61234ef0251ed33679 Author: Olivier Fourdan Date: Wed May 11 09:15:19 2016 +0200 xwayland: don't check events as early as InitInput If data is received during XWayland startup, it will be read early in InitInput() before the connection data is initialized, causing a crash. Remove the wayland rountrips from InitInput() as this is done again in xwl_screen_init() where it seems more appropriate. Signed-off-by: Olivier Fourdan Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95337 Reviewed-by: Adam Jackson commit 3f569435e10df515c6f86289dc986bfc59c6bc18 Author: Adam Jackson Date: Thu Mar 31 16:56:44 2016 -0400 glx: Stop tracking hasUnflushedCommands This is only meaningful for indirect contexts, and all it does is (maybe) prevent a flush when switching away from an indirect context. Indirect contexts aren't worth optimizing for, and Mesa tracks whether a flush is needed anyway. Careful readers will note that ReadPixels would reset the flag even though it doesn't imply a flush! Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0ebb58f6b6f66afbc3a48bd10693fe190aed8694 Author: Adam Jackson Date: Thu Mar 31 16:20:40 2016 -0400 glx: Remove some redundant zero-init of GLX context state The context is already calloc'd. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d5ba09598210063926aeff55ac58d2b7020d9a03 Author: Adam Jackson Date: Thu Mar 31 15:51:39 2016 -0400 glx/dri2: Implement dri2FlushFrontBuffer explicitly No functional change. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0ba4e251a1012bd5a2eab83e2c51006ec3805394 Author: Adam Jackson Date: Thu Mar 31 15:50:34 2016 -0400 glx: Code motion No functional change, just rearranging some code to make later commits more obvious. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f523ebb5492a2e12b76a8b5b7f1b0e5efd4a8040 Author: Adam Jackson Date: Mon Apr 18 12:56:17 2016 -0400 dix: Remove pointless client-state callbacks Private storage is pre-zeroed by the private system itself. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 140c2f1a54dbc2503311e9a011e841aa1f277cbd Author: Michel Dänzer Date: Fri Apr 1 18:24:00 2016 +0900 EXA: Honour op parameter to exaGlyphs even if maskFormat == NULL Reported-by: Uli Schlachter Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94775 Signed-off-by: Michel Dänzer Reviewed-by: Uli Schlachter commit 7f0494671f95cfa33f6f2c7c74b20a21f239f8c5 Author: Dave Airlie Date: Fri May 6 05:41:58 2016 +1000 modesetting: fix build with glamor disabled. Fix build without --enable-glamor. Caught by the arm tinderbox. Signed-off-by: Dave Airlie Reviewed-by: Mark Kettenis Tested-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 66fdeb880aac0966be9aa41219047ade0148c35f Author: Emil Velikov Date: Mon May 2 23:47:22 2016 +0100 xfree86: drop unneeded strdup for modulepath/logfile The destination variable is never freed, thus we even plug some memory leaks. v2: Rebase against updated xf86CheckPrivs() helper. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 032b1d79b7d04d47814a5b3a9fdd162249fea74c Author: Emil Velikov Date: Mon May 2 23:47:21 2016 +0100 xfree86: use the xf86CheckPrivs() helper for modulepath/logfile v2: Rebase against updated xf86CheckPrivs() helper. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 0fdd47560468e7b6147c666cc6b9eebcecb68572 Author: Emil Velikov Date: Mon May 2 23:47:20 2016 +0100 xfree86: factor out the check priviliges and print a big warning Current message was quite off "file specified must be a relative path" and alike. Just factor it out and use "path/file" as needed. v2: Rework error message, drop "Using default", print actual arg value. Reviewed-by: Adam Jackson Signed-off-by: Emil Velikov commit 2378adde6770385c06f7efcd32f270d00d49ce3f Author: Dave Airlie Date: Fri Apr 29 14:01:33 2016 +1000 modesetting: set capabilities up after glamor and enable offload caps. This moves the capabilites setting to after glamor is initialised, and enables the offload caps in cases where they work. This enables DRI2 PRIME support with modesetting. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 258588224d6b35de12f97d9092efa5cb3e426550 Author: Dave Airlie Date: Fri Apr 29 14:01:32 2016 +1000 xf86Crtc: don't set the root window property on slave GPUs. Slave GPUs don't have a root window to set this on, so don't. This fixes some crashes I saw just playing around. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit a41a171bcbae9aeafac2865faa904f15d9b59925 Author: Dave Airlie Date: Fri Apr 29 14:01:31 2016 +1000 modesetting: set driverPrivate to NULL after closing fd. Otherwise ms_ent_priv will return NULL and things will fall apart. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit fc1f61b75c9712e24ff665f95d62771f39eba1c7 Author: Dave Airlie Date: Fri Apr 29 14:01:30 2016 +1000 randr/provider: only allow slave gpu to be offload sources. The other way around makes no sense. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 2d0f151c6195ba94d0320b55227a108e6301a74c Author: Alex Goins Date: Fri Apr 29 14:01:29 2016 +1000 modesetting: Consistent whitespace in driver.c For some reason a couple of the dirty functions in driver.c used 8 spaces per tab instead of 4 like the rest of the file. Fix this to make it more consistent and give me more room to work in ms_dirty_update in subsequent commits. v1: N/A v2: N/A v3: N/A v4: Initial commit Signed-off-by: Alex Goins Reviewed-by: Dave Airlie Reviewed-by: Alex Deucher commit 137ac094e7ab8c871f3b36e40ad826ac797f0e26 Author: Adam Jackson Date: Fri Apr 1 22:44:26 2016 -0400 dix: Push UpdateCurrentTimeIf down out of the main loop This was added in: commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop Unfortunately this is equivalent to calling GetTimeInMillis() once per request. In the absolute best case (as on Linux) you're only hitting the vDSO; on other platforms that's a syscall. Either way it puts a pretty hard ceiling on request throughput. Instead, push the call down to the requests that need it; basically, grab processing and event generation. Cc: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit ac164e58870d70640381e68b776eb95578c7fbd3 Author: Peter Hutterer Date: Wed May 4 20:36:18 2016 +1000 xkb: after changing the keymap, force an indicator update When NumLock is on and a new keymap is applied, the next modifier state change will turn off that LED (but leave the state enabled). The cause for this is a bit convoluted: * the SLI explicitState is copied from the current state in ProcXkbGetKbdByName. Thus, if NumLock is on, that state is 0x2. * on the next modifier key press (e.g. Shift), XkbApplyState() calls into XkbUpdateIndicators() -> XkbUpdateLedAutoState() to update SLIs (if any) for the currently changed modifier. But it does so with a mask only for the changed modifier (i.e. for Shift). * XkbUpdateLedAutoState() calculates the state based on this mask and ends up with 0 because we don't have a Shift LED and we masked out the others. * XkbUpdateLedAutoState() compares that state with the previous state (which is still 0x2) and then proceeds to turn the LED off This doesn't happen in the normal case because either the mask encompasses all modifiers or the state matches of the masked-out modifiers matches the old state. Avoid this issue by forcing an SLI update after changing the keymap. This updates the sli->effectiveState and thus restores everything to happy working order. https://bugzilla.redhat.com/show_bug.cgi?id=1047151 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 059d5ef30490233f410ca87084c7697b87e5b05e Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:43:06 2016 -0700 XQuartz: Update copyright years Signed-off-by: Jeremy Huddleston Sequoia commit d6ba4f2c52da150a9a92bdb00efe7902d17033bd Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:42:34 2016 -0700 XQuartz: Add --with-bundle-version and --with-bundle-version-string configure options Signed-off-by: Jeremy Huddleston Sequoia commit c1614928c10a8f8400f99acfd1b7f96d503af7ec Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:21:38 2016 -0700 XQuartz: Add --with-sparkle-feed-url configure option Signed-off-by: Jeremy Huddleston Sequoia commit 299b01eabf827a7435b5d6004d50637ac710bbc7 Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:14:24 2016 -0700 XQuartz: Update release feed URL to use new https URL Signed-off-by: Jeremy Huddleston Sequoia commit 16d6733c63727d910eb516d7f6950f4675281f2d Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:24:44 2016 -0700 XQuartz: Fix the help text for --with-bundle-id-prefix Signed-off-by: Jeremy Huddleston Sequoia commit 214a66b661dcb56ebb9776e34049753f65c7510a Author: Jeremy Huddleston Sequoia Date: Tue May 3 23:16:46 2016 -0700 XQuartz: Remove --with-launchd-id-prefix It's been deprecated for years. Signed-off-by: Jeremy Huddleston Sequoia commit 2285fe78c04714561a0d1a164a41a38c48263f89 Author: Peter Hutterer Date: Fri Apr 22 15:04:37 2016 +1000 xfree86: add support for MatchIsTabletPad The tablet pads have been separate kernel devices for a while now and libwacom has labelled them with the udev ID_INPUT_TABLET_PAD for over a year now. Add a new MatchIsTabletPad directive to apply configuration options specifically to the Pad part of a tablet. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit fa02b05645080c285da5972262a8d37403e39d7e Author: Dave Airlie Date: Tue May 3 06:54:57 2016 +1000 modesetting: port clean start code from amdgpu. (v2) Both radeon and amdgpu don't set the mode until the first blockhandler, this means everything should be rendered on the screen correctly by then. This ports this code, it also removes the tail call of EnterVT from ScreenInit, it really isn't necessary and causes us to set a dirty mode with -modesetting always anyways. v2: reorder set desired modes vs block handler as done for amdgpu. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit caabc4e85540dcd4225f2780b5616f7d870fbb06 Author: Dave Airlie Date: Tue May 3 06:54:56 2016 +1000 modesetting: add support for background none. This adds support using glamor for background None. loosely based off the amdgpu code. relies on the glamor_finish code. Acked-by: Eric Anholt Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit c33250945b45adc447154239f0cf48fb9b2d7335 Author: Adam Jackson Date: Fri Apr 8 11:26:36 2016 -0400 kdrive: Nuke a bunch of dead code gcc6 says: keyboard.c:46:21: warning: ‘linux_to_x’ defined but not used Only referenced by a bunch of long if-0'd code, so chuck it all out. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit a5dd7b890f4f3a5245639591c73303c5a087b38a Author: Adam Jackson Date: Fri Apr 8 11:24:50 2016 -0400 dix: Squash some new gcc6 warnings -Wlogical-op now tells us: devices.c:1685:23: warning: logical ‘and’ of equal expressions Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 23dfa017298ceceac818f83779858e490c7757b6 Author: Andreas Schwab Date: Thu Apr 28 14:47:33 2016 +0200 x86emu: Change include order to avoid conflict with system header R_SP is also defined in on m68k. Also remove duplicate definitions. Reviewed-by: Adam Jackson Signed-off-by: Andreas Schwab commit aa4e757130010dd3202f10ec6cb0c306c1dbcfbc Author: Dave Airlie Date: Fri Mar 11 09:22:00 2016 +1000 glamor: add glamor_finish API Some drivers are calling glFinish, they really should be doing this. This also is needed for some reverse prime scenarios. Signed-off-by: Dave Airlie Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt commit f48b0534f110397246809d279225afedb28aa233 Author: Marek Chalupa Date: Mon Apr 25 11:33:00 2016 +0200 xwayland-shm: fortify fallocate against EINTR If posix_fallocate or ftruncate is interrupted by signal while working, we return -1 as fd and the allocation process returns BadAlloc error. That causes xwayland clients to abort with 'BadAlloc (insufficient resources for operation)' even when there's a lot of resources available. Fix it by trying again when we get EINTR. Signed-off-by: Marek Chalupa Reviewed-by: Pekka Paalanen commit 4cc32880737c2d3e568fdb4867b2dba10fb3998a Author: Alexandre Courbot Date: Wed Mar 23 13:47:37 2016 +0900 configure.ac: Keep environment CFLAGS when testing DRI2 detection could fail if configure is invoked with a sysroot passed as CFLAGS. Ideally configure should invoke gcc with the sysroot argument passed to the configure script, but for some reason this is not done by AC_COMPILE_IFELSE. Fix this by ensuring CFLAGS are preserved when checking for stuff. Signed-off-by: Alexandre Courbot Reviewed-by: Emil Velikov commit 16e4bce9e5257c50c80c66efee0d07c2483619e1 Author: Simon Thum Date: Fri Apr 8 13:24:39 2016 +0200 dix/ptraccel: Remove float literals This was fine back when valuators were integer. Device properties are float (not double), so some instances remain. Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c8e5fc30575a309c25970fc68b9184c07bb74df4 Author: Simon Thum Date: Tue Apr 5 14:29:47 2016 +0200 dix/ptraccel: Fix memory leak in InitPredictableAccelerationScheme This was quite unlikely except in situations where a proper startup would have been impossible anyway, but since automated checks don't grade likelyhood just fix it. Detected by Jeremy Huddleston's clang checks. Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f641ae412287ecb7a3437987e2ba1646a8443aa4 Author: Peter Hutterer Date: Wed Mar 9 10:45:48 2016 +1000 Xi: don't deliver emulated motion events for non-emulating touches The touchpoint knows whether it should be emulating or not and we have a check for that later. Check for this before we generate the event and try to deliver it, lest we trigger a bug warning. https://bugzilla.redhat.com/show_bug.cgi?id=1282252 Signed-off-by: Peter Hutterer commit 577bebe2067293bb154068e99a2ef085b066cb67 Author: Emil Velikov Date: Sun Apr 17 20:30:46 2016 +0100 xfree86/parser: simplify #ifdef ladder Rather than 'hacking' around symbol names and providing macros such as 'Local' just fold things and make the code more readable. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 537276a5b86b7341169ea4eb36d479a503ba5d84 Author: Emil Velikov Date: Sun Apr 17 20:30:45 2016 +0100 xfree86/parser: reuse StringToToken() in xf86getToken() Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit 944ea03d5be2ffe22a3f1c4c287760261c31235f Author: Emil Velikov Date: Sun Apr 17 20:30:44 2016 +0100 xfree86/parser: move StringToToken() definition further up ... so that we can use it without the forward declaration. Plus we're doing to reuse it in the next commit ;-) Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit b93be14b7d339e4e46d941729dad853452fae8c0 Author: Emil Velikov Date: Sun Apr 17 20:30:43 2016 +0100 xfree86/parser: annotate xf86ConfigSymTabRec as constant data Add the const notation to all the static storage as well as the functions that use it - xf86getToken(), xf86getSubTokenWithTab(), StringToToken() and xf86getStringToken(). Reviewed-by: Alex Deucher Signed-off-by: Emil Velikov commit 3981dcdd489b60fbf356534a509ca93dcbedf769 Author: Emil Velikov Date: Sun Apr 17 20:34:43 2016 +0100 dri3: remove unused file dri3int.h Copied during the prototyping stage and never used. Cc: Keith Packard Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a1b13cda6169a98d694451fec75e63352e9d90bd Author: Adam Jackson Date: Wed Jan 6 09:09:21 2016 -0500 xfree86: Remove xf86RegisterRootWindowProperty All consumers have been ported to the root window callback, so this can all be nuked. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit e89c7f1c2a0ea3480b21446e413073c1427285ae Author: Adam Jackson Date: Wed Jan 6 09:04:15 2016 -0500 xfree86: Create EDID atom from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8e3010d7d8e8c49c8859b576de1808ae7b2859be Author: Adam Jackson Date: Wed Jan 6 08:54:47 2016 -0500 xfree86: Remove a never-hit diagnostic message Practically speaking, the EDID major version is never not 1. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 7961377567f15dfad9d96c5c0a0992b38013d973 Author: Adam Jackson Date: Wed Jan 6 08:47:37 2016 -0500 xfree86: Make xf86SetDDCproperties work more than once (v2) We can call this more than once via xf86OutputSetEDID since hotplug is actually a thing in RANDR 1.2, but xf86RegisterRootWindowProperty merely adds the data to a list to be applied to the root at CreateWindow time, so calls past the first (for a given screen) would have no effect until server regen. Once we've initialised pScrn->pScreen is filled in, so we can just set the property directly. v2: Removed pointless version check, deobfuscate math (Walter Harms) Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8be83fff04a009109a956837ca983a96fd279711 Author: Adam Jackson Date: Wed Jan 6 08:35:43 2016 -0500 xfree86: Remove some leftovers from DisplayID support Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 0cd2a24b61ef1583fc6b3fec7d01c7481cc97d52 Author: Adam Jackson Date: Wed Jan 6 08:30:07 2016 -0500 xfree86: Unexport xf86Initialising, remove xf86ServerIsInitialising Neither of these are used from outside the server. Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit e70ee11a39b957141fbc565d79d128a46fac5f34 Author: Adam Jackson Date: Tue Jan 5 16:27:41 2016 -0500 xfree86: Create VT atoms from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit da9ee1eddd65d00788cef8a3becfad948c0a2168 Author: Adam Jackson Date: Tue Jan 5 16:11:42 2016 -0500 xfree86: Create seat atom from the root window callback (v2) v2: Fix swapped callback args Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 2c3a3afb5104714b637c1c4aea195df73e0fa918 Author: Adam Jackson Date: Tue Jan 5 15:56:42 2016 -0500 dix: Add RootWindowFinalizeCallback Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 8437955515ad59b0bfcd6598248e7f0ffc706370 Author: Olivier Fourdan Date: Thu Mar 17 09:53:58 2016 +0100 glamor: fix wrong offset on composite rectangles When using PictOpSrc, the destination is wrongly shifted back to (0, 0). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94568 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit e8e5d839968e22cf42a6e1982a07b02c6f4a4562 Author: Olivier Fourdan Date: Fri Apr 1 13:38:11 2016 +0200 xwayland: Fix compiler warning in GLAMOR Xv XvWindowMask is defined as 0x00020000 and cannot fit in the XvAdaptor type which is defined as an unsigned char, thus causing a compiler warning: xwayland-glamor-xv.c: In function ‘xwl_glamor_xv_add_adaptors’: xwayland-glamor-xv.c:339:16: warning: large integer implicitly truncated to unsigned type [-Woverflow] This XvWindowMask value is actually not used for XvAdaptor itself but by the server in its xf86xv implementation, so we don't even need that mask in our xwayland-glamor-xv implementation. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f9b5bbaa3a7fce1a4efb2084b8d9d82b98d4ee83 Author: Peter Hutterer Date: Tue Mar 8 15:42:42 2016 +1000 xkb: fix SlowKeys release/reject beeps Wrong use of the mask here caused a beep whenever a key was rejected but also when it was released after being accepted. Fix the mask to check for the correct enabled controls. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit a6288f0954cf97499e78849a87847062ee962c17 Author: Jon Turney Date: Tue Nov 3 19:07:43 2015 +0000 hw/xwin: xcbify internal window manager Convert the code for the multiwindow mode internal window manager to xcb xcb conversion avoids xlib/xserver namespace collision and _XSERVER64 type sizing issues v2: Various fixes v3: Don't include X11/extensions/windowswmstr.h, which uses the Display type and thus depends on Xlib.h, just for _WINDOWSWM_NATIVE_HWND v4: Fix indentation, add some error handling. Fix a bug with ConfigureNotify handling v5: Fix a bug which prevented WM_NORMAL_HINTS from being checked Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8114b8127f01fc81390fc13e3d09bcc50e41a66f Author: Jon Turney Date: Wed Jul 1 16:30:36 2015 +0100 hw/xwin: In multiwindow mode, do window minimization entirely in the WM Remove winMinimizeWindow(), implement as UpdateState() in the WM instead, which uses getHwnd() to map a Window XID to a HWND (like everything else in the WM), rather than peering into the servers internal data structures. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 6a64b9d7af70dc7ff2cac8b35a1f7b0797823733 Author: Jon Turney Date: Mon Nov 2 17:55:19 2015 +0000 hw/xwin: xcbify code for converting X11 icon to Win32 icon Convert the code for converting an X11 icon to Win32 icon from Xlib to xcb. v2: some warning fixes in winXIconToHICON() v3: declaration-after-statement warning fixes v4: printf format fixes v5: convert in place rather than in a library This also avoids the xlib/xserver namespace collision issues, so winmultiwindowicons.h can be included everywhere it should be, which fixes compilation with -Werror=implicit-function-declaration Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 0a69c1e2fa0ea63b02fff98e68d9f56a369e882b Author: Jon Turney Date: Wed Mar 30 18:31:38 2016 +0100 xwin/glx: Build fix for warnings about missing WGL extensioons Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit b08526eecf1e165ed9ec2e6b571a5a616a9b696e Author: Adam Jackson Date: Wed Mar 16 11:38:13 2016 -0400 glx: Implement GLX_EXT_libglvnd (v2) For the dri2 backend, we depend on xfree86 already, so we can walk the options for the screen looking for a vendor string from xorg.conf. For the swrast backend we don't have that luxury, so just say mesa. This extension isn't really meaningful on Windows or OSX yet (since libglvnd isn't really functional there yet), so on those platforms we don't say anything and return BadValue for the token from QueryServerString. v2: Use xnf* allocators when parsing options (Eric and Emil) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 2e8781ead3067b195baec2e76a28091575679383 Author: Adam Jackson Date: Wed Mar 23 15:41:24 2016 -0400 glx: Compute the GLX extension string from __glXScreenInit Now that the enable bits are in the screen base class we can compute this in one place, rather than making every backend do it. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit e21de4bf3c5ff8cbb9c5ea023d04162e5e56b3df Author: Adam Jackson Date: Wed Mar 23 15:36:52 2016 -0400 glx: Move glx_enable_bits up to the GLX screen base class Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 23cce73221c0b96e7778da34616f8c3f4d6aa819 Author: Adam Jackson Date: Wed Mar 23 15:13:51 2016 -0400 xquartz/glx: Remove unused fields from the glx screen subclass dmt:~/git/xserver% git grep -E '\<(index|num_vis)\>' hw/xquartz/GL hw/xquartz/GL/indirect.c: int index; hw/xquartz/GL/indirect.c: int num_vis; Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 36bcbf76dcc7e88cac093f8fb656c525bfeaf65d Author: Adam Jackson Date: Wed Mar 23 15:26:23 2016 -0400 glx: Enable GLX 1.4 unconditionally Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 2a72789ee8e88f612dff48ebe2ebe9fecda7a95d Author: Adam Jackson Date: Wed Mar 16 16:28:13 2016 -0400 xwin/glx: Drop GLWIN_NO_WGL_EXTENSIONS hack This doesn't seem very useful, and we're about to implement 1.4 across the board, so some WGL extensions will become required. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 77bdaa1313aa55191b49ec73c1e377928ca294fe Author: Adam Jackson Date: Tue Mar 22 14:40:37 2016 -0400 glx: Use __glXInitExtensionEnableBits in all backends (v2) On xquartz this enables SGI_make_current_read, which is a mostly harmless lie as CGL doesn't implement it, as well as SGIX_pbuffer, which is fine because no pbuffer-enabled configs are created. On xwin this enables SGIX_pbuffer and ARB_multisample in all cases. Again this is harmless if the backend doesn't support the features, since no fbconfigs will be created to expose them. It also adds SGIX_visual_select_group to both xquartz and xwin. Amusingly, both were filling in the appropriate field in the fbconfig already. v2: Warn about missing WGL extensions (Emil) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 15af78fc56569dc3b6a7f2c5a6a49edb602111b7 Author: Adam Jackson Date: Wed Mar 23 15:19:15 2016 -0400 glx: Enable GLX_SGI_make_current_read in the core GLX 1.3 implies equivalent functionality, so this is safe to enable unconditionally, and bindContext always takes both drawable and readable arguments in any case. Mesa stopped exporting the __DRI_READ_DRAWABLE extension in 8.0 (when the DRI1 drivers were removed) so this will restore the extension string. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 9b2fc6d98691966f1c9186edad956f78c31f3698 Author: Adam Jackson Date: Wed Mar 23 14:57:25 2016 -0400 xwin/glx: Enable GLX_SGI_make_current_read unconditionally (v2) This seems to be fairly universal these days, and if it doesn't exist the only thing you break is separate drawable and readable, which is a rare feature to use. So pretend it's always there and just throw an error on MakeCurrent if it isn't, and don't consider it when computing the GLX version number. v2: Fix type-o for glxWinScreen (Jon Turney) Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit b2ef7df476af619903ef7f6b6962b371ae14306c Author: Adam Jackson Date: Sat Mar 19 13:44:10 2016 -0400 xquartz/glx: Error out for MakeContextCurrent(draw != read) CGL doesn't have a way to express this directly, unlike EGL WGL and GLX. It might be implementable, but it's never actually worked, and it's a fairly niche feature so we're better off throwing an error if someone attempts it. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Adam Jackson commit f95645c6f70019316f8ad77b7beb84530fc0505f Author: Adam Jackson Date: Tue Mar 22 14:37:19 2016 -0400 glx: Don't enable EXT_texture_from_pixmap unconditionally Not all backend servers implement this. Those that don't happen to not use __glXInitExtensionEnableBits, but we'd like that to change, so fix it up before we switch them over. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 410aec82556def5395f51299bcefbeb7d0bda604 Author: Adam Jackson Date: Tue Mar 22 14:29:06 2016 -0400 glx: Remove server-side mention of GLX_MESA_swap_control This extension is direct-only and has no GLX protocol. We don't even track an enable bit for it, trying to turn it on is pointless. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 3a21da59e59cf11a9113d71e3431c4bd394ff1e8 Author: Adam Jackson Date: Wed Mar 16 19:05:17 2016 -0400 glx: Remove default server glx extension string This existed only to be strdup'd and then immediately freed. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Signed-off-by: Adam Jackson commit 44e1c97ca6fe992bbb6ef9ecb0b82a113adfa57e Author: Olivier Fourdan Date: Mon Mar 21 09:53:17 2016 +0100 xwayland: Pretend we support viewport in vidmode Some games (namely openttd) will raise an XError and fail with a BadValue if their request to XF86VidModeSetViewPort fails. Support only the default zoom and viewport, fail for everything else. Signed-off-by: Olivier Fourdan Reviewed-by: Hans de Goede commit 6e3a6e30a6ac66942a0756a5d079993181f02e34 Author: Olivier Fourdan Date: Thu Mar 17 14:39:45 2016 +0100 xwayland: do not include frequency in mode name Some applications (e.g. using lwjgl) try to parse the output of the xrandr command and get confused with the mode name returned by Xwayland, because it contains "@[frequency]" (e.g. "1024x640@60.0Hz"). Remove the @[frequency] part of the mode name to match what is found in usual mode names on regular X servers to please those applications. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94589 Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 418fe365b45a143680d3b4143dc60f7cdc5a3507 Author: Michel Dänzer Date: Thu Mar 24 17:34:23 2016 +0900 xfree86/modes: Make sure the HW cursor is hidden when it should be When the HW cursor is hidden (e.g. because xf86CursorResetCursor triggers a switch from HW cursor to SW cursor), the driver isn't notified of this for disabled CRTCs. If the HW cursor was shown when the CRTC was disabled, it may still be displayed when the CRTC is enabled again. Prevent this by explicitly hiding the HW cursor again after setting a mode if it's currently supposed to be hidden. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94560 Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit adefbaee499b9679c6cac21f52ec6545af2b36b5 Author: Adam Jackson Date: Mon Mar 28 18:11:09 2016 +0900 os: Treat ssh as a non-local client (v4) By the time we get to ComputeLocalClient, we've already done NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming we're built with #define CLIENTIDS), so we can look up the name of the client process and refuse to treat ssh's X forwarding as if it were local. v2: (Michel Dänzer) * Only match "ssh" itself, not other executable names starting with that prefix. * Ignore executable path for the match. v3: (Michel Dänzer) * Use GetClientCmdName (Mark Kettenis) * Perform check on Windows as well, but only ignore path on Cygwin (Martin Peres, Emil Velikov, Jon Turney) v4: (Michel Dänzer) * Cut of any colon and whatever comes after it. (Adam Jackson) * Add bugzilla reference. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 Signed-off-by: Adam Jackson Signed-off-by: Michel Dänzer commit 1c90797565385426ad63bd2108085c8466695c0b Author: Sonny Jiang Date: Mon Mar 28 16:36:50 2016 +0900 DRI2: add Polaris PCI IDs Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher (Polaris10) Reviewed-by: Michel Dänzer (Polaris11) (Ported from Mesa commit f00c840578a70e479ffb99f6b64c73dc420179fa) Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 3b385105b2d19a1c55e9779ae88d775185eea231 Author: Michel Dänzer Date: Thu Mar 24 17:42:47 2016 +0900 present: Only requeue for next MSC after flip failure This code was added to deal with the driver present hook failing, in which case we need to wait for the next MSC before executing the presentation. However, it could also take effect in cases where the driver incorrectly thinks the current MSC matches the target one (e.g. due to the kernel interface only supporting 32-bit MSC values), in which case it could result in the presentation getting requeued over and over. To prevent such issues, check specifically for the target MSC immediately following the current MSC. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94596 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard commit 8ac0e05cc6c6e87b223ba7cb31d8856771c5d41a Author: Adam Jackson Date: Wed Mar 23 14:42:08 2016 -0400 vfb: Re-add LD_EXPORT_SYMBOLS_FLAG to LDFLAGS Accidentally removed, breaks Xvfb on cygwin. Reviewed-by: Yaakov Selkowitz Signed-off-by: Adam Jackson commit a288cf58a0dc0f965a6f964c76bb86bb1989d797 Author: Dave Airlie Date: Wed Mar 16 10:45:54 2016 +1000 glamor: swizzle RED to 0 for alpha textures I'm pretty sure Eric suspected this could cause a problem, and we couldn't find a test. Well loading feedly in firefox seems to trigger badness that this solves. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94554 Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Tested-by: Timo Aaltonen commit 4583fa9a6cd3095d7497c075d68e7430ea3c5cb0 Author: Ángel González Date: Mon Oct 15 22:04:22 2012 +0200 security: Fix reversed comment Commit 6045506be0cebca4ebbe943ae77f020aafa703d4 changed back the behavior to only allow the trusted extensions to the untrusted clients, but left the 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 comment intended for Security*Un*trustedExtensions saying that "untrusted clients shouldn't have access to these". Reviewed-by: Adam Jackson Signed-off-by: Ángel González commit b78897d0a04a833720698901fbac9535570875e4 Author: Evgeny M. Zubok Date: Thu Apr 8 03:58:21 2010 -0700 xfree86: Change VBE version early-out to 1.2. (#22672) Reporter has an S3 Trio with DDC and VESA 1.2. Signed-off-by: Corbin Simpson Reviewed-by: Matt Turner commit 184fbf7541012090b8716c7eaf00895efd16d0ac Author: Adam Jackson Date: Mon Mar 14 11:37:32 2016 -0400 xfree86: Finish removing font modules Signed-off-by: Adam Jackson commit 69d1528bc35073331e281448dfb04eb4240ff472 Author: Adam Jackson Date: Thu Apr 26 16:42:20 2012 -0400 xfree86: Font modules aren't a real thing There are no longer any loadable font modules (not that they ever did much in the first place), so stop pretending they're a defined ABI surface. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 4f8151c7a4bcf2d55848e70c83b2f9ce458cf316 Author: Adam Jackson Date: Mon Mar 14 11:20:39 2016 -0400 Fix the typo from the previous patch, d'oh Signed-off-by: Adam Jackson commit 75eecf28ae3709181a51571132b0accd9cae316e Author: Chris Wilson Date: Sun Mar 13 13:54:01 2016 +0000 Xext/vidmode: Reduce verbosity of GetModeLine debug messages In commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own the verbosity of some old debug messages (which print the reply to every GetModeLine client request and others) was increased leading to lots of log spam. Downgrade the logging back to DebugF. [ajax: Fix a typo so it compiles.] Reviewed-by: Adam Jackson References: https://bugs.freedesktop.org/show_bug.cgi?id=94515 Signed-off-by: Chris Wilson Cc: Olivier Fourdan commit 744c292ae49dd1f9d33b860d2b4f0ae27023809b Author: Adam Jackson Date: Fri Mar 11 13:50:32 2016 -0500 vidmode: Remove stray vidmodeproc.h from EXTRA_DIST Was removed from the tree in: commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own but not removed from the Makefile, which broke 'make dist'. Signed-off-by: Adam Jackson commit 47bc7fcaa567b0d9e2627b4a21b112e96f81725b Author: Dave Airlie Date: Tue Feb 9 16:54:22 2016 +1000 present: fail flipping if we have any slave outputs Due to the way present currently works, we don't ever check with the secondary adapters if we can flip at all. We shouldn't flip if the secondary adapters are attached to the pixmap currently, however using the current check_flip callback isn't possible as it passes the Window to the driver (something we shouldn't be doing), so the slave driver can never get it's own screen ptr back. For now to fix the problem just block flips if we have any slaves configured. We can fix the ABI up later, but this fix can be backported to stable. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard commit 316948734c2bba72d42c4cf4530932b5862c109f Author: Michel Dänzer Date: Fri Mar 11 12:21:06 2016 +0900 glamor: Make context current in glamor_pixmap_fbo_cache_put Without this, we may be manipulating the context of another screen. In a system with two GPUs using glamor, this fixes lots of (EE) glamor256: GL error: GL_INVALID_OPERATION in glBindTexture(non-gen name) spew since 0b4c0c75 ('glamor: Replace "finish access" shader with texture swizzling'). Signed-off-by: Michel Dänzer Reviewed-by: Dave Airlie commit ef3005da3d5dc92b3ee5a0ee78164e739a3216dc Author: Adam Jackson Date: Thu Jan 21 12:47:57 2016 -0500 glx: Implement GLX_EXT_fbconfig_packed_float The tokens for this are already defined by GLX_ARB_fbconfig_float, which we already support, so just add the extension to the list and let the driver provide those configs if it wants. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d15cb654b6ba365dac9a62064e277adebde2fdab Author: Adam Jackson Date: Mon May 18 13:00:02 2015 -0400 glx: Implement GLX_EXT_stereo_tree This is correct as it is, but only because we know no DRI drivers implement stereo. v2: Use new ATTRIB macro Reviewed-by: James Jones Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit a18238877bbf9aab95843d849a6f434275e9cd6c Author: Adam Jackson Date: Thu Mar 3 16:50:02 2016 -0500 glx: Add GLX_SCREEN to the GetDrawableAttributes response libglvnd would like to use this to map from drawable to screen, so it can know which driver to dispatch to. Refer to the spec proposal here: https://lists.freedesktop.org/archives/mesa-dev/2016-March/109543.html Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 47c1d6b7abcfb1c6b478367bbc2e869c91485bc0 Author: Adam Jackson Date: Thu Mar 10 12:29:34 2016 -0500 glx: Macroize building the attribute list in DoGetDrawableAttributes No functional change, just a little easier to read and harder to get wrong. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c01094c5312fbd84146dd83122e5256a8e57d092 Author: Eric Anholt Date: Mon Feb 1 13:58:15 2016 -0800 ephyr: Fix redisplay with glamor on GLES. glamor_transfer.c is still totally broken, though. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 0b4c0c75d06f3dbe92be1a26a637e9f05529cb3d Author: Eric Anholt Date: Mon Feb 1 13:58:14 2016 -0800 glamor: Replace "finish access" shader with texture swizzling. For pictures without alpha, and for most other formats for GLES2, we would make a temporary FBO, make another temporary texture, upload our GLAMOR_MEMORY pixmap to the texture, then run the "finish access" shader across it to swizzle its values around into the temporary FBO (which we would use for a single Render operation and then throw away). We can simplify everything by using GL_ARB_texture_swizzle (or its GLES3 counterpart). It's just not worth the complexity to try to improve the performance of this already low-performance path (SHM pixmaps + Render) on GLES2. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit b0cc04992ced5d96bb5c52fc1e5c868797cc0a17 Author: Eric Anholt Date: Mon Feb 1 13:58:13 2016 -0800 glamor: Drop dead large-pixmap handling code in temp picture uploads. The glamor_pixmap_ensure_fbo() in glamor_pixmap_upload_prepare() will always fail on a large pixmap, so we can just be explicit about bailing out here and then dump the rest of this garbage. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 094b1bea8bd08eec029e4d61ba40d81441c37905 Author: Eric Anholt Date: Mon Feb 1 13:58:12 2016 -0800 glamor: Drop unused PBO code in temporary picture uploading. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 6112fecc3a4fd7dfb0ef77a98cfd1f7c91ccea0c Author: Eric Anholt Date: Mon Feb 1 13:58:11 2016 -0800 glamor: Generalize the a1-to-a8 conversion path. Pixman is quite qualified to allocate our temporary memory, and all we need to do is decide what formats to convert from and to. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 8f1411c3847a742f84ff07c4a0bb610801f5bfee Author: Eric Anholt Date: Mon Feb 1 13:58:10 2016 -0800 glamor: Drop the REVERT_UPLOADING_1_5_5_5 path. There was only a pretty special case that could have even worked -- you've got a GLES2 renderer, you've got a SHM pixmap, it's 1555 (not the usual 565 for 16-bit), and you're little endian (BE was broken, since GL's 5_5_5_1 picks the 1 bit from the lowest bit of the short, and on BE we weren't doing the conversion path that swaps around the channels). This is just not worth the complexity. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 2cc7a0815e5e2c2b1b1267cae9c348a8e95b1082 Author: Eric Anholt Date: Mon Feb 1 13:58:09 2016 -0800 glamor: Drop the GLES2 REVERT_UPLOADING_2_10_10_10 paths. These just smash your 2_10_10_10 data into 8888, despite what the comments said. That's not valid rendering, so just ditch this path and fall back to software. One might also note in the code being removed here that the REVERT_UPLOADING_10_10_10_2 path wasn't even connected. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit f667d5177024d3fdfb1b51694bdaeba6cee67962 Author: Eric Anholt Date: Mon Feb 1 13:58:08 2016 -0800 glamor: Merge the two GL-type-from-pictformat paths. It clarifies what the difference is between the two paths, and would potentially encourage us to handle GLES extensions that expose additional types. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit c7574c63c618d3a017105c380542eb04341b04a2 Author: Eric Anholt Date: Mon Feb 1 13:58:07 2016 -0800 glamor: Propagate that is_upload is always true. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 1bed5ef2b80c77c1bb9b62971367bea864fd8f66 Author: Eric Anholt Date: Mon Feb 1 13:58:06 2016 -0800 glamor: Drop dead fbo handling from GLAMOR_MEMORY pict uploads. The previous commit asserts that we don't have one. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit ee7ca670b1695d64bc12cb37302913acc066a569 Author: Eric Anholt Date: Mon Feb 1 13:58:05 2016 -0800 glamor: Make sure that GLAMOR_MEMORY pixmaps don't retain an FBO. glamor_composite_choose_shader() may upload our scratch pixmaps to get a Render operation completed. We don't want to hang onto GL memory for our scratch pixmaps, since we'll just have to reallocate them at a new w/h next time around, and the contents will be updated as well. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit a96c6d4658e3f386002f96eede660af3b01e5209 Author: Eric Anholt Date: Mon Feb 1 13:58:04 2016 -0800 glamor: Simplify temporary picture uploading call stack. glamor_upload_sub_pixmap_to_texture() only had the one caller, so we can merge it in, fix its silly return value, and propagate a bunch of constants. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 25ce263fd88684be9370025f93ba3a2bfc72ff1a Author: Olivier Fourdan Date: Wed Mar 9 16:45:18 2016 +0100 glamor: do not build Xv support when --disable-xv Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit da7724d3d277c6c8a814881785b716896802629a Author: Olivier Fourdan Date: Wed Mar 9 16:21:18 2016 +0100 xwayland: add glamor Xv adaptor This adds an Xv adaptor using glamor. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit d11fdff50c91575e977a63617806a61bca98cd35 Author: Jon Turney Date: Fri Jan 3 13:21:40 2014 +0000 hw/xwin: Tidy-up of winmsg.h - winVMsg() has no uses, so remove - winMsgVerb() has only one use, with default verbosity, so remove - winMsg() is identical to LogMessage() - Put winDrvMsg() and winDrvMsgVerb() under XWIN_XF86CONFIG - Include what you use Xfuncproto.h for _X_ATTRIBUTE_PRINTF Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 519b98765f0c7d083a744ae7beb641753e4eb751 Author: Jon Turney Date: Thu Mar 3 22:32:28 2016 +0000 hw/xwin: Remove GC privates, unused since native GDI engine removal Unused since native GDI engine removal in commit 8465ee78 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 9d28ff2a9be86662f56463aa1fd46d12988e30fa Author: Jon Turney Date: Fri Jul 31 20:23:59 2015 +0100 hw/xwin: Use NULL rather than NoopDDA for unimplemented engine functions Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit a309085a56de4d30dfbc44d9ff5302c7d9fdbf73 Author: Jon Turney Date: Fri Jul 31 20:20:00 2015 +0100 hw/xwin: Remove unused FinishCreateWindowsWindow engine function This only ever had an (unused) implementation in the DDNL engine, which was removed in commit 57bbf6e2. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit fa6f9d06a3d1a90134d9349f5ce4ec5b4eeff5e3 Author: Jon Turney Date: Fri Jul 31 20:12:37 2015 +0100 hw/xwin: Remove unused HotKeyAltTab engine function This was only ever used by the primaryfb engine, removed in commit c79f824b Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 7bd25aa8437ec410e7a7de1b0636ba33298fc8d6 Author: Jon Turney Date: Fri Jul 31 19:44:34 2015 +0100 hw/xwin: Return FALSE to indicate failure in winSetEngine() Return FALSE to indicate failure in winSetEngine(), if it couldn't find a drawing engine to use Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 52e05b9282f0f220d7c762793ce0b8f606a45deb Author: Jon Turney Date: Tue Feb 23 23:09:43 2016 +0000 hw/xwin: Remove WM_WM_MAP message, which is now unused Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit c42217aa3d372acaa5ca7c64895edbfbd20c8475 Author: Jon Turney Date: Mon Nov 2 20:24:33 2015 +0000 hw/xwin: Remove WM_(UN|)MANAGE messages, which are now never sent Remove fAnotherWMRunning which tracks this message (although since it was never initialized, I doubt this worked reliably), and the only use of that, which was to prevent winMWExtWMRestackWindows() from being used when the internalwm is running Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit b6bdf368420355332e41c604c523584bd39933f9 Author: Jon Turney Date: Mon Nov 2 20:51:51 2015 +0000 hw/xwin: Remove allowOtherWM, which is now always FALSE Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8407d3096287868b5c5e50ca5a98d470918c85a9 Author: Jon Turney Date: Mon Nov 2 20:34:09 2015 +0000 hw/xwin: Remove winIsInternalWMRunning(), which now always returns FALSE Also remove then unused variables and IsRaiseonClick() v2: Also remove unused pScreenInfo variable in winMWEXtWMRestackFrame() Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 2779a28a86a13831b334e8678cd4e838b3b38472 Author: Jon Turney Date: Mon Nov 2 20:07:04 2015 +0000 hw/xwin: Remove fInternalWM flag Remove the fInternalWM flag as it is now always FALSE after removing the -internalwm option v2: Also remove then unused pRLWinPriv local from pRLWinPriv() Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 98238ece5756801a8a67b9235e42cb9ab2318633 Author: Jon Turney Date: Mon Nov 2 19:37:40 2015 +0000 hw/xwin: Ignore the obsolete, undocumented -internalwm option Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit cdeaebad9889d81d2698b8a10fec5e55d8dec7a1 Author: Jon Turney Date: Tue Mar 1 21:37:05 2016 +0000 hw/xwin: Remove the long-broken -silent-dup-error option Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 24042b4e367803dd64f3fcdc1bef7b2bf36c4145 Author: Michel Dänzer Date: Mon Dec 21 17:54:08 2015 +0900 modesetting: Allow CRTC transforms to actually take effect Setting crtc->transformPresent to FALSE was preventing the transform from actually taking effect and putting RandR into a confused state. Now that the RandR 1.2 cursor code handles transforms correctly, we can allow them to properly take effect. Reviewed-by: Keith Packard commit b04767c84deafc44993723add4b1c5163fc11711 Author: Michel Dänzer Date: Wed Oct 21 18:33:46 2015 +0900 xfree86: Re-set current cursor after RandR 1.2 CRTC configuration change Add xf86CursorResetCursor, which allows switching between HW and SW cursor depending on the current state. Call it from xf86DisableUnusedFunctions, which is called after any CRTC configuration change such as setting a mode or disabling a CRTC. This makes sure that SW cursor is used e.g. while a transform is in use on any CRTC or while there are active PRIME output slaves, and enables HW cursor again once none of those conditions are true anymore. Reviewed-by: Keith Packard commit a4ffa8721debb34bd36fd4624890d9c26886c618 Author: Michel Dänzer Date: Thu Dec 24 12:56:03 2015 +0900 xfree86/modes: Check for CRTC transforms in xf86_use_hw_cursor(_argb) (v2) We currently don't handle transforms for the HW cursor image, so return FALSE to signal a software cursor must be used if a transform is in use on any CRTC. v2: Check crtc->transformPresent instead of crtc->transform_in_use. The latter is TRUE for rotation as well, which we handle correctly. Reviewed-by: Keith Packard commit c3e4e9fc5d84bfc17b3ed63f67488ea25ba150ce Author: Michel Dänzer Date: Thu Dec 24 16:20:49 2015 +0900 xfree86/modes: Refactor xf86_use_hw_cursor_argb to use xf86_use_hw_cursor (v2) This reduces code duplication. v2: No functional change this time. Reviewed-by: Keith Packard commit a3e681eafa5355b8bb3b099d47983f14f0d5e197 Author: Michel Dänzer Date: Tue Feb 23 17:19:03 2016 +0900 glamor: Source pictures are always depth 32 We were using the destination pixmap depth to determine the source picture format. Fixes incorrect text rendering with some MATE desktop GTK3 themes. Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94246 Signed-off-by: Michel Dänzer commit b05ae79ee3bebef9790c97eedc033d1ffb3ec39a Author: Michel Dänzer Date: Tue Feb 23 17:19:02 2016 +0900 glamor: Factor out glamor_set_color_depth from glamor_set_color The former takes explicit screen and depth parameters instead of deriving them from a pixmap. Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 947e94a341fa153258e9e86060b83af95934672b Author: Hans de Goede Date: Wed Feb 10 16:40:43 2016 +0100 glamor: Fix XvPutImage when src_y != 0 We already take src_y into account when uploading the src data by starting at the top line of the src data when uploading. Adjust src_y accordingly when rendering. Signed-off-by: Hans de Goede commit 40a164b8f4e720b0d6ebf228ee175eb397ffeec2 Author: Rui Matos Date: Fri Mar 4 16:24:48 2016 +0100 build: Enable vidmode independently from Xorg This allows building Xwayland without Xorg and still include the vidmode extension. v2: Use PKG_CHECK_EXISTS instead of PKG_CHECK_MODULES Signed-off-by: Rui Matos Reviewed-by: Emil Velikov commit 2be527b1d4ce2b0412c4484539a8c9607645ec6d Author: Julien Cristau Date: Mon Mar 7 23:20:34 2016 +0100 xfixes: avoid double free if AddResource fails pChc is already freed through CursorFreeHideCount → deleteCursorHideCount. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 4217db89ecd480fda2ee74fecba06c6713c2a0f0 Author: Julien Cristau Date: Mon Mar 7 23:20:33 2016 +0100 render: free already allocated formats in PictureInit failure case Probably pointless, if this fails you're not likely to get far... Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 054f80717812d4781741cd05393623fe6f6c627f Author: Julien Cristau Date: Mon Mar 7 23:20:32 2016 +0100 record: don't call RecordDeleteContext when AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit d0c1a5bc61a3d151f2234aa3820862f16c0f00c7 Author: Julien Cristau Date: Mon Mar 7 23:20:31 2016 +0100 xwin: no need to free auth data if AddResource fails This is taken care of by SecurityDeleteAuthorization Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit acf263df81ad6813e0233033610fb44521cab1b4 Author: Julien Cristau Date: Mon Mar 7 23:20:30 2016 +0100 modesetting: avoid double free if AddResource fails ms_dri2_frame_event_client_gone or ms_dri2_frame_event_drawable_gone already free the resource. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 164753f158e78f615f903467bfd234d7c58244ef Author: Julien Cristau Date: Mon Mar 7 23:20:29 2016 +0100 dmx/glxProxy: don't free the glx pixmap twice if AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 59b9c3d5e4bf05aeaaac2ee4ea12c301a67aae2c Author: Julien Cristau Date: Mon Mar 7 23:20:28 2016 +0100 glx: don't call pGlxDraw->destroy() if AddResource fails AddResource will have called DrawableGone, which takes care of the destruction. Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit ac97fb2b804809c39b12fe0032d96fb076657258 Author: Julien Cristau Date: Mon Mar 7 23:20:27 2016 +0100 dri3: return an error if AddResource fails Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit 119d5c0e2f800737c949ef760c5fe25d963200bf Author: Julien Cristau Date: Mon Mar 7 23:20:26 2016 +0100 xvmc: Fix unchecked AddResource Reviewed-by: Rémi Cardona Signed-off-by: Julien Cristau commit a2c3c34b44b866440a152511e682c98879ee13b7 Author: Jonas Ådahl Date: Tue Mar 8 20:05:33 2016 +0800 xwayland: Correctly detect whether posix_fallocate exists We had HAVE_POSIX_FALLOCATE checks, but no such macros were ever defined anywhere. This commit makes it so that this macro is defined if the posix_fallocate is detected during configure. Signed-off-by: Jonas Ådahl Reviewed-by: Julien Cristau commit 939ce0bae68b682b57675f65c901653c1a094ebb Author: Julien Cristau Date: Tue Mar 1 21:39:01 2016 +0100 xv: fix double free in AddResource failure case XvdiDestroyVideoNotifyList already frees the list if AddResource fails, so don't do it twice. And set tpn->client to NULL explicitly to avoid confusing uninitialized memory with a valid value. Reviewed-by: Adam Jackson Signed-off-by: Julien Cristau commit 05e1bcf56e1c511a1ef539acfe11e37727e1179e Author: Adam Jackson Date: Tue Mar 1 14:09:30 2016 -0500 dri1: Fix unchecked AddResource Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau commit 093f9505c12565cc19bdf6e33b263f31d104c3ef Author: Adam Jackson Date: Tue Mar 1 14:09:29 2016 -0500 xv: Fix unchecked AddResource Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ac4d8c7cee13947b688ebb26035f06f7744db201 Author: Olivier Fourdan Date: Tue Mar 1 17:03:44 2016 +0100 vidmode: build without xf86vidmodeproto git commit f175cf45: vidmode: move to a separate library of its own introduced a regression where the xserver would not build when xf86vidmodeproto is not installed even if the configure option "--disable-xf86vidmode" is specified. Fix build failure when xf86vidmodeproto is not installed. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 9c88cb9b059111e0531852f3fa8fa571c0306f57 Author: Laércio de Sousa Date: Thu Feb 25 16:37:57 2016 -0300 kdrive/ephyr: map host X server's keymap into Xephyr, if supported Currently Xephyr doesn't inherit host X server's keymap, which may lead to keymap mismatches when using a non-US keyboard in a window inside Xephyr. This patch makes Xephyr change its keymap to match host X server's one (unless XKB support is disabled), using xcb-xkb to retrieve the needed XKB controls. This implementation is analogous to Xnest one at commit 83fef4235. Supersedes: https://patchwork.freedesktop.org/patch/67504 Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit daa6d2d58f65b9301b1b1f3c6df07719ecb5c03d Author: Laércio de Sousa Date: Fri Feb 12 14:18:02 2016 -0200 config/udev: distinguish between real keyboards and other key devices This patch introduces a new flag ATTR_KEY for hotplugged input devices, so we can better distinguish between real keyboards (i.e. devices with udev property ID_INPUT_KEYBOARD="1") and other key input devices like lid switches, power buttons, etc. All supported hotplug backends (udev, hal, and wscons) will set both flags ATTR_KEY and ATTR_KEYBOARD for real keyboards, but udev backend will set ATTR_KEY, but not ATTR_KEYBOARD, for non-keyboard key input devices (hal and wscons will set both flags in any case). With this distinction, kdrive input hotplugging mechanism will be allowed to only grab real keyboards, as other key input devices are currently not supported. In order to don't break current behaviour, this patch will replace all ATTR_KEYBOARD occurrences with ATTR_KEY in hw/xfree86/common/xf86Xinput.c. [ajax: Just add ATTR_KEY, don't re-number the other attributes] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 851ff9ec04b73412c7dbad7b4911a1feac21f354 Author: Laércio de Sousa Date: Fri Feb 12 14:18:01 2016 -0200 ephyr: enable option -sw-cursor by default in multi-seat mode Option -seat passed to Xephyr requires -sw-cursor to be passed as well, otherwise the mouse cursor will remain invisible for the given seat. This patch takes care of enabling -sw-cursor if -seat is passed. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 40e32e9fc9f3a1bd8287ee03dd399d8161cb98dd Author: Laércio de Sousa Date: Fri Feb 12 14:18:00 2016 -0200 kdrive: add options to set default XKB properties This patch introduces convenient command-line options -xkb-rules, -xkb-model, -xkb-layout, -xkb-variant, and -xkb-options, to set default values for these properties. These options can be handful for cases in which compile-time default values don't match user locale, since kdrive doesn't support InputClass matching rules yet and not all Linux distros provide default rules to store these values in udev properties (which by the way is a discouraged practice). Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 0cf3d72be6bd99cd2c66b7885339322c7e5bf73d Author: Laércio de Sousa Date: Fri Feb 12 14:17:59 2016 -0200 kdrive: introduce input hot-plugging support for udev and hal backends (#33140) This patch introduces input hot-plugging support for kdrive-based applications in multi-seat context. This feature is enabled by passing -seat option with desired seat name. All keyboard/mouse devices assigned to that seat will be automatically grabbed by kdrive. It supports udev and hal backends for input hot-plugging support. Another patches may be required for wscons backend. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33140 Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 2116f03be04240e961649ca750a7aa5438b8446c Author: Olivier Fourdan Date: Mon Feb 8 17:48:26 2016 +0100 xwayland: fix a crash on output removal On output removal, the CRTC that was added in xwl_output_create() is not removed in xwl_output_destroy() and would cause a segmentation fault later on in ProcRRGetMonitors(): (EE) Segmentation fault at address 0x100000001 (EE) (EE) 10: ? (?+0x29) [0x29] (EE) 9: /usr/bin/Xwayland (_start+0x29) [0x423299] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7fdd80e7f580] (EE) 7: /usr/bin/Xwayland (dix_main+0x3b3) [0x544ef3] (EE) 6: /usr/bin/Xwayland (Dispatch+0x31e) [0x54109e] (EE) 5: /usr/bin/Xwayland (ProcRRGetMonitors+0x9b) [0x4ca18b] (EE) 4: /usr/bin/Xwayland (RRMonitorMakeList+0x269) [0x4c9ba9] (EE) 3: /usr/bin/Xwayland (RRMonitorSetFromServer+0x118) [0x4c9198] (EE) 2: /usr/bin/Xwayland (MakeAtom+0x30) [0x530710] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7fdd80e93b1f] (EE) 0: /usr/bin/Xwayland (OsSigHandler+0x29) [0x5792d9] Remove the output CRTC in xwl_output_destroy() to avoid the crash. Signed-off-by: Olivier Fourdan Reviewed-by: Daniel Stone commit 1bee4e254ca0305cb23e574b4c8b250d276ee998 Author: Michel Dänzer Date: Thu Feb 18 17:33:19 2016 +0900 present: Call present_restore_screen_pixmap from present_set_abort_flip After present_set_abort_flip, the screen pixmap will be used for all screen drawing, so we need to restore the current flip pixmap contents to the screen pixmap here as well. Improves flashing / stutter e.g. when something like a popup menu appears on top of a flipping fullscreen window or when switching out of fullscreen. Note that this means present_set_abort_flip now relies on screen->root being non-NULL, but that's already the case in other present code. Reviewed-by: Keith Packard Reviewed-by: Chris Wilson commit 4611e902c291b8a789f374cff3300f74645bc2b2 Author: Michel Dänzer Date: Thu Feb 18 17:20:45 2016 +0900 present: Factor code for restoring screen pixmap out of present_unflip (v2) The following fix will use the refactored function. The logic in the refactored function is slightly simplified, exploiting the fact that this function is only ever called with a valid flip pixmap. v2: Assert that flip_pixmap is non-NULL instead of testing and bailing on NULL, preserve test for flip_window being non-NULL before calling present_set_tree_pixmap for it (Keith Packard) Reviewed-by: Chris Wilson (v1) Reviewed-by: Keith Packard commit 72328e5eb98a3f27e1f0a0e17beae6db447bd87c Author: Michel Dänzer Date: Thu Feb 18 18:23:47 2016 +0900 present: Only update screen pixmap from flip pixmap once per unflip present_unflip may be called several times from present_check_flip_window during the same unflip. We can only copy to the screen pixmap the first time, otherwise we may scribble over other windows. The flip pixmap contents don't get updated after the first time anyway. Fixes at least the following problems, which were introduced by commit 806470b9 ("present: Copy unflip contents back to the Screen Pixmap"): On xfwm4 without compositing, run glxgears and put its window into fullscreen mode to start flipping. While in fullscreen, open the xfwm4 window menu by pressing Alt-Space. The window menu was invisible most of the time because it was getting scribbled over by a repeated unflip copy. When switching a flipping window out of fullscreen, a repeated unflip copy could leave artifacts of the flip pixmap on the desktop. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94325 Reviewed-by: Keith Packard Reviewed-by: Chris Wilson commit 43eb5b6047c9b35c337e553ec054f08bdc835abb Author: Michel Dänzer Date: Tue Dec 8 12:52:17 2015 +0900 dri3: Refuse to work for remote clients (v2) Prevents clients forwarded via SSH from hanging while waiting for the reply from the DRI3Open request. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 v2: Return BadMatch instead of BadRequest (Keith Packard) Reviewed-by: Keith Packard commit 6070a749d953951bacbfb149c5c36451293aad35 Author: Olivier Fourdan Date: Wed Feb 10 09:35:39 2016 +0100 xwayland: add partial xvidmode extension support Older games (mostly those based on SDL 1.x) rely on the XVidMode extension and would refuse to run without. Add a simple, limited and read-only xvidmode support that reports the current mode used so that games that rely on xvidmode extension can run on XWayland. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit b430f53bb753f9b064ab62d014820c1c3c76a841 Author: Olivier Fourdan Date: Fri Feb 5 09:48:25 2016 +0100 vidmode: remove redundant DIX function The API signature of the DIX xf86VidModeGetGammaRampSize() is now identical to the xf86cmap's xf86GetGammaRampSize() and all it does is actually call xf86GetGammaRampSize() so we can save one vfunc. Remove uneeded xf86VidModeGetGammaRampSize() function. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 48fccde2bfb60efdbf45a96fa53bcd9a6570bf89 Author: Olivier Fourdan Date: Fri Feb 5 09:48:24 2016 +0100 vidmode: remove redundant check The DIX already checks for VidModePrivateKey to get the vfunc, so checking for this again in the DDX is redundant. Remove the redundant function xf86VidModeAvailable() from the DDX. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f175cf45aebcdda53f3ae49c0eaf27da1f194e92 Author: Olivier Fourdan Date: Wed Feb 10 09:34:34 2016 +0100 vidmode: move to a separate library of its own XVidMode extension might be useful to non hardware servers as well (e.g. Xwayand) so that applications that rely on it (e.g. lot of older games) can at least have read access to XVidMode. But the implementation is very XFree86 centric, so the idea is to add a bunch of vfunc that other non-XFree86 servers can hook up into to provide a similar functionality. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87806 Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 17097e083b2392c8989474f6e0da8cc234329e9c Author: Olivier Fourdan Date: Fri Feb 5 09:48:22 2016 +0100 vidmode: rename DDX functions To avoid confusion as to what belongs on the DDX and what not. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit ddfb8c009ac651209eb0087aaf86b54e1446e8b2 Author: Olivier Fourdan Date: Fri Feb 5 09:48:21 2016 +0100 vidmode: move display mode definitions To be able to reuse the VidMode extension in a non-hardware server, the display mode definitions need to be accessible from DIX. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit e29a64de662112b8ebcd3f20c89df0e8c51890ef Author: Olivier Fourdan Date: Fri Feb 5 09:48:20 2016 +0100 vidmode: remove mode access from public API The mode access functions (namely VidModeCreateMode(), VidModeCopyMode(), VidModeGetModeValue() and VidModeSetModeValue()) are used only in xf86VidMode code and do not need to be available anywhere else. Remove these functions from the public VidMode API and move them as static where they are used. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit b7962ade5265a21ac7c60da6cc07ece15ef7e648 Author: Olivier Fourdan Date: Fri Feb 5 09:48:19 2016 +0100 vidmode: use appropriate DisplayModePtr type The API uses an untyped pointer (void *) where a DisplayModePtr is expected. Clean up the API to use the appropriate type, as DisplayModePtr is really all that will be passed there. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 12f714fd95dc9d912c0bf2524005a73ec6e8ee4f Author: Olivier Fourdan Date: Fri Feb 5 09:48:18 2016 +0100 vidmode: remove VidModeGetMonitor() VidModeGetMonitor() is used solely in ProcXF86VidModeGetMonitor() to get a untyped monitor pointer that is passed back straight again to VidModeGetMonitorValue(). This is actually useless as VidModeGetMonitorValue() could as well get the monitor from the ScreenPtr just like VidModeGetMonitor() does. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit f6f7e21133c13c34f306a191137d566e83b40929 Author: Olivier Fourdan Date: Fri Feb 5 09:48:17 2016 +0100 vidmode: use ScreenPtr instead of screen index New code passes ScreenPtr instead of the screen index. Change the VidMode functions to take a ScreenPtr. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 6e898ef080df93e885ead9d6fee8854b34e0216f Author: Olivier Fourdan Date: Fri Feb 5 09:48:16 2016 +0100 vidmode: get rid of the CloseScreen wrapper As we rely on dixRegisterPrivateKey() to allocate the memory for us that will be free automatically, we do not need the CloseScreen wrapper anymore. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit 341f3bccafde71754a9ed2303df9908e509c6d31 Author: Olivier Fourdan Date: Fri Feb 5 09:48:15 2016 +0100 vidmode: use appropriate API dixRegisterPrivateKey() can allocate memory that will be freed when the screen is teared down. No need to calloc() and free the memory ourself using a broken ref counting method. Reviewed-by: Adam Jackson Signed-off-by: Olivier Fourdan commit d8882954570aba656d5a7be7d357feaba21cb099 Author: Chris Wilson Date: Fri Feb 12 11:59:53 2016 +0000 dri2: Allow many blocked clients per-drawable This patch was motivated by the need to fix the use-after-free in dri2ClientWake, but in doing so removes an arbitrary restriction that limits DRI2 to only blocking the first client on each drawable. In order to fix the use-after-free, we need to avoid touching our privates in the ClientSleep callback and so we want to only use that external list as our means of controlling sleeps and wakeups. We thus have a list of sleeping clients at our disposal and can manage multiple events and sources. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit bc3634010c096dffd1935c0c6cf8ba37534ae3d8 Author: Chris Wilson Date: Fri Feb 12 11:59:52 2016 +0000 dix: Add ClientSignalAll() This is a variant of ClientSignal() that signals all clients with an optional matching sleeping client, function and closure. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 9fecc4cd571641f8920f25473ce5abb3fdca8b40 Author: Jon Turney Date: Tue Jan 12 16:18:35 2016 +0000 xwin: Remove unhelpful debug about WM message queue size Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit f7d1e5acdf5ed4ab4ed5c18727aa6f3d379ef560 Author: Jon Turney Date: Tue Aug 11 15:45:57 2015 +0100 xwin: Add SKIPTASKBAR hint to _NET_WM_WINDOW_TYPE_DOCK type windows Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit e7f87f8f76e5ac9479a71e3daf2cfdefd4b5f684 Author: Jon Turney Date: Thu Jul 2 19:21:11 2015 +0100 xwin: In multiwindow mode, look up the HWND for the parent window Rather than only looking at the foreground window to see if it matches the WM_TRANSIENT_FOR window XID, lookup that XID and fetch the HWND from the window privates. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 856a28f63739bffe32f5a8156fd2680e5c5259a1 Author: Jon Turney Date: Thu Jul 2 13:32:40 2015 +0100 xwin: Factor out MessageName() debug helper Factor out the MessageName() debug helper for message id -> text, and use it on message queue and dequeue. Reorder in numerical order to match winwindow.h Add missing WM_WM_ICON_EVENT Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c2006ddc5abbd4ac374dabf1cfdd3df8fc88779 Author: Jon Turney Date: Mon Feb 22 17:41:14 2016 +0000 xwin: Keyboard layout updates layout zh_TW doesn't exist (anymore), try something else for that. layout it variant mac doesn't seem to exist anymore, try to handle Macintosh keyboards (running under Parallels on Mac) and other oddities in a more generic way, by falling back to matching only on the language identifer part of the input locale identifer. v2: Fix typo of 0xa0000 for 0xa000 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 8c97a0078e7fe22e6159fa53490dfca2f4d267a9 Author: Colin Harrison Date: Wed Nov 19 22:33:39 2014 +0000 xwin: Add a tentative entry for the Korean keyboard to the list of known keyboard layouts Signed-off-by: Colin Harrison Reviewed-by: Jon Turney commit a4d8a64c4ba467964476c4a1486da698bd6aed9e Author: Jon Turney Date: Tue Feb 10 14:36:37 2015 +0000 xwin: Update to XRANDR 1.2 internal interface to ensure an output is reported by XRANDR If using the X server internal XRANDR 1.0 interface, it seems we must register a display size with RRRegisterSize() in order to make RRGetInfo() call RRScanOldConfig() to generate an output and crtc for us. Without this, the following GDM bug means that an XDMCP session to GDM cannot be started. https://bugzilla.gnome.org/show_bug.cgi?id=736054 Instead, use the more recent XRANDR 1.2 internal interface to explicitly create the output and crtc, and maintain a single mode which represents the current display size. Also don't emit a RRScreenSizeNotify when a RRScreenSizeSize is done which has no effect, this seems to throw the GDM greeter into a loop... v2: Maintain reference count for the mode we maintain more correctly, to avoid double free causing a crash on shutdown Connect crtc to output, so a subsequent RRSetCrtcConfig request doesn't change anything, so we don't fail due to our lack of rrSetConfig or rrCrtcSet hooks. See https://cygwin.com/ml/cygwin-xfree/2015-02/msg00032.html v3: Raise limit on X display size from 4Kx4K to 32Kx32K Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 008efebda801b9b80e2ab3f2c95aeef8c82102ee Author: Jon Turney Date: Sat Oct 18 17:31:57 2014 +0100 xwin: Use WM_CLIPBOARDUPDATE clipboard API Windows Vista and later have a saner clipboard API where the clipboard viewer linked list is no longer maintained by applications. Use it where available. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit de7f1fd6f8f10f07b366ae5428a8c65a224bda98 Author: Jon Turney Date: Wed Jul 9 14:26:54 2014 +0100 xwin: Check that window position is visible on non-rectangular virtual desktops Improve the check that window position is visible to work correctly for non-rectangular virtual desktops Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit a9e73131b6453e0fa2da5360e84af7a2eae3b205 Author: Jon Turney Date: Thu May 8 11:40:39 2014 +0100 xwin: Correctly interpret WM_HINTS, WM_NORMAL_HINTS properties on x86_64 Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit d7cef6fbe23381b31c163468f349feee2f1b1eba Author: Jon Turney Date: Thu Mar 13 18:04:17 2014 +0000 xwin: Improve handling of no-decoration motif hint When motif decoration hint asks for no decoration, don't add sysmenu, mimimize or maximimize controls. (This fixes a problem with e.g. fbpanel having a minimize control, but gtk's panel_configure_event() doesn't like the state we put the window into when we minimize it, causing it to spin) Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit f75404be3ad94c8da493688397712c65ea66cb90 Author: Jon Turney Date: Fri Mar 28 16:57:48 2014 +0000 xwin: XGetWMNormalHints() returns non-zero on success XGetWMNormalHints() doesn't actually return a Status value. On success it returns a non-zero value, not Success. Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit 9dc32746f2cd161b512cce8f39c95287bdf1a3a3 Author: Jon Turney Date: Tue Nov 10 10:27:07 2015 +0000 xwin: Fix format warnings when ./configured --enable-debug --enable-windowswm Fix format warnings (mainly pointer format fixes) which show up when ./configured --enable-debug --enable-windowswm Signed-off-by: Jon Turney Reviewed-by: Colin Harrison commit b4ac7b142fa3c536e9b283cfd34b94d82c03aac6 Author: Michel Dänzer Date: Wed Feb 24 16:52:59 2016 +0900 present: Only requeue if target MSC is not reached after an unflip While present_pixmap decrements target_msc by 1 for present_queue_vblank, it leaves the original vblank->target_msc intact. So incrementing the latter for requeueing resulted in the requeued presentation being executed too late. Also, no need to requeue if the target MSC is already reached. This further reduces stutter when a popup menu appears on top of a flipping fullscreen window. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit e7a35b9e16aa12970908f5d55371bb1b862f8f24 Author: Michel Dänzer Date: Wed Feb 24 16:52:58 2016 +0900 present: Requeue if flip driver hook fails and target MSC not reached For flipping, we wait for the MSC before the target MSC and then call the driver flip hook. If the latter fails, we have to wait for the target MSC before falling back to a copy, or else it's executed too early. Fixes glxgears running at unbounded framerate (not synchronized to the refresh rate) in fullscreen if the driver flip hook fails. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit 1a9f8c4623c4e6b6955cb6d5f44d29c244dfd32a Author: Michel Dänzer Date: Wed Feb 24 16:52:57 2016 +0900 present: Move msc_is_(equal_or_)after to the top of present.c To make them usable from any other function in the file. No functional change. Reviewed-by: Chris Wilson Signed-off-by: Michel Dänzer commit 0461bca0cb2f7918c77ed45d2cbc756cf65021be Author: Laércio de Sousa Date: Mon Feb 22 16:04:12 2016 -0300 kdrive/evdev: update keyboard LEDs (#22302) Implement missing parts in kdrive evdev driver for correct update of evdev keyboard LEDs. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22302 [ajax: Fixed deref-before-null-check bug] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 30b7d7995ef70b7473e0fb170eb8ae23b8d1f4a7 Author: Jon TURNEY Date: Mon Feb 22 16:20:00 2016 +0000 Fix build on Cygwin by ensuring WIN32 check triggers only on MinGW The type of fd_mask was changed in Cygwin 2.4.0 headers from 'long' to 'unsigned long'. This exposes an existing problem with winauth.c, which includes Xwindows.h (which includes windows.h, which defines WIN32), before including osdep.h, which causes the now conflicting definition of fd_mask in osdep.h to be exposed: In file included from ../os/osdep.h:198:18: error: conflicting types for ‘fd_mask’ typedef long int fd_mask; /usr/include/sys/select.h:46:23: note: previous declaration of ‘fd_mask’ was here typedef unsigned long fd_mask; Adjust the include guards in osdep.h to make sure we only use WIN32 guarded code when not compiling for Cygwin (i.e. WIN32 && !__CYGWIN__) This isn't a very elegant, but unfortunately appears to be the best solution, since it doesn't seem to be possible to write the test in a positive form. Future work: Should also audit of all the other uses of WIN32 in xserver, and make sure they are correct. Reviewed-by: Adam Jackson Signed-off-by: Jon Turney commit 544b4149268561d3d794aa540172831fa7550a20 Author: Jonas Ådahl Date: Fri Feb 19 15:08:12 2016 +0800 xwayland: Prefix shm tmp file names with xwayland Prefix the temporary file names used for allocating pixmaps with "xwayland-" instead of "weston-". This makes it less confusing while looking at the file names of the currently open fds of the Xwayland process. Reviewed-by: Adam Jackson Signed-off-by: Jonas Ådahl commit 5627708e5f447d0e360bbc9eb8d1c4e58c5046d0 Author: Marc-Andre Lureau Date: Fri Feb 12 22:52:07 2016 +0100 dri2: add virtio-gpu pci ids Add virtio-gpu legacy + 1.0 pci ids, allowing them to use modesetting + glamor with dri2. Signed-off-by: Marc-André Lureau Reviewed-by: Dave Airlie commit e957a2e5dd288f515f3e93724823542c20333f6a Author: Daniel Stone Date: Fri Feb 12 16:36:59 2016 +0000 dix: Add hybrid full-size/empty-clip mode to SetRootClip 216bdbc735 removed the SetRootClip call in the XWayland output-hotplug handler when running rootless (e.g. as a part of Weston/Mutter), since the root window has no storage, so generating exposures will result in writes to invalid memory. Unfortunately, preventing the segfault also breaks sprite confinement. SetRootClip updates winSize and borderSize for the root window, which when combined with RRScreenSizeChanged calling ScreenRestructured, generates a new sprite-confinment area to update it to the whole screen. Removing this call results in the window geometry being reported correctly, but winSize/borderSize never changing from their values at startup, i.e. out of sync with the root window geometry / screen information in the connection info / XRandR. This patch introduces a hybrid mode, where we update winSize and borderSize for the root window, enabling sprite confinement to work correctly, but keep the clip emptied so exposures are never generated. Signed-off-by: Daniel Stone Tested-by: Olivier Fourdan Reviewed-by: Adam Jackson commit dbe8d03c42f01332b3dc41fe9290aed142f1436f Author: Keith Packard Date: Tue Feb 16 20:03:57 2016 -0800 randr: Send ConfigNotify when manual monitor list changes This lets clients know that the layout of the monitors on the screen has changed so they can adapt appropriately. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit eddf848c44349c7ebc7da9957bffb3630f3faaa9 Author: Adam Jackson Date: Wed Feb 10 11:13:04 2016 -0500 dri2: Use the work queue to manage client sleeps In commit e43abdce964f5ed9689cf908af8c305b39a5dd36 Author: Chris Wilson Date: Wed Feb 3 09:54:46 2016 +0000 dri2: Unblock Clients on Drawable release we try to wake up any blocked clients at drawable destruction. But by the time we get there, CloseDownConnection has already torn down state that AttendClient wants to modify. Using ClientSleep instead of IgnoreClient puts a wakeup function on a workqueue, and the queue will be cleared for us in CloseDownClient before (non-neverretain) resource teardown. Tested-by: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit b3e9c534e2b0dc2c9acd2fe9b942e1fc5227339b Author: Adam Jackson Date: Mon Feb 8 17:36:03 2016 -0500 os: unifdef STREAMSCONN Removed from xtrans in 2012, and never wired up in the modular build anyway. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit e43abdce964f5ed9689cf908af8c305b39a5dd36 Author: Chris Wilson Date: Wed Feb 3 09:54:46 2016 +0000 dri2: Unblock Clients on Drawable release If the Window is destroyed by another client, such as the window manager, the original client may be blocked by DRI2 awaiting a vblank event. When this happens, DRI2DrawableGone forgets to unblock that client and so the wait never completes. Note Present/xshmfence is also suspectible to this race. Testcase: dri2-race/manager Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit a722d617a092f08f69086630f5cfb598d4a21cc7 Author: Adam Jackson Date: Wed Dec 9 09:10:13 2015 -0500 autogen: Set a default subject prefix for patches Per discussion at XDC2015, we want this so we can easily distinguish which module a patch is for. There's no way to set this in the server-side config, so setting a default at autogen time is about the best we can do. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7bb64d8c1de9659f11da7917772919b071e9db82 Author: Jan Burgmeier Date: Thu Feb 4 14:06:43 2016 +0100 Fix XineramaQueryScreens for reverse prime Make sure we account for slave CRTCs when building the monitor list, since that's what rrxinerama uses to fake Xinerama geometry. [ajax: Slightly more informative commit message.] Bugzilla: https://bugs.freedesktop.org/92313 Reviewed-by: Dave Airlie commit 87d5534f701242d7c23aa20545a6292a0779c89c Author: Rui Matos Date: Wed Feb 3 16:14:09 2016 +0100 xwayland: Clear pending cursor frame callbacks on pointer enter The last cursor frame we commited before the pointer left one of our surfaces might not have been shown. In that case we'll have a cursor surface frame callback pending which we need to clear so that we can continue submitting new cursor frames. Signed-off-by: Rui Matos Reviewed-by: Bryce Harrington Acked-by: Pekka Paalanen Reviewed-by: Daniel Stone Reviewed-by: Jonas Ådahl commit b7d392931a309d0fe754869efb456ccd0385f3aa Author: Chris Wilson Date: Wed Feb 3 09:54:43 2016 +0000 dri2: Only invalidate the immediate Window upon SetWindowPixmap All callers of SetWindowPixmap will themselves be traversing the Window heirarchy updating the backing Pixmap of each child and so we can forgo doing the identical traversal inside the DRI2SetWindowPixmap handler. Reported-by: Loïc Yhuel Link: http://lists.x.org/archives/xorg-devel/2015-February/045638.html Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit da69f2f15a9917c3ed04e305061683c41338126e Author: Laércio de Sousa Date: Fri Dec 11 11:43:14 2015 -0200 ephyr: don't load ephyr input driver if -seat option is passed When used for single-GPU multi-seat purposes, there's no need to enable ephyr virtual input devices, since Xephyr is supposed to handle its own hardware devices. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 7213e99cbc38a60f0076bc2115b144798ea4c3ba Author: Laércio de Sousa Date: Fri Dec 11 11:43:13 2015 -0200 ephyr: ignore Xorg multiseat command line options Multi-seat-capable display managers commonly pass command-line options like "-novtswitch", "-sharevts", or "-layout seatXXXX" to Xorg server, but Xephyr currently refuses to start if these options are passed to it, which may break Xephyr-based single-GPU multiseat setups. [ajax: shortened summary] Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit edd443f69ea385a957b8eae0b066ad8e77fb947b Author: Laércio de Sousa Date: Fri Dec 11 11:43:11 2015 -0200 kdrive: don't let evdev driver overwrite existing device names KDrive evdev driver deliberately name grabbed devices as "Evdev mouse" or "Evdev keyboard". This patch will make it skip this step if grabbed devices are already named (i.e. from udev). Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 0b80da0d18713df4712c05973388b6226bb0227f Author: Laércio de Sousa Date: Fri Dec 11 11:43:07 2015 -0200 kdrive: set "evdev" driver for input devices automatically, if available. If kdrive input driver "evdev" is available, no other driver was explicitly set for a given input device, and its kernel device node is /dev/input/event*, this patch will make kdrive set "evdev" driver automatically for such device. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 6d6fd688ecf95f2e84f2af276d681ff42f9d5610 Author: Laércio de Sousa Date: Fri Dec 11 11:43:06 2015 -0200 kdrive: fix up NewInputDeviceRequest() implementation This patch simplifies NewInputDeviceRequest() implementation in kinput.c, making use of improved KdParseKbdOptions() / KdParsePointerOptions() and merging several "if (ki)"/"if (pi)" clauses. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 2c3e8768443caa66d78775ea79bb16a5faae3a3c Author: Eric Anholt Date: Wed Jan 27 11:26:16 2016 -0800 glamor: Flip around conditionals in RepeatNone fixups. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit e82c8c81df80de487aa795d69e874a0811c537ea Author: Eric Anholt Date: Wed Jan 27 11:21:05 2016 -0800 glamor: Cut down a bunch of conditional handling for RepeatFix. For hardware that doesn't do actual jumps for conditionals (i915, current vc4 driver), this reduces the number of texture fetches performed (assuming the driver isn't really smart about noticing that the same sampler is used on each side of an if just with different coordinates). No performance difference on i965 with x11perf -magpixwin100 (n=40). Improves -magpixwin100 by 12.9174% +/- 0.405272% (n=5) on vc4. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 2c3273861cdf874b165ce5a1953102187f71b48e Author: Eric Anholt Date: Wed Jan 27 11:15:27 2016 -0800 glamor: Clarify how the repeat values being passed around work. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 990a8ee01324332ee9b4a4bb124ce8f73be24349 Author: Eric Anholt Date: Wed Jan 27 11:10:14 2016 -0800 glamor: Clean up formatting of RepeatFix shader code. All sorts of weird indentation, and some cuddled conditional statements deep in the if tree. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 20cb5b2d65ce63ea7934b77f1520387550c778a8 Author: Eric Anholt Date: Wed Jan 27 10:24:17 2016 -0800 glamor: Clarify some logic in RepeatFix handling. wh ratios are != 1.0 only when large, so with that we can simplify down how we end up with RepeatFix being used. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 07f0d90e4a8b05ef968b1ef47acda7c9f4580340 Author: Eric Anholt Date: Tue Jan 26 17:29:48 2016 -0800 glamor: Simplify the pixmap box looping. We had a double loop across h and w, and passed the current x and y out to callers who then used w to multiply/add to an index. Instead, just single loop across w * h. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 0dbce65b08f4812dcaa4b77cd37aebac334c47a2 Author: Eric Anholt Date: Tue Jan 26 15:56:27 2016 -0800 glamor: Reuse the glamor_program_alpha_* enums for Render. This is a step toward using glamor_program.c for Render acceleration. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 9b676786de32f06aedf9d4c9535c10fda247335a Author: Eric Anholt Date: Tue Jan 26 15:47:01 2016 -0800 glamor: Drop extra SHADER_IN type for no mask present. We can just hand in a constant mask and the driver will optimize away the multiplication for us. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 03f34f85563c81e1655626e10f75fd7e21393c92 Author: Eric Anholt Date: Tue Jan 26 15:19:50 2016 -0800 glamor: Convert XV to using glamor_program.c. One less custom path! By following the common glamor_program.c use pattern, we get the ability to handle large pixmaps as the destination. It's also one less place where glamor_utils.h coordinate transformation happens. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit f368a0ba3aa58e5260d839d11d2f3aef75feaeaf Author: Eric Anholt Date: Tue Jan 26 14:52:08 2016 -0800 glamor: Simplify XV vertex setup. We were clipping the drawn rectangle to each clip box, then expanding the box to a big triangle to avoid tearing, then drawing each triangle to the destination through a scissor. If we're using a scissor for clipping, though, then we don't need to clip the drawn primitive on the CPU in the first place. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 294e45b60d99cf7d11c657288bbe2670b56775f3 Author: Eric Anholt Date: Tue Jan 26 14:18:48 2016 -0800 glamor: Set up XV sampler uniforms once at program build time. No sense doing it on every draw. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 5d7bef2eedfd965359dd4eebb6ab806cdad5b83f Author: Eric Anholt Date: Tue Jan 26 13:39:18 2016 -0800 glamor: Drop dead glamor_pict_format_is_compatible(). This hasn't been used since 2f80c7791bb0b11f261cb1e3e0d89163dcdd0342 (GLAMOR_SEPARATE_TEXTURE removal). Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 4494a450405cf539743cbcfe6907bf5bdd2d80cb Author: Eric Anholt Date: Tue Jan 26 15:08:17 2016 -0800 glamor: Drop comment about dead yInverted flag. Wait long enough, and you don't need to think about it at all. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit f7c24e6ac345aab91df5fc959f239a33f37113b1 Author: Eric Anholt Date: Tue Jan 26 13:34:00 2016 -0800 glamor: Rename the *y_inverted helpers to not say "inverted". Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 1fcb6f4cbf3d6514716435a0e79c0e6d53c31a3a Author: Eric Anholt Date: Tue Jan 26 13:31:59 2016 -0800 glamor: Drop dead *_from_x_coord_y() functions. They've been dead since the yInverted removal (e310387f443b6333edf02c8980daa303505382b4). Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 9ef11f13af7f552dadb4a90c248e525a257e0a2c Author: Eric Anholt Date: Thu Jan 21 16:01:14 2016 -0800 glamor: Clarify when Render fallbacks happen due to an unsupported op. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit b8229cc5f5298a37a4735dd002b0e0ebfc8bc75a Author: Eric Anholt Date: Wed Jan 27 11:35:03 2016 -0800 glamor: Label programs before linking them. i965 does most of its compiling at link time, so our debug output for its shaders didn't have the name on. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 68f236ebd4b268a9e525d623986999d230feb453 Author: Eric Anholt Date: Wed Jan 27 16:11:17 2016 -0800 ephyr: Make sure we have GLX_ARB_create_context before calling it. This should fix aborts()s from epoxy on old software stacks. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Kenneth Graunke commit 623ff251dd025929f5bb6174ca86580c5e707261 Author: Adam Jackson Date: Tue Dec 8 17:41:38 2015 -0500 xephyr: Remove DRI1 This only worked if the backend server supported DRI1, which is stunningly unlikely these days. Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt commit 953b71270cf12c59c8a836c9be403d07fb01fa22 Author: Adam Jackson Date: Tue Dec 8 17:41:37 2015 -0500 xfree86: Build parser for DRI config file subsection unconditionally This applies regardless of which DRI you're asking for. Worse, leaving it out means breaking the config file syntax in a pointless way, since non-DRI servers can safely just parse it and ignore it. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1a48a5863e4bceee6b99c1feda1b2c584ff3657c Author: Adam Jackson Date: Tue Dec 8 17:41:36 2015 -0500 xfree86: Remove ancient DRI build instructions Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d8ecbe563991cc689e95a8cb9d510e920eaceea0 Author: Dave Airlie Date: Wed Jan 27 16:46:06 2016 -0800 ephyr: catch X errors if we try to create a core context and fail. This stops Xephyr failing on GLXBadFBConfig. Signed-off-by: Dave Airlie Reviewed-by: Dave Airlie commit 50ca286d79f6304b972ea74487308e7794a170fb Author: Timo Aaltonen Date: Wed Jan 27 14:18:50 2016 +0200 dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesa Adds Skylake, Kabylake and Broxton allowing them to use modesetting + glamor with dri2. Signed-off-by: Timo Aaltonen Reviewed-by: Andreas Boll commit bf23db42a4e5943129501223a47b48884cdeb62f Author: Adam Jackson Date: Wed Jan 27 11:50:13 2016 -0500 modesetting: Require sufficiently new libdrm Bugzilla: https://bugs.freedesktop.org/93883 Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Julien Cristau commit 6978c8ee666a9224213173e7680e2d71b1094bab Author: Dave Airlie Date: Tue Jan 19 08:06:25 2016 +1000 xwayland: add support for use core profile for glamor. (v2) This adds support to Xwayland to try and use OpenGL core profile for glamor first. v1.1: use version defines. v2: let glamor work out core profile itself. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 79c3925532bc0d098c9a4da6d5117bdada56e0af Author: Dave Airlie Date: Tue Jan 19 07:59:59 2016 +1000 glamor: add core profile support to EGL glamor. (v2) v1.1: use version defines. v2: let glamor work it out itself Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 98c3504dcfcec227b9c7798a0bd287941cec0691 Author: Keith Packard Date: Wed Sep 10 19:05:08 2014 -0700 ephyr: Create 3.1 core profile context if possible (v3) On desktop GL, ask for a 3.1 core profile context if that's available, otherwise create a generic context. v2: tell glamor the profile is a core one. v2.1: add/use GL version defines v3: let glamor work out core itself Signed-off-by: Keith Packard Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 564d9f0f8c17bb3c13aa3ca36da7825454dc5de3 Author: Dave Airlie Date: Mon Jan 11 14:00:35 2016 +1000 glamor: add core profile support. (v2) Glamor works out from the profile if it is core. This flag is used to disable quads for rendering. v1.1: split long line + make whitespace conform (Michel) v1.2: add GL 3.1 version defines v2: move to having glamor work out the profile. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit e6754dcb59ee21abb42421a28f4e467295584f67 Author: Keith Packard Date: Wed Sep 10 19:02:55 2014 -0700 glamor: Use GL_RED instead of GL_ALPHA if we have texture_swizzle (v3) GL_RED is supported by core profiles while GL_ALPHA is not; use GL_RED for one channel objects (depth 1 to 8), and then swizzle them into the alpha channel when used as a mask. [airlied: updated to master, add swizzle to composited glyphs and xv paths] v2: consolidate setting swizzle into the texture creation code, it should work fine there. Handle swizzle when setting color as well. v3: Fix drawing to a8 with Render (changes by anholt, reviewed by airlied). Signed-off-by: Keith Packard Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit 5042b0652b9fe5fed57a233880c3429ba390d86d Author: Eric Anholt Date: Wed Jan 20 12:33:25 2016 -0800 glamor: Drop duplicated GLAMOR_DEFAULT_PRECISIONs in render accel. We only need it once at the top of the shader, so just put it there. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 1fd82c764d5b24107e60f2173e30e5d24a2f2667 Author: Dave Airlie Date: Tue Jan 19 02:01:09 2016 +0000 glamor: don't do copy if we have 0 boxes to copy. This happens if you run twm + mplayer + xclock and drag the clock over the mplayer. If we don't catch it, we cause an illegal draw elements command to be passed to GL. Signed-off-by: Dave Airlie Reviewed-by: Eric Anholt commit e7308b6c77561df44c04f81509f8ada678705d94 Author: Dave Airlie Date: Tue Jan 12 18:13:46 2016 +1000 glamor: Add support for CA rendering in a single pass. It's been on the list to add dual source blending support to avoid the two pass componentAlpha code. Radeon has done this for a while in EXA, so let's add support to bring glamor up to using it. This adds dual blend to both render and composite glyphs paths. Initial results show close to doubling of speed of x11perf -rgb10text. v2: Fix breakage of all of CA acceleration for systems without GL_ARB_blend_func_extended. Add CA support for all the ops we support in non-CA mode when blend_func_extended is present. Clean up some comments and formatting. (changes by anholt) Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt commit cab14a9a08ff06bc4cbef79c7be8f1d07c07ebf9 Author: Eric Anholt Date: Thu Jan 21 12:01:02 2016 -0800 glamor: Drop the composite_with_copy path entirely. I originally inherited this from the EXA code, without determining whether it was really needed. Regular composite should end up doing the same thing, since it's all just shaders anyway. To the extent that it doesn't, we should fix composite. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 510c8605641803f1f5b5d2de6d3bb422b148e0e7 Author: Eric Anholt Date: Thu Jan 21 11:30:15 2016 -0800 glamor: Fix copy-like Render operations between 15 and 16 depth. Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up failing, unless you're doing a straight copy at the same bpp where the misinterpretation matches on both sides. Fixes rendercheck/blend/over and renderhceck/blend/src in piglit. Please cherry-pick this to active stable branches. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit bc415fb1e0031ad23bda6e9c3f4664532876a0e5 Author: Adam Jackson Date: Wed Jan 20 15:43:10 2016 -0500 glx: Fix GLX_EXT_create_context_es2_profile support As of v4 of this extension, any GLES version number may be requested (to enable GLES3 and later). To comply with this, simply remove the API version checks and leave it to the DRI driver to validate. This happens to also enable using GLES1 in direct contexts, so if that's the dire situation you find yourself in, your client driver at least stands a chance of working. v4 also specifies that both extension strings should be advertised for compatibility with clients written against v1 of the extension spec, so add the es_profile bit to the extension list and enable it whenever we would enable es2_profile. Reviewed-by: Ilia Mirkin Signed-off-by: Adam Jackson commit 49aa5e3ea4eecea0562c05a4e52962985a56e510 Author: Keith Packard Date: Wed Sep 10 16:17:52 2014 -0700 glamor: Use vertex array objects Core contexts require the use of vertex array objects, so switch both glamor and ephyr/glamor over. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit d99204fb5e09ce7be36485d4226f7ad6d6eb24cc Author: Dave Airlie Date: Tue Jan 19 10:34:14 2016 +1000 glamor/xv: add vbo support (v2.1) This converts the Xv code to using VBOs instead of client ptrs. This is necessary to move towards using the core profile later. v2: put all boxes into single vbo, use draw arrays to offset things. (Eric) v2.1: brown paper bag with releasing vbo. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 5582ad1b9b29934498cf3fef305d3a988130cd52 Author: Dave Airlie Date: Mon Jan 11 14:00:04 2016 +1000 glamor: use vbos in gradient/picture code. This converts two client arrays users to using vbos, this is necessary to move to using core profile later. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 25eca80265654cfbf8768024e027426fedeb0918 Author: Michel Dänzer Date: Fri Jan 15 18:22:21 2016 +0900 present: Handle wraparound when comparing MSC values When a window moves from one CRTC to another, present_window_to_crtc_msc updates window_priv->msc_offset according to the delta between the current MSC values of the old and new CRTC: window_priv->msc_offset += new_msc - old_msc; window_priv->msc_offset is initially 0, so if new_msc < old_msc, window_priv->msc_offset wraps around and becomes a large number. If the window_msc parameter passed in is small (in particular if it's 0, such as is the case when the client just wants to know the current window MSC value), the returned CRTC MSC value may still be a large number. In that case, the existing MSC comparisons in pixmap_present weren't working as intended, resulting in scheduling a wait far into the future when the target MSC had actually already passed. This would result in the client (e.g. the Chromium browser) hanging when moving its window between CRTCs. In order to fix this, introduce msc_is_(equal_or_)after helper functions which take the wraparound into account for comparing two MSC values. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Reviewed-by: Martin Peres Signed-off-by: Keith Packard commit 1db6de7b6a6ee240eb50a13fe1fa1e135d7cb93b Author: Michel Dänzer Date: Tue Jan 12 15:42:47 2016 +0900 glamor: Disable debugging messages other than GL API errors According to Nicolai Hähnle, the relevant specification says "All messages are initially enabled unless their assigned severity is DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we don't want to get. Failing that, we were accidentally logging e.g. shader stats intended for shader-db. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93659 Tested-by: Laurent Carlier Reviewed-by: Emil Velikov Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt commit 8116fd8a760b5935645def1b2c3b155c05927850 Author: Dave Airlie Date: Tue Jan 12 14:19:24 2016 +1000 glamor: store old fonts in double width textures. There is a problem with some fonts that the height necessary to store the font is greater than the max texture size, which causes a fallback to occur. We can avoid this by storing two macro columns side-by-side in the texture and adjusting the calculations to suit. This fixes xfd -fn -*-*-*-*-*-*-*-*-*-*-*-*-*-* falling back here, when it picks -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1 Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 64081d0eacf3e53a029b8e8b63096cc153e98549 Author: Dave Airlie Date: Mon Jan 11 17:02:57 2016 +1000 glamor: fallback if font is too large for FBO size. running xfontsel on haswell here, with a max texture size of 8kx8k, one font wants 9711 height. This fallsback to sw in this case. A proper solution probably involves using an array texture. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 6dcb73375e0ce389315d55587623eb84e9d13543 Author: Adam Jackson Date: Wed Jan 6 10:03:23 2016 -0500 os: Failure to remove a non-existent log file is not an error Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit 862cbf4c870c9ed913206c6ef4988bdb470e1c39 Author: Thomas Klausner Date: Wed Nov 11 13:32:05 2015 +0100 Fix build when XSERVER_PLATFORM_BUS is not defined. Reviewed-by: Adam Jackson Signed-off-by: Thomas Klausner commit 63f83d1b7f496d05b409352749cdb6674d71cf80 Author: Thomas Klausner Date: Tue Jan 5 12:51:41 2016 -0500 Fix uninitialized variable warnings reported by clang v2: Move initializing pos into the first clause of the for statement. We have to keep this macro equivalent to a plain for statement from the user's perspective, otherwise callers need to {} things to keep control flow correct. [ajax] Signed-off-by: Thomas Klausner Acked-by: Michel Dänzer commit ba71b69f94f00a6f6910597185610668e79c10be Author: Alan Coopersmith Date: Fri Jan 1 17:34:41 2016 -0800 Avoid segfault in CloseWellKnownConnections when using -displayfd When -displayfd is looping through the possible display ids to use, if it can't open all the listening sockets for one (say when :0 is already in use), it calls CloseWellKnownConnections to close all the ListenTransConns entries before the point that ListenTransFds was allocated & initialized, so CloseWellKnownConnections would segfault trying to read entries from a NULL ListenTransFds pointer. Introduced by commit 7b02f0b8 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit edcb6426f20c3be5dd5f50b76a686754aef2f64e Author: Alan Coopersmith Date: Fri Jan 1 18:11:14 2016 -0800 Use unique logfile names when starting server with -displayfd Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93212 Previously all X servers started with -displayfd would overwrite Xorg.0.log - now a temporary name of Xorg.pid-.log is used until after -displayfd finds an open display - then it is renamed to the traditional Xorg..log name. Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit fe8562f5316d8c74ca074ad145295c65ddff5fc2 Author: Alan Coopersmith Date: Fri Jan 1 18:10:08 2016 -0800 modesetting should not reference gbm when it's not defined Fixes build errors of: present.c: In function 'ms_do_pageflip': present.c:410:17: error: 'drmmode_bo' has no member named 'gbm' new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front); ^ present.c:412:22: error: 'drmmode_bo' has no member named 'gbm' if (!new_front_bo.gbm) { ^ present.c: In function 'ms_present_check_flip': present.c:536:36: error: 'drmmode_bo' has no member named 'gbm' if (drmmode_crtc->rotate_bo.gbm) ^ Introduced by commit 13c7d53d Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 792176417f7e62a99c4f07801f74f804d6080de2 Author: Adam Jackson Date: Tue Jan 5 12:03:54 2016 -0500 Revert "Fix uninitialized variable warnings reported by clang" Crashes at startup: dmt:~/git/xserver% ./hw/kdrive/ephyr/Xephyr :1 (EE) Backtrace: (EE) 0: ./hw/kdrive/ephyr/Xephyr (OsSigHandler+0x29) [0x47c8f9] (EE) 1: /lib64/libc.so.6 (__restore_rt+0x0) [0x7f38d4de6b1f] (EE) 2: ./hw/kdrive/ephyr/Xephyr (InitNotifyFds+0x17) [0x478697] (EE) 3: ./hw/kdrive/ephyr/Xephyr (OsInit+0x1e) [0x47c99e] (EE) 4: ./hw/kdrive/ephyr/Xephyr (dix_main+0x11c) [0x446efc] (EE) 5: /lib64/libc.so.6 (__libc_start_main+0xf0) [0x7f38d4dd2580] (EE) 6: ./hw/kdrive/ephyr/Xephyr (_start+0x29) [0x427099] (EE) 7: ? (?+0x29) [0x29] (EE) (EE) Segmentation fault at address 0x0 This reverts commit a221d4737c167589da44595c795d54f2c36b439a. commit a221d4737c167589da44595c795d54f2c36b439a Author: Thomas Klausner Date: Wed Dec 16 08:36:24 2015 +0100 Fix uninitialized variable warnings reported by clang Signed-off-by: Thomas Klausner Acked-by: Michel Dänzer commit f3593918a0507cc080875788b2776ebe4f57c694 Author: Peter Hutterer Date: Wed Dec 16 09:21:39 2015 +1000 xfree86: move check for driver->PreInit up No real change, but if the driver is broken and doesn't provide a PreInit function, then we don't need to worry about logind. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit fc4fbe8224fdc8d7774120b6e978c652a70a50ee Author: Peter Hutterer Date: Fri Dec 11 09:31:30 2015 +1000 xfree86: add NoMatchFoo directives for InputClass sections InputClass sections use various MatchFoo directives to decide which device to apply to. This usually works fine for specific snippets but has drawbacks for snippets that apply more generally to a multitude of devices. This patch adds a NoMatchFoo directive to negate a match, thus allowing snippets that only apply if a given condition is not set. Specifically, this allows for more flexible fallback driver matching, it is now possible to use a snippet that says "assign driver foo, but only if driver bar wasn't already assigned to it". For example: Section "InputClass" Identifier "libinput for tablets" MatchIsTablet "true" NoMatchDriver "wacom" Driver "libinput" EndSection The above only assigns libinput to tablet devices if wacom isn't already assigned to this device, making it possible to select a specific driver by installing/uninstalling it. Signed-off-by: Peter Hutterer Reviewed-by: Benjamin Tissoires commit eb671b804e902011ba901d0833a215799177bad0 Author: Peter Hutterer Date: Fri Dec 11 07:26:02 2015 +1000 xfree86: whitespace fix Signed-off-by: Peter Hutterer commit 3d68d1f26709ecb5ce22a9baa0d3d8162574ed6a Author: Siim Põder Date: Mon Jun 8 22:14:12 2015 +0000 vfb: add randr support (v2) The motivation for getting this is chrome remote desktop that runs under Xvfb and wants to use RANDR to adjust screen size according to the remote desktop client screen size. Apparently there are other use cases as well, the bug mentions gnome-settings-daemon testing. [ajax: massaged commit message] Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26391 Reviewed-by: Adam Jackson Signed-off-by: Lambros Lambrou Signed-off-by: Mike Frysinger Signed-off-by: Michal Srb Signed-off-by: Siim Põder commit e98b36bc69d805ab52aba95b070a614427d46e05 Author: Adam Jackson Date: Tue Dec 8 16:22:16 2015 -0500 randr: Silence unused variable warning Signed-off-by: Adam Jackson Reviewed-by: Michel Dänzer commit 8c49c883dc196ea57e3f64425c2a5b0a8ce3ba75 Author: Adam Jackson Date: Tue Dec 8 15:08:34 2015 -0500 sync: Don't allow creating a system counter before sync is initialized It probably doesn't work very well since there's other extension setup we're not doing on this path, and in any event it's not a thing that happens currently. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit b5f04a79df8b5aab8b558461261d14721f0b3e41 Author: Adam Jackson Date: Tue Dec 8 15:56:17 2015 -0500 glxproxy: Silence shadowed-variable warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 18729a211a5fdd4f733e44eded754a0e6210b687 Author: Adam Jackson Date: Tue Dec 8 15:53:35 2015 -0500 glxproxy: Silence set-but-unused-variable warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit bc996fa4e3c06f65eafe0a88ef491dbf01f31422 Author: Adam Jackson Date: Tue Dec 8 16:04:44 2015 -0500 dmx: Run 'doxygen -u' to upgrade the doxygen config file Also change the dot font setting back to the default of Helvetica as doxygen no longer ships FreeSans. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit a55e0bc56fd8f9da8f066dc344af19535dd092ca Author: Adam Jackson Date: Tue Dec 8 16:00:19 2015 -0500 dmx: Silence unused variable warning in dmxcompat Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 2730ccb803c55af74dbdd1bfd982fc23e643554d Author: Adam Jackson Date: Tue Dec 8 15:37:12 2015 -0500 dmx: Silence lex/yacc-related config parser warnings Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 718223d27452862eedcf1bee6278eae6040d45ea Author: Laércio de Sousa Date: Thu Dec 3 08:05:59 2015 -0200 systemd-logind.c: don't parse VT settings for non-seat0 X servers Since non-seat0 X servers no longer touch VTs, I believe these settings are unnecessary. Signed-off-by: Laércio de Sousa Reviewed-by: Hans de Goede commit 7c0ba32ddd5f1d5c65279365fa307dec3433caf3 Author: Bob Ham Date: Fri Dec 4 12:30:47 2015 +0000 xserver: Fix configure.ac check for libsystemd/-daemon The configure script looks for the libsystemd-daemon pkg-config module. If the configure script finds it, the script will add libsystemd-daemon to a list of modules which are used to consolidate CFLAGS and LIBS. The check for libsystemd-daemon was altered to fallback to libsystemd if libsystemd-daemon was not found (libsystemd-daemon was brought into libsystemd). Unfortunately, the configure script still adds "libsystemd-daemon" to the list of modules to consolidate, instead of "libsystemd". With this patch, we set a variable depending on which pkg-config module is found and add that to the module list instead. Changes since v1: - Rearranged logic so that we do a versioned check for libsystemd first, then look for libsystemd-daemon. - Cleaned up the check a bit, only performing the module checks if we don't have --with-systemd-daemon=no, in a similar style to --with-dtrace. - Changed the variable name to LIBSYSTEMD_DAEMON as per feedback. Reviewed-by: Adam Jackson Signed-off-by: Bob Ham commit 530d3e5ca0a02039b04ec6a677bbb4e05b78e5f4 Author: Michel Dänzer Date: Thu Dec 3 17:04:09 2015 +0900 prime: Damage full destination rectangle when we start dirty tracking This makes sure that the destination pixmap contents will be fully initialized. Without this, a PRIME output starts out with garbage. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 2a52c06e235bd79f91851121f53f7c1808fde321 Author: Adam Jackson Date: Mon Dec 7 17:03:02 2015 -0500 x86emu: Squash a warning Apologies, should have caught this one when applying the previous x86emu patch. Signed-off-by: Adam Jackson commit 59b618227ebd024e57720aaaea17596953f5b80e Author: Julian Pidancet Date: Sun Jul 1 18:49:25 2012 +0100 x86emu: Correctly handle 0x66 prefix for some instructions (Sorry for double posting) I repost this patch because I havn't got any replies from maintainers since I posted the initial patch back in March. Some instructions are not emulated correctly by x86emu when they are prefixed by the 0x66 opcode. I've identified problems in the emulation of these intructions: ret, enter, leave, iret and some forms of call. Most of the time, the problem is that these instructions should push or pop 32-bit values to/from the stack, instead of 16bit, when they are prefixed by the 0x66 special opcode. The SeaBIOS project aims to produce a complete legacy BIOS implementation as well as a VGA option ROM, entirely written in C and using the GCC compiler. In 16bit code produced by the GCC compiler, the 0x66 prefix is used almost everywhere. This patch is necessary to allow the SeaBIOS VGA option ROM to function with Xorg when using the vesa driver. SeaBIOS currently use postprocessing on the ROM assembly output to replace the affected instruction with alternative unaffected instructions. This is obviously not very elegant, and this fix in x86emu would be more appropriate. v2: - Decrement BP instead of EBP in accordance with the Intel Manual - Assign EIP instead of IP when poping the return address from the stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret - When poping EFLAGS from the stack in iret in 32-bit operand size mode, apply some mask to preserve Read-only flags. v3: - Rebase Reviewed-by: Adam Jackson Signed-off-by: Julian Pidancet commit 72f0724cdc65dc9abbbf70b9feb6cce7c2b9f8a0 Author: Chris Wilson Date: Sun Feb 8 09:47:42 2015 +0000 present: Do not replace Pixmaps on redirected Window on unflip When unflipping, we may find that our flip window has been redirected. If we replace the redirected Window with the Screen Pixmap we then have mutliple fullscreen Windows believing that their own the Screen Pixmap - multiple fullscreen Windows that are being flipped by Clients, and so continue to flip causing popping between e.g. the compositor and the game. [ajax: Fix up present_execute() hunk to account for changes introduced in fe07ec19e212a68076560d243a2a935c54589068] Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit 180b09912c0d2c4a43b5a08678bcad4b818924c7 Author: Chris Wilson Date: Sun Feb 8 09:47:41 2015 +0000 present: When cancelling a pending synchronous flip, requeue it The vblank event request for a synchronous flip is scheduled for the vblank before the target flip msc (so that the flip itself appears at the right frame). If we cancel that flip and so wish to schedule a copy instead, that copy needs to be postponed by a frame in order for it be performed at the requested time. Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit b2d55338f6b8f43ebcb49994abad123a797248cf Author: Chris Wilson Date: Sun Feb 8 09:47:40 2015 +0000 present: Requery pending flips with the right sync_flip mode When verifying whether a pending flip is still valid, we need to pass down the orignal sync_flip mode (e.g. if the driver only supports sync flips, verifying a async flip will falsely fail). Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit 548a3d5fd69bb059bbaf26ededdc94c212712cd7 Author: Dave Airlie Date: Mon Nov 16 09:05:27 2015 +1000 modesetting: create entities for pci and old probe. (v2) This moves the code from the platform case into a common function, and calls that from the other two. v2: Emil convinced me we don't need to lookup pEnt here, so let's not bother. Reported-by: Mark Kettenis Reviewed-by: Mark Kettenis Signed-off-by: Dave Airlie commit 771016f0705909c908917b4ccaeafc950ba93c05 Author: Dave Airlie Date: Mon Nov 16 09:05:26 2015 +1000 modesetting: drop platform_dev pointer. This isn't used anywhere, so no point storing it until we need it. Reviewed-by: Mark Kettenis Signed-off-by: Dave Airlie commit 19b0249a5e07b9fc008e5d8709d7e489874415de Author: Arkadiusz Miśkiewicz Date: Mon Nov 16 11:06:57 2015 +0100 Xorg.wrap: activate libdrm based detection for KMS drivers Xorg.wrap includes code guarded with WITH_LIBDRM for detecting KMS drivers. Unfortunately it is never activated since code missed to include file which defines WITH_LIBDRM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92894 Signed-off-by: Arkadiusz Miśkiewicz Reviewed-by: Michel Dänzer Signed-off-by: Hans de Goede commit 5bccde749db93296b7784e4cdc5e54c4443656c1 Author: Michel Dänzer Date: Wed Dec 2 18:21:12 2015 +0900 randr: Stop dirty tracking for shared pixmap being destroyed Otherwise, we leave a dangling reference to the destroyed pixmap in the master screen's pixmap_dirty_list. Fixes regression from commit cf5d6414 ("randr: Factor out shared pixmap destruction"). Reviewed-by: Adam Jackson Signed-off-by: Michel Dänzer commit 2e3d9623ae3f562f81e513cb183ca1b1b68f279c Author: Adam Jackson Date: Wed Dec 2 10:42:36 2015 -0500 Revert "hw/xfree86: Use NotifyFd for device and other input fd wakeups" Reported to break libinput: http://lists.freedesktop.org/archives/xorg-devel/2015-December/048091.html This reverts commit 1df07dc36ca145c59f51176d9ab2651112506d75. commit 7b02f0b87ec2fa0cc5a65307a1fd55c671cec884 Author: Keith Packard Date: Wed Nov 11 22:02:17 2015 -0800 os: Use NotifyFd interface for listen descriptors Replace the custom path for dealing with new incoming connections with the general-purpose NotifyFd API. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 1df07dc36ca145c59f51176d9ab2651112506d75 Author: Keith Packard Date: Wed Nov 11 22:02:16 2015 -0800 hw/xfree86: Use NotifyFd for device and other input fd wakeups Remove code in xf86Wakeup for dealing with device and other input and switch to using the new NotifyFd interface. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e51ea53b26bd9ec05b9209825960af28d0b6bbe1 Author: Keith Packard Date: Wed Nov 11 22:02:15 2015 -0800 render: Use OsTimer for animated cursor timing This replaces the block/wakeup handlers with an OsTimer. This also avoids problems with performing rendering during the wakeup handler. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 49c0f2413d32fdfe36e45861fcb32aaeab633094 Author: Keith Packard Date: Wed Nov 11 22:02:14 2015 -0800 os/xdmcp: Replace xdmcp block/wakeup handlers with timer and NotifyFd This removes the block and wakeup handlers and replaces them with a combination of a NotifyFd callback and timers. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6a121f55381ecbb9cdaaef36ba6135890f3e006f Author: Keith Packard Date: Wed Nov 11 22:02:13 2015 -0800 Xext/xselinux: Use NotifyFd interface Replace block/wakeup handlers with SetNotifyFd. Much nicer now. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit f933a1b38ed1c65cc39fce1ee37aa18e3022c3f0 Author: Keith Packard Date: Mon Nov 23 17:36:53 2015 -0800 hw/xwayland: Use NotifyFd handler to monitor wayland socket Replace the block/wakeup handler with a NotifyFd callback instead. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8543d4d8bc0526d1c910913b76259e5dee108e74 Author: Keith Packard Date: Wed Nov 11 22:02:11 2015 -0800 modesetting: Use NotifyFd for drm event monitoring Replace the block/wakeup handlers with a NotifyFd callback. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 58354fcf472cefc35b9c19cf84bf079cadfa2e1d Author: Keith Packard Date: Wed Nov 11 22:02:10 2015 -0800 kdrive/ephyr: Use NotifyFd for XCB connection input [v2] Eliminates polling every 20ms for device input. v2: rename ephyrPoll to ephyrXcbNotify and fix the API so it can be used directly for SetNotifyFd. Thanks to Daniel Martin Reviewed-by: Adam Jackson Signed-off-by: Keith Packard Cc: Daniel Martin commit 483c2a1adf044ba1da844687b908c1c802060d2d Author: Keith Packard Date: Wed Nov 11 22:02:09 2015 -0800 hw/kdrive: Use NotifyFd for kdrive input devices This switches the kdrive code to use FD notification for input devices, rather than the block and wakeup handlers. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 21c1680e83865a52d88cf8c80fb236d212931e5c Author: Keith Packard Date: Wed Nov 11 22:02:08 2015 -0800 hw/kdrive: Use NotifyFd interface for kdrive/linux APM monitoring Replace the block/wakeup handlers with a NotifyFd callback Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8c8f3567fe4b4e372e22420810443c43e008da2c Author: Keith Packard Date: Wed Nov 11 22:02:07 2015 -0800 config: Use NotifyFd interface for udev This uses the NotifyFd interface to monitor the udev file descriptor rather than adding another block/wakeup handler Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf920b2390dc27947f87dd0b228518290a5ed85d Author: Keith Packard Date: Wed Nov 11 22:02:06 2015 -0800 config: Use NotifyFd for dbus interface This uses the NotifyFd interface to monitor the dbus socket rather than a block/wakeup handler. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 91ea0965dd4dfeba0a914c47ad4a64768e983b1b Author: Keith Packard Date: Wed Nov 11 22:02:04 2015 -0800 dix: Move InitFonts up above screen initialization Font initialization was split into two stages, the first was to set up font privates with a call to ResetFontPrivateIndex, then much later the call to InitFonts to set up all of the FPEs. Doing the full font initialization before initializing the video drivers means that we can move the call to ResetFontPrivateIndex inside InitFonts. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 4020aacd1fc5b9c63369f011aeb9120af9c55218 Author: Keith Packard Date: Wed Nov 11 22:02:03 2015 -0800 os: Implement support for NotifyFd X_NOTIFY_WRITE This adds the ability to be notified when a file descriptor is available for writing. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0c41b7af4ab0c8d22b88f201293f59524d1e7317 Author: Keith Packard Date: Wed Nov 11 22:02:02 2015 -0800 os: Add NotifyFd interfaces This provides a callback-based interface to monitor file descriptors beyond the usual client and device interfaces. Modules within the server using file descriptors for reading and/or writing can call Bool SetNotifyFd(int fd, NotifyFdProcPtr notify_fd, int mask, void *data); mask can be any combination of X_NOTIFY_READ and X_NOTIFY_WRITE. When 'fd' becomes readable or writable, the notify_fd function will be called with the 'fd', the ready conditions and 'data' values as arguments, When the module no longer needs to monitor the fd, it will call void RemoveNotifyFd(int fd); RemoveNotifyFd may be called from the notify function. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e10ba9e4b52269b2ac75c4802dce4ca47d169657 Author: Keith Packard Date: Wed Nov 11 22:02:01 2015 -0800 Remove non-smart scheduler. Don't require setitimer. This allows the server to call GetTimeInMillis() after each request is processed to avoid needing setitimer. -dumbSched now turns off the setitimer. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c7f4aef8f45e500c900d59f68c653477148907ea Author: agoins Date: Wed Nov 25 18:39:31 2015 -0800 randr: Cleanup rrSetupPixmapSharing() protopix is completely redundant with mscreenpix. Get rid of it. We don't need rrScrPriv, so remove it. [ajax: also squash an unused variable in RRCrtcDetachScanoutPixmap, though it'll come back when the rest of this series lands] Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit 8d3f0e964e399dcfa8eb5e85d405217fdc5dbcd4 Author: agoins Date: Wed Nov 25 18:39:27 2015 -0800 xf86: Bump ABI version to 21 Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit 7006b4e7ff759c899d5391b7d12db889cbc0b535 Author: agoins Date: Wed Nov 25 18:39:26 2015 -0800 randr: Factor out shared pixmap creation The old version of rrCreateSharedPixmap(), in addition to actually creating a shared pixmap with scanout, also set up pixmap tracking on the source driver. I will be needing to create multiple shared pixmaps for PRIME double buffering, so factor the part that does shared pixmap creation into its own function, the new rrCreateSharedPixmap(). Rename the old rrCreateSharedPixmap() to rrSetupPixmapSharing(), a function that replicates the old functionality of rrCreateSharedPixmap() using the new rrCreateSharedPixmap(). Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit cf5d6414e0c21140f763d618bde1e91ad2b1cb49 Author: agoins Date: Wed Nov 25 18:39:25 2015 -0800 randr: Factor out shared pixmap destruction Shared pixmap destruction is done by unrefing the master pixmap twice: once for the original reference, and once for the reference implicitly added by PixmapShareToSlave. Then, unrefing the slave pixmap once. When I add PRIME double buffering and synchronization, I will need to do this in multiple places. To avoid duplication of code and comments explaining it everywhere, factor it out into its own function and use that in place of where it was before. Reviewed-by: Adam Jackson Signed-off-by: Alex Goins commit ab9837cc6a11f46b9df780f131b69de3822c3dd9 Author: Olivier Fourdan Date: Tue Dec 1 17:16:03 2015 +0100 xwayland: Update screen size on output removal When unplugging an output, it's still listed in xrandr and the size of the root window still includes the removed output. The RR output should be destroyed when its Wayland counterpart is destroyed and the screen dimensions must be updated in both the done and the destroy handlers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92914 Signed-off-by: Olivier Fourdan Reviewed-by: Marek Chalupa commit 07941a50a547f2ca094e242588298695f48903ed Author: Jonas Ådahl Date: Wed Oct 7 12:01:53 2015 +0800 xwayland: Always update the wl_pointer cursor on pointer focus In Wayland, a client (in this case XWayland) should set the cursor surface when it receives pointer focus. Not doing this will leave the curser at whatever it was previously. When running on XWayland, the X server will not be the entity that controls what actual pointer cursor is displayed, and it wont be notified about the pointer cursor changes done by the Wayland compositor. This causes X11 clients running via XWayland to end up with incorrect pointer cursors because the X server believes that, if the cursor was previously set to the cursor C, if we receive Wayland pointer focus over window W which also has the pointer cursor C, we do not need to update it. This will cause us to end up with the wrong cursor if cursor C was not the same one that was already set by the Wayland compositor. This patch works around this by, when receiving pointer focus, getting the private mipointer struct changing the "current sprite" pointer to an invalid cursor in order to trigger the update path next time a cursor is displayed by dix. Reviewed-by: Adam Jackson Signed-off-by: Jonas Ådahl commit 51a4399b94f9adfac5f7718d4cbf73f793dcca56 Author: Olivier Fourdan Date: Mon Nov 23 08:51:48 2015 +0100 xwayland: Do not set root clip when rootless Otherwise the server may try to draw onto the root window when closing down, but when running rootless the root window has no storage thus causing a memory corruption. Thanks to Adam Jackson for helping tracking this down! Reviewed-by: Adam Jackson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93045 Signed-off-by: Olivier Fourdan Tested-by: Marek Chalupa commit 5b2ca3413203210d112a08a4e20d14382abae437 Author: Marek Chalupa Date: Fri Nov 27 14:27:46 2015 +0100 xwayland: check if creating xwl_output succeeded check return values of RR.*Create calls v2. do not bail out if we don't have any output Signed-off-by: Marek Chalupa Reviewed-by: Olivier Fourdan commit 646ebea456b4c5251ae997eab8d9b971f97de836 Author: Marek Chalupa Date: Fri Nov 27 14:59:27 2015 +0100 xwayland: fix memory leaks on error paths in xwl_realize_window don't leak memory when realizing window fails v2. take care of all memory allocation and return values, not just one leak Signed-off-by: Marek Chalupa Reviewed-by: Olivier Fourdan commit e6b106715f24112d1dc7a84c6e37df4b5debb2d0 Author: Richard PALO Date: Tue Nov 17 07:02:07 2015 +0100 Replace 'sun' with '__sun' Globally replace #ifdef and #if defined usage of 'sun' with '__sun' such that strict ISO compiler modes such as -ansi or -std=c99 can be used. Signed-off-by: Richard PALO Reviewed-by: Alan Coopersmith commit 44d0fd435a4eaf45e252b4f00409152a6d599dfc Author: Egbert Eich Date: Tue Nov 24 17:37:36 2015 +0100 kdrive/UnregisterFd: Fix off by one The number of FDs has been decremented already, therefore the number contained the index of the top one that is to me moved down. This problem was introduced by: commit 1110b71e360195aab040d835b54540ab558638c5 Author: Chris Clayton kdrive: fix build error on gcc 4.8 for out-of-bounds array access The reason for the warning was likely a confused compiler. Hoping to reduce the confusion by moving the decrement behind the end if the copy loop. Signed-off-by: Egbert Eich Reviewed-by: Peter Hutterer commit eb36924ead40564325aa56d54a973dc8fb4eae83 Author: Adam Jackson Date: Tue Nov 24 08:31:21 2015 -0500 dix: Remove redundant ChangeWindowProperty Use dixChangeWindowProperty(serverClient, ...) instead. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 4affa75a90d2455c81087b930126ad7adfd019f0 Author: Adam Jackson Date: Thu Nov 19 12:21:08 2015 -0500 xnest: Fix needless build dependency on xcb-util-keysyms This was added in: commit 43014795087a0a8774dd9687f5967329b15f06a2 Author: Olivier Fourdan Date: Mon Jan 5 16:44:22 2015 +0100 Synchronize capslock in Xnest and Xephyr Which is fine if you're building both, but if you don't happen to have xcb-util-keysyms' headers installed Xnest will configure as enabled but fail to build. Fortunately has a corresponding #define, so use that instead. Signed-off-by: Adam Jackson Reviewed-by: Olivier Fourdan commit fee0827a9a695600765f3d04376fc9babe497401 Author: Daniel Stone Date: Fri Nov 20 15:37:31 2015 +0000 XWayland: Use FocusIn events for keyboard enter wl_keyboard::enter is the equivalent of FocusIn + KeymapNotify: it notifies us that the surface/window has now received the focus, and provides us a set of keys which are currently down. We should use these keys to update the current state, but not to send any events to clients. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 816015648ffe660ddaa0f7d4d192e555b723c372 Author: Daniel Stone Date: Fri Nov 20 15:37:30 2015 +0000 Input: Add focus-in event source Add a new event source type for keypress events synthesised from focus notifications (e.g. KeymapNotify from the parent server, when running nested). This is used to keep the keys-down array in sync with the host server's, without sending actual keypress events to clients. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c3788394e9190130a8eed44c5c93eeb93c2a9893 Author: Daniel Stone Date: Fri Nov 20 15:37:29 2015 +0000 Input: Add DeviceEventSource enum Add a flag to DeviceEvents, giving the source of the event. Currently this only supports a 'normal' flag, but will be used later to add a 'focus-in' flag, noting events synthesised from key/button arrays on focus-in notifications. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2e61901e46d28ce2f436219ad1a495aa0dcd0fba Author: Daniel Stone Date: Fri Nov 20 15:37:28 2015 +0000 XKB: Split filter execution into a separate function Move the giant state machine which maps from a key action to actually running the filters into a separate function, to be used when adding KeyFocusIn. Signed-off-by: Daniel Stone Tested-by: Giulio Camuffo Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 71ba82690158f46d50a455e69a83ee0d685bb274 Author: Peter Hutterer Date: Mon Nov 23 07:59:24 2015 +1000 xfree86: fix minor memory leak xf86*StrOption returns a strdup Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 51984dddfcc7133ed3c1f20d03514aa98c9a7831 Author: Eric Anholt Date: Thu Jun 18 11:14:41 2015 -0700 glamor: Delay making pixmaps shareable until we need to. If a pixmap isn't getting exported as a dmabuf, then we don't need to make an EGLImage/GBM bo for it. This should reduce normal pixmap allocation overhead, and also lets the driver choose non-scanout formats which may be much higher performance. On Raspberry Pi, where scanout isn't usable as a texture source, this improves x11perf -copypixwin100 from about 4300/sec to 5780/sec under xcompmgr -a, because we no longer need to upload our x11perf window to a tiled temporary in order to render it to the screen. v2: Just use pixmap->usage_hint instead of a new field. Drop the changes that started storing gbm_bos in the pixmap priv due to lifetime issues. v3: Fix a missing gbm_bo_destroy() on the pixmap-from-fd success path. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 7cd495a88807698b4ebaf9c1fb3db6edf31dd7e6 Author: Eric Anholt Date: Thu Oct 15 13:25:12 2015 -0700 glamor: Make glamor_get_name_from_bo static. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 6be33fd044949330e0b2b4185882c9664d2f90b4 Author: Eric Anholt Date: Thu Jun 18 11:26:46 2015 -0700 glamor: Simplify DRI3 pixmap-from-fd, using GBM. This GBM import path was introduced in 10.2, which we already require. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 1b8f16d8e659fb483453e1123a9fa876adb758ff Author: Eric Anholt Date: Thu Jun 18 11:21:10 2015 -0700 glamor: Use real types for glamor_egl's public gbm functions. I think void * was just used to avoid needing to #include gbm.h, but we can just forward-declare the structs and be fine. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit f80758f32a7b922baf8fbf3ac6d8c9aae5fea1c4 Author: Eric Anholt Date: Thu Jun 18 11:15:40 2015 -0700 glamor: Use the GBM function for getting an FD from a GBM BO. We were rolling ioctl calls ourselves, when there's a nice interface for it. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ff2850424c99652506d0d6bc43506b4c16bf2ad5 Author: Eric Anholt Date: Sun Oct 18 19:26:14 2015 -0700 glamor: Hook up EGL DestroyPixmap through the normal wrap chain. One less layering violation (EGL should call glamor, if anything, not the other way around). v2: Move glamor.c's DestroyPixmap wrapping up above the glamor_egl_screen_init() call, since glamor.c's DestroyPixmap needs to be the bottom of the stack (it calls fb directly and doesn't wrap). Caught by Michel. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit e91fd30049ba9ebfb6ee8aded74eebe006af3f57 Author: Eric Anholt Date: Sun Oct 18 21:34:45 2015 -0700 glamor: Unexport glamor_destroy_textured_pixmap(). This is just a bit of the DestroyPixmap chain. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 3dd202933fd94615aeeaec7e4cfd05a68954a3f3 Author: Eric Anholt Date: Sun Oct 18 21:28:19 2015 -0700 glamor: Remove glamor_egl_destroy_textured_pixmap(). The DestroyPixmap chain and CloseScreen chain all do pixmap teardown already, and calling it manually would be redundant. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 9d2b76652f0bca5680b9e3ae2aacd508d5525684 Author: Eric Anholt Date: Fri Jun 19 15:56:13 2015 -0700 modesetting: No need to free the EGLImage just before freeing the pixmap. DestroyPixmap handles that just fine. This also lets us drop our use of the manual image destruction function (Note that the radeon driver still uses it in a similar fashion, though). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 98a1993536add730b7ec29a9e37f62b1cd70ad31 Author: Eric Anholt Date: Sun Oct 18 19:16:20 2015 -0700 glamor: No need to glFlush before destroying a pixmap. I assume this was a workaround for an old, broken, closed driver. The driver doesn't get to throw away rendering just because the rendering context's shared-across-processes render target is getting freed from the local address space. If the rendering isn't to a shared render target, then we *do* want to throw away the rendering to it. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 9a5972801f7789833062e5711e77483b643eef92 Author: Eric Anholt Date: Thu Nov 5 16:35:56 2015 -0800 glamor: Fix segfault in fallback picture uploading. If the source/mask pixmap is a pixmap that doesn't have an FBO attached, and it doesn't match the Render operation's size, then we'll composite it to a CPU temporary (not sure why). We would take the PictFormatShort from the source Picture, make a pixmap of that depth, and try to look up the PictFormat description from the depth and the PictFormatShort. However, the screen's PictFormats are only attached to the screen's visuals' depths. So, with an x2r10g10b10 short format (depth 30), we wouldn't find the screen's PictFormat for it (associated with depth 32). Instead of trying to look up from the screen, just use the pFormat that came from our source picture. The only time we need to look up a PictFormat when we're doing non-shader gradients, which we put in a8r8g8b8. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit e7aa4d3c7420d45cca2b7e1e69e22cebc64d5b74 Author: Eric Anholt Date: Thu Nov 5 16:03:14 2015 -0800 glamor: Fix assert failures when fallback picture upload alloc fails. If the glTexImage (or glTexSubImage) out-of-memories, error out cleanly so that we can fall back to software. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit ff8ef975df9cd99ec6f0b8b8047445091bf35ef0 Author: Eric Anholt Date: Thu Nov 5 15:13:55 2015 -0800 glamor: Fix rendering when core font texture allocation fails. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit a6b05d10da2fe476f46e6dc4ad8a603964735905 Author: Eric Anholt Date: Thu Nov 5 15:05:11 2015 -0800 glamor: Fix crashes when the glyph atlas allocation fails. We already have a fallback path, so we just need to jump to it when we hit the failure. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit de959ec939b262cb1cb4c0b6146826e3092843f9 Author: Eric Anholt Date: Thu Nov 5 14:47:42 2015 -0800 glamor: Handle GL_OUT_OF_MEMORY when allocating texture images. The spec allows general undefined behavior when GL_OOM is thrown. But if the driver happens to throw the error at this point, it probably means the pixmap was just too big, so we should delete that texture and have this pixmap fall back to software. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 74be466d40080545117628c376cb59b696db33bc Author: Eric Anholt Date: Mon Nov 9 15:47:05 2015 -0800 glamor: Avoid GL errors from mapping with size == 0. GL 4.5 / GLES 3.0 require throwing GL errors at map time, and Mesa before that might throw errors accidentally if a malloc(0) call was made to return the mapping. Signed-off-by: Eric Anholt Reviewed-by: Rob Clark commit a6cddb8c04ddc3c48aae3f3611ad9f336fecb09d Author: Michael Stapelberg Date: Tue Nov 3 03:51:48 2015 -0800 Also dump passive grabs on XF86LogGrabInfo Signed-off-by: Michael Stapelberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f2ceb683c2da1ec08c8e07d7ec146f14864f2386 Author: Adam Jackson Date: Mon Nov 9 16:22:12 2015 -0500 Post-release version bump for 1.19 Signed-off-by: Adam Jackson commit 43fb888bd01cf9d3d277e77a52a3d0c93ccff8bd Author: Adam Jackson Date: Mon Nov 9 16:00:26 2015 -0500 xserver 1.18.0 Signed-off-by: Adam Jackson commit 2203735887ab548b3ee004400d1b89149aae412c Author: Axel Davy Date: Wed Nov 4 18:42:42 2015 +0100 present: Fix Async swap logic According to the spec, PresentOptionAsync should only trigger a different behaviour when the target msc has been reached. In this case if the driver is able to do async swaps, we use them to avoid a screen copy. When the target msc hasn't been reached yet, we want to use sync swaps. v2: Fix indentation and simplify checks for Async flips Signed-off-by: Axel Davy Reviewed-by: Michel Dänzer commit 3f35909acba117dc8934920d788c7ce612bce444 Author: Jammy Zhou Date: Wed Oct 28 18:39:10 2015 +0800 present: Execute right away if target_msc equals current_msc It is according to the protocol: "If 'options' contains PresentOptionAsync, and the 'target-msc' is less than or equal to the current msc for 'window', then the operation will be performed as soon as possible, not necessarily waiting for the next vertical blank interval." Signed-off-by: Jammy Zhou Reviewed-by: Michel Dänzer Reviewed-by: Axel Davy commit 7d1e4783853f9830344d101ceab087feb19995be Author: Daniel Martin Date: Thu Oct 29 14:58:11 2015 +0100 modesetting: Remove XF86_CRTC_VERSION checks The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the out-of-tree driver. Within the tree, we can rely on: xf86Crtc.h:#define XF86_CRTC_VERSION 6 Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 45c83a266d18eb515313aa3f1a4d7ff6af53be5d Author: Daniel Martin Date: Thu Oct 29 14:58:10 2015 +0100 modesetting: Free output_ids in drmmode_set_mode_major() We calloc() output_ids. Let's free() it, too. Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 2674d424020bd71d4f99b8d8de8b0b21aa490d54 Author: Daniel Martin Date: Thu Oct 29 14:58:09 2015 +0100 modesetting: Handle failures in setting a CRTC to a DRM mode properly This fixes a bug where running the card out of PPLL's when hotplugging another monitor would result in all of the displays going blank and failing to work properly until X was restarted or the user switched to another VT. [Michel Dänzer: Pass errno instead of -ret to strerror()] [Daniel Martin: Add \n to log message] Picked from xf86-video-ati 7186a87 Handle failures in setting a CRTC to a DRM mode properly Signed-off-by: Daniel Martin Reviewed-by: Emil Velikov Reviewed-by: Alex Deucher commit 250666586e2b6f3ed1371340452dc2be2d094d40 Author: Adam Jackson Date: Thu Oct 29 10:08:17 2015 -0400 vidmode: Drop the unused event code As the code says, this is "far from complete". So far, in fact, that it's been basically untouched for twenty years (XFree86 3.1!). As far as I can tell it was never enabled in any XFree86 build, and certainly has never been enabled since Xorg 7.0. Also, K&R. Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 478efe285a440c33b053bdf0bfbfdd482f429f01 Author: Alan Coopersmith Date: Tue Oct 27 19:44:28 2015 -0700 Xserver.man: document more transports for -nolisten & -listen options Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 8fc295bde9a736f3c8c047031a6698d140d5266f Author: Alan Coopersmith Date: Tue Oct 27 19:44:27 2015 -0700 Xorg.man: update to reflect -nolisten tcp becoming default Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 75157b7dbf4ed4db0492328a44e4e67dda83f769 Author: Alan Coopersmith Date: Tue Oct 27 19:44:26 2015 -0700 Xorg.man: move XLOCAL details to X(7) man page instead These settings affect clients, not server, so belong there, next to the information about how to set $DISPLAY. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Sequoia commit 50c167164700e8ead9b7ccf9f9eafc7541baac75 Author: Martin Peres Date: Mon Jul 20 10:37:30 2015 +0300 os: make sure the clientsWritable fd_set is initialized before use In WaitForSomething(), the fd_set clientsWritable may be used unitialized when the boolean AnyClientsWriteBlocked is set in the WakeupHandler(). This leads to a crash in FlushAllOutput() after x11proto's commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7. The problem did not manifest before because both the XFD_SIZE and the maximum number of clients were set to 256. As the connectionTranslation table was initalized for the 256 clients to 0, the test on the index not being 0 was aborting before dereferencing the client #0. As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the XFD_SIZE got bumped to 512. This lead the OutputPending fd_set to have any fd above 256 to be uninitialized which in turns lead to reading an index after the end of the ConnectionTranslation table. This index would then be used to find the client corresponding to the fd marked as pending writes and would also result to an out-of-bound access which would usually be the fatal one. Fix this by zeroing the clientsWritable fd_set at the beginning of WaitForSomething(). In this case, the bottom part of the loop, which would indirectly call FlushAllOutput, will not do any work but the next call to select will result in the execution of the right codepath. This is exactly what we want because we need to know the writable clients before handling them. In the end, it also makes sure that the fds above MaxClient are initialized, preventing the crash in FlushAllOutput(). Thanks to everyone involved in tracking this one down! Reported-by: Karol Herbst Reported-by: Tobias Klausmann Signed-off-by: Martin Peres Tested-by: Tobias Klausmann Tested-by: Martin Peres Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316 Cc: Ilia Mirkin Cc: Olivier Fourdan Cc: Alan Coopersmith Reviewed-by: Alan Coopersmith commit bb78c464f09f515db557182a458b12b63c3b52d7 Author: Adam Jackson Date: Tue Oct 27 13:28:37 2015 -0400 build: Remove stale miext/cw include paths Signed-off-by: Adam Jackson Reviewed-by: Emil Velikov commit 524844c8c18e226aad30feb371b19ef491d83449 Author: Julien Cristau Date: Tue Oct 27 13:23:13 2015 +0100 Xext: fix build with --disable-xace Regression from 990cf5b2828f73dc7a07f1e38f608af39acfd81d Signed-off-by: Julien Cristau Cc: Andrew Eikum Cc: Peter Hutterer Signed-off-by: Andrew Eikum commit ac2f27f1a9fa8cd88c5dbe7ec0f96238eecf2c3e Author: Michel Dänzer Date: Tue Oct 27 11:51:49 2015 +0900 DRI2: Sync radeonsi_pci_ids.h from Mesa Fixes DRI2 client driver name mapping for newer AMD GPUs with the modesetting driver, allowing the DRI2 extension to initialize. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit d8b7a900cf912cadb5915b3924dd6ce5a74505e7 Author: Adam Jackson Date: Mon Oct 26 13:47:04 2015 -0400 xserver 1.17.99.902 (1.18 RC2) Signed-off-by: Adam Jackson commit 47b00fa4bf3b67736957296492310f7fdd6c0a25 Author: Adam Jackson Date: Wed Oct 21 12:15:34 2015 -0400 xfree86: Use same inb/outb asm code for i386 amd64 and ia64 This matches the GCCUSESGAS path from the old monolith build (where that macro was actually set), and fixes the build on modern OSX. Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Adam Jackson commit c99fb550e06207e83ec89463fe32bd6bceca45f8 Author: Dave Airlie Date: Sun Sep 13 07:45:15 2015 +1000 xf86: don't add gpus from udev if autoAddGPU is set At startup the server wasn't adding devices, but nothing was blocking hotplug devices by the look of it. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91388 Signed-off-by: Dave Airlie Reviewed-by: Hans de Goede commit 912f1fe2bb1b640d55fc44fcf636b6ca40d7f40b Author: Chris Wilson Date: Sun Apr 5 10:32:03 2015 +0100 Xv: Only stop the adaptors when the Pixmap is finally destroyed Pixmaps are reference counted and DestroyPixmap is called for the removal of every reference. However, we only want to stop the adaptors writing into the Pixmap just before the Pixmap is finally destroyed, similar to how Windows are handled. Signed-off-by: Chris Wilson Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä commit 413cb2ff1d754b5f19d77ff19cddf40793989c03 Author: Chris Wilson Date: Mon Feb 16 09:49:18 2015 +0000 present: Fix missed notify MSC computation Only treat divisor==0 as async to immediately report the actual vblank. If the user species a non-zero divisor, we should compute the missed vblank properly or else we report too early. Signed-off-by: Chris Wilson Reviewed-by: Mario Kleiner commit 702c0a247f5523b43652befaf6be548ddbbe9dee Author: Alberto Milone Date: Thu Dec 12 10:00:09 2013 +0100 randr: make RROutputChanged change the main protocol screen not the gpu screen We only set changes on the main protocol screen as, for example in RRSetChanged() and RRTellChanged(), therefore we should follow the same logic when reporting that an output changed in RROutputChanged(). This means that RRTellChanged() will then update the relevant timestamps also when events come from gpu screens. [ajax: Fix mixed code and decls] Reviewed-by: Dave Airlie Signed-off-by: Alberto Milone commit 2092f12a243b9f7682f542b593b77c96d455ec89 Author: Hans de Goede Date: Wed Oct 21 11:36:06 2015 +0200 linux: Do not call FatalError from xf86CloseConsole FatalError ends up calling xf86CloseConsole itself, so calling FatalError from within xf86CloseConsole is not a good idea. Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success (or failure). This makes switch_to match the other error checking done in xf86CloseConsole which all logs warnings and continues. Add checking of the return value in xf86OpenConsole and call FatalError there when switch_to fails, to preserve the error-handling behavior of xf86OpenConsole. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210 Reviewed-by: Adam Jackson Signed-off-by: Hans de Goede commit ee06f674bbcd796324d6daf69bfb5d8856e94008 Author: Jeremy Huddleston Sequoia Date: Thu Oct 15 22:28:49 2015 -0700 Xi: Silence some tautological warnings xichangehierarchy.c:424:23: warning: comparison of constant 536870911 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare,Semantic Issue] if (stuff->length > (INT_MAX >> 2)) ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ xichangehierarchy.c:438:26: warning: comparison of constant 536870911 with expression of type 'uint16_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare,Semantic Issue] if ((any->length > (INT_MAX >> 2)) || (len < (any->length << 2))) ~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 113c0bb4fd764da8c08d8f30abe350c7650c9fc2 Author: Samuel Thibault Date: Mon Oct 19 23:15:36 2015 +0200 hurd: fix xorg-wrapper build hurd does not have any PATH_MAX limitation. misc.h provides a default value which is fine here. Reviewed-by: Adam Jackson Signed-off-by: Samuel Thibault commit f9a04d19aef77bf787b8d322305a6971d24a6ba1 Author: Keith Packard Date: Mon Sep 21 07:16:12 2015 +0100 fonts: Continue when font calls return Suspended more than once Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama interactions with font servers by not putting clients to sleep multiple times. However, it introduced additional changes dealing with libXfont routine returning Suspended more than once for the same request. This additional change was to abandon processing of the current request and free the closure data by jumping to 'xinerama_sleep' in each of the functions. Font library functions shouldn't return Suspended more than once, except for ListFontsWithInfo, which produces multiple replies, and thus ends up returning Suspended many times during processing. With the jump to xinerama_sleep occurring after the first reply was processed, the closure for the request was freed and future calls into the ListFontsWithInfo callback resulted in dereferencing freed memory. This patch removes the added branches, reverting the code to its previous behaviour, which permitted multiple Suspended returns and simply waited for the client to be signaled again so that the callback could continue processing the request. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5b582a4a0350c253d729efb31b710851ae9a958e Merge: 1d4aa6724 27ad21254 Author: Adam Jackson Date: Mon Oct 19 12:23:22 2015 -0400 Merge remote-tracking branch 'jeremyhu/master' commit 1d4aa672424d8b1629fda11400b88607b5066965 Author: Julien Cristau Date: Mon Oct 19 15:42:30 2015 +0200 xorg-wrapper: when starting the server as root, reset its environment When the server is privileged, we shouldn't be passing the user's environment directly. Clearing the environment is recommended by the libdbus maintainers, see https://bugs.freedesktop.org/show_bug.cgi?id=52202 v2: rename envp to empty_envp (Jeremy) Reviewed-by: Hans de Goede Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83849 Signed-off-by: Julien Cristau commit 08c4912406b965bbac0a3a52413c374a073c051b Author: Samuel Thibault Date: Mon Oct 19 14:47:43 2015 +0200 xorg-wrapper: fix build without libdrm Signed-off-by: Samuel Thibault Reviewed-by: Hans de Goede commit a4cd8ee5f8e8de776c7f764656770311cdbde0d2 Author: Samuel Thibault Date: Mon Oct 19 14:47:42 2015 +0200 hurd: disable detecting drm Signed-off-by: Samuel Thibault Reviewed-by: Hans de Goede commit 27ad21254f257bac6c647315d749ee69f20c24e0 Author: Jeremy Huddleston Sequoia Date: Sun Oct 18 23:01:53 2015 -0700 XQuartz: Cleanup formatting of DarwinEQInit that was butchered by automation a few years ago Signed-off-by: Jeremy Huddleston Sequoia commit 3db7e332d374bf8cee581c31b7d50d7ac0509187 Author: Jeremy Huddleston Sequoia Date: Sun Oct 18 23:03:23 2015 -0700 XQuartz: Make sure that darwin_all_modifier_mask_additions is 0-terminated Found by ASan X.Org X Server 1.17.99.901 Build Date: 20151018 ================================================================ ==40471==ERROR: AddressSanitizer: global-buffer-overflow on address 0x000101fed7a4 at pc 0x000101584030 bp 0x70000029f920 sp 0x70000029f918 READ of size 4 at 0x000101fed7a4 thread T7 #0 0x10158402f in DarwinEQInit darwinEvents.c:377 #1 0x10157f3bc in InitInput darwin.c:566 #2 0x101be87ad in dix_main main.c:268 #3 0x10159131b in server_thread quartzStartup.c:66 #4 0x7fff8a535c12 in _pthread_body (/usr/lib/system/libsystem_pthread.dylib+0x3c12) #5 0x7fff8a535b8f in _pthread_start (/usr/lib/system/libsystem_pthread.dylib+0x3b8f) #6 0x7fff8a533374 in thread_start (/usr/lib/system/libsystem_pthread.dylib+0x1374) 0x000101fed7a4 is located 0 bytes to the right of global variable 'darwin_all_modifier_mask_additions' defined in 'darwinEvents.c:181:12' (0x101fed7a0) of size 4 SUMMARY: AddressSanitizer: global-buffer-overflow darwinEvents.c:377 DarwinEQInit Shadow bytes around the buggy address: 0x1000203fdaa0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdab0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdac0: f9 f9 f9 f9 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 0x1000203fdad0: 00 00 00 00 00 00 00 00 f9 f9 f9 f9 00 00 00 00 0x1000203fdae0: 00 00 f9 f9 f9 f9 f9 f9 00 00 00 00 00 f9 f9 f9 =>0x1000203fdaf0: f9 f9 f9 f9[04]f9 f9 f9 f9 f9 f9 f9 00 00 00 00 0x1000203fdb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x1000203fdb40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Thread T7 created by T0 here: #0 0x10242ee99 in wrap_pthread_create (/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/7.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib+0x37e99) #1 0x101591089 in create_thread quartzStartup.c:78 #2 0x101590ed9 in QuartzInitServer quartzStartup.c:95 #3 0x1015697eb in X11ApplicationMain X11Application.m:1277 #4 0x101575dc0 in X11ControllerMain X11Controller.m:984 #5 0x10159171a in server_main quartzStartup.c:127 #6 0x101540fc0 in do_start_x11_server bundle-main.c:436 #7 0x101544869 in _Xstart_x11_server mach_startupServer.c:189 #8 0x101545c96 in mach_startup_server mach_startupServer.c:398 #9 0x7fff8d1b70f3 in mach_msg_server (/usr/lib/system/libsystem_kernel.dylib+0x110f3) #10 0x1015416e7 in main bundle-main.c:774 #11 0x7fff8bd975ac in start (/usr/lib/system/libdyld.dylib+0x35ac) #12 0x0 () Signed-off-by: Jeremy Huddleston Sequoia commit ec6294116cc41ff1c3be081b626952fb7e614244 Author: Jeremy Huddleston Date: Sun Oct 18 23:12:52 2015 -0700 osinit: Silence -Wunused-variable warnings osinit.c:161:24: warning: unused variable 'devnull' [-Wunused-variable,Unused Entity Issue] static const char *devnull = "/dev/null"; ^ osinit.c:162:10: warning: unused variable 'fname' [-Wunused-variable,Unused Entity Issue] char fname[PATH_MAX]; ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 0a5d54f721de7e3ab3b6f4b080190a92bbe3429b Author: Jeremy Huddleston Date: Sun Oct 18 23:12:51 2015 -0700 dix: Silence -Wunused-variable warning by moving window.c off of legacy region defines window.c:223:15: warning: unused variable 'pScreen' [-Wunused-variable,Unused Entity Issue] ScreenPtr pScreen = pWin->drawable.pScreen; ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit e09875701b980b8c4578fb310a922c9934c34eef Author: Jeremy Huddleston Date: Sun Oct 18 23:12:50 2015 -0700 glx: Fix header length error checking in __glXDisp_RenderLarge glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,Semantic Issue] if ((cmdlen = safe_pad(hdr->length)) < 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 5dc415048e4091b18cd7d123ebeae8f95ed5a4f5 Author: Jeremy Huddleston Date: Sun Oct 18 23:12:49 2015 -0700 randr: Silence -Wshift-negative-value warnings rrtransform.c:199:23: warning: shifting a negative signed value is undefined [-Wshift-negative-value,Semantic Issue] rot_cos = F(-1); ^~~~~ rrtransform.c:114:14: note: expanded from macro 'F' ^~~~~~~~~~~~~~ ../render/picture.h:200:24: note: expanded from macro 'IntToxFixed' ^~~~~~~~~~~~~~~~~~~~~~ /opt/X11/include/pixman-1/pixman.h:130:56: note: expanded from macro 'pixman_int_to_fixed' ~~~ ^ Reviewed-by: Adam Jackson Signed-off-by: Jeremy Huddleston Sequoia commit 9a2a05a9a7ba02921fa29844c4cad41243c41326 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:42 2015 -0700 xdmcp: Declare XdmcpFatal _X_NORETURN xdmcp.c:1404:1: warning: function 'XdmcpFatal' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit a7a00e4bd8153e0386c7e58d6b30a7a96f15fdb0 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:39 2015 -0700 security: Silence some benign -Wformat warnings XID may be either 'unsigned long' or 'unsigned int' depending on: typedef unsigned long CARD64; typedef unsigned int CARD32; typedef unsigned long long CARD64; typedef unsigned long CARD32; typedef unsigned long XID; typedef CARD32 XID; so when building with -Wformat, we get some warnings that are benign. This silences them. security.c:215:52: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] SecurityAudit("revoked authorization ID %d\n", pAuth->id); ~~ ^~~~~~~~~ %lu CC dpmsstubs.lo security.c:553:25: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, ^~~~~~~~~ security.c:553:55: warning: format specifies type 'int' but the argument has type 'CARD32' (aka 'unsigned long') [-Wformat,Format String Issue] client->index, pAuth->id, pAuth->trustLevel, pAuth->timeout, ^~~~~~~~~~~~~~ security.c:554:10: warning: format specifies type 'int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] pAuth->group, eventMask); ^~~~~~~~~~~~ security.c:554:24: warning: format specifies type 'int' but the argument has type 'Mask' (aka 'unsigned long') [-Wformat,Format String Issue] pAuth->group, eventMask); ^~~~~~~~~ security.c:781:19: warning: format specifies type 'unsigned int' but the argument has type 'Mask' (aka 'unsigned long') [-Wformat,Format String Issue] requested, rec->id, cid, ^~~~~~~~~ security.c:781:30: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] requested, rec->id, cid, ^~~~~~~ security.c:863:23: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->pWin->drawable.id, wClient(rec->pWin)->index, ^~~~~~~~~~~~~~~~~~~~~~ security.c:893:31: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->pWin->drawable.id, ^~~~~~~~~~~~~~~~~~~~~~ security.c:915:39: warning: format specifies type 'unsigned int' but the argument has type 'XID' (aka 'unsigned long') [-Wformat,Format String Issue] rec->client->index, rec->pWin->drawable.id, ^~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit aa73d587fece225753d8e6b8773a9c8b85823bd9 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:38 2015 -0700 xres: Silence -Wunused-function warnings when building !COMPOSITE or !RENDER xres.c:422:1: warning: unused function 'ResFindCompositeClientWindowPixmaps' [-Wunused-function,Unused Entity Issue] ResFindCompositeClientWindowPixmaps (void *value, XID id, void *cdata) ^ Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 85eb90ea45e89033b97bf71a13c5c70fec8f6871 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:36 2015 -0700 xdmauth: Correct miscall of abs() to instrad call labs() xdmauth.c:230:13: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^ xdmauth.c:230:13: note: use function 'labs' instead [Semantic Issue] if (abs(now - client->time) > TwentyFiveMinutes) { ^~~ labs xdmauth.c:302:9: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause truncation of value [-Wabsolute-value,Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^ xdmauth.c:302:9: note: use function 'labs' instead [Semantic Issue] if (abs(client->time - now) > TwentyMinutes) { ^~~ labs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 9f0fcd14b52f8481cbb3b3b9c6e06f64ff003cc8 Author: Jeremy Huddleston Date: Wed Oct 14 15:13:35 2015 -0700 randr: Correct a miscall of abs() to instead call fabs() rrtransform.c:124:22: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^ rrtransform.c:124:22: note: use function 'fabs' instead [Semantic Issue] if ((v = abs(f_transform->m[j][i])) > max) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 610dd8a58a75bb6a5b7d7abbae476d1cc4be519e Author: Jeremy Huddleston Date: Wed Oct 14 15:13:34 2015 -0700 mi: Correct a miscall of abs() to instead call fabs() miarc.c:1714:9: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value,Semantic Issue] if (abs(parc->angle2) >= 360.0) ^ miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue] if (abs(parc->angle2) >= 360.0) ^~~ fabs Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 4513f924a7065edbd267cf96837af94ce5a58a6f Author: Ken Thomases Date: Mon Oct 12 16:45:41 2015 -0700 XQuartz: Fix how we calculate the height of the OSX menu bar +[NSScreen mainScreen] does not mean the primary display. It used to mean the one with the key window. When "Displays have separate spaces" is enabled, it means the active screen, the one whose menu bar is mostly opaque. As such, it may not be the screen whose lower-left corner is located at (0, 0). That's why its max-Y is not necessarily comparable to its height. That only works for the primary display. This code could use [[NSScreen screens] firstObject]. This is always the primary display, the one whose lower-left corner is at (0, 0). Once that's done, the above change should be reverted. The height of the visible frame would be the full height of the screen minus the menu bar _and the Dock_ if the Dock is along the bottom of the screen. Actually, there's a theoretically-simpler approach: use -[NSMenu menuBarHeight]. That replaces a long-deprecated method +[NSMenuView menuBarHeight]. However, there was a bug in Tiger that led to the former not working while the latter still worked. I haven't actually checked recently. CrossOver's still-kicking X server code uses this code, which tries all of the above: NSScreen* primaryScreen = [[NSScreen screens] objectAtIndex:0]; aquaMenuBarHeight = [[NSApp mainMenu] menuBarHeight]; if (!aquaMenuBarHeight) aquaMenuBarHeight = [NSMenuView menuBarHeight]; if (!aquaMenuBarHeight) aquaMenuBarHeight = NSHeight([primaryScreen frame]) - NSMaxY([primaryScreen visibleFrame]); Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Ken Thomases commit 6e6827aac33eddeacfb37ef3d7b0397b1446bf66 Author: Jeremy Huddleston Sequoia Date: Mon Oct 12 02:06:10 2015 -0700 XQuartz: Remove InfoPlist.strings Signed-off-by: Jeremy Huddleston Sequoia commit df80e2649aa47957986554928e6bf41b86c15240 Author: Jeremy Huddleston Sequoia Date: Mon Oct 12 02:04:11 2015 -0700 XQuartz: Relax App Transport Security for communicating with the update server Signed-off-by: Jeremy Huddleston Sequoia commit 880d4e78b1823bcc0e66e68270af1a475f097bb5 Author: Jonas Ådahl Date: Wed Oct 7 12:02:39 2015 +0800 xwayland: Set physical screen size to something When we have a single output, just set it to the physical size of that output. Otherwise try to approximate it calculating a mean m.m. per dot. Last fallback is to default to 96 DPI. Signed-off-by: Jonas Ådahl Reviewed-by: Daniel Stone commit 216bdbc7351e2078d94857a3323f6cd8f0d2f191 Author: Jonas Ådahl Date: Wed Oct 7 12:02:38 2015 +0800 xwayland: Update actual screen and root window size on output hot plug When a new output is hot-plugged we need to not only update our internal screen dimensions, but also the dix screen dimensions, screenInfo dimensions and the root window dimensions. https://bugs.freedesktop.org/show_bug.cgi?id=92273 Signed-off-by: Jonas Ådahl Reviewed-by: Daniel Stone commit 211d4c2d353b5e379716484055a3f58235ea65f4 Author: Chris Wilson Date: Wed Dec 14 15:55:22 2011 +0000 render: Propagate allocation failure from createSourcePicture() All the callers were already checking for failure, except that createSourcePicture() itself was failing to check whether it successfully allocated the Picture. [ajax: Rebase, fix line wrap of preceding line] Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit 8a26a4aff570744347a8bed19f693bf631be464e Author: Alexandr Shadchin Date: Sun Nov 27 02:49:02 2011 +0600 bsd: Remove LINKKIT Reviewed-by: Adam Jackson Signed-off-by: Alexandr Shadchin commit ab3e34bf9ddff90261fbbe0e2604887459cd70ad Author: Alexandr Shadchin Date: Sun Nov 27 02:49:01 2011 +0600 xfree86: Remove 386BSD Reviewed-by: Adam Jackson Signed-off-by: Alexandr Shadchin commit c877048c8509a03f6aa69e533ab86c1039cfb6df Author: Jon TURNEY Date: Thu Jun 30 15:30:40 2011 +0100 glx: Synchronize Xserver glx/rensize.c with mesa src/glx/compsize.c Noticed while investigating https://bugs.freedesktop.org/show_bug.cgi?id=30102 Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit d08ac3660651c8614a1780750b76c48eeb0870b7 Author: Jamey Sharp Date: Thu May 12 15:21:52 2011 -0700 kdrive: Delete unused TOUCHSCREEN define. There's nothing in configure to enable this, and KdTsPhyScreen isn't defined anywhere. [ajax: Rebase, also clean up Xfbdev] Reviewed-by: Adam Jackson Signed-off-by: Jamey Sharp commit e31fe8115ee080b58b2e96a5106f38e64944ce5e Author: Olivier Fourdan Date: Wed Sep 23 15:35:58 2015 +0200 xwayland: Adjust screen size with rotation bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92076 Signed-off-by: Olivier Fourdan Tested-by: Artem Chudinov Reviewed-by: Dave Airlie commit f6ce23fbfc8804204fa103f98b94478387b94040 Author: Fredrik Höglund Date: Thu Sep 10 23:33:20 2015 +0200 present: Don't stash the MSC value when present_get_ust_msc fails Otherwise we stash an uninitalized value, and later use it to compute the msc_offset for the window. Also initialize ust and crtc_msc so we never use uninitalized values when present_get_ust_msc fails. This fixes clients getting stuck waiting indefinitely for an idle event when a CRTC is turned off. Signed-off-by: Fredrik Höglund Reviewed-by: Michel Dänzer commit c1f5f9022f31ca4d662cc125fa80cb25386da6d1 Author: Alan Coopersmith Date: Sun Sep 27 18:41:35 2015 -0700 glamor: Get rid of an extraneous ; at the end of a C source line Signed-off-by: Alan Coopersmith Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 10e9116b3f709bec6d6a50446c1341441a0564e4 Author: Rui Matos Date: Tue Jul 15 15:57:20 2014 +0200 xwayland-input: Always set the xkb group index on modifiers events While we have keyboard focus, the server's xkb code is already locking and latching modifiers appropriately while processing keyboard events. Since there is no guaranteed order between wl_keyboard key and modifiers events, if we got the modifiers event with a locked or latched modifier and then process the key press event for that modifier we would wrongly unlock/unlatch. To prevent this, we ignore locked and latched modifiers while any of our surfaces has keyboard focus. But we always need to set the xkb group index since this might be triggered programatically by the wayland compositor at any time. Reviewed-by: Daniel Stone commit f937032ee6526af3c9206a2d8c6eacdeeb490d3b Author: Andreas Wettstein Date: Sat Feb 15 17:37:24 2014 +0100 xkb: Keyboard mouse button emulation should not suppress other keyboard events With this change, when a key mapped to an action to emulate mouse button presses and releases is held down, other keys pressed during that time are still processed normally. This is a prerequisite for proper support of ISOLock. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone commit 5447ac45bc090e8f3269979af4db55f619c5f278 Author: Andreas Wettstein Date: Sat Feb 15 17:36:51 2014 +0100 xkb: Suppress autorepeat for Set and Lock of Mods, Groups, and Controls The autorepeat for these actions was not correctly implemented, as the key repeat would be mistakenly interpreted as key releases. Rather than fixing this, this change simply disables autorepeat for Set/Lock actions, for two reasons: - Autorepeating Set/Lock keys make complicate the interactions of actions. - Autorepeating Set/Lock keys have no apparent benefit, but hurt in the real world for layouts such as de(neo): Neo has a Level5 shift on the LSGT key, and a Level5 lock on Level5 of the same key. This is unusable if LSGT autorepeats. However, disabling autorepeat for key LSGT completely is not ideal for users that have a "usual" layout besides Neo, where LSGT carries symbols. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone commit fbac451724f7e1b8ce6b6e0505cc33ccd41c5158 Author: Arcady Goldmints-Orlov Date: Thu Oct 4 14:22:13 2012 -0700 Fix alphamap interactions with wfb Set a destructor function on pixman images and call fbFinishAccess() from there, rather than directly from free_pixman_pict(). This ensures that fbFinishAccess() gets called even if pixman still has a reference to the image after free_pixman_pict(), as is the case for alphamaps. [ajax: Squash an unused variable warning in the non-wfb build] Reviewed-by: Aaron Plattner Signed-off-by: Arcady Goldmints-Orlov Reviewed-by: Søren Sandmann commit 19a87257f92e7f57a167fc03fba014ee22d8e1ab Author: Emil Velikov Date: Fri Sep 25 14:04:34 2015 +0100 glamor: move 'dri3_capable' extension checks after eglMakeCurrent Otherwise we'll fail and/or crash as no context is bound. Fixes: 64e6124f27e (glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92105 Cc: Michel Dänzer Cc: Nick Sarnie Reported-by: Nick Sarnie Signed-off-by: Emil Velikov Tested-by: Nick Sarnie Reviewed-by: Michel Dänzer commit dca5770af9e20bb1148374ebfd60931a81b148a2 Merge: a31bbc450 21f384b7b Author: Adam Jackson Date: Fri Sep 25 10:23:28 2015 -0400 Merge remote-tracking branch 'mchalupa/output-bugs' commit a31bbc450a08622aadafc264b3efe57e465eaecb Author: Alan Coopersmith Date: Tue Sep 22 19:25:43 2015 -0700 protocol.txt: Add MIT-SHM 1.2 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 424ba5de56e2ddf173bb0d26daa821f12897f18f Author: Alan Coopersmith Date: Tue Sep 22 19:25:42 2015 -0700 protocol.txt: Add DRI3 1.0 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 7e6b7c799455fdeac082cf2a064fe1ba432e92ca Author: Alan Coopersmith Date: Tue Sep 22 19:25:41 2015 -0700 protocol.txt: Add Present 1.0 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit fd653194be731e4e32f95f38446e0dcbf56d04c9 Author: Alan Coopersmith Date: Tue Sep 22 19:25:40 2015 -0700 protocol.txt: Add RANDR 1.5 requests Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 1ea8fb96bc6a95d98dd67fc9d4c4e4b858383d34 Author: Alan Coopersmith Date: Tue Sep 22 19:25:39 2015 -0700 protocol.txt: Remove extensions that died before Xorg was born Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 21f384b7b8b571151805674c9d384e2ad7f8b7ea Author: Marek Chalupa Date: Thu May 21 15:43:43 2015 +0200 xwayland: do not add output into output_list multiple times output.done event can be sent even on some property change, not only when announcing the output. Therefore we must check if we already have it otherwise we may corrupt the list by adding it multiple times. This fixes bug when xwayland looped indefinitely in output.done handler and that can be reproduced following these steps (under X without multi-monitor setup): 1) run weston --output-count=2 2) run xterm, move it so that half is on one output and half on the other 3) close second output, try run weston-terminal weston sends updated outputs which trigger this bug. v2. factor out common code into function move expecting_events into right branch Signed-off-by: Marek Chalupa commit 95014ad2a7815282efdecc895bf14742b4b3ccb3 Author: Dima Ryazanov Date: Tue May 12 10:21:18 2015 -0700 xwayland: Remove the output from the list after destroying it [Marek Chalupa]: rebased to master Signed-off-by: Dima Ryazanov commit 550984c95ef0bee1886dbb54e35edc0852772e2f Author: Dima Ryazanov Date: Fri May 15 22:38:28 2015 -0700 xwayland: Destroy xwl_output when wl_output gets removed This makes Xwayland correctly handle a monitor getting unplugged. [Marek]: use xorg_list_for_each_entry_safe Signed-off-by: Dima Ryazanov Signed-off-by: Marek Chalupa commit 6ca496b7c3ccfd677c8c1bee88cc509a5e3c9e04 Author: Alan Coopersmith Date: Mon Sep 21 22:36:41 2015 -0700 dri2: better checks for integer overflow in GetBuffers* Check for integer overflow before using stuff->count in a multiplication, to avoid compiler optimizing out due to undefined behaviour, but only after we've checked to make sure stuff->count is in the range of the request we're parsing. Reported-by: jes@posteo.de Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 6c2c6fb5a7b44f50811722eb8621afb272aff2e8 Author: Keith Packard Date: Mon Sep 21 07:16:14 2015 +0100 Xext, os: Remove OS-internal usages within XACE and XSELinux These extensions were accessing internal OS functions and structures. Expose the necessary functionality to them and remove their use of osdep.h Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 9af111fe045d82192bacc722940e1d92a8ba4cbd Author: Keith Packard Date: Mon Sep 21 07:16:13 2015 +0100 Xext/xselinux: Warning fixes There's a 'const char *' adventure here that I'm mostly ignoring; some client information gets const poisoned. Worked around by adding a couple of casts. Ick. Added an _X_ATTRIBUTE_PRINTF to SELinuxLog. Ignore a couple of unused return values. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 9ee05c8987245350976ebc0df4953c60da6bcc70 Author: Jon TURNEY Date: Thu Aug 13 13:11:31 2015 +0100 debug output format fix in RRMonitorCrtcName() xorg/xserver/randr/rrmonitor.c:35:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘RRCrtc’ [-Werror=format=] RRCrtc is XID is CARD32, which inside the server is unsigned long or int depending on architecture, so a cast is required. Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit fe253296035277f7a3adfad6eb239fee41714d22 Author: Jon TURNEY Date: Thu Aug 13 13:11:37 2015 +0100 debug output format fix in xf86Helper.c xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘Atom’ [-Werror=format=] xserver/hw/xfree86/common/xf86Helper.c:1834:12: error: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘Atom’ [-Werror=format=] Atom is unfortunately unsigned long or unsigned int depending on the architecture, so a cast is required. Reviewed-by: Adam Jackson Signed-off-by: Jon TURNEY commit dc2998bf060957b1fdd6bd2ea4f76c5154233a1b Author: Dima Ryazanov Date: Tue May 12 10:21:19 2015 -0700 xwayland: Remove a useless out-of-memory check snprintf does not allocate memory, so we can never get an out-of-memory error. (Also, the error handler would free xwl_output after it was already registered as an event listener.) Signed-off-by: Dima Ryazanov Reviewed-by: Marek Chalupa commit b469fc72d2dd0cf60760fa0828ed73771c2a0512 Author: Adam Jackson Date: Wed Feb 25 16:03:13 2015 -0500 composite: Factor out backing store transition No functional change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 6da3f5d04f6a1cda0c858280f9561f9fbc323275 Author: Dave Airlie Date: Wed Sep 23 11:19:00 2015 +1000 glx: fix regression with copy sub buffer disappearing So copy sub buffer isn't a core extensions it's a driver extension which means we are using totally the wrong interface to query for it here, which means bad things happen when you roll out this code, for instance MESA_copy_sub_buffer stops working. This is just the hack I'm sticking in Fedora to avoid the regression for now, but hopefully will inspire us. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 5e9457c41c05b65da7e39bd8944ec761479f19dd Author: Eric Anholt Date: Mon May 5 11:10:07 2014 -0700 fbdevhw: Fix a const qualifier warning We're passing string literals to these functions. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit 88355cedfc9b3940b9fe1599fbf6e0272c57f8a9 Author: Eric Anholt Date: Mon May 5 11:10:08 2014 -0700 kdrive: Remove dead debug arrays. These have never been used in the history of the tree, and were producing string literal const loss warnings. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit e6f8a0340b72113474ccfbf1ea447558b705995a Author: Eric Anholt Date: Mon May 5 11:10:06 2014 -0700 x86emu: Fix some set-but-not-used warnings. Reviewed-by: Adam Jackson Signed-off-by: Eric Anholt commit fca98ce5e7d6424265c35a1219c2240d3342f627 Author: Egbert Eich Date: Fri Feb 7 16:21:48 2014 +0100 libxf86config: libxf86config_internal -> libxf86config Now since the installable libxf86config is gone, rename libxf86config_internal to libxf86config. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit dabf7c3590b427c185089128ecfd967f188f2658 Author: Egbert Eich Date: Fri Feb 7 16:21:47 2014 +0100 libxf86config: Remove The library used by the Xserver to read and parse the configuration file could be built so that it culd be installed as a separate lib and used by external programs. Apparently there has not been any interest in this for quite a while as this library has been broken for a long time now in the sense that it was calling functions provided by the Xserver which were not implemented for the external library. Since this library is useless as it is anyway when built let's drop support for it. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit c7f84c880bbbb508016ad80390a11961b1c4214d Author: Chris Wilson Date: Mon Jan 27 09:44:48 2014 +0000 render: Fix leak of filter params ==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719 ==11097== at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==11097== by 0x225EF3: SetPicturePictFilter (filter.c:339) ==11097== by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773) ==11097== by 0x15D25D: Dispatch (dispatch.c:432) ==11097== by 0x14C7B9: main (main.c:298) [ajax: Fixed whitespace] Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 98e170971c6b06d64a5bc7418bf6ae6ae985a3ae Author: Ville Syrjälä Date: Mon Oct 14 17:07:29 2013 +0300 xfree86: Fix the 1792x1344-75 EST III mode The correct refresh rate for this mode is 75, not 85. Reviewed-by: Adam Jackson Signed-off-by: Ville Syrjälä commit 91c7acfc3447a0073dd1db260cf05115d94ce7e8 Author: Michal Srb Date: Mon Oct 7 17:57:14 2013 +0300 randr: Allow RRSelectInput for ProviderChange and ResourceChange events [ajax: To be clear, we already have code to emit these events, and it looks like it works, but to get them you'd have had to also ask for one of the other notify types. This makes it possible to listen for e.g. ProviderChange alone.] Reviewed-by: Adam Jackson Signed-off-by: Michal Srb commit 5437949a51fa6d9c9c83336d46ae57398f390ee3 Author: Egbert Eich Date: Sat Oct 5 13:57:13 2013 +0200 fbdevhw: Disable FBIOBLANK ioctl if not supported Some ioctls may not be supported by the kernel however their failure is non-fatal to the driver. Unfortunately we only know once we try to execute the ioctl however the sematics of the fbdev driver API doesn't allow upper layers to disable the call. Instead of changing the fbdevHW driver API just disable the call to this ioctl on the module level when detecting such a case. Reviewed-by: Adam Jackson Signed-off-by: Egbert Eich commit 49fe4ee7b7085b616028d6afe67767a60a8adf82 Author: Matt Turner Date: Thu Feb 7 17:29:00 2013 -0800 compiler.h: Remove dead STANDALONE_MMIO The only drivers I can find that used this are the r128 and radeon DRI drivers. r128 is dead and the radeon driver wasn't including Xorg's compiler.h and still worked. Reviewed-by: Adam Jackson Signed-off-by: Matt Turner commit d2a6962474978437545120ebc1fcfb909d901d55 Author: Andy Ritger Date: Wed Jun 20 11:52:34 2012 -0700 mi: Log an error if mieqProcessInputEvents() recurses. v2: Uses BUG_WARN_MSG to also provide a stack trace. (Peter Hutterer) Signed-off-by: Keith Packard Signed-off-by: Andy Ritger commit cc57ab4fc8b9dc15531f0dd9f5b352fa99a80cd0 Author: Andy Ritger Date: Wed Jun 20 11:52:33 2012 -0700 Remove static qualifier on mieqProcessInputEvents()'s 'event' This isn't necessary. Signed-off-by: Andy Ritger Signed-off-by: Keith Packard commit 44ea291b78b39ed5fd03f9693ac9525b866e183b Author: Tomas Carnecky Date: Mon May 21 19:47:01 2012 +0000 Remove NO_LIBCWRAPPER define I'll just refer to 1faba79 (Death to libcwrapper., 2007-12-03). Reviewed-by: Adam Jackson Signed-off-by: Tomas Carnecky commit 1e95a7df5f2e919ce59c5188d2ad1b30c3ac8595 Author: Peter Hutterer Date: Thu Mar 15 13:46:56 2012 +1000 dix: put warning in for scroll increments of 0 If the increment is 0 but this is a scroll axis, it's definitely a bug. Nonetheless, it has happened, so put a warning in and a return statement that we avoid the infinite loop and hopefully be able to reproduce later. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 63efa2e7e91349dfecc849d30c5de84b3c911fe9 Author: Bryce Harrington Date: Wed Nov 30 12:54:29 2011 -0800 test: Fix typo and drop documentation references to glib. The X server doesn't use glib for the tests any more. Signed-off-by: Bryce Harrington Reviewed-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 4c7cefe24001279a558dd875949d40ede49ef702 Author: Dave Airlie Date: Thu Oct 20 11:44:28 2011 +0100 exa: initialise mask_off_x and mask_off_y These get used at the end of the function in a calculation, even though the result isn't used its not pretty. Pointed out by coverity. Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith commit 668cce3f5a175109442f0ef9b50354db95e66b44 Author: Gaetan Nadon Date: Fri Sep 23 14:11:17 2011 -0400 dmx: fix typo in the title [ajax: fix typo in the commit message] Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith commit 7ed0c3912e1cbab960df308b9d4ea618be757fd2 Author: Andrea Canciani Date: Wed Jul 27 10:52:31 2011 +0200 render: Allow single-stop gradients The Render specification allows single-stop gradients and pixman 0.22 (X server requires >= 0.27.2 now) can rasterize them correctly. [ajax: update commit message] Signed-off-by: Andrea Canciani Reviewed-by: Soren Sandmann commit 3d9f578e6f0d13ecada7dc677fe61a4dd3d05e18 Author: Cyril Brulebois Date: Mon Jun 6 02:25:11 2011 +0200 doc: Convert an \fP pair into appropriate tags. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit d97ffef1ab95546634a74618ed2661cfd6d980b1 Author: Cyril Brulebois Date: Mon Jun 6 02:25:10 2011 +0200 doc: Try to avoid repetitions. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit 2cce6ffc350d3840337a4d045d5cf14bb7bf2b32 Author: Cyril Brulebois Date: Mon Jun 6 02:25:08 2011 +0200 doc: Fix punctuation. [ajax: s/ponct/punct/] Signed-off-by: Cyril Brulebois Reviewed-by: Jamey Sharp commit e7e3320098cad585d46f74d8a0c6946a080b0263 Author: Cyril Brulebois Date: Mon Jun 6 02:25:07 2011 +0200 doc: Fix extraneous > It looks like it serves no special purpose. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 9b4f10d7490f6610a65d401958296c95ce891c8b Author: Cyril Brulebois Date: Mon Jun 6 02:25:06 2011 +0200 doc: Fix grammar and typos. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 5b92a0a84a067b653cc457d8ec0fe25f36a9d207 Author: Cyril Brulebois Date: Mon Jun 6 02:25:05 2011 +0200 doc: Fix alignment. Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit 0b8fca667b45f00249a3dd9ee79d2a77a4177b24 Author: Cyril Brulebois Date: Mon Jun 6 02:24:59 2011 +0200 doc: Fix typo. Signed-off-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Alan Coopersmith commit 1226f7ddd78da5dc8b6f6442600ac2deb3986e8d Author: Cyril Brulebois Date: Mon Jun 6 02:25:01 2011 +0200 doc: Get rid of RCS tags. Reviewed-by: Adam Jackson Signed-off-by: Cyril Brulebois commit 4803f7139131cee7bbf50b32d667d6e60302df09 Author: Cyril Brulebois Date: Sun Jun 5 23:32:26 2011 +0200 man: Fix case for MIT-unspecified. include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather than MIT-Unspecified. Fix the manpage accordingly. Signed-off-by: Cyril Brulebois Reviewed-by: Alan Coopersmith commit 593270038d8983b99aa0aaa24509da3cb944be5c Author: Tiago Vignatti Date: Tue Sep 7 15:50:26 2010 +0300 dix: remove dead extensions to protocol.txt lbx and mbe. Reviewed-by: Adam Jackson Signed-off-by: Tiago Vignatti commit 3cd56dd2cfbfcce6ba68c22450d51139208993ab Author: Robert Hooker Date: Fri Dec 3 23:42:27 2010 -0500 Add new GLX events errors and requests to protocol.txt Based off of glproto 1.4.11. Reviewed-by: Adam Jackson Signed-off-by: Robert Hooker commit 272ba9f021c6d08ebd6a2d96da3737f5630bcbd5 Author: Robert Hooker Date: Fri Dec 3 23:39:51 2010 -0500 Add DRI2 2.2/2.3 events and requests to protocol.txt Reviewed-by: Adam Jackson Signed-off-by: Robert Hooker commit 64e6124f27e9900809d0009b95c7c0b5b8788e6b Author: Emil Velikov Date: Tue Sep 22 15:35:40 2015 +0100 glamor: move GL_OES_EGL_image check next to EGL_EXT_image_dma_buf_import We're using the former only as the latter is present. Thus in some cases we might incorrectly error out if it's missing. Namely - glamor_glx, glamor_egl without gbm, EGL_KHR_gl_texture_2D_image or EGL_EXT_image_dma_buf_import. Fixes 58d54ee82df(glamor: explicitly check for GL_OES_EGL_image) Cc: Eric Anholt Reviewed-by: Adam Jackson Suggested-by: Eric Anholt Signed-off-by: Emil Velikov commit aa5606be1c0ea72b38de48ca333c7da5436368ef Author: Alan Coopersmith Date: Fri May 15 10:25:46 2015 -0700 Make configure test for LD_NO_UNDEFINED_FLAG on Solaris work w/autoconf 2.69 After upgrading from autoconf 2.68 to 2.69, this test started failing with "conftest.c", line 149: undefined symbol: NULL so use a raw 0 pointer to avoid header dependencies in the autoconf generated test case. Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit fa0bb01899d586e02cf51892c17edd22e462a46c Author: Adam Jackson Date: Mon Sep 21 15:23:23 2015 -0400 rootless: Fix bogus handling of broken root clip gcc quite correctly complains about this: In file included from ../../include/scrnintstr.h:51:0, from rootlessValTree.c:98: In function 'RegionUninit.isra.1', inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5, inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9: ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object] free((_pReg)->data); So that'd crash if you ever got there. RegionNull will do almost the same thing only without the free(), so let's do that instead; it might still not be an entirely sane way to recover, but it at least won't crash. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit b25f7d0c165c4d32c73fbdf9080012503d319ba1 Merge: db1089eaf 1ba4fde10 Author: Adam Jackson Date: Mon Sep 21 17:34:48 2015 -0400 Merge commit '1ba4fde1015fc6da19dfbfdf0f77f1071416e215' This is ofourdan/xwayland, minus: xwayland: Always update the wl_pointer cursor on pointer focus which was rejected for ABI and design issues. commit db1089eafc1c5371fa0030202de588d2e2b4f8e5 Author: Keith Packard Date: Mon Sep 21 07:16:17 2015 +0100 os/xdmcp: Just send XDMCP keepalive packets once every three minutes There was a complicated scheme to increase the time between keepalives from 3 minutes up to as much as 24 hours in an attempt to reduce network traffic from idle X terminals. X terminals receiving X traffic, or receiving user input would use the 3 minute value; X terminals without any network traffic would use a longer value. However, this was actually broken -- any activity in the X server, either client requests or user input, would end up resetting the keepalive timeout, so a user mashing on the keyboard would never discover that the XDMCP master had disappeared and have the session terminated, which was precisely the design goal of the XDMCP keepalive mechanism. Instead of attempting to fix this, accept the cost of a pair of XDMCP packets once every three minutes and just perform keepalives regularly. This will also make reworking the block and wakeup handler APIs to eliminate select masks easier. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a3a40291330bad10401fe2bcdbc097ce742b026a Author: Keith Packard Date: Mon Sep 21 07:16:16 2015 +0100 os/xdmcp: Remove dead 'restart' code The X server used to wait for the user to hit a key or move the mouse before restarting the session after a keepalive failure. This, presumably, was to avoid having the X server continuously spew XDMCP protocol on the network while the XDM server was dead. Switching into this state was removed from the server some time before XFree86 4.3.99.16, so the remaining bits of code have been dead for over a decade, and no-one ever noticed. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 3cd7d33380953f2a315dd79ab74d7340c83fd80a Author: Egbert Eich Date: Tue Mar 31 09:06:46 2015 +0200 randr: Remove senseless checks for xf86RandR12Key When xf86RandR12Key is not set we will not get to the places where these tests are done as the functions in question are not called. In most cases we would have crashed before these checks anyway. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard commit 245040f0d0b937efe14d947468a641a95398776a Author: Chris Wilson Date: Mon Oct 6 10:02:22 2014 +0100 randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmap As we define sizeFits based on whether a CRTC is active, and skip trying to redirect the scanout on a disable pipe, we then attempt to undo it later and fail because crtc->scanout_pixmap != DRI2_Pixmap and !sizeFits. Paper over this failure by skipping unredirected CRTC when disabling. v2: Unwind upon failure Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653 Signed-off-by: Chris Wilson Cc: Dave Airlie Reported-by: Christoph Haag Tested-by: Christoph Haag Reviewed-by: Alex Deucher commit 9d65a0de95a20632f2a6a04ba596dcdd76d9f5e2 Author: Alan Coopersmith Date: Fri Sep 18 08:44:07 2015 -0700 Remove DECnet from Xserver.man DECnet support died in modularization (X11R7.0) Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 82eb490b0a341729f25d0c42a937fe29d99da521 Author: Aaron Plattner Date: Thu Sep 17 16:04:33 2015 -0700 privates: Clear screen-specific keys during CloseScreen The modesetting driver corrupts memory when used after a server regeneration because not enough memory is allocated for its pixmap privates. This happens because its call to dixRegisterScreenSpecificPrivateKey() does nothing because key->initialized is still TRUE from the first server generation. However, the key is not in the screen's linked list of screen-specific privates because that's freed and reallocated during the server generation loop in dix_main(). Fix this by clearing key->initialized before CloseScreen and add a call to dixFreeScreenSpecificPrivates() for GPU screens. v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates() calls to after CloseScreen. v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen. Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard commit 18a93da9b1f429bc54a8b236fcdd38dab58375cd Author: Jasper St. Pierre Date: Wed Feb 18 12:41:25 2015 -0800 test/xi1: Update .gitignore Reviewed-by: Adam Jackson commit cdd1d58159140759052ec043bc9828d94ba97bc7 Author: Jon TURNEY Date: Mon Jul 6 17:15:44 2015 +0100 mingw: Fix NO_LOCAL_CLIENT_CRED build Commit 4b4b9086 "os: support new implicit local user access mode [CVE-2015-3164 2/3]" carefully places the relevant code it adds under !NO_LOCAL_CLIENT_CRED, but unfortunately doesn't notice that NO_LOCAL_CLIENT_CRED is defined as a side-effect in the middle of GetLocalClientCreds(), so many of these checks precede its definition. Move the check if NO_LOCAL_CLIENT_CRED should be defined to configure.ac, so it always occurs before it's first use. v2: Move check to configure.ac v3: Use AC_CACHE_CHECK and name cache varaible appropriately [ajax: Massaged commit message] Signed-off-by: Jon TURNEY Reviewed-by: Ray Strode commit f8a2c087c89ed5b638a2e62987f255d3f04f914e Author: Javier Jardón Date: Sun Mar 22 03:52:03 2015 +0000 configure.ac: Add support for new versions of systemd ... that only provide a unique libsystemd.pc file Reviewed-by: Peter Hutterer Signed-off-by: Javier Jardón commit 67dd34fa734085ed67ba7790820fe4743d48b60f Author: Adam Jackson Date: Wed Jun 10 13:20:59 2015 -0400 render: Simplify SProcRenderScale Since ProcRenderScale throws BadImplementation anyway it's pointless to waste time carefully swapping the request. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith commit a579e6ba7763749d51d16e3a54941e06939df07a Author: Ian Scott Date: Thu May 21 16:13:12 2015 -0700 Xephyr: Paint with subimage for non-Glamor & non-XSHM case This improves the case for when we paint an area without SHM. xcb_image_subimage() is used to create a subimage for the damaged area, which is converted to native format if necessary. Signed-off-by: Ian Scott Reviewed-by: Chris Wilson commit a6c0564f7f00aa66fd19180f75b6b09904444f06 Author: Laércio de Sousa Date: Mon Mar 23 10:58:03 2015 -0300 ephyr: move host_has_extension() implementation to hostx.c This is a trivial patch that moves host_has_extension() implementation from ephyr.c to hostx.c so that it can be called by hostx.c internal functions. Also rename function to hostx_has_extension() for consistency. Reviewed-by: Adam Jackson Signed-off-by: Laércio de Sousa commit 9414ba3683231afe9bee0f941c53998dea218615 Author: Jürg Billeter Date: Sun Feb 8 11:34:18 2015 +0100 ephyr: fix -no-host-grab argument processing Signed-off-by: Jürg Billeter Reviewed-by: Alan Coopersmith commit 1f915e8b524dd02011158aa038935970684c7630 Author: Daniel Drake Date: Wed May 20 13:16:12 2015 -0600 Keep SIGALRM restart flag after Popen Commit 94ab7455 added SA_RESTART to the SIGALRM handler. However, the Popen code tears down and recreates the SIGALRM handler via OsSignal(), and this flag is dropped at this time. Clean the code to use just a single codepath for creating this signal handler, always applying SA_RESTART. [ajax: Fixed commit id] Reviewed-by: Adam Jackson Signed-off-by: Daniel Drake commit 94ab7455abc213fc96760e29ab2e943ec682fb22 Author: Daniel Drake Date: Tue May 12 16:39:22 2015 -0600 Allow system call restarts upon signal interruption The X server frequently deals with SIGIO and SIGALRM interruptions. If process execution is inside certain blocking system calls when these signals arrive, e.g. with the kernel blocked on a contended semaphore, the system calls will be interrupted. Some system calls are automatically restartable (the kernel re-executes them with the same parameters once the signal handler returns) but only if the signal handler allows it. Set SA_RESTART on the signal handlers to enable this convenient behaviour. Reviewed-by: Adam Jackson Signed-off-by: Daniel Drake commit 1ba4fde1015fc6da19dfbfdf0f77f1071416e215 Author: Boyan Ding Date: Mon Aug 4 21:16:34 2014 +0800 xwayland: Activate and enable device on first capability reporting Commit 2172714c changed behavior of capability handling, but it only solved part of the problem. If Xwayland is launched without a capability (e.g. no pointer device is connected when Xwayland was spinned up), and later that capability comes, the device added will not be automatically initialized. This patch initializes the device when the capability is reported for the first time, thus avoiding the problem. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=81819 Signed-off-by: Boyan Ding Reviewed-by: Daniel Stone commit f1995de1c43733a9e586605674c4071357a58e78 Author: Peter Hutterer Date: Fri Aug 28 14:28:11 2015 +1000 xwayland: call through to miPointerWarpCursor on warp_cursor This is (eventually) called during InitializeSprite() → *pScreen->SetCursorPosition → miPointerSetCursorPosition when a device is set to floating. We don't do anything special outselves, but we need to pass on to the next layer to make sure the device is initialized properly. Otherwise, pScreen stays NULL and eventually crashes the server when we try to clean up behind us. Test case: grab a device → floats it, ungrab again → crash Reported-by: Jason Gerecke Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 373599ab008f0ecf8f3fb62455a5474f5ec8f499 Author: Peter Hutterer Date: Fri Aug 28 14:28:10 2015 +1000 xwayland: fix crash on enter/leave for a grabbed slave device When grabbed, the slave device is floating, i.e. the master device is NULL. CheckMotion() isn't happy with NULL. Make sure we pass the right device in, either the master device when the device is attached, or the device itself when it is floating. Reported-by: Jason Gerecke Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit f1ba8858d5baa63cde6361492e6d349ce1b38d21 Author: Peter Hutterer Date: Fri Aug 28 14:28:09 2015 +1000 xwayland: use the device pointer we already have No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Olivier Fourdan commit 44f250a7e8eb86d3f41da5d186d839e7a14648a3 Author: Carlos Garnacho Date: Wed May 27 18:42:00 2015 +0200 xwayland: Remove related touchpoints when unrealizing windows These sequences are forgotten to all purposes. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit b7cd48f71d269101e28ae6855b895057378715f9 Author: Carlos Garnacho Date: Wed May 27 18:41:59 2015 +0200 xwayland: Implement the wl_touch interface A DeviceIntPtr with touch valuators is also created in order to deliver the translated touch events. The lifetime of xwl_touch structs is tied to the wayland ones, finishing in either wl_touch.up() or wl_touch.cancel() Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit d96eccc057094be31c1ee4e3b3246675934cb19d Author: Carlos Garnacho Date: Wed May 27 18:41:58 2015 +0200 xwayland: Add xwl_touch struct This struct holds information about each individual, ongoing touchpoint. A list of these is held by the xwl_seat. Signed-off-by: Carlos Garnacho Reviewed-by: Olivier Fourdan commit c1565f3ca663aa4ba4316d7248737ab817116fbd Author: Jasper St. Pierre Date: Sat Feb 21 11:53:59 2015 -0800 xwayland-input: Remove our XYToWindow handler This was built as a hack for simple Wayland compositors like Weston which were lazy and didn't want to configure windows server-side when moved. Since comboboxes and menus are separate toplevel O-R windows, this hack breaks input as it needs to be traced normally, not simply sent to the focused window. X11 toolkits really do need their windows to be configured correctly for their O-R windows comboboxes or menus other things, so let's fix the lazy compositors and remove this. I have tested this patch with both Weston and Mutter and neither of them require any changes, and it fixes comboboxes and menus. If somebody then wants to revert 73698d4, that's fine by me, so we reduce the amount of API that DDXen have. Signed-off-by: Jasper St. Pierre Reviewed-by: Daniel Stone commit 58d54ee82dfae5486bc09d04d2760c922d54d631 Author: Emil Velikov Date: Wed Sep 16 22:10:22 2015 +0100 glamor: explicitly check for GL_OES_EGL_image Otherwise we'll fail miserably later on as we try to use glEGLImageTargetTexture2DOES. Signed-off-by: Emil Velikov Reviewed-by: Michel Dänzer commit 139e36dd5cbab80a9296129f3d25379dc01442b3 Author: Ilia Mirkin Date: Fri Sep 4 18:56:19 2015 -0400 modesetting: fix up output naming convention A user on a nouveau-driven card ran into a problem where DVI-D-1 and DVI-I-1 were aliasing. The simplest fix is to provide the full connector names. While we're at it, rename the output names to match what is in the kernel, and start counting the connectors from 1 rather than 0. The only deviation is HDMI vs HDMI-A, which kept its original name. This will break backwards compatibility with existing xorg.conf's that reference output names, but the alternative is to create a separate counting system, further disconnecting from the kernel names. Signed-off-by: Ilia Mirkin Reviewed-by: Dave Airlie commit a907ead7864ac5720854fa3333b66fd5187d5eaf Author: Marek Chalupa Date: Thu Aug 20 07:43:51 2015 +0200 xwayland: implement repeat_info event xwayland windows ignored any key repeating settings advertised by a compositor v2. don't hardcode version 4 of seat use AutoRepeatModeOn/Off v3. use min(version, 4) when binding seat Reviewed-by: Adam Jackson Signed-off-by: Marek Chalupa commit e8e3368298c98a1292bb1c727e2f3d56539e2eac Author: Felix Janda Date: Mon Aug 17 20:25:53 2015 +0200 On linux use instead of is obsolete. Using instead fixes building with musl libc. Reviewed-by: Adam Jackson Signed-off-by: Felix Janda commit dfa8b37cfb2589f2474f6fcc755dde77bfdd6fed Author: Adam Jackson Date: Wed Jul 29 11:30:15 2015 -0400 glxproxy: Fix an obvious thinko in QueryExtensionsString gcc 5.1 throws a rather amusing warning here: glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’: glxcmdsswap.c:439:1: warning: function might be candidate for attribute ‘noreturn’ [-Wsuggest-attribute=noreturn] __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc) This is entirely accurate, albeit curiously phrased: swapping some bits hanging off the end of a null pointer will make Xdmx crash, so from the perspective of code generation the function will indeed not return. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 75ee874e432d959a70fbc2c9208d20dbfa5cbc5f Author: Jon TURNEY Date: Fri May 1 17:06:47 2015 +0100 Build fix for DMX ./../dix/.libs/libdix.a(pixmap.o): In function `PixmapStartDirtyTracking': xorg/xserver/dix/pixmap.c:194: undefined reference to `RRTransformCompute' I'm not quite sure how 0db457b fixes this Move RANDR_LIB to after DIX_LIB, so the reference to RRTransformCompute in DIX_LIB is satisfied. Signed-off-by: Jon TURNEY Tested-by: Olivier Fourdan Signed-off-by: Keith Packard commit 634e357be2ec400f63bd5c42f706b709b6ddabc3 Author: Ingo Schwarze Date: Sun Aug 30 15:26:40 2015 +0200 remove bogus \/ escapes some X manuals use then escape sequence \/ when they want to render a slash. That's bad because \/ is not a slash but an italic correction, never producing any output, having no effect at all in terminal output, and only changing spacing in a minor way in typeset output. Signed-off-by: Matthieu Herrb Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit c74c074d8e4981eb4509e120e14d15387bdc94ef Author: Olivier Fourdan Date: Mon Aug 31 08:18:59 2015 +0200 dix: export ResourceClientBits() ResourceClientBits() might be used by the modules as well, need to mark the symbol as visible to that the linker can resolve it at run time. /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libglx.so: undefined symbol: ResourceClientBits bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91763 Signed-off-by: Olivier Fourdan Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dbfed3a291619c2530f314394bd73d71e2567e78 Author: Keith Packard Date: Tue Sep 1 19:03:33 2015 -0700 Bump version to 1.17.99.901 (1.18 RC1) Signed-off-by: Keith Packard commit bcb60a49c5e74aa11d0256874659afddea91e53d Author: Jon TURNEY Date: Tue Jul 7 23:11:07 2015 +0100 debug output format fix in TouchEventHistoryPush() xserver/build.x86_64/../dix/touch.c:468:16: error: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ [-Werror=format=] %zu is C99, but is already used in a few places. Perhaps doc/c-extensions needs to mention it. Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 1f96a0d273e56d01cd240e6a4ef8765e0ffe058c Author: Jon TURNEY Date: Fri May 1 17:40:06 2015 +0100 debug output format fix in ephyrProcessMouseMotion() xorg/xserver/hw/kdrive/ephyr/ephyr.c:979:9: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘ScreenPtr’ [-Werror=format=] This looks like a genuine bug, and ephyrCursorScreen->myNum was meant here rather than ephyrCursorScreen v2: Insert a ":" as well Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 8cc88fbe9e4699cd2570641eb2752977b5505d16 Author: Jon TURNEY Date: Fri May 1 17:33:35 2015 +0100 debug output format fix in DRISwapContext() xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘DRIContextPrivPtr’ [-Werror=format=] ^ xorg/xserver/hw/xfree86/dri/dri.c:1695:19: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘DRIContextPrivPtr’ [-Werror=format=] Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 27cf5840272810ae20fdae550db71ec48cf1b02d Author: Jon TURNEY Date: Tue Jul 7 23:29:51 2015 +0100 debug output format fix in TI.c xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Werror=format=] xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘long unsigned int’ [-Werror=format=] xserver/hw/xfree86/ramdac/TI.c:118:12: error: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Werror=format=] Use %lu for an unsigned long Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit 6cc0f3d95d62e33a5d86f865159cc3526d3a9dc5 Author: Jon TURNEY Date: Tue Jul 7 23:20:29 2015 +0100 debug output format fix in xf86Events.c xserver/hw/xfree86/common/xf86Events.c:183:5: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘void *’ [-Werror=format=] Signed-off-by: Jon TURNEY Reviewed-by: Peter Hutterer commit d206c240c0b85c4da44f073d6e9a692afb6b96d2 Author: Olivier Fourdan Date: Tue Jul 7 18:19:50 2015 +0200 configurable maximum number of clients Make the maximum number of clients user configurable, either from the command line or from xorg.conf This patch works by using the MAXCLIENTS (raised to 512) as the maximum allowed number of clients, but allowing the actual limit to be set by the user to a lower value (keeping the default of 256). There is a limit size of 29 bits to be used to store both the client ID and the X resources ID, so by reducing the number of clients allowed to connect to the X server, the user can increase the number of X resources per client or vice-versa. Parts of this patch are based on a similar patch from Adam Jackson This now requires at least xproto 7.0.28 Signed-off-by: Adam Jackson Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 7ecdfbf0af3547295b245efa754123db65cabb43 Merge: bca4f4b56 a0b4f30b1 Author: Keith Packard Date: Mon Aug 17 18:53:25 2015 -0700 Merge remote-tracking branch 'airlied/modesetting-zaphod' commit bca4f4b56c7619d17f9df46f7aac392ea01a9429 Author: Keith Packard Date: Mon Aug 17 18:37:10 2015 -0700 mi: Always initialize edge1 and edge2 in miLineArc This eliminates a warning generated when miLineArcD is inlined and the compiler can't figure out that edge1 and edge2 are always initialized before being used. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 5daf1295cb4f71510da595721d10f7ea3b74d1b9 Author: Keith Packard Date: Mon Aug 17 18:35:20 2015 -0700 dixfont.h: Include fontutil.h before GetGlyphs is #defined This eliminates the duplicate declaration of dixGetGlyphs when fontutil.h gets included after dixfont.h has defined GetGlyphs as dixGetGlyphs. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit d4710004367ab8eab794a12385ca7ed3acc9a0e0 Author: Dave Airlie Date: Thu Aug 13 09:25:37 2015 +1000 rootless: rename w->_w to avoid shadow warnings fixes: In file included from rootlessWindow.c:51:0: rootlessWindow.c: In function 'RootlessResizeWindow': rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT' HUGE_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ In file included from rootlessWindow.c:51:0: rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow] WindowPtr w = pWin; \ ^ rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT' NORMAL_ROOT(pWin); ^ rootlessWindow.c:1262:35: note: shadowed declaration is here unsigned int w, unsigned int h, WindowPtr pSib) ^ Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7f506b8099d23c2f045ad26cc5cff00109b69d7b Author: Dave Airlie Date: Thu Aug 13 09:25:36 2015 +1000 rootless: fix warnings due to lack of const keeping. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b923443816320d0636d6fd40c3c1125b93332907 Author: Dave Airlie Date: Thu Aug 13 09:25:35 2015 +1000 mioverlay.c: remove shadowed pScreen. This is already defined at the function entry. fixes warning: CC mivaltree.lo mioverlay.c: In function 'miOverlayWindowExposures': mioverlay.c:993:23: warning: declaration of 'pScreen' shadows a previous local [-Wshadow] ScreenPtr pScreen = pWin->drawable.pScreen; ^ mioverlay.c:986:15: note: shadowed declaration is here ScreenPtr pScreen = pWin->drawable.pScreen; Signed-off-by: Dave Airlie > Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a0b4f30b1f584d2957c9c99e430da5740d2d4ab2 Author: Mario Kleiner Date: Wed Aug 5 00:08:40 2015 +0200 modesetting: Add more missing options to man page. Descriptions for Options PageFlip and SWCursor. Signed-off-by: Mario Kleiner Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 19e1dc8f6ea6d7ff5ba4a5caa0e2f40a47879408 Author: Dave Airlie Date: Wed Jul 22 03:56:13 2015 +0100 modesetting: add zaphod support (v3) This adds zaphod and ZaphodHeads support to the the in-server modesetting driver. this is based on a request from Mario, and on the current radeon driver, along with some patches from Mario to bring things up to the state of the art in Zaphod. v2: fixup vblank fd registring. v3: squash Mario's fixes. modesetting: Allow/Fix use of multiple ZaphodHead outputs per x-screen. modesetting: Take shift in crtc positions for ZaphodHeads configs into account. modesetting: Add ZaphodHeads description to man page. small cleanups (airlied). Reviewed-and-tested-by: Mario Kleiner Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 533fb627398e20f863234d780f4463e37007515b Author: Adam Jackson Date: Tue Aug 4 13:17:02 2015 -0400 xwayland: Don't (double) destroy input resources in CloseScreen By the time we get here we've already done CloseDownDevices, so on the second regeneration you get: Invalid read of size 4 at 0x43402A: RemoveDevice (devices.c:1125) by 0x427902: xwl_seat_destroy (xwayland-input.c:568) by 0x42649C: xwl_close_screen (xwayland.c:116) by 0x4B7F67: CursorCloseScreen (cursor.c:187) by 0x536003: AnimCurCloseScreen (animcur.c:106) by 0x539831: present_close_screen (present_screen.c:64) by 0x43E486: dix_main (main.c:351) by 0x30D70206FF: (below main) (libc-start.c:289) Address 0x980e1a0 is 64 bytes inside a block of size 904 at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x434158: RemoveDevice (devices.c:1157) by 0x42F77B: CloseDeviceList (devices.c:1017) by 0x430246: CloseDownDevices (devices.c:1047) by 0x43E3EB: dix_main (main.c:333) by 0x30D70206FF: (below main) (libc-start.c:289) Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 11f4cc47a815c5d6284b1338e748e2605b2dd779 Author: Adam Jackson Date: Tue Aug 4 13:17:01 2015 -0400 xwayland: Don't (double) destroy RANDR resources in CloseScreen By the time we get here we've already been through FreeAllResources, which has already torn down the RANDR objects, so on the second regeneration you get: Invalid read of size 4 at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659) by 0x4285F5: xwl_output_destroy (xwayland-output.c:191) by 0x426464: xwl_close_screen (xwayland.c:112) by 0x4B7F77: CursorCloseScreen (cursor.c:187) by 0x536013: AnimCurCloseScreen (animcur.c:106) by 0x539841: present_close_screen (present_screen.c:64) by 0x43E496: dix_main (main.c:351) by 0x30D70206FF: (below main) (libc-start.c:289) Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689) by 0x45CD91: doFreeResource (resource.c:872) by 0x45DE56: FreeClientResources (resource.c:1138) by 0x45DF06: FreeAllResources (resource.c:1153) by 0x43E3BD: dix_main (main.c:321) by 0x30D70206FF: (below main) (libc-start.c:289) Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit ea03e314f98e5d8ed7bf7a508006a3d84014bde5 Author: Eric Anholt Date: Mon Jul 27 13:54:00 2015 -0700 glamor: Don't try to free the pixmap priv if we fail to allocate FBO. Fixes a regression since a2a2f6e34bd49e7ae31779274d52e800595660bc. I missed this in testing on x86, because we never fail to allocate an FBO. We do hit this path on VC4, though. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 6916d32ab3ec1aa922094abce7fac22884ee4e83 Author: Alan Coopersmith Date: Sun Jul 19 08:24:39 2015 -0700 Xserver.man: -retro is used when starting the server, not the stipple Signed-off-by: Alan Coopersmith Reviewed-by: Michel Dänzer Signed-off-by: Eric Anholt commit 0a458a908ec071a4da5d22c760581e0c5ec885ce Author: Michel Dänzer Date: Wed Jul 22 15:37:23 2015 +0900 glamor: Make our EGL context current before calling into GL in glamor_init Without this, the context of another screen may be current, or no context at all if glamor_egl_init failed for another screen. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit a8a0f6464a33c12c1de495d74fd478c0d952643e Author: Aaron Plattner Date: Thu Jul 16 15:12:52 2015 -0700 xfree86: Bump video driver ABI version to 20 Commit 90db5edf119187f8b1b9207c8c384d6cd7ef9edc modified the signature of StartPixmapTrackingProcPtr, so drivers implementing that need to use the updated definition. Signed-off-by: Aaron Plattner Signed-off-by: Eric Anholt commit 2fcfa532532fbe4a7f668556808e6245ff4e36bc Merge: cb695b0f3 7b0f94062 Author: Eric Anholt Date: Fri Jul 17 10:15:01 2015 -0700 Merge remote-tracking branch 'ajax/xserver-next' into master commit cb695b0f3b8def4d1ac02458fe630b65f6a5a3e6 Author: Armin K Date: Thu Jul 16 14:54:48 2015 +0200 xfree86/os-support/linux: Fix make distcheck Header was added in 1dba5a0b194653b0effb01a918bd7338b0c6bcb9 but not in Makefile.am, resulting in missing header in the distribution tarball. Signed-off-by: Eric Anholt commit 29efa905ec1e22d66b517378c6e5ad47a09d6977 Author: Robert Ancell Date: Thu Jul 16 12:26:05 2015 +1200 modesetting: Use correct types for return values of glamor BO exports. glamor_name_from_pixmap and glamor_fd_from_pixmap return CARD16 and CARD32 values via pointers. The current code uses uint16_t and uint32_t which will probably be the same but it's safer to use the datatypes as specified by the function. Signed-off-by: Robert Ancell Signed-off-by: Eric Anholt commit db5337afb248edf81087cf8d74006fc496d70589 Author: Dave Airlie Date: Wed Jul 15 17:56:11 2015 +1000 glamor: make current in prepare paths Lots of the accel paths only make current once they start doing someting, so a lot of them call the bail paths without make current, which means on PRIME systems for example we end up in the wrong context. Add a prepare pixmap in the prepare fallback path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667 Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt commit 1a18513a4eb3fa22459dd9f7d8f0e275aff679ec Author: Michel Dänzer Date: Fri Jul 10 15:28:52 2015 +0900 glamor: Use glamor_prepare_access_box() for PutImage/GetImage fallback Fixes slow text display in xdvi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91260 Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt commit fde13565c1b2462ee38f2a446ad3c9157261afa2 Author: Eric Anholt Date: Thu Jul 2 13:57:05 2015 -0700 glamor: Drop unused box translation/bounds code. These are dead since the glamor_copy.c replacement. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit ab5aa270c79d70f095bc7abadeef227b4062027c Author: Eric Anholt Date: Thu Jul 2 13:52:05 2015 -0700 glamor: Move cache_format to glamor_fbo.c, where it's used. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0ca783e8ee5dfb086fbfa64d26173bcca78b4010 Author: Eric Anholt Date: Thu Jul 2 13:50:42 2015 -0700 glamor: Drop another dead function. This hasn't been used since the format swap/revert stuff for pictures was added back in 2012. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit c1111710628cc2a9dfaee0d74ea9fceee990095b Author: Eric Anholt Date: Thu Jul 2 13:33:01 2015 -0700 glamor: Take transforms into account when preparing for a fallback. This function takes the start x/y and the destination's width/height, so it only works if there's no transform. We could potentially transform this box and take its bounds with some rounding, but this at least gets us to read out enough data. Note that this does the same overshoot on destination pictures with a transform attached, but that seems unlikely to be used anyway. v2: Add XXX comment for the commit message note (Suggested by Michel). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Dave Airlie (v1) commit c16e086dace81151f399485e5c686617a43d5b94 Author: Eric Anholt Date: Thu Jul 2 13:25:40 2015 -0700 glamor: Drop dead drm_stride field. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 8097c887023b72744cb2cb943c2deca7ca0c404a Author: Eric Anholt Date: Thu Jul 2 13:11:20 2015 -0700 glamor: Drop tracking of the last picture attached to pixmaps. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0dbdb83b0d0254ac67fb33da8bf9ebc0ef4e8081 Author: Eric Anholt Date: Thu Jul 2 12:55:27 2015 -0700 glamor: Use the actual picture's format when uploading memory pixmaps. The pixmap->picture is just the *last* picture attached to the pixmap, so you'd potentially be looking at the wrong one when trying to temporarily upload to avoid a composite fallback. There's some trickiness in glamor_render.c when we're dealing with the upload of a GLAMOR_MEMORY pixmap as both the source and mask using different formats, where we smash the source's format to a new value so that the mask can use the same uploaded bits. Dropping most of that should be safe, since it will be uploaded as the source first, so the smashed format will still be used. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer Reviewed-by: Dave Airlie commit 1fd11c46aa086e4b80cb1bafa87c6b19a8014fd1 Author: Eric Anholt Date: Thu Jul 2 12:49:36 2015 -0700 glamor: Move glamor_render.c pict handling to glamor_picture.c These functions aren't used by anything else, and are specific to the temporary-upload-as-a-weird-format path of glamor_render.c, called through glamor_upload_picture_to_texture(). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 53aed06fb45aed4145754cd622508563ad262c4a Author: Eric Anholt Date: Thu Jul 2 12:48:01 2015 -0700 glamor: Drop dead glamor_upload_bits_to_pixmap_texture() proto. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit b51e079e1877411fde72372c3953d71e42ac1d6e Author: Eric Anholt Date: Thu Jul 2 12:40:05 2015 -0700 glamor: Use the new upload/download interface for XV uploads. We don't need any of its weird handling of picture formats, since our XV pixmaps don't have any pictures attached. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 1bd966d16d87ed908547144c68850f2cdee05469 Author: Eric Anholt Date: Thu Jul 2 12:21:41 2015 -0700 glamor: Ignore picture formats when choosing color for core rendering. Attaching a picture to a pixmap doesn't change its GL format, so it doesn't change how core rendering should be assigning colors to it. (Imagine XCreatePixmap(), optional XCreatePicture(pixmap) with various formats, XFillRectangle, XGetImage(). If the XGetImage results changed, this would be wrong). Fixes all failures in "rendercheck -t fill" and, as a result, the remaining failures in "rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10" Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 5a81de8284f851751a8943aa6a905377be315c7b Author: Eric Anholt Date: Wed Jul 8 12:18:28 2015 -0700 glamor: Don't try to do rendering with unsupported formats. I'm amazed we've made it as far as we have without these checks: if you made an unusual format picture that wasn't the normal a8r8g8b8 or x8r8g8b8 or a8, we'd go ahead and try to render with it, ignoring that the sampler would fetch totally wrong bits. Fixes 260 tests in rendercheck -t blend -o src -f a8r8g8b8,x2r10g10b10 Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie commit 0d7cbd6f5a2b5c9c690979da9c1483e8f6133903 Author: Hans de Goede Date: Fri Jul 3 20:42:48 2015 +0200 glamor_egl: Properly free resources on init-error and exit glamor_egl_init() was not undoing any of the init steps on init error, add an glamor_egl_cleanup() function and use this both on error and on exit to cleanup the various resources. Even on a clean exit eglTerminate() was not being called, causing the fd dup()-ed by eglInitialize() to stay open, call eglTerminate() from the new glamor_egl_cleanup() to fix this. Signed-off-by: Hans de Goede Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 80b6652c9fb9cdff91e92fa16c07e2cc63b06f44 Author: Eric Anholt Date: Tue Jul 7 17:21:55 2015 -0700 glamor: Drop a bunch of glamor_priv == NULL checks. Now that it's always non-null when the pixmap is non-null, we don't need so much of this. glamor_get_pixmap_private() itself still accepts a NULL pixmap and returns NULL, because of glamor_render.c Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit a2a2f6e34bd49e7ae31779274d52e800595660bc Author: Eric Anholt Date: Tue Jun 30 16:20:18 2015 -0700 glamor: Ask the server to always allocate our private. This avoids a lot of screwing around to attach our privates later. It means that non-glamor pixmaps now gain 120 bytes of glamor privates on 64-bit (which has quite a bit of fixable bloat), and glamor pixmaps take one less pointer of storage (not counting malloc overhead). Note that privates start out zero-filled, which matches the callocs we were doing when making our own privates, and in the case of an fb pixmap that has a priv where it didn't before, the type ends up being GLAMOR_MEMORY as we would want. v2: Clarify that the GLAMOR_MEMORY enum must be 0 (as it was previosuly), so that the new pixmap private behavior is as expected. Suggested by keithp. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Keith Packard commit d278c30e68d79e86a3e2207b629d1e461856f907 Author: Eric Anholt Date: Tue Jun 30 20:35:59 2015 -0700 glamor: Drop dead glamor_is_large_picture(). It died as of keithp's new glyphs code. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit cd608a516d2c59ebfb95fadfecf68227888c0e4e Author: Eric Anholt Date: Tue Jun 30 20:25:06 2015 -0700 glamor: Reuse the glamor_is_memory helper. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Keith Packard commit 7b0f940625a0f6eee2ef91dfbfa4a206246940f5 Author: Adam Jackson Date: Fri Dec 19 13:46:37 2014 -0500 atom: make FreeAtom static Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit 2d2cf9e322a5ec3ead175edc136cdaeea00ec1b1 Author: Adam Jackson Date: Fri Dec 19 12:57:41 2014 -0500 atom: Bump initial table size We're always creating ~230 atoms at startup, might as well tune it so we don't hit the realloc path before Dispatch. Reviewed-by: Chris Wilson Signed-off-by: Adam Jackson commit 995ff11422eb49160abfe276f471e412b16cab9d Author: Adam Jackson Date: Tue May 19 11:31:25 2015 -0400 glx: Implement GLX_ARB_context_flush_control This extension allows clients to opt out of the implicit glFlush on context release, which is quite nice for performance for clients using multiple contexts. The server doesn't really need to be aware of the client's decision, at least for direct contexts, but it does need to not reject the context attribute out of hand. This patch won't do anything unless built against a Mesa that defines the __DRI2_FLUSH_CONTROL extension (and a new enough glxext.h, but that's been there since 10.3 at least). Reviewed-by: James Jones Signed-off-by: Adam Jackson commit 2d7194334a9f84e417ec90e220b2fe476f704612 Author: Adam Jackson Date: Fri May 15 11:27:31 2015 -0400 glx/swrast: Do more GLX extension setup This gets you nice things like core contexts when using Xvfb. Also, no, MESA_copy_sub_buffer is not enabled automatically. Reviewed-by: James Jones Reviewed-by: Jon Turney Signed-off-by: Adam Jackson commit cbd3cfbad3f07b20e90ea9498110f255813eb441 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 dix: Restore PaintWindow screen hook Removes the last cpp conditional on ROOTLESS from dix code. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 74d64ceea02bffad1caf3d1a727edbd38d968059 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 mi: Remove questionable optimization from the rootless path This is effectively a revert of 7b506fdc840aebed6b5acb91437a2cb620b5bddc except the coding style reindent broke that. The code makes no sense in any case. drawable can never be null since it's the first member of WindowRec, and we're never called with a null window. Neither can it be an UNDRAWABLE_WINDOW since those are InputOnly windows; the rootless code does not set the root window to either UNDRAWABLE or InputOnly, so. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 315661a425018a546f7bcc18ad3e5f4578473ca6 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 fb: Make rootless-agnostic Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 1594fb912996e9776d9e36383bd1d9f5dd2877eb Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 rootless: Build unconditionally It's not a lot of code, and if you're doing things to the core that affect rootless you should be alerted early. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit bdc917a41691250701ccc9a0b087448b50892fa9 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 rootless: Genericize the config header a bit ROOTLESS_RESIZE_GRAVITY is an optimization, so let's default it to off unless the backing window system is known to support it. ROOTLESS_PROTECT_ALPHA looks like it has different values for xquartz and win32, but hilariously rootlessGC.c merely checks if it is defined, not what the value is. It's effectively the more conservative path anyway, so let's just turn it on. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 6f3332b9f411fd7ac9cab0085faa56f6c2ff3323 Author: Adam Jackson Date: Tue Jun 2 13:58:30 2015 -0400 dix: unifdef pWin->rootlessUnhittable No reason to vary the dix ABI over this. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 36fac0dd1a9a9cf41b631cf7e1ea015bcf920db7 Author: Adam Jackson Date: Fri May 23 13:23:20 2014 -0400 xfixes: Unexport xfixes.h There's nothing a driver could want to use this for. Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 4da66d9e0399141feffd5f002e4195a438fe5020 Author: Adam Jackson Date: Tue Jul 8 14:27:02 2014 -0400 vidmode: Hide implementation details Also remove vidmodeproc.h from the SDK since no drivers are using it. Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 49d7bae7f4c6a93f92df828440e3478513f930f4 Author: Adam Jackson Date: Tue Jul 8 14:18:07 2014 -0400 xge: Hide some implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit 2377690709de11087edc9d1116c9feaeb8f118ed Author: Adam Jackson Date: Tue Jul 8 14:03:13 2014 -0400 dga: Hide a bunch of implementation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit b5fbe9c6327fac88c09afce598238a7534521b69 Author: Adam Jackson Date: Tue Jul 8 13:37:34 2014 -0400 xfree86: Hide some pre-randr mode validation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit 70b402be2626d4f4afb02b6f5baa543262548bd7 Author: Adam Jackson Date: Fri May 30 16:19:08 2014 -0400 render: Hide/unexport some implementation details Acked-by: Chris Wilson Reviewed-by: Aaron Plattner Signed-off-by: Adam Jackson commit a1c80bb7d5871e1c5ee21fc650834858054103bf Author: Adam Jackson Date: Fri May 30 15:49:38 2014 -0400 randr: Unexport some implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit b51f7f8582ab6c3cc9fa56c8d9721d0f240915e7 Author: Adam Jackson Date: Fri May 23 13:37:41 2014 -0400 dix: Unexport various implementation details Acked-by: Chris Wilson Signed-off-by: Adam Jackson commit c4a0d6c9139d2c0107b80420cc2342614bbe95ef Author: Adam Jackson Date: Wed Oct 22 10:47:03 2014 -0400 dri3: static cleanup Also remove unused window private key. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit a69e9027e167a83281b96e13f3a77100876b72ae Author: Adam Jackson Date: Wed Oct 22 10:44:36 2014 -0400 dri3: Remove unbuilt dri3_event.c The config notifies live in present, not dri3. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 91f0d71c18254746e1d519f0d19d11f756a9588c Author: Adam Jackson Date: Wed Oct 22 10:38:11 2014 -0400 parser: static cleanup Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit c732bb2799ad7ff6b0cdd9c65487466e6a9b76e7 Author: Adam Jackson Date: Wed Oct 22 10:31:29 2014 -0400 present: static cleanup Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 0db457b2b5b6e314e912efc62f158f8f0b8d48af Author: Adam Jackson Date: Wed Jul 8 15:56:55 2015 -0400 dmx: Fix the build Broken since: commit 4fd81823fafcd103e8d890f4c0f7c2f90e822336 Author: Dave Airlie Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) Signed-off-by: Adam Jackson commit 90db5edf119187f8b1b9207c8c384d6cd7ef9edc Author: Dave Airlie Date: Tue Jun 30 14:54:42 2015 +1000 prime: add rotation support for offloaded outputs (v2) One of the lacking features with output offloading was that screen rotation didn't work at all. This patch makes 0/90/180/270 rotation work with USB output and GPU outputs. When it allocates the shared pixmap it allocates it rotated, and any updates to the shared pixmap are done using a composite path that does the rotation. The slave GPU then doesn't need to know about the rotation and just displays the pixmap. v2: rewrite the sync dirty helper to use the dst pixmap, and avoid any strange hobbits and rotations. This breaks ABI in two places. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 991712f1e8deeb6289ee0abd9910e279d6396246 Merge: 0cd228073 3c859112d Author: Keith Packard Date: Wed Jul 8 10:43:31 2015 -0700 Merge remote-tracking branch 'ofourdan/for-keith' commit 0cd228073ad3b7eb72cef8b61128324895ee6cd4 Author: Jon TURNEY Date: Mon Jun 29 15:08:51 2015 +0100 hw/xwin: printf format fixes for Pixel type Pixel is CARD32, so inside the server has type unsigned int (x86_64) or unsigned long (x86) Cast to unsigned int and use a %u format Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e3cfeb949a9c9363beacdb00acdd9723ed54fac2 Author: Jon TURNEY Date: Fri Feb 6 20:22:11 2015 +0000 hw/xwin: printf format fixes for WPARAM and LPARAM types Some Win32 API types are different fundamental types in the 32-bit and 64-bit This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets, so we use some macros to provide the correct specifier for the target. LPARAM and WPARAM are integer types which can contain a pointer LPARAM is long in ILP32 and long long in LLP64 WPARAM is unsigned int in ILP32 and unsigned long long in LLP64 Generally, these are just used to passs integer parameters, so for simplicity, cast to int and use an int-compatible format In the specific case of WM_CHANGECBCHAIN, they are used to pass HWND, so cast to that type and print using an appropriate format. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4f8661fac985306c56330cae69ffc19e5dd0af61 Author: Jon TURNEY Date: Fri Feb 6 19:19:41 2015 +0000 hw/xwin: printf format fixes for LONG type Some Win32 API types are different fundamental types in the 32-bit and 64-bit versions. This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets In the Win32 API, DWORD is an signed, 32-bit type. It is defined in terms of a long, except in the LP64 data model, where it is an int. It should always be safe to cast it to int and use %d. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aa83c61f510121da20b56e8f7de700193f7d16b5 Author: Jon TURNEY Date: Fri Feb 6 19:46:45 2015 +0000 hw/xwin: printf format fixes for DWORD type Some Win32 API types are different fundamental types in the 32-bit and 64-bit versions. This problem is then further compounded by the fact that whilst both 32-bit Cygwin and 32-bit MinGW use the ILP32 data model, 64-bit MinGW uses the LLP64 data model, but 64-bit Cygwin uses the LP64 data model. This makes it impossible to write printf format specifiers which are correct for all those targets In the Win32 API, DWORD is an unsigned, 32-bit type. It is defined in terms of an unsigned long, except in the LP64 data model, where it is an unsigned int. It should always be safe to cast it to unsigned int and use %u or %x. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 487f2595c9dd9a5c3c600168a108963e87602561 Author: Jon TURNEY Date: Fri Feb 6 20:48:26 2015 +0000 hw/xwin: printf format fixes in xevents.c Window and Atom types derive from XID, which is always unsigned long in client code, so use %ld format specifier XTextProperty.nitems is of type unsigned long, so use %lu format specifier ulReturnBytesLeft is of type unsigned long, so use %lu format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 98798fcf0d1dc66c539abb2ecec0acc676d0b574 Author: Jon TURNEY Date: Fri Feb 6 20:42:54 2015 +0000 hw/xwin: printf format fix in winProcessXEventsTimeout() remainingTime is computed as a long int, so use %ld format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5b6f511c2fcad4edaccedbeb9842680cf3aeffb1 Author: Jon TURNEY Date: Fri Feb 6 20:40:46 2015 +0000 hw/xwin: printf format fix in winCreateDefColormap() Use %lu for unsigned long Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit eb679671560b21206a47476dfbc23518d8d46588 Author: Jon TURNEY Date: Fri Feb 6 20:38:26 2015 +0000 hw/xwin: printf format fixes in winAllocatePrivates() serverGeneration is of type unsigned long, so use %lu format specifier Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0d6c499b9976d305e13685eb79b4bb7cd4250f58 Author: Jon TURNEY Date: Fri Feb 6 20:27:11 2015 +0000 hw/xwin: printf format fixes in winConfigKeyboard() struct winInfoRec.keyboard members are of type long, not type int Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ba468e003e32c406f4885c8cb3deeb1c8175cd45 Author: Jon TURNEY Date: Mon Jun 29 14:25:49 2015 +0100 hw/xwin: printf format fixes for XID type XID inside the server has type unsigned int (x86_64) or unsigned long (x86) Follow the example of the rest of the server and cast to unsigned int and use a %u or %x format. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit dcb797b31f0affdc4b08b000dd92ec38fa261953 Author: Jon TURNEY Date: Thu Oct 2 14:28:46 2014 +0100 hw/xwin: printf format fixes for HWND type HWND derives from HANDLE, a pointer type, so we should use the %p format Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f1d14266672c8130e992dd9d0c08fd1cef0f08cb Author: Jon TURNEY Date: Wed Oct 1 22:12:26 2014 +0100 hw/xwin: Ensure format warnings in winclipboard/ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 38f340b13e693a0d456a9ab22a6474c8f55375fa Author: Jon TURNEY Date: Mon Jun 29 15:30:36 2015 +0100 hw/xwin: Remove GetTickCount() from various pieces of debugging output The use of %d format for the DWORD return value of GetTickCount() isn't portable, but it doesn't seem to be worth fixing it when this information isn't very useful (and is redundant to the timestamping of log messages we now have) Instead just remove these uses of GetTickCount() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 732e3b9c08532f40656010eac9d128601cc88c3f Author: Michel Dänzer Date: Mon Jul 6 18:45:51 2015 -0700 Instead of one glTexSubImage2D call for each glyph. This significantly reduces the amount of time it takes for xterm to start up on a fresh X server with the radeonsi driver. v2: Use GLYPHWIDTHBYTESPADDED instead of hardcoding 4 bytes glyph alignment (Keith Packard) Reviewed-by: Keith Packard Signed-off-by: Michel Dänzer Signed-off-by: Keith Packard commit ac94cdb9df94dd26688de6d3d9143ac48f7b3c7b Author: Julien Cristau Date: Thu Jul 2 20:16:21 2015 +0200 mi: fix typo in warning about overflowing queue Debian bug#726041 Reported-by: Vincent Hobeïka Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit e3624aa5fde658c44724a7ea21f5df9e3c586923 Author: Dave Airlie Date: Wed Jul 1 20:41:15 2015 +1000 xserver: fix build with glamor disabled. This fixes modesetting when glamor is disabled. Signed-off-by: Dave Airlie Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit 3703c88ac18063a35fd8c0fc52fee52d8c669638 Author: Eric Anholt Date: Wed Jul 1 16:23:45 2015 -0700 glamor: Use GL_ARB_debug_output to log GL errors. This should help people debugging when glamor does something stupid on their driver. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit f4dfd282d311e5f23631d33e0251bad1854b1ab9 Author: Eric Anholt Date: Wed Jul 1 14:46:55 2015 -0700 glamor: Add an assert to catch the previous bug. Signed-off-by: Eric Anholt Acked-by: Michel Dänzer commit c268d2fc33318f9ea0019053fa5de18f193e704e Author: Keith Packard Date: Thu Jul 2 17:06:27 2015 -0600 glamor: Fix bad rendering of glyphs after an a1 glyph upload. (v3) Fixes regressions since Eric's "don't make an FBO for the glyph atlas" change. The a1 upload was a fallback, as expected. However, fallback reads use glReadPixels() because there's no glGetTexSubImage2D() to match glTexSubImage2D(). We were just binding the 0 FBO value, so the glReadPixels() would throw a GL error instead of getting any data. After the fallback was done we'd write back the undefined data to the atlas, blowing away the entire rest of the atlas because we didn't specify any bounds on our prepare. To fix the fallbacks to actually work, we'd need a prepare path that allocates some memory memory do a full glGetTexImage() into, then memcpy out of that. Instead, just dodge the general fallback by implementing the specific upload we need to do here, which should also be *much* faster at uploading a1 glyphs since it's not readpixels/texsubimaging back and forth. v3: Use CopyPlane to a temp pixmap for the upload v4: Rewrite anholt's commit message to be from keithp's perspective (changes by anholt) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5c440817f7c128c9a9d78ef9672f22641dbeeaa1 Author: Eric Anholt Date: Tue Jun 30 15:01:53 2015 -0700 glamor: Use ARRAY_SIZE in a couple more places for consistency. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 7b6edb52435f474c43130f6ac4c6b2d2b28814f5 Author: Eric Anholt Date: Tue Jun 30 14:59:55 2015 -0700 glamor: Mark a bunch of single-file data static. This gives the compiler a chance to optimize when the data is never changed -- for example, with pict_format_combine_tab, the compiler ends up inlining the 24 bytes of data into just 10 more bytes of code. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 3fe6731b17ae953d49db4c1bf95e0022244513e1 Author: Eric Anholt Date: Tue Jun 30 14:50:43 2015 -0700 glamor: Make a bunch of single-file glamor functions static. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit a8e84e8c3b2047775fe2da9371329290eee23655 Author: Eric Anholt Date: Tue Jun 30 14:45:43 2015 -0700 glamor: Drop dead glamor_es2_pixmap_read_prepare(). It's been unused since I killed glamor_download_pixmap_to_cpu(). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit cad56dc62dbf2ba097cc0fa61217897ba40d8d66 Author: Eric Anholt Date: Tue Jun 30 14:41:27 2015 -0700 glamor: Restore the hook to glamor_composite_rectangles(). It was apparently accidentally dropped in keithp's removal of _nf functions in 90d326fcc687e6d6d4b308f6272ededcf8145a17. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 7adb38a0d18de2e8b0762d9dd82b851883ad75fe Author: Eric Anholt Date: Tue Jun 30 14:25:16 2015 -0700 glamor: Fix up some weird formatting in _glamor_create_fbo_array(). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 835067a4095e5e48703aa6561fea3ee95923e832 Author: Eric Anholt Date: Tue Jun 30 14:14:50 2015 -0700 glamor: Drop a redundant check. Above, we've already checked for ->fbo && ->fbo->fb and returned. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit 47b868492c7ff0909ff71e3ee1aaa79daaade513 Author: Eric Anholt Date: Thu Feb 5 12:34:41 2015 -0800 glamor: Simplify some temp pixmap extents calculations. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit bfb6a290afabe492d93ec8024fac6b28f672d7d0 Author: Eric Anholt Date: Thu Feb 5 11:46:32 2015 -0800 glamor: Drop a dead flag to glamor_create_fbo_array(). v2: Don't forget to set priv->block_w/block_h like the wrapper used to. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke (v1) commit fe3fedf280596c2c2e69dddd30bb9ff17dbe611e Author: Eric Anholt Date: Thu Feb 5 11:33:54 2015 -0800 glamor: Drop dead GLAMOR_FBO_DOWNLOADED flag. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 447274094147f31025700a2ff6f94e3b0c96fa17 Author: Eric Anholt Date: Thu Feb 5 11:20:50 2015 -0800 glamor: Move doxygen for private structs into the structs. This should hopefully keep the comments more up to date with the structure comments. While I'm here, I've reworded a few of them to be more accurate, and dropped a bunch of stale comments. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 33d6384b29db1b28a9d1a035dc7cc82da8f33c99 Author: Eric Anholt Date: Thu Feb 5 11:18:24 2015 -0800 glamor: Drop the dead "PBO" field in an FBO cache struct. PBOs are only used at the whole pixmap level. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 1734aa285663d83070e6313bb976f976aa2bea4c Author: Eric Anholt Date: Wed Feb 4 18:07:06 2015 -0800 glamor: Remove dead gl_tex flag in the fbo struct. This used to be used in the old copy_area path. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 82d23fc7290a2986efbc2982eeaa0de0ad5ad0d1 Author: Eric Anholt Date: Wed Feb 4 18:02:34 2015 -0800 glamor: Propagate the fact that pbo_valid is never set. The code to set it was deleted in keithp's big rewrite. Signed-off-by: Eric Anholt Reviewed-by: Kenneth Graunke commit 0e3f1252dacdc3194a99a2d090b5c13f070f8799 Author: Eric Anholt Date: Fri Jun 19 18:40:47 2015 -0700 glamor: Avoid using GL_QUADS on VC4. Improves text rendering from about 284k glyphs per second to 320k glyphs per second. There's no GL extension for probing this, because of the philosophy of "Don't expose whether things are really in hardware or not." Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit f47e3f539568d19e22d10d7dd4ec09c7d570e716 Author: Eric Anholt Date: Fri Jun 19 18:36:28 2015 -0700 glamor: Use proper Bools for some boolean values. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 4001a7465e6fb27fc82fa20ea5a65283d33a5e2e Author: Eric Anholt Date: Fri Jun 19 16:56:35 2015 -0700 glamor: Provide a fallback path for using an index buffer to do quads. Improves x11perf -aa10text performance by 1377.59% +/- 23.8198% (n=93) on Intel with GLES2. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit e8fc929d4a140666420a64d592371f5d3eb10cca Author: Eric Anholt Date: Fri Jun 19 17:26:46 2015 -0700 glamor: Use GL_EXT_map_buffer_range if present. We were only looking for the desktop GL version of the extension, so GLES2 missed out. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 4fc4cde0ce7d1a35bab3b3bbd787d688cd415d78 Author: Eric Anholt Date: Fri Jun 19 16:34:55 2015 -0700 glamor: Use the normal GL_QUADS drawing helper in the render code. We use this for all of our other performance-sensitive rendering, too. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit c5e6fffbdd88ad714454b9de1ac1c3eb9f6bf196 Author: Eric Anholt Date: Fri Jun 19 17:05:28 2015 -0700 glamor: Drop CloseScreen-time GL resource cleanup code. These will all be freed when the context is freed. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit 3d6dcad00d67bff407385ad37c7efde7b73ba719 Author: Eric Anholt Date: Fri Jun 19 19:04:16 2015 -0700 glamor: Fix text rendering on GLES2. The GL_QUADS helper takes a number of quads, not a number of vertices. Signed-off-by: Eric Anholt Reviewed-by: Dave Airlie commit b4061cf5f76241157b2dc81dec053012075311c0 Author: Peter Harris Date: Tue May 12 14:19:15 2015 -0400 Fix border tile origin when background is ParentRelative According to http://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:CreateWindow "The border tile origin is always the same as the background tile origin." ChangeWindowAttributes goes to some effort to make sure it repaints the border tile whenever the background origin may have changed, but miPaintWindow was ignoring the background origin. Found by xts XChangeWindowAttributes-3 Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8a8d51358cea782147bb9b5b2e0902b1e47fcf4a Merge: b22534d8e 13c7d53df Author: Keith Packard Date: Mon Jun 29 21:04:53 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit b22534d8e653575196180970292eaade33c090a8 Merge: 0a625adee 780a69aff Author: Keith Packard Date: Mon Jun 29 21:04:11 2015 -0700 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 0a625adeec465d6c7dcdb8622c53157b4e932bb0 Merge: 84128c10b 790311cec Author: Keith Packard Date: Mon Jun 29 21:01:34 2015 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit 84128c10bb6d34f78f7a4148b3c640748efe58e1 Merge: 9003a3e5c 8c86dd516 Author: Keith Packard Date: Mon Jun 29 20:59:31 2015 -0700 Merge remote-tracking branch 'whot/for-keith' commit 13c7d53df8dac45ea2a685826cd45a39bcb51657 Author: Kenneth Graunke Date: Mon Jan 26 21:29:23 2015 -0800 modesetting: Implement page flipping support for Present. Based on code by Keith Packard, Eric Anholt, and Jason Ekstrand. v2: - Fix double free and flip_count underrun (caught by Mario Kleiner). - Don't leak flip_vblank_event on the error_out path (Mario). - Use the updated ms_flush_drm_events API (Mario, Ken). v3: Hack around DPMS shenanigans. If all monitors are DPMS off, then there is no active framebuffer; attempting to pageflip will hit the error_undo paths, causing us to drmModeRmFB with no framebuffer, which confuses the kernel into doing full modesets and generally breaks things. To avoid this, make ms_present_check_flip check that some CRTCs are enabled and DPMS on. This is an ugly hack that would get better with atomic modesetting, or some core Present work. v4: - Don't do pageflipping if CRTCs are rotated (caught by Jason Ekstrand). - Make pageflipping optional (Option "PageFlip" in xorg.conf.d), but enabled by default. v5: Initialize num_crtcs_on to 0 (caught by Michel Dänzer). [airlied: took over] v6: merge async flip support from Mario Kleiner free sequence after failed vblank queue handle unflip while DPMS'ed off (Michel) move flip tracking into its own structure, and fix up reference counting issues, and add comments. Signed-off-by: Dave Airlie Acked-by: Eric Anholt Signed-off-by: Kenneth Graunke commit 4342369e843ca2c6ca0a8c42475893cffb077a54 Author: Dave Airlie Date: Fri Jun 26 09:20:13 2015 +1000 modesetting: don't try and load dri2 Since we are shipped with the server and the server has it built-in, don't bother trying to load it. Don't remove or invert the if statement on purpose as a later patch adds stuff in here. Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit edec6394a47be590f3133f6a90186356afd00829 Author: Dave Airlie Date: Fri Jun 26 09:19:37 2015 +1000 modesetting: drop unused struct in vblank.c this isn't used anywhere here. Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit bf262b43007050180d336defd48251de80894801 Author: Kenneth Graunke Date: Mon Jan 26 21:25:58 2015 -0800 modesetting: Implement an ms_drm_abort_seq() function. This is a specialization of ms_drm_abort that matches based on the drm event queue's sequence number. Based on code by Keith Packard. Reviewed-by: Eric Anholt Reviewed-by: Dave Airlie Signed-off-by: Kenneth Graunke commit b8ccc5d36b0436bac57f07969ff3eb8d479a8511 Author: Jason Ekstrand Date: Tue Jan 13 17:00:28 2015 -0800 glamor: Add a new glamor_gbm_bo_from_pixmap() function. v2: Rebase on commit e0788a03144 (drop "base"). Reviewed-by: Eric Anholt Reviewed-by: Dave Airlie commit f2171d0a20d3b3858a282c51c1561432de1b29ef Author: Kenneth Graunke Date: Tue Jan 6 21:02:44 2015 -0800 modesetting: Make ms_crtc_on non-static. I want to use this in present.c. Reviewed-by: Dave Airlie Reviewed-by: Eric Anholt Signed-off-by: Kenneth Graunke commit f6853baebaec6a68078fa7f90486e9547d59dcbd Author: Kenneth Graunke Date: Sun Feb 8 17:21:58 2015 -0800 modesetting: Improve the ms_flush_drm_events() API. Previously, ms_flush_drm_events() returned a boolean value, and it was very easy to interpret the meaning incorrectly. Now, we return an integer value. The possible outcomes of this call are: - poll() raised an error (formerly TRUE, now -1 - poll's return value) - poll() said there are no events (formerly TRUE, now 0). - drmHandleEvent() raised an error (formerly FALSE, now the negative value returned by drmHandleEvent). - An event was successfully handled (formerly TRUE, now 1). The nice part is that this allows you to distinguish errors (< 0), nothing to do (= 0), and success (1). We no longer conflate errors with success. v2: Change ms_present_queue_vblank to < 0 instead of <= 0, fixing an unintentional behavior change. libdrm may return EBUSY if it's received EINTR for more than a second straight; just keep retrying in that case. Suggested by Jasper St. Pierre. Reviewed-by: Dave Airlie Signed-off-by: Kenneth Graunke commit 7328fb3f2b468048faf4ed4c29db720b5bf00b05 Author: Dave Airlie Date: Wed Jun 10 13:41:02 2015 +1000 modesetting: reverse prime support (v1.1) This adds support for reverse prime to the modesetting driver. Reverse prime is where we have two GPUs in the display chain, but the second GPU can't scanout from the shared pixmap, so needs an extra copy to the on screen pixmap. This allows modesetting to support this scenario while still supporting the USB offload one. v1.1: fix comment + ret = bits (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 1f10ee221edb87561900f5d2b1336db1c4a9f05c Author: Dave Airlie Date: Wed Jun 10 13:38:39 2015 +1000 glamor: egl: add function to back a pixmap with a dma-buf. (v1.1) Rather than create the pixmap, this uses the file descriptor to change an existing pixmaps backing store. This is required for reverse prime slaves, where we create the slave pixmap, then set the backing store. v1.1: use local pScreen (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit a79fbfd707e1d745b670def08287241c87e11c28 Author: Dave Airlie Date: Tue Jun 9 17:15:44 2015 +1000 modesetting: add output master support This allows a glamor enabled master device to have slave USB devices attached. Tested with modesetting on SNB + USB. It relies on the previous patch to export linear buffers from glamor. Acked-by: Eric Anholt Signed-off-by: Dave Airlie commit ea0e4d752b778c1f2132f8d29542f7dabc296415 Author: Dave Airlie Date: Wed Jun 10 14:46:22 2015 +1000 glamor: add support for allocating linear buffers (v2) We need this for doing USB offload scenarios using glamor and modesetting driver. unfortunately only gbm in mesa 10.6 has support for the linear API. v1.1: fix bad define v2: update the configure.ac test as per amdgpu. (Michel) set linear bos to external to avoid cache. (Eric) Reviewed-by: Eric Anholt Signed-off-by: Dave Airlie commit 5c555605386c76be2f02193d434a4617218b67be Author: Dave Airlie Date: Thu Jun 11 14:29:48 2015 +1000 xf86: restrict when we auto add devices as gpu devices. Michel pointed out I broke Zaphod with the initial auto add gpu devices change, Fix this, by only auto adding GPU devices if we are screen 0 and there are no other screens in the layout. Anyone who wants to assign GPU devices can specify it in the xorg.conf for this use case. Signed-off-by: Dave Airlie Tested-by: Michel Dänzer commit 5064ee276fe0f6cebc33ea08e57f1de91f092d88 Author: Dave Airlie Date: Fri Jun 12 15:13:47 2015 +1000 xf86Rotate: remove unused macros. These macros aren't used anywhere. v1.1: drop comment (Aaron) Signed-off-by: Dave Airlie commit 8218dadd30eb0c87efbac6db5d8e3862a236b6a4 Author: Dave Airlie Date: Tue Jun 9 15:30:22 2015 +1000 cursor: drop ARGB_CURSOR I doubt anyone builds with this turned off or has done for a long time. It helps my eyes bleed slightly less when reading the code, I've left the define in place as some drivers use it. Reviewed-by: Aaron Plattner Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 3c859112d38860764bcdb205ab461d00db502f45 Author: Chris Wilson Date: Tue Jun 23 15:05:31 2015 +0200 xwayland: keep temp files out of the client mask Xwayland opens anonymous files for its sharing buffers, move these file descriptors out of the range of the client select mask to avoid reaching the maximum number of clients prematurely. https://bugs.freedesktop.org/show_bug.cgi?id=91072 Tested-by: Olivier Fourdan Reviewed-by: Michel Dänzer Signed-off-by: Chris Wilson commit 8c86dd51606486f4794c503b9c05c6875bdc693a Author: Laércio de Sousa Date: Tue Jun 23 08:41:57 2015 -0300 configure.ac: fix code misplacing for KDRIVE_{KBD, MOUSE, EVDEV} auto-detection KDrive input drivers "kbd", "mouse", and "evdev" should be automatically built for linux systems. However, due to a code misplacing in configure.ac, the auto-detection test is being performed AFTER the corresponding AC_DEFINEs' calls, so that the drivers are NOT being built, regardless the test result. This bug should be affecting previous xorg-server releases. Please consider backporting this patch to all maintained ones! Signed-off-by: Laércio de Sousa Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 780a69aff0ff57ef813179a2f09556eaf488cdfc Author: David Herrmann Date: Mon Jun 22 21:13:05 2015 +0200 systemd-logind: do not rely on directed signals Right now, Xorg does not install DBus matches for "PauseDevice" / "ResumeDevice". Therefore, it should usually not receive those DBus signals from logind. It is just a coincidence that systemd-logind sends those signals in a directed manner right now. Therefore, dbus-daemon bypasses the broadcast matches. However, this is not ABI and Xorg should not rely on this. systemd-logind is free to send those signals as broadcasts, in which case Xorg will freeze the VT. Fix this by always installing those matches. Cc: Hans de Goede Cc: Keith Packard Reported-by: Jan Alexander Steffens Signed-off-by: David Herrmann Reviewed-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Hans de Goede commit d3352d098724e96be8fb8538a3640ce271d8f8b9 Author: Hans de Goede Date: Mon Jun 22 13:51:21 2015 +0200 Xorg.wrap.man: Fix spelling mistake in Xorg.wrap.1 This commit fixes a small mistake in Xorg.wrap.1 . Signed-off-by: Hans de Goede Reviewed-by: Alan Coopersmith commit 790311cec30ac3d35e580b9f1266236f558033d4 Author: Eric Anholt Date: Sun May 31 16:08:10 2015 -0700 glamor: Don't try to disable attrib divisors without the extension. Fixes epoxy assertion failures on vc4. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9c679d06055cc62aa9209318705e87dc33fba4c8 Author: Eric Anholt Date: Sun May 31 16:07:01 2015 -0700 glamor: Skip actual FBO setup in our glyph atlas. VC4 (and many GLES2 renderers) can't render to GL_ALPHA, so our pixmap would end up as GLAMOR_MEMORY and our dereference of the FBO would setfault. Instead, tell the pixmap creation that we don't need an FBO at all. Our glyph upload path was already glTexImage for non-a1, and a more general software fallback for a1 (since the glyph is also in system memory). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 077bb1bdea0fa9af846c02896df680293cf9e25c Author: Eric Anholt Date: Sun May 31 15:46:55 2015 -0700 glamor: Clean up some declarations in glyph rendering. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit bf7a3bcb00d0dce22ff3fe42fe6236beeab4403b Author: Eric Anholt Date: Sun May 31 15:28:39 2015 -0700 glamor: Actually allow glyphs of dimension 65 to 128 in the cache. The cache was trying to allow glyph_max_dim in, but since we were putting over 64x64 into HW memory, it would end up in the single-glyph-per-render bail_one path. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f4c3cac010cff0980905eeedd8e8d7baf0aff91b Author: Alexander Volkov Date: Wed Jun 17 12:41:35 2015 +0300 Xi: call UpdateDeviceState() even when the client is missing The client window can be closed in the middle of a touch sequence, e.g. Qt 4 closes popup windows on MousePress and Qt 5.5 will do it on TouchBegin. In this case the state of mouse buttons will not be updated on TouchEnd because ProcessTouchEvent() calls UpdateDeviceState() only when the event has been sent to the client. It results in a stuck left mouse button. This patch leads to calling UpdateDeviceState() in case the client can't be found. Signed-off-by: Alexander Volkov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9003a3e5c55903ce4e371b2d5cb5030b5f97ae0e Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:41:12 2015 -0700 XQuartz: Silence -Wformat-security for NSRunAlertPanel Signed-off-by: Jeremy Huddleston Sequoia commit 3a6fa115759c787ec34483437021ad1e55c52423 Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:34:50 2015 -0700 XQuartz: Silence -Wunused-function quartzKeyboard.c:741:1: warning: unused function 'macroman2ucs' [-Wunused-function,Unused Entity Issue] macroman2ucs(unsigned char c) ^ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit 9fe7f5ccada37e2d2a2fa92064b92a0334a3fcdd Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:30:50 2015 -0700 XQuartz: Silence -Wunused-variable X11Controller.m:939:9: warning: unused variable 'remain' [-Wunused-variable,Unused Entity Issue] int remain; ^ Signed-off-by: Jeremy Huddleston Sequoia commit 0b9c32489131a5723bd78decf5d2557b94207cf4 Author: Jeremy Huddleston Sequoia Date: Tue Jun 9 23:29:40 2015 -0700 XQuartz: Silence -Wpointer-bool-conversion X11Controller.m:417:17: error: address of function 'asl_log_descriptor' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion,Value Conversion Issue] if (asl_log_descriptor) { ~~ ^~~~~~~~~~~~~~~~~~ X11Controller.m:417:17: note: prefix with the address-of operator to silence this warning [Semantic Issue] if (asl_log_descriptor) { ^ & Signed-off-by: Jeremy Huddleston Sequoia commit 77611066397747411f348e4a77871da5cff3b71e Author: Jeremy Huddleston Sequoia Date: Sun Jun 1 04:29:19 2014 -0700 XQuartz: GLX: Use __glXEnableExtension to build extensions list Signed-off-by: Jeremy Huddleston Sequoia commit 990cf5b2828f73dc7a07f1e38f608af39acfd81d Author: Andrew Eikum Date: Thu Jun 4 13:24:53 2015 -0500 dix: Send KeyPress and KeyRelease events to the XACE_KEY_AVAIL hook While it's documented in the XACE spec, the XACE_KEY_AVAIL hook is currently never actually invoked by the xserver. This hook was added in 13c6713c82 (25 Aug 2006), but as the keyboard processing was moved into XKB, the hook was forgotten and silently dropped. The code calling this hook was removed by 7af53799c (4 Jan 2009), but it was probably already unused before that. This patch re-adds support for this hook. The "count" hook parameter is unused. Signed-off-by: Andrew Eikum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5dc2a9aae46352f1f35d3ba122da04727789a15d Author: Andrew Eikum Date: Thu Jun 4 13:23:19 2015 -0500 xace: Add XaceHookIsSet helper function Signed-off-by: Andrew Eikum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c88a325899381d1133e63e6c33c29db079e20a87 Author: Hans de Goede Date: Wed Jan 21 10:13:20 2015 +0100 systemd-logind: Only use systemd-logind integration together with keeptty systemd-logind integration does not work when starting X on a new tty, as that detaches X from the current session and after hat systemd-logind revokes all rights any already open fds and refuses to open new fds for X. This means that currently e.g. "startx -- vt7" breaks, and breaks badly, requiring ssh access to the system to kill X. The fix for this is easy, we must not use systemd-logind integration when not using KeepTty, or iow we may only use systemd-logind integration together with KeepTty. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Tested-by: Aaron Plattner commit 81bcada14e339fe2a2fb3f3a040566d94dc20bad Author: Hans de Goede Date: Wed May 13 13:17:09 2015 +0200 linux: Add a may_fail paramter to linux_parse_vt_settings linux_parse_vt_settings() was split out of xf86OpenConsole so that it can be called earlier during systemd-logind init, but it is possible to run the xserver in such a way that xf86OpenConsole() is never used. The FatalError calls in linux_parse_vt_settings() may stop the Xorg xserver from working when e.g. no /dev/tty0 is present in such a setup. This commit adds a may_fail parameter to linux_parse_vt_settings() which can be used to make linux_parse_vt_settings() fail silenty with an error return in this case, rather then calling FatalError(). Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 1dba5a0b194653b0effb01a918bd7338b0c6bcb9 Author: Hans de Goede Date: Wed Jan 21 09:31:39 2015 +0100 linux: Add linux_parse_vt_settings and linux_get_keeptty helpers systemd-logind integration does not work when starting X on a new tty, as that detaches X from the current session and after hat systemd-logind revokes all rights on any already open fds and refuses to open new fds for X. This means that currently e.g. "startx -- vt7" breaks, and breaks badly, requiring ssh access to the system to kill X. The fix for this is easy, we must not use systemd-logind integration when not using KeepTty, or iow we may only use systemd-logind integration together with KeepTty. But the final KeepTty value is not known until the code to chose which vtno to run on has been called, which currently happens after intializing systemd-logind. This commit is step 1 in fixing the "startx -- vt7" breakage, it factors out the linux xf86OpenConsole bits which set xf86Info.vtno and keepTty so that these can be called earlier. Calling this earlier is safe as this code has no side effects other than setting xf86Info.vtno and keepTty. Note this basically only moves a large chunk of xf86OpenConsole() into linux_parse_vt_settings() without changing a single line of it, this is hard to see in the diff because the identation level has changed. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit fa12f2c150b2f50de9dac4a2b09265f13af353af Author: Dave Airlie Date: Thu May 28 16:21:37 2015 +1000 glamor: don't do render ops with matching source/dest (v3) XRender defines this, GL really doesn't like it. kwin 4.x and qt 4.x seem to make this happen for the gradient in the titlebar, and on radeonsi/r600 hw this draws all kinds of wrong. v2: bump this up a level, and check it earlier. (I assume the XXXX was for this case.) v3: add same code to largepixmap paths (Keith) Reviewed-by: Eric Anholt Reviewed-by: Jasper St. Pierre Signed-off-by: Dave Airlie commit cbb7eb73b5399e31a7afb800363504d539df0ecf Author: Rui Matos Date: Wed May 27 12:08:45 2015 +0200 xwayland: Throttle our cursor surface updates with a frame callback In some extreme cases with animated cursors at a high frame rate we could end up filling the wl_display outgoing buffer and end up with wl_display_flush() failing. In any case, using the frame callback to throttle ourselves is the right thing to do. Signed-off-by: Rui Matos Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 806470b9f623089dc81b985f250f0c3a4e8edbe8 Author: Chris Wilson Date: Fri Feb 6 08:25:42 2015 +0000 present: Copy unflip contents back to the Screen Pixmap As we unflip after the flip Window no longer passes the pixel ownership test for the full Screen Pixmap, we can no longer utilize that Window to copy the contents back to the backing pixmap. To first flip means that the Window was originally backed by the Screen Pixmap and wholly covered the Pixmap, thus we need to copy the last frame contents to the Screen Pixmap when the flip chain is complete. Signed-off-by: Chris Wilson Reviewed-and-Tested-by: Michel Dänzer commit baa50f60acd9e9f4293107435645ab072b6110e1 Author: Vicente Olivert Riera Date: Mon Jan 12 17:10:02 2015 +0000 backtrace.c: Fix word cast to a pointer backtrace.c uses a word size provided by libunwind. In some architectures like MIPS, libunwind makes that word size 64-bit for all variants of the architecture. In the lines #90 and #98, backtrace.c tries to do a cast to a pointer, which fails in all MIPS variants with 32-bit pointers, like MIPS32 or MIPS64 n32, because it's trying to do a cast from a 64-bit wide variable to a 32-bit pointer: Making all in os make[2]: Entering directory `/home/test/test/1/output/build/xserver_xorg-server-1.15.1/os' CC WaitFor.lo CC access.lo CC auth.lo CC backtrace.lo backtrace.c: In function 'xorg_backtrace': backtrace.c:90:20: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] if (dladdr((void *)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname && ^ backtrace.c:98:13: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] (void *)(pip.start_ip + off)); ^ cc1: some warnings being treated as errors make[2]: *** [backtrace.lo] Error 1 make[2]: *** Waiting for unfinished jobs.... Making the cast to a pointer-sized integer, and then to a pointer fixes the problem. Related: https://bugs.freedesktop.org/show_bug.cgi?id=79939 Signed-off-by: Vicente Olivert Riera Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 76636ac12f2d1dbdf7be08222f80e7505d53c451 Author: Ray Strode Date: Tue May 5 16:43:44 2015 -0400 xwayland: default to local user if no xauth file given. [CVE-2015-3164 3/3] Right now if "-auth" isn't passed on the command line, we let any user on the system connect to the Xwayland server. That's clearly suboptimal, given Xwayland is generally designed to be used by one user at a time. This commit changes the behavior, so only the user who started the X server can connect clients to it. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 4b4b9086d02b80549981d205fb1f495edc373538 Author: Ray Strode Date: Tue May 5 16:43:43 2015 -0400 os: support new implicit local user access mode [CVE-2015-3164 2/3] If the X server is started without a '-auth' argument, then it gets started wide open to all local users on the system. This isn't a great default access model, but changing it in Xorg at this point would break backward compatibility. Xwayland, on the other hand is new, and much more targeted in scope. It could, in theory, be changed to allow the much more secure default of a "user who started X server can connect clients to that server." This commit paves the way for that change, by adding a mechanism for DDXs to opt-in to that behavior. They merely need to call LocalAccessScopeUser() in their init functions. A subsequent commit will add that call for Xwayland. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit c4534a38b68aa07fb82318040dc8154fb48a9588 Author: Ray Strode Date: Tue May 5 16:43:42 2015 -0400 xwayland: Enable access control on open sockets [CVE-2015-3164 1/3] Xwayland currently allows wide-open access to the X sockets it listens on, ignoring Xauth access control. This commit makes sure to enable access control on the sockets, so one user can't snoop on another user's X-over-wayland applications. Signed-off-by: Ray Strode Reviewed-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ad02d0df75318660c3f7cd6063eac409327fe560 Author: Peter Hutterer Date: Wed May 6 15:25:28 2015 +1000 test: add tests for new valuator mask features Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit da10d0cb4283ad5a9c4290555751f61795d11b49 Author: Peter Hutterer Date: Tue May 5 14:48:41 2015 +1000 dix: hook up the unaccelerated valuator masks If present, access the unaccelerated valuator mask values for DGA and XI2 raw events. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 4c2f2cb4c8ca1ab894a65828fdd39aea9b014f69 Author: Peter Hutterer Date: Tue May 5 14:18:54 2015 +1000 dix: Add unaccelerated valuators to the ValuatorMask Allows a mask to carry both accelerated and unaccelerated motion at the same time. This is required for xf86-input-libinput where the pointer acceleration happens in libinput already, but parts of the server, specifically raw events and DGA rely on device-specific unaccelerated data. To ease integration add this as a second set to the ValuatorMask rather than extending all APIs to carry a second, possibly NULL set of valuators. Note that a valuator mask should only be used in either accel/unaccel or standard mode at any time. Switching requires either a valuator_mask_zero() call or unsetting all valuators one-by-one. Trying to mix the two will produce a warning. The server has a shortcut for changing a mask with the valuator_mask_drop_unaccelerated() call. This saves us from having to loop through all valuators on every event, we can just drop the bits we know we don't want. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 3f0d3201f38ef9d1651fcaf94e45c640786edcc0 Author: Peter Hutterer Date: Mon Apr 13 13:52:28 2015 -0700 dix: fix indentation from 9ff89a2e469ab0ac5af57d0fc115127feb1c0d99 Signed-off-by: Peter Hutterer commit f82dc6bd91a545a844fb688ba3552e4f5df8a0d2 Author: Peter Hutterer Date: Tue Mar 24 09:43:17 2015 +1000 xfree86: drop if 0 hunk Disabled in 2005. bye bye. Signed-off-by: Peter Hutterer commit fc59c8fe8d941b0ec1e98c59bc57b1f97dba149d Author: Peter Hutterer Date: Tue May 5 15:54:20 2015 +1000 config: remove 10-evdev.conf, let the evdev driver install that file Now that we have two likely drivers that fight for control over the input devices (evdev and libinput) let's move the respective driver assignment to each package. So you get what you install. https://bugs.freedesktop.org/show_bug.cgi?id=89023 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit bf6344e1913a5d24c2d68eaca999ea3d71e1b707 Author: Keith Packard Date: Thu May 14 14:58:29 2015 -0700 Revert "glx/dri2: Disable AIGLX if indirect GLX is disabled" This reverts commit d61ae18074e53c2cdfb13cc37693b526160d6ca7. If the DRI2 provider is disabled, then we don't advertise the correct GLX extensions to clients, and things like GLES fail. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90442 Reviewed-by: Eric Anholt Reviewed-by: Michel Dänzer commit b0d2e010316d710eb4052963de3a1e2dc7ba356e Author: Keith Packard Date: Fri Oct 10 09:25:51 2014 +0200 glamor: Replace CompositeGlyphs code [v2] New composite glyphs code uses the updated glamor program infrastructure to create efficient shaders for drawing render text. Glyphs are cached in two atlases (one 8-bit, one 32-bit) in a simple linear fashion. When the atlas fills, it is discarded and a new one constructed. v2: Eric Anholt changed the non-GLSL 130 path to use quads instead of two triangles for a significant performance improvement on hardware with quads. Someone can fix the GLES quads emulation if they want to make it faster there. v3: Eric found more dead code to delete Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1b745e0c1ff45e014aa21c3d8edf93227bec99bf Author: Keith Packard Date: Mon Oct 13 11:40:06 2014 -0700 glamor: Adapt glamor_program API to handle render acceleration This extends the existing API to support options needed for render accleration, including an additional fragment, 'combine', (which provides a place to perform the source IN mask operation before the final OP dest state) and an additional 'defines' parameter which provides a way to add target-dependent values without using a uniform. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ff3195aadde95c8e89f77f389a7dfb418dd2426c Author: Keith Packard Date: Mon Oct 20 21:31:56 2014 -0700 glamor: Compute GLSL version from GL_SHADING_LANGUAGE_VERSION (v3) Use code from Piglit project to compute GLSL version for either GL or GLES. The Piglit code was originally written by Chad Versace. v2: bail if the parse fails (requested by Eric Anholt) v3: Use version 1.20 for GLES until we fix our programs (Eric Anholt) Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit dcb3d74ba8861e7b0a592e92b5b2247b84e843f3 Author: Keith Packard Date: Mon Oct 13 12:35:40 2014 -0700 glamor: Remove destination drawable argument from glamor_set_texture This argument wasn't used at all. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 2bf34fe8d9b7628d164392c2d11ace78f7cf17b9 Author: Keith Packard Date: Mon Oct 13 12:32:27 2014 -0700 glamor: Pass depth to glamor_pm_is_solid and glamor_set_planemask Instead of passing the destination drawable, just pass the depth, as the underlying functions need only that to check whether the planemask is going to work. This API change will allow higher level functions to not need the destination pixmap. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 910ddf85219f114744e8996a4ac044c4eafc62ac Author: Egbert Eich Date: Tue May 12 09:52:48 2015 -0700 Xephyr: Fix broken image when endianess of client machine and host-Xserver differ The image is created in the native byte order of the machine Xephyr is rendered on however drawn in the image byte order of the Xephyr server. Correct byte order in the xcb_image_t structure and convert to native before updating the window. If depths of Xephyr and host server differ this is already taken care of by the depth conversion routine. It is a terrible wase to always convert and transmit the entire image no matter of the size of the damaged area. One should probably use sub-images here. For now we leave this as an exercise. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c65eda5e6676d942e80eaf2650a670174c8bd84a Author: Egbert Eich Date: Tue Mar 31 09:14:28 2015 +0200 Xephyr: Fix screen image draw for the non-Glamor & non-XHSM case xcb_image_put() prints the entire image, therefore don't use an offset. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 66212ca0d2f194fd16db65e863f0a2d613e180ea Author: Egbert Eich Date: Tue Mar 31 09:14:27 2015 +0200 Xephyr: Fix compile when debugging is enabled Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b536d56aef21739b6da44693bbf19d0e7541392d Author: Egbert Eich Date: Tue Mar 31 09:14:26 2015 +0200 Xephyr: Print default server display number if none is specified Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5af73f490870da9265eeb9b3ce59a2be026be0c8 Author: Egbert Eich Date: Tue Mar 31 09:14:25 2015 +0200 Xephyr: Don't crash when no command line argument is specified The DDX specific command line parsing function only gets called if command line arguments are present. Therefore this function is not suitable to initialize mandatory global variables. Replace main() instead. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 00f79416b19f0cde68291aced44ab07b9b76f7b8 Author: Jonathan Gray Date: Wed Apr 15 21:29:58 2015 +1000 glamor: fix build when DRI3 is not defined Signed-off-by: Jonathan Gray Reviewed-by: Kenneth Graunke Signed-off-by: Keith Packard commit 7c609c911a3a33b7e4ddad46b8fc42878a073ee7 Author: Jonathan Gray Date: Wed Apr 15 21:29:07 2015 +1000 glamor: remove const from the return type of glamor_get_drawable_location() Fixes a build error with gcc 4.2.1 on OpenBSD due to -Werror=return-type from xorg-macros. error: type qualifiers ignored on function return type Signed-off-by: Jonathan Gray Reviewed-by: Kenneth Graunke Signed-off-by: Keith Packard commit 145ae03814cb3b700b6fe1fd19f8fb15da84d1c8 Author: Michel Dänzer Date: Tue Mar 17 10:21:13 2015 +0900 modesetting: Include dix-config.h from dumb_bo.c Fixes mmap failures with 32-bit builds. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 4962c8c08842d9d3ca66d254b1ce4cacc4fb3756 Author: Michel Dänzer Date: Tue Mar 17 10:21:12 2015 +0900 Add AC_SYS_LARGEFILE defines to dix-config.h Without this, AC_SYS_LARGEFILE doesn't actually have any effect. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 0409b6e6d63e9cfb5dc71bb27de4b1ed0152dd9b Merge: c39c3a975 23702dd26 Author: Keith Packard Date: Mon May 11 16:50:43 2015 -0700 Merge remote-tracking branch 'evelikov/master' commit c39c3a97508dc384c0757a0990c07b5d7b2fe97a Merge: 6b65e9618 747057852 Author: Keith Packard Date: Mon May 11 16:34:48 2015 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit 6b65e961894b9ed53066d22cfd218b12c3f361ca Author: Robert Ancell Date: Wed May 6 15:07:21 2015 +1200 xwayland: Fix error strings Fix missing newlines from error string and fix grammar. Signed-off-by: Robert Ancell Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit d7091a21d90cf463ae39ec5e8741123218ec5686 Merge: c3ce9d8fd 8fb8bbb30 Author: Keith Packard Date: Mon May 11 15:49:34 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit c3ce9d8fd404ca1d4697a104ce4899525dd43c51 Author: Adel Gadllah Date: Fri May 1 17:43:41 2015 +0200 modesetting: Fix software cursor fallback The code in drmmode_set_cursor does not properly handle the case where drmModeSetCursor2 returns any other error than EINVAL and silently fails to set a cursor. So only return when the drmModeSetCursor2 succeeds (i.e returns 0) and disable the cursor2 usage on EINVAL. References: https://bugzilla.redhat.com/show_bug.cgi?id=1205725 Signed-off-by: Adel Gadllah Reviewed-by: Michel Dänzer Reviewed-by: Rob Clark Signed-off-by: Keith Packard commit 81a51a6cace6fdb54999ccdf1533dc28a2222bb9 Author: Dima Ryazanov Date: Wed Apr 29 22:39:18 2015 -0700 xwayland: Implement smooth scrolling We don't even need to simulate button clicks; it's done automatically. This also fixes scrolling in Qt5 apps. Signed-off-by: Dima Ryazanov Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 9ff89a2e469ab0ac5af57d0fc115127feb1c0d99 Author: Jason Gerecke Date: Wed Apr 29 15:08:58 2015 +1000 dix: Do not allow device transform to be set on valuatorless devices If a device does not have any valuators, it makes no sense to set the device transformation. Return a BadMatch error to let the caller know that they're trying something stupid. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit fa62ca68ef8be7f63cd0b899dfae3366ca9350cf Author: Rui Matos Date: Sat Apr 25 21:19:25 2015 +0200 dix/events: Set currentTime to the given time stamp in NoticeTime The refactoring in commit efc1035ca958f2c9d266338a308518a0834b1773 removed the actual update of currentTime. Signed-off-by: Rui Matos Acked-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 26e50e8b2cbd01d050b5ecc02d47488b53ecc08b Merge: 28ff661e7 c7b49bdbb Author: Keith Packard Date: Mon May 11 15:36:53 2015 -0700 Merge remote-tracking branch 'jturney/mingw-build-fixes' commit 7470578520e90b6402b2509cd0c51fd4fd84849f Author: Brent Collins Date: Thu May 7 15:10:19 2015 -0400 shm: Fix xselinux resource initialization for xinerama pixmaps This is necessary to avoid a NULL pointer deference when the pixmap is used later. [ajax: massaged commit message, fixed it to compile] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89748 Reviewed-by: Adam Jackson Signed-off-by: Brent Collins commit bcec9f867d19e954a46c2654a79782bff6c65fce Author: Chris Wilson Date: Sat Feb 14 10:36:44 2015 +0000 shm: Fix use-after-free in ShmDestroyPixmap We pass the pPixmap->drawable.id to the ShmDetachSegment function after the pPixmap is freed. Fortunately, we don't use the value inside ShmDetachSegment and can simply pass zero instead. Signed-off-by: Chris Wilson Reviewed-by: Michel Dänzer commit d61ae18074e53c2cdfb13cc37693b526160d6ca7 Author: Chris Wilson Date: Wed Mar 4 12:16:29 2015 +0000 glx/dri2: Disable AIGLX if indirect GLX is disabled There is no point in setting up the acceleration for indirect GLX if indirect GLX is itself disabled. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit 1af15aaf278edcf6f6de94774350e34a80883c24 Author: Olivier Fourdan Date: Fri Apr 10 10:07:38 2015 +0200 dix: Fix image byte order on big endian hardware Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using them. Otherwise, image byte order could be wrong on big endian hardware even though endianess detection is correct. Reported-by: Tim Waugh Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson commit 28159eff6badf6181b255f26d1f444abe81c05b7 Author: Jason Gerecke Date: Thu Apr 30 18:06:14 2015 -0700 xfree86: Return NULL from xf86CompatOutput if no compat_output is defined If no compat_output is defined, we inadvertently (attempt to) return whatever data is at index -1. Instead, return NULL since that's what callers are expecting. Reviewed-by: Adam Jackson Signed-off-by: Jason Gerecke commit cad831f39861435cb94f4c90a73f7f0b62d1a4a1 Author: Robert Ancell Date: Wed May 6 15:07:21 2015 +1200 xwayland: Fix error strings Fix missing newlines from error string and fix grammar. Signed-off-by: Robert Ancell Reviewed-by: Daniel Stone commit 8fb8bbb3062f1a06621ab7030a9e89d5e8367b35 Author: Dave Airlie Date: Mon Mar 23 11:33:23 2015 +1000 modesetting: add tile property support (v2.1) This adds tiling support to the server modesetting driver, it retrieves the tile info from the kernel and translates it into the server format and exposes the property. v2.1: fix resetting tile property (Chris) Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 9257b1252da9092ddc676fec9aabe2b33dfad272 Author: Dave Airlie Date: Wed Jan 28 17:35:21 2015 +1000 modesetting: add dynamic connector hotplug support (MST) (v3) This is ported from the same code in the ati and intel drivers, It uses the same option name as nvidia and the other DDXes to disable tearing down outputs as it is hard to avoid racing with clients. v2: address two issues with DeleteUnusedDP12 enabled, reported by Daniel Martin, a) check we have a mode_output before destroying it b) only delete *unused* displays (thanks Aaron for clarifying) so we check if the output has a crtc and if it does we don't delete it. v3: drop the option to delete unused displays, just encode behaviour into the randr spec. Signed-off-by: Dave Airlie commit 33422d160bff3117b413a62d82b168e84f1aa8f6 Author: Dave Airlie Date: Wed Jan 28 17:25:00 2015 +1000 modesetting: stop caching mode resources There is no need to cache the mode resources and with dynamic connectors for mst support we don't want to. So first clean that up before adding dynamic connector support. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit a9ac02f6949357619684dd98ff6cf05489e62e55 Author: Dave Airlie Date: Wed Apr 1 12:13:51 2015 +1000 xf86Crtc/monitors: create initial monitors for tiled outputs This creates an automatic monitor for a tiled monitor at startup. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit afd18bce6a81106a12fd750d5fa09d05c09d37a8 Author: Dave Airlie Date: Wed Apr 1 14:32:00 2015 +1000 xf86Crtc: setup tiled monitors correctly in right of This puts the tiles of the monitor in the right place at X server startup. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e472dd89420f671685c11b06d376ff146d54c3b8 Author: Adam Jackson Date: Tue Jul 28 11:07:13 2009 -0400 xf86Crtc: right-of placement by default. Change the X server default to do right-of placement at startup. This gives an option to allow drivers to override this placement, which has been used for server drivers where both heads are not in the same physical place. Been in Fedora for a few years, but for tiled monitors we really want something along these lines. This is an ABI break. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 69e4b8e602ecc7b69c75988a447ec5b509b22402 Author: Dave Airlie Date: Tue Mar 31 16:56:42 2015 +1000 xfree86: attempt to autoconfig gpu slave devices (v3) This allows us to skip the screen section, the first Device section will get assigned to the screen, any remaining ones will get assigned to the GPUDevice sections for the screen. v2: fix the skipping unsuitable screen logic (Aaron) v3: fix segfault if not conf file (me, 5s after sending v2) Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 3b6930c5d02d8fc0d22fe7955e1ef2af61727705 Author: Dave Airlie Date: Tue Mar 31 16:42:36 2015 +1000 xserver: add xorg.conf support for gpu devices. (v2.1) This allows gpu devices to be specified in xorg.conf Screen sections. Section "Device" Driver "intel" Identifier "intel0" Option "AccelMethod" "uxa" EndSection Section "Device" Driver "modesetting" Identifier "usb0" EndSection Section "Screen" Identifier "screen" Device "intel0" GPUDevice "usb0" EndSection This should allow for easier tweaking of driver options which currently mess up the GPU device discovery process. v2: add error handling for more than 4 devices, (Emil) fixup CONF_ defines to consistency add MAX_GPUDEVICES define (yes there is two defines, this is consistent with everywhere else). remove braces around slp (Mark Kettenis) man page fixups (Aaron) v2.1: fixup whitespace (Aaron) Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit c7b49bdbb9321fe9a7dc35f47b91cac85516988f Author: Colin Harrison Date: Fri Mar 20 14:25:17 2015 +0000 os/utils.c: Fix prototype for Win32TempDir() xorg/xserver/os/utils.c: In function ‘Win32TempDir’: xorg/xserver/os/utils.c:1643:1: warning: old-style function definition [-Wold-style-definition] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit a9b4b7b79682dd367ce26c29aa5dc85807201851 Author: Colin Harrison Date: Fri Mar 20 14:25:53 2015 +0000 os/utils.c: Don't try to build os_move_fd() for WIN32 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 2b114d6a516ee584ff89b96b12acf91799b6d677 Author: Jon TURNEY Date: Fri Mar 20 14:29:58 2015 +0000 hw/xnest: Fix build for MinGW Include the wrapped windows.h via X11/Xwindows.h before xcb_keysyms.h to avoid type clashes caused by the unwrapped windows.h that includes. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5bf3e5c8326fb81655827dbd4c527f1a2ba09511 Author: Jon TURNEY Date: Wed Mar 18 13:29:22 2015 +0000 hw/xwin/winclipboard: Link xwinclip with -lpthread Link xwinclip with -lpthread to fix build for MinGW Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8363ef2764fe9c6877d1cb21d3ce7b6cf869f00d Author: Colin Harrison Date: Fri Mar 20 14:06:49 2015 +0000 os/xdmcp.c: Include Xtrans.h when building for WIN32 Xtrans.h must be included on WIN32 to prototype _XSERVTransWSAStartup() xserver/os/xdmcp.c: In function ‘get_addr_by_name’: xserver/os/xdmcp.c:1483:5: error: implicit declaration of function ‘_XSERVTransWSAStartup’ [-Werror=implicit-function-declaration] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 28ff661e73f4bdf0a9b7c84e70fa0a08fd30e482 Author: Alan Coopersmith Date: Fri Apr 3 19:06:21 2015 -0700 Remove empty stub of $host_cpu case statement in configure.ac Left behind when commit 5c12399b6c3a8d moved the xorg_bus_* settings elsewhere. Signed-off-by: Alan Coopersmith Reviewed-by: Thomas Klausner commit d4e85afac6578d5babc8bf97e00e85b00746fca9 Author: Alan Coopersmith Date: Fri Apr 3 19:01:40 2015 -0700 Accept x86_64 as well as i*86 for $host_cpu in Solaris on x86 Needed when using a compiler that defaults to 64-bit output when configure is checking for $host_cpu. Signed-off-by: Alan Coopersmith Reviewed-by: Thomas Klausner commit 0018784cdde19444a8f970bc414796fc2a523a51 Author: Alan Coopersmith Date: Sat Mar 21 17:59:13 2015 -0700 Convert hw/dmx to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit dc5acaa28ab9ed091f087e56046400d63f1f192a Author: Alan Coopersmith Date: Sat Mar 21 17:30:05 2015 -0700 Convert hw/kdrive to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit ae2dc01cf1a371db69d5deb987f4185e7c3ccedd Author: Alan Coopersmith Date: Sat Mar 21 17:23:33 2015 -0700 Convert hw/xnest & hw/vfb to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 4cb1034906eeec8c8442d70918bea0f4eb1f6e44 Author: Alan Coopersmith Date: Sat Mar 21 17:12:06 2015 -0700 Convert hw/xfree86 to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit f59236c2865d22c6f0b2d1ba303213afd10cd02e Author: Alan Coopersmith Date: Sat Mar 21 15:05:30 2015 -0700 Convert glamor & glx to new *allocarray functions v2: fixup whitespace Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Reviewed-by: Michel Dänzer commit 7ac280287491fe06127d9fefc504217e21c780e6 Author: Alan Coopersmith Date: Sat Mar 21 14:58:50 2015 -0700 Convert mi & miext to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 70f4a0e6bd18055cc9cb6685253bf5e07b125657 Author: Alan Coopersmith Date: Sat Mar 21 14:40:39 2015 -0700 Convert exa & fb to new *allocarray functions v2: fixup whitespace Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Reviewed-by: Michel Dänzer commit 4fe6b03b97ab8dbb32e4908e46be350d7f7d336f Author: Alan Coopersmith Date: Sat Mar 21 14:36:07 2015 -0700 Convert XKB to new *allocarray functions Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner Acked-by: Daniel Stone commit 1c56ac63c040280498c4a9d67b48c35b60070821 Author: Alan Coopersmith Date: Sat Mar 21 13:42:12 2015 -0700 Convert top level extensions to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit b9e665c8b2f048feb3064ce412e0b3e9eb6797b0 Author: Alan Coopersmith Date: Sat Mar 21 10:52:29 2015 -0700 Convert dix/* to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit df4e41fdb47cdeab5155224557ed8ab4ec4dc659 Author: Alan Coopersmith Date: Sat Mar 21 10:08:25 2015 -0700 Convert os/* to new *allocarray functions v2: remove now useless parentheses Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit ae75d50395fdd7a6bc382ba73e923c460764c702 Author: Alan Coopersmith Date: Sat Mar 21 09:28:07 2015 -0700 Add no-fail equivalents of allocarray & reallocarray v2: Remove extra 's' from comment Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit c213b29d14aaf2f4523d638abc762eaaa873cf83 Author: Alan Coopersmith Date: Sat Mar 21 08:58:04 2015 -0700 Add xallocarray() helper macro Uses reallocarray to perform integer overflow detection when allocating an array, using NULL as the previous pointer to force a new allocation. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 0887c9463fc7d36d7874e7f978df4109542f7307 Author: Alan Coopersmith Date: Sat Mar 21 08:42:19 2015 -0700 Import reallocarray() from OpenBSD Wrapper for realloc() that checks for overflow when multiplying arguments together, so we don't have to add overflow checks to every single call. For documentation on usage, see: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man3/calloc.3 Signed-off-by: Alan Coopersmith Acked-by: Matt Turner commit b96dc999968320ad6322b50c79d847efcfcd02b2 Author: Alan Coopersmith Date: Sat Mar 21 15:21:14 2015 -0700 Add XNFcallocarray() to allow xnfcalloc() to check for overflow The xnfcalloc() macro took two arguments but simply multiplied them together without checking for overflow and defeating any overflow checking that calloc() might have done. Let's not do that. The original XNFcalloc() function is left for now to preserve driver ABI, but is marked as deprecated so it can be removed in a future round of ABI break/cleanup. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit f3ba909753cd216fc9eca4618a76cc283ccbf51e Author: Alan Coopersmith Date: Sat Mar 21 11:07:24 2015 -0700 Let calloc handle multiplication It's going to multiply anyway, so if we have non-constant values, might as well let it do the multiplication instead of adding another multiply, and good versions of calloc will check for & avoid overflow in the process. Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit a28202a148508837911c5932a0d14af4b145bece Author: Alan Coopersmith Date: Sat Mar 21 08:19:30 2015 -0700 Remove remaining doc references to Xalloc, Xrealloc, and Xfree Functions were removed in commit cad9b053d52f62432 Signed-off-by: Alan Coopersmith Reviewed-by: Matt Turner commit 2a6d253b3f2ec4775412b4ae96a96b0b668ec827 Author: Alan Coopersmith Date: Sat Feb 28 10:04:09 2015 -0800 Remove apSolaris.shar (old "aperture" kernel driver for Solaris) Modern Solaris releases provide this functionality in the OS via the xsvc driver. Since the move to libpciaccess, nothing in Xorg uses this aperture driver any more. Signed-off-by: Alan Coopersmith commit b1029716e41e252f149b82124a149da180607c96 Author: Ray Strode Date: Thu Apr 16 11:28:16 2015 -0400 systemd-logind: don't second guess D-Bus default timeout At the moment, the X server uses a non-default timeout for D-Bus messages to systemd-logind. The only timeouts normally used with D-Bus are: 1) Infinite 2) Default Anything else is just as arbitrary as Default, and so rarely makes sense to use instead of Default. Put another way, there's little reason to be fault tolerant against a local root running daemon (logind), that in some configurations, the X server already depends on for proper functionality. This commit changes systemd-logind to just use the default timeouts. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode Reviewed-by: Hans de Goede Signed-off-by: Keith Packard commit 792e9251670ce94210df5c6d354059bbb97f4478 Author: Ray Strode Date: Thu Apr 16 11:28:15 2015 -0400 systemd-logind: filter out non-signal messages from message filter It's possible to receive a message reply in the message filter if a previous message call timed out locally before the reply arrived. The message_filter function only handles signals, at the moment, and does not properly handle message replies. This commit changes the message_filter function to filter out all non-signal messages, including spurious message replies. Downstream-bug: https://bugzilla.redhat.com/show_bug.cgi?id=1209347 Signed-off-by: Ray Strode Reviewed-by: Hans de Goede Signed-off-by: Keith Packard commit 41932dfbc841a1adc6512d41085ea3f8ebecb42c Author: Keith Packard Date: Wed Apr 8 07:45:28 2015 -0700 mi: Partial pie-slice filled arcs may need more space for spans The mi filled arc code estimates that a filled arc will produce no more spans than the arc is tall. This is true for most arcs except for pie-slice arcs strictly between 180 and 360 degrees where the missing portion of the arc faces up or down such that we get two spans on some scanlines. For those, we need to reserve room for another height/2 spans. This patch just does it for all partial pie-sliced arcs to make the test easier to understand; it's just over-allocating a bit of memory, so that's safe. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 21e7d2bb5cd810688bb905b6ed092497ca8a2c59 Author: Hans de Goede Date: Wed Apr 8 14:07:52 2015 +0200 Re-enable non serverfd input devices immediately on vtenter Non serverfd input devices will never get a systemd-logind dbus resume signal, causing them to never get re-enabled. This commit changes xf86VTEnter() to enable them immediately, fixing this. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=89756 Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit f1da6bf5d94911e78d2e27e6accf0c6e3aefb331 Author: Keith Packard Date: Tue Mar 31 17:07:43 2015 -0700 Require randrproto version 1.5.0 or newer Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit e36236eade412dd3894f75f78a7b3d7c1037e6c3 Author: Aaron Plattner Date: Tue Dec 30 09:13:16 2014 -0800 xfree86: Add GPU screens even if there are no active GDevs xf86platformProbeDev creates GPU screens for any platform devices that were not matched by a GDev in the loop above, but only if there was at least one device. This means that it's impossible to configure a device as a GPU screen if there is only one platform device that matches that driver. Instead, create a GPU screen (if possible) for any platform device that was not claimed by the GDev loop. Signed-off-by: Aaron Plattner Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher commit 4ecda362594d771f401de467c2d58c0f552227a8 Author: Aaron Plattner Date: Tue Dec 30 09:13:15 2014 -0800 xfree86: Fix xf86_check_platform_slot's handling of PCI If a PCI entity is found, xf86_check_platform_slot performs a device ID check against the xf86_platform_device passed in. However, it just returns immediately without checking the rest of the entities first. This leads to this situation happening: 1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI 2. The intel driver creates entity 1 for its platform device, opening /dev/dri/card0 3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device, which calls doPlatformProbe, which calls xf86_check_platform_slot. 4. xf86_check_platform_slot compares the Intel platform device against the NVIDIA PCI entity. Since they don't have the same device ID, it returns TRUE. 5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity for the Intel one. Fix this by only returning FALSE if the PCI ID matches, and continuing the loop otherwise. In the scenario above, this allows it to continue on to find the Intel platform device that matches the second entity. Signed-off-by: Aaron Plattner Reviewed-by: Maarten Lankhorst Acked-by: Alex Deucher commit e608f3521eaaab972a3eea62aa04a65958351c1c Merge: d3b9c47c8 5de138307 Author: Keith Packard Date: Tue Mar 31 09:06:08 2015 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit d3b9c47c849d039493c5e0ca5c3af8affe738746 Author: Jon Turney Date: Sun Mar 29 23:18:49 2015 +0100 Fix XQuartz build Fix XQuartz build since commit e036cbfc "Make PseudoramiXExtensionInit() prototype more generally available" Add #include "nonsdk_extinit.h" to xprScreen.c Add #include "nonsdk_extinit.h" to miinitext.c under INXQUARTZ to provide declarations used under INXQUARTZ Signed-off-by: Jon Turney Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Signed-off-by: Keith Packard commit 5de13830709a7f2d4d112d71e062f710ef466ab6 Author: Keith Packard Date: Tue Dec 16 09:56:50 2014 -0800 randr: Use Monitor list for Xinerama This replaces the CRTC-based Xinerama implementation with one which uses Monitors instead, allowing clients to manipulate the Xinerama configuration through the RandR Monitor list. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 7e1f86d42b54fb7f6492875e47a718eaeca3069b Author: Keith Packard Date: Tue Dec 16 01:59:03 2014 -0800 randr: Add Monitor support (v1.1) Store the user-defined monitors in the RandR screen private. Generate a list of monitors from both the user-defined ones and from any outputs not mentioned in one of the user-defined monitors. This list covers both the outputs in the main screen as well as any slaves. v1.1: airlied: fix up primary skipping bug, fix wrong height initialiser add get_active flag from updated protocol. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 9c2b4f8e0e2b5d4b5e1102d6eea7bdb4211baa68 Author: Dave Airlie Date: Tue Mar 31 11:18:44 2015 +1000 xf86Crtc: add tile prop setting Add support for drivers to set the tiling property. This is used by clients to work out the monitor tiles for DisplayID monitors. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 7088816fee0ca7d609c7bca41ef8c3fc938556f5 Merge: 95e83ff87 e977b404d Author: Keith Packard Date: Fri Mar 27 06:45:56 2015 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit e977b404d7d1c6cd2be2168f4fdce0ae31cd1f9f Author: Keith Packard Date: Sat Jan 17 07:44:27 2015 +1300 glamor: * 1/size is faster than / size in VS Pass the inverse of the texture size to glamor vertex shaders so that we multiply by that instead of dividing by the size as multiplication is generally faster than division. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Matt Turner commit 82634d2b69950e7e9a066c8c96bf2624ac26193a Author: Jon TURNEY Date: Mon Feb 9 13:45:44 2015 +0000 ephyr: Avoid a segfault with 'DISPLAY= Xephyr -glamor' ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Daniel Martin commit 391bcf77db96ff227e504c213aa5d5db09b6a050 Author: Adam Jackson Date: Mon Feb 23 11:58:59 2015 -0500 glamor: Fix up indentation Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Alex Deucher commit 0669babf2b5b50cbc185b0f714671b2c2b368778 Author: Matt Turner Date: Wed Mar 4 13:42:48 2015 -0800 glamor: Perform texture2D() separately from swizzle. The texture2D() happens in each branch, so we may as well do it as early as possible and hide some of its latency in the branching instructions. Moving it outside the (uniform) control flow reduces the number of instructions in the fs_source shader from 64 to 46 and in the set_alpha_source shader from 69 to 47 on Haswell. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9e9fcf578063b4155aab4adab83f8d956bde5d1a Author: Eric Anholt Date: Wed Feb 4 14:38:15 2015 -0800 glamor: Add a helper function for the common GL_QUADS fallback pattern. We should do better than this with an index buffer, but for now at least make it so that we don't have to copy the same code to new places. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 909a406aa239b8d231d6f63ce05a3e4a2bc3cb07 Author: Eric Anholt Date: Sun Dec 28 19:39:45 2014 -1000 glamor: Don't optimize out scissor updates in CopyArea. This possibly is a minor hit for immediate mode renderers (no difference on copypixin100 on my hsw, n=12), but it gives important information about drawing bounds to a deferred renderer (3.1x improvement in copypixwin100 on vc4). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6ba6cc57e17aefb7db0201a1f3180ab55076eb48 Author: Eric Anholt Date: Sat Dec 27 09:00:58 2014 -1000 glamor: Just set the logic op to what we want at the start of all rendering. By dropping the unconditional logic op disable at the end of rendering, this fixes GL errors being thrown in GLES2 contexts (which don't have logic ops). On desktop, this also means a little less overhead per draw call from taking one less trip through the glEnable/glDisable switch statement of doom in Mesa. The exchange here is that we end up taking a trip through it in the XV, Render, and gradient-generation paths. If the glEnable() is actually costly, we should probably cache our logic op state in our screen, since there's no way the GL could make that switch statement as cheap as the caller caching it would be. v2: Don't forget to set the logic op in Xephyr's drawing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8102927282d5134493e5009a876a6b01a68d1f97 Author: Jon TURNEY Date: Thu Feb 5 12:52:02 2015 +0000 glamor: Fix build when configured --enable-glamor --disable-xshmfence Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4218a1e066cf39bb980ebbc9f69536c85232da5c Author: Olivier Fourdan Date: Thu Feb 5 11:59:22 2015 +0100 glamor: check max native ALU instructions When using glamor (either in Xephyr or Xwayland) on hardware with too low instructions limit, glamor fallbacks to sw due to large shaders. This makes glamor unbearably slow on such hardware. Check reported value for GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB and fail in glamor_init() if the limit is lower than 128. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88316 Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit e0788a03144186522fd0ef0e9c954e2744b40275 Author: Keith Packard Date: Wed Oct 29 23:47:23 2014 -0700 glamor: Eliminate GLAMOR_TEXTURE_LARGE pixmap type Initialize full pixmap private for all pixmaps, including block dimensions and counts so that no checks are needed when walking the fbos. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit cc731ce0ca4d6c5c8d9c1130864e652a814644b4 Author: Keith Packard Date: Wed Oct 29 23:20:11 2014 -0700 glamor: Create inline tests for small/large pixmaps This will let us eliminate the pixmap types shortly Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 020fcc582837b80b20843a09c1e28fa96096fe6b Author: Keith Packard Date: Wed Oct 29 23:08:57 2014 -0700 glamor: Eliminate separate 'large' pixmap private structure Just embed the large elements in the regular pixmap private and collapse the union to a single struct. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9ef5cbf8ab8a51941d469bfcaca6cbfb7838d1ef Author: Keith Packard Date: Wed Oct 29 22:54:27 2014 -0700 glamor: Remove unused glamor_pixmap_private_atlas_t Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit af687396f1875de0a45683aad4fd5a9a2e00f10d Author: Keith Packard Date: Wed Oct 29 22:50:53 2014 -0700 glamor: Remove screen private and pixmap ptrs from pixmap private and fbo There's no reason to waste memory storing redundant copies of the same pointer all over the system; just pass in pointers as necessary to each function. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 1eb954c3830d46c27bf2a61f825b59f12092728c Author: Keith Packard Date: Wed Oct 29 21:31:32 2014 -0700 glamor: Remove remaining support for FBOs not matching pixmap size The core rendering code already requires that FBOs be allocated at exactly the pixmap size so that tiling and stippling work correctly. Remove the allocation support for that, along with the render code. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit adb847faeb51c567933fab97b97e79ee3d184dc8 Author: Keith Packard Date: Wed Oct 29 20:49:49 2014 -0700 glamor: Eliminate GLAMOR_TEXTURE_PACK pixmap type This is not used anywhere Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2f80c7791bb0b11f261cb1e3e0d89163dcdd0342 Author: Keith Packard Date: Wed Oct 29 20:48:40 2014 -0700 glamor: Eliminate GLAMOR_SEPARATE_TEXTURE pixmap type This was only used to signal when we couldn't ask the DDX to draw to a pixmap; now that we have no DDX-based fallbacks, we don't need to have this type. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit c6ab13566798c7adff23a609575a7ac2d1ce2df6 Author: Keith Packard Date: Wed Oct 29 20:44:31 2014 -0700 glamor: Remove ddx fallback check functions With no DDX-based fallback support, we can remove these functions as they are no longer called. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 90d326fcc687e6d6d4b308f6272ededcf8145a17 Author: Keith Packard Date: Wed Oct 29 20:40:21 2014 -0700 glamor: Remove _nf rendering functions These were used by the non-standard glamor implementation in the intel driver. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 697f8581e04a93862a6049cc982d01d25f9a0410 Author: Keith Packard Date: Wed Oct 29 20:30:12 2014 -0700 glamor: Eliminate GLAMOR_USE_SCREEN and GLAMOR_USE_PICTURE_SCREEN Remove these defines as we start to remove support for non-standard glamor layering as used by the intel driver. v2: Rebase on the blockhandler change and the Xephyr init failure change (by anholt), fix stray NO_DRI3 addition to xwayland. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 28ff815c4b32c88bd9007fd79f2acf3682a4b4db Author: Keith Packard Date: Wed Oct 29 20:20:29 2014 -0700 glamor: Eliminate GLAMOR_CREATE_PIXMAP_MAP and GLAMOR_MEMORY_MAP GLAMOR_MEMORY_MAP was only used with GLAMOR_CREATE_PIXMAP_MAP, and GLAMOR_CREATE_PIXMAP_MAP doesn't appear to be used anywhere, so just remove both of them. v2: Fix a stray whitespace bug that was introduced (change by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0e1372e1bd8f79fa295738bc1e983cb3648ba4be Author: Maarten Lankhorst Date: Mon Jan 19 12:37:55 2015 +0100 glamor: GL_TEXTURE_MAX_LEVEL is not available on GLES2 Remove the calls to GL_TEXTURE_MAX_LEVEL. Setting the filtering is a sufficient hint to the driver about texture mipmap allocation. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick commit c1f35c3d862f77cbd2fb871be5613fb0ca7e508b Author: Maarten Lankhorst Date: Mon Jan 12 15:29:34 2015 +0100 glamor: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER The latter might not be available on GLES2. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit b66501b4fd9c392e0f971ea356b27eb71c9c9e79 Author: Maarten Lankhorst Date: Mon Jan 19 12:36:52 2015 +0100 glamor: do not check for gl errors in glamor_build_program According to Eric Anholt the check for glGetError is not needed here. Because a opengl error might be set before this function is called keeping the check could result in glamor_build_program returning failure when building the shader succeeded. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 7c6f483670770e4e534cafd4e70d0b1490f4cca6 Author: Maarten Lankhorst Date: Mon Jan 19 12:32:54 2015 +0100 glamor: only use (un)pack_subimage when available Check for GL_EXT_unpack_subimage and GL_NV_pack_subimage to check if GL_(UN)PACK_ROW_LENGTH is available. Set the offsets manually to prevent calls to GL_(UN)PACK_SKIP_*. v2: Check support for GL_NV_pack_subimage as suggested by Matt Turner. Signed-off-by: Maarten Lankhorst Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4f534c26c64cc1edd33b04d30e4df818b7ae55d9 Author: Olivier Fourdan Date: Wed Jan 28 16:08:26 2015 +0100 xwayland: Add dependency on glamor libs So that Xwayland gets re-linked each time glamor is modified. Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 251a067993658fd02f158fef36476f898c238e3c Author: Olivier Fourdan Date: Mon Feb 2 10:41:06 2015 +0100 ephyr: Fail if glamor is requested but not usable Signed-off-by: Olivier Fourdan Signed-off-by: Eric Anholt Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt commit 23702dd2689e2e1e65be5767ac0303a985bb04a0 Author: Emil Velikov Date: Thu Mar 19 12:26:29 2015 +0000 randr: coding style fixes In most of xserver code-base we define new functions at column 0, with their return type provided on the previous line. Two functions did not follow this rule so update them, and get them wrapped up to 80 as an added bonus. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 739e8fac0e9d8d4c1653e53a8f3ce2d38b3de320 Author: Emil Velikov Date: Thu Mar 19 12:22:18 2015 +0000 randr: wrap long line Also make use of total_name_len variable for consistency. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 363cd0e0b499ea8c32b2aa5cf7ea0f0a56b4c3ef Author: Emil Velikov Date: Thu Mar 19 12:19:23 2015 +0000 randr: use local variables where possible This will allow us to make the code more readable, and the lines will fit within 80 columns. Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit 93ef0e580e9cdbe739046a0873971d402525ef00 Author: Emil Velikov Date: Thu Mar 19 12:40:06 2015 +0000 randr: use randr: prefix in ErrorF() To provide some information about the origin of the message. Cc: Dave Airlie Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a08ee773983c44ebb893f10a1dcfa443f2734277 Author: Emil Velikov Date: Thu Mar 19 12:36:50 2015 +0000 randr: remove chatty error messages All of these seem like left over from developments stage. Remove them as they can cause excessive flood in the logs. Cc: Dave Airlie Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher commit a34d29c2edd786f0baa0e7c334f4174eeecb71d2 Author: Emil Velikov Date: Sun Mar 8 17:56:58 2015 +0000 configure.ac: remove remaining TLS references No longer used with the removal of the GL dispatch (glapi) from libglx a few releases ago. Signed-off-by: Emil Velikov Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt commit 95e83ff87ab0149ab01c9299524dfbe37d9b21a2 Author: Jon TURNEY Date: Thu Jul 12 02:00:43 2012 +0100 Don't allow both RandR XINERAMA and pseudoramiX XINERAMA extensions to register Prevent RRXinerama from activating if PseudoramiX is, so we don't get XINERAMA listed twice in the list of extensions. I think this is otherwise benign, as the PseudoramiX XINERAMA gets registered first and thus handles all requests. Perhaps AddExtension() ought to warn us if the extension name is already registered? This appears to be a long-standing bug seen in XQuartz, and now in XWin as well. Future work: Perhaps since RRXinerama isn't actually doing anything useful but faking it when we have one screen, it seems that the PseudoramiX code could be also used in that case. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 234fe391802b114e96d60a6630f717f8e4fb726c Author: Jon TURNEY Date: Fri Nov 7 13:38:20 2014 +0000 hw/xwin: Report OS version in log Report OS version in log Report if WoW64 is in use Manifest for compatbility with Windows versions, so we don't get lied to by GetVersionEx() Also, make the description in the manifest a bit more generic Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7a22912edbda826778463f8fefa9c8e689858bbe Author: Jon TURNEY Date: Thu Nov 6 15:22:58 2014 +0000 hw/xwin: Remove Shadow DirectDraw engine Maybe a long time ago this made some kind of sense, but now there's no good reason to ever use this, rather than the Shadow DirectDraw NonLocking engine. Also remove screen private data members used by other removed engines. Also remove no longer needed OS version check in winDetectSupportedEngines() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 55a84be085e9f479f7907bed5fb68fc66ce81ae8 Author: Jon TURNEY Date: Sat Mar 3 20:13:19 2012 +0000 hw/xwin: Only set native positions if XINERAMA is enabled Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 23e07d71b607c99c3a0a0ea362c70dcae73485c6 Author: Jon TURNEY Date: Thu Nov 6 14:28:17 2014 +0000 hw/xwin: Register native screens with pseudoramiX Update man page to document pseudo-xinerama v2: Make the use of PseudoramiXExtensionInit() match the prototype v3: Update for nonsdk_extinit.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e036cbfccbe33775524a469082306913843c63df Author: Jon TURNEY Date: Thu Nov 6 13:54:11 2014 +0000 Make PseudoramiXExtensionInit() prototype more generally available Make PseudoramiXExtensionInit() prototype available to hw/xwin Rather than avoiding a reference to it being pulled in to Xorg by sdksyms by hiding this prototype behind the INXQUARTZ define, which is only defined when building Xquartz, introduce nonsdk_extinit.h and move it there. (The only remaining use of INXQUARTZ is in mi/miiniext.c, in order to do PseudoramiXExtensionInit() at the point apparently needed by Xquartz) Also remove duplicate declaration of noPseudoramiXExtension from pseudoramiX.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3aad9b7556391b0f55e46ba13ced5e58d8fd47f7 Author: Jon TURNEY Date: Mon Nov 7 20:54:10 2011 +0000 hw/xwin: Turn on -hostintitle by default Turn on -hostintitle by default Provide -nohostintitle to disable if needed Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b2aaf69e62f4109ffb8aaf39e9bd2571abb29dfb Author: Jon TURNEY Date: Thu Jun 28 14:22:07 2012 +0100 hw/xwin: Report Cygwin version information in log Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d02f9611c8d3bafca4be17c65efca3c5527f71e2 Author: Jon TURNEY Date: Mon Mar 16 16:29:29 2015 +0000 hw/xwin/glx: Improve code generator to deal with latest Khronos OpenGL registry XML Improve the parsing of the XML element Include all text from the param element, in the order it appears in the xml document, as part of the formal parameter declaration This is needed to correctly handle the XML description added in svn r27498 of glPathGlyphIndexRangeNV()'s baseAndCount parameter of type GLuint[2] This fixes the way the parameter declaration is generated so it is in the correct form 'GLuint baseAndCount_[2]' and not 'GLuint baseAndCount[2]_' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5071cb7e0ac5f17c48ed7f3f3b6f242dec802f66 Author: Jon TURNEY Date: Mon Mar 16 16:14:10 2015 +0000 hw/xwin/glx: Refactor parsing of the XML element Factor out duplicated code used in parsing of the XML element in the code generator Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d3080d421bf0d91daea2e39bfc391c43d7fdad75 Author: Jon TURNEY Date: Thu Feb 5 20:29:48 2015 +0000 os: Teach vpnprintf() how to handle "%*.*s" XdmcpFatal uses the format specifier %*.*s, which vpnprintf() doesn't understand, which causes a backtrace and prevents the reason for the XDMCP failure being logged. See also: https://bugs.freedesktop.org/show_bug.cgi?id=66862 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758574 "%*.*s" is also currently used in a few other places, so teach vpnprintf() how to handle it $ fgrep -r "%*.*s" * hw/dmx/config/scanner.l: fprintf(stderr, "parse error on line %d at token \"%*.*s\"\n", hw/dmx/dmxlog.c: ErrorF("(%s) dmx[i%d/%*.*s]: ", type, hw/dmx/input/dmxinputinit.c: dmxLogCont(dmxInfo, "\t[i%d/%*.*s", os/access.c: ErrorF("Xserver: siAddrMatch(): type = %s, value = %*.*s -- %s\n", os/access.c: ("Xserver: siCheckAddr(): type = %s, value = %*.*s, len = %d -- %s\n", os/xdmcp.c: FatalError("XDMCP fatal error: %s %*.*s\n", type, Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 491cf02e191e70c5ce24c19da880bb79bebfc03c Author: Jon TURNEY Date: Tue Feb 10 14:37:26 2015 +0000 os: XDMCP options like -query etc. should imply -listen tcp In X server 1.17, the default configuration is now -nolisten tcp. In this configuration, XDMCP options don't work usefully, as the X server is not listening on the port for the display that it tells the display manager to connect to. Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith Reviewed-by: Colin Harrison commit f42520c5f151bda25e52ae8b0408a421c3fba7e5 Author: Jon TURNEY Date: Wed Feb 4 17:04:45 2015 +0000 ephyr: Avoid a segfault with 'DISPLAY= Xephy -glamor' ephyr_glamor_connect() returns NULL if we failed, but applying xcb_connection_has_error() to NULL is not permitted. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Martin Reviewed-by: Colin Harrison commit 0a78b599b34cc8b5fe6fe82f90e90234e8ab7a56 Author: Jürg Billeter Date: Sat Feb 7 18:13:21 2015 +0100 int10: Fix error check for pci_device_map_legacy pci_device_map_legacy returns 0 on success. Signed-off-by: Jürg Billeter Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 21b896939c5bb242f3aacc37baf12379e43254b6 Author: Egbert Eich Date: Tue Mar 3 16:27:05 2015 +0100 symbols: Fix sdksyms.sh to cope with gcc5 Gcc5 adds additional lines stating line numbers before and after __attribute__() which need to be skipped. Signed-off-by: Egbert Eich Tested-by: Daniel Stone Signed-off-by: Peter Hutterer commit 7ea64fb4374504bd3d524fc08c90efdab9f253ea Author: Alan Coopersmith Date: Mon Mar 9 09:55:57 2015 -0700 Clear ListenTransConns entries in CloseWellKnownConnections Since _XSERVTransClose frees the connection pointer passed to it, remove that pointer from the array, so we don't try to double free it if we come back into CloseWellKnownConnections again. Should fix https://bugzilla.yoctoproject.org/show_bug.cgi?id=6665 in which the shutdown section of the main() loop called CloseWellKnownConnections() and then moved on to ddxGiveUp(), which failed to release the VT and thus called AbortServer(), which called CloseWellKnownConnections() again. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit 6d3cf35a6f0856ac44a7be560e2265461f9bb32b Author: Emil Velikov Date: Mon Mar 9 12:00:52 2015 +0000 autogen.sh: use quoted string variables Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c4202ea85aaea2a4dc7eb29776357a2ba13e191 Author: Michal Srb Date: Thu Feb 19 14:57:27 2015 +0200 Expose GetMaster to modules. Add _X_EXPORT to GetMaster function. It is required by tigervnc's VNC module. Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f485a1af64bb00c696ea9f79961786bd791eaec1 Author: Peter Hutterer Date: Tue Dec 16 14:43:29 2014 +1000 Drop valuator mask argument from GetKeyboardEvents Nothing was using it and if anyone had they would've gotten a warning and noticed that it doesn't actually work. Drop this, it has been unused for years. Input ABI 22 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 9d9bd38fe1454590c303dc936ddac913808bf881 Author: Dave Airlie Date: Tue Feb 17 14:40:27 2015 +1000 os/access: fix regression in server interpreted auth This was reported on irc on Fedora when rawhide went to 1.17.1. regression occured in: 2566835b4374edb3e5a8353d4f7c9e7ec4851c57 os: Eliminate uninitialized value warnings from access.c siAddrMatch doesn't need addr to be a useful value, it checks some things like localuser without having an address at all. Signed-off-by: Dave Airlie Tested-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3a06faf3fcdb7451125a46181f9152e8e59e9770 Author: Keith Packard Date: Tue Feb 10 22:16:49 2015 -0800 Mark development version for 1.18 Signed-off-by: Keith Packard commit 4a758f59a8a65c313244e06852745c8e180ff247 Author: Alan Coopersmith Date: Fri Dec 12 22:38:26 2014 -0800 dmx: include header for DMXExtensionInit() in dmx.c Gets rid of gcc 4.8 warning: dmx.c:1193:1: warning: no previous prototype for ‘DMXExtensionInit’ [-Wmissing-prototypes] DMXExtensionInit(void) ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit a0e44ddfb0c641e7896a55abf26621ae3d17e337 Author: Alan Coopersmith Date: Fri Dec 12 22:33:54 2014 -0800 dmx: constify GCOps & GCFuncs pointers Gets rid of 16 instances of gcc 4.8 warnings: In file included from dmxgc.c:41:0: dmx.h:327:23: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] (_saved)->_entry = (_actual)->_entry; \ ^ dmxgc.h:80:5: note: in expansion of macro ‘DMX_WRAP’ DMX_WRAP(funcs, &dmxGCFuncs, _pGCPriv, (_pGC)); \ ^ dmxgc.c:192:5: note: in expansion of macro ‘DMX_GC_FUNC_EPILOGUE’ DMX_GC_FUNC_EPILOGUE(pGC); ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 9682c47e228962e4008855c4da7467748742685e Author: Alan Coopersmith Date: Fri Dec 12 22:20:24 2014 -0800 dmx: Mark glxIsExtensionSupported as a const char * Gets rid of 9 instances of gcc 4.8 warning: glxcmds.c: In function ‘CreateContext’: glxcmds.c:378:13: warning: passing argument 1 of ‘glxIsExtensionSupported’ discards ‘const’ qualifier from pointer target type [enabled by default] else if (glxIsExtensionSupported("GLX_SGIX_fbconfig")) { ^ In file included from glxserver.h:49:0, from glxcmds.c:41: glxscreens.h:53:12: note: expected ‘char *’ but argument is of type ‘const char *’ extern int glxIsExtensionSupported(char *ext); Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 45ec646d77086eeb5f94766b055a93b5c75bdef0 Author: Alan Coopersmith Date: Fri Dec 12 22:16:49 2014 -0800 dmx: remove redundant redeclarations of variables from other headers Gets rid of these gcc 4.8 warnings: dmxcb.c:50:12: warning: redundant redeclaration of ‘PanoramiXPixWidth’ [-Wredundant-decls] extern int PanoramiXPixWidth; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:12:22: note: previous declaration of ‘PanoramiXPixWidth’ was here extern _X_EXPORT int PanoramiXPixWidth; ^ dmxcb.c:51:12: warning: redundant redeclaration of ‘PanoramiXPixHeight’ [-Wredundant-decls] extern int PanoramiXPixHeight; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:13:22: note: previous declaration of ‘PanoramiXPixHeight’ was here extern _X_EXPORT int PanoramiXPixHeight; ^ dmxcb.c:52:12: warning: redundant redeclaration of ‘PanoramiXNumScreens’ [-Wredundant-decls] extern int PanoramiXNumScreens; ^ In file included from dmxcb.c:49:0: ../../Xext/panoramiXsrv.h:11:22: note: previous declaration of ‘PanoramiXNumScreens’ was here extern _X_EXPORT int PanoramiXNumScreens; ^ dmxpict.c:60:12: warning: redundant redeclaration of ‘RenderErrBase’ [-Wredundant-decls] extern int RenderErrBase; ^ In file included from ../../render/glyphstr.h:29:0, from ../../render/picturestr.h:28, from dmx.h:65, from dmxpict.c:42: ../../render/picture.h:176:22: note: previous declaration of ‘RenderErrBase’ was here extern _X_EXPORT int RenderErrBase; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 1033b85196e0f25877b4b9081993aff16bf32138 Author: Alan Coopersmith Date: Fri Dec 12 22:13:28 2014 -0800 dmx: remove redundant declaration of dmxFontPrivateIndex from dmxfont.h Gets rid of 8 instances of gcc 4.8 warning: In file included from glxcmds.c:38:0: ../../../hw/dmx/dmxfont.h:57:12: warning: redundant redeclaration of ‘dmxFontPrivateIndex’ [-Wredundant-decls] extern int dmxFontPrivateIndex; ^ In file included from glxcmds.c:35:0: ../../../hw/dmx/dmx.h:388:12: note: previous declaration of ‘dmxFontPrivateIndex’ was here extern int dmxFontPrivateIndex; /**< Private index for Fonts */ ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit ac64a653fb4935a799baca7545ba6ca401e20fa1 Author: Alan Coopersmith Date: Fri Dec 12 22:09:14 2014 -0800 dmx: glxproxy prototype cleanup Gets rid of 107 -Wmissing-prototypes & -Wredundant-decls warnings from gcc 4.8 Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit bd563fd48f909094d6660854e97811ad7e676ddf Author: Alan Coopersmith Date: Fri Dec 12 21:11:17 2014 -0800 dmx: more unshadowing of variables Gets rid of gcc 4.8 warnings: dmxinputinit.c: In function ‘dmxInputScanForExtensions’: dmxinputinit.c:877:14: warning: declaration of ‘display’ shadows a global declaration [-Wshadow] Display *display; ^ In file included from ../../../include/windowstr.h:60:0, from dmxinputinit.c:72: ../../../include/opaque.h:52:30: warning: shadowed declaration is here [-Wshadow] extern _X_EXPORT const char *display; ^ glxcmds.c: In function ‘__glXCreatePbuffer’: glxcmds.c:3397:21: warning: declaration of ‘pc’ shadows a parameter [-Wshadow] CARD32 *pc = (CARD32 *) (be_req + 1); ^ glxcmds.c:3314:52: warning: shadowed declaration is here [-Wshadow] __glXCreatePbuffer(__GLXclientState * cl, GLbyte * pc) ^ glxscreens.c: In function ‘CalcServerVersionAndExtensions’: glxscreens.c:139:35: warning: declaration of ‘req’ shadows a previous local [-Wshadow] xGLXQueryServerStringReq *req; ^ glxscreens.c:68:26: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReq *req; ^ glxscreens.c:140:36: warning: declaration of ‘reply’ shadows a previous local [-Wshadow] xGLXQueryServerStringReply reply; ^ glxscreens.c:69:27: warning: shadowed declaration is here [-Wshadow] xGLXQueryVersionReply reply; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 57e08fae82f733304200a473f55b86e689404c13 Author: Alan Coopersmith Date: Fri Dec 12 21:07:12 2014 -0800 dmx: attempt to untangle nested loops using same index variable This doesn't just make gcc sad, it makes my brain sad. Change from: for (i = 0; i < dmxNumScreens; i++) { int i; for (i = 0; i < nconfigs; i++) { for (j = 0; j < dmxScreen->beNumVisuals; j++) { to the easier to follow: for (i = 0; i < dmxNumScreens; i++) { for (j = 0; j < nconfigs; j++) { for (k = 0; k < dmxScreen->beNumVisuals; k++) { Gets rid of gcc 4.8 warning: dmxinit.c: In function ‘InitOutput’: dmxinit.c:765:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow] int i; ^ dmxinit.c:608:9: warning: shadowed declaration is here [-Wshadow] int i; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 0fbebad72428abbc9fc3fa9f406f7a7e1b9d95b2 Author: Alan Coopersmith Date: Fri Dec 12 20:53:33 2014 -0800 dmx: remove unused variables Gets rid of gcc 4.8 warnings: dmxscrinit.c: In function ‘dmxBEScreenInit’: dmxscrinit.c:83:15: warning: unused variable ‘gcvals’ [-Wunused-variable] XGCValues gcvals; ^ dmxwindow.c: In function ‘dmxResizeWindow’: dmxwindow.c:860:19: warning: variable ‘pSibPriv’ set but not used [-Wunused-but-set-variable] dmxWinPrivPtr pSibPriv; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit f358f0d50cadaf10f7d97e21da00419a4a37c4e1 Author: Alan Coopersmith Date: Fri Dec 12 19:09:36 2014 -0800 dmx: fix printf format argument warnings Gets rid of these gcc 4.8 warnings: dmxinit.c: In function ‘dmxErrorHandler’: dmxinit.c:167:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:171:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:175:16: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘XID64’ [-Wformat=] ev->resourceid); ^ dmxinit.c:181:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] ev->serial); ^ dmxinit.c:183:12: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dpy->request); ^ dmxinit.c: In function ‘InitOutput’: dmxinit.c:637:9: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=] dmxLog(dmxInfo, "Generation: %d\n", dmxGeneration); ^ dmxprop.c: In function ‘dmxPropertyCheckOtherWindows’: dmxprop.c:223:24: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘Window’ [-Wformat=] dmxScreen->name, win, tp.value); ^ dmxprop.c: In function ‘dmxPropertyWindow’: dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘Window’ [-Wformat=] other->index, other->name, other->scrnWin); ^ dmxprop.c:364:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘Window’ [-Wformat=] Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 11af200b004b4810c9267e3e16449c3175c64d4a Author: Alan Coopersmith Date: Fri Dec 12 18:58:01 2014 -0800 dmx: move format strings inline so gcc can check Gets rid of gcc 4.8 warnings: dmxprint.c: In function ‘dmxConfigPrintPair’: dmxprint.c:284:25: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] p->ysign < 0 ? '-' : '+', p->y); ^ dmxprint.c:289:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral] dmxConfigOutput(addSpace, 0, p->comment, format, p->x, p->y); ^ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 5e01eac10e915568324aff81b51d3af558757042 Author: Alan Coopersmith Date: Fri Dec 12 18:52:05 2014 -0800 dmx: Add _X_ATTRIBUTE_PRINTF to dmxConfigLog() & dmxConfigOutput() Gets rid of gcc 4.8 warnings: dmxparse.c: In function ‘dmxConfigLog’: dmxparse.c:61:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] vprintf(format, args); /* RATS: All calls to dmxConfigLog from ^ dmxprint.c: In function ‘dmxConfigOutput’: dmxprint.c:149:9: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] pos += vfprintf(str, format, args); /* assumes no newlines! */ Signed-off-by: Alan Coopersmith Reviewed-by: Rémi Cardona Reviewed-by: Keith Packard commit 9e002dfcd71439fd81563db1f70e8c1964d52fab Author: Alan Coopersmith Date: Tue Dec 9 18:27:11 2014 -0800 Get rid of const warnings in XSERVER_INPUT_EVENT dtrace probe calls Use typedefs to work around dtrace dropping const qualifiers from probe arguments when generating Xserver-dtrace.h. Add new probes.h header to avoid having to replicate these typedefs in every file with dtrace probes. Gets rid of these warnings from gcc 4.8: getevents.c:1096:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' discards 'const' qualifier from pointer target type [enabled by default] getevents.c:1096:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1651:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1791:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 6 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] getevents.c:1921:9: warning: passing argument 7 of '__dtrace_Xserver___input__event' disards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 20079c36cf7d377938ca5478447d8b9045cb7d43 Author: Olivier Fourdan Date: Fri Jan 16 08:44:45 2015 +0100 xkb: Check strings length against request size Ensure that the given strings length in an XkbSetGeometry request remain within the limits of the size of the request. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 81c90dc8f0aae3b65730409b1b615b5fa7280ebd Author: Olivier Fourdan Date: Fri Jan 16 20:08:59 2015 +0100 xkb: Don't swap XkbSetGeometry data in the input buffer The XkbSetGeometry request embeds data which needs to be swapped when the server and the client have different endianess. _XkbSetGeometry() invokes functions that swap these data directly in the input buffer. However, ProcXkbSetGeometry() may call _XkbSetGeometry() more than once (if there is more than one keyboard), thus causing on swapped clients the same data to be swapped twice in memory, further causing a server crash because the strings lengths on the second time are way off bounds. To allow _XkbSetGeometry() to run reliably more than once with swapped clients, do not swap the data in the buffer, use variables instead. Signed-off-by: Olivier Fourdan Signed-off-by: Peter Hutterer commit 28f6427aec1f5a1982e1c01eff45af0d401bf659 Author: Keith Packard Date: Mon Feb 2 07:41:06 2015 +0100 Update to version 1.17.0 Signed-off-by: Keith Packard commit 697b696e5e24d0679f133183a3bb0852025377c2 Author: Dave Airlie Date: Fri Jan 30 09:59:49 2015 +1000 config/udev: Respect seat assignments when assigned devices Jonathan Dieter posted a few patches to do this inside the Xorg server but it makes no sense to do it there, just have the code we use to probe the device list at startup check seat assignments using the same code we check at hotplug time. Bugilla: https://bugzilla.redhat.com/show_bug.cgi?id=1183654 Reviewed-by: Peter Hutterer Acked-by: Hans de Goede Tested-by: Jonathan Dieter Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit df1b401f57ad4b4925bad66684445b476562f26f Author: Dave Airlie Date: Wed Jan 7 09:19:27 2015 +1000 randr: attempt to fix primary on slave output (v2) If the user wants to set one of the slave devices as the primary output, we shouldn't fail to do so, we were returning BadMatch which was tripping up gnome-settings-daemon and bad things ensues. Fix all the places we use primaryOutput to work out primaryCrtc and take it into a/c when slave gpus are in use. v2: review from Aaron, fix indent, unhide has_primary from macro. I left the int vs Bool alone to be consistent with code below, a future patch could fix both. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 62fcd364ac8c71a2db1db84b17b17cade6832492 Author: Adel Gadllah Date: Sat Jan 3 21:12:25 2015 +0100 dri2: Set vdpau driver name if ddx does not provide any driver name Currently when the ddx does not set any driver name we set DRI2 driver but not the VDPAU driver name. The result is that VDPAU drivers will not get found by libvdpau when the modesetting driver is being used. Just assume that the VDPAU driver matches the DRI2 driver name, this is true for nouveau, r300, r600 and radeonsi i.e all VDPAU drivers currently supported by mesa. Signed-off-by: Adel Gadllah Reviewed-by: Alex Deucher Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit fe4c774c572e3f55a7417f0ca336ae1479a966ad Author: Nikhil Mahale Date: Sat Jan 24 17:06:59 2015 -0800 os: Fix timer race conditions Fixing following kind of race-conditions - WaitForSomething() | ----> // timers -> timer-1 -> timer-2 -> null while (timers && (int) (timers->expires - now) <= 0) // prototype - DoTimer(OsTimerPtr timer, CARD32 now, OsTimerPtr *prev) DoTimer(timers, now, &timers) | | ----> OsBlockSignals(); .... OS Signal comes just before blocking it, .... timer-1 handler gets called. // timer-1 gets served and scheduled again; // timers -> timer-2 -> timer-1 -> null .... *prev = timer->next; timer->next = NULL; // timers -> null // timers list gets corrupted here and timer-2 gets removed from list. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86288 Signed-off-by: Nikhil Mahale Reviewed-by: Julien Cristau v2: Apply warning fixes from Keith Packard Reviewed-by: Aaron Plattner Signed-off-by: Aaron Plattner Signed-off-by: Keith Packard commit 58f28b0427f0a0c0c445f314bd42721ca8e1e844 Author: Keith Packard Date: Fri Jan 23 10:59:39 2015 -0800 Update to version 1.16.99.902 Signed-off-by: Keith Packard commit fef2f6357b40b238ae01c4c80b0d29b17b839686 Author: Jason Ekstrand Date: Tue Jan 13 15:08:38 2015 -0800 modesetting: Return the crtc for a drawable even if it's rotated All of our checks for what crtc we are on take rotation into account so we select the correct crtc. The only problem is that we weren't returning it we were rotated. This caused X to think DRI3 apps were not on any crtc and limit them to 1 FPS. Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3dcd591fa9b71a3dce58d612ca5970209d8386eb Author: Jason Ekstrand Date: Tue Jan 13 15:08:37 2015 -0800 modesetting: Add support for using RandR shadow buffers This replaces the stubs for shadow buffer creation/allocation with actual functions and adds a shadow_destroy function. With this, we actually get shadow buffers and RandR now works properly. Most of this is copied from the xf86-video-intel driver and modified for modesetting. v2 Jason Ekstrand : - Fix build with --disable-glamor - Set the pixel data pointer in the pixmap header for dumb shadow bo's - Call drmmode_create_bo with the right bpp v2 Jason Ekstrand : - Make shadow buffers per-crtc and leave shadow_enable alone Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7c656bfcae1d68aeffd5e202b3c1569885f5d13d Author: Jason Ekstrand Date: Tue Jan 13 15:08:36 2015 -0800 modesetting: Add drmmode_bo_has_bo and drmmode_bo_map helper function Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b4703a5a6e529b78810db8d8782317f0b4e2f265 Author: Jason Ekstrand Date: Tue Jan 13 15:08:35 2015 -0800 modesetting: Refactor drmmode_glamor_new_screen_pixmap The original drmmode_glamor_new_screen_pixmap function was specific to the primary screen pixmap. This commit pulls the guts out into a new, more general, drmmode_set_pixmap_bo function for setting a buffer on a pixmap. The new function also properly tears down the glamor bits if the buffer being set is NULL. The drmmode_glamor_new_screen_pixmap function is now just a 3-line wrapper around drmmode_set_pixmap_bo. v2 Jason Ekstrand : - Re-arranged code in drmmode_set_pixmap_bo and drmmode_glamor_handle_new_screen_pixmap so that glamor_set_screen_pixmap only gets called for the screen pixmap - Guard the call to glamor_set_screen_pixmapa with a drmmode->glamor check Signed-off-by: Jason Ekstrand Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bb23fbf5bb278113c9c481875423b4d128180972 Author: Adam Jackson Date: Mon Jan 5 16:48:11 2015 -0500 dix: make RegionInit legal C++ The CVE fix in: commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb Author: Alan Coopersmith Date: Wed Jan 22 22:37:15 2014 -0800 dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4] offended the C++ demons: ../../include/regionstr.h:147:45: error: invalid conversion from 'void*' to 'pixman_region16_data_t* {aka pixman_region16_data*}' [-fpermissive] Normally this isn't a problem, because around here we have the sense and common decency to not use C++, but this does make tigervnc fail to build, which is a little rude of us. Signed-off-by: Adam Jackson Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 082931014811e587a9734cbf4d88fd948979b641 Author: Chris Wilson Date: Sat Jan 17 10:09:54 2015 +0000 dri2: SourceOffloads may be for DRI3 only As a DDX may declare offload support without supporting DRI2 (because it is using an alternative acceleration mechanism like DRI3), when iterating the list of offload_source Screens to find a matching DRI2 provider we need to check before assuming it is DRI2 capable. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88514 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit f27d743c1899f307ec8063febbb3198c8945d372 Author: Carlos Olmedo Escobar Date: Wed Jan 21 01:44:54 2015 +0100 Avoid possible null pointer dereference. Signed-off-by: Carlos Olmedo Escobar Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 437d2ec5f250f8ab4b44cbae56f938719802e1cc Author: Carlos Sánchez de La Lama Date: Wed Jan 21 10:22:05 2015 +0100 randr: swap num-preferred field on RRGetOutputInfo reply Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88614 Signed-off-by: Carlos Sánchez de La Lama Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 3d12941b408de7a3bdc579e34e119f8aa81ea926 Author: Keith Packard Date: Thu Jan 22 22:28:34 2015 -0800 drivers/modesetting: Save current BlockHandler on return in msBlockHandler If the BlockHandler chain is modified while it is active, we need to re-fetch the current value and store it in our private for use the next time through. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit b3e496c6d21058147de9a11b78860e73c74db3cb Author: Dave Airlie Date: Fri Jan 23 16:28:28 2015 +1000 glamor: use screen blockhandler rather than dix one (v3) This adds glamor into the block handler call chain in the correct place. This should fix interactions between glamor and drivers requiring damage from glamor. v2: okay don't consolidate, just leave things wierd for now remove blcokhandler in screen close. v3: block handler wrapping the right way. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5af2f5b7d2f955586d0cb40eb30812f1893db22e Author: Markus Wick Date: Thu Jan 15 22:03:18 2015 +0100 xwayland: Set glamor filter to nearest glEGLImageTargetTexture2DOES only set the first level. Mesa handles this new texture as incomplete and renders a black screen. We also want to prevent linear filtering. https://bugs.freedesktop.org/show_bug.cgi?id=81800 Signed-off-by: Markus Wick Reviewed-and-Tested-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 5f2e8ac51ccbf7c02f25c8cb7617df0238418cd1 Merge: 4e12d7b6f 430147950 Author: Keith Packard Date: Sat Jan 10 14:51:57 2015 +1300 Merge remote-tracking branch 'whot/for-keith' commit 4e12d7b6f4489fa06475465993a3e1e1d896390b Author: Jasper St. Pierre Date: Sun Jan 4 23:27:32 2015 -0800 modesetting: Update the cursor without hiding it In the new KMS APIs, the legacy drmModeSetCursor ioctl actually waits for a vblank after changing the cursor image before returning, meaning that the X server, in attempting to hide the cursor before updating its image, actually makes that hide *visible* for a full vblank. It's unknown why the X server does this by default, but turn it off. If we're with a legacy driver that doesn't support the modern drmModeSetCursor by waiting for a vblank before returning, we're going to get a tiny bit of tearing on the cursor plane. But between tearing with a new cursor image and tearing with a blank cursor image, I'd rather the former. The only proper solution to this is an atomic ioctl that page flips all planes, including the cursor plane, at vblank time and at the same time. Signed-off-by: Keith Packard Reviewed-by: Keith Packard commit 43014795087a0a8774dd9687f5967329b15f06a2 Author: Olivier Fourdan Date: Mon Jan 5 16:44:22 2015 +0100 Synchronize capslock in Xnest and Xephyr In Xnest or Xephyr, pressing CapsLock when focus is on another window does not update the state in the nested X server. This is because when synchronizing the lock modifier, sending a keypress or a key release only is not sufficient to toggle the state, unlike regular modifiers, one has to emulate a full press/release to lock or unlock the modifier. Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 24b943132f90bc72ce8b5dc954fe9ee8484edfc2 Author: Olivier Fourdan Date: Fri Jan 2 18:50:17 2015 +0100 Fix subwindow in Xi emulated events Bug: 70790 Signed-off-by: Olivier Fourdan commit b058dec281568d6a9c5b5e230c20eed096cbdc6d Author: Peter Hutterer Date: Mon Jan 5 11:19:46 2015 +1000 mi: fix accidental x/y coordinate swap Reported-by: Adam Greenblatt Signed-off-by: Peter Hutterer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 23a11fd85e12e94d29ee6d33715ac49684867b16 Author: Keith Packard Date: Sun Jan 4 19:13:35 2015 -0800 doc: Create a script to filter xmlto output This reduces the build log spam while still preserving the xmlto status to catch build failures correctly. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 1c01633877caa4239f901f02fbe113926318d030 Merge: 357385551 e774663fa Author: Keith Packard Date: Sun Jan 4 17:02:25 2015 -0800 Merge remote-tracking branch 'ajax/xserver-next' commit 3573855514557a518de40a93b3c578f28c7d9c2b Author: Olivier Fourdan Date: Wed Dec 3 13:49:37 2014 +0100 Remove explicit dependency on $(WAYLAND_LIBS) Xwayland Makefile explicitely set its dependencies on WAYLAND_LIBS. If the ibrairies are installed in a non-standard path, WAYLAND_LIBS contains '-L/path/to/the/lib' which will fail at build time with: "No rule to make target '-L/path/to/the/lib', needed by 'Xwayland'. Stop" Remove that explicit dependency to avoid the problem (LDADD ought to be enough to get the right libraries linked). Signed-off-by: Olivier Fourdan Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit de89c6b8c6e81bad131c7f432e355cb42d233e87 Author: Peter Hutterer Date: Tue Dec 16 13:59:45 2014 +1000 xfree86: rename Xorg.bin to Xorg If the suid wrapper is enabled, /usr/bin/Xorg is just a shell script that execs either /usr/libexec/Xorg.bin directly or the Xorg.wrap binary which then execve's /usr/libexec/Xorg.bin. Either way, we end up with Xorg.bin, which is problematic for two reasons: * ps shows the command as Xorg.bin * _COMM and _EXE in systemd's journal will both show Xorg.bin as well There's not much we can do about the path, but having the actual command stay as Xorg means better compatibility to existing scripts. And, the reason for this path: the command journalctl _COMM=Xorg works universally, regardless of whether the wrapper is used or not. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Acked-by: Hans de Goede commit ee21be1324de1d6ef14e529fed7b75992e971beb Author: Peter Hutterer Date: Thu Dec 11 10:32:45 2014 +1000 dix: offset touch root coordinates by ScreenRec origins (#86655) For two ScreenRecs abs pointer positioning was working fine, but touch events stuck to the lower/right edge on any screen but the one with a 0/0 origin. Cause is a missing offset by the screen coordinates, causing the root coordinates in the event to desktop-wide, not screen-wide. Offset properly, just like we do for pointer events. X.Org Bug 86655 Signed-off-by: Peter Hutterer commit dc777c346d5d452a53b13b917c45f6a1bad2f20b Author: Keith Packard Date: Sat Jan 3 08:46:45 2015 -0800 dix: Allow zero-height PutImage requests The length checking code validates PutImage height and byte width by making sure that byte-width >= INT32_MAX / height. If height is zero, this generates a divide by zero exception. Allow zero height requests explicitly, bypassing the INT32_MAX check. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 924996c41c419dda0f02a96aafdf52f7670ff4ea Author: Michele Baldessari Date: Wed Dec 3 11:53:10 2014 -0500 ephyr: Implement per-screen colormaps Xephyr's pseudocolor emulation added in: commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts only tracks one global colormap for the whole (Xephyr) display. Move this to per-screen state so each screen's colormap can be correct. [ajax: rebased to 1.17, cleaned up commit message] Reviewed-by: Adam Jackson Signed-off-by: Michele Baldessari Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 7b076fdfc0e7a98430b6cb1c43079c137d7d3a6c Author: Carl Worth Date: Thu Dec 11 19:09:48 2014 -0800 os/xsha1.c: Add license and copyright attribution. I'm interested in copying this code to the mesa project, but before doing that it seems prudent to have the license and copyright attributions in place before copying that. To get this list of names I went through: git log -- os/xsha1.c and: git log -- render/glyph.c Signed-off-by: Keith Packard commit 66726064204b869a24e5a8dc6e24daa5acb92bab Author: Kenneth Graunke Date: Tue Dec 30 11:51:43 2014 -0800 modesetting: Fix build with --disable-glamor. present.c: In function 'ms_present_flush': present.c:204:9: error: implicit declaration of function 'glamor_block_handler' Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87858 Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Jasper St. Pierre Reviewed-by: Rob Clark Signed-off-by: Keith Packard commit d723928870eea9fc2554abe137d6e57f7ad29e98 Author: Keith Packard Date: Sat Dec 27 09:11:33 2014 -0800 glamor: Fix nlines in glamor_xv_put_image when src_y is odd The number of lines of video to update in the texture needs to be computed from the height of the updated source, not the full height of the source. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 09230a2d435aa7f893ad5022220e3eb39ffb6db5 Author: Kenneth Graunke Date: Thu Dec 11 13:37:14 2014 -0800 modesetting: Add vblank synchronization support when using Present. modesetting hooked up vblank support for DRI2, but was missing support for vblanks in Present. This is mostly copy and pasted from Keith's code in the intel driver. v2: Use ms_crtc_msc_to_kernel_msc in ms_present_queue_vblank to hook up the vblank_offset workaround for bogus MSC values (which the DRI2 code already did). Also simplify the ms_present_get_crtc function. vblank.c already implements the functionality; we just need to convert types. v3: Fix ms_flush_drm_events return code. I'd copied code where 0 meant success into a function that returned a boolean, so the return code was always backwards. Also add DebugPresent calls in ms_present_vblank_{handler,abort}. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 3b5be33fc55b3090d996014fa56603edb9c1d411 Author: Kenneth Graunke Date: Thu Dec 11 13:48:04 2014 -0800 modesetting: Include glamor.h from driver.h. We basically want it throughout the driver. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 7d1fc04d27857c999bd732d54a0b36f5079449b8 Author: Kenneth Graunke Date: Thu Dec 18 17:58:18 2014 -0800 modesetting: Check DPMS mode in ms_covering_crtc(). crtc->enabled is insufficient; we should also make sure DPMS is on. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit 8affaade2c127ea08989c86e7d71cc9da3db1824 Author: Kenneth Graunke Date: Thu Dec 18 17:55:29 2014 -0800 modesetting: Track the CRTC's DPMS mode. We don't want to try to vblank synchronize to monitors which are off. In order to handle that properly, we need to know the CRTC's DPMS mode. Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit b51f804b1ca826699296aff9de27d19257d78dae Author: Kenneth Graunke Date: Thu Dec 18 17:22:00 2014 -0800 present: If present_queue_vblank() fails, do present_execute(). Previously, if present_queue_vblank() failed, we simply dropped the present request on the floor, and returned an error. This was rather mean to clients - after presenting, they wait for a PresentComplete event to come back. But since the present never happens, they end up waiting forever, and lock up in poll(). This patch falls back to present_execute if present_queue_vblank fails. We still print a debugging message to warn when queueing fails, which allows us to continue debugging problems, but makes Present robust enough to not lock up people's compositing manager when vblank bugs happen. v2: Don't do present_queue_vblank() /and/ present_execute() (a bug that snuck in during last minute tidying). Signed-off-by: Kenneth Graunke Reviewed-by: Keith Packard Tested-by: Jason Ekstrand Signed-off-by: Keith Packard commit f9e22cefcb9684bf495ada3ec4b0231ab2dc6cff Author: Dima Ryazanov Date: Mon Dec 22 11:35:29 2014 -0800 Fix "Back", "Forward", and other special mouse buttons in XWayland. Currently, the indexes are off by 4 because of the scroll buttons. Signed-off-by: Dima Ryazanov Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 70a6f65f9e2b26ef7539dcacfcfea927bc1f13fd Author: Michel Dänzer Date: Thu Dec 25 11:42:03 2014 +0900 glamor: Make sure Xvideo source image data is properly aligned _glamor_upload_bits_to_pixmap_texture currently ignores the stride parameter, but __glamor_upload_pixmap_to_texture uses 4-byte alignment via glPixelStorei(GL_UNPACK_ALIGNMENT, 4). Also fix up the stride argument passed in though, in case it starts being used properly in the future. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87455 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 11b85ab2fc944c0645df43180a6c7e2d6a06483a Author: Michel Dänzer Date: Wed Dec 24 11:46:46 2014 +0900 glamor: Make glamor_purge_fbo static Only called from glamor_fbo.c now. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8323d2e90150bb86a12d00a16269c69a24efc896 Author: Michel Dänzer Date: Wed Dec 24 11:46:18 2014 +0900 glamor: Call glamor_pixmap_destroy_fbo from glamor_set_pixmap_private Calling glamor_purge_fbo directly was incorrect for large pixmaps. Fixes use-after free with large pixmaps: ==2029== Invalid write of size 8 ~ ==2029== at 0x85F93AD: __xorg_list_del (list.h:184) ==2029== by 0x85F93AD: xorg_list_del (list.h:204) ==2029== by 0x85F93AD: glamor_fbo_expire (glamor_fbo.c:280) ==2029== by 0x85F95CA: glamor_pixmap_fbo_cache_put (glamor_fbo.c:159) ==2029== by 0x85D7AB5: glamor_destroy_textured_pixmap (glamor.c:228) ==2029== by 0xC1BDDC4: radeon_glamor_destroy_pixmap (radeon_glamor.c:272) ==2029== by 0x519D00: damageDestroyPixmap (damage.c:1473) ==2029== by 0x4DD307: XvDestroyPixmap (xvmain.c:370) ==2029== by 0x4DB975: ShmDestroyPixmap (shm.c:258) ==2029== by 0x5098F6: FreePicture (picture.c:1425) ==2029== by 0x85E678E: glamor_composite_clipped_region (glamor_render.c:1558) ==2029== by 0x85F763A: glamor_composite_largepixmap_region (glamor_largepixmap.c:1347) ==2029== by 0x85E7964: _glamor_composite (glamor_render.c:1679) ==2029== by 0x85E7A38: glamor_composite (glamor_render.c:1758) ==2029== Address 0x1141d3c0 is 0 bytes inside a block of size 64 free'd ==2029== at 0x4C29E90: free (vg_replace_malloc.c:473) ==2029== by 0x85D7167: glamor_set_pixmap_private (glamor.c:570) ==2029== by 0xC1BDDC4: radeon_glamor_destroy_pixmap (radeon_glamor.c:272) ==2029== by 0x519D00: damageDestroyPixmap (damage.c:1473) ==2029== by 0x4DD307: XvDestroyPixmap (xvmain.c:370) ==2029== by 0x4DB975: ShmDestroyPixmap (shm.c:258) ==2029== by 0x45B246: doFreeResource (resource.c:875) ==2029== by 0x45BD5E: FreeResource (resource.c:905) ==2029== by 0x43444B: ProcFreePixmap (dispatch.c:1422) ==2029== by 0x43856E: Dispatch (dispatch.c:432) ==2029== by 0x43C96F: dix_main (main.c:298) ==2029== by 0x6CFAB44: (below main) (libc-start.c:287) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 0d37c7e4b5d63308a60ca59c9de981b380af8689 Author: Keith Packard Date: Fri Dec 19 18:40:19 2014 -0800 modesetting: Detect whether damage tracking is needed Call drmModeDirtyFB and check the return value to detect whether the driver support for damage tracking is present, only initialize it in that case. Signed-off-by: Keith Packard Reviewed-by: Jason Ekstrand commit 7804305673ca63720e8736c0c88afa711ebe208a Author: Keith Packard Date: Fri Dec 19 19:34:34 2014 -0800 modesetting: Fix damage tracking auto-disable code dispatch_dirty_region was only returning -EINVAL error codes, otherwise it would return 0. The kernel returns -ENOSYS when the driver doesn't support damage tracking, so dispatch_dirty would never see the error and never disable damage tracking. Pass all errors back from dispatch_dirty_region and let dispatch_dirty deal with them. Signed-off-by: Keith Packard Reviewed-by: Jason Ekstrand commit 826e7c2b36f192fbbe7ddff37eb559f4d6301146 Author: Alan Coopersmith Date: Wed Dec 17 20:50:02 2014 -0800 Solaris: Move shared declarations to xf86_OSlib.h Gets rid of gcc 4.8 warnings: xf86AutoConfig.c:211:9: warning: nested extern declaration of 'xf86SolarisFbDev' [-Wnested-externs] sun_VTsw.c:44:1: warning: no previous prototype for 'xf86VTRelease' [-Wmissing-prototypes] sun_VTsw.c:59:1: warning: no previous prototype for 'xf86VTAcquire' [-Wmissing-prototypes] and ensures caller & definition stay in sync. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bebcac0cf790b220e849e8905139d0744a606928 Author: Alan Coopersmith Date: Wed Dec 17 20:50:01 2014 -0800 Move RTLD_DI_SETSIGNAL code into a separate block to quiet warning Gets rid of gcc 4.8 warning: osinit.c:211:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2c7111235ca5c3bd23cd824589dfbc0ebd477585 Author: Keith Packard Date: Sat Dec 13 22:22:30 2014 -0800 modesetting: Enable Xv when using glamor This just calls the existing function to create the relevant Xv adaptor and hook it up. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 5a541bd5e7adc9fdcc1883558be9218f82a284e0 Author: Keith Packard Date: Tue Dec 16 23:14:34 2014 -0800 modesetting: [v2] Don't re-enable the cursor when loading the image Hidden cursors also have their image updated; re-enabling the cursor each time the image is set will cause it to re-appear. * Unifies the code that was in drmmode_load_cursor_argb and drm_mode_show_cursor and moves it to a new drmmode_set_cursor * Add a new boolean, 'cursor_up', to the per-crtc private data to track whether the cursor should be displayed. * Call drmmode_set_cursor from drm_mode_show_cursor and, if the cursor should be displayed, from drm_mode_load_cursor_argb. v2: Call drmModeSetCursor2 when loading a new cursor image if the cursor should be displayed. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit 0f5fdaf600bfeada966aea942cb3e347d4efee30 Author: Michel Dänzer Date: Thu Dec 11 16:50:40 2014 +0900 glamor: Make sure glamor_egl_close_screen wraps glamor_close_screen The other way around fails to destroy the screen pixmap EGL image: ==1782== 80 (32 direct, 48 indirect) bytes in 1 blocks are definitely lost in loss record 981 of 2,171 ==1782== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==1782== by 0xF9D4BD2: dri2_create_image_from_dri (egl_dri2.c:1264) ==1782== by 0xF9D4BD2: dri2_create_image_dma_buf (egl_dri2.c:1764) ==1782== by 0xF9D4BD2: dri2_create_image_khr (egl_dri2.c:1798) ==1782== by 0xF9C7937: eglCreateImageKHR (eglapi.c:1494) ==1782== by 0x85D5655: _glamor_egl_create_image (glamor_egl.c:134) ==1782== by 0x85D5655: glamor_egl_create_textured_pixmap (glamor_egl.c:302) ==1782== by 0x85D579B: glamor_egl_create_textured_screen (glamor_egl.c:225) ==1782== by 0xC1BE05D: radeon_glamor_create_screen_resources (radeon_glamor.c:67) ==1782== by 0xC1B6153: RADEONCreateScreenResources_KMS (radeon_kms.c:258) ==1782== by 0x4B2105: xf86CrtcCreateScreenResources (xf86Crtc.c:709) ==1782== by 0x43C823: dix_main (main.c:223) ==1782== by 0x6CFAB44: (below main) (libc-start.c:287) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c8d4c0a25dba49d1486761438b96374672b29645 Author: Michel Dänzer Date: Thu Dec 11 16:50:39 2014 +0900 glamor: Make glamor_destroy_textured_pixmap idempotent For robustness against drivers which may call both glamor_(egl_)destroy_textured_pixmap and glamor_destroy_pixmap. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 0355e280a39dee68981b2cbebfa2573cfde2f5bd Author: Michel Dänzer Date: Thu Dec 11 16:50:38 2014 +0900 glamor: Make glamor_set_pixmap_private not crash if the pixmap has no fbo Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 45b333525e4626523f2b3b7bb360404b6366750d Author: Michel Dänzer Date: Thu Dec 11 16:50:37 2014 +0900 glamor: Fix use-after-free in glamor_destroy_textured_pixmap ==25551== Invalid read of size 8 ==25551== at 0x85D5F2C: glamor_egl_destroy_pixmap_image (glamor_egl.c:527) ==25551== by 0x85D7750: glamor_destroy_pixmap (glamor.c:235) ==25551== by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278) ==25551== by 0x5098F6: FreePicture (picture.c:1425) ==25551== by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257) ==25551== by 0x85D7B50: glamor_close_screen (glamor.c:586) ==25551== by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734) ==25551== by 0x4CFFC7: CursorCloseScreen (cursor.c:187) ==25551== by 0x513A44: AnimCurCloseScreen (animcur.c:106) ==25551== by 0x51529B: present_close_screen (present_screen.c:64) ==25551== by 0x43CA83: dix_main (main.c:351) ==25551== by 0x6CFAB44: (below main) (libc-start.c:287) ==25551== Address 0x83dafa0 is 96 bytes inside a block of size 152 free'd ==25551== at 0x4C29E90: free (vg_replace_malloc.c:473) ==25551== by 0x85D76B4: glamor_destroy_textured_pixmap (glamor.c:225) ==25551== by 0x85D7750: glamor_destroy_pixmap (glamor.c:235) ==25551== by 0xC1BDD9B: radeon_glamor_destroy_pixmap (radeon_glamor.c:278) ==25551== by 0x5098F6: FreePicture (picture.c:1425) ==25551== by 0x85DD7A9: glamor_unrealize_glyph_caches (glamor_glyphs.c:257) ==25551== by 0x85D7B50: glamor_close_screen (glamor.c:586) ==25551== by 0x4B1A82: xf86CrtcCloseScreen (xf86Crtc.c:734) ==25551== by 0x4CFFC7: CursorCloseScreen (cursor.c:187) ==25551== by 0x513A44: AnimCurCloseScreen (animcur.c:106) ==25551== by 0x51529B: present_close_screen (present_screen.c:64) ==25551== by 0x43CA83: dix_main (main.c:351) Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 913416b718e73e7416c2128a82d2e5e5cd962d28 Author: Alan Coopersmith Date: Tue Dec 9 10:15:08 2014 -0800 Solaris: delete undocumented, unuseful -protect0 flag Solaris already makes the page at address 0 inaccessible by default to catch NULL pointer bugs, we don't need a double secret undocumented flag to try to make our own hacky attempt at it. As a bonus, deleting this code removes gcc warning of: sun_init.c: In function 'xf86OpenConsole': sun_init.c:103:17: warning: declaration of 'fd' shadows a previous local [-Wshadow] int fd = -1; ^ sun_init.c:89:9: warning: shadowed declaration is here [-Wshadow] int fd; ^ Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 7b784df51bd6be38238d7101b1f5e320eb4aa5b8 Author: Kenneth Graunke Date: Tue Dec 9 12:43:57 2014 -0800 modesetting: Use GBM for buffer allocations if Glamor supports it. For performance, Glamor wants to render to tiled buffers, not linear ones. Using GBM allows us to pick the 3D driver's preferred tiling modes. v2: Declare drmmode->gbm as void * if !GLAMOR_HAS_GBM. v3: Just use a forward declaration of struct gbm_device. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit cfef64b0cabe7677c7584a72d7432c20343d9361 Author: Dave Airlie Date: Tue Dec 9 12:28:38 2014 -0800 glamor: Add an accessor for the GBM device. (Originally written by Dave Airlie; split into a separate patch by Kenneth Graunke.) Signed-off-by: Dave Airlie Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 980535757d38db5c812c8afa32726d8cc36abfa4 Author: Kenneth Graunke Date: Tue Dec 9 15:20:44 2014 -0800 modesetting: Create a drmmode_bo wrapper; use it for front_bo. This code is going to be extended to support GBM BOs soon. This small abstraction removes a lot of direct dumb_bo access, so we can add that support in one place, rather than putting conditionals at every pitch/handle/etc access. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit c6388964b079b3828c0b64951ff03008dda8f44a Author: Kenneth Graunke Date: Tue Dec 9 11:26:39 2014 -0800 modesetting: Drop dumb_bo::map_count field and dead unmap code. The drm kernel API for dumb BOs apparently doesn't include an unmap ioctl, so we can't do much here. It looks like this code was copied from libkms, which was also unfinished. We may as well delete the dead variable that simply gets incremented and never read. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 87cc0c0d317c5eac4fcf9bf4a7ad36454c05f6b8 Author: Kenneth Graunke Date: Tue Dec 9 11:17:30 2014 -0800 modesetting: Move dumb_bo into its own source files. Eventually, drmmode_display will be able to use GBM for handling buffers, and won't need dumb_bo. Keeping the display related logic and buffer object abstraction in separate files seems a bit tidier. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit af4f94b08eb8e5961799a8a74a06449fd3fe8ad9 Author: Kenneth Graunke Date: Tue Dec 9 15:18:39 2014 -0800 modesetting: Create helper for glamor_egl_create_textured_screen call. This will need to change when we add GBM support; by pulling it into a helper function, we should only have to edit one place. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit b4324c6a2382dc96295bdb061316f699e4ffabb9 Author: Kenneth Graunke Date: Tue Dec 9 14:38:39 2014 -0800 modesetting: Move ModifyPixmapHeader calls out of if/else branches. Both branches called ModifyPixmapHeader with essentially the same parameters. By using new_pixels in the shadowfb case, we can make them completely the same, and move them out a level, for simplicity. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 35e9924484ec7bafb749c88ed7f78e6a71f8dfb3 Author: Kenneth Graunke Date: Tue Dec 9 13:01:09 2014 -0800 modesetting: Stop using glamor_egl_create_textured_screen_ext(). The _ext variant takes an additional pointer argument, which it now ignores, thanks to Keith's recent patches. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard commit 91651e7c15892aa846fc406fbb13b37f094dd3f0 Author: Michel Dänzer Date: Wed Dec 10 16:21:44 2014 +0900 glamor: Reinstate glamor_(egl_)destroy_textured_pixmap They are part of the ABI. Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e774663fa5209ff469d920821934bb1f5964a72f Author: Michele Baldessari Date: Wed Dec 3 11:30:29 2014 -0500 ephyr: Implement per-screen colormaps Xephyr's pseudocolor emulation added in: commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts only tracks one global colormap for the whole (Xephyr) display. Move this to per-screen state so each screen's colormap can be correct. [ajax: rebased to 1.17, cleaned up commit message] Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Michele Baldessari commit cadd70c809232c9a6601fb8baab665a7ab10045d Author: Adam Jackson Date: Tue Dec 2 14:52:35 2014 -0500 glx: Add hack for GLX-1.2-style naked windows to GetDrawableAttributes Some people like to call this on bare Window XIDs and expect reasonable results. I sure wish they wouldn't, but since they do, if we're given a window without any glx decoration just fill in as much as we can. This means you won't actually get an answer for GLX_FBCONFIG_ID and friends, but there's not much to be done about that, and it matches what NVIDIA's driver seems to do. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54080 Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f452b4a47b3bebf883e84df804e8d54830ccfe83 Author: Adam Jackson Date: Tue Dec 2 14:47:45 2014 -0500 glx: Dynamically compute attribute slot in GetDrawableAttributes No functional change. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c1455f76c6b1aa4ecaacb2221a687244285aa44b Author: Neil Roberts Date: Mon Dec 1 16:06:17 2014 -0500 glx: Add implementation of __GLXContext->loseCurrent for direct ctxts This adds a dummy implementation for the loseCurrent function in __GLXContext for direct contexts which just returns GL_TRUE. Without this then the X server can crash if receives a MakeCurrent message for a direct context because it will attempt to call loseCurrent when cleaning up the client in the callback for ClientStateGone. [ajax: added assumed s-o-b line] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86531 Reviewed-by: Adam Jackson Signed-off-by: Neil Roberts Signed-off-by: Keith Packard commit 6704bb0ed7a10dabe8ef3bb3adf8b8a7f29a78f0 Merge: 8aa23f27c 1559a9439 Author: Keith Packard Date: Tue Dec 9 11:47:11 2014 -0800 Merge remote-tracking branch 'alanc/master' commit 1559a94395258fd73e369f1a2c98a44bfe21a486 Author: Keith Packard Date: Tue Dec 9 09:31:00 2014 -0800 dix: GetHosts bounds check using wrong pointer value [CVE-2014-8092 pt. 6] GetHosts saves the pointer to allocated memory in *data, and then wants to bounds-check writes to that region, but was mistakenly using a bare 'data' instead of '*data'. Also, data is declared as void **, so we need a cast to turn it into a byte pointer so we can actually do pointer comparisons. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 9802a0162f738de03585ca3f3b8a8266494f7d45 Author: Keith Packard Date: Tue Dec 9 09:30:59 2014 -0800 Missing parens in REQUEST_FIXED_SIZE macro [CVE-2014-8092 pt. 5] The 'n' parameter must be surrounded by parens in both places to prevent precedence from mis-computing things. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 61b17c0f10307e25e51e30e6fb1d3e3127f82d86 Author: Keith Packard Date: Tue Dec 9 09:30:58 2014 -0800 glx: Can't mix declarations and code in X.org sources [CVE-2014-8098 pt. 9] We're using compiler compatibility settings which generate warnings when a variable is declared after the first statement. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit b20912c3d45cbbde3c443e6c3d9e189092fe65e1 Author: Keith Packard Date: Tue Dec 9 09:30:57 2014 -0800 dbe: Call to DDX SwapBuffers requires address of int, not unsigned int [CVE-2014-8097 pt. 2] When the local types used to walk the DBE request were changed, this changed the type of the parameter passed to the DDX SwapBuffers API, but there wasn't a matching change in the API definition. At this point, with the API frozen, I just stuck a new variable in with the correct type. Because we've already bounds-checked nStuff to be smaller than UINT32_MAX / sizeof(DbeSwapInfoRec), we know it will fit in a signed int without overflow. Signed-off-by: Keith Packard Signed-off-by: Alan Coopersmith commit 8aa23f27c7e29c62d23867440b0bb00fc288b5ba Author: Keith Packard Date: Mon Dec 8 12:59:31 2014 -0800 glamor: Free existing EGL image when assigning new one When reallocating the framebuffer on screen resize, the old EGL image was getting leaked. Check for an existing EGL image and free it in this case. Signed-off-by: Keith Packard Revewied-by: Zhigang Gong commit c22433d55ea16e4879b092ee28d284fc895c9956 Author: Keith Packard Date: Fri Dec 5 11:02:11 2014 -0800 glamor: Remove redundant reference to screen pixmap EGL image There's no reason to store this in the egl screen private as the screen pixmap will always hold a reference to it anyways. Signed-off-by: Keith Packard Revewied-by: Zhigang Gong commit 5064ffab631dcbc4265079fb32a02d3e2f1c4cd8 Author: Keith Packard Date: Fri Dec 5 10:58:28 2014 -0800 glamor: Always destroy EGL image associated with destroyed pixmap There were three paths that called eglDestroyImageKHR: * The front buffer * The intel driver's flip buffer * pixmaps under DRI3 This patch unifies the second two by having glamor_destroy_pixmap always destroy any associaged EGL image. This allows us to stop storing the back_pixmap pointer in glamor as that was only used to make sure that buffer was freed at server reset time. v2: check for valid pixmap_priv before using it in glamor_egl_destroy_pixmap_image Signed-off-by: Keith Packard Reviewed-by: Zhigang Gong commit 7e7630bbb775573eea2a2335adb9d190c3e1e971 Author: Robert Morell Date: Wed Nov 12 18:51:43 2014 -0800 glx: Fix mask truncation in __glXGetAnswerBuffer [CVE-2014-8093 6/6] On a system where sizeof(unsigned) != sizeof(intptr_t), the unary bitwise not operation will result in a mask that clears all high bits from temp_buf in the expression: temp_buf = (temp_buf + mask) & ~mask; Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit e883c170c15493ab3637c0a01890f5a7ca4e16a5 Author: Adam Jackson Date: Mon Nov 10 12:13:48 2014 -0500 glx: Pass remaining request length into ->varsize (v2) [CVE-2014-8098 8/8] v2: Handle more multiplies in indirect_reqsize.c (Julien Cristau) Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 984583a497c813df5827ae22483133e704fee79c Author: Adam Jackson Date: Mon Nov 10 12:13:47 2014 -0500 glx: Length checking for non-generated single requests (v2) [CVE-2014-8098 7/8] v2: Fix single versus vendor-private length checking for ARB_imaging subset extensions. (Julien Cristau) v3: Fix single versus vendor-private length checking for ARB_imaging subset extensions. (Julien Cristau) Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Julien Cristau Signed-off-by: Alan Coopersmith commit 44ba149f28ece93c2fbfc9cc980588de5322dd4b Author: Adam Jackson Date: Mon Nov 10 12:13:46 2014 -0500 glx: Length-checking for non-generated vendor private requests [CVE-2014-8098 6/8] Reviewed-by: Keith Packard Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit afe177020d1fb776c6163f21eddc82cb185b95ca Author: Adam Jackson Date: Mon Nov 10 12:13:45 2014 -0500 glx: Request length checks for SetClientInfoARB [CVE-2014-8098 5/8] Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit c91e4abc3b892f42802efa20fef7ada442c2d3f5 Author: Adam Jackson Date: Mon Nov 10 12:13:44 2014 -0500 glx: Top-level length checking for swapped VendorPrivate requests [CVE-2014-8098 4/8] Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit a33a939e6abb255b14d8dbc85fcbd2c55b958bae Author: Adam Jackson Date: Mon Nov 10 12:13:43 2014 -0500 glx: Length checking for RenderLarge requests (v2) [CVE-2014-8098 3/8] This is a half-measure until we start passing request length into the varsize function, but it's better than the nothing we had before. v2: Verify that there's at least a large render header's worth of dataBytes (Julien Cristau) Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 698888e6671d54c7ae41e9d456f7f5483a3459d2 Author: Adam Jackson Date: Mon Nov 10 12:13:42 2014 -0500 glx: Integer overflow protection for non-generated render requests (v3) [CVE-2014-8093 5/6] v2: Fix constants in __glXMap2fReqSize (Michal Srb) Validate w/h/d for proxy targets too (Keith Packard) v3: Fix Map[12]Size to correctly reject order == 0 (Julien Cristau) Reviewed-by: Keith Packard Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit be09e0c988ffdb0371293af49fb4ea8f49ed324a Author: Julien Cristau Date: Mon Nov 10 12:13:41 2014 -0500 glx: Length checking for GLXRender requests (v2) [CVE-2014-8098 2/8] v2: Remove can't-happen comparison for cmdlen < 0 (Michal Srb) Reviewed-by: Adam Jackson Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Julien Cristau Signed-off-by: Alan Coopersmith commit 2a5cbc17fc72185bf0fa06fef26d1f782de72595 Author: Adam Jackson Date: Mon Nov 10 12:13:40 2014 -0500 glx: Add safe_{add,mul,pad} (v3) [CVE-2014-8093 4/6] These are paranoid about integer overflow, and will return -1 if their operation would overflow a (signed) integer or if either argument is negative. Note that RenderLarge requests are sized with a uint32_t so in principle this could be sketchy there, but dix limits bigreqs to 128M so you shouldn't ever notice, and honestly if you're sending more than 2G of rendering commands you're already doing something very wrong. v2: Use INT_MAX for consistency with the rest of the server (jcristau) v3: Reject negative arguments (anholt) Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 13d36923e0ddb077f4854e354c3d5c80590b5d9d Author: Adam Jackson Date: Mon Nov 10 12:13:39 2014 -0500 glx: Fix image size computation for EXT_texture_integer [CVE-2014-8098 1/8] Without this we'd reject the request with BadLength. Note that some old versions of Mesa had a bug in the same place, and would _send_ zero bytes of image data; these will now be rejected, correctly. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 717a1b37767b41e14859e5022ae9e679152821a9 Author: Adam Jackson Date: Mon Nov 10 12:13:38 2014 -0500 glx: Additional paranoia in __glXGetAnswerBuffer / __GLX_GET_ANSWER_BUFFER (v2) [CVE-2014-8093 3/6] If the computed reply size is negative, something went wrong, treat it as an error. v2: Be more careful about size_t being unsigned (Matthieu Herrb) v3: SIZE_MAX not SIZE_T_MAX (Alan Coopersmith) Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit ab2ba9338aa5e85b4487bc7fbe69985c76483e01 Author: Adam Jackson Date: Mon Nov 10 12:13:37 2014 -0500 glx: Be more strict about rejecting invalid image sizes [CVE-2014-8093 2/6] Before this we'd just clamp the image size to 0, which was just hideously stupid; if the parameters were such that they'd overflow an integer, you'd allocate a small buffer, then pass huge values into (say) ReadPixels, and now you're scribbling over arbitrary server memory. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit 23fe7718bb171e71db2d1a30505c2ca2988799d9 Author: Adam Jackson Date: Mon Nov 10 12:13:36 2014 -0500 glx: Be more paranoid about variable-length requests [CVE-2014-8093 1/6] If the size computation routine returns -1 we should just reject the request outright. Clamping it to zero could give an attacker the opportunity to also mangle cmdlen in such a way that the subsequent length check passes, and the request would get executed, thus passing data we wanted to reject to the renderer. Reviewed-by: Keith Packard Reviewed-by: Julien Cristau Reviewed-by: Michal Srb Reviewed-by: Andy Ritger Signed-off-by: Adam Jackson Signed-off-by: Alan Coopersmith commit f4afd53f2aeaddf509bf9f71d1716dd273fd6e14 Author: Alan Coopersmith Date: Sun Feb 9 22:42:47 2014 -0800 Add REQUEST_FIXED_SIZE testcases to test/misc.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 2df83bb122debc3c20cfc3d3b0edc85cd0270f79 Author: Alan Coopersmith Date: Sun Feb 9 21:28:05 2014 -0800 Add request length checking test cases for some Xinput 2.x requests Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit d153a85f7478a7a67ccb02fbca6390b0ab1732ee Author: Alan Coopersmith Date: Sun Feb 9 21:27:27 2014 -0800 Add request length checking test cases for some Xinput 1.x requests Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit a0ece23a8bd300c8be10812d368dc8058c97c63e Author: Alan Coopersmith Date: Sun Jan 26 20:02:20 2014 -0800 xfixes: unvalidated length in SProcXFixesSelectSelectionInput [CVE-2014-8102] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 5d3a788aeb2fbd3ca2812747dc18c94a8b981c63 Author: Alan Coopersmith Date: Sun Jan 26 19:51:29 2014 -0800 render: unvalidated lengths in Render extn. swapped procs [CVE-2014-8100 2/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit b5f9ef03df6a650571b29d3d1c1d2b67c6e84336 Author: Julien Cristau Date: Tue Oct 28 10:30:04 2014 +0100 render: check request size before reading it [CVE-2014-8100 1/2] Otherwise we may be reading outside of the client request. Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 3df2fcf12499ebdb26b9b67419ea485a42041f33 Author: Alan Coopersmith Date: Sun Jan 26 19:38:09 2014 -0800 randr: unvalidated lengths in RandR extension swapped procs [CVE-2014-8101] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit d155b7a8e38e74aee96bf52c20c8b6a330d7d462 Author: Alan Coopersmith Date: Sun Jan 26 19:33:34 2014 -0800 present: unvalidated lengths in Present extension procs [CVE-2014-8103 2/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit 0a6085aaf3581cca558d960ea176ddf3a41a2213 Author: Alan Coopersmith Date: Sun Jan 26 19:28:05 2014 -0800 dri3: unvalidated lengths in DRI3 extension swapped procs [CVE-2014-8103 1/2] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 32a95fb7c7dbe22c9441c62762dfa4a8ec54d6c3 Author: Alan Coopersmith Date: Sun Jan 26 19:23:17 2014 -0800 Xv: unvalidated lengths in XVideo extension swapped procs [CVE-2014-8099] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 7553082b9b883b5f130044f3d53bce2f0b660e52 Author: Alan Coopersmith Date: Sun Jan 26 17:18:54 2014 -0800 xcmisc: unvalidated length in SProcXCMiscGetXIDList() [CVE-2014-8096] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 73c63afb93c0af1bfd1969bf6e71c9edca586c77 Author: Alan Coopersmith Date: Sun Jan 26 10:54:41 2014 -0800 Xi: unvalidated lengths in Xinput extension [CVE-2014-8095] Multiple functions in the Xinput extension handling of requests from clients failed to check that the length of the request sent by the client was large enough to perform all the required operations and thus could read or write to memory outside the bounds of the request buffer. This commit includes the creation of a new REQUEST_AT_LEAST_EXTRA_SIZE macro in include/dix.h for the common case of needing to ensure a request is large enough to include both the request itself and a minimum amount of extra data following the request header. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 2ef42519c41e793579c9cea699c866fee3d9321f Author: Alan Coopersmith Date: Wed Jan 22 23:12:04 2014 -0800 dbe: unvalidated lengths in DbeSwapBuffers calls [CVE-2014-8097] ProcDbeSwapBuffers() has a 32bit (n) length value that it uses to read from a buffer. The length is never validated, which can lead to out of bound reads, and possibly returning the data read from out of bounds to the misbehaving client via an X Error packet. SProcDbeSwapBuffers() swaps data (for correct endianness) before handing it off to the real proc. While doing the swapping, the length field is not validated, which can cause memory corruption. v2: reorder checks to avoid compilers optimizing out checks for overflow that happen after we'd already have done the overflowing multiplications. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 6692670fde081bbfe9313f17d84037ae9116702a Author: Alan Coopersmith Date: Wed Jan 22 23:40:18 2014 -0800 dri2: integer overflow in ProcDRI2GetBuffers() [CVE-2014-8094] ProcDRI2GetBuffers() tries to validate a length field (count). There is an integer overflow in the validation. This can cause out of bound reads and memory corruption later on. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit e0e11644622a589129a01e11e5d105dc74a098de Author: Alan Coopersmith Date: Wed Jan 22 23:44:46 2014 -0800 dix: integer overflow in REQUEST_FIXED_SIZE() [CVE-2014-8092 4/4] Force use of 64-bit integers when evaluating data provided by clients in 32-bit fields which can overflow when added or multiplied during checks. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 97015a07b9e15d8ec5608b95d95ec0eb51202acb Author: Alan Coopersmith Date: Wed Jan 22 22:37:15 2014 -0800 dix: integer overflow in RegionSizeof() [CVE-2014-8092 3/4] RegionSizeof contains several integer overflows if a large length value is passed in. Once we fix it to return 0 on overflow, we also have to fix the callers to handle this error condition v2: Fixed limit calculation in RegionSizeof as pointed out by jcristau. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Julien Cristau commit bc8e20430b6f6378daf6ce4329029248a88af08b Author: Alan Coopersmith Date: Mon Jan 6 23:30:14 2014 -0800 dix: integer overflow in GetHosts() [CVE-2014-8092 2/4] GetHosts() iterates over all the hosts it has in memory, and copies them to a buffer. The buffer length is calculated by iterating over all the hosts and adding up all of their combined length. There is a potential integer overflow, if there are lots and lots of hosts (with a combined length of > ~4 gig). This should be possible by repeatedly calling ProcChangeHosts() on 64bit machines with enough memory. This patch caps the list at 1mb, because multi-megabyte hostname lists for X access control are insane. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit eeae42d60bf3d5663ea088581f6c28a82cd17829 Author: Alan Coopersmith Date: Wed Jan 22 21:11:16 2014 -0800 dix: integer overflow in ProcPutImage() [CVE-2014-8092 1/4] ProcPutImage() calculates a length field from a width, left pad and depth specified by the client (if the specified format is XYPixmap). The calculations for the total amount of memory the server needs for the pixmap can overflow a 32-bit number, causing out-of-bounds memory writes on 32-bit systems (since the length is stored in a long int variable). Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 90cc925c5991fcb203f72d00b04419cd754a9b2c Author: Alan Coopersmith Date: Fri Jan 17 18:54:03 2014 -0800 unchecked malloc may allow unauthed client to crash Xserver [CVE-2014-8091] authdes_ezdecode() calls malloc() using a length provided by the connection handshake sent by a newly connected client in order to authenticate to the server, so should be treated as untrusted. It didn't check if malloc() failed before writing to the newly allocated buffer, so could lead to a server crash if the server fails to allocate memory (up to UINT16_MAX bytes, since the len field is a CARD16 in the X protocol). Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 3e7218a6c23354d66f508b18164cac98a346b3ee Merge: 6f4c398a0 bc71081f0 Author: Keith Packard Date: Mon Dec 8 18:07:55 2014 -0800 Merge remote-tracking branch 'jturney/indirect-glx-fixes' commit 6f4c398a0e632b0c92e3cb8ee03ca7f5b5cc018e Merge: aae646069 5920433c3 Author: Keith Packard Date: Mon Dec 8 18:04:08 2014 -0800 Merge remote-tracking branch 'jturney/master' commit aae6460694ac3667abb8c34fdf3a7dae524827a4 Author: Mario Kleiner Date: Sat Dec 6 05:40:08 2014 +0100 present: Fix use of vsynced pageflips and honor PresentOptionAsync. (v4) Pageflips for Pixmap presents were not synchronized to vblank on drivers with support for PresentCapabilityAsync, due to some missing init for vblank->sync_flips. The PresentOptionAsync flag was completely ignored for pageflipped presents. Vsynced flips only worked by accident on the intel-ddx, as that driver doesn't have PresentCapabilityAsync support. On nouveau-ddx, which supports PresentCapabilityAsync, this always caused non-vsynced pageflips with pretty ugly tearing. This patch fixes the problem, as tested on top of XOrg 1.16.2 on nouveau and intel. v4: Add additional PresentCapabilityAsync caps check, as suggested by Eric Anholt. Please also apply to XOrg 1.17 and XOrg 1.16.2 stable. Applying on top of XOrg 1.16.2 requires cherry-picking commit 2051514652481a83bd7cf22e57cb0fcd40333f33 which trivially fixes lack of support for protocol option PresentOptionCopy - get two bug fixes for the price of one! Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 32d3100bd78efe41d468f7d66861296aee468b6f Author: Mario Kleiner Date: Sat Dec 6 05:40:07 2014 +0100 present: Avoid crashes in DebugPresent(), a bit more info. DebugPresent() crashed the server when a dri3 drawable was closed while a pageflipped present was still pending, due to vblank->window-> Null-Ptr deref, so debug builds caused new problems to debug. E.g., glXSwapBuffers(...); glXDestroyWindow(...); -> Pageflip for non-existent window completes -> boom. Also often happens when switching desktop compositor on/off due to Present unflips, or when logging out of session. Also add info if a Present is queued for copyswap or pageflip, if the present is vsynced, and the serial no of the Present request, to aid debugging of pageflip and vsync issues. The serial number is useful as Mesa's dri3/present backend encodes its sendSBC in the serial number, so one can easily correlate server debug output with Mesa and with the SBC values returned to actual OpenGL client applications via OML_sync_control and INTEL_swap_events extension, makes debugging quite a bit more easy. Please also cherry-pick this for a 1.16.x stable update. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 32ca85c9e075e40b8a4712a79a51702facba0332 Author: Daniel Martin Date: Fri Nov 28 11:20:50 2014 +0100 modesetting: Remove unused params from drmmode_output_init() drmmode_output_init() doesn't touch (the int*) num_dvi and num_hdmi. Remove both parameters. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit c0ea476b9bb91f03061b891ffb897c438fa03879 Author: Daniel Martin Date: Fri Nov 28 11:20:49 2014 +0100 modesetting: Fix ifdefs s/HAVE_UDEV/CONFIG_UDEV_KMS/ We don't define HAVE_UDEV, that's a remnant from xf86-video-modesetting. But, we have CONFIG_UDEV_KMS. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 8a16620dcd7a22fd9b38876ffc711629c4fbda0a Author: Daniel Martin Date: Fri Nov 28 11:20:48 2014 +0100 modesetting: Create new EGL screen in drmmode_xf86crtc_resize If we don't glamor_egl_create_textured_screen_ext() in drmmode_xf86crtc_resize() we end up with a black screen and no client window(s) visible. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 0d63fa5850fe9d8b045b8f1a83e72b75f9065a7a Author: Daniel Martin Date: Fri Nov 28 11:20:47 2014 +0100 modesetting: Move Bool glamor into drmmode struct Move the boolean glamor from struct modesetting into struct drmmode for later re-use in drmmode_display. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 62a4eeaa25099872682d6c2f9f13a0e73fc5ce1e Author: Daniel Martin Date: Fri Nov 28 11:20:46 2014 +0100 config/udev: Prefix and shift "removing GPU" message The message "removing GPU device ..." appeared even if the removal was skipped (when path == NULL). Move it below the path check and make it a LogMessage with config/udev prefix. Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit bc71081f0e3d8ce3aecf2cb168431dbc9fe6a87b Author: Jon TURNEY Date: Fri Apr 18 12:17:06 2014 +0100 glx: Fix crash when a client exits without deleting GL contexts With the previous patches applied, we now have crash due to use-after-free when a client exits without deleting all it's GL contexts On client exit, CloseDownClient first calls glxClientCallback() with ClientStateGone, which calls __glXFreeContext() directly. Subsequently CloseDownClient() frees all the clients resources, which leads to ContextGone() being called for a context resource where the context has already been freed. Fix this by modifiying glxClientCallback() to free the context resource. Also make __glXFreeContext() static, as calling it directly leads to this problem, instead the context resource should be released. With the previous patches applied, this can be demonstrated with e.g. glxinfo, which doesn't delete it's context before exit. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 5c606c0a89e74fa223a99864be11cc3be60a159b Author: Jon TURNEY Date: Fri Apr 18 12:17:05 2014 +0100 glx: Flush context which is being made non-current due to drawable going away Some sequences of glean tests fail with GLXBadCurrentWindow when using indirect rendering, e.g. glean -t 'fpexceptions getString'. Flush a context which is being made non-current due to the drawable on which is it is current going away. Waiting until another context is made current is too late, as the drawable no longer exists. v2: Rewrite for direct GL dispatch v3: Inline FlushContext(), doesn't need to be a separate function e.g. LIBGL_ALWAYS_INDIRECT=1 ./glean -r results -o --quick -t "fpexceptions getString" fails with a BadContextTag error. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 437b27494f127854d75e59b4e2aac264e9f913e9 Author: Jon TURNEY Date: Fri Apr 18 12:17:04 2014 +0100 Revert "glx: Simplify glXDestroyContext" This reverts commit 7f5adf73a0f9a951a6df201532b4031d38054369. This seems to miss the whole point of the idExists flag, as it makes the lifetime of that being true the same as the lifetime of the Context resource. The previously current context tag is always given in a MakeContextCurrent request, even if that context tag is no longer valid (for example, the context has been deleted), so this leads to BadContextTag errors. See fd.o bug #30089 for the makecurrenttest.c testcase, and some discussion of previous manifestations of this bug. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 4b0d0df34f10a88c10cb23dd50087b59f5c4fece Author: Peter Harris Date: Mon Nov 17 14:31:24 2014 -0500 Fix overflow of ConnectionOutput->size and ->count When (long) is larger than (int), and when realloc succeeds with sizes larger than INT_MAX, ConnectionOutput->size and ConnectionOutput->count overflow and become negative. When ConnectionOutput->count is negative, InsertIOV does not actually insert an IOV, and FlushClient goes into an infinite loop of writev(fd, iov, 0) [an empty list]. Avoid this situation by killing the client when it has more than INT_MAX unread bytes of data. Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 802932d112a3f6a09420be9e4a13fa78ac43840b Author: Adam Jackson Date: Mon Nov 17 15:28:58 2014 -0500 render: fix ChangePicture when Xinerama is active (v2) (#49170) ChangePicture takes wire XIDs, but didn't do any Xinerama translation, which meant setting a clip pixmap or a separate alpha picture would result in those elements pointing at the instance of the pixmap on screen 0. Which is, you know, bad. v2: This one actually builds. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49170 Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c2994001680a7dcf9c167886d49b7326c97cd5d1 Author: Aaron Plattner Date: Fri Nov 21 08:39:02 2014 -0800 os: "Server terminated successfully" is not an error ErrorFSigSafe calls LogVMessageVerbSigSafe with the message type set to X_ERROR. That generates this in the log: (EE) Server terminated successfully (0). Closing log file. People periodically report this as an error, sometimes quoting this "error" rather than an earlier error that actually caused a problem. v2: Use X_INFO instead of X_NOTICE Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit b09d59342804db7dbb8056dca43dd39f54e290aa Author: Alan Coopersmith Date: Wed Nov 26 13:01:29 2014 -0800 Add -iglx & +iglx to Xserver.man Covers the current state after commits 99f0365b1fbdfd9238b9f, d0da0e9c3bb8fe0cd4879, & e3aa13b8d63ea2fba6eb4 were all applied. Signed-off-by: Alan Coopersmith Reviewed-by: James Jones Reviewed-by: Robert Morell Signed-off-by: Keith Packard commit c52a2b1ebad56820af932dfbc871701a8b04fd9c Author: Adam Jackson Date: Tue Nov 11 12:30:07 2014 -0500 mi: Fix regression in arc drawing xts' XDrawArcs/15 regressed (turning into a server-side infinite loop) after: commit 7679afd4da8b86aed27e5916ba723116a3c8bb4a Author: Adam Jackson Date: Fri Sep 26 12:01:37 2014 -0400 mi: Fold mifpolycon.c into miarc.c The reason is miarc.c provided its own definitions (sigh) of min/max, that both accept int arguments and return an int. Since miFillSppPoly uses a double (sigh) and some min-involving math for its loop index variable, things do not go well. Since the integer versions of min/max are redundant, nuke 'em. Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Tested-by: Keith Packard Signed-off-by: Keith Packard commit ec0ac8970b508adcbc3d104b14a127118e4979d0 Merge: 65cc0982a 0f88d4e79 Author: Keith Packard Date: Mon Nov 24 15:39:51 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 65cc0982afb1d47d17e655efaef40d4a82e7574a Author: Keith Packard Date: Mon Oct 13 10:31:52 2014 -0700 glamor: Don't insert fbos from external objects into fbo cache Mark fbos created from external buffers so that when the associated pixmap is destroyed, they aren't put into the fbo cache for later re-use and are instead freed immediately. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 0f88d4e7937116dbc438f98ddf1f3d94cfc5bead Author: Peter Hutterer Date: Wed Nov 12 10:29:36 2014 +1000 mi: fix documentation for miPointerSetPosition Changed when we added barriers, documentation didn't get updated. Reported-by: Dave Airlie Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 6a117af7e7ef6eac796ff0680a915c866fce4019 Author: John Hunter Date: Mon Nov 3 15:45:38 2014 +0800 fix an annotation mistake Signed-off-by: John Hunter Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 732fd7e571b81d63aa44d6e4cf55883479e88f2f Author: Peter Hutterer Date: Fri Oct 31 09:45:12 2014 +1000 Drop trailing whitespaces sed -i "s/[ ]\+$//g" **/*.(c|h) happy reviewing... git diff -w is an empty diff. Signed-off-by: Peter Hutterer commit 96143d6dc35c98cb6b4e409dd89687e4ced3c1f0 Author: Peter Hutterer Date: Fri Oct 31 09:32:35 2014 +1000 dix: silence compiler warning comparing CARD32 to -1 window.c:3246:36: warning: comparison of constant -1 with expression of type 'CARD32' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] if (optional->backingBitPlanes != ~0L) ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~ Signed-off-by: Peter Hutterer Reviewed-by: Michel Dänzer commit 04ca16997994c7561ed8948b89fc1c922233da13 Author: Peter Hutterer Date: Fri Oct 31 09:29:33 2014 +1000 dix: silence compiler warning inpututils.c:243:26: warning: comparison of constant 256 with expression of type 'KeyCode' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] if (modkeymap[i] >= MAP_LENGTH) ~~~~~~~~~~~~ ^ ~~~~~~~~~~ MAP_LENGTH depends on MAX_BUTTONS which is somewhat arbitrarily chosen. We don't expect this to ever change, but just in case leave the condition there so the code is correct if we drop the number down. Signed-off-by: Peter Hutterer commit 79b9d33545034f2952ebc7e444c201693b45f44b Author: Peter Hutterer Date: Fri Oct 31 09:26:28 2014 +1000 xwayland: declare fatal log handler as noreturn xwayland.c:661:1: warning: function 'xwl_log_handler' could be declared with attribute 'noreturn' [-Wmissing-noreturn] Signed-off-by: Peter Hutterer commit adee4f239b5074d318dfc48beb0ec4e91973b449 Author: Peter Hutterer Date: Fri Oct 31 09:24:50 2014 +1000 xfree86: drop double-typedef of DBusConnection Just include dbus.h, it's been typedef'd there since 2003. Signed-off-by: Peter Hutterer commit 25315ee555dfeb96d9ed83064b1022ed852b612e Author: Peter Hutterer Date: Fri Oct 31 09:16:28 2014 +1000 Xext: fix clang compiler warning shm.c:1150:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((shmdesc->addr == ((char *) -1))) { Signed-off-by: Peter Hutterer commit 995ecfb51d4ab8197e4591d5c0957e08a0bd6a59 Author: Peter Hutterer Date: Thu Oct 30 09:00:21 2014 +1000 include: change RegionSize() to take a size_t /usr/include/xorg/regionstr.h:130:36: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))); ^ ~ Really only just pushes the problem to the caller, but maybe that motivates someone to fix it. Signed-off-by: Peter Hutterer commit 3ccec1b5ba6a26a30f82ba3aa9c5218dfa336869 Author: Peter Hutterer Date: Thu Oct 30 08:56:55 2014 +1000 include: fix documentation for list.h Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 5920433c3a30f5f1c0ba1ab39a0c2ff388df6b23 Author: Colin Harrison Date: Sat Sep 27 11:50:11 2014 +0100 hw/xwin: Don't allocate one wchar_t too much for unicode text placed on the Windows clipboard The count of wchar_t returned by MultiByteToWideChar() includes the terminating null character, so don't add one to it. Also, reduce the scope of various length variables Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d172cd630dae9c991b84b4c367a4caf8199266ac Author: Jon TURNEY Date: Mon Apr 28 12:48:15 2014 +0100 hw/xwin: Fix hang on shutdown when we own the clipboard. If we are the clipboard owner when we are shutdown, we recieve a WM_RENDERALLFORMATS, to render the clipboard, so it's contents will remain available to other applications. Unfortunately, this is far too late to do anything useful with, as the server is waiting for the clipboard thread to exit, and so can't process requests to convert clipboard contents. Change so we just do nothing on WM_RENDERALLFORMATS. (I'm not convinced that WM_RENDERALLFORMATS has ever worked usefully, in any case). (To make this work, I guess we would need to rearrange the way shutdown works completely: first synchronously stop the clipboard, then stop the X server) We also then receive a WM_DRAWCLIPBOARD, perhaps telling us that the available clipboard formats have changed (as ones which haven't been rendered are now removed), but the clipboard owner is now the system, not us, which we have to arrange to ignore. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 94d433c8cb64c9167050d02473176f888decf1d8 Author: Jon TURNEY Date: Fri Feb 21 23:20:00 2014 +0000 hw/xwin: Fix clipboard thread restart It seems that the clipboard thread restart mechanism has been broken for a while, which can be demonstrated using XDMCP with KDM (e.g. to a Kubutunu 12.04 host) KDM kills all attached clients, including the clipboard integration client, which restarts, but then exits on WM_QUIT. Using PostQuitMessage() in WM_DESTROY is unhelpful, as we may not actually be quitting the thread, if we just destroyed the window because the clipboard thread is about to retry, because he WM_QUIT message sticks around, and is noticed the next time we look at the window message queue and confuses us into thinking we need to quit. Sending a WM_DESTROY is apparently never correct anyhow, see [1] So: 1/ Use DestroyWindow() to destroy the clipboard messaging window when cleaning up for retry or exit in winClipboardProc (the clipboard thread main proc) 2/ Send a special WM_WM_QUIT message in winClipboardWindowDestroy() from the X server thread when the X server is resetting. 3/ When processing that WM_WM_QUIT message in the clipboard thread, cause the clipboard window to PostQuitMessage(), which causes the clipboard thread to exit. [1] http://blogs.msdn.com/b/oldnewthing/archive/2011/09/26/10216420.aspx Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b4a08e642b977b4bbc892ff1d96ecc0cf6e2ca54 Author: Jon TURNEY Date: Thu Nov 21 15:18:48 2013 +0000 hw/xwin: Improve reliability of clipboard X->Windows pastes Sometimes, particularly with large clipboard pastes to Windows, we could end up waiting for the timeout to expire, rather than pasting the data. Various changes to improve reliability: 1. Use XFlush() not XSync() in winProcessXEventsTimeout(). It makes no sense to ensure we have received replies to outstanding requests if we are going to wait for them using select() 2. Add XFlush() to winClipboardProc() Make sure we have sent any requests before we wait using select() 3. Don't use FD_ISSET() to check which fd is ready This looks like a Cygwin select() bug in that it sometimes returns 0 with an empty fd set before the timeout expires, but a fd appears to be ready. Add select() return value to debug output when we are warning that this has happened. 4. Drain event queues before entering select() Unconditionally drain event queues before entering select(). This seems to be the recommended way of writing select() and X event processing loops. winClipboardFlushXEvents() checks using XPending(), and winClipboardFlushWindowsMessageQueue() checks using PeekMessage() so this is safe against blocking, but means that may not need to enter select() at all sometimes. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c03f9e23c2b75af410b2fc76ca3f1aa9e979dcc4 Author: Jon TURNEY Date: Tue Sep 24 15:09:22 2013 +0100 hw/xwin: Add controls for enabling/disabling monitoring of PRIMARY selection xwinclip: Add -noprimary option Xwin: Add -primary and -noprimary options and tray-menu control v2: Use Bool type for fPrimarySelection Add -noprimary to usage message Fix indentation in hw/xwin/winwndproc.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 851b50419907276fdc781b6be2d42b38849bbd77 Author: Jon TURNEY Date: Tue Sep 24 16:02:37 2013 +0100 hw/xwin: Retrieve TARGETS to avoid unnecessary failing conversion attempts See http://cygwin.com/ml/cygwin-xfree/2013-07/msg00016.html It looks like the change in a9aca218f557c723e637287272819a7c17174e1e had some unforseen consequences. If the X11 selection contents are not convertable to COMPOUND_TEXT, UTF8_STRING or STRING format (for example, if it is an image), after those conversion attempts have failed, we sit in winProcessXEventsTimeout() until the timeout expires. It also seems that maybe gnuplot doesn't respond correctly to this sequence of conversion requests and doesn't reply to some of them, which also causes us to sit in winProcessXEventsTimeout() until the timeout expires. The Windows application which has requested the clipboard contents via GetClipboardContents() is blocked until we return from WM_RENDERFORMAT, so sitting waiting for this timeout to expire should be avoided. So instead, explicitly request conversion to the TARGETS target, choose the most preferred format, and request conversion to that. Also: if there is no owned selection, there is nothing to paste, so don't bother trying to convert it. v2: Fix compilation with -Werror=declaration-after-statement Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4db1241037e3fe8f0a46888377b8fef40bae9065 Author: Jon TURNEY Date: Tue Sep 24 13:30:32 2013 +0100 hw/xwin: In SelectionNotify, don't pointlessly retrieve just the size of the property Don't pointlessly retrieve just the size of the property, if we are then going to assume we can retrieve the whole property in one request anyhow... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c5ad92077e7eb32590fafa92d697cc4173f7e57b Author: Jon TURNEY Date: Tue Sep 24 12:23:42 2013 +0100 hw/xwin: In SelectionNotify, delete the property containing returned data after we have retrieved it Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ff018d88b9f0fe23ba96c81b53d58532baf4df42 Author: Jon TURNEY Date: Thu Oct 2 14:10:50 2014 +0100 hw/xwin: Remove some redundant clipboard externs, now defined in winglobals.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 63bb5c5ef16edf652179770294dcca4fc07dc992 Author: Thierry Reding Date: Wed Oct 29 16:59:27 2014 +0100 xv: Add missing gcstruct.h include Commit ea3f3b0786d5 (xv: Move xf86 XV color key helper to core.) added code that uses internals of struct _GC. This structure is defined in the include/gcstruct.h header which wasn't included by the source file, only gc.h was. That caused the following build failure: CC xvmain.lo Xext/xvmain.c: In function 'XvFillColorKey': Xext/xvmain.c:1114:13: error: dereferencing pointer to incomplete type (*gc->ops->PolyFillRect) (pDraw, gc, nbox, rects); ^ Fix this by including the correct header file. Signed-off-by: Thierry Reding Tested-by: Keith Packard Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 882f2d10d99a04a96afc0ce0c8937e16bec3afb5 Author: Axel Davy Date: Wed Oct 29 13:31:42 2014 +0100 Fix present_notify to return right away when querying current or past msc. When the target msc is past or is the current one, we want to get immediate feedback. This patch fixes this behaviour. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 72a0754f4605493fd60471557422f88a97eb356a Author: Aaron Plattner Date: Wed Oct 29 19:19:18 2014 -0700 xfree86: Bump ABI versions (video: 19, extension: 9) Among other things, commit b851ca968b7cce6d1a6438c05d3d5c8832249704 added a NameWindowPixmap function pointer to ScreenRec, shifting some of the fields around. Signed-off-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b227d974569b4c315a72b85fe839c5f455396678 Author: Peter Hutterer Date: Thu Oct 30 08:54:11 2014 +1000 include: fix compiler warning about casting int to uint16_t /usr/include/xorg/misc.h:141:30: warning: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Wconversion] return ((x & 0xff) << 8) | ((x >> 8) & 0xff); ~~~~~~ ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~ Function sig is a uint16_t, so just force the cast. Signed-off-by: Peter Hutterer commit e9db7682028bb0464c211c1f7bb6983fcfb6f37b Author: Keith Packard Date: Tue Oct 28 21:32:24 2014 -0700 Update to version 1.16.99.901 1.17 RC1 Signed-off-by: Keith Packard commit 5ff74d68b0cce85e041251efdc76595eac3c89e4 Author: Keith Packard Date: Tue Oct 28 21:31:40 2014 -0700 xfree86: Include 'drivers' directory with distribution Even if we don't build it locally, make sure it gets included with the release. Signed-off-by: Keith Packard commit f36f16f0551aa091c1ff154875aebe3d29cf51e7 Author: Keith Packard Date: Tue Oct 28 21:30:23 2014 -0700 dri2: Distribute new pci_ids headers Create hw/xfree86/dri2/pci_ids/Makefile.am which includes all of the new pci id files in the tarballs. Build that from configure.ac, and run it from dri2/Makefile.am Signed-off-by: Keith Packard commit 65dd1ba7b3e00243a76ec691e566ef7c8dd94855 Author: Keith Packard Date: Wed Oct 22 14:48:10 2014 -0700 dix: Untwist transformAbsolute logic, eliminate uninitialized value warnings tranformAbsolute has a pretty simple job, that of running the X/Y values from a device through the transformation matrix. The tricky bit comes when the current device state doesn't include one of the values. In that case, the last delivered value is back-converted to device space and used instead. The logic was twisted though, confusing GCC's uninitialized value detection logic and emitting warnings. This has been fixed by changing the code to: 1) Detect whether the ValuatorMask includes X/Y values 2) If either are missing, back-convert the current values into ox/oy 3) When X/Y are present, set ox/oy to the current value 4) Transform 5) Store X/Y values if changed or if they were set before. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 0fbbdb37c87b5824729f65c7fbac05223024fd27 Author: Adam Jackson Date: Wed Oct 22 13:19:18 2014 -0400 composite: Wrap GetSpans GetSpans should flush composition from children to parent, just like GetImage and SourceValidate. Fortunately no one is likely to have noticed, since to hit this you're already deep into failure town. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit da70c7d556bbf21ad495c26e982e2e0f2d7de6c1 Author: Keith Packard Date: Wed Oct 22 14:27:26 2014 -0700 xkb: Initialize 'bad' Atom in _XkbSetNamesCheck When _XkbCheckAtoms returns NULL for an error, it always sets the error return code, but GCC can't figure that out, so just initialize the local variable, 'bad', in _XkbSetNamesCheck to eliminate the warning. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 2566835b4374edb3e5a8353d4f7c9e7ec4851c57 Author: Keith Packard Date: Wed Oct 22 14:24:55 2014 -0700 os: Eliminate uninitialized value warnings from access.c The ConvertAddr function doesn't reliably set the 'addr' return value, and so callers are getting flagged for using potentially uninitialized values. Initialize the value in the callers to NULL and then go ahead and check for NULL values before using them. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit 1b94fd77792310c80b0a2bcf4bf6d4e4c4c23bca Author: Alex Orange Date: Fri Oct 3 15:41:38 2014 -0600 fb: Fix Bresenham algorithms for commonly used small segments. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=54168 Fix errors introducted in 863d528a9f76d0e8f122aebf19f8564a4c67a938. Said patch does indeed remove the problematic writes to bad memory, however it also introduces errors in the algoritm. This patch has the effect of reverting said patch and adding an if in the proper location to catch the out of bounds memory write without causing problems to the overall algorithm. Signed-off-by: Alex Orange Reviewed-by: Peter Harris Tested-by: Peter Harris Signed-off-by: Keith Packard commit ea5b2b0a2e2143ad1414fcbdc081b5d584588346 Author: Jon TURNEY Date: Tue Oct 21 15:03:55 2014 +0100 os: -displayfd should check ports up to 65535 -displayfd should check ports up to 65535 Noticed during https://cygwin.com/ml/cygwin-xfree/2014-07/msg00024.html Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 3a123fbdda56b24dc01a2308137144dc960e0d61 Merge: 9b29fa957 7ea4a21fe Author: Keith Packard Date: Mon Oct 27 15:39:26 2014 -0700 Merge remote-tracking branch 'jturney/master' Conflicts: hw/xwin/winpixmap.c Adam removed a pile of windows code, including this file. commit 9b29fa957a397664463c7c78fbcc2f34d1993271 Author: Chris Wilson Date: Thu Oct 16 14:09:08 2014 +0100 Xext/shm: Detach SHM segment after Pixmap is released The GPU may still have a reference to the SHM segment which would only be finally released when the Pixmap is destroy. So we can only detach the SHM segment (and thereby making the memory unaccessible) after the backend has had a chance to flush any remaining references. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85058 Signed-off-by: Chris Wilson Reported-and-tested-by: gedgon@gmail.com Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5adc20179e9818d51e1cd79bfc8a8271786c3949 Author: Keith Packard Date: Mon Oct 27 15:28:14 2014 -0700 modesetting: Skip kernel work-around on error in crtc to kernel msc ms_crtc_msc_to_kernel_msc attempts to work around kernel inconsistencies in reporting msc values by comparing the expected value with the reported value. If the kernel fails to actually provide its current values, then just skip the work around steps as there's really nothing better we can do. Signed-off-by: Keith Packard commit 59b12c454d9c4b5a26c6ad87c53abc671b15ce37 Merge: 5574a0a07 cac4b064f Author: Keith Packard Date: Mon Oct 27 14:48:55 2014 -0700 Merge remote-tracking branch 'anholt/modesetting-dri2-no-pageflip' commit 5574a0a07e83ff989c074c44d3ea9db0a819f472 Author: Keith Packard Date: Mon Oct 27 13:38:21 2014 -0700 composite: Skip SetWindowPixmap when pixmap isn't changing Check the current window pixmap to see if it matches the new pixmap and avoid calling SetWindowPixmap in that case. x11perf -ucreate highlights an instance where compCreateWindow reassigns the same Pixmap to the Window. Currently this triggers an expensive invalidation of the entire window hierachy, making sure that DRI2 clients are kept informed of the handle changes. However, as the backing Pixmap for the Window is actually unchanged, there is no need to do anything in this case. Signed-off-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Chris Wilson commit df6a3a07f60c40bab2b59b9b3ba0c20c8fb7e95d Author: Yogish Kulkarni Date: Wed Oct 22 12:55:28 2014 +0530 Skip SetCursor when vtSema is FALSE. Consider below sequence - 1) Cursor is removed : isUp will be FALSE if HW cursor is set. 2) VT switched away from X : vtSema becomes FALSE. 3) xf86CursorSetCursor is called with non-null CursorPtr : Saves the passed in CursorPtr, fallbacks to SW cursor and invokes spriteFuncs->SetCursor which saves the area under cursor and restores the cursor. This sets isUp to TRUE and as vtSema is FALSE saved data is garbage. 4) VT switched to X : vtSema becomes TRUE. xf86Cursor enable fb access is called which will remove the SW cursor, i.e copies saved data in #3 to screen. This results to momentary garbage data on screen. Hence when !vtSema skip spriteFuncs->SetCursor. X.Org Bug 85313 Signed-off-by: Yogish Kulkarni Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit cac4b064f9f66435430f61568c6a516c54bf3c40 Author: Eric Anholt Date: Mon Dec 30 17:23:38 2013 -0800 modesetting: Add support for DRI2 with glamor. This is derived from the intel driver DRI2 code, with swapchain and pageflipping dropped, functions renamed, and vblank event management shared code moved to a vblank.c for reuse by Present. This allows AIGLX to load, which means that you get appropriate visuals exposed in GL, along with many extensions under direct-rendering that require presence in GLX (which aren't supported in glxdriswrast.c). v2: Drop unused header includes in pageflip.c, wrap in #ifdef GLAMOR. Drop triple-buffering, which was totally broken in practice (I'll try to fix this later). Fix up some style nits. Document the general flow of pageflipping and why, rename the DRI2 frame event type enums to reflect what they're for, and handle them in a single switch statement so you can understand the state machine more easily. v3: Drop pageflipping entirely -- it's unstable on my Intel laptop (not that the normal 2D driver is stable with pageflipping for me), and I won't get it fixed before the merge window. It now passes all of the OML_sync_control tests from Jamey and Theo (except for occasional warns in timing -fullscreen -divisor 2). v4: Fix doxygen at the top of vblank.c Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 7064b00d478646cb428e427df2d3f91d7022c582 Author: Eric Anholt Date: Mon Dec 30 00:25:37 2013 -0800 modesetting: Export two functions I want to reuse from DRI2/Present. This renames dumb_get_bo_from_handle(), since it wasn't using a handle (GEM terminology) but a dmabuf fd. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Alex Deucher commit 34a98c8103a6f725283d0d1ee4084bf387b93019 Author: Eric Anholt Date: Wed Oct 8 04:12:49 2014 -0700 dri2: Automatically fill in the driver name if the DDX doesn't provide it. This will be used by the modesetting driver to support DRI2 across all hardware that can support glamor, and could potentially be used by other drivers that have to support DRI2 on sets of hardware with multiple Mesa drivers. This logic is the same as what's present in the Mesa driver loader, except for the lack of nouveau_vieux support (which requires a predicate on the device). v2: Fix duplicated assignment of info->driverName. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 470d97e1d176981dbd8087c621e54caab0d6c73c Author: Eric Anholt Date: Tue Dec 31 13:52:49 2013 -0800 dri2: Import a copy of Mesa's PCI ID -> driver name mappings. This comes from Mesa commit acdcef6788beaa2a1532e13ff84c3e246b8025ed Previously, each driver had to tell DRI2 what GL driver object should be loaded. Originally for a 2D driver that was a matter of giving the constant string for the vendor name, same as the driver's name. For a driver that's trying to handle multiple generations of hardware with different Mesa driver filenames, the driver had to bake in a mapping from PCI ID to the appropriate driver name in Mesa, which seems like a pretty awful layering violation (and one that was fixed with DRI3) As of January, Mesa now handles the mapping from a DRI fd to the driver name on its own, but the AIGLX loader still relies on DRI2 for choosing the filename. Instead of propagating the PCI ID list from each 2D driver to the modesetting driver, import a central copy of the PCI ID list so that drivers can stop handling this themselves. (Some day, when AIGLX transitions to EGL, we can drop the DRI2 filename setup entirely). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 839f05329ddb6f9b5b988edf3a2c3a1f856727f7 Author: Adam Jackson Date: Fri Feb 28 16:35:10 2014 -0500 dix: Retype and repack GC LP64: 160 bytes before, 128 after. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 73e2383b7350723256894c5076d0c731aec5cd1f Author: Adam Jackson Date: Fri Jun 20 13:31:20 2014 -0400 dix: Always store GC client clip as a region (v2) Again, this changes FixesCreateRegionFromGC to throw BadMatch when fed a GC with no client clip. v2: Fix Xnest and some variable names (Keith) Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e7b9295551d55b42b416ba70cce11dae79ece5e7 Author: Adam Jackson Date: Fri Sep 26 13:41:59 2014 -0400 fb: Hide fbPush{Pattern,Fill} Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e31d16a82d83738740f67743b759c006d9845e79 Author: Adam Jackson Date: Fri Sep 26 13:32:37 2014 -0400 fb: Hide fbDots Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5db0f067ed4ff24c48cdb7998e4a52ad80037cb7 Author: Adam Jackson Date: Fri Sep 26 13:30:06 2014 -0400 fb: Hide Bresenham line details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit b184a863c111834e28564d963c0733a30833f128 Author: Adam Jackson Date: Tue Jul 8 12:23:48 2014 -0400 fb: Hide some zero-width line details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 266cd552bd54fd3e7a83ae7178a303285857631e Author: Adam Jackson Date: Tue Jul 8 12:13:13 2014 -0400 fb: Hide glyph implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e572bcc7f4236b7e0f23ab762f225b3bce37db59 Author: Adam Jackson Date: Mon Jun 23 15:24:35 2014 -0400 fb: Remove even/odd tile slow-pathing Again, clearly meant to be a fast path, but this turns out not to be the case. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 836bb27726441e048bb300664343a136bc596a5b Author: Adam Jackson Date: Tue Jun 17 12:25:42 2014 -0400 fb: Remove unused fbReduceRasterOp Appears to have been cargo-culted in from cfb and then never used. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 167ccd33e0d2c4bd68aebcdba5a512d24c5eb49a Author: Adam Jackson Date: Tue Jun 17 12:21:19 2014 -0400 fb: Move fbStipple*Bits near their only consumer And remove fbStippleTable since gcc can't figure that out itself. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7430fdb689678b98ac63f5a8dad13719bac777e0 Author: Adam Jackson Date: Tue Dec 17 14:46:38 2013 -0500 fb: Remove even/odd stipple slow-pathing This is clearly meant to be a fast path, but it appears to be a net loss at this point. If you really wanted to ricer-tune here, note that the inner loop of fbBltOne is a bit too complicated for gcc (at least 4.8.2), it doesn't specialize the loop for the handful of legal values of bitsPerDst, which means computing at runtime what could have been const-propped. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a1983736853814d34450c0a0de1c4f6ee308423d Author: Adam Jackson Date: Tue Jun 17 11:24:06 2014 -0400 fb: FB_SHIFT is 5 (and FB_UNIT is 32) The other paths don't build or work, PCI and other buses are almost always 32 bit data paths, and X doesn't really support pixels bigger than that anyway. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3d35bd6b79957a3441abd87a377f0beb058997ed Author: Adam Jackson Date: Mon Mar 24 12:01:54 2014 -0400 fb: Eliminate fbLaneTable, staticize fb{8,16,32}Lane gcc doesn't appear to be smart enough to fold away the indirection here, even if you make fbLaneTable const. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 86ce6262975a7d53d9331723beb49cbe7bd02b48 Author: Adam Jackson Date: Fri Sep 26 12:39:38 2014 -0400 mi: Fold micursor.c into mipointer.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3b63900e90f44cf85a4d3391d23407b3bb6db52b Author: Adam Jackson Date: Fri Sep 26 12:34:15 2014 -0400 mi: Fold mipolyutil.c into mipoly.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 21b041ef48c49ff6fc06f6e4482ffe54cb763493 Author: Adam Jackson Date: Fri Sep 26 12:27:22 2014 -0400 mi: Fold mipoly{con,gen}.c into mipoly.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7679afd4da8b86aed27e5916ba723116a3c8bb4a Author: Adam Jackson Date: Fri Sep 26 12:01:37 2014 -0400 mi: Fold mifpolycon.c into miarc.c Also put mifpoly.h on a diet, and stop including it from places that don't need it. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit f307ef10f4c33da4b5ae59800931741b0a431d75 Author: Adam Jackson Date: Mon Jul 21 17:22:07 2014 -0400 mi: Fold mispans.c into miwideline.c Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 707965407a3c907058b89610e73e02989fd0b552 Author: Adam Jackson Date: Fri May 23 12:10:29 2014 -0400 mi: Unexport arc fill implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit ce8fff5cd681523088c14b97ce4fb6e4fb658321 Author: Adam Jackson Date: Fri May 23 12:06:03 2014 -0400 mi: Unexport subpixel polygon implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a085ba82bde375b5c884a40b410b563815c58a9e Author: Adam Jackson Date: Fri May 23 11:55:05 2014 -0400 mi: Unexport span group implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c15c886ee70f9144bc4603b918310f229312aadc Author: Adam Jackson Date: Fri May 23 11:50:07 2014 -0400 mi: Unexport polygon edge table implementation details Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 9bdc9b0113915de3d536b2b3f025915379c2126f Author: Adam Jackson Date: Fri May 23 11:21:28 2014 -0400 mi: Unexport wide line details XAA wanted these, once upon a time, but that's gone now. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit d181e52ceb9ae44e1faa8d5af8805f43328da6c2 Author: Keith Packard Date: Fri Oct 24 11:56:23 2014 -0700 glamor: Free converted bits in _glamor_upload_bits_to_pixmap_texture fast path When uploading bits to a texture which need reformatting to match a supported GL format, a temporary buffer is allocated to hold the reformatted bits. This gets freed in the general path, but is not freed in the fast path because that includes an early return before the call to free. This patch removes the early return and places the general case under an 'else' block, so that both paths reach the call to free. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 55b27ed70cf9dfa9b9dffe46e9a3191bfda38f7c Author: Andreas Hartmetz Date: Sat Oct 4 18:13:04 2014 +0200 glamor: Don't free memory we are going to use. glamor_color_convert_to_bits() returns its second argument on success, NULL on error, and need_free_bits already makes sure that "bits" aliasing converted_bits is freed in the success case. Looks like the memory leak that was supposed to be fixed in 6e50bfa706cd3ab884c933bf1f17c221a6208aa4 only occurred in the error case. Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit 16a32c53f6e9ad1f3284d4596edfa33e9efb740e Author: Alan Coopersmith Date: Thu Oct 9 05:42:09 2014 -0700 If fork fails in System(), don't fallthrough to exec() In the unlikely event of a failure in creating processes, signal masks will fall from the panels above you. Secure your mask before telling your child what to do, since it won't exist, and you will instead cause the server itself to be replaced by a shell running the target program. Found by Coverity #53397: Missing break in switch Execution falls through to the next case statement or default; this might indicate a common typo. In System: Missing break statement between cases in switch statement (CWE-484) Signed-off-by: Alan Coopersmith Reviewed-by: Matthieu Herrb Signed-off-by: Keith Packard commit 7e5bc49d1ed2c78c321da79bdbc99b90c5f95b38 Author: Alan Coopersmith Date: Thu Oct 9 05:42:08 2014 -0700 Allocate enough room for both reset & flags attributes ctx_attribs had room for 3 pairs of attributes, but if both flags & reset attributes were being returned it was storing 4 pairs in the array. Found by Coverity #53442: Out-of-bounds write This could cause an immediate crash or incorrect computations. In create_driver_context: Out-of-bounds write to a buffer (CWE-119) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit cffd4e4a4ee615d8583eae78b35017e0d1bfa4f0 Author: Adam Jackson Date: Thu Oct 9 09:58:06 2014 +0200 mi: Mark the span blit routines as _X_COLD On gcc, __attribute__((cold)) means: - consider calls to the function to be unlikely for branch prediction - optimize the function for size - emit the function in a dedicated cold text section It's not worth deleting these routines even though there are no longer in-tree consumers, but we can at least keep them out of i$ at runtime. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit de55aafa8f6a9e0dec364bec920d6f91ef2b39f0 Merge: 462bf87c4 c79f824bf Author: Keith Packard Date: Thu Oct 23 17:28:24 2014 -0700 Merge remote-tracking branch 'ajax/xwin' commit 462bf87c4d1c2211dd49a5ce62d01ff84ff33970 Author: Adam Jackson Date: Wed Oct 8 17:20:33 2014 +0200 render: Always store client clip as a region This does have one semantic change. FixesCreateRegionFromPicture used to throw BadImplementation if you tried to create a region from a picture with no client clip. I changed that to BadMatch here since that more honestly describes what's going on. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3f4edd2e3ff84c38df563b09c2e8c32404db38f7 Author: Adam Jackson Date: Wed Oct 8 17:18:32 2014 +0200 xinerama: Fix access mode in GetImage's drawable lookup Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 942e18e17e334d7a25f8c1dcc6f5c3711eeb6a7d Author: William ML Leslie Date: Wed May 21 10:28:52 2014 +1000 Xephyr: option to disable grabbing the host This patch makes it possible to use C-S key combinations within Xephyr without losing access to the host window manager's commands. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7ea4a21feed5ac5e71cc6d8141c97d6362402c5d Author: Jon TURNEY Date: Fri Sep 19 13:37:50 2014 +0100 configure.ac: Force --disable-libdrm on Cygwin This is now needed to avoid trying to build the modesetting driver by default when building the Xorg DDX on Cygwin. http://tinderbox.x.org/builds/2014-09-18-0011/logs/xserver/#build Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 883927d2e8733f4070b2a8bcc5ec8cc2d7a661b3 Author: Jon TURNEY Date: Tue Sep 30 13:55:59 2014 +0100 configure.ac: Avoid "Your OS is unknown" warning when configuring for Cygwin Don't emit "Your OS is unknown" warning when configuring with --enable-xorg to build the XOrg DDX for Cygwin. The list of supported OSes is getting a bit unwieldy, so just remove it. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 549b3175afc46cee6e1b61841f854a5272eaf1f7 Author: Jon TURNEY Date: Thu Oct 2 15:37:50 2014 +0100 hw/xwin: Fix unused variable warning in winCreateMsgWindow() winmsgwindow.c:99:11: warning: variable ‘winClass’ set but not used [-Wunused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5adfb566fe05bcf5f40b4adc1457862936d6d038 Author: Jon TURNEY Date: Fri Oct 3 14:22:30 2014 +0100 hw/xwin: Fix redundant declaration warning in winprefslex.l winprefslex.l:40:12: warning: redundant redeclaration of ‘yyparse’ [-Wredundant-decls] winprefsyacc.h:130:5: note: previous declaration of ‘yyparse’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8f062f73805765f5769dfd7b738c8dd10062fba6 Author: Jon TURNEY Date: Fri Oct 3 14:12:57 2014 +0100 hw/xwin: Fix warning in yyerror() winprefsyacc.y:257:3: warning: nested extern declaration of ‘yylineno’ [-Wnested-externs] Promote yylineno declaration to file scope Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f0f0c92a08f0ccf5a7ac447d117eb0341fe136d6 Author: Jon TURNEY Date: Fri Oct 3 14:00:06 2014 +0100 hw/xwin: Fix const warning in winPrefsLoadPreferences() winprefs.c:643:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 593c6b19349538ec3b89bc48eb3f0bb4c0cebb23 Author: Jon TURNEY Date: Thu Oct 2 15:35:54 2014 +0100 hw/xwin: Fix const warnings in winprefsyacc.y winprefsyacc.y:174:5: warning: passing argument 1 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:174:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:175:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.y:178:5: warning: passing argument 3 of ‘AddMenuLine’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:67:13: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1737:9: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] winprefsyacc.y:82:12: note: expected ‘char *’ but argument is of type ‘const char *’ winprefsyacc.c:1854:3: warning: passing argument 1 of ‘yyerror’ discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 394ad259596801860d32d531408a07b63e469427 Author: Jon TURNEY Date: Thu Oct 2 14:31:35 2014 +0100 hw/xwin: Fix const warning in winCheckDisplayNumber() InitOutput.c:1032:19: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 701492e5d9487545afeb5ebfcebccc0408ca7bc4 Author: Jon TURNEY Date: Thu Oct 2 14:30:56 2014 +0100 hw/xwin: Fix warning in winXIconToHICON() winmultiwindowicons.c:403:29: warning: passing argument 8 of ‘XGetWindowProperty’ from incompatible pointer type [enabled by default] /usr/include/X11/Xlib.h:2688:12: note: expected ‘Atom *’ but argument is of type ‘long unsigned int *’ Looks like this has been wrong since I added it in 527cf131 :-( Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a14f1d94d5bb87055f7e4812e9ef75771ea65bc5 Author: Jon TURNEY Date: Thu Oct 2 14:09:40 2014 +0100 hw/xwin: Fix format warnings with debug printing of pointers on 64-bit Fix various pieces of debug output, mainly under --enable-debug, which use a "%08x" printf format for a pointer type. Use "%p" format for 64-bit portability. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03d462ddd2cacce92dc9e6bad00710d899509387 Author: Jon TURNEY Date: Thu Oct 2 12:04:20 2014 +0100 hw/xwin: Fix warnings in glx/glshim.c glext.h currently requires GL_GLEXT_PROTOTYPES in order to prototype glCompressedTexImmage* functions generated_gl_shim.c:2859:6: warning: no previous prototype for 'glCompressedTexImage3DARB' [-Wmissing-prototypes] generated_gl_shim.c:2866:6: warning: no previous prototype for 'glCompressedTexImage2DARB' [-Wmissing-prototypes] generated_gl_shim.c:2873:6: warning: no previous prototype for 'glCompressedTexImage1DARB' [-Wmissing-prototypes] generated_gl_shim.c:2880:6: warning: no previous prototype for 'glCompressedTexSubImage3DARB' [-Wmissing-prototypes] generated_gl_shim.c:2887:6: warning: no previous prototype for 'glCompressedTexSubImage2DARB' [-Wmissing-prototypes] generated_gl_shim.c:2894:6: warning: no previous prototype for 'glCompressedTexSubImage1DARB' [-Wmissing-prototypes] generated_gl_shim.c:2901:6: warning: no previous prototype for 'glGetCompressedTexImageARB' [-Wmissing-prototypes] Also, explicitly prototype glXGetProcAddressARB(), as glx/glxdri*.c does, as it's not practical to include glx.h here... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 329e8125aa3b4c83121f8290a5436c2cb4c1cf96 Author: Jon TURNEY Date: Wed Oct 1 12:14:43 2014 +0100 hw/xwin: Fix compilation with -Werror=declaration-after-statement xevents.c: In function 'winClipboardInitMonitoredSelections': xevents.c:129:5: error: 'for' loop initial declarations are only allowed in C99 mode for (int i = 0; i < CLIP_NUM_SELECTIONS; ++i) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 97c3298caab7c5a5396fcbde02d862e5380d7d2e Author: Jon TURNEY Date: Wed Oct 1 12:02:04 2014 +0100 hw/xwin: Fix compilation with -Werror=return-type winshadddnl.c: In function ‘winRedrawScreenShadowDDNL’: winshadddnl.c:991:9: error: ‘return’ with no value, in function returning non-void [-Werror=return-type] Just wrong in 1c34e774 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 61a292adf45405641de1c522a04c148e0a152acd Author: Keith Packard Date: Thu Oct 9 15:17:17 2014 +0200 glx: check return from __glXGetAnswerBuffer This function can return NULL; make sure every caller tests for that. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit d634ecdf82f244ff8ce75d351fc175792d254e5c Merge: 6622f0cb1 7ebf480f5 Author: Keith Packard Date: Thu Oct 9 15:08:31 2014 +0200 Merge remote-tracking branch 'ajax/dead-code' commit 6622f0cb1761501f3287ffa8d3cbca3fd30f9f0c Merge: f12e7f498 5ecd7866f Author: Keith Packard Date: Thu Oct 9 15:05:26 2014 +0200 Merge remote-tracking branch 'ajax/mi-cleanup' commit f12e7f4980416b74988052a04d0f2487b2c4a7e9 Merge: da887726e aaf5e2d64 Author: Keith Packard Date: Thu Oct 9 14:21:19 2014 +0200 Merge remote-tracking branch 'anholt/modesetting-glamor' commit da887726eeaece0396962dd3912578d3372881b1 Author: Alan Coopersmith Date: Sun Sep 21 09:49:06 2014 -0700 Use unique display name for each xi2 test program [v3] make -j 8 check was sporadically failing in different xi2 tests. After adding the asserts in the previous commit to catch xkb failure it became easier to catch the failures and see that multiple tests were running at once trying to write to /tmp/server-(null).xkm and then delete it, and interfering with each other. Putting a unique string into the display variable let them each write to their own file and not interfere with others. v2: Fix Linux bits: Add #include to get a declaration of program_invocation_name on Linux. Use only the last portion of the pathname so that the resulting display name doesn't contain any slashes. v3: use program_invocation_short_name on Linux This is the same as program_invocation_name, except is has stripped off any path prefix. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 5ecd7866f7587d620f000e802a262c7cd4b9df33 Author: Adam Jackson Date: Thu Sep 11 10:11:39 2014 -0400 misc: Fold together some redundant conditionals Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5b07f1db6de9f08f757206454da03ee0ae872bfc Author: Adam Jackson Date: Thu Sep 18 16:05:40 2014 -0400 fb: fb{Map,Unmap}Window -> fb{Realize,Unrealize}Window Make the function names match the screen slot name. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 9ed83a694b6492c9db226b115ed282cb127e798e Author: Adam Jackson Date: Thu Sep 18 15:36:57 2014 -0400 mi: miSlideAndSizeWindow -> miResizeWindow Make the function name match the screen slot name. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 939ca767c7603923a91fd37901175a42e802d40e Author: Adam Jackson Date: Thu Sep 18 14:50:28 2014 -0400 dix: Remove an obfuscatory macro Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit d138d9ccc62a9472925574089f346bf9aa3dab1f Author: Adam Jackson Date: Mon Sep 15 13:05:24 2014 -0400 dix: Remove some pointless casting of NULL Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 277330075bfbd4343c4efdd136e0be716e1a491f Author: Adam Jackson Date: Mon Sep 15 12:30:44 2014 -0400 dix: Remove an empty if Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 81d76a835b2f647e3051b1d93606e59db7998d76 Author: Adam Jackson Date: Mon Sep 15 12:10:55 2014 -0400 dix: Lower backStorage to a bit instead of a pointer Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 322ba42c23a3a107f7a62fb1c449792b616e5eba Author: Adam Jackson Date: Mon Sep 15 12:05:26 2014 -0400 dix: Remove DIXsaveUnder bit from the Window Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 1e56b2dfc6377234ffdcdf206528d476b04d13af Author: Adam Jackson Date: Fri Sep 12 12:51:13 2014 -0400 mi: Move pScreen->SendGraphicsExpose up to dix No DDX is overriding this and it's fairly absurd to expose it as a screen operation anyway. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 5d3bd8a3dc6456ea1ccf7b5f71b972379d7565ec Author: Adam Jackson Date: Fri Sep 12 11:56:28 2014 -0400 mi: Drop plane argument from miHandleExposures This existed to be passed to the bs recovery routine; since we back all planes, we don't care. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7eddc80bc4a6c1902746a9fbe79ab553f9fd5821 Author: Adam Jackson Date: Tue Aug 5 14:07:17 2014 -0400 mi: Simplify composite border clip redirection interface There's not really a good reason for mi to not just call the composite code directly. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7b35dc9b1533d4b99a3f84f460ac66354a6fe347 Author: Adam Jackson Date: Tue Sep 23 10:35:37 2014 -0400 mi: Deobfuscate miOverlayWindowExposures Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit fb34f273481b90a90a988f0f5c5a2d642a5661b8 Author: Adam Jackson Date: Tue Sep 23 10:30:56 2014 -0400 mi: Deobfuscate miWindowExposures Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 0d30d44a8cdacfbc99d8193f76c133b803464622 Author: Adam Jackson Date: Thu Sep 11 12:44:54 2014 -0400 dix: Drop the third argument from WindowExposuresProcPtr A careful read shows that it was always NULL. It hasn't always been; as the DDX spec indicates, it was the "occluded region that has backing store", but since that backing store code is long gone, we can nuke it. mi{,Overlay}WindowExposures get slightly simpler here, and will get even simpler in just a moment. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit aaf5e2d643af590366b2d02ad1c2db05d1fc4131 Author: Eric Anholt Date: Sat Dec 28 11:32:10 2013 -0800 modesetting: Add support for rendering using glamor. By default modesetting now tries to enable X acceleration using glamor, but falls back to normal shadowfb if GL fails to initialize. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6d41bdb23ca92803e3a51dc317d2b80cdb92f43a Author: Eric Anholt Date: Tue Aug 26 16:59:37 2014 -0700 modesetting: Deduplicate some scrn setup. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 20a3b482191711bc15be0410ccc3651924271349 Author: Eric Anholt Date: Wed Oct 8 00:41:13 2014 -0700 modesetting: Fix some weird formatting after x-indent-all.sh. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 3119acdab9eecff90b8fd9a265e2a456e7bc8779 Author: Eric Anholt Date: Wed Oct 8 00:39:15 2014 -0700 modesetting: Run x-indent-all.sh. As I was editing code, the top-level .dir-locals.el was making my new stuff conflict with the existing style. Make it consistently use the xorg style, instead. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit c79f824bf6617816aaf10393beec8dddfa591f7b Author: Adam Jackson Date: Thu Sep 25 15:49:26 2014 -0400 xwin: Remove primary DirectDraw engine Again, as the documentation says, "unsupported, obsolete". Reviewed-by: Jon TURNEY Signed-off-by: Adam Jackson commit 8465ee788fd541fa37681aa0a44103c7f944d437 Author: Adam Jackson Date: Thu Sep 25 15:37:33 2014 -0400 xwin: Remove native GDI engine (v2) As the man page says, "unsupported, experimental, and barely functional". The last even minor updates to any of this were back in 2004, presumably it's not getting better any time soon. This is also the only GC ops implementation in the tree that actually falls all the way down to the spans routines for everything, so that's pretty nice to be rid of. v2: Fix stray break statement (Jon) Reviewed-by: Jon TURNEY Signed-off-by: Adam Jackson commit e2a3e91a56cb598f2c8257614d92ccd46b7fc094 Author: Adam Jackson Date: Fri Jul 25 11:01:22 2014 -0400 rootless: remove redundant RootlessShapedWindowIn miShapedWindowIn is identical. Which you would expect, since neither one takes an actual WindowPtr argument, so they couldn't possibly make reference to rootlessness. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 7e8ac6dcd24d56e384ad09c7c23259cb3f4f8dc6 Author: Adam Jackson Date: Thu Sep 11 12:30:15 2014 -0400 xquartz: Remove useless DRIWindowExposures Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a8c6fc46c088bedb36c6441b78c98ca4cb9761b4 Author: Adam Jackson Date: Thu Sep 11 10:24:27 2014 -0400 kdrive: Remove vestigial reference to fbInitValidateTree Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 7ebf480f5eb75e06271ec924769e51bdcbbdc69c Author: Adam Jackson Date: Fri Feb 28 12:34:49 2014 -0500 xfree86: Remove some can't-happen printf from xf86CreateRootWindow Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3689be96ac125c9bfca9d37de4878f05f4e2f584 Author: Adam Jackson Date: Tue Jun 10 12:54:41 2014 -0400 vfb: Don't reimplement micmap so much We know we're atop fb which is atop micmap, the only thing we need to hook is InstallColormap to handle the xwd colormap change. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 692676debbc2227054d67078c6442f1ab1811192 Author: Adam Jackson Date: Mon Jun 16 12:35:28 2014 -0400 loader: Remove some baklava code Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c695a1430b80bac0b95e4d7f559e1bd223ecb1ef Author: Adam Jackson Date: Tue Jul 8 14:38:34 2014 -0400 input: Remove unused SetKeySymsMap Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 645063cd9384a26353775e92a79ed8710c6ca66c Author: Adam Jackson Date: Tue Mar 4 12:51:49 2014 -0500 exa, kdrive: Remove redundant BitsPerPixel macros We already get this from servermd.h Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit cccba52d152a7d233c0b762a54844ecef831483e Author: Alan Coopersmith Date: Sun Sep 21 09:49:05 2014 -0700 Abort xi2 tests if ActivateDevice() fails I was getting segfaults in xi2 tests from trying to copy XKB keyboard state to NULL pointers with a stack of: key=key@entry=0) at xkbActions.c:1189 sendevent=sendevent@entry=0 '\000') at devices.c:420 at protocol-xiquerydevice.c:338 which turned out to be due to xkbcomp failure, which was logged in the test logs as: XKB: Failed to compile keymap Keyboard initialization failed. This could be a missing or incorrect setup of xkeyboard-config. but which was overlooked because the ActivateDevice() return code wasn't checked and the tests went forward assuming the structures were all correctly initialized. This catches the failure closer to the point of failure, to save debugging time. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 95a5b92e37f73f497d547fd91c543c16d2cc73de Author: Keith Packard Date: Thu Oct 2 10:26:53 2014 -0700 xfree86: Remove remaining return FALSE from configServerFlags Remove the error return path from the FLAG_PIXMAP path and leave the default value in place. There's no point skipping the rest of this function. Signed-off-by: Keith Packard commit e9651e3dbc32650fcaf90888b4cbef81da77cfcd Merge: 9bc01dfc7 4433bc6d5 Author: Keith Packard Date: Thu Oct 2 10:24:33 2014 -0700 Merge remote-tracking branch 'ajax/dead-code' commit 9bc01dfc7070a40f5948588895b3a11dd1636d0e Author: Axel Davy Date: Sat Sep 27 23:17:13 2014 +0200 Fix present_pixmap when using present_notify_msc Calling present_notify_msc could cancel a pending pixmap presentation. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b3e9791fd375eb71b6150a77b8009b046b213004 Author: Daniel Martin Date: Sat Sep 20 09:07:41 2014 +0200 xfree86: Delete file modinit.h All references to modinit.h have been remove with: a1d41e3 Move extension initialisation prototypes into extinit.h Signed-off-by: Daniel Martin Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 2aeb9d8f8b22ceb1de883c231a0a75d4c75d3f4a Author: Daniel Martin Date: Sat Sep 20 09:07:40 2014 +0200 security: Remove XpExtension from SecurityTrustedExtensions There's no XPrint extension (anymore). Signed-off-by: Daniel Martin Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 12c19bbff4b7b2d0b350a7b93b38ebbf69748534 Author: Daniel Martin Date: Sat Sep 20 09:07:39 2014 +0200 dix: Remove XpExtension leftovers from protocol.txt There's no XPrint extension (anymore). Signed-off-by: Daniel Martin Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit d3d845ca9e92f0a2ccde93f4242d7769cfe14164 Author: Michel Dänzer Date: Thu Sep 25 15:27:22 2014 +0900 glamor: Use GL_STREAM_READ also for read/write access to a PBO Otherwise the CPU may end up reading from non-cacheable memory, which is very slow. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84178 Signed-off-by: Michel Dänzer Reviewed-by: Markus Wick Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 78c27d12e1f4857bfcfc92afbb69d5dd989232b9 Merge: 6e50bfa70 1d6334dd0 Author: Keith Packard Date: Mon Sep 29 13:04:49 2014 -0700 Merge remote-tracking branch 'jturney/xwin-clipboard-refactoring' commit 6e50bfa706cd3ab884c933bf1f17c221a6208aa4 Author: Michel Dänzer Date: Wed Sep 24 16:48:10 2014 +0900 glamor: Fix leak of converted_bits in _glamor_upload_bits_to_pixmap_texture ==9530== 808,575,600 bytes in 5,904 blocks are definitely lost in loss record 4,602 of 4,602 ==9530== at 0x4C28C20: malloc (vg_replace_malloc.c:296) ==9530== by 0xAD29C98: _glamor_upload_bits_to_pixmap_texture (glamor_pixmap.c:771) ==9530== by 0xAD2AE95: glamor_upload_sub_pixmap_to_texture (glamor_pixmap.c:1031) ==9530== by 0xAD2BD55: glamor_upload_pixmap_to_texture (glamor_pixmap.c:1057) ==9530== by 0xAD1C2E6: glamor_composite_choose_shader (glamor_render.c:1025) ==9530== by 0xAD1C629: glamor_composite_with_shader (glamor_render.c:1174) ==9530== by 0xAD1DA77: glamor_composite_clipped_region (glamor_render.c:1542) ==9530== by 0xAD1E849: _glamor_composite (glamor_render.c:1689) ==9530== by 0xAD1ED90: glamor_composite (glamor_render.c:1758) ==9530== by 0x519FD6: damageComposite (damage.c:502) ==9530== by 0xAD27AA3: glamor_trapezoids (glamor_trapezoid.c:147) ==9530== by 0xAD27B51: glamor_trapezoids (glamor_trapezoid.c:101) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84176 Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 4433bc6d53e651b3dc4112099a153c2574f30797 Author: Adam Jackson Date: Thu May 1 12:48:15 2014 -0400 x86emu: Undefine _NO_INLINE Never defined by the server. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1c3cb68d0cd15d29fd3aaa9eedbfa772ec8e3a47 Author: Adam Jackson Date: Tue Jul 29 14:15:24 2014 -0400 xfree86: Remove pointless xf86PrintMarkers Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 30fa6da6f140d713041942a81f5d6da6736e4f7f Author: Adam Jackson Date: Tue Jul 29 14:07:39 2014 -0400 xfree86: configServerFlags never fails, make it return void Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2bf9db1930528255a37f9787aeb82e2851f814c2 Author: Adam Jackson Date: Tue Jul 29 14:02:01 2014 -0400 xfree86: Remove unused xf86Info.useDefaultFontPathFrom Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit fffea07b4cb0992fed2cca33be08440ea94090d9 Author: Adam Jackson Date: Tue Jul 29 13:48:10 2014 -0400 xfree86: Remove xf86Info.log (v2) SUBCLASS ALL THE THINGS v2: Remove the enum too (anholt) Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2f5cfbee5409b088156d4cd84a3376499e291631 Author: Adam Jackson Date: Tue Jul 8 14:50:22 2014 -0400 xfree86: Remove DisplayID support Not actually wired up so it's fairly useless. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b56fcce761534d3e28b7ea19e2a13213c3157a1f Author: Adam Jackson Date: Tue Jun 17 10:36:44 2014 -0400 xfree86: Remove useless back-pointer to pScrn from colormap code Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ef22655311efa0d5a5395ba2f19aa20d71a05a4f Author: Adam Jackson Date: Fri May 2 13:36:13 2014 -0400 xfree86: Remove spurious xf86ConfigError READABLE. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 35f0257360fa6e11b9ecc08e467163718e012bb1 Author: Adam Jackson Date: Tue Mar 4 11:12:16 2014 -0500 xfree86: Remove Option "TextClockFreq" No modern driver pays attention to this. Presumably there existed hardware once where you couldn't just read the right values out of the CRTC. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6755aa2c1244fee11846c1e0b274bd34900e3299 Author: Adam Jackson Date: Fri Jul 25 12:31:54 2014 -0400 xfree86: Remove xv clip notify driver hook Nothing's using it. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e89ccacea9a1e4bc3693bb78e717343addd517e5 Author: Adam Jackson Date: Thu Jan 23 10:27:58 2014 -0500 mi: Remove Windows 8-bpp colormap compatibility Nice, but not something our Windows servers build, and not something that belongs in mi anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7cd192edc195c089c6df32e9f22e57da7467b6fd Author: Adam Jackson Date: Mon Jun 16 11:55:30 2014 -0400 loader: Deobfuscate RTLD_* macro stuff POSIX requires that these be named correctly, no need to be clever. Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit cc59be38b7eff52a1d003b390f2994c73ee0b3e9 Author: Keith Packard Date: Fri Sep 12 11:33:48 2014 -0700 os: Don't listen to 'tcp' by default. Add '-listen' option. [v2] This disables the tcp listen socket by default. Then, it uses a new xtrans interface, TRANS(Listen), to provide a command line option to re-enable those if desired. v2: Leave unix socket enabled by default. Add configure options. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 8ada3fb32cd7dd8948eb55620de18ba03df6131d Author: Keith Packard Date: Sat Sep 20 10:04:11 2014 -0700 Require xtrans 1.3.5 or newer This version of xtrans offers the TRANS(Listen) function. Signed-off-by: Keith Packard commit 18935b41e13b34571ffda84bde5257b8e84e6d1f Author: Keith Packard Date: Sat Sep 20 04:04:43 2014 -0700 XSERVER_DTRACE needs request names from registry too The dtrace code in the server wants to log the name of each executed request, which it gets from the registry. Use that as an additional indication of when that portion of the registry should be included in the server build. See: http://tinderbox.x.org/builds/2014-09-19-0003/logs/xserver/#build Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 28337cb14e4347e1dd7936c5393a22e042866687 Author: Jon TURNEY Date: Fri Sep 19 14:22:13 2014 +1000 xserver: Move 'pragma GCC diagnostic' outside functions $ gcc --version gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /jhbuild/checkout/xorg/xserver/os/log.c: In function ‘LogInit’: /jhbuild/checkout/xorg/xserver/os/log.c:199: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:201: warning: format not a string literal, argument types not checked /jhbuild/checkout/xorg/xserver/os/log.c:212: error: #pragma GCC diagnostic not allowed inside functions /jhbuild/checkout/xorg/xserver/os/log.c:214: warning: format not a string literal, argument types not checked etc. Reviewed-by: Dave Airlie Signed-off-by: Jon TURNEY Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 7e6bd546846964fd9b8c2a06dea4782a552b62d7 Author: Keith Packard Date: Wed Aug 6 12:58:38 2014 -0700 glamor: Remove shader-based trapezoid implementation. Fixes Bug 76213. I can't find any performance benefit to using the GL path and the code renders this trapezoid incorrectly: top: FIXED 29.50 bottom: FIXED 30.00 left top: POINT 0.00, 29.50 left bottom: POINT 0.00, 30.50 right top: POINT -127.50, 29.50 right bottom: POINT 52.50, 30.00 This should render a solid line from 0,30 to 52,30 but draws nothing. The code also uses an area computation for trapezoid coverage which does not conform to the Render specification which requires a specific point sampling technique. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b2452311bd1d67b4d78612570d4a25c685c78a0c Author: Keith Packard Date: Tue Aug 19 12:52:05 2014 -0700 glamor: Check large pixmap users in glamor_largepixmap.c This enables the assertion that all users of the large pixmap member are restricted to pixmaps which are actually large. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5fc3e99f537b10dd9c2adfd37cf2c4ba5ed4bd44 Author: Keith Packard Date: Tue Aug 19 12:44:41 2014 -0700 glamor: Handle compositing from large to small pixmaps glamor_composite_largepixmap_region is given the job of dealing with compositing between a mixture of large and small pixmaps. However, it was assuming that the destination pixmap was large and fetching members of the large structure even for small pixmaps. This manifested with assertion failures when compositing from a large pixmap to a small pixmap. Fixed by using the pixmap size for the destination block size for small pixmaps. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6e78d7f5e6edf56180e2ecfd25300bb2523876ab Author: Keith Packard Date: Tue Aug 19 12:41:45 2014 -0700 glamor: Don't abuse large_pixmap members for regular pixmaps glamor_compute_clipped_regions_ext wants to treat small and large pixmaps uniformly and did that by writing into the large pixmap union member in small pixmaps to construct something that looks like a one texture large pixmap. Instead of doing that, simply allocate the necessary elements locally on the stack and use them from there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit bab319763c9734da3cff7b91a582f54989dc4cbe Author: Keith Packard Date: Tue Aug 19 12:39:07 2014 -0700 glamor: Add macro __glamor_large in glamor_largepixmap.c For now, this simply fetches the large member of the pixmap private. It will be changed to assert that the pixmap is large once bugs related to that have been fixed. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 16e429f1f96f984b1ff575875a7a4d7d29b482e2 Author: Keith Packard Date: Tue Aug 19 12:34:41 2014 -0700 glamor: Change SET_PIXMAP_FBO_CURRENT from macro to static inline This is the last function-like macro in glamor_priv.h; change to static inline like all of the other functions there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ea7357de90792cbceca6d8d9fdc144e7df8a0fba Author: Keith Packard Date: Wed Sep 10 14:01:59 2014 -0700 present: Clear pending flip pixmaps at CloseScreen If a flip is active at server reset time, the associated window will get destroyed which will queue an unflip operation. If that isn't synchronous, then it won't have finished by the time CloseScreen is called. Calling present_flip_idle will signal the fence and remove the reference to the fence and pixmap, freeing these in the X server and allowing a DRM client to clean up as well. This also rewords other comments in present_flip_destroy, removing scary words about needing synchronous operation (everything in this function is synchronous now) and describing what effect we actually need from present_set_abort_flip. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2051514652481a83bd7cf22e57cb0fcd40333f33 Author: Keith Packard Date: Wed Sep 10 14:02:13 2014 -0700 present: Support PresentOptionCopy We added this option to the present protocol before 1.0 but somehow never implemented it in the server. It's pretty simple; just don't ever do flips if the application specifies Copy. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 69d8572ae4cd1bce17223ea8aff87916a974c861 Author: Keith Packard Date: Wed Sep 10 15:21:32 2014 -0700 Build required portions of registry.c automatically [v2] Instead of making the inclusion of the registry code a global conditional, split the registry into two pieces; the bits required by the X-Resource extension (the resource names) and the bits required by the XCSECURITY extension (the protocol names). Build each set of code if the related extension is being built. v2: Check for both XCSECURITY and XSELINUX. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a11fc2493e85e4a532f4954805a7c6d1c601b08f Author: Keith Packard Date: Wed Sep 10 15:04:00 2014 -0700 dix: Close protocol.txt after we're done loading extension names Don't leave this file open during the whole server execution process; close it once all of the extensions are initialized. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9e07f3a3d28b01402beecb3280c94fc525bd8075 Author: Keith Packard Date: Wed Sep 10 15:41:08 2014 -0700 test: Only build hashtable tests if building X-Resource extension The hash table functions are only included in the server when the X-Resource extension is built, so don't try to build and test them unless the X-Resource extension is being built. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 670ee0757febfb965d718fce2d5688717def667d Author: Adam Jackson Date: Tue Sep 16 11:10:58 2014 -0400 ephyr: Properly implement hardware cursors (v3) When dix hands us a new cursor we proxy it through to the host server; since we keep the host XID on the cursor bits private we can switch among them with just ChangeWindowAttributes. v2: Use xcb-renderutil for argb format lookup (Uli, Keith) Fall back to core cursors for host RENDER < 0.5 (Keith) Drop useless ephyrEnableCursor Consistently create/destroy the cursor image GC on both paths Treat null cursor from dix as invisible v3: Initialize the invisible cursor's image (Keith) Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit f839caadd4e567bf89f893aa7e5ba1327b712b4b Author: Adam Jackson Date: Wed Sep 17 11:07:22 2014 -0400 loader: Remove compatibility with ancient XFree86 version numbering Pretty sure I'm guilty of adding this. I think I was thinking of trying to be compatible with some really old binary-only driver that I had vague aspirations of reverse-engineering, but since I haven't gotten around to it in the intervening decade... Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit af40913797e6595fb5466c2ff3110e9526a37b9f Author: Julien Cristau Date: Wed Sep 17 07:41:27 2014 +0200 xwayland: always include drm.xml in tarballs Move drm.xml out of the automake conditional so make dist includes it even if glamor-egl is disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83960 Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit eaee6572beefca240c42791f9a3a6e547bedd410 Merge: e3aa13b8d b84d25fd5 Author: Keith Packard Date: Wed Sep 17 15:49:24 2014 -0700 Merge remote-tracking branch 'anholt/modesetting-import' commit e3aa13b8d63ea2fba6eb47ddd0a7dde5a6d2b661 Author: Jon TURNEY Date: Wed Sep 17 15:38:39 2014 -0700 Update help text since -iglx is now the default This should have been part of d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit b84d25fd53e97105b99495af84abaacc4c901967 Author: Eric Anholt Date: Tue Aug 26 11:22:02 2014 -0700 modesetting: Drop remaining old-xserver compatibility. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7b0965a826612988dd721ddbd67cfbec392b67b5 Author: Eric Anholt Date: Tue Aug 26 11:37:46 2014 -0700 modesetting: Drop use of compat-api.h Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 2feda3b6b58f46cef91ea41312aac9021a703777 Author: Eric Anholt Date: Tue Aug 26 11:06:23 2014 -0700 modesetting: Connect the driver to the build. v2: Fix libdrm version check, and use XORG_VERSION_* instead of a static 1.0.0 version for the driver module. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 30dcc10f6c9c4bacbc0e3652917c298ca9fb3898 Author: Adam Jackson Date: Mon May 5 11:18:33 2014 -0400 xfree86: Clean up some more alpha awareness Since the sparse stuff is gone none of these variables get used for anything, they're just dead side-effect-less execution. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2e21c081d34d52ee49ac00a294d2e74caf529818 Author: Adam Jackson Date: Fri May 2 13:00:21 2014 -0400 xfree86: Remove the memory of MTRR awareness pciaccess does this for us, and none of our internal hooks really remain. This does remove a cleanup pass from the BSD code, but the case it's covering (a previous server leaving MTRRs around) can't happen anymore. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c42712ab4d8eec56704ad5422d8f54befeb1e886 Author: Adam Jackson Date: Fri May 2 12:58:23 2014 -0400 xfree86: Remove xf86CheckMTRR Die die die die die. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 8686463de7e1ef9814824d46526d8177a7a492a0 Author: Adam Jackson Date: Fri May 2 12:55:37 2014 -0400 xfree86: Remove xf86ReadBIOS Not being used externally or internally anymore. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 21b216ad6ce2e9c89359b95e4196e42d91bf9420 Author: Adam Jackson Date: Fri May 2 12:46:45 2014 -0400 int10: Port off xf86ReadBIOS If the linux vm86 backend changes look somewhat horrifying to you, that's because you have taste. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 96c0da812a563d8229dc1396ac801329b3bcba91 Author: Adam Jackson Date: Fri May 2 12:39:01 2014 -0400 xfree86: Remove xf86LinearVidMem The only driver even pretending to check the result is mach64 anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit ec0e29ed5bc71516de7feb226b548ce45cb9ffdf Author: Adam Jackson Date: Fri May 2 12:32:02 2014 -0400 xfree86: Remove {set,undo}WC from VidMemInfo Now that mapMem is gone this can never actually get called. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 9db2af6f757ef9680c70eb731698b7c9f9aca203 Author: Adam Jackson Date: Fri May 2 12:14:10 2014 -0400 xfree86: Remove xf86{Map,Unmap}VidMem This API sucks. Fortunately it's mostly unused at this point. geode, sis, and xgi need minor patches to use the corresponding pciaccess code, neomagic will (more explicitly) lose its non-PCI support, and newport will need to be ported to /dev/mem or the platform bus or something. This should also make it pretty clear that alpha's sparse memory support was basically not a thing anymore, very few tears shed. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 6d6aa8ab6b6d62d65f1354b4cd9af0bf4f2e81d7 Author: Eric Anholt Date: Tue Aug 26 11:43:54 2014 -0700 modesetting: Update for the platform device API change. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9c080f44960d2338c7a59eee132a02d45186bfb0 Author: Eric Anholt Date: Tue Aug 26 11:41:46 2014 -0700 modesetting: Drop use of "pointer" for "void *" The xserver doesn't have that typedef. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a10ea01475c6d0795b1a00cfd8be9912f4b54235 Author: Eric Anholt Date: Tue Aug 26 11:24:31 2014 -0700 modesetting: xserver already checks XEXTPROTO >= 7.2.99.901. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 Author: Eric Anholt Date: Tue Aug 26 11:21:24 2014 -0700 modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT The server will always have it. v2: Clean up some weird formatting from the unifdeffing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 0c07bfb38e61a8a6ad511dc8827e2dd20d68665d Author: Eric Anholt Date: Mon Aug 25 15:42:45 2014 -0700 modesetting: Merge modesetting's COPYING into the xserver's. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1d6334dd0ca99923b6b55c5c047ef6b5c325f66c Author: Jon TURNEY Date: Wed Jun 19 13:09:35 2013 +0100 hw/xwin: Undefine _XSERVER64 in hw/xwin/winclipboard Including any server header might define the macro _XSERVER64 on 64 bit machines. That macro must _NOT_ be defined for Xlib client code, otherwise bad things happen. So let's undef that macro if necessary. Remove server directories from include path to ensure no server includes are included Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7ca93301940647219dbed2d14fcd3f37e49fb477 Author: Jon TURNEY Date: Tue Jun 18 19:53:52 2013 +0100 hw/xwin: Only add to XSetIOErrorHandler() handler chain once Only use XSetIOErrorHandler() to add to the global XSetIOErrorHandler() chain once. If we do it every restart, then we make a loop in the handler chain, and we end up with a thread spinning in that loop when the server shuts down... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5819a02d461349dbfc86317c742406d2217f7f0c Author: Jon TURNEY Date: Tue Jun 18 19:35:20 2013 +0100 hw/xwin: Add a basic manpage for xwinclip Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 492c924c8531b013d50637e29213da287b9a7fa2 Author: Jon TURNEY Date: Tue Jun 18 19:28:53 2013 +0100 hw/xwin: In clipboard function prototypes, use Window type, not int type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4a38c3bda2b0a868d7611f9423d8a0f304b435aa Author: Jon TURNEY Date: Tue Jun 18 19:18:08 2013 +0100 hw/xwin: Remove XOpenDisplay() retry code Remove XOpenDisplay() retry code. This isn't a sensible thing for the application to be doing, and XWin server needs to retry much more than just XOpenDisplay(). Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4fc62aef8079266f8878cb355e6eb894000d8b8b Author: Jon TURNEY Date: Wed Jun 19 14:00:28 2013 +0100 hw/xwin: Improve comment about why we can't XCloseDisplay() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 89eb7bdcad092821b61a48832e1db82975a2252b Author: Jon TURNEY Date: Wed Jun 19 13:59:40 2013 +0100 hw/xwin: Remove setjmp()/longjmp() error constants Check specially that setjmp() returned a value which we don't pass to longjmp() seems a bit over-complex. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d0353bbe57aab910a6ef7da8778023a9d39c37df Author: Jon TURNEY Date: Thu Jun 20 00:04:16 2013 +0100 hw/xwin: Move WIN_MSG_QUEUE_FNAME to where it's used Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa0da5a020c2ea9366568375b7f35d3f2ddad680 Author: Jon TURNEY Date: Thu Jun 20 13:04:35 2013 +0100 hw/xwin: Use header for prototypes in textconv.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cbe133752d1e817246b532a274fda3f7d74ebca1 Author: Jon TURNEY Date: Thu Jun 20 12:50:18 2013 +0100 hw/xwin: Remove unused X includes from internal.h and add them where needed Also removing server headers we might clash with and no longer need. Make a few adjustments to allow for this change: - provide a prototype of ErrorF() - use the MAX() macro provided by sys/param.h, not the max() macro provided by misc.h - use the X 'Bool' type rather than the unwrapped Windows 'BOOL' type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 52f3cf3c612b2f33e39fd6f985b840a0d7192a50 Author: Jon TURNEY Date: Wed Jun 19 18:09:07 2013 +0100 hw/xwin: Remove standard includes from internal.h and add them where needed Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5992550c4cf8818d1c47c1e474c3d8c3383983fa Author: Jon TURNEY Date: Mon Jun 17 19:01:19 2013 +0100 hw/xwin: Add xwinclip test client Add xwinclip test client, which includes stubs for winDebug(), ErrorF() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5ae674ae6d6c0b02fd86c5e7b23b8c38b19f180a Author: Jon TURNEY Date: Mon Jun 17 20:03:04 2013 +0100 hw/xwin: Changes in error logging to make libwinclipboard more useful as a library Consistently use ErrorF() rather than winErrorFVerb() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e1cf2b47bea9ff3e64c0ef1e4d0744d9df4bc1b7 Author: Jon TURNEY Date: Mon Jun 17 19:58:20 2013 +0100 hw/xwin: Look up atoms in winClipboardProc() Look up all atoms of interest in clipboard code in winClipboardProc() and pass them down. This avoids the need to check serverGeneration to notice when we need to invalidate cached atom values. Also consistently use cached atom values everywhere, rather than sometimes just doing XInternAtom() again. Remove WIN_LOCAL_PROPERTY as unused now, as we only refer to CYGX_CUT_BUFFER once and do that directly. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit be61a1fc7e25a380f8d506e13b22017492a71913 Author: Jon TURNEY Date: Mon Jun 17 19:07:05 2013 +0100 hw/xwin: Add fUseUnicode as parameter to winClipboardProc() Add fUseUnicode as parameter to winClipboardProc() Access g_fUseUnicode global when calling it Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 126c1cfaa5b5978026d44a1f8b044d367056965b Author: Jon TURNEY Date: Mon Jun 17 18:27:56 2013 +0100 hw/xwin: Separate libwinclipboard interface and internal header files Rename the libwinclipboard internal header from winclipboard.h to internal.h Put libwinclipboard's public interface into winclipboard.h This lets winclipboardinit.c partake of that public interface, and all X server headers without clashes winInitClipboard() prototype belongs in a server header v2: Remove duplicate declaration of winClipboardWindowDestroy() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 30c535219ef2c251d90a1a1d3d07c8a7ec936da9 Author: Jon TURNEY Date: Tue Jun 18 00:32:53 2013 +0100 hw/xwin: Return a shutdown flag from winClipboardProc() if we should stop trying Return a shutdown flag from winClipboardProc(), and use it in winClipboardThreadProc() to determine if we should stop. Currently this is set if the clipboard messaging window received a WM_QUIT. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 88d44597046086953032fec7e035fc036596e255 Author: Jon TURNEY Date: Mon Jun 17 00:38:47 2013 +0100 hw/xwin: Move clipboard integration code down to a subdirectory Move clipboard integration code down to a subdirectory and build as a convenience library Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e965001a732a6b573c374f6a3503e172df01e8ec Author: Jon TURNEY Date: Mon Jun 17 13:18:16 2013 +0100 hw/xwin: Make g_hwndClipboard static Move winFixClipboardChain() into winclipboardthread.c Add winCLipboardWindowDestroy() function to access it for WM_DESTROY Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03a59e7f787a160c6cc07c7a37df64a793242ef2 Author: Jon TURNEY Date: Mon Jun 17 02:01:39 2013 +0100 hw/xwin: Add remaining clipboard globals to winglobals.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8f9fba5bc1499804a6c4a3287d99fe7dab8d6b8f Author: Jon TURNEY Date: Mon Jun 17 02:01:27 2013 +0100 hw/xwin: Hoist use of winSetAuthorization() and winGetDisplayName() up one level Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a3c1e405cb78df9ef18a1158dcaed3c27b3cbffe Author: Jon TURNEY Date: Sun Jun 16 22:35:22 2013 +0100 hw/xwin: Eliminate g_pClipboardDisplay and g_iClipboardWindow globals Eliminate the g_pClipboardDisplay and g_iClipboardWindow globals used to make those values available to the clipboard wndproc, by passing them in via the WM_CREATE message instead. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 229a0a83a44c94ce76eb937d58dc1773a38baa3e Author: Jon TURNEY Date: Sun Jun 16 22:13:26 2013 +0100 hw/xwin: Move winClipboardCreateMessagingWindow() to winclipboardthread.c Move winClipboardCreateMessagingWindow() from winclipboardinit.c to winclipboardthread.c, the only place that uses it, and make it static. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a70c2384a2689cc0346868bb27366c008c01758d Author: Jon TURNEY Date: Mon Feb 13 19:58:37 2012 +0000 hw/xwin: Remove SetSelectionOwner wrapper, use XFixesSetSelectionOwnerNotify event instead Use the XFixesSetSelectionNotify event instead of a SetSelectionOwner wrapper, the completely equivalent client-side mechanism. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab55746c1b179172a82b7a89ec6429b268a1f166 Author: Jon TURNEY Date: Mon Jun 17 01:55:46 2013 +0100 hw/xwin: Remove g_fClipboardLaunched, it's value is identical to g_fClipboardStarted Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 42d13810822f6b48771d77b09c0ef7cc2356ede5 Author: Jon TURNEY Date: Mon Jun 17 01:30:09 2013 +0100 hw/xwin: Hoist setting of g_fClipboardStarted flag up one level Hoist the setting of g_fClipboardStarted flag up one level. Also move up the clearing of the g_fClipboardLaunched at the end of clipboard function. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 290dbff0753ddf60f04da92d5a408c567a2ee3e0 Author: Jon TURNEY Date: Mon Jun 17 01:55:03 2013 +0100 hw/xwin: winProcEstablishConnection doesn't need to check if clipboard started winProcEstablishConnection doesn't need to check if clipboard has already been started. It should be clear that we start the thread only once when the wrapper tells us to, as the wrapper unhooks itself thereafter. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 91e55691ef07735bb866c0f4d3c1a6e2ca167992 Author: Jon TURNEY Date: Sun Jun 16 23:57:17 2013 +0100 hw/xwin: Hoist clipboard thread restart up one level Hoist clipboard thread restart up one level. Note that currently g_fClipboardLaunched is set the first time in the winProcEstablishConnection wrapper, and subsequent times when the clipboard thread restarts itself. Try to clarify this and just set g_fClipboardLaunched before starting the thread. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0bb6eae4e34634abb2679004ace94504a4d65964 Author: Jon TURNEY Date: Mon Jun 17 00:07:01 2013 +0100 hw/xwin: Push winClipboardShutdown() into winclipboardinit.c Push winClipboardShutdown() into winclipboardinit.c This lets us make g_ptClipboardProc static Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6343b531d786dd4a9bb52050c9ef267a04374b57 Author: Jon TURNEY Date: Wed Jan 1 17:54:48 2014 +0000 hw/xwin: Remove left-over pthread_exit() in clipboard code Commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 removed all but one of the pthread_exit() calls which used to call winClipboardThreadExit() Fix the final remaining one to exit via done label on IOError instead. Also fix a comment and report pre-flush failure to log, but do not exit Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d3427717f2c6a473dc3d20631dff653e4e37228e Author: Adam Jackson Date: Wed Jul 2 12:09:52 2014 -0400 xwayland: Snap damage reports to the bounding box Instead of sending every little rect. Lets x11perf run to completion, makes 'while true; do gtkperf -a; done' take longer to crash. This is effectively a resend of the same logic against the old xfree86+xwayland branch: http://lists.x.org/archives/xorg-devel/2013-October/038453.html Reviewed-by: Daniel Stone Reviewed-by: Kristian Høgsberg Signed-off-by: Adam Jackson commit 5ecc0315a2b9bea44ace886f5706a7a3f5cbc4f6 Author: Jasper St. Pierre Date: Mon Jun 30 13:53:50 2014 -0400 xwayland: Implement throttling for surfaces based on the frame event This implements simple throttling that keeps us to one attach per frame. There isn't really an active performance benefit, since the buffers will be redrawn only once per frame anyway, but it does cut down on the chatty network traffic. Since the Wayland sockets might fill up as well, the cut down on the volume of data we send out also provides us with a big stability benefit. Namely, mutter is a lot more stable running gtkperf, a fairly intensive X11 application, after this change. Reviewed-by: Daniel Stone Signed-off-by: Jasper St. Pierre commit 6c442fc4f7d84508665dfdee8a75ec91f50395dc Author: Jasper St. Pierre Date: Mon Jun 30 15:28:16 2014 -0400 xwayland-input: Fix a crasher for a race with the Wayland compositor If something quickly maps and unmaps a window, then we'll immediately create and destroy the Wayland surface that cooresponds to that window. If our mouse pointer is over the window when the surface is created, we'll receive a enter on the window. Since resource creation and destruction is not synchronous, that means that the compositor will queue up an event for a resource that's eventually destroyed. On the client-side, when we receive this message, we note that the resource isn't allocated, and get a NULL surface in our enter handler. We immediately try to dereference this, and then crash. This was caused by running gtkperf while moving the window a lot. Reviewed-by: Daniel Stone Signed-off-by: Jasper St. Pierre commit 1d32004ed5a3a20b2d5879867e213122dced69d0 Author: Michel Dänzer Date: Wed Sep 10 16:20:48 2014 +0900 glamor: Make glyph mask cache per-screen It references a pixmap, which is a per-screen resource. Fixes broken text rendering in xfwm4-tweak-settings in Zaphod mode. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 710d314ad16cf1eaca3b97b1736ff0ca43e598c4 Author: Michel Dänzer Date: Wed Sep 10 16:20:47 2014 +0900 glamor: Track glyph caching information per screen This is necessary because the glyph caches are per screen. Fixes broken menu text in gnome-terminal in Zaphod mode. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit a4e8e6dff9a0c26944a325e4017faa68d93ae5b8 Author: Michel Dänzer Date: Wed Sep 10 16:20:46 2014 +0900 glamor: Move 'glyph caches realized' check to glamor_realize_glyph_caches And rename the boolean to reflect what it's about. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 0acff6e4374340dc391014f396f190daf73d579c Author: Michel Dänzer Date: Wed Sep 10 16:20:45 2014 +0900 glamor: Call glamor_glyphs_init from glamor_create_screen_resources The comment above glamor_glyphs_init was already saying so. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 54a1d4db825be90fb7be138e3267a15922d62f03 Merge: 8f8dcfee2 f92df22a0 Author: Keith Packard Date: Thu Sep 11 18:27:41 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 8f8dcfee2085ba82107a8bf3872a0bb241493409 Author: Alan Coopersmith Date: Thu Sep 4 23:18:03 2014 -0700 Make list tests actually test lists Coverity scan detected that asserts were setting values, not checking them: CID 53252: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53259: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53260: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->a = i has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? CID 53261: Side effect in assertion (ASSERT_SIDE_EFFECT) assignment_where_comparison_intended: Assignment item->b = i * 2 has a side effect. This code will work differently in a non-debug build. Did you intend to use a comparison ("==") instead? Fixing those to be == caused test_nt_list_insert to start failing as part assumed append order, part assumed insert order, so it had to be fixed to use consistent ordering. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d0da0e9c3bb8fe0cd4879ecb24d21715bfaa209b Author: Eric Anholt Date: Thu Sep 4 10:59:40 2014 -0700 glx: Disable indirect GLX contexts by default. Almost every situation of someone running indirect GLX is a mistake that results in X Server crashes. Indirect GLX is the cause of regular security vulnerabilities, and rarely provides any capability to the user. Just disable it unless someone wants to enable it for their special use case (using +iglx on the command line). Signed-off-by: Eric Anholt Acked-by: Keith Packard Signed-off-by: Keith Packard commit bf338efc678258d2d366dff2ed873752f98f0bfc Author: Keith Packard Date: Thu Sep 4 08:36:07 2014 -0700 glx/present: Only send GLX_BufferSwapComplete for PresentCompleteKindPixmap Present didn't provide the 'kind' argument to the present_complete_notify hook that GLX uses to construct GLX_BufferSwapComplete events, so GLX was reporting events for PresentCompleteKindMSC notifications, which resulted in duplicate GLX_BufferSwapComplete events and crashes in clutter. See the gnome bug: https://bugzilla.gnome.org/show_bug.cgi?id=733282 Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7a0c79c8c478bf22ee71c1ea35886a6f555ef2bb Author: Thomas Petazzoni Date: Tue Sep 2 22:03:14 2014 +0200 os/log: adjust gcc version conditions for #pragma In commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 ("gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored"), some compile time conditionals were added around the #pragma usage. Those conditionals ensure that the #pragma are not used on gcc <= 4.2. However, the usage of #pragma diagnostic inside functions was only added in gcc 4.6, and a build failure is therefore experienced with gcc 4.5: log.c: In function 'LogInit': log.c:199:9: error: #pragma GCC diagnostic not allowed inside functions log.c:201:9: warning: format not a string literal, argument types not checked log.c:212:9: error: #pragma GCC diagnostic not allowed inside functions log.c:214:17: warning: format not a string literal, argument types not checked $ ./host/usr/bin/powerpc-linux-gnu-gcc -v [...] gcc version 4.5.2 (Sourcery G++ Lite 2011.03-38) This patch therefore adjusts the compile time conditionals to make sure the #pragma is not used on gcc <= 4.5, and only used on gcc >= 4.6. Signed-off-by: Thomas Petazzoni Acked-by: Keith Packard Signed-off-by: Keith Packard commit da4bad620a6f1a58978f5279fda74da3c1c1d443 Author: Dave Airlie Date: Tue Jul 30 13:50:48 2013 +1000 pixmap: fix reverse optimus support with multiple heads For doing reverese optimus to multiple outputs on a secondary GPU the GPU can store the blits into a large screen pixmap, unfortunately this means we need a destination offset into the dirty code, so add a new API that just adds this interface. Signed-off-by: Dave Airlie Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit e1cc0d3df1fdb6c4393ac455ca038e1e0680bb22 Author: Maks Naumov Date: Thu Aug 21 12:58:16 2014 -0700 glx: Fix 'y ' value in swrastGetDrawableInfo() Signed-off-by: Maks Naumov Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit f92df22a037cb8b672dab2e7aef18a22275f5660 Author: Jon TURNEY Date: Fri Jul 18 15:08:17 2014 +0100 hw/xwin/glx: Remove an incorrect assertion in glxWinDrawableSwapBuffers The piglit test glx_make_current triggers this assertion, by making the context current on a different drawable before issuing a glXSwapBuffers() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b21321e515fc778f87077b7ce47922c43a4ba103 Author: Jon TURNEY Date: Mon Jul 14 19:41:25 2014 +0100 hw/xwin/glx: Downgrade "forcing window to exist" message to debug It happens whenever a GLX client uses GL on a window before it's been mapped, so don't log it like an error. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 31d089633683ea2a2716651c3c48e1456cc595bf Author: Jon TURNEY Date: Wed Jul 16 13:44:33 2014 +0100 hw/xwin/glx: Fix a couple of typo bugs in indirect.c fbConfigToPixelFormatIndex()'s drawableTypeOverride parameter is a drawable type bitmask, not a drawable type enum value WGL_SWAP_COPY_ARB is a value of the WGL_SWAP_METHOD_ARB attribute for wglChoosePixelFormatARB(), not an attribute itself also remove duplicate error reporting for wglChoosePixelFormat() and fix a comment Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b1ea714cdce8444c6ad7778dae04e35c6bcc1750 Author: Jon TURNEY Date: Sun Apr 27 22:10:31 2014 +0100 hw/xwin/glx: Update .gitignore Update to align with rewrite of wrapper generation script in commit 583a1146233f16d861706926706e5feec3baffba Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d1d3bd359670a8f55c9350fd905af32ba6e67d33 Author: Jon TURNEY Date: Sun Mar 30 20:51:36 2014 +0100 hw/xwin/glx: Don't override the server supported GL extensions string. Don't override the server supported GL extensions string. The string reported to the client is the intersection of client, server and GL implementation extensions. Overriding the server supported GL extensions string like this causes extensions which are supported by the client and implementation, but not by the server, to be erroneously reported, so don't change it. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c99cd058a89bbfc9ceab3c91b93451f70351ddce Author: Jon TURNEY Date: Tue Mar 4 22:37:13 2014 +0000 hw/xwin: Add an idempotency guard to glwindows.h Add an idempotency guard to glwindows.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 1c34e774eff6c5a22501833444a10440cf3f915a Author: Jon TURNEY Date: Mon Nov 11 15:09:18 2013 +0000 hw/xwin: Fix a potential crash in winRedrawScreenShadowDDNL() Seen during shutdown when using '-fullscreen' and '-depth 8' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 16d9da08861fe504de4be8c31708592e30687156 Author: Jon TURNEY Date: Thu Feb 18 23:36:27 2010 -0600 hw/xwin: Improve choice of display name used by internal clients Choose the display name used to connect to internal clients and exported into environment of processes started from the traymenu so that it uses a transport we know is working This should mean the server can start correctly with -multiwindow and/or -clipboard and any two of -nolisten inet6, -nolisten inet and -nolisten unix (the server will correctly refuse to start if all 3 are used, as it must be listening on at least one socket) v2: Place prototype for winGetDisplayName() in windisplay.h, and include it where needed. v3: Include xwin-config.h, so that _XSERVER64 is defined, just in case anything relies on that. v4: Replace grovelling around in the server's list of listeners with new Xtrans TransIsListening() interface, added in Xtrans 1.3.3 See also [1] [1] https://sourceware.org/bugzilla/show_bug.cgi?id=10725 Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz Reviewed-by: Colin Harrison commit 95357539c1178a97d8a167461806a280d2803ec4 Author: Jon TURNEY Date: Wed Jan 1 20:34:36 2014 +0000 hw/xwin: Makefile.am cleanup - Rename XWIN_GLX_LINK_FLAGS -> XWIN_GLX_SYS_LIBS for consistency - Rename MULTIWINDOW_LIBS -> MULTIWINDOW_SYS_LIBS for consistency - Don't link with XWin with $(MAIN_LIB), it provides it's own main() - Put one library per line for more intelligible diffs when one is added Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aa40d0c07173209a2c13b332f1168e0df499a19e Author: Jon TURNEY Date: Fri Jun 13 16:16:51 2014 +0100 hw/xwin/glx: When generating shims, limit the considered features to GL version <=1.2 This fixes a problem when using Khronos registry data since the change of 2013-08-16 removed glBlend(Color|Equation) from GL1.2 and added them to GL_ARB_imaging. If shim generation considers all features, no shims are generated for glBlend(Color|Equation) as they are first emitted for GL 1.4 (which we ignore as shims are only generated for GL version <=1.2), then emission for GL_ARB_imaging is skipped as they have already been emitted. Also improve feature name matching so it is exact, not on an initial substring, so 'GL_ARB_texture_compression_bptc' and 'GL_ARB_texture_compression_rgtc' aren't matched by 'GL_ARB_texture_compression'. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 35dc7c75150733dbcef8a18b6796f49a7c48ebee Merge: 3a51418b2 5f3485b06 Author: Eric Anholt Date: Mon Aug 25 15:52:58 2014 -0700 Merge branch 'modesetting-import' into master This reintroduces a "hardware" driver to the xfree86 directory. Unlike the drivers that xorg used to include in the source tree, that needed independent release schedules to get hardware support out the door, the modesetting driver shouldn't change much as new hardware gets released. A lot of what this driver needs to do is just keep up with server ABI changes. This import was done by taking xf86-video-modesetting-0.9.0, and running this script with 'git-filter-branch -f --tree-filter ~/bin/modesetting-filter': mkdir -p hw/xfree86/drivers/modesetting rm -f README autogen.sh configure.ac Makefile.am .gitignore rm -f man/Makefile.am mv man/modesetting.man hw/xfree86/drivers/modesetting/ mv COPYING hw/xfree86/drivers/modesetting/ mv src/* hw/xfree86/drivers/modesetting/ commit 3a51418b2db353519a1779cf3cebbcc9afba2520 Author: Laércio de Sousa Date: Mon Aug 18 08:45:43 2014 -0300 ephyr: set screen size & origin from host X server output's CRTC geometry If a given output is passed via new -output option, Xephyr will query host X server for its info. If the following conditions are met: a. RandR extension is enabled in host X server; b. supported RandR version in host X server is 1.2 or newer; c. the given output name is valid; d. the given output is connected; then Xephyr will get output's CRTC geometry and use it to set its own screen size and origin. It's just like starting Xephyr in fullscreen mode, but restricted to the given output's CRTC geometry (fake "Zaphod mode"). This is the main feature needed for Xephyr-based single-card multiseat setups where we don't have separate screens to start Xephyr in fullscreen mode safely. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 84b02469ef97e6f85d074d220a517d752180045f Author: Laércio de Sousa Date: Mon Aug 18 08:45:42 2014 -0300 ephyr: enable screen window placement following kdrive -screen option extended syntax With this patch, one can launch Xephyr with option "-screen WxH+X+Y" to place its window origin at (X,Y). This patch relies on a previous one that extends kdrive -screen option syntax to parse +X+Y substring as expected. If +X+Y is not passed in -screen argument string, let the WM place the window for us, as before. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 376f4de8ae927748417046390c24afbda24b0583 Author: Laércio de Sousa Date: Mon Aug 18 08:45:41 2014 -0300 kdrive: add support to +X+Y syntax in -screen option parsing This patch enhances current -screen option parsing for kdrive-based applications. It can parse strings like x++, storing X and Y offsets in KdScreenInfo instances. For negative values, this patch supports +-X+-Y (not -X-Y) syntax. It will allow e.g. proper Xephyr window placement for multiseat purposes. Signed-off-by: Laércio de Sousa Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit fe5018e0564118a7a8198fa286186fdb9ed818c7 Author: Takashi Iwai Date: Tue Aug 19 15:57:22 2014 -0500 fb: Fix invalid bpp for 24bit depth window We have a hack in fb layer for a 24bpp screen to use 32bpp images, and fbCreateWindow() replaces its drawable.bitsPerPixel field appropriately. But, the problem is that it always replaces when 32bpp is passed. If the depth is 32, this results in bpp < depth, which is actually invalid. Meanwhile, fbCreatePixmap() has a more check and it creates with 24bpp only when the passed depth <= 24 for avoiding such a problem. This oneliner patch just adds the similar check in fbCreateWindow(). This (hopefully) fixes the long-standing broken graphics mess of cirrus KMS with 24bpp. Signed-off-by: Takashi Iwai Reviewed-by: Keith Packard commit 5d133276de9c50146e80ffc69edd429c2afe98e6 Author: Thierry Reding Date: Thu Feb 13 13:36:12 2014 +0100 xfree86: Allow non-PCI devices as primary On platforms that don't support PCI or have no GPU attached to the PCI bus, there can still be a primary device on a non-PCI bus. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 2f0183222b4279266e6ef60b923738ff55f0afba Author: Thierry Reding Date: Thu Feb 13 13:31:31 2014 +0100 xfree86: Fallback to first platform device as primary When neither of the various bus implementations was able to find a primary bus and device, fallback to using the platform bus as primary bus and the first platform device as primary device. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 33aeec8a11bc75a06d32956bbdd9efb216790a02 Author: Keith Packard Date: Thu Jan 30 16:24:35 2014 -0800 dri3: Don't enable the DRI3 extension unless some screen supports it There's no reason to advertise this extension unless one of the hardware drivers actually supports it. Not listing it means it's slightly easier for users to tell what's going on. On the other hand, not listing it means we may have applications that only check for the extension and not for appropriate per-screen support. I don't think that's a real risk as DRI3 is only useful for systems with deep knowledge of the hardware. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 0d7306ffe2e069f0091c4f174f138127100abb43 Author: Michel Dänzer Date: Wed Aug 13 17:10:21 2014 +0900 glamor: Don't call glamor_copy_fbo_cpu() for GLAMOR_DRM_ONLY pixmaps It results in a crash. Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit c2548d71f7a754251d89696ae49aab2fe07446df Author: Joerg Sonnenberger Date: Mon Aug 11 10:36:01 2014 +0200 Fix format string. Reviewed-by: Keith Packard Signed-off-by: Thomas Klausner Signed-off-by: Keith Packard commit d4111239e698f0126123830429d74da7d24910ed Author: Keith Packard Date: Wed Aug 13 11:30:11 2014 -0700 glamor: Free Xv put image data immediately after use The Xv StopVideo callback is not invoked on textured video ports, so the temporary pixmaps allocated for the video planes are never freed. Freeing the storage immediately after use is a simple solution to this problem which doesn't appear to have any visible performance impact. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit c47ee880e742e15fdbd5f5ac3eba64db6228c09f Author: Eric Anholt Date: Mon Aug 11 15:23:02 2014 -0700 glamor: Don't try to set up core fonts textures when we won't use them. This happens to avoid GL errors on hardware without EXT_texture_integer (which implies < GLSL 130, and thus glamor_text.c programs not compiling anyway). Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit d09c9ddb866dea31e2adf82be329d5d3489718f5 Merge: 606b701c5 ab32ee358 Author: Keith Packard Date: Tue Aug 12 16:34:24 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 606b701c563c10f01dec147e061fa00cda784a9d Author: Michel Dänzer Date: Wed Aug 6 10:30:25 2014 +0900 glamor: Add glamor_copy_fbo_cpu() for CopyArea to non-GPU destination This provides a speedup e.g. when the destination is an SHM pixmap. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76285 Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 1e30fc1b99bda040038e4fd56d1b27c686b44c75 Author: Peter Hutterer Date: Mon Aug 4 10:47:03 2014 +1000 xkb: ignore floating slave devices when updating from master (#81885) Introduced in 45fb3a934dc0db51584aba37c2f9d73deff9191d. When a device is enabled, the master's locked state is pushed to the slave. If the device is floating, no master exists and we triggered a NULL-pointer dereference in XkbPushLockedStateToSlaves. X.Org Bug 81885 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 4599a4492ca6a1c87cd9c537c54fbda11f13c15c Author: Daphne Pfister Date: Wed Jul 23 21:51:57 2014 -0400 os: Regenerate os/oscolor.c from app/rgb #52289 Regenerate os/oscolor.c from rgb.txt. This adds the following colors: aqua, lime, fuchsia, crimson, indigo, olive, rebecca purple, silver and teal. It also adds versions of gray, grey, green, maroon and purple prefixed with web and x11 for the colors that are different between X11 and HTML/CSS web colors. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=52289 Related: https://bugs.freedesktop.org/show_bug.cgi?id=80371 Signed-off-by: nobody Tested-by: Keith Packard Signed-off-by: Keith Packard commit ee9f766abf6fbe0cc36234bfe727aba924e9b5fd Author: Keith Packard Date: Mon Jul 28 12:09:51 2014 -0700 xfree86: [v2] Remove duplicate InputInfoPtr typedef from xf86Xinput.h GCC 4.2 doesn't accept 2 typedef declarations of the same type, so remove the extra one from xf86Xinput.h and have xf86Xinput.h #include xf86.h to make sure everyone using just that file gets the typedef. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Reviewed-by: Matthieu Herrb commit ab32ee35890be51137b56525826ffe219b63eb88 Author: Jeremy Huddleston Sequoia Date: Mon Aug 11 13:15:24 2014 -0700 XQuartz: Better support turning off "Displays have separate Spaces" on OS X Mavericks http://xquartz.macosforge.org/trac/ticket/1876 Follow-up to: 1c10b37380d228b35db8a8616a6312ac54f5e59b Signed-off-by: Jeremy Huddleston Sequoia commit dfbc6a1a78ff3192baae6f7f2af98b6e51422f75 Author: Jeremy Huddleston Sequoia Date: Wed Jul 23 11:53:33 2014 -0700 ListenOnOpenFD: Remove Resets since this is intended to be for hotplugging connections pharris says that the resets should not be done in the hotplugging case. This may fix a crash reported against XQuartz: http://xquartz.macosforge.org/trac/ticket/869 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Harris commit 3714f5401690b288045090c4bcd9cb01c6e4860e Author: Eric Anholt Date: Sun Apr 6 07:57:44 2014 +0100 kdrive: Remove a dead struct. It's never been used in the history of the tree. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit ef258fa4fd0c215b1327fb3d94b37e75af9fae6b Author: Eric Anholt Date: Wed Jul 30 21:11:51 2014 -0700 xv: Drop the ClientPtr from the interface to the DDX. Nobody was using it. v2: Merge the hunk that was accidentally in the previous commit into this one. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 850b268e2b9e49445a22e041a356d8ff26ae2147 Author: Eric Anholt Date: Sat Apr 5 10:55:45 2014 +0100 xv: Remove the no-op AllocatePort/FreePort interfaces. v2: Fix accidentally squashed-in change for dropping client from the arguments, which should have been in the next commit. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v2) commit 41d4a626c6ceb15d5b008dca00c6f5032ddd9556 Author: Eric Anholt Date: Sat Apr 5 10:35:52 2014 +0100 kdrive: Don't bother explicitly clearing new window privates to NULL. Privates are initially cleared to zero by dixInitPrivates(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e311318b35ef4f82996c6e277137569005893b44 Author: Eric Anholt Date: Sat Apr 5 09:11:03 2014 +0100 kdrive: Remove dead KXVPaintRegion(). It's been unused since mach64 was deleted, and now there's a helper in core XV. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 7eac142fb6e8abb011ce59feda3c2d7b04f2b225 Author: Eric Anholt Date: Sat Apr 5 09:09:17 2014 +0100 xv: Fix malloc-failure cases in the fill color key helper. Signed-off-by: Eric Anholt Reviewed-by: Alex Deucher commit ea3f3b0786d58b2ba6a9bbf0a32e734670f54b73 Author: Eric Anholt Date: Sat Apr 5 09:07:18 2014 +0100 xv: Move xf86 XV color key helper to core. Color key overlay implementations want to reuse this code, and XF86's had bugs (to be fixed in the next commit). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b01cfe5f23766b9c13ed6bd889263d5d7a8a351d Author: Eric Anholt Date: Fri Apr 4 22:58:37 2014 +0100 xv: Move CloseScreen setup from a DIX hook to normal wrapping. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 6a71ee79aabe6b611cae443a49786824a0322313 Author: Eric Anholt Date: Fri Apr 4 18:02:14 2014 +0100 xv: Drop unused XvdiVideoStopped(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4a095902a37cb98d7954d0873dcf1376cbab54b8 Author: Eric Anholt Date: Fri Apr 4 18:01:07 2014 +0100 xv: Drop unused XvdiPreemptVideo(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e7dde86f2343832c52ef74f5c4fe44a72054c79b Author: Eric Anholt Date: Fri Apr 4 17:54:58 2014 +0100 xv: Move the DDX XV screen private allocation into the DDXes. XV was going against convention by having the core infrastructure allocate the private on behalf of the DDX. I was interested in this because I was trying to make multiple pieces of DDX be able to allocate adaptors, and that wasn't going to work if DDX-specific code was hung off of a single global screen private. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a146c6d4212ed199002e40419b4aa22da8f49e3a Author: Eric Anholt Date: Fri Apr 4 13:12:34 2014 +0100 xv: Drop the ddQueryAdaptors() interface. The core was passing pointers to pxvs's nAdaptors and pAdaptors, and the two hardware implementations were copying pxvs's nAdaptors and pAdaptors into those pointers. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit cb42805c6675bbb9f0b37609fe2ffecc07f46290 Author: Eric Anholt Date: Fri Dec 27 21:54:26 2013 -0800 xv: Move common code for adaptor cleanup to xvmain.c Since any DDX XV screen cleanup would need this same code for freeing the tree of pointers for xv adaptors, move it to the dix. v2: Unconditionalize the pPorts freeing, to match the block above it. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) commit 8cb0da29404d3fed13c1cbedb5c6164e4733ea82 Author: Eric Anholt Date: Fri Dec 27 20:59:12 2013 -0800 xv: Remove dead VIDEO_NO_CLIPPING from the xorg and kdrive DDXes. As far as I can see, nothing has ever used this flag except possibly the i.mx6 xorg ddx debug during bringup. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit a6ec7d5278405d69e60cca2964006fb7ce32c556 Author: Eric Anholt Date: Fri Dec 27 20:53:00 2013 -0800 xv: Remove dead VIDEO_INVERT_CLIPLIST from the xorg and kdrive DDXes. As far as I can see (looking at trees on my disk, plus googling for the term), nothing has ever used this flag Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e6c8c7e46c79b2837a7d0b12079a47734eff1eb7 Author: Egbert Eich Date: Mon Aug 4 19:16:30 2014 +0200 BellProc: Send bell event on core protocol bell when requested XKB allows to override the BellProc() ringing the 'keyboard bell': instead an event is sent to an X client which can perform an appropriate action. In most cases this effectively prevents the core protocol bell from ringing: if no BellProc() is set for the device, no attempt is made to ring a bell. This patch ensures that an XKB bell event is sent also when the core protocol bell is rung end thus an appropriate action can be taken by a client. Signed-off-by: Egbert Eich Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit e8373e4b6a793b48487b1a82d798d97b5c9a10a3 Author: Keith Packard Date: Thu Jul 31 19:57:53 2014 -0700 Add X_BYTE_ORDER to xorg-server.h Drivers don't get to use dix-config.h, they use xorg-server.h instead. Add X_BYTE_ORDER to that file so drivers can see the value. Signed-off-by: Keith Packard Reviewed-by: Michel Dänzer commit e31564e1a21e73f4d20d6471da4fc7a9b63e4062 Author: Michel Dänzer Date: Thu Jul 31 08:35:13 2014 -0700 Check for dix-config.h or xorg-server.h before using X_BYTE_ORDER Now that servermd.h depends on X_BYTE_ORDER being defined in dix-config.h or xorg-server.h, check to make sure one of those has been included before using the value. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 61afe950e6a1a640ad9c5368549914ea32b90d48 Author: Keith Packard Date: Mon Jul 21 19:27:20 2014 -0700 xfree86/modes: rotation damage is automatically destroyed on close Don't try to destroy rotation_damage in the xf86RotateCloseScreen; it will have been destroyed when the screen pixmap was destroyed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 40dc81154ad38514793f2181447d597b57d39e80 Author: Keith Packard Date: Sun Jul 20 18:57:42 2014 -0700 present: Avoid crash at server shutdown When a present flip operation is still in process during server reset, the call to present_set_abort_flip may not happen until the screen is being closed, at which point there is no root window to set pixmaps for. Check to make sure there's a window before resetting window pixmaps. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 627bce80894647c681b146a709aad4c390b4374e Author: Keith Packard Date: Sun Jul 20 18:53:52 2014 -0700 present: Make window MSC offset 0 initially The MSC offset used by a window is adjusted as the window moves between screens, and between shown/unshown. The value shouldn't matter, but it's helpful for debugging to have window MSC values be the same as the CRTC MSC at first. This patch introduces a unique CRTC value so that Present can detect the first time a window is a PresentPixmap destination and set the MSC offset to zero, rather than using the fake MSC value as the previous window MSC. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bd4198b01f2baf2284e61ea7ebf4600f554800e9 Author: Keith Packard Date: Fri Jul 18 11:19:01 2014 -0700 xfree86: Avoid compiler warning for unused vars without systemd When systemd isn't being used, systemd_logind_release_fd is defined as an empty macro, leaving the arguments unused. Fix the compiler warnings by simply removing the local variables and referencing the structure within the macro call. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit b063a185ab9d2c54669fb6e036fdbae3707c9e4b Author: David Ung Date: Tue Jul 29 15:01:39 2014 -0700 randr: Fix logic in RRPointerToNearestCrtc RRPointerToNearestCrtc is suppose to snap to the nearest Crtc, but best_x and best_y is always positive, hence when calling SetCursorPosition it will make the cursor even further away. Correct delta x/y to allow negative values and also use "width/height -1" in the calculation. Also choose the closest Crtc by setting the "best" value. Signed-off-by: David Ung Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 90803042bcbb9dc6261b5d112acf5613829d9f70 Author: Keith Packard Date: Wed Jul 30 10:13:53 2014 -0700 Fix files including xorg-server.h by mistake A few files in the server are including xorg-server.h, which is only for use by Xorg server drivers. This fixes those errors and then adds a check to make sure it doesn't happen again. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a08e7a098aa37351294a25fe62b7ff6e95622e64 Author: Adam Jackson Date: Tue Jun 24 14:21:57 2014 -0400 dri1: Remove unused DRI{,Post}ValidateTree i810, mga, savage, and tdfx do reference these slots, but only to set them to NULL, so while this does have API impact it's not actually used. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5486c834fa3eebd79a4811143e513d6a92b7e504 Author: Adam Jackson Date: Tue Jun 24 14:16:55 2014 -0400 xquartz: Remove unused DRI{,Post}ValidateTree Cargo-culted from DRI1, not actually used for anything. Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a5e7701058c676231d2bc3f9a0c7c0fa9da7ad45 Author: Adam Jackson Date: Wed May 28 14:48:14 2014 -0400 xkb: Remove some fascinating paranoia from event emission XkbInterestPtrs are created by clients that already exist, meaning, clients that have already had ProcVector installed as something other than InitialProcVector. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit ac3af4bd21394291ef6dd9cfcdd8ce6fceefec40 Author: Adam Jackson Date: Tue Jun 17 12:58:41 2014 -0400 xfree86: Remove unused HardEdges Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 4100687ea667970733c3aa69f704be0e3747f9fd Author: Adam Jackson Date: Mon Jun 23 15:42:23 2014 -0400 xfree86: Remove useless #include "fb.h" Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 2d451c5cdc7f81ea0c94c3542fab45027f829736 Author: Adam Jackson Date: Thu May 22 14:04:16 2014 -0400 xfree86: Remove pointless xf86RandRCreateScreenResources Given the #if 0 this was wrapping for no effect. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a8cca7bd5ad7ea36a9585f4927ed53cfa6db1daf Author: Adam Jackson Date: Fri May 2 11:43:14 2014 -0400 xfree86: Remove protectMem from VidMemInfo Never filled in. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e4cf1e58f5745dd39a9dd5eb29acd1cb28710094 Author: Adam Jackson Date: Fri May 2 11:11:14 2014 -0400 xfree86: Remove unused xf86{Map,Unmap}LegacyIO I ported these to pciaccess in: commit 858fbbb40d7c69540cd1fb5315cebf811c6e7b3f Author: Adam Jackson Date: Fri Sep 16 13:33:04 2011 -0400 pci: Port xf86MapLegacyIO to pciaccess As of yet there are still no drivers using them, and there's not a lot of value in having the wrappers when they just trivially call pciaccess anyway. Nuke 'em. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 96206cf47752af3fc8ca14dc1e03c59ed482167f Author: Adam Jackson Date: Tue Jul 8 13:19:08 2014 -0400 xfree86: Remove deprecated PCI types Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 46fd5a28ef7191b5ad0244f849c756dd2c5f43b6 Author: Adam Jackson Date: Fri May 2 11:09:53 2014 -0400 xfree86: Remove some unused pre-pciaccess types Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 3bb9f9862b5bea3720ba7922714af729cab38776 Author: Adam Jackson Date: Fri Feb 28 13:31:08 2014 -0500 xfree86: Remove xf86ConfigActivePciEntity The giant OBSOLETE DO NOT USE comment has been there since 2000, probably it's safe to nuke by now. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 51531a67179e342f6ad798de21accf014748a04f Author: Adam Jackson Date: Tue Jun 10 13:10:28 2014 -0400 vgahw: Nuke unused vgaCmap.c Never been built since m12n, can't be needed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 2db71b232c4756773562182cadb7ccdf5194a62d Author: Adam Jackson Date: Tue Jun 10 13:00:11 2014 -0400 saver: Don't open-code IsMapInstalled Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit dd0e8491f75afbd72bea17172a042aa45ff7e30b Author: Adam Jackson Date: Fri Jun 20 12:36:10 2014 -0400 render: Remove unused CopyPicture Arguably this would be useful API, but it's never called, and a careful reading of the CPClipMask path reveals that callers would be fairly disappointed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 578026fcd58d12dd0be4c0976ee5ecf95a9d61f0 Author: Adam Jackson Date: Tue May 20 12:43:59 2014 -0400 os: Remove LocalClientCred The comment lies, shm hasn't used this code since: commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 Author: Alan Coopersmith Date: Tue Oct 9 18:44:04 2007 -0700 Sun bug 6589829: include zoneid of shm segment in access [...] Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit cad9b053d52f62432dfd70e42e0240de77027cae Author: Adam Jackson Date: Tue Jul 8 13:24:25 2014 -0400 os: Remove deprecated malloc/free wrappers Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit d5b279977236c4f80a8ba81db1f81a314484facf Author: Adam Jackson Date: Thu May 22 13:58:45 2014 -0400 miext/shadow: Remove shadowInit This code is nonsensical. You end up creating a screen-sized pixmap that's totally detached from everything else, which you then listen for damage on, which means you'll never hear any damage, which means your shadow update hooks will never get called. Any driver using this would be sorely disappointed. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit cf4793d99ecee4dfd6094e02b1ccb89eb744d313 Author: Adam Jackson Date: Fri Feb 28 15:36:31 2014 -0500 miext/shadow: Remove ancient backwards-compatibility hack Here's a trip down memory lane. Back when we merged kdrive we adopted kdrive's version of shadow, which used damage directly instead of hand-rolling it. However a couple of Xorg drivers referred to the accumulated damage region in the shadow private directly, so I added a hack to copy the damage region around. That was 9148d8700b7c5afc2644e5820c57c509378f93ce, back in early 2006. Eight years is unusually patient for me. The neomagic and trident drivers were still relying on this, but they've been modified to ask the damage code for the region instead. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 35eabf2e5272e17e6765027d4baea43b34c66933 Author: Adam Jackson Date: Tue Jul 8 14:11:22 2014 -0400 mi: Remove apparently unused miSegregateChildren This came in between XFree86 4.3 and 4.4, I'm not entirely sure what it was meant to do. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 150acef3af9bb43cb60cbcc558ef3ad4a710e624 Author: Adam Jackson Date: Mon May 19 13:46:12 2014 -0400 kdrive: Remove some dead bits of the man page Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 71ef49062ee33ac49033fbcd67bab88120882668 Author: Adam Jackson Date: Fri Feb 28 14:05:25 2014 -0500 dix: Make some LBX-era code more obvious isItTimeToYield in the conditional effectively didn't do anything here. Take it out, and remove the comment since LBX proxies aren't a thing for us anymore. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a317e0a974c1597d55fe05a38b4a495c4e4e8d71 Author: Adam Jackson Date: Fri May 2 11:50:17 2014 -0400 bsd: Remove some reference arm code behind #if 0 git history is reference enough, thanks. Reviewed-by: Alex Deucher Signed-off-by: Adam Jackson commit 8a60d1c3f4a62675cad005107f56413f946ecd77 Author: Keith Packard Date: Mon Jul 28 11:10:15 2014 -0700 glamor: Eliminate diagonal tearing in xv This uses a single large triangle and a scissor to draw the video instead of two triangles. Signed-off-by: Keith Packard Reviewed-by: Alex Deucher commit 29eaa61cb210e0c67004bc567af0c15d48aad626 Author: Adam Jackson Date: Tue Jul 22 11:05:32 2014 -0400 mi: Remove semi-arbitrary arch awareness in packed coordinate macros The majority of arches end up on the right-shift path here. I can't think of any arch where that'd be slower than a divide, and semantically it makes more sense to think of this as a shift operation anyway. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 6ddd164508f81e9582b66061b385bd34ac1ccb7e Author: Adam Jackson Date: Tue Jul 22 10:59:13 2014 -0400 xfree86: Unify the ppc/sparc mmio-swap-or-not conditionals Map SPARC_MMIO_IS_BE and PPC_MMIO_IS_BE to MMIO_IS_BE and use the same macros for both since they're identical. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 8ffd1c066ab1e993d8964aef12a7c585329c677c Author: Adam Jackson Date: Tue Jul 22 10:59:12 2014 -0400 xfree86: Clean up some silly __sparc macro usage The top of this file already defines __sparc__ if __sparc is defined. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 1c1711b57f2c278c0df03bf9e7e9a1776a546968 Author: Adam Jackson Date: Tue Jul 22 10:59:11 2014 -0400 xfree86: Pull generic barrier() definition up to top level And remove the redundant redecl from the nds32 section. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit c73929bbfc14ba80397c53ca98d3b503c807ae78 Author: Adam Jackson Date: Tue Jul 22 10:59:10 2014 -0400 xfree86: Remove MMIO_ONB* and friends Non-barrier-emitting MMIO writes. They appear to be utterly unused, burn it all down. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 9b33e31d4160dc484ee569740f883f4d34e10653 Author: Adam Jackson Date: Tue Jul 22 10:59:09 2014 -0400 xfree86: Clean up powerpc barrier decls I think the externs are there for the non-gcc case? And maybe there was some assembly code to implement that once? Whatever, at this point on ppc the compiler is either gcc or willing to pretend. The macros below the decls take care of the actual eieio so the externs can just go. Also remove a comment that maybe made sense once upon a time. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit b5141a1fab4d45c1af62db8dc712deb9776668a9 Author: Adam Jackson Date: Tue Jul 22 10:59:08 2014 -0400 xfree86: Simplify a bunch of OS and arch conditionals All of this is inside #ifdef __GNUC__, between that and configure.ac we can assume there's a unixy thing under us. Given that there's no real reason to limit the arch paths to particular OSes, so let's not. The final #elif here, combined with the ones before it, effectively said "if not (alpha amd64 sparc* mips* ppc* arm* nds32 m68k sh hppa s390 m32r)", and as the comment above it hints, it's meant to cover i386 (and happens to also cover itanic). Flip the conditional around to be sensible. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 6d3ba80f197b04b6e0814190cf5c678c786c14d6 Author: Adam Jackson Date: Tue Jul 22 10:59:07 2014 -0400 xfree86: Remove pre-2.6 Linux ppc support 2.6.0 was December 2003, you've had plenty of time to get your head in the game. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit e242e82eba17414603c8806fffc9ecd235eebabb Author: Adam Jackson Date: Tue Jul 22 10:59:06 2014 -0400 xfree86: Remove a useless !__SUNPRO_C guard You can't tell from context here, but this is all inside #ifdef __GNUC__, so this conditional can't do squat. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 93745a6c1afc830759219f8632ec565d83c7bc12 Author: Adam Jackson Date: Tue Jul 22 10:59:05 2014 -0400 xfree86: Undef GCCUSESGAS Can't be needed, we've never defined it in modular xserver. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit b1d9bc8d1d828b0dedda46da98628b47915e6a04 Author: Adam Jackson Date: Tue Jul 22 10:59:04 2014 -0400 xfree86: Remove an unlikely bit of #pragma __USLC__ appears to mean the SCO OpenServer compiler, which configure.ac doesn't think is an OS the xfree86 ddx supports. The conditionals surrounding these pragmas effectively mean "if not gcc and not Sun C", and probably arbitrary pragmas aren't supported by arbitrary compilers. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit f7f9ccef1dc251a1b95ca698ac39bd0a47f0c8fa Author: Adam Jackson Date: Tue Jul 22 10:59:03 2014 -0400 xfree86: Undef __HIGHC__ MetaWare High C++ compiler? xfree86 cvs history shows this being added in a commit whose text is, classically, "updates". metaware.com redirects to a 404 on synopsys.com, which to me indicates it's not super important to them, and their order form won't even tell you how much the thing costs. At any rate if this is worth worrying about it's worth letting autoconf worry about for us. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 80446086b9cfcc5e23a400d7fa38ec773fae68fc Author: Adam Jackson Date: Tue Jul 22 10:59:02 2014 -0400 xfree86: Undef FAKEIT I guess this is meant to stub out all I/O port calls? Whatever, it's not been defined by the buildsystem at least as far back as monolith 6.8.2. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 8002b1a8cb18ecc6526e8ebfd769767f8991ebd6 Author: Adam Jackson Date: Tue Jul 22 10:59:01 2014 -0400 xfree86: Remove a few random ppc decls Whatever these are, they're not something grep can find, they must not be used. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 5f5af5d6692b625f6231c8bca3ac801f2ac75717 Author: Adam Jackson Date: Tue Jul 22 10:59:00 2014 -0400 xfree86: Remove remaining unused unaligned accessors Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit d28b788e11182d134bce5a414359841b37b62ac0 Author: Adam Jackson Date: Tue Jul 22 10:58:59 2014 -0400 xfree86: Move generic unaligned helpers into int10 code This is the only place they're actually used (well, aside from some XAA code in the s3 driver, but one s3 and 2 XAA). Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 956a8d5c92a66ddd8d00e63a95b17cfd376fe424 Author: Adam Jackson Date: Tue Jul 22 10:58:58 2014 -0400 xfree86: Remove unused unaligned int64 helpers Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit da2b2671863655776d60102ddc7af61470d14022 Author: Adam Jackson Date: Tue Jul 22 10:58:57 2014 -0400 xfree86: Unspecialize gcc variants of unaligned memory access Yes yes, very clever, memmove works fine on gcc too, let's just do the portable thing since none of this is performance code. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit e03c902e03dea7a6a98ad5fb00580b9404b67c4d Author: Adam Jackson Date: Tue Jul 22 10:58:56 2014 -0400 xfree86: Undefine NO_INLINE Nothing in the server defines this, nor do any drivers. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit f63b8e44ab278dd65be93146790bf150717fc1c8 Author: Adam Jackson Date: Tue Jul 22 10:58:55 2014 -0400 xfree86: Remove MMIO_MOVE32 Only used by mach64's XAA code, which isn't built if XAA isn't available, and it isn't. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 1100935650cc0032709d095d6d5a5f136bec99b9 Author: Adam Jackson Date: Tue Jul 22 10:58:54 2014 -0400 xfree86: Remove nds32_flush_icache I guess this might have been needed for elfloader, except we didn't support nds32 back then, so I assume this was cargo-culted from ppc_flush_icache, which is also dead now. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit eb76228080da6fb28c34c903a9854aebe157d2c7 Author: Adam Jackson Date: Tue Jul 22 10:58:53 2014 -0400 xfree86: Remove #include "compiler.h" from places that don't need it Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 4afedf545b673282f2e214c0e2c759c9be9b9a2a Author: Ross Burton Date: Wed Jul 9 11:33:23 2014 +0100 configure.ac: add option for xshmfence xshmfence is usable outside of DRI3, and is currently autodetected which isn't good for distributions where deterministic builds are desired. Signed-off-by: Ross Burton Reviewed-by: Matt Turner Signed-off-by: Keith Packard commit 2172714c67d8701aa54c202e89f246f1dddac80a Author: Carlos Garnacho Date: Tue Jul 22 17:55:25 2014 +0200 xwayland: Only disable/enable devices on capabilities change Anytime a capability is first reported, the device is created, but after that, it is only disabled/enabled. This is a closer behavior to what Xorg does on VT switch, at the expense of maybe leaving a dangling "physical" device if a capability goes for good. Otherwise, any DeviceIntPtr (re)created after server initialization will be left floating, and bad things happen when the wayland enter event handler tries to update cursor position based on a floating device. Signed-off-by: Carlos Garnacho Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 556cdf8fe870bc23e0393c0eed15c86f49a0b9f8 Merge: 83701c4ee 1faa76670 Author: Keith Packard Date: Thu Jul 24 16:51:00 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 83701c4ee8f79f69f4286ef262cd3ae3922629b9 Author: Adam Jackson Date: Mon Jul 21 10:21:07 2014 -0400 xfree86: Remove i2c multimedia modules These came in with the GATOS merge I think. The only driver using them was radeon, and then only in UMS mode. The radeon driver dropped UMS support from the main branch about two years ago, the UMS branch hasn't been touched in about fifteen months, and does not build against 1.16 in any case, so this is all dead code. Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 4302484ef2e67b2e05756c7ee0834dce938f1b44 Author: Adam Jackson Date: Mon Jul 21 10:06:53 2014 -0400 dix: Remove arch awareness from servermd.h (v2) At this point we have no architectures where image byte order is different from bitmap bit order, or where either of those two are not also the native word endianness. Hooray, one more place where we don't have to worry about enabling new CPU architectures. v2: Rebase to master to handle the addition of ppc64le, arc, and xtensa, and use autoconf's endianness detection instead of gcc predefines. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 860cd209679a2e56460977882b3b3826ddcb8710 Author: Adam Jackson Date: Mon Jul 21 10:06:52 2014 -0400 dix: Remove a weird case of little-endian s390 I really don't think this was ever correct, but I'm also not sure what non-Linux Unix this was meant to enable. The only one I know of was OS/390 / z/OS / OpenEdition, but I think that was big-endian too. At any rate this is all about to go away, so this is just removing an edge case. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit f593d76de76a645e29af5dd457ad1fd5a30736cc Author: Adam Jackson Date: Mon Jul 21 10:06:51 2014 -0400 dix: Remove wacky sparc special casing (v2) This appears to be defining sparc if ever __sparc or __sparc__ were defined, which is almost reasonable, but these days we want to be using the __arch__ style. Why any of this would ever be triggered on m68k is truly a mystery for the ages. v2: Fix commit message, as noted by nix Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 17c3347f14822b9f7da4253c71f6ed51be2b38d1 Author: Adam Jackson Date: Mon Jul 21 10:06:50 2014 -0400 dix: Default GLYPHPADBYTES to 4 This effectively no longer varied across architectures anyway. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 094b76735cb99b9f26e21f32170614454c644653 Author: Adam Jackson Date: Mon Jul 21 10:06:49 2014 -0400 dix: Remove some cfb leftovers These macros meant something in cfb, but not in fb. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit fee9a1536651ace9324b956df809ef22a63938f8 Author: Adam Jackson Date: Mon Jul 21 10:06:48 2014 -0400 dix: Remove some dead macros Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 634aa310c5130ef4d38f339bb26b01b5a7bad4e9 Author: Adam Jackson Date: Mon Jul 21 10:06:47 2014 -0400 dix: (Don't) change BITMAP_SCANLINE_UNIT on Linux s390{, x} Every other architecture sets this to 32, and I can't think of any benefit s390 would derive from changing it. It is, at any rate, something the client already copes with, and the only internal code impact seems to be some complicated math in miGetPlane, which you never hit if you're using fb. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit f6469f1910c72add358b7263d69bd116b4450ece Author: Adam Jackson Date: Mon Jul 21 10:06:46 2014 -0400 dix: Remove some XFree86 3.x leftovers Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 5aaacb501ff26bad391664cc7367bfe5164f72c7 Author: Adam Jackson Date: Mon Jul 21 10:06:45 2014 -0400 dix: Remove an ancient IBM configuration Whatever unix this was meant to be is either no longer in circulation, or is AIX, which we don't claim to support anyway. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 06268a0c55b7ce2737bdaa39f11cce07efa8bfa3 Author: Aaron Plattner Date: Sat Jul 19 09:59:07 2014 -0700 xfree86: Remove stale /usr/share/X11/xorg.conf.d hard-code from the xorg.conf man page I forgot that the old behavior of searching in /usr/share/X11/xorg.conf.d was documented in the man page. Signed-off-by: Aaron Plattner Fixes: acc0b5edd1dc ("xfree86: Only support one sysconfigdir") Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 1faa76670572e3478965fd2cd9ab60ab2d865e3a Author: Jeremy Huddleston Sequoia Date: Sat Jul 19 17:08:09 2014 -0700 mieq: Fix a crash regression in mieqProcessDeviceEvent (lldb) bt * thread #6: tid = 0x92d4eb, 0x00000001001dee94 X11.bin`mieqProcessDeviceEvent(dev=0x0000000000000000, event=0x0000000100298bb0, screen=0x0000000000000000) + 36 at mieq.c:519, stop reason = EXC_BAD_ACCESS (code=1, address=0x44) * frame #0: 0x00000001001dee94 X11.bin`mieqProcessDeviceEvent(dev=0x0000000000000000, event=0x0000000100298bb0, screen=0x0000000000000000) + 36 at mieq.c:519 frame #1: 0x00000001001df3eb X11.bin`mieqProcessInputEvents + 555 at mieq.c:631 frame #2: 0x0000000100017674 X11.bin`ProcessInputEvents + 20 at darwinEvents.c:422 frame #3: 0x0000000100175eaa X11.bin`Dispatch + 154 at dispatch.c:357 frame #4: 0x0000000100181b4a X11.bin`dix_main(argc=4, argv=0x00007fff5fbff750, envp=0x00007fff5fbff650) + 1594 at main.c:296 frame #5: 0x000000010001ba80 X11.bin`server_thread(arg=0x0000000101208220) + 64 at quartzStartup.c:66 frame #6: 0x00007fff89bb9899 libsystem_pthread.dylib`_pthread_body + 138 frame #7: 0x00007fff89bb972a libsystem_pthread.dylib`_pthread_start + 137 frame #8: 0x00007fff89bbdfc9 libsystem_pthread.dylib`thread_start + 13 Regression from: 9fb08310b51b46736f3ca8dbc04efdf502420403 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit cff12936275db2f71f6d24f9ea0985a0d14af454 Author: Keith Packard Date: Fri Jul 18 21:46:23 2014 -0700 glamor: sync_fence_set_triggered should use glFlush, not glFinish I intended to use glFlush all along, but somehow managed to type glFinish instead. glFlush is sufficient (for a single-queue GPU) to ensure serialization between queued rendering in the X server and future rendering from the client. Signed-off-by: Keith Packard Reviewed-by: Jasper St. Pierre commit cfa302d6224d10860e60491333950544c4fb9b04 Author: Keith Packard Date: Fri Jul 18 11:16:27 2014 -0700 glamor: Add support for SHM sync fences This hooks up SHM sync fences to complete the requirements for DRI3 running on Glamor. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ac3acab1311c47cc73e2681e575f0407284c3c66 Author: Colin Walters Date: Fri Jul 18 09:13:54 2014 -0400 xf86platformBus: Add assertion to avoid (fatal) compiler warning Compilation of -video-intel started failing in gnome-continuous, it's because xserver has -Werror=return-type on, and gcc can't prove this function always returns a value: /usr/include/xorg/xf86platformBus.h:119:1: error: control reaches end of non-void function [-Werror=return-type] Let's add assertions to the accessor functions to fix this. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5c2e9fa3d6c4bdf626fededce866056ba8eca502 Merge: e678b4971 6d4954884 Author: Keith Packard Date: Thu Jul 17 20:06:21 2014 -0700 Merge remote-tracking branch 'anholt/glamor-next' commit 6d4954884908ea9894fcfe9836db1ba7bb45be61 Merge: 9ddcb20f4 55f5bfb57 Author: Eric Anholt Date: Thu Jul 17 18:00:44 2014 -0700 Merge remote-tracking branch 'origin/master' into glamor-next I've done this merge manually to resolve the minor conflict in glamor.c. Signed-off-by: Eric Anholt commit 9ddcb20f47b5e199989c8990512b0bca1354af86 Author: Eric Anholt Date: Mon Jun 16 07:24:09 2014 +0100 glamor: Drop the "are we doing a series of blits or draws" logic. It's unused since keithp's copy acceleration code completely replaced glamor_copyarea.c and removed the blit path. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b03a581d8cbe3f29140935063b865285e2a00333 Author: Eric Anholt Date: Mon Jun 16 07:15:58 2014 +0100 glamor: Remove a dead prototype. The corresponding code was deleted in 2ff41008494e6c5909c058f1f80b4f66617dada1 (2012) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b5f94df319469ad44b0e88374a0d389414803f7a Author: Eric Anholt Date: Mon Jun 16 07:06:30 2014 +0100 glamor: Drop dead glamor_restore_pixmap_to_texture(). Unused since the glamor_prepare.c replacement of glamor_finish_access(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 98155bd9d9b2a15a4dbcf80b2b57a7636efb14da Author: Eric Anholt Date: Mon Jun 16 07:01:28 2014 +0100 glamor: Drop dead glamor_download_pixmap_to_cpu() Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit b6181007de357da58125e022992f165b10eda65d Author: Eric Anholt Date: Mon Jun 16 07:04:01 2014 +0100 glamor: Drop dead get/pub sub pixmap functions. These were replaced by the new glamor_prepare.c code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e310387f443b6333edf02c8980daa303505382b4 Author: Eric Anholt Date: Sun Jan 12 10:19:10 2014 -0800 glamor: Remove always-true yInverted flag. All users of glamor had the same value set, and it complicated things for no reason. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit d71ecbb458c15fda608654b78d99683ebeab3c60 Author: Eric Anholt Date: Sun Apr 6 07:22:26 2014 -0700 glamor: Drop constant arguments to glamor_solid(). After keithp's change to drop the old glamor_fill() code, nothing ever changed these values. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit db9bff5c389f96991df8d6c62df1174e62e937d3 Author: Eric Anholt Date: Wed Apr 2 12:09:47 2014 -0700 glamor: Drop unnecessary glTexParameteri() in upload of texture data. We're not drawing, and we're not initially setting up the texture for later drawing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 1140a89d7762540965ff865d154cb0528049066f Author: Eric Anholt Date: Wed Apr 2 12:12:06 2014 -0700 glamor: Use MIN/MAX macros to clean up glamor_transfer.c Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 2ab0fba9df695f19f0b43321d01395736f865c69 Author: Eric Anholt Date: Wed Apr 2 13:41:09 2014 -0700 glamor: Drop unnecessary glTexParameteri() in SetSpans(). If this path needed the filters set, so would all the other glDrawArrays() callers. But they don't. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit e678b4971b666e65a99c141e0a5f33969aa701b7 Author: Keith Packard Date: Tue Jul 15 17:31:59 2014 -0700 xfree86: Provide backward-compatibilty API for OdevAttributes This allows drivers to compile using the old OdevAttributes API against a new server. It generates compiler errors if the caller uses the wrong or undefined attribute types, or if the caller provides an incorrect default value for an integer attribute. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 60c05ce1ab5d9dc7c034b6b3723f43a42ea637d8 Author: Keith Packard Date: Tue Jul 15 17:31:58 2014 -0700 config: Replace OdevAttributes linked list with struct OdevAttributes are a fixed set of values with known types; instead of storing them in a linked list and requiring accessor/settor functions, replace the list header, struct OdevAttributes, with a struct that directly contains the values. This provides for compile-time typechecking of the values, eliminates a significant amount of code and generally simplifies using this datatype. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 55f5bfb578e934319d1308cbb56c900c5ac7cfa7 Author: Keith Packard Date: Wed Jul 16 16:03:23 2014 -0700 glamor: Fix temp picture coordinates in glamor_composite_clipped_region To understand this patch, let's start at the protocol interface where the relationship between the coordinate spaces is documented: static Bool _glamor_composite(CARD8 op, PicturePtr source, PicturePtr mask, PicturePtr dest, INT16 x_source, INT16 y_source, INT16 x_mask, INT16 y_mask, INT16 x_dest, INT16 y_dest, CARD16 width, CARD16 height, Bool fallback) The coordinates are passed to this function directly off the wire and are all relative to their respective drawables. For Windows, this means that they are relative to the upper left corner of the window, in whatever pixmap that window is getting drawn to. _glamor_composite calls miComputeCompositeRegion to construct a clipped region to actually render to. In reality, miComputeCompositeRegion clips only to the destination these days; source clip region based clipping would have to respect the transform, which isn't really possible. The returned region is relative to the screen in which dest lives; offset by dest->drawable.x and dest->drawable.y. What is important to realize here is that, because of clipping, the composite region may not have the same position within the destination drawable as x_dest, y_dest. The protocol coordinates now exist solely to 'pin' the three objects together. extents->x1,y1 Screen origin of clipped operation width,height Extents of the clipped operation x_dest,y_dest Unclipped destination-relative operation coordinate x_source,y_source Unclipped source-relative operation coordinate x_mask,y_mask Unclipped mask-relative operation coordinate One thing we want to know is what the offset is from the original operation origin to the clipped origin Destination drawable relative coordinates of the clipped operation: x_dest_clipped = extents->x1 - dest->drawable.x y_dest_clipped = extents->y1 - dest->drawable.y Offset from the original operation origin: x_off_clipped = x_dest_clipped - x_dest y_off_clipped = y_dest_clipped - y_dest Source drawable relative coordinates of the clipped operation: x_source_clipped = x_source + x_off_clipped; y_source_clipped = y_source + y_off_clipped; Mask drawable relative coordinates of the clipped operation: x_mask_clipped = x_source + x_off_clipped; y_mask_clipped = y_source + y_off_clipped; This is where the original code fails -- it doesn't subtract the destination drawable location when computing the distance that the operation has been moved by clipping. Here's what it does when constructing a temporary source picture: temp_src = glamor_convert_gradient_picture(screen, source, extent->x1 + x_source - x_dest, extent->y1 + y_source - y_dest, width, height); ... x_temp_src = -extent->x1 + x_dest; y_temp_src = -extent->y1 + y_dest; glamor_convert_gradient_picture needs source drawable relative coordinates, but that is not what it's getting; it's getting screen-relative coordinates for the destination, adjusted by the distance between the provided source and destination operation coordinates. We want x_source_clipped and y_source_clipped: x_source_clipped = x_source + x_off_clipped = x_source + x_dest_clipped - x_dest = x_source + extents->x1 - dest->drawable.x - x_dest x_temp_src/y_temp_src are supposed to be the coordinates of the original operation translated to the temporary picture: x_temp_src = x_source - x_source_clipped; y_temp_src = y_source - y_source_clipped; Note that x_source_clipped/y_source_clipped will never be less than x_source/y_source because all we're doing is clipping. This means that x_temp_src/y_temp_src will always be non-positive; the original source coordinate can never be strictly *inside* the temporary image or we could have made the temporary image smaller. x_temp_src = x_source - x_source_clipped = x_source - (x_source + x_off_clipped) = -x_off_clipped = x_dest - x_dest_clipped = x_dest - (extents->x1 - dest->drawable.x) Again, this is off by the destination origin within the screen coordinate space. The code should look like: temp_src = glamor_convert_gradient_picture(screen, source, extent->x1 + x_source - x_dest - dest->pDrawable->x, extent->y1 + y_source - y_dest - dest->pDrawable->y, width, height); x_temp_src = -extent->x1 + x_dest + dest->pDrawable->x; y_temp_src = -extent->y1 + y_dest + dest->pDrawable->y; Signed-off-by: Keith Packard Reviewed-by: Markus Wick commit 16fbad3c7a22d2fb33549bcd422de985a60982b8 Author: Keith Packard Date: Thu Jul 17 16:17:53 2014 -0700 Post 1.16 version bump to 1.16.99.1 And we're off towards 1.17; this version bump serves to keep development versions distinct from stable versions. Signed-off-by: Keith Packard commit bfa5c73a36230f77fb211f185152212541c9d56d Author: Keith Packard Date: Wed Jun 4 22:00:45 2014 -0700 ephyr: Free damage structure at server reset time The usual mechanism for freeing a damage structure when the pixmap is destroyed does not work for the screen pixmap as it isn't freed in the normal way. The existing driver cleanup function, scrfini, is called after the wrapped CloseScreen functions, including damageCloseScreen, are called and thus ephyr can't free the damage structure at that point. Deal with this by providing an early CloseScreen hook in KdCloseScreen which ephyr can use to free the damage structure before damage itself shuts down. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 3319e7041ff89bb01b16a1dbbac85e28b1976ae3 Author: Keith Packard Date: Fri Apr 18 14:24:29 2014 -0700 hw/xfree86: Let xf86Rotate leave the BlockHandler unwrapped when possible When no shadow frame buffer is needed, the rotate block handler doesn't need to be called any more. Remove it from the chain. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 79a2733005202af43821d8fd8e4c9fb77bf8f69e Author: Keith Packard Date: Fri Apr 18 14:11:17 2014 -0700 hw/xfree86: Fix VGA arbiter screen proc wrapping Change the screen proc epilog code to re-fetch the current screen function in case a nested proc changes how things work. This isn't a problem with the current code as all of the wrapping layers that are set up at server init time (like the VGA arbiter) leave themselves in the screen proc chain forever. But, this makes the code conform with the expected norms. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a1189fe322724ab1b524aaad5b700287777252bd Author: Keith Packard Date: Fri Apr 18 13:57:55 2014 -0700 mi: Fix block handler wrapping in miSprite miSpriteBlockHandler was leaving the BlockHandler wrapped until just before calling any nested block handler. If any code executed before that added or removed block handlers, the wrapping chain would have been broken. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 08fc33042c858568e7244eb9ad25a8d0270754f0 Author: Keith Packard Date: Fri Apr 18 13:55:50 2014 -0700 hw/xfree86: Fix block handler wrapping in xf86Rotate xf86Rotate, it was delaying unwrapping the BlockHandler until after calling xf86RotateRedisplay. If there was a software cursor on the screen, the redisplay operation would cause cursor to be removed from the frame buffer and the misprite block handler to be inserted into the block handler chain with the misprite screen private saved block handler now set to xf86RotateBlockHandler. When xf86RotateRedisplay returned, xf86RotateBlockHandler would then set screen->BlockHandler to its saved value, call down and then reset screen->BlockHandler to xf86RotateBlockHandler. miSpriteBlockHandler would never be called after that, which meant that the software cursor will now disappear from the screen whenever rendering overlapped and would only reappear when the cursor was moved. To correct this, all that is needed is to move the restoration of screen->BlockHandler to the top of xf86RotateBlockHandler, before the call to xf86RotateRedisplay. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit c75fee79ace394f6f51aa6fdda1c0436eb8a2026 Author: Keith Packard Date: Fri Apr 18 13:54:11 2014 -0700 Document how to correctly wrap screen procedures This adds a large comment to include/scrnintstr.h which should serve to document the correct way to wrap any screen procedure, with a particular focus on how to dynamically add/remove wrapping layers while the server is running. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 5eb77697ea35e7dc8cb8af2c3b5d8ffdba0fb632 Author: Peter Harris Date: Mon Mar 10 18:31:33 2014 -0400 Avoid starting a comment with */* Even though -Wcomment doesn't mind it (in gcc or clang), the appearance of */* confuses the syntax highlighter of some editors (eg. vim), and causes warnings in MSVC. Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8b36e1ec8dd9f53e9f4e10422c2100844e9e549c Author: Keith Packard Date: Thu Jul 17 00:03:33 2014 -0700 Update to version 1.16.0 Signed-off-by: Keith Packard commit 4dbb641bb2d4037f107b58b31e80963dc8b72c0e Author: Hans de Goede Date: Mon Jul 14 14:01:47 2014 +0200 config_odev_add_attribute*: Check for right attribute type Don't allow setting string attributes to integers and vice versa. Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 25eca7ce35973577c8d85704c270f7fb53e6732e Author: Hans de Goede Date: Mon Jul 14 14:01:46 2014 +0200 Fix ODEV_ATTRIB_DRIVER overlapping with ODEV_ATTRIB_FD Looks like the value of ODEV_ATTRIB_DRIVER was not updated when the patch adding it got rebased on top of a newer server version. This fixes the xserver crashing when systemd-logind integration is used. https://bugzilla.redhat.com/show_bug.cgi?id=1118540 Signed-off-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9a19bf06b5b409fa0d5b5932e29cd4c5545052c5 Author: Peter Hutterer Date: Mon Jul 14 15:05:58 2014 +1000 Revert "dix: fix up coordinate scaling when external monitors are present" This reverts commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf. Reverting for two reasons: * the scaling does not work on devices that don't advertise resolution, and the default resolution used (100 units/mm) is higher than most devices, resulting in a significant slowdown of the touchpads. * the scaling is still affected by resolution changing. The patch worked before acceleration but since it maps into resolution-dependent dx/dy coordinates the acceleration may distort the movement after the fact. So the same input data generates different movements depending on the resolution. This can't easily be fixed for all affected devices as synaptics has its own velocity calculation method whereas wacom doesn't. So anything in the server won't work for both at the same time. Revert this for now, until a more integrated solution can be implemented. commit acc0b5edd1dc560b5c39dc44872b46581ec23903 Author: Aaron Plattner Date: Fri Jul 11 15:56:35 2014 -0700 xfree86: Only support one sysconfigdir When the X server is compiled with --prefix set to something other than /usr, then it ends up with a nonstandard sysconfigdir in its .pc file. This causes various other components to install their xorg.conf.d snippets there. However, the X server first looks for /usr/share/X11/xorg.conf.d before looking in sysconfigdir. That means that if the system administrator installed anything that created that path, the user's custom sysconfigdir is not searched. Rather than doing that, just look in the configured sysconfdir and nowhere else. Signed-off-by: Aaron Plattner Reviewed-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 578b9283bcc129d0a35fabe2637c7622085ef1e8 Author: Peter Hutterer Date: Thu Jul 10 10:39:50 2014 +1000 xfree86: don't force the screensaver off on DPMS unblank, merely suggest it Commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a added symmetry to the screensaver/DPMS invocations so that one (en|dis)ables the other. Having dependencies between DPMS and the screensaver is subject to further arguments, but in this particular case using SCREENSAVER_FORCER is detrimental. SCREENSAVER_FORCER(ScreenSaverReset) resets the idle time for all devices on DPMS unblank. It prevents at least one use-case that GNOME tries to implement: GNOME displays a notification before suspending. If the display is currently blanked, GNOME lights it up to display the message. With the original patch in place DPMS unblank also resets the device idle times, thus restarting the timeout ad infinitum. Switch this to a more suggestive SCREENSAVER_OFF(ScreenSaverReset). This keeps the symmetry in blanking mode (DPMS and screensaver turn each other on/off as expected) but does not reset the idle time on the devices. https://bugzilla.gnome.org/show_bug.cgi?id=731241 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-By: Egbert Eich commit daa1a9d22db8e83d1933d8403acf72626199ee2a Author: Peter Hutterer Date: Mon Jul 7 08:27:44 2014 +1000 os: prevent negative array index access (#80890) If an empty string is provided to LogMessageVerbSigSafe, the length of the printed string is 0. Read-only access only and the only effect it had was adding a linebreak or not. X.Org Bug 80890 Signed-off-by: Peter Hutterer commit 9de3cc8daa4c6e877d30a0e8ccfe0cc159f1dbe3 Merge: 9308eafb7 a5499870e Author: Keith Packard Date: Mon Jul 7 16:53:07 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 9308eafb7d303739b81634ed2ee0da88554fd429 Author: Keith Packard Date: Mon Jul 7 16:28:26 2014 -0700 Update to version 1.15.99.904 One more RC to get the non-PCI patches tested before release Signed-off-by: Keith Packard commit b6cc489838dca0bcec7e9dbb4663b871e8cb7bc8 Author: Thierry Reding Date: Thu Feb 13 21:09:49 2014 +0100 xfree86: Make error message more readable While at it also replace a tab by four spaces for consistency. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit eeefecd9df88920d4dca4100a84a135f7f53dd82 Author: Thierry Reding Date: Thu Feb 13 13:54:23 2014 +0100 xfree86: Support driver loading via OutputClass Use the OutputClass configuration to determine what drivers to autoload for a given device. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Tested-by: Rob Clark Signed-off-by: Keith Packard commit a270bb18baa6e3b45fa4a105a8d2be51ac5270bc Author: Thierry Reding Date: Thu Feb 13 13:42:05 2014 +0100 xfree86: Introduce OutputClass configuration The OutputClass section provides a way to match output devices to a set of given attributes and configure them. For now, only matching by kernel driver name is supported. This can be used to determine what DDX module to load for non-PCI output devices. DDX modules can ship an xorg.conf.d snippet (e.g. in /usr/share/X11/xorg.conf.d) that looks like this: Section "OutputClass" Identifer "NVIDIA Tegra open-source driver" MatchDriver "tegra" Driver "opentegra" EndSection This will cause any device that's driven by the kernel driver named "tegra" to use the "opentegra" DDX module. See the OUTPUTCLASS section in xorg.conf(5) for more details. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Tested-by: Rob Clark Signed-off-by: Keith Packard commit 856bb80cea695106a8f6767d00918b38795b51c6 Author: Thierry Reding Date: Wed Feb 12 16:43:29 2014 +0100 xfree86: Store kernel driver name in platform device attribute When opening a DRM device, query the version and store the driver name as a new attribute for future reference. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Signed-off-by: Thierry Reding Reviewed-by: Rob Clark Tested-by: Rob Clark Signed-off-by: Keith Packard commit 5a4e15c3f6fb8d674879e54458328e9f595d9451 Author: Thierry Reding Date: Fri Feb 14 15:45:33 2014 +0100 xfree86: Make driver matching consistent Most of the driver enumeration functions take an array and a maximum number of entries that they are allowed to fill in. Upon success, they return the number of entries filled in. This allows them to be easily used to consecutively. One exception is the xf86MatchDriverFromFiles() function, which doesn't return a value, so callers have to manually search the array for the first empty entry. This commit modifies the xf86MatchDriverFromFiles() to behave the same way as others, which makes it easier to deal with. Reviewed-by: Aaron Plattner Tested-By: Aaron Plattner Tested-by: Rob Clark (on arm / platform device) Signed-off-by: Thierry Reding Signed-off-by: Keith Packard commit a61ca6f006d70343c88fe45206fae0669d1e8971 Author: Tomasz Borowik Date: Thu Jul 3 13:04:44 2014 -0700 glamor: Fix stack corruption in glamor_init glGet on GL_MAX_VIEWPORT_DIMS returns two values Reviewed-by: Markus Wick Signed-off-by: Keith Packard commit 10d2805dbc6b96a159b8c5acedcd53f34df362bf Author: Keith Packard Date: Thu Jun 26 14:12:24 2014 -0700 fb: Don't free NULL pixmap in fbCloseScreen. Bug #80313 We fixed fbCloseScreen to use the FreePixmap function so that the private counts would be updated correctly during CloseScreen. Xvfb calls FreePixmap and sets devPrivate to NULL before fbCloseScreen is called; not checking devPrivate before calling would result in a NULL pointer dereference. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit a5499870e2f88822f52b1b54cad0db69856597c0 Author: Yaakov Selkowitz Date: Sun Apr 6 04:47:15 2014 -0500 hw/xwin: link dynamically and export symbols With my patch to fix shared libXfont to work correctly on Cygwin/Win32, there is no need for -static anymore. But, XWin.exe must export its symbols in order for them to override libXfont's stubs. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 5f3485b06e180674af640e7e9d7d56f67b61735b Author: Maarten Lankhorst Date: Thu Jun 26 10:37:19 2014 +0200 bump to 0.9.0 commit a3b44ad8db1fa2f3b81c1ff9498f31c5323edd37 Author: Thierry Reding Date: Wed Jun 25 16:03:29 2014 +0200 exa: Fix a warning when enabling DEBUG_TRACE_FALL The format string wants a picture and a character, but the argument list contains only a character, causing GCC to complain. Add the missing argument. Signed-off-by: Thierry Reding Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2f113d68f6c1572576bc57ecca12e44cc9e438eb Author: Kristian Høgsberg Date: Mon Jun 16 11:34:55 2014 -0700 xwayland: Add glamor and DRI3 support Reviewed-by: Axel Davy Signed-off-by: Kristian Høgsberg Signed-off-by: Keith Packard commit fd16555c2fc606fc43236050deba558c20e184e8 Author: Michel Dänzer Date: Tue Jun 24 16:09:19 2014 +0900 Revert "glamor: Fix coordinates handling for composite source/mask pictures" This reverts commit 4e9aabb6fc15d8052934f20c6a07801c197ec36a. It broke kwin decorations with XRender compositing. Signed-off-by: Michel Dänzer Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 18744907d0766b1b57be12df5adafd0f93221006 Author: Chris Wilson Date: Tue Jun 10 07:45:05 2014 +0100 dri2: Invalidate DRI2Buffers upon SetWindowPixmap updates When transitioning to a redirected or unredirected Window, the Composite layer modifies the Window's Pixmap. However, the DRI2Buffer for the Drawable is still pointing to the backing bo of the old Pixmap with the result that rendering goes astray. This now also effects DRI2 Drawables that are touched by PresentPixmap. v2: Fixup the function name after rebasing Signed-off-by: Chris Wilson Cc: Reinis Danne Reviewed-by: Dave Airlie Cc: Keith Packard Signed-off-by: Keith Packard commit 4d92fab39c4225e89f2d157a1f559cb0618a6eaa Author: Chris Wilson Date: Wed Jun 18 11:14:43 2014 +0100 dri2: Use the PrimeScreen when creating/reusing buffers This fixes a segfault when we attempt to call ds->ReuseBufferNotify() passing a Prime DRI2BufferPtr to the master backend. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80001 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 0d9ad781807022d78239327ed508758a3f88b090 Author: Eric Anholt Date: Mon Jun 16 08:06:53 2014 +0100 glamor: Fix GLES2 non-VBO temporary memory allocation. We'd get a request for like 16 bytes, claim to have allocated GLAMOR_VBO_SIZE, and then not reallocate when something a request bigger than 16 came along. The intent was to always allocate at least GLAMOR_VBO_SIZE. Fixes segfaults with Xephyr -glamor_gles2 and running gnome-terminal. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 736bed2aaf4bb672b6c7b33146fe84700baf22bd Merge: ce581ac3f d90b5f830 Author: Keith Packard Date: Mon Jun 23 14:18:03 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit ce581ac3fa80c4c52d87bd54fa92bc566b7d6adc Author: Axel Davy Date: Wed Jun 18 22:22:09 2014 -0400 present: fix bad logic in cancelling scheduled operations. If we present several pixmaps in advance for different msc, the later one shouldn't cancel the previous ones. This reverts a change made by commit e6f5d9d7b7efdacea0f22f1808efca849bcede4c Without this fix, vblank_mode=0 glxgears doesn't update with the present fallback. Signed-off-by: Axel Davy Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit adb7bc3386559dfee34b359dadcbb6796bc416e7 Author: Dinar Valeev Date: Mon Feb 24 11:36:54 2014 +0100 arch: Fix image and bitmap byte order for ppc64le So far PPC was big endian for sure. For ppc64le this is no longer true. Signed-off-by: Egbert Eich Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit ea47341792cf06eda5bbdf0aca48aacc024a5be0 Merge: 334faabe6 a11bbd875 Author: Keith Packard Date: Mon Jun 23 13:50:54 2014 -0700 Merge remote-tracking branch 'anholt/glamor-fixes' commit 334faabe682a422075ba214501c7554dd5ee5563 Author: Frank Binns Date: Tue Jun 10 13:43:31 2014 +0100 present: restore screen pixmap when aborting a flip If a 2D application is started on top of a fullscreen 3D application, which is flipping, then we need to stop flipping and restore the root window, and possibly the flip window, to using the screen pixmap. Normally this would be done as part of an unflip. However, in the case that there is a pending flip there is no mechanism to abort so the unflip is deferred until the pending flip completes. This provides a window of opportunity for the 2D application to draw to the wrong pixmap. Restore the screen pixmap at the point a pending flip is marked as aborted, thus avoiding this issue. Reviewed-by: Keith Packard Signed-off-by: Frank Binns Signed-off-by: Keith Packard commit d90b5f83010248be65b2039b0b2d0b9e6a4e93cf Author: Peter Hutterer Date: Fri May 30 09:56:37 2014 +1000 dix: fix up coordinate scaling when external monitors are present The goal of all this is to get an x/y motion reflecting the motion on the device, i.e. a circle on the device is a circle on the screen. This is currently done by scaling the y coordinate depending on the screen ratio vs device ratio. Depending on that ratio the movement on the y axis may be accelerated (ratio < 1) or slowed (ratio > 1). This leads to the weird effect that changing the screen ratio by plugging a new monitor changes the speed of the touchpad. Use a different algorithm: calculate the physical movement on the device, map that to the same-ish distance on the screen, then convert that back into a device-specific vector. This way we get the same mapping regardless of the current screen dimensions. Since the pointer accel code doesn't take device resolution into account, make sure we apply our crazy mapping before we accelerate. This way we accelerate resolution-independent. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 382ff4a306b97b0ddcdac03ce8611b026ca5323b Author: Keith Packard Date: Tue Jun 17 15:50:48 2014 -0700 present: Remove executing vblank from window list. Bug# 79709. Once the vblank is actually getting executed, it's lifetime is no longer tied to the window, and so it shouldn't be controlled by window destruction. In particular, if the vblank is queued for flip, it will get stored in the flip_pending field, and will be correctly destroyed when the flip completes. Signed-off-by: Keith Packard commit 199d9a6a942af9b443616f6ef6d26052ef3f48b9 Author: Eric Anholt Date: Fri Dec 27 11:12:27 2013 -0800 xephyr: Allow initializing glamor with gles2 (on GLX). This should be useful for glamor development, so you can test both paths (which are significantly different, and apparently glamor_gradient.c was broken on GLES2 as of the import). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 98b6158bc1e32aaca375829452266e013a520e14 Author: Eric Anholt Date: Sun Apr 6 07:44:20 2014 +0100 glamor: Share code for put_image handling. The difference between the two is that XF86 has the clip helper that lets you upload less data when rendering video that's clipped. I don't think that's really worth the trouble, especially in a world of compositors, so I've dropped it to get to shared code. It turns out the clipping code was broken on xf86-video-intel anyway. To reproduce, run without a compositor, and use another window to clip the top half of your XV output on the glamor XV adaptor: the rendering got confused about which half of the window was being drawn to. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 34884e16bf7c97434e7883d025c6814e083b0def Author: Eric Anholt Date: Sat Apr 5 12:30:28 2014 +0100 ephyr: Add support for XV using glamor. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 23d303bf905e76a70bda942037bdfbdcd06e55d2 Author: Eric Anholt Date: Sat Apr 5 12:57:16 2014 +0100 kdrive: Mark XV names const to avoid warnings. No code modifies it at runtime, and it's common to store string literals to it. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 65efc14b6ae1ee73bf6db379d7826b6bc9fd6d33 Author: Eric Anholt Date: Sat Apr 5 11:50:51 2014 +0100 glamor: Split the XV code into XF86-dependent parts and generic. I want to expose this from Xephyr as well, both to be able to test XV changes rapidly, and beause the XV passthrough to the host's overlay really doesn't work out well when we glXSwapBuffers() over the colorkey. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a5662193f1c3dd63f615d96d1a300f70086ccbc6 Author: Eric Anholt Date: Sat Apr 5 12:26:33 2014 +0100 kdrive: Simplify the adaptor setup interface. Now that we don't have to worry about the generic adaptors code, there's no need to have a list of pointers to different sets of adaptors. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 55aad7399d4470bc46c064aafe07d12a6c293982 Author: Eric Anholt Date: Fri Apr 4 12:09:01 2014 +0100 kdrive: Remove dead generic XV adaptors code. I couldn't find any callers in the history of the tree. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 0edc0a78fbfac4578b0f809aef17332c1eb461e3 Author: Eric Anholt Date: Sun Apr 6 08:12:35 2014 +0100 kdrive: Do a little more cleanup from the XV struct deduplication. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 1d90e8811a7d4db328c0c944bec0aa3ed6afb70d Author: Eric Anholt Date: Fri Dec 27 21:34:44 2013 -0800 xorg: Remove duplicated definitions of some XV-related structs. These were field-for-field identical, so we can just typedef them to be the same, and memcpy their contents. v2: Fix missed strdup(). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit a6aaa51752f301de24abce264976ba3c3a50863c Author: Keith Packard Date: Fri Mar 21 14:55:47 2014 -0700 glamor: Remove stubbed-out glamor_stipple function This function isn't used anymore. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ef2bf0e645ed8242a0b637ed6a9d5b8c03b6b481 Author: Keith Packard Date: Fri Mar 21 14:30:33 2014 -0700 glamor: Remove 'tiling' shader code The core rendering paths all use the glamor_program fill functions now Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 18c09e60bf16b28060ade5d24110f2aa6bc19b57 Author: Keith Packard Date: Sun Mar 16 20:49:28 2014 -0700 glamor: Replace glamor_solid_boxes and glamor_solid with GC using code This provides glamor_solid_boxes and glamor_solid using regular GC operations instead of calling directly to underlying rendering functions. This will allow the old rendering code to be removed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bd3b2c48f69a5169aefb261c041462271c69a07a Author: Keith Packard Date: Thu Apr 3 14:22:52 2014 -0700 glamor: Add accelerated stipple support This copies the stipple to a 8bpp pixmap and uses that to paint the texture from. v2: Create deep stipple pixmap without GLAMOR_CREATE_FBO_NO_FBO v3: Fix stipple origin sign (matches tiles now). Track changes to original stipple with damage. This isn't required by the X spec, but java appears to depend on it, so we'll just do it. When Glamor switches to 8bpp bitmaps, we'll be able to render directly from them and not need this anymore. v4: Review comments from Eric: * Remove stray whitespace change * Avoid "large" pixmap for stipple by using GLAMOR_CREATE_NO_LARGE * Wrap to 80 columns v5: Don't crash when stipple damage tracker is destroyed The stipple damage tracker is automatically destroyed when the associated stipple pixmap is destroyed. When this happens, just clear the pointer from the GC rather than calling glamor_invalidate_stipple; that function would call DamageUnregister on the now invalid stipple damage pointer and crash. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit d18f5801c9a632dd4d9f8b7912491b6623e943d5 Author: Keith Packard Date: Wed Apr 2 14:07:20 2014 -0700 glamor: Add glamor_program based 0-width dashed lines This makes sure the pixelization for dashed lines matches non-dashed lines, while also speeding them up. v2: Switch to glamor_make_current v3: Create dash pattern pixmap without GLAMOR_CREATE_FBO_NO_FBO v4: Adopt suggestions from Eric's review: - Drops power-of-two alignment of our line vertex data, simplifying the code. - Stops reading from the VBO. While on keithp's and my machines the VBO is mapped cached, on many implementations it will be mapped WC, making those reads extremely expensive. - Style fixes (line wrapping, spaces around operators). v5: Adopt suggestions from Markus' review: - Use max when computing zero-width dashed line length. Don't open code max here. - Embed CoordModePrevious into VBO writing for dashed lines Instead of pre-computing the coord mode previous results, just embed this in the loop which fills the vertex buffer. Saves re-writing the request buffer, and shortens the code a bit v6: Export glamor_destroy_gc for UXA UXA needs to call glamor_destroy_gc from its GCFuncs, so export it. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit dc9fa9080a1cb994b4e54a341d2245f442dac576 Author: Keith Packard Date: Sun Mar 23 20:59:02 2014 -0700 glamor: Use glamor_program and GL_LINES for 0-width lines GL lines are nearly X compliant; you just need to fill in the last pixel when the client hasn't requested CapNotLast. v2: switch to glamor_make_current v3: use miPolylines instead of custom glamor fallback path. Wrap code to 80 columns. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 51075ebd37dca8d17c42425fb756ad3090e157c4 Author: Keith Packard Date: Fri Mar 21 18:03:07 2014 -0700 glamor: Use glamor_program for glamor_push_pixels This uses the same shaders as glamor_poly_glyph_blt. v2: Wrap some long lines (changes by anholt). Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 45ebc4e3fac7f1a85167d05e2833949b89f02d64 Author: Keith Packard Date: Sat Mar 15 13:31:18 2014 -0700 glamor: Add glamor_program based copy acceleration Paints with textures, using a temporary buffer for overlapping copies Performs CPU to GPU transfers for pixmaps in memory. Accelerates copy plane when both objects are in the GPU. Includes copy_window acceleration too. v2: Use NV_texture_barrier for non-overlapping copies within the same drawable v3: Switch to glamor_make_current v4: Do overlap check on the bounding box of the region rather than on individual boxes v5: Use Eric Anholt's re-written comments which provide a more accurate description of the code v6: Use floating point uniform for copy plane bit multiplier. This avoids an int to float conversion in the copy plane fragment shader. Use round() instead of adding 0.5 in copy plane. round() and +0.5 end up generating equivalent code, and performance measurements confirm that they are the same speed. Round() is a bit clearer though, so we'll use it. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Reviewed-by: Markus Wick commit 0e08a79599c773f77c0667d557376a5ccee3f89c Author: Keith Packard Date: Wed Apr 2 14:05:35 2014 -0700 glamor: Directly reference the private key records There's no reason to use a pointer here, it just wastes time. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 15e4d14dfae054c026b7e965ac33985e5cf6a168 Author: Keith Packard Date: Sat Mar 15 13:27:14 2014 -0700 glamor: Replace fallback preparation code These offer a simpler and more efficient means for temporarily transitioning to CPU-accessible memory for fallback implementations. v2: Do not attempt fallbacks with GLAMOR_DRM_ONLY pixmaps glamor cannot transfer pixels for GLAMOR_DRM_ONLY pixmaps using glReadPixels and glTexSubImage2D, and so there's no way to perform fallback operations with these pixmaps. v3: Clear ->pbo field when deleting the PBO. Otherwise, we'd reuse the old name next time we fall back on the pixmap, which would potentially conflict with some other pixmap that genned a new name, or just do a lazy allocation of the name (compat GL context, like we currently use) or error out (core GL context, like we hope to use some day). Also, style fixes. Changes by anholt, acked by keithp. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3ac481c9dac591ffc33812ab047fc793d8a43d4f Author: Keith Packard Date: Wed May 7 10:31:16 2014 -0700 mi: Draw multiple lines in one FillSpans call in miZeroLine miZeroLine allocates enough space to draw a line spanning the entire width/height of the target drawable. When drawing multiple shorter lines, this leaves most of the space in that buffer unfilled. Let multiple lines be drawn into the buffer if there is plenty of space. Speeds up glamor fallback zero-width lines: Before 6000000 trep @ 0.0020 msec (508000.0/sec): 1-pixel line 6000000 trep @ 0.0020 msec (492000.0/sec): 10-pixel line 6000000 trep @ 0.0023 msec (427000.0/sec): 100-pixel line 4000000 trep @ 0.0035 msec (282000.0/sec): 500-pixel line After: 600000000 trep @ 0.0000 msec (43400000.0/sec): 1-pixel line 140000000 trep @ 0.0001 msec (13000000.0/sec): 10-pixel line 16000000 trep @ 0.0008 msec (1300000.0/sec): 100-pixel line 4000000 trep @ 0.0038 msec (261000.0/sec): 500-pixel line (500 pixel lines do not change in performance because the buffer can only one one of them.) Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit ea678a73c5688f73071d5581b6406808b7a0230f Author: Keith Packard Date: Fri Apr 25 22:43:51 2014 -0700 mi: Fill spans for multiple arcs in miPolyFillArc This allocates span data for multiple arcs and draws the whole set in one call, rather than doing them one at a time. For modern hardware, this is a significant performance improvement. v2: Limit the number of spans per buffer to 4M to avoid integer overflow in computing the malloc size. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a7fce36affb8211990e5b4956adea4d75f0e73c9 Author: Keith Packard Date: Wed May 7 09:58:26 2014 -0700 mi: Make miPolyArc draw fast zero-width when possible Instead of forcing drivers to figure out when to call miZeroPolyArc, have miPolyArc call that when possible. This involved renaming the existing miPolyArc call to miWideArc and creating a new miPolyArc wrapper function as miZeroPolyArc falls back to miWideArc when the arc is too large to be drawn with the zero-width code (ellipses larger than 800x800). Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit bf1429b2034a577c994ff16b60d809d05ca99241 Author: Keith Packard Date: Wed May 7 09:56:39 2014 -0700 mi: Create miPolylines as a general-purpose line drawing function Instead of requiring all drivers to figure out which mi function to call for each of the four cases, create a single wrapper in mi that handles them correctly. Now drivers can simply use miPolylines in all cases. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 14d82a2bc3179160803c62c20746630d14e1b7d7 Author: Keith Packard Date: Thu Mar 13 23:29:54 2014 -0700 ephyr: Deal with non-root visual for window glx will sometimes select a non-root visual, deal with that by creating a suitable colormap and using that instead of attempting to use the default colormap. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit a11bbd875f3f90a3d02d727778cb1d3524cf59fd Author: Eric Anholt Date: Fri May 30 10:39:30 2014 -0700 glamor: Don't leak a prepare_access_gc() in putimage fallbacks. It turns out putimage doesn't use the GC tile or stipple anyway, so there's no need to do this. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8da1e4e2bf28c3610cdbe1770a57be89578d37f5 Author: Markus Wick Date: Wed May 14 23:08:18 2014 +0200 glamor: Choose max fbo size by texture + viewport size The max size of renderbuffers and texture often match by accident, but as we always use textures, we should check for the right flag. Also check for viewport size as this may be lower and we want to render to almost every pixmap. Signed-off-by: Markus Wick Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3778fab34bc00334edec4f845d0c6d43440f265a Author: Markus Wick Date: Wed May 14 23:08:17 2014 +0200 glamor: Fix no-mipmap allocations With GL_TEXTURE_MIN_FILTER, we configure not to use mipmaps, but there's no real way until GL_ARB_texture_storage to dictate whether memory should be allocated for mipmap levels or not. GL_TEXTURE_MAX_LEVEL is a stronger hint to the driver than the filtering that we really don't want mipmap allocations. Stops VARM wasting warnings from the nvidia driver. Signed-off-by: Markus Wick Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Keith Packard commit 1095c262502332bc570a9b288b01da51c1fa10ec Author: Alan Coopersmith Date: Fri Jun 6 17:54:22 2014 -0700 config: show default path in help for --with-xkb-bin-directory Now shows: --with-xkb-bin-directory=DIR Directory containing xkbcomp program (default: ${bindir}) Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e27a839bf0488d5b1cc2e2a887f2ea0e3d790790 Author: Jeremy Huddleston Sequoia Date: Thu Jun 5 20:38:44 2014 -0700 mi: Build fix: mieqProcessDeviceEvent returns void mieq.c:520:9: error: void function 'mieqProcessDeviceEvent' should not return a value [-Wreturn-type,Semantic Issue] return 0; ^ ~ 1 error generated. Regression-from: 9fb08310b51b46736f3ca8dbc04efdf502420403 Found-by: Tinderbox Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 08820f03768e904f1746ef93ca01660330dc5406 Author: Keith Packard Date: Wed Jun 4 22:28:57 2014 -0700 Update to version 1.15.99.903 Signed-off-by: Keith Packard commit 9fb08310b51b46736f3ca8dbc04efdf502420403 Author: Peter Hutterer Date: Wed May 21 10:07:31 2014 +1000 mi: don't process events from disabled devices (#77884) Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 Signed-off-by: Peter Hutterer Reported-by: Maarten Lankhorst Tested-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e6f5d9d7b7efdacea0f22f1808efca849bcede4c Author: Keith Packard Date: Mon Jan 27 11:23:58 2014 -0800 present: Queue flips for later execution When a flip (or unflip) is pending and a flip request comes in, leave it queued until the pending flip completes and then execute it. This fixes a bug where an application submitting back-to-back present_pixmap requests for sequential frames would alternate between flipping and copying as the pending flip would cause the new present_pixmap request to not use a flip. Signed-off-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Frank Binns commit 2f5cf9ff9a0f713b7e038636484c77f113a5f10a Author: Frank Binns Date: Thu Apr 24 11:37:48 2014 +0100 xfixes: disable cursor on X server reset The initial state of the cursor is set to disabled but this was never be re-disabled during X server reset. This meant any application run after an X server reset would have the cursor displayed even if it hadn't requested this to be the case. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b92d86a982504af2605042c19ef796d135074ee1 Author: Brendan King Date: Thu Apr 24 11:37:47 2014 +0100 dix: fix pixmap leak on server reset The server is leaking a pixmap (created by CreateDefaultStipple()) on reset. The leak is caused by some X Server graphics contexts not being freed on reset by the machine independent cursor code in the server, which in turn is caused by the cursor cleanup code (miSpriteDeviceCursorCleanup()) not being called. Ensures the DeviceCursorCleanup() function is called when the associated input device is closed on server reset. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a99c061aafd4aaa5728c776dca7d0a1789ac739a Author: Brendan King Date: Thu Apr 24 11:37:46 2014 +0100 dix: reference the cursor just once in InitializeSprite() The new current cursor was being referenced twice, resulting in a memory leak when the current server generation ended. Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 444a1f7a8802999e27ecf5f6eb598df2206f7277 Author: Brendan King Date: Thu Apr 24 11:37:45 2014 +0100 fb: fix screen pixmap leak on server reset Call FreePixmap() instead of free() to destroy the screen pixmap in fbCloseScreen(). Signed-off-by: Frank Binns Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 7ca458493aa2f0aa091c989ea0768611e0730bf5 Author: Chris Wilson Date: Wed May 28 08:14:00 2014 +0100 xfree86: Report Present as a built-in module This is so that drivers can do a runtime check that Present is available, similar to existing runtime checks performed by the drivers for DRI. Signed-off-by: Chris Wilson Signed-off-by: Keith Packard commit 746be5a03ebbda4ab411ca3efb2ed95f99e9ea46 Author: Chris Wilson Date: Wed May 28 08:13:59 2014 +0100 xfree86: Report DRI3 as a built-in module This is so that drivers can do a runtime check that DRI3 is available, similar to existing runtime checks performed by the drivers for DRI and DRI2. v2: Only add DRI3 to the list if the module was actually built into the server (Mark Kettenis). Signed-off-by: Chris Wilson Cc: Mark Kettenis Signed-off-by: Keith Packard commit b5526141f78df15bc5df2497bc4b4a17f1a6368d Merge: dc8d06884 a205ec3ab Author: Keith Packard Date: Mon Jun 2 13:08:23 2014 -0700 Merge remote-tracking branch 'jturney/master' commit dc8d0688471695ec5a8db5fef93fbcfc064891d5 Author: Max Filippov Date: Mon Jun 2 01:17:31 2014 +0400 xtensa: add support for xtensa architecture Signed-off-by: Max Filippov Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a6ffdc69c4ac45bc39924159c7fab5f02f720f1f Merge: 63c48de63 1c10b3738 Author: Keith Packard Date: Mon Jun 2 11:30:24 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 63c48de63becdee680e90cb2363984c2f8f77fd1 Author: Søren Sandmann Date: Fri May 30 16:50:35 2014 -0400 xfree86: Add "modesetting" to list of fallback drivers To make X -configure work properly, the output of fixup_video_driver_list() should be in order of preference. Otherwise, the config file may use the incorrect driver for some devices. In particular, the drivers that work for all (or many) devices need to be last in the list. Since the modesetting driver works for many devices, it needs to be considered a fallback driver. Signed-off-by: Søren Sandmann Acked-by: Daniel Stone Signed-off-by: Keith Packard commit ab47ec9636b21a7f542d2e8612834915e7c8cc64 Merge: 0df871cf3 cfaf2abba Author: Keith Packard Date: Mon Jun 2 11:22:48 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 0df871cf34ee5f1a85586206027de9b02fb364ec Author: Robert Ancell Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 4cbd3fabaa41e89579530bceb01b9239fa2afdb7 Author: Adam Jackson Date: Wed May 21 09:22:49 2014 -0400 configure: Require sufficiently new wayland-client for xwayland ddx The explicit release requests were added in 1.3.0, don't try to build against older. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit a205ec3ab77c6765d44f77c526a832345fef77b0 Author: Jon TURNEY Date: Sat Apr 5 15:15:46 2014 +0100 configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from xwin-config.h.in for some reason, but it is used. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit aaaa41345674a1c76a70836394cb5e57f82e9a26 Author: Jon TURNEY Date: Sun Apr 27 20:55:51 2014 +0100 hw/xwin: Update for __glXLastContext -> lastGLContext Update for __glXLastContext -> lastGLContext. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 1c10b37380d228b35db8a8616a6312ac54f5e59b Author: Jeremy Huddleston Sequoia Date: Sat May 31 17:45:02 2014 -0700 XQuartz: Update logic to account for title bar on every display in Mavericks http://xquartz.macosforge.org/trac/ticket/832 Signed-off-by: Jeremy Huddleston Sequoia commit ad0ff649c68b18c4b95b078c2d1d1e7de71a7c6f Author: Jeremy Huddleston Sequoia Date: Sat May 31 17:22:51 2014 -0700 XQuartz: Dead code removal (ENABLE_DEBUG_LOG) Signed-off-by: Jeremy Huddleston Sequoia commit e281288d5afedb154f52c31f70a350a013ecfb06 Author: Jeremy Huddleston Sequoia Date: Sat May 31 13:04:43 2014 -0700 XQuartz: Bump to 2.7.7 Signed-off-by: Jeremy Huddleston Sequoia commit cfaf2abbac3f01e57d00845d8908bf01559263f9 Author: Peter Hutterer Date: Sat May 24 20:05:53 2014 +1000 man: drop specific mention of DontZap in -retro (#71113) DontZap off is the default anyway, don't mention it specifically to avoid confusion X.Org Bug 71113 Signed-off-by: Peter Hutterer commit e48a132b6d187f355abd7021be47edde972e7091 Author: Peter Hutterer Date: Sat May 24 20:02:56 2014 +1000 xfree86: fix wrong DontZap documentation (#71113) X.Org Bug 71113 Signed-off-by: Peter Hutterer commit 548fc937b22d4dfe7f96e0bd77522261603a2c2f Author: Robert Ancell Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit db2e708f31a162c6c66643d3559dd5f3e21ee06b Author: Adam Jackson Date: Thu Sep 27 17:44:42 2012 -0400 glx: Require at least one True/DirectColor visual Mesa no longer supports rendering to anything less. GLX 1.2 requires that the server advertise at least one GLX visual. GLX 1.3 and 1.4 are more subtle: they require at least one fbconfig capable of window rendering, and _also_ require that window-capable fbconfigs have a non-zero value for the GLX_VISUAL_ID. In either case we should refuse to init GLX if there's not at least one GL-capable visual on at least one screen. Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit d7a2df0a7499864cb005b098b79c1bdf884f6600 Author: Steven McDonald Date: Sun May 18 13:42:08 2014 +0200 Xi: block SIGIOs while copying device classes around I've been seeing sporadic (anywhere from once every few days to 3-4 times a day) crashes and freezes in X. The problematic behaviour isn't always the same, but I chose a particular incident to debug, and found that X was segfaulting in updateMotionHistory, on line 575 of dix/getevents.c. After some further investigation, I found that the bug was being triggered when a SIGIO was received in DeepCopyPointerClasses, between the AllocValuatorClass call (line 540) and updating the to->valuator pointer (line 545). AllocValuatorClass calls realloc() on to->valuator, so between these lines, it's not guaranteed to point to allocated memory. It seems the SIGIO handler is calling updateMotionHistory, which is reading the memory pointed to by to->valuator and getting a wrong value for last_motion, which updates buff to point to wildly the wrong place and thus generates a segfault when a memcpy() is done into buff. I am attaching a patch which I've been running on that machine for the past three days, and haven't yet observed any more crashing or freezing behaviour. The patch simply calls OsBlockSIGIO while DeepCopyDeviceClasses is in progress, as the state of the X server's device data structures is not guaranteed to be in a consistent state during that time. Debian bug#744303 Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d3a3ee7a0e5cbd3fcaba77d2d5664e1524eda11c Author: Peter Hutterer Date: Thu May 8 09:39:36 2014 +1000 os: automatically switch to sigsafe logging when needed If we're smart enough to warn, we should be smart enough to just pass it through to the right function. Worst case we lose some formatting specifiers which pnprintf will complain about anyway. And in most cases it won't matter. This requires renaming pnprintf to vpnprintf and changing the size_t to int to be compatible with Xvscnprintf. pnprintf is internal only, the others are exported API so we can't change them as easily. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6d684f916b4c33327d32ef1f48803bf90357287f Author: Adam Jackson Date: Wed May 21 09:23:19 2014 -0400 shadowfb: Fix initialization This has to run at initial CreateWindow time, at CreateScreenResources the root window doesn't actually exist yet. Tested-by: Michael Thayer Signed-off-by: Adam Jackson Reviewed-by: Michael Thayer Signed-off-by: Keith Packard commit d9e99edd4dcf109492abdaa73ccf8f29d5bfd159 Author: Adam Jackson Date: Wed Apr 30 13:49:06 2014 -0400 glxproxy: Fix memory leak on error path in CreateGLXPixmap (#50281) (v2) v2: Fix another path spotted by keithp Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dff1f5e1a9608eda2992fc9e3304edee7b5bee9b Author: Adam Jackson Date: Wed Apr 30 13:49:05 2014 -0400 dmx: Fix memory leak in dmxBELoadFont (#50281) Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit 3dba171f5e82101aa8ea2e47d2253c3410907f6a Author: Michal Srb Date: Tue Apr 15 18:54:35 2014 +0300 dri2: Fix detection of wrong prime_id in GetScreenPrime. Checking the iterating variable ("slave") against null can not detect if the xorg_list_for_each_entry finished without break being invoked - slave variable will be always non-null. This caused segfault whenever someone tried to use DRI_PRIME with incorrect id while having at least one render offloading slave configured. Restructurize the GetScreenPrime to work as expected. Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit c08d2b8ccb0158dbf1f529f80cc3236e66236cce Author: Alexey Brodkin Date: Thu May 1 15:39:29 2014 +0300 ARC: Add support for ARC architecture Xorg server could be built for and run on Synopsys DesignWare ARC cores. These changes are required for successful building and execution of the server. Both little-endian and big-endian flavors of ARC cores are supported. Signed-off-by: Alexey Brodkin Acked-by: Adam Jackson Reviewed-by: Egbert Eich Signed-off-by: Keith Packard commit 042bae0b49f6192ec3cb8bb51423c90c44638134 Author: Adam Jackson Date: Wed May 21 10:16:39 2014 -0400 Use own thunk function instead of shadowUpdatePackedWeak I plan to remove the Weak functions from a future server. Signed-off-by: Adam Jackson commit d5587cf3acb7ad6f81e1c095f1b88f8fb25ee953 Author: Peter Hutterer Date: Wed May 14 10:32:30 2014 +1000 config: revert quirk for the Evoluent Vertical Mouse This quick makes the mouse behaviour more obvious (LMR buttons generate LMR events) but goes against the manufacturer's intended defaults: Top button - left click. Wheel button - .middle click (e.g., for pan and rotate in CAD programs). Middle button - right click. Bottom button - back. Thumb button - forward. from http://www.evoluent.com/vm3.html Signed-off-by: Peter Hutterer commit 01e18af17f8dc91451fbd0902049045afd1cea7e Author: Dave Airlie Date: Mon May 12 14:55:04 2014 -0700 rrcrtc: brackets are hard, lets go shopping. Slaving two outputs on a secondary GPU to a primary GPU testing picked this up, in that we'd try to resize to the totally the wrong thing, then as usual segfault in the rotation code. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner commit 6dd86f3cba7cca67f3a9102db2e90722d32a34cb Author: Eric Anholt Date: Mon May 5 17:01:14 2014 -0700 glamor: Don't forget to check whether we can fall back in polysegment. Part of the _nf contract is that glamor will only return FALSE if glamor has checked that UXA can actually map the pixmaps (UXA only allocates the BO itself in the screen pixmap and DRI2 cases, and can't map it otherwise). Fixes server segfaults zooming in and out of libreoffice spreadsheets. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit fb24ac0a2c317099bdf7d1d8e4b7c443e3ee644f Author: Laércio de Sousa Date: Fri May 9 09:09:16 2014 -0300 xfree86: fix warnings after MatchSeat patch This patch fixes some compile warnings that arise after commit 7070ebeebaca1b51f8a2801989120784a1c374ae (xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout") available at git repository git://people.freedesktop.org/~whot/xserver for-keith Signed-off-by: Keith Packard commit bbfed454b2a0fd5e2723524d145cb7c6e5aa9193 Author: Eric Anholt Date: Thu May 8 08:45:22 2014 -0700 glamor: Stop disabling asserts by default. Disabling asserts is something the user gets to manage. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard commit 8e2fefe3ef247f8b5d74e32e8d37c619b06fc60c Author: Peter Hutterer Date: Tue Apr 29 16:52:01 2014 +1000 Xi: don't copy a DeviceEvent into an InternalEvent ==26141== Invalid read of size 8 ==26141== at 0x58FAEA: DeliverEmulatedMotionEvent (exevents.c:1484) An InternalEvent is bigger than a DeviceEvent, thus copying one to the other reads past the allocated boundary. Shouldn't have any real effect since we shouldn't access anything past the DeviceEvent boundary if the event type is correct. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d7ac9aff061f2961e6b76557dda97b57988ce362 Author: Peter Hutterer Date: Wed Apr 30 10:55:26 2014 +1000 mi: start calculating the sprite trace from the first child of root Introduced in 73698d41e41ce76bef2d9a90b46ac0c24ae148dd "Make XYToWindow a screen function" Moving the code into miwindow.c changed the start of the loop from RootWindow()->firstChild to DeepestSpriteWindow(). This function is only supposed to be called from miXYToWindow which resets spriteTraceGood to 1, thus DeepestSpriteWindow() is always the root window anyway. What got dropped was the firstChild as the first window to handle, so we may end up with the root window twice in the sprite trace. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d60724b752613ce2ad11c6ae102bf4513f9768ff Merge: a5b975714 15460eaed Author: Keith Packard Date: Thu May 8 12:58:41 2014 -0700 Merge commit 'who/for-keith' Skipping two unreviewed patches; will mark them reviewed and cherry pick commit a5b9757142a2ab471ca26651dce9cc5f5e351f3d Author: Keith Packard Date: Fri Apr 25 15:07:03 2014 -0700 glamor: Publish change_window_attributes and copy_window Because uxa doesn't just use glamor directly, it keeps these two functions from being wrapped so that they get called automatically. Publishing these will allow uxa to call them directly. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 4711182033ec579caff8c930d420f90ecdbe54cf Author: Keith Packard Date: Fri Apr 25 20:25:56 2014 -0700 glamor: Work around libXfont when it fails to use defaultChar GetGlyphs is supposed to always return the full list of characters when there is a default character available. However, if an application opens a 16-bit two dimensional font and then draws with 8-bit requests, the bitmapGetGlyphs function in libXfont versions up through 1.4.7 will return zero glyphs if there is no 0th row. While this is a bug in libXfont and should be fixed there, it's easy to protect glamor from it by simply falling through to the case that handles GetGlyphs failures for fonts without a default character. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 91767a32874790f8a8c7340be0e81a0b719ca4f6 Author: Keith Packard Date: Fri Apr 25 23:38:35 2014 -0700 glamor: Fix uxa-entry point for ImageText16 Was interpreting the incoming chars as 8-bits instead of 16-bits, resulting in the wrong characters being drawn. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15460eaed28b5353a94a17091d7795cfaeda9146 Author: Peter Hutterer Date: Fri May 2 14:14:58 2014 +1000 systemd-logind: let the logind code decided whether to close an fd We can only request one fd per device from systemd-logind. If a fd is re-used by the same device, releasing the fd from one device doesn't mean we can close it. The systemd code knows when it's really released, so let it close the fd. Test case: xorg.conf section for an input device with hotplugging enabled. evdev detects the duplicate and closes the hotplugged device, which closes the fd. The other instance of evdev thinks the fd is still valid so now you're playing a double lottery. First, which client(s) will get the evdev fd? Second, which requests will be picked up by evdev and which ones will be picked up by the client? You'll never know, but the fun is in finding out. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 219ce9e6c34bfc946005fb8e81ab4fb74ae1d25a Author: Dave Airlie Date: Fri May 2 13:16:05 2014 +1000 modesetting: fix build regression against older servers. Signed-off-by: Dave Airlie commit 795af9ff017113788b4bb6d9dbeb5370c5b8165c Author: Dave Airlie Date: Fri May 2 13:14:30 2014 +1000 modesetting: fix use after free. Signed-off-by: Dave Airlie commit 42a4873cc7fe0c7a729e48f806e877c4dac5c07f Author: Keith Packard Date: Wed Apr 30 09:32:29 2014 -0700 hw/xfree86: Video Driver ABI version 18.0 With the change in the cursor interface in 4c3932620c29c91dfbbc8eb09c84efcaa7ec873e, we need to bump the video driver ABI number to ensure that drivers are rebuilt to match the new interface. Signed-off-by: Keith Packard Reviewed-by: Aaron Plattner commit a6f5ffd5879e7fb052d343592951cc476b699bb4 Author: Laércio de Sousa Date: Thu Apr 3 11:19:15 2014 -0300 xfree86: add short description about MatchSeat key in xorg.conf man page Signed-off-by: Laércio de Sousa Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 7070ebeebaca1b51f8a2801989120784a1c374ae Author: Oleg Samarin Date: Thu Apr 3 11:19:14 2014 -0300 xfree86: add new key MatchSeat to xorg.conf sections "Device", "Screen", and "ServerLayout" This patch introduces a new key MatchSeat in xorg.conf (also applies to any .conf file in xorg.conf.d). It will allow targeting a given "Device", "Screen", and/or "ServerLayout" section to a particular seat only (specified by option "-seat" in X server command line), so that other seats won't be affected. Without this patch, one needs to write a separate xorg.conf.custom file and pass it to X server via "-config" option, if one wants that these settings only apply for the right seat. However, in some cases, this solution is undesirable or even impossible (e.g. when using GDM, which doesn't allow X server command line customization). Example file (/etc/X11/xorg.conf.d/seat1.conf), which would be ignored by X server unless it was started with "-seat seat1" option: Section "Device" Identifier "card0" Driver "nvidia" Option "NoLogo" "True" MatchSeat "seat1" EndSection Signed-off-by: Oleg Samarin Signed-off-by: Laércio de Sousa Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 29b1484bb9555e45067669cbfe68a3c40596f4ff Author: Laércio de Sousa Date: Thu Apr 3 11:19:13 2014 -0300 xfree86: allow fallback to PCI bus probe for graphics devices on non-seat0 X servers (#66851) Currently non-seat0 X servers only probe platform bus for graphics devices, which is OK for most KMS-compliant drivers. However, for non-KMS drivers (like NVIDIA proprietary ones), graphics devices can't be reached by platform bus probe, resulting in a "No devices detected" error. This patch allows a fallback to PCI bus probe for non-seat0 X servers in case no platform bus graphics device is found. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851 Signed-off-by: Laércio de Sousa Reviewed-by: Hans de Goede Reviewed-by: Dave Airlie Signed-off-by: Peter Hutterer commit 2535b76c0d32bc1dd0ddaca06a419a68a4757df1 Author: Robert Ancell Date: Wed Apr 23 08:19:35 2014 +1200 os: Add -displayfd into -help text Add -displayfd into -help text. It was mentioned in the man page but seem to have been missed from the -help text. Signed-off-by: Keith Packard commit a26578dbb93dbaab1910b52f9fa1c87f8c9e6d1e Author: Ray Strode Date: Thu Apr 24 13:38:29 2014 -0400 selinux: don't checkout for AVCs on select() EINTR wakeup handlers are called even when select() returns EINTR, and when they're called the passed fd set is undefined. This commit fixes the selinux wakeup handler to avoid checking for AVCs over the netlink socket spuriously. Reviewed-by: Adam Jackson Signed-off-by: Ray Strode Signed-off-by: Keith Packard commit bcb17b99873f020f2639b860ce99d260def0cd97 Author: Ray Strode Date: Thu Apr 24 13:38:28 2014 -0400 dbus: don't dispatch dbus events on select() EINTR wakeup handlers are called even when select() returns EINTR, and when they're called the passed fd set is undefined. This commit fixes the dbus wakeup handler to avoid dispatching into dbus spuriously. Reviewed-by: Adam Jackson Signed-off-by: Ray Strode Signed-off-by: Keith Packard commit 6bd7ad914470322ddd02b50078e159234ebec643 Merge: b92a9289f e06fbe4dc Author: Keith Packard Date: Tue Apr 29 09:37:37 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit e06fbe4dc81110e01d36f958849c4ab5f2a9df0e Author: Peter Hutterer Date: Mon Apr 28 07:57:00 2014 +1000 dix: remove a now-superfluous comment Obsolete since 93945b0a74aa8156a88f52b8ba77f1210042f396 Signed-off-by: Peter Hutterer commit 6a848122def0f2a439e21c50f22814db11760132 Author: Michal Srb Date: Wed Apr 2 17:14:05 2014 +0300 input: Remove invalid bug checks. Commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 added several bug checks. Some of them are not correct. Checks in Init(Ptr|String|Bell|Led|Integer)FeedbackClassDeviceStruct verify that no feedback struct was set yet, but that is not required. If any feedback structs are already present, the function will chain them behind the new one. Signed-off-by: Michal Srb Signed-off-by: Peter Hutterer commit f073b5e58262d5fcc0102d773091d11d175227ce Author: Hans de Goede Date: Tue Mar 18 15:48:22 2014 +0100 Add support for server managed fds Signed-off-by: Hans de Goede commit b92a9289fef4831e9af69e5f6f64b5454f550559 Author: Thierry Reding Date: Wed Feb 12 17:11:40 2014 +0100 xfree86: int10: Fix build on ARM Commit 7353ec7cb6fc235b03e59e35425201429c83ee72 "xfree86: Switch int10 code to stdint types" uses designated initializers to setup the fields of the X86EMU_pioFuncs. This breaks compilation on ARM, since out{b,w,l}() are redefined using the preprocessor and therefore cause the compiler to complain about non-existent fields being assigned to. It seems like the compiler.h header that contains these redefinitions isn't actually needed in xf86x86emu.c, so the easiest "fix" is to not include it. Signed-off-by: Thierry Reding Reviewed-by: Rob Clark commit 774fea38c48671ed44e54278f0280bae04822491 Author: Rob Clark Date: Thu Apr 3 15:35:53 2014 -0400 int10: fix build error Fixes: stub.c:66:1: error: conflicting types for 'xf86int10Addr' In file included from stub.c:14:0: xf86int10.h:72:53: note: previous declaration of 'xf86int10Addr' was here Signed-off-by: Rob Clark commit b241934238feedcb86c113fe3beb69a7470de02d Author: Rob Clark Date: Thu Apr 3 14:54:02 2014 -0400 default to stub int10 implementation on arm There should be no reason to need a real int10 implementation on arm, and switching to stub is an easy way to fix: xf86x86emu.c: In function 'xf86Int10ExecSetup': xf86x86emu.c:56:9: error: unknown field 'xf_outb' specified in initializer xf86x86emu.c:57:9: error: unknown field 'xf_outw' specified in initializer xf86x86emu.c:58:9: error: unknown field 'xf_outl' specified in initializer which is caused by the following in compiler.h: #define outb xf_outb #define outw xf_outw #define outl xf_outl Signed-off-by: Rob Clark Acked-by: Daniel Stone commit 4c3932620c29c91dfbbc8eb09c84efcaa7ec873e Author: Keith Packard Date: Fri Apr 25 08:22:15 2014 -0700 hw/xfree86: Restore API compatibility for cursor loading functions Create load_cursor_image_check, load_cursor_argb_check, LoadCursorImageCheck and LoadCursorARGBCheck that can return failure and use them in preference to the old unchecked variants. Signed-off-by: Keith Packard Reviewed-by: Hans de Goede Reviewed-by: Michael Thayer commit 99f0365b1fbdfd9238b9f5cc28491e4e6c7324f1 Author: Eric Anholt Date: Wed Apr 23 09:52:17 2014 -0700 Add a command line argument for disabling indirect GLX. The attack surface for indirect GLX is huge, and it's of no use to most people (if you get an indirect GL context, you're better served by a immediate X error than actually trying to use an indirect GL context and finding out that it doesn't support doing anything you want, slowly). This flag gives you a chance to disable indirect GLX in environments where you just don't need it. I put in both the '+' and '-' arguments right now, so that it's easy to patch the value to change the default policy. Signed-off-by: Eric Anholt Acked-by: Julien Cristau Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a4d96afdbddb7a636df8e336059d3a5624f2e6ae Author: Zhigang Gong Date: Wed Apr 23 18:54:43 2014 +0900 glamor: Fallback to system memory when fail to allocate one big fbo. Even when create a pixmap which smaller than the max_fbo_size, it may fail due to some low level driver limitation. If that is the case, we don't need to crash the xserver. We just need to fallback to system memory. See the related bug at: https://bugs.freedesktop.org/show_bug.cgi?id=71190 Signed-off-by: Zhigang Gong Reviewed-by: Michel Dänzer Tested-by: Kai Wasserbach Tested-by: Erich Seifert Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 21e0e373858bd7f3458172ebd465397e33b90162 Author: Michel Dänzer Date: Wed Apr 23 18:54:42 2014 +0900 glamor: Fix memory leak in _glamor_copy_n_to_n() It would leak the memory allocated for the region rects in some cases. Found with valgrind. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 4e9aabb6fc15d8052934f20c6a07801c197ec36a Author: Anthony Waters Date: Wed Apr 23 18:54:41 2014 +0900 glamor: Fix coordinates handling for composite source/mask pictures There were actually two issues with the original code I believe, the first is that the call to glamor_convert_gradient_picture wasn't properly referencing the coordinates of the source/mask pictures. The second, was that the updated references (x_temp/y_temp) were also improperly set, they should always be 0 because the temp pictures are new ones that start at (0, 0). The reason it worked in certain cases and it didn't in others (notably the tray icons) was due to the numbers working out based on the call to glamor_composite. In the cases that it did work extent->x1 would equal x_dest and extent->y1 would equal y_dest, making it so what was actually passed into glamor_convert_gradient_picture and the settings for x_temp/y_temp were correct. However, for the case when extent->x1 wouldn't equal x_dest and extent->y1 wouldn't equal y_dest (for example with the tray icons) then the wrong parameters get passed into glamor_convert_gradient_picture and x_temp/y_temp are set improperly. Fixes issues with tray icons not appearing properly in certain cases. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64738 Signed-Off-by: Anthony Waters Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt commit 5062b4fadd977d044e54b53b7f3e02e466eac9a9 Author: Keith Packard Date: Sun Mar 16 20:44:48 2014 -0700 glamor: Add glamor_transfer based glamor_get_image and glamor_put_image These use the upload_boxes and download_boxes helpers to provide reasonably efficient image transfer. Fixes segfaults in Xephyr with x11perf -reps 1. Performance improvements: Improves -putimage10 by 548.218% +/- 88.601% (n=10). Improves -putimage500 by 3.71014% +/- 1.5049% (n=10). Improves -getimage10 by 8.37004% +/- 4.58274% (n=10). No statistically significant difference on -getimage500 (n=10). v2: Fix rebase failures, don't forget to check/prepare the gc in putimage fallbacks (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 747160016ba2d0cd42ad6b174cbf927d67c01875 Author: Keith Packard Date: Tue Apr 22 16:33:45 2014 -0700 glamor: Wire alpha to 1 for pictures without alpha bits When sourcing a picture that has no alpha values, make sure any texture fetches wire the alpha value to one. This ensures that bits beyond the depth of the pixmap, or bits other than the RGB values aren't used. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit a69907288d59792fd783f2f1756cde03d4a06f97 Author: Michel Dänzer Date: Mon Apr 21 17:47:15 2014 +0900 glx: If DRI2GetBuffers changes the GL context, call it again By changing the context, it may also invalidate the DRI2 buffer information, so we need to get that again. Fixes crashes due to use-after-free with LIBGL_ALWAYS_INDIRECT=1 glxgears and piglit. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit f6abfece3e59fa8c2e14a61430133816837855f8 Author: Eric Anholt Date: Thu Apr 17 18:50:13 2014 -0700 glamor: Move a make_current before the first GL call entrypoint. Fixes a usage of the wrong context with swrast GLX's GetImage entrypoint. Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 707726b155a2a086d12e0a6abef7f1e59def5370 Author: Eric Anholt Date: Fri Apr 4 07:03:46 2014 +0100 glamor: Do the same MakeCurrent(None) for GLX as we do for EGL. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 482b06a95a0a2c9a58bc196eb3dd928d796853df Author: Eric Anholt Date: Fri Apr 4 07:03:31 2014 +0100 glamor: Explain the weird EGL_NO_CONTEXT code. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit fab0a4a4c9dad2275bb398d09632f4274b5e16f2 Author: Eric Anholt Date: Fri Mar 14 17:31:18 2014 -0700 glamor: Replace glamor_get/put_context() with just glamor_make_current(). Now that we have the DIX global state for the current context, we don't need to track nesting to try to reduce MakeCurrent overhead. v2: Fix a mistaken replacement of a put_context with make_current in glamor_fill_spans_gl() (caught by keithp). Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer (v1) Reviewed-by: Adam Jackson (v1) commit 11ff12d4e74c0b514cb62cc47df9770c91e5002a Author: Eric Anholt Date: Fri Mar 14 17:29:31 2014 -0700 glamor: Stop unsetting the EGL context in put_context(). This matches the Xephyr behavior. Now that we know when to reset the context in the presence of GLX, we don't need to try to keep our stuff from being smashed by GLX. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit b5e394b3f5d80749af0148611df2eb009e7bf823 Author: Eric Anholt Date: Fri Mar 14 17:20:12 2014 -0700 glamor: Use lastGLContext to coordinate the context with GLX. This gets us some more context changes that are needed to make sure the two sides render to the right drawables and manipulate the right objects. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit ab6e958a2e611b03e475c16d10beb9961d8dffc8 Author: Eric Anholt Date: Wed Apr 9 10:23:01 2014 -0700 glx: Make sure that DRI2/swrast calls haven't changed the GL context. These functions are called from the GL driver, in some series of GL calls by GLX. If some server component (like glamor CreatePixmap for GetBuffers()) changes the GL context on us, we need to set it back or the later GL calls will land in the glamor context instead of the GLX context. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit f3f2fb6baac3d2b248eb4b0da13fe95e9dc3de7d Author: Eric Anholt Date: Wed Apr 9 11:25:32 2014 -0700 glx: Refactor DRI2CopyRegion calls. I needed to add some code to each one, so it's a good time to make a helper func. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 008f1ab31e8ac6be8f3fb11f19cdf8674be318dd Author: Eric Anholt Date: Thu Apr 17 18:28:54 2014 -0700 glx: Unconditionally clear lastGLContext on loseCurrent(). This hook calls unbindContext in the DRI driver interface, which unsets the dispatch table, regardless of whether the context argument was the current one or not. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit 789509ef5324ce9141222fa92dea51b5cc777209 Author: Eric Anholt Date: Thu Apr 17 18:23:51 2014 -0700 glx: Move GLX MakeCurrent lastGLContext updates next to makeCurrent(). We want to make sure that lastGLContext is set correctly during makeCurrent, because we may have recursive GL context changes in the DRI2 interfaces due to glamor. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit abf12027063dbe22bec1d055ad8db365cf07395a Author: Eric Anholt Date: Thu Apr 17 18:18:49 2014 -0700 glx: Move the GLX variable caching what GL context is current to dix. GLX is trying to track whether the context it wants is current, to avoid the glFlush() (and the rest of the overhead) that occurs on all MakeCurrent calls. However, its cache can be incorrect now that glamor exists. This is a step toward getting glamor to coordinate with GLX. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit f12221cbd8ff33070fa2ca086bccf7ed32115f0e Author: Eric Anholt Date: Wed Apr 16 16:16:21 2014 -0700 glamor: Fix a missing set of the GL context. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Michel Dänzer Reviewed-by: Adam Jackson commit e924034269532979f1e88947ee9c33d30461edae Author: Eric Anholt Date: Mon Apr 21 10:56:38 2014 -0700 glamor: Fix accelerated rendering of GTK's ARGB vs xBGR composites. There is some complicated code to support tweaking the format as we upload from a SHM pixmap (aka the GTK icon cache), but if we weren't sourcing from a SHM pixmap we just forgot to check that the formats matched at all. We could potentially be a little more discerning here (xRGB source and ARGB mask would be fine, for example), but this will all change with texture views anyway, so just get the rendering working for 1.16 release. Fixes the new rendercheck gtk_argb_xbgr test. v2: Squash in keithp's fix for checking that we have a non-NULL pixmap, and reword the comment even more. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 4bbee6761d49478fa40ec5daa2797f13ae96ce5c Author: Jamey Sharp Date: Fri Apr 18 09:31:09 2014 -0700 Make glamor build with --enable-debug. Bad anholt, no biscuit. Broken in commit 4c9a20072552c52b3763bd73e7a7e9b9cb8b4993. Signed-off-by: Jamey Sharp Cc: Eric Anholt Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit ba2432a020a9f9bd0892f643117795336ba0fc16 Author: Adam Jackson Date: Thu Apr 10 11:34:28 2014 -0400 xfixes: Forbid manipulating clip for source-only pictures (#28968) Just throw BadPicture instead of crashing. It's not currently a meaningful thing to do anyway, RenderSetPictureRectangles would error if you tried (which this patch changes to BadPicture as well for consistency). The problem with trying to do it is if the clip is specified as a pixmap then we try to convert it to a region, and ->BitmapToRegion requires a ScreenPtr, and source-only pictures don't have one. I can imagine a use for client clip on source-only pictures, so if we really wanted to allow this, probably the way forward is to always store the clip as a region internally, and when setting the clip _from_ a pixmap, look up BitmapToRegion relative to the pixmap not the picture. But since clearly nobody can be relying on it working... Signed-off-by: Adam Jackson Reviewed-by: Hans de Goede Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 70e564104b69bc53d29633f392f2c1ab94caddc9 Author: Dominik Behr Date: Tue Apr 1 20:36:13 2014 -0700 xf86RandR12: use correct gamma size when allocating gamma table When setting crtc->gamma_size to randr_crtc->gammaSize we should use randr_crtc->gammaSize to allocate new gamma table in crtc. Currently, if randr_crtc->gammaSize > crtc->gammaSize the subsequent memcpy will overwrite memory beyond the end of gamma table. Signed-off-by: Dominik Behr Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 35d275c7519570ceaf82cd5e7a663a8a5be4d441 Author: Eric Anholt Date: Fri Apr 4 08:38:33 2014 +0100 os: Initialize the set of signals to be suppressed during our handler. Fixes a valgrind complaint: ==8805== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s) ==8805== at 0x5EB8315: __libc_sigaction (sigaction.c:66) ==8805== by 0x5B13DA: busfault_init (busfault.c:145) ==8805== by 0x5A60A2: OsInit (osinit.c:191) ==8805== by 0x46EBA2: dix_main (main.c:163) Signed-off-by: Eric Anholt Reviewed-by: Alan Coopersmith Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 19e5a13970ad9d440c0789395e94931429ef4fbb Author: YunQiang Su Date: Sat Oct 12 13:22:35 2013 +0800 Fix hw/xfree86/common/compiler.h for mips64 Mark mips64 as 64bit Use long as PORT_SIZE Signed-off-by: YunQiang Su Reviewed-by: Matt Turner Signed-off-by: Keith Packard commit f466fb2432292d74123d701764c432d3aa75ef1d Author: Adam Jackson Date: Thu Apr 10 11:45:37 2014 -0400 xres: Fix size estimation for <8bpp pixmaps (#69057) Just use floats, it's not like this is a performance path. Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 5df66822c9f6bac1ed3952971958068600ccd095 Author: Keith Packard Date: Mon Apr 21 21:38:28 2014 -0700 shadowfb: Fix compilation errors Ok, that's embarassing -- I didn't even make sure Adam's patch compiled. These are minimal fixes to make it build. Signed-off-by: Keith Packard commit 2dcb1672620ef5f16111517e9e7a98cf97deb678 Author: Adam Jackson Date: Thu Apr 10 13:42:42 2014 -0400 shadowfb: Port to miext/damage (#31303, #65547) Somewhat shocking how much simpler this is, isn't it? We no longer need to wrap the screen or GC or Picture, because damage does it for us, which is doubly great since the old shadowfb code didn't wrap _enough_ things (border updates and Render glyphs, at least). The only real difference now between this and shadow is a) shadow will let you track arbitrary pixmaps, and b) shadow's update hook runs off the BlockHandler whereas shadowfb is immediate. Tested on nouveau. Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 8edeac202ecbace859b7889dd811424471dcca73 Author: Peter Harris Date: Wed Apr 16 20:24:34 2014 -0400 composite: Fix memory leak in compCopyWindow Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 935ea0d7b5e18ad8f22ee074a08cbdc7390d0f5d Author: Alan Coopersmith Date: Mon Apr 21 15:18:45 2014 -0700 dmxConfigCanvasUpdate: Delay dereference until after checking for NULL Flagged by cppcheck 1.64: [hw/dmx/config/xdmxconfig.c:306] -> [hw/dmx/config/xdmxconfig.c:323]: (warning) Possible null pointer dereference: fs - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 983e30361f49a67252d0b5d82630e70724d69dbf Author: Peter Harris Date: Fri Apr 11 17:44:59 2014 -0400 fb: Fix origin of source picture in fbGlyphs If a source picture doesn't repeat and a mask format is specified, the incorrect calulation of the origin of the glyphs caused the glyphs to not be drawn at all. Noticed when running gtk-demo from RHEL 6.5 and selecting "Rotated Text". Signed-off-by: Peter Harris Reviewed-by: Keith Packard Signed-off-by: Keith Packard /* Test for this bug cc -std=c99 -o glyph glyph.c `pkg-config --cflags --libs xcb-render` */ // 16 x 16 pictfmt_a8 "glyph" static const char glyph[] = { 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, }; static struct { uint8_t len; uint8_t pad[3]; uint16_t deltax, deltay; uint8_t glyph; uint8_t pad2[3]; } elt = { len:1, glyph:1, deltax:WIN_SIZE/2 - GLYPH_SIZE/2, deltay:WIN_SIZE/2 - GLYPH_SIZE/2 }; int main(int argc, char *argv[]) { int screen; xcb_connection_t *c = xcb_connect(NULL, &screen); if (!c || xcb_connection_has_error(c)) { fprintf(stderr, "Cannot open default display \"%s\"\n", getenv("DISPLAY")); return EXIT_FAILURE; } // Find root window and depth const xcb_setup_t *setup = xcb_get_setup(c); if (screen >= setup->roots_len) screen = 0; xcb_screen_iterator_t si = xcb_setup_roots_iterator(setup); for (int i=0; i < screen; i++) xcb_screen_next(&si); xcb_window_t root = si.data->root; uint8_t depth = si.data->root_depth; xcb_visualid_t visual = si.data->root_visual; // Find picture formats xcb_render_query_pict_formats_reply_t *qpf; qpf = xcb_render_query_pict_formats_reply(c, xcb_render_query_pict_formats(c), NULL); if (!qpf) { fprintf(stderr, "Cannot query RENDER picture formats\n"); return EXIT_FAILURE; } xcb_render_pictformat_t fmt_a8 = 0; xcb_render_pictforminfo_iterator_t pfi = xcb_render_query_pict_formats_formats_iterator(qpf); for (int i = 0; i < xcb_render_query_pict_formats_formats_length(qpf); i++) { if (pfi.data->depth == 8 && pfi.data->type == XCB_RENDER_PICT_TYPE_DIRECT && pfi.data->direct.alpha_mask == 0xFF) { fmt_a8 = pfi.data->id; break; } xcb_render_pictforminfo_next(&pfi); } if (!fmt_a8) { fprintf(stderr, "Cannot find a8 RENDER picture format\n"); return EXIT_FAILURE; } xcb_render_pictformat_t fmt_visual = 0; xcb_render_pictscreen_iterator_t psi = xcb_render_query_pict_formats_screens_iterator(qpf); for (int i = 0; i < xcb_render_query_pict_formats_screens_length(qpf); i++) { xcb_render_pictdepth_iterator_t pdi = xcb_render_pictscreen_depths_iterator(psi.data); for (int j = 0; i < xcb_render_pictscreen_depths_length(psi.data); i++) { xcb_render_pictvisual_iterator_t pvi = xcb_render_pictdepth_visuals_iterator(pdi.data); for (int k = 0; k < xcb_render_pictdepth_visuals_length(pdi.data); i++) { if (pvi.data->visual == visual) { fmt_visual = pvi.data->format; goto found_visual; } xcb_render_pictvisual_next(&pvi); } xcb_render_pictdepth_next(&pdi); } xcb_render_pictscreen_next(&psi); } found_visual: if (!fmt_visual) { fprintf(stderr, "Cannot find visual RENDER picture format\n"); return EXIT_FAILURE; } xcb_render_glyphset_t glyphset = xcb_generate_id(c); xcb_render_create_glyph_set(c, glyphset, fmt_a8); uint32_t glyph_ids[] = {1}; xcb_render_add_glyphs(c, glyphset, 1, glyph_ids, &(xcb_render_glyphinfo_t){width:GLYPH_SIZE, height:GLYPH_SIZE}, sizeof(glyph), glyph); // Create window, pixmap, and gc xcb_window_t window = xcb_generate_id(c); uint32_t list[] = { si.data->black_pixel, XCB_EVENT_MASK_EXPOSURE }; xcb_create_window(c, XCB_COPY_FROM_PARENT, window, root, 0, 0, WIN_SIZE, WIN_SIZE, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT, XCB_COPY_FROM_PARENT, XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK, list); xcb_map_window(c, window); xcb_render_picture_t winpic = xcb_generate_id(c); xcb_render_create_picture(c, winpic, window, fmt_visual, 0, NULL); xcb_pixmap_t pixmap = xcb_generate_id(c); xcb_create_pixmap(c, depth, pixmap, window, GLYPH_SIZE, GLYPH_SIZE); xcb_render_picture_t pixpic = xcb_generate_id(c); xcb_render_create_picture(c, pixpic, pixmap, fmt_visual, 0, NULL); xcb_render_fill_rectangles(c, XCB_RENDER_PICT_OP_SRC, pixpic, (xcb_render_color_t){green:0xFFFF, alpha:0xFFFF}, 1, &(xcb_rectangle_t){width:GLYPH_SIZE, height:GLYPH_SIZE} ); xcb_flush(c); for (xcb_generic_event_t *ev = xcb_wait_for_event(c); ev; ev = xcb_wait_for_event(c)) { int type = ev->response_type; free(ev); if (type == XCB_EXPOSE) { xcb_clear_area(c, 0, window, 0, 0, 0, 0); xcb_render_composite_glyphs_8(c, XCB_RENDER_PICT_OP_SRC, pixpic, winpic, fmt_a8, glyphset, 0, 0, sizeof(elt), (uint8_t *)&elt); xcb_flush(c); } } return EXIT_SUCCESS; } commit 80a0b29c3b61ba9024bd0278ea8cc51686afe3f4 Author: Michel Dänzer Date: Fri Apr 11 11:01:51 2014 +0900 glamor: Add remaining header files to SOURCES It wasn't possible to build glamor from tarballs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64297#c9 Signed-off-by: Michel Dänzer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit ea15f8b4c90ebef21d4031bf7f412ef9241d5438 Author: Jasper St. Pierre Date: Mon Apr 21 16:30:49 2014 -0400 dixfonts: Turn a missing directory ErrorF into a DebugF On systems without these directories, we don't need to be complaining loudly. Reviewed-by: Kristian Hoegsberg Signed-off-by: Keith Packard commit ba5c2b6c876a15fe18bc1ff1ab4e773c46bc9009 Merge: 9c86d5f4f 66b602474 Author: Keith Packard Date: Mon Apr 21 14:59:51 2014 -0700 Merge remote-tracking branch 'krh/xwayland-for-keithp' commit 9c86d5f4f6f5d6d135a9f2f8eae904c6441e84e5 Author: Kristian Høgsberg Date: Tue Mar 25 14:57:12 2014 -0700 .gitignore: Add new autotools file 'test-driver' Automake 1.12 introduces a new parallel test framework that uses a shell script helper and generates *.log and *.trs files. Add to .gitignore. Signed-off-by: Kristian Høgsberg Reviewed-by: Gaetan Nadon Signed-off-by: Keith Packard commit 28fa5dd5cad3a5fb51018250dfa2b605a8aea85c Author: Julien Cristau Date: Mon Apr 14 15:27:19 2014 +0200 configure: require xproto 7.0.26 for pointer typedef removal Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit d2274f2f46db300ac75ca0fdcba7f5655865b8b6 Author: Julien Cristau Date: Mon Apr 14 15:27:18 2014 +0200 configure: require fontsproto 2.1.3 for pointer typedef removal Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 6d892ad112fc887e184f50c5dc2ba593668e9e11 Author: Robert Morell Date: Fri Apr 18 18:29:44 2014 -0700 randr: Implement RandR 1.4 request swapping The protocol handlers all have support for swapping variable data and replies, but the top-level dispatch plumbing was missing. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ed4ee7c34a7fbb58a449647fb8d968618c499a61 Author: Robert Morell Date: Fri Apr 18 18:29:43 2014 -0700 randr: Fix size checks for SetProvider* reqs Both xRRSetProviderOutputSourceReq and xRRSetProviderOffloadSinkReq are fixed-size requests, so the length on the wire should match exactly. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 668321e7e5acb41c0c7b299f57165e86dc74d7ed Author: Robert Morell Date: Fri Apr 18 18:29:42 2014 -0700 randr: Fix crash for NULL swap dispatch procs The previous code was checking the wrong table for function pointers. Signed-off-by: Robert Morell Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 66b602474047c499b8a888267a489790fc9f9d85 Author: Kristian Høgsberg Date: Mon Apr 21 11:14:51 2014 -0700 xwayland: Remove left-over ErrorF logging Reviewed-by: Jasper St. Pierre Signed-off-by: Kristian Høgsberg commit 138bf5ac9703b410a6066c303feea067680edf5a Author: Jamey Sharp Date: Fri Apr 18 12:22:19 2014 -0700 DRI2SwapBuffers: Fix uninitialized target SBC. Fixes Piglit test "swapbuffersmsc-return swap_interval 0". Ensure that *swap_target gets initialized on any 'return Success' path, even if the swap request can't be completed by the driver and the server falls back to a simple blit. That path can also be triggered by setting swap_interval to 0, which disables sync to vertical retrace. We originally found this bug because for some reason SDL2 automatically sets swap_interval to 0, when we were trying to test OML_sync_control in an SDL2 test application. We then discovered that the above-mentioned Piglit test has been failing for the same reason since it was introduced. Signed-off-by: Jamey Sharp Signed-off-by: Theo Hill Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 4927af4475bc7d020190d9f468c90366525c1109 Author: Jamey Sharp Date: Fri Apr 18 12:22:18 2014 -0700 DRI2SwapBuffers: Don't reuse swap_target variable. swap_target is an out-parameter that needs to be set to the value that SBC will take on after this SwapBuffers request completes. However, it was also being used as a temporary variable to hold the MSC at which the SwapBuffers request got scheduled to occur. This confusion makes it harder to reason about whether swap_target is being set correctly for its out-parameter usage. (Hint: It isn't.) For the latter use, it makes more sense to use the existing target_msc variable, which already has the right value unless target_msc, divisor, and remainder are all 0, in which case we can set it using swap_interval as usual. Signed-off-by: Jamey Sharp Signed-off-by: Theo Hill Reviewed-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit d2c6e801b548674b8636e6a64b42c9038d46263c Author: Kristian Høgsberg Date: Tue Apr 8 09:23:42 2014 -0700 configure.ac: Remove check for WAYLAND_SCANNER_RULES This makes configure fail if the wayland autoconf macros aren't found. We don't need the scanner for shm-only xwayland so just drop this line for now. Reviewed-by: Daniel Stone Reviewed-by: Gaetan Nadon Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Kristian Høgsberg commit f618455c802abb77de8d64eb442422cfe5e26ea8 Author: Kristian Høgsberg Date: Tue Apr 8 09:19:13 2014 -0700 xwayland: Build without xshmfence Reviewed-by: Daniel Stone Signed-off-by: Kristian Høgsberg commit 552d40b26a082df6f1816bb461793b8fa8b553c6 Author: Kristian Høgsberg Date: Tue Apr 8 09:17:51 2014 -0700 xwayland: Build without GLX extension Reviewed-by: Daniel Stone Signed-off-by: Kristian Høgsberg commit c7011249d2abe6cc7af82ee4b79d8f6873444707 Author: Keith Packard Date: Fri Apr 18 15:12:14 2014 -0700 xkb: Verify reads of compiled keymap header and TOC Check the return values from fread to make sure the elements are actually getting read from the file. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 0af8788579c2f52cc1172952c9004483bf863932 Author: Keith Packard Date: Fri Apr 18 15:09:50 2014 -0700 os: Ignore log file write failures There's no place to log the message if writing to the log file fails, and we surely don't want to crash in that case, so just ignore errors and keep going. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 7abd28685066369ded807f59493c1159cfb286bf Author: Keith Packard Date: Fri Apr 18 15:05:00 2014 -0700 os: Make sure that writing our pid to the lock file actually worked There's no sense verifying that we can create the lock file and then ignoring the return value from write. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit d72f691c0c9cace857975a6608a4cb431c8b6846 Author: Keith Packard Date: Fri Apr 18 15:00:30 2014 -0700 os: FatalError if -displayfd writes fail When the server is started with the -displayfd option, check to make sure that the writes succeed and give up running if they don't. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 4957e986841225e9984daca76f1a0ee08df125bb Author: Keith Packard Date: Fri Apr 18 15:00:35 2014 -0700 os: Clear the -displayfd option after closing the file Failing to clear this means that we'll attempt to write the display number to a random file descriptor on subsequent X server generations. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 0c0feddbcda238efa82a47f456ef3008ffa53195 Author: Keith Packard Date: Fri Apr 18 14:54:02 2014 -0700 kdrive: Ignore failure to chown console tty to current user I'm not sure what we'd do in this case anyways, other than fatal error. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 696e08f8e820449bb4b0ce7a60bf5b5bc5097935 Author: Keith Packard Date: Fri Apr 18 14:50:14 2014 -0700 kdrive: Explicitly ignore errors from the -switchCmd script Make it clear that we intentionally ignore the -switchCmd return value. This keeps GCC from emitting a warning when the server is compiled with -D_FORTIFY_SOURCE=2. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 570b1c79942b237022be3594ae3a25e7b833cb73 Author: Keith Packard Date: Fri Apr 18 14:47:00 2014 -0700 test: [v2] Validate server log reading more carefully in signal-logging test Check return value from fgets and strchr instead of assuming they worked. [v2] Don't do any necessary work inside the assert call. Also make sure the return value was long enough. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 3119aae80782b7ff5613c719fbcc8a01feab1134 Author: Gaetan Nadon Date: Fri Apr 4 14:59:21 2014 -0400 test: create a link to the generated hw/xfree86/sdksyms.c at build time Automake 1.14 gives us warning about source code specified in _SOURCES that comes from directories other than the current one. It suggests to enable the subdir-objects feature which only supports code in sub directories. The test directory needs source from hw/xfree86 which is neither under test nor under a sub directory of test. In 1.14 we get a warning, in 2.0 it will break as it will overwrite the object code in xfree86. The solution in this case is to create a link to hw/xfree86/sdksyms.c at build time. It's just like any other built source file. There are no links created in git. Signed-off-by: Gaetan Nadon Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 58ef01648b18f85ad79620da110ece2339f638c3 Author: Adam Jackson Date: Thu Apr 17 10:49:46 2014 -0400 dri1: Don't bother asking the loader about drmGetLibVersion This was added for DRM_IOCTL_SET_VERSION support, which has been around for over ten years now. Since we require ≥2.3.0 in configure.ac this would really only protect you if you managed to build against a modern libdrm but run against one that's more than 7½ years old, which, doctor it hurts when I do this. Archaeology: http://cgit.freedesktop.org/~ajax/dri/commit/xc/programs/Xserver/GL/dri/dri.c?id=77d62efca033dced96ab7998b7c62a4e2df907d5 Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Signed-off-by: Keith Packard commit 461ed561b9f75cee43c0dfd39228716f977956e7 Author: Hans de Goede Date: Fri Apr 18 11:30:16 2014 +0200 Xorg.wrap manpages: use __appmansuffix__ instead of hardcoding 1 Cc: Gaetan Nadon Signed-off-by: Hans de Goede Reviewed-by: Gaetan Nadon commit 584961c86427b400a5ba65b0f145d00748d2da1e Author: Hans de Goede Date: Fri Apr 18 11:26:00 2014 +0200 man/Makefile.am: Fix Xorg.wrap.man Xwrapper.config.man missing from make dist Fix suggested by: Gaetan Nadon Cc: Gaetan Nadon Signed-off-by: Hans de Goede Reviewed-by: Gaetan Nadon commit ec01d51a9973a9cf5f32f14f00058f1fdc9ed25e Author: Guillem Jover Date: Mon Apr 14 18:13:25 2014 +0200 Xorg.wrap: Make the console check portable Handle the unported case by issuing a build-time and run-time warning. And add support for FreeBSD kernel based systems, by using the VT_GETINDEX ioctl to check if the file descriptor is on a virtual console. Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 3a469917b585914ba2421e305f3b6a837b232e93 Author: Guillem Jover Date: Mon Apr 14 18:13:24 2014 +0200 Xorg.wrap: Clarify error messages Not printing the program name produces very confusing messages that might be difficult to attribute while trying to diagnose problems, let's be explicit about who we are. Also add a missing "/" between SUID_WRAPPER_DIR and "Xorg.bin". Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 50b6e1b0d786d95ee8eab030b0d1fd7420e2fbeb Author: Guillem Jover Date: Mon Apr 14 18:13:23 2014 +0200 Xorg.wrap: Use instead of hardcoding libdrm include path The libdrm.pc file gives us the correct include path, do not try to hardcode it on the source, as it might vary on the installed system, for example on Debian-based systems it's under /user/include/libdrm/. Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 7bffceb9f939c0bf5529b00500cbb14ae01bb61a Author: Guillem Jover Date: Mon Apr 14 18:13:22 2014 +0200 Xorg: Add Xorg.wrap to hw/xfree86/.gitignore Signed-off-by: Guillem Jover Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit 208157a76c6f340e0161e18ac77149d7110af2f5 Author: Julien Cristau Date: Sun Apr 13 19:14:34 2014 +0200 configure: fix help text for dmx As of 93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce it's disabled by default, so stop saying it's automatically enabled in configure --help. Signed-off-by: Julien Cristau Reviewed-by: Kenneth Graunke Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede commit c917fa411502d402b9c69de30f6a88e102bb8610 Author: Keith Packard Date: Tue Apr 8 01:01:28 2014 -0700 glamor: Always allocate precisely the requested pixmap size Using a pixmap as a tile or stipple means that we must have the underlying FBO match the pixmap geometry exactly. We may want to add some complexity here to migrate pixmaps into exact sized objects as necessary, but for now, make the server work correctly by skipping this optimization. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3028ae6c9aa37168e249e0d847b29f8e3efb05b2 Merge: bd3de10f8 ec6007e6f Author: Keith Packard Date: Wed Apr 9 21:59:17 2014 -0700 Merge remote-tracking branch 'jeremyhu/master' commit bd3de10f86a511886b0748d55fa19860314a0150 Author: Keith Packard Date: Tue Apr 8 14:25:18 2014 -0700 Bump to version 1.15.99.902. Closing the 1.16 merge window. Signed-off-by: Keith Packard commit 6ec04a75deb1695820e337abbefe1929d5928f15 Author: Keith Packard Date: Fri Apr 4 16:28:43 2014 -0700 dri3: Fix dri3_open API change by adding new dri3_open_client Xwayland will eventually need the current client in dri3_open. Simply changing that API is not an option though as other drivers that implement DRI3 will not have a matching function signature and will crash when called. Add a new dri3_open_client function pointer and bump DRI3_SCREEN_INFO_VERSION so that drivers can be aware of the new function which will be used in preference to the old function when available. Signed-off-by: Keith Packard Reviewed-by: Eric Anhole commit ec6007e6f7772a90713c9c51c64359229961ce27 Author: Jeremy Huddleston Sequoia Date: Sun Apr 6 05:32:00 2014 -0700 XQuartz: Ensure we wait for the server thread to terminate AKA: XQuartz 2.7.5 doesn't delete its /tmp/.X$d-lock http://xquartz.macosforge.org/trac/ticket/823 Signed-off-by: Jeremy Huddleston Sequoia commit 901fbfbbbd71c0d82080957f8ba09eebbc786f2b Author: Michael Thayer Date: Mon Mar 31 11:21:42 2014 +0200 Add a return value to load_cursor_argb() to allow it to report failure load_cursor_argb() may need to be able to fail and have the server fall back to a software cursor in at least the following circumstances. 1) The hardware can only support some ARGB cursors and this does not just depend on cursor size. 2) Virtual hardware may not wish to pass through a cursor to the host at a particular time but may wish to accept the same cursor at another time. This patch adds a return value to the API and makes the server do the software fall-back on failure. Signed-off-by: Michael Thayer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 62ab4102260fd3342a0e5ae3a4f77b430af64f4e Author: Michael Thayer Date: Mon Mar 31 11:19:16 2014 +0200 Set a flag property on the root window to say if the X server VT is active An X11 client may need to know whether the X server virtual terminal is currently the active one. This change adds a root window property which provides that information. Intended interface user: the VirtualBox Guest Additions. Signed-off-by: Michael Thayer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit b851ca968b7cce6d1a6438c05d3d5c8832249704 Author: Daniel Stone Date: Thu Apr 3 18:22:50 2014 +0100 Add pScreen->NameWindowPixmap hook This hook allows drivers to be notified when a pixmap gains a new ID. (ABI break.) Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit b4d0bec22c15930abf13a7fb9d684208ccd56b1d Merge: 3c34dd360 6e539d881 Author: Keith Packard Date: Thu Apr 3 15:35:01 2014 -0700 Merge remote-tracking branch 'krh/xwayland-for-keithp' commit 6e539d8817f738289dc2dea13d0720116287ab9d Author: Kristian Høgsberg Date: Tue Mar 11 16:11:39 2014 -0700 Xwayland DDX Started out as an Xorg module to be used from Xorg drivers to let Xorg run under a wayland server. The idea was to be able to reuse the 2D acceleration from the Xorg driver. Now with glamor being credible, a better plan is to just make Xwayland its own DDX, similar to Xwin and Xquartz. This is a much better fit, as much of the code in the original approach had to hack around Xorg doing Xorg things like take over the VT, probe input devices and read config files. Another big win is that Xwayland dosn't need to be setuid root. The Xwayland support for DRI3, Glamor and render nodes was done by Axel Davy , who also did a lot of work on the rebase to the Xwayland DDX. Contributions from: Christopher James Halse Rogers Corentin Chary Daniel Stone Kristian Høgsberg Robert Bragg Scott Moreau Tiago Vignatti Giovanni Campagna Jonas Ådahl Ray Strode Trevor McCort Rui Matos Axel Davy Jasper St. Pierre Signed-off-by: Kristian Høgsberg Reviewed-by: Axel Davy commit 3c34dd3603989c0365654ca1b6809395c7f3b169 Author: Keith Packard Date: Tue Apr 1 21:15:48 2014 -0700 glamor: Add glamor_program based poly_text and image_text Accelerates text painting with GPU-based geometry computation and stippling v2: Simplify get_glyphs, expand single character variable names to more descriptive ones. (Markus Wick) v3: Rebase against the glamor_prepare_* un-renaming (changes by anholt). Improves x11perf -f8text by 417.908% +/- 11.0144% (n=10) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5f700c3ac31db52f02f6ef11ea7823a8ce4f6f6f Author: Keith Packard Date: Tue Apr 1 21:15:47 2014 -0700 glamor: Use glamor_program for glamor_glyphblt This constructs suitable shaders using the glamor_program infrastructure for poly glyph blt, and then gets rid of the no-op wrapper of miImageGlyphBlt. Improves x11perf -f8text by 11.6221% +/- 1.04585% (n=10) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3411e8c538476443cafbb70082ef7457932e4a38 Author: Keith Packard Date: Tue Apr 1 21:15:46 2014 -0700 glamor: Add glamor_program based poly_fill_rect This accelerates poly_fill_rect using GPU-based geometry computation Improves x11perf -rect100 by 41.5127% +/- 7.63888% (n=10) Improves x11perf -rect10 by 3745.72% +/- 94.7503% (n=6) v2: Rebase on skipping the prepare rewrite for now, and fix the GLSL 1.20 and GLES2 cases (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0a6d31161811c422799d6f065ea2842d42707530 Author: Keith Packard Date: Tue Apr 1 21:15:45 2014 -0700 glamor: Add glamor_program based fill/set/get spans This accelerates spans operations using GPU-based geometry computation -wellipse500 goes from about 4k/sec before the patch, to ~8k/sec in the GLES2 fallback loop, to ~100k/sec in desktop mode. v2: Rebase on skipping the prepare rewrite for now, and fix the GLSL 1.20 and GLES2 cases (changes by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit d78c257f523908760c1b872cc4bef3d42eb31f50 Author: Keith Packard Date: Tue Apr 1 21:15:43 2014 -0700 glamor: Add simple upload/download functions in glamor_transfer These use glTexSubimage2D for upload and glReadPixels for download. There are a variety of interfaces to the basic function as needed by the callers. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 693e6bea897e4c9473a9f22dd8b90df3437e04a1 Author: Keith Packard Date: Tue Apr 1 21:15:42 2014 -0700 glamor: Use plain GLSL 1.20 features for fill code. This prevents performance regressions from losing acceleration support on older hardware as we transition to using glamor_program.c for acceleration. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5b76b3978d792c92b23a691204b473209782476e Author: Keith Packard Date: Tue Apr 1 21:15:42 2014 -0700 glamor: Compute supported GLSL version and save in screen private This currently computes the GLSL version in a fairly naïve fashion, and leaves that in the screen private for other users. This will let us update the version computation in one place later on. v2: Drop an accidental rebase-squashed hunk (change by anholt). Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 3c2c59eed3c68c0e5a93c38cf01eedad015e3157 Author: Keith Packard Date: Tue Apr 1 21:15:41 2014 -0700 fb: Publish fbGlyphs and fbUnrealizeGlyph This lets other code jump directly into the fb code for fallbacks Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9dffcda804b2609f0b319d35dd47fd401d4fafce Author: Keith Packard Date: Tue Apr 1 20:54:22 2014 -0700 glamor: Bail from composite when pixmap cannot be uploaded I think the sense of the return value was just flipped here; if you return TRUE, then the calling code assumes that the pixmap *has* been uploaded and that an FBO is available. When it tries to use it, it crashes though. Returning false makes the caller bail back to software. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15fec3bc3a2d29c903f35b5a30ac09e196eb36b1 Author: Keith Packard Date: Tue Apr 1 20:54:21 2014 -0700 glamor: Remove warning message when pixmap cannot be stored in a texture This happens when you have 4bpp pixmaps; it's not an error, so stop flooding the log file when it happens. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 5f177f3582323b6c1791e9e2c107548b607369de Author: Keith Packard Date: Tue Apr 1 20:54:20 2014 -0700 glamor: Public polyLines function is glamor_poly_lines_nf There was a spurious declaratoin in glamor.h for glamor_poly_line_nf Signed-off-by: Keith Packard Signed-off-by: Eric Anholt commit 6aac97198f60de9d4e415fb4fa2fc11cac6c6790 Author: Keith Packard Date: Tue Apr 1 20:54:19 2014 -0700 glamor: Initialize XV shaders from glamor_xv_init instead of glamor_init The glamor_init calls to glamor_init_xv_shader were never getting run because GLAMOR_XV was never defined. Instead of trying to make that work, fix glamor_xv_init to make the call instead. Further, just get rid of the glamor_fini_xv_shader function entirely as the shader program will be destroyed when the context is destroyed at server reset time. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 1707faf36d49a63efc462dfef133a555fe093832 Author: Keith Packard Date: Tue Apr 1 20:54:18 2014 -0700 glamor: SetWindowPixmap is not related to RENDER Move the configuration of screen->SetWindowPixmap out from under it. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 8d88b90953471ead3b480b6ae9d7280b8bd6b216 Author: Keith Packard Date: Tue Apr 1 20:54:15 2014 -0700 glamor: glamor_poly_point_nf cannot fail for non-DDX pixmaps All of the glamor _nf functions must check to see if the DDX can access the pixmap directly before returning failure back to the driver; this restructures the point code to split out the _nf checking from the _gl code. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit d5dd1d6371021c2aad94e33c5837ccd4bf9bf0f4 Author: Eric Anholt Date: Fri Mar 21 13:13:27 2014 -0700 Revert "glx: Make sure we get an FBConfig the root window's visual." This reverts commit b5a61239e2fef167c229154d7919ff862503e3f3. Not only did I screw up and introduce a warning, it turns out glXChooseFBConfig() explicitly ignores this attribute. Thanks, GLX. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 84f977467b514af88019ab2791bf7a74530b54df Merge: 9d20d18fb 98924719d Author: Keith Packard Date: Thu Apr 3 10:44:28 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 98924719d524bf87cdf301063cd744d1271c33ff Author: Peter Hutterer Date: Wed Apr 2 13:55:10 2014 +1000 Revert "xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP" This was the wrong fix to the problem, and it triggered a change in XKB behavior: previously a button event would unlock a latched modifier, now it doesn't anymore. https://bugs.freedesktop.org/show_bug.cgi?id=73155 Note that the new behavior is is strictly spec compliant but we've had the other behavior for a long time so we shouldn't break it. The bug this patch originally fixed was a null-pointer dereference when releasing button events on server shutdown. This was addressed by the commit below, so the need for this patch has gone away anyway. commit 3e4be4033aed78b2bb3a18d51f0963989efd1af3 Author: Peter Hutterer Date: Fri Jan 25 11:47:32 2013 +1000 dix: when shutting down slave devices, shut down xtest devices last This reverts commit 2decff6393a44b56d80d53570718f95354fde454. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 9d65c515d83d2158b5949e249777ca2a02b31901 Author: Hans de Goede Date: Tue Apr 1 11:24:17 2014 +0200 xf86LogInit: log to XDG_DATA_HOME when not running as root When no logfile was specified (xf86LogFileFrom == X_DEFAULT) and we're not running as root log to $XDG_DATA_HOME/xorg/Xorg.#.log as Xorg won't be able to log to the default /var/log/... when it is not running as root. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e738276e96590b2230dd9d9f5a3f9485f592e1e6 Author: Kristian Høgsberg Date: Mon Mar 31 18:04:07 2014 -0700 glamor: Expose glamor_destroy_pixmap() When we create a glamor pixmap by calling glamor_create_pixmap() directly, we need to call glamor_destroy_pixmap() to destroy it. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit d14803437582668f5ffea14071ea962b6b8e450d Author: Kristian Høgsberg Date: Mon Mar 31 18:00:54 2014 -0700 glamor: Add new GLAMOR_CREATE_PIXMAP_NO_TEXTURE pixmap create flag This flag lets a DDX allocate a glamor pixmap without allocating the texture that backs it. The DDX can then allocate the texture itself and then set it later. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit fe204185bc801bb17785dc8d1cde09d48b5e257f Author: Kristian Høgsberg Date: Mon Mar 31 17:59:18 2014 -0700 glamor: Move glamor_egl_screen_init() prototype to glamor.h A DDX that implements the glamor EGL functions need to pull in this prototype but shouldn't need to pull in glamor_priv.h Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 9ba2084321b1ac8d271feefee4f5b968d34226d6 Author: Kristian Høgsberg Date: Thu Mar 27 23:47:59 2014 -0700 dri3: Allow asynchronous implementation for dri3_open By passing the client pointer to the dri3_open implementation, we allow the clients to implement the open callback asynchronously. If the client ignore count is positive after returning from dri3_open, we assume that authentication is in progress and doesn't send the reply. The code to send the reply is moved into a helper function, which the implementation can call upon receiving its authenticaion reply. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 4ba7b594464887ae68623e150348d90812eec36c Author: Kristian Høgsberg Date: Thu Mar 27 22:15:28 2014 -0700 composite: Add exception mechanism for implicit redirection policy Normally composite will decide to add implicit redirection when a window with an alternate visual is a parent of a window with a regular visual or vice versa. This uses extra pixmap memory and incurs an extra copy. This exception mechanism provides a way for a DDX to override this if the DDX knows that its acceleration architecture will render correctly. The relevant case is that of an RGB window reparented into a ARGB parent frame window. If the DDX knows that the acceleration architecture in use will pad the alpha channel to opaque when rendering to the RGB window, the implicit redirection can be avoided. This patch adds a new composite function: CompositeRegisterImplicitRedirectionException() which lets a DDX register a pair of parent and child window visuals, that will not be implicitly redirected even if the normal policy would have made that choice. Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard commit 73698d41e41ce76bef2d9a90b46ac0c24ae148dd Author: Keith Packard Date: Mon Mar 31 23:55:25 2014 -0700 Make XYToWindow a screen function This allows DDXen to override the window picking to account for native windows not seen by the X server. The bulk of the picking logic is exposed as a new helper function, miSpriteTrace(). This function completes the sprite trace filled out by the caller, and can be set up to start the search from a given toplevel window. v2: Leave existing XYToWindow API in place for API compatibility Signed-off-by: Keith Packard Reviewed-by: Kristian Høgsberg commit f37a46913489397d8628ffe578c8d4ed50b6ca72 Author: Hans de Goede Date: Wed Mar 26 12:24:49 2014 +0100 configure: Change DEFAULT_LOGPREFIX to really be a filename prefix Rather then a full path prefix, this is a preparation patch for adding support for logging to another location when not running as root. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9d20d18fb9dcc74bfa5392a2da40fd41b3e640d3 Merge: 8468e2443 bc348bd2c Author: Keith Packard Date: Mon Mar 31 23:24:56 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 8468e24430988058b150dc1daef3aad6ba9fa698 Author: Adam Jackson Date: Thu Mar 27 11:48:39 2014 -0400 mi: Hush extension initialization (#75870) Printing these as ErrorF is fairly obnoxious, since it means the non-hardware servers now spew stuff to the console for entirely routine events. And actually, printing these at all is fairly obnoxious, since a) we're printing a line for every extension, whether it's enabled or not, and b) we're not actually initializing the extension at this point. Signed-off-by: Adam Jackson Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit a2880699e8f1f576e1a48ebf25e8982463323f84 Author: Keith Packard Date: Tue Mar 25 08:21:16 2014 -0700 fb: fix fast-path blt detection The width parameter is used to disable the blit fast-path (memcpy) when source and destination rows overlap in memory. This check was added in [0]. Unfortunately, the calculation to determine if source and destination lines overlapped was incorrect: (1) it converts width from pixels to bytes, but width is actually in bits, not pixels. (2) it adds this byte offset to dst/srcLine, which implicitly converts the offset from bytes to sizeof(FbBits). Fix both of these by converting addresses to byte pointers and width to bytes and doing comparisons on the resulting byte address. For example: A 32-bpp 1366 pixel-wide row will have width = 1366 * 32 = 43712 bits bpp = 32 (bpp >> 3) = 4 width * (bpp >> 3) = 174848 FbBits (FbBits *)width => 699392 bytes So, "careful" was true if the destination line was within 699392 bytes, instead of just within its 1366 * 4 = 5464 byte row. This bug causes us to take the slow path for large non-overlapping rows that are "close" in memory. As a data point, XGetImage(1366x768) on my ARM chromebook was taking ~140 ms, but with this fixed, it now takes about 60 ms. XGetImage() -> exaGetImage() -> fbGetImage -> fbBlt() [0] commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce Author: Adam Jackson Date: Thu Apr 21 16:37:11 2011 -0400 fb: Fix memcpy abuse The memcpy fast path implicitly assumes that the copy walks left-to-right. That's not something memcpy guarantees, and newer glibc on some processors will indeed break that assumption. Since we walk a line at a time, check the source and destination against the width of the blit to determine whether we can be sloppy enough to allow memcpy. (Having done this, we can remove the check for !reverse as well.) v3: Convert to byte units This first checks to make sure the blt is byte aligned, converts all of the data to byte units and then compares for byte address range overlap between source and dest. Signed-off-by: Keith Packard Reviewed-by: Daniel Kurtz commit bc348bd2c42f3f18786085ccef2f010eff5bf3d2 Author: Jon TURNEY Date: Mon Mar 11 14:34:32 2013 +0000 Handle -displayfd and an explicit display number sensibly Handle -displayfd and an explicit display number sensibly, e.g. use the explicitly specified display number, and write it to the displayfd v2: displayfd might be 0, so use -1 as invalid value v3: Rebase for addition of NoListenAll flag Signed-off-by: Jon TURNEY Reviewed-by: Kristian Høgsberg commit a3730271d52542757ec0f41acc29e7730501f666 Author: Jon TURNEY Date: Mon Mar 24 17:32:10 2014 +0000 Fix build when configured --enable-debug Include os.h for ErrorF() to fix implicit-function-declaration warnings when configured with --enable-debug. hw/xfree86/parser/DRI.c: In function 'xf86parseDRISection': hw/xfree86/parser/DRI.c:87:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] hw/xfree86/parser/Extensions.c: In function 'xf86parseExtensionsSection': hw/xfree86/parser/Extensions.c:77:5: error: implicit declaration of function 'ErrorF' [-Werror=implicit-function-declaration] Signed-off-by: Jon TURNEY Reviewed-by: Julien Cristau commit 5870bd398d6073938d821c060eccf24adc07a2f1 Author: Jon TURNEY Date: Mon Mar 24 17:32:09 2014 +0000 Fix ephyr build with --disable-glamor See http://tinderbox.x.org/builds/2014-03-23-0010/logs/xserver/#build Signed-off-by: Jon TURNEY Tested-by: Julien Cristau Reviewed-by: Julien Cristau commit 432fc37e2ca833f1ec3cb614cbdc3a7ae13f22b7 Author: Jon TURNEY Date: Mon Feb 24 20:45:51 2014 +0000 Build fbcmap_mi.c once, rather than once for each DDX Build fbcmap_mi.c once, rather than once for each DDX, and make it part of libfb or libwfb convenience library. Since 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 we don't have fbcmap.c This is a sort of revert of 17d85387d1e6851d35474b65929e268ca64ef65b v2: Remove libkdrivestubs.la from configure.ac Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit f23dd02b969089b66685f70887f19041049f7a24 Author: Jon TURNEY Date: Fri Feb 21 18:11:33 2014 +0000 Build Xi/stubs.c once as a convenience library, rather than once for each DDX which wants to use it Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit 45b223e1c2bdc447263a9de7af62c93f4058c33c Author: Jon TURNEY Date: Wed Sep 7 12:50:20 2011 +0100 Build dpmsstubs.c once as a convenience library, rather than once for each DDX which wants to use it Signed-off-by: Jon TURNEY Reviewed-by: Gaetan Nadon commit 7b2a517ba99f6756e98c4aef47d9b9399b997157 Author: Julien Cristau Date: Wed Mar 26 23:24:20 2014 +0100 Xephyr: restore initial window resize lost in xcb conversion The XResizeWindow call wasn't replaced by the xcb equivalent, so we were no longer setting the initial window size, only wm size hints. Regression from commit a2b73da "Xephyr: start converting hostx.c over to xcb" Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74849 Signed-off-by: Julien Cristau Reported-by: Laércio de Sousa Tested-by: Jon TURNEY Reviewed-by: Jon TURNEY Signed-off-by: Keith Packard commit 1b5d7e78460ed686ba2da398dab341d4867fd4a0 Author: Keith Packard Date: Wed Mar 12 14:35:27 2014 -0700 glamor: Add glamor_program PolyPoint implementation This accelerates poly point when possible by off-loading all geometry computation to the GPU. Improves x11perf -dot performance by 28109.5% +/- 1022.01% (n=3) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 72a4beff6d3aed767df9a30bca0c1d860715928f Author: Keith Packard Date: Sat Mar 22 15:20:49 2014 -0700 glamor: Move glamor_poly_segment to separate glamor_segment.c file There's no reason to mix PolyPoint and PolySegment in the same file. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-off-by: Eric Anholt commit 029b64c30a8bdf87edfdb1c988f4e8dcee1bb4ef Author: Keith Packard Date: Wed Mar 12 14:27:59 2014 -0700 glamor: Add infrastructure for generating shaders on the fly This just adds a bunch of support code to construct shaders from 'facets', which bundle attributes needed for each layer of the rendering system. At this point, that includes only the primitive and the fill stuff. v2: Correct comment in glamor transform about 1/2 pixel correction needed for GL_POINT. (Eric Anholt) v3: Rebase on Markus's cleanups (change by anholt) Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 0ca7223742e9ec0594203b3a99b11441730cca1a Author: Keith Packard Date: Thu Mar 13 23:12:27 2014 -0700 glamor: Add helper functions to walk pixmap tiling This adds a few helper functions to make pixmap fbo access symmetrical between the single fbo and tiled cases. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 209d004469391420130262059af43a813b2c07d7 Author: Keith Packard Date: Thu Mar 13 23:11:40 2014 -0700 glamor: Add bounding box to one-fbo pixmaps This lets code treat the one-fbo pixmaps more symmetrically with the tiled pixmaps. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 82f91433e277e3711678c1b16be85e89b6c7d530 Author: Keith Packard Date: Tue Mar 18 21:23:24 2014 -0700 glamor: Get testing code using small FBOs working again Glamor has a mode where pixmaps will be constructed from numerous small FBOs. This allows testing of the tiled pixmap code without needing to create huge pixmaps. However, the render glyph code assumed that it could create a pixmap large enough for the glyph atlas. Instead of attempting to fix that (which would be disruptive and not helpful), I've added a new pixmap creation usage, GLAMOR_CREATE_NO_LARGE which forces allocation of a single large FBO. Now that we have pixmaps with varying FBO sizes, I then went around and fixed the few places using the global FBO max size and replaced that with the per-pixmap FBO tiling sizes, which were already present in each large pixmap. Xephyr has been changed to pass GLAMOR_CREATE_NO_LARGE when it creates the screen pixmap as it doesn't want to deal with tiling either. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 11e2f0de71fa341f8b0b1da0a1b9ccbfa6550a50 Author: Keith Packard Date: Tue Mar 18 21:35:41 2014 -0700 mi: miPutImage with XYPixmap failed at depth 32 on 64-bit machines The X server still has 'unsigned long' in a few places to hold 32 bit values. One of those is in miPutImage where it's holding the temporary planemask for XYPixmap format images. It computed the highest plane in the source image with 1 << (depth - 1). On 64-bit machines, taking that value and storing it in an unsigned long promotes it to a signed 64-bit value (0xffffffff80000000). Then, it loops over that value, shifting one bit right each time, waiting for it to go to zero.. That takes 64 iterations, and ends up with some mystic planemask values *and* walking off the end of the source image data and out into space. A simple cast is all that is required to compute the correct initial plane mask (0x0000000080000000), at which point the loop operates correctly once again. Checking the fbPutImage code, I note that this same bug was fixed in 2006 by Aaron Plattner in commit f39fd4242902eaa862321d39337f429dd14ebacf Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-by: Aaron Plattner commit ae87b536155207e6e28b68963593a7ab09792e08 Author: Keith Packard Date: Sat Mar 15 23:53:53 2014 -0700 dix: Allow NULL stipple in ChangeGC miOpqStipDrawable resets the stipple after painting. When that stipple was NULL, ChangeGC needs to handle that and not crash. Signed-off-by: Keith Packard Signed-off-by: Eric Anholt Reviewed-off-by: Eric Anholt commit 2e040f41de18f4d46e649561b6efb043195fdfbe Author: Markus Wick Date: Tue Mar 18 09:42:55 2014 +0100 glamor: Drop feature dependent optimization on startup. We don't care that much about startup time to write different code paths... Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 2e75d974bcfdd879d7417cc02892b78eaea5e888 Author: Markus Wick Date: Tue Mar 18 09:42:54 2014 +0100 glamor: Remove unneeded unbindings. They are already cleared in glamor_put_vbo_space. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 7c4e1472966d9d3d6432621c3114f491a5378604 Author: Markus Wick Date: Tue Mar 18 09:42:53 2014 +0100 glamor: Always keep GL_ELEMENT_ARRAY_BUFFER bound to the same IB. We never used glDrawElements() with a different index buffer. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 82168b1e6ede48898be8a64b1c93b7d82ef65702 Author: Markus Wick Date: Tue Mar 18 09:42:52 2014 +0100 glamor: Select VBO path by ARB_mbr extension. The mbr path was hard coded enabled for desktop gl and disabled for gles. But there are both desktop without mbr and GLES with mbr. v2: Don't forget to update the fini path, too (change by anholt) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 53df6e8c3bd7025883b9614a549fbf268c110b74 Author: Markus Wick Date: Tue Mar 18 09:42:51 2014 +0100 glamor: Update GL requirements to 2.1. We will never ever run on OpenGL 1.2 as we use shaders everywhere. 2.0 may be enough, but we also often use PBOs and our big shaders won't fit into the first GLSL limits. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 15d36444acc7a2890ade8e320dc16d627a9d2035 Author: Markus Wick Date: Tue Mar 18 09:42:50 2014 +0100 glamor: Use epoxy_gl_version() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 9d87f66e862a521553d48aa73e5ee97431d36ad3 Author: Markus Wick Date: Tue Mar 18 09:42:49 2014 +0100 glamor: Use epoxy_has_gl_extension() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 708fe0625f31ad39ba54f27f04d17ed2aa621cad Author: Markus Wick Date: Tue Mar 18 09:42:48 2014 +0100 glamor: Use glsl "fract/mod" instead of "while" in gradient shaders. This fixes gtkperf. It seemed to hang forever. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 84ff8960722fa9baf6ad70756b9c335bf2a5e515 Author: Eric Anholt Date: Tue Mar 18 09:42:47 2014 +0100 kdrive: Remove duplicated definitions of some XV-related structs. v2: Fix crash because of removed strdup. (by Markus Wick) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt (v2) commit 370c8c75ca6aebb5d93d2ab87c9c8ffac21fc57d Author: Gaetan Nadon Date: Wed Mar 19 11:28:57 2014 -0400 xfree86: glamor_egl subdir must be distributed - breaks distcheck Signed-off-by: Gaetan Nadon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 870bbf85e63a59f252f3ea9d63e28f083359d990 Author: Gaetan Nadon Date: Wed Mar 19 14:17:15 2014 -0400 ephyr: typo where "()" should be "$()" in the Makefile - breaks make dist make[3]: Entering directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[3]: *** No rule to make target `()', needed by `distdir'. Stop. make[3]: Leaving directory `/home/nadon/xorg/src/xserver/hw/kdrive/ephyr' make[2]: *** [distdir] Error 1 Signed-off-by: Gaetan Nadon Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit dc48bd653c7e1013e2d69e3f59ae3cbc0c893473 Author: Hans de Goede Date: Mon Mar 24 16:32:01 2014 +0100 systemd-logind: Monitor systemd-logind going away When we're using server managed-fds through systemd-logind, systemd-logind *must* keep running while we are using it, as it does things like drmSetMaster and drmDropMaster for us on vt-switch. On a systemd-logind restart, we cannot simply re-connect since we will then get a different fd for the /dev/dri/card# node, and we've tied a lot of state to the old fd. I've discussed this with the systemd people, and in the future there may be a restart mechanism were systemd-logind passed fds from the old logind to the new logind. But for now there answer is simply: "Don't restart systemd-logind", and there never really is a good reason to restart it. So to ensure unpleasentness if people do decide to restart systemd-logind anyways (or when it crashes), monitor logind going away and make this a fatal error. This avoids getting a hard-hung machine on the next vt-switch and will hopefully quickly educate users to not restart systemd-logind while they have an X session using it active. Signed-off-by: Hans de Goede Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit c0d3a13e7ee42be26d6d1923c9f3ae0355497869 Author: Hans de Goede Date: Mon Mar 24 16:31:59 2014 +0100 Buildsys: Create SUID_WRAPPER_DIR before using it Signed-off-by: Hans de Goede Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 6289f71494453d34614b7ff1238840681c2472af Author: Gaetan Nadon Date: Tue Mar 25 14:00:13 2014 -0400 suid: adding Xorg.sh.in to EXTRA_DIST is redundant All files specified in AC_CONFIG_FILES get distributed automatically. Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b82ef51509bf24e8eafeb615a3e2f4fcd559554e Author: Gaetan Nadon Date: Tue Mar 25 13:49:02 2014 -0400 suid: add generated Xorg.sh to hw/xfree86/.gitignore Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit ca8f26f63694c27fa488a3b58ea6f00b7dd50f81 Author: Gaetan Nadon Date: Tue Mar 25 13:48:52 2014 -0400 suid: replace deprecated AC_HELP_STRING with AS_HELP_STRING Fixes automake warning. Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit bda6fdc71c25b0c3f3747f445103a1995a5713f4 Merge: e46820fb8 78167a98a Author: Keith Packard Date: Tue Mar 25 16:06:03 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit e46820fb897600800b5f3297a59039556774e9c5 Author: Emil Velikov Date: Thu Sep 26 20:28:37 2013 +0100 miinitext: introduce LoadExtensionList() to replace over LoadExtension() Looping around LoadExtension() meant that ExtensionModuleList was reallocated on every extension. Using LoadExtensionList() we pass an array thus the function can do the reallocation in one go, and then loop and setup the ExtensionModuleList. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard v2: Update ephyr [Keith Packard] v3: Eliminate const warnings in LoadExtensionList [Keith Packard] Signed-off-by: Keith Packard commit 78167a98a8631ee3fad145ddc051ceb8487b9683 Author: Adam Jackson Date: Fri Nov 8 09:44:24 2013 -0500 xkb: Restore XkbCopyDeviceKeymap Removed in d35a02a767017f13db4bd4742eef49293d5a30ea, tigervnc 1.2.80 and xf86-video-nested need it for now. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 215f3d2e0f2a4ef6fc2f2c08fb991e1f00b747c8 Author: Kristian Høgsberg Date: Wed Mar 19 20:46:41 2014 -0700 os: Add AddClientOnOpenFD() to create a new client for an file descriptor When the Xwayland server is socket-activated, we need to connect and initialize the window manager before the activating client gets to proceed with connecting. We do this by passing a socket file descriptor for the window manager connection to the Xwayland server, which then uses this new function to set it up as an X client. Signed-off-by: Kristian Høgsberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d415b9d69fdaab4ce3fc05d3d26b2d8413403aa4 Author: Emil Velikov Date: Thu Sep 26 20:16:31 2013 +0100 miinitext: avoid allocating a sentinel ExtensionModule With all the logic now in place there is no need to allocate a separate ExtensionModule to be used as a sentinel. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit b421ac8e026f464fdba2082aaedc00c19fb8b6c7 Author: Emil Velikov Date: Thu Sep 26 20:11:40 2013 +0100 miinitext: constify staticExtensions The array is readonly and should not be tampered with. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit 5ff34b5a0b3b333bf0f0334717cc8630cc785510 Author: Emil Velikov Date: Thu Sep 26 20:08:56 2013 +0100 miinitext: drop sentinel detection during LoadExtension All the sentinels from the extension lists were removed, thus the only case were this would trigger is when the code is broken badly. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit 6fea450d41a03d32c10c7da162dfaadd8ead4ece Author: Emil Velikov Date: Thu Sep 26 20:08:16 2013 +0100 miinitext: move AddStaticExtensions() to LoadExtension() Separate the function from NewExtensionModule() as the former does only memory reallocation. No functional change. Signed-off-by: Emil Velikov Reviewed-by: Keith Packard commit bf087659f0fb747c471e26c5b287c35877818040 Author: Alan Coopersmith Date: Sat Mar 22 14:30:04 2014 -0700 Add necessary headers for major()/minor() on Solaris to xf86Xinput.c Without these, after commit fdb4ec86c29d85c, it fails to build on Solaris, with errors of: xf86Xinput.c: In function 'xf86stat': xf86Xinput.c:816:5: error: implicit declaration of function 'major' [-Werror=implicit-function-declaration] xf86Xinput.c:817:5: error: implicit declaration of function 'minor' [-Werror=implicit-function-declaration] Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d9fdae5f4a648a10653e18dbc602646f3e22e522 Merge: 99bee6c05 0e5d2996a Author: Keith Packard Date: Sat Mar 22 14:09:00 2014 -0700 Merge remote-tracking branch 'jturney/master' commit 99bee6c0549b36ef15f625bab3997cbd70c7b879 Author: Gaetan Nadon Date: Fri Jan 17 09:54:01 2014 -0500 Default font path: remove the check for ${sysconfdir}/X11/fontpath.d The location ${sysconfdir}/X11/fontpath.d is unknown at configuration time (only at make time) as evidenced by the configuration output: checking for ${prefix}/etc/X11/fontpath.d... no Unlike font-util for the X fonts, there is no mechanism to query where fontpath.d is. Fedora have chosen /etc/X11 and others have followed, but this is not a standard. It might also be installed at another location, it may or may not be under the xserver installation prefix. We just don't know. Debian does not use this at all. Distros are using --with-default-path when they support fontpath.d, so they never relied on the server default as it never worked. The patch essentially is a noop, which leaves the door open for anyone who could potentially provide a reliable implementation of choosing fontpath.d when applicable. Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 1782316744866a181ed92486bb4dca6ac46d40bd Merge: 4fb31e482 2b77b208d Author: Keith Packard Date: Sat Mar 22 13:46:15 2014 -0700 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 0e5d2996ac872aca5995897fc518bdf9116bd246 Author: Jon TURNEY Date: Wed Sep 11 13:36:18 2013 +0100 hw/xwin: Fix WM_ENDSESSION crash on x86_64 We need to include xwin-config.h into winmsgwindow.c, so that _XSERVER64 is defined, so that the layout of ScreenRec type is correct, so that it's privates can be accessed correctly, so that the WM_GIVEUP message can be sent to the screen window. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 896b53ffa72d91d7d604967028291525562b60dd Author: Jon TURNEY Date: Sun Jun 16 13:55:51 2013 +0100 hw/xwin: Improve NET_WM_ICON validation Check that we don't overrun the end of the property data while converting icons See http://cygwin.com/ml/cygwin-xfree/2013-06/msg00040.html for testcase. Also, some warning fixes in winXIconToHICON() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab61d070024a4776f011e71d762d4c6c0cf58b12 Author: Jon TURNEY Date: Sun Mar 31 18:29:07 2013 +0100 hw/xwin: Remove obsolete control handling for About dialog Remove the unused, cygwin-specific handling for ChangeLog, UG and CG buttons in the About... Dialog. The buttons themselves were removed in commmit 34269a90ea2087f883f5dc8805894fc4998e4b81. Also remove those window control IDs which are now obsolete. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3b4d472b72601922bac264283eb6b611d8d524fc Author: Oliver Schmidt Date: Wed Sep 7 14:00:56 2011 +0100 hw/xwin: Minimize redraw events after resizing/moving windows in multiwindow mode In multiwindow mode the modal moving/resizing of windows causes a lot of redraw events to be sent to the X clients after the user releases the mouse button. During the moving/resizing client windows are not redrawn as long as the mouse button is pressed, but all redraw/resizing events are queued and executed step after step after the moving/resizing ends. Some clients collect and combine multiple redraw or resizing events, other clients (e.g. xterm) simply execute each redraw or sizing event. The enclosed patch minimizes the events for clients to only one event after the user releases the mouse button to end the moving/resizing. This improves the user experience and reduces strange screen flickerings, especially on slow platforms. The enclosed patch modifies winmultiwindowwndproc.c such that the windows events WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE that are sent by Windows when the modal window resizing/moving begins or ends are considered. Only after WM_EXITSIZEMOVE is the redraw/resizing executed. Signed-off-by: Oliver Schmidt Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 03e1cc6f250a3f5cf17b34639adbbc9850c681cd Author: Jon TURNEY Date: Mon Nov 7 20:54:10 2011 +0000 hw/xwin: Add '@' to window name when it's useful to do so Enhance GetWindowName() so it appends the result of XGetWMClientMachine() when it is available and useful to do so Add -hostintitle option to control this behaviour. Add documentation for this option to man page and -help text. Also, fix warning in UpdateName() v2: Provide a HOST_NAME_MAX definition for MinGW v3: Use '@host' rather than ' (on host)'. Don't add host if it's already in the title. Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz Reviewed-by: Colin Harrison commit 6804acfe4fabc8ff8491bbc7edb6260440d3d4d3 Author: Colin Harrison Date: Fri Mar 14 15:44:54 2014 +0000 hw/xwin: Remove prototype for non-existent winMWExtWMUpdateIcon() winMWExtWMUpdateIcon() was removed in commit 527cf13135cfd279733060e0028bbfbe02be5167 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7fb5d765ba1e28eb775b847cef3d6079eba3bac1 Author: Colin Harrison Date: Fri Mar 14 15:40:43 2014 +0000 hw/xwin: Use AllocDevicePair() Use AllocDevicePair() rather than allocating Windows keyboard and pointer devices individually. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 061e5eba00a9a0dc27ff76946dc5f77004fc6a56 Author: Colin Harrison Date: Fri Mar 14 15:36:59 2014 +0000 hw/xwin: Consistently use 'L' for long int constants Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 46df614784cbbffcf6368859285e949010f1ceb8 Author: Colin Harrison Date: Fri Mar 14 15:36:24 2014 +0000 hw/xwin: Remove an unneeded include Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d48749492dc492fd7430ffdfd29842153618f778 Author: Colin Harrison Date: Fri Mar 14 15:34:04 2014 +0000 hw/xwin: Use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_ID For clarity, use boolean AND rather than bitwise AND in WIN_POLLING_MOUSE_TIMER_ID processing. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 80ac4a85d56130d09bbc72ed071759a361ded689 Author: Colin Harrison Date: Fri Mar 14 15:23:16 2014 +0000 hw/xwin: Fix declaration after statement warning in ddxGiveUp() Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit cf59f4888e202c6a68176bd3de1f837ca8480370 Author: Colin Harrison Date: Fri Mar 14 15:09:24 2014 +0000 hw/xwin: Fix typo in comment Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 561bca469d3ade1ff14faddaf70bf12dcdc6aa74 Author: Jon TURNEY Date: Thu Mar 13 22:38:43 2014 +0000 hw/xwin: Fix const discarded warning in winGenerateAuthorization() Fix const discarded warning in winGenerateAuthorization() in !XCSECURITY case In function ‘winGenerateAuthorization’: hw/xwin/winauth.c:123:38: warning: passing argument 2 of ‘GenerateAuthorization’ discards ‘const’ qualifier from pointer target type [enabled by default] hw/xwin/winauth.c:99:1: note: expected ‘char *’ but argument is of type ‘const char *’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 44fe1b8ea284df6bbaef67e246016d104665b2fe Author: Kristian Høgsberg Date: Wed Mar 19 14:03:13 2014 -0700 os: Add a mechanism to prevent creating any listen sockets A socket-activated server will receive its listening sockets from the parent process and should not create its own sockets. This patch introduces a NoListen flag that can be set by a DDX to prevent the server from creating the sockets. When NoListen is enabled, we also disable the server lock checking, since the parent process is responsible for checking the lock before picking the display name and creating the sockets. Signed-off-by: Kristian Høgsberg Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 62d584d63190c6c8cef5fd49d87b1cb29358a434 Author: Kristian Høgsberg Date: Tue Mar 18 22:05:58 2014 -0700 os: Always compile ListenOnOpenFD() and export it This function was written to allow the X server to inherit the listen socket from launchd on OS X. The code is not specific to OS X though and will be useful for on-demand launched Xwayland servers. Signed-off-by: Kristian Høgsberg Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 797781c7bfd7a0df354fb85aa73df4560828b90b Author: Kristian Høgsberg Date: Wed Mar 19 10:27:39 2014 -0700 test: Don't add TEST_LDADD to list test The list test case is always enabled, even if Xorg is disabled. TEST_LDADD pulls in Xorg files which breaks linking when Xorg is disabled. The list test doesn't need any libraries, so just remove list_LDADD. Signed-off-by: Kristian Høgsberg Cc: Peter Hutterer Signed-off-by: Peter Hutterer commit 4fb31e4824d46edc80bb49b4065152899faa5ac6 Merge: d18d3f6d1 0e531fbb9 Author: Keith Packard Date: Wed Mar 19 06:43:14 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 0e531fbb97868b9a869044fc5a4f6cb58de6751e Author: Kristian Høgsberg Date: Wed Mar 12 16:31:25 2014 +1000 xkb: add XkbLoadKeymapFromString Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit d18d3f6d18aa7827748f7ba14efd405b525883d0 Merge: 81a4952d3 6649d0059 Author: Keith Packard Date: Mon Mar 17 17:29:56 2014 -0700 Merge remote-tracking branch 'anholt/glamor-megaseries' commit 6649d0059e1bc136b84a9e457ae81c07521fadc0 Author: Michel Dänzer Date: Mon Mar 17 13:16:48 2014 +0900 glamor: Move up glamor_priv->flags assignment in glamor_init() It wasn't assigned yet when it was tested for GLAMOR_NO_DRI3. Signed-off-by: Michel Dänzer Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit b5a61239e2fef167c229154d7919ff862503e3f3 Author: Eric Anholt Date: Fri Mar 14 13:10:04 2014 -0700 glx: Make sure we get an FBConfig the root window's visual. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 9999a660135fafe5f1fdf9452e5ca74ffb069dc2 Author: Markus Wick Date: Thu Mar 13 11:17:39 2014 +0100 glamor: don't reset the GLSL program We don't use fixed function rendering, so there is no need to reset the program at all. This lets the driver avoid checking for state changes between draw calls when we rebind the same program. Improves xephyr x11perf -f8text performance by 6.03062% +/- 1.64928% (n=20) Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit aa2635b804e7d28322f62d802190bdf0bb799634 Author: Markus Wick Date: Thu Mar 13 00:24:04 2014 +0100 glamor: remove disabled code This block was disabled since 2011, so there is likely no need to keep it any more. Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 6227f07b69b8ab3cd39cf9d257daf2a7202b4ef5 Author: Alan Coopersmith Date: Tue Mar 11 17:28:10 2014 -0700 Remove duplicate assignment of repeat_type_uniform_location Flagged by cppcheck 1.64: [glamor/glamor_gradient.c:987] -> [glamor/glamor_gradient.c:991]: (performance) Variable 'repeat_type_uniform_location' is reassigned a value before the old one has been used. Signed-off-by: Alan Coopersmith Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt commit 1a4b24993974200e26345ea6c501d4aa093169db Author: Eric Anholt Date: Thu Feb 20 15:50:03 2014 -0800 glamor: Apply debug labels to our shaders. This will help tools like fips, apitrace, or INTEL_DEBUG=shader_time provide useful information about the shaders in use. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d07d2c3c5f95fd644ef563004dfa7f3c53904168 Author: Eric Anholt Date: Sat Jan 11 21:26:01 2014 -0800 glamor: Don't forget to unmap our PBOs before using them to upload. From the GL_ARB_vertex_buffer_object spec: After the client has specified the contents of a mapped data store, and before the data in that store are dereferenced by any GL commands, the mapping must be relinquished by calling boolean UnmapBufferARB(enum target); Our mappings were only getting reaped at PBO destroy time, after the upload. If the GL implementation wasn't coherent, it would have used stale data to do the texture upload. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 64146e4560fdf3c3a40d023ac8e22259915b05ad Author: Eric Anholt Date: Sat Jan 11 21:11:18 2014 -0800 glamor: Add an assert about an invariant the upload code relies on. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 7eb2bafe22dcc90c2fb94d2d9cae370b683dba7c Author: Eric Anholt Date: Fri Jan 10 15:54:25 2014 +0800 glamor: Fix ignoring the ALU during SetSpans(). Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 923c8db7ed1adfe4689f0a36496262faca44b79d Author: Eric Anholt Date: Thu Jan 9 11:36:30 2014 +0800 glamor: Improve the performance of line fallbacks. If the lines aren't solid-filled vert/horiz solid-filled rectangles, we fall back. libreoffice has some diagonal lines, and the performance of the fallback path was atrocious. Just fall back to mi's spans instead, so that we don't do an upload/download. Improves x11perf -seg100 by 863.652% +/- 9.8968% (n=5) Signed-off-by: Eric Anholt commit b6953045566dae15437d4220e68986db7a6b4ca7 Author: Eric Anholt Date: Thu Jan 9 10:53:04 2014 +0800 glamor: Improve the performance of PolyGlyphBlt. Using the same idea as the previous PushPixels code, just make points for each point in the glyph. This is an advantage over the pushpixels fallback because we can batch the BO mappings and draw calls across glyphs. Improves performance of x11perf -f8text by 773.389% +/- 3.50754% (n=10). Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit b885a639144cdadcb0dae8249a168db158770604 Author: Eric Anholt Date: Sun Jan 5 21:54:48 2014 +0800 glamor: Improve the performance of PushPixels by, well, pushing pixels. Otherwise, mi will fall back to GetSpans()ing the bitmap, walking the bitmap, computing spans to be filled, and calling FillSpans(). Improves x11perf -f8text by 759.373% +/- 3.33096% (n=166) Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ab68982dcc53d29d5e3c5ea092bd91dab09e54c9 Author: Eric Anholt Date: Sat Jan 11 00:06:21 2014 +0800 glamor: Add missing prepares on the GC during fb fallbacks. We had regressions in CopyPlane reported by xts5, because we were (successfully!) dereferencing the null pixmap->devPrivate.ptr for a tile or stipple without having done a prepare. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 93f1824a0b19346f0e1759bedfa9cf10772067af Author: Eric Anholt Date: Sat Jan 11 00:00:00 2014 +0800 glamor: Rely on nested mappings to handle src==dst and !prepare bugs. Now that the core deals with that for us, we can avoid all this extra carefulness. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4c9a20072552c52b3763bd73e7a7e9b9cb8b4993 Author: Eric Anholt Date: Fri Jan 10 23:43:09 2014 +0800 glamor: Allow nested mapping of pixmaps. The common pattern is to do nested if statements making calls to prepare_access() and then pop those mappings back off in each set of braces. Some cases checked for src == dst to avoid leaking mappings, but others didn't. Others didn't even do the nested mappings, so a failure in the outer map would result in trying to umap the inner and failing. By allowing nested mappings, we can fix both problems by not requiring the care from the caller, plus we can allow a simpler nesting of all the prepares in one if statement. v2: Add a comment about nested unmap behavior, and just reuse the glamor_access_t enum. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d86eacedab443f172baccf544d17e09090f71f3c Author: Eric Anholt Date: Fri Jan 10 23:39:02 2014 +0800 glamor: Drop unused GLAMOR_ACCESS_WO. Nothing was using it, and it was going to complicate the glamor_prepare_access bugfixing I'm going to do next. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit c36b903f240664f7222cfefc480e60fca936de6a Author: Eric Anholt Date: Thu Mar 13 10:09:08 2014 -0700 glamor: Drop stale comment. The old Xephyr codebase was using the GL window system framebuffer for the screen pixmap, but that meant you couldn't texture from it to do operations sourcing from the screen, so in the version that landed I instead had the screen just be a plain texture. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f7cd1189d068471373f51d932c558f8151182d58 Author: Eric Anholt Date: Fri Jan 10 22:42:02 2014 +0800 glamor: Replace some goofy enum-likes with a real enum. This unpacks the bitfield into an int size, but my experience has been that packing bitfields doesn't matter for performance. v2: Convert more comparisons against numbers or implicit bool comparisons to comparisons against the enum names, and fix up some comments. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 575e3e1bf08c418430da86228d2774e8fda4b8c0 Author: Eric Anholt Date: Mon Jan 6 07:22:47 2014 +0800 glamor: Fix up doxygen for glamor_fill.c. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 53996e252e51c8053537f485616a078cb7b0f738 Author: Eric Anholt Date: Mon Jan 6 07:05:02 2014 +0800 glamor: Rename more solid fill variables to clean up the code. Now the error path of allocation is more obvious: We leave things in the a-few-boxes-at-a-time stack memory state. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ec3ab2f67baa00326a4964ed2047e8a137915578 Author: Eric Anholt Date: Mon Jan 6 07:01:17 2014 +0800 glamor: Rename a variable to be more descriptive. The "valid_" prefix was used above to describe our allocation that gets reused multiple times, which is totally unrelated. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 01e30d2043f5df104947908f14a377dc77896a98 Author: Eric Anholt Date: Mon Jan 6 06:55:15 2014 +0800 glamor: Fix some integer overflow errors. Imagine a nbox that was (UINT_MAX + small number) / (4 * 2 * sizeof(float)). We'd malloc a few bytes after the integer overflow, but glamor_set_normalize_vcoords would write over gigabytes of heap. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 20bcda977755559294c3a951f80af2ec861595fc Author: Eric Anholt Date: Mon Jan 6 06:53:46 2014 +0800 glamor: Drop bogus _X_UNLIKELY. nbox > 4 is actually quite common for spans handling. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ad3dd80720676dcdc11ab5db63ccbed7c9509d7e Author: Eric Anholt Date: Mon Jan 6 06:52:32 2014 +0800 glamor: Fix stack overflow in glamor_solid vertex handling. ARRAY_SIZE(vertices) is 32 (floating point values), so we need to divide by the number of floats in a box like we do in the overflow case below. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d036d22a95b8516a817dd4fa4dd35be363709636 Author: Eric Anholt Date: Sat Jan 4 13:28:52 2014 -0800 glamor: Drop duplicated lines for getting pixmap state in GetImage. No change in generated code size -- apparently the compiler figured it out. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit e23dd41195dfaf1f3e303197845a071d01523618 Author: Eric Anholt Date: Mon Dec 30 18:41:57 2013 -0800 glamor: Return the stride/size for glamor_dri3_name_from_pixmap(), too. Just like for a caller of glamor_dri3_fd_from_pixmap(), otherwise the consumer of that named buffer has no idea what GL chose for the stride. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4e21b7ee49bc8f33c6211411d80aa70b16998adc Author: Eric Anholt Date: Mon Dec 30 18:33:09 2013 -0800 glamor: Drop the body of the function for enabling DRI3 extensions. The flag is already being set at glamor_egl_screen_init() time, so no need for the driver to separately call this. That said, leave the function around to keep the ABI compatibility. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 92e2125c5219c7b270785f063fe2560583b2baff Author: Eric Anholt Date: Mon Dec 30 18:29:50 2013 -0800 sync: Add a header include necessary to use misyncstr.h Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 12b2adaaeb091ad48825f439fa0359e5641c86d1 Author: Eric Anholt Date: Sat Dec 28 13:46:17 2013 -0800 glamor: Do glyph private init at screeninit time, and other stuff at CSR. This hasn't actually been a problem, since the server hasn't allocated any glyphs before our glyph private initialization during CreateScreenResources. But it's generally not X Server style to do things this way. Now that glamor itself drives both parts of glyphs setup, DDX drivers no longer need to tell glamor to initialize glyphs. We do retain the old public symbol so they can keep running with no changes. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit df1ef90fa0f98c779c3f312130183dbf32f1e447 Author: Eric Anholt Date: Fri Dec 27 18:45:44 2013 -0800 glamor: Move the EGL image to the normal pixmap private. There's no reason to hide EGL from the rest of glamor, now that we have epoxy. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 732faea542c5ecab353536f93bab5dc6c6068d0a Author: Eric Anholt Date: Fri Dec 27 18:27:56 2013 -0800 glamor: Use epoxy_has_egl_extension() instead of rolling our own. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit a895f6a16588024e03218d8d0e77dd8bd8494329 Author: Eric Anholt Date: Sun Jan 5 02:45:05 2014 -0800 glamor: Drop the set of the context to NULL at the end of glamor ops. The theory here was that it (which I copied from EGL) existed to fix up context switching with indirect GLX. But indirect GLX won't even try to set the context again unless its lastContext field is cleared, so we need to solve this a different way. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f31911ff8f3f3707101b7771d5dc994ed1ca5c70 Author: Eric Anholt Date: Thu Feb 27 17:55:50 2014 -0800 xephyr: Don't forget to glViewport() before drawing the screen. Fixes misrendering with cairogears. I had noticed the failure while trying to figure out what was going on with traps. Cairogears was apparently putting its results on the screen through putimage, which is a texture upload, so the last GL drawing was done to the size of the cairogears window, not the size of the xephyr screen. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 8b6c79e19cfabd9f343884ddd91a738720c94583 Author: Kristian Høgsberg Date: Wed Mar 12 17:20:17 2014 +1000 xkb: add KeymapOrDefault Helper function to return a default map if the keymap compilation failed. Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit cb9a1d01468732196fd25c6422991e784639ffce Author: Kristian Høgsberg Date: Wed Mar 12 17:18:22 2014 +1000 xkb: factor out xkb loading to LoadXkm Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 4391cf27f40ec53d41ac7e437cde49848eb32bde Author: Peter Hutterer Date: Wed Mar 12 16:08:15 2014 +1000 xkb: add a callback to xkbcomp This provides a callback to write to xkbcomp's buffer once everything is prepared. Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 6ebd838d80074075827dedb75ed4169ea1946be3 Author: Peter Hutterer Date: Wed Mar 12 17:17:25 2014 +1000 xkb: constify XkbDDXOpenConfigFile Signed-off-by: Peter Hutterer Reviewed-by: Kristian Høgsberg commit 2b77b208daf9402472ba7fb709156a14eb487299 Author: Hans de Goede Date: Wed Mar 12 16:00:23 2014 +0100 xf86Xinput: release server managed fd before removing the device from the list So that the fd in use test in systemd_logind_release_fd works properly. Note we cannot change the test inside systemd_logind_release_fd as it must work for devices which were never added to the xf86InputDevs too. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 0e972b6037d3709c13d46adef9d14b702f477abc Author: Hans de Goede Date: Wed Mar 12 14:57:24 2014 +0100 systemd-logind: Correctly deal with InputDevs sharing a device-node InputDevices may share a single device-node, this happens ie with Wacom tablets. This patch makes take_fd and release_fd properly deal with this, together with the earlier patch for updating the fd in all matching xf86InputDevs on pause / resume this completes support for such shared device-nodes. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 8d3f63dbe9bfd816beb6475fd0e00df4dbba269f Author: Hans de Goede Date: Wed Mar 12 12:58:22 2014 +0100 systemd-logind: Add a systemd_logind_set_input_fd_for_all_devs helper And use it where appropriate. Setting the fd for all matching InputDevices is necessary when we've multiple InputDevices sharing a single device-node, such as happens with Wacom tablets. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 4e3d9690e1868d286dcb766b429f9c99313f2401 Author: Hans de Goede Date: Wed Mar 12 13:19:32 2014 +0100 systemd_logind_find_info_ptr_by_devnum: Move to higher inside the file This is a preparation patch for adding support for server managed fds for InputDevices where multiple input devices share the same device node (and thus also their major and minor). Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit ddc3888bbaaddc47706a9cb96459738683d72cb3 Author: Hans de Goede Date: Wed Mar 12 12:45:40 2014 +0100 systemd_logind_find_info_ptr_by_devnum: Add a start argument Modify systemd_logind_find_info_ptr_by_devnum to take a start argument, so that it can be used to find all occurences of a devnum in an InputInfo list, rather then just the first. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 40e3c79a591909ab64822cc86fd07513317bf19b Author: Hans de Goede Date: Tue Mar 11 11:38:09 2014 +0100 Remove config_odev_add_*attribute checks in various places Note that there are more callers but those were already not doing any error checking. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 92ff79f1a804d63d2f2bb59dfbf3a2869627609a Author: Hans de Goede Date: Tue Mar 11 11:28:15 2014 +0100 config_odev*: Use XNF alloc functions config_odev* functions are called in code-paths were we already use XNF* functions in other places, so which are not oom safe already. Besides that oom is something which should simply never happen, so aborting when it does is as good a response as any other. While switching to XNF functions also fixup an unchecked strdup case. Note the function prototypes are kept unchanged, as they are part of the server ABI. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit e7b84ca46944895971a8f048c7e34869b7de01c0 Author: Hans de Goede Date: Wed Mar 5 16:41:14 2014 +0100 Xorg: Add a suid root wrapper With the recent systemd-logind changes it is possible to install the Xorg binary without suid root rights and still have everything working as it should *if* the user only has cards which are supported by kms. This commit adds a little suid root wrapper, which is a bit weird, first we strip the suid-root bit of the Xorg binary, and then we add a wrapper ? The function of this wrapper is to see if a system still needs root-rights, if it does not (it supports kms and the kms drivers are properly loaded), then it will immediately drop all elevated rights before executing the real Xorg binary. If it finds (some) cards which don't support kms, or no cards at all, then it will execute the Xorg server with elevated rights so that ie the nvidia binary driver and the vesa driver can keep working normally. To make it possible for security concious users who don't need the root rights to completely remove the wrapper, Xorg is started in a 3 step process when the wrapper is enabled during build time: 1) A simple shell script which checks if the wrapper is there, if it is it executes the wrapper, if not it directly executes the real Xorg binary 2) The wrapper gets executed, does its checks, normally drops all elevated rights and then executes the real Xorg binary 3) The real Xorg binary does its thing This allows distributions to put the wrapper binary in a separate package, and will allow users to remove this package. IE the plan with Fedora is to make "legacy" drivers depend on the wrapper pkg, and since our default install contains some legacy drivers it will be part of the default install, but users can later yum remove it (which will also automatically remove the legacy driver packages as those won't work without it anyways). The wrapper is loosely modelled after the existing Debian Xwrapper, it uses the same config-file + config-file format, and also allows restricting Xserver execution (through the wrapper) to console users only. There also is a new needs_root_rights config file directive, which can be used to override the auto-detection the wrapper does. Hopefully this will allow Debian to replace their own wrapper with this upstream one. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit d35a02a767017f13db4bd4742eef49293d5a30ea Author: Rui Matos Date: Fri Mar 7 14:32:27 2014 -0800 xkb: Repurpose XkbCopyDeviceKeymap to apply a given keymap to a device This will also make it useful for cases when we have a new keymap to apply to a device but don't have a source device. Reviewed-by: Kristian Høgsberg Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 361f405d3c866bc4d22ef84975fe771691156336 Author: Rui Matos Date: Fri Mar 7 14:32:28 2014 -0800 xkb: Factor out a function to copy a keymap's controls onto another Reviewed-by: Kristian Høgsberg Signed-off-by: Peter Hutterer commit 81a4952d3dcab9ca3a1ee399c773f5ac352036c4 Merge: 96a28e9c9 795066477 Author: Keith Packard Date: Tue Mar 11 22:04:36 2014 -0700 Merge remote-tracking branch 'whot/for-keith' commit 795066477ee81b5b82e490eac8bed6b656d01f17 Author: Peter Hutterer Date: Wed Feb 26 07:54:56 2014 +1000 config: search for PnPID on all parents (#75513) The PnPID for a device may not be on the immediate parent, so search up the device tree until we find one. X.Org Bug 75513 Signed-off-by: Peter Hutterer Tested-by: Benjamin Tissoires commit 45fb3a934dc0db51584aba37c2f9d73deff9191d Author: Peter Hutterer Date: Wed Feb 26 16:20:08 2014 +1000 xkb: push locked modifier state down to attached slave devices Whenever the master changes, push the locked modifier state to the attached slave devices, then update the indicators. This way, when NumLock or CapsLock are hit on any device, the LED will light up on all devices. Likewise, a new keyboard attached to a master device will light up with the correct indicators. The indicators are handled per-keyboard, depending on the layout, i.e. if one keyboard has grp_led:num set, the NumLock LED won't light up on that keyboard. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 656841798c99bcd79da47c03ec666a48b855541f Author: Peter Hutterer Date: Wed Feb 26 16:16:10 2014 +1000 xkb: factor out state update into a function No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit dda2468e579762dbd1fed2c75b5587d98f841e9c Author: Peter Hutterer Date: Wed Feb 26 16:03:19 2014 +1000 xkb: factor out the StateNotify flag check Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit fdb4ec86c29d85c1f68418a26e64bcc05b9c14ae Author: Peter Hutterer Date: Tue Mar 11 14:21:27 2014 +1000 xfree86: handle xorg.conf devices with logind Only devices from the config backend have their attributes set, devices from the xorg.conf only have Option "Device". That option is also set by the config backend, so use it. And since the config backend sets our major/minor but xorg.conf devices don't have that set, make sure we try to stat it first where needed. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 4754af9ddbd55c5637b56bd9f37d0d3414c839a8 Author: Peter Hutterer Date: Tue Mar 11 14:20:51 2014 +1000 config: only free odev->attrib_name for string types Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 96a28e9c914d7ae9b269f73a27b99cbd3c465ac8 Author: Eric Anholt Date: Thu Mar 6 18:50:07 2014 -0800 glx: Clear new FBConfig attributes to 0 by default. The visualSelectGroup wasn't getting set (since our DRI drivers don't use it), and and since it's the top priority in the sort order, you got random sorting of your visuals unless malloc really returned you new memory. This manifested as Xephyr -glamor rendering to a multisampled window on my system, which as you might guess was slightly lower performance than expected. Signed-off-by: Eric Anholt Reviewed-by: Michel Dänzer commit 2843a2f9b58a4aae2949111722c5c1bf3878674b Author: Eric Anholt Date: Tue Feb 25 16:56:54 2014 -0800 glamor: Use buffer_storage v2: - Make the default buffer size a #define. (by Markus Wick) - Fix the return offset for mapping with buffer_storage. (oops!) v3: - Avoid GL error at first rendering from unmapping no buffer. - Rebase on the glBindBuffer(GL_ARRAY_BUFFER, 0) change. v4: Rebase on Markus's vbo init changes. v5: Fix missing put_context() in the buffer_storage fallback path. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 9b86f7a1ab7904fbbe04283b6461a31470c77972 Author: Eric Anholt Date: Sun Jan 12 07:54:51 2014 -0800 glamor: Fix requested composite VBO size. The argument to setup_composte_vbo is the number of verts. v2: Drop the now-unused vert_stride value. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit d310d566b18e55bce27301e9ac78a7894d5194dd Author: Eric Anholt Date: Mon Jan 6 09:29:57 2014 +0800 glamor: Extract the streamed vertex data code used by Render. We should be uploading any vertex data using this kind of upload style, since it saves a bunch of extra copies of our vertex data. v2: - Add a simple comment about what the function does. - Use get_vbo_space()'s return in trapezoids, instead of dereffing glamor_priv->vb (by Markus Wick). - Fix the double-unmapping by moving put_vbo_space() outside of flush_composite_rects(). - Remove the rest of the composite_vbo_offset usage, and just always use get_vbo_space()'s return value. v3: - Fix failure to put_vbo_space in traps when no prims were generated. - Unbind the VBO from put_vbo_space(). Keeps callers from forgetting to do so. v4: - Split out some changes into the previous 3 commits while trying to track down a regression. - Fix regression due to rebase fail where glamor_priv->vbo_offset wasn't incremented. v5: - Fix GLES2 VBO sizing. - Add a comment about resize behavior. - Move glamor_vbo.c init code to glamor_vbo.c from glamor_render.c. (Derived from Markus's changes, but the GLES2 fix dropped almost all of the code in the functions). v6: - Drop the initial BufferData on GLES2 (it happens at put() time). - Don't forget to set vbo_offset to the size on GLES2. - Use char * instead of void * in the cast to return the vbo_offset. - Resize the default FBO to 512kb, to be similar to previous behavior. +1.66124% +/- 0.284223% (n=679) on aa10text. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ffc8423077d8b5af36ab59f59e4e18109586aec9 Author: Eric Anholt Date: Thu Mar 6 17:05:31 2014 -0800 glamor: Track the next vertex offset as we go for AA traps. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ca307fd18d4dfded04979903737ec5dd03487625 Author: Eric Anholt Date: Thu Mar 6 17:03:14 2014 -0800 glamor: Track the next vertex offset as we go for non-AA traps. v2: Use sizeof(float) instead of 4. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 03a33048a74d986e27668a4d01861ead0f8be76b Author: Eric Anholt Date: Thu Mar 6 16:57:46 2014 -0800 glamor: Track the next vertex offset as we go in render accel. I want to extract the VBO mapping code, and as part of that I need to get the global vbo_offset munging to stop. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 438d8aceec2d4af48917a7dfecacf11cd4f4b5ce Author: Eric Anholt Date: Thu Mar 6 13:29:08 2014 -0800 glamor: Move glamor_emit_composite_vert() to traps, where it's used. It's only used in the nonantialiased, triangle-based trapezoids path. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit bce5ec4f411134114c6ee2715f293a2250ee8800 Author: Eric Anholt Date: Tue Dec 24 12:14:04 2013 -0800 glamor: Don't forget to set GL_INVALIDATE_RANGE_BIT on GL_ARB_mbr. We don't need any current contents of the buffer, and this allows an implementation to make a temporary BO for a streamed upload if it wants to. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 25be6b384298a7769fedb6d9b5bdc370398c9c95 Author: Eric Anholt Date: Sun Jan 12 07:18:50 2014 +0800 glamor: Fix a mismatched glamor_get/put_context(). We don't call GL in this function any more, so we can just drop the get. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit bd09292debbb810db06b187d4e61c9416b5e565e Author: Eric Anholt Date: Fri Dec 27 14:03:26 2013 -0800 glamor: Add a note about the state of GL_ARB_map_buffer_range. GLES2 Xephyr is failing due to lack of glMapBuffer() with the read bits set, and I decided to see if we can just switch everything to glMapBufferRange(). I'm undecided, and it largely depends on whether we find people are interested in using glamor for the windows X server. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit ca507d215f54e878055de8da13877bc0225bece1 Author: Eric Anholt Date: Tue Dec 24 16:07:12 2013 -0800 glamor: Fix a spelling mistake in GLAMOR_PIXMAP_FBO_NOT_EXACT_SIZE. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 4e86f4236b32b61796d820714dc12457dbc92e28 Author: Eric Anholt Date: Mon Dec 23 18:16:01 2013 -0800 glamor: remove dead global variable. Signed-off-by: Eric Anholt Reviewed-by: Markus Wick commit 7f15e5aed79803fa6057fbfda7dfbacacc2e019d Author: Hans de Goede Date: Mon Mar 3 16:58:54 2014 +0100 Require video drivers to report that they support server managed fds This makes how we handle video drivers identical to what we do for input drivers, and this should make live easier for old non kms drivers. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 76af81bdf8ade158d7cef718ff6cf31cbf641a9a Author: Hans de Goede Date: Mon Mar 3 16:07:16 2014 +0100 xf86platformBus: Make doPlatformProbe accept a NULL gdev argument And use it from xf86platformAddDevice too, instead of directly calling drvp->platformProbe. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit 749d25f6f0faed00a4cd906171ea6f96d76591e7 Author: Hans de Goede Date: Fri Mar 7 04:59:47 2014 -0500 systemd-logind: Fix vt-enter not working when using a legacy video driver If there is only a single non kms video device (tested with the vesa driver), then we will never get a resume signal for a drm node, so also call vtenter when we get a resume for an input device. Notes: 1) vtenter checks if it is ok to do the vtenter, so if there are kms video devices the calls for input device resumes are a nop 2) This assumes that there will always be at least one server event fd supporting input device. Since all non legacy input-drivers will be patched to supported server fds this seems a safe assumption. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit c6dea929a4951c3c048554a1ef54cf8143d9577a Author: Hans de Goede Date: Mon Mar 3 17:00:57 2014 +0100 config_odev_add*_attribute: Don't add the attribute to the list twice Don't do the xorg_list_append a 2nd time when updating existing attributes, while at it add a helper function for this to avoid code duplication. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 2f2967173ba0b0a4f7ab013edeaaf11e7c181beb Author: Hans de Goede Date: Mon Mar 3 09:51:36 2014 +0100 hashtabletest: Fix warning: format ‘%ld’ expects argument of type ... This fixes the following compiler warning: hashtabletest.c: In function ‘print_xid’: hashtabletest.c:15:5: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘XID’ [-Wformat=] printf("%ld", *x); ^ Signed-off-by: Hans de Goede Reviewed-by: Eric Anholt commit b972851ce47b5e3b681a212a43dd71aab94e7a1b Author: Dave Airlie Date: Mon Mar 10 08:58:37 2014 +1000 xserver: fix build since system-logind.h on tinderbox and irc Reviewed-by: Hans de Goede Reviewed-by: Matthieu Herrb Reviewed-by: Alan Coopersmith Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 1c61d38528a573caadee2468ee59ea558c822e09 Merge: 5350ae1d3 bf3543739 Author: Keith Packard Date: Fri Mar 7 22:07:19 2014 -0800 Merge remote-tracking branch 'jwrdecoede/for-keith' commit 5350ae1d38f3c69a26421e0866ede0d2ccc3aea4 Author: Jon TURNEY Date: Fri Mar 7 15:59:10 2014 +0000 Fix xephyr build in --disable-glamor case It broke after commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd "xephyr: Build support for rendering with glamor using a -glamor option." See http://tinderbox.x.org/builds/2014-03-07-0004/logs/xserver/#build Signed-off-by: Jon TURNEY Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt commit 78e508c9379b3976ac8e76b7aaa90ba86ad4e443 Author: Andrew Eikum Date: Mon Dec 30 09:15:41 2013 -0600 dix: Clear any existing selections before initializing privates If there is a selection left over from a previous execution of the main loop, and that selection has privates allocated for it, the X server will crash. This is because dixResetPrivates() resets the privates refcounts to zero without accounting for the reference held by the selection object. When the selection is then deleted in InitSelections() after the call to dixResetPrivates(), the refcount for its privates type goes negative and bad things happen. To fix this, we should delete any existing selections before calling dixResetPrivates(). This will properly release the selection's privates and avoid the crash. A more thorough description of the problem and a test case to reproduce the crash is available at a previous mail: "Negative Selection devPrivates refcount?" By Andrew Eikum to xorg-devel on 10 Dec 2013 http://lists.freedesktop.org/archives/xorg-devel/2013-December/039492.html Signed-off-by: Andrew Eikum Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit da08316605b26830b4d8f8fb2d9e69471cdc80ab Author: Eric Anholt Date: Tue Dec 31 00:07:42 2013 -0800 glamor: Add support for DRI3. The render-nodes case is untested. v2: Add a flag for wayland to suppress the native DRI3 support. Wayland isn't running as a master itself, so it can't do the auth on its own and has to ask the compositor to do it for us. Dropped XXX about randr provider -- the conclusion from discussion with keithp was that if the driver's dri3_open for a provider on a different screen, that's a core dri3 bug. v3: Don't put quite so much under GLAMOR_NO_DRI3, and add a comment explaining what this is about. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit fb4a1e6ef6f80a7670e92cab2bc490d4afd80a9b Author: Eric Anholt Date: Mon Dec 30 18:49:46 2013 -0800 glamor: Rename the DRI-related pixmap functions. There was confusion over whether they should have egl in the name, and they had DRI3 in the name even though they're useful to have without DRI3. v2: Just rename glamor_name_from_pixmap for now -- I'd accidentally conflict-resolved in adding new parameters from a later commit. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 2d20f75b60276508424997d9fa8c5b97d8f1d92b Author: Eric Anholt Date: Fri Dec 27 22:19:07 2013 -0800 xorg: Connect up the glamor XV code, xorg DDX-only for now. Porting this code to be non-xorg-dependent is going to take significant hacking, so just dump it in the glamoregl module for the moment, so I can hack on it while regression testing. v2: Fix compiler warnings by adding #include dix-config.h at the top, don't try to auto-init (I'll try to fix the xv ABI later). v3: Fix last minute breakage of having reintroduced xf86ScrnToScreen (one of the compat macros). Just use the drawable's pScreen instead. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit 8d1cca30638f8a12c09efee27e9dedd90322b40e Author: Eric Anholt Date: Fri Dec 27 16:44:15 2013 -0800 xorg: Build a glamor_egl module. This is not exposing the API we want long term, but it should get existing DDX drivers up and running while we massage the API into shape. v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use version 0.5.1 (the point it was forked from the external repo). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson commit fa2e78788327c41bfd45b3de3c71bf9c26dcc85e Author: Eric Anholt Date: Fri Dec 20 10:41:43 2013 -0800 xephyr: Pass incoming XCB events to the Xlib event filter. This is the same thing that Qt ended up doing to get DRI2's event mangling to happen despite using an XCB event loop. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 9fe052d90cca90fdf750d3a45b151be2ac7f0ebd Author: Eric Anholt Date: Wed Dec 18 13:24:14 2013 -0800 xephyr: Build support for rendering with glamor using a -glamor option. v2: Avoid making the Ximage for the screen that we'll never use, and drive the screen pixmap creation for glamor ourselves. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) Reviewed-by: Adam Jackson commit b634e909895f6001e7d9543e1350b20c82c8c01c Author: Jon TURNEY Date: Thu Jun 27 23:56:23 2013 +0100 hw/xwin: More closely follow ICCCM for setting input focus In multiwindow mode, more closely follow ICCCM section 4.1.7 when setting X input focus to a window when the native Windows window acquires input focus: - If InputHint is FALSE, don't use XSetInputFocus() - If the window supports the WM_TAKE_FOCUS protocol, send a WM_TAKE_FOCUS message This helps JDK 1.7 clients acquire the focus correctly. Also, factor out checking client support for a given WM_PROTOCOLS protocol as a separate function. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0fc84a2bb6970f6b05a19cd8b32a7f3f7fd148b3 Author: Colin Harrison Date: Fri Feb 28 15:02:14 2014 +0000 hw/xwin: Remove unnecessary casts from malloc/realloc/calloc calls Remove unnecessary casts from malloc/realloc/calloc calls. This is the style used for the majority of X server code. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 94f709cfce62e716f8d3adea388625850de71e78 Author: Colin Harrison Date: Fri Feb 28 14:23:00 2014 +0000 hw/xwin: Add missing FORCEEXIT token to XWin configuration file lexer Somehow this was left out of commmit f3fad371cce0f3836514ad5b29e59fa1ca0627a7 Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 6432d44020443bbda90bd46ffcb572b51be803a1 Author: Colin Harrison Date: Fri Feb 28 14:21:46 2014 +0000 hw/xwin: Silence bell when volume is zero Allow the bell to be turned off with X server option '-f 0', or by 'xset b off'. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e37c4f727609d2d992ca46ffce56311c8d8225c Author: Colin Harrison Date: Fri Feb 28 14:21:06 2014 +0000 hw/xwin: Fix typo in comment 'i' before 'e' except after 'c' Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit d75195b62677f5b0f17bbe089b3aea5b295d5f2c Author: Colin Harrison Date: Fri Feb 28 14:20:48 2014 +0000 hw/xwin: Align parameter names in prototypes with definition A follow up to commits 2d9123fd, 451c5d91 and efe96a17, which changed the parameter name in the definition from index to i, to fix shadowing index() but didn't adjust the prototype declaration. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit e53568e2c5004a434a16e3971fb2cd0823e6487b Author: Jon TURNEY Date: Wed Jan 1 16:43:38 2014 +0000 hw/xwin: Just generate the WGL wrappers we need Just generate the WGL wrappers we need, rather than for everything in wgl.xml This avoids generating a lot of unused wrappers, and also avoids compilation requiring a wglext.h at least as new as wgl.xml Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit dec5e9899bfee2a83f8a64f975790ecd2390256d Author: Yaakov Selkowitz Date: Wed Apr 10 18:04:17 2013 +0100 hw/xwin: Fix implicit-function-declaration warning in XwinExtensionInit() when compiled with XWIN_GLX_WINDOWS defined InitOutput.c: In function ‘XwinExtensionInit’: InitOutput.c:170:9: error: implicit declaration of function ‘glxWinPushNativeProvider’ [-Werror=implicit-function-declaration] glxWinPushNativeProvider(); ^ InitOutput.c:170:9: warning: nested extern declaration of ‘glxWinPushNativeProvider’ [-Wnested-externs] Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit bf3543739db18c6cd52908f7c693cb64f43e3f23 Author: Hans de Goede Date: Sat Feb 1 13:21:15 2014 +0100 xf86OpenSerial: Add support server managed fds Try to get a server managed fd from the Options before trying to open the device node ourselves. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit d9a4059d400bf288aadd17c04885cb9b0fb93989 Author: Hans de Goede Date: Tue Jan 14 15:47:48 2014 +0100 config-udev: Don't try to add drm devices twice Before this commit we were trying to add most drm devices twice, once from xf86platformProbe() and once from config_udev_init(). This results in somewhat confusing messages in Xorg.log, ie: (II) xfree86: Adding drm device (/dev/dri/card0) Later followed by: (II) config/udev: Adding drm device (/dev/dri/card0) By filtering out duplicate drm devices we avoid these confusing messages. Signed-off-by: Hans de Goede Acked-by: Peter Hutterer commit 687afa3f6475060e6c460aa9496ba1a6a7982102 Author: Hans de Goede Date: Fri Jan 31 15:21:38 2014 +0100 systemd-logind: Add delayed input device probing With systemd-logind we cannot probe input devices while switched away, so if we're switched away, put the pInfo on a list, and probe everything on that list on VT-Enter. This is using an array grown by re-alloc, rather than a xorg_list since creating a new data-type to store a pInfo + list-entry just for this seems overkill. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit cac39219898f5e5a59ff8d8d6524f5fe0d111469 Author: Hans de Goede Date: Tue Jan 14 15:37:33 2014 +0100 systemd-logind: Hookup systemd-logind integration This commits makes the changes necessary outside of the systemd-logind core to make the server use systemd-logind managed fds for input devices and drm nodes. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 82863656ec449644cd34a86388ba40f36cea11e9 Author: Hans de Goede Date: Tue Jan 7 12:15:12 2014 +0100 systemd-logind: Add systemd-logind "core" This commits add the bulk of the systemd-logind integration code, but does not hook it up yet other then calling its init and fini functions, which don't do that much. Note the configure bits check for udev since systemd-logind use will only be supported in combination with udev. Besides that it only checks for dbus since all communication with systemd-logind is happening over dbus, so no further libs are needed. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 5fb641a29bfb4a33da964e1e9af523f3472015c6 Author: Hans de Goede Date: Mon Jan 13 12:03:46 2014 +0100 hotplug: Extend OdevAttributes for server-managed fd support With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for drm nodes. This commit adds a fd member to OdevAttributes to store the fd to pass it along to the driver. systemd-logind tracks devices by their chardev major + minor numbers, so also add OdevAttributes to store the major and minor. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit a8d802cb019da0549da57576ba0cc2cef1c8a98c Author: Hans de Goede Date: Sun Feb 2 13:54:33 2014 +0100 OdevAttribute: Remove unowned flag from OdevAttributes head The OdevAttributes struct should just be a head of the attributes list, and not contain various unrelated flags. Instead add a flags field to struct xf86_platform_device and use that. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie commit bc9d17fb566d57eabe4a3372773654fcf6ae5b44 Author: Hans de Goede Date: Sun Feb 2 15:28:31 2014 +0100 OdevAttribute: Add support for integer attributes Add a couple of new functions for dealing with storing integer values into OdevAttributes. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 350559dcdcd8b0de57801302e385e25debcb91f1 Author: Hans de Goede Date: Mon Feb 3 15:47:35 2014 +0100 OdevAttribute: config_odev_add_attribute: replace existing values If an attribute already exists replace its value rather than adding a duplicate attribute with the new value to the list. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 10c64e80569bbd35e97916a067f553cab27454b5 Author: Hans de Goede Date: Sun Feb 2 11:25:34 2014 +0100 OdevAttribute: Add config_odev_get_attribute helper Add a config_odev_get_attribute helper, and replace the diy looping over all the attributes done in various places with calls to this helper. Signed-off-by: Hans de Goede Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit 3346166a6596115421702c1f7e2732215674ab8e Author: Hans de Goede Date: Mon Jan 13 11:57:38 2014 +0100 xf86Xinput: Modify API for server-managed fd support With systemd-logind support, the xserver, rather than the drivers will be responsible for opening/closing the fd for input devices. This commit adds a new capabilities field to the InputDriverRec and a XI86_DRV_CAP_SERVER_FD flag for drivers to indicate that they support server managed fds. This commit adds a new XI86_SERVER_FD flag to indicate to drivers when the server is managing the fd and they should not open/close it. Note that even if drivers declare they support server managed fds there is no guarantee they will actually get them. Since this changes the input driver ABI, this commit bumps it. systemd-logind tracks devices by their chardev major + minor numbers, since we are breaking ABI anyways also add major and minor fields for easy storage / retrieval of these. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 6b79f28f5cb259f2168ecc3034fe2161e969bf7d Author: Hans de Goede Date: Wed Jan 22 11:32:56 2014 +0100 linux: xf86OpenConsole: Don't detach from controlling tty when it is our vt Detaching from our controlling tty makes little sense when it is the same as the vt we're asked to run on. So automatically assume -keeptty in this case. This is useful to do because when not running as root the server can only make various VT related ioctls when it does not detach from the tty. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 701b7ab34984b0f9f0c357b0ff8b53c5132c6324 Author: Hans de Goede Date: Thu Jan 16 10:37:28 2014 +0100 linux: xf86OpenConsole remove root-rights check for keeptty option There is no reason why keeptty cannot be used without root-rights. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 98f59a33dfc2d47a57c68420f226dc0c17992164 Author: Dave Airlie Date: Fri Feb 28 12:04:30 2014 +1000 modesetting: fix cursor rendering with hotspots. older kernels report EINVAL not ENOSYS, doh. Signed-off-by: Dave Airlie commit 2029c028fcffbe1aa175ab75636ae954a211c82a Author: Adam Jackson Date: Tue Feb 25 09:06:55 2014 -0500 modesetting: Don't (brokenly) double-track software cursor Signed-off-by: Adam Jackson commit caf1dec2a76fbbd21259fe4cc809e24a55ff79b4 Author: David Sodman Date: Mon Feb 10 09:07:33 2014 -0800 V2: Add check for link from output to crtc before optimizing out a CrtcSet call The function RRCrtcSet call checks to see if the config being set is already configured, but, doesn't check that the selected outputs are connected to the crtc before skipping. This means that the following sequence will omit the final CrtcSet call to the driver: CRTC c1 connect to output o CRTC c2 connect to output o CRTC c1 connect to output o This change adds the check to ensure that each of the calls are made to the driver. Signed-off-by: David Sodman Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 249565a07d1d243e27440e2a5ecf4c95490903c6 Author: Alan Coopersmith Date: Sun Feb 9 23:13:51 2014 -0800 Fix test/os to work on Solaris Due to bad decisions made decades ago at AT&T, on SVR4 OS'es the signal() function resets the signal handler before calling the signal handler (equivalent to sigaction flag SA_RESETHAND). This is why the X server has a OsSignal() helper function in os/utils.c that uses the portable POSIX sigaction function to provide BSD/Linux semantics in a signal() style API, so we switch to use that in this test case, allowing it to pass on Solaris. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0031f6b073c7a4cca553c1d3e185a63436a75cbe Author: Alan Coopersmith Date: Sun Feb 9 23:13:50 2014 -0800 Fix test/signal-logging to work on Solaris For some reason, Solaris libc sprintf() doesn't add "0x" to the %p output as glibc does, causing the test to fail for not matching the exact output. Since the 0x is desirable, we add it ourselves to the test string. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e67f2d7e0f9189beb2907fa06cff5ecc7f35f922 Author: Matthieu Herrb Date: Sun Feb 9 11:20:59 2014 +0100 gcc 4.2.1 doesn't support #pragma GCC diagnostic ignored Signed-off-by: Matthieu Herrb Signed-off-by: Keith Packard commit 1940508a4af33d44a7a8ef24bbdcd1e31e228dab Merge: c85ea92af ddeca9274 Author: Keith Packard Date: Mon Feb 24 16:27:52 2014 -0800 Merge remote-tracking branch 'herrb/master' commit c85ea92af145c98a4a3fc6cf7b9eac796a48cc2e Author: Keith Packard Date: Mon Feb 24 09:51:39 2014 -0800 Bump to 1.15.99.901 Signed-off-by: Keith Packard commit 0840a303c47b9b10ba8e24e62956da0f1675e963 Merge: 0f10cfd4b 3d71df48e Author: Keith Packard Date: Mon Feb 24 09:40:23 2014 -0800 Merge remote-tracking branch 'anholt/glamor-pull-request' commit fac2bcf1da09fba8bc8b22631e31f3c5b2737efd Author: Dave Airlie Date: Mon Jan 20 11:06:42 2014 +1000 modesetting: try and use hotspot cursor support Signed-off-by: Dave Airlie commit 4aab7aa7c1a15af7211996fa30e17a645f120ff9 Author: Dave Airlie Date: Fri Feb 21 12:48:42 2014 +1000 modesetting: move closing fd to after we check outputs On something like cirrus, start X, then attempt to start a second X while the first is running, if fbdev is installed it'll fail hard. Signed-off-by: Dave Airlie commit 0f10cfd4b903d4db293ec47c8a9a0d8b33965803 Author: Peter Hutterer Date: Thu Feb 20 13:18:05 2014 +1000 Xi: check for invalid modifiers for XI2 passive grabs The other values are checked correctly, but if a modifier was outside the allowed range, it would go unnoticed and cause a out-of-bounds read error for any mask equal or larger than 256. The DetailRec where we store the grab masks is only sized to 8 * sizeof(Mask). Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit ec6a44612565e0716bd5b2e2b80a8d381691feb6 Author: Gaetan Nadon Date: Wed Feb 19 13:48:06 2014 -0500 test: remove source file from hashtabletest LDADD LDADD is for libraries and not for source code. Introduced in commit: ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer commit 31b0be69e5eea3d1c82d6610bd37bbdb4dca779c Author: Thierry Reding Date: Wed Feb 19 17:16:48 2014 +0100 test/input: Fix alignment assertion for doubles The code previously tried to compute the offset of a field in the valuator by subtracting the address of the valuator from the _value_ of the field (rather than the field's address). The correct way to do it would have been (note the &'s): assert(((void *) &v->axisVal - (void *) v) % sizeof(double) == 0); assert(((void *) &v->axes - (void *) v) % sizeof(double) == 0); That's essentially what the offsetof() macro does. Using offsetof() has the added benefit of not using void pointer arithmetic and therefore silencing a warning on some compilers. Signed-off-by: Thierry Reding Signed-off-by: Peter Hutterer commit 9368bdec1d37127e97411b684f0b1fce5ee97907 Author: Laércio de Sousa Date: Mon Feb 17 08:43:49 2014 +1000 Get rid of config/non-seat0.conf.multi-seat This file is deprecated by commits c73c36b53 and 46cf2a6093. Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3d71df48e70884deccb293cf1fcffbdba8efd94b Author: Eric Anholt Date: Fri Dec 27 14:21:05 2013 -0800 glamor: Move the EGL DRI3 code to GLAMOR_HAS_GBM. There's nothing dependent on the presence of DRI3 code in the server for this, but it does rely on GBM. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 80cdbb20f9dcdfdf3e77ecf5cdd7dfb1a87d1a83 Author: Eric Anholt Date: Fri Dec 27 13:21:21 2013 -0800 glamor: Fix linking of the gradient shaders on GLES2. GLES2 sensibly doesn't allow you to attach multiple shaders for the same stage to a single program. This means we have to attach the whole thing in one glShaderSource call. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 76bd0f994959f30a37d41eaf06f43f23c3b23faf Author: Eric Anholt Date: Fri Dec 27 13:09:25 2013 -0800 glamor: Don't bother keeping references to shader stages for gradients. They never get reattached to any other program, so saving them to unreference later is a waste of code. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 6e62cdf66d2f0baa4a26eff6f4917f73baf3b008 Author: Eric Anholt Date: Fri Dec 27 11:29:27 2013 -0800 glamor: Fix typo in setting v_position's attrib location. Assuming it was the first attribute assigned by the GL, it would have ended up with location 0 anyway. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit f8d384fa8f0fa2a3ac04c4ad21fb04400490e8e6 Author: Eric Anholt Date: Fri Dec 27 02:13:27 2013 -0800 glamor: Move shader precision stuff from build time to shader compile time. This is the last desktop-versus-ES2 build ifdef in core glamor. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 1adac62a7d9da099c779e65527ece611cf4d2f2c Author: Eric Anholt Date: Fri Dec 27 02:10:53 2013 -0800 glamor: Unifdef the picture-format-to-format-and-type functions. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 3747c260816a36352bb91ce06befcbffbbd747c7 Author: Eric Anholt Date: Fri Dec 27 16:12:15 2013 -0800 glamor: Move glamor_get_tex_format_type_from_pictformat to a .c file. A pair of 150 lines of inlined switch statements in a header file is crazy. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 0e4f3414189b1820443b35248e4c9e03f0c2e34e Author: Eric Anholt Date: Fri Dec 27 02:04:11 2013 -0800 glamor: Unifdef the cache format indices. We only ask for GL_RGB on desktop GL as far as I can see, but now if GLES2 did happen to ask for GL_RGB it would return a cache index instead of -1. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit d63283860a7c04a12838dead0dfd6d04fb73a093 Author: Eric Anholt Date: Fri Dec 27 01:23:15 2013 -0800 glamor: Pass pixmaps around to unifdef glamor_iformat_for_depth(). v2: Just pass in the PicturePtr to glamor_pict_format_is_compatible() (suggestion by keithp) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit f3f4fc7a65589a200a086ea7b1527f91941bc19b Author: Eric Anholt Date: Fri Dec 27 01:17:10 2013 -0800 glamor: Add a screen argument to drop an ifdef from glamor_set_alu(). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 9553020b7184ed7a7ef3f02d60556d519ea3e769 Author: Eric Anholt Date: Wed Dec 25 11:39:13 2013 -0800 glamor: Drop a bunch of GLES2 ifdefs. Now that we're using epoxy, we can write code using both desktop and ES symbols and decide what to use at runtime. v2: Fix a spelling mistake (latter), since the lines were moved anyway (noticed by Rémi Cardona). Fix condition invert in glamor_set_composite_texture (caught by Michel Dänzer). Signed-off-by: Eric Anholt Reviewed-by: Keith Packard (v1) Reviewed-by: Adam Jackson (v1) commit c3c8a5f36034b6a2ce48d1d42e3de5af36406c38 Author: Eric Anholt Date: Wed Dec 25 11:36:35 2013 -0800 glamor: yInverted is a boolean value, so use the Bool type. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 12cbfeed81d3ae73e10ee8a2b6619fb4f403b8f6 Author: Eric Anholt Date: Mon Dec 23 18:00:46 2013 -0800 glamor: Drop fixed function transformation matrix setup. gl_ModelViewProjection and friends aren't used in our shaders, so this setup didn't do anything. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 62965d278c347ff323f2262d767978794e32f841 Author: Eric Anholt Date: Mon Dec 23 17:50:46 2013 -0800 glamor: Drop useless glEnable/glDisable(GL_TEXTURE_2D) calls. Those calls are only for enabling texture handling in the fixed function pipeline, while everything we do is with shaders. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Adam Jackson commit 4afe15d8bfd575c010ed1868697a7922a37ab378 Author: Eric Anholt Date: Wed Dec 18 15:27:52 2013 -0800 glamor: Put in a pluggable context switcher for GLX versus EGL. The GLX side just gets the context from the current state. That's also something I want to do for EGL, so that the making a context is separate from initializing glamor, but I think I need the modesetting driver in the server before I think about hacking on that more. The previous code was rather incestuous, along with pulling in xf86 dependencies to our dix code. The new code just initializes itself from the current state. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 781c692cf970642865f0e537f4905c43192f9935 Author: Eric Anholt Date: Wed Dec 18 13:10:24 2013 -0800 glamor: Rename glamor_get/put_dispatch to glamor_get/put_context. It used to be the thing that returned your dispatch table and happeend to set up the context, but now it just sets up the context. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit 0373b3f4f7c7aec633468b37f9236a2734dbcc74 Author: Eric Anholt Date: Wed Dec 18 12:18:20 2013 -0800 glamor: Convert to using libepoxy. Libepoxy hides all the GL versus GLES2 dispatch handling for us, with higher performance. v2: Squash in the later patch to drop the later of two repeated glamor_get_dispatch()es instead (caught by keithp) Signed-off-by: Eric Anholt Reviewed-by: Keith Packard commit f34dc7fa96457ea6a0703493d74e63cca357712e Author: Jeremy Huddleston Sequoia Date: Fri Feb 14 00:31:38 2014 -0800 XQuartz: pointer -> void * Fix build regression from 60014a4a98ff924ae7f6840781f768c1cc93bbab Signed-off-by: Jeremy Huddleston Sequoia commit 72237e0908527e9261b91c7db99f32d895947d8d Author: Keith Packard Date: Thu Feb 13 15:25:56 2014 -0800 DIST_SUBDIRS needs to include glamor, even if it isn't built Otherwise, glamor won't get cleaned for 'make distclean' Signed-off-by: Keith Packard commit 783991b1beeb71d91068601789d179d10eb8b544 Author: Gaetan Nadon Date: Thu Feb 13 17:36:34 2014 -0500 config: fails to create tarball as xorg-server.conf file removed Just need to update EXTRA_DIST Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 02fbae85e7aa17b213e1411fe558256998d367c4 Author: Alex Deucher Date: Wed Feb 12 13:06:51 2014 -0500 modesetting: query cursor size from the kernel Use new drm caps. This allows hw cursors to work correctly on gpus with non-64x64 cursors. Signed-off-by: Alex Deucher commit 30c3852bda7f60b0ffb1bb2f6ed8ba8800001b32 Author: Alan Coopersmith Date: Sun Feb 9 16:56:40 2014 -0800 Delete stray ; in struct _DeviceChangedEvent Caused Solaris Studio cc to complain in every file which included it: "../include/eventstr.h", line 179: warning: syntax error: empty member declaration Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 5300212ce8e9364ba26497605f3edc089af20130 Merge: ae796d43c 0b193b3ac Author: Keith Packard Date: Sun Feb 9 16:05:42 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 0b193b3ac94e078d9291d1b1dfd4814e5f2d9e34 Author: Peter Hutterer Date: Thu Feb 6 07:59:07 2014 +1000 xfree86: use xnfstrdup in the Xorg -configure code Just for consistency, I'm pretty sure the code is generally not happy for malloc failures anyway. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 7b1b7fb3be47672454837a3f7be2d1440433ec27 Author: Peter Hutterer Date: Wed Feb 5 15:12:22 2014 +1000 mi: fix printf warning about size_t format specifier mieq.c:290:26: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'size_t' [-Wformat=] pnprintf supports size_t since 5ea21560dd071ea4ab87430000d087fd5fe1f092 Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit ddeca927498c9df3b5e62c7bf05e31e2a3aeaa52 Author: Mark Kettenis Date: Sun Dec 15 14:31:10 2013 +0100 sync: Avoid ridiculously long timeouts On OpenBSD, passing a timeout longer than 100000000 seconds to select(2) will make it fail with EINVAL. As this is original 4.4BSD behaviour it is not inconceivable that other systems suffer from the same problem. And Linux, though not suffering from any 4.4BSD heritage, briefly did something similar: So avoid calling AdjustWaitForDelay() instead of setting the timeout to (effectively) ULONG_MAX milliseconds. Signed-off-by: Mark Kettenis Reviewed-by: Matthieu Herrb commit ae796d43c934ba378c9a618adc81c6729a14b2f8 Author: Keith Packard Date: Thu Feb 6 19:17:50 2014 -0800 ephyr: Repaint entire screen when colormap is updated Any time the colormap is changed, the entire screen needs to be repainted to match. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson Reviewed-by: Eric Anholt commit 9eecc9ac73aa06dca1420e0a89fb0cbd432a9bd7 Author: David Heidelberger Date: Fri Feb 7 02:06:04 2014 +0100 configure.ac: add missing "test" Signed-off-by: Keith Packard Reviewed-by: Hans de Goede commit 08c7df9b0870fadf7b4655825459ff2e5a5c47da Author: Alan Coopersmith Date: Mon Feb 3 17:38:24 2014 -0800 __glGetProcAddress: explictly cast function pointers to void * Fixes Solaris Studio compiler warning & error: "glxext.c", line 557: warning: assignment type mismatch: pointer to void "=" pointer to function(void) returning void "glxext.c", line 559: error: operands have incompatible types: pointer to void ":" pointer to function(void) returning void Signed-off-by: Alan Coopersmith Signed-off-by: Keith Packard commit 76eedb039fc8d515a76c1df944fd5a85ac674019 Author: Eric Anholt Date: Mon Jan 27 11:36:08 2014 -0800 xfree86: Fix a compiler warning on 64-bit. asm/mtrr.h makes this an unsigned long on 32, but a u64 on 64. Cast it to a long to win. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 9f8f6657cdd3a5b166771695addb6fe76d93c378 Author: Eric Anholt Date: Mon Jan 27 11:36:07 2014 -0800 glx: Delete dead NV program string functions. These have been throwing a compiler warning about missing prototypes, since the generated code to define the prototypes stopped being generated (possibly because the code was dead). Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0c774d53c5c1e8845e7da9b01814d7b98f621f51 Author: Eric Anholt Date: Mon Jan 27 11:36:06 2014 -0800 glx: Reduce compiler warnings by not requesting GL extension prototypes. They're not officially in the ABI, so you shouldn't use them anyway. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 87c4551c9cc9e382e6cfb59df1759d27c776abc8 Author: Eric Anholt Date: Mon Jan 27 11:36:05 2014 -0800 glx: Stop relying on libGL ABI bugs for glGetCompressedTexImage(). In theory, the linux libGL ABI exposes just GL 1.2 plus GLX 1.3. But, thanks to libglapi, we're letting glGetCompressedTexImageARB() be exposed too. The GLX code was inappropriately relying on it by using GL_GLEXT_PROTOTYPES. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf4f02337c97ffc3f7fbba9dba8ab72fa6c4a5fd Author: Jon TURNEY Date: Mon Jan 6 14:13:24 2014 +0000 glx: Remove left-over glthread.c Commit be668096 "glx: convert to direct GL dispatch (v2)" removes glthread.c from Makefile.am along with the rest of the dispatch table code, but doesn't remove glthread.c itself. Signed-off-by: Jon TURNEY Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 7305153643622269e14f3564f7a8a66ecaf49f78 Author: Adam Jackson Date: Wed Feb 5 11:10:47 2014 -0500 configure: Don't add GLX_SYS_LIBS to XORG_SYS_LIBS libglx.so is linked against libGL.so, but Xorg itself should not be. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit c64130c13bd6914a998a8e8b808a6cedd18f9384 Author: Peter Hutterer Date: Wed Feb 5 15:10:27 2014 +1000 dix: fix a -Wshadow warning dispatch.c: In function 'SetVendorString': dispatch.c:481:29: warning: declaration of 'string' shadows a global declaration [-Wshadow] SetVendorString(const char *string) ^ dispatch.c:135:21: warning: shadowed declaration is here [-Wshadow] typedef const char *string; Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 72967d6c153b0d1109df23967e1a05c3c397a1e0 Author: Peter Hutterer Date: Wed Feb 5 14:32:23 2014 +1000 xfree86: unconstify driver in the XF86ConfInputClassRec No const value is ever assigned to it, let's not pretend it's const. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit f14d6647c0883d4e7e4de7645d7a18e4d301845e Author: Peter Hutterer Date: Wed Feb 5 14:30:50 2014 +1000 xfree86: unconstify another string Only Xorg -configure uses a hardcoded value here, so let's not change the rest of the server for that. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 46ae9d67e4118fa79bef0f9119d20559dfd6b6c0 Author: Peter Hutterer Date: Wed Feb 5 14:24:54 2014 +1000 xfree86: un-constify inp_driver/inp_identifier The only place this isn't allocated is during Xorg -configure where we just statically assing "mouse"/"kbd" and the identifiers for it. Everywhere else it's strdup'd and then free'd already. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 93bf9544712a39f10557533993d8826b2b67fc9a Author: Peter Hutterer Date: Wed Feb 5 14:16:01 2014 +1000 xfree86: device name and driver are not const char Allocated in one place, freed in another. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede Reviewed-by: Keith Packard commit 25d10464f440b8b34594b7c988a99a830ea39a29 Author: Peter Hutterer Date: Fri Jan 24 18:16:54 2014 +1000 dix: fix button state check before changing a button mapping dev->button->down is a bitmask, not a normal array. Use the helper function to check, we technically allow the mapping to change after the physical button has been pressed (but not yet processed yet), so only check BUTTON_PROCESSED. From XSetPointerMapping(3): "If any of the buttons to be altered are logically in the down state, XSetPointerMapping returns MappingBusy, and the mapping is not changed." Reported-by: Ilja Van Sprundel Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 73926622b91fde01148727f26d6aad5e6827c1d2 Author: Peter Hutterer Date: Fri Jan 24 18:33:54 2014 +1000 include: make the various button array lengths more obvious No functional changes, just making a better case for why MAP_LENGTH is 256. "But can't we remove MAP_LENGTH then?" I hear you say? "Why, yes. Go for it!" Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 87ca80a7196949597113225405f3e4ee03bbee13 Author: Peter Hutterer Date: Fri Jan 24 18:32:54 2014 +1000 dix: prevent a driver from initializing or submitting buttons > MAX_BUTTONS The server internally relies on arrays with a MAX_BUTTONS maximum size (which is the max the core protocol can transport). Make sure a driver adheres to that. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 14fb6cf92c009d726f0a6b6e8b89cc48f2dd50eb Author: Peter Hutterer Date: Thu Jan 30 09:16:23 2014 +1000 Revert "xfree86/common: handle string constants in xf86Xinput configuration" This reverts commit 22592855e90d23013ba7f9e945d567725cb44bf3. What warning was this supposed to fix? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit a553444b5841522836f7437ebb96e40be270fd8b Author: Peter Hutterer Date: Thu Jan 30 09:12:41 2014 +1000 Revert "xfree86/parser: make strings in xf86MatchGroup const" This reverts commit f71de60355cc76810657f40c7b5461af86b34bf7. What warnings? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 45f1d527f39a296104f2fa79a774446e7e1560e0 Author: Peter Hutterer Date: Thu Jan 30 09:01:09 2014 +1000 input: un-constify dev->name Fallout from fecc7eb1cf66db64728ee2d68cd9443df7e70879, and reverts most of the rest of that patch. The device name is allocated and may even change during PreInit. The const warnings came from the test codes, the correct fix here is to fix the test code. touch.c: In function ‘touch_init’: touch.c:254:14: warning: assignment discards ‘const’ qualifier from pointer target type [enabled by default] dev.name = "test device"; Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 675f215af291135ee3ece5414e4a5a2e89bf4ed3 Author: Peter Hutterer Date: Thu Jan 30 08:52:32 2014 +1000 Revert "os: xstrtokenize takes and returns const char * now" This reverts commit d0339a5c66846c9f14e3b584e34688520a0916ab. seriously, what the fuck? Are we making xstrdup() return a const char now too? Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit ce3df579e3f24a169189b288230959527e059080 Author: Peter Hutterer Date: Thu Jan 30 08:50:06 2014 +1000 input: un-constify InputAttributes Introduced in fecc7eb1cf66db64728ee2d68cd9443df7e70879 and reverts most of that but it's helpfully mixed with other stuff. InputAttributes are not const, they're strdup'd everywhere but the test code and freed properly. Revert the const char changes and fix the test up instead. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 2fc38d1e299587d25ca8225051e0ea9403164b15 Author: Peter Hutterer Date: Wed Jan 29 11:16:51 2014 +1000 xkb: add a call to init an XkbRMLVOSet from const chars Just forcing everything to const char* is not helpful, compiler warnings are supposed to warn about broken code. Forcing everything to const when it clearly isn't less than ideal. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 6307d60dd592f4b438f880d02bde9fd8d50ae264 Author: Peter Hutterer Date: Wed Jan 29 10:47:49 2014 +1000 Xi: remove superfluous cast. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede commit 83e38eb73fd8c852513aac2da2975b4c01070ec2 Author: Arun Raghavan Date: Mon Jan 6 20:29:50 2014 +0530 edid: Add quirk for Sony Vaio Pro 13 The detailed timings are for a 15.6" display when max image size correctly reports 13.3". Signed-off-by: Arun Raghavan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit bf83843b92ce21d11f6ff1a407ff3d014e017c9b Author: Hans de Goede Date: Thu Dec 19 14:10:18 2013 +0100 xf86Events: add Enable/DisableInputDeviceForVTSwitch functions Factor this code out into functions so that it can be re-used for the systemd-logind device pause/resume paths. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 48b489769e78fa20911630173ab708feecb0fb0e Author: Hans de Goede Date: Thu Dec 19 11:28:40 2013 +0100 xf86Events: refactor xf86VTLeave error handling Use kernel goto style error handling for xf86VTSwitchAway() failure. This makes it much easier to read the straight path. Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 78f0667d6df9cc43a397d9f1490e540936a435d6 Author: Hans de Goede Date: Thu Dec 19 11:26:36 2013 +0100 xf86Events: split xf86VTSwitch into xf86VTLeave and xf86VTEnter functions Signed-off-by: Hans de Goede Reviewed-by: Peter Hutterer commit 33cec8af55d829cd77b297ae356ed7a00ce8523c Author: Hans de Goede Date: Tue Dec 17 09:29:07 2013 +0100 dbus-core: Attempt to connect to dbus ASAP For systemd-logind integration we need the dbus connection to be available before enumerating input and gfx devices. Signed-off-by: Hans de Goede Reviewed-by: Daniel Stone commit 480590b90c3966536451d2a2fecc42a66082ed77 Author: Hans de Goede Date: Wed Dec 4 11:10:06 2013 +0100 dbus-core: Make dbus-core no longer mutually exclusive with udev With systemd-logind the dbus-core will be used for more then just config, so it should be possible to build it even when using a non dbus dependent config backend. This patch also removes the config_ prefix from the dbus-core symbols. Signed-off-by: Hans de Goede Reviewed-by: Daniel Stone commit c29454ae9d2e8e647732077fdfd97b351095f122 Author: Peter Hutterer Date: Thu Dec 12 12:48:57 2013 +1000 config: drop the dbus API This API has been disabled by default since 1.4, the first release it came in. There a no known users of it and even its direct replacement (HAL) has been superseeded by udev on supported platforms since 1.8. This code is untested, probably hasn't been compiled in years and should not be shipped. Signed-off-by: Peter Hutterer Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede Reviewed-by: Daniel Stone commit 46cf2a60934076bf568062eb83121ce90b6ff596 Author: Laércio de Sousa Date: Thu Dec 12 14:22:48 2013 -0200 xfree86: Keep a non-seat0 X server from touching VTs (#71258) Updated patch following Hans de Goede's advice. If -seat option is passed with a value different from seat0, X server won't call xf86OpenConsole(). This is needed to avoid any race condition between seat0 and non-seat0 X servers. If a non-seat0 X server opens a given VT before a seat0 one which expects to open the same VT, one can get an inactive systemd-logind graphical session for seat0. This patch was first tested in a multiseat setup with multiple video cards and works quite well. I suppose it can also make things like DontVTSwitch and -sharevts meaningless for non-seat0 seats, so it may fix bug #69477, too. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71258 https://bugs.freedesktop.org/show_bug.cgi?id=69477 (maybe) See also: http://lists.x.org/archives/xorg-devel/2013-October/038391.html https://bugzilla.redhat.com/show_bug.cgi?id=1018196 Signed-off-by: Hans de Goede Reviewed-by: Hans de Goede commit b3d3ffd19937827bcbdb833a628f9b1814a6e189 Author: Łukasz Stelmach Date: Mon Nov 25 11:54:07 2013 +0100 configure.ac: enable systemd socket activation in libxtrans Signed-off-by: Łukasz Stelmach Signed-off-by: Hans de Goede Acked-by: Peter Hutterer commit 435098a0dce6bca8870ec9725bf0af0969cd84fa Author: Alan Coopersmith Date: Tue Jan 28 20:27:52 2014 -0800 Add RANDR 1.4 requests & events to dix/protocol.txt Checked against randrproto.txt & randr.h Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit c1ac89c793614797e08d3d8e7fc9ba55be899130 Author: Alan Coopersmith Date: Tue Jan 28 20:27:51 2014 -0800 xf86DeleteScreen: move check for NULL pScrn before first dereference Flagged by cppcheck 1.62: [hw/xfree86/common/xf86Helper.c:220] -> [hw/xfree86/common/xf86Helper.c:231]: (warning) Possible null pointer dereference: pScrn - otherwise it is redundant to check it against null. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e6733ae91b7be52930f22a87de15fa05819ef948 Author: Alan Coopersmith Date: Tue Jan 28 20:27:50 2014 -0800 On realloc failure, free font_path_string instead of leaking it Flagged by cppcheck 1.62: [dix/dixfonts.c:1792]: (error) Common realloc mistake: 'font_path_string' nulled but not freed upon failure Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 910b5b245425f0a866a703303b78768b0de5cb2b Author: Alan Coopersmith Date: Tue Jan 28 20:27:49 2014 -0800 Link libvgahw with $(PCIACCESS_LIBS) as well Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit da1660deeb9032ecca61f4bcdc9fc2eec2ada445 Merge: 0fbb3d711 9fc19168e Author: Keith Packard Date: Mon Jan 27 19:02:15 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 0fbb3d711efec5222a57b45a70d28fc98380f3a1 Merge: 7ddef4f70 b98e49379 Author: Keith Packard Date: Mon Jan 27 14:11:09 2014 -0800 Merge remote-tracking branch 'anholt/glamor-reformat' Conflicts: Makefile.am Conflict caused by adding PSEUDORAMIX and GLAMOR directory defines in separate branches commit 7ddef4f7033c10b6e92866182d4475a4d49c5083 Author: Keith Packard Date: Wed Jan 22 14:30:28 2014 -0800 Add _XITYPEDEF_POINTER to dix-config.h Just like the pointer type from Xdefs.h, the Pointer type from XIproto.h collides with local declarations of variables using the same name. XIproto.h can use _XITYPEDEF_POINTER to avoid declaring the unnecessary pointer type. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 0b5a87f37d5dcd2ebff977a3b9a50a75ace93c83 Author: Keith Packard Date: Wed Jan 22 19:17:24 2014 -0800 pseudoramiX: Only compile on XQUARTZ and XWIN PseudoramiXExtensionInit() is not defined in extinit.h if it won't be used and we get a compiler warning when compiling the pseudoramiX code. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 61cb6c9aa95aa369573c4e02c023bbc33c7678c9 Author: Keith Packard Date: Wed Jan 22 19:16:36 2014 -0800 pseudoramiX: Add _X_ATTRIBUTE_PRINTF attributes to debug functions. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9e45a1a030a5e70318441f33a132269a19a43df5 Author: Keith Packard Date: Fri Nov 15 18:00:53 2013 +0900 Warning fixes in glx Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit b98e49379c8d7cecce991207048489f51b10028c Author: Eric Anholt Date: Wed Dec 18 15:00:19 2013 -0800 glamor: Remove more out-of-tree compat code. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 40a8186f0f78b7c36ef7e3d902c53bdc9bb7c650 Author: Eric Anholt Date: Fri Dec 27 12:22:08 2013 -0800 glamor: Remove an extra copy of RegionNil(). Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit d26f5335151a9e962afa4bbf29ca5b94660a33ca Author: Eric Anholt Date: Wed Dec 18 11:35:53 2013 -0800 glamor: Hook the module back up to the build. For now we're just building an uninstalled library. The extra EGL stubs are required so that we can get the DIX building and usable without pulling in the xf86 DDX code in glamor_egl.c. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 54e78ec31e030d488765341a0c143c5a060c3768 Author: Eric Anholt Date: Wed Jan 22 15:03:26 2014 -0800 glamor: Convert use of the old "pointer" typedef to "void *". Reviewed-by: Keith Packard commit 3c3a4eeaa1f24b7534b332739158a2a36987ea6b Author: Eric Anholt Date: Wed Dec 18 11:45:33 2013 -0800 glamor: Silence warnings for non-debug builds. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 9af66851e2770bcd8408a0e5ddf8bb8ea816feaa Author: Eric Anholt Date: Fri Jan 24 10:58:04 2014 -0800 glamor: Disable definitions of GL extension prototypes to avoid warnings. We're not using the extension prototypes, since you have to dlsym them anyway. Disabling their definitions prevents them from being defined twice (once by gl.h, once by glext.h). Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong commit a7b8ce8b4207a93c0455a0b796cfc47917c04a9c Author: Eric Anholt Date: Wed Dec 18 11:41:33 2013 -0800 glamor: Drop xfree86 dependencies from this dix module. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 7759e4d090f56cdcad1c8a2acb2c1be20021de5d Author: Eric Anholt Date: Wed Dec 18 11:43:48 2013 -0800 glamor: Disable the XV code for now. We're going to want to make this DIX code instead of XF86 if at all possible, but for now just disable it so we can work on the rest of the build. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit b3acb47e98023da898ffc4b6a5bac38a78bd7727 Author: Adam Jackson Date: Wed Oct 30 11:30:23 2013 -0400 glamor: Use dix-config.h not project config.h v2: Also edit the one in glamor_egl.c (by anholt) v3: Also edit the one in glamor_eglmodule.c (by anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 6cc0b7b01599b94af07e9fc8b16134f751ede077 Author: Adam Jackson Date: Wed Oct 30 11:05:40 2013 -0400 glamor/egl: Remove glapi awareness We only needed this because glx was directly bashing glapi tables. Since that's not the case anymore, we should just MakeCurrent like a real GL app. v2: Hand-resolve against rebase onto newer server (by anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 0c5a7c208601110a0b36d24cdacb4d844af03f75 Author: Eric Anholt Date: Tue Dec 17 16:32:17 2013 -0800 glamor: Remove compat code for building out of tree. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 82efb90efba685678638f94804d773b59ca1643f Author: Adam Jackson Date: Wed Oct 30 09:56:46 2013 -0400 glamor: Remove copy of sna's compiler.h Xfuncproto.h has equivalents for these already. v2: Adjust a couple more likelies after the rebase (anholt) Signed-off-by: Adam Jackson Signed-off-by: Eric Anholt Reviewed-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 714926b090344a17a2f7aee9f4bc6aea4e45f48c Author: Eric Anholt Date: Thu Jan 9 18:23:39 2014 +0800 glamor: Fix up some indentation damage on header prototypes. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 7f6e865359c2d055db4eb7d82b4779b3d7c5d264 Author: Eric Anholt Date: Fri Dec 27 11:46:30 2013 -0800 glamor: Fix some indent damage of putting a ' ' after the '*' for pointers. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 5f57d436c391c51f3f90958b033f6ee3eb7a1136 Author: Eric Anholt Date: Tue Dec 24 15:59:14 2013 -0800 glamor: Fix some mangling of shader strings by indent. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit d84d71029ae9e462559d64eff7259e2cc7732fac Author: Eric Anholt Date: Wed Dec 18 11:59:07 2013 -0800 glamor: Apply x-indent.sh. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit e8e9a54c47deedbc13b8969ed29e16463b0314a0 Author: Eric Anholt Date: Wed Dec 18 11:56:15 2013 -0800 glamor: Touch up some code so indent doesn't get confused. Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard commit 9fc19168e7ca6308275bf8769d1ccb982f88465b Author: Alan Coopersmith Date: Fri Jan 24 23:42:49 2014 -0800 Check for calloc() failure in add_master() Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 76b3be75b62657e346731444736f7e4d200beb5b Author: Peter Hutterer Date: Fri Jan 24 16:51:02 2014 +1000 Xi: fix modifier offset in XIPassiveGrab swapping function The request is followed by mask_len 4-byte units, then followed by the actual modifiers. Also fix up the swapping test, which had the same issue. Reported-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c1ce807d9f18f215332d7eeb844e8c640f71c53c Author: Keith Packard Date: Wed Jan 22 11:01:59 2014 -0800 dix: Praise clients which haven't run for a while, rather than idle clients A client which is ready, but hasn't run for a while, should receive the same benefit as one which has simply been idle for a while. Use the smart_stop_tick to see how long it has been since a client has run instead of smart_check_tick, which got reset each time a client was ready, even if it didn't get to run. Reported-by: Chris Wilson Signed-off-by: Keith Packard Tested-by: Chris Wilson commit 76b275d7acbfd6b28cb9e74fa4862faa6d08217d Author: Keith Packard Date: Sun Jan 12 10:53:31 2014 -0800 test/signal-formatting: Ignore compiler warnings The signal formatting tests intentionally include code which generates warnings with the current X server warning flags. Turn the compiler warnings off Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 12ea81792868c10a89a06ce9a9e8f707be283569 Author: Keith Packard Date: Sun Jan 12 10:44:22 2014 -0800 test/hashtabletest: Clean up -Wshadow errors Declare 'XID id' local to each scope it is used in, rather than having the first use be a function-wide declaration. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 7104f0f338fa96824a463331d6099a76ee3c21ac Author: Keith Packard Date: Sun Jan 12 10:42:37 2014 -0800 test/xi2: Clean up -Wshadow warnings protocol-common declares a bunch of pretty generic names; fix shadows of these names. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 92a9495800cf59b917c30d5fbaf4b7eca10d19cf Author: Keith Packard Date: Sun Jan 12 10:42:01 2014 -0800 kdrive/ephyr: Remove extra 'i' variable in ProcXF86DRIGetDrawableInfo Just re-use the top-level one Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 988877065486d0f25cc85be5be05f4523cc883c7 Author: Keith Packard Date: Sun Dec 15 01:57:09 2013 -0800 randr: Eliminate -Wshadow warnings Don't use rrScrPriv for nested screen private fetching. Eliminate a duplicate fetch of the randr screen private in rrCheckPixmapBounding. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit f46c487625e1ffbc78df5153128c68bd6bc41104 Author: Keith Packard Date: Sun Dec 15 01:56:36 2013 -0800 hw/xnest: Eliminate shadowed names Just rename stuff; nothing fancy here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1f3676a81ef2c52699bdfcf1fb9da7e4e79b00b7 Author: Keith Packard Date: Sun Dec 15 01:55:43 2013 -0800 hw/vfb: Rename screenInfo parameter to screen_info Avoid shadowing the global screenInfo value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 89c0fa3d6c8ae67084a30395085db6d872d9d6de Author: Keith Packard Date: Sun Dec 15 01:55:06 2013 -0800 kdrive: Fix -Wshadow errors Just rename stuff to avoid conflicts. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9c108b3ccdb4086002b83d9ad66f5619e9ec95bb Author: Keith Packard Date: Sun Dec 15 01:53:50 2013 -0800 exa: Fix -Wshadow warnings In exa_accel, there was a duplicate fetch of a pixmap private field. exa_render just had a regular shadowed value. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 04e320a4e4e1f46bf95e36078d93b4d18a0ef855 Author: Keith Packard Date: Sun Dec 15 01:52:58 2013 -0800 composite: Remove duplicate window pixmap fetch There's nothing between the previous fetch and this one that could cause the window pixmap to have changed. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 07b03e721e4dbec1a640c9b3bb8a2d5902587e63 Author: Keith Packard Date: Sun Dec 15 01:41:19 2013 -0800 xfree86: Fix -Wshadow warnings Just rename variables to eliminate -Wshadow warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 3c94b89f149c2d63424faed0d44a6911393c3569 Author: Keith Packard Date: Sun Dec 15 01:40:04 2013 -0800 Xi: Use 'void *' instead of 'Pointer' (which is going away) There's no reason for XI to declare 'typedef char *Pointer' in a shared header file; assume it will eventually go away and stop using it here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 08d0481e299c28b64a0db9bb0782ba2b551028fd Author: Keith Packard Date: Sun Dec 15 01:12:22 2013 -0800 os: Fix -Wshadow errors Rename variables to avoid shadowing globals Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1487145b41390e689f8b03c1e8a2df70e00cf519 Author: Keith Packard Date: Fri Dec 13 11:25:45 2013 -0800 Add 'FONT_PATH_NAME_ELEMENT_CONST' to dix-config.h and xorg-server.h This signals to the fontsproto code that the X server has been fixed to allow the name member in a FontPathElement struct to be declared const to eliminate piles of warnings when assigning string constants to them. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 1ad8d12e7fcd7d55a37099d7426e3290297ba6d3 Author: Keith Packard Date: Fri Dec 13 11:24:00 2013 -0800 Ignore a couple of format-nonliteral warnings These are generated in code which uses sprintf as a convenient way to construct strings from various pieces. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 9ef53e2267ea3dd60651961f66c65e8b00b7d823 Author: Keith Packard Date: Wed Dec 11 11:55:37 2013 -0800 include: GetClientResolutions is declared in font.h No need to have a duplicate definition here. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 25ebb9dbc9df659dec2bf6c27654a5bad2d11f94 Merge: 409e8e29f 71baa466b Author: Keith Packard Date: Wed Jan 22 11:33:53 2014 -0800 Merge remote-tracking branch 'whot/for-keith' commit 409e8e29fbe16122ba5a4249256fc56e2e68ea93 Merge: 457bc8354 d6c8d7509 Author: Keith Packard Date: Wed Jan 22 11:32:35 2014 -0800 Merge remote-tracking branch 'dlespiau/20131216-4k' commit 457bc83549e58bb87de96bed02988db3275a7611 Author: Alan Coopersmith Date: Sat Jan 4 00:09:45 2014 -0800 If EAGAIN == EWOULDBLOCK, only need to check errno for one of them Solaris has: #define EWOULDBLOCK EAGAIN so checking (errno == EAGAIN || errno == EWOULDBLOCK) is overkill. This leads cppcheck 1.62 to complain: [xserver/os/io.c:365] -> [xserver/os/io.c:365]: (style) Same expression on both sides of '||'. [xserver/os/io.c:941] -> [xserver/os/io.c:941]: (style) Same expression on both sides of '||'. This quiets it, and reduces the number of calls Solaris Studio cc generates to the __errno() function to get the thread-specific errno value. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 044a6ef2ff5f2c83a80b11e747f62f48830b526b Merge: 0b932cf47 77df653ae Author: Keith Packard Date: Wed Jan 22 11:28:54 2014 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 0b932cf47a4df8ea0f7488e285d218fe7c10dd77 Merge: 1d76b02fa 295d41fa2 Author: Keith Packard Date: Wed Jan 22 11:27:36 2014 -0800 Merge remote-tracking branch 'anholt/xserver-unifdef' commit 1d76b02fac79c0360ae201e4d1a8ba0e9a00e810 Merge: 771f390ef 4dd62d780 Author: Keith Packard Date: Wed Jan 22 11:22:35 2014 -0800 Merge remote-tracking branch 'anholt/glamor-external-rebase' commit 771f390efdf48cb7c44fe20857f06f8ffff3b2ce Author: Gaetan Nadon Date: Sat Dec 21 19:58:32 2013 -0500 autoconf: fix warning by replacing AC_WARN with AC_MSG_WARN A warning about the macro generating the warnings to the user... Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit c3819da87ff2e8c6292066f965c098704edc442c Author: Gaetan Nadon Date: Sat Dec 21 19:58:31 2013 -0500 xorg-tls: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 02d866a088a2fc60c6aaebe23c48b372f6b6aa9b Author: Gaetan Nadon Date: Sat Dec 21 19:58:30 2013 -0500 autoconf: fix warning, replace AC_TRY_COMPILE with AC_COMPILE_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit e38c98fe74394a138ebadb29b1cfe1d4ea7f7071 Author: Gaetan Nadon Date: Sat Dec 21 19:58:29 2013 -0500 autoconf: fix warning, replace AC_TRY_LINK with AC_LINK_IFELSE The code produced in the configure script is identical. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 4993590c90b1289171a2ca0e74d9c4310f5318c7 Author: Gaetan Nadon Date: Sat Dec 21 19:58:28 2013 -0500 autoconf: fix warning by replacing deprecated AC_HELP_STRING We can also make do without the workaround introduced in 2005. The 2.60 autoconf minimum version covers that now. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 1d4dbc2f2b4d2acca2691c3c7464a45aac59d73f Author: Gaetan Nadon Date: Wed Dec 4 13:28:04 2013 -0500 libtool: bump minimum required version to 2.2 LT_PREREQ([2.2]) LT_INIT AC_CONFIG_MACRO_DIR([m4]) is recommended to locate local macros, which is fully used starting automake 1.14. ACLOCAL_AMFLAGS in Makefile.am is deprecated since automake 1.14. The comment is to prevent developers from removing the statement as suggested in 1.14 which would break earlier versions. Automake 1.14 is already in use by many. This patch works on versions prior and post 1.14 References: Building the X Window System from Source: http://www.x.org/wiki/Building_the_X_Window_System/#index2h3 Discussion on xorg minimum autotools requirements: http://lists.x.org/archives/xorg-devel/2013-October/038325.html Tested with autoconf 2.60, automake 1.10.3 and libtool 2.2 The same upgrade will be applied to libraries and drivers. Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 71baa466b1f6b02fe503f9a3089b7b9d61aa0f80 Author: Peter Hutterer Date: Mon Jan 13 17:00:23 2014 +1000 os: restrict display names to digits We call atoi() on the server's display to get the socket but otherwise use the unmodified display for log file name, xkb paths, etc. This results in Xorg :banana being the equivalent of Xorg :0, except for the log files being in /var/log/Xorg.banana.log. I'm not sure there's a good use-case for this behaviour. Check the display for something that looks reasonable, i.e. digits only, but do allow for :0.0 (i.e. digits, followed by a period, followed by one or two digits). Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 77df653ae3d8448be21221711851acde12c6bc1a Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:10:41 2014 -0800 XQuartz: Avoid passing uninitialized pointers to X11ApplicationSetWindowMenu in AppleWMSetWindowMenu Signed-off-by: Jeremy Huddleston Sequoia commit 3bc608a361a01043b226fb9aaebf88f6fd852925 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:04:07 2014 -0800 XQuartz: Check for allocated memory before using it in AppleWMSetWindowMenu Signed-off-by: Jeremy Huddleston Sequoia commit 64327226ddfba8f0653615cd678d2d4336fb993d Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 11:00:40 2014 -0800 XQuartz: Silence a clang static analysis warning about a memory leak It seems the alanyzer can't comprehend dixSetPrivate(). quartz.c:119:12: warning: Potential leak of memory pointed to by 'displayInfo' return quartzProcs->AddScreen(index, pScreen); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Jeremy Huddleston Sequoia commit b2f6b3497c33a4897afae80a2cf69c596b9f81e8 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:55:10 2014 -0800 XQuartz: Silence a clang static analysis warning about a possible memory leak on exit stub.c:356:9: warning: Potential leak of memory pointed to by 'newargv' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ stub.c:356:9: warning: Potential leak of memory pointed to by 'newenvp' asl_log(aslc, NULL, ASL_LEVEL_ERR, ^~~~~~~ 2 warnings generated. Signed-off-by: Jeremy Huddleston Sequoia commit a03f096a85537d9e881cedaa6cb71aca43a97086 Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:47:52 2014 -0800 XQuartz: Validate length in appledri before swapping Avoids potential memory corruption from bad requests Signed-off-by: Jeremy Huddleston Sequoia commit b3572c0d1ab7888ac26d6b2b8be6d1d19ed9af3f Author: Jeremy Huddleston Sequoia Date: Wed Jan 1 10:39:56 2014 -0800 XQuartz: Validate screen in AppleDRIQueryDirectRenderingCapable requests Return an error to the caller rather than crashing the server on invalid screens. Signed-off-by: Jeremy Huddleston Sequoia commit 959e8f23af7850fcaf40d6c67f5228241a36a9ab Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:45:23 2013 -0800 XQuartz: Simplify hook_run to quiet static analyzer x-hook.c:96:9: warning: Called function pointer is an uninitalized pointer value (*fun[i])(arg, data[i]); ^~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit f79af1941776fd6f1ec26c50603fcc35ca7d514b Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:41:18 2013 -0800 XQuartz: Mark applicationWillTerminate: noreturn X11Controller.m:938:1: warning: method 'applicationWillTerminate:' could be declared with attribute 'noreturn' [-Wmissing-noreturn,Semantic Issue] { ^ Signed-off-by: Jeremy Huddleston Sequoia commit ea80279e292e59a9fe9651489f03e9f2f39810d9 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:36:51 2013 -0800 XQuartz: Fix get_proc_address signature indirect.c:675:28: warning: incompatible pointer types passing 'glx_gpa_proc (*)(const char *)' to parameter of type 'glx_gpa_proc' (aka 'glx_func_ptr (*)(const char *)') [-Wincompatible-pointer-types,Semantic Issue] __glXsetGetProcAddress(&get_proc_address); ^~~~~~~~~~~~~~~~~ ../../../glx/glxserver.h:122:42: note: passing argument to parameter 'get_proc_address' here [Semantic Issue] void __glXsetGetProcAddress(glx_gpa_proc get_proc_address); ^ Signed-off-by: Jeremy Huddleston Sequoia commit 2e3ebec9520719a8e5c3c92390e83bcb5216f978 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:31:23 2013 -0800 XQuartz: Fix darwinfb.h header guard ./darwinfb.h:28:9: warning: '_DARWIN_FB_H' is used as a header guard here, followed by #define of a different macro [-Wheader-guard,Lexical or Preprocessor Issue] ^~~~~~~~~~~~ ./darwinfb.h:29:9: note: '_DARWIN_DB_H' is defined here; did you mean '_DARWIN_FB_H'? [Lexical or Preprocessor Issue] ^~~~~~~~~~~~ _DARWIN_FB_H Signed-off-by: Jeremy Huddleston Sequoia commit 9da6c0918f40359f28fe8889d5b7cae7efcc8377 Author: Jeremy Huddleston Sequoia Date: Sun Dec 29 12:22:55 2013 -0800 XQuartz: Silence some static analyzer warnings by annotating referencing counts Signed-off-by: Jeremy Huddleston Sequoia commit 2d2d49dab5c5718989de97d7227aac793479745e Author: Keith Packard Date: Sun Dec 29 15:18:28 2013 -0800 Clean up a few function prototypes to not place formals in /**/ This just removes the comment markers from around the formals in several function prototypes near where pointer -> void * changes were made. There are plenty more of these to fix. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 60014a4a98ff924ae7f6840781f768c1cc93bbab Author: Keith Packard Date: Sun Dec 15 01:05:51 2013 -0800 Replace 'pointer' type with 'void *' This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer' is used throughout the X server for other things, and having duplicate names generates compiler warnings. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt commit 93fa64e17d7bd600ebf18ecab85f5b2d17fe30ce Author: Keith Packard Date: Wed Dec 11 12:18:49 2013 -0800 Don't build dmx by default It's clearly un-loved, having piles and piles of warnings. If someone wants to fix it up to compile without warnings, we can re-enable it. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 319dff750f99a28a1544bcb81d52172c641ad1ca Author: Keith Packard Date: Wed Dec 11 12:18:16 2013 -0800 hw/xfree86: nobus.c shouldn't define a static function Having this function be static generates a compiler warning. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7915791bac3ff609e94f355fbb637d7c570a5b32 Author: Keith Packard Date: Wed Dec 11 12:17:45 2013 -0800 kdrive/ephyr; Don't redeclare monitorResolution It's already declared in globals.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit aa47a4409660634d80c3423ad49b70ca929a8756 Author: Keith Packard Date: Wed Dec 11 12:16:51 2013 -0800 kdrive/ephyr: ddxUseMsg is supposed to return I'm not sure why ephyr thinks that ddxUseMsg shouldn't return, but it's not declared to exit. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 86d68825c2b75ea9e10954fec00b44b33b38d8b2 Author: Keith Packard Date: Wed Dec 11 11:55:01 2013 -0800 vfb: Remove unused pXWDCmap variable Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7353ec7cb6fc235b03e59e35425201429c83ee72 Author: Keith Packard Date: Wed Dec 11 11:32:19 2013 -0800 xfree86: Switch int10 code to stdint types CARD32 is not type compatible with uint32_t and ends up generating a pile of warnings. Fix this by replacing all of the CARD* types with stdint types. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 93b15b1a47eb414338e8b229f25f11bdca099471 Author: Keith Packard Date: Wed Dec 11 11:31:46 2013 -0800 xfree86: Don't complain when the SDK dependency file doesn't exist yet It won't exist until the build is complete, so don't complain about it Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit eda935627116dd106b99dbcc95d90a723a2de330 Author: Keith Packard Date: Sat Nov 16 23:35:21 2013 -0800 xkb: Make XkbWriteCountedString take a const char * input parameter Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d0339a5c66846c9f14e3b584e34688520a0916ab Author: Keith Packard Date: Sat Nov 16 23:34:59 2013 -0800 os: xstrtokenize takes and returns const char * now Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c608560dbbac18837cb00ef0d774a66ea7706534 Author: Keith Packard Date: Sat Nov 16 23:33:59 2013 -0800 xfree86/vbe: Make VBEValidateModes take const char ** mode names are now const Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3835e8b0a1cc7b1e971bcc3f9453422fec014b10 Author: Keith Packard Date: Sat Nov 16 23:33:18 2013 -0800 xfree86/shadowfb: GCFuncs and GCOps are now const Change GC private to match and fix resulting warnings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit f71de60355cc76810657f40c7b5461af86b34bf7 Author: Keith Packard Date: Sat Nov 16 23:32:40 2013 -0800 xfree86/parser: make strings in xf86MatchGroup const and fix resulting warnings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2a93e75ff81b095bc9cdb80906e23ec705d52df5 Author: Keith Packard Date: Sat Nov 16 23:31:55 2013 -0800 xfree86/int10: mark printk as _X_ATTRIBUTE_PRINTF Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7fe436a7b786ff02ed55cf9ed65edfd2fe07ac22 Author: Keith Packard Date: Sat Nov 16 23:31:06 2013 -0800 xfree86/fbdevhw: Fix warnings Unused fPtr variable. Deal with string constants. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6990de00eb23478d9343660ad3981fb1d33f8be4 Author: Keith Packard Date: Sat Nov 16 23:30:29 2013 -0800 xfree86/exa: xf86GetOptValString returns const char * now fix exaDDXDriverInit to match. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 017307f0b41476c3c73a9414a7ce9eb42373c3f4 Author: Keith Packard Date: Sat Nov 16 23:29:30 2013 -0800 xfree86/dri: Mark DRIDrvMsg and dri_drm_debug_print _X_ATTRIBUTE_PRINTF And fix resulting warnings. v2: (Adam Jackson) Cast handles through uintptr_t to avoid size change warnings Signed-off-by: Keith Packard Reviewed-by: Ian Romanick Reviewed-by: Adam Jackson commit 22592855e90d23013ba7f9e945d567725cb44bf3 Author: Keith Packard Date: Sat Nov 16 23:28:48 2013 -0800 xfree86/common: handle string constants in xf86Xinput configuration Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 3a163d2af48a7cf8fd5c2db6ac68166a5fdbeb8d Author: Keith Packard Date: Sat Nov 16 23:28:16 2013 -0800 xfree86/common: Const GC funcs and ops in xf86VAarbiter Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8a9aa44a45377d8953d11a0b035c86eb139283ba Author: Keith Packard Date: Sat Nov 16 23:26:19 2013 -0800 xfree86/config: Kludge around const strings defaultFontPath is now a const char * so that it can be initialized from a string constant. This patch kludges around that by inserting suitable casts to eliminate warnings. Fixing this 'correctly' would involve inserting some new variables and conditionals to use them. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 86647e7279163b13492d39ecb9c44414b752a61e Author: Keith Packard Date: Sat Nov 16 23:25:50 2013 -0800 config/udev: handle const strings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b7633c6ff2c273621df6c0fac9c269f8ab217a46 Author: Keith Packard Date: Sat Nov 16 23:24:03 2013 -0800 composite: Remove unused pScreen variables Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5bc5684d4cb4905cd82fe1c036cc8a48c3c4868f Author: Keith Packard Date: Fri Nov 15 06:02:05 2013 -0800 test: Warning cleanup const char in test/xfree86.c. Cast values to (intmax_t) for %ju format in test/signal-logging.c. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fecc7eb1cf66db64728ee2d68cd9443df7e70879 Author: Keith Packard Date: Fri Nov 15 06:00:44 2013 -0800 xi: More warning cleanup for input Lots more const char stuff. Remove duplicate defs of CoreKeyboardProc and CorePointerProc from test/xi2/protocol-common.c Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit af04cf6968b16cc9efd17905471047e7de62058a Author: Keith Packard Date: Fri Nov 15 05:55:38 2013 -0800 Xext: Clean up warnings in hashtable code Make keys const void * Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 00438c9f943b219ba33055969ae7f9ba07214b2a Author: Keith Packard Date: Fri Nov 15 05:41:54 2013 -0800 exa: Clean up warnings Declare GC ops/funcs as const. Use 'typeof' in the 'swap' macro to capture the right type. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6e51645b4796fc3a02206fefd416b84beb2fcdf7 Author: Keith Packard Date: Fri Nov 15 05:28:47 2013 -0800 xkb: Clean up warnings Add const to lots of strings. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit abce3206cbc82f632abae5344e0ce46622e00f24 Author: Keith Packard Date: Fri Nov 15 05:19:24 2013 -0800 os: Clean up warnings Just const char stuff. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a1cb69dc28fdbfbdfaf954e0bec221f759462399 Author: Keith Packard Date: Fri Nov 15 22:05:44 2013 +0900 Xext: Clean up warnings GC funcs and ops are const. Remove unused variables. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2f6e8eb70d527541178433933d6230466421bd15 Author: Keith Packard Date: Fri Nov 15 22:02:58 2013 +0900 damage: Clean up warnings GC funcs and ops are const now, so all wrappers need to declare them as such. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c706fb0db86d6946482700d65ad6803c4daaa6f9 Author: Keith Packard Date: Fri Nov 15 22:00:29 2013 +0900 Clean up warnings in mi. A coupel of unused variables, and some debug code with mis-matching printf format and variable types. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d89b42bda46d36fc0879611cc3b3566957ce36d0 Author: Keith Packard Date: Fri Nov 15 21:57:05 2013 +0900 Clean up warnings in DIX As usual, mostly const char changes. However, filter_device_events had a potentially uninitialized value, 'raw', which I added a bunch of checks for. I suspect most of those are 'can't happen', but it's hard to see that inside the function. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d6da9f23cca562fc0c6ae398665ab7fa770a4fa8 Author: Keith Packard Date: Fri Nov 15 18:07:54 2013 +0900 hw/xfree86: More const declarations for strings Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 644725ac5e28a00d8c24372f55ae7e7e2fe0cb2e Author: Keith Packard Date: Fri Nov 15 18:06:37 2013 +0900 Just remove dpms functsion from xf86.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c85e26d59901fbf8c7a437cf934b51fa64160073 Author: Keith Packard Date: Fri Nov 15 17:55:15 2013 +0900 Bunch of DMX warning fixes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 493d992501b586d95823e045d1dc994bd6c00d27 Author: Keith Packard Date: Fri Nov 15 17:43:46 2013 +0900 More warning fixes in hw/xfree86 Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit c78be3a4b714deb7ad75cacd54042ca1b51d6261 Author: Keith Packard Date: Fri Nov 15 17:36:26 2013 +0900 xfree86 warning reduction This gets the easy warnings, mostly constant string problems. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 1ce15ed5bae60a184c6bd9440e3c017488a5f415 Author: Keith Packard Date: Sat Nov 16 23:44:51 2013 -0800 Xext: _X_EXPORT DPMSSet and DPMSSupported These are needed by drivers, and it's better to export them from here rather than redefining them in hw/xfree86 and exporting them from there. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 1f407763be28745f18d224077d6b07b9431ee16b Author: Keith Packard Date: Sat Nov 16 23:43:49 2013 -0800 include: Make xkbrules structures all const char * This lets them be initialized with string constants Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e1e01d2e33c632e395d7e396f73fba8ae606b15a Author: Keith Packard Date: Fri Nov 15 16:56:15 2013 +0900 xfree86/common: Warning fixes. Mostly const string handling. Also removes DPMS functiosn from Xext/dpmsproc.h Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 27b44949a3d2e34ac10e801bd8a8fc2c28791e7e Author: Keith Packard Date: Fri Nov 15 16:24:15 2013 +0900 hw/xfree86: Lots of constant string support Make lots of string pointers 'const char' so that we can use constant strings with them without eliciting warnings. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 6f77e2645ea36e324ccc664aae1d36464418bdea Author: Keith Packard Date: Fri Nov 15 13:40:30 2013 +0900 hw/xfree86: Make strings in DriverRec and ScrnInfoRec const This avoids compiler warnings when initializing with string constants. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson commit e81902872176fa9848211fcd7a5eafa4f861a1b7 Author: Peter Hutterer Date: Thu Jan 9 15:29:23 2014 +1000 ephyr: don't allow a shift+ctrl keygrab if mod1 was enabled Xephyr wants ctrl+shift to grab the window, but that conflicts with ctrl+alt+shift key combos. Remember the modifier state on key presses and releases, if mod1 is pressed, we need ctrl, shift and mod1 released before we allow a shift-ctrl grab activation. Signed-off-by: Peter Hutterer commit b2d5ee2e3684951b611fd2068d57cc65fd8305a3 Author: Carlos Garnacho Date: Thu Jan 2 21:33:30 2014 +0100 Xi: Ensure DeviceChanged is emitted after grabs are deactivated When a grab on a slave device is deactivated, the master device must be checked, just in case there were events from other devices while the slave device was stolen away by the passive grab. This may introduce misbehaviors on mismatching valuators and device features later on UpdateDeviceState(). Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 863d2ad5c02cccde9a4d1a392a7cae78d001c8a9 Author: Alan Coopersmith Date: Mon Jan 6 17:10:40 2014 -0800 CheckPassiveGrabsOnWindow() needs to handle NULL return value from AllocGrab() CheckPassiveGrabsOnWindow() calls AllocGrab() which can fail and return NULL. This return value is not checked, and can cause NULL pointer dereferences. Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 5493a67ec256d22a8a41597a345d8e1c54d6e335 Author: Alan Coopersmith Date: Mon Jan 6 17:10:39 2014 -0800 GrabDevice() needs to handle NULL return value from AllocGrab() GrabDevice() calls AllocGrab() which can fail and return NULL. This return value is not checked, and can cause NULL pointer dereferences. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 3a113815a0cc86d64789494e905da9778174f738 Author: Alan Coopersmith Date: Mon Jan 6 17:10:38 2014 -0800 If AllocGrab() fails to set up grab, don't copy to a NULL grab If either the initial calloc or the xi2mask_new fails, grab is NULL, but if a src grab is passed in, it was always being written to by CopyGrab (and if that failed, dereferenced again in teardown). Signed-off-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit a92c6406e7f6c0b74fb1cb9361ad904facc0f722 Author: Keith Packard Date: Thu Jan 9 11:10:11 2014 +0800 Bump release to 1.15.99.900 The merge window for 1.16 is open Signed-off-by: Keith Packard commit d6c8d7509727060b8e2358b9ed1c0e17b2ec3401 Author: Damien Lespiau Date: Wed Jul 31 19:16:45 2013 +0100 xfree86: Use the TMDS maximum frequency to prune modes Instead of only relying on the Range section, we can do better on HDMI to find out what is the max dot clock the monitor supports. The HDMI CEA vendor block adds a TMDS max freq we can use. This makes X not prune 4k resolutions on HDMI. v2: Replace X_INFO by X_PROBED in the message that prints the max TMDS frequency (Chris Wilson) Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit 95c2287465138ac251bf792f354cee3626e76b44 Author: Damien Lespiau Date: Wed Aug 7 15:16:21 2013 +0100 xfree86: Refactor xf86MonitorIsHDMI() using xf86MonitorFindHDMIBlock() Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit a279fb3ff3f3cfc41530aff1d9ff5620279348f6 Author: Damien Lespiau Date: Wed Jul 31 19:11:45 2013 +0100 xfree86: Add a xf86MonitorFindHDMIBlock() The HDMI CEA vendor specific block has some interesting information, such as the maximum TMDS dot clock. v2: Don't parse CEA blocks with invalid offsets, remove spurious brackets (Chris Wilson) v3: Fix the looping through the CEA data blocks, it had a typo using the wrong variable coming from the code it was ported from. Replace x << 16 + y << 8 + z by x << 16 | y << 8 | z (Chris Wilson) v4: Remove the stray ';' at the end of "if (*end == 0)". (Dominik Behr on IRC) Reviewed-by: Chris Wilson Signed-off-by: Damien Lespiau commit 295d41fa2aa97b74c1b9ffd7ef4ccf52f3e97dde Author: Eric Anholt Date: Mon Dec 16 10:52:19 2013 -0800 glx: unifdef swrast dri_interface.h values from Mesa 7.1. We can't remove all the ifdefs (__DRI_TEX_BUFFER_VERSION) because configure.ac is only checking for that version of Mesa in the absence of dri2. Reviewed-by: Ian Romanick commit 4ab1a2797ba366179f8a2e621334dd45df2a5a65 Author: Eric Anholt Date: Tue Nov 5 11:41:06 2013 -0800 glx: unifdef for DRI2 dri_interface.h things in mesa 9.2. Thanks to configure.ac's check, we know that we have a new enough dri_interface.h that we don't need to conditionalize all this code. Reviewed-by: Ian Romanick commit 2ea973e12f5d954211e1d10085a4c74581b43aca Author: Keith Packard Date: Fri Dec 27 09:50:55 2013 -0800 Bump version to 1.15.0 Signed-off-by: Keith Packard commit 2eb9915eea358f941702d3dad7434197991885c5 Author: Keith Packard Date: Thu Dec 12 15:48:08 2013 -0800 present: Set complete notify mode to Skip as needed Skipped present pixmap calls were not setting the mode to PresentCompleteModeSkip for skipped operations. Signed-off-by: Keith Packard commit e487babd525ef1bd016ec7b283fa08cf9e6c6f4f Author: Keith Packard Date: Thu Dec 12 14:52:35 2013 -0800 present: Don't abandon presents which are already queued for flip Presents which are not marked 'queued' and are in the window present list are waiting for the flip event; discarding those won't work very well (it'll end up trashing displayed content for the next frame), so skip over those when looking for duplicate frame presents Signed-off-by: Keith Packard commit ca3a5b2a8f9f627bbaa9883e16512a21c2a0b81d Author: Keith Packard Date: Thu Dec 12 14:17:40 2013 -0800 present: Handle PresentOptionAsync for copy mode Check for Async flag and execute immediately if set, otherwise wait for the next appropriate vblank before copying. Signed-off-by: Keith Packard commit a68df147421da21528b5be2d34678383922fa352 Author: Keith Packard Date: Thu Dec 19 14:31:07 2013 -0800 Bump version to 1.14.99.905 (1.15 RC5) Another week, another RC. This should be the last before 1.15 final Signed-off-by: Keith Packard commit 4b1ead9d3400acc3402c2480d7cc0527750c32f0 Merge: 4d6264614 929795d50 Author: Keith Packard Date: Thu Dec 19 14:14:59 2013 -0800 Merge remote-tracking branch 'whot/for-keith' commit 4dd62d7807b47efbc9065ae8f17f73e1ec6e9d26 Author: Gaetan Nadon Date: Tue Dec 10 11:13:32 2013 -0500 libglamoregl: remove -I$(top_srcdir)/src Automake always provide -I. It is at the beginning of the list of compiler options. Not needed either to find glamor_egl.c source. Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit 08c23ff8aefe80f2940ecb90adda27156084f57c Author: Gaetan Nadon Date: Tue Dec 10 11:13:31 2013 -0500 Make: remove cruft copied over from the X server makefiles In toplevel makefile: nostdinc: only xserver, no other X modules aclocaldir: no local macros to install xkb_path: xserver only "Gross hack": xserver only In src/makefile: SOLARIS_ASM_CFLAGS; server only XORG_INCS: undefined variable DIX_CFLAGS: undefined variable Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit b8055bd1f6c9dea0fe8f7a786d2a1522f5f32129 Author: Dave Airlie Date: Fri Dec 13 11:33:46 2013 +1000 glamor: fix leak in xv code. This loop needed to go one higher, not sure if this fixes the leak MrCooper was seeing on irc, but it fixes a leak. Signed-off-by: Dave Airlie Reviewed-by: Michel Dänzer Reviewed-by: Zhigang Gong commit 752a79562eb13f59fa54b4181d65367c8488c0a5 Author: Gaetan Nadon Date: Sun Dec 8 16:43:08 2013 -0500 Fix glamor_egl->egl_create_image_khr makes pointer from integer This is a warning, but a real problem can occur on some system. Reported-by: Fabio Pedretti Reviewed-by: Axel Davy Signed-off-by: Gaetan Nadon Reviewed-by: Zhigang Gong commit 7cfd9cc23270c0246d584e167fe14bf5af4571df Author: Axel Davy Date: Thu Dec 5 08:49:15 2013 +0100 Add DRI3 support to glamor This implements some DRI3 helpers to help the DDXs using glamor to support DRI3. Signed-off-by: Axel Davy Reviewed-by: Zhigang Gong commit 06ba3fdfd6162a64c149ea6fda85f9f56d7f3c31 Author: Zhigang Gong Date: Tue Nov 19 15:16:57 2013 +0800 Fixed some compilation warning/error or error checking. There is one compilation error ,cast int to pointer, when built without libgbm, reported by Gaetan Nadon. And some error checking after memory allocation, reported by Seth Arnold. There are still some similar issues in the largepixmap implementation. They are relatively more complicate due to the heavy usage of RegionXXX APIs which may allocate implicitly. Will fix them in the future. Signed-off-by: Zhigang Gong Tested-by: Gaetan Nadon commit a5321ea431376feca2dcd55cf04925dc492270fc Author: Axel Davy Date: Mon Nov 18 22:52:22 2013 +0100 Allow to create textured pixmaps from gbm_bo without using gem names This implements glamor_egl_create_textured_pixmap_from_gbm_bo, which is similar to glamor_egl_create_textured_pixmap, except it takes a gbm_bo as argument. Signed-off-by: Axel Davy Reviewed-by: Zhigang Gong commit 403004fe799f293bf299fe78da821635b19d9a1a Author: Fabio Pedretti Date: Mon Nov 4 12:08:42 2013 +0100 glamor: remove unused variable Reviewed-by: Zhigang Gong commit 842cd7eb4353492bc9c29439f975c3bd33445cbd Author: Maarten Lankhorst Date: Wed Nov 6 10:25:27 2013 +0100 fixup picture in SetWindowPixmap When creating a window with recordmydesktop running, the following may happen: create picture 0x1cd457e0, with drawable 0x1327d1f0 (SetWindowPixmap is called) destroy picture 0x1cd457e0, with drawable 0x1cd65820 Obtaining format for pixmap 0x1327d1f0 and picture 0x1cd457e0 ==7989== Invalid read of size 4 ==7989== at 0x8CAA0CA: glamor_get_tex_format_type_from_pixmap (glamor_utils.h:1252) ==7989== by 0x8CAD1B7: glamor_download_sub_pixmap_to_cpu (glamor_pixmap.c:1074) ==7989== by 0x8CA8BB7: _glamor_get_image (glamor_getimage.c:66) ==7989== by 0x8CA8D2F: glamor_get_image (glamor_getimage.c:92) ==7989== by 0x29AEF2: miSpriteGetImage (misprite.c:413) ==7989== by 0x1E7674: compGetImage (compinit.c:148) ==7989== by 0x1F5E5B: ProcShmGetImage (shm.c:684) ==7989== by 0x1F686F: ProcShmDispatch (shm.c:1121) ==7989== by 0x15D00D: Dispatch (dispatch.c:432) ==7989== by 0x14C569: main (main.c:298) ==7989== Address 0x1cd457f0 is 16 bytes inside a block of size 120 free'd ==7989== at 0x4C2B60C: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==7989== by 0x228897: FreePicture (picture.c:1477) ==7989== by 0x228B23: PictureDestroyWindow (picture.c:73) ==7989== by 0x234C19: damageDestroyWindow (damage.c:1646) ==7989== by 0x1E92C0: compDestroyWindow (compwindow.c:590) ==7989== by 0x20FF85: DbeDestroyWindow (dbe.c:1389) ==7989== by 0x185D46: FreeWindowResources (window.c:907) ==7989== by 0x1889A7: DeleteWindow (window.c:975) ==7989== by 0x17EBF1: doFreeResource (resource.c:873) ==7989== by 0x17FC1B: FreeClientResources (resource.c:1139) ==7989== by 0x15C4DE: CloseDownClient (dispatch.c:3402) ==7989== by 0x2AB843: CheckConnections (connection.c:1008) ==7989== (II) fail to get matched format for dfdfdfdf The fix is to update the picture pointer when the window pixmap is changed, so it moves the picture around with the window rather than the pixmap. This makes FreePicture work correctly. Signed-off-by: Maarten Lankhorst Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71088 Reviewed-by: Zhigang Gong commit 2925db6616944c8d1e911caee0637a00e5586576 Author: Zhigang Gong Date: Sat Nov 2 00:08:11 2013 +0800 Fixed an incorrect printf format. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=69573 Signed-off-by: Zhigang Gong commit 644e05562e401f192c93964be06c33fe92099089 Author: Brian Paul Date: Sat Oct 19 16:10:54 2013 -0600 Remove useless return statement Reviewed-by: Zhigang Gong commit 8c51eb8239247c98057eb9daf06c905a1dc0588c Author: Brian Paul Date: Sat Oct 19 16:10:53 2013 -0600 Remove redundant dispatch->glEnable(GL_TEXTURE_2D) The same call was already made a few lines earlier. Reviewed-by: Zhigang Gong commit 3bf1eb577e2d2b4d55d38b5a0043b0efb9abb385 Author: Brian Paul Date: Sat Oct 19 16:10:52 2013 -0600 Fix _glamor_set_spans() bug (re-used 'n' variable) n was used as a function parameter. But inside the for (i=1..n) loop, n got reassigned as REGION_NUM_RECTS() and then decremented to zero by the while loop. This caused the for loop to only iterate once instead of 'n' times. This patch renames the n parameter to numPoints. Found by code inspection. Untested. Reviewed-by: Zhigang Gong commit 2f62bd46cc002af57f8fe3246b9aea9e0c0bbcc9 Author: Grigori Goronzy Date: Wed Oct 2 00:37:57 2013 +0200 glamor_render: fix PictFilters Add Fast/Good/Best and appropriately map to Nearest and Bilinear. Additionally, add a fallback path for unsupported filters. Notably, this fixes window shadow rendering with Compiz, which uses PictFilterConvolution for some odd reason. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 5695708ecd2a26fcb9c05985c6758e719071995a Author: Grigori Goronzy Date: Wed Oct 2 00:37:56 2013 +0200 Use GL_STATIC_DRAW for element index buffer The buffer never changes anyway. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 8afa008ec4b393666bb3c506a711b4d50cc4e756 Author: Grigori Goronzy Date: Wed Oct 2 00:37:55 2013 +0200 Use glDrawRangeElements instead of glDrawElements This lets us explicitly specify the range of vertices that are used, which the OpenGL driver can use for optimization. Particularly, it results in lower CPU overhead with Mesa-based drivers. Reviewed-by: Alex Deucher Reviewed-by: Zhigang Gong commit 229601e080aefad21927c1449cd520733317858b Author: Zhigang Gong Date: Fri Sep 27 05:25:54 2013 +0800 Shoud return null subpixmap if we fail to get a valid map address. The patch is prepared by Raul Fernandes. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86693 Signed-off-by: Zhigang Gong commit e3d1d4e3caaab8076eba89b58d037d24e203e506 Author: Dave Airlie Date: Mon Sep 23 06:42:24 2013 +0100 glamor: add initial Xv support This does YV12 and I420 for now, not sure if we can do packed without a GL extension. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 39e95cd0f50cf471d8220d5428788d5be6a59d3f Author: Michel Dänzer Date: Fri Sep 20 10:41:10 2013 +0200 Reset traps_count and ptrap when necessary for the next trapezoid cliprect Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64912 Signed-off-by: Michel Dänzer Reviewed-by: He Junyan Reviewed-by: Zhigang Gong commit 61fca4342a65be2dbc7f890f2e67da56a50db978 Author: Michel Dänzer Date: Tue Sep 17 13:25:02 2013 +0200 Fix RegionContainsRect test for PutImage The return value of RegionContainsRect() is not a boolean but an enum indicating that the region contains the rectangle completely, partially or not at all. We can only take the PutImage fastpath when the region contatins the rectangle completely. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65964 Signed-off-by: Michel Dänzer Reviewed-by: Zhigang Gong commit 2ea618f2cf906fec9807b321f9e8ef3a4706c708 Author: Christian König Date: Mon Aug 26 14:57:47 2013 +0800 Use GBM_LIBS and GBM_CFLAGS Signed-off-by: Christian König Reviewed-by: Michel Dänzer commit 7e818f7d39cfef2701fe9cf95c7854ee8c9f3be6 Author: Armin K Date: Wed Mar 13 18:49:32 2013 +0100 First attempt to make libglamor.so shared versioned library As recommended by Michel in this thread reply: http://lists.freedesktop.org/archives/glamor/2013-March/000305.html v2: Correct shared library location in glamor.pc.in Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62259 Reviewed-by: Michel Dänzer commit b0318b6de7a2f8c5d9e75b55211dcc0b12f811fc Author: Armin K Date: Wed Mar 13 18:28:58 2013 +0100 Properly dist necesary headers Reviewed-by: Michel Dänzer commit fc179bb863778c03288bebaa258358ccbdb6aa0c Author: Armin K Date: Wed Mar 13 18:28:57 2013 +0100 Silence Automake 1.13 warnings warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Reviewed-by: Michel Dänzer commit 97416e3f144606728a963aa2a337b1283e156ad2 Author: Michel Dänzer Date: Wed Mar 13 17:15:33 2013 +0100 glamoregl: Use xf86ScreenToScrn() Fixes crashes when glamor is used for a GPU screen with xserver 1.13 or newer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57200#c17 Signed-off-by: Michel Dänzer Reviewed-by: Chris Wilson commit 4c5bfd529f6f182a3f0ac1b9bb5c3170a297f460 Author: Dave Airlie Date: Sat Dec 29 06:42:30 2012 +0000 glamor_utils: fix unlikely define use using a define across a split line expression is failure, compiling with warnings shows this up. Signed-off-by: Dave Airlie commit 6b954880c25af353dd4679cfdad6664b107d4df6 Author: Dave Airlie Date: Sat Dec 29 06:42:10 2012 +0000 glamor: add compiler.h This is also required for distchecking. Signed-off-by: Dave Airlie commit efbdc9e90f36494b07508aeaba40c9eb01eab398 Author: Dave Airlie Date: Sat Dec 29 06:28:17 2012 +0000 glamor: fix make distcheck part 1 This just adds the headers, then it falls over on the sdk_HEADERS as it overrides proper install paths by the looks of it. Signed-off-by: Dave Airlie commit 80f5e21daeed79654d6e1976f2766eb528f01d47 Author: Zhigang Gong Date: Tue Nov 13 10:08:02 2012 +0800 glamor_compositerects: Need to initialize region before fallback. As we need to call DamageRegionAppend even for fallback path, we must initialize the region before do that. Pointed by Igor Vagulin. https://bugs.freedesktop.org/show_bug.cgi?id=56940 Signed-off-by: Zhigang Gong commit 14e02f5132d7b4f50c8d9f8e5c6a0f285a3f3c14 Author: Michel Dänzer Date: Wed Oct 31 16:56:00 2012 +0100 Don't use glBlitFramebufferEXT for overlapping copies. According to the GL_EXT_framebuffer_blit spec, the result of doing so is undefined. But we need well-defined results. :) Signed-off-by: Michel Dänzer commit e846f48f489e33e270db682b1b6c8e6f03fdf313 Author: Zhigang Gong Date: Wed Aug 8 20:43:38 2012 +0800 Increase vbo size to 64K verts. This commit will benefit vertex stressing cases such as aa10text/rgb10text, and can get about 15% performance gain. Signed-off-by: Zhigang Gong Acked-by: Junyan commit b8f0a2188295f6cc2c997b6639b6928323eae617 Author: Zhigang Gong Date: Wed Aug 8 20:11:43 2012 +0800 Silence compilation warnings. After increase to gcc4.7, it reports more warnings, now fix them. Signed-off-by: Zhigang Gong Tested-by: Junyan He commit 50614451adafc816ae5ffbe9c2a97a58f493b927 Author: Zhigang Gong Date: Wed Aug 8 20:08:12 2012 +0800 glamor_largepixmap: Fixed a bug in repeat clipping. If the repeat direction only has one block, then we need to set the dx/dy to cover all the extent. This commit also silence some compilation warnings. Signed-off-by: Zhigang Gong commit 7eb434918bd7d58162c53fac9316aceda136cb6f Author: Michel Dänzer Date: Tue Aug 7 18:16:58 2012 +0200 Prefer KHR_surfaceless_context EGL extension over KHR_surfaceless_opengl/gles2. Current Mesa Git only advertises the former instead of the latter. Signed-off-by: Michel Dänzer Signed-off-by: Zhigang Gong commit 59653fa08a67a0694b3408407f5f92af99470739 Author: Michel Dänzer Date: Tue Aug 7 18:13:32 2012 +0200 Print space between name of missing EGL extension and 'required'. Signed-off-by: Michel Dänzer Signed-off-by: Zhigang Gong commit c3096c5a568c9c7b5f8a68ca882d866b8fb8e3ad Author: Junyan He Date: Tue Aug 7 05:01:59 2012 +0800 Fallback to pixman when trapezoid mask is big. The trapezoid generating speed of the shader is relatively slower when the trapezoid area is big. We fallback when the trapezoid's width and height is bigger enough. The big traps number will also slow down the render because of the VBO size. We fallback if ntrap > 256 Signed-off-by: Junyan He Reviewed-By: Zhigang Gong commit f62f4d53ef91ba05cc9456b1468cd1b24252454f Author: Zhigang Gong Date: Thu Aug 2 18:07:07 2012 +0800 glamor_glyphs: When dst arg point to a NULL buffer, dont't flush. This is a corner case, when we render glyphs via mask cache, and when we need to upload new glyphs cache, we need to flush both the mask and dest buffer. But we the dest arg may point to a NULL buffer at that time, we need to check it firstly. If the dest buffer is NULL. Then we don't need to flush both the dest and mask buffer. This commit fix a potential crash. Signed-off-by: Zhigang Gong commit e7af7cb76dade31b9e40cede7ac21d32bc95831c Author: Zhigang Gong Date: Wed Aug 1 18:27:29 2012 +0800 glamor_trapezoid: workaround a glsl like problem. It seems that the following statement cann't run as expected on SNB. bool trap_left_vertical = (abs(trap_left_vertical_f - 1.0) <= 0.0001); Have to rewrite it to another style to let the vertical edge trapezoid to be rendered correctly. Reviewed-by: Junyan He Signed-off-by: Zhigang Gong commit 5512c14e346a988f6eb8cdf9385a868ef705450c Author: Junyan He Date: Fri Jul 20 05:52:57 2012 +0800 Fix the problem of VBO leak. In some cases we allocate the VBO but have no vertex to emit, which cause the VBO fail to be released. Fix it. Signed-off-by: Junyan He commit 9f78e22fa62d8f1a08d6a0688e2eafba35206a3b Author: Junyan He Date: Fri Jul 20 05:52:50 2012 +0800 Just use the shader to generate trapezoid if PolyMode == Imprecise The precise mode of trapezoid rendering need to sample the trapezoid on the centre points of an (2*n+1)x(2*n-1) subpixel grid. It is computationally expensive in shader, and we use inside area ratio to replace it. The result has some difference, and we just use it if the polymode == Imprecise. Signed-off-by: Junyan He commit fe024a78220a6d61c6b1df89166da953b19b633a Author: Junyan He Date: Fri Jul 20 05:52:43 2012 +0800 Change the trapezoid render to use VBO. Because some uniform variables need to be set for every trapezoid rendering, we can not use vbo to render multi trapezoids one time, which have performance big loss. We now add attributes which contain the same value to bypass the uniform variable problem. The uniform value for one trapezoid will be set to the same value to all the vertex of that trapezoid as an attribute, then in FS, it is still a constant. Signed-off-by: Junyan He commit 9dff3378e5c39b346985924f9ab6291069cc7b6e Author: Zhigang Gong Date: Mon Jul 16 17:27:22 2012 +0800 Added the missed header file for xorg 1.13 compat. Signed-off-by: Zhigang Gong commit bc1b412b3b0bb716702ec89ae512f2b5ec62c17a Author: Zhigang Gong Date: Mon Jul 16 11:25:09 2012 +0800 Synch with xorg 1.13 change. As xorg 1.13 change the scrn interaces and remove those global arrays. Some API change cause we can't build. Now fix it. Signed-off-by: Zhigang Gong commit 4c27ca4700e4ba4ae19d77377a7776eb32f74647 Author: Zhigang Gong Date: Fri Jul 13 09:20:02 2012 +0800 gles2: Fixed the compilation problem and some bugs. Previous patch doesn't set the offset to zero for GLESv2 path. Now fix it. This patch also fix a minor problem in pixmap uploading preparation. If the revert is not REVERT_NORMAL, then we don't need to prepare a fbo for it. As current mesa i965 gles2 driver doesn't support to set a A8 texture as a fbo target, we must fix this problem. As some A1/A8 picture need to be uploaded, this is the only place a A8 texture may be attached to a fbo. This patch also enable the shader gradient for GLESv2. The reason we disable it before is that some glsl linker doesn't support link different objects which have cross reference. Now we don't have that problem. Signed-off-by: Zhigang Gong commit 006fe0e66df4b214ca5c50241b3cca22d31161df Author: Michel Dänzer Date: Thu Jul 12 18:57:06 2012 +0800 Stream vertex data to VBOs. Reviewed-by: Chris Wilson Signed-off-by: Zhigang Gong commit 551ca11c77d0524ceb37eb26caf0c25e4d7d806f Author: Michel D=C3=A4nzer Date: Wed Jul 11 15:01:15 2012 +0800 Fix translation of clip region for composite fallback. Fixes incorrectly clipped rendering. E.g. the cursor in Evolution composer windows became invisible. Signed-off-by: Michel Daenzer Signed-off-by: Zhigang Gong commit 88c317fb1e6a9056acab4a76c0ee0bf283e001ce Author: Zhigang Gong Date: Wed Jul 4 17:59:25 2012 +0800 glamor_glyphs: Don't merge extents for different lists. If we merge all lists's extent together, than we may have some fail overlap checking. Here is a simple: A E B F C D The first list has vertical "ABCD". And the second list has two char "EF". When detecting E, it can successfully find it doesn't overlap with previous glyphs. But after that, the original code will merge the previous extent with E's extent, then the extent will cover "F", so when detecting F, it will be treated as overlapped. We can simply solve this issue by not merge extent from different list. We can union different list's extent to a global region. And then do the intersect checkint between that region and current glyph extent, then we can avoid that fail checking. Signed-off-by: Zhigang Gong commit 32a7438bf79573100862ad91c5722d12623a8bf9 Author: Zhigang Gong Date: Tue Jul 3 18:24:07 2012 +0800 glamor_copyarea: Use blitcopy if current state is not render. Practically, for pure 2D blit, the blit copy is much faster than textured copy. For the x11perf copywinwin100, it's about 3x faster. But if we have heavy rendering/compositing, then use textured copy will get much better (>30%)performance for most of the cases. So we simply add a data element to track current state. For rendering state we use textured copy, otherwise, we use blit copy. Signed-off-by: Zhigang Gong commit 0706423bcfd7a589bab3b41fe9f13d0b636ecdef Author: Zhigang Gong Date: Tue Jul 3 18:11:12 2012 +0800 glamor_glyphs: Use cache picture to store mask picture if possible. By default, mask picture is newly created, and each time we need to clear the whole mask picture, and then composite glyphs to the mask picture and then composite the mask picture to destination. Testing results shows that the filling of the mask picture takes a big portion of the rendering time. As we don't really need to clear the whole region, we just need to clear the real overlapped region. This commit is to solve this issue. We split a large glyphs list to serval lists and each list is non-overlapped or overlapped. we can reduce the length of overlapped glyphs to do the glyphs_via_mask to 2 or 3 glyphs one time for most cases. Thus it give us a case to allocate a small portion of the corresponding cache directly as the mask picture. Then we can rendering the glyphs to this mask picture, and latter we can accumulate the second steps, composite the mask to the dest with the other non-overlapped glyphs's rendering process. It also make us implement a batch mask cache blocks clearing algorithm to avoid too frequently small region clearing. If there is no any overlapping, this method will not get performance gain. If there is some overlapping, then this algorithm can get about 15% performance gain. Signed-off-by: Zhigang Gong commit 4d1a2173f2e5a200d1535a4a459fffd75cd5f779 Author: Zhigang Gong Date: Wed Jun 27 12:53:40 2012 +0800 glamor_compositerects: Implement optimized version. Don't call miCompositeRects. Use glamor_composite_clipped_region to render those boxes at once. Also add a new function glamor_solid_boxes to fill boxes at once. Signed-off-by: Zhigang Gong commit dd7924339803b51332e3fe94d36eb48549e9d24d Author: Zhigang Gong Date: Tue Jun 26 20:00:21 2012 +0800 optimize: Use likely and unlikely. Signed-off-by: Zhigang Gong commit d5f03ba0109bc50e159c82d3d67cffa8fc174134 Author: Zhigang Gong Date: Tue Jun 26 19:56:27 2012 +0800 create_pixmap: use texture for large glyphs. As we only cache glyphs smaller than 64x64, we need to use texutre for the large glyphs. Signed-off-by: Zhigang Gong commit 90dd6ddbab864aa6c3add55c46a85d7db2c125f6 Author: Zhigang Gong Date: Tue Jun 26 17:19:16 2012 +0800 glamor_copyarea: Fixed a bug introduced by 996194... Default return value should be FALSE. Signed-off-by: Zhigang Gong commit b8dd2a597de455ae985302d1b93d865ef9f37c7b Author: Zhigang Gong Date: Tue Jun 26 16:24:32 2012 +0800 glamor_glyphs: Slightly performance tuning. As glamor_glyphs never fallback, we don't need to keep the underlying glyphs routines, just override the ps->glys Signed-off-by: Zhigang Gong commit 3873d412f018b975feaa000cb7ef337feaeee37d Author: Zhigang Gong Date: Tue Jun 26 15:39:24 2012 +0800 glamor_render: Don't allocate buffer for vbo each time. We can reuse the last one if the last one is big enough to contain current vertext data. In the meantime, Use MapBufferRange instead of MapBuffer. Testing shows, this patch brings some benefit for aa10text/rgb10text. Not too much, but indeed faster. Signed-off-by: Zhigang Gong commit 682f5d2989306856c0c193b0b4abd8c104a9ba92 Author: Zhigang Gong Date: Tue Jun 26 13:09:05 2012 +0800 glamor_largepixmap: Walkaround for large texture's upload. I met a problem with large texture (larger than 7000x7000)'s uploading on SNB platform. The map_gtt get back a mapped VA without error, but write to that virtual address triggers BUS error. This work around is to avoid that direct uploading. Signed-off-by: Zhigang Gong commit 37d4022f01483eefe06b5f12e13ca2ed4003c8f0 Author: Zhigang Gong Date: Mon Jun 25 23:24:37 2012 +0800 glamor_render: Optimize the two pass ca rendering. For the componentAlpha with PictOpOver, we use two pass rendering to implement it. Previous implementation call two times the glamor_composite_... independently which is very inefficient. Now we change the control flow, and do the two pass internally and avoid duplicate works. For the x11perf -rgb10text, this optimization can get about 30% improvement. Signed-off-by: Zhigang Gong commit 21916cf84f0cd9ada8701650d39b5cf67646eaf7 Author: Zhigang Gong Date: Mon Jun 25 16:37:22 2012 +0800 glamor_composite_glyph: Optimize glyphs with non-solid pattern. Signed-off-by: Zhigang Gong commit c1bd50d58d2c7b39e2b5c529bd86fde1ab14d8e6 Author: Zhigang Gong Date: Thu Jun 21 19:30:51 2012 +0800 glamor_glyphs: Detect fake or real glyphs overlap. To split a glyph's extent region to three sub-boxes as below. left box 2 x h center box (w-4) x h right box 2 x h Take a simple glyph A as an example: * __* *__ ***** * * ~~ ~~ The left box and right boxes are both 2 x 2. The center box is 2 x 4. The left box has two bitmaps 0001'b and 0010'b to indicate the real inked area. The right box also has two bitmaps 0010'b and 0001'b. And then we can check the inked area in left and right boxes with previous glyph. If the direction is from left to right, then we need to check the previous right bitmap with current left bitmap. And if we found the center box has overlapped or we overlap with not only the previous glyph, we will treat it as real overlapped and will render the glyphs via mask. If we only intersect with previous glyph on the left/right edge. Then we further compute the real overlapped bits. We set a loose check criteria here, if it has less than two pixel overlapping, we treat it as non-overlapping. With this patch, The aa10text boost fom 1660000 to 320000. Almost double the performance! And the cairo test result is the same as without this patch. Signed-off-by: Zhigang Gong commit ea4c22716ca1544e924c7462db6a2797afebff59 Author: Zhigang Gong Date: Thu Jun 21 19:29:06 2012 +0800 glamor_render: Don't fallback when rendering glyphs with OpOver. Signed-off-by: Zhigang Gong commit 7acbe895618837305cf4050731ccd1cd3bc11589 Author: Zhigang Gong Date: Thu Jun 21 19:27:07 2012 +0800 glamor_create_pixmap: Allocate glyphs pixmap in memory. As we have glyphs atlas cache, we don't need to hold each glyphs on GPU. And for the subsequent optimization, we need to store the original glyphs pixmap on system memory. Signed-off-by: Zhigang Gong commit 1e4fc85a71cc6498a7e11872026062fceb5bbdf1 Author: Zhigang Gong Date: Thu Jun 21 19:26:28 2012 +0800 glamor_fbo: fix a memory leak for large pixmap. Signed-off-by: Zhigang Gong commit 2122e60bf9027b63ddc59c0aa2a441af3687cb3a Author: Junyan He Date: Fri Jun 15 09:00:15 2012 +0800 Fix a bug for trapezoid clip We find in some cases the trapezoid will be render as a triangle and the left edge and right edge will cross with each other just bellow the top or over the bottom. The distance between the cross poind and the top or bottom is less than pixman_fixed_1_minus_e, so after the fixed converted to int, the cross point has the same value with the top or botton and the triangle should not be affected. But in our clip logic, the cross point will be clipped out. So add a logic to fix this problem. Signed-off-by: Junyan He commit 6ed418d17b5143f32b3b415103f3157a1b05e3db Author: Zhigang Gong Date: Fri Jun 15 13:31:30 2012 +0800 gles2_largepixmap: force clip for a non-large pixmap. One case we need force clip when download/upload a drm_texture pixmap. Actually, this is only meaningful for testing purpose. As we may set the max_fbo_size to a very small value, but the drm texture may exceed this value but the drm texture pixmap is not largepixmap. This is not a problem with OpenGL. But for GLES2, we may need to call glamor_es2_pixmap_read_prepare to create a temporary fbo to do the color conversion. Then we have to force clip the drm pixmap here to avoid large pixmap handling at glamor_es2_pixmap_read_prepare. Signed-off-by: Zhigang Gong commit c41d5c79e7d8772be38b77122817fb872f2d721d Author: Zhigang Gong Date: Fri Jun 15 09:03:42 2012 +0800 glamor_emit_composite_vert: Optimize to don't do two times vert coping. We change some macros to put the vert to the vertex buffer directly when we cacluating it. This way, we can get about 4% performance gain. This commit also fixed one RepeatPad bug, when we RepeatPad a not eaxct size fbo. We need to calculate the edge. The edge should be 1.0 - half point, not 1.0. Signed-off-by: Zhigang Gong commit 8656ddbbe7a38e5cd15e6d006bba19778e34e9e9 Author: Zhigang Gong Date: Fri Jun 15 08:46:24 2012 +0800 glamor_glyphs: Before get upload to cache flush is needed. When we can't get a cache hit and have to evict one cache entry to upload new picture, we need to flush the previous buffer. Otherwise, we may get corrupt glyphs rendering result. This is the reason why user-font-proxy may fail sometimes. Signed-off-by: Zhigang Gong commit 016995334e6acfad41574a9270b716db98ec697f Author: Zhigang Gong Date: Fri Jun 15 08:43:37 2012 +0800 copyarea: Cleanup the error handling logic. Should use ok rather than mixed ok or ret. Signed-off-by: Zhigang Gong commit b4a499b7db068117801770b7ab80416014822101 Author: Zhigang Gong Date: Tue Jun 12 18:21:10 2012 +0800 trapezoid: Fallback to sw-rasterize for largepixmap. Signed-off-by: Zhigang Gong commit 8f31aed48ca9412f8f5df9c3d47d938c7c90bccb Author: Junyan He Date: Tue Jun 5 03:21:03 2012 +0800 Use the direct render path for A1 Because when mask depth is 1, there is no Anti-Alias at all, in this case, the directly render can work well and it is faseter. Signed-off-by: Junyan He commit fa74a213ad175cb0920905a8011c62efdd348d45 Author: Junyan He Date: Mon Jun 4 07:52:05 2012 +0800 Add the trapezoid direct render logic We firstly get the render area by clipping the trapezoid with the clip rect, then split the clipped area into small triangles and use the composite logic to generate the result directly. This manner is fast but have the problem that some implementation of GL do not implement the Anti-Alias of triangles fill, so the edge sometimes has sawtooth. It is not acceptable when use trapezoid to approximate circles and wide lines. Signed-off-by: Junyan He commit 5f1560c84aa386bb12dc6ec3daeb93e0f63c09c2 Author: Junyan He Date: Mon Jun 4 07:22:27 2012 +0800 Modilfy the composite logic to two phases We seperate the composite to two phases, firstly to select the shader according to source type and logic op, setting the right parameters. Then we emit the vertex array to generate the dest result. The reason why we do this is that the shader may be used to composite no only rect, trapezoid and triangle render function can also use it to render triangles and polygens. The old function glamor_composite_with_shader do the whole two phases work and can not match the new request. Signed-off-by: Junyan He commit 0b0391765f3ca0192b00f4970c9453934d529397 Author: Junyan He Date: Mon Jun 4 03:18:40 2012 +0800 Add macro of vertex setting for triangle stripe Add macro of vertex setting for triangle stripe draw, and make the code clear. Signed-off-by: Junyan He commit bd180be619c2ef469ca40cf95023340c59960540 Author: RobinHe Date: Sat Jun 2 22:00:09 2012 +0800 Use shader to generate the temp trapezoid mask The old manner of trapezoid render uses pixman to generate a mask pixmap and upload it to the GPU. This effect the performance. We now use shader to generate the temp trapezoid mask to avoid the uploading of this pixmap. We implement a anti-alias manner in the shader according to pixman, which will caculate the area inside the trapezoid dividing total area for every pixel and assign it to the alpha value of that pixel. The pixman use a int-to-fix manner to approximate but the shader use float, so the result may have some difference. Because the array in the shader has optimization problem, we need to emit the vertex of every trapezoid every time, which will effect the performance a lot. Need to improve it. Signed-off-by: Junyan He commit 6dd81c5939197eb51bc31ffbc3e6f359f2aad191 Author: RobinHe Date: Sat Jun 2 21:52:25 2012 +0800 Create the file glamor_triangles.c Create the file glamor_trapezoid.c, extract the logic relating to trapezoid from glamor_render.c to this file. Signed-off-by: Junyan He commit bf38ee407ba1038a25efa58b8475bcf084a21042 Author: Zhigang Gong Date: Mon Jun 11 14:02:59 2012 +0800 Enable large pixmap by default. Signed-off-by: Zhigang Gong commit 8ca16754f7e95e47423183bbd5f72966b937f6c8 Author: Zhigang Gong Date: Mon Jun 11 13:05:48 2012 +0800 largepixmap: Fix the selfcopy issue. If the source and destination are the same pixmap/fbo, and we need to split the copy to small pieces. Then we do need to consider the sequence of the small pieces when the copy area has overlaps. This commit take the reverse/upsidedown into the clipping function, thus it can generate correct sequence and avoid corruption self copying. Signed-off-by: Zhigang Gong commit 5325c800f706f46085735d608f57d513da63cddf Author: Zhigang Gong Date: Mon Jun 11 11:42:46 2012 +0800 largepixmap: Support self composite for large pixmap. The simplest way to support large pixmap's self compositing is to just clone a pixmap private data structure, and change the fbo and box to point to the correct postions. Don't need to copy a new box. Signed-off-by: Zhigang Gong commit 1d2d858b8daacdd349084433a8af60d559fb6a9d Author: Zhigang Gong Date: Mon Jun 11 09:36:56 2012 +0800 largepixmap: Add transform/repeat/reflect/pad support. This commit implement almost all the needed functions for the large pixmap support. It's almost complete. Signed-off-by: Zhigang Gong commit 48916a23a92366128f5a1eeb08949d8d32383c32 Author: Zhigang Gong Date: Mon Jun 11 02:27:00 2012 +0800 glamor_getimage: should call miGetimage if failed to get sub-image. Signed-off-by: Zhigang Gong commit 56d6e7a85fbe8e50c38efda0f59f09aac52b769a Author: Zhigang Gong Date: Mon Jun 11 02:24:41 2012 +0800 glamor_putimage: Correct the wrong stride value. We should not use the destination pixmap's devkind as the input image data's stride. Signed-off-by: Zhigang Gong commit eb6f981ba4d3a4aff1b3651bdad3cd7a52233b41 Author: Zhigang Gong Date: Mon Jun 11 02:15:53 2012 +0800 largepixmap: Enable glamor_composite. Now we start to enable glamor_composite on large pixmap. We need to do a three layer clipping to split the dest/source/mask to small pieces. This commit only support non-transformation and repeat normal case. Signed-off-by: Zhigang Gong commit e96ea02010874a3a46f212f42134083bd29fefe3 Author: Zhigang Gong Date: Mon Jun 11 01:52:14 2012 +0800 largepixmap: Implement infrastructure for large pixmap. Added infrastructure for largepixmap, this commit implemented: 1. Create/Destroy large pixmap. 2. Upload/Download large pixmap. 3. Implement basic repeat normal support. 3. tile/fill/copyarea large pixmap get supported. The most complicated part glamor_composite still not implemented. Signed-off-by: Zhigang Gong commit ace35e408cd7a79c5215bbd0f14b624d8d949e34 Author: Zhigang Gong Date: Mon Jun 11 01:02:30 2012 +0800 glamor_largepixmap: first commit for large pixmap. This is the first commit to add support for large pixmap. The large here means a pixmap is larger than the texutre's size limitation thus can't fit into one single texutre. The previous implementation will simply fallback to use a in memory pixmap to contain the large pixmap which is very slow in practice. The basic idea here is to use an array of texture to hold the large pixmap. And when we need to get a specific area of the pixmap, we just need to compute/clip the correct region and find the corresponding fbo. We need to implement some auxiliary routines to clip every rendering operations into small pieces which can fit into one texture. The complex part is the transformation/repeat/repeatReflect and repeat pad and their comination. We will support all of them step by step. This commit just add some necessary data structure to represent the large pixmap, and doesn't change any rendering process. This commit doesn't add real large pixmap support. Signed-off-by: Zhigang Gong commit 4c174f4c9ce1514ef226e9de97e5c87a46a75524 Author: Junyan He Date: Tue May 15 10:08:03 2012 +0800 Fix the problem of x_source and y_source causing radial error The x_source and y_source cause some problem in gradient. The old way to handle it by recaulate P1 P2 to minus the x_source and y_source, but this causes problem in radial shader. Now we modify the manner to set the texture coordinates: (x_source, y_source) --> (x_source + width, y_source + height) to handle all the cases. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 553910d08b93ef80cc25fcbfd7876726778bc655 Author: Junyan He Date: Tue May 15 10:07:55 2012 +0800 Fix the problem of vertical and horizontal case error in linear gradient. 1. The vertical and horizontal judgement in linear gradient have problem when p1 point and p2 point distance is very small but the gradient pict have a transform matrix which will convert the X Y coordinates to small values. So the judgement is not suitable. Because this judgement's purpose is to assure the divisor not to be zero, so we simply it to enter horizontal judgement when p1 and p2's Y is same. Vertical case is deleted. 2. Delete the unused p1 p2 uniform variable. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 41aa93c393c8760aae357725db63fa4a8f798557 Author: Junyan He Date: Tue May 15 10:07:46 2012 +0800 Fix the problem of set the same stop several times. Some gradient set the stops at the same position, for example: firstly 0.5 to red color and then set 0.5 to blue. This kind of setting will cause the shader work not correctly because the percentage caculating need to use the stop[i] - stop[i-1] as dividend. The previous patch we just kill some stop if the distance between them is 0. But this cause the problem that the color for next stop is wrong. We now modify to handle it in the shader to avoid the 0 as dividend. Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 09de37ec1c0543c8073f934274c84b3b7d5f31ae Author: Junyan He Date: Tue May 15 10:07:35 2012 +0800 Fix a bugy macro definition. The macro like "#define LINEAR_SMALL_STOPS 6 + 2" causes the problem. When use it to define like "GLfloat stop_colors_st[LINEAR_SMALL_STOPS*4];" The array is small than what we supposed it to be. Cause memory corruption problem and cause the bug of render wrong result. Fix it. Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit d900f553c2bb8d6e01529524fb7125918291c406 Author: Junyan He Date: Tue May 15 10:07:24 2012 +0800 Extract the gradient related code out. 1. Extract the logic of gradient from the glamor_render.c to the file glamor_gradient.c. 2. Modify the logic of gradient pixmap gl draw. Use the logic like composite before, but the gradient always just have one rect to render, so no need to set the VB and EB, replace it with just call glDrawArrays. 3.Kill all the warning in glamor_render.c Reviewed-by: Zhigang Gong Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 81692804645394b43832c8ec586e8e67f3e4f606 Author: Zhigang Gong Date: Tue May 15 15:25:41 2012 +0800 glamor_set_destination_pixmap_priv_nc: set drawable's width x height. Previous implementation set the whole fbo's width and height as the viewpoint. This may increase the numerical error as we may only has a partial region as the valid pixmap. So add a new marco pixmap_priv_get_dest_scale to get proper scale factor for the destination pixmap. For the source/mask pixmap, we still need to consider the whole fbo's size. Signed-off-by: Zhigang Gong commit 7f55e48499ea7bed73cb1adeac00c480263583f8 Author: Zhigang Gong Date: Tue May 15 10:52:37 2012 +0800 Remove the texture cache code. Caching texture objects is not necessary based on previous testing. To keep the code simple, we remove it. Signed-off-by: Zhigang Gong commit c5b3c2cedc8b2e486b1e3727f288c42869310387 Author: Zhigang Gong Date: Tue May 15 10:42:41 2012 +0800 Added strict warning flags to CFLAGS. We miss the strict warning flags for a long time, now add it back. This commit also fixed most of the warnings after enable the strict flags. Signed-off-by: Zhigang Gong commit 6839996b0b0fe5f4e6ef28d1dfe527092d60d28a Author: Zhigang Gong Date: Sat Apr 28 18:23:09 2012 +0800 We should not call gradient finalization code if we disable it. Signed-off-by: Zhigang Gong commit 1035fc72b9017eb2466760133ca7bbc9155c8c46 Author: Zhigang Gong Date: Sat Apr 28 14:55:34 2012 +0800 Fixed all unused variables warnings. Signed-off-by: Zhigang Gong commit 33e11cd6149294060269ed693de67b135868e094 Author: Zhigang Gong Date: Sat Apr 28 14:54:38 2012 +0800 Fixed an uninitialized problem at gradient shader functions. Signed-off-by: Zhigang Gong commit c0f75c657f36642faea4ff8c51f7e4f6971c3d19 Author: Zhigang Gong Date: Sat Apr 28 14:51:27 2012 +0800 Fixed one typo bug when fixup a mask picture. Signed-off-by: Zhigang Gong commit 5c1f15fac26b86b6cb73776db1a644d6af570da7 Author: Zhigang Gong Date: Sat Apr 28 14:13:47 2012 +0800 Added some copyright and author information. Signed-off-by: Zhigang Gong commit 0d846d95699fadcddcc77b8d6e432e969467dab2 Author: Zhigang Gong Date: Sat Apr 28 13:43:39 2012 +0800 Added --enable-debug configuration option. For release version, we disable asserts. Signed-off-by: Zhigang Gong commit 503f8ec1a670e73f41314a5e94cdde8782d7cbab Author: Zhigang Gong Date: Sat Apr 28 13:42:48 2012 +0800 Remove unecessary header file. Signed-off-by: Zhigang Gong commit 9dfd10dc75efdf4c26b7ff46b55e4a2d2453803b Author: Zhigang Gong Date: Fri Apr 27 15:34:15 2012 +0800 glamor_render: Fix the repeat none for GLES2. As GLES2 doesn't support clamp to the border, we have to handle it seprately from the normal case. Signed-off-by: Zhigang Gong commit 9fcd123aed80430b220fc4141eaa3723d7cb611e Author: Zhigang Gong Date: Thu Apr 26 20:35:09 2012 +0800 glamor_blockhandler: Don't do glFinish every time. To do glfinish every time bring some performance overhead. Signed-off-by: Zhigang Gong commit 1f83411c9a69a44944fd8afe0c167cece60c1ecb Author: Zhigang Gong Date: Thu Apr 26 19:59:58 2012 +0800 glamor_copyarea: Return earlier if have zero nbox. Almost all callers will check whether the regions is empty before call to this internal API, but it seems the glamor_composite_with_copy may call into here with a zero nbox. A little weird, as the miComputeCompositeRegion return a Non-NULL, but the region is empty. Also remove a unecessary glflush. So let's check it here. Signed-off-by: Zhigang Gong commit 20cbaa61cdca41e61526a57f13475cb31e17e5dd Author: Zhigang Gong Date: Thu Apr 26 19:57:21 2012 +0800 glamor_render: Have to use eaxct size pixmap for transformation. Use partial texture as the pixmap for the transformation source/mask may introduce extra errors. have to use eaxct size. Signed-off-by: Zhigang Gong commit 6e50ee9c108e6d7ce4ebfcd08cfc97896e8e194e Author: Zhigang Gong Date: Thu Apr 26 18:31:07 2012 +0800 glamor_fbo: Added a threshold value for the fbo cache pool. Currently set it to 256MB. If cache pool watermark increases to this value, then don't push any fbo to this pool, will purge the fbo directly. Signed-off-by: Zhigang Gong commit 540846204cce9239233c5608a29bfe0607d77e44 Author: Zhigang Gong Date: Thu Apr 26 18:28:17 2012 +0800 Fixed a1 bug. It seems that mesa has bugs when uploading bitmap to texture. We switch to convert bitmap to a8 format and then upload the a8 texture. Also added a helper routine to dump 1bpp pixmap. Signed-off-by: Zhigang Gong commit 9f53cc1c3369fc61630b238f1b347a92fabf5a5a Author: Zhigang Gong Date: Wed Apr 25 22:35:12 2012 +0800 glamor_render.c: Fixed repeatPad and repeatRelect. We should use difference calculation for these two repeat mode when we are a sub region within one texture. Signed-off-by: Zhigang Gong commit 67cf3838e4acd788b0ce413dcbe9896e2ca20e56 Author: Zhigang Gong Date: Wed Apr 25 19:50:57 2012 +0800 gradient: Don't need fixup flag when creating pixmap. Gradient can use a larger texture/fbo directly, don't need an eaxct size texture. Signed-off-by: Zhigang Gong commit 8a85071edbd90780b286fa4b19205540fb276815 Author: Zhigang Gong Date: Wed Apr 25 18:58:16 2012 +0800 glamor_copyarea: Don't access a DRM only pixmap. As EGL image/gbm only support ARGB8888 image, we don't support other format. We may change the way to use gbm directly latter. But now, we have to face this limitation, and thus if a client create a 16bpp drawable, and call get texture from pixmap then a copy to here may occur and thus we have to force retur a TRUE without do nothing. Signed-off-by: Zhigang Gong commit 0b6867dddbed186c46048c610299ac0dde6a9ef0 Author: Zhigang Gong Date: Wed Apr 25 13:54:40 2012 +0800 Disable A8 texture format for GLES2. As PVR's GLES2 implementation doesn't support A8 texture as rendering target, we disable it for now. Signed-off-by: Zhigang Gong commit 6b664dda69afa6c47ca083739093fa15fc674380 Author: Zhigang Gong Date: Wed Apr 25 13:51:58 2012 +0800 gradient: Disable gradient for gles2. As PVR glsl compiler seems doesn't support external fragment function, and fails at compile gradient shader. Disable it for now. We may need to modify gradient shader to don't use external function. Signed-off-by: Zhigang Gong commit 686a322c76fa20ed45d5bbfc9742024300e83e7d Author: Junyan He Date: Wed Apr 18 08:04:26 2012 +0800 Fix the bug caused by gradient picture set the stops at the same percentage. Fix the bug caused by gradient picture set the stops at the same percentage. The (stops[i] - stops[i-1]) will be used as divisor in the shader, which will cause problem. We just keep the later one if stops[i] == stops[i-1]. Signed-off-by: Junyan He Signed-off-by: Zhigang Gong commit 3d96929596fd3a6da41aab5cb9d7fb1cf28b2a03 Author: Junyan He Date: Wed Apr 25 14:25:39 2012 +0800 Fix the problem of memory leak in gradient pixmap generating. Fix the problem of memory leak in gradient pixmap generating. The problem caused by we do not call glDeleteShader when destroy a shader program. This patch will split the gradient pixmap generating to three category. If nstops < 6, we will use the no array version of the shader, which has the best performance. Else if nstops < 16, we use array version of the shader, which is compiled and linked at screen init stage. Else if nstops > 16, we dynamically create a new shader program, and this program will be cached until bigger nstops. Signed-off-by: Zhigang Gong commit 05da99106b81465488c9879cfd709fd4f0c7b9e5 Author: Zhigang Gong Date: Wed Apr 25 11:59:47 2012 +0800 glamor_putimage: Optimize for direct uploading and fallback path. This commit optimize two cases: 1. When the clip contains the whole area, we can directly upload the texel data to the pixmap, and don't need to do one extra clipped copy. 2. At fallback path, we don't read back the whole pixmap, just need a sub region. Signed-off-by: Zhigang Gong commit ea70ebe0ac9fe5b3d0ad553f9aeb4d2829bf9a62 Author: Zhigang Gong Date: Wed Apr 25 11:56:43 2012 +0800 Fixed one potential texture size mismatch problem. There are two cases which we may use a wrong texture size. 1. A pixmap is modified by the client side after it created it. Then the pixmap's width may mismatch the original fbo/tex's size. Thus we need to check this condition when preparing upload the pixmap. 2. We provide two API to download/upload sub region of a textured pixmap. The caller may pass in a larger width then the original pixmap's size, this may happen at putimage and setspans. We need to validate the width and height when do the downloading/uploading. Signed-off-by: Zhigang Gong commit 08e8c00fe6a21741ff9f38652c2b9fd2310f1ce5 Author: Zhigang Gong Date: Wed Apr 25 09:27:06 2012 +0800 glamor_getimage: Don't fallback to miGetImage. As miGetImage is very inefficient, we don't fallback to it. If the format is not ZPixmap, we download the required sub- region, and then call fbGetImage to do the conversion. This way is much faster than previous. Signed-off-by: Zhigang Gong commit 9bcddff93b79fd8978426d9832a5edd60ac410c0 Author: Zhigang Gong Date: Fri Apr 13 18:15:49 2012 +0800 pending_op: Remove the pending operations handling. We have disabled this feature for a long time, and previous testing shows that this(pending fill) will not bring observed performance gain. Now remove it. Signed-off-by: Zhigang Gong commit 1761768f49a356f50645da53305e6b4bdef5c5f4 Author: Zhigang Gong Date: Sun Apr 15 23:50:09 2012 +0800 glamor_upload_pixmap: Use glTexImage2D for a fully update. Currently, intel's mesa dri driver will not check pbo for a TexSubImage2D. So we use glTexImage2D if we are a fully updating. Signed-off-by: Zhigang Gong commit 2806f1eaced851e4c88055c53d706f7beef8b555 Author: Zhigang Gong Date: Sun Apr 15 23:49:38 2012 +0800 glamor_setspans: Reuse glamor_upload_sub_pixmap. Signed-off-by: Zhigang Gong commit e15bc1207480d7d198862861d40af58903b4d0f0 Author: Zhigang Gong Date: Sun Apr 15 23:18:47 2012 +0800 code clean up. Remove unused variables. Signed-off-by: Zhigang Gong commit 65c5605c9693c8d30e597ac029be936495f23927 Author: Zhigang Gong Date: Sun Apr 15 23:16:51 2012 +0800 glamor_getspans: Reuse glamor_download_sub_pixmap. Signed-off-by: Zhigang Gong commit 68a5cc6f371e1f07ce176e154331dafaf5d9ef0e Author: Zhigang Gong Date: Sun Apr 15 19:46:09 2012 +0800 glamor_render: Don't download whole picture when fallback. Signed-off-by: Zhigang Gong commit e38eb675321dce1bbc39cbd177a6398de567dd79 Author: Zhigang Gong Date: Sun Apr 15 19:43:44 2012 +0800 glamor_put_sub_pixmap: Change to use glamor_upload_sub_pixmap. As the pixmap may be attached to a picture, we need to use glamor_upload_sub_pixmap to process it. glamor_copy_n_to_n will not consider the picture case. Signed-off-by: Zhigang Gong commit ff3d2c796363ea603ab92995091a967a3f8636d7 Author: Zhigang Gong Date: Sun Apr 15 17:09:06 2012 +0800 Fixed a stride problem for textured_drm pixmap. As a textured_drm pixmap has a drm bo attached to it, and it's the DDX layer to set it stride value. In some case, the stride value is not equal to PixmapBytePad(w, depth) which is used within glamor. Then if it is the case, we have two choice, one is to set the GL_PACK_ROW_LENGTH/GL_UNPACK_ROW_LENGTH when we need to download or upload the pixmap. The other option is to change the pixmap's devKind to match the one glamor is using when downloading the pixmap, and restore it to the drm stride after uploading the pixmap. We choose the 2nd option, as GLES doesn't support the first method. Signed-off-by: Zhigang Gong commit 70b71718e737872dfdbf4f6c7285d4260a099d17 Author: Zhigang Gong Date: Sun Apr 15 14:36:09 2012 +0800 glamor_putimage: Reuse copy area to do the clipped copy. If no clip set, we load the bits to the pixmap directly. Otherwise, load the bits to a temporary pixmap and call glamor_copy_area to do the clipped copy. Signed-off-by: Zhigang Gong commit e1be714312df8d596f6be268cb8a4e390e634c36 Author: Zhigang Gong Date: Sun Apr 15 10:30:02 2012 +0800 Fixed a unbalanced glamor_put_dispatch. Signed-off-by: Zhigang Gong commit bd53e24dc32206dc978d3dc2408e1832f5a803e7 Author: Zhigang Gong Date: Sun Apr 15 22:47:48 2012 +0800 glamor_pixmap_priv: Always return a valid private pixmap. If a pixmap doesn't have a private, then set its type to GLAMOR_MEMORY, and thus it will get a valid private. Signed-off-by: Zhigang Gong commit 420af44a3aaefd4848aa24a28c330cab36049078 Author: Zhigang Gong Date: Sat Apr 14 22:40:48 2012 +0800 Don't need to set GL_PACK_ROW_LENGTH/GL_UNPACK_ROW_LENGTH. We already adjust the stride of the pixmap, and keep the alignment as 4 should be ok to let the GL/GLES match the stride. Previous version has a unbalanced PACK ROW length seting, and is buggy, now fixed it. Signed-off-by: Zhigang Gong commit 18d69fb0142088f7df230ec876c7ce2b55a41ad9 Author: Zhigang Gong Date: Fri Apr 13 13:47:05 2012 +0800 glamor_gl: Use GL_ALPHA for depth 8 pixmap. Use GL_RGBA to represent a8 pixmap is not efficient. Signed-off-by: Zhigang Gong commit 428f2a3f58a91300835aaa083ac0b291ce394dd0 Author: Zhigang Gong Date: Fri Apr 13 13:45:42 2012 +0800 glamor_pixmap_ensure_fbo: Should allocate tex if we don't have one. Signed-off-by: Zhigang Gong commit cf0e206a0ff6538eb286c06098023b9e29b00c74 Author: Zhigang Gong Date: Wed Apr 11 18:59:27 2012 +0800 glamor_polylines: Don't fallback for non-solid fill. As glamor_fill/fbFill will handle non-solid fill correctly. We don't fallback it here. Signed-off-by: Zhigang Gong commit b5bd9a2d902d44834fc43199167d7dee71c9b709 Author: Zhigang Gong Date: Wed Apr 11 18:57:33 2012 +0800 glamor_upload/download: fix 1bpp bug. For A1 to A8's conversion, the stride is different for the source and destination. Previous implementation use the same stride, and may allocate less memory than required. Thus may crash the server when uploading a A1 pixmap. Now fix it. Tested-by: Peng Li Signed-off-by: Zhigang Gong commit b0e91f0f5a3a4f74800b89ed4003d300ae138151 Author: Zhigang Gong Date: Tue Apr 10 20:50:14 2012 +0800 glamor_pixmap_upload_texture: Support to upload a sub region of data. Just as the downloading side, we can upload an sub region data to a pixmap's specified region. The data could be in memory or in a pbo buffer. Signed-off-by: Zhigang Gong commit 3061f348ca2f05d88ca2391e1ad81ce8216d69f2 Author: Zhigang Gong Date: Tue Apr 10 10:40:17 2012 +0800 glamor_getimage: Use glamor_download_sub_pixmap_to_cpu to get image. Reduce the duplicate logic. Signed-off-by: Zhigang Gong commit 3a91f169122ea0556f628f11fb473b0feed7e44b Author: Zhigang Gong Date: Tue Apr 10 10:19:30 2012 +0800 glamor_polyfillrect: Fixed a potential bug if fallback at glamor_fill. We should advance the prect after we successfully excuted the glamor_fill. And if failed, we need to add the failed 1 box back to nbox. Although, this bug will never happen currently, as glamor_fill will never fallback. Signed-off-by: Zhigang Gong commit 1f657f72cacaa1170e7e55f4b5149c69492db6a5 Author: Zhigang Gong Date: Mon Apr 9 20:20:45 2012 +0800 glamor_polyfillrect: Optimize fallback path. Download/upload required region only. Signed-off-by: Zhigang Gong commit cea0fe3e1f49fc8d86f0cc653c8089f1ea2c9f1f Author: Zhigang Gong Date: Mon Apr 9 20:16:07 2012 +0800 fallback_optimize: Prepare for downloading/uploading subregion. Introduced two function glamor_get_sub_pixmap/glamor_put_sub_pixmap, can easily used to get and put sub region of a big textured pixmap. And it can use pbo if possible. To support download a big textured pixmap's sub region to another pixmap's pbo, we introduce a new type of pixmap GLAMOR_MEMORY_MAP. This type of pixmap has a valid devPrivate.ptr pointer, and that pointer points to a pbo mapped address. Now, we are ready to refine those glamor_prepare_access/glamor_finish_access pairs. Signed-off-by: Zhigang Gong commit d9dfc3d795b7e567d53cfeed61126164be36e233 Author: Zhigang Gong Date: Mon Apr 9 16:39:42 2012 +0800 glamor_download_sub_pixmap_to_cpu: New function to download subregion. Prepare to optimize the fallback path. We choose the important rendering pathes to optimzie it by using shader. For other pathes, we have to fallback. We may continue to optimize more pathes in the future, but now we have to face those fallbacks. The original fallback is very slow and will download/upload the whole pixmap. From this commit, I will refine it to just download/upload needed part. Signed-off-by: Zhigang Gong commit d96226ac6f34aa61fc00ad15ef58c1ed1253160e Author: Zhigang Gong Date: Mon Apr 9 15:57:05 2012 +0800 glamor_es2_pixmap_read_prepare: Just prepare the required region. Don't need to prepare the whole source pixmap. Signed-off-by: Zhigang Gong commit 3dbdd40c6ce4203619f2a3492029a444bb9217af Author: Zhigang Gong Date: Mon Apr 9 10:00:57 2012 +0800 glamor_color_convert: Let the caller to provide destination buffer. As we don't need to allocate new buffer when downloading pixmap to CPU, we change the prototype of the color converting function and let the caller to provide the buffer to hold the result. All the color conversion function supports store the result just at the same place of the source. Signed-off-by: Zhigang Gong commit 4dc6d4e84b4904540d7701cfc88a9c945464f833 Author: Zhigang Gong Date: Fri Apr 6 21:20:15 2012 +0800 glyphblt/polyops: Use miFunctions by default. Calling to miFunctions give some opportunities to jump to accelerated path, so we switch to call miFunctions rather than fallback to fbFunctions directly. commit 49e3b44aa813c98c05fcb10c19882e10d751580a Author: Zhigang Gong Date: Fri Apr 6 21:17:46 2012 +0800 glamor_set_alu: Added GXclear support at glamor_solid. We don't need to issue the glamor_fallback at the glamor_set_alu routine, as the caller may support GXclear or other most frequent Ops. Leave it to the caller to determine fallback or not. Signed-off-by: Zhigang Gong commit 3b8b2c77fc4449c7b63fd2597f73562b33dc1722 Author: Zhigang Gong Date: Fri Apr 6 21:15:12 2012 +0800 getimage: Enable getimage by default. Fixed one bug when calculate the coords, should consider the drawable's x and y. Now enable it by default. Most of the time, it should be more efficient than miGetImage. Signed-off-by: Zhigang Gong commit c6ce44d88134115b42edc76e1ee961b57bae86ff Author: Zhigang Gong Date: Fri Apr 6 17:01:57 2012 +0800 render: Enable more componentAlpha support. Actually only PictOpAtop,PictOpAtopReverse and PictOpXor can't be implemented by using single source blending. All the other can be easily support. Slightly change the code to support them. Consider those three Ops are not frequenly used in real application. We simply fallback them currently. PictOpAtop: s*mask*dst.a + (1 - s.a*mask)*dst PictOpAtopReverse: s*mask*(1 - dst.a) + dst *s.a*mask PictOpXor: s*mask*(1 - dst.a) + dst * (1 - s.a*mask) The two oprands in the above three ops are all reated to dst and the blend factors are not constant (0 or 1), it's hardly to convert it to single source blend. Now, the rendercheck is runing more smoothly. Signed-off-by: Zhigang Gong commit 3e9c35bdcbdb96a67c9f2a1ea76c382aaacca7e9 Author: Zhigang Gong Date: Fri Apr 6 11:02:36 2012 +0800 glamor_set_alu: Fallback for non GXcopy ops with GLES2. As GLES2 doesn't support LogiOps, we have to fallback here. GLES2 programing guide's statement is as below: "In addition, LogicOp is removed as it is very infrequently used by applications and the OpenGL ES working group did not get requests from independent software vendors (ISVs) to support this feature in OpenGL ES 2.0." So, I think, fallback here may not a big deal ;). Signed-off-by: Zhigang Gong commit 1a238e89f39fd5aeaf6975399971123cd3e15f24 Author: Zhigang Gong Date: Thu Apr 5 22:39:41 2012 +0800 glamor_putimage: Reuse the function in pixmap.c to do the uploading. We reuse glamor_upload_bits_to_pixmap_texture to do the data uploading to texture in putimage. Besides to avoid duplicate code, this also fixed the potential problem when the data format need extra reversion which is not supported by the finish shader, as glamor_upload_bits_to_pixmap_texture will handle all conditions. Tested-by: Junyan He Signed-off-by: Zhigang Gong commit 0650c7d4be6d4c21510c953543599aea32780f24 Author: Zhigang Gong Date: Thu Apr 5 22:31:44 2012 +0800 gles2: Added 1555/2101010 formats support. Added color conversion code to support 1555/2101010 formats,now gles2 can pass the render check with all formats. We use 5551 to represent 1555, and do the revertion if downloading/uploading is needed. For 2101010, as gles2 doesn't support reading the identical formats. We have to use 8888 to represent, thus we may introduce some accurate problem. But anyway, we can pass the error checking in render check, so that may not be a big problem. Signed-off-by: Zhigang Gong commit 3add3750658107bd18592a8672caa8bed0c8931c Author: Zhigang Gong Date: Thu Apr 5 21:53:44 2012 +0800 gles2: Fixed color conversion for the formats except 1555 and 2101010. This patch fixed two major problems when we do the color convesion with GLES2. 1. lack of necessary formats in FBO pool. GLES2 has three different possible texture formats, GL_RGBA, GL_BGRA and GL_ALPHA. Previous implementation only has one bucket for all the three formats which may reuse a incorrect texture format when do the cache lookup. After this fix, we can enable fbo safely when running with GLES2. 2. Refine the format matching method in glamor_get_tex_format_type_from_pictformat. If both revertion and swap_rb are needed, for example use GL_RGBA to represent PICT_b8g8r8a8. Then the downloading and uploading should be handled differently. The picture's format is PICT_b8g8r8a8, Then the expecting color layout is as below (little endian): 0 1 2 3 : address a r g b Now the in GLES2 the supported color format is GL_RGBA, type is GL_UNSIGNED_TYPE, then we need to shuffle the fragment color as : frag_color = sample(texture).argb; before we use glReadPixel to get it back. For the uploading process, the shuffle is a revert shuffle. We still use GL_RGBA, GL_UNSIGNED_BYTE to upload the color to a texture, then let's see 0 1 2 3 : address a r g b : correct colors R G B A : GL_RGBA with GL_UNSIGNED_BYTE Now we need to shuffle again, the mapping rule is r = G, g = B, b = A, a = R. Then the uploading shuffle is as below: frag_color = sample(texture).gbar; After this commit, gles2 version can pass render check with all the formats except those 1555/2101010. Signed-off-by: Zhigang Gong commit 55fdc7b196904a4e537f429d06d36081a0c9a60d Author: Zhigang Gong Date: Thu Apr 5 20:27:35 2012 +0800 glamor_utils: Added debug function to dump depth 15/16 pixmap. Signed-off-by: Zhigang Gong commit 57e29ebdc13d0ef145e4c70c1406af3229a92ad8 Author: Zhigang Gong Date: Fri Apr 6 11:14:21 2012 +0800 glamor_render: Disable gradient shader conversion due to bug. I found when enable the gradient shader, the firefox's tab's background has incorrect rendering result. Need furthr investigation, for now, just disable it. Signed-off-by: Zhigang Gong commit 7036cfdd0d29f4e13d432893a4f386cd3d632de7 Author: Zhigang Gong Date: Fri Mar 16 16:42:46 2012 +0800 glamor_fbo: Added one macro to disable fbo cache. Signed-off-by: Zhigang Gong commit 94186db527b33b2623eb26a7f1ae0c4c0fca66a4 Author: Zhigang Gong Date: Mon Mar 26 19:03:20 2012 +0800 glamor_fill: Should restore alu to GXcopy. Signed-off-by: Zhigang Gong commit 1f4486c10bb2201830af251eede8cc4dbb857953 Author: Junyan He Date: Fri Mar 23 04:06:06 2012 +0800 Add the feature for radial gradient using shader. Add the feature for radial gradient using shader. The transform matrix and the 4 type of repeat mode are supported. Less than 2/255 difference for every color component comparing to pixman's result. Extract the common logic of linear and radial's to another shader. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit 1026327cdc90bc0c801a493b7b76b3efc5f33fe2 Author: Junyan He Date: Fri Mar 23 04:05:56 2012 +0800 Add the feature of generating linear gradient picture by using shader. Add the feature of generating linear gradient picture by using shader. This logic will replace the original linear gradient picture generating manner in glamor which firstly use pixman and then upload it to GPU. Compare it to the result generated by pixman, the difference of each color component of each pixel is normally 0, sometimes 1/255, and 2/255 at most. The pixman use fixed-point but shader use float-point, so may have difference. The feature of transform matrix and 4 types of repeat modes have been supported. The array usage in shader seems slow, so use 8 uniform variables to avoid using array when stops number is not very big. This make code look verbose but the performance improved a lot. We still have slightly performance regression compare to original pixman version. There are one further optimization opportunity which is to merge the gradient pixmap generation and the latter compositing into one shader, then we don't need to generate the extra texture, we can use the gradient value directly at the compositing shader. Hope that can beat pixman version. Will do that latter. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit ccf5d7f52bae664f90d2c33c9fcff099a820575f Author: Junyan He Date: Fri Mar 23 04:05:48 2012 +0800 Prepare for modification of gradient using shader. Prepare for modification of gradient using shader. The gradient pixmaps now is generated by pixman and we will replace them with shader. Add structure fields and dispatch functions which will be needed. Some auxiliary macro for vertex convert. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit a57bf66d492a0eec7b1f2a08b2f424835694e3fb Author: Junyan He Date: Mon Mar 26 13:51:13 2012 +0800 glamor_utils: Add some assistant functions to compare pixmaps/pictures. Reviewed-by: Chris Wilson Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit cd75e85ff36827b8438d965750faab0615d01e86 Author: Junyan He Date: Mon Mar 5 08:24:20 2012 +0800 Fixup For list.h change in xorg Because the file list.h in xorg/include has changed the functions and struct names, adding xorg_ prefix before the original name. So Modify glamor_screen_private struct and the code which use list's functions in glamor_fbo.c. We hack at glamor_priv.h avoid the compile error when using old version xserver header file. Signed-off-by: Junyan He commit 213285f2b8c6578e01783a77d954ccc3ec313663 Author: Zhigang Gong Date: Fri Feb 17 16:56:05 2012 +0800 For DRI swap buffers. This commit added two APIs to support the DRI swap buffer. one is glamor_egl_exchange_buffers() which can swap two pixmaps' underlying KHRimages/fbos/texs. The DDX layer should exchange the DRM bos to make them consistent to each other. Another API is glamor_egl_create_textured_screen_ext(), which extent one more parameters to track the DDX layer's back pixmap pointer. This is for the triple buffer support. When using triple buffer, the DDX layer will keep a back pixmap rather then the front pixmap and the pixmap used by the DRI2 client. And during the closing screen stage, we have to dereference all the back pixmap's glamor resources. Thus we have to extent this API to register it when create new screen. Signed-off-by: Zhigang Gong commit 8012b030c3144b02af036107179c5b4c94567292 Author: Zhigang Gong Date: Fri Feb 17 16:26:59 2012 +0800 glamor_copyarea: Don't use GL_CLAMP_TO_BORDER when GLES2 enabled. We may need to modify all the shader to handle GL_CLAMP_TO_BORDER when using GLES2. XXX, for now, we just ignore them. Signed-off-by: Zhigang Gong commit 5ccf721d386a62f411d77bbc9a142e0c395162b3 Author: Zhigang Gong Date: Tue Feb 14 17:39:11 2012 +0800 glamor_fbo: Fix a bug when create No gl FBO pixmap. Need to get format before goto create a new fbo. Signed-off-by: Zhigang Gong commit ce634e84d4bb559f01203653c5ffd6397f4b0366 Author: Zhigang Gong Date: Sun Feb 12 09:18:51 2012 +0800 glamor_render: Only recalculate texture for repeat case. Slightly optimize the fragment shader, as if we are not repeat case and not exceed the valid texture range, then we don't need to recalculate the coords. Signed-off-by: Zhigang Gong commit 53387728ddc0c871821b68d728bb5f96a53ba227 Author: Zhigang Gong Date: Fri Feb 10 17:40:37 2012 +0800 glamor_tile/composite: Modify fs to re-calculate texture coords. Then we don't need to fixup the larger pixmap to the exact size, just need to let the shader to re-calculate the correct texture coords. Signed-off-by: Zhigang Gong commit 556adfa6b90f4c1ef12635cf78fa0bba046cf123 Author: Chris Wilson Date: Fri Feb 10 12:54:44 2012 +0000 Fixup glx support Renaming glamor_priv->dispatch and wrapping the access to the dispatch table with a function that also ensured the context was bound. dispatch = glamor_get_dispatch(glamor_priv); ... glamor_put_dispatch(glamor_priv); So that we catch all places where we attempt to call into GL withouta context. As an optimisation we can then do glamor_get_context(); glamor_put_context() around the rendering entry points to reduce the frequency of having to restore the old context. (Along with allowing the context to be recursively acquired and making the old context part of the glamor_egl state.) Reviewed-by: Zhigang Gong Signed-off-by: Zhigang Gong commit 430bc16ca03b3ea00255a4045c8e9fd11aea95ad Author: Zhigang Gong Date: Fri Feb 10 16:04:07 2012 +0800 GLX: Enable glx support. If we are using MESA as our GL library, then both xserver's GLX and glamor are link to the same library. As xserver's GLX has its own _glapi_get/set_context/dispatch etc, and it is a simplified version derived from mesa thus is not sufficient for mesa/egl's dri loader which is used by glamor. Then if glx module is loaded before glamoregl module, the initialization of mesa/egl/opengl will not be correct, and will fail at a very early stage, most likely fail to map the element buffer. Two methodis to fix this problem, first is to modify the xserver's glx's glapi.c to fit mesa's requirement. The second is to put a glamor.conf as below, to the system's xorg.conf path. Section "Module" Load "glamoregl" EndSection Then glamor will be loaded firstly, and the mesa's libglapi.so will be used. As current xserver's dispatch table is the same as mesa's, then the glx's dri loader can work without problem. We took the second method as it don't need any change to xorg.:) Although this is not a graceful implementation as it depends on the xserver's dispatch table and the mesa's dispatch table is the same and the context set and get is using the same method. Anyway it works. As by default, xserver will enable GLX_USE_TLS. But mesa will not enable it, you may need to enable that when build mesa. Three pre-requirements to make this glamor version work: 0. Make sure xserver has commit 66e603, if not please pull the latest master branch. 1. Rebuild mesa by enable GLX_USE_TLS. 2. Put the glamor.conf to your system's xorg.conf path and make sure it loaded prior to glx module. Preliminary testing shows indirect glxgears works fine. If user want to use GLES2 for glamor by using MESA, GLX will not work correctly. If you are not using normal MESA, for example PVR's private GLES implementation, then it should be ok to use GLES2 glamor and the GLX should work as expected. In this commit, I use gbm to check whether we are using MESA or non-mesa. Maybe not the best way. Signed-off-by: Zhigang Gong commit 0a8fb8563f3cecf2019d3a35d5a61ec2b3a069cd Author: Zhigang Gong Date: Fri Feb 10 15:34:43 2012 +0800 glamor_pixmap: Should bind unpack buffer to 0 after the uploading. Signed-off-by: Zhigang Gong commit e03ad27dfb885e58298e1fd2accac0b6ad409fce Author: Zhigang Gong Date: Sat Feb 11 07:37:17 2012 +0800 glamor_picture: Fix the wrong order of header file. Signed-off-by: Zhigang Gong commit bf24c2c06870dc38b21795f4f6fc51b053134181 Author: Zhigang Gong Date: Fri Feb 3 11:46:01 2012 +0800 glamor_dump_pixmap: Add helper routine to dump pixmap. For debug purpose only to dump the pixmap's content. As this function will call glamor_prepare_access/glamor_finish_access internally. Please use it carefully. Signed-off-by: Zhigang Gong commit 91891b3711b1fe1402bb7742c20e976fab63c6fe Author: Zhigang Gong Date: Fri Feb 3 11:44:51 2012 +0800 glamor_fill/tile: Fixed a tileX/tileY calculation bug. The previous's calculation is incorrect, now fix it and then we don't need to fallback at glamor_tile. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 39d9e6c693a4c3ad12c6569f1fd56e0a87b164d2 Author: Zhigang Gong Date: Fri Feb 3 11:21:37 2012 +0800 prepare_access: Don't use fbo after it was downloaded. We add a new gl_fbo status GLAMOR_FBO_DOWNLOADED to indicate the fbo was already downloaded to CPU. Then latter the access to this pixmap will be treated as pure CPU access. In glamor, if we fallback to DDX/fbXXX, then we fallback everything currently. We don't support to jump into glamor acceleration layer between a prepare_access/finish_access. Actually, fbCopyPlane is such a function which may call to acceleration function within it. Then we must mark the downloaded pixmap to another state rather than a normal fbo textured pixmap, and then stick to use it as a in-memory pixmap. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 1817b6c0cf20aa6fc1e1aa5b68e47473f341b85a Author: Zhigang Gong Date: Thu Feb 2 11:21:05 2012 +0800 glamor_eglmodule: Change module name according to normalize naming rule. As Xorg module loader will normalize module name which will remove '_' when we put "glamor_egl" to the configure file, then it will fail to find us. Signed-off-by: Zhigang Gong commit 1ab40028740efad1ba2ee16d425b0fbdd822c6ab Author: Zhigang Gong Date: Thu Feb 2 09:34:42 2012 +0800 Don't call dixSetPrivate directly. We may change the way to set/get those private data latter. consolidate to glamor_set_pixmap/screen_private is better than call those dixSetPrivate directly. Signed-off-by: Zhigang Gong commit bf7d79dc0ac2e97ed97e22c1d2c95e77bf959327 Author: Zhigang Gong Date: Tue Jan 31 18:16:58 2012 +0800 Refine CloseScreen and FreeScreen processes. This commit move the calling to glamor_close_screen from glamor_egl_free_screen to glamor_egl_close_screen, as this is the right place to do this. We should detach screen fbo and destroy the corresponding KHR image at glamor_egl_close_screen stage. As latter DDX driver will call DestroyPixmap to destroy screen pixmap, if the fbo and image are still there but glamor screen private data pointer has been freed, then it causes segfault. This commit also introduces a new flag GLAMOR_USE_EGL_SCREEN. if DDX driver is using EGL layer then should set this bit when call to glamor_init and then both glamor_close_screen and glamor_egl_close_screen will be registered correctly, DDX layer will not need to call these two functions manually. This way is also the preferred method within Xorg domain. As interfaces changed, bump the version to 0.3.0. Signed-off-by: Zhigang Gong Tested-by: Peng Li commit 97efbd25fed0f86338853d81b974b7f4deb9f1b4 Author: Chris Wilson Date: Fri Jan 27 13:22:13 2012 +0000 Use CLAMP_TO_BORDER in copy_n_to_n so we can sample outside of the source In order to reduce a composite operation to a source, we need to provide Render semantics for the pixel values of samples outside of the source pixmap, i.e. they need to be rgba(0, 0, 0, 0). This is provided by using the CLAMP_TO_BORDER repeat mode, but only if the texture has an alpha channel. Signed-off-by: Chris Wilson Reviewed-by: Zhigang Gong commit 864153bb9eeadb539ed5e9488b829c9f3f8b9482 Author: Chris Wilson Date: Fri Jan 27 13:22:12 2012 +0000 Do not reduce a composite to a copy if we need to sample outside of the source In order to maintain Render semantics, samples outside of the source should return CLEAR. The copy routines instead are based on the core protocol and expects the source rectangle to be wholly contained within the drawable and so does no fixup. Fixes the rendering of GTK icons. Signed-off-by: Chris Wilson Reviewed-by: Zhigang Gong commit 566cca59e14b223b8dcd045ccc2bbcf08d05b297 Author: Zhigang Gong Date: Sun Jan 29 14:14:36 2012 +0800 glamor-gles2: Fixup the pixmap before read back if it is not readable. Signed-off-by: Zhigang Gong commit 36ac9b7191a4bbbe4fb25ced9ee27d1e91308a15 Author: Zhigang Gong Date: Sat Jan 21 14:41:44 2012 +0800 glamor-fbo: Tweek the cache bucket calculation. And also reduce the expire count to 100 which should be good enough on x11perf and cairo-trace testing. Signed-off-by: Zhigang Gong commit a1de528c56ff1cfd05a04c4ad127456ec00707fd Author: Zhigang Gong Date: Sat Jan 21 13:22:14 2012 +0800 glamor_create_fbo: Concentrate the fbo size/depth checking. Concentrate checking the size/depth when creating fbo. Simply the pixmap creation and the uploading fbo/texture preparing. Also slightly change the uploading fbo's preparation. If don't need fbo, then a fbo only has valid texture should be enough to return. Signed-off-by: Zhigang Gong commit 1bfe5957117ba5916236caa021124734228e5aa9 Author: Zhigang Gong Date: Fri Jan 20 20:38:29 2012 +0800 glamor-pixmap-upload: Create a uploading fbo with a texture only. Just an initial implementation and disabled by default. When uploading a pixmap to a texture, we don't really want to attach the texture to any fbo. So add one fbo type which doesn't has a gl FBO attached to it. This commit can increase the cairo-trace's performance by 10-20%. Now the firefox-planet-gnome is 8.3s. SNA is still the best, only take 3.5s. Thanks for Chris to point out the A1 pixmap uploading bug. Signed-off-by: Zhigang Gong commit 6fb92e67b3f3dee38d8d440c8ab9f8cc5dcef9bc Author: Li Peng Date: Fri Jan 20 16:23:17 2012 +0800 glamor: check driver support GEM or not glamor calls DRM_IOCTL_GEM_FLINK to get a name for a buffer object. It only works for driver that support GEM, such as intel i915 driver. But for pvr driver who doesn't has GEM, we can't do it this way. According to Chris's comments, we check the has_gem as the following method: Here we just try to flink handle 0. If that fails with ENODEV or ENOTTY instead of ENOENT (or EINVAL on older kernels), set has_gem=0. Signed-off-by: Li Peng Reviewed-by: Zhigang Gong commit 68789b23e791d81c6987c755a56851961cbb262f Author: Zhigang Gong Date: Fri Jan 20 15:56:25 2012 +0800 glamor_gles2: Consolidate gles2 pixmap format readable check to one function. Signed-off-by: Zhigang Gong commit 3373d2c696028a9f2f637430c48b9de1a3776800 Author: Zhigang Gong Date: Fri Jan 20 12:10:06 2012 +0800 glamor_egl: Add support for the platform doesn't have gbm. Maybe we should use eglGetDisplayDRM to get display, but current PVR's driver is using eglGetDisplay. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 92671e3ac8cc955379085c143ee8cf8b37e760ec Author: Zhigang Gong Date: Fri Jan 20 11:58:34 2012 +0800 glamor_egl: Don't call eglDestroyImageKHR directly. Some implementation doesn't have it. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 125f317d90b69fa4d6f98da9badc1946f0a099ec Author: Peng Li Date: Fri Jan 20 11:52:18 2012 +0800 glamor_gl_dispatch: fix the dispatch initialization on GLES2. Some gles2 implementation doesn's support get_proc_address. And we also need to avoid get those missing functions pointers when we are GLES2. Signed-off-by: Peng Li Signed-off-by: Zhigang Gong commit 64fef665c9297ddd110b8472943f96b55db120ba Author: Zhigang Gong Date: Fri Jan 20 10:56:17 2012 +0800 glamor_render: Add non-Map/Unmap vertex array for GLES. As some GLES implementations' glMapOES /glUnmapOES is not so efficient, we implement the in memory vertex array for them. Signed-off-by: Zhigang Gong commit c244969b331e08679be9a9618d75fe5ee9cc9d86 Author: Zhigang Gong Date: Fri Jan 20 10:55:16 2012 +0800 glamor_init: Should set gl_flavor before sub-module intialization. Signed-off-by: Zhigang Gong commit 62e536535168827be76dafb1f5b5e0807c1d5ec9 Author: Zhigang Gong Date: Fri Jan 20 10:04:21 2012 +0800 glamor_composite: Fix one bug when we have too more vertices. Signed-off-by: Zhigang Gong commit 9c6fd931a63fb8a5300014265e4f1cacc746857a Author: Zhigang Gong Date: Fri Jan 20 09:59:44 2012 +0800 glamor-fbo-pool: Enable to reuse different size fbo/texture. Fixup three special cases, one is in tile and the other is in composite. Both cases are due to repeat texture issue. Maybe we can refine the shader to recalculate texture coords to support partial texture's repeating. The third is when upload a memory pixmap to texture, as now the texture may not have the exact size as the pixmap, we should not use the full rect coords. Signed-off-by: Zhigang Gong commit c7e79d6acff5abd7a327d5f4d6698ae5d7583834 Author: Zhigang Gong Date: Thu Jan 19 20:47:55 2012 +0800 glamor-fbo-pool: Implement fbo cache mechanism. We classify the cache according to the texture's format/width/height. As openGL doesn't allow us to change a texture's format/width/height after the internal texture object is already allocated, we can't just calculate the size and then according ths size to put the fbo to an bucket which is just like SNA does. We can only put the fbo to the corresponding format/width/height bucket. This commit only support the exact size match. The following patch will remove this restriction, just need to handle the repeat/tile case when the size is not exactly match. Should use fls instead of ffs when decide the width/height bucket, thanks for Chris to point this out. Signed-off-by: Zhigang Gong commit 2ff41008494e6c5909c058f1f80b4f66617dada1 Author: Zhigang Gong Date: Wed Jan 18 19:21:36 2012 +0800 glamor_fbo: Introduce glamor fbo to manage all the fb/tex. This is the first patch to implement a fbo/tex pool mechanism which is like the sna's BO cache list. We firstly need to decopule the fbo/tex from each pixmap. The new glamor_pixmap_fbo data structure is for that purpose. It's somehow independent to each pixmap and can be reused latter by other pixmaps once it's detached from the current pixmap. And this commit also slightly change the way to create a memory pixmap. We will not create a pixmap private data structure by default, instead we will crete that structure when a memory pixmap is attaching a fbo to it. Signed-off-by: Zhigang Gong commit ca2ddd33a114fe83584b5fa9f73b7534abdb96fa Author: Zhigang Gong Date: Wed Jan 18 17:12:32 2012 +0800 glamor_set_pixmap_texture/screen_pixmap: Remove useless parameters. As after we got a texture, no matter the texture is created on the glamor_create_pixmap or on the egl layer, we all already know the texture's width and height there. We don't need to pass them in. This commit also simply the glamor_egl_create_textured_screen to reuse the egl_create_textured_pixmap. And also remove the useless root image from the egl private structure. As now the root image is bound to the screen image, we don't take care it separately here. It will be freed at the screen closing. Signed-off-by: Zhigang Gong commit 15166bba973206dcb98121eb3932660529cfc997 Author: Zhigang Gong Date: Wed Jan 18 17:10:26 2012 +0800 Add debug message for all the uploading path. The previous message missed the texture restoring path. Signed-off-by: Zhigang Gong commit 994a9ff7f58161bf5651f83d810eb77b7718ab00 Author: Zhigang Gong Date: Wed Jan 18 17:07:25 2012 +0800 glamor_create_picture: Fix the format matching method. We should not simply set a TEXTURE_DRM pixmap to a separated texture pixmap. If the format is compatible with current fbo then it is just fine to keep it as TEXTURE_DRM type and we can safely fallback to DDX layer on it. Signed-off-by: Zhigang Gong commit 28fcd7cd01edfdf68c370e6c6ad0238d45477b3f Author: Zhigang Gong Date: Fri Jan 13 11:18:28 2012 +0800 Rearrange data structure and remove unused fileds. Signed-off-by: Zhigang Gong commit bdd72da0c525faf2aac38a7a8afa1cd88cd8dc1b Author: Zhigang Gong Date: Tue Jan 10 17:04:48 2012 +0800 Release previous textre/fb when bind a new texture to a pixmap. As we want to support DRI2 drawable which may create a new textured_drm to a pre-existing texture_only pixmap, we have to add this logical. Signed-off-by: Zhigang Gong Tested-by: He Junyan commit d7352d57b9ceb809d47c922ed8c820a44f8a0ee5 Author: Zhigang Gong Date: Tue Jan 10 15:24:36 2012 +0800 Add glFinish after glFlush. Signed-off-by: Zhigang Gong commit 8b943ce2030b02bb8d279ce2c284cb5d2910ced6 Author: Zhigang Gong Date: Mon Jan 9 12:50:39 2012 +0800 Set glamor's initial version to 0.2.0. Signed-off-by: Zhigang Gong commit 7329414bf2ca9873c04150a1d9386cf37f70b663 Author: Zhigang Gong Date: Mon Jan 9 07:16:06 2012 +0800 Silence a compilation warning. Signed-off-by: Zhigang Gong commit 069a6d1746ef4c180f48a75e655e5e06e33327b5 Author: Zhigang Gong Date: Mon Jan 9 07:11:26 2012 +0800 glamor_composite: Allocate VBO on demand. Use a fixed VBO is not efficient. Some times we may only has less than 100 verts, and some times we may have larger than 4K verts. We change it to allocate VBO buffer dynamically, and this can bring about 10% performance gain for both aa10text/rgb10text and some cairo benchmarks. Signed-off-by: Zhigang Gong commit 42a0261cb3065200887f81816b1bc3850593da4c Author: Zhigang Gong Date: Mon Jan 9 05:03:08 2012 +0800 glamor_getimage: Add the optimization path of getImage. This optimization will only call glReadPixels once. It should get some performance gain. But it seems it even get worse performance at SNB, disable it by default. Signed-off-by: Zhigang Gong commit 96085017c8da96e6d882c87b69186f5aba20131d Author: Zhigang Gong Date: Mon Jan 9 05:01:48 2012 +0800 Consolidate the choose of internal texture format to one function. Signed-off-by: Zhigang Gong commit a74596be0e7e02b43fb0db844b71b68f384ab599 Author: Zhigang Gong Date: Sun Jan 8 08:50:41 2012 +0800 Set filter to GL_NEAREST by default. This is the fastest filter and let's use it by default. Signed-off-by: Zhigang Gong commit 4cd07871a417b15b0382c07fecec497e93697a5d Author: Zhigang Gong Date: Sun Jan 8 08:45:08 2012 +0800 glamor-composite: Use glDrawElements to reduce the count of vertices. To split a rectangle (0,1,2,3) to two separated triangles need to feed 6 vertices, (0,1,2) and (0,2,3). use glDrawElements can reuse the shared vertices. Signed-off-by: Zhigang Gong commit 9dafd6fce547a6824c1de98d4309f8f2197ebbd0 Author: Zhigang Gong Date: Sun Jan 8 01:14:12 2012 +0800 glamor-composite: Optimize the computation of composite region. Computing the composite region at the composite_with_shader is very inefficient. As when we call to here from the glamor_glyph's temproary picture, we don't need to compute this region at all. So we move this computing out from this function and do that at the glamor_composite function. This can get about 5% performance gain for aa10text/rgb10text. Signed-off-by: Zhigang Gong commit 2511a00cdd576512f5d7f45707a4a725df2f4618 Author: Zhigang Gong Date: Thu Jan 5 14:26:01 2012 +0800 Fixed a configure bug. Should check the enable-glamor-gles2 before use the variable. And should include the config.h as the GLAMOR_GLES2 macro is defined there. Signed-off-by: Zhigang Gong commit a65e1c736aaa1bb2440a83c42c0410d9d9b58007 Author: Zhigang Gong Date: Wed Jan 4 14:40:24 2012 +0800 Reduce the double check of pixmap's private pointer. As we now add the checking to the Macro, we don't need to check the pointer outside the Macro. Signed-off-by: Zhigang Gong commit e1789893e5fe07fdbd8f21b7fa8a15f6db066592 Author: Zhigang Gong Date: Wed Jan 4 14:37:37 2012 +0800 get_spans: Check whether have a valid fbo before check format. If a pixmap is a pure in-memory pixmap, we do not need to check its format. Format checking has more overhead than checking FBO, so we change to check fbo firtly. Signed-off-by: Zhigang Gong commit 057f52a04d47e6ca5f6dead9c1bc71765d4c7ae8 Author: Zhigang Gong Date: Wed Jan 4 14:34:39 2012 +0800 Track all picture's drawable pict format. Even if a picture's pixmap is a pure in memory pixmap, we still need to track its format. The reason is we may need to upload this drawable to texture thus we need to know its real picture format. As to the MACRO to check whether a pixmap is a picture, we should check whether the priv is non-NULL before we touch its field. Signed-off-by: Zhigang Gong commit 8a4758a358e56b1db481607ff3f7e9375238e5d8 Author: Zhigang Gong Date: Wed Jan 4 13:11:52 2012 +0800 Need to check pixmap priv before touch its field. As now the pixmap may be allocated by DDX and doesn't have a valid pixmap private field. We must check pixmap private pointer before touch its field value. If a pixmap doesn't have a non-NULL private pointer, it doesn't have a valid FBO. Signed-off-by: Zhigang Gong commit 9264335347da641b2626a6b9f56aa05ab313239e Author: Zhigang Gong Date: Sat Dec 31 19:29:17 2011 +0800 Added more drawing functions. As we want to take over all the possible GC ops from the DDX layer, we need to add all the missed functions. This commit also fixed one bug at polylines. We simply drop the bugy optimized code now, as it did not consider of clip info. Signed-off-by: Zhigang Gong commit d42eb04c29d015fb1e4ed4e9ded4c0dd8bc7dc3c Author: Zhigang Gong Date: Sat Dec 31 19:27:33 2011 +0800 Remove useless output messages. Signed-off-by: Zhigang Gong commit fbccc4bbbc84a5459010d3238a00a0dd49111eec Author: Zhigang Gong Date: Sat Dec 31 19:20:10 2011 +0800 Fixed a rendering bug at fillspans. We should not change the points coords when loop for the clip rects. Change to use another variable to store the clipped coords and keep the original coords. This bug cause some XTS failures. Now fix it. Signed-off-by: Zhigang Gong commit 70b6341538cc11f074b02f9dd97d387418245d77 Author: Zhigang Gong Date: Sat Dec 31 19:14:06 2011 +0800 Fixed a bug at putImage. fbPutImage wants the input drawable is the target drawable rather than the backing pixmap. This bug cause some XTS failures, now fix it. Signed-off-by: Zhigang Gong commit 27c4c0457dac307500859ca7a14a1e58465d5e0b Author: Zhigang Gong Date: Tue Dec 27 16:44:17 2011 +0800 Remove the assertion which is not safe sometimes. The original version assumes that each drawable pixmap should have a valid private pixmap pointer. But this is not true after we create this libglamor. As the DDX layer may create a pure software drawable pixmap which doesn't have a private pixmap pointer. Signed-off-by: Zhigang Gong commit c65dc686228262894e0afc9fbe9fe6635d420e2f Author: Zhigang Gong Date: Tue Dec 27 16:42:32 2011 +0800 Export glamor_validate_gc to DDX. This is also a function which may direct access pixmaps which may be a glamor only pixmap and DDX doesn't know how to access it. We have to export this API to DDX driver and let the DDX driver use it to do the validation. Signed-off-by: Zhigang Gong commit f2809745fb641239be5b0281eac569c5b371e55e Author: Zhigang Gong Date: Fri Dec 23 16:21:44 2011 +0800 Flush gl operations when destroy an textured image. Before destroy an image which was attached to a texture. we must call glFlush to make sure the operation on that texture has been done. Signed-off-by: Zhigang Gong commit b36d264ec98440707ed3a94fab430e23d4a1582a Author: Zhigang Gong Date: Fri Dec 23 16:19:39 2011 +0800 Add a new API glamor_create_gc. As at ValidateGC stage, it may need to touch the pixmap directly, for example the tile pixmap. We must export this interface to DDX driver and let the DDX driver to route the processing to us. As this pixmap may be a texture only pixmap, and DDX don't know how to handle it. Signed-off-by: Zhigang Gong commit 3ba546b6998bf1c5d68ff0083017f804ffc48a93 Author: Zhigang Gong Date: Fri Dec 23 16:18:22 2011 +0800 Code cleanup. Remove useless code, and after a fbCreatePixmap, we do not need to modify its header there. Signed-off-by: Zhigang Gong commit 2583620c6cd6a6fedeb7082b526f2751eb6f75b4 Author: Zhigang Gong Date: Fri Dec 23 14:23:56 2011 +0800 Remove useless egl functions. We only need to create image fron external name rather than use drm_image_mesa to create drm image, so remove them. Signed-off-by: Zhigang Gong commit 7285f2e836c56c31a42b8c18a7ebd0e8a7d78fa1 Author: Zhigang Gong Date: Fri Dec 16 20:15:33 2011 +0800 Make sure the devPrivate.ptr of a textured pixmap is NULL. Just in case when wrongly fallback to DDX layer and cause random memory corruption. Pointed out by Chris. Signed-off-by: Zhigang Gong commit 5769d8603ddef6a8023f12bba1d3d3cde83e82d4 Author: Zhigang Gong Date: Fri Dec 16 15:04:33 2011 +0800 Export glamor_create_texture to DDX driver. If DDX failed to create textured pixmap from its BO's handle, it can turn to call this API to create a brand new glamor rather than fallback to pure in memory pixmap. Signed-off-by: Zhigang Gong commit 3f5d53b33978bdb848dd605a19d3fb4ea5f259e0 Author: Zhigang Gong Date: Fri Dec 16 15:02:54 2011 +0800 Correct the logic of glamor_egl_create_textured_pixmap. Discussed with Chris and found the previous logic is not good. Now change it in this commit, this API will just try to create a textured pixmap from the handle provided by DDX driver, if failed simply return FALSE without touch the pixmap. And the DDX driver can choose how to do next step. Signed-off-by: Zhigang Gong commit 8c7fcefb965bfdaaf0576347da20155d0415caa5 Author: Zhigang Gong Date: Tue Dec 13 22:48:34 2011 +0800 glamor-for-ddx: Exports all rendering/drawing functions. This commit exports all the rest rendering/drawing functions to the DDX drivers. And introduce some new pixmap type. For a pixmap which has a separated texture, we never fallback it to the DDX layer. This commit also adds the following new functions: glamor_composite_rects, glamor_get_image_nf which are needed by UXA framework. Just a simple wrapper function of miXXX. Will consider to optimize them next few weeks. This commit also Fixed a glyphs rendering bug pointed by Chris. Signed-off-by: Zhigang Gong commit f7539d9bff0a65b9430dcae8745bf5d4409a9f04 Author: Zhigang Gong Date: Mon Dec 12 09:58:03 2011 +0800 Enable texture dynamic uploading. commit 2d0ea392ec574efb96ac7a04ee72ba580417ba1e Author: Zhigang Gong Date: Mon Dec 12 09:49:06 2011 +0800 Call screen's method to create pixmap. As we may need to fallback to DDX's rendering path during the glyphs, we have to call screen's create pixmap method to create pixmap. Signed-off-by: Zhigang Gong commit 47e86eea563601c4e1e356f7267b935fcdd542f7 Author: Zhigang Gong Date: Mon Dec 12 09:48:04 2011 +0800 Fallback if the pixmap is drm only. Glamor can't do anything with a drm only pixmap. Signed-off-by: Zhigang Gong commit e3d16c9ebdffe8e5793ee253cf9f72b884b42805 Author: Zhigang Gong Date: Mon Dec 12 07:09:03 2011 +0800 Classfy glamor pixmap to different types. During the integration with intel driver, we introduce two new type of pixmap, one is TEXTURE_DRM, the other is DRM_ONLY. TEXTURE_DRM means we create a texture bind to the DRM buffer successfully. And then the texture and the external BO is consistent. DRM_ONLY means that we failed to create a texture from the external DRM BO. We need to handle those different types carefully, so we have to track them in the data structure. Signed-off-by: Zhigang Gong commit 36d424feaeec765d131c015df77d24db1a36fc38 Author: Zhigang Gong Date: Mon Dec 12 06:56:36 2011 +0800 Call glamor_create_pixmap directly in glamor rendering path. When glamor is rendering pixmaps, and needs to create some temporary pixmap, it's better to use glamor version create pixmap directly. As if goes to external DDX's create pixmap, it may create a external DRM buffer which is not necessary. All the case within glamor scope is to create a texture only pixmap or a in memory pixmap. Signed-off-by: Zhigang Gong commit 10ad332dedad2df13212dcd198d947a2f5c76862 Author: Zhigang Gong Date: Sun Dec 11 08:06:13 2011 +0800 Remove garbage file. Signed-off-by: Zhigang Gong commit 92fd83872f5509a2792338b4665dc2b3e1ed68cd Author: Zhigang Gong Date: Sun Dec 11 02:26:15 2011 +0800 Remove the access mode from private pixmap structure. Change the finish_access to pass in the access mode, and remove the access mode from the pixmap structure. This element should not be a pixmap's property. Signed-off-by: Zhigang Gong commit d135e879a6c8698bf21ae44a02315f370b961b14 Author: Zhigang Gong Date: Fri Dec 9 16:01:45 2011 +0800 Can't create KHR image if the depth is uncompatible. Currently, KHR image only support one color format ARGB32. For all other format, we have to fail to create corresponding image and texture here. Signed-off-by: Zhigang Gong commit b5630663cf9438383166f59cdfc7889571f2cd62 Author: Zhigang Gong Date: Fri Dec 9 15:58:19 2011 +0800 exports more rendering functions to DDX driver. Exports all necessary rendering functions to DDx drivers, including CopyArea, Glyphs, Composite, Triangles, .... Signed-off-by: Zhigang Gong commit b5480e64ac4a72bdc31e587ff9e51d67a1a0f11d Author: Zhigang Gong Date: Fri Dec 9 14:57:24 2011 +0800 Override create/destroy picture to track pict format. When create a piccture, we need to attach a pixmap to it. A pixmap only has a depth, which is not sufficant for glamor. As in openGL texture only has a few internal formats which is not sufficant to represent all the possible picture format. So we always transform the picture format to GL_RGBA. And when we need to read back the picture, we must know the original picture format. So we have to override create and destroy picture to track a pixmap's real picture format if it is attached to a picture. Signed-off-by: Zhigang Gong commit 7b2310834d83198fc88b5a5fb062cb1c9ee19ead Author: Zhigang Gong Date: Tue Nov 22 18:28:10 2011 +0800 Added a missed header file. Pointed by Chris, we must add xorg-server.h at the top of each file before we include any other xorg header files. Otherwise, it may cause incorrect XID length. This commit also fixes one compilation warning in X86_64 platform. Signed-off-by: Zhigang Gong commit 90eaac96aeb53b3e45b82dc7dd4e98778c8c9343 Author: Zhigang Gong Date: Tue Nov 15 20:17:18 2011 +0800 If caller is not using glamor screen, we can't register the block handler. Signed-off-by: Zhigang Gong commit 9ff39e53eb20673d42f42c94adb55bf9a9f1c285 Author: Zhigang Gong Date: Tue Nov 15 20:16:16 2011 +0800 Revert "Disable glamor_tile temporary." The previous corruption output is caused by GLAMOR/UXA flushing issue. Now get fixed. This reverts commit 0d2d3e4f051e48c3499e1c972e012803a8623526. commit 13ab4d59afb824f2a4c03280fffe79c6ba9aa26c Author: Zhigang Gong Date: Fri Nov 11 14:55:12 2011 +0800 Disable glamor_tile temporary. Enable glamor tile cause corrupted output. Need more investigation. Signed-off-by: Zhigang Gong commit 9b6a484df0724d72dd27ad620672e7a762a460df Author: Zhigang Gong Date: Fri Nov 11 10:26:00 2011 +0800 Add new version glamor_poly_fill_rect without internal fallback. If need fallback, this new version just returns FALSE without doing anything. It's the caller's responsibility to implement fallback method. Signed-off-by: Zhigang Gong commit ba1b3b53240b5d499791570ba9f598a4e421c719 Author: Zhigang Gong Date: Wed Nov 9 16:09:03 2011 +0800 Add new version glamor_fillspans without internal fallback. For the purpose of incrementally intergration of existing intel driver, for the GC operations we may don't want to use glamor's internal fallback which is in general much slower than the implementation in intel driver. If the parameter "fallback" is false when call the glamor_fillspans, then if glamor found it can't accelerate it then it will just return a FALSE rather than fallback to a slow path. Signed-off-by: Zhigang Gong commit b861aad8e2fcf6fe1fae4f26abb650bb4eb499c6 Author: Zhigang Gong Date: Wed Nov 2 13:44:50 2011 +0800 Initial version. Signed-off-by: Zhigang Gong commit 2dbbe2565052cc024ce0e98918ed34c1239b780a Merge: 4d6264614 7982eca62 Author: Eric Anholt Date: Wed Dec 18 11:21:07 2013 -0800 Merge branch 'glamor-gongzg-merge' commit 7982eca622bbc4b6a4845801a77da8a16138004a Author: Eric Anholt Date: Wed Dec 18 11:16:15 2013 -0800 Revert changes outside of glamor from the glamor branch. We want to merge the external glamor code to the xserver, with the internal history retained. However, we don't want a bunch of non-building changes along the way, so remove all the build system and support code outside of glamor for now. commit 4d62646142718024b0981eb4f1fd0131e829161f Merge: f4bfb14f5 81ba89d67 Author: Keith Packard Date: Mon Dec 16 09:27:57 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit f4bfb14f53a939574da1f5995f0dad949898b86a Author: Adam Jackson Date: Thu Dec 12 10:57:40 2013 -0500 configure: Fix a typo near dri3/shmfence detection " is not the mate of ]. Reviewed-by: Jasper St. Pierre Signed-off-by: Adam Jackson commit 8248b4af31ef71ac03158871b77f20eb456dbe38 Author: Adam Jackson Date: Fri Dec 13 15:07:48 2013 -0500 glx: Add null pointer protection to __glGetProcAddress This can't happen when GLX is the backing window system, but can elsewhere. We may as well protect against it at a high level. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 128449dd6498a2f74c3770f89a9dae0f70e2b351 Author: Adam Jackson Date: Fri Dec 13 11:39:16 2013 -0500 present: Don't use the major/minor version from the protocol headers We want to advertise the version we implement, not the version the protocol headers happen to describe. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit ec6087bf070131bc3a26848fb9fb840f09b0e19d Author: Adam Jackson Date: Fri Dec 13 11:36:38 2013 -0500 dri3: Don't use the major/minor version from the protocol headers We want to advertise the version we implement, not the version the protocol headers happen to describe. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit e6fafd3de70d315130fb6e5732cfd02a5901b788 Author: Adam Jackson Date: Fri Dec 13 11:28:59 2013 -0500 dri3: Guard against buggy clients There's nothing to stop a client from sending these requests to screens without DRI3 support, and if they do, we'll crash. Let's not do that. Reviewed-by: Jasper St. Pierre < Signed-off-by: Adam Jackson commit 81ba89d6703a22178a153aa39478ba2d4bde262b Author: Jeremy Huddleston Sequoia Date: Fri Dec 13 01:39:44 2013 -0800 configure.ac: Add PRESENT_LIB to XQUARTZ_LIBS Undefined symbols for architecture x86_64: "_present_extension_init", referenced from: _staticExtensions in libXquartz.a(miinitext.o) "_present_register_complete_notify", referenced from: ___glXregisterPresentCompleteNotify in libglx.a(glxcmds.o) Signed-off-by: Jeremy Huddleston Sequoia commit d7c9235ee261b0f780320985233e00dec5e2689c Author: Jeremy Huddleston Sequoia Date: Sat Dec 7 01:36:33 2013 -0800 XQuartz: Use asl_log_descriptor to log stdout/stderr of child processes Signed-off-by: Jeremy Huddleston Sequoia commit ad8111d7c971ce448905c733d65ba0cfc72bdca4 Author: Jeremy Huddleston Sequoia Date: Sat Dec 7 01:14:37 2013 -0800 darwin: Don't leave stdin/stdout closed Signed-off-by: Jeremy Huddleston Sequoia commit 929795d50d788358d6269ce423f72c6cc40e334b Author: Peter Hutterer Date: Tue Dec 3 10:14:51 2013 +1000 dix: fix check for grab type Signed-off-by: Peter Hutterer commit 23394c7fea0f5c33333198c87ecfecc9f6c6a791 Author: Peter Hutterer Date: Tue Dec 3 08:36:45 2013 +1000 Xi: ungrab device when releasing a passive grab without ButtonReleaseMask (#71878) If an touch triggers an async button grab and that grab does not have the ButtonReleaseMask set, the TouchEnd is never delivered, deliveries is 0 and the grab is never deactivated. If the grab is pointer async and keyboard sync, the keyboard events are stuck in EnqueueEvent until some other pointer event terminates the grab. Change this to check for the number of listeners. If we're about to deliver a TouchEnd to a passive pointer grab, the number of listeners is already 1 - pointer grabs always accept so other listeners were removed. X.Org Bug 71878 Signed-off-by: Peter Hutterer commit c1d30b5bd7f90e68bc38404fd0cc32578d6d3018 Author: Ben Gamari Date: Thu Nov 21 21:24:20 2013 -0500 Xi: Don't ActivateEarlyAccept POINTER_REGULAR listeners Bug #71878 describes a bug resulting in the server ceasing to respond to keyboard input after a touch event. The problem might be the following: DeliverTouchBeginEvent tries to deliver an event to a listener of type LISTENER_POINTER_REGULAR, taking the following if branch, if (listener->type == LISTENER_POINTER_REGULAR || listener->type == LISTENER_POINTER_GRAB) { rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, grab, xi2mask); if (rc == Success) { listener->state = LISTENER_IS_OWNER; /* async grabs cannot replay, so automatically accept this touch */ if (dev->deviceGrab.grab && dev->deviceGrab.fromPassiveGrab && dev->deviceGrab.grab->pointerMode == GrabModeAsync) ActivateEarlyAccept(dev, ti); } goto out; } DeliverTouchEmulatedEvent succeeds. The deviceGrab meets all three of the conditions of the inner if, enters ActivateEarlyAccept which then fails due to, BUG_RETURN(ti->listeners[0].type != LISTENER_GRAB && ti->listeners[0].type != LISTENER_POINTER_GRAB); That is, despite listener->type == LISTENER_POINTER_REGULAR. With my non-existent knowledge of XINPUT, it seems like the solution here might be to only ActivateEarlyAccept when listener->type == LISTENER_POINTER_GRAB. Signed-off-by: Ben Gamari Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fe07ec19e212a68076560d243a2a935c54589068 Author: Keith Packard Date: Tue Dec 10 11:27:47 2013 -0800 present: recursively set window pixmaps on flip Newly created windows inherit the pixmap of their parent, similarly, reparenting a tree inherits the pixmap of the destination tree. Making present preserve the invariant that unredirected windows always have the same pixmap as their parent ensures that the above cases work correctly. v2: name the recursive function to 'set_tree_pixmap' instead of 'set_window_pixmap' Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b3533d0b212b6747a8f9a01931253d6bdb648ee2 Author: Keith Packard Date: Tue Dec 10 10:29:11 2013 -0800 Bump version to 1.14.99.904 (1.15 RC4) Signed-off-by: Keith Packard commit 9a4d7572fe3be16bb5aded5f48d4217fdf725b1d Author: Jon TURNEY Date: Thu Sep 27 18:59:45 2012 +0100 hw/xwin/glx: Rewrite WGL wrappers after Xserver conversion to direct GL dispatch v1: Rewrite by Marc Haesen of the WGL wrapper function generation script to use Khronos group XML. v2: Remove -dispatchheader option, since dispatch.h doesn't exist anymore, use the private glapi interface to construct the GL dispatch table for the native WGL thunks. v3: Rewrite to generate shims for the OpenGL 1.2.1 (GL 1.2 + GL_ARB_imaging +GL_ARB_multitexture + GL_ARB_texture_compression(?)) functions the server links directly with rather than libGL. These shims dispatch to either the mesa GL DLL, or a thunking DLL containing cdecl-to-stcall wrapper functions for the native GL DLL. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit cb48877a3c4cfb1ae2248000fcd3443e3092bdaa Author: Jon TURNEY Date: Fri Dec 6 14:00:21 2013 +0000 glx: Consistently use ARB-suffixed names for ARB_multitexture functions At the moment we have a mix of ARB and non-ARB suffixed forms for ARB_multitexture functions e.g. glMultiTexCoord1fvARB and glMultiTexCoord1dv Consistently use the ARB-suffixed form, assuming that is present in all libGL which provide the OpenGL 1.2.1 ABI we expect to be able to directly link with. Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 1a021f57a1e75ab63e8f87704f0394162402c4d4 Author: Jon TURNEY Date: Sun Dec 1 22:25:46 2013 +0000 ephyr: Fix compilation when ./configure'd with --enable-debug /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessMouseMotion’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:946:188: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonPress’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:980:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c: In function ‘ephyrProcessButtonRelease’: /jhbuild/checkout/xorg/xserver/hw/kdrive/ephyr/ephyr.c:1007:186: error: ‘ephyrCurScreen’ undeclared (first use in this function) Fix ephyr compilation when ./configure'd with --enable-debug after commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b, some instances of ephyrCurScreen were not converted to screen->pScreen->myNum. v2: Don't use a trivial local variable which will be unused when ./configure'd with --disable-debug Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit 875dbcef5bfcb6a94ef8456be6151e133408793f Author: Jon TURNEY Date: Fri Nov 29 14:29:20 2013 +0000 configure.ac: Link XWin with present extension if we are building with it enabled Signed-off-by: Jon TURNEY Reviewed-by: Adam Jackson commit e61e19959d9138d5b81b1f25b7aa3e257918170d Author: Adam Jackson Date: Tue Dec 3 13:45:43 2013 -0500 xquartz/glx: Convert to non-glapi dispatch CGL doesn't have anything like glXGetProcAddress, and the old code just called down to dlsym in any case. It's a little mind-warping since dlopening a framework actually loads multiple dylibs, but that's just how OSX rolls. Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia commit a668aa0e41bc33ff2db7f9c53b6dc321a96926a9 Author: Adam Jackson Date: Tue Dec 3 15:03:13 2013 -0500 drisw: Wire up GetProcAddress Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 4fcdfeb7bc55d00d50d7f89788d9b929946ae3d9 Author: Adam Jackson Date: Tue Dec 3 15:02:57 2013 -0500 dri2: wire up GetProcAddress Signed-off-by: Adam Jackson Reviewed-by: Keith Packard commit 47f00b3920be9d8df8b148263d744934f3a02cd4 Author: Adam Jackson Date: Tue Dec 3 15:01:44 2013 -0500 glx: Untangle the prototypes around the GetProcAddress thunk Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit c1fd143f2847ef425ec9891d9e1cba44a1bb007d Author: Adam Jackson Date: Tue Dec 3 13:11:52 2013 -0500 glx: Remove function stubs Now that we're calling non-1.2 ABI things by function pointer this is no longer needed. Signed-off-by: Adam Jackson Reviewed-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit 6b93e1f5ff39c6ac5b0d97d4245aeac9113eed8b Author: Adam Jackson Date: Tue Dec 3 13:11:09 2013 -0500 glx: Convert non-generated function pointer thunking Same concept as the generated code conversion. Signed-off-by: Adam Jackson Reviewed-by: Jon TURNEY commit c4567a376083eb7b142a7f003ddf8372d376ea86 Author: Adam Jackson Date: Tue Dec 3 12:40:24 2013 -0500 glx: Convert generated code function pointer thunking We're meant not to call these by name due to ABI. Rather than try to generate a bunch of little stub functions that do the lookup, just inline it all directly into the calling function. This does not cache results. That's fine, this is not a performance path, and if we're atop WGL then we effectively have to do this every time anyway because wglGetProcAddress results are context-dependent. Signed-off-by: Adam Jackson Jon TURNEY commit f69f4f417c6807405e45289b39a80f1b9a55f9e6 Author: Keith Packard Date: Tue Dec 10 07:09:17 2013 -0800 Depend on latest glproto (1.4.17) Signed-off-by: Keith Packard commit 576f3d36dd324bd0d16c9968f1ded5c5eead3569 Author: Adam Jackson Date: Mon Dec 9 13:16:01 2013 -0500 damageext: Die if we can't create the Xinerama resource type Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit f10f36d91db1b21c2ce5a531b4fa5f96fcbdc2f0 Author: Adam Jackson Date: Mon Sep 16 15:17:26 2013 -0400 damageext: Xineramify (v7) v7: Don't bother making resources for the backing listeners. [keithp] This is now slightly unlike how other resources are xineramified. We create N+1 internal damage listeners, one that's a real resource and reflects the protocol view, and then one per backend screen where the report function piles onto the protocol view. The internal listeners are not stored in the resource database directly, they just hang off the xinerama resource. We don't wrap Subtract at the dispatch level, but we do extend it for the Xinerama case to clip to the root window geometry. As a result of the N+1 design here, the damage reports we generate are not quite minimal. However they are indistinguishable from sequential rendering events happening before the client hears damage, and we don't need to add a post-dispatch callback just for this one extension. Add is probably (still) somewhat broken since it will only hit screen 0, but Add really only exists for DRI1's sake, and DRI1 disables itself with Xinerama enabled anyway. In the absence of a use case, I'm leaving it unwrapped under Xinerama; if someone wants to define how it ought to work, be my guest. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 808303fe5232ba0320ae5a4310b1ed1322e85f1d Author: Adam Jackson Date: Mon Nov 4 17:49:34 2013 -0500 fixes: Fix PanoramiXSetWindowShapeRegion for root windows (v2) Root windows in Xinerama are in the coordinate space of their root window pixmap, not in protocol space. v2: Only translate for root windows, sice the window shape is drawable-relative. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 5c10c7ea2129b70015e745523918d143cc29318d Author: Adam Jackson Date: Mon Nov 4 17:49:33 2013 -0500 fixes: Fix PanoramiXSetPictureClipRegion for root windows (v2) Root windows in Xinerama are in the coordinate space of their root window pixmap, not in protocol space. This fixes 'xcompmgr -n' when Xinerama is active. v2: Only translate for root windows, since the clip origin is drawable-relative. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 1dd839a425adc6e5a1dc377003ed86a374d81f0b Author: Adam Jackson Date: Thu Nov 7 13:59:30 2013 -0500 composite: Fix COW creation for Xinerama (v2) Say you have two 800x600 screens left/right of each other. A window that's 200x200 at +700+0 in protocol coordinate space will appear to be at -100+0 in the coordinate space of the right hand screen. Put another way: windows are in the coordinate space of their root window pixmap. We weren't doing this translation for the COW, so when rendering came in to it you'd see the top-left chunk of the COW on all screens. Cool effect and all, but wrong. v2: Only translate when Xinerama is active [keithp] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 8dbe456abae1a32fb6c5c74fa456bc7301cccabe Author: Adam Jackson Date: Tue Oct 29 10:44:07 2013 -0400 xinerama: Export the screen region damageext wants this so it can intersect subtract requests against the root window geometry. Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit c6d4c2a24140feee4ceae48c4c74fedcae9b68b3 Author: Adam Jackson Date: Fri Nov 15 15:13:31 2013 -0500 xfree86: Prefer fbdev to vesa On UEFI machines you'd prefer fbdev to grab efifb instead of vesa trying to initialize and failing in a way we can't unwind from. On BIOS machines this is harmless: either there is an fbdev driver and it'll probably be more capable, or there's not and vesa will kick in anyway. Reviewed-by: Alex Deucher Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7b5d4f147fdef9edfeaa9c6565375111079efd11 Author: Adam Jackson Date: Tue Nov 5 10:12:28 2013 -0500 composite: Don't double-redirect if someone asks for backing store twice v2: Belt-and-suspenders the unredirection path [vsyrjala] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit a2b2c271e0ca87d3188ba2741b6db9bbbdc599f5 Author: Adam Jackson Date: Tue Nov 5 10:08:17 2013 -0500 composite: Automatically enable backing store support on the screen ... unless you explicitly disabled it with -bs on the command line, or with the corresponding thing in xorg.conf. v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala] v3: s/TRUE/WhenMapped/ [jcristau] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit e0cac005608a2e5618c7be59701318d684e0bb93 Author: Adam Jackson Date: Tue Nov 5 09:58:17 2013 -0500 bs: Set the screen's bs support level to WhenMapped Since we're using RedirectAutomatic to do this, we don't actually preserve contents when unmapped. v2: Don't say WhenMapped if Composite didn't initialize [vsyrjala] Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit b61ccd5d9d368f3fbbae27ce14ac02a3db1884c4 Author: Adam Jackson Date: Tue Nov 5 10:20:04 2013 -0500 smartsched: Tweak the default scheduler intervals A default timeslice of 20ms means a pathological client can ruin up to two frames per scheduler tick. And a fifth of a second is just insane. Pick two different numbers out of the hat. A 5ms slice means you can probably keep up with two or three abusive clients, and letting it burst to 15ms should give you about all the timeslice you need for a fullscreen game (that's doing server-side rendering for some reason). If you're running on a system with a 10ms granularity on SIGALRM, then this effectively changes the intervals to 10ms and 30ms. Which is still better, just not as better. I suspect this is about as good as we can do without actually going preemptive, which is an entire other nightmare. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 66310ea2893811614b3c3aade8992624a95a6ee7 Author: Adam Jackson Date: Fri Nov 8 09:22:37 2013 -0500 dri3: Disable when Xinerama is active Pretty sure this can't work. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 793fd5eefb0e417614d77fe1522c6548587fbd4e Author: Adam Jackson Date: Fri Nov 8 09:20:29 2013 -0500 dri2: Disable when Xinerama is active Would only work on ScreenRec 0, which means it's broken. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 2bf92108294805c5c6fef249c2f7de6ecf4975d8 Author: Adam Jackson Date: Fri Nov 8 09:06:59 2013 -0500 present: Disable when Xinerama is active Among much else Present depends on RANDR types, and RANDR isn't properly Xinerama-aware yet anyway. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit ac772cb187ddf7e04b8f4b3a071b90f18f4488d0 Author: Eric Anholt Date: Thu Nov 14 17:40:47 2013 -0800 glx: Fix incorrect use of dri_interface.h version defines in driver probing. If we extend __DRI_CORE or __DRI_SWRAST in dri_interface.h to allow a new version, it shouldn't make old server code retroactively require the new version from swrast drivers. Notably, new Mesa defines __DRI_SWRAST version 4, but we still want to be able to probe version 1 drivers, since we don't use any features beyond version 1 of the struct. Signed-off-by: Keith Packard Reviewed-by: Ian Romanick commit 6e926b18ca1b182253bac435a1d53caaff7ffff6 Author: Eric Anholt Date: Thu Nov 14 17:40:46 2013 -0800 glx: Fix incorrect use of dri_interface.h version defines in extensions. Those defines are so you can compile-time check "do I have a dri_interface.h that defines this new field of the struct?" You don't want the server to claim it implements the new struct just because you installed a new copy of Mesa. Signed-off-by: Keith Packard Reviewed-by: Ian Romanick commit 57a8ce927332e855dd29ff30210a211a907adb25 Author: Jon TURNEY Date: Fri Nov 29 12:26:43 2013 +0000 configure.ac: Fixup for "Require libpciaccess for int10" On 16/11/2013 01:00, Connor Behan wrote: > A --disable-pciaccess build will fail with an int10 module other than > stub. > > Signed-off-by: Connor Behan > --- > configure.ac | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/configure.ac b/configure.ac > index 5e621e0..a843770 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1822,6 +1822,9 @@ if test "x$XORG" = xyes; then > if test "x$CONFIG_UDEV_KMS" = xyes; then > AC_MSG_ERROR([Platform device enumeration requires libpciaccess]) > fi > + if test "x$INT10" != xstub; then > + AC_MSG_ERROR([Cannot build int10 without libpciaccess]) > + fi > fi > AC_MSG_RESULT([$PCI]) > This causes my build to fail where --disable-int10-module --disable-pciaccess is the default (as INT10 still has the default value 'x86emu') Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia Tested-by: Jeremy Huddleston Sequoia Signed-off-by: Keith Packard commit 653d33941b0808ef910aaa5f3aeab05d9c1a100b Author: Keith Packard Date: Tue Nov 26 12:18:12 2013 -0800 present: Report damage when flipping Limit damage to the 'update' region. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 5cf12c9569ac3d83fe1b7a8376c15f8f0b01655e Author: Keith Packard Date: Tue Nov 26 12:10:48 2013 -0800 present: Also set the root window pixmap when flipping This makes sure that things like software cursors continue to work while the screen is flipped. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4aa77378de69efdc10bced6ba650b0ebff50c112 Author: Keith Packard Date: Tue Nov 26 12:06:57 2013 -0800 present: Clear target_crtc if driver lacks Present support If the driver doesn't have the necessary hooks for Present, then the target_crtc needs to be set to NULL to make sure the extension uses the present_fake code. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund Reviewed-by: Adam Jackson commit 3dd5bfe540b295bb37a2c2fd0ba4a31fb217612b Author: Keith Packard Date: Thu Nov 21 22:48:31 2013 -0800 present: Send GLX_BufferSwapComplete events from present extension This allows GL to support the GLX_INTEL_swap_event extension. v2: Return GLX_BLIT_COMPLETE_INTEL for unknown swap types Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit cde86e68fcb716f34c90f5a16eb868870f5c85e4 Author: Keith Packard Date: Mon Nov 25 23:06:08 2013 -0800 present: Set window pixmap to flipped pixmap This makes other drawing to the window appear on the screen. Note that no child windows can be affected because only full-screen windows are eligible for flipping, and so we only need to set pixmap for the window itself. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 04e138846e128670d409798aa2e797c3c5503a47 Author: Keith Packard Date: Mon Nov 25 23:10:17 2013 -0800 present: Leave vblank on window list until flip complete If the window is destroyed, then we've got cleanup work to do, even if the vblank has already been executed -- we need to clear the window pointer so that we don't try to deliver events to it. Leaving it on the window list meant that when walking that list, we need to know whether the vblank is waiting to be executed or waiting for the flip to complete, so a new 'queued' flag was added to the vblank to distinguish between the two states. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit b121d62accb8c346b4e1b1bce99586e13712f04a Author: Keith Packard Date: Tue Nov 26 03:07:55 2013 -0800 present: Add a debug output line when skipping a pending present When an application provides two pixmaps for the same MSC, the previous one is skipped. This just dumps out some information at that point Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit ae24f5bf6b31c035af50e14727966055ed8767bd Author: Maarten Lankhorst Date: Tue Dec 3 17:01:28 2013 +0100 bump to 0.8.1 commit 59e324abd7cbda5d301b7b67125cd6d96684f000 Author: Thierry Reding Date: Tue Nov 26 17:08:03 2013 +0100 Properly identify DSI outputs Newer Linux kernels support DSI outputs. To be able to identify them properly, add DSI to the list of output names. Reviewed-by: Aaron Plattner Signed-off-by: Thierry Reding commit 190289f6393191bb3c58067ce1df994809475077 Author: Thierry Reding Date: Tue Nov 26 17:08:02 2013 +0100 Staticise and constify output names This array isn't used anywhere outside this file, so it can be made static. While at it, make the array const as well. Signed-off-by: Thierry Reding Reviewed-by: Aaron Plattner commit eafba23b34be31c141ddafb8380520ac9a0622ac Author: Keith Packard Date: Thu Nov 21 22:45:18 2013 -0800 miext/sync: Handle libxshmfence API change libxshmfence had an unfortunate 'int32_t' type for the mapped fence. That changed to exposing a 'struct shmfence' instead, which is nice and opaque and offers fine type checking across the API. This patch requires the newer version of the library and uses the new interface type. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit b6d7ed4d787a652e8150532f384bfdf51760f3c2 Author: Keith Packard Date: Thu Nov 21 22:12:34 2013 -0800 miext: Move SyncShm FDs out of the way of clients Applications may end up allocating a bunch of shmfence objects, each of which uses a file descriptor, which must be kept open lest some other client ask for a copy of it later on. Lacking an API that can turn a memory mapping back into a file descriptor, about the best we can do is push the file descriptors out of the way of other X clients so that we don't run out of the ability to accept new connections. This uses fcntl F_GETFD to push the FD up above MAXCLIENTS. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit cc63204926c6da83d9221c5f8c0dc8f5e2f2481d Author: Keith Packard Date: Wed Nov 13 14:16:33 2013 +0900 Xext: Use SHMDIR and O_TMPFILE when creating mapping files ShmCreateSegment asks for a file descriptor for a memory mapped file created by the X server. This patch uses O_TMPFILE where available, and also uses the SHMDIR directory to store the files, both for the O_TMPFILE and mkstemp cases. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit 5a969f0928b84da5cfe0777dfb542caaacc915ad Author: Keith Packard Date: Wed Nov 13 12:17:10 2013 +0900 Select directory for MIT-SHM temp files at configure time By default, this looks through a list of directories to find one which exists, but can be overridden with --with-shared-memory-dir=PATH This patch doesn't actually do anything with this directory, just makes it available in the configuration Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit d695cb7fb6bb8fd159a332d902673edbbd2237d7 Author: Alan Coopersmith Date: Mon Nov 25 22:19:34 2013 -0800 Xdmx: Initialize DMX extension even if not built with GLX support dmxAddExtensions takes an argument to determine if it should just initialize the DMX extension, or both DMX & GLX, but if GLX wasn't compiled in, the entire call was #ifdef'ed out, leaving the DMX extension unavailable. Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit bd70def07754357d26b86c287037eb3884631daf Author: Connor Behan Date: Fri Nov 15 17:00:40 2013 -0800 configure.ac: Require libpciaccess for int10 A --disable-pciaccess build will fail with an int10 module other than stub. Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a575c1dc64c10bc88bd0e963ebb8ab137f59a078 Author: Connor Behan Date: Fri Nov 15 17:00:20 2013 -0800 configure.ac: Require libpciaccess for platform bus support There is currently no reason to build with --enable-config-udev-kms and --disable-pciaccess but anyone who tries this should know that the build will fail. Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 361dfe74eaa2f1eddb54abdecca1d8b1b3f58704 Author: Connor Behan Date: Fri Nov 15 17:00:00 2013 -0800 configure.ac: Add whitespace near PCI configuration Signed-off-by: Connor Behan Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 80481267662c8687e73081237913fa561e7a6561 Author: Keith Packard Date: Sat Nov 23 22:22:37 2013 -0800 Bump release to 1.14.99.903 (1.15 RC3) Signed-off-by: Keith Packard commit f1604002a32b7f098c2a16b4a8649c694af570c8 Author: Keith Packard Date: Mon Nov 18 22:36:17 2013 -0800 miext: Ensure xshmfence is only called when driver supports it This provides a place for drivers to insert their own FD-based SyncFence implementations, and prevents applications from using DRI3 SyncFence creation functions unless the driver has some support for them. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund commit 037566c57caff93fd7717f385d4b532b81f19c77 Author: Keith Packard Date: Mon Nov 18 22:33:27 2013 -0800 Xext: Recover from miSyncInitFenceFromFD failure without crashing miSyncDestroyFence must not be called unless miSyncInitFence has been invoked, so if miSyncInitFenceFromFD fails, we must free the fence manually. Signed-off-by: Keith Packard Tested-by: Fredrik Höglund commit e7000534a456fdf9cd4eaada3193846c8525f740 Author: Chris Wilson Date: Sat Oct 5 08:47:03 2013 +0100 glx/glxdri2: Unwrap EnterVT/LeaveVT upon CloseScreen In a similar spirit to commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b Author: Keith Packard Date: Mon Jul 12 16:01:34 2010 -0700 Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 we need to unwrap our pScrn->EnterVT/LeaveVT hooks around server regeneration or else we cause an infinite recursion on the next VT switch afterwards. Bugzilla: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/1235516 Signed-off-by: Chris Wilson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 6d5883bd7e5b765f8f0548501b825d9e56840799 Author: Keith Packard Date: Sat Nov 23 16:19:46 2013 -0800 xnest: Ignore GetImage() error in xnestGetImage() (v3) (I found an amended version of this patch and applied the difference here - keithp) v3: Don't call Xsync before restoring error handler as any errors generated by XGetImage() should be processed when this call returns as suggested by Jamey Sharp Signed-off-by: Egbert Eich Reviewed-by: Jamey Sharp commit 6403cbb143c67872ca9c58e3116ae7942def0ae1 Author: Keith Packard Date: Tue Nov 19 22:13:54 2013 -0800 present: When unflipping, copy to flip window rather than screen unflip happens after the clip lists have been updated, so instead of smashing the whole screen and drawing over other windows, just draw to the original flip window; it'll have the right clip list and so the copy will work just fine. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8bdd2ccc776ded3f527596b5009ef25129aa3287 Author: Keith Packard Date: Mon Nov 11 18:03:42 2013 -0800 present: Block for wait_fence in present_execute Pend presentation until wait_fence is also triggered by having the SyncFence trigger invoke present_execute once triggered. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e5a188cb919edee2e3a03054276bce0db02f7b62 Author: Keith Packard Date: Sat Nov 9 12:36:47 2013 -0800 present: Signal destroyed flip window with vblank->window == NULL This eliminates dereferencing freed window pointers when there is a flip for that window in progress. The flip will complete, and then immediately get undone (as we can't stop an in-progress flip). Remove the vblank->window_destroyed field as we can signal this with vblank->window == NULL instead. Change check to vblank->window == NULL in: present_flip_notify Add check for vblank->window == NULL in: present_vblank_notify present_execute present_flip_notify was also using vblank->window->drawable.pScreen, so stop doing that and use vblank->screen instead. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit a5bcc4f7b9499caf8993f0a6ef96088553399ca3 Author: Keith Packard Date: Sat Nov 9 12:33:02 2013 -0800 present: Ignore event_id 0 from driver vblank notify We use event_id 0 to mean 'no such event'; if a driver sends us that event_id, make sure we don't accidentally match it. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 4f3c37a1f17ffcfbbff71d217e1caad3d0148c90 Author: Keith Packard Date: Thu Nov 7 14:17:12 2013 -0800 present: Round fake MSC computations intead of truncating If the timer fired too early, we'd sometimes mis-compute the MSC for fake vblanks. Rounding the computation to the nearest MSC fixes this nicely. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit da9997f89f14ab619f244d5b2e80a423b028c789 Author: Peter Hutterer Date: Tue Nov 19 08:07:09 2013 +1000 configure: allow for --enable-libunwind and --disable-libunwind Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a307ac27382dd0c377cd1a436cb25cb5aaa54416 Author: Keith Packard Date: Fri Nov 15 13:39:52 2013 +0900 Handle new DamageUnregister API which has only one argument API change in 1.15 Signed-off-by: Keith Packard commit d6ffce4b0e2376e1f8f04ee70b323a6aea3e517e Author: Keith Packard Date: Fri Nov 15 13:26:36 2013 +0900 Clean up compiler warnings. Add const to any immutable string pointers. Rename 'range' to 'prop_range' to avoid redefined warning. Eliminate some unused return values. Signed-off-by: Keith Packard commit 29240e5cbf6e7f875b128fc7bfc4d56b2350835a Merge: 0492deb8f 8ff7e32c3 Author: Keith Packard Date: Thu Nov 14 17:02:04 2013 +0900 Merge remote-tracking branch 'whot/for-keith' commit 0492deb8f8238b7782e5a706ec6219d88aa1091d Author: Adam Jackson Date: Tue Oct 29 12:09:27 2013 -0400 mieq: Bump default queue size to 512 Based on some bugzilla scraping I did around November 2012. Of xserver bugs in Red Hat bugzilla with an EQ size message in the log, the distribution looked like: String | Matches ------------------------------------- Increasing EQ size to 512 | 460 Increasing EQ size to 1024 | 52 Increasing EQ size to 2048 | 6 Increasing EQ size to 4096 | 0 Most of the "512" ones appear to be mostly harmless, some relatively expensive path in either rendering or resource destruction simply taking too long due to external pressures like paging or CPU contention. So let's raise the initial queue size, both to reduce the number of spurious abrt reports and to drop fewer events in all but the most pathological cases. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit d1440783a7367ff0d0c47d256bbca3b3cf8a5034 Author: Dave Airlie Date: Tue Oct 29 12:09:26 2013 -0400 xfree86: return NULL for compat output if no outputs. With outputless GPUs showing up we crash here if there are not outputs try and recover with a bit of grace. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit d7ee27e5e415778240919082c83a65226c6f17e6 Author: Dan Horák Date: Tue Oct 29 12:09:25 2013 -0400 test: build the touch test only when building Xorg Reviewed-by: Adam Jackson Signed-off-by: Dan Horák Signed-off-by: Keith Packard commit 8ff7e32c3ef7b0c13c4ab9664f651e9782d35a85 Author: Peter Hutterer Date: Wed Nov 13 17:14:11 2013 +1000 include: export key_is_down and friends VNC needs key_is_down to check if a key is processed as down before it simulates various key releases. Make it available, because I seriously can't be bothered thinking about how to rewrite VNC to not need that. Signed-off-by: Peter Hutterer Acked-by: Keith Packard commit 0ba7fc8472f1227fd1cd51bd58048f164b8ea1ab Author: Alan Coopersmith Date: Tue Nov 12 14:46:04 2013 -0800 Stop including inline assembly .il file for Solaris Studio builds Since all the inb/outb/etc. use in the X server itself (except for xf86SlowBcopy) has been replaced by calls to libpciaccess, we no longer need to pass inline assembly files to replace the gcc inline assembly from hw/xfree86/common/compiler.h when building Xorg itself. The .il files are still generated and installed in the SDK for the benefit of drivers who may use them. Binary diff of before and after showed that xf86SlowBcopy was the only function changed across the Xorg binary and all modules built in the Xserver build, it just calls the outb() function now instead of having the outb instructions inlined, making it a slightly slower bcopy. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 550baf38f6096658f0bcf0ad647c4fedf93132f2 Author: Peter Hutterer Date: Fri Oct 4 10:55:52 2013 +1000 kdrive: fix cursor jumps on CursorOffScreen behavior This patch fixes cursor jumps when there is a grab on the Xephyr window and the pointer moves outside the window. So on two side-by-side 640x480 screens, a coordinate of 0/481 triggers KdCursorOffscreen. If the delta between two screens is 0, they share the same offset for that dimension. When searching for the new screen, the loop always rules out the current screen. So we get to the second screen, trigger the conditions where dy <= 0 and decide that this new screen is the correct one. The result is that whenever KdCursorOffScreen is called, the pointer jumps to the other screen. Change to check for dy < 0 etc. so that the cursor stays on the same screen if there is no other screen at the target location. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a94d945065177d73f3ee8dc0b9147264ba281136 Author: Peter Hutterer Date: Tue Oct 29 14:24:41 2013 +1000 kdrive: modify ephyr events to use POINTER_DESKTOP and scale them to that A multi-head Xephyr instance has the pointer stuck on one screen because of bad coordinate calculation. The coordinates passed to GetPointerEvents are per-screen, so the cursor gets stuck on the left-most screen by default. Adjust and mark the events as POINTER_DESKTOP, so the DIX can adjust them accordingly. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d66832a3b8a8675f1e5f3656dcb1bbe95598f0ea Author: Keith Packard Date: Thu Nov 14 13:21:54 2013 +1000 kdrive: handle WxH as valid geometry spec If a screen size was specified as WxH, the loop returned early and kdOrigin was never advanced. Thus, screen->origin was always 0 (or whatever was given at the -origin commandline flag). If a screen size was given with a bit depth (WxHxD), kdOrigin would always advance by the current screen, offsetting the next screen. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c8c5105c1d5c093675d7f571f158147f22f7572b Author: Peter Hutterer Date: Tue Oct 29 14:33:56 2013 +1000 ephyr: xcb_connect returns an error, not NULL Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2aa67ccef6ad8f51deb94b66defc668ddb7d226c Author: Keith Packard Date: Thu Nov 14 10:26:20 2013 +0900 Update to version 1.14.99.902 1.15 RC2 Signed-off-by: Keith Packard commit 9309d2a009a6a3b6090fc377fc7a3eded1a34dc0 Author: Keith Packard Date: Wed Nov 13 07:01:45 2013 +0900 xext: Fix shmint.h to not use headers outside of sdk_HEADERS shmint.h is part of sdk_HEADERS, and so can't use anything not included in sdk_HEADERS. busfault.h includes dix-config.h which is not. Leave the use of struct busfault in shmint.h and move the include of busfault.h to shm.c. protocol-versions.h is not part of sdk_HEADERS, so instead of using that, just use XTRANS_SEND_FDS to choose whether to expose the fd passing requests directly. Reported-by: Julien Cristau Signed-off-by: Keith Packard Tested-by: Knut Petersen Reviewed-by: Julien Cristau v2: also avoid using protocol-versions.h commit 4a251f5883b042cd902c192060a0be2b11148f2b Author: Jeremy Huddleston Sequoia Date: Fri Nov 8 14:55:33 2013 -0800 xfree86: Fix build without libpciaccess Regression fix from commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Connor Behan commit 5b02d5b7aaabf1ba8dcbdfe4525b7995b4e79f92 Author: Alan Coopersmith Date: Thu Nov 7 21:08:56 2013 -0800 Enable XTRANS_SEND_FDS on Solaris too. Requires passing through the __EXTENSIONS__ and _XOPEN_SOURCE defines in order to expose the msg_control members in struct msghdr. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit c4c154d18ef42dc550f2675a9ee88e07b1ca6bed Author: Alan Coopersmith Date: Thu Nov 7 21:05:33 2013 -0800 Avoid conflicts with Solaris defines that clash with our names When building on Solaris with _XOPEN_SOURCE set to a recent XPG release, and other core headers start including , which has a bunch of unfortunately named macros such as "CS", "ES", etc. for x86 & x64 registers which clash with existing variable & struct member names in Xorg - so #undef these so they don't interfere with our use. (Yes, have filed a bug against the system headers for exposing these, but this solves the problem for building on existing releases.) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit d7f9be0f8541368bf1a095ad1fbe7f38be6d3d15 Author: Keith Packard Date: Mon Nov 11 15:48:41 2013 -0800 Proper spelling of MAP_ANONYMOUS is MAP_ANON. The former doesn't exist on BSD and the latter is available everywhere AFAIK (checked Solaris and Linux). You also might want to wrap that line ;). Reported-by: Mark Kettenis Signed-off-by: Keith Packard commit fc84166e65c35ad75f566b135dcfc305ad5a2fde Author: Keith Packard Date: Thu Nov 7 15:18:28 2013 -0800 Get rid of the rest of the FD passing code when XTRANS_SEND_FDS isn't set req_fds and SetReqFds in include/dixstruct.h ReadFdFromClient, WriteFdToClient and the FD flushing in os/io.c Signed-off-by: Keith Packard commit a239e6faf3fce848ac0d10c48f8e817db68a493c Merge: 43e5a43fa f70a8bf37 Author: Keith Packard Date: Mon Nov 11 15:26:12 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 43e5a43fa8994e50cf01dd954118f4ef2c4e7933 Author: Adam Jackson Date: Thu Nov 7 12:01:41 2013 -0500 present: Don't try to initialize when building without present support There's a --disable-present, so it'd be nice if it worked. Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 0822a23e048b12c98c654e8b6af711c5f2c97141 Author: Keith Packard Date: Thu Nov 7 03:19:42 2013 -0800 present: Change debug output a bit to help diagnose missing vblank signals Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 20bb49ae9ba11d3dccfba191483cd682d9c9d96c Author: Keith Packard Date: Wed Nov 6 23:56:26 2013 -0800 Present: Check for window/fence destroyed when idling pixmaps A client destroying objects in the middle of an unflip can end up having the screen flip window or fence set to NULL in the unflip notify path. Check for these and don't try to use those objects. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 41da295eb50fa08eaacd0ecde99f43a716fcb41a Author: Keith Packard Date: Sun Nov 3 13:12:40 2013 -0800 Trap SIGBUS to handle truncated shared memory segments If a client passes a section of memory via file descriptor and then subsequently truncates that file, the underlying pages will be freed and the addresses invalidated. Subsequent accesses to the page will fail with a SIGBUS error. Trap that SIGBUS, figure out which segment was causing the error and then allocate new pages to fill in for that region. Mark the offending shared segment as invalid and free the resource ID so that the client will be able to tell when subsequently attempting to use the segment. Signed-off-by: Keith Packard v2: Use MAP_FIXED to simplify the recovery logic (Mark Kettenis) v3: Also catch errors in ShmCreateSegment Conflicts: include/dix-config.h.in include/xorg-config.h.in commit 719e880d7698d92f9b854b217ef9680aaa446f2e Author: Keith Packard Date: Wed Nov 6 23:22:51 2013 -0800 Require libXtrans version 1.3.2 This has the FD passing support included Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit bee2ec54049377e0033d49abff20d7bd069c62aa Author: Keith Packard Date: Sun Nov 3 10:08:15 2013 -0800 Xext: Enable MIT-SHM FD-passing request definitions only when possible Check to see if xtrans FD passing is available and use that to advertise the appropriate version of the SHM extension Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit ea8acfe3e2f74a46c3f1e91809b4b99af18502b7 Author: Keith Packard Date: Wed Nov 6 23:06:28 2013 -0800 Require xextproto version 7.2.99.901 This includes the MIT-SHM FD passing requests Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 914672fefacc15386041e7c2bc3beed4faf45e9d Author: Keith Packard Date: Thu Nov 7 14:20:26 2013 -0800 Remove dix-config.h config variables from xorg-config.h xorg-config.h includes dix-config, so there's no need to duplicate. Signed-off-by: Keith Packard commit 7aad79c5a582ece301d950bd65f0bcb4b9956e86 Author: Keith Packard Date: Wed Nov 6 23:05:46 2013 -0800 Make XTrans FD passing support optional. Define only on Linux Until other operating systems have a libXtrans port for FD passing, disable this on non-Linux systems. Note that this define affects how libXtrans gets built into the X server, which is why it need only define the symbol Signed-off-by: Keith Packard commit f70a8bf3714d89bccaad36841ef9149e91ad3bba Author: Jeremy Huddleston Sequoia Date: Sun Nov 10 11:40:27 2013 -0800 XQuartz: Don't sleep forever on exit if usleep() returns an error Signed-off-by: Jeremy Huddleston Sequoia commit ebcc1c214c466582d7b92826b4860256fd9c582a Author: Jeremy Huddleston Sequoia Date: Sun Nov 10 11:26:49 2013 -0800 XQuartz: Update Info.plist copyright years Signed-off-by: Jeremy Huddleston Sequoia commit 81c123ea2dd833864f7ba217791e59acca0f7c97 Author: Jeremy Huddleston Sequoia Date: Mon Nov 4 12:13:45 2013 -0800 configure.ac: Move GLX section after DRI The GLX section of configura.ac checks the state of DRI2, so it needs to be after DRI2=auto is resolved. Also reset libgl requirement to 7.1.0 in non-dri2 case. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Adam Jackson commit ab4b1fb38a61feb73d8336cc7a3399eb9d3d25be Author: Andreas Schwab Date: Thu Aug 15 12:03:42 2013 +0200 ARM64: Add support for aarch64 Signed-off-by: Andreas Schwab Reviewed-by: Mark Kettenis Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8fcf82cbf015609e00b3feb9bc567133c7aee5cf Author: Keith Packard Date: Tue Nov 5 18:39:11 2013 -0800 Use $GL_LIBS instead of -lGL for linking -lGL presumes that the GL library is in the system path, while $GL_LIBS is auto-detected. Signed-off-by: Keith Packard commit f348935e7d2c84a438aba08eee2f2c4e0dc77d20 Author: Keith Packard Date: Tue Nov 5 18:37:12 2013 -0800 Link with xshmfence, reference miSyncShmScreenInit in sdksyms This gets the server to link with xshmfence again, and also ensures that the miSyncShm code is linked into the server with the reference from sdksyms. Signed-off-by: Keith Packard commit 5f1e832694e57986c0185048a941b3af51b2f85f Author: Julien Cristau Date: Tue Nov 5 07:08:21 2013 -0800 os: Actually use the computed clockid in GetTimeInMicros The selection of which clock to use for this function was not actually getting used when fetching the final clock value. Reported-by: Julien Cristau Signed-off-by: Keith Packard commit 903a058370645ea075ea98d380fd565efb6160c9 Author: Keith Packard Date: Mon Nov 4 19:01:26 2013 -0800 hw/xfree86: Link libdri3 only when DRI3 is defined Don't attempt to link non-existant libraries... Signed-off-by: Keith Packard commit aaf0e29619196a283fee7ead2020a91032d84f48 Author: Keith Packard Date: Sun Nov 3 09:56:02 2013 -0800 Disable DRI3 and sync fence FD functions if xshmfence isn't available Make sure the server can build when the xshmfence library isn't present Signed-off-by: Keith Packard commit 33c85beed521c9db140cadd8c5aa9992398ee1fe Author: Keith Packard Date: Fri Nov 1 01:01:58 2013 -0700 Set version to 1.14.99.901 (1.15 RC1) Signed-off-by: Keith Packard commit 9db1d66f6d2c6857de220d8f1c08965962fe1416 Author: Keith Packard Date: Fri Nov 1 01:43:59 2013 -0700 Add dri3 and present directorys to distribution Signed-off-by: Keith Packard commit 977e2644b1d9e13b44debcb9a372bbc832ee32a3 Merge: 66c5ee0ff f36f5a65f Author: Keith Packard Date: Fri Nov 1 00:34:18 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 66c5ee0ff4690e630a69656331fd9d545c99c26c Author: Egbert Eich Date: Wed Aug 14 18:18:56 2013 +0200 config/APM: Add option to disable building of APM support on Linux APM support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. APM support is now largely obsolete, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature. (small modification by keithp - move test for XF86PM flag after check for APM, then move XF86PM flag to xorg-config.h.in) Signed-off-by: Egbert Eich Tested-by: Keith Packard Signed-off-by: Keith Packard commit f36f5a65f639b6524191d888d5bf89e73027156c Author: Peter Hutterer Date: Wed Oct 30 15:40:58 2013 +1000 sync: fix corner-case in triggering idle alarms ProcessInputEvent() resets the device idle times. If idle time was higher than the lower bracket, this should trigger an event in the idle time wakeup handler. If processing is slow, the idle time may advance past the lower bracket between the reset and the time the BlockHandler is called. In that case, we'd never schedule a wakeup to handle the event, causing us to randomly miss events. Ran tests with a neg transition trigger on 5ms with 200 repeats of the test and it succeeded. Anything below that gets a bit tricky to make sure the server sees the same idle time as the client usleeps for. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f994d99539192a10a8c83047e11991f52e0ca677 Author: Egbert Eich Date: Wed Aug 14 18:18:39 2013 +0200 config/ACPI: Add option to disable building of ACPI support on Linux ACPI support in the Xserver was used to restore the console mode prior to a power management event. This was to ensure the mode upon suspend/resume was one that the system firmware or kernel could deal with. The feature depended on acpid to be running. Most of this functionality is now take over by systemd, KMS drivers don't require a mode restoration anyhow. Therefore it should be possible to disable this feature under some circumstances. Tested-by: Keith Packard Signed-off-by: Keith Packard commit 2aa5092b88174cb9988076ae96298217c97ad75f Author: Egbert Eich Date: Mon Aug 12 18:21:33 2013 +0200 DDX/Randr: Avoid server crash when xrandr SetConfig is called while switched away A call to Xrandr SetScreenConfig (for randr 1.1) causes the Xserver to crash when xf86SetViewport() which does not check if the hardware is accessible. Wrap accesses to xf86SetViewport() with if (vtSema) { ... } to avoid that. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 508e05777aba823c93a2417cc26d18c9f061ca26 Author: Egbert Eich Date: Mon Aug 12 18:20:36 2013 +0200 DDX/Events: Distinguish between Input- and GeneralHandlers in xf86VTSwitch() When enabling/disabling input handlers in xf86VTSwitch() we treat Input- and GeneralHandlers equally. The result is that after a VT switch the masks for EnabledDevices and AllSockets are equal and the distiction between both types is lost. Signed-off-by: Egbert Eich Reviewed-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0cb33ce34081d7d123ec565582d7d19bdb3964ad Author: Egbert Eich Date: Sat Oct 5 08:02:28 2013 +0200 DDX/modes: Add a sanity check when using screen sizes from EDID EDID sometimes lies about screen sizes. Since the screen size is used by clients to determine the DPI a wrong ration will lead to terrible looking fonts. Add a sanity check for the h/v ratio cutting off at 2.4. This would still accept the cinemascope aspect ratio as valid. Also add message suggesting to add a quirk table entry. Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 41d4beb2616ceb3f1a1b8694733e85bae70de59a Author: Egbert Eich Date: Wed Aug 14 11:50:26 2013 +0200 DDX/DPMS: Call dixSaveScreens() also when screen is turned on DMPS calls dixSaveScreens() when turned off but not when turned on. In most cases this is irrelevant as DPMS is done when a key is hit in which case dixSaveScreens() will be called to unblank anyhow. This isn't the case if we use xset (or the DPMS extension directly) to unblank. Check screenIsSaved to make sure the state needs to be changed before calling dixSaveScreens(). Signed-off-by: Egbert Eich Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 623c4147650d0404cfbea0f9b7df66dc7d928e00 Author: Søren Sandmann Pedersen Date: Mon Oct 21 17:11:56 2013 -0400 ephyr: Ensure stride of private framebuffer is multiple of 4 The fb layer of X can't deal with strides that are not a multiple of 4, so when Xephyr allocates its own framebuffer it should make sure to align it. This fixes crashes and rendering corruption when Xephyr runs in a depth that is different from the host X server and its screen size is not a multiple of 4 / depth. (This is particularly easy to trigger if you use the -resizeable option). Reviewed-by: Eric Anholt Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 97cf53cc2ad7ecfdd495133bad31d0ec7d939326 Author: Søren Sandmann Pedersen Date: Mon Oct 21 16:58:54 2013 -0400 ephyr: hostx_screen_init(): Fix bits_per_pixel and bytes_per_line When the depth of the Xephyr server matches that of the host X server, Xephyr simply uses the buffer associated with the XImage as its framebuffer. In this case, it is correct to get the bits_per_pixel and bytes_per_line values returned from hostx_screen_init() from the XImage. However, when the depth doesn't match the host, Xephyr uses a private framebuffer that is periodically copied to the XImage. In this case, the returned values of bits_per_pixel and bytes_per_line should be those of the private framebuffer, not those of the XImage. Reviewed-by: Eric Anholt Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 55246b67b755d4c1039d54971fe3f77ea60d604e Author: Søren Sandmann Pedersen Date: Tue Oct 8 17:45:40 2013 -0400 xf86AddBusDeviceToConfigure(): Store device in DevToConfig[i].pVideo After fc3ab84d the pVideo field in DevToConfig[i] is no longer initialized, so it's always NULL. This causes the duplicate finding algorithm in the beginning of the function to not work anymore as it is based on this field. The symptom of this bug is that X -configure reports Number of created screens does not match number of detected devices. Configuration failed. Server terminated with error (2). Closing log file. rather than producing a working config file. This patch fixes that bug by initializing the field before calling xf86PciConfigureNewDev(). Cc: tvignatti@gmail.com Signed-off-by: Soren Sandmann Reviewed-by: Adam Jackson commit 95bf478b78e466002c382bcde7d4d62591e9215d Merge: abf5d5ac1 bb745f2b4 Author: Keith Packard Date: Thu Oct 31 18:18:19 2013 -0700 Merge remote-tracking branch 'jeremyhu/master' commit abf5d5ac12437ebe156b4dd500c2acd69eea3654 Author: Jeremy Huddleston Sequoia Date: Thu Oct 31 08:57:56 2013 -0700 miext/damage: Partial revert of "Only wrap into the GC ops chain if there's a listener (v3)" Fixes regression from: 4dc2a76740d921c824a4d8193f39dd373475f02a http://lists.x.org/archives/xorg-devel/2013-May/036241.html https://trac.macports.org/ticket/38993 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit e4636072949a76477fe7c9d54662a0b3536b1372 Merge: 17ed7ac1f 5c5c1b779 Author: Keith Packard Date: Thu Oct 31 17:05:48 2013 -0700 Merge remote-tracking branch 'keithp/dri3' commit 17ed7ac1fe7426d66f688087c09da5ff1dbb41d3 Author: Adam Jackson Date: Thu Oct 31 18:39:22 2013 -0400 glx: Lie about GLX_Y_INVERTED_EXT Well, that was lame. The problem with reporting y inversion honestly is that libGL asks the driver _its_ opinion of Y inversion, which it just fabricates from whole cloth. So then when libGL goes to compare the driver's idea of fbconfigs with that of the server - a fairly dumb idea to begin with - nothing matches, and direct rendering fails, and sadness. So until the DRI drivers are fixed we should just continue to lie about Y inversion. GLX_DONT_CARE is what libGL would make up for that attribute if we hadn't sent it, so just send that instead. Signed-off-by: Adam Jackson Tested-by: Keith Packard Signed-off-by: Keith Packard commit 5c5c1b77982a9af7279a90bc3c2be48adaa9c778 Author: Keith Packard Date: Thu Jul 11 16:11:57 2013 -0700 present: Add Present extension Provides both a software implementation using timers and driver hooks to base everything on vblank intervals. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 563138298868f62501875d3016f03469dcffaad0 Author: Keith Packard Date: Tue Apr 9 19:59:39 2013 -0700 dri3: Add DRI3 extension Adds DRM compatible fences using futexes. Uses FD passing to get pixmaps from DRM applications. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit fdec793cdc2ef9a6ea66b311cb1068a7bd4a3be3 Author: Keith Packard Date: Thu Jan 17 13:46:55 2013 -0800 Add support for MIT-SHM AttachFd request This passes a file descriptor from the client to the server, which is then mmap'd Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 9fd35daa3160fd36f00ed354bfcbefefa1353cce Author: Keith Packard Date: Thu Jan 17 13:43:02 2013 -0800 Add interfaces to get FDs from clients over the socket This adds two interfaces: void SetReqFds(ClientPtr client, int req_fds) Marks the number of file descriptors expected for this request. Call this before any request processing so that any un-retrieved file descriptors will be closed automatically. int ReadFdFromClient(ClientPtr client) Reads the next queued file descriptor from the connection. If this request is not expecting any more file descriptors, or if there are no more file descriptors available from the connection, then this will return -1. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 264fc3abe5f18341d0cf9ddb6766e10e4154e447 Author: Keith Packard Date: Thu Oct 31 13:01:46 2013 -0700 misync: Don't smash custom screen sync functions There was a check to avoid smashing custom functions, but the sense was backwards causing it to always smash them, and also not set them otherwise. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 2d96948ab5c952b68875ac63844cf7d778d4bf63 Author: Keith Packard Date: Thu Jul 11 16:10:34 2013 -0700 os: Add GetTimeInMicros 64-bit higher resolution current time value. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 0c33f47281c36726848daf513fb0483cdea57bff Author: Keith Packard Date: Thu Jul 11 16:09:34 2013 -0700 Add swapll to byte swap 64-bit datatypes Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 26f013ba45b08a02bb028a461af68288a86fadb1 Author: Keith Packard Date: Thu Jul 11 16:08:41 2013 -0700 Add a RegionDuplicate function This allocates a new region structure and copies a source region into it in a single API rather than forcing the caller to do both steps themselves. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit d25c217964eb1fe54c3a54bca4cac7f47b4b9fdf Author: Keith Packard Date: Mon Jan 14 14:24:36 2013 -0800 Clean up a couple of warnings in os/ Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 7710f2b927ec8e3c631f72d66d494b523377b48e Author: Keith Packard Date: Fri Jan 18 21:43:40 2013 -0800 Xext: Move MIT-SHM 'ShmDesc' to shmint.h This data structure is required to use shared memory objects in any extension. That includes the Xv extension, which (before this patch) duplicated the definition of this structure in its own code. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit e8961b718d82f1c081ec110d8d962f64e8406b82 Author: Peter Hutterer Date: Tue Oct 22 14:24:52 2013 +1000 os: use a constant for backtrace array size Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit f12a9ed870017f35cf6d2a82b1405e843aae42ac Author: Peter Hutterer Date: Tue Oct 29 15:24:11 2013 +1000 configure: remove a comment 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd moved backtracing into the DIX, so this comment is outdated. since no-one noticed and it's easier to just grep than update file references, remove the comment. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit bb745f2b45768d0936f3960951e1a5cee8b03194 Author: Jeremy Huddleston Sequoia Date: Thu Oct 31 08:50:57 2013 -0700 XQuartz: Bump bundle version to 2.7.6 Signed-off-by: Jeremy Huddleston Sequoia commit 2eedf42c229e2251035d716a96b654222155cd51 Author: Adam Jackson Date: Thu Oct 31 09:23:52 2013 -0400 dri: Fix GLX_Y_INVERTED_EXT fbconfig attribute We're Y-inverted from GL's coordinates, so this is correct. gnome-shell doesn't seem to check this - somewhat reasonable since the only server that answered the other way around was Xglx - but kwin does, and upside-down hilarity ensues. Tested-by: maelcum on #xorg-devel Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 902ff0b3497d202b86bf9a411e17db7b694d6eaa Author: Adam Jackson Date: Tue Oct 29 12:58:14 2013 -0400 xfree86: Bump video/input/extension ABIs for 1.15 Signed-off-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Keith Packard commit 899451ae595f5f51a500295c624bf7ad14aca602 Author: Keith Packard Date: Wed Oct 30 08:54:24 2013 -0700 kdrive/ephyr: Don't discard one-time driver structure at server reset KdScreenInfo is constructed at server startup time, and not re-generated at server reset time. Freeing the 'driver' element at reset time means this information is lost, and the server crashes pretty quickly afterwards. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 85ae44f07fa21b4a48d95d736dc8135bd4f751d0 Author: Michal Srb Date: Wed Oct 30 13:33:51 2013 +0200 randr: deliver Output and Crtc events of attached output providers. Consider all attached output providers when looking for changed outputs and crtcs. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit a9ca93dcf9a711b3d60fbad31cbd44e0c82b6f42 Author: Michal Srb Date: Wed Oct 30 13:33:50 2013 +0200 randr: send RRResourceChangeNotify event Send RRResourceChangeNotify event when provider, output or crtc was created or destroyed. I.e. when the list of resources returned by RRGetScreenResources and RRGetProviders changes. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit 4b39ea8a918fe6117bf34dc1cba67a4e56d0d1fb Author: Michal Srb Date: Wed Oct 30 13:33:49 2013 +0200 randr: send RRProviderChangeNotify event Send RRProviderChangeNotify event when a provider becomes output source or offload sink. Reviewed-by: Dave Airlie Signed-off-by: Michal Srb Signed-off-by: Keith Packard commit 1470c0a132806fb2ce817515ad4ddfe66eb7c98f Merge: 04ab07ca1 9f4afe7e8 Author: Keith Packard Date: Tue Oct 29 21:00:13 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 9f4afe7e835cf9c513387ae01eaf8b7a6ba4aac9 Author: Gaetan Nadon Date: Mon Oct 28 18:32:36 2013 -0400 config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES Fix Automake warning: AC_OUTPUT should be used without arguments. www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files Signed-off-by: Gaetan Nadon Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e16dea72d6f45dd6d7788362bb7dbe76263719b1 Author: Peter Hutterer Date: Wed Oct 23 15:16:25 2013 +1000 dmx: queue button events with a flags of 0 Setting POINTER_SCREEN with a unset valuator mask causes a jump to 0/0. Set the flags to 0 so we don't generate any motion on a button event. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 04ab07ca19236d6c9a947e065fb69b0dd0d16639 Author: Connor Behan Date: Thu Oct 17 18:26:28 2013 -0700 xfree86: Find primary entity when bus types are nominally different As of server 1.13, systems with DRM and Udev will have BUS_PLATFORM as their primary bus type. However, drivers not implementing a platformProbe function will still create entities of type BUS_PCI. We need to account for this when checking for the primary entity. Signed-off-by: Connor Behan Acked-by: Tormod Volden Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit b32a4c91ccd479638c2bd2c0143b6ea170c717d1 Merge: be6680967 c671e935e Author: Keith Packard Date: Tue Oct 29 09:37:30 2013 -0700 Merge remote-tracking branch 'idr/glx-float-fbconfig' commit be6680967a479eedbcab2fe1718c5f981e1029c7 Author: Adam Jackson Date: Wed Jul 10 10:00:46 2013 -0400 glx: convert to direct GL dispatch (v2) We now expect to be linked against something that provides the GL API, instead of manually grubbing about in the DRI driver's dispatch table. Since the GLX we expose calls GL functions that are meant to be looked up dynamically, also add a way to thunk through to GetProcAddress. This includes a refresh of the generated sources, which requires a correspondingly new Mesa. The GetProcAddress stubs are at the moment merely enough to make this link against Mesa 9.2, but should really be provided for everything not in the OpenGL 1.2 ABI. v2: Explicitly hide the GetProcAddress stubs so we can't conflict with libGL symbols; fix leading tab/space issues [anholt] Reviewed-by: Keith Packard Signed-off-by: Adam Jackson commit 8aacf47e1778d8b72811b025a82452b933d3c1f2 Author: Adam Jackson Date: Fri Oct 4 12:58:19 2013 -0400 glx: Remove DRI1 AIGLX (v2) Mesa doesn't ship DRI1 drivers as of 8.0, which is about 18 months and three releases ago. The main reason to have wanted DRI1 AIGLX was to get a GLX compositor working, but DRI1's (lack of) memory management API meant that the cost of a GLX compositor was breaking direct GLX apps, which isn't a great tradeoff. Of the DRI1 drivers Mesa has dropped, I believe only mga stands to lose some functionality here, since it and only it has support for NV_texture_rectangle. Since that's required for every extant GLX compositor I know of, I conclude that anybody with a savage, say, would probably not notice AIGLX going away, since they wouldn't be running a GLX compositor in the first place. In the future we'd like to use GL in the server in a more natural way, as just another EGL client, including in the GLX implementation itself. Since there's no EGL implemented for DRI1 drivers, this would already doom AIGLX on DRI1 (short of entirely forking the GLX implementation, which I'm not enthusiastic about). v2: Remove DRI1 from AIGLX conditionals in configure.ac [anholt] Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 7f5adf73a0f9a951a6df201532b4031d38054369 Author: Adam Jackson Date: Wed Oct 2 17:38:05 2013 -0400 glx: Simplify glXDestroyContext We can just free the resource unconditionally here. ContextGone (which FreeResourceByType will call) already does: cx->idExists = GL_FALSE; if (!cx->currentClient) { __glXFreeContext(cx); } Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 53653f4889dcaea0cf67f8a4180af71eeb4b2f6b Author: Adam Jackson Date: Mon Aug 5 15:46:11 2013 -0400 glx: Fix a corner case in DrawableGone Losing the drawable does not change our notion of current client. Since the GL under us doesn't understand having a current context without current drawables (sigh), we do still need to loseCurrent so that we re-bind the context on the next request. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65030 Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 276d8057aa7f6e36c9c874257a6383f416c5cedd Author: Adam Jackson Date: Sat Aug 3 09:47:55 2013 -0400 glx: Fix memory leak in context garbage collection (v2) I broke this, back in: commit a48dadc98a28c969741979b70b7a639f24f4cbbd Author: Adam Jackson Date: Mon Mar 21 11:59:29 2011 -0400 glx: Reimplement context tags In that, I changed the glx client state to not explicitly track the list of current contexts for the client (since that was what we were deriving tags from). The bug was that I removed the code for same from glxClientCallback without noticing that it had the side effect of effectively de-currenting those contexts, so that ContextGone could free them. So, if you had a client exit with a context still current, the context's memory would leak. Not a huge deal for direct clients, but viciously bad for indirect, since the swrast context state at the bottom of Mesa is like 15M. Fix this by promoting Bool isCurrent to ClientPtr currentClient, so that we have a back-pointer to chase when walking the list of contexts when ClientStateGone happens. v2: Explicitly call __glXFreeContext on the ClientStateGone path. Our current context might be one we got from EXT_import_context and whose creating client has since died. Without the explicit call, the creating client's FreeClientResources would not free the context because it's still current, and the using client's FreeClientResources would not free the context because it's not an XID it created. This matches the logic from a48dadc. Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 75b362763cca8b6139582ad85e3b58f0b2e30a1c Author: Adam Jackson Date: Tue Oct 8 15:02:44 2013 -0400 glx: Only take a Pixmap reference if creating the GLXPixmap succeeded Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson commit 4292a39c8014f9f4920bed3001802e4a3e523c5e Author: Peter Hutterer Date: Mon Oct 28 12:10:10 2013 +1000 Xi: fix logic error when calculating emulated motion events gcc -Wlogical-op exevents.c: In function 'DeliverEmulatedMotionEvent': exevents.c:1480:13: warning: logical 'or' of collectively exhaustive tests is always true [-Wlogical-op] The relevant snippet of exevents.c: 1479 if (ti->listeners[0].type != LISTENER_POINTER_REGULAR || 1480 ti->listeners[0].type != LISTENER_POINTER_GRAB) 1481 return; This condition was always true, causing dropped motion events. Reported-by: Alan Coopersmith Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c671e935e7c44d4711ba9588ee96cb9796b879e6 Author: Daniel Czarnowski Date: Mon Oct 21 19:48:38 2013 +0200 glx: Enable GLX_ARB_fbconfig_float for DRI2 drivers v2 (idr): Maintain sort order of extension list. Fixed rebase error (comment header for initializeExtensions was in front of __glXDRIinvalidateBuffers). Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit ccc8bb1153ec669f7540a174a81a8ec0e0d6dd67 Author: Daniel Czarnowski Date: Wed Oct 23 12:53:59 2013 +0200 glx: Handle float config types in glxConvertConfigs Replaces old use of floatMode attribute with new, extended range of values in __DRI_ATTRIB_RENDER_TYPE. Also adds new conditions, where the float modes support requires it. Enables support for not only float configs, but packed float configs as well. v2 (idr): Whitespace and formatting fixes. Refactor render type vs. pbuffer checking to a separate function that includes a quote from the spec. Re-write commit message. Fix compiler warnings: glxdricommon.c: In function 'glxConvertConfigs': glxdricommon.c:212:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:212:35: note: expected 'unsigned int *' but argument is of type 'int *' glxdricommon.c:230:35: warning: pointer targets in passing argument 3 of 'core->getConfigAttrib' differ in signedness [-Wpointer-sign] glxdricommon.c:230:35: note: expected 'unsigned int *' but argument is of type 'int *' Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit 4e5eb15b4cc170499cf87e6633c1737f0b1c514b Author: Daniel Czarnowski Date: Mon Oct 21 19:57:53 2013 +0200 glx: Correctly set render type enum The type specified is bits, but the context wants an enum. v2 (idr): Fix various whitespace and formatting problems. Rename convFBconfRenderTypeBits2CtxRenderType to renderTypeBitsToRenderTypeEnum. Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit eabb523aa45f3d8940cadac197ef1225fbfd5c56 Author: Daniel Czarnowski Date: Mon Oct 21 19:45:35 2013 +0200 glx: Allow float renderType in glXCreateContextAttribsARB This enables GLX_RGBA_FLOAT_TYPE_ARB and GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT as valid renderType parameters to glXCreateContextAttribsARB. v2 (idr) : Use C-style comments and fix word wrapping. Re-write commit message. Signed-off-by: Daniel Czarnowski Signed-off-by: Ian Romanick Reviewed-by: Ian Romanick commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893 Author: Eric Anholt Date: Tue Oct 22 14:22:04 2013 -0700 glx: Add support for the new DRI loader entrypoint. This is going to be exposed (and not the old entrypoint) for some DRI drivers once the megadrivers series lands, and the plan is to eventually transition all drivers to that. Hopefully this is unobtrusive enough to merge to stable X servers so that they can be compatible with new Mesa versions. v2: typo fix in the comment Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 83bb366e71ef41165998eed2934208f84714a37e Author: Strake Date: Thu Oct 17 23:20:20 2013 -0500 unbreak KdEnableInput pi = ki = 0 here, so not follow them. Signed-off-by: Strake Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8db4121a3c7104548fd4a138ac1d1bdea5fd22d9 Author: Keith Packard Date: Fri Oct 18 17:31:01 2013 -0700 Update to version 1.14.99.3 Signed-off-by: Keith Packard commit e3220d7bae4548bf64e5879c981ad070ac1f78f7 Merge: 73b2660d7 2523a445a Author: Keith Packard Date: Fri Oct 18 17:22:52 2013 -0700 Merge commit '2523a445a09a75a8baf642608d099a5e12d5437f' This is merging the commits along Peter's for-keith branch, without also merging in the spurious merge at the top of that branch. commit f8662a133690773692dfa392ecfa3b8b56af8fa9 Merge: 7cf1b595c 2523a445a Author: Peter Hutterer Date: Fri Oct 18 16:50:12 2013 +1000 Merge branch 'xsync-transition-bug-59644' into for-keith commit 2523a445a09a75a8baf642608d099a5e12d5437f Author: Peter Hutterer Date: Thu Oct 17 12:02:27 2013 +1000 sync: split updating and triggering a counter up Now that the brackets are always the nearest change points (regardless of transition) we need to update the counters whenever we check for any updates. Otherwise we end up with a situation where counter->value is out of date and an alarm doesn't trigger because we're still using the value from last time something actually triggered. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit e57ec99b03b2ad840c384a97ab2766ce9da0f5cc Author: Peter Hutterer Date: Wed Oct 16 16:31:15 2013 +1000 sync: always set the brackets (#59644) The current code sets bracket_greater to the first trigger after the current value, and bracket_less to the last trigger before the current value. For example, the idle timer with three negative and three positive transitions would set this: nt1 nt2 nt3 |--------|------|--|------- idle --|---|--|-----> t pt1 pt2 pt3 bracket_less == nt2 bracket_greater == pt2 This is an optimization so we can skip code paths in the block/wakeup handlers if the current value doesn't meet any of the trigger requirements. Those handlers largely do a if (bracket_less is less than current value && bracket_greater is greater than current value) return, nothing to do However, unless the bracket values are updated at the correct time, the following may happen: nt |--------------|---------- idle ------|--------> t pt In this case, neither bracket is set, we're past the pos transition and not yet at the neg transition. idle may now go past nt, but the brackets are not updated. If idle is then reset to 0, no alarm is triggered for nt. Likewise, idle may now go past pt and no alarm is triggered. Changing an alarm or triggering an alarm will re-calculate the brackets, so this bug is somewhat random. If any other client triggers an alarm when the brackets are wrongly NULL, the recalculation will set them this bug may not appear. This patch changes the behavior, so that the brackets are always the nearest positive or negative transitions to the current counter value. In the example above, nt will trigger a wakeup and a re-calculation of the brackets, so that going past it in the negative direction will then cause the proper alarm triggers. Or, in Keith's words: Timer currently past a positive trigger No bracket values, because no trigger in range Timer moves backwards before the positive trigger Brackets not reset, even though there is now a trigger in range Timer moves forward past the positive trigger Trigger doesn't fire because brackets not set Setting the LT bracket in this case will cause everything to get re-evaluated when the sync value moves backwards before the trigger value. X.Org Bug 59644 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 06b87aa528d7a739ba20101a1f83b1a428691a01 Author: Peter Hutterer Date: Wed Oct 16 10:08:46 2013 +1000 sync: if the idle time was reset, force alarms to trigger (#70476) The time between the idle reset and the IdleTimeWakeupHandler to be called is indeterminate. Clients with an PositiveTransition or NegativeTransition alarm on a low threshold may miss an alarm. Work around this by keeping a reset flag for each device. When the WakeupHandler triggers and the reset flag is set, we force a re-calculation of everything and pretend the current idle time is zero. Immediately after is the next calculation with the real idle time. Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for a threshold of 1 ms. May trigger, may not. X.Org Bug 70476 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit efc1035ca958f2c9d266338a308518a0834b1773 Author: Peter Hutterer Date: Wed Oct 16 09:36:01 2013 +1000 dix: provide accessor methods for the last device event time And now that we have the accessors, localize it. No functional changes, just preparing for a future change. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit b7c9bd9cf276e92a73be57ff2ed32b47a80f13fb Author: Peter Hutterer Date: Wed Oct 16 09:21:47 2013 +1000 sync: supply the counter from IdleTimeBlockHandler The main idletime counter has an initialized deviceid, might as well be supplying it properly. Without this, we'd only ever check the XIAllDevices counter, so the wait would never be adjusted for the device-specific triggers. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 2efe49c1029f959fe80879bcf50df42e8b80451d Author: Peter Hutterer Date: Wed Oct 16 13:01:01 2013 +1000 sync: always call BracketValues when recalculating upper/lower brackets Both ServertimeBracketValues and IdleTimeBracketValues copy the value into there SysCounter privates. Call it for a NULL set as well, so we don't end up with stale pointers and we can remove the block/wakeup handlers. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 5c7cfd4c6978834551848e1be62af240102e39b5 Author: Peter Hutterer Date: Tue Oct 15 10:11:20 2013 +1000 sync: compress two if statements No functional changes, just merges a > and == condition into a >= condition. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson Reviewed-by: Keith Packard commit 73b2660d7273d175d279d22f8ca0c3932a14ff1c Author: Alan Coopersmith Date: Mon Sep 16 21:47:16 2013 -0700 Avoid use-after-free in dix/dixfonts.c: doImageText() [CVE-2013-4396] Save a pointer to the passed in closure structure before copying it and overwriting the *c pointer to point to our copy instead of the original. If we hit an error, once we free(c), reset c to point to the original structure before jumping to the cleanup code that references *c. Since one of the errors being checked for is whether the server was able to malloc(c->nChars * itemSize), the client can potentially pass a number of characters chosen to cause the malloc to fail and the error path to be taken, resulting in the read from freed memory. Since the memory is accessed almost immediately afterwards, and the X server is mostly single threaded, the odds of the free memory having invalid contents are low with most malloc implementations when not using memory debugging features, but some allocators will definitely overwrite the memory there, leading to a likely crash. Reported-by: Pedro Ribeiro Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 8afe20d4e34adcfd29bdf43a01d55335ea2c5dba Author: Alan Coopersmith Date: Mon Sep 16 21:45:29 2013 -0700 Update GLX dependencies now that DRI & DRI2 are builtins, not modules Signed-off-by: Alan Coopersmith commit 2704bdb24a2c7bac65b90e05f1a68438b34ecf58 Author: Alan Coopersmith Date: Tue Sep 3 22:53:28 2013 -0700 DMX glxproxy: Don't allocate & copy data just to free it unused Two functions in the DMX glxproxy code loop over all the backend screens, starting at the highest numbered and counting down to the lowest. Previously, for each screen, the code would allocate a buffer large enough to read the reply from the backend, copy that reply into the buffer, and then if it wasn't the final screen, free it. Only the buffer from the final screen is used, to pass on to the client in the reply. This modifies it to just immediately discard the responses from the screens as we loop through it, only doing the allocate & copy work for the one buffer we pass back to the client. Signed-off-by: Alan Coopersmith Reviewed-by: Alex Deucher commit 6c06c268adbab63ebe7490489aa030724cbdc54b Author: Alan Coopersmith Date: Sun Aug 18 18:02:49 2013 -0700 Skip damage calls if DamageCreate fails in exa functions Fixes parfait errors such as: Null pointer dereference (CWE 476): Write to null pointer pDamage at line 1833 of miext/damage/damage.c in function 'DamageRegister'. Function DamageCreate may return constant 'NULL' at line 1775, called at line 232 of exa/exa_migration_mixed.c in function 'exaPrepareAccessReg_mixed'. Constant 'NULL' passed into function DamageRegister, argument pDamage, from call at line 237. Null pointer introduced at line 1775 of miext/damage/damage.c in function 'DamageCreate'. Null pointer dereference (CWE 476): Write to null pointer pDamage at line 1833 of miext/damage/damage.c in function 'DamageRegister'. Function DamageCreate may return constant 'NULL' at line 1775, called at line 104 of exa/exa_mixed.c in function 'exaCreatePixmap_mixed'. Constant 'NULL' passed into function DamageRegister, argument pDamage, from call at line 109. Null pointer introduced at line 1775 of miext/damage/damage.c in function 'DamageCreate'. Checks are similar to handling results of other calls to DamageCreate. [ This bug was found by the Parfait 1.3.0 bug checking tool. http://labs.oracle.com/pls/apex/f?p=labs:49:::::P49_PROJECT_ID:13 ] Signed-off-by: Alan Coopersmith commit 7cf1b595c8c8f9776a39559d2878cf90af3f2859 Author: Peter Hutterer Date: Wed Sep 4 15:34:29 2013 +1000 dix: only deliver for the current grab type Use the grabtype to determine which type of event to send - all other events are pointless and may result in erroneous events being delivered. Signed-off-by: Peter Hutterer commit 78944d62ffc7fec6f75b6f514ab7a139ba9bc77b Author: Peter Hutterer Date: Wed Sep 4 15:34:28 2013 +1000 dix: don't attempt to deliver an event for a different grabtype For an active grab, grab->eventMask can be either the core or the XI1 mask. With the overlap of event filters, calling DeliverOneGrabbedEvent(XI1) for a ProximityOut event will trigger if the client has selected for enter events - the filter is the same for both. Thus, we end up delivering a proximity event to a client not expecting one. Signed-off-by: Peter Hutterer commit 6159811a1aaf848016dbfa7bde68df097027870c Author: Peter Hutterer Date: Wed Sep 4 15:34:27 2013 +1000 include: change grabtypes to start at 1 Avoid erroneous detection of an unset grabtype as CORE Signed-off-by: Peter Hutterer commit be6ea80b79b3d6eb97106ea142e01acbdf059995 Author: Peter Hutterer Date: Wed Sep 4 15:34:26 2013 +1000 dix: only allow button and key events to freeze a sync'd pointer If a client calls XAllowEvents(SyncPointer) it expects events as normal until the next button press or release event - that freezes the device. An e.g. proximity event must thus not freeze the pointer. As per the spec, only button and key events may do so, so narrow it to these cases. Signed-off-by: Peter Hutterer commit 93a27b2dd0d7ed51120f42456a91a7c59902ebc2 Author: Michele Baldessari Date: Sun Sep 15 19:30:38 2013 +0100 Xephyr: restore cursor visibility Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69388 Commit c100211034ab69ce453a1644fb61c6808d7e3eda (dix: only show the cursor if a window defines one (#58398)) broke the default cursor behaviour in Xephyr (unless run with -retro). Restore the default cursor visibility so that '-retro' or '-host-cursor' are not needed to have a visible cursor. Signed-off-by: Michele Baldessari Reviewed-by: Peter Hutterer as of ba387cf21f7d95987211f75d8024601e7d64e322 "ephyr: Use host (HW) cursors by default." this only applies if -sw-cursor is given on the cmdline. Signed-off-by: Peter Hutterer commit 70efc799cbeec26f19831b3b14c0d4646198a077 Author: Michele Baldessari Date: Sun Sep 15 19:56:34 2013 +0100 Fix Xephyr compilation when DEBUG is enabled When DEBUG is enabled Xephyr compilation fails: ephyrdriext.c:343:133: error: 'is_ok' undeclared (first use in this function) EPHYR_LOG("leave. is_ok:%d\n", is_ok); Just reemove bogus is_ok variable. Signed-off-by: Michele Baldessari Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5ac4bfca64bd75474e550b26bc1195a5ca245752 Author: Adam Jackson Date: Tue Sep 10 14:18:18 2013 -0400 input: calloc minimization for xi2mask_new There's no reason to do this as (nmasks + 2) callocs, and it's a surprisingly hot path. Turns out you hit this ~once per passive grab, and you do a few bajillion passive grab changes every time you enter or leave the overview in gnome-shell. According to a callgrind of Xorg with gnome-shell-perf-tool run against it: Ir before: 721437275 Ir after: 454227086 Signed-off-by: Adam Jackson Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 44d502c6f1d03a9e548f0941cde0228b6fde8394 Author: Jon TURNEY Date: Sun Oct 6 16:45:52 2013 +0100 hw/xwin: Fix for "glx: Remove screen number from __GLXconfig" Fix compilation after commit c3c976f54c3c282d6fa6c8360688e036bc43d210 "glx: Remove screen number from __GLXconfig" Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Adam Jackson commit 6a9bd103cb993e873cb82664b677ceed73c0bd85 Merge: ea3b7db4b 8aae28e3c Author: Keith Packard Date: Mon Oct 7 17:29:38 2013 -0700 Merge remote-tracking branch 'jeremyhu/master' commit ea3b7db4b747f883ef7b8b524ee13bf8a63add14 Author: Emil Velikov Date: Mon Oct 7 18:29:25 2013 +0100 configure.ac: Include missing proto declarations in SDK_REQUIRED_MODULES Commits a1d41e311c21e, 7d859bd87834d & 3ed2c6e11298c made extinit.h require the XF86 Big Font, XRes & ScrnSaver proto headers, but failed to add them to the SDK_REQUIRED_MODULES so pkg-config would find them for driver builds. Signed-off-by: Emil Velikov Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 8aae28e3cbdd49bfa8d940a4a517c94a53b94f86 Author: Jeremy Huddleston Sequoia Date: Sun Oct 6 09:20:45 2013 -0700 XQuartz: Dont't set screen on __GLXConfig Fixes regression introduced by c3c976f54c3c282d6fa6c8360688e036bc43d210 Signed-off-by: Jeremy Huddleston Sequoia commit c5f8eb968efa970201712105a1ac880b517e7b6d Author: Jeremy Huddleston Sequoia Date: Sun Oct 6 09:18:15 2013 -0700 rootless: Use miCopyRegion instead of fbCopyRegion Fixes regression introduced by e657635dbe6b92875b0e88370557c2cbab673a49 Signed-off-by: Jeremy Huddleston Sequoia commit ccbe17b1c6da1ad9d085fc8133cdd15dc7004a4a Author: Pino Toscano Date: Wed Aug 28 17:15:03 2013 +0200 os: move for any !win32 system It is needed in IPv6 configurations (for inet_pton) also when SIOCGIFCONF is not defined. Signed-off-by: Pino Toscano Acked-by: Samuel Thibault Signed-off-by: Julien Cristau commit c079b8e675dd2762c9e07fe5d8c07612299dceb7 Author: Pino Toscano Date: Wed Aug 28 17:04:48 2013 +0200 xfree86/hurd: include Needed for using get_privileged_port. Signed-off-by: Pino Toscano Acked-by: Samuel Thibault Signed-off-by: Julien Cristau commit f0659a7f68a5a334879af01a6a63742eab1bf5de Author: Keith Packard Date: Fri Oct 4 16:44:46 2013 -0700 Bump version to 1.14.99.2 Signed-off-by: Keith Packard commit f2d149b6d10edea7233d93c7e19f71decf11dc62 Author: Keith Packard Date: Fri Oct 4 16:43:41 2013 -0700 kdrive/ephyr: Remove duplicate ephyrExtensions and ephyrExtensionInit decls These were duplicated when GLX support was re-added on two different branches. Signed-off-by: Keith Packard commit e0a678f0596f3547b98d74d5f0438b484b059458 Author: Gaetan Nadon Date: Sat Sep 28 15:26:38 2013 -0400 xfree86: add a comment as to why the logdir is created Without the logdir, the xserver will write the content of the log file on the terminal stating that it cannot be written and will stop. Refer to https://bugs.freedesktop.org/show_bug.cgi?id=3889 Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 5bdbf2dba3f7da4a593b286020eab0c7857e940c Author: Gaetan Nadon Date: Sat Sep 28 15:26:37 2013 -0400 xfree86: Use $(MKDIR_P) for better code portability Still true that we should not use the lower case $(mkdir_p) version. However, remove the 2005 comment as the MKDIR_P is widely used now. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit b8cfb0dc8426754b477b561bc158b8a24c143ddf Author: Gaetan Nadon Date: Sat Sep 28 15:26:36 2013 -0400 Uninstall X link and CYGWIN libXorg.exe.a in local install targets It is our duty to uninstall any files and/or directories that we installed through install-data-local and install-exec-hook. Currently the X symbolic link to Xorg remains on disk after running make uninstall. Note the exception for logdir which is usually shared by other modules. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 35a528e49269c3df75486cc606e51a8c1c083c06 Author: Gaetan Nadon Date: Sat Sep 28 15:26:35 2013 -0400 Xorg binary: use install-exec-hook rather than install-exec-local The former was explicitly designed to execute additional code after the binary has been installed. The latter can be executed in any order, hence it's current dependency on install-binPROGRAMS as a workaround. The CYGWIN libXorg.exe.a target is an installation target rather than a post-installation one, so it should not be done as a hook. It does not depend on the Xorg executable being installed. Automake: "These hooks are run after all other install rules of the appropriate type, exec or data, have completed. So, for instance, it is possible to perform post-installation modifications using an install hook". "With the -local targets, there is no particular guarantee of execution order; typically, they are run early, but with parallel make, there is no way to be sure of that". Reviewed-by: Eric Anholt Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit a1d87576a30008253eb0cc92b44c9718f6665062 Author: Gaetan Nadon Date: Sat Sep 28 15:26:34 2013 -0400 Use $(LN_S) provided by AC_PROG_LN_S macro to create links For better code portability. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 28c8e1910797970dbf1d40794f1804a8fcc812bc Author: Gaetan Nadon Date: Sat Sep 28 15:26:33 2013 -0400 The Xorg binary is missing the extension $(EXEEXT) in the makefile This is not a problem on UNIX platforms, but on CYGWIN it creates a broken link to Xorg rather than a link to Xorg.exe. From the CYGWIN log on tinderbox, we can see that the executable Xorg.exe is installed correctly. We can see the command used to create the link: (cd /jhbuild/install/[...]/install/bin && rm -f X && ln -s Xorg X) Note that the "relink" makefile target correctly appends $(EXEEXT) to Xorg. Reviewed-By: Matt Dew Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit f3b529bf25db2700addbafc7aa4fc5b126ba9929 Merge: 4399bd383 abc2bfca1 Author: Keith Packard Date: Fri Oct 4 14:04:48 2013 -0700 Merge remote-tracking branch 'anholt/ephyr-fixes' commit 4399bd38326b81f7b92365346504d7c6354772a9 Author: Gaetan Nadon Date: Mon Sep 30 13:30:46 2013 -0400 miext/shadow: missing c2p_core.h breaks "make distcheck" target. Reviewed-by: Julien Cristau Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 9ccb4a63982942fdce19609d2cadbd8e51708462 Merge: 5d2ec6933 da5e20127 Author: Keith Packard Date: Fri Oct 4 13:54:55 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 5d2ec6933f6bb5116666ca1bfb07f0f20bf2a0b5 Merge: 7d3d4ae55 6ee4d9f94 Author: Keith Packard Date: Fri Oct 4 13:50:04 2013 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit da5e20127a5b6e11a47eb6e61f3ea87b056cdf5f Author: Gaetan Nadon Date: Thu Sep 19 19:13:35 2013 -0400 test: add new os executable to .gitignore Signed-off-by: Gaetan Nadon Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c73c36b537f996574628e69681833ea37dec2b6e Author: Laércio de Sousa Date: Wed Sep 18 13:42:17 2013 -0300 xserver: enable InputClass option "GrabDevice" by default for non-seat0 seats (#69478) This patch contributes to fill the remaining gaps which make systemd-multi-seat-x wrapper still necessary in some multiseat setups. This also replaces previous evdev patch that does the same thing for that particular driver. When option "-seat" is passed with an argument different from "seat0", option "GrabDevice" for input devices is enabled by default (no need of enabling it in xorg.conf's "InputClass" section). Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=69478 Signed-off-by: Laércio de Sousa Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 160c2db32d0b9ee5316a44179a6af4f4722e3d0a Author: Peter Hutterer Date: Wed Sep 18 16:04:44 2013 +1000 dmx: provide enough space for axis mappings relmap/absmap is used as a evdev-axis-to-x-axis mapping. ABS_X maps to axis 0, ABS_Y to 1, etc. skipping over non-existing axes so that the third bit set in the ABS_* range is axis 2, and so on. This requires us to actually have enough space to have all the ABS_*/REL_* range. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7d3d4ae55dd6ee338439e2424ac423b1df80501b Author: Keith Packard Date: Fri Sep 20 14:43:41 2013 -0500 damage: Must translate initial window damage by window offset Damage is reported relative to the drawable origin, but the window borderClip is absolute. Translate the region by the window position before reporting damage to adjust. Reported-by: Adam Jackson Signed-off-by: Keith Packard Reviewed-by: Adam Jackson commit 8010d3a48bd0b224dcb0883e39c2351ad364d846 Author: Jeremy Huddleston Sequoia Date: Sun Sep 15 08:10:33 2013 -0700 XQuartz: pbproxy: Fix build with -DDEBUG Signed-off-by: Jeremy Huddleston Sequoia commit 39c548da0cf0522ad246630605b96751ab6d39c0 Author: Jeremy Huddleston Sequoia Date: Sun Sep 15 08:07:44 2013 -0700 XQuartz: Fix build with moved pseudoramiX Regression from: e716baedc4d8e52a60f43ef21aba771b340d8c8b Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Jon TURNEY commit 6ee4d9f94ae2cc27c39381d7554134d9b4807a65 Author: Adam Jackson Date: Tue Jul 9 11:19:11 2013 -0400 glx: Fill in some missing attributes from DoGetFBConfigs Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b257fabff00ae925bb7e70364dd1d738634087c9 Author: Adam Jackson Date: Thu Jul 4 10:31:40 2013 -0400 glx: Remove a dead comment Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit abd086502123086ce3d1fba25c159bb022d2750f Author: Adam Jackson Date: Mon Jul 8 17:01:13 2013 -0400 glx: Catch another failure case in drawable creation Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c3c976f54c3c282d6fa6c8360688e036bc43d210 Author: Adam Jackson Date: Mon Jul 8 12:28:56 2013 -0400 glx: Remove screen number from __GLXconfig Not used. There's no real reason to match against this instead of matching against fbconfig or visual ID anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 1d1484e9bd55d1fa8316b1574754f28d5d31a076 Author: Adam Jackson Date: Mon Jul 8 12:09:13 2013 -0400 glx: Remove pixmapMode from __GLXconfig This has never been filled in with anything meaningful afaict, and you can't get to it from the client in any event. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 34e6e60105796ad015469c10921c5ff09acf7eb0 Author: Adam Jackson Date: Tue Jul 2 12:33:36 2013 -0400 glx: Remove support for NV_vertex_program and NV_fragment_program Mesa doesn't implement these anymore, never really did outside of swrast anyway. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit acf14c1de766c4ea206cd7ce7f25b780a589d33c Author: Adam Jackson Date: Tue Jul 2 10:35:19 2013 -0400 glx: realloc style fix in RenderLarge Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 9ebf739a6864c9ec38bf72f63ef2e3b9cd1951db Author: Adam Jackson Date: Tue Jul 2 10:30:40 2013 -0400 glx: Eliminate a small malloc from QueryContext No reason to have that be a failure path. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b99f7975407f111b99d772cd28224d7dc1b34fe4 Author: Adam Jackson Date: Fri Nov 9 18:05:27 2012 -0500 glx: Handle failure to create the pixmap backing the pbuffer We happen not to sanitize the width/height we pass to CreatePixmap here, oops. It's not exploitable, but it's certainly a crash, so let's just throw BadAlloc instead. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 22fbfdcb31f335c22053a0e29f0e73c03cd70a76 Author: Adam Jackson Date: Fri Nov 9 17:52:12 2012 -0500 glx: Implement GLX_PRESERVED_CONTENTS drawable attribute We back pixmaps with pbuffers so they're never actually clobbered. Say so when asked. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2e20b8382cdf37ae5a2802f85b8f06a370f9645d Author: Adam Jackson Date: Fri Nov 9 17:12:49 2012 -0500 glx: Implement GLX_FBCONFIG_ID in GetDrawableAttributes Required by GLX 1.4, section 3.3.6, "Querying Attributes". Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0d76191baeee005982754ac18ca995742e32d8c1 Author: Adam Jackson Date: Fri Nov 9 17:10:57 2012 -0500 glx: Implement GLX_{WIDTH,HEIGHT} in GetDrawableAttributes Required by GLX 1.4, section 3.3.6, "Querying Attributes". Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d11f13e383dda1e9cabe32793d261d46edc44418 Author: Adam Jackson Date: Fri Nov 9 17:07:20 2012 -0500 glx: Compute number of attributes in GetDrawableAttributes on the fly This doesn't have any effect yet, but is needed to properly build the reply for pbuffers. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 468b57324f838144d79e3a9d85a0bde853578c4b Author: Adam Jackson Date: Fri Nov 9 16:48:16 2012 -0500 glx: Style fixes Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 2b181ad0952851f47f23dcb1a36471685313c13e Author: Adam Jackson Date: Fri Nov 9 16:33:54 2012 -0500 glx: Pull GLX vendor string out of __GLXscreen Given how we're currently implementing GLX this can't meaningfully vary per-screen. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit b9c489cf13e1ad35b7d9bea9de8d85e929374d17 Author: Adam Jackson Date: Wed Oct 31 10:05:24 2012 -0400 glx: Remove unused bits from the context struct Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit f579cc85c29f52b575c62e6ae1e16eb87c506bd3 Author: Adam Jackson Date: Thu Jul 4 10:08:40 2013 -0400 glxproxy: Don't track GLCLientm{aj,in}orVersion Basically just a port of 62f06b0d to glxproxy. Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e549ffb5f19cf044bc3e2d368a6f081f8b84bfaa Author: Adam Jackson Date: Tue Oct 30 18:20:43 2012 -0400 dmx/glx: Remove unused __glXNop Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d962b8ed272d4a8921c0dadf16cd926484e30d10 Author: Adam Jackson Date: Thu Aug 22 16:42:23 2013 -0400 damageext: Style fix Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit c90add0f1ce0c85aea7a60635de765848d778266 Author: Adam Jackson Date: Wed Aug 21 11:57:24 2013 -0400 damage: Remove "post-rendering" hooks This is a revert of 974db58f5b730c3770ee461665a02dd4334d1dea. There are no consumers of this API, we must not need it. Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 0f3f8e4295d4c05f33b93e0ffd2f6f8cd5759bf7 Author: Adam Jackson Date: Wed Aug 21 11:13:11 2013 -0400 damage: Don't rewrite Text ops to GlyphBlt ops There's no particularly good reason to, and it breaks Xnest. Bugzilla: http://bugs.freedesktop.org/2454 Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit d08966227e7d567df8d26eebc80f35f886e59a4a Author: Adam Jackson Date: Mon Aug 26 14:03:51 2013 -0400 damage: Simplify DamageUnregister You can only register one drawable on a given damage, so there's no reason to require the caller to specify the drawable, the damage is enough. The implementation would do something fairly horrible if you _did_ pass mismatched drawable and damage, so let's avoid the problem entirely. v2: Simplify xf86RotateDestroy even more [anholt] Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit 28708a045de7d9043d20fb06b61c44a46eb5526b Author: Adam Jackson Date: Mon Aug 26 13:52:14 2013 -0400 damage: Implicitly unregister on destroy There's no reason not to, and it simplifies quite a few callers. Reviewed-by: Chris Wilson Reviewed-by: Eric Anholt Signed-off-by: Adam Jackson commit e657635dbe6b92875b0e88370557c2cbab673a49 Author: Adam Jackson Date: Thu Oct 18 14:24:23 2012 -0400 fb: Remove unused compatibility wrappers Originally added in early 2009, not being used elsewhere anymore. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e4b15125bb06c97f1f34f7074fcdb597e718399c Author: Adam Jackson Date: Thu Oct 18 14:24:22 2012 -0400 mipointer: Remove deprecated miPointerCurrentScreen The only remaining use was in some debugging code in DMX. Reviewed-by: Peter Hutterer Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit b5d66b9513a0f1e13f5c5bc9e0958f4eac9bf6c3 Author: Adam Jackson Date: Thu Oct 18 14:24:21 2012 -0400 xfree86: Remove deprecated unimplemented xf86MapReadSideEffects Reviewed-by: Peter Hutterer Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit abbd85742a390e18497b96902a0c0d976739e3bd Author: Adam Jackson Date: Thu Oct 18 14:24:20 2012 -0400 dix: FIXES is not optional It's already not optional at configure time, this just makes it so at build time too. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit dff81687f5eac3eac9b49f58d4654cc30add2547 Author: Adam Jackson Date: Thu Oct 18 14:24:19 2012 -0400 vbe: Don't try to load the ddc submodule DDC is built into the server now. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit bb82191bcfa8042f8d98ec8b1c6616dc31d2c5c8 Author: Adam Jackson Date: Thu Oct 18 14:24:18 2012 -0400 misprite: Delete some dead private storage Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 3639ab4ce25dc82a3f8592b7322198f1d2aca5f9 Author: Adam Jackson Date: Tue Oct 16 14:56:25 2012 -0400 dri2: Don't bother with xf86LoaderCheckSymbol("DRI2Connect") The DRI2 code is now built-in to the server, even for Xorg. The only thing this could protect against is trying to run a libglx built with DRI2 support against an Xorg built without it, which is firmly in "doctor it hurts when I do this" territory. Reviewed-by: Peter Hutterer Reviewed-by: Ian Romanick Signed-off-by: Adam Jackson commit 13b507409f9e01adebba50e7eb801b52e52692ba Author: Adam Jackson Date: Tue Oct 16 14:56:23 2012 -0400 list: Avoid using X types In particular, Bool. This is not an ABI break: /usr/include/X11/Xdefs.h:typedef int Bool; Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit dbe10ef0e35659ee0e5db73f29670a3894a3e3f5 Author: Adam Jackson Date: Tue Oct 16 14:56:22 2012 -0400 dbe: Fold the window private private into the window private Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 1489637d567b0034a916f88079b5f360e7fce99c Author: Adam Jackson Date: Tue Oct 16 14:56:21 2012 -0400 dbe: Fold midbe reset into dix Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 44d770750069486a8452fb2384f9b85745268e61 Author: Adam Jackson Date: Tue Oct 16 14:56:20 2012 -0400 dbe: Drop the unused idiom support Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 8cce0cf4d378f6fa52bc2cd277737b8986ab683c Author: Adam Jackson Date: Tue Oct 16 14:56:19 2012 -0400 damage: Remove the 'damage window' resource type. Note that the existing code never actually creates a resource of this type, so it can't possibly do anything. This is clearly meant to track window destruction and clean up any associated Damages, but that's already handled by miext/damage's DestroyWindow wrapper. Previous discussion: http://lists.freedesktop.org/archives/xorg-devel/2011-March/020847.html Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e674815e0a217ac01ec2d6a8517f8466b27fb39f Author: Adam Jackson Date: Tue Oct 16 14:56:18 2012 -0400 dmx: Remove ShadowFB support This has been listed as deprecated ever since DMX was merged. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 19d3a7cb5db3188210830efa746987ba50d839e9 Author: Adam Jackson Date: Tue Oct 16 14:56:17 2012 -0400 dix: Remove a dead parameter from DoGetImage Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 4dca026880da90cff9734cf5787c5b57c02e7310 Author: Adam Jackson Date: Tue Oct 16 14:56:16 2012 -0400 mipointer: Remove EnqueueEvent from miPointerScreenFuncRec No DDX overrode this, and we never actually called through that slot anyway. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit ad076dc6e82019defa422500710b3b42c6309e39 Author: Adam Jackson Date: Tue Oct 16 14:56:15 2012 -0400 mipointer: Flatten calls to mieqSwitchScreen No DDX was overriding this. Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit e2b14a1d3bb27e86ff1d7aaf59af850d06263ef5 Author: Adam Jackson Date: Tue Oct 16 14:56:14 2012 -0400 os: Factor out some common code in input buffer handling Reviewed-by: Peter Hutterer Signed-off-by: Adam Jackson commit 65fca558848acd907483d3c85c7cd4db5560f1b4 Author: Radek Doulik Date: Tue Aug 13 08:45:47 2013 +0200 xnest: Ignore GetImage() error in xnestGetImage() When an Xnest instance is not viewable it will crash when a client in that instance calls GetImage. This is because the Xnest server will itself receives a BadMatch error. This patch ignores the error. The application which has requested the image will receive garbage - this however is fully legal according to the specs as obscured areas will always contain garbage if there isn't some sort of backing store as discussed in https://bugs.freedesktop.org/show_bug.cgi?id=9488 The applied patch is a version from Dadek Doulik. v2: Call XSync() before changing error handlers as suggested by Daniel Stone . Reviewed-by: Daniel Stone Signed-off-by: Egbert Eich commit b902c8abb6d03e68c93e13881a350523b5ac900c Author: Michal Srb Date: Tue Aug 6 16:56:53 2013 +0200 Xnest: Implement xnestModifyPixmapHeader Xnest variant of ModifyPixmapHeader that creates new Pixmap in parent X server if it's size is modified from 0x0 to anything bigger. xnestCreatePixmap doesn't create pixmap in parent X server if it has dimensions 0x0. If it is later resized and accessed, Xnest will be aborted with BadDrawable error from parent X server because it will use XID 0. This happens with ScratchPixmap, for example as used from XaceCensorImage. Applications using XACE crash Xnest. Reviewed-by: Adam Jackson commit 132507eba93e4dfd466d5c30c9b818cdc6f8536e Author: Peter Harris Date: Mon Jul 15 19:44:45 2013 -0400 security: Don't count RetainPermanent clients twice If a RetainPermanent client is subsequently killed by a KillClient request, the reference count is decremented twice. This can cause the server to prematurely kill other clients using the same Authorization. Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit 20c2a3bcb11b5baf564e2c73a477ba23f5ae2b10 Author: Peter Harris Date: Mon Jul 15 19:44:29 2013 -0400 mi: Avoid stack smash when drawing dashed lines X.org Bug 54013 Reviewed-by: Adam Jackson Signed-off-by: Peter Harris commit 9bf46610a9d20962854016032de4567974e87957 Author: Chris Wilson Date: Fri Jun 21 22:58:31 2013 +0100 os: Immediately queue initial WriteToClient If we immediately put the WriteToClient() buffer into the socket's write queue, not only do we benefit from sending the response back to client earlier, but we also avoid the overhead of copying the data into our own staging buffer and causing extra work in the next select(). The write is effectively free as typically we may only send one reply per client per select() call, so the cost of the FlushClient() is the same. shmget10: 26400 -> 110000 getimage10: 25000 -> 108000 shmget500: 3160 -> 13500 getimage500: 1000 -> 1010 The knock-on effect is that on a mostly idle composited desktop, the CPU overhead is dominated by the memmove in WriteToClient, which is in turn eliminated by this patch. Reviewed-by: Adam Jackson Signed-off-by: Chris Wilson commit ceffb34774d44ada83cc1994d20c8d65b46bd555 Author: Laurent Carlier Date: Sat Jun 8 00:43:56 2013 +0200 ephyr: restore GLX support It was removed since version 1.13 Signed-off-by: Sebastien Bacher Acked-by: Daniel Stone commit f37972f4a67b49ba9649310a6778bd1bf31e0130 Author: Keith Packard Date: Wed Apr 24 14:58:27 2013 -0700 miext/sync: Fix multi-screen support in SyncFence initialization miSyncSetup was checking to see if the screen private key had been registered, and if so, skipping the setup of the provided screen. Instead, it should register the private index only once, but then initialize the screen unless it has already been initialized. This latter step allows drivers to initialize the sync private structures before the Sync extension itself is initialized. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 1c8beedfe4343377fa3504f8ab71430cc137b22c Author: Adam Jackson Date: Wed Aug 21 14:12:52 2013 -0400 randr: Fix a copypasta bug in CRTC confinement Reviewed-by: Michel Dänzer Signed-off-by: Adam Jackson commit 47ff382d1fce25a8b097d45b79489e891f1f1228 Merge: 6f89ae3e6 3752a8158 Author: Keith Packard Date: Mon Sep 9 15:13:42 2013 -0700 Merge remote-tracking branch 'jturney/master' commit 6f89ae3e64c4dfeea508813e546c10ba1da3ea8e Author: Thomas Klausner Date: Wed Sep 4 20:06:07 2013 +0200 Fix typo in configure warning. Signed-off-by: Thomas Klausner Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 47218a6e09549781fd61dbf5e0d3d5c81da64323 Author: Thomas Klausner Date: Wed Sep 4 20:05:51 2013 +0200 Fix bug in cursor handling. CreateCursor (Xlib call XCreatePixmapCursor) with a non-bitmap source pixmap and a None mask is supposed to error out with BadMatch, but didn't. From der Mouse , changed following comments by Alan Coopersmith . Signed-off-by: Thomas Klausner Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 1110b71e360195aab040d835b54540ab558638c5 Author: Chris Clayton Date: Wed Sep 4 15:42:04 2013 +1000 kdrive: fix build error on gcc 4.8 for out-of-bounds array access I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot of gcc-4.8: input.c:225:43: error: array subscript is above array bounds [-Werror=array-bounds] This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can be beyond the end of the array. Signed-off-by: Chris Clayton Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit abc2bfca16adcd1e5657d4ce54f4e1335d5ed53f Author: Sebastien Bacher Date: Fri Aug 23 21:21:44 2013 +0200 kdrive: initialize GLX for xephyr Like commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29, re-add initialization of GLX after it was accidentally dropped from non-Xorg servers in 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86. Signed-off-by: Sebastien Bacher Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=62346 Reviewed-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau Signed-off-by: Eric Anholt commit aa5534ec6931ffcc81cca76b98785d57de8e0e52 Author: Eric Anholt Date: Fri Aug 23 11:23:00 2013 -0700 ephyr: Do grab/ungrab for ctrl+shift, not just shift+ctrl. Given that the window title says "ctrl+shift", having pressing those keys in that order not ungrab you is fairly mean. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit 5cc15e1c427bacd73db7381df3474a23f7616624 Author: Eric Anholt Date: Fri Aug 23 11:19:17 2013 -0700 ephyr: Flush the X connection when updating the window title. Otherwise when you're doing the ctrl-shift mouse grab thing, you don't know what state you're in until the next rendering occurs. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit ba387cf21f7d95987211f75d8024601e7d64e322 Author: Eric Anholt Date: Fri Aug 23 11:17:14 2013 -0700 ephyr: Use host (HW) cursors by default. Unless you're working on the sw cursor rendering code, you surely want to have real hardware cursors. Signed-off-by: Eric Anholt Reviewed-by: Adam Jackson Reviewed-by: Julien Cristau commit 0f5a2f13dc284dd5f0f28e2c4323b2e08d253a7d Author: Eric Anholt Date: Fri Aug 23 11:04:22 2013 -0700 ephyr: Garbage collect some DOA host window clipping code. Introduced in 79782726617d4b5a4f9b376f21936d035fc870e1 but never used. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 090de17d361dc9828203a2562565d6499998db46 Author: Eric Anholt Date: Fri Aug 23 10:56:22 2013 -0700 ephyr: Garbage collect some dead XV clipping code. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 347d0fa6961c2b3dc4efd4e7cca8ef98cd3ea06e Author: Eric Anholt Date: Fri Aug 23 10:44:23 2013 -0700 ephyr: Remove the helper libs for each of the optional components. Note that EXTRA_DIST was always unnecessary, because automake notices conditional compile of source files and includes them. Copyright header is added because git noted that this was a 61% rewrite. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 74dff87790dbb3dcb23634f1e8cd54018e5ddc9d Author: Eric Anholt Date: Fri Aug 23 10:40:52 2013 -0700 ephyr: Remove the remaining bits of host/server XV split. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 2f994dfe9d1add9ea8cb9c88ddb0d15843854788 Author: Eric Anholt Date: Fri Aug 23 10:14:36 2013 -0700 ephyr: Remove the host/server split of the actual XV video operations. I suspect there's more cleanup possible in ephyrHostXVPutImage() by sticking a bunch of the args in the port priv earlier. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 0b7ce74315213ccd31802847e5a83e67090ded14 Author: Eric Anholt Date: Fri Aug 23 10:01:23 2013 -0700 ephyr: Remove another host/server split for XV image formats. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 1dcc28bcb402d7286d18b41b469062a5c176d7eb Author: Eric Anholt Date: Thu Aug 22 17:00:41 2013 -0700 ephyr: Remove the host/server split for video encodings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 28a37757e11068b4594f4128a0d64c6bc9a53ee0 Author: Eric Anholt Date: Thu Aug 22 17:26:21 2013 -0700 ephyr: Remove the host/server split for XV formats. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 41134d393a37dd5b971b018a3888fbfea0b9c736 Author: Eric Anholt Date: Thu Aug 22 17:21:37 2013 -0700 ephyr: Remove the host/server split for XV attributes. v2: Fix leaks of xcb replies (caught by Julien) Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 1342a93c49beb6e4924534304119d57fa587ad0f Author: Eric Anholt Date: Thu Aug 22 17:26:08 2013 -0700 ephyr: Remove the host/server split for XV adaptors. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit fad79d2e3e53de4f25b3d1dd7accb558464a4a46 Author: Eric Anholt Date: Sun Aug 18 20:08:32 2013 +0200 ephyr: Refactor XV adaptor feature detection. This obviously wanted a helper function beforehand, but even more so now that we have XCB. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7a9c311add62026972419ef0b04a55680072bfeb Author: Eric Anholt Date: Sun Aug 18 20:02:53 2013 +0200 ephyr: Remove some pointless indirection in the XV code. Now that we have XCB on the server side, we don't need to split these functions out. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 46cf6bf5692ef751ec9d17ae2292565d4b13f14b Author: Eric Anholt Date: Sun Aug 18 18:38:29 2013 +0200 ephyr: Move event processing into ephyr.c. No more extra event structure to translate between hostx.c and ephyr.c! Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 847c856effde482c13cdefcdca8176cee3bf67c4 Author: Eric Anholt Date: Sun Aug 18 17:28:08 2013 +0200 ephyr: Move the host screen info into the kdrive screen private. We can include xcb bits from the same place as server headers, so there's no need to hide them any more. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 8dadc78e233f341f1ecb8d404de03d98ab210620 Author: Eric Anholt Date: Sun Aug 18 16:45:06 2013 +0200 ephyr: Rename and use the proper type for what was host_screen->info. Now that we can include server headers in talking to host X, we don't need to hide any more. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 18d836f6dde46bcac8b794d34f76032688c28851 Author: Eric Anholt Date: Sun Aug 18 14:12:45 2013 +0200 ephyr: Expose a single function for detecting extensions. v2: Fix trying to include xcb-dri in the non-dri-build case (Noted by Julien) Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 3aacb22d6473480c31fb08f0b2527747dbf5be57 Author: Eric Anholt Date: Sun Aug 18 14:01:53 2013 +0200 ephyr: Drop dead ephyrHostAtomToLocal code. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 4aaad0bfbcef018eb36839b1d034c3f60022694a Author: Julien Cristau Date: Wed Oct 20 20:10:43 2010 +0200 Xephyr: we're not using Xlib anymore, no need to undef _XSERVER64 Drop obsolete comments about interaction between Xlib code and that macro, and stop undefining it. Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt commit 0fc2f9f04a44599f598380d4df992bec60c0e3a1 Author: Julien Cristau Date: Sat Sep 25 16:05:07 2010 +0200 Xephyr: handle errors in event loop Signed-off-by: Julien Cristau Reviewed-by: Eric Anholt Reviewed-by: Mikhail Gusarov commit 3309a73c826f02c4b2e14180a3254546314ec323 Author: Julien Cristau Date: Fri Jun 25 14:20:57 2010 +0100 Xephyr: drop remaining Xlib dependency Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 7da2174cf93f59b7e0372a6dc9d37a510076e187 Author: Julien Cristau Date: Mon Jun 21 14:39:03 2010 +0100 Xephyr: move glx code to xcb v2: Rebase on master, notably adding XCB for X_GLXvop_MakeCurrentReadSGI (anholt). v3: Fix use-after-free (caught by Julien). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 19c2699b954e2978301c4449dfccc7ca40bf6ae6 Author: Julien Cristau Date: Wed Jun 23 18:36:00 2010 +0100 Xephyr: remove unused DRI1 code Reviewed-by: Mikhail Gusarov Signed-off-by: Julien Cristau commit 68b7db19e8d3c1ac55a811327d3058f4c8fb45ec Author: Julien Cristau Date: Sun Jun 20 00:07:08 2010 +0100 Xephyr: move ephyrdri over to xcb Require new xcb-xf86dri to get fixed GetDrawableInfo. Reviewed-by: Mikhail Gusarov Signed-off-by: Julien Cristau commit aea119cd05807ed77336f96a40f8e4607c6ce169 Author: Julien Cristau Date: Sun Jun 20 11:13:26 2010 +0100 Xephyr: use xcb-xv instead of libXv v2: Massive, conflict-filled rebase. I think I resolved everything right, but this host xv code makes my eyes bleed. Touch-tested XV after the rebase (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 3ea75a59d5fec3c4099388724942e216f2344328 Author: Julien Cristau Date: Mon Jun 21 17:20:32 2010 +0100 Xephyr: use xcb for event handling v2: Rebase on indentation changes, squash in a simpler variant of the later event compression patch, fix server hang or segfault on window close by reimplementing the x_io_error_handler in the new XCB event loop (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit ff26845252889f7cc3258a0d3aa116189acc6aae Author: Julien Cristau Date: Thu Jun 24 23:45:16 2010 +0100 Xephyr: some more hostx.c xcb-ification Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 9b55f76a265aab0d9943a40208a38800e5782ba5 Author: Julien Cristau Date: Thu Jun 24 23:35:15 2010 +0100 Xephyr: move HostX.visual to xcb Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 126312fb4a6e06024a306341e675163108426390 Author: Julien Cristau Date: Thu Jun 24 23:26:48 2010 +0100 Xephyr: replace XKeycodeToKeysym with xcb-keysyms Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 8543d3fdfd47d2a0423f3ef8e7429c23c5d6b053 Author: Julien Cristau Date: Thu Jun 24 23:17:32 2010 +0100 Xephyr: delete unused hostx_get_extension_info function v2: Also remove the prototype (anholt) Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit d72c11b9df4a98fd80cb6635d34964483e33bc41 Author: Julien Cristau Date: Mon Jun 21 14:25:11 2010 +0100 Xephyr: delete unused proxy code Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit a71ea3f96769da157dde82a591e43264820772ac Author: Julien Cristau Date: Sun Jun 20 23:34:54 2010 +0100 Xephyr: xcb-ify visual list construction Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit ac2b0348c00d692ec1bd8d6c8ab99e9198e755a7 Author: Julien Cristau Date: Sun Jun 20 23:34:39 2010 +0100 Xephyr: xcb-ify pointer/keyboard grab Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 1f93e6b350d1b9a058009052a666a2e8796708cb Author: Julien Cristau Date: Sun Jun 20 23:34:03 2010 +0100 Xephyr: no need for XDisplayKeycodes Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit 73398e5bf61c30e69a40a19a1057c2263fbb91ef Author: Julien Cristau Date: Thu Jun 24 23:00:38 2010 +0100 Xephyr: use xcb-shape instead of XShape* Reviewed-by: Mikhail Gusarov Reviewed-by: Eric Anholt Signed-off-by: Julien Cristau commit a2b73da78de4e627965213d24a6c33f243a60eb6 Author: Julien Cristau Date: Sun Jun 20 00:05:40 2010 +0100 Xephyr: start converting hostx.c over to xcb v2: Dropped the hostx_load_keymap changes, now that that function is gutted (anholt). Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 762606b4cdfb57c5202ae128ce4dbb8afe172d4e Author: Julien Cristau Date: Fri Jun 25 17:59:13 2010 +0100 Xephyr: stop loading the host's keymap This isn't used anywhere. v2: Rebase to the top of the patch series (anholt) Reviewed-by: Mikhail Gusarov (v1) Signed-off-by: Julien Cristau Signed-off-by: Eric Anholt commit 3752a815800626ae93f64a856f5889aa6636344e Author: Marc Haesen Date: Sat Aug 10 17:38:38 2013 +0100 hw/xwin: Remove unnecessary and incorrect HWND casts Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 34932cef6cc800fbdf2f375506057ed8cd1e07f6 Author: Jon TURNEY Date: Mon Apr 1 13:43:00 2013 +0100 hw/xwin: Fix compilation of winauth.c with -Werror=implicit-function-declaration /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c: In function ‘MitGenerateCookie’: /jhbuild/checkout/xorg/xserver/hw/xwin/winauth.c:87:5: error: implicit declaration of function ‘MitAddCookie’ [-Werror=implicit-function-declaration] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 2a08554a0bf80b862c15676c31ecd463b616518c Author: Jon TURNEY Date: Mon Jun 17 23:54:01 2013 +0100 hw/xwin: Remove unused extern g_fUseUnicode from winclipboardwndproc.c Signed-off-by: Jon TURNEY Reviewed-by: Marc Haesen commit 69401f38a697c941ea58351028f4cd4b810f9188 Author: Jon TURNEY Date: Mon Jun 17 18:37:26 2013 +0100 hw/xwin: Remove unneeded forward declaration of winProcessXEventsTimeout() Remove unneeded forward declaration of winProcessXEventsTimeout(), the actual definition immediately follows. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 9c45a1ad44f12ac25e1c3b7a18a3bceb85a2cf38 Author: Jon TURNEY Date: Mon Jun 17 16:58:47 2013 +0100 hw/xwin: Remove prototype for non-existent winDeinitClipboard() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit acc46fc217352b94f77a6b5b14808ea89875a2a1 Author: Jon TURNEY Date: Mon Jun 17 00:40:13 2013 +0100 hw/xwin: Remove unused externs from winclipboardwrappers.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit fcc7767f8cd6c318861b1060ef6a3936750a0dd2 Author: Jon TURNEY Date: Mon Jun 10 17:31:12 2013 +0100 hw/xwin: Remove unused winProcQueryTreeOrig variable Unused since 47c7b6d3e626497747ae2780f259a15b8e6c846f "Remove no-longer needed tricks used to prevent the clipboard client from being killed" Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 8fa882a980abea6f05b4b59447a187aea2c793a1 Author: Jon TURNEY Date: Sat Aug 10 12:41:07 2013 +0100 hw/xwin: Fix ARGB cursor conversion on x86_64 Fix erroneous use of unsigned long * for lpBits in winXCursorToHCURSOR() which leads to ARGB cursors being vertically streched on x86_64 by interleaving blank rows of pixels. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 4bfb2dce5eea4923eaf86eca33b96087b28235f5 Author: Jon TURNEY Date: Sun Apr 7 23:59:44 2013 +0100 hw/xwin: Fix an issue in winSetSpansNativeGDI() identifed by -Warray-bounds The BITMAPINFO local only has room for a single RBGQUAD in bmiColors, but we access two (black and white for a mono-color DIB). Fix by changing to a dynamic allocation big enough for a BITMAPINFO and a RGBQUAD. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 784c006adb22c6693ad30dd0b1b05369cfaa7b5e Author: Jon TURNEY Date: Sat Aug 10 11:55:23 2013 +0100 hw/xwin: Fix -Warray-bounds warning in winXCursorToHCURSOR() Rewrite winXCursorToHCURSOR() so access to BITMAPINFO bmiColors member doesn't trigger an -Warray-bounds warning. Note that the underlying storage is allocated as a BITMAPV4HEADER, so has sufficent room for the extra RGBQUADs bmiColors after the BITMAPINFO bmiHeader. wincursor.c: In function 'winSetCursor': wincursor.c:293:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:294:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:295:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:296:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:297:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:298:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:299:24: error: array subscript is above array bounds [-Werror=array-bounds] wincursor.c:300:24: error: array subscript is above array bounds [-Werror=array-bounds] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 41d03c9ccce665b919b180bbb819b78c750aa325 Author: Marc Haesen Date: Fri Aug 2 18:19:22 2013 +0100 hw/xwin: Correct size of _WINDOWSWM_NATIVE_HWND property on x86_64 Use the correct size of a HWND on x86_64 in XChangeProperty() and XGetWindowProperty() calls for the _WINDOWSWM_NATIVE_HWND property. Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 390cfec10ef7d52391f890c7593ac82a7d77d856 Author: Colin Harrison Date: Fri Aug 9 16:48:12 2013 +0100 hw/xwin: Correct winprefs.c function signatures for x64. Correct SetupRootMenu(), SetupSysMenu(), HandleCustomWM_INITMENU() and HandleCustomWM_COMMAND() function signatures which use unsigned long parameters, where just a specific HWND or HMENU handle type should have been used. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY Reviewed-by: Marc Haesen commit e716baedc4d8e52a60f43ef21aba771b340d8c8b Author: Jon TURNEY Date: Sat Mar 31 14:42:45 2012 +0100 Move pseudoramiX code where it can be shared between Xwin and Xquartz Move pseudoramiX code to a separate top-level directory. Link Xwin and Xquartz with libPseudoramiX I'm not sure moving this to a top-level directory is appropriate, but I'm not sure where else it fits. Future work: pseudoramiX can probably be consolidated with the rrxinerama code (which I think provides fake xinerama data when real XINERAMA is disabled and we only have one screen) v2: fix distcheck Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit ce0217b98261dcf8b20cfb743831965dda1950ec Author: Jon TURNEY Date: Sat Aug 10 12:35:55 2013 +0100 hw/xwin: Fix winglobals.h for MinGW64 build Include pthread.h in winglobals.h to fix build with latest MinGW64 headers In file included from winmultiwindowicons.c:47:0: winglobals.h:92:1: error: unknown type name ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit b27756dbe6a1be4633ec47a8fe92a4c217f68f93 Author: Jon TURNEY Date: Sun Aug 11 12:15:11 2013 +0100 hw/xwin: Fix inclusion of shlobj.h in MinGW64 build Fix build with latest MinGW64 headers by wrapping Status type in shlobj.h as well In file included from InitOutput.c:51:0: /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1231:44: error: expected identifier or ‘(’ before ‘int’ /usr/i686-w64-mingw32/sys-root/mingw/include/shlobj.h:1248:44: error: expected identifier or ‘(’ before ‘int’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Reviewed-by: Marc Haesen commit 94d4e29aedc69431fa9b299ca1b67947173d7a24 Author: Peter Hutterer Date: Mon Aug 26 15:51:46 2013 +1000 Xi: allow for XIAllowEvent requests larger than XI < 2.2 size (#68554) XIAllowEvents changed length in XI 2.2 (for the touchid). A bug in libXi causes libXi to always use the new request length if the server supports 2.2, regardless of the client's XIQueryVersion request. The server takes the client's XIQueryVersion request into account though, resulting in a BadLength error if a 2.[0,1] client calls XIAllowEvents on a XI 2.2+ server. Can't fix this in libXi, so work around this in the server. X.Org Bug 68554 Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 82939e02392cbb880313fe92957091ff89ce2f2b Author: Peter Hutterer Date: Fri Aug 16 15:30:59 2013 +1000 dix: check for grab type before checking XI2 mask if the grab type isn't XI2, grab->xi2mask is random. That random data may have the enter/leave mask set, leading to events sent to the client that the client can't handler. Source of these errors: _xgeWireToEvent: Unknown extension 131, this should never happen. Simplest reproducer: Start Xephyr, press button inside window, move out. As the pointer leaves the Xephyr window, the errors appear. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 16894df1ffb6fe21bf723dd954578e8d934799ca Author: Peter Hutterer Date: Fri Aug 16 10:55:09 2013 +1000 Xi: replace loop with memset Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit 8f2292b683f591052da2fe94fb3831a3c9a5aa61 Author: Peter Hutterer Date: Fri Aug 16 11:05:49 2013 +1000 include: wrap EMASKSIZE in parentheses Otherwise things like EMASKSIZE * foo will yield interesting results. Signed-off-by: Peter Hutterer Reviewed-by: Adam Jackson commit d803f296c616ccf55711cf0af9e7d3eae2edda16 Author: Peter Hutterer Date: Fri Aug 23 09:04:01 2013 +1000 test: fix the gcc diagnostics pragma pop without push restores the commandline options. The proper way is to push, then ignore, then pop. And while we're at it, change the pop argument to a comment - pop ignores the argument, but be proper about it. Signed-off-by: Peter Hutterer commit 05ea6307fa4f0bee3d3bf536396059f3906791a0 Author: Egbert Eich Date: Fri Aug 16 19:52:16 2013 +0200 DIX/Xi: Pass correct client to CheckDeviceGrabAndHintWindow() If we have a client which has registered for a DeviceButton grab be sure to pass this to CheckDeviceGrabAndHintWindow(). Since the order of clients is arbitrary there is no guarantee that the last client in the list is the one that belongs to this class. Signed-off-by: Egbert Eich Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e01a3f65d3e6d92f92ef2992b338cc9625bde082 Author: Eric Anholt Date: Sat Aug 17 14:50:37 2013 +0200 ephyr: Fix warning about XID vs unsigned long * by changing function args There's no reason to pass the data back out to the caller, since the caller was dropping it on the floor. The original data is a CARD32, so no need to mess with weird unsigned longs. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit f1cefe020bd21c07dfcc9f204e79939499abbd35 Author: Eric Anholt Date: Sat Aug 17 14:38:08 2013 +0200 ephyr: Drop is_ok logging. The only cases that lead to !is_ok are already EPHYR_LOG_ERROR, and it fixes set-but-unused compiler warnings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 77c7a2014e3942b55c0b78308edf02eab33f2e60 Author: Eric Anholt Date: Sat Aug 17 14:36:09 2013 +0200 kdrive: Fix const cast warnings in arguments processing. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7107937e473a3557c37d719cb100b2e9b09075dd Author: Eric Anholt Date: Sat Aug 17 13:11:17 2013 +0200 kdrive: Fix const cast warnings in driver name handling. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 56c405d46a86853771a0b808da4c8a9ef626960c Author: Eric Anholt Date: Sat Aug 17 13:07:23 2013 +0200 kdrive: Fix a few easy cast warnings. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit a9c48a07eea50468fa47ab178cdd91edb0b5727f Author: Eric Anholt Date: Sat Aug 17 13:06:23 2013 +0200 kdrive: Drop dead code. This is unused as of the introduction of a helper in e7150db5350bc2113ff4126019b489847a4dc217 Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 873ae962bdb7559c952b5955ba262285701982a8 Author: Eric Anholt Date: Sat Aug 17 13:01:57 2013 +0200 ephyr: Fix dead code warning. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 34af2eebe19e2f8afe35a5614d4d44fa4fd89d6b Author: Eric Anholt Date: Sat Aug 17 13:01:32 2013 +0200 ephyr: Fix const-cast warnings for setting window title. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit 7edf5066db48434739ac64e0576fbb4fdf0f37f9 Author: Eric Anholt Date: Sat Aug 17 12:54:33 2013 +0200 ephyr: Fix const cast warnings in ephyrhostvideo. Signed-off-by: Eric Anholt Reviewed-by: Julien Cristau commit fe7463b8ce0de301c2f82b108c93963424f77219 Author: Julien Cristau Date: Sat Jul 27 12:09:07 2013 +0200 dix: add missing include for DeleteWindowFromAnySelections Fixes build error with XACE disabled: window.c:886:5: error: implicit declaration of function 'DeleteWindowFromAnySelections' [-Werror=implicit-function-declaration] DeleteWindowFromAnySelections(pWin); ^ Debian bug#701372 Reported-by: Matthias Klose Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 6a49f8836a649322d38a364d9ae084be40fb2305 Author: Keith Packard Date: Sat Aug 17 12:17:36 2013 +0200 Add .dir-locals.el Enforce X.org style with an emacs configuration file Signed-off-by: Keith Packard commit f67d022523c59a27f3bf8791aa9ca6624318b1fd Merge: 5a36cdd91 9680f6a12 Author: Keith Packard Date: Tue Aug 6 07:12:12 2013 +0200 Merge commit '9680f6a12d642c2e4bfa09bf459d678214059d74' commit 5a36cdd91530d27627e39159a89b53f9fbb75280 Author: Alan Coopersmith Date: Mon Aug 5 20:46:45 2013 -0700 Allow disabling XFree86-DGA, DRI, VidModeExtension extensions Code to recognize these in extension enable/disable options was wrapped in #ifdef XorgLoader, but that's not defined when building miinitext.c since the great module merge of 1.13. Change to an #ifdef that is defined. Signed-off-by: Alan Coopersmith Reviewed-by: Robert Hooker Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit 9680f6a12d642c2e4bfa09bf459d678214059d74 Author: Peter Hutterer Date: Tue Aug 6 13:14:56 2013 +1000 xfree86: de-duplicate some AM_CPPFLAGS Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit bbef8e46f2fed8f823ee4b97e96c3fcee28f3b75 Author: Peter Hutterer Date: Tue Aug 6 13:08:13 2013 +1000 Replace INCLUDES with AM_CPPFLAGS newer automake gets quite noisy about this. hw/xfree86/ddc/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') and many more of these. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit c218ba8423a73a7a643cb17789db8a1dd0901ca6 Author: Julien Cristau Date: Fri Aug 2 20:07:36 2013 +0200 xfree86: improve check for posix saved ids Replace hardcoded SVR4 || linux || CSRG_BASED with an autoconf check and the _POSIX_SAVED_IDS macro. Suggested-by: Mark Kettenis Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis . Signed-off-by: Peter Hutterer commit 930c6ff15d437dfb0f897e8cb4253abba70819cc Author: Julien Cristau Date: Fri Aug 2 23:46:00 2013 +0200 test: include dix-config.h in hashtabletest.c Missing _XSERVER64 define caused inconsistent sizeof(XID) between the test and hashtable code, leading to test failures on 64bit big endian archs like s390x or ppc64. Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b6e5c4669e0db391966deb397e8c975ec7f0124d Author: Maarten Lankhorst Date: Tue Jul 30 15:31:24 2013 +0200 test/xi2: fix protocol-xiqueryversion test The old code was broken and allowed setting client version >= XIVersion, this was fixed in the previous patch, but updating the value for XIVersion broke the tests, so fix the tests too. Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 500e844a24962c9e70abb3d614f1973013b2de73 Author: Maarten Lankhorst Date: Tue Jul 30 14:45:21 2013 +0200 Xi: Clamp XIClient maximal version to XIVersion Do not allow setting client version to an arbitrary value >= XIVersion. Fixes a test error with test/xi2/protocol-xiqueryversion.c, introduced by commit 4360514d1c "Xi: Allow clients to ask for 2.3 and then 2.2 without failing" Signed-off-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer commit e1ab8f239bdc6af17ef6cd0e9c6187c4e2e2f5bc Author: Dave Airlie Date: Wed Jul 31 11:35:44 2013 +1000 xfree86/man: document AutoAddGPU This at least mentions AutoAddGPU and hints at when you might want to disable it. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Peter Hutterer commit 836daf4c7a276108a9f950e524828744aeda0a3c Author: Dave Airlie Date: Wed Jul 31 11:24:48 2013 +1000 modesetting: change output names for secondary GPUs if we are a secondary GPU modify the output name to avoid clashes. Signed-off-by: Dave Airlie commit ff38bbe81ace85bf675bbaa0a9ca5f3b32ede449 Merge: bdd1e22cb 4360514d1 Author: Keith Packard Date: Thu Jul 25 22:50:27 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 4360514d1cc8e3132f93f56172d291074e8c770f Author: Keith Packard Date: Wed Jul 10 22:42:55 2013 -0700 Xi: Allow clients to ask for 2.3 and then 2.2 without failing This allows different sub-systems within the same application to request different Xi versions without either getting old behaviour everywhere or simply failing with a BadValue. Signed-off-by: Keith Packard Signed-off-by: Peter Hutterer commit bdd1e22cbde9ea2324e4e1991c9e152f22f88151 Author: Aaron Plattner Date: Tue Apr 30 14:14:23 2013 -0700 xfree86: detach scanout pixmaps when detaching output GPUs Commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 fixed a bit of a chicken-and-egg problem by detaching GPU screens when their providers are destroyed, which happens before CloseScreen is called. However, this created a new problem: the GPU screen tears down its RandR crtc objects during CloseScreen and if one of them is active, it tries to detach the scanout pixmap then. This crashes because RRCrtcDetachScanoutPixmap tries to get the master screen's screen pixmap, but crtc->pScreen->current_master is already NULL at that point. It doesn't make sense for an unbound GPU screen to still be scanning out its former master screen's pixmap, so detach them first when the provider is destroyed. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 3d8756631070c440cefa31b35fea3d407f187810 Author: Peter Hutterer Date: Mon Jul 22 13:43:07 2013 +1000 dix: set the valuator mask to ensure XI 1.x events have data XI 1.x only allows for first + num valuators, so if a device sends data for valuators 0 and 2+ only (i.e. valuator 1 is missing) we still need to get the data for that from somewhere. XI 1.x uses the hack of an unset valuator mask to get the right coordinates, i.e. we set the value but don't set the mask for it so XI2 events have the right mask. For an absolute device in relative mode, this broke in b28a1af55cf, the value was now always 0. This wasn't visible on the cursor, only in an XI 1.x client. The GIMP e.g. sees jumps to x/0 every few events. Drop the condition introduced in b28a1af55cf, data in valuators is always absolute, regardless of the mode. Signed-off-by: Peter Hutterer commit 4fb686d6a6777950f0e0d55b848cd2af4cbad372 Author: Peter Hutterer Date: Wed Jul 24 11:50:00 2013 +1000 dix: check the xi2mask, not the grab type for touch listeners grab->type is only non-zero for passive grabs. We're checking an active grab here, so we need to check if the touch mask is set on the grab. Test case: grab the device, then start two simultaneous touches. The grabbing client won't see the second touchpoints because grab->type is 0 and the second touch is not an emulating pointer. Signed-off-by: Peter Hutterer commit 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75 Author: Jon TURNEY Date: Mon Apr 8 01:28:36 2013 +0100 hw/xwin: Fix numerous 64-bit format/type cast issues with debug printing of pointers Numerous pieces of debug output cast a pointer to an int and then use a "%08x" printf format. Use "%p" format for 64-bit portability. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e95bb97073ca77193e4c51bd1504403fbe245533 Author: Colin Harrison Date: Tue Jun 25 21:34:43 2013 +0100 hw/xwin: Fix possible crash in winMultiWindowGetClassHint Fix a possible crash in winMultiWindowGetClassHint() when an application doesn't null terminate the WM_CLASS property class name (which is an ICCCM conformance bug in the application) (Reported for running the contiki cooja simulator in multiwindow mode, although it seems that many Java clients may have this problem, see [1]) Based on a patch by Marc Haesen. v2: Avoid using strnlen() which is missing on MinGW v3: Align with Xming patch [1] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6961123 Signed-off-by: Colin Harrison Reviewed-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 4bc375aa2f08bd092f60d3e358d345fc9a0d3637 Author: Jon TURNEY Date: Tue Jun 18 19:21:02 2013 +0100 hw/xwin: Remove obsolete WIN_XEVENTS_SHUTDOWN Remove obsolete WIN_XEVENTS_SHUTDOWN. This event is never generated. (I think the idea was to listen for WM_DELETE_WINDOW, but that's not a very useful thing to do for a hidden window.) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2663203cd6994166e107e796c4724a4ed3b59370 Author: Jon TURNEY Date: Tue Jun 18 18:03:05 2013 +0100 configure.ac: Check for python at configure time when building XWin with AIGLX Check for python at configure time when building XWin with AIGLX, it's used to generate the wrapper code for native GL functions. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9fe360bf2be5c959fb21835955ef550098ccbbf0 Author: Jon TURNEY Date: Sun Jun 16 00:07:57 2013 +0100 hw/xwin: Avoid a null dereference if CreateDIBSection() fails in NetWMToWinIconAlpha() Avoid a null dereference of DIB_pixels if CreateDIBSection() fails in NetWMToWinIconAlpha() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 71b5f56302bbd8be62f63f0dd62cbcd33aab3ac5 Author: Jon TURNEY Date: Thu Feb 21 17:12:17 2013 +0000 hw/xwin: Handle WM_MOUSEHWHEEL Handle WM_MOUSEHWHEEL tilt wheel messages, similarly to WM_MOUSEWHEEL scroll wheel messages, to generate X button 6 and 7 presses and releases. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cf9c777ee094d660e0c95559373fd23ee910362e Author: Jon TURNEY Date: Thu Feb 21 17:10:45 2013 +0000 hw/xwin: Map extra mouse buttons 1 and 2 to X buttons 8 and 9 Map extra mouse buttons 1 and 2 to X buttons 8 and 9, as conventional, leaving X buttons 6 and 7 for tilt wheel. Also add button labels for buttons 6, 7, 8 and 9 and change btn_labels in from a dynamic allocation to a fixed one of the required size for all the labels we use. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c9d7b9516f4a04cb9012c6c1e9466491a468aa07 Author: Jon TURNEY Date: Tue Feb 19 14:38:40 2013 +0000 hw/xwin: Remove unneeded WM_XBUTTON message defines Remove unneeded WM_XBUTTON message defines, they have been provided by w32api for a long time now. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5dccfc63f9c7056e7cd30884e1d3ccea86a2f419 Author: Jon TURNEY Date: Mon Dec 17 22:38:00 2012 +0000 hw/xwin: Change winTranslateKey() to return it's result as it's return value Change winTranslateKey() to return it's result as it's return value, and change it's uses as well. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9b4cec76f1d7792d4bf64fa069ea6b64bc42da0d Author: Oliver Schmidt Date: Mon Nov 5 15:05:32 2012 +0000 hw/xwin: Consider left and right modifier keys independently on gaining focus Handle left and right ctrl and shift keys independently Assume that all modifiers are cleared when all keys are released on focus lost, as internalKeyState doesn't record which modifier key was pressed. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 235149d0b4af9097e47b3af0ba56d4eb0179518c Author: Jon TURNEY Date: Mon Apr 5 14:22:39 2010 +0100 hw/xwin: Remove an extra '\n' from some log messages Remove an extra '\n' from internal client IOError log messages Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c7aa9f7578e721b0c9e565e7a085b6aeb30bf2ac Author: Jon TURNEY Date: Sat Feb 4 17:04:11 2012 +0000 hw/xwin: _NET_WM_STATE is ATOM[] not ATOM _NET_WM_STATE is ATOM[] not ATOM, a list of window state hints, so check all of the atoms, not just the first one See EWMH specifcation, section "Application Window Properties" v2: Actually use [] on the returned atom data Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 682ccac90b18f293520f77db5b163fcb40328e2b Author: Jon TURNEY Date: Wed Aug 31 21:35:14 2011 +0100 hw/xwin: Improve WM_ENDSESSION handling using separate messaging window thread Currently, WM_ENDSESSION just calls GiveUp() to set the DE_TERMINATE flag. But for the X server to exit cleanly, we also need the X server dispatch loop to be unblocked so it can notice that DE_TERMINATE has been set and exit, removing it's lock file and any unix domain socket. It appears that the system will terminate the process when the last UI thread in that process returns from processing WM_ENDSESSION for the last top-level window. Since WM_ENDSESSION appears to sent by the system via SendMessage() (synchronously) and the wndproc is called to process it in the message thread for that window (the X server thread), we can't easily terminate the X server dispatch loop from inside the WM_ENDSESSION message processing. So, create a messaging window, a hidden, top-level window, with a separate thread to catch this message, and process it by calling GiveUp() and then blocking on a mutex until the X server dispatch loop exits. Also, notice when this is a shutdown cancel WM_ENDSESSION message and take no action. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 15febb05d77cc7e7185c942f35459838f75cfdc0 Author: Jon TURNEY Date: Mon Sep 3 15:19:43 2012 +0100 Allow DDX to provide a main() XQuartz already conditionally renames main() as dix_main() so it can provide it's own main(). This isn't the ideal way of doing this, as it prevents libdix built this way from being useful with any other DDX. So instead, always name that function dix_main(), and also provide a stub main() which just calls dix_main(), which can be overriden in the DDX. Add a main() to XWin (XQuartz already has one, of course). It's no longer neccessary to link XWin and XQuartz with libmain. v2: Remove unneeded stub main hw/xwin/InitOutput.c Signed-off-by: Jon TURNEY Reviewed-by: Julien Cristau Reviewed-by: Colin Harrison commit d5ebe20f9ba9569351c4a41449866679fd60ba45 Merge: 21ea7ebb6 33f7e6078 Author: Keith Packard Date: Mon Jul 22 20:34:41 2013 -0700 Merge remote-tracking branch 'alanc/master' commit 21ea7ebb6a1ad56f3060747af0df235ca6ff27fa Author: Peter Hutterer Date: Fri Jul 19 08:56:38 2013 +1000 dix: scale y back instead of x up when pre-scaling coordinates The peculiar way we handle coordinates results in relative coordinates on absolute devices being added to the last value, then that value is mapped to the screen (taking the device dimensions into account). From that mapped value we get the final coordinates, both screen and device coordinates. To avoid uneven scaling on relative coordinates, they are pre-scaled by screen ratio:resolution:device ratio factor before being mapped. This ensures that a circle drawn on the device is a circle on the screen. Previously, we used the ratio to scale x up. Synaptics already does its own scaling based on the resolution and that is done by scaling y down by the ratio. So we can remove the code from the driver and get approximately the same behaviour here. Minor ABI bump, so we can remove this from synaptics. Signed-off-by: Peter Hutterer Tested-by: Emmanuel Benisty commit 33f7e60785f12770ce10558c2ca7ce1323eefc59 Author: Thomas Klausner Date: Fri Jul 12 08:21:19 2013 +0200 Fix typo in header guard. Signed-off-by: Thomas Klausner Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit ddc52b9cbae017f04c7a232af4e8b16c9f96823d Author: Alan Coopersmith Date: Fri Jul 5 22:43:17 2013 -0700 Xephyr: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Simplifies code and reduces risk of overflow from converting length field in X replies from words to bytes. One call to _XEatData is left in ephyrHostGLXGetStringFromServer where it's already been checked for overflow, and other values have been subtracted from it to reduce the size of data remaining to be eaten. Signed-off-by: Alan Coopersmith commit a3d43edf71847f4b486f971405d2b457f81b73d1 Author: Alan Coopersmith Date: Fri Jul 5 22:35:32 2013 -0700 glxproxy: Use _XEatDataWords (from Xlib 1.6) instead of _XEatData Reduces risk of overflow from converting length field in X replies from words to bytes. (Also seems to be what several calls were already incorrectly passing to _XEatData.) Signed-off-by: Alan Coopersmith commit 87b0cabc145a9b5f6faffdfb544ce1c647b8ab72 Author: Alan Coopersmith Date: Fri Jul 5 22:32:10 2013 -0700 glxproxy: Use _XReadPad instead of _XEatData to clean up the slop Xlib already provides a function to eat padding bytes after the data read, so use it instead of calculating it ourselves. Signed-off-by: Alan Coopersmith commit 1cb182cbdc11fc1c97507c57875f1d2453f27328 Author: Alan Coopersmith Date: Mon Apr 15 08:41:14 2013 -0700 Xephyr: integer overflow in XF86DRIGetClientDriverName() clientDriverNameLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 20644e53b385c54d73242c86a7d3f981d18a3843 Author: Alan Coopersmith Date: Mon Apr 15 08:39:03 2013 -0700 Xephyr: integer overflow in XF86DRIOpenConnection() busIdStringLength is a CARD32 and needs to be bounds checked before adding one to it to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit c37ceda76bf9ec6f5166122e864663e10f106546 Author: Alan Coopersmith Date: Sun Apr 14 10:50:50 2013 -0700 Xephyr: integer overflow in ephyrHostGLXGetStringFromServer() reply.length & reply.size are CARD32s and need to be bounds checked before multiplying or adding to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit 5fbd8c45b46ab93522e417240aa770466c30b735 Author: Alan Coopersmith Date: Sun Apr 14 09:45:26 2013 -0700 Xdmx: integer overflow in GetGLXFBConfigs() numFBConfigs & numAttribs are CARD32s and need to be bounds checked before multiplying by structure sizes to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit c89bcd12f4fc7233830a8dbe7863c312f657da3c Author: Alan Coopersmith Date: Sun Apr 14 09:33:57 2013 -0700 Xdmx: integer overflow in GetGLXVisualConfigs() numVisuals & numProps are both CARD32 and need to be bounds checked before multiplying by structure sizes to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel Signed-off-by: Alan Coopersmith commit 74469895e39fa38337f59edd64c4031ab9bb51d8 Author: Peter Hutterer Date: Mon Jul 15 13:06:28 2013 +1000 dix: allow a ConstantDeceleration between 0 and 1 (#66134) A constant deceleration of x simply means (delta * 1/x). We limited that to values >= 1.0f for obvious reasons, but can also allow values from 0-1. That means that ConstantDeceleration is actually a ConstantAcceleration, but hey, if someone needs it... X.Org Bug 66134 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0e3be0b25fcfeff386bad132526352c2e45f1932 Author: Peter Hutterer Date: Fri Jul 12 14:10:10 2013 +1000 dix: UpdateTouchesForGrab must only free the listener grab if it is non-NULL If a client calls XIGrabDevice in response to a ButtonPress event (regular event selection), the device will have a grab, but listener->grab is NULL. Check for that, to avoid logspam. [ 26293.863] (EE) BUG: triggered 'if (!pGrab)' [ 26293.863] (EE) BUG: grabs.c:256 in FreeGrab() [ 26293.863] (EE) [ 26293.863] (EE) Backtrace: [ 26293.864] (EE) 0: /usr/bin/Xorg (FreeGrab+0x54) [0x45d3fc] [ 26293.864] (EE) 1: /usr/bin/Xorg (UpdateTouchesForGrab+0x135) [0x447d4e] [ 26293.864] (EE) 2: /usr/bin/Xorg (ActivatePointerGrab+0x1ba) [0x447f3d] [ 26293.864] (EE) 3: /usr/bin/Xorg (GrabDevice+0x3e6) [0x4503bc] [ 26293.864] (EE) 4: /usr/bin/Xorg (ProcXIGrabDevice+0x1f9) [0x5981b1] [ 26293.865] (EE) 5: /usr/bin/Xorg (ProcIDispatch+0x78) [0x58aa17] [ 26293.865] (EE) 6: /usr/bin/Xorg (Dispatch+0x30d) [0x43347e] [ 26293.865] (EE) 7: /usr/bin/Xorg (main+0x61d) [0x498175] [ 26293.865] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3df5621b75] [ 26293.865] (EE) 9: /usr/bin/Xorg (_start+0x29) [0x423a19] [ 26293.866] (EE) 10: ? (?+0x29) [0x29] [ 26293.866] (EE) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 24cbb47ca80cd7a47749ece0ff3a98657ddf3ae3 Author: Peter Hutterer Date: Fri Jul 12 12:17:47 2013 +1000 config: provide example configuration for multi-seat setups Seats other than seat0 need custom configuration. Provide that with a default configuration file so we can share it across distros. This file intentionally does not end in .conf so it won't get picked up by the server after a normal installation. gdm, or whatever starts up the servers will have to explicitly specifiy this config file. This file replaces the one currently written by systemd's multi-seat-x binary: http://cgit.freedesktop.org/systemd/systemd/tree/src/login/multi-seat-x.c CC: Lennart Poettering Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson commit 791121e00692e12cb4c38c8d018bd72eb5081eb7 Author: François Tigeot Date: Mon Jul 15 21:54:26 2013 +0200 Fix mouse header include on DragonFly and FreeBSD * __FreeBSD_kernel_version doesn't exist anymore * The removed check was for FreeBSD versions from before September 2000 which are no longer supported anyway * Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66045 Signed-off-by: François Tigeot Signed-off-by: Peter Hutterer commit 59a6d3f1eb03010ab831b32b03706a1d6143c732 Author: Jon TURNEY Date: Thu Nov 8 13:41:13 2012 +0000 os: Remove any old logfile before trying to write to it If we are not backing up logfiles, remove the old logfile before trying to write a new logfile, as otherwise the operation may fail if the previous logfile was created by a different user. This change is useful when: - The DDX doesn't use the logfile backup mechanism (i.e. not Xorg) - The DDX is run by a non-root user, and then by a different non-root user - The logfile directory doesn't have the restricted-deletion flag set Signed-off-by: Jon TURNEY Acked-by: Yaakov Selkowitz Reviewed-by: Yaakov Selkowitz Signed-off-by: Peter Hutterer commit 8eeaa74bc241acb41f1d3ed64971e0b01e794776 Author: Peter Hutterer Date: Tue Jul 9 13:27:19 2013 +1000 dix: when ungrabbing an active grab, accept pointer grabs (#66720) Ungrabbing a device during an active touch grab rejects the grab. Ungrabbing a device during an active pointer grab accepts the grab. Rejection is not really an option for a pointer-emulated grab, if a client has a button mask on the window it would get a ButtonPress emulated after UngrabDevice. That is against the core grab behaviour. X.Org Bug 66720 Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit a2d6932ad48f2cbfcc4c5fb8272e47106d08ac78 Author: Julien Cristau Date: Mon Jul 1 19:39:30 2013 +0200 xkb: don't call atoi(NULL) when parsing argv If the -ardelay or -arinterval options have no argument, there's no point trying to read it. See http://www.forallsecure.com/bug-reports/feb3db57fc206d8df22ca53a6907f74973876272/ Reported-by: Alexandre Rebert Signed-off-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Peter Hutterer commit 77e51d5bbb97eb5c9d9dbff9a7c44d7e53620e68 Author: Eric Anholt Date: Mon Jun 17 15:51:19 2013 -0700 Revert "DRI2: re-allocate DRI2 drawable if pixmap serial changes" This reverts commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f. After a long debug session by Paul Berry, it appears that this was the commit that has been producing sporadic failures in piglit front buffer rendering tests for the last several years. GetBuffers may return fresh buffers with invalid contents at a couple reasonable times: - When first asked for a non-fake-front buffer. - When the drawable size is changed, an Invalidate has been sent, and obviously the app needs to redraw the whole buffer. - After a glXSwapBuffers(), GL allows the backbuffer to be undefined, and an Invalidate was sent to tell the GL that it should grab these appropriate new buffers to avoid stalling. But with the patch being reverted, GetBuffers would also return fresh invalid buffers when the drawable serial number changed, which is approximately "whenever, for any reason". The app is not expecting invalid buffer contents "whenever", nor is it valid. Because the GL usually only GetBuffers after an Invalidate is sent, and the new buffer allocation only happened during a GetBuffers, most apps saw no problems. But apps that do (fake-)frontbuffer rendering do frequently ask the server for the front buffer (since we drop the fake front allocation when we're not doing front buffer rendering), and if the drawable serial got bumped midway through a draw, the server would pointlessly ditch the front *and* backbuffer full of important drawing, resulting in bad rendering. The patch was originally to fix bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=28365 Specifically: To reproduce, start with a large-ish display (i.e. 1680x1050 on my laptop), use the patched glxgears from bug 28252 to add the -override option. Then run glxgears -override -geometry 640x480 to create a 640x480 window in the top left corner, which will work fine. Next, run xrandr -s 640x480 and watch the fireworks. I've tested with an override-redirect glxgears, both with vblank sync enabled and disabled, both with gnome-shell and no window manager at all, before and after this patch. The only problem observed was that before and after the revert, sometimes when alt-tabbing to kill my gears after completing the test gnome-shell would get confused about override-redirectness of the glxgears window (according to a log message) and apparently not bother doing any further compositing. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard Reviewed-by: Chris Wilson Tested-by: Chris Wilson Signed-off-by: Keith Packard commit 227015d6544115258b74c31b700f9bd163540e24 Merge: d9005d58c 80054fcaf Author: Keith Packard Date: Tue Jun 18 10:53:08 2013 -0700 Merge remote-tracking branch 'jturney/master' commit 951d2f83fc65a136717fb8090510d053e3f3a6c0 Author: Maarten Lankhorst Date: Wed Jun 12 14:11:53 2013 +0200 bump to 0.8.0 Signed-off-by: Maarten Lankhorst commit 525ac7fb9a0d639253fc5d6556db3edb7239f932 Author: Maarten Lankhorst Date: Wed Jun 12 14:05:19 2013 +0200 modesetting: probe only succeeds if connectors are detected This will prevent modesetting being used for outputless intel or nvidia cards. Signed-off-by: Maarten Lankhorst commit d4791dd97b85ddac1295761bf6ab4f10c08346d7 Author: Dave Airlie Date: Tue Jun 11 10:29:25 2013 +1000 modesetting: fix adjust frame crash When SDL called this it was totally broken, actually hook up to the underlying drmmode function. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64808 Thanks to Peter Wu for harassing me. Signed-off-by: Dave Airlie commit 80054fcafb095aff76f6df00d348c7fd85e8ddbc Author: Jon TURNEY Date: Sat Mar 30 19:44:14 2013 +0000 hw/xwin: Update manifest to target all architectures, not just x86 Update manifest to target all architectures, not just x86 Also: Write explicit dependencies for Xwin.rc. XWin.exe.manifest and X.ico are included the resource compiler output, so add a dependency on them to cause it to be recompiled if they change. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 689e7ad9b0fccd582cd63796cc90a999f141f589 Author: Jon TURNEY Date: Sun Mar 31 18:36:37 2013 +0100 hw/xwin: Win32 Windows properties are of pointer type HANDLE, not an integer type Win32 Windows properties are of pointer type HANDLE, not an integer type, but we use the Windows property WINDOW_WID_PROP to store the X window XID. Add appropriate casts to show it doesn't matter that an XID is smaller than a pointer on 64-bit build. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e1a0945e8d4a3858838a14e64022524efd73c905 Author: Jon TURNEY Date: Sun Mar 31 18:35:35 2013 +0100 hw/xwin: winMultiWindowGetTransientFor() returns an XID not a WindowPtr winMultiWindowGetTransientFor() accesses the WM_TRANSIENT_FOR property, which is an X window XID (which we compare with WINDOW_WID_PROP) and not a WindowPtr. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit be201ac257687355bf0916d7c525d598ed9b1282 Author: Jon TURNEY Date: Sat Mar 30 19:47:16 2013 +0000 hw/xwin: Change winIconIsOverride() to take a HICON parameter Change winIconIsOverride() to take a HICON parameter, so some unneccessary casts, which weren't portable to 64-bit Cygwin, can be removed. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fc40f9a92cf5981bccc45bbc0b959cc06c5accc2 Author: Jon TURNEY Date: Sat Mar 30 19:41:06 2013 +0000 hw/xwin: Fix uses of CreateDialogParam() for 64-bit builds Fix uses of CreateDialogParam() to be more strictly correct, for 64-bit builds dwInitParam parameter is LPARAM, not int Return type of DLGPROC is INT_PTR, not WINBOOL Also: Reporting the value of g_hDlgDepthChange is completely uninteresting, we are just interested in GetLastError() if it is NULL Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b542976846eb5d4c82910272af32ec8298da4177 Author: Jon TURNEY Date: Sat Mar 30 19:40:31 2013 +0000 hw/xwin: deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin The deprecated interface cygwin_conv_to_win32_path() doesn't exist in 64-bit cygwin, but both the ID_ABOUT_CHANGELOG control and the referenced file who's path we are converting haven't existed for a while, so just remove this unused, cygwin-specific code. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5a47c6420cfe298143310938f08cc36a503e8d3d Author: Jon TURNEY Date: Mon Apr 8 01:27:26 2013 +0100 hw/xwin: Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer Fix a 64-bit portability issue with casting HINSTANCE result of ShellExecute() to an integer: Since HINSTANCE is a pointer type, use INT_PTR rather than int. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d9005d58c0413dcc3a99150c13d05163881cf782 Author: Peter Hutterer Date: Tue Jun 4 14:39:33 2013 +1000 config: add a quirks file for devices needing special configuration This is the fedora quirks file configuring the special handling some devices need. Rather than keeping this distro-specific add it to the tree so we can share these quirks. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp commit 04ce6f6f6c880281e42c9ebf21d6f980ddae79b4 Author: Maarten Lankhorst Date: Thu May 30 11:23:07 2013 +0200 dix: add missing dixFreeRegistry define Fixes a build failure on debian's udeb builds. Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c21344add2fc589df83b29be5831c36a372201bd Author: Peter Hutterer Date: Mon May 27 13:46:49 2013 +1000 dix: remove logspam in RefCursor() This shouldn't have been in the patch Reported-by: Colin Harrison Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit cb3018d8a15add48efb3335e1f79b66378166008 Merge: c76a1b343 6589f3b55 Author: Keith Packard Date: Thu May 23 19:58:46 2013 -0600 Merge remote-tracking branch 'whot/unreviewed' commit c76a1b343d6a56aa9529e87f0eda8d61355d562b Merge: 891123ce9 9a5ad6533 Author: Keith Packard Date: Thu May 23 19:58:36 2013 -0600 Merge remote-tracking branch 'whot/touch-grab-race-condition-56578-v3' commit 891123ce9dac5e52685b9a921b33d8279ba52956 Merge: 7e97166c4 49521edaf Author: Keith Packard Date: Thu May 23 10:30:15 2013 -0600 Merge remote-tracking branch 'whot/for-keith' commit 6589f3b55e335eef6c658c8ba1fe15a062f7e31c Author: Peter Hutterer Date: Tue May 14 08:31:19 2013 +1000 dix: devices must have valuators before touch is initialized Signed-off-by: Peter Hutterer commit 756ab88d93542f0589c9bf46f40ccc57df64f0fd Author: Peter Hutterer Date: Fri Apr 26 15:10:08 2013 +1000 dix: fix device scaling to use a [min,max[ range. defmin/defmax are screen coords and thus use a min-inclusive, max-exclusive range. device axes ranges are inclusive, so bump the max up by one to get the scaling right. This fixes off-by-one coordinate errors if the coordinate matrix is used to bind the device to a fraction of the screen. It introduces an off-by-one scaling error in the device coordinate range, but since most devices have a higher resolution than the screen (e.g. a Wacom I4 has 5080 dpi) the effect of this should be limited. This error manifests when we have numScreens > 1, as the scaling from desktop size back to screen size drops one device unit. Signed-off-by: Peter Hutterer commit 5cc2c96f824dbb28b9f8da61efc41596f8bd0561 Author: Peter Hutterer Date: Sat Mar 9 20:43:51 2013 +1000 dix: pre-scale x by the screen:device:resolution ratio commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 dix: pre-scale relative events from abs devices to desktop ratio (#31636) added pre-scaling of relative coordinates coming from absolute devices to undo uneven scaling based on the screen dimensions. Devices have their own device width/height ratio as well (in a specific resolution) and this must be applied for relative devices as well to avoid scaling of the relative events into the device's ratio. e.g. a Wacom Intuos4 6x9 is in 16:10 format with equal horiz/vert resolution (dpi). A movement by 1000/1000 coordinates is a perfect diagonal on the tablet and must be reflected as such on the screen. However, we map the relative device-coordinate events to absolute screen coordinates based on the axis ranges. This results in an effective scaling of 1000/(1000 * 1.6) and thus an uneven x/y axis movement - the y axis is always faster. So we need to pre-scale not only by the desktop dimenstions but also by the device width/height ratio _and_ the resolution ratio. Signed-off-by: Peter Hutterer commit 9a5ad65330693b3273972b63d10f2907d9ab954a Author: Peter Hutterer Date: Wed May 15 19:01:11 2013 +1000 Abstract cursor refcounting Too many callers relied on the refcnt being handled correctly. Use a simple wrapper to handle that case. Signed-off-by: Peter Hutterer commit 35c2e263db01b2b61354298e5e85aa3cae8ac317 Author: Peter Hutterer Date: Tue May 14 14:51:31 2013 +1000 dix: call UpdateDeviceState() for emulated TouchEndEvents ProcessTouchEvents() calls UDS for all touch events, but if the event type was switched to TouchUpdate(pending end) UDS is a noop. Daniel Drake found this can cause stuck buttons if a touch grab is activated, rejected and the touch event is passed to a regular listener. This sequence causes the TouchEnd to be changed to TouchUpdate(pending end). The actual TouchEnd event is later generated by the server once it is passed to the next listener. UDS is never called for this event, thus the button remains logically down. A previous patch suggested for UDS to handle TouchUpdate events [1], however this would release the button when the first TouchEvent is processed, not when the last grab has been released (as is the case for sync pointer grabs). A client may thus have the grab on the device, receive a ButtonPress but see the button logically up in an XQueryPointer request. This patch adds a call to UDS to TouchEmitTouchEnd(). The device state must be updated once a TouchEnd event was sent to the last grabbing listener and the number of grabs on the touchpoint is 0. [1] http://patchwork.freedesktop.org/patch/13464/ Signed-off-by: Peter Hutterer commit 8b9dc2628115dcb3f3601ad19b1ae157df21b9ee Author: Peter Hutterer Date: Tue May 14 07:46:25 2013 +1000 dix: devices must have valuators before touch is initialized Signed-off-by: Peter Hutterer commit fd5ea0237db6d725a48f76b706135df9d3246b82 Author: Peter Hutterer Date: Mon May 13 15:22:12 2013 +1000 Xi: fix warning - remove unused 'rc' Signed-off-by: Peter Hutterer commit 481702101b86fff003430e952dc65fb41eb56400 Author: Peter Hutterer Date: Fri May 3 15:07:58 2013 +1000 dix: fix cursor refcounting The cursor is referenced during CopyGrab(), thus doesn't need to be handled manually anymore. It does need to be refcounted for temp grabs though. The oldGrab handling in ProcGrabPointer is a leftover from the cursor in the grab being refcounted, but the grab itself being a static struct in the DeviceIntRec. Now that all grabs are copied, this lead to a double-free of the cursor (Reproduced in Thunderbird, dragging an email twice (or more often) causes a crash). Signed-off-by: Peter Hutterer commit 49521edaf8930b335afac2185209e26e7000820b Author: Peter Hutterer Date: Wed May 15 08:51:51 2013 +1000 ephyr: add -resizeable to the man page Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7a4bbfd9f2ce7aad23148ba01bb3f1071da606a3 Author: Peter Hutterer Date: Wed May 15 08:46:38 2013 +1000 ephyr: fix typo in man page Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 7e97166c4fc38076b6224e4dbdd632b43444149f Author: Geert Uytterhoeven Date: Tue May 14 13:04:53 2013 +0200 Shadow: Switch the Amiga/Atari bitplane code to the canonical X.Org license Also add my name to the list of authors in COPYING Reviewed-by: Alan Coopersmith Signed-off-by: Geert Uytterhoeven Signed-off-by: Keith Packard commit 3093f78d17e48a506aab170a9089cd10e21af299 Author: Peter Hutterer Date: Fri May 3 15:02:05 2013 +1000 dix: free the old grab when activating a new grab A client may call XIGrabDevice twice, overwriting the existing grab. Thus, make sure we free the old copy after we copied it. Free it last, to make sure our refcounts don't run to 0 and inadvertantly free something on the way. Signed-off-by: Peter Hutterer commit 2566bdd8bc996cccde77b846819808c6239a89d2 Author: Peter Hutterer Date: Wed Apr 24 14:46:06 2013 +1000 Xi: check for HAS_ACCEPTED only for grab listeners If we have one listener left but it's not a grab, it cannot be in LISTENER_HAS_ACCEPTED state. Signed-off-by: Peter Hutterer commit 5b00fc52270e9cfdfe7ac1838a21defe50fc3d31 Author: Peter Hutterer Date: Wed Apr 24 14:40:31 2013 +1000 Move TouchListenerGone call to CloseDownClient TouchListenerGone cleans up if a client disappears. Having this in FreeGrab() triggers cyclic removal of grabs, emitting wrong events. In particular, it would clean up a passive grab record while that grab is active. Move it to CloseDownClient() instead, cleaning up before we go. Signed-off-by: Peter Hutterer commit 34c9b39d9937c2e19c2dffc9748605f90d40f965 Author: Peter Hutterer Date: Wed Apr 24 12:53:52 2013 +1000 dix: remove all listeners when freeing a touch Signed-off-by: Peter Hutterer commit 395124bd2782823de37e5c5b2f15dba49cff05f6 Author: Peter Hutterer Date: Wed Apr 17 20:15:35 2013 +1000 dix: always copy grabs, don't reference them Introduced in xorg-server-1.13.99.901-2-g9ad0fdb. Storing the grab pointer in the listener turns out to be a bad idea. If the grab is not an active grab or an implicit grab, the pointer stored is the one to the grab attached on the window. This grab may be removed if the client calls UngrabButton or similar while the touch is still active, leaving a dangling pointer. To avoid this, copy the grab wherever we need to reference it later. This is also what we do for pointer/keyboard grabs, where we copy the grab as soon as it becomes active. Reported-by: Maarten Lankhorst Signed-off-by: Peter Hutterer commit 925e35122ebad877395bcf13676e9dbeb254bdfa Author: Peter Hutterer Date: Tue Apr 23 15:52:18 2013 +1000 dix: AllocGrab can copy if an argument is passed in Signed-off-by: Peter Hutterer commit 4980bcef9973ba1f90f53028f061669ee5d2661b Author: Peter Hutterer Date: Tue Apr 23 15:46:04 2013 +1000 dix: freeing a null grab is a bug, complain if doing so Signed-off-by: Peter Hutterer commit ccfa0f2d5de557546815a5e4f59552e2af46b578 Author: Peter Hutterer Date: Tue Apr 23 15:39:32 2013 +1000 dix: use a temporary variable for listeners[0] no functional changes Signed-off-by: Peter Hutterer commit 5363433a5cc64e2f83859aa1c32a89e5e1ddf9e4 Author: Peter Hutterer Date: Thu Apr 18 10:32:11 2013 +1000 dix: drop DeviceIntRec's activeGrab struct Obsolete since 4bc2761ad5ec2d0668aec639780ffb136605fbc8. This struct existed so copying a passive grab could be simply done by activeGrab = *grab and thus have a copy of the GrabPtr we'd get from various sources but still be able to check device->grab for NULL. Since 4bc2761 activeGrab is a pointer itself and points to the same memory as grabinfo->grab, leaving us with the potential of dangling pointers if either calls FreeGrab() and doesn't reset the other one. There is no reader of activeGrab anyway, so simply removing it is sufficient. Note: field is merely renamed to keep the ABI. Should be removed in the future. Signed-off-by: Peter Hutterer commit 7dbf61817d3bd4b1fc71710677e56c5d8cfcdb4e Author: Peter Hutterer Date: Wed Apr 17 20:14:56 2013 +1000 dix: use a tmp variable for the to-be-removed touch listener No functional changes. Signed-off-by: Peter Hutterer commit a71a283934406d870bcd8dc376eb1c9ce1c8bbb4 Author: Peter Hutterer Date: Wed Apr 17 20:13:34 2013 +1000 dix: invert a loop condition Change the single if condition in the loop body to a if (!foo) continue; and re-indent the rest. No functional changes. Signed-off-by: Peter Hutterer commit 5174b1f98204beee79eba74c4cda5f2be0a60a8f Author: Peter Hutterer Date: Thu Feb 28 11:02:40 2013 +1000 dix: XAllowEvents() on a touch event means accepting it A sync grab is the owner once it gets events. If it doesn't replay the event it will get all events from this touch, equivalent to accepting it. If the touch has ended before XAllowEvents() is called, we also now need to send the TouchEnd event and clean-up since we won't see anything more from this touch. Signed-off-by: Peter Hutterer commit e7f79c48b0faea910dc881034c00eb807fcd6210 Author: Peter Hutterer Date: Fri Mar 1 12:52:35 2013 +1000 dix: move EmitTouchEnd to touch.c No functional changes, this just enables it to be re-used easier. Signed-off-by: Peter Hutterer commit 0eb9390f6048049136347d5a5834d88bfc67cc09 Author: Peter Hutterer Date: Fri Mar 1 10:41:01 2013 +1000 Xi: Don't emit a TouchEnd event to a frozen device EmitTouchEnd calls DeliverTouchEvents directly instead of through public.processInputProc. If a device is frozen, the TouchEnd is processed while the device is waiting for a XAllowEvents and thus ends the touch point (and the grab) before the client decided what to do with it. In the case of ReplayPointer, this loses the event. This is a hack, but making EmitTouchEnd use processInputProc breaks approximately everything, especially the touch point is cleaned up during ProcessTouchEvents. Working around that is a bigger hack than this. Signed-off-by: Peter Hutterer commit a7d989d335f903ffd8b168cd2beeb82c78d30c21 Author: Peter Hutterer Date: Thu Feb 28 13:07:26 2013 +1000 Xi: use public.processInputProc to replay the touch history If a device is frozen in results to a grab, we need to enqueue the events. This makes things complicated, and hard to follow since touch events are now replayed in the history, pushed into EnqueueEvent, then replayed later during PlayReleasedEvents in response to an XAllowEvents. While the device is frozen, no touch events are processed, so if there is a touch client with ownership mask _below_ the grab this will delay the delivery and potentially screw gesture recognition. However, this is the behaviour we have already anyway if the top-most client is a sync pgrab or there is a sync grab active on the device when the TouchBegin was generated. (also note, such a client would only reliably work in case of ReplayPointer anyway) Signed-off-by: Peter Hutterer commit 214d11d3fcdac51fc7afbf3770516ec14f9e13c1 Author: Peter Hutterer Date: Wed Feb 27 15:05:54 2013 +1000 Xi: when punting to a new owner, always create TouchEnd events If a touch is pending_finish and we just punted it to the next owner, that client must receive a TouchEnd event. If we just punted to the last owner and that owner not a touch grab, we need to end the touch since this is the last event to be sent, and the client cannot accept/reject this. Signed-off-by: Peter Hutterer commit 026627fe19aad007544eccf209f0dea05e67a7a7 Author: Peter Hutterer Date: Fri Mar 1 09:15:37 2013 +1000 Xi: save state for early acceptance Delivering an event changes the state to LISTENER_IS_OWNER and we thus lose the information of early acceptance. Signed-off-by: Peter Hutterer commit d905348134c80f19793eefb761731b00559ddf3a Author: Peter Hutterer Date: Thu Feb 28 15:28:46 2013 +1000 Xi: if a passive async grab is activated from an emulated touch, accept Async grabs cannot replay events, they cannot reject, so we can do an early accept here. Signed-off-by: Peter Hutterer commit 8b0d21044956f3810199d5e2f38ce33069e97be7 Author: Peter Hutterer Date: Thu Feb 28 13:04:36 2013 +1000 Xi: fix lookup in ActivateEarlyAccept ActivateEarlyAccept() can only be called from a grabbing client, so we can ignore the rest. And it's easy enough to get the client from that since 9ad0fdb135a1c336771aee1f6eab75a6ad874aff. Signed-off-by: Peter Hutterer commit d08bae297f9d7651edb1923d6b0d6b14b3d674fc Author: Peter Hutterer Date: Thu Feb 28 13:08:27 2013 +1000 Xi: update the core listener state if we delivered the touch event If a TouchBegin is sent to a core client, that client is now the owner. By the time the TouchEnd is being processed, the client cannot replay anymore, so we can assume that this is the final touch end and we can clean up the touch record. Note: DeliverTouchEmulatedEvent is called for all listeners and immediately bails out if the client is not the owner and thus shouldn't yet get the event. Thus, check the return code. Signed-off-by: Peter Hutterer commit 81554d274f04951c55ea7f2e38d0455e2025e08d Author: Peter Hutterer Date: Mon Feb 25 11:21:07 2013 +1000 Xi: if we delivered a TouchEnd to a passive grab, end it ef64b5ee97099618cf2e2cbbd3e471095695ae24 (which introduced the TOUCH_CLIENT_ID check) has a wrong assumption that generated touch events (TOUCH_CLIENT_ID) should not terminate passive grabs. This is untrue, a TouchEnd may be generated in response to a TouchReject higher up. If we _deliver_ an event to a client, terminate the passive grab. This requires us to count the actually delivered events too (first hunk). Signed-off-by: Peter Hutterer commit 363b6387da6e669099a2da3861c73a29808295a6 Author: Peter Hutterer Date: Wed Feb 13 11:26:11 2013 +1000 dix: don't prepend an activated passive grab to the listeners If the device is currently grabbed as the result of a passive grab activating, do not prepend that grab to the listeners (unlike active grabs). Otherwise, a client with a passive pointer grab will prevent touch grabs from activating higher up in the window stack. Signed-off-by: Peter Hutterer commit 9cc45c18ad1511adf3fb163dd4cefbef106edb23 Author: Peter Hutterer Date: Wed Feb 13 10:49:23 2013 +1000 Xi: not having an ownership mask does not mean automatic acceptance If we only have a single touch-grabbing client, setting the client as owner would clean up the touch once the TouchEnd was processed. If the client then calls XIAllowTouches() it will receive a BadValue for the touch ID (since the internal record is already cleaned up). Signed-off-by: Peter Hutterer commit 2f1aedcaed8fd99b823d451bf1fb02330c078f67 Author: Peter Hutterer Date: Thu May 9 14:30:50 2013 +1000 input: print warnings if drivers don't initialize properly If drivers supply incorrect values don't just quietly return False, spew to the log so we can detect what's going on. All these cases are driver bugs and should be fixed immediately. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 8a88b0ab52ba375ae84463a90503db88af10e368 Author: Peter Hutterer Date: Thu May 9 14:30:49 2013 +1000 dix: don't overwrite proximity/focus classes InitPointerClassDeviceStruct/InitKeyboardDeviceStruct allocate a proximity/focus class, respectively. If a driver calls InitFocusClassDeviceStruct or InitProximityClassDeviceStruct beforehand, the previously allocated class is overwritten, leaking the memory. Neither takes a parameter other than the device, so we can simply skip initialising it if we already have one. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 34b0d07ebf4a7874fe7fd336bef5bbdd8debda1c Author: Peter Hutterer Date: Fri May 10 09:44:29 2013 +1000 dix: reset the OsBuffers after killing all clients ==21860== 24 bytes in 1 blocks are still reachable in loss record 85 of 397 ==21860== at 0x4C2B3F8: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==21860== by 0x61ED93: AllocateOutputBuffer (io.c:1037) ==21860== by 0x61E15A: WriteToClient (io.c:764) ==21860== by 0x457B30: ProcQueryExtension (extension.c:275) ==21860== by 0x43596B: Dispatch (dispatch.c:432) ==21860== by 0x425DAB: main (main.c:295) Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 67c66606c760c263d7a4c2d1bba43ed6225a4e7c Author: Robert Morell Date: Thu May 9 13:09:02 2013 -0700 os: Reset input buffer's 'ignoreBytes' field If a client sends a request larger than maxBigRequestSize, the server is supposed to ignore it. Before commit cf88363d, the server would simply disconnect the client. After that commit, it attempts to gracefully ignore the request by remembering how long the client specified the request to be, and ignoring that many bytes. However, if a client sends a BigReq header with a large size and disconnects before actually sending the rest of the specified request, the server will reuse the ConnectionInput buffer without resetting the ignoreBytes field. This makes the server ignore new X clients' requests. This fixes that behavior by resetting the ignoreBytes field when putting the ConnectionInput buffer back on the FreeInputs list. Signed-off-by: Robert Morell Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ddc11397a56c745b5d1fb377e9d9b1fcc73802c8 Author: Peter Hutterer Date: Mon Feb 27 18:36:39 2012 +1000 dix: delete all callbacks before reset DeleteCallbackManager() introduced for better symmetry in the caller, they do the same thing. ==20085== 24 bytes in 1 blocks are still reachable in loss record 11 of 103 ==20085== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==20085== by 0x43A097: CreateCallbackList (dixutils.c:837) ==20085== by 0x43A1D3: AddCallback (dixutils.c:869) ==20085== by 0x4B1736: GEExtensionInit (geext.c:209) ==20085== by 0x41C8A8: InitExtensions (miinitext.c:389) ==20085== by 0x5AC918: main (main.c:208) ==2042== 8 bytes in 1 blocks are still reachable in loss record 2 of 97 ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) ==2042== by 0x4802F5: XNFrealloc (utils.c:1095) ==2042== by 0x43A17A: CreateCallbackList (dixutils.c:855) ==2042== by 0x43A1EF: AddCallback (dixutils.c:870) ==2042== by 0x4B1752: GEExtensionInit (geext.c:209) ==2042== by 0x41C8A8: InitExtensions (miinitext.c:389) ==2042== by 0x5AC9E4: main (main.c:208) ==2042== Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6993f8b459e25b1a7a0a03e209688a28ce6c2c56 Author: Peter Hutterer Date: Wed Apr 24 14:59:11 2013 +1000 Xi: free barrier code at reset time ==29423== 16 bytes in 1 blocks are definitely lost in loss record 73 of 328 ==29423== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==29423== by 0x5987C0: XIBarrierInit (xibarriers.c:908) ==29423== by 0x58F370: XInputExtensionInit (extinit.c:1300) ==29423== by 0x4F33C3: InitExtensions (miinitext.c:337) ==29423== by 0x4997DB: main (main.c:208) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 042c6d861f7bb7038ddcdd6b59766fd9094d0e52 Author: Peter Hutterer Date: Tue Apr 30 15:44:37 2013 +1000 os: Use ErrorFSigSafe from FatalError and it's friends Backtrace logging etc. is already sigsafe, but the actual FatalError message in response is not yet, leading to amusing logs like this: (EE) Segmentation fault at address 0x0 (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:499 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: Fatal server error: Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d9848fb4b182ca21bacf28ed7410d1a502cb000e Author: Peter Hutterer Date: Thu Feb 14 16:24:53 2013 +1000 os: complain about unsupported pnprintf directives Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d903d17d7f006fa333265b8476063b189c20d082 Author: Peter Hutterer Date: Thu Feb 14 16:19:34 2013 +1000 os: support %c in pnprintf Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 58ef34ee6d0f68aa28f6f1a26e56f49ec85ed9bf Author: Peter Hutterer Date: Thu Feb 14 16:13:22 2013 +1000 os: support %% in pnprintf Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5ea21560dd071ea4ab87430000d087fd5fe1f092 Author: Peter Hutterer Date: Thu Feb 14 15:34:32 2013 +1000 os: support pnprintf length modifiers for integers Mainly for %ld, smaller than int is propagated anyway, and %lld isn't really used. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d3d4af5f9e505d444b6c82c6ea238206433fd24b Author: Peter Hutterer Date: Mon Feb 27 18:59:45 2012 +1000 dix: reset the registry before quitting Heaps of these: ==2042== 15,360 bytes in 120 blocks are still reachable in loss record 94 of 97 ==2042== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2042== by 0x4C2A657: realloc (vg_replace_malloc.c:525) ==2042== by 0x45FB91: double_size (registry.c:65) ==2042== by 0x45FC97: RegisterRequestName (registry.c:85) ==2042== by 0x460095: RegisterExtensionNames (registry.c:179) ==2042== by 0x460729: dixResetRegistry (registry.c:334) ==2042== by 0x5AC992: main (main.c:201) Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6f44d672aa34d343f63f0ea81ad58154a66b57ec Author: Peter Hutterer Date: Mon Feb 27 17:17:41 2012 +1000 xkb: free XkbRulesUsed and XkbRulesDflt on extension cleanup ==2547== 1 bytes in 1 blocks are still reachable in loss record 1 of 111 ==2547== at 0x4C2A4CD: malloc (vg_replace_malloc.c:236) ==2547== by 0x64D1551: strdup (strdup.c:43) ==2547== by 0x4802FB: Xstrdup (utils.c:1113) ==2547== by 0x585B6C: XkbSetRulesUsed (xkbInit.c:219) ==2547== by 0x58700F: InitKeyboardDeviceStruct (xkbInit.c:595) ==2547== by 0x419FA3: vfbKeybdProc (InitInput.c:74) ==2547== by 0x425A3D: ActivateDevice (devices.c:540) ==2547== by 0x425F65: InitAndStartDevices (devices.c:713) ==2547== by 0x5ACA57: main (main.c:259) and a few more of the above. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 623981ddaeb8836f3b0939e527c0e943f9c4e974 Author: Peter Hutterer Date: Fri Feb 1 09:06:20 2013 +1000 If neither HAL nor udev backends are enabled, warn the user If both are missing, input device hotplugging will not work out of the box. While we still have a DBus-API or the user may want to set AAD off all the time, the most likely source of this is misconfiguration (i.e. lack of the udev/hal devel packages). Message printed last to make it more obvious to the user. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit dce40e2266200421647044ec7e856656d2ef952d Author: Peter Hutterer Date: Tue Feb 26 12:34:21 2013 +1000 Xi: always return BadMatch for XTest devices ChangeDeviceControl requests The only controls that still do something are DEVICE_RESOLUTION and DEVICE_ENABLE. XTest devices have no resolution to change, and they cannot be disabled. So skip the lot, and prevent a crash in the DDX when it's trying to de-reference pInfo->control_proc on device with no pInfo struct. Likewise, don't allow setting device mode or the valuators. XTest pointers are always relative, they don't have a mode. Test cases: xts5/XI/ChangeDeviceControl (1/10) xts5/XI/SetDeviceValuators (1/6) and a few others Reported-by: Knut Petersen Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 23d1bc69f305edd5a6e2cfec3dfc84befda0881c Author: Peter Hutterer Date: Thu Mar 14 11:07:57 2013 +1000 dix: send the current axis value in DeviceChangedEvents (#62321) X.Org Bug 62321 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 27b11f5c19d67e2f6784d86cb7df86bbab3b58bb Author: Peter Hutterer Date: Fri Feb 15 11:19:10 2013 +1000 Xi: fix comment - XI2 grabs aren't keysym grabs Comment dates back to a pre-release version of XI2 that supported keysym grabs. That never made it into a release, it was ditched before. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2746c681639f9512e6e45fb8d0151b996b6aff7f Merge: 1e6cf8ec2 9878e097a Author: Keith Packard Date: Mon May 6 10:52:40 2013 -0700 Merge remote-tracking branch 'alanc/master' commit 1e6cf8ec20d07b73a11116564aba71b4e4291dcd Merge: dbfeaf706 5860408a1 Author: Keith Packard Date: Mon May 6 10:20:21 2013 -0700 Merge remote-tracking branch 'jturney/unused-but-set-variable-warning-fix' commit dbfeaf70623a83e1a3f3255c94d52e0e04702837 Author: Aaron Plattner Date: Tue Apr 30 14:30:18 2013 -0700 xfree86: don't enable anything in xf86InitialConfiguration for GPU screens There's no point in turning on outputs connected to GPU screens during initial configuration. Not only does this cause them to just display black, it also confuses clients when these screens are attached to a master screen and RandR reports that the outputs are already on. Also, don't print the warning about no outputs being found on GPU screens, since that's expected. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie commit 5860408a19d956f8cebb7ae39cfdbfcebd5e6360 Author: Jon TURNEY Date: Wed Apr 3 18:43:26 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in ProcWindowsWMFrameGetRect() /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c: In function ‘ProcWindowsWMFrameGetRect’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindowswm.c:322:12: error: variable ‘ir’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit bcfd523c150b34e9304d174ba812160c611f270d Author: Jon TURNEY Date: Wed Apr 3 18:34:38 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winMWExtWMUpdateWindowDecoration() /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c: In function ‘winMWExtWMUpdateWindowDecoration’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwin32rootlesswindow.c:189:11: error: variable ‘dwStyle’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fbf819c24dc080f166cff29bf46b0feb604c6b8c Author: Jon TURNEY Date: Wed Apr 3 16:40:35 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winHotKeyAltTabPrimaryDD() /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c: In function ‘winHotKeyAltTabPrimaryDD’: /jhbuild/checkout/xorg/xserver/hw/xwin/winpfbdd.c:518:20: error: variable ‘rcSrc’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7dae1e59ce6077f475c04a41fa00096a74114064 Author: Jon TURNEY Date: Wed Apr 3 16:33:39 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winMinimizeWindow() when built !XWIN_MULTIWINDOWEXTWM /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c: In function ‘winMinimizeWindow’: /jhbuild/checkout/xorg/xserver/hw/xwin/winmultiwindowwindow.c:813:20: error: variable ‘pScreenInfo’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b284666f09b77f9c2f048fee22015a353152a57f Author: Jon TURNEY Date: Wed Apr 3 16:27:45 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winClipboardProc() /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c: In function ‘winClipboardProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/winclipboardthread.c:88:25: error: variable ‘atomClipboardManager’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d414a09bb7f8d4440b36cbc6f0b4ca0eaefe5cbf Author: Jon TURNEY Date: Wed Apr 3 16:25:54 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winWindowProc() /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c: In function ‘winWindowProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwndproc.c:65:22: error: variable ‘s_hInstance’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 7726102671690eb28138d032c8398ac903b97606 Author: Jon TURNEY Date: Wed Apr 3 16:24:08 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winCopyWindowNativeGDI() /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c: In function ‘winCopyWindowNativeGDI’: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.c:131:15: error: variable ‘pwinRoot’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b9a2566a6e2f56a0335cd4a089b2066c06a67455 Author: Jon TURNEY Date: Wed Apr 3 16:50:38 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winFinishScreenInitFB() /jhbuild/checkout/xorg/xserver/hw/xwin/winscrinit.c:264:11: error: variable ‘pbits’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c97fbd39adbc0a8cb8537f40b12c091aee29221a Author: Jon TURNEY Date: Wed Apr 3 16:18:27 2013 +0100 hw/xwin: Fix unused-but-set-variable warning in winIsFakeCtrl_L() /jhbuild/checkout/xorg/xserver/hw/xwin/winkeybd.c:331:17: error: variable ‘lastMessage’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cdb74fe17dcb3b5a9c61951f897deaf07f86775f Author: Jon TURNEY Date: Wed Apr 3 16:16:06 2013 +0100 hw/xwin: Fix unused-but-set-variable warnings in windialog.c /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winChangeDepthDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:432:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c: In function ‘winAboutDlgProc’: /jhbuild/checkout/xorg/xserver/hw/xwin/windialogs.c:564:22: error: variable ‘s_pScreen’ set but not used [-Werror=unused-but-set-variable] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f2fd8ec3725a61abbc831f0a9ec28fa2b7020c47 Author: Dave Airlie Date: Wed Jan 9 12:52:13 2013 +1000 gpu: call CreateScreenResources for GPU screens I didn't think we needed this before, but after doing some more work with reverse optimus it seems like it should be called. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 8fcb9d91b69abc72ddef31b9f2e8585580c6cad2 Author: Dave Airlie Date: Wed Jan 9 12:52:08 2013 +1000 dix: allow pixmap dirty helper to be used for non-shared pixmaps this allows the pixmap dirty helper to be used for reverse optimus, where the GPU wants to copy from the shared pixmap to its VRAM copy. [airlied: slave_dst is wrong name now but pointless ABI churn at this point] Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 16077b81c502e04d77f81f683e0c213b9fe75393 Author: Dave Airlie Date: Wed Jan 9 12:52:03 2013 +1000 xf86crtc: don't use scrn->display for gpu screens scrn->display is a property of the main screen really, and we don't want to have the GPU screens use it for anything when picking modes or a front buffer size. This fixes a bug where when you plugged a display link device, it would try and allocate a screen the same size as the current running one (3360x1050 in this case), which was too big for the device. Avoid doing this and just pick sizes based on whats plugged into this device. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit f0d0d75bfe62553dde353f89e46ff13dd863fbe8 Author: Dave Airlie Date: Wed Jan 9 12:51:55 2013 +1000 dix/gpu: remove asserts for output/offload from same slave We should have no problem allowing output/offload from the same slave, I asserted here, but in order to implement reverse optimus this makes perfect sense. (reverse optimus is intel outputting to nvidia). Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 9d26e8eaf5a2d7c3e65670ac20254c60f665c463 Author: Dave Airlie Date: Wed Jan 9 14:26:35 2013 +1000 randr: report changes when we disconnect a GPU slave When we disconnect an output/offload slave set the changed bits, so a later TellChanged can do something. Then when we remove a GPU slave device, sent change notification to the protocol screen. This allows hot unplugged USB devices to disappear in clients. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit b724324252d13ff95f62eebd12d125b194d2ccc2 Author: Dave Airlie Date: Wed Jan 9 14:25:43 2013 +1000 randr: only respected changed on the protocol screen We don't want to know about changes on the non-protocol screen, we will fix up setchanged to make sure non-protocol screens update the protocol screens when they have a change. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit b3f70f38edebac87afe9351538365292f1aaaff3 Author: Dave Airlie Date: Wed Jan 9 14:29:47 2013 +1000 randr: make SetChanged modify the main protocol screen not the gpu screen When SetChanged is called we now modify the main protocol screen, not the the gpu screen. Since changed stuff should work at the protocol level. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit f9c8248b8326ad01f33f31531c6b2479baf80f02 Author: Dave Airlie Date: Wed Jan 9 14:23:57 2013 +1000 randr: don't directly set changed bits in randr screen Introduce a wrapper interface so we can fix things up for multi-gpu situations later. This just introduces the API for now. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit 451ba4bd41b82acd4aec6236ba121e00cfeb311b Author: Chris Wilson Date: Thu Jan 10 03:26:33 2013 +0000 hw/xfree86: Only report SetDesiredModes() failed if at least one modeset fails commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Author: Keith Packard Date: Tue Jan 8 20:24:32 2013 -0800 hw/xfree86: Require only one working CRTC to start the server. changed the logic to try to set the mode on all connected outputs rather than abort upon the first failure. The return error code was then tweaked such that it reported success if it set a mode on any crtc. However, this confuses the headless case where we never enable any crtcs and also, importantly, never fail to set a crtc. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59190 Signed-off-by: Chris Wilson Also-written-by: Maarten Lankhorst Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 9878e097a7de2f86eff0dcfd9fe5d83b162197ec Author: Alan Coopersmith Date: Wed Apr 24 15:24:31 2013 -0700 Only call xf86platformVTProbe() when it's defined Fixes build on non-udev systems, since XSERVER_PLATFORM_BUS is only defined in configure.ac if $CONFIG_UDEV_KMS is true. Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie commit e779402d531625ba4ed5d628d06c6b1e06b2ec7b Author: Keith Packard Date: Thu Apr 25 09:02:31 2013 -0700 shadow: Define c2p_unsupported Just make this call BUG_WARN(1) to indicate that something unexpected happened Signed-off-by: Keith Packard commit 2b361fbda536f0125e4b87a6d455acc58f4e8690 Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 sparcPromPathname2Node: free name when returning error, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 174ccd84931ece5a92a09c4a1d6a47e0958ebf7e Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 V2: check for malloc failure Signed-off-by: Alan Coopersmith commit 6bca0184d167388cd417d113031317990489987d Author: Alan Coopersmith Date: Sun Feb 10 10:18:02 2013 -0800 dmxVDLRead: if we opened a file, close it instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 8c5ff2e93f73b24adff741b25fc1e31b2f5dd0ac Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 __glXDRIscreenProbe: free screen when DRI2Connect fails, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 V2: goto existing error handler, instead of replicating more of it here Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 9567fa9a7269765bc59ac71b931e16df261d794d Author: Alan Coopersmith Date: Sun Feb 10 10:24:59 2013 -0800 __glXDRIscreenCreateContext: free context on failure, instead of leaking it Reported with other leaks found by cppcheck in bugzilla #50281 https://bugs.freedesktop.org/show_bug.cgi?id=50281 Signed-off-by: Alan Coopersmith Reviewed-by: Ian Romanick commit 7ab98bafc9a3426fd40f8ae693430491333ba4fc Merge: 53da26afb 5ab260317 Author: Keith Packard Date: Wed Apr 24 14:14:45 2013 -0700 Merge remote-tracking branch 'geertu/master' commit 53da26afb76bcce70b91c5df23d25e7e85c010cf Merge: 5ece86e92 d8d3c78b6 Author: Keith Packard Date: Wed Apr 24 10:27:19 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 5ece86e921a1df457a9baab6a2357ccda4ad6957 Merge: ef0a726bc 22cab8a28 Author: Keith Packard Date: Wed Apr 24 10:23:51 2013 -0700 Merge remote-tracking branch 'airlied/for-keithp-gpu-vt-owner' commit ef0a726bc8d5c415244cb4f86d664938b0127a5d Author: Jeremy White Date: Thu Mar 21 10:58:42 2013 -0500 Eliminate the use of xf86Rename.h Signed-off-by: Jeremy White Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 2b539239e465faa9e8c6d96f1c6f00e593d46c18 Author: Keith Packard Date: Wed Apr 24 10:11:03 2013 -0700 Bump to 1.14.99.1 Snapshot with fix for CVE-2013-1940. Signed-off-by: Keith Packard commit d8d3c78b6ebdf63836951d2dbd2d3d621ff26da2 Author: Andreas Müller Date: Tue Apr 16 14:30:43 2013 +0200 dixstruct.h: fix segfaults - char is unsigned for ARM and PowerPC architectures see ARM related bug reports [1-3] [1] https://github.com/archlinuxarm/PKGBUILDs/issues/446I [2] http://www.raspberrypi.org/phpBB3/viewtopic.php?t=38568&p=321673 [3] http://lists.linuxtogo.org/pipermail/openembedded-core/2013-April/037805.html Signed-off-by: Andreas Müller Reviewed-by: Mark Kettenis Signed-off-by: Peter Hutterer commit 7d722796c678532e8c5897c673c43184da353f44 Author: Peter Hutterer Date: Wed Apr 17 19:47:42 2013 +1000 dix: plug memory leak in freeing TouchClass ==15562== 1,800 bytes in 1 blocks are definitely lost in loss record 298 of 330 ==15562== at 0x4A06B6F: calloc (vg_replace_malloc.c:593) ==15562== by 0x4312C7: InitTouchClassDeviceStruct (devices.c:1644) Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 5ab260317ad3b2aafff31a97df21620db52eacd1 Author: Geert Uytterhoeven Date: Sun Mar 10 21:04:19 2013 +0100 Xfbdev: Wire up Amiga afb4 and afb8 support Add support for Amiga-style bitplanes, with 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 672bc5bb38918304cf68114a1112cd48651a5e83 Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Wire up Atari iplan2p4 and iplan2p8 support Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 4 or 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 95a3c7536c1a4afe97aaf955980034cc69af9c2f Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Force shadowfb for frame buffers with non-packed pixels Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 0e808110df216649e05503baecd06cd5a3e50421 Author: Geert Uytterhoeven Date: Sun Mar 10 17:17:26 2013 +0100 Xfbdev: Reject unsupported frame buffer types Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit cfd10576812c36f5844805eb95ed1f2d093d1691 Author: Geert Uytterhoeven Date: Sun Mar 10 21:03:44 2013 +0100 Shadow: Add support for Amiga afb8 Add support for Amiga-style bitplanes, with 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit a1b8e7f1e6118b611ba9d332b8763ee2b44f550c Author: Geert Uytterhoeven Date: Wed Mar 27 09:37:02 2013 +0100 Shadow: Add support for Amiga afb4 Add support for Amiga-style bitplanes, with 4 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit d7181e567d1629c387b834da7eecdf618d14718e Author: Geert Uytterhoeven Date: Sun Mar 10 17:16:17 2013 +0100 Shadow: Add support for Atari iplan2p8 Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 8 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 3f7506b0fca72b2462b85bc4f613de809ae95859 Author: Geert Uytterhoeven Date: Sun Mar 10 21:01:02 2013 +0100 Shadow: Add support for Atari iplan2p4 Add support for Atari-style interleaved bitplanes, with 2 bytes interleave and 4 bits per pixel. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 87af9ab7d52578b0ea315fc4f8dfd906d19755fb Author: Geert Uytterhoeven Date: Sun Mar 10 17:15:05 2013 +0100 Shadow: Add c2p core Add Chunky-to-Planar core functionality, to be used by the Atari and Amiga (interleaved) bitplanes code. Signed-off-by: Geert Uytterhoeven Acked-by: Keith Packard commit 4ee2566c3e420a717be36f79126a14e15edac30f Author: Geert Uytterhoeven Date: Tue Mar 12 18:10:40 2013 +0100 Xfbdev: Treat 1 bpp pseudocolor as monochrome miCreateDefColormap() only preallocates black and white pixels if depth > 1. Hence override the visual, so fbdevCreateColormap() takes care of it. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 6dfb94a891ed445f47832ba1364fcbf1de018f4a Author: Geert Uytterhoeven Date: Tue Mar 12 14:16:10 2013 +0100 Xfbdev: Add support for monochrome visuals Monochrome supports StaticGray, with hardcoded black and white pixels. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 1049b32166760bdc00106625e213d31a8fc60bad Author: Geert Uytterhoeven Date: Tue Mar 12 14:19:25 2013 +0100 Xfbdev: Handle unset fix.line_length Older frame buffer devices may not fill in fix.line_length, in which case it must be calculated by the application. Signed-off-by: Geert Uytterhoeven commit 5c509c360d97bea78ef461596ab4b7bde69020ac Author: Geert Uytterhoeven Date: Fri Feb 22 13:21:28 2013 +0100 Xfbdev: Make char *fbdevDevicePath const This fixes: hw/kdrive/fbdev/fbdev.c: In function 'fbdevInitialize': hw/kdrive/fbdev/fbdev.c:41:25: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit b08afbc53c1d583c3913b92e67db44823077b112 Author: Geert Uytterhoeven Date: Tue Mar 12 15:20:00 2013 +0100 KDrive: Bail out if screen initialization failed Else we may get a segmentation fault later. Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit e7045c9dd208a1afe36526ab21ef15f8b01c8bd2 Author: Geert Uytterhoeven Date: Sat Feb 23 20:09:22 2013 +0100 test/input: Fix double-aligned test in dix_valuator_alloc() on m68k On m68k, doubles are not 64-bit aligned, just like on i386 and sh. Signed-off-by: Geert Uytterhoeven commit 8bb0616cc2799c2c34448da6337ea8cb9438cda7 Author: Geert Uytterhoeven Date: Fri Feb 22 21:10:07 2013 +0100 miext/shadow/shpacked.c: Remove unused PickBit() define Signed-off-by: Geert Uytterhoeven Reviewed-by: Keith Packard commit 6ca03b9161d33b1d2b55a3a1a913cf88deb2343f Author: Dave Airlie Date: Wed Apr 10 16:09:01 2013 +1000 xf86: fix flush input to work with Linux evdev devices. So when we VT switch back and attempt to flush the input devices, we don't succeed because evdev won't return part of an event, since we were only asking for 4 bytes, we'd only get -EINVAL back. This could later cause events to be flushed that we shouldn't have gotten. This is a fix for CVE-2013-1940. Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ddc149beaf708e84fb5573c4322d4f859c517917 Author: Peter Hutterer Date: Mon Feb 27 18:50:46 2012 +1000 Stop the shouting Meanwhile, here in the future lowercase letters have been invented. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 27356a45b4f6bad4d0bbf356e6d976d0c8dd257b Author: Peter Hutterer Date: Mon Feb 27 17:22:16 2012 +1000 dix: only allocate unused classes for master devices Slave devices don't need these and the matching code in CloseDevice() has a IsMaster() condition on freeing these, causing a leak. ==16111== 384 bytes in 4 blocks are definitely lost in loss record 72 of 105 ==16111== at 0x4C28BB4: calloc (vg_replace_malloc.c:467) ==16111== by 0x42AEE2: AllocDevicePair (devices.c:2707) ==16111== by 0x4BAA27: AllocXTestDevice (xtest.c:617) ==16111== by 0x4BA89A: InitXTestDevices (xtest.c:570) ==16111== by 0x425F5E: InitCoreDevices (devices.c:690) ==16111== by 0x5ACB2D: main (main.c:257) Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 98b94c36d6b1d286bbd4cb414e54b4b95a1484b0 Author: Maarten Lankhorst Date: Mon Apr 15 16:53:48 2013 +0200 dix: copy event in TouchConvertToPointerEvent correctly Fixes reading random memory read beyond the end of original event. sizeof device_event: 424 sizeof internal_event: 2800 Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4bff442ec5aa4b93a3f5c11782d4b7b9d1ae13ac Author: Knut Petersen Date: Tue Feb 26 07:52:59 2013 +0100 Never try to execute BellProcPtr NULL. This prevents xts XI/XDeviceBell-2 test from segfaulting the server. Signed-off-by: Knut Petersen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9003399708936481083424b4ff8f18a16b88b7b3 Author: Rui Matos Date: Sat Apr 13 04:22:54 2013 +0200 Xi: fix swapped grab mode args for keyboard devices in XIGrabDevice The protocol says that the grab_mode argument applies to the device being grabbed and paired_device_mode to the paired master device. GrabDevice() however takes in a pointer mode and a keyboard mode and so we have to swap the values according the type of device being grabbed. Signed-off-by: Rui Matos Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d16284687ddeffde32a561b8c67b2e2e3d66aeaa Author: Bryce Harrington Date: Wed Apr 10 23:05:40 2013 -0700 xfree86: Revert workaround for drm race condition. Revert 70739e817b2d64bc020ea491f23a3574bdb6155e and mostly revert c31eac647a9ecf0fb20dc98266cadf0ba923ba14. Further investigation shows the encountered race condition is between lightdm and plymouth-splash, as implemented in the Ubuntu distribution within the limitations of upstart's job coordination logic, and can (and should) be fixed within those limiations. Not in xserver itself. This leaves some of the diagnostic improvements from the recent patch series, in case others run into a similar situation. Signed-off-by: Bryce Harrington Signed-off-by: Peter Hutterer commit 131f883f85b9b734e5e5652f16ba1d3b5f4de12f Author: Peter Hutterer Date: Fri Apr 12 09:14:53 2013 +1000 xfree86: change a log message This path is technically executed through config/udev, but having two messages in the form "config/udev: Adding drm device" makes it appear as if the udev filters are wrong and it's trying to add the same device twice. In fact, it's only one device, only added once, but a duplicate log message. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 22cab8a28a433d03a4e6ba97f9a160271d73cb52 Author: Dave Airlie Date: Wed Apr 10 16:32:15 2013 +1000 xf86: don't hotplug output devices while VT switched. We don't want to hotplug output devices while we are VT switched, as we get races between multiple X servers on the device open, and drm device master status. This just queues device opens until we return from VT switch. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 5b359cf6135ca173d8f65cb92926332f07f91efe Author: Dave Airlie Date: Wed Apr 10 16:32:11 2013 +1000 xf86: use new xf86VTOwner interface in a few places This replaces some previous uses of direct xf86Screens[0] accesses. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit d61ea1f64db45201c1a2b39c39293c5768d98092 Author: Dave Airlie Date: Wed Apr 10 16:32:02 2013 +1000 xfree86: add VT owner interface This is just a simple interface to avoid accessing x86Screens[0] directly. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit 7347f39f94d8cebbf73ce1a2f94d1abdaf7ff383 Author: Maarten Lankhorst Date: Tue Apr 9 11:19:07 2013 +0200 Xi: Do not handle ET_TouchOwnership in ProcessTouchEvent The event struct is different, causing memory corruption on 1.13 and 1.14, as can be witnessed in https://bugs.freedesktop.org/show_bug.cgi?id=56578 Signed-off-by: Maarten Lankhorst Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit dbba50a1280cbda9ecff6f37884b4c5756c30bab Author: Keith Packard Date: Tue Apr 9 16:23:19 2013 -0700 Xi: Use correct destination when swapping barrier events Write the swapped values to the destination rather than the source. Signed-off-by: Keith Packard Reviewed-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit b86b3d10bb2fee1a922b8831e8bb415c339f3d99 Author: Peter Hutterer Date: Mon Mar 4 07:58:41 2013 +1000 dix: don't set non-exisiting flags on touch events Unlike pointer/keyboard events, the flags field for ET_Touch* is a set of server-internal defines that we need to convert to XI protocol defines. Currently only two of those defines actually translate to the protocol, so make sure we don't send internal garbage down the wire. No effect to current clients since they shouldn't look at undefined bits anyway. Signed-off-by: Peter Hutterer commit ecf62755086fd65898998d5a509aee5f29a9583d Author: Jeremy White Date: Thu Mar 21 10:58:57 2013 -0500 Define prototypes for hw/xfree86/modes/xf86Modes.c only in xf86Modes.h. This removes a large number of redundant declaration warnings. Signed-off-by: Jeremy White Reviewed-by: Robert Morell Signed-off-by: Keith Packard commit e13f29984251dbbe6076264ed710c2922312eed1 Author: Bryce Harrington Date: Tue Mar 19 12:12:46 2013 -0700 xfree86: Be verbose if waiting on opening the drm device Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 70739e817b2d64bc020ea491f23a3574bdb6155e Author: Bryce Harrington Date: Tue Mar 19 12:12:45 2013 -0700 xfree86: Fix race condition failure opening drm. If other processes have had drm open previously, xserver may attempt to open the device too early and fail, with xserver error exit "Cannot run in framebuffer mode" or Xorg.0.log messages about "setversion 1.4 failed". In this situation, we're receiving back -EACCES from libdrm. To address this we need to re-set ourselves as the drm master, and keep trying to set the interface until it works (or until we give up). See https://bugs.launchpad.net/ubuntu/+source/libdrm/+bug/982889 Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit c31eac647a9ecf0fb20dc98266cadf0ba923ba14 Author: Bryce Harrington Date: Tue Mar 19 12:12:44 2013 -0700 xfree86: Keep trying to set interface on drm for 2 seconds. And if we've had to delay booting due to not being able to set the interface, fess up. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit d1cc210de8c13f2db9f6f284ecc652305c28801e Author: Bryce Harrington Date: Tue Mar 19 12:12:43 2013 -0700 xfree86: Provide more details on failure Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit f059d0dabc553a5f748d86de9115da00be5997d5 Author: Bryce Harrington Date: Tue Mar 19 12:12:42 2013 -0700 xfree86: Track error code and add label for error handling. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 4d7052bd7bbf49b573dc4d34ad14e7f058a0d884 Author: Bryce Harrington Date: Tue Mar 19 12:12:41 2013 -0700 xfree86: (Cleanup) Close fd if drm interface 1.4 could not be set. Signed-off-by: Bryce Harrington Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit c64fa9a2961f82719cc7734a4222f31297a2e593 Author: Maarten Lankhorst Date: Wed Apr 3 12:08:44 2013 +0200 support 32 bpp pixmaps when 24 bpp fb is used. Fixes background corruption in ubuntu. Signed-off-by: Maarten Lankhorst commit 8928f8fa0bb154ce437af703ff702016f0dcf127 Author: Geert Uytterhoeven Date: Mon Mar 18 21:38:10 2013 +0100 kdrive/fbdev: revive randr new screen size logic hw/kdrive/fbdev/fbdev.c: In function 'fbdevRandRSetConfig': hw/kdrive/fbdev/fbdev.c:470:19: warning: variable 'newheight' set but not used [-Wunused-but-set-variable] hw/kdrive/fbdev/fbdev.c:470:9: warning: variable 'newwidth' set but not used [-Wunused-but-set-variable] Signed-off-by: Geert Uytterhoeven Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 808c87bff710263f5a7b3c12a7e7fec54672fecd Author: Peter Hutterer Date: Mon Mar 25 14:51:58 2013 +1000 Revert "kdrive: fix "set but not used" warnings" Partial revert of commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997, better fix coming up. Signed-off-by: Peter Hutterer commit 3a9a6c972e4bc88dc3dde9399df3b0cda759cd70 Author: Maarten Lankhorst Date: Wed Mar 27 10:33:46 2013 +0100 bump version to 0.7.0 commit ac4c2abe985ce6816a3389c41eb23462c6ac2486 Author: vdb@picaros.org Date: Thu Mar 7 16:07:31 2013 +0100 xserver: add monitor Option "ZoomModes" [v2] Section "Monitor" Identifier "a21inch" Option "PreferredMode" "1600x1200" Option "ZoomModes" "1600x1200 1280x1024 1280x1024 640x480" EndSection The option's effect is to search for and mark once each named mode in the output modes list. So the specification order is free and the zoom modes sequence follows the order of the output modes list. All marked modes are available via the Ctrl+Alt+Keypad-{Plus,Minus} key combination. See also http://bugs.freedesktop.org/show_bug.cgi?id=17954. This option has its use for combined monitor and television setups. It allows for easy switching between 60 Hz and 50 Hz modes even when a monitor refuses to display the input signal. (Includes a few minor changes suggested by Aaron for v2) Signed-off-by: Servaas Vandenberghe Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 862bc2836835b93f4b2cfd2de6ca344f65484a00 Author: Maarten Lankhorst Date: Tue Mar 26 15:19:52 2013 +0100 modesetting: return null for get_modes if output could not be retrieved Signed-off-by: Maarten Lankhorst commit 6b79a8791d35bbd1a13ebdec1c582f66c559c039 Author: Maarten Lankhorst Date: Tue Mar 26 15:19:33 2013 +0100 modesetting: clean up leaks Signed-off-by: Maarten Lankhorst commit 2967391c6d35f03121afa8003e0fb94b62495129 Author: Peter Hutterer Date: Thu Feb 28 10:43:05 2013 +1000 Xi: add a comment to make a condition a bit clearer The commit message to 676447190190d8546165e21be242cf16dd69f5ae explains it, but that doesn't stop the WTF moment when reading the code. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2fdde2c40d83695438b6f5615f98bd7ae801b43d Author: Peter Hutterer Date: Mon Feb 25 15:21:32 2013 +1000 dix: update coords for touch events in PlayReleasedEvents Note: this is only hit for #ifdef PANORAMIX Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 697071ab2b7f8910e01ed74618138538291cd1e8 Author: Peter Hutterer Date: Thu Feb 28 10:30:15 2013 +1000 Xi: compress two if statements with the same body We do the same thing here, compress them into one body. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 11bead1fa205a1353e6a33c6024c7e8ace80be7c Author: Peter Hutterer Date: Mon Feb 25 11:13:52 2013 +1000 dix: fix a comment Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit fc504a44d12d537d4e07f659f1863f200a0272ad Author: Peter Hutterer Date: Fri Mar 1 08:26:06 2013 +1000 Xi: use a temp variable for the new listener Instead of accessing ti->listener[0] all the time. No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 9978b57b8d94f061d72a67b99a02b0ba16a11429 Author: Peter Hutterer Date: Fri Mar 1 08:43:58 2013 +1000 Xi: return !Success from DeliverTouchEmulatedEvent if we didn't deliver All callers currently ignore the new value, so this patch has no effect. Inverse call graph: DeliverTouchEmulatedEvent DeliverEmulatedMotionEvent Ignores value DeliverTouchBeginEvent DeliverTouchEvent DeliverTouchEvents Ignores value DeliverTouchEndEvent DeliverTouchEvent DeliverTouchEvents Ignores value Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1754973206c09a901747e71d4abdf666293da59e Author: Aaron Plattner Date: Wed Feb 20 17:27:16 2013 -0800 modesetting: match PCI class 3, any subclass If a device is not primary, the PCI device match fails because the xf86-video-modesetting driver looks specifically for a PCI class match of 0x30000 with a mask of 0xffffff. This fails to match, for example, a non-primary Intel VGA device, because it is reported as having a class of 0x38000. Fix that by ignoring the low 16 bits of the class in the pci_id_match table. Signed-off-by: Aaron Plattner Reviewed on IRC by Adam Jackson commit cc3d1a5a6120e721a46c67446ba68f5596055633 Author: Piotr Dziwinski Date: Sat Feb 23 13:14:45 2013 +0100 glx: fix uninitialized var in __glXDRIscreenProbe Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=59825 Signed-off-by: Piotr Dziwinski Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit c2ede8f92f0d6f15b1b2a04889cb54cd1728780b Merge: 190b03215 7050aae69 Author: Keith Packard Date: Mon Mar 18 11:26:24 2013 -0700 Merge remote-tracking branch 'whot/for-keith' commit 190b0321510b99d4738915f540cea5c0c51e07e2 Author: Zack Rusin Date: Thu Feb 14 15:06:57 2013 -0800 GLX/DRI2: Do not expose INTEL_swap_event without swap control Swap events depent on the implementation of ScheduleSwap. By unconditionally enabling GLX_INTEL_swap_event we're breaking the system with drivers that don't support it because the apps are forever stuck waiting for an event that will never be delivered. So lets enable the extension only if the hooks it depends on are actually there. Signed-off-by: Zack Rusin Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 116f020102fd6c2a603069a639b113dfa31b48b7 Merge: cf89aa537 0f537da72 Author: Keith Packard Date: Mon Mar 18 11:18:58 2013 -0700 Merge remote-tracking branch 'whot/next' commit cf89aa53748b964f9d9eceaa12a7d6f1a076d1ee Author: Tomasz Lis Date: Mon Mar 11 10:21:28 2013 +0100 Full support of sRGB capable fbconfigs. Changes to correctly initialize the sRGB capability attribute and transfer it between XServer and the client. Modifications include extension string, transferring visual config attribs and fbconfig attribs. Also, attribute is initialized in the modules which do not really use it (xquartz and xwin). This version advertises both ARB and EXT strings, and initializes the capability to default value of FALSE. It has corrected required GLX version and does not influence swrast. The sRGB capable attribute is attached only to those configs which do have this capability. Both ARB and EXT versions share the same GLX extension enabling bit. Signed-off-by: Tomasz Lis Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 679ccecd8bc6d797e99f3b707f8041b727ca7a49 Author: Keith Packard Date: Mon Mar 18 10:01:20 2013 -0700 Bump release to 1.14.99.0 Get us off the release number so that we don't conflict with the stable branch. Signed-off-by: Keith Packard commit beb1715e96b649a0903fa61f30dd1eb69411da2f Author: Colin Walters Date: Wed Jan 4 22:37:06 2012 +0000 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson commit 7050aae69c2a55dfdbb5c6af7882307e90ba4275 Author: Robert Morell Date: Tue Mar 12 09:40:16 2013 -0700 list.h: Make xorg_list_init inline Otherwise this file is emitted in every unit that includes it. Signed-off-by: Robert Morell Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 31595b528645a7e4903eb81da0fc332d78407f25 Author: Robert Morell Date: Tue Mar 12 09:37:43 2013 -0700 configure.ac: Require inputproto 2.3 This picks up support for Xi pointer barriers in the protocol. Signed-off-by: Robert Morell Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3ac2e61705432951f9e1b96b42b4214e7f748f94 Author: Peter Hutterer Date: Sat Mar 9 17:12:53 2013 +1000 xfixes: ifdef PanoramiXFixes* (#62015) Fixes build failure with --disable-xinerama introduced by 482e0cb cursor: Move pointer barrier code over to XI Reason is new include order: sdksyms.sh includes xfixes.h, which previously did not include xfixesint.h. As of 482e0cb xfixes.h includes xibarriers.h which includes xfixesint.h X.Org Bug 62015 Signed-off-by: Peter Hutterer Tested-by: Daniel Martin commit 5047810a4c20fab444b8c6eb146c55dcdb0d4219 Author: Aaron Plattner Date: Wed Mar 6 09:40:28 2013 -0800 fb: Rename wfbDestroyGlyphCache Renaming this function was missed in commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366, so both libfb.so and libwfb.so define functions named fbDestroyGlyphCache. Signed-off-by: Aaron Plattner Reviewed-by: Søren Sandmann Signed-off-by: Keith Packard commit 103b77c59e3638a45179bf6d7908f5c738d2d872 Author: Keith Packard Date: Tue Mar 5 22:31:17 2013 -0800 Version bumped to 1.14 Signed-off-by: Keith Packard commit 0f537da72d414ed84e3cd14e3bb7e08565136bd7 Author: Andreas Wettstein Date: Sun Mar 3 20:25:44 2013 +0100 xkb: Fixes to LatchMods/LatchGroup The main problem this patch addresses is that if a latch is put on multi-level key with a Latch/Lock/Set, it is possible that after all keys are released, still base modifiers are set, which typically will make the keyboard unusable. To see how it happens (without the patch), assume that key AltGr sets Mod5 when pressed by itself, and latches Mod3 when pressed together with Shift. Now press Shift, then AltGr and release both keys in reverse order. Mod3 is now latched, and the LatchMods filter remains active as the second filter. Now press AltGr; Mod5 base modifier gets set, and the SetMods filter will become active as the first filter. Release AltGr: First, the SetMods filter will set clearMods to Mod5, then the LatchMods filter will overwrite clearMods with Mod3. Result: the Mod5 base modifier will remain set. This example becomes practically relevant for the revised German standard layout (DIN 2137-1:2012-06). Other changes implement the latch behaviour more accurately according to the specification. For example, releasing a modifier latching key can at the same time clear a locked modifier, promote another modifier that is latched to locked, and latch a third modifier. Overall, what the code does should be straightforward to compare what the XKB protocol specification demands, see the table in section 6.3. Finally, releasing a key no longer cancels a latch that has not become pending yet. In my opinion, the specification is not clear; it speaks of "operating" a key, which the patch effectivly interprets as "press" rather than "press or release". From my experience, using the latter interpretation makes latches on higher levels practically unusable. In the example given above, one would have to release AltGr always before Shift to get the Mod3-Latch. The practical relevance of latches on higher levels is once more given by the revised German standard layout. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit eadda231091aa6feb68207ee22f6bc3a390d4556 Author: Peter Hutterer Date: Fri Feb 15 11:19:09 2013 +1000 xephyr: fix "set but not used warnings" ephyrvideo.c: In function 'ephyrPutVideo': ephyrvideo.c:1009:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1009:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1009:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1009:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrGetVideo': ephyrvideo.c:1058:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1058:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1058:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1058:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrPutStill': ephyrvideo.c:1107:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1107:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1107:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1107:9: warning: variable 'drw_x' set but not used ephyrvideo.c: In function 'ephyrGetStill': ephyrvideo.c:1156:42: warning: variable 'drw_h' set but not used ephyrvideo.c:1156:31: warning: variable 'drw_w' set but not used ephyrvideo.c:1156:20: warning: variable 'drw_y' set but not used ephyrvideo.c:1156:9: warning: variable 'drw_x' set but not used Signed-off-by: Peter Hutterer Reviewed-by: Robert Morell commit 4149ee8ec0193acbf3812c7ee2627b93b9a89997 Author: Peter Hutterer Date: Fri Feb 15 11:19:08 2013 +1000 kdrive: fix "set but not used" warnings kinput.c: In function 'KdEnqueueKeyboardEvent': kinput.c:1845:16: warning: variable 'ctrl' set but not used kinput.c:1844:17: warning: variable 'keyc' set but not used kinput.c: In function 'KdEnqueuePointerEvent': kinput.c:1887:12: warning: variable 'ms' set but not used kxv.c: In function 'KdXVDisable': kxv.c:1181:19: warning: variable 'ScreenPriv' set but not used mouse.c: In function 'ps2SkipInit': mouse.c:444:9: warning: variable 'skipping' set but not used mouse.c: In function 'ps2Init': mouse.c:473:10: warning: variable 'waiting' set but not used mouse.c:472:9: warning: variable 'skipping' set but not used fbdev.c: In function 'fbdevRandRSetConfig': fbdev.c:468:19: warning: variable 'newheight' set but not used fbdev.c:468:9: warning: variable 'newwidth' set but not used Signed-off-by: Peter Hutterer Reviewed-by: Robert Morell commit 44fc062f85df7288c17d2d64b73aa4957b91fd6d Author: Peter Hutterer Date: Mon Feb 18 14:57:58 2013 +1000 os: document pnprintf as sigsafe snprintf Signed-off-by: Peter Hutterer commit c100211034ab69ce453a1644fb61c6808d7e3eda Author: Peter Hutterer Date: Tue Dec 18 14:12:40 2012 +1000 dix: only show the cursor if a window defines one (#58398) e02f864fdf "Suppress cursor display until the first XDefineCursor() request" disabled cursor display a priori unless -retro is given. On a plain server, caling XFixesHideCursor() and XFixesShowCursor() would show the default root cursor, despite no client actually defining a cursor. Change the logic, disable CursorVisible by default and only enable it from the window's CWCursor logic. If no window ever defines a cursor, said cursor stays invisible. X.Org Bug 58398 Signed-off-by: Peter Hutterer Tested-by: Bastien Nocera Reviewed-by: Daniel Martin commit 6238bd68bd71323f8b4f1808f34dabe2ae447fe3 Author: Aaron Plattner Date: Tue Mar 5 13:04:46 2013 -0800 DPMS: include GPU screens in DPMS code Otherwise, displays driven by GPU screens remain on all the time. Signed-off-by: Aaron Plattner Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit dd4ab8b572956f9457616869d6e383c8ed964c73 Author: Peter Hutterer Date: Tue Mar 5 10:14:29 2013 +1000 Xi: force dtime to 0 on the first BarrierHit dtime to the previous event is 0 on the first BarrierHit event. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre Signed-off-by: Keith Packard commit 604169af8b67afc74a292cdb9070a3a1f2d7c536 Merge: 8f4640bdb 6ea59dc2d Author: Keith Packard Date: Mon Mar 4 21:09:59 2013 -0800 Merge commit '6ea59dc2d8887102bfd8d7c838d2e7ab17645aec' commit 6ea59dc2d8887102bfd8d7c838d2e7ab17645aec Author: Jasper St. Pierre Date: Sun Mar 3 04:50:55 2013 -0500 xibarriers: Remove accidental use of the comma operator Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bd58ebe4cf3b0ce60f87fb26a3715f774dabd349 Author: Daniel Martin Date: Thu Dec 20 13:50:17 2012 +0100 ephyr: Fix crash on 24bpp host framebuffer Use bytes_per_line and bits_per_pixel from the created XImage to fix https://bugzilla.redhat.com/show_bug.cgi?id=518960 Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8f4640bdb9d3988148e09a08d2c7e3bab1d538d6 Author: Dave Airlie Date: Wed Jan 9 12:58:28 2013 +1000 randr: cleanup provider properly So in the cold plug server shutdown case, we reap the resources before we call CloseScreen handlers, so the config->randr_provider is a dangling pointer when the xf86CrtcCloseScreen handler is called, however in the hot screen unplug case, we can't rely on automatically reaped resources, so we need to clean up the provider in the xf86CrtcCloseScreen case. This patch provides a cleanup callback from the randr provider removal into the DDX so it can cleanup properly, this then gets called by the automatic code for cold plug, or if hot unplug it gets called explicitly. Fixes a number of random server crashes on shutdown Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58174 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=891140 Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit 3ec35c45ca17f5ed6fd02c50fc49ae7b8d128dcb Author: Dave Airlie Date: Wed Jan 9 12:53:14 2013 +1000 xf86: actually set the compat output in the failure case The previous fix for the previous fix, didn't fully work, If we don't set compat_output we end up doing derferences of arrays with -1, leading to valgrind warnings. Reviewed-by: Chris Wilson Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit da8ee26023fc2868fe970471195a5f3c86fb574b Author: Dave Airlie Date: Wed Jan 9 12:51:45 2013 +1000 xfree86/hotplug: cleanup properly if the screen fails to initialise Due to another bug, the modesetting/udl driver would fail to init properly on hotplug, when it did the code didn't clean up properly, and on removing the device the server could crash. Found in F18 testing. Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner commit e21e183059df5975e7086850d1931edb2c1bbd06 Author: Marcin Slusarz Date: Thu Feb 21 09:02:44 2013 +1000 os: use libunwind to generate backtraces Libunwind generates backtraces much more reliably than glibc's "backtrace". Before: 0: /opt/xserver/bin/X (0x400000+0x18ce36) [0x58ce36] 1: /opt/xserver/bin/X (xorg_backtrace+0x9) [0x58d119] 2: /opt/xserver/bin/X (0x400000+0x190d69) [0x590d69] 3: /lib64/libpthread.so.0 (0x7fb904268000+0x10a90) [0x7fb904278a90] 4: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] 5: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] 6: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] 7: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] 8: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (0x7fb90220e000+0x76f3) [0x7fb9022156f3] 9: /opt/xserver/lib/xorg/modules/libexa.so (0x7fb9019c7000+0xbae0) [0x7fb9019d2ae0] 10: /opt/xserver/bin/X (0x400000+0x17d2b3) [0x57d2b3] 11: /opt/xserver/bin/X (0x400000+0xc9930) [0x4c9930] 12: /opt/xserver/bin/X (0x400000+0x3a81a) [0x43a81a] 13: /opt/xserver/bin/X (0x400000+0x3d6a1) [0x43d6a1] 14: /opt/xserver/bin/X (0x400000+0x2c2ca) [0x42c2ca] 15: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] 16: /opt/xserver/bin/X (0x400000+0x2c60d) [0x42c60d] 17: ?? [0x0] After: 0: /opt/xserver/bin/X (OsSigHandler+0x39) [0x590d69] 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x7fb904278a8f] 2: /lib64/libc.so.6 (ioctl+0x7) [0x7fb902fbf987] 3: /usr/lib64/libdrm.so.2 (drmIoctl+0x28) [0x7fb90405ffa8] 4: /usr/lib64/libdrm.so.2 (drmCommandWrite+0x1b) [0x7fb90406235b] 5: /usr/lib64/libdrm_nouveau.so.2 (nouveau_bo_wait+0x89) [0x7fb902009719] 6: /opt/xserver/lib/xorg/modules/drivers/nouveau_drv.so (nouveau_exa_download_from_screen+0x1a3) [0x7fb9022156f3] 7: /opt/xserver/lib/xorg/modules/libexa.so (exaGetImage+0x1f0) [0x7fb9019d2ae0] 8: /opt/xserver/bin/X (miSpriteGetImage+0x173) [0x57d2b3] 9: /opt/xserver/bin/X (compGetImage+0xb0) [0x4c9930] 10: /opt/xserver/bin/X (ProcGetImage+0x55a) [0x43a81a] 11: /opt/xserver/bin/X (Dispatch+0x341) [0x43d6a1] 12: /opt/xserver/bin/X (main+0x3ba) [0x42c2ca] 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x7fb902f019b5] 14: /opt/xserver/bin/X (_start+0x29) [0x42c60d] 15: ? (?+0x29) [0x29] Signed-off-by: Marcin Slusarz Reviewed-by: Peter Hutterer Tested-by: Knut Petersen commit 75815dbb373d5a74d57cbec9d469f9f88a8ee3ef Author: Chris Wilson Date: Mon Dec 3 13:25:19 2012 +0000 Add missing GTF modes A fixed-mode output device like a panel will often only inform of its preferred mode through its EDID. However, the driver will adjust user specified modes for display through use of a panel-fitter allowing greater flexibility in upscaling. This is often used by games to set a low resolution for performance and use the panel fitter to fill the screen. v2: Use the presence of the 'scaling mode' connector property as an indication that a panel fitter is attached to that pipe. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55564 commit e27b2e61632b220ddc36d0d0387581a9f4774f21 Author: Peter Harris Date: Tue Feb 19 16:08:52 2013 -0500 xkb: Set nIndicators in XkbGetIndicatorMap Xlib doesn't use this value (it computes it from the reply length instead) which is why nobody has noticed yet. But the spec http://www.x.org/releases/X11R7.7/doc/kbproto/xkbproto.html says that it should be set. Signed-off-by: Peter Harris Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3aac7a59dc6ef2d8bbf46ba5d37acdf6013e9450 Author: Daniel Martin Date: Tue Dec 11 17:23:55 2012 +0100 ephyr: Add -resizeable option With this option passed, ephyr windows can be resized like normal windows on the fly, without the need of an explicit parent window. Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f9198e278becec158b570204cf9fc1de822ac76b Author: Peter Hutterer Date: Mon Feb 27 16:43:10 2012 +1000 dix: FreeAllAtoms() on reset ==5712== 6 bytes in 1 blocks are still reachable in loss record 17 of 585 ==5712== at 0x4A074CD: malloc (vg_replace_malloc.c:236) ==5712== by 0x3D1DE885B1: strndup (strndup.c:46) ==5712== by 0x41CB71: MakeAtom (atom.c:121) ==5712== by 0x55AE3E: XIGetKnownProperty (xiproperty.c:401) ==5712== by 0x4251C9: AddInputDevice (devices.c:312) ==5712== by 0x42AC0C: AllocDevicePair (devices.c:2657) ==5712== by 0x425E6E: InitCoreDevices (devices.c:677) ==5712== by 0x5ACA05: main (main.c:257) Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 88517ced1fa2e621be2d05a319b522b3111da516 Merge: 82425c66e 73974dd7e Author: Peter Hutterer Date: Fri Feb 15 11:58:52 2013 +1000 Merge branch 'master' of git+ssh://people.freedesktop.org/~alanc/xserver into next commit 82425c66e7a8c436b5be7ad44880dd4be6c1f06a Author: Peter Hutterer Date: Thu Feb 14 10:21:47 2013 +1000 xfree86: remove redundant declaration of inputInfo xf86Cursor.c:19:18: warning: redundant redeclaration of 'inputInfo' [-Wredundant-decls] In file included from xf86Cursor.c:18:0: ../../../include/inputstr.h:614:57: note: previous declaration of 'inputInfo' was here Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 6133c417595a9c8fc158b0d68fd4a7a2c58fdc47 Author: Peter Hutterer Date: Thu Feb 14 10:15:33 2013 +1000 xkb: remove unused variable 'names' xkb.c: In function '_XkbSetNamesCheck': xkb.c:3987:18: warning: variable 'names' set but not used [-Wunused-but-set-variable] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 63d00c6b146d7f5fb80f20f19066088059042a5e Author: Peter Hutterer Date: Thu Feb 14 10:13:53 2013 +1000 Xext: rename two shadowing variables panoramiX.c: In function 'PanoramiXCreateConnectionBlock': panoramiX.c:599:10: warning: declaration of 'disableBackingStore' shadows a global declaration [-Wshadow] In file included from ../include/windowstr.h:60:0, from panoramiX.c:47: ../include/opaque.h:56:52: warning: shadowed declaration is here [-Wshadow] panoramiX.c: In function 'PanoramiXConsolidate': panoramiX.c:834:19: warning: declaration of 'pScreen' shadows a previous local [-Wshadow] panoramiX.c:813:15: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 8bbea9f48f43e54c55c8b60ea36bda3134a86af2 Author: Peter Hutterer Date: Thu Feb 14 10:09:53 2013 +1000 Xext: renaming shadowing variable xvdisp.c: In function 'ProcXvStopVideo': xvdisp.c:712:11: warning: declaration of 'rc' shadows a previous local [-Wshadow] xvdisp.c:705:17: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 7b79a2e4a11b5c5f0ebaa495828725e235d2b08e Author: Peter Hutterer Date: Thu Feb 14 10:06:55 2013 +1000 fb: drop two unneeded shadowing variables fbpict.c: In function 'fbGlyphs': fbpict.c:188:6: warning: declaration of 'x' shadows a previous local [-Wshadow] fbpict.c:111:9: warning: shadowed declaration is here [-Wshadow] fbpict.c:188:9: warning: declaration of 'y' shadows a previous local [-Wshadow] fbpict.c:111:12: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Soren Sandmann Reviewed-by: Mark Kettenis commit 858d8b19b3a5bb59e5c5f9a9e68adce2495b5e31 Author: Peter Hutterer Date: Thu Feb 14 10:04:06 2013 +1000 xfree86: drop unused prevSIGIO Unused as of 5d309af2ed93e91c7d72f548a11052051efbb40f Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 592d35aef0a8089a344543cf5a425e0537c0431b Author: Peter Hutterer Date: Thu Feb 14 10:02:02 2013 +1000 randr: fix "set but unused" warnings rrcrtc.c: In function 'RRCrtcDetachScanoutPixmap': rrcrtc.c:366:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable] rrcrtc.c: In function 'rrCheckPixmapBounding': rrcrtc.c:505:13: warning: variable 'ret' set but not used [-Wunused-but-set-variable] rrcrtc.c:445:9: warning: unused variable 'i' [-Wunused-variable] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 90642948cc78834d95f7a3bddaac7ff77b68ed7e Merge: 9a35d4240 eda7dbff5 Author: Keith Packard Date: Thu Feb 14 11:05:48 2013 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 9a35d4240e2aa91ac104f0f9f86f83ff9a2d3d04 Author: Peter Hutterer Date: Thu Feb 14 16:31:13 2013 +1000 os: fix pnprintf OOB buffer read for unterminated length modifiers Format strings with length modifiers but missing format specifier like "%0" will read one byte past the array size. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit eda7dbff5a9f35fefe1e3dedacb82daadbf5945e Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:53:02 2013 -0800 XORG_TLS: Pick the first option that works (ie: prefer __thread) Signed-off-by: Jeremy Huddleston Sequoia commit 5da82f872daf25939a8fa04f1561b01f0315a623 Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:40:10 2013 -0800 os: Ensure is included in strndup.c Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 67eaf4b46f678bc904f47dfcab6655e170d843e0 Author: Jeremy Huddleston Sequoia Date: Sat Feb 9 20:34:33 2013 -0800 XQuartz: Ensure is included in capabilities.c Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Alan Coopersmith commit 955d434f4d755d00a24ae4068b9957765989d672 Author: Keith Packard Date: Wed Feb 13 21:39:37 2013 -0800 Update to version 1.3.99.902 (1.14 RC2) Signed-off-by: Keith Packard commit 7115f6c709898a5124b67e19c61dc01334471358 Author: Aaron Plattner Date: Wed Jan 23 16:58:47 2013 -0800 randr: unref the provider shared pixmap the appropriate number of times When an RandR shared pixmap is created in rrCreateSharedPixmap, it has a refcnt of 1. Then, PixmapShareToSlave bumps the refcnt to 2. However, there's no corresponding PixmapUnshareFromSlave where the refcnt can be decreased again, and there's no convenient common place where the refcnt can be decremented when the slave pixmap is destroyed. Fix this by just unreffing the pixmap twice in RRCrtcDetachScanoutPixmap. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit da92690107d90061205340d4cdc98b73b59db9b2 Author: Aaron Plattner Date: Mon Feb 11 14:31:56 2013 -0800 xf86: use nt_list_for_each_entry_safe to walk InputHandlers in xf86Wakeup This is necessary when the input handler deletes itself from the list. Bug found by Maarten Lankhorst, this patch uses the list macros instead of open-coding the fix. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer commit d0a14877872b6a33172fb8c8f335792a28b9499b Author: Bryce Harrington Date: Fri Feb 8 15:56:02 2013 -0800 xfree86: Man page shouldn't say Device is mandatory anymore man xorg.conf states that the 'Device' identifier is required in the 'Screen' section, yet current xserver defaults properly and boots up fine without it. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=20742 Signed-off-by: Bryce Harrington Signed-off-by: Keith Packard commit 5e91054aa070ea09b61325b7ec479d767b02730e Author: Bryce Harrington Date: Fri Feb 8 15:56:01 2013 -0800 xfree86: Use fbdev/vesa driver on Oaktrail, Medfield, CDV rather than -intel Instead of defaulting to -intel for Oaktrail, Medfield, and CDV chips, default to -fbdev. For Poulsbo (only), attempt to use -psb if it's installed, and fallback to fbdev otherwise. All other Intel chips should use -intel. This fixed an issue where -intel would load on these chips and cause a boot failure. Newer -intel drivers avoid the boot hang, but it's still the wrong driver to load, so why take chances. The patch was originally created by Stefan Dirsch for OpenSUSE. We have included it in our stable release (Ubuntu "quantal" 12.10) since December. ref: https://bugzilla.novell.com/show_bug.cgi?id=772279 ref: https://bugs.launchpad.net/ubuntu/+bug/1069031 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60514 Signed-off-by: Bryce Harrington Signed-off-by: Keith Packard commit c1602d1c17967bdd4db9db19b3a9c0dfca6a58aa Author: Dave Airlie Date: Tue Feb 5 07:46:06 2013 -0800 randr: bump advertised RandR version to 1.4 Signed-off-by: Dave Airlie Reviewed-by: Aaron Plattner Tested-by: Aaron Plattner Signed-off-by: Keith Packard commit 9f79e93b6b3416055d08a0e8f9f16d5fd0649e36 Author: Peter Hutterer Date: Wed Jan 30 03:20:07 2013 +0000 Short-cut the input device cleanup process during AbortServer() If we're about to abort, we're already in the signal handler and cannot call down to the default device cleanup routines (which reset, free, alloc, and do a bunch of other things). Add a new DEVICE_ABORT mode to signal a driver's DeviceProc that it must reset the hardware if needed but do nothing else. An actual HW reset is only required for some drivers dealing with the HW directly. This is largely backwards-compatible, hence the input ABI minor bump only. Drivers we care about either return BadValue on a mode that's not DEVICE_{INIT|ON|OFF|CLOSE} or print an error and return BadValue. Exception here is vmmouse, which currently ignores it and would not reset anything. This should be fixed if the reset is required. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b58221f9da8c549d979215271359c6cd88b5568a Author: Peter Hutterer Date: Fri Feb 8 14:52:02 2013 +1000 dix: support the transformation matrix for relative devices. The transformation matrix we previously stored was a scaled matrix based on the axis ranges of the device. For relative movements, the scaling is not required (or desired). Store two separate matrices, one as requested by the client, one as the product of [scale . matrix . inv_scale]. Depending on the type of movement, apply the respective matrix. For relative movements, also drop the translation component since it doesn't really make sense to use that bit. Input ABI 19 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit b173eb2ae3349c557db1ff9e424fa540b8289bb2 Author: Keith Packard Date: Fri Feb 8 08:57:43 2013 -0800 os: Round fraction in pnprintf %f format Truncating the fraction part leads to a test failure where -1203.30 is printed as -1203.29. Round this to the nearest value instead by adding 0.5 before converting to an integer Signed-off-by: Keith Packard commit 509b3c3dc82e7abce1900d5e1cddd90f23be5a87 Author: Carlos Garnacho Date: Wed Feb 6 14:07:22 2013 +0100 dix: Set focus field on XI2 crossing events Set on DeviceEnterLeaveEvent() the xXIEnterEvent->focus field similarly to how the CoreEnterLeaveEvent() function above does for core events. This fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=677329 reported to GTK+, where focus handling on window managers with sloppy focus or no window manager present was broken due to this field being always set to FALSE. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3e4be4033aed78b2bb3a18d51f0963989efd1af3 Author: Peter Hutterer Date: Fri Jan 25 11:47:32 2013 +1000 dix: when shutting down slave devices, shut down xtest devices last XTest devices are the first ones in the list, being initialised together with the master devices. If we disable the devices in-order and a device has a button down when being disabled, the XTest device is checked for a required button release (xkbAccessX.c's ProcessPointerEvent). This fails if the device is already NULL. Instead of putting the check there, disable the devices in the reverse order they are initialised. Disable physical slaves first, then xtest devices, then the master devices. Testcase: shut down server with a button still held down on a physical device Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0d5bb882600ee7734af034fbea935a79d21d1e70 Merge: b33fcb149 61a99aff9 Author: Peter Hutterer Date: Fri Feb 8 14:10:52 2013 +1000 Merge branch 'ptraccel-fixes' into for-keith commit 61a99aff9d33728a0b67920254d2d4d79f80cf39 Author: Peter Hutterer Date: Fri Jan 11 14:22:07 2013 +1000 dix: pre-scale relative events from abs devices to desktop ratio (#31636) Absolute devices may send relative events depending on the mode (synaptics by default, wacom per option). The relative events are added to the previous position, converted into device coordinates and then scaled into desktop coordinates for pointer movement. Because the device range must be mapped into the desktop coordinate range, this results in uneven scaling depending dimensions, e.g. on a setup with width == 2 * height, a relative movement of 10/10 in device coordinates results in a cursor movement of 20/10 (+ acceleration) Other commonly user-visible results: * the touchpad changing acceleration once an external monitor as added. * drawing a circle on a wacom tablet in relative mode gives an ellipsis in the same ratio as the desktop dimensions. Solution: pre-scale the incoming relative x/y coordinates by width/height ratio of the total desktop size. Then add them to the previous coordinates and scale back with the previous mapping, which will undo the pre-scaling and give us the right movement. X.Org Bug 31636 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a6ba2b79ae8ad0fdee3f208d5e030b012df48785 Author: Peter Hutterer Date: Fri Jan 11 08:53:24 2013 +1000 dix: unify prefix for ptraccel debugging in DebugAccelF macro If we're already using our own custom macro, might as well use it properly. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0d7d79406011169ad95e23c6e937f6d15a5ec3cc Author: Peter Hutterer Date: Fri Jan 11 08:52:08 2013 +1000 dix: use BUG_RETURN_VAL for an error message Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a0c38ea6cbad61edcfefff0e5dd6330edb706f13 Author: Peter Hutterer Date: Fri Jan 11 08:49:15 2013 +1000 dix: add some more info to a ptraccel debug msg Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 95125a7c0cbbbae40216a0497acdd863ddc645ed Author: Peter Hutterer Date: Thu Jan 10 13:19:27 2013 +1000 dix: fix ptraccel debugging printfs This is mostly sigsafe code, so use sigsave printf. And update some fields to double that used to be int. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit b33fcb149710a28fd8767b2307a97bf367de695e Author: Andreas Wettstein Date: Tue Jan 29 21:49:20 2013 +0100 xkb: Fix repeat behaviour of redirect and message actions The redirect and the message action filter functions implicitly assumed that when they receive an event for the same keycode they were activated for, that this is the a release of the key that activated the filter. This is not true if the key autorepeats. Due to the incorrect assumption, the effective key repeat rate was effectively halved. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8571c648a79444bcee9a0fe6e395129116372f49 Author: Peter Hutterer Date: Sat Jan 26 15:53:08 2013 +1000 Xext: if a root window is given in XTestFakeInput, move to that For absolute events, if the client specifies a screen number offset the coordinates by that. And add a new flag so we know when _not_ to add the screen offset in GPE. Without this offset and the flag, GPE would simply add the offset of the current screen if POINTER_SCREEN is set. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 9fd6cb89539fde44a41ae5183c89ef9c8831c8dd Author: Peter Hutterer Date: Tue Jan 29 15:13:44 2013 +1000 Xext: pass the current screen to miProcessDeviceEvent() from xtest calls Not passing in a screen means we skip the screen crossing updates, so a xtest event that changes between ScreenRecs won't do so until the next physical event comes in or never, whichever comes earlier. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a191dbfe850ed9c6440346f59cb0078e0e844edc Author: Sybren van Elderen Date: Tue Jan 29 15:43:57 2013 +1000 dix: when scaling from desktop coord, take the total desktop size (#51904) Scaled is already in desktop coordinates, take the total width into account, not just the current screen's width. Fixes Xdmx pointer position calculation. X.Org Bug 51904 Signed-off-by: Sybren van Elderen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 1cb19803f0f8dfd1e0fb9d189afe2262e24a0be5 Author: Peter Hutterer Date: Tue Jan 29 12:51:15 2013 +1000 include: fix typo in list description Signed-off-by: Peter Hutterer commit 3d35dfcf5bad1b0a028fbecd65cb6cf6ebf12503 Author: Ted Felix Date: Tue Jan 29 16:36:48 2013 +1000 xfree86: bail on misformed acpi strings (#73227) If acpid sends a string in a format that we can't parse, bail out instead of potentially dereferencing a NULL-pointer. X.Org Bug 73227 Signed-off-by: Ted Felix Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fdc451588816c4bc798d54e56316530e9066be80 Author: Peter Hutterer Date: Tue Jan 29 11:01:29 2013 +1000 Xi: limit valuator copy to valuator array size (#59939) mask[(MAX_VALUATORS + 7)/8] is larger than data[MAX_VALUATORS], so static code checkers think we may be running OOB on the data array. Mask is initialized to 0, so this should not happen, but change it anyway to shut up code analyzer noise. X.Org Bug 59939 Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 48bc30c5413a1be0039fa77affcbbb4fe677479f Author: Alan Coopersmith Date: Tue Jan 29 10:24:32 2013 +1000 Xext: avoid null-pointer dereference in XTestFakeInput (#59937) dv is still NULL at this point, so return firstValuator instead (which is the same value dv->firstValuator would be once initialized) X.Org Bug 59937 Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 1058fcf57fdcb94d92e7b5f4483b347853d5f8e6 Author: Peter Hutterer Date: Sat Jan 26 14:13:33 2013 +1000 dmx: don't include dmx-config.h from xdmxconfig (#37502) dmx-config.h is a server header which includes dix-config.h. That again defines a bunch of server-specifics, including setting the size of XID to 32 bit. libX11 uses unsigned long (8 bits on x86_64). XGCValues thus ends up being 16 bytes smaller in xdmxconfig than in the library, causing garbage to be sent to the server. X.Org Bug 37502 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ac34281b8a487640c61f258ae45a6f17a4fb3cc0 Author: Dave Airlie Date: Thu Feb 7 12:24:20 2013 +1000 modesetting: provide dummy hooks for shadow Since in some wierd cases the server can call these without checking they exist. Signed-off-by: Dave Airlie commit 73974dd7ea9ca4d4cdd5464cb813088a6ee9770b Author: Alan Coopersmith Date: Sun Jan 27 15:42:02 2013 -0800 Avoid memory leak in ddc resort() if find_header() fails Call find_header first, returning on failure before calling malloc. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit b1129a1f1771c9d1653cc15aae94a614f081638a Author: Alan Coopersmith Date: Sun Jan 27 14:00:54 2013 -0800 xf86XvMCScreenInit: Avoid leak if dixRegisterPrivateKey fails Found by parfait 1.1 memory analyser: Memory leak of pointer 'pAdapt' allocated with malloc((88 * num_adaptors)) at line 162 of hw/xfree86/common/xf86xvmc.c in function 'xf86XvMCScreenInit'. 'pAdapt' allocated at line 158 with malloc((88 * num_adaptors)). Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 563db909bcf965b6103c1807bf9f00ede957077d Author: Alan Coopersmith Date: Sun Jan 27 13:55:50 2013 -0800 Avoid memory leak on realloc failure in localRegisterFreeBoxCallback Also avoids leaving invalid pointers in structures if realloc had to move them elsewhere to make them larger. Found by parfait 1.1 code analyzer: Memory leak of pointer 'newCallbacks' allocated with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))) at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. 'newCallbacks' allocated at line 320 with realloc(((char*)offman->FreeBoxesUpdateCallback), (8 * (offman->NumCallbacks + 1))). newCallbacks leaks when newCallbacks != NULL at line 327. Memory leak of pointer 'newPrivates' allocated with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))) at line 328 of hw/xfree86/common/xf86fbman.c in function 'localRegisterFreeBoxCallback'. 'newPrivates' allocated at line 324 with realloc(((char*)offman->devPrivates), (8 * (offman->NumCallbacks + 1))). newPrivates leaks when newCallbacks == NULL at line 327. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 08f75d3a9661c6c32800e1b4f150626200b889d9 Author: Alan Coopersmith Date: Sun Jan 27 13:50:30 2013 -0800 Avoid NULL pointer dereference in xf86TokenToOptinfo if token not found Reported by parfait 1.1 code analyzer: Error: Null pointer dereference (CWE 476) Read from null pointer 'p' at line 746 of hw/xfree86/common/xf86Option.c in function 'xf86TokenToOptName'. Function 'xf86TokenToOptinfo' may return constant 'NULL' at line 721, called at line 745. Null pointer introduced at line 721 in function 'xf86TokenToOptinfo'. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit c1c01e350834a23161b33bd34b2fa9c01d02a65b Author: Alan Coopersmith Date: Sun Jan 27 13:10:08 2013 -0800 Make xf86ValidateModes actually copy clock range list to screen pointer Our in-house parfait 1.1 code analysis tool complained that every exit path from xf86ValidateModes() in hw/xfree86/common/xf86Mode.c leaks the storeClockRanges allocation made at line 1501 with XNFalloc. Investigating, it seems that this code to copy the clock range list to the clockRanges list in the screen pointer is just plain insane, and according to git, has been since we first imported it from XFree86. We start at line 1495 by walking the linked list from scrp->clockRanges until we find the end. But that was just a diversion, since we've found the end and immediately forgotten it, and thus at 1499 we know that storeClockRanges is NULL, but that's not a problem since we're going to immediately overwrite that value as the first thing in the loop. So we move on through this loop at 1499, which takes us through the linked list from the clockRanges variable, and for every entry in that list allocates a new structure and copies cp to it. If we've not filled in the screen's clockRanges pointer yet, we set it to the first storeClockRanges we copied from cp. Otherwise, as best I can tell, we just drop it into memory and let it leak away, as parfait warned. And then we hit the loop action, which if we haven't hit the end of the cp list, advances cp to the next item in the list, and then just for the fun of it, also sets storeClockRanges to the ->next pointer it has just copied from cp as well, even though it's going to overwrite it as the very first instruction in the loop body. v2: rewritten using nt_list_* macros from Xorg's list.h header Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 89badba082c81d20fe35cb064c16e131ff288ca3 Author: Alan Coopersmith Date: Sun Jan 27 12:08:47 2013 -0800 Free keymap on error in Xephyr's hostx_load_keymap Found by parfait 1.1 code analyser: Memory leak of pointer 'keymap' allocated with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width) at line 861 of hw/kdrive/ephyr/hostx.c in function 'hostx_load_keymap'. 'keymap' allocated at line 845 with XGetKeyboardMapping(HostX.dpy, min_keycode, ((max_keycode - min_keycode) + 1), &host_width). Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 48b94651205b175760904e448f94111d1ab85e13 Author: Alan Coopersmith Date: Sun Jan 27 11:20:45 2013 -0800 Stop leaking overlayWin in PanoramiXCompositeGetOverlayWindow error paths Found by parfait 1.1 code analyzer: Error: Memory leak (CWE 401) Memory leak of pointer 'overlayWin' allocated with malloc(72) at line 806 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when rc != 0 at line 804. at line 816 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when pOc == NULL at line 815. at line 825 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when cs->pOverlayWin == NULL at line 822 and compCreateOverlayWindow(pScreen) == 0 at line 823. at line 834 of composite/compext.c in function 'PanoramiXCompositeGetOverlayWindow'. pointer allocated at line 794 with malloc(72). leaks when rc != 0 at line 832. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit f4a9332ad149ed15353a9c482563bdd042d0b403 Author: Alan Coopersmith Date: Sun Jan 27 10:06:42 2013 -0800 Handle failure to create counter in init_system_idle_counter Check for NULL pointer (which can be returned for multiple reasons) before trying to dereference it to add privates. To avoid memory leak in error path, delay malloc of privates until we're ready to add them. In case we do return NULL up through SyncInitDeviceIdleTime, handle the possibility of getting NULL passed back down to SyncRemoveDeviceIdleTime. As reported by parfait 1.1: Error: Null pointer dereference (CWE 476) Read from null pointer 'idle_time_counter' at line 2764 of xserver/Xext/sync.c in function 'init_system_idle_counter'. Function 'SyncCreateSystemCounter' may return constant 'NULL' at line 952, called at line 2756. Null pointer introduced at line 952 in function 'SyncCreateSystemCounter'. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 7fe5e6dfa5c1e71d8b7540b28c1d508687a2fbee Author: Jasper St. Pierre Date: Wed Jan 23 13:11:55 2013 -0500 protocol-versions: Bump minor version of XI This was accidentally excluded when we added barriers. Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 70b127c9f1c53bdb42f078265e67f76b464deae2 Author: Aaron Plattner Date: Thu Jan 10 17:01:17 2013 -0800 config/udev: fix "removing GPU device" format string mistake udev.c: In function 'device_removed': udev.c:270:9: warning: format '%d' expects argument of type 'int', but argument 3 has type 'const char *' [-Wformat] Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 605dfc6804a05ff2bda5692fec26c37344fd95cb Author: Dave Airlie Date: Tue Jan 22 07:39:53 2013 +1000 xserver: fix build regression since 91ab237358c6e33da854914d3de493a9cbea7637 inputstr, double defines TouchListener typedef, maybe some gcc handles it, but not all. fixes tinderbox Reported-by: Jon TURNEY Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 069d8ed3eb659c48dd2b0f8b7b8c11f092fdb362 Merge: 591c06277 d6dcde7a0 Author: Keith Packard Date: Sun Jan 20 15:58:38 2013 -0800 Merge remote-tracking branch 'jturney/xserver-next' commit 591c06277bb120ab9615633f2d28addbd3a2aa5f Merge: 6703a7c7c fa6ab7d9b Author: Keith Packard Date: Sun Jan 20 15:52:26 2013 -0800 Merge remote-tracking branch 'whot/for-keith' commit cde7cbe9674e8a771f9a4e646c1772a46a8230fb Author: Peter Hutterer Date: Thu Jan 10 13:20:12 2013 +1000 os: add support for %f to pnprintf This is the lazy man's %f support. Print the decimal part of the number, then append a decimal point, then print the first two digits of the fractional part. So %f in sigsafe printing is really %.2f. No boundary checks in place here. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 20def57632583aef095ca18792c7fce16d2d9004 Author: Peter Hutterer Date: Thu Jan 10 13:24:05 2013 +1000 os: silently ignore length modifiers in pnprintf Until we have support for them, ignore any length modifiers so we don't need to update all callers. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f53b2012f39085d866f267dda1442a48ace3c5a5 Author: Peter Hutterer Date: Thu Jan 17 16:19:51 2013 +1000 test/signal-logging: simplify tests using sprintf Ever looked at your own code and thought 'WTF was I thinking?'. yeah, that. Instead of passing in the expected string just use sprintf to print the number for us and compare. In the end we're just trying to emulate printf behaviour anyway. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d6dcde7a03bb38c17ffc4ec5f0ca1c161e54569f Author: Jon TURNEY Date: Sat Feb 11 12:22:17 2012 +0000 hw/xwin: Stop assuming WS_EX_APPWINDOW style in WM_SHOWWINDOW Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 56e94403f8f9182e05428d895a983371c7737d2a Author: Jon TURNEY Date: Wed Jan 9 20:15:01 2013 +0000 hw/xwin: Use ITaskBarList interface to ensure show-on-taskbar state is updated correctly Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c94d1cb0a49106f44714f4511720a197cc549164 Author: Jon TURNEY Date: Thu Jan 10 14:35:56 2013 +0000 hw/xwin: Ensure full styling is applied when the window is mapped Move styling update code from WM_WM_HINTS_EVENT to a function UpdateStyle(), which is also invoked from WM_WM_MAP3, so everything which needs to be done to style the window happens when it is mapped (Otherwise, the appearance of the window is sensitive to the timing of the notification of the windows appearance hint properties being set relative to window creation. e.g. see [1]) [1] http://sourceware.org/ml/cygwin-xfree/2012-06/msg00004.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ef61f8cacc84080c9156675f9ce26a27e8a90ac1 Author: Jon TURNEY Date: Sat Mar 31 18:45:28 2012 +0100 hw/xwin: Make sure that WM_WM_HINTS_EVENT does nothing for override-redirect windows Future work: It looks like this code could be rationalized quite a lot: It might make sense to pull the checking for override-redirect up out of UpdateIcon() and UpdateName() and consolidate WM_WM_MAP2 and WM_WM_MAP3 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3628559e594fcbdfcc14b1e8fa60aa841f184e19 Author: Jon TURNEY Date: Sun Feb 5 11:25:39 2012 +0000 hw/xwin: Add a new WM_WM_HINTS_EVENT event to update window style Add a new WM_WM_HINTS_EVENT event to update window style if any of the properties which affect window style change Check PropertyNotify events for any of the window properties which we consider to decide on the window style, and update the window style by sending a WM_WM_HINTS_EVENT message to the WM. This allows the styling of the window to change during it's lifetime. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 066ecbd11d516ea68d7ebc7470232d01c5717546 Author: Jon TURNEY Date: Thu Jan 10 14:37:45 2013 +0000 hw/xwin: Move reshape code from winUpdateWindowPosition() to the map event handler Move reshape code, which was only used when handling a map event, from winUpdateWindowPosition(), to put it explicitly in the map event handler. Remove 'reshape' parameter from winUpdatePosition(). (Note that there's no handling of the ShapeNotify event to notice when the window shape changes, instead we hook the screen SetShape procedure and reshape the native window then) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 852d1fb042f4160fe023a015f1c9a34126bf911a Author: Ryan Pavlik Date: Sat Dec 1 16:58:40 2012 +0000 hw/xwin: Add missing include xwin-config.h to winglobals.h winglobals.h checks if RELOCATE_PROJECTROOT is defined to see if a declaration of g_fLogFileChanged is needed, so must include xwin-config.h Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit ab686ce029208abf970a4bcd1435bf8411a44de9 Author: Ryan Pavlik Date: Wed Oct 26 17:03:25 2011 -0500 include: Add RELOCATE_PROJECTROOT to xwin-config.h header RELOCATE_PROJECTROOT is AC_DEFINED in configure.ac, but currently has no effect as it doesn't appear in any AC_CONFIG_HEADER header. When packaged for Windows, we do not have a unix-style filesystem tree, where file needed by the X server can be found in fixed, absolute paths under the prefix (PROJECTROOT). Instead, the filesystem tree containing files needed by the X server and clients will be installed with the directory containing the X server executable as the root directory of that tree. (Typically, this will be in the Program Files directory, which does not have a fixed name, as it can be moved, localized, or added to to indicate x86 or x64 binaries) So, RELOCATE_PROJECTROOT is used to make a native Windows build of the X server look for various files (fonts, xkb data) in locations relative to the X server rather than at absolute paths, by translating those paths at run-time. Additionally the XKEYSYMDB, XERRORDB, XLOCALEDIR env vars checked by libX11 are set appropriately for clients started by the X server. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa6ab7d9b2d7fd8184f1e068360607845f5c33ab Merge: adde4e644 0e1ab433f Author: Peter Hutterer Date: Fri Jan 11 14:58:17 2013 +1000 Merge branch 'pointer-emulation-fixes-56558-v2' into for-keith commit adde4e64480315dc5b47a727ee37d86f5cd8584f Author: Peter Hutterer Date: Thu Jan 10 10:33:05 2013 +1000 dix: typo fix in comment Signed-off-by: Peter Hutterer commit 05ed095dd8d6cf939b4ebd9a59d70ce32705df7c Author: Benjamin Tissoires Date: Wed Jan 9 19:32:19 2013 +0100 dix: fix error logging occuring in signal context of GetTouchEvents GetTouchEvents is usually called in a signal context. Calling ErrorF for the error messages leads to X complaining about log: (EE) BUG: triggered 'if (inSignalContext)' (EE) BUG: log.c:484 in LogVMessageVerb() (EE) Warning: attempting to log data in a signal unsafe manner while in signal context. Please update to check inSignalContext and/or use LogMessageVerbSigSafe() or ErrorFSigSafe(). The offending log format message is: %s: Attempted to start touch without x/y (driver bug) Signed-off-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f4a58469a298c226668fd8dce375bf22331c902d Author: Peter Hutterer Date: Wed Jan 9 13:58:56 2013 +1000 xfree86: don't access the old input handler after freeing it Introduced in 323869f3298cbbfe864af9404a8aed1bf7995d79 Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 205cfbd6d9824fb9a67c21b19bc8f1e66c9df4d2 Author: Dave Airlie Date: Sat Jan 5 18:35:42 2013 +1000 xf86: bump input ABI version to 19 The changes to miPointerSetPosition interface from int->double breaks the SIS driver build, so time to bump this. Signed-off-by: Dave Airlie Signed-off-by: Peter Hutterer commit ad3bc571348a7007a2960bf87ae739397c5511ee Author: Peter Hutterer Date: Tue Jan 8 11:19:09 2013 +1000 xfree86: update the device state for all DGA events (#59100) DGA only handles master devices but it does intercept slave device events as well (since the event handlers are per event type, not per device). The DGA code must thus call into UpdateDeviceState to reset the button/key state on the slave device before it discards the remainder of the event. Test case: - Passive GrabModeSync on VCP - Press button - Enable DGA after ButtonPress - AllowEvents(SyncPointer) - Release button The button release is handled by DGAProcessPointerEvent but the device state is never updated, so the slave ends up with the button permanently down. And since the master's button state is the union of the slave states, the master has the button permanently down. X.Org Bug 59100 Reported-by: Steven Elliott Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit c5f2818edbec2f87383baa6c6be5c389b73ca6f9 Author: Peter Hutterer Date: Tue Jan 8 10:13:53 2013 +1000 xfree86: set event->detail for DGA pointer events Reported-by: Steven Elliott Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 519d183d78e0b0eaf47a473e94f5d8611baf8463 Author: Peter Hutterer Date: Mon Jan 7 10:44:33 2013 +1000 Fix two typos "requires an string value" Signed-off-by: Peter Hutterer commit 4e13dd90144dde47550aceea4db4b4329e531279 Author: Peter Hutterer Date: Wed Aug 22 10:34:07 2012 +1000 dix: don't filter RawEvents if the grab window is not the root window (#53897) If a XI2.1+ client has a grab on a non-root window, it must still receive raw events on the root window. Test case: register for XI_ButtonPress on window and XI_RawMotion on root. No raw events are received once the press activates an implicit grab on the window. X.Org Bug 53897 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit a2037d7080ae64ea55f7d76971716346aa3ec6d3 Author: Jon TURNEY Date: Wed Nov 28 22:25:35 2012 +0000 hw/xwin: Fix MinGW build of winSetAppModelID.c Add missing #include In file included from /jhbuild/checkout/xorg/xserver/hw/xwin/winSetAppUserModelID.c:31:0: /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:140:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:141:11: error: expected declaration specifiers or ‘...’ before ‘pthread_t’ /jhbuild/checkout/xorg/xserver/hw/xwin/winwindow.h:142:11: error: expected declaration specifiers or ‘...’ before ‘pthread_mutex_t’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f57100bb36eae3b4d75f3c315973405f705b8de6 Author: Jon TURNEY Date: Tue Feb 23 13:38:48 2010 +0000 hw/xwin: Process one Windows message per wakeup, rather than all of them. De-queuing Windows messages and X events happens in the same thread of execution. Draining the windows message queue can lead to the X event queue overflowing if lots of those windows messages cause X events (e.g. if a keyboard macro program has just dumped thousands of keypresses into the Windows message queue). See the mailing list thread [1] for more details. Processing one Windows message per wakeup, rather than all of them gives the X server a chance to do stuff as well after each message. [1] http://cygwin.com/ml/cygwin-xfree/2010-01/msg00056.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e30e1ea98720acc583f34c830a1c1b7e3e88f694 Author: Jon TURNEY Date: Mon Dec 17 22:38:25 2012 +0000 hw/xwin: Fix some comments in winkeybd.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6f4a48f8a55bc54b6d3e9d80734be05750c024de Author: Jon TURNEY Date: Thu Apr 1 15:08:26 2010 +0100 hw/xwin: Bring the X screen window to the front on a single left-click on the tray icon Bring the X screen window to the front on a single left click on the tray icon, like the comment says we do Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6703a7c7cf1a349c137e247a0c8eb462ff7b07be Author: Keith Packard Date: Tue Jan 8 20:24:32 2013 -0800 hw/xfree86: Require only one working CRTC to start the server. Instead of requiring every mode set to complete successfully, start up as long as at least one CRTC is working. This avoids failures when one or more CRTCs can't start due to mode setting conflicts. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 34a571c5b9781025897ba5e5c5e2a34ae5262266 Author: Dave Airlie Date: Wed Jan 9 13:04:00 2013 +1000 modesetting: bump to 0.6.0 commit 8650ff14a52047173fa32f12f22ec6f4e38ff433 Author: Dave Airlie Date: Wed Jan 9 12:48:30 2013 +1000 modesetting: fix crashes caused by udev race conditions So the kernel removes the device, and the driver processes the first udev event, and gets no output back from the kernel, so it check and don't fall over. This fixes a couple of crashes seen when hotplugging USB devices. Signed-off-by: Dave Airlie commit 0e1ab433f4048b3367bb2f01d16cd00502538e4d Author: Peter Hutterer Date: Fri Jan 4 12:26:58 2013 +1000 dix: remove already-moved hunk Should've been removed in bc1f90a615018c05994fae3e678dd2341256cd82a, but got left here due to a botched rebase. Fixes stray button events sent to clients after deactivating an async pointer grab on a pointer-emulating-touch. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 32a6d8a6b59c42f8d65002d7ca1cafb1957b656f Author: Peter Hutterer Date: Thu Dec 20 16:25:43 2012 +1000 dix: check for the right device's xi2 mask events.c: In function 'DeactivatePointerGrab': events.c:1524:51: warning: 'dev' may be used uninitialized in this function [-Wuninitialized dev is unset when we get here, the device to check is "mouse". Introduced in ece8157a59751b3ed492fb2e1eb8d5f20221e195. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit f59499b5d05fde83813709e9848152951592120d Author: Peter Hutterer Date: Tue Oct 30 12:44:08 2012 +1000 dix: add resource type to touch listeners Instead of guessing what resource type the listener is and what property to retrieve, store the resource type in the listener directly. Breaks XIT test cases: TouchGrabTestMultipleTaps.PassiveGrabPointerEmulationMultipleTouchesFastSuccession Fixes https://bugs.freedesktop.org/show_bug.cgi?id=56557 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Reviewed-by: Chase Douglas commit 9ad0fdb135a1c336771aee1f6eab75a6ad874aff Author: Keith Packard Date: Tue Nov 27 11:21:17 2012 -0800 input: Record grab pointer in TouchListener This places a pointer to the grab related to a TouchListener directly in the TouchListener structure rather than hoping to find the grab later on using the resource ID. Passive grabs have resource ID in the resource DB so they can be removed when a client exits, and those resource IDs get copied when activated, but implicit grabs are constructed on-the-fly and have no resource DB entry. Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 91ab237358c6e33da854914d3de493a9cbea7637 Author: Keith Packard Date: Tue Nov 27 11:21:16 2012 -0800 input: Pull TouchListener declaration to top-level No reason to have a struct declared inside another struct Signed-off-by: Keith Packard Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3578cc3c2e1b5cb8eb191e2d12ad88e1bc9e6e1e Author: Andreas Wettstein Date: Wed Dec 19 18:13:21 2012 +0100 xkb: Do not use base group as an array index. The base group is not brought into range and, therefore, using it as an array index crashed the X server. Also, at this place, we should ignore locked groups, but not latched groups. Therefore, use sum of base and latched groups, brought into range. Reproducible with: key { type= "ONE_LEVEL", symbols[Group1]= [ NoSymbol ], actions[Group1]= [ LatchGroup(group=-1, clearLocks) ] }; And hitting F7 will exceed the group level and access arbitrary memory. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit df746a73410b892a4d41a2934cf9cd2e8ad7ba51 Author: Carlos Garnacho Date: Wed Dec 19 18:42:39 2012 +0100 render: Unwrap early on the animated cursor BlockHandler The loop above the previous call may end up triggering other handlers attaching to the same function slot, so unwrapping the handler after that could leave the just attached handler in a dangling but not unset state. This issue was most visible on the XO, where destroying a window with an animated cursor set and running would trigger this inconsistent state, never calling the miSpriteBlockHandler again after the animated cursor is unset. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0fbd779a82919d5dbf8776be9b57a76c0eae6b14 Author: Carlos Garnacho Date: Wed Dec 19 18:42:38 2012 +0100 mi: Ensure pointer emulating touch events update the sprite Different miPointerSpriteFuncRec implementations do a varying business at ultimately calling miPointerUpdateSprite(), this particularly fails when using the plain mi sprite on touch events, where the sprite is just moved/updated on cursor changes. So, ensure miPointerUpdateSprite() is called generically for pointer emulating touch events as with regular motion events. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8b328d4ee3873bc0a7a34f2cb9d301827244b98c Author: Aaron Plattner Date: Fri Dec 21 07:37:33 2012 -0800 dix: Make small bitfields that store enums unsigned Commit 31bf81772e146af79b0c456aae2159eba8b0280f changed the clientState field from a signed int to a signed int 2-bit bitfield. The ClientState enum that is expected to be assigned to this field has four values: ClientStateInitial (0), ClientStateRunning (1), ClientStateRetained (2), and ClientStateGone (3). However, because this bitfield is signed, ClientStateRetained becomes -2 when assigned, and ClientStateGone becomes -1. This causes warnings: test.c:54:10: error: case label value exceeds maximum value for type [-Werror] test.c:55:10: error: case label value exceeds maximum value for type [-Werror] The code here is a switch statement: 53 switch (client->clientState) { 54 case ClientStateGone: 55 case ClientStateRetained: 56 [...] 57 break; 58 59 default: 60 [...] 61 break; 62 } It also causes bizarre problems like this: client->clientState = ClientStateGone; assert(client->clientState == ClientStateGone); // this assert fails Also change the signedness of nearby bitfields to match. Signed-off-by: Aaron Plattner Reviewed-by: Alex Deucher Reviewed-by: Colin Harrison Signed-off-by: Keith Packard commit 8f4820be7a2e0f6e286ddc85c4b75bccdbe8a730 Author: Peter Hutterer Date: Thu Dec 20 12:44:16 2012 +1000 test/xi2: fix compiler warning protocol-xiwarppointer.c: In function ‘ScreenSetCursorPosition’: protocol-xiwarppointer.c:71:53: warning: declaration of ‘screen’ shadows a global declaration [-Wshadow] Signed-off-by: Peter Hutterer commit bd91b05b631f13afd1f7a9d6cbc4f0c5408b523a Author: Keith Packard Date: Wed Dec 19 12:47:35 2012 -0800 Update to version 1.13.99.901 (1.14 RC1) Signed-off-by: Keith Packard commit 2a0b544f5c09f79e4ab04ea8103a5ecf59ee2e7b Merge: 0eb1559eb ba4bb3bc1 Author: Keith Packard Date: Wed Dec 19 12:26:00 2012 -0800 Merge remote-tracking branch 'jeremyhu/master' commit 0eb1559eb29d11e63c2b33e317590a88d86fe313 Merge: 386e4d76b ea1d76d1b Author: Keith Packard Date: Wed Dec 19 12:21:31 2012 -0800 Merge remote-tracking branch 'yselkowitz/master' I checked this patch with diff -w to check that it only affected whitespace. commit 386e4d76baaffe226d2d561ff936509454eb0ac2 Merge: 014a5c8a9 9ff2e8315 Author: Keith Packard Date: Wed Dec 19 12:17:59 2012 -0800 Merge remote-tracking branch 'alanc/master' commit 014a5c8a9d86f2f992183bff9106354fac2c3b0e Merge: f793b5fd3 2eefa5d6e Author: Keith Packard Date: Wed Dec 19 12:09:31 2012 -0800 Merge remote-tracking branch 'whot/barriers' Conflicts: Xi/xichangehierarchy.c Small conflict with the patch from Xi: don't use devices after removing them Was easily resolved by hand. Signed-off-by: Keith Packard commit 9ff2e831517875f96477862f979abff394e8d551 Author: Alan Coopersmith Date: Tue Dec 18 00:41:08 2012 -0800 EnableDisableExtensionError: Use ARRAY_SIZE rather than sentinel d785368e0e converted the other miinitext functions to use ARRAY_SIZE, and removed the sentinel, but missed EnableDisableExtensionError so passing an invalid extension name could cause the server to walk off the end off the list looking for a sentinel that wasn't there. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit ba4bb3bc1b87eb57cc34d2ad1f302c9d2a15c847 Author: Jeremy Huddleston Sequoia Date: Tue Dec 18 01:29:12 2012 -0800 XQuartz: Don't add the 15bit visual any more Mountain Lion only supports 32bit backing stores, so don't use 15bit visuals until libXplugin adapts Signed-off-by: Jeremy Huddleston Sequoia commit c298f9c42ec05486ac88fc91a84739d7c3e3ea9e Author: Jeremy Huddleston Sequoia Date: Tue Dec 18 01:28:02 2012 -0800 XQuartz: Revert some unfortunate auto-indenting mishaps with our super-nested for-loops Signed-off-by: Jeremy Huddleston Sequoia commit 07a91fa6c6d535f3f05d4c3bd9c4d2b8c382c475 Author: Rob Clark Date: Wed Dec 5 23:21:27 2012 +0000 hw/dmx: fix build without GLX Fixes this compile break that showed up on arm recently: dmxinit.c:746:26: error: 'glxSupported' undeclared (first use in this function) dmxinit.c:746:26: note: each undeclared identifier is reported only once for each function it appears in Signed-off-by: Rob Clark Reviewed-by: Alex Deucher commit 5692a1e8f5befd3698134b1a5516a4dadda00115 Author: Alan Coopersmith Date: Thu Dec 6 16:15:50 2012 -0800 Support compilers with alternate spellings of typeof The AC_C_TYPEOF adds a #undef typeof to its autogenerated config.h.in template, but b8ab93dfbc7f292 didn't copy that to dix-config.h.in when HAVE_TYPEOF was, so the macro could claim typeof support but not make it work, when used with compilers like Solaris Studio 12.1 which only recognize it as __typeof__. Signed-off-by: Alan Coopersmith Acked-by: Peter Hutterer commit f793b5fd3eb16a2ada130367c2ffebeede69a322 Author: Peter Hutterer Date: Tue Dec 11 13:36:02 2012 +1000 dix: don't copy the wrong event mask when activating a passive grab GrabMask is a union of core, XI1 and XI2 masks. If a XI2 grab is activated, the value is a random pointer value, using it as mask has unpredictable effects. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre Reviewed-by: Keith Packard commit dd3242c87a0a58cba055eb99c0c3fcf03153e4b8 Author: Peter Hutterer Date: Fri Dec 14 11:34:15 2012 +1000 dix: don't allow overriding a grab with a different type of grab (#58255) If a client has a core grab, don't allow re-grabbing with type XI2, etc. This was the intent of the original commit xorg-server-1.5.99.1-782-g09f9a86, but ineffective. X.Org Bug 58255 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2eefa5d6e870c57ac6a5930883d8cfe3a3882a43 Author: Peter Hutterer Date: Thu Dec 13 14:42:32 2012 +1000 Xi: if a MD is removed, send a barrier leave event (if applicable) Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit e2423b627ef7e4d08ea0685af5e771ddd2b511ce Author: Peter Hutterer Date: Thu Dec 13 14:04:13 2012 +1000 Xi: don't store the window pointer in barriers, store the window ID When a client shuts down and resources are being freed, the window may have been freed already, so accessing it to get the window ID is bad. Plus, we never care about the window anyway other than for stuffing it into the event. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit f71c2f895c9e2f9d0d42feaac2a3e1d2deb71f67 Author: Peter Hutterer Date: Wed Dec 12 15:41:32 2012 +1000 Xi: fix per-device barrier handling Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 58bff17e43a80eb21b3ff6d4bb1596230e61f707 Author: Peter Hutterer Date: Thu Dec 13 11:49:54 2012 +1000 Xi: don't use devices after removing them RemoveDevice() frees the DeviceIntPtr, we shouldn't use the pointer after that Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 3420a7778c7d5eaa638327f31dd460554c257bb1 Author: Peter Hutterer Date: Wed Dec 12 11:02:19 2012 +1000 xfree86: print message to the log when zapping the server Signed-off-by: Peter Hutterer Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit 6d508b81857edaed03c7ee06410434ea56d9b701 Merge: d982d8774 bb6f3514c Author: Keith Packard Date: Mon Dec 17 11:45:45 2012 -0800 Merge remote-tracking branch 'whot/for-keith' I've looked at these patches, but I can't say I've actually reviewed them... commit d982d877436377597b8ed04bca1438d2edaf53ee Merge: da3eaf6bd 6b4aa8a35 Author: Keith Packard Date: Mon Dec 17 10:56:12 2012 -0800 Merge remote-tracking branch 'airlied/for-keithp' commit da3eaf6bdbd7ce3bebf2c490cbe2448b4c402dba Author: Dave Airlie Date: Mon Dec 17 15:40:17 2012 +1000 glx/dri2: initialise api to avoid indirect rendering failing randomly Running glxinfo under indirect rendering would randomly fail against the intel driver, as it would create a context with no attribs, and then the api value would be passed to the driver uninitialised. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit cc10ac8f0e07854647e1fd7cc70b7e9f8d919fd1 Author: Peter Hutterer Date: Mon Dec 10 11:00:46 2012 +1000 Xi: fix swapping for barrier events Protocol events don't contain pointers, so it's easier to copy everything over, then swap in-place. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 151d44149a09dd125e25b3d94f22a609f0221548 Author: Peter Hutterer Date: Mon Dec 10 10:53:49 2012 +1000 Xi: swap sequence number and evtype in barrier events Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit d4065493b211e90b46f9d4178f23f347afd8043f Author: Peter Hutterer Date: Mon Dec 10 11:02:32 2012 +1000 tests/xi2: at protocol conversion test for barrier events Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 938187f2fec006daf4cc677df26d5b0b6999b54b Author: Peter Hutterer Date: Fri Dec 7 15:55:59 2012 +1000 Require inputproto 2.2.99.1 Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 78376a9217058aa66e52a0399fc2be469d70ce32 Author: Peter Hutterer Date: Fri Dec 7 09:26:13 2012 +1000 mi: rename mipointer's internal event list Avoid name shadowing warnings, change the event list to a more specific name. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 88a2cccc37cac4e171f9bfc020017ddfa66ae417 Author: Peter Hutterer Date: Fri Dec 7 09:11:13 2012 +1000 Xi: if the device is currently grabbed, flag the barrier event Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 353aa515922e1095047161ec47a2722772218f20 Author: Peter Hutterer Date: Thu Dec 6 15:09:27 2012 +1000 Xi: deliver barrier events as grabbed events where necessary If the grab_window is the barrier window and the client owns the grab, deliver as normal grabbed event (respecting owner_events). Otherwise, deliver as usual. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 3b161401700a2d916da0f81f99b39e75fdbe78df Author: Peter Hutterer Date: Thu Dec 6 14:13:26 2012 +1000 dix: ignore barrier events in FixUpEventFromWindow Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit a1eeb6fbecf0bd9665a9158b27c273e83b3ab351 Author: Peter Hutterer Date: Thu Dec 6 13:25:29 2012 +1000 dix: handle barrier events properly when converting to core/XI 1.x Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 1b83775f6712a7e48c49a3411a87103e8e906e67 Author: Peter Hutterer Date: Thu Dec 6 12:39:04 2012 +1000 dix: skip delivery if it's not the right pointer barrier client Only deliver to the client that created the barrier, not to other clients. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit c50db6faba4ee1c27b735c6e9c98a4276ba3c7ff Author: Peter Hutterer Date: Thu Dec 6 12:58:55 2012 +1000 Xi: fill in barrier root x/y after clamping to RandR outputs x/y for barrier events should contain the actual pointer position. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 21a15f9a04ec0a6c8f654eef943561e98db2475d Author: Peter Hutterer Date: Mon Dec 3 10:41:16 2012 +1000 Pass the event list through to the pointer barrier code to return it Instead of having the pointer barrier code enqueue events separately from GetPointerEvents, pass the event list through and let it add to it. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 707b4dc61f18960611409ef5ad8947be189f7296 Author: Jasper St. Pierre Date: Tue Nov 27 15:31:52 2012 -0500 barriers: Support line and ray barriers This allows clients to add barriers that extend to the edge of the screen. Clients are encouraged to use these instead of precise coordinates in these cases to help prevent pointer leaks. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 0a5a0d7c242add4d79721c1b90073b603a475534 Author: Jasper St. Pierre Date: Tue Nov 27 14:29:52 2012 -0500 barriers: Replace complex intersection test with simpler math Since barriers are axis-aligned, we can do the intersection test with simple interpolation rather than line-segment intersection. This also helps us out in the future when we want the barriers to extend to be rays and lines rather than just segments. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 6401317bdcf58b2717214ac65c8f47b0c384a7db Author: Jasper St. Pierre Date: Sun Dec 9 19:45:48 2012 -0500 barriers: Send an XI_BarrierLeave event when a barrier is destroyed This ensures that we always complete an event sequence. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 207e8dee00dd26ff4363edb72058b48b8a76b824 Author: Jasper St. Pierre Date: Sun Dec 9 19:44:13 2012 -0500 barriers: Clean up code Rename a variable. This is to make the diff in the next commit cleaner. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 7fabecd8e3efe76caeb740d905a02ae4256e3246 Author: Jasper St. Pierre Date: Wed Dec 5 19:58:05 2012 -0500 barriers: Send a BarrierLeave event when we leave the hitbox Additionally, add flags when the pointer is released. Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit dac9e13a6c874f3b99ba4cf9085ed0e63beb0871 Author: Jasper St. Pierre Date: Mon Nov 26 20:37:56 2012 -0500 barriers: Increment event ID on hit box leave We eventually want to send a new notify event on hitbox leave, which signifies the dawn of a new barrier event ID, so it's convenient if we can put the code here. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit e3a734d081ebda4460e6c1eb7dcdd0f7c10ba9b4 Author: Jasper St. Pierre Date: Sat Nov 24 21:42:56 2012 -0500 barriers: Add a couple pixels of elbow room for the hit detection Pointers (and the hands that drive them) aren't very precise, and the slightest amount of nudging to either side might be enough to reset the event ID, making clients think they have an entirely new hit. Allow for a slightly bigger "hit box" before these barriers get reset. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit 3b2fbcfa6c75ab072926ab9659adf785b324ce28 Author: Jasper St. Pierre Date: Thu Nov 8 01:17:40 2012 -0500 barriers: Add support for edge cases when releasing barriers If we release a barrier, we want to ensure that we block all other barriers afterwards, rather than capping the limit to the two nearest barriers. Signed-off-by: Jasper St. Pierre Reviewed-by: Jasper St. Pierre commit a1ee26e624e6a7030ecb37a608190cb8e3d1f65b Author: Peter Hutterer Date: Thu Dec 6 12:06:28 2012 +1000 barriers: Don't allow releasing the pointer on other client's barriers Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit 2884b249294e3e8fc749bbb81e2a897314fa0818 Author: Peter Hutterer Date: Thu Dec 6 11:59:53 2012 +1000 barriers: Don't allow destroying other client's barriers Signed-off-by: Peter Hutterer Reviewed-by: Jasper St. Pierre commit e130a46ab45839f91b29ee75bf19a597dfe3da28 Author: Jasper St. Pierre Date: Thu Nov 1 16:06:40 2012 -0400 Add support for XI2.3: Pointer barrier events and releases. This adds support for clients that would like to get a notification every time a barrier is hit, and allows clients to temporarily release a barrier so that pointers can go through them, without having to destroy and recreate barriers. Based on work by Chris Halse Rogers Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 85a37ddcc2ff49adaec4075532b60e7d015f901c Author: Jasper St. Pierre Date: Sun Dec 9 22:48:18 2012 -0500 barriers: Reindent the constrainment hook This is to make future diffs much cleaner. Best viewed with -w. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 97da74c80e8b8eb03f7c1e34180cf5cd343bd608 Author: Jasper St. Pierre Date: Sun Dec 9 22:19:14 2012 -0500 barriers: Switch to finding the nearest barrier client When we add events, we eventually want to add more state to the PointerBarrierClient, so return one of these instead of the dummy public structure that's not very interesting. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 7e16dd3628334a5991b6713d778a46c1ce3b8b78 Author: Jasper St. Pierre Date: Sat Nov 24 19:39:47 2012 -0500 barriers: Switch to an explicit hook for barrier constrainment Rather than riding on the ConstrainCursorHarder hook, which has several issues, move to an explicit hook, which will help us with some RANDR interaction issues. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 2868a93945f043e1efd897d56543fe673e341faf Author: Jasper St. Pierre Date: Sun Dec 9 18:41:52 2012 -0500 barriers: Don't loop over the server to destroy a barrier This is completely pointless as far as I can tell. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit 482e0cb35225dc3b0664f9429db19c61b0c98ef6 Author: Jasper St. Pierre Date: Thu Nov 1 14:14:13 2012 -0400 cursor: Move pointer barrier code over to XI In order to send events to specific windows associated with the barrier, we need to move the code that handles barriers to somewhere where it's easier to construct and send events. Rather than duplicating XSync with its XSyncSelectAlarm, re-use the existing XI infrastructure. For now, just move a bunch of code over, rename some things, and initialize the new structures, but still consider it a separate codebase. Pointer barrier requests are still handled by XFixes, so this is a weird intermediate state. It's unknown whether we'll add explicit requests to pointer barriers inside XI. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer commit bb6f3514ca17d993c1af380e8d4480d61e5bbcae Merge: f961c3a3b 08da994a0 Author: Peter Hutterer Date: Wed Dec 12 17:25:28 2012 +1000 Merge branch 'stack-smash-on-touchpoint' into for-keith commit f961c3a3b9dfbe1201da317c24797ba7f979731e Merge: 36740d02b 39f19b3f3 Author: Peter Hutterer Date: Wed Dec 12 17:25:23 2012 +1000 Merge branch 'touch-selection-conflict-fixes' into for-keith commit 39f19b3f3b8c9b714e70e339dfb0083ff629ab2a Author: Peter Hutterer Date: Tue Nov 20 11:48:31 2012 +1000 Xi: fix touch event selction conflicts (#57301) There are limits on which client may select for touch events on a given window, with restrictions being that no two clients can select on the same device, but narrower selections are allowed, i.e. if one client has XIAllDevices, a second client may still select for device X. The current code had a dependency on which client selected first and which device, resulting in inconsistencies when selecting for events. Fix that, responding with the right errors regardless of who selected what first. X.Org Bug 57301 Signed-off-by: Peter Hutterer commit a7c97d737ef0d14ec97869082decd049637cfe7a Author: Peter Hutterer Date: Tue Nov 20 11:38:39 2012 +1000 dix: split xi2_mask_isset into a per-device function For touch selection conflicts, we need to check not only if the mask is set for the device, but if it is set for only that specific device (regardless of XIAll*Devices) Signed-off-by: Peter Hutterer commit 08da994a08bb74afae81176c56fb525d0439274b Author: Peter Hutterer Date: Mon Nov 26 12:33:29 2012 +1000 dix: add FIXME, TouchRemovePointerGrab does nothing Signed-off-by: Peter Hutterer commit 00def5144557cfe8bf535f926212a8e084dc7cf6 Author: Peter Hutterer Date: Mon Nov 26 14:55:13 2012 +1000 Xi: if a TouchEnd appears on a actively grabbing client, always accept Once the TouchEnd appears on the device, the touch is done. If the client still has a pointer grab, accept it to avoid clients with TouchOwnership selections to wait indefinitely for the actual touch event. Signed-off-by: Peter Hutterer commit ece8157a59751b3ed492fb2e1eb8d5f20221e195 Author: Peter Hutterer Date: Mon Nov 26 15:14:19 2012 +1000 dix: when deactivating pointer-only grabs, don't emulate TouchEnd events A client with a pointer grab on a touch device must reject the touch when detactivating the grab while the touch is active. However, such a rejecting must not trigger a ButtonRelease event to be emulated and sent to the client. Set the grabbing listener's state to HAS_END, so we simply skip delivery to that client. Signed-off-by: Peter Hutterer commit bc1f90a615018c05994fae3e678dd2341256cd82 Author: Peter Hutterer Date: Mon Nov 26 12:23:54 2012 +1000 dix: only reject active grabs on ungrab and do it before actually ungrabbing An active grab ungrabbing is the same as rejecting the grab, since the client is no longer interested in those events. So reject any touch grab, but do so before actually deactivating since we're interested in the TouchEnd for the current grabbing client. A passive grab otoh is _not_ like rejecting a grab, since it deactivates automatically when the touch ends. Signed-off-by: Peter Hutterer commit 146f48c2934fc85ec095496da5c8f0102bc7f5b5 Author: Peter Hutterer Date: Thu Nov 22 13:49:34 2012 +1000 dix: don't call ProcessInputEvents() when accepting/rejecting touches TouchListenerAcceptReject may be called during normal event processing, but ProcessInputEvents is not reentrant and calling it here smashes the event queue. Signed-off-by: Peter Hutterer commit ead21f9426122536adfb4787ac181008ae83cd4b Author: Peter Hutterer Date: Mon Nov 19 16:16:10 2012 +1000 Xi: fix typo "mechansims" → "mechanisms" Signed-off-by: Peter Hutterer commit 6b4aa8a359822cc70666de3b18744f05dd9b5f45 Author: Dave Airlie Date: Wed Dec 12 12:56:46 2012 +1000 Revert "xf86: Fix non-PCI configuration-less setups" This reverts commit 76d9c62eb2be2010a19bf36285012d086cdd180b. This breaks multi-GPU setups here, so lets drop it for now. Signed-off-by: Dave Airlie commit 785af88ab0120036e0ce3d0139f3c560ff71e10b Author: Dave Airlie Date: Wed Sep 26 16:16:40 2012 +1000 dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5 This commit regresses dri1 since it moves the drmSetServerInfo from being called at module load time to extension init time. However DRIScreenInit relies on this being called before it gets control. This patches moves the call into DRIScreenInit and seems to work here. Signed-off-by: Dave Airlie commit 36740d02b9ca117f1404e077367fbbbe271a17d6 Author: Daniel Martin Date: Fri Dec 7 19:38:55 2012 +0100 xfixes: Fix minor number in QueryVersion Due to a typo the major version number was passed as minor version to version_compare(). Regression-from: ffd4874798ba54f86acac75779a15b4babeaa5f3 Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit b34cffd27b9ef46e1dd477219cbb90e36d5609e3 Author: Peter Hutterer Date: Mon Dec 3 11:39:08 2012 +1000 include: fix comment Signed-off-by: Peter Hutterer commit ea1d76d1b68c7cbcedcaa1f967c5027e0cc1c7a2 Author: Yaakov Selkowitz Date: Mon Nov 5 23:50:58 2012 -0600 Fix formatting of address operators The formatter confused address operators preceded by casts with bitwise-and expressions, placing spaces on either side of both. That syntax isn't used by ordinary address operators, however, so fix them for consistency. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 5daa442fe15d9a87112a2def673c99a5f2506dcf Author: Peter Hutterer Date: Tue Dec 4 15:28:14 2012 +1000 xkb: only post a XTest release if the XTest device has the button down Signed-off-by: Peter Hutterer commit c4fee9d2ecd6fdd4c05b04c9f02b23f10f2938b8 Author: Peter Hutterer Date: Tue Dec 4 15:03:37 2012 +1000 xkb: always post XTest button up when the physical button released (#28808) Regression introduced by commit 2decff6393a44b56d80d53570718f95354fde454 xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP XTest buttons must be released when a physical button is released. This was fixed in 14327858391ebe929b806efb53ad79e789361883, but 2decff6393a44b56d80d53570718f95354fde454 changed a condition that this code didn't get triggered anymore. "dev" for pointer events is now always the VCP which doesn't have a xkbi struct. So move this condition out and always trigger the XTest released for button events. Signed-off-by: Peter Hutterer Tested-by: Frank Roscher commit b51a1bd2766e7dc975ca8f1cacc3f8bd0e1a68a3 Merge: e9ea96d6a ce6b65292 Author: Keith Packard Date: Fri Nov 30 09:31:46 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit e9ea96d6a88f197928c82b008953f1810de6f792 Author: Dave Airlie Date: Fri Nov 30 20:54:38 2012 +1000 randr: call RRProviderInit in the proper place. No idea where this got lost across development cycles, but its definitely missing. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=57448 Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit ce6b6529290f7d42717aad3fd8a83aaaaf8962de Merge: 6e18599d6 3b9f1c701 Author: Peter Hutterer Date: Thu Nov 29 14:49:22 2012 +1000 Merge branch 'high-resolution-touch-devices' into for-keith commit 6e18599d691036eca6ff082c17727d9ffb926984 Author: Sybren van Elderen Date: Tue Nov 27 19:27:10 2012 +0100 hw/dmx: add update_desktop_dimensions() call The Xdmx server did not update the desktop dimensions when computing screen origins. Signed-off-by: Sybren van Elderen Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 59d70b30e93f8be93db9e873423353f7e4419811 Author: Peter Hutterer Date: Fri Nov 23 10:05:02 2012 +1000 dix: use pixman for fp1616 conversions Signed-off-by: Peter Hutterer Reviewed-by: Søren Sandmann > commit 2c4388a00ec308bc2d48ba751ff510cd5c1b2384 Author: Peter Hutterer Date: Tue Jun 26 10:30:35 2012 +1000 xkb: fill in keycode and event type for slow keys enablement eventType is set for the type that triggered a XkbControlsNotify event. Technically, SlowKeys is triggered by a timer which doesn't have a matching core event type. So we used to use 0 here. Practically, the timer is triggered by a key press + hold and cancelled when the key is released before the timeout expires. So we might as well set KeyPress (keycode) in the ControlsNotify to give clients a chance to differ between timer-triggered SlowKeys and client-triggered ones. This is a chance in behaviour, though I suspect with little impact. Signed-off-by: Peter Hutterer Acked-by: Daniel Stone commit 2dc6d9228456cbc274a1fcea478258e5ae4dc629 Author: Peter Hutterer Date: Thu Nov 15 14:00:57 2012 +1000 When resetting device idle time, reset XIAll(Master)Devices too (#56649) When the screen saver is forcibly deactivated, the idle time counter is reset for all devices but not for the fake XIAllDevices and XIAllMasterDevices. XScreenSaverQueryInfo uses XIAlldevices to fill the "idle" field, thus returning the wrong value. Regression introduced in commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 Author: Peter Hutterer Date: Mon Mar 12 13:51:02 2012 +1000 Change lastDeviceIdleTime to be per-device X.Org Bug 56649 Signed-off-by: Peter Hutterer Tested-by: Giacomo Perale Reviewed-by: Keith Packard commit a51b2c3913fc8556f6bd1c76805d045fc424c4bb Author: Jasper St. Pierre Date: Tue Nov 20 14:50:41 2012 -0500 cursor: Revise edge cases for the pointer moving towards barriers Since barriers block the invisible line between pixels, that means that we need to explicitly check the boundaries, or else we'll have a potential off-by-one error. This fixes issues when trying to move down or right across a barrier and having the pointer visibly bounce. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0b198248ecfbcb7e7c61688145be4005366da23d Author: Thierry Reding Date: Thu Nov 8 14:28:10 2012 +0100 Remove call to miInitializeBackingStore() Recent versions of the X server no longer provide this function, which has been obsolete for over 2 years now. Signed-off-by: Thierry Reding Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 739d6c067a9167226ce248aa82997bfc2cca7259 Author: Thierry Reding Date: Thu Nov 8 14:28:09 2012 +0100 build: Put m4 macros in m4 subdirectory This silences a warning from libtoolize when running the autogen.sh script. Signed-off-by: Thierry Reding Signed-off-by: Dave Airlie commit 1712a45422a63f11b2146541279616fcfda09ec6 Merge: e54f71a2c 338bec300 Author: Keith Packard Date: Wed Nov 28 07:54:13 2012 -0800 Merge remote-tracking branch 'jturney/mingw-patches' commit 338bec30054bb5d41cb6fdb5d37439f3c8124cad Author: Yaakov Selkowitz Date: Fri Nov 9 12:19:31 2012 -0600 hw/xwin: Fix for MinGW-w64 DirectDraw headers mingw-w64 headers handle NONAMELESSUNION earlier than mingw.org's, so it must be defined before including any headers. It also provides a ddraw.h, so use it. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Keith Packard commit fb170498abc746a850864b59db2ddcba7ee29215 Author: Jon TURNEY Date: Tue Nov 13 13:22:44 2012 +0000 dix/dispatch.c, os/utils.c: Disable smart scheduler on WIN32 setitimer() and SIGALRM aren't available on WIN32, so smart scheduler code cannot be built. Provide only stubs for smart scheduler timer code, and disable smart scheduler by default. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit b20d2998cd9a1320ef0e45ab6b741c7e25f646e0 Author: Ryan Pavlik Date: Thu Nov 3 19:25:57 2011 -0500 os/osinit.c: no getpgrp() and setpgrp() on WIN32 Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit 2c712d094a49de0b96e2e9f5bcc1043b54ad0f61 Author: Yaakov Selkowitz Date: Sun Oct 14 23:05:30 2012 -0500 hw/xwin: use raise() instead of kill() MinGW doesn't have kill(), so use raise() instead Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Keith Packard commit 98d5acc1213b2ec71c2a7bd3a3b77a1b5536e963 Author: Jon TURNEY Date: Fri Aug 17 13:43:29 2012 +0100 os/utils.c: Fix compilation of OsBlockSIGIO when SIGIO isn't defined Fix compilation of OsBlockSIGIO with -Werror=return-type when SIGIO isn't defined. /jhbuild/checkout/xorg/xserver/os/utils.c: In function 'OsBlockSIGIO': /jhbuild/checkout/xorg/xserver/os/utils.c:1248:1: error: control reaches end of non-void function [-Wreturn-type] v2: Shuffle around to avoid writing unreachable code Signed-off-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit 8e2bac0a69173b51e17a39d70e1d154b47fd0139 Author: Ryan Pavlik Date: Fri Apr 20 13:46:21 2012 +0100 os/osinit.c, os/utils.c: Exclude sigaction code when building for MinGW MinGW doesn't have sigaction, so this patch is needed for building. No attempt is made to actually install the fatal error signal handler, as MinGW will simply terminate the process rather than deliver a fatal signal. Also avoid using strsignal Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Keith Packard commit e54f71a2c7a1677a5c5032d1e7dc099d5204144b Author: Chris Wilson Date: Sat Nov 10 10:26:08 2012 +0000 xf86: select a fake output for headless servers Following commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 Author: Keith Packard Date: Mon Sep 10 11:14:20 2012 +1000 xf86: fix compat output selection for no output GPUs headless servers can no longer startup as we no longer select a compat output for the fake framebuffer. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56343 Signed-off-by: Chris Wilson Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 76d9c62eb2be2010a19bf36285012d086cdd180b Author: Thierry Reding Date: Wed Oct 17 12:06:47 2012 +0200 xf86: Fix non-PCI configuration-less setups For non-PCI video devices, such as those found on many ARM embedded systems, the X server currently requires the BusID option to specify the full path to the DRM device's sysfs node in order to properly match it against the probed platform devices. In order to allow X to start up properly if either the BusID option was omitted or no configuration is present at all, the first video device is used by default. Signed-off-by: Thierry Reding Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit d50a94568e06a06df682a0028579d37a7b209d15 Merge: 87b60efb8 cf05db8dd Author: Keith Packard Date: Tue Nov 27 15:14:26 2012 -0800 Merge remote-tracking branch 'daniels/master' commit 87b60efb859d86fd9e96306112bc5453a549fa69 Author: Colin Harrison Date: Sun Sep 2 22:39:32 2012 +0100 hw/xwin: Don't spam MotionNotify events when the mouse hasn't moved Don't spam MotionNotify events when the mouse hasn't moved, when polling the mouse position outside any X window (Test with 'xev -root' after mouse polling has started.) Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 886f4c389266bf759414f15a5e25e50b5935dc9d Author: Jon TURNEY Date: Mon Jun 25 15:58:21 2012 +0100 hw/xwin: Don't log all fbConfigs and GL/WGL extensions Don't log all fbConfigs and GL/WGL extensions, unless verbose logging is requested Log the number of pixelFormats which gave rise to the fbConfigs Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9b10f20f472e6b0d6114fb61c88906e349e47f2b Author: Jon TURNEY Date: Fri Feb 10 13:36:46 2012 +0000 hw/xwin: Use pre-computed extent of damage for creating GDI region When -clipupdates option is specified, use the pre-computed extent of damage, rather than computing a GDI region which combines all the individual boxes in the damage. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3ab95a2a5c848e8ce4c39be243fd5e2ac6bb1c1a Author: Jon TURNEY Date: Fri Feb 24 15:32:26 2012 +0000 hw/xwin: Ensure we own the clipboard before checking the format of it's contents Ensure we own the clipboard before checking the format of it's contents, this prevents the contents from changing underneath us. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a4f357c620ae9e2270316197a61fb8e1d5183a51 Author: Colin Harrison Date: Mon Apr 9 15:48:08 2012 +0100 hw/xwin: Disable minimize button on window with skip-taskbar state If a window has had its taskbar button removed, disable its minimize button to prevent it becoming lost Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit a2983452ee1e2051ab54cded7a3a7735be020db6 Author: Jon TURNEY Date: Wed Jul 8 17:48:03 2009 +0100 hw/xwin: Process _NET_WM_STATE_SKIP_TASKBAR hint in multiwindow mode. Set WS_EX_TOOLWINDOW style to hide window from Alt-Tab switcher Use ITaskBarList interface to ensure that the taskbar notices if the window has changed it's style in a way which affects if the taskbar shows it or not Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit de759cc38ccc8a7811923eb9620f01301aedc10e Author: Jon TURNEY Date: Sun Feb 5 17:57:04 2012 +0000 hw/xwin: Add a simple interface to the ITaskbarList COM interface Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 19d875187a113ca7772a770767ea2ceb2ade5a43 Author: Jon TURNEY Date: Wed Jan 4 17:40:14 2012 +0000 hw/xwin: Enable RANDR resize by default Also fix erroneous use of '--resize' not '-resize', and document '-noresize' in man page Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 444580673221bf3f89dfa3cbc518b5ed4ecabc23 Author: Yaakov Selkowitz Date: Sat Dec 31 22:11:18 2011 -0600 hw/xwin: Enable AIGLX by default Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 11bb32e561b3f1c657a99b3902f9beea786babbb Author: Oliver Schmidt Date: Sun Jan 8 20:30:02 2012 +0000 hw/xwin: Restore non-latching modifier key state when an X window gains focus In multiwindow mode, the state of the modifier keys was lost when a window is created (or raised) and focus moved to that window. For example: In window A Ctrl + some key opens a window B, then in window B Ctrl + some other key triggers the next action. However after the opening of window B the Ctrl key has to be released and pressed again. If the user keeps the Ctrl key held down when the window B is opened, the next key press X will be interpreted as X and not as Ctrl+X. Extended the function winRestoreModeKeyStates in winkeybd.c to consider not only the latching modifier keys but also the modifiers Ctrl, Shift, Alt/AltGr by using the Windows function GetAsyncKeyState. A combined Ctrl+AltGr modifier state cannot be restored correctly, as Windows always fakes a Ctrl-L when AltGr is pressed. Signed-off-by: Oliver Schmidt Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47291d0b7d7bfee74156f83badae15a0818c68ad Author: Jon TURNEY Date: Mon Nov 5 14:54:51 2012 +0000 hw/xwin: Give our logical xor operator a more logical name Also, rather than a comment about why we need a logical operator, let's have a comment about what we are doing to the keyboard state... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8aa27ae82109e4fab0ff3ed86ad1d152438a2585 Author: Tobias Häußler Date: Mon Jul 18 14:48:23 2011 +0100 hw/xwin: Add correct taskbar grouping of X windows on Windows 7 I created a small patch for XWin that adds correct grouping of taskbar icons when 'Always combine, hide labels' is set in the taskbar properties. It uses the new taskbar APIs introduced in Windows 7 to set an application id for each window. The id is based on the X11 class hints. v2: Add file to _SOURCES to fix distcheck v3 : Fix compilation with mingw-w64 w32api headers Include propkey.h, propsys.h rather than defining necessary stuff ourselves v4: Fix up names taskbar->propertystore, AppID->AppUserModelID, etc. Link directly with ole32 for PropVariantClear(), prototyping it if neccessary. v5: Put winSetAppUserModelID()-related code in a separate file. Drop a superfluous assign to hr of ignored HRESULT of SetValue() Signed-off-by: Tobias Häußler Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit f3aef7f9561d2723da0d1438a8b276b77a1e672e Author: Jon TURNEY Date: Sun Sep 2 16:04:25 2012 +0100 hw/xwin: Fix function name in log message Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 127a7068b75258d396776cc101aba0bef10a5cef Author: Jon TURNEY Date: Thu Apr 14 23:10:23 2011 +0100 hw/xwin: Allow XScreenSaverSuspend() to effect Windows screen saver or monitor power off Reset the idle timer in the block handler if screenSaverSuspended is set. This isn't quite a complete solution. We should also set the block timeout to something less than the idle timer timeout to ensure we will reset the idle timer before it times out if we are blocking. The idle timer timeout is presumably the first one to expire of the screen saver activation or monitor low power or power down timeout, depending on configuration. Unfortunately this is probably not straightforward to do. Whilst SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT) is portable, apparently SPI_GETLOWPOWERTIMEOUT and SPI_GETPOWEROFFTIMEOUT are not supported by Windows versions 6.0 or later, and the interface for discovering equivalent value is complex. This doesn't matter in the case where a media player or similar application is the one making the XScreenSaverSuspend() requests, as it will be continuously drawing, causing the X server to become unblocked often. In the case where slide show presentation application or similar is the one making the XScreenSaverSuspend() request, this might be a problem. Since "Powerpoint is Evil" [1], I think we'll leave it like this till someone complains :-) [1] http://www.edwardtufte.com/tufte/books_pp v2: conditionalize on SCREENSAVER Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 190f165317c4a58adf38e3e32acfe7cf04850e91 Author: Jon TURNEY Date: Mon Nov 5 13:02:46 2012 +0000 hw/xwin: Avoid logging an extra blank line if BUILDERSTRING is empty Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit ef9dbea24f5ce7e1e400463ab2a333076d98a28e Author: Jon TURNEY Date: Wed Aug 31 20:57:05 2011 +0100 hw/xwin: Report which drawing engines are being enabled when checking for support Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5824166256c8e96c91e225f4ccb2b094b8fb045b Author: Jon TURNEY Date: Fri Mar 12 14:38:51 2010 +0000 hw/xwin: Show any fatal error message Report the fatal error message in the dialog we pop up, rather than just referring the user to the logfile. v2: Do this a better way since the "Pass the FatalError message to OsVendorFatalError" patch has landed, and OsVendorFatalError() now gets passed the fatal error message Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cf05db8ddec948d907915e1c9569d743e8771def Author: Sjoerd Simons Date: Tue Oct 30 17:02:58 2012 +0100 Ephyr: Find the right host screen when embedded When Xephyr is embedded into another application (e.g. in xoo), the input events may come from the parent Window instead of our own. So make sure we find the host screen in that case as well instead of crashing. Signed-off-by: Sjoerd Simons Reviewed-by: Daniel Stone commit ac1a60e7b6f06fd075cc5bf55d6bc67206a01d29 Author: Raphael Kubo da Costa Date: Fri Nov 16 19:51:58 2012 +0200 vfb: Initialize the GLX extension again. This should fix a regression in the 1.13.0 release: commit 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 removed a code path used by Xvfb and made it use the default one when initializing extensions. However, this meant the GLX extension was not initialized anymore since it is not part of the `staticExtensions' array. Since it is not possible to just add it to that array after commit aad428b8e21c77397c623b78706eb64b1fea77c9, adopt an approach similar to xwin's and xquartz's and initialize the extension from vfb's `InitOutput'. Signed-off-by: Raphael Kubo da Costa Reviewed-by: Daniel Stone commit 353b14ea77324b3f7b3ea29d6f03618fd9916d5f Author: Daniel Stone Date: Mon Nov 19 15:00:22 2012 +1100 DMX: Add DMX and GLX extensions Unfortunately this also got lost in the extmod fallout, leaving the DMX server not exposing the DMX or GLX extensions. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit 3556d43010f0a37bf30aa2e0ceee9a8bbcad311d Author: Daniel Stone Date: Mon Nov 19 15:29:34 2012 +1100 Constify extensions in LoadExtension users Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit db83830eef38a86a471378121213162da180537d Author: Daniel Stone Date: Mon Nov 19 15:28:07 2012 +1100 Constify argument to LoadExtension Since we never modify it. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer commit 3b9f1c701787965246638c1a6fd99fb2b6078114 Author: Yuly Novikov Date: Mon Nov 19 21:04:57 2012 -0500 dix: Save touchpoint last coordinates before transform. #49347 DDXTouchPointInfoRec.valuators used to store axis values after transform. This resulted in Coordinate Transformation Matrix being applied multiple times to the last coordinates, in the case when only pressure changes in the last touch event. Changed DDXTouchPointInfoRec.valuators to store values before transform. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=49347 Signed-off-by: Yuly Novikov Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d0fd592fc7be1706084923f43fa057e50122562c Author: Thomas Jaeger Date: Sat Oct 13 23:18:50 2012 -0400 Simplify GetTouchEvents With only one callee left, we are free to assume that !(flags & TOUCH_CLIENT_ID) Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fe59774c55e5d423633405e0869c22f4ce382548 Author: Thomas Jaeger Date: Sat Oct 13 23:08:27 2012 -0400 Don't use GetTouchEvents in EmitTouchEnd As before GetTouchEvents causes unwanted side effects. Add a new function GetDixTouchEnd, which generates a touch event from the touch point. We fill in the event's screen coordinates from the MD's current sprite position. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit cc79107a5b60d2926e16ddbee04149e8d5acc969 Author: Thomas Jaeger Date: Sat Oct 13 22:51:24 2012 -0400 Don't use GetTouchEvents when replaying events GetTouchEvents has plenty of side effects such as moving the pointer or updating the master device, which we don't want to happen when replaying. The only reason for calling it was to generate a DCCE event, but GetTouchEvents doesn't even do that right (we might need a DCCE event even when replaying a master event, or clients could interpret valuator data incorrectly). This discussion is moot at the moment anyway, since DeliverTouchEvents doesn't appear to deliver DCCE events. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer [Added call to processInputProc instead of direct call to DeliverTouchEvents] Signed-off-by: Peter Hutterer commit 90b177e5cbb9047453af426d2abfe9c0514fe866 Author: Thomas Jaeger Date: Sat Oct 13 22:43:26 2012 -0400 Update the MD's position when a touch event is received Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6a6c3afe71ac82a93d9fd0034dd5bbdcf0eae1ea Merge: 14c9e245b 6f145084d Author: Keith Packard Date: Sun Nov 18 21:50:20 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit 6f145084d5b9ca4a023dfc538a69bbf30edeac4a Author: Adam Jackson Date: Fri Nov 16 13:46:32 2012 -0500 linux: Prefer ioctl(KDSKBMUTE, 1) over ioctl(KDSKBMODE, K_OFF) K_OFF is a slightly broken interface, since if some other process (cough, systemd) sets the console state to K_UNICODE then it undoes K_OFF, and now Alt-F2 will switch terminals instead of summoning the Gnome "run command" dialog. KDSKBMUTE separates the "don't enqueue events" logic from the keymap, so doesn't have this problem. Try it first, then continue falling back to older methods. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=859485 Tested-by: Josh Boyer Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0ff1c77b17062a3a3ff520709ef719316bc1d8bb Author: Peter Hutterer Date: Fri Nov 16 14:21:47 2012 +1000 xfixes: let PointerBarrierClient->device_ids point to allocated memory "Fixed" up Jasper's original patch [1] to use pointers instead of zero-length arrays but didn't actually set the pointer to anywhere. [1] 9a536820f6174befb22431bab375ef1af0a1ec29 Signed-off-by: Peter Hutterer Reviewed-By: Jasper St. Pierre commit aa9a9ad08b8a6e7e95de7c2bf45d93dd50f9ca87 Author: Daniel Martin Date: Wed Nov 7 11:31:01 2012 +0100 Xi: Fix modifier swapping in XIPassiveGrabDevice XIPassiveGrabDevice uses a list of uint32_t as modifier sets. The ModifierInfo struct represents the current modifier states and is therefor used in XIQueryPointer and various events. Signed-off-by: Daniel Martin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aa9da5eae109154edf740a5c1eee4bf98e8fbd4f Author: Thomas Jaeger Date: Sat Oct 13 22:39:27 2012 -0400 remove init_event The function is identical to init_device_event from inpututils.c with the first two arguments swapped. Signed-off-by: Thomas Jaeger Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 710065da37b68a9ec7a0c9dc995247f39e3d01e9 Author: Daniel Stone Date: Mon Nov 5 15:58:25 2012 +1100 XKB: Remove component listing support No-one uses this - not xkbcomp, not GNOME, not KDE. The preferred way to deal with component listing (which gives you RMLVO rather than KcCGST) is to use the XML files on the client side. Indeed, a couple of hours after making this commit, it emerged that all *.dir files built with xkbcomp 1.1.1 (released two years ago) and later have been catastrophically broken and nearly empty. So I think that's reasonable proof that no-one uses them. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fd214aabf77c44ba0ca3fd438f0c3c8eb22c7211 Author: Peter Hutterer Date: Tue Nov 6 10:27:25 2012 +1000 input: drop FP1616 macro The double_to_f1616() functions do the same thing, and they're tested. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 14c9e245bae2447f0e57a3ea4daa8d2085fa8b8f Author: Jeremy Huddleston Sequoia Date: Sat Nov 17 11:52:10 2012 -0500 XQuartz: Opt-in to NSSupportsAutomaticGraphicsSwitching http://xquartz.macosforge.org/trac/ticket/668 Signed-off-by: Jeremy Huddleston Sequoia commit 011f8458805e443ac9130865d2840a929a00cabf Merge: 54ba26cb1 b4e44b285 Author: Keith Packard Date: Mon Nov 5 17:16:07 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit b4e44b285ed0eee1d06514215a4b01d54f40094b Author: Carlos Garnacho Date: Wed Oct 31 19:29:45 2012 +0100 Xi: Set modifier mask on touch events Button mask should be out-of-band with the emulated pointer events as touch devices don't truly have "buttons". Even though, it's handy to have the modifier mask from the paired keyboard on touch events. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 863f32c930d71073ee5f78452b78bd459d024867 Author: Carlos Garnacho Date: Wed Oct 31 19:32:57 2012 +0100 Xi: Update the device after delivering the emulated pointer event(#56558) Ensure emulated pointer events contain the state that applies before the event was processed, so the device state must be updated after delivering such emulated events. Co-authored-by: Peter Hutterer Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9a536820f6174befb22431bab375ef1af0a1ec29 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:46 2012 -0400 cursor: Fix up implementation for per-device barriers Support multiple mast devices being specified as a parameter to the barrier. This should implement all parts of the XFixes specification, minus the existing non-specification detail where specifying no devices is the same as specifying XIAllDevices. Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 944213bbc7099f1e0238f39973653d459efdc2c9 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:45 2012 -0400 cursor: Clean up barrier finding code a bit The current code manually unrolls the loop, by finding a barrier, clamping it, and then repeaing the code. Since we want to modify both passes of the loop to support device-specific barriers, make it into an actual loop. Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 1536bc2d213713af45541a15b5e49c552d8d0592 Author: Jasper St. Pierre Date: Sat Nov 3 20:23:44 2012 -0400 cursor: Clean up pointer barrier creation code a tiny bit This will make it much simpler when we add more error paths to the code that constructs pointer barrier clients. Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit 04c885de715a7c989e48fc8cf2e61db2b401de2d Author: Jasper St. Pierre Date: Sat Nov 3 20:23:43 2012 -0400 cursor: CreatePointerBarrier has a variable request length Support this, and swap the devices in the SProc as well. Don't actually do anything with the devices just yet -- specifying any should still emit a BadImplementation. Based on a patch by Peter Hutterer Signed-off-by: Jasper St. Pierre Signed-off-by: Peter Hutterer commit d74b63f95fc622afe83c53580f1b55346d55fa7a Author: Jasper St. Pierre Date: Sat Nov 3 20:23:42 2012 -0400 cursor: Fix a minor unused variable warning Signed-off-by: Jasper St. Pierre Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit aad65415bff12c6860c19beac42e4165e598a40f Author: Peter Hutterer Date: Thu Oct 11 13:02:27 2012 +1000 dix: don't allow disabling XTest devices Disabling a XTest device followed by an XTest API call crashes the server. This could be fixed elsewhere but disabled devices must not send events anyway. The use-case for disabled XTest devices is somewhat limited, so simply disallow disabling the devices. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5b7384a3154a95a805b040e1910e276b52aada96 Author: Alexey Ten (Lynn) Date: Tue Oct 23 12:32:31 2012 +0400 Apply partial matches for option (#25873) Rules which match star (*) and option, like one below, should be applied layout[2] option = symbols * misc:typo = +typo(base) This is port of patch from #19563 (https://bugs.freedesktop.org/19563) because here we have own copy of maprules.c X.Org Bug 25873 Signed-off-by: Alexey Ten (Lynn) Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 54ba26cb1f9c59559cc3c449abeb31b2ce23bdba Author: Yaakov Selkowitz Date: Mon Oct 29 22:37:37 2012 -0500 os: Add libnettle as a choice of SHA1 implementation libnettle is smaller than libgcrypt, currently being released more frequently, and has replaced the latter in gnutls-3.x (which is used by TigerVNC, so they can avoid pulling in two crypto libraries simultaneously). Signed-off-by: Yaakov Selkowitz Reviewed-by: Julien Cristau commit 2ff56033de2b493a11d2bdf411b7057b1b3a22d7 Author: Yaakov Selkowitz Date: Tue Oct 16 02:11:59 2012 -0500 Xi: fix fprint format warning exevents.c: In function 'ProcessTouchEvent': exevents.c:1601:20: warning: too many arguments for format Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit d631dbe9b6a1faa4cd18ab7a4a0276db02b84b77 Author: Yaakov Selkowitz Date: Sat Oct 27 21:50:01 2012 -0500 Xext: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 20cf7918ed954a932a4cc404b3d0c4ca87a6ae16 Author: Yaakov Selkowitz Date: Tue Oct 16 21:08:52 2012 -0500 Xext: fix redundant redeclaration warnings panoramiX.c:595:13: warning: redundant redeclaration of 'CreateConnectionBlock' ../include/dix.h:167:23: note: previous declaration of 'CreateConnectionBlock' was here xres.c:193:13: warning: redundant redeclaration of 'ResExtensionInit' ../include/extinit.h:109:13: note: previous declaration of 'ResExtensionInit' xtest.c:60:12: warning: redundant redeclaration of 'DeviceValuator' ../Xi/exglobals.h:61:12: note: previous declaration of 'DeviceValuator' was here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 89447e1b50d2fb0e046102664045d1f9d4efc542 Author: Yaakov Selkowitz Date: Mon Oct 15 01:33:05 2012 -0500 Xext: fix unused variable warnings in xf86bigfont.c These were rendered unused by commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 344eea237fc07dedfd733d14f95ed0ad26bb5f81 Author: Yaakov Selkowitz Date: Tue Oct 16 02:04:34 2012 -0500 xkb: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 7f1d74e8a906210eafc637df81ded62c3adff748 Author: Yaakov Selkowitz Date: Tue Oct 16 02:06:54 2012 -0500 render: fix shadow warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 8e86123998d26d26f0f60dcbb9836c38e5a4c3a5 Author: Yaakov Selkowitz Date: Tue Oct 16 01:19:12 2012 -0500 randr: export more provider property symbols These were added as part of commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 but never declared or exported. Fixes warnings: rrproviderproperty.c:255:1: warning: no previous prototype for 'RRPostProviderPendingProperties' rrproviderproperty.c:327:1: warning: no previous prototype for 'RRConfigureProviderProperty' Signed-off-by: Yaakov Selkowitz Reviewed-by: Dave Airlie Reviewed-by: Peter Hutterer commit f02e27e4fcc34413b2051e5a01edc92172fa8612 Author: Yaakov Selkowitz Date: Tue Oct 16 02:16:17 2012 -0500 mi: fix shadow warnings mibitblt.c: In function 'miGetImage': mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local mibitblt.c:609:17: warning: shadowed declaration is here mispans.c: In function 'miFillUniqueSpanGroup': mispans.c:456:33: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here mispans.c:488:17: warning: declaration of 'i' shadows a previous local mispans.c:382:9: warning: shadowed declaration is here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 1fe30c00679bd36a6355b48b94b87564d528ff28 Author: Yaakov Selkowitz Date: Tue Oct 16 02:21:04 2012 -0500 fb: fix shadow warnings fbblt.c: In function 'fbBlt': fbblt.c:76:16: warning: declaration of 'src' shadows a previous local fbblt.c:52:13: warning: shadowed declaration is here fbblt.c:77:16: warning: declaration of 'dst' shadows a previous local fbblt.c:52:19: warning: shadowed declaration is here fbbltone.c: In function 'fbBltPlane': fbbltone.c:742:13: warning: declaration of 'w' shadows a previous local fbbltone.c:725:9: warning: shadowed declaration is here Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit e8d45f301845f70b76407577b92363934ca4f19e Author: Yaakov Selkowitz Date: Tue Oct 16 20:54:56 2012 -0500 dix: fix shadow warnings dispatch.c: In function 'ProcCopyArea': dispatch.c:1608:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1604:9: warning: shadowed declaration is here dispatch.c: In function 'ProcCopyPlane': dispatch.c:1647:5: warning: declaration of 'rc' shadows a previous local dispatch.c:1643:9: warning: shadowed declaration is here events.c: In function 'GetClientsForDelivery': events.c:2030:68: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'DeliverEventToWindowMask': events.c:2113:19: warning: declaration of 'clients' shadows a global declaration ../include/dix.h:124:28: warning: shadowed declaration is here events.c: In function 'EventSuppressForWindow': events.c:4420:12: warning: declaration of 'free' shadows a global declaration Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 1aa783754e21a263b0973516850656b13fd18f0d Author: Yaakov Selkowitz Date: Tue Oct 16 14:06:30 2012 -0500 dix: fix redundant redeclaration warnings in dixfont These functions are already declared in . Redeclaring them just for _X_EXPORT causes tons of warnings throughout xserver, but they need to be declared somewhere to be picked up by sdksyms.sh. Doing so in a private header limits the warnings to sdksyms.c; fixing those as well would require changes to fontsproto. Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 27c5966de35d4726dd9795b4828d4236851f6a88 Author: Yaakov Selkowitz Date: Mon Oct 15 01:25:17 2012 -0500 xfree86: os-support: fix old-style function definition warnings Signed-off-by: Yaakov Selkowitz Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 64b961bb21369aaea694d883f361a36bc23b19b9 Author: Yaakov Selkowitz Date: Wed Oct 24 23:57:11 2012 -0500 macros: clarify documentation Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer commit 04f980ead5e9af066143a921e0a0e98f26f28ee5 Merge: a194630f7 a4941ce49 Author: Keith Packard Date: Mon Nov 5 08:45:21 2012 -0800 Merge remote-tracking branch 'jturney/mingw-w64-w32api' commit a4941ce4961f254ac31e2cef6dd0863866246bab Author: Jon TURNEY Date: Tue Aug 21 15:31:16 2012 +0100 hw/xwin: Wrap 'Status' when including ddraw.h Status is #defined as an alias for a type in xkbsrv.h, which conflicts with it's use as a parameter name in rpcdce.h This fixes compilation with MinGW-w64 w32api headers (The MinGW-w64 w32api headers actually provide a ddraw.h, so this fix tries to do things in a way which will still work if our private copy of ddraw.h is eventually removed) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 57bbf6e2aead6cce76a9f5d43829b58868a26059 Author: Jon TURNEY Date: Mon Oct 29 14:35:45 2012 +0000 hw/xwin: Remove pointless winFinishCreateWindowsWindowDDNL() Remove pointless winFinishCreateWindowsWindowDDNL() and the useless DirectDraw surface pointers in the window privates Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5bc4c53d23d02d3d7297a8f00a92b6e4d5e0d6fe Author: Jon TURNEY Date: Tue Sep 4 17:28:16 2012 +0100 hw/xwin: Link with libdxguid rather than defining the DirectX GUIDs ourselves Decruftify by linking with libdxguid rather than defining the DirectX GUIDs ourselves. This fixes compilation with MinGW-w64 w32api headers, which do not provide GUID_SECT (which only ever did anything for gcc prior to 2.95, anyhow) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a194630f7f7b287cb4ea4a459df0745f4c0d4c1a Merge: 74a313042 d511a3016 Author: Keith Packard Date: Thu Nov 1 13:38:54 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit d511a3016a79c50cb38e7504d4831a9ae128e422 Author: Benjamin Tissoires Date: Fri Oct 26 16:27:34 2012 +0200 Add missing labels for multitouch valuators ABS_MT_DISTANCE exists since kernel v2.6.38, ABS_MT_TOOL_X|Y appeared in v3.6. Signed-off-by: Benjamin Tissoires Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ced56f322ead10d1bc93fcd1f8e0ec3ae51292a3 Author: Carlos Garnacho Date: Thu Oct 25 15:03:50 2012 +0200 Sync TouchListener memory allocation with population in TouchSetupListeners() The allocated TouchListener array may fall short by 1 if hitting the worst case situation where there's an active grab, passive grabs on each window in the sprite trace and event selection for touch in one of the windows. This may lead to memory corruptions as the array is overflown. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 74a3130426d7e1b456e45daa517769cd3e4b58c0 Merge: 1ca096d5e f32ad6dd3 Author: Keith Packard Date: Mon Oct 29 09:09:16 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 1ca096d5e07221025c4c4110528772b7d94f15ee Author: Michel Dänzer Date: Mon Oct 29 12:57:54 2012 +0100 EXA: Track source/mask pixmaps more explicitly for Composite fallback regions. In particular, make sure pExaScr->src/maskPix are cleared when the corresponding pictures aren't associated with drawables, i.e. solid or gradient pictures. Without this, we would in some cases associate the source/mask region with unrelated pixmaps from previous Composite fallbacks, resulting in random corruption. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47266 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit f32ad6dd314a587c301b7f1a6e4ee74e5d8cc06c Author: Ryan Pavlik Date: Fri Oct 21 12:32:49 2011 -0500 os/utils.c: Provide only stubs for Lock/UnlockServer on WIN32 MinGW and MSVC lack the POSIX functions to compile the lock file code. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 74735c5ebff15db8891808068fe8569d8ccde9e7 Author: Colin Harrison Date: Sat Feb 18 20:37:19 2012 +0000 hw/xwin: fmemopen is available on cygwin but not MinGW This is a follow-up to commit 0659437f5ec0e3f646373394f5f9c5461e2170f3. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 748be9da20a8bf3dd99701a95eac7ee3895a28de Author: Jon TURNEY Date: Tue May 1 20:08:41 2012 +0100 doc: Update documentation about Windows platforms support a bit Update what c-extensions says about Windows platforms support a bit: - Document that MinGW Win32 gets let off being POSIX-compilant - Document the minimum Windows version supported Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 760be785eb49fed4652950fb55dc07b0a41d87de Author: Peter Hutterer Date: Wed Oct 24 11:20:54 2012 +1000 xfree86: remove unused variable sigstate Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit e7cd5cce740e653000fb1192b600268dcf77dde2 Author: Peter Hutterer Date: Thu Oct 18 15:11:31 2012 +1000 dix: fix zaphod screen scrossing (#54654) POINTER_SCREEN coordinates are screen-relative. For a Zaphod setup, the coordinates after a screen crossing are already relative to the new screen's origin. Add that offset to the coordinates before re-setting. regression introduced by commit bafbd99080be49a17be97d2cc758fbe623369945 Author: Peter Hutterer Date: Wed Aug 8 11:34:32 2012 +1000 dix: work around scaling issues during WarpPointer (#53037) X.Org Bug 54654 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 676447190190d8546165e21be242cf16dd69f5ae Author: Peter Hutterer Date: Wed Oct 17 14:13:29 2012 +1000 Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738) If a client is still waiting for the TouchBegin, don't deliver a TouchEnd event. X.Org Bug 55738 Signed-off-by: Peter Hutterer Tested-by: Thomas Jaeger Reviewed-by: Keith Packard commit 3018f9c1e5109680dcf69b8f2d7807696a473bde Author: Peter Hutterer Date: Fri Oct 12 13:48:27 2012 +1000 Xi: set xChangeDeviceControlReply.status to Success by default If the status is other than Success, the code will set it to the required value. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 2decff6393a44b56d80d53570718f95354fde454 Author: Peter Hutterer Date: Thu Oct 11 16:03:33 2012 +1000 xkb: ProcesssPointerEvent must work on the VCP if it gets the VCP For button release events, the current code picks the VCK. Because that has a XKB struct, it thinks this is a PointerKeys event and proceeds to send the release event through the XTest pointer. That has no effect in normal operation as the button is never down and an attempt is silently discarded (normal event processing continues with the VCP). On server shutdown, the XTest device is already removed, leading to a null-pointer derefernce when the device is checked for whether buttons are down (XkbFakeDeviceButton → button_is_down(xtest pointer)). The current state has only worked by accident, the right approach here is to handle the VCP's event as such and not switch to the keyboard. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit cc1d8fa8a4ef2e34e9837a44945094fd77e40a0b Author: Yaakov Selkowitz Date: Sun Oct 14 23:38:20 2012 -0500 Configure fixes for MinGW As for Cygwin, define FD_SETSIZE for uses of select() to be correct. Link with libpthread. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 53830281b4da096f9c13107d73ec9c76ff1d14cc Merge: abc2ef590 9cbcb5bd6 Author: Keith Packard Date: Fri Oct 26 18:04:34 2012 -0700 Merge remote-tracking branch 'sandmann/for-keithp' commit abc2ef590c7cb33ebe21726f83b7347406975f95 Merge: 0e85e5e62 c5396ec05 Author: Keith Packard Date: Fri Oct 26 17:11:58 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 9cbcb5bd6a5360a128d15b77a02d8d3351f74366 Author: Søren Sandmann Pedersen Date: Wed May 30 05:19:08 2012 -0400 Use new pixman_glyph_cache_t API that will be in pixman 0.28.0 This new API allows glyphs to be cached in a data structure in pixman, and entire glyph strings to be composited in one go. Also bump pixman dependency to 0.27.2. Results from the cairo peformance test suite running against Xvfb with a screen size of 1680x1050@32bpp: Speedups ======== xlib firefox-talos-gfx 12416.63 -> 3603.93 3.45x speedup ██▌ xlib xfce4-terminal-a1 1727.57 -> 1048.85: 1.65x speedup ▋ xlib evolution 1370.49 -> 869.34: 1.58x speedup ▋ xlib gnome-terminal-vim 1832.83 -> 1251.94: 1.46x speedup ▌ xlib poppler 1519.70 -> 1204.05: 1.26x speedup ▎ xlib firefox-planet-gnome 6982.55 -> 5598.16: 1.25x speedup ▎ xlib ocitysmap 1142.77 -> 1071.53: 1.07x speedup ▏ No slowdowns were reported. Results of x11perf -aa10text: Before: 8000000 reps @ 0.0007 msec (1450000.0/sec) 8000000 reps @ 0.0007 msec (1460000.0/sec) 8000000 reps @ 0.0007 msec (1460000.0/sec) 8000000 reps @ 0.0007 msec (1470000.0/sec) 8000000 reps @ 0.0007 msec (1480000.0/sec) 40000000 trep @ 0.0007 msec (1460000.0/sec) After: 32000000 reps @ 0.0002 msec (4910000.0/sec) 32000000 reps @ 0.0002 msec (4830000.0/sec) 32000000 reps @ 0.0002 msec (4890000.0/sec) 32000000 reps @ 0.0002 msec (4830000.0/sec) 32000000 reps @ 0.0002 msec (4900000.0/sec) 160000000 trep @ 0.0002 msec (4870000.0/sec) Version 2: Destroy the glyph cache at server regen time Acked-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Soren Sandmann commit c5396ec05a5c6cab6608ba677f703c5227b1de13 Author: Thierry Reding Date: Wed Oct 17 12:11:49 2012 +0200 xf86: Fix build against recent Linux kernel Recent Linux kernels reworked the linux/input.h header file, which is now part of the "user-space API". The include guard therefore has an additional additional _UAPI prefix. Instead of adding another case to the #ifdef, drop any include guard checks and instead always undefine the BUS_* definitions on Linux. Signed-off-by: Thierry Reding Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7d89eb4978a6649be22747c3de2886781e311647 Author: Colin Walters Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Honor NOCONFIGURE=1 (Also while we have the patient open, use exec instead of hanging around uselessly in waitpid) http://people.gnome.org/~walters/docs/build-api.txt Reviewed-by: Adam Jackson Signed-off-by: Colin Walters Signed-off-by: Peter Hutterer commit c0a752d2864872023216005375a6a1973fadeffe Author: Lionel Elie Mamane Date: Tue Oct 9 03:17:49 2012 +0200 dix: fix Ungrab action #55785 UngrabAllDevices(Bool kill_client): If we are not going to kill the client (kill_clients false), we need to deactivate grabs of active clients, too. (If we are going to kill the client, no need to deactivate the grab, as this will be done as part of the client kill.) Fixes: X.Org Bug 55785 Signed-off-by: Lionel Elie Mamane Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 3b67cd26149eb991b5f015061a818af65369e668 Author: Chase Douglas Date: Thu Jun 7 14:12:06 2012 -0700 End physically active touches when device is disabled Otherwise: * We can't end the touches while device is disabled * New touches after enabling the device may erroneously be mapped to old logical touches Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0e85e5e62819c9e516d6e19836f9f5d7a5d53e87 Author: Colin Harrison Date: Thu Oct 11 18:05:47 2012 +0100 hw/xwin: Fix no return value warning in winClipboardProc() winclipboardthread.c: In function ‘winClipboardProc’: winclipboardthread.c:415:9: warning: ‘return’ with no value, in function returning non-void winclipboardthread.c:424:13: warning: ‘return’ with no value, in function returning non-void Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 51ed6a7d46c6cc19eb9aaf838be41eb57fd8230a Author: Colin Harrison Date: Thu Oct 11 17:57:37 2012 +0100 hw/xwin: Remove unused variable in winmultiwindowwm.c winmultiwindowwm.c: In function ‘UpdateName’: winmultiwindowwm.c:522:14: warning: unused variable ‘pszName’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 5886b1dc4d2ce12a238a2e3600fdb576abc6e419 Author: Colin Harrison Date: Thu Oct 11 17:56:11 2012 +0100 hw/xwin: Remove unused variables in winwindow.c winwindow.c: In function ‘winCreateWindowNativeGDI’: winwindow.c:62:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winDestroyWindowNativeGDI’: winwindow.c:85:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winPositionWindowNativeGDI’: winwindow.c:108:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winChangeWindowAttributesNativeGDI’: winwindow.c:213:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winUnmapWindowNativeGDI’: winwindow.c:241:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] winwindow.c: In function ‘winMapWindowNativeGDI’: winwindow.c:265:19: warning: unused variable ‘pWinPriv’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 08b33882f34fed0c23d54ff7361efc5833868a4b Author: Colin Harrison Date: Thu Oct 11 17:52:11 2012 +0100 hw/xwin: Remove unused variables in winvalargs.c winvalargs.c: In function ‘winValidateArgs’: winvalargs.c:62:10: warning: unused variable ‘fImplicitScreenFound’ [-Wunused-variable] winvalargs.c:60:9: warning: unused variable ‘iMaxConsecutiveScreen’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e665f1a21468118dababdbf6d8573f1ce1ebd47 Author: Colin Harrison Date: Thu Oct 11 17:50:42 2012 +0100 hw/xwin: Remove unused variables in winwindowswm.c winwindowswm.c: In function ‘ProcWindowsWMQueryVersion’: winwindowswm.c:85:9: warning: unused variable ‘n’ [-Wunused-variable] winwindowswm.c: In function ‘SProcWindowsWMQueryVersion’: winwindowswm.c:565:9: warning: unused variable ‘n’ [-Wunused-variable] Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit e893d570aa3e9ae8df6a30ac4adaf0949a2fc733 Author: Jon TURNEY Date: Thu Oct 11 19:36:13 2012 +0100 Use X_ATTRIBUTE_PRINTF where suggested for os.h InitOutput.c: In function ‘OsVendorInit’: InitOutput.c:630:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] winprocarg.c: In function ‘ddxProcessArgument’: winprocarg.c:231:29: warning: assignment left-hand side might be a candidate for a format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e59cc83bcdca6b64c1bfb2de395d741757f615f6 Author: Jon TURNEY Date: Thu Oct 11 19:35:19 2012 +0100 hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winmsg.c winmsg.c: In function ‘winVMsg’: winmsg.c:47:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsg’: winmsg.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsg’: winmsg.c:66:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDrvMsgVerb’: winmsg.c:77:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winMsgVerb’: winmsg.c:87:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winErrorFVerb’: winmsg.c:97:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winDebug’: winmsg.c:107:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winmsg.c: In function ‘winTrace’: winmsg.c:117:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3d6e6a394ea2d5dcb77aa706f751423315d8a7ed Author: Jon TURNEY Date: Thu Oct 11 19:32:24 2012 +0100 hw/xwin: Use X_ATTRIBUTE_PRINTF where suggested for winerror.c Also, fix the typoed name OsVenderVErrorF (sic), so it actually gets prototyped and remove redundant declarations of it's prototype. winerror.c: In function ‘OsVendorVErrorF’: winerror.c:56:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] winerror.c: In function ‘winMessageBoxF’: winerror.c:104:5: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wmissing-format-attribute] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 13fb6b36b8742a79b9768944eee6d1ad66d7e4d9 Author: Jon TURNEY Date: Thu Oct 11 16:20:35 2012 +0100 hw/xwin: Use char strings in winClipboardUNIXtoDOS for consistency with the rest of the clipboard code winclipboardxevents.c: In function ‘winClipboardFlushXEvents’: winclipboardxevents.c:575:13: warning: passing argument 1 of ‘winClipboardUNIXtoDOS’ from incompatible pointer type winclipboard.h:102:2: note: expected ‘unsigned char **’ but argument is of type ‘char **’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit fa36a7cd488e4f7fb91beed8a87764b8e0c1a72f Author: Jon TURNEY Date: Thu Oct 11 15:51:39 2012 +0100 hw/xwin: Fix warning about discarding const in initializing winKBLayouts winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type winlayouts.h:46:5: warning: initialization discards qualifiers from pointer target type [repeated for each layout] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0ea65df8a5f97a6fe5225226493aa01380080d2f Author: Jon TURNEY Date: Thu Sep 27 17:23:43 2012 +0100 hw/xwin: Fix some of the warnings in generated gl wrapper code Fix some of the warnings in generated gl wrapper code: - glWinResolveHelper takes a const char * argument - ensure formal parameter names don't collide with reserved names or shadow global declarations (e.g. near, far, index (from string.h), remainder (from math.h), pointer (from Xdefs.h) by postpending a '_'. generated_gl_wrappers.c:13:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type glwrap.c:70:1: note: expected 'char *' but argument is of type 'const char *' [repeated many times] generated_gl_wrappers.c: In function 'glVertexAttrib1dARBWrapper': generated_gl_wrappers.c:6884:47: warning: declaration of 'index' shadows a global declaration [-Wshadow] generated_gl_wrappers.c:6886:3: warning: passing argument 2 of 'glWinResolveHelper' discards qualifiers from pointer target type [repeated many times] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f7f0739311927ad177dece7119272481b75b73b4 Author: Colin Harrison Date: Tue Oct 19 23:42:53 2010 +0100 hw/xwin: Warning fix in ProcWindowsWMFrameSetTitle() winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’: winwindowswm.c:514: error: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness If you're going to stick random casts into your code, at least use the goddammed right ones. :-) Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 97c9ed026a7f7efe5fca02c188bcbdbcd7c594e9 Author: Jon TURNEY Date: Wed Jan 25 19:01:55 2012 +0000 hw/xwin: Fix shadowed local variable i in HandleCustomWM_COMMAND() Fix shadowed local variable i in HandleCustomWM_COMMAND() Also, fds are meant to be representable as an int winprefs.c: In function ‘HandleCustomWM_COMMAND’: winprefs.c:346:23: error: declaration of ‘i’ shadows a previous local winprefs.c:322:7: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b55d0b92fc536793a877f6073754801a7c3c2dd5 Author: Jon TURNEY Date: Wed Jan 25 18:56:22 2012 +0000 hw/xwin: Fix shadowed local variables in winLoadCursor() Move shadowed local variables x and y to the places they are used wincursor.c: In function ‘winLoadCursor’: wincursor.c:212:11: error: declaration of ‘x’ shadows a previous local wincursor.c:166:7: error: shadowed declaration is here wincursor.c:212:14: error: declaration of ‘y’ shadows a previous local wincursor.c:166:10: error: shadowed declaration is here wincursor.c:228:11: error: declaration of ‘x’ shadows a previous local wincursor.c:166:7: error: shadowed declaration is here wincursor.c:228:14: error: declaration of ‘y’ shadows a previous local wincursor.c:166:10: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a8c9c3699e6dfde29eeec058d903740a499dcf3b Author: Jon TURNEY Date: Thu Oct 11 19:11:36 2012 +0100 hw/xwin/glx: Fix using Mask as a formal parameter shadows a global typedef of the same name Fix using Mask as a formal parameter shadows the typedef of the same name from X.h indirect.c: In function 'GetShift': indirect.c:1629:14: warning: declaration of 'Mask' shadows a global declaration [-Wshadow] Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47df98c7851fd9e97a54f0b4950340506d4a9244 Author: Jon TURNEY Date: Wed Jan 25 19:17:16 2012 +0000 hw/xwin: Fix using screenInfo as a formal parameter to InitOutput() shadows a global declaration Using screenInfo as a formal parameter to InitOutput() shadows a global declaration of screenInfo. Change the formal parameter name from screenInfo to pScreenInfo, as everywhere else uses. InitOutput.c: In function ‘InitOutput’: InitOutput.c:891:25: error: declaration of ‘screenInfo’ shadows a global declaration ../../include/scrnintstr.h:570:19: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 97e9c34687f7dc05ee0bdef097a19e7623fb59a3 Author: Jon TURNEY Date: Wed Jan 25 19:07:49 2012 +0000 hw/xwin: Fix using menu as a formal parameter shadows a global variable of the same name Using menu as a formal parameter shadows a global variable of the same name winprefsyacc.y: In function ‘SetRootMenu’: winprefsyacc.y:286:20: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here winprefsyacc.y: In function ‘SetDefaultSysMenu’: winprefsyacc.y:293:26: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit efe96a17bd741f222ccb226d306b5c1dc1f25ade Author: Jon TURNEY Date: Wed Jan 25 18:54:57 2012 +0000 hw/xwin: Fix using index as a formal parameter shadows index() Using index as a formal parameter shadows index() from strings.h winallpriv.c: In function ‘winInitCmapPrivates’: winallpriv.c:119:45: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 451c5d9175cdeb36fd614502ff0317f968490dfc Author: Jon TURNEY Date: Wed Jan 25 19:09:12 2012 +0000 hw/xwin: Fix using index as a formal parameter in winscrinit.c shadows index() Using index as a local variable shadows index() from strings.h winscrinit.c: In function ‘winFinishScreenInitFB’: winscrinit.c:274:28: error: declaration of ‘index’ shadows a global declaration winscrinit.c: In function ‘winFinishScreenInitNativeGDI’: winscrinit.c:623:35: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 21faee4b383a12bef58f300b4ad1a3bd34d6de2d Author: Jon TURNEY Date: Wed Jan 25 19:05:42 2012 +0000 hw/xwin: Fix using index as a local variable shadows index() Using index as a local variable shadows index() from strings.h winprefs.c: In function ‘LoadImageComma’: winprefs.c:574:7: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2d9123fd0c89c1a72e7281e56985196bc53507bf Author: Jon TURNEY Date: Wed Jan 25 18:59:21 2012 +0000 hw/xwin: Fix using index as a formal parameter in winmonitors.c shadows index() Fix using index as a local variable shadows global declaration of index() from strings.h winmonitors.c: In function ‘QueryMonitor’: winmonitors.c:59:23: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5b0435dbdaa47404629800e4e9c5a6952a7bb260 Author: Jon TURNEY Date: Wed Jan 25 18:53:02 2012 +0000 hw/xwin: Fix using system as a local variable in winCheckMount() shadows system() Using system as local variable in winCheckMount() shadows the global declaration of system() from stdlib.h InitOutput.c: In function ‘winCheckMount’: InitOutput.c:296:10: error: declaration of ‘system’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 17d84c743d6b52f32c4ca0341aebaff972522945 Author: Jon TURNEY Date: Wed Jan 25 17:18:12 2012 +0000 hw/xwin: Remove obsolete redundant declarations of winPushPixels() winPushPixels() and winpushpxl.c was removed in it's entirety in commit f31bd087e8a7f65cd588bd1d022bb18e72b2a60c "Death to mfb" wingc.c:37:1: error: redundant redeclaration of ‘winPushPixels’ win.h:1104:1: note: previous declaration of ‘winPushPixels’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f06b468d96afd323e28645dde44170ab367da4f1 Author: Jon TURNEY Date: Wed Jan 25 17:09:18 2012 +0000 hw/xwin: Fix redundant declarations in winmultiwindowwm.c winmultiwindowwm.c:139:14: error: redundant redeclaration of ‘display’ ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here winmultiwindowwm.c:140:13: error: redundant redeclaration of ‘ErrorF’ ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3e8269177ee01fe107830032b60a8d311d4b4b0e Author: Jon TURNEY Date: Wed Jan 25 17:08:17 2012 +0000 hw/xwin: Fix redundant declarations in winclipboardwrappers.c Fix redundant declarations in winclipboardwrappers.c. Also remove obsolete winProcQueryTree() prototype. winclipboardwrappers.c:64:12: error: redundant redeclaration of ‘g_iNumScreens’ winglobals.h:33:12: note: previous declaration of ‘g_iNumScreens’ was here winclipboardwrappers.c:67:13: error: redundant redeclaration of ‘g_fXdmcpEnabled’ winglobals.h:45:13: note: previous declaration of ‘g_fXdmcpEnabled’ was here winclipboardwrappers.c:75:27: error: redundant redeclaration of ‘winProcEstablishConnectionOrig’ winglobals.h:66:27: note: previous declaration of ‘winProcEstablishConnectionOrig’ was here winclipboardwrappers.c:76:27: error: redundant redeclaration of ‘winProcQueryTreeOrig’ winglobals.h:67:27: note: previous declaration of ‘winProcQueryTreeOrig’ was here winclipboardwrappers.c:77:27: error: redundant redeclaration of ‘winProcSetSelectionOwnerOrig’ winglobals.h:68:27: note: previous declaration of ‘winProcSetSelectionOwnerOrig’ was here winclipboardwrappers.c:56:5: warning: redundant redeclaration of ‘winProcEstablishConnection’ [-Wredundant-decls] winclipboardwrappers.c:52:5: note: previous declaration of ‘winProcEstablishConnection’ was here winclipboardwrappers.c:57:5: warning: redundant redeclaration of ‘winProcSetSelectionOwner’ [-Wredundant-decls] winclipboardwrappers.c:54:5: note: previous declaration of ‘winProcSetSelectionOwner’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0975fa0b391d7b8d7e8a127ebf7a863e53fcab7d Author: Jon TURNEY Date: Wed Jan 25 17:06:27 2012 +0000 hw/xwin: Fix redundant declaration in winclipboardthread.c winclipboardthread.c:51:22: error: redundant redeclaration of ‘serverGeneration’ ../../include/misc.h:362:22: note: previous declaration of ‘serverGeneration’ was here winclipboardthread.c: In function ‘winClipboardProc’: Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4a1da00c495706e0fbcec2b30aef3ad7acf5b703 Author: Jon TURNEY Date: Wed Jan 25 17:05:25 2012 +0000 hw/xwin: Fix redundant declaration in winclipboardinit.c In file included from winclipboardinit.c:35:0: winclipboard.h:81:13: error: redundant redeclaration of ‘ErrorF’ ../../include/os.h:558:13: note: previous declaration of ‘ErrorF’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 30f31b80f0105676359105c895bc195b9f3e704c Author: Jon TURNEY Date: Wed Jan 25 16:48:45 2012 +0000 hw/xwin: Fix various warnings in code generated by lex/yacc Remove various redundant declarations. Instruct lex not to generate code which isn't going to be used, thus avoiding some unused function warnings. Note that bison <2.5 expects stdlib.h to define _STDLIB_H if it's been included, and avoids prototyping free/malloc in that case. Some stdlib.h (e.g. newlib) may not match precisely (e.g. defining _STDLIB_H_), so we define it after including stdlib.h to be sure, and avoid a redudant declaration warning for those symbols. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 4231b9541c6fd26f43b605ecc9dd76622dd786f7 Author: Jon TURNEY Date: Wed Jan 25 16:38:49 2012 +0000 hw/xwin: Fix redundant declaration in winprefs.c winprefs.c:63:14: error: redundant redeclaration of ‘display’ ../../include/opaque.h:52:14: note: previous declaration of ‘display’ was here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 70087c55fffc3cbc52f550418e6b1230bbb1b3b3 Author: Jon TURNEY Date: Wed Jan 25 16:36:40 2012 +0000 hw/xwin: Fix redundant declaration warnings in winmonitors.c Include xwin-config.h so HAVE_STRLCPY and HAVE_STRNDUP are defined, so duplicate declarations of strlcpy(), strlcat() and strndup() aren't made by os.h In file included from ../../include/misc.h:111:0, from ../../include/screenint.h:51, from ../../include/scrnintstr.h:51, from win.h:157, from winmonitors.c:31: ../../include/os.h:491:15: error: redundant redeclaration of ‘strlcpy’ /usr/include/string.h:86:35: note: previous declaration of ‘strlcpy’ was here ../../include/os.h:492:15: error: redundant redeclaration of ‘strlcat’ /usr/include/string.h:85:35: note: previous declaration of ‘strlcat’ was here ../../include/os.h:496:15: error: redundant redeclaration of ‘strndup’ Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9904c8fe75c96cf84d8885aa95f2743c1b25ea37 Author: Jon TURNEY Date: Wed Jan 25 16:09:59 2012 +0000 hw/xwin: Remove completely unused winregistry.c Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a69429a17bf4630f6e26f61630a1c2b287202627 Author: Jon TURNEY Date: Fri Sep 7 14:58:06 2012 +0100 Fix 'make distcheck' for hw/xwin Add some missing header files to _SOURCES so they get distributed properly Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 1d9fd7ffb03ff6e44f3a8736a94e4558203ce607 Author: Jon TURNEY Date: Thu Sep 6 13:51:38 2012 +0100 Fix compilation of Xorg DDX without XF86VIDMODE Fix compilation of Xorg DDX without XF86VIDMODE since 6e74fdda, by putting xf86vmode.c back under the XF86VIDMODE automake conditional it was accidentally taken out of. Signed-off-by: Jon TURNEY Tested-by: Yaakov Selkowitz Reviewed-by: Daniel Stone commit 25741b1aa3a0fb39cb842a43ab52935673cfdefa Author: Jon TURNEY Date: Sun Sep 2 15:17:05 2012 +0100 hw/xwin: Only add GLX extension once. Using of LoadExtension() to add GLX onto to the end of the list of extensions on every server regeneration leads to hilarious consequences (i.e. crashing) after the first regeneration :-) Possibly xf86ExtensionInit() and QuartzExtensionInit() need a similar fix. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison Tested-by: Colin Harrison commit 7ceb85481280fecbf033f147f0f7834cad3890c6 Author: Jon TURNEY Date: Sun Sep 2 14:55:25 2012 +0100 Correct description of -displayfd option in man page. A display number, not a port number, is written to the specified fd. Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith commit 4b7f00346daed20c96f3e8ea13ae411858a5424b Author: Peter Hutterer Date: Wed Oct 10 13:33:48 2012 +1000 dix: fix crash on shutdown if a disabled device is still grabbed (XI1 grab) A disabled device doesn't have a sprite (less so a sprite->win) and triggers a NULL-pointer dereference on shutdown when all active grabs are released as part of the cleanup. Fix this by checking for sprite being non-null and setting the focus window to the NullWindow if it is. The rest of the patch just attempts to make things more readable. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 0c7109f3215378bb3ed6c00c71129a63ffb4e787 Author: Denys Vlasenko Date: Mon Oct 8 14:18:02 2012 +1000 os: fix typo in OsSigHandler() error message Recieved → Received Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0a75bd640b3dc26b89d9e342999a7f4b7e98edbf Author: Peter Hutterer Date: Wed Oct 3 13:12:27 2012 +1000 xfree86: add xf86UpdateDesktopDimensions() This call is required for external drivers (specifically NVIDIA) that do not share the xfree86 infrastructure to update the desktop dimensions. Without it, the driver would update the ScreenRecs but not update the total dimensions the input code relies on for transformation. This call is a thin wrapper around the already-existing internal call and should be backported to all stable series servers, with the minor ABI bump. Signed-off-by: Peter Hutterer CC: Andy Ritger Reviewed-by: Aaron Plattner commit 09f1e5b15b769e1122f0a8d7cae0820038992312 Author: Julien Cristau Date: Sun Oct 7 18:40:35 2012 +0200 Revert "kinput: allocate enough space for null character." This reverts commit 531785dd746d64ef7f473a83ca73bb20e74b6fca. The above commit breaks Xephyr option parsing. Andrzej writes: Xephyr -retro -keybd evdev,,device=/dev/input/event2,xkbrules=evdev,xkbmodel=evdev,xkblayout=pl -mouse evdev,,device=/dev/input/event1 :3 results in: Pointer option key (device=) of value (/dev/input/event1) not assigned! Kbd option key (device=) of value (/dev/input/event2) not assigned! Kbd option key (xkbrules=) of value (evdev) not assigned! Kbd option key (xkbmodel=) of value (evdev) not assigned! Kbd option key (xkblayout=) of value (pl) not assigned! The effect of the patch is that the "key=value" pairs are parsed in such a way that the key is added an "equals" sign to it and we end up with keys like "device=" instead of "device". This in turn has effect on KdParsePointerOptions and KdParseKbdOptions: the key does not match any choice presented in the "switch" statement, and so "Pointer/Kbd option key (...) of value (...) not assigned!" happens, making all "key=value" options inaccessible to the user. Reverting the patch makes them available again. Reference: http://bugs.debian.org/689246 Reported-by: Andrzej Pietrasiewicz Signed-off-by: Julien Cristau Cc: Dave Airlie Reviewed-by: Søren Sandmann Signed-off-by: Keith Packard commit 7f9d78d8ffb1a312f9b3d69c05323f601571e162 Author: Keith Packard Date: Thu Oct 4 22:51:06 2012 -0700 os: Don't re-declare ConnectionInputPtr and ConnectionOutputPtr They're declared in osdep.h, so don't redeclare them in io.c as well. Keeps the compiler happier. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit d5bf6f95f31037bd49b11348b500c3c13b7e0c99 Author: Keith Packard Date: Thu Oct 4 14:42:37 2012 -0700 Fix FlushClient to write extraBuf when provided (regression fix) In commit: commit 092c57ab173c8b71056f6feb3b9d04d063a46579 Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson the check for an empty output buffer was moved from one calling location into the FlushClient implementation itself. However, this neglected the possibility that additional data, in the form of 'extraBuf' would be passed to FlushClient from other code paths. If the output buffer happened to be empty at that time, the extra data would never be written to the client. This is fixed by checking the total data to be written, which includes both pending and extra data, instead of just the pending data. Signed-off-by: Keith Packard Reviewed-by: Julien Cristau commit 8367dd9736d74eca971da345c2bf559ce5bbf649 Merge: 36c18bb81 7998e2615 Author: Keith Packard Date: Thu Oct 4 13:08:35 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 36c18bb81be619df712778bcb99dd6f1fa38701a Author: Stephan Schreiber Date: Wed Aug 29 20:03:58 2012 +0200 int10: fix pci_device_read_rom usage I noticed that the build-in int10 driver always reports "Unable to retrieve all of segment 0x0C0000." even though the entire BIOS data is retrieved with success. The associated code is in hw/xfree86/int10/generic.c, in the function xf86ExtendedInitInt10(): if (pci_device_read_rom(pInt->dev, vbiosMem) < V_BIOS_SIZE) { xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x0C0000.\n"); } The function pci_device_read_rom() is from libpciaccess; its return value is not a size but an error status code: 0 means success. If pci_device_read_rom() returns 0 for success, the warning is generated. The proposed patch corrects the evaluation of the return value of pci_device_read_rom() and of the supplied BIOS size. Debian bug#686153 Signed-off-by: Julien Cristau Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 4bf3eac5fe20fb203b917a486f69514c55be595a Author: Adam Jackson Date: Thu Sep 27 17:12:19 2012 -0400 configure: Stop using AM_MAINTAINER_MODE All this does is make it so editing configure.ac or Makefile.am doesn't rebuild the makefiles. Which is just stupid. v2: Remove --enable-maintainer-mode from autogen.sh Signed-off-by: Adam Jackson Reviewed-by: Eric Anholt Reviewed-by: Dan Nicholson Reviewed-by: Peter Hutterer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 262679d436941580485a10e30938974958f7d588 Author: Keith Packard Date: Thu Oct 4 11:42:22 2012 -0700 Set version to 1.14 development branch (1.13.99.0) Signed-off-by: Keith Packard commit f179b13b91c8891254d31345ee04e773839e6b87 Merge: 4dd5989d1 3d2b768ef Author: Keith Packard Date: Thu Oct 4 11:39:46 2012 -0700 Merge remote-tracking branch 'daniels/master' commit 7998e26159893674be69183a73a89a53f5608d58 Author: Jason Gerecke Date: Fri Sep 28 15:03:42 2012 -0700 Fix additional gcc -Wwrite-strings warning in xf86 ddx Commit 09e4b78f missed a case. Signed-off-by: Jason Gerecke Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f64254d85e731d0b4369d871a9a735b03f283ba6 Author: Peter Hutterer Date: Thu Aug 23 15:00:24 2012 +1000 mi: drop two useless conditions in miPointerSetPosition pDev cannot be NULL here since fill_pointer_events is the only caller. And if the screen is NULL, then the device tries to send events before it is fully initialised. That certainly shouldn't happen and would be a bug elsewhere. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 314776eb369ca2e438907795ae030dd743c281fc Author: Daniel Stone Date: Fri Sep 7 18:30:23 2012 +0100 Touch: Fix duplicate TouchBegin selection with virtual devices Given the following scenario: 1) client A selects for TouchBegin on window W for device D 2) client B selects for TouchBegin on window W for XIAllDevices 3) client C selects for TouchBegin on window W with device E Step 3 will fail with BadImplementation, because attempting to look up XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. This should succeed (or, if it was selecting for device D, fail with BadAccess as it would be a duplicate selection). Fix this by performing the appropriate lookup for virtual devices. Signed-off-by: Daniel Stone Cc: Peter Hutterer Cc: Chase Douglas Signed-off-by: Peter Hutterer commit 3e6358ee6c33979329b78fe2097a1fdf76fb69cd Author: Daniel Drake Date: Fri Sep 7 21:48:35 2012 -0400 Xi: Don't check for TOUCH_END, it's never set This flag is never set, so checking for it here means that we'll never release the simulated mouse button press after the user touches (and releases) the touchscreen for the first time. Fixes a problem where the XO laptop touchpad became totally unusable after touching the screen for the first time (since X then behaved as if the mouse button was held down all the time). Signed-off-by: Daniel Drake Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 9d6b8365702e4648e793fea21ad22f7174558680 Author: Peter Hutterer Date: Fri Sep 28 11:49:29 2012 +1000 dix: fix crash on XI 1.x grabs on disabled devices. (#54934) If the device is disabled, the sprite window is NULL and dereferencing crashes the server. This is only triggered for XI 1.x grabs (ProcXGrabDevice) as XI2 grabs would trigger another code path, creating a sprite for the disabled device as if detaching it (which is wrong and fixed with this patch too). Grabbing a disabled device doesn't make sense as it won't send events anyway. However, the protocol specs do not prohibit it, so we need to keep it working. Luckily, oldWin is only used for focus out events, which aren't necessary given that the device is disabled. X.Org Bug 54934 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3d2b768efae9936c6929c2bc13c7a1acc074ecd3 Author: Daniel Stone Date: Fri Sep 7 18:17:46 2012 +0100 Touch: Fix duplicate TouchBegin selection with virtual devices Given the following scenario: 1) client A selects for TouchBegin on window W for device D 2) client B selects for TouchBegin on window W for XIAllDevices 3) client C selects for TouchBegin on window W with device E Step 3 will fail with BadImplementation, because attempting to look up XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work. This should succeed (or, if it was selecting for device D, fail with BadAccess as it would be a duplicate selection). Fix this by performing the appropriate lookup for virtual devices. Signed-off-by: Daniel Stone Reviewed-by: Chase Douglas commit e3903a9383351b061b1a99dfc653ca50de764ec4 Author: Frederic Plourde Date: Wed Sep 12 10:48:32 2012 -0400 Add glXCreateNewContext support in Xephyr #54798 Similar to how we intercept and pass through CreateContext, also pass through newer CreateNewContext requests. Fixes Clutter → Xephyr → VirtualBox. Signed-off-by: Frederic Plourde Reviewed-by: Daniel Stone commit 11afebc92ce1a7462ff2886286504425b1c8f0ba Author: Daniel Stone Date: Fri Sep 7 18:10:35 2012 +0100 Xephyr: GLX: Support MakeContextCurrent and MakeCurrentReadSGI We need to pass these requests through to the host server in the same way we do glXMakeCurrent. Generalise the existing MakeCurrent submission into once that will send MakeCurrent, MakeContextCurrent or MakeCurrentReadSGI, depending on the request and the host server's capabilities, and add decoding/hijack support for incoming MakeContextCurrent and MakeCurrentReadSGI requests. Fixes Clutter → Xephyr → VirtualBox. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Ian Romanick commit 4dd5989d15465f3f3480b521d4e36673972fa24a Merge: 0b02150c2 506e3437c Author: Keith Packard Date: Mon Sep 24 11:43:01 2012 -0700 Merge remote-tracking branch 'ajax/server-1.14-abi-churn' commit 0b02150c27e98f996e10d7489f9f67a30e4e3497 Author: Yufeng Shen Date: Mon Sep 24 14:03:31 2012 -0400 dix: fix scale_to_desktop for edge ABS events Scale_to_desktop() converts ABS events from device coordinates to screen coordinates: [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max] [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max] An edge ABS event with X = dev_X_max (e.g., generated from the edge of a touchscreen) will be converted to have screen X value = screen_X_max, which, however, will be filterd out when xserver tries to find proper Window to receive the event, because the range check for a Window to receive events is window_X_min <= event_screen_X < window_X_max Events with event_screen_X = screen_X_max will fail the test get and rejected by the Window. To fix this, we change the device to screen coordinates mapping to [dev_X_min, dev_X_max] -> [screen_X_min, screen_X_max-1] [dev_Y_min, dev_Y_max] -> [screen_Y_min, screen_Y_max-1] Reviewed-by: Chase Douglas Reviewed-by: Jeremy Huddleston Sequoia Signed-off-by: Yufeng Shen Signed-off-by: Keith Packard commit 7722bcbab2507d263c7685b15cccbfdd52fc3a24 Merge: 4dc2a7674 f54987de9 Author: Keith Packard Date: Sun Sep 23 16:04:13 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 4dc2a76740d921c824a4d8193f39dd373475f02a Author: Adam Jackson Date: Thu Sep 20 17:57:00 2012 -0400 miext/damage: Only wrap into the GC ops chain if there's a listener (v3) before after Operation -------- ----------------- ----------------- 1148346.9 1191807.5 ( 1.04) PutImage 10x10 square 2091666.1 2180983.0 ( 1.04) ShmPutImage 10x10 square v3: In miDamage{R,Unr}egister, bump the serial number of the affected drawable (and all children if it's a window) so subsequent drawing against the damage will trigger another ValidateGC pass and we wrap in/out correctly. Spotted by Aaron Plattner. Signed-off-by: Adam Jackson Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit ad0156c369a40762df6b70780358ce14e5f2c9b1 Author: Adam Jackson Date: Thu Sep 20 11:16:26 2012 -0400 dix: Remove MapUnmapEventsEnabled and friends This hack was added to suppress events generated by Composite's internal unmap/map cycle on redirection state change. Since that cycle was removed in 193ecc8b4, these can go. Signed-off-by: Adam Jackson Reviewed-by: Ville Syrjälä Signed-off-by: Keith Packard commit 387b1ac33ca63d27e42d4f61cf248bafb7c43c17 Author: Adam Jackson Date: Thu Sep 20 11:16:25 2012 -0400 dix: Factor out DeliverUnmapNotify Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit d20cc0fca4e36ad9bdbda8950c4466b1976e70a1 Author: Adam Jackson Date: Thu Sep 20 11:16:24 2012 -0400 dix: Factor out DeliverMapNotify Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 63843cb70030812bb3a311b2e8dfb0d1b0a75176 Author: Adam Jackson Date: Thu Sep 20 11:16:23 2012 -0400 dix: Factor out MaybeDeliverMapRequest Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit dab7a1ec7fd97e07405e0b01dc1f1ec6e5fc2e7c Author: Adam Jackson Date: Thu Sep 20 11:16:22 2012 -0400 dix: Fix some indentation Signed-off-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 3d1051aecbb1955084804133cacd12c7f696833a Author: Peter Hutterer Date: Thu Sep 20 05:56:39 2012 +1000 dix: set the device transformation matrix The property handler is registered after setting the property, so dev->transform remains as all-zeros. That causes pixman_f_transform_invert() to fail (in transformAbsolute()) and invert remains as garbage. This may then cause a cursor jump to 0,0. Since the axes are not yet initialized here and we need to allow for drivers changing the matrix, we cannot use the property handler for matrix initialization, essentially duplicating the code. Triggered by the fix to (#49347) in 749a593e49adccdf1225be28a521412ec85333f4 https://bugzilla.redhat.com/show_bug.cgi?id=852841 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Keith Packard commit 1cb0261ef54b7dd6a7ef84e1c3959e424706228b Author: Daniel Martin Date: Thu Sep 6 00:38:26 2012 +0200 dix: Delete mibstore.h Since Nov 2010 (commit c4c4676) the only purpose of mibstore.h was to define an empty function (miInitializeBackingStore()) for backward compatibility. Time to say goodbye. Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 08a9ed2524679ed939fa0ad466ee3faf905b8ac4 Author: Daniel Martin Date: Thu Sep 6 00:38:25 2012 +0200 dix: Remove refs to mi backing store from docs Remove any reference to mibstore.h and miInitializeBackingStore() from the documentation. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 76d8739b1f4ed07b874ae56a492d1e0aa0fd9b04 Author: Daniel Martin Date: Thu Sep 6 00:38:24 2012 +0200 dix: Remove #includes of mibstore.h Remove more backing store leftovers. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 056fd15deaa85d3ed936df9a3b2e0cdcfa599da8 Author: Daniel Martin Date: Thu Sep 6 00:38:23 2012 +0200 dix: Delete mibstore.c The only reference to mibstore.c was removed with commit c4c4676. Remove the file itself too. Reviewed-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit f54987de97720200ee94eba1c7a737d4ad8c55c8 Author: Jeremy Huddleston Sequoia Date: Thu Sep 20 21:11:21 2012 -0700 XQuartz: Add some verbose logging to debug xp_lock_window being unbalanced Signed-off-by: Jeremy Huddleston Sequoia commit 25d26875bc9bd6fd23ae1b5280f015abf1b033b7 Author: Jeremy Huddleston Sequoia Date: Thu Sep 20 21:49:40 2012 -0700 XQuartz: Avoid a possible deadlock with DRI on OS X 10.7.5 and OS X 10.8.2 http://bugs.winehq.org/show_bug.cgi?id=31751 Signed-off-by: Jeremy Huddleston Sequoia commit 506e3437c73e5ae935ff7c056d7808fbb0c7e614 Author: Adam Jackson Date: Thu Sep 20 14:22:48 2012 -0400 dix: Fix types in WindowOptRec No reason for these to be 64 bits on LP64. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 092c57ab173c8b71056f6feb3b9d04d063a46579 Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit e2c7d70e5ddb8b17676a13ceebfbb87d14d63243 Author: Adam Jackson Date: Fri Jun 17 13:43:38 2011 -0400 dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 31bf81772e146af79b0c456aae2159eba8b0280f Author: Adam Jackson Date: Thu Sep 20 14:00:09 2012 -0400 dix: Repack ClientRec Pick smaller types where possible, including bitfielding some Bools and small enums, then shuffle the result to be hole-free. 192 -> 128 bytes on LP64, 144 -> 96 bytes on ILP32. Signed-off-by: Adam Jackson commit ff8e3ad8074cd2c8bed49b39c40c2b4892118270 Author: Adam Jackson Date: Thu Sep 20 13:16:59 2012 -0400 dix: Pull client-is-local flag up to the ClientRec Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 3f7bc222638d5d38324ecbc8c2c4e39af17d110e Author: Adam Jackson Date: Thu Jun 16 17:40:24 2011 -0400 os: Repack ConnectionOutput for LP64 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit d01921ec18c21f21d377b60626cc2d3418b84a7c Merge: 70e576687 245e7e036 Author: Keith Packard Date: Thu Sep 20 17:26:48 2012 +0200 Merge remote-tracking branch 'ajax/ioperm' commit 5109c7f6581b3e4e23700bfd03b4daf0ba97630e Author: Adam Jackson Date: Thu Sep 20 11:19:39 2012 -0400 xfree86: Bump video ABI to 14 Signed-off-by: Adam Jackson commit 245e7e0361b18766583ae391a2ac1231bb1a1f84 Author: Adam Jackson Date: Tue Jun 26 14:32:31 2012 -0400 xfree86: Change the semantics of driverFunc(GET_REQUIRED_HW_INTERFACES) This is a really awkward interface, since we're calling it well before the driver knows what device it's going to drive. Drivers with both KMS and UMS support therefore don't know whether to say they need I/O port access or not, and have to assume they do. With this change we now call it only to query whether port access might be needed; we don't use that to determine whether to call a driver's probe function or not, instead we call them unconditionally. If the driver doesn't check whether port access was enabled, they might crash ungracefully. To accomodate this, we move xorgHWAccess to be explicitly intentionally exported (sigh xf86Priv.h) so that drivers can check that before they attempt port access. v2: Move initial xf86EnableIO() nearer the logic that determines whether to call it, suggested by Simon Farnsworth. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit d88fb00d791c2b19cf9dd244276838aba3a6b442 Author: Adam Jackson Date: Tue Jun 26 13:15:45 2012 -0400 linux: Make failure to iopl non-fatal We load the driver list, then enable I/O, then call driver probe based on whether I/O enable succeeded. That's bad, because the loaded security policy might forbid port access. We happen to treat that as fatal for some reason, which means even drivers that don't need I/O access (like kms and fbdev) don't get the chance to run. Facepalm. How about we just make that non-fatal instead, that sounds like a much better plan. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit 048674a6aeb61149a1b5f6b0bc3762ddf57f38ee Author: Adam Jackson Date: Tue Jun 26 13:12:45 2012 -0400 linux: Refactor xf86{En,Dis}ableIO Pull platform methods into their own sections for legibility, and rewrite the ifdefs to be more concise. Reviewed-by: Alex Deucher Reviewed-by: Simon Farnsworth Signed-off-by: Adam Jackson commit 70e5766874a919039678bb2ed75f2ccea0cb4345 Author: Dave Airlie Date: Mon Aug 27 15:22:44 2012 +1000 xf86: fix multi-seat video device support. (v2) If we are not seat 0 the following apply: don't probe any bus other than platform don't probe any drivers other than platform assume the first platform device we match on the bus is the primary GPU. This just adds checks in the correct places to ensure this, and with this X can now start on a secondary seat for an output device. v2: fix Seat0 macros Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 37d956e3ac9513b74078882dff489f9b0a7a5a28 Author: Keith Packard Date: Mon Sep 10 11:14:20 2012 +1000 xf86: fix compat output selection for no output GPUs This should work properly with dynamic outputs. Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705 Author: Dave Airlie Date: Thu Sep 13 18:44:06 2012 +1000 config/udev: ignore change on drm devices for input devices we handle change like remove/add, but for drm devices we get change events when we hotplug outputs, so lets just ignore change at this level, and let the drivers handle it. We may in the future want to route driver udev from here instead. Reported-by: Timo Aaltonen Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 10672a5abe7d4e924844d7e41c86c24d6367a52b Author: Dave Airlie Date: Mon Sep 10 14:48:37 2012 +1000 xf86/platform: scan pci after probing devices This solves a race if we are trying to dynamically power off secondary GPUs. Its not the greatest fix ever but it probably as good as we can do for now. The GPU probing causes the devices to be powered up, then when we scan the PCI bus we get the correct information from the kernel, rather than a bunch of 0xff due to the device being powered off. drop gratuitous '&'. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e47ad8a0aec7662970e7f81e6ee487330bf094c1 Author: Dave Airlie Date: Mon Sep 17 11:48:14 2012 +1000 modesetting: remove alloca usage again this slipped back in. Signed-off-by: Dave Airlie commit 22746df15b5f75dc85f5cf5b73932eb8a44cb89b Author: Dave Airlie Date: Thu Sep 6 16:33:54 2012 +1000 dri2: invalidate drawable after sharing pixmap After we share the pixmap, the backing storage may have changed, and we need to invalidate and buffers pointing at it. This fixes GL compositors and prime windows lacking contents initially. Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie commit f8eb8c1cb4f453bdbe6a81815be8ecefba2084aa Author: Alon Levy Date: Tue Aug 28 11:46:47 2012 +1000 modesetting: add virtual connector support [airlied: also make sure we don't crash in future.] Signed-off-by: Alon Levy Signed-off-by: Dave Airlie commit 5eb697d88f0735e98fe9a97770ddda83202b1597 Author: Maarten Lankhorst Date: Thu Sep 13 08:45:14 2012 +0200 bump version to 0.5.0 commit f0bad69edd57facd6cffde8cb0863d1a735e2492 Author: Keith Packard Date: Wed Sep 5 14:45:08 2012 -0700 Version bumped to 1.13 Signed-off-by: Keith Packard commit 856f80c8d7f22b979c72d9c70b70187df6004a03 Merge: 0db936a5b b8ab93dfb Author: Keith Packard Date: Wed Sep 5 11:02:58 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 0db936a5b7125d9b73633733cb34e5e4b72f01e8 Author: Dave Airlie Date: Mon Sep 3 15:09:36 2012 +1000 xf86: call enter/leave VT for gpu screens as well Otherwise we can't do fast user switch properly for multiple GPUs. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit 18deac48db0d2387242461025904eb28a0f71fac Author: Dave Airlie Date: Mon Aug 27 15:17:21 2012 +1000 config/udev: respect seat for hotplugged video devices. This respects the seat tag for hotplugged video devices at X start. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit ec740cffeba59216f4293fba829097654cde3b11 Author: Dave Airlie Date: Mon Aug 27 15:15:19 2012 +1000 config/udev: add wrapper around check if server is not seat 0 this is a simple clean-up that is useful to stop further propogation of this construct. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 49ec57d5094be0dd2b67435ac7bb04ead780f36d Author: Dave Airlie Date: Fri Aug 24 13:23:01 2012 +1000 dix: free default colormap before screen deletion If we don't free this here, it gets freed later in the resource cleanups, however it then looks up up pmap->pScreen, which we freed already in this function. So free the default colormap when we should. This fixes a bug after a couple of hotplug cycles when you try to exit the X server and it crashes. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 20f601a0fbc01a4f8ab85e54ee45f78f7817cdb5 Author: Dave Airlie Date: Fri Aug 24 12:56:18 2012 +1000 xf86/crtc: don't free config->name This is set by pre_init not screen init, so if we free it here and then recycle the server, we lose all the providers. I think we need to wrap FreeScreen here to do this properly, will investigate for 1.14 most likely, safer to just leak this on server exit for now. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit b8ab93dfbc7f292b5bfe7e9113e1af824ccbd1a8 Author: Jeremy Huddleston Sequoia Date: Tue Aug 28 10:06:51 2012 -0700 list: Use offsetof() and typeof() to determine member offsets within a structure Some compilers have difficulty with the previous implementation which relies on undefined behavior according to the C standard. Using offsetof() from (which most likely just uses __builtin_offsetof on modern compilers) allows us to accomplish this without ambiguity. This fix also requires support for typeof(). If your compiler does not support typeof(), then the old implementation will be used. If you see failures in test/list, please try a more modern compiler. v2: Added fallback if typeof() is not present. Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 148583d62b84832369e9df39b3e527b99ca96761 Author: Peter Hutterer Date: Wed Aug 29 09:11:35 2012 +1000 tests: move GCC diagnostics pragma outside of function This is a a gcc 4.6+ feature. signal-logging.c:210: error: #pragma GCC diagnostic not allowed inside functions Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit c75c947b6e9bc725821b28835f3667c4aabef9ee Author: Jeremy Huddleston Sequoia Date: Tue Aug 28 12:43:55 2012 -0700 test/list: Fix test_xorg_list_del test We never use child[2], so it's state is undefined. This issue seems to have existed since the test was first written: 92788e677be79bd04e5ef140f4ced50ad8b1bf8e Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit 486038fe16957b39d39842365c5409c494c9a8df Author: Jeremy Huddleston Sequoia Date: Mon Aug 27 22:35:51 2012 -0700 XQuartz: Bump Info.plist version to 2.7.4 Signed-off-by: Jeremy Huddleston Sequoia commit b90b3f6eac34616c46ab693fafbf6b73a04f407b Author: Jeremy Huddleston Sequoia Date: Mon Aug 27 17:15:19 2012 -0700 test: Make os test more compliant sighandler_t is not UNIX. Regression from: 7f09126e068015db54c56bb982b8f91065375700 Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Peter Hutterer commit a557edca6152ad09c685a00e01534c35a1f00f2e Merge: 6619f5c0e 24ffcfcde Author: Keith Packard Date: Mon Aug 27 08:06:09 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 24ffcfcded6b4b024958801e8a6cecad36d9a3e3 Author: Peter Hutterer Date: Mon Aug 20 10:28:26 2012 +1000 os: fix typo, fsync when WIN32 is _not_ defined Introduced in 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 Reported-by: Jon TURNEY Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit d53e6e02a2595ced1882f5fcd34d08ea039b3b85 Author: Peter Hutterer Date: Thu Aug 16 13:54:42 2012 +1000 mi: don't check for core events in miPointerSetPosition (#53568) As of 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d, miPointerSetPosition now returns the screen pointer of the device. This broke floating slave devices, as soon as a motion event was submitted, miPointerSetPosition returned NULL, crashing the server. dev->coreEvents is only false if the device is a floating slave, in which case it has a sprite. X.Org Bug 53568 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6619f5c0e1086b57888ff7146e8ed5897b50d440 Author: Keith Packard Date: Tue Aug 21 13:46:34 2012 -0700 Relase 1.12.99.905 RC with updated ABI version numbers. Signed-off-by: Keith Packard commit bafbd99080be49a17be97d2cc758fbe623369945 Author: Peter Hutterer Date: Wed Aug 8 11:34:32 2012 +1000 dix: work around scaling issues during WarpPointer (#53037) In WarpPointer calls, we get input in screen coordinates. They must be scaled to device coordinates, and then back to screen coordinates for screen crossing and root coordinates in events. The rounding errors introduced (and clipping in core/XI 1.x events) can lead to the actual position being different to the requested input coordinates. e.g. 200 scales to 199.9999, truncated to 199 in the event. Avoid this by simply overwriting the scaled screen coordinates with the input coordinates for the POINTER_SCREEN case. X.Org Bug 53037 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 1ebba43052d68d874148e63c9ae38489ddfc5ec1 Author: Peter Hutterer Date: Wed Aug 15 14:49:04 2012 +1000 os: don't block signal-unsafe logging, merely warn about it. Throw an error into the log file, but continue anyway. And after three warnings, stop complaining. Not all input drivers will be fixed in time (or ever) and our printf implementation is vastly inferior, so there is still a use-case for non-sigsafe logging. This also adds more linebreaks to the message. CC: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4912b4adb666dad96b832ab2d7caaae49808723e Author: Peter Hutterer Date: Mon Aug 13 14:44:44 2012 +1000 os: add support for %d and %i to pnprintf The mouse driver uses %i in some debug messages Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7f8c39c8b5ef89153ecd84d16331e96d8feb18ef Author: Peter Hutterer Date: Mon Aug 13 14:24:36 2012 +1000 Add FormatInt64 to convert signed integers in signal-safe manner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 36c1d92ec0ef0f3927034a12d4cb79dcc22bd185 Author: Peter Hutterer Date: Mon Aug 13 12:24:39 2012 +1000 test: add a few tests for signal-safe logging Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b69536b475118a8787c1726355b504207bf83f8f Author: Peter Hutterer Date: Mon Aug 13 11:15:54 2012 +1000 test: assert from signal-safe number conversion Throw an assert when the conversion fails instead of just returning. Asserts are more informative. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3e091e1075dc29120e54ab2ef110b04ce7383ffd Author: Aaron Plattner Date: Fri Aug 17 11:26:05 2012 -0700 xfree86: Bump extension ABI to 7.0 Commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 added an array of DevPrivateSetRec structures in the middle of the ScreenRec, which throws off extension modules trying to call things like pScreen->DestroyPixmap. Signed-off-by: Aaron Plattner Signed-off-by: Keith Packard commit ac616d8ed5a634c6b32775eb7b071a13c575fd97 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 19:09:42 2012 -0700 XQuartz: Use asl_log_descriptor for children as well This change is #if'd out due to a bug in asl_log_descriptor, but it is left here as reference to be enabled in the future. Signed-off-by: Jeremy Huddleston Sequoia commit ad123071e54d890d36d1373f59b8a6eb4937e936 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 13:02:28 2012 -0700 XQuartz: Use asl_log_descriptor on Mountain Lion Signed-off-by: Jeremy Huddleston Sequoia commit 7c3d2e4828deb4e8ec38e8ef88d6f92b2d931033 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 19:42:54 2012 -0700 XQuartz: console_redirect: Properly zero-out the tail of the array on realloc() We forgot to multiply by sizeof(), so it wasn't fully zeroed out. Signed-off-by: Jeremy Huddleston Sequoia commit a32e01802ff1c938c0afe0cc007a273b9ada8610 Author: Jeremy Huddleston Sequoia Date: Thu Aug 16 15:43:34 2012 -0700 XQuartz: console_redirect: Set the correct location for reading into the buffer Prior to this change, it was possible that a large message would have some of its data prepended to subsequent messages due to our not incorrectly setting the location to write into the buffer. Signed-off-by: Jeremy Huddleston Sequoia commit e3d7d5d18e3281677890064679af459e1af108cf Author: Adam Jackson Date: Thu Jul 19 22:15:10 2012 +0000 Implement ->driverFunc Copied from fbdev, makes it so we can run without iopl. Signed-off-by: Adam Jackson commit ad5fe2d9614959b68bf71e23abf7e5abac9c2734 Merge: 16d8da5ca 99b94af1f Author: Keith Packard Date: Wed Aug 15 13:29:17 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 16d8da5ca99211bd180f532d78d7c5943d38c8ad Author: Paul Berry Date: Tue Jul 31 15:15:56 2012 -0700 glx: Skip multisampled configs when matching pre-existing X visuals. In __glXScreenInit() we generate the set of GLX visuals in two steps: first we match each pre-existing X visual with a corresponding FBConfig, then we generate a new X visual to correspond to all the remaining FBConfigs. The first step is used for the two default 24-bit visuals (true color and direct color) and for the 32-bit visual. If windowsystem multisampling is enabled in Mesa, we need to ensure that none of these three visuals gets matched to a multisampled config. Fixes a bug with windowsystem multisampling in gnome-shell. If the X server happens to match up a multisampled FBConfig to the 32-bit visual, gnome-shell will try to use it to read pixels from alpha-blended windows (such as gnome-terminal), resulting in no window appearing on screen. Reviewed-by: Ian Romanick Reviewed-by: Chad Versace Signed-off-by: Keith Packard commit 99b94af1ffbef7047f88e7d6c594242d172bec02 Author: Jeremy Huddleston Date: Wed Aug 15 10:28:16 2012 -0700 XQuartz: Fix build regression for GlxExtensionInit quartz.c:153:6: error: use of undeclared identifier 'GlxExtensionInit'; did you mean 'GEExtensionInit'? [Semantic Issue] {GlxExtensionInit, "GLX", &noGlxExtension}, Regression-from: aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Jeremy Huddleston commit c0540b4c8db676d18a9a09828f1590b0b16f9ebc Author: Keith Packard Date: Tue Aug 7 17:49:48 2012 -0700 Kludge -- Call RandR screen before cleaning up xf86 crtcs The core RandR screen cleanup now involves cleaning up any GPU screen associations, and those call down into DDX to clean up the driver. If the pointers from the xf86 structures back to the core randr structures are set to NULL at that point, bad things happen. This patch "knows" that the core RandR close screen is underneath the xf86 randr close screen function, and so makes sure it gets called first. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 288b87e42cbb5db34cda848143655e84af8455da Author: Keith Packard Date: Tue Aug 7 17:49:47 2012 -0700 Close GPU screens before core screens This should make cleaning up the GPU screens easier as the core screens they are associated with will still be around. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 19772670e3041fe1c7f5bbf32fa039a6d8245ccb Author: Keith Packard Date: Tue Aug 7 17:49:46 2012 -0700 Only free Render filter names on last screen close Hotplugging screens causes the render filter names to get freed while still in use; wait for the last core screen to be closed before freeing them. That only happens at server reset, when we want them to be freed. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 863d528a9f76d0e8f122aebf19f8564a4c67a938 Author: Simon Schubert <2@0x2c.org> Date: Sun Aug 12 09:40:16 2012 -0700 fb: reorder Bresenham error correction to avoid overshoot. When fbBresSolid draws a line, it can happen that after the last pixel, the Bresenham error term overflows, and fbBresSolid paints another pixel before adjusting the error term. However, if this happens on the last pixel (len=0), this extra pixel might overshoot the boundary, and, in rare cases, lead to a segfault. Fix this issue by adjusting for the Bresenham error term before drawing the main pixel, not after. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24274 Signed-off-by: Simon Schubert <2@0x2c.or> Tested-by: Mitch Davis Signed-off-by: Matt Turner Signed-off-by: Keith Packard commit c22c936b35cee60609041ccb7ee52c00b0634d7b Author: Keith Packard Date: Tue Aug 7 16:04:25 2012 -0700 Release 1.12.99.904 Closing the non-critical bug window for 1.13 Signed-off-by: Keith Packard commit f94ec283efc922106e7ea1d85771950c66ee8f3b Author: Keith Packard Date: Tue Aug 7 16:18:21 2012 -0700 Distribute include/glx_extinit.h This changed should have been in aad428b8e21c77397c623b78706eb64b1fea77c9 Signed-off-by: Keith Packard commit 9ca67de8feab59fcf7d6e3fdec8d8a7cfbb21651 Author: Julien Cristau Date: Sat Jul 14 16:07:51 2012 +0200 Bump glproto requirement to 1.4.16 Signed-off-by: Julien Cristau Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 02f94b2d446f6700f791f318c551ac835af8445a Merge: 360fa7736 7f09126e0 Author: Keith Packard Date: Mon Aug 6 16:52:12 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 360fa7736b214cae3ccd39feb4dc87b9e7e9734c Merge: 2100e7238 ac09a4a09 Author: Keith Packard Date: Mon Aug 6 16:42:34 2012 -0700 Merge remote-tracking branch 'airlied/for-keithp' commit 2100e72388a3dc174093d80c9723f021b4614d17 Merge: 4a6f42dda c37c65052 Author: Keith Packard Date: Mon Aug 6 16:40:54 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 7f09126e068015db54c56bb982b8f91065375700 Author: Peter Hutterer Date: Fri Aug 3 15:36:34 2012 +1000 os: don't unconditionally unblock SIGIO in OsReleaseSignals() Calling OsReleaseSignal() inside the signal handler releases SIGIO, causing the signal handler to be called again from within the handler. Practical use-case: when synaptics calls TimerSet in the signal handler, this causes the signals to be released, eventually hanging the server. Regression introduced in 08962951de. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit cb306a8f174bec9ded95191b91797f59250e6808 Author: Peter Hutterer Date: Tue Jul 31 16:09:38 2012 +1000 dix: make sure the mask is set for emulated scroll events (#52508) If a device has smooth scrolling axes, but submits scroll button events, we convert those to motion events and update the valuators. For legacy button events, the valuator mask is likely unset though, causing add_to_scroll_valuator() to return early, leaving us with an empty mask. That again skipped the rest of the code and no events were generated. Fix it by making sure that the scroll valuator in the mask is at least initialized to 0. Broke evdev wheel emulation, introduced by 54476b5e4461ff523e935961affabcf0de12c556. X.Org Bug 52508 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4a6f42dda00ba3b5616f8a86f0d4c9a652c7d9d4 Author: Adam Jackson Date: Mon Jul 23 16:34:28 2012 -0400 sync: Fix logic error from b55bf248581dc66321b24b29f199f6dc8d02db1b That commit adds two hunks, and I _think_ they're backwards. It adds code to modify bracket_greater on NegativeTransition triggers, and bracket_less on PositiveTransition triggers. That breaks symmetry with the surrounding code; the code as of this commit could probably be simplified further. I can't keep the sync trigger rules in my head for more than about five minutes at a time, so I'm sending this on for more eyes. RHEL 6.3's xserver is shipping with b55bf248 reverted: https://bugzilla.redhat.com/show_bug.cgi?id=748704#c33 And there appear to be some upstream reports of the same issue: https://bugzilla.gnome.org/show_bug.cgi?id=658955 So I'd like to get this sorted out. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 454d0e3a1bb14d7f2579ccb5e513cec5686160e7 Author: Dave Airlie Date: Thu Jul 26 12:56:51 2012 +1000 randr: fix xinerama output for output slaves This fixes the xinerama geometry when output slaves are enabled. Tested with xdpyinfo -ext XINERAMA before after slave added. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit ac09a4a091a43188241365152e1244fd8fd93ee7 Author: Dave Airlie Date: Fri Aug 3 16:43:22 2012 +1000 dri2: fix master pixmap free and reset pointer These are two minor changes, one to reset the pointer to NULL, after freeing the pixmaps, one to make sure we use the right API for the master pixmap, though I doubt it'll ever really matter. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 64623ef90db649e89345f71871affe7a9606f6ea Author: Dave Airlie Date: Fri Aug 3 16:42:44 2012 +1000 dri2: free slave pixmap on app exit When the drawable disappears we need to free the prime master/slave combos. This fixes a leak after a prime app is run. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit 1a465fef9bc21142eecca3999f0761a3c0501a09 Author: Dave Airlie Date: Fri Aug 3 16:41:45 2012 +1000 pixmap: have slave pixmap take a reference on master pixmap Since the free routines free the master pixmap then the slave, we should be taking a reference when we bind them together. Fixes a use-after-free when resizing a primed gears. Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher commit c37c65052f674cd58894ad0b9ec22928a62c624e Author: Alan Coopersmith Date: Mon Jul 16 21:12:06 2012 -0700 Make indentation of dix/tables.c much more consistent and readable Signed-off-by: Alan Coopersmith Acked-by: Daniel Stone commit 9f7ef7f7f0566f6319d8328ce0a1e6d0fa866720 Author: Alan Coopersmith Date: Mon Jul 16 20:53:00 2012 -0700 Fix up formatting of initializers for arrays of structs The indenter seems to have gotten confused by initializing arrays of structs with the struct defined inline - for predefined structs it did a better job, so match that. Signed-off-by: Alan Coopersmith commit c7b7abfaa068042e396d19538215402cfbb4f1e4 Author: Alan Coopersmith Date: Sat Jul 14 11:21:15 2012 -0700 RRModeCreate: plug memory leak of newModes if AddResource fails Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with realloc(((char*)modes), ((num_modes + 1) * 8)) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 82 with realloc(((char*)modes), ((num_modes + 1) * 8)). Error: Memory leak (CWE 401) Memory leak of pointer 'newModes' allocated with malloc(8) at line 93 of randr/rrmode.c in function 'RRModeCreate'. pointer allocated at line 84 with malloc(8). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 1eb7be863353be2cf3e83738253eb60c5fe49d19 Author: Alan Coopersmith Date: Sat Jul 14 09:29:52 2012 -0700 rrproperty.c: free newly allocated prop in more error paths Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 220 of randr/rrproperty.c in function 'RRChangeOutputProperty'. 'prop' allocated at line 154 with RRCreateOutputProperty(property). prop leaks when pending != 0 at line 160. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateOutputProperty(property) at line 346 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). at line 350 of randr/rrproperty.c in function 'RRConfigureOutputProperty'. 'prop' allocated at line 334 with RRCreateOutputProperty(property). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 42e655de4d95cb108aec50efec6bbdb709bb13d7 Author: Alan Coopersmith Date: Tue Jul 10 23:29:53 2012 -0700 rrproviderproperty.c: free newly allocated prop in more error paths Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 221 of randr/rrproviderproperty.c in function 'RRChangeProviderProperty'. 'prop' allocated at line 155 with RRCreateProviderProperty(property). prop leaks when pending != 0 at line 161. Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with RRCreateProviderProperty(property) at line 345 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). at line 349 of randr/rrproviderproperty.c in function 'RRConfigureProviderProperty'. 'prop' allocated at line 333 with RRCreateProviderProperty(property). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 94b514d5e4b376d05e106eb3853da511256e8545 Merge: 7d87545ba 732890004 Author: Keith Packard Date: Mon Aug 6 15:13:17 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 7d87545ba7395ade507cca7bdca7052b26ed18d8 Merge: ad707a7dc 988d7ace1 Author: Keith Packard Date: Mon Aug 6 15:11:13 2012 -0700 Merge remote-tracking branch 'jturney/master' commit ad707a7dcc65c30e030c7600b54f734090e56a91 Merge: 5a51cb86f 884f51e97 Author: Keith Packard Date: Mon Aug 6 15:08:01 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 5a51cb86f39a6809305c403beea54c3625e36259 Author: Keith Packard Date: Tue Jul 10 23:09:47 2012 -0700 xfree86: When xf86CrtcCloseScreen is called, the randr CRTCs are gone The RandR CRTC structures are freed when their resource IDs are destroyed during server shut down, which is before the screen is closed. Calling back into RandR with stale pointers just segfaults the server. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie Tested-by: Knut Petersen commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d Author: Rui Matos Date: Mon Jul 30 14:32:12 2012 -0400 xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled Panning is at odds with CRTC cursor confinement. This disables CRTC cursor confinement as long as panning is enabled. Fixes regression introduced in 56c90e29f04727c903bd0f084d23bf44eb1a0a11. Reviewed-by: Adam Jackson Signed-off-by: Rui Matos Signed-off-by: Keith Packard commit ff56f88616aa63797384c2c484b2bd0f194df96a Author: Adam Jackson Date: Mon Jul 30 14:32:11 2012 -0400 randr: Fix up yet another corner case in preferred mode selection Let's say - purely for the sake of argument, mind you - that you had a server GPU with anemic memory bandwidth, and you walked up to it and plugged in a monitor that was 1920x1080 because that's what happened to be on the crash cart. Say the memory bandwidth is such that anything larger than 1280x1024 gets filtered away. Now you're in trouble, because the established timings section includes a 720x400 mode because that's what DOS 80x25 is, and that happens to just about match the physical aspect ratio. Instead let's reuse the logic from the existing aspect-match path: pick the larger mode of either the physical aspect ratio or 4:3. Reviewed-by: Julien Cristau Signed-off-by: Adam Jackson Reviewed-by: Alex Deucher Signed-off-by: Keith Packard commit 531785dd746d64ef7f473a83ca73bb20e74b6fca Author: Dave Airlie Date: Mon Jul 30 14:32:10 2012 -0400 kinput: allocate enough space for null character. This code wasn't allocating enough space and was assigning the NULL one past the end. Pointed out by coverity. Reviewed-by: Jeremy Huddleston Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 8843aed82e7d69422e7763a35832a2be8f26723f Author: Vic Lee Date: Mon Jul 30 14:32:09 2012 -0400 ephyr: Resize screen automatically when parent window is resized Bugzilla: https://bugs.freedesktop.org/25804 Reviewed-by: Adam Jackson Signed-off-by: Vic Lee Signed-off-by: Keith Packard commit b46bbafae6d0a8b3f2f7853d5c1475fc223b1ed6 Author: Adam Jackson Date: Mon Jul 30 14:32:08 2012 -0400 ephyr: Fix up some bizarre formatting Signed-off-by: Adam Jackson Signed-off-by: Keith Packard commit 7328900042b9c1312aed48753fd6054e64613e4c Author: Alan Coopersmith Date: Mon Jul 30 23:37:06 2012 -0700 XIChangeDeviceProperty: free newly allocated prop when SetProperty fails Reported by parfait 1.0: Error: Memory leak (CWE 401) Memory leak of pointer 'prop' allocated with XICreateDeviceProperty(property) at line 774 of Xi/xiproperty.c in function 'XIChangeDeviceProperty'. 'prop' allocated at line 700 with XICreateDeviceProperty(property). prop leaks when handler != NULL at line 768 and handler->SetProperty != NULL at line 769 and checkonly != 0 at line 772 and rc != 0 at line 772. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4dbbcdf64563cb95f83c04b2442cb7e868384264 Author: Daniel d'Andrada Date: Thu Jul 26 17:31:57 2012 -0300 Do sent TouchEnd to listeners that don't own an accepted touch When the owner of a touch accepts it, the other listeners must receive a TouchEnd. Even though there's code implementing the logic above in ProcessTouchOwnershipEvent(), DeliverTouchEndEvent() was refusing to send those TouchEnd events in this situatuation. Signed-off-by: Daniel d'Andrada Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 02d91ccb0955252153206061a44340f051077624 Author: Peter Hutterer Date: Thu Jun 21 15:42:17 2012 +1000 test: always add DIX_LIB and OS_LIB on XORG builds With --disable-xorg, We also disabled a bunch of tests because of their perceived reliance on a DDX. The cause was libtool missing some object files that never ended up in libxservertest.la. Only the xfree86 test has a true dependency on XORG. DIX_LIB was pointing to dix.O (instead of libdix.la) when DTRACE_SPECIAL_OBJECTS was defined. libdix.la should be part of XSERVER_LIBS but dix.O is not a recognised libtool object, so it got skipped for libxservertest.a. Only in the XORG case would we add DIX_LIB and OS_LIB manually, thus forcing linkage with the dtrace-generated objects. Fixing this by packaging up the dtrace-generated files as part of libdix.la/libos.la doesn't work for Solaris (and possible others), so simply always force linkage against the DIX_LIB/OS_LIB in the case of dtrace objects. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Tested-by: Alan Coopersmith commit 988d7ace19a009991a4528e783d1a94c2444c66a Author: Jon TURNEY Date: Thu Jul 5 09:38:44 2012 +0100 glx: Do not report the GLX_INTEL_swap_event extension for indirect swrast Commit 84956ca4 bogusly adds GLX_INTEL_swap_event to the extensions reported by swrast. "DRI2 supports this now - and already enables it explicitly - but drisw does not and should not. Otherwise toolkits like clutter will only ever SwapBuffers once and wait forever for an event that's not coming." (A similar bug for direct swrast is already fixed in mesa commit 25620eb1) (Note that this may be papering over the cracks somewhat, as if we do report GLX_INTEL_swap_event, some clutter apps fail with GLXBadDrawable calling GLXChangeDrawableAttributes to change the setting of GLX_BUFFER_SWAP_COMPLETE_INTEL_MASK in the GLX_EVENT_MASK, apparently after the drawable is destroyed, which suggests a bug with GLXDrawable lifetimes) Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit fd3d45c137bb849aa9030d732ea9277292e01d3d Author: Jon TURNEY Date: Thu Jul 5 09:34:24 2012 +0100 glx: Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. Don't note GLX_INTEL_swap_event as being required by GLX 1.4, it isn't. (This data is not currently used in the server) (A similar change is made in mesa commit d3f7597bc9f6d5) Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit a8464dfa28dea78201e3e4398eb3bcb745e10087 Author: Colin Harrison Date: Sun Jul 22 13:15:02 2012 +0100 os: Fix TMP fall-back in Win32TempDir() Fix Win32TempDir() in the case where we fell back to checking the TMP environment variable. It looks like this has been wrong since forever. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit f6e7b82acadfca8239edc0f7e72cd0f3f9cfc2c4 Author: Marc Haesen Date: Sat Jul 21 21:18:44 2012 +0100 hw/xwin: Fixes to pixelFormat <-> fbConfig conversion in WGL mode Fix FIXME in fbConfigToPixelFormat() to correctly populate RGBA-mask shift parameters. Also request colourindex pixelFormats correctly. Now that they are requested correctly, don't skip colorindex visuals when converting pixelFormats to fbConfigs. Populate transparent colour information when converting pixelFormat from DescribePixelFormats() to a fbConfig. Signed-off-by: Marc Haesen Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 45c432871d6a244e9e558a6a4e7c36e90764135e Author: Jon TURNEY Date: Sat Jul 21 14:13:37 2012 +0100 hw/xwin: Introduce winProcessXEventsTimeout() to the concept of fractions of a second Oh this is terrible. Currently we only compute the select timeout in whole seconds. This means if we have less than 1 second remaining, we select with a timeout of 0 (i.e. poll) which causes the task to spin, burning 100% CPU for the remaining timeout (and possibly preventing the process we are waiting for from running :S) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 23cd4d0174194e10721d2e465fd1a1c52f001520 Author: Jon TURNEY Date: Sat Jul 21 12:33:05 2012 +0100 hw/xwin: Fix winUpdateWindowPosition() not to assume WS_EX_APPWINDOW style Also improve it's debug output a bit Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 527cf13135cfd279733060e0028bbfbe02be5167 Author: Jon TURNEY Date: Sat Jul 21 14:09:16 2012 +0100 hw/xwin: Make winOverrideIcon() thread-safe for icon data access winOverrideIcon() is called from the internal WM client thread. Accessing server-internal data structures to get icon data or window hints is not safe, as there is no lock to ensure we do not collide with these data structures being updated in the server thread. Rewrite so the internal client thread uses X client calls to obtain this data safely We used to also set the icon inside the server when the window was initially created. For simplicity, we simply send a message to the internal WM to update the icon when the window is created (rather than writing different icon update code which can work in the server thread for that one case...) extwm mode used to do the icon update in the server. I'm not sure that actually made much sense. Let's assume the external WM client can do it instead... v2 Make sure that WM_WM_ICON_EVENT does nothing for override-redirect windows v3 Reinstate check that native window actually has expected properties for an X window before trying to update it's icon; some auxiliary windows owned by the XWin process don't, which would cause a crash v4 Various fixes to pixmap icon conversion: - remove left-over malloc in winScaleXimageToWindowsIcon causing a memory leak - don't recalculate DDBitmap stride in winScaleXimageToWindowsIcon, when we already have worked it out - properly check that XGetWindowProperty(NET_WM_ICON) returned some data - don't try to retrieve WM_HINTS icon_mask if it isn't set - restore accidentally dropped calculation of effBpp, stride, maskStride of output DDBitmap - make sure imageMask is zero-initalized before we use it to mask the DDBitmap v5 Remove a left-over unused variable v6 Avoid XDestroyImage(NULL) crash if XGetImage failed for icon_pixmap Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2677d89823b851fea31036f51589985bb86864b7 Author: Jon TURNEY Date: Sun Jul 22 17:38:55 2012 +0100 hw/xwin: Also update icon when _NET_WM_ICON property changes _NET_WM_ICON property is also considered to decide on the window icon, so also send a WM_WM_ICON_EVENT message to the WM if the PropertyNotify event is for _NET_WM_ICON property Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a07541f1ffc28c57a762beefb96c7bf0ac40b0a4 Author: Jon TURNEY Date: Sun Jul 22 16:15:12 2012 +0100 hw/xwin: Rename WM_WM_HINTS_EVENT to WM_WM_ICON_EVENT WM_WM_HINTS_EVENT only updates the icon, so rename it to WM_WM_ICON_EVENT Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 2a47c91eb382d1ff0fb009a39efa7dc9c6fd5112 Author: Jon TURNEY Date: Fri Jul 20 13:51:35 2012 +0100 hw/xwin: Refactor Xutf8TextPropertyToString() from GetWindowName() as a separate utility function Simplify GetWindowName() by moving UTF-8 to wchar conversion out to it's call site. This allows us to do extra processing on the window name in future. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 884f51e9770c9ccd3b38a14ea393ea2c7a5ef235 Author: Jeremy Huddleston Sequoia Date: Wed Aug 1 18:46:08 2012 -0700 XQuartz: Fix xp_window_bring_all_to_front linking on OS versions with older libXplugin Found-by: Tinderbox Signed-off-by: Jeremy Huddleston Sequoia commit b4c2358e0a388730f1beda5d3a12e79755208ce6 Author: Jeremy Huddleston Sequoia Date: Wed Aug 1 18:45:43 2012 -0700 pbproxy: Fix a warning about a bad method prototype x-selection.m:1502:1: warning: method has no return type specified; defaults to 'id' [-Wmissing-method-return-type,Semantic Issue] - init ^ (id) 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia commit f193907f1b2f8d17dac9b59b7e93ddbb0f4e31ca Author: Jon TURNEY Date: Fri Jun 22 14:56:22 2012 +0100 Fix pseudoramiX.c compilation without darwin.h Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit 067931ccce592e319baffa26d4f7380d8d924537 Author: Jon TURNEY Date: Mon Jul 23 12:16:36 2012 +0100 hw/xquartz: Various fixes for pseudoramiX.c Various fixes, applied to panoramiX.c in commit 2b266eda, also need applying to pseudoramiX.c: Fix panoramiX request and reply swapping Set window and screen values in panoramix replies Prevent buffer overrun in ProcPanoramiXGetScreenSize These fixes seem to be necessary in order to compile pseudoramiX.c with gcc pseudoramiX.c: In function 'ProcPseudoramiXGetState': pseudoramiX.c:221:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c: In function 'ProcPseudoramiXGetScreenCount': pseudoramiX.c:250:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c: In function 'ProcPseudoramiXGetScreenSize': pseudoramiX.c:283:56: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap pseudoramiX.c:284:57: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap Signed-off-by: Jon TURNEY Reviewed-by: Jeremy Huddleston Sequoia commit aad428b8e21c77397c623b78706eb64b1fea77c9 Author: Dave Airlie Date: Thu Jul 26 09:54:08 2012 +1000 glx: drop GLX_LIBS from X server and workaround sdksyms. We've had reports of two copies of the GLX bits, one in the server and one in libglx.so causing problems, I didn't understand why the X server needed a copy so drop it, however then we have to fix a missing GlxExtensionInit that comes from sdksyms, so work around it by moving that one declaration into a header that sdksyms doesn't scan. Thanks to Jon Turney for debugging the actual problem. (copyright header from extinit.h that seems most appropriate put on top). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=52402 Tested-by: Peter Hutterer Reviewed-by: Daniel Stone Tested-by: Jon TURNEY Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit afa53fe7cffd430cf11f25ca818cb955a78c0c1c Author: Keith Packard Date: Wed Jul 25 14:29:48 2012 -0700 Version 1.12.99.903 (1.13 RC3) Signed-off-by: Keith Packard commit 98e3f3fde35ca805d44ee38394bfd86058f9f4b8 Author: Adam Jackson Date: Thu Jul 19 15:00:05 2012 -0400 doc: Drop XAA references from xorg.conf man page Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit dea928477bf835a13b2bd2b16c0dbaaf5468130c Author: Adam Jackson Date: Thu Jul 19 15:00:04 2012 -0400 xfree86: Drop some dead XAA decls from SDK headers Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit a44a379a2a4c198dbd6ffd6cc0db376f8fb64327 Author: Adam Jackson Date: Thu Jul 19 15:00:03 2012 -0400 cw: Remove XAA was the only consumer. Signed-off-by: Adam Jackson Reviewed-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Alex Deucher Reviewed-by: Daniel Stone Acked-by: Aaron Plattner Signed-off-by: Keith Packard commit 20b4d90f32b3ca5def5be2fdf04a91ae6c47f125 Merge: 83df16953 fd228d318 Author: Keith Packard Date: Wed Jul 25 13:52:35 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit fd228d318428d0d9dea52ca560a9b66660dd2d02 Author: Jeremy Huddleston Date: Wed Jul 25 11:40:33 2012 -0700 XQuartz: Call xp_window_bring_all_to_front if available in libXplugin Signed-off-by: Jeremy Huddleston commit 83df169538bddcf3a61e2c5e02a4f3e10af93b60 Author: Aaron Plattner Date: Fri Jul 20 00:59:20 2012 -0700 dix: don't use "new" as a parameter name "new" is a reserved word in C++. Signed-off-by: Aaron Plattner Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 02811f1a9cc35c5f82accb0459cb3910165e7e45 Author: Dave Airlie Date: Thu Jul 19 14:12:59 2012 +1000 modesetting: add output slave support. This allows the driver to operate as an output slave. It adds scan out pixmap, and the capability checks to make sure they available. Signed-off-by: Dave Airlie commit fa171c5a81b1c226b5da54f35e6726d9c8e13afb Author: Dave Airlie Date: Tue Jun 5 14:43:21 2012 +0100 modesetting: add platform bus support commit 709dbc68cdea9d282ba318c1cbc76614e98f41c4 Author: Dave Airlie Date: Wed Jul 25 15:38:34 2012 +1000 modesetting: fix warning about close being undefined. Signed-off-by: Dave Airlie commit 71b86ea8dd69f21d090edd4f61698ad11b952d5e Author: Dave Airlie Date: Wed Jul 25 15:33:52 2012 +1000 modesetting: drop useless xf86PciInfo include Signed-off-by: Dave Airlie commit 3b7f313b3d74f9df876152c55d55cbb339bf2d02 Author: Jeremy Huddleston Date: Tue Jul 24 00:32:30 2012 -0700 XQuartz: Fix runtime regressions introduced by extension loading changes * GLX is now loaded * PseudoramiX loading is back in miinitext. It needs to be loaded before RandR. Regression-from: 27a624bee66d2797eacf90317054207dcf248028 Regression-from: 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 Signed-off-by: Jeremy Huddleston commit 0d64e881a31d89d28f2ded9b8e83e93632870a16 Author: Jeremy Huddleston Date: Mon Jul 23 23:16:29 2012 -0700 XQuartz: Build fix for __GLXscreen::createContext changes Regression-from: 96d74138b1c0273e88933220d99a893858b649cd Signed-off-by: Jeremy Huddleston commit 77de2994774e7be24a0bad521180628feb1027c6 Author: Keith Packard Date: Tue Jul 17 15:47:39 2012 -0700 Bump to version 1.12.99.902 Signed-off-by: Keith Packard commit beeea70495a8d5c4afc1b1eb2cc06a24ab1a986d Merge: 6e438a0e1 691028029 Author: Keith Packard Date: Tue Jul 17 12:17:39 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 6e438a0e183f5a6c22070746c038af53d5b935ca Merge: 5884e7ded 75966a418 Author: Keith Packard Date: Tue Jul 17 12:12:53 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 75966a4186955f3a4625e93796145036c5986d2e Author: Keith Packard Date: Fri Jul 13 14:36:25 2012 -0700 xwin: Clean up os wrappers for System, Popen and Pclose on Windows Popen and Pclose are never used on Windows, so don't bother to even try to define them. System(s) was defined as system(s), but the two users of that function are in xkb, which carefully redefines that as Win32System. Move Win32System and Win32TempDir to os/utils.c, renaming Win32System to be just System, which simplifies the xkb code Signed-off-by: Keith Packard Reviewed-by: Jon TURNEY commit 6910280297ab610100dd8e7fbe5bb5cc08968f2f Author: Alan Coopersmith Date: Sat Jul 14 10:54:36 2012 -0700 Use C99 designated initializers in DRI2GetParam replies DRI2GetParam was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit a6c5b8d3ee053cadf685b0e4de96407ad6df4dd4 Author: Alan Coopersmith Date: Sat Jul 14 10:50:41 2012 -0700 Use C99 designated initializers in RandR 1.4 extension Events RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit ada04ef0ca8a1213e865ba2c000ccd6ed6d0e371 Author: Alan Coopersmith Date: Sat Jul 14 10:45:29 2012 -0700 Use C99 designated initializers in RandR 1.4 extension Replies RandR 1.4 was going through review in parallel with main batch of C99 initialization changes - sync up now that both have landed. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit fb73f7f40fa46458990038332017d4496caa0691 Author: Alan Coopersmith Date: Sat Jul 14 10:02:52 2012 -0700 Fix two more C99 initialization mistakes using members of same struct Similar to 34cf559bcf99dad, use temporary variables instead of referencing members of the struct being initialized in the middle of the initialization. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 5884e7dedecdd82ddbb037360cf9c85143e094b5 Author: Aaron Plattner Date: Mon Jul 16 17:40:31 2012 -0700 xf86: Re-export extension disable flags These flags were unexported by commit a1d41e311c21eb6627caa0d168e070ceaf90806f, which moved the declarations around and lost the _X_EXPORT attributes in the process. Since drivers need these and it's late in the release cycle, just re-export them for now. Signed-off-by: Aaron Plattner Reviewed-by: Andy Ritger Signed-off-by: Keith Packard commit 357ec54f46d31ff77c441c15c322152e04f89a11 Author: Jon TURNEY Date: Wed Mar 14 13:58:32 2012 +0000 hw/xwin: Refer to xkeyboard-config man page for XKB configuration option values Also polish the keyboard configuration text a bit Include man section number in references to setxkbmap Consistently refer to 'manual page' rather using both that and 'man page' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 5940580f8c12145c1ef4c3eee898676b48d95879 Author: Jörg Mensmann Date: Tue Apr 17 10:48:19 2012 +0100 hw/xwin: Fix command line arguments for multiple monitors. Moving Xwin to a certain monitor using "-screen 0 @2" would fail, printing "ddxProcessArgument - screen - Querying monitors failed". This happened since commit 3ead1d810b0e157078db39712e02ea6dc85216d8, because EnumDisplayMonitor() returns FALSE if its callback function returns FALSE (which is not clearly documented), and QueryMonitor() would then also return FALSE. Moving back to the old behaviour, where the return value of EnumDisplayMonitors() is ignored. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 18801f5e5a98d80f4811ade8c98df65175b1935a Author: Jon TURNEY Date: Fri Feb 10 09:27:16 2012 +0000 hw/xwin: Remove unused WindowExposuresProcPtr storage in screen private We don't wrap the WindowExposures screen function Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8fd30859c293035fe505da76d8d7e64131bd5bc0 Author: Jon TURNEY Date: Fri Feb 10 13:25:32 2012 +0000 hw/xwin: Remove long obsolete README for hw/xwin Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3568d4af4ff2490e79286d242916e81afed57b58 Author: Jon TURNEY Date: Thu Feb 23 22:32:09 2012 +0000 hw/xwin: Remove a pointless OS version check in winInstallKeyboardHookLL() Checking for OS later than NT4 SP3 (which we didn't do correctly anyhow, just checking for NT) is pointless when other code in hw/xwin assumes at least NT 5.0 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0ed0d3979050c4ee7bef64441d50c494d58d93b0 Author: Jon TURNEY Date: Thu Jul 5 22:08:38 2012 +0100 hw/xwin: Remove winClipboardDetectUnicodeSupport() This code for detecting if the Windows clipboard can support unicode is long obsolete. All NT versions of Windows support unicode clipboard, so any version of Windows we can run on must support unicode clipboard. The -nounicodeclipboard flag to disable use of unicode on the clipboard is retained. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c98471fad7d85fc9d9959b1c48edd90415f7bf15 Author: Jon TURNEY Date: Thu Jul 5 18:00:06 2012 +0100 hw/xwin: Consolidate duplicated code as getHwnd() function Consolidate code to find the native HWND of an X window, stored in the _WINDOWSWM_NATIVE_HWND property, duplicated in UpdateName() and PreserveWin32Stack() as getHwnd() Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit df7636dddb4981e14ee7d128c43bb08bdf6a8727 Author: Jon TURNEY Date: Thu Jul 5 14:20:52 2012 +0100 hw/xwin: Correct function name in log message Correct function name in log message winInitializeDefaultScreens -> winInitializeScreenDefaults Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9cdd3ed07425b222e8197b9a2f57ec1525c6fd54 Author: Jon TURNEY Date: Fri Mar 16 12:56:45 2012 +0000 hw/xwin: Tidy up some more pointless output which is always emitted It's not very useful to log lines like the below when the About.. dialog is used winAboutDlgProc - WM_COMMAND - IDOK or IDCANCEL winAboutDlgProc - WM_CLOSE Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit eb5b4d8d809712053701f057a35bbf5348ac9059 Author: Colin Harrison Date: Thu Jul 5 14:03:44 2012 +0100 hw/xwin: RANDR resize didn't occur when screen window was maximized or restored In windowed mode, with option -resize, RANDR resize was missing when the screen window was maximized or restored. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 7e07d61857c5d2ee6e3c36c81b51bb4fe378b5a0 Author: Jon TURNEY Date: Thu Jul 5 14:01:03 2012 +0100 hw/xwin: Bug fixes for screen sizing when the screen window is on a non-primary monitor There is a bug that when the -screen option is used to specify a monitor for the screen window to be located on, but no explicit size is specified (and the -multiplemonitors option isn't specified), the screen window size is always constrained to fit the work area of the primary monitor (rather than the work area of the specified monitor) This gives incorrect results if you want a screen the same size as your non-primary monitor (e.g. by using -screen 0 @2) and your non-primary monitor is larger than your primary monitor. (This can be worked around by specifying -multiplemonitors and an explicit screen size the same size as the monitor (e.g. -multiplemonitors -screen 0 1600x1200@2)) Fix to use work area for the monitor specified for the screen, rather than the primary monitor work area (unless -multiplemonitors is used, in which case we continue to use the virtual desktop work area instead) Also fix the adjustment for an autohide taskbar, so that it is only done if the taskbar is on the same monitor as the screen (or -multiplemonitors is used) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 090856b55b5895ce07f36ddebe6d8f7cb86c1826 Author: Jon TURNEY Date: Thu Jul 5 13:19:02 2012 +0100 hw/xwin: Tidy up some pointless output which is always emitted Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9fe9c5f868886abf671b3be3964af1965dd92472 Author: Jon TURNEY Date: Sun Feb 13 18:52:52 2011 +0000 hw/xwin: Don't bother reporting XORG_VERSION_CURRENT Don't bother reporting XORG_VERSION_CURRENT, when we also report the version number broken down into it's components XORG_VERSION_MAJOR, XORG_VERSION_MINOR, etc. as well. Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit d5977e5bd2c8ee77db08d5f948f266c9661b9fb5 Author: Dave Airlie Date: Fri Jul 13 00:28:19 2012 +1000 xf86: include xf86platformBus.h in xf86AutoConfig.c This fixes an implicit declaration, xf86AutoConfig.c:202:5: error: implicit declaration of function 'xf86PlatformMatchDriver' [-Werror=implicit-function-declaration] xf86AutoConfig.c:202:5: warning: nested extern declaration of 'xf86PlatformMatchDriver' [-Wnested-externs] Signed-off-by: Dave Airlie Reviewed-by: Keith Packard commit afa3b9ccd27ff9c58f536cb3b727e85feb6a6f6a Author: Bartosz Brachaczek Date: Fri Jul 6 02:52:40 2012 +0200 glx: Fix checking GL version Signed-off-by: Bartosz Brachaczek Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie commit 743ccf6fa0a9a4579d6de6d10e2e6040640772d9 Author: Dave Airlie Date: Thu Jul 12 19:09:15 2012 +1000 glx/dri2: don't return NULL in a function with no return. Reported by gcc. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit d1a00c26becdc2490ab4660abf108eca09c30d23 Author: Dave Airlie Date: Thu Jul 12 19:05:41 2012 +1000 glx/dri2: use correct define from dri attribs. Looks like idr renamed this and pushed the wrong one. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit c62205adcd48d497450655d0136f8ca5bd5cbae7 Author: Dave Airlie Date: Thu Jul 12 19:04:13 2012 +1000 glx/dri2: fix incorrect == vs = glxdri2.c:486: warning: statement with no effect Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit defca4c192bd7f4af2b273c7cb1fe8665888772a Author: Dave Airlie Date: Thu Jul 12 18:52:34 2012 +1000 glx/dri2: fix typo in the notification reset for robustness. Reviewed-by: Ian Romanick Reviewed-by: Matt Turner Signed-off-by: Dave Airlie commit d1cae6bb804f7dfc889fd3c5d5eb116f4baf5149 Author: Dave Airlie Date: Thu Jul 12 18:51:52 2012 +1000 glx: pass screen into the convert function when robustness is enabled, this is required. Reviewed-by: Ian Romanick Signed-off-by: Dave Airlie commit ea74e381ae91f45ec195a5505262e2e5a3c0e1c9 Author: Dave Airlie Date: Fri Jul 13 00:47:24 2012 +1000 xtest: add extinit.h for SyncExtensionInit This adds the decl for SyncExtenionInit. Signed-off-by: Dave Airlie Tested-by: Keith Packard Signed-off-by: Keith Packard commit 746193a7f10f11cccae05c98b933aadf58fc7375 Merge: a2d082953 2b74949ad Author: Keith Packard Date: Thu Jul 12 15:10:51 2012 -0700 Merge remote-tracking branch 'jturney/xwin-extmod-removal-fixes' commit a2d0829531249e24dbca25fc20ed30a2bb2d8ed8 Author: Michel Dänzer Date: Thu Jul 12 13:16:37 2012 +0200 glx: Free DRI2 drawable reference to destroyed GLX drawable. Otherwise the reference can lead to use after free in __glXDRIinvalidateBuffers(). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50019 Signed-off-by: Michel Dänzer Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit 8a87acc9e57be740e3bd252567622246051a0723 Author: Michel Dänzer Date: Thu Jul 12 13:16:36 2012 +0200 dri2: Add DRI2CreateDrawable2. Same as DRI2CreateDrawable, except it can return the DRI2 specific XID of the DRI2 drawable reference to the base drawable. Signed-off-by: Michel Dänzer Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit 2b74949ad02bd916c3ac502db3f28057f12a8117 Author: Jon TURNEY Date: Thu Jul 12 00:36:43 2012 +0100 Restore GLX extension to XWin - Add an XwinExtensionInit(), similar in spirit to QuartzExtensionInit() and xf86ExtensionInit() - Load the GLX extension (I'm guessing XQuartz needs this adding somewhere as well) - Also, since we now have a proper place to install the native GL provider where it will take priority over the the swrast provider, do so Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit 656e5fea6c9ca15f932889edcc590dd01c881945 Merge: 8b820f221 1720cd9ba Author: Keith Packard Date: Thu Jul 12 08:26:35 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 8b820f221ad54eb96a16c7060048abc8824371b6 Author: Daniel Stone Date: Wed Jul 11 17:31:53 2012 +0100 sdksyms: Fix build with --disable-xv I hate this [redacted] script. Signed-off-by: Daniel Stone Tested-by: Keith Packard Signed-off-by: Keith Packard commit 06ac7937fc37cdf073b77386bed47e14cff23628 Author: Jon TURNEY Date: Thu Jul 12 12:37:05 2012 +0100 Restore extern to the declaration of __glXDRISWRastProvider b86aa74 dropped the 'extern' from the declaration of __glXDRISWRastProvider This turns out to be important to me, as without it, the final link only gets the tentative definition of __glXDRISWRastProvider implied by the declaration, and not the proper one from glxdriswrast.c, presumably because nothing else references anything in the object that file generates. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit bcbf95b1bafa6ffe724768b9309295e2fdb4b860 Author: Jon TURNEY Date: Thu Jul 12 00:36:10 2012 +0100 Revert bogus GlxPushProvider() in commit a1d41e3 a1d41e3 "Move extension initialisation prototypes into extinit.h" also includes a change to GlxExtensionInit to install the swrast GLX provider. Since b86aa74 "GLX: Insert swrast provider from GlxExtensionInit" already does this (correctly, by installing the swrast provider at the end of the chain, rather than at the beginning), and since this would seem to have the effect of making the swrast provider the most preferred provider, I'm guessing this wasn't intended. Signed-off-by: Jon TURNEY Reviewed-by: Daniel Stone Reviewed-by: Colin Harrison commit 1720cd9badf21e5d6b2c6c929e609ab3b0b92fd2 Author: Jeremy Huddleston Date: Wed Jul 11 23:54:27 2012 -0700 XQuartz: Re-add prototype for DRIExtensionInit Regression from: a1d41e311c21eb6627caa0d168e070ceaf90806f Signed-off-by: Jeremy Huddleston CC: Daniel Stone commit 1a64d3cc9c319d5e9ab2365b60469fb5b83407fc Author: Jeremy Huddleston Date: Wed Jul 11 23:49:59 2012 -0700 XQuartz: Fix build failure due to incorrect PseudoramiXExtensionInit prototype pseudoramiX.c:129:1: error: conflicting types for 'PseudoramiXExtensionInit' [Semantic Issue] PseudoramiXExtensionInit(int argc, char *argv[]) ^ ../../include/extinit.h:175:13: note: previous declaration is here extern void PseudoramiXExtensionInit(void); ^ Signed-off-by: Jeremy Huddleston commit 228f8bfe81890770f1ba109a0acca1c81a2ffee9 Author: Jeremy Huddleston Date: Wed Jul 11 23:49:33 2012 -0700 XQuartz: Silence an unused-variable warning Signed-off-by: Jeremy Huddleston commit deb08658e2a6b1647a7213a316c6f3019bcdce48 Author: Maarten Lankhorst Date: Wed Jul 11 16:27:46 2012 +0200 xfree86: Strip dangling pointers from desiredMode Based on the original patch by Chris Wilson, which was a better fix than mine. We stash a copy of the desiredMode on the crtc so that we can restore it after a vt switch. This copy is a simple memcpy and so also stashes a references to the pointers contained within the desiredMode. Those pointers are freed the next time the outputs are probed and mode list rebuilt, resulting in us chasing those dangling pointers on the next mode switch. ==22787== Invalid read of size 1 ==22787== at 0x40293C2: __GI_strlen (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x668F875: strdup (strdup.c:42) ==22787== by 0x5DBA00: XNFstrdup (utils.c:1124) ==22787== by 0x4D72ED: xf86DuplicateMode (xf86Modes.c:209) ==22787== by 0x4CA848: xf86CrtcSetModeTransform (xf86Crtc.c:276) ==22787== by 0x4D05B4: xf86SetDesiredModes (xf86Crtc.c:2677) ==22787== by 0xA7479D0: sna_create_screen_resources (sna_driver.c:220) ==22787== by 0x4CB914: xf86CrtcCreateScreenResources (xf86Crtc.c:725) ==22787== by 0x425498: main (main.c:216) ==22787== Address 0x72c60e0 is 0 bytes inside a block of size 9 free'd ==22787== at 0x4027AAE: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==22787== by 0x4A547E: xf86DeleteMode (xf86Mode.c:1984) ==22787== by 0x4CD84F: xf86ProbeOutputModes (xf86Crtc.c:1578) ==22787== by 0x4DC405: xf86RandR12GetInfo12 (xf86RandR12.c:1537) ==22787== by 0x518119: RRGetInfo (rrinfo.c:202) ==22787== by 0x51D997: rrGetScreenResources (rrscreen.c:335) ==22787== by 0x51E0D0: ProcRRGetScreenResources (rrscreen.c:475) ==22787== by 0x513852: ProcRRDispatch (randr.c:493) ==22787== by 0x4346DB: Dispatch (dispatch.c:439) ==22787== by 0x4256E4: main (main.c:287) Signed-off-by: Maarten Lankhorst Reported-by: Zdenek Kabelac Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36108 Reviewed-by: Chris Wilson Signed-off-by: Keith Packard commit 59c2c4f645b4d782599c274f4bc752de9623d308 Author: Daniel Stone Date: Tue Jul 10 09:10:22 2012 +0100 AllocDevicePair: Ensure XKB privates are initialised Since we call directly into XKB and may be doing so before the extension has been initialised, make sure its privates are set up first. XTest had a hack to do this itself, but seems cleaner to just make sure we do it in AllocDevicePair. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit f937c3d50157a9a42d2f2f10590b6b139ce18a29 Author: Daniel Stone Date: Tue Jul 10 09:10:21 2012 +0100 Sync: Always initialise system counter list Sync is designed to let you add system counters before the extension has been initialised, which means the system counter list may well be full of bees. Make sure it's initialised before we add to it, to avoid the risk of fatal injury. Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 34cf559bcf99dad550527b5ff53f247f0e8e73ee Author: Keith Packard Date: Tue Jul 10 15:58:48 2012 -0700 ProcGetPointerMapping uses rep.nElts before it is initialized In: commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies the initializer for the .length element of the xGetPointerMappingReply structure uses the value of rep.nElts, but that won't be set until after this initializer runs, so we get garbage in the length element and clients using it will generally wedge. Easy to verify: $ xmodmap -pp Fixed by creating a local nElts variable and using that. Signed-off-by: Keith Packard Reviewed-by: Alan Coopersmith commit 44bd27cdd13b6e6c4e6fd3873361e3308ef25ffe Author: Keith Packard Date: Tue Jul 10 01:14:13 2012 -0700 Version 1.12.99.901 (1.13 RC1) Signed-off-by: Keith Packard commit 6e12cb147da58bd12a158807b2cd5afac32ae70f Merge: 532fbc29c 023127915 Author: Keith Packard Date: Tue Jul 10 00:52:11 2012 -0700 Merge branch 'local-fixes' commit 532fbc29c900469ef4867ccb7eabb953019dcab5 Author: Daniel Stone Date: Tue Jul 10 02:03:38 2012 +0100 GE: Remove unused RT_GECLIENT Remove remnants of an earlier experiment which had the GE extension handling event delivery directly. Nothing's used the resource since, so purge it. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 0e70b333d4846b166bf4a0a0c5d1a80623ba08dc Author: Daniel Stone Date: Tue Jul 10 02:03:37 2012 +0100 XFree86: os-support: Remove unused xf86MakeNewMapping No drivers used this, so it got unexported, and now it's so unused it got culled during the link. Take the poor function out behind the shed and put it out of its misery. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 43f2393746c44e9d35be6a2a3555205f8e1b4ddf Author: Daniel Stone Date: Tue Jul 10 02:03:36 2012 +0100 Xinerama: Reset Composite request vector on close Similar (identical) to how it interacts with Render and XFixes, also call PanoramiXCompositeReset() to restore the Composite dispatch table to how it was when it started, on reset. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 766a403bc7ff249fdc6b9049329b633e73738329 Author: Daniel Stone Date: Tue Jul 10 02:03:35 2012 +0100 XvMC: Remove unused XvMCGeneration I wonder if this even works across multiple generations. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 7cef23a6dd7a5d76983cf20979e845ea6ae63a10 Author: Daniel Stone Date: Tue Jul 10 02:03:34 2012 +0100 Render: Remove unused glyphDepths No-one has used this since 0a71e154. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Signed-off-by: Keith Packard commit 65011064d7e70aed59fb716f9ed3d76d196244ce Author: Daniel Stone Date: Tue Jul 10 02:03:33 2012 +0100 Xi: Remove dead Device{Enter,Leave}WindowMask These were an unused remnant of earlier MPX work; their only users got cleared out in dc153271, but the mask declarations remained. Remove them, and move DevicePropertyNotify's mask up to be contiguous with the rest of the range. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit fadfc2947075c832cd1107d2c0866ad13fa756c4 Author: Daniel Stone Date: Tue Jul 10 02:03:32 2012 +0100 GLX: Remove unused noGlxVisualInit No-one ever did anything with this variable except assign its default value to it. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Acked-by: Peter Hutterer Reviewed-by: Ian Romanick Signed-off-by: Keith Packard commit 06e4ba8b26fb974bdd84144b3e002f0f7589e7f7 Author: Daniel Stone Date: Tue Jul 10 02:03:31 2012 +0100 XKB: Geom: Remove unused code These codepaths were never called by anyone. Shame there weren't more of them. Signed-off-by: Daniel Stone Reviewed-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e191e296e6e7861978ea4a0ae9aa7b780e52732b Author: Daniel Stone Date: Mon Jul 9 20:04:15 2012 +0100 Remove XAA Commit 0c6987df in June 2008 disabled XAA offscreen pixmaps per default, as they were broken, leaving XAA only able to accelerate operations directly on the screen pixmap and nowhere else, eliminating acceleration for basically every modern toolkit, and any composited environment. So, it hasn't worked for over four years. No-one's even come close to fixing it. RIP. Signed-off-by: Daniel Stone Reviewed-by: Dave Airlie Reviewed-by: Alex Deucher commit 66362441867f68dac97de33744bd0ca478fb65d3 Author: Daniel Stone Date: Tue Jul 10 02:03:29 2012 +0100 Remove last renmants of XFree86LOADER define Not to be confused with XFree86Loader or XorgLoader. Which are both now dead too. Signed-off-by: Daniel Stone Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit a15dac550918c55b08bbe0007f068cc5096ebaa1 Author: Daniel Stone Date: Tue Jul 10 02:03:28 2012 +0100 Remove unused setupFunc from extensions setupFunc was used as an early callback for half-modular extensions such as Xv, XvMC and DGA to set up hooks between the core server and the modular component. Now we've rid ourselves of that, we can also bin setupFunc. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit 710318e803c6d5c6b8ae170d38c8253f5d780472 Author: Daniel Stone Date: Tue Jul 10 02:03:27 2012 +0100 Replace NO_HW_ONLY_EXTS with Xorg DDX test Turns out the only thing we use NO_HW_ONLY_EXTS for is to check whether or not we're building inside the Xorg DDX. Replace it with an XorgLoader test instead, and remove all its users. Signed-off-by: Daniel Stone Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 5f5bbbe543f65c48ecbb5cce80116a86ca3fbe86 Author: Daniel Stone Date: Tue Jul 10 02:03:26 2012 +0100 Unify miinitext.c Rather than having a non-Xorg and an Xorg-specific path which basically just duplicated each other for no reason, we could ... just have one. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 147967f67d4976a87ed07fe11b59b174907f5d43 Author: Daniel Stone Date: Tue Jul 10 02:03:25 2012 +0100 Remove Xorg-specific extensions from non-Xorg miinitext miinitext.c had a completely separate codepath for non-Xorg servers, which included tests for Xorg-specific extensions such as XFree86-VidMode, which were external even to the Xorg DDX. So we can just remove them, and the associated #undefs. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 27a624bee66d2797eacf90317054207dcf248028 Author: Daniel Stone Date: Tue Jul 10 02:03:24 2012 +0100 Quartz: Move PseudoramiX initialisation to DDX As PseudoramiX is a DDX-specific extension, move its loading and initialisation to hw/xquartz. This creates a QuartzExtensionInit() similar in spirit to xf86ExtensionInit. Signed-off-by: Daniel Stone Acked-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit 79d14d9fc3d92ba866864d3a5910a8c6c8e9b64f Author: Daniel Stone Date: Tue Jul 10 02:03:23 2012 +0100 Move the remnants of loadext.c to miinitext.c There was nothing XFree86-specific or loader-specific about this, aside from using xf86MsgVerb instead of ErrorF. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit a089af3477dd01a831b89c06f982679c60e42975 Author: Daniel Stone Date: Tue Jul 10 02:03:22 2012 +0100 Loader: Move ExtensionModule types to DIX In preparation for gutting loadext.c, move the ExtensionModule struct to the DIX, and unexport ExtensionModuleList (why, why, why, why was this ever exported in the first place, tbqh). Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit 8171108602556446f12c1cfbc37c6abf3b0195eb Author: Daniel Stone Date: Tue Jul 10 02:03:21 2012 +0100 Loader: Remove extension initialisation sorting Extensions could previously declare initialisation dependencies on other extensions, which would then get nicely sorted by the loader. We only had one user for this, GLX, which had one pointless (Composite) and one possibly useful dependency (DBE). As DBE is now a built-in, it will always be sorted by GLX, so we no longer have any users for it. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit d52ab85c7ef5058dcbd8a75eb84058908dc22906 Author: Daniel Stone Date: Tue Jul 10 02:03:20 2012 +0100 GLX: Remove extension init dependencies GLX was the only user of extension init order dependencies, using them to depend on Composite, which has always been built-in anyway, and DBE, which is now built-in. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 2fba9445a0357f67641e41ac334b5529c37774a2 Author: Daniel Stone Date: Tue Jul 10 02:03:19 2012 +0100 Add static extensions before those in modules Make sure we add static extensions before anything in a module. This is more or less a no-op at the moment, but will come in handy later when extension dependency sorting is removed. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 9a953e0e9dcb8a8e43cc27ffaef460268fbe1916 Author: Daniel Stone Date: Tue Jul 10 02:03:18 2012 +0100 Move DRI2 from external module to built-in Instead of keeping a tiny amount of code in an external module, just man up and build it into the core server. v2: Fix test/Makefile.am to only link libdri2.la if DRI2 is set Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard commit b8a3267c36e2e335b888bd4f2ef2f2c477cdfdce Author: Daniel Stone Date: Tue Jul 10 02:03:17 2012 +0100 DRI2: Remove prototype for DRI2DestroyDrawable DRI2DestroyDrawable() was still being _X_EXPORTed, but hasn't existed since 1da1f33f last year. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Ian Romanick Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7025a909bfe4d1f5518ec6fc5f89e2c3fb6501fd Author: Daniel Stone Date: Tue Jul 10 02:03:16 2012 +0100 XFree86: DRI: Don't use per-target CFLAGS AM_CFLAGS will suffice, given we only have one target in this directory. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Signed-off-by: Keith Packard commit 459c6da0f907ba33d733c7e62a116184ba2f14e5 Author: Daniel Stone Date: Tue Jul 10 02:03:15 2012 +0100 Move DRI1 from external module to built-in Rather than building the tiny amount of code required for XFree86-DRI as an external module, build it in if it's enabled at configure time. v2: Fix test/Makefile.am to only link libdri.la if DRI is set Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard fixup for DRI1 move Signed-off-by: Keith Packard commit b905d87ba0a9b045ea41bb1ad36a4f9f1170a1b8 Author: Daniel Stone Date: Tue Jul 10 02:03:14 2012 +0100 Xext: Only build one library Now that libXextmodule.la is both empty and unused, we can just build the one libXext.la for everyone, rather than having Xorg be special and unique. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit a7a2f9f66ddc27df96557093f3dd266e24eb653b Author: Daniel Stone Date: Tue Jul 10 02:03:13 2012 +0100 Remove the last remnants of extmod extmod was originally a big pointless module. Now it's an empty, pointless module. This commit makes it unexist. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 6e74fdda42fb4bd80fd48e1ae6471bffbb837804 Author: Daniel Stone Date: Wed Jun 22 00:28:18 2011 +0100 Move XFree86-VidMode from extmod to built-in As with DGA, move VidMode from being part of extmod to a built-in part of the server, if compiled as such. This is initialised from xf86ExtensionInit rather than miinitext because it's wholly dependent on the Xorg DDX. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 60f53e3012be795eee741ecd4be858552c5e86c8 Author: Tomas Carnecky Date: Tue Jul 10 02:03:11 2012 +0100 DGA: Remove excessive module-induced indirection The DGA event base used to have to be passed through a function pointer, as the code was cleaved in two with half in a module, and half in the core server. Now that's not the case, just access DGAEventBase directly. v2: Deal with Alan's event initialization cleanups Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7a5880bc3b47e1f90a638f056ad4d40be6931977 Author: Daniel Stone Date: Tue Jul 10 02:03:10 2012 +0100 Move DGA from extmod to built-in Rather than leave DGA languishing in extmod, move it to be a built-in extension. As it's quite specific to the Xorg DDX, just move it sideways to the rest of the DGA code in hw/xfree86/common, and initialise it from xf86ExtensionInit, rather than miinitext. Signed-off-by: Daniel Stone Acked-by: Keith Packard Signed-off-by: Keith Packard commit 6fb481d1251626456914d0012d6ca5a342bfdf71 Author: Daniel Stone Date: Tue Jul 10 02:03:09 2012 +0100 Move SELinux from extmod to built-in Instead of letting it languish in extmod just because we want to configure bits of it from xf86, move XSELinux to the builtin part of Xext, and do its configuration from xf86ExtensionInit. Signed-off-by: Daniel Stone Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 5d92ee4081a23a6b4d1f9ba2a98985f539f99312 Author: Tomas Carnecky Date: Tue Jul 10 02:03:08 2012 +0100 Xv: Remove excessive module-induced indirection Xv used to call XvScreenInit and co. through function pointers, as XvScreenInit may have been sitting on the other side of a module boundary from xf86XvScreenInit. Why this was so is a mystery, but make it not so any more. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Acked-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 2e6c5f959153cdcea4bcf719621ebec408250f54 Author: Daniel Stone Date: Tue Jul 10 02:03:07 2012 +0100 XFree86: sdksyms: Remove unused -DXorgLoader We no longer have anything in the tree that checks for XorgLoader. This was a fairly monumental hack: xvdi.h used to hide all its functions behind #ifndef XorgLoader, solely to avoid sdksyms.sh picking up its symbols, as it was previously a module rather than built-in. This is no longer the case, so we can remove the define. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 7a11b817e770cd2196814f1ac6264c6d87b76c6a Author: Tomas Carnecky Date: Tue Jul 10 02:03:06 2012 +0100 Move Xv and XvMC from extmod to built-in Always build these extensions into the core server, rather than letting them languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 7d859bd87834dd79c7fa3792075496ece698c082 Author: Tomas Carnecky Date: Tue Jul 10 02:03:05 2012 +0100 Move XRes from extmod to built-in Always build XRes support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit ba21fc29587e4f11320b88a70433beb1fe22cdf3 Author: Tomas Carnecky Date: Tue Jul 10 02:03:04 2012 +0100 Move DPMS from extmod to built-in Always build DPMS support into the core server, rather than letting it languish in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 3ed2c6e11298c4299042cfe4578f6cc02e441d58 Author: Tomas Carnecky Date: Tue Jul 10 02:03:03 2012 +0100 Move MIT-SCREEN-SAVER from extmod to built-in If we've built MIT-SCREEN-SAVER support, then just build it into the main binary, rather than leaving it in extmod. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit b8c9ab0fea0be299d9f48ac0c4ed0474104a7556 Author: Tomas Carnecky Date: Tue Jul 10 02:03:02 2012 +0100 Move RECORD from external module to built-in Rather than languishing in its own special module, move RECORD into the core server. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit bf61bf69b2b4f9e9993ca771de100079c7696bea Author: Tomas Carnecky Date: Tue Jul 10 02:03:01 2012 +0100 Move DBE from an external module to built-in If DBE support is compiled in the server, just man up and build it into the server, rather than having it as an external module. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Jamey Sharp Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit d785368e0e171080fea5447c87e81c93f515ff21 Author: Daniel Stone Date: Tue Jul 10 02:03:00 2012 +0100 miinitext: Use ARRAY_SIZE rather than sentinel NULL sentinels are totally lame. v2: numExtensionModules isn't public, so keep using the provided sentinal - Keith Packard Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit f48d8f58b39af0036365368d6ac35319d6d856d5 Author: Daniel Stone Date: Tue Jul 10 02:02:59 2012 +0100 extmod: Use ARRAY_SIZE rather than sentinel When the array gets down to size zero (which it does in later patches), gcc complains that the index is out of bounds. Avoid this by using ARRAY_SIZE on extensionModules instead. Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit d35884da2f5a250ff6dd5131dc23ac629eccdd0c Author: Daniel Stone Date: Tue Jul 10 02:02:58 2012 +0100 Add xf86ExtensionInit for DDX extension configuration xf86ExtensionInit is called after configuration file parsing, so it can perform the two parts of extension initialisation currently done by extmod: enabling and disabling of extensions through an 'omit' option, and SELinux configuration. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 4170e4e1f8e879394c896c490d9f08a38ecfdefd Author: Daniel Stone Date: Tue Jul 10 02:02:57 2012 +0100 Loader: Drop EXTERN_MODULE flag EXTERN_MODULE was used to specify that we shouldn't worry about modules lacking a ModuleData object. It was also completely unused. *shrug* Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit a1d41e311c21eb6627caa0d168e070ceaf90806f Author: Daniel Stone Date: Tue Jul 10 02:02:56 2012 +0100 Move extension initialisation prototypes into extinit.h Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to hold all our extension initialisation prototypes, rather than duplicating them everywhere. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit b86aa74cafddf9bca5addfeb458a23f46ddcf132 Author: Daniel Stone Date: Tue Jul 10 02:02:55 2012 +0100 GLX: Insert swrast provider from GlxExtensionInit Rather than making poor old miinitext.c do it, including making DMX have fake symbols just to keep it happy. Signed-off-by: Daniel Stone Reviewed-by: Stéphane Marchesin Signed-off-by: Keith Packard commit 13552a5c4701097a1507a99ed8366ab1438844b6 Author: Daniel Stone Date: Tue Jul 10 02:02:54 2012 +0100 Reorder extension initialisation for non-Xorg Reorder static extension initialisation in miinitext for non-Xorg servers to match Xorg's order. Tested with Xephyr; checked that the extension list was identical before and after. Signed-off-by: Daniel Stone Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 5079db78aea8fa42e781dd876c1ee1c31571b3ae Author: Tomas Carnecky Date: Tue Jul 10 02:02:53 2012 +0100 Replace INITARGS with void INITARGS was a hardcoded define to void. Since knowing the function signature for your extensions is kinda useful, just replace it with a hardcoded void, but leave the define there for API compatibility. Signed-off-by: Tomas Carnecky Reviewed-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit bddb8c6cbe52ba9923b1d36d01f5ac9391b0ec0e Author: Daniel Stone Date: Tue Jul 10 02:02:52 2012 +0100 Xinerama: Fix ExtensionInit prototype Huh, so I guess INITARGS used to be int argc, char *argv then. Either way, it's now void, so fix that ... Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit eb9661fef9f59587f898371f97a0952ac14d125f Author: Daniel Stone Date: Tue Jul 10 02:02:51 2012 +0100 Make extension.h self-contained, remove C++ externs externsion.h required bits from Xfuncproto.h and dixstruct.h, but included neither; fix that. It also had _XFUNCPROTOBEGIN and _XFUNCPROTOEND wrappers, which is a bit pointless for a server-only library, as it's only needed for C++. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 854c1fa4a1e90288d1e2f3777fac3e1a9acb1235 Author: Daniel Stone Date: Tue Jul 10 02:02:50 2012 +0100 Add a common ARRAY_SIZE macro to dix.h Does what it says on the box, replacing those from Xi/ and glx/. Signed-off-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 67953d6975ef2ee573b95e7641aaf3d72e9f8379 Author: Daniel Stone Date: Tue Jul 10 02:02:49 2012 +0100 Xorg: Link XKB DDX library after core server libs libxorgxkb.a contains a number of libraries which are used by XKB action code to call back into the DDX, e.g. for VT switching, termination, grab breaking, et al. Make sure libxkb.a comes first in the link order, so it can mark XkbDDX* as used in order for the linker to not discard them. Signed-off-by: Daniel Stone Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 656af2c7e73d948338683675e14cd827b46a97c4 Author: Daniel Stone Date: Tue Jul 10 02:02:46 2012 +0100 Don't make failure to -nolisten fatal If failing to disable a protocol specified by -nolisten failed, we'd throw a FatalError and bomb startup entirely. From poking at xtrans, it looks like the only way we can get a failure here is because we've specified a protocol name which doesn't exist, which probably doesn't constitute a security risk. And it makes it possible to start gdm even though you've built with --disable-tcp-transport. Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit dc0c2dd92d5eb314582ea10830678753824375d9 Author: Daniel Stone Date: Tue Jul 10 02:02:45 2012 +0100 Xext: Add hashtable.h to sources to fix distcheck Signed-off-by: Daniel Stone Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit ad4092cf7d59a89b1b2922440eef65be5c0c5ebd Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Replace padlength tables with inline functions from misc.h Adds new function padding_for_int32() and uses existing pad_to_int32() depending on required results. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Reviewed-by: Peter Hutterer Tested-by: Daniel Stone commit 2b1c1300cc23912ee1c59f8dde938dd4d7287f4a Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 ephyrGLXQueryServerString: Stop making an unused copy of server_string ephyrGLXQueryServerString() carefully allocated a buffer padded to the word-aligned string length for sending to the client, copied the string to it, and then forgot to use it, potentially reading a few bytes of garbage past the end of the server_string buffer. Since WriteToClient already handles the necessary padding, just send it the actual length of the original server_string, and don't bother making a padded copy. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 7a29f6878284e2d65e69fcd157aa9ec01d21b3c0 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Initialize padding bits to 0 in ErrorConnMax() Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit bed610fcae41ddfe21fa9acde599b17d1d15f5d1 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Set padding bytes to 0 in WriteToClient Clear them out when needed instead of leaving whatever values were present in previously sent messages. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 1622dd8ab24d2fe7b9908110eb237774d4e03568 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in dix registry Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 9805cedf7b0f76d3b75f94e956c4cc2dcf0d8b64 Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in extension Events Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 0af79b124e1317c36d1613d28755c5a8ce612e2a Author: Alan Coopersmith Date: Mon Jul 9 19:12:44 2012 -0700 Use C99 designated initializers in dix Events Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 483266a583b0fd8a552303f318a71502ce3ff1d2 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in xf86 extension Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 14501fd33ee89acf9fc1d908003ed62f383d8bae Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xephyr Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit e4e827ec36fd20b7aea608db09790f76fb87e519 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dmx Replies v2: fix in __glXGetVisualConfigs to not re-declare local 'reply' variable Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone Fixup for Use C99 designated initializeres in dmx Replies Signed-off-by: Keith Packard commit bd6f948c41865c2c9d3fba1000bf5f7458d3afc1 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in randr Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit a406bd07593edb69285cf2fd91a6af4a5d956817 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in xkb Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 26efa09d0c7ee2f6a18547205c84be75376e688b Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in glx Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit cc5f09c86f7bea23b7546c3491b2c52ce8100a71 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in various extension Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 2f5caeaddb3616dc9ff57d784f7feba589c536e7 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xinput Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 6a721e3af5e11bae1d59ca551a02470f35d9e844 Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in Xext Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit d792ac125a0462a04a930af543cbc732f8cdab7d Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in dix Replies Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 69fa5630b5902aaad267fc67d0da4ca93625886a Author: Alan Coopersmith Date: Mon Jul 9 19:12:43 2012 -0700 Use C99 designated initializers in SendErrorToClient Let the compiler worry about 0-filling the rest of the fields, instead of memsetting the whole struct and then going back to overwrite some of the fields. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit cdf5bcd420e5bcf4a4a24a275d3133a4e16ce41e Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Use calloc to zero fill buffers being allocated for replies & events Ensures padding bytes are zero-filled Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit ef0f701c9245b0373eb0c7a84dd804af4738bb29 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 xf86dga2.c & xf86vmode.c: Move REQUEST_SIZE_MATCH checks before using stuff Seems silly waiting to check if the client failed to send us enough bytes until after we've already tried using them. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 2e739a8870d91fbac7f536ffa8f6d2cee0f66cec Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcRRListOutputProperties: skip atom walk if the list is empty pAtoms is only allocated if numProps was non-zero, so move the walk through the property list to copy atoms to it inside the if (numProps) Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 15bc13c8d088e05f14c7262348e0066929c29251 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcRRGetScreenInfo: swap configTimestamp as well Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 3a013b8816bc0bb765c99e8a2bf2ea536dc62c3b Author: Jaroslav Šmíd Date: Mon Jul 9 19:12:42 2012 -0700 Bug 51375: Xorg doesn't set status for RRGetOutputInfo https://bugs.freedesktop.org/show_bug.cgi?id=51375 https://bugs.freedesktop.org/attachment.cgi?id=63397 Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 5b86c072d1d586ce040d8831a05cf97ff8b17821 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Use temporary variables instead of parts of reply structures When passing variable pointers to functions or otherwise doing long sequences to compute values for replies, create & use some new temporary variables, to allow for simpler initialization of reply structures in the following patches. Move memsets & other initializations to group with the rest of the filling in of the reply structure, now that they're not needed so early in the code path. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit c2fb1a7b2ab58d70b38ee03ab2fdeb4e7183a356 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 ProcQueryKeymap: rework logic around permission to copy key states Always initialize to zero, and then if permission is granted, copy the current key state maps, instead of always copying and then zeroing out if permission was denied. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit dccb0858d71341e1258800b37d1bb78c0115838d Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Core events: invert check for permission to copy key states Always initialize to zero, and then if permission is granted, copy the current key state maps. Use memcpy instead of memmove for the copy, since we're always copying to a newly allocated event on the stack, so guaranteed not to overlap with the device map structure. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit db69212df8a0bf09140368356d2d430c54afe346 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Rework reply initialization in ProcGetProperty & NullPropertyReply Don't need to pass an empty reply to NullPropertyReply, let it make it's own. Move reply initialization code in remaining replies in ProcGetProperty to group with the rest of the fields. (Prepares for coming C99 designated initializer conversion.) Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 6be74a9080e30fc502421cd438cd0c73fb8eb0b0 Author: Alan Coopersmith Date: Mon Jul 9 19:12:42 2012 -0700 Fix more poorly indented/wrapped comments & code Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 789d64e19a3b3d98b88bc80f677e0c37bfb5c631 Author: Alan Coopersmith Date: Sun May 13 00:03:35 2012 -0700 Remove unneccesary casts from WriteToClient calls Casting return to (void) was used to tell lint that you intended to ignore the return value, so it didn't warn you about it. Casting the third argument to (char *) was used as the most generic pointer type in the days before compilers supported C89 (void *) (except for a couple places it's used for byte-sized pointer math). Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard Tested-by: Daniel Stone commit 023127915e6922bc53e4c768de760d8a4f25c07c Author: Keith Packard Date: Mon Jul 9 16:34:39 2012 -0700 Reliably reset signals at server init time Each DDX currently calls OsReleaseSIGIO in case it was suspended when the server regen started. This causes a BUG to occur if SIGIO was *not* blocked at that time. Instead of relying on each DDX, make the OS layer reliably reset all signal state at server init time, ensuring that signals are suitably unblocked and that the various signal state counting variables are set back to zero. Signed-off-by: Keith Packard commit d6756e0298e660a0aca58d75bcf79471ce07a634 Author: Keith Packard Date: Mon Jul 9 16:33:11 2012 -0700 xfree86: In InitOutput, only call OsReleaseSIGIO if OsBlockSIGIO was called Otherwise, OsReleaseSIGIO will complain, or perhaps something worse will happen (if SIGIO actually needs to be blocked here). Signed-off-by: Keith Packard commit ea8b04507e5464e4817791db516a20cfed2a6724 Author: Keith Packard Date: Mon Jul 9 16:30:24 2012 -0700 privates: Resize GPU screen-specific privates too When allocating new global privates, make sure the gpu screens get their private offsets updated. This only affects GPU screens that enumerate before the non-GPU screens, which generally requires that the related device be present when the system boots so that it can get an earlier DRM filename. Signed-off-by: Keith Packard commit d1c639c006526b8cab14dac582508f3f54848967 Author: Keith Packard Date: Mon Jul 9 16:29:04 2012 -0700 Add 'install-headers' target in the top-level Makefile This target recursively locates directories with sdk headers and installs them all. Useful when you want to build a complete new X server and drivers without having to install the X server before the drivers are actually working. Signed-off-by: Keith Packard commit 329db3292223cccd4887062956622285c45a1523 Author: Dave Airlie Date: Sat Jul 7 10:10:08 2012 +0100 dri2/prime: allocate prime id at screen allocation time Add a static mask of prime id and allocate them at screen time, if the driver supports the prime interfaces and is a gpu screen. This is instead of them changing due to user controlled randr commands, as suggested by Keith. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 30298012162de7f76e8a4c7b0362e98703f80011 Author: Dave Airlie Date: Tue Jun 26 10:20:52 2012 +0100 dri2: add initial prime support. (v1.2) This adds the initial prime support for dri2 offload. The main thing is when we get a connection from a prime client, we stored the information and mark all drawables from that client as prime. We then create all buffers for that drawable on the prime device dri2screen. Then DRI2UpdatePrime is provided which drivers can call to get a shared pixmap which they can use as the front buffer. The driver is then responsible for doing the back->front copy to the shared buffer. prime requires a compositing manager be run, but it handles the case where a window get un-redirected by allocating a new pixmap and pointing the crtc at it while the client is in that state. Currently prime can't handle pageflipping, so always does straight copy swap, v1.1: renumber on top of master. v1.2: fix auth on top of master. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 234022cfb3ad2a1b16ab7981ce69f9cd5ba0fbeb Author: Dave Airlie Date: Sat Jul 7 10:20:58 2012 +0100 configure: bump dri2proto to 2.8 This is required for the prime macros. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit c41922940adbc8891575b3321fadf01ff4cb5854 Author: Dave Airlie Date: Tue Jun 26 10:00:21 2012 +0100 dix/randr: add a hook into screen to replace scanout pixmap For DRI2 in some offload cases we need to set a new pixmap on the crtc, this hook allows dri2 to call into randr to do the necessary work to set a pixmap as the scanout pixmap for the crtc the drawable is currently on. This is really only to be used for unredirected full screen apps in composited environments. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e2fd447e76c4a1233374c9d8fa9cae54a55dad50 Author: Dave Airlie Date: Thu Jul 5 15:50:56 2012 +0100 xf86: add callback for offloak sink setting support. This adds support for setting the offload sink to the xf86 ddx. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 22f02120eb4092e1c283f81c8040f178693ff0a4 Author: Dave Airlie Date: Tue Jun 26 09:53:54 2012 +0100 xf86: store scanout pixmap in the xf86 struct as well. This is so we can tell the scanout pixmap has changed between calls to the crtc set function. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 426bc0a28edbe0e9153f692a02dd25f744ffa034 Author: Dave Airlie Date: Thu Jul 5 15:41:38 2012 +0100 randr: add hooks for offload sink provider protocol This adds the protocol handler and associated providers handling for the offload slaves, it allows two providers to be connected as offload sink/source. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 12905dfaf01088a00f4a0a78cffba03329e7b724 Author: Dave Airlie Date: Sat May 26 13:11:01 2012 +0100 dix/xf86: initial offload slave tracking (v1.1) add the linked list and provider hooks. v1.1: add another assert in the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit a7c01da54ab43f9d29333ccbd79dfc001f9dc5e3 Author: Dave Airlie Date: Thu Jul 5 20:34:54 2012 +0100 xf86: make sure rotate calcs are done on the right screen boundaries This fixes a segfault where this code believes we are outside the screen boundaries on a slave device, but we aren't. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit cc02f4ef3e407be794132d004c947c9a4e14f4c2 Author: Dave Airlie Date: Tue Jun 19 16:01:16 2012 +0100 xf86/cursor: fallback to sw cursor if we have slaves present. Current USB devices have no hw rendered cursors, so we need the master GPU to render the cursor, so whenever we plug in a slave device, fallback to sw rendered cursors. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 98686512cbe1affb75222a63136854af79f1411b Author: Dave Airlie Date: Thu Jul 5 15:50:24 2012 +0100 xf86: add output source setting callback (v2) This adds support for the randr callback for setting the output source for a device. v2: drop root clip change on detach Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4c92eb00f97f7b8258de8e366226880382cc9ce9 Author: Dave Airlie Date: Thu Jul 5 15:41:22 2012 +0100 randr: add output source setup This adds the output sources to the associated list and adds the protocol handler for the randr SetProviderOutputSource. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit bec4cb72c55bb6dee09c65c0844af201067a090f Author: Dave Airlie Date: Thu May 24 15:47:22 2012 +0100 randr: hook up output slave to screen resources return When the client asks for the screen resources list, it will now get a list of crtc/outputs for the master + all attached slaves, this will let randr configure all attached slave devices properly. Keith asked I merge the two functions, but not just yet, the current multi screen code doesn't handle primary yet properly, will fix it up later. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 88bc02bfaae2c15a30c606d34cf7940e6ad5ea14 Author: Dave Airlie Date: Mon Jun 18 14:11:24 2012 +0100 xf86/crtc: add new interface to detach slave crtcs This will detach any scanout pixmaps attached to slave crtcs. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 9b8217f9ef6279fff6628631d18497bed0343ef9 Author: Dave Airlie Date: Thu Jun 14 15:24:46 2012 +0100 dix/pixmap: track dirty pixmaps in server. (v4) This adds two functions for drivers to use directly to keep a linked list of slave pixmaps to do damage tracking on and keep updated. It also adds a helper function that drivers may optionally call to do a simple copy area damage update. v2: use damage.h not damagestr.h, fixes ephyr build. v3: address ajax review: use slave_dst, drop unused dst member. v4: check DamageCreate return, add SourceValidate comment, add a comment addressing possible optimisation possibility Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit c5cc2a8243c5e6bf454af989b7512ec7e20fc3f2 Author: Dave Airlie Date: Tue May 29 14:41:39 2012 +0100 randr: check the screen size bounds against the master The master contains the complete screen size bounds, so check the width/height against it. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 26d848cb916c8a85f2c69d2aeb004665ba07bf00 Author: Dave Airlie Date: Tue May 29 14:35:24 2012 +0100 randr: fix tellchanged to work with slave scanouts Tell changed need to tell only for the master pixmap, however it gets called from various places for slave screens, so convert to telling clients about changes on the master screen. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4bf0192d810e01c89a1903cc4bc5e639fc13a547 Author: Dave Airlie Date: Tue May 29 14:37:11 2012 +0100 randr: fixup constrain to work with slave screens. Current code constrains the cursor to the crtcs on the master device, for slave outputs to work we have to include their crtcs in the constrain calculations. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 2ed3f64d9d453628ab5c03b8aee006093019c933 Author: Dave Airlie Date: Wed Jun 20 12:37:26 2012 +0100 xf86: add initial scanout pixmap support (v2) Add the simple passthrough interface for drivers to use, so they can set scanout pixmaps. v2: detach scanout pixmap properly. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit f2da2c12042d3447b1c954e7301632d174a08b4f Author: Dave Airlie Date: Wed Jun 20 12:37:12 2012 +0100 randr: add initial scanout pixmap support (v3) When randr notices a crtc configuration request for a slave device, it checks if the slave allocated pixmap exists and is suitable, if not it allocates a new shared pixmap from the master, shares it to the slave, and starts the master tracking damage to it, to keep it updated from the current front pixmap. If the resize means the crtc is no longer used it will destroy the slave pixmap. This adds the concept of a scanout_pixmap to the randr_crtc object, and also adds a master pixmap pointer to the pixmap object, along with defining some pixmap helper functions for getting pixmap box/regions. v2: split out pixmap sharing to a separate function. v3: update for void * Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 0b0e7148925e1f835d4f4f06e402a97023531828 Author: Dave Airlie Date: Thu May 24 16:03:31 2012 +0100 exa: pixmap sharing infrastructure (v3) This just adds exa interfaces for mixed exa so drivers can share and set shared pixmaps up correctly. v2: update for passing slave screen. v3: update for void * Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit fd6c1bf0a3efced3ad4623dbd4716230a5f2419e Author: Dave Airlie Date: Thu May 24 16:03:19 2012 +0100 dix: pixmap sharing infrastructure (v3) This is a hooks for pixmap sharing and tracking. The pixmap sharing ones get an integer handle for the pixmap and use a handle to be the backing for a pixmap. The tracker interface is to be used when a GPU needs to track pixmaps to be updated for another GPU. v2: pass slave to sharing so it can use it to work out driver. v3: use void * as per keithp's suggestion. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 382dd45bb88fa92764bf0ecd655cb9890eb84960 Author: Dave Airlie Date: Thu May 24 15:39:05 2012 +0100 dix: add ability to link output slave gpus to the current gpu (v1.1) Just add the interfaces to attach/detach output slaves, and a linked list to keep track of them. Hook up the randr providers list to include these slaves. v1.1: add another assert to the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 05d2472cd242293a5fa205efff5734a3380072b4 Author: Dave Airlie Date: Thu Jun 14 15:03:02 2012 +0100 xf86dga: handle DGAAvailable for gpu screens. (v2) v2: Split out DGAAvailable into two interfaces, one for calls from protocol decoding and one for internal usage, after discussion with ajax and keithp. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 3cbc4c10b52896324fe14d2ab56bd54577c9294c Author: Dave Airlie Date: Wed Jun 13 14:35:49 2012 +0100 randr: expose unattached providers to the clients. This provides the unattached provider list to the clients. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d0e138c3f3e58ef127dad6c6aef48b1713b5ce58 Author: Dave Airlie Date: Wed Jun 13 14:32:05 2012 +0100 dix: attach unbound screens to protocol screen 0 (v2) This is the default attachment, unbound gpu screens get attached to the 0 protocol screen. detach on hotunplug. v2: detach after tearing down crtc/outputs. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4caad34c932115dc0a9fd9c2995ebb2d38b9359c Author: Dave Airlie Date: Wed Jun 13 14:27:42 2012 +0100 dix: add unattached list for attaching screens to initially. (v1.1) This list is meant for attaching unbound gpu screens to initially, before the client side rebinds them. v1.1: add another assert in the add path. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 9b5cf2ed76b00937af12304e0e8dbd60df62067e Author: Dave Airlie Date: Wed Jun 13 14:17:06 2012 +0100 xfree86: add framework for provider support in ddx. (v4) This adds the framework for DDX provider support. v2: as per keithp's suggestion remove the xf86 provider object and just store it in the toplevel object. v3: update for new protocol v4: drop devPrivate, free name Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 66d92afeaeed9f4a19267d95a1f81b9bf27162a5 Author: Dave Airlie Date: Wed Jun 13 14:03:04 2012 +0100 randr: add provider object and provider property support (v6) This adds the initial provider object and provider property support to the randr dix code. v2: destroy provider in screen close v2.1: fix whitespace v3: update for latest rev of protocol + renumber after 1.4 tearout. v4: fix logic issue, thanks Samsagax on irc v5: keithp's review: fix current_role, fix copyrights, fix master reporting crtc/outputs. v6: port to new randr interface, drop all set role bits for now v7: drop devPrivate in provider, not needed, add BadMatch returns for NULL SetProviderOffloadSink and SetProviderOutputSource, drop the old typedef. Reviewed-by: Keith Packard Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 44eae69f1df2d00e0c9f1ea8d3c4fae06bcacfbc Author: Dave Airlie Date: Thu Jul 5 21:11:16 2012 +0100 configure: bump randrproto min requirements to 1.4.0 Needed to build latest randr stuff. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 4d24192bd24fb20d16d0054d77bffda883faeb79 Merge: 7c9d8cbd3 74b786f7c Author: Keith Packard Date: Fri Jul 6 12:17:17 2012 -0700 Merge remote-tracking branch 'airlied/for-keithp-stage1' commit 7c9d8cbd368cac53e7aed9308292614337db3be2 Author: Torsten Kaiser Date: Fri Jul 6 12:10:25 2012 -0700 xfree86: EDID Est III parsing skips some modes This loop needs to count from 7 to 0, not only from 7 to 1. The current code always skips the modes {1152, 864, 75, 0}, {1280, 1024, 85, 0}, {1400, 1050, 75, 0}, {1600, 1200, 70, 0} and {1920, 1200, 60, 0}. Signed-off-by: Torsten Kaiser Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 0b3abacb6430e6593c4358420ba457d8149bd32b Author: Torsten Kaiser Date: Fri Jul 6 12:06:13 2012 -0700 xfree86: EDID Est III parsing can walk off end of array Using -O3 gcc notes that m could reach beyound the end of the EstIIIModes array, if the last bits of the 11s byte where set. Fix this, by extending the array to cover all possible bits from est. https://bugs.freedesktop.org/show_bug.cgi?id=45623 Signed-off-by: Torsten Kaiser Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 74b786f7cee5723468bba251a2155a65770b2ad4 Author: Dave Airlie Date: Tue Jun 5 17:45:03 2012 +0100 xfree86: add autoAddGPU option (v2) This option is to stop the X server adding non-primary devices as gpu screens. v2: fix per Keith's suggestion. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit ef6686480ad1de6582b9ef5d13e5d4ffb3b3918c Author: Dave Airlie Date: Tue Jun 5 17:30:39 2012 +0100 xfree86: add platform bus hotplug support (v3) This provides add/remove support for platform devices at xfree86 ddx level. v2: cleanup properly if no driver found. v3: load the modesetting driver before checking driver list. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit b27cf30995e05da11e827ec41060051673336a7b Author: Dave Airlie Date: Tue Jun 5 17:29:56 2012 +0100 xserver/config: add udev/drm hotplug callbacks. (v2) This adds callbacks into the ddx for udev gpu hotplug. v2: fix some strncmp returns. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 53b66c084fbf5bf47f8121632fabdc39b9fe8337 Author: Dave Airlie Date: Tue Jun 5 17:18:10 2012 +0100 xfree86: add DDX gpu screen support. (v3) This just adds the structures and interfaces required for adding/deleteing gpu screens at the DDX level. The platform probe can pass a new flag to the driver, so they can call xf86AllocateScreen and pass back the new gpu screen flag. It also calls the gpu screens preinit and screeninit routines at startup. v2: fix delete screen use after free. v3: split out pScrn into separate patch Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 726d467b534a30d8cbaafb858339c638c9f83195 Author: Dave Airlie Date: Mon Jun 25 11:51:26 2012 +0100 xf86: cleanup helper code to use a pointer. (v1.1) This is in preparation for gpu screens in here, just use a pScrn pointer to point at the new screen. suggested by Keith. v1.1: fix spacing as suggested by Aaron. Reviewed-by: Keith Packard Reviewed-by: Aaron Plattner Signed-off-by: Dave Airlie commit 9d179818293b466ec6f1777f0b792e1fbbeb318c Author: Dave Airlie Date: Tue Jun 5 17:09:38 2012 +0100 dix: introduce gpu screens. (v5) This patch introduces gpu screens into screenInfo. It adds interfaces for adding and removing gpu screens, along with adding private fixup, block handler support, and scratch pixmap init. GPU screens have a myNum that is offset by GPU_SCREEN_OFFSET (256), this is used for logging etc. RemoveGPUScreen isn't used until "xfree86: add platform bus hotplug support". v2: no glyph pictures for GPU screens for now. v3: introduce MAXGPUSCREENS, fix return value check v4: fixup myNum when renumbering screens (ajax) v5: drop cursor privates for now. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 3478af3374abffa0c226ee077fda1fcfc0751e74 Author: Dave Airlie Date: Tue Jun 5 17:01:21 2012 +0100 screen: split out screen init code. (v2) This is a precursor for reusing this code to init gpu screens. v2: fixup int check as per Keith's review. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit cf66471353ac5899383b573a3cfca407e90d501e Author: Dave Airlie Date: Tue May 8 14:26:47 2012 +0100 xfree86: use udev to provide device enumeration for kms devices (v10) On Linux in order for future hotplug work, we are required to interface to udev to detect device creation/removal. In order to try and get some earlier testing on this, this patch adds the ability to use udev for device enumeration on Linux. At startup the list of drm/kms devices is probed and this info is used to load drivers. A new driver probing method is introduced that passes the udev device info to the driver for probing. The probing integrates with the pci probing code and will fallback to the pci probe and old school probe functions in turn. The flags parameter to the probe function will be used later to provide hotplug and gpu screen flags for the driver to behave in a different way. This patch changes the driver ABI, all drivers should at least be set with a NULL udev probe function after this commit. v2: rename to platform bus, now with 100% less udev specific, this version passes config_odev_attribs around which are an array of id/string pairs, then the udev code can attach the set of attribs it understands, the OS specific code can attach its attrib, and then the core/drivers can lookup the required attribs. also add MATCH_PCI_DEVICES macro. This version is mainly to address concerns raised by ajax. v3: Address comments from Peter. fix whitespace that snuck in. rework to use a linked list with some core functions that xf86 wraps. v4: add free list, fix struct whitespace. ajax this address most of your issues? v5: drop probe ifdef, fix logic issue v6: some overhaul after more testing. Implement primaryBus for platform devices. document hotplug.h dev attribs - drop sysname attrib fix build with udev kms disabled make probing work like the PCI probe code, match against bus id if one exists, or primary device. RFC: add new bus id support "PLAT:syspath". we probably want to match on this a bit different, or use a different property maybe. I was mainly wanting this for use with specifying usb devices in xorg.conf directly, but PLAT:path could also work I suppose. v6.1: add missing noop platform function v7: fix two interactions with pci probing and slot claiming, prevents pci and platform trying to load two drivers for same slot. v8: test with zaphod mode on -ati driver, fixup resulting issue clean up common probe code into another function, change busid matching to allow dropping end of strings. v9: fix platform probing logic so it actually works. v9.1: fix pdev init to NULL properly. v10: address most of Keith's concerns. v4 was thanks to Reviewed-by: Adam Jackson v5 was Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 2c52d776a42a28bb3e1463edf0cfe0672d0c08a9 Author: Dave Airlie Date: Tue Jun 19 16:01:08 2012 +0100 xf86: cursor code got mangled by indenting This fixes some really ugly code that got mangled by the indenting. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 9e4b8b74b008dd72d1da7074bd7ecae677cefd20 Author: Keith Packard Date: Thu Jul 5 11:31:55 2012 -0700 privates: Allow device privates to be allocated after server start This will permit midispcur to allocate its privates for hotplug outputs Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 493ad833233707b0a42e5fbdd957a24fc6e52917 Author: Keith Packard Date: Thu Jul 5 11:31:29 2012 -0700 dix: Allocate device privates separate from devices This will allow device privates to be resized. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit f38b2b628322f4d763b0c7f8387d5ab0472a7d2b Author: Keith Packard Date: Thu Jul 5 11:15:18 2012 -0700 mi: Don't save midispcur rendering resources for each cursor Instead, only save them for the most recently drawn cursor. This saves a bunch of storage for idle cursors. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 7651176b0093cf3a4cff2277f6918a7d0451af41 Author: Keith Packard Date: Tue Jul 3 16:12:59 2012 -0700 Use screen-specific privates for exa pixmap and gc privates Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 7ca32f1c282cb6d4d7255f118a1e2e6f54e6b3fa Author: Keith Packard Date: Tue Jul 3 16:05:42 2012 -0700 Use new screen-specific privates for fb window and gc privates This ensures that only screens using fb will have this space allocated. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit 9d457f9c55f12106ba44c1c9db59d14f978f0ae8 Author: Keith Packard Date: Tue Jul 3 15:45:09 2012 -0700 Add screen-specific privates. Screen-specific privates areas are only allocated for objects related to the target screen; objects allocated for other screens will not have the private space reserved. This saves memory in these objects while also allowing hot-plug screens to have additional private allocation space beyond what the core screens are using. Drivers are encouraged to switch to this mechanism as it will reduce memory usage in multi-GPU environments, but it is only required for drivers which will be loaded after the server starts, like modesetting. Objects providing screen-specific privates *must* be managed by the screen-specific private API when allocating or initializing privates so that the per-screen area can be initialized properly. The objects which support screen-specific privates are: Windows Pixmaps GCs Pictures Extending this list to include Colormaps would be possible, but require slightly more work as the default colormap is created before all colormap privates are allocated during server startup, and hence gets a bunch of special treatment. Of particular note, glyphs are *not* capable of supporting screen-specific privates as they are global objects, not allocated on a screen-specific basis, and so each driver must be able to see their privates within the glyph. Signed-off-by: Keith Packard Reviewed-by: Dave Airlie commit ed6daa15a7dcf8dba930f67401f4c1c8ca2e6fac Author: Ian Romanick Date: Wed Jul 4 15:21:09 2012 -0700 glx/dri2: Enable GLX_ARB_create_context_robustness If the driver supports __DRI2_ROBUSTNESS, then enable GLX_ARB_create_cotnext_robustness as well. If robustness values are passed to glXCreateContextAttribsARB and the driver doesn't support __DRI2_ROBUSTNESS, existing drivers will already generate the correct error values (so that the correct GLX errors are generated). Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 90aa2486e394c0344aceb2a70432761665a79333 Author: Ian Romanick Date: Wed Jul 4 15:21:08 2012 -0700 glx: Allow attributes and flags from GLX_ARB_create_context_robustness The assumtion is that if the underlying provider (e.g., glxdri2.c) doesn't support this extension, it will generate BadMatch for these flags and attributes. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit aef0b4593e165634ca7fa0745882dad12a54ebed Author: Ian Romanick Date: Wed Jul 4 15:21:07 2012 -0700 glx: Track the reset notification strategy for a context Also require that the reset notification for a new context and the other context in the share group match. There isn't yet any way to specify a non-default reset notification strategy, but that will come. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit f8198285cfc4704bc4d56922e5a2e99030a83778 Author: Ian Romanick Date: Wed Jul 4 15:21:06 2012 -0700 glx: Add extension string tracking for GLX_ARB_create_context_robustness Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 4ffbc984eac8a15925094614021de30dc8084e65 Author: Ian Romanick Date: Wed Jul 4 15:21:05 2012 -0700 glx: Reject creations of indirect contexts with unsupportable versions. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 41d5120eaf2bdf308eb904cac9b5027b003fea8d Author: Ian Romanick Date: Wed Jul 4 15:21:04 2012 -0700 glx: Implement GLX_EXT_create_context_es2_profile This patch builds on the infrastucture put in place for GLX_ARB_create_context_profile. If GLX_CONTEXT_ES2_PROFILE_BIT_EXT is specified and the requested version is 2.0, create a context with the __DRI_API_GLES2 API. This change assumes that any DRI2 driver can handle (possibly by saying "no seeing an API setting other than __DRI_API_OPENGL or __DRI_API_OPENGL_CORE. This allows enabling the extension any time GLX_ARB_create_context (and GLX_ARB_create_context_profile) is enabled. v2: Clean up some comments. Note that our behavior for GLX_CONTEXT_ES2_PROFILE_BIT_EXT w/version != 2.0 matches NVIDIA's. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit cef0b808d3152a20cd98d32457dde08bd5434e7c Author: Ian Romanick Date: Wed Jul 4 15:21:03 2012 -0700 glx: Implement GLX_ARB_create_context_profile Most of the infrastructure was already in place. This just adds: * Validate values specified with the GLX_CONTEXT_PROFILE_MASK_ARB attribute. * Select a DRI2 "api" based on the setting of GLX_CONTEXT_PROFILE_MASK_ARB. * Enable GLX_ARB_create_context_profile extension. This change assumes that any DRI2 driver can handle (possibly by saying "no") seeing an API setting other than __DRI_API_OPENGL. This allows enabling this extension any time GLX_ARB_create_context is enabled. Also, the validation code in __glXDisp_CreateContextAttribsARB is structured in a very verbose manner (using a switch-statement) to ease the addition of GLX_EXT_create_context_es2_profile. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 09a8a169d5929665778ae33e58e345fe1192b64c Author: Ian Romanick Date: Wed Jul 4 15:21:02 2012 -0700 glx: Implement GLX SetClientInfo2ARB protocol The protocol is almost identical to SetClientInfoARB. The only difference is the GL versions include an extra 4 bytes for the supported profile. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Signed-off-by: Keith Packard commit 167993254a5cbe11a1f44fad1e8ae042089c1619 Author: Peter Hutterer Date: Thu Jul 5 16:17:56 2012 +1000 list.h: don't crash when removing an element from a NULL list Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit 8aa6d49d46dacc31a85023d0159c1fb67401df73 Author: Ian Romanick Date: Wed Jul 4 15:21:01 2012 -0700 glx: Don't request prototypes for GL extension functions The server does not want GL extension prototypes. It never links with anything that could possibly provide implementations of these functions. It *is* the provide, and it does not provde these symbols. All this does is create hundreds of warnings like: incude/GL/glext.h:5570:45: warning: redundant redeclaration of 'glMultTransposeMatrixd' [-Wredundant-decls] include/GL/gl.h:1940:45: note: previous declaration of 'glMultTransposeMatrixd' was here I believe this was necessary back before the AIGLX days, but that was a long, long time ago. The warnings recently showed up with the addition of -Wredundant-decls to the CWARNFLAGS. v2: Update the commit message, no code changes. Signed-off-by: Ian Romanick Cc: Adam Jackson Cc: Dave Airlie Acked-by: Keith Packard Signed-off-by: Keith Packard commit 258abbf823f753757e4dddc13ef495f4024680db Author: Michal Srb Date: Thu Jun 28 17:17:12 2012 +0200 Look for ModuleData only in appropriate library LoaderSymbol calls dlsym with RTLD_DEFAULT pseudo handle making it search in every loaded library. In addition glibc adds NODELETE flag to the library containing the symbol. It's used in doLoadModule to locate ModuleData symbol, the module's library gets the flag and is kept in memory even after it is unloaded. This patch adds LoaderSymbolFromModule function that looks for symbol only in library specified by handle. That way the NODELETE flag isn't added. This glibc behavior doesn't seem to be documented, but even if other implementations differ, there is no reason to search ModuleData symbol outside the module's library. Signed-off-by: Michal Srb Reviewed-by: Daniel Stone v2: Switch LoaderSymbolFromModule arguments order. Correct description. Reviewed-by: Adam Jackson Signed-off-by: Peter Hutterer commit d84f0f823eeeecdf0498aadd3fbb1d11dabc0837 Merge: 12bfb4cf1 d04dfe3f7 Author: Peter Hutterer Date: Wed Jul 4 21:23:48 2012 +1000 Merge branch 'sigio-vt-switch-issues' into for-keith Conflicts: test/Makefile.am Signed-off-by: Peter Hutterer commit 12bfb4cf1bebb66d2c2eb76b93c18a2915b865e5 Author: Peter Hutterer Date: Tue Jun 26 09:19:33 2012 +1000 Xi: extend PropagateMask to EMASKSIZE Number of devices is 2 + MAXDEVICES, with index 0 and 1 reserved for XIAll{Master}Devices. At the current size, PropagateMask would be overrun in RecalculateDeviceDeliverableEvents(). Found by Coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit a9c09f8f8e2a97e4bfe927bc4c7f29b04ee3403a Author: Peter Hutterer Date: Mon Jun 25 14:24:11 2012 +1000 dix: fix memory leak in TouchEventHistoryReplay Don't leak if ti->history is NULL. Found by coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 55ff20eb37f00a3ad07b5acff19d4497ab513a97 Author: Peter Hutterer Date: Mon Jun 25 14:22:31 2012 +1000 dix: fix dereference before null check Found by Coverity. Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit e3f47be9fbc489e3eb5832445924810b2ff300f7 Author: Peter Hutterer Date: Mon Oct 24 10:01:26 2011 +1000 xfree86: fix use-after-free issue in checkInput *dev is the condition of the while loop we're in, reset to NULL after freeing Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie commit 252a69b592001b34714d0fe7508e1898883f9d01 Author: Peter Hutterer Date: Wed Jun 20 14:25:54 2012 +1000 xkb: use local variable instead of casting arg No functional changes. Signed-off-by: Peter Hutterer commit d04dfe3f754ad3a5f158057175cbd44319c1ae51 Author: Peter Hutterer Date: Fri Jun 22 15:18:53 2012 +1000 Drop custom sigio block/unblock functions from kdrive, ephyr and dmx Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 5d309af2ed93e91c7d72f548a11052051efbb40f Author: Peter Hutterer Date: Fri Jun 22 14:56:25 2012 +1000 xfree86: drop ddx-specific SIGIO blocking The hooks are left for this cycle, we can drop it next cycle once the drivers that need it (e.g. wacom) have been updated. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ff67135bec3ecea8cebeb46b42ece0a6671e231d Author: Peter Hutterer Date: Fri Jun 22 13:09:35 2012 +1000 xfree86: use OsBlockSIGIO from the ddx We can ignore the "wasset" argument now since the DIX will keep proper refcounting. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 6bf356ef2831baeccd7a650ed3fde0831e33c6c0 Author: Peter Hutterer Date: Fri Jun 22 13:02:40 2012 +1000 os: add OsBlockSIGIO and OsReleaseSIGIO Let the dix be in charge of changing the sigprocmask so we only have one entity that changes it. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 24525d96a3b9dba67eb75042500b2f208a2cc246 Merge: 4cd91bd4c 35e3d2291 Author: Keith Packard Date: Mon Jul 2 22:35:39 2012 -0700 Merge branch 'sigsafe-logging-varargs' This merge includes a minor fixup for '%p' arguments; must cast to uintptr_t instead of uint64_t as we use -Werror=pointer-to-int-cast which complains when doing a cast (even explicitly) from a pointer to an integer of different size. commit 35e3d229150395a222a0f53318daf5dbeb8f6eb6 Author: Peter Hutterer Date: Thu May 24 14:04:42 2012 +1000 Bump to ABI_XINPUT_VERSION 18 The input ABI hasn't changed, but input drivers need something to hook on if they want to log from within signal handlers and the input ABI is the simplest way of doing so. Signed-off-by: Peter Hutterer commit 541934168dbeb17059542bb5a1da8eba7995fa05 Author: Peter Hutterer Date: Mon May 28 10:10:30 2012 +1000 xfree86: constify InputDriverPtr->driverName and default_options Already treated as const anyway by all drivers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit c66089d2206bafc01307a8327ff6089edcb4ed2d Author: Peter Hutterer Date: Mon May 28 09:57:33 2012 +1000 xfree86: constify InputInfoPtr->type_name This corresponds to XListInputDevice(3)'s "type" field (after being converted to an Atom). Input drivers use the XI_KEYBOARD and similar defines, even Wacom which falls out of the common defines uses constant strings here. The use-case for having this non-const is small. Input ABI break technically, since we never freed this information anyway it is not a noticable change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 505c8a2b2cae0318db1148417ec850d54b38f7df Author: Chase Douglas Date: Mon Apr 9 09:41:38 2012 -0700 Log in OsVendorFatalError() in a signal safe manner The function can be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d51aebdbf99a9f240f7c318a70ba40e61cd43049 Author: Chase Douglas Date: Mon Apr 9 08:30:50 2012 -0700 Log in LoaderUnload() in a signal safe manner The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c3e1168778ec20beeac9979dc57e36400c70dd63 Author: Chase Douglas Date: Mon Apr 9 08:28:17 2012 -0700 Log in UnloadModuleOrDriver() in a signal safe manner The function may be called from a fatal signal handler. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 89e3ac07aca1def155299aff6f7a57ccafb68fd7 Author: Chase Douglas Date: Mon Apr 9 08:23:32 2012 -0700 Log safely in fatal signal handler While we probably don't need to be signal safe here since we will never return to the normal context, the logging signal context check will cause unsafe logging to be unhandled. Using signal safe logging here resolves the issue. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6fd5add005d0660b591d808583d1a6c6a85f1277 Author: Chase Douglas Date: Fri Apr 6 16:17:41 2012 -0700 Log mieq enqueue overflow in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 7f4a69b628a6246855054a0b94d6d6dd14e8842c Author: Chase Douglas Date: Fri Apr 13 16:01:38 2012 -0700 Log messages in TouchBeginDDXTouch() in a signal-safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f752226e40890643df213a62f0c96e6a0243e754 Author: Chase Douglas Date: Fri Apr 6 10:21:14 2012 -0700 Log messages in GetTouchEvents() in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 82d1c6b310eaa5095eed9ee4ea958261a46a78e1 Author: Chase Douglas Date: Fri Apr 6 08:32:28 2012 -0700 Warn when attempting to log in a signal unsafe manner from signal context Also, print out the offending message format. This will hopefully help developers track down unsafe logging. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 512bec06be6c79ca263da9de8f40430b8095b57b Author: Chase Douglas Date: Mon Apr 16 09:47:42 2012 -0700 Make BUG_WARN* signal safe Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 0fa5217836cf7fd3872fccc9f3ff9ff32426c25b Author: Chase Douglas Date: Fri Apr 6 16:09:05 2012 -0700 Print backtrace in a signal-safe manner Backtraces are often printed in signal context, such as when a segfault occurs. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer os: print offset as unsigned int, not long unsigned int pnprintf() takes unsigned int for %u Signed-off-by: Peter Hutterer commit ac20815d5235e7a8e7b331365aabf5a489fc5e34 Author: Chase Douglas Date: Tue Jun 5 15:39:41 2012 +1000 Add ErrorFSigSafe() alternative to ErrorF() ErrorF() is not signal safe. Use ErrorSigSafe() whenever an error message may be logged in signal context. [whot: edited to "ErrorFSigSafe"] Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 164b38c72fe9c69d13ea4f9c46d4ccc46566d826 Author: Chase Douglas Date: Fri Apr 6 08:28:40 2012 -0700 Add LogMessageVerbSigSafe() for logging messages while in signal context [whot: edited to use varargs, squashed commit below] Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer os: fix vararg length calculation Make %u and %x sizeof(unsigned int), %p sizeof(void*). This is printf behaviour and we can't guarantee that void* is uint64_t anyway. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4cd91bd4c6325b2e617ca90a725f02ac124c2372 Author: Alan Coopersmith Date: Sat May 12 10:11:33 2012 -0700 Enable no-undefined symbols mode in Solaris builds if -z parent is in ld The Solaris linker recently added a -z parent flag for easier checking of symbol definitions in plugins against the program that loads them. If that's present, this enables it, along with -z defs to error on undefined symbols to alert us if any modules call symbols that won't be found at runtime. This builds upon, and requires, the recent Cygwin work to build Xorg. It moves a couple more modules to be after the Xorg binary in the build order so that they can find the binary to check against, much as the Cygwin changes did (these would be modules built on Solaris but not Cygwin). v2: This version only sets the flags for the xorg-server build itself, and does not yet export them in xorg-server.pc to the drivers, since most of the drivers are not ready to build with -no-undefined yet. Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit d31942e15c619e9355ef8183223f9165902a9d56 Author: Alan Coopersmith Date: Sat May 12 10:10:49 2012 -0700 Add pixman to module dependencies for pixman_region_* functions Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit 339f38ef380d750c4c7afd60331a559845e4184e Author: Alan Coopersmith Date: Sat May 12 10:09:41 2012 -0700 Build tda9885.c functions into fi1236 to avoid libtool relinking problems Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit a00066d2916b6910429cc1c7feedafbaee0d4750 Author: Alan Coopersmith Date: Thu Jun 28 15:15:53 2012 -0700 Add dixGetGlyphs to replace GetGlyphs from libXfont to simplify linking No other Xfont consumer used it, and this saves us from having to link callers against libXfont for one simple function when doing -no-undefined symbols builds. The function is given a new name to avoid clashing with existing libXfont binaries, but a #define is provided to preserve the API so we don't have to fix all the callers at the same time. Signed-off-by: Alan Coopersmith Reviewed-by: Yaakov Selkowitz commit 212b9803238d2de2e77cbe5de62d3f616ae50daf Author: Aaron Plattner Date: Fri Jun 29 13:33:58 2012 -0700 randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch ProcRRGetScreenSizeRange uses REQUEST(xRRGetScreenSizeRangeReq) followed by REQUEST_SIZE_MATCH(xRRGetScreenInfoReq). This happens to work out because both requests have the same size, so this is not a functional change, just a cosmetic one. Signed-off-by: Aaron Plattner Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 957bf959fb577b292a3e4f6bb67740ca09e7aeb9 Author: Dave Airlie Date: Wed Jun 27 14:36:04 2012 +0100 dix/render: consolidate window format matching code. This code existed in 3 different forms, perhaps it should be consolidated. Reviewed-by: Keith Packard Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit a7b97b0fa85d695ae19d194cfa3267159d149e5d Author: Christopher James Halse Rogers Date: Thu Jun 28 12:07:11 2012 +1000 dri2: Fix authentication for < v8 clients (v2). The legacy logic was embarassingly wrong; AuthMagic should return errno, so returning FALSE only when AuthMagic returns nonzero is exactly wrong. v2: Match drmAuthMagic by returning -EINVAL rather than EINVAL Fix trailing whitespace https://bugs.freedesktop.org/show_bug.cgi?id=51400 Signed-off-by: Christopher James Halse Rogers Tested-by: Chris Wilson Reviewed-by: Michel Dänzer Tested-by: Knut Petersen Signed-off-by: Keith Packard commit 8b4f0a4fdd6c15f49458bc3a8c3135b8c389240d Merge: 59294a217 d642e7128 Author: Keith Packard Date: Thu Jun 28 10:38:26 2012 -0700 Merge remote-tracking branch 'jturney/master' commit 59294a2179bd5bb996693af004b470932df00ac6 Merge: 855003c33 191b63065 Author: Keith Packard Date: Thu Jun 28 10:11:44 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 855003c333a0ead1db912695bc9705ef2b3144b4 Author: Keith Packard Date: Thu Jun 21 18:45:18 2012 -0700 randr: Catch two more potential unset rrScrPriv uses Ricardo Salveti found one place where the randr code could use the randr screen private data without checking for null first. This happens when the X server is running with multiple screens, some of which are randr enabled and some of which are not. Applications making protocol requests to the non-randr screens can cause segfaults where the server touches the unset private structure. I audited the code and found two more possible problem spots; the trick to auditing for this issue was to look for functions not taking a RandR data structure and where there was no null screen private check above them in the call graph. Signed-off-by: Keith Packard commit 32603f57ca03b6390b109960f8bb5ea53ac95ecb Author: Ricardo Salveti de Araujo Date: Thu Jun 21 00:55:53 2012 -0300 randr: first check pScrPriv before using the pointer at RRFirstOutput Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo, which later calls RRFirstOutput. Signed-off-by: Ricardo Salveti de Araujo Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit cf196efa05bbefdeb43f6e6bcc5f6d9080fea715 Author: Dave Airlie Date: Fri Jun 22 15:24:43 2012 +0100 modesetting 0.4.0: bump configure.ac commit 30ab80ef5421fea9d9dd0779aa138892ff62bd6e Author: Dave Airlie Date: Fri Jun 22 15:26:28 2012 +0100 modesetting: pci probing requires interface version 1.4 Set the drm interface version to 1.4 so we get the bus id correctly. Signed-off-by: Dave Airlie commit d642e7128790ec6b709df8d1a91333ab87598077 Author: Yaakov Selkowitz Date: Thu Jun 21 20:01:49 2012 +0100 configure.ac: link XWIN with GLX_SYS_LIBS Link XWIN with GLX_SYS_LIBS, just like all the other DDXs Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9f1edced9abc066f0ba47672d006fe50fb206371 Author: Peter Hutterer Date: Fri Jun 15 10:00:51 2012 +1000 xfree86: always enable SIGIO on OsVendorInit (#50957) Drivers call xf86InstallSIGIOHandler() for their fd on DEVICE_ON. That function does not actually enable the signal if it was blocked to begin with. As a result, if one vt-switches away from the server (SIGIO is blocked) and then triggers a server regeneration, the signal remains blocked and input devices are dead. Avoid this by always unblocking SIGIO when we start the server. X.Org Bug 50957 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 4ba340cfaa8d430c808566495f8deda0ff1b4424 Author: Keith Packard Date: Thu Jun 21 18:42:46 2012 -0700 randr: Clean up compiler warnings about unused and shadowing variables set but not used variables shadowing a previous local A hidden problem was that the VERIFY_RR_* macros define local 'rc' variables, any other local definitions for those would be shadowed and generate warnings from gcc. I've renamed the other locals 'ret' instead of 'rc'. Signed-off-by: Keith Packard commit 191b630656ba206ad78b7803c3a76f7d9567d9d8 Author: Peter Hutterer Date: Thu Jun 21 11:25:24 2012 +1000 include: document _XkbErrCode2 macros Why sending the number of the (implementation-dependent) error statement to the client is a good idea is a bit beyond me, but at least document it so we can all share the despair. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 7100118c8d3314d73bfef0a262af56686b227055 Author: Peter Hutterer Date: Mon Jun 18 11:28:52 2012 +1000 AC_SUBST the GLX_SYS_LIBS libxservertest needs -lpthread from glxapi.c's pthread_once() call. Usually this would be pulled in by the XORG_LIBS but not when building without Xorg. This commit has no visible effect on the current tree, preparation for test cleanups. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 014ad46f1b353a95e2c4289443ee857cfbabb3ae Author: Peter Hutterer Date: Thu Jun 21 14:26:15 2012 +1000 os: print newline after printing display name Much easier for scripts that try to read the display value off the file descriptor. Plus, this restores the behaviour we had for this patch in Fedora since server 1.6 (April 2009). Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Reviewed-by: Chase Douglas commit e1f86a7c77ed49e001ea42ef76ab83e87dbdf126 Author: Sergei Trofimovich Date: Mon Jun 18 01:13:21 2012 +0300 test/.gitignore: add hashtabletest Signed-off-by: Sergei Trofimovich Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c9bbf8fe574591c8e191eeef20f8994781718772 Author: Jon TURNEY Date: Thu Jun 21 19:38:55 2012 +0100 hw/xwin/glx: Fix glxWinCreateContext() function pointer mismatch Fix glxWinCreateContext() function signature to align with commit 96d74138 "glx: Extend __GLXscreen::createContext to take attributes", which added more parameters to the screen createContext function for implementing GLX_ARB_create_context indirect.c: In function 'glxWinScreenProbe': indirect.c:683:36: warning: assignment from incompatible pointer type Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 6e85660c7503c7e88e24003562444dffde6c88ff Author: Jon TURNEY Date: Mon Mar 5 23:07:56 2012 +0000 hw/xwin/glx: Update gen_gl_wrappers.py for the current glx/dispatch.h Fix the code generator for the dispatch table initialization after the whitespace/coding style changes to glx/dispatch.h Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit cb638ed9c81f07d8603b07db395e31a41fed8685 Author: Jon TURNEY Date: Thu Jun 21 18:55:57 2012 +0100 hw/xwin/glx: Blacklist 'GDI generic' GL renderer If the native GL renderer is the GDI generic renderer (as can happen if we are in safe mode, or the video driver is VGA, or we have hybrid graphics which hasn't noticed that xwin requires 3d acceleration), don't use it. It's not accelerated and we will probably get better conformance and perfomance from swrast. Fix so we don't install screen function wrappers in glxWinScreenProbe unless we are succesful. Also, move fbConfig dumping to after GLX version has been determined from extensions Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 8c24d20933ba9c2ef0e9a81815c3be23fa896aea Author: Jon TURNEY Date: Thu Jun 21 18:05:24 2012 +0100 hw/xwin/glx: Fix glxLogExtensions to handle a null string without crashing Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c08c7c8f655d7721c1e02bfeeb965b6379f72553 Author: Jon TURNEY Date: Fri Jun 24 13:32:10 2011 +0100 hw/xwin/glx: Create a new dispatch table rather than modifying the existing one Create a new dispatch table rather than modifying the existing one struct _glapi_table is not a complete type after including glapi.h, so we use glapi_get_dispatch_table_size() to determine it's size (alternatively, we could include glapitable.h, to complete the type) This could possibly be written to use _glapi_create_table_from_handle() instead, but that requires making all the wrapper functions exports Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3ef3ce069d52dcfa932c90ccd30854a8d9daa15a Merge: a0c8716cd ff541e0a1 Author: Keith Packard Date: Thu Jun 21 08:52:34 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 704b847abfd29e9adde27127a15a963414f8bcf4 Author: Chase Douglas Date: Fri Apr 6 10:13:45 2012 -0700 Add FormatUInt64{,Hex}() for formatting numbers in a signal safe manner Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bc85c81687a24aea738094ff11f4448fb3b3afbb Author: Chase Douglas Date: Fri Apr 6 08:03:09 2012 -0700 Save log file file descriptor for signal context logging None of the FILE based functions are signal safe, including fileno(), so we need to save the file descriptor for when we are in signal context. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit d3725549f0276487fba1d419094209d18e86669f Author: Chase Douglas Date: Fri Apr 6 07:43:57 2012 -0700 Add global variable inSignalContext This will be used for checking for proper logging when in signal context. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit a0c8716cdca139059e7aec8a3cb75726dd37a4a1 Author: Peter Hutterer Date: Thu Jun 21 13:45:06 2012 +1000 kdrive: adjust BlockHandler/WakeupHandler to new API Missing API update caused Xephyr to crash on startup, garbage memory dereference when accessing timeout. Introduced in 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 kdrive.c:868:27: warning: assignment from incompatible pointer type kdrive.c:869:28: warning: assignment from incompatible pointer type Signed-off-by: Peter Hutterer Signed-off-by: Keith Packard commit ff541e0a1f84bd98966148793f35afeaf71c271b Author: Alan Coopersmith Date: Wed Jun 13 21:20:51 2012 -0700 Remove obsolete tab stop comments from hw/xfree86/parser/*.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit 687536b1044a3297f6b9a45f6a2d2987daa7be59 Author: Alan Coopersmith Date: Tue Jun 12 22:38:46 2012 -0700 Fix some overly indented/poorly line wrapped comments in dix/events.c Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard commit 93a378aad4a4a03f37ddafccfedeb9d6e2be2a6a Author: Alan Coopersmith Date: Tue Jun 12 22:29:51 2012 -0700 OtherClientGone: Remove unreachable return statement Now that FatalError is marked as _X_NORETURN, the compilers know we can't get here, and the return statement added to make them happy in the past now makes them unhappy. Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Reviewed-by: Keith Packard commit 3f97284b10c250457888902debd4d793cb4544d4 Author: Christopher James Halse Rogers Date: Wed Jun 20 13:53:53 2012 +1000 dri2: Pass a ScreenPtr through to the driver's AuthMagic function. (v3) xwayland drivers need access to their screen private data to authenticate. Now that drivers no longer have direct access to the global screen arrays, this needs to be passed in as function context. v2: Don't break ABI v3: Paint the bikeshed blue; drop fd from AuthMagic2ProcPtr prototype Signed-off-by: Christopher James Halse Rogers Reviewed-by: Kristian Høgsberg Signed-off-by: Keith Packard commit dae317e7265007b38012244722e3b3a06e904ed5 Author: Andy Ritger Date: Thu Jun 14 09:15:37 2012 -0700 randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged(). Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged(). The latter calls ProcessInputEvents(), which can trigger a recursion into mieqProcessInputEvents(). The former omits the call to ProcessInputEvents(). Signed-off-by: Andy Ritger Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit 54476b5e4461ff523e935961affabcf0de12c556 Author: Peter Hutterer Date: Thu Jun 7 16:52:20 2012 +1000 dix: if the scroll valuator reaches INT_MAX, reset to 0 Too much scrolling down may eventually trigger an overflow of the valuator. If this happens, reset the valuator to 0 and skip this event for button emulation. Clients will have to figure out a way to deal with this, but a scroll event from (close to) INT_MAX to 0 is a hint of that it needs to be ignored. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8dc70acbf3d82611ac9ec1ec2a52edcc01934850 Merge: ffb47a123 b59adc9c2 Author: Keith Packard Date: Thu Jun 14 13:04:29 2012 -0700 Merge remote-tracking branch 'alanc/master' commit ffb47a123ddd1233fb4229cf23483652065c5e82 Merge: db9d2b8a5 b840ba5f5 Author: Keith Packard Date: Thu Jun 14 13:01:17 2012 -0700 Merge remote-tracking branch 'idr/GLX_ARB_create_context' commit db9d2b8a508ab812e5c717a41310faad81879b09 Author: Dave Airlie Date: Thu Jun 7 15:01:59 2012 +0100 xserver: fix build on arm tinderbox Rob Clark got an ARM tinderbox up and running, and this code is built there but not here, this should fix it, though I hope that code never gets executed. Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 6d86b64dbaef5a16712fd1fdc3157f716d238877 Merge: 812786f4d 4c68f5d39 Author: Keith Packard Date: Thu Jun 14 11:05:22 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit b59adc9c2427e5efac3513c20992723e23f92691 Author: Alan Coopersmith Date: Thu Jun 7 20:58:01 2012 -0700 Make stub version of fbdevHWAdjustFrame match new prototype in fbdevhw.h Removed flags argument to match api rework in commit 1f0e8bd5eb1a55 Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie commit 4c68f5d395c66f28b56e488cb3cd12f36820357b Author: Peter Hutterer Date: Wed May 9 09:21:28 2012 +1000 dix: disable all devices before shutdown f3410b97cf9b48a47bee3d15d232f8a88e75f4ef introduced a regression on server shutdown. If any button or key was held on shutdown (ctrl, alt, backspace are usually still down) sending a raw event will segfault the server. The the root windows are set to NULL before calling CloseDownDevices(). Avoid this by disabling all devices first when shutting down. Disabled devices won't send events anymore. Master keyboards must be disabled first, otherwise disabling the pointer will trigger DisableDevice(keyboard) and the keyboard is removed from the inputInfo.devices list and moved to inputInfo.off_devices. A regular loop through inputInfo.devices would thus jump to off_devices and not recover. Signed-off-by: Peter Hutterer Acked-by: Chase Douglas Reviewed-by: Chase Douglas commit 9c0e820216cd1631f75b037b7908d55ac091692c Author: Peter Hutterer Date: Thu May 10 12:55:44 2012 +1000 Xi: drop forced unpairing when changing the hierarchy Devices are unpaired as needed on DisableDevice now. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e433d1046c222f9d969c2c28a4651ff9097614f4 Author: Peter Hutterer Date: Thu May 10 12:42:59 2012 +1000 dix: disable non-sprite-owners first when disabling paired devices If a sprite-owner is to be disabled but still paired, disable the paired device first. i.e. disabling a master pointer will disable the master keyboard first. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit df1704365e700d3cf1d36a241bdfc479159a8df7 Author: Peter Hutterer Date: Thu May 10 15:33:15 2012 +1000 dix: free the sprite when disabling the device Disabled devices don't need sprites (they can't send events anyway) and the device init process is currently geared to check for whether sprite is present to check if the device should be paired/attached. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e57d6a89027c55fef987cdc259668c48a8b4ea1b Author: Peter Hutterer Date: Thu May 10 15:32:20 2012 +1000 dix: move freeing the sprite into a function Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 46adcefb0e08515195d8e49985a4e210395700b3 Author: Peter Hutterer Date: Thu May 10 12:10:12 2012 +1000 dix: return early from DisableDevice if the device is already disabled Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 076f9d3a6660fa7fef4ae9decaffd2feebdd32c4 Author: Peter Hutterer Date: Thu May 10 12:20:37 2012 +1000 dix: drop client argument from PairDevices - unused This is a leftover from early MPX days where any keyboard could be paired with any pointer (before the device hierarchy). Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d034605f3914e41e0d636eafff9278be1c041b2c Author: Peter Hutterer Date: Thu May 10 14:13:20 2012 +1000 dix: rename shadowing loop variable in TouchResizeQueue second 'i' shadows the function-wide one, rename to 'j' Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a86f3ef511db16be5ddc723bf14e770dad23ee45 Author: Peter Hutterer Date: Thu May 10 11:55:21 2012 +1000 dix: change "still paired warning" to use BUG_RETURN_VAL Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4bcf43919a14cd2cd20af4099cd213ce25792edb Author: Peter Hutterer Date: Thu May 10 15:32:47 2012 +1000 dix: use BUG_RETURN_VAL for pairing errors Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit 642569fc79a1814acca1c8f529539b054bf36907 Author: Peter Hutterer Date: Thu May 10 12:11:57 2012 +1000 Replace a few BUG_WARN with BUG_RETURN_VAL Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 11ecfb8884b7c4def0863a57868a6b9fa1b63ae5 Author: Peter Hutterer Date: Thu May 10 11:48:05 2012 +1000 include: add BUG_RETURN_* macros Helper functions to avoid things like if (foo) { BUG_WARN(foo); return 1; } Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit ff41753b1bee414b16c0f1e8d183776e87c94065 Author: Peter Hutterer Date: Wed Jun 6 14:38:49 2012 +1000 xkb: warn if XKB SlowKeys have been automatically enabled Slow keys are enabled when the XKB AccessX features are generally enabled (ctrls->enabled_ctrls & XkbAccessXKeysMask) and either shift key is held for 8 seconds. For the unsuspecting user this appears as if the keyboard suddenly stops working. Print a warning to the log, so we can later tell them "told you so". Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson commit f20a532ba3c7b7d74530f3906c7bacf016bb8faf Author: Alan Coopersmith Date: Sun May 20 00:00:59 2012 -0700 Fix statement not reached warning in _DMXXineramaActive Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis commit 1be317c4e5d99d11a124ad4e7a90a5dcae591e20 Author: Alan Coopersmith Date: Wed May 23 19:27:23 2012 -0700 Provide prototypes for Mmio functions for Solaris Studio on SPARC Actual inline implementations are provided via external *.il files generated from *.S files in hw/xfree86/os-support/solaris Fixes missing prototype warnings that xorg-macros has recently elevated to build-breaking errors. Signed-off-by: Alan Coopersmith Signed-off-by: Henry Zhao Reviewed-by: Dave Airlie commit 812786f4d4306cb16f8ed57fa4a1a32bb1d13fe3 Author: Dave Airlie Date: Tue Jun 5 19:55:52 2012 +0100 xwin: fixup block/wakeup handlers These got missed out in the api changeover. Reported-by: Colin Harrison Signed-off-by: Dave Airlie Signed-off-by: Keith Packard commit 3cbaf621782fb5f5679acf9104571d3ae2b48b72 Author: Dave Airlie Date: Tue Jun 5 17:54:02 2012 +0100 xfree86: fix new warnings introduced in rebase. Spotted these in tinderbox: xf86xv.c: In function 'xf86XVScreenInit': xf86xv.c:282: warning: assignment from incompatible pointer type xf86xv.c: In function 'xf86XVCloseScreen': xf86xv.c:1275: warning: assignment from incompatible pointer type xf86xv.c: In function 'xf86XVAdjustFrame': xf86xv.c:1366: warning: assignment from incompatible pointer type Missed removing one flags. Signed-off-by: Dave Airlie Tested-by: Keith Packard Signed-off-by: Keith Packard commit ec79187d9a23ba30eafc7ba225049559e6bcb78d Author: Dave Airlie Date: Tue Jun 5 14:41:18 2012 +0100 modesetting: workaround kernel bug reporting 0x0 as valid mins It reports these but then you can't create a 0 sized bo. Signed-off-by: Dave Airlie commit 1f0e8bd5eb1a5539689cfc4f5a6b86b530907ec5 Author: Dave Airlie Date: Tue Jun 5 13:22:18 2012 +0100 api: rework the X server driver API to avoid global arrays. This is a squash merge containing all the API changes, as well as the video ABI bump. Its been squashed to make bisection easier. Full patch log below: commit b202738bbf0c5a1c1172767119c2c71f1e7f8070 Author: Aaron Plattner Date: Mon May 14 15:16:11 2012 -0700 xfree86: Bump video ABI to 13.0 The ABI was broken by changes to convert from screen index numbers to ScreenPtr / ScrnInfoPtr in various structures and function signatures. Signed-off-by: Aaron Plattner Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3 Author: Dave Airlie Date: Thu May 24 10:56:57 2012 +0100 xf86: xf86ClearEntityListForScreen should take a pScrn When adding GPU screens this make life easier. (also fix comment, as pointed out by Alan) Reviewed-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit afee8b5ab4501597ecc1ade34124d7ca227ab055 Author: Dave Airlie Date: Thu May 24 07:07:32 2012 +0100 xf86i2c: add pscrn for drivers to use This just adds a pScrn pointer into the struct for the drivers to use instead of scrnIndex. Mostly scrnIndex is used for logging, but some drivers use it to lookup xf86Screens, so let them stash a pScrn instead. Removing the scrnIndex is a bit more involved and I'm not sure its worth the effort. Doing i2c in the X server is legacy code as far as I'm concerned. Reviewed-by: Alex Deucher Signed-off-by: Dave Airlie commit ea5092f1f679691d187f1eee9427e6057beec56e Author: Dave Airlie Date: Wed May 23 19:25:20 2012 +0100 dix/gc: consolidate GC object creation in one place The standard GC create and scratch GC create were 90% the same really, and I have a need in the future for creating GC objects without the other bits, so wanted to avoid a third copy. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1 Author: Dave Airlie Date: Wed May 23 10:24:06 2012 +0100 xf86: add a define to denote the new non-index interfaces are being used This can be used by drivers to provide compatible APIs. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3 Author: Dave Airlie Date: Wed May 23 15:09:12 2012 +0100 dix: make Create/Free scratch pixmaps take a ScreenPtr While technically an API/ABI change I doubt anyone uses it, but it helps in splitting screens up. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60 Author: Dave Airlie Date: Wed May 23 14:57:55 2012 +0100 xf86/xv: remove scrnIndexfrom xf86FindXvOptions. Move this interface to taking an ScrnInfoPtr. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843 Author: Dave Airlie Date: Wed May 23 14:53:59 2012 +0100 xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2) stop passing indices into this function. v2: drop flags argument. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 58824e414f35682435f15bfe6c4b656bd90b9235 Author: Dave Airlie Date: Wed May 23 14:48:09 2012 +0100 xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI) Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd Author: Dave Airlie Date: Tue Apr 10 14:18:59 2012 +0100 xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2) Instead of passing an index, pass the actual ScreenPtr. This allows more moving towards not abusing xf86Screens + screenInfo. v2: drop the blockData/wakeupData args as per ajax's suggestion., fix docs. Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 790d003de20fb47674420a24dadd92412d78620d Author: Dave Airlie Date: Wed Apr 11 09:53:14 2012 +0100 xf86/common: remove some more pScrn->pScreen uses remove some more conversions that appeared after api cleanups. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f Author: Dave Airlie Date: Tue Apr 10 16:34:53 2012 +0100 ddc: change API to take ScrnInfoPtr (v2) This removes all xf86Screens usage from ddc code, it modifies the API for some functions to avoid taking indices. v2: address Alan's comments about dropping DDC2Init parameter. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit fe3f57b6eaf6860a33876a54f9439f69578f03a5 Author: Dave Airlie Date: Tue Apr 10 16:31:26 2012 +0100 vbe: don't use index for VBEInterpretPanelID (API) Remove use of xf86screens from vbe module. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit abf1965f4ed91529036d3fdb470d6a3ce6f29675 Author: Dave Airlie Date: Tue Apr 10 16:25:11 2012 +0100 int10/vbe: don't use xf86Screens. (ABI) (v3) Pass the ScrnInfoPtr instead of the index in the int10 struct. This saves us using it to dereference xf86Screens. v2: address Alan's comment to fix struct alignment. v3: squash in all the int10 fixes, test the vm86 code builds, after comments by Keith. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 23cca612b4fb5efc33683c7624b803b457387e3d Author: Dave Airlie Date: Tue Apr 10 15:30:18 2012 +0100 xserver: drop index argument to ScreenInit (ABI/API) (v2) This drops the index argument, its the same as pScreen->myNum, and its the last major index abuse I can find. v2: address Alan's review - update docs, fix xwin/xnest/darwin Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960 Author: Dave Airlie Date: Tue Apr 10 15:23:01 2012 +0100 xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API) This migrates PointerMoved from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9 Author: Dave Airlie Date: Tue Apr 10 15:20:46 2012 +0100 xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API) This migrates the PMEvent from index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2 Author: Dave Airlie Date: Tue Apr 10 15:18:30 2012 +0100 xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API) This migrates the SetDGAMode callback from an index to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit baf5e4818a74f2b68c3dfdcc56f54322351039a0 Author: Dave Airlie Date: Tue Apr 10 15:14:11 2012 +0100 xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2) This migrates the ChangeGamma interface to avoid passing a index. v2: fix xf86RandR12.c + xf86cmap.c call Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 51e5f90ada929d6b23176090badbb42fdb3fa550 Author: Dave Airlie Date: Tue Apr 10 15:11:09 2012 +0100 xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API) The EXA interface migrates to ScreenPtr, and the xf86 interface migrated to ScrnInfoPtr. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 94f1f21d17e86f96d4a54292a399160950087675 Author: Dave Airlie Date: Tue Apr 10 15:02:11 2012 +0100 xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API) This migrates the ValidMode to passing a ScrnInfoPtr instead of an index. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 3f8f18198fed4f39ec805b508a3482e91eea26b2 Author: Dave Airlie Date: Tue Apr 10 14:59:46 2012 +0100 xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2) This migrate the SwitchMode interface to take a ScrnInfoPtr instead of an index. v2: drop flags. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit d06a038a5c49328ab3a8d969d24f9fcd22c63202 Author: Dave Airlie Date: Tue Apr 10 14:50:37 2012 +0100 xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2) This converts AdjustFrame code paths to passing a ScrnInfoPtr instead of an integer index. v2: drop flags args. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90 Author: Dave Airlie Date: Tue Apr 10 14:41:27 2012 +0100 xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2) Another index->pScrn conversion. v2: drop flags arg. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3 Author: Dave Airlie Date: Tue Apr 10 14:35:41 2012 +0100 xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2) This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr instead of an index into xf86Screens. This allows dropping more public dereferences of the xf86Screens and screenInfo. v2: drop flags args as suggested by Keith, fix docs. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 06729dbbc804a20242e6499f446acb5d94023c3c Author: Dave Airlie Date: Tue Apr 10 14:04:59 2012 +0100 xserver: remove index from CloseScreen (API/ABI breakage) This drops the index from the CloseScreen callback, its always been useless really, since the pScreen contains it. Reviewed-by: Alan Coopersmith Acked-by: Aaron Plattner Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 12f9aaff38ac2cf528387ce610e41fbd448698e2 Author: Chase Douglas Date: Fri Apr 6 12:44:07 2012 -0700 test/touch: Initialize device name Without this change, the test will segfault when we switch to signal- safe logging. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 3476eb38063473a7a5fcd78e2095e284118de839 Merge: 78f0d9cdc 42ae2e819 Author: Keith Packard Date: Sun Jun 3 20:24:24 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 42ae2e8199fe875319978249963de7499607988b Author: Siddhesh Poyarekar Date: Tue May 29 10:17:50 2012 +0530 xkb: Allocate size_syms correctly when width of a type increases The current code seems to skip syms with width less than type->num_levels when calculating the total size for the new size_syms. This leads to less space being allocated than necessary during the next phase, which is to copy over the syms to the new location. This results in an overflow leading to a crash. Signed-off-by: Siddhesh Poyarekar Signed-off-by: Peter Hutterer commit 88c767edb01ed7efb19ffe3a453e16107b27130b Author: Michal Suchanek Date: Wed May 23 11:22:05 2012 +0200 Fix crash for motion events from devices without valuators A WarpPointer request may trigger a motion event on a device without valuators. That request is ignored by GetPointerEvents but during smooth scroll emulation we dereference dev->valuators to get the number of axes. Break out early if the device doesn't have valuators. Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e07c945ab992b1b1acdd9f5554e0688f744e4769 Author: Dave Airlie Date: Fri Jun 1 12:34:42 2012 +0100 modesetting: bump to latest X server compat api. Signed-off-by: Dave Airlie commit 78f0d9cdc441a575e15e5f7200ce74750d2f7ad2 Author: Chad Versace Date: Wed May 2 16:18:49 2012 -0700 dri2: Add DRI2GetParam request (v2) Bump dri2proto dependency to 2.7. Bump DRI2INFOREC_VERSION to 7. This new protocol request effectively allows clients to perform feature detection on the DDX. The request was added in DRI2 protocol 1.4. If I had DRI2GetParam in June 2011, when I was implementing support in the Intel DDX and Mesa for new hardware that required a new DRI2 attachment format, then I could have avoided a week of pain caused by the necessity to write a horrid feature detection hack [1] in Mesa. In the future, when the work begins to add MSAA support to the Intel DDX, having a clean way to do feature detection will allow us to avoid revisiting and expanding that hack. [1] mesa, commit aea2236a, function intel_verify_dri2_has_hiz v2: If driver doesn't define ds->GetParam, dont' crash. Fall back to default behavior, per keithp. Reviewed-by: Keith Packard Reviewed-by: Eric Anholt (v1) Reviewed-by: Ian Romanick (v1) Signed-off-by: Chad Versace commit 594b4a4f0601066d09e49a84c5af8c2eb6f07240 Author: Peter Hutterer Date: Thu May 24 13:34:11 2012 +1000 Xext: include dix-config.h silences In file included from ../include/misc.h:111:0, from hashtable.c:2: ./include/os.h:559:1: warning: redundant redeclaration of 'strndup' [-Wredundant-decls] Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit d348ab06aae21c153ecbc3511aeafc8ab66d8303 Author: Julien Cristau Date: Fri May 11 21:31:50 2012 +0200 Xvfb: destroy the screen pixmap in CloseScreen Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit e4153c1d9138ed40de1c615525066a0f5bb599dc Author: Julien Cristau Date: Fri May 11 21:31:49 2012 +0200 Xi: make stub DeleteInputDeviceRequest call RemoveDevice DeleteInputDeviceRequest is called from CloseDownDevices on reset, so call RemoveDevice to avoid leaking devices in Xvfb/Xnest/Xwin. Signed-off-by: Julien Cristau Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b840ba5f54de5b00a7700ca49e51308b8cc66f92 Author: Ian Romanick Date: Fri Dec 16 14:44:55 2011 -0800 glx: Implement protocol for glXCreateContextAttribsARB Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 23612a63fc12be13442a63193a19f883d7a87e5d Author: Ian Romanick Date: Fri Dec 16 14:42:51 2011 -0800 glx: Make several functions available outside the glxcmds.c compilation unit validGlxScreen, validGlxFBConfig, validGlxContext, and __glXdirectContextCreate will soon be used by createcontext.c. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit cd5689cac5ed722e9dc1a3fab9a260b798062ee6 Author: Ian Romanick Date: Sat Dec 10 15:15:18 2011 -0800 glx: Use one function to add a context to all global tables Instead of having separate __glXAddContextToList and AddResource functions, just have one function that does both steps. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit c1d91ab37025d3e0df7e8f647fb21816fe0e8420 Author: Ian Romanick Date: Sat Dec 10 15:11:57 2011 -0800 glx: Initialize remaining context fields There is no reason to assume the screen's context allocated initialized these fields, so don't. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 0db76e5f771fb964e67de716a254850a38e02f19 Author: Ian Romanick Date: Sat Dec 10 15:09:57 2011 -0800 glx: Initialize all context fields together v2: Fix whitespace error noticed by Christopher James Halse Rogers. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit befa76d251eb5de85edb621056eed52784722bc7 Author: Ian Romanick Date: Fri Dec 9 17:28:21 2011 -0800 glx: Implement GLX SetClientInfoARB protocol v2: Bump glproto version to 1.4.15. This patch uses structure names that only exist in that glproto version and later. Noticed by Christopher James Halse Rogers. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 8b8cd6f6f4dbf9d058ace638221f31801da7df9f Author: Ian Romanick Date: Mon Dec 5 13:52:01 2011 -0800 glx: Optionally call DRI2 createContextAttribs from __glXDRIscreenCreateContext Signed-off-by: Ian Romanick Reviewed-by: Christopher James Halse Rogers commit 0a9226376c9a44c3b50baad25f2b7d2b9fecb708 Author: Ian Romanick Date: Mon Dec 5 13:48:19 2011 -0800 glx: Add tracking for GLX_ARB_create_context and GLX_ARB_create_context_profile The formatting of the extension data table was mangled by indent. This patch also undoes that and adds approripate control comments so that indent won't do it again. Signed-off-by: Ian Romanick Reviewed-by: Dave Airlie Reviewed-by: Christopher James Halse Rogers commit 96d74138b1c0273e88933220d99a893858b649cd Author: Ian Romanick Date: Mon Dec 5 10:56:07 2011 -0800 glx: Extend __GLXscreen::createContext to take attributes The attributes will be used for glXCreateContextAttribsARB additions in follow-on patches. v2: Add missing 'int *error' parameters noticed by Christopher James Halse Rogers. v3: Remove redundant 'int err;' declaration noticed by Christopher James Halse Rogers. This was supposed to be in v2, but I missed it. v4: Add comma missing from additions in v2. Ugh. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 62f06b0dcde13cb87bc3d0c5ff86d8db7e3ff0ef Author: Ian Romanick Date: Fri Dec 2 21:14:46 2011 -0800 glx: Don't track GLClientmajorVersion or GLClientminorVersion Nothing uses these fields anywhere in the server. Signed-off-by: Ian Romanick Reviewed-by: Jesse Barnes Reviewed-by: Christopher James Halse Rogers commit 724176a87afdb9a79ce6307214bc2e869530aef3 Author: Ian Romanick Date: Mon Dec 5 10:55:20 2011 -0800 glx: Fix mishandling of shared contexts Signed-off-by: Ian Romanick Reviewed-by: Eric Anholt Reviewed-by: Christopher James Halse Rogers commit 1c01090f6485cb82c2511fb461e66ff15a097358 Author: Dave Airlie Date: Wed May 23 11:31:39 2012 +0100 modesetting: fix make distcheck add missing compat header file. Signed-off-by: Dave Airlie commit ef47a1b3bfec33d4031af2e01bdd46d634be2f51 Author: Dave Airlie Date: Wed May 23 11:21:55 2012 +0100 modesetting: convert to new scrn conversion APIs. Generated with util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie commit 3e46d578d8c40c95343278db0a66c931e85247c7 Author: Dave Airlie Date: Wed May 23 11:21:39 2012 +0100 modesetting: add compat header file Signed-off-by: Dave Airlie commit 2d4fda4b09e67e47d3e6fc4743fc6e81bfe40f28 Author: Marcin Slusarz Date: Mon May 21 21:39:43 2012 +0200 xfree86: fix mouse wheel support for DGA clients xf86-input-evdev (since "smooth scrolling" support was added) can send mouse motion and wheel events in one batch, so we need to handle it properly. Otherwise mouse wheel events which come with motion events are lost and separate mouse wheel events are handled through non-DGA path. Signed-off-by: Marcin Slusarz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9bc53d8cb04af2be3feeebb1b10774c2d599a76b Author: Michal Srb Date: Tue May 22 21:19:40 2012 -0700 dri2: SProcDRI2Connect - send the response. The swapped implementation of DRI2Connect is always responding with empty device and driver values. However the response was only prepared and never sent (also had undefined .type member), causing e.g. glxinfo get stuck waiting for response when started remotely from machine with different endianity. Signed-off-by: Michal Srb Reviewed-by: Jeremy Huddleston Tested-by: Michel Dänzer Signed-off-by: Keith Packard commit 457fc77691b2df66f6dd3ba10ce7c1b61b9b42a3 Merge: 2e237c838 5a3a98fcb Author: Keith Packard Date: Tue May 22 10:32:29 2012 -0700 Merge remote-tracking branch 'alanc/master' commit 2e237c838fe1780c2fcbd2306f35fd15b6747831 Author: Dave Airlie Date: Wed Apr 11 10:02:25 2012 +0100 xf86: reimplement XF86SCRNINFO macro using new functions. This macro did lookups via privates but we can just use the ScreenToScrn conversion instead. This patch drops all in-server uses, we should drop the macro later, once drivers have been converted to not use it. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 8da35202f390cd8a0410814911017d99fa9dddcb Author: Dave Airlie Date: Wed Apr 11 09:53:35 2012 +0100 xf86/modes: drop more pScrn->pScreen usages Just simple conversion to use the lookup function. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit e7a9e30fd20a7c2a526783726d0a76b8a04b053a Author: Dave Airlie Date: Wed Apr 11 09:52:37 2012 +0100 xaa: convert pScrn->pScreen to use accessor. This uses a standard conversion function to do the conversion. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 738367ac9b6179593a38074d0105de206cbed296 Author: Dave Airlie Date: Wed Apr 11 09:46:39 2012 +0100 xf86/modes: drop two uses of screenInfo Just use new macros to access scrn->screen. Reviewed-by: Adam Jackson Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit cc4fe613d0b0891ea9502340801b37e64301f573 Author: Dave Airlie Date: Sat May 5 09:47:24 2012 +0100 render/exa: use glyph picture accessors use the glyph picture accessors in the X server, render and EXA code. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit a45e1d6cc6f2a5f31ed737294351cfa251caa030 Author: Dave Airlie Date: Sat May 5 09:38:28 2012 +0100 render: add GetGlyphPicture accessor. This is a new API to stop the drivers directly looking up the glyph pictures in a global array. It provides a define GLYPH_HAS_GLYPH_PICTURE_ACCESSOR for drivers to work in a compat way. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 41151f88a62f01b00c1912822b8b430df1eb307e Author: Dave Airlie Date: Tue Apr 10 15:47:33 2012 +0100 xf86: migrate to using xf86ScreenToScrn wrapper (v2) migrate to new helper API. This just wraps all the obvious uses of xf86Screens[pScreen->myNum], and should be fairly simple to review. v2: remove commented out lines. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 53932b3803fa2c02949fd7d4d0e433ea58fa89f1 Author: Dave Airlie Date: Tue Apr 10 15:47:32 2012 +0100 xf86: add helper functions to convert to from ScrnInfoPtr/ScreenPtr (v2) These are just simple functions that we should start migrating drivers to using. The end goal is to remove xf86Screens and screenInfo from the ABI. This includes a define XF86_HAS_SCRN_CONV that drivers can ifdef to provide their own copies. I'll probably post a generic compat.h file for drivers later. v2: add asserts. Reviewed-by: Aaron Plattner Reviewed-by: Keith Packard Signed-off-by: Dave Airlie commit 39f73e813f7d404498629f6104a9003d092af28d Author: Dave Airlie Date: Tue May 8 13:01:12 2012 +0100 xf86/pci: fix slot claiming counting. Currently if we claim a slot for a PCI driver, we never let it go properly, this prevents the fallback probe from reusing the slot, even though it isn't claimed for that pci slot. So if you set the modesetting driver to point at a specific kms device, that isn't a PCI device (i.e. USB dongle), then the modesetting driver loads, the pci probe tries to bind the config slot to the primary PCI device, however we then check the kms device bus id to discover it isn't valid. However we don't remove the claim on the slot. Next the old probe function is called and there is no slots to claim. This patch fixes that and converts the pciSlotClaimed boolean into a counter, and changes the unclaim api to take a device pointer to remove from the entity. Reviewed-by: Adam Jackson Signed-off-by: Dave Airlie commit 07dcc3f1a98dff2ee374a15ac5beac778d2ccc97 Author: Dave Airlie Date: Sun May 6 17:13:02 2012 +0100 config/udev: add pre_init stage to config and udev. In order to use udev for gpu enumeration, we need to init udev earlier than input initialisations. This splits the config init stuff so that udev pre init sets up before output initialisation. this is just a prepatory patch, doesn't change anything major. Reviewed-by: Peter Hutterer Signed-off-by: Dave Airlie commit a2a02882ab65133e6c0c69db1f38bc20b406236f Author: Dave Airlie Date: Sun May 6 17:35:34 2012 +0100 xfree86: add modesetting driver to fallback list on Linux Add the modesetting driver to the fallback list on Linux, after vesa before fbdev. Acked-by: Peter Hutterer Signed-off-by: Dave Airlie commit 5a3a98fcb799c2ac8fa7494645ad9030f1cac837 Author: Alan Coopersmith Date: Fri Apr 27 13:35:32 2012 -0700 Undocument Font Module loading Code was deleted in commit affec10635343668839994ea2bac16c1d4524200 Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie Reviewed-by: Adam Jackson commit afcb7ba24ebd9968d48a192df438e7f1c0ecb770 Author: Alan Coopersmith Date: Fri Apr 27 13:31:56 2012 -0700 Undocument mandatory loadable modules The code to implement was deleted when BaseModules[] was emptied by the replacement of the "pcidata" module with libpciaccess calls in commit 46f55f5dead5d70cdff30531d80a72f6be042315. Signed-off-by: Alan Coopersmith Reviewed-by: Dave Airlie Reviewed-by: Adam Jackson commit c3180a74a4fc6304bcfe676e3285d707874a9fea Author: Alan Coopersmith Date: Fri Apr 6 21:51:37 2012 -0700 cvt man page should use Hz, not kHz, for vertical refresh rate https://bugs.freedesktop.org/show_bug.cgi?id=48311 Signed-off-by: Alan Coopersmith Reviewed-by: Julien Cristau commit 96e0ab54962ab59f03275a098ee02c1f0f86b94e Author: Alan Coopersmith Date: Thu Jan 26 15:44:40 2012 -0800 Convert sbusPaletteKey to latest DevPrivate API Signed-off-by: Alan Coopersmith Reviewed-by: Mark Kettenis Reviewed-by: Dave Airlie commit ba883a0f3435d5da82a8134e696c4905eea70f23 Merge: ae1c48ebc acdc4f54e Author: Keith Packard Date: Thu May 17 16:49:19 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit acdc4f54ee5784d26c251ff8c941b4360ae80e9b Author: Jeremy Huddleston Date: Thu May 17 10:08:02 2012 -0700 XQuartz: Avoid a race in initialization of darwinPointer http://xquartz.macosforge.org/trac/ticket/579 Signed-off-by: Jeremy Huddleston commit c495211373a118acee02a29c6eb25a332abc856c Author: Jeremy Huddleston Date: Thu May 17 16:20:30 2012 -0700 XQuartz: Declare noPseudoramiXExtension for miinitext.c Regression-from: 6699f54fe0b3f4952a75e46fb6c3a643988e65dd Signed-off-by: Jeremy Huddleston commit f5fc5334116ad2b0c8930ac68c52bf0f7a2f1417 Author: Jeremy Huddleston Date: Mon May 7 17:07:27 2012 -0700 XQuartz: Provide fls implementation for Tiger Regression-from: 30623d6ff7bca223f9e1a825e86bd317eef8bf16 Signed-off-by: Jeremy Huddleston commit e0097ce9719f9b0aeccf7102630c0299f8acdf93 Author: Jeremy Huddleston Date: Mon May 7 16:31:38 2012 -0700 XQuartz: Tiger build fix http://trac.macports.org/ticket/34364 Regression-from: 662d41acdde1dcb9774fbe4054e251c708acaffe Reported-by: Peter Dyballa Signed-off-by: Jeremy Huddleston commit 4acbaa3027d89728ed932616f6ef66d93537b101 Author: Jeremy Huddleston Date: Mon May 7 16:16:20 2012 -0700 XQuartz: Workaround an SDK bug on Leopard/x86_64 Signed-off-by: Jeremy Huddleston commit ae1c48ebc8a3c0b32b3d732e8a340bfe00bb9f79 Author: Peter Hutterer Date: Wed May 16 10:54:48 2012 +1000 Xi: fix "discards ''const' qualifier" warnings extinit.c: In function 'XInputExtensionInit': extinit.c:1301:29: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] extinit.c:1303:36: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] property.c: In function 'XIChangeDeviceProperty': xiproperty.c:757:39: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e42bf98283ddc4eac2213c96e8ebcd711583e6b1 Author: Peter Hutterer Date: Wed May 16 10:47:45 2012 +1000 Xi: fix "shadows previous local" warnings exevents.c: In function 'DeepCopyFeedbackClasses': exevents.c:272:20: warning: declaration of 'classes' shadows a previous local [-Wshadow] exevents.c:245:16: warning: shadowed declaration is here [-Wshadow] (and a few more like this) exevents.c: In function 'DeliverTouchEmulatedEvent': exevents.c:1442:27: warning: declaration of 'win' shadows a parameter [-Wshadow] exevents.c:1404:55: warning: shadowed declaration is here [-Wshadow] exevents.c:1475:28: warning: declaration of 'listener' shadows a parameter [-Wshadow] exevents.c:1403:62: warning: shadowed declaration is here [-Wshadow] xiselectev.c: In function 'ProcXISelectEvents': xiselectev.c:178:34: warning: declaration of 'dummy' shadows a previous local [-Wshadow] xiselectev.c:91:18: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit ca6d25ad2d1fb4efae9d40c7e74c8494f9918625 Author: Peter Hutterer Date: Wed May 16 10:10:11 2012 +1000 dix: Move DeviceFocusEvent from Xi into enterleave.c This is only called from the enterleave implementation, so move it and its helper functions to there. No functional changes. Fixes build error introduced in 31174565ec0090b4c03c9334c82878be2455f938 if building with '-Werror=implicit-function-declaration' Signed-off-by: Peter Hutterer Reviewed-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit 749a593e49adccdf1225be28a521412ec85333f4 Author: Peter Hutterer Date: Wed May 9 11:30:46 2012 +1000 dix: undo transformation for missing valuators (#49347) last.valuators contains the transformed valuators of the device. If the device submits events with x/y missing, we need to get that from last.valuators and undo the transformation to that axis. X.Org Bug 49347 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 03318835a5a87a8a5cb3515130b5380d565c0d91 Author: Peter Hutterer Date: Mon May 14 15:06:56 2012 +1000 include: don't redeclare device events in xkbsrv.h ../../include/xkbsrv.h:308:51: warning: redundant redeclaration of ‘DeviceKeyPress’ [-Wredundant-decls] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 43754803c13c232fd5c37eb3d4b1ca2898d6a6cd Author: Peter Hutterer Date: Mon May 14 15:07:57 2012 +1000 test: don't shadow parameter 'len' protocol-xiquerydevice.c:226:25: warning: declaration of ‘len’ shadows a parameter [-Wshadow] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1bafc9f26bef0997c98b97efa888ed5e2a54f6f0 Author: Peter Hutterer Date: Mon May 14 15:01:09 2012 +1000 test: fix redundant declaration of "BadDevice" In file included from protocol-common.c:36:0: protocol-common.h:36:12: warning: redundant redeclaration of ‘BadDevice’ [-Wredundant-decls] In file included from protocol-common.c:30:0: ../../Xi/exglobals.h:41:12: note: previous declaration of ‘BadDevice’ was here Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47e1d0ea43eb7a6caf774f375f11849d0d515e14 Author: Peter Hutterer Date: Mon May 14 14:56:02 2012 +1000 test: fix "userdata shadows global declaration" warnings protocol-xiquerypointer.c:124:72: warning: declaration of ‘userdata’ shadows a global declaration [-Wshadow] and similar Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e6da635826bdda7f67bd492dda8dba8a97809213 Author: Peter Hutterer Date: Mon May 14 14:51:58 2012 +1000 test: fix "redundant declaration of devices" warning In file included from protocol-xiwarppointer.c:41:0: protocol-common.h:91:23: warning: redundant redeclaration of ‘devices’ [-Wredundant-decls] protocol-common.h:86:3: note: previous declaration of ‘devices’ was here Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 693a31e704c0745b209e69711522417c4fa8541e Author: Simon Thum Date: Mon Apr 2 18:49:53 2012 +0200 dix: indentation fixes for pointer acceleration Signed-off-by: Simon Thum Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 31174565ec0090b4c03c9334c82878be2455f938 Author: Michal Suchanek Date: Wed Apr 25 15:03:31 2012 +0200 dix: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit f1cec791d1def506b99b0e6c160e9e8be107bd13 Author: Michal Suchanek Date: Tue Apr 24 20:08:02 2012 +0200 xfree86: Add ifdef wrapper to xvmodproc.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit d2f71b13946a14d9698d0355cc45b114b236e73b Author: Michal Suchanek Date: Tue Apr 24 18:44:48 2012 +0200 Xi: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit a4f87f885a55373a6daf56fd540e10c5f1db5a5c Author: Michal Suchanek Date: Tue Apr 24 18:43:31 2012 +0200 kdrive: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 369edd78769fa1a174e4091d0fa0722350df5d68 Author: Michal Suchanek Date: Tue Apr 24 18:41:07 2012 +0200 dix: don't duplicate DoFocusEvents declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 36377fb0e88a6d237d98805e802ab3793582c976 Author: Michal Suchanek Date: Tue Apr 24 18:37:30 2012 +0200 dix: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit ea9ed83f8f0da241099d0a11c3460d46c5114dea Author: Michal Suchanek Date: Tue Apr 24 18:32:53 2012 +0200 xfree86: don't include xvmodproc.h when not needed The functions are already declared in xf86xv.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 1927e5ab25c9c9bf481e75ac50f4b140a96e634a Author: Michal Suchanek Date: Tue Apr 24 18:24:19 2012 +0200 xserver: Remove duplicate declaration in resource.h Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 1339681e4fbd4f5981e6246eedb23e8a9c5d10f4 Author: Michal Suchanek Date: Tue Apr 24 18:19:43 2012 +0200 miext: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 6699f54fe0b3f4952a75e46fb6c3a643988e65dd Author: Michal Suchanek Date: Tue Apr 24 18:18:43 2012 +0200 mi: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit b4bf90f9fb20e0e56d2451096d4f62ecfc24a962 Author: Michal Suchanek Date: Tue Apr 24 18:16:30 2012 +0200 exa: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 5595e7ce0735db6f82e1fe9df45434826019bf9e Author: Michal Suchanek Date: Tue Apr 24 18:15:17 2012 +0200 randr: Remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit c59c9dac84301f8eb2a0e4a09a8839146aa5a069 Author: Michal Suchanek Date: Tue Apr 24 18:13:22 2012 +0200 xkb: Remove redundant declarations. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit d0a83460451df1a4c5667b2f414c35ee81b4ffa4 Author: Michal Suchanek Date: Tue Apr 24 18:11:16 2012 +0200 xfixes: remove redundant declaration. Signed-off-by: Michal Suchanek Reviewed-by: Dave Airlie Signed-off-by: Dave Airlie commit 3a94b338aaa48b656aae1bb3a5a9d64300c0a093 Merge: afc153a5b c91d00e0f Author: Keith Packard Date: Wed May 9 21:17:16 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit e8da587845978ad66c3b3e2e085fd99c16b5d3c8 Author: Dave Airlie Date: Wed May 9 09:33:54 2012 +0100 bump version to 0.3.0 commit 62543946490e7decae4f6549d83072f004e850d4 Author: Matt Turner Date: Wed May 9 00:26:29 2012 -0400 configure.ac: remove DRI and RENDER Driver doesn't support either of these. Signed-off-by: Matt Turner Signed-off-by: Dave Airlie commit 7dc22b7911ac3d5c131075903e3fbf52c58eac15 Author: Dave Airlie Date: Wed May 9 09:32:05 2012 +0100 modesetting: make sure the pci device corresponds to the drm device If we get asked to pci open a device with a kms path override, make sure they match, otherwise this driver can steal the primary device binding for a usb adaptor. The driver should fallback to the old probe entry point in this case. Signed-off-by: Dave Airlie commit afc153a5b4fc58ae70dc214f61a71b1a8c855f06 Author: James Cloos Date: Tue May 8 17:55:10 2012 -0400 Fix RANDR’s gamma_to_ramp(). In order to generate a 256-entry ramp in [0,65535] which covers the full range, one must mupliply eight-bit values not by 256 but rather by 257. Many years back – well before the RANDR extension was written, and before xorg@fdo – a similar bug fix was made to the DIX for converting client-supplied eight-bit color values into sixteen-bit values. Noticed by: Elle Stone and Graeme Gill. Signed-off-by: James Cloos commit e501c34d4937d5e6f19abd29f1ec7f95faa3bb55 Author: Yaakov Selkowitz Date: Tue May 1 22:03:24 2012 -0500 hw/xwin/glx: Use silent rules Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 026d402fef623a0bda0bedd9c0938ba787bf9829 Author: Yaakov Selkowitz Date: Fri Mar 30 14:33:18 2012 -0500 xfree86: use silent rules with sdksyms generation Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit 3d98dac46c17bc6e03546b8a532bfb55f00e5084 Author: Yaakov Selkowitz Date: Sun Apr 29 20:45:17 2012 -0500 xfree86: respect EXEEXT in relink target Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY commit e6461db6dcb437cfa7d4b23008c2c12f8169ff79 Author: Yaakov Selkowitz Date: Thu Apr 26 01:49:06 2012 -0500 os: Add CryptoAPI as a choice of SHA1 implementation Both Cygwin and MinGW can use Windows' native CryptoAPI for SHA1, saving a dependency on libgcrypt or OpenSSL. The necessary functions are in ADVAPI32.DLL, which is among the default lib flags and is already used in hw/xwin for accessing the registry. Signed-off-by: Yaakov Selkowitz Reviewed-by: Mikhail Gusarov Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison Tested-by: Colin Harrison commit c91d00e0f330b9de604068e1bfcb0a307096434f Author: Daniel Kurtz Date: Wed Apr 18 17:51:53 2012 +0800 os/log: refactor logging It is not safe to ever use an arbitrary (possibly user supplied) string as part of the format for a *sprintf() call. For example: 1. Name a Bluetooth keyboard "%n%n%n%n%n%n%n%n" 2. Pair it with a computer running X and try to use it 3. X is not happy when trying to do the following in xf86-input-evdev: xf86IDrvMsg(pInfo, X_CONFIG, "Device: \"%s\"\n", device); because LogVHdrMessageVerb() has put the %n from the device name into a format string of the form: "evdev: %n%n%n%n%n%n%n%n: Device: \"%s\"\n" Instead, build up a log message in place by appending successive formatted strings by sncprintf'ing to the end of the previous. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6ce0eac4f8a05f6d7401445cab95027709d3a479 Author: Daniel Kurtz Date: Wed Apr 18 17:51:52 2012 +0800 os/log: only write timestamp if a message is actually written to logfile The current code will write a timestamps into the logFile whenever the last message ended with a '\n' - even if the verb for that timestamp is at too high a level. This timestamp will sit there with no matching message until the next call to LogVWrite with a valid verb. In other words, in some cases, timestamps in the X.org.log are for some completely unrelated message that was previously ignored due to insufficient verbosity, and not for the message that appears next to it in the log file. We keep the current policy which appears to be to only apply timestamps if a message is actually written to a log file. That is, no timestamps on stderr, or in the mem buffer. Therefore, the timestamp stringification is moved to the conditional where it is used. Since logging uses a fixed length buffer, this patch also forces a '\n' whenever a buffer is terminated due to a too-long write request. This allows the newline detection to work even on overflow, and also cleans up the log a bit in the overflow case. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c2e2a164d615ab06be28a663734e782614b5cc7 Author: Daniel Kurtz Date: Wed Apr 18 09:51:51 2012 +0000 os/xprintf: add Xvscnprintf and Xscnprintf Normal snprintf() usually returns the number of bytes that would have been written into a buffer had the buffer been long enough. The scnprintf() variants return the actual number of bytes written, excluding the trailing '\0'. Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c30862879d2c766519780bb7f353f35edf0daa9b Author: Daniel Kurtz Date: Wed Apr 18 17:51:50 2012 +0800 os/log: trivial cleanups * space->tab * remove comment that doesn't make any sense Signed-off-by: Daniel Kurtz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 97041364a6acb2b66b5cfd06757c90a006ad50e9 Merge: 19082726c ee542b855 Author: Keith Packard Date: Wed May 2 20:47:25 2012 -0700 Merge remote-tracking branch 'whot/for-keith' No conflicts here commit ee542b85590814ee25369babce1ad14feeb137af Author: Chase Douglas Date: Tue May 1 10:21:12 2012 -0700 Report touch emulated buttons in XIQueryPointer for XI 2.1 and earlier XInput 2.1 and earlier clients do not know about touches. We must report touch emulated button presses for these clients. For later clients, we only report true pointer button presses. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 19082726cb2c69f53e9720904521e3c98f788bff Author: Ryan Pavlik Date: Fri Oct 21 12:47:38 2011 -0500 configure.ac: on MinGW, link with ws2_32 instead of winsock2 ws2_32 is the correct name for the libary (even on 64 bit Windows :-)) Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit ad9605a3e21b20fa8565dc6701610712ac6dd9e1 Author: Ryan Pavlik Date: Fri Nov 4 13:26:14 2011 -0500 configure.ac: MinGW doesn't have setuid binaries either. If the target platform isn't in a list of platforms we know don't use a setuid binary, we try to test if we can chown something to root. This test possibly won't give the right answer if we are cross-compiling, which is common for the MinGW target. This patch adds MinGW to the list of platforms we know don't use a setuid binary. Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 2225208c2ef9857f14813376ce85d305f19263dd Author: Ryan Pavlik Date: Fri Nov 4 13:30:43 2011 -0500 configure.ac: auto-disable MITSHM if we lack IPC The MITSHM extension uses SYSV IPC, but even if configure's test for IPC failed, MITSHM was still enabled by default, breaking MinGW builds by default. Unfortunately, fixing this exposes the fact that the HAVE_SYSV_IPC test wasn't being used for anything before and so we hadn't noticed it was failing on Cygwin. Change from using SHM_W|SHM_R flags (which aren't required by POSIX) to S_IRUSR|S_IWUSR flags (which are) Signed-off-by: Ryan Pavlik Reviewed-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 1e7b500a8e1d79b91a4e857a2da06194efe8cf69 Author: Chase Douglas Date: Tue May 1 10:21:11 2012 -0700 Report logical button state in ProcXIQueryPointer Physical button state is usually meaningless to an X client. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit d063f64b5c8c8c27fca41163c93dbca06a774d1c Author: Dave Airlie Date: Tue May 1 17:12:29 2012 +0100 modesetting: attempt to work out if we want 24 or 32bpp the cirrus driver presents certain challenges, and this is a workaround, until we can possibly agree some sane interface for exposing this information. Signed-off-by: Dave Airlie commit 0426e6d65b6598edfbcb2fc66ee65fb08256469e Author: Jon TURNEY Date: Tue Jan 3 00:14:32 2012 +0000 configure.ac: Make default configuration for MinGW disable unsupported extensions and DDXs Same as the default configuration for Cygwin, --disable-xorg and --disable-dmx DDX by default, and force --disable-xv and other unsupported extensions Signed-off-by: Jon TURNEY Reviewed-by: Yaakov Selkowitz commit 610f532e6a3d934c473d2d16dff95f582285b2eb Author: Dave Airlie Date: Tue May 1 16:52:18 2012 +0100 modesetting: move opening kernel device to before setting depth due to interaction between option handling and set depth, we need to what fbdev does to get the device path early. Signed-off-by: Dave Airlie commit f3410b97cf9b48a47bee3d15d232f8a88e75f4ef Author: Peter Hutterer Date: Mon Apr 30 10:01:48 2012 +1000 dix: when disabling a device, release all buttons and keys A suspend-induced device disable may happen before the device gets to see the button release event. On resume, the server's internal state still has some buttons pressed, causing inconsistent behaviour. Force the release and the matching events to be sent to the client. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit af88b43f9e604157b74270d609c08bdfa256a792 Author: Peter Hutterer Date: Fri Apr 27 16:31:17 2012 +1000 dix: don't emulate scroll events for non-existing axes (#47281) Test case: - create a device with REL_HWHEEL and ABS_X and ABS_Y. evdev 2.7.0 will set that up as device with 1 relative axis - move pointer to VGA1 - xrandr --output VGA1 --off Warps the pointer to the new spot and calls GPE with the x/y mask bits set. When running through the loop to check for scroll event, this overruns the axes and may try to emulate scroll events based on random garbage in the memory. If that memory contained non-zero for the scroll type but near-zero for the increment field, the server would hang in an infinite loop. This was the trigger for this suggested, never-merged, patch here: http://patchwork.freedesktop.org/patch/9543/ X.Org Bug 47281 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 08962951de969b9d8c870af8b6e47303dc0decfd Author: Peter Hutterer Date: Fri Apr 27 10:52:39 2012 +1000 os: make timers signal-safe If TimerSet() is called from a signal handler (synaptics tap handling code) may result in list corruption if we're currently inside TimerSet(). See backtrace in https://bugzilla.redhat.com/show_bug.cgi?id=814869 Block signals for all list manipulations in the timers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d662fa2450856777b59c4b62b912395a8bfd52fd Author: Michal Suchanek Date: Thu Apr 26 15:11:20 2012 +0200 dmx: Annotate dmxlog.c with _X_ATTRIBUTE_PRINTF and _X_NORETURN and fix resulting printf warning in dmxLogVisual Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 5c361d59c5031d9b3f7f9093a52d2b1ff4d9ae5f Author: Chase Douglas Date: Fri Apr 20 11:08:15 2012 -0700 TouchListenerAcceptReject: Warn and return early on bad listener index Signed-off-by: Chase Douglas Reviewed-by: Bryce Harrington Signed-off-by: Peter Hutterer commit 88bacc49f06da5927f716869f5a32672a8297ed0 Author: Chase Douglas Date: Wed Apr 4 15:29:42 2012 -0700 os: Add -displayfd option This option specifies a file descriptor in the launching process. X will scan for an available display number and write that number back to the launching process, at the same time as SIGUSR1 generation. This means display managers don't need to guess at available display numbers. As a consequence, if X fails to start when using -displayfd, it's not because the display was in use, so there's no point in retrying the X launch on a higher display number. Signed-off-by: Adam Jackson Signed-off-by: Chase Douglas Reviewed-by: Julien Cristau Tested-by: Julien Cristau Reviewed-by: Alan Coopersmith Signed-off-by: Peter Hutterer commit 1d82ec95942b88dd01f0ac6b883368360a0b5fe6 Author: Michal Suchanek Date: Mon Apr 23 13:52:40 2012 +0200 xserver: Fix out-of-tree build Fixes regression caused by ccb3e78124fb05defd0c9b438746b79d84dfc3ae Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ea51e9b2877df60135edaf2a8f88d0f2a2b41060 Author: Peter Hutterer Date: Mon Apr 23 10:35:53 2012 +1000 Xi: return BadValue on XIQueryVersion if the version is less than first call Clients that use plugin systems may require multiple calls to XIQueryVersion from different plugins. The current error handling requires client-side synchronisation of version numbers. The first call to XIQueryVersion defines the server behaviour. Once cached, always return that version number to any clients. Unless a client requests a version lower than the first defined one, then a BadValue must be returned to be protocol-compatible. Introduced in 2c23ef83b0e03e163aeeb06133538606886f4e9c Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 93d6ba5b711cbd3f502d83e54c9739856d2e6f2a Author: Jeremy Huddleston Date: Thu Apr 26 21:17:54 2012 -0700 XQuartz: Make sure we tell startx the correct server binary to use in our fallback path With multiple servers installed, we can't be certain if X is Xorg or Xquartz Signed-off-by: Jeremy Huddleston commit fa6dddc6ce51c1b7a43fb379fb2a19550f6c8683 Author: Michal Suchanek Date: Wed Mar 28 18:12:39 2012 -0700 xfree86: workaround crash on close Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek Reviewed-by: Jeremy Huddleston Tested-by: Knut Petersen commit adcb48a29dcb3f32ff570551de4b014775c1e147 Author: Jonas Maebe Date: Sun Apr 22 20:52:47 2012 -0700 glapi: Correct size of allocated _glapi_table struct The __glapi_gentable_set_remaining_noop() routine treats the _glapi_struct as an array of _glapi_get_dispatch_table_size() pointers, so we have to allocate _glapi_get_dispatch_table_size()*sizeof(void*) bytes rather than sizeof(struct _glapi_struct) bytes. Signed-off-by: Jonas Maebe Reviewed-by: Jeremy Huddleston commit e34519e525559b01a63d26639f13f0487468de28 Author: Jeremy Huddleston Date: Thu Apr 19 16:38:06 2012 -0700 XQuartz: darwinPointer now sends both absolute and relative motion This should hopefully help out wine clients that were continuing to have issues after the earlier changes. http://xquartz.macosforge.org/trac/ticket/548 Signed-off-by: Jeremy Huddleston commit 662d41acdde1dcb9774fbe4054e251c708acaffe Author: Jeremy Huddleston Date: Thu Apr 19 18:48:22 2012 -0700 XQuartz: Add a hack to better handle clicky wheel scroll mice We loose information from AppKit being in our way. Before adopting smooth scrolling, we always rounded-up the number of scroll button clicks per NSEvent. Now, the scroll value is accumulated in the dix, and clicky scroll wheels with legacy X11 clients are seeing an accumulation of error due to so many translations (button press to smooth scrolling value in AppKit, passed to the dix, and then synthesized into a button press). This attempts to make the situation better. http://xquartz.macosforge.org/trac/ticket/562 Signed-off-by: Jeremy Huddleston commit eda85290ae47d8dd497ef9335d10268bbe3e02a0 Author: Jeremy Huddleston Date: Thu Apr 19 16:20:30 2012 -0700 XQuartz: Use screenInfo.{width,height} instead of grabbing it from the first screen Signed-off-by: Jeremy Huddleston commit b99586c9086ac29df144ef75df92f8c0c7554651 Author: Jeremy Huddleston Date: Wed Apr 18 17:50:55 2012 -0700 XQuartz: Separate out tablet and mouse event delivery into separate functions This should have no immediate impact aside from fake mouse buttons no longer working with tablets (where they aren't needed or desired anyways). This prepares us for future changes. Signed-off-by: Jeremy Huddleston commit 30623d6ff7bca223f9e1a825e86bd317eef8bf16 Author: Jeremy Huddleston Date: Thu Apr 19 16:06:45 2012 -0700 XQuartz: Correct calculation of the size of our file descriptor array in console_redirect Reported-by: Joe Rohde Signed-off-by: Jeremy Huddleston commit b4c4c65a35640e7274ccd4228f62110147878b72 Author: Jeremy Huddleston Date: Wed Apr 18 01:01:44 2012 -0700 XQuartz: Fix a deadlock in pre-dispatch code The fact that this has been in place so long makes me really wonder if anybody cares about this running in Tiger or Leopard. Signed-off-by: Jeremy Huddleston commit d1ef0d4964e43a4ab777750ad214d1092fd1ffda Author: Jeremy Huddleston Date: Sat Apr 7 15:26:53 2012 -0700 test: Fix make dist It seems like make dist should be doing te right thing without this commit, but it's not in some cases. Don't ask me to explain why. Signed-off-by: Jeremy Huddleston commit d97868d934fd1a00f9e9ef23a1154a70c7bc0464 Author: Jeremy Huddleston Date: Thu Apr 19 16:39:23 2012 -0700 os: Annotate OsVendorFatalError as _X_ATTRIBUTE_PRINTF Signed-off-by: Jeremy Huddleston Tested-By: Michal Suchanek commit 0ba1794fe2896395875f62e911720c7585687444 Author: Jeremy Huddleston Date: Thu Apr 19 16:51:46 2012 -0700 xres: Fix build without composite Regression from: b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 Signed-off-by: Jeremy Huddleston Reviewed-by: Rami Ylimäki Tested-By: Michal Suchanek commit d77eb7ee49ef19c2c4c7381d56e9d0f9c3fbc890 Merge: 31e3c0ff7 c7b162555 Author: Keith Packard Date: Thu Apr 19 15:48:34 2012 -0500 Merge remote-tracking branch 'yselkowitz/master' Pull in Cygwin for XFree86 commit 31e3c0ff7f5fb36421be8de06e5f6e675ec26ddc Author: Keith Packard Date: Thu Apr 19 15:25:41 2012 -0500 Export CompositeClientWindowType Make sure CompositeClientWindowType is visible for XResource v1.2 Signed-off-by: Keith Packard commit e6308e32fe2b5f74133d4d238ffa512257f6327c Merge: 3720aa33e 51a8d8dd1 Author: Keith Packard Date: Thu Apr 19 10:45:07 2012 -0500 Merge remote-tracking branch 'whot/for-keith' Touch input changes from Chase commit 51a8d8dd19d7496fe84b37a1f0a7a03658120539 Merge: ebf214876 00cf1c40b Author: Peter Hutterer Date: Thu Apr 19 17:03:54 2012 +1000 Merge branch 'input-fixes' of git://people.freedesktop.org/~cndougla/xserver into for-keith commit 00cf1c40b28417d7035c2917d048553eb720023c Author: Chase Douglas Date: Wed Apr 18 18:21:54 2012 -0700 Replay original touch begin event instead of generated begin event The generated event does not have axes other than X and Y and has a newer timestamp. In particular, the newer timestamp may be newer than the real touch end event, which may be stuck in the syncEvents queue. If a client uses the timestamps for grabbing bad things may happen. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 312910b4e34215aaa50fc0c6092684d5878dc32f Author: Chase Douglas Date: Wed Apr 18 11:15:40 2012 -0700 Update currentTime in dispatch loop A request, like input device grabs, may check a request timestamp against currentTime. It is possible for currentTime to lag a previously sent event timestamp. If the client makes a request based on such an event timestamp, the request may fail the validity check against currentTime unless we always update the time before processing the request. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit a986f2f30cbe2a00e72ded7315c4951d7703e549 Author: Chase Douglas Date: Tue Apr 17 11:40:15 2012 -0700 Update device state including when touch record does not exist If a touch is physically active, the pointer core state should reflect that the first button is pressed. Currently, this only occurs when there are active listeners of the touch sequence. By moving the device state updating to the beginning of touch processing we ensure it is updated according to the processed physical state no matter what. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit ec9c4295830c3de610e65aca17f4da4a7af3c4c5 Author: Chase Douglas Date: Wed Apr 18 12:04:58 2012 -0700 Check other clients' core masks properly when adding touch listener The current code checks the core event mask as though it were an XI mask. This change fixes the checks so the proper client and event masks are used. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit e175971a6f44d94aa8306dc6b9228ccb2c8a0b4d Author: Chase Douglas Date: Tue Apr 17 11:39:10 2012 -0700 Ensure touch is ended when last listener is rejected Currently, the touch is only logically ended if the touch has physically ended. If the touch hasn't physically ended, the touch record is never ended. If there aren't any more listeners, we don't need to keep the dix touch record around any more. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit d0449851d1233543c3133d77e0ab7233319cdf5f Author: Chase Douglas Date: Tue Apr 17 10:49:14 2012 -0700 Create a new dix touch record for an emulated touch with no listeners As a special case, if a still physically active pointer emulated touch has no listeners and the device is explicitly grabbed for pointer events, create a new dix touch record for the grab only. This allows for clients to "hand off" grabs. For example, when dragging a window under compiz the window decorator sees the button press and then ungrabs the implicit grab. It then tells compiz to grab the device, and compiz then moves the window with the pointer motion. This is racy, but is allowed by the input protocol for pointer events when there are no other clients with a grab on the device. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 3d06bfe93d33cfe6150d8fb0058ee7bc8d80622b Author: Chase Douglas Date: Tue Apr 17 13:56:08 2012 -0700 Rename TouchEnsureSprite to TouchBuildSprite and event type checks The function will be used for building a sprite for pointer emulation after an explicit device grab. This commit refactors the code so that TouchBuildSprite will function with any event type and moves the checks to the caller. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 2efbed23c29020f9994ab7c3155ce7386950dc7a Author: Chase Douglas Date: Tue Apr 17 08:39:38 2012 -0700 When activating an explicit grab, update owning listener Pointer passive grabs may be changed by the grabbing client. This allows for a selecting client to change an implicit grab to an active grab, which is the mechanism used for pop-up windows like application menus. We need to do the same thing with touches. If the grabbing client is the owner of a touch sequence, change the listener record to reflect the new grab. If the grabbing client is not the owner, nothing changes for the touch. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit ef64b5ee97099618cf2e2cbbd3e471095695ae24 Author: Chase Douglas Date: Mon Apr 16 15:53:51 2012 -0700 Don't deactivate implicit pointer grab on fake touch end event Fake touch end events are generated by touch acceptance and rejection. These should not cause implicit pointer grabs to be deactivated. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit fc518cd9f59060cc19bb90361767c0f47f0e25eb Author: Chase Douglas Date: Mon Apr 16 15:31:47 2012 -0700 End a pointer emulated touch event only on a "real" end event Fake end events are generated by touch acceptance or rejection. These should not end the touch point. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 80d7d1ec6a9d61aa96e7d019dc1bee29d90cea34 Author: Chase Douglas Date: Mon Apr 16 14:19:59 2012 -0700 On touch accept, only process end event for owner if it has seen the end We still need to generate the touch ownership event to process the ending of the touch event in the case where the owner has the end already. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 8dfd98245d2c44a1eb4c8b7c275e6cfc10fe40f1 Author: Chase Douglas Date: Wed Apr 11 11:14:51 2012 -0700 Fix copy/paste error from before git history in UpdateCurrentTimeIf() See UpdateCurrentTime() for reference. I don't know what bug this might trigger, but it wouldn't hurt to fix this. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 6ca30cb33e829b4edd01822367e44ffe6f0951b0 Author: Chase Douglas Date: Wed Apr 11 08:17:25 2012 -0700 When deactivating an explicit pointer grab, reject all grabs on touches Explicit pointer grabs are placed at the head of the touch listener array for pointer emulated touches. If the grab is deactivated, we must remove it from all touches for the device. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit cacdb9a74065ccba7d50a82e14abdf04b36c5309 Author: Chase Douglas Date: Wed Apr 11 08:13:17 2012 -0700 Accept touch sequence for pointer listener after second event delivery This is a bit of unimplemented code for touchscreen pointer emulation. A pointer grabbing client currently never accepts the touch sequence. The sequence must be accepted once any touch-derived event is irrevocably delivered to a client. The first pointer event, derived from a touch begin event, may be caught in a sync grab and then replayed. This is essentially a revocable delivery of an event. Thus, we must wait till a non-begin event is delivered. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 447fe7a1a72513aa68145962c47894242c589cc9 Author: Chase Douglas Date: Wed Apr 11 08:12:08 2012 -0700 Split out helper function TouchListenerAcceptReject() This will be used for accepting and rejecting touches in the future. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer commit 93c33403642a3de3c9d141ad7940a7b880846aad Author: Chase Douglas Date: Wed Apr 4 12:59:55 2012 -0700 Only set XI2 mask if pointer emulation is for XI2 client The current code returns a reference to memory that may not actually be an XI2 mask. Instead, only return a value when an XI2 client has selected for events. Signed-off-by: Chase Douglas Reviewed-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 4c1dfd21937efc6a85fb204a73dd7d7151d54daa Author: Chase Douglas Date: Wed Apr 4 12:57:40 2012 -0700 Check core event mask properly for pointer emulated touch events The current code checks the core event mask as though it were an XI2 mask. This change fixes the checks so the proper client and event masks are used. Signed-off-by: Chase Douglas Reviewed-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 3720aa33ee50788dd3d4acc9bbf8dfcb72c8f5ce Author: Erkki Seppälä Date: Thu Apr 7 12:53:51 2011 +0300 Added resourceproto version dependency, >= 1.2.0 now required Signed-off-by: Erkki Seppälä commit 233eab4d05cae1fdb4129a2e9905961b78693f74 Author: Erkki Seppälä Date: Wed Dec 8 17:09:30 2010 +0200 dix: add reference count of the resource to ResourceSizeRec The ResourceSizeRec now contains the number of references to the resource. For example a Pixmap knows this value and it can be useful for determining the "weight" of the resource. Typically this value is 1. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit ccb3e78124fb05defd0c9b438746b79d84dfc3ae Author: Erkki Seppälä Date: Tue Dec 14 12:18:23 2010 +0200 Xext: add a generic hashtable implementation The generic hashtable implementation adds a key-value container, that keeps the key and value inside the hashtable structure and manages their memory by itself. This data structure is best suited for fixed-length keys and values. One creates a new hash table with ht_create and disposes it with ht_destroy. ht_create accepts the key and value sizes (in bytes) in addition to the hashing and comparison functions to use. When adding keys with ht_add, they will be copied into the hash and a pointer to the value will be returned: data may be put into this structure (or if the hash table is to be used as a set, one can just not put anything in). The hash table comes also with one generic hashing function plus a comparison function to facilitate ease of use. It also has a custom hashing and comparison functions for hashing resource IDs with HashXID. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit a2ac01a8ea8508ed35aa844a589672c1165e05e4 Author: Erkki Seppälä Date: Wed Apr 6 10:16:53 2011 +0300 dix: don't use a local wrapper for calling HashResourceID Calls to Hash(client, id) were replaced with calls directly to HashResourceID(id, clientTable[client].hashsize) and the Hash-function was removed. Signed-off-by: Erkki Seppälä commit a0b0fb83f91bb82534a0d83fdd6c0222567b098d Author: Erkki Seppälä Date: Mon Dec 20 12:58:37 2010 +0200 dix: add hashing functions to resource.h for others to use. The public hashing function HashResourceID uses the same hashing hashing algorithm as resource.c uses internally, but it provides an interface that will is usable by external modules. It provides a parameter for the number of bits for the hash, instead of finding the size from its internal hash table. Signed-off-by: Erkki Seppälä commit 3ba0decb4b55a1fd122d269e15b2b2da8ced8624 Author: Erkki Seppälä Date: Wed Dec 8 15:30:57 2010 +0200 dix: add a mechanism for iterating through all subresources The mechanism allows iterating even through subresources that don't have specific XID's. When such 'resources' are iterated, the XID for them will be zero. A resource type can assign an iteration function for its subresources with SetResourceTypeFindSubResFunc; by default resources are assumed not to contain subresources. The purpose of this extension is to enable accurate accounting of the resources a resource consumes or uses. This patch provides the subresource iteration functions for Windows and GCs. Reviewed-by: Rami Ylimäki Signed-off-by: Erkki Seppälä commit b8d0d19a6d410776b53a41e7cae90f68d4b22bb7 Author: Rami Ylimäki Date: Wed Oct 27 17:25:50 2010 +0300 composite: Report pixmap usage of client windows to resource extension. Signed-off-by: Erkki Seppälä Signed-off-by: Rami Ylimäki Reviewed-by: Mikhail Gusarov Reviewed-by: Tiago Vignatti commit e83388cc70e21e7f377ed2e417d04469e23eb706 Author: Rami Ylimäki Date: Wed Oct 27 16:59:06 2010 +0300 render: Report pixmap usage of pictures to resource extension. Signed-off-by: Erkki Seppälä Signed-off-by: Rami Ylimäki Reviewed-by: Mikhail Gusarov Reviewed-by: Tiago Vignatti commit 96864bfa951ea8bf4ab697753fc62c6a97598bc0 Author: Erkki Seppälä Date: Mon Nov 29 12:40:56 2010 +0200 Implemented first part of XResource extension v1.2: X_XResQueryClientIds This patch implements a part of the XResource extension v1.2 (as specified in http://patchwork.freedesktop.org/patch/2720/ ). The request implemented is X_XResQueryClientIds. This patch depends on the feature introduced by 1e933665bef26c74196bb7c59910e6a78bcacf0e "dix: Add facilities for client ID tracking." . This latest version also adds Doxygen-formatted comments and takes a better notice of coding conventions (as in http://www.x.org/wiki/CodingStyle ). Signed-off-by: Erkki Seppälä commit ebf214876a4885a98ded4f5525925b69005fae05 Author: Peter Hutterer Date: Wed Apr 18 15:56:37 2012 +1000 dix: indentation fix Signed-off-by: Peter Hutterer commit 00c663a3bc76d567ad7edd6d6ef3f7f725b5df3a Author: Dave Airlie Date: Tue Apr 17 11:50:40 2012 +0100 modesetting: add set/drop master around VT switch commit 001dec898098e11c569abc20a307b3c2af2e2184 Author: Dave Airlie Date: Tue Apr 17 11:48:03 2012 +0100 cursor: hide cursors on LeaveVT commit 80fefc42f5e67e6b4a4b440d8991bee7e5f38359 Merge: 9779b904c 12188c8a8 Author: Keith Packard Date: Sun Apr 15 21:05:30 2012 -0700 Merge remote-tracking branch 'whot/for-keith' commit 12188c8a8a537b38b1ca4cf8c0de5447e19c886a Author: Chase Douglas Date: Tue Apr 3 17:31:01 2012 -0700 Use touch state when querying pointer through core protocol QueryPointer is part of the core protocol. As such, it knows nothing about touch devices. Touches are converted to button 1 press, pointer motion, and button 1 release for core clients, so we should ensure the pointer state mask has button 1 set when XQueryPointer is used. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer commit 32ece7c09bf0ebc3d99b4078aacebbd44314776a Author: Chase Douglas Date: Tue Apr 10 17:12:42 2012 -0700 Ensure sequential touches are pointer emulated sequentially Issue: * Two sequential touches (i.e. down, up, down, up) * Both are grabbed by a touch grab * Both have a second listener in the form of a pointer grab or selection * The second and first touches are rejected in that order The first touch must be pointer emulated before the second touch, so the second touch must be paused until the first touch is rejected or accepted and all events are delivered to pointer clients. This change ensures all pointer emulated events are emitted sequentially. It necessarily imposes a delay on further touch events when pointer grabs and selections are used, but there is no way around it. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 163b0f375d73c05873fb341652de3ed347337828 Author: Chase Douglas Date: Tue Apr 10 17:12:41 2012 -0700 Update event type when delivering end event to a pointer listener Just like when we deliver to a touch listener, we must convert a touch end event to an update event for further clients. This also ensures that the touch record is not deleted at the end of ProcessTouchEvent(). Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 210cd12c47d063f97915ff23292b61d09abfd73a Author: Chase Douglas Date: Tue Apr 10 17:12:40 2012 -0700 Don't update listener after deactivating implicit pointer grab After the pointer grab is deactivated, the touch listener record is updated at the end of DeliverTouchEmulatedEvent. However, the touch record is ended when the grab is deactivated, so the update to the listener record is in an array of memory that has been freed. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 82a1ae0af3b136371638659c3e909880a99f721c Author: Peter Hutterer Date: Thu Apr 12 15:54:00 2012 +1000 xfree86: after VT switching back, only enable previously enabled devices If a device was enabled before the VT switch, re-enabled it. Otherwise leave it as is, there was probably a reason why it was disabled. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Daniel Stone commit d5d5b407436dfdbffcd56bbefecf17d11750dddf Author: Dave Airlie Date: Sat Apr 14 19:21:47 2012 +0100 dirty: check malloc return Suggested by keithp. Signed-off-by: Dave Airlie commit 6c1b5cb903f2ff9cb915273835c301d6ac255f45 Author: Dave Airlie Date: Sat Apr 14 15:01:16 2012 +0100 drop use of alloca, just use malloc/free Reported-by: Alan Coopersmith Signed-off-by: Dave Airlie commit c5a45b0f7658c77725adce2b64a0fbd62f208328 Author: Daniel Kurtz Date: Thu Apr 12 10:11:10 2012 +1000 dix: don't BUG_WARN for button events from button-only device Events from button-only devices still need coordinates, and they get them from scale_to_desktop(). Therefore, a dev without valuators is not a bug. However, a dev with valuators, but less than two of them still is a bug. This was noticed when unplugging a "Creative Technology SB Arena Headset", which has some BTNs and some KEYs, but no REL or ABS valuators. It emits [BTN_3] = 0 on unplug, which would trigger the BUG_WARN. Signed-off-by: Daniel Kurtz Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 9779b904c7c0b49c74054c22c420012c40595cdc Author: Keith Packard Date: Wed Apr 11 09:33:54 2012 -0700 hw/xfree86: Re-indent xf86vmode.c This is the result of re-running the 'x-indent.sh' script over xf86vmode.c to clean up the disaster caused by broken syntax in the file. Signed-off-by: Keith Packard commit 592bd0ae2b60cd6f6afd3efc40f5f659b12900b4 Author: Keith Packard Date: Wed Apr 11 09:28:21 2012 -0700 hw/xfree86: Spurious ');' in xf86vmode.c messed up indentation badly Inside the unfinished XF86VIDMODE_EVENTS #ifdef block the function definition for xf86VidModeNotifyEvent had an extra ');' before the prototype argument declarations. This was harmless for the compiler as the code never gets used, but completely messed up the file re-indentation. This patch removes the spurious characters in preparation for re-indenting the file. Signed-off-by: Keith Packard commit 72cfc1a097dc1e09d2cd9415ef7855a2cef92351 Author: Peter Hutterer Date: Wed Apr 11 09:43:23 2012 +1000 Xi: fix XITouchClass sourceid assignment Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 10cd6fdc431d2d0835c313b2f5bdda6dcea281fd Author: Keith Packard Date: Sun Apr 8 00:16:54 2012 -0700 Revert "xfree86: workaround crash on close" This reverts commit 55f552adb651715d2620db7248cd5b9b8187654a. This appears to cause a crash at init time instead of close. Reported-by: Knut Petersen Acked-by: Jeremy Huddleston Signed-off-by: Keith Packard commit c7b162555849ab2d4cb195d02d98a40494c5ce55 Author: Yaakov Selkowitz Date: Thu Mar 29 02:26:41 2012 -0500 xfree86: link modules against Xorg symbols on Cygwin As a PE platform, all symbols in both EXEs and DLLs must be resolved at link time. As Xorg modules depend on symbols in the Xorg executable, we must build Xorg before its modules, creating an implib from the former which is used to link the latter. This implib must then be installed in order to build the drivers. Currently only two drivers are supported on Cygwin: xf86-video-dummy (to replace Xvfb/Xfake) and xf86-video-nested (to replace Xnest/Xephyr). Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 2dffdcd60f70f534ad730830fe97f0bb1a192e2a Author: Yaakov Selkowitz Date: Thu Mar 29 02:23:17 2012 -0500 xf86Config: load DIX libraries before drivers on Cygwin Cygwin doesn't have ELF rpath capabilities, so these libraries need to be loaded before the drivers (namely dummy and nested) which depend on their symbols. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 5dd3d2dbbafee28142552640ac6ef3eef2e6d9d3 Author: Yaakov Selkowitz Date: Thu Mar 29 02:21:01 2012 -0500 xf86Init: provide ddxBeforeReset ifdef DDXBEFORERESET This is necessary when building Xorg and XWin simultaneously, otherwise undefined symbol errors result in sdksyms.c. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 96186bc7219a88e549928707b3da4b8bfc16c54d Author: Yaakov Selkowitz Date: Thu Mar 29 02:18:41 2012 -0500 loader: add Cygwin support Cygwin libraries use the .dll extension and "cyg" prefix in place of "lib". Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 0ce48729d34ab610ff119303355883048b651500 Author: Yaakov Selkowitz Date: Thu Mar 29 02:17:22 2012 -0500 os-support: add Cygwin support Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit fd115ee114e95b4e7b96f789d3ad67e2e15555de Author: Yaakov Selkowitz Date: Thu Mar 29 02:13:27 2012 -0500 xfree86: allow modules to be built without undefined symbols This will be necessary to port Xorg to Cygwin, but other platforms may find this useful as well. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 12cd7ca83c35bc61fbda7e61535692e3ec78194c Author: Yaakov Selkowitz Date: Thu Mar 29 02:06:36 2012 -0500 Cygwin/X: disable all unused or unapplicable extensions in configure Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit cb5661e86d4a428ec0ca4efc30a1a165d94d7215 Author: Yaakov Selkowitz Date: Tue Mar 27 22:16:08 2012 -0500 xf86Crtc: include "xf86xv.h" only if XV Signed-off-by: Yaakov Selkowitz Reviewed-by: Alan Coopersmith Reviewed-by: Jon TURNEY Reviewed-by: Jeremy Huddleston commit 1110facdfeb95b1ad47d03c0ca3d73933b86dbd6 Author: Chase Douglas Date: Thu Mar 29 18:06:03 2012 -0700 Implement passive touch ungrabbing Whoops. Forgot to implement this. The code currently generates an error due to the unhandled grab type. X.Org Bug 48069 Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e9d3848d7bda7f7de4c0f497aee4482d0b30ad49 Author: Jeremy Huddleston Date: Thu Apr 5 14:03:35 2012 -0700 XQuartz: Automatically start our virtual tablet devices Fixes: https://bugs.launchpad.net/inkscape/+bug/972914 Regression introduced by: 7790dc86384cc451ac44663737fde84dd81ad4e1 Signed-off-by: Jeremy Huddleston commit 6cb83b78c47b80556cb4d573524d60f0cd1a64ac Author: Jeremy Huddleston Date: Fri Mar 30 14:29:48 2012 -0700 XQuartz: Tiger build fix Fixes: https://trac.macports.org/ticket/33818 Signed-off-by: Jeremy Huddleston commit eca58ee4db43d85e5940919be094c38ad166d5d0 Author: Jeremy Huddleston Date: Wed Mar 28 15:07:51 2012 -0700 os: Fix regression with FatalError not calling va_start Regression From: a818b305989bbcde4e585112a7ee70cbc0b14a92 Found-by: Colin Harrison Signed-off-by: Jeremy Huddleston commit 55f552adb651715d2620db7248cd5b9b8187654a Author: Michal Suchanek Date: Wed Mar 28 18:12:39 2012 -0700 xfree86: workaround crash on close Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41653 Signed-off-by: Michal Suchanek Reviewed-by: Jeremy Huddleston commit 641a1b9363d59808d2586f9e84847ccc69701482 Author: Peter Hutterer Date: Mon Mar 26 10:34:34 2012 +1000 test: reset the client before checking the swapped version As of 2c23ef83b0e03e163aeeb06133538606886f4e9c, the server returns BadValue for the same client with multiple versions. Avoid this by resetting the client before we issue the same request as a fake swap client. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit 17f33ca0e5bff45a2d03e4d3b4753a714ce25baf Author: Peter Hutterer Date: Mon Mar 26 10:28:32 2012 +1000 test: init the sync extensions for tests to pass again Introduced in d645edd11e7482f98c8b7e0d6c8693285c484907 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit 8053faa7b81520b0a46459ba6e3b98f2599d5bbf Author: Peter Hutterer Date: Fri Mar 23 08:20:22 2012 +1000 Bump input ABI to 17 for per-device idlecounters Signed-off-by: Peter Hutterer commit 7f3997b01a8813c1d7055317eb06111aed8572c9 Merge: 92d50c38b 31646d8fa Author: Keith Packard Date: Mon Mar 26 16:41:52 2012 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 92d50c38b2bfeb82e7374a1966a53235e3f8275e Author: Gaetan Nadon Date: Sun Feb 26 12:15:31 2012 -0500 man: s/__xservername__/Xorg/g - no longer required Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: The Xorg & xorg.conf substitutions are leftover from the transitional period where some distros were building our sources with the XFree86 and XF86config names until they had time to adjust the rest of their packages/installer/config code to the new names. This will fix inconsistencies and prevent the creation of new unneeded sed patterns. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 9e880cd2e36236e466fda0adadee34a407ae3341 Author: Gaetan Nadon Date: Sun Feb 26 12:15:30 2012 -0500 man: s/__xconfigfile__/xorg.conf/g - no longer required Excerpt from http://lists.x.org/archives/xorg-devel/2011-March/020481.html: The Xorg & xorg.conf substitutions are leftover from the transitional period where some distros were building our sources with the XFree86 and XF86config names until they had time to adjust the rest of their packages/installer/config code to the new names. This will fix inconsistencies and prevent the creation of new unneeded sed patterns. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 31646d8fa9524adca1d7bc2cd2db90d47c2eb96e Author: Jeremy Huddleston Date: Sun Mar 25 23:33:54 2012 -0700 XQuartz: Use scrolling valuators This lets use send more accurate data to Xi clients and uses dix for legacy scroll buttons rather than reinventing the wheel. Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 7790dc86384cc451ac44663737fde84dd81ad4e1 Author: Jeremy Huddleston Date: Sun Mar 25 22:30:55 2012 -0700 XQuartz: Use AllocDevicePair to allocate our keyboard and mouse at the same time Also correct isMaster to FALSE while we're here. Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 74fb534bf15687610367248071341fe4bfd1d8bf Author: Jeremy Huddleston Date: Sun Mar 25 22:16:22 2012 -0700 XQuartz: Call update_desktop_dimensions() after updating our screen coordinates Fixes: http://xquartz.macosforge.org/trac/ticket/555 Regression from: 8bebb4b4896d8b6ba3309b5b28fce883bb9f8a96 Signed-off-by: Jeremy Huddleston Acked-by: Peter Hutterer commit 41a46546e92b66fed323b5845dd71a6385feb418 Author: Jeremy Huddleston Date: Sun Mar 25 23:05:43 2012 -0700 XQuartz: Formatting cleanup for sendX11NSEvent Signed-off-by: Jeremy Huddleston commit 5324557c7b12dcacddac830bdb65769cb622c6cf Author: Jeremy Huddleston Date: Fri Mar 23 19:58:49 2012 -0700 XQuartz: Source formatting cleanup indent butchered Objective-C formatting. This patch was created by: 1) Reverting the indent changes in hw/xquartz 2) Editing X11Application.m and chaning some #ifdef logic to work with uncrustify 3) Hand edited some (c) notifications 4) Opened all XQuartz sources in XCode and re-indented (^I) 5) Ran uncrustify with this configuration (as close to the indent rules as I could get): tok_split_gte=false utf8_byte=true utf8_force=true indent_cmt_with_tabs=false indent_align_string=false indent_braces=false indent_braces_no_func=false indent_braces_no_class=false indent_braces_no_struct=false indent_brace_parent=false indent_namespace=false indent_extern=false indent_class=false indent_class_colon=false indent_else_if=false indent_var_def_cont=false indent_func_call_param=false indent_func_def_param=false indent_func_proto_param=false indent_func_class_param=false indent_func_ctor_var_param=false indent_template_param=false indent_func_param_double=false indent_relative_single_line_comments=false indent_col1_comment=false indent_access_spec_body=false indent_paren_nl=false indent_comma_paren=false indent_bool_paren=false indent_first_bool_expr=false indent_square_nl=false indent_preserve_sql=false indent_align_assign=true sp_balance_nested_parens=false align_keep_tabs=false align_with_tabs=false align_on_tabstop=false align_number_left=false align_func_params=false align_same_func_call_params=false align_var_def_colon=true align_var_def_attribute=true align_var_def_inline=true align_right_cmt_mix=false align_on_operator=false align_mix_var_proto=false align_single_line_func=false align_single_line_brace=false align_nl_cont=false align_left_shift=true align_oc_decl_colon=true nl_collapse_empty_body=true nl_assign_leave_one_liners=true nl_class_leave_one_liners=true nl_enum_leave_one_liners=true nl_getset_leave_one_liners=true nl_func_leave_one_liners=true nl_if_leave_one_liners=true nl_multi_line_cond=false nl_multi_line_define=false nl_before_case=true nl_after_case=true nl_after_return=false nl_after_semicolon=true nl_after_brace_open=true nl_after_brace_open_cmt=false nl_after_vbrace_open=false nl_after_vbrace_open_empty=false nl_after_brace_close=false nl_after_vbrace_close=false nl_define_macro=false nl_squeeze_ifdef=false nl_ds_struct_enum_cmt=false nl_ds_struct_enum_close_brace=false nl_create_if_one_liner=false nl_create_for_one_liner=false nl_create_while_one_liner=false ls_for_split_full=false ls_func_split_full=false nl_after_multiline_comment=false eat_blanks_after_open_brace=false eat_blanks_before_close_brace=false mod_full_brace_if_chain=false mod_pawn_semicolon=false mod_full_paren_if_bool=false mod_remove_extra_semicolon=false mod_sort_import=false mod_sort_using=false mod_sort_include=false mod_move_case_break=false mod_remove_empty_return=false cmt_indent_multi=true cmt_c_group=false cmt_c_nl_start=false cmt_c_nl_end=false cmt_cpp_group=false cmt_cpp_nl_start=false cmt_cpp_nl_end=false cmt_cpp_to_c=false cmt_star_cont=false cmt_multi_check_last=true cmt_insert_before_preproc=false pp_indent_at_level=false pp_region_indent_code=false pp_if_indent_code=false pp_define_at_level=false indent_columns=4 indent_brace=0 indent_switch_case=0 align_struct_init_span=2 align_pp_define_gap=0 align_pp_define_span=2 align_oc_msg_colon_span=16 nl_end_of_file_min=1 nl_func_var_def_blk=0 code_width=78 nl_max=2 newlines=auto indent_with_tabs=0 sp_arith=force sp_assign=force sp_assign_default=force sp_before_assign=force sp_after_assign=force sp_enum_assign=force sp_enum_before_assign=force sp_enum_after_assign=force sp_pp_stringify=add sp_bool=force sp_compare=force sp_inside_paren=remove sp_paren_paren=remove sp_paren_brace=force sp_before_ptr_star=ignore sp_before_unnamed_ptr_star=force sp_before_byref=force sp_before_unnamed_byref=force sp_after_byref=remove sp_after_type=force sp_before_sparen=force sp_inside_sparen=remove sp_inside_sparen_close=remove sp_after_sparen=force sp_sparen_brace=force sp_special_semi=force sp_before_semi=remove sp_after_semi=force sp_after_semi_for=force sp_after_semi_for_empty=remove sp_before_square=remove sp_inside_square=remove sp_after_comma=force sp_before_comma=remove sp_paren_comma=force sp_before_ellipsis=force sp_after_class_colon=force sp_before_class_colon=force sp_before_case_colon=remove sp_after_cast=remove sp_inside_paren_cast=remove sp_sizeof_paren=remove sp_inside_braces_enum=force sp_inside_braces_struct=force sp_inside_braces=force sp_inside_braces_empty=remove sp_func_proto_paren=remove sp_func_def_paren=remove sp_inside_fparens=remove sp_inside_fparen=remove sp_square_fparen=remove sp_fparen_brace=force sp_func_call_paren=remove sp_func_call_paren_empty=remove sp_return_paren=force sp_attribute_paren=remove sp_defined_paren=remove sp_macro=force sp_macro_func=force sp_else_brace=force sp_brace_else=force sp_brace_typedef=force sp_not=remove sp_inv=remove nl_start_of_file=remove nl_end_of_file=force nl_assign_square=remove nl_after_square_assign=remove nl_fcall_brace=remove nl_enum_brace=remove nl_struct_brace=remove nl_union_brace=remove nl_if_brace=remove nl_brace_else=force nl_elseif_brace=remove nl_else_brace=remove nl_else_if=remove nl_for_brace=remove nl_do_brace=remove nl_brace_while=remove nl_switch_brace=remove nl_case_colon_brace=force nl_func_type_name=force nl_func_type_name_class=force nl_func_proto_type_name=force nl_func_paren=remove nl_func_def_paren=remove nl_func_decl_start=remove nl_func_def_start=remove nl_func_decl_args=remove nl_func_decl_end=remove nl_func_def_end=remove nl_func_decl_end_single=remove nl_func_def_end_single=remove nl_func_decl_empty=remove nl_func_def_empty=remove nl_fdef_brace=force nl_return_expr=remove nl_before_if=ignore nl_after_if=ignore nl_before_for=ignore nl_after_for=ignore nl_before_while=ignore nl_after_while=ignore nl_before_switch=ignore nl_after_switch=ignore nl_before_do=ignore nl_after_do=ignore pp_space=remove Signed-off-by: Jeremy Huddleston commit 3505e1faadddeeec85a0d3f823c877ea33f86e00 Author: Jeremy Huddleston Date: Fri Feb 17 13:15:12 2012 -0800 XQuartz: Detect FatalErrors on startup to prevent tight crash loops If a FatalError occurs before the server finishes launching, it will not have drained the launchd-owned DISPLAY socket, so launchd will just relaunch it. This can cause the server to crash in a tight loop which will spam the user with CrashReporter windows that claim focus on appearance. This allows users stuck in this loop to "deal" with the problem without popping up a crash report every 10 seconds. Signed-off-by: Jeremy Huddleston commit a818b305989bbcde4e585112a7ee70cbc0b14a92 Author: Jeremy Huddleston Date: Fri Feb 17 12:35:02 2012 -0800 os: Pass the FatalError message to OsVendorFatalError Signed-off-by: Jeremy Huddleston Reviewed-by: Jon TURNEY commit 0bb8a2566debd6cd11164df9ddca534150ec440a Author: Jeremy Huddleston Date: Tue Mar 13 00:15:55 2012 -0700 XQuartz: Add a defaults option to disable the RENDER extension RENDER has some ugly issues on XQuartz, so add an option to disable RENDER. Enables workaround for: https://bugs.freedesktop.org/show_bug.cgi?id=26124 Signed-off-by: Jeremy Huddleston commit 5ff46d651ac0cd396be2053b79675997ed7af765 Author: Jeremy Huddleston Date: Sat Mar 17 00:04:27 2012 -0700 XQuartz: Use doubles for input valuators Signed-off-by: Jeremy Huddleston commit cd84c0949a9f397d8b803d3b87c9d02b260d4795 Author: Jeremy Huddleston Date: Sat Mar 17 00:08:19 2012 -0700 XQuartz: Xi: darwinPointer is now Relative There is really no real reason why this should be necessary, but wine developers are stuborn, so doing this to try to work around this wine issue: http://bugs.winehq.org/show_bug.cgi?id=29732 Signed-off-by: Jeremy Huddleston commit 87939bf8311c0e7d168741fe57bc8fac414811d8 Author: Jeremy Huddleston Date: Tue Mar 13 00:25:53 2012 -0700 XQuartz: Move our logs into an X11 subdirectory Signed-off-by: Jeremy Huddleston commit df327f98f6b8e02fadcfd313a85f906722acc572 Author: Jeremy Huddleston Date: Mon Mar 5 00:05:48 2012 -0800 test: Fix 'make dist' for configurations that build the Xorg DDX Signed-off-by: Jeremy Huddleston commit 0e8ee1cf4f3377a2916c43527ae0dc6cb07a67ec Author: Dave Airlie Date: Fri Mar 23 14:54:05 2012 +0000 modesetting: fix build against older Xext commit a7eac500e652f30deffd9dc5e623fab701077738 Merge: bf876c87a d645edd11 Author: Peter Hutterer Date: Thu Mar 22 13:13:07 2012 +1000 Merge branch 'per-device-sync-counters' into for-keith commit d645edd11e7482f98c8b7e0d6c8693285c484907 Author: Peter Hutterer Date: Mon Mar 12 16:36:31 2012 +1000 Xext: Add per-device SyncCounters Previously, we only had one idle alarm that was triggered for all devices, whenever the user used any device, came back from suspend, etc. Add system SyncCounters for each device (named "DEVICEIDLETIME x", with x being the device id) that trigger on that device only. This allows for enabling/disabling devices based on interaction with other devices. Popular use-case: disable the touchpad when the keyboard just above the touchpad stops being idle. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0 Author: Peter Hutterer Date: Mon Mar 12 13:51:02 2012 +1000 Change lastDeviceIdleTime to be per-device Preparation work for per-device idle counters. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 20cf0ef825e3f14b0688b691691e0aeba0a4860a Author: Peter Hutterer Date: Tue Mar 13 10:21:23 2012 +1000 Xext: strdup() the SystemSyncCounter name Required for future dynamic names. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit f1b28aea4156f0381ea733ad2afbdd1f34f75599 Author: Peter Hutterer Date: Tue Mar 13 09:31:09 2012 +1000 Xext: store the bracket values for idle counters in the private And drop the three global variables, we have a reference to the counter everywhere now. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit d9553b2bbe06fba0b209218ffed9465edd79b4d2 Author: Peter Hutterer Date: Tue Mar 13 09:29:39 2012 +1000 Xext: pass the counter into block/wakeup handlers No functional changes, currently unused. Preparation work, we don't need a global variable if we can pass the counters around anyway. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 90e6dc6de1ac339212989fd8e54131b196ebb369 Author: Peter Hutterer Date: Tue Mar 13 09:28:15 2012 +1000 Xext: add a private field to SyncSystemCounters Will be used to store counter-specific data. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 3ddae647c307005309daa2d5dfe4bc6acb8170ab Author: Peter Hutterer Date: Mon Mar 12 15:31:39 2012 +1000 Xext: localise pIdleTimeValueLess/Greater Cleanup for future features, no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 43eb2f2758dfc6ca5a49afce97cc5baea8caf9f5 Author: Peter Hutterer Date: Mon Mar 12 15:27:56 2012 +1000 Xext: localise use of IdleTimeCounter Instead of referring to the global IdleTimeCounter everywhere, only do it once and use a local variable for the rest. Cleanup for future features, no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: James Jones commit 1f12f059ef994e0b9b68fbd1f1556d0285c96b8b Author: Jamey Sharp Date: Wed Mar 14 17:22:18 2012 -0700 sync: Use a linked list instead of an array for SysCounterList. Signed-off-by: Jamey Sharp Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit bf876c87a9099fdfa63ed599f8ed9a954dd023d9 Merge: 908ab3d58 c0b0a9bce Author: Peter Hutterer Date: Thu Mar 22 11:34:43 2012 +1000 Merge branch 'dtrace-input-abi' into for-keith commit c0b0a9bce9237b0abe150c1a7b54939affecc751 Author: Peter Hutterer Date: Mon Mar 5 14:12:52 2012 +1000 dix: add dtrace probes to input API For driver debugging, it is helpful to know whether the driver has actually submitted an event to the server. dtrace hooks can help here. Note that GetPointerEvents and friends may also be triggered by the server for other emulated devices, some care must be taken when analysing the results. Additional difficulty: proximity events have a run-time assigned type, so this may make automatic detection a tad harder. If in doubt, go for any event > 64 since the only two that can have that value are ProximityIn and ProximityOut. An example systemtap script is below: # Compile+run with # stap -g xorg.stp /usr/bin/Xorg # function print_valuators:string(nvaluators:long, mask_in:long, valuators_in:long) %{ int i; unsigned char *mask = (unsigned char*)THIS->mask_in; double *valuators = (double*)THIS->valuators_in; char str[128] = {0}; char *s = str; #define BitIsSet(ptr, bit) (((unsigned char*)(ptr))[(bit)>>3] & (1 << ((bit) & 7))) s += sprintf(s, "nval: %d ::", (int)THIS->nvaluators); for (i = 0; i < THIS->nvaluators; i++) { s += sprintf(s, " %d: ", i); if (BitIsSet(mask, i)) s += sprintf(s, "%d", (int)valuators[i]); } sprintf(THIS->__retvalue, "%s", str); %} probe process(@1).mark("input__event") { deviceid = $arg1 type = $arg2 detail = $arg3 flags = $arg4 nvaluators = $arg5 str = print_valuators(nvaluators, $arg6, $arg7) printf("Event: device %d type %d detail %d flags %#x %s\n", deviceid, type, detail, flags, str); } Signed-off-by: Peter Hutterer Acked-by: Jeremy Huddleston commit 61cb98da1c6199964825de158d9eee7682d9c983 Author: Peter Hutterer Date: Mon Mar 12 16:03:50 2012 +1000 Xext: SyncCreateSystemCounter returns a SyncCounter* type safety++ Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 908ab3d580188533168c8cdfd2cab9dc689b4218 Author: Peter Hutterer Date: Wed Mar 21 14:05:29 2012 +1000 dix: set raw event values before adding up relative values (#46976) Regression introduced in 4e52cc0ef48145134cd58d357fb7289e6f8bb709 Raw event values are values as-is from the driver, modified only be transformation or acceleration. 4e52cc caused the mask to be updated from relative to absolute coordinates which then got written into the raw events. Move the raw event update into the respective branches for absolute/relative events. X.Org Bug 46976 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Daniel Stone Tested-by: Sven Arvidsson Reviewed-by: Simon Thum commit 45fe3085f8f45e529383025414fdd263d86dfd2b Author: Peter Hutterer Date: Mon Mar 12 14:08:39 2012 +1000 Xext: remove needless /* parameter */ comments in declaration Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 9c3bd3ae652af386b6821b197d24528f20ba867d Author: Peter Hutterer Date: Wed Mar 21 14:03:27 2012 +1000 dix: fix compiler warning "unused variable 'scr'" getevents.c: In function 'updateSlaveDeviceCoords': getevents.c:326:15: warning: unused variable 'scr' [-Wunused-variable] Signed-off-by: Peter Hutterer commit e21ffff4761d2b75815391c6947adcba425ab11e Author: Peter Hutterer Date: Mon Mar 12 14:07:44 2012 +1000 Xext: typedef QueryValue and BracketValue prototypes No functional changes, just for readability Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 14e3ea730eed344e6ed69c873f918d6f076d13dc Author: Peter Hutterer Date: Wed Mar 14 13:48:56 2012 +1000 include: add an X_DEBUG message type Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp commit 5910f2df58beaae2187438fef0b62c29a563e853 Author: Peter Hutterer Date: Mon Mar 12 16:26:29 2012 +1000 Xext: drop InitServertime() declaration. Not implemented anywhere. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Bryce Harrington commit 31df08a449cf9b6e1740e1c02257997490630d93 Author: Chase Douglas Date: Wed Mar 7 16:06:27 2012 -0800 Use a new sprite trace for indirect touches when all touches have physically ended All touches of an indirect device, such as a trackpad, are sent to the same window set. When there are no active touches, a new window set is created; otherwise, the window set of an existing touch is copied. The current code checks for any logically active touches. This includes touches that have physically ended but are still logically active due to unhandled touch grabs. Instead, we want a new window set whenever there are no physically active touches. This change skips over logically active but pending end touches, which are touches that have physically ended. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 58427e08a4a36ce9e213e4b4fe5249d5db2c764d Author: Chase Douglas Date: Wed Mar 7 16:06:26 2012 -0800 Xi: Fix TouchEnd to TouchUpdate change for one accepted grab If there is only one listener of a touch, the listener is a grab, and is accepted before the touch has ended, the current code will not end the touch record when the touch does end. This change adds a listener state for when a touch is accepted but has not yet ended. We now keep the touch record alive in this state, but end it when the touch ends. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e884ff8ad4df2b3272a3d8ece772906207af5142 Author: Peter Hutterer Date: Wed Mar 7 19:08:33 2012 +1000 xfree86: remove out-of-date comment No idea what this was referring to but it goes past git history. Signed-off-by: Peter Hutterer commit 5497ce3da442d27c2dc7796bfef6ccd670bbadc4 Author: Peter Hutterer Date: Mon Feb 20 12:09:33 2012 +1000 dix: IsFloating() on master devices is always false There are a few subtle bugs during startup where IsFloating() returns true if the device is a master device that is not yet paired with its keyboard device. Force IsFloating() to always return FALSE for master devices, that was the intent after all and any code that relies on the other behaviour should be fixed instead. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Tested-by: Jon TURNEY commit 2c23ef83b0e03e163aeeb06133538606886f4e9c Author: Peter Hutterer Date: Mon Feb 27 08:01:07 2012 +1000 Xi: prohibit multiple XIQueryVersion requests with different versions Return BadValue if major or minor differs on the second call. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit eb84c154ed38194c32651727b6dfe2d1bde4c599 Author: Peter Hutterer Date: Mon Feb 27 10:09:44 2012 +1000 dix: when rescaling from master, rescale from desktop dimensions (#46657) master->last.valuators[] is in desktop dimensions, so use those as rescale axis ranges, not the screen. Otherwise, a rescale on any screen not the top-left will cause out-of-bounds coordinates which will always map to the bottom-right screen, causing the device to be stuck on that screen. X.Org Bug 46657 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6b6afd3d013e3f4910fae3520d1d786df2b0e47a Author: Peter Hutterer Date: Thu Feb 16 15:11:40 2012 +1000 Xext: return BadAccess if PickPointer fails (#45796) PickPointer or PickKeyboard return NULL, all MDs are currently disabled and we cannot emulate a core event. This wasn't anticipated by the protocol, so we don't really have an error code we may use here - BadAccess is simply the least bad of the possible ones. And returning BadAccess beats crashing the server. X.Org Bug 45796 Signed-off-by: Peter Hutterer commit 9e017cf0cf1f0c9d0d9c2cfeb82ea5dc0eb5905e Author: Andreas Wettstein Date: Sat Feb 25 20:48:17 2012 +0100 XKB: Redirect actions defunct with Gtk3 (XInput?) When redirect actions are used with Gtk3, Gtk3 complained about events not holding a GdkDevice. This was caused by device IDs not being set for redirect actions. More seriously, Gtk3 did not receive state changes redirect actions might specify. This was because event_set_state in dix/inpututils.c accesses the prev_state field, but the changes for the redirect action were only put into the state field. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit ab3a815a75ab5695753fa37a98b0ea5293d4cb91 Author: Daniel Stone Date: Thu Mar 15 15:18:29 2012 +0000 Indentation: Change '& stuff' to '&stuff' If the typedef wasn't perfect, indent would get confused and change: foo = (SomePointlessTypedef *) &stuff[1]; to: foo = (SomePointlessTypedef *) & stuff[1]; Fix this up with a really naïve sed script, plus some hand-editing to change some false positives in XKB back. Signed-off-by: Daniel Stone commit 58b1f739d73b03ff7952ca986ed8746a7307fffe Author: Daniel Stone Date: Thu Mar 15 15:13:51 2012 +0000 Xinerama: Fix up obnoxiously-indented code Comments inside of conditionals confuse indent to death. Which is fair enough really. Signed-off-by: Daniel Stone commit 9838b7032ea9792bec21af424c53c07078636d21 Author: Keith Packard Date: Wed Mar 21 12:55:09 2012 -0700 Introduce a consistent coding style This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard Acked-by: Daniel Stone Acked-by: Alan Coopersmith commit 75199129c603fc8567185ac31866c9518193cb78 Author: Keith Packard Date: Wed Mar 21 12:33:19 2012 -0700 Handle blank betweeen type and name in sdksyms.sh indent sometimes adds a blank line between the type and the name in a function declaration that includes _X_EXPORT, so handle that before the files are re-indented. Signed-off-by: Keith Packard commit a615b90cab7569fae9d123e4da1d3373c871d84b Author: Keith Packard Date: Wed Mar 14 11:32:36 2012 -0700 Bump version number to 1.12.99.0 Now that 1.12 has branched, reset the version on master to a development number. Signed-off-by: Keith Packard commit 53204d5c8bd83c957fbdb7d3dc2891118ed7658b Author: Sascha Hauer Date: Sat Mar 3 14:09:25 2012 +0100 make busID non mandatory Currently the driver only probes a device when it has a busID. The busID is optional so don't depend on it. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit bb7e39c1f2112f5fb7e87baddb114ab164fbc749 Author: Sascha Hauer Date: Sat Mar 3 14:09:27 2012 +0100 do not bail out on non pci devices To make the driver work on nin PCI devices we shouldn't bail out in this case. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit 2b6848fcb3f85f9ce18a6de1dc6c3ac047101aa8 Author: Sascha Hauer Date: Sat Mar 3 14:09:26 2012 +0100 Fix non PCI device probing When no devicename is found in the option then the driver probes by PciInfo no matter if it's valid or not. Instead of doing this use PciInfo only when it's valid and fall back to the devicename otherwise. With devicename probing use open_hw() to fall back on the KMSDEVICE environment variable or to the default device. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit 456a001e3f7a24f443cf0bad8400d5d600e2ad46 Author: Sascha Hauer Date: Sat Mar 3 14:09:24 2012 +0100 introduce open_hw() function probe_hw opens the hardware in the order we want it: first try devname, if this is NULL then try the KMSDEVICE environment variable and as a last fallback use "/dev/dri/card0". Instead of implementing the same code again when really opening the device move the code to a open_hw() function and let probe_hw use it. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit aa6ceaaa843525b2243569de162ed0b17faa7510 Author: Sascha Hauer Date: Sat Mar 3 14:09:23 2012 +0100 fix if() brackets in Probe function in Probe() the indention shows what's meant but there are no brackets. Add them. Signed-off-by: Sascha Hauer Signed-off-by: Dave Airlie commit b1be72c5ca6cb98ba64637990b142be0f1710a19 Author: Keith Packard Date: Sun Mar 4 20:26:18 2012 -0800 Version bumped to 1.12 Signed-off-by: Keith Packard commit e08ed0b757b9b48344a301f612fabb3e39ffec78 Author: Gaetan Nadon Date: Sun Feb 26 17:51:50 2012 -0500 test: add new test cases to .gitignore Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 2416ee4a015068359807a10f433e8c54192c78a9 Author: Peter Hutterer Date: Wed Feb 22 15:32:56 2012 +1000 dix: avoid NULL-pointer dereference on button-only devices (#38313) And for such devices simply take the last.valuators[] which must be valid at all times anyway. UpdateSlaveDeviceCoords takes care of that. X.Org Bug 38313 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 38000e7d1f958f5944e641de3e716944a5876d41 Author: Jeremy Huddleston Date: Tue Jan 31 11:06:21 2012 -0800 Revert "dix: don't XWarpPointer through the last slave anymore (#38313)" This reverts commit 2bfb802839688ecf328119c4c6979390fc60348d. This commit caused a regression. See: http://xquartz.macosforge.org/trac/ticket/517#comment:10 Acked-by: Peter Hutterer commit cb6a32da27f09261c4d561c19d1877c750d98cc3 Author: Jeremy Huddleston Date: Fri Feb 17 13:44:12 2012 -0800 XQuartz: Short-circuit activateX: This also avoids a deadlock when calling activateX: before the server thread has initialized Signed-off-by: Jeremy Huddleston commit 1562c4a1ca748d2c4a8c69d57ba09ff7ca9cc453 Author: Jeremy Huddleston Date: Fri Feb 17 13:54:57 2012 -0800 XQuartz: Actually install the new locales Signed-off-by: Jeremy Huddleston commit 1349a2b7ab04553c8fddb60534400dea5cbd3cca Author: Dave Airlie Date: Wed Feb 22 10:07:06 2012 +0000 xf86-video-modesetting 0.2.0 commit e5648616d222966a95edd6c35807dcf5b91a0f96 Author: Dave Airlie Date: Wed Feb 22 09:59:12 2012 +0000 modesetting: fix warnings, remove dead code. Signed-off-by: Dave Airlie commit f7724167746d15c0ca32a7f5f95fb594addcddd1 Author: Gaetan Nadon Date: Sun Feb 19 16:13:34 2012 -0500 config: layout and comment the top portion of configure.ac Reorder statements to be consistent with other modules so things are easier to find. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit a0bb835dc7db1ddd0472058a2a05a600ddea3930 Author: Gaetan Nadon Date: Sun Feb 19 08:36:19 2012 -0500 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit d56293cae78323b8976859c4461f8809a76a0b03 Author: Gaetan Nadon Date: Sun Feb 19 08:36:17 2012 -0500 make: add all warnings according to the platform The current code only adds -Wall and only for gcc. Automake reserves the use of CPPFLAGS for the user to override on the command line. This also breaks the option --enable-strict-compilation The variable CWARNFLAGS contains the complete set of warnings and is platform sensitive. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit fa201fe8299099f7192a4399c9df245efcee3f8a Author: Gaetan Nadon Date: Sun Feb 19 08:36:16 2012 -0500 make: remove empty variable assignment Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit e159fbd8805005bb7a33bf2076fd2cef00e987c6 Author: Gaetan Nadon Date: Sun Feb 19 08:36:15 2012 -0500 Remove unneeded AM_PROG_CC_C_CO There are no objects in subdirs or compiled multiple times with different flags. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 70558492376e66b73063e51b128b5bbad14b84f4 Author: Gaetan Nadon Date: Sun Feb 19 08:34:28 2012 -0500 Remove redundant AC_PROG_CC Already covered by XORG_DEFAULT_OPTIONS Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit d4bb99ce754073de090221d98000f609a3891380 Author: Gaetan Nadon Date: Sun Feb 19 08:34:27 2012 -0500 Replace obsolete AM_CONFIG_HEADER with AC_CONFIG_HEADERS Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 5c2d152cad66c3f8ed6a4e82c3e6a45269bbb66d Author: Gaetan Nadon Date: Sun Feb 19 08:34:26 2012 -0500 Add missing targets for ChangeLog and INSTALL Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 8673f545cdb465b6e74f1d2fcabe29bc7fa0243d Author: Gaetan Nadon Date: Sun Feb 19 08:34:25 2012 -0500 Remove redundant EXTRA_DIST for the README file. Autotools know about it, it is always distributed. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 71594746c7da32e1c7986341a0da30f241a7a2be Merge: d53235af8 eaba06a27 Author: Keith Packard Date: Wed Feb 22 18:07:20 2012 +1300 Merge remote-tracking branch 'whot/for-keith' commit 88b637e59a37af8ec6c4c0783504b8f1a49e5595 Author: Gaetan Nadon Date: Sun Feb 19 08:34:24 2012 -0500 make: remove redundant AUTOMAKE_OPTIONS Already covered by AM_INIT_AUTOMAKE([foreign dist-bzip2]) Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit a7ea959094e9a8d862637a0ea515f687aaf89d29 Author: Gaetan Nadon Date: Sun Feb 19 08:34:23 2012 -0500 Fix typo in .gitignore Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 861e2b444ffb24921e07fdc25ab2679c9b6d2f4d Author: Gaetan Nadon Date: Sun Feb 19 08:34:22 2012 -0500 man: missing AM_V_GEN and hard-coded sed command name Let's use the common xorg makefile for all drivers. This ensures no new problems are introduced. Improvements are welcome and to be applied to all drivers. Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit 453bbe5b442a9c21d7c22437545e487e2993ceb7 Author: Gaetan Nadon Date: Sun Feb 19 08:34:21 2012 -0500 Add contact information to the README file Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit dd1d7e3519ea2f148be83ef7ab0b228da95ff9c3 Author: Gaetan Nadon Date: Sun Feb 19 08:34:20 2012 -0500 Fill the COPYING file with license text This reflects the copyright license text in the source code Signed-off-by: Gaetan Nadon Signed-off-by: Dave Airlie commit b0e12e250d4b3438fb3306155a7bbff3e2d7f9b7 Author: Dave Airlie Date: Mon Feb 20 11:08:40 2012 +0000 modesetting: disable dirty updates for ENOSYS the kernel can also return ENOSYS for this to say its not used. Signed-off-by: Dave Airlie commit c5529d68c5b01cf0f36d8f2ce3694a7a0f3333da Author: Dave Airlie Date: Mon Feb 20 11:05:59 2012 +0000 modesetting: fix shadow resizing. if we hotplugged and output, the shadow got disabled by accident. Signed-off-by: Dave Airlie commit f3b9e52b29e8b8c4b12bc2ce290ab44e88750ad9 Author: Dave Airlie Date: Mon Feb 20 11:00:56 2012 +0000 modesetting: move shadow stuff to other structure we need this for resize to work properly. Signed-off-by: Dave Airlie commit eb44a004b7230321ce6837ef44610153b1d2017b Author: Dave Airlie Date: Mon Feb 20 10:54:36 2012 +0000 modesetting: fix stride if kernel modifies it. If the kernel aligns things use its values instead. fixes output on nouveau here. Signed-off-by: Dave Airlie commit 2150cbda8c75d348f39926bbc23d3e4ca9b42c88 Author: Dave Airlie Date: Mon Feb 20 10:54:21 2012 +0000 shadowfb: dump shadowfb state at startup commit 86080a5f7a589e55a485c42bab47c6c8ff6428c1 Author: Dave Airlie Date: Thu Feb 16 19:41:40 2012 +0000 use a cap to decide if shadow is preferred or not. commit fc5f39acd49d023a82ab05fffde1b423b697753c Author: Dave Airlie Date: Thu Feb 16 19:41:30 2012 +0000 cleanup dumb cap fetch commit d94b3eaba9a33d0d78ed2d9acbc33394f40fdc2e Author: Dave Airlie Date: Mon Nov 14 11:22:44 2011 +0000 modesetting: add cursor fallback if kernel rejects cursor. If the kernel rejects a cursor, cause a fallback, this isn't 100% as we can lose the initial cursor, but it works fine once wm starts. Signed-off-by: Dave Airlie commit 594b3c4d6f6f748e08baffc4bc1c3ffad9b0d9cf Author: Dave Airlie Date: Thu Feb 16 19:31:33 2012 +0000 fix some whitespace commit 2e297978c928c571cf0a80e8d38423089014f07e Author: Dave Airlie Date: Wed Oct 5 15:12:43 2011 +0100 fixup device open Signed-off-by: Dave Airlie commit eaba06a27c5520a02f08431ac1e4b0e0bdc22cd8 Author: Chase Douglas Date: Mon Feb 13 16:00:48 2012 -0800 Keep virtual core pointer touch class around if new slave doesn't have one The VCP may have active touch grabs. The touch records must be kept so these touch grabs may be accepted/rejected in the future. This means the touch class list will not represent the touch class of the attached slave device if it does not have a touch class, but we already were breaking that assumption by keeping a separate touches array for the VCP. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 8573b3519af138a3a12a2e77098718165f9fd8ff Author: Peter Hutterer Date: Mon Feb 13 16:00:47 2012 -0800 Don't clobber virtual core pointer touches array length The VCP has its own touches array, don't overwrite it when the class is copied from the SD to the master. Reported-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 03d32fe7a718d9016053cdb5d57f51a74ef99b59 Author: Chase Douglas Date: Mon Feb 13 12:09:32 2012 -0800 Don't dereference a touch after it has been ended when punting to next owner In this case, we have ended the touch because the last owner has rejected it. We need to return from the function right now so we don't attempt to dereference another touch client for early acceptance processing. Signed-off-by: Chase Douglas Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit 1ecb7aaf2adedad1996cd26176ef5802113e3ad9 Author: Chase Douglas Date: Sat Feb 11 07:58:38 2012 -0800 Focus event button state must show the logical buttons, not physical buttons Similar to the fix in fcda98c48610fd507ca0b89c6006a5497d9dc1c9. This ensures we show the correct logical state of the buttons in device focus events too. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6f28388187cffae9e5bc9bfc9425acff4f478b59 Author: Peter Hutterer Date: Sat Feb 11 01:29:26 2012 +1000 dix: reset last.scroll when resetting the valuator (#45611) last.scroll remained on the last-submitted scrolling value but last.valuator was changed whenever the slave device changed. The first scrolling delta after a switch was then calculated as (last.scroll - new abs value), causing erroneous scrolling events. Test case: - synaptics with a scrolling method enabled, other device with 3+ axes (e.g. wacom) - scroll on touchpad - use other device - scroll on touchpad The second scroll caused erroneous button press/release events. X.Org Bug 45611 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d53235af85d50774c68347720ce132daf9a5bc49 Author: Jeremy Huddleston Date: Mon Feb 13 23:06:07 2012 -0800 XQuartz: Build fix for possible conflict of BOOL type Signed-off-by: Jeremy Huddleston commit 62edd970f6f36058fcb31de4555eb7c1329cce74 Author: Keith Packard Date: Sat Feb 11 16:13:44 2012 +1300 Bump to version 1.11.99.903 (1.12 RC3) Signed-off-by: Keith Packard commit 42b6756463ee0476340656707f1088dc6c2fd220 Merge: 7674d00b0 ca64912c0 Author: Keith Packard Date: Sat Feb 11 15:36:43 2012 +1300 Merge remote-tracking branch 'alanc/master' commit 7674d00b04da5cf73cfa5c7ed1d3a9f42b59960e Author: Peter Hutterer Date: Fri Jan 27 12:41:09 2012 +1000 Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 grab_window and touchid were removed from the struct for ABI compatibility reasons, we need to pull in the new, XI 2.2-specific struct. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit ceb026c6a6f1eea8b34e745f06f1ebcd652c0ba1 Author: Peter Hutterer Date: Fri Jan 27 12:41:09 2012 +1000 Xi: handle new XIAllowEvents request in inputproto 2.1.99.6 grab_window and touchid were removed from the struct for ABI compatibility reasons, we need to pull in the new, XI 2.2-specific struct. Signed-off-by: Peter Hutterer commit b96275c4cdb164aa71f7aa9fbf88be18886d1936 Author: Benjamin Otte Date: Tue Feb 7 18:01:25 2012 +1000 dix: fix an out-of-memory crash Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6241b5e4fdbdb08d30cc8787d858ac27122d2d49 Author: Chase Douglas Date: Fri Feb 3 16:19:11 2012 -0800 Implement touch early accept This doesn't really implement early accept as it should. Ideally, the server should send end events to all subsequent touch clients as soon as an early accept comes in. However, this implementation is still protocol compliant. We can always improve it later. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit b0c54856df71f9cabf9dad176fdade960ef8c5d9 Author: Chase Douglas Date: Fri Feb 3 16:19:10 2012 -0800 Implement early touch reject Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 656ab879f20892975510723ce8fe78faf64aadb4 Author: Chase Douglas Date: Fri Feb 3 16:19:09 2012 -0800 Check for proper window ID when processing touch allow requests Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 9a260e9af83feb5c53ffd3b2da2dc3adf06240a1 Author: Chase Douglas Date: Fri Feb 3 16:19:08 2012 -0800 Move AllowTouch to dix/touch.c, and rename to TouchAcceptReject Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 192b2c9a2ec04522655675ddfe71de5cf974cc7b Author: Chase Douglas Date: Fri Feb 3 16:19:07 2012 -0800 Export TouchEventRejected as TouchRejected This function is mostly correct for early reject usage. With a small change to pass the client resource explicitly and making the TouchOwnership event optional, it is usable for all rejection scenarios. This change exports it for use outside Xi/exevents.c and modifies the name accordingly. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 19073425e5df1317f73f74ce0b95ab24e0e0da14 Author: Chase Douglas Date: Fri Feb 3 16:19:06 2012 -0800 Factor out TouchEnd generation and delivery The server often needs to generate and deliver TouchEnd events for circumstances including touch grab acceptance and rejection. This change refactors the code so it can be used more easily. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit ab60cadc2afb9d8882144e30fde11c3ef0f999cd Author: Chase Douglas Date: Fri Feb 3 16:19:05 2012 -0800 Store window pointer in touch listener record Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit f92ba92adfce0e1975feb54ab0e1165b7c2a7bea Author: Peter Hutterer Date: Sat Feb 4 19:27:21 2012 +1000 Revert "dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents" This call was supposed to have no functional changes but in some cases DeliverDeviceEvents() was called with a uninitialised win variable. Revert, safer than trying to sort this out otherwise. This reverts commit 6eff14a789341d366b3013c5aa020e959c954651. Reported-by: Mathieu Taillefumier Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit ca64912c02bdff486fee420a49b11f54f8f5ba08 Author: Alan Coopersmith Date: Thu Jan 26 16:41:25 2012 -0800 Namespace list api to reduce conflicts with similar system headers Rename functions/macros from list_* to xorg_list_* Rename struct from struct list to struct xorg_list. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard In-sed-I-trust: Peter Hutterer commit 1541e242d1607d0db57b0cc12faca9b1c2850c67 Author: Alan Coopersmith Date: Fri Dec 23 15:17:28 2011 -0800 Stop including from xf86_OSlib.h on Solaris We don't need anything from that header (which defines /proc & kernel structures for process information), and it causes some namespace conflicts. Signed-off-by: Alan Coopersmith Reviewed-by: Keith Packard commit 85cecd981191f9c3dab0fb13310d91eff643d423 Author: Jeremy Huddleston Date: Sat Jan 28 16:06:28 2012 -0800 XQuartz: Release all buttons and keys when deactivating http://xquartz.macosforge.org/trac/ticket/486 Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit 47b457541b33f00807fd495f5b0b24d5f143bf84 Author: Jeremy Huddleston Date: Sat Jan 28 23:11:44 2012 -0800 XQuartz: Toggle off fullscreen mode when XQuartz is hidden http://xquartz.macosforge.org/trac/ticket/478 Signed-off-by: Jeremy Huddleston commit c2ba3f339f089c595386c4c579935c7984a2a545 Author: Jeremy Huddleston Date: Sun Jan 29 14:26:47 2012 -0800 XQuartz: Localization Updates Signed-off-by: Jeremy Huddleston commit 052ca3f22eadd0aa60dd24ac7d5d76137273926f Author: Keith Packard Date: Fri Jan 27 22:08:08 2012 -0800 Bump version to 1.11.99.902 (1.12 RC2) Signed-off-by: Keith Packard commit bafedb7e9bcff31e2963eeb54669b2492214fae7 Author: Jeremy Huddleston Date: Wed Jan 18 11:52:04 2012 -0800 XQuartz: Bump bundle version to 2.7.2 Signed-off-by: Jeremy Huddleston commit 8e78bbb2d2dc5b18f127540b63b45ba293bbdd25 Author: Colin Harrison Date: Thu Jan 26 13:28:24 2012 +0000 hw/xwin: Fix spelling of 'Canadian' in winkeybd.h The Mounties always get their typo Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit 80c073352a276bad3722263629de3cd61df758ab Author: Colin Harrison Date: Wed Jan 4 17:16:36 2012 +0000 hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition() Commit 3b36fd1b49030ead44358945f62e5abe7f4609ce changed miPointerSetPosition() to take co-ordinates as doubles, not ints, so this code as it stands is now wrong (if it ever was correct in the first place :-)) It's unclear that we can safely promote x,y to doubles, apply miPointerSetPosition() which potentially constrains the cursor, and then convert back to ints. Fortunately, this whole dance seems to be unnecessary, and we can simply remove the call to miPointerSetPosition() entirely, and just QueuePointerEvents() like any other input driver. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit ced9db65950e402d7ddc663225b888e8482b8c57 Author: Colin Harrison Date: Wed Jan 25 01:37:16 2012 +0000 hw/xwin: Ignore WM_DISPLAYCHANGE messages with 0 bpp Ignore WM_DISPLAYCHANGE messages which indicate bpp is changing to 0. That has no defined meaning I can find, but some graphics card drivers appear to generate it on suspend/resume or screensaver activate/deactivate. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY commit bea6fb6c7af551778cfe1c0e8412ef4ccf560808 Author: Jon TURNEY Date: Sun Jan 22 19:31:51 2012 +0000 hw/xwin: Avoid WIN_WINDOW_PROP races during Windows window destruction The WIN_WINDOW_PROP is removed during WM_DESTROY handling, so it is not neccessary to remove it in winDestroyWindowsWindow(), and doing so opens a race condition, as we may attempt to access that property in the wndproc before the WM_DESTROY has completed. A specific example of that race is if a WM_KILLFOCUS occurs in the window between property removal and WM_DESTROY processing, where we will attempt to apply DeleteWindowFromAnyEvents() on an invalid (null) WindowPtr. Also guard against null WindowPtr in the WM_KILLFOCUS handler See http://cygwin.com/ml/cygwin-xfree/2012-01/msg00009.html Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 9a709d5028094fcbeb7a49f47cb85e22cd772f36 Author: Jon TURNEY Date: Thu Sep 29 15:05:27 2011 +0100 hw/xwin: Handle more motif window decoration hinting Handle the MWM_DECOR_MINIMIZE, MWM_DECOR_MAXIMIZE and MWM_DECOR_MENU decoration hints in a _MOTIF_WM_HINTS window property Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b8b0b841a0e7cfcecaf0b6a5aa67e1b4499374d9 Author: Oliver Schmidt Date: Mon Sep 5 13:32:01 2011 +0100 hw/xwin: Fix AltGr key sometimes firing an additional Ctrl-L key I also had problems with the AltGr key. These could reliably be reproduced by holding the AltGr for some seconds (causing Windows generating auto repeat events) I discovered that the mechanism in winkeybd.c function winIsFakeCtrl_L had a problem if PeekMessage cannot obtain the next Alt_R message because it is not there yet. I prepared a patch that remembers the last Ctrl_L event and reacts on a later Alt_R. It was also necessary to alter the order in winWindowProc() in winwndproc.c: the invocation of winIsFakeCtrl_L had to be done before discarding auto-repeated key presses, as winIsFakeCtrl_L() now has an internal state which must be updated by all key events. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3d3114d55a2a323f8d49c3549a0dfdf9d4acf89d Author: Jon TURNEY Date: Thu Jun 30 14:19:01 2011 +0100 hw/xwin: Handle the virtual key code generated by the Fn key on IBM Lenovo laptops Apparently, IBM Leonovo laptops can generate a key-press event for the Fn key, with virtual key code 0xFF and scan code extended 0x63 Handle this specially, rather than just passing on key code 0x63 (delete), so you don't delete what you just typed when you adjust the screen brightness, etc. :-) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 74af860f9a59332f6ed1ac9b3e7867fbbb3d7305 Author: Jon TURNEY Date: Wed Mar 24 22:41:22 2010 +0000 hw/xwin: turn on -emulate3buttons if less than 3 mouse buttons are reported Try to be more intelligent with default options, turn on -emulate3buttons by default if less than 3 mouse buttons are reported by Windows Also, add -noemulate3buttons option so this default setting can be reversed if desired Also, correctly report the number of mouse buttons windows is reporting, rather than always at least 3 Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit c0f3709501a0afd3bf77e783f11d2c2e5f489d3b Author: Jon TURNEY Date: Thu Mar 24 20:19:47 2011 +0000 hw/xwin: In multiwindow mode, don't grab native input focus for new windows which hint they don't want it In multiwindow mode, avoid grabbing the input focus for newly created windows which have InputHint FALSE (this is used by e.g. glean to avoid every test window grabbing the focus) Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 25caa8565d7d10f4c254bca5bb9efa05a77542ad Author: Jon TURNEY Date: Wed Jan 25 13:33:39 2012 +0000 hw/xwin: Remove some redundant OS version reporting Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit a9aca218f557c723e637287272819a7c17174e1e Author: Roland Cassard Date: Sat Oct 23 18:12:36 2010 +0100 hw/xwin: Don't assume we'll always have converted the clipboard selection after 2 attempts Rather than knowing we have to call winProcessXEventsTimeout() for up to 2 WIN_XEVENTS_CONVERT messages, process all messages in winProcessXEventsTimeout() until either: (i) the time out expired, (ii) an error occurred, or (iii) received a WIN_XEVENTS_NOTIFY messaage indicating the data has been to put on the clipboard. Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 75fe336b6c903133ae386f5cb8d308a0e9e2768e Author: Michel Hummel Date: Fri Aug 6 15:23:52 2010 +0100 hw/xwin: Mitigate a race condition in clipboard thread initialization Remove the variables g_fClipboardLaunched and g_fClipboardStarted from winInitializeGlobals(), as their re-initialization is handled in the file hw/xwin/InitOutput.c. Re-initializing g_fClipboardLaunched and g_fClipboardStarted during the server reset procedure can lead to the clipboard thread being launched two times and sometimes leads to a crash of the X server... Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 95b1391fe3d3192abdfbad4140513b2112cfa02a Author: Jon TURNEY Date: Mon Apr 5 13:57:24 2010 +0100 hw/xwin: Chain IOError handlers to avoid longjmp across threads Avoid crashes on shutdown due to the undefined behaviour of calling longjmp() on the result of setjmp() from a different thread, by chaining IOError handlers and only jumping back up to the frame for this thread Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit 0659437f5ec0e3f646373394f5f9c5461e2170f3 Author: Yaakov Selkowitz Date: Sat Feb 20 23:40:53 2010 -0600 hw/xwin: Improve XWinrc loading and error recovery If $HOME/.XWinrc is present but badly formed, ignore it and try system.XWinrc instead. If neither file is present or both are badly formed, provide a built-in default which gives the user the chance to load their new or fixed configuration without restarting. Signed-off-by: Yaakov Selkowitz Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 47c7b6d3e626497747ae2780f259a15b8e6c846f Author: Michel Hummel Date: Sat Oct 23 18:35:57 2010 +0100 hw/xwin: Remove no-longer needed tricks used to prevent the clipboard client from being killed Remove no-longer needed tricks used to hide the clipboard client from XDM to prevent it from being killed - Delete XQuery wrapper used to hide clipboard client - Delete XDMCP mode heuristic which waits until some magic number of connections have been established before starting the clipboard We still need the EstablishConnection wrapper to ensure that the clipboard client isn't the first client (causing a server restart if it disconnects) Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit c1bf3baa44fbd8af33a2b3ce045324485b85a7a7 Author: Michel Hummel Date: Sun Oct 31 14:53:02 2010 +0000 hw/xwin: Automatically restart clipboard thread Automatically restart clipboard thread on unexpected exit Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit ae981341a98f7a1ee5d6f3bc8ebde04e42042dc5 Author: Jon TURNEY Date: Mon Feb 8 22:37:30 2010 +0000 hw/xwin: Give the X window for the clipboard integration client a name This makes it a bit easier to find when staring at the output of 'xwininfo -tree -root' Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit b1093241f3e28223a139e7cb5c3ae85182bdf545 Author: Jon TURNEY Date: Tue Oct 19 20:47:21 2010 +0100 Xext: Warning fix for shm.c shm.c: In function 'CheckForShmSyscall': shm.c:182:5: warning: function declaration isn't a prototype [-Wstrict-prototypes] Signed-off-by: Jon TURNEY Reviewed-by: Alan Coopersmith Reviewed-by: Colin Harrison commit 02775efb8930291cc62fc84086c97da75b912a55 Author: Adam Jackson Date: Tue Jan 24 17:35:04 2012 -0500 int10: Fix unmapping of the BIOS scratch area 342f3eac8460fc48cfad1f1d7be939d671e6e1cd introduced a bug, 'base' is incremented before use. The old code corrected this when unmapping, so the new code should too. Signed-off-by: Adam Jackson Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit e1085a0da0b9299f48b3dc41dee5e33bf022bea5 Author: Chase Douglas Date: Wed Jan 18 19:09:21 2012 -0800 Don't set X and Y valuators for indirect touch events For expediency, it made sense to always have the X and Y axes set for direct touch device event propagation. The last X and Y values are stored internally. However, indirect device touch event propagation does not depend on the touch's X and Y values. Thus, we don't need to set the values for every indirect touch event. On top of this, the previous X and Y values aren't stored for indirect touches, so without this change the axes get erroneously set to 0. Signed-off-by: Chase Douglas Signed-off-by: Peter Hutterer commit 5201310559fe8708ba8278bdef77cdc1673fff71 Author: Daniel Stone Date: Thu Jan 19 22:40:32 2012 +1100 UngrabAllDevices: Don't kill clients if not told to The kill_client argument to UngrabAllClients specifies if we want to kill the client holding the grab or just deactivate the grab. Signed-off-by: Daniel Stone Reported-by: Julien Cristau Reviewed-by: Cyril Brulebois Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9b1e18f42a05a79d9ebec372a37b47442e397ca9 Author: Chase Douglas Date: Wed Jan 18 18:04:14 2012 -0800 Only update pointer motion data for pointer emulated touch events Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit f00e5b02f5d9928cd88961e761da91b5faff1b32 Author: Chase Douglas Date: Wed Jan 18 18:04:13 2012 -0800 Only scale direct device touch coordinates Indirect touch devices provide valuator values in pure device coordinates. They also don't need to be fixed up for screen crossings. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 24dc0389da3970e83e4908039957567e55f9ea05 Author: Peter Hutterer Date: Mon Jan 16 12:53:39 2012 +1000 include: Fix comment typo Signed-off-by: Peter Hutterer commit 954bb994842aa43a0f272858e65036c016b729a4 Author: Jeremy Huddleston Date: Mon Jan 9 00:40:10 2012 -0800 configure.ac: Remove MIEXT_SHADOW_LIB from XORG_LIBS This is provided by dixmods/libshadow.so and is not part of the main binary. This addresses a build failure on darwin due to MIEXT_SHADOW_LIB having unsatisfied dependencies (FB_LIB) in XORG_LIBS. Signed-off-by: Jeremy Huddleston commit ba0f5cc1961bfcfb5e7d66ac5df19d429952631d Author: Jeremy Huddleston Date: Mon Jan 9 00:14:29 2012 -0800 xfree86: Don't link libxorgxkb against libdix.la libdix.a is already provided by XSERVER_LIBS. Including it in libxorgxkb results can result in duplicate symbols landing in the Xorg binary on some configurations (buggy glibtool on darwin). Signed-off-by: Jeremy Huddleston commit 2387fb23858d645f15061bc7bcbe4654386ba116 Author: Jeremy Huddleston Date: Fri Jan 13 12:00:14 2012 -0800 sdksyms.sh: Exit on error rather than building an empty symbol table Signed-off-by: Jeremy Huddleston Reviewed-by: Keith Packard commit cd89482088f71ed517c2e88ed437e4752070c3f4 Author: Jeremy Huddleston Date: Wed Jan 11 12:17:06 2012 -0800 test: Fix linking issues when building unit tests without the Xorg DDX This allows unit tests to build and run successfully on darwin when only the Xvfb or XQuartz DDX is built. Signed-off-by: Jeremy Huddleston Signed-off-by: Jon TURNEY Reviewed-by: Jon TURNEY commit 78d39b3222a4b0b92d840137f5455d3a20dd6906 Author: Jeremy Huddleston Date: Sun Jan 15 02:26:43 2012 -0800 Revert "glx: don't leak fbconfigs" This reverts commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107. This patch free()s memory in __glXScreenDestroy which was allocated in glxdricommon (which isn't in every DDX). That breaks abstraction and causes a crash when XQuartz quits, because it results in freeing a pointer that was never allocated. The correct fix is to do this cleanup in __glXDRIscreenDestroy. Signed-off-by: Jeremy Huddleston commit f9e6858d5c10be6a8439c0f18bfb2325fa0ee070 Author: Chase Douglas Date: Wed Jan 11 07:38:12 2012 -0800 Use event time instead of CurrentTime for grab times When {XI,X,}AllowEvents is called, the timestamp is compared against the grab time to ensure that the request pertains to the current grab in the server. While many clients may use CurrentTime (client-side), the timestamp of the event causing the grab is also valid. This change ensures that the server's notion of the grab time is the time of the event that activated the grab rather than the time that the grab is actually activated. This bug was exposed through nested touch then pointer grabs. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit a6273cc85c01fc020643a68e49ca4e7a2d2ae898 Author: Peter Hutterer Date: Thu Jan 12 10:17:34 2012 +1000 xfree86: mention udev in the xorg.conf manpage AutoAddDevices section And point out what "hotplugging" means. Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit a60d87ffe6d9a15fa830c8da2947c72487863c2b Author: Peter Hutterer Date: Wed Jan 11 09:04:02 2012 +1000 os: prettify backtrace output Changes to output: * "Backtrace:" now appears on a separate line _with_ a timestamp * A blank line is inserted after the last backtrace line Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit c495a839ace7fcc1f1fe414d3d3ba04f08885434 Author: Peter Hutterer Date: Wed Jan 11 09:01:05 2012 +1000 include: prettify BUG_WARN output ErrorF output is prefixed with a timestamp, so the previous output would look like this: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' BUG: getevents.c:842 in scale_to_desktop() Change this to have the prefix on both lines: [ 50.423] BUG: triggered 'if (dev->valuator->numAxes < 2)' [ 50.423] BUG: getevents.c:842 in scale_to_desktop() Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit bbb6b8c834e0e1491ca14403b5d0840dd14380d3 Author: Peter Hutterer Date: Fri Jan 6 13:20:45 2012 +1000 render: don't bother with animated cursors on floating slaves (#39989) X.Org Bug 39989 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 35bd77e9d0701daae87d681900d749604fc6471f Author: Peter Hutterer Date: Mon Jan 9 15:04:10 2012 +1000 dix: Update pointer limits for floating devices too (#43635) When the screen is restructured, the pointer limits need to be reset for floating slave devices as well, not just for master pointers. Only skip devices that don't have a cursor (attached slaves and keyboard) Bug reproducer: float an absolute slave device, rotate the screen - the device is now confined to a section of the screen only. X.Org Bug 43635 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5de0c2582f9c80874b4f4a5b86d250059bfaa85b Author: Keith Packard Date: Thu Jan 12 12:10:07 2012 -0800 Revert "os: Repack ConnectionOutput for LP64" This reverts commit d5f724544afd2949cebfcf4f0b4510ec0c701bec. ABI change pended for 1.13 commit 11331305d4acd117b71502e45c0e86684fa9280b Author: Keith Packard Date: Thu Jan 12 12:10:03 2012 -0800 Revert "dix: Repack ClientRec" This reverts commit f702372822dadb1fef92cfc25086481f640147b3. ABI change pended for 1.13 commit d9eeede52f2d5ba9dd6368d988a5d2abb3b8b4e5 Author: Keith Packard Date: Thu Jan 12 12:09:59 2012 -0800 Revert "dix: Pull client-is-local flag up to the ClientRec" This reverts commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96. ABI change pended for 1.13 commit 3be37375eed9eb9cfb9c42821deda4213af4057b Author: Keith Packard Date: Thu Jan 12 12:09:55 2012 -0800 Revert "dix: Extend initial connection handshake for forwarding proxies" This reverts commit 78fa121f4097d29458e5453c13473595df06e26e. ABI change pended for 1.13 commit 5b9f5c8a53aca03c3c73bc10bd362987621a9d72 Author: Keith Packard Date: Thu Jan 12 12:09:44 2012 -0800 Revert "os: Hide the Connection{In,Out}put implementation details" This reverts commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b. ABI change pended for 1.13 commit 5867d453cebebec6b4f10409af86b603755fbf51 Author: Keith Packard Date: Thu Jan 12 12:09:34 2012 -0800 Revert "dix: Fix types in WindowOptRec" This reverts commit a4553019a10b4e01cc06f3081db71a83338697b4. ABI change pended for 1.13 commit e722ad6c3efa57b806ca0f2dc13114bd3619a88c Merge: e476af417 4e44580ef Author: Keith Packard Date: Mon Jan 9 13:22:28 2012 -0800 Merge remote-tracking branch 'jturney/rpavlik-xwin-fixes' commit e476af417d83730b11054f4e5b127ab5540bb332 Merge: f4956faab 146008358 Author: Keith Packard Date: Mon Jan 9 13:17:37 2012 -0800 Merge remote-tracking branch 'whot/multitouch' commit f4956faab9ccf9aba6cf9603f4489f5dad19a347 Author: Zhigang Gong Date: Wed Jan 4 07:01:19 2012 +0000 mi/mibitblt: Fix an overflow bug of bit shift. When depth equal to 32 and planeMask equal to 0, the overflow will occur and cause the pixmap can't be cleared. There are some test cases in XTS hit this bug, and this fix can eliminate the corresponding failures. Signed-off-by: Zhigang Gong Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 6d6d4cb6043905d850834946e9bfc526ed5a9ef7 Author: Matthieu Herrb Date: Mon Jan 2 13:23:59 2012 +0000 Add OpenBSD support to DetermineClientCmd() Uses kvm_getargv() from libkvm. Signed-off-by: Matthieu Herrb Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit a55214d11916b707b7c8c65c555cc0cbb59ac503 Author: Adam Jackson Date: Tue Jan 3 06:22:24 2012 +0000 Always install xaa sdk headers Always install XAA SDK headers so drivers still build even with --disable-xaa Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit dafc327f3c75205cf7e5360e9ccd71c7457f61a5 Author: Matthieu Herrb Date: Mon Jan 2 13:11:41 2012 +0000 UnloadSubModule(): accept pointer value '1' and ignore it. Some driver modules try to unload submodules that are now built-in. Signed-off-by: Matthieu Herrb Reviewed-by: Julien Cristau Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit 8db029064bcbe378061e812bb8136608e3123226 Author: Adam Jackson Date: Wed Jan 4 16:39:33 2012 +0000 vgahw: Fix DACDelay() macro to use the driver's vtable We don't want to unconditionally use I/O routines here, since if the driver is using mmap'd VGA ports then the I/O handle won't be set up. Tested-by: Jeff Chua Signed-off-by: Adam Jackson Reviewed-by: Mark Kettenis Signed-off-by: Keith Packard commit 63a8012947fc44ccb3d661dec88dbda14e7f3c04 Author: Chris Halse Rogers Date: Thu Jan 5 01:22:40 2012 +0000 Revert "dix: don't return BadMatch from GetProperty (#23562)" This reverts commit f04fe06ae244b851b38be824b1a80f2f8a030591. dixLookupWindow no longer returns BadMatch. No other caller was checking for it, so this problem is now fixed in the utility function. Signed-off-by: Christopher James Halse Rogers Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit ef492e9797b6d4f6bbc25e86bedc24477819fde7 Author: Chris Halse Rogers Date: Thu Jan 5 01:22:39 2012 +0000 dix: Return BadWindow rather than BadMatch from dixLookupWindow dixLookupWindow uses dixLookupDrawable internally, which returns BadMatch when the XID matches a non-Window drawable. Users of dixLookupWindow don't care about this, just that it's not a valid Window. This is a generalised version of the fix for X.Org Bug 23562, where GetProperty was incorrectly returning BadMatch. Auditing other window requests, all that I checked would incorrectly return BadMatch in these circumstances. An incomplete list of calls that could incorrectly return BadMatch is: ListProperties, SetSelectionOwner, {Destroy,Map,Unmap}{,Sub}Window. None of the callers of dixLookupWindow, except for GetProperty, check for BadMatch Signed-off-by: Christopher James Halse Rogers Reviewed-by: Daniel Stone Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit ff891bbf68caefc22cabb541b6b56af086ac2280 Author: Arthur Taylor Date: Fri Jan 6 07:21:37 2012 +0000 linux: Use K_OFF VT KB mode over K_RAW if available. Linux kernels since 2.6.38 (March 2011) have an VT KB mode K_OFF in which special keys (like Ctrl+C) are not interpreted and input is not buffered. Use of this mode over K_RAW removes the need for a xf86ConsoleHandler to drain the VT input buffer, removing the grief it causes when it goes wrong or is (de)initialized out-of-order. (This also saves a few needless context switches per key event.) If K_OFF is not defined or not understood by the kernel, K_RAW and the previous method is used as a fall-back. Reviewed-by: Adam Jackson Signed-off-by: Arthur Taylor Signed-off-by: Keith Packard commit 0b113f7cdf5228dccd51a749a339c8669e3f20ff Merge: 0b2c6491c 777bf90ab Author: Keith Packard Date: Mon Jan 9 13:07:25 2012 -0800 Merge commit '777bf90abeac37087a3d0538b847742523d5acf2' commit 0b2c6491c5e5e1c9ba067299f3de61f5acee263b Merge: 1f5587e14 6b1943653 Author: Keith Packard Date: Mon Jan 9 11:40:23 2012 -0800 Merge remote-tracking branch 'whot/for-keith' commit 1f5587e14406c083687203030db6a11691ac9d9f Merge: a97252db2 6269977c9 Author: Keith Packard Date: Mon Jan 9 11:37:59 2012 -0800 Merge remote-tracking branch 'kibi/master' commit a97252db24669a3e26a935024ea38b8a28d30586 Author: Jeremy Huddleston Date: Tue Dec 20 19:49:47 2011 -0800 XQuartz: GL: Buildfix for recent GLX changes dispatch.h was leftover from an earlier implementation and is no longer needed, so remove it since including it causes a build failure due to conflicts between GL/gl.h and OpenGL/gl.h Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: Ian Romanick commit 6b194365364cb7a74c2b19f4a8c5e0e0404339da Author: Andreas Wettstein Date: Wed Nov 30 20:20:21 2011 +0100 xkb: Message actions suppress other key presses #28575 When a key to which a message action is mapped is held down, presses of other keys were not registered. Signed-off-by: Andreas Wettstein Reviewed-by: Daniel Stone Signed-off-by: Peter Hutterer commit 4e44580efd4522ced644c698336d2f6ea54f3917 Author: Ryan Pavlik Date: Fri Nov 4 14:29:01 2011 -0500 hw/xwin: Include manifest file in the dist tarball Commit c02638fd added the manifest file, but didn't add it to EXTRA_DIST. Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit c763fe51b8ff18e204caab9cf97376a1b72324f0 Author: Ryan Pavlik Date: Fri Nov 4 13:17:50 2011 -0500 hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW hw/xwin: Fix duplicate definition of HAS_WINSOCK when building for MinGW but still provide it if building for Win32 without autotools xserver/hw/xwin/winclipboard.h:42:0: warning: "HAS_WINSOCK" redefined ../../include/xwin-config.h:11:0: note: this is the location of the previous definition Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 3d80f202b06227f7fc03b674f5fbf809c2d1efb2 Author: Ryan Pavlik Date: Fri Oct 28 09:56:19 2011 -0500 hw/xwin: Fix possible null ptr deref in winMWExtWMDecorateWindow() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit c824004b4592b3d86b3514be7cab37b36642b13a Author: Ryan Pavlik Date: Fri Oct 28 09:56:11 2011 -0500 hw/xwin: Fix possible null ptr deref in winMWExtWMRestackFrame() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 3c501691a0a9fa17da4e2cc84f55010ef2a4790d Author: Ryan Pavlik Date: Fri Oct 28 09:52:34 2011 -0500 hw/xwin: Fix possible null ptr deref in winActivateAppPrimaryDD() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit a492c02649de4c60ac21a7fcb6b7c730b558dca6 Author: Ryan Pavlik Date: Fri Oct 28 09:49:00 2011 -0500 hw/xwin: Fix possible null ptr deref in winActivateAppNativeGDI() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit b907079596bc8600d3420c189409053b0b5016f6 Author: Ryan Pavlik Date: Fri Oct 28 09:46:56 2011 -0500 hw/xwin: Clarify an if statement mixed with ifdef in winSetEngine() Use the same pattern as elsewhere so it's a bit clearer what we are checking Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 5c35dd7be716a3464f012c92866919a3606f9beb Author: Ryan Pavlik Date: Thu Oct 27 15:49:59 2011 -0500 hw/xwin: Fix rrScreenSetSize function pointer mismatch winrandr.c: In function ‘winRandRInit’: winrandr.c:218:31: warning: assignment from incompatible pointer type Fix winRandRScreenSetSize() function signature to match RRScreenSetSizeProcPtr type, to align with commit fd9331f6 'Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet"' This is fall-out from the late revert of RANDR 1.4 in the 1.10 release cycle, it will probably need to be reverted if/when that goes back in again. Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit aa07d82908c28f4d083c0c55846a5b34f0e1ef31 Author: Ryan Pavlik Date: Fri Oct 28 09:56:26 2011 -0500 hw/xwin: Remove an empty #if 0/#endif Um... yeah Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit d459f42e64f2bafef5124a456d2ad6fa2cd92a7f Author: Ryan Pavlik Date: Fri Oct 28 09:52:37 2011 -0500 hw/xwin: Fix double-free in error path in winQueryRGBBitsAndMasks() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit cc7dedd6b51a01996ddab10fe8b84e30700d1570 Author: Ryan Pavlik Date: Fri Oct 28 09:46:45 2011 -0500 hw/xwin: Fix a memory leak in error path in winInitWM() Signed-off-by: Ryan Pavlik Reviewed-by: Colin Harrison Reviewed-by: Jon TURNEY commit 777bf90abeac37087a3d0538b847742523d5acf2 Author: Adam Jackson Date: Mon Jul 18 15:07:07 2011 -0400 xfree86: Remove the pretense of EDID v2 support We don't do anything with EDID v2 blocks besides publish them on the root window. Worse, the check deleted by this patch would attempt to take a checksum of arbitrary memory if the rawData array isn't 256+ bytes long (and, for the monitors mentioned, it probably is only 128). Reviewed-by: Mark Kettenis Signed-off-by: Adam Jackson commit 8f9bdfd293ad8e45755efe8d764b4dcc2a724f51 Author: Adam Jackson Date: Tue Dec 13 21:23:12 2011 -0500 dix: Tune dixLookupDrawable for success The vast vast vast majority of resource lookups are successful. Move some work to the error paths so we don't punish success. Before: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1148346.9/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2091666.1/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 83a98543b58c661a22574a6f8d8f9d777c0955b8 Author: Adam Jackson Date: Tue Dec 13 20:23:40 2011 -0500 dix: Tune dtrace hooks around Dispatch Don't call LookupMajorName if the hooks aren't active, it's quite expensive. Before: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1109091.3/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2072652.2/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit 11977fab546da35d579ebe285e3c26864007805e Author: Adam Jackson Date: Tue Dec 13 21:00:05 2011 -0500 xace: ricer tuning for XaceHook gcc doesn't want to hoist the check for XaceHooks[hook] != NULL above the varargs code for some reason, so do it ourselves. Before: 40000000 trep @ 0.0010 msec (1050420.2/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (1921147.6/sec): ShmPutImage 10x10 square After: 40000000 trep @ 0.0009 msec (1087458.5/sec): PutImage 10x10 square 60000000 trep @ 0.0005 msec (2012238.6/sec): ShmPutImage 10x10 square Reviewed-by: Alan Coopersmith Signed-off-by: Adam Jackson commit a4553019a10b4e01cc06f3081db71a83338697b4 Author: Adam Jackson Date: Fri Jun 17 14:30:06 2011 -0400 dix: Fix types in WindowOptRec No reason for these to be 64 bits on LP64. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit c44ef2e1ff7bad168c348da63477b4636b3054fd Author: Adam Jackson Date: Fri Jun 17 14:17:09 2011 -0400 os: Minor header cleanup Move some constants near their only users, and remove some getdtablesize() logic that's second-guessing configure. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 48e7a2ef574c8b38c4f8f07b45f54c8bfd02552b Author: Adam Jackson Date: Fri Jun 17 14:03:01 2011 -0400 os: Hide the Connection{In,Out}put implementation details Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 78fa121f4097d29458e5453c13473595df06e26e Author: Adam Jackson Date: Fri Jun 17 13:43:38 2011 -0400 dix: Extend initial connection handshake for forwarding proxies Forwarding proxies like sshd will appear to be local, even though they aren't really. This leads to weird behaviour for extensions that truly require running under the same OS services as the client, like MIT-SHM and DRI2. Add two new legal values for the initial connection's byteOrder field, 'r' and 'R'. These act like 'l' and 'B' respectively, but have the side effect of forcing the client to be treated as non-local. Forwarding proxies should attempt to munge the first packet of the connection accordingly; older servers will reject connections thusly munged, so the proxy should fall back to passthrough if the munged connection attempt fails. Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit 49d38b75c8f3276cfce33ffe6b8c4fbeb1081b96 Author: Adam Jackson Date: Fri Jun 17 13:22:41 2011 -0400 dix: Pull client-is-local flag up to the ClientRec Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit f702372822dadb1fef92cfc25086481f640147b3 Author: Adam Jackson Date: Fri Jun 17 12:58:25 2011 -0400 dix: Repack ClientRec sizeof(ClientRec) ILP32 LP64 before 120 184 after 104 136 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit d5f724544afd2949cebfcf4f0b4510ec0c701bec Author: Adam Jackson Date: Thu Jun 16 17:40:24 2011 -0400 os: Repack ConnectionOutput for LP64 Reviewed-by: Daniel Stone Signed-off-by: Adam Jackson commit ed8f3c4bd17bddf1369d050ea8e63b9451d887ce Author: Peter Hutterer Date: Fri Jan 6 10:10:16 2012 +1000 Xi: change XIChangeDeviceProperty from const pointer to const void * According to Daniel Kurtz, a typedef void *pointer is a atomic type. So a 'const pointer' is equivalent to 'void* const' instead of the intended 'const void*'. This technically changes the ABI, but we don't bump it for this. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 146008358e9dd9b178bd5305bcc1680ca16c328d Author: Chase Douglas Date: Thu Jan 5 16:43:40 2012 -0800 Remove last listener on touch reject The current code short-circuits around the block that removes the rejecting listener if it is the only listener left. It also does not delete the touchpoint record if the touch has not physically ended. This change ensures the listener is removed under these circumstances. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit e30c3c5c59abba9713cf3be532a46220aa9aeeca Author: Chase Douglas Date: Wed Jan 4 15:50:40 2012 -0800 Don't end touchpoint if owning client hasn't accepted/rejected A touchpoint is ended when no further processing will take place for it. This includes the situation where there is only one grabbing client, and the client receives a touch end before it has accepted/rejected the touchpoint. This change ensures that a delivered touch end event is converted into a touch update event under the above scenario. If the event is left as a touch end event, the touchpoint will be ended in ProcessTouchEvent(). Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 075a473e538efb771497b762101694b6c0c45c2b Author: Carlos Garnacho Date: Tue Jan 3 02:43:40 2012 +0100 dix: Set XITouchEmulatingPointer on events from the touch sequence emulating pointer events The internal flag is kept around, merely translated to XITouchEmulatingPointer when creating the XI2 events that will be delivered to the client. Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Reviewed-by: Chase Douglas Signed-off-by: Peter Hutterer commit e8db10a033491059ddf2b4777c9fafed14c403e8 Author: Peter Hutterer Date: Fri Jan 6 13:49:04 2012 +1000 Require inputproto 2.1.99.5 Signed-off-by: Peter Hutterer commit 223ba8b46eacbc8e573bc5136a3d6677f3e39099 Author: Peter Hutterer Date: Thu Jan 5 15:55:04 2012 +1000 dix: fix wrong condition checking for attached slave (#44003) We need to update the master if the device is not a master _and_ it is not floating. X.Org Bug 44003 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3ce102c362cadcd7087bdcf48440d9498eaf77d0 Author: Peter Hutterer Date: Thu Jan 5 07:08:01 2012 -0500 dix: on PointerRootWin send a FocusIn to the sprite window too XTS XSetDeviceFocus-7 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a125aabda3a5cf27aa98cb61f16e49280b66f451 Author: Peter Hutterer Date: Thu Jan 5 07:02:51 2012 -0500 dix: send focus events to the immediate parent (#44079) For a transition from windows A to B, A->parent did not receive an event. DeviceFocusOutEvents sends to windows ]from, to[, so start with the actual window, not it's parent. X.Org Bug 44079 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Keith Packard commit 75953ccb9e9e5f1dbbaa44c714716a0049e22aae Author: Peter Hutterer Date: Tue Jan 3 10:45:45 2012 +1000 xfree86: split warning about missing identifier or input driver Check for identifier first and bail if it's missing (also remove the current identifier check after we've already bailed due to missing identifiers) If a driver is missing, warn but also say that we may have added this device already. I see too many bugreports with incorrectly shortened log files. Signed-off-by: Peter Hutterer Reviewed-by: Cyril Brulebois commit 6269977c91071e0ea16ca5b4b8e15fd6db0b6fcf Author: Julien Cristau Date: Fri Dec 30 20:41:25 2011 +0100 os: don't ignore failure from dladdr If dladdr returns 0, don't go and use the returned Dl_info, it may contain garbage. X.Org bug#44315 Reported-and-tested-by: Cyril Brulebois Reviewed-by: Jeremy Huddleston Reviewed-by: Cyril Brulebois Signed-off-by: Julien Cristau commit 644efb43e0639af648dd46d9729c2cabd9511238 Author: Cyril Brulebois Date: Fri Dec 30 02:34:36 2011 +0000 linux/ia64: Fix regression after domain I/O support code removal. Side effect of aa0bfb0f133481c57762012e8e30c05ffa151423: | CCLD Xorg | sdksyms.o:(.data.rel+0x27d8): undefined reference to `outl' | collect2: ld returned 1 exit status Since the linux/ia64 domain I/O support code got removed in that commit, there's no reason to keep on declaring those functions (inb, inl, inw, outb, outl, outw). Bugzilla: https://bugs.freedesktop.org/43985 Reviewed-by: Jeremy Huddleston Signed-off-by: Cyril Brulebois commit 98cde254acb9b98337ddecf64c138d38c14ec2bf Author: Keith Packard Date: Tue Dec 27 13:42:21 2011 -0800 Bump version to 1.11.99.901 (1.12 RC1) Signed-off-by: Keith Packard commit 5037c9af78da6652189de7202e70e1b833395af5 Author: Keith Packard Date: Tue Dec 27 14:02:01 2011 -0800 glx/glapioffsets.h is no longer part of the build, remove it Signed-off-by: Keith Packard commit 8dedf9831bd80514d800f0085213296a3726dba7 Merge: cfc4c3d7f cf9618312 Author: Keith Packard Date: Tue Dec 27 13:13:48 2011 -0800 Merge remote-tracking branch 'kibi/master' commit cfc4c3d7fa8bd4da4c08b2ab8e6f85435f75353a Author: Alan Coopersmith Date: Sat Dec 24 10:00:56 2011 -0800 Add Solaris support to DetermineClientCmd Uses /proc/pid/psinfo to read command & partial arguments. Moves cmdsize & argsize variables into non-Solaris #else clause to avoid unused variable warnings. Fixes format mismatch errors when building with DEBUG defined on a 64-bit platform (where Mask is defined as CARD32). Signed-off-by: Alan Coopersmith Reviewed-by: Rami Ylimäki Signed-off-by: Keith Packard commit a28ff2cf92c2b35e02eacca21af929afabbf6b83 Author: Chase Douglas Date: Thu Dec 22 12:00:37 2011 -0800 test/xi2: Really fix infinite loop in test_convert_XITouchOwnershipEvent long i; for (i = 1; ; i <<= 1) if (i == (1 << 31)) break; (1 << 31) is compiled as an int, and thus is equal to -2147483648. We are trying to compare it against a long, which on 64-bit machines is 2147483648. This results in an infinite loop. Signed-off-by: Chase Douglas Signed-off-by: Keith Packard commit e7df42ab68e30588a5e32ed543b0711821daf009 Author: Keith Packard Date: Thu Dec 22 09:35:51 2011 -0800 test/xi2: Fix infinite loop in test_convert_XITouchOwnershipEvent The touchid test was using a loop like: for(i = 1; i < 0xffffffff; i <<= 1) When 'i' is a 32-bit variable, this infinite loops as it goes from 0x80000000 to 0. 'i' is declared as 'long', which is 32-bit in 32-bit mode. Signed-off-by: Keith Packard commit cf96183122a85e3376e560f0360b38b5676e57a9 Author: Cyril Brulebois Date: Wed Nov 2 12:41:20 2011 +0100 xorg.conf.man: Fix bad whatis entry. Debian's QA tool “lintian” reported a bad whatis entry for the xorg.conf(.d) manpages. It comes with the following pointers: For manual pages that document multiple programs, functions, files, or other things, the part before "\-" should list each separated by a comma and a space. […] Refer to the lexgrog(1) manual page, the groff_man(7) manual page, and the groff_mdoc(7) manual page for details. Indeed, the current situation is: $ whatis xorg.conf; whatis xorg.conf.d xorg.conf (5) - (unknown subject) xorg.conf.d (5) - (unknown subject) With this patch: xorg.conf (5) - configuration files for Xorg X server xorg.conf.d (5) - configuration files for Xorg X server Reviewed-by: Alan Coopersmith Signed-off-by: Cyril Brulebois commit f75bdf7fbe757f4603e39139acc3c90538a45e15 Author: Peter Hutterer Date: Thu Dec 22 10:00:15 2011 +1000 test: fix grab mode value tests for new XIGrabModeTouch This test checks that last-valid-mode + 1 returns a BadValue. With the addition of XIGrabModeTouch, that value has changed - sync it up again. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e395efc25f9fd60377f32c2bf1a9153d70908236 Merge: 2bb282cd4 fcda98c48 Author: Peter Hutterer Date: Thu Dec 22 09:29:59 2011 +1000 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into multitouch Conflicts: configure.ac dix/inpututils.c Signed-off-by: Peter Hutterer commit 2bb282cd45cb8149b39d72397ef5bbcfebca11d2 Author: Peter Hutterer Date: Wed Dec 21 14:45:27 2011 +1000 Xi: only activate the device grab if we don't already have one If the device is already grabbed, don't activate the passive grab, it screws with our event masks. Just deliver to the grabbing client instead. Reported-by: Carlos Garnacho Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 475ef5cc8339fac3696fe654ef683f92f0b0cc2c Author: Carlos Garnacho Date: Wed Dec 21 01:08:40 2011 +0100 dix: fix xi2 mask/filter when delivering grabbed events Signed-off-by: Carlos Garnacho Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 4551510f752624592f9201f73db89ac1325a234a Author: Peter Hutterer Date: Mon Dec 19 09:08:05 2011 +1000 test: add a basic test for ownership event values Signed-off-by: Peter Hutterer commit 0c661dc478b4b436a3e61066d31bc510c7a08456 Author: Peter Hutterer Date: Mon Dec 19 08:31:37 2011 +1000 test: drop printfs from protocol-eventconvert.c The test outputs are noisy enough, no need having these here too. Signed-off-by: Peter Hutterer commit 8080d785b2c1e5791312ed0975efd1b8aea58d98 Author: Peter Hutterer Date: Wed Dec 21 11:11:48 2011 +1000 dix: remove requirement for client_id be the first element Leftover code from an earlier version of GetTouchEvents. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 552de314bf0c8e4de5d002bdd1c12388c2f42283 Author: Peter Hutterer Date: Mon Dec 19 14:52:41 2011 +1000 dix: don't retrieve the syncEvents tail on an empty list An empty list points to itself but syncEvents has the list head only and is of a different format than the elements. Thus, casting it to a QdEventPtr gives us garbage. Segfaults with XTS test case Xlib13/XGrabKeyboard Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 76c11e0872dedcd360cbe02cf62bb9de3b212957 Author: Peter Hutterer Date: Fri Dec 16 12:41:08 2011 +1000 dix: button state must show the logical buttons, not physical buttons If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 press, but the state was set for button 1. Fix this, the state must be set for that button's logical mapping. https://bugzilla.gnome.org/show_bug.cgi?id=655928 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8a32c39c00789c16006de61112627722ce548be1 Author: Peter Hutterer Date: Thu Dec 15 07:59:06 2011 +1000 mi: handle screen switching on pointer emulated touch events Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 48547068b115b1f5e5f46a70110454a2175fb9a4 Author: Peter Hutterer Date: Thu Dec 15 07:57:47 2011 +1000 mi: split move to new screen logic to a helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3b1e2035cc4740711360c845cfcdff07f7b60558 Author: Daniel Stone Date: Thu Dec 15 07:52:28 2011 +1000 dix: Remove touch grabs if the grab disappears Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit cd3de8324e8908955a2e4be3000c8ffee8684c68 Author: Peter Hutterer Date: Thu Dec 15 07:48:49 2011 +1000 dix: hook up passive grabs and pointer emulated passive grabs Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5b169cb695bd450d7f64e3800f00c9237ee67f96 Author: Carlos Garnacho Date: Tue Dec 13 15:41:23 2011 +0100 Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs CreateGrab() expects the keyboard mode to be stored in grab_mode, and the pointer mode in other_device_mode, so respect this in passive XI2 grabs, and switch modes if needed. Signed-off-by: Carlos Garnacho Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4469430b109fa2da7ba3d2fadf66eca78b7156a0 Author: Peter Hutterer Date: Thu Dec 15 07:42:12 2011 +1000 Xi: add the hooks for passive touch grabs Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bb0af002dc9ad5b464dc6793aedb6d1ff65d001d Author: Peter Hutterer Date: Thu Dec 15 07:21:38 2011 +1000 Xi: handle grab accept/reject requests Consists mostly of generating an ownership event and processing it. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 209b3d613a7bed126c81daedbad6461e4391e9e6 Author: Peter Hutterer Date: Tue Dec 20 16:34:43 2011 -0800 Xi: hook up touch ownership handling Ownership changes don't get processed directly when they happen, instead the DIX submits an ownership event which goes through ProcessTouchEvents and ProcessTouchOwnershipEvents. Then on the required events are generated and sent to clients. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 1894468c2b9788efa70ef4fb5fc911711402f3a7 Author: Peter Hutterer Date: Tue Dec 20 16:33:33 2011 -0800 Xi: hook up pointer emulation for emulating touches Includes a hack for implicit grab activation, because integrating this requires a larger rewrite and I'm not sleeping enough as it is. Right now, we deliver the event and check before/after if there is an implicit grab on. If one activated, then store the event in the grab and switch the listener type to a grab listener. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 753c4dca1e42035e29fb21458a746e484ed93ca3 Author: Peter Hutterer Date: Wed Dec 14 17:04:38 2011 +1000 dix: add touch to pointer event conversion helper Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c3843f5498a849920ab68cca3557411ad8ab3454 Author: Peter Hutterer Date: Wed Dec 14 17:02:30 2011 +1000 dix: add real_event parameter to ActivatePassiveGrab For touch events with pointer emulation, the event that triggers the grab (the pointer event) is not the same as the actual event (the touch event). For replaying, we need to store the real event then. No effective changes at this point, for the current caller event and real_event are identical. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e389a19a730055d4550ff708da83c78099a516fd Author: Peter Hutterer Date: Tue Dec 20 16:32:52 2011 -0800 Process and deliver touch events Does not include pointer emulation handling. Does include partial ownership handling but not the actual processing of ownership events. Note: this commit is a retroactive commit extracted from a series of ~50 commits and may thus appear a bit more complicated than what you'd write out from scratch. Pointer processing tree is roughly: - ProcessOtherEvents - ProcessTouchEvents - DeliverTouchEvents - DeliverTouchBeginEvent|DeliverTouchEndEvent|... - DeliverOneTouchEvent Also hooks up the event history playing to the right function now. Co-authored-by: Daniel Stone Co-authored-by: Chase Douglas Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 634b0da9a83076d0e9e0fc44dc5dc77b0c368bc1 Author: Peter Hutterer Date: Thu Dec 15 07:53:19 2011 +1000 dix: set core and button state based on the touch state If a pointer-emulating touch caused a button to be logically down, set that state in the input events. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit dbfd7b37a0ba21899d8ebb7e0b324301bd466c49 Author: Peter Hutterer Date: Wed Dec 14 16:33:05 2011 +1000 Xi: make UpdateDeviceState aware of touch events Update the logical button state for pointer-emulating events. Button state must be kept separate from the ButtonClassRec to avoid clearing the button state on a touch end if there is a physical button still down. And obviously don't change the button state if we're currently replaying the event history for some client. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 593c3e2eb3da5c5fb957b68c8025dfdbe1139639 Author: Peter Hutterer Date: Wed Dec 14 16:30:05 2011 +1000 dix: add TouchResourceIsOwner helper function The first listener in the sequence is the owner of the touch sequence. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5d0260cc986e8c1f0907870b851d47fd73bb1b7d Author: Peter Hutterer Date: Wed Dec 14 16:24:17 2011 +1000 dix: add helper functions for adding/removing touch listeners The DIX will call TouchSetupListeners once for a new touch. After that the listener list remains static, with listeners only dropping out when they either reject the grab or disappear. Exception: if grabs activate they are prefixed to the listeners. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6a68f97ce6704dd2ff2a50f91acd2da72c9995bd Author: Chase Douglas Date: Wed Dec 14 16:26:04 2011 +1000 dix: add TouchGetPointerEventType helper function Returns the respective pointer event type for a given touch event type. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 8e58ce73c8b79cb86e890369d0216cdd850c52a5 Author: Daniel Stone Date: Wed Dec 14 16:53:04 2011 +1000 dix: when a window disappears, remove it from the touch sprite trace Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c18a173cf5f53778356c5e8f25ab132956f8c27d Author: Daniel Stone Date: Wed Dec 14 16:03:01 2011 +1000 dix: add helper functions to build up/verify the sprite trace Touch events' sprite trace stays the same for the duration of the touch sequence. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Chase Douglas commit 40475261eacabb79a824db1138407a9d0f9fe37f Author: Peter Hutterer Date: Wed Dec 14 15:56:05 2011 +1000 dix: add touch event history helper functions If touch client has not registered for ownership events and a grab above that client is rejected, the client needs to receive the complete event history. The history currently doesn't really do fancy overflow handling. We assume that the first TOUCH_HISTORY_SIZE events are the important ones and anything after that is dropped. If that is a problem, fix the client that takes > 100 event to decide whether to accept or reject. Events marked with TOUCH_CLIENT_ID or TOUCH_REPLAYING must not be stored in the history, they are events created by the DIX to comply with the protocol. Any such event should already be in the history anyway. A fixme in this patch: we don't have a function to actually deliver the event yet. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b274c472a5ad700aea5fe651d677e8cb34ffc976 Author: Peter Hutterer Date: Wed Oct 26 09:08:17 2011 +1000 Support XI 2.2 officially Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d2af968cb65873780a6e61342d5d3c23b9654e2a Author: Daniel Stone Date: Wed Dec 14 15:45:19 2011 +1000 Xi: allow selecting for touch events Selecting for any of XI_TouchBegin/Update/End/Ownership requires the three bits for begin/update/end to be set. Only one client at a time may select for XI_TouchBegin event Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit f3df3ad668fcd417ffb5afa3bea79a73a348bc1a Author: Peter Hutterer Date: Wed Dec 14 16:45:04 2011 +1000 dix: handle DIX-submitted touch events The DIX needs to submit touch events for e.g. TouchEnd after an acceptance/rejection. These have the TOUCH_CLIENT_ID flag set. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit fcda98c48610fd507ca0b89c6006a5497d9dc1c9 Author: Peter Hutterer Date: Fri Dec 16 12:41:08 2011 +1000 dix: button state must show the logical buttons, not physical buttons If the device is mapped 3 2 1, a click on physical button 1 sends a button 3 press, but the state was set for button 1. Fix this, the state must be set for that button's logical mapping. https://bugzilla.gnome.org/show_bug.cgi?id=655928 Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47da6b6b2c2e9245422655f94770146fb8cd430b Author: Peter Hutterer Date: Mon Dec 19 14:52:41 2011 +1000 dix: don't retrieve the syncEvents tail on an empty list An empty list points to itself but syncEvents has the list head only and is of a different format than the elements. Thus, casting it to a QdEventPtr gives us garbage. Segfaults with XTS test case Xlib13/XGrabKeyboard Introduced in 7af23259d88f4c28ed21140f82cc03b3724c06bb. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 2d34b34ed7547b829979756ccfb2cff79368d0a4 Merge: e4b4d83fa 1deede3c4 Author: Keith Packard Date: Tue Dec 20 00:23:33 2011 -0800 Merge remote-tracking branch 'jeremyhu/master' commit e4b4d83fad37bb737e25f7226dbcd15b892f9528 Merge: 4df65d247 d26cb7027 Author: Keith Packard Date: Mon Dec 19 22:36:31 2011 -0800 Merge remote-tracking branch 'idr/glx-fixes' commit 4df65d247b56c6b1b06e17a61236d6637312cdbb Author: Ville Syrjälä Date: Sun Dec 18 18:29:41 2011 +0200 dri2: Invalidate window pixmaps While a redirected window is flipped, its pixmap may still be used as and EGL image and should also get invalidated. When sending invalidate events for a window, also send the events for its pixmap. Signed-off-by: Ville Syrjälä Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e8fd23fad046877ca0ee08c1e147557756debc8e Author: Keith Packard Date: Sun Dec 18 18:29:40 2011 +0200 dri2: Invalidate DRI2 buffers for all windows with the same pixmap on swap Without this, when a compositing manager unredirects a fullscreen window which uses DRI2 and page flipping, the DRI2 buffer information for the compositing manager's output window (typically the Composite Overlay Window or root window) may become stale, resulting in all kinds of hilarity. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35452 . [Original patch by Michel Dänzer ] [Tree walk optimized version by Keith Packard ] Signed-off-by: Ville Syrjälä Signed-off-by: Keith Packard commit 6f916ffec7767eeab62132eb6575043969104c81 Author: Michel Dänzer Date: Sun Dec 18 18:29:39 2011 +0200 dri2: Always re-generate front buffer information when asked for it. Otherwise we might keep stale cached information, e.g. after the driver performed page flipping. This is part of the fix for https://bugs.freedesktop.org/show_bug.cgi?id=35452 . Signed-off-by: Michel Dänzer Reviewed-by: Ville Syrjälä Reviewed-by: Mario Kleiner Signed-off-by: Keith Packard commit 603fcb3abf155e91fd3250f4a7aa16f289506e8e Author: Rami Ylimäki Date: Sun Dec 18 18:29:38 2011 +0200 dri2: Initialize needInvalidate member of DRI2Drawable. If the client is not behaving correctly and swaps buffers before getting them, Valgrind will complain about uninitialized memory being used in DRI2InvalidateDrawable. Signed-off-by: Rami Ylimäki Reviewed-by: Ville Syrjälä Signed-off-by: Keith Packard commit 3aca8199405cff5097ee5813605ec78b5ae44a43 Author: Peter Hutterer Date: Fri Dec 16 09:15:25 2011 -0500 dmx: force -fno-strict-aliasing for xinput example Compiler warning: xinput.c:272: warning: dereferencing pointer 'e' does break strict-aliasing rules The code itself is the usual XInput client-side code: XEvent event; XDeviceMotionEvent *e = (XDeviceMotionEvent *)&event; XNextEvent(display, &event); printf("%d\n", e->type); Since XDeviceMotionEvent is not guaranteed the same size as XEvent, clients must use pointer aliasing as above when using the XNextEvent API. Disable strict aliasing for this example. Reviewed-by: Peter Hutterer Reviewed-by: Gaetan Nadon Signed-off-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 1deede3c48d5ac91f50774c79f02afc6e036614e Author: Jeremy Huddleston Date: Sat Dec 17 12:56:59 2011 -0800 kdrive/linux: Fix compilation with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast Reported-by: Arkadiusz Miśkiewicz Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit d0170d54c71fc761b8f1ae7a0e555dc2ca23cf9c Author: Jeremy Huddleston Date: Sat Dec 17 12:25:26 2011 -0800 configure.ac: Make Xephyr dependency error message more informative Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 511beddffab3c4fd43c75556132159117b6ba884 Author: Jeremy Huddleston Date: Fri Nov 25 09:45:25 2011 -0800 XQuartz: Provide in-tree implementation of strndup(3) if needed This function was added to Mac OS X 10.7, so we need to provide it for earlier releases. Signed-off-by: Jeremy Huddleston commit 9ce8463a3334f76f128bb35b541aa6e67b4e4374 Author: Daniel Stone Date: Wed Dec 14 15:41:07 2011 +1000 dix: generate touchpoints from driver-submitted data The touchpoints are generated, enqueued but not processed since we don't handle them in the event processing yet. Co-authored-by: Peter Hutterer Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bec51f5ec6575a1971ae5371a4b6d8563933032c Author: Daniel Stone Date: Wed Dec 14 15:29:48 2011 +1000 dix: add GetTouchOwnership event API No callers yet. This API is not to be used by drivers, it's an API for the DIX which will create ownership events mainly on touch acceptance/rejection. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 5c63dc6dbcbebbb19d79575a9f1ec9878e6537f1 Author: Peter Hutterer Date: Wed Dec 14 14:57:46 2011 +1000 dix: add DIX API to create touchpoints The DIX touchpoints are the ones used for event processing. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7f8127d203394cae45c3ded0d063030d7c5fdb70 Author: Peter Hutterer Date: Wed Dec 14 14:53:52 2011 +1000 dix: if we run out of space for new touch events, resize the queue The SIGIO handler forces us to drop the current touch and schedule the actual resize for later. Should not happen if the device sets up the TouchClassRec with the correct number of touchpoints. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d26cb70272a1245a7b1db639cebeddafd8ed4c40 Author: Ian Romanick Date: Thu Dec 8 12:07:38 2011 -0800 glx: use dispatch.h instead of glapioffsets.h Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 66e6037c334c2bcfe6e60d24cac83a8d6087fdd5 Author: Ian Romanick Date: Mon Dec 5 15:27:08 2011 -0800 glx: Regenerate GL API files from Mesa Adam reviewed the underlying changes in the Mesa generated scripts. Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit e8485768c1f1d9d9fb7ca9e52ff61175b7bb80e1 Author: Ian Romanick Date: Tue Dec 6 12:30:17 2011 -0800 glx: Add stub implementations of next GLX extension functions Generated code from Mesa contains dispatch for GLX_ARB_create_context and GLX_ARB_create_context_profile. Provide stub implementations of these functions so that the GLX extension will link. Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 2df539c0bc3300ea858f8bc7d52e95e67ff379b8 Author: Ian Romanick Date: Mon Dec 5 14:42:35 2011 -0800 glx: Only declare GlxExtensionInit in one header file This silences the GCC warning: In file included from singlepixswap.c:36:0: glxext.h:47:13: warning: redundant redeclaration of 'GlxExtensionInit' [-Wredundant-decls] glxserver.h:80:6: note: previous declaration of 'GlxExtensionInit' was here Signed-off-by: Ian Romanick Reviewed-by: Adam Jackson commit 758bc57ba5a89f765d83f0b169aa09e79a89bf89 Author: Peter Hutterer Date: Wed Dec 14 14:48:56 2011 +1000 dix: add helper functions to create DDX touch recs DDX touch points are the ones that keep records of the driver-submitted touchpoints. They're unaffected by the grab state and terminate on a TouchEnd submitted by the driver. The client ID assigned is server-global. Since drivers usually submit in the SIGIO handler, we cannot allocate in the these functions. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1a133eb8b1ddbe0da7c2fbf7f6a686ec4512373e Author: Peter Hutterer Date: Thu Dec 15 08:30:02 2011 +1000 xfree86: bump the input ABI for the touch changes New additions to the API: - InitTouchClassDeviceStruct - xf86PostTouchEvent Changes to the ABI: - DeviceIntRec now contains a TouchClassPtr Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 3fb258ca28850c998097b55884774cb95f476f69 Author: Daniel Stone Date: Wed Dec 14 12:46:40 2011 +1000 input: add a TouchClassRec to the devices These structs will be used to store touch-related data, events and information. Drivers must call InitTouchClassDeviceStruct to set up a multi-touch capable device. Touchpoints for the DDX and the DIX are handled separately - touchpoints submitted by the driver/DDX will be stored in the DDXTouchPointInfoRec. Once the touchpoints are processed by the DIX, new TouchPointInfoRecs are created and stored. This process is already used for pointer events with the last.valuators field. Note that this patch does not actually add the generation of touch events, only the required structs. TouchListeners are (future) recipients of touch or emulated pointer events. Each listener is in a state, depending which event they have already received. The type of listener defines how the listener got to be one. Co-authored-by: Peter Hutterer Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 098b837440e40bbc485368ec9658e12efd6ef581 Author: Daniel Stone Date: Wed Dec 14 14:41:48 2011 +1000 Add the touch input API stubs xf86PostTouchEvent is the driver API to submit touch events to the server. This API doesn't do anything yet though but now we can at least bump the API. For valuators, drivers should use the existing xf86InitValuatorAxisStruct function. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 93c2a1628a9f6e7480d834bf55c080997fd18911 Author: Peter Hutterer Date: Wed Dec 14 13:51:12 2011 +1000 Hook up the ownership events This patch applies most of the protocol conversions and the internal event type for ownership events. Note that ownership events are generated by the DIX only, they do not pass through the event queue. Co-authored-by: Daniel Stone Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c065f7b16329e30cb976359e0a807c2adaf50123 Author: Keith Packard Date: Sat Dec 17 17:22:45 2011 -0800 Version 1.11.99.2 (1.12 snapshot 2) Signed-off-by: Keith Packard commit ead968a4300c0adeff89b9886e888b6d284c75cc Author: Antoine Martin Date: Sat Dec 17 01:36:51 2011 +0700 xserver: check for elevated privileges not uid=0 This allows us to run the server as a normal user whilst still being able to use the -modulepath, -logfile and -config switches We define a xf86PrivsElevated which will do the checks and cache the result in case it is called more than once. Also renamed the paths #defines to match their new meaning. Original discussion which led to this patch can be found here: http://lists.freedesktop.org/archives/xorg-devel/2011-September/025853.html Signed-off-by: Antoine Martin Tested-by: Michal Suchanek Reviewed-by: Jamey Sharp Reviewed-by: Adam Jackson commit 3390d3fc0347947796aa245d70fefecf59b7bfe4 Author: Peter Hutterer Date: Wed Dec 14 13:21:59 2011 +1000 Xi: process raw touch events No-one can generated them yet, but if they could, we'd be processing them like there was no tomorrow. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 84db813b9db34975b5fe288a8a551bb98f0cc1c1 Author: Peter Hutterer Date: Wed Dec 14 12:45:28 2011 +1000 Hook up TouchBegin/Update/End events The are the same as device events internally but require the touch ID separately from the detail.button field (the protocol uses the detail field for the touch id). For simpler integration of pointer emulation we need to set the detail.button field while keeping the touchid around. Add the three new touch event types to the various places in the server where they need to be handled. The actual handling of the events is somewhat more complicated in most places. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 92a5862d0c120b009a688237ec7142b7c21ae272 Author: Peter Hutterer Date: Wed Dec 14 15:00:33 2011 +1000 include: add a bunch of flags for GetTouchEvent processing TOUCH_CLIENT_ID is set if the touch was generated from a client ID instead of a DDX/driver touch ID. i.e. submitted by the dix. TOUCH_END is a special flag that's required to force the touch to end. Since the protocol with grab replaying and pointer emulation is rather complex, it's quite hard to know otherwise when a touch sequence should really die. The others do what it says on the imaginary box. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 956a97487beada8cf5f354550ff779635cc64361 Author: Peter Hutterer Date: Wed Dec 14 12:19:27 2011 +1000 include: RawTouchEnd is the last event now Plus, use the actual definition from the protocol instead of the numeric values. Turns out not everyone knows the protocol event IDs by heart. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 92c6c0c1d2d6a8882ed97b0e7f2952978ee5ce82 Author: Peter Hutterer Date: Wed Dec 14 12:15:29 2011 +1000 tests: update for touch support Touch event mask must be set for all three event types. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 731b1db2fcc82c0a8afd28d7f28363c1db0a20ce Author: Peter Hutterer Date: Wed Dec 14 10:41:17 2011 +1000 Require inputproto 2.1.99.3 Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 4c825eae89063fdc2241f92ab4101ba682b5b4b7 Author: Peter Hutterer Date: Wed Nov 2 10:38:26 2011 +1000 Xi: add a FIXME All the DeepCopy stuff really needs to be shared between the init calls the drivers use and this code here. Too many bugs by not keeping the two in sync. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 0b9d2e426defabbf6df7e872e158b080a6a5e0be Author: Peter Hutterer Date: Wed Dec 14 13:21:03 2011 +1000 Xi: split ProcessOtherEvent into ProcessDeviceEvent No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 190a6f45ee7412870b3d95c5db6c1079a285bc59 Author: Peter Hutterer Date: Fri Dec 16 09:52:43 2011 +1000 dix: split positionSprite into scale_to_desktop and positionSprite For future touch points, we need positionSprite to calculate the coordinates but we don't want to actually change the cursor position for non-emulating touches. No functional changes at this point. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Chase Douglas commit 2c1d0a539c0fb1860ac89a00d1fb609f1959e1b6 Author: Gaetan Nadon Date: Fri Dec 9 07:45:02 2011 -0500 dmx: fix distcheck failure, missing compsize.h in Makefile.am which was added in commit: dmx: Build fix for -Werror=implicit-function-declaration Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit ff6d9c79c1aa502f1aef81d8063425e5fc002534 Author: Peter Hutterer Date: Thu Dec 15 10:19:26 2011 +1000 include: fix BUG_WARN_MSG for constant messages only Previous declaration required the use of a message + printf varargs. We obviously want to allow the use of just a message. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit f7ea7a324520844beaac8be7503ac50e20da5ab1 Author: Peter Hutterer Date: Wed Dec 14 10:34:19 2011 +1000 configure: split the required modules up We do the same thing for libraries and optional modules already, and it's much easier to read when one of them changes Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Gaetan Nadon Signed-off-by: Keith Packard commit 7da7aa96a0acb895e1fe57a9d3f2d093479cf2a2 Merge: b79de3f42 7528a6b88 Author: Keith Packard Date: Wed Dec 14 11:40:10 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit 4c80dc1394344dc10cffe4f757c980944312dc3d Author: Peter Hutterer Date: Wed Dec 14 10:31:23 2011 +1000 configure: split the required modules up We do the same thing for libraries and optional modules already, and it's much easier to read when one of them changes Signed-off-by: Peter Hutterer commit 7528a6b88eb32098af4369a8bd9d70a808fa6f1c Merge: f0de5e399 898d97672 Author: Peter Hutterer Date: Tue Dec 13 14:19:54 2011 +1000 Merge branch 'for-whot' of git://people.freedesktop.org/~alanc/xserver into for-keith commit f0de5e3990b70df9899b7dd17d7ee6ff7c768183 Author: Peter Hutterer Date: Sun Dec 11 07:31:43 2011 +1000 dix: add a MAXEVENTS define for the number of core + extension events Not including GenericEvents Signed-off-by: Peter Hutterer Reviewed-by: Walter Harms Reviewed-by: Chase Douglas commit adf8a0d62c0643f4c44a3b6d2e3c6c9b02532915 Author: Peter Hutterer Date: Fri Dec 9 18:38:53 2011 +1000 dix: move event filter retrieval helpers to inpututils.c No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit a03fe819506fbcbfcb299d4919d16061603fd4ec Author: Peter Hutterer Date: Fri Dec 9 18:02:49 2011 +1000 dix: switch EventIsDeliverable to take the event type only Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Chase Douglas commit 10a8c428fac0d4ff8f8a3e3487c13dd349d27ed7 Author: Peter Hutterer Date: Fri Dec 9 15:49:04 2011 +1000 dix: move storing last.valuators into a helper function Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a15abf82ddb5a209dbc30c4d12e1dc23c4adf3e4 Author: Peter Hutterer Date: Thu Dec 8 15:38:44 2011 +1000 dix: always allocate and set the grab's sync.event Allocate the memory at device creation time and always store the event, even if we're not frozen. This way we know which event triggered the grab. Since the event was never freed anyway except on device shutdown, this doesn't really change things much. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 218752bdc5d9323d1e6202e762573a925cf8a4eb Author: Peter Hutterer Date: Thu Dec 8 14:27:01 2011 +1000 input: replace GRABTYPE_* with the InputLevel enums They achieve the same thing, re-use the more generic InputLevel so we can convert to/fro easier. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit cd56bd7b3ee34a4b10eb3a57a6e94cac7512167a Author: Peter Hutterer Date: Thu Dec 8 14:59:06 2011 +1000 Add GrabIsPointerGrab and GrabIsKeyboardGrab helpers No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 47734b2ba2e1f9246fd1a3b7059ca60b0e15acb2 Author: Peter Hutterer Date: Thu Dec 8 12:00:34 2011 +1000 dix: move delivery stop condition out of event mask Previously, this was only called if there was a mask match, so even if we had a no-propagate flag set or a stopAt window specified, if no mask triggered on the window we would recurse up to the root window and eventually deliver. Move this, so that the stopAt and do-not-propagate mask is honoured. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1d01e861b69d7ca8fe2335270b8286bc115fb6e9 Author: Peter Hutterer Date: Thu Dec 8 10:22:26 2011 +1000 dix: split out core state and event state setting into helper functions no functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit fb010c543696b781a83b945f72865b7d7b75bf95 Author: Peter Hutterer Date: Wed Dec 7 14:41:18 2011 +1000 dix: move grab matching code into a helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit d253a262c2c690357a4db7e235c48ab5dd0b77f8 Author: Peter Hutterer Date: Wed Dec 7 13:57:25 2011 +1000 dix: split core grab interference check into helper function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 97d79dd740ed1ac4eb02b0d4135850f953716278 Author: Peter Hutterer Date: Wed Dec 7 13:54:28 2011 +1000 dix: compare the grab type, not the tempGrab type No functional change. To get here, GrabMatchesSecond() needs to be TRUE and for that the two grab types must be identical. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b9d6ae42b686287d7d23c2eefe2b12da98fe6ff8 Author: Peter Hutterer Date: Wed Dec 7 15:43:31 2011 +1000 dix: remove event type check Can't remember why this is there but we'll need to pass in XI2 events soon, so this check is obsolete. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 80816366aa77f1730a1b6ddabfa55a946d76d494 Author: Chase Douglas Date: Fri Nov 25 13:57:03 2011 -0800 dix: Split ActivatePassiveGrab() from CheckPassiveGrab() The changed logic means we don't require the explicit grab = NULL setting and early exit anymore. Not 100% of it, but if we see that message pop up in a log we know it's broken. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 9ee62cd8ce3c3effc3663f3d56b322385ce12fdb Author: Chase Douglas Date: Thu Nov 17 17:40:24 2011 -0800 dix: Move grab check and activation logic to CheckPassiveGrab() This is needed for future pointer emulation work. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit c53651dabc66aeb9882819a404a799a364f00a29 Author: Peter Hutterer Date: Tue Dec 6 12:57:38 2011 +1000 dix: move EventDeliveryState into a header file, we'll need it elsewhere Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 86c3137c81e924bacd919e9d65809e07afeabbff Author: Peter Hutterer Date: Tue Dec 6 12:04:11 2011 +1000 Xi: split updating button count and state into helper functions Functional change: for a button mapped to 0, the motionHintWindow is not updated to the NullWindow anymore. Before it got updated unconditionally to the button mapping. I have no idea what the practical effect of this is, but I guess it's closer to the correct behaviour: pressing a button that's logically disabled now does not disrupt the motion hint delivery. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e0f37250ffff5dcb3bc0e8cad63439995ce01a20 Author: Peter Hutterer Date: Tue Dec 6 11:40:33 2011 +1000 Xi: deduplicate button motion mask setting No functional changes Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6eff14a789341d366b3013c5aa020e959c954651 Author: Peter Hutterer Date: Mon Dec 5 18:54:30 2011 +1000 dix: deduplicate callers of DeliverDeviceEvents in DeliverGrabbedEvents No functional change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 93945b0a74aa8156a88f52b8ba77f1210042f396 Author: Peter Hutterer Date: Mon Dec 5 18:42:05 2011 +1000 dix: split grab event conversion and delivery into a helper function Effective functional change: XI2 events are checked with XACE now. DeliverOneGrabbedEvent is exported for future use by touch events. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c81cdb0862e2184f033b3933e6bacbe0809ef2c0 Author: Peter Hutterer Date: Mon Dec 5 18:29:27 2011 +1000 dix: replace conversion errors with BUG_WARN_MSG Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6368c2aa4613a7c7eb0e8afca8d41f1a9bc4fc4d Author: Peter Hutterer Date: Mon Dec 5 16:46:18 2011 +1000 dix: deduplicate event delivery code Move all the event delivery code into DeliverOneEvent, based on the InputLevel we're sending to. Functional change: we now check XI2 events with XACE too. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7e2207548b3173afc9accb5ccd532c181a7b94ed Author: Chase Douglas Date: Wed Dec 7 20:32:28 2011 +1000 include: Add an InputLevel enum Currently unused, but will be in the future. Signed-off-by: Chase Douglas Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 898d97672907a8074031d0d1038cd44bb5caf40d Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 verify_internal_event: preserve constness of data pointer All we're using it for is ErrorF calls, so make it a const char * to stop gcc from warning: inpututils.c: In function 'verify_internal_event': inpututils.c:629:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 79d09647d878e66721a778979a9eb1f4bba5f8d6 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Use const cast in BitIsOn macro to avoid angering gcc Fixes gcc warnings such as: inpututils.c: In function 'valuator_mask_isset': inpututils.c:498:5: warning: cast discards qualifiers from pointer target type inpututils.c: In function 'CountBits': inpututils.c:613:9: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 99dfe9b1de09cb481e95bd4c45dcf7493480798b Author: Alan Coopersmith Date: Mon Dec 12 16:49:32 2011 -0800 Fix deconstifying cast warning in xi2_get_type Since we're just comparing values in the struct, cast it to a const xGenericEvent * to clear gcc warning of: events.c: In function 'xi2_get_type': events.c:193:5: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit dd80156bf05c9eb4000d0981e00d0d9fb69a94f6 Author: Alan Coopersmith Date: Wed Dec 7 22:58:45 2011 -0800 Include client name if available in PrintDeviceGrabInfo Also adds missing newline to first line of output. Before patch: [3581472.414] (II) Printing all currently active device grabs: [3581472.414] Active grab 0x1800000 (core) on device 'Virtual core pointer' (2): client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x0 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] Active grab 0x1800000 (core) on device 'Virtual core keyboard' (3) : client pid 26174 uid 0 gid 10 [3581472.415] at 3581469139 (from active grab) (device thawed, state 1) [3581472.415] core event mask 0x3 [3581472.415] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581472.415] (II) End list of active device grabs After patch: [3581736.601] (II) Printing all currently active device grabs: [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core pointer' (2): [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x0 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] Active grab 0x1600000 (core) on device 'Virtual core keyboard' (3) : [3581736.601] client pid 26741 /usr/bin/xscreensaver -nosplash [3581736.601] at 3581735000 (from active grab) (device thawed, state 1) [3581736.601] core event mask 0x3 [3581736.601] owner-events true, kb 1 ptr 1, confine 0, cursor 0x0 [3581736.601] (II) End list of active device grabs Signed-off-by: Alan Coopersmith Reviewed-by: Rami Ylimäki commit b79de3f42ff8412dcabf2f2a805cbcbd1c6907c3 Author: Alan Coopersmith Date: Mon Dec 12 16:49:35 2011 -0800 xf86 parser: convert Error to a varargs macro to clear gcc format warnings Previously it always passed a format string with exactly one argument, using NULL when the format string needed none. Now pass the right number of arguments to clear gcc warnings of 'too many arguments for format'. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 7801b3dcd6501e3de93a6d2cee93b2593806e922 Author: Alan Coopersmith Date: Mon Dec 12 16:49:35 2011 -0800 Add some printf format attributes suggested by gcc Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit f68df9dfd2c7ca03c24aaa0a895b7191ecb81e85 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 xf86Priv.h: Add some noreturn attributes suggested by gcc Both functions call exit() at the end and have no other return path. Also correct comment/heading to reflect commit 6450f6ca7ee0 moving DoShowOptions into xf86Configure.c. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 3823eedf3c124d3a20360480ba349bea72de3069 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Remove duplicate declarations of KdAdd*Driver in kdrive.h Clears gcc warnings in every file that includes kdrive.h: kdrive.h:507:1: warning: redundant redeclaration of 'KdAddPointerDriver' kdrive.h:225:6: note: previous declaration of 'KdAddPointerDriver' was here kdrive.h:510:1: warning: redundant redeclaration of 'KdAddKeyboardDriver' kdrive.h:284:6: note: previous declaration of 'KdAddKeyboardDriver' was here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 471e5373b6f87336dac3b9de9b3852f63a2b10dc Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Remove duplicate declaration of xf86ValidateModesFlags in xf86Modes.h Clears gcc warning in every file that includes xf86Modes.h: xf86Modes.h:102:1: warning: redundant redeclaration of 'xf86ValidateModesFlags' xf86Modes.h:72:1: note: previous declaration of 'xf86ValidateModesFlags' was here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 41dd7cf673e47ab74c5065b8dbf268b2e5facb64 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 _XkbFilterDeviceBtn: move variable declarations to match usage scope The main body of this function is an if { } else if { } pair of blocks. Previously there was int button at the top level scope which is used only in the first block, and a redeclaration of int button inside the second block. Since there's no overlap in the code paths for the two uses of button, move the one from the outer block into the first block to help the programmer more quickly determine they are unrelated usages, and to silence the gcc warning of: xkbActions.c: In function '_XkbFilterDeviceBtn': xkbActions.c:999:6: warning: declaration of 'button' shadows a previous local xkbActions.c:955:6: warning: shadowed declaration is here For consistency, move DeviceIntPtr dev declarations as well that are used in the same way. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit d8eb9b5faa2d2c9350bdaffef8749a9cac3c87b8 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 XkbFindSrvLedInfo: remove extraneous name-clashing sli variable Variable is already defined outside the outer if statement, and there's no need to redefine inside the if statement. No point in setting sli before if (dev->kbdfeed->xkb_sli==NULL) check - if check is true, we immediately set it, if check is false, we immediately return without further reference or use of it. The one thing we do with it inside the inner if statement is store an allocation in it for a brief moment before writing to the final destination, which is immediately returned to the caller. In short, there's no benefit to the variable at all in this block, it just gives the optimizer more code to figure out how to omit. Fixes gcc warning: xkbLEDs.c: In function 'XkbFindSrvLedInfo': xkbLEDs.c:683:19: warning: declaration of 'sli' shadows a previous local xkbLEDs.c:679:18: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 9edfa47bd58cd318d57d0f114714fd146be35a79 Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 KdParseFindNext: Constify delim argument It's only used as input to strchr to find the delimiters, never written to. Clears a bunch of gcc warnings of the form: kdrive.c:323:2: warning: passing argument 2 of 'KdParseFindNext' discards qualifiers from pointer target type kdrive.c:261:1: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit ff64ad6c74a3e14ca34bacb8866bdbd2262bddff Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 Convert KdDoSwitchCmd to use asprintf instead of malloc/strcat/etc. Also fix the reason argument to be const char * to clear several gcc warnings of: kdrive.c:151:2: warning: passing argument 1 of 'KdDoSwitchCmd' discards qualifiers from pointer target type kdrive.c:116:1: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 5bc590bde23ce1c57015b1d9e1cc63189c37448e Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 DoShowOptions: preserve constness of options list as we walk it Since all we do with the option list is walk down the list printing the names, there's no need to cast away its constness. Clears gcc warning: xf86Configure.c: In function 'DoShowOptions': xf86Configure.c:781:4: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 71efd868282d47a6db405a16de18ac322926962b Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 x86emu: constify debug strings Strings are all pointers to literal constants, just used as input to printf calls when debugging is enabled. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit d5a5eece670dee963765eab1431c21525c16d9ee Author: Alan Coopersmith Date: Mon Dec 12 16:49:34 2011 -0800 CompareISOLatin1Lowered: constify arguments Allows callers to avoid deconstifying arguments when calling, fixing gcc warning: filter.c: In function 'PictureGetFilterId': filter.c:59:2: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 83ac9502ea9f1dedf3a8002745668af16bb1f2af Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 xdmcp.c: fix three small const warnings xdmcp.c:63:36: warning: initialization discards qualifiers from pointer target type xdmcp.c: In function 'XdmcpRegisterConnection': xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c:482:8: warning: cast discards qualifiers from pointer target type xdmcp.c: In function 'get_mcast_options': xdmcp.c:1596:21: warning: initialization discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 3839d1480877818f3ccc04e25237d853bab210c3 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 LockServer: store path to LOCKDIR literal string in a const char * And instead of initializing to NULL, then resetting to LOCKDIR almost immediately (before ever using the NULL value), skip directly to setting it to LOCKDIR. tmppath variable is only used as input for generating the path name via calls to strlen, sprintf, etc. Fixes gcc warning of: utils.c: In function 'LockServer': utils.c:259:11: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit af4113bfeb1d155f5f037c3492e50513336fa4a7 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 WriteToClient: preserve constness of buf while extracting length value Fixes gcc warning: io.c: In function 'WriteToClient': io.c:826:6: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 2c9800f91559fbb12dd276cf0536631104092f67 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 OsInit: store "/dev/null" in a const char * It's only passed as the input side of a strcpy and as the filename to fopen, so doesn't need to be non-const. Fixes gcc warning: osinit.c: In function 'OsInit': osinit.c:154:28: warning: initialization discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 50b1097643934c8caec9530e5eda6ed6534aaf61 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Constify the reason string throughout the authorization check framework Almost all of the places the string is assigned point to a literal string constant, so use const char * for those, and const char ** for function calls that return it via an argument. Fortunately the top level function, ClientAuthorized, which returns the string as its return value is called from only one place, ProcEstablishConnection. ProcEstablishConnection stores either that return value or a string literal in char *reason. It only uses reason as an argument to SendConnSetup. SendConnSetup passes the reason argument to strlen & WriteToClient, both of which already have const qualifiers on their args. Thus added const to the reason variable in ProcEstablishConnection and the reason argument to SendConnSetup. Fixes gcc warnings: dispatch.c: In function 'ProcEstablishConnection': dispatch.c:3711:9: warning: assignment discards qualifiers from pointer target type auth.c: In function 'CheckAuthorization': auth.c:218:14: warning: assignment discards qualifiers from pointer target type auth.c:220:20: warning: assignment discards qualifiers from pointer target type connection.c: In function 'ClientAuthorized': connection.c:683:3: warning: return discards qualifiers from pointer target type mitauth.c: In function 'MitCheckCookie': mitauth.c:88:13: warning: assignment discards qualifiers from pointer target type xdmauth.c:259:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:270:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:277:11: warning: assignment discards qualifiers from pointer target type xdmauth.c:293:15: warning: assignment discards qualifiers from pointer target type xdmauth.c:313:14: warning: assignment discards qualifiers from pointer target type xdmauth.c:322:11: warning: assignment discards qualifiers from pointer target type rpcauth.c: In function 'SecureRPCCheck': rpcauth.c:136:10: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 99998196017ef38ec88459b50605aa20f628788b Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 Constify string for authorization protocol names gcc was warning from storing string constants in a char *name field: auth.c:64:1: warning: initialization discards qualifiers from pointer target type auth.c:72:1: warning: initialization discards qualifiers from pointer target type auth.c:81:1: warning: initialization discards qualifiers from pointer target type Making the field const requires changing AuthorizationFromID to take a const char ** pointer for the name argument which it sets to point to the matching name entry. Changing that argument requires changing its sole caller in the security extension to pass the address of a const char * variable to it, which it can do, since the only thing it does with the returned name is to pass it back to the RemoveAuthorization function that already expects a const char *name. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 01834e99e461e2a8354f3b4aef7f14c5e83fa255 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 os/access.c: replace acmp & acopy macros with memcmp & memcpy calls No need to cast to char * now that all supported platforms use C89-standard void * argument types, so just drop the casts from acmp & acopy macros, which clears the gcc warnings for places const pointers were cast non-const: access.c: In function 'DefineSelf': access.c:786:3: warning: cast discards qualifiers from pointer target type access.c:795:6: warning: cast discards qualifiers from pointer target type access.c: In function 'NewHost': access.c:1293:9: warning: cast discards qualifiers from pointer target type access.c:1298:6: warning: cast discards qualifiers from pointer target type access.c:1309:5: warning: cast discards qualifiers from pointer target type Without the casts, acmp & acopy are just a funny way to write memcmp & memmove, so drop the macros and inline the calls, taking care to swap the first two arguments to memmove since it had swapped them. Since all the calls to memmove end up being to non-overlapping memory (mostly copying from an existing pointer to a newly allocated one), replace those with memcpy. And finally, don't actually call memcpy to copy 0 bytes from one place to another, since that's just a waste of a perfectly good function call. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 020d83d361b0ab54ac962e97b12935be785f9a67 Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 xres.c: Preserve constness of string returned by LookupResourceName MakeAtom now accepts a const char * so we don't need to cast down to char * anymore. Fixes gcc warning of: xres.c: In function 'ProcXResQueryClientResources': xres.c:155:6: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 2ddae8f0bd2a9ce0cd15bf3848393af29e615acf Author: Alan Coopersmith Date: Mon Dec 12 16:49:33 2011 -0800 constify strings in resource name registry LookupResourceName already returned a const char *, so just needed to change the variable we're storing the list in to be a const char ** and then add const to the name argument to RegisterResourceName (which just stores name in the array) and CreateNewResourceType (which just passes name to RegisterResourceName). Clears a bunch of gcc warnings of the form: registry.c:319:5: warning: passing argument 2 of 'RegisterResourceName' discards qualifiers from pointer target type registry.c:200:1: note: expected 'char *' but argument is of type 'const char *' and from all the extensions: damageext.c: In function 'DamageExtensionInit': damageext.c:490:5: warning: passing argument 2 of 'CreateNewResourceType' discards qualifiers from pointer target type ../include/resource.h:159:26: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit 424dbde891486ad6a6c00c61a334031ff18f5556 Author: Alan Coopersmith Date: Fri Dec 9 10:08:55 2011 -0800 CheckForEmptyMask does not need to declare int n twice Just use the existing n variable again in the ARGB_CURSOR loop instead of creating another one. Fixes gcc -Wshadow warning: cursor.c: In function 'CheckForEmptyMask': cursor.c:155:6: warning: declaration of 'n' shadows a previous local cursor.c:146:9: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer commit b2bc38e4a553c29f49a0284333b34b4d6c8a8c12 Author: Alan Coopersmith Date: Sat Dec 10 10:01:18 2011 -0800 Even more correctly free config file names If we didn't go into the if (!autoconfig) { } block, the filename, dirname, and sysdirname pointers were never initialized, but we freed them outside the block, leading to potential memory corruption. Move the frees inside the block where they're initialized to avoid this. To avoid similar problems, move the declarations of the variables that are only used in this block inside the block. Regression introduced by commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 Found by gcc warning: xf86Config.c: In function 'xf86HandleConfigFile': xf86Config.c:2303:11: warning: 'filename' may be used uninitialized in this function xf86Config.c:2303:22: warning: 'dirname' may be used uninitialized in this function xf86Config.c:2303:32: warning: 'sysdirname' may be used uninitialized in this function Signed-off-by: Alan Coopersmith Reviewed-by: Paulo Zanoni commit 33d6e6743d86324c2078f156991b16ac4f2593fc Author: Alan Coopersmith Date: Wed Dec 7 19:06:05 2011 -0800 xf86RegisterRootWindowProperty is confused about xnfcalloc It will never return NULL, so don't try to handle a NULL condition, since that just confuses programmers and static analyzers. It uses calloc, so all the allocated memory is cleared, so there's no point looping over the memory to manually initialize it NULL. And just because it's annoying, it doesn't need to be the only place in this file to do if (NULL==...) instead of if (... == NULL). Signed-off-by: Alan Coopersmith Reviewed-by: Paulo Zanoni commit e5aa00989cda9ebd18063c5e955235123ad37b88 Author: Peter Hutterer Date: Wed Dec 7 14:14:10 2011 +1000 Change GetXI2/XI/CoreType to just take a type argument Avoids the dummy-event dance if we have an event type and need to get the matching XI2 type. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6cc0e6a0afa6a87802767d484aa4e68fa935d3eb Author: Peter Hutterer Date: Fri Oct 28 12:55:55 2011 +1000 include: add GetXI2MaskByte and GetXI2EventFilterMask to headers This is needed for touch event processing. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 372a6f10dc2d74d2d179e8b92449e9b8636a99ef Author: Alan Coopersmith Date: Thu Dec 8 21:52:07 2011 -0800 Change disable_clientpointer return type to void It doesn't return anything, nor does it's caller expect it to. Fixes Solaris Studio compiler error: "xichangehierarchy.c", line 214: Function has no return statement : disable_clientpointer Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard commit 522f8bcc0360d6a117e929a004bc956ab92037e9 Merge: 6369b5966 2abe83df6 Author: Keith Packard Date: Thu Dec 8 20:57:26 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit 2abe83df686ed64c4f4df711ac3c1fd12131c2e4 Author: Peter Hutterer Date: Mon Dec 5 14:02:51 2011 +1000 include: add BUG_WARN_MSG for custom error message on bug condition __BUG_WARN_MSG is a simple helper to enable call with and without varargs. I couldn't find a way to otherwise do this without getting gcc warnings. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4fc797f3756611a97767f407e1af0b6a7cf2f1d9 Author: Peter Hutterer Date: Fri Nov 11 16:25:30 2011 +1000 xfree86: include xorg-config.h from xaalocal.h Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 8c9589c71d47f287588314d77ddbfcc22cd04c8a Author: Peter Hutterer Date: Mon Dec 5 11:55:58 2011 +1000 Xi: rename "state" to "corestate" in ProcessDeviceEvents 'state' is shadowed by the XKB 'state' as well (which feeds into the event too), so rename this one to clarify that this is the core event state only. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 631516a4aa9858874ee197444cd93d91b97a1089 Author: Peter Hutterer Date: Fri Dec 2 15:47:58 2011 +1000 Xi: check button mapping value _before_ assigning it Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit a1304d6cb69301899c3c8450d6bf3e68573599df Author: Peter Hutterer Date: Mon Dec 5 11:26:30 2011 +1000 Xi: skip superfluous cast Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 1ab50be938524dcd4a9e56d27e3b96a27c2db2c0 Author: Peter Hutterer Date: Wed Nov 30 09:06:06 2011 +1000 xfixes: don't dereference a NULL cursor If the new cursor is the NULL cursor, don't dereference it and use zeros instead. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit d2ebbcdaf6b13d70eee704b1764ff349e1be22a0 Author: Peter Hutterer Date: Tue Nov 29 16:15:37 2011 +1000 Xi: when removing a device, reset ClientPointers where needed if a client had the to-be-removed device as ClientPointer, reset to NULL. Fixes #43165 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 27425f07b29e0ddaa782345c1899273ca742891e Author: Peter Hutterer Date: Wed Nov 9 14:45:02 2011 +1000 dix: use BUG_WARN for input mask size issues Yes, we're likely corrupting memory here but really this is unlikely to be triggered other than a real bug in the server. In which case a stacktrace is going to be more useful than any silent error handling. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 9b570ecbda954227c89938ee6f94b9efd192d3c6 Author: Peter Hutterer Date: Fri Dec 9 10:48:05 2011 +1000 xfree86: bump the input ABI The last few patches broke the ABI, bump it for convenience. Signed-off-by: Peter Hutterer commit 86bb3781b336c09e4279136ed81974de5acdba7f Author: Peter Hutterer Date: Fri Nov 4 11:29:01 2011 +1000 input: swap the server over to use the XI2mask struct Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b8b90cd1610331ff12fa3f70bf372670af7795ec Author: Peter Hutterer Date: Thu Nov 3 13:39:59 2011 +1000 Add a new XI2Mask struct and a few helper functions. The current XI2 mask handling is handy for copying (fixed size arrays) but a pain to deal with otherwise. Add a struct for XI2 masks and the required accessors. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4bc2761ad5ec2d0668aec639780ffb136605fbc8 Author: Peter Hutterer Date: Fri Nov 4 14:16:37 2011 +1000 dix: switch the dev->deviceGrab.activeGrab from GrabRec to GrabPtr This breaks the input ABI. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b601ea769f1b8a4d7f19e9d4a13541c78e865fe5 Author: Peter Hutterer Date: Fri Nov 4 10:47:27 2011 +1000 dix: allocate temporary grabs on the heap Once grabs start having nested memory locations, we can't just use the GrabRec on the stack anymore, we need to alloc/copy/free the grabs. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b0e9e2e32616d09c30a02b9d0ae9db0b13e150d1 Author: Peter Hutterer Date: Fri Nov 4 10:44:31 2011 +1000 dix: add CopyGrab() function Not really needed at this point, but will be once touch support is added. Since grabs are now expected to be allocated/freed with AllocGrab and FreeGrab, CopyGrab must increase the refcount and duplicate the modifier masks. Until the callers are switched to use FreeGrab, this introduces memleaks. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 347f377f3b3f8c9d230d6309ec8ae92aa86d78b7 Author: Peter Hutterer Date: Thu Nov 3 16:12:09 2011 +1000 dix: add AllocGrab helper function Not needed since the GrabRec is a self-contained struct but will be needed for the xi2 input mask rework. FreeGrab already exists, make it available to other callers. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7af23259d88f4c28ed21140f82cc03b3724c06bb Author: Peter Hutterer Date: Mon Nov 21 11:41:12 2011 -0800 dix: switch the syncEvent queue to a struct list No effective functionality change, just cleanup to make this code slightly more sane. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6369b59668613e51131857fbaeaa393a65a73048 Author: Gaetan Nadon Date: Thu Dec 1 16:24:32 2011 -0500 test: update .gitignore with xfree86 and sort alphabetically Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 3ab8ee32470f7cf1223e04238bb8c5f74ed52fc3 Merge: 22a666f99 98c4a888a Author: Keith Packard Date: Wed Dec 7 12:42:17 2011 -0800 Merge remote-tracking branch 'airlied/reviewed-fixes' commit 22a666f9952feb7248e9bb2faf777edaaac8175f Merge: 3824f558c e89b0324d Author: Keith Packard Date: Wed Dec 7 12:27:23 2011 -0800 Merge remote-tracking branch 'alanc/master' commit 3824f558cc2ee051da8314c7bf08b8647b44e84a Author: Keith Packard Date: Wed Dec 7 12:13:37 2011 -0800 hw/xfree86: fix segfault in config parser when config dir is missing Treat a scandir error from a missing (or unusable) directory return as if it simply returned no files at all, which is what we want. cc: Paulo Zanoni Signed-off-by: Keith Packard commit 98c4a888a4428789386c7c47cecc81933b5999ba Author: Dave Airlie Date: Mon Nov 28 16:37:59 2011 +0000 kdrive: drop screen crossing code. The only kdrive server we probably care about anymore is Xephyr, and this screen enable/disable code totally breaks it in multi-screen mode. When you are in one screen the other stops updating. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=757457 Signed-off-by: Dave Airlie Reviewed-by: Peter Hutterer commit 8d3731a811e33e263920dd7c8ec63d02968cb56e Author: Dave Airlie Date: Thu Oct 20 10:48:26 2011 +0100 hal: free tmp_val in one missing case Pointed out by coverity scan. Signed-off-by: Dave Airlie Reviewed-by: Daniel Stone commit 41229392b790f30a0f0ef1f4ed95647c5bca4001 Author: Dave Airlie Date: Thu Oct 20 11:00:43 2011 +0100 xv: test correct number of requests. (v2) Pointed out by coverity. v2: fix swapped as well, as pointed out by Alan Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith commit 1049139499d9132a20cd6d4d156fe9da9cddb6c2 Author: Dave Airlie Date: Wed Oct 19 16:57:13 2011 +0100 xaa: avoid possible freed pointer reuse in epilogue If the pGCPriv->flags == 2, then we try to assign the freed pGCPriv->XAAOps avoid this by clearing the flags in to be destroyed pGCPriv. Reported by coverity. Signed-off-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit 682c09a2cedd234b005334cc01247d859dd7f26a Author: Dave Airlie Date: Wed Oct 19 16:22:31 2011 +0100 Xi: avoid overrun of callback array. This code had an off-by-one and would allow writing one past the end of the callbacks array. Pointed out by coverity. Signed-off-by: Dave Airlie Reviewed-by: Jeremy Huddleston commit b62dc4fcbcffd10de16650bee284702c8608bb60 Author: Dave Airlie Date: Wed Oct 19 16:21:26 2011 +0100 xext: don't free uninitialised pointer when malloc fails. (v2) Initialise the pAttr->values to values so if the values allocation fails it just ends up as free(NULL). Pointed out by coverity. v2: use Alan's suggestion. Signed-off-by: Dave Airlie Reviewed-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 22605effd188436629a0dbc688666549473741e4 Author: Adam Jackson Date: Thu Apr 28 13:34:28 2011 +1000 fbdevhw: iterate over all modes that match a mode. (v3) So on RHEL5 anaconda sets an xorg.conf with a fixed 800x600 mode in it, we run radeonfb and fbdev since ati won't work in userspace due to domain issues in the older codebase. On certain pseries blades the built-in KVM can't accept an 800x600-43 mode, it requires the 800x600-60 mode, so we have to have the kernel radeonfb driver reject the 800x600-43 mode when it sees it. However then fbdev doesn't try any of the other 800x600 modes in the modelist, and we end up getting a default 640x480 mode we don't want. This patch changes the mode validation loop to continue on with the other modes that match to find one that works. v2: move code around to avoid extra loop, after comment from Jamey. v3: move loop setup back into loop as per Jeremy's review. Signed-off-by: Dave Airlie Reviewed-by: Jamey Sharp Reviewed-by: Jeremy Huddleston commit fac464e310b82fadcedf790798d1016c4805640b Author: Peter Hutterer Date: Fri Dec 2 08:52:53 2011 +1000 include: rename "foos" to "list_of_foos" in the struct list documentation Makes things a little easier to read. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 7dfe8c32a96d3f96c8aaeb2802f5b122e381a1e4 Author: Peter Hutterer Date: Fri Dec 2 08:51:24 2011 +1000 include: update struct list documentation to use one set of structs only The example at the top of the file used a struct bar and a list of struct foos. Use those two throughout instead of a different struct foo for the examples and for the API documentation. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 18539c89eca8f6e272ead2b631365da530065ae7 Author: Peter Hutterer Date: Fri Dec 2 08:51:04 2011 +1000 include: a new list element does not need initialization, state so Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 58dc73314b6508121ca094bbcf00612fe19ed69f Author: Peter Hutterer Date: Fri Dec 2 08:43:45 2011 +1000 include: point to the tests in list.c as examples Even with the documentation, the list.c tests are the best examples. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit c8e451a8e719ba432bcfa8976774c07307087809 Author: Peter Hutterer Date: Thu Dec 1 14:12:11 2011 +1000 include: add list_last_entry to get the tail of a list Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 6acebf9e1298939593b942ec91ae9ec9e74faa19 Author: Peter Hutterer Date: Thu Dec 1 13:35:50 2011 +1000 include: add list_append() The existing list_add() prepends to the list, but in some cases we need the list ordered in the way we append the elements. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit e89b0324da89ba5c0ba64af1ef46a12b7f55f879 Author: Gaetan Nadon Date: Sat Dec 3 21:23:51 2011 -0500 autoconf: the minimum required level for autoconf is 2.60 The toolchain requirements are documented here: http://www.x.org/wiki/ModularDevelopersGuide#Required_Tools Note that autoconf features only found in versions later than 2.60 must not be used. Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 427cb53fddf0c517d1fd1025a87b1104735edd2a Author: Gaetan Nadon Date: Sat Dec 3 21:23:21 2011 -0500 autoconf: remove redundant AC_PROG_MAKE_SET Already included during Automake initialization. After the patch, no change: configure:3893: checking whether make sets $(MAKE) configure:3915: result: yes Signed-off-by: Gaetan Nadon Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit c19c55a93ab1bc6db56075ca34d6e1c3f522f622 Author: Alan Coopersmith Date: Fri Dec 2 00:09:07 2011 -0800 Fix builds of Xnest & Xephyr with Solaris Studio compilers Required in order to build with Studio cc now that xorg-macros is setting -errwarn=E_FUNC_HAS_NO_RETURN_STMT since a bug in the Solaris system headers causes the noreturn attribute to not be correctly applied to the exit() prototype in when building with Studio instead of gcc. Otherwise compiler exits with errors: "Display.c", line 65: Function has no return statement : x_io_error_handler "hostx.c", line 341: Function has no return statement : x_io_error_handler Uses Studio-specific pragma instead of adding another exit() prototype with a noreturn attribute to avoid causing gcc to warn about having a redundant prototype for the exit() function. Signed-off-by: Alan Coopersmith Reviewed-by: Mikhail Gusarov commit e4dcf580f007d6adcf5b0c639865d7aaab1a319d Author: Alan Coopersmith Date: Thu Dec 1 23:45:42 2011 -0800 LoaderOpen returns either a valid pointer or NULL, so don't check for < 0 Fixes Sun cc warning that was recently elevated to error by the stricter default CFLAGS changes to xorg-macros: "loadmod.c", line 914: improper pointer/integer combination: op "<" Should have been changed when commit ab7f057ce9df4e905b12 changed the LoaderOpen return type from int to void *. Changes log message when file is found but dlopen() fails from: (EE) LoadModule: Module dbe does not have a dbeModuleData data object. (EE) Failed to load module "dbe" (invalid module, 0) to: (EE) Failed to load module "dbe" (loader failed, 7) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit 8b6a75009746db4b8e2e180210ac097e35136bcd Author: Alan Coopersmith Date: Wed Nov 30 23:01:34 2011 -0800 Fix gcc warnings about redundant declarations of fallback functions Ensure ffs, strndup, strlcat, etc. aren't defined by our headers if they're already defined in the system headers. This does export the HAVE_FFS, HAVE_STRNDUP, etc. definitions to drivers, but if you built the Xserver with a libc that had those, and then build the drivers with a less capable libc, you're going to have problems anyway, and this should solve some reported problems with conflicts between our strndup definition and gcc magic for it. Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson commit d829a7c5cb42c979b58f3547136df5b05d906423 Author: Alan Coopersmith Date: Wed Nov 30 22:20:09 2011 -0800 Move to autoconf standard function name checks & defines Replace multiple methods of checking for functions with AC_CHECK_FUNCS Replace multiple methods of selecting fallback funcs with AC_REPLACE_FUNCS Replace HAS_* and NEED_* #defines with autogenerated HAVE_* Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Reviewed-by: Mikhail Gusarov Reviewed-by: Gaetan Nadon commit 4be68b03128e958d2a6dc1b7feb3587329b9561b Author: Alan Coopersmith Date: Wed Nov 30 19:39:51 2011 -0800 Remove unused function checks from configure.ac & include/*.h.in The code that used getisax to check for MMX support was moved to pixman and removed from the X server by commit eb2d7fe02f9cbc. The code that used HAVE_MKSTEMP was deleted by the Xprint removal in commit 1c8bd318fbaf. All alloca calls were removed by the patch series end in commit 5e363500c8, and used custom X checks instead of the autoconf HAVE_ALLOCA anyway. I can find no record of HAVE_GETUID, HAVE_GETEUID, HAVE_LINK, HAVE_MEMMOVE, HAVE_MEMSET, HAVE_STRCHR, HAVE_STRRCHR, HAVE_GETOPT, HAVE_GETOPT_LONG, HAVE_DOPRNT, or HAVE_VPRINTF ever being used, and the calls to those functions are not wrapped in #ifdefs. (Most of those are in our baseline requirements of C89 & Unix98 anyway.) Signed-off-by: Alan Coopersmith Reviewed-by: Adam Jackson Reviewed-by: Mikhail Gusarov Reviewed-by: Gaetan Nadon commit 84207def93e4489df8dca8e044ce544be8a3f845 Author: Alan Coopersmith Date: Mon Nov 28 20:38:58 2011 -0800 Disable building of tests requiring DDX functions when Xorg is not built Some test cases require linking with some sort of DDX - ideally we'd have a stub ddx for testing, but for now, since we link with the Xorg ddx, disable those tests when configured with --disable-xorg Fixes https://bugs.freedesktop.org/show_bug.cgi?id=43320 Signed-off-by: Alan Coopersmith Reviewed-by: Dan Nicholson Reviewed-by: Jeremy Huddleston commit fd976e4051e15ab2d01ec0bf89ff26926d4ed04e Author: Gaetan Nadon Date: Thu Dec 1 16:24:12 2011 -0500 config: conftest needs an include directive to locate X11/Xfuncproto.h The compiler option -fvisibility=hidden is erroneously missing due to a faulty configuration test. The gcc command is unable to locate X11/Xfuncproto.h unless the build occurs on a system where X11 development headers are installed. configure:21294: checking for symbol visibility support configure:21323: gcc -std=gnu99 -c -g -O2 -fvisibility=hidden conftest.c >&5 conftest.c:144:28: fatal error: X11/Xfuncproto.h: No such file or directory The solution is to add an include directive to obtain the location of X11/Xfuncproto.h which may or may not be the system installed headers. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit feebf6746374aa04b12e9e3e51313a3a82c03530 Author: Alan Coopersmith Date: Wed Nov 23 00:30:02 2011 -0800 Limit the number of screens Xvfb will attempt to allocate memory for Commit f9e3a2955d2ca7 removing the MAXSCREEN limit left the screen number too unlimited, and allowed any positive int for a screen number: Xvfb :1 -screen 2147483647 1024x1024x8 Fatal server error: Not enough memory for screen 2147483647 Found by Parfait 0.3.7: Error: Integer overflow (CWE 190) Integer parameter of memory allocation function realloc() may overflow due to multiplication with constant value 1112 at line 293 of hw/vfb/InitOutput.c in function 'ddxProcessArgument'. Since the X11 connection setup only has a CARD8 for number of SCREENS, limit to 255 screens, which is also low enough to avoid overflow on the sizeof(*vfbScreens) * (screenNum + 1) calculation for realloc. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp commit fb22a408c69a84f81905147de9e82cf66ffb6eb2 Author: Keith Packard Date: Tue Nov 8 10:13:15 2011 -0800 Save major/minor opcodes in ClientRec for RecordAReply The record extension needs the major and minor opcodes in the reply hook, but the request buffer may have been freed by the time the hook is invoked. Saving the request major and minor codes as the request is executed avoids fetching from the defunct request buffer. This patch also eliminates the public MinorOpcodeOfRequest function, inlining it into Dispatch. Usages of that function have been replaced with direct access to the new ClientRec field. Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp commit 05f09354a30a4f5edd421220e1aa97be754c71bb Merge: 3197b773c 08ec4da6a Author: Keith Packard Date: Thu Dec 1 14:44:52 2011 +0000 Merge remote-tracking branch 'jcristau/for-keith' commit 3197b773c81e58cd4aa412eccaee49526012ed6f Merge: 2dc5ba4a1 dfcec1d3f Author: Keith Packard Date: Thu Dec 1 14:36:58 2011 +0000 Merge remote-tracking branch 'whot/for-keith' commit 2dc5ba4a1b127e3ed286718ab0a6c20438361192 Author: Matt Turner Date: Tue Nov 29 23:52:19 2011 -0500 Remove another if (E != NULL) check around free(E) I wonder if there are any other patterns we haven't seen yet? Reviewed-by: Jamey Sharp Signed-off-by: Matt Turner Signed-off-by: Keith Packard commit dfcec1d3f9d7bac5cde9eb034341428ee0ad3728 Author: Peter Hutterer Date: Fri Nov 11 08:55:14 2011 +1000 test: remove unneeded printf statements from misc.c Leftover from debugging, is not really needeed in a test. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit 9c38422fc4cf853c3104fada2a3851c79df2a66f Author: Peter Hutterer Date: Wed Nov 9 14:37:26 2011 +1000 include: add BUG_WARN macro for internal bug cases. There are plenty of cases that can only be triggered by a real bug in the server and doing the ErrorF dance manually everywhere is a tad painful and the error message is usually used only to find the spot in the file anyway. Plus, reading BUG_WARN somewhere is a good indicator to the casual reader that this isn't intended behaviour. Note that this is intentionally different to the BUG_ON behaviour on the kernel, we do not FatalError the server. It's just a warning + stacktrace. If the bug is really fatal, call FatalError. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Alan Coopersmith commit 61ef4daf6450da573b9de72ba7b200566821b916 Author: Peter Hutterer Date: Fri Nov 4 15:49:23 2011 +1000 Xi: add FreeInputMask function Does what it says on the box, complements MakeInputMask. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit ee9346bb31efce4036df1b8dd8f1a5dc43ae955a Author: Peter Hutterer Date: Thu Nov 3 15:45:34 2011 +1000 Xi: add helper functions to alloc/free InputClientPtrs Currently not needed since the InputClientRec is a self-contained struct. As part of the touch rework that won't be the case in the future and a function to allocate/free memory appropriately is required. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 4acf999c294868a44e559d212c6d88a4978256b2 Author: Peter Hutterer Date: Fri Nov 4 15:37:32 2011 +1000 dix: use a single return statement in CheckPassiveGrabsOnWindow No functional change. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit b371795f01c1d7fc338cfe18b8a567ed9f402846 Author: Peter Hutterer Date: Thu Nov 3 14:54:06 2011 +1000 dix: rename GetWindowXI2Mask to WindowXI2MaskIsset And let it return a boolean value, that's all the callers need anyway. Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit bedb8fd90de8e2db33d5e3b1d859f24bf34efc9a Author: Peter Hutterer Date: Thu Nov 3 14:25:51 2011 +1000 Xi: use single return code from XIPassiveGrabDevice Some failures returned status but the actual return code was "ret". Use "ret" consistently and move status to the local block is used in. [the goto isn't necessary yet, but for a future patch] Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas commit 2aad1a2b42b7def7812abfa2462b6bcc6382e03a Author: Peter Hutterer Date: Wed Nov 2 14:07:19 2011 +1000 include: fix mask size calculation Same bug as inputproto-2.0.1-9-gb1149ab, if the XI2LASTEVENT was a multiple of 8, the mask was one bit too short. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Reviewed-by: Chase Douglas commit b2015a2c01711646bb7ae23d684abee0cd55d4d0 Author: Jeremy Huddleston Date: Thu Nov 24 13:54:08 2011 -0800 dmx: Build fix for -Werror=implicit-function-declaration on linux Fixes regression introduced by: 6e6d732bac3c21cb85f8e998908f9b393630e5f8 Found-by: Tinderbox Signed-off-by: Jeremy Huddleston CC: Alan Coopersmith Signed-off-by: Keith Packard commit 873a1ace3646994adf95961f48719e95dcade7a2 Author: Paulo Zanoni Date: Tue Nov 1 10:57:56 2011 -0200 parser: free val.str after xstrtokenize After we tokenize val.str, we discard it. This is just one example: 6 bytes in 1 blocks are definitely lost in loss record 24 of 652 at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB060: xf86parseInputClassSection (InputClass.c:145) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer Reviewed-by: Dan Nicholson commit d41987d77c903e00cca7bcf3e04ed07151e3bb4d Author: Paulo Zanoni Date: Tue Nov 1 10:42:36 2011 -0200 parser: free val.str after xf86getBoolValue After we convert the value to a boolean, we discard the string. This is just one example: 3 bytes in 1 blocks are definitely lost in loss record 5 of 657 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4D744D: xf86getToken (scan.c:400) by 0x4D75F1: xf86getSubToken (scan.c:462) by 0x4DB3E0: xf86parseInputClassSection (InputClass.c:189) by 0x4D664C: xf86readConfigFile (read.c:184) by 0x490556: xf86HandleConfigFile (xf86Config.c:2360) by 0x49AA77: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer Reviewed-by: Dan Nicholson commit d5c7338b3eaea55177ade6fcba71a47ccd5547f5 Author: Paulo Zanoni Date: Mon Oct 31 17:54:03 2011 -0200 parser: free scandir's list v2: move the free()s to the function that calls scandir 80 bytes in 1 blocks are definitely lost in loss record 411 of 631 at 0x4C2779D: malloc (vgpreload_memcheck-amd64-linux.so) by 0x4C27927: realloc (vgpreload_memcheck-amd64-linux.so) by 0x696A80D: scandir (scandir.c:108) by 0x4D8828: OpenConfigDir (scan.c:854) by 0x4D8A43: xf86openConfigDirFiles (scan.c:952) by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) by 0x49A9E3: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Peter Hutterer commit 3d635fe84d6de53e2f74203b10e89f7851fe3fc1 Author: Paulo Zanoni Date: Sun Oct 30 18:04:59 2011 -0200 Correctly free config file names We call xf86penConfigDirFiles twice, so we overwrite the configDirPath variable, losing the pointer. If we move the pointer management to the upper layer (the function callers), they will be able to call these functions as many times as they want, but they'll have to free those returned values. v2: don't leak inside XWin 4,097 bytes in 1 blocks are definitely lost in loss record 625 of 632 at 0x4C2779D: malloc (in vgpreload_memcheck-amd64-linux.so) by 0x4D7899: DoSubstitution (scan.c:615) by 0x4D87B0: OpenConfigDir (scan.c:845) by 0x4D8A2D: xf86openConfigDirFiles (scan.c:955) by 0x49031F: xf86HandleConfigFile (xf86Config.c:2327) by 0x49A9BF: InitOutput (xf86Init.c:365) by 0x425A7A: main (main.c:204) Signed-off-by: Paulo Zanoni Reviewed-by: Dan Nicholson commit 0ae087e13192d9b498db782be5ba49ca91a81547 Author: Paulo Zanoni Date: Sat Oct 29 18:33:24 2011 -0200 glx: don't leak driConfigs For dri, dri2 and driswrast. 12,968 (584 direct, 12,384 indirect) bytes in 1 blocks are definitely lost in loss record 569 of 570 at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x7821E3B: driConcatConfigs (utils.c:560) by 0x7827CF2: dri_fill_in_modes (dri_screen.c:224) by 0x782831E: dri_init_screen_helper (dri_screen.c:405) by 0x7826C03: drisw_init_screen (drisw.c:266) by 0x782225F: driCreateNewScreen (drisw_util.c:69) by 0x4826E2: __glXDRIscreenProbe (glxdriswrast.c:451) by 0x4812FA: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x568622: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit d26fae246d7c451b4d5ffe24fdb959d4bd00b107 Author: Paulo Zanoni Date: Tue Oct 25 14:56:35 2011 -0200 glx: don't leak fbconfigs 29,952 (208 direct, 29,744 indirect) bytes in 1 blocks are definitely lost in loss record 573 of 573 at 0x4C2779D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x4829BC: createModeFromConfig (glxdricommon.c:131) by 0x482C09: glxConvertConfigs (glxdricommon.c:185) by 0x482788: __glXDRIscreenProbe (glxdriswrast.c:468) by 0x4812FA: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x568636: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit 305a8bcb2fc6f87f8d891fcb774198b6fd118ee1 Author: Paulo Zanoni Date: Thu Oct 20 17:39:29 2011 -0200 glx: fix memory leak when destroying screen 1,152 bytes in 1 blocks are definitely lost in loss record 536 of 575 at 0x4C25E84: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x483820: __glXScreenInit (glxscreens.c:357) by 0x48271C: __glXDRIscreenProbe (glxdriswrast.c:469) by 0x4812BE: GlxExtensionInit (glxext.c:327) by 0x41FB14: InitExtensions (miinitext.c:471) by 0x5685AE: main (main.c:208) Signed-off-by: Paulo Zanoni Reviewed-by: Jeremy Huddleston commit f405dfffe7d5db81d398615a80acbeba7e014ada Author: Jeremy Huddleston Date: Mon Nov 7 22:14:30 2011 +0000 dmx: Build fix for -Werror=implicit-function-declaration Signed-off-by: Jeremy Huddleston Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith commit 632d205b309d0515b4ae0f9902059aa4b093a313 Author: Alan Coopersmith Date: Mon Nov 7 20:24:08 2011 -0800 Fix gcc -Wwrite-strings warnings in xf86Modes code Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 09e4b78f7944234865f4648940453303af0c2663 Author: Alan Coopersmith Date: Mon Nov 7 19:19:47 2011 -0800 Fix gcc -Wwrite-strings warnings in xf86 ddx Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 8e4556f560487f3d07812834d4785441d0a8323c Author: Alan Coopersmith Date: Mon Nov 7 20:09:47 2011 -0800 FindModule: stop copying const char *dirname to char *dirpath Not needed since 6cf844ab69926b split out the allocation/manipulation into the helper function, leaving FindModule just copying the pointer around, and causing gcc warnings and an unreachable call to free. Also no longer need to store the combined strlen results in dirlen. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 05f589d464a961aea8d25632a390fb66a06cd186 Author: Alan Coopersmith Date: Fri Nov 4 23:21:34 2011 -0700 Fix gcc -Wwrite-strings warnings in various extensions Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 232f1ddf3d060f3ce9d2ebd35f33b1294cac380e Author: Alan Coopersmith Date: Thu Nov 3 21:21:19 2011 -0700 Fix gcc -Wwrite-strings warnings in XkbGetRulesDflts Stop temporarily storing a pointer to a constant literal string in a char *, just to strdup it a few lines later. Fixes gcc -Wwrite-strings warnings: xkbInit.c: In function 'XkbGetRulesDflts': xkbInit.c:121:38: warning: assignment discards qualifiers from pointer target type xkbInit.c:123:23: warning: assignment discards qualifiers from pointer target type xkbInit.c:125:24: warning: assignment discards qualifiers from pointer target type xkbInit.c:127:25: warning: assignment discards qualifiers from pointer target type xkbInit.c:129:25: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 0bc41d5f8d1a6192f57d9bf646cc46ed839b06b9 Author: Alan Coopersmith Date: Mon Nov 7 18:08:21 2011 -0800 Remove redundant redeclarations of functions in the same header file Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 285133a35eede03e37f41aeea6cbfd15a0800d98 Author: Alan Coopersmith Date: Mon Nov 7 15:44:26 2011 -0800 sun_agp: cast key to uintptr_t before casting to (int *) Matches what linux_agp already does and prevents gcc from throwing up: sun_agp.c: In function 'xf86DeallocateGARTMemory': sun_agp.c:236:40: error: cast to pointer from integer of different size Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit f8dd5efb673439e7e9f7d82e6f9cfb97afacc85a Author: Alan Coopersmith Date: Thu Nov 3 21:18:56 2011 -0700 Mark XKB char * as const to clean up gcc -Wwrite-strings warnings Cleans up around 120 warnings from this set Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit cccafabd56d0f8e5784ea0ad9fdc03224f952bfe Author: Alan Coopersmith Date: Thu Nov 3 21:10:51 2011 -0700 Mark arguments to fopen/popen/system wrappers as const char * Silencing more gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 3d0ece5e8467d823afb227b7a7f8b12b906b6ba9 Author: Alan Coopersmith Date: Thu Nov 3 20:44:43 2011 -0700 Reduce unnecessary string copying in xkbtext routines Instead of using sprintf to copy a static string to a local buffer, just to pass it to TryCopyStr, pass the static string to TryCopyStr directly, as is already done in other parts of this code. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 05d8a7f7a785eff3292f0f0537bb3902930f1b5c Author: Alan Coopersmith Date: Sat Oct 29 11:08:17 2011 -0700 Convert a bunch of sprintf to snprintf calls This batch is the straightforward set - others are more complex and need more analysis to determine right size to pass. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit b967bf2af264726042e2f6ffb9ca7d234f34b56b Author: Alan Coopersmith Date: Mon Oct 31 23:01:35 2011 -0700 Remove xf86FormatPciBusNumber from API, inline the one place its used Found no calls from current driver modules Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 6450f6ca7ee070da3b6d70c2d3a6977f018ac421 Author: Alan Coopersmith Date: Thu Nov 3 22:13:05 2011 -0700 Move DoShowOptions to xf86Configure.c, delete xf86ShowOpts.c Gets rid of duplicate static copy of optionTypeToString by putting both callers of that helper function in the same source file. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 43fa1274263f76faaca995f6e498bc3179a857b8 Author: Alan Coopersmith Date: Mon Oct 31 22:17:35 2011 -0700 Remove bad code from DoShowOptions (Xorg -showopts handler) When we want to print a string, it's okay to just print it. We don't need to first allocate a buffer 2 bytes bigger than the string, copy the entire string unmodified to the buffer, print the buffer, and then leak the buffer (though we AbortDDX 8 lines later, and then just in case we survived that, call exit as well, so the leak is short lived, just oh so pointless). Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 71a89d97332cc181becc5a5f73166e642f96c076 Author: Alan Coopersmith Date: Mon Oct 31 21:36:47 2011 -0700 Convert glx/single2.c:DoGetString() to use asprintf() Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit f3cb512dc4daaeed389bb4740e21b6e2330e01e1 Author: Alan Coopersmith Date: Sat Oct 29 11:19:44 2011 -0700 LogVMessageVerb: Fix const mismatch warning "log.c", line 382: warning: assignment type mismatch: pointer to char "=" pointer to const char Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 3d2d88029b29d6e1c53220ad275ba8ba2dedd89e Author: Alan Coopersmith Date: Sat Oct 29 11:13:32 2011 -0700 AuthAudit: clean up string handling calls The extra "out" pointer to redirect writes to the array isn't needed since the removal of LBX (commit a9ed5a87902a), and eliminating it allows more logical use of sizeof(addr) in length-checked strlcpy & snprintf calls to write to it. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 615f93a3d03d40924365061c6ae242240dd0ab7e Author: Alan Coopersmith Date: Tue Nov 1 14:57:41 2011 -0700 Remove unnecessary variable rtrn in XkbKeysymText Also removes even more unnecessary use of variable assignment inside function arguments. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone commit 5f285a30a1d6ffba82ebe5e08a0b68352bb51556 Author: Alan Coopersmith Date: Tue Nov 1 16:56:18 2011 -0700 Make XIGetKnownProperty take a const char * argument Now that MakeAtom takes const char *, so can XIGetKnownProperty. Clears 71 warnings from gcc -Wwrite-strings of the form: devices.c:145:5: warning: passing argument 1 of 'XIGetKnownProperty' discards qualifiers from pointer target type ../include/exevents.h:128:23: note: expected 'char *' but argument is of type 'const char *' Signed-off-by: Alan Coopersmith Reviewed-by: Peter Hutterer commit e0f3633632de609e60950aef07c82df534db7888 Author: Alan Coopersmith Date: Fri Oct 28 21:31:46 2011 -0700 Convert ProcRenderQueryFilters to use memcpy instead of strncpy We just got the string length with strlen, might as well use it to copy the whole string quickly instead of checking each character a second time to see if it's 0 or not. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 780133f9ae7fada462714b47e79d26075bbd9abe Author: Alan Coopersmith Date: Fri Oct 28 21:29:50 2011 -0700 Convert DetermineClientCmd to use strdup instead of malloc+strncpy *cmdname is initialized to NULL earlier in the function, so it's okay to overwrite it with NULL if strdup fails, don't need that extra check. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 03ddca6f71339fad089c56484bf35c63642ae1be Author: Alan Coopersmith Date: Fri Oct 28 21:25:20 2011 -0700 Convert dmxSetDefaultFontPath to use strdup instead of malloc+strncpy Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit d9243777c77d9b2992fbaf7f459430283837e323 Author: Alan Coopersmith Date: Sat Oct 29 10:32:52 2011 -0700 matchDriverFromFiles: use one snprintf instead of strncpy/cat series Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 6e6d732bac3c21cb85f8e998908f9b393630e5f8 Author: Alan Coopersmith Date: Fri Oct 28 21:18:46 2011 -0700 Convert strncpy/strncat to strlcpy/strlcat As long as we're carrying around a compatibility copy in os/strl*.c, might as well use them. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit e189dbb3e57d30eb96034d4ce9544ce7a93a371e Author: Alan Coopersmith Date: Fri Oct 28 20:19:44 2011 -0700 Convert AllocXTestDevice to use asprintf Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 08093c25a91c07ab8af7cece9bba738b827cfd1b Author: Alan Coopersmith Date: Mon Oct 24 23:16:30 2011 -0700 Convert some malloc + strncpy pairs into strndup calls Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit acde97a39d35bfb03af2614c68176ad9afb71f53 Author: Alan Coopersmith Date: Mon Oct 24 20:28:32 2011 -0700 Add fallback implementation of strndup() Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Linux test code fixed by: Keith Packard commit ed38c2648cf7cc04c1d03f8d14375815f6cf536e Author: Alan Coopersmith Date: Fri Oct 28 14:32:56 2011 -0700 Fix Sun compiler check that got turned around Since the check is for !(compilers that support __builtin_constant_p) it needs to be !(gcc or new enough Sun cc), but was written as !(gcc or too old Sun cc). Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 7ee7fd1f4c72b2ab6dba0413e63dd2e8b95b2112 Author: Alan Coopersmith Date: Mon Oct 24 20:39:24 2011 -0700 Remove a couple Error() instances left behind by 09dbfcb0ad7b6c8 Two instances found in the SIOCGIFCONF code for listing network interfaces. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit e47aa9475027ed6a255daefec85561c6b15789bd Author: Alan Coopersmith Date: Mon Oct 24 23:40:45 2011 -0700 Enable memory checking during unit testing If configure is generated with xorg-macros 1.16.0 or newer, and an appropriate memory checking library is found for the platform, use it when running unit tests. If not, then no harm is done. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 36670065bd74b870d0da7c6a69a9c0d222b21706 Author: Alan Coopersmith Date: Tue Oct 25 00:12:48 2011 -0700 Don't require ld -wrap for tests that don't need it If configure is generated with xorg-macros 1.16 or later, this allows builders to --enable-unit-test and run the tests other than the xi2 tests which require ld -wrap (and are still wrapped in if HAVE_LD_WRAP in tests/xi2/Makefile). If an older xorg-macros is used, the existing behaviour is preserved of requiring ld -wrap for all unit tests, but no side effects occur, so the minimum xorg-macros version is not raised. If unit testing is enabled without ld -wrap, then we create a bogus "xi2-tests" script just to report that we're skipping them. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston commit 0e6b88db7f2e94ccc8153a0e002d176440914e01 Author: Alan Coopersmith Date: Mon Aug 1 14:09:33 2011 -0700 Don't fallback to wsfb or fbdev on Solaris We don't ship either one, so don't waste time and make confusing log entries trying to load them. Signed-off-by: Alan Coopersmith Reviewed-by: Daniel Stone commit 7b0f53f0a5824fcd81ef505beb3e19ac7c77961f Author: Alan Coopersmith Date: Wed Nov 23 10:50:13 2011 -0800 Fix Xdmx build on Linux to work with strlcpy changes Include strlcpy.c in the libdmxconfig.a library with the other functions shared among the xdmx configuration programs. Also add a #include "os.h" to the scanner.l file that now calls strlcpy to include the prototype from $(top_srcdir)/include/os.h. (To be squashed into http://cgit.freedesktop.org/~alanc/xserver/commit/?id=c19f0ff5223d428f8ad2ab3c563c974c96a521ba before next PULL request to avoid breaking bisection.) Signed-off-by: Alan Coopersmith Signed-off-by: Keith Packard commit 922c1d817091c7eedfb701f4d9eb4324e22ccca4 Author: Gaetan Nadon Date: Fri Nov 11 20:44:19 2011 -0500 docs: spell "X Server Version" consistently in titles. Add where missing. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 5952efa903d57ac69070f1477ce46223a2a7893c Author: Keith Packard Date: Sun Nov 20 13:07:33 2011 -0800 Bump version to 1.11.99.1 (1.12 development release 1) Signed-off-by: Keith Packard commit 795fbe3e6e440f023e52c452106f4c266c13d36c Author: Keith Packard Date: Sun Nov 20 13:33:12 2011 -0800 Add 'optionstr.h' to include/Makefile.am This makes sure it gets distributed Signed-off-by: Keith Packard commit 08ec4da6a7617637914bee1636858474213cf39d Author: Julien Cristau Date: Sat Nov 5 13:00:07 2011 +0100 Fix ShmPutImage for XYBitmap We can't call CopyArea in that case because the image has depth 1, which might not match the target drawable, so we might overrun the shm segment. Commit 11817a881cb93a89788105d1e575a468f2a8d27c apparently fixed a similar bug for XYPixmap, but missed the bitmap case. Fixes: http://bugs.debian.org/629611 Thanks to Alan Curry for diagnosing this and providing a test case. Reported-and-tested-by: Alan Curry Reviewed-by: Peter Harris Signed-off-by: Julien Cristau commit 328074890eeb111950e984c6f618311983600b20 Author: dtakahashi42 Date: Fri Nov 18 11:30:22 2011 -0800 rootless: Fix a server crash when choosing a color with the gimp color wheel https://trac.macports.org/ticket/30927 Signed-off-by: Jeremy Huddleston Reviewed-by: Jeremy Huddleston commit 58864146fbdf1820d04825838691e84784ef91bc Author: Ross Burton Date: Wed Sep 28 11:46:02 2011 +0100 edid: Add quirk for Acer Aspire One 110 At least one revision of the AAO reports a 190x110mm maximum size but a 451x113mm mode. X.Org Bug 41141 Signed-off-by: Ross Burton Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit 34b0e4eee911f8b09a3682a7f1b4c8598ef48b8d Author: Chris Wilson Date: Thu Aug 25 16:04:04 2011 +0100 dri2: Register the DRI2DrawableType after server regeneration The Resource database is reset upon regeneration and so the dri2 module needs to re-register its RESTYPE for the drawable or else it will clobber the next unsuspecting user of the database. Fortunately, DRI2 is loaded late in the initialisation sequence and was last up until xf86-video-intel started using the Resource database to track outstanding swaps... Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston Tested-by: Paulo Zanoni commit bfa1a0dd190ed88020d60eba3bb04681c8e83a68 Author: Chris Wilson Date: Mon Jan 24 11:17:03 2011 +0000 DRI2: Avoid a NULL pointer dereference Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41211 Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit eeb21a133b982f71de739baf62e53c8a68f5d495 Author: Chris Wilson Date: Mon Jan 24 11:17:03 2011 +0000 VidMode: prevent crash with no modes Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=17431 Signed-off-by: Chris Wilson Reviewed-by: Jeremy Huddleston commit c1bb8f43b9290c2b18a9f0ac59773ff8f1eb974f Author: Rami Ylimäki Date: Tue Oct 4 12:25:26 2011 +0300 record: Prevent out of bounds access when recording a reply. Any pad bytes in replies are written to the client from a zeroed array. However, record extension tries to incorrectly access the pad bytes from the end of reply data. Signed-off-by: Rami Ylimäki Reviewed-by: Erkki Seppälä commit 1f5baa924a5907978f564372265d9830ac72a077 Author: Jeremy Huddleston Date: Sun Oct 30 20:26:42 2011 -0700 xfree86: Deprecate the use of xf86PciInfo.h Signed-off-by: Jeremy Huddleston Reviewed-by: Tormod Volden commit eb3377ffb8a7baa26c9831e56ed782d48b28fa71 Author: Jeremy Huddleston Date: Tue Nov 1 14:59:15 2011 -0700 xfree86: Fix powerpc build with -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast memType is a uint64_t on powerpc. Using memType only really makes sense for *physical* addresses, which can be 64-bit for 32-bit systems running on 64-bit hardware. However, unmapVidMem() only deals with *virtual* addresses, which are guaranteed to fit into an uintptr_t. Signed-off-by: Jeremy Huddleston Reviewed-by: Mark Kettenis commit a551f126cc4af7a476d9c8fd0cb309d5aa600d54 Author: Pierre-Loup A. Griffais Date: Fri Nov 4 23:26:25 2011 -0700 xfree86: Fix RandR rotation across server generations 245cb8e94fd1599 fixed xf86RotateDestroy() to actually run its teardown code, causing the Damage object to properly be re-allocated after a server regeneration. However the block that does that still thinks the Rotate layer BlockHandler is wrapped from the last generation, meaning the shadow pixmap is never re-allocated and the Damage object is never re-registered, causing a blank screen, and potentially a driver crash on the next teardown after the server asks it to free a 0x0 Pixmap. Signed-off-by: Pierre-Loup A. Griffais Reviewed-by: Aaron Plattner Signed-off-by: Keith Packard commit bfa2a1857a1efda7f171f10e855d200ca0dbcc1a Merge: f0d50cc66 e7cb8f802 Author: Keith Packard Date: Mon Nov 14 09:07:06 2011 -0800 Merge remote-tracking branch 'whot/for-keith' commit e7cb8f802adf6fc22e7a930c0dfc5c1076781c96 Author: Peter Hutterer Date: Wed Nov 9 15:31:57 2011 +1000 Xext: remove unused variable 'n' xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit bb4aa1f263ad38c175bfda3b7e6c325260ce3f28 Author: Peter Hutterer Date: Wed Nov 9 15:31:10 2011 +1000 Xext: don't swap CARD8 in SProcSELinuxQueryVersion xselinux_ext.c: In function 'SELinuxSendItemsToClient': xselinux_ext.c:340:16: warning: unused variable 'n' [-Wunused-variable] xselinux_ext.c: In function 'SProcSELinuxQueryVersion': xselinux_ext.c:532:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap xselinux_ext.c:533:62: error: call to 'wrong_size' declared with attribute error: wrong sized variable passed to swap Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit 35ec24cf245e5ef676e98a0bf7c77296a3f1ff63 Author: Peter Hutterer Date: Mon Aug 1 14:14:02 2011 +1000 input: replace remaining GetPairedDevice() with GetMaster() Wherever it's obvious which device we need (keyboard or pointer), use GetMaster() instead of GetPairedDevice(). It is more reliable in actually getting the device type we want. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit fc16917ad6f0d2722bfb5c5eeca955dd3bc4125a Author: Peter Hutterer Date: Fri Apr 15 13:32:10 2011 +1000 include: export GetProximityEvents and QueueProximityEvents This is mainly needed for consistency with GetPointerEvents and friend. No-one seems to actually need this function from outside the usual DDXs. Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 11840595a1be9f2df7390bcc708cc176e60d3ef2 Author: Peter Hutterer Date: Thu Nov 3 08:58:58 2011 +1000 dix: Don't let a driver without a ProximityClassRec post events Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 22715e465b415b3351b83b8279a4f44157f63199 Author: Peter Hutterer Date: Thu Oct 27 11:03:39 2011 +1000 Xi: allow passive keygrabs on the XIAll(Master)Devices fake devices They don't have a KeyClassRec, but we must still allow passive grabs on them. Signed-off-by: Peter Hutterer Tested-by: Bastien Nocera Reviewed-by: Daniel Stone commit f0d50cc6651dce3a8a3cd3fb84210aa92b139763 Author: Derek Buitenhuis Date: Sun Nov 6 12:20:51 2011 -0500 Fix vesa's VBE PanelID interpretation xserver's VESA driver's VBE (Vesa BIOS Extensions) code includes a PanelID probe, which can get a monitor's native resolution. From this, using CVT formulas, it derives horizontal sync rate and a vertical refresh rate ranges. It however, only derives the upper bounds of the ranges, and the lower bounds cannot de derived. By default, they are set to hardcoded constants which represent the lowest supported resolution: 640x480. The constants in vbe.c however, were not actually derived from forulas, but carried over from other code from the bad old days, and are not relevant to flat panel displays. This caused, for example, EEEPC701's panel, with a native resolution of 800x480, to end up with a upper bound of the horizontal sync rate that was lower than the hardcoded lower bound, which of course broke things. These numbers have been rederived using both my own CVT tool based on xf86CVTMode(), and using the provided 'cvt' tool that comes with xserver. Signed-off-by: Derek Buitenhuis Reviewed-by: Adam Jackson Signed-off-by: Keith Packard commit c643c2b7bf480f5c27ff8606bda087f8bff3b154 Author: Peter Hutterer Date: Tue Nov 1 12:17:50 2011 +1000 xfree86: duplicate name and driver from pInfo for NewInputDeviceRequest xorg.conf devices had the name and driver set in the DDX's InputInfoPtr list but not in the option list for those devices. That information was lost when passing the options into NewInputDeviceRequest. NIDR then refused to start the devices. Introduced in xorg-server-1.11.0-250-ge4cd24e Signed-off-by: Peter Hutterer Tested-by: James Cloos commit 9cc44b955b27de33348d6a20bebc9704930ee18e Author: Rui Matos Date: Tue Nov 1 21:32:36 2011 +0000 randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition The constraining logic in RRConstrainCursorHarder allows the cursor to reach crtc positions of x = width and y = height while the constraining code in miPointerSetPosition only allows it to reach x = width - 1 and y = height - 1 for the analogous screen case. This patch makes the former's logic equivalent to the latter's which allows applications to benefit from Fitts's law. E.g. a maximized application adjacent to a crtc border wouldn't get pointer events if the user moved the pointer all the way until it's contained. Signed-off-by: Rui Matos Reviewed-by: Daniel Stone Signed-off-by: Keith Packard commit f47f6b6a53d414f28374391964c2930427d28f46 Author: James Simmons Date: Thu Nov 3 13:20:18 2011 +0000 don't map cursors in sw cursor mode commit d4eebe5217a89de196c1933e1fe4d37e22d59c6b Author: Dave Airlie Date: Thu Nov 3 13:18:46 2011 +0000 configure: don't require xvmc. Not needed in here commit 548c6fe044068ffba9b5306dc6b11f2ba22782a4 Merge: 3881b0bf1 ffe8ec86d Author: Keith Packard Date: Wed Nov 2 21:35:31 2011 -0700 Merge remote-tracking branch 'jturney/master' commit 3881b0bf1ce11a62473650bdf6ee01a1762f6f91 Author: Gaetan Nadon Date: Tue Nov 1 07:17:07 2011 -0400 mi: remove deprecated miPointerAbsoluteCursor from design doc Function was removed from the code by commit f5409aa026 Reviewed-by: Jeremy Huddleston Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit d91aa0e6601bdf3e2cfa57b3412ab14ac486edc4 Merge: 8df3a9ca5 401150d7d Author: Keith Packard Date: Wed Nov 2 21:20:07 2011 -0700 Merge remote-tracking branch 'whot/two-screen-coordinates' commit 8df3a9ca5abbd56eb2013fa65250d21a8f18865b Merge: 8329afa59 ef895484c Author: Keith Packard Date: Wed Nov 2 21:18:16 2011 -0700 Merge remote-tracking branch 'koba/reviewed' commit ffe8ec86db2655b2c83e5ae61521898140c855ac Author: Colin Harrison Date: Sat Oct 8 15:05:22 2011 +0100 hw/xwin: Fix a typo in ddraw.h Fix a (fortunately benign) typo in ddraw.h Signed-off-by: Jon TURNEY commit 48fda3c52b41157313b7fd56d9f3fa3ad4166ed7 Author: Yaakov Selkowitz Date: Thu Feb 18 20:37:00 2010 -0600 hw/xwin: Revert "Fix bug #5735, Serious flaw in CygwinX clipboard" This commit wreaks havoc with other programs which manage the clipboard, such as MS Office Clipboard or Win32 VNC viewers: http://sourceware.org/bugzilla/show_bug.cgi?id=9910 This reverts commit 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec. Signed-off-by: Yaakov Selkowitz Signed-off-by: Jon TURNEY Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison commit 3ead1d810b0e157078db39712e02ea6dc85216d8 Author: Jon TURNEY Date: Sun Jul 3 19:10:52 2011 +0100 hw/xwin: Stop pretending we work on NT4 We already link directly to some functions not available in NT4, so stop pretending we will work on NT4 and link directly to EnumDisplayMonitors() and SHGetFolderPath() Also remove mentions of NT4 & Win95 from error messages Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit f6529a05a2f087cb57a7fe84f226fef3780728d0 Author: Colin Harrison Date: Sat Oct 8 14:39:07 2011 +0100 Xming: Always remove temporary file used when invoking xkbcomp on Win32 When built for native Win32, pipe() & fork() aren't available, so we use a tempoary file and system() to invoke xkbcomp Ensure the temporary file is always removed. It was only being removed on most errors, not on success :S Also fix a couple of warnings which occur when built with WIN32 defined Signed-off-by: Jon TURNEY Reviewed-by: Jon TURNEY commit ee1985386700288af1a8b1789dcad0d7d9c97393 Author: Jon TURNEY Date: Sat Apr 16 23:28:45 2011 +0100 hw/xwin: Link directly to TrackMouseEvent() TrackMouseEvent has existed in user32 since at least NT4, so don't bother with jumping through all the ancient compatibility hoops of finding if _TrackMouseEvent() exists in comctl32 so it can check if TrackMouseEvent() exists in user32 to see if it needs to emulate it... Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison commit e2e6fab1efa6895256ac0ed4d5b054a88ad18077 Author: Jon TURNEY Date: Tue Mar 23 04:45:37 2010 -0500 Cygwin/X: Make default DPI match native DPI Make the default DPI match the current Windows DPI setting. If that setting can't be retrieved, change the fallback DPI value from 75 dpi to 96 dpi. Mark the application as dpiAware in the manifest, which prevents dpi virtualization for high (>96) dpi values on Vista and later. Signed-off-by: Jon TURNEY Signed-off-by: Yaakov Selkowitz Reviewed-by: Colin Harrison commit 8329afa59dd5ea3adf7adebdb2111a9bccbb126b Author: Aaron Plattner Date: Mon Oct 31 15:01:12 2011 -0700 dix: Reinstate GetImage window size check Commit 587c3a2d1961834558193e8e14e8e381a077a253 fixed DoGetImage to check windows against their backing drawables, rather than against the screen dimensions, to prevent reading outside the bounds of redirected windows' backing pixmaps (see bug #22804). Unfortunately, while making that change I also removed the check that the rectangle is contained within the bounds of the source window, which is a violation of the specification: If the drawable is a window, the window must be viewable, and it must be the case that, if there were no inferiors or overlapping windows, the specified rectangle of the window would be fully visible on the screen *and wholly contained within the outside edges of the window* (or a Match error results). Note that the borders of the window can be included and read with this request. (emphasis mine) Reinstate the window dimension check, to return BadMatch if the GetImage request falls outside the bounds of the window. Fixes X Test Suite test XGetImage-15: 400|0 15 1 11:05:41|IC Start 200|0 15 11:05:41|TP Start 520|0 15 00005146 1 1|VSW5TESTSUITE PURPOSE 15 520|0 15 00005146 1 2|Assertion XGetImage-15.(A) 520|0 15 00005146 1 3|When the drawable is a window and the window is viewable 520|0 15 00005146 1 4|and it is not the case that given there were no inferiors or 520|0 15 00005146 1 5|overlapping windows the specified rectangle of the window 520|0 15 00005146 1 6|would be fully visible on the screen and wholly contained 520|0 15 00005146 1 7|within the outside edges of the window, then a BadMatch 520|0 15 00005146 1 8|error occurs. 520|0 15 00005146 1 9|METH: Create window which is not fully visible on the screen. 520|0 15 00005146 1 10|METH: Call XMapWindow to make sure the window is viewable. 520|0 15 00005146 1 11|METH: Call XGetImage with rectangle extending beyond edge of screen. 520|0 15 00005146 1 12|METH: Verify XGetImage return value is null. 520|0 15 00005146 1 13|METH: Verify that BadMatch error occurred. 520|0 15 00005146 1 14|METH: Create window which is fully visible on the screen. 520|0 15 00005146 1 15|METH: Call XMapWindow to make sure the window is viewable. 520|0 15 00005146 1 16|METH: Call XGetImage with rectangle extending beyond edge of window. 520|0 15 00005146 1 17|METH: Verify XGetImage return value is null. 520|0 15 00005146 1 18|METH: Verify that BadMatch error occurred. 520|0 15 00005146 1 19|REPORT: Got Success, Expecting BadMatch 520|0 15 00005146 1 20|REPORT: Null image not returned. 220|0 15 1 11:05:41|FAIL Signed-off-by: Aaron Plattner Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit 132545ff576cc69ed63f5a08127151fe550de4c3 Merge: d0c6732a9 d7c44a7c9 Author: Keith Packard Date: Sun Oct 30 16:57:58 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit d7c44a7c9760449bef263413ad3b20f19b1dc95a Author: Peter Hutterer Date: Mon Oct 24 12:00:32 2011 +1000 dix: block signals when closing all devices When closing down all devices, we manually unset master for all attached devices, but the device's sprite info still points to the master's sprite info. This leaves us a window where the master is freed already but the device isn't yet. A signal during that window causes dereference of the already freed spriteInfo in mieqEnqueue's EnqueueScreen macro. Simply block signals when removing all devices. It's not like we're really worrying about high-responsive input at this stage. https://bugzilla.redhat.com/show_bug.cgi?id=737031 Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau commit 820d9040f50a8440741b3aefbc069a3ad81e824e Author: Servaas Vandenberghe Date: Wed Aug 31 07:06:49 2011 +0200 xfree86: fix potential buffer overflow The patch below fixes a potential buffer overflow in xf86addComment(). This occurs if curlen > 0 && eol_seen == 0 && iscomment == 0 , as follows from the code: char *xf86addComment(char *cur, char *add) <...> len = strlen(add); endnewline = add[len - 1] == '\n'; len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen; if ((str = realloc(cur, len + curlen)) == NULL) return cur; cur = str; if (eol_seen || (curlen && !hasnewline)) cur[curlen++] = '\n'; if (!iscomment) cur[curlen++] = '#'; strcpy(cur + curlen, add); if (!endnewline) strcat(cur, "\n"); Signed-off-by: Servaas Vandenberghe Reviewed-by: Peter Hutterer [whot: added buffer overflow test case] Signed-off-by: Peter Hutterer commit 63e87b8639eb8e0b4e32e5d3a09099d31a03bbcd Author: Peter Hutterer Date: Tue Oct 25 11:49:26 2011 +1000 xfree86: reduce calls to input_option_get_key/value No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson commit d0c6732a99c9a7e40752b9ba7898a01c325103fa Author: Anssi Hannula Date: Wed Apr 20 14:34:52 2011 +0300 xfree86: add nouveau as the first automatic driver for NVIDIA hardware Add nouveau as the first driver on linux for NVIDIA hardware when driver autoconfiguration is done, as it is more capable than nv. nv is also kept in the list as it is more widely supported and because some old cards are not supported by nouveau. Signed-off-by: Anssi Hannula Reviewed-by: Daniel Stone Reviewed-by: Cyril Brulebois Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit ef895484c8a43d447d9d3ea7d4226936cc5f92cc Author: Alexandr Shadchin Date: Tue Oct 4 10:46:00 2011 +0600 bsd: alpha_video: Remove unused variables Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit fea7c7a8c070ec17ec03e4cb193834b6ca72fb72 Author: Alexandr Shadchin Date: Mon Oct 3 23:03:31 2011 +0600 bsd: alpha_video: Simplify #include Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit 93a3a28f2c1e95ea7fae6cf1c2fb50b30eae9c33 Author: Alexandr Shadchin Date: Tue Oct 4 00:45:09 2011 +0600 bsd: alpha_video: Function sethae() need only for FreeBSD Return value sethae() is becoming void because no caller used it. Also old msb_set static checked by each caller is replaced by the p.hae static checked in sethae() when it's called. Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit 05b41e2dc60a0aefc685a33260e5d8e09580908b Author: Alexandr Shadchin Date: Tue Oct 4 17:20:13 2011 +0600 Move check definition MAP_FAILED in xf86_OSlib.h Also remove odd definition MAP_FAILED. Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit af56e502f5ddf1d2d495b633734cadcb023b7c36 Author: Alexandr Shadchin Date: Tue Oct 4 16:49:22 2011 +0600 Remove odd definition DEV_MEM DEV_MEM defined in xf86_OSlib.h Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit 0481e9d3d1e0dbc05099184128de5cd6f13445f7 Author: Alexandr Shadchin Date: Tue Oct 4 15:09:45 2011 +0600 Remove BSDi support Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit 8838a86fd325cb7f262a582d22ccdaa8a8f1a534 Author: Alexandr Shadchin Date: Tue Oct 4 14:57:20 2011 +0600 Remove unused VT_SYSREQ_DEFAULT Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith commit 91131037a2d2e07079de5d222d8a8c95300750cc Author: Alexandr Shadchin Date: Sat Oct 29 00:14:32 2011 +0600 Fix position _X_EXPORT Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 219bcec73d3554c57b87f28812ab06a66b739b19 Author: Alexandr Shadchin Date: Sat Oct 29 00:14:31 2011 +0600 bsd: Remove odd message about -sharevts This is missing in commit 'xfree86: move -novtswitch & -sharevts argument handling up to common layer' Signed-off-by: Alexandr Shadchin Reviewed-by: Alan Coopersmith Signed-off-by: Keith Packard commit 005ab41986b0bb6a4e626aee7a7a542247f422e7 Author: Dave Airlie Date: Thu Oct 27 08:38:45 2011 +1000 test: fix two more failing FP3232 tests And put a comment in to explain why we're testing for a frac between .3 and .6. We can't directly compare the frac since the floating/fixed point conversion loses precision. Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer commit 286fa9bf9b4ffb0f9dbd3f1cae46ddcb27ee9318 Author: Jeremy Huddleston Date: Tue Oct 25 23:53:43 2011 -0700 XWin: windowswm: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston Reviewed-by: Jon TURNEY commit dc054fefc586c5b404fe0f949dbd456e5267c647 Author: Jeremy Huddleston Date: Tue Oct 25 23:49:33 2011 -0700 XQuartz: appledri: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston commit d5fee2b638fabeb8bec31a24e57d5c2a232d0893 Author: Jeremy Huddleston Date: Tue Oct 25 23:48:16 2011 -0700 XQuartz: applewm: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston commit 5701ab4a441eb113abd0851b0d71b82d12112854 Merge: 7d50211ab a41214bc9 Author: Keith Packard Date: Mon Oct 24 22:09:00 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit a41214bc9a0f326c6dc129e4a6382efb8b826862 Author: Peter Hutterer Date: Tue Oct 25 12:57:07 2011 +1000 kdrive: check for null memory, fix OOB If key/value allocation failed, don't bother adding another InputOption. And make sure the memory allocated is large enough for the trailing \0 Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit ffe20acedb3cdc4811eb52f8fc540ba6af7339fa Author: Peter Hutterer Date: Thu Oct 20 16:42:20 2011 +1000 Use new FP1616/FP3232 conversion functions Signed-off-by: Peter Hutterer Reviewed-by: Jeremy Huddleston commit 7500d841f4c709ae0edc6420332096d3b9ef9fcc Author: Peter Hutterer Date: Thu Oct 20 16:49:28 2011 +1000 test: fix test with new double -> fp3232 conversion functions Signed-off-by: Peter Hutterer Tested-by: Dave Airlie Reviewed-by: Dave Airlie commit 4bb5d8fae4f9a70f12591315f0b267a2ea826a0c Author: Peter Hutterer Date: Wed Oct 19 13:17:51 2011 +1000 Xi: send DeviceChangedEvents when the scroll valuators change value Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 1f4af6c12fb5d4c19f4eac3df768517c9132cc88 Author: Peter Hutterer Date: Wed Oct 19 12:28:37 2011 +1000 dix: accept a NULL master for CreateClassesChangedEvent If a floating device changes, the master is NULL but we must still create a DCE for it. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit d77dec6971e4a0b306c8dbd5adf627908d7972cb Author: Peter Hutterer Date: Wed Oct 19 12:11:16 2011 +1000 Xi: ensure the deviceid for DeviceChangedEvents is always the right one If we're sending the event for a given device, make sure the deviceid is that of the device. This allows callers to use the same DCE for slave and master without having to fiddle the DCE's internal fields. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit e9dee21fa3213bfe87b2b728a38eb41d3ba0e664 Author: Peter Hutterer Date: Tue Oct 18 17:47:59 2011 +1000 dix: pass the flags into the CreateClassesChangedEvent No effective functional changes, prep work for future patches. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit fcdd2587a17437b643b4592aa7f65d11c05a4cd8 Author: Peter Hutterer Date: Tue Oct 18 17:41:29 2011 +1000 dix: drop unused argument from XISendDeviceChangedEvent Instead of device and master (and just using master), drop the master argument and let the callers pass in the device the event is to be sent for. No effective functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 8473e441b0f832775153281bc3df5e2d4feb2b36 Author: Peter Hutterer Date: Tue Oct 18 17:11:27 2011 +1000 dix: add ScrollInfo to DeviceChangedEvents 3304bbff9b4ed63f1a47410a5320a136420ba2c6 added smooth scrolling support for pointer events and for XIQueryDevice but didn't add the matching parts to XIDeviceChangedEvents. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit e3f6a76dd480717eae4b17ad8e2ff707de2ffe4c Author: Andreas Wettstein Date: Thu Aug 11 16:33:33 2011 +1000 xkb: Support noLock and noUnlock flags for LockMods These flags are required by the XKB spec section 6.3. Signed-off-by: Andreas Wettstein Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 6f33593dc087d367d899d1cb6e6e30b282d922e2 Author: Peter Hutterer Date: Fri Oct 21 09:09:55 2011 +1000 xfree86 doc: replace driver "keyboard" with "kbd" We've deprecated keyboard a long time ago Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith commit e4cd24e717ef1059804b3f6bb483810b708cd56a Author: Peter Hutterer Date: Fri Aug 5 14:48:02 2011 +1000 xfree86: use NewInputDeviceRequest for xorg.conf devices too Only use one init path for input devices - through NIDR. This requires that inp_driver and inp_identifier from the XF86ConfInputRec are copied over into the options for NIDR to see them. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 1ecc427a39d41e723912492b846512fd0ad9af2d Author: Peter Hutterer Date: Wed Aug 10 14:37:41 2011 +1000 dix: move #if statement to stop compiler warning ptrveloc.c: In function 'QueryTrackers': ptrveloc.c:598:34: warning: variable 'used_offset' set but not used [-Wunused-but-set-variable] used_offset is used, but only in the debugging code. Move the #if statement to ignore that warning. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Daniel Stone commit f9067c1dd8ce9058eb48a20dfae52bc8cf3a1e55 Author: Peter Hutterer Date: Fri Aug 5 14:05:58 2011 +1000 xfree86: Fix a comment, the old function doesn't exist anymore Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Daniel Stone commit aeab26e9e1751e1e3514798fa53e9bd604b0d254 Author: Peter Hutterer Date: Wed Aug 10 15:58:34 2011 +1000 xfree86: use xf86AddNewOption instead of xf86addNewOption The former strdups for us. If the strdup fails we miss out on the CorePointer option (default on anyway) and we're likely to fall over soon anyway, so let's pretend this is the same behaviour. Signed-off-by: Peter Hutterer Reviewed-by: Alan Coopersmith Reviewed-by: Daniel Stone commit c39c8d34282b82d73c3c69a16cf0c2816256d85b Author: Peter Hutterer Date: Wed Aug 10 14:38:58 2011 +1000 input: switch InputOption to use XF86OptionRec storage. Use the same struct for both InputOption and XF86OptionRec so we don't need to convert to and fro the two in the config backends. Signed-off-by: Peter Hutterer Reviewed-by: Dan Nicholson Reviewed-by: Daniel Stone commit 16ac78a53c1edeae183db8672104587b306cfe13 Author: Peter Hutterer Date: Tue Oct 25 11:40:58 2011 +1000 kdrive: switch to new InputOption API. Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard commit 7d50211ab57a35910d79fc3f67ae89aff91fa995 Author: Christopher Yeleighton Date: Mon Oct 24 18:47:06 2011 -0700 Bug 38420: Xvfb crashes in miInitVisuals() when started with depth=2 https://bugs.freedesktop.org/show_bug.cgi?id=38420 Exit with fatal error message, not segfault. Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston Signed-off-by: Keith Packard commit d9d3a01ffca5e2de650d098231e16205781804c5 Merge: 17416e88d fb55f8f79 Author: Keith Packard Date: Mon Oct 24 18:12:23 2011 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 17416e88dcfcc584fe5f87580d5d2b719b3521c3 Author: Dave Airlie Date: Thu Oct 20 14:43:01 2011 +0100 xf86Crtc: handle no outputs with no modes harder. If you started an X server with no connected outputs, we pick a default 1024x768 mode, however if you then ran an xvidmode using app against that server it would segfault the server due to not finding any valid modes. This was due to the no output mode set code, only adding the modes to the scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would get called and remove all the modes and we'd end up with 0. This change fixes xf86SetScrnInfoModes to always report a scrn mode of at least 1024x768, and pushes the initial configuration to just call it instead of setting up the mode itself. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926 I've seen other bugs like this on other distros so it might also actually fix them. Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit fb55f8f790f69f30b0ab18648c337bde9d41f5ff Author: Jeremy Huddleston Date: Mon Oct 24 16:45:36 2011 -0700 XQuartz: Fix the filename of our log file Signed-off-by: Jeremy Huddleston commit 1c8bda798b4480bab0f0da6f531e4770c7a1f771 Author: Jeremy Huddleston Date: Fri Oct 21 10:27:16 2011 -0700 XQuartz: appledri: Allow byte swapped requests Even though it's only valid when local, it is possible for a local client and the server to not match endianness, such as when running a ppc application under Rosetta. Signed-off-by: Jeremy Huddleston commit 14205ade0c750191bf43fba8bd55c65dba912cf4 Author: Jeremy Huddleston Date: Thu Oct 20 22:34:44 2011 -0700 XQuartz: appledri: Fix byte swapping in replies Even though it's only valid when local, it is possible for a local client and the server to not match endianness, such as when running a ppc application under Rosetta. Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 2ba0ac202ad64eb4a555715980ba538de19c9fd7 Author: Jeremy Huddleston Date: Thu Oct 20 22:23:07 2011 -0700 XQuartz: appledri: Set the correct reply length for XAppleDRICreatePixmap http://xquartz.macosforge.org/trac/ticket/508 Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit e4f257748b51d041275a64b8be408729ea05fbb5 Author: Jeremy Huddleston Date: Thu Oct 20 11:35:54 2011 -0700 XQuartz: appledri: Change whitespace in appledristr.h to match mesa Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 83fef4235db86343477b4ec9858c6ba35e1aa7d9 Author: Jeremy Huddleston Date: Sun Oct 16 02:12:38 2011 -0700 Xnest: Match the host's keymap This was a regression. Introduced by: 08363c5830bdea34012dcd954b45ccfdc79a3a7e and 32db27a7f867b503c2840ca7b815e96d10be9210 Masked by: 1e69fd4a60147287b31e53bfc61543fb17bb82c8 Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 4597ac6fe0580323860080dae2576733acc49757 Author: Jeremy Huddleston Date: Mon Oct 17 23:45:32 2011 -0700 test: Add unit test for mieq Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit ad450d76e468cd62406c4f09e71e131f7ff4555c Author: Jeremy Huddleston Date: Mon Oct 17 21:16:37 2011 -0700 mieq: Reserve some space in EQ for release and other special events The last 64 events in the event queue will be reserved for release events in order to help return the system to a cleaner state when it comes back from a soft wedge. Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit 7d153f25be678acf500236ae422b33d17e6cb7a6 Author: Jeremy Huddleston Date: Sat Oct 15 22:51:30 2011 -0700 mieq: Provide better adaptability and diagnostics during mieq overflow This patch changes from a static length event queue (512) to one that starts at 128 and grows to 4096 as it overflows, logging each time it grows. This change also allows for multiple backtraces to be printed when the server is wedged rather than just one. This increased sampling should help identify the true hog in cases where one backtrace might be insufficient. Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit 09eaa1f6f19f9a85a3cb74a18ac898162db451df Author: Jeremy Huddleston Date: Sat Oct 30 14:55:06 2010 -0700 configure.ac: Add -fno-strict-aliasing to CFLAGS This should force the server to have -fno-strict-aliasing even once it is removed from the warning flags. See: https://bugs.freedesktop.org/show_bug.cgi?id=31238 Signed-off-by: Jeremy Huddleston Reviewed-by: Gaetan Nadon commit a046d649e4c7e4d28f350382dcdd293e92a59aad Author: Jeremy Huddleston Date: Wed Oct 5 15:02:52 2011 -0700 test: Silence some debug lines from the input unit tests Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit 8db554d2d830953de3c6d0cbf58e23d53d89009f Author: Jeremy Huddleston Date: Thu Oct 20 14:28:56 2011 -0700 Xnest: Fix DestroyNotify handler This partially reverts the unwanted changes that crept into c13a48e74ec89eafa9b529a87253a631ef02f2e2 Reported-by: Julien Cristau Signed-off-by: Jeremy Huddleston Reviewed-by: Julien Cristau commit ff61592441916b83aeb778c74352bb5b26247f84 Merge: af3f64fb7 525d4172b Author: Keith Packard Date: Wed Oct 19 19:14:32 2011 -0700 Merge remote-tracking branch 'aplattner/for-master' commit af3f64fb77c13180e513ee99d1fd9a1b624fd8ea Merge: 15bbdc103 df0dd36de Author: Keith Packard Date: Wed Oct 19 17:33:07 2011 -0700 Merge remote-tracking branch 'hramrach/pull' commit 15bbdc103b34b6b374815698946e6c409421a644 Merge: a5266dcb3 323869f32 Author: Keith Packard Date: Wed Oct 19 17:26:50 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit a5266dcb3a60587e1877f90c18552baf60b597a0 Author: Ville Syrjala Date: Sun Oct 9 01:11:04 2011 +0300 composite: Update borderClip in compAllocPixmap() Previously the parent constrained borderClip was copied over when compRedirectWindow() is called. That is insufficient eg. in case the window was already redirected, but not yet realized. So copy the borderClip over in compAllocPixmap() instead. Example: Window 1 is below an automatically redirect window 2. Window 2 is unmapped and moved outside the extents of window 1. Window 2 is then mapped again, and MarkOverlappedWindows() uses the up to date borderSize of window 2 to mark windows, which leaves window 1 unmarked. Then exposures are calculated using the stale borderClip of window 2, which causes the window below window 2, to be exposed through an apparent hole in window 1. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22566 Signed-off-by: Ville Syrjala Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit e4787ec20b1b9d30fe00f17b60eb0898190bf77d Author: Gaetan Nadon Date: Mon Oct 17 15:08:14 2011 -0400 XWinrc.man: fix warning: tab character in unquoted macro argument #35054 Spaces or tabs do not affect the text output layout. Reviewed-by: Jeremy Huddleston Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 321873f8045139edd47b526a765f8b1c66f53cd4 Author: Gaetan Nadon Date: Mon Oct 17 15:08:13 2011 -0400 xorg.conf.man: fix 382: warning: missing `)' (got `R') #35054 http://www.gnu.org/software/groff/manual/html_node/Man-usage.html Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 3e145d3d67b472cb5d74cb8078b614160c4722b7 Author: Jesse Barnes Date: Thu Oct 13 12:01:10 2011 -0700 crtc: match full preferred modes if possible when choosing an initial config It's fairly common to have multiple, identical monitors plugged in. In that case, it's preferable to run the monitor's preferred mode on each output, rather than just matching the width & height and end up with different timings or refresh rates. Signed-off-by: Jesse Barnes Reviewed-by: Keith Packard Signed-off-by: Keith Packard commit 525d4172b246e13b8122e059e3b22866e00561d9 Author: Chris Wilson Date: Sun Sep 4 09:34:08 2011 -0700 render: export TriStrip and TriFan to the drivers Rather than perform an intermediate copy and expand the strip and the fan into a triangle list (thereby tripling the number of edges that the driver needs to process), allow the backend to hook directly into the appropriate Composite function. In order to extend the PictureScreen, without needlessly bumping the ABI, we move the existing copy implementations to mipict.c and assign those by default. To notify the ddx that the new entry points are available, we introduce PICTURE_SCREEN_VERSION. Signed-off-by: Chris Wilson Reviewed-by: Aaron Plattner commit 9b26e6bc8d2cdf5bac3025796855ccf05972358f Author: Luc Verhaegen Date: Tue Aug 23 15:19:59 2011 -0700 randr: stop clients from deleting immutable output properties Immutable in randr means that clients are not able to alter the property itself, they are only allowed to alter the property value. This logically means that the property then should not be deleted by the client either. Signed-off-by: Luc Verhaegen Reviewed-by: Rami Ylimäki Reviewed-by: Aaron Plattner Signed-off-by: Aaron Plattner commit c8413362049cee8c30e0a9d67f78f9ebefe8e71f Merge: 64d2d1bef b67581cf8 Author: Keith Packard Date: Tue Oct 18 07:45:24 2011 -0700 Merge remote-tracking branch 'herrb/master' commit b67581cf825940fdf52bf2e0af4330e695d724a4 Author: Matthieu Herrb Date: Mon Oct 17 22:27:35 2011 +0200 Fix CVE-2011-4029: File permission change vulnerability. Use fchmod() to change permissions of the lock file instead of chmod(), thus avoid the race that can be exploited to set a symbolic link to any file or directory in the system. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit 6ba44b91e37622ef8c146d8f2ac92d708a18ed34 Author: Matthieu Herrb Date: Mon Oct 17 22:26:12 2011 +0200 Fix CVE-2011-4028: File disclosure vulnerability. use O_NOFOLLOW to open the existing lock file, so symbolic links aren't followed, thus avoid revealing if it point to an existing file. Signed-off-by: Matthieu Herrb Reviewed-by: Alan Coopersmith commit df0dd36deea0c756819825113e825059ddd19243 Author: Michal Suchanek Date: Sat Oct 8 14:26:24 2011 +0200 Do not uselessly reload modules in DuplicateModule The function does not initialize the module so it has no business loading it. If some user of DuplicateModule expects a module actually loaded they should use LoadModule. Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer commit 24d435163eb5fbd9b73cd8ba13a9b3cdbbe8a1df Author: Michal Suchanek Date: Sat Oct 8 14:19:34 2011 +0200 Use UnloadModuleOrDriver for UnloadSubModule. Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer commit 0d4bb5442ceb8e8e4a8de6cfc4203cae469eee72 Author: Michal Suchanek Date: Sat Oct 8 14:13:33 2011 +0200 Unload submodules. Signed-off-by: Michal Suchanek Reviewed-by: Peter Hutterer commit b04aff76ac2eb461c71b85525a00e25efb8bf267 Author: Michal Suchanek Date: Thu Oct 13 17:14:53 2011 +0200 Document -background none option Document option introduced in commit 8976e97. Signed-off-by: Michal Suchanek Reviewed-by: Jeremy Huddleston Reviewed-by: Alan Coopersmith commit 323869f3298cbbfe864af9404a8aed1bf7995d79 Author: Tomáš Trnka Date: Tue Oct 11 09:11:18 2011 +0200 Fix drain_console unregistration Bug introduced by 9dca441670d261a9a9fb6108960ed48f3d58fb7f xfree86: add a hook to replace the new console handler. console_handler was not being set, making the server eat up CPU spinning in WaitForSomething selecting consoleFd over and over again, every time trying to unregister drain_console without success due to console_handler being NULL. Let's just fix the unregistration in xf86SetConsoleHandler() and use that. But wait, there could be a catch: If some driver replaced the handler using xf86SetConsoleHandler(), the unregistration in xf86CloseConsole will unregister that one. I don't understand Xorg well enough to know whether this poses a problem (could mess up driver deinit somehow or something like that). As it is, xf86SetConsoleHandler() doesn't offer any way to prevent this (i.e. check which handler is currently registered). I had been using it for two days on my machine that previously hit 100% CPU several times a day. That has now gone away without any new problems appearing. Signed-off-by: Tomas Trnka Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit 2cb63180fa9b54f763e7e92e433943e3e73741f3 Author: Peter Hutterer Date: Wed Oct 5 12:08:31 2011 +1000 dix: mark motion events as emulated if we're scrolling from button press The protocol requires that the emulated event is marked as such. So if a driver with smooth scrolling axis sends legacy button events, the motion event must be marked as emulated. Pass the real type to emulate_scroll_button_events and create the events accordingly. For real button press or relase events, only that event must be generated since a release event will follow or a press event has already occured, respectively. (This fixes a bug where we'd get two release events for each legacy button event) Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 82c60232c07f50774ccc0198950f64c9338057a5 Author: Peter Hutterer Date: Fri Sep 30 10:59:47 2011 +1000 dix: add valuator_mask_fetch_double() Using this call simplifies callers that don't know if the mask bit is set. Before: if (valuator_mask_isset(mask, valnum)) value = valuator_mask_get_double(mask, valnum)); else value = someothervalue; Now: if (!valuator_mask_fetch_double(mask, valnum, &value)) value = someothervalue; Signed-off-by: Peter Hutterer Reviewed-by: Chase Douglas Reviewed-by: Daniel Stone commit 64d2d1bef14c7ec7156bb3aae64eff69f9f7be54 Merge: fb84be47d 679c84bce Author: Keith Packard Date: Mon Oct 17 14:36:34 2011 -0700 Merge remote-tracking branch 'jeremyhu/master' commit fb84be47db7cdaff406792c08e34670e8e0cbda9 Merge: fae7ed62a 32b289e46 Author: Keith Packard Date: Mon Oct 17 13:50:25 2011 -0700 Merge remote-tracking branch 'whot/next' commit 679c84bce9b03c17aa35fa69058e7e46267dbc7b Author: Jeremy Huddleston Date: Sat Sep 24 00:01:11 2011 -0700 Bump ABI_VIDEODRV_VERSION to 12 The ABI changed in the previous series of changes, so bump the ABI version for the next release. Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit a89cdcee4ebab6bbfa9ace94e1988a94cfb67087 Author: Jeremy Huddleston Date: Sun Oct 9 02:59:12 2011 -0700 xfree86: Deprecate xf86MapVidMem and friends Drivers should transition over to using libpciaccess's instead. Signed-off-by: Jeremy Huddleston commit 41d903918a5721e53ed694880eab44170f9717cc Author: Jeremy Huddleston Date: Wed Sep 14 13:45:18 2011 -0500 xorg-server.pc.in: Remove libpciaccess and pixman-1 from Requires Every module building against xorg-server does not *Require* pixman nor libpciaccess. If such modules need pixman or pciaccess, they should be depending on them directly rather than inheriting a dependency from xorg-server. To do this, they should use PKG_CHECK_MODULES in configure.ac to check for pixman-1 or pciaccess and include the apporpriate _LIBS variable to the appropriate _LDFLAGS variable in Makefile.am This also moves pixman-1 to Requires.private, so CPPFLAGS is set right to to satisfy include dependencies but avoid linking needlessly. Signed-off-by: Jeremy Huddleston Reviewed-by: Gaetan Nadon commit 40d338e9f723c4b3d63516aa62fdcded4d8af75e Author: Jeremy Huddleston Date: Wed Sep 14 10:37:38 2011 -0500 darwin: configure: Force some irrelevant options to off on darwin This removes the need to pass the following to configure on darwin: --disable-pciaccess -disable-int10-module --disable-vbe --disable-vgahw --disable-libdrm Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 43d730c0e4b1a00b29843c0660dcc7c60da6725d Author: Jeremy Huddleston Date: Wed Sep 14 15:42:19 2011 -0500 xfree86: Link modules with -module This makes a difference on darwin (and apparently nowhere else) https://www.gnu.org/s/libtool/manual/libtool.html#Modules-for-libltdl Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: Gaetan Nadon commit f7edc00a2af83764910ff89514a046dc5ce2ff9e Author: Jeremy Huddleston Date: Wed Sep 14 12:14:56 2011 -0500 xfree86: fbdevhw: Remove unused include of pciaccess.h Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit 6817050f3196d460ba03a62da23fb46ffd5a0f97 Author: Tiago Vignatti Date: Tue Jun 1 13:05:47 2010 +0300 configure: wrap PCI code with macro and set it at build time --disable-pciaccess, used together with --disable-module-int10, can be used to disable all pci code inside the server. Note that XSERVER_LIBPCIACCESS was previously used only in the driver side and now it defines also whether the library is used inside the server. Also, XORG_BUS_PCI automake variable is introduced to track PCI code needs. Signed-off-by: Tiago Vignatti Reviewed-by: Mikhail Gusarov Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit 5c12399b6c3a8def2df1bdde1d5d4d8d9e31fd84 Author: Tiago Vignatti Date: Mon May 31 19:27:07 2010 +0300 configure: make PCI configuration more sane No semantical changes. Just moved code around, grouping PCI related stuff in a single chunk. Signed-off-by: Tiago Vignatti Reviewed-by: Mikhail Gusarov Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston commit a319e9e697faa0faa241e0e9baf0bc41efdcdf8f Author: Tiago Vignatti Date: Mon May 31 18:50:50 2010 +0300 configure: change PCI function checking by a meaningful version of the library People that don't want VGA arbiter active can go to the library and enable the stubs there. Signed-off-by: Tiago Vignatti Reviewed-by: Mikhail Gusarov Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Reviewed-by: Jamey Sharp commit b3ca84430d98f5338b9b1bc817c3656efb71cff1 Author: Jeremy Huddleston Date: Tue Sep 13 15:32:16 2011 -0500 xfree86: Work around issue where ar may be told to make an archive with no contents Automake: "Be careful when selecting library components conditionally. Because building an empty library is not portable, you should ensure that any library always contains at least one object." Signed-off-by: Jeremy Huddleston Reviewed-by: Gaetan Nadon commit e8bafb9d8c7d7a7077e163ecfac6174356989bbf Author: Jeremy Huddleston Date: Tue Sep 13 15:38:45 2011 -0500 xfree86: Add stubs for os-support to help adding new architecture support Signed-off-by: Jeremy Huddleston Reviewed-by: Jamey Sharp Reviewed-by: Gaetan Nadon commit 342f3eac8460fc48cfad1f1d7be939d671e6e1cd Author: Adam Jackson Date: Tue May 10 19:00:02 2011 -0400 int10: Port internal users off xf86MapVidMem This API is apparently semi-deprecated even by XFree86 standards, and there are only four drivers left using it. Let's start chopping it off. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson commit 7757b8092474c4f4ec04f4ebd1272236416154c3 Author: Adam Jackson Date: Tue May 10 17:34:23 2011 -0400 pci: Remove xf86MapDomainMemory This is slightly draconian, but that API is just awful. In all but one case in the callers it's used to get a map of some legacy VGA memory, and it would be cleaner for the caller to just call pci_device_map_legacy. The sole exception is in the vesa driver, which uses it to avoid having to look up which device the BAR belongs to. That's similarly trivial to fix. Having done that, Linux's PCI layer is now very small indeed. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson commit 6f5041d0b8e11e761d6403f1f8f8bb2ba2a9626d Author: Adam Jackson Date: Tue May 10 18:04:10 2011 -0400 int10: Use pciaccess rom fetch for !PC machines ... instead of rolling our own, badly. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 492ed3e53b0ee6746bd4b597978fd866d4a89ef6 Author: Adam Jackson Date: Tue May 10 16:41:08 2011 -0400 pci: Deprecate the PCITAG type It is kept around to help drivers through the API transition and will be removed at some point in the future. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit a248fa3a33cb015942386d52b7faa8558e592a51 Author: Adam Jackson Date: Fri Jan 7 17:20:15 2011 -0500 xfree86: Remove unused bios_devmem.c Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit aa0bfb0f133481c57762012e8e30c05ffa151423 Author: Adam Jackson Date: Fri Jan 7 16:57:15 2011 -0500 linux: Remove ia64 domain I/O support code pciaccess handles this now. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 95b6935637628ffa511f39004e90c75aa75141c4 Author: Adam Jackson Date: Fri Oct 16 16:09:56 2009 -0400 linux: Remove pre-2.6 PCI interface support If you haven't ported 2.6 to your architecture in the intervening seven years, you can keep running older servers. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 769f583783d17ffa3398bc8529f61e0f08b35530 Author: Adam Jackson Date: Fri Oct 16 14:05:54 2009 -0400 bus: remove some dead struct fields Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit dd72b3c1f1df57215329aa5ba9e9bb9ad0a65086 Author: Adam Jackson Date: Mon Sep 20 11:42:11 2010 -0400 linux: Use pci_device_get_parent_bridge instead of open-coding it Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 858fbbb40d7c69540cd1fb5315cebf811c6e7b3f Author: Adam Jackson Date: Fri Sep 16 13:33:04 2011 -0400 pci: Port xf86MapLegacyIO to pciaccess Per-domain I/O is now something drivers must manually request, and must keep track of within their own state rather than in the ScrnInfoRec. It's not really possible to split that into two steps without an additional intermediate ABI break, so don't even try. Drivers that want source compatibility should ifdef on the presence of xf86UnmapLegacyIO. As a fringe benefit, domain-aware I/O is now OS-independent, relying only on support in pciaccess. Simplify OS PCI setup to reflect this. The IOADDRESS type is kept around to help drivers through the API transition and will be removed at some point in the future. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 6d9efdce0d06df6b85f0681bea306c0b1e851502 Author: Adam Jackson Date: Tue Sep 20 18:12:29 2011 -0400 vgahw: Port to pciaccess IO space routines Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 4bd6579188e718654c35f95623fd4772f9e0ef06 Author: Adam Jackson Date: Thu Sep 22 13:45:57 2011 -0400 vgahw: Don't default to standard (port space) access routines In fact, don't default to anything; drivers must explicitly say which kind they want, and they are strongly encouraged to do MMIO if possible. This is an ABI change in that drivers that don't will crash, but drivers that are explicit will work with both old and new servers. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 30fb334d218f8c1d809f88054b9fe8f5f556bb62 Author: Adam Jackson Date: Thu Sep 22 13:44:53 2011 -0400 vgahw: Remove IO domain setup Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 51a5558beb71bddeff9352ef4f43269a8a22317d Author: Adam Jackson Date: Sat Sep 18 08:24:19 2010 -0400 int10: Port to pciaccess' legacy IO API Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit c0b63ff88a6dc20f86141aa1a1ed5a9384aa63aa Author: Adam Jackson Date: Sat Sep 18 08:05:11 2010 -0400 xfree86: Move xf86GetClocks to vgahw This is really a vga-specific hack anyway. The only modern driver that uses it is trident, but it's already loaded vgahw by the time it would call xf86GetClocks. Reviewed-by: Jeremy Huddleston Tested-by: Jeremy Huddleston Signed-off-by: Adam Jackson Reviewed-by: Jamey Sharp commit 1433103a49b97e356da0f20aa65046cdb2f5ece6 Author: Dave Airlie Date: Wed Oct 12 09:59:38 2011 +0100 test: fix input test The test was memsetting the wrong thing, this fixes make check in my tinderbox. Signed-off-by: Dave Airlie Reviewed-by: Daniel Stone Reviewed-by: Jeremy Huddleston commit f9c6903d4a90b59c328f4fa05d2be9e0ce1c5189 Author: Jeremy Huddleston Date: Wed Oct 5 15:02:52 2011 -0700 dix: add utility functions for double to/fro FP1616/FP3232 conversion Co-authored-by: Jeremy Huddleston Signed-off-by: Peter Hutterer Reviewed-by: Peter Hutterer Reviewed-by: Jeremy Huddleston Reviewed-by: Mark Kettenis commit 401150d7dcad08be7c1f07e076f810cd61e2105c Author: Peter Hutterer Date: Tue Oct 4 11:41:17 2011 +1000 input: change pointer screen crossing behaviour for multiple ScreenRecs miPointerSetPosition traditionally took coordinates on a per-screen basis, triggering a screen switch when these went out-of-bounds. For absolute devices, this prevented screen crossing in the negative x/y direction. This patch changes the event generation patch to handle screen coordinates in a desktop range (i.e. all screens together). Screen switches are triggered when these coordinates are not on the current screen. This unifies the pointer behaviour of single ScreenRec multihead and multiple ScreenRecs multihead in that the cursor by default moves about the whole screen rather than be confined to one single screen. The transformation matrix may then be used to actually confine the cursor to the screen again. Note: fill_pointer_events has to deal with several different coordinate systems. Make sure you read the comment before trying to understand the code. Signed-off-by: Peter Hutterer commit 6bd0eff40fae1e5d8fed28751851eb5b932d131b Author: Peter Hutterer Date: Wed Oct 12 15:53:57 2011 +1000 dix: extend rescaleValuatorAxis to take a minimum default Allow rescaling to non-zero based axis ranges as default (for when screen offsets are non-zero). Currently unused. Signed-off-by: Peter Hutterer commit 8bebb4b4896d8b6ba3309b5b28fce883bb9f8a96 Author: Peter Hutterer Date: Wed Sep 7 14:04:10 2011 +1000 Store desktop dimensions in screenInfo. For Zaphod mode screen crossing handling we need to know the size of all screens together (i.e. the whole desktop size). Store that in the screenInfo to have it readily available in events. Signed-off-by: Peter Hutterer commit 9cbfa4739a51e4cc6b8094833928bf8678f63876 Author: Peter Hutterer Date: Tue Sep 6 15:55:19 2011 +1000 xfree86: remove xf86XInputSetScreen Keeping track of which screen the pointer within the input driver is obsolete now. To bind to a screen, use the transformation matrix instead. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit 09dbfcb0ad7b6c8bac94502f2801e82f2a2ef435 Author: Jeremy Huddleston Date: Tue Oct 11 17:37:44 2011 -0700 os: Remove Error() Signed-off-by: Jeremy Huddleston Reviewed-by: Peter Hutterer commit db30615bcb3b872475e7d40eeee8cdda5b723078 Author: Jeremy Huddleston Date: Mon Oct 10 12:16:31 2011 -0700 Xephyr: Remove socket and its lock file on exit https://bugs.freedesktop.org/show_bug.cgi?id=11484 Signed-off-by: Jeremy Huddleston Reviewed-by: Mikhail Gusarov commit c13a48e74ec89eafa9b529a87253a631ef02f2e2 Author: Jeremy Huddleston Date: Mon Oct 10 12:09:39 2011 -0700 Xnest: Remove socket and its lock file on exit https://bugs.freedesktop.org/show_bug.cgi?id=11484 Signed-off-by: Jeremy Huddleston Reviewed-by: Mikhail Gusarov commit 32b289e46cc2d5ec32ff0c4ba5bbfbf602afb388 Author: Peter Hutterer Date: Mon Oct 3 13:58:01 2011 +1000 dix: move MD last.valuator update into fill_pointer_events Don't update the MD where it's not expected, positionSprite should really just do that - position the sprite. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 3b36fd1b49030ead44358945f62e5abe7f4609ce Author: Peter Hutterer Date: Mon Oct 3 13:10:53 2011 +1000 mi: switch miPointerSetPosition to take doubles Don't switch between doubles and ints in the caller, instead take doubles in miPointerSetPosition and do the conversion there. For full feature we should change everything down from here for doubles too. Functional change: previously we'd restore the remainder regardless of screen switching/confinement (despite what the comment said). Now, screen changing or cursor constraints will cause the remainder be clipped off. This should happen for cursor constraints but arguably not for screen crossing. This also corrects a currently wrong comment about miPointerSetPosition's input coordinates. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 81cfe44b1ed0de84ad1941fe2ca74bebef3fc58d Author: Peter Hutterer Date: Mon Oct 3 12:49:49 2011 +1000 mi: return the screen from miPointerSetPosition miPointerSetPosition may switch screens. Always return the screen the sprite is on instead of relying on callers to call miPointerGetScreen(). Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit 88dfe5366d9855e0ebf8bbff74967b793ede57d1 Author: Peter Hutterer Date: Mon Oct 3 12:37:28 2011 +1000 dix: drop screen argument from positionSprite We can just get this in the function, no effective functional changes. Also return the screen to the caller. Though we don't use it yet, we will in a follow-up patch. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit 967bc25da221a69c8fc390253465145ce534fcb9 Author: Peter Hutterer Date: Mon Oct 3 11:42:08 2011 +1000 dix: move screen- to device coordinate scaling to separate function No functional changes. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit b059e06e19ac9417ceeb8be58c1c91b159291865 Author: Peter Hutterer Date: Mon Aug 29 12:36:26 2011 +1000 dix: don't allow keyboard devices to submit motion or button events. GPE unconditionally dereferences pDev->valuator if a mask is present. This shouldn't really happen but if it does, don't crash, just ignore the events with an error. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit bccff533184a051b614a26304ce77ad30bede5e0 Author: Peter Hutterer Date: Mon Oct 3 12:19:21 2011 +1000 dix: moveRelative modifies parameter in-place, say so. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit b966362ccf0fe6fdd44f4d778d47e3677f55f11b Author: Peter Hutterer Date: Mon Oct 3 12:18:20 2011 +1000 dix: rename moveAbsolute to clipAbsolute Let's be honest about what it does. moveRelative accumulates delta _and_ clips in some cases, so that one can keep it's name. Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit 959d18c3765e447897a8cfd358e9ee645df595d9 Author: Peter Hutterer Date: Fri Sep 30 10:50:51 2011 +1000 dix: fix missing verb in comment Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit 7074ec87bdf81699df172619aea7aae1ad4ec3c6 Author: Peter Hutterer Date: Fri Sep 30 10:47:00 2011 +1000 dix: document transformAbsolute Signed-off-by: Peter Hutterer Reviewed-by: Jamey Sharp Reviewed-by: Daniel Stone commit f4ca19ce3ab91a9c8ad9de60f7dc95466f21f589 Author: Peter Hutterer Date: Fri Jul 29 10:56:44 2011 +1000 dix: copy the source ID into the RawEvent (#34240) X.Org Bug 34240 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 8b29addc30163bb7ba74c74351f312aac02f049a Author: Jeremy Huddleston Date: Sun Oct 9 04:00:41 2011 -0700 loader: when creating sdksyms.c only include shmint.h if MITSHM is enabled #29109 https://bugs.freedesktop.org/show_bug.cgi?id=29109 When configured with --disable-mitshm the symbols declared in shmint.h do not exist. By guarding the include with '#ifdef MITSHM' these symbols are skipped when generating sdksyms.c with --disable-mitshm. Signed-off-by: Michael Olbrich Reviewed-by: Jeremy Huddleston commit eabd5532fb589bd0550344ebd23c9765e591aadf Author: Julien Cristau Date: Sun Oct 9 17:06:14 2011 -0700 xfree86: fix build with xv disabled https://bugs.freedesktop.org/show_bug.cgi?id=29111 Signed-off-by: Julien Cristau Tested-by: Cyril Brulebois Reviewed-by: Cyril Brulebois commit c53380be804852045722203c993379813d97f6d7 Author: Ville Skyttä Date: Sun Mar 6 10:18:30 2011 +0200 Man page syntax and spelling fixes. Signed-off-by: Ville Skyttä Reviewed-by: Jeremy Huddleston commit 765ef69295ddc473640c96f1b4f54e0b8bfc670e Author: Max Schwarz Date: Tue Oct 4 22:06:08 2011 +0200 dix: fix inverted handling of legacy scroll button events This bug led to inverted scrolling axes with drivers that support smooth scrolling axes but send legacy button events. Signed-off-by: Max Schwarz Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer commit fae7ed62ad476114bd37b566202cf6b6546c0a1f Author: Jeremy Huddleston Date: Tue Oct 4 21:40:03 2011 -0700 XQuartz: pbproxy: Add missing AM_OBJCFLAGS Signed-off-by: Jeremy Huddleston commit e4cddf509e1729e8ff40354275b65455111ad2bd Author: vdb@picaros.org Date: Sat Sep 17 18:55:47 2011 +0200 Fix a rare memory leak Signed-off-by: Servaas Vandenberghe Reviewed-by: Jeremy Huddleston commit 53611213396479abfdce0f7752681572e0d26d78 Author: Kirill Elagin Date: Tue Oct 4 23:02:20 2011 +0400 Fix server crash due to invalid images See https://bugs.freedesktop.org/show_bug.cgi?id=39383 Signed-off-by: Kirill Elagin Reviewed-by: Jeremy Huddleston commit 7a33c5b934382b5554f41ab1502514e91c9bc52e Author: Alan Hourihane Date: Tue Oct 4 19:42:46 2011 -0700 dixfonts: Don't overwrite local c variable until new_closure is safely initialized. Signed-off-by: Alan Hourihane Reviewed-by: Jeremy Huddleston commit 911e7368bf9c00d327e994a6f7a1d8d8f9b83c72 Author: Peter Hutterer Date: Tue Aug 30 16:58:04 2011 -0400 Move pointOnScreen to inpututils.c We need this from other files too. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit d0a7cd759d4741a1ae118d579c90704410cde244 Author: Peter Hutterer Date: Fri Sep 2 09:53:02 2011 +1000 dix: NewCurrentScreen must work on pointers where possible When a screen switch is triggered by PointerKeys, the device for NewCurrentScreen is the keyboard. Submitting pointer events for this keyboard (without valuators) has no effect as GPE ignores the event. Force the dequeuing through the XTest device attached to this device. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 535b3789be3a7b43b5d9026e2b5150521d91e32b Author: Peter Hutterer Date: Wed Aug 31 14:15:02 2011 +1000 dix: warn about keyboard events with valuator masks We don't actually handle the mask correctly. They're clipped and dropped into the event but that's about it. I don't think we did since 1.4, let's warn the user if this happens. Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 9537afb13f2750d22350b7441570332ae60e4860 Author: Peter Hutterer Date: Tue Aug 30 13:37:31 2011 +1000 dix: fill out root_x/y for keyboard events Switching screens relies on rootx/y to be set to the correct value. Note: though we technically take a mask for GetKeyboardEvents we don't actually handle it properly to move the pointer as required (and generate motion events if needed). Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone commit 6378d0233d21088b6429755627b4253859892c72 Merge: 6e965d8a1 98b230669 Author: Keith Packard Date: Mon Oct 3 13:56:06 2011 -0700 Merge remote-tracking branch 'herrb/master' commit 6e965d8a185087a55b2100b817e18f05b3ce5a00 Merge: 466e4b3f1 ac5881d6d Author: Keith Packard Date: Mon Oct 3 13:47:49 2011 -0700 Merge remote-tracking branch 'koba/reviewed' commit 466e4b3f174bdd7a69a76eb06e6c3e3344b8adc2 Author: Gaetan Nadon Date: Fri Sep 30 07:21:57 2011 -0400 Xserver-spec: use appropriate copyright markup Use docbook copyright markup for year and holder. Reviewed-by: Peter Hutterer Signed-off-by: Gaetan Nadon Signed-off-by: Keith Packard commit 62940bf38f70e3d9fb80521de40d6361548a0ea5 Author: Gaetan Nadon Date: Fri Sep 30 07:21:56 2011 -0400 Xserver-spec: re-order markup to follow outpout order No content change, no layout/ordering change. It is easier to find at the top. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 365bc2f5b132ac76a1f827923a99a75b33b158ac Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 30 07:21:55 2011 -0400 Xserver-spec: add release information It has been added in all docs (X Version 11, Release 7.6) Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit ee3e26079e120bf9914cc27871d50501b35e75df Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 30 07:16:34 2011 -0400 ddxDesign: drop the url in the coporate authors list It was such an eyesore once rendered in html. Now it looks like other authors. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0ed71b48c0c7bd65cd05eda6c06b9c29b4e3f607 Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 30 07:16:33 2011 -0400 ddxDesign: remove server version from the document title Such version information is already written in the appropriate location Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 83ec3bf1aa72848421660c44c4503fec655f5924 Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 30 07:16:32 2011 -0400 ddx-Design: add X Version and Release information Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2f09f6e3f610e585aeb5bd1023323a909d1ba20d Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Sep 29 07:53:16 2011 -0400 Xinput: use appropriate copyright markup for a multi licensed doc Removed a duplicate paragraph. Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 597348e969bf78dc2de4cf9bae7b76c110144266 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Sep 29 07:53:15 2011 -0400 Xinput: replace hard coded X11 version with X server version Which is more useful. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit fad04dd9701aa76249a0bab31676103debb84307 Author: Lennart Poettering <lennart@poettering.net> Date: Tue Sep 27 18:04:06 2011 +0100 udev: make use of udev_enumerate_add_match_tag() only when it is available udev_enumerate_add_match_tag() and udev_monitor_filter_add_match_tag() are mostly optimizations, hence simply skip these calls if they are not available in the installed version of libudev. This should fix the build on older versions of udev. [airlied: fixes tinderbox failures on RHEL6] Signed-off-by: Lennart Poettering <lennart@poettering.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 77743f877d573cdf70fcb5cb5897250f668ebf9b Author: Jamey Sharp <jamey@minilop.net> Date: Mon Sep 26 22:38:44 2011 -0700 kdrive: Fix build for opaque InputOption structure. Commit 05284a03f9002b03a66ae355b34790ec02b726f0 missed fixing up kdrive's use of the old non-opaque structure. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9a55b3661b4172f9a32cd6fefb254e06edb1a88a Merge: cf11ca360 84bb0207f Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 3 11:49:23 2011 -0700 Merge remote-tracking branch 'alanc/master' commit cf11ca360c2ded5ca309faa9d039160947387bb8 Merge: 463dd8706 6eae9fa28 Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 3 11:44:59 2011 -0700 Merge remote-tracking branch 'jeremyhu/for-keith' commit 463dd87062edaa974cb8c7163328a53197f237e1 Author: Pauli Nieminen <pauli.nieminen@linux.intel.com> Date: Thu Sep 22 18:38:53 2011 +0300 xf86/modes: Fix shadow rotation crashing when screen pixmap changes Driver may change screen pixmaps after page flipping that would then make damage lose track of the root pixmap. Using root window for shadow damages fixes the problem because SetWindowPixmap is implemented in shadow code. Signed-off-by: Pauli Nieminen <pauli.nieminen@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f5d50b46ddeb039ab6564141f61261e94ee67637 Merge: 57cd32e93 524e5445c Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 3 11:36:28 2011 -0700 Merge remote-tracking branch 'whot/next' commit 57cd32e93425597317b4b7722859155419836e4c Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Aug 25 15:41:55 2011 -0700 xfree86/modes: Make cursor position transform a helper function When the driver can handle the crtc transform in hardware, it sets crtc->driverIsPerformingTransform, which turns off both the shadow layer and the cursor's position-transforming code. However, some drivers actually do require the cursor position to still be transformed in these cases. Move the cursor position transform into a helper function that can be called by such drivers. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit 245cb8e94fd15990e1b7d6622added460f104dba Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Aug 25 10:19:48 2011 -0700 xfree86/modes: Let the driver handle the transform If a driver can use hardware to handle the crtc transform, then there's no need for the server's shadow layer to do it. Add a crtc flag that lets the driver indicate that it is handling the transform. If it's set, consider the transformed size of the screen but don't actually enable the shadow layer. Also stop adjusting the cursor image and position. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit e089737fb13868bd3a72b7ac4799d502d188f03e Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 3 11:23:16 2011 -0700 Add AC_LANG_SOURCE wrappers around configure.ac code fragments Current autoconf versions are very unhappy when code fragments are not wrapped in AC_LANG_SOURCE macros, generating errors like: configure.ac:723: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:194: AC_LANG_CONFTEST is expanded from... ../../lib/autoconf/general.m4:2662: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2679: AC_LINK_IFELSE is expanded from... ../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... ../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... configure.ac:723: the top level Signed-off-by: Keith Packard <keithp@keithp.com> commit 6eae9fa28445b6cfa09061b338242df5116aafe8 Author: Matt Turner <mattst88@gmail.com> Date: Wed Sep 28 17:27:45 2011 -0400 Remove incorrect & in swap_uint32 Caused by commit 893e86a4, and hidden by the (char *) cast. Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Tested-by: Aaron Plattner <aplattner@nvidia.com> commit 6f581e3fde7ddc943c04f274e01735beb358b7f9 Author: Dave Airlie <airlied@redhat.com> Date: Mon Oct 3 16:09:12 2011 +0100 fix fb_id for dirty reporting commit 79959b734702486971447a11b2e4181463fda3bf Author: Dave Airlie <airlied@redhat.com> Date: Mon Oct 3 11:35:39 2011 +0100 fix make distcheck commit 524e5445c0b6df5247d4aac5368470bb89ef4080 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Oct 1 08:43:52 2011 -0700 Add #include "inpututils.h" to xkbAccessX.c for init_device_event Fixes Sun compiler warning: "xkbAccessX.c", line 128: warning: implicit function declaration: init_device_event Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 98b230669f591bf5b8b8764db3b287d91857ee9e Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Jul 31 20:43:39 2011 +0200 sdksyms.sh may not be executable. Use $(SHELL) to run it. Someone may want to build out of a source tree in a filesystem with the noexec mount flag set. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit f54852edc35a2831a4cd91906188101ea19904e1 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Sep 18 12:46:52 2011 +0200 Add a 'wscons' autoconf mechanism to configure input devices on BSD. This does not really handle hotplug (it's handled inside the kernel, by the 'mux' devices), but uses the wscons console driver configuration to figure out the keyboard layout and the list of pointing devices found by the kernel. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit f32c827d513c44f07e1d0fbcc0c96cef18c9a4d9 Author: Max Schwarz <Max@x-quadraht.de> Date: Sun Sep 25 20:44:26 2011 +0200 Input: Fix frac calculation on [Raw]DeviceEvent conversion (1UL << 32) evaluates to 0 (at least here), so do the fraction calculation in two steps as in libXi. Fractions on xXIRawEvent were not multiplied at all, which also gave 0 as result. Signed-off-by: Max Schwarz <Max@x-quadraht.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4c6bc0e76599dbe5ede2e1f48c9936a0e996b638 Merge: 057cc92eb 3304bbff9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 30 09:24:56 2011 +1000 Merge branch 'smooth-scrolling' into next commit 3304bbff9b4ed63f1a47410a5320a136420ba2c6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 15 18:49:58 2011 +0000 Input: Add smooth-scrolling support to GetPointerEvents For scroll wheel support, we used to send buttons 4/5 and 6/7 for horizontal/vertical positive/negative scroll events. For touchpads, we really want more fine-grained scroll values. GetPointerEvents now accepts both old-school scroll button presses, and new-style scroll axis events, while emitting both types of events to support both old and new clients. This works with the new XIScrollClass to mark axes as scrolling axes. Drivers mark any valuators that send scroll events with SetScrollValuator. (Currently missing: the XIDeviceChangeEvent being sent when a driver changes a scroll axis at run-time. This can be added later.) Note: the SCROLL_TYPE enums are intentionally different values to the XI2 proto values to avoid copy/overlapping range bugs. Co-authored-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ac5881d6d0bcf4bcc66a5d6ddde4eca950db1a5b Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Thu Sep 15 23:05:24 2011 +0600 Remove unused vtSysreq Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 0be1640dbbdd072f26d937de2e49f5ed58d54ef9 Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Sat Aug 27 02:02:36 2011 +0600 bsd: ioctl KDENABIO/KDDISABIO do not matter for OpenBSD Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 91042b98afdc6cecc746e101a88f79e56db1c0d0 Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Sat Aug 27 00:47:34 2011 +0600 bsd: OpenBSD and NetBSD not need extra headers in PCVT_SUPPORT Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 86eaa9bbe4ed59f89d6509d5e13211ab7f5a8038 Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Sat Aug 27 01:03:28 2011 +0600 bsd: Some clean up OpenBSD and NetBSD does not support syscons Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit dc864770d47fc1e4ec993e37a59e5aecb5b0a85e Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Fri Aug 26 22:40:19 2011 +0600 bsd: Remove dead code Since OsInit closes stdin before the xfree86 DDX opens the console, fstat on stdin will always fail, so it's safe to delete code that attempts it. Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit cbb842666fa7ff26bbdd1e89a7f41b835a677c5e Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Fri Aug 26 21:42:41 2011 +0600 bsd: Variable devConsoleFd need only if defined PCCONS_SUPPORT Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 38bd1e123d959e0a13514ec415afc8bfb5a170f2 Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Fri Aug 26 18:54:01 2011 +0600 bsd: Replacement screenFd on consoleFd because they are equivalent Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit f015351c73bb24ce4172911c3e95d67922de42ab Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Date: Fri Aug 26 18:27:02 2011 +0600 bsd: Remove unused macros KBD_FD Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit cb65ec6b58daf9a1afc40c8693fa0632f8cf0585 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 16:06:52 2011 +0100 check drm support dumb buffer capability commit 6ccd13a2d7d78db2d5bd3fafb00f78d2ceb11741 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 16:00:50 2011 +0100 add initial man page commit 1f37991dec98073d5dfbf0c30213f838999bd9da Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 15:55:36 2011 +0100 add shadowfb support, default to on. we should probably expose a bit from kernel to say if shadow is preferred or wasteful. commit 0b5e574dff230c7879eb9655bb7252553bbace50 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 15:55:24 2011 +0100 remove unused debug commit d686130c17126d86db55aae6b65b12d8bcf6a098 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 14:13:58 2011 +0100 add -Wall, cleanup warnings commit a4f6e661b5d6662c413c86eeefb4affddd65c562 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 14:05:43 2011 +0100 fix server recycling commit 7847321138be62b929123b25929a69f0a57aca3f Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 12:38:26 2011 +0100 port damage tracking code from st/xorg commit 4d3aadb22fc03f259a9d1717b55ce16d7a32e2be Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 12:34:27 2011 +0100 drop loading dri2 commit 1b1382c9e1995dcfe5dfec1de17155fa627ac6e8 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 12:34:17 2011 +0100 update authors/copyright commit 263597dbb3a75d711b5ad2e1f51554e6b2601d9a Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 12:30:46 2011 +0100 gut some more unneeded code commit a72bdf170c8bc55eef3d2dbb8e316839552288a5 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 12:28:59 2011 +0100 modesetting: rewrite probing based on fbdev. This isn't perfect, it should really do more with bus id matching and finding the write drm device using sysfs if it can. but it removes lots of hardcoding of pci ids. commit a77fae850511c4d73af2af2b88804586f950f28d Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 11:52:51 2011 +0100 cleanup some the drmmode_display header file commit 2a4618905445ce13fd272a4634ef5103dc804231 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 29 11:49:26 2011 +0100 modesetting: restart driver effort from other codebases This starts a randr 1.2 compatible driver with cursors. TODO: libkms dirty handling server recycling. commit 057cc92ebfeebe81b7d01ff2c6aa2c066c8d1a64 Merge: afb1fe695 52c9b59a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 29 14:18:35 2011 +1000 Merge branch 'raw-events' into next Conflicts: configure.ac dix/events.c commit 52c9b59a9fed6abfeca775a7a04133cee18eac0b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 30 09:47:06 2011 +1000 dix: use 'rc' for return code in DeliverRawEvent Reported-by: Walter Harms <wharms@bfs.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b6b1f1b514bf14ddf6b265b8d4551f892ded0dd2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 11 13:56:08 2011 +1000 input: deliver raw events unconditionally for XI 2.1 clients. Deliver raw events regardless whether there is a grab on or not for clients supporting 2.1 or later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 16244fba001826190445302f56784f5de9c59c01 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 2 13:50:13 2011 +1000 Support (and require) XI 2.1 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 54e05d80a122bac57920fce1704c0f57492b849c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 14:21:39 2011 +1000 dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent No functional changes, prep work for future changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c48133f133c64d356a1208f185619bfdf7e9a5f2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 14:19:45 2011 +1000 Xi: use temporary variable for filter. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ac0850e86f22191091a1eb07237cae9de49ee00d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 12:14:32 2011 +1000 dix: split DeliverEventToWindowMask up a bit more. Move out the actual event delivery, it needs to be used from elsewhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5ea2fb389fce235366e9fce83d20abdc8874f4e2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 11:43:50 2011 +1000 dix: rename DeliverEventsToClients to DeliverEventsToWindowMask To avoid confusion with a future patch and it better describes what this does anyway - delivering events to all clients that have the event mask on the window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 016413dae947fe4e8e918f728c87354fa4928275 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 11:40:56 2011 +1000 dix: split client list retrieval out of DeliverEventToClients No functional change, but "other" was renamed to "clients". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 537c5f631d1f8d526e63355b7d88cb1fb2793492 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:21:18 2011 +0200 xkb: Fix case checks for Latin 4. That one was missing _XkbKSLower: XK_kra: U+0138 LATIN SMALL LETTER KRA Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 0b56a7f0ad01d3a86cdd7a14d5e567a00a3553f6 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:12:44 2011 +0200 xkb: Fix case checks for Latin 2. Those ones were getting _XkbKSLower for no reasons: XK_ogonek: U+02DB OGONEK XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 512a9750c197437889ff7f26a8d2bd242e030745 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:03:47 2011 +0200 xkb: Fix case checks for Latin 1. That one was missing _XkbKSLower: XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S That one was getting _XkbKSLower for no reasons: XK_division: U+00F7 DIVISION SIGN For reference, XK_multiply was already excluded from the _XkbKSUpper check, it's no big surprise XK_division has to be excluded from the _XkbKSLower check. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 635a1f50bc65512ec491fe71b9dfa8cf9118e2c2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 23 12:04:39 2011 +1000 input: allow for max < min for relative axes on InitValuatorAxisStruct Relative axes are initialized with 0, -1 but so far this never had any effect as all users of this function (for relative axes) just set it to the defaults anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8d1a414cca51e7f8a93470c5aa2e998f5ca1bc9a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 23 12:03:48 2011 +1000 input: switch InitValuatorAxisStruct to return Bool Return errors instead of silently ignoring them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5ac1f885f5c106b970835de36e13a9a7ea413df4 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 19:44:53 2011 +0000 Input: Add POINTER_EMULATED flag to GetPointerEvents POINTER_EMULATED merely sets XIPointerEmulated in the generated DeviceEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 78d8d6dd7f31cb903d5c8baf64181795736f33ed Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 14:23:25 2011 +0000 Input: Add vertical and horizontal scroll axes To be used for smooth scrolling with future driver APIs, replacing Rel Vert Wheel and Rel Horiz Wheel axes, which have not been used in any open driver to date. Combined with double-granularity ValuatorMasks, these axes allow for fine-grained scroll data to be sent to clients. Future commits allow drivers to post these scroll axes to QueuePointerEvents/GetPointerEvents, which take care of emulating legacy scroll button events. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit d8e42decbad4abe13265f4c546a0c561905d018f Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 18:54:14 2011 +0000 Input: Split GetPointerEvents body into a helper function For smooth-scrolling support, we want GetPointerEvents to generate multiple events, so split the body of the function out into a helper function in order to call it multiple times. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc8aad2376207b5ca9c74effae67fb8183222d2e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 3 19:48:15 2011 +0000 Input: Set last valuators in GetPointerEvents only Previously, various pieces of code, including acceleration, used to drop the values into DeviceIntRec::last.valuators. Remove all this and only do it in GetPointerEvents after all transformation, acceleration and clipping, so we're guaranteed to always have the correct values. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 94c19a0a72403fc522e3d05eeb57f35e111a2562 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 3 15:46:45 2011 +0000 Input: Convert DeviceIntRec::last to use doubles Change the last real user of a split integer/fractional co-ordinate system, DeviceIntRec's last->{valuators,remainder} to just have one set of doubles. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2d9beeb2174661d0a0732403ad4e49e9ff56718d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 3 15:36:55 2011 +0000 Input: Make DeviceEvent use doubles internally Change the DeviceEvent InternalEvent to use doubles for its valuators, instead of data and data_frac. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 626f487b97c99b48bf1d8c8ef4367a686639c3e6 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 3 15:06:45 2011 +0000 Input: Make RawDeviceEvent use doubles internally Change RawDeviceEvent to use doubles for valuators internally, rather than data(_raw) and data(_raw)_frac. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3b7fb0f68dc0d40c968c2cfc9bb74b1d0fb48bc8 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 17:18:48 2011 +0000 Input: Modify mask in-place in positionSprite Instead of taking pointers to x and y values to modify in positionSprite, just modify the mask (as well as dev->last) in place. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 629a575261c08ca67324fea4c975636a1a95dc75 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 17:04:57 2011 +0000 Input: Convert positionSprite and GetPointerEvents to double Use doubles internally in both of these functions, eliminating most of the remaining int co-ordinate usage. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 51437995a5041a8c53c33b508b1607c78a5fa463 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 16:50:55 2011 +0000 Input: Don't call positionSprite for non-pointer devices If the device doesn't have any valuators, or if it has less than two of them, don't bother calling positionSprite. Users with one-dimensional pointing devices may be upset. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4c364a312daf2b743a0a60b9907f671804a1b1b6 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 16:49:53 2011 +0000 Input: Convert rescaleValuatorAxis to double Instead of passing fractional pointers around everywhere, just pass doubles instead. Much easier. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5680fa41ea3373651f7017898a307e97cf29b0d3 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 16:30:30 2011 +0000 Input: Remove x and y from moveAbsolute/moveRelative Both these functions modify the mask and pDev->last.{valuators,remainder} in-place now, so there's no need to pass in pointers to local x and y values. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0882b788da97c75e464eb352dac1d83c938a148e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 16:27:31 2011 +0000 Input: Convert acceleration code to using ValuatorMask Instead of passing a set of int* to the acceleration code, pass it a mask instead, which avoids an unfortunate loss of precision. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 2b8f1d07bd42c9d3db3dbacfe6a1335e47236a6c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 15:37:53 2011 +0000 Input: Widen pointer acceleration types to double This widens almost all of the float-using code in ptrveloc.[ch] to doubles, other than values coming from properties which are specified to be floats by the property API. Bumps input API to v14 as this changes the AccelScheme signature, as used by xf86-input-synaptics. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 8a4a4e1b8a33899653d68a21bb7ff0557a576338 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 9 15:26:55 2011 +0100 Input: Use trunc instead of lrintf in acceleration code For compatibility with all the rest of the input code. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit e1df51421bc392d57f88c831fe0661871a8aa769 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 13:34:32 2011 +0000 Input: Set fractional member in set_raw_valuators RawDeviceEvents have space for fractional valuator members, so might as well start using them. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit cdf202250ef616f3b261db70da30e421ea59a630 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 14:50:29 2011 +0000 Input: Convert transformAbsolute to work on doubles Change transformAbsolute to use doubles internally. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3463078f9697fad0ee11837d80e88889fc6a28a4 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 13:29:24 2011 +0000 Input: Convert clipAxis, moveAbsolute and moveRelative to double Change all these three to use doubles internally, though the outputs of moveAbsolute and moveRelative are still truncated to int. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 4e52cc0ef48145134cd58d357fb7289e6f8bb709 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 13:20:37 2011 +0000 Input: Prepare moveRelative for conversion to double Shuffle some code around in moveRelative to make the conversion to double easier later. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 80fdf9ca33a8f50f98a4b1a3279e66b040353b80 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 13:19:00 2011 +0000 Input: Prepare moveAbsolute for conversion to double Shuffle some code around to make moving to double easier later. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6a6b4eb05c7822860e2362fa9b8441fc67055e27 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 17:22:59 2011 +0000 Input: Store clipped absolute axes in the mask Change moveAbsolute to be more symmetric with moveRelative by storing a clipped axis value back in the mask, rather than just in dev->last.valuators. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7e919ef5bfa94d51a06eefb150ab947bdbfb6885 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Feb 23 17:28:18 2011 +0000 Input: Add double-precision valuator_mask API Add API for valuator_mask that accepts and returns doubles, rather than ints. No double API is provided for set_range at the moment. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 79d4deb76d5612b75ef26b4549b7ade3a656687d Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Feb 23 14:31:01 2011 +0000 Input: Convert ValuatorMask to double-precision internally Switch the ValuatorMask struct to using doubles instead of ints for the actual values. Preserve the old int API, and (attempt to) round towards zero for values we return. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 60a766a96f9ec97adf6d0273f70ec23f313a11c6 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 9 16:02:47 2011 +0100 Input: Add flags to RawDeviceEvent Add a flags member which will be copied wholesale into the resultant xXIRawEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 5d62c32981dbe9630bed32567b55008b536c81c5 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Dec 27 13:24:35 2010 +0000 Input: Add flags to DeviceEvent Add a flags member which will be copied wholesale into the resultant xXIDeviceEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38e9e28ba2fbffee52ad9889ef6d4e94c7af3e10 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Sep 20 20:39:06 2011 -0700 XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 206b30ebc608d29a91cc18665d89e887cac4dba3 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Sep 22 18:55:19 2011 -0700 Address regressions from e8ff555b95ba and d206d52f657c to work with other compilers 1) The error attribute appeared in gcc-4.3 2) The return type of __builtin_constant_p is int 3) Sun Studio 12.0 and later builtin support for __builtin_constant_p Found by Tinderbox. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit afb1fe695d197187a301c19863a128a65389b15c Merge: 7fb4bef03 c7163fdd3 Author: Keith Packard <keithp@keithp.com> Date: Mon Sep 26 20:24:15 2011 -0700 Merge remote-tracking branch 'whot/next' commit c7163fdd302f706a3d67f0fdf93eeb3396bb3332 Author: vdb@picaros.org <vdb@picaros.org> Date: Wed Aug 31 07:23:01 2011 +0200 xfree86: .BI style: monitor section in xorg.conf man page The xorg.conf manual uses the following convention in most of its sections: bold = text to be copied literally to the config file, italic = a symbolic name to be substituted by a true value. Some configuration keywords seem to have been changed into generic options. Prepending Option to the manual entry swapped the bold-italic logic. This patch restores the convention in the monitor section and consists of -.BI "Option " "\*qPreferredMode\*q " \*qstring\*q +.BI "Option \*qPreferredMode\*q \*q" name \*q modifications. Plus a few minor changes (Modes → Mode) and a typo fix. Signed-off-by: Servaas Vandenberghe Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4b4caecb7d2c8e0b7e4fedc95fba2a728bbc25e6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 6 09:33:43 2011 +1000 xfree86: expose Option "TransformationMatrix" Recent changes to the server change the default absolute input device behaviour on zaphods to span the whole desktop too. Since these setups usually use an xorg.conf, allow the transformation matrix to be specified in the config as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit cf51424a34fb2b567a867338ab44f83b5c43251c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 6 09:39:01 2011 +1000 xfree86: use subheader for Pointer Acceleration parts in xorg.conf(5) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9125952b407090b040bffb3d752288293137cf77 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 5 15:43:14 2011 +1000 xfree86: fix comment typo Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2d2dce558d24eeea0eb011ec9ebaa6c5c2273c39 Author: Sam Spilsbury <sam.spilsbury@canonical.com> Date: Wed Sep 14 09:58:34 2011 +0800 Remove the SendEvent bit (0x80) before doing range checks on event type. Some extension libraries may set this bit before converting the event to wire protocol and as such range checking the event will cause an invalid BadValue error to result. As the documentation suggests the the bit should be "forced on", remove it before doing range checks and continue to force it on in the server. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f52d5cd374563544dafe29587411f345e31bbdf8 Author: Carlos Garnacho <carlosg@gnome.org> Date: Wed Aug 31 00:46:52 2011 +0200 Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices The corresponding DeviceIntPtr wasn't being gotten properly, resulting in BadDevice from dixLookupDevice(). Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 24823f1ab0f16e0815ef44340894537dc4babf6a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 3 16:01:28 2011 +1000 xfree86: switch options from pointer to XF86OptionPtr In all cases, the pointer was simply type-cast anyway. Let's get some compile-time type safety going, how about that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Squashed in: xfree86: Move definition of xf86OptionPtr into separate header file The pile of spaghettis that is the xfree86 include dependencies make it rather hard to have a single typedef somewhere that's not interfering with everything else or drags in a whole bunch of other includes. Move the xf86OptionRec and GenericListRec declarations into a separate header. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 284328a6beb0bd0ab6653973ce52b5a68b4e791f Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 17:04:56 2011 +0800 glamor-ddx: Rename glamor.c to glamor_ddx.c. As glamor's dix module already has a glamor.c, rename this glamor.c to other name to avoid file name conflict which may confuse gdb. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 101b69dddff6cc538cb369c70377bbad825aa765 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 16:33:52 2011 +0800 glamor: Check libgbm if enable glamor ddx. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 6a7ad1c92934b35eb2431c3e0f11c0c56a097dc9 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 16:13:57 2011 +0800 glamor-ddx: Don't double free the cursor memory. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit fe4c95ce843afffed981ac8bb89ca433bd20f1e2 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 16:08:29 2011 +0800 glamor: Refine the screen pixmap initialization for Xephyr. The previous implementation is to override the CreatePixmap firstly and assume the first call to CreatePixmap must be screen pixmap. This is not clean. Now Refine it to normal way. Let the Xephyr to set texture 0 to screen pixmap during creating screen resources. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1fb58860cc02d28545c66a916956a45918596870 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 16:05:52 2011 +0800 ephyr-glamor: Implment gl disptach function for host glx. We should pass back the glXGetProcAddress to the underlying gl dispatch initialization function to get those gl function pointers. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit df070205600cd736750d8a43426976a518b1fbae Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 26 16:01:03 2011 +0800 ephyr-glamor: Set texture 0 to screen pixmap. In Xephyr, screen pixmap is different from other pixmap. It use fbo zero and texture zero. We initialize it during creating screen resources. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 937d3bcecf04305c01159f5c5084833f28014061 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Sep 22 13:39:01 2011 +0800 glamor: Correct the version check for GLES2. If we are using GLES2, then the version number should be no less than 2.0 rather than no less than 1.3 which is for GL API. commit 483717484afb4ccf5b48483b3a21a9fe91213dd4 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Sep 20 17:15:12 2011 +0800 glamor-ddx: Destroy all the pixmap cursors when close current screen. As now we use pixmap to handle cursor, and pixmaps are related to current screen. If we close the screen, then we have to destroy all the related cursors. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit f1c36c611efaa56e49758d8e8b19d07c10a8277e Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Sep 20 17:10:50 2011 +0800 glamor-ddx: Don't need to call preInit in screen_init. The previous implementation call preInit again to reopen the device if the device is closed by eglTerminate. Now we don't need it anymore, as glamor dix doesn't call eglTerminate any more when close screen. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 09c63d320112fbb4995696d813c488e82915c2f5 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Sep 20 15:19:13 2011 +0800 glamor-ddx: Reuse glamor_dix module to handle egl platform. We already have a glamor egl module at glamor directory which could initialize and create egl context and also can attach a gbm buffer to a specified pixmap or to the screen pixmap. This commit remove all the duplicated code here and use the glamor_dix module directly. As we don't want to handle egl stuffs in this layer, we have to change the way to handle hardware cursor. Previous method is to call egl functions to create a egl image and then bind the image to a texutre then call gl functions to load texture image to the cursor bo. Now we can bind the cursor bo to a cursor pixmap and then use putimage to load new image to the cursor bo. Then we can completely avoid to call egl or gl functions directly in this ddx driver. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1590da001129ea61d6f7f8758d1d2842825be81b Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Sep 20 15:14:49 2011 +0800 glamor-egl: Add gbm device support. Latest mesa EGL implementation move to use gbm to manage/allocate buffers. To keep backward compatibility, we still try to use eglGetDRMDisplayMESA firstly, and if failed, then turn to use eglGetDisplay(gbm). Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 2d4d40a4b5938249f3c73ed14fe5c5b926c2fefd Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 19 09:45:32 2011 +0800 glamor-ddx: Fix the broken switching between VTs. Now we can allocate frame buffer during the screen initialization. And set mode major when enter VT. This is the correct logic. The previous implementation defer the set mode major to create screen resource which will cause the switching between VTs broken. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 4c8ed1756aa5121a559aa604926a730180a1403f Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Mon Sep 19 06:31:57 2011 +0800 glamor-ddx: Use gbm to allocate front buffer and cursor image. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 82a9b0c540dcf1064f5184c36a05d6216fb11034 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Sep 16 13:37:13 2011 +0800 glamor-ddx: Change naming of glamor ddx module. Use glamor_ddx prefix for all standalone glamor ddx functions. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 67dbe0ddf87a6dd602d3d4a6049072f6386d757e Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Sep 8 15:16:01 2011 +0800 glamor-egl: Added new function to create image for a pixmap. This function is used to support dri2. In the underlying driver, it will create a buffer object for a given pixmap. And then call this api to create a egl image from that buffer object, and then bind that image to a texture, and then bind that texture to the pixmap. Normally, this pixmap's content is shared between a dri2 client and the x server. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 2a9dfc963f610abfbf12d5efdf5ba5b3f55a4305 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Sep 8 15:14:43 2011 +0800 glamor: Re-arrange some macros/definitions in header files. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 0dff23d65b8bcec615f4c7a49efa7a5bf220b299 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Sep 8 14:05:46 2011 +0800 glamor: Don't direct call to any gl functions. Create a new structure glamor_gl_dispatch to hold all the gl function's pointer and initialize them at run time , rather than use them directly. To do this is to avoid symbol conflicts. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 7daf9af086624133d6c4857ed92d57ad2a492d86 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 31 17:43:46 2011 +0800 glamor: Let GLAMOR_DDX implicit GLAMOR. If user only enable GLAMOR_DDX, he must also want GLAMOR. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit f08988455cd4f6339187e74df8edb5783b61f8fa Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 30 18:24:53 2011 +0800 glamor: Route UnrealizeGlyph to glamor_glyph_unrealize. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 16659622708db82caaeb12527ba09545ad15b4c3 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 30 17:45:07 2011 +0800 glamor: Improve glyphs cache mechanism. This commit applying the latest uxa's glyphs cache mechanism and give up the old hash based cache algorithm. And the cache picture now is much larger than the previous one also. This new algorithm can avoid the hash insert/remove and also the expensive sha1 checking. It could obtain about 10% performance gain when rendering glyphs. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit bf4cbbd4e9c8ee104293a3c4eb202c880a139b73 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 30 17:37:47 2011 +0800 glamor: Move glamor_glyphs_init to create screen resources stage. As in glamor_glyphs_init, we may need to create pixmap. Thus it must be called after the pixmap resources allocation. Just move it to screen resource creation stage is good enough for mow. Also introduce a macro GLAMOR_FOR_XORG to glamor.h. As glamor may be used by Xephyr which doesn't don't have those xorg header files and also don't need the egl extension. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit ae38bd7c459982d3e05f6f672ee68d187e97421c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Aug 25 10:05:11 2011 +0800 glamor: Change glamor_egl_init API. Slightly change the API glamor_egl_init, as this initialization is to initialize the display not the screen, we should call it in xxx_preinit rather than xxxScreenInit(). we change the input parameter as below, as in preInit, the screen may not be allocated at all. And in glamor_egl_init, it will not call glamor_init. Driver should call glamor_init at screen_init stage. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit d4f4d1272e1745752840eb7e8ec04eb155ac38d1 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 24 17:17:48 2011 +0800 glamor-egl: Fix direct call for glEGLImageTargetTexture2DOES. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 6cb4abca697c24bdc644502cce8a2ca9bbf131e3 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 24 17:13:35 2011 +0800 glamor: Remove the version check for EGL/gles. As PVR's gles2 has different version number from mesa's, just simply remove the version check here to let both platform could build it. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 60f14d60f6169272951d41d8ca9e0a294c2ca3d0 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 24 16:54:32 2011 +0800 glamor-egl: Move EGL surfaceless related code to dix module. The functions in glamor_egl.c could be shared by any egl back end drivers. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 3854409e9ad25418c6188f491410bb05eaf92fc6 Author: Zhenyu Wang <zhenyuw@linux.intel.com> Date: Mon Aug 22 23:27:24 2011 -0700 glamor: Fix direct call for glEGLImageTargetTexture2DOES Follow extension call rule to call glEGLImageTargetTexture2DOES. commit 54c91079d2bd21d3fd97b6d5fa3ba5c4a86b6337 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 23 14:04:07 2011 +0800 glamor-gles2: Add explicit precision qualifiers for gles2. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit b4f265c7f9bcb7824df19ea915ab32fe84d9ec53 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 23 13:30:54 2011 +0800 glamor: Fallback to software fb when repeat is needed. Need to be fixed latter. We should not need any fallback here. But currently, the implementation for repeating tiling is broken. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit bd0ea43f3999e29ae5953ca5257b1795916dd5e7 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 23 13:27:48 2011 +0800 glamor: Change to use the original drawable in glamor_fill. As glamor_fill may fallback to software rasterization, we'd better to use the original drawable as input paramter. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 65812b538f23bfccc32a7bbc0b2c4e93e1cd8fe8 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 23 10:31:50 2011 +0800 glamor-dix: Make a glamor dix module. And modify the header file to export three APIs to the ddx driver. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit ef3ea0f46bf1b688249cd37d54cfa67ec55041b0 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Aug 19 11:06:56 2011 +0800 glamor: Don't need to check status when set the target. As we already checked the status when create the fbo. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 52cce9333fed2035da9623f338428a5d220b577d Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Aug 19 11:05:21 2011 +0800 glamor: egl version 7.11 should be ok for us. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 3648e35b5d0ffcb2ea5d40c842a7f8dd39b27b50 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Aug 19 10:53:44 2011 +0800 glamor-ddx: Add code to check required egl extensions. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit eaa07998c432f68485423c4d108220ce1d72e7b6 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 16 14:05:25 2011 +0800 glamor: Add device independent glamor to the installation package. Other ddx driver may link libglamor_dix to utilize glamor. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1658454dea4330144ebc0b02e1b42feed6db4f41 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:33:35 2011 +0800 glamor: Fix the copy of overlaped region in one pixmap. Originaly, we use fbo blit to handle overlaped region copy. But GLES2 doesn't support that, just simply copy the needed region to another texture can fix this problem. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 1f129c491bfc825465c3bc0e9b745b7f66dea720 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:32:57 2011 +0800 glamor: Convert pixmap to supported format before getspans. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 67da52ec13a87846201a99d5a31db28668d9fdfd Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:21:09 2011 +0800 glamor: Add color conversion support by using new shader. There are two places we need to do color conversion. 1. When upload a image data to a texture. 2. When download a texture to a memory buffer. As the color format may not be supported in GLES2. We may need to do the following two operations to convert dat. a. revert argb to bgra / abgr to rgba. b. swap argb to abgr / bgra to rgba. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 0eea084db54fb88b9933fd1326a2b0b059b3f9d7 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:20:01 2011 +0800 glamor: GLES2 doesn't support glEnable/Disable Texture 2D. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 504e03c0b59f4dc3b8058abdce79706a72cd0dde Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:17:58 2011 +0800 glamor: GLES2 doesn't support GL_CLAMP_TO_BORDER. Simply comments it out. Need revisit latter. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit f84cc8b84b2944b60eb2a8225e3c44a1cdfb228d Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 16 00:09:38 2011 +0800 glamor-ddx: Hardware cursor's format should be GL_RGBA. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 23c1fba5e5a5fe8dd18c4c8a9b5a958ce4671160 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sat Aug 13 15:41:18 2011 -0400 glamor: Remove glu3 which is unnecessary. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit a228effbeb339ae6f0b73c633022b3ec9981148f Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:56:02 2011 -0400 glamor: Remove useless glVertexPointer related code. As glVertexPointer is not supported by GLES2, I totally replaced it by VertexAttribArray. This commit remove those old code. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 5cbb2a4ca05f696d2af9a2e50bf106b6f2acd1c6 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:35:26 2011 -0400 glamor: Only fallbac glamor_setspan when we are using gles2. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 667d65534d64df30146cfa0d32522bced51e0697 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:27:12 2011 -0400 glamor: Unify the variable name which used to indicate no alpha. The original code use different name and the name is vague. Now change it to no_alpha. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 5e7fdbb498c47b6e89280b8354f0ebaaf61d0646 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:08:12 2011 -0400 glamor: Disable ALPHA8 fbo. As some platform doesn't support to use ALPHA8 texture as draw target, we have to disable it. It seems there is no easy way to check that. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 172e8cfcd411b1abeaf8ede2e3882d6198cee5b8 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:05:02 2011 -0400 glamor: Remove GLEW dependency. Glamor doesn't need to use GLEW. We can parse the extension by ourself. This patch also fix the fbo size checking from a hard coded style to a dynamic checking style. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 2146a25bac4392c47ef06ecddbf12db184926b7e Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 15:03:48 2011 -0400 glamor-ddx: Silence one warning. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit d66bd9714e1e1af4267fb4eb208143a070e65ee3 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Thu Aug 11 09:54:28 2011 -0400 glamor: Concentrate FBO's creation to one function. And add status checking for it. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit b2bff334ce4f36352497f1c1d4e9f0e5b3336136 Author: Zhenyu Wang <zhenyuw@linux.intel.com> Date: Tue Aug 9 19:37:17 2011 -0700 glamor: Require libdrm CFLAGS for building Need to depend on libdrm CFLAGS for glamor building. commit 41b13fbd264594f88905b1cf8dcb2f14e7ee5b69 Author: Zhenyu Wang <zhenyuw@linux.intel.com> Date: Wed Aug 10 01:42:26 2011 -0700 glamor: Use function pointer to get extenstion calls This is the formal usage for extension functions. commit 7aecfa245facf754ff8e09d6ef1ad0ab802156fc Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 9 10:01:39 2011 -0400 glamor-es2: Add --enable-glamor-gles2 to build system. Now, to build a gles2 version of glamor server, we could use ./autogen.sh --enable-glamor-ddx --enable-glamor-gles2 Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 36a93f62c7830af088a54514eab6bf4d92423df6 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 9 09:59:56 2011 -0400 glamor_gles2: Use gl_flavor to determine which version of GL. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 29e358f6b3838a56b53ec809665f2e7be1731722 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue Aug 9 09:59:08 2011 -0400 glamor: Fix one typo error in README. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit ee33c947aac10b2b1ec2c5b070fbd81cef1773c6 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 3 16:52:19 2011 +0800 glamor-es: Use glVertexAttribPointer to replace glVertexPointer. As GLES2 doesn't support glVertexPointer. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 94d884a198b97ed2e78a38ce5a71955bdbf893f8 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Aug 3 10:49:18 2011 +0800 glamor-es2: Fix some non-es2 functions. ES2.0 doesn't support QUADS and also doesn't support some EXT APIs. Fix some of them in this commit. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 68c3c6eb0cafd5eb2c208dd76a3a65187256700c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 2 15:54:15 2011 +0800 glamor-es2: Add gles2 option. First commit to enable gles2 support. --enable-glamor-ddx --enable-glamor-gles2 will set thwo MACROs GLAMOR_DDX and GLAMOR_GLES2. Currently, the gles2 support is still incomplete. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 98f8ef5f991e3c9d4b434af9003c466ad1edc23e Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Aug 2 15:51:46 2011 +0800 glamor: Change to use official APIs rather than ARB version function. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 0ef1698be22750fb14418bd418114fc63039db0c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 21 16:18:48 2011 +0800 glamor: Fix one bug for Xephyr. Xephyr doesn't has a bounded valid texture. It seems that we can't load texture 0 directly sometimes. Especially in the copyarea, function if that is the case, we prefer to use fbo blit to read the screen pixmap rather than load the bound texture. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 9b667ffd564910ff7373547ce2f8d4a7c5d71137 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jul 20 14:33:00 2011 +0800 glamor: Use small internal texture format if possible. Reduce some texture memory requirement and also save some bandwidth. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 01489f9da9aa357c59799d4d41c7ca96b4cbd1d8 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jul 20 14:02:15 2011 +0800 glamor: Add simple introduction of how to setup glamor xserver. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1f3f3baf1469e74767474ddb383e92502384de80 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jul 20 13:35:25 2011 +0800 glamor: Avoid 2D bitblit if possible. It turns out that the use of fbo blit is one of the root cause which lead to slow drawing, especially slow filling rects. We guess there should be a performance bug in the mesa driver or even in the kernel drm driver. Currently, the only thing glamor can do is to avoid calling those functions. We check whether the copy source and destination has overlapped region, if it has, we have to call fbo blit function. If it has not, we can load the source texture directly and draw it to the target texture. We totally don't need the glCopyPixels here, so remove it. By apply this patch, the rendering time of firefox-planet-gnome decrease to 10.4 seconds. At the same platform, uxa driver get 13 seconds. This is the first time we get better performance than uxa driver. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 5c4d53c5126bb9f603d04dac6874280b527319f5 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jul 20 13:06:23 2011 +0800 glamor: Implement delayed solid filling. When we need to solid fill an entire pixmap with a specific color, we do not need to draw it immediately. We can defer it to the following occasions: 1. The pixmap will be used as source, then we can just use a shader to instead of one copyarea. 2. The pixmap will be used as target, then we can do the filling just before drawing new pixel onto it. The filling and drawing will have the same target texture, we can save one time of fbo context switching. Actually, for the 2nd case, we have opportunity to further optimize it. We can just fill the untouched region. By applying this patch, the cairo-trace for the firefox-planet-gnome's rendering time decrease to 14seconds from 16 seconds. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1caf741a4a41ef46a43980ba0be897770fea13db Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jul 20 13:02:28 2011 +0800 glamor: Fixed a bug when computing the bounds of boxes. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit fe0a6a29300055f8288c9d1f470fd3e24f5bb3bb Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 7 16:54:18 2011 +0800 glamor: Should return when done gl drawing. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 7fbdc60fd4eb94c02b0b89d05cfe0243c3562ec1 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 7 15:32:39 2011 +0800 glamor: comment out the message when creating a system memory pixmap. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit f961390db6fa0707895effb2e7672edda575f8ec Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 7 15:31:35 2011 +0800 glamor: Don't need to pad the tile image if pixmap is ni texture. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 77ecd366933bbe726a4a7e57e35b1510b675df8d Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 7 15:30:19 2011 +0800 glamor: We don't need to check format in compositing. We already handle all format checking in pixmap uploading and converting, don't need to do that again. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 477a54bc9ed8f252b3a42af8ac01ef1da7b5ab6b Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jul 7 14:47:51 2011 +0800 glamor: Fixed two unintialized warnings. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit d49d48257917a4a900c84dae111d3f5e761a8d89 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sat Jul 2 14:47:38 2011 +0800 glamor: Fix multiple crtc setup. Now, support dual crtc configuration. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit fc23334e54b0b90d2f00b017a03cf47b70dc71aa Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Fri Jul 1 23:51:42 2011 +0800 glamor: Optimize fallback case for the polylines. When fallback to cpu for the polylines procedure, we can just download required region to CPU rather than to download the whole pixmap. This significant improve the performance if we have to fallback, for example do non-solid filling in the game Mines. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit da66a76f276eccee90855bc0cb28092c3755ed7b Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Fri Jul 1 23:48:21 2011 +0800 Revert "glamor: Don't need to read dest if op is SRC or CLEAR." This reverts commit eb16fe0b7c8ea27b5cf9122d02e48bf585495228. As currently glamor_prepare_access/finish_access will touch the whole pixmap, not just the request region, then write only mode will not work correctly. We may need to revisit all fallback case, and convert the image to the right size before do the prepare/finish processing. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit cb3b34ec53e00c6ca212891b314f473ee2f80a40 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Fri Jul 1 22:54:45 2011 +0800 glamor-ddx: Add missed drmmode_crtc_destroy function. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit c68fb6ed723d7268a3c4950b40c20ddf9b4b9ca5 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Fri Jul 1 22:36:31 2011 +0800 glamor-ddx: Reinit crtc if we need to reopen the card. As the eglTerminate will close the card when close screen, we may need to reopen it at next time create a screen resource. and thus we need to re initialize the drmmode crtc also. Otherwise , the cursor handling will be broken as it has the wrong fd. commit ca614860fa2a56d469064b5e05070d8201597728 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jul 1 17:02:10 2011 +0800 glamor: convert if too large source or mask . Some strange web page has 20000*1 png picture, and actually only use partial of it. We force to convert it to a actuall size rather than its original size,if it is the case. Then to avoid latter's failure uploading. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1444fed4a8030ec59f4448b490f2f77db86f0b86 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:53:24 2011 +0800 glamor: silence compilation warnings. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 734b10e9f7e729fc300ed432bd3c81e1ea7483f3 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:50:23 2011 +0800 glamor: Fix one typo bug in glamor_tile. It will return when the destination pixmap has a fbo but will continue when it doesn't have a fbo. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 2eb40a37920132d53e3b48830704f92d4c695f4c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:49:40 2011 +0800 glamor: Remove one extra area copy in glamor_glyph. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 61e1ad39724e5baaed4f30ff3c86782e701f19fb Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:40:32 2011 +0800 glamor: Reduce source or mask picture size if possible. If we only need a short part of the source or mask's drawable pixmap, we can convert it to a new small picture before call to the low level compositing function. Then it will only upload the smaller picture latter. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 14503fbb819d07fa2b58d9bb741b55f93aff2cf6 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:38:43 2011 +0800 glamor: Fix the coords calculation in glamor_fill. glamor_fill is only called from internal functions glamor_fillspancs and glamor_polyfillrect. And both functions already add the offset to the coords, so the coords are already relative value, we can't add the offset once again. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 1dca5d7b91ed6fced34f389453678407bc223e9c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:04:59 2011 +0800 glamor: Reduce source pixmap's size. If the dest pixmap is in texture memory, but source pixmap is not. Then we need to upload the source pixmap to texture memory. Previous version will upload the whole source pixmap. This commit preprocess the source pixmap, and reduce it to a smaller tempory pixmap only contains the required region. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 33c6c78ae9c7e72a94cc27536f3b5f50cdcc9241 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu Jun 30 16:01:57 2011 +0800 glamor: Add one option to force create a cpu memory pixmap. Some special case we want to get a cpu memory pixmap. For example to gather a large cpu memory pixmap's block to a small pixmap. Add pixmap's priviate data's deallocation when destroy a pixmap. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 8890b38857128181cf506356046bf4a5bce53ab0 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Jun 28 17:17:23 2011 +0800 glamor: Don't map the vbo to system memory. Access mapped vbo address is too slow. And by use system memory directly, rgb10text/aa10text increases from 980K/1160K to 117K/140K. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit c303949aabacb6a105ca0e0c521ca293dbda7d43 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Jun 28 14:49:38 2011 +0800 glamor: Reduce one extra copy in glamor_trapezoids. This reduce the time when running cairo-performance-trace with the firefox-planet-gnome.trace from 23.5 seconds to 21.5 seconds. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 9e4567afe6019ed7a330182d660880d8ea6c3685 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Jun 28 14:37:29 2011 +0800 glamor: Change to use system memory for write only access. If the pixmap is write-only, then use a pbo mapping will not get too much benefit. And even worse, when the software rendering is access this mapped data range, it's much slower than just using a system memory. From the glamor_prepare_access glamor_finish_access view, we have two options here: option 1: 1.0 create a pbo 1.1 copy texture to the pbo 1.2 map the pbo to va 1.3 access the va directly in software rendering. 1.4 bind the pbo as unpack buffer & draw it back to texture. option 2: 2.0 allocate a block memory in system memory space. 2.1 read the texture memory to the system memory. 2.2 access the system memory and do rendering. 2.3 draw the system memory back to texture. In general, 1.1 plush 1.2 is much faster than 2.1. And 1.3 is slower than 2.2. 1.4 is faster than 2.3. If the access mode is read only or read write, option 1 may be fater, but if the access mode is write only. Then most of the time option 1 is much faster. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 4afa9e4080eebbee0752e5f45b2ff16df75cb9b1 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Jun 28 14:28:19 2011 +0800 glamor: Prepare/finish access once if src equal to dst. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit cbedfe75135e3253c32ac8b89380f47d1b8a37c4 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun Jun 26 20:00:26 2011 +0800 glamor: Don't need to read dest if op is SRC or CLEAR. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit b8e692d94eb7075409e0d072fdf3066ca1d5d5f3 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun Jun 26 15:54:24 2011 +0800 glamor: Move the blend set up after the pixmap uploading. This is a bug, as if we do blend set up before do the pixmap dynamic uploading. We will have a incorrect blend env when doing the uploading. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit bf782283371bc13c7b969a373c2a2eaaa3c81ec6 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun Jun 26 15:51:47 2011 +0800 glamor: Fixed one bug when enable dynamic pixmap uploading. When try to upload a pixmap without yInverted set, we must set up a fbo for it to do the y flip. Previous implementation only consider the ax bit. After fix this problem, we can enable the dynamic uploading feature in copyarea function when the yInverted is not set (from Xephyr). Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit 489e6c4e6f734d961ae8bbec67d78fccbeb9781f Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun Jun 26 15:49:13 2011 +0800 glamor: Initialize pixmap private's container to correct value. When calling from ephyr, we forgot to initialize it to the correct value. Will cause segfault when run Xephyr. Signed-off-by: Zhigang Gong <zhigang.gong@gmail.com> commit ca36ada041558d1823b12b1a0141e43b9f9ad939 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 22 18:15:02 2011 +0800 glamor: Don't always fallback everything when change window attr. Change the glamor_change_window_attributes's handling. We don't need to fallback every thing to cpu at the beginning. Only when there is a real need to change the pixmap's format, we need to do something. Otherwise, we need do nothing here. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit ca1908e11dcb56cb952f6bce55503e932aa9a27c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 22 14:33:38 2011 +0800 glamor: Concentrate and reduce some coords processing code. Concentrate the verties and texture coords processing code to a new file glamor_utils.h. Change most of the code to macro. Will have some performance benefit on slow machine. And reduce most of the duplicate code when calculate the normalized coords. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 355334fcd99e4dce62e2be1e27290c9a74ea944f Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Tue Jun 21 18:31:11 2011 +0800 glamor : Add dynamic texture uploading feature. Major refactoring. 1. Rewrite the pixmap texture uploading and downloading functions. Add some new functions for both the prepare/finish access and the new performance feature dynamic texture uploading, which could download and upload the current image to/from a private texture/fbo. In the uploading or downloading phase, we need to handle two things: The first is the yInverted option, If it set, then we don't need to flip y. If not set, if it is from a dynamic texture uploading then we don't need to flip either if the current drawing process will flip it latter. If it is from finish_access, then we must flip the y axis. The second thing is the alpha channel hanlding, if the pixmap's format is something like x8a8r8g8, x1r5g5b5 which means it doesn't has alpha channel, but it do has those extra bits. Then we need to wire those bits to 1. 2. Add almost all the required picture format support. This is not as trivial as it looks like. The previous implementation only support GL_a8,GL_a8r8g8b8,GL_x8r8g8b8. All the other format, we have to fallback to cpu. The reason why we can't simply add those other color format is because the exists of picture. one drawable pixmap may has one or even more container pictures. The drawable pixmap's depth can't map to a specified color format, for example depth 16 can mapped to r5g6b5, x1r5g5b5, a1r5g5b5, or even b5g6r5. So we can't get get the color format just from the depth value. But the pixmap do not has a pict_format element. We have to make a new one in the pixmap private data structure. Reroute the CreatePicture to glamor_create_picture and then store the picture's format to the pixmap's private structure. This is not an ideal solution, as there may be more than one pictures refer to the same pixmap. Then we will have trouble. There is an example in glamor_composite_with_shader. The source and mask often share the same pixmap, but use different picture format. Our current solution is to combine those two different picture formats to one which will not lose any data. Then change the source's format to this new format and then upload the pixmap to texture once. It works. If we fail to find a matched new format then we fallback. There still is a potential problem, if two pictures refer to the same pixmap, and one of them destroy the picture, but the other still remained to be used latter. We don't handle that situation currently. To be fixed. 3. Dynamic texture uploading. This is a performance feature. Although we don't like the client to hold a pixmap data to shared memory and we can't accelerate it. And even worse, we may need to fallback all the required pixmaps to cpu memory and then process them on CPU. This feature is to mitigate this penalty. When the target pixmap has a valid gl fbo attached to it. But the other pixmaps are not. Then it will be more efficient to upload the other pixmaps to GPU and then do the blitting or rendering on GPU than fallback all the pixmaps to CPU. To enable this feature, I experienced a significant performance improvement in the Game "Mines" :). 4. Debug facility. Modify the debug output mechanism. Now add a new macro: glamor_debug_output(_level_, _format_,...) to conditional output some messages according to the environment variable GLAMOR_DEBUG. We have the following levels currently. exports GLAMOR_DEBUG to 3 will enable all the above messages. 5. Changes in pixmap private data structure. Add some for the full color format supports and relate it to the pictures which already described. Also Add the following new elements: gl_fbo - to indicates whether this pixmap is on gpu only. gl_tex - to indicates whether the tex is valid and is containing the pixmap's image originally. As we bring the dynamic pixmap uploading feature, so a cpu memory pixmap may also has a valid fbo or tex attached to it. So we will have to use the above new element to check it true type. After this commit, we can pass the rendercheck testing for all the picture formats. And is much much fater than fallback to cpu when doing rendercheck testing. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit ba6dd8aa492d9d555d8b175bcf350e5db1821597 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 18:32:15 2011 +0800 glamor: Simplify fill acceleration for spans/polyfillrect by only clipping once. This commit was borrowed from uxa driver contributed by Eric. commit number is e0066e77e026b0dd0daa0c3765473c7d63aa6753. commit log paste as below: We were clipping each span against the bounds of the clip, throwing out the span early if it was all clipped, and then walked the clip box clipping against each of the cliprects. We would expect spans to typically be clipped against one box, and not thrown out, so we were not saving any work there. For multiple cliprects, we were adding work. Only for many spans clipped entirely out of a complicated clip region would it have saved work, and it clearly didn't save bugs as evidenced by the many fix attempts here. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit a0a52be73994c93521e94f1f10152ce851485ea3 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 16:51:27 2011 +0800 glamor: Fallback to fbPolylines for diagonal poly_line. It's better to give a correct output when we haven't implement all the code path. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit d7f8b888d0961af8d0ec6ad5c920ce758529b620 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 16:01:40 2011 +0800 glamor: For non-supported fill style fallback to fbFill. The previous implementation will just skip the rendering which is not good. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit b60e6cb66d3fba43d5403b2b5027537d09ee7c98 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 15:46:23 2011 +0800 glamor: Silence compilation warnings. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 229240e565f976de8e7b82dd606c2e862152b2b5 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 14:07:54 2011 +0800 glamor: Add render triangles support. By default, fallback to frame buffer currently. This commit makes us pass the rendercheck's triangles testing. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit ac0589c91699433bc9dbc25b7edff456dff742a4 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Jun 10 14:02:19 2011 +0800 glamor: Use software fb for 1bpp pixmap. For 1bpp pixmap, software fb get better performance than GL surface. The main reason is that fbo doesn't support 1bpp texture as internal format, so we have to translate a 1bpp bitmap to a 8bit alpha format each time which is very inefficient. And the previous implementation is not supported by the latest OpenGL 4.0, the GL_BITMAP was deprecated. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 3c44e3e0ce1e286e0540298d5db547c43903629f Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 1 19:35:15 2011 +0800 glamor: Optimize composite when soure/mask is xrgb. Added a new shader aswizlle_prog to wired the alpha to 1 when the image color depth is 24 (xrgb). Then we don't need to fallback the xrgb source/mask to software composite in render phase. Also don't wire the alpha bit to 1 in the render phase. This can get about 2x performance gain with the cairo performance trace's firefox-planet case. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 0e2af4d0c942405dd0869f1e6a1effee943de139 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 1 18:14:01 2011 +0800 glamor: Don't print those fallback messages by default. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit 925fc9724ff72d9e2a4940d7a1e39c23fb3ec9f0 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 1 18:02:03 2011 +0800 glamor: Optimize glamor_finish_access. use pbo if possible when we load texture to a temporary tex. And for the previous direct texture load function, it's not correct and get removed in this commit. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> commit b8ce483f58112f200dec9853fcd7ff455479990f Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Jun 1 17:54:01 2011 +0800 glamor: Don't use glamor_pixmap_type currently. Added comments to glamor_pixmap_create. To be refined in the future. We need to identify whether a pixmap is a CPU memory pixmap or a GPU pixmap. Current implementation is not correct. There are three cases: 1. Too large pixmap, we direct it to CPU memory pixmap. 2. w ==0 || h == 0 pixmap, this case has two possibilities: 2.1 It will become a screen pixmap latter, then it should be GPU type. 2.2 It's a scratch pixmap or created from a share memory, then it should belong to CPU memory. XXX, need to be refined latter. commit 28835be1b8a05e510aa7fcc2f331771e3cf7dfec Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Tue May 24 22:01:49 2011 +0800 glamor: improve glamor_finish_access. When the platform's coordinate system is the same as X11's . We can load the texture to the fbo directly without one extra texture transformation. commit 1edf0cc6ab340c98fde201328631ca61e9d871a1 Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun May 22 23:45:51 2011 +0800 glamor: Don't write back read only pixmap to fbo. For those pixmap which has valid fbo and opened as GLAMOR_ACCESS_RO mode, we don't need to upload the texture back when calling the glamor_finish_access(). This will get about 10% performance gain. commit 1495ba9e64633476508febb01ec2e9594a7b466b Author: Zhigang Gong <zhigang.gong@gmail.com> Date: Sun May 22 17:51:27 2011 +0800 glamor: Use buffer object as much as possible. Change the row length of 1bit color depth pixmap to the actual stride. The previous implementation use the width as its stride which is not good. As it will waste 8 times of space and also bring some non-unify code path. With this commit, we can merge those 1bit or other color depth to almost one code path. And we will use pixel buffer object as much as possible due to performance issue. By default, some mesa hardware driver will fallback to software rasterization when use glReadPixels on a non-buffer-object frame buffer. This change will get about 4x times performance improvemention when we use y-inverted glamor or the driver support hardware y-flipped blitting. commit 529c38a4601e8f0712773bf29a48cddfa7a5edc4 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 19 18:03:12 2011 +0800 glamor-ddx: Remove debug message when moving cursor. commit cd43b1ea831eac11bc6ad0c3b1e040bb968b9861 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 19 18:02:19 2011 +0800 glamor: Add fallback code path for glamor_fill. commit 8593f22fb8fc5e0d0f406d9c94cca22347505fd6 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 19 17:59:19 2011 +0800 glamor: glamor_set_alu should enable GL_COLOR_LOGIC_OP. GL_COLOR_OP seems not supported in current MESA. commit f871d174a861e7c3d2b8f4d9a3f10c38a5120606 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 19 11:40:38 2011 +0800 glamor: Switch to software fb for too large pixmap. If pixmap's size exceeds the limitation of the MESA library, the rendering will fail. So we switch to software fb if it is the case. Add one new element for pixmap private structure to indicate whehter we are a software fb type or a opengl type. commit 74ca45e7d0ed6654204189793261ef65f213bb2e Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed May 18 16:48:06 2011 +0800 glamor-ddx: Fixed one bug when a client reset the connection. This commit fixed two bugs when one client reset the connection. The first is that we should reopen the graphic device when the previous node was closed during the screen closing. The second one is we should call glamor_close_screen (not the ddx version) prior to call eglTerminate(). As eglTerminate will release the share library. And the glamor_close_screen may still need to call openGL APIs and thus will hit segfault. And renamed the ddx functions to avoid naming conflications with the glamor functions. commit c97d4533f29e77d80c076deff9ad0f218eb2e8f4 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 12 14:49:08 2011 +0800 glamor: Silent compilation warnings due to some deprecated APIs. those xcalloc/xfree/xalloc/XNFprintf/... are deprecated. Replace then with the new one. And fix some other minor problems. commit e3295d4106ac5b62f63e32dcb24a6094194cb1a8 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 12 10:22:07 2011 +0800 glamor-ddx: Move the cursor EGL image to crtc strcture. Cursor is a per crtc resource. And this commit also fix the cursor initialization regard to the latest mesa EGL code. Now hardware cursor works fine. commit 43280372686177603111b175e92e1c88ad4ccdee Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 12 01:42:05 2011 +0800 glamor-ddx: Fix a compiling error. Need revisit. GC is redefined in the X11/Xlib.h and include/gcstruct.h which is a xorg header file. Just use a macro to simply avoid the conflict. Need revisit latter to find a correct way to fix this problem. commit 18a52e23882e4664fdb2de4958c4f9c97e16068c Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 12 01:37:52 2011 +0800 glamor-ddx: Migrate the code to latest mesa library. Use eglCreateDRMImageMESA to create surfaceless image. And then export the drm buffer back which can be used to create the frame buffer. commit eb3487a448ff0efa46079323821d65d7c3e4d872 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Thu May 12 01:08:38 2011 +0800 glamor: Add new feature which is to flip output on y axis. Due to the coordinate system on EGL is different from FBO object. To support EGL surface well, we add this new feature. When calling glamor_init from EGL ddx driver, it should use the new flag GLAMOR_INVERTED_Y_AXIS. commit 6dae8dc7ea6e7add3c6fda30773f264904ef8df5 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed May 11 15:57:05 2011 +0800 glamor: Add glamor-ddx driver to the build tree. Correct the linking parameters and add dependency to the libglamor.a. commit 26ff612171d53baef08078a852875d5ddf1804ed Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed May 11 15:54:50 2011 +0800 glamor: Resolved merge conflictions with Kristian's glamor-ddx patch. commit 49bf0e301e7317a02e8b34ec2e290fcfda520e7e Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Mar 5 14:53:35 2010 -0500 glamor ddx driver using EGL on KMS commit 47b6531273e3052b653194099a49ca11d80b12df Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Wed Apr 13 15:50:26 2011 +0800 glamor: Fixed one segfault bug when close screen. move the original glamor_fini to glamor_close_screen. And wrap the CloseScreen with glamor_close_screen, Then we can do some thing before call the underlying CloseScreen(). The root cause is that glamor_fini will be called after the ->CloseScreen(). This may trigger a segmentation fault at glamor_unrealize_glyph_caches() at calling into FreePicture(). commit 0d9e8db8d031d22b02df2c9b226287b1ca489f5a Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Apr 8 15:30:45 2011 +0800 glamor: Fixed one linking error. As current glamor implementation depends on the glx library in the mesa package which is conflict with the version in xorg. We have to --disable-glx when build Xephyr. But this leads to the linking error here. We comment out the calling to ephyrHijackGLXExtension() now. Need revisit latter. commit b3577a1c853d870f4d583a35d27012acb9099ef4 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Apr 8 15:24:55 2011 +0800 glamor: Merged with latest xserver. Merged with latest xserver, the major change is due to the API change of the management of devPrivates. commit 3105fe9f6491f37a1f82a9e6f03f4efaed6c7e92 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Apr 8 15:22:52 2011 +0800 glamor: Call glamor_composite_rects only when enable RENDER. commit f9843c7a35975b178eec9812d21e1f02a2120928 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Apr 8 14:53:15 2011 +0800 glamor: Fixed one conflict data type(XID) bug. We should include the dix-config.h for all the glamor files. Otherwise the XID type maybe inconsisitent in different files in 64bit machine. The root cause is this macro "#define _XSERVER64 1" should be included in all files refer to the data type "XID" which is originally defined in X.h. If _XSERVER64 is defined as 1, then XID is defined as CARD32 which is a 32bit integer. If _XSERVER64 is not defined as 1 then XID is "unsigned long". In a 32bit machine, "unsigned long" should be identical to CARD32. But in a 64bit machine, they are different. commit e194740c9413bbfefee6506a734e0c82c091dfa3 Author: Zhigang Gong <zhigang.gong@linux.intel.com> Date: Fri Apr 8 14:49:57 2011 +0800 glamor: Fixed some compiling and linking errors. Change the inline functions to static type, otherwise when linking it complains multiple definitions of those functions. commit 8cfcc614032320bb6a2eca2c61baeebf388d22ea Author: Eric Anholt <eric@anholt.net> Date: Fri Feb 19 07:14:13 2010 -0800 glamor: Add support for using EXT_framebuffer_blit to do CopyArea. commit d2da9d1c22d25d1f86ecd83c15ca9909fab8610a Author: Eric Anholt <eric@anholt.net> Date: Fri Feb 19 07:36:28 2010 -0800 glamor: Reduce the noise from wide lines "fallback". commit 955ccfbc34f370c80f7189ac5b0240e859e00b5f Author: Eric Anholt <eric@anholt.net> Date: Fri Feb 19 07:52:50 2010 -0800 glamor: Fix the segfault at screen fini. commit 003dee4c82f8af9e7749876c736018410f347440 Author: Eric Anholt <eric@anholt.net> Date: Fri Feb 19 06:10:11 2010 -0800 glamor: Replace the immediate mode in glamor_fill() with glDrawArrays(). commit 60775e21e3532452891e1b52589f7d5d7ef04b40 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 18 18:11:54 2010 -0800 glamor: Use a VBO to accumulate multiple glyph quads at once. This increases us from 23000 to 27000/sec on rgb24text. commit 8ce312e61952e9f2193c28ac6124eff30f3a122c Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 18 14:49:06 2010 -0800 glamor: Use glamor_composite_with_shader once per group of glyphs. This shaves CPU time in GL setup. Performance of rgb24text went from 18400/sec to 23500/sec. commit 6ce05e0b28052e5206694228218322f0dd3a6b00 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 18 14:44:20 2010 -0800 glamor: Convert the shaders path to handling glamor_composite_rect_t. commit 858ce0c1928c199435c9c2627f84c37c7ca7a38a Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 18 14:02:48 2010 -0800 glamor: Add support for component alpha rendering. Brings x11perf -rgb24text from 230/sec to 18400/sec commit d07fc66a056dd4eab2dac82b3784c482071d1915 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 18 09:23:22 2010 -0800 glamor: Rework shader setup to make extending the IN types easier. commit 8cefa287ddb4ed4ad178e751b35bb93b4a44e0ab Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 17 16:00:22 2010 -0800 glamor: Add a little mechanism for only printing fallbacks when they happen. Sometimes we want to try a couple of different methods for accelerating. If one of them says "no" and the other says "yes", don't spam the log about the "no." commit 5f5c35b56d3568f72e2305e74ed8457e0a787a3b Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 17 15:02:17 2010 -0800 glamor: Fix up the fallback message for no texture present on compositing. commit 2fa95725d845e5bf8a41ac776267be0d55d58004 Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 17 13:33:48 2010 -0800 glamor: Add support for a1 composite sources. They're stored just like a8, but the values are set to either 0.0 or 1.0. Because they're a8 with only two legal values, we can't use them as destinations, but nobody's rendering to a1 dests anyway (we hope). commit 9bcbcbf8c28e945fa5c4f4ad1a772b787618455f Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 17 13:30:20 2010 -0800 glamor: Fix and enable ZPixmap PutImage acceleration. commit 2ba634fab9b03995629497efdbf5305394011e4a Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 17:32:27 2010 -0800 glamor: Fix render source transforms. Fixes (except for small bit differences) cairo source-pattern. commit b1f67a5082420bbff141733833905f8ac95fe983 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 17:15:05 2010 -0800 glamor: Fix and enable glamor_get_spans(). This makes running the cairo test suite almost tolerable. commit f88d76cf7e05cf885d80c0b91f37f1b30675e928 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 16:51:13 2010 -0800 glamor: Enable glamor_fill_spans(). x11perf -wline100 performance goes from 8.8/sec to 111/sec. commit a63df0c504be3be0e969f5080a6593a55cb87246 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 15:00:32 2010 -0800 glamor: Fix up the wide/non-solid lines fallback. commit d61a13cf3f0a3028fbcf41310a4f5ecaa8546961 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 14:52:04 2010 -0800 glamor: Fix and enable tile fill acceleration (aka the root weave). commit 86a206525350b7e82ab0e432ad0fb8858960857d Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 13:40:28 2010 -0800 glamor: Fix off-by-one in CopyPixels CopyArea path. Fixes window dragging in uncomposited metacity. commit be82a0624207b5f367b97c25ac7d7dbd8a518597 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 13:21:47 2010 -0800 glamor: Fix screen_x/screen_y handling for compositing. It's not an offset from pixmap coords to composited pixmap coords, it's an offset from screen-relative window drawable coords to composited pixmap coords. commit 5360b1e8bbae571b120999e7eec7cd2826601497 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 09:47:38 2010 -0800 glamor: Implement glCopyPixels based src == dest CopyArea acceleration commit 0565c1d789ed82c533f860713d66b4941c299f9c Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 22:35:04 2010 -0800 glamor: Add support for accel of x8r8g8b8 source pictures. There's a limitation still for RepeatNone, but this fixes a bunch of fallbacks for gnome-terminal. commit e6bf50573650f03c8130b7783485b24e98e15c79 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 09:23:09 2010 -0800 glamor: Set active texture on glamor_copy_n_to_n setup. Fixes failure in rendercheck -t blend -o src commit be64167fea3c74447ed3c5116b97473676c25b29 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 11 09:20:50 2010 -0800 glamor: Don't try to CopyArea from a Solid source picture. Fixes failure with rendercheck. commit 126fc09cb5bf8c38b73f1c2cd2a0ef588c3265e8 Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 22:35:04 2010 -0800 glamor: Rework the Render shader setup to be easily modified, like cairo-gl. commit f4a3194837e640997c0c3a775f48a49800e213c6 Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 23:17:09 2010 -0600 glamor: Add the glyph cache from UXA (de-camelCased). This doesn't yet have an optimized glamor_composite_rects() implementation, but it does triple the speed of x11perf -aa10text. commit 7e6432e7b94f7f99b257da8de53573108d30ae22 Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 22:54:40 2010 -0600 glamor: Fix up and enable accelerated composite. commit a0b589e90a885cf20b349b95df31bb0823a1514b Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 22:49:27 2010 -0600 glamor: Restore planemask to all-on when finishing a fill. commit d8c2662bf452a82c8fcbdd1c95a40ee34d2c32ca Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 22:48:28 2010 -0600 glamor: Set active texture in finishaccess drawing. commit 4f398b29dd42260d2c02e8e795546fd0623397b1 Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 9 21:56:39 2010 -0600 glamor: Align stride of fallback pixmap data to 32 bits. fb/pixman demand this alignment, and all sorts of things go badly otherwise. Fixes piglit x11-8bpp-7x8-draw. commit 15e58b5ffb427c6c6f5172ccd72758047b98024a Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 22:05:51 2010 +0100 glamor: Split the copy path out into its own function. commit ad67299fa2afc8b42432d71d14163a36e013fef7 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 21:52:35 2010 +0100 glamor: Provide more information about the operands to fallback composites. commit 4811e428a9206ef59487fb0d3fab160a19845d46 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 21:46:49 2010 +0100 glamor: Pull in UXA code for dumping some composites down to copy_n_to_n. Window dragging with metacity+gnome-terminal+xcompmgr is almost credible. commit 35847c578e9c35a3c90da792c34c1cb0cc536261 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 21:24:15 2010 +0100 glamor: Add acceleration for copyarea not from the screen. commit 647b9fb49a5bb636c9b0da6b708083328238543a Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 20:12:44 2010 +0100 glamor: Add CopyWindow implementation so it doesn't crash. commit 95d4a5a6ab58625d8205461157263bfb635ccd1a Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 19:38:00 2010 +0100 glamor: Enable fill acceleration and flip opposite for pixmaps too. Here's my theory for the flipping: It doesn't really matter which orientation we store the pixmaps if we don't scan them out. We have to flip coordinates for the window system framebuffer. Doing so for everything else makes things consistent. I'm not sure how this will interact with future GLX integration, though. commit 5332547a0ac6ae6b9f1a6c6428e6fdbdf303108f Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 17:14:34 2010 +0100 glamor: Fix prepare_access on 1bpp data. Apparently I don't have anything hitting this path, so I'm not sure if it's good or not. commit c3c3a6349766b4fdee080ff203fb548725e42e50 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 15:34:45 2010 +0100 glamor: Use the pixmap stride in fallbacks instead of trying to guess it. Mostly fixes gnome-terminal text. commit 45de3d24b44aa3feabdda0e377d637f498e03eb0 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 14:40:06 2010 +0100 glamor: Replace the glDrawPixels in glamor_finish_access with GLSL. Root weave displays. \o/ commit d8d3fa10346302384b8e62967c5a67893ed1c67b Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 14:53:41 2010 +0100 glamor: All the fallbacks in the world. Bringup is really not flying when I can't see anything. So dump back to all software so I can turn on a bit at a time. commit 745502af962a2bb475c0c667c3091c2c080771dc Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 13:27:47 2010 +0100 glamor: Add check for EXT_bgra which we rely on. commit 6ce378f11ff396f350cbaa280086f6f9600da29e Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 13:15:38 2010 +0100 glamor: Add fallback support for glamor_get_spans(). commit ec526eab8f02e0bcce859a1b7ebaf6c5bccc5e87 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 13:05:13 2010 +0100 ephyr: Hook the glamor into damage and draw into the backbuffer. This should avoid a bunch of absurdity with GLX front buffer handling, fix exposes, and improve performance. For now we're copying the whole buffer while glamor is developed. commit b5087ff9b1e5495c742e581f586c055de878dd4b Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 12:47:59 2010 +0100 glamor: Fix the row length of 1bpp prepare_access. commit e93070affdf64c47be02684e7902a61e7ae9fa33 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 12:44:03 2010 +0100 glamor: Fix up the access flags for glamor_prepare_access(). commit 0e56c182c3b06f5b02d357e2b8e930a580bd0274 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 12:16:30 2010 +0100 glamor: Add fallback support to glamor_put_image(). commit 22cad98975091ed724a37ec940946cd2899ebcbf Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 12:13:15 2010 +0100 glamor: Add fallback support to glamor_set_spans(). commit 55dac9b42e18dcc1586770d31ee265178e68b744 Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 12:09:52 2010 +0100 glamor: Add glamor_prepare_access_gc() from UXA. commit 72a757ba00232fe8b42b977f5210fa119495b05e Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 11:58:52 2010 +0100 glamor: Use GL_MESA_pack_invert to avoid complexity in prepare_access. commit e9d4794cd0bc6c8790204405fe09f968edfa409d Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 11:23:14 2010 +0100 glamor: Add fallbacks for Render. commit de675893b7ce2880289cce13be6190d55f4fc29c Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 10:16:21 2010 +0100 glamor: Add fallbacks for glamor_copy_area(). commit ca58607a44c310ef369a097a06be83aa2a9e1c5b Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 8 09:58:55 2010 +0100 glamor: Move glamor_poly_lines to a separate file. commit 800fd4f8494ad6f0984073406b3dec584ba63648 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 22 15:41:18 2009 -0700 glamor: Fix the type for copyarea. commit c4343dfa0a2b40d46d3feb14f1df9fae0fd4a214 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 22 12:08:19 2009 -0700 glamor: Add prepare/finishaccess code based on UXA. commit f17473cdd5f93a2bf3a7b6a14bd5acd965e8e9f0 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 22 10:55:04 2009 -0700 glamor: Fix pixmap private getter in copyarea. commit 5915b4c0cfcfb25a68b77b29a4d7b39b7f6b4822 Author: Eric Anholt <eric@anholt.net> Date: Fri Sep 4 18:43:52 2009 -0700 glamor: Add support for solid source pictures. commit 1159ebb30b7530c2f4612109306cf85a594dd530 Author: Eric Anholt <eric@anholt.net> Date: Fri Sep 4 18:43:02 2009 -0700 glamor: Add untested copyarea implementation commit 936385142c12d074dcb603490517ac095840fa3f Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 25 17:24:30 2009 -0700 glamor: Accelerate PolyFillRect using glamor_fill instead of spans. commit 6dacc9b08c2af51c1826c20ccf12bb2c73856f25 Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 25 17:01:43 2009 -0700 glamor: Add untested PutImage 1bpp XYPixmap support. commit 854e9bd20a2d0f8ed636d4fba0ddfa4c71d54667 Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 25 16:56:50 2009 -0700 glamor: Add untested PutImage XYBitmap support. commit 8a53566acb5870816807425dc805df888fa42792 Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 25 13:06:11 2009 -0700 glamor: make the polylines complaint a little more useful. commit aa133069745fc59bb2f212b0816add9bae40c376 Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 25 12:10:32 2009 -0700 glamor: Start adding render acceleration support. This brings in idr's glu3 code. We'll probably want to move to linking to it as a library, once an ABI-stable release is out. commit 4a51cc0440c8d026fd8c82b40cfb188c6ea4a9f0 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 09:14:20 2009 -0700 glamor: Add clipping to setspans. commit 5fadea5d9c02670c35ddf3e0f12f9d355b412103 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 09:10:14 2009 -0700 glamor: Fix some screen_xy offsets to be the right way around. commit 44e4599b83cc330a7c9edd7e18266f222a69418a Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:59:52 2009 -0700 glamor: Move planemask to a function in case I decide to fill it in. commit 882411bef1091f97f61ae27a549970d87eef9cab Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:29:30 2009 -0700 glamor: add alu support to setspans. commit c70ce72fd74354a0b9731dc8d4451f6aaf951117 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:24:54 2009 -0700 glamor: Give setspans the same format support as getspans. commit d9eef95c74b7b04a3398b4cfc1a81b480838b25e Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:17:06 2009 -0700 glamor: Fix bad fallthrough in getspans (accessing invalid memory). commit 0360ba361a67f6cfa5c9c65590ed8440a153c16e Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:06:57 2009 -0700 glamor: Fix memory leak in getspans. commit cdb1fe6d9682616b1def52fa38b2dae623e2503f Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 08:03:17 2009 -0700 glamor: Move setspans to a separate file. commit cfb8dea815086b9aafd27bd314e02739e04dfc7d Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 07:22:14 2009 -0700 glamor: Hook up miGetImage to fix some invalid accesses. commit e3c02c09c125bb5def1a70a1264ef34b18182afa Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 24 07:00:32 2009 -0700 glamor: Add ALU support to solid, tile, and putimage. commit 2b657d91d80a0a4d9fa2e390255ff87f51426b7c Author: Eric Anholt <eric@anholt.net> Date: Sat Aug 22 15:54:24 2009 -0700 glamor: Add untested putimage support. commit f66e5c4145d003247447ac1bf93f9737c6eaa27c Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 21 10:05:32 2009 -0700 glamor: Add 8bpp to get/setspans. commit 93ad09144213fe6b9ce8bea7ebfcc2d60887810b Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 21 10:02:02 2009 -0700 glamor: Add trapezoids code. This fixes segfaults on starting gnome-terminal. commit 60ca0260f23cac6577aa85aacb0e5644d5f1b349 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 17:17:43 2009 -0700 glamor: Add more solid_fail_regions for software fallbacks. commit 7500ee2b0215932ecb6688f301fb4e6f080f8a66 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 17:05:00 2009 -0700 glamor: Fill in 1 and 24-bit getspans. commit f6cffbb2ba66948ad5cc1cbe20e12de204de175d Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 16:43:22 2009 -0700 glamor: Add stub Composite support. commit 2fa26c4958168064da95361db78ccc518c8f3ed8 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 16:43:03 2009 -0700 glamor: Free resources when destroying pixmaps. commit 16c3b929dd4cae6b40e847256db6ff32e63e9029 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 16:06:42 2009 -0700 glamor: Add untested support for tile filling. commit 8016135ec7616530e64d0019ce0401e62b25e483 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 15:37:22 2009 -0700 glamor: Fill out glamor_get_color_4f_from_pixel() a bit. commit 519103565c1b182014dea93c58917bf7e5a35fcb Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 15:28:13 2009 -0700 glamor: Create FBOs for pixmaps. commit f92d1478e984d57806731886820f47e1258b5115 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 14:45:47 2009 -0700 glamor: Maybe fix up the format/type for setspans. commit 4f139db92fb283792adae8d39a49a083e4382fb5 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 14:43:43 2009 -0700 glamor: Add getspans implementation. commit f1dbed5456e5a608425530e0dde2dc617a7c6115 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 12:32:53 2009 -0700 glamor: Move to using shader objects. commit fbbdd788cbc822fc8a2d2726435bfa39e69a0e85 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 12:36:33 2009 -0700 glamor: Fix up DrawPixels arguments to bear some relation to reality. commit 74f262bcdb3d8ae769ef8975cf4a4b2ebaeb6b39 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 11:39:05 2009 -0700 glamor: remove gratuitous flush. commit 399e00698976dd2e503b3a092bfe54ab24ea26d9 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 11:37:37 2009 -0700 glamor: Fix up block/wakeup handler. Prototypes are fixed, and we don't need to flush on wakeup. commit 2e35ceca65bbebf07c15ea2cff932a8749955c2b Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 11:19:43 2009 -0700 ephyr: Use GLEW. This will hide all sorts of extension stuff from us. commit 370df817ac0b346f1c7aa0b6e823c77797caaa9f Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 09:35:24 2009 -0700 ephyr: Make sure a glamor-using window is created with a glx visual. commit 08097434ecc6479dc69a408523f398284168697e Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 09:10:12 2009 -0700 add fill files, merge with first real attempt at rendering. commit e32efb02e5dff9124e8680f9a15d9d2b01db84c7 Author: Eric Anholt <eric@anholt.net> Date: Sat Dec 20 14:48:18 2008 -0800 ephyr: merge the host glamor bits into hostx. commit df083fab84cf57fc1a2e3cd98572039bc9fe20de Author: Eric Anholt <eric@anholt.net> Date: Sat Dec 20 13:43:52 2008 -0800 glamor: first real attempt at rendering. commit 1b151f2e6aa581400b09220b87ae2d34a39aeb17 Author: Eric Anholt <eric@anholt.net> Date: Sat Dec 20 13:48:39 2008 -0800 glamor: glFlush from the blockhandler so rendering happens. commit b530cdea4a8e05b1f487765b8dde42cde1a6fc98 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 16 15:20:49 2008 -0800 glamor: Use a nicer struct initializer for gcops. commit 4d52ae7f2dca78d493e11375d764c978db5567ed Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 16 15:14:31 2008 -0800 glamor: Start trying to hook up the rendering bits commit 41e3e580de95fca3095d015ec8febe1a5f47cca3 Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 20 10:49:41 2009 -0700 glamor: Use -lgl for Xephyr if GLX is unset. I'm experimenting with that because of conflicts with GL dispatch tables. commit 8885b3b1ffb45ae16484151ce533683af526f509 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 16 15:08:21 2008 -0800 Add exa/glamor to _DEPENDENCIES so the bin gets rebuilt with the libs. commit da6e0ffad2173d65f27feff36291f94e6aa06f88 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 16 14:00:05 2008 -0800 More ephyr/glamor glue. commit 0ec823ce5b72bcf3be3923f2f23e5386feb0107b Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 16 12:30:14 2008 -0800 Add build infrastructure for glamor. commit 84bb0207f6db433a8d387d933393357da87ca23e Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 23 20:03:03 2011 -0400 dix and os: gitignore dix.O and os.O Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 3d41939d0349569dcfd2aef9b846c739d0ba0060 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Sep 22 17:41:38 2011 -0700 Unconditionally #include <stdint.h> The more recent inclusions of this file haven't been checking for HAVE_STDINT_H, so might as well make the older ones consistent. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 46d5ae5b551cc926331324073f2686b47e8aea07 Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 23 09:38:25 2011 -0400 dtrace: fix typo in title The word provider should be capitalized. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 6cae6224994e3252b3b7c7608f983ce73e0206fc Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Sep 23 09:38:24 2011 -0400 dtrace: use docbook copyright markup for copyright holder No content change to copyright text. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 58d3d46d6cc0d7a81db6bad61d158f3b9af8af71 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Sep 1 16:48:37 2011 -0700 Assign ids to more tags in Xserver-Dtrace.xml Keeps xsltproc from adding random-number id tags to html output so that it's easier to see real changes vs. different random numbers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Dew <marcoz@osource.org> commit 7fb4bef0394a5d09680985d34bce8252b61493cb Merge: 98f494009 c90903b4f Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 21 14:34:27 2011 -0700 Merge remote-tracking branch 'mattst88/for-keith' commit 98f4940093dc90c3366d3e4d3ddceacbaee299dc Merge: b018b8153 c8eacae4f Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 21 14:30:19 2011 -0700 Merge remote-tracking branch 'alanc/master' commit b018b815333b256b5e06dd6251b2e539f09f89fa Merge: 03d032991 0f380a500 Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 21 14:17:14 2011 -0700 Merge remote-tracking branch 'jamey/reviewed' commit c90903b4f7a826ae6826a8dd0a901c8362500e46 Author: Peter Harris <pharris@opentext.com> Date: Fri Sep 2 18:45:16 2011 -0400 xkb: add missing swaps for xkbGetDeviceInfoReply Caught during review of e095369bf. Signed-off-by: Peter Harris <pharris@opentext.com> Reviewed-by-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit d206d52f657cb63a0f6ba8b62d788c1812b57c81 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 19:19:24 2011 -0400 Use __builtin_constant_p to determine if we can use lswapl If the address of the swapped memory location is known at compile time, we can check its alignment at no runtime cost and use lswapl instead. text data bss dec hex filename before: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg after: 1864396 52136 78040 1994572 1e6f4c hw/xfree86/Xorg bswap instructions: 131 -> 308 (used in lswapl) rol instructions: 943 -> 1174 (used in lswaps) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 889b700e7760ced38bcf5f3aff2d31d3d9a058d7 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 19:12:21 2011 -0400 Use lswap{l,s} in cpswap{l,s} Should be safe since cpswap isn't used on pointers. text data bss dec hex filename before: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg after: 1872820 52136 78040 2002996 1e9034 hw/xfree86/Xorg bswap instructions: 5 -> 131 (used in lswapl) rol instructions: 811 -> 943 (used in lswaps) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit a2f0ff5f73db204a9d61e65148b28f6acc5121df Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 19:30:20 2011 -0400 Make lswap{l,s} inline functions text data bss dec hex filename before: 1875668 52136 78040 2005844 1e9b54 hw/xfree86/Xorg after: 1875588 52136 78040 2005764 1e9b04 hw/xfree86/Xorg Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit e8ff555b95baab66cc7d060c1e7f9fdd49d3802f Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 19:07:24 2011 -0400 Add type checking to swap macros The original macros are retained (instead of replacing them with inline functions) because of implicit type promotion. That is, an int16 passed to an inline function taking int32 would be implicitly promoted to int32 without a warning. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 893e86a49e3e381cff48a9e86dc2d9b3d5431d95 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 19:03:26 2011 -0400 Introduce swap_uint{16,32} functions, used in swap{l,s} Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 54770c980cd2b91a8377f975a58ed69def5cfa42 Author: Matt Turner <mattst88@gmail.com> Date: Tue Aug 16 16:59:07 2011 -0400 Cast char* buffers to swap functions Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 9edcae78c46286baff42e74bfe26f6ae4d00fe01 Author: Matt Turner <mattst88@gmail.com> Date: Wed Sep 21 17:14:16 2011 -0400 Use correct swap{l,s} (or none at all for CARD8) Swapping the wrong size was never caught because swap{l,s} are macros. It's clear in the case of Xext/xres.c, that the author believed client_major/minor to be CARD16 from looking at the code in the first hunk. v2: dmx.c fixes from Keith. Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 03d032991da21bf866ca30dcbb6b7f9f99df441a Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Sep 14 15:25:06 2011 -0700 fb: Rename wfbTriangles and wfbTrapezoids These symbols were not renamed when they were added to libfb: # nm -D libwfb.so | grep ' fb' 0000000000028d00 T fbTrapezoids 0000000000028d60 T fbTriangles This causes corruption and/or crashes on wfb-ful drivers like nvidia: Program received signal SIGABRT, Aborted. 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. in ../nptl/sysdeps/unix/sysv/linux/raise.c (gdb) bt #0 0x00007fd67f3a0405 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007fd67f3a3680 in *__GI_abort () at abort.c:92 #2 0x00007fd67f3995b1 in *__GI___assert_fail (assertion=0x7fd679ecb804 "key->initialized", file=<optimized out>, line=116, function=0x7fd679ecbbc0 "dixGetPrivateAddr") at assert.c:81 #3 0x00007fd679ec55b6 in ?? () from /usr/lib/xorg/modules/libfb.so #4 0x00007fd679eca9ef in ?? () from /usr/lib/xorg/modules/libfb.so #5 0x00007fd679ecae20 in fbTriangles () from /usr/lib/xorg/modules/libfb.so #6 0x00007fd67a58fc55 in ?? () from /usr/lib/xorg/modules/drivers/nvidia_drv.so #7 0x00000000004f38d1 in ?? () #8 0x0000000000437ae9 in ?? () #9 0x0000000000426eaa in ?? () #10 0x00007fd67f38cead in __libc_start_main (main=<optimized out>, argc=<optimized out>, ubp_av=<optimized out>, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff99860d78) at libc-start.c:228 #11 0x000000000042719d in _start () Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2c7c520cfe0df30f4bc3adba59d9c62582823bf8 Author: Matt Turner <mattst88@gmail.com> Date: Thu Aug 4 15:35:41 2011 -0400 Use internal temp variable for swap macros Also, fix whitespace, mainly around swaps(&rep.sequenceNumber) Reviewed-by: Peter Harris <pharris@opentext.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit c10bad3d3e8ff1b90014770fd470f9c67263e46f Author: Matt Turner <mattst88@gmail.com> Date: Wed Apr 27 19:29:06 2011 -0400 Silence printf format warnings in helper_exec.c Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 9eab5b3443a1926a29385948acc6c5e0843465ea Author: Matt Turner <mattst88@gmail.com> Date: Wed Apr 27 18:25:27 2011 -0400 Replace Fabs() macro with fabs() function gcc generates better code with fabs() anyway. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 40a47bd628f525d2d8bd3ca76554089a6e9d2a1d Author: Matt Turner <mattst88@gmail.com> Date: Wed Apr 27 14:19:41 2011 -0400 Remove unnecessary #undefs of [f]abs and old comments Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 079a7585e44d25a0a9fb6662c6382dfbe8f6cd3c Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Sep 15 20:12:41 2011 -0400 devbook.am: maintenance update from docbook.am The developer docs are generated from a subset of docbook.am which is sometimes updated. The one difference for xserver is the embedded css style in the HEAD element. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 82c55b5a99a1bacf2bc11bbd9d58f6f2c6c07286 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Sep 15 20:12:40 2011 -0400 docbook.am: embed css styles inside the HTML HEAD element Rather than referring to the external xorg.css stylesheet, embed the content of the file in the html output produced. This is accomplished by using version 1.10 of xorg-xhtml.xsl. This makes the whole html docs tree much more relocatable. In addition, it eliminates xorg.css as a runtime file which makes xorg-sgml-doctools a build time only package. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1602444e05cc59afe32c085c0cedb85e3268cd98 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Sep 15 20:12:39 2011 -0400 docbook.am: global maintenance update - entities, images and olinking Adding support in libX11 for html chunking caused a reorg of docbook.am as well as the xorg-sgml-doctools masterdb for olinking. The parameter img.src.path is added for pdf images. A searchpath to the root builddir is added for local entities, if present. This feature was initiated by xserver module and made available to all. The docbook.am makefile hides all the details and is identical for all 22 modules having DocBook documentation. It is included by a thin Makefile.am which requires no docbook knowledge. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 871d65790ec2ac0fd6d5105c2d599f63a86fcaf1 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Nov 1 16:02:11 2010 +0200 DRI2: Allow DDX to validate swap_limit changes DDX can now implement validation for swap_limit changes to prevent configurations that are not support in driver. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> CC: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit b435e2aac1b3fbb97d0275de73a1e36d16f170c0 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Nov 1 16:22:00 2010 +0200 DRI2: Expose API to set drawable swap limit. This allows ddx to set swap_limit if there is more than one back buffer for drawable. Setting swap_limit has to also check if change affects a client that is blocked. This can be used to implement N-buffering in driver with minimal logic in allocation and selecting next back. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Francisco Jerez <currojerez@riseup.net> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Keith Packard <keithp@keithp.com> commit 86f8da0aa7612558e6563f5de0d9f9793854053f Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Nov 1 16:21:59 2010 +0200 DRI2: Add ReuseBufferNotify hook ReuseBufferNotify hook is called whenever old buffer is reused in DRI2 code. Driver can use this hook to rewrite the buffer name if hardware requires shared buffers. Shared buffer might be some hardware limited resources like framebuffer that is preallocated in boot. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2f47433fef2cf63063e069ead9003891d135e87f Author: vdb@picaros.org <vdb@picaros.org> Date: Wed Sep 7 17:47:56 2011 +0200 print DisplayMode type bits Dear, A patch I posted on xorg-devel was reviewed and is ready for inclusion in xserver. Would you be willing to apply the patch so that it finds its way into the master branch ? Thank you, Servaas Vandenberghe. http://lists.x.org/archives/xorg-devel/2011-August/024769.html http://lists.x.org/archives/xorg-devel/2011-August/024777.html This patch adds printing of the DisplayMode type bits to xf86PrintModeline(). It helps to trace the modeline origin and to understand the initial configured modeline. Reviewed-by: Alex Deucher <alexander.deucher at amd.com> Signed-off-by: Servaas Vandenberghe Signed-off-by: Keith Packard <keithp@keithp.com> commit c92c83523ede8bc361526ac93d09d089fbbdae08 Merge: 4ad271d06 24b2b43e8 Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 21 13:32:06 2011 -0700 Merge remote-tracking branch 'kibi/master' commit 4ad271d06c5aa42721c0e2e01e17e34a39825c65 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Aug 29 20:44:18 2011 -0700 xfree86: Bump extension ABI version to 6.0 The video driver ABI was bumped to 11.0 in commit 0de7cec90738a7a5020150309866bb0e23b6f479 because of a change to the size of ATOM in commit 51f353d0a0d116af16d7d9590cadef6c56328746. This also affects extension modules, so the extension ABI version should have been bumped too. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit c8eacae4f833a0bd81907ba2b4cfaa80c08e037f Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Aug 25 21:46:16 2011 -0700 Space & style cleanup of hw/xfree86/i2c/fi1236.c Fortunately, the massive decrease in the cost of whitespace in the past decade has allowed us to be much more generous with it, and much more consistent in its application, even for code like this that clearly no one has ever tried to read. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c46215c100e964665580211a5d5893558ca9374f Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Wed Aug 10 11:17:46 2011 -0700 Cross-reference cvt(1) & gtf(1) man pages Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 1526f1caf396fefc5f09eaff884d5b92aac44997 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue May 31 19:54:33 2011 -0700 Remove unused ClientStateAuthenticating Appears to be leftover from the Kerberos code deleted in 2007 (commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e). Nothing left ever set clientState to ClientStateAuthenticating Skipped over 1 to preserve existing enum numbering. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 0f380a5005f800572773cd4667ce43c7459cc467 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Sep 14 18:35:21 2010 -0700 Fix pixmap double-frees on error paths. If AddResource fails, it will automatically free the object that was passed to it by calling the appropriate deleteFunc; and of course FreeResource also calls the deleteFunc. In both cases it's wrong to call the destroy hook manually. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 8f69c935f6d06ad92fd0e8d9fcb3cde86cd258f5 Author: Jamey Sharp <jamey@minilop.net> Date: Fri Sep 17 02:27:59 2010 +0200 Eliminate MAXSCREENS-sized CursorScreenKey array. Use new per-screen privates API instead. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit c96a43888ceae72bf89c66de911120c0b6b7a71a Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jul 10 09:28:47 2010 -0700 Revert "Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state" This reverts commit bc0c56c407117d1545e20d21f7d30eb3472d618b since we're breaking ABI anyway. Conflicts: ChangeLog dix/colormap.c dix/pixmap.c dix/window.c include/pixmapstr.h Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 13ac1ba480ee3e89163825cd2777f9a6e9dcbc9f Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue May 31 19:42:48 2011 -0700 Remove unused ClientStateCheckingSecurity & ClientStateCheckedSecurity Appear to be leftovers from the XC-QUERY-SECURITY code deleted in 2007 (commit 375864cb74cced40ae688078b1f7750998972535). Nothing left ever set clientState to ClientStateCheckingSecurity. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 78f946c297081d39d312e05928146c78f59fedcb Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 19 23:26:31 2011 -0700 sun_init.c: Implement novtswitch & sharevts for Solaris Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: John Martin <john.m.martin@oracle.com> commit 87cc83474d9890d14d9bc60926a97bd0d5b059af Author: Jamey Sharp <jamey@minilop.net> Date: Sun Sep 18 20:47:04 2011 -0500 Replace XmuSnprintf with snprintf. Alan Coopersmith explains: XmuSnprintf() can be replaced by snprintf() now. (It was a implementation X provided for it's libraries to use in the days before all platforms we cared about had snprintf in libc.) Reported-by: walter harms <wharms@bfs.de> Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit df4eeb1256c7c5e7a3f88f10da2915c7a07a8db8 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Jun 8 13:58:04 2010 -0700 xnest: Delete unused nClipRects GC-private field. This field was never read at any time in the git history. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 53a4744b69ab76ecabdde5dabfb56830570c0f4e Author: Jamey Sharp <jamey@minilop.net> Date: Sat Sep 18 01:23:12 2010 +0200 XineramaInitData ignores its argument. Quit passing one. Also fix up XineramaInitData's caller, XineramaReinitData. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit b85c10a35d44ad695797d0d19757e5f62eab4b98 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 16:23:31 2010 -0700 dmx: Fix some "no previous prototype" warnings by making functions static. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit d423012e776a81a197cde86be5c6bd471a593c39 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 21 14:21:52 2010 -0700 dmx: Fix a non-constant printf format string warning. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 7e127f12a24acb8f43055af0a9be1ec585bbed36 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 19 23:22:27 2011 -0700 sun_init.c: Move vt switches to a switch_to helper function like lnx_init.c Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit a00dc6af6e84d0bee3f69d8df89d7f68cb535d35 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 19 22:43:56 2011 -0700 Xorg.man: Add -novtswitch and -sharevts options Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 93abda6bddf770dbfc3d4d0ada61ea84a7b7b9be Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 19 22:39:09 2011 -0700 xfree86: move -novtswitch & -sharevts argument handling up to common layer Stop duplicating in each os-support variant before it gets replicated even further. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> commit d8d99e14b1241fd8c099d69b8d0ed0817585fe8d Author: Jamey Sharp <jamey@minilop.net> Date: Wed Sep 14 09:52:58 2011 -0500 configure.ac: Remove unreachable check for VM86 headers. "configure --with-int10" is not a valid configuration, and the check for sys/vm86.h and sys/io.h is not used. Delete it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> commit 94b2eea86319934316bdb013f6f3940685a88a2f Author: Jamey Sharp <jamey@minilop.net> Date: Wed Sep 14 11:23:03 2011 -0500 int10: Delete #if 0'd implementation that's older than our git history. Throughout the xserver git history, the generic portion of the int10 module has always used other methods for reading the video BIOS. For some time now it's been purely libpciaccess based. This commented-out use of xf86ReadBIOS is entirely superfluous. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6ad7bb69eebd5e5b4068bd9aa0b9a7168f075006 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Sep 13 17:45:19 2011 -0500 Remove PC98 support. Gaetan Nadon wrote: Alan Coopersmith wrote: "I think we recently dropped PC98 support from the X server, so I'd be okay with dropping the documentation now". Let's make them be right, shall we? Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 9eb22ebf46b77c15e53017a37c7ef605521dc164 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Sep 13 16:30:06 2011 -0500 configure.ac: XORG_OS is not used, so delete it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> commit 76636f30f7cf2344f4038c59bf292db19be33d53 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Sep 13 13:10:10 2011 -0500 configure.ac: Remove unused XORG_OS_PCI variable. This is the last mention after ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 quit using the variable. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tiago Vignatti posted an identical patch in June 2010, which I only noticed after getting the above reviews. His patch was: Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 60b4bd181bbdc794c7f3547f67df916132aa111e Author: Jamey Sharp <jamey@minilop.net> Date: Tue Sep 13 14:31:24 2011 -0500 x86emu: There is no NO_INLINE implementation of unaligned access here. Patch produced with: unifdef -UNO_INLINE -B This change isn't relevant to the similar code in hw/xfree86/common/compiler.h, because x86emu is expected to someday move out of xserver entirely and so should not depend on any xserver headers. Also, some platforms apparently do have NO_INLINE versions of compiler.h. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 24b2b43e85c1e3f3d242ccab8793bf4ef83cfac4 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 14:53:08 2011 +0200 render: Replace __inline with inline. Also remove traces from the past. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 9f01249d7f81514a38c44dff2a4a4612dbf97cae Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 15:10:56 2011 +0200 configure.ac: Fix help string for mitshm. Pasting from ./configure --help's output, one would get: | configure: WARNING: unrecognized options: --disable-shm Fix the help string to include the previously missing “mit” bits. Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 0caeef6146bee5fb1827ab25db191685dde9d4b4 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 26 16:46:13 2011 -0700 Version bumped to 1.11 Signed-off-by: Keith Packard <keithp@keithp.com> commit 05284a03f9002b03a66ae355b34790ec02b726f0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 4 14:45:46 2011 +1000 input: make InputOption opaque, provide interface functions. InputOptions is not switched to use struct list for a future patch to unify it with the XF86OptionRec. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit fcafe825751bef99f4c0b36250ca6f15f127502f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 8 15:21:46 2011 +1000 Add null-terminated list interface. This is a set of macros to provide a struct list-alike interface for classic linked lists such as the XF86OptionRec or the DeviceIntRec. The typical format for these is to have a "struct foo *next" pointer in each struct foo and walk through those. These macros provide a few basic functions to add to, remove from and iterate through these lists. While struct list is in some ways more flexible, switching legacy code to use struct list is not alway viable. These macros at least reduce the amount of open-coded lists. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 79ca7c0b5786a02a80a1c40ed475e928da7c82b3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 12 15:55:48 2011 +1000 xfree86: comment typo fix in synch → in sync Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2bfb802839688ecf328119c4c6979390fc60348d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 29 16:33:54 2011 +1000 dix: don't XWarpPointer through the last slave anymore (#38313) This line was introduced pre-1.6 to fix Bug 19297. The effect of warping through the VCP then was that if a device had custom valuator ranges, the warp position would be wrong. The better device for this effect is the the XTest device. This fixes a server crash where the lastSlave is a pointer device without valuators (Bug 38313#0). And while we're at it, make sure the Xinerama code-path does the same. X.Org Bug 38313 <http://bugs.freedesktop.org/show_bug.cgi?id=38313> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b29ce0726d55ec41cfbce0814e21b0217ef64efe Author: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Date: Tue Aug 9 11:00:34 2011 +0900 Disable check of double-aligned in test/input.c on Renesas SH Renesas SH is not aligned at size of double. When structure has double value, It is aligned in 4byte (long). Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3be379f5076566edaf92c27df5a4d447bcf5d015 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 11 10:59:07 2011 +1000 dix: use helper functions in EventIsDeliverable Proximity events don't have an XI2 type and caused error messages in the log when trying to get the event filter. Use this opportunity to clean up the code, instead of manually setting the fields that GetEventFilter requires use EventTo(XI2|XI|Core) instead. Co-Authored-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 799879797505a5e891ccaec2bea73fd838c94b7a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 11 10:57:05 2011 +1000 dix: abstract XI2 filter mask lookup Don't access the xi2mask bytes directly or calculate the offsets manually, use a few helper functions instead. XI2 masks are a bit weird in the event handling code since they slot onto the legacy code. For core/XI 1.x events, the event mask is a CARD32. That mask is used together with the event filter (also 32 bit) to determine if event delivery should be attempted. XI2 masks are of arbitrary size and their mask is simply the byte of the mask that contains the event mask. Likewise, the filter is a single byte matching that mask. Provide helper functions get these bytes and masks in the right order instead of accessing them manually. EventIsDeliverable should be part of this cleanup patch but it will be gutted with the next patch. Co-Authored-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 8c5a4d6fbecf79f2dc4f2d836d741203b2d5e856 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 14:12:41 2011 +1000 dix: don't use the pointer as modifier device in UngrabKey. Modifier device is always the keyboard. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 3a077f246e9ac07a37c1b01c3d321e0f5ceb4153 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 3 15:07:23 2011 +1000 input: provide a single function to init DeviceEvents to 0 getevents.c already had that function, but XKB was manually initializing it, causing bugs when the event structure was updated in one place but not the other. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4b376ddeb4f3c9d9d279ffd2946d88edd5af4cfc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 14:20:53 2011 +1000 dix: fix compiler warnings ("foo" set but not used) devices.c: In function 'AttachDevice': devices.c:2409:18: warning: variable 'oldmaster' set but not used [-Wunused-but-set-variable] events.c: In function 'ConfineToShape': events.c:683:15: warning: variable 'pSprite' set but not used [-Wunused-but-set-variable] events.c: In function 'ProcGrabPointer': events.c:4759:15: warning: variable 'time' set but not used [-Wunused-but-set-variable] getevents.c: In function 'GetMotionHistory': getevents.c:425:9: warning: variable 'dflt' set but not used [-Wunused-but-set-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 6fd2adc179141310e45a56ee90ef5b5f6115a1f6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 14:27:54 2011 +1000 mi: fix compiler warnings ("foo" set but not used) misprite.c: In function 'miSpriteSaveUnderCursor': misprite.c:940:12: warning: variable 'y' set but not used [-Wunused-but-set-variable] misprite.c:940:9: warning: variable 'x' set but not used [-Wunused-but-set-variable] mivaltree.c: In function 'miComputeClips': mivaltree.c:226:10: warning: variable 'resized' set but not used [-Wunused-but-set-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 484cef5b29ef82402a15e155b3b8505b1e4a6830 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 2 09:21:00 2011 +1000 Xi: silence compiler warnings (set but not used) exevents.c: In function 'UpdateDeviceState': exevents.c:719:9: warning: variable 'bit' set but not used [-Wunused-but-set-variable] exevents.c: In function 'ProcessOtherEvent': exevents.c:889:22: warning: variable 'v' set but not used [-Wunused-but-set-variable] exevents.c:888:17: warning: variable 'k' set but not used [-Wunused-but-set-variable] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 98fe735ea1d756711019c3d90ed6abd9c06abebf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 13:52:13 2011 +1000 dix: add KEYBOARD_OR_FLOAT and POINTER_OR_FLOAT to GetMaster() GetMaster() currently requires an attached slave device as parameter, resuling in many calls being IsFloating(dev) ? dev : GetMaster(...); Add two new parameters so GetMaster can be called unconditionally to get the right device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit dbbe5735d1451bb32f43bce90f0bcfeff46f9743 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 2 08:54:00 2011 +1000 test: add a test for GetMaster() behaviour Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b3c76b0c53ac42b70d12849da18465e8467e474c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 11:54:17 2011 +1000 mi: fix comment typo, whitespace in miPointerSetPosition Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c9562bed0d5e26b7e3e55e26cf1ddc5086d61cc6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 1 09:52:38 2011 +1000 dix: rename mieqSwitchScreen argument fromDix → set_dequeue_screen, document fromDIX is neither exactly true nor particularly helpful in understanding what this parameter triggers. Rename to set_dequeue_screen, because that's exactly what happens. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 09496996accfdaf7bc01097a25db400912004d97 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 28 15:56:08 2011 +1000 dix: ignore devices when adding passive core grabs to list (#39545) Passive core grabs are mostly device-independent. In an MPX scenario, they may change to reflect whichever master pair activated the grab last. For adding new grabs to the list, ignore the device for core grabs to return failures when trying to set the same grab combo twice on a window. X.Org Bug 39545 <http://bugs.freedesktop.org/show_bug.cgi?id=39545> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 80c37048539daa1d257d127d66502bde45c97c85 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 28 15:43:10 2011 +1000 dix: avoid using the VCP as modifier device Core grabs may change device when they're activated to reflect the master they apply to. If the device is a keyboard, modifierDevice is erroneously set to the Virtual Core Pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 20a61845d3c93c337bf3331a6bac30cf66c2a293 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 9 11:21:06 2011 +1000 config: use add_option for '_source' too _source was being allocated manually, with all other options added to that list through add_option. Skip the manual part, allocate the first option _source with add_option too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit d33652dad8838ab0a9175ca4613a3161ebc5676f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 9 11:20:31 2011 +1000 config: return the new InputOption from add_option. Change add_option to return the new InputOption on success, or NULL failure. This way we can at least check for errors in callers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit e684e816acb617b4dc66a68e2b0ba8f80399170a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 20 16:21:28 2011 +1000 config: fix a log message PRODUCT was taken from the parent, hence ppath. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 1357cd725143c1a35e32f15df658de111b151692 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 8 16:13:45 2011 +1000 Revert "Attempt to add the 'mouse' driver in more situations." This reverts commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a. This commit was introduced in the 1.2 cycle when hotplugging was less than ideal (i.e. it didn't exist). From the commit message: Always add a mouse driver instance configured to send core events, unless a core pointer already exists using either the mouse or void drivers. This handles the laptop case where the config file only specifies, say, synaptics, which causes the touchpad to work but not the pointing stick. We don't double-instantiate the mouse driver to avoid the mouse moving twice as fast, and we skip this logic when the user asked for a void core pointer since that probably means they want to run with no pointer at all. To get this case above, a user would need to disable hotplugging _and_ have a xorg.conf that only references one device. This is possible, but not a use-case we should worry about too much now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 159b03e13760920274b573a2bccdbf6a79f059e7 Author: Lennart Poettering <lennart@poettering.net> Date: Mon Jul 18 21:19:23 2011 +0200 config: add udev/systemd multi-seat support Add support for multi-seat-aware input device hotplugging. This implements the multi-seat scheme explained here: http://www.freedesktop.org/wiki/Software/systemd/multiseat This introduces a new X server switch "-seat" which allows configuration of the seat to enumerate hotplugging devices on. If specified the value of this parameter will also be exported as root window property Xorg_Seat. To properly support input hotplugging devices need to be tagged in udev according to the seat they are on. Untagged devices are assumed to be on the default seat "seat0". If no "-seat" parameter is passed only devices on "seat0" are used. This means that the new scheme is perfectly compatible with existing setups which have no tagged input devices. Note that the -seat switch takes a completely generic identifier, and that it has no effect on non-Linux systems. In fact, on other OSes a completely different identifier scheme for seats could be used but still be exposed with the Xorg_Seat and -seat. I tried to follow the coding style of the surrounding code blocks if there was any one could follow. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 95772598b57f6054fbf88683fa0a492c77605790 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 8 16:10:07 2011 +1000 xfree86: use xf86AllocateInput for implicit devices too Slowly merging the vastly different code-paths. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit fa8f4652819b692faaf2789cf32d7fa99fbb34aa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 15:02:20 2011 +1000 xfree86: factor out adding/removing a device from the input device array No functional changes, just readability improvements. This also gets rid of the count variable. Count was just used for resizing the null-terminated list. Since we're not in a time-critical path here at all we can afford to loop the list multiple times instead of keeping an extra variable around. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5b5477c05f691205064ca4d8034f8dd47ab975b7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 14:14:11 2011 +1000 xfree86: update comment for InitInput Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 7354f607833c69626d8692bc5176b18ea1cf6263 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 14:26:13 2011 +1000 xfree86: nest loops instead of 0x1 pointers. If we find the core device, move all other device pointers forward right then and there. The break will jump out of the top loop. They had a special on braces today, so I added some for readability (and fixed up tab vs space indentation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5669aa2d24dff9ab276e5f74a09f97ec77b90e75 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 14:05:30 2011 +1000 xfree86: improve readability of synthesized device. No functional changes. The options we assign are the ones from the Pointer/Keyboard device so we might as well use those readable names instead of dev[count-1]->options. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5aa826cdd1f2e768bedf23d399703a5d0b6302be Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 13:52:11 2011 +1000 test: add a option duplication test Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 4527e2b776cfcdac2b189b5439b9a3d0b6433077 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 13:46:24 2011 +1000 xfree86: when implicitly choosing a core device, set the option to a value Devices are core pointers/keyboards by default now anyway, but let's set the option to some value instead of just NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 44d53728a6a533fc0a6e0a10269d1cc99e9dad32 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 13:44:44 2011 +1000 xfree86: don't warn about duplicate core devices It doesn't matter. All devices are core pointer devices by default now anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 033f53c223dc12a91f00e10a69f87a4f2a7adb6b Author: Daniel Kurtz <djkurtz@chromium.org> Date: Mon Aug 8 15:09:48 2011 +0800 xf86Helper: use LogHdrMessageVerb in xf86VDrvMsgVerb LogHdrMessageVerb allows passing a parameterized header to insert in a log message between MessageType and the formatted message body string. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cd8ee3e5cb29b9cd6402d2fbc71463c6b04b6077 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Mon Aug 8 15:09:47 2011 +0800 xf86Helper: use LogHdrMessageVerb in xf86VIDrvMsgVerb LogHdrMessageVerb allows passing a parameterized header to insert in a log message between MessageType and the formatted message body string. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b31d104fc09a7241856ff8d226be11ec562beac3 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Mon Aug 8 15:09:46 2011 +0800 os/log: Add LogVHdrMessageVerb and friends LogVHdrMessageVerb allows a custom header to be inserted in a log message, between the Log system's MessageType string, and a formatted variable message body. The custom header can itself be a formatted variable string. These functions can be used, for example, by driver abstraction layers to format specific driver messages in a standard format, but do it in a way that is efficient, obeys the log-layers verbosity settings, and is safe to use in signal handlers (because they don't call malloc), even for types besides X_NONE. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b82f934db661c59d7397ce180d08cf8f8f7118b1 Author: Daniel Kurtz <djkurtz@chromium.org> Date: Mon Aug 8 15:09:45 2011 +0800 os/log: Pull LogMessageTypeVerbString out of LogVMessageVerb Also, optimize how the type and format strings are combined. Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Guillem Jover <guillem@hadrons.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e32cc0b4c85c78cd8743a6e1680dcc79054b57ce Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 21 16:37:11 2011 -0400 fb: Fix memcpy abuse The memcpy fast path implicitly assumes that the copy walks left-to-right. That's not something memcpy guarantees, and newer glibc on some processors will indeed break that assumption. Since we walk a line at a time, check the source and destination against the width of the blit to determine whether we can be sloppy enough to allow memcpy. (Having done this, we can remove the check for !reverse as well.) On an Intel Core i7-2630QM with an NVIDIA GeForce GTX 460M running in NoAccel, the broken code and various fixes for -copywinwin{10,100,500} gives (edited to fit in 80 columns): 1: Disable the fastpath entirely 2: Replace memcpy with memmove 3: This fix 4: The code before this fix 1 2 3 4 Operation ------ --------------- --------------- --------------- ------------ 258000 269000 ( 1.04) 544000 ( 2.11) 552000 ( 2.14) Copy 10x10 21300 23000 ( 1.08) 43700 ( 2.05) 47100 ( 2.21) Copy 100x100 960 962 ( 1.00) 1990 ( 2.09) 1990 ( 2.07) Copy 500x500 So it's a modest performance hit, but correctness demands it, and it's probably worth keeping the 2x speedup from having the fast path in the first place. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ac2c307f4716ebd3e955c004ceec9f4c029401a0 Author: Pelle Johansson <pelle@morth.org> Date: Sun Aug 14 17:44:40 2011 -0700 XQuartz: Initialize darwin pointer valuators This fixes a regression introduced by: 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde http://xquartz.macosforge.org/trac/ticket/498 Signed-off-by: Pelle Johansson <pelle@morth.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4020cab88f5cf3164fc83cf912f94f288aa5a45d Author: Michel Dänzer <michel.daenzer@amd.com> Date: Wed Aug 10 11:36:16 2011 +0200 EXA/mixed: Update sys_pitch in MPH even when there's no system memory copy. Otherwise sys_pitch will be stale when a system memory copy is allocated. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38322 and a crash when unlocking the screen with xscreensaver, reported by Janne Huttunen. Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Janne Huttunen <jahuttun@gmail.com> Tested-by: Jan Kriho <Erbureth@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a1dec7cd6adabaf8770dc3b21b0df30ce2f0bc8d Author: Julien Cristau <jcristau@debian.org> Date: Thu Jul 7 19:18:03 2011 +0200 Xephyr/dri: register screen and window privates on init Fixes assertion failure when calling dixSetPrivate Debian bug#632549 <http://bugs.debian.org/632549> Reported-and-tested-by: Mohammed Sameer <msameer@foolab.org> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 39bc81b60ddc9e495ff3b9bb3c3a6c39e547b43a Author: Keith Packard <keithp@keithp.com> Date: Wed Aug 3 20:57:03 2011 -0700 Version bumped to 1.10.99.902 (1.11 RC2) At the close of the 1.11 non-critical fixes window. Signed-off-by: Keith Packard <keithp@keithp.com> commit 9504caf1c3243e3ab2eb7126bc2bb876a8f89918 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri May 6 18:19:34 2011 +0300 composite: Inhibit window background paint with manual subwindow redirection The composite extension spec says that window background painting should be inhibited when the subwindow redirection mode is set to manual. This eliminates the ugly flashing effect when compiz unredirects a fullscreen window. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Owen Taylor <otaylor@fishsoup.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f1d75f3b742231c4c09f13d7a22ed920014cb5ef Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Thu Jul 28 15:17:59 2011 -0700 Revert "composite: Don't backfill non-MapWindow allocations" This reverts commit db8840600e8e21356241eb87395031388d9b54d2. It was an optimization for the resize case, but 193ecc8b453b22 made it so that no backfilling takes place on resize if left in. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Conflicts: composite/compalloc.c Signed-off-by: Keith Packard <keithp@keithp.com> commit e87adcc9e024982fdad974de2876b00cf974dab8 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jul 31 21:14:59 2011 +0200 Xquartz: include new localization files in the tarball Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit a1bb5062c72667b2f10b56925c61888acc89e3e4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jul 21 10:33:58 2011 -0700 XQuartz: xpr: Don't FatalError if xp_unlock_window fails We added the FatalError in 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 but it caused a regression http://xquartz.macosforge.org/trac/ticket/482 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c319f7b5b3ee651636cdfd165588f0dc972a22a4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jul 20 00:16:42 2011 -0700 XQuartz: Use CFSTR to avoid implicit cast warning of NSString * to CFStringRef Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 08dfff92e8d0c2b1726634392c147f6634d1706d Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Jul 29 16:12:06 2011 -0700 randr: Compare all the bytes in RRPostPendingProperties RRPostPendingProperties tries to compare the pending and current property values to decide whether they're actually changing. However, it does this using a memcmp that passes in pending_value->size as the number of bytes. This is actually the number of elements, where each element is (pending_value->format / 8) bytes long. This causes the pending value to not be propagated if the first pending_value->size bytes are the same and only the end of it is changing. Fix this by computing the total number of bytes to compare in the memcmp. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b8f61c11c94708d4f17720a55945dee4621315a4 Merge: 5596f10cc f51e42f58 Author: Keith Packard <keithp@keithp.com> Date: Fri Jul 29 14:58:58 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit f51e42f583073bde0bc8131887cb7220636c8855 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 20 13:09:05 2011 +1000 Terminate the log with one last message. Instead of just closing the log when everything is done, put one more message in stating that we're actually terminating. Users or scripts that look at the Xorg.log will then know that a) the server has terminated properly and b) why the server terminated (to some degree, given that most real-world errors will be caused by AbortServer()). Acked-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 01de08c7d2c00eef238adba6665896ea3cd7d511 Author: Julien Cristau <jcristau@debian.org> Date: Tue Jul 26 20:40:38 2011 +0200 configure: set default xkb rules to evdev on Linux If config/udev was enabled, this would default to base, which means that after regen the devices would get the wrong rules, and hilarity would ensue. It's probably safe to default to evdev unconditionally on Linux by now. Reported-by: Bastian Blank <waldi@debian.org> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3798dd379c1ecf325f9907128fb66d20372f6876 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 20 09:00:18 2011 +1000 Initialize the fd to -1 for xorg.conf input devices. For hotplugged devices, xf86AllocateInput does that for us but the xorg.conf path is different. Since not all drivers reset the fd during PreInit but may still call close(pInfo->fd) in all cases, this can terminate the logging early. Reproducible: add a wacom driver InputDevice section with no Option Device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f2a6735cfc07789cca81852b24a85578f200d83d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 12:34:32 2011 +1000 xfree86: NULL option values are technically valid, don't strdup them Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f0d7e9db28c374a3db359bcb63a7ce79fd84b541 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 4 14:14:39 2011 +1000 xfree86: duplicate xorg.conf device information before xf86NewInputDevice xf86ConfigLayout.inputs contains the information from the xorg.conf file. Passing this into xf86NewInputDevice means the device will get cleaned up on exit and the pointers in xf86ConfigLayout.inputs are left dangling. In the second server generation, this results in a server crash. Also, rename pDev to pInfo. pDev is pretty much reserved for DeviceIntPtr types. Reproducible: AutoAddDevices off and xorg.conf input sections, trigger server regeneration. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8ffddbcf72170e246826ee0f39f18989a29fa218 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 27 16:30:28 2011 +1000 xfree86: Remove devices that failed to enable on startup Devices that succeeded during PreInit and DEVICE_INIT but failed in DEVICE_ON would be deleted through xf86DeleteInput but not removed from the list of input devices (and not turned off). The result was a double free on server shutdown. Fix this by calling RemoveDevice if EnableDevice fails. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 6cea28fe4b7a4a22ad270d8c71403db84a9bfb2c Author: Lennart Poettering <lennart@poettering.net> Date: Mon Jul 18 21:18:27 2011 +0200 config: don't fail if a device vanished by the time we managed to look at it The nature of hotplug is that a device we enumerated might already be gone by the time we look at it, so don't assume otherwise. Signed-off-by: Lennart Poettering <lennart@poettering.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f13de9ca1b7c4dd0dd5c08037c6bd53f88ac30f5 Author: Lennart Poettering <lennart@poettering.net> Date: Mon Jul 18 21:17:49 2011 +0200 config: limit the kernel subsystems we look for devices in Don't enumerate/monitor all devices of the system (since that can be quite a few), but limit our search to devices from the "input" subsystem, as well as the "tty" subsystem (to cover Wacom tablets). This should make X start up a bit faster and reduce the number of unnecessary wake-ups of the X server. Signed-off-by: Lennart Poettering <lennart@poettering.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 882e3c2680c339ad7aa0d664e0b0f02b8a05b11d Author: Lennart Poettering <lennart@poettering.net> Date: Mon Jul 18 21:17:10 2011 +0200 config: process udev "changed" and "add" events in the same code paths udev gives no guarantee that before each "changed" event for a device there's an "add" event, or that before each "remove" is an "add", or that before each "add" there was no "add" already and so on. Users can trigger these events at any time with "udevadm trigger", and netlink is a lossy transport, hence the events can come in unexpected ordering. With other words: regardless which event is generated, the X server must not choke on it and make the best of it, hence make sure that if we get an "add" event for an existing device we don't add the device a second time. Signed-off-by: Lennart Poettering <lennart@poettering.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5596f10cce58295d8af73646352b314ecb3ddfca Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Jul 9 13:21:04 2011 +0100 Remove hw/xwin/xlaunch Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 73864a87aacbce85b520ccaa6e360b82c0e99716 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 19 20:03:48 2011 -0700 XQuartz: Localization updates Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit d2463df84d3a160b2dd1e706b02985e1817784e3 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 19 20:02:33 2011 -0700 XQuartz: Add english NIB changes for scroll_in_device_direction Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit e36e7ad6314ca5fcd3292b8022f0a618d567d72b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 19 20:01:11 2011 -0700 XQuartz: Add GUI controls to toggle scroll_in_device_direction Also cleaned up the wording for fullscreen_menu. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ac43984215faf464fd48bd006cac1c6539603cea Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 19 20:00:27 2011 -0700 XQuartz: Add a scroll_in_device_direction preference This preference allows users to override the related option in Mac OS X's Mouse/Trackpad preferences. This effectively lets the user determine which "context" all of X11 fits into for context-based scrolling until such API exists within X11 itself to pass along to X11 clients. This is applicable to Mav OS X 10.7+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ec95a9c829b8e37529aa828c05fbaabc45cffe42 Author: George Staplin <gstaplin@apple.com> Date: Wed Mar 4 02:03:52 2009 -0700 XQuartz: Add diagnostic error checking to xp_destroy_surface. This occurred to me in hindsight after the last commit. If the original developer had done this, we would have noticed the problem sooner. (cherry picked from commit aa0a57996f3e7d16238f69976958c2526821388b) commit 4fe7df265324f63025686efe9d32342e3cef40d3 Author: George Staplin <gstaplin@apple.com> Date: Wed Mar 4 01:39:58 2009 -0700 XQuartz: Fix a memory leak with surfaces that a new test found. xp_destroy_surface was called with a surface id of 0, due to some premature cleanup that set it to 0. This means the surfaces weren't being destroyed until the window was. The code that did that was: pDRIDrawablePriv->sid = 0; In long running applications this leak may or may not have been harmful. With the old libGL the surfaces weren't destroyed until the context was destroyed or a new context created. In the new libGL they are reference counted, and released much sooner, so we ran into a resource leak more noticeably with some tests. Make the Apple DRI code dispatch events to the client(s) for destroyed surfaces, when a resource is destroyed. This seems to work in my tests, however this clearly wasn't working for a while, so bugs may result in the future if it enables some new (unexpected) side effects. Also add a few helpful comments to aid in understanding the code in the future. Tested with the test suite, Pymol, and various Mesa demos. (cherry picked from commit bede83eb19a1629396fcd5a46441f8476a8fcd1b) commit 0ebe45a717faa6464d3b1ab73e30570518ee4798 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 19 19:42:44 2011 -0700 XQuartz: DRI: Dead code removal Also add some comments that weren't merged in from server-1.4-apple's 99babae1326485c27eb9253db83afdd6aef9e362 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 88ad050f3c2f9f11bafb56a8cf777518795295a9 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Jul 18 22:54:21 2011 -0700 XQuartz: Add some sanity checking and a fallback for the bundle id. This way we'll print an error and still mostly work rather than crashing if someone installs XQuartz.app incorrectly or tries running the server within the build system rather than the installed system. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 89bfa0c633f3096cca6f983bca1507d3f4b902a8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Jul 15 10:39:39 2011 -0700 XQuartz: DarwinEQFini doesn't return Bool Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 82f5521a6d91ebcd2a4400f6c221ad625edc99a1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 13 12:08:04 2011 +0100 XKB: Work around broken interps from old xkbcomp Bugfix for broken xkbcomp: if we encounter an XFree86Private action with Any+AnyOfOrNone(All), then we skip the interp as broken. Versions of xkbcomp below 1.2.2 had a bug where they would interpret a symbol that couldn't be found in an interpret as Any. So, an XF86LogWindowTree+AnyOfOrNone(All) interp that triggered the PrWins action would make every key without an action trigger PrWins if libX11 didn't yet know about the XF86LogWindowTree keysym. None too useful. We only do this for XFree86 actions, as the current XKB dataset relies on Any+AnyOfOrNone(All) -> SetMods for Ctrl in particular. See xkbcomp commits 2a473b906943ffd807ad81960c47530ee7ae9a60 and 3caab5aa37decb7b5dc1642a0452efc3e1f5100e for more details. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c177a5bcaa170d24a784540460906cc04ac5c752 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 13 12:08:03 2011 +0100 Fix non-Composite builds in PrintWindowTree The previous patch accidentally introduced a hard dependency on Composite. Sorry, OS X. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reported-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 01dbf2514aa0cc8c40a876a24e3cb0737c41da19 Merge: 5a801af68 af0fbc37e Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 13 11:44:15 2011 -0700 Merge remote-tracking branch 'jturney/master' commit 5a801af689fce9dfe84453bbc2b029cb4782de83 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Jul 12 19:50:05 2011 -0400 XWinrc: replace hard coded section number with __filemansuffix__ Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit af0fbc37e35ddaabf12a8d7abc79ea11958ec8ac Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jun 23 07:45:13 2011 -0400 XWinrc: replace hard coded section number with __filemansuffix__ Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 42bc198775a78b328612427c4c8ed4d17e005ae9 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 24 18:29:41 2011 +0000 glx: Remove a few lingering traces of __GLXscreen.GLXVersion The GLXversion member of the __GLXscreen struct is just cruft since commit ad5c0d9efa47476ed5cf75c82265c73919e468b4, when we started returning the minimum GLX version supported by all of the screens on the display, rather than the maximum version supported by the server. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 005e68ba59782b60dd5c44a06c75b1fa5e8d70d8 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Jan 20 16:21:04 2011 +0000 hw/xwin: Add -wgl option to XWin manpage Document the -[no]wgl options in the XWin manpage Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d62726019e4b7bfac8a23d0d733677b141047d66 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Nov 2 11:38:53 2010 +0000 hw/xwin: Add items to WGL AIGLX todo Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 276735ef5d12e79fe051996f100c5730c1e69334 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Oct 11 16:22:49 2010 +0100 hw/xwin: Report Window XIDs in Window debug messages Report Window XIDs in Window create/destroy/reparent debug messages It's actually quite useful if you are trying to corrolate those events with what a client is doing... Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b0b54338e2f8aed6e6a683ebddd2a2acbefabecd Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Oct 11 16:25:03 2010 +0100 hw/xwin: Add a flag to track which windows have been drawn to using WGL. Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 98c6d91a48f460fdbca93700ab637eadf946fb0e Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Mar 24 20:39:51 2011 +0000 hw/xwin/glx: Fix some warnings in generated wrapper code Add a suitable cast to the generated code for glWinSetupDispatchTable() so it doesn't generate screeds of warnings Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b67e80c84e4af54007aa1bd1e4a97a4d1b3d3765 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 24 18:41:05 2011 +0000 hw/xwin/glx: Handle failure to get any fbconfigs more gracefully. Handle failure to get any useful pixel formats for GLX fbconfigs more gracefully: If we didn't get any useful pixel formats from wglGetPixelFormatAttribivARB(), fall back to using DescribePixelFormat(). If that doesn't give us any useful pixel formats, fallback to software rendering. This works around a problem with Intel 845G drivers, where wglGetPixelFormatAttribivARB() doesn't seem to work as we expect it to... Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9915b169237e3b2d817bd3d4455f3c01dd7dd2b5 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Nov 1 19:53:42 2010 +0000 hw/xwin/glx: Don't spam log with wglwrap symbol resolution status at startup ... instead just log if an attempt is made to call a wrapper for a function which didn't resolve Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 8216316867f07819b8e8b377f2633fbf8876abf7 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Oct 30 17:23:52 2010 +0100 hw/xwin/glx: Better handling of SetPixelFormat() failure Propagate and report the failure if SetPixelFormat() fails Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit eecc8e06eb4bdfd4354144206d990cd9ccb69721 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Oct 30 17:22:33 2010 +0100 hw/xwin/glx: Improvements to glxWinErrorMessage() reporting in WGL GLX provider Request the message using languageID 0 (best effort), rather than only using language neutral messages Always report the numeric error code. Trim any trailing \r from FormatMessage() output Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 3873be16d050ab12fc78f1e7f0c36c2ac88d0a98 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Oct 11 16:21:40 2010 +0100 hw/xwin/glx: Fix fbconfig dumper formatting for 3 digit index numbers Some graphics hardware supports hundreds of pixel formats, so adjust formatting in fbconfig dumper for 3 digit index numbers Also report the PFD_SUPPORT_DIRECTDRAW, PFD_DIRECT3D_ACCELERATED and PFD_SUPPORT_COMPOSITION flags introduced with aero Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d4096abb591353405417e53816e5c46e904e7b25 Merge: 61f87a75f 87d4f90bf Author: Keith Packard <keithp@keithp.com> Date: Fri Jul 1 15:45:45 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit 87d4f90bfcb509471ac9e7886e14a92b33223fd7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 27 09:10:42 2011 +1000 input: free the EQ allocated memory on shutdown (#38634) mieqFini() already does the right thing, but it needs to be called by the various DDXs and the XTest Extension. X.Org Bug 38634 <http://bugs.freedesktop.org/show_bug.cgi?id=38634> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Acked-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e084ac30b37c36016bb0dbb1b79e60a7799aee02 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 2 14:52:42 2011 +0000 Input: Reset SD remainder when copying co-ords from MD In updateSlaveDeviceCoords, pDev->last.valuators was being copied from the master, but pDev->last.remainder wasn't. Make sure we copy both, to avoid minor inconsistencies. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 23a783278963919778d017965542e0f983814e37 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 24 11:02:23 2011 +1000 input: add POINTER_NORAW to avoid generation of raw events (#30068) RawEvents are supposed to be events coming from the driver. When warping the pointer, this should not generate a raw event. X.Org Bug 30068 <http://bugs.freedesktop.org/show_bug.cgi?id=30068> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9444e40d77508d545e3c0a8123f61950c22d89fa Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Mar 1 11:11:22 2011 +0000 Test: Input: Only ever set up to MAX_VALUATORS valuators Previously, the input tests were working up to sizeof(mask) * 8, which could be more than the arrays; the latter only being sized as MAX_VALUATORS. Hypothetically, if you were switching the stored valuator values to double instead of uint32_t, and you attempted to set the 39th member of a MAX_VALUATORS-sized (36) array, you'd probably end up smashing ev->key_repeat into oblivion and then tripping the check for invalid flags because you haven't yet put XIPointerEmulated into the valid flags for XI_Motion. Probably. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1e65a01cf73f1fbdfe0d63eaecea412cf8472cb4 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 17 16:28:05 2011 +0100 Test: Ensure libxservertest gets relinked when necessary Similar to how we link Xorg, make sure that whenever any of the component libraries changes, we relink libxservertest and the tests. Not much use testing anything other than the actual source in your tree. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0f41d6c851df76d0423d9c37ad809d3440906944 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 17 13:20:19 2011 +0100 KDrive: Remove useless miPointerUpdateSprite call miPointerUpdateSprite is already called from mieqProcessInputEvents, so calling it by hand immediately after isn't massively helpful. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 57b767d2927e5c2e561a431be4e604df65423422 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 17 13:19:46 2011 +0100 DMX: Remove useless miPointerUpdateSprite call miPointerUpdateSprite is already called from mieqProcessInputEvents, so calling it by hand immediately after isn't massively helpful. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cf398755c0ca1e031514862b670956e7b9ace5ef Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 17 15:29:44 2011 +0100 XWin: Remove executable bit from headers Headers don't really need to be mode 0755. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7d2543a3cb3089241982ce4f8984fd723d5312a1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 29 12:03:01 2010 +0000 XKB: Add debug key actions for grabs & window tree Add four new private XKB actions for debugging: * PrGrbs: print active grabs to the log file * Ungrab: ungrab all currently active grabs * ClsGrb: kill clients with active grabs * PrWins: dump the current window tree to the log file To use these, you need to modify your XKB maps, e.g. the following to have Ctrl+Alt+(F9-F12) mapped to the above: - compat/xfree86: interpret XF86LogGrabInfo { action = Private(type=0x86, data="PrGrbs"); }; interpret XF86Ungrab { action = Private(type=0x86, data="Ungrab"); } interpret XF86ClearGrab { action = Private(type=0x86, data="ClsGrb"); } interpret XF86LogWindowTree { action = Private(type=0x86, data="PrWins"); } - symbols/pc: key <FK09> { type="CTRL+ALT", [ Return, XF86LogGrabInfo ] }; key <FK10> { type="CTRL+ALT", [ Return, XF86Ungrab ] }; key <FK11> { type="CTRL+ALT", [ Return, XF86ClearGrab ] }; key <FK12> { type="CTRL+ALT", [ Return, XF86LogWindowTree ] }; At the moment, this only works if the grabbing client continues to call AllowEvents, as the server does no event processing at all when a device is frozen. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ddf735fd4e9658bb5610f5e911f3b4055d5acf89 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Oct 13 19:56:57 2009 +1100 DIX: Make PrintWindowTree actually useful Rewrite PrintWindowTree to make it actually tell you what you want to know. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b27d61e4433a2a0140ed8a6128e4427451e37fec Author: Matěj Cepl <mcepl@redhat.com> Date: Fri Jun 17 15:26:17 2011 +0100 Fix UTF-8 encoding Report to find out all non-UTF-8 files created by cat extensions |xargs -I XXXX find . -name \*.XXXX |while read FILE ; do if ( iconv -f utf8 -t ucs2 $FILE >/dev/null 2>/dev/null ) ; then /bin/true else echo $FILE fi done >>report Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> [Daniel: git am failed for me, so I redid it. The method listed in the commit message also failed, so I just used file/grep/iconv. The results are the same though.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2ee85d954c8f3a6affbd9b1b745594ff12e8b670 Author: Scott James Remnant <scott@netsplit.com> Date: Tue Jun 14 16:36:07 2011 -0700 dix: avoid calling deleted block and wakeup handlers BlockHandler and WakeupHandlers may be removed within a different BlockHandler or WakeupHandler, especially since config/udev uses these and removes devices. Calling the deleted handlers and passing potentially freed data can result in the X server segfaulting after device removal, or events that result in device removal such as undocking or suspend/ resume. Signed-off-by: Scott James Remnant <scott@netsplit.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b573cdd40ee49fae299fe2e7cbd02159ae8ae617 Author: Marcin Slusarz <marcin.slusarz@gmail.com> Date: Tue Jun 7 21:22:15 2011 +0200 dri2: restore Screen->ConfigNotify on close ConfigNotify is set by DRI2ScreenInit, but not restored to previous state on close. Fix it. (I'm preparing a patch for xf86-video-nouveau which detects GPU lockup after dri2 init and it needs to reinitialize dri2) Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 61f87a75f2bcda939a1778d39be8cfa5c886e6d8 Merge: 0d2153a46 72d914335 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 29 20:14:51 2011 -0700 Merge remote-tracking branch 'jturney/master' commit 0d2153a46cc72d5f2e6a9081a3cf153aa3eb7787 Merge: b631c39a2 932513e23 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 29 20:08:32 2011 -0700 Merge remote-tracking branch 'jbarnes/master' commit b631c39a21c8d74fd00b8932df342d6921cce8f4 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jun 23 13:37:45 2011 -0400 Remove unused check for PERL program Unable to find any use of the PERL Automake variable. It was used in hw/xfree86/scanpci around 2005. Should it ever be needed, use XORG_WITH_PERL macro. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d5ca33ca2dd08e8436439da926d2dedaabc268fa Merge: 38d55f06c 4edf49d03 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 29 18:54:33 2011 -0700 Merge remote-tracking branch 'kibi/master' commit 72d914335c9ad0e0f4a34b9f7e2901b830c499bf Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Tue Mar 23 04:34:22 2010 -0500 Cygwin/X: Left-justify website link in About box Left-justify website link in About box. This is a cosmetic fix to make the About box display correctly when Windows is configured with a non-default DPI value Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit e78628406f0428454983db1c51a8c828bf5684e5 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Aug 12 15:00:01 2010 +0100 Cygwin/X: Preserve client area size and position on Windows window style change When the style changes, adjust the window size so the client area remains the same. Otherwise the window size may change when sizing is reflected from Windows to X, and some windows are drawn expecting them to be exactly the requested size (e.g. the gmplayer control window) Use DeferWindowPos to delay the resize to preserve client area on WM_STYLECHANGING until after the style change has actually happened in WM_STYLECHANGED As a consquence of this, we need to be more careful to create windows with exactly the requested placement and client area initially, so the client area matches what the X client requested Also synchronize the X windows idea of the placement of a window which Windows is allowed to place Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 1d7f3a0031b4ae7d8aa984799ffa578788061ce4 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Nov 7 19:34:12 2009 +0000 glx: Move GLX extension string utility functions Move GLX extension string utility functions from the DRI1 convenience library into the GLX extension convenience library, so other DDX which don't have DRI can use them. This is probably also needed if anyone actually tries to build an Xorg DDX with only DRI2 support... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit 932513e23b5fe1793cc38eabe02df82e1cc6e4d9 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu May 5 13:11:46 2011 -0700 DRI2/GLX: use new swap event types Use the new event types so we can pass a valid SBC value to clients. Fix up the completion calls to use CARD32 instead of CARD64 to match the new field size. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit a3cb7d097a281252cebbc3c65c67149e106482ac Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue May 3 10:36:44 2011 -0700 GLX/DRI2: pass drawable correctly for indirect swap events Pass the right drawable pointer as data to the swap complete function. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 3e8270b869ebf788778d5d56107f6d47c7c050d0 Author: Adam Jackson <ajax@redhat.com> Date: Tue Apr 12 15:30:25 2011 -0400 glx: Fix fbconfigs with no corresponding visual There are, in general, more fbconfig depths than visual depths. fbconfigs need not support Window rendering, however any that do must have an associated visual ID (which we got right), and any that do not must not claim GLX_WINDOW_BIT in GLX_DRAWABLE_TYPE (which we got wrong). Fixes piglit/glx-fbconfig-sanity, assuming you have a sufficiently recent piglit, as that test formerly wrongly required pixmap-capable fbconfigs to have a visual. v2: Additional check for fbconfigs that didn't have GLX_WINDOW_BIT in the first place, from previous patch by Jon TURNEY; also, also clear ->visualID. Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 38d55f06cfbf4b05fee0aef8f97f90e835beaacb Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jun 27 15:06:16 2011 +0100 Guard use of backtrace() with HAVE_BACKTRACE Guard the use of backtrace() with HAVE_BACKTRACE, since we already have the autoconf machinery for setting that. For the moment, assume dladdr() is available when backtrace() is Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit bea57392c724f439987832b422941ae897953e4a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Jun 25 11:29:53 2011 -0700 XQuartz: Fix Makefile dependencies automake generates _DEPENDENCIES from _LIBADD, but it strips out variables. This resulted in not relinking if some components were rebuilt (like libdix, libos, etc). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c8b80a82d97d92d445c1c0af6dba42c9de7c56cd Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jun 21 21:14:46 2011 -0700 XQuartz: Make a call to activateIgnoringOtherApps in our NSApplicationActivatedEventType handler In addition, this change will not call into the X11 activation unless an X11 window was active when we deactivated. We can't rely on the event and current key windows because the key window will be nil until activated, and the event will only reference the window if the window was clicked (whereas it will be nil if we activated via dock or cmd-tab). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9d568450b1319e9057319ebb37e76003bcba447d Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 28 09:33:25 2011 -0700 Create sdksyms.dep in the right place at configure time sdksyms moved from hw/xfree86/loader to hw/xfree86, so the configure-time create of sdksyms.dep needs to reflect that change. Otherwise, make might be confused by a missing file and (more importantly to me) hw/xfree86/loader/sdksyms.dep will be left around after 'make clean' causing 'make distcheck' to fail. commit f968f4ace9410d827fb6b68c4e38ea9516641309 Merge: 4dbed2625 163441fe5 Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 28 09:10:14 2011 -0700 Merge remote-tracking branch 'dbn/no-libxorg' commit 4dbed2625431a92e20bede7b8cef847b5d5d99ba Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 27 14:45:18 2011 +1000 xfree86: Only log the serial bytes if debug is on. Introduced in e3f296d91dfe6b827195e1d387e1a04aa73b85c3, when the ifdef DEBUG around the whole block was removed, but only two of the three ErrorF switched to DebugF. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 163441fe531a77f7fa54bfa59c5ab49c78f44306 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Jun 14 20:03:06 2011 -0700 xfree86: Remove libxorg convenience library to speed up build libxorg.la served to collect all the Xorg convenience libraries into one massive archive to link into Xorg. This made things easy for symbol resolution, but it tremendously slowed down the build since each change caused libxorg.la to be rebuilt. This is an extremely slow process of extracting all the objects from the sub-libraries and recombining them. Instead, the archives are linked directly into Xorg. The order of the libraries had to be tweaked a bit to make symbols resolve correctly with the lower level code moving later in the link command. As a side effect, since the dtrace objects are now being linked directly into Xorg, we don't need the SPECIAL_DTRACE_OBJECTS hack to add them twice. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6259b30111f568ec3d1b32dc6382bce46d8e6ccc Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Jun 14 19:47:02 2011 -0700 xfree86: Move sdksyms generation to ddx toplevel The symbols in sdksyms.c cover the entire source tree. In order to make them resolve when libxorg.la goes away, move the objects from libloader to Xorg. Unfortunately, this means sdksyms needs to get built again for the test code. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7d5c8a12cbc295b3e33e1b60bd7330e2bc93a966 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Jun 14 17:21:48 2011 -0700 Don't use empty source files When an empty _SOURCES variable is declared, automake will recognize that only linking is needed. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8ac651552bb70ba36238f430adab2f7a7f24db6e Merge: 945b2ff81 47b6ba320 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 22 11:03:37 2011 -0700 Merge remote-tracking branch 'alanc/master' commit 945b2ff8141c58344fc9558ee3853fad3e86134b Author: Gaetan Nadon <memsize@videotron.ca> Date: Wed Jun 8 15:18:12 2011 -0400 docbook.am: --path is also required for xsltproc The XSLT processor also needs to know about the entities defined in xserver.ent. It removes error messages. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6326b0f0746ded410672ad0270d1c8a0e9cb59f9 Author: Gaetan Nadon <memsize@videotron.ca> Date: Wed Jun 8 15:17:59 2011 -0400 Update .gitignore as new tests have been added Refactor to follow the pattern one Makefile, one .gitignore where needed. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 47b6ba3204d650393a7255ce2af27b8c018bb586 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jun 20 22:17:03 2011 -0700 Add xkeyboard-config to See Also of man pages referencing xkb Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit cfbe471b586282aea89f7b4802c051f22301bf59 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jun 20 22:06:00 2011 -0700 Xdmx.man: convert section references to substituted forms Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit c3278f3c1786e66019a39e2612761f74782a48ee Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jun 11 10:56:08 2011 -0700 Xdmx.man: additional updates to modernize XKB information Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 19e37067131175219eca7d2b11c2ee59af280575 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jun 11 10:41:48 2011 -0700 Xdmx.man: Show actual configured XKB defaults instead of old hardcoded values Passed through from configure.ac via manpages.am Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit acf2173b321749c42d29d858d3521a4d506c732e Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jun 16 20:12:03 2011 -0400 Install xml versions of specs even if HAVE_XMLTO is false DocBook/XML input source is also a useful output format that can be viewed with an XML viewer or editor and by some O/S help system. Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 44890b3e266116ae71bfca2590e5fd9cdfbdb69b Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jun 16 20:11:52 2011 -0400 Install target dbs alongside generated documents This matches a change in xorg-sgml-docs whereby the masterdb will look for the target dbs into the same location as the generated documents. The target dbs are now installed alongside the generated documents. Previously they are installed in $prefix/sgml/X11/dbs alongside masterdb which has the potential of installing outside the package prefix and cause distcheck to fail when user does not have write permission in this package. Requires XORG_CHECK_SGML_DOCTOOLS(1.8) which was released 2011-06-11 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a42ef6c940604172e54de110b7d989cb2208f7ef Author: Rob Clark <robdclark@gmail.com> Date: Tue Jun 14 11:45:38 2011 -0500 EXA: fix typo The incorrect drawable deltas were applied if dst was a redirected window. Resulting in a bogus region passed to prepare_access_reg(). Signed-off-by: Rob Clark <rob@ti.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4edf49d032028aa4b9887d02b926b0c372c4451d Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:18 2011 +0200 dmx/examples: Fix missing key_click_percent assignment. Thanks to gcc's -Wunused-but-set-variable, stop ignoring the percent parameter, and add it to the XKeyboardControl structure before the XChangeKeyboardControl call. This warning goes away accordingly: | CC xbell-xbell.o | xbell.c: In function ‘main’: | xbell.c:74:22: warning: variable ‘percent’ set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 33dad2b74e3489c8a6b5fa574172d6cd2b6de037 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 hw/dmx: Stop using variables for text widgets. They are unused in the sense they're not getting any callback set up, so there's no point in storing them into variables. Keep the initial alignment of the parameters to try and reduce the diff noise. Those warnings go away accordingly: | CC xdmxconfig-xdmxconfig.o | xdmxconfig.c: In function ‘main’: | xdmxconfig.c:881:29: warning: variable ‘quittext’ set but not used [-Wunused-but-set-variable] | xdmxconfig.c:880:53: warning: variable ‘abouttext’ set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 34a9f2a90d34a2ab7ecf56d329e75e8da569f939 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 xfixes: Remove unused variable. The last use of pScreen in ProcXFixesSetPictureClipRegion was removed in aa7096ca6f108e399d9916639cf20c57f9776305 so remove it entirely. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit ad0d0833d45ea24d7af1f724b9905133fe3b065f Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 xfixes: Mark some variables as unused. Calling Unwrap() is just a way of performing an assignment while keeping a backup of the original value. In the CursorCloseScreen function, the backup value doesn't seem to be useful, but Unwrap() is used anyway (probably to stay in line with other functions). As a consequence, mark those variables as unused. The following warnings go away accordingly: | CC cursor.lo | cursor.c: In function 'CursorCloseScreen': | cursor.c:186:26: warning: variable 'display_proc' set but not used [-Wunused-but-set-variable] | cursor.c:185:24: warning: variable 'close_proc' set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit f41ac25d932ef34ab912201ab5ce65f85f2ff171 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 miext: Mark some variables as unused. There's no use for the values set through the various macro calls (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused. The following warnings go away accordingly: | CC shpacked.lo | shpacked.c: In function 'shadowUpdatePacked': | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar8.lo | shplanar8.c: In function 'shadowUpdatePlanar4x8': | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar.lo | shplanar.c: In function 'shadowUpdatePlanar4': | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_180.lo | In file included from shrot16pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270.lo | In file included from shrot16pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270YX.lo | In file included from shrot16pack_270YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90.lo | In file included from shrot16pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90YX.lo | In file included from shrot16pack_90YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack.lo | In file included from shrot16pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate16': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_180.lo | In file included from shrot32pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_270.lo | In file included from shrot32pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_90.lo | In file included from shrot32pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack.lo | In file included from shrot32pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate32': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_180.lo | In file included from shrot8pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_270.lo | In file included from shrot8pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_90.lo | In file included from shrot8pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack.lo | In file included from shrot8pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate8': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrotate.lo | shrotate.c: In function 'shadowUpdateRotatePacked': | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shpacked.lo | shpacked.c: In function 'shadowUpdatePacked': | shpacked.c:55:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shpacked.c:55:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar8.lo | shplanar8.c: In function 'shadowUpdatePlanar4x8': | shplanar8.c:105:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar8.c:105:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shplanar.lo | shplanar.c: In function 'shadowUpdatePlanar4': | shplanar.c:101:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shplanar.c:101:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_180.lo | In file included from shrot16pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270.lo | In file included from shrot16pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_270YX.lo | In file included from shrot16pack_270YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_270YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90.lo | In file included from shrot16pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate16_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack_90YX.lo | In file included from shrot16pack_90YX.c:31:0: | shrotpackYX.h: In function 'shadowUpdateRotate16_90YX': | shrotpackYX.h:72:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpackYX.h:72:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot16pack.lo | In file included from shrot16pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate16': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_180.lo | In file included from shrot32pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_270.lo | In file included from shrot32pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack_90.lo | In file included from shrot32pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate32_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot32pack.lo | In file included from shrot32pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate32': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_180.lo | In file included from shrot8pack_180.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_180': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_270.lo | In file included from shrot8pack_270.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_270': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack_90.lo | In file included from shrot8pack_90.c:31:0: | shrotpack.h: In function 'shadowUpdateRotate8_90': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrot8pack.lo | In file included from shrot8pack.c:30:0: | shrotpack.h: In function 'shadowUpdateRotate8': | shrotpack.h:109:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotpack.h:109:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] | CC shrotate.lo | shrotate.c:62:19: warning: variable 'shaYoff' set but not used [-Wunused-but-set-variable] | shrotate.c:62:10: warning: variable 'shaXoff' set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit fe6f489d21d77aacf0a073883625619018d764b3 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 fb: Mark some variables as unused. There's no use for the values set through the various macro calls (fbGetDrawable and fbGetDrawablePixmap), so mark those variables as unused. The following warnings go away accordingly: | CC libfb_la-fb24_32.lo | fb24_32.c: In function 'fb24_32ReformatTile': | fb24_32.c:544:19: warning: variable 'newYoff' set but not used [-Wunused-but-set-variable] | fb24_32.c:544:10: warning: variable 'newXoff' set but not used [-Wunused-but-set-variable] | fb24_32.c:543:19: warning: variable 'oldYoff' set but not used [-Wunused-but-set-variable] | fb24_32.c:543:10: warning: variable 'oldXoff' set but not used [-Wunused-but-set-variable] | CC libfb_la-fbfill.lo | fbfill.c: In function 'fbFill': | fbfill.c:72:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] | fbfill.c:72:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] | fbfill.c:100:21: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] | fbfill.c:100:11: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] | fbfill.c:142:20: warning: variable 'tileYoff' set but not used [-Wunused-but-set-variable] | fbfill.c:142:10: warning: variable 'tileXoff' set but not used [-Wunused-but-set-variable] | CC libfb_la-fbgc.lo | fbgc.c: In function 'fbPadPixmap': | fbgc.c:92:19: warning: variable 'yOff' set but not used [-Wunused-but-set-variable] | fbgc.c:92:13: warning: variable 'xOff' set but not used [-Wunused-but-set-variable] | fbgc.c: In function 'fbCanEvenStipple': | fbgc.c:166:23: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] | fbgc.c:166:13: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] | CC libfb_la-fbpush.lo | fbpush.c: In function 'fbPushPixels': | fbpush.c:238:20: warning: variable 'stipYoff' set but not used [-Wunused-but-set-variable] | fbpush.c:238:10: warning: variable 'stipXoff' set but not used [-Wunused-but-set-variable] Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 8da16898d9de5da1f80b789f0b371070968285f8 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:17 2011 +0200 fb: Simplify logic, get rid of set but unused variable. wrapped is only useful is FB_ACCESS_WRAPPER is set; simplify the logic accordingly, and only set it when that's defined. The following warning goes away accordingly: | CC libfb_la-fbarc.lo | fbarc.c: In function 'fbPolyArc': | fbarc.c:71:11: warning: variable 'wrapped' set but not used [-Wunused-but-set-variable] Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 9a8bfc2c06f0a9206b64ae01a783cf5513f021a6 Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:16 2011 +0200 configure: Bump dependency on xproto. Bumping this dependency means some additional macros can be used, like _X_UNUSED. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 9da5aa09d70e26dd4d2ef878a21317dae7bf24de Author: Cyril Brulebois <kibi@debian.org> Date: Tue May 24 18:33:11 2011 +0200 Xext: Fix buggy checks. XvMCScreenKey is defined as XvMCScreenKeyRec's address, so will never be NULL. Use the check proposed by Alan Coopersmith and Jeremy Huddleston instead. Those warnings go away accordingly: | CC xvmc.lo | xvmc.c: In function 'ProcXvMCListSubpictureTypes': | xvmc.c:490:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] | xvmc.c: In function 'XvMCExtensionInit': | xvmc.c:671:21: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] | xvmc.c: In function 'XvMCFindXvImage': | xvmc.c:749:22: warning: the comparison will always evaluate as 'false' for the address of 'XvMCScreenKeyRec' will never be NULL [-Waddress] Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 778309fd0ef6b586468c1a3b569e3548503459ee Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jun 14 13:23:00 2011 -0700 XQuartz: GLX: Fix a -Wformat-security compilation warning Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 34e2598f0ad247071bd6a4312d9014d6e3b2305a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jun 14 11:18:50 2011 -0700 XQuartz: GLX: Use _glapi_create_table_from_handle to create out dispatch table Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ecec578e35f91a2cbc5d07bc8d45241af7bb585f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jun 14 12:51:04 2011 -0700 glx: Add _glapi_create_table_from_handle _glapi_create_table_from_handle was recently added to mesa to ease creation of a _glapi_table. This commit brings this API over to xserver for use in XQuartz (next commit). The API was generated with scripts from current mesa followed by various script-foo to remove entries that are not in the server and add those which are still in the server but not in mesa (CullParameterdvEXT and CullParameterfvEXT) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit c3df4df40761760b281a21f63336ca955670f7bc Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Jun 5 21:59:13 2011 -0400 XQuartz: Add missing include for <pthread.h> BuildFix for Leopard and earlier. https://trac.macports.org/ticket/29717 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 08a7246f43c9f18079219a1c982bed558722f545 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 14:21:39 2011 +1000 dix: rename ProcessRawEvents to dix/events.c:DeliverRawEvent No functional changes, prep work for future changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 0aa45c5c53e2e7ba0723f5a12c1a5f5d4baab933 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 14:19:45 2011 +1000 Xi: use temporary variable for filter. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a1beae635caf81ec31a8998687df0ae92b505fda Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 12:14:32 2011 +1000 dix: split DeliverEventToWindowMask up a bit more. Move out the actual event delivery, it needs to be used from elsewhere. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 58e4831ed68c2fbc219c7250e9837e76a73a6432 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 11:43:50 2011 +1000 dix: rename DeliverEventsToClients to DeliverEventsToWindowMask To avoid confusion with a future patch and it better describes what this does anyway - delivering events to all clients that have the event mask on the window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 37a53f15b0dfa1b25f7e3e826c7c945453398ac5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 11:40:56 2011 +1000 dix: split client list retrieval out of DeliverEventToClients No functional change, but "other" was renamed to "clients". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 02d11af01211da55e9d93fe0e1851a0c6fe57472 Merge: bf9fd0a83 ab0df72cd Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 7 12:31:15 2011 -0700 Merge remote-tracking branch 'kibi/master' commit bf9fd0a83eef771ee018438f05e2d9f20b43539b Merge: 21eec367d 0d140567b Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 7 07:45:22 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit 0d140567ba2b5bf364265dba07de519f691c67a1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 7 10:42:50 2011 +1000 dix: fix crashers with floating device. dc57f89959e549403f8488eb9f23425bd7118b22 accidentally reversed the conditions. in dix/events.c we try to detach floating devices. This leads to a NULL-dereference on GetMaster()->id. in dix/getevents.c we try to get the master device for the floating slave and dereference it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 21eec367d0d9c142458f973062e17add4f693033 Author: Nicolas Kaiser <nikai@nikai.net> Date: Mon Jun 6 16:53:41 2011 +0200 randr: void function cannot return value Providing an argument to return in a function with void return type is not allowed by the C standard, and makes the Sun compilers unhappy. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ab0df72cd33f011cc48736cfbfce9bbe9c359a80 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:21:18 2011 +0200 xkb: Fix case checks for Latin 4. That one was missing _XkbKSLower: XK_kra: U+0138 LATIN SMALL LETTER KRA Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 9eb6e34c2dd09af714400ce6a1063477d7a64776 Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:12:44 2011 +0200 xkb: Fix case checks for Latin 2. Those ones were getting _XkbKSLower for no reasons: XK_ogonek: U+02DB OGONEK XK_doubleacute: U+02DD DOUBLE ACUTE ACCENT Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 2b88189863579eb377bca617465bb76b05fbdebd Author: Cyril Brulebois <kibi@debian.org> Date: Sun Jun 5 03:03:47 2011 +0200 xkb: Fix case checks for Latin 1. That one was missing _XkbKSLower: XK_ssharp: U+00DF LATIN SMALL LETTER SHARP S That one was getting _XkbKSLower for no reasons: XK_division: U+00F7 DIVISION SIGN For reference, XK_multiply was already excluded from the _XkbKSUpper check, it's no big surprise XK_division has to be excluded from the _XkbKSLower check. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit feab04397de2684568dedaaaa8f299cac9f44f8b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Jun 3 02:50:40 2011 -0400 XQuartz: AIGLX: Remove unnecessary includes in indirect.c Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 3fa5d27e46ea8af55dcaaad7a99973c38bd11967 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jun 2 20:04:04 2011 -0700 XQuartz: AIGLX: Setup dispatch table based on runtime capabilities rather than buildtime This will allow XQuartz built on older systems to pickup capabilities on newer systems and prevent runtime failures when building on newer systems and running on older ones. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit dd5d91fc954450e99d53862900ef4fa6320ff382 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Jun 3 02:34:28 2011 -0400 XQuartz: Remove explicit link against libGL This was indented to force a link against OpenGL.framework's libGL, but it actually resulted in linking against mesa's libGL due to the ordering of -L Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 5115c2c7216fc10acb8a26deb904ad15ef18ce8a Author: Cyril Brulebois <kibi@debian.org> Date: Fri Jun 3 18:09:51 2011 +0200 Xephyr: Mention Xserver's options are also accepted. Originally reported in the Debian BTS: http://bugs.debian.org/582650 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jari Aalto <jari.aalto@cante.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 408ed1576dbcf93f4bd27bd3b66917b1bba2226b Author: Cyril Brulebois <kibi@debian.org> Date: Fri Jun 3 18:09:48 2011 +0200 xkb: Fix case checks for Latin 8. Spotted by -Wlogical-op: | CC xkbfmisc.lo | xkbfmisc.c: In function '_XkbKSCheckCase': | xkbfmisc.c:104:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] | xkbfmisc.c:118:3: warning: logical 'and' of mutually exclusive tests is always false [-Wlogical-op] A quick look at the keysymdef.h file (from xproto) suggests the implementor chose to use interval checks to determine the case, but since lines weren't sorted by codepoints, checks were quite wrong. Implement _XkbKSUpper/_XkbKSLower checks based on a grep for CAPITAL/SMALL (respectively) on the Latin 8 part of the said file. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit d9bda34d0df576d155e1d682d5e2a382b8e1ffda Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 1 10:24:43 2011 +1000 test: fix memset size for WindowRec (#37801) X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit bfd8422e8877acf02155ca0bd7fbd2416b029720 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 12:24:21 2011 +1000 Xi: use __func__ instead of function name. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit c042a267c40d35b4fb947f4bafdfeb541dd9d772 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 27 10:10:48 2011 +1000 dix: use xi2_get_type instead of manual typecast Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit b75cdb5bf76303162e947173e8ee68253a861272 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 31 10:51:19 2011 +1000 dix: drop x/y back into the right valuators after transformation. If the matrix is used for rotation, the coordinates affected may change. e.g. a valuator mask of (x, nil) becomes [x, lasty] and is rotated to [lasty, x]. Since the second value was unset, we would not drop x back into the mask, resulting in a loss of movement. Thus, drop any value that changed after applying the matrix into the valuators. Thus, the example above becomes (x, nil) → [x, lasty] → [lasty, x] → (lasty, x) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit fe4b818700453b76d9f46749dac5d12540b91e63 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 31 10:23:57 2011 +1000 dix: don't pass x/y to transformAbsolute We passed in the mask, but didn't do anything with it. Move the logic to take the axes out of the valuator masks into transformAbsolute. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 62f1bf96e1ea27e1eff137cb9333f3dd3b014dd0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 1 10:22:44 2011 +1000 test: fix memset size for WindowRec (#37801) X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit f94898928dfaf8df648bc3eea7d304826b7ac1b8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 31 14:48:33 2011 +1000 dix: fix an error message. event type, not device type. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8ef0974874f322e3ce2f3e6be4ab3c7e73a7b380 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 19 14:50:17 2011 +1000 test: don't test for double alignment on i386. (#36986) i386 is one of the few architectures that doesn't need double alignment. X.Org Bug 36986 <http://bugs.freedesktop.org/show_bug.cgi?id=36986> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 48b4b778f61daaa161483b510ab520f3fcb84925 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 21:55:06 2011 -0700 XQuartz: xpbproxy: Correct NSUInteger format strings Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 971193b2750b98b28597ba194ed388e79b3489b6 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 21:18:03 2011 -0700 XQuartz: ASL: Use xpbproxy subsystem for logging xpbproxy messages Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7dfd65705ccd3c6e2458d6892282520fe5ed8a6b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 21:06:53 2011 -0700 XQuartz: ASL: Use GLXAqua subsystem for logging GLXAqua messages Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 19020b23efa15d72349bd833aebddcc64780a615 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 21:06:08 2011 -0700 XQuartz: ASL: Use xpr subsystem for logging xpr messages Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit a66400f8dba9b7c5b65f9d26996fff677c42d866 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 20:45:58 2011 -0700 XQuartz: ASL: Update logging to support differnet levels and subsystems Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c0077b41b4c8bb08129db97a2a01d0af55d13fa4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jun 1 20:54:27 2011 -0700 XQuartz: Add a semicolon after DEBUG_LOG Don't rely on the macro to provide it Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit fbc8aae8e9b5c7b175073f02e79d7ff1d1363a31 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun May 29 01:20:44 2011 -0700 XQuartz: Move -lXplugin to LDFLAGS from LDADD Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 38df706c6b8a339c4267cae7be0881c4362f36da Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue May 31 13:01:05 2011 -0700 XQuartz: GLX: Create a new dispatch table rather than modifying the existing one Fixes regression introduced by b0c665ac0fe6840dda581e4d0d0b76c703d62a7b 0 X11.bin 0x0000000100118293 __glXAquaScreenCreateContext + 684 1 X11.bin 0x00000001001315b0 DoCreateContext + 163 2 X11.bin 0x000000010013509f __glXDispatch + 211 3 X11.bin 0x00000001000c7dad Dispatch + 785 4 X11.bin 0x00000001000b97e5 dix_main + 1022 5 X11.bin 0x00000001000122bc server_thread + 50 6 libSystem.B.dylib 0x00007fff836554f6 _pthread_start + 331 7 libSystem.B.dylib 0x00007fff836553a9 thread_start + 13 http://lists.apple.com/archives/X11-users/2011/May/msg00045.html Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit c5b72fd350bbdfd1facd0ddd5085f238c4cf252a Author: Marko Macek <Marko.Macek@gmx.net> Date: Sat May 21 13:30:59 2011 +0100 DIX: Set backgroundState correctly for root window When we change the root window's background to None, and we've run with -wr or -br for a forced solid background, make sure we also change the background state to BackgroundPixel, so we don't try to lookup either pScreen->whitePixel or pScreen->blackPixel as a pixmap. Signed-off-by: Marko Macek <Marko.Macek@gmx.net> Reviewed-by: Walter Harms <wharms@bfs.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit db228d3d07a6d831f53e4c05c878327ad4d045eb Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 1 11:20:10 2011 -0700 Version bumped to 1.10.99.901 (1.11 RC1) Signed-off-by: Keith Packard <keithp@keithp.com> commit 0643c056512d10be8db223d18d6563292d57e916 Merge: a2e6cfc18 d45f5b249 Author: Keith Packard <keithp@keithp.com> Date: Tue May 31 23:45:07 2011 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit a2e6cfc18aec1c0027b51572b03ec9f2ab074b56 Merge: bc04065b5 8d84fd256 Author: Keith Packard <keithp@keithp.com> Date: Tue May 31 23:42:52 2011 -0700 Merge remote-tracking branch 'sandmann/for-keithp' commit d45f5b2493bc0a2882bf972849b5c9c50cd533ca Author: Adam Jackson <ajax@redhat.com> Date: Wed May 25 05:54:35 2011 -0400 fixes: Add support for pointer barriers Implements pointer barriers as specified by version 5 of the XFIXES protocol. Barriers are axis-aligned, zero-width lines that block pointer movement for relative input devices. Barriers may block motion in either the positive or negative direction, or both. v3: - Fix off-by-one in version_requests array - Port to non-glib test harness - Fix review notes from Søren Sandmann Pedersen, add tests to match Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc04065b5ce277f3ac3491ff221a60ef3c7605cf Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri May 20 19:24:34 2011 -0700 "privates.h", line 198: warning: void function cannot return value Providing an argument to return in a function with void return type is not allowed by the C standard, and makes the Sun compilers unhappy. (They actually flag it as an error, unless using a new enough version to be able to downgrade it to a warning with "-features=extensions".) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit eadf5021794782fde861d471ed408675f4926b89 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon May 2 19:48:42 2011 -0700 Use XORG_STRICT_OPTION from util-macros 1.14 to set -Werror flags Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9275b1fb6f82a6971c4177ddd3d5a859a8f24119 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon May 2 19:47:44 2011 -0700 Use XORG_COMPILER_BRAND from util-macros 1.14 to check for SUNCC Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4621bb270a36d35d4ab67f1d7fb47674683dfc5b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 18 15:00:54 2011 +1000 Add a property for device/product ID. In some cases, knowing about the device model number and the device's vendor is important to activate product-specific settings. Since this is nonetheless driver-specific, only provide the property but don't do anything with it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f26a5b9a994a980ab309bc7f3b4295a4992d81c2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 31 14:43:01 2011 +1000 Xi: add device node property to known properties. Since the server has little choice (or even knowledge) of the actual device node used by the driver, this property is merely provided for standardisation. It is up to the driver to set it to the appropriate value, usually a device node in the form of /dev/input/event0 or similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> commit 8d84fd2566f8466b6152724df7eefc73780df093 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Wed May 25 12:14:05 2011 -0400 Don't call pixman_disable_out_of_bounds_workaround() anymore Pixman used to have a workaround for a bug in old X servers, and this function was used to disable that workaround in servers known to be fixed. Since 0.22, which the X server depends on, the workaround doesn't exist anymore, so there is no point disabling it. Reviewed-by: Cyril Brulebois <kibi at debian.org> Signed-off-by: Soren Sandmann <sandmann@cs.au.dk> commit b6c7b9b2f39e970cedb6bc1e073f901e28cb0fa3 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue May 24 16:02:42 2011 -0700 randr: check rotated virtual size limits correctly Commit d1107918d4626268803b54033a07405122278e7f introduced checks to the RandR path that cause RRSetScreenConfig requests to fail if the size is too large. Unfortunately, when RandR 1.1 rotation is enabled it compares the rotated screen dimensions to the unrotated limits, which causes 90- and 270-degree rotation to fail unless your screen happens to be square: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 153 (RANDR) Minor opcode of failed request: 2 (RRSetScreenConfig) Value in failed request: 0x780 Serial number of failed request: 14 Current serial number in output stream: 14 Fix this by moving the check above the code that swaps the dimensions based on the rotation. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Robert Hooker <robert.hooker@canonical.com> Tested-by: Kent Baxley <kent.baxley@canonical.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 4725d6b0dbb6371af4a1b2fbef851dcfe155514a Merge: 1b2d17748 b5d828789 Author: Keith Packard <keithp@keithp.com> Date: Wed May 25 09:40:51 2011 -0600 Merge remote-tracking branch 'whot/for-keith' commit 1b2d17748f0154da142e9b421d4f6a46e4e5a18c Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun May 22 13:50:14 2011 -0700 fbbltone.c: Mark bitmasks as unsigned ints Clears many Sun compiler warnings: "fbbltone.c", line 491: warning: integer overflow detected: op "<<" "fbbltone.c", line 491: warning: integer overflow detected: op "<<" "fbbltone.c", line 491: warning: integer overflow detected: op "<<" "fbbltone.c", line 491: warning: initializer will be sign-extended: -16777216 "fbbltone.c", line 491: warning: integer overflow detected: op "<<" "fbbltone.c", line 491: warning: initializer will be sign-extended: -1 "fbbltone.c", line 495: warning: integer overflow detected: op "<<" "fbbltone.c", line 495: warning: integer overflow detected: op "<<" "fbbltone.c", line 495: warning: integer overflow detected: op "<<" "fbbltone.c", line 495: warning: initializer will be sign-extended: -256 "fbbltone.c", line 495: warning: integer overflow detected: op "<<" "fbbltone.c", line 495: warning: initializer will be sign-extended: -1 "fbbltone.c", line 499: warning: integer overflow detected: op "<<" "fbbltone.c", line 499: warning: integer overflow detected: op "<<" "fbbltone.c", line 499: warning: integer overflow detected: op "<<" "fbbltone.c", line 499: warning: initializer will be sign-extended: -65536 "fbbltone.c", line 499: warning: integer overflow detected: op "<<" "fbbltone.c", line 499: warning: initializer will be sign-extended: -1 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit b5d828789c092c994722a896c252212e2b3614ab Author: Simon Thum <simon.thum@gmx.de> Date: Thu Mar 10 21:03:40 2011 +0100 xserver: remove AbsoluteClass, breaking the A(P|B)I This struct was unused and has been effectively removed in commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde Refs: xorg-server-1.10.0-133-g633b81e Remove the remainder, with an ABI bump to 13.0. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c05c8640f13708384e77579e7714ca846fa93f5c Author: Oleh Nykyforchyn <oleh.nyk@gmail.com> Date: Thu May 19 09:39:52 2011 +0300 xfree86: Allow "MatchLayout" statements in config files Usage example (tested on a dual-seat PC): Section "InputClass" Identifier "keyboard-all" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" MatchLayout "!GeForce|!Matrox" Driver "evdev" Option "XkbLayout" "us" Option "XkbOptions" "terminate:ctrl_alt_bksp" EndSection It disables auto keyboard configuration for layouts "GeForce" and "Matrox". Note that "" in patterns means "no Layout sections found", e.g. MatchLayout "GeForce|" is "in layout GeForce or without explicit layout at all". Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 83c059f03463f2d7f41e172afe510d1ca9bba8b0 Author: Tomas Frydrych <tomas@sleepfive.com> Date: Wed May 18 20:49:52 2011 +0100 Xephyr: fix pointer coordinate translation when screen is rotated In the Xephyr case the position of the pointer relative toward the Xephyr window is controlled by the host server without taking into account rotation of the Xephyr screen. Consequently the pointer coords must always be translated when the fb is rotated. Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b387069fafbe549f2091f364e2aa92af6cc21261 Author: Tomas Frydrych <tomas@sleepfive.com> Date: Wed May 18 20:47:52 2011 +0100 Xephyr: added dummy ephyrDeviceCursorCleanup() to avoid crashing The DeviceCursorCleanup in miPointerSpriteFuncRec can no longer be NULL it seems. Signed-off-by: Tomas Frydrych <tomas@sleepfive.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 53ccc54ac71c2655276678e13f0b3d879d691489 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon May 16 19:31:57 2011 +0100 Fix XWin compilation after updates for input API changes Fix XWin compilation after updates for input API changes in commits e7150db5 8670c46b and 20fb07f4 Also remove a no longer needed InternalEvent* variable Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4c4df3ac0d8162c874b85fede12ffbe42f0062c3 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 14 16:23:59 2011 -0700 input: Don't implicitly define verify_internal_event Fixes regression introduced by 56901998020b6f443cbaa5eb303100d979e81b22 mieq.c:159:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] verify_internal_event(e); ^ 1 error generated. Also includes some other warning cleanups in events.c we're there. events.c:2198:24: warning: equality comparison with extraneous parentheses [-Wparentheses,Semantic Issue] else if ((type == MotionNotify)) ~~~~~^~~~~~~~~~~~~~~ events.c:2198:24: note: remove extraneous parentheses around the comparison to silence this warning [Semantic Issue] else if ((type == MotionNotify)) ~ ^ ~ events.c:2198:24: note: use '=' to turn this equality comparison into an assignment [Semantic Issue] else if ((type == MotionNotify)) ^~ = events.c:2487:5: error: implicit declaration of function 'verify_internal_event' is invalid in C99 [-Wimplicit-function-declaration,Semantic Issue] verify_internal_event(event); ^ events.c:5909:22: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] DeviceIntPtr it = inputInfo.devices; ^ events.c:5893:18: note: previous declaration is here DeviceIntPtr it = inputInfo.devices; ^ 3 warnings and 1 error generated. events.c:2836:27: warning: incompatible pointer types passing 'DeviceEvent *' (aka 'struct _DeviceEvent *') to parameter of type 'const InternalEvent *' (aka 'const union _InternalEvent *') verify_internal_event(ev); ^~ ../include/inpututils.h:40:56: note: passing argument to parameter 'ev' here extern void verify_internal_event(const InternalEvent *ev); ^ 1 warning generated. Found-by: yuffie tinderbox (-Werror=implicit) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ba7d1020ac0135ebc8acda4cd57ed48b331e0133 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 14 16:31:10 2011 -0700 input: Fix format string for verify_internal_event inpututils.c:577:25: warning: conversion specifies type 'unsigned short' but the argument has type 'unsigned char' [-Wformat,Format String Issue] ErrorF("%02hx ", *data); ~~~~^ ~~~~~ %02hhx 1 warning generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0de7cec90738a7a5020150309866bb0e23b6f479 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 19 15:36:29 2011 +1000 xfree86: bump to video ABI 11 We've broken the ABI with some commit and drivers built against ABI 10 happily segfault now. (The relevant patch is 51f353d0a0d116af16d7d9590cadef6c56328746 which changed the ATOM typedef from unsigned long to uint32_t, thanks to Cyril Brulebois <kibi@debian.org> for figuring this out) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1fb501ad1521cfedaa5cf3052d45a924ef1866cf Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun May 22 10:18:36 2011 -0700 XQuartz: Don't crash if CG increases our display resolution miPaintWindow would cause fbFill() to overwrite pScreen's pixmap which was sized for the old resolution. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 60af79e35ee8546a99d15a1358aac3deabfa22be Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun May 22 09:32:57 2011 -0700 XQuartz: RandR: Don't crash if X11 is launched while there are no attached displays If CG reports no displays when launching, we could crash in RandR. Instead, just provide a fake 800x600 display until we are notified about displays being attached. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f25ca898c54cb88c7886005fc75a53762c42710b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 19 14:39:22 2011 -0700 XQuartz: Mark functions _X_NORETURN Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7413886d650aef492ecbfdc4298c2d92d9af5f87 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 19 14:35:56 2011 -0700 XQuartz: Silence clang warnings about shadow declarations X11Application.m:1272:26: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] xp_error e; ^ X11Application.m:1098:36: note: previous declaration is here - (void) sendX11NSEvent:(NSEvent *)e { ^ 1 warning generated. bundle-main.c:648:36: warning: declaration shadows a local variable [-Wshadow,Semantic Issue] int max_files, i; ^ bundle-main.c:594:9: note: previous declaration is here int i; ^ 1 warning generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 96ac4e61f4618332d95d1fd0e4799dd82844f90f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 19 14:34:39 2011 -0700 XQuartz: Update DEBUG_LOG to report to ASL Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 384eb45b944a4386eae74a5503423c13b5f2a659 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 14 18:33:57 2011 -0700 XQuartz: RandR: Avoid over-releasing if we are unable to determine the current display mode. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 25191648b8db87735a99243697f73036255c1eb6 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 14 16:11:32 2011 -0700 XQuartz: Don't call mieqEnqueue during server shutdown Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit fd5f630bc41de73be3b1d26bf9ce3e9ef1badc3b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 14 14:09:45 2011 -0700 XQuartz: Fix an array-index-out-of-bounds crasher Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 0e7f61d72c4a929319e57c9b5b777e9413c23051 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat May 14 13:30:20 2011 -0400 doc: use devbook.am for developers documentation Relocate the docs under the doc subdir. Remove redundant xml subdir. The xmlrules set of makefiles are no longer used. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 96c65be39b98cfe035be0a3988dce519549249f3 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat May 14 13:30:19 2011 -0400 doc: relocate xserver.ent in the package root directory This is the appropriate location for reusable configuration and/or makefile artifacts as opposed to picking one of the subdirs where it is used. It shields them from future doc reorg as every subdir will refer to the root package which never changes location. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit dbe26634e4f12eba905540666783c9879aa3a49a Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat May 14 13:30:18 2011 -0400 doc: add external doc references support to Xserver-DTrace This makefile is used to build the 60+ docbooks in xorg. Dtrace is a user document and should be located under doc subdir. This user document can now refer to external user/specs docs or can be referred to by such documnets. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 221507e3bf6fcaa4a4c2e1bc264a1f806b4362c0 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:13 2011 -0400 man: relocate manual pages in the man subdir outside doc The convention is to have the manual pages in a man subdir which is not under a doc dir. The doc dir contains users docs. This will move man pages out of the way for upcoming DocBook patches. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9129beb507642e2414ef1f90d650572325d8c2dc Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:12 2011 -0400 dmx: fix warning for doxygen explicit links Explicit links to functions in another file are not supported. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0d8a5766a39320dedd34a215fc6655f9ac19e8bc Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:11 2011 -0400 dmx: modernize doxygen generation. The configuration and stylesheet were very old. The stylesheet is not checked-in, use the generated one. The header is not checked-in, use the generated one. Add datetime and projectname in default footer. Developer documentation is not installed and not included in tarball. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 622ebb88157b0ed99355419767685dd70ce0f16c Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:10 2011 -0400 dmx: split DocBook/XML and Doxygen makefile targets Maintaining either requires full knowledge of both. It's not obvious one has to check the usage of global variables in devbook.am when maintaining doxygen target. Or vice-versa. Being in their respective directory, one less thing to worry about. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 595460c397a543fe512becd3c432de2a0a68d187 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:09 2011 -0400 dmx/doc: use common makefile for developers documentation The user/specs docs now have external references support. Developers doc are not installed so they do not participate. However, using a similar makefile shared amongst developers document reduces maintenance and is forward looking. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 04011b0bc3b5b59efa0d981866349c4ad0868d8f Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Apr 28 21:16:08 2011 -0400 doc: use common makefile for developers documentation The user/specs docs now have external references support. Developers doc are not installed so they do not participate. However, using a similar makefile shared amongst developers document reduces maintenance and is forward looking. Man pages being out of here, reorg developers docs under the same roof. Drop the obsolete sgml subdir. Reviewed-by Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 531869448d07e00ae241120b59f3aaaa5709d59c Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri May 6 18:18:15 2011 +0300 dri2: Don't send so many needless invalidate events Only send invalidate events for drawables if some client has requested some buffers. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ba5540221f2a46133371b4ff0d527b1a0a1443b1 Merge: 6347a0b80 728d0bf20 Author: Keith Packard <keithp@keithp.com> Date: Fri May 13 13:59:36 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit 6347a0b802812bb185ada1bf0951add306935184 Merge: 4d02c5397 f144fb771 Author: Keith Packard <keithp@keithp.com> Date: Fri May 13 13:54:29 2011 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 4d02c5397114ac4d15e794908f0708427e258261 Merge: 043c17586 eac37f32b Author: Keith Packard <keithp@keithp.com> Date: Fri May 13 13:52:18 2011 -0700 Merge remote-tracking branch 'vsyrjala/composite_validatetree_2' commit f144fb771f2e0665677aa88d08778899f666a1d5 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri May 13 09:10:42 2011 -0700 XQuartz: Don't circumvent NDEBUG If someone wants to turn off asserts with NDEBUG, let them. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f46835a09662f71f2cb90540609c34561d8af87f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed May 11 15:23:17 2011 -0700 XQuartz: Redirect stdout/stderr to asl In order to improve logging in XQuartz, stdout and stderr should be redirected to asl (syslog). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 5bc05d96f883add324bab338ffb9b9409cf45b2c Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 12 15:45:29 2011 -0700 XQuartz: Add a LOGGING section to our man page Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c18b7165f971cbf6b634ccf670eb4aa9840eb9e4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 12 18:29:23 2011 -0700 XQuartz: stub: Log directly to ASL rather than stdout/stderr Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit d694601591d2a86a437c5150015d9889e2fe16fc Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 12 15:15:40 2011 -0700 Fix a typo: laucnd instead of launchd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 728d0bf20ed8e2612b100fca6526705fa6e1eef4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 11 13:35:39 2011 +1000 dix: replace CORE_EVENT and XI2_EVENT macros with inline functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit ffd4874798ba54f86acac75779a15b4babeaa5f3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 11 12:20:50 2011 +1000 include: add version_compare helper function Compare two version numbers in the major.minor form. Switch the few users of manual version switching over to the new function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c4f9c3a07dbb05b81c8e2193a083102f710ebb27 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 11 11:43:16 2011 +1000 dix: use a tmp variable instead of multiple rClient(other). no functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit dc45d5816dd65168645f0017394eebfc5599d698 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 14 15:59:08 2011 +1000 Xi: split DeviceStateNotify delivery into a separate function Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 5bcc22757e6e1f24ee2bfec65f68a5f567300532 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 14 15:43:56 2011 +1000 dix: return deliveries from DeliverGrabbedEvent This isn't currently used by any of the callers but it will likely be in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 2054ca73060a20b5a3025e8d5ef68182149484d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 14 15:09:39 2011 +1000 dix: move the grab activation condition into a if block. Rather than 3 conditions with if (deliveries && ...), have one block with the three in them. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 236ed6f50675dc0303a505ac6f0418c515438fe1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 12 14:04:37 2011 +1000 dix: split out client delivery from DeliverEventsToWindow No real functional changes, this is just for improved readability. DeliverEventsToWindow used to return an int to specify the number of deliveries (or rejected deliveries if negative). The number wasn't used by any caller other than for > 0 comparison. This patch also changes the return value to be -1 or 1 even in case of multiple deliveries/rejections. The comment was updated accordingly. A future patch should probably use the enum EventDeliveryState for DeliverEventsToWindow. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 536ca28f1b0b4d8715a41b8acc5f30364c833f9b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 12 13:44:30 2011 +1000 dix: split out window owner event delivery from DeliverEventsToWindow No functional changes, just for readability. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit a311a03135f9734aa4f7dc0f2fa0e4c91768343b Author: Jamey Sharp <jamey@minilop.net> Date: Wed May 11 14:08:28 2011 -0700 dix: split implicit grab activation into a separate function. I'm not sure I like splitting the check for button-press event from the code which makes assumptions about that check. How about replacing patches 3 and 4 with this patch instead? Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a558a66d249cd51d3d675b20cc3a76651fd87930 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed May 11 17:27:52 2011 -0700 configure.ac: XQuartz: Fix support for the deprecated --with-launchd-id-prefix Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c89a6f824eaf647d2b182f79fbd78f5bd1c3a27f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue May 10 23:42:46 2011 -0700 XQuartz: Don't call into CoreFoundation after fork() and before exec() After fork()ing, we should just limit ourselves to setting up the environment, file descriptors, and exec()ing. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c8674a328c68f03de6e4fad7790a595cdfc18736 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 14 16:45:56 2011 +1000 dix: replace unneded goto with break. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 20fb07f436f7d4a0f330b2067a93a5a4829fccf5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 15 10:07:10 2011 +1000 input: remove DDX event list handling The current approach to event posting required the DDX to request the event list (allocated by the DIX) and then pass that list into QueuePointerEvent and friends. Remove this step and use the DIX event list directly. This means that QueuePointerEvent is not reentrant but it wasn't before anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 8670c46bdfdade64e63119d2ebbd5ef63b6fa2c3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 14 22:05:41 2011 +1000 input: replace EventListPtr with InternalEvent array EventListPtr is a relic from pre-1.6, when we had protocol events in the event queue and thus events of varying size. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit e7150db5350bc2113ff4126019b489847a4dc217 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 11 15:48:15 2011 +1000 input: Provide Queue{Button|Keyboard|Proximity}Event helpers Don't require every caller to use GPE + mieqEnqueue, provide matching Queue...Event functions instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 1b8593a6c12315b1071a4fa586151e12f46458f5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 9 15:13:17 2011 +1000 xfree86: print the device ID to the log when adding a device. Sometimes the name isn't enough, it's handy to see the device ID's from the log file. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3231962db826f5efd431596a309c96e907a191d1 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 03:20:23 2011 +0100 XKB: Fix sense inversion for core MapNotify events Due to an unfortunate sense inversion incident while switching from a if (foo) { ... } to if (!foo) continue; style in f06a9d, we punished any client who attempted to use XKB to restrict the MapNotify events they wanted by sending them exactly the events they _didn't_ want, and nothing else. NewKeyboardNotifies (coming from a client setting the map with an XKB request, when switching between master devices, etc) weren't affected, but this would impact anyone using xmodmap-style core requests. Could explain a fair bit. Clarified the comments while I was at it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 460a377ef2d645d9ae38a8356fb248ccc47bed4a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 03:07:50 2011 +0100 XKB: Send XKB events for all devices to all clients We were using XIShouldNotify(client, device) as a test for whether or not to send XKB map/state/etc changed events, which limits it to only sending events for the current ClientPointer/ClientKeyboard for that client. While this makes perfect sense for core events (e.g. MappingNotify), XKB events carry a device ID, so are safe to send to all clients for all devices. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit a79d4544fee806a25447d0147535ebc5a1cae6b9 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 03:03:06 2011 +0100 XKB: Send NewKeyboardNotify for dev before its master/slaves When we change the keymap on a device, send the NewKeyboardNotify for that device before we copy the keymap to and notify for its attached master/slave devices. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit c7634498d4cd42c8571805122224dc2d0e44a585 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 02:59:53 2011 +0100 XKB: Remove duplicate keymap-copying loop Previously we had: foreach (device + slaves of device) { XkbCopyDeviceKeymap(i, device); [...] } if (device was last slave of its MD) { XkbCopyDeviceKeymap(master, device); } and now: foreach (device + slaves of device + MD if device was last slave) { XkbCopyDeviceKeymap(i, device); [...] } As an extra bonus, when changing the keymap on a slave device, we now ensure the LED info on the master is kept in sync. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit b8540d18c7d3a0f93f9e2565a410986eddedcecb Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 02:50:48 2011 +0100 XKB: Simplify a loop in ProcXkbGetKbdByName Replace: for (stuff; things; etc) { if (misc || other) { [...] } } with: for (stuff; things; etc) { if (!misc && !other) continue; [...] } Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 72b6639c83df74767094a5e0c2861fdc5ea03ecd Author: Daniel Stone <daniel@fooishbar.org> Date: Tue May 3 02:39:55 2011 +0100 XKB: Don't send unnecessary NewKeyboardNotifies In the XKB GetKeyboardByName handler, we had the following pseudocode: if (device was last slave of its MD) { XkbCopyDeviceKeymap(master, slave); XkbSendNewKeyboardNotify(slave, ¬ify); } Even if the SendNewKeyboardNotify line nominated the correct device, which it didn't, it's unnecessary as XkbCopyDeviceKeymap already sends a NewKeyboardNotify on the destination device. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 70cef8d8baf058bacaff87ef49e3851628269597 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jan 19 20:42:10 2011 +0000 Input: Simplify CheckPassiveGrabsOnWindow loop Instead of a mega never-ending if branch with no else, just continue to the next iteration of the loop if the conditions aren't met - pretty much entirely reindentation. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00ba884556c675b2b25e116f5ab4eb4590b6dd56 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jan 19 20:38:44 2011 +0000 Input: Make CheckPassiveGrabsOnWindow take InternalEvent Previously, it only took DeviceEvents, but it would be much more useful if it took InternalEvents. Any event that activates a grab must still be a DeviceEvent, so put in a check to enforce this. Change all callers to make the appropriate casts. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 56901998020b6f443cbaa5eb303100d979e81b22 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 5 08:48:19 2011 +1000 input: change CHECKEVENT macro to verify_internal_event function The macro is sufficient if called during a development cycle, but not sufficient information when triggered by a user (e.g. https://bugzilla.redhat.com/show_bug.cgi?id=688693). Expand what this does to print the event content and a backtrace, so at least we know where we're coming from. Only the first 32 bytes are printed since if something goes wrong, the event we have is almost certainly an xEvent or xError, both restricted to 32 bytes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b47d2e43eb2cb3817c995d1f7e58500fb40efa2b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 5 09:04:41 2011 -0700 XQuartz: Make a copy of args for our crash reporter vsnprintf Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit bf2059b07a97e5e579c13c2c9d49707093427dc2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 15 14:06:20 2011 +1000 input: Only release SD buttons for explicit floating/reattachment (#36146) Grabbing an SD device temporary floats the device but we must not release the buttons. Introduced in commit 9d23459415b84606ee4f38bb2d19054c432c8552 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 25 11:08:19 2011 +1000 dix: release all buttons and keys before reattaching a device (#34182) X.Org Bug 36146 <http://bugs.freedesktop.org/show_bug.cgi?id=36146> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit eac37f32b85b631d94ee3ba11fa65b9d2cb72c38 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Apr 13 21:46:20 2011 +0300 composite: Recompute clipping when changing between manual and automatic redirection Call compMarkWindows() when changing between manual and automatic redirection modes. Otherwise the window clipping won't be recomputed correctly. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> commit f2001b0f6dffa0a8f05def4a86ea37c4c91db724 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Apr 13 21:45:43 2011 +0300 composite: Fix pWin->redirectDraw when changing between manual and automatic redirection compAllowPixmap() is not called when changing between manual and automatic redirection modes. That means pWin->redirectDraw is left with an incorrect value, and miComputeClips() gets confused whether the window is supposed to be treated as transparent or not. Fix the issue by updating pWin->redirectDraw in compCheckRedirect() even when not calling compAllocPixmap(). Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> commit 74663e61528346aeea9c11908b6980b51dcaeb68 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Dec 20 16:37:24 2010 +0200 composite: Copy the window contents back from the pixmap Since extra expose events are no longer generated during window unredirection, the window contents must be preserved by the server. So copy the window contents back from the pixmap. The copy can only be done after the clips have been recomputed, so delay the copy and the pixmap destruction until ValidateTree is done. Window borders are restored by HandleExposures and thus don't need to be copied back. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 193ecc8b453b22b3e60248b9354c768dbd405598 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Dec 17 23:46:34 2010 +0200 composite: Get rid of the internal UnmapWindow+MapWindow cycle Eliminate the internal MapWindow+UnmapWindow cycle around window redirection changes. Instead do the work in a single pass by marking the afected windows and calling ValidateTree and HandleExposures directly. This gets rid of unnecessary expose events, and invalid ClipNotify calls during rediredction changes. Now ClipNotify will only get called with the final clip values, and expose events are only sent to areas that actually got exposed. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a6ae91746212203a19450ac955fbb7abffff1ed3 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Dec 20 16:30:52 2010 +0200 composite: Initialize borderClip with current values ValidateTree needs a valid borderClip so initialize the parent constrained border clip with the window's current borderClip in compRedirectWindow. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ce9eff9e4c30deb16f059ed84b436d37da45d5d5 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Dec 20 16:33:36 2010 +0200 composite: Call ValidateGC after ChangeGC ChangeGC changes the GC, so ValidateGC should be called after it, not before. Also pass NullClient instead of serverClient to ChangeGC() since we know the changed values to be valid, and setting serverClient->errorValue seems pointless anyway. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 3ac220d6cc386c9ab9995e5b83463c40330e18c2 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue May 3 10:54:09 2011 -0700 XQuartz: prefs_copy_url and prefs_get_copy return retained objects No functional change. This just annotates the return policy. Found-by: clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit bac8d12555dd44b2139be0696629910cd4d8c782 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue May 3 10:36:19 2011 -0700 XQuartz: Ensure that {CF,NS}_RETURNS{,_NOT}_RETAINED are defined These will be used in subsequent patches to denote proper retain counts in XQuartz Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 043c1758652259fd12b88ae37720fe6e93eda76b Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Apr 19 19:02:54 2011 -0700 Clean up memory better when GetVisualInfo fails in ProcDbeGetVisualInfo Use calloc to initialize pScrVisInfo array so we don't have to check which ones were already initialized when freeing them all. On failure, set rc if necessary, and jump to code at end that already frees all the necessary allocations and return rc. Fixes parfait reported error: Error: Memory leak (CWE 401) Memory leak of pointer 'pScrVisInfo' allocated with malloc((count * 16)) at line 724 of dbe/dbe.c in function 'ProcDbeGetVisualInfo'. 'pScrVisInfo' allocated at line 693 with malloc((count * 16)). pScrVisInfo leaks when rc != 0 at line 710 and j >= i at line 716. [ This bug was found by the Parfait 0.3.7 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit dadb0791ebfd05cd3bb82d4addf0fbc21aad6fbb Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Apr 19 18:53:22 2011 -0700 Only free pContext once when AddResource fails in ProcRecordCreateContext Since RecordDeleteContext frees its argument, don't fall through to free it again. Error: Double free (CWE 415) Double free of pointer 'malloc(1072)' defined by malloc at line 1964 of record/record.c in function 'ProcRecordCreateContext'. Previously freed at line 1960 with RecordDeleteContext. 'malloc(1072)' was allocated at line 1926 with malloc. [ This bug was found by the Parfait 0.3.7 bug checking tool. For more information see http://labs.oracle.com/projects/parfait/ ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 73de54210446e9eca81b96ea6775ee5ea1a31d75 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jan 24 08:40:10 2011 +1000 Input: Fix event size confusion in CheckPassiveGrabsOnWindow We were just storing a DeviceEvent, but allocating enough space for an InternalEvent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit 706326491011be8cecb9b56c06f7241b7cbd425f Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jan 18 20:16:36 2011 +0000 Input: Add DeepestSpriteWin function Does what it says on the box: returns the deepest child window in a given sprite's trace. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 65b54548dce80c8e8ff5ff91fc4f0659e9b2d921 Author: Chase Douglas <chase.douglas@canonical.com> Date: Tue Jan 18 20:08:09 2011 +0000 Input: Pass co-ordinates by reference to transformAbsolute With the upcoming XI 2.1 touch work, the co-ordinate values will need to be passed by reference, rather than modified in-place. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a14a0c711397ff7ca0220946010300fc1b2a6e67 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Apr 22 22:19:39 2011 -0700 Move event filter initializer out of the structure itself When kept in the structure, it causes the entire MAXDEVICES * 128 masks to be stored in the data segment and loaded from the file, and also leads to worries about later generations inheriting changes across server reset. text data bss dec hex filename Before: 91837 20528 32 112397 1b70d .libs/events.o After: 92277 48 20512 112837 1b8c5 .libs/events.o Before: 3013384 122696 163156 3299236 3257a4 Xorg After: 3013832 102216 183636 3299684 325964 Xorg File size before: 4337008 Xorg File size after: 4316568 Xorg Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8d229c4cf9e5bde78373ef3dd32708817ac97152 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Mar 11 15:43:14 2011 -0800 Make xorg.conf.example rule compatible with Solaris make Solaris make won't substitute $< in explicit rules, only implicit ones Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> commit c6029246ddcf5ead3884dbf2ab4f57e0c3586e93 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Wed Feb 2 17:00:25 2011 -0800 Move Xinput server API documentation from libXi to doc/xml Documentation is quite out of date but still fits better here than in the client library. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0fc7ec6dd504aa03e1a1b18c60942c0c8c8b701b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 29 11:06:18 2011 -0700 XQuartz: Fix incorrect typedefs with XPLUGIN_VERSION < 4 Ok, this time for sure... how many brown bags can I fit over my face? Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 29d471663e4414a3cdf154fd032d74381a921ae0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 18:09:11 2011 -0700 XQuartz: Use a rwlock instead of a mutex to protect window_hash in the pthread case Concurrent reads are acceptable, so using an rwlock should be better. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 5cb31cd0cbf83fff5f17a475e7b0e45246b19bf3 Merge: 0f284f0f4 4d8735d38 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 29 09:59:49 2011 -0700 Merge remote-tracking branch 'jturney/remove-opengl-spec-download' commit 4d8735d388c3c6af27ef3d6a645e38e556f392f4 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Apr 6 16:26:45 2011 +0100 hw/xwin: wglext.h should be provided by w32api, rather than downloaded wglext.h should be provided by the w32api package, rather than downloaded. if it's not, do 'wget -P /usr/include/w32api/GL http://www.opengl.org/registry/api/wglext.h' Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit a50878682cda541766c830e49ab406c78b38d903 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Apr 6 16:23:45 2011 +0100 configure: Look for Khronos OpenGL spec files using pkg-config Look for Khronos OpenGL spec files using pkg-config, rather than downloading them Also add a --with-khronos-spec-dir=PATH configure option so XWin can be directed where to find these files without using the khronos-spec-files package XWin with AIGLX requires OpenGL spec files in order to generate wrapper code which: (1) thunks from the glapi dispatch table which uses the default cdecl calling convention to native GL functions using the stdcall calling convention. (2) performs function address lookup for OpenGL 1.2+ functions, which are treated as extensions and so not directly linkable. v2: KHRONOS_SPEC_DIR is only valid when XWIN_GLX_WINDOWS is defined. Avoid 'make dist' seeing invalid dependencies by only including rules using KHRONOS_SPEC_DIR if XWIN_GLX_WINDOWS is defined Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit 0f284f0f42f26a242eb3153787f2e98b6b88dff8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Apr 27 22:12:59 2011 -0700 XQuartz: BuildFix to build correctly with XPLUGIN_VERSION < 4 This fixes a regression introduced by d79cc14a51f3e8d4d2f66aad055092672cab1526 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f6d4e75ec55ac6812f9dead42ecdffb9614578c7 Merge: ec9ea4017 4318e6a14 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 27 12:08:51 2011 -0700 Merge remote-tracking branch 'jturney/master' commit ec9ea4017885cefe5519a4e890b0ff1a5518235a Merge: c6cb70be1 6f29dbf5e Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 27 12:01:56 2011 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 4318e6a147e78b2663c5e0ea6ba0d351a1e87f98 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Mar 5 17:34:42 2011 +0000 Cygwin/X: Handle failure during winScreenInit() Handle failure during winScreenInit() a bit more cleanly, rather than crashing This avoids a crash with 'XWin -fullscreen -screen 0 @2 -screen 1 @1' Also document that fullscreen may only be applied to one screen. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit ce6136f8c553bbc6d3e3affa0faa2afbf8054f44 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Mar 23 20:06:33 2010 +0000 Cygwin/X: Make winOverrrideStyle() thread-safe Make winOverrrideStyle() thread-safe winOverrideStyle() is called from the internal WM client thread. Accessing server-internal data structures to get window name and class is not safe, as there is no lock to ensure we do not collide with these data structures being updated in the server thread. Rewrite so the internal client thread uses X client calls to obtain this data safely Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 0c603509eb7f9c83baf4e00b4558dce78f897ebf Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Feb 11 13:15:40 2011 +0000 Cygwin/X: Cosmetic fixes to logging of result from X*TextPropertyToTextList() Report XLocaleNotSupported result from X*TextPropertyToTextList() Fix formatting for unknown results reported for X*TextPropertyToTextList() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 71550a8665d861384332d81239ca0c1586a17137 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jan 28 20:17:22 2011 +0000 Cygwin/X: Decorate function pointers retrieved via GetProcAddress with WINAPI Decorate function pointers retrieved via GetProcAddress which are currently missing it with WINAPI, to ensure stdcall convention is used when calling them. This fixes a crash currently seen when compiled -O2 and the -screen option uses a size and monitor number e.g. -screen 0 1280x1000@2 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 38a1f5c613a48ef9fd6ba043bc3028f487750d3a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Oct 12 17:12:02 2010 +0100 Cygwin/X: Don't make InputOnly windows visible Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit bd288c3458bc1ba2cbb4c8416e5b2dfd849581e6 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Jul 22 18:36:51 2010 +0100 Cygwin/X: Fix a GDI bitmap resource leak of window icons Ensure any icon created specially for a window is destroyed when the window is destroyed Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 19e764eee0c8b74d877fb2b1d6aedc933976660e Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jul 21 18:11:13 2010 +0100 Cygwin/X: Internal WM workaround for Java AWT bug Java applications using AWT on JRE 1.6.0 break with non-reparenting WMs AWT doesn't explicitly know about (See sun bug #6434227) XDecoratedPeer.handleConfigureNotifyEvent() only processes non-synthetic ConfigureNotify events to update window location if it's identified the WM as a non-reparenting WM it knows about (compiz or lookingglass) Rather than tell all sorts of lies to get XWM to recognize us as one of those, simply send a synthetic ConfigureNotify for every non-synthetic one Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit c5a612fc18a7f5c542fca580494e2c66ecfc2159 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Apr 16 21:55:01 2010 +0100 configure: Let configure --enable/disable-aiglx control building of AIGLX for all DDXs Let configure --enable/disable-aiglx control building of AIGLX for all DDXs. Currently we can't use --enable/disable-aiglx to control if Xwin DDX is built with AIGLX enabled, as at the moment it's forced off if we aren't building the X.Org DDX DRI or DRI2 loader Rearrange things a bit, introducing a new automake conditional, AIGLX_DRI_LOADER to specifically indicate if the X.Org DDX DRI/DRI2 loader convenience library should be built, and replace the previous X.Org DDX-specific uses of the AIGLX conditional with that As before, AIGLX_DRI_LOADER is only enabled if --enable-glx, --enable-aiglx and at least one of --enable-dri or --enable-dri2 are enabled This allows the general conditional AIGLX to control if AIGLX is built for the XWin DDX as well The C #define AIGLX set by AC_DEFINE(AIGLX) seems to be obsolete, I can't find anything which checks it Updated for ajax's "glx: Make --disable-dri not disable AIGLX" patch, which allows DRI2 to be enabled independently of DRI1 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit 6f29dbf5e36bef5ecb08f02d367988dee0f9f1cd Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Apr 25 22:00:41 2011 -0700 XQuartz: Use ErrorF rather than fprintf to log errors Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit cb083b05c469352ef80e1005a29ac320f2e4e096 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Apr 25 21:25:10 2011 -0700 XQuartz: stub: Dead code removal Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 72ed7551f494c61283a7ac3d7b570eac39cc9786 Author: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> Date: Mon Apr 25 10:38:17 2011 -0700 XQuartz: pbproxy: LP64: Fix itteration through XGetWindowProperty where sizeof(long) != 4 http://xquartz.macosforge.org/trac/ticket/476 Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 0a60192a85ba9f64b522da181c2fe8a5b93b79df Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Apr 24 22:01:48 2011 -0700 XQuartz: Enable logging to a file for better debugging Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit de4023f194c561b74f8fa904bea3dd5298230cd1 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Apr 24 21:35:04 2011 -0700 XQuartz: Rename launchd-id-prefix to bundle-id-prefix It's used many other places than just for launchd. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit e466745109416a2fcdf5d7389c80b814a0363676 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Apr 24 20:35:06 2011 -0700 XQuartz: Dead code removal Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f1d867c0a1577e2c46d5dd4e262444e0cf6f8e25 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 23:22:27 2011 -0700 XQuartz: Silence clang static analyzer Call to 'malloc' has an allocation size of 0 bytes. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 913223e9ddf2cb927ecad99aeadfa730df8561ac Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 23:15:49 2011 -0700 XQuartz: xpr: Dead code removal Assigned value is always the same as the existing value. Found by clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit d0caa0e4cd255bea315757be2ff387cf57e8bdf7 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 20:12:38 2011 -0700 XQuartz: Silence warnings about deprecated functionality where it is an intended fallback Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9244a3a24f63239ec12675f3df091583e06c8314 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 12:55:39 2011 -0700 XQuartz: xpr: Use a serial queue rather than pthread mutexes for window_hash Additionally removes some dead code and fixes double-locking in xprIsX11Window. xprIsX11Window doesn't need to do any locking because those resources are protected by the called functions themselves. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel A. Steffen <dsteffen@apple.com> commit bac34a54f7cb84f346b1b833df9917bd1ac70223 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 12:11:39 2011 -0700 XQuartz: xpr: Initialize window_hash in xprInit Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 1596ea72d66a03d9accb534679172ca6f63f78e1 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 11:55:49 2011 -0700 XQuartz: Use a lighter spinlock instead of a pthread_mutex_t in QuartzScreenSaver Currently, we only end up here through a call to QuartzShowFullscreen, and this is always on the same thread. Future changes (such as further incorporating libdispatch) may allow this to change, but contention will remain minimal since the call is infrequent and it is short held. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel A. Steffen <dsteffen@apple.com> commit 3e253c603bc18f06fa48b611797eb5a7c8a96fe4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 01:48:25 2011 -0700 XQuartz: Remove the threadSafety dead-ish code It's been a few years now since we've needed this to debug thread boundaries, so punt it out to clean up the namespace polution. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit a52c8078c9cc83c84a8c6eb58810f49bdb90bcc1 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 01:39:16 2011 -0700 XQuartz: Use xorg_backtrace() instead of spewCallStack() xorg_backtrace() has been in os for two years now, we might as well start using it. Ref: 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit d79cc14a51f3e8d4d2f66aad055092672cab1526 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 22 12:05:32 2011 -0700 XQuartz: Fix compilation warnings with XPLUGIN_VERSION >= 4 xprAppleWM.c:143: warning: initialization from incompatible pointer type xprAppleWM.c:144: warning: initialization from incompatible pointer type Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6128544fd58ced0ed738b7150865294d214fb4eb Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Apr 25 12:38:07 2011 -0700 XQuartz: Bump bundle version to 2.7.0 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4944de24849a109c65f1b353bc12e44e90a1211d Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 23:25:39 2011 -0700 rootless: Fix a typo in RootlessGlyphs which resulted in a garbage value Found by clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 2098cb03c6b64bfca7694fc2b5213edb77bc12e4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 23:27:16 2011 -0700 rootless: Dead code removal Found by clang static analyzer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit bb4d145bd25e2aee988b100ecf1105ea3b6a40b8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 21:24:27 2011 -0700 glx: Silence warnings when building with clang This replaces AX_TLS (GPL3) with XORG_TLS (MIT) In file included from glapi.c:46: In file included from ./glapi.h:51: ./glthread.h:237:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ In file included from glapi.c:46: ./glapi.h:92:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ glapi.c:82:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))) = NULL; ^ glapi.c:85:20: error: unknown attribute 'tls_model' ignored [-Werror,-Wunknown-attributes] __attribute__((tls_model("initial-exec"))); ^ 4 errors generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jamey Sharp <jamey@minilop.net> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit 5c9eafc8e5f8575c06591d244c2cb5ea07691cb4 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 20:55:53 2011 -0700 render: Silence warnings when building with clang picture.c:351:37: error: implicit conversion from 'unsigned int' to 'CARD16' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Werror,-Wconstant-conversion] pFormats[f].direct.alphaMask = Mask(PICT_FORMAT_A(format)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ ... fatal error: too many errors emitted, stopping now [-ferror-limit=] Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Suggested-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c524f8bb768f886d413839bc22184098394c2559 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 20:49:27 2011 -0700 os: Silence warnings when building with clang access.c:1492:20: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses] if ((host->family == FamilyServerInterpreted)) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ access.c:1492:20: note: use '=' to turn this equality comparison into an assignment if ((host->family == FamilyServerInterpreted)) { ^~ = access.c:1492:20: note: remove extraneous parentheses around the comparison to silence this warning if ((host->family == FamilyServerInterpreted)) { ~ ^ ~ In file included from xstrans.c:8: In file included from /usr/X11/include/X11/Xtrans/transport.c:62: /usr/X11/include/X11/Xtrans/Xtranssock.c:262:5: error: implicit declaration of function 'ErrorF' is invalid in C99 [-Werror,-Wimplicit-function-declaration] PRMSG (3,"SocketSelectFamily(%s)\n", family, 0, 0); ^ log.c:180:29: error: format string is not a string literal [-Werror,-Wformat-nonliteral] if (asprintf(&logFileName, fname, display) == -1) ^~~~~ log.c:190:26: error: format string is not a string literal [-Werror,-Wformat-nonliteral] if ((asprintf(&suffix, backup, display) == -1) || ^~~~~~ log.c:382:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral] LogVWrite(verb, tmpBuf, args); ^~~~~~ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit ab81aa91404ca0fa6843ce8021cbd9de42255a8f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 20:39:25 2011 -0700 Xext: Silence warnings when building with clang xvmain.c:1113:22: warning: equality comparison with extraneous parentheses [-Wparentheses] if ((pf->depth == pDraw->depth) ~~~~~~~~~~^~~~~~~~~~~~~~~ xvmain.c:1113:22: note: use '=' to turn this equality comparison into an assignment if ((pf->depth == pDraw->depth) ^~ = xvmain.c:1113:22: note: remove extraneous parentheses around the comparison to silence this warning if ((pf->depth == pDraw->depth) ~ ^ ~ 1 warning generated. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit fd086f87cd1bab53c9e918cb687009e7ac8718d8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Apr 23 20:36:53 2011 -0700 fb: Silence warnings when building with clang fbpict.c:163:8: warning: implicit conversion from enumeration type 'PictFormatShort' (aka 'enum _PictFormatShort') to different enumeration type 'pixman_format_code_t' [-Wconversion] pict->format, ~~~~~~^~~~~~ fbbltone.c:486:2: warning: shift result (281474959933440) requires 49 bits to represent, but 'int' only has 32 bits [-Wshift-overflow] C2_24( 0, 0), C2_24 ( 1, 0), C2_24 ( 2, 0), C2_24 ( 3, 0), ^~~~~~~~~~~~ fbbltone.c:474:6: note: instantiated from: SelMask24(b,1,r)) ^ fbbltone.c:429:46: note: instantiated from: ^ fbbltone.c:427:18: note: instantiated from: 0xffffff << Mask24Check(x,r)) : 0) ~~~~~~~~ ^ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit aad7b324aefc906f28ac9d10c64650b3445c2ae0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Apr 24 19:57:22 2011 -0700 os: Add missing _X_ATTRIBUTE_PRINTF to va_list variants Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 5423da9fb2ec0dfeff866f12cf26fbba04ea673d Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:44:15 2011 +0200 xkb: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 79b3a7f83d7cbee397eecebef1af31c048d295e8 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:43:05 2011 +0200 test/xi2: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit a17c30d43e0db6c65cc73cd2be5193c02f138bf5 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:42:07 2011 +0200 hw/xwin: remove duplicated includes Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c270cfc30c547e28017533f490904013f73cf6f0 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:41:11 2011 +0200 hw/xquartz: remove duplicated includes Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 50ced6cfa0aef472e713ffccfdba003829df68df Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:40:11 2011 +0200 hw/xnest: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 387f45a7077faadf232edc3f608c4a081a7fd290 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:39:11 2011 +0200 hw/xfree86/modes: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 78a9ec125dcb1546ca7e7e18aedf2b323eebb1fc Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:38:08 2011 +0200 hw/xfree86/fbdevhw: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 0320db25f917980621107b790c4fc5171cb0b6ac Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:36:48 2011 +0200 hw/xfree86/dri: remove duplicated includes Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit b56271b954d6ab8eeb320f314925b77403458b9c Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:35:45 2011 +0200 hw/xfree86/ddc: remove duplicated include Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 86c0c8b9c567f57fe7477d5302fa22dc7557ce90 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:34:46 2011 +0200 dix: remove duplicated includes Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit 9b5046d2130aead79956019faf7103b5c676fd02 Author: Nicolas Kaiser <nikai@nikai.net> Date: Sun Apr 24 12:33:32 2011 +0200 Xi: remove duplicated includes Remove duplicated includes. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> commit c6cb70be1ed7cf73bd3411b8d66ec05a9efcfeb9 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Mar 28 13:30:52 2011 -0400 Fix trapezoid and triangle rendering to windows For fbAdd{Traps,Triangles}() and fbRasterizeTrapezoid() this is just a matter of adding the image offsets to the trap offsets. For fbShapes, the story is more complicated: The recently added pixman API did not allow offsetting trapezoids. Instead, it would use x_dst and y_dst in such a way that the effect was to only offset the source image. In pixman 0.21.8, this API has changed such that all the traps are conceptually rendered to an infinitely big image, and the source and destination coordinates are then aligned with (0, 0) of that image. This means offsetting dst_x and dst_y will now offset the entire drawing, which is similar to how other composite functions work. This patch then changes fbComposite{Triangles,Traps} such that the source image is aligned with the shapes, and the destination coordinates offset according to drawable->{x, y}. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 1b96a99d8edd9016bc4a35348f9d5ddb45832f14 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Thu Mar 10 08:52:41 2011 -0500 fb: Call miCompositeSourceValidate() on the source in fbShapes() Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 04635069554859ec67003b89f56965421cba7f52 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 29 00:11:00 2011 -0400 render: Remove unused TriStrip and TriFan typedefs Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 2b0cabec620f3a2a5e431052441b092ef979bf94 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 29 00:07:44 2011 -0400 render: Remove unused fields in the source picture structs The fields class, stopRange, colorTable and colorTableSize are not used by any current code. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit b0d84f94393edab395d65d2b2cb983fc9fec3d36 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Mar 28 20:59:34 2011 -0400 render: Delete PictureGradientColor() PictureGradientColor(), INTERPOLATE_PIXEL_256() and premultiply() are not used by anything. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 61a92a78cd49969f74a046fa26c3199e06365814 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 29 13:06:36 2011 -0400 Add RegionInitBoxes(), and fix some buggy callers of RegionInit(). The interface to RegionInit(): RegionInit (RegionPtr pReg, BoxPtr rect, int size); is very confusing because it doesn't take a list of boxes, it takes *one* box, but if that box is NULL, it initializes an empty region with 'size' rectangles preallocated. Most callers of this function were correctly passing either NULL or just one box, but there were three confused cases, where the code seems to expect a region to be created from a list of boxes. This patch adds a new function RegionInitBoxes() and fixes those instances to call that instead. And yes, the pixman function to initialize a region from a list of boxes is called init_rects() because pixman is also awesome. V2: Make RegionInitBoxes() return a Bool indicating whether the call succeeded, and fix the callers to check this return value. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit c7bce22b58530239e583d91ae56312bad1630da4 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Mar 28 11:38:11 2011 -0400 Track damage for fbTrapezoids() and fbTriangles(). These calls no longer go through the CompositePicture() hook, so damage was no longer generated for them. This patch simply damages the entire destination clip region. It would be possible to generate tighter damage for certain operators such as Over and Add, where blank source pixels have no effect on the destination, but given that virtually all trapezoid rendering takes place on pixmaps, it's unlikely that anybody would actually benefit from this optimization, and the miTrapezoidBounds function did sometimes show up on profiles, probably because it does several divisions per trapezoid. V2: Call DamageRegionProcessPending() - pointed out by Michel Dänzer. V3: Call DamageRegionProcessPending() *after* rendering - pointed out by Maarten Maathuis Reviewed-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 918a9c99cf2ebc73acb34b95f597904b93c690d9 Merge: 88c4622b5 5f496bc91 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 22 11:20:16 2011 -0700 Merge remote-tracking branch 'jeremyhu/master' commit 88c4622b594a1725d0cee86bc82ad640d241c520 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Apr 18 08:23:48 2011 -0700 linux: Retry VT ioctls while errno == EINTR When the smart scheduler is enabled, the VT ioctls (particularly VT_WAITACTIVE) can be interrupted by the smart scheduler's SIGALRMs. Previously, this caused the server to immediately continue on to ScreenInit, almost certainly causing a crash or failure because the X server that owned the VT hadn't finished cleaning up. As of commit 7ee965a300c9eddcc1acacf9414cfe3e589222a8, it causes a FatalError instead. Retrying the ioctl as long as it fails with errno == EINTR fixes the problem and allows server regenerations to trigger VT switches that actually succeed. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 302bdc3c9678c028bed71dbe9c5ba04997626b6b Merge: 001b6b8b7 6f97fe5df Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 22 10:48:37 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit 5f496bc91941140ceaa3061472fda95bd812f2d2 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 22 01:23:09 2011 -0700 XQuartz: Do translation and handoff of NSEvent to X11 in a separate serial queue Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 72bd232b117b2867282e0ae1855d779e126f912b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 22 00:39:12 2011 -0700 XQuartz: Send tablet proximity events with tilt and pressure <rdar://problem/6257569> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 034538ea9b4770025e3573bc708039cabbe1e10d Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 21 16:31:58 2011 -0700 XQuartz: Use dispatch_async to handoff the FD Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ca7b9e6c817681b9cec738e43cf020ac19b5e732 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 21 15:51:32 2011 -0700 configure.ac: Add check for libdispatch when building for darwin Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 3960115dbc83ec1eb8d9c8e90466af3fa0b32abd Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 21 15:19:12 2011 -0700 XQuartz: Fix prototypes for thread functions Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7524dbd06113ec081eaa882aa54e03553ccf96aa Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 21 15:11:52 2011 -0700 XQuartz: Make the DarwinProcessFDAdditionQueue_thread wait 3 seconds to allow xinitrc to catch up Previously, we weren't always waiting the full three seconds. This should be better, but is still sub-optimal. We really want to start processing these once a WM has been started. http://xquartz.macosforge.org/trac/ticket/416 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6f97fe5df16f947e52875187ff4f9e25fab33ad7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 21 14:55:22 2011 +1000 dix: improve control flow in QueryTrackers If the velocity is 0, skip the remainder. If we're not in range, skip the remainder. No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit a0eda8cd36ffba2ecc79e0d7a1908c89b45e76c4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 21 14:45:09 2011 +1000 dix: rename a bunch of variables to be more self-explanatory i → used_offset iveloc → initial_velocity res → result vdiff → velocity_diff vfac → velocity_factor tmp → tracker_velocity Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit e4901905903c5630a1092c69e42f313abd05187b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:41:45 2011 +1000 dix: reduce scope of tmp and mult. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 81c6e79f42cc263349e04c0d82b3a85d6b557885 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:39:27 2011 +1000 dix: reduce the work done by ApplySoftening We can modify fdx/fdy in-place rather than requiring dx/dy as well. And the decision to soften can be made in the caller (unless decided by the velocity state). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 5870d507cee8547c0993791195fe04d96b271289 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:32:33 2011 +1000 dix: split softening and constant deceleration into two functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 8ae90552f95f025ad09a17258d56603a424ca076 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:30:19 2011 +1000 dix: use single return statement in ApplySimpleSoftening Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit c45f4cc6bd885855ecb54d9113010906d9ee58e2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:28:32 2011 +1000 dix: rename od, d to prev_delta, delta And res to result. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 5ffe06bada85e98d46a071dad578d72f5b96cb51 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:26:11 2011 +1000 dix: Don't use short as bool Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 97c1967689d7990be86ee490690ac5a91935c875 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 15:02:46 2011 +1000 dix: rename "res" to "result" for improved readability Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 1c162ebcaba78930f34639145a8ac01b87f8e6fd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 14:56:44 2011 +1000 dix: change ProcessVelocityData2D to BOOL. Don't confuse users with a return type of short, that's even less indicative that it returns 0/non-0 than "int". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 70b76286dbef99daabbafccd23f3ba436fe07b09 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 16:28:21 2011 +1000 dix: add some more documentation to ptraccel code Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 6b3a4cc6af240c12d05e27250b61e954eafe9f29 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 14:44:51 2011 +1000 dix: don't pass the index for a tracker around, pass the tracker Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 9e8645cacf5f1c398d7a6e837a36c66cf6cf0c9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 14:23:29 2011 +1000 dix: CalcTracker only uses the tracker, thus only pass the tracker. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 62f4bef82d1252515689420f8aac198e2f29c4f1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 21 13:58:55 2011 +1000 dix: use single return statement in DoGetDirection Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 5f8edbe47e3915f71a20f063a9e8b49591239600 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 13:12:53 2011 +1000 dix: use single return value in GetDirection Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit afaa17812513232785c8c629294190629197dfd8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 13:12:35 2011 +1000 dix: document GetDirection Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit df90db892d16143742eb3c09e048f5b76457a62e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 11:49:57 2011 +1000 dix: document DoGetDirection's maths This is the best explanation I can come up with, but it seems to hold true for my example values. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 7513190ec7bc08db1629b04d3f88f86ea2b1588e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 11:47:21 2011 +1000 dix: improve comment, directions flagged are 45° each The two directions returned by this calculation are always the two boundary conditions. Since we don't do quadrants but octants, the flagged ones are 45° each. e.g. an angle of 35° flags E and NE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit e804ae85fec290894af69c2e65df55e73b417287 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 11:12:35 2011 +1000 dix: improve readbility of DoGetDirection. Use enums for the direction bits, not hardcoded bitfield values that are added up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 709b291972f8c65f4427f36b45ee78c3895d1e6e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 10:40:28 2011 +1000 dix: only use a single return where only one is needed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 8c528c667da7c7fba0ba07973a06b2d4613fbf70 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 20 13:14:11 2011 +1000 dix: fix typo in direction calculation Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 47f8cba6f3ae24e5dcdc4e348bdaaaf00d25a91c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 11 14:50:16 2011 +1000 xfree86: removed unused "event" variable in xf86PostMotionEventM Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c6212a3e5dc43bd3b5263b392cb75ec96cdf4e4f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 15 14:13:51 2011 +1000 dix: silence compiler warning resource.c: In function 'AddResource': resource.c:493:3: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'RESTYPE' RESTYPE is uint32_t, not long. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 196d679bed2e9959d2fca89d4ee4bbc551681d0b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 15 14:51:06 2011 +1000 test: remove glib dependency The few features from the glib test suite we used can be replaced with assert and printf. This patch is a simple replacement for these two g_assert → assert g_test_message → printf g_test_init is removed and so is g_test_bug_base. g_test_run replaced with a simple return 0. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> commit 071a6ac4d0c347aa7fc6efe37f4f6992524d7ef1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 11 15:22:52 2011 +1000 input: remove GetKeyboardValuatorEvents, this is now unnecessary. GetKeyboardValuatorEvents handles NULL valuator masks already, so the GetKeyboardEvents wrapper is not needed. Rename GKVE to GKE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 91a735328c59db006f0ed52b49e9c59895796c0c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 9 10:45:55 2011 +1000 test: add some XIPassiveGrab protocol testing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 60b08e013dd1e971f82e5bc8708d3f120c217497 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 9 10:44:48 2011 +1000 Xi: don't swap the status byte in the XIPassiveGrab replies Reported-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a3f37f3698880aec508b5ecfb88daf39360610aa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 9 10:07:19 2011 +1000 Xi: exit with error value if CheckGrabValues failed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f4d9ff73b161d84d3fcacc5834fa714c113c7a10 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 9 09:54:12 2011 +1000 Xi: fix reply swapping function check for XIPassiveGrabDevice Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 2a49ffa3c94819e9f28dd939f23ee8a675258172 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 9 09:53:47 2011 +1000 Xi: return the bad device ID if a passive grab fails with BadDevice. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 315aa8444b13f827237674535eb2ad55a2066808 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 23 10:32:35 2011 +1000 configure: actually require macros 1.13 Introduced in 6a5bf15fa99cf5b2358b3b3e2f29e5044aa8724a Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit f0f0eec869d932a2d9228ff3e41e9e7cda155e68 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 11 11:24:29 2011 +1000 Xi: silence valgrind warning. (#36120) Conditional jump or move depends on uninitialised value(s) at 0x4357A1: GetEventMask (events.c:454) by 0x43B9E8: DeliverEventsToWindow (events.c:2029) by 0x4E0C59: SendEventToAllWindows (exevents.c:2125) by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118) by 0x426F99: DisableDevice (devices.c:507) by 0x46BF72: xf86Wakeup (xf86Events.c:457) by 0x432ABA: WakeupHandler (dixutils.c:419) by 0x45B708: WaitForSomething (WaitFor.c:235) by 0x42E8D9: Dispatch (dispatch.c:367) by 0x422DC9: main (main.c:287) Uninitialised value was created by a stack allocation at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61) Conditional jump or move depends on uninitialised value(s) at 0x43BB78: DeliverEventsToWindow (events.c:2010) by 0x4DDEEA: FindInterestedChildren (exevents.c:2103) by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) by 0x4DDEFF: FindInterestedChildren (exevents.c:2104) by 0x4E0C6F: SendEventToAllWindows (exevents.c:2127) by 0x4E8301: XISendDeviceHierarchyEvent (xichangehierarchy.c:118) by 0x426F99: DisableDevice (devices.c:507) by 0x46BF72: xf86Wakeup (xf86Events.c:457) by 0x432ABA: WakeupHandler (dixutils.c:419) by 0x45B708: WaitForSomething (WaitFor.c:235) Uninitialised value was created by a stack allocation at 0x4E8190: XISendDeviceHierarchyEvent (xichangehierarchy.c:61) Set the type of dummyDev to SLAVE. The jump listed above comes from a check to IsMaster() in GetEventMask() that would then set the XIAllMasterDevices mask. Hierarchy events can only be set for XIAllDevices so the above IsMaster() check had no effect and the device type doesn't really matter anyway beyond shuting up valgrind. Also initialize dummyDev to 0 to ease future debugging. X.Org Bug 36120 <http://bugs.freedesktop.org/show_bug.cgi?id=36120> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 419a27b5219a739f2fbd50cc96a1b54c469e4a88 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 12 10:17:07 2011 +1000 Xi: fix valuator alignment in DeepCopyDeviceClasses (#36119) commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 only fixed the initialization, not the copy. After a slave device change, the valuator were out of alignment again. X.Org Bug 36119 <http://bugs.freedesktop.org/show_bug.cgi?id=36119> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7762de65e153790ee9f63903964d168a6680d815 Author: Alexandr Shadchin <alexandr.shadchin@gmail.com> Date: Sat Apr 9 17:45:10 2011 +0600 Simplify auto-detect mouse for WSCONS_SUPPORT Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Matthieu Herrbb <matthieu.herrb@laas.fr> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 001b6b8b70734db1fa2f68e45c1db8337ba9f662 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 15 13:01:37 2011 -0400 glx: Make --disable-dri not disable AIGLX Either the DRI1 or DRI2 loaders are sufficient. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f8540b9dcc1fba886be5c4ce7ea0d74952cb48c4 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 15 12:57:05 2011 -0400 glx: Use 0 rather than garbage for unknown INTEL_swap_event types Otherwise the garbage you return could well be numerically identical to one of the swap type tokens, and apps which rely on us to tell the truth would be in trouble. Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit dc0cf7596782087bdda0e7f9cd2f60907c45b2c4 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 29 10:09:46 2011 -0400 Revert "composite: Don't backfill non-bg-None windows" This reverts commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc. Bugzilla: https://bugs.freedesktop.org/34427 Acked-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 6a433b67ca15fd1ea58334e607f867554f227451 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 28 12:30:09 2011 -0400 glx: Fix lifetime tracking for pixmaps GLX pixmaps take a reference on the underlying pixmap; X and GLX pixmap IDs can be destroyed in either order with no error. Only windows need to be tracked under both XIDs. Fixes piglit/glx-pixmap-life. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit b3d2164a0361f636bfe77b51456bee9213af4f13 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Apr 12 17:16:50 2011 +0300 dri2: Pass out_count by value to update_dri2_drawable_buffers() update_dri2_drawable_buffers() doesn't modify out_count, so pass it by value. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit 93c833ee84a3465ec5d251e622ba26434cb532f8 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Apr 12 17:13:28 2011 +0300 dri2: Handle calloc() failure Don't access invalid memory if calloc() fails to allocate the buffers array. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> commit b2997431fd426ab318bc5dfd2cd43956d733ebec Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Apr 13 11:51:30 2011 -0700 Send events that were missing from RRSelectInput The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out events corresponding to the event mask, if there have been changes to CRTCs or outputs. Only screen events were being generated, however. Fixes http://bugs.freedesktop.org/21760 Signed-off-by: Federico Mena Quintero <federico@novell.com> Reviewd-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e409fb32b97033718f270a273f29f24c0b562b84 Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Tue Apr 12 12:55:56 2011 +0300 damage: use DamageReportDamage for the initial borderClip damage report Instead of using DamageDamageRegion for reporting the first (virtual) damage in ProcDamageCreate that covers the borderClip of the drawable window, use a function DamageReportDamage directly (previously called damageReportDamage). This avoids sending all other damage listeners a full window update when a new damage object is created. As this patch makes DamageReportDamage a public interface, the function has been moved into the part of the file that contains all the other public functions. The function has not been otherwise modified. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 274dca8f2c6707121d45df8015fe7eddb129dec9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 4 22:31:42 2011 +0300 dix: don't free stranger pointers inside AllocARGBCursor This seems a good convention to follow: if pointers are allocate outside a given function, then free there as well when a failure occurs. AllocARGBCursor and its callers were mixing up the freeing of resources and causing a particular double free inside TileScreenSaver (srcbits and mskbits). Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit f603061e9482ad5caf1975ba5395b3294852d072 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 4 21:40:06 2011 +0300 os: fix use after free in EstablishNewConnections In the case of failure on AllocNewConnection, new_trans_conn cannot be dereferenced because it's already freed. Swapping the order of this logic fix the changes introduced in 04956b80431169e0ae713a3e6ba4cdc157ce3a66. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> CC: Jeremy Huddleston <jeremyhu@freedesktop.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 82498e3c2cce6f515063ecb4b6ae9303e828da00 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 4 20:25:32 2011 +0300 xfree86: xv: set pointers to NULL in xf86XVFreeAdaptor As a good practice and for eventual double frees. The reason of this patch is due the resilience of xf86XVInitAdaptors, where for any adaptor failure it's able to keep trying registering the following ones. I discussed briefly with Pauli and Ville about a bigger refactoring of such function, doing it in a way to return instantly when a failure happens; after all that's how mostly of the other driver functions work. Instead, we just thought that xf86XVInitAdaptors is wise and cool, and eventually other driver functions should be even following the main idea of resilience. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 81414c1c836ae30628606545edbf7392d9b3d009 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Mar 31 23:44:03 2011 +0300 xfree86: xv: fix double free in xf86XVFreeAdaptor When xf86XVFreeAdaptor is called more than once in xf86XVInitAdaptors (it may, but not often), the conditional being changed in this patch will always take true path and will keep freeing pAdaptor->pAttributes, thus letting the system error-prone. This patch fix such problem checking for a pointer instead the number of attributes. Such pointer will be deallocated when xf86XVFreeAdaptor is called first and will not let the code re-run in the following calls. This is a bit similar how the surroundings code is already doing. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 74476b700f1e499a731ba2ddbba87b12b9b5139b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Mar 31 17:46:42 2011 +0300 xfree86: loader: use one exit code only for readability No functional changes. Spaghetti code for the win! \o/ Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit 7aad7dbf409eaa16a2c80d76ba2a42dc84501919 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 7 08:43:13 2011 +1000 Xext: use EXT_MASK macro instead of manual & 0x7f Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit b28a1af55cf1ad2a882cc8cd73b77341dec7ff5a Author: Chase Douglas <chase.douglas@canonical.com> Date: Wed Apr 6 14:51:45 2011 -0400 Fix unset valuator handling for XI 1.x valuator events again Set the valuator values for unset masked absolute valuators in the internal device event. This ensures the values will always be correct in getValuatorEvents even if the device has been removed. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3085b178626c957854385c7a88a05ec3c7eb74f3 Merge: c9d89cec1 3c45b59e6 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 6 08:34:10 2011 -0700 Merge remote-tracking branch 'jturney/master' commit c9d89cec1407550cb2568f4cef146c93607bbae6 Merge: a52049de2 bc61787a2 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 4 11:57:39 2011 -0700 Merge remote-tracking branch 'vignatti/for-keith' commit bc61787a20e7683cbc4dfa45fe855da98a8c0cd0 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 18:22:50 2011 +0300 render: fix memory leaks in ProcRenderCompositeGlyphs Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Soren Sandmann <ssp@redhat.com> commit 45b6667b651a0a26b17f64c9e99d70784045e4bf Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 17:17:40 2011 +0300 xkb: fix fd leak in XkbDDXListComponent Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit 0b288c8738a97cf6aa3f36aa5c05e7ac2a5cbca8 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 16:54:14 2011 +0300 dix: fix memory leak in ProcListExtensions Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit 90e03ab026cd8ffdc6202e6b8bae119717ee8528 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 16:48:21 2011 +0300 mi: fix memory leak in miZeroLine Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit daae5e5de194757f7084f9b2b24353c34b961f19 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Mar 28 20:13:11 2011 +0300 xi: fix memory leak in AddExtensionClient Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit c1875ac25b7b730d464c98c4c151c35efd64a562 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Mar 28 20:09:04 2011 +0300 dix: fix memory leak in AllocShared Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit 6e5020f46165862ff09211d5425c8b6a13966303 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Mar 28 20:07:06 2011 +0300 dix: fix memory leak in AllocPseudo Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit a6c71ce5d2d2fe89e07a2ef5041c915acc3dc686 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Mar 28 19:21:28 2011 +0300 os: fix memory and fd leaks in Popen Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit bafec9a25efa902bef2a3730dc44dc50f0e45877 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Mar 28 19:19:57 2011 +0300 os: use DebugF for debugging Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> commit 719b37c33a89d6ad86c79097e5c67b9b3cea5aac Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 20:04:24 2011 +0300 xfree86: fix memory leak in xf86LoadModules Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit af054db005b48160b117dfd5bec5f821ee614ea9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 19:51:23 2011 +0300 xfree86: fix bad free configInputDevices introduced in 93ca526892c0d22afa05cce6496198c652043a19. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit ac2fac24d8baa56f369f4e54908bc00c2b73a60a Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 29 19:49:32 2011 +0300 xfree86: fix memory leaks in configLayout Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc123319206930638ef1217922824d586d4ada6d Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:21:21 2011 +0200 xfree86: fix memory leak in xf86ConfigFbEntity Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2aa935bc5cc1e2d5365a97b8c5bb3d33eb5fc758 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:10:55 2011 +0200 fb: fix memory leak in fbOverlayFinishScreenInit Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4d87606a0d0eb63458098028c300c39c6f1bd2bf Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:07:44 2011 +0200 Xi: fix memory leak in ProcXGetSelectedExtensionEvents Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 12e46e83733b47d2704e1509960192365102af46 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:07:31 2011 +0200 dix: fix memory leak in SetDefaultFontPath Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7ae46b69ba3f05f46529131e6a864904967cde3a Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 21:33:15 2011 +0200 mi: fix memory leak in miFillUniqueSpanGroup Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 623bb34342641811e2151232f1ab4e2ee3d6b871 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 19:27:17 2011 +0200 xi: fix memory leak in ProcXIQueryDevice Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit dce2f10cf7bef9929cefadb5088d5b66df43a865 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 19:21:03 2011 +0200 mi: fix memory leak in miInitVisuals Free the pointers inside miInitVisuals, so the callers of this function (fboverlay.c and fbscreen.c) don't need to worry with deallocation in the case of failure. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8ab92cd9822510f426d179a636ef34bb0ace3bb3 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 18:56:02 2011 +0200 xfree86: dri2: fix memory leak and free resources properly Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit aa7096ca6f108e399d9916639cf20c57f9776305 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 18:24:34 2011 +0200 xorg: remove unused pointer values all over the server Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 49051355d47849b3dd73631e3e2287e319a7f4e5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Mar 23 18:08:29 2011 +0200 dix: remove unused macro Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit f1a80e1268fa4d235a411a8cdf20b4f13eafcde0 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Mar 23 18:06:51 2011 +0200 dix: remove unused debug code Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit a52049de2f846fe984d4db5ac8d2c1826c7b2d0b Merge: d044d3675 266ea63bc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 4 09:58:53 2011 +1000 Merge branch 'master' of git://people.freedesktop.org/~herrb/xserver into for-keith commit d044d3675635f037bf0eb30e47f82460f78227d1 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Mar 31 16:26:06 2011 +0300 xfree86: loader: fix memory leaks in LoaderListDirs Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9c4aae2141161e4bf69313a771db91c0acc4cc83 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Mar 30 16:47:31 2011 +0300 xkb: Prevent leaking of XKB geometry information on copy. Currently shapes, sections and doodads may leak on copy. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 29d63ba175ff1ef1587c390b18ce61c8f1c150f3 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Mar 30 16:47:30 2011 +0300 xkb: Introduce helper function to handle similar reallocations. This is preparation for a memory leak fix and doesn't contain any functional changes. Note that two variables are generally used for reallocation and clearing of arrays: geom->sz_elems (reallocation) and geom->num_elems (clearing). The interface of XkbGeomRealloc is deliberately kept simple and it only accepts geom->sz_elems as argument, because that is needed to determine whether the array needs to be resized. When the array is cleared, we just assume that either geom->sz_elems and geom->num_elems are synchronized to be equal or that unused elements are cleared whenever geom->num_elems is set to be less than geom->sz_elems without reallocation. Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f40103cee1d591387359f401a5a7c21f4105aeb4 Author: Chase Douglas <chase.douglas@canonical.com> Date: Thu Mar 31 11:29:01 2011 -0400 Don't report old relative values in getValuatorEvents Relative valuator values should not be reported in any future events. If a relative valuator value is not set in an internal event, set the value to 0 for XI 1.x valuator events sent over the wire. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8199eac443d2c22d313cb23e39d5e607a8cc7f99 Author: Chase Douglas <chase.douglas@canonical.com> Date: Mon Mar 28 16:04:48 2011 -0400 Handle non continuous valuator data in getValuatorEvents This allows for masked valuators to be handled properly in XI 1.x events. Any unset valuators in the device event are set to the last known value when transmitted on the wire through XI 1.x valuator events. Fixes https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/736500 Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 266ea63bc3e052b753c5484fa08dcc4fb67c8952 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Apr 1 22:55:57 2011 +0200 Xi: fix querydevice request swapping WriteReplyToClient() swaps rep.length, so it can't be used on return of WriteReplyToClient(). So save it's value for later use. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 552c78592c5e5f52fe16e2429f77c63adf398247 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Apr 1 22:54:54 2011 +0200 Xext: fix test on extension number for the swapped case. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> commit a074e6b6754d6c2706b2b5de54e22cbffc5b1a17 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Apr 1 22:53:40 2011 +0200 Xi: add XI_Focus{In,Out} to swapped events. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 81257377a2d011ce47fba5822df0f7918dea1d72 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Apr 1 22:51:48 2011 +0200 Xi: take XI2 requests into account also for the swapping case. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Julien Cristau <jcristau@debian.org> commit f9834d312e3059073e8ad77d9f9d57cb9d96e1e5 Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 31 15:33:46 2011 +1000 fb: cleanup fbChangeWindowAttributes This cleans up the duplication in fbChangeWindowAttributes, and fixes a bug if the fb24_32ReformatTile ever failed, since the old code would happily dereference it in the fbEvenTile call a few lines later. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> commit 36c7158133660520034d645b124c2c973d2971bb Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 31 13:21:44 2011 +1000 fb: drop comments around 24-bit support. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit ac2ae2ed378cc877444bec17b353dda83b620186 Author: Dave Airlie <airlied@redhat.com> Date: Tue Mar 29 14:24:52 2011 +1000 fb: add back fb defines for driver compat. we could drop these really and just fixup the drivers, but since they'll build fine but fail to work this seems safer. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit be9cfb249da18d134c1d65bbb75161aff65f2942 Author: Dave Airlie <airlied@redhat.com> Date: Tue Mar 29 14:27:41 2011 +1000 fb: drop defines that aren't used/necessary anymore. This was generated by: cd fb coan source --replace -DFB_SCREEN_PRIVATE -DFB_24BIT -DFB_24_32BIT -DFB_SCREEN_PRIVATE -UFBNOPIXADDR -UFBNO24BIT -UFBNO24_32 *.[ch] A follow up patch readds the FB_24_32BIT define for Intel UXA. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit e0a2ad51dfb7373aa602335490d9666d6101b5ea Merge: 327e1d880 3d688316a Author: Keith Packard <keithp@keithp.com> Date: Wed Mar 30 10:51:27 2011 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit ac00ab77d5a00cfd198958aa1afaa4c3ccc6d7bc Author: Chase Douglas <chase.douglas@canonical.com> Date: Mon Mar 28 16:04:47 2011 -0400 Clean up getValuatorEvents using array loop logic Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3d688316af0e4ff3c44acfc168bd9c76c892b629 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 15 11:03:26 2011 -0400 xfree86: warning fix xf86RandR12.c: In function 'xf86RandR12EnterVT': xf86RandR12.c:1769:5: warning: ISO C90 forbids mixed declarations and code Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2762eef8c34b48be803226f48fc71f790286f968 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 15 11:01:50 2011 -0400 xfree86: warning fix Pointer.c: In function 'xf86parsePointerSection': Pointer.c:192:5: warning: format '%u' expects type 'unsigned int', but argument 3 has type 'long unsigned int' Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 5275fbe2e226e1c2a46d26288390c8ef6e1a6a52 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 15 10:58:36 2011 -0400 render: warning fixes picture.c: In function 'CompositeTriStrip': picture.c:1777:25: warning: unused variable 'ps' picture.c: In function 'CompositeTriFan': picture.c:1807:16: warning: unused variable 'pScreen' Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f1c2c01ac9ea7381cb4cd21ac1b2185ff28da3ec Author: Adam Jackson <ajax@redhat.com> Date: Thu Mar 24 16:51:54 2011 -0400 dix: Small refactor to resource deletion Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3e0b311aba54895d806174526511ef11b31432b1 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 21 12:12:53 2011 -0400 glx: minor cast cleanup Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 501506cf9df3d81556d44d074d8321fe6c171576 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 18 17:48:51 2011 -0400 glx: dead variable removal Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 10317682e2fbb95f1d4caa1bdbbb8116272c0f86 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 18 17:44:11 2011 -0400 glx: Remove some obfuscatory macros Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit c327d07cc68802256c679a65d78f98f17327abda Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 18 17:03:09 2011 -0400 glx: Remove ->forceCurrent from the context vtable All the implementations of makeCurrent and forceCurrent are identical, so just use makeCurrent everywhere. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a48dadc98a28c969741979b70b7a639f24f4cbbd Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 21 11:59:29 2011 -0400 glx: Reimplement context tags This would let you do a constant-time context lookup, but if that's your performance problem you have two problems. Just use the context's XID as the tag value instead. In order to do this, we have to defer destroying a context until it actually goes unreferenced, as you're allowed to mention a context tag after you've (ostensibly) destroyed the context, as long as it's still your current context. Thus, change DestroyContext to merely mark the context as dead if it's a current context, and call down to actual resource destruction (and XID reclamation) in StopUsingContext. Also, stop trying to delete context state from DrawableGone. This was always broken, as GLX does not say that contexts are destroyed when their drawables are destroyed. But with the above change to defer context destruction, this would trigger a server crash on client exit as we'd free the context state twice. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 30d6947cee714385cf62a40ea6fa6d2e68388c78 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 7 14:53:28 2011 -0500 glx: Fix _glapi_add_dispatch We never need to generate stubs, because those conditions can't happen in the server. Yank that code out, but keep the bookkeeping for which extension functions are registered so the DRI driver doesn't get confused. As a pleasant bonus, we're now friendlier for environments like selinux that make runtime code generation difficult, and we're portable to more arches since we don't have to port the assembly stubs. Fixes the following clutter conformance tests (indirect rendering, llvmpipe driver): test-cogl-backface-culling test-cogl-materials test-cogl-readpixels test-cogl-texture-mipmaps test-cogl-texture-get-set-data test-cogl-viewport test-cogl-offscreen Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 0cb44cec7b9fbd75285f7380f162cf6140a5bf3f Author: Adam Jackson <ajax@redhat.com> Date: Thu Mar 3 10:42:41 2011 -0500 glx: Flatten -DXFree86Server Always defined by the makefile, so, just get rid of it. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ed6c13c01e017f9f40c89247ab6652895fb1ea14 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 13:37:43 2011 -0500 glx: Update some glapi comments Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 17d9e374721d6c8ee3f7f9cdc882f80127bdb57f Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 13:21:39 2011 -0500 glx: Lobotomize _glapi_get_proc_address This isn't a meaningful thing in the indirect glx loader, so just warn if it ever happens and move on. But also, mark it PUBLIC, so if the driver does ever call it we merely warn instead of aborting because ld.so can't find the symbol. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit b0c665ac0fe6840dda581e4d0d0b76c703d62a7b Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 12:30:22 2011 -0500 glx: Remove noop dispatch table We can never hit this, because the indirect GLX dispatch code always forces a current context and checks that it's non-NULL before calling into the dispatch table. If it's _not_ null, then _glapi_set_context will call into the driver, which is responsible for calling _glapi_set_dispatch to make sure the dispatch table is non-NULL. Also remove _glapi_set_warning_func and friends, since we can no longer call them even from dead code. Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 327e1d88012102af6aca6c6840aa0ed3c7041a77 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Mar 28 17:18:39 2011 +0200 EXA: Use dixGetPrivate(Addr) instead of dixLookupPrivate. The latter calls the former, let's cut the middle man and eliminate a branch in a hot path. According to Git history, ExaSetPixmapPriv was never used anywhere, just drop it. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit a095a6d4e8f5090907e8d3d66018636216300846 Merge: a22486f84 ef9d04f8a Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 27 20:06:29 2011 -0700 Merge remote-tracking branch 'airlied/pwin-cleanup' commit a22486f848014000dc13dda470f77d4d8ea9e9f6 Merge: 2ef4ff45e 633b81e8b Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 27 18:27:10 2011 -0700 Merge remote-tracking branch 'whot/for-keith' commit 2ef4ff45ef1fcfc4967ebe3d550408769e5f6500 Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Fri Mar 25 10:38:23 2011 +0200 os/client: Prevent rare fd leak in DetermineClientPid DetermineClientPid didn't close file descriptor if read on /proc/pid/cmdline failed. Adjusted the code to disregard the close return value and perform the return after that, if the read failed or returned EOF. Signed-off-by: Mark Kettenis <mark.kettenis@xs4all.nl> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Keith Packard <keithp@keithp.com> commit ef9d04f8ad4239ac30984769c9c8c101bb8e78bf Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 24 14:07:34 2011 +1000 dri: kill if 0 out code. This refers to pWin->winSize in some #if 0 code remove it. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit eb9266c7176eb240a85e72beda9b6033338294f1 Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 24 14:04:25 2011 +1000 consolidate SetRootClip (v2) each DDX has its own copy, I've taken the darwin one, though I'm not sure why it needs the pOldClip piece that nobody else has and the commit msg is like an "Updates from magic land" type message. This removes the main uses of pWin->winSize from the DDXen. v2: drop old clip like ajax suggests. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 3c45b59e675ba926ec95842ac3d49e2091e41eb8 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Mar 18 15:00:14 2011 +0000 Fix XWin compilation after commit 769531b9 commit 769531b9 "Add mode field to pointer movement hooks" changes the function signature of miPointerSetPosition() to include the movement mode which resulted in the pointer position Update use of miPointerSetPosition() in winEnqueueMotion() appropriately (See http://tinderbox.freedesktop.org/builds/2011-03-16-0008/logs/xserver/#build) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 633b81e8ba09cc6a1ea8b43f323874fda2cf0bde Author: Simon Thum <simon.thum@gmx.de> Date: Wed Mar 9 20:48:22 2011 +0100 xserver: remove AbsoluteClassRec keeping the ABI This removes the struct, but keeps InitAbsoluteClassDeviceStruct as a no-op and preserves related struct layout. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2103d61909c7e6bd345622962df7784a19df72c5 Author: Simon Thum <simon.thum@gmx.de> Date: Sat Mar 5 05:02:54 2011 +0100 simplify ChangeDeviceControl in stubs Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 118ef6f806f629a8e2ad61e4f2a43820b0fa621c Author: Simon Thum <simon.thum@gmx.de> Date: Sat Mar 5 05:01:22 2011 +0100 xf86: don't pretend to support DEVICE_ABS_* in ChangeDeviceControl Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dee83dff4b8fbf1351263beaf2d531d033b6d0c4 Author: Simon Thum <simon.thum@gmx.de> Date: Sat Mar 5 04:59:33 2011 +0100 kdrive: don't pretent to support DEVICE_ABS_* in ChangeDeviceControl Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9eaecb1bfe358a0c5f24645a29d6c377c0c4b37c Author: Simon Thum <simon.thum@gmx.de> Date: Sun Mar 20 16:28:22 2011 +0100 xquartz: simplify ChangeDeviceControl Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33e257ab43ebf35e838b80c416762e9b743e9385 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 22 11:53:00 2011 +1000 test: when unit tests are enabled, build them during "make" Catch compiler errors that were otherwise only spotted on make check. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 6243332782f2d286d49f1dec8a628b0a403665fd Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Fri Mar 18 16:35:36 2011 +0200 config: handle device change event properly wakeup_handler in udev.c wasn't dealing with udev change events. There are situations when a device can gain its input capabilities after it has been added to the system and therefore the change events must be handled as well. The change is handled as a consecutive device removal and addition. Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Stefan Kost <Stefan.Kost@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fad10cb38ef2433c82f8a43d3b7d64e323728060 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 18 11:06:57 2011 +1000 xfree86: print out which driver is about to be used. Makes reading the log file a lot easier for those that don't magically recognise the log spew by the individual drivers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit cb5d4b416a0fc850a1c119755a9cc3c4f0d7a545 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Mar 23 12:10:15 2011 -0700 XQuartz: applewm: Don't check if requested window level is < 0 because it is unsigned (-Wtautological-compare) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c116e32dc2799c4abcf38d22bc773b755387c89a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Mar 23 12:07:36 2011 -0700 XQuartz: Put ifdef guards around have_depth label (-Wunused-label) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 1a583f7940e18a8ef28ca14e74e85e0785d39067 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Mar 23 12:05:05 2011 -0700 XQuartz: Properly comment extra tokens (-Wextra-tokens) after endif Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c55baebf4ebf1887262cc16899eb297b9f284f6e Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Mar 22 19:01:48 2011 -0700 GLX: Support TLS with better portability AX_TLS detects when toolchains support __thread or __declspec(thread), but existing code assumed __thread. This also adds a check to configure.ac to error out if TLS is requested but unsupported. Found-by: Tinderbox http://tinderbox.x.org/builds/2011-03-22-0007 Regression-from: 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Tom Fogal <tfogal@alumni.unh.edu> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 03f45df93469f6aef391e97007b9614e0770cc4c Merge: efcb7275c 5fb329a04 Author: Keith Packard <keithp@keithp.com> Date: Wed Mar 23 13:38:37 2011 +0900 Merge remote-tracking branch 'airlied/xinerama-cleanup' commit efcb7275ce5de651f91ba4ff8bb227dfb68bb154 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Mar 17 19:26:37 2011 -0400 test: git ignore the list test executable Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6a5bf15fa99cf5b2358b3b3e2f29e5044aa8724a Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Mar 17 19:26:36 2011 -0400 Add generalized unit test support using util-macros. A handful of modules have begun adding unit test programs. These macros will help providing a consistent interface which will help package builders and developers to manage the functionality. XORG_ENABLE_UNIT_TESTS will turn on/off unit testing, regardless of how it is implemented. The default (yes/no) can be specified by each module. It can be used by itself if glib or -wrap support is not needed. XORG_WITH_GLIB will probe the system for glib-2.0. A different version can be specified in each module. It will consult XORG_ENABLE_UNIT_TESTS but can be used by itself in contexts other then unit testing. The default (yes/no) can be specified by each module. XORG_LD_WRAP will probe the linker for -wrap support. It will consult XORG_ENABLE_UNIT_TESTS but can be used by itself in contexts other then unit testing. configure options: --enable-unit-tests Enable building unit test cases (default: auto) --with-glib Use GLib library for unit testing (default: auto) Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit ee583cb33423fa79beb22db20b30e10a677f9b5a Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Mar 17 19:26:35 2011 -0400 config: group document related XORG_ macros together No functional changes. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d5b16b037b8fe12ba85c68c8289b6a8cc5e3a09d Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 17 23:48:52 2011 -0700 Revert "dix: Remove usage_hint from pixmaps, store it in ->drawable.class" This reverts commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad. The drivers used the top bits of the usage_hint to store driver private flags (intel, radeon, nouveau). With EXA we need to get at this data so if we migrate the pixmap we can create the correct type of pixmap in the driver, however this commit truncates the usage_hint into 8-bit class and loses all the good stuff. Signed-off-by: Dave Airlie <airlied@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit dc9ce695a69ca0787f58f8d160212a7a41acb703 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Mar 9 15:45:40 2011 +0200 xkb: Initialize pad bytes sent in replies of geometry requests. Valgrind complains about uninitialized data being written to clients. Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ee3a4951a49312a2b68025db00c71472eb84293f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 10 09:30:02 2011 +1000 xkb: Document XkbWriteCountedString. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5c47f8beac7f87680c6f7331483b9cf94a1dbc86 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Fri Mar 11 14:30:49 2011 +0200 xkb: Release XKB component names when compiling keymap. Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6f46ae3c69c48f389560af1491ed1729ba45866f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 15 13:20:03 2011 +1000 man: list the drivers that are ignored when hotplugging (#35209) X.Org Bug 35209 <http://bugs.freedesktop.org/show_bug.cgi?id=35209> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 642569591a73806d038f00f2f9a5c8738f764c0b Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Mar 12 07:29:35 2011 -0500 dmx/doc: remove dead code in the makefile This was leftover from some older ways of building dmx/scale docbook. Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 21f70cad19474a6f3ba419e03c0df12881ed1092 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Mar 12 07:29:34 2011 -0500 man: relocate manual pages in the man subdir outside doc The convention is to have the manual pages in a man subdir which is not under a doc dir. The doc dir contains users docs. This will move man pages out of the way for upcoming DocBook patches. Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d3adf2d9350bee4125107e2ea1ed0c51bb736562 Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Thu Mar 10 11:40:40 2011 +0200 xfree86/modes: Fixed memory leak in xf86InitialConfiguration There were two memory leaks in the function: one was the lack of free for "enabled", the other was the full lack of releasing anything when configuration was too small. The first issue was fixed by adding the missing free, the other was addressed by replacing the duplicate memory releasing sequences with one that is gotoed into. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Keith Packard <keithp@keithp.com> commit a713832cbe494ff468a627e88b11164074bbd14e Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Mar 13 20:01:30 2011 +0000 When XDMCP -from is specified, only register the requested address When XDMCP -from is specified, only register the requested address, rather than the requested address, and any others we have of different address families to the requested address. e.g. if we have 4 interfaces with both IPv4 and IPv6 addresses (which are not IPv6 mapped IPV4 addresses), using -from with one of those IPv4 addresses currently means only that IPv4 address, and all IPv6 addresses are used in the connection data in XDMCP REQUEST packet. (See http://cygwin.com/ml/cygwin-xfree/2011-02/msg00000.html) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0ac4931753a5d5925fc844c8cbec08585aea57a7 Merge: a8146f6be d7f801141 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 14 13:06:41 2011 -0700 Merge remote-tracking branch 'ajax/xserver-next' commit d7f8011418f9da06631f27c66c29bcb226d0dffe Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 8 10:14:28 2011 -0500 Remove TriStrip and TriFan from the picture screen These functions no longer go through the screen vtable, so remove them and fix up the various wrappers. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 0eb5b0fbcf1233a93f285ff1e1609fcbd01e7c79 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 8 10:14:27 2011 -0500 Absorb miTriStrip() into CompositeTriStrip() There is no need to virtualize this function that nobody cares about. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit c2af0cea02bd85f4d5954c16e34b4a8fb0fe2243 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Mar 8 10:14:26 2011 -0500 Absorb miTriFan() into CompositeTriFan() There is no need to virtualize this function that nobody cares about. Reviewed-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit a8146f6becc44bf9ad611d33bded17df07e6af21 Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Wed Mar 9 17:29:14 2011 +0200 mi/misprite: use memory management provided by dixRegisterPrivateKey The record allocated by miSpriteDeviceCursorInitialize was not being released. This patch makes misprite use dixRegisterPrivateKey with the record size argument, which handles the memory management issues. miSpriteDeviceCursorInitialize is restructured to initialize pCursorInfo only if miDCDeviceInitialize succeeds. The record itself is zeroed on cleanup to ensure that the assumptions in the code still hold. Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit f985a7319ef80b9b613eeaf24581000827cb220f Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Wed Mar 9 17:29:14 2011 +0200 mi/misprite: use memory management provided by dixRegisterPrivateKey The record allocated by miSpriteDeviceCursorInitialize was not being released. This patch makes misprite use dixRegisterPrivateKey with the record size argument, which handles the memory management issues. miSpriteDeviceCursorInitialize is restructured to initialize pCursorInfo only if miDCDeviceInitialize succeeds. The record itself is zeroed on cleanup to ensure that the assumptions in the code still hold. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> commit 57b35adaed112520c3b3b2fbad13cf5a91cd6652 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Wed Mar 9 13:57:25 2011 -0500 Remove geometry arguments from miSourceValidate() The only user of the geometry coordinates is the software sprite code, which uses them to remove the pointer whenever the window beneath is being used as a source. However, using Window pictures as a source is extremely rare (let alone *partial* windows), so there is no harm done in just validating all of the drawable. Additionally, the miSourceValidate() function was buggy in at least three respects: (a) It added drawable->{x,y} before calling down, which is wrong since the misprite code already adds them in its check. (Alternatively, the misprite code is wrong, but there are actual users who would notice if that code was broken). (b) It didn't account for the width of the interpolation filter, so if the Picture had a bilinear or convolution filter, the edges surrounding the source area would not be validated. (c) It didn't validate alpha maps. Finally, computing the bounding box of the transform on every composite request was a real performance issue in pixman, so presumably it could be one here as well. This patch changes miSourceValidate() to simply validate all of the underlying drawable. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Soren Sandmann <ssp@redhat.com> commit 016edc17512ba966d60edede8cf947996bae0b3c Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 17:12:26 2011 -0500 dix: Define RESTYPE as uint32_t long is needlessly long on LP64. Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 1f2bc777f96fd41feb55a4799ece939652130ef4 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 13:11:12 2011 -0500 dix: Shrink PropertyRec on LP64 size needn't be a long. No change on ILP32 but, combined with the previous change, 56 -> 40 bytes on LP64. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 51f353d0a0d116af16d7d9590cadef6c56328746 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 13:10:20 2011 -0500 dix: Fix ATOM typedef unsigned long is needlessly large on LP64. Use uint32_t instead. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7ca75abbbdd2a1211e52a4f43ac4ed24d3c8ab34 Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Date: Wed Mar 9 11:17:28 2011 +1100 glx: Use PATH_MAX as size of filename buffer Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> commit d17a9fb8414becf6a8998041df68f209f9222b2b Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Date: Wed Mar 9 11:17:27 2011 +1100 Consolidate all the PATH_MAX handling into misc.h Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> commit 021393d1b8bcc9ff2ff5deb2306360e6b0afa1c6 Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Date: Wed Mar 9 11:15:07 2011 +1100 glx: Factor out glxProbeDriver function. DRI, DRI2 and swrast all had near-identical driver probing logic. Pull it into glxdricommon. [ajax: warning fix] Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> commit 56c90e29f04727c903bd0f084d23bf44eb1a0a11 Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 15 14:29:14 2010 -0500 randr: Add RRConstrainCursorHarder Confine cursor motion to within the bounds of a single CRTC, iff all the CRTCs within a ScreenRec are reachable from each other. If not you get the same "cursor floats within the bounding rect" behaviour you get now. v3: - Incorporate review feedback from Christopher James Halse Rogers v4: - Add mode field. Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 810fbfa44626bff9f443ab17c0ad27ff7ae121d7 Author: Adam Jackson <ajax@redhat.com> Date: Wed Feb 9 17:32:16 2011 -0500 mi: Call pScreen->ConstrainCursorHarder from the position update path v2: Cover more paths, spotted by Daniel Stone. v3: pass down the mode field for movement mode. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 769531b9ccade723a56498b0888af58d085fec9e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 14:19:18 2011 +1000 Add mode field to pointer movement hooks. Preparation work for pointer barriers. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 92788e677be79bd04e5ef140f4ced50ad8b1bf8e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 22 12:32:01 2011 +1000 test: add some tests for basic list manipulation. This has less purpose as a test but more as documentation on how to actually use the differnent list calls. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1ad9f01c31742157934a791e6141d10520d13e8a Author: Adam Jackson <ajax@redhat.com> Date: Thu Mar 10 10:47:40 2011 -0500 glx: Add texbuffer2 support to swrast Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 5fb329a04a18835ce864d0563f6dfeb3d3c78d69 Author: Dave Airlie <airlied@redhat.com> Date: Wed Mar 9 15:05:26 2011 +1000 panoramiX: convert 1->panoramiXNumScreens loops to use macro (v2) This converts all the remaining 1->num loops to the macro, this removes nearly all the panoramiXNumScreens usage in loops, and is a step to replacing it. v2: move some from the other patch. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 0bccfcc97b2300b83aa4693454c27ac87f23f221 Author: Dave Airlie <airlied@redhat.com> Date: Wed Mar 9 15:01:20 2011 +1000 panoramiX: convert 0->panoramiXNumScreens loops to macro (v3) This just uses the FOR_NSCREENS macro instead. v2: remove some of the 1->x loops. v3: drop the 1->0 loop, will rework later. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 5a94934487ea477947e24dcd4720b7cde77d3d2f Author: Dave Airlie <airlied@redhat.com> Date: Wed Mar 9 14:53:26 2011 +1000 panoramiX: consolidate common id assignment code. This adds a new FOR_NSCREENS_FORWARD_SKIP, which skips the first element and is a common idiom throughout panoramiX code. It then adds a new inline function to hide id assignment to a panoramiX resource and cleans up lots of common repeated code. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit e2f8315daefc6e56ac8395a9f58f87bbf0809039 Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 10 09:13:50 2011 +1000 drop exa don't provide accel in this framework commit c48c530e541e201ea1afe2512d85967659ceef84 Author: Dave Airlie <airlied@redhat.com> Date: Wed Mar 9 15:11:42 2011 +1000 panoramiX: macro checking if drawable is root (v2) this code appears in quite a few places, consolidate it into a macro in a header. v2: align braces with macro just above it, and with lines removed Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit c3c0e2fdd326214e271ce144e8fc2725cbd738ef Merge: a19771e43 73555555a Author: Keith Packard <keithp@keithp.com> Date: Wed Mar 9 14:25:54 2011 -0800 Merge remote branch 'whot/for-keith' commit 73555555a440855f9ae64c3367c5c7dca98c8741 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 8 15:33:13 2011 -0500 record: warning fix record.c:810:9: warning: unused variable 'count' Scope-shadowed by a later variable of the same name, safe to just delete. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4d114cc5467a514faa437ce7f4c5e772e2f6a21d Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 8 15:33:12 2011 -0500 input: warning fixes eventconvert.c:287:9: warning: enumeration value 'ET_Enter' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_Leave' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_FocusIn' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_FocusOut' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_DeviceChanged' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_Hierarchy' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_DGAEvent' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyPress' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_RawKeyRelease' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonPress' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_RawButtonRelease' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_RawMotion' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_XQuartz' not handled in switch eventconvert.c:287:9: warning: enumeration value 'ET_Internal' not handled in switch From the code it appears these are can't happens, so if they ever do, BadImplementation seems entirely appropriate. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7b5e562ea74039832116ee13db910f290f074782 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 8 15:33:11 2011 -0500 input: warning fix getevents.c:770:5: warning: suggest parentheses around '&&' within '||' Introduced with dc57f89959e549403f8488eb9f23425bd7118b22: - if(dev->u.master && dev->valuator) { + if(dev->valuator && IsMaster(dev) || !IsFloating(dev)) { So I'm assuming the two terms around the || are meant to be a unit. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33fee13361e745e1db29e250b08622c83046d488 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 8 14:41:21 2011 +1000 Xi: fix XI2 passive grab reply length calculation If modifiers failed, the reply length was 4 bytes too short. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit eb8141b6edd8b477c0ba796be71e985c35520a9b Author: Julien Cristau <jcristau@debian.org> Date: Mon Mar 7 18:55:19 2011 +0100 Xi: fix length checks for swapped clients ChangeDeviceProperty and XIChangeProperty are followed by some data, so use REQUEST_AT_LEAST_SIZE instead of REQUEST_SIZE_MATCH. X.Org bug#35082 <https://bugs.freedesktop.org/show_bug.cgi?id=35082> Reported-by: Markus Fleschutz <markus.fleschutz@x-software.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4114533db6704324fc26f28a444415e325ace8e0 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Fri Mar 4 17:55:33 2011 +0200 config: Ensure that stolen option list elements are released. NewInputDeviceRequest steals the contents of option list elements but doesn't use the elements themselves for anything. Therefore the list elements need to be released always. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8d30aff4aa708b9b885d492602ced7493a96a4df Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Fri Mar 4 17:55:32 2011 +0200 dix: Release input device config info when the device disconnects. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 40e56d34538f4663426db50893c231a2b5d760dc Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Fri Mar 4 17:55:31 2011 +0200 xkb: Ensure that XKB device private won't leak on device disconnect. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Erkki Seppälä <erkki.seppala@vincit.fi> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 18413f55089623123537c1499b02aa95ca2014d2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 3 14:15:55 2011 +1000 xfree86: block signals between EnableDevice and first CheckMotion() Devices usually enable SIGIO processing in EnableDevice. CheckMotion initialises the pointer sprite, sends Enter/Leave events, etc. This leaves us with a small window where events may be processed without the sprite or pointer position (as seen from the protocol) is valid. Block signals during this window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a19771e4337d1c4600550314bbc42a1495a023ff Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Tue Mar 8 13:29:41 2011 -0500 xfree86/common: Remove a configScreen leak when conf_screen is NULL configScreen used a dynamically allocated buffer for XF86ConfScreenRec when conf_screen argument was NULL. This pointer was never stored anywhere, nor was it released, so this patch makes the function use automatically allocated storage in that situation. [ajax: minor grammar fix] Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> commit b73ebe65cd071a063417ac9c38513a6742e32428 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 12:12:35 2011 -0500 glx: Remove unused _glapi_get_proc_name Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 4377288abdbaac8506d8643b440c300ba03182fe Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 11:52:27 2011 -0500 glx: Simplify _glapi_check_multithread We can guarantee that the X server does not call DRI driver services from multiple threads, so _glapi_check_multithread need never do anything special. As a result, ThreadSafe is always false, so remove it and simplify expressions where it appeared to match. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d5e8bb2150ce9d8a4132d61f76621a2c7a7f0acf Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 11:26:05 2011 -0500 glx: unifdef BEOS_THREADS We don't support BeOS, so, no. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3692ff0b35e774a6f6cbedf634d53c4df2e53a24 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 11:22:45 2011 -0500 glx: unifdef USE_XTHREADS xthreads is an ancient wrapper around a half dozen or so common thread APIs, including pthreads. Just use pthreads directly if you have it; if you don't, get with the times. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2371b44f9eb9181ec2c081ce66befee51d18bf6e Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 11:17:07 2011 -0500 glx: unifdef SOLARIS_THREADS Solaris 7 and older are not supported; Solaris 8 and later have (and use) pthreads. Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a5fdd1aa06c7c8ecefeafafc4a778fc816ad41a4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 2 10:20:02 2011 -0500 glx: Remove unused _glapi_get_proc_offset and friends Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2cb3dc020cbec1ba64848dac532b3bb2d84d0635 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 17:11:35 2011 -0500 xi: Use RESTYPE consistently No functional change Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2413702aa0b488f1a4f828a017d5b508c4f219f1 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 16:54:17 2011 -0500 xvmc: Use RESTYPE consistently Also mark these static since they're not used externally. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit cd58924d294de2abddbd2f03c2db021894fe9759 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 16:28:26 2011 -0500 xinerama: Use RESTYPE consistently No functional change Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 9a6a9971b03381b7c44257284edecdfa0135957f Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 16:25:23 2011 -0500 xv: Use RESTYPE where appropriate No functional change. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit fddfd026a0e4a8190dc01fb0f38af4b2c29b63a3 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 13:01:15 2011 -0500 dix: Remove PIXEL typedef Doesn't appear to be used anywhere. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 82a8677d9175732a61df4116a396b76a7704efb4 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 22:49:32 2011 -0500 dix: Remove deprecated.c No more internal users, this can be dropped now. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 1564c82417d201de5b9a5ec5e7aa4ef14c45fbad Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 18:37:45 2011 -0500 dix: Remove usage_hint from pixmaps, store it in ->drawable.class The class field was unused for pixmaps, and we don't have enough classes to justify a whole uint32 anyway. Reviewed-by: Soren Sandmann <ssp@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d8caa782009abf4dc17b945e325e83fda299a534 Author: Adam Jackson <ajax@redhat.com> Date: Thu Feb 24 16:06:34 2011 -0500 vbe: Fix malloc size bug v2: Slightly more obvious sizing math. ==14882== Invalid write of size 2 ==14882== at 0x6750267: VBEGetVBEInfo (vbe.c:400) ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) ==14882== by 0x471895: InitOutput (xf86Init.c:519) ==14882== by 0x422778: main (main.c:205) ==14882== Address 0x4f32fa8 is 72 bytes inside a block of size 73 alloc'd ==14882== at 0x4A0640D: malloc (vg_replace_malloc.c:236) ==14882== by 0x675024B: VBEGetVBEInfo (vbe.c:398) ==14882== by 0x6142064: ??? (in /usr/lib64/xorg/modules/drivers/vesa_drv.so) ==14882== by 0x471895: InitOutput (xf86Init.c:519) ==14882== by 0x422778: main (main.c:205) Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 628d16a92a7fa556fbb70bf4a4adf57ec05c190b Author: Keith Packard <keithp@keithp.com> Date: Sat Feb 26 10:31:50 2011 -0800 loader: Don't distribute sdksyms.c and make it depend on the config sdksyms.c is constructed by processing header files with the C preprocessor. Its contents will vary depending on the precise configuration options, and so must depend on the config header files. We have one header file which is always changed when any config option is modified called do-not-use-config.h (which may want a different name at some point), so make sdksyms.c depend on that file. Also, we don't want to ship this file; it always needs to be built. So, include it in the nodist_libloader_la_SOURCES list to prevent it from being added to the tarball. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 705f047876f78bbdfb368c3643925af1d1d17f71 Author: Julien Cristau <jcristau@debian.org> Date: Fri Mar 4 01:12:01 2011 +0100 configure.ac: bump version for 1.11 development Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6c90e839d9872a37d371578c9c423e8213922044 Merge: 0bc95d5b0 edcceedbd Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 3 14:41:44 2011 -0800 Merge remote branch 'whot/for-keith' commit 0bc95d5b06dcea65a1aa193ea907b50f7dd168b5 Merge: 3f41f4ade 69a9171db Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 3 14:33:08 2011 -0800 Merge remote branch 'jeremyhu/master' commit 3f41f4adea4bbb90d4bda4dab600595b655e3ed8 Merge: 8e4c3ce55 dae24abcd Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 3 14:12:36 2011 -0800 Merge remote branch 'sandmann/for-keithp' commit 8e4c3ce55b0f186bc6ba4039e30629669b6087b7 Merge: f3d19c0cf 296561506 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 3 13:42:07 2011 -0800 Merge remote branch 'rjy/clientids' commit 1c008e7e7865b405b8033f625333cd64ece4499e Author: Simon Thum <simon.thum@gmx.de> Date: Wed Feb 23 02:29:35 2011 +0100 dix: change all timestamps in pointer acceleration to CARD32 CARD32 is being returned by GetTimeInMilis(), so use it consistently. Signed-off-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a4b85261859b17dba9ad8f7f1ce650133f0235d4 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Feb 23 02:29:34 2011 +0100 dix: update pointer acceleration code to use ValuatorMask Signed-off-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8128846e16b406c7d459ae7556f7cd09bdc24c91 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Feb 23 02:29:33 2011 +0100 dix: refactor predictable scheme initialization This intends to clean up the predictable accel struct from purely scheme-related things like input properties, as they would be useless in other use cases such as wheel acceleration. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 69a9171dbbafd6a7db702d48770d28fb54717545 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Mar 1 20:02:46 2011 -0800 XQuartz: pbproxy: Protect against possible collision between Cocoa and X11 Cursor types Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit dae24abcd44f3bb1966faa88222f851c784b37dc Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Feb 28 11:10:38 2011 -0500 Delete RegionClipSpans() Nothing uses it. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com> commit edcceedbd35df576929685767d0b619659e5b020 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 28 12:32:53 2011 -0500 xext: Remove XCALIBRATE extension Nobody can have been using this, it's never called from extension init. XI2 device properties should now be a functional replacement. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c2207d11f243900bc2f641e08d80da63d84e97a8 Merge: 00779932d 579ee8f5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 28 11:26:09 2011 +1000 Merge branch 'next' into for-keith Conflicts: dix/devices.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0343aed1f082baf4bfbd730c1c3582f1410b8741 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Feb 27 16:18:27 2011 -0800 XQuartz: Don't use deprecated CoreGraphics API on SL and Lion Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit de32d4dcf57c10fc100c1b33630127947a8c8460 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Feb 27 15:49:10 2011 -0800 Revert "rootless: Remove ROOTLESS_WORKAROUND" Christof Wolf has reported a regression that seems to be caused by this change, so reverting the change in the 1.9 branch. We'll investigate a proper fix in master for 1.10. This reverts commit c89f0521044083a11d538ebfeaabee6fc7fb9a03. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 00779932de861bf7ac8c625802f1afed75d01b6f Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Feb 27 20:16:03 2011 +0100 Don't clobber input device options from xorg.conf Since commit b8d9c5ff removed commonOptions, we now need to append the "Core{Keyboard,Pointer}" options to the existing list. Fixes passing options to devices confirured in xorg.conf on systems where autoaddevices is false. Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8cf3348e90846f5b04236479042228fb98ac8f70 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Feb 8 11:38:35 2011 -0800 XQuartz: RandR: Add RandR modes for the primary display in multi-monitor configs We now support using RandR to set the resolution of the primary display (and place a shielding window on other displays) in multi-monitor configurations. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 968652983f8e6ae6889b48e15f4098ff6ad4a15a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Feb 8 12:26:35 2011 -0800 XQuartz: RandR: Provide an alert box when entering a RandR mode for the first time. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 13578b852b7631f99cf1fd5e2e5469edc5aae369 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Feb 8 11:37:52 2011 -0800 XQuartz: RandR: Capture the display when switching modes with RandR This will prevent native windows from resizing as we change resolutions. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7dff79e39564b403c3afbc5e7bacffa0df190a23 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Fri Feb 11 09:00:10 2011 -0500 Implement fbAddTriangles() in terms of pixman_add_triangles() This allows the remaining triangle-to-trap conversion code to be deleted. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 566f1931ee2916269e164e114bffaf2da1d039d1 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Jan 11 10:33:57 2011 -0500 Move miTriangles to fb as fbTriangles() The fb version simply calls the new pixman_composite_triangles(). This allows us to get rid of miCreateAlphaPicture(). Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 788ccb9a8bcf6a4fb4054c507111eec3338fb969 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Tue Jan 11 09:46:46 2011 -0500 Move miTrapezoids() into fb as fbTrapezoids() The main consumer of trapezoids, cairo, is using the Trapezoids request, which is currently implemented in the miTrapezoids() function. That function splits the request into smaller bits and calls lower level functions such as AddTrap. By moving the implementation of the whole request into fb, we can instead call pixman_composite_trapezoids() to do the whole request in one step. There are no callers of miTrapezoids in any of the open source drivers, although exa and uxa have their own copies of the function. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 197df069a4037d6faa2723c31ffba09c95d71166 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Wed Feb 23 10:36:57 2011 -0500 Require pixman 0.21.6 The following patches need pixman_composite_trapezoids() and pixman_add_triangles(). Signed-off-by: Soren Sandmann <ssp@redhat.com> commit f3d19c0cf3327cceb90f7378f5d8fc0c3e327400 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 25 21:22:23 2011 -0800 Version bumped to 1.10 Signed-off-by: Keith Packard <keithp@keithp.com> commit 678f5396c91b3d0c7572ed579b0a4fb62b2b4655 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 25 21:10:21 2011 -0800 input: Ensure Valuator axes are aligned as needed Let the compiler figure out the correct alignment for the axes data for a valuator by using a union to force double alignment of the initial ValuatorClassRec structure in the allocation. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org> commit dc8f52e77f51b6fa8908d9611c3f7e3cfbbaf2d1 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 25 16:38:27 2011 -0800 hw/dmx/doc: Add explicit dependency for all doxygen output files Instead of listing one of the doxygen output files and depending on sequential execution to ensure that the other files were present before make checked for them, create explicit dependencies so that make will not check for the additional files until after doxygen has been run. This allows parallel make to work correctly in this directory. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Kristian Høgsberg <krh@bitplanet.net> commit fd4d9c75c265add8d6cc74afb341c9c4f2ec1073 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 25 10:54:50 2011 -0800 hw/xwin: Look for gl spec files in $(srcdir) or . Tarballs include the downloaded gl spec files, which will end up in $(srcdir). But, git-based builds will not have them at all and will need to download them from opengl.org. They'll land in in the build directory instead of $(srcdir), and so we need to allow them to be in either place. This change checks for the files in $(srcdir), linking them to . if present. Otherwise, it downloads them from opengl.org. A suggested better solution is to have Mesa install these files somewhere. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Kristian Høgsberg <krh@bitplanet.net> commit 6b951dec69103ca76d6d4a61b1a2f67a52d013b9 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sun Feb 20 09:51:15 2011 -0800 dmx: Construct paths in doxygen.conf to fix VPATH builds The paths in doxygen.conf assumed that srcdir=builddir and broke otherwise. Use autoconf to fill in the paths to the srcdir so that the files can be found when users have a separate build directory (as with distcheck). Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> commit 61ce915bf78570b7c8d53c118700ef7274bbdfb7 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Feb 15 06:03:28 2011 -0800 xfree86: Allow sdksyms.dep to be included portably Non-GNU makes don't deal with the sinclude or -include variants that allow Makefile stubs to be created and then included during the build. Instead, create an empty file at the end of configure so that the regular include statement can be included. This is how automake handles automatic source dependencies. In order to trick automake into not processing the include statement, a variable is used. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 780a77acce1dd369549ece802b3e2c4006058dfe Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 24 20:45:46 2011 -0800 Version bumped to 1.9.99.903 (1.10 RC3) Signed-off-by: Keith Packard <keithp@keithp.com> commit 9d23459415b84606ee4f38bb2d19054c432c8552 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 25 11:08:19 2011 +1000 dix: release all buttons and keys before reattaching a device (#34182) Testcase: xinput float <keyboard name> results in the keyboard's enter key being repeated as the device is detached while the key is still physically down. To avoid this, release all keys and buttons before reattaching the device. X.Org Bug 34182 <http://bugs.freedesktop.org/show_bug.cgi?id=34182> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 229b055bdbc53370944401649234e8a38183f4fb Merge: 6178959e3 b17fc99cb Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 24 19:44:35 2011 -0800 Merge remote branch 'jeremyhu/master' commit 6178959e3dd6482a4317de6eb14eb19ca7329b9c Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 24 19:42:02 2011 -0800 xfree86: Bump video ABI to 10.0 RandR 1.4 revert changed things Signed-off-by: Keith Packard <keithp@keithp.com> commit 31704510f448706524b7b7085cc4ff0ada7bfe7e Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Feb 24 12:17:57 2011 +0100 EXA/mixed: ModifyPixmapHeader pitch fixes. (bug #33929) If there's a GPU copy and a non-zero devKind was passed in, set the GPU copy pitch to that instead of to a possibly bogus value derived from the new width. This is e.g. used by the radeon driver's drmmode_xf86crtc_resize hook, fixes https://bugs.freedesktop.org/show_bug.cgi?id=33929 . On the other hand, the system memory copy doesn't need the pitch to be aligned beyond the PixmapBytePad of the width. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Cyril Brulebois <kibi@debian.org> Tested-by: Cyril Brulebois <kibi@debian.org> Reported-by: Thierry Vignaud <thierry.vignaud@gmail.com> Tested-by: Thierry Vignaud <thierry.vignaud@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b17fc99cb9ca9ff0a3592f783a906cdcc35da748 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Feb 24 19:24:35 2011 -0800 XQuartz: Localization Updates Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 59850630fefe5e4f0430d7e2e106937fdf1e7ffb Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Feb 24 19:18:35 2011 -0800 XQuartz: Add LSApplicationCategoryType key to Info.plist Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 83861595782aaa05907f9cf7b236d50261d404d9 Merge: a1cc0e52b 4102a0096 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 24 18:59:07 2011 -0800 Merge remote branch 'kibi/master' commit a1cc0e52b0e8ca40bc1218de553424b2bcb760ef Author: Alexandr Shadchin <alexandr.shadchin@gmail.com> Date: Tue Nov 30 21:17:19 2010 +0500 Removing unused code In OpenBSD removed support PCCONS in 2002 year http://marc.info/?l=openbsd-cvs&m=102435816424294&w=2 Signed-off-by: Alexandr Shadchin <Alexandr.Shadchin@gmail.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr> Signed-off-by: Keith Packard <keithp@keithp.com> commit 365ad68fb9f7029550505b7c276a808050cada9c Merge: 0801afbd7 720c895db Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 24 18:49:40 2011 -0800 Merge remote branch 'ajax/for-keithp' commit 0801afbd7c2c644c672b37f8463f1a0cbadebd2e Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Thu Feb 10 15:35:14 2011 +0200 record: avoid crash when calling RecordFlushReplyBuffer recursively RecordFlushReplyBuffer can call itself recursively through WriteClient->CallCallbacks->_CallCallbacks->RecordFlushAllContexts when the recording client's buffer cannot be completely emptied in one WriteClient. When a such a recursion occurs, it will not be broken out of which results in segmentation fault when the stack is exhausted. This patch adds a counter (a flag, really) that guards against this situation, to break out of the recursion. One alternative to this change would be to change _CallCallbacks to check the corresponding counter before the callback loop, but that might affect existing behavior, which may be relied upon. Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi> Signed-off-by: Keith Packard <keithp@keithp.com> commit 816f1f8ffafbfbf0dd31ea86f295987f84151feb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 22 12:48:04 2011 +1000 include: document list interface. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit b833f9b924ddc043244c0a026547c438f1c4d4df Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:18:35 2011 -0800 Revert "Replace huge argument list in xf86CrtcSetModeTransform with struct" This reverts commit 8b35118c03590a7ad3786d3284bafb3f40fcb8cc. commit 7030c82648930cea7ef8a2ea49d8138078920d4d Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:18:16 2011 -0800 Revert "Require RandR protocol version 1.4 or newer" This reverts commit c8bc25fd7629df10f2825b7cc713b031ae78f223. commit a91d33917befd6719bb7f01007bc253a2aefb0bb Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:18:12 2011 -0800 Revert "randr: Add sprite position transforms" This reverts commit 66294afcab7b7a82f7dd897767e46c48a94b8ee8. commit 3d4ee25a1e2e0ed2463ceaabea8f5a284a6ddd60 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:18:08 2011 -0800 Revert "randr: Implement RRSetCrtcConfigs" This reverts commit d94a035ea9eb3167fc4f35b2d9f0d53f8807014c. commit 8b0e651f7d09a7f35c87a4d0a6e2053cae93b516 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:18:05 2011 -0800 Revert "hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs" This reverts commit 86c489c319c705f710bee3897fe27600ce15008e. commit 9e8c20b0d49783d6b9334d4c11c4e6e3ba273524 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:42 2011 -0800 Revert "randr: Add per-crtc pixmaps" This reverts commit 82612045e11f2b882ae132e184a9629f43f1c424. commit 9f47780ecdc7693f756587a758ec0141e75cb1eb Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:36 2011 -0800 Revert "randr: Hook up the new RandR 1.4 functionality" This reverts commit afb6ebf1d5829346c40fe1053c9f50afe926e6c6. commit 793a242c89fccdbf1a2557ba33da1da2cb4ff8c4 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:33 2011 -0800 Revert "DIX is responsible for ref counting scanout pixmaps." This reverts commit 96b4d4787bf82edd9d06eb9a6e94bc45412c7df2. commit 7b7cd3f121b3904ad851155f853ce87a0e00d002 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:29 2011 -0800 Revert "Set sprite transforms from RRSetCrtcConfigs" This reverts commit a88d70fb20a2bc3152b84adff4380857e6cfadf5. commit fd9331f6eb39a28da7de4867b2e3a460f667d514 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:24 2011 -0800 Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet" This reverts commit 752c368421c1c824752cf467fba9318d75d2ca2c. commit 4d91e7a63161cdde9af53aedb3fe3e53dbe3049e Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:17:20 2011 -0800 Revert "ProcRRSetCrtcConfigs uses 'configs' without being initialized" This reverts commit b0f4bd61f0caf80f3be9a176f1f7a707bc6628d8. commit 00d0b235cfbfb162ddd58c088d2ed03e55a9c5cb Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 23 11:16:48 2011 -0800 Revert "randr: handle RRSetCrtcConfigs request with zero configs" This reverts commit 0d01b66df9081ef48843b3bad81c56bb2cd1ae69. commit 720c895db9327bbdc32215a67236303d2ceafad4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 23 13:36:20 2011 -0500 Add mode field to ConstrainCursorHarder For Pointer Barriers, the movement mode is important and must be passed through. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a16e282200f84233041e5a565c6363a5a78be525 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 8 15:40:22 2010 -0500 xfree86: Fix the sdk headers to be multilib-safe Use _LP64 (verified on gcc and sun compilers) instead of _XSERVER64 in internal header usage, and always define _XSERVER64 for modules if _LP64 is defined. Prevents differing xorg-server.h between 32 and 64 bit packages. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit dc498b433f36af5d2de3065e7c64cdb575385d81 Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 8 15:23:04 2010 -0500 xfree86: If the driver found modes on an output, don't add more Inferring modes from sync ranges is only valid if the monitor says it's valid. If the monitor says it's valid, then we'll have already added those modes during EDID block parse. If it doesn't, then we should believe it. If there's no EDID for an output, but sync ranges from the config, we'll still add default modes as normal. Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 303977fbcf9c641b7e19dfde192cef585f5b455c Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:52:49 2011 -0500 glxproxy: warning fix glxvendor.c: In function ‘__glXVForwardPipe0WithReply’: glxvendor.c:205:10: warning: ‘be_buf’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 405ad0610d6e2f4606768294b655ac52aee9ae58 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:51:47 2011 -0500 glxproxy: warning fix glxvendor.c: In function ‘__glXVForwardAllWithReply’: glxvendor.c:284:10: warning: ‘be_buf’ may be used uninitialized in this function glxvendor.c:285:10: warning: ‘be_buf_size’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a4cd2e0da6415ec1b3b182579bebbe2a41f29d30 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:47:05 2011 -0500 glxproxy: warning fix glxsingle.c: In function ‘__glXForwardPipe0WithReply’: glxsingle.c:218:10: warning: ‘be_buf’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f928caca6e60215bc9ab423acae5542dfabc9bec Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:45:31 2011 -0500 glxproxy: warning fix glxsingle.c: In function ‘__glXForwardAllWithReply’: glxsingle.c:300:10: warning: ‘be_buf’ may be used uninitialized in this function glxsingle.c:301:10: warning: ‘be_buf_size’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit dad2712c9328e113db4de768a12a8dafa6c177e9 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:44:03 2011 -0500 glxproxy: warning fix glxsingle.c: In function ‘__glXDisp_ReadPixels’: glxsingle.c:760:11: warning: ‘buf’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 4270157bac645550e2c0afe89479c0bfe9d53447 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:38:23 2011 -0500 glxproxy: warning fix render2swap.c:264:13: warning: ‘swapArray’ defined but not used Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 5d0910b4fdf99e3239635a01eb2709c32d0e5bb9 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:32:54 2011 -0500 glxproxy: warning fix glxcmds.c: In function ‘CreateGLXPixmap’: glxcmds.c:1663:20: warning: comparison between pointer and integer glxcmds.c:1663:38: warning: comparison between pointer and integer Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit e1b5d3e5e7f157ab769c40ad2efdc1281c25a03a Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:18:53 2011 -0500 glxproxy: warning fix glxcmds.c: In function ‘CreateGLXPixmap’: glxcmds.c:1641:22: warning: ‘pGlxScreen’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3b9de273a94fb68de51238c20c3182396aa41b84 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:07:20 2011 -0500 glxproxy: warning fix glxcmds.c: In function ‘CreateContext.clone.6’: glxcmds.c:105:19: warning: ‘be_fbconfigId’ may be used uninitialized in this function glxcmds.c:104:14: warning: ‘be_vid’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 767b93e783a981b4fc926299a85a1a18387e693a Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 14:02:37 2011 -0500 glxproxy: warning fix glxcmds.c: In function ‘__glXGetDrawableAttributes’: glxcmds.c:3295:8: warning: ‘screen’ may be used uninitialized in this function glxcmds.c:3298:8: warning: ‘attribs_size’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a391089186cd1063d807bf14a9651e6861b248de Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 8 13:55:23 2011 -0500 glxproxy: warning fix glxcmds.c: In function ‘__glXChangeDrawableAttributes’: glxcmds.c:3464:8: warning: ‘screen’ may be used uninitialized in this function Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 4102a00962f568b1d34cf72ad524e1cc705b0b1c Author: Cyril Brulebois <kibi@debian.org> Date: Wed Feb 23 14:44:23 2011 +0100 xfree86: Fix undefined reference to `XNFsprintf' on sparc. Build failure on sparc: | copying selected object files to avoid basename conflicts... | CCLD Xorg | ./.libs/libxorg.a(xf86sbusBus.o): In function `xf86SbusConfigureNewDev': | […]/hw/xfree86/common/xf86sbusBus.c:712: undefined reference to `XNFsprintf' | collect2: ld returned 1 exit status Fix typo introduced in: 3a9bb93dd178084f4ff1abcea331ca5a62f88ce6 Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Apologized-for-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 579ee8f5d84c3a523b7b3e3941eabb226d1d19e2 Merge: b63689313 17265ccb0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 23 08:44:42 2011 +1000 Merge branch 'mi-cleanup' into next commit b636893137da1695e235e3a9354bfd9243fdddc2 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 22 13:43:28 2011 +0000 Input: Don't freeze unrelated devices in DeliverGrabbedEvent When delivering an event to a device grabbed with SyncBoth, DeliverGrabbedEvent walks the device tree looking for associated devices to freeze them. Unfortunately, it froze all devices instead of just the paired device, and the previous fix in 4fbadc8b17237f3c would still break if the same client had a non-SyncBoth grab on another unrelated master device. Fix this by completely ignoring devices that aren't our paired device. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 17265ccb027e3f956bf7409106174f44621d1cb8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 12:28:43 2011 +1000 Move master/lastSlave out of the union into separate fields. The removal of the double-use will cause some suble bugs as some conditions to check for the dev->u.master case were broken and also evaluated as true if lastSlave was set (instead of master). Also breaks the input ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 77113dd3eef03dd65b556b672d976817b3f4542e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:45:29 2011 +1000 input: Change a bunch of direct dev->u.master accesses to use GetMaster() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 2936635698619271a790004480a14285149277cb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 12:06:56 2011 +1000 xkb: Fix a check for MASTER_KEYBOARD And copy into the master keyboard, not just the directly attached device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 0ba526deeb4d54ee1a75400291ee7a3673ed4d96 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 12:04:46 2011 +1000 mi: check for MASTER_POINTER instead of manual checks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 52c13896ce9a1e178d4eeed15f68020947cc20ed Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:57:06 2011 +1000 mi: update macro to search for MASTER_POINTER Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit d270f12a3e44f4ea01f176a86783e8cd4c59ddf7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:55:51 2011 +1000 xfree86: update GetMaster check for the VCP. Same result, but now also triggers on slave keyboards that send pointer events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit ce7f79efd588899f01c74f95c2f58d6dd6d816cd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:53:06 2011 +1000 dix: fix a master device access in change_modmap. We need to check if our master keyboard is the given device since we may be a pointer with keys and thus need to change the modmap too. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit e1ac704185dee31b427a46cd41a00ef7a28b4129 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:42:09 2011 +1000 dix: fix up a master check in ChangeKeyboardMapping handling. We don't just care about the directly attached master, we care about the master keyboard. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit febce8cb814df46018f6ae1e6a9daea019b8ad0a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:32:28 2011 +1000 Xi: replace a direct master access with GetMaster() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit df6559237a2d641b2fc38d14975beab9bae0d971 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 18 11:30:10 2011 +1000 dix: add MASTER_ATTACHED as allowed type for GetMaster(). In some cases, we don't know/care whether we want the master pointer or keyboard for a device. Add a new type MASTER_ATTACHED to return the master this device is attached to. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit dc57f89959e549403f8488eb9f23425bd7118b22 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 12:47:37 2011 +1000 Switch to use IsFloating() This is not a straightforward search/replacement due to a long-standing issue. dev->u.master is the same field as dev->u.lastSlave. Thus, if dev is a master device, a check for dev->u.master may give us false positives and false negatives. The switch to IsFloating() spells out these cases and modifies the conditions accordingly to cover both cases. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit e48bf3b6403dde33586ca0e421db61e402525453 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 11:11:57 2011 +1000 xfree86: replace two inputInfo.pointer uses with device loops. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 703baece7ebd128a6742d0523d5b3ebe65126fa5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 12:19:26 2011 +1000 dix: Add IsFloating(device) wrapper. Simplifies check for floating devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 77af45ebc3eda32dc534968cab8d5adfb01bd9e3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 12:48:30 2011 +1000 dix: Simplify retrieving the master device. GetMaster() returns NULL for floating slaves. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit dc32a23890776edf575bf18b3f3c079da6214340 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 15:21:51 2011 +1000 Fix two incorrect checks for master devices. These two were sideeffects of lastSlave being in the same field as the master. For devices generated by the master device directly, lastSlave was 0 and the device would (with the old checks) be interpreted as floating. Add the required checks to safeguard against master devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit d63c979c7fe0f2b114b27e73ebe0a706be8840ae Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 15:21:31 2011 +1000 dix: replace direct master access with GetMaster and temp. device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit c2a9e0a96983f22f721196513e75a53ea0b86d7e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 11:41:47 2011 +1000 mi: simplify a "check for keyboard" condition Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 3a6160b408447ce620140849f962683a5d139cb9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 11:40:01 2011 +1000 mi: remove if 0 code. Note sure why this is in if 0 but it's been that way since 2007. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit d9987c8c45236bc9cfcaf716f4bfcac2a9d0e7e6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 11:22:45 2011 +1000 mi: Add a few comments explaining various cursor move functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 15fe86e69fc256342881112cd07565527e32435b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 11:01:19 2011 +1000 mi: remove static GenerateEvent variable. Push into the respective devices. This should have no functional changes since we never warp more than one device at a time. In the glorious future with true multithreading, still the better thing to do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr> commit 93a73993708b1345c86ec3ec06b02ed236595673 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 21 15:40:40 2011 +1000 test: write some event → XI1 conversion tests. Don't test everything, but hey, life is short and I'm trying to have one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 4cdf1013771bc86fe2f6d9223bc4a46753bc918f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 21 15:32:57 2011 +1000 dix: a valuator number of 0 is valid (#34510) For all but motion and proximity events, having no valuators is ok. Regression from 1.9, keyboard events are not converted to protocol events. X.Org Bug 34510 <http://bugs.freedesktop.org/show_bug.cgi?id=34510> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Timo Aaltonen <timo.aaltonen@canonical.com> commit b4ef34d4664e0eaac7211f7a22a2025958aa1527 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 20 11:59:41 2011 +0100 Revert "exa/mixed: Exclude frontbuffer from deferred pixmap handling." This reverts commit 541b25038a5de74411a094570b407c5ae018c2ba. - It turns out that the high latency was a driver problem. - catting a large amount of text turns out to look prettier when the throughput is lower, but it's not worth the loss for a minor improvement that may not even exist on someone else's computer. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 443d75446bcbe7d97a23860a1e2d46c0b7e7cb26 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 18 14:46:33 2011 -0800 Version bumped to 1.9.99.902 (1.10 RC2) Signed-off-by: Keith Packard <keithp@keithp.com> commit 2c77aeb39f59f1a94cc603a2e6256a62ce785c36 Merge: 816d67de2 402b329c3 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 18 14:29:32 2011 -0800 Merge remote branch 'jcristau/for-keith' commit 816d67de2ba9bdfe652da32cb6447a3056342b98 Merge: a73c28f0b 3bbb70a1a Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 18 12:20:26 2011 -0800 Merge remote branch 'whot/for-keith' commit a73c28f0bdafb1c5cb8129179188a99c0ca052e2 Author: Justin Dou <Justin.Dou@intel.com> Date: Thu Feb 10 16:27:29 2011 -0500 Replace malloc with calloc to initialize the buffers[] as NULL in do_get_buffers function The calling for allocate_or_reuse_buffer may fail due to some reason, e.g. out of memory. If the buffers[] were not initialized to be NULL, the following err_out may try to access an illegal memory, which will cause X crash afterward. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Justin Dou <Justin.Dou@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0bc9b15a622377c57e617411ccd26c4b5bf8cba4 Merge: d1123b66e 93cd4b103 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 18 12:04:41 2011 -0800 Merge remote branch 'ajax/for-keithp' commit d1123b66ebbcf96dd816236f54befc568a5f7c68 Merge: 5d020c313 f6e4ace9e Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 18 11:59:25 2011 -0800 Merge remote branch 'jturney/master' commit 649269d40667cfb387cb5286dd3519dd68f7dd80 Author: Bryce Harrington <bryce@canonical.com> Date: Wed Feb 16 16:55:57 2011 -0800 Check for OOM condition in XISendDeviceHierarchyEvent When system is out of memory, calloc can fail returning a NULL pointer. Check for this before dereferencing it, and bail out if it fails. Ref.: https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/720445 Signed-off-by: Bryce Harrington <bryce@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 31ddb7ef4f5bac2c13c199e74a0716e43b8dc38e Author: Simon Thum <simon.thum@gmx.de> Date: Wed Feb 2 00:03:44 2011 +0100 dix: avoid FP promotion during pointer acceleration Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 006157f203f8493bb3d18e333a3fd3d6cb10f8ea Author: Simon Thum <simon.thum@gmx.de> Date: Sat Sep 4 16:31:24 2010 +0200 dix: refactor scheme init This makes it possible to init a scheme in one init call, so we get rid of the tightly coupled two-phase init used before. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38ffeec0c89e83afc62579dec221c325d667cc1e Author: Simon Thum <simon.thum@gmx.de> Date: Sun Feb 6 19:13:00 2011 +0100 xfree86: allow to check for options without warnings in the log This allows set_percent_option in synaptics to work as described, and should generally enable to check option syntax without log spam. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2fbccc881bfab4bdc5b97f74a7e5bcec7fdeae20 Author: Simon Thum <simon.thum@gmx.de> Date: Sun Feb 6 19:07:19 2011 +0100 fix percent options parsing Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 46b49796015762fd131bec96eff6caaa890bfd5f Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 11:28:02 2011 +0000 Input: Allow EventToCore to return multiple events Some event types (notably Expose and GraphicsExpose) require multiple events, a la XI 1.x. Bring the EventToCore API in line with EventToXI's and allow it to generate multiple events. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ea71495adabca52df44241c0eba39e6bceb58202 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 11:28:01 2011 +0000 Input: Reduce use of filter in DeliverEvents Instead of switching on the event filter to determine delivery, use the event type instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8a0241656cecb6ab2fb377f02b14238d18e65fc1 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 11:28:00 2011 +0000 Input: Rename EventIsDeliverable return masks Rename the return mask values for EventIsDeliverable: * CORE_MASK -> EVENT_CORE_MASK * XI_MASK -> EVENT_XI1_MASK * XI2_MASK -> EVENT_XI2_MASK * DONT_PROPAGATE_MASK -> EVENT_DONT_PROPAGATE_MASK And don't undef them in dix/events.c, since they're supposed to be global. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 737562257e8ee30b1c438e5160a61fbb26ca609e Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 11:27:59 2011 +0000 Input: Actually send Xi 1.x DeviceStateNotify events When a client has selected for Xi 1.x DeviceStateNotify events, they should receive them when a DeviceFocusIn event is generated. The code to do this was there, but an incorrect test meant they were never being sent. The "type" passed in is the XI2 type, the XI1 type is in event.type. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit da39d57a20d4281fc4099e356645fef980290030 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 15 11:27:57 2011 +0000 Input: Store passive-activating key in CheckDeviceGrabs CheckDeviceGrabs will activate a passive grab for KeyPress and ButtonPress events. GrabInfoRec::activatingKey contains the keycode which activated the passive grab, so we can deactivate it later in ProcessOtherEvents. Previously, CheckDeviceGrabs relied on its callers to set activatingKey, which not all callers were doing (I'm looking at you, ComputeFreezes). Just set it in CheckDeviceGrabs instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3bbb70a1a7b24d3d1375b20a13db7011cf961c86 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 16 07:56:58 2011 +1000 xfree86: fix up an out-of-date comment. InitInput simply initialises all input devices now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 402b329c3aa8ddbebaa1f593306a02d4cd6fed26 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 23 13:35:54 2011 +0100 glx: Work around wrong request lengths sent by mesa mesa used to send too long requests for GLXDestroyPixmap, GLXDestroyWindow, GLXChangeDrawableAttributes, GLXGetDrawableAttributes and GLXGetFBConfigsSGIX. Fixes a regression introduced in ec9c97c6bf70b523bc500bd3adf62176f1bb33a4 X.Org bug#33324 <https://bugs.freedesktop.org/show_bug.cgi?id=33324> Reported-by: xunx.fang@intel.com Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 1137c11be0f82049d28024eaf963c6f76e0d4334 Author: Julien Cristau <jcristau@debian.org> Date: Wed Jan 26 13:06:53 2011 +0100 glx: fix BindTexImageEXT length check The request is followed by a list of attributes. X.Org bug#33449 Reported-and-tested-by: meng <mengmeng.meng@intel.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit a883cf1545abd89bb2cadfa659718884b56fd234 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 23 17:05:26 2011 +0100 glx: fix request length check for CreateGLXPbufferSGIX The request is followed by an attribute list. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 0f9c6f2f822ff53b9d12ff4fa0b26cbeb7394ba5 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 13 21:36:05 2011 -0800 xkb: Replace malloc(strlen) + strcpy with strdup Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 682865c460945e1299f943561140f46439e2b4cb Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 13 21:36:04 2011 -0800 XkbAddGeomProperty: Fix checks for malloc failure Check the variable we just tried to malloc, not the string we're copying and already checked for NULL at the beginning of the function. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit aac1b435664819008989ed19f73e9c89920602c5 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 13 21:36:03 2011 -0800 Replace _XkbDupString with Xstrdup The two functions have identical semantics, including safely returning NULL when NULL is passed in (which POSIX strdup does not guarantee). Some callers could probably be adjusted to call libc strdup directly, when we know the input is non-NULL. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a4a2e814d5d0e6152307a301eda1d6fc1c555aaa Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 13 21:36:02 2011 -0800 xkb: Use snprintf to measure string lengths instead of manual strlen math Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c9f7b303a36ca501c6ecf1196c266ee8e8f49d2d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 11 13:50:10 2011 +1000 xfixes: calloc, not malloc the cursorScreenRec Debugging NULL pointers is significantly easier than random memory. Plus, if new fields (such as pointer barriers) are added they may just be properly initialised. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit d3499556d8d83396fa2585bd00371a81e086be36 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 10 15:12:14 2011 +1000 xkb: if the keymap failed to compile, load the default keymap instead. We really need symbols, compat, keynames, vmods and types for a sensible keymap. Try this in your xorg.conf.d snippets for all keyboards: Option "XkbLayout" "us" Option "XkbVariant" "nodeadkeys" us(nodeadkeys) doesn't exist so xkbcomp provides everything but the symbols map. We say we want everything but don't _need_ anything, the server happily gives us a keymap with every key mapped to NoSymbol. This in turn isn't what we want after all. So instead, require symbols, compat, keynames, vmods and types from the keymap and if that fails, load the default keymap instead. If that fails too, all bets are off. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 47d1d2fed656c3a3b2600491078da90962c46934 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 10 15:11:34 2011 +1000 xkb: split out keymap compilation. Refactoring for simpler double-use in the next patch. No functional changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 787ba25a8a3af52b38448a1a6f8c9704ea8b7905 Author: Carlos Garnacho <carlosg@gnome.org> Date: Mon Feb 7 18:21:31 2011 +0100 Xi: make XIQueryPointer return the current modifiers/group as documented. The previous XKB info was being returned instead of the current one, producing inconsistent results between the latest events and the modifiers/group returned by this call. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>` Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 85f9017393c9bb19553e9afcf554673a44a09993 Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:10 2011 +0200 ProcXkbGetXkbByName: fix use of uninitialised bytes valgrind error. ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s) ==9999== at 0x4AB5154: writev (writev.c:51) ==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912) ==9999== by 0x61C8B: FlushClient (io.c:924) ==9999== by 0x62423: WriteToClient (io.c:846) ==9999== by 0xCE39B: XkbSendMap (xkb.c:1408) ==9999== by 0xD247B: ProcXkbGetKbdByName (xkb.c:5814) ==9999== by 0x4AB53: Dispatch (dispatch.c:432) ==9999== by 0x205BF: main (main.c:291) ==9999== Address 0x557eb68 is 40 bytes inside a block of size 4,096 alloc'd ==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467) ==9999== by 0x62567: WriteToClient (io.c:1065) ==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685) ==9999== by 0x4AB53: Dispatch (dispatch.c:432) ==9999== by 0x205BF: main (main.c:291) ==9999== Uninitialised value was created by a stack allocation ==9999== at 0xD1910: ProcXkbGetKbdByName (xkb.c:5559) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit 8a34d7a8532c7ca013e67307f3baf200167abb92 Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:11 2011 +0200 XkbSendNames: fix use of uninitialised bytes valgrind error. ==537== Syscall param writev(vector[...]) points to uninitialised byte(s) ==537== at 0x4AB7154: writev (writev.c:51) ==537== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) ==537== by 0x6C55F: FlushClient (io.c:924) ==537== by 0x6CCF3: WriteToClient (io.c:846) ==537== by 0xD51D3: XkbSendNames (xkb.c:3765) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Address 0x55899f2 is 154 bytes inside a block of size 1,896 alloc'd ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) ==537== Uninitialised value was created by a heap allocation ==537== at 0x4834C48: malloc (vg_replace_malloc.c:236) ==537== by 0xD47AF: XkbSendNames (xkb.c:3642) ==537== by 0xD8183: ProcXkbGetKbdByName (xkb.c:5825) ==537== by 0x27B7B: Dispatch (dispatch.c:432) ==537== by 0x205B7: main (main.c:291) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit 87fbef9157a6f1e1318382e368d27942d7ad72ab Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:09 2011 +0200 ProcRRCreateMode: fix use of uninitialised bytes valgrind error. ==543== Syscall param writev(vector[...]) points to uninitialised byte(s) ==543== at 0x4AB7154: writev (writev.c:51) ==543== by 0x8935B: _XSERVTransWritev (Xtrans.c:912) ==543== by 0x6C55F: FlushClient (io.c:924) ==543== by 0x6D013: FlushAllOutput (io.c:668) ==543== by 0x27A83: Dispatch (dispatch.c:453) ==543== by 0x205B7: main (main.c:291) ==543== Address 0x556dc8c is 12 bytes inside a block of size 4,096 alloc'd ==543== at 0x48334A4: calloc (vg_replace_malloc.c:467) ==543== by 0x6CE37: WriteToClient (io.c:1065) ==543== by 0x223A7: ProcEstablishConnection (dispatch.c:3685) ==543== by 0x27B7B: Dispatch (dispatch.c:432) ==543== by 0x205B7: main (main.c:291) ==543== Uninitialised value was created by a stack allocation ==543== at 0xA3350: ProcRRCreateMode (rrmode.c:289) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit 0ef5973860e17c5edc996c923610f7ad88b4dfbe Author: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> Date: Tue Feb 8 11:10:08 2011 +0200 ProcRRQueryVersion: fix use of uninitialised bytes valgrind error. ==9999== Syscall param writev(vector[...]) points to uninitialised byte(s) ==9999== at 0x4AB5154: writev (writev.c:51) ==9999== by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912) ==9999== by 0x61C8B: FlushClient (io.c:924) ==9999== by 0x62743: FlushAllOutput (io.c:668) ==9999== by 0x4AA5B: Dispatch (dispatch.c:453) ==9999== by 0x205BF: main (main.c:291) ==9999== Address 0x55711b9 is 1 bytes inside a block of size 4,096 alloc'd ==9999== at 0x48334A4: calloc (vg_replace_malloc.c:467) ==9999== by 0x62567: WriteToClient (io.c:1065) ==9999== by 0x452EB: ProcEstablishConnection (dispatch.c:3685) ==9999== by 0x4AB53: Dispatch (dispatch.c:432) ==9999== by 0x205BF: main (main.c:291) ==9999== Uninitialised value was created by a stack allocation ==9999== at 0x160E78: ProcRRQueryVersion (rrdispatch.c:37) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit 81daba8ce906bfbbe44cd71d0ff269ad34e2f6b5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 31 13:53:08 2011 +1000 Xi: constify XIChangeDeviceProperty() We don't modify "value", make it official. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com> commit 93cd4b1034e3c8bed32c5acd391eadd7605e10f0 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:27:00 2011 -0500 shadow: Remove hw/xfree86/ from includes Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 0c230728f3af2c4250e93a070c0851a597069447 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:25:57 2011 -0500 rootless: Remove hw/xfree86/ from includes Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 505defd270e49cfbcbe6a04d1de817d305edb3c2 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:24:20 2011 -0500 damage: Remove hw/xfree86/ from includes Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 59d8e3cbdba032c7354c28c86cbd155e9da6447a Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:23:07 2011 -0500 fb: Remove hw/xfree86/ from includes Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 994b7b3dc97f9afa713fe636af45a78002a4366f Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:17:52 2011 -0500 xfree86: warning fix Did you know that anonymous enums with function scope will not only override the enum values from global scope, but will be treated as entirely different types? C's type system just rules. xf86Crtc.c: In function 'handle_detailed_monrec': xf86Crtc.c:1555:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>' xf86Crtc.c:1562:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>' Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ae16c5796fdb22fb6b2f680fe5123bfd2c89a825 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:14:11 2011 -0500 fbdevhw: Remove the non-sysfs hack for mapping from PCI to fbdev It's broken for devices with BARs above 4G, and the sysfs method should work everywhere anyway. As a pleasant side effect, this fixes some warnings: fbdevhw.c: In function 'fbdev_open_pci': fbdevhw.c:333:4: warning: cast from pointer to integer of different size fbdevhw.c:334:4: warning: cast from pointer to integer of different size fbdevhw.c:336:4: warning: cast from pointer to integer of different size fbdevhw.c:337:4: warning: cast from pointer to integer of different size Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f1b7c9cead94b520e6b96774d605d63d3f341b50 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:09:19 2011 -0500 int10: warning fix helper_exec.c: In function 'pciCfg1in': helper_exec.c:507:4: warning: passing argument 2 of 'pci_device_cfg_read_u32' from incompatible pointer type /usr/include/pciaccess.h:153:5: note: expected 'uint32_t *' but argument is of type 'CARD32 *' Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit be186586e504197623c69637b8122fb814f59429 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 00:06:48 2011 -0500 xf86vidmode: warning fix xf86VidMode.c: In function 'VidModeGetMonitorValue': xf86VidMode.c:637:19: warning: 'ret.i' may be used uninitialized in this function Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f6e4ace9eabea1bb2a06dd86b6ffb954917a74ce Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 18 13:24:48 2010 +0100 Cygwin/X: Fix for Canadian Multilingual Standard keyboard layout handling Add a keycode mapping for VK_OEM_8 as RCtrl, which is issued by Canadian Multilingual Standard layout Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit b421f5e5122dbe125a5629969cc657bd966b4261 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Apr 1 23:10:58 2010 +0100 Cygwin/X: Ignore MappingNotify events sent to clipboard integration client Ignore MappingNotify events sent to clipboard integration client, xmodmap changes aren't of interest to it, but there is no mechanism to express that disinterest. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit e930aa7bbc7f04a128df8e6fd441aed5123a2eb6 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Sep 14 16:02:53 2010 +0100 Cygwin/X: Add Turkish keyboard layouts to keyboard layout mapping table 0x0000041f "Turkish Q" => layout tr 0x0001041f "Turkish F" => layout tr variant f Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit ae99a6f895a3a5b6f71e2dd4874cd4bb0235aff0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 18 13:42:29 2010 +0100 Cygwin/X: Make the keyboard layout detection logging a bit clearer Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 57ca09441ee5ff2a8deb95eaa17a2625a756d912 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Jul 1 14:54:48 2010 +0100 Cygwin/X: Update mapping for Canadian keyboard layouts 0x00000c0c "Canadian French (legacy)" => layout ca variant fr-legacy 0x00001009 "Canadian French" => layout ca variant fr 0x00011009 "Canadian Multilingual Standard" => layout ca variant multix Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit be3e5bb50178406e46368be00860331e1b6c4093 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Apr 14 21:45:29 2010 +0100 Cygwin/X: Better keycode debugging output Replace useless #if 0/ErrorF/#endif with winDebug Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 81892bf6b7e3730ebd19318183734f55dbaa5d4b Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Apr 14 21:34:39 2010 +0100 Cygwin/X: Generate X keycodes for multimedia keys Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 5d020c31351594c104fb46615ce41f256cd8e8b9 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Fri Jan 14 15:03:28 2011 +0200 xf86/xv: Only register PostValidateTree hook when there is work to do If none of Xv ports were affected by window tree modifications we don't want scan the port list. To avoid useless scanning of port list PostValidateTree hook is only registered when ClipNotify was called for any port. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit ddf32df5cc2e73b833f6e414276d938fdc38869e Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jan 13 20:50:16 2011 +0200 xf86/xv: Use PostValidateTree to do reput ValidateTree calls first ClipNotify and later might call WindowExposures. To avoid useless double reput ClipNotify delays reput to WindowExposures or PostValidateTree. PostValidatTree checks all ports if there is clip changes. On clip changes reput is done to move or scale the overlay. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit 5678a41f6bc0ef8965bd50a88c5ef01ba7eb8b24 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Jan 17 16:58:00 2011 +0200 xf86/xv: Fill color key on expose If window gets exposed but clipboxes doesn't change drivers would avoid color key fill. This makes XResizeWindo&co to lose colorkey if background is painted. To help drivers to avoid filling colorkey for each put server can provide helper function if there is exposed areas. Server can subtract exposed areas from filled region. As a side effect we can avoid useless color key fills if window only moves in screen without background fills. v3: * Change tracking to filled area to account for client initiated clip changes * Make overlaid XvPutImage behavior like textured XvPutImage or PutImage * Make region dynamically allocated only when required. v4: * Simplify new driver interface to reduce duplicate code Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit 9b048ca420864e19862f63f4a491a4da0ff9b54f Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Jan 17 15:07:28 2011 +0200 xf86/xv: Remove unused variable from XvPortRecPrivate Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit 4f8f803280894a8c41691e350b7a34bfd719fe05 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jan 13 20:21:09 2011 +0200 xf86/xv: Remove unused GC pointers Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit e012f2312b4bcdf31bb5d622ddd34571f3c12429 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jan 13 20:19:18 2011 +0200 xf86/xv: Remove copy paste code. xf86XVFillKeyHelperDrawable can be used to implement xf86XVFillKeyHelper. V2: * Remove RegionTranslate that clobbered parameter region. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com> commit ea1ffd3e60bdcedbec5a6f28929f8677bf45d450 Merge: 12b0f7df2 53602c362 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 2 15:19:55 2011 -0800 Merge remote branch 'whot/for-keith' commit 12b0f7df2caa78d68b453aaa91248bb3577fd724 Author: Evan Broder <ebroder@mokafive.com> Date: Tue Feb 1 16:09:50 2011 -0800 xfree86/modes: Be sure to only use new EDID for physical output dimensions The EDID processing regards physical dimensions of 0mm x 0mm as invalid. Previously the old values for height and width would be preserved if none of the physical dimension specifications in the new EDID were considered valid. This will come up in particular if first a monitor is connected to an output, and then a projector is connected. Since projectors generally report physical dimensions of 0mm x 0mm, this would result in the projector claiming to have the physical dimensions of the monitor. Signed-off-by: Evan Broder <ebroder@mokafive.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0b15033031d78836582bd1b641c3160c3803a708 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Mon Jan 31 23:25:10 2011 +0100 xserver: enable TLS even if AIGLX is not enabled This aligns the xorg server build with the mesa build, which is needed on systems where aiglx with dri support is not enabled. Else the following error is obtained when trying to load the software raster: (EE) AIGLX error: dlopen of /usr/lib/dri/swrast_dri.so failed (/usr/lib/dri/swrast_dri.so: undefined symbol: _glapi_tls_Context) (EE) GLX: could not load software renderer (II) GLX: no usable GL providers found for screen 0 because mesa always enables TLS use in GLX, even if dri is not available. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 541b25038a5de74411a094570b407c5ae018c2ba Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Jan 30 14:06:16 2011 +0100 exa/mixed: Exclude frontbuffer from deferred pixmap handling. - Apps like xterm can trigger a lot of fallback rendering. - This can lead to (annoyingly) high latencies, because you have to wait for the block handler. - You need a driver that doesn't directly access the front buffer to trigger this (NV50+ nouveau for example). - Repeatingly doing dmesg on an xterm with a bitmap font will reveal that you never see part of the text. - I have recieved at least one complaint in the past of slow terminal performance, which was related to core font rendering. - This does sacrifice some throughput, roughly 33% slower. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit af87f6367ef733d1a4f3cfca4eeb92bfd84c2b6f Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Jan 30 14:06:15 2011 +0100 exa: Only call driver FinishAccess hook if PrepareAccess hook succeeded. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 648d4fe5172cad33c6f09e05dd3d8d7171ef1a7f Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Jan 30 14:06:14 2011 +0100 exa/driver: set pExaPixmap->use_gpu_copy to the right value - Not sure if it was causing problems, but you never know. Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 246d40b685292fa6393ba22127152137494af2af Merge: 70f2d39fb 8c1f75a1d Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 2 14:51:33 2011 -0800 Merge remote branch 'jeremyhu/master' commit 70f2d39fbde38d0baa687f1755b6c4c686f23052 Merge: 3a91c2d21 a9d3c43a5 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 2 14:43:19 2011 -0800 Merge remote branch 'jturney/master' commit 3a91c2d21c3231e2a011d95c3cfc01785430c1cf Merge: ac0a00a84 82b1eaa6c Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 2 14:37:00 2011 -0800 Merge remote branch 'dbn/build-fixes' commit ac0a00a840a5d8d8374e5db2b849e5959550ca4e Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 23:01:03 2011 -0500 xselinux: Fix GetDrawableContext M_DRAWABLE_PIXMAP is the lookup mask to dixLookupDrawable, and _not_ the type value in the drawable itself. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8c1f75a1d4cb5a34b4d10f3f5068bccc4356f31a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Jan 28 21:13:38 2011 -0800 XQuartz: Localization Updates Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 53602c36217487e0a80880e8328f89ab302d85c8 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:49 2011 +0200 xfree86/dga: Remove DGAIsDgaEvent() DGAIsDgaEvent() is not used anymore. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2081728b7432e949c274e0dbbabc296fa4db17f9 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:48 2011 +0200 xfree86/dga: Only send DGA events for master devices Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f09b62e594321a8e45a33f4f13559827d660ed3 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:47 2011 +0200 xfree86/dga: Remove useless ifdefs Move some variables to the scope where they are used. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5c941c04ca68cdc2b236c524970bc23f91906af4 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:46 2011 +0200 xfree86/dga: DGAProcessKeyboardEvent() forgot ET_Internal Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit ce4e0f660beb097e90110c97d039981702f0b0bd Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:45 2011 +0200 xfree86/dga: Remove DGAMouseX and DGAMouseY Previously some sort of absolute coordinates were sent out in the padding of the DGA2 Motion and Button events. DGAMouseX and DGAMouseY were used to keep track of said coordinates. libXxf86dga doesn't use that data for anything, and at least git history didn't show any past usage either. So let's just remove the last remnants of of this mess. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit ee8faeadb60f51a36edce19e568600dab7c8b357 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:44 2011 +0200 xfree86/dga: DGA2 events are missing the dx/dy information Copy dx/dy from the internal event to the DGA2 Motion/Button events. Do the same for Key events for the sake of keeping the code consistent. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit e3fef815cf85cf59256f3edeaa21c1267898b42c Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:43 2011 +0200 xfree86/dga: Make mieq_install Bool mieq_installed is used as a boolean, so why not make it such. Also it's a static variable, so the the explicit zero initialization can be removed. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit f4cb25c2ed832bf4cfcd4d25198fe5a895430fed Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:42 2011 +0200 xfree86/dga: Remove the ET_DGAEvent handler only if it was installed Remove the handler only if it was installed. Also mark it as uninstalled, otherwise it wouldn't get reinstalled after a server reset. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit e1547a9f1f6d7991219b7711f4cacc2852dbf88c Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:41 2011 +0200 xfree86/dga: Install the DGA event handler when DGA2 is used The ET_DGAEvent handler is only installed when a client requests relative events via DGA1. Do it also when a client requests DGA2 events. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7b16e8633d5a95167aac0c19e43fcfe38bd4a6a4 Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:40 2011 +0200 xfree86/input: Restore DGAStealKeyEvent() DGA key event support was lost in commit 8da0ff2d51086666d10ca7330d428e8610a4a0e3. Bring it back. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit a2c481821997ae14aa5816895ae36db2ca2e4dec Author: Ville Syrjala <syrjala@sci.fi> Date: Mon Jan 24 01:06:39 2011 +0200 include: Fix a copy/paste error in a comment Signed-off-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 77af0dc5217fc9c446097d6d487c8ddaf00bdd2a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 24 10:06:34 2011 +1000 xfree86: bump input minor ABI The new valuator_mask_free() call requires a minor bump. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5927e070b45fbe3fea4b394920ffd6f7d036f1ed Author: Erkki Seppälä <erkki.seppala@vincit.fi> Date: Fri Jan 21 15:56:22 2011 +0200 xkb: Cancel a key's repetition when its autorepeat is disabled. When XkbChangeEnabledControls is called to disable key repetition of a certain key (or keys), currently ongoing repetition of that key was not cancelled. It was cancelled if ChangeKeyboardControl was used to disable key repetition globally. Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a9d3c43a57cbaf42d9e96ad49cf12bbf1d275fe5 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jan 19 15:57:59 2011 +0000 Fix compilation of xf86bigfont.c xf86bigfont.c: In function 'XFree86BigfontExtensionInit': xf86bigfont.c:146: error: 'ProcXF86BigfontDispatch' undeclared (first use in this function) xf86bigfont.c:147: error: 'SProcXF86BigfontDispatch' undeclared (first use in this function) It seems this has been broken since commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e "delete pervasively use of DISPATCH_PROC" (2010-09-28), which is a bit worrying as that presumably indicates that no tinderbox is configuring with --enable-xf86bigfont. In a similar fashion to that commit, fix by moving XFree86BigfontExtensionInit() below the definitions of the static dispatch functions it references. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> commit effaf9459c450f13e35bf263835d3e37d48ff29d Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Jan 23 22:35:34 2011 -0800 XQuartz: Use the default signal handler This allows better interaction with CrashTracer Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 418bb57a3923311338baa8a85c0794a72e15ceeb Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jan 13 17:12:17 2011 -0800 XQuartz: Call RRScreenSizeNotify after handling externally-generated XP_EVENT_DISPLAY_CHANGED We get an XP_EVENT_DISPLAY_CHANGED event when our display configuration is changed. If this change was caused by hotplugging a monitor or Mac Display Preferences changes by the user, we need to call RRScreenSizeNotify in order to ensure new connections get the correct screen size. http://xquartz.macosforge.org/trac/ticket/460 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6f52b10b9e8068e3deafb2bbb64b62175a208c49 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jan 13 16:08:46 2011 -0800 XQuartz: Bump version string to 2.6.1 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 1cfb96dd6151ebe84a9a26a428005db97e5d5577 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jan 13 16:08:29 2011 -0800 XQuartz: Update copyright dates in bundle's plist Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit be3be7580b6f6fd2f7fa4d4abfe5e1ab19470223 Merge: 57a1d9b85 a1d885fdd Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 20 21:21:21 2011 -0800 Merge remote branch 'ajax/for-keithp' commit 57a1d9b85331f6fe19d5111f5163139572ffbf02 Merge: 24ce650cf 642376979 Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 20 21:16:24 2011 -0800 Merge remote branch 'whot/for-keith' commit 24ce650cf4f0c6fa72faecd38c53d40703e6c959 Merge: bbdf81a05 09fd01090 Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 20 21:11:53 2011 -0800 Merge remote branch 'jturney/jturney-framebuffer-resize-for-master' commit bbdf81a056be0ea645da17a642dad5eadef3a906 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Jan 18 19:26:20 2011 -0800 Add xorg.conf.d shadow man page pointing to xorg.conf man page Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Tested-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a1d885fdd67503a442b348626d2eddf6d22419e8 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 23 13:28:55 2010 -0400 resource: Fix indentation Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit cb61cf5c99004ba3c76b504220c6728b5f2d2de6 Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 15 18:36:55 2010 -0400 resource: Remove expectID hack This is clearly meant to short-circuit the (modestly) expensive resource lookup in LegalNewID. The problem is that long-lived clients will eventually run completely through their XID space and start asking XC-MISC for IDs to reuse. Once that happens, the comparison against expectID will always be true, and we'll no longer catch XID collisions at all. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3282e3c627f97f079e3a9af756a6b13bd9a5f227 Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 15 08:46:28 2010 -0400 resource: s/NullResource/NULL/g Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f953ae7d8a578d135a6faaf69d9c06eae7c85ede Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 14 14:38:10 2009 -0500 os: Reduce smart scheduler setup calls We can return from WaitForSomething with no clients ready for any number of reasons. There's no reason to set up the scheduler timer when this happens. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d127075da06239852c1cc745abfe63d0d180d984 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 19:03:33 2011 -0500 xdmxconfig: warning fix xdmxconfig.c: In function ‘dmxConfigCanvasDraw’: xdmxconfig.c:299:23: warning: ‘maxHeight’ may be used uninitialized in this function Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7a08f9abef7219fabdab8d1d49e8d3afb042e36a Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 18:59:39 2011 -0500 dmx: warning fixes dmxinputinit.c: In function ‘dmxBlockHandler’: dmxinputinit.c:610:44: warning: cast from pointer to integer of different size dmxinputinit.c: In function ‘dmxWakeupHandler’: dmxinputinit.c:637:41: warning: cast from pointer to integer of different size dmxinputinit.c: In function ‘dmxInputInit’: dmxinputinit.c:1041:36: warning: cast to pointer from integer of different size Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ffd323b7c0212ed9b348e51cd9b36363d7c4d1f2 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 18:55:20 2011 -0500 dmx: warning fix dmxinputinit.c: At top level: dmxinputinit.c:135:29: warning: ‘DMXCommonOth’ defined but not used DMXCommonOth is actually mentioned in a #if 0 block, so delete it and the block that references it. If anyone needs it, git remembers. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit c1fe0b155d0567440228aa5d9e36036f37670e3b Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 18:52:57 2011 -0500 dmx: warning fix dmxgc.c: In function ‘dmxChangeClip’: dmxgc.c:386:5: warning: case label value exceeds maximum value for type dmxgc.c:387:5: warning: case label value exceeds maximum value for type dmxgc.c:388:5: warning: case label value exceeds maximum value for type dmxgc.c:389:5: warning: case label value exceeds maximum value for type Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit b02e006b2733ea457df41791f6054309e4edf7f6 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 20 18:46:00 2011 -0500 dmx: warning fixes Dear gcc: I do not care about machines where sizeof(void *) < sizeof(int), and neither should you. dmxextension.c: In function ‘dmxBECreateResources’: dmxextension.c:858:26: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxBERestoreRenderPict’: dmxextension.c:1062:29: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxBERestoreRenderGlyph’: dmxextension.c:1084:35: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxAttachScreen’: dmxextension.c:1277:8: warning: cast to pointer from integer of different size dmxextension.c:1286:34: warning: cast to pointer from integer of different size dmxextension.c:1292:35: warning: cast to pointer from integer of different size dmxextension.c: In function ‘dmxBEDestroyResources’: dmxextension.c:1456:26: warning: cast from pointer to integer of different size dmxextension.c: In function ‘dmxDetachScreen’: dmxextension.c:1599:8: warning: cast to pointer from integer of different size Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 64237697994871adfcf4905b5784e75cd7281579 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 13 12:20:38 2011 +1000 xkb: after making changes to the xkb ctrls, copy them back into kbdfeed. enabled_ctrls_changes nowhere near the usual event or config paths. So this condition always evaluated to false and the memcpy would thus never been hit. As a result, any modification to the XKB struct during XkbUpdateDescActions was not reflected in the kbdfeed ctrls. The flag that is set by XkbUpdateDescActions() if ctrls were changed are in enabled_ctrls. This mainly affected keyboard repeat control as XKB uses the kbdfeed ctrls, not XKB's per_key_repeats, to determine if a key needs to be repeated. Thus, adding a "repeat= False" to the XKB map of any action did not have any effect. Test case: assign Mode_switch to any key that by default repeats, e.g. the menu key. key <COMP> { [ Mode_switch ] }; Then modify the Mode_switch action to not repeat the key. interpret Mode_switch+AnyOfOrNone(all) { virtualModifier= AltGr; useModMapMods=level1; action= SetGroup(group=+1); // Add this line repeat= False; }; Though the flags are correctly reflected in the description loaded in the server, the change is not handed back to the kbdfeed struct and XKB will trigger softrepeats of this key. This patch also adds two explanatory comments and an extra check, as this path may be hit before the CtrlProc for the kbdfeed struct is set. Red Hat Bug 537708 <https://bugzilla.redhat.com/show_bug.cgi?id=537708> Also fixes broken auto-repeat of the backspace key in the colemak layout (mapped to CapsLock). X.Org Bug 16318 <http://bugs.freedesktop.org/show_bug.cgi?id=16318> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f1326ed2910bd985fafdb48714b1d6f38116b083 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 13 09:19:28 2011 +1000 xkb: Replace a few manual bitflips with SetBit & friends. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dirk Wallenstein <halsmit@t-online.de> commit 16eb4f2a7b67ee169785973f9e0a3773e13fdea6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 7 09:53:35 2011 +1000 Xi: reset remainders when warping the device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 09fd010902fad56735b8069b1becb80d85bd6a35 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Sep 29 22:54:22 2010 +0100 Cygwin/X: DirectDraw engines shouldn't try to blit if the surface wasn't allocated Fix winShadowUpdateDD(|NL) so we don't try to blit to primary surface if it didn't get allocated (Intel drivers, in particular, seem to like to issue a WM_DISPLAYCHANGE during a suspend/resume cycle, but not allow surface to be allocated right then) Also: Use winReleasePrimarySurfaceShadowDD(|NL) in winFreeFBShadowDD(|NL) rather than open coding it Don't mess about recreating surface if we're going to resize it anyhow Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 625ab9701fd75b879c1dafc05fa979591eea87c0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 31 13:45:43 2010 +0100 Cygwin/X: Simplify and consolidate reporting of the bpp value we are going to use Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 3f7339a7c5d3dcd05909b041865125f4cb6fa29e Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 31 10:13:01 2010 +0100 Cygwin/X: Deal with RANDR depth changes correctly in ShadowGDI drawing engine Make ShadowGDI drawing engine only change the size of the screen pixmap/shadow framebuffer on an RANDR change, not the bpp/depth as well. The server requires the screen pixmap's depth to be invariant. Other drawing engines aren't quite as affected by this issue as they won't draw to the display, if it has changed colour depth, but probably still need some attention. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 8b22f83113fbdc09b932b5ad7e44f629fc15e3b5 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Aug 30 17:17:57 2010 +0100 Cygwin/X: Use winUpdateFBPointer() in winshaddd.c rather than duplicating it inline Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 8385c426f86e9955e9e570a46f75bddd3c10ca01 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 10 21:55:15 2010 +0100 Cygwin/X: Remove WIN_DIB_MAXIMUM_SIZE check This is only relevant to pre-NT versions of Windows, which are all EOL. Also, it's in the wrong place now as framebuffer can get resized. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 981ad1f364cf4fe8008c0f3592eb0f73dd14a118 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 10 16:24:57 2010 +0100 Cygwin/X: Fix a typo in command line argument validation code Fortunately, these swapped constants are benign as they have the same value, 0 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 5390b494672393506466d8afdb9b146b0e585cc0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 10 13:16:13 2010 +0100 Cygwin/X: Don't turn off -multiplemonitors when all monitors don't have the same pixel format when using shadow GDI engine Don't turn off -multiplemonitors when all monitors don't have the same pixel format and when using shadow GDI engine, just warn that performance may be degraded Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 33106e1e807a828208b306512e78c5e3e93960d3 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Mar 30 19:49:41 2010 +0100 Cygwin/X: Generate RANDR change on WM_DISPLAYCHANGE for rootless modes When RANDR resizing is enabled, generate an internal RANDR change when WM_DISPLAYCHANGE occurs in rootless modes for screens which occupy an entire monitor or the virtual desktop. Store the monitor number and use that to handle WM_DISPLAYCHANGE for a screen specified with '-screen @monitor' In rooted mode, WM_DISPLAYCHANGE isn't relevant (except where display depth changes may cause problems). (A maximized screen window will get WM_SIZE to adjust it to the new monitor size) In rooted fullscreen mode, WM_DISPLAYCHANGE shouldn't be seen, as we have the resolution we have selected for the fullscreen session) (Could client randr requests be handled in fullscreen to cause a change of the fullscreen resolution? ) Don't bother do a RANDR resize if the dimensions aren't actually changing when WM_DISPLAYCHANGE is sent (should handle WM_DISPLAYCHANGE to size 0x0 that the intel driver seems to like to send) Various debug output improvements Also, remove the note that XWin can't handle display mode changes from the man page Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit bbc511e80b2a9365f6a1528bc1595772f83be654 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Feb 15 13:42:04 2010 +0000 Cygwin/X: Make WM_SIZE use RandR resizing when -resize=randr To avoid recursion, WM_SIZE requests shouldn't generate XRANDR requests when no change is neeeded. We do the actual resize on WM_EXITSIZEMOVE, as resizing occurs in a modal loop, to avoid a backlog of resize events building up as the X server doesn't get a change to process anything until the resize is completed. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 85c497a8b6c488ef9ea2c6d7b49e6f9b992fb4a2 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Mar 30 20:48:10 2010 +0100 Cygwin/X: Implement framebuffer resizing in RANDR extension Implement framebuffer resizing in RANDR extension: Resize the frame buffer, the screen's root window and the native window containing the root window image. Correctly allow for decorations in new native window size when resizing native window to fit the new framebuffer size with AdjustWindowRectEx() Update physical size info for a screen when it is changed by RANDR Forbid client-requested RANDR changes in fullscreen and rootless modes Only resize window on an external RandR request, to avoid recursing on a WM_SIZE requested resize. Also, add prototypes for winRandRInit() and winDoRandRScreenSetSize() to header file Also, update the author list and copyright for winrandr.c Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 873abef315f5d947b864428891381bff539c5869 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Mar 30 20:07:19 2010 +0100 Cygwin/X: Add -resize command line option Add -resize command line option to configure how native window sizing frame is used. In additions to the existing fixed and scrollbars modes, add a new mode to allow framebuffer to be resized using native window frame Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 46c57788539d8a5f0246528b4f88ad4ed6d867d1 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Feb 23 15:44:36 2010 +0000 Cygwin/X: Move QueryMonitor() out of windprocarg.c Move QueryMonitor() out of windprocarg.c into a new file, winmonitors.c, as we use to use it from other places as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 73b02e964787ea9fb2d139dc781c9b2495ccb031 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Feb 12 12:29:30 2010 +0000 Cygwin/X: Remove an attempt at detecting if WM_DISPLAYCHANGE affects the X screen Remove an attempt at the rather difficult optimization of detecting if WM_DISPLAYCHANGE affects any of the monitors which intersect the native window for the X screen. We'll always act as if it does, which it probably usually the case. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit a46146af5f6c2d96728c43f0df369ea00bcae017 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Apr 1 21:00:43 2010 +0100 Cygwin/X: Rather than storing calculated physical display sizes, calculate them when needed (This stored calculation was wrong if -dpi came after -screen on the command line, anyhow) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit df518001271dbc0c49935350b755f0c0562cdb92 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Oct 13 14:47:33 2009 +0100 Cygwin/X: Refactor framebuffer allocation/release in drawing engines Refactor the drawing engines so we can explicitly allocate and release the framebuffer for a screen Move the setting of dwPaddedWidth into the DDNL engine, so it is updated when the framebuffer changes size Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit 708d0b9781c6f3f0c0ae7052f45223b1c2524809 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Oct 13 14:48:17 2009 +0100 Cygwin/X: Enable building of nativegdi and primaryfb engines to avoid further rusting Some trivial build fixes required Also fill out all function pointers for primaryfb engine Also tidy up the man page section describing drawing engines. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit c6aa4755ec355101a62bef86dbb090262fe806f6 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jan 15 12:13:39 2011 -0800 xkb/ddxLoad.c doesn't need <paths.h> any more Was previously used for _PATH_VARTMP, but that was removed in 534fc5140b039a8c98ab715d0a6740d513b41209 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit abfea17342da774aa4e3a351a73c8f2af6e6fd28 Merge: 361128389 e65c3f8bc Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 18 15:19:34 2011 -0800 Merge remote branch 'ajax/for-keithp' commit 361128389e5cb0101cbd091ff8de77cf34608f6c Merge: 65ceaadbf d9225b960 Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 18 15:18:08 2011 -0800 Merge remote branch 'jcristau/for-keith' commit 65ceaadbf0fb65f1962cb96d5b87fd1175f85a3b Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:31 2011 -0500 Xquartz: rename man page directory from doc to man Following the convention makes it easier to locate man pages, user's or developer's documentation and specifications. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7ed0d426f616fe9e44ac7091622a798f2043dfe4 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:30 2011 -0500 xfree86: use sed rather than cpp to perform string substitutions Makefile.am: there are only 4 string substitutions to be done in this file. SED is much simpler than the C pre processor which adds its own strings which must be substituted by sed, still. xorgconf.cpp: replaced __xconfigfile__ with xorg.conf as this file name is hard coded in the xserver configuration and cannot change. Replace XCOMM with # permanently. Delete cpprules.in as it isn't used anywhere else. Should one need cpprules for real cpp work, there is one in Xquartz from which the the old man pages code have been stripped. Fix trailing spaces. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 885a3330092c13786baa3aaabd728e71962486c4 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:29 2011 -0500 man: refactor common code in the man pages makefiles Create a manpages.am makefile snippet in the root dir. Each man page makefile includes manpages.am. Now all man pages in xserver are generated the same way using the same method as all of other xorg modules. All ".man.pre" files in git are ".man" now. Links are no longer created between different file types. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit c86f7c2b8eedd3126066a3aff44bc8767eb5e277 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:28 2011 -0500 Xdmx: build all man pages using XORG_MANPAGE_SECTIONS Use standard directory and makefile. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9bd9d550a0d6fb4fe3daacb604658de92e69d99c Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:27 2011 -0500 exa: build man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Fix trailing whitespaces Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d4b1fd3ff66d1a3e44a85aed34d9a01eee0d37fd Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:28:26 2011 -0500 fbdevhw: build man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Fix trailing whitespaces Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit b9276cb86b433bc740fe26c2e624d3d5399732f6 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:53 2011 -0500 XFree86 utils: build utils man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Fix trailing whitespaces Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit ac5ffef60e05eb05275913b133786709881e7e7e Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:52 2011 -0500 Xephyr: build Xephyr man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Fix trailing whitespaces Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9240cffd659b1c13d66162200c6e384ea1cdbc44 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:51 2011 -0500 Xvfb: build Xvfb man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Fix trailing whitespaces Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 3f4c71799b3164440624d09b7b631d3d3c0a29ef Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:50 2011 -0500 XWin: build XWin man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Now can be built easily on any platform in the man directory Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit b8492e18a7e5322c4a492f6cf6cfeb5b0221d994 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:49 2011 -0500 Xnest: build Xnest man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 57ca20d26614a0787cdd0db91a2eb8cdb301f2dc Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:48 2011 -0500 Xquartz: strip the man page code from cpprules.in This is dead code which will not be used in the future. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit c06c46acdc2ead20a6030118fad6092b3da6709f Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:47 2011 -0500 Xquartz: build Xquartz man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) Use standard directory and makefile Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit a9e85013b1045c7e02891a019bfa8042a219b7f1 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:46 2011 -0500 man: build Xorg and xorg.conf man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file extensions (.man) means no need for .gitignore Use standard directory and makefile Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit dcdd8ea82c0e2f657abdc80a22aa0c01ead07e54 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jan 9 20:27:45 2011 -0500 Xorg.man: fix whitespace issues Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d9225b9602c85603ae616a7381c784f5cf5e811c Author: Julien Cristau <jcristau@debian.org> Date: Wed Nov 10 22:39:54 2010 +0100 glx: validate numAttribs field before using it Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 62319e8381ebd645ae36b25e5fc3c0e9b098387b Author: Julien Cristau <jcristau@debian.org> Date: Sun Aug 22 16:20:45 2010 +0100 glx: swap the request arrays entirely, not just half of them Various glx requests include a list of pairs of attributes. We were only swapping the first half. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 6c69235a9dfc52e4b4e47630ff4bab1a820eb543 Author: Julien Cristau <jcristau@debian.org> Date: Sun Aug 22 00:50:05 2010 +0100 glx: check request length before swapping Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit ec9c97c6bf70b523bc500bd3adf62176f1bb33a4 Author: Julien Cristau <jcristau@debian.org> Date: Sat Jul 3 19:47:55 2010 +0100 glx: validate request lengths Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 3f0d3f4d97bce75c1828635c322b6560a45a037f Author: Julien Cristau <jcristau@debian.org> Date: Sat Jul 3 19:42:26 2010 +0100 glx: make sure screen is non-negative in validGlxScreen Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 82b1eaa6cad20f39dbf15573bdb3d62acbcd91f9 Author: Tom Fogal <tfogal@alumni.unh.edu> Date: Wed Dec 22 14:39:48 2010 -0700 Autodetect TLS support instead of defaulting to disabled. Uses the AX_TLS macro to figure out if the current platform supports TLS. If it does, enable TLS automagically. Still respects --enable option, regardless. Signed-off-by: Tom Fogal <tfogal@alumni.unh.edu> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 93393411e39fbb0f72cf6c2f79ebde177aa86932 Author: Tom Fogal <tfogal@alumni.unh.edu> Date: Wed Dec 22 16:03:03 2010 -0700 Add macro for detecting thread local storage support. This adds an AX_TLS macro which attempts to identify if the underlying compiler/platform supports thread local storage (TLS). The macro comes from the autoconf macro archive. Signed-off-by: Tom Fogal <tfogal@alumni.unh.edu> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 60801ff8703ec36995139a6dd7b1fc26ae8854a6 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Nov 23 11:38:50 2010 -0800 xfree86: Convert libxf86config to static libtool library In order to use libxf86config in a shared library, all the code must be compiled with -fPIC. Add proper PIC support for libxf86config by turning it into a libtool library. However, since we don't want to guarantee API or ABI stability, make sure it's only built static. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> commit 8456625d64bb0013a496f3b56ea3aa20cf7a6142 Merge: aa30a8658 ce74e7562 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 7 09:35:07 2011 +1000 Merge branch 'for-peter' of git://people.freedesktop.org/~daniels/xserver into for-keith commit aa30a86583c3fc1a83c46e8c7583182d750edcde Author: Tomas Carnecky <tom@dbservice.com> Date: Sun Aug 1 21:28:18 2010 +0200 NO_PANORAMIX preprocessor symbol is nowhere defined Which makes it useless, so remove it. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fc6cbee772bafabf7ddd7a75043bd55bb78ad09e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 6 12:58:00 2011 +1000 input: add valuator_mask_free() to free a valuator mask. Expecting the caller to free the mask requires us to keep it in a single memory block (which may be an issue lateron), aside from leaving the API asymetrical. Provide valuator_mask_free() to free the memory and reset the mask pointer to NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 4fbadc8b17237f3c7f8c0bf56003d1139c86655e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 6 11:32:26 2011 +1000 Input: Prevent MD grabs from wandering on to other MDs The code to set sync.other in DeliverGrabbedEvents is supposed to reset sync.other for a paired MD to the grab under consideration, but was rather optimistic in resetting sync.other for _all_ devices. This would fall apart given two sets of MDs (A paired with B, Y paired with Z), where both MDs were in FREEZE_BOTH_NEXT_EVENT due to being called with SyncBoth, where no event had yet triggered the grab. An event being processed on MD A would result in B, Y and Z all having sync.other set to A's grab, rather than just B. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e65c3f8bcc86845f21ac575e2bfb4b21b67d5ebf Author: Adam Jackson <ajax@redhat.com> Date: Wed Jan 5 12:04:19 2011 -0500 dix: Add a Screen method for additional cursor confinement This just reserves the slot in the ABI. Confining cursors to CRTCs will come soon. v2: Just reserve the slot. Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ce74e7562dcc800306ff92b6d3c5ee885cd4763d Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 7 11:48:14 2010 +0000 Input: Make CheckPassiveGrabsOnWindow return grab, export Change CheckPassiveGrabsOnWindow to return the GrabPtr it used (or NULL if none) rather than a boolean, and export it. Also add an additional boolean 'activate' parameter; use TRUE for existing behaviour, or FALSE to only find the grab and then return it. This will be used in forthcoming touch patches to find the grabs, rather than open-coding same. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit eb5aaf5eb819f1287ce40da79edbe07bafb2b5c0 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 12:15:28 2010 +0000 Input: Export GetEventMask Make it non-static, add to headers. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 30c8c7a86310139e79c9698caee21b3bd51936bd Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 12:13:29 2010 +0000 Input: Handle grabs with no Xi 1.x equivalent Don't try to search for an Xi 1.x grab in CheckPassiveGrabsOnWindow for events with no Xi 1.x equivalent. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 690476250f58616d5156317e01ba547497f4331a Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 20 15:03:05 2010 +1000 Input: Pass sprite instead of device to XYToWindow, make non-static XYToWindow calculates the position of the cursor and updates the sprite trace, but does nothing else with the device. Pass a SpritePtr instead so we can update an alternate focus instead of hardcoding the device's sprite. Also make this function non-static, so we can use it elsewhere. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 07a892cd8276f8092de95f1909f2ebec6f5fdf08 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 20 15:03:04 2010 +1000 Input: Pass sprite instead of device to FixUpEventFromWindow Since FixUpEventFromWindow only uses the sprite trace to determine the window stack, pass in a sprite instead of hardcoding the device sprite, so we can deliver to windows other than the one currently containing the sprite. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 10d6c3ca103ea155488cd2f29052334b5691e680 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Dec 27 13:06:03 2010 +0000 Input: Make RootWindow() take a sprite instead of device GetCurrentRootWindow already works for the device case, although not as an lvalue. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 23c37ce1fe42e3da0609a566478e947843b05023 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Dec 27 12:48:42 2010 +0000 Input: Export SpriteRec for use in public API Change its definition to be more in line with other structs, so we can use it from input.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 06a103ad1d6a0ef6146c97a8c81dc7de1c0a0083 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 16:37:48 2010 +0000 Test: Input: Test up to supported server, not protocol, events When building against a newer inputproto, the server may support fewer than XI_LASTEVENT events. We already have XI2LASTEVENT for the highest event number supported by the server, so use that instead. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit a083efe8715e8b29c9bd7f4e7bb429a94620bfc4 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 16:06:29 2010 +0000 Test: Input: Check flags on DeviceEvent Add initial validation of acceptable flags for XI2 device events, and make sure they're swapped. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 2592effef5f171af3f01a2b5130d9747403140f6 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 13:42:06 2010 +0000 Test: Input: Add helper function for failing EventToCore We have quite a few tests which involve checking that EventToCore fails for specific events, so refactor them into a separate function. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit e1aed88be92c27d76bff1743f35f9915dea9264f Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 17:00:29 2010 +0000 Input: Swap flags in DeviceEvents Swap flags for different-endian clients when delivering XI2 DeviceEvents. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 6358a60065eef167d4e5f4afd981ff26deeba80d Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Jan 6 09:55:41 2011 +0100 EXA: Pad size of system memory copy for 1x1 pixmaps (bug #32803). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=32803 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f3480286aeb3009623d8d4b0202eadda0049552d Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:09 2011 +0200 composite: Support updating an arbitrary subtree Rename compUpdateWindow to compPaintWindowToParent and split the child walk to compPaintChildrenToWindow. Calling compPaintChildrenToWindow allows an arbitrary subtree to be updated, instead of having to update all the windows. This will be used to make sure all the descendants are copied to the parent when the parent window contents need to be accessed in IncludeInferios sub-window mode. WindowRec has a new member 'damagedDescendants' that is used to keep track of which subtrees need updating. When a window is damaged, 'damagedDescendants' will be set for all the ancestors, and when a subtree is updated, the tree walk can be stopped early if no damaged descendants are present. CompScreenRec no longer needs the 'damaged' member since the root window's 'damagedDescendants' provides the same information. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b89e6dbdfbb50e3b5bc7fcb7eccc397c467c92f8 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:08 2011 +0200 composite: Add SourceValidate wrapper When SourceValidate is performed on a window with IncludeInferiors sub-window mode, force an immediate update of all the automatically redirected windows, so that the current window contents will be up to date. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 84154954db54696d4661eb8d0a6014cdbff3c91f Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:07 2011 +0200 composite: Add GetImage wrapper When GetImage is performed on a window, force an immediate update of all the automatically redirected windows, so that the current window contents will be up to date. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit a5dc3531e14589ac473cea482944d2d67517aabd Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:06 2011 +0200 Revert "composite: Convert compWindowUpdate to use TraverseTree" TraverseTree visits the parent before the children. When performing the automatic redirection updates, the children must be visited before the parent. If there are automatically redirected windows on multiple levels of the tree, updating the parents before the children would cause the parent updates to use stale data for areas covered by the children. Also updating the damaged children would re-damage the parent, which would cause additional walks over the tree. In the worst case with an unbroken chain of automatically redirected subwindows, all of which are damaged, only the leaf window would be properly updated on the first round. Then it's parent would be properly updated on the second round, and so on. And on every round all of the ancestor windows would be updated as well, but with stale data. So with N damaged windows you would end up with (N^2+N)/2 updates, instead of the expected N. This reverts commit 648c8871c92727d7b6b16859f27f12266a06a16e. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0998574699502e6ab14fd8899c2e42961d4df7d0 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:05 2011 +0200 Call SourceValidate even if src == dst The extra SourceValidate calls from damageCopyArea and damageCopyPlane can be removed. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit e41e907b3c19908f5316346fa587ced3115478cd Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Wed Jan 5 20:41:04 2011 +0200 Add subWindowMode parameter to SourceValidate Pass the subWindowMode from the GC/source Picture to SourceValidate. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0dede200c9ac7adbe8b8c16efacc3edc1f183cd9 Merge: 7714357f5 2e781457d Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 5 08:51:46 2011 -0800 Merge remote branch 'vsyrjala/misc_fixes' commit 7714357f506782973d25e270f85140b42507ed35 Merge: 02e18c9fb b01dd9d33 Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 5 08:43:18 2011 -0800 Merge remote branch 'whot/for-keith' commit 02e18c9fb58c33d340af4573551fb9c7c59e0f43 Author: James Jones <jajones@nvidia.com> Date: Mon Dec 20 11:05:57 2010 -0800 X Sync Cleanups Various cleanups identified during review of the X Sync Fence Object patches. -Correctly handle failure of AddResource() -Don't assert when data structures are corrupt. Instead, use a new helper function to check for counter sync objects when they're expected, and warn if the type is wrong. -Use the default switch label rather than reimplementing it. -Re-introduce cast of result of dixAllocateObjectWithPrivate() to kill an incompatible pointer type warning. -Remove comments claiming protocol updates are needed. One wasn't true and the other was addressed with a xextproto change. -Return BadFence, not BadCounter from XSyncAwaitFence() Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 86ca434a1ab766c1519ee7146b48dbfead843524 Author: Zhao Yakui <yakui.zhao@intel.com> Date: Tue Jan 4 14:08:16 2011 -0500 edid: Fix incorrect timings for VIC61 Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi> Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> commit bb18f277156c08be028a6e12d8987fb1593e9168 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 10 14:24:02 2010 -0500 x86emu: Fix more mis-decoding of the data prefix cc2c73ddcb4370a7c3ad439cda4da825156c26c9's three-cent titanium tax doesn't go too far enough. Fix the rest of the call and jmp instructions to handle the data prefix correctly. Reference: Intel 64 and IA-32 Architectures Software Developer's Manual Volume 2A: Instruction Set Reference, A-M http://www.intel.com/Assets/PDF/manual/253666.pdf Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 261d0d16af797bb52d4c778e220296d7f2b28e14 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Dec 30 16:08:48 2010 -0800 Fix asprintf typo in commit d2c42b10 Reported-by: Jerome Carretero <cJ@zougloub.eu> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c6afe64bad7a27ff8828de499d56776c113df60f Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 31 03:15:27 2010 +0000 XFree86: Linux: AGP: Fix void-pointer-arithmetic warning Cast it to a char *, mimicking the return immediately below it. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> commit 2d67ada3c4079a11c52024a9c3d4138becca5171 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:43 2010 +0200 os: always check if client is local when connection is accepted LocalClient is used for all DRI2 requests that makes it frequently called function. Querying if connection is local or not takes 10-15us (on ARM) depending on malloc speed. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 617b7d22115ccaaaa7ec69c99885054d33a3bc37 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:42 2010 +0200 os: Fix a memory leak Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 3e1455505addc7e52178fa04399aef2a8522c921 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:41 2010 +0200 udev: Fix removing of the wake up handler RemoveBlockAndWakeupHandlers requires caller to pass same block data parameter as for RegisterBlockAndWakeupHandlers. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 13ac3deedb532b39f41dcd45d70f9eb4a85c1f58 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:40 2010 +0200 mi: Only register sprite block handler when needed miSpriteBlockHandler takes about 10us in arm each time BlockHandlers are called. To eliminate that overhead from xserver side only register the BlockHandler when there actually is any cursor down. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 4f6e3b0f378d7306dbd8c00ef9a7df81e24e5769 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:39 2010 +0200 mi: Register sprite damage handler only when required There is no need to have damage handler registered when there isn't any pointer in the screen. This avoids some overhead from damage handling which takes tens of microseconds on arm. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit bf48082f30818b96bc623834be3022600371d4fc Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:38 2010 +0200 mi: Fix the debug message Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8fb43b8bf9fcbe015d4e98c7e09889184d136a1e Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:37 2010 +0200 mi: Fix wrapping for sprite screen SCREEN_EPILOGUE should read the current function pointer from screen after calling wrapped function in case the pointer changes. Passing pPriv to macros instead of asking dix each time makes sense when both macros need same pointer. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 4be2a6d1b33fac7ceb50ad1de249a1acd5a46ab0 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:36 2010 +0200 mi: Add GetSpriteScreen macro to hide dixLookupPrivate Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ed8db09b4bff5c4a8d8056808368650e1876547b Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:35 2010 +0200 composite: Remove unnecessary variable. We know that there is damage if the dynamic block handler is registered. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c038b8b28e5c436cd31bea7a3bef2c8c9d818b58 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:34 2010 +0200 composite: Only register the block handler when it is required Even calling block handler that doesn't do much is costly in arm. It takes a few microseconds each time which adds up to relative high CPU time because it is done 500+ times per second. Simple optimization is to register the block handler only when it is required. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 6d0e9e5d6e1b847961ab52a11aae96981a1cf1c0 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:33 2010 +0200 render: Enable animated cursor block handler only when needed Calling BlockHandlers takes some time for each iteration in main loop which adds up quickly over multiple request. To reduce the round-trip costs to xserver BlockHandlers should be registered only when required. AnimCurScreenBlockHandler is the first victim for this optimization. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit aa8cea953dc66bcf4cb4d08f2681f9e6cb1bc8c5 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Dec 30 19:19:32 2010 +0200 render: Don't filter 0 return from GetTimeInMillis In animate cursor block handler code assumes GetTimeInMillis returns always nonzero value. This isn't true when time wraps around. To prevent any problems in case GetTimeInMillis would return zero use activeDevice variable to track if we have received time. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 91beeee05f88eed10ab0fd97dc625e96cb7763ba Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Oct 13 16:27:30 2009 +1100 DIX: Reset window properties when freeing them This enables us to reliably inspect properties when destroying windows. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 36ebdd361616eedbe4919deae2a4e6f6606ae6b4 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:24 2010 -0400 linux: warning fix lnx_agp.c: In function ‘xf86DeallocateGARTMemory’: lnx_agp.c:267: warning: cast to pointer from integer of different size Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 63ccaec2c39f4b5742383472c951ee2cd35c9e14 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:23 2010 -0400 glx: warning fixes render2.c: In function ‘__glXDisp_Map2d’: render2.c:127: warning: ‘u1’ may be used uninitialized in this function render2.c: In function ‘__glXDisp_Map1d’: render2.c:90: warning: ‘u1’ may be used uninitialized in this function Remove unnecessary test, and change memcpy to memmove as all users were doing overlapping copies. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit d057e265c862f90e9b6fddff89f40cb82b2a59b1 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:22 2010 -0400 xcmisc: warning fix xcmisc.c:202: warning: no previous prototype for ‘XCMiscExtensionInit’ Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 67e0bcba4307de5a330e027f4504c9aed4987e5a Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:21 2010 -0400 dri1: warning fix dri.c: In function ‘DRIScreenInit’: dri.c:434: warning: cast from pointer to integer of different size Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a298d044f965e5ba91f178c6b599c1df26a958ba Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:20 2010 -0400 loader: warning fix loadmod.c: In function ‘FreeSubdirs’: loadmod.c:377: warning: passing argument 1 of ‘free’ discards qualifiers from pointer target type /usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of type ‘const char *’ Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ee0b1b564413327c73bb8cdbabb76667ca4a744c Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 19 11:59:18 2010 -0400 config: warning fixes xf86AutoConfig.c: In function ‘FreeList’: xf86AutoConfig.c:123: warning: passing argument 1 of ‘free’ discards qualifiers from pointer target type /usr/include/stdlib.h:488: note: expected ‘void *’ but argument is of type ‘const char *’ Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 32c85ad4b8fe27fed0c494f69c39e3902ce57b1b Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 12:40:31 2010 +0000 GLX: DRI2: Fix mismatched-types warning All the DRI extension types have a base extension type as their first member to avoid exactly these types of warning. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit 22796cfa4805cc9551e1b3fa1d3e2e1bfae5bad1 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 28 12:29:53 2010 +0000 udev: Add strdups to kill const warnings InputAttributes wants non-const members, and while it appears safe to cast it, just leave it be for the moment. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 03f2eb1e156796afb70118d7f7f60ac61beed026 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 17 17:13:34 2010 +0000 Input: Set client error value for invalid mask bits When we send BadValue back to the client for having invalid mask bits, at least tell them what the (first) invalid bit was. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 47818287983b04625661b08ae362e0966cddf3e1 Author: Chase Douglas <chase.douglas@canonical.com> Date: Fri Dec 17 17:13:30 2010 +0000 Make EventIsDeliverable non-static Will be used outside dix/events.c in proceeding XI 2.1 MT changes. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f7d8ade3c5ac44faf7f3ea0d846e35f75b31c9ec Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 17 17:13:26 2010 +0000 Resources: Move rClient to resource.h The definition of rClient was duplicated across three source files, so move it to resource.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 05e437c2ce230b588362f012c06ead5c6d89c006 Author: Chase Douglas <chase.douglas@canonical.com> Date: Fri Dec 17 17:13:27 2010 +0000 Export all valuator_mask_* functions Input drivers may use valuator masks for internal state. Having all the valuator_mask_* functions available will help. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Bump ABI_XINPUT_VERSION minor. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2e781457d43ec4bf0d633257ac6852cde3b00541 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Thu Dec 16 18:22:13 2010 +0200 xfree86/modes: Take rotation into account when checking mode size Assume that a mode can be used in either landscape or portrait orientation. I suppose the correct thing to do would be to collect all the supported rotations from the CRTCs that can be used with a specific output, but that information doesn't seem to be readily available when these checks are done. So just assume that either orientation is fine. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 0ce25fd7904c792924c3e0ee6fc21a5f1bec1a68 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Dec 3 17:42:16 2010 +0200 dri2: Don't page flip when the window size doesn't match the pixmap size If the drawable size doesn't match the pixmap size page flipping should not be allowed. If the window is larger than the pixmap, page flipping might need to reposition the CRTC somewhere in the middle of the pixmap. I didn't spot any code that would handle that at least in the intel driver. Also the root pixmap could then move to some negative screen coordinates. Not sure if all bits of code could handle that. Perhaps when composite is enabled screen_x/y would make it work, but without composite there's no way that it would work AFAICS. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit efcb63d0ce43f96d0ac02b6f4a480dfd2374fc84 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Dec 23 13:33:00 2010 +0000 Render: Fix 'comparing between distinct pointer types' warning Add the appropriate casts so that gcc shuts up, even if it doesn't matter. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 469d5bf8b75038631c27edbb0f9cdf7d737fa233 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 17 16:48:45 2010 +0000 mi: Sync: Don't free managed screen private misync allocates space for its screen private with dixRegisterPrivateKey, which means it doesn't have to free it at CloseScreen time; doing so will, in fact, result in a crash. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: James Jones <jajones@nvidia.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 44adb31bfece29260a9bbd9075c9212ebf00d24d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 27 20:36:37 2010 +1000 GetTimeInMillis: Use CLOCK_MONOTONIC_COARSE where available On some systems, using CLOCK_MONOTONIC forces a readback of HPET or some similarly expensive timer. CLOCK_MONOTONIC_COARSE can alleviate this, at the cost of negligibly-reduced resolution, so prefer that where we can. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 296561506a91742cc150a0fb6fc0df5dbe98c780 Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Dec 22 16:57:17 2010 +0200 Xext: Use general OS functions to determine client command string in SELinux. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 1e933665bef26c74196bb7c59910e6a78bcacf0e Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Dec 22 16:51:09 2010 +0200 os: Add facilities for client ID tracking. An interface is provided for figuring out the PID and process name of a client. Make some existing functionality from SELinux and IA extensions available for general use. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 671b2a1823a1c90d0b6254e2e2af8865151fff8c Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Wed Dec 22 16:38:54 2010 +0200 config: Fix linking order of Xnest libraries. MAIN depends on DIX and not vice versa. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> commit 2b364bf970b2ce6829af656990c33afd0d365f3c Author: Rami Ylimäki <rami.ylimaki@vincit.fi> Date: Tue Jun 15 14:44:38 2010 +0200 Revert "os: Prevent backtrace from being stopped in noreturn functions." This reverts commit 579715f830fbbca9e1ecb17dc18176132f5969e7. The patch is not needed anymore. I haven't encountered backtrace problems with GCC 4.3.3. Even if the problems still persisted, this commit should be removed and instead the definition of _X_NORETURN should be modified to be empty if GCC/ARM is used. However, currently it seems that ARM backtraces are OK even if _X_NORETURN is used and -mapcs-frame is not defined in CFLAGS. Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit b01dd9d33651999b0390bf8ed412b84f6929a13e Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 17 17:13:34 2010 +0000 Input: Set client error value for invalid mask bits When we send BadValue back to the client for having invalid mask bits, at least tell them what the (first) invalid bit was. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 495e0142a77152c4cde5c88cdba4103ddc94df2c Author: Chase Douglas <chase.douglas@canonical.com> Date: Fri Dec 17 17:13:30 2010 +0000 Make EventIsDeliverable non-static Will be used outside dix/events.c in proceeding XI 2.1 MT changes. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4fbe67beb56e5600c1df789c08725c45b9bef0d4 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 17 17:13:26 2010 +0000 Resources: Move rClient to resource.h The definition of rClient was duplicated across three source files, so move it to resource.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 871c1e17e527857cd86b5e517d9a18e5041f00fd Author: Chase Douglas <chase.douglas@canonical.com> Date: Fri Dec 17 17:13:27 2010 +0000 Export all valuator_mask_* functions Input drivers may use valuator masks for internal state. Having all the valuator_mask_* functions available will help. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Bump ABI_XINPUT_VERSION minor. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e06fa804009798ea95efa8babaabb0228dfdfe65 Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Dec 22 11:45:36 2010 +0100 EXA: Fix crash with fill using 1x1 tile of depth < 8 (bug #24703). Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24703 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 56d9c736f0c450bffd43300107689eb6dd1ea70b Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 16 14:26:10 2010 -0500 xfree86: Convert some xf86BlockSIGIO to OsBlockSignals The DDC1 and int10 code are blocking SIGIO to get some assurance that their usleep() calls take as long as they expect. That's a good start but you really want to be blocking more than just SIGIO, SIGALRM too at minimum. At this point, except for SIGIO handler setup itself, BlockSIGIO really means "block input events". Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ce13a1dbbfbeee3a3d51d0385817df50944cfdee Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 16 14:03:13 2010 -0500 xfree86: Remove xf86EnterServerState Back when we had RAC this was a vaguely meaningful thing. Since then it's been a glorified (and confusing) wrapper around xf86BlockSIGIO. Note that the APM and VT switch code are unusual relative to other code that cares about SIGIO state. Most callers push a SIGIO disable to create a critical section for the duration of the caller's stack frame, but those two effectively disable SIGIO after their return and re-enable on their next entry. Reviewed-by: Tiago Vignatti <tigo.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a04e74cb480f98bc3dd4def2da6f6752640d9e38 Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 15 15:16:33 2010 -0500 xfree86: Symmetrize xf86AccessEnter and xf86AccessLeave Enter was changing server operating state, Leave wasn't. Which was wholly redundant, since all callers of Enter would immediately change the operating state to exactly what Enter had just done. Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7a9062f2f029b4f911ba56f291375fbf5a98ca73 Author: Adam Jackson <ajax@redhat.com> Date: Tue Dec 14 15:44:16 2010 -0500 fonts: Fix typo in async ListFonts logic This was introduced in 3ab6cd31cbdf8095b2948034fce5fb645422d8da. Mea culpa. This logic is still incorrect [1], but at least it's less incorrect. [1] - https://bugzilla.redhat.com/658587 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f28e48834e40c7901c2efc72f962c9724e74a531 Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 16 13:13:54 2010 -0500 Remove SCO support This has never been buildable in any modular server release. Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 040d54fb88f3970e19d0fbf911d6447f592496bd Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 15 14:59:13 2010 -0500 xfree86: Remove unused xf86inSuspend What is this, I don't even. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit e7dc253452a1ba64718a08fdc070405b494f53cd Merge: d1107918d d5b0d5857 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 20 00:48:45 2010 -0800 Merge remote branch 'alanc/master' commit d1107918d4626268803b54033a07405122278e7f Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Dec 17 16:09:35 2010 +0200 randr: check for virtual size limits before set crtc Return a error if the screen is configured to an invalid size. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 4b88c7be8de4149fe3d166bf115775f9e81a1373 Author: Jörn Horstmann <launchpad@planetxml.de> Date: Mon Dec 6 11:24:02 2010 +1100 Add EDID quirk for HP Compaq nc8430. Like some other LPL panels, this one reports the vertical size in cm rather than mm. Patch taken from Launchpad bug #380009 <https://launchpad.net/bugs/380009> X.Org Bug 28414 <https://bugs.freedesktop.org/show_bug.cgi?id=28414> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a2e67a6412386782cb8b644b86a5744591397d45 Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Date: Mon Dec 6 11:24:01 2010 +1100 IDLETIME: Fix edge-case in IdleTimeBlockHandler Ensure that if we're called exactly on the threshold of a NegativeTransition trigger that we reshedule to pick up an idle time over the threshold. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b55bf248581dc66321b24b29f199f6dc8d02db1b Author: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Date: Mon Dec 6 11:24:00 2010 +1100 Xext: Fix edge case with {Positive, Negative}Transition triggers. The {Positive,Negative}Transition triggers only fire when the counter goes from strictly {below,above} the threshold. If SyncComputeBracketValues gets called exactly at this threshold we may update the bracket values so that the counter is not updated past the threshold. Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d5b0d58573ffb90ea70273cd013102168fd2a18a Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Dec 16 22:29:37 2010 -0800 Bug 32436 - hw/xfree86/parser/Makefile.am TOP_SRCDIR should be top_srcdir https://bugs.freedesktop.org/show_bug.cgi?id=32436 Fix typo introduced in 2416255f7e3fd9190a9 that breaks builds when configured --enable-install-libxf86config Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Tested-by: Simon Thum <simon.thum@gmx.de> commit 058b889fde47b4c32534f11ed651bf1749d1dbb2 Author: David Barksdale <david.barksdale@adcedosolutions.com> Date: Mon Dec 13 18:35:20 2010 -0800 Bug 21827: faulty sdksyms.c generated by the awk script in sdksyms.sh https://bugs.freedesktop.org/show_bug.cgi?id=21827 Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: David Barksdale <david.barksdale@adcedosolutions.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 1324b0ca9f8a7fdaf03b374c75eb3c9df407c2f1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Dec 10 00:08:24 2010 +0000 Typo in xserver Xvasprintf() I needed this patch in the wrapper around vsnprintf() in os/xprintf.c (MinGW for Windows build) to correct various crashes. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit f1542f1d716723cba7c323849086585635121893 Merge: 9716d3124 8a8fdd762 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 14 15:04:12 2010 -0800 Merge remote branch 'whot/for-keith' commit 9716d3124799c6db0d1c782aa72c72f972d5a158 Merge: 03ea0b772 f641e4b34 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 14 15:01:36 2010 -0800 Merge remote branch 'jeremyhu/master' commit 03ea0b7726487b96df73936518da73d023e51334 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Dec 7 16:31:55 2010 -0500 docs: replace BUILLDOCS with existing ENABLE_DEVEL_DOCS Use the util-macros AM Conditionals to control generation of developers documents. This is used throughout xorg modules. The doxygen generated docs are now also managed by --enable-devel-docs. Remove --enable-builddocs as this was last use for BUILDDOCS *** From the RELEASE NOTES *** New configure options for documentation in modules -------------------------------------------------- As many more modules now contain documentation to be converted from DocBook XML to text, HTML, PostScript, and/or PDF formats, new standard options have been added to the configure macros to control the build of these in the modules. --with-xmlto=yes|no Enables or disables use of the xmlto [https://fedorahosted.org/ xmlto/] command to translate DocBook XML to other formats. All DocBook XML conversions require use of this command. --with-fop=yes|no Enables or disables use of the Apache fop [http:// xmlgraphics.apache.org/fop/] command to translate DocBook XML to PostScript and PDF formats. --enable-docs=yes|no Enables or disables the build and installation of all documentation except traditional man pages or those covered by the --enable-devel-docs and --enable-specs options. --enable-devel-docs=yes|no Enables or disables the build and installation of documentation for developers of the X.Org software modules. --enable-specs=yes|no Enables or disables the build and installation of the formal specification documents for protocols and APIs. Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit c78c71c3a872665e426a0a4b82f17007bd8c12cd Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Dec 7 16:31:54 2010 -0500 hw/dmx/doc: DIST_SUBDIRS not required when using AM_CONDITIONAL The makefile can be simplyfied as Automake handle this automatically. All directories in SUBDIRS are visited for dist purposes. www.gnu.org/software/automake/manual/automake.html#SUBDIRS-vs-DIST_005fSUBDIRS Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8a8fdd762ad89c350854943311ec4aadc50245fa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 13 11:28:30 2010 +1000 xfree86: always report the input options before initialising the device. After collecting the driver's default options, report the list of options set for the device before calling PreInit(). This helps with debugging those cases where options are not merged correctly. xf86OptionListReport reports with verbosity 5, higher than the default verbosity so this won't generate logspam in the default case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Simon Thum <simon.thum@gmx.de> commit 9db9e964f6ca553dcbd3b7b037745d9581eaa065 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 10 13:23:13 2010 +1000 xfree86: swap the order to-be-merged lists in xf86CollectInputOptions. Current order causes the user-configured option list to be overwritten with the default list supplied by the driver. Swap around so we overwrite the driver's default values instead. This only affected options supplied by the driver such as XkbLayout in the case of evdev. Reported-by: Sebastian Glita <glseba@yahoo.com> Reported-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Sebastian Glita <glseba@yahoo.com> commit 0d440a1c6e219cd39dbddd2b7e813c6431aac6ea Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 8 14:52:19 2010 +1000 dix: allow for button-only input devices (#21457) Add a few checks for the existence of a valuator class on the device to avoid null-pointer dereferences for button events from devices without a valuator class. X.Org Bug 21457 <http://bugs.freedesktop.org/show_bug.cgi?id=21457> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit f641e4b34aa91ecda29e546b8b975e72ce037ed0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Dec 8 22:58:12 2010 -0800 XQuartz GL: Add $(GL_CFLAGS) to CFLAGS This fixes a build failure I found on tinderbox. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9cf055892dd413932e54b43cc2dfea70bafd525f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 8 14:43:51 2010 +1000 xfree86: don't set movement flags for non-valuator events. If a device doesn't send valuators, don't try to move its position. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit aba8133c9c5a50753c388d76407868ac69f4134b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 8 14:02:17 2010 +1000 dix: clear up an overly convoluted if statement. No functional changes, just improves readability. This statement had things added to/removed from it for a few server releases while the input event queue was revamped. What made sense once is now mainly confusing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 883039e07b0c0ef23c7fc4ba3455b41173c7a7fc Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Dec 8 13:27:41 2010 -0800 XQuartz: Just NSBeep() for XBell() The CoreAudio path uses deprecated API and has reported crashes that aren't worth fixing (4e8bf12b13690afa6d9fee0e339d3819ef16fb3f fixed one and introduced another). NSBeep() does the job just fine. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 2c70b650b342378898064cf27e2f95c4b2e53d24 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Dec 8 18:54:30 2010 +0000 Fix Xwin build after af0f9f91 Fix damage to XWIN_LIBS in commit af0f9f913398d34a885c3fb4e8d40c1a7e2b3ee9 "Move some sync code to miext", which broke the XWin build Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison at virgin.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 519d243f0c8e3c80226701f71d2cfa62e42dbff7 Merge: 9f9c73231 446482efa Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 7 13:39:58 2010 -0800 Merge remote branch 'alanc/master' commit 446482efaa3d266266e2a143492a3ec0523622bd Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Nov 28 09:41:17 2010 -0800 Convert cvt code to use XNFasprintf() Requires linking xprintf.c into standalone cvt utility Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit d2c42b102707db6c1ca9dccc4de9210a43650cb1 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 23:10:46 2010 -0800 Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 3a9bb93dd178084f4ff1abcea331ca5a62f88ce6 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 22:38:27 2010 -0800 Convert alloc+sprintf pairs into asprintf() & XNFasprintf() calls Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 2416255f7e3fd9190a9e01bda57c992932de4bd9 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 22:36:44 2010 -0800 Convert hw/xfree86/parser code to use asprintf() calls Requires linking xprintf.c into libxf86config for those who build it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 03e8bfa1d122f7dea905d48c93cfd54afd991dfd Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 20:09:04 2010 -0800 Convert existing Xprintf style calls to asprintf style Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit c95c1d338fdb62dbe3dba934b97324fa778b7fce Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 18:43:12 2010 -0800 Add asprintf() implementation for platforms without it Provides a portable implementation of this common allocating sprintf() API found in many, but not yet all, of the platforms we support. If the platform provides vasprintf() we simply wrap it, otherwise we implement it - either way callers can use it regardless of platform. Since not all platforms guarantee to NULL out the return pointer on failure, we don't either, and require callers to check the return value for -1. The old Xprintf() API is deprecated, but left for compatibility for now. The new API is added in a new header so that it can be used in parts of the server such as hw/xfree86/parser that don't include all the server headers. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 2db6951763115a4a5dfac53d1a8f78ac33f91235 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Dec 3 16:32:01 2010 -0800 Sun's copyrights now belong to Oracle Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit f06e8a61d6ed8f3054878167bffee619f852aad9 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Nov 30 16:34:38 2010 -0800 Move inclusion of panoramiX headers to top of render.c Fixes compiler error from Sun compilers due to _X_EXPORT declaration being included after the unlabeled version: "../Xext/panoramiXsrv.h", line 29: redeclaration must have the same or more restrictive linker scoping: XRT_PICTURE Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f9c732311ef0cc198e5ec44d02412eb7e8c3f3a Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 21:35:25 2010 +0100 dix: Fix logic for displaying deprecation warning only once. As pointed out by Jamey Sharp (again), the logic is faulty: --warn is always going to be false. Replace it with warn-- accordingly, so that there's (at least, but also only) one warning showing up. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit a937803c1f671ef29332e5fe8c190d8b48239912 Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 21:29:26 2010 +0100 dix: Simplify deprecated *Lookup* wrappers around dixLookup*. As pointed out by Jamey Sharp: “the result pointer is already guaranteed to be NULL if the return value is not Success”, so get rid of the variable used to catch the return value, and used in a ternary operation to decide whether to return the pointer or NULL. Always return the result pointer instead. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 73fbc4a4a7997b3ee1c779d8f394114270bcb20d Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 12:04:11 2010 +0100 Replace SecurityLookupIDByClass() with dixLookupResourceByClass(). This patch has been prepared with the following Coccinelle semantic patch: @@ expression a, b, c, d; identifier r; type t; @@ -r = (t) SecurityLookupIDByClass(a, b, c, d); +dixLookupResourceByClass((pointer*) &r, b, c, a, d); The only occurrence not matching directly was processed after separating declaration of pXinDraw and call to SecurityLookupIDByClass(). Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 6e8b34b7048bc9e49ef52b81e2de1b518a05890e Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 11:36:36 2010 +0100 Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 2. These occurrences are a bit harder to catch through a semantic patch, so process them “manually”. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit ac04c1377a42ab6803adf551756653fd8e1a694b Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 11:36:31 2010 +0100 Replace SecurityLookupIDByType() with dixLookupResourceByType(), take 1. This patch has been prepared with the following Coccinelle semantic patch: @@ expression a, b, c, d; identifier r; @@ -r = SecurityLookupIDByType(a, b, c, d); +dixLookupResourceByType((pointer*) &r, b, c, a, d); Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 28b4c02d7463ffe5c29f803f5656c5ecfc040185 Author: Cyril Brulebois <kibi@debian.org> Date: Thu Nov 11 18:36:45 2010 +0100 Enable silent rules for cat and echo. One gets this: | GEN lf3-xaaBitmap.c | GEN lf3-xaaBitmap.c | GEN lf3-xaaBitmap.c | GEN lf3-xaaBitmap.c | CC lf3-xaaBitmap.lo instead of this: | echo "#define LSBFIRST" > l3-xaaBitmap.c | echo "#define TRIPLE_BITS" >> l3-xaaBitmap.c | echo '#include "../../../../hw/xfree86/xaa/xaaBitmap.c"' >> l3-xaaBitmap.c | CC l3-xaaBitmap.lo Occurrences found using: | git grep -E '(cat|echo)' -- '*Makefile.am' Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 838b9582280030a159878af566126cb0a523ec29 Author: Cyril Brulebois <kibi@debian.org> Date: Thu Nov 11 15:40:13 2010 +0100 Replace LookupIDByType() with dixLookupResourceByType(), take 2. These occurrences are a bit harder to catch through a semantic patch, so process them “manually”. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit ffb93533fd8067c7383aef5e0018a197af59b46c Author: Cyril Brulebois <kibi@debian.org> Date: Thu Nov 11 15:30:15 2010 +0100 Replace LookupIDByType() with dixLookupResourceByType(), take 1. This patch has been prepared with the following Coccinelle semantic patch: @@ expression x, y; type t; identifier r; @@ -r = (t) LookupIDByType(x, y); +dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess); @@ expression x, y; type t; identifier r; @@ -t r = (t) LookupIDByType(x, y); +t r; +dixLookupResourceByType((pointer*)&r, x, y, NullClient, DixUnknownAccess); Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit d1b45b0fd54efb952f9ff435a516c1bfd85ca186 Author: Cyril Brulebois <kibi@debian.org> Date: Thu Nov 11 11:35:47 2010 +0100 Fix missing <string.h> include. The following happens otherwise (with -Wall -Werror): | In file included from /usr/include/X11/Xfuncs.h:47, | from ../../include/misc.h:112, | from ../../include/screenint.h:52, | from ../../include/scrnintstr.h:52, | from ../../dix/cursor.c:58: | /usr/include/string.h:534: error: conflicting types for ‘xstrcasecmp’ | ../../include/os.h:488: note: previous declaration of ‘xstrcasecmp’ was here | /usr/include/string.h:538: error: conflicting types for ‘xstrncasecmp’ | ../../include/os.h:493: note: previous declaration of ‘xstrncasecmp’ was here Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Cyril Brulebois <kibi@debian.org> commit 780754050bc9cb1489f92a2a890ab5665e3e6358 Author: Cyril Brulebois <kibi@debian.org> Date: Fri Nov 12 12:18:59 2010 +0100 Fix GLX_LIBS vs. DMX_LIBS order. If glxproxy needs symbols which aren't pulled in by dmx itself, glxproxy fails to link because of undefined references. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 14983286c489ea1ec6ba4fadbeaec5c2d2ee34e1 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 20:45:35 2010 -0800 Version bumped to 1.9.99.901 (1.10 RC1) Signed-off-by: Keith Packard <keithp@keithp.com> commit d96d5f5443358e33e47d1a61f9bd2afd8064a8dd Author: James Jones <jajones@nvidia.com> Date: Sun Dec 5 19:42:41 2010 -0800 Bump extension ABI to 5 Commit 606e079cc4d9a9db3197652ca51683c36f74efb8 moved the visual field in WindowOptRec, breaking the extension module ABI. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 435361bd73b9fc733f093d81af6b839953e35176 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 20:38:14 2010 -0800 sync: syncObject may be None in SyncInitTrigger And often is, especially when called from ProcSyncCreateAlarm. Crashing in this case seems unwise. Signed-off-by: Keith Packard <keithp@keithp.com> commit 0d01b66df9081ef48843b3bad81c56bb2cd1ae69 Author: Keith Packard <keithp@keithp.com> Date: Sun Dec 5 23:35:28 2010 -0800 randr: handle RRSetCrtcConfigs request with zero configs Need to actually return a reply in this case. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit b0f4bd61f0caf80f3be9a176f1f7a707bc6628d8 Author: Keith Packard <keithp@keithp.com> Date: Sun Dec 5 21:53:25 2010 -0800 ProcRRSetCrtcConfigs uses 'configs' without being initialized If the client sends invalid data for this request, the server will jump to 'sendReply' and call RRFreeCrtcConfigs, passing it the uninitialized 'configs' and 'num_configs' values. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 752c368421c1c824752cf467fba9318d75d2ca2c Author: Keith Packard <keithp@keithp.com> Date: Sun Dec 5 20:57:47 2010 -0800 Separate out screen size and screen pixmap sizes in RRScreenSizeSet This provides for separate sizes for the screen scanout and rendering buffer and the application-visible screen size. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit a88d70fb20a2bc3152b84adff4380857e6cfadf5 Author: Keith Packard <keithp@keithp.com> Date: Sun Dec 5 20:55:46 2010 -0800 Set sprite transforms from RRSetCrtcConfigs These were getting ignored. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 96b4d4787bf82edd9d06eb9a6e94bc45412c7df2 Author: Keith Packard <keithp@keithp.com> Date: Sun Dec 5 20:49:19 2010 -0800 DIX is responsible for ref counting scanout pixmaps. Remove some extra ref counting inside hw/xfree86/modes Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit afb6ebf1d5829346c40fe1053c9f50afe926e6c6 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 3 13:04:37 2010 -0800 randr: Hook up the new RandR 1.4 functionality This bumps the supported RandR protocol version and adds the dispatch hooks needed to call the new functions Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 82612045e11f2b882ae132e184a9629f43f1c424 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 3 13:00:46 2010 -0800 randr: Add per-crtc pixmaps This adds new driver hooks to allocate scanout pixmaps and changes the mode setting APIs to pass the new scanout pixmaps along from DIX. DIX is responsible for reference counting the pixmaps by tracking them through RRCrtcNotify. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 86c489c319c705f710bee3897fe27600ce15008e Author: Keith Packard <keithp@keithp.com> Date: Sat Dec 4 20:12:26 2010 -0800 hw/xfree86/modes: Add optional driver API for RRSetCrtcConfigs This provides a driver hook which can either completely replace, or just validate the parameters for, the RRSetCrtcConfigs request. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit d94a035ea9eb3167fc4f35b2d9f0d53f8807014c Author: Keith Packard <keithp@keithp.com> Date: Sat Dec 4 19:22:11 2010 -0800 randr: Implement RRSetCrtcConfigs This provides a driver-independent implementation of the RRSetCrtcConfigs API by simply using the existing interfaces. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 66294afcab7b7a82f7dd897767e46c48a94b8ee8 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 3 22:08:06 2010 -0800 randr: Add sprite position transforms This implements sprite position transformations. Sprite image transforms are passed all the way to the DDX layer, but the images are not yet manipulated before being passed to the drivers. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit c8bc25fd7629df10f2825b7cc713b031ae78f223 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 19:40:30 2010 -0800 Require RandR protocol version 1.4 or newer Signed-off-by: Keith Packard <keithp@keithp.com> commit 8b35118c03590a7ad3786d3284bafb3f40fcb8cc Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 6 15:23:37 2010 -0700 Replace huge argument list in xf86CrtcSetModeTransform with struct xf86CrtcSetModeTransform was starting to get ridiculous with 6 arguments, this change has it take a single structure that contains all of those values along with a set of flags that says which have changed. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit f5b8bd620f91214c0b87e9b04d57015655792352 Merge: 01e9fa7da 8127c83c8 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 19:51:06 2010 -0800 Merge remote branch 'jajones/for-keith' commit 01e9fa7da389fc7ab834b4234b8484514144b7f4 Merge: 79870dbf7 68a1b0de9 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 19:45:11 2010 -0800 Merge remote branch 'whot/for-keith' commit 79870dbf72d463cf9efea1b3e61d1d5759df27b5 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Dec 4 16:13:29 2010 -0500 config: build Xserver man pages using XORG_MANPAGE_SECTIONS Nothing requires the use of a C preprocessor Using standard file exentions (.man) means no need for .gitignore Use standard directory and makefile Fix man page whitespace issues Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Dew <matt@osource.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit c4a7a5917ab828d4a0bd825a98e4d641bcb378f1 Merge: 5de312a60 714b68d9e Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 19:28:07 2010 -0800 Merge remote branch 'jeremyhu/master' commit 5de312a60d8227ed670849ecf888ea878aa81430 Merge: 311cad331 8f42b2b69 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 6 19:22:52 2010 -0800 Merge remote branch 'alanc/master' commit 8127c83c81bf64369a8ba2999088226d14e0b128 Author: James Jones <jajones@nvidia.com> Date: Mon Dec 6 12:14:01 2010 -0800 Expose Sync Fence Object protocol Add the new protocol handlers for XSync 3.1 to the dispatch tables and report support for Sync protocol version 3.1. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 9c0c7cc9a7adf230b5eee0b4166f9e17e07a088b Author: James Jones <jajones@nvidia.com> Date: Mon Dec 6 13:10:42 2010 -0800 Add XSyncAwaitFence() handler -Add the actual ProcSyncAwaitFence() dispatch func -Add support for fence sync triggers. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 397dfd9f87e1cdf105d10a789a97230f4f0d204e Author: James Jones <jajones@nvidia.com> Date: Fri Jun 25 17:59:14 2010 -0700 Create/Destroy/Trigger/Reset/Query Fence Sync objs Initial server side implementation of fence sync objects. Allows creation, management, and state queries of binary state objects. Currently they are not very useful as there is no way to wait for them efficiently. The basic trigger operation added here triggers relative to a given X screen's rendering operations. To perform this operation, fence sync objects must be tied to a screen. As Aaron Plattner pointed out, screens are identified but a drawable in X protocol, so a drawable argument is included in XSyncCreateFence(). The screen also could have been specified as part of the trigger operation. However, it is also desireable to associate a screen with fence sync objects at creation time so that the associated screen's driver can allocate any HW- specific resources needed by the fence object up front. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 53ea965d64bd9563e6bfcc81d04f283d2b85f09d Author: James Jones <jajones@nvidia.com> Date: Mon Nov 29 10:09:36 2010 -0800 Require xextproto 7.1.99 Subsequent changes rely on fence sync protocol in the sync extension. This protocol is only complete in xextproto version 7.1.99 and above. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 1c4a0db2c6bf0320cb630b84ab87bcfd3801a53d Author: James Jones <jajones@nvidia.com> Date: Mon Jun 28 16:10:13 2010 -0700 Add fence sync driver interface -Add fence sync objects -Add fence sync devPrivates -Add a X sync module screen private -Add wrappable functions to create and destroy fence sync objects -Give fence sync objects wrappable functions to trigger, test, and reset their 'triggered' value. -Give fence sync objects wrappable functions to notify driver when adding/removing triggers to/ from the sync object. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit af0f9f913398d34a885c3fb4e8d40c1a7e2b3ee9 Author: James Jones <jajones@nvidia.com> Date: Mon Jun 28 15:39:04 2010 -0700 Move some sync code to miext As a precursor to the fence sync object video driver and extension API, move some code from Xext to miext/sync. Most of this is just code to set up the build system to include the new directory. No functional code is added in this change. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 12b65de7db6e3e8bf831914d247da269d01c5fbe Author: James Jones <jajones@nvidia.com> Date: Mon Dec 6 10:11:45 2010 -0800 Factor out generic code from ProcSyncAwait() In preparation for adding more sync object types that will need Await requests of their own, factor out some setup and finalization code from ProcSyncAwait() into SyncAwaitPrologue() and SyncAwaitEpilogue() Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit c66a410d378090f350beb398649e9d9262933785 Author: James Jones <jajones@nvidia.com> Date: Mon Jun 28 14:59:01 2010 -0700 Make Await SyncTrigger functions generic Update all the functions dealing with Await sync triggers handle generic sync objects instead of just counters. This will facilitate code sharing between the counter sync waits and the fence sync waits. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 99daf419a3070c347c0cd29b4a9bae07eca7bd6d Author: James Jones <jajones@nvidia.com> Date: Mon Jun 28 14:51:54 2010 -0700 Create SyncObject base type. SyncObject is now the base type for SyncCounter. Data to be used by all sync types is stored in the base object. SyncCounter can be safely cast to SyncObject, and a SyncObject can be cast to the correct type based on SyncObject::type. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 27593eea7efcbed8de0c6e8233cbd1a1b8a50459 Author: James Jones <jajones@nvidia.com> Date: Mon Dec 6 13:36:14 2010 -0800 Add and use SERVER_SYNC_*_VERSION Most extensions have a version defined in the protocol headers, and also in the server's protocol-versions.h. The latter defines which version the server advertises support for. Sync wasn't included in protocol-versions.h, and was advertising support for whatever was in the protocol headers the server was built against. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 68a1b0de95f71f74835c6c0f002699fcdccbb268 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 6 14:58:37 2010 +1000 xfree86: use xf86AllocateInput() for xorg.conf devices too. Single allocation point for input devices, most notably a single point to reset default values. Without this patch, the file descriptor default was -1 for hotplugged devices and 0 for config devices. Drivers that don't overwrite the default themselves would thus fail if configured in the xorg.conf. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit beea2378f142556471c62290e275935af848e137 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 6 14:33:43 2010 +1000 xfree86: don't overwrite option list (#32115) Options set in the configuration file were unconditionally overwritten by the server. Merge the already existing options and the new options together instead of just overwriting ones. Introduced in commit 2199842ed50b3eb40d54146827fc58cae7e873ec Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 10:52:54 2010 +1000 xfree86: remove extraOptions field from IDevRec. X.Org Bug 32115 <http://bugs.freedesktop.org/show_bug.cgi?id=32115> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: David Ronis <ronis@ronispc.chem.mcgill.ca> commit 8f3fa8fb0b0a75dac714fc213c034b20595898d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 6 15:44:50 2010 +1000 xfree86: add option "Floating", deprecate SendCoreEvents and friends. Some devices should be initialised as floating from the start (e.g. Joysticks and accelerometers benefit from this). Currently users use the "SendCoreEvents" "off" flag for this, which isn't the most appropriate naming. Add an option "Floating", deprecate the others. Still parsed and handled by the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 36b614dedf4ddc428e43ad1542d4f9314f73f60a Author: Eoghan Sherry <ejsherry@gmail.com> Date: Sun Nov 28 16:15:51 2010 -0500 Xi: Fix master button update when slave buttons are mapped. #24887 It is currently assumed that an event button delieved to a master device corresponds to the slave button states. However, the event button is a logical (mapped) slave button and slave button states correspond to physical (unmapped) slave buttons. This leads to incorrect update of the master button state and incorrect events devlivered to clients. Fix the situation by taking the slave button map into account when querying a slave button state. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24887 Signed-off-by: Eoghan Sherry <ejsherry@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 31ab9f8860848504df18a8be9d19b817b191e0df Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 3 11:54:41 2010 +1000 mi: handle DGA subtypes when determining the master device. The subtype in the DGA event is the core type and all ET_ event types (where applicable) are identical to the core types. Thus the switch statement below will work as required and assign the right master device. Fixes a crasher bug on keyboard devices with valuators. If a device sends a motion event while grabbed and a DGA client is active (but has not selected input through DGA), the valuator event is posted through the VCK and eventually results in a NULL-pointer dereference on dev->valuator. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5d31c3e705dfd9f38f0fffcd07a6d8d06644735c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 26 09:37:37 2010 +1000 dix: don't stop processing valuators when the mode changes. XI 1.x events still contain absolute coordinates anyway. By the time we get to the InternalEvent to XI event conversion, the valuators are already absolute. Stopping because of a different mode on a valuator is not necessary. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 714b68d9e5bf624a6703f168e0f7dc980e88e8c0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Dec 3 17:27:44 2010 -0800 XQuartz: RandR: Fix mode changing for multi-monitor configurations. This just fixes the regression whereby we couldn't switch between the legacy fullscreen mode and rootless on multi-monitor configurations. This was happening because ref wasn't being set in these cases (since we don't ever actually change CG modes), so we failed a CFEqual. Setting the references fixes this regression and places us one step closer to more mode RandR mode switching in multi-monitor configurations. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 14f00449eb81771c01fffcdaf3dd697cdf4e41de Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Dec 3 16:46:11 2010 -0800 XQuartz: Cleanup some compiler warnings Mark __crashreporter_info__ as __attribute__((__used__)) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 14aec8b82a316c6df51ac2a81985ebf1990abd2b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Dec 3 16:45:37 2010 -0800 XQuartz: Remove one more backing store leftover See: c4c4676e6874b42c2371eee96faa2c2dbb59a704 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ca431371a23a2b9ad36c1d64e11ea41d5e4e5f04 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Nov 26 15:31:22 2010 -0500 XQuartz: Disable the Mac OS X screensaver when in full screen mode Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 311cad33155c64ed996418808727fc417168592e Author: Nicolas Peninguy <nico@lostgeeks.org> Date: Wed Nov 24 00:11:11 2010 +0100 Fix Xdmx and Xephyr build when DTrace support is enabled This fixes the following build errors when DTrace is enabled (--with-dtrace): CCLD Xdmx /usr/bin/ld: ../../os/os.O: undefined reference to symbol 'dladdr@@GLIBC_2.2.5' /usr/bin/ld: note: 'dladdr@@GLIBC_2.2.5' is defined in DSO /lib64/libdl.so.2 so try adding it to the linker command line CCLD Xephyr ../../../os/os.O: In function `TimerForce': /home/nico/work/xserver/os/WaitFor.c:481: multiple definition of `TimerForce' ../../../os/os.O:/home/nico/work/xserver/os/WaitFor.c:481: first defined here Signed-off-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 3824417335ec00a87b51f8d05e592099b8507680 Merge: dab064fa5 f4f41c812 Author: Keith Packard <keithp@keithp.com> Date: Thu Dec 2 08:39:33 2010 -0800 Merge remote branch 'vsyrjala/xv_reput' commit dab064fa5e0b1f5c67222562ad5367005832cba1 Author: Andrea Canciani <ranma42@gmail.com> Date: Tue Nov 2 20:10:32 2010 +0100 render: Fix byteswapping of gradient stops The function swapStops repeatedly swaps the color components as CARD16, but incorrectly steps over them as if they were CARD32. This causes half of the stops not to be swapped at all and some unrelated data be swapped instead. Signed-off-by: Andrea Canciani <ranma42@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 279ef1ffd787dba2f0d5056849b9cb15d36aa3eb Author: Cyril Brulebois <kibi@debian.org> Date: Wed Dec 1 14:12:55 2010 +0100 Fix screen number checks. screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8684543021b9b1aa165b1bc69bc58685cb5942c1 Author: Julien Cristau <jcristau@debian.org> Date: Tue Nov 30 17:23:10 2010 +0100 DGA: fix screen number check screenInfo.numScreens is not a valid screen number, they go from 0 to numScreens - 1. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8f42b2b69387b006bfcd373c3d023ebea9035db2 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 22:34:57 2010 -0800 Simplify Error() - don't allocate temporary copy of error string Doesn't seem to be any reason to just not pass the error string as another argument directly to LogVWrite() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 685286b17d30335d799a9da11914943e466ea955 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 20:43:28 2010 -0800 FindModuleInSubdir: Stop allocating one more byte than needed 15ac25627e7239629be59 removed the "/" from the sprintf strings, but failed to remove the extra byte allocated for the '/'. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 40d5a019352fa8f12230c863e11cbb1f6258a93e Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 19:50:38 2010 -0800 xf86VIDrvMsgVerb: print args, not format string Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 4bbc90cd8b7e749fd8072ce7cd8dd998f4396981 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 19:06:56 2010 -0800 xf86AutoConfig: make copyScreen memory allocation & error handling more sane No point calling the no-fail-alloc if you check for failure and your only caller checks for failure. No point calling calloc to zero fill memory you're about to memcpy over. In the unlikely event of a loss of memory allocation, drop your previous allocations before returning to others. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 2c8e534c8e9334562485aeaaef374871cf14d5fe Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 23:49:55 2010 -0800 xf86ValidateModes: xnfalloc(strlen) + strcpy => xnfstrdup Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 29e467a1f1548a826ee2793244e3ff416aa1a0f2 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Nov 26 16:53:40 2010 -0800 xf86OutputRename: Replace another strlen/malloc/strcpy set with strdup Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> commit d346bc3083c6d4bea59b77f634c7c5ec6c1d8cc9 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Nov 28 13:48:16 2010 -0800 Fix compiler warnings in hw/xfree86/os-support/solaris sun_init.c: In function `xf86OpenConsole': sun_init.c:99: warning: cast does not match function type sun_init.c:74: warning: unused variable `FreeVTslot' sun_init.c: In function `xf86UseMsg': sun_init.c:417: warning: old-style parameter declaration sun_vid.c: In function `solUnMapVidMem': sun_vid.c:162: warning: long unsigned int format, pointer arg (arg 6) sun_vid.c: In function `xf86ReadBIOS': sun_vid.c:217: warning: long unsigned int format, pointer arg (arg 5) sun_vid.c:217: warning: long unsigned int format, int arg (arg 6) sun_agp.c: In function `xf86EnableAGP': sun_agp.c:321: warning: unsigned int format, CARD32 arg (arg 4) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit d75777d54c2107163305f50e8ee4306da202b95e Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Nov 28 13:45:40 2010 -0800 Move xchomp inside #ifdef __linux__ static function only called from the matchDriverFromFiles function that's inside #ifdef __linux__ section Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> commit ccbba444b7b8e1ba555532a847377600bea43d03 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Nov 28 10:45:17 2010 -0800 config: Remove AC_PROG_CC, SED & INSTALL that XORG_DEFAULT_OPTIONS provide Most importantly removes AC_PROG_CC call that resets compiler flags back to C89 mode, breaking use of C99 isfinite() on Solaris in dix/devices.c. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> commit 92cde0b84cdec164cd698dc74a7512d0791d7708 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 08:15:52 2010 -0800 Xserver-spec: Update discussion of font library Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit c1e769250078cbc74d7e6e6ddc5323c4f420ab14 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 08:06:40 2010 -0800 Xserver-spec: Update location of log functions Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit deae18f3cad94959110761ef2ecd9665690e3db5 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 00:45:48 2010 -0800 Xserver-spec: Fix assorted typos Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit a410bf53798bdca43f99476a01ef27cabdf73e01 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 00:35:28 2010 -0800 Xserver-spec: Update lists of macros LOOKUP_DRAWABLE & VERIFY_GC are no longer in dix.h, but WriteReplyToClient & WriteSwappedDataToClient are. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit de518c8f378ea31345c946693d58a26a493af603 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 00:30:37 2010 -0800 Xserver-spec: Remove CreateCallbackList The function is defined as a static, so can't be called by anyone but AddCallback. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit f6c880b257a21a574cf1a47095cb39f32252802e Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 00:27:46 2010 -0800 Xserver-spec: Replace deprecated resource id lookup functions Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 922806a5aa6eafc432d6787495b475aaa3f1790d Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 00:14:51 2010 -0800 Xserver-spec: Update Memory Management functions Xalloc, Xrealloc, & Xfree are deprecated now ALLOCATE_LOCAL is removed due to stack overflow issues Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 02449ee24b484c9fea501df5274d95a9f87cab23 Merge: afd6eb66d b85f9063c Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 30 13:30:59 2010 -0800 Merge remote branch 'ajax/for-keithp' commit afd6eb66d5ef6a59be4c03da4588aaa2ee47b9ad Merge: b16964910 ffcbfa006 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 30 13:28:13 2010 -0800 Merge remote branch 'aplattner/for/keith' commit b16964910d29c0bd039e8bb48bcf1199d709fe3e Author: Ferry Huberts <ferry.huberts@pelagic.nl> Date: Tue Nov 30 19:06:55 2010 +0100 dix: do not use bit-wise operators on the boolean result of BitIsOn Performing bit-wise operations on a boolean amounts to mixing types, is confusing and basically incorrect; one should only perform logical operations on booleans. Performing such operations relies on the implementation detail that a boolean is in fact an integer and that its value FALSE is implemented as zero. Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5f34853d6f936e8a1a317a59972b07e3f191d1ab Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 15 11:25:13 2010 +1000 xfree86: Bump classic driver default to 1024x768 Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 903e0f6f0f0ec54151640fc459ff03dcba0522af Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 10:46:44 2010 -0800 Xserver-spec: Delete DBE Idioms section The code has been gone for a while Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f4ba75a494cf9f4f5b0a979e9ceb519f4a6fcacc Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Nov 27 10:46:43 2010 -0800 Remove unused ReqLen & CastxReq macros According to Xserver-spec, they were part of the now-deleted DBE "Idioms" code. The last callers of them were removed in commits fe616f9230b6 & 3d642905477f. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b85f9063c2370d7710523bccb8bf030a0710425b Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 22 16:42:04 2010 -0500 xfree86: Remove the xf8_16bpp overlay module Only one (marginal) driver was using it, and it's been fixed to just implement it directly. v2: Also fix sdksyms.sh (spotted by Jesse Adkins) v3: Also fix DESIGN.xml (spotted bu Julien Cristau) Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a861fe6a1cf56df76928d21707551602289963c1 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 30 13:50:42 2010 -0500 vbe: Refuse to believe tiny (or negative) panel sizes from PanelID Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 84a14fab8f930ef1855444ae4e9e3e14ee008328 Author: David Reveman <davidr@novell.com> Date: Wed Jan 6 14:55:48 2010 -0500 composite: add panoramix support Taken from: 50d2d8c8969c165582d215c6e85c4be9eac02b6a dbffd0d44a33dcc84898c7a891d7ba212f65cbb8 9b5b102163b4eaa1b70647354fcab4f6e461c94c 75f9b98af31abf537ac6616c99f3797deb7ba017 07fba8b1f77a6bca44ea6568b346a18ce9d1e61d With minor style fixes, ported to dixLookupResourceByType, and ported away from client->noClientException and xalloc/xfree. v2: Fix a memory leak in PanoramiXCompositeNameWindowPixmap, spotted by James Jones. v3: Fix a buglet in PanoramiXCompositeUnredirectSubwindows, spotted by Dave Airlie. v4: Fix a style issue with resource lookup noted by Jamey Sharp. Reviewed-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 6dea617e0f71a6fc7937e3a1e10474fa87488284 Author: David Reveman <davidr@novell.com> Date: Tue Jan 5 15:35:10 2010 -0500 fixes: Add panoramix support Taken from: 583f4dde81d8d5e9101b0289946e1914ea1ee124 With minor style fixes and ported to dixLookupResourceByType. Reviewed-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 1b3c57f075049250c6d059412af3d6954468a5b7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 20 12:25:23 2010 -0400 xfree86: Remove unused xf86PixmapKeyRec Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 63b9d67d7f4f1fa108370c619e1d0d06baedbd4c Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 19 18:40:24 2010 -0400 mi: Remove unused miAllocateGCPrivateIndex Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 87f5b843a08fd92b4b31c04e3e6d947b8bc0d160 Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 19 16:25:51 2010 -0500 render: Reshuffle and cull dead field from GlyphSetRec Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 606e079cc4d9a9db3197652ca51683c36f74efb8 Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 19 16:17:48 2010 -0500 dix: reshuffle WindowOptRec to fill a hole on LP64 Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit fba5c8154dbc8f8c33801a5a43d7361cd6b54ffe Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 19 15:21:31 2010 -0500 dix: Remove unused ChangeSaveUnder hooks Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit c4c4676e6874b42c2371eee96faa2c2dbb59a704 Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 19 15:04:09 2010 -0500 dix: Remove the backing store leftovers Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 48bc8d0dd99284f509bc6de01a8fd24a7bfc69d5 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 6 09:56:56 2010 -0400 render: repack PictureRec Eliminate the unused dither field, move filter and stateChanges into the bitfield, and reorder elements to pack holes on LP64. sizeof(PictureRec) ILP32 LP64 before: 84 152 after: 72 120 Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ffcbfa0063bdc7c9ad5ac724285c7b6e67044c18 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Nov 15 20:43:18 2010 -0800 xfree86: Fix rotation of 2-color non-interleaved cursor images When RandR 1.2's transformation code is enabled, it rotates the cursor image so that it appears upright on a rotated screen. This code completely mangles 2-color cursors on hardware where the the mask and source images are not interleaved due to two problems: 1. stride is calculated as (width / 4) rather than (width / 8), so the expression (y * stride) skips two lines instead of one for every time y is incremented. 2. cursor_bitpos ignores the 'mask' parameter if the hardware doesn't specify any of the HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_* flags. To fix this, refactor the code to pass the whole xf86CursorInfoPtr through to cursor_bitpos and compute the correct stride there based on the flags. If none of the SOURCE_MASK_INTERLEAVE flags are set, use the total cursor size to move the 'image' variable into the mask part of the image before computing the desired byte pointer. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Cyril Brulebois <kibi@debian.org> commit 7ee965a300c9eddcc1acacf9414cfe3e589222a8 Author: Adam Jackson <ajax@redhat.com> Date: Tue May 11 09:16:19 2010 -0400 linux: Refactor VT switch on {re,}generation and shutdown This makes more things fatal than were fatal before, but that's correct; if you need the VT, then failing to get it on regeneration means things are about to go very very badly. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 0def735c6a9fab19acc4b806def6921a702f617f Author: Adam Jackson <ajax@redhat.com> Date: Tue May 11 08:40:33 2010 -0400 xfree86: Remove dead ifdefs from VT switching Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 96a7a7d197d5f96e7aa51928155d4b8d5a115875 Author: Adam Jackson <ajax@redhat.com> Date: Mon May 10 18:40:09 2010 -0400 linux: Don't muck about with tty permissions This is not X's job. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 6ce1908ba4959aaa0a48171acb62cf6a5d5cbf18 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 12 08:50:54 2010 -0400 xfree86: Remove os-support/sysv Nothing's using it, the SysV derivatives we support have their own custom versions. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 01159ffc4718ba48ab7b16acaffd8008f9803811 Author: Adam Jackson <ajax@redhat.com> Date: Mon May 10 18:14:49 2010 -0400 linux: Remove redundant variable Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a80780a7638f847c3be20e5e0c7fe85e83d9bdd1 Author: Adam Jackson <ajax@redhat.com> Date: Wed Nov 17 09:03:06 2010 -0500 glx: Remove swap barrier and hyperpipe support Never implemented in any open source driver. The implementation assumed explicit DDX driver knowledge of how the client-side driver worked, since at the time the server's GL renderer was not a DRI driver. But now, it is, so any implementation of these should be done with additional DRI driver API, like the swap control extension. Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f4f41c812d2ba5edba7e0e0dbaab4bbf0af834b3 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 17:34:56 2010 +0300 xfree86/xv: Provide a ModeSet hook Reput all ports when the display mode or panning has been changed by RandR code. This makes the overlays appear in the correct position on the screen. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 640c8716e0400e35afd7e91efc826fc447ea6745 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Thu Oct 28 18:13:02 2010 +0300 xfree86/modes: Provide a ModeSet hook in ScrnInfo Add a new hook ModeSet that will be called after display mode is changed, or after the display has been panned. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit a942534ca3908418c407115c6393263c2fe05931 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Nov 2 16:05:13 2010 +0200 xfree86/xv: Pass all coordinate arguments to ReputImage Pass all of the src/dst coordinates to ReputImage so that drivers don't necessarily have to do double bookkeeping. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 0fef4e94480f2bf1157ce5f92fcb0c7dd1585371 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Nov 2 16:23:02 2010 +0200 xfree86/xv: Document VIDEO_CLIP_TO_VIEWPORT incompatibility with reput Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 5f8ec1ade8b485f48de8c72011409219afad9dd7 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Nov 2 16:04:36 2010 +0200 xfree86/xv: Add some helpful comments about ReputImage Document the fact that ReputImage is used for stills as well as images. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit b4ebde23d25bef1b891902d75b2db3aad92685b7 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Nov 1 20:27:25 2010 +0200 xfree86/xv: Fix ReputImage clipping PutImage/PutStill respect the GC clip, however ReputImage does not. PutImage/PutStill are supposed to be oneshot operations so ReputImage should never expand the area covered by the clip, instead it should only shrink if the window clip shrinks. So commandeer clientClip into use by ReputImage and initially make it a copy of the original GC composite clip. Whenever ReputImage needs reclipping update clientClip with the newly calculated composite clip. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 7294236bdb29b4fa7a7bc27aff9c786c5a33c544 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Nov 1 20:02:40 2010 +0200 xfree86/xv: Remove clipOrg from XvPortRecPrivate clipOrg never changes except when clientClip changes, so instead of keeping copies of both originals translate clientClip by clipOrg immediately and just keep the translated clientClip. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 47d8bd0a999693f47fd244dc876ef7f8fcd52854 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 17:31:14 2010 +0300 xfree86/xv: Factor out the meat of xf86XVAdjustFrame for later reuse No functional change. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 3d4d0237a3981820a9b7290f69c7172a48659a10 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 17:14:34 2010 +0300 xfree86/xv: Change the behaviour of AdjustFrame to reput everything Also reput PutVideo/GetVideo ports in AdjustFrame. This makes the overlay track the screen panning instead of staying stationary in the wrong place. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit d794be81218934ad4580211c7a0a27cb71eb5d60 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 18:07:32 2010 +0300 xfree86/xv: No need to free composite clip in AdjustFrame Nothing should change in AdjustFrame that would need the composite clip to be recomputed. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 6051c7e940767b7120ad9c7e9188aee6a6f62b94 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 17:05:02 2010 +0300 xfree86/xv: Change the behaviour of ClipNotify to reput instead of stop When ClipNotify gets called for a visible window, reput instead of stopping the port. This eliminates nasty overlay flickering that happens during clip changes. If the window is invisible or if ReputImage isn't supported stop and remove the port from the window as was done before. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 27707ac5bdf6831630944f02f2128951a529faab Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 17:00:24 2010 +0300 xfree86/xv: Allow xf86XVReputOrStopPort() to stop PutVideo/GetVideo ports Modify xf86XVReputOrStopPort() to allow stopping of all types of ports. Will be useful later. No functional change. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 38987aae199982f17eae664f3a28ff5941d3ee73 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 16:51:24 2010 +0300 xfree86/xv: Factor out the meat of xf86XVWindowExposures for later reuse No fucntional change. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 0178173f0579c4b9dd0cf60b9cd3e5d264f86ae4 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 16:39:13 2010 +0300 xfree86/xv: Eliminate two open coded copies of xf86XVRemovePortFromWindow No functional change. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit b02858b5af47d524001ec571737cc92f6a6f06d3 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Fri Oct 29 16:54:42 2010 +0300 xfree86/xv: Remove useless NULL check from ClipNotify WinPriv->PortRec should never be NULL as WinPriv itself would be removed from the list when the port is removed from the window. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de> commit 23e3d1f23318ce69623f91908f888a09f8b74ac2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 26 10:00:49 2010 +1000 dix: remove now unnecessary !! before BitIsOn() The macro has been changed to do this already, no need for double not-not-ing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 42dc91e32a02b6b21ff5c45f465f3349e5822615 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Nov 24 14:20:30 2010 +1000 include: let BitIsOn() return a boolean value. Simply returning the mask bit breaks checks like BitIsOn(mask, 0) != BitIsOn(mask, 1); as used in 048e93593e3f7a99a7d2a219e1ce2bdc9d407807. The naming of this macro suggests that it should return boolean values anyway. This patch also adds a few simple tests for these macros to make sure they don't accidentally break in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Pat Kane <pekane52@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> commit 4e0f8f666e61390206c42ad2087477a912525bc7 Merge: 400ddf2f5 639600fa7 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 24 11:47:33 2010 -0800 Merge remote branch 'whot/for-keith' commit 400ddf2f58ce673c74d4e8ee829729cd3c75f8c9 Merge: 7250f078c e074f745a Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 24 11:46:18 2010 -0800 Merge remote branch 'jeremyhu/master' commit 7250f078c12fd20d5ac9150f54495926e5121461 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:58 2010 -0500 doc: refactor Makefile and xmlrules.in code for reusability A different approach which requires less variables setting and internal knowledge of the reused code. Changing from "install" to "not install" is very easy now. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit f33512b70cf0350a62df2ee2287a870d5fc991a8 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:57 2010 -0500 xmlrules.in: use $(top_srcdir) rather than ../../../ [...] Relative paths don't always work in distcheck when srcdir not = builddir include $(top_srcdir)/doc/xml/xmlrules.in Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit c25b407f22456f50eef90d9bc5e026c05415c021 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:56 2010 -0500 xmlrules.in: specify the xserver entities depedencies on the target The generated docs will rebuild when the xserver.ent file changes. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 73841074eb856e6be3b9f9e3fc2d2721443166ab Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:55 2010 -0500 xmlrules.in: use pattern rules to enable dependencies This will allow a dependency to be specified as done in libX11: %.html: %.xml $(dist_spec_DATA) $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 97e307dda201d6ba28a723c21a95e484921d1b08 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:54 2010 -0500 xmlrules.in: no need to setup xmlto flags when configuring --without-xmlto The AM conditional HAVE_XMLTO should wrap more statements. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1a7b14d1183057fc69a5da446e898104b65c8347 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:53 2010 -0500 xmlrules.in: remove unrequired "@rm -f $@" from doc targets Unable to find a purpose for this, not used anywhere else but in the font module. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d3c523bd124dc1a3f4539f7f6cd4868adbfc25e1 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Nov 21 14:27:52 2010 -0500 doc: HTML file generation: use the installed copy of xorg.css Currently the xorg.css file is copied in each location where a DocBook/XML file resides. This produces about 70 copies in the $(docdir) install tree for all of xorg. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 504e3010e976ccc008ff48417850b594beaee2ec Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Nov 19 22:09:05 2010 -0800 Xorg.man: Replace XDarwin reference with Xquartz Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 566d09a5cd6452ee2e05e23d2205e7c3aa31f0da Author: Bill Nottingham <notting@redhat.com> Date: Mon Nov 15 11:25:14 2010 +1000 xfree86: store the screen's gamma information on init. This fixes a gamma issue on vt switch observed with KDM. VT switching away and back would result in a black screen. Avoid this by storing the current gamma information on init. https://bugzilla.redhat.com/show_bug.cgi?id=533217 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c050aa2f5fa6a7ff8ce4f91def14ca44f799f067 Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 15 11:25:12 2010 +1000 xfree86: apply gamma settings on EnterVT. When entering the VT, re-apply the saved gamma settings for each screen. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e074f745a80b87d1d82fb39489d7f35163d7552a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Nov 23 16:03:48 2010 -0800 XQuartz: Remove unused CloseInputDevice stub Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 639600fa7ebad7a4953d0b632abeff2d339a49c6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 13:30:05 2010 +1000 dix: add a fixme about a corner-case that should probably be fixed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 0aca9e8424d8b978053a29c4468f800fc2e7238c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 13:04:19 2010 +1000 dix: fix typo, set the second valuator with the y-axis data. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 45131bb67f9eacb3b55de4bcd3730fb9bb028e8a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 12:55:50 2010 +1000 dix: GetProximityEvents needs to check up to the last valuator valuator_mask_size() returns the highest valuator set as opposed to the number of set bits (which obviously changes as we unset valuators). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 048e93593e3f7a99a7d2a219e1ce2bdc9d407807 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 11:15:52 2010 +1000 dix: when converting to XI 1.x events, use the first_valuator's device mode Don't stop processing events when a valuator's mode doesn't match the 0th valuator's mode. Instead, start with the first_valuator in the event and keep stacking them on until the first valuator with a different mode is hit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4f3e670fd28fceec384ff0d4ca7c1ff8d7a872ad Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 10:59:52 2010 +1000 dix: when comparing axis modes, compare the bits, not the bytes. The DeviceEvent's mode field is a set of bits for each valuator, not bytes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6f12934d4ea52f17ac7b21e92f4f929db165f83d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 23 10:58:32 2010 +1000 dix: replace a manual valuator check with valuator_get_mode(). This check was missing the OutOfProximity mask and resulted in the wrong bits being set in InternalEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit ebe3ddaf284ad388835da9cbaa6ad61fa21ce6dd Author: Simon Thum <simon.thum@gmx.de> Date: Fri Nov 19 11:09:21 2010 +1000 dix: fix up valuators passed to acceleration code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit d435e1ecb86e2fe6292b5945262956644f979bbb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 5 11:08:27 2010 +1000 test: reduce range of byte-padding macro tests. Byte padding and conversion is interesting for the rage of 0-8 bytes, and then interesting towards the end of the valid range (INT_MAX - 7 and INT_MAX - 3). Note: this changes the upper range for pad_to_int32() and bytes_to_int32() from the previous (INT_MAX - 4) to (INT_MAX - 3). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit f49ee9074a66883a3c525b0d6e71589123288465 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 5 10:59:52 2010 +1000 test: compare byte padding macros against the expected bytes. We calculate the expected bytes for each value, let's use it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit b31df0439fe336a43a2355e2f1fb223d86045a05 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Nov 22 15:14:02 2010 +1000 xfree86: add missing linebreak in error message. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net> commit 97b9bb1e2cebbb769ef347455d9c7979d19de99f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Nov 22 20:43:14 2010 -0800 XQuartz: Localization Updates Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f9fbafa1a07f951e89f208bf4928a0bf37b67cfe Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Nov 22 20:41:39 2010 -0800 XQuartz: Remove existing localization files on install to avoid conflicts Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 6eed13ad5998ba80296bba2bb3f89928ee51194a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Nov 22 20:25:33 2010 -0800 XQuartz dri: Don't check CoreGraphics version The version check is hackish, and I highly doubt anyone using this code is on a version of OS X that predates this support (10.2 has support for it). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit a4698754c1da1cf2ca64add5276d0c6012960504 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Nov 21 10:49:24 2010 -0800 XQuartz: Add pointer debugging Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 31737fff08ec19b394837341d5e358ec401f5cd8 Author: Chase Douglas <chase.douglas@ubuntu.com> Date: Mon Nov 15 11:42:12 2010 -0500 Fix transformAbsolute transformAbsolute must use old values if valuator mask doesn't have new ones, and it must only set new values if there was a change. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 463841f45aafd1227bac652965c9ea337dd527fa Author: Chase Douglas <chase.douglas@ubuntu.com> Date: Mon Nov 15 11:42:11 2010 -0500 Fix GPE Y axis scaling Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a6b9e8f1e5d5d0b3b0f121a6f677eeca7aab1950 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 25 11:06:38 2010 -0400 linux: Fix CPU usage bug in console fd flushing If the vt gets a vhangup from under us, then the tty will appear ready in select(), but trying to tcflush() it will return -EIO, so we'll spin around at 100% CPU for no reason. Notice this condition and unregister the handler if it happens. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ecdbe817fd7eb53fd1e7485c0492355f7f002d2a Author: Dan Horák <dan@danny.cz> Date: Tue Jun 22 19:45:26 2010 +0200 XF86CONFIGDIR is undefined when built with --disable-xorg (#28672) The 10-evdev.conf file gets installed as /usr/share/X11/10-evdev.conf on platforms that built the server with --disable-xorg like s390/s390x. The definition/installation should be guarded with "if XORG" because it makes sense only when built with xorg. X.Org Bug 28672 <http://bugs.freedesktop.org/show_bug.cgi?id=28672> Signed-off-by: Dan Horák <dan@danny.cz> Acked-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38c46ccf796462d068d95acb9022de2acfc3a1f7 Merge: 3051dd513 c8998af3e Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 15 09:06:33 2010 +0800 Merge remote branch 'whot/for-keith' commit 3051dd5135962283fc6c7de377a7c819d8a04e7f Merge: ed547a9fc c5975722a Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 15 08:58:02 2010 +0800 Merge remote branch 'jeremyhu/master' commit ed547a9fc8a4f5cd95ef882b656a376c163eda6d Merge: 78f94f19a 84e8de127 Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 15 08:51:27 2010 +0800 Merge remote branch 'adkins/master' commit 78f94f19aab66a1e5331df0ce29f36e310b4195d Author: Linus Arver <linusarver@gmail.com> Date: Sun Oct 17 12:26:01 2010 -0700 Xext: panoramiXprocs: fix typo This fixes a typo introduced in commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1. The pointer pDst was changed unintentionally to pWin from a copy/paste error. This resulted in all QT-based apps and some tcl/tk ones (like fontforge) to crash X 1.9 on starting up, when Xinerama was enabled. Bug report: https://bbs.archlinux.org/viewtopic.php?id=106125 Signed-off-by: Elie Bleton <drozofil@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Tested-by: Linus Arver <linusarver@gmail.com> commit c8998af3eba49a542625912d512087e4eaaf5ede Author: Cyril Brulebois <kibi@debian.org> Date: Sat Nov 13 02:05:16 2010 +0100 xfree86: Initialize Pointer and Keyboard. That helps us get rid of: | CC xf86Config.lo | xf86Config.c: In function ‘T.174’: | xf86Config.c:1228: warning: ‘Pointer$module’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$module’ was declared here | xf86Config.c:1228: warning: ‘Pointer$drv’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$drv’ was declared here | xf86Config.c:1228: warning: ‘Pointer$type_name’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$type_name’ was declared here | xf86Config.c:1228: warning: ‘Pointer$private’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$private’ was declared here | xf86Config.c:1228: warning: ‘Pointer$dev’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$dev’ was declared here | xf86Config.c:1228: warning: ‘Pointer$fd’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$fd’ was declared here | xf86Config.c:1228: warning: ‘Pointer$set_device_valuators’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$set_device_valuators’ was declared here | xf86Config.c:1228: warning: ‘Pointer$switch_mode’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$switch_mode’ was declared here | xf86Config.c:1228: warning: ‘Pointer$control_proc’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$control_proc’ was declared here | xf86Config.c:1228: warning: ‘Pointer$read_input’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$read_input’ was declared here | xf86Config.c:1228: warning: ‘Pointer$device_control’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$device_control’ was declared here | xf86Config.c:1228: warning: ‘Pointer$flags’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$flags’ was declared here | xf86Config.c:1228: warning: ‘Pointer$next’ may be used uninitialized in this function | xf86Config.c:1097: note: ‘Pointer$next’ was declared here Signed-off-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 98abac809a024ac3ed9dd0514ca96367f668c05d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Nov 11 23:06:13 2010 +0000 Fix compilation after input API change Fix compilation after commit 675f4a8525d29ebad783351e17be785b2f32b2e8 converts winmouse.c to the new ValuatorMask input API, but doesn't include the required header inpututil.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c5975722a95c41b8715a4612fc1c3275f8e9b59e Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Nov 13 16:04:10 2010 -0800 XQuartz: Fix make distcheck Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Cyril Brulebois <kibi@debian.org> commit 7b33ef74738d6a557cb25aeb14693b2a340c0e12 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Nov 13 15:46:16 2010 -0800 dix: Fix make distcheck Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 965e709f2b0b17f1e59e5aeb5e7717fede51ef97 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Nov 11 17:23:33 2010 -0800 XQuartz: Build-fixes for XQuartz for recent input API changes Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit fa50670c32637faff6bb91f1206a0e3c17a9bada Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 12 11:48:08 2010 +1000 xfree86: rename allowEmptyInput to forceInputDevices. This is a more accurate name for the actual functionality than allowEmptyInput. Historically, allowEmptyInput has allowed the server to start with no input devices. Since 1.4 and the introduction of VCP and VCK, there are always two input devices present. allowEmptyInput was changed in behaviour to essentially "ignore xorg.conf devices or not", auto-adding the built-in devices if disabled. Rename to forceInputDevices, because that's essentially what it does. When disabled (i.e. when hotplugging is enabled), it disables all mouse/kbd/vmmouse devices configured in the xorg.conf file. When enabled, it forces the traditional behaviour for input devices: - use input devices configured in the server layout - if none are configured, use the first pointer and the first keyboard device in the xorg.conf - if none are configured, create the default pointer/keyboard devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit c481dae0dc89d8d50cac23210023d75bfaf6012b Author: Cyril Brulebois <kibi@debian.org> Date: Thu Nov 11 23:55:55 2010 +0100 test: Fix missing xkbsrv.h include. Otherwise, building fails with CFLAGS="-Wall -Werror" this way: | protocol-common.c: In function ‘init_simple’: | protocol-common.c:159: error: implicit declaration of function ‘XkbInitPrivates’ | protocol-common.c:159: error: nested extern declaration of ‘XkbInitPrivates’ Signed-off-by: Cyril Brulebois <kibi@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b8114f25b266624c8f73d03c710349f98693d877 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 12 08:32:05 2010 +1000 dix: fix typo in setting valuator modes (#21548) X.Org Bug 31548 <http://bugs.freedesktop.org/show_bug.cgi?id=31548> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Cyril Brulebois <kibi@debian.org> commit 5cd11d2356d153840f1b429bdb8284367f8dc468 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 9 17:10:57 2010 +1000 Xi: move property reset from extension shutdown to init. If any part of the stack calls XIGetKnownProperty during device shutdown the property is re-initialized before the server generation resets, leaving the value invalid again. Move the reset to the extension init which happens before input devices are initialized before the first property is requested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit da66119593b63ef82ae6fa2e034ccd0856b03a80 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Nov 10 21:48:04 2010 +0200 dix: fix root window background behaviour for protocol calls Instead always paint root tiled (-retro like), protocol calls (XSetWindowBackgroundPixmap and related) should behave accordingly when None and ParentRelative is set as background pixmap. It follow what the protocol states: "changing the background of a root window to None or ParentRelative restores the default background pixmap". Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> commit 8976e9766edfb33f5cf3f6d54f09e46d29bc4ec5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Nov 10 21:48:03 2010 +0200 dix: adds support for none root window background It lets the driver notify the server whether it can draw a background when '-background none' option is used by the system platform. Use cases for that could be video drivers performing mode-setting in kernel time, before X is up, so a seamless transition would happen until X clients start to show up. If the driver can copy the framebuffer cleanly then it can set the flag (canDoBGNoneRoot), otherwise the server will fallback to the normal behaviour. The system must explicit indicates willingness of doing so through '-background none'. We could do this option as default; in such case, malicious users would be able to steal the framebuffer with a bit of tricks. For instance, I can see the content of my nVidia Quadro FX 580 framebuffer old X session modifying a bit nv driver: xf86DPMSInit(pScreen, xf86DPMSSet, 0); - /* Clear the screen */ - if(pNv->xaa) { - /* Use the acceleration engine */ - pNv->xaa->SetupForSolidFill(pScrn, 0, GXcopy, ~0); - pNv->xaa->SubsequentSolidFillRect(pScrn, - 0, 0, pScrn->displayWidth, pNv->offscreenHeight); - G80DmaKickoff(pNv); - } else { - /* Use a slow software clear path */ - memset(pNv->mem, 0, pitch * pNv->offscreenHeight); - } + pScreen->canDoBGNoneRoot = TRUE; The commit is originally based on discussions happened on xorg-devel: http://lists.freedesktop.org/archives/xorg-devel/2010-June/009755.html Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi> Acked-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit bfe9cdd11bcb60cf33dc48136ebee028001a737e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Oct 20 17:54:58 2010 -0200 dix: delete logo hack screen saver Protocol doesn't mention about screen saver with logo being required and people are already using more intelligent ways to draw screen saver themes. So consider -logo as deprecated option, deleting its code. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 84e8de1271bb11b5b4b9747ae4647f47333a8ab7 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Nov 10 21:37:24 2010 -0800 fb: Remove fbcmap.c (bug 5436) This is obsolete since a240c039c47c0be22ea5e100692307b26d938747. Updated fb.h to mention that the functions come from fbcmap_mi.c now. Dropped fbcmap.c from the makefile. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 23e329b5641ef044c34ac712c9193171eaf47198 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Nov 10 21:35:58 2010 -0800 xfree86: parser: Remove 'CUSTOM' flag option in Monitor section. Not used in the initial import, and also not documented. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 88cb61e1e55c54982b90e2a77465faaac6a0ba89 Merge: 19f43836d 4ed4915bc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Nov 11 12:54:46 2010 +1000 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-api Conflicts: dix/getevents.c hw/xfree86/common/xf86Xinput.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4ed4915bc0fbe9b4419ca4a0d4e43c2fee032ae9 Merge: 291c39dfe ec1bfbc66 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 10 16:58:21 2010 -0800 Merge remote branch 'whot/for-keith' commit ec1bfbc66926130e1153facc3b92ee175f1cb6b6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 9 15:27:26 2010 +1000 xfree86: remove user-configured AllowEmptyInput An estimated 100% (rounded down to the nearest percent) of the people who have this in their configuration don't actually know what this option does. Protect the users from themselves. IIRC, AEI on was useful for some time between 1.4 and 1.5 and never since. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit cbaa6a66e0f9e3b7e305606924ecda0147b59e96 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 9 15:21:23 2010 +1000 config: remove mention of AllowEmptyInput "You will probably want to add the following option to the ServerFlags of your xorg.conf: Option "AllowEmptyInput" "True"" I can't imagine why you would want to do that. My life is painful enough already. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 291c39dfef84d1b204d7f5e63e925dee2dbdaca7 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Nov 9 13:33:55 2010 -0800 DOC: Only build dtrace documentation with --enable-docs Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f0b4df99486066ad0e638b3b5debc905bc8ef1c4 Author: Adam Jackson <ajax@redhat.com> Date: Sat Sep 11 17:55:57 2010 -0400 shadow: Optimize shadowUpdatePacked(). (#26973) Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Soren Sandmann <sandmann@daimi.au.dk> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c9c0f93f8ed42413a05193ee71c69fa6b41f6a03 Merge: 73f6de1ad 4132b1c59 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 10 16:11:29 2010 -0800 Merge remote branch 'whot/for-keith' commit 73f6de1ad8b5e1641102b54ff48a36ebb99ccacb Merge: 333b6ed26 3dc3aefb8 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 10 16:02:22 2010 -0800 Merge remote branch 'sandmann/fbdelete' commit 333b6ed26e36735ef72f314a3f8c4ec565af223f Author: Kristian Høgsberg <krh@bitplanet.net> Date: Thu Oct 28 20:46:23 2010 -0700 Set DamageSetReportAfterOp to true for the damage extension Change the damage extension reporter to queue up events after we chain to the wrapped functions. Damage events are typically sent out after the rendering happens anyway, since we submit batch buffers from the flush callback chain and then flush client io buffers. Compositing managers relie on this order, and there is no way we could reliably provide damage events to clients before the rendering happens anyway. By queueing up the damage events before the rendering happens, there's a risk that the client io buffer may overflow and send the damage events to the client before the driver has even seen the rendering request. Reporting damage events after the rendering fixes this corner case and better corresponds with how we expect this to work. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> (cherry picked from commit 8d7b7a0d71e0b89321b3341b781bc8845386def6) [anholt: re-applied to revert the revert, now that the cause of the revert is fixed] Signed-off-by: Keith Packard <keithp@keithp.com> commit f36153e3ef6b13a87d016caab09cc9be274b0dd5 Author: Eric Anholt <eric@anholt.net> Date: Thu Oct 28 20:46:22 2010 -0700 Replace usage of DamageRegionAppend with DamageDamageRegion to fix reportAfter. In all these cases, any rendering implied by this damage has already occurred, and we want to get the damage out to the client. Some of the DamageRegionAppend calls were explicitly telling damage to flush the reportAfter damage out, but not all. Bug #30260. Fixes the compiz wallpaper plugin with client damage changed to reportAfter. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c80c41767eb101e9dbd8393d8cca7764b4e248a4 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Oct 25 22:01:32 2010 -0700 os: Fix BigReq ignoring when another request is pending Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of BigReq requests that are way too large and handles the case where the read() syscall returns a short read. However, it neglected to handle the case where it returns a long read, which happens when the client has another request in the queue after the bogus large one. Handle the long read case by subtracting the smaller of 'needed' and 'gotnow' from oci->ignoreBytes. If needed < gotnow, simply subtract the two, leaving gotnow equal to the number of extra bytes read. Since the code immediately following the (oci->ignoreBytes > 0) block tries to handle the next request, advance oci->bufptr immediately instead of setting oci->lenLastReq and letting the next call to ReadRequestFromClient do it. Fixes the XTS pChangeKeyboardMapping-3 test. CASES TESTS PASS UNSUP UNTST NOTIU WARN FIP FAIL UNRES UNIN ABORT -Xproto 122 389 367 2 19 0 0 0 1 0 0 0 +Xproto 122 389 368 2 19 0 0 0 0 0 0 0 Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cc2c73ddcb4370a7c3ad439cda4da825156c26c9 Author: Luc Verhaegen <libv@skynet.be> Date: Sun Oct 24 23:57:06 2010 +0200 x86emu: fix jump_near_IMM to handle DATA: flag correctly. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=24348 Before (data flag ignored -> broken): 66 DATA: e944f1 JMP 1ff6 After (fixed): 66 DATA: e944f1ffff JMP 00001ff8 This subtle difference in the length of decoded instruction meant that the VBE call jumped to the routine setting AX=0x14F (VBE Failed) instead of the routine that set AX=0x4F (VBE success). The ability to run the same code in vm86 significantly aided the debugging of this issue. Those X.org developers who would like to drop vm86 better take special care towards _all_ vesa bugs, as those will expose further issues. Patch applies easily to even xserver 1.4.2. Signed-off-by: Luc Verhaegen <libv@skynet.be> Tested-by: Luc Verhaegen <libv@skynet.be> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit be7cf14c365c8ee0d69c4335e01316bcfcba69a4 Author: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> Date: Tue Oct 26 09:11:53 2010 +0530 mi: Integer overflow for dashed lines longer than 46340. #31093 Lines of length greater than 46340 can be drawn with one of the coordinates being negative. However for dashed lines, miPolyBuildPoly overflows the int type when setting up edges for a section of the dashed line. This results in the dashed segments not being drawn at all. Signed-off-by: Siddhesh Poyarekar <siddhesh.poyarekar@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a6c64d96456d794b2f3ce40915922a3fba636b95 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sun Oct 24 15:18:28 2010 +0200 Do not trap access to timer and keyboard Disable timer/keyboard trapping on GNU/Hurd for now Trapping disabled for now, as some VBIOSes (mga-g450 notably) use these ports, and the int10 wrapper is not emulating them. It's effectively what happens in the Linux variant too, as iopl() is used there, making the ioperm() meaningless. Signed-off-by: Olaf Buddenhagen <antrik@users.sf.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 69e8e1b0b95a325da3e3a2d76d092e7131baa9ad Author: Julien Cristau <jcristau@debian.org> Date: Mon May 17 19:39:54 2010 +0200 os: include dix-config.h, not xorg-config.h os/strlc{at,py}.c were trying to include xorg-config.h, which is not available in dix. Signed-off-by: Julien Cristau <jcristau@debian.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit acba00c0c1129fe4ef7655f018cd21dbb1ee9a1f Merge: 383dfe23f 44e816541 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 10 14:41:08 2010 -0800 Merge remote branch 'dottedmag/master' commit 383dfe23f1641435c0713f8a56424814a156af8e Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Oct 25 17:13:57 2010 +0300 DRI2: Avoid call to NULL pointer DDX driver may implement schedule swap without GetMSC. In that case we can't call GetMSC in DRI2SwapBuffers. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> CC: Keith Packard <keithp@keithp.com> CC: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 68e4a628d65312df93cc71f3e76241584c4bbd23 Author: Cyril Brulebois <kibi@debian.org> Date: Wed Nov 10 15:28:29 2010 +0100 Remove more superfluous if(p!=NULL) checks around free(p). This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) { - free(E); - } + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b142b0d27442191d628762604f4eb1f65263d717 Author: Cyril Brulebois <kibi@debian.org> Date: Mon Nov 8 23:35:33 2010 +0100 Remove more superfluous if(p!=NULL) checks around free(p). This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) - free(E); + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0649ac0afdb3f8ed11c2634563d6b9df161cb9ec Author: Cyril Brulebois <kibi@debian.org> Date: Mon Nov 8 23:35:32 2010 +0100 Remove more superfluous if(p) checks around free(p). This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E) - free(E); + free(E); Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 99275ad2fa99778afaefc54b62c8638afc59e755 Author: Cyril Brulebois <kibi@debian.org> Date: Wed Nov 10 16:06:10 2010 +0100 Remove superfluous if(p!=NULL) checks around free(p); p=NULL; This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ - if (E != NULL) { - free(E); ( - E = NULL; | - E = 0; ) - } + free(E); + E = NULL; Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9e999d18b004b8ead9c6c5d79b4a3d4bbf0e3152 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 5 12:08:11 2010 +1000 Xi: if XTEST device creation fails, fail the master devices. When getting close to the MAXDEVICES limit, the creation of XTEST devices may fail due to device id exhaustion. In that case, fail the creation of master devices too and return an error to the client. Theoretically, we could alloc the MDs without the XTEST devices but that will get interesting when a client starts sending XTEST events through those devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 5a455e0c80d433adc4109ebf313fd92afa194545 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 5 11:49:12 2010 +1000 Xi: rename two variables from ptr to dev. They were named ptr when everything was in one function to save one more variable. Now that the stuff is split out, "dev" makes more sense. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 9b89b91c685426c9944f7fc8890f436c18b7583c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 5 11:47:43 2010 +1000 Xi: split hierarchy manipulation into static functions. No functional changes, just code cleanup to improve readability. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 4132b1c591bd01c29df91b88afbd144647da9ed8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 21 14:04:42 2010 +1000 xfree86: fix compiler warnings - unused variable i ../../../../hw/xfree86/common/xf86Config.c: In function 'configDRI': ../../../../hw/xfree86/common/xf86Config.c:2213:9: warning: unused variable 'i' Introduced in 788bfbf18ac19923604b0d676933fdc0d78526a1 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 6b982d73bb8878238ed46665b220a94a591e11a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 21 13:53:35 2010 +1000 xfree86: fix two compiler warnings - unused variable ati, atimisc ../../../../hw/xfree86/common/xf86Config.c: In function 'fixup_video_driver_list': ../../../../hw/xfree86/common/xf86Config.c:507:19: warning: unused variable 'atimisc' ../../../../hw/xfree86/common/xf86Config.c:507:12: warning: unused variable 'ati' Introduced in 52577ae8eeda64601db8dd425027cf8e4271b873. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 0799f0771cca335d6400a8494ba236a0d10e122b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Nov 4 12:53:18 2010 +1000 xfree86: remove two unused variables from Makefile.am Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit a52efb096e166e325deb3d6b502671f339a4fa15 Merge: fe8d122b1 f72aadd38 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 3 06:50:45 2010 -0700 Merge remote branch 'sthibaul/master-iopl' commit 3dc3aefb88c167d365795dcd44017742c52e4967 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Nov 1 22:23:05 2010 -0400 fb: Delete a bunch more left-overs All of these definitions were unused since compositing moved to pixman. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 565b5e2b0261d1148cc2707ffcbb915414dd3e02 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Nov 1 22:14:29 2010 -0400 wfb: Delete unused renamings These functions haven't existed in a while. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 0dae479e16590e767df35985150c5acf696e5df2 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Nov 1 22:17:08 2010 -0400 fb: Delete fbCompositeGeneral() This function was an unused and trivial wrapper around fbComposite(). Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 74bc2d8c6bafc5373ff9c14eed12e26b5b965953 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Nov 1 22:12:03 2010 -0400 render: Delete renderedge.[ch] The functions in these files have not been used since trap rasterization was moved to pixman. They survived until now to preserve the server abi. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit 6118346d64e3c2fbe1fe2f041ea773dd2a3c0438 Author: Søren Sandmann Pedersen <ssp@redhat.com> Date: Mon Nov 1 22:04:49 2010 -0400 Delete unused fbWalkCompositeRegion() This function has not been used since most of the compositing was moved to pixman. The only reason it has survived until now is that it was part of the server ABI. Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Søren Sandmann <ssp@redhat.com> commit fe8d122b133a43125cc961d2c3c811fa776f29c8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 28 16:13:09 2010 +1000 Xi: reshuffle conditions for labeling a device as IsXExtensionKeyboard (#29046) From the original bug reporter Ezra Reeves: "I did some more digging on this today, and I found that an HP branded wireless USB mouse has the same issue. With this mouse (as well as the logitech wireless mouse), the return from: xdev = XListInputDevices(GDK_WINDOW_XDISPLAY(rootwin), &ndevices_return); lists the USB device twice, but both have xdev[num].use == 3 (IsXExtensionKeyboard as defined in X11/XI.h). [...] Swapping the order of the test in Xi/listdev.c that determines whether a device is a pointer or a keyboard properly detects my devices (OEM USB wireless mouse/kb combo) -- one as a keyboard and one as a pointer." X.Org Bug 29046 <http://bugs.freedesktop.org/show_bug.cgi?id=29046> Reported-by: Erik Kilfoil <ekilfoil@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a210068c5222acbdb04db17cb8cef314735bf977 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Oct 26 20:50:13 2010 +0300 dix: advance parent window pointer when no node is found Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 19f43836d1006d253391926e880b14ed2e7a0cf8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 25 15:10:19 2010 +1000 Re-export xf86CollectInputOptions. Some drivers, most notably the mouse driver need this and reimplementing on the driver side doesn't make sense. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4613ce3f78a32f2a6f422e719150d55b035c758e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 15:17:50 2010 +1000 test: valuator_mode tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 58554f1c6429535e7ab432c920aabca71a77edb8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 15:10:32 2010 +1000 Convert some leftover axes->mode access to valuator_get_mode() Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 44e81654147065b7b907ce0d14fdc2e74a638f79 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Oct 25 01:30:33 2010 +0400 Remove now-misleading comment Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 433dddcf29d257310e95e4215dceef8b0b976e2d Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Oct 25 01:28:38 2010 +0400 Replace "if(buf) realloc(buf, size) else malloc(size)" with realloc() Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 04a04e162886ca9bc3977d3a7509def876487921 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Oct 25 01:27:46 2010 +0400 Remove now-misleading comment Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit f72aadd38b730c46c0a027dacbbb57f03068383d Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Oct 23 22:42:33 2010 +0200 hurd: Fix use of deprecated iopl device Fix Xserver on GNU/Hurd into using the "mem" device instead of the deprecated "iopl" device. Reviewed-by: Olaf Buddenhagen <antrik@users.sf.net> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> commit dd11f734a9a73bf34357c149d2809842938d57b5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 16:11:24 2010 +1000 input: remove "mode" field from ValuatorClassRec. We have per-axis mode now. For those bits that still need it (XI 1.x), assume that the first axis holds the device's mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 5cf3b654fccf09de63a3f983c85096cda78fb693 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 15:49:40 2010 +1000 input: move proximity state into ProximityClassRec. Previously the OutOfProximity bit in the valuator mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit e909af88bf17dbadcc00d50c13a5bdb6001367be Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 14:22:44 2010 +1000 dmx: clarify a valuator mode condition. Relative is defined as 0, so change the condition to be more obvious. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit b5ef88c911f697530ddc2c7302fce15ba2ead4b2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 14:02:17 2010 +1000 dix: clip absolute axes depending on their mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit ea567b675f814ac41e75f1ed8ded0ac3e9d552a8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 14:01:11 2010 +1000 dix: populate motion history only if the mode matches the first axis. XI1 doesn't cater for mixed mode devices, so bail out on the first valuator that has a different mode. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 4381b70f5aa293400735e9b4e5a792408afa25a2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 13:57:27 2010 +1000 input: add valuator_get_mode() helper. Returns the mode of the specified valuator. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 6f6f460c2485d16d126a1ab5d939083c322dc3dd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 22 13:48:06 2010 +1000 dix: send proximity events if one or more axes are Absolute. We only skip relative events for proximity, not absolute ones. Now with mixed mode, just unset those axes that are relative. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 65c0fc81eb920085e650b8c9e874c9dd26c7ec98 Author: Chase Douglas <chase.douglas@canonical.com> Date: Fri Jul 16 09:21:19 2010 -0400 Add support for per-axis valuator modes (Relative/Absolute) The XI2 protocol supports per-axis modes, but the server so far does not. This change adds support in the server. A complication is the fact that XI1 does not support per-axis modes. The solution provided here is to set a per-device mode that defines the mode of at least the first two valuators (X and Y). Note that initializing the first two axes to a different mode than the device mode will fail. For XI1 events, any axes following the first two that have the same mode will be sent to clients, up to the first axis that has a different mode. Thus, if a device has relative, then absolute, then relative mode axes, only the first block of relative axes will be sent over XI1. Since the XI2 protocol supports per-axis modes, all axes are sent to the client. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> commit 290af0418f8c94355e42ad81aa7779b90e173fc9 Author: Chase Douglas <chase.douglas@ubuntu.com> Date: Thu Oct 21 22:41:09 2010 -0400 test: input - set valuators mask for event to core conversion Commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 adds a requirement to event to core conversion that at least one of the X or Y valuators are set in the valuator mask. This commit fixes the event conversion test to be compliant. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8990b31214bcbc08090604147287455bfde91c11 Author: Paulius Zaleckas <paulius.zaleckas@gmail.com> Date: Mon Oct 18 00:02:01 2010 +0300 KDrive: Fix error handlig in tslib driver If ts_open() fails and return NULL, then next call to ts_fd() segfaults because of NULL dereference. There is no need to check output of ts_fd() as ts_open() did this internally. Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9696c782c8cb86b06d12949899582533a2e04cfe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Oct 19 12:52:57 2010 +1000 test: valuator_mask tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 2362adc2da9745e01c79ed4905aa81926355c4e2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Oct 19 10:59:09 2010 +1000 dix: remove valuator_mask_copy_valuators, not needed anymore. With the switch to masks internally, this isn't needed anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 2b04a3ef739a7ba5708400999e5d81418236a0a4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Oct 19 09:58:58 2010 +1000 xfree86: convert xf86Post{Motion|Key|Button|Proximity}Event to masks Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 0418a39e71e50b88e050b0d8a758265b17c4bf0e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 18 15:55:53 2010 +1000 dix: get rid of the now-superfluous valuator arrays in GPE and friends. The valuators are stored inside the mask, use it from there. are stored inside the mask, use it from there. are stored inside the mask, use it from there. are stored inside the mask, use it from there. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 675f4a8525d29ebad783351e17be785b2f32b2e8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Oct 19 13:37:46 2010 +1000 Abstract valuator masks through a set of APIs. This commit introduces an abstraction API for handling masked valuators. The intent is that drivers just allocate a mask, set the data and pass the mask to the server. The actual storage type of the mask is hidden from the drivers. The new calls for drivers are: valuator_mask_new() /* to allocate a valuator mask */ valuator_mask_zero() /* to reset a mask to zero */ valuator_mask_set() /* to set a valuator value */ The new interface to the server is xf86PostMotionEventM() xf86PostButtonEventM() xf86PostKeyboardEventM() xf86PostProximityEventM() all taking a mask instead of the valuator array. The ValuatorMask is currently defined for MAX_VALUATORS fixed size due to memory allocation restrictions in SIGIO handlers. For easier review, a lot of the code still uses separate valuator arrays. This will be fixed in a later patch. This patch was initially written by Chase Douglas. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 1a0d9324b3d9fd93e685066e0e5cea0611878c0d Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Oct 17 09:58:50 2010 -0700 Revert "Set DamageSetReportAfterOp to true for the damage extension" (#30260) This commit breaks the Compiz "Wallpaper" plugin. This reverts commit 8d7b7a0d71e0b89321b3341b781bc8845386def6. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d738175eaf1098e29b8afb6de8e99b5098e366a7 Merge: 8806a04f7 9872e0f01 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 19 22:50:15 2010 -0700 Merge remote branch 'whot/for-keith' commit fc48a8f9f5f66e591b3e39211d44ce68267303f8 Author: Chase Douglas <chase.douglas@canonical.com> Date: Tue Oct 19 13:37:38 2010 +1000 Add CountBits() to the server. Function to count the number of bits set in the given array. Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit 9872e0f0115cd7d0543e55a1831facddf3aff90c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Oct 13 10:31:51 2010 +1000 xfree86: set mask for valuators 0/1 when emulating core events (#30267) EventToCore as of the commit below won't generate core motion events if the valuator mask for x/y isn't set. For DGA, we work around this check by forcibly setting the mask in the event we pass down. commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 17 12:08:52 2010 +1000 dix: don't create core motion events for non-x/y valuators. X.Org Bug 30267 <http://bugs.freedesktop.org/show_bug.cgi?id=30267> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Andrew Randrianasulu <randrik@mail.ru> Tested-by: Andy Furniss Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 649293f6b634e6305b6737a841d6e9d0f0065d6c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 11 16:09:18 2010 +1000 xkb: always fill the symsPerKey array, regardless of client flags (#30527) Even if a client does not modify the symbols, symsPerKey and mapWidths must be filled from the current configuration. Both arrays are then passed into other functions (pending the right flag), thus they must contain valid values regardless of the XkbKeySymsMask flag in req->present. X.Org Bug 30527 <http://bugs.freedesktop.org/show_bug.cgi?id=30527> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit ca21a266224b6eff4fd817c2082d2e144f1ea58c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 11 15:38:38 2010 +1000 xkb: init mapWidth and symsPerKey arrays to 0. Helps debugging greatly, random 8 or 16 bit values can sometimes look like valid values, causing much excitement on the client front. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8806a04f7f028dd9f6a7ff5c36e460d3895c7deb Author: Michał Górny <mgorny@gentoo.org> Date: Thu Oct 14 15:49:51 2010 +0200 kdrive: Fix linking with tslib, with -Wl, --as-needed. #30600 Change the library order in TSLIB_LIBS variable, placing ${TSLIB_LIBS} after the local static libraries. This fixes linking with -Wl,--as-needed. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30600 Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit c7e436e9987a6fb0876c63e96f59ff4c20b4bef0 Author: Michał Górny <mgorny@gentoo.org> Date: Thu Oct 14 15:49:50 2010 +0200 kdrive: Fix tslib check fallback to set TSLIB_LIBS. #30599 If pkg-config is unable to find tslib but the fallback check does find it, the compilation continues with tslib support enabled though TSLIB_LIBS are unset. Thus, the compilation fails with a linking error on tslib functions. This patch sets TSLIB_LIBS to '-lts' whenever the tslib fallback check succeeds. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30599 Signed-off-by: Michał Górny <mgorny@gentoo.org> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 25801a2556ca9b42646023e5a95a3cbf7309e852 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 14 22:38:17 2010 +0100 Cygwin/X: Move duplicate extern variable declarations from various .c files to a new header file For the global variables defined in winglobals.c, remove duplicate extern declarations from the beginning of various .c files, and move most of them into a new header file, winglobals.h Leave some clipboard related variables alone for the moment, they need treating more carefully, to avoid mixing client and server type definitions. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 04d11abcf2ea2f36d899428e9c885b69e4f779ad Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 14 22:45:31 2010 +0100 Cygwin/X: Remove g_hwndKeyboardFocus It's set but it's value is never used Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 5e896e425fe14022b0714301531bd54151c763f0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 14 22:43:51 2010 +0100 Cygwin/X: Make g_hmodCommonControls static Make g_hmodCommonControls static, it's only used in InitOutput.c Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 49b996faadf0fedcee25d4a8f96f4c4007c29f5f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Oct 15 13:00:46 2010 +0100 Cygwin/X: Make g_hmodDirectDraw static Add winReleaseDDProcAddresses() for releasing the direct draw module handle, so g_hmodDirectDraw can be made static Remove unneeded duplicate extern definitions of g_fpDirectDrawCreate and g_fpDirectDrawCreateClipper, and move the definition from winglobals.c to winengine.c Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 6f12277e37d16a7de9d3f3079688c43b07921b0a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 14 22:44:53 2010 +0100 Cygwin/X: Make g_hhookKeyboardLL static Make g_hhookKeyboardLL static, it's only used in winkeyhook.c Also remove unused externs Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 9952b51f6822aeaa19c27caf85698741eb4c27d8 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Oct 15 13:01:45 2010 +0100 Cygwin/X: Fix typos in comments Fix a few typos in comments Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 1de5db73d31411798ae93619d9e626fa32e0c4bd Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 14 22:46:09 2010 +0100 Cygwin/X: Drop several unneeded includes of winprefs.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 8e723108151136f115e8e6d4b97ed4e2fa685dbf Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Sep 29 14:18:27 2010 +0100 Xming: Remove uses of register keyword I'm pretty sure the compiler has a better idea how to optimize this Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d11761c6a6dd2a9963dfd3bcb313f1b2525387fc Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Feb 26 13:31:18 2010 +0000 Xming: Casts to remove warnings on event pointers winkeybd.c: In function ‘winSendKeyEvent’: winkeybd.c:489: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type winmouse.c: In function ‘winMouseButtonsSendEvent’: winmouse.c:247: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type winmouse.c: In function ‘winEnqueueMotion’: winmouse.c:380: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 10bf8345cf15c6030147a9edb7f6a093c8db8099 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Oct 12 13:50:00 2009 +0100 Xming: Warning fix in winDeviceCursorCleanup() return statement with an expression in a function whose return-type is void Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit cab837a60a7aa653ccea77ff714335186ce38a4b Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 18 13:22:46 2010 +0100 Cygwin/X: Reformat the keyboard layout mapping table Also remove the out-of-date listing of keyboard layout IDs and which ones have known mappings XXX: layout zh_TW doesn't exist anymore This patch brought to you by C-u M-x align-regexp Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit ee2867649d9485f6559f88a973eae6393971ff35 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 18 13:20:01 2010 +0100 Cygwin/X: Clarify XKB options in XWin man page Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 1ba1b12d24d8f825babd8cf38710c7fa9a94821e Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 13:46:09 2010 +0100 Xming: Warning fix in winApplyHints() winmultiwindowwm.c: In function ‘winApplyHints’: winmultiwindowwm.c:1587: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit fb64414548c437bf52c3dcd0613aab5079faffba Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 14:19:57 2010 +0100 Xming: Fix warnings in ProcWindowsWMFrameSetTitle() winwindowswm.c: In function ‘ProcWindowsWMFrameSetTitle’: winwindowswm.c:516: warning: pointer targets in passing argument 1 of ‘strncpy’ differ in signedness winwindowswm.c:516: warning: pointer targets in passing argument 2 of ‘strncpy’ differ in signedness winwindowswm.c:528: warning: pointer targets in passing argument 2 of ‘SetWindowTextA’ differ in signedness Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit da5955cc023ae980fdc0397f6fd541e788040c29 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 14:18:53 2010 +0100 Xming: Fix warnings in windialogs.c windialogs.c: In function ‘winDisplayExitDialog’: windialogs.c:327: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast windialogs.c: In function ‘winDisplayAboutDialog’: windialogs.c:597: warning: passing argument 3 of ‘PostMessageA’ makes integer from pointer without a cast windialogs.c: In function ‘winAboutDlgProc’: windialogs.c:697: warning: comparison between pointer and integer windialogs.c:701: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘HINSTANCE’ windialogs.c:716: warning: assignment makes integer from pointer without a cast windialogs.c:736: warning: assignment makes integer from pointer without a cast windialogs.c:756: warning: assignment makes integer from pointer without a cast Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 6d9fb07db210bcfdcdde632fa341c4ee08d44b35 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 14:16:54 2010 +0100 Xming: Fix warnings in winNameCompare(), winNormalizeName() winconfig.c: In function ‘winNameCompare’: winconfig.c:715: warning: array subscript has type ‘char’ winconfig.c:715: warning: array subscript has type ‘char’ winconfig.c:716: warning: array subscript has type ‘char’ winconfig.c:716: warning: array subscript has type ‘char’ winconfig.c:730: warning: array subscript has type ‘char’ winconfig.c:730: warning: array subscript has type ‘char’ winconfig.c:731: warning: array subscript has type ‘char’ winconfig.c:731: warning: array subscript has type ‘char’ winconfig.c: In function ‘winNormalizeName’: winconfig.c:1092: warning: array subscript has type ‘char’ winconfig.c:1093: warning: array subscript has type ‘char’ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 20510e51001d1659000c8d8607c0de16022d1c74 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 14:15:51 2010 +0100 Xming: Fix warnings in winClipboardFlushXEvents() winclipboardxevents.c: In function ‘winClipboardFlushXEvents’: winclipboardxevents.c:225: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’ winclipboardxevents.c:266: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘DWORD’ winclipboardxevents.c:619: warning: pointer targets in passing argument 1 of ‘strcat’ differ in signedness winclipboardxevents.c:659: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness winclipboardxevents.c:669: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness winclipboardxevents.c:690: warning: pointer targets in passing argument 3 of ‘MultiByteToWideChar’ differ in signedness winclipboardxevents.c:698: warning: pointer targets in passing argument 1 of ‘strdup’ differ in signedness Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 44c8b449d281c4d984d65f66bac96a65806b2efa Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Oct 15 14:13:57 2010 +0100 Xming: Fix warning in winClipboardErrorHandler() winclipboardthread.c: In function ‘winClipboardErrorHandler’: winclipboardthread.c:444: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 1f2a57d9e46424a2e0861f55253b91d930d79083 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Oct 15 14:12:22 2010 +0100 Cygwin/X: Turn off the bad-function-cast warning for XWin code Turn off the bad-function-cast warning for the XWin code, it's near impossible to write code which uses Win32 API calls that doesn't trigger this warning For example, SendMessage(WM_SETICON) returns an LRESULT, but we are supposed to know this is safe to cast this result to a HICON, which gcc considers a non-matching type. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 55e528b6cc6451dbb1e65baec199d4df0441e86d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Mar 25 23:39:37 2010 +0000 Cygwin/X: Remove execute permission from source files Remove execute permission from source files Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit b2b685e2693ff5f089006f5b3882d6b0c0853862 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Mar 25 23:00:48 2010 +0000 Cygwin/X: unifdef XFree86Server Remove XFree86Server define, which was always on anyhow, and the code which was guarded by !XFree86Server This completes the process of removal started in 2006 :-) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 9ed70f15eff6a85222b46db1fe7af25154314464 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Nov 2 17:37:14 2009 +0000 Cygwin/X: Use normal apostrophe in XWin DDX help text Use U+0027 APOSTROPHE in XWin DDX help text, rather than U+2019 RIGHT SINGLE QUOTATION MARK Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 9f8f056a21b9480fd9fd43a22c9d6f45a2c1ef87 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Mar 23 16:34:26 2010 +0000 Cygwin/X: Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft Cleanup some VENDOR_STRING/VENDOR_CONTACT cruft Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 5aff712a8d2eb9f965ecbb93216cc0bcdc327ae6 Merge: 5b98c6267 e354ccac3 Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 18 17:16:23 2010 -0700 Merge remote branch 'whot/for-keith' commit 5b98c6267f575ec4ff498ecb651e34dbff030b83 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 16:01:40 2010 -0400 randr: Remove mirandr This isn't used anywhere, not least because it's completely nonfunctional. Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7bb653bedceb6180a0361ead1c612839e776ce98 Author: Olivier Fourdan <ofourdan@redhat.com> Date: Mon Oct 18 15:59:35 2010 -0400 modes: improve aspect ratio match for classic drivers After we infer the aspect ratio for the screen, we pick the largest mode matching that aspect ratio from the best mode pool available. We then clamp virtual size to that mode, and run the resulting mode list through the driver's ValidMode hook. In doing so we might filter away our initial guess. If this happens we shrink the default mode to the next largest mode from _any_ mode pool. This is usually wrong, and we should instead pick the next aspect-matched mode from the best available mode pool (as always, user then driver then default). Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d6d90a4fccef086e7c7934adea901b2cd9a595bf Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 15:53:43 2010 -0400 composite: Move the backfill comment to a more appropriate indent level Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit db8840600e8e21356241eb87395031388d9b54d2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 15:52:52 2010 -0400 composite: Don't backfill non-MapWindow allocations Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 6dd775f57d2f94f0ddaee324aeec33b9b66ed5bc Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 15:50:37 2010 -0400 composite: Don't backfill non-bg-None windows If there's a defined background then backfilling is a waste of effort, since exposure processing will paint that in for us. But note that we have to backfill if any children are bg=None to preserve semantics with non-composited servers. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d2064fbb687839c297a851a5d85f32dfbbe4a0d5 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 15:42:54 2010 -0400 ddc: Don't probe for DDC/CI or EEPROM For whatever reason, some (broken) monitors will crash if you do this. We're not actually using this information for anything, so let's just not do it. Originally reported as http://bugzilla.redhat.com/620333 Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 47c91dca8d8eecb429123e8370302831bcd57938 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 18 15:40:28 2010 -0400 xfree86: Drop linux libc5 support from the SIGIO code Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 788bfbf18ac19923604b0d676933fdc0d78526a1 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 14 15:10:43 2010 -0400 dri1: Remove "buffers" from the config logic This was only ever used from the glint driver, which has since lost its DRI support. Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit a77458486a7b9d78dcd284e2bcc96c1fda0e862a Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 14 14:00:53 2010 -0400 xfree86: Remove %M expansion from config parser This was to distinguish XFree86 3.x files from XFree86 4.x files. It never really made sense to be looking for xorg.conf-4. Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit f8ec71603c796f3b272a0592cbb934c2a6e8d633 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 14 13:45:31 2010 -0400 xfree86: Remove an open-coded strtoul() Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 52577ae8eeda64601db8dd425027cf8e4271b873 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 14 13:22:00 2010 -0400 config: Remove atimisc workaround Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 8bb1983a5f2dbf72366de9fb793a46e35912ab61 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 2 15:22:18 2010 -0400 config: Don't look for .o drivers anymore This hasn't worked since we switched to dlloader. Reviewed-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit e354ccac36a8ee3a23bdc845833c16a5646cc200 Author: Joe Shaw <joeshaw@litl.com> Date: Thu Oct 14 15:09:20 2010 -0400 fix a sign problem with valuator data. Without this patch, any negative valuator value is wrong when returned from XQueryDeviceState(). This is a regression from at least xserver 1.4. Valuator data is set in dix/getevents.c:set_valuators() by copying signed int values into an unsigned int field DeviceEvent.valuators.data. That data is converted into a double with an implicit cast by assignment to axisVal[i] in Xi/exevents.c:UpdateDeviceState(). That double is converted back to a signed int in queryst.c:ProcXQueryDeviceState(). If the original value in set_valuators() is negative, the double value will be > 2^31 and the conversion back to a signed int is undefined. (Although I consistently see the value -2^31.) Fix this by changing the definition of DeviceEvent.valuators.data from uint32_t to int32_t. Signed-off-by: Joe Shaw <joeshaw@litl.com> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 424b856e8e19f35c24bfc0a9fced9464d2f17c90 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 15 14:35:22 2010 +1000 dix: update comments for GetPointerEvents and friends All these now generate InternalEvents, point this out. Remove XKB/XI references, that's just confusing. This comment referred to the old-style event generation code from server 1.4 to including 1.6 but is now just confusing to newcomers. Remove comment about SwitchCoreKeyboard() for the same reason. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com> commit e2ada55de3e7ec8724b98c4e4adfec741d415499 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 27 13:58:40 2010 -0400 os: Clean up various xtrans bits that we've never supported Or at least, not supported since xserver 1.0. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit eaf0b6a4d83d49930d21d5191f335fcac962632e Merge: 693e92d40 23229c7ce Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 15 13:46:59 2010 +1000 Merge branch 'master' into input-api Conflicts: config/udev.c hw/xfree86/common/xf86Helper.c hw/xfree86/common/xf86Module.h hw/xfree86/common/xf86Xinput.h hw/xfree86/os-support/linux/lnx_init.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3c28a29e132d6f73c36d4b64818d112b1c6e9a40 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Oct 13 15:53:59 2010 +1000 xfree86: rename parameter names to xf86ScaleAxis. Maybe it's just me but every time I look at it I get confused again and need to work it out from scratch. Rename the parameters to something self-explanatory, to/from and min/max. No functional change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 23229c7ce5970516b97a1cc12e65257ff65ab9a7 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Oct 13 16:28:14 2010 -0700 test: Fix make distcheck when not building unit tests Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ff82f724e4ed24d73f15fa9c35a1d0c2c7d8cef7 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Oct 13 10:20:06 2010 -0700 Comparison between pointer and integer in latest dix/dispatch.c Signed-off-by: Keith Packard <keithp@keithp.com> commit da4eebe58ec81e2297cc1773af1fb622fb392bbd Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Oct 13 17:34:31 2010 +0100 event_size is currently never assigned to in mieqProcessInputEvents(). event_size is never assigned to in mieqProcessInputEvents(), so realloc() is always called. This is benign, but I'm guessing not intended. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6274dca9d984ad3c553b4901edc3151e770e6c40 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 11 16:37:16 2010 -0400 dix: optimize CallCallbacks Move the basic sanity checking to an inline wrapper, which avoids the function call overhead if the callback list is empty. On an XACEful server on a 2.4GHz Core 2 Duo: 1 2 Operation -------- ----------------- ----------------- 20000000.0 25100000.0 ( 1.25) X protocol NoOperation Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e418cd332c1f458d028df3fdf684011109d0c183 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 11 10:49:57 2010 -0400 xwin: Remove some undue paranoia about UNDRAWABLE_WINDOW mi will throw away rendering to input-only windows. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Keith Packard <keithp@keithp.com> commit febf3e7ead8dbb355622c896ff1744b2ca52a49a Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 11 10:49:56 2010 -0400 dix: Remove the memory of the multibuffer extension Drop DRAWABLE_BUFFER and related checks, mbuf was the only thing that used them and it was killed in 0ba82562. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1333e101b4f6ecca72568b7f462884f8b102a5c2 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Oct 7 18:17:02 2010 -0700 Remove leftover fbSaveAreas & fbRestoreAreas defines from wfbrename.h The fb functions they try to rename were deleted in 2007 by commit ae7f71a8b3d6756161e55d998d6eec37d2695c98 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8efa3623f32939ef525926b57fd533f4c01ec4b3 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Aug 4 13:48:33 2010 -0700 Use GetCurrentRootWindow or equivalent instead of spriteTrace[0]. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 32de0c19075b886c2fc03f6ad73d9c15df1b2309 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Aug 4 11:44:05 2010 -0700 Move replay-window check from ComputeFreezes to CheckDeviceGrabs. This just simplifies ComputeFreezes, eliminating some duplicated code and a goto. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1c1811ecafc144151630b3588394e2c345c53aa4 Author: Jamey Sharp <jamey@minilop.net> Date: Tue Aug 3 19:49:59 2010 -0700 CheckDeviceGrabs: Delete redundant pWin->optional test. CheckPassiveGrabsOnWindow returns FALSE if pWin->optional is NULL, because wPassiveGrabs uses wUseDefault, so don't bother checking at the caller. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c360b3eb1deeac51913e7b1286b2767711c541fc Author: Jamey Sharp <jamey@minilop.net> Date: Tue Aug 3 19:40:26 2010 -0700 Let CheckPassiveGrabsOnWindow callers check if device is already grabbed. CheckDeviceGrabs checked all the ancestors of the window containing this device's pointer even if no new grabs could possibly apply due to the device already being grabbed. ActivateFocusInGrab and ActivateEnterGrab already checked whether they should break an existing grab, and then set up an event that was completely ignored if they didn't actually break the grab. In both cases, just do what we would have done eventually anyway--return FALSE from CheckPassiveGrabsOnWindow's caller--but do it sooner. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 853d7ebfa3e2d281d92890a39010ff5787a00ffd Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 5 11:24:28 2010 -0400 vbe: Fix copying the mode info block Just use memcpy, seriously. Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b2f9ce201cc2a14d5d6ad055b46c9317b040ec2e Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 27 17:34:36 2010 -0400 edid: Fix the HDTV sync pulse adjustment Simple typo, should have been adjusting the horizontal timings consistently since we're not trying to mangle vertical at all. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9a893fe52f1bfd415e9ffd9d2f5aff5c4da7a756 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Sun Oct 3 16:56:03 2010 +0100 xfree86: Do not call dlclose(NULL) [regression after ab7f057] During unwind following an error when attempting to a load a module, we attempt to call dlclose on a potentially NULL handle. This is a side-effect of removing the abstraction layer in ab7f057. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Adam Jackson <ajax@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 533faf7f43cb4b5155a74d78d6144b702e227efa Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 1 10:57:48 2010 -0700 Bump version to 1.9.99.1 (1.10 development series) Make the 1.10 development series distinguishable from the 1.9 branch. Signed-off-by: Keith Packard <keithp@keithp.com> commit a769f4c22a9cfb5ba248c924a66c31ec966bd8a0 Author: Adrian Bunk <bunk@stusta.de> Date: Thu Sep 30 13:18:20 2010 +0300 remove dolt With libtool 2.2.10 the difference in build time is so small (< 5% with -j8 builds) that it isn't worth having this hack. Signed-off-by: Adrian Bunk <bunk@stusta.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c7e4222c9a27094ce4fc2831ac92acbb7b21fb1a Author: Tobias Droste <tdroste@gmx.de> Date: Wed Sep 29 22:51:48 2010 +0200 randr: set error numbers of resource types in RRExtenstionInit() (V2) Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367 Currently the ddx calls xf86RandR12Init() (-> RRScreenInit() -> RRInit() -> RRModeInit() -> RRCrtcInit() -> RROutputInit()) before RRExtensionInit() is called. This causes RRErrorBase being 0 while setting resource type error values (resource types: RROutput, RRMode and RRCrtc). The fix moves the setting of error values to own functions which are called in RRExtensionInit() to get the right RRErrorBase. V2: With header file Signed-off-by: Tobias Droste <tdroste@gmx.de> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 72a9c686d7ecaa68d27687b316dbba92902809b4 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Sep 29 17:05:12 2010 +0100 Cygwin/X: Fix compilation after "delete pervasively use of DISPATCH_PROC" commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e removes the static declarations of ProcWindowsWMDispatch and SProcWindowsWMDispatch which precede their first use in winWindowsWMExtensionInit() Move winWindowsWMExtensionInit() to after the definition of those two functions to fix compilation. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1a9022d3289ff74043112808cc8aa315fd9c40e8 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Sep 28 13:59:19 2010 -0700 Bump video driver ABI version to 9.0 Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c45bea0c044ad37bedb42209f7e6ea8b587999f0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Aug 3 12:51:51 2010 -0700 XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR Adds three new functions void QuartzRandRSetFakeRootless (void); void QuartzRandRSetFakeFullscreen (void); void QuartzRandRToggleFullscreen (void); The first two are identical to requesting the fake modes from a RandR client The third responds to cmd-alt-a to leave fullscreen or RandR. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 229323a19b06f80d9b03f487e598b933b9b31d87 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Jul 26 23:34:49 2010 -0700 XQuartz: RandR: Don't change the rootless preference when changing RandR mode Also renames a bunch of other variables for better consistency. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 721edc69c3597578d3e7f711769ff0195af6068a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Jul 26 11:45:59 2010 -0700 XQuartz: RandR: Better handle switching betwen RandR modes that share CG modes Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 026a47e21226b64eb9a7624ada3d74c3fe5fa763 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Jul 26 01:17:12 2010 -0700 XQuartz: RandR: Respond better to resolution changes made outside X Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 59cd93f48a3a0a34781d4a94a3cd05a575e2d4ba Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Jul 25 22:25:49 2010 -0700 XQuartz: RandR: Use deprecated CG APIs only on Leopard and earlier Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 629c3f473b7415069a87ef4717ec3d701978dc48 Author: Jan Hauffa <hauffa@in.tum.de> Date: Fri Jul 16 17:56:44 2010 +0200 XQuartz: RandR: Remove FAKE_RANDR code. Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 97b5f5306437bfd13390485fc7a58a363c261ec9 Author: Jan Hauffa <hauffa@in.tum.de> Date: Fri Jul 16 17:54:55 2010 +0200 XQuartz: RandR: Toggle rootless mode on XRandR mode switch. Report a fake screen mode that corresponds to the screen mode at startup of the server excluding the height of the menu bar. If a client requests this mode, rootless mode is enabled. In all other modes, the root window is shown. Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 2d411472c2915614bdeb8fdc15d19dae4621444d Author: Jan Hauffa <hauffa@in.tum.de> Date: Fri Jul 16 17:18:03 2010 +0200 XQuartz: RandR: Implement basic RandR functionality. Querying and changing of resolution and refresh rate is supported, rotation is not implemented yet. Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit f4926709485c0605f0b1171c84c803b68eebfc38 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Sep 28 09:48:41 2010 -0700 XQuartz: Move use of static dispatch procs after declaration This fixes fallout from cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c36ca7b1862ecd86df089f4e1933379a113928ea Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Sep 25 10:05:10 2010 -0400 config: remove --with-dri-driver-path option, use dri.pc #29740 The trusted location of the dri driver directory can be obtained from the mesa dri.pc pkg-config file. Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5532687a929426c4b1c4667f4591ed362f097c9b Merge: 9df4fb0ad 682a3ee60 Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 28 08:15:07 2010 -0700 Merge remote branch 'ajax/less-loader' commit 9df4fb0adf66fb82f0c007897d79af0f54a6dad9 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 27 17:06:46 2010 -0400 xfree86: Add 18bpp support Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5c6a2f93ebc16a78093782b442306de23ae94e78 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Sep 27 19:39:23 2010 +0100 xfree86: Kill pixmapPrivate with a vengeance (v2) ScrnInfo->pixmapPrivate only existed in order to catch invalid access to the framebuffer by making the backing data NULL across the VT switch. This was causing more confusion in the higher layers during mode setting without any real benefit, so remove it. v2: Kill ShadowModifyPixmapHeader() as well. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Julien Cristau <jcristau@debian.org> Cc: Andrew Guertin <lists@dolphinling.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fdabcec57ae0fdc9910060609bb0848552c1db4d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Sep 27 17:30:13 2010 +0100 modes: Beware the driver switching root pixmaps Program received signal SIGSEGV, Segmentation fault. 0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800, height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 731 ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory. in ../../../../hw/xfree86/modes/xf86RandR12.c (gdb) bt full height=600, mmWidth=210, mmHeight=157) at ../../../../hw/xfree86/modes/xf86RandR12.c:731 randrp = 0x8dcae68 pScrn = 0x8dbeb28 config = <value optimized out> pRoot = 0x8e08e30 pScrnPix = 0xb6d12008 ret = 1 c = <value optimized out> mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185 No locals. at ../../randr/rrscreen.c:307 pWin = 0x8e08e30 pScreen = 0x8dca3a0 i = <value optimized out> rc = 0 ../../randr/randr.c:485 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Julien Cristau <jcristau@debian.org> Tested-by: Julien Cristau <jcristau@debian.org> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2f0abd7d690c3bcce2a80c093a0880f43e56d8cb Author: Kristian Høgsberg <krh@bitplanet.net> Date: Thu Sep 23 09:04:11 2010 -0400 glx: Fix use after free in DrawableGone (note that nearly identical patches were proposed by Kristian and Chris) Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com> commit e416965bfd08dfae5d2b7932b5118efac20546ad Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun Jul 18 18:56:02 2010 +0300 dix: remove proc tables initialization Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit cbd4d5dbb70db62ba1cb79c7b904e6fa11f62d7e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 16 20:19:50 2010 +0300 xserver: delete pervasively use of DISPATCH_PROC Some functions had to be moved around due some missing static definitions. Another minor clean up like inexistent function declarations and etc were made also. Part of this patch was cooked using: sed -i -e '/static DISPATCH_PROC*.*;/d' `git ls-files` Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 58bd317e29f4abf7f950891339d2a6a78ddf7903 Author: Macpaul Lin <macpaul@andestech.com> Date: Tue Sep 21 15:13:34 2010 +0800 xfree86: nds32: add nds32 support for compiler related mmio codes Add nds32 support for compiler related mmio codes. It includes byte-swap or non-swap operations. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 28e6de66b42062a885ba38416387f2dbc15707fd Author: Macpaul Lin <macpaul@andestech.com> Date: Tue Sep 21 15:13:33 2010 +0800 xfree86: nds32: add nds32 support for compiler specific codes Add nds32 definitions and related assembly codes to compiler header files. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2b24b2bd859a4b4b8ccaf3b7d1b529dcda2d3b94 Author: Macpaul Lin <macpaul@andestech.com> Date: Tue Sep 21 15:13:32 2010 +0800 xfree86: nds32: add nds32 definition for vgaHW support. Add __nds32__ definitions for vgaHW support. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 22376aa7aa44464636b12ee1d61b94e52ca02b0f Author: Macpaul Lin <macpaul@andestech.com> Date: Tue Sep 21 15:13:31 2010 +0800 xfree86: nds32: add nds32 definition for support linux video related io. Add __nds32__ definitions for supporing correct io method for lnx_video.c Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d52799f67f590b0f91b521cd2bdf5a5a8a229c96 Author: Macpaul Lin <macpaul@andestech.com> Date: Tue Sep 21 15:13:30 2010 +0800 xfree86: nds32: add nds32 related definitions into include headers. Add MSB/LSB related definitions into include/servermd.h Signed-off-by: Macpaul Lin <macpaul@andestech.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 98197d931b266674557b52b4a7099c6470114e55 Merge: 01ad3725a 402942cdb Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 23 15:30:37 2010 -0700 Merge remote branch 'jamey/for-keith' commit 682a3ee60867da027fe1bcda0c8587dd3db9d58e Author: Adam Jackson <ajax@redhat.com> Date: Sat Sep 18 07:27:13 2010 -0400 xfree86: Remove useless module setup functions where appropriate Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 6130170e7e9b64c611ee942ec3455dd1a185193d Author: Adam Jackson <ajax@redhat.com> Date: Sat Sep 18 06:41:35 2010 -0400 xfree86: Remove unused refcounting from input drivers Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit ab7f057ce9df4e905b12cebc1e587b9a7f200418 Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 11:19:17 2010 -0400 loader: Remove a silly layer of reference counting libdl will refcount objects for us just fine, thanks. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 0438002cd238011f33dbf176c555de5e380ba77e Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 09:13:04 2010 -0400 loader: include cleanup Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2f003fe49697f8343c052dff2b3752eace814ea7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 09:02:13 2010 -0400 loader: Remove the handle field from LoaderOpen This was always 0 from all the callers. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 09929da50503b559459f5b722c11647c47857fdb Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 08:16:51 2010 -0400 loader: Remove unused canonical name field Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3a26e7f459764d4aee71b2d7e25b113b729b94ac Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 07:55:48 2010 -0400 loader: Remove unused module serial number Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2a24a013bf3f554bb03c0f5af155d23dbb27b599 Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 17 07:32:17 2010 -0400 loader: Merge dlloader directly into the loader This lets us drop some double-tracking of loaded modules too. If your OS is too lame to have libdl, fix that first. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 693e92d4049ee76d074737480f3fc1bb236f4278 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 10 09:54:33 2010 +1000 xfree86: add xf86OptionListDuplicate() Does what it says on the box. Some drivers need to duplicate option lists from the original device to ensure that devices created by the driver (driver-internal hotplugging) have the same list of options as the original device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 402942cdbc518395a2943fd226b9f3071f24d39f Author: Jamey Sharp <jamey@minilop.net> Date: Fri Sep 17 02:11:44 2010 +0200 Introduce per-object per-screen privates. This replaces dixCreatePrivateKey and the only uses, which were in midispcur. Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Keith Packard <keithp@keithp.com> commit e4d4d6ddd52801cf0b0b253d9ba3bdabfa9a9d8d Author: Jamey Sharp <jamey@minilop.net> Date: Fri Sep 17 02:18:10 2010 +0200 Xserver need not be compatible with old versions of xserver. Delete time-traveling multiple personality disorder from the server. Gaetan notes: There were a couple of drivers containing an unknown version of the modes/parser code. This was done in server 1.2 time frame because it was released without mode code. It was barely or not maintained afterwards. There are currently no video drivers with a copy of the modes code. Most of these ifdefs were introduced in commit a8d760f567b19268329c4682495caa591f08a854, where Aaron wrote, This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2" since XORG_VERSION current went backwards at some point. Alan explains that: In Xorg 1.3, when we first released an Xorg server release decoupled from the katamari release schedule. (1.0 through 1.2 were released as part of X11R7.0 through 7.2, while 1.3 came out between X11R7.2 & 7.3.) Commit by Jamey Sharp and Josh Triplett. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Josh Triplett <josh@joshtriplett.org> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 01ad3725a8d0a8958720b81d19598a08c072ccee Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jun 1 20:37:54 2010 +0300 xfree86: delete useless "Primary device is not PCI" message The primary device being PCI or not has no effect on the server working. This message is superfluous. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 7360235ecca25af29bb2d99a8e46d5b259ad1b1e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 31 18:20:57 2010 +0300 xfree86: bus: assign PCI_SOURCES with the actual source files Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 18b2d2e8bd056266410226d779752e7933847b6b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 31 18:09:50 2010 +0300 xfree86: bus: move macros from common PCI header to private file Only int10/helper_exec.c is using them. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 17a23f9ba8fa95f3e15afba7de22a12fe60bacfb Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Sep 10 19:18:42 2010 +0300 xfree86: dri: remove unused PCI macro Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit fc3ab84de7b5692f0db2b282ab0ed8e5a61d1fce Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Sep 10 19:16:30 2010 +0300 xfree86: configure: move buses references to their own location This patch makes xf86Configure.c free of PCI and SBUS code, moving to a more meaningful location. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> commit 49b817501f97d55480063c0b62544b3af75b4b7c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jun 1 16:16:53 2010 +0300 xfree86: bus: remove xfree86 and few other references from OS files Conceptually, os-support should have only a basic set of OS helpers which wouldn't mix with any DDX common structure (e.g. windowing structures, etc) This patch removes some xfree86-only and a few other unused references from os-support/bus. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit d9c682a5e250677883c4d375ca84cf184ee19d77 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 30 21:35:23 2010 +0300 xfree86: bus: remove useless automake variable Leftover that was missed in f7abe05b. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit a7efeda8a56a540542e056a426e89cfc053a4162 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 30 19:12:31 2010 +0300 xfree86: use xf86PciIsolateDevice to get PCI config information Make xf86IsolateDevice private on PCI common file. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit c768cdda92696b636c10bb2df64167d5274b4b99 Merge: 5a725385f 207985363 Author: Keith Packard <keithp@keithp.com> Date: Mon Sep 13 16:48:33 2010 -0700 Merge remote branch 'jamey/reviewed' commit 20798536326f94ac9c97b4ec7a51329f7c912991 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Jul 14 13:14:28 2010 -0700 rootless: Delete dead remnants of rootless acceleration. Jeremy deleted rootlessAccelInit's implementation in 2008 in commit 587c010a1cd733fded4d49dc339df0634bda8be6. Delete its prototype and the remaining commented-out call to it. It still makes sense for the rootless GC ops to relax the planemask, but that's independent of the size of the operation, so quit checking the thresholds there. FillBytes and CompositePixels are not called anywhere, so delete everything related to both. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 58d1ec0fe84412c66f1ea1de15e3901c0b120164 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Jul 14 11:30:17 2010 -0700 rootless: ROOTLESS_GLOBAL_COORDS is always set, so unifdef it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 35ce892a705f9377a36f19414e5a25dcbe44a354 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Jul 14 11:19:41 2010 -0700 rootless: ROOTLESS_TRACK_DAMAGE is never set, so unifdef it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Cc: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit ccdf15689050a0f988721c91fab75861ec4d339c Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 31 16:01:18 2010 -0700 miPolyGlyphBlt: Delete redundant ValidateGC. The caller is required to have validated the GC for the drawable before calling any ops, including PolyGlyphBlt. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 3fd963de27f3c4452c320e617ad33b91b0967737 Author: Jamey Sharp <jamey@minilop.net> Date: Wed May 19 14:16:20 2010 -0700 Un-export CreateScratchGC now that nothing external uses it. The server and drivers sometimes use GetScratchGC, but never CreateScratchGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 0f48e362c5baee2bc281a4b88cfb68de24172d15 Author: Jamey Sharp <jamey@minilop.net> Date: Wed May 19 14:03:19 2010 -0700 glxdriswrast: Use CreateGC, not CreateScratchGC. Since this code was using CreateScratchGC and not GetScratchGC, FreeScratchGC would always call FreeGC, so just call it directly. As long as the drawable provided to CreateGC has the same screen and depth as were passed to CreateScratchGC, these functions are basically identical. There are two differences: - CreateGC gives you a non-null stipple. You probably don't care. - CreateGC passes the gcid and client to XACE. There are several internal GCs allocated in the server, and they all pass 0 and serverClient. I expect XACE will never reject that combination. The callers of createDrawable all verify that pDraw has the same screen that driScreen does. In short, this should have no behavioral change. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit af2a94e12fe4e426dfca461a0d14526193c01cef Author: Jamey Sharp <jamey@minilop.net> Date: Tue Jul 13 13:33:59 2010 -0700 VGA arbiter: No need for arbitration around CreateGC. None of XAA, EXA, or UXA do any hardware access during CreateGC, so they don't need VGA arbitration. I haven't found any open source drivers that hook CreateGC, so they're safe. I'd be surprised if any driver directly hooks CreateGC and does hardware access from it and needs VGA arbitration. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 7a63b2db636f01694cb54726bbb04287718e286a Author: Jamey Sharp <jamey@minilop.net> Date: Sun Jul 11 20:36:34 2010 -0700 Delete Colormap->devPriv. It isn't used any more. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 2e8069dd36c2f5caf868937405fc03328004a85d Author: Jamey Sharp <jamey@minilop.net> Date: Sun Jul 11 20:35:43 2010 -0700 xnest: Replace use of Colormap->devPriv with standard devPrivates. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 34d6492436c0f4a81822769b24d8c7816d0226ad Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jul 10 06:55:58 2010 -0700 xquartz: Delete compile-time-constant DRIGCRec.driOps field. The driOps field of this structure is never set to anything but &driGCOps, and this structure is not visible outside this source file. Just use the constant in the one place the field was used. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 2051e0f371de892b2e598b30c18dae96b58d68de Author: Jamey Sharp <jamey@minilop.net> Date: Thu Jul 8 02:38:13 2010 -0700 dixfonts: Deobfuscate GC ops calls. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit bbbf795e6b1ac048ea17164ba1089055cfe4306d Author: Jamey Sharp <jamey@minilop.net> Date: Sun May 23 17:15:43 2010 -0700 Delete redundant GC initializations. When a GC is allocated, it is zeroed, including all storage requested with dixRegisterPrivateKey. So CreateGC hooks don't need to initialize anything to zero. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 3288232f3d2a0239944bd856101c2d16c713ef40 Author: Jamey Sharp <jamey@minilop.net> Date: Sun Jun 13 18:10:38 2010 -0700 Delete xaaWrapper. This was part of "An experimental pseudocolor emulation layer. Not fully completed, currently only works for 16bpp." Only neomagic tried to use it, and that was neutered by the removal of the fbpseudocolor portion of that emulation layer; the rest is easily removed. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit f856dcdc3a7b635dd94d3dac387ddec952e4880b Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jun 12 08:42:31 2010 -0700 Delete unused lastWinOrg field from GCs. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit b2184024361717358e35a56b084c4a71cbc29234 Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jun 12 16:20:00 2010 -0700 Delete unused devPrivate field from GCFuncs and GCOps. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 139aa6e74227f0fe52cd8dccf1d563664103aaba Author: Jamey Sharp <jamey@minilop.net> Date: Sun Jun 13 18:57:08 2010 -0700 damage: Delete NOTUSED block--it was never not NOTUSED. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 5ff9e58bef668c1279c5e253795711a1e118aaa1 Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jun 12 08:51:04 2010 -0700 fb: Delete unused oneRect private field. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit e99bbfa0a24ec038b88e81881133a676bf63580e Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 13:50:11 2010 -0700 dmx: Delete '#undef Xmalloc' and friends. Nothing in dmx uses these names any more, and it builds cleanly without trying to undef them. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit b5217bfdca67ef2c5323838afcfcd89eba8899d5 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 13:28:32 2010 -0700 dmx: __glXMalloc -> malloc, etc. Kristian made equivalent edits to the reference GLX implementation in 2006, with commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit a715de7f11afeda7798f0882148a94d4db2291e6 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 13:10:05 2010 -0700 dmx: Delete unused GLX visual matching code. Kristian deleted this API from the rest of the server in 2007, in commit 7d74690536b64f7b8e8036507ab7790807349c50. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit 5a725385fbb93553931ca0217e79271ab2a2c613 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Sep 13 12:33:53 2010 +0300 xfree86: vgaarb: fix decoding stub API This fix a problem introduced in commit 65466652. It closes also: https://bugs.freedesktop.org/show_bug.cgi?id=30160 Reported-by: <xunx.fang@intel.com> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0a3e6b0345a96aae278dd776c00b5a7c7ccf65af Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Sep 11 14:25:21 2010 -0700 XQuartz: Localization updates Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4e09a69c5b1f3c8d6f2f92ec24aaab3a1119940c Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Aug 15 20:07:28 2010 -0700 rootless: Remove ROOTLESS_WORKAROUND This was already removed for XWin (20701522be803fe47e921fcf059dadf64c7f287d) with no reported side effects. XQuartz seems to be behaving ok without it as well. While this possibly brings back bug #1168, we don't have any reproduction steps for that issue, and if it crops up again, we should fix it a real way rather than this hokey workaround which doesn't even work for COMPOSITE. This effectively reverts the following two changes: b2135e589baeb2ea26da50b9167feaea23bcce3c d7fef52254126aa5897a5c58faeda1f61d5b13d8 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 63b7d9448abbded1cb91e82a13319d5e4313ca0c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 30 18:44:06 2010 +0300 xfree86: fbdevhw: remove unnecessary debug code It very likely no one will want to print all functions of this file for debugging purposes. If this is the case, then a mix of ctags + cpp + gdb can do the same job. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 66105d8281f8a6442cf7fee5d10e8b8a34bef952 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 30 18:16:32 2010 +0300 xfree86: fbdevhw: remove unused cmap fields from main structure It was never used since first git revision and probably no one cares for it. ABI break. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 317e491e067e31ea7cf8cb7301e47de0c10f119e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Jul 19 15:44:39 2010 +0300 xext: remove unused header Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 5098801b3a570d0bb3386d7d210f21a1cbf3bf12 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sat Jun 12 16:57:50 2010 +0300 mi: delete unused code pBSReg is always NULL, so the statement after the conditional will never be reached. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 7d8cabd027cfc55e9921307e5b3dd7052de8496f Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 4 16:12:59 2010 +0300 os: simplify smart scheduler init process Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d9c18c3b9badf38d499e3f53291bd23fda3c4340 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 4 15:54:48 2010 +0300 os: remove useless smart scheduler macros Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit a9e6080dc94633a4f497535f619a14fd8b566645 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Sep 10 15:01:29 2010 +0300 os/xfree86: remove macro checking for POSIX symbols We assume already that our X implementation is POSIX compliant anyway. So remove those redundant checking. SA_SIGINFO is left there. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 648c8871c92727d7b6b16859f27f12266a06a16e Author: Adam Jackson <ajax@redhat.com> Date: Wed Sep 8 16:08:24 2010 -0400 composite: Convert compWindowUpdate to use TraverseTree v2: Use != RedirectDrawNone, since we aren't called for manual windows. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit bbffb85461eb63bfb1e01e2cb9674607b9221604 Merge: 9a1a4ccbe 71972c253 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 10 11:55:34 2010 -0700 Merge remote branch 'whot/for-keith' commit 9a1a4ccbe026f34beca5db3b2243874906961b49 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 30 16:37:05 2010 -0400 Add screens to the PRIVATE_XSELINUX set. The SELinux extension does store a security label in the screen devPrivates. Fixes crash caused by overwriting another private. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reported-by: Justin Mattock <justinmattock@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5b680f2c23fb3d35c721647d0334f63297589371 Author: Vignatti Tiago (Nokia-MS/Helsinki) <tiago.vignatti@nokia.com> Date: Mon Aug 30 21:24:30 2010 +0300 os: add -sigstop option for Upstart (or equivalent) startup This is very similar to the RunFromSmartParent (implicit) option, except we do not send the signal to our parent process, but our own process instead, and that signal is SIGSTOP, not SIGUSR1. Upstart or a similar equivalent program will detect this, realize that we are ready to accept clients now, send us SIGCONT and move our job status from SPAWNED to RUNNING. Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ca0d578d29f37b61e62556fff59732741885625b Merge: cf88363db 08adf41f6 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 10 11:50:27 2010 -0700 Merge remote branch 'mattst88/master' commit cf88363db0ebb42df7cc286b85d30d7898aea840 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Aug 27 10:20:29 2010 -0700 os: Return BadLength instead of disconnecting BigReq clients (#4565) If a client sends a big request that's too big (i.e. bigger than maxBigRequestSize << 2 bytes), the server just disconnects it. This makes the client receive SIGPIPE the next time it tries to send something. The X Test Suite sends requests that are too big when the test specifies the TOO_LONG test type. When the client receives SIGPIPE, XTS marks it as UNRESOLVED, which counts as a failure. Instead, remember how long the request is supposed to be and then return that size. Dispatch() checks the length and sends BadLength to the client. Then, whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to process it as a request. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fa22f97af65efc2a147e9be0b7f288848965ff60 Merge: 6edbdb7f9 654666529 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 10 11:47:41 2010 -0700 Merge remote branch 'vignatti/vgaarb-fixes' commit 6edbdb7f9e02ecb069c6fe6c0600fc389553ec5d Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Aug 23 11:37:46 2010 -0700 Tag sdksyms.c entries with source file and line number Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9ef6241c2382bfc555284a4985f6d1e37d750d6f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 23 16:04:03 2010 -0400 Fix property and selection devPrivate allocation. Selection objects were not being allocated with privates, and both objects had a stray statement that zeroed out the devPrivates field. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reported-by: Justin Mattock <justinmattock@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9dca441670d261a9a9fb6108960ed48f3d58fb7f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 6 11:32:38 2010 +1000 xfree86: add a hook to replace the new console handler. This hook is only necessary for the keyboard driver to remove the race condition between drain_console() and the driver's ReadInput (Bug 29969). The idea is that a driver that needs to handle events from the console calls xf86ReplaceConsoleHandler() with it's own ReadInput (or NULL) and thus removes the drain_console call. It's the driver's responsibility to restore the previous behaviour when the driver is unloaded. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> CC: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit da31ca747f8e3993b2aca5d31b7d09b9907ad1d9 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Thu Sep 2 10:53:28 2010 +0200 linux: Don't lose console events on non-evdev drivers (#29969) The drain_console() function will race with new keyboard events being added by the hardware causing the server to lose keyboard events if the console fd is used for input. Only use the drain_console() when AllowEmptyInput is off which is the best indicator we have for whether the keyboard driver will be used. This patch will only fix the bug when hotplugging is disabled. What we really need is a way to figure out either whether we're _not_ using the keyboard driver (not predictable) or a way for the keyboard driver to disable drain_console(). X.Org Bug 29969 <http://bugs.freedesktop.org/show_bug.cgi?id=29969> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commit 71972c2534d490284d3d42b456c2f34b964b2894) commit 52df92a563980a7af0fb61248da3654bd90e8232 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 15:08:01 2010 +1000 xfree86: move XI_VERIFY_VALUATORS to the source file it's used in. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 824e970c5cc94fc7d5fe5f78a24d0d3057d87a84 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 15:03:39 2010 +1000 xfree86: remove TS_Raw and TS_Scaled defines. There are no references to it other than the commit that added them. But since we're re-doing the API anyway, now is a good time to break things. commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 00:18:24 2007 +0200 XFree86 input: Add backwards compatibility for motion history Add the old motion history API back, as a shim around the new mi API. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit ac3f88e604212fc3668d623798d50aa218c13995 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 15:01:26 2010 +1000 xfree86: remove {Dont}SendCoreEvents defines The input drivers that use it only do so with ABI 0 and we're long past this one now. Input driver don't have a say in whether they send core events now anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 3f264149ff226d7c0bfcfcfc2c8845fa6326d0bd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:52:30 2010 +1000 xfree86: don't export xf86InputDevs. Use xf86FirstLocalDevice() instead (but don't get me started on the naming of that one...) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 8f0531bddac8e774aa25b51155445309219da0f6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:46:59 2010 +1000 xfree86: remove XI_PRIVATE macro, unused. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit c08f7afdbcf16d2ba30b67e27162c5aaa1ed3f61 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:45:03 2010 +1000 xfree86: update comment for xf86DeleteInput We have a driver hook - it's UnInit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit b8d9c5ff0003f15720737949e65e3159c4f4576e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:30:11 2010 +1000 xfree86: remove IDevRec, replace with InputInfoRec. This struct is superfluous, maintaining the same info as the InputInfoRec (with the exception of the driver name). This is a rather large commit with the majority of changes being a rename from the fields of the IDevRec (idev, commonOptions) to the InputInfoRec (pInfo, options). The actual changes affect the initialization process of the input device: In NewInputDeviceRequest, the InputInfoRec is now always allocated and just added to the internal list in xf86NewInputDevice() if the init process succeeded. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit c5da32a6105b3cf57b5996971149c39103cd64b3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:26:20 2010 +1000 xfree86: plug minor memory leak. When no identifier for the device was specified, the allocated IDevRec (and its associated fields) need to be freed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 34ade08174bfd652cc79bf26d2ad6a10ca73d2c4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 14:04:50 2010 +1000 xfree86: Remove extraOptions parameter from xf86CollectInputOptions. And unexport it, drivers don't need to call this in the new init process. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 2199842ed50b3eb40d54146827fc58cae7e873ec Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 10:52:54 2010 +1000 xfree86: remove extraOptions field from IDevRec. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 5ab8ca0807f9d2f8c8de2f9a1421e59e2a8e976c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 10:41:27 2010 +1000 xfree86: remove some ifdef 0 code. InputInfoRec hasn't had a free function pointer since the git import. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit b0da1bc509446a714eb2b29cbd35d43b1e5187ed Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 10:39:24 2010 +1000 xfree86: move a declaration down to the block it is used in. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit cd7059db4a766bc9d03d7968aebeba8542e6c6c0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 10:36:47 2010 +1000 xfree86: minor comment fix. HAL → config backend Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit f3861522fe7d148fd4b0802f2f9ea5d98ab2db93 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 2 11:47:30 2010 +1000 xfree86: skip a few NULL initialization, calloc does it for us. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 12170978617c6862fb6aa286b18aaacd0a4e2737 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 15:44:44 2010 +1000 xfree86: remove conversion procs and close proc from InputInfoRec. None of them are called by the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Fernando Carrijo <fcarrijo@freedesktop.org> commit 71972c2534d490284d3d42b456c2f34b964b2894 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Thu Sep 2 10:53:28 2010 +0200 linux: Don't lose console events on non-evdev drivers (#29969) The drain_console() function will race with new keyboard events being added by the hardware causing the server to lose keyboard events if the console fd is used for input. Only use the drain_console() when AllowEmptyInput is off which is the best indicator we have for whether the keyboard driver will be used. This patch will only fix the bug when hotplugging is disabled. What we really need is a way to figure out either whether we're _not_ using the keyboard driver (not predictable) or a way for the keyboard driver to disable drain_console(). X.Org Bug 29969 <http://bugs.freedesktop.org/show_bug.cgi?id=29969> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e00e2e7b68fbc932269d607ac5dc2c441d07ad9d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 23 08:35:01 2010 +1000 xfree86: Check for existence of button class before dereferencing it. The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones keyboards have axes but not buttons. The evdev driver doesn't set up a button class for these keyboards and a motion event handled by DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a server crash. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 9802cca816884e7f055f054ac1ba9194e0eba10b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 15:42:44 2010 +1000 Remove atom field from InputInfoRec. This field was only used in one location where we can use a local variable. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 79ea9ef39971d008d199b18f34d1aef2bab6e33f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 10 15:19:20 2010 +1000 input: constify valuators passed in by input drivers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 86560b5d05f14bdf04d21b3457a66c0d5045db9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 24 13:46:35 2010 +1000 dix: don't set time to CurrentTime in DeviceChangedEvents. CurrentTime is used by clients to skip setting the time, but not by the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit ff055506f0cbb852bed17acb9f9bbf1d715a854e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 23 13:20:09 2010 +1000 dix: fix crash when removing devices on a buttonless MD pointer (#29669) If the master does not have a button class, recalculating the number of buttons required for this master dereferences a NULL pointer. Guard against this, if the master pointer doesn't have a button class, it doesn't need to update it's number of buttons. Reproducible: Two devices on the same master, device NB with axes but no buttons, device A+B with axes and button . If NB was the last one to send an event through the master when A+B is removed from the server, master->button is NULL and leads to the above NULL-pointer dereference. X.Org Bug 29669 <http://bugs.freedesktop.org/show_bug.cgi?id=29669> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit be978c7fc97e98ef1bc7b20c6c0740d8a81b609a Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Tue Aug 3 18:21:28 2010 -0700 xfree86: Purge kbdCustomKeycodes from xf86Info. This was obsolete after 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 "bug #890: completely remove deprecated keyboard driver". Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6922b31a136b2b0ac185d61785969a11f84c7943 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 14:35:40 2010 +1000 xfree86: remove history_size For a couple of ABIs now the history size was essentially static anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 892e39025b45109ba38c0b5d0b5f4535e092f58c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 14:33:52 2010 +1000 xfree86: remove always_core_feedback from InputInfoRec. Unused Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5e2912bd1d2bc8ff1508e5f726e77aa5f8677cbd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 14:33:26 2010 +1000 xfree86: remove first/last from InputInfoRec. Unused. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 974bc2322b3667db38d28063786fbc76fb303d00 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 14:32:51 2010 +1000 xfree86: remove private_flags from InputInfoRec. Unused field. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 23b361b25b7b48a820a4ef851fb89706f7ec2cd0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 1 14:14:20 2010 +1000 xfree86: Purge old_x/old_y from InputInfoRec. Unused field. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4ac3be29bc1af19f15e84ee0ea609de5c54ca0e0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 30 14:26:06 2010 +1000 input: Purge AddOtherInputDevices DDX hook. This hook wasn't used by any DDX. Device addition and removal is handled by the config backend, so we don't need to do anything special that during the ListInputDevices request processing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit cb672a461cc6cd668ab7e61994b94e9ff46b3ef1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 30 14:21:14 2010 +1000 input: remove OpenInputDevice and CloseInputDevice DDX hooks. In theory, these hooks were to be used for DDX-specific device enablement. None of the DDXs however did anything here. Now we call DEVICE_INIT on all devices when they are added, so the xfree86 DDX as the only one with real code didn't do anything here. kdrive checked for device validity but that's already handled in ProcXOpenDevice. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a46d2bb344e822bbd9d69cb59829b85f9d8f0213 Author: Simon Thum <simon.thum@gmx.de> Date: Sun Jul 18 12:31:26 2010 +0200 xfree86: Fix xf86 backend-specific input initialization Instead of shoving it in rather unrelated places, move acceleration init into xf86NewInputDevice. Caveat: It's not clear atm how relevant other callers of ActivateDevice (like OpenDevice) actually are. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit e930710ae5579752785d6b96ace4b44bf0199a6e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 30 13:59:29 2010 +1000 xfree86: purge superfluous includes from xf86Xinput.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 2b7840b63da6bc00aa40e8a427d9fd719ba5e6d0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 30 13:44:20 2010 +1000 xfree86: remove unused DeviceAssocRec struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit cdb5863c9f68548afa0c69e08c697c83f9a5e671 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 23 14:16:38 2010 +1000 xfree86: remove LocalDeviceRec/Ptr definition. Two names pointing to the same struct for over 7 years now. Remove the define, if drivers don't want to change they can always do the typedef themselves. Rename all "LocalDevicePtr local" to "InputInfoPtr pInfo". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 8764782f6de56a9dc5e9d5a8e9fb616a8ddb2f7c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 7 11:17:10 2010 +1000 xfree86: add xf86IDrvMsg and friends for input driver logging. Input driver messages are only standardised by convention, with the drivers prefixing the device name to most messages. This makes it rather hard to grep on "evdev" for example when looking for the evdev ouput. This patch adds three new logging functions, modeled after xf86DrvMsg(), the logging function for output drivers. New functions are xf86IDrvMsg() - input driver log message in default verbosity. xf86IDrvMsgVerb() - input driver log message in specified verbosity. xf86VIDrvMsgVerb() - same as xf86IDrvMsgVerb() but takes a varargs argument. Default log format is <driver name>: <device name>: <message>. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b55ac354afa0f16f71bb4f2d3d4277c887082520 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 12:00:07 2010 +1000 xfree86: move xf86AllocateInput and xf86DeleteInput to xf86Xinput.c Make xf86AllocateInput static in the process, this function is only called from one location. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit d2a5f4166417b9d4a02a219b28470e41b6cfe012 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 10:30:56 2010 +1000 xfree86: return the device from xf86ActivateDevice. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit fbf35e27f3005cf009f2dd1e112260bb294342c7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 10:28:14 2010 +1000 input: set XKB extension for all new devices, not just xfree86 ones. Right now, Xephyr and others don't get to use XKB on the slave devices. Which works given that no-one cares about SDs just yet but event processing is different if the ProcessInputProc isn't wrapped properly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 11ed32b62c8793ecc1c68e1e4ba91e2eb45eef3e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 10:24:02 2010 +1000 xfree86: purge SendDragEvents support. From the documentation: "This is mainly to allow a touch screen to be used with netscape and other browsers which do strange things if the mouse moves between button down and button up." CLOSED - NOTOURBUG Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 7defd282beb57e8880980416ed579f62d561d1ac Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 10:16:15 2010 +1000 xfree86: remove XI86_CONFIGURED flag. PreInit returns a status code. Let's use that instead of having it report Success in some cases but not set the XI86_CONFIGURED flag and thus signal an init failure. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 97a4acdac23b8ff33da43917c10b65d2fee5c07f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 10:04:53 2010 +1000 xfree86: purge some unused defines. These defines have been write-only for a while now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 0fb7a5c261aa0d87d6596d72b70696bffe0c0aff Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 09:53:35 2010 +1000 input: Purge Register*Device() functions. RegisterPointerDevice() and RegisterKeyboardDevice() were already mapped to RegisterOtherDevice() and obsolete. RegisterOtherDevice() was called for all devices and the two assignments can simply be moved into AddInputDevice(). Purge RegisterOtherDevice() and pretend it never happened. *lalalalala* Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 67ffbcc14cbc61474520d4531599edca24965543 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 09:24:08 2010 +1000 xfree86: remove superflous assignments. ActivateGrab and DeactivateGrab are set in AddInputDevice() already. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 4cd54d9ed9e87074734789a9a7708c2218f87f1e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 09:22:05 2010 +1000 xfree86: make xf86ActivateDevice static. No-one but the joystick driver uses it and that one should be using NIDR instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 31c71425ac13a7f554316356691a79175ea82a67 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 22 09:09:10 2010 +1000 config: expose config_info as an input option. config_info is the only reliable indicator we have in the server for duplicate devices (drivers can test for maj/min on fds as well). Don't set this after the device has been initialized but assume it's important enough to set during NIDR. This makes the option "config_info" available to the drivers as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit de0cc5a72deb7c477e368aa4fe9a713788d7ae4c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 21 16:00:26 2010 +1000 xfree86: rework driver PreInit API - XInput ABI 12 The main change introduced in this patch is the removal of the back-and-forth between DDX and the driver. The DDX now allocates the InputInfoRec and fills it with default values. The DDX processes common options (and module-specific default options, if appropriate) before passing the initialised struct to the driver. The driver may do module-specific initializations and return Success or an error code in the case of a failure. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 7925e8945649d4af237e6c3c5593b895a461bd1e Author: Chase Douglas <chase.douglas@ubuntu.com> Date: Wed Sep 1 14:45:34 2010 +1000 Fix udev population of Bluetooth input device product IDs The udev device_added function takes the vendor and model IDs of added devices and converts them into an attribute that can be matched for by an InputClass configuration using MatchUSBID. Currently, the udev mechanism works for USB devices, but fails to work properly for Bluetooth devices. The product IDs of the event node are actually the IDs of the Bluetooth receiver instead of the device. This patch reads the product ID from the PRODUCT property of the parent of the added device. This tag is set correctly for both USB and Bluetooth input devices. The following devices have been tested by specifying individual InputClass sections in xorg.conf: * Apple Keyboard (Bluetooth) * Apple Magic Trackpad (Bluetooth) * Apple Magic Mouse (Bluetooth) * Microsoft Bluetooth Notebook Mouse 5000 (Bluetooth) * Microsoft IntelliMouse Optical (USB) * N-Trig Touchscreen (USB) * Wacom Bamboo Touch (USB) Signed-off-by: Chase Douglas <chase.douglas@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 05e616767e5b7e60b92d31c4042ded5892dce6d4 Author: Adam Tkac <atkac@redhat.com> Date: Wed Aug 25 10:38:40 2010 +0200 Return Success from generate_modkeymap() when max_keys_per_mod is zero max_keys_per_mod equal to zero is a valid situation so generate_modkeymap should not return BadAlloc in this case. Signed-off-by: Adam Tkac <atkac@redhat.com> Reviewed-by: Patrick E. Kane <pekane52 at gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4a12aecac670debd0dafb17c245fccb93eea2d60 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 25 13:48:29 2010 -0700 xfree86: Document terminate not mapped by default (bug 25083) Document that terminate is not mapped to Ctrl+Alt+Backspace by default, to help alleviate some confusion. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a90052ba8697e217b0dc68057d7b9202ae8797db Author: David Ge <davidqge@gmail.com> Date: Thu Aug 19 00:33:57 2010 -0500 xkb: Fix RedirectKey didn't send any event. Xorg.log shows error: Valuators reported for non-valuator device. This is caused by uninitialized valuators.mask in _XkbFilterRedirectKey(), which trigger the error in UpdateDeviceState(). Signed-off-by: David Ge <davidqge@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ff109bf84401a451380eb7f3f94a6e0aa2776e3e Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Aug 12 00:09:02 2010 -0700 Use GetMaster instead of direct u.master access in core procs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3cc5e4422430e9ca44615f3e63feccd2e5729046 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 23 14:48:32 2010 +1000 xfree86: fix compiler warning about implicied decl of DuplicateModule. ../../../../hw/xfree86/common/xf86Xinput.c: In function ‘xf86AllocateInput’: ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: implicit declaration of function ‘DuplicateModule’ ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: nested extern declaration of ‘DuplicateModule’ ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: assignment makes pointer from integer without a cast Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b5c9953bbf4ffd11f1a70d058c6d3feb2bd1bca8 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Jul 26 15:31:03 2010 +0300 xkb: Check if AddResource failed Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2e6d7174042cc8007e947b7d9fb54acc0ebe29d2 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Jul 26 15:13:34 2010 +0300 xkb: Fix possible NULL pointer dereference sli is null before allocation assigment so deference t osli has to be protected. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit d6642de7ebdda16e0056600a86a7802bd4c393b7 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Mon Jul 26 14:50:30 2010 +0300 xkb: Fix possible NULL pointer dereference If search for device failed sli is NULL. In that case we have to protect dereference to prevent server crash. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit adc0697cfcfba295a15d7a307125093cbccd637f Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 15:11:27 2010 +0300 xkb: Fix memory leak in error path map is allocated but not freed if reply length and data don't match. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 67cfb66562cd9d39f30fec6fbc38eb1eb5e5b030 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 15:05:57 2010 +0300 xkb: Remove redurant intialization code calloc already initializes allocated memory to zero. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2475ef60977f6813dec74ef0837a5915b8a48bbc Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 12:48:55 2010 +0300 xkb: Fix NULL pointer dereference xkb->names is dereferenced in else path too. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 184ef0d35612d6ed0619283d376f04d9a904f47c Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:34:54 2010 +0300 xkb: Don't check for NULL before calling free Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1223340644744c0b38aa85f5956eb5ab7c696517 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:33:33 2010 +0300 xkb: Fix memory leak if opening file fails If fopen fails pointer in buf would be overwriten with a new pointer. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 20cb9c923efa4edc348eba30f956a66413a8208f Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:13:10 2010 +0300 xkb: Use memcpy for copy that has known length Fixes warning that strncpy is not able to append NULL to the end of destination. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit de8be07cc0a8163b6ef04455706fd5ca2cebe587 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 17 12:08:52 2010 +1000 dix: don't create core motion events for non-x/y valuators. Devices that send motion events with valuators other than x/y get core motion events with unchanged x/y coordinates. This confuses some applications. If the DeviceEvent does not have the x/y valuators set, return BadMatch on core conversion, thus skipping the event altogether. Reported-by: Bartosz Brachaczek <b.brachaczek@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Bartosz Brachaczek <b.brachaczek@gmail.com> commit 08adf41f6315663cbac33d010214d98f3e1c8814 Author: Matt Turner <mattst88@gmail.com> Date: Fri Aug 27 18:34:49 2010 -0400 Replace malloc/strlen/strcpy with strdup. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit ea239112b030588ed3cdd113643ba5f6207a5bd9 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 09:21:33 2010 +0000 xfree86: Purge parsePrologueVoid. This was included in the original commit, and then never used. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit b25fb9fe998209e79b6917d12d5765c5f6719a7e Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 09:21:32 2010 +0000 xfree86: Removed unused messages from Configint.h AUTOREPEAT_MSG, MOVED_TO_FLAGS_MSG, and XLEDS_MSG made obsolete by 81913a12910e39d7ea6af8657c1c66cc6791cd65 Jul 21 2006 (remove undead files from master) UNDEFINED_DEVICE_MSG made obsolete by 6033d8150be3a115b90226eaa42f237bb0cf3369 Oct 9 2007 (first pass at video driver autoloading) Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 18b62e0479f15e965611880ada6e0195367df025 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 09:21:31 2010 +0000 xfree86: Fix leaks in OpenConfigFile and OpenConfigDir [mattst88: fixed whitespace and a missing semicolon] Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 4f04fd595e82226f1d91226a41bb98ed3d940b37 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 09:21:30 2010 +0000 xfree86: Simplify xf86Msg{,Verb} Previously, the functions would call xf86VDrvMsgVerb with a screen of -1 despite their comments saying they were for "non-driver messages". They now call LogVMessageVerb, which is what xf86VDrvMsgVerb does anyway when it has a screen == -1. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit f49473abfd6034e68576b2dddd30ba8d8dd0838f Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 09:21:29 2010 +0000 xfree86: Remove prototypes for non-existant functions. This was obsolete from 9a0f25de7ca3c68af867b38936103d17daa92ac6 "Static cleanups, dead code deletion." (server 1.3). Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 747bf5fe80f51554205c5a50b8ed9b89065c8a54 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Sun Aug 1 16:01:23 2010 -0700 xfree86: Remove comments about unable to use malloc. These are leftovers from when X still used Xmalloc and friends for allocation. Now that those are gone, these comments are just confusing. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 65466652936bbb2706be455d0a416bcf08e88f66 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed May 12 13:03:14 2010 +0300 xfree86: vgaarb: fix device decoding interface to send resources type properly Right now, when there is more than one vide card on the machine, we're adopting a pessimistic approach and setting all cards to decode VGA legacy address. Some cards may want to skip the arbitration and the only way to do so is through pci_device_vgaarb_decodes. Therefore, send the desired kind of resource instead force the worst case. Note that xf86VGAarbiterDeviceDecodes is not being used so far by any open-source driver. Even so, API break. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org> commit 7fbf3e7cf4b261194faad747e0bf59d528df6d91 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 10 21:05:14 2010 +0300 xfree86: vgaarb: remove useless macro This was inherited from RAC and was never used there either. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit ad698dd5bcc41fcec1e7ce1117c7ad1052710132 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 10 21:03:30 2010 +0300 xfree86: vgaarb: remove superfluous and confusing VGAGet_GC and VGAPut_GC Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c0aed4c99bf553bd7b8bbc79d0ed8f26d0ab3f94 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 10 20:58:30 2010 +0300 xfree86: vgaarb: change macros by inline functions to ease debug Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 79ee78de9de49d0cab03401662baa476a18e53b8 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 20 17:32:27 2010 -0700 xserver 1.9.0 Signed-off-by: Keith Packard <keithp@keithp.com> commit 3e56efcfb63677cd8574e1e435e61d96f79ea536 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 20 10:01:48 2010 -0700 fb: make isClipped always reject negative coordinates (bug 11503) A window with either dimension > 32767 can be positioned such that coordinates > 32767 are visible on the screen. Attempts to draw to those pixels will generate coordinates wrapped around to negative values. The optimized clipping macro, 'isClipped', in fbbits.h, computes clipping in window space rather than screen space using int16 values, and so it too has coordinates wrapped around to negative values and hence ends up accepting the wrapped drawing coordinates. Two possible fixes for this problem 1) Detect wrapped region coordinates and clip those to 32767. 2) Detect negative incoming coordinates and reject those This patch takes the second approach as it is much shorter, simply detecting when either X or Y incoming coordinate is negative, which can never be 'within' any drawable. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 951605b4660290044fb238bcf1d6d9e498567e8c Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Aug 20 13:51:04 2010 +0100 edid: Adjust rounding of max_clock A simple hack to accommodate various EDID who have detailed modes that exceed the EDID's max pixel clock. The pixel clock is only defined in units of 10MHz and often appears as the maximum pixel code of the detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to include an extra 5MHz prevents the parser from rejecting the detailed modes. The kernel uses the same fuzz and by including it in X we can use the same modes in X as for the console. Fixes: Bug 23833 - X uses different refresh rate to that set by kernel module https://bugs.freedesktop.org/show_bug.cgi?id=23833 In the future, we will want to try harder to keep the KMS modes but at the same time we need to apply the restrictions as specified by the user's configuration, and need to fill in modes for fullscreen games on fixed-mode panels. Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7e581780603d6b15291d032efdeeca77f969e0ba Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Jun 24 12:24:58 2010 +0100 glx: Prevent NULL context deref in __glXGetDrawable() (bug 29184) During a SwapBuffers request, we may end up querying an unknown drawable outside of an active context, and so need to report this error prior to attempting to dereference the NULL context. Also fixes: [Bug 29184] glXSwapBuffers with no GLX context crashes X. https://bugs.freedesktop.org/show_bug.cgi?id=29184 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5725849a1b427cd4a72b84e57f211edb35838718 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 28 18:08:50 2010 -0400 render: Bounds check for nglyphs in ProcRenderAddGlyphs (#28801) Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit fc091936e2bddbbab9c9a501edc5a5f08388617e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 16 14:18:45 2010 +1000 dix: copy the valuators passed into GPE/GKVE/GProxE. GPE and friends modify the valuators array passed in. Which means any driver using e.g. xf86PostButtonEventP(..., valuators) twice to emulate a button click will provide garbage data on the second run. This is currently affecting the wacom driver, xf86PostButtonEventP() with valuators is required to have input events with device-specific axis values. Passing the same valuators in twice, once with press, once with release, will see the valuators modified in the first call and garbage submitted in the next one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6e3e559e9fa63069a10eb834a6dab9a4cfc140ee Author: Keith Packard <keithp@keithp.com> Date: Sun Aug 15 20:53:20 2010 -0700 dix: reset pScreen->root to NULL when root window is deleted. From: Dave Airlie <airlied@linux.ie> We were seeing a crash in the FreeAllResources codepath, running valgrind revealed this, ==12536== Invalid read of size 4 ==12536== at 0x810BCAB: DeliverPropertyEvent (rrproperty.c:33) ==12536== by 0x80958A4: TraverseTree (window.c:227) ==12536== by 0x809593E: WalkTree (window.c:255) ==12536== by 0x810BC66: RRDeliverPropertyEvent (rrproperty.c:53) ==12536== by 0x810BD5D: RRDeleteProperty.clone.0 (rrproperty.c:76) ==12536== by 0x810BD98: RRDeleteAllOutputProperties (rrproperty.c:88) ==12536== by 0x810A36E: RROutputDestroyResource (rroutput.c:407) ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) ==12536== by 0x808E005: FreeAllResources (resource.c:876) ==12536== by 0x8062300: main (main.c:305) ==12536== Address 0x46ba8ac is 4 bytes inside a block of size 164 free'd ==12536== at 0x40057F6: free (vg_replace_malloc.c:325) ==12536== by 0x8087F1F: _dixFreeObjectWithPrivates (privates.c:357) ==12536== by 0x809832A: DeleteWindow (window.c:926) ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) ==12536== by 0x808E005: FreeAllResources (resource.c:876) ==12536== by 0x8062300: main (main.c:305) Its a use after free on the root window, since we have already deleted it at this point. This patch checks if the window we are destroying is the root window and resets the pointer to NULL if it is. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Tested-by: Dave Airlie <airlied@redhat.com> commit 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Aug 1 11:41:58 2010 -0700 XQuartz: xpr: Bail on errors during unlock and destroy Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ee7fd8fc58d9fadfbb92302ddea224537f068538 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Aug 1 11:39:14 2010 -0700 XQuartz: UpdateScreen at the end of SetRootless This will ensure that pRoot is unlocked after the miPaintWindow Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4fc4cab98d454afbfd0d2f48548b5b481e8e7c82 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jul 29 14:49:10 2010 -0700 XQuartz: Make application switching work better for the no-spaces case We still have the issue with not raising the frontmost window for the case when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is disabled. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit e5bc62a03289f956c54c4699edf47f7ff237b5be Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Jul 25 22:29:11 2010 -0700 XQuartz: Ignore kXquartzToggleFullscreen when rootless Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 71af1f71c0492c365707c6b3810f94642ff39352 Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 12 23:01:59 2010 -0700 Bump to version 1.8.99.906 (1.9 RC6) Signed-off-by: Keith Packard <keithp@keithp.com> commit 0af322858e86665ee43f065741318e69c2755510 Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 12 22:56:36 2010 -0700 Silence GCC warning about uninitialized lastSlave variable Not an actual bug, but gcc can't tell that this variable cannot be used without being initialized Signed-off-by: Keith Packard <keithp@keithp.com> commit b5cf9c5090d15a50b105470900823f2d398d4bd2 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Aug 12 00:09:01 2010 -0700 Stop checking or calling PtrCtrlProcs None of them do anything useful now that pointer acceleration is entirely handled in the server. (Does not completely nuke yet, since that would be an API/ABI break.) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bce12f2956f23c0ee53f7f6485dba631293a0931 Author: Jesse Adkins <jesserayadkins@gmail.com> Date: Wed Aug 4 23:39:14 2010 -0700 xfree86: parser: Never use constant strings for driver names (fixes #17438) When the parser sees the "keyboard" driver, it automatically (and silently) replaces it with the constant string "kbd". Everybody else uses malloc'd memory for the driver name, so input device closure assumes it can use free. Free val.str, so this crash doesn't turn into a memory leak. Whew. Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 619ca32202cd22f2a408586cbc906b8bbaeb9358 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 28 15:08:27 2010 +1000 Xi: reset the unused classes pointer after copying After copying the unused_classes into the device, reset the original pointer. Otherwise we have two pointers pointing to the same field and both get freed on device removal. Some classes already have this behaviour since 51c8fd69. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 1a172f3297369a72865232c382abfc14281102a4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 23 13:24:34 2010 +1000 xkb: if the button isn't down, don't fake an event. If the button we're about to fake isn't down (or up), don't fake a release (or press) event for it. Behaviour is the same as before, this just saves a few cycles. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 651c36e95ec0ac60d3fb98966df4218712ae78c2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 23 11:46:30 2010 +1000 xkb: post-fix PointerKeys button events with a DeviceChangedEvent. commit 14327858391ebe929b806efb53ad79e789361883 xkb: release XTEST pointer buttons on physical releases. (#28808) revealed a bug with the XTEST/PointerKeys interaction. Events resulting from PointerKeys are injected into the event processing stream, not appended to the event queue. The events generated for the fake button press include a DeviceChangedEvent (DCE), a raw button event and the button event itself. The DCE causes the master to switch classes to the attached XTEST pointer device. Once the fake button is processed, normal event processing continues with events in the EQ. The master still contains the XTEST classes, causing some events to be dropped if e.g. the number of valuators of the event in the queue exceeds the XTEST device's number of valuators. Example: the EQ contains the following events, processed one-by-one, left to right. [DCE (dev)][Btn down][Btn up][Motion][Motion][...] ^ XkbFakeDeviceButton injects [DCE (XTEST)][Btn up] Thus the event sequence processed looks like this: [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][Motion][Motion][...] The first DCE causes the master to switch to the device. The button up event injects a DCE to the XTEST device, causing the following Motion events to be processed with the master still being on XTEST classes. This patch post-fixes the injected event sequence with a DCE to restore the classes of the original slave device, resulting in an event sequence like this: [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][DCE (dev)][Motion][Motion] Note that this is a simplified description. The event sequence injected by the PointerKeys code is injected for the master device only and the matching slave device that caused the injection has already finished processing on the slave. Furthermore, the injection happens as part of the the XKB layer, before the unwrapping of the processInputProc takes us into the DIX where the DCE is actually handled. Bug reproducible with a device that reports more than 2 valuators. Simply cause button releases on the device and wait for a "too many valuators" warning message. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> commit 6dae7f3792611aace1df0cca63bf50c50d93de43 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Aug 10 19:30:20 2010 +0100 xace: Invalid reference to out-of-scope data. The callback data passed by reference to the hook was allocated on stack within the scope of the case statement. The compiler is free to reuse any of that stack space whilst making the function call so we may end up passing garbage into the callback. References: Bug 18451 - Xorg server 1.5.2 SEGV during XFixesGetCursorImage() https://bugs.freedesktop.org/show_bug.cgi?id=18451 v2: Drop the unrelated hunk that snuck in when ammending the commit message. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fbd02046797185715e1a120d52e410ec78fc365f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Aug 5 15:19:20 2010 +0100 Cygwin/X: Fix glxWinCreateDrawable() for API change Commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc changed the signature of __GLXScreen's createDrawable method. Update the glxWinCreateDrawable() function in XWin's GLX provider appropriately. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ff70848e623920779d20f35d47e9e1f34157de47 Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 09:01:43 2010 -0700 Don't let alpha maps recurse in fb. Bug 23581. Recursive alpha maps (where one picture's alpha map is set to a picture with an external alpha map) would be all fine and dandy, except for the case where the client constructs a loop. Detecting this case when setting the alpha map values would be difficult as any time an alpha map is set, the server would have to check for the looping case. Instead, a far simpler fix is to simply disallow recursive alpha maps in the rendering code, the Render spec is ambiguous in this area and allows us to to ignore the recursive case. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 70a94c5b7a42adc0995bf774c44587a0778be0d0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Aug 3 19:49:10 2010 +0100 rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/X IsFramedWindow() is called from miPaintWindow() if the server has been built with ROOTLESS defined, irrespective of if RootlessInit() has ever been called, or not. Add a check to IsFramedWindow() to check if rootlessWindowPrivateKey has been registered (as a proxy for checking if the rootless extension has been initialized) so we don't go on to try to use that key, triggering an assert. This bug exposes what appears to be a difference in opinion about the rootless extension between XQuartz and XWin. XQuartz always initializes the rootless extension, whereas XWin offers several modes of operation, and the rootless extension is only used for one of them That probably means that the all code under compile time guard for ROOTLESS should be carefully checked that it doesn't also need to be under a run-time guard (I've reviewed the other ROOTLESS blocks in dix/events.c and dix/window.c and they look ok -- keithp) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 3ab6cd31cbdf8095b2948034fce5fb645422d8da Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 9 15:20:20 2010 -0400 fonts: Fix refcounting for asynchronous font operations (#3040) When doing Xinerama, we'll dispatch font ops across all backend screens. If using a font server (such that some operations can sleep), we'll put the client to sleep once for each screen, but only wake up once, because we're trying to keep track of the sleep count in _each_ screen's closure. Instead, just ask the core whether the client is already asleep. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 35c0dbe4b0a6ab790f4271325b8a0b16894daa8b Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Aug 8 10:03:08 2010 -0400 doc: add missing .gitignore for Xserver-DTrace The dtrace doc was recently added in commit 9c171d4aee695ab66e6db1ab92539557bd368cfa Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> commit 05c4fe83fdc20b838fd59658478278dc31a55eb9 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Jul 30 17:43:24 2010 -0700 Check HAVE_XMLTO_TEXT before trying to use xmlto to make text files Reported-by: Matt Turner <mattst88@gmail.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit a6fb7829ed9bf26c4c2a02c6ed075fb1b17f7b2a Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Jul 26 19:55:27 2010 -0700 Xserver-spec: Update ChangeGC prototype, add ChangeGCXIDs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit a817271d461e2f95dd7dc62cd1c7d123ce92f555 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jul 22 23:57:57 2010 -0700 Update Xserver-spec for new devPrivates API Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> commit 40d598a4f84091db743ceef4d60752bb910c3e56 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jul 22 23:57:02 2010 -0700 Correct function name in dixRegisterPrivateKey comments Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> commit 8d7b7a0d71e0b89321b3341b781bc8845386def6 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Thu Jul 29 20:36:25 2010 -0400 Set DamageSetReportAfterOp to true for the damage extension Change the damage extension reporter to queue up events after we chain to the wrapped functions. Damage events are typically sent out after the rendering happens anyway, since we submit batch buffers from the flush callback chain and then flush client io buffers. Compositing managers relie on this order, and there is no way we could reliably provide damage events to clients before the rendering happens anyway. By queueing up the damage events before the rendering happens, there's a risk that the client io buffer may overflow and send the damage events to the client before the driver has even seen the rendering request. Reporting damage events after the rendering fixes this corner case and better corresponds with how we expect this to work. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit c65f610e12f9df168d5639534ed3c2bd40afffc8 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Thu Jul 29 18:52:35 2010 -0400 Always call the flush callback chain when we flush client buffers We were missing the callback in a couple of places. Drivers may use the flush callback to submit batched up rendering before events (for example, damage events) are sent out, to ensure that the rendering has been queued when the client receives the event. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 7e0575baf14ec4a89492fd2780f9ab5b9244afbd Author: Matt Turner <mattst88@gmail.com> Date: Tue Jul 27 23:32:36 2010 -0400 ddc: Fix memory leak in GetEDID_DDC1 Mark argument to DDC_checksum as const too. Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 750d4e82a0c1161292d24216bcff200cd6647611 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Jul 29 11:39:40 2010 -0700 XQuartz: xpbproxy: Don't take down the whole server on an IO error Calls pthread_exit to prevent _XIOError from calling exit() This fixes http://xquartz.macosforge.org/trac/ticket/421 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 98f90145d786695ecbc02a667c6ffe7c619dc67e Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jul 28 18:08:02 2010 -0700 XQuartz: GLX: Don't mangle __GLXDrawable's pDraw We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in __GLXAquaDrawable. (we should refactor to eliminate this redundancy later) This was causing http://xquartz.macosforge.org/trac/ticket/426 This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 The root cause of this change was fed7ccc481ad1caaa518cafe944c2327a5d0b6c65 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9c171d4aee695ab66e6db1ab92539557bd368cfa Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Jun 25 16:52:42 2010 -0700 Add documentation of the Xserver DTrace probes Mostly pulled together from posts to my blog and the docs posted at http://people.freedesktop.org/~alanc/dtrace/ and converted to DocBook. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> commit 6b912b08ce65072b2401167fbf2150b99c0ca6b0 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jun 19 23:56:20 2010 -0700 Add name argument to CreateNewResourceType documentation Reflects API change made in commit 895f40792a during Xorg 1.8 development Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> commit 44c9350d72b3eda982c642feb45d6648afc626cf Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jun 19 23:40:37 2010 -0700 Use DocBook stylesheets from xorg-sgml-doctools if they're available Bumps minimum xorg-macros requirement from 1.6 to 1.10 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Patrick E. Kane <pekane52@gmail.com> commit 9fbbff3c0456f1969d45cc957d3260723caf62d7 Merge: 95756f410 9ac8e206f Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 21 11:56:39 2010 -0700 Merge remote branch 'whot/for-keith' commit 9ac8e206ffe1016a8bc203261ade6c763a8a4f86 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 15 15:46:15 2010 +1000 xkb: use GetMaster instead of dev->u.master. Devices that are both pointers and keyboards are not affected by keyboard changes as their master device is a master pointer, not a master keyboard. Use GetMaster() instead to ensure devices that are attached to the paired master pointer device will still be update. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c54f81ba7a58faf37a612bd9a45276bb2922b5d8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 15 13:24:14 2010 +1000 dix: hack around enter/leave event issues for grabbed devices (#27804) The current core enter/leave does not cater for device grabs during enter/leave events. If a window W contains a pointer P1 and a client grabs a pointer P2, this pointer will not generate enter/leave events inside this window. Hack around this by forcing grabbed devices to always send enter/leave events. X.Org Bug 27804 <http://bugs.freedesktop.org/show_bug.cgi?id=27804> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 95756f410c65a6510a797e94a792b959d45cdb9e Author: Jan Hauffa <hauffa@in.tum.de> Date: Sat Jul 17 12:18:39 2010 -0700 rootless: Adjust the frame size of the native root window in RootlessResizeWindow If the native root window isn't resized as well, we will likely crash the next time we draw to the root. On OS X, this can be seen by: 1) Put the display preferences in the menu bar and set X11's preferences so you can access the menu bar in fullscreen mode 2) Set the resolution of your screen lower than normal. 3) Start X11 in fullscreen mode. The root window will cover the screen as expected. 4) Use the menu bar to increase the resolution of the display. The root window will now cover the old area and not the full screen, but 'xwininfo -root' will report the full width. 5) Run 'xsetroot -solid red', and we have the crash you mention above. Leaving/entering fullscreen after #4 will fix the problem. This is because the WINREC is erased when we leave fullscreen mode and it is recreated upon re-entry: RootlessUpdateRooted(FALSE) RootlessDisableRoot(screenInfo.screens[0]) RootlessDestroyFrame (pRoot, winRec); RootlessUpdateRooted(TRUE) RootlessEnableRoot(screenInfo.screens[0]) RootlessEnsureFrame(screenInfo.screens[0]->pRoot) creates a new WINREC... Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-By: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> commit a2c13f0d6548310e3cd115cf486d3e43edf23dcc Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 14 12:57:29 2010 -0700 Bump to version 1.8.99.905 (1.9 RC5) Signed-off-by: Keith Packard <keithp@keithp.com> commit 0fc02c0bf92f694889589e3648acc08d4684de37 Merge: 0540c4606 9d8ec712a Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 13 15:05:36 2010 -0700 Merge remote branch 'jeremyhu/master' commit 0540c46066f938ad5611c56081cfcd8457a9b718 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jul 13 14:56:53 2010 +0200 EXA: Finish access to pixmap if it's prepared at destruction time. Previously we assumed every pixmap destroyed during a software fallback was also created during a software fallback and had access prepared, but that's not always true. Fixes a server abort Reported-by: 邓逸昕 <bupt.dengyixin@gmail.com> Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 12 16:01:34 2010 -0700 Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 Because some EnterVT code needs to remove it self from the call chain, we need to fix all of the wrappers to correctly unwrap/rewrap during the call chain. This is a follow-on to the fix for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Jesse Barnes <jesse.barnes@intel.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 9d8ec712a67ce71ea7408f0626cda7e0fa7c3bac Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 13 08:56:36 2010 -0700 XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit b2b9c458a46e9a41c3c76ffe83a2b580a41d0e90 Author: Jan Hauffa <hauffa@in.tum.de> Date: Wed Jun 16 09:25:41 2010 -0700 XQuartz: Remove some dead code. Signed-off-by: Jan Hauffa <hauffa@in.tum.de> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 648d189548530fa23d97d1e8737f89d297f1c443 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jul 13 08:25:27 2010 -0700 XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Jul 9 10:36:56 2010 -0700 DRI2: re-allocate DRI2 drawable if pixmap serial changes If a pixmap header is modified or the drawable serial changes, some aspects of the drawable are likely to have changed so we should re-allocate the corresponding DRI2 drawable in that case. This is one way of catching when the root window pixmap changes through xrandr. Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=28365. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 02b11509b25686ff7bd567ecb78a435701edc4c2 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Jul 9 10:36:12 2010 -0700 miModifyPixmapHeader: always update serialNumber We should update the serial number even if we just change a single field. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2307ab5bc9365ebbe04568edb7c7620a23689b70 Merge: c65280ce8 fd4f5059f Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 6 23:54:54 2010 -0400 Merge remote branch 'whot/for-keith' commit fd4f5059f08165a726071dc9f1ca877038292f6f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 6 09:19:09 2010 +1000 dix: purge leftover manual key down bit setting. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a1afe172559aff010e886cfc2a7a922d4a06c697 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 6 09:16:42 2010 +1000 dix: add aux. functions for button_is_down, set_button_down, set_button_up. Same as the matching key functions. Buttons, like keys, can have two states for down/up - one posted, one processed. Posted is set during event generation (usually in the signal handler). Processed is set during event processing when the event queue is emptied and events are being delivered to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 32473d6bf38c95b2d6d5ddbf583a1e801c6605e4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 6 08:56:12 2010 +1000 dix: use BitIsOn/SetBit/ClearBit macros for set_key_down helpers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit c18442908080c9833dfd6bb2ff367945d1892421 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 5 16:47:57 2010 +1000 Xi: use set_key_up/down instead of manual bit handling. We have the wrappers, use them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 10442ce02b5be7f82b373bee1939e2b523e291d9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 5 16:54:48 2010 +1000 dix: treat flags as flags, not as value in key_is_down. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit b46ffd25d3f211e91c67bc618ecbd58257939388 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 2 15:25:14 2010 +1000 mi: rename miPointerMoved to miPointerMoveNoEvent. Having miPointerMove and miPointerMoved is confusing, especially since both do the same thing bar the event delivery. Also, miPointerMove calls miPointerMoved which indicates some confusion in the temporal alignment of cause and effect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit dbd621705a5211540b353af81c4af83c297b74dc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 2 14:22:03 2010 +1000 mi: De-duplicate some code in mipointer.c miPointerMoved already has the same code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit c65280ce8df4836bd7424a90482e8aa00ab6f447 Author: Robert Hooker <sarvatt@ubuntu.com> Date: Sat Jun 12 20:23:09 2010 -0400 Increase advertised RENDER protocol minor version to 11 Support for the blend mode operators was added in 0ce42adbf4cff9e7f049d9fc79d588ece5936177 and the requirement was bumped but when things were split off into include/protocol-versions.h it defined it to 10. render uses the lower of the client and server advertised versions so it's not using the new blend mode operators. Signed-off-by: Robert Hooker <sarvatt@ubuntu.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9f0b193acdc29e491b6245390cf9f53b5222e6d3 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 09:13:43 2010 -0400 miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639) miDbeInit pre-allocates space in each DBE window private private for a MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the pre-allocated space correctly (simply fetching it instead of allocating a new piece of memory). However, it then called dixSetPrivate anyways, which isn't necessary, and (in the new dixPrivate world) causes an assert failure. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Magnus Kessler <Magnus.Kessler@gmx.net> Reviewed-by: Magnus Kessler <Magnus.Kessler@gmx.net> commit a94cb400d15b8c78dc04148cbd8db8e5ec8364b5 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 09:11:36 2010 -0400 Delete unused miDbe screen private private datatype MiDbeScreenPrivPrivRec is not used in the server. Remove it, along with the MI_DBE_SCREEN_PRIV_PRIV macro that tried to use it. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Magnus.Kessler <Magnus.Kessler@gmx.net> commit f0fcffe55f280add5e4db2f5e9198a48c6f1b015 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jun 3 19:00:54 2010 -0700 Update the sprite immediately when moving it with MouseKeys Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856 Ensures waitForUpdate is False before calling SetCursorPosition. Normally waitForUpdate is False when SilkenMouse is active, True when it's not. When it's True, the mouse cursor position on screen is not updated immediately. This is more critical on Solaris, since we disabled SigIO, thus in turn disable SilkenMouse, due to the SSE2 vs. signal handler issues described in Sun bugs 6849925, 6859428, and 6879897. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3d9079b898c432a87f9b95c1f39a85f660bf0858 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jun 3 19:00:53 2010 -0700 Add API to update setting of waitForUpdate screen private in miPointer Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 69b2b5c85ec079ef49f84722daa5f148cedc2e1b Merge: b90faa715 143278583 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 23:46:53 2010 -0400 Merge remote branch 'whot/for-keith' commit b90faa71567c4461b28515756ba5c1e6286dda16 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 23:46:27 2010 -0400 Revert "xkb: merge lockedPtrButtons state from all attached SDs." Preparing to merge Peter's branch. This reverts commit 6052710670953b43b4fff5d101b727163fcb1187. commit 9fb0785449b287ba1998e08613b3c2102ec24842 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 23:45:50 2010 -0400 Revert "Revert "dix: use the event mask of the grab for TryClientEvents."" Preparing to merge Peter's branch. This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b. commit 48cac27870992f6bde2c48429ff03c0a7606d5c1 Author: James Jones <jajones@nvidia.com> Date: Fri Jun 18 17:28:15 2010 -0700 Cast void* to pointer* to appease some compilers. When this privates.h is included in C++ builds, the compiler complains about implicitly casting void* to void**. This small patch fixes that up. Signed-off-by: James Jones <jajones@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 14327858391ebe929b806efb53ad79e789361883 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 1 12:44:57 2010 +1000 xkb: release XTEST pointer buttons on physical releases. (#28808) If a button release event is posted for the MD pointer, post a release event through the matching XTEST device. This way, a client who posts a button press through the XTEST extension cannot inadvertedly lock the button. This behaviour is required for historical reasons, until server 1.7 the core pointer would release a button press on physical events, regardless of the XTEST state. Clients seem to rely on this behaviour, causing seemingly stuck grabs. The merged behaviour is kept for multiple keyboard PointerKey events, if two physical keyboards hold the button down as a result of PointerKey actions, the button is not released until the last keyboard releases the button. X.Org Bug 28808 <http://bugs.freedesktop.org/show_bug.cgi?id=28808> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a71dbc03e65cf7b0654a6eca93ce0bf6a1711ffa Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 1 08:27:05 2010 -0400 Bump to version 1.8.99.904 (1.9 RC4) Signed-off-by: Keith Packard <keithp@keithp.com> commit 5ea497fc32202ff19c2b7d8ef4eba08889108a87 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jun 29 16:08:02 2010 +0300 xfree86: configure: remove vendor and card name matching rules Although vendor and board naming are used to create the configure file, the server doesn't actually use it when fetching such file and probing devices. Reported-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 90fd9e40b59e69333d250a795998f44dc3a5dc0c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jun 29 16:08:01 2010 +0300 xfree86: pci: remove superfluous vendor and card name logging X server suffers in startup time when relying on the pciaccess's linear search to fetch vendor and video device name from PCI ID file (when existent). Such names are only used to write the log, which may be superfluous. This information often is provided by the drivers or likewise users can get the it using external tools like lspci or scanpci. This patch remove the references of those functions from X start up. Reported-by: Richard Barnette <jrbarnette@chromium.org> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Richard Barnette <jrbarnette@chromium.org> Reviewed-by: James Cloos <cloos@jhcloos.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 339f62b1bfadb0ee77d67e351f4e30f5d5e9625f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 29 15:24:51 2010 +1000 xkb: emulate PointerKeys events only on the master device. This patch replicates the behaviour for button events. Only generate a PointerKeys motion event on the master device, not on the slave device. Fixes the current issue of PointerKey motion events generating key events as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 69ac909878ef80bb74c4a9ca4150eda66debd754 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 29 12:12:53 2010 +1000 xkb: merge lockedPtrButtons state from all attached SDs. Problem: lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button press. Unconditionally clearing the bits may cause stuck buttons in this sequence of events: 1. type Shift + NumLock to enable PointerKeys 2. type 0/Ins on keypad to emulate Button 1 press → button1 press event to client 3. press and release button 1 on physical mouse → button1 release event to client Button 1 on the MD is now stuck and cannot be released. Cause: XKB PointerKeys button events are posted through the XTEST pointer device. Once a press is generated, the XTEST device's button is down. The DIX merges the button state of all attached SDs, hence the MD will have a button down while the XTEST device has a button down. PointerKey button events are only generated on the master device to avoid duplicate events (see XkbFakeDeviceButton()). If the MD has the lockedPtrButtons bit cleared by a release event on a physical device, no such event is generated when a keyboard device triggers the PointerKey ButtonRelease trigger. Since the event - if generated - is posted through the XTEST pointer device, lack of a generated ButtonRelease event on the XTEST pointer device means the button is never released, resulting in the stuck button observed above. Solution: This patch merges the MD's lockedPtrButtons with the one of all attached slave devices on release events. Thus, as long as one attached keyboard has a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey button is released on all keyboards, the matching release event is emulated from the MD through the XTEST pointer device, thus also releasing the button in the DIX. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 09645864f5a52882eee51c801b3e610d683e7147 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 29 13:49:27 2010 +1000 xkb: Mark switch case fallthrough with comment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c7330ecb5d28d7a92d24feb289f7f1812ce055a4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 30 13:23:14 2010 +1000 dix: fix up erroneous error message. (WW) Device 'device name' has 36 axes, only using first 36. does seem a bit silly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dbf249ec6638f0a8dfa4c2286099845aafc8ac88 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 29 10:43:51 2010 +1000 xkb: remove now obsolete comment. Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent call. Whoop. Di. Doo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f028e70ca714f6956e41754f132cb9b8a1e8db63 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 30 08:33:55 2010 -0700 Initialize dev privates before using any Initializing the dev privates code after allocating the server client dev privates would cause the memory leak check to fire at server startup or reset. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 433d0851cd3e61d841ff374ee0a0f052d5907029 Author: Julien Cristau <jcristau@debian.org> Date: Fri Jun 25 11:34:44 2010 +0100 Xephyr: fix Xv adaptor capability tests Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9626eedebf620559652ffb1fefa82b5d659e57be Author: Julien Cristau <jcristau@debian.org> Date: Thu Jun 24 18:45:11 2010 +0100 configure: bail if Xephyr was requested but its dependencies are missing Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit e6531ae9d5bdd37775e921268366fb76056e22d5 Author: Julien Cristau <jcristau@debian.org> Date: Thu Jun 24 18:45:10 2010 +0100 Xephyr: fix memory leak in XF86DRIOpenConnection The allocated bus id string was not being freed. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 390a8466dd1914f4786b811ff8454f6e0c4b6b04 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Jun 28 23:26:48 2010 +0300 xfree86/modes: Allow the driver to specify initial rotation When the "Rotate" option isn't specified allow the driver to specify the initial rotation mode. This way the driver can choose to retain the same settings that were used by software that was used prior to starting X. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6052710670953b43b4fff5d101b727163fcb1187 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 30 08:21:04 2010 -0700 xkb: merge lockedPtrButtons state from all attached SDs. Problem: lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button press. Unconditionally clearing the bits may cause stuck buttons in this sequence of events: 1. type Shift + NumLock to enable PointerKeys 2. type 0/Ins on keypad to emulate Button 1 press → button1 press event to client 3. press and release button 1 on physical mouse → button1 release event to client Button 1 on the MD is now stuck and cannot be released. Cause: XKB PointerKeys button events are posted through the XTEST pointer device. Once a press is generated, the XTEST device's button is down. The DIX merges the button state of all attached SDs, hence the MD will have a button down while the XTEST device has a button down. PointerKey button events are only generated on the master device to avoid duplicate events (see XkbFakeDeviceButton()). If the MD has the lockedPtrButtons bit cleared by a release event on a physical device, no such event is generated when a keyboard device triggers the PointerKey ButtonRelease trigger. Since the event - if generated - is posted through the XTEST pointer device, lack of a generated ButtonRelease event on the XTEST pointer device means the button is never released, resulting in the stuck button observed above. Solution: This patch merges the MD's lockedPtrButtons with the one of all attached slave devices on release events. Thus, as long as one attached keyboard has a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey button is released on all keyboards, the matching release event is emulated from the MD through the XTEST pointer device, thus also releasing the button in the DIX. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Jun 30 07:59:04 2010 -0700 OS support: fix writeable client vs IgnoreClient behavior When ResetCurrentRequest is called, or IgnoreClient is called when a client has input pending, IgnoredClientsWithInput will be set. However, a subsequent IgnoreClient request will clear the client fd from that fd set, potentially causing the client to hang. So add an Ignore/Attend count, and only apply the ignore logic on the first ignore and the attend logic on the last attend. This is consistent with the comments for these functions; callers must pair them. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27035. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 25 09:48:10 2010 +1000 Revert "dix: use the event mask of the grab for TryClientEvents." Behaviour of earlier X servers was to deliver the ButtonPress event unconditionally, regardless of the actual event mask being set. Thus, a GrabButton event will always deliver the button press event, a GrabKey always the key press event, etc. Same goes for XI and XI2. Reproducible with a simple client requesting a button grab in the form of: XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None); On servers before MPX/XI2, the client will receive a button press and release event. On current servers, the client receives only the release. Clients that expect the press event to be delivered unconditionally may leave the user with a stuck grab. XTS test results for XGrabButton are identical with and without this patch. This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. Conflicts: dix/events.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1884db430a5680e37e94726dff46686e2218d525 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 24 12:52:53 2010 +1000 Revert "dix: use the event mask of the grab for TryClientEvents." Behaviour of earlier X servers was to deliver the ButtonPress event unconditionally, regardless of the actual event mask being set. This is documented in the protocol: "This request establishes a passive grab. In the future, the pointer is actively grabbed as described in GrabPointer, the last-pointer-grab time is set to the time at which the button was pressed (as transmitted in the ButtonPress event), and the ButtonPress event is reported if all of the following conditions are true: <list of conditions, event mask is not one of them>" Thus, a GrabButton event will always deliver the button press event, a GrabKey always the key press event, etc. Same goes for XI and XI2. Reproducible with a simple client requesting a button grab in the form of: XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None); On servers before MPX/XI2, the client will receive a button press and release event. On current servers, the client receives only the release. Clients that expect the press event to be delivered unconditionally. XTS Xlib13 XGrabButton 5/39 now passes. This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well, the code introduced with 1c612 is not needed anymore. Conflicts: dix/events.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Keith Packard <keithp@keithp.com> commit 3b3c77b87070ddcdbb2acb114a81628485e7a129 Author: Tiago Vignatti <tiago.vignatti@Nokia.com> Date: Wed Jun 23 15:18:04 2010 +0300 configure: don't check xfont always for each server It's already defined inside REQUIRED_LIBS and all DDX are getting it already. No semantical changes. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 75536ee80595c79bba95a1fb6844126ee08486d4 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Jun 23 15:18:03 2010 +0300 dix: use one single function to register fpe fonts X server doesn't need to understand fpe internals, so use register_fpe_functions from libXfont. It's required to get new version of libXfont, therefore adjust it to be passed to autoconf. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a68a101a730df7f73421555e381a50b074607c5e Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 22 12:13:26 2010 -0700 Bump to 1.8.99.903 -- 1.9 RC3 Signed-off-by: Keith Packard <keithp@keithp.com> commit 2c0159d21788b16607e6ebe4571b57fe78545c2a Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon Jun 14 09:25:22 2010 -0400 list.h: Fix list_for_each_entry_safe() Can't use next as a macro argument since we're accessing the .next field of struct list. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e2918b67395a48397bf7db545584cc2d4f4e7ccf Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 22 12:11:20 2010 -0700 Revert "mi: Remove unused overlay support" This reverts commit 9120e58556014e514eef9dfe43cdea4b74dc66ae. Whoops, please revert this patch -- overlay is in use in nvidia drivers, and it's too late in release cycle to remove it. I feel really sorry that I kept this patch in my tree. I will submit another one, removing only XAA overlay hooks which are not used at all. commit 7673451ade46ebacfdfc02a5190149210198fdd8 Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 22 11:49:30 2010 -0700 Bump to 1.8.99.902 -- 1.9 RC2 Signed-off-by: Keith Packard <keithp@keithp.com> commit 8b65f2edb407521e0ac0e207e5d5358986bd46da Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Date: Tue Jun 22 14:57:20 2010 +0300 record: Prevent a crash on recording client disconnect. Execute the following steps to reproduce the issue. 1. Run at least two recording clients simultaneously. $ cnee --record --request-range 1-127 & $ cnee --record --request-range 1-127 & 2. Kill the recording clients. $ killall cnee 3. Give X server something to do so that the clients are closed. $ xinput list $ xinput list As a result RecordUninstallHooks accesses NullClient, because RecordAClientStateChange doesn't clean the recording clients up properly. Fix RecordUninstallHooks to fail locally on an assertion instead of much later in privates code, if NullClient is still accessed because of some other bug. Fix RecordAClientStateChange to iterate through all contexts so that modifications of the iterated array during iteration don't cause contexts to be skipped. Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 660f6ab5494a728c3ca7ba00c305e9ff06c8ecb2 Author: Simon Farnsworth <simon.farnsworth@onelan.com> Date: Tue Jun 22 10:13:30 2010 +0100 Don't crash when asked if a client that has disconnected was local ProcDRI2Dispatch uses LocalClient to determine if it's safe to respond to a client that has made DRI2 requests which aren't sensible for remote clients (anything but version). When the client has disappeared mid-request stream (e.g. as a result of a kill -9, or a client-side bug), LocalClient causes the X server to follow suit, as ((OsCommPtr)client->osPrivate)->trans_conn is NULL at this point. The simple and obvious fix is to just return "not local" when trans_conn is NULL, which fixes the crash I was seeing; however Keith Packard pointed out that just checking trans_conn isn't enough; quoting Keith: "This looks almost right to me -- I reviewed the os code to see when _XSERVTransClose is called (which is what frees the trans_conn data) and found that every place which called that immediately set trans_conn to NULL, except for the call in CloseDownFileDescriptor which is only called from CloseDownConnection and which is immediately followed by freeing the OsCommRec and setting client->osPrivate to NULL. So, I'd suggest checking client->osPrivate in addition to the above check." Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 82d41ada993d8cbdcdfea878d1a5b031afe4e593 Author: Dave Airlie <airlied@redhat.com> Date: Mon Jun 21 16:33:55 2010 +1000 composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345) The fixes for the composite reallocation failure, were freeing the oldpixmap straight after reallocating the new one, however this led to some wierd effects in e16 compositing, and I think in a few other places. This patch moves the freeing of the pixmap into the post wrapped stage. I'm not sure if we are actually better off breaking ABI and adding another callback from the ConfigureWindow to composite to make sure the old pixmap is always freed, but this should be satisfactory as we should always hit one of the freeing paths or else its a bug in the DIX. bug: https://bugs.freedesktop.org/show_bug.cgi?id=28435 Reported-by: Andrew Randrianasulu <randrik@mail.ru> Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c6bc52cb6663138d1273447cb7661fa6e958f539 Author: Dave Airlie <airlied@redhat.com> Date: Mon Jun 21 14:08:50 2010 +1000 dri2: avoid crash with old dri drivers. I built latest server and copied over a mesa 7.8 dri2 driver to use with it, and it crashed in here starting compiz. Looks like we need to validate the flush extension is registered before calling invalidate. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 80d1a548d6ce73c2ff097536c1bc7044bf74965d Author: Dave Airlie <airlied@redhat.com> Date: Mon Jun 21 10:05:08 2010 +1000 rotation: fix cursor and overlap of one pixel. Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix a cursor off by one on Intel hw, however it also move the whole crtc into an off by one position and you could see gnom-eshell overlapping. This commit reverts that and instead fixes the cursor hotspot translation to work like pixman does. We add 0.5 to the cursor vector before translating, and floor the value afterwards. Thanks to Soeren (ssp) for pointing out where the real problem was after explaning how pixman translates points. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 32c706c4ffd7433dbfc79dba8785b1510d2f053f Author: Gaetan Nadon <memsize@videotron.ca> Date: Sun Jun 20 20:37:26 2010 -0400 config: declare xserver private dependencies in xorg-server.pc Any module (drivers) depending on xserver also depends on some of the server private dependencies. Any driver including xf86.h depends on xext, kbproto, inputproto and randr. These dependencies are in separate packages, so anything can happen, removal, wrong version, etc... and the driver fails during compilation. Having the private dependencies declared will ensure all packages the server depends on are present and at the correct version. Currently each module attempts to check for server dependencies with various degrees of accuracy. With this patch, the driver will only need to check for its own explicit dependencies. Now that xproto is included in Requires.private it is removed from Requires. All the cflags from both Requires and Requires.private are returned to caller to pkg-config. Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 37734ba79ca3a9bad1c1e29d89710c8f9c299210 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Jun 16 18:07:04 2010 +0100 XWin: Fixes for devPrivates API change Fix some typos in devPrivates API changes in XWin code. Move allocation of private keys as it's no longer valid to do them during OsVendorInit() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f7dae972aac28c5792566e997c40254e787d246a Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Tue Jun 15 23:25:34 2010 +0300 xv: Don't send port notify when SetPortAttribute fails Currently a port notify event is sent even if SetPortAttribute fails. Furthermore the value field in the event will contain the value that was specified in the failed request. So any client interested in the actual value of the attribute will have to double check the current value with GetPortAttribute after receiving a port notify event. Fix the problem by sending port notifications only when SetPortAttribute succeeds. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c20166739603f86888f28ca2c65f5cf474d0d8c9 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jun 12 01:05:07 2010 +0700 os: Remove unused dev_tty_from_init variable Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 2e15f1903dac8473285ad2937c079a08cf7c5d31 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jun 12 00:53:38 2010 +0700 os: Remove unused pread/pwrite/lockit functions Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 9120e58556014e514eef9dfe43cdea4b74dc66ae Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jun 12 00:30:27 2010 +0700 mi: Remove unused overlay support The only reference to it in server and drivers is in XAA overlay code which would segfault as no miInitOverlay is called ever. No segfaults were observed "in wild", so XAA overlay is probably also unused. XAA code is modified to act as if miOverlayCopyUnderlay always returned false, because XAACopyWindow8_32 could only set doUnderlay to true if it's called from miOverlayMoveWindow or miOverlayResizeWindow, which can only be called if miInitOverlay has hooked those functions, and no driver (on fd.o) or server code calls that. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 91b5aadbdfd9d05ca1ffdeb443e602ecdba1e04d Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 11 20:20:00 2010 +0700 mi: do not use X11/extensions/shape.h header from libXext Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Tested-by: Dan Nicholson <dbn.lists@gmail.com> commit b8615d592700b7be319c04cc0563fdeb5a266534 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat Jun 12 08:19:16 2010 -0700 Don't coredump on "X -showopts" (bug 25874) Don't try walking the xf86ConfigLayout.screens table if it's empty https://bugs.freedesktop.org/show_bug.cgi?id=25874 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 32fd57509c3e06f63ac6b0ad607767fd2b688e5a Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Date: Fri Jun 18 12:40:58 2010 +0300 record: Register client private to prevent crash. Running the following command causes an assertion to fail: cnee --record --request-range 1-127 3 in dixGetPrivateAddr at ../../include/privates.h:122 4 in dixGetPrivate at ../../include/privates.h:137 5 in dixLookupPrivate at ../../include/privates.h:167 6 in RecordInstallHooks at ../../record/record.c:911 7 in ProcRecordEnableContext at ../../record/record.c:2377 8 in ProcRecordDispatch at ../../record/record.c:2571 9 in Dispatch at ../../dix/dispatch.c:432 10 in main at ../../dix/main.c:289 Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 75beadd766fed7b12a76e59e57c244e297c2d2cb Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Date: Sun Jun 13 18:05:26 2010 +0200 DRI2/xserver: Don't hang in glXSwapBuffers if drawable moves between crtc's (bug 28383) Detect if a drawable has been moved from an original crtc to a new crtc with a lower current vblank count than the original crtc inbetween glXSwapBuffers() calls. Reinitialize drawable's last_swap_target before scheduling next swap if such a move has taken place. last_swap_target defines the baseline for scheduling the next swap. If a movement between crtc's is not taken into account, the swap may schedule for a vblank count on the new crtc far in the future, resulting in a apparent "hang" of the drawable for a long time. Fixes Bugzilla bug #28383. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 868bf3de478fac0080d525137fc728c551c78ea6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 15 13:22:20 2010 +1000 dix: the default axis mode is Relative, not "0". Yay for readability. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> commit db0d3d4e573c93a8af43499682ed788c7bd0d70d Author: Xiaoyang Yu (Max) <max.a.yu@intel.com> Date: Fri Jun 4 17:17:53 2010 +0800 Re-enabled Xnest fix for focus in + modifier bug. * See https://bugs.freedesktop.org/show_bug.cgi?id=3030 Signed-off-by: Xiaoyang Yu (Max) <max.a.yu@intel.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> This takes the xnest way of working around this (see 5904ef2ccd6056b187ca76f104c21e2d686bfc1d "xnest: restore xnestUpdateModifierState") and copies it to Xephyr. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 505724c5f3e4fc1475fa54f20d08c0c06fb32443 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 7 16:28:34 2010 -0700 In DRI2Connect, check to see if DRI2 has been initialized (bug 28424) This prevents DRI2GetScreen from being invoked with an uninitialized private key which would cause an assert failure. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: David Ronis <David.Ronis@McGill.CA> commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e Author: Keith Packard <keithp@keithp.com> Date: Fri May 7 22:56:04 2010 -0700 Clean up RandR12 bits on screen close (bug 27114) When resetting the server, pScrn->EnterVT must be unwrapped or the next server generation will end up wrapping the wrapper and causing an infinite recursion on EnterVT. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Michael Stapelberg <michael+freedesktop@stapelberg.de> commit d5ab717768524c8552b81607aaeffb447ab268ee Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 10 19:21:18 2010 -0700 Bump to 1.8.99.901 -- 1.9 RC1 Signed-off-by: Keith Packard <keithp@keithp.com> commit a41d6e9bffbe56cfa1c3b84388a3d9f5a982f1a9 Merge: 7e8f10012 f4190feb2 Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 11 10:08:13 2010 -0700 Merge remote branch 'dottedmag/for-keithp' commit 7e8f1001217326cc451974bacf25275420c4bb4e Author: Éric Piel <E.A.B.Piel@tudelft.nl> Date: Fri Jun 11 09:16:32 2010 -0700 exa: fix ExaCheckCopyNtoN for exa_classic when source = dest In case you want to copy a region with source = dest, you have the same pixmap as source and dest. At the end of exaPixmapIsOffscreen_classic() the devPrivate.ptr is reset to NULL (look at the sources). Now this is what happens in ExaCheckCopyNtoN: exaPrepareAccess( pDst ); Calls IsOffscreen() sets devPrivate.ptr to NULL sets up devPrivate.ptr to real pointer Everything OK exaPrepareAccess( pSrc ); Calls IsOffscreen() sets devPrivate.ptr to NULL BAILS OUT CAUSE OF NESTED OPERATION SINCE DST EQUALS SRC We end up with devPrivate.ptr as NULL, and that is clearly wrong. In particular this fixes a segfault when using the psb driver (bug 28077) Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f4190feb25ecc3d8278decc8bf28a5ef0e568942 Author: Matt Turner <mattst88@gmail.com> Date: Thu Jun 10 04:08:54 2010 +0700 Remove more superfluous if(p) checks around free(p) Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 89bd05106e5823fc5cfca9abf082729f2444363b Author: Matt Turner <mattst88@gmail.com> Date: Fri Jun 4 21:09:35 2010 -0400 record: move free() to after last use of pContext No functional change, since free doesn't change the value of the pointer passed to it, but it makes this code less confusing. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Matt Turner <mattst88@gmail.com> commit a54a766dfb39fb3df671045878ac706215d83cef Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jun 7 03:19:03 2010 +0700 xkb: replace xstrdup with strdup in Win32System The only caller of Win32System is XkbDDXCompileKeymapByNames. Add allocation check there to avoid passing NULL pointers to various functions down the code. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6e7417c342b0624e3f3c5686bb43026786423692 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:05:35 2010 +0700 config: Replace xstrdup with strdup in add_option() All callers of add_option pass string literal as "key" argument except one, where non-NULL condition is guarded by if(). Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit e4570f5db5157f4233454c938733a2a0d6a1cb8f Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:01:42 2010 +0700 xfree86: Get rid of xstrdup when argument is definitely non-NULL ditto for XFree86 Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 416d228481d71204cf9bfad3ab4773abc4757f79 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:01:25 2010 +0700 xquartz: Get rid of xstrdup when argument is definitely non-NULL ditto for XQuartz Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit eea286f2b9e4b1acf2b1c9800f5a4bc7c3fa968d Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:01:05 2010 +0700 xwin: Get rid of xstrdup when argument is definitely non-NULL ditto for XWin Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit dd45b7d74696cd4fe9545852640a3c2e66a808fd Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:00:46 2010 +0700 kdrive: Get rid of xstrdup when argument is definitely non-NULL ditto for Kdrive Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 16158366954d945db6263f6de505fc02ee03c6cd Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 17:00:15 2010 +0700 dmx: Get rid of xstrdup when argument is definitely non-NULL ditto for DMX Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 6592db6bb526f0c43b4c7b55859c629709e039b4 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 16:58:58 2010 +0700 Get rid of xstrdup when argument is definitely non-NULL Replace xstrdup with strdup when either constant string is being duplicated or argument is guarded by conditionals and obviously can't be NULL Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 620ca54aaa0b363fcf68cec1bd6c37e68c988352 Merge: fd69234db 8ff9b502c Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 10 19:18:53 2010 -0700 Merge remote branch 'alanc/master' commit fd69234db004e98c663f5c6c4360d2cecaa8a4df Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 6 15:21:28 2010 -0700 Ignore RandR timestamps harder Checking timestamps in post 1.1 randr requests was never a good idea, let's ignore them and just make the configuration changes. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Chase Douglas <chase.douglas@canonical.com> commit a8ec9eca850f2a7ad4c5cf31c1c011c120688496 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 7 13:39:11 2010 -0700 Fix a couple more possible errors with input-only windows Using type == DRAWABLE_WINDOW to differentiate between pixmaps and windows isn't sufficient as input-only windows will end up in the pixmap case. This patch changes a few more code paths to use WindowDrawable instead. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 8ff9b502cfce3828f7855ffba7949d6ebee34031 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri Jun 4 08:44:02 2010 -0700 Solaris: avoid memory leak if AGPIOC_INFO ioctl fails Move malloc after ioctl, so we don't have to worry about free'ing the memory if the ioctl fails. [ This bug was found by the Parfait bug checking tool. For more information see http://research.sun.com/projects/parfait ] Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit c5eb5d69e5183860185a05cfcce16af635cab9aa Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jun 3 19:28:43 2010 -0700 Record some additional library dependencies in xf86 modules Helps with symbol resolution when building with -z defs Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 1c08a37e0eb4746e8974eb7a70ca4b7b84712963 Author: Sam Lau <sam.lau@oracle.com> Date: Thu Jun 3 19:17:14 2010 -0700 SecurityResource should not segfault when client owning resource has exited Fixes OpenSolaris bug 6949754: Xorg crashes when the magnifier is enabled at gdm login greeter window. http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 07a093add0b7e40c4d9b9b59273e3ff9e14a88a7 Merge: 84190d209 dc614484f Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 10 18:39:10 2010 -0700 Merge remote branch 'whot/for-keith' commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 10 12:21:36 2010 +1000 Xi: don't copy the modifier key count when copying device classes (#25480) The modifier key count is maintained by the XKB layer and increased/decreased for all modifiers that set state. Test case, MD/SD modifier key count in comment: 1. keyboard 1: press and hold Shift_L # SD:1 MD:1 2. keyboard 2: press and release Shift_L # SD:1,0 MD:1,0 <class copy happens> # SD:1 MD:1 3. keyboard 1: release Shift_L # SD:0 MD:1 4. keyboard 1: press and release Shift_L # SD:1,0 MD:2,1 The modifier is now logically down on the MD but not on keyboard 1 or keyboard 2. XKB is layered in before the DIX, it increases/decreases the modifier key count accordingly. In the above example, during (2), the MD gets the key release and thus clears the modifier bit. (3) doesn't forward the release to the MD because it is already cleared. The copy of modifierKeysDown when the lastSlave changes however increases the counter for the held key. On (4), the press and release are both forwarded to the MD, causing a offset by 1 and thus do not clear the logical modifier state. X.Org Bug 25480 <http://bugs.freedesktop.org/show_bug.cgi?id=25480> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 7805e45284264b4cd286eece02e85426896e9f7b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 10 14:31:48 2010 +1000 config: remove redundant DBUS API define, require dbus-1 >= 1.0 It's still being pulled in by the HAL CFLAGS but the requirement to define this was dropped from DBus pre 1.0 (November 2006). This means we require dbus 1.0 now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 66b21b2f455a1dfbc92f7caa571dcff3f3765808 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:58 2010 -0700 xfree86: Match devices based on current driver setting Often we want to apply a driver specific option to a set of devices and don't care how the driver was selected for that device. The MatchDriver entry can be used to match the current driver string: MatchDriver "evdev|mouse" Option "Emulate3Buttons" "yes" The driver string is a case sensitive match. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a71bdff47d4cc80da6ceeb548db1dcc8e8b59702 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:57 2010 -0700 xfree86: Allow multiple InputClass Match* entries for && matching Currently when there multiple InputClass entries of the same type, only the last entry is used and the previous ones are ignored. Instead, multiple entries are used to create multiple matching conditions. For instance, an InputClass with MatchProduct "foo" MatchProduct "bar" will require that the device's product name contain both foo and bar. This provides a complement to the || style matching when an entry is split using the "|" token. The xorg.conf man page has added an example to hopefully clarify the two types of compound matches. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 842625928632ae767b0689fcdb5103c1779a4c91 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:56 2010 -0700 config: Script to convert HAL fdi settings to InputClass sections In the new world of udev and InputClass, x11_* settings from HAL fdi files will not be honored. This script converts those settings into valid InputClass sections that can be dropped into xorg.conf.d. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 87a1507da7e7788232d74285ef377b67b70e0fa4 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Thu Jun 10 06:15:41 2010 -0700 xfree86: Match devices based on USB ID Sometimes the vendor and product names aren't specific enough to target a USB device, so expose the numeric codes in the ID. A MatchUSBID entry has been added that supports shell pattern matching when fnmatch(3) is available. For example: MatchUSBID "046d:*" The IDs are stored in lowercase hex separated by a ':' like "lsusb" or "lspci -n". Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 645679c1523eee7028f3244cee57936b93326a2a Author: Dan Nicholson <dbn.lists@gmail.com> Date: Thu Jun 10 06:11:10 2010 -0700 xfree86: Match devices based on PnP ID Serial input devices lack properties such as product or vendor name. This makes matching InputClass sections difficult. Add a MatchPnPID entry to test against the PnP ID of the device. The entry supports a shell pattern match on platforms that support fnmatch(3). For example: MatchPnPID "WACf*" A match type for non-path pattern matching, match_pattern, has been added. The difference between this and match_path_pattern is the FNM_PATHNAME flag in fnmatch(3). Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 84190d20954ef7888e4d96832c2a4b3225b4dfa2 Merge: 4172aa137 5e1ef1f4d Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 10 13:36:35 2010 -0700 Merge remote branch 'jeremyhu/master' commit 4172aa137c1b9b6f2a25c320d847af1f5ac56fba Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 10 07:15:49 2010 -0700 dri2: Only deal with output windows and pixmaps. This reverts commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 "dri2: Deal with input-only windows by using WindowDrawable()" and replaces it as follows: Reject the creation of a DRI2 drawable for UNDRAWABLE_WINDOW (input-only windows) and DRAWABLE_BUFFER (whatever those are) drawables and only look up privates for the supported drawable types. The rest of the the code can continue pretending there's only output windows and pixmaps, which are the only kinds of drawables relevant for DRI2. Fixes server crash with GLX compositing managers such as compiz or kwin, due to looking up a window private for a pixmap and getting a bogus pointer. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 353e32d3712f3a883a796ba562ec9fb5a8354837 Author: Jamey Sharp <jamey@minilop.net> Date: Sun Jun 6 06:42:11 2010 -0700 glxdriswrast bugfix: configure swapgc, not gc. I got this wrong in e2929db7b737413cf93fbebdf4d15abdfebff05c. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b3548612c7943011f79a910f9a59bb975984d8a6 Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Date: Sat Jun 5 13:09:28 2010 +0200 DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML() DRI2WaitSBC() didn't block if requested targetSBC wasn't yet reached. Instead it returned a xreply with uninitialized junk return values, then blocked the connection until targetSBC was reached. Therefore the client didn't block, but continued with bogus return values from glXWaitForSbcOML. This patch fixes the problem by implementing DRI2WaitSBC similar to the clean and proven DRI2WaitMSC implementation. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7287ef9e6cf953066e4a092cca9d0e4a279172bf Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sun Jun 6 21:18:40 2010 +0700 Remove unnecessary parentheses around return values in functions This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit d1b4beecbc16448282dcc825dd5c354e96e48eca Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:53 2010 -0700 xfree86: Add MatchOS InputClass entry for operating system matching Allow InputClass sections to match against the running operating system to narrow the application of rules. An example where this could be used is to specify that the default input driver on Linux is evdev while it's mouse/kbd everywhere else. The operating system name is the same as `uname -s`, and matching is case-insensitive. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9b30fa9f8fedb7ddb5672f93ed1a154d13578c47 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:52 2010 -0700 xfree86: Refactor InputClass matching code InputClassMatches was starting to get a little hairy with all the loops over the tokenized match strings. This adds code, but makes it easier to read and add new matches. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Jamey Sharp <jamey at minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d09bc8f8e5bb92899f7c90eab6b0907920c7d643 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:51 2010 -0700 xfree86: Constify InputClass functions Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 61c35d8ac4b6423caf2dcecb4ff25baaaaa14b1c Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:50 2010 -0700 config/hal: Missing newline in log message Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 697c5b010d7f6df0ec9cae6352b125c4cbdbaad3 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:49 2010 -0700 config/udev: Add verbose info when fetching udev properties Give the user a chance to see why their input devices are being ignored, even if they have to start the server with -logverbose. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 94547b2d1448232ae316c228d65482cc0b646ac2 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Jun 7 20:39:48 2010 -0700 config/hal: don't leak the input.tags property Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5e1ef1f4dde4615498c1c5e7a4e422c3b3432fe8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Jun 8 13:01:10 2010 -0700 XQuartz: Add more sanity checking around string manipulation for xmodmap Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 0be81f9a163f2838448caee41b2dda274d73391a Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Jun 6 16:31:19 2010 -0700 XQuartz: Fix build regression from faeebead7bfcc78535757ca7acc1faf7554c03b7 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit b3a7b229e1e1f212bdd185af5443311091824005 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 7 21:49:43 2010 -0700 Make DRI_SCREEN_PRIV just return NULL when DRI isn't initialized The code relied upon the previous devPrivate implementation which offered this convenience. Signed-off-by: Keith Packard <keithp@keithp.com> commit f7af00e9f0e0e1d854b0e882378c032518ab71ca Author: Ben Skeggs <bskeggs@redhat.com> Date: Mon Jun 7 10:21:18 2010 +1000 randr: prevent an unnecessary screen resize with multiple displays crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we calculate too small an area for the initial framebuffer and force a resize to happen. This commit fixes the code to use desired{X,Y} instead, which contains the initial output positions. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8e97e5f9425639ad0a084150d0b232cad417595d Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 7 14:23:47 2010 -0700 If XTest is always required, then eliminate the XTest devPrivate The internals of XTest are used by Xi and Xkb, and both Xi and Xkb are always required, so it makes little sense to have XTest place data in a devPrivate, especially a devPrivate which is only available when the XTest extension is enabled. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 7 00:54:18 2010 -0700 dri2: Deal with input-only windows by using WindowDrawable() Input only windows aren't DRAWABLE_WINDOW, but casting them to a PixmapPtr is a bit harsh, and unlikely to get the appropriate privates structure. use WindowDrawable instead which checks for both input-output and input-only windows. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Eric Anholt <eric@anholt.net> commit bc26665661565918af484ccd17caad951010df60 Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 6 20:45:53 2010 -0700 Initialize private keys in test suite Make sure all of the private keys used by the test code are initialized before being used. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Robert Hooker <sarvatt@ubuntu.com> commit f03be727d647183a2176355ad0ac9a6735067be9 Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 6 16:04:42 2010 -0700 Place glyph privates at correct location within the allocate storage A glyph allocation consists of : GlyphRec numScreens * PicturePtr glyph privates Tell the dix private bits to start past the picture pointers. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> commit 67b824a81bb8254827023de351a4a094031f0e94 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sun Jun 6 20:37:07 2010 +0700 randr: Make deletion of output properties more robust Previously there was two branches of code with small discrepancies between them (especially prop->valid_values field was not free(3)ed). Extract the common routine and fix double-free prop->valid_values in RRDestroyOutputProperty by the way. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 0a4d8cbdcd7b25313fb29ccdb498044af95f7de6 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sun Jun 6 15:28:30 2010 +0700 Remove more superfluous if(p) checks around free(p) This patch has been generated by the following Coccinelle semantic patch: @@ expression E; @@ -if(E) { free(E); } +free(E); Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 5a0fc0ad21d562612676ef88ef2d533b2391810a Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 15:35:31 2010 +0700 Replace deprecated bzero with memset Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin Baczyński <marbacz@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> commit f9810ba914877b379cb36f1b9755f7923ceca14c Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 14:26:31 2010 +0700 xkb: Remove superfluous if(x) x = realloc(x, sz); else x = malloc(sz); logic Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Marcin Baczyński <marbacz@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 77ea20895ca1d163e14c6b767d8c287c94ba3114 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Fri Jun 4 14:22:06 2010 +0700 xkb: Remove superfluous if(p) checks around free(p) Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 5d4e2c594059ffb536c8e506c2623320d3c6a787 Merge: eacc42132 793dd3994 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 22:20:28 2010 -0700 Merge remote branch 'jamey/for-keith' commit 793dd399468ff3ba22ffa9c62fa54fc87261fbe7 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 15:08:38 2010 -0700 dmx: Split glx scalar swap variables from array swap variables. This makes hw/dmx/glxProxy/unpack.h more closely resemble glx/unpack.h, and fixes the "unused variable 'swapEnd'" and "unused variable 'swapPC'" warnings. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit eacc42132ed0f1e8f4a4d65a4b6637ab06f7e2aa Author: Kim Woelders <kim@woelders.dk> Date: Fri Jun 4 20:20:47 2010 +0200 dix: Remove test for obsolete NO_XINERAMA_PORT macro. Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit a0fe6987b55b5326157b50e169b8d6b9ae26a1ae Author: Jamey Sharp <jamey@minilop.net> Date: Sat Jun 5 20:55:29 2010 -0700 Clean up after removal of screen parameters from region macros. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 424b593c7872a703d3d0c942b7e8acc0770eb023 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 21:34:51 2010 -0700 Damage pixmap private key was being mis-registered as a picture key This would cause all kinds of fun, in particular Xnest would crash at startup. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9c121ae45ae1d2ebd892c45e1631716ef5e7d649 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 21:34:27 2010 -0700 Register Xnest colormap screen private key This key is used to store the currently installed colormap and must be registered before we can use it. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit df534d05208436e9ca8c9b42acff3fbe240e3ec4 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 21:24:54 2010 -0700 Make GetPictureScreenIfSet check if Render is running This macro originally checked to see if the Render screen private index had been allocated. When the privates were changed the first time, there wasn't any need to check as dixLookupPrivate would simply return NULL in that case. Now that we care, check to see if the key has been initialized before asking for the value. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit e7fc8b32e41e10c057d2787fcc377296be67f2e9 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 21:08:01 2010 -0700 Move the shadow screen private key initialization to shadowSetup Some users of the shadow code don't call shadowInit, just shadowSetup and so make sure the key is initialized there. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6bd5f0d75bca727c4686b20eee166c8cae472ba2 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 21:07:15 2010 -0700 Fix exa_priv.h declarations of privates exa_priv.h exposes the privates to the rest of the exa code, and yet the declarations of the privates wasn't fixed when the exa.c versions were. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6b306f43384e5c2143197e746a5a39c4ebb2583c Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 5 20:58:04 2010 -0700 kdrive: Xv code uses shared screen private instead of kdrive-specific private When doing the devPrivate API conversion, I missed this as there was also a local private key which wasn't ever used. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ab07e2b8ededaa2193fc199a8c09623d84032280 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 19:38:48 2010 -0700 Allocate per-screen device/cursor-bits private keys in midispcur midispcur was abusing the CursorScreenKey to index the cursor_bits privates, it also had a MAXSCREENS array of keys to index device privates. Switch both of these to the new dixCreatePrivateKey API and store a pointer to that in the screen private. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 34db537907c6cb2635dbefdce7dcfcae90f7c902 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 19:36:33 2010 -0700 Add dixCreatePrivateKey API Keys need to persist through server reset so that the private system can be cleaned up in dixResetPrivates. In particular, this means that keys cannot live in objects freed at reset time. This API provides suitable object lifetime by having the privates code free the key in the reset path. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 495fc3eb2d6c98bde82ae1278f89fcf131fd9bf8 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 19:38:38 2010 -0700 Change devPrivates implementation. Each key now declares which object type it belongs to, this permits keys for different types to share the same offset within the allocated privates. As a special case for XSELinux, a key may be allocated as PRIVATE_XSELINUX which will allow it to continue to be used across the relevant object types. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit faeebead7bfcc78535757ca7acc1faf7554c03b7 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 26 17:22:21 2010 -0700 Change the devPrivates API to require dixRegisterPrivateKey This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit c865a24401f06bcf1347d8b41f736a066ab25693 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 22:05:27 2010 -0700 Create separate private key for midispcur cursor bits The CursorScreenKey array is supposed to be used by the DDX for cursor private data, but midispcur was abusing it to hold cursor bits private information. Create a separate set of privates for the dispcur cursor bits information. This also renames the device private index and macros to better reflect their usage: miDCSpriteKey -> miDCDeviceKey MIDCBUFFER -> miGetDCDevice Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 431781a921251d54782f0a4f194bbef1fabd1380 Author: Keith Packard <keithp@keithp.com> Date: Sat May 15 14:52:39 2010 -0700 Remove dixRegisterPrivateOffset; hard-code devPrivates offsets instead For predefined resource types, the offset of the devPrivates field was already kept in a constant table. The only non-predefined type needing this treatment was dbeDrawableResType, which is just a magic alias for RT_PIXMAP. This patch special-cases looking up RC_DRAWABLE offsets and uses the table directly for everything else. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 7ef612de784daaed09ba13f4615c10714614033f Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 12:35:29 2010 -0700 Add REGION_ macros for source compatibility with existing drivers. This makes the region code changes source compatible with existing code, although none of them are used within the server source itself. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 965cade6ee7c226f850e806cb2e910793d1536f9 Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 12:18:22 2010 -0700 Change region implementation from macros to inline functions. This makes all of the previous macros into inline functions and also turns all of the direct calls to pixman region code into inline functions as well. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2dc138922b7588515d5f2447e4b9dcdc0bef15e0 Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 15:05:48 2010 -0700 Rename region macros to eliminate screen argument This is a combination of a huge mechanical patch and a few small fixups required to finish the job. They were reviewed separately, but because the server does not build without both pieces, I've merged them together at this time. The mechanical changes were performed by running the included 'fix-region' script over the whole tree: $ git ls-files | grep -v '^fix-' | xargs ./fix-region And then, the white space errors in the resulting patch were fixed using the provided fix-patch-whitespace script. $ sh ./fix-patch-whitespace Thanks to Jamey Sharp for the mighty fine sed-generating sed script. The hand-done changes involve removing functions from dix/region.c that duplicate inline functions in include/regionstr.h, along with their declarations in regionstr.h, mi.h and mispans.h. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit d17e726e89ef644310de77b960b715c2d11088da Author: Keith Packard <keithp@keithp.com> Date: Sat May 22 00:09:47 2010 -0700 Move mi/miregion.c to dix/region.c Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9b6f5f549dfe4c20e3cb3c2ef7095ab47abaca3b Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 11:14:59 2010 -0700 Change region implementation names to eliminate the 'mi' prefix This prepares the file to be moved from mi to dix. This patch was done mechanically with the included scripts 'fix-miregion' run over the entire X server and 'fix-miregion-private' run over include/regionstr.h and mi/miregion.c. Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1768e51976ae8949d999309bd2384ccad72deecd Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Jun 5 15:58:21 2010 -0700 rootless: Fix SetShape regression This fixes a regression in miext/rootless from 643cb6e87c10ab554c03ada81930001a8ebcc909 Found-by: tinderbox Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6b4af3b7925978cd79f717761f1b6f33bd8dfbaf Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Fri Jun 4 16:27:28 2010 +0300 configure: Check for libsha1.pc xserver fails to detect libsha1. Problem is that configure checks for sha1.pc when libsha1 provides libsha1.pc. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit d163266692235261e1e0cfa6b900f54e6ec63de5 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jun 3 18:59:04 2010 -0700 Stop searching for XF86Config files xorg.conf has been used since the X11R6.7 release in April 2004. 6 years has been a generous transition period for users to "mv XF86Config xorg.conf" and for distros to update their configuration tools and packages. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 01c75522b6ed15e979347acd38e234e2cb9006c3 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Jun 3 18:59:03 2010 -0700 Stop searching for XF86Config files xorg.conf has been used since the X11R6.7 release in April 2004. 6 years has been a generous transition period for users to "mv XF86Config xorg.conf" and for distros to update their configuration tools and packages. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: James Cloos <cloos@jhcloos.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7f19a7a6e90a4fd7b7ec0256974f62e575218541 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 4 14:15:04 2010 +1000 xkb: fix invalid memory writes in _XkbCopyGeom. Classic strlen/strcpy mistake of foo = malloc(strlen(bar)); strcpy(foo, bar); Testcase: valgrind Xephyr :1 ==8591== Invalid write of size 1 ==8591== at 0x4A0638F: strcpy (mc_replace_strmem.c:311) ==8591== by 0x605593: _XkbCopyGeom (xkbUtils.c:1994) ==8591== by 0x605973: XkbCopyKeymap (xkbUtils.c:2118) ==8591== by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560) ==8591== by 0x4472E2: CoreKeyboardProc (devices.c:577) ==8591== by 0x447162: ActivateDevice (devices.c:530) ==8591== by 0x4475D6: InitCoreDevices (devices.c:672) ==8591== by 0x4449EE: main (main.c:254) ==8591== Address 0x6f96505 is 0 bytes after a block of size 53 alloc'd ==8591== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==8591== by 0x6054B7: _XkbCopyGeom (xkbUtils.c:1980) ==8591== by 0x605973: XkbCopyKeymap (xkbUtils.c:2118) ==8591== by 0x6122B3: InitKeyboardDeviceStruct (xkbInit.c:560) ==8591== by 0x4472E2: CoreKeyboardProc (devices.c:577) ==8591== by 0x447162: ActivateDevice (devices.c:530) ==8591== by 0x4475D6: InitCoreDevices (devices.c:672) ==8591== by 0x4449EE: main (main.c:254) Reported-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by-and-apologised-for: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 959a1eaf1c15a691141f1b0dc53757fe9b6e9b13 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 4 11:09:46 2010 +1000 composite: use config notify hook to do pixmap resize. Since reallocating the backing pixmap can fail, we need to try and do it before any other side effects of reconfiguring the window happen. This changes the ConfigNotify hook to return status, and moves the composite window reconfiguration wrappers to ConfigNotify. They all basically did the same thing, so we can drop the MoveWindow, ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do all the work. If reallocation fails we fail before we send any confiureNotify events, or enter the area we can't recover from. The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers that don't use this should probably deal with it in their pixmap allocate if they don't already. This also breaks ABI, so we need an alternate fix for older servers, working on the X server makes me realise why I'm a kernel hacker. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0f12e86e600522768f5f64eafc1230526e700ab7 Merge: aa7c09f7d f114f5498 Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 3 15:09:32 2010 -0700 Merge remote branch 'jamey/for-keith' commit f114f54986aca1add4c8808a05d9692e289547e7 Author: Jamey Sharp <jamey@minilop.net> Date: Fri Apr 23 19:33:49 2010 -0700 Accumulate graphics exposures incrementally in PanoramiXCopyArea/Plane. This fuses two loops in each function, eliminating an intermediate MAXSCREENS-sized array from each. Aside from being more efficient, I believe this is equivalent to the previous implementation, since - each per-screen GC has the graphicsExposures flag set the same way, and - the REGION_* macros ignore their screen argument. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit a7c7ebe4b3a0df1a4d1ffe3c690cfb21470f103d Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 22 21:13:48 2010 -0700 Delete XineramaScreenRegions cache. Every screen region consists of a single rectangle, so initializing a stack-allocated region for each screen on-demand does no heap allocation and is fast. This eliminates a MAXSCREENS-sized array. The REGION_UNINIT calls are no-ops since no boxes are actually allocated for a single-rectangle region, but it seemed wiser to include them. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit a0456da339fa9b3c3e6fead060338ee7348d6460 Author: Jamey Sharp <jamey@minilop.net> Date: Sun May 23 12:57:52 2010 -0700 XineramaSetCursorPosition: use screen bounds directly, not POINT_IN_REGION. This hides a MAXSCREENS-sized array as an implementation detail of panoramiX.c rather than an exported global. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 Author: Jamey Sharp <jamey@minilop.net> Date: Sun May 23 10:11:47 2010 -0700 Move each screen's x/y origin into ScreenRec. Many references to the dixScreenOrigins array already had the corresponding screen pointer handy, which meant they usually looked like "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix declared the dixScreenOrigins array, I figure allocating a screen private for these values is overkill. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit 217ccaa5a341018457f468a774c035c0df47d918 Author: Jamey Sharp <jamey@minilop.net> Date: Sun May 23 11:05:01 2010 -0700 Delete panoramiXdataPtr: it's redundant. This eliminates a dynamically-allocated MAXSCREENS-sized array. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 22 00:26:28 2010 -0700 Move each screen's root-window pointer into ScreenRec. Many references to the WindowTable array already had the corresponding screen pointer handy, which meant they usually looked like "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. xf86-video-dummy currently uses WindowTable, so it needs to be updated to reflect this change. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 21 23:13:51 2010 -0700 Move each screen's screensaver data into ScreenRec. Most references to the savedScreenInfo array already had the corresponding screen pointer handy, which meant they usually looked like "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix uses this data, a screen private entry isn't appropriate. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux) commit 5030540d6cd2aa9bbd4ecb7f4487616f9ef0140a Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 27 11:50:52 2010 -0700 midispcur: Add comment explaining why pRootPicture must not be freed. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit f308cbea8c9fa5c5c6705bc301178b167de450d5 Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 24 18:41:54 2010 -0700 mi: Delete unused flicker-free MoveCursor code. It's been commented-out for three and a half years and nobody seems to be missing it enough to resurrect it. Besides deleting code that is untested and therefore buggy, this saves a little memory for each pointer device on each screen. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit d1bad1b59f24ab4dcf2d1ce1c5d4f42b5fa40bc1 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 14:25:07 2010 -0700 dmx: Fix XSetExtensionErrorHandler calls to agree on constness. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit aa7c09f7d04d59852b850b2b6993f4cbdc7ec940 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Wed Jun 2 14:31:56 2010 -0700 Install fbdevhw module in normal module directory instead of linux/ Since we no longer support OS-independent custom elfloader modules, we don't need to put the OS-dependent modules into os-specific subdirs any more. We do however still need to install the stubs version of this module on non-Linux platforms, since a number of drivers link to functions in it, even when built on non-Linux platforms. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b13d7a8e09c8e3eb5003420c3c0484431e5a052b Merge: f0ab726d8 dcceb90b1 Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 3 07:01:26 2010 -0700 Merge remote branch 'vignatti/for-keith' commit dcceb90b1dccbbf5793f6ba1ed857013b71dafbc Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed May 19 11:45:46 2010 +0200 xext: delete wrong source reference from fontcache This should go away in 0b45ba48. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit c043de3261b6e14f2446b2cd9d62dde5860d4720 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon May 3 12:37:25 2010 +0200 configure: sha1: check libsha1 using pkg-config instead Previously the code was using AC_CHECK_LIB, guaranteeing whether the library is correct by tracking sha1_begin function. This paranoic checking is not necessary given there's only one libsha1 in the market, which surely contains such function. Moreover, this patch now improves a bit the sha1 implementation checking behavior using pkg-config to find the right flags that needs to link against. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit f0ab726d8966cab4e50154c216d577db79328d77 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Wed Apr 21 11:07:47 2010 +0300 DRI2: Use single error path in initialization Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit 6eef70dc56bcc1e3047e4e488bcd6ae62c8ffac6 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jan 22 18:34:36 2010 +0200 DRI2: Allow building without libdrm Some drivers use DRI protocol but implement their own kernel rendering manager. For these drivers, libdrm becomes useless. --disable-libdrm configure parameter can be used to disable libdrm support in dri2. To provide ABI/API compatibility for libdrm based drivers, libdrm call is wrapped in ifdef. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit cdcb575664d3d60b662c542e782de83a047165c9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jan 22 17:58:17 2010 +0200 DRI2: add AuthMagic hook for driver side support With this new hook, drmAuthMagic becomes useless and should be deprecated. You might want to implement AuthMagic on driver side instead. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit 643cb6e87c10ab554c03ada81930001a8ebcc909 Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Thu May 27 09:11:50 2010 -0700 Only deal with input code when changing the input shape. Propagate the shape kind all the way to SetShape to avoid performing non-input operations such as revalidating the tree and generating exposures when only changing a window's input shape. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Acked-by: Aaron Plattner<aplattner@nvidia.com> Reviewed-by: Daniel Stone<daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit d90f2cd98a97e6534792d3867b3fba70d850b706 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu May 27 13:26:23 2010 +0100 xfree86: Unbreak autoconfig following 0abf065e38c4 The move of the PCI device id probing into a separate file neglected to return the number of found devices, and so the PCI devices were being overwritten by the default entries for vesa and fbdev. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tiago Vignatti <tiago.vignatti@nokia.com> Cc: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1304b8b27cb12c803c4f51f04cb6f9d508b82c69 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri May 28 09:35:54 2010 -0700 Fix pixmap validation in miDbePositionWindow. miDbePositionWindow allocates two pixmaps: a front buffer, and a back buffer. If the buffers are supposed to be initialized, it validates a GC against the front buffer, then uses it to fill and/or copy both the front buffer *and* the back buffer, without revalidating. If the acceleration architecture needs different GC funcs for the two pixmaps -- for example if allocation of the front buffer exhausted video memory -- then this can cause crashes because the GC is not validated for the back buffer pixmap. Fix this by performing the rendering for the front buffer first, then revalidating against the back buffer before performing the back buffer rendering. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 91a6359caf24d94343ff76f43ea7b7fc3223203d Author: Dave Airlie <airlied@redhat.com> Date: Thu Jun 3 12:16:40 2010 +1000 composite: initialise pOldPixmap to NullPixmap at alloc time. We just never initialised the malloced value. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b Author: Nicolas George <nicolas.george@normalesup.org> Date: Wed Jun 2 13:40:51 2010 +0200 Change keyboard controls on slave keyboards (#27926) Makes the use of IsMaster in ProcChangeKeyboardControl consistent with other similar loops. Signed-off-by: Nicolas George <nicolas.george@normalesup.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 108b766c31b57fb1955d34d85673a235c7f743aa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 20 11:04:53 2010 +1000 xfree86: initialize InputAttributes to NULL in the autoconfig code. Reported-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 151659f9636088fd70bc5586de97bf43ee706180 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 24 16:24:03 2010 +1000 test: fix up InputAttributes helper function test. Just some extra clarification as pointed out by Dan Nicholson, and that memcpy should have been a memcmp. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> commit 6cccf0131c8464d8838cae2200730873d7dd9e45 Author: Peter Korsgaard <peter.korsgaard@barco.com> Date: Tue May 25 11:03:28 2010 +0200 dix: add 3x3 transformation matrix xinput property for multi-head handling For absolute input devices (E.G. touchscreens) in multi-head setups, we need a way to bind the device to an randr output. This adds the infrastructure to the server to allow us to do so. positionSprite() scales input coordinates to the dimensions of the shared (total) screen frame buffer, so to restrict motion to an output we need to scale/rotate/translate device coordinates to a subset of the frame buffer before passing them on to positionSprite. This is done here using a 3x3 transformation matrix, which is applied to the device coordinates using homogeneous coordinates, E.G.: [ c0 c1 c2 ] [ x ] [ c3 c4 c5 ] * [ y ] [ c6 c7 c8 ] [ 1 ] Notice: As input devices have varying input ranges, the coordinates are first scaled to the [0..1] range for generality, and afterwards scaled back up. E.G. for a dual head setup (using same resolution) next to each other, you would want to scale the X coordinates of the touchscreen connected to the both heads by 50%, and translate (offset) the coordinates of the rightmost head by 50%, or in matrix form: left: right: [ 0.5 0 0 ] [ 0.5 0 0.5 ] [ 0 1 0 ] [ 0 1 0 ] [ 0 0 1 ] [ 0 0 0 ] Which can be done using xinput: xinput set-prop <left> --type=float "Coordinate Transformation Matrix" \ 0.5 0 0 0 1 0 0 0 1 xinput set-prop <right> --type=float "Coordinate Transformation Matrix" \ 0.5 0 0.5 0 1 0 0 0 1 Likewise more complication setups involving more heads, rotation or different resolution can be handled. Signed-off-by: Peter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e4582d9e5c8649347742a13eae68cf27005296fc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 27 10:42:54 2010 -0400 xfree86: bump ABI_XINPUT_VERSION to 11. commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc "xfree86: store the InputAttributes in the input device." introduced the new API. Bump the input version so drivers can handle this appropriately. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit cd0ef0b6a2f9c6bfeda98684569da922792d3feb Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 14:30:22 2010 -0700 dmx: Delete unused ChangeKeyboardDevice/ChangePointerDevice. Daniel Stone deleted the API for these in 2006, in commit 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 70454864917f534483fa049e067b5646df61c88a Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 14 12:31:44 2010 -0700 Ignore build products in the server's test suite. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8bb88379d95356384e233225bfda6abfd71389b4 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 15:52:18 2010 -0700 dmx: Remove dead __glXDispSwap_DrawArraysEXT definition. Eric Anholt made the corresponding fix in glx/render2swap.c in commit 49d38ab2328c409b2a98465b52677af057121513. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit c97a3ade5a8718b063292c73a31aac2196fe2452 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 15:17:30 2010 -0700 dmx: Delete unused local variables. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3c3d099fc10c63d746f90c08043d45180d6a7226 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 13:44:32 2010 -0700 dmx: Xfree -> free Mikhail fixed the corresponding Xallocs, but missed these uses of Xfree in commit 3f3ff971ecff9936cebafc813af9193b97bba89c. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 01ca6400d949a873c0bb5de7e0dbf138e8a7949b Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 14:02:34 2010 -0700 Xephyr: Fix Xcalloc deprecation warnings. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 34df659687ad3936ab03d19ce8fdb21f385c2e8a Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 11:51:32 2010 -0700 xfree86/int10/helper_mem: Fix log message. Three years ago in commit f62beb6f3609e8b6e61325ac89017590811bbd07 ajax deleted the code that could have set this format string to anything else, so just use the format string literal. This makes GCC happy since it can check the argument types, which, by the way, weren't correct since this format string doesn't need any arguments. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 0a98d9e6cec7c611a3c56f97d4ddc0c546975c55 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 25 10:30:58 2010 -0700 xf86bigfont: Silence compiler warning by initializing pDesc. Access to pDesc was always guarded by (nCharInfos > 0), so the code wasn't actually buggy, but this makes it clear that it's correct. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 4e9d3e413245e7c01c2ff3c0f130b8967754131b Author: Keith Packard <keithp@keithp.com> Date: Wed May 26 07:54:35 2010 -0700 Revert "Add a "flags" field to DeleteInputDeviceRequest." Peter wants to get a larger patch sequence put together and I didn't read past the commit message to see the 'don't take this patch please'. This reverts commit 531ff40301975519af7b20109c17d296312d3f2b. commit 531ff40301975519af7b20109c17d296312d3f2b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 20 18:07:12 2010 +1000 Add a "flags" field to DeleteInputDeviceRequest. Some input drivers need to implement an internal hotplugging scheme for dependent devices to provide multiple X devices off one kernel device file. Such dependent devices can be added with NewInputDeviceRequest() but they are not removed when the config backend calls DeleteInputDeviceRequest(), leaving the original device to clean up. Example of the wacom driver: config/udev calls NewInputDeviceRequest("stylus") wacom PreInit calls NewInputDeviceRequest("eraser") NewInputDeviceRequest("pad") NewInputDeviceRequest("cursor") PreInit finishes. When the device is removed, the config backend only calls DeleteInputDeviceRequest for "stylus". The driver needs to call DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to clean up properly. However, when the server terminates, DeleteInputDeviceRequest is called for all devices - the driver must not remove the dependent devices to avoid double-frees. There is no method for the driver to detect why a device is being removed, leading to elaborate guesswork and some amount of wishful thinking. Though the input driver's UnInit already supports flags, they are unused. This patch uses the flags to supply information where the DeleteInputDeviceRequest request originates from, allowing a driver to selectively call DeleteInputDeviceRequest when necessary. Also bumps XINPUT ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 25 17:15:32 2010 +1000 xfree86: store the InputAttributes in the input device. InputAttributes largely decide which configuration values get merged from the xorg.conf.d snippets. While they are available in the config backend, they are not available for any other callers of NewInputDeviceRequest(). Drivers implementing driver-side hotplugging do not have access to these attributes and cannot have xorg.conf.d snippets specific to dependent devices. For example, the following case cannot work right now: Section "InputClass" MatchProduct "Wacom" Option "PressCurve" "0 0 100 100" ... EndSection Section "InputClass" MatchProduct "Wacom" MatchProduct "eraser" Option "PressCurve" "10 10 50 50" ... EndSection The second section is not triggered, as the wacom driver cannot supply the InputAttributes to NewInputDeviceRequest(). Add the attributes to the IDevRec and merge them into the InputInfoRec to make them accessible in the driver. This changes the ABI for input drivers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 86303a338ad563d0b986a3c052104301c310c4ac Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 25 17:12:34 2010 +1000 dix: add helper functions to duplicate and free InputAttributes. No special memory handling is used to give drivers the maximum flexibility with the data. Drivers should be able to call realloc on the product string if needed and perform similar operations. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit bf78e11839f8278020b604672ff7c3d194232be9 Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 24 09:15:32 2010 -0700 midispcur: Construct Picture objects lazily in case Render is disabled. Reverts part of the effects of 518f3b189b6c8aa28b62837d14309fd06163ccbb, "mi: don't thrash resources when displaying the software cursor across screens". The per-screen cache is preserved, and the GCs are still allocated eagerly, but now it doesn't construct pRootPicture until somebody attempts to draw an ARGB cursor. I noticed crashes in Xnest, which doesn't support the RENDER extension, but I suspect other DDXes that support disabling that extension would have had issues as well. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> commit bf9b64eefbadbf299d3b841c1890bfcaef5aab1b Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 24 09:14:27 2010 -0700 xnest: Don't ignore errors from DeviceCursorInitialize. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit b11465a6ecdc2b8373e6fc8af427edc4602bcaa1 Merge: 7c085aebf 0abf065e3 Author: Keith Packard <keithp@keithp.com> Date: Mon May 24 22:18:31 2010 -0700 Merge remote branch 'vignatti/bus-cleanup-take2' commit 7c085aebfedeb621a6fbeb3f09f4fcc640452044 Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 24 11:45:42 2010 -0700 xfixes: Remove the invisible cursor sprite, using NullCursor instead. Oliver McFadden reports that the invisible cursor sprite caused damage events and thus unnecessary redrawing, so removing it improves performance when using software cursor sprites, especially on those devices where you do not want a visible cursor: touchscreen tablets, embedded devices, etc. For the xfree86 DDX, if hardware cursors are used, the driver is required to provide a HideCursor function, which will be called instead of trying to set a null cursor. I think software cursors are already safe. The other DDXes also look safe. As far as I can tell, there's no reason to realize a null cursor. I think everything that handles null cursors doesn't rely on any setup in RealizeCursor, and treats them as empty cursors. Xnest assumes that if a cursor is created, it will be realized before it is freed, which didn't happen if the invisible cursor was never used in a server generation. So this fixes a segfault in Xnest as well. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Tested-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0abf065e38c4c48917054eb3e39e12bd20e6e8ec Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu May 20 19:24:47 2010 +0300 xfree86: move all pci code from auto configurator into a meaningful location This patch creates the private xf86PciMatchDriver hook, which goes inside pci code to match the drivers found in the system. Now there's no direct references to PCI inside xf86AutoConfig.c anymore. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 0ceac6f64f5ad9bc2ac4b19be2dd245ffba78b05 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu May 20 18:23:24 2010 +0300 xfree86: no need to check for the configuration case when matching devices xf86MatchDevice will never be called in configuration time. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit b0eef1101815b08da2d375af7bec2be3136cf713 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu May 20 18:19:14 2010 +0300 xfree86: organize and group all pci related stuff inside xf86.h Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 47df5a489ea69a68e753367423bfbe8830521f4e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu May 20 17:39:59 2010 +0300 xfree86: remove BUS_ISA type given we don't support anymore Should go together within commit df14682a. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 9d000a5509e0a356ee33ad08e4dc967a2ef8cbe0 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu May 20 16:52:37 2010 +0300 xfree86: remove all kind of bus and PCI dependency from the common helper file Move all PCI procedures from xf86Helper.c to a more meaningful place (namely xf86pciBus.c). xf86Helper.c is free of PCI code now. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 610009cf39984f2f5e818a221b626f7af10bd90e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue May 18 20:54:28 2010 +0300 xfree86: bus: remove useless field from EntityRec RAC is the champion of remaining trash for sure! Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 95889a569feabd3f803afb92950d067bd76e7397 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue May 18 20:48:35 2010 +0300 xfree86: bus: delete useless xf86FindPrimaryDevice This function had a wrong name and was just logging the primary device. No one cares about it honestly. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit f6865909485d7d282c8131a2ae306143ad51ba2b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue May 18 19:39:31 2010 +0300 xfree86: bus: remove unused headers Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 111b1fff1ca69724a8350c4375089c312329c378 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue May 18 19:35:10 2010 +0300 xfree86: bus: remove unused pci macros Should be gone in commits 3c03d9f1 and a9d7d659a respectively. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 2ffffb4daf6161e6a22d81442ecf6209acc9e975 Merge: b5e0f6d8f d5306084b Author: Keith Packard <keithp@keithp.com> Date: Sun May 23 23:22:08 2010 -0700 Merge remote branch 'alanc/docs' commit b5e0f6d8f45c5b24eb50b305c66fa80c783ef488 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 24 12:25:15 2010 +1000 xfree86: fix multiple InputAttributes tag matching. attr->tags is an array of strings (null-terminated). When matching, match against each string instead of each [i,end] substring in the first tag. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit d5306084b57583c670c56ce9e7d3c78cca7aa07b Author: Brice Goglin <bgoglin@debian.org> Date: Sat May 22 20:29:02 2010 +0200 Remove obsolete reference to README.DRI in xorg.conf.man Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 89dd7d2b6fe18f32c2f9336c3d8cd9f35490e5ae Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat May 22 10:33:04 2010 -0700 Remove ancient documentation of IBM RapidAccess keyboard hack Keyboard setup belongs in drivers, not in a document no one sees because we don't even install it. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> commit 480fcdf0335abae0ee544b022c7985211eee462f Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat May 22 10:29:47 2010 -0700 Remove completely out-of-date README.DRI The license only allows distribution of verbatim copies, so we can't update it, even to correct the incorrect address to send updates to. The Mesa & DRI web pages are much better sources of current information anyway. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 1805c74d9b0ed46802481bcd6beea5feeb60212c Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat May 22 10:29:00 2010 -0700 Add RandR 1.2 README.modes doc to EXTRA_DIST Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 5939e39a641773a36c22104e1184143678dca7a2 Author: Dave Airlie <airlied@redhat.com> Date: Mon May 24 09:31:51 2010 +1000 xf86: allow for no outputs connected at startup operation. When nothing is connected at startup and we canGrow, allow the server to start with a 1024x768 framebuffer, and when the drivers send hotplug events this will expand to the correct size dynamically. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b9f48d60bc0c839bd323c582231e8e7e2b810af6 Author: Jamey Sharp <jamey@minilop.net> Date: Wed May 19 10:44:33 2010 -0700 Device init: Don't crash when CreateGC fails. ActivateDevice was ignoring errors from DeviceCursorInitialize, so cursor-related calls failed later. Jeremy Huddleston saw that crash in miPointerConstrainCursor, while with Xvfb I saw it in miSpriteRealizeCursor. miDCDeviceCleanup frees any non-NULL GCs. miDCDeviceInitialize calls Cleanup on any failure, but if it failed early then some of the pointers in the miDCBufferPtr were garbage. Switch from malloc to calloc to ensure everything's initialized safely first. With these two fixes, if CreateGC fails then the server gracefully fails in FatalError instead of segfaulting. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit c51534961e1bb4c68ff881758862d2f85f572ce7 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sat May 22 11:11:48 2010 -0700 xorg-server.pc Requires: xproto >= 7.0.17 Since the headers we export in the SDK use the _X_NORETURN #define introduced in xproto 7.0.17, drivers built with the SDK will also need to have at least that version of xproto installed. I considered exporting the version from configure.ac, but decided not to since the minimum required to build the X server may not always be the same as the minimum required to build drivers (for instance, if the X server used a new #define in its .c files or internal headers, but didn't export it in any of the SDK headers). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit e90f20eed394de2200aba42bd61fd31c1067ac33 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 21 22:16:50 2010 -0700 Declare functions that unconditionally call FatalError as _X_NORETURN. For AtomError, this should fix a clang warning; in the other cases it's just good documentation. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9d31d5b639c2a6ab8b1a80a0e2f0ee2c4f8cddd3 Author: Adam Jackson <ajax@redhat.com> Date: Mon May 10 11:48:31 2010 -0400 vfb: Remove dead variable and header file Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit d8cbcbc01d1355d55c1c0af64f7f7f61629f6c61 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 21 11:12:26 2010 -0700 doPolyText: forget about FontChange's XID after looking up pFont. As of e2929db7b737413cf93fbebdf4d15abdfebff05c, doPolyText uses pFont consistently rather than looking it up again from the saved XID. clang noticed that "oldfid = fid" could run when fid hadn't been initialized yet. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Tested-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 989db930d739483759087b13b8d9a043299feafb Author: Aaron Zang <Aaron.Zang@Sun.COM> Date: Thu May 20 17:56:28 2010 -0700 Solaris: Use VT_SET_CONSUSER ioctl to set Console User rights profile When Xorg is started on display :0, this ioctl is called to grant the user the rights traditionally associated with /dev/console (before VT support was added), such as access to local peripheral devices. Also adds a Solaris-specific -C flag to force starting on /dev/console instead of /dev/vt*, allowing programs like xterm -C to access the console device. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 98553e52a14b97a03aef8dc4fc0300b3f4c2c4b5 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 20 17:56:27 2010 -0700 vbe.h: Use __attribute__((packed)) on Sun cc 5.9 & later as well as gcc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7b09335a46f9428141811230c69eef7968531359 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu May 20 17:56:26 2010 -0700 Xserver(1) man page updates - Note that -br is now default. - Move -bs after -br for alphabetical ordering. - Remove -config option that's been hidden in "ignore" section, since ajax removed the -config code a couple years back. - Add -nocursor option. - Add xinput & xrandr to list of runtime server control programs - Replace XDarwin with Xquartz in list of Xservers Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cf4f3d051858aadedd6e333bb317a1daa3987ad7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 21 13:30:25 2010 +1000 dix: remove obsolete comment.from EnableDevice. The code this comment was referring to was removed in 8b5086250aa5dae8de8b763408ff480d7beac819 "Eliminate bogus event resizing." Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5754e66044571d549c295b7c9e02ce3348dbe3c7 Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 20 10:46:43 2010 -0700 Replace screen->rgf scratch GC flags with a bit in each GC. This eliminates a poorly-named, poorly-documented field from the ScreenRec, using a previously-unused flag bit in each GC instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Keith Packard <keithp@keithp.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5a7275d78a2f1c20ed5bb7b228cf370c4ada22c9 Author: Keith Packard <keithp@keithp.com> Date: Thu May 20 13:57:02 2010 -0700 Find windows GL wrapper files in $(srcdir) instead of . This fixes 'make distcheck' for me. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 1197a87b5638037cc48084fba4eec9d3b599e900 Author: Keith Packard <keithp@keithp.com> Date: Thu May 20 13:40:24 2010 -0700 winpriv.h was moved from hw/xwin to hw/xwin/glx in November hw/xwin/Makefile.am was referencing this instead of hw/xwin/glx/Makefile.am Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 1cad520f3f1d9d520422e3e4d5d8f4ea85a212a4 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon May 17 20:35:10 2010 -0700 XFree86 Design doc: Convert LinuxDoc ``quotes'' to DocBook <quote> tags Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit 8367913be3305be4f03d095615d3885107094427 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri May 14 22:05:50 2010 -0700 XFree86 Design doc: Explain this version covers the current Xorg release Update the title & preface to explain that while this was originally the XFree86 4.0 design, we've changed a lot since forking. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit 78fe4be4c43db1f07a30e8a6c9a17f81c1082d76 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon May 17 20:27:10 2010 -0700 Show Xserver release/version date in DIX & DDX docs Uses a fake absolute path to the entity definition files so that the xmlto --searchpath will work for finding the actual path Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit 2bdc73bcf41ff0c10e70ecc15fc8b8333af6db65 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri May 14 15:33:46 2010 -0700 Move Xserver-spec.xml from xorg-docs to doc/xml Allows keeping it in sync with the sources it documents, and to be released with them Requires the previous patch to convert the Xserver tree from LinuxDoc to DocBook for SGML/XML documents. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit fc6ebe1e1d3057378f61f992549a98e67a04dc6c Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri May 14 14:56:09 2010 -0700 Convert LinuxDoc documents to DocBook/XML Only the markup/formatting is changed - the contents should still be wildly out of date for now. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Rémi Cardona <remi@gentoo.org> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit ebd745ced89b2a2d9f6b4dcbd9f5f7e7f3b35451 Author: Simon Farnsworth <simon.farnsworth@onelan.com> Date: Thu May 20 09:58:38 2010 +0100 Add documentation for the new DefaultModes option This patch adds documentation for the DefaultModes monitor option added in the previous patch. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cfc629148891be317ba60f2495abcda485780191 Author: Simon Farnsworth <simon.farnsworth@onelan.com> Date: Thu May 20 09:58:37 2010 +0100 Add configuration option to disable default modes on an output Setting 'Option "DefaultModes" "No"' in an output will guarantee that X will omit the default modes, just picking up modes from the configuration file and modes provided by the output. Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a1c2bdb6ab7a4f374844f80e83620b155991e817 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu May 20 10:13:06 2010 +0200 EXA: Wrap Glyphs even without Composite acceleration. In order to avoid migration ping-pong when accumulating glyphs in a mask picture. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 00581d4a42e2a0e7652834973645a4a9ed59cf93 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri May 14 19:31:56 2010 +0300 configure: force new xproto version dependency commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac introduced it. Use the version that includes _X_NORETURN Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 103507af0c0ce7d7482a67163249864af36a2374 Merge: 8bd8d81dc 99fcf655b Author: Keith Packard <keithp@keithp.com> Date: Wed May 19 22:27:53 2010 -0700 Merge remote branch 'vignatti/bus-cleanup' commit 8bd8d81dc473bf72ea108b1896a55e32defa02e2 Merge: c620a1c0a 66d5ecc5f Author: Keith Packard <keithp@keithp.com> Date: Wed May 19 22:27:20 2010 -0700 Merge remote branch 'vignatti/animcursor-state-fix' commit c620a1c0a4ca564e778cce019dd30046c6969956 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 20 10:26:56 2010 +1000 xfree86: fix typo in optionTypeToSting. Because we don't want anyone to get hurt. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8b6c1809c09f832051327d86e1a25dc0ec5cc878 Merge: d88ba7721 c38552d11 Author: Keith Packard <keithp@keithp.com> Date: Wed May 19 12:58:02 2010 -0700 Merge remote branch 'jamey/for-keith' commit c38552d115e3bc71ad6179a8ad0d68778e943793 Author: Jamey Sharp <jamey@minilop.net> Date: Sat Apr 24 23:56:36 2010 -0700 Add typed resource-lookup errors for non-core resource types. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit e291c561821ae86b7dd74269d5cd29bc31703962 Author: Jamey Sharp <jamey@minilop.net> Date: Sat Apr 24 23:26:40 2010 -0700 Return an appropriately-typed error from dixLookupResourceByType. Rather than always returning BadValue, associate an error status like BadWindow with a resource type like RT_WINDOW, and return the appropriate one for the requested type. This patch only touches the core protocol resource types. Others still return BadValue and need to be mapped appropriately. dixLookupResourceByType can now return BadImplementation, if the caller asked for a resource type that has not been allocated in the server. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 90e612dcbe370da095d317fac62c80ac2447fa0b Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 15 15:51:32 2010 -0700 Use WriteEventsToClient rather than TryClientEvents where possible. If filter is NoEventMask (aka CantBeFiltered), grab is null, and the first event is not in the set of "critical events", then TryClientEvents simply calls WriteEventsToClient. In that case, it returns 0 for fake or dead clients, and 1 otherwise. Inline for this special case. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 8033fb6c9792820a82fbdff6a14ff8a7a141ba74 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 15 13:12:44 2010 -0700 Set event sequence number in WriteEventsToClient instead of at callers. TryClientEvents already did this; this commit just moves the assignment one level down so that no event source has to worry about sequence numbers. ...No event source, that is, except XKB, which inexplicably calls WriteToClient directly for several events. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 4b9600a4167427a8fe88bca9b738c9a99cac9469 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 15 12:31:34 2010 -0700 Make WriteEventsToClient/WriteToClient no-op on fake or dead clients. This matches the test in TryClientEvents, and is a superset of tests done by the callers of these functions. The consequence of forgetting these tests is a server crash, so they're always desirable. In my opinion, it's better to not require the callers to remember to do these checks. For callers that don't do very much work before calling WriteToClient or WriteEventsToClient, I've removed the redundant checks. hw/xquartz/xpr/appledri.c has an interesting case: While its check for "client == NULL" appears redundant with the test in WriteEventsToClient, it dereferences client to get the sequence number. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit ee9cd2df4a5af66c6b7073563785b8aef61fcdb8 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 15 13:37:34 2010 -0700 xv: TryClientEvents already checks client and sets sequenceNumber. So don't bother doing those steps again. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> commit e1e7deefb59cfdd82c9de46a7ca241d42436b2f8 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 18 16:49:21 2010 -0700 mi/misprite.c: Delete unused private lookups. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 936b09f2a3e31afe41050c00736bbb6b812c7003 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 18 16:48:08 2010 -0700 Replace miSpriteCursorFuncRec with direct calls to midispcur.c. Nobody wraps the mi software-cursor sprite rendering implementations. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 66d5ecc5fd36e21715531a39ac83dc2b6b988a7e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue May 18 13:53:29 2010 +0300 render: set anim cursor state for pointer enabled devices only The structure containing the state of animated cursor was amended within SpriteInfoRec, removing all previously privates logic to keep such state. API change: It was removed MAXDEVICES dependency \o/ Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 99fcf655bdc96f7e5b2249b05da51ba4fc9190c7 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 22:34:44 2010 +0300 xfree86: remove PCI dependency from InitOutput All functions that touch PCI and BUS were moved to their own files, organizing the mess inside the InitOutput. Now, inside InitOutput, mostly accesses to buses are coordinated by the new xf86BusConfig. Two PCI probe functions just changed the name and a procedure to receive the isolate devices parameters was created also, named xf86PciIsolateDevice. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 0dd299864a133d478e4635bd1cd305b67fc3964d Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 21:33:26 2010 +0300 xfree86: remove xf86EnableAccess It's RAC remnant. This was substituted by xf86VGAarbiter{Lock, Unlock} mechanism. It's an API break, but the few drivers using it were covered already with macros to avoid problems. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit f28515b5f774b83e0481acbcdda2f682738079b9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 21:24:46 2010 +0300 xfree86: bus: remove SetSIGIOForState and simplify the code Also removed some dumb debug messages. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 211ca67e4d8d00b20a74a78304a61d4dbea62706 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 21:16:23 2010 +0300 xfree86: bus: fb drivers might want to use vga arbitration either Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 2464eb7d56407422e033ab3b94634ba802a119d5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 21:14:53 2010 +0300 xfree86: bus: simplify entity related hooks Remove some out dated commentaries either. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 971768e6884f20981652da09a1617c51a760fb86 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri May 7 15:25:48 2010 +0300 xfree86: bus: enable declaration of sparc function as its code usage The code in xf86sbusBus.c seems too OS-specific to be usable on OpenBSD. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit a70ec0d136bbb9efb6f4e683d7ebcea00375083b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 20:48:01 2010 +0300 xfree86: bus: rework xf86PostProbe logic and remove useless log info Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 2f7d630a1ee446711288af69711d57ea3054b594 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 20:29:11 2010 +0300 xfree86: bus: reuse already assigned variable when fb driver claimed Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 964f29bb80c1bb05508a27969c3ac34cbf072ee9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 20:14:40 2010 +0300 xfree86: bus: fix Enter/Leave accesses behaviour Okay, seems we're not using extensively such hooks in fact. But fix the expected behaviour at least. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit b37462b4da7c389ec7bbcfd800e5f88bded79330 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 19:53:37 2010 +0300 xfree86: remove unused xf86AccessInit() The function was only initializing the boolean xf86ResAccessEnter, which couldn't get any other value in the life of the server. The only possible, though suspicious, code was in xf86AccessLeave(), which could be triggered if AbortDDX is called before xf86AccessInit(). Even so, such change is safety because no driver would have configured any entity leave procedure at this point. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit d88ba7721d2d3b58cdc664fd4c23a3c5e2a5f909 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 18 11:12:49 2010 +1000 xfree86: Add option parsing for percent options. In some cases, an option of "50%" would be preferable over fixed value configuration - especially if the actual values are autoprobed. Add a new set of functions to parse percent values from configurations. The percent value parsing differs slightly - if the option is not to marked as used (e.g. xf86CheckPercentOption()), no warning is emitted to the log file if the value is not a percent value. This allows double-options (either as % or as absolute number) without warnings. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 673eb707ce6737284c4886265ba149c5587a74e2 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 15 12:06:25 2010 -0700 SyncSendAlarmNotifyEvents: check the correct client's clientGone flag. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c3ba199aa643e59abd30170c53fbb4e03077c377 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Apr 27 16:27:55 2010 +0300 render: remove unused animcursor fields from private rec Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9db63e4766bde07ebc375c4390bcc5c854b46ac3 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Apr 27 16:18:50 2010 +0300 render: removed unused macro from animcursor Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit cba9942f7716b12c329616a9994c5bce857617fa Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon May 17 17:40:30 2010 -0400 dri2: Fix NULL check in allocation error handling 1461b31e40a3e44f6327199d23cf2ab70d8f5176 tests to see if the allocation of buffer[i] failed after i has been incremented, causing it to look at the wrong pointer. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 27cec0a0501369a68031c048e691bda4c7095f72 Author: Julien Cristau <jcristau@debian.org> Date: Mon May 17 19:23:44 2010 +0200 Fix build without XACE dix/colormap.c and dix/gc.c now dereference a ClientPtr, so they need to include dixstruct.h. Regression introduced by commit 11c69880c7c48ef9e755c4e09fadef7a629d7bc7. Reported-by: Robert Hooker <sarvatt@ubuntu.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5a387cf6d248e3cb3337a938200ed5a09fc1d8cb Author: Julien Cristau <jcristau@debian.org> Date: Sun May 16 21:29:02 2010 +0200 Only link Xorg with libconfig.la Other DDXs don't use input hotplugging since config_init was moved to the DDX in commit d33adcdf03c69407d151e732fa0cf9947151eb19, so there's no need to link this in. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 37f0b45dbe4ea52bc127720207c7157b2b803ac0 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun May 16 10:14:02 2010 -0700 XQuartz: Fix a build failure on Tiger Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ecfeabec8d0dcfe286fb893047f1fe1a7ea9f8f5 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun May 16 10:03:13 2010 -0700 XQuartz: Don't use deltaXY for determining pointer location on scroll events <rdar://problem/7989690> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Edward Moy <emoy@apple.com> commit a911292c85f7069d2caabcb677ed716a04227526 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat May 15 10:53:09 2010 -0700 XQuartz: Don't trust deltaXY for middle mouse clicks. The middle mouse clicks return erroneous values after returning from Fast User Switching. <rdar://problem/7979468> http://xquartz.macosforge.org/trac/ticket/389 Signed-off-by: Martin Otte <otte@duke.edu> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Edward Moy <emoy@apple.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 345eb171264325d73ea2c50ba8c692cf589c2a9b Author: Keith Packard <keithp@keithp.com> Date: Sat May 1 01:41:19 2010 -0700 Remove dbe screen private privates. Each DBE Screen private structure could have nested privates. Oddly, no code ever used them. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 87ea5760f86eb60840e6e2c10012915952df5377 Author: Keith Packard <keithp@keithp.com> Date: Mon May 10 11:46:25 2010 -0700 Check pixmap allocation return value when creating glyphs The driver may decide that the pixmap is too large or something and fail to allocate a pixmap; not checking would lead to a segfault. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 03f7e92a6cbfe58db08ce840283f9809695c70e7 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon May 10 13:44:30 2010 -0700 Update list of supported platforms in configure.ac error message Adds DragonFly BSD, OpenSolaris, & GNU Hurd. Drops MacOS X, since this is in the section specific to the Xorg/XFree86 DDX. (Matches the OS patterns the configure script checks for.) Also uses m4 macros to fix the spacing/formatting of the resulting message. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Gaetan Nadon <memsize@videotron.ca> commit e42a29d269fadc11e065c63ee369e3165196f2d7 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu Apr 29 18:45:34 2010 -0700 Fix compiler issues with getifaddrs() call on OpenSolaris OpenSolaris recently added support for the getifaddrs() API. Building with that uncovered two compiler issues (one warning, one error) in the code that was now being built for the first time in our builds: "access.c", line 768: warning: argument #1 is incompatible with prototype: prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213 argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} "access.c", line 838: assignment type mismatch: struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c6613cfc26e76b296e620640bf33e756eb4ae178 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 14 10:36:13 2010 -0700 test/xi2: Initialize predefined atoms before XInputExtensionInit. XInputExtensionInit calls MakeAtom, which doesn't work without the atoms table initialized. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1461b31e40a3e44f6327199d23cf2ab70d8f5176 Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Fri May 14 16:25:43 2010 +0300 dri2: Fix xserver crash if dri2 buffer allocation fails. If driver fails to allocate memory for dri2 buffer server would crash in send_buffers_reply. Solution is to handle the allocation failure and return BadAlloc to client. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f87002cb7d8729b1da4cbefe7653f4cfd3a2d956 Merge: a4fbc0fed 890f536f8 Author: Keith Packard <keithp@keithp.com> Date: Fri May 14 11:46:29 2010 -0700 Merge remote branch 'jamey/for-keith' commit 890f536f8d66f08e7d6a5685659eef4001a8757d Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 14 00:18:14 2010 -0700 Bugfix for "Pre-validate ChangeGC XIDs": off-by-one in loop index. Signed-off-by: Jamey Sharp <jamey@minilop.net> Tested-by: Colin Harrison <colin.harrison@virgin.net> commit a4fbc0fedafda6df98f647173a2deccb86ef0479 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Fri May 14 07:49:31 2010 +0300 scrnintstr.h: removed unused PaintWindow function pointers. Please note this patch breaks the ABI. Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 71296885b0bb946e7ab986169f5b872952c221a0 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Thu May 13 07:12:43 2010 +0300 mi: removed unused PointerNonInterestBox functions. Please note this patch breaks the ABI. Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 795432d4a92ed5b9fa4d9163e73c8e4fe4c74534 Merge: f2a0c324e 92ed75ac5 Author: Keith Packard <keithp@keithp.com> Date: Thu May 13 18:22:49 2010 -0700 Merge remote branch 'jamey/cleanups' commit 92ed75ac59e2d3af149cddb962efd05fc8487750 Author: Jamey Sharp <jamey@minilop.net> Date: Mon May 10 20:22:05 2010 -0700 Eliminate boilerplate around client->noClientException. Just let Dispatch() check for a noClientException, rather than making every single dispatch procedure take care of it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 11c69880c7c48ef9e755c4e09fadef7a629d7bc7 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 22:16:32 2010 -0700 Quit using clientErrorValue in dix/colormap.c. And that's it! No more clientErrorValue kludge. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit a3d948ddbb54b9e831e67f22d5031922a3c44107 Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 12:35:52 2010 -0700 clientErrorValue is never used outside dix. Stop importing it. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 653e4878c4cc03613172a93ad4800e1eacc98f17 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 19:18:11 2010 -0700 Quit using clientErrorValue in dix/gc.c. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 5193f25ea33eed31d6a75cdc1a86427c23d8033c Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 19:08:47 2010 -0700 Define GCAllBits as the union of all valid CreateGC masks. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 7 19:38:05 2010 -0700 Replace dixChangeGC with calls directly to the right variant. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 7 18:11:36 2010 -0700 Pre-validate ChangeGC XIDs. In order to execute a wire-level ChangeGC request, we need to look up the resources named by any XIDs in the value-list. Various places in the server already have pointers to the resources they want to set into the GC, though, so over time the interface has evolved to accept either XIDs or pointers, with several different function call signatures used in different eras. This patch makes the existing code require pointers to resources rather than XIDs, and adds a simple wrapper that looks up any XIDs. The old dixChangeGC API is preserved by delegating to whichever implementation is appropriate. This affects error-handling: If any of the XIDs are invalid, then the GC is unchanged, and its ChangeGC callback is not invoked. This change is allowed by the protocol spec, which says, "The order in which components are verified and altered is server-dependent. If an error is generated, a subset of the components may have been altered." Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit e2929db7b737413cf93fbebdf4d15abdfebff05c Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 14:10:51 2010 -0700 dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere. The exceptions are ProcChangeGC and CreateGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 95728ca09d45afc84c8d1828c09c6b6725f1a58d Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 09:25:34 2010 -0700 Don't statically allocate the ChangeGC parameter array. Because that's insane. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit bff8525f8483304d5f93e83e36b47209381da721 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 12:06:50 2010 -0700 Simplify miFillPolyHelper and miLineArc. Both functions compute a set of spans and either fill them immediately or accumulate them into a caller-provided buffer. Computing the spans used only the miTranslate and lineWidth fields of pGC, and neither could have been changed by the initial ChangeGC/ValidateGC pair, so it's safe to compute the spans first. Then both functions consume the spans the same way, so factor that into a new fillSpans function. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 83f7ec97279405958aed86c6a57704a460c3bfba Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 13:38:00 2010 -0700 miwideline: Factor out span buffer allocation. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit f2a0c324e37c9fa3eb9087adbf963addb7f21d88 Author: Keith Packard <keithp@keithp.com> Date: Thu May 13 10:33:39 2010 -0700 Remove devPrivates init and delete callback lists. XSELinux was the only consumer of these interfaces and it no longer needs them. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit c9e7ca4404803fe44d4684e0bb2ca2ee10fd4bb3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed May 12 20:25:30 2010 -0400 xselinux: Remove use of devPrivates init/free callbacks. Commit eb9210097efea81065c301e5b6b4da7a566deb4a removed the sidget/sidput calls which were the major reason for using the callbacks. The remaining operations can be skipped or worked around. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu May 13 08:32:00 2010 -0700 Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURN Use the values from xproto rather than duplicating the effort Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 421606a8ef447d10c2ee0986f20e752056a47675 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Tue May 11 10:52:18 2010 -0400 dri2: Send out event when auxillary buffers are invalidated This lets the DRI2 clients rely on the server to notify them when they need to get new buffers. Without this, OpenGL clients poll the server in glViewport() which can be a performance problems and also isn't completely correct behaviour. We bump the DRI2 protocol minor to indicate the availability of the event, which the DRI2 clients can use to avoid polling. This speeds up various piglit and oglc test cases as well as real applications. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f281db9a5e400c822e03a19937247baa20ecc213 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Wed May 12 23:57:58 2010 -0700 Remove ResNoAvoid definition, missed in the RAC removal ResNoAvoid is #defined to ResBios, but ResBios was removed from xf86str.h in 4b42448a2388d40f257774fbffdccaea87bd0347 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 315041762313598aad90df84226e2d2def4a0fc9 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 18:55:55 2010 -0700 CreateGC: Pass current client on to ChangeGC. Otherwise we can't check that the XIDs this GC is being initialized with are accessible to this client. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 04bad1b8a118a83064316d6e4327234aee19361e Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 21:56:10 2010 -0700 Kill ChangeGC in favor of dixChangeGC. This doesn't change any behavior, but it isn't clear whether NullClient is correct in all cases. As ajax says, > For most of these changes, I think it's correct to use NullClient, > since they are server-initiated changes and should not fail for (eg) > xace reasons. ... At any rate, you're certainly not changing any > semantics by leaving them all as NullClient, so this patch can't be > more wrong than before. The call in CreateGC is particularly questionable. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 65cedf39054cf3a1e695e84ac228cce9e8d48097 Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 21:39:43 2010 -0700 Kill DoChangeGC in favor of dixChangeGC. This doesn't change any behavior, but it isn't clear whether NullClient is correct in all cases. As ajax says, > For most of these changes, I think it's correct to use NullClient, > since they are server-initiated changes and should not fail for (eg) > xace reasons. ... At any rate, you're certainly not changing any > semantics by leaving them all as NullClient, so this patch can't be > more wrong than before. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit afcbbd6dfea51c5b0adca0d720edc02ba0c2dc16 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 15:19:03 2010 -0700 doPolyText needs UseAccess to each font, not ReadAccess. In commit 42d6112ec21949a336ee8b34469f2695273ee2d6, Eamon changed dixChangeGC to require DixUseAccess on any GCFont XID. I think doPolyText needs to require the same level of access. Otherwise dixChangeGC could fail when it does the same lookup, which doPolyText doesn't check for. Signed-off-by: Jamey Sharp <jamey@minilop.net> Cc: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 59857ee5da5f1f3f4900292581b9586477513211 Merge: 21ceae900 432cbbec1 Author: Keith Packard <keithp@keithp.com> Date: Wed May 12 16:48:08 2010 -0700 Merge remote branch 'dottedmag/for-keithp' commit 432cbbec194e47bf2a117c9302146e786c8a4ee1 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 03:51:00 2010 +0700 Misc coding style cleanup Use a[b] instead of *(a+b), fix whitespace. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 816b79dd061e9839cec94a4986a7820b70ca8a7f Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 03:45:21 2010 +0700 Remove useless casts Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 63a647abd51f44226cbd16aa04ebc57d07463c6d Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 03:44:12 2010 +0700 Fix code style: extra whitespace before () Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 28211c443c693a1ca3db5740d0128274a3eef723 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 03:43:04 2010 +0700 Fix warning: it's safe to pass atom strings > XA_LAST_PREDEFINED to free(3) Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 8b5326aa98eba201dd78aea3dd7114e1a084489b Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Wed May 12 20:27:02 2010 +0000 Mark OsAbort as noreturn function to make gcc happier. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 868e372a73b377705217e0379bc6e00f36c4d8e5 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 01:59:06 2010 +0700 Introduce X_NORETURN macro defined as __attribute__((noreturn)) for gcc Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 5a8e2f2745ae1f74501cd3f42614a1ed2cf974f2 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Wed May 12 18:54:51 2010 +0000 Do not jump through the hoops to deallocate xkbbasedirflag variable Fixes gcc warning as well. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit ff2b4cf8329b1678adafcda02e5d47a072550d47 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 01:51:37 2010 +0700 Turn sprintf argument into literaral string, shutting up gcc warning Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit f62ba192c285b1e49bf299f03fc0b763680afaaf Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 13 01:47:26 2010 +0700 Do not use deprecated Xalloc function Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 21ceae9002c6364deb3d074cf2da7d3864cf6879 Author: Jamey Sharp <jamey@minilop.net> Date: Tue May 11 10:24:00 2010 -0700 SetFontPath: set client->errorValue on failure. Previously the callers were only setting errorValue on Success, when it's ignored, and leaving it alone on failure, when it's sent to the client. Since SetFontPath takes the ClientPtr, let it set client->errorValue instead of letting the callers continue to get it wrong. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 801162919d1c625d950a5d105ae4b3487ebc30a7 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 01:55:36 2010 +0700 Removed outdated comments obsoleted by documentation in headers Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4d55c8c4ffcb5d6c6500b462a41ace8e2359151d Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 01:54:13 2010 +0700 Use lowercase variant of XNFalloc and Xstrdup Using one variant of function/macro makes it easier to fix the code later. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3f3ff971ecff9936cebafc813af9193b97bba89c Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 01:44:06 2010 +0700 Replace X-allocation functions with their C89 counterparts The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 96c7ab27c383ec767f62a7a11e5fd76f86363fbc Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 00:28:25 2010 +0700 Deprecate allocation functions which are plain wrappers for C stdlib Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit a5dba0f5caefce236ebd5f71948e5a659bea58e4 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 00:27:47 2010 +0700 Document allocation functions, noting deviations from C library Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit e983848ab44b0769f97f6207f1aa8b4f127be6a9 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu May 6 00:16:24 2010 +0700 Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage C89 guarantees alignment of pointers returned from malloc/calloc/realloc, so stop fiddling with alignment manually and just pass the arguments to library functions. Also convert silent error when negative size is passed into function into warning in log file. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4f0006c2203abe0b7660c5068d6afe236f9bd2a4 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Mon May 10 08:36:02 2010 -0400 dri2: Copy front to fake front in swapbuffer If we don't have a fake front, nothing will happen. The fix was extracted from a bigger patch from Francisco Jerez. https://bugs.freedesktop.org/show_bug.cgi?id=27305 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Pauli Nieminen <suokkos@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ba1f1f9d9e48226f1ef6b3222a8d92fc969d6560 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue May 11 09:49:34 2010 -0700 XQuartz GL: Fix __glXAquaScreenCreateDrawable prototype Fixes regression introduced in 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 286935c6f4965a6b09de1fb9e579a00afa14082a Author: Keith Packard <keithp@keithp.com> Date: Tue May 11 09:08:40 2010 -0700 Remember drawable ID used to find damage target for use in events. Bug 5730. Using Composite, window pixmaps are given names in the client resource namespace and yet may not have any XID recorded in the drawable structure. As such, we need to remember the XID used to lookup the pixmap in the resource database so that we can report the correct XID back to the client in damage events. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 3df22b293c1f1d27e7ce16662744c578d35b5aba Merge: fa6c70125 9de0e3174 Author: Keith Packard <keithp@keithp.com> Date: Tue May 11 08:38:44 2010 -0700 Merge remote branch 'krh/dri2-resource-fixes' commit fa6c7012572093a82c9389682977efff85590719 Author: Cyril Brulebois <kibi@debian.org> Date: Mon Mar 1 02:11:36 2010 +0100 Fix null pointer dereference in xf86_reload_cursors(). Upon resume, X may try to dereference a null pointer, which has been reported in Debian bug #507916 (http://bugs.debian.org/507916). Jim Paris came up with a patch which solves the problem for him. Here's a (hopefully) fixed version of his patch (without the typo). Cc: Jim Paris <jim@jtan.com> Signed-off-by: Cyril Brulebois <kibi@debian.org> Reviewed-By: Matthias Hopf <mhopf@suse.de> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc Author: Kristian Høgsberg <krh@bitplanet.net> Date: Thu Apr 29 16:36:10 2010 -0400 dri2: Take an XID for tracking the DRI2 drawable Some pixmaps (window pixmaps and scratch pixmaps) don't have the drawable->id set and thus DRI2 gets confused when using that field for looking up the DRI2 drawable. Go back to using privates for getting at the DRI2 drawable from a DrawablePtr. We need to keep the resource tracking in place so we can remove the DRI2 drawable when the X resource it was created for goes away. Additionally, we also now track the DRI2 drawable using a client XID so we can reclaim the DRI2 drawable even if the client goes before the drawable and doesn't destroy the DRI2 drawable. Tested-by: Owen W. Taylor <otaylor@fishsoup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> commit 32381363cd8f43aeb741bad70bcf96a287dac0c9 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Sat May 1 13:15:00 2010 -0400 list.h: Add list_for_each_entry_safe() Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 4a8a615d01b9ed18c272414bd11dc2fc661727e5 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Sat May 1 13:13:54 2010 -0400 glxdri2: Hard-code the extension version we need If we use the #define'd version from dri_interface.h, the server will require at least that version of the extension. If we're compiling against a dri_interface.h with a newer version we don't really require, glxdri2 will require a too high version of the extension. The right approach is to just hard-code the version we need instead of using the #defines. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Adam Jackson <ajax@redhat.com> commit 6d7ba5e0fcb5d1bce6bb213dec009f3a0f802d26 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Sat May 1 13:07:46 2010 -0400 dix: Update element count in FreeResource*() FreeResource() keeps clientTable[cid].elements up to date with the number of resources allocated to the client. The other free resource functions (FreeResourceByType(), FreeClientNeverRetainResources() and FreeClientResources()) don't maintain this invariant. Typically, the only consequence is that the element count is too high and we end up allocating the hash table bigger than necessary. However, FreeResource() also relies on the element count to restart the search if the list of resources has been changed during a resource destruction callback. Since FreeResourceByType() doesn't update the count, if we call that from a resource destruction callback from FreeResource(), the loop isn't restarted and we end up following an invalid next pointer. Furthermore, LookupClientResourceComplex() and FreeClientNeverRetainResources() don't use the element count to detect if a callback deleted a resource and may end up following an invalid next pointer if the resource system is called into recursively. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 16 16:35:22 2010 +1000 xfree86: dga needs to use the master keyboard state (#27573) GetPairedDevice() may not always return the keyboard, resulting in a null-pointer dereference when accessing the XKB state. For floating devices, the GetMaster() returns the device itself. X.Org Bug 27573 <http://bugs.freedesktop.org/show_bug.cgi?id=27573> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Tested-by: Ben Hutchings <ben@decadent.org.uk> commit 758b8614477b53dc3de2b884fec5ccaf8a736432 Author: David James <davidjames@google.com> Date: Mon May 10 14:00:49 2010 -0700 Fix wrong bracket values when startOver = FALSE. Currently, SyncComputeBracketValues reuses old values of bracket_greater and bracket_less when startOver = FALSE. This can result in incorrect bracket values. To fix this issue, the startOver parameter is removed, and we do not reuse old values of bracket_greater and bracket_less. X.Org Bug 27023 <http://bugs.freedesktop.org/show_bug.cgi?id=27023> Signed-off-by: David James <davidjames@google.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 95074538cce93abc1739a4d9dd78b0500fb8fec9 Merge: c0799779d 2160ff524 Author: Keith Packard <keithp@keithp.com> Date: Mon May 10 13:49:33 2010 -0700 Merge remote branch 'jamey/for-keith' commit 2160ff5240d7e11bdc6cec8859fd1f10395c8edd Author: Jamey Sharp <jamey@minilop.net> Date: Fri May 7 20:00:40 2010 -0700 Simplify error-handling in dixChangeGC. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 4080cd42fde8b4c693eab7557581af2622479109 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 09:41:46 2010 -0700 miPolyPoint bugfix: Check memory allocation before changing the GC. miPolyPoint ought to leave the GC unchanged even if it fails. ajax says: > We have a new winner for the oldest-bug competition! It's actually > been like that since X11R1: > > -rw-r--r--. 1 ajax ajax 2817 1987-09-12 01:20 ddx/mi/mipolypnt.c Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit ccdaecc5471cc2d56b1702eeed4280bb4d58c515 Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 12:26:47 2010 -0700 Move AppendSpanGroup from miwideline.h to miwideline.c. Also make it stop being a macro. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 4272d6722c0f65bdfafc95e91cc2fdb8f6bd072e Author: Jamey Sharp <jamey@minilop.net> Date: Sat May 8 12:18:37 2010 -0700 Expand macros that are used only in miFillPolyHelper. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit c0799779dffeef8cef228bdc57aa6c8b323e7485 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 26 17:22:12 2010 -0700 dmxBERestoreRenderGlyph was passing wrong value to free Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 946f664b6ab421f69df3dc3213b14b085424c9e4 Author: Adam Jackson <ajax@redhat.com> Date: Thu May 6 17:58:29 2010 -0400 mi: Delete wide ellipse arc cache This does make wide ellipses slower, by a factor of twoish: 946000.0 521000.0 ( 0.55) 10-pixel wide ellipse 98300.0 49900.0 ( 0.51) 100-pixel wide ellipse 17700.0 9310.0 ( 0.53) 500-pixel wide ellipse 16900.0 7980.0 ( 0.47) 100-pixel wide dashed ellipse 16100.0 5370.0 ( 0.33) 100-pixel wide double-dashed ellipse But no one cares, and it's a modest size win: text data bss dec hex filename 1773824 69552 59288 1902664 1d0848 hw/vfb/Xvfb.before 1773112 69552 58648 1901312 1d0300 hw/vfb/Xvfb Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 580b99bb8af4ea093953c2b885bd4272aaf02baf Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 11:00:39 2010 -0700 Return BadPicture, not BadPixmap, if alpha-map is invalid. I believe this is what was intended. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c677fc611b124c44adfcfb95718798105f26357b Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 11:00:38 2010 -0700 VERIFY_PICTURE always returns BadPicture. Don't bother specifying. Same goes for VERIFY_ALPHA, VERIFY_XIN_PICTURE, and VERIFY_XIN_ALPHA. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 35761d5f811406bc0b6a68c1b02bdb699142745c Author: Jamey Sharp <jamey@minilop.net> Date: Thu May 6 11:00:37 2010 -0700 Introduce dixLookupFontable for "FONT or GC" parameters. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2eab697adba4b1858a530750e9a35fba79a7bf26 Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Fri May 7 09:32:34 2010 -0700 Constify function prototypes in auth & xdmcp code Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit e2e2747f40c4b9e23dba38ea656d4c082e83a794 Author: Matthias Hopf <mhopf@suse.de> Date: Fri May 7 18:46:30 2010 +0200 Fix mod() definition. Presumably no implications, especially security-wise. Signed-off-by: Matthias Hopf <mhopf@suse.de> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 626f97688a89dbc5da80390d822d21b1a737de0e Author: Adam Tkac <atkac@redhat.com> Date: Fri May 7 17:02:03 2010 +1000 Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC. Signed-off-by: Adam Tkac <atkac@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad Author: Chris Humbert <freedesktop@mahadri.com> Date: Fri May 7 17:02:43 2010 +1000 dix: make DeviceEvent coordinates signed for Xinerama. #24986 With Xinerama enabled, event coordinates are relative to Screen 0, so they can be negative. The new DeviceEvent's coordinates are of type uint16_t, making screens above and to the left of Screen 0 unusable. X.Org Bug 24986 <https://bugs.freedesktop.org/show_bug.cgi?id=24986> Signed-off-by: Chris Humbert <freedesktop@mahadri.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9802839d35aaf788790f1d0e8300db4693a70096 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 7 16:22:12 2010 +1000 Xi: reset the known properties at the end of the server generation. Properties allocated through XIGetKnownProperty() aren't reset on the second server generation but keep the old value. As a result, wrong Atoms are supplied to the driver, resulting in potential data corruption or weird error message. Reproducible by running "xlsatom | grep FLOAT" twice on a plain X server. The second X server generation won't have the FLOAT atom defined anymore, despite the users of this atom not noticing any errors. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 72758287f79a4f1aa8fa388f20947042e3e14693 Author: Julien Cristau <jcristau@debian.org> Date: Tue May 4 15:15:02 2010 +0200 XQuartz: add new localization files to EXTRA_DIST commit 206531f75cd41c034e89fdfbc75ab0910682eef8 added localization files for ar, add them to the Makefile. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit a3f5d30ba61e70b3de8b48754dea32715ba93c40 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 16:10:32 2010 -0700 Make sure XFixes invisible cursor gets freed on server reset This uses the same hack that dix uses for the rootCursor -- allocate a resource ID for the invisible cursor so that it gets freed at reset time. This also allows us to unconditionally create it during extension initialization; necessary as the privates layout may well be different on subsequent generations. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cdeb2c23f80ced961fe205125547e16905885534 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 12:18:09 2010 -0700 Fix cursor ref counting mistakes with sprites and xf86Cursor.c A few cursor value assignments weren't getting correctly ref counted, causing leaks of cursor objects. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a80b1f888f2f7674a715d512ab950eeadee20448 Merge: 497109986 0efd7b8d8 Author: Keith Packard <keithp@keithp.com> Date: Sun May 2 16:35:17 2010 -0700 Merge remote branch 'jeremyhu/master' commit 0efd7b8d82a48793341e27d4c224986e0971687c Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Apr 27 13:14:47 2010 -0700 XQuartz GLX: Change around includes for better compatability with different OS versions Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7b506fdc840aebed6b5acb91437a2cb620b5bddc Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Apr 21 08:38:53 2010 -0700 rootless: Add some sanity checking to miPaintWindow This avoids painting the root window when it isn't actually drawable. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4d3789c9b3fbe6aad32fcacd964353b612640f27 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Apr 18 01:22:27 2010 -0700 rootless: Remove an unneeded comment Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 048d15192af39ba5111882d18a957b6ff4e34cad Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Thu Apr 22 10:29:44 2010 +0300 x-list.c: null-returning function malloc() was called without checking Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4971099860e8e6d7817ada92e2636cb435fd002d Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun May 2 19:14:39 2010 +0300 dix: wrap variables with #ifdef when panoramix is not used this shut up some warnings. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 40858960c02a7694b0e1b72e2a986805580ff6f1 Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 29 12:24:51 2010 -0700 Delete loop with no effect from GlyphUninit Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 65e961fcc1da0f1e6c1c477701b2eeb36955ed24 Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 29 12:24:49 2010 -0700 Replace some input devPrivates with regular struct fields In the process, fixes a memory leak in CloseDevice, and an unchecked memory allocation in InitializePredictableAccelerationProperties. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 998e982b775073da59412dce8ce609ea2ad7967c Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 29 12:24:48 2010 -0700 Move callback definitions to their own file Needed as the privates stuff uses the callbacks before they would have been defined in dix.h Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 7dde50c649089b03650d6497079a690feea65e22 Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 29 12:24:47 2010 -0700 Move X_DEPRECATED to misc.h so it can be used outside resource.h Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit 5623908aeef70e5083f3b49986c7547ed044fedd Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Apr 28 12:37:08 2010 -0700 dix: Improve documentation of the DIX private data functions. The functions exported by the devPrivates code were poorly documented. I tried to spruce it up a little. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 986d46144b183a36b4e98aed95eca0c55a8b4251 Merge: a974c8e7c b5b8f91b8 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 12:40:53 2010 -0700 Merge remote branch 'jamey/for-keith' Conflicts: hw/xfree86/common/xf86xv.c commit a974c8e7cba40c8d7d1b91e07de8c414627b71a2 Merge: 6581bc459 02e86221b Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 12:33:00 2010 -0700 Merge remote branch 'whot/for-keith' commit 6581bc4591746c906d97f8b868f946c47bc6d756 Merge: 0e91e19f7 d073e51be Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 12:29:52 2010 -0700 Merge remote branch 'yselkowitz/master' commit 0e91e19f783d21198fc2e210203e0f10040a9cd0 Merge: 81a081c1f edbc56c08 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 30 12:27:51 2010 -0700 Merge remote branch 'vignatti/for-keith' commit 02e86221b851e5423a95782aa7e297ea051022ca Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 29 09:48:37 2010 +1000 xfree86: a missing input driver is not an error. We call NIDR on all devices that make it through the config backend. Including some that have no driver assigned to them (/dev/input/mouse0 for example). Those ones then simply get ignored by NIDR, but this should not be noted as an error in the log file. X_INFO is sufficient, and it may just prevent some bugreports. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 81a081c1f0cb55df94cb10495aa7ad71cd5a9afb Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Nov 7 19:28:18 2009 +0000 Cygwin/X: AIGLX using native WGL A rewrite of the XWin DDX AIGLX code to actually make it do something useful again Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 262c2c9031ea60cbe738ed80ddb7faa1b888d137 Author: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Date: Tue Apr 27 14:04:47 2010 +0300 test: Fix linking of wrapped functions in XI2 tests. Running "make check" will lead to build problems in scratchbox. Building the first test that wraps dixLookupWindow fails because symbol __real_dixLookupWindow can't be resolved. Defining wrapping options as linker options instead of compiler options makes everything build nicely in scratchbox. Signed-off-by: Rami Ylimäki <ext-rami.ylimaki@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ffaae7c0c69a51a53a76146c79f3630ae197a443 Author: Adam Jackson <ajax@redhat.com> Date: Mon Apr 26 20:11:31 2010 -0700 Remove mibank support Banked framebuffers are so 1990. As of 7.4 the only drivers remaining that used this were chips, neomagic, trident, and vesa. vesa only used it when not using shadowfb, which is broadly undesirable anyway, and no longer uses it at all as of 2.3.0. neomagic never used it by default, and support for it is gone in git master. The other two effectively only ever used it for ISA chips; since ISA support is now gone from the server, they have been modified to only compile mibank support when ISA support is available. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b5b8f91b82d7b150c926dd3fecee6c3aafff6e39 Author: Jamey Sharp <jamey@minilop.net> Date: Thu Apr 22 21:35:17 2010 -0700 xfree86: use screen privates for Xv offscreen images. This replaces a globally-allocated array that depended on MAXSCREENS. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit a1c2acfe798c57e5be7e5f6c111a6ce91400487a Author: Jamey Sharp <jamey@minilop.net> Date: Wed Apr 21 18:05:45 2010 -0700 xfree86: use screen privates for exclusive DGA clients. Most DGA requests allow at most one client to be using DGA on each screen. Instead of keeping track of the current client in a MAXSCREEN-sized array, track it in a per-screen private. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit f9e3a2955d2ca73604c68fc9d51405581b832edb Author: Jamey Sharp <jamey@minilop.net> Date: Mon Apr 26 18:23:27 2010 -0700 Make Xvfb independent of MAXSCREENS. If a -screen option specifies a screen number higher than any previously specified, reallocate the vfb-private array of screen-info structs. If built with a DIX that still has a MAXSCREENS limit, asking for too many screens won't be detected until InitOutput calls AddScreen. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 20e84b0b44e8b3b40a3ecab5b2e64a27de247b16 Author: Jamey Sharp <jamey@minilop.net> Date: Mon Apr 26 18:09:23 2010 -0700 Xvfb: Simplify screen option processing. Inspired by Jon Turney's "Xwin: Simplify screen option processing" patch, which does something similar for the Xwin server. Besides making the code more readable, this eliminates most of Xvfb's references to MAXSCREENS. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit eeb84547556b943af2acff207e034823205c7dfe Author: Jamey Sharp <jamey@minilop.net> Date: Mon Apr 26 18:04:25 2010 -0700 Delete redundant scrnum field from Xvfb private screen-info struct. The screen number can be inferred from the position in the vfbScreens array, and it was only used in two places, so it was hardly important. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit da0217891904bc48d5f0b7ea5c62c8ea0e9b95f9 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Apr 21 22:26:28 2010 -0700 Track screens' installed colormaps as screen privates. Several DDXes allow each screen to have at most one (or in some cases, exactly one) installed colormap. These all use the same pattern: Declare a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by screen number. This patch converts most of those to use screen privates instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 22c4300ee25a20e1f815e46225bf0de9cfd6748f Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 7 09:00:02 2009 -0700 Simplify XineramifyXv. The structure of the adaptor-matching algorithm was obscured by trying to use "continue" and "break" as the only control-flow primitives. It's a lot more clear if you add "return" to that set. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit af170a4ab76d33254dd4e54a33bb410fa1624739 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 21 15:51:20 2010 +1000 Xext: only update the sprite on pointer events. A call to miPointerUpdateSprite for the XTEST keyboard may result in a NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL. XTS test case: Xlib 11 KeymapNotify Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5 Author: Dirk Wallenstein <halsmit@t-online.de> Date: Sat Apr 17 21:36:23 2010 +0200 xkb: Fix omissions in geometry initialization #27679 _XkbCopyGeom did not copy all of the data from the source geometry. This resulted in failures when trying to obtain the keymap from a server where the default geometry has not been replaced by a custom configuration. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3f63db89191701139d45332ca80b9d6eb327c773 Merge: 41bdb6c00 54e51de8c Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 26 20:18:13 2010 -0700 Merge remote branch 'jamey/for-keith' commit 41bdb6c003cca3ef0ff88d9c7de318115bab1ba2 Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Wed Apr 21 18:11:05 2010 -0700 xf86: Don't crash when switching modes through RandR without owning the VT. While VT-switched, FB access is disabled and should remain so. Trying to switch modes in that state would re-enable it, potentially causing crashes if trying to access it before the driver has recovered from the mode switch. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2a763c9023b8bc978b32eaa56d2c625b6f2badee Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 15 16:54:35 2010 -0500 dix: Default DPMS timeout values to match screensaver values These have the same default, but if you specify something different with -s on the command line, only the screensaver time is changed. As DPMS is usually what's desired, change it to match. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 518f3b189b6c8aa28b62837d14309fd06163ccbb Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Wed Apr 21 16:46:17 2010 -0700 mi: don't thrash resources when displaying the software cursor across screens This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures for each pScreen instead of failing to thrash between them when changing screens. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Peter Hutterer <peter.hutterer@who-t.net> commit 54e51de8cd950b3f5b30e72cf1d604f54f619f0e Author: Jamey Sharp <jamey@minilop.net> Date: Sat Apr 24 23:07:47 2010 -0700 ProcGrabButton: remove redundant error check. If dixLookupResourceByType did not return Success, it will have set the pointer to NULL, so the second if will always be true. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> commit 7e573b5ccd2c759f74ebb84d3a5a23da6b88ec6d Author: Jamey Sharp <jamey@minilop.net> Date: Mon Apr 26 15:05:06 2010 -0700 Kill unused/useless macros in panoramiX.h: BREAK_IF, IF_RETURN, FORCE_ROOT This header doesn't seem to be used outside the server tree, so I don't think anything was depending on these except what I've fixed in this patch. FORCE_ROOT is not used anywhere, and never has been in all the history that's in git. ajax removed its FORCE_WIN and FORCE_CMAP companions three years ago, in 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4. BREAK_IF and IF_RETURN expanded to exactly the keywords in their names, which is silly. They were rarely used and served only to make callers inconsistent with the idioms used elsewhere in the server. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Matt Turner <mattst88@gmail.com> commit e372cc58e02391c3e8e82ac03f73fbe8b1f7d49c Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 7 11:06:34 2009 -0700 Boolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com> commit 25d1c6cd37cc4079adf7c4bad8d10678fb08b409 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 26 11:04:38 2010 -0700 Exa screen private has SavedSourceValidate, not SourceValidate Need to check the right field to see if there is a wrapped SourceValidate function. Signed-off-by: Keith Packard <keithp@keithp.com> commit d073e51beeed2e702fa5c7534b1345360bc302f2 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Apr 26 11:39:19 2010 -0500 Clarify help strings for disabled features in configure Features which are disabled by default use the --enable-* syntax to show how they need to be passed to override the default. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> commit 57409af1267f48457f93134922f2450518182e09 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Apr 14 13:18:28 2010 -0500 Catch when requested SHA1 implementation is missing The other SHA1 implementation detections already error out if specifically requested but were not found. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 0d8fe2fe5c37659147cbecac793183c62fc6818a Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Tue Apr 13 13:32:51 2010 -0500 Prefer libsha1 over libgcrypt When no SHA1 implementation is specified, we should first prefer system-builtin solutions (libc/libmd/CommonCrypto), then smaller implementations over the larger ones. libsha1 is much smaller than libgcrypt, so it should be first. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Acked-by: Julien Cristau <jcristau@debian.org> commit 65a2c09549d2372c23b155addff428177708c910 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Apr 8 21:55:45 2010 -0500 Revert "Disable Record by default." Record was broken during the pre-1.6 development cycle and was not fixed until 1.7.6. Now that it is fixed, re-enable it by default. This reverts commit 3eaecdd66e791e0f3d86b23ce10be057ca44c044. Conflicts: configure.ac Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6e0d847c273ab89323883a05f806f449180e3669 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 25 03:37:09 2010 -0500 xfree86: Fix reference to SGML entities XORG_CHECK_LINUXDOC sets the SGML search path to the parent of X11/defs.ent. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Gaetan Nadon <memsize@videotron.ca> commit 04b7d529c09af2c842cf020d5b26080e1ffd88d6 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 25 03:36:25 2010 -0500 xfree86: Ignore linuxdoc generated docs Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Gaetan Nadon <memsize@videotron.ca> commit 39e5108c78e0802833a8e9ea7f29d042738625ba Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 25 03:35:36 2010 -0500 dmx: use silent rules in doc Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Gaetan Nadon <memsize@videotron.ca> commit 3ba2ce5d1054c99354686aeb373247f1b9debf79 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 25 03:33:55 2010 -0500 dmx: Ignore linuxdoc generated docs dmx.txt and scaled.txt are generated from SGML, so they probably never should have been in version control in the first place. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> commit 40972576b606237d5d42abc13d846163e264a4ac Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Tue Mar 23 04:47:27 2010 -0500 Use AC_PROG_SED and respect its result AC_PROG_SED sets SED as the path to a fully-functional 'sed' (which may also be called 'gsed' if GNU sed is installed alongside a proprietary version). This is a follow up to commit 9be4157391edf0c5fc4ee36adfb1eb1c3bdb8e3b. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Rémi Cardona <remi@gentoo.org> commit b557571dbff3d9a615e03cad904d46b8af9153a0 Author: Jerome Glisse <jglisse@redhat.com> Date: Mon Apr 26 16:01:48 2010 +0200 exa: avoid calling non existent SourceValidate callback In unaccel path we were unconditionaly calling the SourceValidate callback but in some case it could be NULL. Check if we have a valid callback before calling it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0e6e75b04eaca311962390533acc03d0ac5ece83 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 26 09:14:22 2010 -0700 Revert "exa: avoid calling non existent SourceValidate callback" This reverts commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad. This one checked pScreen->SourceValidate instead of pExaScr->SourceValidate which would cause a segfault when pExaScr->SourceValidate was NULL. commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad Author: Jerome Glisse <jglisse@redhat.com> Date: Mon Apr 26 15:55:26 2010 +0200 exa: avoid calling non existent SourceValidate callback In unaccel path we were unconditionaly calling the SourceValidate callback but in some case it could be NULL. Check if we have a valid callback before calling it. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit edbc56c088462844f6445f5e6d7cbcfc58a207dc Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 26 14:49:25 2010 +0300 include: remove couple of unused structures fields and bump ABI Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 4f8dc1109dcdfa973466a038c16c07da5f6c16b4 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Apr 22 15:43:11 2010 +0300 dix and others: remove unused arraySize field from ScreenInfo Bizarre. This seems to never be used before. I left the field in ScreenInfo, with another name. So, stop looking at it. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> commit 64fd39f2f0ffbbdc2d5929047d260263d0962141 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Apr 22 15:48:48 2010 +0300 xfree86: no need to assign numScreens again numScreens is always being assigned to 0 in dix for any server generation. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit a7d398e545a4be5491248d5ccb303aa03ee1594f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Apr 16 18:13:50 2010 +0100 Xwin: make screens structures run-time adjustable Change g_ScreenInfo, an array of winScreenInfo elements, from a static array of MAXSCREENS elements, to a dynamically allocated one Fix up the validation that -screen option screen numbers are contiguous from zero (which possibly didn't work correctly before anyhow) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp<jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit d8454ae488cfc073cd6010c9a08d53855a0c2612 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Apr 12 20:18:13 2010 +0100 Xwin: Simplify screen option processing Use an instance of the XWin DDX-specific screen info structure to hold the current default values, to simplify greatly the code for applying options to all screens and remove all those loops over MAXSCREENS screens in the command line option processing Use g_iNumScreens for tracking the current initialized screen count Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit b61870595ba4df06006d24ed8c07cfe781bce1b7 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Apr 22 20:20:48 2010 +0300 xfree86: track screens' installed colormaps as screen privates Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit a94f5455c71363d5047668ee093901b9e1645cf1 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Apr 22 20:20:43 2010 +0300 mi: track screens' installed colormaps as screen privates Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit a2c716eaf6b3a4ce75382394636a0a890b5dcfe0 Author: Jamey Sharp <jamey@minilop.net> Date: Thu Apr 22 07:34:04 2010 +0200 fb: track screens' installed colormaps as screen privates. Several DDXes allow each screen to have at most one (or in some cases, exactly one) installed colormap. These all use the same pattern: Declare a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by screen number. This patch converts most of those to use screen privates instead. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit e055bef055b6c726e9f3ef91a83585d13c80651d Author: Jamey Sharp <jamey@minilop.net> Date: Thu Apr 22 06:08:29 2010 +0200 xfree86: use screen privates for exclusive DGA clients Most DGA requests allow at most one client to be using DGA on each screen. Instead of keeping track of the current client in a MAXSCREEN-sized array, track it in a per-screen private. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 7c9733d063acee04735a0e75d62e508fe4ea1163 Author: Jamey Sharp <jamey@minilop.net> Date: Fri Apr 23 06:41:00 2010 +0200 xfree86: use screen privates for Xv offscreen images. This replaces a globally-allocated array that depended on MAXSCREENS. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 35d208125fa0ec78e8d694adc52886b977e789cf Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Apr 21 18:28:13 2010 +0300 xfree86: fix not reached code in fi1236 driver from i2c This issue was introduced in the first dump of the code in 2004. I haven't check what's the correct fix for it so I simply kept the behaviour of someone calling this and removed the unreachable code. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7ac6a6b7d0dfc5e021270b2898accd3425aa008a Merge: 0782894b5 f7ef6fd9a Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 21 16:07:38 2010 -0700 Merge remote branch 'vignatti/for-keith' Conflicts: exa/exa.c Signed-off-by: Keith Packard <keithp@keithp.com> commit 0782894b5702adcf6f4a90861793b717f3856fa5 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 21 16:00:28 2010 -0700 Xvfb: Usage message typo fix. Signed-off-by: Keith Packard <keithp@keithp.com> commit ee3412b8702072c3a0b006bd20dd3bc7071d721c Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 21 15:58:23 2010 -0700 Restore some unused win32 debug code accidentally removed with unifdef unifdef found some code covered by which it decided to remove. This patch simply restores that in case someone wants it back. Signed-off-by: Keith Packard <keithp@keithp.com> commit e3d2a7a613366c26e5316cf582d9a8c6c6692b0a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 21 11:47:24 2010 +1000 Revert "mi: don't thrash resources when displaying the software cursor across screens" This commit leads to a segfault on the very first XTS test case. Backtrace: 0: /opt/xorg/bin/Xorg (xorg_backtrace+0x3b) [0x80a33db] 1: /opt/xorg/bin/Xorg (0x8048000+0x62a75) [0x80aaa75] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0x5d140c] 3: /lib/libc.so.6 (0x9bb000+0x73579) [0xa2e579] 4: /lib/libc.so.6 (realloc+0xe0) [0xa2e830] 5: /opt/xorg/bin/Xorg (Xrealloc+0x33) [0x80a3f33] 6: /opt/xorg/bin/Xorg (0x8048000+0x1ab79) [0x8062b79] 7: /opt/xorg/bin/Xorg (0x8048000+0x1ac4e) [0x8062c4e] 8: /opt/xorg/bin/Xorg (RegisterExtensionNames+0x2ce) [0x8062fbe] 9: /opt/xorg/bin/Xorg (AddExtension+0x19a) [0x807bd7a] 10: /opt/xorg//lib/xorg/modules/extensions/libextmod.so (0x728000+0x1169a) [0x73969a] 11: /opt/xorg/bin/Xorg (InitExtensions+0x85) [0x80c0eb5] 12: /opt/xorg/bin/Xorg (0x8048000+0x1a51d) [0x806251d] 13: /lib/libc.so.6 (__libc_start_main+0xe6) [0x9d1bb6] 14: /opt/xorg/bin/Xorg (0x8048000+0x1a2a1) [0x80622a1] Segmentation fault at address 0x10b2d5f8 valgrind output: ==5069== Invalid read of size 4 ==5069== at 0x80F928D: FreePicture (picture.c:1531) ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) ==5069== by 0x807973E: CloseDevice (devices.c:840) ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) ==5069== by 0x8062705: main (main.c:309) ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) ==5069== by 0x80A3DE0: Xfree (utils.c:1154) ==5069== by 0x80F9332: FreePicture (picture.c:1576) ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) ==5069== by 0x80864F1: FreeWindowResources (window.c:846) ==5069== by 0x8086812: DeleteWindow (window.c:925) ==5069== by 0x806B53E: FreeClientResources (resource.c:806) ==5069== by 0x806B60F: FreeAllResources (resource.c:823) ==5069== by 0x80626E4: main (main.c:299) ==5069== ==5069== Invalid write of size 4 ==5069== at 0x80F9295: FreePicture (picture.c:1531) ==5069== by 0x818DDEF: miDCDeviceCleanup (midispcur.c:867) ==5069== by 0x81B97F0: miSpriteDeviceCursorCleanup (misprite.c:968) ==5069== by 0x80995FA: miPointerDeviceCleanup (mipointer.c:292) ==5069== by 0x807973E: CloseDevice (devices.c:840) ==5069== by 0x80799B6: CloseDownDevices (devices.c:933) ==5069== by 0x8062705: main (main.c:309) ==5069== Address 0x4cce844 is 12 bytes inside a block of size 84 free'd ==5069== at 0x40057F6: free (vg_replace_malloc.c:325) ==5069== by 0x80A3DE0: Xfree (utils.c:1154) ==5069== by 0x80F9332: FreePicture (picture.c:1576) ==5069== by 0x80FBB4B: PictureDestroyWindow (picture.c:69) ==5069== by 0x810B1A3: damageDestroyWindow (damage.c:1840) ==5069== by 0x80864F1: FreeWindowResources (window.c:846) ==5069== by 0x8086812: DeleteWindow (window.c:925) ==5069== by 0x806B53E: FreeClientResources (resource.c:806) ==5069== by 0x806B60F: FreeAllResources (resource.c:823) ==5069== by 0x80626E4: main (main.c:299) XTS test case: Xproto pAllocColor This reverts commit 00b8b7ad61b6f818271fb4d1e383113170309d72. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f7ef6fd9a1a1f48603df2796fe7c904c25a81077 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Apr 20 15:56:58 2010 +0300 xfree86: fix not reached code in tty code CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual page states the support for it though. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit b36eeb713a349961a6be8a6dd183ded6d27f9974 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Apr 20 16:26:02 2010 +0300 xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols move srv assignment to before it's being used. Also, check for xkb being nil. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 471f350c99b2e7c5a9045eef5ebff65cd2ddb7c5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 19 20:34:30 2010 +0300 exa: don't need to check for NULL pointer if we already assumed it has a value the alternative would be to check ps in the beginning of the function. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Michel Dänzer <michel@daenzer.net> commit 96784f4fcb6c2fb82f6d1abbd28ea1e189e4e6f5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 19 20:46:12 2010 +0300 xkb: check for NULL pointer before dereferences it in XkbAddClientResource Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 057c147541bde6f0cbe22ca069b43a97ddc95baf Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Apr 16 18:01:41 2010 +0300 Xi: check for NULL pointer before dereferences it in ListButtonInfo Both dev and dev->button are already used before their checking were being performed. So check on the beginning. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 7f457351d2a09013cd57fcb2f95c0d6f56bfaccb Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Apr 19 20:18:51 2010 +0300 xfree86: check for NULL pointer before dereferences it in parser code Seems to be harmless. Meh. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit d948dcd9555c81ccb378054383ef8da464202bdf Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Apr 16 17:08:09 2010 +0300 Xi: fix not reached code in XSendExtensionEvent Error was introduced in 31a7994a. I.e., broken since 2007. I guess nobody uses XSendExtensionEvent. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit f491b0aa5b86a5242fc4e04218202bbb52d0af39 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Apr 16 16:47:33 2010 +0300 xfree86: fix not reached code in parser ...because Error is a macro that returns NULL. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 099946a3ac94ff5e575e9edcecd26cf9f346b241 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Apr 16 18:35:55 2010 +0300 mi: check for NULL pointer before dereferences it in miPointerSetPosition Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 49835eec0c996ad95a01f0fe340336b6b60e51aa Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Apr 16 17:50:43 2010 +0300 exa: check for NULL pointer before dereferences it Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Michel Dänzer <michel@daenzer.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 996c115deb558e8e9490ea773528b8e96650df53 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Mar 25 18:17:54 2010 +0200 configure: remove unused builtin font macro from autoconf file This should be removed together with 49b93df8. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 0ba82562eeba8bf3bcd00b6e3ff28ce5b2c8df3c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Mar 30 19:10:36 2010 +0300 Death to Multibuffer extension The rationale behind is because no sane application will use this when we have modern APIs such DRI2. Besides, as a fact, xfree86 server has already deprecated this extension in 1998: http://www.xfree86.org/3.3.6/isc7.html Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 28b7b2b8d02d975480080865f0dddebcaa2f7968 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 19 09:26:10 2010 -0700 unifdef -B -DRENDER to always include RENDER code This patch was created with: git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done Signed-off-by: Keith Packard <keithp@keithp.com> commit b3ab978df861c08298f57529e3db980489055c35 Merge: a92b2c2c8 0ad022a72 Author: Keith Packard <keithp@keithp.com> Date: Sun Apr 18 22:01:40 2010 -0700 Merge remote branch 'whot/for-keith' commit 0ad022a729bafa56cc7b5d241f567444a34514ad Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 14 10:54:29 2010 +1000 xkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c The name XkbDDXFakeDeviceButton and XkbDDXFakeDeviceMotion is somewhat misleading, there's no DDX involved in the game at all anymore. This removes XkbFakeDeviceMotion and XkbFakeDeviceButton from the API where it arguably shouldn't have been in the first place. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit da4e2e382828d7ba460766709368ec6214b286dd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 14 09:48:53 2010 +1000 xkb: purge unneeded includes from ddxDevBtn.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit a92b2c2c8dd1e86ee852168146f01bdf72bfe2d0 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 16 05:55:35 2010 -0400 glx: Drop DestroyWindow hook Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to force a specific resource destruction order in the DestroyWindow hook. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Michel Dänzer <michel@daenzer.net> https://bugs.freedesktop.org/show_bug.cgi?id=26394 Signed-off-by: Keith Packard <keithp@keithp.com> commit 1da1f33f2dd5b437dd56cd9f5d6782de4ad5a1bc Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 16 05:55:34 2010 -0400 DRI2: Track DRI2 drawables as resources, not privates The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to. Right now, the glx drawable resource must be destroyed before the X drawable, so that calling DRI2DestroyDrawable doesn't crash. By making the DRI2 drawable a resource, GLX doesn't have to worry about that and the resource destruction order becomes irrelevant. https://bugs.freedesktop.org/show_bug.cgi?id=26394 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 22da7aa9d743deee198aaf6df5d370a446db9763 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 16 05:55:33 2010 -0400 glx: Let the resource system destroy pixmaps GLX pbuffers are implemented using a pixmap allocated by the server. With the change to DRI2 to track DRI2 drawables as resources, we need to make sure that every drawable we create a DRI2 drawable for has an XID. By using the XID of the pbuffer, the resource system will automatically reclaim the hidden pixmap and the DRI2 drawable when the pbuffer is destroyed or the client exits. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 16 05:55:32 2010 -0400 glx: Track GLX 1.3 style GLX drawables under their X drawable ID as well This ensures that the DrawableGone callback gets called as necessary when the X drawable goes away. Otherwise, using a GLX drawable (say, glXSwapBuffers) in indirect mode after the X drawable has been destroyed will crash the server. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f4106c02318fcc4b534224df5b95a58aff555fb4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 13 14:44:59 2010 +1000 xkb: use GPE for XKB fake motion events. Section 4.6.1 of the XKB spec says that "the initial event always moves the cursor the distance specified in the action [...]", so skip the POINTER_ACCELERATE flag for GPE, it would cause double-acceleration. Potential regression - GPE expects the coordinates to be either relative or both. XKB in theory allows for x to be relative and y to be absolute (or vice versa). Let's pretend that scenario has no users. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 6c42c8c356be305dc7f3f92ad8d58675da8c2f07 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 14 10:51:41 2010 +1000 xkb: Guard against SIGIO updates during PointerKeys. In theory, an event coming in during GPE could reset our lastSlave, leading to rather interesting events lateron. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 108457dff816569453a2d88cd72595fa7eb02479 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 13 14:41:07 2010 +1000 xkb: Post PointerKeys through the XTEST device. Posting an event through a master device may cause pointer jumps once lastSlave == master, caused by double scaling. To avoid this, post the fake event generated by XKB through the XTEST device instead. Fedora bug #560356 <https://bugzilla.redhat.com/560356> Tested-by: Andrew McNabb Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit a780e5b3638a0ff81301fc68aca15b47ba0befb7 Author: Benjamin Tissoires <tissoire@cena.fr> Date: Wed Apr 14 17:27:51 2010 +0200 xf86ScaleAxis: support for high resolution devices High resolution devices was generating integer overflow. For instance the wacom Cintiq 21UX has an axis value up to 87000. Thus the term (dSx * (Cx - Rxlow)) is greater than MAX_INT32. Using 64bits integer avoids such problem. Signed-off-by: Philippe Ribet <ribet@cena.fr> Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e424d5812300e82de375d83dc0b490a76d865016 Merge: 5b0faf355 0e7703f9b Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 15 15:01:34 2010 -0700 Merge remote branch 'whot/for-keith' commit 0e7703f9b1927328954a2fc87aac6be244819329 Author: Julien Cristau <jcristau@debian.org> Date: Tue Apr 13 22:28:36 2010 +0200 vfb: add a name and type to the pointer and keyboard Fixes a crash in XIQueryDevice which calls strlen on a NULL pointer. #0 strlen () at ../sysdeps/x86_64/strlen.S:31 #1 0x00000000004c16ed in SizeDeviceInfo (dev=0x969bd0) at ../../Xi/xiquerydevice.c:204 #2 0x00000000004c1a01 in ProcXIQueryDevice (client=0xa57510) at ../../Xi/xiquerydevice.c:98 Debian bug#575905 <http://bugs.debian.org/575905> Reported-by: "Bernhard R. Link" <brlink@debian.org> Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2f29b163bbdebe384c24f781bb97b446959e8f4c Author: Adam Tkac <atkac@redhat.com> Date: Mon Mar 22 14:52:29 2010 +0100 dix: Export AllocDevicePair GetPointerEvents, GetKeyboardEvents and generate_modkeymap functions from Xorg. Those functions are used by TigerVNC libvnc.so module which doesn't use standard XInput infrastructure but uses same functions like, for example, XTest devices. Signed-off-by: Adam Tkac <atkac@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 241b53b77750b5eea6759e79b23be4ff270a3d1f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 23 14:35:56 2010 +1000 mi: remove log-spamming bogus error message (#26843) miSpriteRealizeCursor is called whenever a device is set floating and it's fine to do so, no need for an error message. Same goes for the other miSprite messages. X.Org Bug 26843 <http://bugs.freedesktop.org/show_bug.cgi?id=26843> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00b8b7ad61b6f818271fb4d1e383113170309d72 Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Wed Apr 7 13:52:47 2010 -0700 mi: don't thrash resources when displaying the software cursor across screens This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures for each pScreen instead of failing to thrash between them when changing screens. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5f31e2196179f8db3170d65a17d8ad40da1acb0d Author: Tim Yamin <plasm@roo.me.uk> Date: Mon Mar 8 12:45:15 2010 +1000 dix: fix cursor screen check for xinerama setups. The de-duplication of CheckPhysLimits 942eae6868b8b0f343b6a added a condition that is invalid for a Xinerama setup. pScreen is invalid for the Xinerama case, so comparing it to anything is a bad idea. Signed-off-by: Tim Yamin <plasm@roo.me.uk> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5b0faf355465c9f21ad96e0ed266fbdbc29efb5b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 15 10:55:53 2010 -0700 XQuartz GLX: Don't let garbage enter our pixel request https://bugs.freedesktop.org/show_bug.cgi?id=27654 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit fe7778e58e099d353689755ed2f5aa440569ebe3 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Apr 14 09:06:04 2010 -0700 XQuartz: Fix possible NULL dereference in ListenOnOpenFD <rdar://problem/7862319> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Marc Majka <majka@apple.com> commit 206531f75cd41c034e89fdfbc75ab0910682eef8 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Apr 13 14:33:49 2010 -0700 XQuartz: Localization update Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 9ddbb03fa56aa73c3f417d8ee6433e45b94445b3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 14 17:43:22 2010 +1000 dix: Fix crash in DeliverGrabbedEvents. If both devices are synchronously grabbed, first with a GrabPointer, then with a GrabKeyboard (GrabModeSync on both), sync.other of each device points to the grab of the respective other device. If the keyboard is then thawed through a AllowSome request, the VCK's sync.other is reset to NULL. Subsequently, an event on the VCP would crash the server when dereferencing sync.other on the VCP. The check's purpose is to compare if the other device is grabbed by the same client, which should be checked by accessing (dev->deviceGrab->grab->resource). A check of the server-1.3 sources confirms that. XTS test case: Xlib13 XAllowEvents 20. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7b6517526631a65891b806bca30be8f49955d0a8 Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Apr 14 19:28:37 2010 +0200 EXA: Check sys_ptr isn't NULL before passing it to the UploadToScreen hook. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27510 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fc5d76740851725e3788c68e14474a012a205892 Author: Julien Cristau <jcristau@debian.org> Date: Tue Apr 6 11:51:53 2010 +0200 XGE: don't register an extension event The GenericEvent is a core event, we never send an extension event, so don't reserve an id for one. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0b676acd47e0d6a675df374b42ddb200deab5d06 Author: Julien Cristau <jcristau@debian.org> Date: Tue Apr 13 11:45:41 2010 +0200 Bump version in configure.ac Signed-off-by: Keith Packard <keithp@keithp.com> commit 1760d2bef9f5b248cb2332f6ebf0220eb02bab42 Author: Kristian Høgsberg <krh@bitplanet.net> Date: Fri Apr 9 10:58:48 2010 -0400 glx: Set the pbuffer bit for dri2 fbconfigs They've been implemented for a while, but we never advertised them. All we need to do is set the GLX_PBUFFER_BIT in the drawable type fbconfig field when we're using DRI2. https://bugs.freedesktop.org/show_bug.cgi?id=26581 Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ab60975fe28cb135b4183c57b7f50d3615921c1f Merge: adbbc6610 59edde7c2 Author: Keith Packard <keithp@keithp.com> Date: Mon Apr 12 21:40:41 2010 -0700 Merge remote branch 'jeremyhu/master' commit 59edde7c28db2d3174a5813a0af334e4ead2082f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 9 16:19:43 2010 -0700 XQuartz: Add a GUI preference for the Alt / Mode_switch toggle Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com> commit 5600f7f001529b3afdee95546aec212a70d6a5b2 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 9 13:33:06 2010 -0700 XQuartz: Customize the NSDefaults id in the man file. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com> commit 840d12c7a6ac6a974da185045215ce944a61fab6 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Apr 9 13:29:34 2010 -0700 XQuartz: Add a defaults option to toggle Alt / Mode_switch See option_sends_alt in Xquartz(1) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com> commit d6f160510a50d4c4eaa48c9c69a5ddda0d50052c Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Apr 5 16:54:22 2010 -0700 XQuartz: Blacklist some oddball legacy Mac keycodes that break wine http://xquartz.macosforge.org/trac/ticket/295 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Reviewed-by: Kevin Van Vechten <kvv@apple.com> commit adbbc661080ba4efdb764c154d40c4d2fe718e16 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Feb 16 08:11:41 2010 -0800 xfree86: Fix priority ordering for ignoring input classes Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority ordering of the InputClass option merging to be "last match wins". This fixes the handling of Option "Ignore" to follow that logic. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit d7c98c1c81ae272f66edb05fde20f4c616604add Merge: 82cf3a4ae 03ccbd257 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 7 22:25:51 2010 -0700 Merge remote branch 'whot/for-keith' commit 03ccbd2579948d11e5f16f88cdf68a55f57c9d26 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 8 13:47:26 2010 +1000 xfree86: remove dead input drivers from xorg.conf man page. These drivers have been deactivated for over a year now, let's not refer potential users to them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d4dd3d0085f8eaca8c989aaeace1a1a24c5ebf49 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Apr 3 09:33:51 2010 -0700 Move 10-evdev.conf to system config dir $datadir/X11/xorg.conf.d Since the server searches in a vendor specific path now, we can install the evdev catchall there without disturbing local administration files. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 95f01bdfee8241371675f0089170fa6b2908d815 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Apr 3 10:08:25 2010 -0700 xfree86: Search for a system xorg.conf.d In addition to the conf files found in /etc/X11 or $sysconfdir/X11 used for local administration, we also reserve a system directory for vendor and package usage. The simple search path is: /usr/share/X11/xorg.conf.d $datadir/X11/xorg.conf.d Files from these directories will have the lowest config priority. The directory $datadir/X11/xorg.conf.d is exported from xorg-server.pc in the variable "sysconfigdir". Packages should install their .conf files to the directory specified by: `pkg-config --variable=sysconfigdir xorg-server` Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a1bae63dc634a5a79861eab128c63506081f7ed9 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Apr 3 09:33:49 2010 -0700 xfree86: Set a saner search path for xorg.conf.d There's no reason to carry all the oddities from xorg.conf like appended hostname to the search path for xorg.conf.d. This changes it to something very simple: /etc/X11/<cmdline> $sysconfdir/X11/<cmdline> /etc/X11/xorg.conf.d $sysconfdir/X11/xorg.conf.d Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2ac33888a9a5766aaf88bc92a8bd1d489873524c Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Apr 3 09:33:48 2010 -0700 xfree86: Document how -configdir affects the xorg.conf.d search path Explain the "safe" path dance for -configdir, too. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2460e921d18fd264e6f6374be0908f4100442650 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Apr 3 09:33:47 2010 -0700 xfree86: Allow adding sysconfdir and datadir to config search paths We could just use $projectroot/etc and $projectroot/share, but the user might have other plans for them. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c8a608cb6ce8f9c86258c1ab49084f691fa9cc51 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 7 10:04:38 2010 +1000 config: only match sane devices in 10-evdev.conf Having a generic catchall also adds devices like accelerometers. These devices make X unusable, hence restrict matching to "known sane" devices like pointers, touchpads, keyboards, tablets and touchscreens. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: James Cloos <cloos@jhcloos.com> commit 6b09f66d8c6ebcee70382b5cca1ba82b68f20afa Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Fri Apr 2 12:48:21 2010 -0700 Don't keep a pointer to a possibly freed cursor when changing screens, preventing a crash in xf86CursorEnableDisableFBAccess() trying to restore it. Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 82cf3a4ae01811917f7903d6f62ba9b7132adf7e Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Tue Apr 6 15:52:18 2010 -0700 Convert x86emu fixed size int typedefs to use stdint types Fixes x86emu builds when using non-gnu compilers now that u64 is required Before this fix, the u64 type would not be defined, causing x86emu/sys.c to fail to build: "sys.c", line 102: syntax error before or at: ldq_u "sys.c", line 102: syntax error before or at: * Since Keith requested using <stdint.h>, converted all the x86emu typedefs to use the stdint types. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a9fe7cfa77ccee64d68732dc3f37d35cbfc27a65 Author: Paulo Ricardo Zanoni <pzanoni@mandriva.com> Date: Thu Mar 11 14:28:18 2010 -0300 dix: be more verbose when we run out of opcodes If we run out of opcodes, nothing is print on the log, making the problem hard to debug. In the current Xserver, if you enable some extensions like multibuffer (+2 events) and use nvidia binary driver (+5 events) you can run out of opcode numbers. Signed-off-by: Paulo Ricardo Zanoni <pzanoni@mandriva.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6150595bdbacde13bb4f9aba81b15435089bee94 Author: Gaetan Nadon <memsize@videotron.ca> Date: Mon Apr 5 19:12:22 2010 -0400 doc: specify 1.6.1 as the minimum version for doxygen. Older versions generate filenames that are different from the ones listed in the Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit cbda58c963af5bb9c4643e9017dd4eec589ceff3 Merge: a7698a677 c983f40fe Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 7 15:51:38 2010 -0700 Merge remote branch 'yselkowitz/master' commit a7698a677682a32960b885c22fdba2add70f4658 Merge: 495cec794 165a4a9c7 Author: Keith Packard <keithp@keithp.com> Date: Tue Apr 6 12:36:15 2010 -0700 Merge remote branch 'jbarnes/master' commit c983f40fe4f30311f31a9df699cdc888709251d0 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Feb 24 15:17:42 2010 -0600 Cygwin/X: Add configure option for WindowsWM WindowsWM support is still experimental, and uses the Rootless extension which currently breaks the simultaneous build of the other DDXs (see commit b3415187e92960cbff784108b5a3a8d130dc34c5). So we disable it by default for now; once the latter issue is fixed we can make this 'auto'. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> commit 20701522be803fe47e921fcf059dadf64c7f287d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Feb 18 14:19:21 2010 -0600 Don't enable ROOTLESS_WORKAROUND, it breaks composite This possibly brings back whatever the bug is in http://bugs.freedesktop.org/show_bug.cgi?id=1168 for -rootless mode, but since we don't have reproduction steps for that, I can't test that... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> commit 95c9947f6244d37592958b70760bd1ac885b625a Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 24 00:08:23 2010 -0500 Cygwin/X: Disable unsupported extensions in configure Several extensions are not supported by XWin, some of which are enabled by default in configure. We forcefully disable these early on so that configure will succeed without arguments and without the corresponding proto installed. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> commit 24c9d48cd6999f1e90f9f0e2bbfebd8e95d314d8 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Mar 22 12:47:52 2010 -0500 Disable setuid configure test on Cygwin Only Xorg is installed setuid, so there is no need to run this configure test on Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> commit 495cec794dad95ed0c79048f3c410ad23e7d5ea4 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 2 00:14:23 2010 -0700 xserver 1.8.0 Signed-off-by: Keith Packard <keithp@keithp.com> commit b9ad452ec92a7dcbed680acb3f3b8ec29fa660df Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Apr 1 18:57:50 2010 +0300 xfree86: die gracefully in the vga arbiter if AddScreen fails vga arbiter will be locked in one device while AbortDDX will call LeaveVT routines from the other device. Fail! Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e75f202e7768b7cc0eb2ad0e0f3f51ea81cd7275 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 24 11:08:55 2010 +1000 configure: enable udev backend as "auto" Due to the checks in configure, this means it gets priority over HAL if libudev is found. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 24952b786625fef808cb26d539dd5109d623c053 Author: Keith Packard <keithp@keithp.com> Date: Thu Apr 1 23:44:24 2010 -0700 Install 10-evdev.conf in $(prefix)/etc/X11/xorg.conf.d under udev udev needs some xorg.conf file to tell it to load a suitable input driver, 10-evdev.conf is as simple as they come, mapping all evdev devices to the evdev driver. Signed-off-by: Keith Packard <keithp@keithp.com> commit 02328f190f893cb4ad0f3af7a2ecd39ed77ae5ad Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 1 18:21:51 2010 -0700 Bump bundle version to 2.5.1 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 0e342add7768df55a1917e27f9b85feddd444e82 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Apr 1 15:30:46 2010 -0700 darwin: Correct inline assembly for ___crashreporter_info__ It was missing an underscore. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 67b814d9b2baea6beccfb1625a1e3f0b2ba7218b Author: Ruediger Oertel <ro@suse.de> Date: Mon Mar 29 00:23:40 2010 +0200 Remove now obsolete function chooseVideoDriver Signed-off-by: Keith Packard <keithp@keithp.com> commit 1dd5fbc5a4d860af1c102b33e04dedd8c72617a1 Author: Ruediger Oertel <ro@suse.de> Date: Fri Mar 26 09:33:20 2010 -0700 xfree86: Handle driver autoconfiguration when .conf files exist When doing driver autoconfiguration with some parts of the config file present but no driver set (e.g. only input configuration) fix the case that we may have multiple drivers to try. Create a screen section for each driver and let them be tried in a row. Signed-off-by: Ruediger Oertel <ro@suse.de> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Timo Aaltonen <timo.aaltonen@aalto.fi> Signed-off-by: Keith Packard <keithp@keithp.com> commit 57cb1a854a1b6d91d214b3fa250a7df2ed20d433 Merge: 4b3d67a76 28a5f14b4 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 29 11:46:00 2010 -0700 Merge remote branch 'jeremyhu/master' commit 4b3d67a7647f696957727948f9757a261e15d14e Merge: 579715f83 aa9150835 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 29 11:44:07 2010 -0700 Merge remote branch 'whot/for-keith' commit 165a4a9c7de0fcc6ef6a6421736b412ccb35965e Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Mar 23 09:47:08 2010 -0700 GLX/DRI2: expose swap control extensions if DDX support is present Export DDX swap control status from the DRI2 module and check for it in GLX when initializing extensions. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 5933b0abc6a76aaea84aa534df89900cd795c888 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Mar 8 15:10:47 2010 -0800 DRI2: prevent swap wakes from waking MSC waiters If a few swaps were queued leading to a throttle related block on the client, and then the client submitted an MSC wait, one of the previous swap wakeups could have caused the MSC wait to complete early. Add a flag for this to prevent a swap wake from prematurely waking an MSC waiter. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit b00d435ddf2e9817e33bfd5f7e9b905442dc23c7 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Mar 8 12:41:25 2010 -0800 DRI2: handle swapsPending better Avoid a potential swapsPending underflow by incrementing it before ScheduleSwap, which may complete it immediately. And be sure to decrement it again in case the schedule failed. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 0294ff2a5cadddc8fcc77ba9a851f979f0b91fc3 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Mar 8 12:39:54 2010 -0800 DRI2: throttle swaps at submission time too We need to throttle swaps here in addition to when the context is made current to avoid causing problems with clients that just swap. Throttling here also ensures our swaps get ordered as long as we block the client occasionally. Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit db1c7cb604167baf49e61be4c09ccf7b592c4af3 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Mar 8 12:38:37 2010 -0800 DRI2: advertise lowest supported DRI2 protocol version Update our supported DRI2 protocol version as each driver does DRI2ScreenInit, since depending on available kernel features, each DDX may support different callbacks and therefore protocol. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 87ca6320f26eb3129e3c19056e1d8fa5c1784723 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Mar 5 09:49:03 2010 -0800 DRI2: handle swap_interval of 0 correctly A 0 swap interval means that swaps shouldn't be sync'd to vblank, so just complete the swap immediately in that case. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 8476d99231cb725c090305d60f1c1c889d25c8dc Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Mar 5 09:15:24 2010 -0800 DRI2: drawable lifetime fixes Handle drawable destruction and lifetime correctly. Check whether the drawable priv is valid in DRI2SwapInterval(), DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to check it before using it. If more than 1 outstanding swap is queued, we may complete several after an app has exited. If we free it after the first one completes and the refcount reaches 0, we'll crash the server on subsequent completions. So delay freeing until all swaps complete and remove the error message as this is a normal occurence. To do this properly, we must also avoid destroying drawables in DRI2DestroyDrawable() if a swap or wait event is pending. And finally, make sure we free drawables in DRI2WaitMSCComplete() if necessary (i.e. if the refcount has reached 0 and this MSC was the last pending event on the object). Reported-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit b180e43977710b56ccfd6780f204ddcc952987a1 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Mar 4 10:31:59 2010 -0800 DRI2: fix swapbuffers handling of SBC and target MSC Returns expected SBC after completion of swap to caller, as required by OML_sync_control spec, instead of the last_swap_target value. Passes target_msc, divisor, remainder, correctly for glXSwapBuffersMscOML() call, while retaining old behaviour for simple glXSwapBuffers() call. An OML swap can have a 0 target_msc, which just means it needs to satisfy the divisor/remainder equation. Pass this down to the driver as needed so we can support it. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> commit 751e8c09d34df4b41e8d8384a3ec1bf5cb8ca028 Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Date: Sun Feb 21 05:26:00 2010 +0100 DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML() Added implementation for case target_sbc == 0. In that case, the function shall schedule a wait until all pending swaps for the drawable have completed. Fix for non-blocking case. Old implementation returned random, uninitialized values for (ust,msc,sbc) if it returned immediately without scheduling a wait due to sbc >= target_sbc. Now if function doesn't schedule a wait, but returns immediately, it returns the (ust,msc,sbc) of the most recently completed swap, i.e., the UST and MSC corresponding to the time when the returned current SBC was reached. Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> commit 0de4974b90b10fa6a447cdf980b4a114c6c9e5a8 Author: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Date: Sun Feb 21 05:25:59 2010 +0100 DRI2: Fix glitches in DRI2SwapComplete() and DRI2WakeupClient() DRI2SwapComplete(): Increment pPriv->swap_count++; before calling into callback for INTEL_swap_events extension, so the swap event contains the current SBC after swap completion instead of the previous one. DRI2WakeupClient: Check for pPriv->target_sbc <= pPriv->swap_count, had wrong comparison pPriv->target_sbc >= pPriv->swap_count for unblocking of clients of DRI2WaitSBC(). Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> commit 4c8ec49826a46eb3b36c69d2ad3f82320c179c38 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Mar 4 09:54:15 2010 -0800 DRI2: make target_sbc signed We need to track invalid targets as well as 0 targets, so just make it signed so our comparisons work like they should. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Reported-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit c4d54816f2ee4883d8f9bcf4595474fb58c95146 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Mar 4 09:19:13 2010 -0800 DRI2: fixup handling of last_swap_target We need to initialize the swap target, which is passed to the driver to schedule events. Rather than using -1 to indicate that the field is uninitialized, just make sure we initialize it at drawable creation time. Reviewed-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 28a5f14b4089dccb8045cc4fdc923542a73dd22d Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sun Mar 28 13:46:23 2010 -0700 XQuartz: Re-query dixScreenOrigins as the value could've changed. Fix a regression in 9c9c3a85b094a3c7b2763a572715d710325091aa Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com> commit 436d0bb9cca122bfdde32902b683d2499f61e6fc Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Mar 27 17:35:10 2010 -0700 darwin: Generate crash reports on FatalError() Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com> commit 73b3b67aac9f3938a96cb8822b9c270bd82ded5c Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Mar 22 09:30:51 2010 -0700 GLX: Remove a redundant initialization Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com> commit 339207be6f184cc783076fc7e2cc12f92f57f2ba Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Mar 25 22:15:58 2010 -0700 XQuartz: Workaround weird key data reported on some layouts This should make 'Unicode Hex Input' work as an input layout. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Acked-by: Adam Jackson <ajax@redhat.com> commit aa91508356f243edc3b11795b1481edcfe0d39c2 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Mar 24 23:18:35 2010 -0700 config/udev: Prefer product name from attribute rather than uevent The input device product name for evdev devices in the kernel uevent has embedded quotes that aren't expected here. Use the sysfs name attribute instead, which does not suffer this problem. The uevent name will be used as a fallback if no name attribute is found. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d00c3298a698ddddc8967215cef7dd941fa15804 Author: Fernando Carrijo <fcarrijo@yahoo.com.br> Date: Wed Mar 24 20:11:34 2010 -0300 Cleanup some comments in SpriteRec Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 70bd02f2ea3a91c0340df97ca3b8a4f9400f6f46 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 23 12:13:56 2010 +1000 xfree86: merge driver from the input class into the options. A driver that is assigned by an input class is only present as idev->driver. The driver itself has no access to this information once PreInit is called. For devices that rely on chain-hotplugging (wacom), this means that for the second device the driver information is lost and the second device cannot be initialized through NewInputDeviceRequest. Although this could be worked around by hardcoding the driver name in the wacom driver, having the assigned driver in the options seems like the better solution. This issue only manifests itself with the udev backend. With HAL, the driver is assigned by HAL and the option is duplicated in config/hal.c. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 579715f830fbbca9e1ecb17dc18176132f5969e7 Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Date: Wed Mar 17 12:16:57 2010 +0200 os: Prevent backtrace from being stopped in noreturn functions. There are two noreturn functions in the X server: FatalError and AbortServer. Having any of those two functions in the middle of a call stack will prevent unwinding the program properly and stops the backtrace at those functions in gdb. The file containing FatalError and AbortServer, os/log.c, has to be compiled with the -mapcs-frame option on ARM to get proper backtraces. Automake imposes its own restrictions on compiling individual source files with different options. The recommended way to do this is to put os/log.c into a convenience library and add this library inside os/libos.la. See the documentation of GNU Automake manual, version 1.11.1, section 27.8 Per-Object Flags Emulation, for details. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit e086b99c1f5ce351b578de7cd9f616bc79d6cf64 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Tue Mar 23 01:03:53 2010 +0600 kdrive: Bump evdev maxKeycode There are keycodes > 193 in evdev, e.g. KEY_WIMAX which is 246 . Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@nwnk.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 185185eeb44a277c324be0f58a4b4a469b56b69b Author: Peter Harris <pharris@opentext.com> Date: Tue Mar 23 12:08:19 2010 -0400 Fix crash when all glyphs of a given depth are freed, but not all glyphsets This is how the crash can be triggered with only two clients on the system: Client A: (already running) Client B: Connect Client B: CreateGlyphSet(depthN) Client A: Disconnect Server: free globalGlyphs(depthN) Client B: AddGlyphs(depthN) Server: SEGV This crash was introduced with the FindGlyphsByHash function in 516b96387b0e57b524a37a96da22dbeeeb041712. Before that revision, ResizeGlyphSet was always called before FindGlyphRef, which would re-create globalGlyphs(depthN) if necessary. X.Org Bug 20718 <http://bugs.freedesktop.org/show_bug.cgi?id=20718> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8311cd5f89ca6781842bb24671b8122cdf8be148 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Mar 23 10:37:36 2010 -0700 XKB: Fix garbage initialization XkbEnableDisableControls set extra garbage bits on the xkbControlsNotify changedControls mask because it was uninitialized on the stack. Found by clang Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0ecfab89d1754b0b7e32b3964b40663d1810cd62 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 22 14:04:09 2010 +1000 xfree86: remove if 1 from the dawn of time. 7+ years for an if 1 should be enough to just admit that there's no other option. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com> commit 6389405b56d2221d8a7b80c4bb3bd3b4e1a29bab Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 22 09:20:49 2010 +1000 configure: Always define XINPUT. This define was removed in e251c9e75afdc "Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac". Drivers that support multiple server versions and still check for ifdef XINPUT now always build without XINPUT support if they're calling XORG_DRIVER_CHECK_EXT(XINPUT, inputproto). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 0c2fde5c8ad6e94b4ed1588aa93256a2b64f74d9 Author: Tomas Carnecky <tom@dbservice.com> Date: Mon Mar 22 11:20:15 2010 -0700 Fix typos in the swap functions This should fix bug #3539. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 3083c5d0c4386cdd7083b7a83ac72fdad2f1e61e Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Mar 22 18:01:17 2010 +0100 Xext: Fix cursor reference counting hazard. Make sure the reference count of the new cursor is increased before the old one is decreased, otherwise bad things will happen if they're one and the same and the reference count is 1 initially. Not sure this can actually happen here, but better safe than sorry. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b29220dc765cb6f878c5466e00e4bd21f3bd803d Merge: c3da76643 ed31d50b5 Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 21 23:01:58 2010 -0700 Merge remote branch 'jeremyhu/master' commit c3da76643aeebdd24047e3e14a860507eac37ec3 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 18 23:19:20 2010 -0500 Cygwin/X: Make X -> XWin symlink during install Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit abf4e0b7e349b0238b2b97a16b8a308b5026af31 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Mar 22 00:44:28 2010 -0500 New header for XF86Bigfont server functions Xext/xf86bigfont.c contains three non-static functions which are called elsewhere in the server. This creates a new header containing these declarations in order to fix several warnings: xf86bigfont.c:285: warning: no previous prototype for `XF86BigfontFreeFontShm' dixfonts.c:502: warning: implicit declaration of function `XF86BigfontFreeFontS$ dixfonts.c:502: warning: nested extern declaration of `XF86BigfontFreeFontShm' log.c:436: warning: implicit declaration of function `XF86BigfontCleanup' log.c:436: warning: nested extern declaration of `XF86BigfontCleanup' Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 57a049ea89b008c0b60316c3b6e6ff5c8fbd4cad Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Mar 18 04:46:20 2010 -0500 Xext: fix old-style function definitions in xf86bigfont.c Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 822b9f9a3e822df8848995eda246f83864d1366f Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Sun Feb 21 01:24:44 2010 -0600 mi: remove deprecated #include <X11/extensions/xf86bigfstr.h> in miinitext.c Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 946b49ebcbf47e030a6e00ce1a699f3b055f638a Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 17:37:05 2010 -0500 Catch errors in recursive relink targets If make relink fails in a subdirectory, we need to catch the error otherwise make will continue iterating the 'for' loop. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 0820a6e2fb005b5f856dda25e1644f34fc994129 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 13:40:41 2010 -0500 Fix .man.N targets for AM_SILENT_RULES Add $(AM_V_GEN) for sed-based rules so they appear as expected with automake silent rules, and $(AM_V_at) to completely hide cp/ln/rm commands which are not prone to fail. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 9be4157391edf0c5fc4ee36adfb1eb1c3bdb8e3b Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 13:33:39 2010 -0500 Respect value of SED from configure We now use libtool, which calls AC_PROG_SED and sets SED as the path to a fully-functional 'sed' (which may also be called 'gsed' if GNU sed is installed alongside a proprietary version). Therefore we should respect the value of SED so we are sure to use the correct one. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 5e00f464c546debf9164f24c6d648623f7ee5946 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 14:56:24 2010 -0500 Fix relink targets for silent rules Add $(AM_V_at) to all relink make targets to silence them when automake silent rules are in use. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit fa7e062962d17862032bc600bfcffd486addb063 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 13:52:38 2010 -0500 Use EXEEXT in relink rules for portable DDXs On Cygwin and MinGW, executables use the .exe suffix. Autoconf and automake set EXEEXT on these platforms, and leave it empty on others where no suffix is used. $(EXEEXT) must be appended to executable names in custom rules for portability: http://www.gnu.org/software/automake/manual/html_node/EXEEXT.html Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 037869d7b876f43158df88d63788b93a5d6187c1 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Mar 17 13:48:49 2010 -0500 kdrive: Use $(MAKE) in relink rules Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Julien Cristau <jcristau@debian.org> commit 8e5de45513577c63a33833931f2afd0cc59d42a7 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Feb 24 02:56:59 2010 -0600 Use libtool -export-dynamic flag for portability The linker flag required for exporting symbols in executables varies by platform. libtool handles this with a single -export-dynamic flag (not to be confused with the similarly-named ELF linker flag) which tells it to use the correct platform-specific flag at link time. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 2a11ffa977d2267d8b2f27b76490a98e9c73b8c7 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Fri Feb 19 14:31:28 2010 -0600 Rename xdmx client to dmxinfo The DMX Xdmx server and xdmx client cannot both be installed on case-insensitive file systems. The client is undocumented and so renaming it is the best option. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit fbb4903eaa23174d21ab8c640d9de1fe3eb17539 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Sun Feb 21 02:08:08 2010 -0600 Cygwin/X: Fix windres rule for automake silent rules Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Rémi Cardona <rem@gentoo.org> Reviewed-by: Keith Packard <keithp@keithp.com> commit 8db894690988f2bac9c0acb96fd39811d2b42f47 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Fri Feb 19 00:05:28 2010 -0600 Cygwin/X: Fix make dist after 11252ed82e1f361b99e86521ac9314f868bd1a3a Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Acked-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit ed31d50b5f7f25e4db986711699704e615b8afcb Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Mar 19 17:24:27 2010 -0700 XQuartz: Constrain the pointer to the updated display bounds on display reconfigure. http://xquartz.macosforge.org/trac/ticket/346 commit 927480be12ff61deb4e8120d2f90ddef3a1a6beb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Mar 20 11:03:28 2010 -0700 XQuartz: pbproxy: Make standalone xpbproxy respect the launchd prefix Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit d16bc8a3cdbe0e8b9cba836c7aa2ff7c0458049e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Mar 20 03:28:57 2010 -0700 XQuartz: xpbproxy: Cleanup xpbproxy threading Confine xpbproxy to a single thread Runs inside its own CFRunLoop Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 9c9c3a85b094a3c7b2763a572715d710325091aa Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Fri Mar 19 17:23:12 2010 -0700 XQuartz: Minor cleanup Move RandRInit to where it will need to be (not yet implemented) Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit bb75d0df8b5238bfe8b011bb5737fae2a3584290 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Mar 19 15:26:50 2010 -0700 XQuartz: GLX: Fix Availability for Tiger ppc workaround Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit eac7cdabecafb7c505795207182ab2578d672c06 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Tue Mar 16 11:29:08 2010 -0700 Revert "XQuartz: Explicitly pass a bellProc to make XBell() work again." I'm not quite sure why this was necessary, but DDXRingBell is being called from CoreKeyboardBell, so we don't need a separate bellProc which would result in multiple rings. This reverts commit 9071b0d69748cfa7ecca17b4cb0e431bbb0ef2a4. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 13c007f9224ad871193e40466e64df1477ed26b0 Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 21 17:23:46 2010 -0700 Bump to 1.7.99.902 -- 1.8 RC2 commit 235fa5030428084368e5be57fca695647b7b79c4 Merge: 1c612acca fa5103a02 Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 21 15:38:40 2010 -0700 Merge commit 'fa5103a02bd509e4a102afdad2ab26cb22210367' commit 1c612acca8568fcdf9761d23f112adaf4d496f1b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 17 14:32:38 2010 +1000 dix: if owner-events is true for passive grabs, add the window mask (#25400) A client requesting a GrabModeSync button grab, owner-events true, with only the ButtonRelease mask set would never receive the press event even if the grab window had the ButtonPress mask set. The protocol requires that if owner-events is true, then the delivery mask is the combination of the grab mask + the window event mask. X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jim Ramsay <i.am@jimramsay.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 95ca39b981624df5338a16b506289014c431ae82 Merge: e7ff95663 bf181915e Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 21 15:24:06 2010 -0700 Merge remote branch 'jturney/master' commit e7ff956638780dc1c6f160a1fd041b92cebff9ac Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Mon Mar 15 23:46:36 2010 +0200 common: xf86Configure: alloc_strlen: Allocated memory does not have space for the terminating NUL of the string buffer_alloc: Called allocating function "realloc" which allocated memory dictated by parameter "len + strlen(displaySize_string)" alloc_strlen: Allocated memory does not have space for the terminating NUL of the string var_assign: Assigned "ptr->mon_comment" to storage allocated by "realloc(ptr->mon_comment, len + strlen(displaySize_string))" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit aeae6637b52b042cf8b07c6943abcd5d31968d49 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Mon Mar 15 23:46:34 2010 +0200 fb: fbFinishScreenInit: leaked_storage: Variable "(visuals|depths)" goes out of scope Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d9ee31ab05efbd2d598cc93a41a8834f84d30803 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Mon Mar 15 23:46:33 2010 +0200 exa: exaFinishAccess: Overrun of static array "pExaScr->access" of size 6 at position 6 with index variable "i" Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit bf181915e103b0659c5a0bc3b2f6bccb18c9ec36 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Feb 1 17:11:51 2010 +0000 Cygwin/X: Allow the default log location to be configurable Allow the default log location to be configurable (e.g. /var/log), and use separate logs for each display instance (e.g. XWin.0.log). Make the type of g_pszLogFile const char*, per os/log.c:LogInit(). Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit cca4952d750779a4c58a11fe08a53336042930bb Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Feb 26 14:40:30 2010 +0000 Xming: Warning fixes Fix warnings due to prototypes not specifying function arguments Fix warning with RegQueryValueEx() Tidy up an include Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b8cf4153f84404b2a1b62a247d5d36d24bf481da Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Feb 26 14:41:00 2010 +0000 Xming: Dead code removal Remove some dead code, mostly code made obsolete by mandatory XKB Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9b18f7ac0ba9aadb8c86bc2717cbdff75e951b69 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Feb 26 14:22:57 2010 +0000 Cygwin/X: Tidy up some cosmetic issues in log strings Tidy up some cosmetic issues in log strings: - Add missing '\n' - Fix some strings starting with '\n' - Remove '\f' from some log strings These all just look daft in a log with timestamps. Also clarify log message about screen origin coordinates Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 178e830378c3514b9c53a5b1c6d2d5f930c3779b Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Feb 22 19:13:30 2010 +0000 Cygwin/X: Fix thinko in mount option checking Fix a thinko in mount option checking. Use symbolic names for values assigned to binary flag for clarity. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit fa5103a02bd509e4a102afdad2ab26cb22210367 Author: Francisco Jerez <currojerez@riseup.net> Date: Wed Feb 24 23:18:01 2010 +0100 dri2: No need to blit from front on DRI2GetBuffers if they're just being reused. It can be quite an expensive operation, so we're better off not doing it unless it's totally required. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit e38e01081af42825bb7b44d18aa35845318f8556 Author: Francisco Jerez <currojerez@riseup.net> Date: Wed Feb 24 23:18:00 2010 +0100 Import linked list helpers from the intel DDX. Borrowed from i830.h, except for list_for_each_entry(). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit b8a3be5f34016b745e38cd53825a4e398c6127bc Author: Francisco Jerez <currojerez@riseup.net> Date: Wed Feb 24 23:17:59 2010 +0100 Add a ConfigNotify hook. Executed from the ConfigureWindow request, right before sending ConfigureNotify to the clients. This commit breaks the ScreenRec ABI. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> commit 67a8c659f25218904bae64aac6e98e326c90330b Author: Roland Scheidegger <sroland@vmware.com> Date: Fri Mar 12 16:53:30 2010 +0100 hw/xfree86: move reference counting out of the UseHWCursor[ARGB] functions The problem is that the xf86_use_hw_cursor(_argb) functions may get this correctly now, some drivers will replace these generic versions with their own functions. It is pretty insane to expect them to do reference counting of the cursor (as an example, look at driver/xf86-video-vmware to see how that looks like as a workaround). There are even places in xserver itself which replace these two functions. The segfaults if no reference counting is done are caused because the reference count of the cursor reached zero, hence the cursor was freed, however xf86CursorEnableDisableFBAccess() brought it back to life from the dead (from the SavedCursor). This patch hence adds reference counting in xf86CursorSetCursor. As per Michel Daenzer's suggestion, also free the cursor upon xf86CursorCloseScreen. In theory with this it should be possible to remove the reference counting in the UseHwCursor functions I think, though it should also be safe to keep them. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 75efb46a14fe45ffe73faff637b1fa6d017e1e52 Author: Roland Scheidegger <sroland@vmware.com> Date: Fri Mar 12 16:52:56 2010 +0100 hw/xfree86: fix refcounting in xf86_use_hw_cursor This is the same fix as was done in fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 for xf86_use_hw_cursor_argb. Signed-off-by: Roland Scheidegger <sroland@vmware.com> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit df9b6f16b27398545cd4cff8a56dd59a3813351d Merge: 5f169f549 5172253ba Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 15 08:26:58 2010 -0700 Merge remote branch 'jeremyhu/master' commit 5f169f54936c9868ad0f3778cb95c1f35eef41ea Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Mar 5 10:35:54 2010 -0500 XQuartz: remove undefined XSERVER_CFLAGS variable This is a variable local to configure.ac which is not AC_SUBST() It is undefined in any generated Makefile. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5172253bae3b9867118c6717434e73c173acd5e9 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Feb 10 15:52:14 2010 -0800 XQuartz: Use an empty xkb keymap by default Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit b117bc7a441bec8f61610fb384d747112f73d236 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Mar 11 00:06:01 2010 -0800 XQuartz: Include os.h for OsAbort() Fixes regression from 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit b7a16117c6d87a9d33a5f682b592b4507f2c065e Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Thu Mar 11 00:03:08 2010 -0800 XQuartz: GLX: Fix prototype for swapBuffers This was a regression introduced by 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 178da6534fe7ab4b99fb87925c04e6f963c88583 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 8 16:33:37 2010 -0500 Xext: Link to external libraries when necessary. Although the DDX should be linked to the necessary libraries, we may also need to pull them in directly to the module to ensure the symbols are resolved at runtime. Should fix this bug with XSELINUX: /usr/bin/X: symbol lookup error: /usr/lib64/xorg/modules/extensions/libextmod.so: undefined symbol: is_selinux_enabled -v2: use _LIBADD instead of _LIBS; remove SELINUX_LIBS from XSERVER_SYS_LIBS as it should only be needed in extmod. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a2ea8c2f2cc53607d57d60f41c879380ea70cd02 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 11 14:19:04 2010 +0200 Record: Avoid duplicates from replaying frozen events Reintroduce a check which used to be there in the old ProcessKeyboardEvent/ProcessPointerEvent codepath, which avoids us recording events subject to a grab twice: once when it's first processed in EnqueueEvent, and then again when it's thawed and being replayed. This required a tiny amount of code motion to expose syncEvents. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f2eacb4646beb25d055de22868f93e6b24f229b6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 10 09:39:05 2010 +1000 Revert "dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400)" Several users have pointed out that this commit introduces regressions, most notably perhaps fluxbox which essentially stops working after a few clicks. This reverts commit cf72b5437d2d620521279077a29c5df6d0fbb576. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit df9f3273041c6c3e0da2d2254e8c156cd582e296 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 10 09:24:32 2010 +1000 xfree86: fix xf86Config.c build error in --enable-debug mode. (#26971) xf86Config.c: In function 'configInputDevices': xf86Config.c:1514: error: request for member 'lay_identifier' in something not a structure or union make[5]: *** [xf86Config.lo] Error 1 Introduced with e1165632bdfbd720889ed1adf5f7ab338032c0ee. X.Org Bug 26971 <http://bugs.freedesktop.org/show_bug.cgi?id=26971> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> commit 116068103282924ef1476231d13d54719a797252 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 9 09:35:23 2010 +1000 xfree86: don't warn about nonexisting core pointer/keyboard in config. In the vast majority of cases there is no xorg.conf that specifies a core pointer/keyboard. Skip this warning, since we'll get another notification about how the server relies on the config backend for input devices anyway. Leave the warning in for the error case (AEI off). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit c39c8ece9bd3ce025549f4bac7794f5a62266f4a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 10 15:06:52 2010 +1000 os: remove INTERNAL_MALLOC define. There doesn't seem to be anything that defines it and given that the counterpart (the X internal malloc) was removed in 01cfba75229f4b9bf1e4fe80814931acdacde14c it's unlikely to work anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f462ff9082634719e64d2d8d4dbd09ec7deaf2e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 26 14:02:09 2010 +1000 dix: Clip only into axis ranges if we're in absolute mode. (#26543) An absolute device in relative mode may provide valuators outside of the axis range. Clipping back into the range prevents screen crossings in a multi-screen (Xinerama) setup as the required screen edge for crossing is never met: miPointerSetPosition crosses the screen conditional to the X coordinate being equal to the screen width or _less than_ 0. While the former can be met when clipping into the coordinate range and scaling, the latter cannot, resulting in a mouse pointer that gets stuck on the rightmost screen. This patch only applies axis clipping for valuators in mode Absolute. If relative, we allow the values to get above/below the axis ranges. Doesn't matter, miPointerSetPosition will reset the values to the allowed range even if no screen was crossed. This leads to interesting values provided to clients, the valuator range of the device resets once a screen is crossed and essentially reflects the position of the cursor on the screen - scaled into the valuator range. The values themselves are valid given the range though. In theory, the XI1 specs require that a relative device has a min/max range of 0/0. This doesn't really go well with devices that actually can switch mode between relative and absolute since they would have to reset their axis range when switching. If multiple XI clients are in use, we have no method of notifying them about the changes, so other clients may continue to use the wrong axis ranges (note: XI1 wasn't really designed to have multiple clients use a device). Expecting all relative devices to have this min/max of 0 is unrealistic at this point. So pick what is possibly the lesser of all evils, pass the beer and despair. X.Org Bug 26543 <http://bugs.freedesktop.org/show_bug.cgi?id=26543> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 1f0e69b3a13258b79bffdec76b46f7960eb334b3 Author: Matt Turner <mattst88@gmail.com> Date: Mon Mar 8 10:54:21 2010 -0500 Don't check for Xinerama. It doesn't seem to be used anywhere, so don't require it. CC: Jerome Glisse <jglisse@redhat.com> CC: Alex Deucher <alexdeucher@gmail.com> CC: Dave Airlie <airlied@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit bbae92795c7eab062e6722c42fa7915e0cee5d69 Author: Matt Turner <mattst88@gmail.com> Date: Mon Feb 15 20:08:09 2010 -0500 Replace assembly with generic unaligned access code Removes Alpha assembly, and probably works around unaligned accesses on other sensitive platforms. Signed-off-by: Matt Turner <mattst88@gmail.com> Acked-by: Adam Jackson <ajax@redhat.com> Compiled-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1c2abec479cfbac9aeadc121af0825d368317658 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 26 11:44:17 2010 +1000 configure: move SELINUX_LIBS to XSERVER_SYS_LIBS All ddxs require linking against selinux if enabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com> commit cab99b947c66a42dbf8a906bdb02e23aa7cab519 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 26 11:41:38 2010 +1000 configure: move libselinux requirement up to the common section. Let's have all version-specific requirements in one block. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9e7b6e565f6e69f20002bf03ed05fe8b63f86924 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 26 10:14:00 2010 +1000 dmx: fix OsAbort()-related build error in examples/xinput.c 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd changed the server to use OsAbort() instead of abort(). xinput in dmx is a client program though and fails to link if it tries to use OsAbort(). Switch it back to using abort(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cf72b5437d2d620521279077a29c5df6d0fbb576 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 25 12:49:21 2010 +1000 dix: Use DeliverGrabbedEvent for implicit passive grabs (#25400) A client requesting a GrabModeSync button grab, owner-events true, with only the ButtonRelease mask set would never receive the press event even if the grab window had the ButtonPress mask set. The protocol requires that if owner-events is true, then the delivery mask is the combination of the grab mask + the window event mask. DeliverGrabbedEvents does this already for us, checking first the delivery based on owner_events and then based on the grab mask. AFAICT, the device cannot enter the states FREEZE_BOTH_NEXT_EVENT or FREEZE_NEXT_EVENT that would be handled by DGE in any possible path here. Bonus point - CheckPassiveGrabsOnWindows suddenly becomes a lot lesss complicated. X.Org Bug 25400 <http://bugs.freedesktop.org/show_bug.cgi?id=25400> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit de86a3a3448f0a55c1cd99aee9ea80070a589877 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 25 11:37:05 2010 -0800 Allow for missing or disabled compat_output When the compat output is missing (I don't think this is actually possible), or is disabled (and hence has no crtc), we would like to avoid dereferencing NULL pointers. This patch creates inline functions to extract the current compat output, crtc or associated RandR crtc structure, carefully checking for NULL pointers everywhere. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fbbadca7e88391e81ab0f470290f5eec36aa9ce7 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 25 11:35:03 2010 -0800 Share enum definition for det_monrec_parameter sync_source There were two separate enum definitions, one inside det_monrec_parameter struct and one for a local variable (which was then stored inside the struct). Sharing a single definition makes the code more obviously correct while making the compiler happier. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 4b55b2cf8a52c39b53bae11cd1bc7314481d4c86 Author: Robert Bragg <bob@o-hand.com> Date: Wed Jan 27 20:38:38 2010 +0000 DRI2: initialize event->drawable in DRI2SwapEvent We weren't initialising the drawable in the event structure so the client side DRI2WireToEvent used for translating the event into a GLX event wouldn't be able to lookup up the corresponding GLXDrawable before passing the event on. Signed-off-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 780c95caf9888fa4548dfe4c1c78a7e7ce99a9ed Merge: 018b17759 758f69717 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 24 09:59:19 2010 -0800 Merge remote branch 'whot/for-keith' commit 018b177591c9fade6d065e31858cc6e054d33eff Author: Kristian Høgsberg <krh@bitplanet.net> Date: Wed Feb 24 10:37:26 2010 -0500 glx: Compile fix to let server compile with new and old mesa We broke the __DRI2_FLUSH API since it was never released, but since it's taking a little longer than expected to get the X server side of the changes ready, fix things up so it compiles. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 758f6971750ed507e64eee817d720a77181439f2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 15 16:32:16 2010 +1000 dix: try to ring the bell even if the current device doesn't have one. (#24503) Evdev devices do not have the bell proc set, but XTEST devices do. By exiting early, the bell only rings if the last keyboard used was the XTEST keyboard and hence the bell proc is still set on the master but not if an evdev keyboard was used last. The better approach here is to try to ring the bell on all devices attached to this master device in case one or more actually do produce an audible sound. That's also XKB's behaviour if XkbUseCoreKbd is specified as device identifier. X.Org Bug 24503 <http://bugs.freedesktop.org/show_bug.cgi?id=24503> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> commit c0d941913199ed251fceab62fcf65437f6f9bd31 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 18 16:00:15 2010 +1000 dix: remove now-erroneous comment about frozen slave devices. A direct grab on a slave device through XI2 detaches it, regardless of whether the grab is sync or async. So this comment doesn't apply to XI2 anyway. For XI1, aside from your life being miserable already, it doesn't matter as XI1 does not have a concept of attachment. You can freeze a device and if you don't freeze _all_ other devices at the same time, the master device can still happily send events to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com> commit db4f676f25c6d8e58263d5151942be730592d444 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 3 15:40:47 2010 -0500 xselinux: Bump extension minor version. Changes introduced in this version: - 3 window-related requests now handle pixmaps also. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit a6cbcf6e782e65f3d4d14202ed0b7a8f65b33c9d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 3 15:38:57 2010 -0500 xselinux: Rename window-related requests that now support pixmaps. Renamed requests: SetWindowCreateContext -> SetDrawableCreateContext GetWindowCreateContext -> GetDrawableCreateContext GetWindowContext -> GetDrawableContext Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit ab68c707fd02613d9359120ba6402639dd8bd89e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 3 15:08:40 2010 -0500 xselinux: Allow GetWindowContext to be used for pixmaps as well. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit eb9210097efea81065c301e5b6b4da7a566deb4a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Jan 6 12:52:51 2010 -0500 xselinux: Remove reference counting calls for SID objects. Starting with libselinux 2.0.86, SID objects are no longer reference counted and the sidput() and sidget() calls are no-ops. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit 0c4b75a08922416050bb73d2e279ce938d3823e7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 21 21:59:01 2009 -0400 Don't print a failure message when XACE denies an input event delivery. A denial is normal and the behavior should be to drop the event. Having the log message creates excessive log spam. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit e687e11b1248494a45b9a4e4c321675526808703 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 21 21:46:50 2009 -0400 Revert "Remove some debug messages that trigger on XACE event delivery failure." The log messages still need to be there for non-XACE failures. This reverts commit 4be354c4c2da5168b302601b91bd80cfaca7e193. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit 2ecb9f7d86117f212d7845741a3e155553954a85 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 21 19:28:26 2009 -0400 libselinux now has a pkgconfig file. Use it. Also remove HAVE_NETLINK_AVC_ACQUIRE_FD tests, because we now require a version of libselinux that has it. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit 9fc6b59d46382e949526dc10c3f5bfddbe2acb92 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 15 17:32:21 2009 -0400 xselinux: Allow SetWindowCreateContext to be used for pixmaps as well. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Reviewed-by: Keith Packard <keithp@keithp.com> commit 93ff1bc5884cdfca1132af7fbc06c48e06f218c8 Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Date: Mon Feb 15 14:18:00 2010 +0200 Always enable outputs that have been forced on in the configuration file If the user has gone to the effort of manually enabling an output in the configuration file assume that they know what they're doing. X.org Bug 14611 <http://bugs.freedesktop.org/show_bug.cgi?id=14611> Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ca9c2472d74c7107ccc117e2c9c723c168d2eccf Merge: e40ba5798 02d1116e7 Author: Keith Packard <keithp@keithp.com> Date: Mon Feb 22 13:26:06 2010 -0800 Merge remote branch 'whot/for-keith' commit e40ba5798c367bec584f6437b23d2c5f801fd013 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 18 15:49:09 2010 +1000 Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode. The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 02d1116e7eb84068fa32477f1640d29b0a81b638 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 11 16:35:36 2010 +1000 Xi: assume BadMode for non-BadMatch errors returned from SetDeviceMode. The XI protocol spec only allows for two errors on the SetDeviceMode requests: BadMatch or BadMode. BadMode however is a dynamically assigned extension error and the driver doesn't have access to the actual error number. Hence, if a SetDeviceMode driver returns an error other than BadMatch, assume BadMode. The two exceptions are BadAlloc and BadImplementations, pass these on to the client (any request is allowed to return either of those). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 122fc0e7a0712df4ec2bd9ca6773f90bcd2095cf Author: Chris Dekter <cdekter@gmail.com> Date: Thu Feb 11 16:34:09 2010 +1000 Re-enable RECORD extension. RECORD was disabled during the switch to internal events. This patch modifies the record callback to work with internal events instead of xEvents. The InternalEvents are converted to core/Xi events as needed. Since record is a loadable extension, the EventTo* calls must be externed. Signed-off-by: Chris Dekter <cdekter@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 03ef00ae79687046dc9f9987857062a16ff2c2e0 Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Feb 17 11:40:44 2010 +0100 EXA/mixed: Clean up exaPrepareAccessReg_mixed() a little. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9623daad7c864d46b0dfcbb6e689820b96cc8115 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Feb 17 11:40:43 2010 +0100 exa/mixed: fix gnome-panel corruption - A mapped pixmap can't be used for acceleration, any decent memory manager will refuse this. - Source pixmaps migrated with a bounding region are incomplete (from the gpu point of view), so do the upload unconditionally, instead of just for deferred destination pixmaps. - Fixes fd.o bug #26076. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5b9a52be7e975e59e0bbc6b43539ecaff96b2ecd Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Date: Thu Jan 28 11:08:34 2010 +0200 os: Prevent core dump from being truncated. The problem fixed by this patch can be reproduced on Linux with the following steps. - Access NULL pointer intentionally in ProcessOtherEvent on key press. - Instead of saving core dump to a file, write it into a pipe. echo "|/usr/sbin/my-core-dumper" > /proc/sys/kernel/core_pattern - Dump the core by pressing a key. While the core is being dumped into the pipe, the smart schedule timer will cause a pending SIGALRM. Linux kernel stops writing data to the pipe when there are pending signals. This causes the core dump to be truncated. On my system I'm expecting a 6 MB dump but the size will be 60 kB instead. The problem is solved if we block the SIGALRM caused by expired smart schedule timer. I haven't been able to reproduce this problem in the following cases. - Save core dump to a file instead of a pipe. - kill -SEGV `pidof Xorg` - Press a key to dump core while gdb is attached to Xorg. - Give option -dumbSched to Xorg. Also note that the fix works only when NoTrapSignals has the default value FALSE. The problem can still be reproduced if error signals aren't trapped. In addition to pending SIGALRM, there is a similar problem with pending SIGIO from the keyboard driver during core dump. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ca364ca82a760d8e5347a6f9f79636c9a5e4e03f Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Date: Thu Jan 28 11:08:33 2010 +0200 os: Introduce OsAbort for proper core dumps. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 031f92bf9ab15226df410012a0d1c9c390efc36d Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Wed Feb 3 10:05:20 2010 +0200 parser: corrected xf86getBoolValue to use case insensitive compare commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 introduced this regression; it can cause existing config files to be parsed incorrectly. Acked-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Oliver McFadden <oliver.mcfadden@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit be96fb2f02c13a6ee8aba40f7d4c3f9141f06cea Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Feb 15 17:42:11 2010 -0800 Solaris xf86OSRingBell() off-by-one error in filling iov[] array When generating sound buffers for /dev/audio bells, insert waveform for beep *or* silence, but not both, so we don't write one entry past the end of the iov buffer when the final bit of soundwave ends up in the final entry allocated in the iov array. Fixes OpenSolaris bug 6894890: http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6894890 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2d40f22d1ec970a84b23aa42b1feca4feedeb4bb Author: Matt Turner <mattst88@gmail.com> Date: Mon Feb 15 20:05:24 2010 -0500 Use C-style comments in x86emu Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 4e8bf12b13690afa6d9fee0e339d3819ef16fb3f Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Feb 15 16:46:21 2010 -0800 XQuartz: Fix a possible buffer overrun in quartzAudio Also dropped deprecated API while there Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 4127e8e5be5c366eb752bbb8d7f0ff5b519e641b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Feb 10 17:56:30 2010 -0800 XQuartz: clang static analysis fixes Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit c686c5cbdc5f35744407af5f9aabbd18cc17714b Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Feb 15 15:03:01 2010 -0800 XQuartz: Fix linking (CloseInput()) Fixes regresison from d33adcdf03c69407d151e732fa0cf9947151eb19 Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 84905007702da2c05a4f7446b3fc5ff52be49655 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Mon Jan 4 15:00:49 2010 -0500 udev: Don't filter subsystem "input" This allows serial wacom devices to work, whose subsystem is "tty". Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sat Feb 13 10:40:40 2010 -0800 xfree86: Reorder InputClass option priorities Currently the config and InputClasses are merged together so that the options from the config backend have the highest priority. This is bad since it means options such as a default XKB layout set by the backend cannot be changed by the user. This patch changes order of precedence to be: 1. xorg.conf 2. xorg.conf.d (later files have higher priority) 3. config backend In order to allow this ordering, the config parsing has been changed to read the xorg.conf.d files before xorg.conf. This has the consequence that the core device picking which looks for the first InputDevice may not find it in xorg.conf. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 48f7298657f91843db36566b8d66d6c4c18dbd4c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jan 13 15:03:45 2010 +1000 Xi: reset the sli pointers after copying device classes. (#25640) If the indicator flags have the XkbSLI_IsDefault bit set, the indicator map and names aren't their own bit of memory but rather point into the device->key->xkbInfo->desc structure. XkbCopySrvLedInfo knows about this and leaves the pointers alone. When copying the classes from the slave to the master, these pointers are copied and still point to the dev->key class of the slave device. If the slave device is removed, the memory becomes invalid and a call to modify this data (e.g. XkbSetIndicators) may cause a deadlock. The copying of dev->key relies on dev->kbdfeed to be already set up. Hence the pointers need to be reset once _both_ kbdfeed and key have been copied into the master device. X.Org Bug 25640 <http://bugs.freedesktop.org/show_bug.cgi?id=25640> Fedora Bug 540584 <https://bugzilla.redhat.com/show_bug.cgi?id=540584> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit d33adcdf03c69407d151e732fa0cf9947151eb19 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:22:02 2010 +1000 dix: move config_init into the DDX. The only DDX currently using hotplugging is the xfree86 one and it looks like it'll stay that way for a bit. Move the initialization to the DDX, since Xephyr, Xnest, and friends don't need HAL or udev notifications. Add CloseInput (counterpart to InitInput) to be able to clean up the config initialization from the DDX as well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 001ce71dc11287dc94cc2fbc5d35677c046e6c04 Author: Julien Cristau <jcristau@debian.org> Date: Fri Feb 12 23:34:57 2010 +0100 dix: restore lastDeviceEventTime update in dixSaveScreens This was removed in 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 (Do not reset lastDeviceEventTime when we do dixSaveScreens), but caused a regression for XResetScreenSaver. Add the lastDeviceEventTime update back, but restrict it to that case. X.Org bug#25855 <http://bugs.freedesktop.org/25855> Reported-by: Lubos Lunak <l.lunak@suse.cz> Tested-by: Lubos Lunak <l.lunak@suse.cz> Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 97b03037f4d99fcebc7603011f41c3aff9871ce2 Author: Peter Harris <pharris@opentext.com> Date: Fri Feb 12 15:36:30 2010 -0500 Don't double-swap the RandR PropertyNotify event The event is already swapped in randr.c/SRROutputPropertyNotifyEvent, so it should not be swapped here. X.Org Bugzilla #26511: http://bugs.freedesktop.org/show_bug.cgi?id=26511 Tested-by: Leonardo Chiquitto <leonardo@ngdn.org> Acked-by: Adam Jackson <ajax at redhat.com> Reviewed-by: Julien Cristau <jcristau at debian.org> Signed-off-by: Peter Harris <pharris@opentext.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0b73f98cbd1803b82c2faf1a40f1a0037673d712 Author: Soeren Sandmann <sandmann@daimi.au.dk> Date: Fri Feb 12 20:04:53 2010 +0100 xfree86: Add qxl driver to the autoconfig logic The qxl driver is for the QXL virtualized graphics device. Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9c5bb550a2234e4bee2a144417d74c6bdf160e89 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 12 13:46:03 2010 -0800 Bump to 1.7.99.901 -- 1.8 RC1 commit 57ffeb3f2b3313dcef92a396f1f55fdbc064b2c5 Merge: c6d9bc092 c76248fda Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 12 13:36:32 2010 -0800 Merge remote branch 'jturney/master' commit c6d9bc092c84ad5c68083a126aa7577baa42cef7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 10 15:36:50 2010 +1000 Add tag matching to input attributes. Tags may be a list of comma-separated strings that match against a MatchTag InputClass section. If any of the tags specified for a device match against the MatchTag of the section, this match is evaluated true and passed on to the next match condition. Tags are specified as "input.tags" (hal) or "ID_INPUT.tags" (udev), the value of the tags is case-sensitive and require an exact match (not a substring match). i.e. "quirk" will not match "QUIRK", "need_quirk" or "quirk_needed". Example configuration: udev: ENV{ID_INPUT.tags}="foo,bar" hal: <merge key="input.tags" type="string">foo,bar</merge> xorg.conf: Section "InputClass" Identifier "foobar quirks" MatchTag "foo|foobar" Option "Foobar" "on" EndSection Where the xorg.conf section matches against any device with the tag "foo" or tag "foobar" set. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 3ac43df5d4a25d6e0058b327fa05a1c1436b4794 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 10 15:36:49 2010 +1000 Add xstrtokenize to the dix. Move tokenize out of the parser, make it a dix util function instead. Splitting a string into multiple substrings is useful by other places, so let's use it across the line. Future users include config/hal, config/udev and of course the parser. Example usage: char **substrings = xstrtokenize(my_string, "\n"); Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 27d1b86d1b858f931b4cb1b6ddf857c76d92a6d9 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Feb 10 15:36:48 2010 +1000 xfree86: Set fnmatch pathname flag for InputClass device matching Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9b369f71273fb117c982e6ce16cd4462f206d365 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Feb 10 15:36:47 2010 +1000 xfree86: Allow multiple arguments to InputClass matches In order to keep the number of InputClass sections manageable, allow matches to contain multiple arguments. The arguments will be separated by the '|' character. This allows a policy to apply to multiple types of devices. For example: Section "InputClass" Identifier "Inverted Mice" MatchProduct "Crazy Mouse|Silly Mouse" Option "InvertX" "yes" EndSection This applies to the MatchProduct, MatchVendor and MatchDevicePath entries. Currently there is no way to escape characters, so names or patterns cannot contain '|'. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a378e361a5de89f0be8b68ebc3e854f56cefe666 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Feb 10 15:36:46 2010 +1000 xfree86: Use "Ignore" option in InputClass to skip devices Sometimes it is desirable to skip adding specific input devices to the server. The "Ignore" option is used similarly to Monitor sections so that matched devices will not be added. BadIDChoice is returned to the config backend so that it will clean up all resources. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8b1a685f00ae76be864cc188943a0874f48b8d64 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Feb 10 15:36:45 2010 +1000 xfree86: Handle config files ending without newline The config parser expects to find a newline at the end of each line, so files ending without one would confuse it. A newline is inserted at the end of the buffer in these situations. Additionally, switching to the next config file is moved to the higher level to allow parsing of the last line of the previous file to complete before shifting the index and resetting the line number. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Stephan Raue<stephan.raue@gmx.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 67bc278a511ca6ec42e1f8d2d5897c0109e94e2c Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Feb 10 15:36:44 2010 +1000 xfree86: Make InputClass docs and comments match reality Drivers and options specified in InputClass sections work on a "first match wins" strategy. Let's be consistent when documenting it. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a34812b09000db2ff2a1dc6182602839123edd4e Author: Benjamin Tissoires <tissoire@cena.fr> Date: Mon Feb 8 13:50:43 2010 +0100 Add labels for multitouch valuators Thoses definitions have been included in the kernel but the X server is not updated accordingly. Without these definitions, the multitouch axes are not correctly labelled. Signed-off-by: Benjamin Tissoires <tissoire@cena.fr> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c76248fda99c38aef0ccf0ed6b58fbe95f6fe497 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Feb 2 20:53:44 2010 +0000 Cygwin/X: Avoid a collision between DEBUG and a token name Rename a token to avoid a collision between DEBUG defined via AC_DEFINE if --enable-debug is configured, and the token for the 'debug' instruction in the XWin preferences file Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit b7dbbd3cd4d28cd4939706b3bf6394ba8ecafaff Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 22 23:35:09 2009 +0000 Cygwin/X: Avoid cursor size log spam Fedora 12 likes to use a 39x26 animated wait cursor. Avoid spamming the log with warnings that each frame can't be completely contained in the 32x32 native cursor Also reformat log message so it doesn't contain a '\n\t'. I mean, it's not like we might want to grep the log or something... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit c9cbbd5d1cfa58a2d9f08e25534ea8439284322d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Nov 28 17:51:33 2009 +0000 Repair '-nolock' commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 removes the AC_DEFINE for SERVER_LOCK and conditional compilation checking it, making it always on everywhere, except in os/utils.c where code is left under SERVER_LOCK, which now never gets built, making the '-nolock' option non-functional... This seems to have been broken since Xserver 1.7.0, but this option is actually of some slight use on cygwin, as if /tmp resides on a FAT filesystem (yes, I know...), hard links aren't supported. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 7f54ccafadf99c0a1a3e788734199b306b4fa51d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jan 16 13:12:12 2009 +0000 Cygwin/X: Make transient windows resizable again Reverts the change which makes parented windows non-resizeable Because this was trying to do something which we should be doing, as an alternative we try checking WM_NORMAL_HINTS for windows which shouldn't be resizable If a window has a maximum size specified, no maximize box If a window has a fixed size (max size == min size, per EWMH 1.3 Implementation Notes), no resizing frame Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 654d2e372dc2978ce379ab9f02137333ec224f0c Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Nov 10 13:24:40 2009 +0000 Cygwin/X: Discourage other WMs in multiwindow mode Tidying up of other WM detection code when ading SWT/Motif fix in commit 71519a572fe15b85c0eb2b02636c9e871f2c858f was rather over-agressive and now allows other WMs to think they can start when the internal WM is running. Revert to the behaviour of selecting ButtonPressMask events as well on the root window, so other WMs will be dissuaded from starting Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 26857b1c2003797b02e258247f63064aa1e37c10 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Oct 31 17:19:17 2009 +0000 Cygwin/X: Update XWin man page Restructure to group similar options and offer some commentary on those groups Review option descriptions, clarify and bring up-to-date Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 6f1836bfbd80e88d4c57a32757d0a5b398504c35 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Nov 2 17:37:14 2009 +0000 Cygwin/X: Update DDX specific -help text Alphabetize options Review option descriptions, clarify and bring up to date Add missing option descriptions Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 22982b9e95a2339d5ba60d66263e42a0331ee41f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Oct 29 18:50:23 2009 +0000 Cygwin/X: XSupportsLocale() failure is non-critical Treat XSupportsLocale() returning false as non-critical to internal client theads startup, and issue a warning, not an error Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit f60b7712b3451649f138b158ee282be89a66b9ef Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Feb 1 17:13:00 2010 +0000 Cygwin/X: Report BUILDERSTRING with version information Report BUILDERSTRING with version information Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit ed2c2a68e1e6b409c198a52d99d300eb6d517e89 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Feb 1 17:12:57 2010 +0000 Define FD_SETSIZE on Cygwin regardless of XWin DDX All DDXs segfault on Cygwin unless -DFD_SETSIZE=256 is set, so make sure we do so whether or not we are building XWin. FD_SETSIZE must be at least XFD_SETSIZE for uses of select() to be correct. The Cygwin default is only 64, so it must be increased to 256 Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 2f2f3da080629d410dd99e281c382b54f0dbbf5d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jun 19 21:14:47 2009 +0100 Cygwin/X: Copy the state of the Windows keyboard device to the Virtual Core Keyboard at startup. Otherwise, this happens lazily after the first keypress, which can lead to applications which are started from a shell window and inspect the keyboard state before a character is typed getting the wrong idea about the desired keymap (e.g. xemacs shows this behaviour) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 7a440e5b7a416e582b6c3cc4c33822854ce73aed Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Oct 4 15:55:40 2009 +0100 Cygwin/X: Tidy up system.Xwinrc Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 11252ed82e1f361b99e86521ac9314f868bd1a3a Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Feb 1 17:11:54 2010 +0000 Cygwin/X: Look for system.Xwinrc in SYSCONFDIR/X11 Look for system.Xwinrc in SYSCONFDIR/X11 (usually /etc/X11) Rename sample system.Xwinrc file not to have a X11R6 path in it's name Add makefile install rule for system.XWinrc Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 34269a90ea2087f883f5dc8805894fc4998e4b81 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Tue Feb 2 16:21:44 2010 +0000 Cygwin/X: Update resources file and About dialog Use the configured vendor web address in the About dialog Update resources file: rework About dialog, use 'MS Shell Dlg 2' logical font for all dialogs, add ellipsis to exit option in tray menu as it (may) trigger another dialog. Get short vendor name from xwin-config.h, like other configuration data presented in the About dialog box, rather than creating the PROJECT_NAME define Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 881812438b430d2856d0494707e028e5f30d6e9a Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 2 16:22:39 2010 +0000 Xming: Use 8 point font for URL in About dialog Use an 8 point font for URL in About dialog, to match the rest of the text in that dialog Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c02638fd68440513b6046315547c554a910bd7e2 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 2 16:08:45 2010 +0000 Xming: Add a manifest file Use manifests to enable XP style controls (only effective for XP and later and when themes are enabled). The addition of manifests shouldn't cause compatibility problems with older Windows versions. Manifest must have execute permissions, otherwise attempts to execute XWin.exe in the same directory will fail... Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit fd8a32baba77aba8d124658a19f4f6eda79e49c6 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jun 19 21:14:39 2009 +0100 Cygwin/X: Window placement refinement for multiwindow mode Window placement refinement for multiwindow mode, ensure a window actually ends up somewhere visible if it tries to create itself offscreen (which can happen for e.g. if it has a stored position from a different sized display) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 7eb840fd42bc62d88fb4fcf6600546c9ff6e56be Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Feb 2 15:42:12 2010 +0000 Cygwin/X: Respect the system's ownership of the clipping region Respect the system's ownership of the clipping region used for shaped windows Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit bad41bdfd4a12f0c92fd221bffd9f3c5e40d0fe1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Feb 1 17:11:22 2010 +0000 Xming: Always update the Windows title Unicode (wide-character) in -multiwindow mode. Apply the Windows title wide-character in -multiwindow mode. Windows should now display correct client X Window titles for locales with wide characters. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 901c4ebf620579c5bb951a8c003430d967ecf2ff Author: Julien Cristau <jcristau@debian.org> Date: Mon Jan 11 00:31:27 2010 +0000 main: move config_init() after InitInput() With the udev backend, config_init() calls NewInputDeviceRequest(), which enables devices. They can then start sending events, even though the event queue is only initialized later in InitInput(). Oops. Debian bug#564256 <http://bugs.debian.org/564256> Reported-by: Sedat Dilek <sedat.dilek@googlemail.com> Signed-off-by: Julien Cristau <jcristau@debian.org> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7f648777680b9dea31c4adb657e205fc6880d98b Author: Dan Nicholson <dbn.lists@gmail.com> Date: Thu Jan 14 16:42:16 2010 +1000 Don't use AC_CHECK_FILE for fontpath checks when cross compiling AC_CHECK_FILE chokes when cross compiling, so instead we set the default to the standard FONTROOTDIR directories in that case. Signed-off-by: Dan Nicholson<dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit db687f718f760ba254ab51994769db101dc9ca3a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 10:07:38 2010 +1000 xkb: sed True -> TRUE and False -> FALSE Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 0ea2b0bd02f8683998e8b9ebc2b96d606ce45f45 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 18 20:07:30 2009 +1000 xkb: Add XKM file format description. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 08b22c7faf97217ea4d497eec6624fc3dd916d9b Author: Oldřich Jedlička <oldium.pro@seznam.cz> Date: Sun Jan 17 17:59:03 2010 +0100 Allow driver to call DeleteInputDeviceRequest during UnInit When the input driver (like xf86-input-wacom) removes it's devices during a call to UnInit, the CloseDownDevices() cannot handle it. The "next" variable can become a pointer to freed memory. The patch introduces order-independent device freeing mechanism by remembering the already freed device ids. The devices can reorder any time during freeing. No device will be double-freed - if the removing failed for any reason; some implementations of DeleteInputDeviceRequest don't free the devices already. Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz> Reviewed-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b91cec26de367f75388e620772747b08eee34294 Author: Horst Wente <horst.wente@acm.org> Date: Wed Dec 30 19:35:20 2009 +0100 xkb: make ctrl+alt+keypad + / ctrl+alt+keypad - work again (#25743) Video mode switching via keypad keys did not work Signed-off-by: Horst Wente <horst.wente@acm.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 993e78d6c433f65bd8a87890a6bb6da480b2cdc4 Author: Oldřich Jedlička <oldium.pro@seznam.cz> Date: Tue Jan 12 19:15:06 2010 +0100 Fix typo in updateSlaveDeviceCoords The index [0] for the second valuator looks bogus; fix it. Signed-off-by: Oldřich Jedlička <oldium.pro@seznam.cz> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 52456c602c3cdd7d5eac677889a18fad37dfb7ae Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Sat Jan 30 14:49:02 2010 -0800 XQuartz: Attatch a stub display when CoreGraphics reports no displays. This is half of the required changes to address the "stuck mouse pointer" bug that occurs when X11 launches while the displays are asleep. The remainder of the fix is part of libXplugin which needs to be updated to send XP_EVENT_DISPLAY_CHANGED when the display wakes up. If you don't have a recent enough libXplugin (expected in 2.5.0_beta2 or later), you can cause this event to be sent by changing your display resolution (or you could just start X11.app with your screens awake). Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 15f4bb6dc64313ff100aa5444a94c60922a498df Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Wed Jan 27 17:12:12 2010 -0800 XQuartz: Dead code removal Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit 7ba5de6e9e1e8efda9f79af601fb6269bae841ce Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jan 30 10:55:38 2010 -0800 XQuartz: Add some .gitignore magic Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 4d575b0559817258f7a0ce6c4d2d0f9e7e5bba63 Author: Robert Morell <rmorell@nvidia.com> Date: Fri Jan 29 19:07:03 2010 -0800 RENDER: Fix gradient and solid fill pictures with Xinerama, and misc cleanup If these aren't wrapped, then procs that are wrapped (such as RenderChangePicture) will fail in Xinerama when they see the resource type of a picture created through one of these interfaces is PictureType and not XRT_PICTURE like those allocated via RenderCreatePicture. Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8d6b1838330625b758ebc55bb0df1b425c5cefaf Author: Robert Morell <rmorell@nvidia.com> Date: Thu Jan 21 12:38:47 2010 -0800 Render: Fix request size verification RenderSetPictureClipRectangles and the Xinerama version of RenderChangePicture were using the wrong structure types for request size verification. Signed-off-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5e81078cf56aabbf6551d96d312c7840ba9370ae Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Jan 18 14:31:12 2010 +0200 xfree86: vgaarb: remove useless debug This is RAC's remnant. Any sane person would use a more wise method of debugging instead. X.Org Bug 26074 <http://bugs.freedesktop.org/show_bug.cgi?id=26074> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e38df06772965cd5099646f1e7032b7c944d16ed Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jan 28 14:33:25 2010 -0800 DRI2: Bump the dri2 module version to 1.2.0 to reflect recent API changes. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 60b6477f6dc005a1b052be8c5e5a549550a4aa88 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Jan 14 17:18:28 2010 +0200 dix/configure: remove null root cursor option The default behavior of the server is to start with an invisible root cursor. Be such cursor invisible or inexistent (null), in the end it doesn't matter - for the user. The content on screen will be the same. Besides, there's no difference, in terms of performance, whether such cursor is invisible or simply null. The paths that both take inside the server are roughly the same. Therefore create a null root cursor becomes irrelevant. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit b4baab90c0d98bef98d485682d4a69a327a380d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 8 15:18:41 2010 +1000 dix: EventToCore needs to copy the root window too. This value isn't actually set for normal events but it saves us some work for the record extension support. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 27fc98ecfed99fefd5c14388b4c6242f87281895 Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 27 14:37:32 2010 -0800 Revert "dix: EventToCore needs to copy the root window too." This reverts commit 0f2d297dedeff8bd227df4c498cc668b0e902344. Peter provided an updated patch which fixes the tests. commit 711e26466ae04ae93ff4c48d377d83d68a6320e9 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Jan 25 09:21:51 2010 -0800 DRI2: handle drawable destruction properly at DRI2SwapComplete time Simon reported an issue with kwin that turned out to be a general problem. If a drawable goes away before its swap completes, we'll try to free it up. However, we free it improperly, which causes a server crash in DRI2DestroyDrawable. Fix that up by splitting the free code out and calling it from DRI2SwapComplete. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Reviewed-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit b68f0204a2e4fa9d8884cbdd84b6a5df21d6b36e Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Jan 27 09:10:41 2010 -0800 xserver: require libdri 7.8.0 to build We depend on new DRI interfaces now, so require them in configure.ac. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 003829072853546abd973266fe9b24d803f4f5cb Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jan 26 22:25:04 2010 -0800 Avoid segfaults in XF86VidMode GammaRamp functions if randr_crtc is NULL Fixes crash when xscreensaver tries to use GammaRamp calls to fade out http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6915712 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 19d03d4f49e08442f58cf02240e3e6bab04633d2 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Jan 26 20:15:49 2010 -0500 doc: finish the removal of SecurityPolicy file man pages The variable was unassigned but all the code was left in. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7962c8f78964d460c76f76dda2795b971a8c2a94 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Jan 26 20:02:13 2010 -0500 man: add missing __datadir__ for Xserver XWin man pages The man pages display __datadir__/fonts/X11/... because __datadir__ is missing in cpprules.in. Problem was introduced in commit: b54bc14ce0ae38c4863794bc3096ca86cdb23908 when replacing __projectroot__ in the previous font path. Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d2322b6309bf15a45002b42e7e6ba3d6b5bfa932 Author: Kok, Auke <auke-jan.h.kok@intel.com> Date: Wed Jan 27 11:34:45 2010 -0800 xserver: Add timestamps to logfile output. Add timestamps in seconds derived from clock_monotonic to the log file. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0b21a0416b4cb2c32da5e3fda05a0682eb97d56e Merge: 1e6fd65d0 837bd2bbc Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 27 14:14:15 2010 -0800 Merge remote branch 'alanc/master' commit 1e6fd65d0b95260253828678131885a4ec21c594 Author: Michael Vogt <mvo@ubuntu.com> Date: Mon Jan 25 18:41:20 2010 +0100 xfree86/modes: only call gamma_set if its non NULL I ran accross a crash with xf86-video-nv-2.1.15 [1] and xserver 1.7.3.901. It looks like the problem is that gamma_set is called even if that is NULL. [1] https://launchpad.net/bugs/494627 Reviewed-By: Matthias Hopf <mhopf@suse.de> Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0688dca044f966abc3da667f6d4e79e7cf47f996 Author: Eric Anholt <eric@anholt.net> Date: Thu Jan 21 10:31:04 2010 -0800 dri2: Fix order of operations issue in __glXdriSwapEvent test. Clients would have received swap events regardless of asking for it. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a6bd5d2e482a5aa84acb3d4932e2a166d8670ef1 Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Wed Jan 27 14:03:03 2010 -0800 Fix source pictures getting random transforms after 2d6a8f668342a5190cdf43b5. *xoff and *yoff were uninitialized for source-only pictures.x Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c3395158678aaab9dca5fc6a812cbe715ddc0e1a Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Jan 15 14:13:18 2010 -0500 packaging: provide a default README file #24206 All modules should have a README file. The bottom URL section is found in all X.Org README files. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit f311f2d047120fb816897444d2101465ff5189db Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Jan 13 11:35:52 2010 -0800 DRI2: Allow multiple driver names. Each driver type (e.g. DRI2DriverDRI or DRI2DriverVDPAU) can have a name in the driverNames array in DRI2InfoRec. DRI2Connect returns the name for the driver specified by driverType. Also print names of supported drivers in DRI2ScreenInit. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit f57bc0ede8e018c7e264b917927c42a018cd1d5a Author: Christian Zander <chzander@nvidia.com> Date: Mon Jan 11 12:29:07 2010 -0800 x86emu: Respect the LEA 67h address size prefix. Signed-off-by: Christian Zander <chzander@nvidia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 837bd2bbc02b893f96861b48c1f02b7b8e7e3e48 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 16 22:32:15 2009 -0700 Remove unbalanced ( from failure to move log error Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> commit 138d4c1670ebab435bf00627c97098a3a54b81a6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Sat Jan 16 21:03:00 2010 -0800 glx: Sun compilers now support some gcc __attribute__ values Sun cc 5.9 and later (__SUNPRO_C >= 0x590) support __attribute__ calls for aligned, always_inline, noinline, pure, const, and malloc. This commit consists of the related updates to files that were regenerated by gl_XML.py in mesa after adding the __SUNPRO_C checks to it Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Brian Paul <brianp@vmware.com> commit 79e7b0b875634d0f9e1a95232a4e38adf617bc14 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Sat Jan 16 10:45:32 2010 -0800 Only enable kdrive input drivers on Linux by default Fixes build on non-Linux platforms by restoring the defaults to where they were before commit 6c2b3a4247d10a50699ffa6abb643c5e959eefa8, to only enable the Linux kbd, mouse & evdev drivers when building on Linux platforms. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 39ab474197bdad7d8e9ef496df2d61cbea39d370 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 15 19:07:38 2009 -0800 Move OS-specific VT key handler code from common to os-support Adds new function xf86Activate to the OS-specific *VTsw*.c files and calls it from xf86ProcessActionEvent Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (GNU/Linux) commit 15ca3312c069526b7f2207de9dfb9b9e851caf95 Author: Aaron Zang <Aaron.Zang@Sun.COM> Date: Mon Dec 14 17:55:46 2009 -0800 Solaris: Avoid switching to inactive VT's Fix for OpenSolaris bug 6876992: "[vconsole] Ctrl+Alt+F12 switchs to blank console screen with hotkeys property turned-off" http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6876992 Xorg needs to do sanity test for the VT it is commanded to switch to. If the VT is not opened by any process, discard the switching request. The changes also contain the fix for some flaws discovered when getting the new gdm to run. Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 2984c18eb994696927a7f3b94d86fd47907334a0 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jan 21 14:21:07 2010 -0500 config: replace custom code with reusable macro XORG_WITH_DOXYGEN XORG_WITH_DOXYGEN provides additional functions like a configure option which allow platform builders to control the usage of the doxygen program. This is a requirement from platforms that do not have such doc tool. A platform with a back level doxygen may use --without-doxygen to get the rest of the documentation built. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit d9c20ee4191de7276a08288adffc24dff48aff8f Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jan 15 19:34:29 2010 +0200 dix: move cursor realize code to its own function The semantic remains, only code was moved: reuse chunk of code to realize cursor on both AllocARGBCursor and AllocGlyphCursor. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f818f222362c93bcc859d997d96d8f3b447729f4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:19 2010 +1000 xkb: unexport xkbDevicePrivateKey and xkbUnwrapProc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6850ea8fb95417db9ce3a70fc17f90d6fdea1389 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:16 2010 +1000 xfree86: replace True/False with TRUE/FALSE. xf86Xinput.c relied on xkbsrv.h's definition of True/False which seems odd at first and weird on second glance. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 64b1372c15c3ede2696346e153bca9bd89016a20 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:15 2010 +1000 xkb: remove unused _XkbIsPressEvent and _XkbIsReleaseEvent defines Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c8bba14a390fe3fa16027e6b2433a314b3ea00c3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:13 2010 +1000 xkb: remove XkbAtomGetString, replace with NameForAtom. XKB really XKBdoes not XKBneed its own XKBdefines for XKBeverything. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Keith Packard <keithp@keithp.com> commit f37799c9712afb7769f369162b904d9ea2dbd608 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:12 2010 +1000 xkb: remove IsKeypadKey define, only used in two places. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Keith Packard <keithp@keithp.com> commit c8076f317ee5044ed3cc21b097f8b1741af8e0f1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:11 2010 +1000 xkb: remove XConvertCase. Since it's typedef'd to XkbConvertCase anyway and the headers are now split from the client headers, simply get rid of it altogether. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d627dd9d1ef436b01f0581e40a6736ffc6b5d2c8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:10 2010 +1000 xkb: remove _XkbClearElems, a memset will do. Bonus point - it's easier to understand what's actually being done with the memory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Keith Packard <keithp@keithp.com> commit ea1de3fcdc40d2060bb6d13775005eadd624e767 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 15 15:32:09 2010 +1000 xkb: remove _XkbTyped*alloc Please no extension-specific macros for memory allocation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0f2d297dedeff8bd227df4c498cc668b0e902344 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 5 16:31:37 2010 +1000 dix: EventToCore needs to copy the root window too. This value isn't actually set for normal events but it saves us some work for the record extension support. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6f6a99abc12ddee82898fdabfb50c17e90e094b9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jan 13 14:39:54 2010 -0800 XQuartz: Don't FatalError in x_hook_run if the list is empty Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 6bde306f7f6b9bbabeaa8bb910ea549be906cd8b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jan 13 11:20:29 2010 -0800 XQuartz: Update copyright in bundle for 2010 Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 6008cc116493cb2825ad0bda0b407b7aefabb3f4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Jan 11 18:02:55 2010 -0800 XQuartz: Setup the modifier map in the quartz thread This avoids possible doing it twice which could result in incorrect keycodes for alt due to our loss of information about its side. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 44f9c3d16c9c9b3362306a9ba26ee52e7baafeca Merge: 032f97808 84956ca43 Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 13 10:19:21 2010 -0800 Merge remote branch 'jbarnes/master' commit 84956ca43b087600d9db297cffd62e960c516d9e Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon Jan 11 14:56:24 2010 -0500 GLX/DRI2: add INTEL_swap_event support This allows clients to easily check for swap completion status in their main loop. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@nwnk.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 04a54f69a8085ab3fe11a8713bd8b6b16ed1db27 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Jul 16 09:01:17 2009 -0400 DRI2: add support for new DRI2 protocol requests Support the new DRI2 2.2 protocol requests: DRI2SwapBuffers, DRI2GetMSC, DRI2WaitMSC, DRI2WaitSBC and DRI2SwapInterval. These requests allow the server to support the SGI_video_sync, SGI_swap_interval, and OML_sync_control GLX extensions if DDX support is present. The new DDX APIs are documented in dri2.h. Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Adam Jackson <ajax@nwnk.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 032f97808c65771a07bac748212cf6457a5d1660 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jan 6 17:32:24 2010 +0100 xfree86: init pointer feedback controls from options With InputClass support, it makes more sense to cover all aspects of acceleration in options. Previously, one could only set the default on the command line. Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0722c287a4c8a6cdedca9756192547bfcf77ade5 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jan 6 19:43:59 2010 +0100 xfree86: document pointer acceleration in xorg.conf.man Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1aca2d757534879eb55faaee421cb972a9546712 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jan 6 19:13:36 2010 +0100 whitespace fixes Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 14039b5a7982fbf8130501bb00766176a4e9bccb Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jan 6 18:16:20 2010 +0100 doc: actually document SendDragEvents Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 14e4e4a294e648e0bdcb70c34748e1b81c5bb64f Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jan 6 18:13:27 2010 +0100 os: state effect of -a and -t options more precisely Signed-off-by: Simon Thum <simon.thum@gmx.de> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d727ddb91a549d23f6bf323e91db4b8916c1b7a0 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Jan 9 16:28:32 2010 -0500 kdrive: klinux.h breaks make dist This file is no longer part of the source code and must be removed from distribution. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6313d2da6c6910827d68cf31fe00b46a34c5bfc7 Author: Gaetan Nadon <memsize@videotron.ca> Date: Fri Jan 8 19:04:25 2010 -0500 configure: use backticks rather than $() for commands This patch to xserver configure.ac is to increase code portability to non POSIX system by using backticks rather than $() for command substitution for BUILD_DATE and BUILD_TIME. Reviewed-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 74ab27f64a747ee45810f99cdc6e29b82cf8035e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Dec 28 18:00:28 2009 +0200 Revert "Make sys.c use unaligned access functions provided in compiler." This reverts commit da923d0bc15e99a8ed1986bd6f5df37f7af7284b. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6a2a57832709798d99d19ff4c587e22f3b3c150d Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jan 7 15:23:34 2010 -0500 macros: use PKG_CONFIG variable rather than executable name User can defined alternate location for pkg-config. Once option in place, all instances of pkg-config must be converted. Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1b3132f5e981b3398e08263742332cc966bebc07 Author: Gaetan Nadon <memsize@videotron.ca> Date: Thu Jan 7 14:12:34 2010 -0500 xwin: ignore intermediate .man file Only detectable on a Cygwin build Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8ab4749aaefb3727b9fc58bb37b50a2d07eb1531 Merge: 8d53d8448 9437504b2 Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 7 10:32:21 2010 -0800 Merge remote branch 'dottedmag/for-keithp' commit 8d53d84485fdce8ea9686e6f300a69f7ddebd467 Author: Adam Tkac <atkac@redhat.com> Date: Thu Jan 7 15:34:52 2010 +0100 Do not define members of include/eventstr.h:EventType enum conditionally. Main problem is that EventType enumeration members can be different in module and in server, which obviously causes problems. Signed-off-by: Adam Tkac <atkac@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9437504b21dfdb509ab8b3a00f64403e1e4026dd Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 05:42:02 2010 +0600 kdrive: Remove unused kdNoopOps external variable declaration Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit aa6e0936be15488455e6a4236806a58496da2979 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 05:30:22 2010 +0600 kdrive: Remove unused kmap.c Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit f78ac5c6e273f575af29746e08e7c182ff7b93b3 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 02:36:30 2010 +0600 kdrive: Make internal functions static Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 37a8ddc0dbf3fb7f059b689038979bace206dccf Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 02:28:37 2010 +0600 kdrive: Remove unused 'k' variable Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit af1f1a05e1aa9ec921f1288818a66766c301f8b0 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 01:50:04 2010 +0600 kdrive: Remove bus mouse driver Bus mice aren't used anymore, do not keep dead code around. Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit a3cc3af186b55ac80abd6859ffe491f4ae936596 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 23:31:28 2010 +0600 kdrive: Adjust kdrive usage message as shadow overlay support has been dropped Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit c40b9f959175057fac726fcdfff9641ae0681cf6 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 14:07:37 2010 +0600 kdrive: Remove unused VxWorks* variable declarations Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 4e0d580d5ac00d8d87c8e0080a02868c87a31caa Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 15:04:03 2010 +0600 kdrive: Remove unused KdCardInfo::lastMarker field Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit dbaab9759ba31edf63cf73eda86ba931d88e8cce Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 16:18:29 2010 +0600 kdrive: Extract common part of fbdevPutColors and fbdevEnable Put framebuffer colormap updating code in separate function for brevity. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 7ee14154b230b931d294288e1291c4fc617b1354 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 15:42:53 2010 +0600 kdrive: Remove unused overlay fb support Xfbdev, Xephyr and Xfake all use only one framebuffer, so simplify implementation by removing overlay support. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 730f7d1c4fae8ca582a4a9998a4dc4b325f98896 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 15:06:18 2010 +0600 kdrive: Remove unused KD_MAX_CARD_ADDRESS macro Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 5337ddcfd9dc2a5b823da39df7adaad6692214f0 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 14:59:07 2010 +0600 kdrive: Move Xephyr-specific fields out of KdScreenInfo memory_base, memory_size, off_screen_base fields in KdScreenInfo are used only by fake EXA in Xephyr. Move them into Xephyr, cleanup Xfake and Xfbdev. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 62883b499b72f678ab055de4d0370227ae441370 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 13:17:21 2010 +0600 kdrive: Remove unused KdCardAttr from KdCardInfo Card attrs are unused in all current kdrive servers, so remove it completely to avoid allocating and passing dummy values to KdCardInfoAdd. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 6c2b3a4247d10a50699ffa6abb643c5e959eefa8 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Jan 4 14:07:04 2010 +0600 kdrive: Add option to compile out input drivers Add --without-kdrive-{kbd,mouse,evdev} configure options disabling Linux keyboard driver, Linux mouse drivers (ps2, bus,ms), and Linux evdev driver. Build all drivers by default as before. Acked-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 72ba717b1d639e94fa9ab56ca026131edc020a30 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 15:03:24 2010 +0600 kdrive: Remove unused KdCardInfo::needSync field Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit d21b41cdb5e89eb428f36b19e965f0ab49e051d9 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 13:21:25 2010 +0600 kdrive: Remove .gitignore left from SDL server SDL server is gone, no need to keep its .gitignore anymore. Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> commit 6f265d55a61f9be323583b8acacae783be72bda9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 5 13:15:25 2010 +1000 dix: don't update the slave coordinates from the VCK. A keyboard event from a device with both valuators and keys will be posted through the VCK. In this case, do not update the slave device coordinates from the VCK - they're always 0/0. Leave them as-is, for the next pointer event will continue where it left. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 326429badfc76885e4652ddc72860810c0e8d102 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 10 14:56:36 2009 -0500 modes: Remove the ClockRanges type ba2d39dd5428cb5922b797a1d4ea45b859412b40 introduced warnings: xf86Mode.c: In function ‘xf86CheckModeForDriver’: xf86Mode.c:986: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’ xf86Mode.c:1002: warning: passing argument 1 of ‘modeInClockRange’ from incompatible pointer type xf86Mode.c:253: note: expected ‘ClockRangePtr’ but argument is of type ‘ClockRangesPtr’ Because I foolishly didn't notice that we had types with nearly identical members named ClockRange and ClockRanges. The latter contained an extra 'strategy' member at the end, which claimed to be needed by the vidmode extension. Of course, this was a lie: the only time we'd use it was in mode validation, for drivers using LOOKUP_CLKDIV2 with non-programmable clocks. The only driver using LOOKUP_CLKDIV2 is rendition, which has a programmable clock. The only driver using the ClockRanges type was smi, which did not use it for its 'strategy' member, so has been fixed to use ClockRange instead. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 13c8bd3fde3b0831921e59f84936022a16379d63 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jan 4 18:21:54 2010 -0800 CloseDevice: call XkbRemoveResourceClient before freeing key class struct XkbRemoveResourceClient() returns immediately if dev->key is NULL. CloseDevice calls XkbRemoveResourceClient until it removes all resources. If we free dev->key and NULL it before XkbRemoveResourceClient, then infinite loop ensues, and the server appears to hang on exit or crash. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit e707612e9de4e5e1d91dc1a8152810912d7e18bb Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Jan 4 09:07:48 2010 +0100 EXA: Restore migration call in exaDoPutImage(). Turns out this is still necessary if the driver PrepareAccess hook succeeds. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Tested-by: Maarten Maathuis <madman2003@gmail.com> Tested-by: Andrew Chant <andrew.chant+debian@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit e10072b7c74a6f5e24f6dfa37e73688d1f3425e3 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 05:43:28 2010 +0600 Add Xephyr.man to .gitignore Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Keith Packard <keithp@keithp.com> commit fb26cb793c6eba189050662c566f7ea0559bd486 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 05:43:27 2010 +0600 Remove unused pShadow field from drivers' private structures Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2c85d72fc7bd013af327321ad5d626dc73c3caf0 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 05:43:26 2010 +0600 Do not check xfree argument for NULL xfree itself checks for NULL, and even this is not necessary as passing NULL to free(3) is safe. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 15bc35c6e44c65812de5c3e85ec8bbf78b032ded Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Sat Jan 2 05:43:25 2010 +0600 Remove trailing whitespace Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1763550d0181ac1c775b9ddf490114eff2fbe67e Author: Simon Thum <simon.thum@gmx.de> Date: Fri Jan 1 19:58:05 2010 +0100 dix: add smooth limited pointer acceleration profile This profile is inspired by the accel code removed from the wacom driver. It ascends from zero to acceleration, maxing out at threshold. This means you can control the slope using threshold, which wasn't possible in wacom. For sanity's sake, threshold should grow with acceleration. Works best with adaptive deceleration, since otherwise it only generates acceleration above 1, causing seldom pixel skips. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 435f27667f84269768efecde34de4af2b2d43376 Author: Julien Cristau <jcristau@debian.org> Date: Sun Sep 27 14:45:47 2009 +0200 config: add libudev input-hotplug backend Add a backend using libudev for input hotplug, and disable the hal and dbus backends if this one is enabled. XKB configuration happens using xkb{rules,model,layout,variant,options} properties (case-insensitive) on the device. We fill in InputAttributes to allow configuration through InputClass in Xorg. Requires udev 148 for the input_id helper and ID_INPUT* properties. Signed-off-by: Julien Cristau <jcristau@debian.org> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit b8b12e41c453c3bf94b11e7a18934d3b6e1869bf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 23 16:05:16 2009 +1000 xfree86: move sanity checks below option and input classes merges. While the identifier is likely set before the input classes are merged, the driver may not be. Hence don't check for a driver before we've completed configuration for this device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 9fad8f06fb89ac2ae05bea0fa24cab3df7677297 Merge: 871bbe1d8 42e8c9224 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 30 09:28:19 2009 -0800 Merge remote branch 'dbn/inputclass' commit 871bbe1d87fa3c7ebd075e1d1eec33e45b08493d Merge: db2c6f7c9 e1165632b Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 30 09:16:45 2009 -0800 Merge remote branch 'dbn/xorg.conf.d' commit db2c6f7c91289b5d49978974093a1002b3b53a56 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 29 15:48:44 2009 +0100 EXA: Don't use UTS/DFS directly for Put/GetImage when there's a system copy. We want to save the result in the system memory copy, in case we'll need it again for subsequent software fallbacks. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-By: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f28ca728e90ccbb901e8e7215a842525d8e786d3 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Tue Dec 29 12:51:30 2009 +0100 EXA: Restrict the regions that need to be migrated for composite fallback for src / mask pictures. [ Michel: Minor fixups to address compiler warnings ] Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0c1f43c0f3e888172f11f62a2f208af70e0183cc Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 29 12:51:29 2009 +0100 EXA/mixed: Handle results of software fallbacks in DamageReport hook. This is more elegant and probably also slightly more correct than doing it at FinishAccess time. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 08bf26c28fc8147b64f2fe8345b9581e0101571c Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 29 12:51:28 2009 +0100 EXA: Fix migration avoidance for 1x1 pixmaps. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0bd8f0cd7f3823ee17ae8c88fd3e004bfff9982d Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 29 12:51:27 2009 +0100 EXA/classic: Fix crash with migration heuristic "smart". Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 40453bf7718f1c3d672b87e9d84991032cbef859 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Tue Dec 29 09:34:44 2009 +0100 EXA: Limit src prepareAccess regions for a number of unaccelerated operations. When we can trivially calculate the affected source regions, do that before calling region bounded prepareAccess. [ Michel: Minor fixups to address compiler warnings ] Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit aa9ce8ab343d51a67924757c5a43c9572248bb24 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 29 09:34:43 2009 +0100 EXA: Use relevant source region to minimize migration on CopyWindow fallbacks. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 39cc110caa1f6481a7213ae39f82669333ec1645 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Tue Dec 29 09:34:42 2009 +0100 EXA: Fix bugs in exaGetImage / ExaCheckGetImage migration. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Acked-by: Michel Dänzer <michel@daenzer.net> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d42f3960514f1c410863ac6c09c5638b5ddeae20 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Dec 28 16:48:18 2009 +0100 EXA: Allow optimized migration to be enabled with mixed pixmaps. This was always the intention, I only recently realized it wasn't the case yet... Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 661630f9099f254e54c8da513aaed12f6532cc35 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Dec 28 16:48:17 2009 +0100 EXA/mixed: Don't clear deferred status of pixmaps if migration is limited. * With optimized migration, only the pending damage region is synchronized for destination pixmaps. * Migration of source pixmaps can be limited to a bounding region. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 42e8c9224e6c54655c45f87999d37d0d67b3f7f5 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Fri Oct 2 06:29:28 2009 -0700 xfree86: Introduce InputClass configuration Currently Xorg uses hal's fdi files to decide what configuration options are applied to automatically added input devices. This is sub-optimal since it requires users to use a new and different configuration store than xorg.conf. The InputClass section attempts to provide a system similar to hal where configuration can be applied to all devices with certain attributes. For now, devices can be matched to: * A substring of the product name via a MatchProduct entry * A substring of the vendir name via a MatchVendor entry * A pathname pattern of the device file via a MatchDevicePath entry * A device type via boolean entries for MatchIsKeyboard, MatchIsPointer, MatchIsJoystick, MatchIsTablet, MatchIsTouchpad and MatchIsTouchscreen See the INPUTCLASS section in xorg.conf(5) for more details. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0711598dd3e8366217676f462f1af7d0899656d9 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed Sep 2 06:47:13 2009 -0700 config: Introduce InputAttributes in NewInputDeviceRequest In order to give NewInputDeviceRequest more information, a new InputAttributes type is introduced. Currently, this collects the product and vendor name, device path, and sets booleans for attributes such as having keys and/or a pointer. Only the HAL backend fills in the attributes, though. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> commit c6e8637e29e0ca11dfb35c02da7ca6002ac8c597 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Fri Oct 2 06:28:03 2009 -0700 xfree86: Support non-Option boolean entries in configuration Refactored code into the parser to allow the freeform boolean types used in Option entries to be used in other configuration entries. This isn't as powerful as allowing "No" to precede the option names, but it atleast gives a common handling of "yes", "no", etc. A type xf86TriState has been added to support an optional boolean. This allows the boolean sense of the value to be kept while providing a means to signal that it is unset. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> commit e1165632bdfbd720889ed1adf5f7ab338032c0ee Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 21 15:56:35 2009 +1000 xfree86: Add Option AutoServerLayout for input devices. Any input device with this option will be automatically added to whichever server layout is selected at startup. This removes the need to reference a device from the ServerLayout section. The two following configuration are identical: CONFIG 1: Section "ServerLayout" InputDevice "foo" EndSection Section "InputDevice" Identifier "foo" ... EndSection CONFIG 2: Section "InputDevice" Identifier "foo" Option "AutoServerLayout" "on" ... EndSection The selection of the server layout affects both explicitly specified layouts and the implicit layout. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp at keithp.com> commit 592b20c517461d32daf44a940386ffcc11c434f8 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 21 01:13:44 2009 -0800 xfree86: Allow config directory to be specified on command line Add a new command line parameter, -configdir, to specify the config directory to be used. Rules are the same as -config for root vs. user privileges. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> commit efa5269f23c2237eb5368bf5245ffbbf35714153 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 21 00:04:16 2009 -0800 xfree86: Use xorg.conf.d directory for multiple config files Currently there is a single file, xorg.conf, for configuring the server. This works fine most of the time, but it becomes a problem when packages or system services need to adjust the configuration. Instead, allow multiple configuration files to live in a directory. Typically this will be /etc/X11/xorg.conf.d. Files with a suffix of .conf will be read and added to the server configuration after xorg.conf. The server won't fall back to using the auto configuration unless there is no config file and there are no files in the config directory. Right now this uses a simpler search template than the config file search path by not using the command line or environment variable parameters. The matching code was refactored a bit to make this more coherent. Any DDX wanting to read the config files will need to call xf86initConfigFiles before opening/reading them. This is to allow xf86openConfigFile without xf86openConfigDirFiles and vice-versa. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> commit f1e869aca176e9113f9d234b0ea59b4cac295cc4 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 21 00:03:11 2009 -0800 xfree86: Unexport configuration file symbols These functions should not be used outside of DDXs, so no need to put them in the ABI. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net> commit 90e6d93cf9bfafd63d7849dc16ce194d6f9c9d5f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 23 12:54:14 2009 +1000 test/xi2: fail if xi2 class type is garbage. (#25492) If the keycode range exceeds the allowable length, memory gets overwritten. Catch this case by making sure that only allowed class types are present. X.Org Bug 25492 <http://bugs.freedesktop.org/show_bug.cgi?id=25492> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 72286eae9f4a2f2ca6c46919ff8aa1011429e03a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 22 15:42:59 2009 +1000 xfree86: remove LAYOUT_DEBUG section. I don't think this one has been in use since 2003. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 38b5afb0b5b46b61effa6f0e5a377b343e357e7e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 22 15:40:40 2009 +1000 xfree86: remove some 'enable this later' and if 0 ifdefs 2003 called, they want their ifdefs back. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7dc78db79edd15b971110acaf16bbe7f69e40bdb Merge: 81a623f03 b44c9be24 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 22 21:25:18 2009 -0800 Merge remote branch 'whot/master' commit b44c9be244cee286835855483a69c69e80b095c0 Author: Julien Cristau <jcristau@debian.org> Date: Tue Dec 22 17:14:09 2009 +0100 test/xi2: fix maximum max_keycode (bug#25492) The number of keycodes needs to be lower than 0xFFFD so that the length field of xXIKeyInfo doesn't overflow. Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 190610e0c62170a27ab3e40c6c6210a583ae1ad4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 21 11:08:26 2009 +1000 xfree86: remove HistorySize from the xorg.conf man page. This option isn't parsed by anything anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 094c6b9f97a9f92e5a0ef3cf5be24c09ed4d6063 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 21 10:42:32 2009 +1000 xfree86: reword InputDevice man sections, deprecate CorePointer/CoreKeyboard Reshuffle and reword - InputDevice sections are only necessary if hotplugging is disabled. Put more emphasis on hotplugging and less on HAL since we'll switch backends eventually. CorePointer, CoreKeyboard, and AlwaysCore should be listed as deprecated since they don't do what they used to since 1.4. These days, only SendCoreEvents matters and it's enabled for any driver calling xf86ProcessCommonOptions (== every driver). It only controls the startup behavior too, so document this. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Keith Packard <keithp@keithp.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 81a623f036fe56d53c4e3bdafb3eaf945502525f Author: Keith Packard <keithp@keithp.com> Date: Sat Dec 19 20:11:41 2009 -0800 Bump to 1.7.99.3 (unreleased) Signed-off-by: Keith Packard <keithp@keithp.com> commit 3c30c5b6d321f34736c442c9cd982308d9b8b93a Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 18 22:58:59 2009 -0800 Set release date for 1.7.99.2 Signed-off-by: Keith Packard <keithp@keithp.com> commit 895f40792a14d8b88923bf3b428d31ae3bb31e46 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Dec 2 17:43:01 2009 -0800 Add type name argument to CreateNewResourceType Convert all calls of CreateNewResourceType to pass name argument Breaks DIX ABI. ABI versions bumped: Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a11c58fa0c5809f918b36b84be53385cb2d8ea59 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 11 00:58:25 2009 -0800 Ensure all resource types created have names registered Calls RegisterResourceName to record the type name for use by X-Resource, XACE/SELinux/XTsol, and DTrace. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit eb750f8b5e14751d4c40b50499baec5d2ba79db9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 11 00:46:22 2009 -0800 Check for failures from CreateNewResourceType Make sure to check return value before setting bitmask flags. For most calls, just fails to init the extension. Since Xinput already calls FatalError() on initialization failure, so does failure to allocate Xinput's resource type. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit 1df4bd6011e110dcf0649b15bfffd4ab9e6961d6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 17 18:24:40 2009 -0800 Change default xkb model from pc104 to pc105 PC105 is a more useful default for non-American keyboard users, not harmful for American PC101/PC104 keyboard users. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1d2e189cdc1d65c9ca2aa0a950780dc18e6c50f1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 17 18:24:39 2009 -0800 Change sysconfdir brackets to avoid some shells trying to run it as a command Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 48749cc21b074ee8e68c3854bd3977ec7c408225 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 17 18:24:38 2009 -0800 Add platform compatibility defines for Sun Studio compilers Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b63912ed4c69fedd1bea92274d6cae0429a79677 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 17 18:24:37 2009 -0800 Convert checks for PC98 support from platform #ifdefs to configure flag Default remains the same - on for most OS'es on i386 (except Solaris), off for everyone else. Can be manually toggled via --enable-pc98 or --disable-pc98. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 801bc8075aee664bd4c6b6ff842ab737c143a1de Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 14 08:43:19 2009 +1000 xfree86: update man page for special keys handling. SpecialKeyHandling was removed from the kbd driver with version 1.4.0. Since this is the only version that will build against server 1.7+ it's not reasonable to mention it in the man page. Reword, point to XKB instead and make clear that some key combinations _may_ not be available in any given config. Reported-by: Derek Fawcus Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 753310837cd3812882d8de67f063bb61813db675 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 14 08:41:18 2009 +1000 xfree86: DontZap has been disabled for a while now, say so in the man page. 1.7 always shipped with DontZap disabled, it's just the default keymaps that may not include the symbol to trigger it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 0cb638dc6822e54567a1731ea1cf588475a226e9 Merge: 6a6a041c2 fbdf493a3 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 16 21:58:44 2009 -0800 Merge remote branch 'alanc/master' commit 6a6a041c2d8d32f6355db77cd59cff371038c683 Merge: 8127465f4 d50319550 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 16 21:57:32 2009 -0800 Merge remote branch 'jeremyhu/master' commit 8127465f44fee99181f37a5e55dafc90bfafe3d8 Author: Ville Syrjälä <ville.syrjala@nokia.com> Date: Mon Dec 14 19:19:01 2009 +0200 xf86xv: Fix off-by-one in viewport clipping Most of the Xv Put/Get operations have an off by one error in the viewport clipping. Apparently PutImage was fixed at some point but the same code was already copy-pasted all over the place, and so the other operations still suffer from the bug. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit faca1bc582e374d32ee9d63d10e072fbef4940a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 14 11:05:20 2009 +1000 xfree86: belately init RandR12 if xinerama fails. (#24627) On Fri, Dec 11, 2009 at 10:19:01AM -0800, Keith Packard wrote: > On Wed, 9 Dec 2009 11:55:14 +1000, Peter Hutterer <peter.hutterer@who-t.net> wrote: > > On Tue, Dec 08, 2009 at 05:24:06PM -0800, Aaron Plattner wrote: > > > On Tue, Dec 08, 2009 at 03:52:27PM -0800, Peter Hutterer wrote: > > > > Xorg +xinerama crashes immediately due to whacky dependency between Xinerama > > > > and RandR12. The latter doesn't initialize if Xinerama is enabled, but if > > > > only one screen is found, Xinerama is disabled again and RandR12 tries to > > > > access data it never initialized. > > I'd sure like to have RandR get enabled when xinerama doesn't; is there > an easy way of making that happen here? Perhaps having the RandR12 code > disable Xinerama when only one screen is found? Or some other kludge? you know the dependency better than I do so any hints are apreciated. afaict, the screenInfo.numScreens (the check used by Xinerama) isn't necessarily initialized at this point so we can't use the same check. The following seems to work though: From 670b3ebdb7312a6433a8f093d0820785db2aea20 Mon Sep 17 00:00:00 2001 From: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon, 14 Dec 2009 11:00:58 +1000 Subject: [PATCH] xfree86: if only one screen was found, disable Xinerama (#24627) Xorg +xinerama crashes immediately due to whacky dependency between Xinerama and RandR12. The latter doesn't initialize if Xinerama is enabled, but if only one screen is found, Xinerama is disabled again and RandR12 tries to access data it never initialized. Dependency chain is: - ProcessCommandLine sets noPanoramiXExtension to FALSE - xf86RandR12Init() is a noop - PanoramiXExtensionInit sets noPanoramiXExtension to TRUE - xf86RandR12CreateScreenResources tries to use the devPrivates key it never initialized. This hack checks if there's only one screen at the time RandR12 is initialized. If so, we expect Xinerama to fail anyhow so we disable it ourselves and proceed as planned. X.Org Bug 24627 <http://bugs.freedesktop.org/show_bug.cgi?id=24627> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5f898ddbaa7df01d2479e40238d8c7954fc4b67a Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Dec 11 17:04:14 2009 +0200 xfree86: fix -quiet option behaviour Previously it was trying to set the same value as the default one. Sigh. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7284e198619cdacb38d0ad715e932acff86c8367 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Dec 11 17:04:13 2009 +0200 os: print log markers only if log level is >= 0 FWIW default log verbosity is 0, so this will affect only if one start the server with a different -verbose argument. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f57240a0a8c05e0a2589d0127f8888db140d6974 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Dec 11 17:04:12 2009 +0200 xfree86: spam output but with verbose level checked instead Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fbdf493a3e7e48039a0826531e11aa33b04bf391 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 14 18:46:00 2009 -0800 Add freetype & type1 to the LoadModules ignore list Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Adam Jackson <ajax@redhat.com> commit c9726bbe3148c7a8adb4dfde483741545d59c3dc Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 15 15:54:22 2009 -0800 Update Sun license notices to current X.Org standard form Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit d50319550458f8127298cf8672b47f914b74ab1f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Dec 11 16:42:43 2009 -0800 Xfake: Nuke -Wl,-undefined=InitExtensions from LDFLAGS This is not portable, and accodring to Paulo should not be required any more. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit ed7d2527190ec56aed38db19d9e958abe88441b9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Dec 11 11:53:28 2009 -0800 dtrace: Add Xserver-dtrace.h to CLEANFILES Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 44f102ed64e2552a0e04714c7574f74ca5ee66e2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Nov 23 22:24:44 2009 -0800 COPYING: Update license preamble Update the comment about "a modification is currently under discussion" since there hasn't been any such discussion for some time and this is the consensus agreed upon preferred format. Also throw in a pointer to the OSI discussion page about the MIT license. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00a7252fe3e519e3e4d62cdd8746833ca59bce77 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Nov 20 13:38:30 2009 -0800 Fix dtrace object builds of libos to link with SHA1_LIBS Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Adam Jackson <ajax@redhat.com> commit dd2c83d03ecedce8b546d583e436c12f92510754 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 11 14:42:20 2009 -0800 Fix builds with --with-int10=stub Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Adam Jackson <ajax@redhat.com> commit 77221c9155a3c96cb63b210a048db1ea71a5e359 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 29 14:01:29 2009 -0400 glx: swrast can do GLX 1.4 too Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a72c65e9176c51de95db2fdbf4c5d946a4911695 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 2 08:37:20 2009 -0800 fb: Adjust transform or composite coordinates for pixman operations Windows (or even pixmaps, in some cases) may not sit at the origin of the containing pixmap, so any coordinates relative to the drawable must be adjusted. For destinations and untransformed sources, the operation coordinates are adjusted. For transformed sources, the transform matrix is adjusted. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit bd567061c8b84b268d9bbb01bc4d8981feefb862 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 2 15:51:22 2009 -0800 Split fbGetDrawable into fbGetDrawablePixmap and fbGetPixmapBitsData These two sub-macros each perform half of the original macro work and the old macro is now implemented in terms of the new ones. This makes way for new code which wants to know the underlying pixmap for a window instead of just getting a pointer to the bits. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit 61335052972a78d67c0ba74f902273b34c63a198 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 1 11:09:32 2009 -0800 Revert "Fix clipping when windows are used as sources" This reverts commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d. Conflicts: fb/fbpict.c Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit 071b3c1810d9f2602173acc8578caac20e0b771e Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 1 11:05:04 2009 -0800 Revert "Use IncludeInferiors when copying windows before compositing." This reverts commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit 8e640d6b131d2865a9725d8997023865b0ef3d69 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 1 11:04:49 2009 -0800 Revert "Reserve space for two GC values in copy_drawable()." This reverts commit 08df24555cb432eb0d90a3f63275e9485e777c4c. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit 0816c5482c25251da8af5978cc348e1c547bf731 Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 1 11:04:06 2009 -0800 Revert "fb: Don't crash if copy_drawable() returns NULL." This reverts commit 66a9616d645f5a23225251d197e00b94c79274f6. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Soeren Sandmann <sandmann@daimi.au.dk> commit d3e054ac07dae12a82ad764b0622fddbef4b9ec5 Merge: 12fb31815 97a6454ea Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 11 09:22:22 2009 -0800 Merge remote branch 'jeremyhu/master' commit 12fb31815db9de9c01f2d4155a2b74531777c0bf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 7 12:58:57 2009 +1000 xkb: don't assign garbage value to led_return. As the comment for the function states, led_return is undefined if map is NULL. We might as well skip writing to it then. Found by clang. Reported-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> commit ea14a418214ba4c58910f5650d8b25b3fc3a7099 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Dec 3 11:21:31 2009 +1000 Xi: reset device properties to NULL after deleting them. (#25374) Commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 introduced cleanup code to remove the accel properties when switching schemes. The same code is triggered by the default closedown code but only after unconditionally removing all device properties (as part of the cleanup). The properties, although deleted never got reset to NULL. X.Org Bug 25374 <http://bugs.freedesktop.org/show_bug.cgi?id=25374> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Andy Furniss <lists@andyfurniss.entadsl.com> Reviewed-by: Dave Airlie <airlied@redhat.com> commit 9ac6a048efaec51f158bbc1a4a3f448cbe5658ad Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 9 11:43:34 2009 +1000 xfree86: remove unused variable in configureDDMonitorSection. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dave Airlie <airlied@redhat.com> commit 3fad969a90ccab604359ec4de05e745bb4b909e1 Author: Julien Cristau <jcristau@debian.org> Date: Sun Dec 6 20:27:06 2009 +0100 Move config_init() after CreateWellKnownSockets() and InitCoreDevices() config_init() can now add devices directly instead of scheduling a timer. Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 886140787852c660978a9bb3abc7cc2702cbaed1 Author: Tomas Carnecky <tom@dbservice.com> Date: Mon Dec 7 05:54:57 2009 +0100 Fix possible NULL dereference in XkbFlushLedEvents() Through some code paths it is possible that NULL is being passed in the 'ed' parameter to XkbFlushLedEvents(). Make sure we don't pass it along to bzero(). Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 92d9cb7e1340b259294ba317ea3a7d18487498b5 Author: Tomas Carnecky <tom@dbservice.com> Date: Sun Dec 6 23:52:54 2009 +0100 XkbWriteCountedString(): return early if str is NULL This avoids NULL from being passed to memcpy() later in the code. While that wasn't an issue before - that value being NULL implied 'size == 0' so memcpy() wouldn't try to dereference it - it made the code harder to read and also confused clang. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit df2635d4644d1fa2772ff58d8d34cdf788ece412 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Dec 10 00:04:53 2009 +0100 EXA/mixed: Don't consider devKind for detecting dimension change. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=25536 . There should be no reason for the pitch to actually change when none of the other dimensions do, and this could lead to incorrectly freeing the system memory copy when allocating a GPU copy, resulting in loss of valid pixmap contents. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 97a6454ea57587db490873fee8ff0f899882972d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 9 18:27:31 2009 -0800 XQuartz: pbproxy: Fix building of standalone xpbproxy executable Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 1b8f90aa8b1017c74b254db2f398131b857323d4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 8 15:50:28 2009 -0800 Miscellaneous compilation warning fixes main.c:134: warning: no previous prototype for 'dix_main' rootlessScreen.c: In function 'RootlessMarkOverlappedWindows': rootlessScreen.c:434: warning: function declaration isn't a prototype backtrace.c:51: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' backtrace.c:54: warning: format '%lx' expects type 'long unsigned int', but argument 5 has type 'int' set.c: In function 'RecordSetMemoryRequirements': set.c:413: warning: old-style function definition set.c: In function 'RecordCreateSet': set.c:425: warning: old-style function definition stub.c: In function ‘main’: stub.c:236: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 955b9f23a34cc79a5cd9676b45b3df4ffcc7302b Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 8 20:25:02 2009 +0100 EXA: ModifyPixmapHeader_mixed fixes. * Better detection of dimension changes. * Make sure to re-create the system memory copy when the pixmap dimensions change (e.g. the screen pixmap on screen resize). * Clear the valid regions. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c1503861cf75654d4f7b22e6f7f6487c47a0a395 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Dec 8 20:25:01 2009 +0100 EXA: ExaDoPrepareAccess return value fixes. Only return TRUE if the GPU copy is being accessed, and preserve the return value on repeated / nested calls for the same pixmap. exaPrepareAccessReg_mixed could get inconsistent return values e.g. when the same pixmap is both the destination and source of an operation, potentially resulting in a crash. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-by: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fd867387335b6175d76bbe93118bbe5e1e45ce88 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Dec 5 03:18:31 2009 +0100 exa/mixed: pixmaps that succeed prepare access have no need for a cpu copy - When they have a gpu copy ofcource. - Use the presence of a cpu copy as a hint to fall back instead of UTS'ing in exaHWCopyNtoN. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit bb7acfbcfbc37869c2215c26791c6175a5a6c526 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Dec 4 08:37:14 2009 +0100 EXA: Use correct coordinate system for calculating Composite fallback region. Fixes incorrectly skipped rendering of some Composite operations to windows. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0f4ef7123d3e6e09e04dc55e8edb47aecf017648 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Dec 3 19:28:13 2009 +0100 exa/mixed: setting devKind before exaCopyDirty* is not needed Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8ea415d417b3ef6b8a288d10da76ff4bc334e08b Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Dec 2 20:24:02 2009 +0100 Revert "exa: a few small pitch related changes" This reverts commit 99d88ef69d5f7dbf99ca605eceb92f42230a89f4. - Some pixmaps under classic have a sys_pitch which is 0, no idea why. This is causing rendering corruption. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 98c8b752254a27ab1aaf881b36bfda0f74929d0a Merge: 0e084d8c7 91c1bd78f Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 2 15:28:07 2009 -0800 Merge remote branch 'whot/master' commit 91c1bd78f7240c92702828f8e5a6b6ce944b9e36 Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Nov 28 21:32:47 2009 -0500 configure.ac: error while checking for XDMXCONFIG_DEP Introduced in commit 9998105a387e0294054502331a56e1e020cd93e4 The replacement third parameters to PKG_CHECK_MODULES([DMXMODULES] was not quoted. Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 761ae22f880bd79550ccf93d321b8a28b3755956 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 1 14:38:19 2009 +1000 xfree86: tell users to disable AutoAddDevices, not AllowEmptyInput. Technically, disabling AEI is the right suggestion. AEI off forces the server to init the built-in defaults for input devices (or pick the first one from the config file). At the same time, hotplugging is still available with AEI off. Unfortunatly, in the vast majority of cases users want to simply disable hotplugging or have a working server while the local HAL configuration is broken or missing. Disabling AEI will lead to duplicate events, triple keystrokes, etc. once the configuration works again. It's not actually required to remove AEI once hotplugging works again, though it will in many cases lead to a setup that appears broken. Asking users to disable AutoAddDevices instead means those users disable hotplugging, can then fix the HAL setup and they _must_ remove the config line again to test if hotplugging works again. Which doesn't leave them with a broken config once everything is working nice and dandy. Less bugreports, everybody wins. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: James Cloos <cloos@jhcloos.com> commit b584c224a888c9e7f92d7e49021f74232a727c7f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 30 12:11:41 2009 +1000 Set the source and deviceid for key repeat events (#24785) X.Org Bug 24785 <http://bugs.freedesktop.org/show_bug.cgi?id=24785> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Adam Jackson <ajax@redhat.com> commit 66bb8c6fbdfc0fc0d971aac4ec6f949bb9288c1b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 27 16:20:13 2009 +1000 dix: remove core devices when shutting down. (#25028) NewInputDeviceRequest (and RemoveDevice) have checks in place to not allow removal of the VCP/VCK. When shutting down, they need to be cleaned up nonetheless to free the memory associated. X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 83d90b90bcb71c89750f92a177361e53dd261414 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 27 16:08:44 2009 +1000 dix: remove some obsolete comment. The "counterpart to biggest hack" included checking for the motion history function - which is unified in 1.7. Hence the check (which is already removed) would evaluate to true anyway, and this comment isn't needed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit c20c8897272427cb3f755a3e28e80a9ad46f08a1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 27 16:01:53 2009 +1000 dix: fix memory leak, free event list on shutdown. (#25028) X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 0e084d8c71e697a5cf5d5d7c749455ae14bd6eb7 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Nov 11 15:59:27 2009 +0100 Xv: Fix AdjustFrame when driver implements ReputImage. Should probably also be applied to stabler xserver branches too. Luc Verhaegen. From a22bc20721bad506d8fa9772b1258568cbffe7d2 Mon Sep 17 00:00:00 2001 From: Luc Verhaegen <libv@skynet.be> Date: Wed, 11 Nov 2009 15:52:39 +0100 Subject: [PATCH] Xv: Fix AdjustFrame when driver implements ReputImage. Finally fixes fd.o #4653, filed more than 4 years ago. Patch can be happily applied to all modular Xorg versions. Signed-off-by: Luc Verhaegen <libv@skynet.be> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f4fc3406720410e37a2bce1b782cba0f0b734e42 Author: Jeremy Huddleston <jeremyhu@apple.com> Date: Mon Nov 30 11:03:59 2009 -0800 XQuartz: Drop calls to alloca This makes us more consistent with the rest of the codebase, using xalloc/xfree Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 66a9616d645f5a23225251d197e00b94c79274f6 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Nov 30 13:17:53 2009 +0100 fb: Don't crash if copy_drawable() returns NULL. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24634 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8754db77d8169e5ea506a963cebee1a651bcf094 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Nov 30 13:17:52 2009 +0100 EXA: Don't defragment offscreen memory at allocation time. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24300 . Offscreen memory allocation can occur from various places, and apparently doing defragmentation from at least some of them can confuse some driver acceleration code. There's still the regular background defragmentation in the WakeupHandler, which should manage to keep fragmentation at a reasonable level. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0e555a1033e5deed1db8582ca075455a6a2d4228 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Nov 30 13:17:51 2009 +0100 Revert "EXA: Accumulate arbitrary number of glyphs without flushing." This reverts commit c11678cc189551f2a01eaa7a63969c16950739b4. Not sure what I was thinking, turns out alloca() of a size derived from client input is a bad idea. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 99d88ef69d5f7dbf99ca605eceb92f42230a89f4 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Nov 28 10:34:45 2009 +0100 exa: a few small pitch related changes - Setting pitch before exaCopyDirty* is not needed. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit a54c23fe647cb4d610d871094193ae5959606008 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Nov 28 10:34:44 2009 +0100 exa: s/PixmapIsOffscreen/PixmapHasGpuCopy and s/pExaPixmap->offscreen/pExaPixmap->use_gpu_copy - Fixup some variable names as well. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 342f3689d17256c92cbfee079d24501d27aa1153 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Nov 28 10:34:43 2009 +0100 exa: handle pixmap create/destroy in lower layers - Pixmaps that are created during a fallback are automatically prepared access. - During the fallback accelerated ops are blocked to prevent new/scratch gc's from triggering accelerated ops on mapped pixmaps. - A few cases of incorrect wrapping (on the top level pointer instead of between damage and (w)fb) have been removed. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit b54bc14ce0ae38c4863794bc3096ca86cdb23908 Author: Ingmar Vanhassel <ingmar@exherbo.org> Date: Wed Nov 25 20:31:48 2009 +0100 Update man-pages for new default font paths Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c0367028ac02b3ccfbc245863dc6b7295a4014d6 Author: Ingmar Vanhassel <ingmar@exherbo.org> Date: Wed Nov 25 20:31:47 2009 +0100 Update COMPILEDDEFAULTFONTPATH to match the new default font path Signed-off-by: Ingmar Vanhassel <ingmar@exherbo.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0e6cee853d8e5bef3274e632ef034d37f14674a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Nov 18 14:39:25 2009 +1000 dix: clean up accel old scheme data when switching schemes. InitValuatorClassDeviceStruct always initializes with the default profile. The default profile allocs data and adds a few properties which become obsolete if the profile is changed lateron by the driver. The property handlers are stored in the device's devPrivates and cleaned up. Ideally, the property handler ID's could be stored somewhere more obvious, but that seems to require breaking the ABI. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Simon Thum <simon.thum@gmx.de> commit 1b127ab8429616adf9ec31ba4d8bdd9af6e104a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 24 15:31:48 2009 +1000 Xi: when deleting all properties, reset property handler to NULL. Trying to unregister property handlers during the device closure process leads to invalid memory accesses. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 8806375ed72a3cd465fe0a49ead079a334accd6b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 17 09:25:47 2009 +1000 Move xdmxconfig modules into DMX conditionals (#25102) xdmxconfig requires additional modules not checked for if Xdmx build is set to auto (the default). This may lead to build errors if the Xdmx modules are installed, but not the extra ones required for xdmxconfig. X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Remi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org> commit a2adda7ab3defd953cf0f48f5372efb037786a9e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Nov 19 16:35:55 2009 +1000 Revert "Move xdmxconfig modules into DMX conditionals (#25102)" New package dependency unnecessarily links in a few libraries that Xdmx doesn't need. This can be fixed more elegantly. This reverts commit 0ef15ca9d2d9c78c79a2771c550563bc6931b365. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit eb967ca36cfe0409972ac987a74d498cd6f6bafb Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Date: Tue Nov 17 17:13:43 2009 +0200 Xext: Fix a memory leak on GE client disconnect. Add a call to dixRequestPrivate to inform dixFreePrivates that memory allocated in GEClientCallback should be released when client disconnects. Otherwise there is a leak of sizeof(GEClientInfoRec) for every client connect/disconnect. Also remove the explicit allocation and let GEGetClient / dixLookupPrivate do it. This makes GEClientCallback similar to the other extension callbacks. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 55f60e192318132157d3dfdd6732f141bd9dc352 Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Nov 23 22:17:43 2009 +0100 Revert "exa/mixed: be more thorough about setting fb_pitch when needed" This reverts commit d4fc245115eb2cb323e06a82f9dd52518d9b6a16. - This is causing crashes/problems for some. Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 4677b5a80025b50ba2a3e953fd487a549586ae9f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Nov 23 16:33:00 2009 -0800 XQuartz: Allow better compatability with older versions of xinit If we are id="org.x" and the launchd socket is ":0", we will claim the socket to match the old behavior before we prefixed the socket name with our id. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit ec16357edaba23694b12fd234ffa12fd58a73dfa Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Nov 23 17:00:06 2009 +0200 configure: remove unused kdrive Xvesa config variable Xvesa was gone in commit 6d21fbf0 and this should be there as well. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a30e739a144912a68adcaa9f426d600c6ecbd529 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Nov 23 13:07:56 2009 +1000 Xi: don't crash when deleting invalid device properties. Deleting a property that was not set on a device leads to a null-pointer reference. The protocol allows deleting those properties - it has to be a noop. Reproducible: xinput --set-prop "My device" --type=int --format=8 "my property" 1 xinput --delete-prop "My other device" "my property" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 19f7c15e2008dab3c46ba3e14dfa353d01c74f72 Author: Zhao Yakui <yakui.zhao@intel.com> Date: Fri Nov 20 14:43:35 2009 +0800 xfree86: Edid quirk for Philips LCD LP154W01 v1->v2: Make one condition case for one quirk instead of merging them together. This is based on the Keithp's suggestion. Move the EDID quirk for Philips LCD LP154W01 as the panel reports the vertical size in cm. https://bugs.freedesktop.org/show_bug.cgi?id=24482 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit b8b8db98353760738eead612fe846c2ce1c174fa Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Nov 19 10:46:30 2009 +0100 EXA: Don't use UploadToScreen for CopyNtoN with mixed pixmaps. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit d4fc245115eb2cb323e06a82f9dd52518d9b6a16 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Nov 18 21:23:09 2009 +0100 exa/mixed: be more thorough about setting fb_pitch when needed Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> commit 647b79f87a9891225678dc6fc2fbda3bdef8fa9d Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Nov 18 21:23:08 2009 +0100 exa/mixed: avoid copying back pixmap data when no migration took place - When the driver handles the prepare access no copying is needed. - Delayed pixmap creation should be fine, because it's handled by the first prepare access, but the exaPixmapIsOffscreen check in finish access will return FALSE without a driver pixmap. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> commit 30be7ceaf228497ac1ff0a1123c1b35e3aa1fc73 Author: Julien Cristau <jcristau@debian.org> Date: Sat Nov 14 18:39:00 2009 +0100 xfree86: set a sane umask before opening the log Xorg creates its log file following the umask of the user running startx, which may result in a world-writable log. Set umask to 022 to prevent this. Debian bug#555308 <http://bugs.debian.org/555308> See also http://thread.gmane.org/gmane.comp.security.oss.general/2299 Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit fb95090730360b6b7f5429c40937e8fc9dfe5c14 Author: Matt Turner <mattst88@gmail.com> Date: Mon Nov 9 03:33:45 2009 +0000 Use glibc's in/out routines Let's let glibc do the right thing for dense/sparse selection. The _alpha_iobase code has been unused since the switch to libpciaccess. It really should have been killed by fba700f1f6a8976. Signed-off-by: Matt Turner <mattst88@gmail.com> Tested-by: Michael Cree <mcree@orcon.net.nz> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0ef15ca9d2d9c78c79a2771c550563bc6931b365 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 17 11:48:35 2009 +1000 Move xdmxconfig modules into DMX conditionals (#25102) xdmxconfig requires additional modules not checked for if Xdmx build is set to auto (the default). This may lead to build errors if the Xdmx modules are installed, but not the extra ones required for xdmxconfig. X.Org Bug 25102 <http://bugs.freedesktop.org/show_bug.cgi?id=25102> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Keith Packard <keithp@keithp.com> commit df95be4d3d9a744720e37a16fd89d9569bf6e188 Author: Paulo Ricardo Zanoni <pzanoni@mandriva.com> Date: Thu Nov 12 11:27:34 2009 -0200 configure: change 'sigio-default' to 'use-sigio-by-default' This was discussed in this thread: http://lists.x.org/archives/xorg-devel/2009-September/002025.html The patch sent fixed the help string but not the configure option. Signed-off-by: Keith Packard <keithp@keithp.com> commit 801f0e59800ea4a3f6c85b22dea6f2c400bda703 Author: Gaetan Nadon <memsize@videotron.ca> Date: Wed Oct 28 14:09:11 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c93f516e850c2ef2b47cc2e282f9081ae7165ac7 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Oct 27 15:07:26 2009 -0400 Deploy the new XORG_DEFAULT_OPTIONS #24242 This macro aggregate a number of existing macros that sets commmon X.Org components configuration options. It shields the configuration file from future changes. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 0f38159cdd154a29caab0342aee41378e9921929 Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Nov 10 09:12:27 2009 -0500 Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432 ChangeLog filename is known to Automake and requires no further coding in the makefile. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c739beb439bb813e4c82b3216daee7e89aa96f2f Author: Gaetan Nadon <memsize@videotron.ca> Date: Tue Nov 10 08:56:21 2009 -0500 .gitignore: use common defaults with custom section #24239 Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. Reviewed-By: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9071b0d69748cfa7ecca17b4cb0e431bbb0ef2a4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Nov 9 13:09:55 2009 -0800 XQuartz: Explicitly pass a bellProc to make XBell() work again. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit e87a03fd531ce7974877688680d3bf9b85c2d835 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 27 17:16:57 2009 -0700 XQuartz: pbproxy: Wait for the server to finish starting up, so display is valid. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 15fc56addcc906592af7c0f4c0a5ac906fa5c389 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Nov 8 20:25:42 2009 -0800 XQuartz: Buildfix for Leopard and older Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit b5aa2e0a5fe233dc883084a5026013472e85bca4 Author: Chase Douglas <chasedouglas@gmail.com> Date: Mon Nov 9 22:54:39 2009 -0500 Move FD_CLR above pInfo->read_input The event fd may be invalidated by the pInfo->read_input call. If it is invalidated, the subsequent FD_CLR call will segfault. Thus, the FD_CLR call must precede the pInfo->read_input call. Signed-off-by: Chase Douglas <chasedouglas@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 982f6648fd29d085265bf6035c1bf4d1b2499316 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Nov 10 09:50:50 2009 +1000 dix: increase default number of buttons to 10. Currently the XTEST device is limited to the same number of buttons the core device has. This breaks if a user has a mouse with more than 3 buttons connected and is using a core client to fake button 8+ presses. Rather than expecting all clients to fix themselves, just increase the default number of buttons to 10, which is somewhat a compromise. Ideally, the XTEST devices should adjust themselves to the highest number of buttons available on the slave devices (like the master pointers already do), but that's a taks for another day. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ec5417b965616e60b51466fe9fd2b44cb5abb349 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 12 23:58:32 2009 +0100 Cygwin/X: Ensure WM_STATE atom exists in multiwindow mode Workaround a bug in iiimxcf (assuming the WM_STATE atom exists), which can cause many Solaris clients to simply fail with a BadAtom error Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit aa860552fd7e2888258a7b48b8c3bd4af527dc6c Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Sun Nov 1 18:19:08 2009 +0000 Cygwin/X: Enable clipboard integration by default Enable clipboard integration by default, can be turned off with -noclipboard. We still accept -clipboard for backwards compatibility. If both are passed, the last one is accepted (just as other arguments are handled). Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 87b00ced3d308a9168828c0e38ecffa0640621a0 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 1 18:18:48 2009 +0000 Cygwin/X: Setup screen layout in Xinerama mode Setup screen layout according to the screen window native window positions in Xinerama mode Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 0fe2e8c64e7a5a9140c77b88b266d7ae58b0bca2 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Sun Nov 1 18:18:31 2009 +0000 Cygwin/X: Allow composite to be enabled for Xwin Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 26a69bbd9b6f415c443d6d6f8f450329f348edc3 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Sun Nov 1 18:19:04 2009 +0000 Cygwin/X: Mount options have changed in cygwin-1.7 Mount options have changed in cygwin-1.7 Also fix a typo in the warning issued if /tmp is a textmode mount Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 35901ece6a49e5f8e245364c27723da2f9009a1d Author: Paul Loewenstein <paul.loewenstein@gmail.com> Date: Sun Nov 1 18:18:45 2009 +0000 Cygwin/X: Handle fake keypresses generated by speech recognizers Apparently, fake keypresses generated by speech recognizers may not bother with a scan code, so look up what scan code corresponds to the virtual key code if this occurs. Patch by Paul Loewenstein <paul.loewenstein@gmail.com> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 0866322b574b1f3695467535ed5fa8f9e629ad1d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jul 13 13:46:45 2009 +0100 Cygwin/X: Always use an authorization cookie for internal clients Don't conditionalize use of an authorization cookie for internal client threads on XCSECURITY, always use one (this avoids certain problems with XDMCP setups where the XDMCP host removes localhost from the access list etc.) Conditionalize the use of a XCSECURITY authorization descriptor on XCSECURITY Consolidate the various places where the authorization cookie is set for internal threads into a new function, winSetAuthorization() Use authorization cookie for multiwindow WM X message thread as well Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 72f81f4e449defb0654e9bdb2c9ec014475a3977 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Nov 6 17:46:58 2009 +0000 Xming: Make -auth option work in with -multiwindow Use an internally generated cookie for authentication of the internal window manager client when using the -auth option in -multiwindow mode. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 6dbf8f27c885ea3a761548183fb00ba3df2df553 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Jul 21 01:15:25 2009 +0100 Xming: Tidy up code for initial native window positioning Tidy up code for initial native window positioning and avoid a duplicate call to winMultiWindowGetTransientFor() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 28eb61fc04811bb9bbb523e0a252933313bb16ce Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 1 18:19:14 2009 +0000 Avoid a null dereference if IFF_BROADCAST is set but there is no broadcast address It seems that the getifaddrs() function can return interfaces with IFF_BROADCAST & IFF_UP set, but no broadcast address (at least under Cygwin 1.7, this seems to happen for v6 mapped v4 addresses) Avoid a null dereference if this ever happens Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 091cbbaed7aafab6f9839a40fe977ab067d1ace1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Oct 12 13:40:11 2009 +0100 Xming: Fix UT8String and CompoundText clipboard text sharing with windows clipboard XConvertSelection() in libX11 always returns 1, so there is no point in testing it incorrectly against Success. This is possibly a bug in XConvertSelection() This should fix UTF8String and CompoundText selection via the clipboard. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9657eae5d65eff289089afc46dfb629758ebbdf7 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 1 18:18:51 2009 +0000 Cygwin/X: Clearly diagnose a timeout while waiting for SelectionNotify event Clearly diagnose a timeout while waiting for SelectionNotify event in the clipboard integration internal client. (which seems to be behind some of the reported failures) Turn useless #if 0/ErrorF()/#endif into useful winDebug() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 062f49a8e0d1afb4dd32e9451a47ab2792639e7f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Nov 4 17:36:54 2009 +0000 Cygwin/X: Add a workaround for a SWT/Motif bug to internal window manager SWT/Motif expects all top-level windows to get reparented, and waits until they do. So workaround that in our internal WM by forcing a reparent event to occur, even though we don't actually need to reparent the window to frame it (as the frame is a native window, not an X window) http://sourceware.org/bugzilla/show_bug.cgi?id=9848 https://bugs.eclipse.org/bugs/show_bug.cgi?id=36806 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 71519a572fe15b85c0eb2b02636c9e871f2c858f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Nov 4 17:34:40 2009 +0000 Cygwin/X: Fix typo in g_fAnotherWMRunning and tidy up WM detection code Tidy up code for detecting another WM is already running Fix typo g_fAnotherWMRunnig -> g_fAnotherWMRunning Remove some unused event mask macros Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit f3fad371cce0f3836514ad5b29e59fa1ca0627a7 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Nov 4 15:33:53 2009 +0000 Xming: Add FORCEEXIT option to configuration file Add a new option to configuration file: FORCEEXIT, like SILENTEXIT but ignores the client count. Unsaved client work may be lost with this option but it is useful if you want no dialogs. Add description of this new keyword to XWinrc man page Also fix grammar of the exit confirmation dialog warning to be correct when there is only one(1) client connected. Also rearrange yacc tokens to one per line to make future merges easier Also amend default system.XWinrc so that SILENTEXIT is on by default Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 019a601de6a8ae083852c2d384c814dcc7aeeb72 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Nov 4 15:16:03 2009 +0000 Xming: Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion() Add mouse motion events with flag POINTER_SCREEN in winEnqueueMotion(), as they are in screen coordindates and may need to be scaled to the axis range appropriately Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7af1240b57daa4ec55512276a9fda499d923eaa0 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Nov 4 14:20:17 2009 +0000 Xming: Replace all the uses of deprecated functions in hw/xwin with current ones Replace uses of LookupIDByType() and SecurityLookupIDByType() with dixLookupResourceByType() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 2a38f7c0dbc890e6408eee143d77719f265d583d Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jun 19 21:12:55 2009 +0100 Cygwin/X: Remove a couple of extraneous '\n' in logged version info Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 56658fc06cb773ed20ef1b23a3fe918c0d3b36bb Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 22:40:02 2009 -0500 Set default font path with fontutil 1.1 and fontpath.d Look for $sysconfdir/X11/fontpath.d and, if it exists, set it to the default font path as a catalogue: entry. Based on app/xfs commit c66a46e35ae40a23ad9acee838ab42300eddbd67. Otherwise, use the font-util 1.1 macros to determine the system fontrootdir and standard subdirectories, or let the user configure it and the subdirectories themselves. This adds a build-time (or at least an autoconf/autogen time) dependency on font-util, and changes the --with-fontdir argument to --with-fontrootdir. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Alan Coopersmith <alan.coopersmith-xsfywfwIY+M@public.gmane.org> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c7d1319872e0ae0b7d945e9af8c4027ee5aa2055 Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 9 11:12:22 2009 -0500 randr: Fill in errorValue when verifying outputs/crtcs/modes Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d85ab6b6483d6ca7d9d22298d05ed1fa3076b042 Author: Dave Airlie <airlied@redhat.com> Date: Tue Oct 13 10:15:00 2009 +1000 loader: actually stat something that has some chance of existing. (v2) FindModuleInSubdir seems to expect a / at the end of the subdir its finding for, so we add the / early, the stat will fail if its not a subdir, I'm leaving the S_ISDIR in just in case there is another reason it could return 0. This does look a bit silly in strace but it seems to work fine. I have a very intermittent issue where drivers loses its / that I've been seeing on/off for a while, this may or may not fix it. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit a5e59230de3abafda9cd9d571cea192897155a14 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 5 13:44:30 2009 -0800 randr: Turn on ModeDebug during server setup Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c61e77c77ca309f3676370992f41867807ed0c67 Author: Matt Turner <mattst88@gmail.com> Date: Thu Nov 5 22:40:03 2009 -0800 Remove lnx_font.c and lnx.h I couldn't find any version of the X xserver that ever used lnx_font.c so let's delete it. I tried contacting its author, Egbert, multiple times on IRC and email [*] but never got any response. It also hasn't been seriously touched since January 2005. [*] http://lists.x.org/archives/xorg-devel/2009-October/002855.html Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 15ffe9f51b122494a2b292b3ab1f199d3e81600c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 5 18:28:28 2009 -0800 configure.ac: Notify user about which SHA1 implementation is being used Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 6b109919f6e1593b27b0760bb56a65b43fb86ea4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 5 18:13:07 2009 -0800 SHA1: Add support for Common Crypto libSystem on darwin can handle SHA1 computation without needing to pull in OpenSSL. See CC_crypto(3) Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 840a68dc5e3b4d285894f86df2a8c41fca5a4bec Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 4 18:39:16 2009 -0800 XQuartz: Cleanup X11Controller.m compilation warnings. Declare X11Controller as implementing NSTableViewDataSource. Use selectRowIndexes:byExtendingSelection instead of selectRow:byExtendingSelection Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 0e3ad44c3b05cbe7b1d8f5ce7949fec3c7ae2e7c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 4 18:15:08 2009 -0800 XQuartz: Use dixLookupResourceByType instead of LookupIDByType Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 069fc6ce0a0e7f2c418e11941568ffcc52b6b331 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 4 16:18:06 2009 -0800 XQuartz: Don't weed out duplicates in generated keymap There seems to be an issue in the 1.5+ server where shift-space does not produce a space when 'keycode 57 = space' but it does when 'keycode 57 = space space' Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 6d6e8fb27f00f0c3128cef624b39a60aa754fdc8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 4 13:34:20 2009 -0800 XQuartz: Controller thread launches clients This avoids a memory leak due to no active auto-release pool on the server thread. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit f7b375bd141d0cf1e3add5443a5838dd8f554ef6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 5 11:42:34 2009 -0800 Enable XF86PM on all Solaris platforms, not just x86/x64 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit f77262513ea17401092479e17ad20fc0eb91ffb5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 5 11:42:33 2009 -0800 Use $(MAKE) instead of "make" to build Solaris inline assembly Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 964040764387d89ef64324cfbee31872ee6ce41c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Nov 4 15:35:37 2009 +0200 EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_driver It crash the server when the drawable is 32 bit and the framebuffer is 16. This is pretty much a copy-past from commit 8e873185. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7442f3355ab8f0bb2b1a270da18c65d8d315d4dd Merge: 0573042cd 7897b6c2d Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 4 08:55:20 2009 -0800 Merge remote branch 'jeremyhu/master' commit 0573042cddb6f9942e408687a16c6842e62a8bfa Author: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Date: Wed Nov 4 15:59:30 2009 +0200 dix: Fixes a memory leak when a cursor resource is released. Just open and close a client that creates cursors in order to reproduce. In the problem case bits->refcnt is -1 and therefore bits->devPrivates is never released. Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7897b6c2d41bccb72c19418674c3526ecce29515 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 27 18:00:48 2009 -0700 dix: Properly detect if the other device is frozen Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> commit 5e79976c13c5b94b12392b493846ca26be11750b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 3 16:35:27 2009 -0800 XQuartz: Run xmodmap after programatically updating the keymap. Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Martin Otte <otte@duke.edu> commit 412c56ef3332d09efbd861e41c3e985f44729729 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Nov 1 22:08:40 2009 +0100 exa: remove some outdated comment - This comment is still in exa_driver.c and there it makes sense. Signed-off-by: Maarten Maathuis <madman2003@gmail.com> Acked-by: Michel Dänzer <michel@daenzer.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 48b8c076a7b7dbbddfc472e8c6e5251a0b174cbc Author: Matthieu Herrb <matthieu@laas.fr> Date: Mon Nov 2 11:11:24 2009 +0100 add libc as a choice for SHA1 implementation On Sun, Nov 01, 2009 at 02:54:13PM -0800, Keith Packard wrote: > Excerpts from Matthieu Herrb's message of Sun Nov 01 09:34:35 -0800 2009: > > > +AC_CHECK_FUNCS([SHA1Init], [HAVE_LIBC_SHA1=yes]) > > I'd suggest AC_CHECK_FUNC instead; as far as I can tell, AC_CHECK_FUNCS > will also define HAVE_SHA1INIT. Also, can you use HAVE_LIBC_SHA1 > consistently rather than having two separate names (HAVE_LIBC_SHA1 and > HAVE_SHA1_IN_LIBC)? Yes, I know one is a preprocessor symbol and the > other is a cpp shell variable, but I think that will work anyway. > New version taking you comments into account. From: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun, 1 Nov 2009 18:19:27 +0100 Subject: [PATCH] Add a probe for SHA1 functions in libc in *BSD. The interface is the same as the one in libmd. Signed-off-by: Keith Packard <keithp@keithp.com> commit da923d0bc15e99a8ed1986bd6f5df37f7af7284b Author: Matt Turner <mattst88@gmail.com> Date: Sun Nov 1 14:30:48 2009 -0500 Make sys.c use unaligned access functions provided in compiler. Favorite deleted line was definitely /* to cope with broken egcs-1.1.2 :-(((( */ Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d30637339963950910e5f5fb755b8465ac7dddb4 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu Oct 29 11:46:22 2009 -0700 Supply all code using dl*() with DLOPEN_LIBS Previously DLOPEN_LIBS was managed in top-level configure.ac. Instead bundle it with the code using dl*() functions to avoid breakages in uncommon configurations. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ec98d7fc78efefcf9fc61492529157c0d289c3f2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 21 10:23:16 2009 -0400 EDID: Extend the HDTV hack to handle "1368x769" Hate televisions so much. Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7c0803f555782dbf451b7c79112d7deae02e5c9f Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 28 15:44:37 2009 -0400 modes: Fix duplicate detection, and do it more consistently Signed-off-by: Adam Jackson <ajax@redhat.com> commit ba2d39dd5428cb5922b797a1d4ea45b859412b40 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 26 15:10:30 2009 -0400 modes: De-duplicate a clock range check. Signed-off-by: Adam Jackson <ajax@redhat.com> commit 25236d19e6ef07fcb2c71569f1b7b0c12810834a Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 26 14:49:57 2009 -0400 EDID: Fix interlaced detailed timings to be frame size, not field size Signed-off-by: Adam Jackson <ajax@redhat.com> commit fb86433d897c116315cc7994390d11ac2f577511 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 26 14:04:23 2009 -0400 modes: Decorate interlaced mode names with a trailing 'i' Signed-off-by: Adam Jackson <ajax@redhat.com> commit fc2ec95664d55f45f77f1ebb039a7c17a1fcdaa3 Author: Ma Ling <ling.ma@intel.com> Date: Wed Feb 18 17:41:26 2009 +0800 EDID: CEA extension support Reviewed-by: Adam Jackson <ajax@redhat.com> commit fab74d1081270fb8f1d231e6e10d10aa33e164da Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 28 17:48:19 2009 -0700 Suppress certain GCC warnings in auto-generated code. - Don't warn for references to deprecated functions in xorg_symbols. - Ignore functions generated by gl_apitemp.py that are never used. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 239435875d6a92ed31731b500a992a3af0943594 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 28 17:48:18 2009 -0700 Don't cast double to int: use default conversions or explicitly round. GCC warns about casting a double return value to int. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit e8c48fd8f7aab54327b0091cd17c60235ae27168 Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 28 17:48:17 2009 -0700 Suppress GCC warnings like "the address of `u1' will always evaluate as `true'". Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 662594aeff9d1767316f08600949c73ac5060d18 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu Oct 29 00:40:48 2009 +0600 kdrive: Grab evdev mouse/keyboard devices when X server is active Input events are directed to both vt and input devices by default. Unless input devices are grabbed, keyboard events fill it vt buffers and cause spontaneous wakeups in kernel tty layer when buffers are full. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 83d520d86c888f2c8a4abb18b7a8858d568aa18f Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 28 16:45:44 2009 -0700 Add video driver flag to indicate that console access is not needed. Existing video drivers will get the console enabled by default. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 25979c46b467847ccb54f5c86a1be6b9c303c99a Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 28 16:35:28 2009 -0700 Alloc/free drawables array for each ProcPanoramiXShmGetImage call. Updates my previous patch, b422b532f3dcab54c53f61a66f2ad76059d1874a. keithp recommended against allocating the drawables array globally, but my updated patch with that fixed isn't the patch that landed. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 757c11630d5999ad13dcac79191429badc92a3a6 Author: Tormod Volden <lists.tormod@gmail.com> Date: Wed Oct 28 23:10:43 2009 +0100 xfree86: Fix description of DDC_QUIRK_DETAILED_USE_MAXIMUM_SIZE The message ending up in the log is misleading as to what the quirk actually does: It ignores the sizes in the detailed timings and replaces them with the display "Max Image Size". Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit ccf4a69db747b000aee09072aac0a2891bde139a Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Thu Oct 29 01:54:00 2009 +0600 os: Add libsha1 as a choice of SHA1 implementation There are small systems which don't need OpenSSL or gcrypt. Add libsha1 (http://github.com/dottedmag/libsha1) as an alternative small SHA1 implementation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 8613e4b0eb04150b1e377871f02b164be5d001e9 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Wed Oct 28 11:44:27 2009 -0700 Add missing DLOPEN_LIBS to kdrive compilation flags Xfbdev failed to build due to dladdr being used by xorg_backtrace. Explicitly add DLOPEN_LIBS to KDRIVE_LIBS as there does not seem to be a better place for it. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit deb72fc61464250af8185dab2da8ee09f13c55d8 Merge: 55f4c80a4 a60e676f1 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 28 10:54:13 2009 -0700 Merge remote branch 'jcristau/sha1' commit 55f4c80a4c891b355a99e6a05978ca945397c5cc Author: Hans Nieser <hnsr@xs4all.nl> Date: Wed Oct 28 06:59:40 2009 +0100 Xinput: allow non-integer values again for Constant- and AdaptiveDeceleration This was initially fixed by commit 3932a848572f4eaf8b7f1d91d9b74aeafab069a2 but then (presumably not intentionally) undone by commit 1d54479cb3c8b4f75b7564f8b5e1c5da940b20f4 . Signed-off-by: Hans Nieser <hnsr@xs4all.nl> Signed-off-by: Keith Packard <keithp@keithp.com> commit 50a5c32430a5267f2a05656d2417f9a8a44d8b97 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Oct 23 19:32:42 2009 +0100 dmx: Correctly compute DMXGetScreenAttributes reply length Correctly allow for excess length of DMXGetScreenAttributes reply over standard 32 byte reply in addition to the displayName string when computing the length of reply http://bugs.freedesktop.org/show_bug.cgi?id=24685 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9a2f6135bfb0f12ec28f304c97917d2f7c64db05 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 23 10:04:57 2009 +0900 DRI2: Report the correct extension minor version Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit d886008c96cd16f735f54dace070cb00b23c6f44 Author: Marcin Baczyński <marbacz@gmail.com> Date: Thu Oct 22 14:43:25 2009 +0200 Kill compilation warnings. Signed-off-by: Marcin Baczyński <marbacz@gmail.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 15b30fde179cba3877182cd51b0f870ef29ffaee Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 22 17:29:01 2009 -0400 dix: Fix up colormap fixup. FindClientResourcesByType() will walk all colormaps on all screens; we only want to fix up the current screen. Otherwise, screens > 0 will have the visual pointers for their colormaps pointing off into space. Signed-off-by: Adam Jackson <ajax@redhat.com> commit 3785475a78636eb6547ef9e46be9e009c7cf7800 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 23 09:03:39 2009 +0900 Bump to 1.7.99.2 (unreleased) commit 909df9beb3ddd02632f36ae682537280a6a8e5b4 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Oct 20 12:57:05 2009 +0100 Resolve an inconsistency between libX11 and Xserver over GetModifierMapping libX11 ModMap.c believes that GetModifierMapping can never return an error Xserver devices.c believes that GetModifierMapping can return an error if the ModMap couldn't be generated According to the protocol document I have, libX11 is right, so adjust the server to send back an empty modmap if one couldn't be made... http://bugs.freedesktop.org/show_bug.cgi?id=24621 Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9c48862ac1ac119b6cfb7e376533f53af6a857f4 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 22 01:12:03 2009 +0900 Bump version to 1.7.99.1 This is a development snapshot for 1.8. Signed-off-by: Keith Packard <keithp@keithp.com> commit 26f4d8a2c12ff06c4beb06842cd8d9c0d9ddd4aa Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 22 01:04:42 2009 +0900 Make sure dmx docs are built for distribution. Ok, dmx docs are driving me slightly nuts. We probably shouldn't include the built versions in the tarball, but we do, so this is an attempt to make that work by having both the 'all' and 'dist' targets depends on the doxygen output. Signed-off-by: Keith Packard <keithp@keithp.com> commit 4114854893ff57a1be525ec099a4b33e5f9963b1 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 22 00:17:37 2009 +0900 Don't attempt to build hw/kdrive/sdl/Makefile anymore With sdl removed, there's no way to build the sdl Makefile. Signed-off-by: Keith Packard <keithp@keithp.com> commit 4d333c5121818754356853724333eadec2dcd18c Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 22 00:16:12 2009 +0900 Always check for doxygen so that distcheck gets dmx docs make distcheck wants the built dmx documentation so that users don't have to install doxygen. This means that even if dmx isn't built, the docs need to be so that the tarball can include them. Signed-off-by: Keith Packard <keithp@keithp.com> commit 7e92bac5f769aca99bd20e21fe2811f0480b647b Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 22 00:00:35 2009 +0900 Make sure HAVE_DOXYGEN is defined when not building dmx The DMX docs are build using doxygen if present, so configure.ac checks to see if that is available. However, when not building dmx (the default), this conditional must still be defined to make automake happy. Signed-off-by: Keith Packard <keithp@keithp.com> commit 1228e2d052f0bb98175c55c194340773b5fedb40 Merge: 08e7f62fa 52bc6d944 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 21 22:46:53 2009 +0900 Merge remote branch 'whot/master' commit 08e7f62faf72540cb3a6f1023024c145f7fa1a23 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 21 16:46:55 2009 +0900 Fix 'distcheck' to use host xkb files but install to build dir 'make distcheck' needs to read xkb files and write out compiled versions as a part of the 'make check' phase. This patch passes suitable options to the configure stage of the distcheck process to read xkb files from the system location and write them to the distcheck _inst directory. Signed-off-by: Keith Packard <keithp@keithp.com> commit 52bc6d944946e66ea2cc685feaeea40bb496ea83 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 16 11:03:09 2009 +1000 kdrive: Purge Xsdl From the original Xsdl commit: "sdl x server so that we can x-on-x the fb stuff for ease of debugging. if anyone uses this in production, a big scary monster will eat them. hrm, perhaps i should make it have a --i-know-what-i'm-doing param that it doens't start without, heh" That should be reason enough to not spend time maintaing it. Also, no more elephants. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f713f447a2110718dfc091380699362d76f0cd6c Author: Lee Leahu <freedesktop-bugs@dyweni.com> Date: Mon Oct 19 15:43:59 2009 -0500 dmxDestroyWindow() - must call the X's native DetroyWindow() Don't really know why this section was disabled, but without it, certain pPicture resources do not get free'd until later in the FreeClientResources() process after the screen has been free'd - resulting in seg fault. With this patch, all resources normally free'd using vanilla X are now also being freed correctly by Xdmx. https://bugs.freedesktop.org/show_bug.cgi?id=24576 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 664a8e37fd83141974b772980f680b94e48b4f87 Author: Lee Leahu <freedesktop-bugs@dyweni.com> Date: Sat Oct 17 00:45:44 2009 -0500 dmx: when setting up device axis, use the correct counter number Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 010d5e28655d619693632938e9e4325eef938295 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 16 10:01:13 2009 +1000 dmx: remove doxygen-generated files. These can be recreated by simply running 'doxygen doxygen.conf' in hw/dmx/doc. Some of the files do not exist anymore, these have been removed. Some other files have a different naming scheme. Doxygen warnings about missing links fixed, two warnings remain: /home/whot/xorg/xserver/hw/dmx/dmxwindow.c:142: Warning: explicit link request to 'dmxConfigureRootWindow' could not be resolved /home/whot/xorg/xserver/hw/dmx/dmxwindow.c:119: Warning: explicit link request to 'dmxConfigureScreenWindow()' could not be resolved Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ff3e171568c8b604fc5eacd5f7e9b7ee9417f172 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 16 10:26:21 2009 +1000 xkb: don't conditionally include xkb-config.h. If HAVE_XKB_CONFIG_H is ever undefined, we fail to build anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0b9dbd4bf2d1061514bebd28648538a5fc0b60e6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 16 08:24:37 2009 +1000 Use the default XKB settings for dmx and kdrive. Drop the dmx-specific defines, there's no reason to have separate ones considering they're about as hardcoded as the default rules anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e08d8a2b043e5be821c5e8b2dbf37b09102b5d01 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 24 11:25:28 2009 +1000 kdrive: silence tslib compiler warnings tslib.c: In function 'TslibInit': tslib.c:157: warning: unused variable 'tsDev' tslib.c:156: warning: unused variable 'inputent' tslib.c:155: warning: unused variable 'inputdir' tslib.c:154: warning: unused variable 'i' tslib.c:154: warning: unused variable 'fd' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 522ca8179ad2b2b935993f08c9382cd5ad1d8b2f Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Tue Oct 20 04:18:01 2009 +0700 Remove unused LinuxFindPci and LinuxGetPciCfg These two functions are not referenced from inside xserver. Remove now-empty klinux.h too. Signed-off-by: Keith Packard <keithp@keithp.com> commit 63f4bf39170eb2262617ef2dc95fd6d337b9dad5 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Oct 19 13:07:26 2009 +1000 Fix make dist after 78c87bdad1feab91c2a39e01513b4b0826665f06 Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 2bd71a6db241924bd17ac9dd4aa38e7e563ee5c1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 16 22:29:26 2009 -0700 Fix segfault when -extension XKEYBOARD is passed on the command line Users should be told they can't disable XKB or XInput via error messages, not core dumps. Reported by T`2 on #xorg irc Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a32b2420d85f076282721afe005e85fff7d9837e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 15 13:50:36 2009 +1000 kdrive: fix Xfake build by removing the old keysym stuff Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 7c31dd5db8b43c7796bf97a07e08213af5afd2ae Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 04:24:25 2009 -0500 Remove CopyISOLatin1Lowered This function was moved verbatim into libXfont-1.4, and it is not used by the server or any drivers. Exporting it in both places leads to multiple definition linking errors on Cygwin, where we need to use a static libXfont due to poor weak-symbol handling. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 9bc4e88d84daf0f4faf0599b575675e74c75f4b8 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 01:53:43 2009 -0500 Define ddxBeforeReset stubs in platform-neutral DDXs XWin uses ddxBeforeReset, which is called in DIX. Other DDXs need to define these in order to avoid an undefined symbol error at link time when building alongside XWin. Xnest and Xvfb already provide empty stubs; this does the same for Xdmx and the platform-neutral KDrive servers. Also add a prototype to avoid a warning in all DDXs. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit a2f27b97900f335cd5f6a3e5bf8fa1d0ec9eb9ac Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 01:53:42 2009 -0500 Remove duplicates from Xfake_LDADD KDRIVE_LIBS already contains the libs in XSERVER_LIBS, so linking against both leads to multiple-definition errors when linking on Cygwin. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit ed4c6bc79a797830895ad6c3601318b2d1c4bdcb Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 01:53:41 2009 -0500 Fix XWIN_LIBS definition Move XWIN_LIBS from XWIN=auto conditional to XWIN=yes conditional, otherwise the build breaks if an explicit --enable-xwin is passed to configure. Also remove obsolete library values from the definition. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit bcd0c02cfd0707b5f8b1ca91dfbe4412df2c643e Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Thu Oct 15 01:53:40 2009 -0500 Install SDK pkg-config and aclocal files only if XORG Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 264ce9e8360374b3a43442c8bdea08abde705446 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 14 20:33:53 2009 -0400 xselinux: Use the now-exported IsPointerDevice() instead of a copy. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 0ae1632be045bfbb288bb57190c830f94247460f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 14 20:32:28 2009 -0400 dix: Export IsPointerDevice() and IsKeyboardDevice(). Makes the functions available to extmod for extensions to call. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 6c2ae5fec552366e11ad64a27626eb5dec4becf0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 22 13:31:49 2009 -0700 xselinux: switch from x_device to separate x_pointer and x_keyboard classes. This will allow separate controls over pointer and keyboard without having to relabel the devices to separate types. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 4be354c4c2da5168b302601b91bd80cfaca7e193 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 22 13:18:44 2009 -0700 Remove some debug messages that trigger on XACE event delivery failure. It is normal for XACE to deny an event delivery, so these log messages shouldn't trigger when that happens. Just drop them for now. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit c4ffce4dc84a0a9d134a59b7e7765c99ed767e53 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 22 13:13:03 2009 -0700 xace: Relax permissions on XkbGetState from Read to Getattr. This request is used to get the current keyboard group and is called from GTK. It does not return an actual keymap (aside from modifiers) so it should be safe to relax the permission on it. However it does return button state information which should be controlled through a separate pointer Read check. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 0ff28319906eeb3f236acd72201c416ce01f2c6e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 15 19:41:04 2009 -0400 xselinux: Stop special-casing QueryPointer access checks. XACE has been changed to not return BadAccess on device read failures. Thus, no need for this workaround code. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 8502c06e19a4c00bf1311f54f9a365ee9e026e97 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 15 19:29:34 2009 -0400 xace: Fake return values on denials in input polling requests. Instead of returning BadAccess when "read" permission is denied on a device, falsify the device state (buttons down, keys pressed). This is nicer to applications, but may still have undesired side effects. The long-term solution is not to use these requests in event-driven code! Requests affected: QueryPointer, QueryKeymap, XiQueryDevice. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 0493935691e925ae137af7636fa15befa76c8b45 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 31 21:20:53 2009 -0400 xselinux: Factor out some dynamic array code into common helpers. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit ae8891ba0b63bfe6941a324e201d9ab7c645c0f3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 31 18:46:23 2009 -0400 xselinux: refactor extension code into smaller files. New files: xselinux_ext.c: Extension init and request handlers. xselinux_hooks.c: XACE hook functions and other callbacks. xselinux_label.c: Object security-labeling code. xselinuxint.h: Shared internal functions. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit a60e676f1fd243c78859440b87652f523d3f2ec1 Author: Julien Cristau <jcristau@debian.org> Date: Wed Oct 14 23:51:22 2009 +0200 Add libgcrypt as an option for SHA1 Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org> commit d2a6a395435919aff8943285f9cbfe6569a9728f Author: Julien Cristau <jcristau@debian.org> Date: Wed Oct 14 23:30:55 2009 +0200 configure: add --with-sha1={libmd,libcrypto} option Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org> commit 55516094947dd78ad2734bb784a2fb109b64c990 Author: Julien Cristau <jcristau@debian.org> Date: Wed Oct 14 23:20:44 2009 +0200 Move SHA1 computation from render/glyph.c to os/ Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Rémi Cardona <remi@gentoo.org> commit 22b38f513c93c2f2aea5909878c3c9acae7d35c1 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Oct 3 12:44:50 2009 +0100 Cygwin/X: Avoid a potential null pointer dereference before input initialization Avoid a null pointer dereference if WM_MOUSEMOVE occurred before the input device had been initialized (a timing sensitive bug occassionally seen during initialization) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 1b0dfd8dee639870725d3bd9b70c3bd589d09e5a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Jul 21 02:23:21 2009 +0100 Cygwin/X: Make -logverbose affect the verbosity of logging to the log file Make -logverbose affect the verbosity of logging to the log file, not just the verbosity of logging to the console Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> commit 83d120b90482d356be730f63aead0f8e44a4e846 Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Oct 1 14:47:22 2009 +0100 Xming: Fix various 'ISO C90 forbids mixed declarations and code' warnings Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 78c87bdad1feab91c2a39e01513b4b0826665f06 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Sep 25 17:49:59 2009 +0100 Xming: Remove unused X-boxed icon resource Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit fdf7f7e95c852734c620f58df408a324902172cf Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Sep 25 17:46:40 2009 +0100 Xming: update .rc file Remove the obsolete DISCARDABLE flag in the .rc file Replace the obsolete DIALOG resource with DIALOGEX in the .rc file Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 5ddfd9d0898629627e8ab10e65ea2e082be3af37 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sat Oct 3 13:07:23 2009 +0100 Cygwin/X: Don't build rootless extension code unless we need it Only try to build rootless extension code if we really need it (i.e. mwextwm mode is enabled) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 25344ba7f7845654364d62bf15322b3b79465bd9 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Tue Oct 13 20:14:58 2009 -0500 dolt: add Cygwin to supported platforms Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6e158003e80534ce007290f75c89d698aec1d00b Merge: 2b14e1420 5e762f0e2 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 13 18:40:42 2009 -0700 Merge remote branch 'mattst88/master' * mattst88/master: [alpha] assume we have __NR_pciconfig_iobase [alpha] don't return from void functions Fix undefined symbols on alpha Fix breakage on alpha caused by c7680befe5ae Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" commit 5e762f0e2f203b5121a3de3b9af3c8981b31a77f Author: Matt Turner <mattst88@gmail.com> Date: Tue Oct 13 20:42:14 2009 -0400 [alpha] assume we have __NR_pciconfig_iobase The code path if we didn't have support has been broken since before we switched to git. The pciconfig_iobase syscall has been supported since 2000. Signed-off-by: Matt Turner <mattst88@gmail.com> commit 46785c04bca16f495af3ed8d685aee939a1a8f39 Author: Matt Turner <mattst88@gmail.com> Date: Tue Oct 13 20:40:59 2009 -0400 [alpha] don't return from void functions Signed-off-by: Matt Turner <mattst88@gmail.com> commit 2b14e142039193ea854a02706662204f4f5f6db8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 13 12:54:56 2009 -0700 Rootless: src drawable window can now be NULL Fix a possible crash when pSrc->pDrawable is NULL. Signed-off-by: Colin Harrison <colin.harrison@virgin.net> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 5b91dfac6fbdf35288a4558638d4923e230ab8d3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 13 12:54:11 2009 -0700 Rootless: Abstract some of the Xplugin specific stuff which has crept into rootlessWindow.c The rootless extension now directly calls some Xplugin functions, and relies on types defined in Xplugin.h, which isn't very abstracted :-) This patch is a start at abstracting some of the Xplugin specific stuff which has crept into rootlessWindow.c. This has been done in a pretty mindless fashion, without much thought as to if the additions to the generic rootless interface are the correct ones There is some confusion as to if RootlesscolormapCallback() returns a Bool or xp_error_enum value (not so abstact), but I have no way of checking, of finding out if Xplugin actually checks the result :-) Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org> Signed-off-by: Keith Packard <keithp@keithp.com> commit 72f5874434c0c015b671c492c1318f35f1793668 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Oct 13 13:15:05 2009 +1000 dix: extend IsPointerDevice check to valuator-only devices. A device with valuators but no keys is definitely a pointer device and needs to be attached to the VCP. Otherwise, the class copying happens on the VCK and the VCP isn't updated with the events that are to be sent through it. This addresses the trigger for #24441, not the actual issue. Jury is still out on valuator+key devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit 1088073b11ed488c0df45af3867b900ef93c6fe1 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Oct 9 11:31:44 2009 +0200 EXA: Fix exaTryDriverSolidFill() for solid source pictures. Solid pictures have a NULL pFormat field, but their format is always PICT_a8r8g8b8. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 55305cf8db7787883bc80b7348eb626e609626f8 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Oct 9 16:08:15 2009 -0700 EXA: fix exaGetRGBAFromPixel to not loop forever on PICT_a8 picture Easily reproducible by running "rendercheck -t fill". It should be safe to just test against rbits for all colour components as we should always have values for r/g/bbits for PICT_FORMAT_COLOR formats. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Michel Dänzer <daenzer@vmware Signed-off-by: Keith Packard <keithp@keithp.com> commit b375be9285c40467578fac2f1360c29a75306ab4 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Oct 9 11:31:46 2009 +0200 composite: Revert changes from adding support for BGRA picture formats. They were aimed towards a since abandoned approach for making radeon KMS work on big endian machines, and Aaron Plattner pointed out that they break the Composite extension when the X server runs in 16bpp. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Tested-by: Aaron Plattner <aplattner@nvidia.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit c0a1bb511a4629bf5683d8a710dc4a1c577a5d44 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Oct 7 22:10:55 2009 -0700 Fix make warning: overriding commands for target `dix.O' Not only does automake generate unnecessary rules for dix.O on platforms for which SPECIAL_DTRACE_OBJECTS is false, it generates duplicate sets when "if SPECIAL_DTRACE_OBJECTS" is nested inside "if XSERVER_DTRACE" Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Keith Packard <keithp@keithp.com> commit b0dd6be2c8703f7062d45ac9fd646550c7d54e3b Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:38:44 2009 +1100 Cast small-int values through intptr_t when passed as pointers On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe. Casting through the pointer-sized integer type intptr_t convinces the compiler that this is OK. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit b680a89262efcfef4644adb4a61ae42ea0db0c93 Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:38:01 2009 +1100 Fix GCC warnings in xorg_backtrace Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 9bf2ff4faf730913de3073f346646a8727be41d4 Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:36:44 2009 +1100 Fix "possibly uninitialized" warnings in glx In both functions, "answer" was uninitialized if "compsize" was 0, but in that case __GLX_SEND_VOID_ARRAY(compsize) results in a call to WriteToClient for 0 bytes, which returns immediately without examining the "answer" argument. So initializing to a null pointer is as good as anything else. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit b422b532f3dcab54c53f61a66f2ad76059d1874a Author: Jamey Sharp <jamey@minilop.net> Date: Thu Oct 8 13:29:27 2009 +1100 Remove static MAXSCREENS limit from Xext/shm.c Dynamically allocate per-screen data in the SHM extension, instead of having a single static-sized array. Signed-off-by: Jamey Sharp <jamey@minilop.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 4df3e8c8053d9d4b3043f339a73d0de97020d884 Author: Martin Ettl <ettl.martin@gmx.de> Date: Thu Oct 8 13:27:30 2009 +1100 Resource leakage: 0 is a valid file descriptor When testing if an fd is valid, the required construct is >= 0, not > 0. [Daniel: Fixed up the Linux MTRR case as well.] Signed-off-by: Martin Ettl <ettl.martin@gmx.de> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 4151a13c80f3afa43f88afcf19a7aeb16dace93a Author: Francisco Jerez <currojerez@riseup.net> Date: Mon Oct 5 02:39:03 2009 +0200 dix: Fix a double free in dixFreePrivates. It can be reproduced when the server is regenerated and for some reason the private keys are reassigned in a different order: a manually allocated private may get an index formerly used by a preallocated private. In that case it will first be manually freed and then again by dixFreePrivates, as items[i].size was never zeroed out. Do it in dixResetPrivates. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Signed-off-by: Keith Packard <keithp@keithp.com> commit 34eddbbb73bb16395dba0818247909c1b4bee4c2 Author: Michael Cree <mcree@orcon.net.nz> Date: Wed Oct 7 18:33:29 2009 -0400 Fix undefined symbols on alpha Signed-off-by: Matt Turner <mattst88@gmail.com> commit 44efcdde501d54ca9c3e33ab5b1f699956fc3f9f Author: Jamey Sharp <jamey@minilop.net> Date: Wed Oct 7 09:07:03 2009 -0700 Fix overlay detection when matching Xv adaptors across screens. Signed-off-by: Jamey Sharp <jamey@minilop.net> Acked-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 68304215e25876ee639015969b4f07e1c9c515e0 Merge: 6676f49e3 315aaef55 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 6 22:41:42 2009 -0700 Merge remote branch 'alanc/master' Conflicts: configure.ac Signed-off-by: Keith Packard <keithp@keithp.com> commit 315aaef55750a863c08a16ad9120ffb76f9b48e0 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 2 21:54:53 2009 -0700 Use $(AM_V_GEN) to silence more commands when AM_SILENT_RULES is active Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2e294380b64b6362173d0590c4292f290e50af50 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 2 16:51:24 2009 -0700 Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONS Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Eric Anholt <eric@anholt.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4b0911565d18b1aefca564315d0f1b9b4a17aa65 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Oct 5 16:52:19 2009 -0700 Add platform tests for Dtrace linker magic Replaces special handling for Xquartz DDX and scales better to handling the multiple platforms that now have some level of Dtrace support available. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit 8c51b886400c5962b31ff565771be1b01a3ca8fb Author: Julien Cristau <jcristau@debian.org> Date: Tue Oct 6 16:08:42 2009 +0200 configure: quote argument to m4_pattern_forbid Without this, configure spits out ../configure: line 15460: ac_fn_c_check_member: command not found Also anchor the pattern to make it stricter. Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 6ee61578ddb9f880ef12bbe9c3671d7dd53f2809 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Oct 5 17:27:27 2009 -0700 Remove shave now that automake-1.11 has AM_SILENT_RULES Revert "Add shave so that we can see the steaming piles of warnings generated." This reverts commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b. shave was left in the xserver 1.7 release/branch to allow developers & distros time to transition to automake-1.11. xserver 1.8 series will require automake-1.11 for silencing build noise. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit d5d960f57834f16164457dab2e80290717dbf2cd Author: Kim Woelders <kim@woelders.dk> Date: Fri Oct 2 19:31:15 2009 +0200 render: Fix clip region translation in miClipPictureSrc(). Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Soren Sandmann Pedersen <sandmann@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d2118c8ca94fc7bcb8e0de547e63cf022f53a8a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 5 15:31:54 2009 +1000 xfree86: remove log-spamming DebugF All input drivers use xf86PostKeyEventP indirectly now and have been since it exists. I guess that qualifies it as tested - no need to spam the logs. Reported-by: Felix Wenk Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit bf116057c7efd43c247c93f2f5d733a5db857cc9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 5 10:44:43 2009 +1000 Require libXtst >= 1.0.99.2 and libdmx >= 1.0.99.1 libXtst requirement is already implicit since we require xextproto 7.1 and that doesn't go well with pre 1.0.99.2 versions of libXtst. Nonetheless, list it explicitly. Since d0440275108920f5cb5d630f55fc9a3320c496d3 we require dmxproto 2.2.99.1. Complementing that is libdmx 1.0.99.1 with the dmxext.h header file. Reported-by: Mark Rosenstand Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9625f6d328d6f516520930227b218979309938bc Author: Matt Turner <mattst88@gmail.com> Date: Tue Oct 6 20:58:30 2009 -0400 Fix breakage on alpha caused by c7680befe5ae Pinpointed by by Michael Cree. Commit c7680befe5ae removed Jensen support, but at the same time broke support for dense memory systems. Signed-off-by: Matt Turner <mattst88@gmail.com> commit aa07957373fd7cbe67458a001e4afd6a7f1ea37f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 28 12:20:03 2009 +1000 Revert "alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus" The vesa driver still uses slowbcopy_frombus and slowbcopy_tobus. This reverts commit 5ef53a94ce4e48e11de26290cd677266308640c8. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6676f49e34f8db7ef5767a6dbf6c2a4d2087f79c Author: Julien Cristau <jcristau@debian.org> Date: Tue Oct 6 16:08:42 2009 +0200 configure: quote argument to m4_pattern_forbid Without this, configure spits out ../configure: line 15460: ac_fn_c_check_member: command not found Also anchor the pattern to make it stricter. Signed-off-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit a0363bf7b135d816e73849c91fa53d98fd6072d1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Oct 5 17:27:27 2009 -0700 Remove shave now that automake-1.11 has AM_SILENT_RULES Revert "Add shave so that we can see the steaming piles of warnings generated." This reverts commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b. shave was left in the xserver 1.7 release/branch to allow developers & distros time to transition to automake-1.11. xserver 1.8 series will require automake-1.11 for silencing build noise. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit cbc886a3513079c084fb7ce47b87c3e5bba19f3f Author: Kim Woelders <kim@woelders.dk> Date: Fri Oct 2 19:31:15 2009 +0200 render: Fix clip region translation in miClipPictureSrc(). Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Soren Sandmann Pedersen <sandmann@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bd7430a32e63df8cd60352764744076448ee623f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 5 15:31:54 2009 +1000 xfree86: remove log-spamming DebugF All input drivers use xf86PostKeyEventP indirectly now and have been since it exists. I guess that qualifies it as tested - no need to spam the logs. Reported-by: Felix Wenk Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 1a2dde3335864abfbbc133dbc709f564272dd540 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 2 20:44:19 2009 -0700 Set XQUARTZ to no on non-Darwin OS'es Fixes build with dtrace probes on Solaris after efacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> commit c629e0fc50dfaffaa40a56709da7f035c289fed2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Oct 5 10:44:43 2009 +1000 Require libXtst >= 1.0.99.2 and libdmx >= 1.0.99.1 libXtst requirement is already implicit since we require xextproto 7.1 and that doesn't go well with pre 1.0.99.2 versions of libXtst. Nonetheless, list it explicitly. Since d0440275108920f5cb5d630f55fc9a3320c496d3 we require dmxproto 2.2.99.1. Complementing that is libdmx 1.0.99.1 with the dmxext.h header file. Reported-by: Mark Rosenstand Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 24e640e1fa6cfb3917ba90dcdabf1fadddff20aa Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 2 19:20:24 2009 -0700 XQuartz: Fix a possible minor memory leak commit c4886fbabc1d8b4054654b227fcad83f58e8e798 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 2 18:58:35 2009 -0700 XQuartz: Send mouse location with scroll events. This fixes the problem where (0, 0) was sent as the mouse location with scroll button events causing the event to not reach the client. commit 4c6bfa2c09ae2b0cffdf9211a6dfbcaefe0366b5 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Oct 1 10:39:19 2009 -0700 GLX: More clearly document the GLX protocol version handling Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 45f447dafded5adfe11b7df3325c2d8f6ae0639b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 1 21:19:11 2009 +1000 dix: force a minimum of 0 for screen coordinates. Currently the root coordinates may fall into ]-1..0] if the subpixel remainder is less than 0. Screen coordinates mustn't go below 0, so use miPointerSetPosition to cap off the remainder if the coordinates are below 0. This is cheating a bit, a more comprehensive solution to deal with subpixels correctly when crossing screens is needed. For now, this'll do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Simon Thum <simon.thum@gmx.de> commit 64fe5784b49347e1fd27b0c463be5c16557594c9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Oct 2 09:34:24 2009 +1000 configure: if xnest was requested but modules weren't found, fail. Tested-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Julien Cristau <jcristau@debian.org> commit 3ebb82d61c2b56e8f7145443a552a4e913bbfc80 Author: Dave Airlie <airlied@redhat.com> Date: Thu Oct 1 15:25:55 2009 +1000 rotate: drop unwrapping inside block handler. Keith has shown half the block handlers wrappers are wrong, also dynamic wrapping/unwrapping from what I can see will happen after the drivers, so its really accidental ABI, that we can't change now without modifing drivers. So be safe for 1.7. Signed-off-by: Dave Airlie <airlied@redhat.com> Declared-as-sane-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cb54cf1b3e8c4109541cfb698542c00f2473e731 Author: Dave Airlie <airlied@linux.ie> Date: Wed Sep 30 11:33:16 2009 +1000 glx: fixup deref of null pointer when glx screen init fails. I think this is what the original author wanted. Signed-off-by: Dave Airlie <airlied@redhat.com> Acked-by: Ian Romanick <ian.d.romanick@intel.com> commit 3d7cf468df96c0130a862f0d93fec990b9110c2f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 1 11:58:18 2009 -0700 XQuartz: Update version strings to be X11R7.5 and the bundle 2.5.0 Is fink really _still_ relying on this X11R7.x version string? commit 85b831f701d085e514afcf8a5ce9b11f8a57984e Author: Julien Cristau <jcristau@debian.org> Date: Thu Oct 1 17:27:11 2009 +0200 xfree86: fix xorg.conf manpage formatting error commit 9bc7cbf9c02656982c2525836b5498993f708e02 Author: Nirbheek Chauhan <nirbheek@gentoo.org> Date: Tue Sep 29 22:35:06 2009 +0530 xkb: check permissions on XKM_OUTPUT_DIR Checking just for root is insufficient since that does not guarantee write/read permissions in XKM_OUTPUT_DIR (for example with sandbox). Check if we can write a file, as well as read it later. Otherwise, invoke the fallback to /tmp Signed-off-by: Nirbheek Chauhan <nirbheek@gentoo.org> Signed-off-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 622fc98fd08aba98369e6933c3ab8c9ff85385d5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 1 10:03:42 2009 +1000 render: Fix crash in RenderAddGlyphs (#23645) This patch fixes two bugs: size is calculated as glyph height * padded_width. If the client submits garbage, this may get above INT_MAX, resulting in a negative size if size is unsigned. The sanity checks don't trigger for negative sizes and the server goes and writes into random memory locations. If the client submits glyphs with a width or height 0, the destination pixmap is NULL, causing a null-pointer dereference. Since there's nothing to composite if the width/height is 0, we might as well skip the whole thing anyway. Tested with Xvfb, Xephyr and Xorg. X.Org Bug 23645 <http://bugs.freedesktop.org/show_bug.cgi?id=23645> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit 758ab55d2defc78d0169fd61a7036eb9f889e9e7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Oct 1 15:22:19 2009 +1000 render: set the glyph picture to NULL by default. In a follow-up patch we may have glyphs with a NULL picture. To cope with that, always set the pictures for glyphs to NULL at creation time and cope with cleaning up such glyphs. Also, since compositing a NULL source doesn't do a lot anyway, skip trying to do so. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com> commit b5fcc5553eb784c9f4826936e839079c0cdee55a Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Oct 1 15:17:11 2009 +1000 exa: avoid infinite loops if UTS sw fallbacks. The upload in finish access can cause an infinite loop if UTS returns FALSE in here. Fixes fd.o bug #24246. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit db98b26ee145f70e732e2cf4a6ac3de77fdf4adc Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 30 11:40:19 2009 -0700 Re-fix DGA removal. Removing DGA ended up breaking any drivers calling into the old xf86DiDGAInit function as it tried to see if DGA was already enabled and ended up crashing if the VT wasn't completely initialized. Oops. Also, if the driver initializes DGA itself, have the DiDGA initialization overwrite that information as the DiDGA code will call ReInit on mode detect. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 873467adad479be02cd9cc6b43685919f5612d91 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 30 00:22:02 2009 -0700 XQuartz: Set the proper bitmap for key repeats... XkbSetRepeatKeys lies and doesn't do what it says it will... commit 7bef78e199a4e4f7916be506807513efcd8fd4cb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Sep 29 23:40:47 2009 -0700 xkb: Use XkbPerKeyBitArraySize instead of hardcoded value of 32 commit 4970666827e65424ee17ccf6341ff84aac974383 Author: Kim Woelders <kim@woelders.dk> Date: Tue Sep 29 20:31:45 2009 +0200 dix: Fix potential memory corruption in doListFontsWithInfo. Signed-off-by: Kim Woelders <kim@woelders.dk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6ffda5aae75272fabdc27d6f693ae827be119e95 Author: Dave Airlie <airlied@redhat.com> Date: Tue Sep 29 11:49:09 2009 +1000 dix/glx/composite: consolidate visual resize in one place. The previous code was copied and in both cases incorrectly fixed up the colormaps after resizing the visuals, this patch consolidates the visual resize + colormaps fixups in one place. This version also consolidates the vid allocation for the DepthPtr inside the function. I'm not 100% sure colormap.[ch] is the correct place for this but visuals are mostly created in fb and I know thats not the place to be resizing them. Fixes fd.o bug #19470. Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ad5c0d9efa47476ed5cf75c82265c73919e468b4 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Tue Sep 29 16:43:43 2009 -0700 GLX: Enable GLX 1.4 on DRI2 Return the minimum GLX version supported by all screens. Assume that DRI2 screens have all the required features for GLX 1.4. Assume that everyone else can only support GLX 1.2. Reviewed-by: Kristian Høgsberg <krh@redhat.com> Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit f11a356bcef1bc0a6440325019d5967b745a42dd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 28 17:05:29 2009 -0700 XQuartz: Cleaned up keymap setting for easier maintenance (cherry picked from commit b9dfed9e88389cbd29406a20d38ee4297638649b) commit f3223c71cfc638e695981e527517d48ea00d124d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 28 23:01:59 2009 -0700 XQuartz: Remove the redundant xquartz_resetenv_display unsetenv(DISPLAY) takes care of this for us anyway (cherry picked from commit d2263645d839c9edeedea0835d26f1f41b37f70e) commit 9b98b883227ed23d5470e8de689afeec4a0fd742 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 28 17:47:31 2009 -0700 XQuartz: Query the BundleIdentifier from the bundle in X11.bin rather than using the configure option. This lets X11.bin drop into any .app ... the Info.plist and Xquartz binary need to have it hardcoded still. (cherry picked from commit 9ad16b8e50b13eb6d0cd20386d07aa8d7320f671) commit 11817a881cb93a89788105d1e575a468f2a8d27c Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Sep 29 08:56:59 2009 +0200 Fix ShmPutImage non-ZPixmap case. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23298 . commit 19be992d9dc542b61fa3f4fd32a09071c9e64880 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 28 14:18:45 2009 +1000 ephyr: if -parent is given, check for a trailing -screen. (#24144) If -parent is given, don't open up a new window if -screen is given as well. The commandline option -screen allows to set the depth of the embedded Xephry instance, even though width and height are autoscaled on -parent. This patch checks for a -screen parameter after -parent and - if one is found - delays initializing the screen. The parent window id is stored temporarily but re-set after a -screen argument. The following command is thus valid: Xephyr -parent 1234 -screen 640x480@8 -screen 1024x768 It embeds the first 8-bit screen into window 1234 and opens up a new window for the second screen. Multiple parent arguments are possible, the screens are embedded in-order. X.Org Bug 24144 <http://bugs.freedesktop.org/show_bug.cgi?id=24144> Tested-by: Vic Lee Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit efacd7bfd08ffc0725de6f639c6afbf3b2f6c9fe Author: Ben Byer <bbyer@freedesktop.org> Date: Sun Sep 27 10:35:53 2009 -0700 Add (ok, fix) support for DTrace under OS X (cherry picked from commit 8428a57184f542941d2c8c90e97d18e111a69dd2) commit b3415187e92960cbff784108b5a3a8d130dc34c5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 23:09:51 2009 -0700 Rootless: Correct border rendering on parent-relative windows Resurected code from the punted RootlessPaintBackground/Border and added it conditionally to miPaintWindow (cherry picked from commit cf2e3312cff3f341e9edba8c321a4ca7ffd8748e) commit 6df00917cab5c1096070625385fd76ee6c52e0f1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 23:00:59 2009 -0700 XQuartz: Fix QuartzSetCursor to match the expected prototype. (cherry picked from commit dadab5a2279a19dcf709402d7f22f0cd48670db0) commit 67a51cd9ef60b4c9f25fdde84f9eb352936c8c67 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 22:57:25 2009 -0700 XQuartz: Fix a bunch of compilation warnings about style (cherry picked from commit 54000bdcbca52a2de31f7c1a1147de6d8e9dbbb8) commit 96780eaf32636c94a9cf33f22eb9f01d984ff754 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 22:29:49 2009 -0700 XQuartz: Nuke TSM It's deprecated in SnowLeopard. Ben and I both have no idea what it is for. It says something about unicode input, but urxvt seems fine taking in unicode, so /shrug... bye. (cherry picked from commit 29cb904e4de2411a9b6dbe68694954788f0525f7) commit 15e15816a2f011d0aeeaff9e394d30a147c973ce Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 22:26:22 2009 -0700 XQuartz: Fix inverse map from mode_switch to alt (cherry picked from commit de6cee11e1c335a0e5f708e7641e81d3cfe52529) commit 558d803b2966c2e44345a80e635e091dc3e49f02 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 18:25:57 2009 -0700 XQuartz: Force a keymap resync on the first keypress to workaround XKB mucking with our keymap. We need to find a better way to work with XKB on this. (cherry picked from commit ceaa5c779ceed3de5ea53727649613be3133b24e) commit 226b1033b48807fd6871ba626e20ef1411904939 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 17:08:12 2009 -0700 XQuartz: Transition from xEvent based mieq to InternalEvent (cherry picked from commit a3dbde2de87ee4f577748a8c447501a3ea462559) commit 0c2731596f27f2cdf5000ba41de37e7eb86ad6f9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 28 15:07:48 2009 +1000 Put tests for zero-sized strings in quotes (#24060) X.Org Bug 24060 <http://bugs.freedesktop.org/show_bug.cgi?id=24060> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 83023ffd09a84ff48e6b99f57ebad101a00478db Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 28 13:59:25 2009 +1000 xfree86: use the DDC size if either width or height of DisplaySize is bogus. If either width or height of DisplaySize is invalid, assume that the configuration is invalid and use the DDC-reported values instead. See Comment 9, Bug 9758. http://bugs.freedesktop.org/show_bug.cgi?id=9758#c9 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dave Airlie <airlied@redhat.com> commit f772014c435f56db56520ca13ffa39431684f122 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 23 10:53:51 2009 +1000 render: Plug a memory leak in AddGlyph. (#23286) AddGlyph was missing the FreePicture() call that DeleteGlyph used, resulting in a memory leak when more than one Glyph was added in a RenderAddGlyphs request. Since the code in AddGlyph and DeleteGlyph is identical, move into a static function to avoid such mistakes in the future. X.Org Bug 23286 <http://bugs.freedesktop.org/show_bug.cgi?id=23286> commit 3db28f92b0c810b452506abbed299a204c90ba0b Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Thu Sep 24 12:57:02 2009 +0200 configure: make XNEST default to auto. When we're checking whether to build Xnest, we're comparing the variable to auto but before it never was assigned that. Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de> [Xnest was enabled to yes to increase build exposure and catch compiler errors early. The requirements to Xnest are quite low and I expect most developers have them, so Xnext will be enabled on most boxes. Anyone missing those requires probably doesn't want to build Xnest anyway.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 78ad6ca9a97440b74019c00a28144ea7d1e03431 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sun Sep 27 17:30:23 2009 +0200 xfree86: Hurd fix I hadn't paid attention that the parameters order had changed, here is a trivial patch, please apply. Signed-off-by: Julien Cristau <jcristau@debian.org> commit fb7938315bed9d4cb5641ee9acebf78a13bc109e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 27 09:48:43 2009 -0700 Xi: Make CopyKeyClass X_HIDDEN to avoid ugly ifdef-fu (cherry picked from commit 6d436e17a9ae7f4ce8537f3fabc052d4f07ca75f) commit a2cd21177859eb45320a94c96dde7d9058ab7650 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 26 23:41:45 2009 -0700 XQuartz: Stop checking version numbers of the bundle because CFBundleGetVersionNumber is gimpish (cherry picked from commit 9f5bdd89608ec12012592ff395b82e954fbb4da8) commit fbfbf93405222322571e15e78dea57c8f2755eae Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 26 22:52:39 2009 -0700 XQuartz: Add pressure/tilt property labels (cherry picked from commit 84ea67130ef6b4086042aad6036ce66f93ea3e56) commit 65f14840898dd7e9d61d8c966f3ff11ae3e82d4f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 26 22:48:49 2009 -0700 XQuartz: Fix a brain-o array indexing problem /bop Peter (cherry picked from commit 494a6b046a258ad83dc98eb92b7c3d8f1d2626bb) commit 7159381881e5da33a49e8735811b93cbfe4f681e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 26 22:17:09 2009 -0700 XQuartz: Nuke duplicate locks that make painful headaches (cherry picked from commit 1dd56322bd1722f2427fb2d833c5608248b60cf0) commit fba8c702ba6aa8fac27682e0838fd744e197d54f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 26 22:13:49 2009 -0700 Xi: CopyKeyClass is not static for XQuartz (cherry picked from commit 85d6402354cdf143c6490f2725744c2f08b5605b) commit dc1e1bebff8b9d1eb6196dfd4b2f52f1e4200efa Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 7 00:02:21 2009 -0700 XQuartz: Use internal xshm header for new xextproto (cherry picked from commit 1755239330c0bdac820d88a3e06ff391d65f29be) (cherry picked from commit 697be460d0e555e2c75eed6889293650e02d423c) commit 73ae547d5e687ef10dea45801fc627e10ac4b659 Author: Michel Dänzer <daenzer@vmware.com> Date: Sun Sep 27 02:08:10 2009 +0200 EXA: Fix mixed pixmaps crash with missing / failing UploadToScreen hook. For the recent mixed pixmaps changes, I failed to realize (or hit in my testing) a problem which can occur if the driver doesn't provide an UploadToScreen hook or provides one which can fail: There can be a crash in exaMemcpyBox() because exaCopyDirtyToFb() passes pExaPixmap->fb_ptr to exaCopyDirty(), but that's normally NULL with driver allocated pixmaps. The solution is to make exaCopyDirty*() no longer rely on pExaPixmap->fb_ptr but use pPixmap->devPrivate.ptr after PrepareAccess instead. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24167 . commit c9ec2bab2f258798fd6e6676698c732f09571a60 Author: Kevin E Martin <kem@redhat.com> Date: Sat Sep 26 13:10:54 2009 +1000 dmx: undefine MITSHM, move undefs to miinitext.c. This patch undefines MITSHM for dmx - we don't support the required screen->ModifyPixmapHeaders. All undefines are moved from dmx-config to miinitext.c, where they belong. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fc9d733bab3ff0e4e51b19c73b66196dca563a70 Author: Kevin E Martin <kem@redhat.com> Date: Sat Sep 26 13:09:52 2009 +1000 dmx: reshuffle linker order to avoid errors when MITSHM is undefined. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e7c2598f565e8252dd66ee3e6212b310856476cb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 25 14:53:33 2009 +1000 dmx: core events are always in screen coordinates when passed to GPE. This fixes input in dmx, the pointer appears at the right positions to the clients now. Also mark the spot where we pass in the button state as valuator to GPE with a FIXME. (??) Tested-by: Kevin Martin Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 43a2eb794f19a2ba56d653f465fc5f6b2ff0d3d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 23 21:49:11 2009 +1000 configure: Unify all library defines that require a specific version. This patch moves all libraries that require a specific version into a single location instead or duplicating them across the configure.ac file. Libraries that do not require specific versions are left where they are. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9bd08c690fc687c4d69bb70536f3079a9184476d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 24 14:07:26 2009 +1000 Xi: update axisVals with the right subpixel data. Subpixel data in data_frac is stored as FP32.32, hence we need to get that down again before adding it to the current value. Reported-by: Thomas Jaeger Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit abb8108fb44cc9b08fe4ae7d805a0a22564ca6bb Author: Michel Dänzer <daenzer@vmware.com> Date: Sat Sep 26 02:05:24 2009 +0200 EXA: Only calculate cache position once for each glyph. commit c11678cc189551f2a01eaa7a63969c16950739b4 Author: Michel Dänzer <daenzer@vmware.com> Date: Sat Sep 26 02:05:06 2009 +0200 EXA: Accumulate arbitrary number of glyphs without flushing. commit 0369eeeb6bf8a808fa2df503fc8b8df81e6e07b8 Author: Michel Dänzer <daenzer@vmware.com> Date: Sat Sep 26 02:04:48 2009 +0200 EXA: Try to minimize UploadToScreen calls for mixed pixmaps. If there are several software fallbacks affecting the system memory copy of the same pixmap, only copy the results back to the driver pixmap when it's used for acceleration again, or in the BlockHandler, whichever happens first. commit 1818cbd70fc1f2e1487b4c678e67e28f1265c0ef Author: Michel Dänzer <daenzer@vmware.com> Date: Sat Sep 26 01:59:39 2009 +0200 EXA: Extend mixed pixmaps scheme to allow driver PrepareAccess hook to fail. If the PrepareAccess hook fails, use the DownloadFromScreen hook to retrieve driver pixmap contents to a system RAM copy, perform software rendering on that and copy the results back using the UploadToScreen hook. Use the classic migration logic to minimize transfers (which as a bonus allows slightly cleaning up some of the existing mixed pixmap code). This enables things that weren't possible before with driver-allocated pixmap storage: If some (or all) GPU pixmap storage can't be mapped directly by the CPU, this can be handled between the PrepareAccess and DownloadFrom/UploadToScreen hooks, e.g.: * Radeon KMS on big endian machines can fail PrepareAccess if the pixmap requires byte-swapping and swap bytes in DownloadFrom/UploadToScreen. * Environments where GPU and CPU don't have a shared address space at all. Here the driver PrepareAccess hook will always fail and leave all transfers between GPU / CPU storage to the Download/From/UploadToScreen hooks. Drivers which can handle all pixmaps in the PrepareAccess hook should notice little if any difference. commit e23bffc41b007f1bc2b8f5cd4ac54213062c95cc Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 19:17:48 2009 -0700 Fix build of unit tests when dtrace probes are enabled ar loses the dtrace probe magic when building static libraries, so we have to link with the .O files in order to resolve the dtrace probe symbols. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 9fa73be9fa543a686ea35c861084f5af37d44caa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 22 20:34:54 2009 +1000 Require libXext >= 1.0.99.4 Reported-by: Tilman Sauerbeck Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a9c274df5c37cb4ece6449e934342d8ff8e61705 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 23 11:43:27 2009 +1000 kdrive: plug two memory leaks when freeing the KdKeyboard/Pointer. xkbRules, xkbModel and xkbLayout are strdup'd in KdNewKeyboard, need to be freed. The ephyr driver strdups the name on top of the already allocated kdrive-assigned name. Memory must be freed beforehand. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fd913136732ff14a0484ca28f60ac1fbf49be81d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 23 11:44:12 2009 +1000 dix: plug memory leak in DeviceEnterLeaveEvents. 'event' must be freed before exiting. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6ee796e9bb4e46782b50a69c7b4fa5b49576f139 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 24 14:05:52 2009 +1000 Xi: fix length calculation for ValuatorState in QueryDeviceState reply. The length field needs to include the bytes required for the valuators (INT32) as well. The reply length has the right value and since the valuator state is always last, clients didn't notice the wrong offset. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3b5bbb149d4c932d9624336f5cbe9fe71c87bea3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 23 12:32:44 2009 +1000 configure: fix up tslib check once again. This patch addresses two issues: The check for HAVE_TSLIB = xauto can never be true, the check has been corrected to TSLIB = xauto. Pre-pkgconfig versions of tslib fail to be found, this patch restores the additional AC_CHECK_LIB. However, the pgk-config check must happen before AC_CHECK_LIB, as AC_CHECK_LIB does not seem to honour the LD_LIBRARY_PATH. Thus, if tslib is installed outside of the default paths, AC_CHECK_LIB fails. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked--by: Daniel Stone <daniel@fooishbar.org> commit 5402f18d9c3f7ba19cc05b3a814e3a9e94c8d551 Author: Thomas Jaeger <thjaeger@gmail.com> Date: Tue Sep 22 20:16:21 2009 -0400 dix: report XI1 axis values correctly if first_valuator != 0 Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33bf9cb69dccbb6889b2f83e6db61f40dc644e17 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 23 17:41:28 2009 -0700 XQuartz: GLX capabilities: Allow 16bit accumulation buffers http://xquartz.macosforge.org/trac/ticket/308 (cherry picked from commit e9e63a2118b76b6c31c4081fec08a99e4d796e22) commit ce1fe8ddb4a4dbe6cfd909e5b1b73b459d742bec Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Sep 23 13:10:05 2009 +0200 render: Don't add b8g8r8x8 format for depth 24. The components are required to be packed in the bottom of the pixel, so this format can't fit in depth 24. Also fix up a comment for the addition of BGRA formats. commit 096f21bb7a1217443d8a03529b1a2938518eb24f Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Sep 23 08:24:06 2009 +0200 EXA: Fix some issues pointed out by clang. Remove dead variables, fix use of uninitialized values, that kind of thing. commit 824a09d856a5f750694e11d2fd2faaa3de705eaa Author: Simon Thum <simon.thum@gmx.de> Date: Mon Sep 21 15:23:27 2009 +0200 dix: move bounds check before access Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9edb9e9b4dde6f73dc5241d078425a7a70699ec9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 22 12:56:17 2009 +1000 Bump to 1.7.99.1 X Server 1.7 has branched off. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 66ece3bfb19642bf0f1ef73c3caa8a99c3dfb5a9 Author: Kevin E Martin <kem@redhat.com> Date: Tue Sep 22 11:42:24 2009 +1000 dmx: only free the default pixmaps that we actually allocated. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 20fb8c2e2fccb28c1b89e6e2a5c685e1287baedb Author: Kevin E Martin <kem@redhat.com> Date: Tue Sep 22 11:41:33 2009 +1000 dmx: disable Get/SetWindowPixmap, we don't support composite/redirected windows Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fcdc1d78cca3b8bb6b77d53eda7e21d649df6943 Author: Keith Packard <keithp@keithp.com> Date: Mon Sep 21 19:16:59 2009 +0200 Fix sporadic segfault on resume due to accidentally freeing cursor. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 91e1fe5863a180b2d70a6943e83b98bbd4c9ebce Author: Matthias Hopf <mhopf@suse.de> Date: Mon Sep 21 19:13:31 2009 +0200 Revert fe31f9c + 977953b to fix issue for good. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 90aa0e4a49cdd637178a771365e1e8dab8bceb87 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 18 10:03:02 2009 +1000 input: don't use typecasts to access members of InternalEvent. To avoid confusion, the member names are now postfixed with _event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 693d4fdb1c7b7c789a812790122454e718602449 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 22 11:13:58 2009 +1000 Xext: switch mbuf.c to dixLookupResourceByType Resolves a linker error caused by LookupIDByType. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 493d2f9c2fc56dd3b4c03451c07cd25e3012142e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 22 11:05:07 2009 +1000 Xext: remove DisplayImageBuffers from mbuf.c Not referenced by anything. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fff40b3353c7025c1d1e3dd14b5c78f7c9f5de7c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 22 10:53:47 2009 +1000 Xext: fix up multibuffer compiler errors. Triggered by the xextproto 7.1 change, fixed by moving the matching declarations from the header file to here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4c8f834da6c8c84849313453fe223a8165c6afc0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 21 14:52:31 2009 +1000 configure: fix up check for tslib. Reduce the tslib-check to the pkg-config check only instead of the previous library symbol check followd by a pkg-config check. This patch also reduces the required version of tslib back down to tslib-0.0. Unfortunately, the 1.0 tarball available through http://tslib.berlios.de/ still announces itself as 0.0.2. Reported-by: Werner Landgraf Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 977953bf14858d17c22208c848854ddbe7e86527 Author: Matthias Hopf <mhopf@suse.de> Date: Mon Sep 21 15:44:00 2009 +0200 Less intrusive workaround for sporadic segfault on resume. Hopefully fixes fdo #24010 (memleak). commit 55747d256d759850141e4a9c4dec965616a31dc8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 18 16:27:54 2009 +1000 input: define server-supported protocol versions in one single file. include/protocol-versions.h specifies each extension version as supported by the server and sent back on the wire to the client. This fixes up several issues with the server potentially reporting a higher version of the protocol if recompiled against a newer version of the protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Rémi Cardona <remi@gentoo.org> Acked-by: Julien Cristau <jcristau@debian.org> commit 0b7c6c728c2e2d8433a188315cc591308a89cd85 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 18 21:12:17 2009 -0700 xfree86/modes: Remove all framebuffer support from DGA This removes all rendering and mapping code from xf86DiDGA, leaving just mode setting and raw input device access. The mapping code didn't have the offset within /dev/mem for the frame buffer and the pixmap support assumed that the framebuffer was never reallocated. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d3a3c904e5e3b5e8bb3c51ca6a563880ff589bf3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 21 09:41:46 2009 +1000 configure: resourceproto is optional. Although a --disable-xres flag is provided, resourceproto was listed in REQUIRED_MODULES since 2005 (5b218617fa8ba52bf65aef35da39e06c662495e6). Remove, make conditional on the xres flag only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b9ae1b91f316a98eb3bbefe1fc61f3e0faa861e0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 21 09:22:53 2009 +1000 dmx: silence 'implicit declaration of function ‘XFixesSetPictureClipRegion’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit aa71e268f55ac39351814ab6840196c4f58bad39 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 18 11:35:47 2009 +1000 Xext: silence 'warning: no previous prototype' for sync, bigreq and xcmisc. xcmisc and bigreq don't have their own header so just declare it here to shut up the compiler. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00dfe69aab786ea650b41dfefc031f0e0fc72b0c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 17 14:48:51 2009 +1000 randr: reply with the server or client version, whichever is lower. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8b75d0f9d347d7c3aad1e53809e0a2bed03b92fc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 17 14:17:54 2009 +1000 render: reply with the server or client version, whichever is lower. Protocol requires that the lower of [server version, client version] is returned to the client. The other part of the issue discussed in reply to [1] remains. [1] http://lists.freedesktop.org/archives/xorg-devel/2009-September/001990.html Reported-by: Julien Cristau Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 20ccc66708bcd55372bff03fa0d78a7846e8c82d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Sep 20 21:12:31 2009 +1000 xfree86: silence warning: ‘ramplen’ may be used uninitialized 'ramplen' is only set and used if stuff->size > 0 but the compiler doesn't pick that up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2df10a49867635c341b1d1a9faadf4dbae043a0f Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:38 2009 -0700 RRDestroyOutputProperty: Free randr property valid values These were leaked when the property was destroyed. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d3a84906c00b8fe4a4e33fa89bff3ed66ceafdec Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:37 2009 -0700 Free randr crtc and output pointer arrays All of the crts and outputs were freed, but not the arrays full of pointers to them. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6086a6065666fb9ded5d99919ddfa51c66b76246 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:36 2009 -0700 xf8CrtcSetModeTransform: free adjusted_mode name too The adjusted mode was freed, but any name allocated for that was leaked. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 088107827347cee05a6e5317bcebdbc282b9a3bc Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:35 2009 -0700 LoaderSortExtensions: free graph nodes Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d5959d37cd36895898786e4ea5bf72c480b79832 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:34 2009 -0700 Free libpciaccess iterator in xf86PciProbe Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ded35b7bf7a5ad27de152476c657a56a4f232800 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:33 2009 -0700 xf86Xinput.c: get DIX event queue pointer once at InitInput time The DIX event queue is allocated before InitInput is called, so fetch the pointer there and not randomly at other times. This avoids failing to fetch the pointer sometimes during server regen and then smashing memory through the stale pointer from the previous server generation. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 54f15a414130f89832b5c2604b0b44e7e4c6709f Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:32 2009 -0700 probe_devices_from_device_sections: don't leak list of devices xf86MatchDevice returned malloc'd storage containing the list of devices to look at; make sure that gets freed. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8b5086250aa5dae8de8b763408ff480d7beac819 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 17 18:14:31 2009 -0700 Eliminate bogus event resizing. Now that all event queues hold internal events only, they never need to be resized. Resizing them led to memory corruption as they would get sized for an appropriate xEvent, not an internal event. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c7987660fd665f32406b14db7078a3f5f7b76e9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 17 15:33:19 2009 +1000 xfree86: fix up wrong use of OptionRec for AutoAddDevices andAutoEnableDevices Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 971d4eac1274db78efa546ea50ca5e01a80bbd81 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Sep 19 15:48:30 2009 -0400 Xext: include security protocol header instead of client header Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a62664bc07b35aedb6b11b984c94341deb4486ca Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Sep 19 16:01:52 2009 -0400 Bump fixesproto requirement to 4.1 Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2a890d85e923e1da0331b02e58e95f98b11f5de0 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sun Sep 20 01:31:59 2009 -0400 fixes: Make sure invisible cursor is inialized with zero src/mask This fixes a regression introduced in 9040dab76182d1a019ca7fef7b29733d2c199e61. Signed-off-by: Thomas Jaeger <ThJaeger@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2bb3f0c87119e73157141431d7c00ab104d4b34b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 18 10:27:14 2009 +1000 xfree86: remove now unused variable Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1888d7d3e3ae81b5cb23e3a0852317362c8e215a Author: Carl Worth <cworth@cworth.org> Date: Fri Sep 18 10:39:19 2009 -0700 configure: Fix broken quoting for initialization of REQUIRED_MODULES A recent change switched to C-style automatic string concatenation, (presumably for better readability and maintainability), but this doesn't actually work for the shell. So we revert to the previously working initialization. This commit reverts one hunk of c947605eda082fbca0821efc0cc14fec8f958fd0 commit 4982bbc3b49b1b61e63a8461ea803e41318c8187 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Sep 18 12:36:11 2009 +0300 xfree86: vgaarb: missing wrapping macro Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit af1af50de621bc451e6413fa5602ae5db2dc9809 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Fri Sep 18 09:33:37 2009 +0300 xserver: added more Geode oddities to xf86AutoConfig.c commit ec0ad408ef8d5a2cf7a2bd65d13de3ef3147308c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 17 16:01:29 2009 +1000 xfree86: use SendDevicePresenceEvents instead of manual event handling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d0440275108920f5cb5d630f55fc9a3320c496d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 16 10:58:52 2009 +1000 Require dmxproto 2.2.99.1 This requirement was introduced in code with commit e85775aa64d1e9322c82090a26256af5e1fede0a. Reported-by: Marvin Schmidt Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c947605eda082fbca0821efc0cc14fec8f958fd0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 15 15:05:27 2009 +1000 configure.ac: move all protocol requirements to a single location. Protocol requirements were spread throughout configure.ac, leaving us with a few locations where one DDX asked for a different version of the package than another. For each protocol, define <NAME>PROTO="[<name>proto >= version]" and assemble REQUIRED_MODULES based on these. Future changes to protocol versions need to only be done in a single place. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4d6b20c25af5f590f19530b6c007e3648a8037c3 Author: Shunichi Fuji <palglowr@gmail.com> Date: Wed Sep 16 12:02:00 2009 +1000 dri: use noPanoramiXExtension directly. xf86LoaderCheckSymbol() is never useful if using externed variable directly. noPanoramiXExtension will be just used through dlopen() like other extension modules. Signed-off-by: Shunichi Fuji <palglowr@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3853314d13b503684c9922715323f8033febe5de Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Sep 17 08:11:27 2009 -0700 Fix typo in Xephyr man page Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 2edf967b00963559552d061bb98b15243d978279 Author: Dave Airlie <airlied@redhat.com> Date: Thu Sep 17 15:24:01 2009 +1000 xserver: SIGIO option handling was incorrect. reported by a user on #radeon when DRI1 broke. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 715953bf5c00b4605dd6ab45c92140c0e81174ee Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 21:13:00 2009 -0700 Check for -wrap support in the linker Allows unit tests to be built with non-gnu-linkers that also have -wrap support Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e2c64551808988657069006f74c6780973ec0557 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 21:13:48 2009 -0700 Add configuration option for use of SIGIO handlers for input events Boolean option to enable/disable SIGIO handlers is set by the first of these found: - UseSIGIO option is set in xorg.conf ServerFlags - Default set at build time by ./configure --enable-use-sigio-by-default - Platform default value: Solaris = no, all others = yes This matches the current settings on all platforms except Solaris. This reverts Solaris (for now) to the settings used in Xorg 1.6, before SIGIO support for Solaris was added, due to some system level bugs that won't be resolved in time for Xorg 1.7 release, but allows us to enable when those are resolved (or when we need to test if they're resolved). See http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6879897 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3bdf36476179257561b9409c3f49a77640fbb9f9 Author: Matthias Hopf <mhopf@suse.de> Date: Wed Sep 16 16:03:46 2009 +0200 Work around sporadic segfault on resume with intel/KMS due to cursor->bits == NULL. Apparently SavedCursor is sometime tried to be set while already being set. commit fe31f9c646bc26163497f29c3b833c090df0b3f9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Sep 14 19:51:23 2009 -0700 Change xf86dristr.h includes to use xf86driproto.h instead Clears warnings about obsolete headers, but raises minimum required version of xf86driproto to 2.1.0 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 159e03204093991ccd4133133c50c0cae88c828f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 15 11:39:09 2009 +1000 dmx: don't include panoramiXsrv.h if building w/o Xinerama Reported-by: Marvin Schmidt Tested-by: Marvin Schmidt Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f56cbe1ef24415d0142b9a7d0ab0a031069ccb52 Author: Rémi Cardona <remi@gentoo.org> Date: Mon Sep 14 17:09:59 2009 +0200 dix: append "built-ins" to the font path in SetDefaultFontPath 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 made the hard dependency on a "fixed" font go away but only Xorg could use the built-ins fonts by default. With this commit, all DDXs get "built-ins" appended to their FontPath, not just Xorg. Tested with Xorg, Xvfb and Xnest. Signed-off-by: Rémi Cardona <remi@gentoo.org> Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Tested-by: Jon TURNEY <jon.turney@dronecode.org.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 139368f7ae192b592e24d013e8ca5ce4175effe1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 17:53:50 2009 -0700 Fix num_masks/length overflow test for XiSelectEvents Have to set windowid to a valid value first, since that check appears earlier in the code than the masks/length check. Also have to have data[] set large enough so that reading mask data for 0xFFFF masks doesn't overflow past the end of the array into uninitialized data. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 13decf5efe76e735a003227c951e58a41e36a8b5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 13:54:51 2009 -0700 test_convert_XIRawEvent: Don't write more data than the struct holds sizeof(in.valuators.mask) * 8 == 40, but the valuators arrays only holds 36 entries, so the test was smashing the stack when 36 < i < 40 (leading to core dumps on Solaris x86, since the return address was overwritten with an invalid pointer). Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38a61e9a7cf616e26a79dba815bf67737317d1eb Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Sep 15 13:54:50 2009 -0700 Remove stray semi-colon in protocol-common.c Caused Sun compilers to issue warning: "protocol-common.c", line 141: warning: syntax error: empty declaration Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e320736c457ea7b2f19a4c7c2dfc0c461d0dd405 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Sep 14 19:51:22 2009 -0700 Fix module path in xorg.conf man page Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 49b98d092ec3d032e657eeff62c22fce243b1e8b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Sep 10 17:52:33 2009 +0300 xfree86: vgaarb: rework wrapping function No semantical changes. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 422cd7a674e6831f40be14ee853bd946cb62eadc Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 14 13:52:53 2009 -0700 XQuartz: pbproxy: Remove debugging XBell() (cherry picked from commit 1fd7c1fd4740393a32e261af33e64c19be48ca9a) commit 663807ce0e65b51537540bb95fbf3c18988c04c7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 14 16:44:52 2009 +1000 xserver 1.6.99.901 (xserver 1.7 RC1) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f450be999268d118b384c04ea070c87ad48c4c59 Author: Soeren Sandmann <sandmann@daimi.au.dk> Date: Fri Sep 11 04:03:06 2009 +0200 Add xoff and yoff to drawable->x and drawable->y in create_bits_picture(). These are 0, except when the drawable is a redirected window. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2b00afec4b5b51851aee4cb0fba7baff3e10ef3f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Sep 14 15:59:41 2009 +1000 Update xorg.conf man page & sample for changes in Xorg 1.7 AllowMouseOpenFail description changed to reflect actual behaviour and point to AllowEmptyInput for previously described behaviour. Update default DPMS mode timeouts to match new defaults set in April 2009 by commit d52fddefaeb43f15b677eefbea4a288a9948373b Update autoloaded module list to match ModuleDefaults in xf86Config.c Update module subdir list to match stdSubdirs in loadmod.c Add xorg.conf options that were added to the code: - XkbDir option added in February 2009 by commit 76f18b94bd2719a8199334742d021c4d0806187d - DRI2 option added in April 2008 by 35982bc109d424c464551ab22ec90af69908c884 Remove xorg.conf options that were removed from the code: - XkbDisable option was removed in January 2009 by commit 40877c6680863bd6a8475f2bb0c54df55bcf0b0e - PciProbe/Config options were removed in August 2008 by commit fdf7c747a8e1bc59dfb31b7f90dd5eab2687315b - EstimateSizesAggressively was removed in August 2008 by commit cd1e8f26147919227e7624ac4c6b313d972a4d35 - loadable font modules were removed in July 2008 by commit affec10635343668839994ea2bac16c1d4524200 - ModInDev options were removed in December 2008 by commit 6de6ffff35ac03d49fa61de195d4a0605e0ef8bf (Also strips some trailing whitespaces to make git happier.) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b6f5c54fc61588c638b987bde914b0e5ff9b655e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Sep 14 15:49:01 2009 +1000 xfree86: Change default font path to match configure.ac's --default-font-path. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 23dc4678e9333ba0ee1a5374521905fa3f4f309c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 14 14:14:27 2009 +1000 dmx: use top_builddir, not top_srcdir to get libxfixes.la Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Byeong-ryeol Kim <brofkims@gmail.com> commit 4650e6ebe6e3ea48a026ace60b25daa165580467 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 14 12:00:18 2009 +1000 xkb: drop key presses for already repeating keys. (#23889) The event sequence for continuously pressed keys with the keyboard driver is PRESS - PRESS - PRESS - ... - RELEASE. The first press sets the repeatKey to the keycode and the matching timer. The second press (on the same keycode) can be silently dropped instead of overwriting the timer again. X.Org Bug 23889 <http://bugs.freedesktop.org/show_bug.cgi?id=23889> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit c626a5578aa16c17ef68c1b15ed53828080d9d90 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Sep 13 17:35:51 2009 +1000 xfree86: fix VT_WAITACTIVE control flow (#11477) Move misplaced } to get the flow of if (!ShareVTs) { VT_ACTIVATE VT_WAITACTIVE } X.Org Bug 11477 <http://bugs.freedesktop.org/show_bug.cgi?id=11477> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit d3c66d6b69c04466b8388586090dc48a0aad7684 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 14 08:03:17 2009 +1000 dix: FindChildForEvent needs init child to None. silences compiler warning: events.c: In function 'FixUpEventFromWindow': events.c:2262: warning: 'child' may be used uninitialized in this function Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e85775aa64d1e9322c82090a26256af5e1fede0a Author: Kevin E Martin <kem@redhat.com> Date: Mon Sep 14 08:01:56 2009 +1000 Include <X11/extensions/dmx.h> and remove _DMX_SERVER_ define. Fixes build with newer dmx header files that have been split between dmx.h and dmxext.h. _DMX_SERVER_ is no longer needed with the split headers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 232d43510e0f9f780a9f8eb857366e03acf2fcdc Author: Kevin E Martin <kem@redhat.com> Date: Mon Sep 14 08:00:42 2009 +1000 dmx: Make description match default option. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6389a190faa7c06bdedfd1cc3acb280ebb5cc04a Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sat Sep 12 21:47:51 2009 +0300 shave: use CC tag variable on libtool This fix scratchbox compilation. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dfb106c846c880a06fa5caada92f45576eab7b00 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 18:09:12 2009 +1000 configure: re-enable dmx build (default=auto) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 72607960c136894c4533a54cef7a9be64246f1a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 11:02:22 2009 +1000 dmx: Remove some dead code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 88187ad889ab707fcae3f64890cdb291b567ec23 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 11:02:18 2009 +1000 dmx: purge DMX EQ leftovers Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f3aaa46f27f802233e54b3c70ba827e0fcca2605 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 09:51:45 2009 +1000 dmx: formatting fix to improve readability Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7a588c833e87dd07f167b9885d5ec43dde271ebe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 18:14:43 2009 +1000 dmx: Default rules are now base, not xfree86 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33243ae971db90477a29dfb0e51cc00c95e561bc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 17:04:08 2009 +1000 dmx: include xfixes lib, reshuffle include order to resolve linker errors. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2d46678762b12c9746fc8f89821c15705680ba35 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:46:06 2009 +1000 dmx: remove dmx-internal event queue. The EQ is in the DIX now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 545f11139d600febf1c5fd46b11bea4352b82c32 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:14:53 2009 +1000 dmx: compiler warning fix (mixed declarations + code) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7d703af74ced36968f4480507a7eb54d249b5edc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:13:38 2009 +1000 dmx: get the state from XKB for dmxCheckSpecialKeys Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6e52f9233176986508356f6eee4fce86ba740e71 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:10:22 2009 +1000 dmx: fix dmxKeySymToKeyCode to work with mandatory XKB. Approach taken is inefficient, it converts the xkb symbol table to a core symbol table first and then extracts the keycode from there. Consider this a todo for a rainy afternoon when the beer fridge demands emptying. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 61ae0a5ca5de24590f444c405445124404ba9753 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:05:12 2009 +1000 dmx: fix up dmxKeyCodeToKeySym for XKB-only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9caba3e2abceda0a1ff4ad4bf05708f0166c2218 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:12:25 2009 +1000 dmx: fix two calls to InitKeyboardDeviceStruct. Takes RMLVO now instead of the keysyms directly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 29b9a10dad1ca780dc90f4f1f63fd11fd7d1221b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:04:45 2009 +1000 dmx: XkbComponentNamesRec doesn't have a keymap field anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a6f3f6a63ae76afbe01eb9049a63609476d2ed4d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 16:43:04 2009 +1000 dmx: switch lnx-input and usb-input over to xkb-only. kbd*Convert are nearly identical, it just asks for merging. Not today though. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5d81aee5f75e80ae9d3ac7cb32d293ade62d6c5c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:24:02 2009 +1000 dmx: include xkbsrv.h to silence compiler. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4da59f478686fa7e80a3837bf9fa61672c13c50b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 16:30:36 2009 +1000 xkb: split effectiveGroup calculation into separate utility function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8fb3fa28a5a1b36cdaad38055a607400828b9e1c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Sep 11 11:21:26 2009 -0700 compiler.h: include <string.h> before using memmove() Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit d908ee6e549fd8ff653e2c58e9637df347540ef9 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Sep 10 20:56:18 2009 +0300 Revert "Make sys.c use compiler.h unaligned access functions" This reverts commit 1b30545c04a51bfa3ff95a26d64962907a62ff15. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 281ebb453d2f5254e057a24e580dafa9abf82305 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Thu Sep 10 17:52:32 2009 +0300 xfree86: vgaarb: close and cleanup vga arbiter So far there are no apparently issues on not closing the fd. But let's do the right job here. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e62549b8d61cd739adbbd04487d96fe706da1370 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 16:03:38 2009 +1000 Xext: don't try to initialize XTEST device properties if they failed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 744cdc897746dca86f5ab9e57be982621c2f0986 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 15:05:15 2009 +1000 dix: Remove two _X_EXPORT defines from the function definition. These two are defined _X_EXPORT in their declaration anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9871f9be4e5b184b151ce93458b2578cc8c7b962 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Wed Sep 9 13:43:45 2009 +0300 Use lowercase PCI vendor ID for NSC. commit f4350c66b493d63fa06be87caa958d7033232ea4 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Sep 9 15:48:33 2009 +1000 fbdevhw: Test for graphics:fb%d as well as graphics/fb%d Apparently the kernel can't decide on an API to expose to userspace, so let's just try both in the hope that one will work. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Michel Dänzer <michel@daenzer.net> commit 72f6be540840b46aa4b158b98fac11a6f90dc9d1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:13:55 2009 +1000 xfree86: remove now unused xf86CrtcShadowClear Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1f24638985ce053b696ca3359cc50b5bc26ccb03 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 9 09:28:46 2009 +1000 kdrive: output meaningful error message for HAL devices. kdrive ignores all devices from hal as they don't have the 'type' option set. Instead of "Unrecognised device identifier!" print out "Ignoring device from HAL." to indicate that the errors surrounding the device don't really matter. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit ae812bb79668e59cda1f851fb1fabe9db9ea705f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 13:53:26 2009 +1000 Xnest: set the default pointer accel to the host's values (#10013) The defaultPointerControl holds compile-time defaults for pointer acceleration. If an Xnest instance is started, it resets the hosts pointer accel values to these built-in defaults instead of using the host values. This patch queries the host for the values before initializing the device, thus leaving the host values untouched. X.Org Bug 10013 <http://bugs.freedesktop.org/show_bug.cgi?id=10013> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 97e3f4316b1c917f93d324f05d3a4551c1d051a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 09:55:22 2009 +1000 dix: auto-float SD's with SendCoreEvents "false" AlwaysCore and SendCoreEvents specify whether a device is to send core events. A device that has either disabled is not supposed to send core events. With MPX/XI2, a device that is attached automatically sends core events when the event is routed through the master device. Floating a slave device disables core events by breaking the route. This patch automatically floats devices that have coreEvents disabled in the xorg.conf/HAL. This replicates the behaviour of a SendCoreEvents "false" device in server 1.6 and earlier. The devices may still be reattached to a master at runtime. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 447bd4ce90113037a489ce55d9878523fe5294c7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 7 16:02:50 2009 +1000 kdrive: fix sdl build by removing old keySymsRec references. These are set in kinput now through InitKeyboardDeviceStruct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d8aadfa5af85ce6613289efe119e592aa687ab03 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 7 15:04:33 2009 +1000 dix: remove unused and half-broken code to restore original classes. In theory, the MD should change back to its old, original classes when the last SD is detached. Thanks to the XTEST devices, we'll always have an SD attached until the MD is removed. So let's not worry about that and do nothing instead of having some code that's essentially untested. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e9a507acca01234de189f0f64da63bac32dc13fd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Sep 7 15:59:37 2009 +1000 kdrive: remove xkb member from KdKeyboardInfo Wasn't being used by anyone. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cafa7c5f9017efdc33c348b6a55d80d44df0fe17 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Tue Sep 8 23:52:52 2009 +0300 Added comment with the PCI device ID of Geode SCx200 series. commit d3ad1804a5216487b5837a80f3e53b81212dcf84 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Sep 8 15:25:19 2009 +0200 EXA: Only take special code path for 1x1 fill for pixmaps. It doesn't make sense for windows. Also double-check that the data pointer is valid. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=23461 (not sure that could happen on master even without this, but just in case) commit a9d30f6a038166052a4684308db205bd4e60799e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 8 17:43:24 2009 +1000 dix: GetKeyboardValuatorEvents doesn't recurse anymore - fix comment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1bdc9ec617d357b076c9e69296018bc212d91c7d Author: Eamon Walsh <efw@eamonwalsh.com> Date: Fri Sep 4 21:49:29 2009 -0400 Fix "warning: left-hand operand of comma expression has no effect" Signed-off-by: Eamon Walsh <efw@eamonwalsh.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9005ec4ce19d704d5055232d2a36acee3247be67 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:38:03 2009 +1000 dix: remove dixLookupResource - we don't have any users left. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Acked-by: Aaron Plattner <aplattner@nvidia.com> commit 1e0caf9a2ca983f171976822d9c04bacc14e9af7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 6 14:02:53 2009 -0700 XQuartz: launchd: Fallback on :0 if prefix:0 gives an error for the socket name (cherry picked from commit 647c871dc9f2d0adc172b401cde89ffbdfcc4d7a) commit 081f72390a25e2244561e238f772f98289a6a581 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 5 14:04:53 2009 -0700 XQuartz: Fix "warning: function declaration isn’t a prototype" noise (cherry picked from commit 9a77905a975e562daa4230739937bbb0b4caf087) commit 7ece2cb220e4fe2c9a8c4c62361522a45adf22c1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 5 14:03:19 2009 -0700 XQuartz: pbproxy: 64bit fixes: Properly process an array of Atoms (cherry picked from commit 1b659cda1af02762a31cc7875e457b08c8dc68b5) commit 1747120043cc5b5d201b7efd06b75ef08b032922 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 5 02:51:09 2009 -0700 XQuartz: Fix a strcpy/strcmp typo (cherry picked from commit 701c24da3ef76a05ccb2d7e84ccfa1b7c5d38e15) commit be37f339a9ed90b9b5e44aeb396ca73347078027 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Sep 4 23:11:13 2009 +0200 EXA: Stop hiding solid or gradient pictures from the driver. Add support for solid pictures in exaTryDriverSolidFill(), but otherwise just pass solid and gradient pictures to the driver Composite hook. While we're at it, clean up the logic to detect Composite operations which are effectively solid fills or copies. This should also fix some false negatives and positives. commit 1f61bbeffdf2ad5a2c54121c75f3b049baf01708 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 4 00:38:58 2009 -0700 XQuartz: Check the DISPLAY environment variable to see if the socket at startup is ours. If not, ignore it and fork/exec startx. (cherry picked from commit 3d5e10cce360a04bf917227615fb9b825675124f) commit 0a361d0e5f896351b98dc9765b4a33c79efa6f02 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Sep 3 19:40:11 2009 -0700 XQuartz: Use --with-launchd-id-prefix for consistency with xinit Also actually honor LAUNCHD_ID_PREFIX and APPLE_APPLICATION_NAME (cherry picked from commit 990038ab006b2f5e03dcef385514ba4e4584bd25) commit e6e83d81ee7366779d600cbb128034e248815339 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 14:51:08 2009 +1000 xserver 1.6.99.900 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc0841b6e87cdd752b44b17ccb021c831a3e02a5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 15:58:36 2009 +1000 shave: hack around the configure ld check for make distcheck. configure calls $(CC) -print-prog-name=ld to get the binary for the linker. The shave script prints " CC \nld" which can't be parsed by configure, resulting in a fatal error. This patch special-cases -print-prog-name and passes it though directly without any additional output. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 58d9a4c6356c98c32be2826410df027ece70d44d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 15:06:45 2009 +1000 xfree86: fix make distcheck after removal of Domain.note and RAC.Notes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8af2793a90e8e644a6a598adce3f752c15b3e37a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 11:30:48 2009 +1000 xkb: xkbGetKbdByName on the lastSlave needs to change the master (#21859) If the layout is changed on a master's lastSlave, the master needs to change layout immediately. Otherwise, the master stays on the same layout until the lastSlave changes - which may not happen if only a single keyboard is available. X.Org Bug 21859 <http://bugs.freedesktop.org/show_bug.cgi?id=21859> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 219ae5b628f9ffe2be0876d5911cc04e52bef5f8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 16:38:53 2009 +1000 dix: hide the sequenceNumber key repeat hack behind two functions. Just in case we figure out a better way to do it in the future. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bfb219f532f3c78ba905424365ee7c5f7b5f21a2 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 21 16:03:36 2009 +1000 input: allow for detectable autorepeat. For core and XI1 events, store the key_repeat flag in the sequence number until TryClientEvents. The sequenceNumber is unset until TryClientEvents. [Also thrown in, some random indentation changes. Thanks] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3d988e01e41e98fc5160f825a250522ba274d09f Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 21 15:15:41 2009 +1000 dix: improve code flow in TryClientEvents, better debugging messages. Instead of a massive if (blah && blah), return early where possible. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6fb01c8286c16968fd07e4a5b78da89cd8768d79 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 10:57:33 2009 +1000 require xf86vidmodeproto 2.2.99.1 or newer. commit 2122fedb2c058dc27f9df0e856d2193fabe725e2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:37:58 2009 +1000 os: silence bigreqsproto compiler warning Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 59e731ef66095723e74a16b2e5548aed627089ff Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:06:37 2009 +1000 xfree86: silence some xf86dgaproto compiler warnings We already require xf86dgaproto > 2.0.99 since 6fffcd582 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ead57a13531aa14033839112fa66e33e142f67da Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:03:55 2009 +1000 xfree86: silence 'unused variable' compiler warning Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 21f04f008e6b1ab66a63de3de668b1f261a6928a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Sep 4 11:01:09 2009 +1000 os: don't redefine GNU_SOURCE Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 09f0ee1324b046f2830bdd260f6e2a67ee8f2973 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Fri Sep 4 04:17:09 2009 +0300 Formatted recent Geode PCI ID changes to fit a 80-column coding style. commit a17b50b130fe01c058a74f2696a8b97c756acb49 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Fri Sep 4 03:51:01 2009 +0300 Further explained what the Geode PCI ID is all about as comments. commit afd800dae4f7491baee08509094a30160bb9c849 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Fri Sep 4 03:41:08 2009 +0300 Removed unnecessary curly braces for Geode LX PCI ID. commit 842b7a47d583a7729099de3031ae20977dddf774 Author: Martin-Éric Racine <q-funk@iki.fi> Date: Fri Sep 4 03:25:32 2009 +0300 Updated the PCI Vendor and Device IDs for all Geode variants. In practice, some of the native drivers for older Geode products have become deprecated due to lack of e.g. libpciaccess upgrade, but that's OK, since most distributions don't ship them anymore. In that case, we'll let X server fall back to good old VESA. commit 8e873185f4cbfb2a36e1f43fe7da47fd9fd5aeea Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Sep 3 19:11:02 2009 +0200 EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed. Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess calls. commit 120286aef59dabdb7c9fa762e08457e5cc8ec3a6 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Sep 3 08:05:59 2009 +0200 glx: Add screen DestroyWindow wrapper to destroy the GLX drawable. Fixes crashes exitting MacSlow's rgba-glx demo. commit f04fe06ae244b851b38be824b1a80f2f8a030591 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 14:17:14 2009 +1000 dix: don't return BadMatch from GetProperty (#23562) dixLookupWindow may return BadMatch if the window in question isn't actually a window. In this case, GetProperty needs to return BadWindow - not BadMatch. X.Org Bug 23562 <http://bugs.freedesktop.org/show_bug.cgi?id=23562> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 84eb4c66a4a09c360cef260fb2f35dfb6d8a93c6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 10:00:42 2009 +1000 test: add protocol testing for XIWarpPointer. TODO: some way to check src_x/y coordinates would be good. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1b7858e8469aea6d2031039ba41d7191a4b80f28 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 10:58:00 2009 +1000 test: expose the default screen to tests, some cleanup work. Provide common #define for invalid window IDs. Init the sprite's hotPhys, provide a common #define for the initial sprite position. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 61a6e1f074d9ff75d61446b946aab6c04019c287 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 10:00:00 2009 +1000 Xi: return BadDevice for master kbds and attached slaves in XIWarpPointer Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8939ad2b2aa0385f072d3e1169eaf99289ed737a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Sep 3 09:44:11 2009 +1000 Xi: return error values to client from XIWarpPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d481720c57f558c47273bf89854fc69254319772 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 2 15:28:28 2009 +1000 Xi: standardise XI2 headers. Adding missing dix-config.h include, adding one missing header guard. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 377a5f655ca88cd836da24ab42361df9f3ff51a2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 2 11:16:15 2009 +1000 Xi: if XISetEventMask fails, return this to the client. The only failure point can be a BadAlloc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 993ca5acbdccef9e43cd6580e7cc22cfda1a2578 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 2 10:53:40 2009 +1000 dix: when unsetting a cursor, update the sprite immediately (#23608) Removing the device cursor while the cursor was within the window did not update the visible sprite until the next enter/leave event. X.Org Bug 23608 <http://bugs.freedesktop.org/show_bug.cgi?id=23608> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b41db8fe460fc0956922b79261752d1bb104684f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Sep 2 08:57:40 2009 +1000 Xi: fix broken swap code in XISelectEvents request processing. The pointer advanced 12 bytes too short. Rather unfortunate if both the code and the test have the same bug. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 727de7c90de4198222e0dc58d7503b4a1672f642 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 16:33:56 2009 +1000 Xi: Unify checking for invalid bits in grab masks. Bits above XI2LASTEVENT are invalid and cause in BadValues. These checks must be performed anywhere where a mask_len parameter is given. This patch also adds the missing checks to grab masks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 59a6d7d478903a8bc9c5d4cc8b2e62e2ad102dba Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 16:30:52 2009 +1000 Xi: don't overrun memory for grab masks. A grab mask provided in the request may be larger than the one used in the server. Cut down to size before memcopying. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 83db2b126e8623824e1303e74070375994984599 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 15:58:02 2009 +1000 Xi: don't try to set oversized or non-existing masks. Fixes crash if the first XISelectEvents has a zero sized event mask. Fixes crash if the mask provided is larger than others->xi2mask[]. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6fe235d3635aaf995dfa198c60ded1a43fe9dd45 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 15:46:34 2009 +1000 test: fix request length calculation, add length tests for XISelectEvents Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7ab1b50c545ae1a62384bedee60168e227bb2a94 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 15:27:29 2009 +1000 test: fix build after changing libxf86config.la Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 58c298acc1045927e0d90be73b8dbc8837252589 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Sep 1 15:16:17 2009 +1000 Xi: extra length checking for requests providing masks. masks can be of arbitrary length. If the client did not initialize mask_len, some sort of boundary check is needed to avoid running over memory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0e4dd3b2d28d3dbbfc152d6f5030901ec063a7ae Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 31 09:50:36 2009 +1000 Un-export ApplyPointerMapping. This is an in-server function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a470e8426ee290046a927a17fc969235c4b1e2e7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 2 17:56:52 2009 -0400 Correct outdated e-mail address in "Author" statements. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 17545ed80ee3bb6a058a2748fc7bfb0fc5139fc1 Author: Adam Jackson <ajax@redhat.com> Date: Wed Sep 2 14:40:07 2009 -0400 randr: Fix crtcs using set_mode_major() We'd never mark the crtc as active, meaning (among other things) gamma upload wouldn't work. commit 291408980f33b1e541c89d958535e6fad55fdac9 Author: Dave Airlie <airlied@linux.ie> Date: Wed Sep 2 20:14:30 2009 +1000 vgaarb: protect fini as well just in case commit 8aeadbff0840efc0c9a073e60d6fec0dba313060 Author: Dave Airlie <airlied@linux.ie> Date: Wed Sep 2 19:07:40 2009 +1000 vgaarb: if arb init fails, make sure locking doesn't occur. pointed out by Martin Jansa on irc. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 0e46066efea4e385b2874d4a62a786957e572fe5 Author: Jerome Glisse <jglisse@redhat.com> Date: Tue Sep 1 13:59:47 2009 +0200 Xext: fix a typo for bigreqsproto.h header file Signed-off-by: Jerome Glisse <jglisse@redhat.com> commit c61d8ce1507318476b75b81bf871da19cb1bf747 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Aug 31 17:57:50 2009 -0700 Xext: Require newer versions of xcmiscproto, bigreqsproto, and xf86bigfontproto for new *proto.h header file names bigreqsproto >= 1.1.0 xcmiscproto >= 1.2.0 xf86bigfontproto >= 1.2.0 commit 1c37be80982151a5acd74fe4b960695f604f22ca Author: Michael Witrant <mike@lepton.fr> Date: Tue Sep 1 10:46:50 2009 +1000 XFree86: Linux: Fix 100% CPU usage with ShareVTs and kbd Leave consoleFd open over the course of the server, even though any use of it in this context is likely to be disastrous. Signed-off-by: Michael Witrant <mike@lepton.fr> Reviewed-by: Daniel Stone <daniel@fooishbar.org> commit 65183dc3153232943dff3cfbaacab141e7ed0e9c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 5 19:53:55 2009 +0300 Input: Mark Xi input events as critical Note that the Xi events are critical and should thus cause a flush to the client when an input event is pending. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit a4e614d301cfa2577de1ee6a15abf023590586d1 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 25 16:46:10 2009 +1000 Xi: Fix harmless ButtonPress/ButtonRelease confusion A missing break meant that ButtonPress would fall through into ButtonRelease, but luckily it appears to have been completely harmless. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 5ef53a94ce4e48e11de26290cd677266308640c8 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 20:23:26 2009 -0400 alpha: kill xf86SlowBCopyToBus and xf86SlowBCopyFromBus xf86SlowBCopyToBus and xf86SlowBCopyFromBus cause segfaults on my system. Also remove associated slowbcopy_tobus/slowbcopy_frombus macros. Signed-off-by: Matt Turner <mattst88@gmail.com> commit a8e634b86d47353ef354717904fa66ebe35e1303 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Aug 31 15:53:58 2009 -0700 XQuartz: GLX: Drawable does not contain resize anymore. (cherry picked from commit 1e642f22fbf029bb3917091cb5fa2f78b4a92f62) commit 1b30545c04a51bfa3ff95a26d64962907a62ff15 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:16:02 2009 -0400 Make sys.c use compiler.h unaligned access functions Signed-off-by: Matt Turner <mattst88@gmail.com> commit 9522ab9a98e98bc394703038e34b1c12aa39a179 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:12:29 2009 -0400 Remove unused Delay.c Signed-off-by: Matt Turner <mattst88@gmail.com> commit 4fac13ff8848bc38654b5567170fbc0d7b2c96d6 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:11:59 2009 -0400 Remove unused BUSmemcpy.c BUSmemcpy.c provides xf86BusToMem and xf86MemToBus, which are are memcpy wrappers written to avoid glibc's memcpy on Alpha. glibc'c memcpy on Alpha has improved much since this was written, so it's no longer needed. Neither function is used inside the xserver, and no module on my machine uses either as well. Signed-off-by: Matt Turner <mattst88@gmail.com> commit b65146fc8418b53b7e43dd34cc20000369475671 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:11:10 2009 -0400 Remove unused ia64_flush_cache function Signed-off-by: Matt Turner <mattst88@gmail.com> commit f201705e29bdc3309dd611b461ec67740cb706ef Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:09:33 2009 -0400 Simplify unaligned access code All architectures should be able to use the same unaligned access code, regardless of whether they need special unaligned access instructions. Let's let gcc do the heavy lifting. In the case that we're not using a gcc-compatible compiler, use memmove. The xserver already requires pixman, so include pixman.h for its uint*_t types. Signed-off-by: Matt Turner <mattst88@gmail.com> commit 3718beb69cc5b4cdb79dd97242fce9231a26a39a Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:08:52 2009 -0400 Clean up unaligned access functions on alpha Checks for __GNUC__ are superfluous since the only other compiler for the platform is Compaq C, and it doesn't support GCC style inline assembly. Signed-off-by: Matt Turner <mattst88@gmail.com> commit e1fdd7671346ce374a2b77fe94b8c1a25c0520da Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 16:08:20 2009 -0400 Move unaligned access functions to common section Signed-off-by: Matt Turner <mattst88@gmail.com> commit 628b863bcc6a2a14fd3c0e6c2be4394833cc314c Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:53:41 2009 -0400 Remove unused arm_flush_cache function Signed-off-by: Matt Turner <mattst88@gmail.com> commit a544139196ac7f5bc89bc642c6c5c0ea1b0bb60e Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:53:19 2009 -0400 Remove unused ppc_flush_icache function Signed-off-by: Matt Turner <mattst88@gmail.com> commit 52aa0495218dc7821a23b045b2c74b2a66e34616 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:52:39 2009 -0400 Replace 8 nops with proper sync instruction on mips Cc: Ralf Baechle <ralf@linux-mips.org> Acked-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Matt Turner <mattst88@gmail.com> commit 563fa1c5d762173cd6fb78f9e33cb960ef3153bb Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:52:10 2009 -0400 Use sfence and mfence instructions on amd64 Signed-off-by: Matt Turner <mattst88@gmail.com> commit 430c4af0d6e2cad03ca5f49ec6e87f3717d0d9e2 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:51:41 2009 -0400 Add x86 barrier macros Signed-off-by: Matt Turner <mattst88@gmail.com> commit 0d87f77a3ff4b22729220b7edcb98c6f06d0787c Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:51:05 2009 -0400 define barrier macros as nops if not otherwise defined Signed-off-by: Matt Turner <mattst88@gmail.com> commit 1b43ee13b30d9e3f828e94cdf686d103ce1cac07 Author: Matt Turner <mattst88@gmail.com> Date: Mon Aug 31 15:53:58 2009 -0400 Move memory barrier macros into common section alphabetize by architecture also. Signed-off-by: Matt Turner <mattst88@gmail.com> commit 295e598d9a83ff7162a093810ca9f546d00c0968 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Aug 31 20:04:51 2009 +0300 xfree86: remove _more_ RAC junk Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 38627b2eaf64aa8fe694fc3e1f5e4fee0c9c11c3 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Aug 31 19:36:02 2009 +0300 xfree86: shut up vgaarb warnings when server doesn't support it Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 79182538b43ecd35bf2b47eccfb2dd3bbcdc12eb Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Aug 31 19:25:13 2009 +0300 xfree86: removal of some dead code due VGA arbiter's inclusion Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 6f3cc08ec01609c7efe424ac3e30fe4ff9391007 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Aug 27 16:21:11 2009 -0700 XQuartz: GL: Unset GL_EXT_gpu_program_parameters for Tiger/ppc See http://trac.macports.org/ticket/20638 (cherry picked from commit 0f3a89d306838b3c75a73cd1e9e2928737222b70) commit fdb29ebeed143fa05630966b847b05399a446ddc Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Aug 27 11:04:00 2009 -0700 XQuartz: GL: Explicitly set GL_EXT symbols to 0 if they are not in OpenGL.framework to prevent X11's glext.h from setting them to 1. (cherry picked from commit 7fe37137d826d1b698e87a5b35050dd02f0a4d4b) commit 3be80bd98357cf362aa9a004d1292e5167d83a17 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 28 16:20:59 2009 +1000 Xi: silence compiler warning "type may be used uninitialized" GrabKey and GrabButton are only called from XI/XI2 code. Set type to -1, just in case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 24716b9254fa7d609792596723a192bb044a7d3f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 28 22:52:48 2009 -0400 xace: fix up access modes in dixLookupDrawable calls from dri2. Referencing a screen through a drawable only requires GetAttr access. Treat dri2 drawables as child windows (Add/Remove access). Treat getting buffers as intent to read/write the drawable. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 0f3a64c3a5bce6cf3f00fe42cc7d1d3e69822945 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 27 15:11:12 2009 -0400 Add DRI2 requests to protocol.txt Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 3d17c4f6e1538986fe7b1f17614d76e28f2d1e11 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 28 12:12:52 2009 -0400 EDID: Vendor detailed blocks aren't worth X_WARNING about commit 2c1a845521a31f08938b0f8d6e38835ce127c94a Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 28 12:09:57 2009 -0400 EDID: Print 1152x864 in established timings, not x870 The spec says x870, but we actually use x864 because that's a real DMT mode and x870 isn't. This might or might not be wrong, but we should at least tell the truth. commit 2a806d7fa372e28d039761c9b4087cf812e8e46b Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Aug 28 16:05:04 2009 +0300 os: remove unused -cursor option Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 9040dab76182d1a019ca7fef7b29733d2c199e61 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Aug 28 15:50:50 2009 +0300 xfixes: minor clean ups on createInvisibleCursor() - unused return value - no reason to declare static variable given the function is just called once - no reason to declare different type and cast it after. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 80ed8096f9b8e974b556a6c9f3b600fb71b994c3 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Aug 28 15:33:19 2009 +0300 render: delete unused headers declaration Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit f959b1e5485b93700c7da449a98182f5ce067ca2 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Aug 28 15:30:21 2009 +0300 render: AnimCurInit and AnimCursorCreate shouldn't be _X_EXPORT Pointed by Peter Hutterer on xorg-devel ml. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit e454f106dc65ecfacc154a1fa0810935022a8fee Author: Dave Airlie <airlied@redhat.com> Date: Fri Aug 28 11:39:42 2009 +1000 xf86 ddx: add vga arbiter support. This adds support for using the libpciaccess interface for vga arbitration support on top of a kernel which supports it. Currently patches are queued for kernel 2.6.32 in jbarnes pci tree, and shipping in Fedora kernel. Co-authors: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Dave Airlie <airlied@redhat.com> commit 6fffcd5825454a7fe58ffbcfb219f007cf38e731 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 27 13:43:15 2009 +1000 xfree86: require xf86dgaproto 2.0.99.1. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2fba2eac0b4c8d07bdf7bea20ef75ff579621728 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 11:23:23 2009 +1000 test: add a few tests for xtest device initialization. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 903c3db1d1685bd855dceed9e7b92890743663e1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:48:00 2009 +1000 Xext: rename Xtst* to XTest* This patch corrects a misnaming of XTest-related functions. The extension itself announces itself as XTEST. Xtst is the library name itself, but all library functions are prefixed by XTest. Same with the naming in the server. - Rename all *Xtst* functions to *XTest* for consistency with the library and in-server API. - Rename the "Xtst device" property to "XTEST device" for consistency with the extension naming. - Rename the device naming to "<master device name> XTEST device". The default xtest devices become "Virtual core XTEST pointer" and "Virtual core XTEST keyboard". Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8bfd23e144e51401e3756de9260a4811fcc59e91 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:38:15 2009 +1000 input: move XTest device initialization into Xext/xtest.c XTest devices are non-optional but nonetheless specific to the XTEST extension. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a95f80fa914678d360f6dfd2b58926193df6ea4a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:26:56 2009 +1000 dix: use IsXtstDevice instead of the direct key lookup. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 16b7ebd7d876034edfe8f74562bd06e747879d79 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 14:34:23 2009 +1000 xfree86: Remove xf86GetMotionEvents from public API. This function was used as the default motion event queue API until including XINPUT_ABI 2 (server 1.5). This API was broken with 1883485 in May 2008 (wrong casting of parameters) and isn't in use by input drivers past ABI 3. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit af76bddd7a47092e2f0f85b2547c1cc74eb5cebc Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Aug 9 16:13:32 2009 -0700 XQuartz: Check NSINTEGER_DEFINED to make sure the NSInteger and NSUInteger types are defined. (cherry picked from commit 36e02a8649c0a545084cce5fb2c5717277b9273c) commit 07c935b72fb14cb12f1cb5afbf8cc81f97086bac Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 25 20:11:38 2009 -0700 XQuartz: Use applewmproto 1.4 updated headers. (cherry picked from commit 203df06c0eb2dcd5adfa788a1ba9569650c15f9c) commit 0f613007cd43545eda40825bd74ada3e6e5f36f6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 5 17:43:29 2009 -0700 CheckWindowOptionalNeed: Ensure w->optional is set to avoid SEGFAULT If CheckWindowOptionalNeed is called consecutively (and the first removes optional), then we will SEGFAULT. This can happen in XQuartz because ReparentWindow will call pScreen->ReparentWindow which can DeleteProperty which will CheckWindowOptionalNeed... then ReparentWindow will call it again later indiscriminantly. (cherry picked from commit b608c864ccc59628bd33c033393121b61580460e) commit e7dd1efef408effe52d0bd3d3aa0b5d4ee10ed90 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 25 18:07:00 2009 -0700 Ensure that rotation updates happen frequently The smart scheduler is designed to minimize scheduler overhead by increasing the interval between WaitForSomething calls when a single client is running. However, the software rotation code depends on its BlockHandler being invoked for screen updates; the long delays caused by the smart scheduler optimizations means that screen updates can be delayed a long time as well. The change is simple -- prevent the smart scheduler from increasing the scheduling interval while any screen is using software rotation. Signed-off-by: Keith Packard <keithp@keithp.com> commit 1740cda7a37abc7d0a169ab4555b446adaa62211 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 25 16:58:07 2009 -0700 Perform rotation redisplay before calling driver block handler (which may flush rendering) The rotation block handler uses regular driver rendering functions to repaint the screen, if those functions queue commands in the driver, it's important that the driver block handler be invoked after the rotated image is drawn. Signed-off-by: Keith Packard <keithp@keithp.com> commit 4aab05e3b3231f1ec9795a66a075d17a722634a7 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 25 16:54:16 2009 -0700 xf86_reload_cursors: fix cursor position to eliminate jumping after mode set xf86_reload_cursors restores the cursor to the correct position, but that must adjust for cursor hot spot and frame before calling down to the hardware function, otherwise the cursor jumps to the wrong position until it is repositioned by the user. Signed-off-by: Keith Packard <keithp@keithp.com> commit 0f9ffc887ca1471e98df746253d9300e03e46a15 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 15:10:52 2009 +1000 Xi: fix XIWarpPointer up for FP3232 as input coordinates. requires inputproto 1.9.99.902 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5e96945cf54136afdb80cc17f67611251d59205d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 12:15:54 2009 +1000 Xi: fix swapping for XIWarpPointer and XIChangeCursor requests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 990d204ef8074665763ad129d0b015b7ab3ae9ef Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:22:16 2009 +1000 Xext: remove un-used extern of DeviceMotionNotify. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 80f18a73267bd3090e459de609a7006a21e6c649 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:21:03 2009 +1000 input: move CorePointer/KeyboardProc declarations into header. The extern declaration in xichangehierarchy.c was broken anyway. This fixes a crash on creating a new master device. Reported-by: Maxim Levitsky Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b96823713129f641ee99306e3cadba8dfe21afa2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 24 09:06:29 2009 +1000 mi: include shmint.h if needed, silence compiler warning. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1b3859a49a3861517c9b34f6e8750f7ae0ff2b5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 12:29:39 2009 +1000 Xi: add swapping hook for XIGetFocus reply. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fe430d7d3b0a85fbea9e93171423688f76dc9e1e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 12:09:32 2009 +1000 test: add XIQueryPointer protocol tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 285c88018ba4b3819500027c9b6a05b8c27ff2ee Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 11:38:42 2009 +1000 Xi: correct length field for XIQueryPointer reply. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e4ea91a02d6fac9dad844150c5d2fbe7dc9629b1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 12:12:05 2009 +1000 Xi: allow XIQueryPointer requests for master pointers and floating slaves. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8e396f2b806496cdcac233cc731b0322735020c3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 12:11:19 2009 +1000 Xi: fix swapping for XIQueryPointer request/reply handling. buttons_size is necessary as WriteToClient swaps the buttons_len field, resulting in the wrong number of bytes being written later. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f1c856ef9073d9d02bc84ce1472883c8441a9758 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 10:42:15 2009 +1000 test: fake initialization of a sprite trace and window locations Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 58fd28f6b6bebab7f31c54e696f96d64ebb50f5a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 09:44:37 2009 +1000 Xi: return deviceid as error value in XIQueryPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b41dd4328bfb8a0981d299bb60f986a2bc55fd24 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 21 09:43:46 2009 +1000 record: include recordproto.h, require recordproto 1.13.99.1 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 65354e5a698a5b527db09afc431110afba0e14b2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 20 10:52:52 2009 +1000 Xi: return BadDevice for changing device cursors on non-master pointers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ef75301854d41c6b11dd2742fa9d17a5de8a4cfa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 20 10:52:24 2009 +1000 dix: FixUpEventFromWindow mustn't scramble non-device events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c73cd3b265c301b8a54ffe484d6c696f2abefb46 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sun Aug 16 18:07:49 2009 -0700 xfree86: Link libselinux with Xorg system libraries Put the reference to -lselinux in XORG_SYS_LIBS so it isn't added as a make dependency for libxorg.la. Otherwise, make goes looking for a file -lselinux in the current directory, which it obviously won't find. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Tested-by: Justin P. Mattock <justinmattock@gmail.com> commit 9d8fc33cae2fee7777edd20658dbf6a3ffb3d557 Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 20 16:56:04 2009 -0400 composite: Move screen init before extension registration. Otherwise, you'd still advertise the extension even if no screens actually supported it, and the first Composite protocol request would probably crash. commit ae68708ebe24c4cdf8c5265e206f6913d9298f37 Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 20 15:45:57 2009 -0400 xfree86: dump /proc/cmdline in the log on Linux commit 0b131a5cd91cea54240777c66a9cd385029e8cb2 Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 20 15:28:57 2009 -0400 linux: Yet more malloc() avoidance for backtrace() Turns out, there's an initializer at the top of backtrace() that (on some arches) calls dlopen(). dlopen(), unsurprisingly, calls malloc(). So, call backtrace() early in signal handler setup so we can later safely call it from the signal handler itself. commit 792dee3854cbede64e17fdc4736831edad295706 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 19 18:20:54 2009 +0300 xfree86: remove bus state change notification callback No one is using bus notifications now. We hope that the kernel take care of this properly. For other not-so-urgent-notifications (ACPI wakeups, etc) we can just register a handler on server's scheduler (using xf86AddGeneralHandler). And for external applications, the "trend" is to use HAL to kick notifications. So we're already provided of enough notification schemes. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit eb031d4013d36f6aef4aba45840762ae8635cc13 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 19 15:42:34 2009 -0400 linux: hand-roll a backtrace printer instead of using backtrace_symbols Why? Because backtrace_symbols calls malloc, which you can't do from a signal handler. Face? Palm. commit 75b9383d8a4c113ab3c6cfc1d5efcb5d9982a1bf Author: Jesse Adkins <jesse_adkins7@yahoo.com> Date: Tue Aug 18 21:13:40 2009 -0700 xserver doesn't stop all connections to localhost X.Org Bugzilla #23329: http://bugs.freedesktop.org/show_bug.cgi?id=23329 Patch #28648: http://bugs.freedesktop.org/attachment.cgi?id=28648 I noticed in xserver at os/access.c that xorg tries to stop connections to localhost by checking against the address 127.0.0.1. However, RFC 3330 defines the localhost network as 127.0.0.0/8. This means that any IPv4 address that starts with 127 is just another name for localhost. commit 2d34eace13c2016048c627c4e96c3b2399901078 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Aug 18 20:11:23 2009 -0700 Sun bug 6872917: Xorg not querying /dev/fb when no xorg.conf exists commit 48ee5558333bd324463b6994735cabb23de262ec (OpenSolaris VT support) broke the autoconfiguration code in xf86AutoConfig.c that uses the Solaris-specific VIS_GETIDENTIFIER ioctl on a frame buffer device like /dev/fb by changing xf86Info.consoleFd from /dev/fb to a /dev/vt/* device. This fixes it by reworking the code to split the console device (/dev/vt/*, the vtXX CLI option) from the frame buffer device (/dev/fb, -dev option) to allow both VT and autoconfig to work. It also fixes the console device to use /dev/fb when VT's are not supported instead of throwing a Fatal Error because it can't open /dev/vt/0. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit d225230148b3cdab3b32fce3abee26b818d4bab0 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Aug 18 12:15:32 2009 -0700 xfree86/linux: don't change VT perms unless we're running as root In non-setuid root installations, we shouldn't try to adjust VT/tty ownership. It will fail, and shouldn't be necessary anyway (since startup scripts or PAM should be handling perms for us in that case). Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit 41884b8f4dfe4d931c64a6046adfefcc2b7646c2 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 15:47:56 2009 +0300 xfree86: remove unused code (xf86Configure.c) The xorg.conf generator was not assigning correctly the primary device ("bootable") as screen zero. So just skip this kind of routines for now. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 097376266f256e3ae37a16b343ed1e3441a8f003 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 13:13:57 2009 +0300 xfree86: remove unaffected code (xf86Configure.c) Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit dd8960a9f37fbef65cb99e058c3772edfda7b6db Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 12:53:47 2009 +0300 xfree86: remove stupid macro (xf86Configure.c) It was confusing more instead helping. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 4ec7667bb17839bd4ec11091c75ecfff317fc96c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 12:33:35 2009 +0300 xfree86: remove wrong commentary Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 2e8c2b8ae6a092871838b7cceaaf4a7590bce1d3 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 12:28:15 2009 +0300 xfree86: header clean up (xf86Configure.c) Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 2df414a33321ae772af1e7e52c36aec222bb3c8f Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Aug 18 12:14:27 2009 +0300 xfree86: reorganize xf86Configure.c No semantical changes. Only code moved around. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 113e66a1ffe2a43c4d1c92a7d78ca43b4db58822 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sun Aug 16 21:02:11 2009 +0300 xfree86: remove unused PCI header Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 Author: Richard Hughes <richard@hughsie.com> Date: Mon Aug 17 09:15:32 2009 +0100 Do not reset lastDeviceEventTime when we do dixSaveScreens When we turn off DPMS with DPMSModeOff and do dixSaveScreens, don't reset the event time else session clients using IDLETIME will be reset. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4098ad72d00e65d142fb9fe8a1194be35338508b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Sun Aug 16 00:06:10 2009 -0400 xace: fix access mode in dixLookupWindow within several RandR calls. Referencing a screen using a window only requires GetAttr access. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit d4b8f7602b5e266a0ebd3b1ba23724362cc7de3a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 10 18:39:04 2009 -0400 xace: fix access mode in dixLookupWindow call within ProcUngrabKey. Referencing a window (as grab-window) only requires GetAttr access. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 6d2f4e487869f10de4a62365b4d6de036c752ab8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 10 18:36:53 2009 -0400 Add XI2 requests to protocol.txt Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 73975ef3a39ce522c6206ca800ed175fbf851dcf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 10 18:34:07 2009 -0400 xselinux: Allow per-client device create contexts. The previous behavior was to set the serverClient's value which was used globally. This is in support of XI2, where clients can create device pairs directly. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 66e32d252cffcd4fe7d505f1c211253f23c5002c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 10 18:33:05 2009 -0400 xselinux: Add more new device permissions for XI2. Reflects the ability of clients to create/destroy device objects. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 1f4ea22a20fdd30412a259a87eee133155e1163d Author: Rémi Cardona <remi@gentoo.org> Date: Mon Aug 17 11:33:24 2009 +0200 configure: fix help string after Xnest default build was changed Signed-off-by: Rémi Cardona <remi@gentoo.org> commit 7e37e7c50e4fdcb53296a99d90af3d90081ce9bb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 11 14:39:50 2009 +1000 test: add protocol tests for DeviceChangedEvents Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2851f04cb2f6e5c30267f733d867c86d4e69a485 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 11 16:27:40 2009 +1000 dix: rework DeviceChangedEvents a bit. DCEs are now processed when sent throught the master device, not when sent through the slave device. This includes a removal of some un-used (or partly used) fields in the DCE itself to something more self-explanatory. TODO: if a device has events queued and its attachment is changed, the DCE is silently dropped now. Instead, it should be generated as soon as the first event after the attachment is sent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c1d901d723c3bee523736eacc15b44a7dff484fe Author: Richard Hughes <richard@hughsie.com> Date: Fri Aug 14 11:44:35 2009 +0100 Don't reset the lastDeviceEventTime when doing DPMS actions When we change the DPMS mode, don't play games with the last event time as this breaks applications using IDLETIME to turn the backlight off after a preset time. This patch fixes gnome-power-manager and xfce-power-manager Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dca4de72d375c4b9bcdd25b151e291a77a5b06cc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Aug 15 20:17:20 2009 +1000 dix: fix potential use of unused variable 'mask'. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 978b65bce14598f2d42ca0177ea58fef71fc12c5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 14 15:05:42 2009 +1000 include: XInputExtensionInit doesn't need to be exported. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3989dc1d34f116f30915632cc5286937392e180a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 11 16:20:20 2009 +1000 dix: use the XI2 defines for class types. Doesn't matter really, they have the same values anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fe045820f1fb33991e8bff5c6e192097caa85727 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 15:34:00 2009 +1000 input: move DeviceChangedEvent conversion into eventconvert.c The version in eventconvert.c was half broken and for some reason we ended up with a second version in exevents.c (which works). Move it over to where it belongs and call EventToXI2 instad of having a custom function for it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33eb6f70816921abc5da62e434f40e78d672274e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 14 13:49:58 2009 +1000 include: Unexport most symbols from exevents.h. And shuffle them around so that the part used by drivers is up the top and commented. Also, woo, the sdksyms script doesn't like declarations with return type and function name on the same line... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1373c2ea877b562076a4a3c97e8e4f999c977217 Author: Dave Airlie <airlied@redhat.com> Date: Sat Aug 15 12:14:26 2009 +1000 exa: clarify createpixmap2 new pitch return commit 48ee5558333bd324463b6994735cabb23de262ec Author: Aaron Zang <Aaron.Zang@Sun.COM> Date: Mon Aug 3 23:21:39 2009 -0700 Add new VT support for OpenSolaris & future Solaris releases Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 613e76ff9055d8ac2b1af1130668180646a9e14c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Aug 3 21:38:51 2009 -0700 Remove support for Solaris x86 releases older than Solaris 8 If you want to run a pre-1999 kernel, you'll need a pre-2009 X server [Some pre-Solaris 8 VT support is left by this patch to allow reuse by the new Solaris VT support that follows in the next patch.] Signed-off-by: Aaron Zang <Aaron.Zang@Sun.COM> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 6c292d17053eb2a7e7054e51210f423dbc0cb7e8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 14 11:48:54 2009 +1000 dix: update the sprite trace for all masters && floating slaves (#23257) When the windows are restructured, CheckMotion needs to be called for all masters and floating slaves to update the spriteTrace. X.Org Bug 23257 <http://bugs.freedesktop.org/show_bug.cgi?id=23257> Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 49046088f10cceaea7da97401d742d3fb59371f5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 14 09:48:45 2009 +1000 config: don't shutdown the libhal ctx if it failed to initialize (#23213) Regression introduced by b1c3dc6ae226db178420e3b5f297b94afc87c94c. Shutting down the libhal_ctx if the init failed may cause an abort. This can happen if hald is not yet running at server startup. X.Org Bug 23213 <http://bugs.freedesktop.org/show_bug.cgi?id=23213> Tested-by: Stefan Dirsch Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1545a120df6dffb5b84fe96c5a992357520b7c8d Author: Dave Airlie <airlied@redhat.com> Date: Tue Aug 11 15:00:36 2009 +1000 exa: fix CreatePixmap2 to be useful for tiling. This adds a pitch return so that the driver can align the pitch to any value it wishes and not just the one it gave to EXA at startup. commit db568f9eabf3450d8a023597ff007df355b13ea8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 13 16:37:00 2009 +1000 Xext: fix up wrong conditions for negative sync transitions. If the counter had a value higher than the trigger value for a negative transition, the trigger value did not get set. The correct sequence of checks is: if (positive transition) if (counter value < trigger value) set up trigger if (negative transition) if (counter value > trigger value) set up trigger Red Hat Bug 501601 <https://bugzilla.redhat.com/show_bug.cgi?id=501601> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a3e50b05747cab92090ae7d7f4475cd61d3fcadf Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Mon Jul 27 20:58:44 2009 +0200 Add 4 missing 10bpc picture formats to the server format list. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit 36e24a6d93bd5aced4e566b80bf2d03555fab9ca Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 13 10:50:26 2009 +1000 Xext: add missing return code check to ProcSyncDestroyAlarm Introduced with 57aff88c7d0761e590806d07bee1c9410680c89f. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ce69a06aff934b2dcded8606cab079ac6465007c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 11 16:16:54 2009 +1000 Xi: fix up broken DeviceChangedEvent swapping code commit b44d34d5fd0d8aaacb89121e8b4afba04f1dcc80 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 15:32:59 2009 +1000 include: correct a copy/paste error in a comment. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c477ac8a151a28ba23f5c87e8f7affd6e82cfaa9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 15:15:02 2009 +1000 dix: re-name internal eventToClassesChanged to eventToDeviceChanged DeviceClassesChangedEvents (where this name comes from) have been replaced with DeviceChangedEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit af38f6790c4c8ba1e70f5c5ba3530ded85d6e372 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 14:08:59 2009 +1000 test: add event conversion tests for XIDeviceEvents commit 3f2e4b9867b6877ee7be32b151fcaf221ef0812f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 14:07:54 2009 +1000 Xi: add event swapping for XIRawEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f3b2f9fb734ecfff6db9ae85b0d247856ede8112 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 13:12:40 2009 +1000 Xi: fix event swapping for XIDeviceEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e46f02fa2de79261221b42ab73f9daa2ce8ac650 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 09:50:16 2009 +1000 Xext: allocate a separate event list for XTest events (#23100) XTest event processing may be interrupted by a SIGIO. If Xtest uses the same event list as the rest of the server, this list may be overwritten in-flight. X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8483b08152104dc619d9e44f877d2687d866355e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 7 16:11:37 2009 +1000 test: add focus and enter conversion testing. Doesn't actually convert anything, but verify the expected behaviour. commit 59dc59a72ffd4cbc4df207bc688c92bb4863e8a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 7 11:23:33 2009 +1000 test: add XI2 eventconversion test for raw events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 10d7948e0360860e1e9633dca39f646d492e73bf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 7 10:17:14 2009 +1000 test: fix build error introduced by new AllocDevicePair API Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3f161a0aac39fbdeef393a17269486b8dace4672 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 10 14:14:35 2009 +1000 Xi: un-statify XI2EventSwap, it is needed for tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 55e1ea08d03d89ecc0f2db7652a4d15567204696 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 3 16:46:11 2009 +1000 Xi: get device changed data from DeviceChangedEvents, not the device (#23100) If a new device posts an event while the DCE is in the queue, getting the data from the device may result in invalid memory access. X.Org Bug 23100 <http://bugs.freedesktop.org/show_bug.cgi?id=23100> commit 8ce4fde76fdf747fd3e00836c9c9c542e516ae9a Author: Matt Turner <mattst88@gmail.com> Date: Wed Aug 12 14:45:13 2009 -0400 Fix build on Alpha commit a400dbb38f93030d51afe806b4b20d5ef501c855 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Aug 12 17:48:36 2009 +0100 Xming: Add NET_WM_ICON to native icon conversion fd.o bugzilla #4491 originally from a patch by Joe Krahn <jkrahn@nc.rr.com> Convert a NET_WM_ICON to a native icon by converting to a native bitmap and then using CreateIconIndirect() Don't use icon alpha on Windows 2000 or if display isn't 32-bit, convert alpha channel to a 1-bit transparency mask using a threshold value Fix warning in winScaleXBitmapToWindows() about signedness of *iconData Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 211511f150ce189681aff176c311fa8f312517e9 Author: Soren Sandmann Pedersen <ssp@redhat.com> Date: Tue Aug 11 14:40:42 2009 -0400 Disable the out-of-bounds workaround in pixman. This workaround was necessary for older X servers, but now fb should be using correct coordinates. Also bump pixman requirement to 0.15.20. commit 93d9646c713336e03c135204c061f561d3654e23 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Sat Aug 8 20:18:10 2009 +0300 mi: fix indentation mieq.c looks indented-wise now. Let's see how long it will take to someone mess it again. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit f9a2fff2248d7254958857677cabfea914ed4853 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 5 21:02:29 2009 +0300 mi: fix cursor warping screens The server was processing ET_RawMotion type when the cursor was wrapping to another screen and getting wrong valuator values. This fix such issue considering only ET_Motion, ET_KeyPress, ET_KeyRelease, ET_ButtonPress and ET_ButtonRelease types when the cursor detects a new screen, keeping the "normal" processing of device events. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d573cc46d3106824902ab4f926617bd9959af57c Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Aug 8 11:32:05 2009 +0200 exa: more safety commit 8b652435cd42929e2d187b353b3b20e798569356 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Aug 8 10:35:01 2009 +0200 exa: minor cleanup commit a73f95aa93634cf7ba2c7c9274a046b2df2adca7 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Aug 8 02:31:23 2009 +0200 exa: Fix the broken upload fallback for "mixed" - Replace it with something wfb friendly while i'm at it. commit c029678bf7883b91f3c8095e764abbee246c9bb6 Author: Julien Cristau <jcristau@debian.org> Date: Fri Aug 7 20:42:30 2009 +0200 configure.ac: drop dependency on fontenc Nothing in the server uses this anymore. commit 3943df7f76c1b4930fb7370d9d145cee96dd562b Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Aug 7 20:36:03 2009 +0200 exa: one can never be too careful commit 1548e8ae5d28ed0eb6057a1a19cfc84a78ef34dc Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Aug 7 20:04:53 2009 +0200 exa: fix a potential loophole in "mixed" - Always free sys_ptr before setting the pixmap to pinned. commit e94c7c42ce9d6a194b76ba7e8b3904b180f93a1b Author: Dave Airlie <airlied@redhat.com> Date: Fri Aug 7 13:36:52 2009 +1000 parser: make libxf86config_internal.la not installed. commit 5fb188b547e0ef4e2f2c59b66a3183b004e4a1e9 Author: Dave Airlie <airlied@redhat.com> Date: Fri Aug 7 12:05:51 2009 +1000 ddx: fix xf86Config.a generation We were generating a shared library, but this lib is foobar, the parser requires some symbols from the X server or from the program its being linked into. If the program its being linked into (say a python .so) has symbol visibility enabled then it will fail to dynamic link, also if this .so has symbol visiblity enabled it will fail to dynamic link. Screw it go back to a .a file really unless someone cleans it up properly. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 3047bd067464efb9857960d3fa6324b947faa970 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Aug 5 18:39:47 2009 +0200 exa: delay malloc for "mixed" commit e8ac2ed5dc4c2ac0a5e1e1f371f94c15b1c729dd Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Aug 5 16:12:16 2009 +0200 exa: implement exaMoveInPixmap for "mixed" - This can be used to force creation of driver pixmap. - Not for 1 or 4 bpp. - Driver can still fail (driver) pixmap creation. commit 9d2a7128d3e66b8c076a714d69f84bcad49391b9 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Aug 2 02:35:46 2009 +0200 exa: Use damage to optimise away useless copies. commit 03ecb164f2592c954aa408bf121e0c67b604d854 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Aug 1 19:19:19 2009 +0200 exa: A simple 3rd backend implementation. - Based on driver pixmaps with some changes (completely transparent to driver). - It helps with the problem of known software fallbacks, such as trapezoids. - exaDoMigration is now called for all cases that provide a do_migration hook. - exa_migration.c is renamed to exa_migration_classic.c commit ac7ac913fd98ea359c05c89968ab53a3223615b4 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Jul 22 21:35:41 2009 +0200 exa: Split out some classic and driver allocated pixmap code into seperate files - Create a few seperate functions and a few private function pointers. - Replace a few if conditions with a check for pExaPix->pDamage instead. - This is in preperation of a third scheme that lies somewhere in between. - Code clarity would have suffered (i started working on it and didn't like the mess). commit 3abbd327f4a732408119de1f8e9ecba4812772a5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 15:47:46 2009 +1000 dix: detach SD during XI2 grabs only. XI1 grabs on slave devices leave the device attached - just like in earlier versions of XI. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c29aa7da220661532b05972cacd3dbaff29408b5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 15:33:07 2009 +1000 Revert "dix: Remove temporary detachment of slave devices." This reverts commit 0c0ef42292f4c910c73b308cd75d77637312da53. Tested-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 931160fcf378120e58849d801dbc62bed6e65a4b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 4 02:53:17 2009 -0700 XQuartz: AIGLX: Provide empty __glXAquaDrawableResize to avoid crashing in DoMakeCurrent (cherry picked from commit 60a1d2c2764f2f02c0751940a264588717afce79) commit 0fe639a314de397516cf00d8100da8086abdd97a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 1 22:53:45 2009 -0700 XQuartz: Only save lastpt on mouse/tablet events (cherry picked from commit 552be074e5be6492df3e290e8b7d9daff1a2cb34) commit 491c2d74c12d7f9bc9f31b427ece04e049ebff5a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 1 12:43:14 2009 -0700 XQuartz: Use mouseLocation rather than locationInWindow when setting lastpt I don't understand the *why* ... I just see that it works better this way for games like Quake2 through wine. It *should* be better the other way, but somehow it's not. I guess this will go in my list of puzzles to unravel. (cherry picked from commit 65ae2d00e1a53f97f2ff9522406ab69d50bf3199) commit df6c01352471c766e9f71ceac03cab8c3911faa1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 1 02:32:52 2009 -0700 XQuartz: Don't use location delta for tablets since NSEvent does not give a precise delta. (cherry picked from commit 6c5bf756a7f5389cdfe2e43a339d7c31a3e522e9) commit e360104880e6e2e666aa05dfd56e2ef3880f38ef Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 5 16:17:01 2009 -0700 XQuartz: Purge redundant QuartzBell (cherry picked from commit de14a63d20095e1537fd74352850c734d900031d) commit 8c0085c715effdc450d78eec14bc32e6214c78af Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 5 22:50:44 2009 +0300 xfree86: remove more RAC junky Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 444723273ae82fc3f6707ed1a461aaaa8fdae39c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 5 22:48:02 2009 +0300 xfree86: reorganize pci code - xf86PciVideoInfo doesn't need to be global - remove unused macros Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 20169414e1afd5d1d02cb1b57866b1c158b2fc6c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Aug 5 22:44:19 2009 +0300 xfree86: remove unused functions RAC trash. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 95b678e6dc41f2524ada4eb11289687fafce7588 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Aug 3 23:49:56 2009 -0700 Correct modifier map built when ProcSetModifierMapping is called Fixes xmodmap changes to modifiers to stop corrupting modifier maps Previous code had two bugs: - the code to increment mod was after the code to continue if no modifier was set, so mod wouldn't be incremented for modifiers with no keys mapped to them (such as if you called xmodmap -e 'clear Lock') - the value it set in the modifier map was the raw modifier number, not the bitmask value for that modifier Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4ca305956e5ea6f606b22ef62aa462186a7b95f0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 09:40:56 2009 +1000 Re-enable Xnest by default. Xnest was disabled in 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd due do build errors. These errors have since been fixed. Re-enable Xnest by default to increase coverage by default builds. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5904ef2ccd6056b187ca76f104c21e2d686bfc1d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 10:40:20 2009 +1000 xnest: restore xnestUpdateModifierState The meat of xnestUpdateModifierState was ifdef'd out in 6ef46c40e62def4841a4cff4e0b443516a2ed782. This resulted in stuck modifiers when a modifier key release event wasn't sent to Xnest (e.g. Alt-Tab away). See X.Org Bug 3664 <https://bugs.freedesktop.org/show_bug.cgi?id=3664> for the original bug report. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 44afc7577ad3339f4555438388f6a4d8e220c991 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 09:51:05 2009 +1000 xnest: include exevents.h for XIGetKnownProperty. Silences compiler warning. Pointer.c: In function ‘xnestPointerProc’: Pointer.c:64: warning: implicit declaration of function ‘XIGetKnownProperty’ Pointer.c:64: warning: nested extern declaration of ‘XIGetKnownProperty’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 32ce5c83a504d2cafd2b19ed628b40032ef347b3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 09:39:47 2009 +1000 xnest: use AllocDevicePair for Xnest device initalization All Xnest needs is a single pointer+keyboard pair. AllocDevicePair sets them up nicely with the name assigned etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 26b83ad4a29dc180b336a19d9e97589814e93e37 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Aug 5 09:32:50 2009 +1000 dix: require PointerProc and KeyboardProc to be passed into AllocDevicePair. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6a500fdd4d717947b86f6d6844ebf9a8603eb8e2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:29:55 2009 +1000 dmx: include exglobals.h for DeviceKeyPress and friends. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 591c2f8758ef36a9bbf1625f9c207a1804f58ef4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:30:52 2009 +1000 dmx: typecast to InternalEvent* before mieqEnqueue. Silences a few compiler warnings. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 15b425b5a6630d2ac95b490f4f4dbb9240ac9c5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:31:42 2009 +1000 dmx: move 'state' around to silence compiler warning. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e10f802c8260e034fd6c835d3f2622d9cd5085f8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:40:17 2009 +1000 dmx: include inputstr.h for inputInfo.pointer Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9ffc3f280b3907a672f99101548a5eb52027b37f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:40:31 2009 +1000 dmx: don't call InitKbdFeedbackClassDeviceStruct - doesn't exist anymore. InitKeyboardDeviceStruct does the same task now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 63155cf985ee15bf6aad95066b076ab680cf5a31 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:28:30 2009 +1000 dmx: pass button/axis labels into the init functions (currently unset) Currently only None labels are passed in, in the future these labels should be whatever the respective buttions/axes are. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit af85973a0a80fb0ba82330ae3ec897f65d618003 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:25:06 2009 +1000 dmx: remove now-useless defines. XI is mandatory so we can expect both to be defined. commit 654d7a02600bbafd890f555a081aa0a2fcb5e253 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:23:01 2009 +1000 Revert "dmx: claim we support XI 2." XQueryInputVersion doesn't exist anymore and for now XI 1 support is good enough. This reverts commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004. commit e7c950c6273ff93f25c091c93d86da6e332a2277 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 15:15:24 2009 +1000 dmx: fix a call to XkbSetRulesDflts, takes XkbRMLVOSet now. commit 2cde9208ff756e33d162e2324f4b99540230d743 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 14:58:25 2009 +1000 dmx: Enable/DisableDevice take a boolean variable now. We want to send events here, so pass in TRUE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1e210d6d10ec63d22247e5801890e024826fc861 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Aug 4 14:41:46 2009 +1000 xkb: remove now-unused XkbGetKeysym. XkbGetKeysyms was only used by the now-removed Keysym grabs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a6ce6c70cff5108f0751b662b8e52c83daab0722 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Aug 4 23:23:21 2009 +0200 EXA: Simplify exaGetPixmapFirstPixel using GetImage. commit 842373104d08d47efc863cecbe30431d3faebef1 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Aug 4 23:23:21 2009 +0200 Add support for RENDER BGRA formats. commit 0bf7eaf3052ce24066b0a7c14860b4762fb81364 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Aug 3 23:14:50 2009 -0700 Ansify function arguments in VTsw_noop.c Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 736f2d64725c6df8413e627bd40ce7ecb011acc7 Author: Paul Bender <pebender@gmail.com> Date: Tue Jun 30 15:50:46 2009 -0800 Bug 16832: XDMCP related build error when --disable-xdmcp is used X.Org Bugzilla #16832: http://bugs.freedesktop.org/show_bug.cgi?id=16832 Patch #27279: http://bugs.freedesktop.org/attachment.cgi?id=27279 commit b159a98f7fbdb3f8b337cd1bfd2ff27312856619 Author: Lee Leahu <freedesktop-bugs@dyweni.com> Date: Thu Oct 23 21:03:57 2008 -0500 seg fault when initializing DMX screens X.Org Bugzilla #18086: http://bugs.freedesktop.org/show_bug.cgi?id=18086 Patch #19837: http://bugs.freedesktop.org/attachment.cgi?id=19837 commit 5da9b255a64bec7dbf5ddb392d54dac9be5b43c0 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Aug 3 19:53:27 2009 -0700 Fix blddir != srcdir builds of solaris-*.il files Fixes http://bugs.freedesktop.org/show_bug.cgi?id=17509 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 1e69fd4a60147287b31e53bfc61543fb17bb82c8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 3 12:03:26 2009 +1000 xnest: fix up parameters to InitKeyboardDeviceStruct. IKDS takes a DeviceIntPtr as first argument, and an RMVLO struct as second. The keysyms stuff is long gone now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 008658049cbeea35a9f76f98037aa2f4173f3573 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 3 12:00:45 2009 +1000 xnest: silence compiler warnings by typecasing properly. Events.c: In function ‘xnestQueueKeyEvent’: Events.c:112: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c: In function ‘xnestCollectEvents’: Events.c:141: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:150: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:160: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Events.c:193: warning: passing argument 2 of ‘mieqEnqueue’ from incompatible pointer type ../../mi/mi.h:203: note: expected ‘union InternalEvent *’ but argument is of type ‘struct xEvent *’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 664ac92d8bbe956dd6fd80fac5dc3161028803b2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 31 14:38:35 2009 +1000 xfixes: backup the DisplayCursor/CloseScreen proc before restoring it (#23034) The screen's DisplayCursor func is wrapped as AnimCurDisplayCursor -> CursorDisplayCursor -> miPointerDisplayCursor. Calling CursorDisplayCursor while an animated cursor was currently displayed would remove AnimCurDisplayCursor from the wrap stack. Thus, the next call to ChangeToCursor wouldn't update the animated cursor state. The block handler for animated cursors would then continuously overwrite the actual cursor, leaving an animated cursor everywhere on the screen. X.Org Bug 23034 <http://bugs.freedesktop.org/show_bug.cgi?id=23034> commit f48dfcc1b772a09428e328c72124ea0d46a73416 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 31 10:44:28 2009 +1000 xfixes: allocate CurrentCursor for all devices. XFixes requires cursor notifies to clients when the cursor changes. This should work on the ClientPointer and then on all master pointers. Hence change CurrentCursor to a MAXDEVICES array. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d3e5629fac224d53a972df5e2a87db02534f9b17 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 30 16:36:56 2009 +1000 dix: call SetFocusOut and LeaveWindow when disabling a device. PointerWindows[x] would be set after removing a master pointer. Destroying this window then crashed the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 97ed946cfccec5979c47b5fabf1ad56cc7d33ef4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 30 16:36:30 2009 +1000 dix: SetFocusOut and LeaveWindow don't need parameters other than dev. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d040940efe041b57e6323921c380ceb2bb43f41e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 30 16:16:51 2009 +1000 xfixes: FixesHideCursor should work on all master pointers. Presumably, a client calling HideCursor doesn't want any cursor displayed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b83c682e7ea4e10757eca6363de28281108591a8 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Mon Aug 3 02:46:57 2009 +0300 xf86Xinput: xf86PostButtonEventP must set POINTER_ACCELERATE for relative events. Thanks to Peter Hutterer for spotting this bug. commit ae65daab080c6269f0eadc6be1a48bf27866c542 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 31 15:32:07 2009 -0700 XQuartz: Unify how we set our bitmasks for visuals (cherry picked from commit c230b52c27ce50ac6c27011ec8e88f1b263b25f9) commit 4a53fed41d711f270c7d8a7fbeaafb4fb619e879 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 31 14:19:50 2009 -0700 XQuartz: Dead code removal for StaticColor visual (cherry picked from commit e457a44e87950207f6c16bf82bf5af11c777ecf1) commit da0a2747803dbecb1308181176a784e14cf02809 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 31 14:14:21 2009 -0700 XQuartz: Cleanup the bitmask setting for GLX visuals. (cherry picked from commit d32c3df258e748958ef997c675dc4fae118c0d7b) commit 70ac671af2f092471022590cb7a19ef9155c51b4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 30 01:30:52 2009 -0700 XQuartz: no DirectColor (cherry picked from commit df2fbc410f2c484612f65a6539a6cb069ef4a468) commit c0c72a866a237d3c2d9e69e1c69181ef5446e3f8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 30 00:51:55 2009 -0700 XQuartz: Define DDXRingBell (cherry picked from commit 113347381289497cb2a79994d0ef5f427ae63ac5) commit 949811313989809f5b58424af04b9fd8e1d0bec4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 30 21:59:40 2009 +1000 test: fix build by including eventstr.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0565f4ed4519962bed40a0bbcf0b409471f4de40 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 16:46:45 2009 +1000 Xi: set the sourceid for focus devices to the device id. Unlike Enter/Leave events generated by a device pushing the pointer around, a device doesn't change focus all by itself. It's a result of a SetInputFocus call, a window becoming unviewable or a grab activating. As such, the sourceid for focus events is always the deviceid itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit de4dd5848cab90b0f8b8243ca0b49985ef047124 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 16:45:34 2009 +1000 include: DeviceFocusEvent is not to be exported. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 46ac9f92416f3cb99b5d84a9d200237dc33a3bb7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 16:34:28 2009 +1000 dix: pass the sourceid around for enter/leave events. The sourceid for enter/leave events as a result of pointer motion is the ID of the slave device. The sourceid for those as a result of a grab activating is the device itself. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c299b2228fb63c192b72851c90e14ceaceb67bbc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 16:00:19 2009 +1000 dix: remove obsolete comment, parameter described doesn't exist. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5085ac09a50721d87196bd9f2607dc76200ca399 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 13:45:32 2009 +1000 input: switch internal event types to enums. Use enum EventType instead of ints. This requires a load of default cases in various switch statements to silence compiler warnings. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1ae8332d643299a3ee9a9f45a8e25b8c87c751e1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 13:39:38 2009 +1000 include: fix enum EventType declaration. Having EventType after the enum declares a variable. silly me. Reported-by: Aaron Plattner Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 994f7a1c814a89e90f710dac5bf6b2445fb64712 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 12:11:13 2009 +1000 record: silence some compiler warnings. warning: passing argument 4 of ‘RecordAProtocolElement’ discards qualifiers from pointer target type note: expected ‘pointer’ but argument is of type ‘const void *’ record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from incompatible pointer type ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type ‘struct xConnSetup *’ record.c:2745: warning: passing argument 1 of ‘SwapConnSetupInfo’ from incompatible pointer type ../include/swaprep.h:243: note: expected ‘char *’ but argument is of type ‘struct xConnSetup *’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a863d636293cd7361639c1a8cf9c4f7f15da1e1d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 12:09:34 2009 +1000 Xi: remove FIXME and obsolete include. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fac49df08f173f091cbb77feaf373d7d465358af Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 12:07:22 2009 +1000 Xi: remove obsolete comment. XI1 only uses 7 bits for deviceids, bit 8 is used for the MORE_EVENTS flag on the wire (when DeviceValuator events are required). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 845e65f08059e8f4bfd37356e99b48bba9416c0c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 29 11:54:14 2009 +1000 xkb: move XkbFilterEvents to xkbsrv.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8da0ff2d51086666d10ca7330d428e8610a4a0e3 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Tue Jul 28 08:20:37 2009 +0300 xf86Xinput: Add the xf86Post(Proximity|Button|Key)EventP helper functions. xf86PostKeyboardEvent also makes use of xf86PostKeyEventP to avoid code duplication, and the valuator verification has been split into the XI_VERIFY_VALUATORS macro. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a148d407429c7d13136b3fcafd2d279c5438df73 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 28 16:53:51 2009 +1000 xkb: restore XKB PtrBtn actions. Ifdef'd out since the switch to internal events. PtrBtn actions now work again. Instead of generating the event directly, GPE generates the event and it is then posted through the usual event processing routines (mieqProcessDeviceEvent). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3d3b8babd1a5407082f1a40875ed69f62ba2153f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 28 16:51:14 2009 +1000 mi: update master event copying to InternalEvents. This is long overdue. The device events are InternalEvents now (and only one at a time), diminishing the need for an EventList for the master event. Furthermore, don't make masterEvent a static since this will interfere if mieqProcessDeviceEvent is called from somewhere else (e.g. XKB actions). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f85619b14d130ec54d42cabfaee15e55ced0c665 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 28 16:48:56 2009 +1000 dix: update GetMaximumEventsNum() to real value (3). GPE and friends now use internal events so they may generate up to 3 events. One (optional) DeviceChanged event and one raw event plus a device event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0217d0370c0b0bce66a9c09092eda8e820274e2e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 28 14:54:30 2009 +1000 record: ifdef out RecordExtensionInit and print a warning to the log. The RECORD extension is currently broken. By ifdef'ing out the content of RecordExtensionInit the extension isn't added to the server's internal list and it does not get advertised to the client. Clients can thus fail gracefully with a "extension not supported" instead of waiting forever for events that never arrive. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4e9b2938cd8637a5d3b0a4c9f69d6ee75faab3a0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 27 16:54:33 2009 +1000 include: untangle events.h from the SDK headers. InternalEvents shouldn't be used anywhere outside the X server itself. Split up into events.h for opaque typedefs for the events needed by various headers and eventstr.h for the actual struct definitions. eventstr.h must only be included by code that requires internal events and is not part of the SDK. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fad5f96c01811af7490a071719e4017c019a8d9b Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jul 29 13:50:48 2009 +0100 Cygwin/X: Only try to build rootless extension if multiwindow extwm mode is being built Rootless extension still needs a bit more work to build successfully for Cygwin/X commit de2ae521abde445daaf025a07aa01563ca5ddd41 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jul 26 20:48:19 2009 +0100 Xming: Use RegisterClassEx() instead of superseded RegisterClass() RegisterClass is supserseded by RegisterClassEx, so change to using that everywhere Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 764ce6ee683db342264bbca4df6379eb6093fb85 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Jul 28 16:16:57 2009 +0100 Xming: Use GetClassLongPtr() instead of superseded GetClassLong() GetClassLong() is superseded by GetClassLongPtr(), so change to using that commit a85523dc50f392a33a1c00302a0946828bc9249d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jul 28 22:52:33 2009 -0700 XQuartz: Avoid a possible spinlock in applicationWillTerminate (cherry picked from commit f430cda0fdcc1a8fc5f4795743b40f09ff0bd869) commit 1e49c8d340ee8d8b6f90abcc2e2e9c390cbcd622 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jul 28 13:40:15 2009 -0700 XQuartz: Avoid namespace collission for BOOL in Sparkle (cherry picked from commit 227c6e01a641b72158201553273299283cdb5599) commit 442967c90dd9d8483a56bdc9237c49e33d619126 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jul 28 15:02:37 2009 -0700 Remove hardcoded gcc -Wall option from configure.ac Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 52e9ef5664a697a31102e8761eaa03cff01d14d8 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jul 28 19:04:59 2009 +0300 xfree86: remove some RAC junk Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit d57361bb9ac08bec470f76ca8ca602d60c339502 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jul 28 18:55:32 2009 +0300 doc: remove outdated PCI/RAC/Domain notes Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 7b3d05ebd5a55f88098f4a763d1fa7ca110bb780 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jul 28 18:45:16 2009 +0300 xfree86: remove pci debug macros there's no effect when their are enabled. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 6089d9cfde533c6a7aec7dfc08aec9c8f2f18e27 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jul 28 18:29:35 2009 +0300 xfree86: remove RAC/resource doc Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit c553161e17ebc577ecb91ec6c81f0bdd0ae85e13 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 24 13:47:31 2009 +0300 xfree86: delete devices probe code (-probe and -probeonly options) Inside a windowing system, it's not the place to probe for devices. Goodbye -probe and -probeonly. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit c09779f95a9772c0556760222dfc570dbaf8a28e Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 24 13:37:31 2009 +0300 xfree86: delete stupid video driver dump (-modalias option) Such stupid and ugly way to dump PCI information! Oh boy... Anyway, this doesn't belong to the X server at all. Go away! Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 0524420622df6cbdb3872917906f7b2a6ec02958 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Jul 27 15:49:41 2009 +0100 Cygwin/X: use GWLP_WNDPROC, GWLP_USERDATA with Get/SetWindowLongPtr Missed from commit b3751454cbe02ee952bab213e8c3684d429c41b3 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b1c3dc6ae226db178420e3b5f297b94afc87c94c Author: Rémi Cardona <remi@gentoo.org> Date: Mon Jul 27 12:07:51 2009 +0200 config: add HAL error checks This patch simplifies error handling in the HAL code and fixes a segfault if libhal_find_device_by_capability() failed. Fixes http://bugs.gentoo.org/278760 Based on a patch by Martin von Gagern <Martin.vGagern@gmx.net> Signed-off-by: Rémi Cardona <remi@gentoo.org> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8898203b0d0e9fa03453b2bcd9b88843cccc3230 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jul 28 19:35:37 2009 +1000 sbus: fixup for rac removal commit 4b42448a2388d40f257774fbffdccaea87bd0347 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jul 28 14:47:42 2009 +1000 xserver: remove RAC/resource handling code. This changes the ABI, but since the video ABI is at 6 already it should be fine. driver changes are in the pipeline after this. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 0a168401c401727e49a12cae43a6a387b1f2928d Author: Dave Airlie <airlied@redhat.com> Date: Tue Jul 28 14:19:24 2009 +1000 pci: add support for pci is boot vga call. This allows us to ask the kernel for the boot VGA device instead of nasty guessing. commit b3751454cbe02ee952bab213e8c3684d429c41b3 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Jul 21 16:07:56 2009 +0100 Cygwin/X: Update Get/SetWindowLong() to Get/SetWindowLongPtr() everywhere Get/SetWindowLong() is superseded by Get/SetWindowLongPtr(), so change to using that everywhere it remains Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c81595e23b48368dafc054f023c1dd16bbad9494 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jul 26 02:32:17 2009 -0700 XQuartz: Overhaul setting up visuals The main change is cleanup of the visualConfigs and setting up alpha correctly there to match the visuals being added earlier (so the default visual has a corresponding GLX visual) (cherry picked from commit 7351db5c8746be30a4047469ee9b50bc19e62a89) commit 7f28c555b80dda2ed4f518efdb79733647dfea80 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 20:19:05 2009 -0700 XQuartz: Use CopyKeyClass to copy the keymap to the virtual core keyboard. (cherry picked from commit 9a801d1716f005c30be076fcc9ac8dbb3e74d989) commit 1031ac3a7306e7a82169c79c64607696c826c47f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 20:18:38 2009 -0700 Revert "XQuartz: Copy the keyboard map to the core keyboard" This reverts commit 795de791cf18c658421d701af645718493eac51e. commit 48703083a1cf308306f254691d7c2ecda09b3812 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 19:34:17 2009 -0700 XQuartz: Use pDev=NULL for DarwinSendDDXEvent These events aren't really related to physical input devices anyways, so it doesn't make sense to use the pointer. (cherry picked from commit bfe0b9cfa7af4a48dba849cab1eb152c409b4e08) commit b8e0f740829d0c81324aeb59222fc8e3d22493cc Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 20:17:25 2009 -0700 mieq: Protect from pDev=NULL in mieqEnqueue and mieqProcessInputEvents (cherry picked from commit bf60ffb49700da367f7f88983b042a88fef7219b) commit dab8de036808e363a8ec9be826cff7fbcd92b953 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 15:21:12 2009 -0700 XQuartz: Bump the reported version to X11R7.4 (cherry picked from commit c83f701aa75c75433b8745f5d79bca3a7516df91) commit 9e74bb97ab6cb83dd99ec36bd3842197263b8a8c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 10:39:26 2009 -0700 XQuartz: xpr: Added missing include for RootlessHideAllWindows (cherry picked from commit 75e104730810acbb11bf8503bac24ea25243b2ac) commit 09b024db636f5a306c9cec3806fffde9acd3c408 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 15:22:01 2009 -0700 XQuartz: Use the master device in DarwinSendDDXEvent to avoid duplicate events. (cherry picked from commit 6fa62192af937aa9656f64b516050bc099231c7a) commit 795de791cf18c658421d701af645718493eac51e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 25 15:25:06 2009 -0700 XQuartz: Copy the keyboard map to the core keyboard This still doesn't handle the modifier map... gotta figure out what to do now that SwitchCoreKeyboard is gone (cherry picked from commit 427e1aab41dabb54354bfd30f2baae98ac8202c0) commit af8047f7816b39be7015e8cbbe085c57bb354592 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Jul 17 15:10:46 2009 -0700 Damage: Add devPrivates to DamageRec Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit c80ed4945ef6dd50473fab871211b71b3d20dc3c Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Jul 17 15:10:32 2009 -0700 Damage: Add wrappable hooks for damage create, destroy, register, & unregister. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit fb46474feb69d52d3dfdd61452ced5cfc38f6651 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 24 09:16:37 2009 -0700 XQuartz: Rever the "Set can_quit to true during a Sparkle-initiated relaunch." change This was in place to work around the issue that was correctly solved with the previous commit (changing the Windows menu behavior). Reverting this change no longer causes crashing, so it's safe to show the dialog now. (cherry picked from commit 023cef31bbb2ab80a241098d82fcfd35ada75fc0) commit 0d73893a5795d5c1d28fd0287f2f1965f2ff1bda Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 23 20:03:29 2009 -0700 XQuartz: Change handling of Windows menu to workaround a bug triggered by mixing Sparkle and X11 windows <rdar://problem/7088335> NSApplication releases the separator in the Windows menu even though it's an IBOutlet (cherry picked from commit 27ac5135267be9cb221329ae68461117dd43a4bf) commit 171409cecbd848e5fec6334fc61a20e882e80fa9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jul 21 00:22:12 2009 -0700 XQuartz: Set can_quit to true during a Sparkle-initiated relaunch. (cherry picked from commit b2e9a77111d4572402d8ca95e3368db97ba7d598) commit 7ff84d350b44fa40669c1d0d48a715a0bf056ece Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Jul 20 22:38:25 2009 -0700 XQuartz: Added a "Check for X11 Updates..." menu item. (cherry picked from commit 305144bfa4b59791123c44e869fab93a084792d6) commit 1e1dbd1e462f571dad2f9684fcf4cd8ae17eedd5 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Mon Jun 29 11:46:17 2009 +0300 xfree86: "Staticize" functions in xf86AutoConfig.c Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 7c6b5458de9bc7f6cd972a36b56888aaa3d201ee Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 23 15:16:44 2009 -0700 Fix dist. * Makefile.am: Include the test/ subdirectory in the dist tarball. * include/Makefile.am: Move events.h to sdk_HEADERS and eventconvert.h to EXTRA_DIST so they're included in the tarball. events.h shouldn't be included in the SDK either, but for now it's needed by input.h. commit 20daa145c437c3ba67970146f6182849f87a1b43 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 23 08:33:00 2009 +1000 mi: fix build error caused by missing xtest.h xtest.h was renamed to xtestconst.h in xextproto. Requires xextproto 7.0.99.3 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 587c3a2d1961834558193e8e14e8e381a077a253 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Jul 22 10:55:46 2009 -0700 Bug #22804: Reject out of bounds XGetImage requests The XGetImage man page states: If the drawable is a window, the window must be viewable, and it must be the case that if there were no inferiors or overlapping windows, the specified rectangle of the window would be fully visible on the screen and wholly contained within the outside edges of the window, or a BadMatch error results. Note that the borders of the window can be included and read with this request. However, the server was only checking the requested region against the screen bounds, allowing XGetImage requests to read pixels outside the bounds of a window's ancestors. Normally, this would just read other pixels from the screen, but if one of the ancestor windows is redirected, the window's backing pixmap may be smaller than the window itself. This change checks the region against the window's bounding drawable, which is either the screen pixmap, a redirected window's backing pixmap, or the root window for servers that don't support GetWindowPixmap. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Keith Packard <keithp@keithp.com> commit ecd618957ebf01cb4137f98efec3faed35f8a9f5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 22 15:19:34 2009 +1000 dix: fix null-pointer dereference on activating enter/focus grabs. EventToXI2 returns a NULL event for enter/focus events since these events aren't yet wrapped into internal events. This is a quickfix only, it works thanks to the alignment of internal and XI2 event types. Eventually, enter/leave events should be wrapped into internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 48585bd1e3e98db0f3df1ecc68022510216e00cc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 22 12:09:24 2009 +1000 dix: use the event mask of the grab for TryClientEvents. A client that grabs for button/key events may not have the ButtonPress/KeyPress mask set and should not receive an event in that case. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4dc91b3e54503a1be555bae5b18f3e52f58be307 Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Tue Jul 21 17:21:28 2009 +0200 Check if new space was actually allocated before freeing. There will be no new space allocated, if mode != PropModeReplace and len == 0, or if mode is not one of the handled modes. This fixes freeing data that is still in use, leading to double frees and other memory corruption. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9a1bfa5664a80f03cedeb89b9f8a86115a08e7af Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 20 16:39:16 2009 +1000 input: remove XI2 keysym grabs, use keycode grabs instead. Keysym grabs are tricky in the details, keycode grabs are known to work. So for now, provide keycode grabs only. Requires inputproto 1.9.99.15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit afc3e3b5955ea4a49308399820cc4c499f4312da Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Jul 21 16:14:21 2009 +0100 Cygwin/X: winInitMultiWindowClass() should be static Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9dc8106ba095474fea1474622b0f0162c8fd5aa4 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jul 21 14:34:47 2009 +0200 randr12: Add compatibility for XF86VidMode gamma ramps. Fixes screensaver fadeout effects. Also make all RandR 1.2 compatibility code for XF86VidMode operate only on the CRTC associated with the compatibility output, not all CRTCs at once. commit 268e227ba06c027f5c56b1aaee5dcc6a2034403f Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jul 21 14:34:13 2009 +0200 EXA: Make Prepare/FinishAccess tracking resilient to repeated / nested calls. Use reference counting and do nothing unless the reference count transitions to/from 0. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22822 . As a bonus, this avoids calling the driver Prepare/FinishAccess hooks more than once per pixmap and operation. Also update the Doxygen documentation for the PrepareAccess driver hook to better match current reality. commit de7a14ca92f99ff03c8ad204aab5be8203c86a72 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jul 21 12:55:27 2009 +0200 EXA: Fix up some issues introduced by 00fe4a297744c81b40f0243fb56ad848a9be6a2b. * Check all pixmaps involved for damage records, fixes visual corruption due to the screen pixmap never having one. * Fix an array size and remove a now superfluous assignment. commit be4dd35ffecbf49aff13aa9f604a44c9b665ae92 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jul 18 15:51:29 2009 -0700 XQuartz: Initial support for automatic updates through Sparkle (cherry picked from commit c45f1be36426bceeef9af67c26351114f14f5277) commit 2415e2dce918efd49d5e6d71f705255a234a866b Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Jul 20 02:08:31 2009 +0200 EXA: Bail earlier from exaDoPutImage if the driver has no UploadToScreen hook. Also remove dead code associated with access_prepared local variable. commit 00fe4a297744c81b40f0243fb56ad848a9be6a2b Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Jul 20 02:04:40 2009 +0200 EXA: Completely eliminate exaDoMigration calls for drivers that manage pixmaps. commit 7b9915b11ed9eedd0698b4563328504d686ac4ec Author: Gaetan Nadon <memsize@videotron.ca> Date: Sat Jul 18 20:52:20 2009 -0400 dix: xserver "make dist" fails due to eventconvert.h (#27825) This header file is not in the /dix dir, but in the /include dir. The makefile aborted and the xserver distribution files were not created. The fix is to remove this header file from the libdix_la_SOURCES in the dix/Makefile.am. X.Org Bug 27825 <http://bugs.freedesktop.org/show_bug.cgi?id=27825> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a98acb290737ac6b0776f2ea8128a4613c0f778b Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 15 13:56:19 2009 -0400 s/xf86EnableOutputs/xf86CollectEnabledOutputs/ for clarity commit 8fab7f72f2cc4ac5ca415c95ccbd05d3084f10c4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 15 14:09:08 2009 -0400 randr: Add Option "Primary" to Monitor sections commit 053bb92145045e06f8d72c3bddb75806432faa1c Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 14:29:05 2009 -0400 xfree86: Remove xf86SetPriority GetClocks is pretty doomed to begin with, this really isn't going to make it worse. commit 3637945a45d55385335833197b18703379892884 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 14:10:45 2009 -0400 loader: Remove a useless check. commit ef2bb08c76f0d1eed0c8b3e4937648f0b6ae01e5 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 13:53:00 2009 -0400 loader: remove dead LoaderCheckUnresolved commit 06a2784232b5d0e2440ed365d272abdfa1f5d35f Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 13:40:48 2009 -0400 loader: Remove useless TestFree() macro commit 087745b809b9a834751e5c719b9d87967194369b Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:51:53 2009 -0400 fbdevhw: Remove pointless OS check, this never gets built on non-Linux commit 892c93553aa0b03aeb3f4c27d952cc4bb7120aff Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:51:27 2009 -0400 fbdevhw: Remove a #if 0 commit e5712f2926abf33b146a4ccfcf6e89c914dad37b Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:49:22 2009 -0400 fbdevhw: simplify some #if 1 commit 8868bb4131be25340bf65ec61b998d353965bab6 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:44:24 2009 -0400 randr: Un-duplicate the reduced blanking check. commit 453ee39bc6a6b46e6cda11512cfcd431ba32a4b7 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:39:37 2009 -0400 xfree86: Fix some misleading comments commit 2c57a7aa07fdf52be315ecb498341776268c1a10 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:32:53 2009 -0400 xfree86: Remove some #if 0 This code all lives in xf86Modes.c now anyway commit 1a8c89683ff40cdd1d33da89ab47e7bd240b9bb7 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 10:15:41 2009 -0400 xfree86: Remove TargetRefresh option This was a vestige from the days before we'd make the mode list from the EDID data, and from CRT technology when you could reasonably assume that higher refresh rates were better. Also it did not function as advertised, acting as a high-pass filter instead of a band-pass. commit b4ee3bf700e04ae1b3c4ec021373424ed6e5338f Author: Adam Jackson <ajax@redhat.com> Date: Fri Jul 17 14:57:50 2009 -0400 dbe: Fix indentation commit 0bb9a7e1650180a24246d14493a8168487cf8914 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 9 11:49:41 2009 -0400 displayid: Implement mode decoding. commit 2f1a9c5baa367818bf017bdb72f20a2f6fa7ac21 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 9 10:13:47 2009 -0400 ddc: s/xf86DDCMonitorSet/xf86EdidMonitorSet/ Since we need a second path for DisplayID. commit d0cb4f5a91932e901d10cac5f2a4ba12bb8a0e6f Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 9 10:10:18 2009 -0400 ddc: Refactor root window property code commit 14103b781201bc36896cbe9112a2e0d991fb785d Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 9 10:05:01 2009 -0400 ddc: Don't try to publish a root window property for DisplayID commit c302a5ff49146bff24df196fc36ed38745d42911 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 17:42:10 2009 -0400 ddc: Skeleton for xf86DoDisplayID() commit 0b36f68efb1171fcdbe53e93064394f5609b7fb5 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 15:36:15 2009 -0400 ddc: mv xf86DDC.c ddc.c commit 8eb82168fc5c7ea958a4f63676738510647dd203 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 15:34:42 2009 -0400 ddc: Give DisplayID a place to hang its hat commit ace0fe09aee48d57cd0079260cd8d20d041e8eb6 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 14:45:47 2009 -0400 ddc: Yet more code motion commit 3a350688bbe1257feaf1502b4009f5f701d2640e Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 14:37:38 2009 -0400 ddc: Code motion to eliminate forward decls commit 8797831f82637b0e65a08e1262d1ec57c075cc12 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 8 14:30:53 2009 -0400 ddc: Update a comment. commit bb6fa39eb3aa044ffc18632288fd59909ff06344 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 16 17:43:31 2009 -0400 dbe: Adapt to new headers commit 9965174f4f09a7de00a9569607e96226208bc2ce Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Thu Jul 16 12:12:48 2009 +0200 Check dev->u.master if there is a custom event handler, too Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c806162c133603a99d9cd844bb04485bb663707d Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Tue Jul 14 13:42:19 2009 +0200 Always update u.lastSlave Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4db8950b1dfc3150ee2e9f1f975e9ecb4eabb1f2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 17 10:40:59 2009 +1000 Xext: include securproto.h instead of securstr.h Reported-by: Byeong-ryeol Kim Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b5f6da1e9b37f52484948185dcf17950657cd65b Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Fri Jul 17 06:34:00 2009 +0300 Revert "Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty:" This reverts commit 7333dc2969f60af0abcfb28e7182a5fff9918223. False positive. commit f517fca31d8c341ad36f3de4863adb0bc5206176 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 16 17:28:56 2009 -0700 XQuartz: Localization updates (cherry picked from commit 4b797fc1edf2bd963410a3133e3d2182ccfda4c3) commit c8a35165147a9b2f747b25da80d0fdb4279a8331 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 16 17:20:16 2009 -0700 XQuartz: Cleanup getGlCapabilities to avoid hardcoding the number of displays (cherry picked from commit 12f7365f1f58d648217b16f09c2152fa47dcd7a1) commit e7bc9ff816c1848c700a376908a1411f1e20d29f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jul 16 16:59:47 2009 -0700 XQuartz: Allow more than 3 OSX displays (cherry picked from commit 45045eb3968069a8d74ce9188890a5537dc60fec) commit 7333dc2969f60af0abcfb28e7182a5fff9918223 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Thu Jul 16 18:57:49 2009 +0300 Coverity Prevent: RESOURCE_LEAK in AccelSetProfileProperty: Event alloc_arg: Called allocation function "XIPropToInt" on "ptr" [details] 167 rc = XIPropToInt(val, &nelem, &ptr); Event leaked_storage: Variable "ptr" goes out of scope commit 66eabbebaf1b40fed7670b7c05337ed6226dd81e Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Thu Jul 16 18:50:22 2009 +0300 Coverity Prevent: RESOURCE_LEAK in xf86CrtcSetInitialGamma commit 464e8ad733fa6afee028607d6e7d4663b4c273cc Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Thu Jul 16 17:51:08 2009 +0300 Coverity Prevent: NEGATIVE_RETURNS in fbdev_open_pci: Event var_tested_neg: Variable "fd" tested NEGATIVE At conditional (1): "fd != -1" taking false path 335 if (fd != -1) { Event negative_returns: Tracked variable "fd" was passed to a negative sink. 347 close(fd); commit 53ae6b63387e04324b23b6f8311cc22a154c1fb8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jul 15 23:18:35 2009 -0700 XQuartz: Cleanup keymap locking, fix a possible synchro bug (cherry picked from commit 33e7437a4984ee7c1b04b87d23dee7d4739d5f12) commit 6a90c7b93724a2d26eae70b5806ca06c91e7df4c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 16 09:28:42 2009 +1000 xkb: cosmetic fix, use TRUE instead of True. Rest of InitKeyboardDeviceStruct uses TRUE and FALSE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 52088d3c2d53a91b2690f9cc402f839d77769e37 Author: Éric Piel <eric.piel@trempin-utc.net> Date: Sun Jun 21 18:11:28 2009 +0200 xserver: remove unused code in clipValuators The axes variables was never used, remove it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d3f6b43a240eb763025b3cbf546cb7ae502c94fa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 15 16:51:05 2009 +1000 Update to xextproto 7.0.99.1. xextproto had Xlib client headers moved into libXext. Protocol header files are named fooproto.h, header files with constants foo.h or fooconst.h where foo.h was already in use for client-side headers. commit 693babbf12cc7969c3e211c4037c7af0d41c13e9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 15 12:30:02 2009 +1000 xkb: Remove XKMformat.h include from xkbsrv.h into the files that need it. xkbsrv.h is used by drivers, they don't need the XKM format and shouldn't require it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 35ff5cd26eb7564fefebf238e30b8d43cbb4dc25 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 15 10:29:46 2009 +1000 dix: fix wrong raw valuator copy internal events keep valuator data at the index for the valuator, not like the wire events that start with first_valuator. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 975bf60a82f863e3bdc36fc3f8201b48a4d1e6f7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 15 10:29:19 2009 +1000 dix: use sizeof(FP3232) instead of 2 * sizeof(int32_t). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d040af7fa3c7314917414a28d723bdda3c4289c3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 13 15:09:38 2009 +1000 Update to type-specific raw events - require inputproto 1.9.99.14. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 81b64f668541217c1c9518ac4a7e3fdf0a6e4002 Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Jul 15 00:38:01 2009 +0200 Require renderproto >= 0.11 and pixman-1 >= 0.15.14 for the new blend modes. commit 0ce42adbf4cff9e7f049d9fc79d588ece5936177 Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Jul 15 00:37:05 2009 +0200 Render: Add support for the PDF blend mode operators. commit 686e4867302a741f3029c4105b997d0f0ac7c13c Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Tue Jul 14 17:11:13 2009 +0300 xfree86: remove a bunch of unused pci headers Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit cc575a3ba4a52265e410b325c2291fe900a54f33 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:38:46 2009 +1000 test: add tests for ProcXIGetClientPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 92b0065a19dcde50494d2528e19a4ee76723b3da Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:38:00 2009 +1000 test: add ProcXISetClientPointer tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 019bc9d70c5b3beb69ca20b6bca3551e00415992 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:37:17 2009 +1000 test: add ProcXIGetSelectedEvents tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8579d39c12b065d8e82fe75af4b254c8ad4f4ab8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:36:22 2009 +1000 test: add ProcXISelectEvents tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 60b7a7990003a22be5cc26ebe4d8d2d0803b97de Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:33:22 2009 +1000 test: add ProcXIQueryDevice tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 441c91be05912e2665cc1d3ee72fb70dcd32e7a2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:32:15 2009 +1000 test: Add ProcXIQueryVersion tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1d635ae65b217e124b3bd5a8844e73f447eb1b79 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 11:30:53 2009 +1000 test: add xi2 directory, prepare for protocol testing. These two files provide a couple of common defines, functions and variables that will be used in a number of protocol tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4b93413b2a490a74de2e27b37268332b609ac872 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 14 11:20:01 2009 +1000 Add test subdir to base Makefile.am If unittests are enabled, make will build those as well - spotting potential build errors in the tests faster. Furthermore, this allows for the tests to be run from the top-level directory. This patch removes the "run make check to build the test suite" message since that'd pop up after every build now. If unittests are disabled, this change has no effect. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e2226f3cd7d1bef598f9657b756a171b02f1a299 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 14:57:04 2009 +1000 dbe: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3e1a054423c22f0e35f25127dde1ea8263892480 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 14:24:45 2009 +1000 record: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 089c460058c4e6814d98d40179eb4c731f37fa80 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 14:22:40 2009 +1000 xkb: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0dc11da57562a7bbb6830ab657a2b818c596a537 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:41:29 2009 +1000 ephyr: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 34bfaa9d9ecd90cfe8413bc275179fdcc193eab3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:29:26 2009 +1000 xfixes: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e216527107fda470b92b7e526f3db22465962a43 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:27:23 2009 +1000 render: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1d6b71b8d0dc24355e84391ba413170a03ccdbf4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:25:39 2009 +1000 os: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 86b239ff9c4d01685c357ca2b1ef761d167e3224 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:24:27 2009 +1000 randr: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7b9e84e320a6f6449fe7bc58a8d6a094ae37b86c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:20:21 2009 +1000 Xext: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit aa19d355125a10b1a385c8f134d68e79d3d609c7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 10 14:25:22 2009 +1000 xwin: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0b4e6af857bcc5513e4c19912a54656d4696e56d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:12:57 2009 +1000 xquartz: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit ad508c93c239a5ba8381000c031e96caf2769265 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:12:20 2009 +1000 xfree86: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c20304226b3ca2f8d0a4f4866480b0d71913941c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:07:00 2009 +1000 glx: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 87ce93c9973067255b4197d82772f83cd4ea5d27 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:06:47 2009 +1000 dmx: switch to byte counting functions Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dc82e11e509ecf586d77c3e7c1325d515509ce51 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 12:03:34 2009 +1000 exa: switch to byte counting functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Michel Dänzer <michel@daenzer.net> commit 2d35ea8d957a955e1200ba2b14424bddfe1f4148 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 16:50:03 2009 +1000 dix: switch to byte-counting functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7dd415aa6a3959f15276741db168ba264948ecfe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 13:57:14 2009 +1000 Xi: use byte-counting macros instead of manual calculation. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 912402fd71144bcee255141efe12a78abad39240 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 29 13:09:57 2009 +1000 include: introduce byte counting functions. This patch adds the following three functions: bits_to_bytes(bits) - the number of bytes needed to hold 'bits' bytes_to_int32(bytes) - the number of 4-byte units to hold 'bytes' pad_to_int32(bytes) - the closest multiple of 4 equal to or larger than 'bytes'. All three operations are common in protocol processing and currently the server has ((foo + 7)/8 + 3)/4 operations all over the place. A common set of functions reduce the error rate of these (albeit simple) calculations and improve readability of the code. The functions do not check for overflow. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2c535b6f13ffbf2c4ac59834dae39bb8e172c003 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 14 08:58:23 2009 +1000 dix: don't send presence events for attaching/detaching slave devices. The code that didn't list attached slave devices for XI1 clients doesn't exist anymore, so there's no need for these presence events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0c0ef42292f4c910c73b308cd75d77637312da53 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jul 12 21:43:06 2009 +1000 dix: Remove temporary detachment of slave devices. Previously, an active grab on an attached slave device would send the device floating for the duration of the grab. This breaks existing XI applications (e.g. the GIMP) since they grab all devices automatically - resulting in the loss of control over the VCP. The behaviour of extended input devices during a grab in relation to the core pointer is not specified in the XI protocol specification. The removal of the temporary detachment restores the behaviour of extended input devices as present in currently released servers - even if a device is grabbed, an event from this device will result in an event from the core pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f1570c8f4f549cdd2fbae1234011290fcc73e18 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 26 09:12:47 2009 +1000 input: include effective modifiers in device events. Require inputproto 1.9.99.13 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 78aedbe609e309446e71835ed15e4557d3ccf723 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jul 10 17:35:57 2009 -0700 Fix int10 module build after typo in commit 2638e9899 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 35758544813f156eaac28844e693b2a28f6de316 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Jul 10 20:06:02 2009 +0200 EXA: Only pass CT_YXBANDED to RECTS_TO_REGION() if that is really true. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22642 . commit 2638e9899e57d9b25a2cade3247083a6e101dee2 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 10 16:09:08 2009 +0300 configure: introduce --{enable,disable}-int10-module Not all chipsets need to rely on the int10 scheme to do its daily work. Well, the ideal would be to remove all int10 module from the server. I'll try to provide some patches "soon" for this. Something like: http://cgit.freedesktop.org/~vignatti/libx86/ Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> commit 42d95a38535f382bfb2ddfaef93839ab9bbf584f Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 10 15:54:07 2009 +0300 configure: introduce --{enable,disable}-vbe Not all drivers need this kind of access as well. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> commit 53d64930513fecaa417bb5a922966b45c9ff8679 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 10 15:38:51 2009 +0300 configure: introduce --{enable,disable}-vgahw Not all drivers need this kind of access. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> commit aafcae79d17c1f802bc880d2142af7171fed75d8 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Jul 10 14:56:31 2009 +0300 xfree86: remove unused vbe header file Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Acked-by: Oliver McFadden <oliver.mcfadden@nokia.com> commit 3711d68f657c77b947cc4670cc4eac4f62de3af8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 10 11:10:30 2009 +1000 Revert "XKB: Sanitise * actions" commits (#19602) Reverts the following four patches: feb757f384382c7782ceac55 "XKB: Sanitise vmods for redirected keys" b5f49382fe48f0a762d9a15f "XKB: Sanitise ctrls action" 1bd7fd195d85681e722161f8 "XKB: Sanitise pointer actions" 61c508fa78aa08ea2666fde9 "XKB: Sanitise vmods in actions" Strictly speaking, the structs used in the server are not part of the client ABI. Practically, they are as we copy from the wire straight into the structs. Changing the struct sizes breaks various wire/server conversions. Even when the structs have the same size, some internal magic causes conversions to fail. Visible by diffing the output files of: setxkbmap -layout de; xkbcomp -xkb :0 busted.xkb setxkbmap -layout de -print | xkbcomp -xkb - correct.xkb Interestingly enough, busted.xkb is the working one although the output is incorrect. Revert the four offending patches until the exact cause of this breakage can be determined. This patch restores functionality to Level3 modifiers. X.Org Bug 19602 <http://bugs.freedesktop.org/show_bug.cgi?id=19602> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 08df24555cb432eb0d90a3f63275e9485e777c4c Author: Soren Sandmann Pedersen <ssp@redhat.com> Date: Thu Jul 9 17:23:04 2009 -0400 Reserve space for two GC values in copy_drawable(). Pointed out by Pierre Willenbrock. commit 3c53f3241319d96affad2f4539f7661e02e80521 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 9 17:21:07 2009 -0400 Since font modules are dead, don't mention them in xorg-server.pc commit e812103382a7bc3f7ba8b2f44ab97960dec265a9 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 9 10:58:17 2009 -0400 config: drop i810. The driver assuredly no longer builds against 1.7. Please don't feel compelled to fix it. commit 55ac155d42268009eaecbc183329a8744d6ae48c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jul 7 16:59:39 2009 -0700 Xephyr & Xserver man page fixes Xephyr(1): Fix quote formatting, add missing ' to contraction Xserver(1): Add Xephyr(1) & startx(1) to SEE ALSO section Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 36dc66ae79b6e1cbe0a23587e32aebb68365b0d0 Author: Michael Lorenz <macallan@netbsd.org> Date: Tue Jul 7 20:21:39 2009 -0400 The way XaceHook() mixes struct initializers and va_arg() is not portable and gives bogus data on sparc and probably others leading to a crash. Fix: Don't use initializers, instead set each member directly to enforce order. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 48a9d65b88f56d1f8ab3bf824a4fe48c2f68725f Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Jul 5 16:06:32 2009 +0100 Cygwin/X: Window positioning improvements for multiwindow mode A few tweaks to winUpdateWindowPosition(): * Don't allow window decoration to disappear off to top or left edge of the display as a result of adjustments to add decoration for the window style * Honour the position requested by window geometry for the client area (so windows which save their position don't get moved by the decoration width every time they are created) (unless we need to bump it away from top or left edges) * Fix an issue with initial window placement being offscreen on multimonitor systems when some monitors have negative coordinates (are to the left of or above the primary monitor) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 5aec72745232dd61e60cfbf3acc4628d4fcd0315 Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 6 11:53:02 2009 -0700 Remove old DRI2 buffer alloc/free interfaces These old interfaces are no longer supported by the server, removing them requires bumping the video driver ABI. Note that this is not guaranteed to be the last change in ABI version 6. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net> commit 2e2c5b216cc1c7a9bc26bd2c68226aaed5fc52ca Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 1 14:01:57 2009 -0700 dri2: Preserve compatibility with 1.6 DRI2 API/ABI The old DRI2 buffer allocation API wasn't great, but there's no reason to make the server stop working with those drivers. This patch has the X server adapting to the API provided by the driver, using the new API where available and falling back to the old API as necessary. A warning will be placed in the log file when the old API is in use. Signed-off-by: Keith Packard <keithp@keithp.com> commit 7c7f0c2c6a04f7044d5ce69e97a615735e5831f1 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Fri Jul 3 14:36:54 2009 -0400 Use IncludeInferiors when copying windows before compositing. Part of bug 22484. commit 43ee8d2ead862f84a4526a472519663ef27a8d6a Author: Matthias Hopf <mhopf@suse.de> Date: Wed Jun 24 18:26:23 2009 +0200 Unclaim PCI slot if driver probing fails. Otherwise no subsequent driver will be able to claim this pci slot. Example for this: fbdev tries to claim, but framebuffer device is not available. Later on VESA cannot claim the device. commit 73abdc94c3cceadeda26a9b6bd3cdfecf0df8db2 Author: RALOVICH, Kristóf <tade60@freemail.hu> Date: Sun Jul 5 16:42:54 2009 +0200 glx: damage is only used with DRI Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 7208a0f032d487bd3bc9809800f4557f1da1e2db Author: RALOVICH, Kristóf <tade60@freemail.hu> Date: Mon Jun 29 15:18:56 2009 +0200 glx: remove Xgl leftover GlxSetRenderTables was only used by the long gone Xgl. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> commit 89cf81cd85919e3dbb5adff5e6c6056c7990b60f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 10:29:40 2009 +1000 Xext: return BadValue for XTestFakeInput on unsupported capabilities. Calling XTestFakeDevice*Event on a device that doesn't allow the matching event returns BadValue. Reported-by: Florian Echtler Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b773b4e8e0087993406d1d8c2df895db4d6301ff Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 6 11:04:47 2009 +1000 s/MAX_DEVICES/MAXDEVICES/ updates. The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6) Two comments updated to refer to MAXDEVICES. MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more than 15 physical input devices were present, this could result in a failure to install the SIGIO handler for any device above 15. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 183c075d2f9d5f6effa1ce7ab135fb0c2e46085a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 13:26:48 2009 +1000 dix: always init the full button map to default values (#22594) Master devices must have the standard button map applied for all buttons to ensure buttons larger than 7 (the default for MDs) are mapped appropriately. We can't copy the button map from SDs to MDs since that breaks the chained button mapping. However, by ensuring all buttons (even non-existing ones) are mapped, devices that send such buttons continue to work. X.Org Bug 22594 <http://bugs.freedesktop.org/show_bug.cgi?id=22594> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 744bb559826ede37a77e9000b6c620eaa6a3c837 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 13:58:38 2009 +1000 Xext: remove unused variable 'it'. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fd4eed69e40cf090aa16e79a8596eb1442461829 Author: Eric Anholt <eric@anholt.net> Date: Thu Jul 2 15:24:54 2009 -0700 dri2: Enable GLX_SGI_make_current_read when the DRI driver supports it. This matches idr's 82f150d73cc9a7d8eaf7241a51b03af05bcec159 for DRI1. commit d6b8205e699c0c62af76c4a9cbff1402337927b3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 3 19:25:33 2009 -0700 XQuartz: ProcAppleWMAttachTransient to play nice with the new Dock in SL (cherry picked from commit ddc0242d8f291d0f961ba9aa8c883e39861ce2ad) commit a49ae50370ec94e08e7dec3c742d33e20e79ef36 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Jun 29 22:55:52 2009 +0100 Xming: Apply window style hints in -multiwindow mode Remove frames from 'dock' windows and make them topmost in -multiwindow mode. Remove frames from windows with MOTIF_WM_HINTS of no decorations in -multiwindow mode. Apply some _NET_WM_STATE hints in -multiwindow mode. Apply window styles overrides from .rc file Correctly update region of shaped windows when applying styles Copyright (C) Colin Harrison 2005-2009 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ commit 17e67c407d130c325d3899c18d68b8eef6a88bea Author: Joe Krahn <jkrahn@nc.rr.com> Date: Wed Jun 24 23:32:09 2009 +0100 Cygwin/X: Change to a single native window class for all X windows from fd.o Bugzilla #4491: There is no point in having one class for every window, aside from trying to set custom icons via the class, which we no longer do, so converted to using a single class for all client windows. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 2c69deb92e11542f615df0f24fdc03e3b4415475 Author: Rémi Cardona <remi@gentoo.org> Date: Fri Jul 3 10:51:50 2009 +0200 configure: libXinerama isn't needed anymore since libXinerama commit 90d4d23bf2e94721149ddc0a80093b10a82e8845 and xineramaproto commit 21477147613c28c968b5e1eb9d8aea7017dd399d, the server no longer needs libXinerama. Signed-off-by: Rémi Cardona <remi@gentoo.org> commit 97e29ffb5bf04a9d8280f1fa32ceced148503492 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 09:52:04 2009 +1000 xfree86: fix wrong IsMaster() check causing crashes. Crashes caused by dereferencing NULL if the path was executed for a floating slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 50a2a8dc76645d8736f7d712f0ef05f23089407e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 3 09:18:57 2009 +1000 Fix IsXtstDevice - returns false positives since 0814f511d5. Missing check for the value of 'mid' returned false positives if master was NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3525d140567e0ad5f0184e4b37893c47239e1628 Author: Felix Kuehling <felix.kuehling@amd.com> Date: Tue Jun 30 20:07:30 2009 -0400 Export symbols needed by the RandR implementation in fglrx GIT change http://cgit.freedesktop.org/xorg/xserver/commit/?id=45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 changed the default symbol visibility of the Xserver. As a result 2 symbols that are needed by the RandR 1.2/1.3 implementation in the fglrx driver are no longer visible: xf86configptr xf86CursorScreenKey We would like to get these two symbols _X_EXPORT'ed before Xserver 1.7 is released. Otherwise it will be problematic for fglrx to support RandR 1.3 on Xserver 1.7. In the future, we may want to sync our RandR implementation to later versions of the RandR implementation in hw/xfree86/modes. Therefore it would be nice if all symbols used by the Xserver RandR implementation were _X_EXPORT'ed in the future. commit e13605ea40cfc671314a0086c75b917564298b55 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 23 14:09:22 2009 +1000 dix: introduce "Xtst Device" label property. Xtst devices get this property assigned automatically so they can be detected easily by a client. The property is read-only. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0814f511d56a89c7b1868b17eba7a89f990b9ab1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 23 10:50:52 2009 +1000 input: store the master device's ID in the devPrivate for XTest devices. Rather than storing a simple boolean in the devPrivate for XTest devices, store the actual master device's id (since it is constant for the life of the device anyway). Callers should use GetXtstDevice now instead of digging around in the devPrivates themselves. This patch allows for a cleanup in the creation of new master devices since GetMaster and GetXtstDevice spare the need for loops, IsPointer checks and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> commit 1bcc0d3c244ce7d9f5cbab626aa5fd5784b41a1c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 22 16:55:12 2009 +1000 input: abstract Xtst device lookup The callers should need to use the dev privates key to look up xtest devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> commit 34424fab9abd7a4ca11036be25414129980db0e0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 23 11:50:29 2009 +1000 dix: set the client's error value to the bad deviceid in check_butmap_change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit da04e8f1354fa9d253443489dc002b16f94d6fab Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Jun 30 17:52:42 2009 -0400 dix/property.c: use memcpy where appropriate. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 65d74d93145d22b68bad5728a7ebe38dc662cb21 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed May 20 21:32:54 2009 +0100 Cygwin/X: Fix multiwindow extwm mode to build again Build and link with rootless extension Update Xwin code for removal of RootlessAccelInit() Fix Xwin code which now has a collision with the type name EventType Based on patches from Colin Harrison, Jon Turney and Yaakov Selkowitz Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 638ca9a7a2363757dc5b5d456e10d34f6f158885 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon May 18 18:14:41 2009 +0100 Cygwin/X: Avoid a visual glitch on window move in rootless modes Handle and ignore WM_ERASEBKGND since we repaint the entire invalidated region anyhow (this avoids a white flickering on window resize) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b718b2e0880cf2b969675da98d5ef8a4a01ca5d6 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon May 18 18:14:09 2009 +0100 Cygwin/X: Allow pointer warping to work in rootless modes Mouse pointer warping in multiwindow/rootless mode was never implemented, due to concerns that moving the mouse pointer without asking might be rude This patch allows X applications to move the mouse pointer in rootless modes, Let's hope they don't abuse this privilege ;-) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 85614946ba3d5a233eece612afc7f09572a347c2 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon May 18 18:13:08 2009 +0100 Cygwin/X: Improve mouse tracking for moving/resizing undecorated windows In -multiwindow mode, tell Windows we wish to capture the mouse when a button is down. This causes Windows to continue to send movement events for the mouse even if the mouse pointer moves outside the window frame. This helps greatly with undecorated windows which have regions you can grab to move (e.g. gmplayer, xine control panels) or resize (e.g. Songbird) the window, as it means the window continues to receive the mouse motion even if the mouse pointer moves out of the window (which presumably happens if we don't manage to update the window fast enough to track the mouse pointer) Consolidate the multiple instances of the code to start the mouse position polling timer into a new function winStartMousePolling(), and use that to restart the polling timer when we release the mouse. Also, start the timer on WM_SHOW, so that xeyes will track the mouse position when it is first shown, even if the mouse doesn't enter it's window (You probably need focus-stealing turned off to see this problem) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit f351c10a9774cc0ea2cbb58f00f07ece7f7c6e73 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Mon Jan 5 16:17:30 2009 +0000 Cygwin/X: Man page fixes Correct path names in man pages, using cpprules.in Install XWinrc man page into section 5 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 5c1afac5eea1d8327c74342d12d082b75f0cebde Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 29 11:16:16 2009 -0400 EDID: Fix timing class names to match the spec commit bf0f3b8f2bc830c8bd6f8f9410b89394b8d96257 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 29 13:31:02 2009 +1000 test: fix build error introduced by XINPUT_ABI 7 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cbeb6a73c44143674a700d36a7e9804d41003a4f Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Jun 20 20:17:41 2009 -0400 dix: report subpixel coordinates for high-resolution devices Acked-by: Simon Thum <simon.thum@gmx.de> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 069b4c5f0a38649de73d1e0f70ee81bf862399dd Author: Simon Thum <simon.thum@gmx.de> Date: Sat Jun 20 18:57:22 2009 +0200 dix: make part of ptrveloc.h internal Though this is a SDK header, some functions are intended solely for the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2830e8493757e0da1253fe5ab280562b84730e77 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jun 24 11:33:19 2009 +0200 dix: rename pDev->dev, pVel->vel for consistency Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 373e8c960d00e2b8c2250dd3f66859b081e14854 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jun 24 11:16:24 2009 +0200 dix: improve pointer acceleration API This makes the ptr accel api actually sensible from a driver perspective, since it avoids superfluous device lookups. Also, makes independent accel contexts possible. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b8050bb6deebdb1ee60731f63884ffca575c09ce Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jun 27 15:28:34 2009 -0700 XQuartz: Don't leave zombied processes at startup (cherry picked from commit 40c1406830588fa85d880e9f4e9ca570db1db306) commit aaff92c8c22a47804a21010d023ef76d82e7ec7e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jun 27 14:40:03 2009 -0700 XQuartz: 64bit fix for screen origin in AppleWM (cherry picked from commit 60a757d2802a5c34acd91ca9a052937b5a169ede) commit cabcc1a7ad697dde915794ddcea6a300f66b0a28 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jun 27 10:40:59 2009 -0700 XQuartz: More localization updates (cherry picked from commit 5925c1f48ad05bf94195b986c1fdefc52a20ae42) commit 31166c2ae0ce898c96995a8b16b58b127dc85a2f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 26 16:51:22 2009 -0400 xace: add a new hook for checking property content after it has been set. Allows security modules to enforce what property contents can be set by clients. Uses the new DixPostAccess bit to distinguish between the existing call made during the lookup (with the old property data) and this new call. Note that this only applies to writes, prepends, or appends to existing properties; for new properties the existing DixCreateAccess hook call may be used since it includes the new data. Refer to the XACE-Spec document in xorg-docs, section "Property Access." Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 51105de9b0d865c4b5e5a7d9ab23c89d808d1cfa Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 26 16:50:12 2009 -0400 xselinux: ignore property hook calls with the new Post access mode bit set. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 10812204b3415c969bcebd3215e84d758a0b4dd8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 26 16:48:24 2009 -0400 dix: add a new DixAccess bit, "DixPostAccess". This will be used for follow-up checks after a client has written something, for security modules that enforce a set of valid values a client can set. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 9480725af0275b72b24b9e1cb3b68d5b97288d01 Author: Rémi Cardona <remi@gentoo.org> Date: Wed Jun 24 10:12:50 2009 +0200 xfree86: DIST_SUBDIRS should not contain variables This patch reverts a change done in commit 800d4ceb946c93724661ebfd28afb658ca63b6b1 to add conditional XAA support Signed-off-by: Rémi Cardona <remi@gentoo.org> commit 84662e40c3d4141ebb298a1ad714f75056a4ab74 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 23:19:21 2009 -0400 Xi: check for GetAttr permission when listing or querying devices. If the check fails, leave the device off the returned list of info structures. Under XI2, this may cause inconsistent views of the device topology after a change (for example, devices disappearing from view, or showing as attached to a master that cannot be seen). More work is needed to deal with topology changes and device relabeling. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 00bc8d34c68dab6c818cd1c7e03e9992d1d0cbfc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 21:41:17 2009 -0400 Xi: check for Use permission on the device in SetClientPointer(). Presumably, some intelligent, XI2-aware management app will be calling XISetClientPointer on behalf of other clients; this check makes sure the target client has permission on the device. Requires changing the prototype to return status code instead of Bool. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 119b96667778391436998c76a68bf64e746c9e08 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 21:02:28 2009 -0400 Xi: fix up access modes for calls to dixLookupDevice(). New access modes are being passed to the device access hook for XI2: DixCreateAccess for creating a new master device; DixAdd/RemoveAccess for attaching/removing slave devices to a master; and DixListProp/GetProp/SetPropAccess for device properties. Refer to the XACE-Spec document in xorg-docs, section "Device Access." Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 07c36e4fdcd93df3d33bdab6cca4780ebc9c1f54 Author: Dave Airlie <airlied@redhat.com> Date: Wed Jun 10 13:33:47 2009 +1000 dix/resource: fix use after free in resource code with DRI LookupClientResourceComplex is used by DRI1 code to find and free a DRI drawable in a callback, however when the DRI code returns this->value is now pointing at freed memory. It seemed easiest to store the value to a temporary and return it afterwards. Another option might be a new FreeClientResourceComplex or one that also returns the id, so we can free it using an alternative means. found using valgrind. amended along ajax's suggestions commit 184deb9bc325eb7aa7eb7b7d4f98aa917f0269cb Author: Dave Airlie <airlied@redhat.com> Date: Wed Jun 24 10:40:05 2009 +1000 GLX: make function static. This function isn't called from anywhere else and I don't think it shuold be. commit 9d85b56078ec05da1369ca22930d8eb214c389db Author: Dave Airlie <airlied@redhat.com> Date: Wed Jun 24 10:38:49 2009 +1000 GLX: note the implicit flushes with ReadPixels in indirect contexts. This just notes the flush has occured when readpixels returns, and fixes the glean test. commit e341512bfa40dd98853a20596dc65dcac4dcaa37 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Jun 20 21:37:59 2009 -0400 dix: update a comment Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5cbd4d3d6e54d202ecdbb527b57aaefeb8435600 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Jun 20 20:17:04 2009 -0400 dix: do away with an instance of temporary in-place modification Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 94cdc1ef0a72802573a11ba292e2f5cc8474aa8e Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Mon Jun 22 13:00:37 2009 -0400 dix: deal with first_valuator > 0 correctly if POINTER_SCREEN is set Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 21cbb4c9de44e2629dc0fa6f647ce2d139f2cef0 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Wed Jun 24 00:24:44 2009 +0300 xorg-server.h.in: Export the X Access Control Extension (XACE), too. Acked-by: Daniel Stone <daniel@fooishbar.org> commit 800d4ceb946c93724661ebfd28afb658ca63b6b1 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Wed Jun 24 00:13:32 2009 +0300 configure: Provide the --enable/disable-xaa option. Acked-by: Daniel Stone <daniel@fooishbar.org> commit ce3d539ac6ecab3e343cef7c4dc112bc82ea3b02 Author: Oliver McFadden <oliver.mcfadden@nokia.com> Date: Wed Jun 24 00:08:51 2009 +0300 xf86Config: Avoid attempting to load non-compiled modules. Acked-by: Daniel Stone <daniel@fooishbar.org> commit 33e25143361d63ea776dfafeeb6d4ffb2f6fd8d4 Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Fri May 15 22:42:30 2009 +0100 Cygwin/X: add hebrew to autodetected keyboard layouts Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b079945c39e2a72220b46953352e24c3a74ef39a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Feb 20 15:21:35 2009 +0000 Cygwin/X: more warnings fixes More warning fixes, mainly removing casts on function return values Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit e79db6a97d02c8a256a4a7e145ea0b48b5a084ab Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Feb 11 23:00:58 2009 +0000 Cygwin/X: Remove an obsolete mention of xf86Config Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 3020b1d43e34fca08cd51f7c7c8ed51497d49ef3 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jun 23 16:45:40 2009 +0200 glx: Clean up more thoroughly if the drawable of a current context goes away. Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale. commit df597709d71f47b8516e27c6fb1bfffd59de5e48 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jun 23 16:45:39 2009 +0200 dri2: Don't crash if pPriv is NULL. commit 048697ccfa31cf7f7a29afa90a2f702d43efb7d4 Author: Ben Skeggs <bskeggs@redhat.com> Date: Wed May 27 15:24:34 2009 +1000 quirk: use first detailed timing as preferred for PEA prod 9003 (rh#492359) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 07154db4a8b96467785fd6be93d20379acacffa8 Author: Ben Gamari <bgamari.foss@gmail.com> Date: Mon Jun 22 08:59:45 2009 -0400 Xi: Remove redundant and incorrect butmap range check Maps are CARD8s, therefore checking for values above 255 is completely unnecessary. Moreover, 0 is a valid value for maps, so the check wasn't even correct to begin with. This fixes bug #22392, which was uncovered by commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c. Signed-off-by: Ben Gamari <bgamari.foss@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 96706c24bd57fbd9b11e5bd5e38d05d81b90aebe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 18 15:40:08 2009 +1000 dix: fix wrong indices in set_valuator. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ae20e748cd3a656173e1f50109bfd4af0712bb87 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jun 19 21:16:10 2009 -0700 XQuartz: More localization updates (cherry picked from commit 7fbe974246f54535c545861a57c043d80e127ee7) commit 30df49f54945e75f033a0eb6445c26d37eb33c5e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 23:15:47 2009 -0400 Xi: fix 2 memory leaks. In ProcXIQueryDevice() and XISendDeviceHierarchyEvent(). Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit eb35402d0a5290e8a73d7d1e92f173294c364cc2 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 19 12:42:07 2009 -0400 pci: Dump vendor/devices ids in the printed device list commit c733660428c0a7c1d11f7bd21e23e1bb934d352e Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Fri Jun 19 08:37:18 2009 -0400 Use pixman_version_string() instead of PIXMAN_VERSION_STRING Pointed out by Julien Cristau. commit aef6b904ebf0d7de6259058606c7c04ea177bda3 Author: Dave Airlie <airlied@panoply-rh.(none)> Date: Thu Mar 13 16:16:46 2008 +1000 fbdev: make entity fail if PCI claimed already. bad kitty fbdev, been shipping this in Fedora for a while now commit 3efb23a6c40dc3583d083d25ada3853ecc56000d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 19:35:22 2009 -0400 xselinux: Add new device permissions for XI2. Refects the ability of clients to add/remove devices and device properties. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 1e060c3d8b13d352a58fc65980cb9a3c6cb5718f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 18 18:48:24 2009 -0400 xselinux: Move the security class mapping to the header file. Take the mapping of DixAccess bits to Flask permissions, move it into the header file, break up the extremely long lines, and annotate the permission names with the bit being referenced. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 75c51c67b340548286efd41a53882e2acaf74ab5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jun 18 09:49:12 2009 -0700 Clarify use of and need for mffs vs. ffs Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 128cd03eecacc6d5c5903d59a11966dcf3697bf1 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Sat Jun 13 10:55:04 2009 -0400 Fix miComputeCompositeRegion() to follow new clip rules. Ignore the hierarchy clip, and always apply any client clip after transformation and repeating. commit e9aa61e9f0d663d5b34a397b943b4d1df44e873d Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Sat Jun 13 10:28:21 2009 -0400 Fix clipping when windows are used as sources The new clipping rules: - client clips happen after transformation - pixels unavailable due to the hierarchy are undefined The first one is implemented in pixman; the second one is realized by making a copy of window sources (to prevent out-of-bounds access). commit d9b5e77a0e48a16c53653b56bc61a0b8dc4122a1 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Tue Jun 9 14:36:21 2009 -0400 Print the current version of pixman. commit 1e9907499c27321a2aa5dc8a75a375b7a82c999a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 18 15:14:00 2009 +1000 record: use dixLookupResourceByClass instead of LookupIDByClass. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 66089e9129a821cfb1983d3d35f41b975a52de5e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 25 12:55:42 2009 +1000 xfree86: fix SWCursor check in xf86CursorSetCursor. Wrong check for inputInfo.pointer resulted in a SW cursor being rendered when the pointer left the screen (in a Xinerama setup). We must call the sprite rendering function if - SW cursors are enabled, or - The current device is not the VCP and not attached to the VCP. Reported-by: Gordon Yuan <GordonYuan@viatech.com.cn> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit afa680e495622f521cae80563511c0d284f57551 Author: David Miller <davem@davemloft.net> Date: Thu Jun 11 05:15:05 2009 -0700 mi: ignore DGA events in ChangeDeviceID DGA events don't have a deviceid, so they don't need changing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cd8abd17abcc8ae9da6704d03b97a9f134f36aab Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jun 17 14:17:07 2009 +0100 Cygwin/X: Fix permuted args to InitPointerDeviceStruct() Fix a minor error in commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e, new btn_labels argument to InitPointerDeviceStruct() wasn't added in the right place commit 14581afb474552716c02ca15220ca7050123c375 Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Thu Feb 26 17:32:10 2009 +1030 xfree86: correctly define barriers for FreeBSD amd64 Previously when compiling on freebsd amd64 we'd end up at xi86 block (line 1315) which would define mem_barrier and write_mem_barrier to be NOP's. Instead they should be valid, as per the linux amd64 setup. This stops the hangs experienced by many when using the nv driver which would hang due to out of order dma requests as noticed in http://bugs.freedesktop.org/show_bug.cgi?id=3168 Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> commit e92dcb6ce07aa3cfb53e8bad5701481c106c4094 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 18 14:40:20 2009 +1000 input: unify button numbers on master devices. Master devices provide the union of all attached slave devices' buttons, i.e. the number of buttons on the master device is always the number of buttons of the slave device with the highest number of buttons. When slaves are attached or detached, the master device adjusts the button number to reflect the new buttons. On a slave switch, this slave's button labels are copied into the master (up to slave->num_buttons). The remaining button labels (if any) stay as they are. Thus, if any of the higher buttons is still pressed, it reflects the label of the last pressed device that provided this button. If two devices press the same button and it is differently labelled the last pressed one will be reflected in the master device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 280b7f92d729ec910ffa3d18dce7bbc215be7a3c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 17 22:38:24 2009 +1000 dix: reduce MDs and xtest pointers to 7 buttons by default. MD's will soon be the union of all devices anyway. XTest pointers are only for the core protocol XTest stuff, so 7 buttons (lmr + 4 wheel buttons) should do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6c7d992735eebbd7a20247926e7725896348b865 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 17 09:11:52 2009 +1000 Require inputproto 1.9.99.12 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 09cef7573938e5c08007e578e1b638bc5e1796a8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 17 09:04:08 2009 +1000 Xi: valuator/button labels are called labels now, not 'names' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc2ff5365030ad8bc11efde430b1064080dd7098 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 19:36:57 2009 +1000 Xi: copy the valuator mode from SD to MD. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 87d1f44bad608507e3995e17eb84fa0a0119796c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 14:18:45 2009 +1000 Xi: copy the button and axes labels into the XIQueryDevice reply. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a30fef9956b296f59ea18a9ee38d0abafeb15a4e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 16:38:11 2009 +1000 input: Add labels to buttons and valuators - ABI_XINPUT_VERSION 7 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 17f9723f488d0470e3879c6b0dfdba61544cdd7b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 17 08:37:44 2009 +1000 input: bump to ints for deviceids - XI2 requires 16-bit deviceids. Note: ABI break, but ABI_XINPUT_VERSION has NOT been bumped. Recompile input drivers. Revert "Xi: return BadImplementation for deviceids 256 and above" This reverts commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cbeb73e2055f6c013c8fe6325851f2631170137d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 10:51:52 2009 +1000 Xi: return current valuator values in XIQueryDevice. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 80837dbefd9d5e96ab5c1f4b4c2d5c66ce17ce67 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 10:51:17 2009 +1000 input: change axisVal from uint to double. With subpixel support, uint just doesn't cut it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 25b6fc4a42f7698e6ae0b16becb316bfd7835d05 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 10:48:48 2009 +1000 Xi: last_valuator is used like an index, so range it accordingly. The previous code would always skip the last valuator due to a wrong upper boundary in the loop. last_valuator is the index of the last set valuator - which also means it must be initialized to -1, not 0. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3fc762ea9474cf92f6b7ef60dd0bb68f59385272 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 10:48:03 2009 +1000 Xi: Motion events update the device state too. Without this line the device's axis values don't get updated properly for pure motion events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ad6347afead500fefb34131841f4beb5b03ad4ec Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 16:35:40 2009 +1000 Xi: don't use a constant number for class sizes - use sizeof instead The protocol is still changing, and having to debug crap like this is annoying. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d5a15e65b7d2fdda14fb719e3ebf076cce896386 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 14 09:15:42 2009 +1000 Xi: include button state in XIButtonInfo. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 01241b4247a7ad0974d48412cc0d88e1a09a3c49 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 7 19:43:11 2009 +1000 Xi: Add support for sourceid in the device classes. commit d230742ea820a21a3f1ed0c58b5e6d8680b2f2aa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 16 12:13:16 2009 +1000 Xi: namespace XI2 files. Some files (notably those merged with MPX before XI2 came along) didn't use a 'xi' prefix. This patch changes all of them to meaningful names. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4ddb002b6847e8a88e6f13ae0453a35ee79946ae Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 15 15:14:47 2009 +1000 xfree86: fix two compiler warnings in xf86vmode.c xf86vmode.c:1578: warning: pointer targets in passing argument 1 of ‘SwapShorts’ differ in signedness ../../../../include/misc.h:231: note: expected ‘short int *’ but argument is of type ‘CARD16 *’ xf86vmode.c:1543: warning: unused variable ‘i’ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9d039ef5047af2dedff0c583dda11032f71bed01 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 15 15:11:55 2009 +1000 xfree86: silence a few int10 compiler warnings. 'format ‘%#x’ expects type ‘unsigned int’, but argument 2 has type ‘CARD32’' and similar. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fb882b3da189847bc98b646faddac9e8b42aa435 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 16 14:58:10 2009 -0400 EDID: Carp about 1.4 monitors with no preferred refresh rate You would think, having finally tightened down the spec, that monitor vendors would bother to implement what the spec actually mandates. You would be wrong. commit b2d2af76b43d62c9be07fd736652f904632fd663 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 15 10:10:26 2009 -0400 randr: fix typo in swapped dispatch commit 1d20b9021e8aecb942619f64017cc2fc31f02d29 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 14 18:21:43 2009 +1000 Xi: fix wrong bit->byte conversion in ProcXIQueryPointer Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9afc3241c157e5c19454f913c7105b3fdfa97ec4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 14 18:24:22 2009 +1000 Xi: remove un-used IsOn macro. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b67ff1d6e0d01170c6261593ca36d0f51d917393 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 16:45:36 2009 +1000 Xi: XISelectEvents/XIGetSelectedEvents use 'win' instead of 'window' now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b2bf67b61c564a4b92a429ca9ad455403161f33a Author: Benjamin Defnet <benjamin.r.defnet@intel.com> Date: Wed Jun 10 21:35:48 2009 -0700 randr: fix operation order so that rotation+transform works The matrix multiply to combine rotation and projective transforms was being done in the wrong order. Signed-off-by: Keith Packard <keithp@keithp.com> commit 3627215e97734cc367fff273a3358c2a95a53481 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 16:38:46 2009 +1000 Add check for GNU ld in the test suite. The GNU linker supports a -wrap option to wrap function calls at link-time. This allows for easy overriding of functions in the X server with stubs in the test suite. This functionality is only supported on the GNU linker and will be used extensively in the tests. Disable the tests if GNU ld is not available. commit 5e0ca6fabd12401de6bd6039484be2079e28851e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 16:26:23 2009 +1000 input: remove un-used "setter" argument from SetClientPointer. It's obsolete, not likely to come back, let's drop it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e6a18762ef113296c6a09833be70cb4b45aa3940 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 15:40:56 2009 +1000 Xi: fix XISetClientPointer return values. If SetClientPointer fails, the only reason may be that the device is not a pointer or that the device is an SD. Return BadDevice instead of BadAccess. (BadAccess is a leftover from the early times of the ClientPointer implementation when only one client was allowed to set it). If the window parameter doesn't name a valid window or client, return BadWindow. Finally, allow both master keyboards and master pointers as deviceid. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ae7dab2a136d15b976b956f68feec53886951dd6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 15:40:38 2009 +1000 Xi: Fix XISetClientPointer swapping. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 98e8ec8deb09db1c56e06afed267e6f517042fa3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 10:54:55 2009 +1000 Xi: sanitize ProcXIGetClientPointer. This was quite old code and can be streamlined a bit. The new code is essentially the same as in ProcXISetClientPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 96ea82fdac7c28feb2748cd4ff7faa7c00dbbdcd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 12 10:54:25 2009 +1000 Xi: fix reply swapping in XIGetClientPointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 76f25086a9ab6f0c27d9e2cd745f8463c6b3df5f Author: Adam Jackson <ajax@redhat.com> Date: Thu Jun 11 16:34:06 2009 -0400 vfb: Re-enable 30bpp support commit 0de58c88aba7ddd69b04f24ab5b2967c359aa69e Author: Dave Airlie <airlied@redhat.com> Date: Thu Jun 11 14:21:53 2009 +1000 xfree86: move didLock assignment down to where the function pointer is valid. crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so it's actually defined before we use it. Introduced with 6f59a8160042ea145514fdcb410f17f33fd437c2. Tested-by: Peter Hutterer <peter.hutterer@who-t.net> commit a85d210b34506cb39e7f08d81d4586fe4448b47f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 12:32:39 2009 +1000 Xi: store mask_len before swapping in ProcXIGetSelectedEvents. Swapping the mask_len and then advancing the pointer by the swapped length is just a bad idea. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5043f42f36b49e7702d0c496dd4fe157788d44ee Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 12:31:40 2009 +1000 Xi: correct return buffer size for XIGetSelectedEvents. The maximum number of bytes is calculated by the mask len, and the mask len is always in 4-byte units. XI2MASKSIZE however is in bytes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fcf0c0b8f332cbde03c1a479376b7913197962eb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 13:23:40 2009 +1000 Xi: XISetEventMask needs to clear the mask if len is 0 zero-length masks are supposed to clear the device's mask. ProcXISelectEvents passes these masks through directly, so we need to clear the bits here if such a mask is supplied. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 22b4ac44e4fdbe8f36f2b570cdbdaf237062e33e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 11 11:08:07 2009 +1000 Xi: XIGetSelectedEvents mustn't returned masks from non-existing devices. Or devices the client doesn't have XACE permissions for. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7868956b0fb50a9d77506f01413612e429f540a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 10 17:09:39 2009 +1000 Xi: ProcXIGetSelectedEvents must use WriteToClient for swapped data. The data is already swapped before, so we just post it to the client as-is, without attempting to swap it again. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit aa2babf11c30be4d289b58212dc330b84efb4053 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 10 14:41:11 2009 +1000 input: remove dependency on XI2 protocol for XI_LASTEVENT. inputstr includes XI2proto.h for the sole purpose of XI_LASTEVENT. However, using XI_LASTEVENT in the server is prone to errors, if the server is recompiled against a newer version of the protocol it would bump this variable and associates bits, including potential ABI. This patch defines an XI2LASTEVENT for use in the server and removes the XI2proto.h require. XI2LASTEVENT is the current value of XI_LASTEVENT. This patch is required by components that require access to inputInfo (currently xf86-video-geode and xf86-video-cirrus) but should not have a require for the XI2 protocol. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 77cc816da4a2777110182ed01c22c0f5e6ac3b65 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 10 13:54:42 2009 +1000 Xi: rename ProcXISelectEvent to ProcXISelectEvents. The request name has the plural, so let's do it here too. Purely cosmetic change. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9563feeeb5309de1971c4e04419fed6fd31c9cea Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 16:57:09 2009 +1000 Xi: start checking for invalid mask bits _after_ LASTEVENT. Two issues that combined to false positives and false negatives. - The checking for invalid bits must be performed when there are enough bits that an event outside of LASTEVENT may be selected. - The first invalid bit is LASTEVENT + 1, not LASTEVENT. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e2fbaebb87e18198143a4b8e6be7e650563cd819 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 14:38:25 2009 +1000 Xi: XISelectEvents returns BadValue for num_masks == 0. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cfeb65ac45b194dead5e8b9b26192df2619d6f9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 14:37:42 2009 +1000 Xi: XISelectEvents needs to be at least size 3, not exactly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f3c26034eca98924d93a004aaa1f61ffe5d344ca Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 13:04:56 2009 +1000 Xi: XIQueryDevice should use XIFooClass instead of the old FooClass defines. This is merely a cosmetic change, the actual values are the same anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 482cc72aa790bd2f23c7ebe12c5549b47c737115 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 13:03:38 2009 +1000 Xi: get the class length before swapping. Advancing by the already-swapped length lets our pointers point into nirvana. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9974249980894f74f3ead466655da87958a43670 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 13:02:52 2009 +1000 Xi: Swapping 32 bit keycodes requires swapl, not swaps. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 918923e285f4e269a257bb5be4d3c8a50174aad0 Author: Dave Airlie <airlied@redhat.com> Date: Wed Jun 10 15:13:45 2009 +1000 glx: fix open-coded linked list removal function OMG stab stab stab, YALL. removal function was made of crack, actually truncated the list from the one after the find point. However fixing this makes glean makecurrent fail with a GLX error. commit 3ea747c0dbbec0db6761d66d4f6c680d2e9ddeaf Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 25 16:53:18 2009 +1000 KDrive: Warning fixes xEvent vs. InternalEvent confusion still reigns though. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 754be1e2ec9be2486bf45000d7244d217556de07 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 25 16:51:48 2009 +1000 KDrive: Xephyr: DRI: Warning fixes Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit f534e6bea17746db952feb563ffea7320846b49d Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 25 15:38:54 2009 +1000 OS: Fix compile warnings It's a marvel the sigaction() ever actually worked. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 305ab237f666936cd812c464bf43f86f6079838e Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 25 22:11:19 2009 +1000 KDrive: Warning fixes and cleanups Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 4c8812b544ce5f319a7ac59a131c626c8509ef99 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 10 12:46:19 2009 -0400 kdrive: undef PSEUDO8 Whatever that was, it no longer is. commit 973ef5a7086aedb88a4888e73630c96ae68078e4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 10 12:44:45 2009 -0400 kdrive: Remove a lie about PCMCIA support. commit e3c65cf1df9bbfb126f07b4b8e1254a855fb70c7 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 10 12:05:09 2009 -0400 xephyr: Add -title option. commit 803522300344265f11ea9f869ee6747730413bae Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Jun 10 13:32:54 2009 +0100 Xming: Simplify logic for ownership release of native clipboard Make the logic simpler for the ownership release of the Windows clipboard in winclipboardwrappers.c - We've already marked a selection as unowned if it is owned by our clipboard window Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c7d3965bee0edb72468a0135aaa8a081348c2b23 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jun 10 13:09:44 2009 +0100 Cygwin/X: Add a needed inputstr.h Add a needed inputstr.h to fix build after commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 6d4ffcc9e066bc7c49dcff1a2ff0111801c7286d Author: Dave Airlie <airlied@redhat.com> Date: Wed Jun 10 11:15:24 2009 +1000 input: move inputstr.h to where its needed. This stops inputstr.h being needed to be included by output drivers. Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6f59a8160042ea145514fdcb410f17f33fd437c2 Author: Benjamin Defnet <benjamin.r.defnet@intel.com> Date: Mon Jun 8 21:45:42 2009 -0700 hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major This moves code out of each implementation of set_mode_major and back into the X server. The real feature here is that the transform is now available in the crtc for use by either xf86CrtcRotate or whatever the driver wants to do. Without this change, the transform was lost for drivers providing the set_mode_major interface. Note that users of this API will want to stop smashing the transformPresent field, and could also stop setting mode/x/y/rotation for new enough X servers, but there's no reason to make that change as it will break things when running against older X servers. Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> commit e244a5991e2cc55f5aa2f6e5255f1dabf56f0235 Author: Federico Mena Quintero <federico@novell.com> Date: Tue Jun 9 13:28:28 2009 -0700 dix/randr: Add missing fields to SRR*NotifyEvent() Also, remove redundant field swaps and make others match the order in which they are declared in the xRR*NotifyEvent structs. Signed-off-by: Federico Mena Quintero <federico@novell.com> Signed-off-by: Keith Packard <keithp@keithp.com> commit 746e7b22e1bdfbf2363040367209b4c46b1c2fec Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 9 16:20:11 2009 -0400 cvt: Allow multiple-of-60Hz refresh rates for reduced blanking. Doing so generates the same timings as given in the DMT spec for 120Hz RB, so we should be set there. Other rates might be legal too but why push our luck. commit 2a035600e603117a4dbe668cad50bae2a5609094 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 9 10:14:18 2009 +1000 require inputproto 1.9.99.11 commit c5bebca46f63bcd7279f3c73ed1d50e0c1b6051f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 8 17:54:05 2009 +1000 Xi: hierarchy events have a num_info now instead of num_devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 810b74dbbcc1db3e68e0f95ff5223ddb2032e46d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 8 13:41:22 2009 +1000 Xi: change from XICreateMaster to XIAddMaster for consistency. add/remove is used for slave devices and hierarchy flags. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0e66a443a09176b8a875195d5473b953c07aa1d7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 8 12:24:24 2009 +1000 Xi: return BadValue for XI_HierarchyChangd mask on devices. This mask may only be selected for XIAllDevices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 69a9545d1f8110841538410818df19fd960412c5 Author: Keith Packard <keithp@keithp.com> Date: Thu May 28 14:43:27 2009 -0700 Make RANDR 'set' timestamps follow client specified time. Bug 21987. The lastSetTime value which indicates when the configuration within the server was last changed was not getting set in the appropriate RandR requests. Signed-off-by: Keith Packard <keithp@keithp.com> commit fa18c569ed26d2fdd442af6b39723cb7e30d18df Author: Ben Skeggs <bskeggs@redhat.com> Date: Tue Jun 9 09:14:50 2009 +1000 exa: driver pixmaps enabled if either CreatePixmap or CreatePixmap2 present commit 9390b7a133b0e17bc4d303effb7a99ff7017b086 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 7 19:26:45 2009 +1000 dix: protect against missing ButtonClasses in GetPointerMapping. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 21ee53060b4dcb5c12074cf6682ff0067021ff60 Author: Simon Thum <simon.thum@gmx.de> Date: Fri Jun 5 19:14:48 2009 +0200 config: fix build after XI2 API changes to RemoveDevice. This patch fixes the build with --enable-config-dbus is enabled (default disabled). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 07c59411817c10fbcbf1bc9efa6a0818b6e0493a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jun 6 22:17:44 2009 -0700 GLX: Make sure the types match for ALIAS in indirect_reqsize.c (cherry picked from commit 31a20a573b867fb7f02da15425e3b92eccb82dec) commit 077556ec39ca7e0d14486005cf71fcdc70a350cf Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jun 6 21:55:51 2009 -0700 XQuartz: AIGLX dispatch table cleanup This should fix some issues when building on different versions of OSX. We only use extensions that OpenGL.framework's glext.h header tells us are supported. (cherry picked from commit e10c53421f1e780573c8adcd8ea89d6ffa28a819) commit fc24a97a8d022e986082b65b5133701e7273805c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 2 19:12:41 2009 -0700 Rootless: Use serverClient instead of NullClient This seems to stop the crash when moving windows. (cherry picked from commit fcd857c8e295ac7a2b0e58d49dc71251ed9d1266) commit 2429daa7e6b35a4a8032e1c3736e417a5a9baa07 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 2 10:19:10 2009 -0700 XQuartz: Default to forcing the dialog box before quitting. This will show the quit dialog for users of other WMs. (cherry picked from commit 639ee0c913f892776fee40bcfb856e0d7c2c7db5) (cherry picked from commit 09432fa5b1cc8e9a30fb8aa4f8dfcd08c4a91e30) commit 6d75606a9e7f6ebc4d79a5261a48f5915c71cbcd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Jun 1 22:58:40 2009 -0700 Rootless: Despite its name, we still want to allow rootless to mess with the root window This fixes the bug whereby we weren't drawing the contents of the root window since RootlessPaintWindowBackground got nuked. (cherry picked from commit bb0e208787739fbed2a0c8d1af6b6504319fdf88) commit 7348bf4935c8887bca33fe340ac2548f551bee3d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jun 7 09:25:51 2009 +1000 dix: set the generic event type for implicit XI2 grabs. event->type is always GenericEvent for XI2 events. Instead, XI_ButtonPress (the generic event's evtype must be stored. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bb1c131b785ca30cf40041db3513b7669beebd34 Author: Simon Thum <simon.thum@gmx.de> Date: Thu May 28 16:43:42 2009 +0200 dix: suppress pointer acceleration on xtest devices Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 707b1241681c33401d5e0eb6edeace33f5970928 Author: Simon Thum <simon.thum@gmx.de> Date: Sat Mar 21 18:19:19 2009 +0100 dix: prefer lroundf() over roundf() in axis scaling it's unclear whether there actually is a problem, but in a very similar case there is (bug#21456). Also, integer addition is generally faster. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ef0e435052b2fda598cd8670c8e892aea685a102 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Jun 5 19:29:02 2009 +0100 Cygwin/X: Remove obsolete ChangeLog files Remove obsolete ChangeLog files, this information is preserved in the automatically generated top-level ChangeLog commit 752508577aa7f0a1d80c8b7f4d3fe2b098e5e5fa Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Tue Jun 2 21:19:46 2009 +0100 Cygwin/X: Tidy up a bodge to avoid collision between X header and native Win32 API definitions of ATOM Remove a bodge to avoid collision between X header and the native Win32 API definitions of ATOM, use X11/Xwindows.h which exists to address these issues Consequently, include misc.h in winclipboardthread.c, to provide the max() macro, as previously we were using the the one from windows.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7f3456a4080d1bf21010170e126128cb653bd2ac Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 16:44:46 2009 +1000 Revert "test: check from INT_MIN to INT_MAX for core type conversion" This patch requires extra special casing to check if the linker supports the -wrap option. Patches to do so will follow, in the meantime, revert this commit. It shouldn't have been pushed in the first place anyway. This reverts commit d979f443946011158b6a183582728a6899c33b85. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d770d57f1701c7c8272b4ca3714f64c46c47adf1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 11:38:22 2009 +1000 Xi: fix XIQueryVersion major/minor swapping. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 17d62306b602ec61e8c5b44a79c9e1edc6b63a21 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 11:31:39 2009 +1000 Xi: add XIQueryVersion reply swapping hook. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2b459f44f3edaea137df9a28bc7adfeb1b9f1df7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 10:15:04 2009 +1000 Xi: return BadImplementation for deviceids 256 and above The protocol allows for 16 bit device ids, but the implementation doesn't yet. We need to break the input ABI once more to shift the DeviceIntRec's CARD8 to a CARD16, along with some changes in the privates. Once that is done, revert this patch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c77f42049f77417c68bbce3dd2e995d916fc5af5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jun 5 09:29:04 2009 +1000 Xi: fix flawed logic in XIQueryVersion return value. The server returned the minimum of major/minor each instead of the lower of the combined major.minor version. As a result, a client reporting 3.0 and a server supporting 2.7, the return value would be 2.0 (the minimum of both). Reported-by: Rémi Cardona Reported-by: Simon Thum Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b6c16fc7dad5a4ffcaaab647c0e3fabed372efd5 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 5 11:57:39 2009 +1000 crtc/gamma: check xf86_config is valid before using it. If you have multiple cards, some that support randr 1.2 and some that don't you can get a null dereference in here. Signed-off-by: Dave Airlie <airlied@redhat.com> commit da682abc78c9a5b2fde09679061fe08a3a1c665b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 4 17:33:25 2009 -0400 xace: fix a bad send access hook call. commit 993daf06497c85bb6a1e70592df380503d721dfb Merge: 2bda50ee1 e1e8c7ddd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 15:11:36 2009 +1000 Merge branch 'master' into xi2 commit 2bda50ee14b7873f28081bf0f1bfb7b79a40de43 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 14:51:32 2009 +1000 Xi: memset the device name padding to 0. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 09266d6cd1bb6e09fe8bcb875c63fb4011c05b55 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 13:36:29 2009 +1000 Xi: XIQueryVersion requires major_version of 2 or higher. Otherwise, a BadValue error is sent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6ea76c550486bd17eb31f43757030fb44bdf1eab Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 12:55:59 2009 +1000 Xi: reply with the XI2 version that is supported by both client and server. XIQueryVersion must return the client's version if the client's version is lower than or equal to the server's version, or the server's version otherwise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d979f443946011158b6a183582728a6899c33b85 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 11:40:14 2009 +1000 test: check from INT_MIN to INT_MAX for core type conversion ErrorF is link-wrapped to reduce the run-time of the test. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d8471bc7a19cd248fa3e0845496c86cd9251c013 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jun 4 11:32:15 2009 +1000 test: adjust event_to_core_conversion test for new ProximityIn/Out behaviour Both types now return BadMatch. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e1e8c7ddd7fdbfd674361364295fb1cbd5f28b45 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 3 13:37:32 2009 -0400 s/MIN/min/, s/MAX/max/ (#2968) commit 6de67d3206f0a4e307070714564c19efc84da2ec Merge: af4e65840 7f027d9dc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 16:11:33 2009 +1000 Merge branch 'master' into xi2 commit 7f027d9dc0146e229802aeac342ea2dbab63264a Author: Olivier Blin <blino@mandriva.com> Date: Thu May 28 20:57:36 2009 +0200 kdrive: add protocol mouse option kdrive probes a lot of PS/2 protocols for the mouse device, which makes the mouse unusable for some seconds after X startup. This new "protocol" option allows forcing the mouse protocol. It can be used this way: Xfbdev -mouse mouse,,protocol=ps/2 -keybd keyboard Signed-off-by: Olivier Blin <blino@mandriva.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit af4e658401ecbd2f2cc515b4c5abe5aee361cd64 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 12:30:49 2009 +1000 mi: only process master if the SD is still attached. SDs may be detached during event processing (e.g. if a passive grab activates). In this case, the event must not be processed through the master device. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit eb3fe72cbcd10c3953d713e07c321e695194a328 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 12:19:14 2009 +1000 dix: set the device state for XI valuator events. Valuator events need to include the device's state, while other device events need to include the state of the core devices. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 08fd2ae652883393ecff6f3d5177e63408d58472 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 12:18:17 2009 +1000 dix: use GetMaster in PickPointer and PickKeyboard. GetMaster is more reliable than GetPairedDevice, it always returns the keyboard/pointer if desired, even if the wrong device was passed in. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a1d1dd06f8f91c1d1802f7581a4ba7568b85e69c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 12:15:32 2009 +1000 Xi: fix wrong grabtype from ProcXGrabDevice. 86077f0058ce88ee9b3df5d1ab854eeca43 switched from a boolean to a grabtype enum. ProcXGrabDevice didn't switch with it. PickPointer during an XI grab on a slave device would thus return a wrong (or NULL) device and crash the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a371a47205fc58a587e1aecaa4a031184481c228 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 11:47:16 2009 +1000 dix: EventToCore must return BadMatch for proximity events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2bd5ea80652358565346071bed829070ddf5de85 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jun 3 10:45:28 2009 +1000 dix: rework event conversion before delivery. Let EventToXI, EventToCore and EventToXI2 return BadMatch if there's no matching event for this protocol spec. Adjust the delivery paths to cope with BadMatch errors (and clean them up on the way). As a side-effect, this fixes server crashes on proximity events for a grabbed device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 20d9f11abfd6ce3630d9640ff7383c7e27196956 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 2 13:49:09 2009 -0400 Typo fix commit ab5d1ae82ebd467d0a5b39821b286097865ba0c7 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 2 13:39:55 2009 -0400 Remove some libXfont leftovers commit 75795637c7160f1579dbe81c2d7600e85b1d141f Author: Matthias Hopf <mhopf@suse.de> Date: Tue Jun 2 18:41:36 2009 +0200 Revert "randr: Setting gamma: inverse logic looks more sane" This reverts commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28. commit fc8cfc3a055d8af4ac809799c71f3db0d5246433 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 2 16:53:41 2009 +1000 dix: ensure EventIsDeliverable has inputMasks set at all times. For proximity events, the XI2 type is 0 and inputMasks never got set in the preceding condition. As a result, proximity events got never delivered. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ef9f851057a0ae214be02cb919f1e6634cead20b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 2 16:38:32 2009 +1000 dix: protect against floating slaves in DeviceFocusEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b40289c8766c5e7543b7288009b4d965f57c04ce Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 2 16:22:58 2009 +1000 xkb: allow pointer events to pass through for floating SDs without a key class. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38df8351b36195070232b42a6d3369a9a08df8df Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 17:09:03 2009 +1000 test: add grab matching tests. commit a66686a83edd6093ed540414dda2b8700e4696fe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 15:37:53 2009 +1000 input: add support for XIAllDevices and XIAllMasterDevices passive grabs. These grabs are suported through two fake devices inputInfo.all_devices and inputInfo.all_master_devices. These devices are not part of the device list and are only initialised for their device id, nothing else. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f00cf7675164bb984ef310412f9e09582813adb1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 2 10:23:21 2009 +1000 dix: get the current MD keyboard for the grab modifier state. A passive XI2 grab always uses the paired master device as a modifier device. After issuing a passive grab, the slave may be reattached to a different master and hence the modifier device may change. commit 1cd7ed75d903b5b0ea4e1070d2c26f4f931bdec7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 17:14:06 2009 +1000 dix: float slave devices during passive grabs. Exception - implicit passive grabs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f56ad22e8fabdca6d9fd1e408a539696e30599fc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jun 2 15:07:53 2009 +1000 dix: rework temporary slave detachment. Rework addresses two issues: - storing the master device's pointer is a bad idea, we need to store the ID of the device in case it disappears during the grab. - restoring the old master did not actually reattach the device. Fixed now. commit b3e4810a283d369e1a2c6c3288177fe79fd1e9d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 16:22:51 2009 +1000 dix: move grab device assignment into GRABTYPE_CORE block. grab->type is the device type and XI2 types overlap with core events (being less than GenericEvent). Thus, for passive grabs the grab device would be overwritten with whatever device was activating it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 18ae48670859d05788776e164c65985e3b35a723 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 16:06:52 2009 +1000 dix: don't try to activate a passive grab on top of an active one. If we already have an active grab on the device, don't attempt to activate another one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ff1d6244eba8367a8d50601ca393e951c60c94b6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 12:14:52 2009 +1000 input: add support for XIAnyModifier in passive XI2 grabs. commit eb97d125fb6adeff0b23c2460108e0587ba253e2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 1 15:50:50 2009 -0400 doc: Remove mention of Kerberos replay cache from Xserver.1 The krb5 auth code is gone, so this is no longer relevant. commit 80ea32ad4f1440d068e18db65830f45498703b09 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 12:06:55 2009 +1000 dix: switch grab checking from unsigned shorts to unsigned ints XIAnyModifier is outside of the unsigned short range. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 080b0331b3d1de1bab5ecdc9df175b287616e358 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 13:33:29 2009 +1000 input: Add grabtype to GrabParameters. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bee02a154145c0e4ed97980f7857dc27a96b1be8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 10:49:22 2009 +1000 dix: ensure implicit passive grabs have the xi2mask zeroed. This fixes XI2 enter/leave events being sent to non-xi2 clients. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cc71dfb4f5cf6113053951070dec9556e941aa24 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 13:19:30 2009 +1000 test: Add GetSelectedEvents request to struct size tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit de5c5b1db083a9c1d23e1461b54ca646c5a5c445 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jun 1 13:21:36 2009 +1000 test: fix compile error introduced with the removal of isMaster. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 45530d16097459a756696e255ab4e72d6e51fbc4 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 29 18:07:48 2009 -0400 vfb: Fix depth setup. Initialize the depth corresponding to the root window before the pixmap-only depths. Otherwise you end up with the root window depth in the depth list twice, which is mildly confusing for clients and catastrophically confusing for PanoramiXConsolidate(). commit 5c8540d8cf9ebaafa7572cb2879d057cd3d15190 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 29 14:49:05 2009 -0700 GLX: Purge glxint.h usage Change (__GLXvisualConfig *) to (void *) in ABI compat stubs. (cherry picked from commit b4adec886c65e49cfbd30d1e3a41b613f75ed3f5) commit da2aaee24a77e1a9e5c623af4a78ca6acc94b787 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 29 14:27:46 2009 -0700 GLX: Purge some glxint.h usage in glxcmds.c This is related to d0b249f1c5df81f3941d638f9625fe1e16c31807 in the 1.4 branch and was ok'd by krh (cherry picked from commit e587436cf2e1237813c924699ff0662aea3034e1) commit f2151f1b0dcbfec23488a29a7ea887fbfd53b760 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 29 14:09:41 2009 -0700 XQuartz: Fix alpha to be 1 (screenshots bug, etc) This is related to: bc964ff1e3f3d8ab590eab40d767c6241e9480d4 XQuartz: Stab at fixing the alpha 0/1 bug (screenshots, etc) by pulling in some old code that got gutted from rootless. which was on the 1.4 branch and implemented in fbPaintWindow. Now that fbPaintWindow is gone, this is now in miPaintWindow(). (cherry picked from commit 032173f693f75385a40e144ffe2b7b5378bb6f2e) commit 7c158ffa766d32f5e8ec459693da5ef6ba0892e9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 29 14:02:18 2009 -0700 Rootless: Use miPaintWindow since PaintWindowBackground is dead (cherry picked from commit 4975c087257b52189a5c21d93d121f183e60e4c8) commit ec9e9c8bcabda3d8b4ea07037fb247f7408dde8b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 28 15:30:20 2009 -0700 XQuartz: English localization update for HIG compliance (cherry picked from commit 86b319d7cbef39d75b54c9d321e5dbf097b552be) commit 0f47203a9a690498c18b1c04e2ef5deed23a0e3e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 29 14:18:37 2009 +1000 dix: Set the implicit passive grab flag for keyboards too. Extension devices have ActivateKeyboardGrab as their grab activation function, hence we need to ensure the implicit passive grab flag is set accordingly in the grab for further event delivery. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 75c73ddbfc9236bb80a3709d467674c4a1018fa3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 29 14:01:21 2009 +1000 dix: fix broken XI event delivery during grabs. If an implicit passive grab is active, the XI event mask is in grab->deviceMask. Otherwise, for explicit grabs, the XI event mask is in grab->eventMask. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 29ec14625111a8ae600d245ccbf905f059074d7c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 29 13:26:22 2009 +1000 Xi: passively grabbing slave devices must be possible. There's use-cases where this is useful, so take the check out preventing that. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 235cf5713a8fe535c439628cce9ea5b42432acb1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 29 12:09:06 2009 +1000 dix: init inputMasks to NULL to avoid random value dereference. If the XI2 type is 0 (e.g. proximity events), inputMasks is never set and may not be NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 68d86adbe8d84099812c37a04098f2ab5ccc45a4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 29 12:03:07 2009 +1000 dix: GetProximityEvents doesn't need extra events for valuators. With internal events, we only have one event for all the data, no need to calculate for extra events. Reported-by: Thomas Jaeger Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 71a83d68ab07536c0778d13cd7da974c40e77457 Author: Adam Jackson <ajax@redhat.com> Date: Thu May 28 15:32:03 2009 -0400 xfree86: Remove loader symbol list ABI stubs These have been nops since 2006 and functionally void since 7.0. commit d7aef3f663f4b5d861799f8615dcd301d5ce2906 Merge: a25f248fc e08c6a075 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 28 17:20:58 2009 +1000 Merge branch 'master' into xi2 Conflicts: Xext/geext.c Xi/chdevcur.c Xi/extgrbdev.c Xi/xiproperty.c configure.ac dix/ptrveloc.c hw/xfree86/common/xf86Config.c mi/mipointer.h test/input.c xkb/xkb.c commit a25f248fc3bd0375d91ca8a44320200d445ecfbb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 27 15:47:12 2009 +1000 Xi: Send Enter or Leave events with XIPassive(Un)grabNotify If a passive enter or focus in grab activates, send additional enter or focus events with mode XIPassiveGrabNotify to the grabbing client. Likewise, if the grab deactivates, send additional leave or focus out events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2107becb0ce2ffda001be65728c53563496d8d50 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 27 17:13:19 2009 -0400 xfree86: Remove unused (and useless) xf86{Add,Delete}ModuleInfo commit e08c6a0752772745f35f7afcf6c2b1c927b91cc0 Author: Federico Mena Quintero <federico@novell.com> Date: Mon May 4 19:24:47 2009 -0500 randr: bug #21554 - re-probe outputs when coming back from laptop unsuspend Make xf86 RANDR wrap the EnterVT call chain, so it can re-probe the outputs when a laptop comes back from suspend/unsuspend (actually, any time that we enter our VT again). The X server should then send RR* events to clients, so they can cope with a monitor that was unplugged while the laptop was suspended. Signed-off-by: Federico Mena Quintero <federico@novell.com> commit b12010e10f38951358b48ff1076c026f943b7cc3 Merge: 6e6927247 f1441b835 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Wed May 27 15:56:30 2009 -0400 Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/xorg/xserver commit 6e6927247359cc0db47501fb9d2dbb7856aa5985 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Wed May 27 15:51:19 2009 -0400 Fix alpha map computation in miComputeCompositeRegion() According to the RENDER spec, the origin of the alpha map is interpreted relative to the origin of the drawable of the image, not the origin of the drawable of the alpha map. This commit fixes that and adds an alpha-test.c test program. The only use of alpha maps I have been able to find is in Qt and they don't use a non-zero alpha origin. commit f1441b83538e6ba8a1557c4f5ea50c53a1837087 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed May 27 10:06:10 2009 -0700 XQuartz: More localization updates (cherry picked from commit b107390c9f30571902556b4d053e62d345a06254) commit 996357e905c1082479bb238110b93bc170b8cb84 Author: Joe Krahn <jkrahn@nc.rr.com> Date: Tue Jan 20 17:22:37 2009 +0000 Cygwin/X: Update icons directly, rather than modifying the window's class Update icons directly to windows rather than modifying the window's class. Respect custom icons overriden via the configuration file. fd.o bugzilla #4491 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9955252564922e7e8702dfb6eab52c75605a4a22 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 5 17:55:58 2009 +0000 Cygwin/X: Remove unused TimeSinceLastInputEvent() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 966c8fccf16e77c8f459b4b175718323f2ec5d58 Author: Colin Harrison <colin.harrison@virgin.net> Date: Mon Jan 5 18:04:42 2009 +0000 Xming: Fix some log spam Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d190a27a33ab8c198568baf184fad14df57e24ad Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Jan 29 11:00:49 2009 +0000 Xming: Various tidy ups in winClipboardFlushXEvents() Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit fbe9ed27b1c2f932a74aa6ced134ecec021a3fc1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Jan 29 10:55:38 2009 +0000 Xming: Avoid log spam if a windows application won't provide CF_UNICODETEXT clipboard format Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 71ba9856a4f01aa7a42f1178c8da98a2e5ac23ae Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:52:11 2009 +0000 Xming: Cache atom lookups in clipboard integration code Cache the CLIPBOARD atom lookups in winClipboardWindowProc() Cache atom lookups in winClipboardFlushXEvents() Recache on server regeneration Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 4ec110327bdc4f2617cd6116539812d7ef96b24e Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 18:29:49 2009 +0000 Xming: Prevent the mouse wheel from stalling when another window is minimized. Fix internal WM to prevent the mouse wheel from stalling when another window is minimized. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 888e6961a4ee76d05d212cfb946f089caafb3f69 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Jan 7 18:29:16 2009 +0000 Cygwin/X: Correctly allow for the native window frame width in ValidateSizing() Fix internal WM to correctly calculate the native window border when validating window sizing Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit a72865868f03b675f86990476fcee601822894b3 Author: Joe Krahn <jkrahn@nc.rr.com> Date: Tue Jan 20 17:09:43 2009 +0000 Cygwin/X: Consolidate dialog initialization in winInitDialog() Changed windialogs.c to set icons via window properties rather than class properties, and use LoadImage() for small icons, because LoadIcon() can only open large icons. Since this code is redundant across the dialogs, I put it in the winCenterDialog function, along with a few other redundant instructions, and renamed in winInitDialog(). Also, don't bogusly put our dialogs at the center of the virtual desktop if we are on a multimonitor system (this causes the dialog to end up split across two monitors in a dual-monitor side-by-side setup) Corrections to use HWND_TOPMOST instead of HWND_TOP and not to use SWP_NOZORDER from Colin Harrison fd.o bugzilla #4491 Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d053c3b35f730fdaddd22f841dbd8ed6c9a07ba0 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:46:40 2008 +0000 Xming: Slightly adjust the formatting of the logged command line Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit a7e23a79c1fc429aedbf9b6c0e78b1c8d7e02238 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 14:42:25 2009 +1000 Xi: Add support for Enter and FocusIn grabs. Enter grabs are checked for in CheckMotion(), each time the sprite window changes the current grab is deactivated (if applicable) and the new grab is activated (if applicable). Exception - if the grab is on a parent window of the current window since we keep the grab across descendants. Since CheckMotion() may change the grab status of a device, we mustn't get "dev->deviceGrab.grab" in ProcessOtherEvents until after CheckMotion(). FocusIn grabs are checked in much the same manner. The event delivery for grabs replaces the NotifyNormal on window change with a NotifyGrab on window change. Note that this happens before the grab activates, so the EnterNotify(NotifyGrab) is still delivered to the window, not to the grabbing client. This is in line with the core protocol semantics for NotifyGrab events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ec2fe9660dbc0c16cdaca33b3b878011857e0fe2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 27 14:18:51 2009 +1000 Require inputproto 1.9.99.10 commit 0ef6ba9f3b9e68307bfe623e12dc36d44440e97f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 27 11:15:54 2009 +1000 Xi: set the passive grab's resource mask on ungrabbing. Not having the resource mask set means we never match an existing grab, hence we never actually ungrab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1f61d6647f25add487c5cae9739643a6e33ef9f7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 27 11:15:23 2009 +1000 Xi: use GetMaster(MASTER_KEYBOARD) to get the modifier device for XI2 pgrabs Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bedfd561fa534b65baea45c4a05b1752ef172c45 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 15:28:33 2009 +1000 dix: fix wrong cast of eventMask into CreateGrab. commit 023f959e6812e63f9d38b078158275bc13d238ae Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 14:56:40 2009 +1000 Xi: fix an inputInfo.keyboard usage. In the case of a RevertToFollowKeyboard, the master device should be used (since this is the closest equivalent to the VCK as before). Only if the master keyboard is the same as the device, revert to the VCK itself. commit b3463fd6a89d50a7562c357aeb5314ce0fd6493d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 13:58:04 2009 +1000 dix: convert window coordinates to FP1616 before calculating event_x/y root_x/y are already in FP1616 at this point. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 10b5e981016132b4c07ad9ce68646d0a385e9c24 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 11:12:08 2009 +1000 dix: take grabs into account for XI_Enter/Leave events. commit 1815defdb2f19e79f4ec0354d188ea763ff1f15e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 26 10:08:46 2009 +1000 Xi: only deactivate passive grabs if the event type matches. This didn't use to be a problem when devices could only be pointers or keyboards, not both. Nowadays, slave devices may have both buttons and keyboards, and in this case we don't want to deactivate a passive keyboard grab when a button release is detected. commit 9dc3810a034f067096d71b33b0b47f1f52092fe6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 27 13:53:46 2009 +1000 dix: set the right grab event type for implicit passive grabs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6583477035234e23ead2fad9db7a07e5862447a4 Author: Nicolai Hähnle <nhaehnle@gmail.com> Date: Sat May 23 13:35:24 2009 +0200 Remove reference to non-existing requestLog and requestLogIndex These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 53e821ab4a41cbc85932b9ef150311bc2e57c108 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 25 12:20:37 2009 +1000 Xi: add request processing for XIGetSelectedEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b377994336c978875dd786f4a4a9ef2e7b20e32c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 25 13:55:17 2009 +1000 Xi: advance by the right number of bytes when trawling XI2 event masks. The wire layout is [struct xXIEventMask][mask bytes]. So the pointer needs to not only be advanced by the mask bytes, but also by the size of the struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 12e725d08b4cf7dbb7f09b9ec09fa1b621156ea9 Author: Julien Cristau <jcristau@debian.org> Date: Fri May 22 09:54:38 2009 +0200 randr: fix server crash in RRGetScreenInfo We don't return rates to randr < 1.1 clients, so don't allocate space for them. This fixes a FatalError due to not all allocated space being used. X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861> Reported-by: Guillaume Quintin <coincoin169g@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org> commit c70511931ca1441878daed50e710fa514f6ab077 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun May 24 10:32:38 2009 +0200 fix typo in cabff9007 which led to an unintialized memory read and a crash. commit 99e22b86c5f1a3653f3caaf01368a777d2b208d0 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 22 12:01:55 2009 -0400 EDID: Add modes from Established Timings III descriptor to mode pool EDID 1.4, section 3.10.3.9 commit b395da91c531d633ec47bb5a51e361d321663a3a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 22 15:24:46 2009 +1000 Xi: silence two compiler warnings chdevcur.c:97: warning: ‘SecurityLookupIDByType’ is deprecated (declared at ../include/resource.h:269) xiproperty.c:200: warning: passing argument 2 of ‘GetEventFilter’ from incompatible pointer type Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4a36db60774640ea92a2133a3b08fbf1a48d2cb6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 22 15:16:43 2009 +1000 os: fix compiler warning "too few arguments to format" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit da0d3baf71b34657cc235d6c6b37d548541f9449 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 21 14:11:27 2009 +1000 dix: protect event generation against single-valuator devices. If we have a single-axis device and it sends events it should not access non-existant memory. commit b25e29e8014927815d4fdc9c416bfeb2af0ecba6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 21 12:07:03 2009 +1000 mi: use GetMaster() from MIPOINTER and MISPRITE. Both may in some cases be called for a SD attached to a master keyboard. In this case, we need to get the right master device (i.e. the pointer). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c9df51b070377ca33e48644dbc842b6e3dfb2975 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 21 11:16:37 2009 +1000 input: allow for master pointers to not have a button class. There's devices (e.g. some barcode readers) that have axes but no buttons. When such a device sends a motion event, the valuator and button class is copied into the master pointer (i.e. removing the button class). So we need a couple of extra sanity checks for the button class to exist. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ebe45e1a72a81ad22413e5d0514869b3e45a69b7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 10:55:03 2009 +1000 input: introduce partial class copying depending on the event. Copying all classes into the master device has drawbacks for hybrid devices (devices that are both mice and keyboards). If such a device posts an event, it's key classes are moved into the VCP. The key event itself is unaffected by keyboard grabs and the like. Partial class copying copies depending on the event and copies the classes into the right master device (i.e. the VCK for key events, the VCP for pointer events). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc63c8a4570c989f19a036965854bceb9800ce19 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 12:33:49 2009 +1000 dix: introduce GetMaster() For hybrid devices (keys + buttons/axes) the attached master device is generally the wrong one. One shouldn't post a button event through a keyboard and vice versa. GetMaster(dev) returns the right master device for the given type needed. This may be the MD paired with this device's MD. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d79318f269d959d566ec66239b4c985afd61b259 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 21 08:29:14 2009 +1000 dix: Add a deviceid to the DeviceChangedEvent. ChangeDeviceId would actually overwrite the flags field if deviceid wasn't present. Aside from the event of course not telling which device generated it in the first place. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit eeffb83fea2d87070beafd0c692fb0ad54d8335b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 18 20:03:07 2009 +1000 ABI_XINPUT_VERSION 6 commit 438a4eafa5d14ab676827f7a5d58782c02db4cdf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 17:02:50 2009 +1000 input: remove nested union from InternalEvent. There's no need for internal events to be a struct with a single nested union, we might as well make the union itself the InternalEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b12d302df8283186ce87882c29b2b0294adb2770 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 15:28:16 2009 +1000 Input: rename DeviceIntRec->isMaster to ->type. isMaster is not enough as long as we differ between master pointers and keyboard. With flexible device classes, the usual checks for whether a master device is a pointer (currently check for ->button, ->valuators or ->key) do not work as an SD may post an event through a master and mess this check up. Example, a device with valuators but no buttons would remove the button class from the VCP and thus result in the IsPointerDevice(inputInfo.pointer) == FALSE. This will become worse in the future when new device classes are introduced that aren't provided in the current system (e.g. a switch class). This patch replaces isMaster with "type", one of SLAVE, MASTER_POINTER and MASTER_KEYBOARD. All checks for dev->isMaster are replaced with an IsMaster(dev). commit add2defac7e59dcb355e5ba12b6de60861741d57 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 16:23:38 2009 +1000 Split the signal-handler's lastSlave out into a separate variable. dev->u.lastSlave was not signal safe since it was accessed by the DIX and during signal handling. Replaced with: 'dev->last.slave' for the signal handler's lastSlave (used to generate DeviceChangedEvents), . 'dev->u.lastSlave' for the DIX lastSlave (currently only used in change_modmap) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 525aa17f804d37d1cfcbbf6b8e6cddb45e999b20 Author: Tomas Janousek <tomi@nomi.cz> Date: Wed May 20 15:03:01 2009 +0200 Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and .totalVModMapKeys were not initialized, contained random values and caused accesses to unallocated and later modified memory, causing XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of nonzero values, resulting in writes past the end of an array in XkbSendMap. This patch initializes those values sensibly and reverts commits 5c0a2088 and 6dd4fc46, which have been plain non-sense. Signed-off-by: Tomas Janousek <tomi@nomi.cz> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7db55a0806c82bd4143c8bf1b8eb2b62e456ad9a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 14:38:25 2009 +1000 dix: remove superfluous loop in change_modmap. A device can only be attached to a single master device. So instead of looping and searching for the master device, we can just use dev->u.master directly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cabff9007a4abad026b450a4aab155c7bcd94326 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 15 08:33:07 2009 +1000 xfree86: treat other drivers as mouse drivers in the config. Historically, if no input device was referenced in the ServerLayout, the server would pick the first "mouse" device found in the xorg.conf. This patch gives evdev, synaptics, vmmouse and void the same status. If there is a section in the config file using this driver - use it as the core pointer. Device selection is in driver-order, not in config-order. If a "mouse" device is listed after a "synaptics" device, the "mouse" device gets preference. This replicates the original behaviour. This code only takes effect if AllowEmptyInput is off and there is no core pointer in the server layout. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a8bd1e1f96d8e5380972a7dce8d9940cd912aa09 Author: Søren Sandmann Pedersen <ssp@l3000.localdomain> Date: Thu May 21 18:21:28 2009 -0400 Fix alpha map computation in miComputeCompositeRegion() According to the RENDER spec, the origin of the alpha map is interpreted relative to the origin of the drawable of the image, not the origin of drawable of the alpha map. The only use of alpha maps I have been able to find is in Qt and they don't use a non-zero alpha origin. commit a2c5ee36b21c2ee5c0468f1b251e74c1412dbecb Author: Adam Jackson <ajax@redhat.com> Date: Thu May 21 10:20:48 2009 -0400 EDID: Be more cautious about finding vendor blocks. Many old monitors zero-fill the detailed descriptors, so check for that to avoid a useless warning like: (WW) RADEON(0): Unknown vendor-specific block 0 commit 73c7398aafa050950ad614483fb0d5bdd2da97ca Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 10:40:50 2009 +1000 dix: 'namespace' HAS_OLD_SLAVE and HAS_NEW_SLAVE. We need more flags for this in the near future, so let's namespace them now. commit 5b5e3fa2771383a85afff679be34df19d3a4e290 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 15 08:33:07 2009 +1000 xfree86: treat other drivers as mouse drivers in the config. Historically, if no input device was referenced in the ServerLayout, the server would pick the first "mouse" device found in the xorg.conf. This patch gives evdev, synaptics, vmmouse and void the same status. If there is a section in the config file using this driver - use it as the core pointer. Device selection is in driver-order, not in config-order. If a "mouse" device is listed after a "synaptics" device, the "mouse" device gets preference. This replicates the original behaviour. This code only takes effect if AllowEmptyInput is off and there is no core pointer in the server layout. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1cce55cc0333a026474100cf2f784e220fd96473 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 14:07:03 2009 +1000 input: rename device->type to device->xinput_type. This type is only used in XI to give a hint of what type this device may be. Call it xinput_type for clarity. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 81b3b0cce088866dc3cda099d7c8d6655849fd43 Author: Tomas Janousek <tomi@nomi.cz> Date: Wed May 20 15:03:01 2009 +0200 Bug #6428, #16458, #21464: Fix crash due to uninitialized VModMap fields. In ProcXkbGetKbdByName, mrep.firstVModMapKey, .nVModMapKeys and .totalVModMapKeys were not initialized, contained random values and caused accesses to unallocated and later modified memory, causing XkbSizeVirtualModMap and XkbWriteVirtualModMap to see different number of nonzero values, resulting in writes past the end of an array in XkbSendMap. This patch initializes those values sensibly and reverts commits 5c0a2088 and 6dd4fc46, which have been plain non-sense. Signed-off-by: Tomas Janousek <tomi@nomi.cz> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 79138eec1b49cbaca6a16f2bdd8579b5828aeb28 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Mar 10 16:03:26 2009 +0100 randr: Setting gamma: inverse logic looks more sane commit c2785ae7eb6197bbfc75e92e99fffbb8ad8064da Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 14:29:13 2009 +1000 dix: refuse events from disabled devices. If the device is disabled ("off"), it must not send events to a client. The driver shouldn't send events in that case anyway, but just to make sure we simply drop events coming while the device is disabled. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 47a89b1cba67a43ddc225f7e1b5d2b3b217c8d93 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 13:59:22 2009 +1000 Xi: remove DeviceIsPointerType This approach is broken anyway. DIPT only checked for the XInput type "MOUSE" and the only user of this is xf86ActivateDevice when it sets the Activate/DeactivateGrab functions. Since synaptics and wacom set their own types, evdev only sets MOUSE for, well, mice half the devices didn't have this set correctly anyway. Instead, ActivatePointerGrab should be merged together with ActivateKeyboardGrab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7b891e450f005688e41e61016e6d3e394c67f6be Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 14:23:16 2009 +1000 dix: Remove obsolete comment CorePointerProc doesn't back up the device classes anymore. commit 42719ce5c715ac3a0c74c3c7df872d35e0449de9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 20 14:38:25 2009 +1000 dix: remove superfluous loop in change_modmap. A device can only be attached to a single master device. So instead of looping and searching for the master device, we can just use dev->u.master directly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 22a33a7250f879b8f3eb84176a1dc57027d8cfe4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue May 19 22:45:26 2009 -0400 glx: Register names for the GLX resource types. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 77e90261d5f91e1170c6e02deb0e3739c24fcfd6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue May 19 19:36:03 2009 -0400 dix/events.c: Use wClient where appropriate. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 3cea176d5abcb0f14eefbdcbe17fed0847524dd4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue May 19 19:30:33 2009 -0400 xace: Fix a bad device access hook call. Add a proper access mode, and reverse the logic of the return value. Zero ("Success") is returned on success from the hook calls. Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov> commit 4addfcd633484b7f53b5df1b92bfca8bfc1dc48d Author: Michel Dänzer <daenzer@vmware.com> Date: Mon May 18 17:53:35 2009 +0200 EXA: Allocate from the end of free offscreen memory rather than from the start. This way we don't always need to scan over previously allocated areas when looking for an available one, and there might be less fragmentation. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 510cbd43cd4e34bd459e8f74ab2855714b4ca95d Author: Michel Dänzer <daenzer@vmware.com> Date: Mon May 18 17:48:57 2009 +0200 EXA: Defragment offscreen memory. At most once per second, under the following circumstances: * We can't satisfy an offscreen memory allocation, but there seems to be enough offscreen memory available in total. or * The server has been idle for at least 100ms, and there is more than one available offscreen area. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 8331bde0adeccefb275c4d707e7b2cb1d95b1581 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri May 15 21:36:28 2009 +0100 Cygwin/X: link with libmain.a to provide main() Commit 987579c930bda803427a28cb82773c389f5110d6 moves main.c into into libmain.a to be linked with separately, and updates the various DDXs to link with libmain.a, except Xwin, which also needs this change. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b89dcfbfbd38f8d19f1d4f24f81820b1048572c8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 18 16:07:08 2009 +1000 Xi: fix length field in XIQueryPointer. Buttons append 4-byte units to the end of the reply, they need to be included too. Reported-by: Mark Dokter Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 33fcaaaea5ea30be39156ecfdbcca891b47ab465 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 18 16:05:35 2009 +1000 Fix missing parentheses in FP1616 macro. Missing parens led to interesting results if an expression instead of a constant was passed in (ProcXIQueryPointer for example). commit 6258bb1d6bb78ea4ba1d33470bc74e9b711b25f2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 15 20:24:45 2009 +1000 require inputproto 1.9.99.9 commit e7e94ff5fd3205a9ee01fe9342d9f3a426b0a068 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 14 21:45:35 2009 +1000 Xi: set the right length for the XIQueryPointer reply. commit 00ab04d73c612ac85e024105015bdb7c79e8874b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 14 16:24:35 2009 +1000 Include full modifier + button state in XIQueryPointer. commit de78aab0ea3a2d8c61222493f25911258dea65a2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 14 15:53:00 2009 +1000 Xi: take the paired device as modifier device only for MD pointers. commit 0e089f9ceb0edec532078c6e1df7f642f7220fb5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 14 15:29:20 2009 +1000 Xi: check cursor and grab_window before attempting the passive grab. Both values need to fail the request, so we need to check them before looping through the modifier masks. Otherwise, a wrong grab_window will show up in each failed modifier return but not actually cause an error. commit 5c3e7289801c958e2c70e2629d3ebee122449be8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 13 16:54:01 2009 +1000 dix: count must be 1 if we have an XI2 match. This fixes events that activated a grab not getting delivered to the client. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e083a0d0692baa5ad29002a38293b36dd3b4c06f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 13 15:23:42 2009 +1000 Xi: set the correct length for XIPassiveGrab replies. commit 8ff1bff8f462b15e05fc298704e1e40cb244587f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 12 21:33:54 2009 +1000 Update to new XI2 names commit bbf266cca3de726e3eb932d66dd5b8981ef40fa8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 12 21:24:07 2009 +1000 mi: un-deprecate miPointerWarpCursor This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 because it didn't take a device argument. The device argument was added in 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 273890924b8ed6f8b7949c0322c8258b9e6f8630 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 12 16:09:35 2009 +1000 input: reduce the number of superfluous hierarchy events There's only two reasons for hierarchy events: - device is added, removed, etc. In this case we want to send the event as it happens. - devices are added in a XIChangeDeviceHierarchy request. In this case we only want one event cumulating all changes. commit 033a2b12fcd02fa9a2c2f20a352bec0a43074512 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 12 14:50:57 2009 +1000 Xi: set per-device hierarchy changed flags. Rather than have one field per hierarchy change, XI2 has two fields - one generic one and one per-device that include the device-specific flags. This requires some funky handling for removed devices, but oh well. commit 8fb51feae222ff4f4aa1c440b6973ce7383bbc09 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 15:45:46 2009 +1000 xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) Reproducible: Configure a server that uses the keyboard driver with an invalid ruleset, e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is "off" in the ServerFlags or ServerLayout section. Start the server. After failing to init the keymap, the server will try to clean up after the device, double-freeing some xkb structs that have not been reset properly. X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0cea199eda772a5ddd5ce72e4823a00ec14405d4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 12:53:56 2009 +1000 kdrive: set Activate/Deactivate grab for input devices (#21591) X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591> commit fdce58ca822f4e43e03e84076190f52d7104e01f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 12:51:40 2009 +1000 dix: ensure Activate/DeactivateGrab has a valid value. Xephyr doesn't manually set Activate/DeactivateGrab for new devices, resulting in a NULL-pointer dereference later when a grab is activated. Avoid the segfault by ensuring that the pointer is always valid. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e3f296d91dfe6b827195e1d387e1a04aa73b85c3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat May 9 10:33:20 2009 +1000 xfree86: Remove superfluous ifdef DEBUG checks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2f6253376df45e508284ff7766b186cfc7fb56d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat May 9 10:33:20 2009 +1000 xfree86: Remove superfluous ifdef DEBUG checks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b1b5ec45c1cb650ccb8c659218f9481379c777d9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 12:53:56 2009 +1000 kdrive: set Activate/Deactivate grab for input devices (#21591) X.Org Bug 21591 <http://bugs.freedesktop.org/show_bug.cgi?id=21591> commit 6f9e22049862ee9ac7f604411d005d8bb1b2dd1c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 12:51:40 2009 +1000 dix: ensure Activate/DeactivateGrab has a valid value. Xephyr doesn't manually set Activate/DeactivateGrab for new devices, resulting in a NULL-pointer dereference later when a grab is activated. Avoid the segfault by ensuring that the pointer is always valid. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c1d7deca9281ba1df0df1abcea1fe7f841b10ff9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 12 21:24:07 2009 +1000 mi: un-deprecate miPointerWarpCursor This function was deprecated in ef68273f5bdb27a492ec0b69548ec4fbede46c08 because it didn't take a device argument. The device argument was added in 1c7568b8a1417257fa67c7fca69aa253099b9461 though, so the deprecation is obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8609a4e883e917d1652fbe810108de99bc89713f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri May 15 11:22:32 2009 -0700 Correct some Sun license notices to Sun's standard X11 license format Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 94c5093c8bc803d0b14429b5a4d07ae46da865cc Author: David Marx <David.Marx@Sun.COM> Date: Wed May 13 17:53:30 2009 -0700 Solaris: Make sure non-inline versions of asm routines end with ret statements Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 2be5eecb4b0f30b9c55d12521415edbb88c1f8fd Author: Julien Cristau <jcristau@debian.org> Date: Fri May 15 17:29:32 2009 +0200 xfree86: add edid quirk for Samsung Syncmaster 2333HD It reports vertical size in cm in the detailed mode. X.Org bug#21750 <http://bugs.freedesktop.org/show_bug.cgi?id=21750> Reported-by: Peter Poklop <Peter.Poklop@gmx.at> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 7c8327f0a75087a85864256a9cea80dd4b86def5 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri May 15 15:48:37 2009 +0200 EXA: Always damage glyph cache pixmap manually after uploading a glyph. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 850675d4de4373e5df95507dbf2cd9affaaf54bc Author: Michel Dänzer <daenzer@vmware.com> Date: Fri May 15 15:48:37 2009 +0200 EXA: Take GC client clip type into account for migration. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit c1bbac2708bbccbec01cecba39cdf2b8160c1dc3 Author: Matt Turner <mattst88@gmail.com> Date: Thu May 14 16:00:41 2009 -0400 Fix mem_barrier() on Alpha Some clean up (da086901c6579e41b28b1418fa12ebb82744fc87) went a bit too far and removed the needed mem_barrier macro on Alpha. This re-adds it. commit 4cc33190ef1a4207c0f8fc74201cdf2568a239c2 Author: Julien Cristau <jcristau@debian.org> Date: Thu May 14 17:01:57 2009 +0200 xfree86: Add two __FreeBSD_kernel__ checks Debian bug#525475 <http://bugs.debian.org/525475> Reported-by: Petr Salinger <Petr.Salinger@seznam.cz> Signed-off-by: Julien Cristau <jcristau@debian.org> commit ed9aecf8517bf74e943e3e5dd3ee407524e8f122 Author: Adam Jackson <ajax@redhat.com> Date: Thu May 14 06:55:21 2009 -0400 COPYING: SGI FreeB 1.1 -> SGI FreeB 2.0 commit c66cf7b64c7bcb31c81b9fde27cc40c1440753b1 Author: Adam Jackson <ajax@redhat.com> Date: Thu May 14 06:53:08 2009 -0400 Update several of my and/or Red Hat's licenses to standard form. commit 2075d4bf9e53b8baef0b919da6c44771220cd4a5 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu May 14 11:46:41 2009 +0200 glx: If a destroyed window is bound to the current context, make it not current. Avoids subsequent crashes due to stale pointers to the DrawableRec, see https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 2c1190f888515292de01e60fe74657c34b99fd9e Author: Michel Dänzer <daenzer@vmware.com> Date: Thu May 14 11:39:16 2009 +0200 randr12: Initialize and keep track of updates to VidMode extension gamma value. This way clients querying the gamma value via the VidMode extension at least get the last value set via the same, rather than always something bogus. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit fc3ce861cdab8606610726ce7c53f57d950c2407 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu May 14 11:35:25 2009 +0200 randr12: Fix calculation of gamma ramp values. The reciprocal gamma value was missed in the first copy and this mistake was propagated to the second one. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit f3c61377d0fb1f09a18833995556fc9ffd11e097 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue May 12 18:27:09 2009 -0700 COPYING file updates for git master changes since 1.6 branch Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit b746a00cffca5c553b607a8e9c1074294a23b443 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue May 12 16:11:01 2009 -0700 Resync COPYING file with notices in code base as of xorg-server-1.6.1 Remove notices for code no longer in tree (Xprint, Xgl, kdrive, cfb, etc.) Add/update notices for new/changed code in tree Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit f250eea2e90fc50bec5214c2f41132b95edc2c46 Author: Jerome Glisse <glisse@freedesktop.org> Date: Mon May 11 22:52:46 2009 +0200 DRI2: update DRI2 private drawable width & height according to X drawable commit 0952d12717031e9dda9e48123bb922d0f4e81834 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon May 11 15:27:46 2009 -0400 xselinux: Relax ownership restriction on SetSelectionUseContext. Instead, clients should keep track of the selection instances they use. commit ac13145dbcb284293582435409d8a90f276785c5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 11 15:45:46 2009 +1000 xkb: if kbd init failed, NULL out the pointers after freeing them (#21278) Reproducible: Configure a server that uses the keyboard driver with an invalid ruleset, e.g. (Option "XkbRules" "foobar"). Ensure that Option "AllowEmptyInput" is "off" in the ServerFlags or ServerLayout section. Start the server. After failing to init the keymap, the server will try to clean up after the device, double-freeing some xkb structs that have not been reset properly. X.Org Bug 21278 <http://bugs.freedesktop.org/show_bug.cgi?id=21278> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ebfd6688d1927288155221e7a78fbca9f9293952 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Sun May 10 23:27:56 2009 -0400 Make compositing with transformed windows work again. The coordinate translation was broken in pretty much every way imaginable. commit c2b668e6fff11c52f2a3f0dc3f4d1fc2c5bcf3e6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 5 20:27:53 2009 -0700 XQuartz: pbproxy standalone: added missing variable declarations. (cherry picked from commit 2d947d17a3ef5fb8cef959bff0eb08b8bb5b6548) commit 9c5b761c8c86cca56f4b4af272f42ba89c9c3ba5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat May 9 16:19:13 2009 +1000 Revert "xkb: write the _XKB_RF_RULES_PROP to each device." This commit shouldn't have been pushed, we're still sorting out the API we want to use. This reverts commit 876910a951053f0bd31e30098de3da15a1c1f5d6. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1e816065e5ec3b9394dc1fa5815457a664e15fd9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri May 8 21:31:01 2009 -0700 Don't printf NULL pointers on HAL connection error Fixes Solaris bug 6801386 Xorg core dumps on startup if hald not running http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6801386 Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit b680bda34da130ce408783f04214771471e41e8d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Apr 30 18:49:06 2009 -0700 Fix a couple off-by-one array boundary checks. Error: Write outside array bounds at Xext/geext.c:406 in function 'GEWindowSetMask' [Symbolic analysis] In array dereference of cli->nextSib[extension] with index 'extension' Array size is 128 elements (of 4 bytes each), index <= 128 Error: Buffer overflow at dix/events.c:592 in function 'SetMaskForEvent' [Symbolic analysis] In array dereference of filters[deviceid] with index 'deviceid' Array size is 20 elements (of 512 bytes each), index >= 0 and index <= 20 Error: Read buffer overflow at hw/xfree86/loader/loader.c:226 in function 'LoaderOpen' [Symbolic analysis] In array dereference of refCount[new_handle] with index 'new_handle' Array size is 256 elements (of 4 bytes each), index >= 1 and index <= 256 These bugs were found using the Parfait source code analysis tool. For more information see http://research.sun.com/projects/parfait Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00bc043fa0398a1d14d46b87da2ff3031a9535dc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 8 10:10:25 2009 +1000 dix: export subpixel precision in XI2 events for root/event coordinates. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bae070914fc27db122e6131ae4838559c4a72f65 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 7 16:52:31 2009 +1000 input: update to inputproto 1.9.99.8 XI2 defines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 83f32d3972b8bfb0a87069dfb3fcd64b6b7c6424 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 7 10:05:29 2009 +1000 Xi: Add XI2 property requests. commit 9935bec6e860cba9a3cc5baadd372ddb89d72ef0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu May 7 09:43:56 2009 +1000 Xi: split some code out of the XI 1.5 property request processing. This is in preparation for the XI2 property requests that can re-use much of this code. commit f6f1e417063d2d61d65731a7e3ebca3ec2bdaacc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 22:25:28 2009 +1000 Xi: fix copy/paste error causing sizeof against wrong struct. This wrong check may cause BadLength to be returned to the client even if the length is correct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fc0013d744a345199f013ba5b6ef0e44201d0e68 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 16:55:32 2009 +1000 Xi: don't double-swap the XListDeviceProperties reply. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 409012061b7d361a172b20455d4aaa5e47527c42 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 16:42:46 2009 +1000 Xi: add missing break in XI event swapping function Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c3c64978c4a231a3a8c18211d0716df875c75efa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 15:05:06 2009 +1000 Xi: fix a couple of wrong dixLookupDevice permission tags. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0d947aa8e87c5d92b702c60190c8bc5d32c9ba9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 12:07:07 2009 +1000 xfree86: fix xf86PostMotionEventP type checking We only put internal events into the queue now, so let's check for ET_Motion rather than the MotionNotify. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9457ce448988dacea9a3a1c14b6955767118ff31 Author: Simon Thum <simon.thum@gmx.de> Date: Thu Apr 30 13:01:17 2009 +0200 dix: remove superfluous includes from ptrveloc.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ee30e1b102d779403eeda97e007b81e85f006a37 Author: Simon Thum <simon.thum@gmx.de> Date: Thu Apr 30 12:58:48 2009 +0200 dix: fix warning in pointer acceleration newer gcc's warn against how this cast is done (though it eludes me why), and lrintf() is also faster especially on insane processors like the P4 (http://www.mega-nerd.com/FPcast). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5cf70183812541b33a6e83c7e1e3bc6198730cbe Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 21:00:31 2009 +1000 xkb: remove _XkbAlloc, _XkbCalloc, _XkbRealloc and _XkbFree We all agree that wrapping is fun, but seriously. One of these days someone will get hurt. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0e31d3906deaee5d9ada66e538b9e93574a4d610 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 21:07:07 2009 +1000 xkb: remove some now-useless XFUNCPROTOBEGIN We bring them back if we start rewriting the server in C++, promise. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8b583ca2b21155359c6255f406c96599b277c762 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 22:25:28 2009 +1000 Xi: fix copy/paste error causing sizeof against wrong struct. This wrong check may cause BadLength to be returned to the client even if the length is correct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7ab5e9b97c300bba793a23fa13506b0c77c50ddf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 12:07:07 2009 +1000 xfree86: fix xf86PostMotionEventP type checking We only put internal events into the queue now, so let's check for ET_Motion rather than the MotionNotify. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 50cc8adafca4ba3838d468278d6eb8a4692d2488 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed May 6 16:55:32 2009 +1000 Xi: don't double-swap the XListDeviceProperties reply. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3fc6fcfb267888d65a22ed7c3eda175a2530a3d5 Author: Simon Thum <simon.thum@gmx.de> Date: Wed May 6 10:39:16 2009 +0200 dix: add 'none' pointer acceleration profile with number -1 This is a shorthand for disabling acceleration, while retaining the possiblity to use constant deceleration. If constant deceleration is also unused, it will optimize motion processing. Other possiblities to deactivate acceleration were quite hidden, and didn't always work as expected. E.g. xset m 1 1 would retain adaptive deceleration, while xset m 1 0 would not (in the default profile). Also removes the 'reserved' profile; it was unused and it's trivial to add new ones anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9d1597cbefea6a5e7959f2099c46f1a284def7ad Author: Simon Thum <simon.thum@gmx.de> Date: Thu Apr 30 13:01:17 2009 +0200 dix: remove superfluous includes from ptrveloc.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 35fce4e5c7fa34f98b3e4010c6cb09ce38a9205c Author: Simon Thum <simon.thum@gmx.de> Date: Thu Apr 30 12:58:48 2009 +0200 dix: fix warning in pointer acceleration newer gcc's warn against how this cast is done (though it eludes me why), and lrintf() is also faster especially on insane processors like the P4 (http://www.mega-nerd.com/FPcast). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d220d6907d1d5138d1528c48b739e77f65616225 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 4 17:38:02 2009 +1000 Xi: add GrabButton and GrabKeysym code. We don't do keycode grabs in XI2, they're pointless. commit 1b593ced171d02f1d00034f0f733060706bb6d41 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 16:57:46 2009 +1000 Xi: access the prev_state to get group/modifier state for key events. Key events may change the modifier state, so we need to get the prev_state for those (i.e. without the changes by the event already applied). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 35a4b8e7f4526a92d44cb16a783f21030cd1f6df Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 16:51:59 2009 +1000 xkb: remove oldState from XkbHandleActions. I really don't know what the purpose of this variable is or was, aside from potentially clobbering up our key state since there's a path where it may be used uninitialised. Also, this means that xkbi->prev_state is now accessible from the DIX with meaningful data. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d523fbe428e4513d85402caa83e9349256b680cc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 4 17:00:57 2009 +1000 test: add test for xi2 struct sizes. commit 1b1b20d6e3e696e4437a9ef56128cde70a485f66 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 13:47:55 2009 +1000 Change glib require for tests to auto. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 749cae82204f347248c815b1068ffcae9825fe70 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 30 14:58:00 2009 +1000 mi: don't crash if we're trying to update the pointer for a keyboard. If a device doesn't have a pointer, just return. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7ecedb0f2ee5b53513205d1f0aa381451893b9c5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 14:35:12 2009 +1000 include: up the number of max. input devices to 40. With the Xtest virtual slave devices we have 4 devices for each MD pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved deviceids. It's quite easy to hit the current limit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a38d33f6ac765bc5a3296b325e2c9b4a6a10ebf1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:24:02 2009 +1000 Xext: shut up compiler warnings in xtest.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 14d5471981151b27678de826daa078977217477a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:22:37 2009 +1000 Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. BadDevice is an XI error, but this cannot happen for core XTest fake input anyway since the device will be the matching virtual XTest slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f1bed0959e803784af142a0f45177ee3b675d78a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:15:04 2009 +1000 Xext: fix core Xtest button presses, don't call PickPointer. We already did the device selection before, so dev should be the XTest virtual pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 94648bb797d94b025746c60679c584e5be2fae28 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Mon May 4 15:38:22 2009 -0700 Don't prepare outputs & crtcs if set_mode_major is present A driver with this hook will take care of preparing the outputs & crtcs, so calling the prepare functions will just cause unnecessary flicker. Fixes bug #21077 commit 7d85169c7ab1d05c21fdbb2877ffd79f344dbb6b Author: Michel Dänzer <daenzer@vmware.com> Date: Mon May 4 10:14:43 2009 +0200 Fix typo in ProcRenderCreateAnimCursor. commit 59358de4b68a01452bf68593beb83605087ebc8f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 4 17:30:19 2009 +1000 input: ensure various ProcUngrabKey/Buttons have the right grabtype set. commit 834ea071b619506e0bef5bdbf0e3c59831cf6e99 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon May 4 15:58:15 2009 +1000 dix: if grab types differ, two grabs cannot be the same. commit 63a3c727b35d1ffd8a850a5177bd6623cd78b179 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:24:02 2009 +1000 Xext: shut up compiler warnings in xtest.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 226dd90597ef29998ac5db15c5457aad3fe9729e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:22:37 2009 +1000 Xext: return BadDevice from XTest if we don't have keys/buttons/valuators. BadDevice is an XI error, but this cannot happen for core XTest fake input anyway since the device will be the matching virtual XTest slave device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0fdff0a47a57a0096974ee83e07fefbad03075dd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 15:15:04 2009 +1000 Xext: fix core Xtest button presses, don't call PickPointer. We already did the device selection before, so dev should be the XTest virtual pointer. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f0124ed93cdcee8d22a6690e639a3f60b9a63c54 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 14:35:12 2009 +1000 include: up the number of max. input devices to 40. With the Xtest virtual slave devices we have 4 devices for each MD pointer/keyboard pair, plus the AllDevices and AllMasterDevices reserved deviceids. It's quite easy to hit the current limit. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 08cd846000286eb5e07cc8d8cb313aff2d6e7faf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri May 1 11:06:06 2009 +1000 dix: only free the old cursor if the grab was successful. Testcase: start thunderbird and move a message around, crashes after two or three moves. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 557dbadf3be273255e8fdb12d9321f4e88bf2b65 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Sat May 2 00:26:18 2009 -0700 XkbSetNamedIndicator should ignore SD's without LED's When ProcXkbSetNamedIndicator is called on a core device, and we walk the slaves to set the LED's on each of them, ignore any slaves that do not have either a KbdFeedbackCtrl or LedCtrl structure. (This is much more critical in xserver-1.5-branch, where we walk *all* devices, not just the slaves of the specified master, and thus return failure when setting an LED on the Core Keyboard and hit a xf86-input-mouse device with no LED's to set.) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0d9d3f3e361f769822caedccf4c2a58cc9930ecc Author: Ian Romanick <ian.d.romanick@intel.com> Date: Mon Apr 27 15:11:10 2009 -0700 DRI2: Force allocation of real-front buffer for non-windows as well For redirected rendering we end up with pixmaps (which the app thinks are windows) that are double buffered. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Tested-by: Pierre Willenbrock <pierre@pirsoft.de> commit 3d30789a05a730a03faa6058c73a5eda36ef3779 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 30 14:58:00 2009 +1000 mi: don't crash if we're trying to update the pointer for a keyboard. If a device doesn't have a pointer, just return. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 876910a951053f0bd31e30098de3da15a1c1f5d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 30 14:46:45 2009 +1000 xkb: write the _XKB_RF_RULES_PROP to each device. We only have one root window and writing the rules used to the same property for each device is quite pointless if you don't have the same RMLVO on all devices. So let's be sensible and write the same property to the device too, so at least we know which device got loaded with which RMLVO. commit 44044adc92e6bb6537f48c84727523d5cb23528c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 30 11:39:50 2009 +1000 xfree86: print a message if NIDR fails due to AutoAddDevices off. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 43dbbc30327f826068bc7cd2cdaf870ed61b4522 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 28 21:01:36 2009 +1000 Xi: fix typo in ProcXIGrabDevice Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6a618929a0c06ba0d6dac13d7e644cd9658d98ed Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 28 16:49:45 2009 +1000 input: reshuffle CreateGrab and friends to take a GrabParameters param. This is cleaning up work in preparation for XI2 passive grabs. commit e8e26f700c9c70d3f1bb53bdb71d1100f5c43a69 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 26 21:43:25 2009 +1000 Xi: split some grab parameter checking out of GrabButton and GrabKey. commit 57aff88c7d0761e590806d07bee1c9410680c89f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Apr 29 01:04:37 2009 -0400 Fix most remaining deprecated resource lookups. Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage. commit 1abe0ee3da5e1268c7315f841d31337ea6524cf0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 28 23:51:40 2009 -0400 kdrive: fix Xvfb build with separate libmain. commit 737b49199a05299486064e6e762cf2a2f6f95be6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 15:40:24 2009 +1000 xfree86: restore default off for DontZap Zapping is triggered by xkb these days, so note in the man page that it's the Terminate_Server action. Since it's XKB, personal preferences towards or against zapping should be achieved through xkb rulesets. If Terminate_Server is not in the xkb actions, then we can't zap anyway and we don't need a default of DontZap "on". This patch restores the old meaning of DontZap - disallow zapping altogether, regardless of XKB's current keymap. Ideally, this patch should be accompanied by b0f64bdab00db652e in xkeyboard-config. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 98a1fa994158feca8bc80a10296a7675465c0e56 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 21 22:18:23 2009 +1000 test: add InternalEvent to core event conversion tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 990e8362a76fadc173e890d9052a2e5274b6eac5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 11:41:58 2009 +1000 test: add a simple test to verify device axis intialization. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4eac0df060b897470fb01cfd3b70f500da757c74 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 15 17:21:08 2009 +1000 Add a test-suite for in-server unit-testing. This patch adds a test/ directory that contains the setup for a unit-testing suite designed for in-server unit-testing. All functions available to the X server are available to the test binaries through static linking. This test suite uses the glib testing framework. Do not use glib calls outside of the test/ directory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c2c515ead38d9a6c9eae0b83aa7a82208f177b7e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 22 13:26:40 2009 +1000 dix: remove all but main() from main.c All other functions are pushed into where they seemed to fit. main.c is now linked separately into libmain.a and linked in by the various DDXs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dc2767d1c5db60385867c76ba2de507fe0cb8a90 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 21 22:18:23 2009 +1000 test: add InternalEvent to core event conversion tests. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1127ca097cb75450bcccfc5f5d82e435de2fb5b7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 11:41:58 2009 +1000 test: add a simple test to verify device axis intialization. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4124c465a85713fe44843a16c5e2b13ece17e9d2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 15 17:21:08 2009 +1000 Add a test-suite for in-server unit-testing. This patch adds a test/ directory that contains the setup for a unit-testing suite designed for in-server unit-testing. All functions available to the X server are available to the test binaries through static linking. This test suite uses the glib testing framework. Do not use glib calls outside of the test/ directory. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 987579c930bda803427a28cb82773c389f5110d6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 22 13:26:40 2009 +1000 dix: remove all but main() from main.c All other functions are pushed into where they seemed to fit. main.c is now linked separately into libmain.a and linked in by the various DDXs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2a2a7fa6856b2e1954e904577535118f20cd9133 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Apr 27 20:23:53 2009 -0700 Solaris: use <sys/agpgart.h> instead of stale copy in Xorg sources Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 707af5f8c5fae3b6c4c5125a91917667bb0ab908 Author: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Date: Thu Apr 23 16:15:01 2009 +0100 Make the cursor completely optional For embedded use, it's convenient to be able to disable the cursor completely, without having to audit and fix up all your third-party code (e.g. Mozilla Firefox). Add -nocursor and -cursor server options to enable and disable the cursor. The default is still -cursor, but embedded users can run the server with -nocursor to hide the cursor regardless of what application developers do. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 40a8f2f4088aa353de733a11327b628ef13a52e6 Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Sun Apr 19 21:15:22 2009 +0200 Fix obvious copypasta Reviewed-by: Ian Romanick <idr@freedesktop.org> commit a8cf63fd18b0ddadbadf7b47d620159854920050 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Apr 23 14:57:04 2009 -0700 Export CompositeRegisterAlternateVisuals. Drivers need this if they add visuals that require implicit redirection. Add a new SDK header, compositeext.h, to contain the prototype for this function. commit 48573e7ea13e279593249036e6d30f1d7507882f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 26 21:32:37 2009 +1000 Xi: swap stuff->cursor in SProcXIGrabDevice commit ff6c7764c2909e4126403b7211faa6c58556b341 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Fri Apr 24 12:49:19 2009 -0700 DRI2: Implement protocol for DRI2GetBuffersWithFormat This change implements the protocol for DRI2GetBuffersWithFormat, but the bulk of the differences are the changes to the extension / driver interface to make this function work. The old CreateBuffers and DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer (both singular). This allows drivers to allocate buffers for a drawable one at a time. As a result, 3D drivers can now allocate the (fake) front-buffer for a window only when it is needed. Since 3D drivers only ask for the front-buffer on demand, the real front-buffer is always created. This allows CopyRegion impelemenations of SwapBuffers to continue working. As with previous version of this code, if the client asks for the front-buffer for a window, we instead give it the fake front-buffer. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kristian Høgsberg <krh@redhat.com> commit 28ddfc88d8d547941c7f4713db527a3c2f9ec35a Author: Ian Romanick <ian.d.romanick@intel.com> Date: Fri Apr 24 12:09:21 2009 -0700 DRI2: Add interface for drivers to query DRI2 extension version Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit a1c98f7fa9aa0cd5075ef2054c5d2be4d1e740f0 Author: Joel Bosveld <Joel.Bosveld@gmail.com> Date: Fri Apr 24 10:12:26 2009 -0700 Correct fcntl(F_SETOWN) error check in non-Solaris sigio code commit 64b7f96dca accidentally inverted the comparison, could result in crashes on some systems later on. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 64b7f96dca23d2b33e0b8a8785d628d9a2f50e7b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Apr 24 00:14:12 2009 -0700 Add SIGIO/SIGPOLL support for Solaris Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 0c467b1f990f156a34d5ef117bd825df6b633114 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Apr 24 00:05:28 2009 -0700 Add casts to generated entries in sdksyms.c to silence type mismatch warnings Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 7d0f7518c2235a9dc783029971259ddaada2db20 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Apr 23 08:42:38 2009 -0700 Fix byte swapping of XF86VidMode{Get,Set}GammaRamp Fixes OpenSolaris Bug 8315: Xorg segfaults when screensaver fades in cross-endian xdmcp session <http://defect.opensolaris.org/bz/show_bug.cgi?id=8315> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 057fc9a4f89282e440b5e11458f1dd8655879dd8 Merge: 95628b797 932d6bcbb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 24 16:15:47 2009 +1000 Merge branch 'master' into xi2 Conflicts: Xi/chdevhier.c include/input.h commit 932d6bcbb68194c5bdfeb336f700dc8b31529223 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Apr 24 15:28:45 2009 +1000 mi: remove superfluous check. mieqProcessInputEvents doesn't process events from MDs anymore, so we don't need to check for pDev->isMaster. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fab563bf8f6b63906ce9d5a568c467425843265b Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Fri Mar 27 16:44:15 2009 +1030 input: propagate XTst events through virtual slave devices. A XTest virtual slave device pair (kbd/ptr) exists for every master device pair. This is so XTest events are correctly propogated via slave devices up to Master devices and the classes are correctly changed along the way. We add the XTest slave device pair to the Virtual Core pointer and provide a simple way of creating the devices. A XTest Slave Device is identified by the XTstDevicePrivateKey property being set in the devices devProperties XI events are still propagated through the matching device, in the hope the client knows what it is doing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ccd28ca2ad40aecf951ab058d89062828e3e5d8a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 22 19:23:17 2009 -0700 XQuartz: Localization update (cherry picked from commit 9435fc5e20e25ce66ec85bde033daff51f39f69c) commit a362d0f4fb79150f7b8e0eb3d1dc1cdee2f98d95 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 19:06:45 2009 -0700 XQuartz: Make sure the bgMouseLocationUpdated state is consistent (cherry picked from commit 8fa8a8e1db60c8ac60d10f1f15517471d2291f77) commit 8dc8812c226222fc64f8e489f9f123687a95d3d1 Author: Dave Airlie <airlied@redhat.com> Date: Thu Apr 23 12:13:35 2009 +1000 exa: add missing exa.h header include commit 3ec6a121e110ba3cae964ee201d4d5bf818b6dff Author: Dave Airlie <airlied@redhat.com> Date: Thu Apr 23 12:13:05 2009 +1000 exa: missed exa.h change commit 02ae85c4c93bbd0013c063ce0014b365a8ba061f Author: Dave Airlie <airlied@redhat.com> Date: Thu Apr 23 12:04:17 2009 +1000 exa: add CreatePixmap2 hook for driver pixmaps. This adds a revised pixmap hook for driver pixmaps, which is required to support tiling on various chips. Signed-off-by: Dave Airlie <airlied@redhat.com> commit 9d684ba0bcab53841a17ebd521507b6df8bc4b45 Author: Dave Airlie <airlied@redhat.com> Date: Thu Apr 16 10:28:36 2009 +1000 exa: avoid offscreen pixmap swapped out flag for driver pixmaps commit 0dfb97f15f591f85e079f5829c77d0c328d00464 Author: Julien Cristau <jcristau@debian.org> Date: Wed Apr 22 20:01:49 2009 +0200 Bug#21324: Add quirk for Iiyama Vision Master 450 Reported-by: Jeremy Henty <onepoint@starurchin.org> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 44227ef1b77467c76147b9bf79bdd0e6305a522a Author: Ian Romanick <ian.d.romanick@intel.com> Date: Mon Apr 20 18:20:52 2009 -0700 DRI2: Send the version the code actually supports This prevents building an older server with a new dri2proto.h from resulting in a DRI2 extension module that lies about the version it supports. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit d1e916d29be8b470cbc8cadcf6e83991fdbc5a9f Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Apr 16 12:10:34 2009 -0700 DRI2: Add missing front-buffer flush callback. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit 826a5bff0136b2b4d55a9e6e6bc3a7a64da9031e Author: Benjamin Close <benjamin.close@clearchain.com> Date: Thu Apr 16 15:33:30 2009 +1000 dix: Change AllocMaster into AllocDevicePair, allow creation of SDs too. Allocating a slave device is essentially the same as allocating a master device. Hence we rename AllocMaster to AllocDevicePair and provided the ability to indicate if a master or slave device pair is required. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e2e5932bda3f473629d4be6f3ca4dcab18993eb6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 11:06:52 2009 +1000 dix: don't allow more than MAX_VALUATORS on one device. Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the internal event delivery relies on not having more than MAX_VALUATOR axes, so let's cap it down. If there's real devices that require more than the current 36, I'm sure we can bump this up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 063833f3a6d9f8f657e3de309c8d6d5c3d606513 Author: Julien Cristau <jcristau@debian.org> Date: Wed Dec 24 14:23:37 2008 +0100 Add XI 1.5 event and requests to protocol.txt commit 4f86ee61a4abf7a29e565d095aa08abd0ca9dc66 Author: Julien Cristau <jcristau@debian.org> Date: Wed Dec 24 14:17:27 2008 +0100 Add RandR 1.3 requests to protocol.txt commit 6559f02ef89cb0ee365110d6a928ebd29632ad53 Author: Colin Harrison <colin.harrison@virgin.net> Date: Fri Apr 17 15:14:45 2009 +0100 xkb: set bell_func in InitKeyboardDeviceStruct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 95628b797e2b326ae15406df4f736e25f5d2f12f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 20 14:04:54 2009 +1000 Xi: use the XI2 defines for AsyncPair, SyncDevice, etc, not the XI ones. And don't allow some values on SDs either. commit 335c63fcd6a53c1d3dffd6e00c0acd400c61e3d3 Author: Werner LEMBERG <wl@gnu.org> Date: Fri Apr 17 15:22:57 2009 +0200 Add newline to some LogMessage strings. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d5ad14c8ed4d8360e1df8cd0bacf6a7c9c31df91 Merge: 54716fd3d 0e0642ee9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 19 22:28:22 2009 +1000 Merge branch 'master' into xi2 commit 54716fd3dbc251db9d251d1d0435942efaa63259 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 19 22:12:11 2009 +1000 Convert to using int32_t fixed point values on the wire. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 129ac9a9145323e3f126590b491e718f976f80ce Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 19 21:31:56 2009 +1000 dix: set root_x/y for device events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit eeb1e4cd254c047539933c3b886037e67ef30762 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 15 22:17:15 2009 +1000 Xi: add support for XIAllowEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 74d0fc3aee05bc4f505274d81dd44c0d2b4368ff Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 11:06:52 2009 +1000 dix: don't allow more than MAX_VALUATORS on one device. Some keyboards (?) advertise more than MAX_VALUATORS axes. Parts of the internal event delivery relies on not having more than MAX_VALUATOR axes, so let's cap it down. If there's real devices that require more than the current 36, I'm sure we can bump this up. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit edb70caf21fa5da3c336c47c62218a3f05c635b8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 15 22:16:49 2009 +1000 dix: remove un-used parameter "core" from AllowSome Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bb5418d4901017c657031181d3839f58b387a2a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 12 22:22:21 2009 +1000 Xi: Add support for XI2 active grabs and ungrabs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c11ef87931f920ba782ba4e9b47d9c31ad7c1cf7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 12 22:16:14 2009 +1000 Xi: take XI2 requests into account when checking opcodes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c94ea5bc055e4efc323e84b7a8266e8b8a4af48e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 12 17:38:28 2009 +1000 input: use a GrabMask union in GrabDevice to allow for XI2 masks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6bb4b5b93701535402f65ea828348ed7747c7dbf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 12 16:20:10 2009 +1000 Xi: add XI2 grab protocol request handling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 09f9a86077f0058ce88ee9b3df5d1ab854eeca43 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Apr 12 16:19:45 2009 +1000 input: replace GrabRec's coreGrab field with grabtype. Don't allow grabs of different types to override each other. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7fbe1b7d63c94b344e8ff9d09c0bb162ca104909 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Apr 11 13:10:31 2009 +1000 Xi: remove the GetExtensionVersion hack. Squashing data into a request that's defined to be padding is probably not the best idea. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0e0642ee9466d3268476d0084a83a9d93a4aa555 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 16:17:07 2009 +1000 os: don't malloc memory in LogVMessageVerb. LogVWrite is limited to a buffer size of 1024, so we don't loose anything here by truncating. This way we can use LogVMessageVerb (and xf86Msg and friends) during signal handlers with the normal message types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 62d2fb68638e9f2aa3c1d72027619c4d38f5b812 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 16 17:06:33 2009 +1000 xkb: Add XkbFreeRMLVOSet helper function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Dan Nicholson <dbn.lists@gmail.com> commit 73e1055b1275470dcc2d53b15898c866d9721d3e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Apr 11 11:19:29 2009 +1000 Xi: fix a typo in a #ifdef Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cbbc7fed994448852961a987a8b0eadf718b24bf Author: Simon Thum <simon.thum@gmx.de> Date: Wed Apr 1 10:53:10 2009 +0200 dix: correctly utilize tracker buffer and protect from timer overruns two small related fixes hard to split up Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ca4918ac2ff003142aefbd8ac7ec2bc398ccc6eb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:31:04 2009 +1000 Xi: remove fail from SProcXISelectEvent. Leftover from rebasing once too often, I guess. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 463676f016a105a790cbb386d20eb5b188c04652 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:11:59 2009 +1000 Xi: remove un-used variable pXIClient Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 32b13ec4cd42842a133aa6428f49638b0448efc9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:11:27 2009 +1000 Xi: silence compiler warnings about "wrong" event types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f2e957c5342aefc8329e9fe282b7072f767fcd28 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:07:36 2009 +1000 mi: add prototype for CopyGetMasterEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d80798ba2ae018086aaf230fcd8bc71d3bf06b11 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 20:27:00 2009 +1000 mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4dedb900f4fbd3bdc9538b1e82cab2044438a770 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:42:06 2009 +1000 xfree86: shut up compiler warnings - typecast to InternalEvent Reported-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4fa7fcf610d2ab91c1158f8034bbc0531060a86f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:40:20 2009 +1000 mi: fix compiler warning - explicitly typecast to InternalEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8bf2f562678107c346e8664f18c10f315c2768f5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:14:39 2009 +1000 dix: fix dev/keybd variable mixup. Reported-by: Eric Anhold <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 012cb1956a69f6cf2a878c5331e792fb12c73e9d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:06:32 2009 +1000 xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. Reported-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 73b01a9aac5fde46ccd90c08a070e9d2496092b9 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Apr 8 14:35:01 2009 +0200 dix: fix pointer accelerations remainder handling This didn't really work as intended, but did amazingly well thanks to roundf() hiding the defect. Cheers! Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4318075140cc287871d3c3b9f777289ea4ffa23a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 7 21:51:02 2009 +1000 dix: store subpixel precision and send it down the wire to the client. For the valuator data, not yet for root x/y and event x/y. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9212948461c5e053abb61fff73ced4a00f138544 Author: Simon Thum <simon.thum@gmx.de> Date: Sat Mar 21 18:19:19 2009 +0100 dix: allow relative motion buffer to accumulate in a natural way Since with XI2 we pass sub-pixel motion, anything else is broken. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ad76656f8869e2065f0c4e66cfbeef0b42c61769 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 17 17:46:58 2009 -0400 randr: Accept gamma set requests from XF86VidMode clients too commit d9bf52b4abd29a3c206cd1e765b680659ddac1c6 Author: David Jander <david.jander@protonic.nl> Date: Fri Apr 17 01:34:18 2009 -0400 [kdrive] Fix rotation of pointer Rotation matrix for pointer coordinates was incomplete and pointers with absolute coordinates did not work correctly in xserver (kdrive) when the sceen was rotated other than by 0 degrees. Signed-off-by: David Jander <david.jander@protonic.nl> Signed-off-by: James Cloos <cloos@jhcloos.com> commit 4559d2ace6ac55fe361f572ded0769cdd1f3b545 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 16 22:48:11 2009 -0400 security: Grant untrusted windows remove access on all windows. This allows untrusted clients to destroy their own windows when they have been reparented by a trusted window manager. commit 3481b32ab971c41cb972f6819ae049f3e9f7033b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 16 22:39:54 2009 -0400 security: Fix a crash caused by wrong ordering of format arguments. commit 6045506be0cebca4ebbe943ae77f020aafa703d4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 16 22:33:12 2009 -0400 security: Revert behavior of extension access for compatibility. Previously, three extensions were defined as "trusted" by the extension: BIG-REQUESTS, XC-MISC, and XPrint. No other extensions were permitted to be used by untrusted clients. In commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 this was changed for some reason. Return to the old, compatible behavior. commit 56a5955c8cd87137248edb2cbc65d384376d72ad Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 14 17:05:04 2009 +1000 xkb: strdup the values returned by XkbGetRulesDflts XkbGetRulesDftls may get a copy of what will later be freed when passed into XkbSetRulesDftls. On the second run of XkbGet/SetRulesDflts: XkbGetRulesDflts(rmlvo) rmlvo->rules = current-rules XkbSetRulesDflts(rmlvo) free(current-rules) current-rules = strdup(rmlvo->rules) Leaving us with garbage in current-rules. This patch requires callers of XkbGetRulesDflts to free the associated memory. See also http://lists.freedesktop.org/archives/xorg-devel/2009-February/000305.html Reported-by: Benjamin Close <Benjamin.Close@clearchain.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit b406886bbffadaa52864a99f2a0520999eadc15d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 14 16:57:29 2009 +1000 input: allow NULL as XkbRMVLOSet in InitKeyboardDeviceStruct. Virtually all callers use XkbGetRulesDefault(&rmlvo); InitKeyboardDeviceStruct(..., rmlvo); Let's save them the trouble and accept NULL as a hint to take the default RMLVO. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Benjamin Close <Benjamin.Close@clearchain.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 4e4e263bc073bf452f19c932b937c4881ae71f64 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Apr 15 22:16:49 2009 +1000 dix: remove un-used parameter "core" from AllowSome Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dd6e8a14ec1c8f4ed9c51ca2764261e6e48d13b3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Apr 11 11:19:29 2009 +1000 Xi: fix a typo in a #ifdef Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit de1e43181bd670877b994db221ad8a04b5d63324 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Apr 15 11:13:48 2009 -0700 DRI2: Don't leave empty entries in private->buffers This should fix bug #21130. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit b3e3154cce47add97f5561088036ce3b9e7dc937 Author: Robert Noland <rnoland@2hip.net> Date: Wed Apr 15 12:06:19 2009 -0500 One = is more than adequate here. Make is sh safe. commit 74d27c8b5bac7c8d2ed02ba86e09bf09924ce05c Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Wed Apr 15 15:44:17 2009 +0200 Fix build on hurd-i386 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523970 commit faf7dfa099f5b42a703313fbd1bf8afdad07a179 Author: Dave Airlie <airlied@linux.ie> Date: Wed Apr 15 18:26:06 2009 +1000 randr12: looking up these bits if randr isn't initialised is bad. When xinerama is enabled we don't get randr protocol, but the driver might still want randr internals commit efa31092d6703397121a0ada4f7205a8ecad3d3d Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> Date: Mon Apr 6 16:01:20 2009 -0300 xfree86: Remove device from inputInfo.devices if ActivateDevice failed. After the call to xf86ActivateDevice, the new device will be added to inputInfo.devices. However, if the subsequent call to ActivateDevice fails, the correponding InputInfoRec for the device is deleted but an entry still remains in inputInfo.devices. This might lead to a server crash later on (on InitAndStartDevices for instance) when the device control proc would be called for an invalid device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d79bad0aa70403ead8ec87bac8463a6e2005802c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Apr 13 17:49:00 2009 +1000 xfree86: don't synthesise a mouse section if synaptics devices are found. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4a27618565f3151ab17f0ca9ecbde12fa7ba13c0 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Apr 14 16:21:04 2009 -0400 composite: Fix resource lookups commit e7785e8af3e34f9d1089d8499d16802984ab9823 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Apr 14 14:24:31 2009 -0400 xfixes: Fix a couple of resource lookups commit 0eb19f9437b7d8c19592e49eedb028771d300d80 Author: Adam Jackson <ajax@redhat.com> Date: Tue Apr 14 10:54:25 2009 -0400 xdmcp: Don't crash on X -query with more than 255 IP addresses. (#20675) You could be more clever than this, but the wire protocol says this really is an array of not more than 255 ARRAY8, so it's not just a matter of changing the types. commit f0543ae4ec0fcb5d696e7b2983653bd779f1eddc Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 8 14:17:41 2009 -0700 Fix unused var warning from pci cleanups. commit 181cc08c8908a119fc403f970dea8cc98d3e0b9b Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 8 14:17:40 2009 -0700 Add shave so that we can see the steaming piles of warnings generated. The old style output can be reenabled for build system debugging using "make V=1", or --disable-shave at configure time. commit 4474c200a102feda72f9572a96cb588009aa0147 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 8 14:17:39 2009 -0700 Move VENDOR_* defines from AC_SUBST to a header to avoid angering shave. This is more sane anyway, as it ensures a rebuild when changing them. commit e72c85547b405fbd0117dc1236e5ca5a2126063c Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 8 14:17:38 2009 -0700 Move contributed m4 to a subdir so we can more easily update contributions. commit bef1cfb2395df47458159a0b7ae27b9db15025ef Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 14 16:54:42 2009 +1000 xnest: remove unused variable 'names'. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7b6400a1b8d2f228fcbedf17c30a7e3924e4dd2a Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Apr 9 13:16:37 2009 -0400 glx: Fix drawable private leak on destroy When a drawable goes away, we don't destroy the GLX drawable in full, since it may be current for a context. This means that when the drawable is destroyed in full later, the backend doesn't get a chance to destroy resources associated with the drawable (the DRI2Drawable). With this patch, we destroy the GLX drawable in full when it goes away and then track down all contexts that reference it and NULL their pointers. commit 140463a197fb93d0a4bfad924efc35b860e8cc54 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 16:53:59 2009 -0700 XQuartz: Use correct values for ProximityIn and ProximityOut This was the other underlying cause of teh 100% CPU tablet issue. (cherry picked from commit a9cecf34c23fbcd59b56b380c51d31a9fabc3eb7) commit 80a7bb2605f9b439d6221c0495a629a39177a018 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 17:26:07 2009 -0700 XQuartz: Solve the tablet 100% CPU bug This happened because we put a byte in the fd to wake up dispatch, but we never actually enqueued anything in mieq because the num_events was 0. (cherry picked from commit c21ca7558d2faf93c61f5feaafd7c878e9e21942) commit 6f8f7c78f1b722bc70a0ea8f6340116a1e09e858 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 16:13:42 2009 -0700 XQuartz: Re-enable background window checking since that code was not the culprit for the wacom tablet, background 100% CPU bug (cherry picked from commit fc1dc5d71b2a488a8a94d953dd8e67353161a590) commit 8522a759c9e78478bb399b91d3a0af2d23ea6766 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 16:12:23 2009 -0700 XQuartz: Only set MotionNotify on activation if it is updated. (cherry picked from commit ae8077a251ef27381a755d57ff974767bda16148) commit 5e55becddccc376ab7338789562ad6d6cd750de9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 14:23:41 2009 -0700 XQuartz: Make sure the Fn doesn't trigger unneccessary calls to DarwinUpdateModKeys() (cherry picked from commit 70a18558c6b0a02b633fd8974f002cdf3cdc713e) commit bd1d9179094657865b0606ed0ac835a8b8df3be1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 11 13:53:38 2009 -0700 XQuartz: Re-enable Fn as an option for 3button mouse simulation. Patch from Martin Otte <otte@duke.edu> (cherry picked from commit b5ec3be6b5449b5d575bc1472fdd1c9cb15cb8be) commit 1b5758bef0840c6614244e321790231b3c9477c9 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Apr 9 15:45:57 2009 +0200 exa: implement UTS based upload through CopyArea - Some image viewers (eog, gqview) trigger the CopyArea path of Xext/shm.c - I'm not aware of any code path that wouldn't like UTS and trigger this code. - miDoCopy should handle src coordinate clipping. - Overlapping blits are obviously not an issue (both would have to be offscreen or not). commit 567cf67959b30432ae30f4851ec17b3a375ab838 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Apr 9 14:38:24 2009 -0700 DRI2: Synchronize the contents of the real and fake front-buffers Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit f1a995d1496d73741731e32f475097c44a8da972 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Apr 9 14:31:01 2009 -0700 DRI2: Do not send the real front buffer of a window to the client Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit aa2928325fe51d94a636dde9c090e8f54a311a12 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Apr 8 15:44:34 2009 -0700 DRI2: Add fake front-buffer to request list for windows If a front-buffer is requested for a window, add the fake front-buffer to the list of requested buffers. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit 808fd2c67f303cb721769375b11ce8b90ffc1909 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 20:00:37 2009 -0700 XQuartz: xprSetWindowLevel updated to store the level requested by the WM (cherry picked from commit c28c2ddc3a8f3c5b9beec396953bb3ac9ee4714b) commit dfb0d7aefbbdfc0db966e3a84d52f638135d9138 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 18:51:22 2009 -0700 XQuartz: Update window levels when changing rootless state (cherry picked from commit 1359ded5bfc14a80fb998b01a54ecacb96c4ff88) commit d5ef88d7543ed787093099ab18db766c446b47d1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 18:27:22 2009 -0700 XQuartz: Fix window levels for rooted mode to allow showing the menu bar. (cherry picked from commit 80759a4186bf0335edc85aecea2faf11fe09f491) commit 15146b863759640e7a73fab2301fb28ef4dead84 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 17:47:41 2009 -0700 XQuartz: Properly set the window level for the root window (cherry picked from commit bdf9286d1cbfeaaf8eaf03d28091e91ee587ee25) commit 8d5dcfe2154f217bd8fde5509d78f3383add8725 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 04:36:26 2009 -0700 XQuartz: Properly set the menu bar and hotkey state when changing rootless mode. Currently no code path exhibits the broken behavior since we only toggle into rootless if we don't have the root. (cherry picked from commit 970f100ca3c5fc0662ae7658d49d118fbd9de943) commit 82d7cf5cdcbc5e451a87f8c2f64cd5d2e3627d54 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 9 03:55:13 2009 -0700 XQuartz: In rooted mode, make sure we start in the hidden state. (cherry picked from commit 5ecc497f71c2133f773f6c56ad76cb778862ddd6) commit e86f4e93020d56385418850a9eebae8076dcb9ac Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 6 21:34:14 2009 -0700 XQuartz: Send MotionNotify before button presses when X11 is in the background (cherry picked from commit c80d0ec18ef5b842447d31360406d0b5b9424222) commit 5ccfad8df099e8ebc4bf2dd53c3db1460903b135 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 6 19:21:46 2009 -0700 XQuartz: Revert most of the previous override redirect patch The changes actually caused all windows to move to the current space. Instead, we're going with a fix entirely within Xplugin that depends on quartz-wm being the window-manager for now. (cherry picked from commit 997b6f3142c622541bb5bac98652abae75d1101d) commit ff7f019bbcbc52618cc478db7baed57aa5b7c3d3 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Apr 1 10:53:10 2009 +0200 dix: correctly utilize tracker buffer and protect from timer overruns two small related fixes hard to split up Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 06aebecb19dd9d90d73b742a09b6068b862f1d05 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Apr 8 14:35:01 2009 +0200 dix: fix pointer accelerations remainder handling This didn't really work as intended, but did amazingly well thanks to roundf() hiding the defect. Cheers! Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 98f4179156391752e6688339487458ad7828abf4 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Mar 26 23:04:24 2009 -0700 Use RTLD_DI_SETSIGNAL to catch runtime dynamic loader errors and clean up Based on fix for Sun bug 6813925: Xorg needs to catch ld.so.1 failure so it can close down devices cleanly <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6813925> Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit a0b6a363dca8ce0dc6f4eb79333e48496153cd67 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Mar 9 13:22:57 2009 -0700 Lift fatal signal handlers from DDX'es up to a common DIX implementation Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit fcc19e673e3ef33d64916dd933853f8aa667c4d7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 20:27:00 2009 +1000 mi: fix wrong (*EnqueueEvent) declaration in miPointerScreenFuncRec. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4fee979d0632751d3d54d2115e84e9654edf0622 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:11:27 2009 +1000 Xi: silence compiler warnings about "wrong" event types. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6b467bf879eeb77d167ef321e6dda97ca9d7010a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:42:06 2009 +1000 xfree86: shut up compiler warnings - typecast to InternalEvent Reported-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8a2a184da78a3e9cbeae8290431f40d5ec7f3636 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:06:32 2009 +1000 xfree86: fix use of uninitialized variable in DGAProcessPointerEvent. Reported-by: Eric Anholt <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 011cee3103c146c8096b7098a27993f99e07a824 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:14:39 2009 +1000 dix: fix dev/keybd variable mixup. Reported-by: Eric Anhold <eric@anholt.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 630a6e9d14ffbf036fa72f580c72c0172d7c20bd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 08:40:20 2009 +1000 mi: fix compiler warning - explicitly typecast to InternalEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e3bb7dea06b9ab0e30d801bf6c3a59f94290aaed Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Apr 9 19:07:36 2009 +1000 mi: add prototype for CopyGetMasterEvent. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 346e71525fc545c6ca4ad79425722282d1544459 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Apr 9 09:36:41 2009 +0200 EXA: If the driver can't composite to an a8 mask, try an argb mask for glyphs. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 682d7b55699cacbb2dbcd84a5e816bf6e2d2f02a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 9 02:48:04 2009 -0400 xselinux: Don't BadAlloc in List* requests if there are no items to list. commit 3a0ee199dcec39596756a995996eac388acf6315 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 9 02:26:24 2009 -0400 config: fix crash caused by strdup(NULL) commit 7b3982eb6518da33ab01c2fbf7ceb45b89f841df Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Apr 9 08:21:09 2009 +0200 glx: Test the error value, not its address... commit 03aebed519986c4dd03e02b3b3d4af1f64595ca7 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Apr 8 14:54:30 2009 -0700 Use a #define instead of a magic number The number of buffers is likely to change in the future, so having this as a define is the right way to go. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit 0d9f3ca7eabd4c514808114d30627f682c8bd030 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Apr 8 14:53:46 2009 -0700 Allow GLX sources to build against Mesa 7.4 sources Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit e8b324102f6e21ae2b8292a6f50d016dd6254dd6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Apr 8 15:10:16 2009 -0400 xselinux: Don't require incoming context strings to be null-terminated. commit df27b870a8db7a5153b18a556fe77efa590f9eee Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Apr 7 16:28:08 2009 -0400 Convert remaining GLX LookupIDByType() calls commit 92562747a0fdbef1dbedf734cb55dd6a9e1d2994 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Apr 7 13:58:53 2009 -0400 Add validGlxDrawable() and use dixLookupResourceByType(). Fixes deprecation warnings, and fixes a couple of GLX error codes for failing drawable lookups. commit f70cfc8f90091ef0f5ed0a5b2e023e7fd6369b36 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Apr 2 17:30:19 2009 -0400 Don't stomp on dixLookupDrawable() return value in DoCreateGLXPixmap(). commit 30d81ad72e870cc37754bd8c8aadf605450ec16e Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Apr 2 17:24:12 2009 -0400 Make GLX context lookup use dixLookupResourceByType() commit 66539cc05d0b017b9feb4a038499907810140623 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Mar 26 22:22:32 2009 -0700 Don't leak default font path when appending built-ins Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 6c3b633299f12051fcf37fb8439f358de876cf03 Merge: adf21dba7 0cfd48130 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Apr 7 19:36:27 2009 +1000 Merge branch 'master' into xi2 commit 0cfd48130842685828e0662a27272a3a65facd23 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 23 11:41:16 2009 +1000 dix: Dont change the keyboard mapping on non-keyboard devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 69e73e5ce0e3971eceed71216d2d7e7d9cd57cc2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Apr 6 17:56:49 2009 -0400 config: Remove useless xf86conf{{m,c,re}alloc},free} macros commit 485946120a6522db9298111752de9be3d675e0b3 Author: Adam Jackson <ajax@redhat.com> Date: Mon Apr 6 17:51:35 2009 -0400 config: s/xf86configStrdup/strdup/ commit 5f769b73441cf29c05a05c728ab81bdde1fc00b6 Author: David Jander <david.jander@protonic.nl> Date: Mon Apr 6 13:01:08 2009 -0400 kdrive: Fix segfault in tslib support commit 843166b033dc0544b9f3cf3c91fc3ae3650bda14 Author: Adam Jackson <ajax@redhat.com> Date: Mon Apr 6 11:05:17 2009 -0400 os: signal handlers return void. commit aa6fbc2a3679896181610aee7ce2844d4322a5ce Author: Adam Jackson <ajax@redhat.com> Date: Mon Apr 6 10:58:47 2009 -0400 Remove some OS/2 leftovers. commit 2c03a63ff6855272d587b4972a67f64115a1ce4c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 5 03:20:40 2009 -0700 XQuartz: Use updated Xplugin API to send overide-redirect windows to the current space when they're ordered in This fixes the annoying "using a menu moves me to another space" bug (cherry picked from commit 9e6dab89e08a26d764ba1aeaeb804c3d25c667da) commit 67621f3b39c387b3f7bfc65781051aea51c0b83f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 5 00:06:57 2009 -0700 XQuartz: Send a MotionNotify event for the mouse cursor when activating X11.app Otherwise if X11.app was activated with a mouse click, the location of the even is the last location of the cursor before X11 was deactivated (cherry picked from commit c7457d7b31ddd2ddfd04dd6294bed4532664e1ab) commit e1338d27141125af61634597c5dea880692c4017 Author: Julien Cristau <jcristau@debian.org> Date: Sat Apr 4 23:43:28 2009 +0200 xfree86: Remove unused DEFAULT_UNRESOLVED and DEFAULT_BEST_REFRESH macros commit e25d55ad546905c4921f0a26385bdb9f22038429 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 22:38:00 2009 -0400 Revert accidental Makefile change from previous commit commit 472811dc4ba741ab09db184216878700f4adf745 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 22:27:51 2009 -0400 DPMS: Re-export the various DPMS variables. The drivers might not need them but extmod does. Should move it to builtin though. commit cbb165ab88cb0810268001e84d87671440baf837 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 18:34:45 2009 -0400 os: Remove the useless -x option commit 6574ab092fb80b7731e06ede653b6af92fa7684e Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 18:03:43 2009 -0400 DPMS: Remove the defaultDPMS* variables commit c1cf36ee29e41901ecd382f0258110ebb4a0124e Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 17:51:55 2009 -0400 DPMS: Simplify command line parsing commit 2d0a4fff7985f58c21023cc4757090ee67067593 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 13:44:37 2009 -0400 DPMS: Remove unused DPMSGet() commit d52fddefaeb43f15b677eefbea4a288a9948373b Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 13:33:03 2009 -0400 DPMS: Align the default timeouts with the default screensaver timeout. On a typical LCD, a black screensaver is actually worse for power consumption than a normal screen, because it takes more energy to turn the crystals opaque. Also, the intermediate DPMS states are essentially useless and most monitors alias them to the 'off' state, so we may as well do the same. As a pleasant side effect, this brings the default DPMS timeouts in line with the EnergyStar Program Requirements for Computers: http://www.energystar.gov/index.cfm?c=revisions.computer_spec which state that products must be "shipped with the display's Sleep mode set to activate within 15 minutes of user inactivity". commit 38576dc3ae8ddec2baedd2f7e64abdfc56bedf93 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 11:55:41 2009 -0400 DPMS: Simplify some macro silliness. commit 1c01127a214731a21c4784249a429c74f17bd424 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 11:39:18 2009 -0400 DPMS: Unexport all the various setup variables. The drivers don't need to know any of this. commit a99b0ab918998c9a1b9f8692591b8cb59a12eb9e Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 11:32:00 2009 -0400 DPMS: Fix cast abuse commit 4da347adb1fcc39e8f4fb2cadd98e887d7ac877a Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 11:18:21 2009 -0400 DPMS: Code motion. commit 1731882341c191b4ffd78e0c1fd9297c636e0401 Author: Havoc Pennington <hp@pobox.com> Date: Fri Mar 27 12:30:37 2009 -0400 Set bg pixmap of composite overlay window to None (#20912) Otherwise it's impossible to get the COW without a white flash on the screen, because it's on top, mapped immediately, and unaffected by composite redirection. This makes initial login ugly when it doesn't need to be. commit d2690375dfd994817f004cda133ca2a492c0b956 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 3 11:06:50 2009 -0400 kdrive: s/KdSaveString/strdup/g This isn't even funny anymore. commit 91b697efdefba125348dbcaf584ee51a7f8c9bf6 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Apr 1 17:42:33 2009 -0400 Support setTexBuffer2 in AIGLX. Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined alpha channel for pixmaps. commit 1c101d75d4855b2698e3fc8d2dd662f20585812f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Mar 26 22:25:08 2009 -0700 Don't leak canonical module name and patterns if module is built-in Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9180081ec32b6c655d193de4c89b59d222a72579 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Apr 1 13:45:02 2009 -0700 XQuartz: Still send mouse events while X11 is in the background if we have test extensions enabled (cherry picked from commit f393fb686cfbedb11a1539d4eaf5c491af8b3a64) commit 029307e79a14cad5bde8f1f4a5d0a2f740271f06 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Apr 1 13:07:15 2009 -0700 XQuartz: Return BadRequest when SendPSN isn't implemented rather than success (cherry picked from commit 49871e99179d5176a1ec516c8f449e2dc219faea) commit 0603fbc1d3b2db5c25faabbfb5e04914110b4d0e Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Apr 1 12:46:51 2009 -0700 XQuartz: Pad xAppleDRINotifyEvent to 32bytes to match sizeof(xEvent) (cherry picked from commit 276ee3bb087c772f57a987519aa4d94afeceadaa) commit b1dab580bdfb4acfe3feddeda6e760098ec4922a Author: Tormod Volden <debian.tormod@gmail.com> Date: Wed Apr 1 19:32:21 2009 +0200 xfree86: edid quirk for Philips LCD LP154W01-TLAJ This panel reports its vertical size in cm. X.Org bug#21000 <http://bugs.freedesktop.org/show_bug.cgi?id=21000> Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 7d94414cf4b16501ce4c4291846498f393f150a4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Apr 1 09:42:06 2009 -0400 input: Remove xf86ReloadInputDevs hack We have input hotplug now, no need to fake it. commit 3311ef6ec93df4325d198715e0fce73af19f0781 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Mar 31 18:11:19 2009 -0700 XQuartz: Don't report mouse events while X11 is not the foreground application (cherry picked from commit 5d1dd35096334b59564d77caef7a97bd58845c5d) commit 89887fadc97f6fd5059886396a6d7cf61de1982f Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 31 15:09:57 2009 -0400 APM: Don't carp if not available. commit 2e145989d10ef454581f8aa60358ed3782fd6442 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 30 17:22:28 2009 -0400 dix: Simplify InitClient() commit 252ec504817e05b185e4896a2d899e9c00b8aeef Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 30 15:18:30 2009 -0400 Document which bits of ClientRec are currently unused commit 0b6e14d46feaf8c46fd3768ee5353b844391b79b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Mar 30 20:37:25 2009 -0700 XQuartz: Fix mouse tracking for quake, et. al. in wine Patch courtesy of Codeweavers Fix mouse movement tracking. For a non-window-related mouse-move event, calculate the new position by adding the event's delta-x and delta-y values to the previous mouse position. Do not rely on the current mouse position because it may have been changed by a XWarpPointer call. (cherry picked from commit 7a67935b05a475215b9bdbb959e4f7e15f32416f) commit c74220b853cd99d03e33cc62d32431ca3a879483 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 30 14:56:15 2009 -0400 APM: Use general handlers, not input handlers. Otherwise APM events get treated as input events, which messes up idle time accounting and screensavers and such. Not, we hope, that anyone is using APM anymore. commit 283a081572d8db787c77d09e5ba6bcadebf4f7fe Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 15:56:15 2009 -0400 selinux: Only activate if policy says to be an object manager commit 8e7facfe3013abda12a0c39ad8b4d025618077a7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 15:48:17 2009 -0400 config: Fall back to vesa for Intel Poulsbo. commit 17239c8e3163fef0159835d43c0dde20e78192a1 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 12:44:20 2009 -0400 misprite: Remove private header, fold into misprite.c commit bb89fc2771d2e54d7e0cd0371db68ddb754a64e5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 12:36:42 2009 -0400 misprite: Fix software cursor on multiple ScreenRecs commit 2c000f4980d30015e6da95de3c77c0fdda0090e4 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 11:54:52 2009 -0400 misprite: Do window check first for Get{Image,Spans} too commit 8beced6c02610444105f3d0b8ee3a49e1072096d Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 11:43:33 2009 -0400 misprite: RECT_IN_REGION -> miRectIn commit a232116b9ecd41ce55f8eeee9dfe2b67d76479d6 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 11:41:40 2009 -0400 misprite: Fix a typo commit 1f0eaf886d88f3935e43985d2c889b374f412e43 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 27 11:29:40 2009 -0400 misprite: Fix cast abuse commit e3c1096273446bb7eb993b179ceb989617d149cc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 23 13:20:22 2009 +1000 dix: build_modmap_from_modkeymap needs to bounds-check its argument. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 45baef0b77f6f0e5e6230eca045dfcbb1e48c647 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 23 13:32:32 2009 +1000 dix: return BadValue as error in SetModifierMapping. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 603db34337a61754e0c5f71525011d10eab78411 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 25 15:51:43 2009 +1000 Xext: set POINTER_SCREEN flag in XTestFakeInput if necessary. (RH #490984) The POINTER_SCREEN flag must be set explicitly for XTest core events to avoid out-of-range events when the lastSlave was an SD with an explicit axis range. Device events sent through XTest don't need this flag, they are expected to be in the valuator range of the device anyway. Red Hat Bug 490984 <https://bugzilla.redhat.com/show_bug.cgi?id=490984> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4ab93f05664890ff6738ef1089bcd956ce3f06e9 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 23 15:19:47 2009 -0400 misprite: In SourceValidate, check that it's a Window first It almost never is. However, you have _lots_ of input devices now, and walking them all on every Composite operation is not the cheapest thing in the world. commit d698e62690e0a52fa537f1cd792cab7a5b1bafdf Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Mar 19 21:35:25 2009 +0100 xkb: plug a memory leak in XkbCopySrvLedInfo (#20756) X.Org Bug 20756 <http://bugs.freedesktop.org/show_bug.cgi?id=20756> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e26f79335bb7a9ad34fe9b23c283a214202f89ed Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 17 16:22:00 2009 +1000 xkb: put a few extra checks in against non-keyboards commit 844bb629fe786ecf536039df3f5f4b3b214c9d40 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 19 15:44:34 2009 +1000 dix: remove a truly useless a = (foo) ? bar : bar; statement. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 62183a06e5f72a18abc3d58c4bf5658a20ece217 Author: Tomas Carnecky <tom@dbservice.com> Date: Fri Mar 20 16:19:33 2009 +0100 Remove two unused defines in C files These two defines were defined in C files but not used anywhere: dix/window.c #define DeviceEventMasks (KeyPressMask | [...] os/connection.c #define MAXFD 500 Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4e0d7cc506b661b5e5cedf8be6e17aa4c8075aa8 Author: Tomas Carnecky <tom@dbservice.com> Date: Fri Mar 20 16:19:34 2009 +0100 FID, whatever that was, isn't anymore No traces of FID in the xserver nor in the modules listed in util/modular/xorg.modules Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit adf21dba7617542f08309415e315d4b2699c10e0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 19 20:40:43 2009 +1000 include: un-export a bunch of server-only functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 111ef10375204a6981a5be5c045860854c4da4e6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 19 09:33:02 2009 +1000 dix: move ProcGrabPointer guts into GrabDevice. Yes, this means we have even more arguments to GrabDevice. But it beats having a copy of most but not all of GrabDevice in ProcGrabPointer. Also, reshuffle the order of parameters, the CARD* status is a return value and should be last. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dc153271b6458cacd63a4bc0208594011c6460b0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 18 15:13:00 2009 +1000 Xi: purge old device enter/leave masks. commit 15a969c0fcd4f19f3c560a7037c1a6a58bce51f0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 18 10:21:59 2009 +1000 dix: remove now obsolete mskidx parameter from DeliverEventsToWindow. mskidx would always be dev->id anyway, so if we're already passing in the device, mskidx is superfluous. commit f5409aa026b2cb501170867d04c6e220f3fe0a44 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:51:50 2009 +1000 mi: remove deprecated miPointerAbsoluteCursor Functions that don't specify the device are so last year. commit 46145a9312eaf5dcd0e8b6788ed8219e086f790e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:12:55 2009 +1000 dix: remove coreMods field from GrabRec. Nobody uses it anyway, and it's taking up a whole bit! commit 40e2a61e37109cd9c2ab57954ee40dcf4a062e31 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 16:53:56 2009 +1000 Add Get/SetDeviceFocus handling. commit d9b7343eac1157490442cc0fb3b5b6d7d6e9a705 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 12:56:18 2009 +1000 dix: even if we don't get a XI1 event, continue processing. commit e11dc10f01603b181e224c90d1dd4abe940f2ce7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 10:21:00 2009 +1000 dix: Send HierarchyEvents when devices are added/removed/enabled/disabled. commit 8634e1bcbae9317fc22132f7c9bde1a4a881b9a7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 10:42:05 2009 +1000 dix: send presence events when floating and unfloating SDs commit c9483a53bea1f721d2902ac11467f67317e7de14 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 11 16:20:22 2009 +1000 include: add a few prototypes to silence compiler warnings. commit a4b61cfc78d81de02a71fa6ad8a44a06616f6794 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 11 16:08:24 2009 +1000 dix: un-static FixUpEventFromWindow and deal with focus events too. commit 4cc6a96d7171e567a9bd5a10f552bb953077aafb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 10 16:08:14 2009 +1000 input: add support for RawDeviceEvents. commit a668d91e28d5a3042a8ce0d087474883b046869a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 9 16:36:07 2009 +1000 dix: store the xi2mask on grabs and pass it around as needed. This enables passive and implicit passive grabs for XI2 events, except that we don't have the protocol spec yet to request them. commit 32f338263ff7de1a2e76d570c98f5be979c18d4e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Mar 8 21:32:31 2009 +1000 Xi: Deliver XI2 HierarchyEvents when the hierarchy changes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 97e89a59572a4be6757510a317c142ec1d82e8f8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 6 23:22:00 2009 +1000 Allow XI2 event selection for AllDevices and AllMasterDevices. commit 808a158182b0a3b985385899252c190947b4dbbd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 6 14:45:26 2009 +1000 dix: Enable XI2 delivery for events and focused events. No support for grabbed events yet. commit 87ff1159b497c66554a4036ae619f92d5631f00f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 11 09:01:23 2009 +1000 dix: deliver device enter/leave events. commit 04ed0bcb2530866f7248b412974ecd15f0fbf6ac Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 17:07:55 2009 +1000 xkb: remove Device/Enter leave handling - XI2 enter/leave don't have compat state. commit 3f37923a727d5fc4b1880a53dac1145884ba7140 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 16:12:25 2009 +1000 Xi: send XI2 focus events. commit daf7dd3bfecc9029bdd10c7a4ea5d2c875a89c41 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 11 09:01:12 2009 +1000 dix: Add GetWindowXI2Mask helper commit 8b6a370058ad5a20e0a0e49ec9443daf03775de8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 15:58:07 2009 +1000 Add XI2 masks and XISelectEvent() request handling. XI2 event masks are simply stored in the OtherEventMasks as a separate field. This replaces the XiSelectEvent code. commit 38bba0c1b75b84e8bbdfa7975cf701a9414a3afd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 16:07:33 2009 +1000 Xi: Change ChangeMasterDeviceClasses to new XI2 events. Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that assembles the XI2 wire event for the DeviceChanged event. Re-use this when detaching the last SD. Not quite perfect yet, we still copy the device classes from the slave now rather than from the data we had when the event occured. But it's a start. (We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 181e41511d5772962b8bc998a1940d2a9ba62d5e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 16:14:51 2009 +1000 dix: fix up device enter/leave for XI_Enter/XI_Leave. commit 0befeb36c175b14eac8d5416851f1556af90dd86 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 24 15:27:07 2009 +1000 dix: Add device info to DeviceChangedEvent, and fill in CCCE. We need to fill the info here, as the device may change until we get a chance to process it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b2ba77bac4fc3edab39372dfdc529e745ae74f77 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 5 14:23:47 2009 +1000 dix: add EventToXI2 and GetXI2Type. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dfa2e8e966b699f9d292628119d5a9cbd2dbdf5a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 15:12:32 2009 +1000 Xi: add XIQueryDevice request handling. commit 560c58b53e4e60ebd26e0c66dd00399c438bd619 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 15:17:52 2009 +1000 Xi: name-space and fix XI2 requests All XI2 requests have XI prefixes. Requests affected: ChangeDeviceCursor QueryDevicePointer WarpDevicePointer SetClientPointer GetClientPointer XIChangeDeviceHierarchy. commit 903449615b1a1188955c0287a552aec8ac5b3fbb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 15:03:35 2009 +1000 Xi: add XIQueryVersion request handling. commit 77d51b94bd264be5a8625a2bdd98f2bfb2aa33d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Mar 8 11:47:26 2009 +1000 dix: FixUpEventForWindow needs to handle XI2 events. commit 95ed2ab715fa881d36d508adf4ae5dadd92ae7b2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 11:46:07 2009 +1000 Add XI2_EVENT check. commit 92e0a324b5c738166ed4046cb00fe85ab8aea5a0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 14:15:02 2009 +1000 require inputproto 1.9.99.7 commit 906fe9547957917ac463d646935473ceca10a72b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 20 09:36:09 2009 +1000 Xi: don't allow OpenDevice on any MD. This restores the original behaviour of XI 1. Any slave device may be opened, but none of the MDs. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c7eb27f3927ba9a36f9904938996f346cca33021 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Mar 4 18:45:09 2009 +1000 Xi: always only list VCP/VCK and the SD's in XListInputDevices. If a client wants other MDs, it should use XI2's XQueryDevice() instead. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 801f14d4b742e506201b619d472087a7e82bd018 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 3 17:04:08 2009 +1000 Xi: don't send attachment info down with ListInputDevices. commit 66dd8879b3527f30309fb747cad4a161d0709d91 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 15:01:05 2009 +1000 Xi: purge ExtendedGrabDevice request handling. commit 43e48900fccd245e98d6d697e4cdbb6fa866a0dd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 6 22:27:54 2009 +1000 dix: Force deviced ids of 2 and higher for actual devices. 0 is now reserved for the "AllDevices" virtual device. 1 is now reserved for the "AllMasterDevices" virtual device. This also means that wherever we passed in (mskidx = 0), we now need to pass in the deviceid. commit 70896f6127e2c12c13479a027fdd6e67853d1f8b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 13 16:42:02 2009 +1000 dix: abstract event filters through GetEventFilters. Don't let everyone acces the filters[] array directly. This is necessary once we start dealing with GenericEvents, where the filters are a bit more complicated. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8a8763f1502c9ddd1961f96f2cc7c73fbc0b49b5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 16:07:15 2009 +1000 dix: restructure DeliverEventsToWindow, a little bit anyway. Desperate attempt of making the code easy to read and understand. A failed desparate attempt, possibly. commit 891cfc802028c3e008ee6c2d3e2438a31f57f39f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 10:12:45 2009 +1000 dix: clean up DeliverDeviceEvents. Move mask checking into external function and streamline the code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6b6b660c3633af75a94302725137549df0dbe446 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 10 10:15:45 2009 +1000 Xext: remove ev_fill from GEExtensions. commit 445daa62e720fe58fa2d6c3cdc26663671b2bc48 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 15 17:16:22 2009 +1000 Xext: purge XGE event masks. The masks were originally designed to generically handle event masks for extensions. Since all that is in-server anyway, it's much better writing custom event masks for those extensions that need it and not providing a unified mechanism. XI2 needs more than the current implementation, which is already too complex for most other extensions. good riddance. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6fe4c28bf4f3a9f7c341b9403213470e9ded5cb3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 16 16:34:05 2009 +1000 Add agressive event type checking. Best to FatalError if a wrong event comes in. At least that forces me to fix it really quickly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 836864b65794dc0954a01245e418e714cead8125 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 12:43:17 2009 +1000 xkb: don't overrun the map index when accessing symbols. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 497a12533905b98f388775b6ba49adf21017cc75 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 11:52:33 2009 +1000 dix: remove duplicate PickKeyboard() command. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7d4df0ee4414779ad5e519e7bd297c5dfec409a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 19 20:24:06 2009 +1000 dix: fix device sync state when calling SyncBoth during AllowEvents. This did access the wrong device's sync state, potentially freezing or not thawing the actual device that was supposed to be thawed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f1c7b95d83948160a0d5796ef6c16fc0d1bf5c5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 20 13:55:00 2009 +1000 dix: do percentage check before device check in ProcBell This is just for correctness. The server should return BadValue for anything not in [-100, 100]. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d60391d8ca9918d2089c23c0baef5c91177325f0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 20 14:01:30 2009 +1000 dix: fix uncredible fail in PostSyntheticMotion. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1a71862d333282e2d251ff0036866cec22bcce85 Author: Simon Thum <simon.thum@gmx.de> Date: Sat Feb 28 22:17:47 2009 +0100 dix/xfree86: simplified velocity approximation algorithm Replace multi-stage filtering with simple linear velocity, tracked several instances backwards. A heuristic ensures only approximately linear motion is considered, so velocity remains valid in any case. Numerical stability is much better, and nothing changes to people who didn't tune the advanced features of the previous algorithm. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5ae129baef85b47590c02e4cf61b23904d8f7aa9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 17 15:47:57 2009 +1000 Xi: check for existence of the button class before accessing it Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e8094d8f3f69f45850af031efd79a3928e584638 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 19 10:09:04 2009 +1000 dix: ProcSendEvent shouldn't use inputInfo.keyboard directly. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 12aeddf5ad41902a180f8108623f356642b3e911 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Mar 19 19:07:59 2009 +0100 exa: Accept scratch pixmaps with offscreen memory as such. commit a635bb5357648779815ec6729d55f6b478493213 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Mar 17 19:34:45 2009 +0100 exa: round of fb_pitch to the next byte commit ec328783593339e33772301a8c5fea35fd63c0a2 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Mar 17 10:45:21 2009 +0100 exa: check if the pixmap is pinned for unsupported AUX indices. commit 3992dd38caf33b343affd8d732c94880d1099dcf Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 16 13:24:48 2009 -0400 selinux: Add support for avc_acquire_netlink_fd() Requires libselinux 2.0.79 or newer. Without this, libselinux will check for policy updates on the netlink socket on basically every policy lookup. Statistically speaking, they never happen, and the check translates to at least one more syscall on basically every operation. Instead, take control of the fd from the library, and check it in WakeupHandler if it polls readable. commit be6dc9023b5fb3995a9ce56d607627e247918aef Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:29:36 2009 +1000 xfree86: remove a superfluous assignment. If dev is NULL, we don't have a VCP and that means we have other issues anyway. commit bfab422dcdbb9c009b2a91fe0dba288fac9bc859 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:27:49 2009 +1000 xfixes: useless (void) typecast removal Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4eeaee1e5a05ea973cbeb653abf99f2a352edc70 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:25:12 2009 +1000 xkb: xkbi has a pointer to the device - use this instead of inputInfo.pointer. commit 3f801ba62ac493d4aeb664a5ae638e3fb0c9a262 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:23:50 2009 +1000 xkb: the VCP can post device events, don't stop xkb filtering on it. commit 23686e5680d565c36e0b6320ce62c38c7830d06b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:20:56 2009 +1000 xkb: Fix a mis-use of inputInfo.keyboard. commit c97c6c3de337f247406eaffd5845a847630ee6c1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:17:20 2009 +1000 xkb: fix a couple of device checks when looping through all devices. Generally, we want to apply stuff to the device and to all attached slave devices. commit d21a546e9604ce2d3c914900f6e6ff2df9f5ca8b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 16:02:22 2009 +1000 Xi: VCP and VCK may register for ext. events, so delete them if necessary. commit 6ec49098f7ef259b43870139511006627b308bb6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:57:27 2009 +1000 render: replace a wrong inputInfo.pointer with pDev Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0b2b330f6fbf8633ae682a17fbd95f6b5db2c112 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:54:27 2009 +1000 mi: remove a bunch of useless inputInfo.pointer assignments. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 31301861c1dd87a2f55c5c4300ac7c8f54154bf8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:49:22 2009 +1000 dix: remove wrong InputInfo.pointer usage - should be pDev instead. commit 639658b2eab480a5bfb943dff51e4bdfc1e16e3b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:34:29 2009 +1000 dix: use GetPairedDevice in ProcQueryPointer rather than inputInfo.keyboard. commit f01ee198ff0cbd7ca418217a84248d1c6131a0c6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:22:23 2009 +1000 dix: don't use inputInfo.keyboard to get the focus window in ActivateKbdGrab I'm not sure if that's the right solution, but the other one is wronger. commit de415743f4c1878df2de79f84f5fe087a88d5241 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 15:19:23 2009 +1000 dix: fix XACE checks in ProcWarpPointer commit 18430616cfd5d0bc5a3efe61fcc2982b1726b0de Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 14:59:18 2009 +1000 dix: use PickPointer() and PickKeyboard instead of inputInfo.pointer/keyboard. Affected calls: ProcChangeKeyboardControl ProcBell ProcUngrabKey ProcUngrabButton commit e31727158cda7729283233cfdc9bc5bcb59a52c1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 13 14:51:55 2009 +1000 dix: fix ProcChangePointerControl's wrong inputInfo.pointer usage. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fc5e8dc4a24c2b5bed4e6b5d00670c4401ec92d9 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 13 14:00:37 2009 -0400 Unexport xf86SetPriority commit 89d7b88f32f9227fa72a043675367b94c4c9283c Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Mar 13 00:40:43 2009 +0100 exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPS - exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards. - This is needed to support pixmaps that are not offscreen. commit 544cd9e7b50cd9905afc52404de1a5a2bcff91b5 Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> Date: Thu Mar 5 12:57:28 2009 -0500 Honour Option "DPMS" "off" on xorg.conf Signed-off-by: James Cloos <cloos@jhcloos.com> commit 7abb72c5c711a26a27a82604bd2398bcb6df0a99 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Feb 25 10:55:36 2009 +0100 xfree86: remove obsolete code remove a few lines which redo part of the pointer acceleration init. Properties is the way to go for them. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 97cb3cc28e4a5694d17f156276efd84555a96d18 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 12 10:17:16 2009 +1000 dix: Merge DevicePresence notify events generation into a single function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7f1ba804a1c1aef725e20a04e5f6ef74478ecf44 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Mar 10 11:55:04 2009 +1000 dix: s/numEvents/num_events/ in GetKeyboardValuatorEvents GPE and GProxE use the same. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 067f26f7ba4c8cf37af7ddf0eb204b7e1d06096d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 6 19:42:27 2009 +1000 Xi: set the modifier + group state during POE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit da724e8f1d1867c36c9550a153c58829939800fc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Mar 6 15:50:05 2009 +1000 Xi: Set the button state on the event during POE. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b368dd1720c708aaec492b4a67fb7e4f87569c11 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Mar 5 15:22:41 2009 +1000 dix: remove a few pointless (void) casts of return values. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cadf65a6e190a8952ad3cc216dc9ea55241de91a Author: Matthias Hopf <mhopf@suse.de> Date: Tue Mar 10 15:49:49 2009 +0100 randr: Nuke broken set_origin shortcut Shortcut is impossible to implement this way, because we don't know for sure whether the crtc of an output has changed or not. commit 6544490700051b3b5e88ac1890d71b35634c9100 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 9 17:28:40 2009 -0400 Correct access mode in call to dixLookupWindow() within RRSelectInput. Reported by Alan Coopersmith. commit f8dd80d13bb5313a11b38b280f8ad3e22f0a6300 Author: Keith Packard <keithp@keithp.com> Date: Wed Aug 6 15:26:24 2008 -0700 Replace dixLookupResource by dixLookupResourceBy{Type,Class} dixLookupResource attempted to automatically detect whether the caller wanted a lookup by-type or by-class, unfortunately, it guessed wrong for RT_NONE. Instead of trying to make the guess better, this patch just reverts the unification and creates separate functions for each operation. commit 0d9a42dc0380d1583889b6b6521bd5a2451735d4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Mar 9 08:59:01 2009 +1000 Xi: don't crash on a NULL property name, just return None. strcmp doesn't like NULL-pointers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 432a95032eb10f82fb59caa29e52d3f56dfb363c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Mar 8 21:34:02 2009 +1000 Remove useless (void) typecasts. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f508446a2bcd887df9cf5db786b15fc3cbc435a0 Author: Peter Åstrand <astrand@cendio.se> Date: Fri Mar 6 19:41:35 2009 -0800 Composite: Uninitialized borderClipX/borderClipY Valgrind warned me about two other uninitialized variables, which are not padding. Valgrind output at the end. I'm a bit unsure of what these should be initialized to, is zero fine? commit d1338a94805cc774fe0a5d00c2225a3ee9673a9f Author: Winfried Grünewald <winfried.gruenewald.ext@eizo-dt.de> Date: Fri Mar 6 12:59:35 2009 -0500 [hw/xfree86] Fix StaticGray cmap. Fix this bug report: ,----< from http://bugzilla.freedesktop.org/show_bug.cgi?id=20504 > | Using the Visual StaticGray (8 bit depth) is missing one gray level. | The gray level of index zero and index one are the same and all | other levels are shifted by one. The max level (255) cannot be used. `---- Signed-off-by: James Cloos <cloos@jhcloos.com> commit eba3bab71ff26d58bb0e49e4a9726fc21ff07258 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Mar 5 15:09:28 2009 -0800 Remove #ifdef macII code left over from ancient A/UX 3.0 support Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit daa9727a02701cfac7b92f3e61d752be6fcc005e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Mar 4 11:33:00 2009 -0800 XQuartz: Implement SendPSN for AppleWM (cherry picked from commit 779e9fdc2de9bfebc5f0a4c9d5f42e389fdd8593) commit ce6e1771be5f2c21af6f72a9705795df26210413 Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Mar 2 17:05:28 2009 +0100 exa: fix a serious issue in exaChangeWindowAttributes (and some more related things) - fbChangeWindowAttributes can create pixmaps (and access them) without use preparing access. - Also handle the destroyed pixmaps by finishing them first. - Switch to DEST indices again in exaCreatePixmapWithPrepare, because they are obviously being rendered to. - Also avoid calling FinishAccess on pixmaps that are destroyed (and their memory potentially invalid). commit 7fb68e8b31d259325ce311ad67befc43a933f009 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Feb 28 22:29:42 2009 +0100 exa: remove a few pExaPixmap checks. - And make some fatal for a debug build. commit bd2f35ef0d4b8c56eb205b8694b4fe5d2fa2c049 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Feb 28 22:15:04 2009 +0100 exa: fix unwrapping of ModifyPixmapHeader upon CloseScreen. - Cleanup wrapping too. commit da8ea41a542787691ea1120e5c8c7dc3182cbea5 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Feb 28 21:59:09 2009 +0100 exa: increase/rework safety checks in Prepare/FinishAccess. commit 3ea3d505e8128ab3e878edcef697fd5656b0c917 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Mar 1 01:15:28 2009 +0100 exa: avoid a potential Prepare/FinishAccess inbalance. commit 10334cf7e64e2e633cd507f2aa216027e840c8e5 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Feb 28 21:46:00 2009 +0100 exa: simplify exaPixmapIsOffscreen - This includes properly handling the framebuffer. commit 57bed76e218471b60d340b18c346d492f37798c2 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Mar 4 10:29:34 2009 -0500 Remove dead EXTENSION_PROC_ARGS define Signed-off-by: Tomas Carnecky <tom@dbservice.com> commit a6fb9f4ccfc69dc090b152e29142e3159f812166 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Mar 4 10:27:30 2009 -0500 Remove dead XTest code from extmod Signed-off-by: Tomas Carnecky <tom@dbservice.com> commit c4081fee0995dae691665a00ea9bfdb8b8043b8c Author: Topi Kanerva <topi.kanerva@nokia.com> Date: Wed Mar 4 10:23:10 2009 -0500 Make DGA optional. commit c7ebb4bef152b47880abb6ea4819416e89e6522c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 3 14:02:36 2009 -0500 Fix 2 const warnings. commit c7cf926d25523d5d0d8e5c83671c901660070d71 Author: Eric Paris <eparis@redhat.com> Date: Tue Mar 3 13:15:39 2009 -0500 This patch changes all places in the X code to use _raw functions. The X server should never see, translate, or deal with a munged context. Display managers which show contexts to the user should take care of translating these to human readable form. commit d84a2f855da9fd293e984084168c1e27f5a5115c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Mar 1 16:59:14 2009 +1000 xfree86: Add linebreak to two debug statements. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e0ed9f16d0ab871f3209837f54055446503c4108 Author: Jason Vas Dias <jason.vas.dias@gmail.com> Date: Tue Mar 3 13:24:54 2009 +1000 Fix build with --enable-debug. [amended by Peter Hutterer] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6093d3eb1d7d1e9cbacc2c2f4d376352f787dd53 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 26 15:38:45 2009 +1000 dix: fix two compiler warnings (old-style function definition). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b874a5c0aafc766891c9e567af48b891ea14be4f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 26 14:40:22 2009 +1000 mi: only print the "EQ overflowing" error once. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a706dd8771f87cf0a73578755552124d162baa5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 26 10:04:14 2009 +1000 include: add a range of button labels. Mostly the same buttons as defined by linux/input.h, with five exceptions: "Button Unknown" for a button that cannot be labelled. "Button Wheel Up", "Button Wheel Down" for buttons 4/5, traditionally the wheel buttons. "Button Horiz Wheel Up", "Button Horiz Wheel Down" for buttons 6/7, traditionally the horiz. wheel buttons. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 8a6ed44a8b2fc5f14729dc54fec17607ced03859 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 2 14:26:23 2009 -0500 randr: Fix thinko in xf86TargetPreferred The only-one-output case would only work right if that also happened to be the zeroth output. Oops. commit 7bfad37f7706da5a76174c0da78dce4d6c6a585b Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Feb 27 22:26:52 2009 +0100 exa: fixup aux indices and ensure that the indices are used as they should be. - In a previous patch i forgot to add a FALSE somewhere it seems. - Rename AUX indices so the driver (think of driver managed pixmaps) can do optimisations based upon them. - Fix one abuse of DEST index now that we have the AUX indices (same reason as above). commit 8c6b4a827624aa70aea94b449fee6d5df8504105 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 27 12:42:43 2009 -0500 DDC: Redo extended device probe slightly. We'll now only mention the E-EDID segment register if the device is actually E-EDID-capable. While we're here, check for DDC/CI and standard EEPROM support too. commit b030f858f2f1ce1fd27a73ebf7f9ec5db541a668 Author: Adam Jackson <ajax@redhat.com> Date: Sat Feb 21 19:56:20 2009 -0500 selinux: Don't bother relabeling resources that are being destroyed Makes window destroy about 40x faster in Xvfb. commit f028b14876dc536b575d4b6e1df7f37ee525acec Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Feb 27 13:06:28 2009 +0100 exa: whitespace commit ed00515ec54b294f304b8ae2857e3073f97860d2 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Feb 26 22:18:03 2009 +0100 exa: fixup exaAssertNotDirty. - Do the right thing based on prepare access. commit 2e88b6004f09dbcb888abf05d4d5554231b2bd1a Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Feb 26 21:14:23 2009 +0100 exa: minor glyphs cleanup. - This should fix subtle coordinate bugs and make the code a bit cleaner to read. commit 265d20068af5434489752b6dba0bf0065b3cc3ec Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 27 16:41:39 2009 +0100 EXA: Fix check for whether the glyph we're evicting from the cache is in use. Since commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 ('EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs.') we were checking the wrong set of coordinates in the buffer where glyphs to be rendered are accumulated when no mask is used in exaGlyphs. This fixes occasional glyph corruption which can be corrected with redraws, in particular with Qt4. Thanks to Maarten Maathuis for asking the right question: 'where do we protect against evicting glyphs that are still needed?' Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 9d5141f7bcfed36417873b47f850332506af83ac Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 27 16:37:28 2009 +0100 EXA: No longer use the driver UploadToScratch hook. See http://bugs.freedesktop.org/show_bug.cgi?id=20213 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 4cfb36f6ad2df01215028fec48d99239a0e4496b Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 27 16:37:28 2009 +0100 EXA: Handle separate alpha maps properly in Composite fallback, take two. Preserve the EXA ABI by introducing a new driver flag EXA_SUPPORTS_PREPARE_AUX. If the driver doesn't set this flag, we have to assume any Prepare/FinishAccess driver hooks can't handle the EXA_PREPARE_AUX* indices, so we move out such pixmaps at PrepareAccess time. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 4bf707f01822abe99286909fd561da7e7a4211d6 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 27 16:37:27 2009 +0100 Revert "Fix up Xephyr build for recent EXA changes." This reverts commit 4e8d98b61e1f763c187e7994c683b543cca1a33c. commit de022f8e634baf5a7acd186934b370647df58355 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 27 16:37:27 2009 +0100 Revert "EXA: Handle separate alpha maps properly in Composite fallback." This reverts commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5. Conflicts: exa/exa_render.c commit d0dd649035fc3698c5b436f9d9d248116aa106a3 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Feb 12 16:03:16 2009 +0000 Remove references to rgb.txt from files section of Xserver and Xorg man pages The references to this file in the server code were removed in commit dda10c9066a660b647384179f82e1da8e063264f Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b0ad9e1ced9619f37acf77764c395c57b86cf463 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Thu Feb 12 16:02:17 2009 +0000 Remove long-gone '-co' option from Xserver man page The '-co' option was removed in commit dda10c9066a660b647384179f82e1da8e063264f Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7907b37d96dc81f333351a6fedd6a9f4e31ae66a Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Feb 26 21:22:48 2009 -0800 XQuartz: Don't erase the mode_switch+keysym if it's the same as shift+keysym (cherry picked from commit 3e2427e6e9675dd655c8ad328b82e12191b064f2) commit f07f18231a921d3ae9dd9b75881c9e58e9e2e235 Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Feb 26 10:35:44 2009 +0100 EXA: Allow using exaCompositeRects also when we can't use a mask in exaGlyphs. This should give the full benefits of the glyph cache even when we can't use a mask. This also means we no longer need to scan the glyphs to see if they overlap, we can just use a mask or not as the client asks. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit b26c136ee9bf7015c583136af53d0c9e9da67ace Author: Michel Dänzer <daenzer@vmware.com> Date: Thu Feb 26 10:35:44 2009 +0100 EXA: Stop tracking damage for pixmaps subject to ModifyPixmapHeader. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 812e8d681a49b33d8748983843799ef692b8b148 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 25 11:08:01 2009 -0800 Oops. 62fc98c had crtc offsets applied backwards (fix from server-1.6-branch) Crtc offsets are in screen space, not crtc space, and hence should be applied relative to the screen->crtc transform, not the crtc->transform. This fix was found in the 'cherry pick' of 62fc98c on server-1.6-branch, clearly some new definition of 'cherry pick' that I am unaware of. Signed-off-by: Keith Packard <keithp@keithp.com> commit c090f5514d28e1602a6ebbe7c909e98a0e3374d7 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 25 10:14:36 2009 -0800 Pre-clip panning coordinates to keep crtc within panning region There is a separate panning region check, but that doesn't work under transformation, so just pre-clip the mouse coordinates when computing the panning offsets. This leaves the case where panning constants are changing unresolved. Signed-off-by: Keith Packard <keithp@keithp.com> commit 77c7a64e8885696665556c9fbcb3cffb552e367a Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 25 10:12:23 2009 -0800 RandR rotations and reflections offset by one pixel The matrix computation for rotation and reflection resulted in dropping a row or column of pixels as the offsets used in the matrix computations used width and height rather than width-1 and height-1. Signed-off-by: Keith Packard <keithp@keithp.com> commit 4e8d98b61e1f763c187e7994c683b543cca1a33c Author: Michel Dänzer <daenzer@vmware.com> Date: Wed Feb 25 10:26:04 2009 +0100 Fix up Xephyr build for recent EXA changes. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit d6976e1436c035b8e4a6d1e10971b083b1b4184b Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Feb 24 23:12:57 2009 -0800 XQuartz: Re-enable support for capslock (cherry picked from commit 4901b8147e593d26d7a31a9b73a201254b948916) commit 4b63f88b0ad5f6614fee5b7af4f97ce4581ab935 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Feb 24 18:54:16 2009 -0800 XQuartz: Comment out the background pointer interaction that seems to be causing CPU spinning on some configurations (cherry picked from commit 1d479fa4f3bca9cbd81808a6c87582422fd2a257) commit 5672e2d66444be74125c71b81373b82f8e1b7dd2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 14:55:51 2009 +1000 Xi: remove AllExtensionVersions. Keeping an AllExtensionVersions array to save all versions of all extension is rather pointless if only one extension uses it. Rename to XIVersion, reduce to a single struct. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 59bc615ed2e60c595887dcc11fe04935b49bcaff Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 24 15:26:20 2009 +1000 dix: set the valuator mode in set_valuators We only have per-device mode for now anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cffa3c499a0495e132557bd6b08a8c0b858cdf3b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 24 15:25:49 2009 +1000 dix: remove unused variable 'tmp' Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8d6dd83a38020080808705a156d32ec2a135633c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 20 13:13:58 2009 +1000 include: fix indentation for lastSlave/master. Yeah! Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b3412adca8b2ba3fff348bceb4f01b9e968c0afc Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 22 20:53:46 2009 +1000 Xi: don't need to set the XKB settings for new core devices. This is done by the XKB code these days anyway, so we might as well ignore it and keep using the stanard stuff. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a180c2367974abe2ccdc88bb5c6f138c7df4d2e9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 16:38:41 2009 +1000 dix: remove ConvertBackToXI. This was a temporary solution for the internal-events rework and is not needed anymore. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 26cf709e712573548990d165e71137f28271a8bb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 23 22:39:08 2009 +1000 Doxygenify events.h and eventconvert.c Should have done that before pushing, but oh well. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 170cf1270dff38d3cce7f5ba5b940d1c0d70eff5 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Feb 24 09:22:09 2009 +0100 EXA: Handle separate alpha maps properly in Composite fallback. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=18710 . As this can't work without new EXA_PREPARE_AUX* indices, this requires a major version bump, so we can also drop the UploadToScratch driver hook and ExaOffscreenSwap*(). So this also fixes http://bugs.freedesktop.org/show_bug.cgi?id=20213 . Moreover, introduce EXA_DRIVER_KNOWN_MAJOR to break compilation of drivers which may not be able to handle EXA_PREPARE_AUX*, giving instructions how to make them build again in the #error message. Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit d3b355875ac46104a174966e1974e6af99e40fd6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 24 11:14:14 2009 +1000 dix: fix wrong condition for setting valuators on the event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ef320bdd5ec3419abba77041d3a4d96a3ff87563 Author: Michel Dänzer <daenzer@vmware.com> Date: Mon Feb 23 16:49:51 2009 +0100 DRI1: Make DRICreateDrawable return TRUE for pixmaps. GLX_EXT_texture_from_pixmap was broken since commit a26c77ff432d2e85a2665fc36fca25143460c476 ('glx: fix retval checks when failures occur for drawable creation.') Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 1df6716281579e2937743d840ab1079343c503ac Author: Adam Tkac <vonsch@gmail.com> Date: Mon Feb 23 09:28:26 2009 +1000 xfree86: don't try to UnInit virtual devices in DIDR. (#20087) DeleteInputDeviceRequest function doesn't handle "virtual" devices well. TightVNC libvnc.so module to X (which makes bare Xorg VNC capable) uses such kind of devices. Bare Xvnc (it is something like Xvfb) simply uses AddInputDevice & RegisterDevice functions. Xvnc uses DeleteInputDeviceRequest from Xi/stubs.c so everything works fine (now I see that DeleteInputDeviceRequest in Xi/stubs.c should call RemoveDevice function, shouldn't it? :) ) Situation is quite different when you use libvnc.so module. It uses same schema as Xvnc, so it simply calls AddInputDevice & RegisterDevice. Thus device is created correctly. When server is terminated it calls DeleteInputDeviceRequest (now from hw/xfree86/common/xf86Xinput.c) for each device. Here is the difference - Xvnc calls DeleteInputDeviceRequest from Xi/stubs.c as I wrote above. Thus Xorg gets sigsegv because "VNC" devices don't have real input driver. X.Org Bug 20087 <http://bugs.freedesktop.org/show_bug.cgi?id=20087> [This isn't really a fix (libVNC should behave correctly) but not crashing the server sounds like an improvement.] Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a50c40be1f28467bcef7dc71fab54ebdddacffdf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Feb 21 08:09:40 2009 +1000 dix: don't apply button mappings to SDs, or the device's MD. (#20122) Only ever change the button map on the device we actually care about, not the attached SDs, not the current MD of the device. X.Org Bug 20122 <http://bugs.freedesktop.org/show_bug.cgi?id=20122> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 36583a49965c0bb40a84284939b1539b3cb9fc9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Feb 10 12:45:49 2009 +1000 mi: split EQ popping and event processing into two functions. mieqProcessInputEvents() - pop an event off the EQ and pass it to mieqProcessDeviceEvent() - process the event according to the MD/SD hierarchy. This way, we can use mieqPDE() from Xtest, xkb, and others to post an event. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 47f136ed6fd80310f715a2555501d1b271dd084c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 6 12:08:43 2009 +1000 mi: change custom handlers to internal events This should re-enable DGA, but XQuartz needs to be changed to internal events too now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bdc262701a37a0c12ead810d63fa99a26cbb82ec Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 22:39:37 2009 +1000 dix: remove un-used getValuatorEvents and countValuatorEvents from getevents.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 763848d3ab84b4e33a0254120c44b5a1877c819d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 17:20:17 2009 +1000 Input: change processing API to InternalEvents. Don't pass xEvent* and count through to processing, pass a single InternalEvent. Custom handlers are disabled for the time being. And for extra fun, XKB's pointer motion emulation is disabled. But stick an error in there so that we get reminded should we forget about it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0b4066c116e07918a13dc6b4159df7ac9eb92b4b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 17:18:16 2009 +1000 xkb: _XkbFilterRedirectKey needs to pass InternalEvents down. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 085d50360863ccc8280cd3eccea2bcb4f3dd9a14 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 16:56:52 2009 +1000 dix: Fix PostSyntheticMotion to use a DeviceEvent for posting. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 155986a93dc78d6aa060ca3038d5fafa3d8753c2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 16:06:15 2009 +1000 dix: CheckPassiveGrabsOnWindow moved to internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1c38abd4b136301008ba77d4e68aea34508f4c22 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 14:54:34 2009 +1000 dix: switch DeliverGrabbedEvent to internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit fb858774b80eb75c2f8e81fe893bbbdd37065fbd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 14:44:13 2009 +1000 dix: switch DeliverDeviceEvents to internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3aa9404fcd161e94a80b057a77ef47afe428a56d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 14:00:41 2009 +1000 dix: switch DeliverFocusedEvent to internal events. And because of xfree() macro hilarity, rename "pointer" to "ptr". Oh, how we laughed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8c873e7f514844d1056f2b20e653f1dd75f4c327 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 1 20:41:16 2009 +1000 dix: Switch DeliverGrabbedEvents to use internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a3718536989fa7d3358e0b2d859c25fde0a2d93e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 1 20:18:33 2009 +1000 dix: Deliver{Grabbed|Focused|Device}Events API changed to InternalEvents. With the API change, we can now purge the XI conversion from POE. Note: this commit breaks DGA even more. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8f94ec6f788565474931cc7d5e3d4672f0f31670 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 1 09:58:15 2009 +1000 dix: convert passive grabs to use internal events. deviceGrab.sync.event is now an internal event, and CheckDeviceGrabs and friends is changed over. Note that this currently breaks some frozen grabs. See towards the end of ComputeFreezes(). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit daa3245c479b19d445a070b5b76ee005915b5335 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Jan 31 08:46:43 2009 +1000 dix: fix EnqueueEvent to work with internal events. Note that we're only partially switched to internal events. The event in the devices' event queue (dev->deviceGrab.sync.event) is still an XI event. The events in syncEvents are InternalEvents only now. This also implies fixing CheckVirtualMotion to work with internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 75595ba4aa9c3823ffe3b3388ce088929824816f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 15:14:46 2009 +1000 Xi: make ProcessOtherEvents more InternalEvent aware. Get rid of the deviceValuator processing and a few other things, but still drop back into XI before checking device grabs or doing anything else. NoticeEventTime now needs to take InternalEvents, and while we're at it, change NoticeTime from a macro to a function. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3a02e538dbdb3cd482e01baeaf2aba2ddb7731df Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 14:59:22 2009 +1000 dix: update CheckMotion to deal with DeviceEvents. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8829d966a6bacb05d322b60531c59366b58f4514 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 13:33:55 2009 +1000 Xi: support InternalEvents in UpdateDeviceState, parts of POE and EnqueueEvent Note that this breaks DGA. Life is tough. EnqueueEvent is a somewhat half-baked solution, we immediately drop back into XI and store them. But it should in theory work. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Don't let the dcce be random data. commit 007e93c869325cafcc29d975b356dbb8e7cd2ac1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 14:35:22 2009 +1000 xkb: Switch the xkb event processing path over to InternalEvents. Before dropping down into the DIX, convert back into XI events. This is a temporary solution only, until the DIX is capable of handling InternalEvents anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 64ea6078105f73d1b727619fc123920bc7e4a06c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 14:15:52 2009 +1000 dix: change eventconvert to always return an array of xEvents Just alloc the memory on demand rather than doing things with EventListPtrs etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4026c63e4eb16481bafc1a41ad67cd2556728d40 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 14:34:02 2009 +1000 mi: switch the EQ to contain InternalEvents only. This gets rid of the nevents parameter, InternalEvents are always a single item per event. Also remove the special DeviceValuator handling in both enqueueing and dequeueing. Custom callback handlers are now broken until fixed. For bisectability, we copy the InternalEvent back into the XI required during POE and friends. Consider this a temporary solution. Note: Because of misc linker bonghits, Xvfb won't link in this revision. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5a827593f9517fd5593751dd8bd90c611de06c5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 29 15:26:57 2009 +1000 dix: switch event generation to InternalEvents. GPE, GKVE, GProxE generate InternalEvents now. DeviceClassesChangedEvents generates an InternalEvent now, but incomplete! We need to tack on the information about the new SD in the ClassesChanged events. Note: To make the progress bisectable, we drop back into XI events at the end of the Get*Events functions. So the rest of the server still uses XI events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 00b03683d0e5cda40fa23b9fe6a83d7227f86f5d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 14:31:08 2009 +1000 dix: Add temporary conversion function ConvertBackToXI. Until the InternalEvents are used throughout the server, we can use this one to drop us back into XI la-la land where every event is the wire format. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 269d4d9f2e86fde8c6a28ef0293fb0e44b577886 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 1 09:57:27 2009 +1000 dix: add GetCoreType and GetXIType. Convert from an InternalEvent type to the matching core/XI type. Currently only for a few events, those we actually need in the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 656491921e17b2371057041f4551ad6165067551 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jan 28 15:27:38 2009 +1000 dix: add InternalEvent -> core/xi event conversion routines. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e7867d12541ef9683d5d7fc766e918c13a742981 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 23 15:37:23 2009 +1100 include: add XInternalEvent. This is the event we want to feed into the EQ and process on the way through. Only applies for input events for now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 10dcf3ed9c543a6811340567e586ec0e476fcf61 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Fri Feb 20 15:22:35 2009 +0000 Cygwin/X: Fix keyboard layout mapping for Latin American keyboards Fix keyboard layout mapping table entry for Windows keyboard layout 0x80a (Latin American), layout should (now) be 'latam', not 'la' which is Laos Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 9531b96470a2fd812eb3fa0d1e10419331842496 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Feb 22 00:41:52 2009 -0800 XQuartz: DefineInitialRootWindow is gone commit c7c50157b5137a147e69abb70b43a28fac4a9ffa Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Feb 22 00:29:48 2009 -0800 XQuartz: quartzKeyboard compile fixes for recent XKB Changes Seems we're less divorced from XKB than we'd like for now... hopefully not having any rules installed will still let us override things the way we want to... commit 61abf3189f3f97ec5228d45c035dbfd0c249f844 Author: George Staplin <gstaplin@apple.com> Date: Sat Feb 21 22:33:10 2009 -0700 XQuartz: GL: Change from xalloc to xcalloc to potentially avoid uninitialized data in the __GLXAquaContext. (cherry picked from commit d3120241f9f48d21f9a6ecfb848434a4a0270855) commit 5587f9b771f5b5427a81d4d657f403667d20f310 Author: George Staplin <gstaplin@apple.com> Date: Sat Feb 21 22:22:52 2009 -0700 XQuartz: GL: Fix a bug with an uninitialized GLX data structure. This was causing a crash randomly, due to random memory contents. Use xcalloc to prevent this in the future, due to future changes or mistakes. Set the drawableType to include GLX_PIXMAP_BIT and GLX_PBUFFER_BIT. The new libGL supports these. Set the max Pbuffer width/height, based on the results of a test program. We may someday want to revisit this depending on what users need, so that we create a CGLContextObj, make it current, and call glGetIntegerv to gather the information at runtime. (cherry picked from commit c7e338330943e0d03a99328c740540d03f018d20) commit ab61033700b5383a7a15370dd054eaa80e72e811 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Feb 19 13:57:28 2009 -0800 Add Extensions section to xorg.conf man page Extensions section was added in X11R6.8.0 and documented in the release notes: http://www.x.org/archive/X11R6.8.0/doc/RELNOTES2.html#3 but never made it into the man page. Also fix a bonus typo. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit 372977354c3a09ca77ca13ba0aec00a61046f60d Author: George Staplin <gstaplin@apple.com> Date: Wed Feb 18 21:43:19 2009 -0700 XQuartz: Fix the new ProcAppleDRIDestroyPixmap code REQUEST_SIZE_MATCH. It had a copy and paste mistake that I didn't notice. :/ It was using the CreatePixmapReq. Also add a missing B16 to the end of the length for the DestroyPixmapReq struct. Now the AppleDRIDestroyPixmap request seem to work. (cherry picked from commit 295fe25bd8fa2d141291a9d9b6ef7b75fcccb4dd) commit 225853d51d1fb610261ab0c295b1b5a96ce177d5 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Thu Feb 19 06:45:05 2009 -0800 xkb: Use cached XKB keymap when rules haven't changed Rather than compiling a new keymap every time InitKeyboardDeviceStruct is called, cache the previous keymap and reuse it if the rules have not changed. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 64e595d12e05c4df56b0230cc57924b9beb274d3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 19 09:18:53 2009 +1000 dix: check if keybd->key is valid before getting the keyboard state. For floating SDs, GetPairedDevice() returns the SD itself, hence keybd->key may be NULL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e0a451eb7cc812f11db3614b730ba0f07d6ae18c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Feb 17 19:37:22 2009 -0800 Obsolete InputDevices keyword in xorg.conf Files section Was only used to provide a list of input devices that XF86-Misc could use, now that XF86-Misc is gone, was parsed and logged, then completely ignored. (Depends on previous patch that introduces OBSOLETE_TOKEN in parser to make obsolete keywords like InputDevices & RgbPath be non-fatal errors.) Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Adam Jackson <ajax@redhat.com> commit d2cf562bbad553d7f09b70202134f5b6ada0114e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Feb 17 18:48:52 2009 -0800 Make RgbPath keyword in xorg.conf a non-fatal error Xorg shouldn't refuse to run just because the user has an xorg.conf that had the previously-used RgbPath keyword in it. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 344b1f2b25d627bdf7d802c5831b6a72d22ffe34 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Feb 17 23:25:14 2009 -0800 configure.ac: Support version strings like W.X.Y.Z-XXXXXX (cherry picked from commit 43967514cd57ad836d7fb85c8c9e58ada07e0232) commit 67faf41b3f3e0cd66e35e3c176a9adb37ff1a759 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Feb 17 23:24:25 2009 -0800 XQuartz: Don't need GlxSetVisualConfig any more Fixes build failure resulting from 516f8e2cad1311a09764e2633644188d1e3c31bb (cherry picked from commit 066b17028a35956a089815716e38571f305469c5) commit b349a764e98f0d8f221190157ffa0904b91beca5 Author: Eric Anholt <eric@anholt.net> Date: Tue Feb 17 09:59:17 2009 -0800 xinerama: Put the proto version in the code instead using proto headers. Proto headers updating resulting in the server advertising new versions is broken. This should be applied to every extension. This fixes the build against slightly-older xineramaproto. commit 5394b7e66224d20888dd4020f5cb8ca930720fb4 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 6 06:34:35 2009 +0100 Eliminate the shadow clear on transform change When the crtc transformation changes, the entire crtc must be repainted. This was being done by clearing the shadow and then painting the rectangle containing the screen image; the clear being required as the screen image may not fill the crtc. When changing the transform rapidly, this leads to flashing. Eliminate the clear by painting the entire crtc instead of just the screen rectangle. Signed-off-by: Keith Packard <keithp@keithp.com> commit 76f18b94bd2719a8199334742d021c4d0806187d Author: Keith Packard <keithp@keithp.com> Date: Mon Feb 9 13:09:11 2009 +0100 Add XkbDir to Files config file section The XKB base directory was not configuable through the config file. Signed-off-by: Keith Packard <keithp@keithp.com> commit 123093996507c4d3b6dc457240ce00f8ac42f410 Author: Adam Jackson <ajax@redhat.com> Date: Tue Feb 17 12:59:16 2009 -0500 RANDR: Fail softly on GetPanning if the screen can't do it. Just return a zeroed-out reply in that case. This is unambiguous, and distinguishes "you didn't name a CRTC" from "you named a CRTC that can't do panning". commit b2ceea3635ec05dca9d4aa2f823b96ae9fce7fe8 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Feb 17 19:40:59 2009 +0100 Revert "exa: the extent of the valid region is probably much larger than that of the pending damage." This reverts commit 97c1cbc70216366e92b9371de608ce94e60aa874. - Sorry for the thinko, pending damage is often not fragmentated. - Should the dst region become fragmentated, you actually want to copy more to unfragmentate it. commit 3175646b10c602d17d5dd37bdace7c1c7ee92b3d Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Feb 17 19:06:35 2009 +0100 exa: exaPixmapDirty should use official damage functions. - Otherwise other users will not be notified of damage. commit 97c1cbc70216366e92b9371de608ce94e60aa874 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Feb 17 19:01:44 2009 +0100 exa: the extent of the valid region is probably much larger than that of the pending damage. - Since the default has been changed from nothing to everything. commit 4039603413f9f46d7f725463a70b4a51838e0049 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Tue Feb 17 08:27:32 2009 -0800 glx: Inialize best_score before calculating visual scores This bug was pointed out by Peter Åstrand. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> commit bac13e54b164ceff7b921a2d17c4a198b42aeccf Author: George Staplin <gstaplin@apple.com> Date: Mon Feb 16 17:33:19 2009 -0700 XQuartz: Add driWrap.h that I missed in the last commit. This should complete the GLXPixmap commits for now. (cherry picked from commit 7e99b55651bf7f6275bb227d02f203fb885a67a2) commit 95052caa2c8a79981cdc7936888a8a47e09415e0 Author: George Staplin <gstaplin@apple.com> Date: Mon Feb 16 17:22:18 2009 -0700 XQuartz: Add support for GLXPixmaps to the AppleDRI. This involved wrapping some GCOps to get the proper behavior when using X11 raster ops mixed with OpenGL (see driWrap.c). This extends the AppleDRI protocol with create and destroy pixmap functions. The dri.c code has been extended quite a bit to enable this, and to initialize the wrapping of CreateGC for GCOps. This has been tested with tests/glxpixmap and proven to work with the new libGL. Existing applications seem to work fine too. Redraws all appear to be correct. There may be some bugs lurking that I haven't found yet. I plan to drive them out by extending the libGL test suite. (cherry picked from commit 630518766b01022c49fe3a9e7d501808f71b06e2) commit 970725d23e83285d41e3f7cab678a825d9cc25cf Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 16 18:44:00 2009 -0500 kdrive: Nuke dead AGP and VGA code. (#19921) commit a932744d983845f81791045cf0dfb6a359790158 Author: Chris Ball <cjb@laptop.org> Date: Mon Feb 16 18:27:26 2009 -0500 Build fix, remove export of pciBusAddrToHostAddr a9d7d659.. (PCI: Remove pciBusAddrToHostAddr and associated nonsense) removes pciBusAddrToHostAddr(), but not its prototype, resulting in: ./.libs/libxorg.a(sdksyms.o):(.data.rel+0xe64): undefined reference to `pciBusAddrToHostAddr' Signed-off-by: Chris Ball <cjb@laptop.org> commit ab331aa76f0bc6a85a519b2deaafa4ce8a070c53 Author: Julien Cristau <jcristau@debian.org> Date: Mon Feb 16 21:56:03 2009 +0100 xfree86: ModeDebug is a boolean, not a string Signed-off-by: Julien Cristau <jcristau@debian.org> commit f5bf1fdaf36163d5c2f1b9b51df96326ebbb0e9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Feb 13 09:56:22 2009 +1000 xkb: Fix wrong colour reference in XKB geometry copying. #20081 base_color and label_color need to reference the color in the destination, not in the source. X.Org Bug 20081 <http://bugs.freedesktop.org/show_bug.cgi?id=20081> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit a9d7d659a05e4b6b25e6acd2ce59926911aac0f7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 13 18:36:27 2009 -0500 PCI: Remove pciBusAddrToHostAddr and associated nonsense This was all a glorified no-op. We rely on pciaccess to create device maps anyway, so we should have no reason to care about what the host address is. Acked-by: Ian Romanick <ian.d.romanick at intel.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit be8c3d4022faa7d169778ea10d1f11e8f90e1c0c Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 13 17:54:33 2009 -0500 Linux: Remove dead USE_DEV_FB #ifdefs commit 51ae4d6bbfd95cac8a9cdefcd6f22fbe21a6cb9d Author: Ian Romanick <ian.d.romanick@intel.com> Date: Mon Feb 16 12:08:28 2009 -0800 glx: Add comments around some extension string weirdness commit caa5310e163b040689383f6d25ccab5ef1b2e215 Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Feb 16 20:41:14 2009 +0100 exa: reintroduce src rect optimisation, with a slightly higher threshold. - I got some feedback on gtkperf line test regression. - The increased threshold should ensure the destination optimisation is dominant. commit 46eeaf82e228df1c5971a24dc815566516e19be9 Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Feb 16 17:17:14 2009 +0100 exa: fix performance regression from 736b6fbd2c941b6276066cd1503523edebe7bf3d - The src optimisation is more aggressive and possibly harmful in light of the new initial state of pixmaps. - There is now actually a performance improvement by almost always keeping the number of rects low. commit 6198373ff2a8e36113bb1dcaebe975530ff01b86 Author: David Nusinow <dnusinow@debian.org> Date: Sun Feb 15 18:36:01 2009 -0500 xorg.conf (5) refer to mousedrv (4). Debian #394058 Signed-off-by: Julien Cristau <jcristau@debian.org> commit 2a8b8077d8f6001eb57deba60e1009fc99c28668 Author: Alan Hourihane <alanh@vmware.com> Date: Mon Feb 16 11:39:34 2009 +0000 dri2: support glXWaitGL & glXWaitX by copying fake front to front and vice-versa. commit ddb8d8945d1f44d16adc366b6612eef20ae813f7 Author: Peter Åstrand <astrand@cendio.se> Date: Fri Feb 13 10:23:28 2009 +0100 xserver: Avoid sending uninitialized padding data over the network Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b735a4b4951b607e614682836f24d5fd86c1f7fb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 14:29:23 2009 +1000 dix: Remove lastEventMask variable, substitute with a #define. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 772e0f9159ca3ab8fb4e03ed6feee3cc93697724 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 13:38:34 2009 +1000 dix: Don't set core events in SetMaskForEvent. Rather, modify the two callers to call separately for the two different. events. Unexport SetMaskForEvent too. And while we're at it, get rid of the MotionFilter macro, because it's one half confusing and one half pointless. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 58f3127919ba5fcb3bb467b6913c28ee1127c82b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 08:37:49 2009 +1000 Xi: remove dynamic mask assignment for XI events. They end up being the same anyway on startup, so let's not have a dynamic mask assignment mechanism and instead just hardcode them already. Also unexport SelectForWindow and remove the valid_masks parameter. We can check that before calling, since there's only one caller anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7057a9a97b9316b1de954d05451e04223fdd9fd8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 22:14:48 2009 +1000 Remove two more define XKB leftovers. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 736b6fbd2c941b6276066cd1503523edebe7bf3d Author: Michel Dänzer <daenzer@vmware.com> Date: Sun Feb 15 17:44:51 2009 +0100 EXA: Try to prevent the valid regions from growing too many rects. This helps contain region management overhead in some pathological cases, see e.g. http://bugs.freedesktop.org/show_bug.cgi?id=16647 . Signed-off-by: Michel Dänzer <daenzer@vmware.com> commit 45e14f515337159e600a47ebf349692751552af8 Author: Chris Ball <cjb@laptop.org> Date: Fri Feb 13 20:32:02 2009 -0500 Build fix for xf86EdidModes.c Commit 20ac314.. forgets to declare hsize/vsize/refresh. commit ae68be312619ad3bcb2d550a6267d38cce3284f5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 13 17:25:32 2009 -0500 Input: Don't re-block SIGIO in xf86SigioReadInput() It's already blocked on the way in, because we asked for it to be blocked at sigaction() time. commit c18f454e4a9cab03e5d55b6d761a4a735c943b6b Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Feb 12 18:27:48 2009 -0800 Query the DDX in ProcRRGetScreenInfo. This is the RandR 1.1 version of GetScreenResources and needs to re-query the DDX to see if the mode pool changed. Fixes Launchpad bug #325115. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 660c2a7d4c6cb52fd0992e9d2008a24805dc8c02) commit 20ac3140ce16af460992b83aa8aeff4afe28c2ee Author: Adam Jackson <ajax@redhat.com> Date: Mon Feb 9 13:36:05 2009 -0500 EDID: Hack for 1366x768 in standard timing descriptors All you get for standard timing descriptors is horizontal size in multiples of 8 pixels (which means you can't say 1366) and height in terms of aspect ratio (which means you can't say 768). You'd like to just fuzzy-match this by walking the DMT list for sufficiently close modes, but you can't because DMT is useless and only defines a 1360x768 mode, because it's _also_ specified in terms of character cells despite providing pixel exact timings. Neither can you use CVT or GTF to generate the timings, because they _also_ believe that modes have to be a multiple of 8 pixels. You'd also hope you could find a timing definition for this in CEA, but you can't because CEA only defines transmission formats that actually exist. So there's 480p, 720p, and 1080p, but no 768p. And why would there be, after all, the encoded signal is never 768p so obviously no one would ever make a display in that format. So instead, make a CVT mode since that's likely to be handled well by just about everything, smash the horizontal active down by 2, and shift the sync pulse by 1. Underscanning the hard way. Pass the suicide. commit bcafdfbed6f1e1f901c2459f60f94a0da506bd90 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 13 14:06:07 2009 -0500 RANDR: Validate entire mode list for interlace and doublescan Otherwise drivers have to refuse interlace twice: once in the output config, and once in ->valid_mode() to catch output and config modes. If you can't do interlaced modes, asking nicely for it in the config isn't going to suddenly make it work. commit a26c77ff432d2e85a2665fc36fca25143460c476 Author: Alan Hourihane <alanh@vmware.com> Date: Fri Feb 13 13:45:08 2009 +0000 glx: fix retval checks when failures occur for drawable creation. commit a38ca0063c91ef221f20bf0c4ac0dc84ce07d557 Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Fri Feb 13 14:44:53 2009 +1030 xext: Use proto header rather than the Xext include file, this prevents userspace being pulled in causing issues Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit d62c085f36892c327785e85571bd2c7c70513ac6 Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Fri Feb 13 14:44:09 2009 +1030 dix: Remove includes which are not actually used directly Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 340f1576afcdaf883d185da356e5d6282aa65e19 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 10:44:27 2009 +1000 dix: remove DefineInitialRootWindow() Obsolete. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c178c3f814f7666f43cbf47d24c7543b289f9b1a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 15:29:38 2009 +1000 dix: doxygen-ify enterleave.c Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cc696a2b7928ec497b6a0df3602fc70dec83a629 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Feb 12 15:05:57 2009 +1000 Doxygen-ify bits of events.c commit 8364bf7374aa5f6d991700f0c02921dc6c638c9f Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 11 16:06:36 2009 +1000 Document the event masks. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ed9d58c3c25ee1b3dedbc4c116823c263ccf164d Author: Simon Thum <simon.thum@gmx.de> Date: Sun Feb 8 17:21:09 2009 +0100 dix: refactor pointer acceleration The algorithm is split in a 2D-specific and a general part. This potentially allows to accelerate more than just screen motion. A state machine is intoduced to make code more explicit and readable. It also improves handling of 'phase 1' mickeys when axial correction kicks in (corner case). Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ac470dfb4fadaa0b28b6f8b57f4f13a20842b897 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Feb 12 18:34:22 2009 -0800 Check for and report errors writing xorg.conf.new from Xorg -configure Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit bd713794ceaa1b2890522554562103c0a2d50f04 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Feb 12 18:23:59 2009 -0800 Correct error message if specified config file is not found By making the "Unable to open config file" header a warning, it was not appearing with the filename when a config file was specified and not found. Now we make it an error message again, but only issue the error if a filename was specified - if none was specified, then we don't even issue a warning, just the "Using autoconfig" info message. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> commit d229ba7068f0adf1bc8b30b7ccf2fce2c7e8b97b Author: George Staplin <gstaplin@apple.com> Date: Fri Feb 6 12:55:09 2009 -0700 XQuartz: xpr: The dri.c code for pixmaps was wrong in several ways. They weren't being exported correctly by Xplugin. This should fix a bug with the surface for a window, when an export fails. Before the export could fail and leave behind an invalid (freed) pointer in the dix privates. I have an idea of how to fix the GLXPixmaps now without using CGLSetOffScreen. This work is a step towards that. The Xplugin will need a small patch to fix an issue that this change brought forth. (cherry picked from commit 58c4116c47543b5e30c2232e7bee8efc0b9be176) commit b17d6bed97eddd0773d0845f93f842444b7de0ae Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Feb 12 15:33:47 2009 -0800 XQuartz: Fix copyright info in Info.plist to be prettier when viewed in Finder (cherry picked from commit 8b607c9c507a68a6abda63831d227d0f8947028c) commit d1ad43a8bc3a93a9cddcb4b0be1d722993bf5dd6 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Feb 12 14:05:10 2009 -0800 Enable pbuffers If a driver does not actually support pbuffer rendering, it can just not enable any pbuffer fbconfigs. commit 0065896e1ae6d419a42b318b66d6e4d5f17a40ca Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:46:37 2008 +0000 Xming: Update keyboard layouts mapping table An update to the keyboard layout mapping table which updates some no longer valid keyboard layout names (e.g. de_CH -> ch -variant de) and adds a few more reported layouts Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d7c27bfe553235e55eb48799129ff9f8e7e0d4f6 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:57:29 2009 +0000 Xming: Check clipboard selection ownership after taking it When you take ownership of a selection you should always check you got it (X11 ICCCM gospel). Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit cb6315072ff23740bdc5fc2f95dd960601df5664 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:54:31 2009 +0000 Xming: Fix a memory leak in clipboard integration code Free the memory allocated for ReturnData in FlushXEvents(). Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d54d24dd5f25188b951b82b1c95eb9d36b5be970 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:53:43 2009 +0000 Xming: Fix prototype for winProcessXEventsTimeout() in clipboard integration code Function 'winProcessXEventsTimeout()' is declared 'static Bool' and defined 'static int' (correct) in 'winclipboardwndproc.c'. This has been wrong since dot, but luckily was of no significance Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d8bae80305057acfb8e82341f68090eac0dccb90 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:52:57 2009 +0000 Xming: Improve clipboard integration startup in XDMCP mode Improve clipboard integration startup in XDMCP mode Stop the "Clipboard not yet started, aborting" message from spamming the log. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7cb1622ce44754d9dcd6f405fb8403bd79c3e7e4 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:51:02 2009 +0000 Xming: Select events correctly in clipboard integration code The clipboard should only select PropertyChange events and do this on the correct window, the messaging window for the clipboard not the root window! Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b997b3849d902894dd5b38673b73a23a47edf502 Author: Colin Harrison <colin.harrison@virgin.net> Date: Tue Feb 3 15:48:04 2009 +0000 Xming: Add Colin Harrison to copyright and authors list for clipboard integration files Add Colin Harrison to copyright and authors list Adjust license text for multiple authors Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 5ff289834d7445cc6f60dbb1cf18423e7236311a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 19 17:42:54 2009 +0000 Cygwin/X: Place prototype for winSelectIcons() in a header file Fixes warning as prototype is now in scope for the definition Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit ab2c98b86f1c3968581dfdad8b67432082feec78 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 19 17:36:58 2009 +0000 Cygwin/X: Place prototypes for winCheckKeyPressed() and winFixShiftKeys() in a header file Fixes warnings as they are now in scope at the definition Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit cc7a4c7c6e051fceacb32997740d83fc0655414e Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 19 17:29:28 2009 +0000 cygwin/X: Remove an unused variable to fix a warning Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7c2fb098b206c0fb97c18cce8f88387cd0c0e82a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 19 17:22:59 2009 +0000 Cygwin/X: Fix several prototypes to return HICON Fix prototypes of winOverrideIcon(), winTaskbarIcon() and winOverrideDefaultIcon() to return HICON Also use HICON type in WINPREFS stucture Remove various casts these changes make unnecessary Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 19b3e44ce51cc2f74ba388cb2cd3a26467848e9a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 19 17:03:23 2009 +0000 Cygwin/X: Fix -Wold-style-definition warnings Fix old-style definition warnings caused by definitions with empty parameter lists "()", which should be "(void)" to indicate the function takes no parameters, rather than unspecified parameters Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 734b23e5982e171031077a2d5d6b5dc2a12e1a70 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Feb 11 14:31:17 2009 +0100 fb: add fbDoCopy and fbCopyRegion compatibility wrappers. commit 619c4d60eb3a8a51a8300ccf8ab5b98a688e6e12 Author: Eric Anholt <eric@anholt.net> Date: Sun Feb 8 12:37:50 2009 +0100 glx: Replace broken GLX visual setup with a fixed "all" mode. With trying to match depths so that you didn't end up with a depth 24 fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth 24 X visual, which angered other applications. But in fixing that, the pickFBconfigs code for "minimal" also could end up breaking GLX visuals if the same FBconfig was chosen for more than one X visual. We have no reason to not expose as many visuals as possible, but the old "all" mode didn't match any existing X visuals to GLX visuals, so normal GL apps didn't work at all. Instead, replace it with a simple combination of the two modes: Create GLX visuals by picking unique FBconfigs with as many features as possible for each X visual in order. Then, for all remaining FBconfigs that are appropriate for display, add a corresponding X and GLX visual. This gets all applications (even ones that aren't smart enough to do FBconfigs) get all the options to get the visual configuration they want. The only potential downside is that the composite ARGB visual is unique and gets a nearly full-featured GLX visual (except that the root visual might have taken the tastiest FBconfig), which means that a dumb compositing manager could waste resources. Write compositing managers using FBconfigs instead, please. commit 7bbf05d9aa75b536a5321abf51f37852b8f109ed Author: Shunichi Fuji <palglowr@gmail.com> Date: Tue Feb 10 14:44:18 2009 +0900 dix: build fix if PANORAMIX is not defined. Signed-off-by: Shunichi Fuji <palglowr@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4844bff58f296b2851be4e6b955c3a68d02437a9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 4 11:50:18 2009 +1000 config: if we can't connect to HAL, listen for a startup notification. If HAL isn't available when we try to connect, the registered NameOwnerChanged signal handler waits until HAL is available. Once we connected to HAL, we unregister the signal handler again. This allows HAL to be started in parallel or after the server has started. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5b2bbffc12cd7d29e4200943f8736bd6336ae4aa Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 16:46:27 2009 +1000 dix: deduplicate SyntheticMotion. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 34820f9c1304891bebb4bff6a492288aec4fc0d1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 16:37:19 2009 +1000 dix: remove XineramaChangeToCursor. It's nearly identical to ChangeToCursor now anyway. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 942eae6868b8b0f343b6aa921ddf77e8bb70798a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 16:25:22 2009 +1000 dix: Remove XineramaCheckPhysLimits. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bf044f6d10ad9f2baca91a2f04e82dc1af2657cd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 16:14:54 2009 +1000 dix: reduce redunancy in XineramaConfineCursorToWindow. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cdce5699f085e717ee1a2ed8390746dfcb9ddadf Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 30 16:09:23 2009 +1000 dix: Get rid of XineramaCheckVirtualMotion. Yes, this is an ugly piece mess of #ifdefs, but it beats having two nearly identical functions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1cb5afdf1ef53e72e0eef28ff6197bf5e86ef758 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 8 18:59:17 2009 +0100 dix: always NULL pGC->tile.pixmap in Create{Scratch}GC. commit 6fd8fe9cb993f9b733cf7d878bc324acd09aa48d Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 8 18:43:15 2009 +0100 exa: fix exaValidateGC. - use DEST in the createPixmap wrapper, because stipple already takes MASK (in case someone uses swappers). - Anticipate some of the less common situations when fbValidateDrawable will access tile related pixmaps. commit 30daba6903378dd47f386c0012a0667fd2368f3e Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 8 02:08:13 2009 +0100 exa: All fallbacks should have a GC, remove some code. - I did some testing with full fallbacks forced by the driver. - I ran rendercheck, expedite and the (full) x11perf test suite. - Thanks to ajax for pointing out this should be unneeded. commit d591c7d1b87c61ee8add2fce689e35cf097eed4f Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Feb 7 20:47:54 2009 +0100 mi: kill a few warnings commit 00226d0b589595cdd45c75e7e28237334a8883b1 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Feb 6 20:56:49 2009 +0100 mi: clip exposures to pGC->clientClip. commit ffa72793e25f19a388a1369708f472921f721284 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Feb 6 20:47:01 2009 +0100 exa: Calling exaMarkSync after UTS is the drivers responsibility. commit da086901c6579e41b28b1418fa12ebb82744fc87 Author: Matt Turner <mattst88@gmail.com> Date: Fri Feb 6 18:31:12 2009 -0500 Remove unused barrier macros on alpha. commit 68665d78e72c4c564073d66a0f59ac8d3f5fd756 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Feb 5 17:07:31 2009 +0100 exa: don't use fbCopyNtoN commit 2e76958d304a3c4080d62f32449724eeb9b95d93 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Feb 4 19:48:03 2009 +0100 fb: move some code to mi commit f06bde3d4bf9a0f245dfa6c65cd98f8e0c7dfdfc Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Jan 31 19:57:07 2009 +0100 exa: create ExaCheckGetImage commit 258fc4b106dfd7b583999f97caf4d4a7a11569b6 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Jan 31 19:40:48 2009 +0100 exa: wrap the remainder of exa_unaccel.c commit 6fabf249494bf38b69e3c9c6c9718ee8b12fc6e1 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Jan 31 19:25:20 2009 +0100 exa: use proper wrapping in exa.c commit 015c99a4ad572f5a1b68054efb070e1ffee1fed0 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Jan 31 18:53:52 2009 +0100 exa: properly wrap GC functions commit 5e6a06fe691db63ccf2dc7161a1f6c71c09741b7 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Jan 31 16:30:31 2009 +0100 exa: add GC private commit 5cc67ae94c066dcac78072ad8a819c3b602d8bab Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Jan 30 19:32:33 2009 +0100 exa: kill of exaImageGlyphBlt - It serves no obvious purpose, yet it directly accesses many fb symbols. commit 6483834200fab90164c27c72d4710014edeb4479 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Jan 30 18:40:46 2009 +0100 exa: Remove one of the many calls directly into the fb layer. commit f112d6bf59964f317ab236221f7bce7fe2603ab8 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 6 18:30:43 2009 +0100 EXA: Try harder to keep current pixmap copy up to date in exaMigrateToward*. This is probably required, but apparently not sufficient, for making migration heuristics other than "always" work correctly again. Not that I really care about them... commit 3948b523893d3d44b6a088340c4252e969613769 Author: Michel Dänzer <daenzer@vmware.com> Date: Fri Feb 6 11:37:53 2009 +0100 EXA: Guard empty pending region warning by DEBUG_MIGRATE. It isn't very useful yet while the damage layer calls us for empty operations, mostly confuses users. commit 9a1d07ecb74b7c3267a6910af66ada917a525110 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 20:20:24 2009 +0100 Fix "warning: cast from pointer to integer of different size" Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0e15697b53c9448ce9911aa6499b2ea0bda92af6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Feb 4 10:11:13 2009 +1000 dix: die if we can't activate or init the VCP/VCK. If we have a busted xkb setup, the XKB initialization on the core devices fails and leaves us with dev->key->xkbInfo == NULL. This in turn causes segfaults lateron. Return BadValue when the XKB configuration for a master device failed, and if that happens for the VCP/VCK, die semi-gracefully. The VCP init can only fail on OOM. Reported by Aaron Plattner. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit db836715198a445dc3b32c3df0610f700930483f Author: Adam Jackson <ajax@redhat.com> Date: Wed Feb 4 23:27:32 2009 -0500 Revert "Bus: Remove xf86SetAccessFuncs() and related machinery" This reverts commit 2fe79990e31ac684637ca3c47198ee0cead10abe. Reminder: nvidia uses this, because other parts of RAC are broken in worse ways, and it needs to disable that. commit 2fe79990e31ac684637ca3c47198ee0cead10abe Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:11:49 2009 -0500 Bus: Remove xf86SetAccessFuncs() and related machinery Only mga was using this, and even then only behind an ifdef that no one ever built. Not a great idea in the first place. commit 9ff6180161267e71ae750498da0ec4889cd5c260 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 06:23:09 2009 -0500 Bus: Delete some obfuscatory macros commit 8eca37cb8934e79f02291460eb7b49a5d528f391 Author: Adam Jackson <ajax@redhat.com> Date: Wed Feb 4 22:48:52 2009 -0500 Bus: Remove unused xf86ExtractTypeFromList commit b013111e98d50f5962e9b275eb28d969d5c9576e Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 03:14:18 2009 -0500 Bus: make the resource list static. commit bde028dd8d856f8d47c39e3c6d3731c34c398c74 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 22:58:58 2009 -0500 loader: Remove icache flushes on alpha. If libdl doesn't already get this right for you, you have two problems. commit 910a1e88d23e0b7e4ca4679ab50a883a918f2590 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:54:07 2009 -0500 loader: Remove a vestige of archive support commit 366f23c6eb504fc23112f121769bcb719948474f Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:53:05 2009 -0500 loader: Remove useless call to LoaderGetOS We know what OS you're running on anyway, it's printed in the uname string at the top of the log. commit 05e415a5a3f376e28955be3bf976390e8631e25f Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:52:07 2009 -0500 loader: Simplify loader magic commit bf1ca06a1693cbe5415a152936939ce3b088a022 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:51:35 2009 -0500 loader: Make a comment slightly less stupid commit 499908aeca9a31692c787070e23bfaa92d1b32a4 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:50:00 2009 -0500 loader: code motion. commit 28b6b1519c4c526662302fac4ed9b7f540bafd4a Author: Adam Jackson <ajax@redhat.com> Date: Mon Jan 26 07:47:46 2009 -0500 loader: Simplify handle allocation and refcounting. commit 0bad0552bfd4d10529ab51d618af8d08c5aeea71 Author: Adam Jackson <ajax@redhat.com> Date: Wed Feb 4 17:20:24 2009 -0500 XKB: Remove -kb and +kb from -help text and man page. commit 7968823cbc02615e1080c0d3f34dcebe14ea1771 Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 3 20:18:37 2009 -0800 Handle the combination of panning and crtc transforms This patch gets the shadow scanout buffer repainted on panning area changes. It does not, however, track the mouse correctly. Signed-off-by: Keith Packard <keithp@keithp.com> commit 763df9eec79a867978efc5138d8635a46c1a0d17 Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 3 20:15:41 2009 -0800 Damage re-used shadow scanout buffer using new transforms. When the shadow scanout buffer can be re-used, the underlying framebuffer area must be damaged so that the scanout will be repainted. This patch delays the addition of that damaged area until after the transform in the crtc has been updated, otherwise the old transform would have been used and the wrong area repainted. Signed-off-by: Keith Packard <keithp@keithp.com> commit 62fc98cb88e4e8b636f343453fc1168a87c58972 Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 3 20:12:42 2009 -0800 Handle matrix computation overflow in RRTransformCompute If the computation of the composite fixed-point transform for RandR overflows at any point, take the resulting floating point transform and scale that back to fit in a fixed point matrix. This ensures that a matrix will always be available, although perhaps at reduced precision. Someday we should add floating point matrices to Render. Signed-off-by: Keith Packard <keithp@keithp.com> commit 7a3ddef3bc27982f3558183c74fc8e365cf2e7fd Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 00:07:02 2009 +0100 fbdevHWGetRec() doesn't return the private data Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e04d9ab999978995b06f4b702293b96f69b0e8c3 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 00:08:21 2009 +0100 DBUS_API_SUBJECT_TO_CHANGE is already defined on the command line dbus-core.c:30:1: warning: "DBUS_API_SUBJECT_TO_CHANGE" redefined <command-line>: warning: this is the location of the previous definition Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f60d127b5371f2853dcc53903c6ff8c7670ad1b Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 00:07:40 2009 +0100 Fix "warning: braces around scalar initializer" Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a88995dfb88719ae4a03483dc571dbbe83565285 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 00:03:58 2009 +0100 Make gcc happy: correct third argument of CopyGetMasterEvent() Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit dd3f4e829286e62f4c5c07ee93f9f576876acbf9 Author: Tomas Carnecky <tom@dbservice.com> Date: Wed Feb 4 00:02:24 2009 +0100 Fix "warning: cast to pointer from integer of different size" Add parenthesis around the whole expression. Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 731a907ac21a753f306b53706f689469cefeb953 Author: Tomas Carnecky <tom@dbservice.com> Date: Tue Feb 3 23:58:25 2009 +0100 Fix "warning: XXX defined but not used" generic.c:80: warning: ‘read_legacy_video_BIOS’ defined but not used Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc57efffe654c493ceb62555cccb7926f4a646f1 Author: Tomas Carnecky <tom@dbservice.com> Date: Tue Feb 3 23:54:53 2009 +0100 Fix "warning: unused variable XXX" events.c:4614: warning: unused variable ‘kbd’ xkbUtils.c:361: warning: unused variable ‘maxKeysPerMod’ xf86Events.c:409: warning: unused variable ‘ke’ generic.c:131: warning: unused variable ‘cs’ generic.c:130: warning: unused variable ‘size’ xf86RandR12.c:591: warning: unused variable ‘crtc’ Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 111fdef74dfc7e288cef675b171b673bf64fe056 Author: Tomas Carnecky <tom@dbservice.com> Date: Tue Feb 3 21:18:53 2009 +0100 ISO C90: Move declaration to the beginning of the function devices.c: In function ‘DoChangeKeyboardControl’: devices.c:1768: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Tomas Carnecky <tom@dbservice.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9fe9b6e4ef669b192ee349e3290db5d2aeea273c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 10:20:13 2009 +1000 mi: don't call UpdateSpriteForScreen if we have Xinerama enabled. #18668 In Xinerama all windows hang off the first root window. Crossing the screens must not reset the spriteTrace, otherwise picking fails and events are sent to the root window. X.Org Bug 18668 <http://bugs.freedesktop.org/show_bug.cgi?id=18668> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f80332a04d0714a74f16b2552cccf3457e6494af Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 14:28:16 2009 +1000 dix: for core events, pass the core filter into DeliverEventsToWindow Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 01879e583b0ce0d8fddc37e36d9b69fe4f1d1e72 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Feb 3 13:49:19 2009 -0800 Don't enable XAA offscreen pixmaps with Option "XaaOffscreenPixmaps" "no". xf86IsOptionSet is rarely the right function to use for boolean options because it returns TRUE whenever the option is present, even if its value is "no", "off", "0", etc. commit 5623c27700b7b23a8dbbd8c8f45e5d4fa0c667e3 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Feb 2 19:25:14 2009 -0800 Constify atom name strings Changes MakeAtom to take a const char * and NameForAtom to return them, since many callers pass pointers to constant strings stored in read-only ELF sections. Updates in-tree callers as necessary to clear const mismatch warnings introduced by this change. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6869efae74381e5305b2d6517bf286e3ef7fdcb7 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Feb 3 09:58:51 2009 -0800 XQuartz: Accept bundle version 2.1.6 to work with our startup method (cherry picked from commit 7f2966557374cb5ea22bc7b73d5ca04891eb5e78) commit 43a1c91a3dac4f0c8cea5de1b9785e349e09978a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Feb 1 20:44:27 2009 +1000 Xext: fix typo in GEEventFill macro Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 412e09e1e37b74421abd4dd9606536d2785da440 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 15 11:03:03 2009 +1000 dix: Use GenericEvent instead of LASTEvent to check for core events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9f3c5d46f81887b2b413b3e6cc9df8282f06522c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Feb 2 12:55:39 2009 +1000 Xi: initialize the device before applying button map changes. This part got lost in bc909f71367a0. Reported by Tomas Carnecky. Acked-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6bf6a4c47e94780bf0eef47702f21a505c336556 Author: Simon Thum <simon.thum@gmx.de> Date: Fri Jan 23 12:06:16 2009 +0100 Xi: create well-known atoms on demand, rather than preinit them Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 32adf8d34fb7db9b78859241f2670349b75c3f7e Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Jan 28 20:52:45 2009 +1000 Xi: If the MD doesn't have a key/kbdfeed class, init the keyboard. This fixes crashes on mouse/keyboard combos where the mouse is both a keyboard and a mouse. Upon copying the SD's key info into the VCP, the NULL xkbInfo of the VCP would crash the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit caade11b8465a743b2ecc890a4d180277e9ca716 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Jan 28 20:44:47 2009 +1000 Xi: remove now obsolete oldXkbInfo. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 5e0967f5fc2e0fcf2a55128eb03931cf6f5709e9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 12 10:49:53 2008 +1000 dix: add SetBit(arr, bit) and ClearBit(arr, bit) to include/inputstr.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit faeb18eb7eb20f15528f9c8004d843146ebc2a50 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 27 15:40:31 2009 +1000 Xext: rename shape's EventType to ShapeEventType to avoid name clashing. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cfd3443fe81685e91a53063dee58e24a5684dc29 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jan 28 13:34:10 2009 +1000 Xext: rename saver's EventType to SaverEventType. Avoid namespace clashing with the internal events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8460425740c72e58bcb897557f033e2836251160 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 10 12:31:59 2008 +0000 render: rename SetBit to RenderSetBit. Avoiding namespace collision with the SetBit macro soon to be used in the input code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 940a7aeebc9b042b0208ee475ef162c485ac2274 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 27 15:52:49 2009 +1000 include: remove now-unused sempahore macros. Obsolete with the new enter/leave model. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f5c7f8a3ab5723b6c1c3cd21b90a87fd7f37cb7f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Feb 2 12:30:57 2009 -0800 XQuartz: GLX: Fix accidental exclusion of glBlitFramebufferEXT on Leopard (cherry picked from commit 8620579483789ae9ac1b68dbefe32b70011386de) commit 5100d829a4d71ce4a9fbc2b81694a1fb90066ccf Author: Eric Anholt <eric@anholt.net> Date: Mon Feb 2 10:13:46 2009 -0800 glx: Don't match fbconfigs to visuals with mismatched channel masks. This fixes at least one known bug, where the depth 32 visual would end up with a depth 24 fbconfig attached, angering compiz. commit 4475ae036c3d5a06a6ce88a359ce2a9a8ae9b4f1 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 26 13:15:07 2009 +0000 Cygwin/X: Fix compilation for mandatory XKB Fix a stray '}' Update to use RMLVO interface Remove g_winInfo.xkb.disable, can never be set since noXkbExtension has been removed Change to retrieve modifier key state using XkbStateFieldFromRec() from Colin Harrison Update to use XKB defaults from xkb-config.h Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit e2b4d3d4a1994347979508fbb483cd55c2232502 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Feb 1 15:08:02 2009 -0800 XQuartz: GLX: OpenGL.framework on Tiger doesn't have glBlitFramebufferEXT (cherry picked from commit e01662cadcaa4052e3a5aa82cbaed00a2d0220e0) commit 66a6fbbfa3a1fd0d91fe61cf2ab299d0e3df46b9 Author: Jim Huang <jserv@kaffe.org> Date: Sun Feb 1 09:19:20 2009 -0800 kdrive: Move a close() to the right place so we don't close(-1) normally. Bug #18343 commit 0055fe66d5f73742cafab868ccdb7a6f36ea1dd5 Author: Manuel Bouyer <bouyer@netbsd.org> Date: Sun Feb 1 09:14:19 2009 -0800 netbsd: Force the use of ev56 instructions for register access on ev56. This avoids 32-bit access which might affect other registers. The linux code uses gcc flags to get this to happen, but this seems like more of a sure thing. commit 1375c1b07df114d864a0a06786bc75a3a4f65177 Author: Manuel Bouyer <bouyer@netbsd.org> Date: Sun Feb 1 09:12:21 2009 -0800 netbsd: Fix alpha ev6 support. Bug #19721 commit ad8ffbe7cb50387e6a9cc4a24fea0d9c13b7bfc8 Author: John Hein <jhein@timing.com> Date: Fri Jan 30 21:30:35 2009 -0800 Actually require bigfontproto when it's enabled. Bug #13710. commit 29b3b88dc744f4919c6709747ddb7baac47486c5 Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Fri Jan 30 21:16:48 2009 -0800 Prevent double unref of glxdrawables Found by valgrind. Bug #18917. commit 60bcdd687040db76490851d4b459284ce37020e0 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jan 30 21:44:08 2009 -0800 x11-input.fdi: Add options needed to handle adding USB devices on Solaris commit 4de5705545792d77c9990bbec3e263a517757a2a Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 30 20:17:10 2009 -0800 RandR crtcs not fetched correctly when primary output is set. Primary outputs may not have a CRTC. Loops fetching CRTCs respecting primary output were broken. Signed-off-by: Keith Packard <keithp@keithp.com> commit f716e3f3445d443cbc6507d27f806e9ad387120a Author: Eric Anholt <eric@anholt.net> Date: Fri Jan 30 20:10:21 2009 -0800 modes: Protect xf86_crtc_supports_gamma() from non-RandR 1.2 drivers. commit 317f2b4a9fe4b606975711bc332166a82db5087d Author: Eric Anholt <eric@anholt.net> Date: Fri Jan 30 19:06:17 2009 -0800 randr: Avoid re-querying the configuration on everything but GetScreenResources. The new path should only re-query on the other requests when we haven't gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX). Bug #19037. commit c1f2be1f3fd0c80cb4c85b98140b98aa9311242b Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 30 19:14:36 2009 -0800 RandR SetOutputPrimary should work with or without a crtc connected The test was inverted from the protocol spec, and besides, the test is bogus anyways. Signed-off-by: Keith Packard <keithp@keithp.com> commit dd098501d800571e71d06ffc936635a6c9d44e05 Author: Eric Anholt <eric@anholt.net> Date: Fri Jan 30 16:17:58 2009 -0800 Move the apple fat binary hacks back to a header file, and make it apple-only. commit 6e49fdd2c839b6244c23ce95c3ae76a1a265b986 Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 30 15:43:04 2009 -0800 Make RandR CRTC info report panning area instead of just crtc area This makes the RandR info consistent with the Xinerama info. Signed-off-by: Keith Packard <keithp@keithp.com> commit ea309e47457156b60aadbf113f04e5b6851029c8 Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 30 14:19:41 2009 -0800 Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse Drivers not using the new hw/xfree86/modes code would crash in DRI due to that code trying to monitor CRTC changes. Signed-off-by: Keith Packard <keithp@keithp.com> commit fff00df94d7ebd18a8e24537ec96073717375a3f Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 30 14:16:12 2009 -0800 Ignore EDID-supplied monitor physical sizes for core screen size We report the EDID values in RandR, and we let people configure whatever they like for the screen in xorg.conf. Reporting the EDID values in the core means applications get inconsistent font sizes in the default configuration. Signed-off-by: Keith Packard <keithp@keithp.com> commit 4e7bc2d7a9879297aff0924febeca9bd3b6c336d Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri Jan 30 03:56:39 2009 -0200 Work around inclusion of <X11/extensions/panoramiXext.h> The X Server build only needs the macros PANORAMIX_MAJOR_VERSION and PANORAMIX_MINOR_VERSION from that header. Addition of extra prototypes to <X11/extensions/panoramiXext.h> caused a X Server build failure. commit 15ac25627e7239629be59adedda5d8a9deb330ef Author: Matt Turner <mattst88@gmail.com> Date: Thu Jan 29 14:40:27 2009 -0500 Remove extra / from Loading module line In the X log, upon module load, it prints a line similar to the following. > (II) Loading /usr/lib64/xorg/modules/extensions//libdbe.so The attached patch removes the extra / before the module name. Code already exists in hw/xfree86/loader/loadmod.c:InitPathList to add a trailing slash if needed, removing the one added by sprintf is harmless. Signed-off-by: James Cloos <cloos@jhcloos.com> commit 3903e23153a0d47704050944fa83a7b31bc2eebc Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Jan 29 12:42:57 2009 +0100 XKB: ifdef XKB is dead, yet it was still present in a few places. commit 756a2c848305aa06bfe636314e28ad7f97c1168a Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Wed Jan 28 22:18:50 2009 +0100 Fix duplicate code, off-by one in space calculation, not initialized members commit b55db937fee5ddf34518a54f352c0ee9b8cc2c2c Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Wed Jan 28 17:33:25 2009 -0500 [shadow] Store the closure in the buffer commit 82fc102568b3d6b0daeb6c5f5b3a1310a7f14fcd Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Jan 28 07:51:32 2009 +1000 Disable Xnest by default. Xneest doesn't build right now and is in the process of being removed. So let's not build it by default. commit f7585d020593345e7a61b1fe1a517c38da8f6d79 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Tue Jan 27 03:13:28 2009 -0200 Convert kdrive libraries to libtool convenience libraries. Also correct a link failure due to unresolved symbols. This is arguably a libtool/ranlib/ld bug, that "may" be corrected by linking all convenience libraries in a single one. But in this case, it was preferred to just add a linker option to Xfake_LDFLAGS, to force linkage of all libraries. This corrects #19725. commit b43a4e2d38adb9ff16204218f24df93cfd820d1b Author: Magnus Kessler <Magnus.Kessler@gmx.net> Date: Tue Jan 27 09:30:37 2009 +1000 Xvfb: add missing include for new xkbsrv.h Commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e added call to XkbGetRulesDflts defined in xkbsrv.h Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a7e6424d992151c504a75bb807fa34c57ad52cad Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 23 17:11:57 2009 +1100 dix: remove obsolete comment. Event lists should not be allocated by the DDX commit b137a0cdb1d517a807d081fbde8e8dc0539fb3ca Author: George Staplin <gstaplin@apple.com> Date: Mon Jan 26 03:02:38 2009 -0700 XQuartz: GL: indirect.c changes to fix the build with newer OpenGL frameworks. (cherry picked from commit 143224405ba74929c702a95de52b56df140b0d1b) commit 34b896e50fa154ad890a458c60932964421e739f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jan 16 19:26:07 2009 -0800 XQuartz: SnowLeopard: Help system book name changed in 10.6 (cherry picked from commit b57cb05c69acbedb00a97234099ea104309aa2cb) commit c7d62d74bbd6e0067f511fd910b9e633576befb7 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Jan 25 19:19:01 2009 -0200 Explicitly add libxorg_la_LIBADD to libxorg_la_DEPENDENCIES Otherwise, for example, when hacking config/*.c, it is required to run make clean on that directory, to ensure the proper libconfig.a will be linked in the generated Xorg binary. commit 0eec7348875035792097f606487a558422774e2c Author: Magnus Kessler <Magnus.Kessler@gmx.net> Date: Fri Jan 23 12:11:00 2009 -0200 .gitignore: ignore sdksyms.dep Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> commit 88efe9c76f85423d952ff38e0cfd8b690439902a Author: Magnus Kessler <Magnus.Kessler@gmx.net> Date: Fri Jan 23 11:25:00 2009 -0200 Xvfb: Remove unused function GetLK201Mappings in InitInput.c Silence a gcc warning. After commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e GetLK201Mappings is no longer needed. Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net> commit 6ef46c40e62def4841a4cff4e0b443516a2ed782 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Jan 25 19:01:10 2009 -0200 Update xnest keyboard code to match xephyr/kdrive. Xnest was not updated in the last batch of xkb changes. This patch is basically cut&paste from hw/kdrive/src/kinput.c and hw/kdrive/ephyr/ephyr.c, and appears to generate a Xnest as functional as before the xkb changes. commit 759348f13ffa02fb1804238189ffce1c92d33e2a Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 22 22:09:11 2009 -0500 Xephyr: Add some rudimentary Xnest command line compat commit 01ffaf6834fd6a3b1ddbd33d0f0b8d086be0737e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 19 21:11:05 2009 +1100 Xi: define a range of axis labels. This is copied from linux/input.h, presumably that's the ones at least the Linux kernel can give us for any device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 132b464d734b077038e19b21e46d3a6258f4b998 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 22 02:11:16 2009 -0500 Remove a bunch of useless casts. We've had void * for twenty years now people let's try to act like we know how it works. commit 0fb4390526bb829ab17ff4635d41a3012f63c1b2 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 22 01:13:17 2009 -0500 Remove xorgcfg 'Options' list. commit b5ece46b76c9182a077141505cc0e788c0fca3ea Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 20:07:40 2009 +0200 Input: Clarify valuator FatalError messages Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ddb46c1421a98190313b79621c0f5ae43b97d3f6 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 20:03:10 2009 +0200 Input: Use previous state in valuator events Make valuator event state match other events by using the device state from before processing the event, not after. Also, we already check the number of valuators in UpdateDeviceState, so no need to do it again. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 18e51911f5748f9a27a18cd6bb421c899f5b048f Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 13:44:47 2009 +0200 Input: Add postdown to ButtonClassRec This mirrors that in KeyClassRec: the state of the buttons as posted to GetPointerEvents, rather than the state of the buttons as processed by ProcessOtherEvent and friends. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c05f3bc935bef4d98216d38c0e98bd57ced382df Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 19:35:15 2009 +0200 Input: Don't allow DDX to generate repeat events We always use soft-repeat at the moment; XKB posts a release/press sequence, which admittedly needs cleaning up, but that's for another day. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6aef4e96affcc26b9415c6bc9c9bebb5af05a1a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 17 13:42:46 2009 +0200 XKB: Fix logic error Use logical or instead of bitwise or. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0ec9b1069aeeaf66fd104c09f08202f7ebccd170 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 10 14:44:28 2009 +0200 XKB: Remove unused XkbProcessOtherEvent Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7af53799ccefe27b996bdc6073075b7f12353d3a Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jan 4 16:39:18 2009 +1100 Input: Remove unused CoreProcess{Keyboard,Pointer}Event Everything goes through XKB's Process{Keyboard,Pointer}Event on its way through to ProcessOtherEvent now, so get rid of the old, useless functions. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7c4c00649cae855e141ec9a3667bfe399e3156d0 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 1 05:25:52 2009 +1100 XKB: Remove unused DDX functions They were complete no-ops anyway. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4fa3872dc2bcfd6d1fc88d0a94c7071683eea899 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 18 20:26:00 2008 +0100 Input: Remove core keysyms from KeyClassRec Instead of always keeping two copies of the keymap, only generate the core keymap from the XKB keymap when we really need to, and use the XKB keymap as the canonical keymap. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bc909f71367a02297e725bb5769c2bcadab22395 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 12 00:35:56 2008 +0300 Input: Centralise pointer map changing Replace both core and Xi functions with one function that validates the proposed map, and sends out both kinds of notification. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f06a9d2e05e13466c115fc706966a90b1fb0518e Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 18 20:59:30 2008 +0100 Input: Clean up keymap change notifications Keyboard map notifications are always generated from within XKB code, which also takes care of copying the keysyms, etc. If you need to mangle the keymap yourself, generate a new core keymap/modmap, and pass it to XkbApplyMappingChange. SendMappingNotify is renamed to SendPointerMappingNotify (and ditto its Device variants), which still only _sends_ the notifications, as opposed to also doing the copying a la XkbApplyMappingChange. Also have the modmap change code traverse the device hierachy, rather than just going off the core keyboard. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 1d1a0f67eee330a286fbdef17e967ce8ea201548 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Oct 28 16:27:37 2008 +1100 Xi: Introduce XIShouldNotify XIShouldNotify just lets you know if you should send an event for a keymap change (or similar) concerning a given device to a given client; at the moment, this is only for devices which are sending events to that client. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b5242789edb726bb539e4d42fa35bfdaca0025c9 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 9 17:02:02 2008 +0300 XKB: Simplify keymap writing a bit We don't need no temporary variable. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit feb757f384382c7782ceac55f99d54c7caadbd9d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 19:54:29 2008 +0300 XKB: Sanitise vmods for redirected keys Turn two unsigned chars into one unsigned int for both vmods and the vmod mask. As a bonus, remove broken unused accessor macro for setting the vmods. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b5f49382fe48f0a762d9a15fb10a7d7e1183fc8d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 19:52:11 2008 +0300 XKB: Sanitise ctrls action Turn four unsigned chars into one unsigned long. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1bd7fd195d85681e722161f8c636a28f11b40abb Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 19:50:12 2008 +0300 XKB: Sanitise pointer actions Turn two unsigned chars into one int. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 61c508fa78aa08ea2666fde950fbafad95d65056 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 19:47:16 2008 +0300 XKB: Sanitise vmods in actions Turn vmods from two unsigned chars into one int. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4f3078df2acf07364a17f738bc5c32f9a5962723 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 9 16:50:22 2008 +0300 XKB: Add a hell of a lot more FIXMEs For some reason, we insist on having daft internal representations that make no sense, that always have to be converted to be used. We should really sort this one out. Also, comment the hojillion members of XkbStateRec. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit edeb033f29ae2d52e86c543ccbf22fb7ae1fdb7f Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 15 18:07:52 2008 +0100 XKB: Explicitly decode action data Rather than requiring a one-to-one correspondence between XKM and struct formats in action data, explicitly fill the action data, so we can break API. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 699824a35791735b4b4378adf8648e3aaa599ace Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 18 16:41:29 2008 +0300 XKB: Remove descriptions from maprules We don't use them, as they're not up to the task. We'll get a better solution someday, promise. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1ad80678d88525159e55bb814205fd4eaca060a3 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 18 16:29:35 2008 +0300 XKB: Remove support for setting combined keymaps We don't do full keymaps anymore. Deal. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 133e0bd6f1cc147a2ddbbe1519d10300e7dbe669 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 18 16:27:57 2008 +0300 XKB: Remove 'extra' functionality from rules parsing When we find something weird in the rules, don't stash it as an extra freeform component, just state that the rules file is likely broken and move on with our lives. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cc5c6d628aa0dc87c2cc9d063972e09ad747a596 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 18:45:37 2008 +0300 XKB: Remove unsupported Xi operation flags We support every XKB operation on Xi devices, so always report that we support everything, and that nothing is ever unsupported. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 32db27a7f867b503c2840ca7b815e96d10be9210 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Apr 17 12:42:01 2008 -0700 Input: Remove modifierMap from core We already have modmap (in the exact same format!) in XKB, so just use that all the time, instead of duplicating the information. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f062e90a95f9b7ae5458ef2100615e8ace9b66a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 16 19:15:30 2008 +0300 Input: Remove modifierKeyMap Since modifierKeyMap is generated from modifierMap, just remove it, and only generate it when we need to send the modifier map to the client. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cf6a2fc2bd94b392cfea120444d5e032d26f1d37 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Mar 30 17:25:39 2008 +0300 Input: Ignore modifiers in core input processing Modifiers get cleared by the XKB code when we drop down into core input processing, so just delete the dead code path to simplify things a bit. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6727ee94086d238f9f99379280d4e4827f388cce Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 9 16:45:45 2008 +0300 Input: Remove state from KeyClassRec We already have state fully stored within XKB, so instead of duplicating it, just generate the values to send to clients when required. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 08363c5830bdea34012dcd954b45ccfdc79a3a7e Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 26 18:38:25 2008 +1100 Input: Overhaul keyboard initialisation process XkbInitKeyboardDeviceStruct is now the only valid keyboard initialisation: all the details are hidden behind here. This now makes it impossible to supply a core keymap at startup. If dev->key is valid, dev->key->xkbInfo->desc is also valid. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 40877c6680863bd6a8475f2bb0c54df55bcf0b0e Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Mar 18 10:05:57 2008 +0200 XKB: Make XKB mandatory No more #ifdef XKB, because you can't disable the build, and no more noXkbExtension either. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f9da417163b6b2d6234d2542c1f375e33db7159a Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 28 19:26:42 2008 +0200 Xephyr: Disable state inheritance hack Prepare for the impending removal of the state field by disabling this hack for a while: it's hell of nasty and I'm amazed it ever really worked. Basically, on focus out, it should do as current DDXes do and fake releases for all keys (not just mangle the core state) that are currently down; buttons too. When focus comes back in, we already have a KeymapNotify that lets us know what's currently down, so we can use this to fake the appropriate keypresses, and send it through the event routing layer. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 5c281446d2a8c38511d45baee6f0d25a640f12e1 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 28 11:56:34 2008 +0200 XKB: Remove lock actions disabling For some reason, XKB allows clients to set a global (!) flag that simply turns lock keys into state no-ops. Ignore this flag. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 2f7cb7306709d5266688e05a066701d309323035 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 26 18:36:30 2008 +1100 XKB: Add XkbRMLVOSet XkbRMLVOSet is just a set of strings for rules, model, layout, variant and options; use that in preference to XkbRF_VarDefsRec, which is a hideously complicated monster that somehow managed to not include the actual rules. While we're at it, clean up xkbrules.h so it doesn't require xkbstr.h. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 3208eff2d7b856a4ac0d650498ccb36e7e62e034 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 21 14:45:06 2009 -0800 Update xorg-server.h.in & Xnest to use new XKB default #defines commit cdf216aa17b776130a91fa6792c321620e810a18 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jan 20 16:50:43 2009 -0800 Fix XKB default configure options to use the right variables commit 0d3c3dad21857ef502fe0d0235620a1228248e13 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jan 20 23:46:48 2009 -0500 Don't include fontmod.h commit 4f004ab9a83e209943760e1faa39f06c8eeb27af Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Thu Jan 22 01:36:31 2009 +1030 XNest: Fix the build caused by __XKBDEFRULES__ -> XKB_DFLT_RULES in 23862ede59a9ce11a06ec5151bde460fb836c603 commit e45a8a498d1ee8e40fc334805c38c05cb04b49d0 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jan 20 22:07:07 2009 -0500 Remove CreateUnclippedWinSize from window.h This is utterly wrong, but then, so is sdksyms.sh commit 20d2117eb82fb7ce91afd4f01fe1b9d4b1bf0459 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jan 20 00:17:42 2009 -0500 Move CreateUnclippedWinSize to mbuf It's the only user, so. commit e1611d8d55ade35bf8c2e1da7bc2dbf05b011301 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 27 13:34:05 2008 +1100 XKB: Be more verbose about XkbCopyKeymap failure in debug mode Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 5ee504cae5f17d16ee7599beaa4b1944a9a8aee6 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 27 13:31:18 2008 +1100 XKB: Trying to copy to the same keymap is not fatal Humour the user if they run XkbCopyKeymap(foo, foo). Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d929ba6886c6f121b101c0bf0f7c63ef9d851a3e Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 26 18:32:41 2008 +1100 XFree86: Input: Fail NIDR if we can't enable devices If we can't enable a device, bail out of NewInputDeviceRequest rather than blithely continuing. Also, be more verbose when initialization failed. Also, be more verbose when initialization failed. Also, be more verbose when initialization failed. Also, be more verbose when initialization failed. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 534669b376a6a703fbc97269d279a5418cf60c98 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jan 4 16:24:44 2009 +1100 XKB: Remove unnecessary prototype Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 27ea1a7e4e7eca394e052791c64bc6be515e075e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jan 4 16:40:46 2009 +1100 XKB: Only Xi events are processed Core events aren't run through these functions, so don't bother testing for them. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 2762cafc321166ac48f80146720709b1011e6894 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 27 13:35:42 2008 +1100 XkbCopyKeymap: inputInfo.keyboard is not a special case The device-walking code is still depressing, though. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 07c3bb922b8c1ae8fe28198f6c451430b836f21e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jan 4 14:12:19 2009 +1100 XKB: Move XkbCopyKeymap definition to xkbsrv.h Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4f35a34f3cd3df3c8af129936d1808dcc063d8a7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Aug 14 17:26:02 2008 +0930 dix: Remove traces of CoreDevicePrivateKey Obsolete with MPX. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 58a6b5b9eff25b1b9c6de239d6f5a952a31dfd15 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Aug 14 17:21:28 2008 +0930 Xi: don't care about CoreDevicePrivateKey when copying keys If we get here, we must copy. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 23862ede59a9ce11a06ec5151bde460fb836c603 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 10 14:36:16 2009 +0200 XKB: Allow build-time configuration of XKB defaults Instead of hardcoding base/pc105/us, allow users to change the defaults at ./configure time. Change the default model to be evdev on Linux. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 57a5eb2583bdf1069861fe2184de9739c0d0c7c1 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 17:40:54 2009 +0000 Xming: Update .rc file to tidy About and Exit dialogs Tidy up About and Exit dialogs, add keyboard accelerators Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit df3f701ef2d41ff4be4839f473ae71d33777bea3 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:17:23 2008 +0000 Xming: Ensure we dont try to print a null value when displaying xkb configuration Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit c612f0df45d388c98108e1e0c80afdfae05e338e Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:46:41 2008 +0000 Xming: Add styles keyword and attributes. Add handling for style keyword and atttributes in .XWinrc Update man page to document these additions Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 847a91ad2e8c9b0992c09f0ec38466885d6d25d4 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 19:57:56 2009 +0000 Xming: Notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. Fix internal WM to notify X when the keyboard focus is lost to a pure Windows window in -multiwindow mode. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 6c3e7e4d0568ecb7d10b814593bbbd817b7d2aab Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 18:28:34 2009 +0000 Xming: Only allow WM_MOUSEWHEEL messages to act on the client area of a focused window. Fix internal WM so it only allows WM_MOUSEWHEEL messages to act on the client area of a focused window. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d84e0e387764236c7e97509baf4606d96cfc19d4 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 18:20:44 2009 +0000 Xming: Correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created. Fix internal WM to correctly parent XA_WM_TRANSIENT_FOR windows in -multiwindow mode when a windows window is created, and to de-iconize parent windows when a child window acquires focus. XXX: Perhaps we should also shuffle parent(s) forward through Z-order when a child acquires focus? Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 8d82d806ee38d45ec7cdbf8b1f671ec1e4437567 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:46:38 2008 +0000 Xming: Correct the way display and screen number is reported in window titles and tooltips Correct the tooltip text for the toolbar X icon to be strictly correct, 'display-number:screen' should be ':display-number.screen'. Also for the default window title. Adjust the style of the Windows title in XDMCP mode from 'Xming - hostname' to 'hostname:display-number.screen'. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 656f92e247f2f257105daf1e0e6998e1b3d10eba Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 20:17:02 2008 +0000 Cygwin/X: should also use GetTickCount(), just like Xming Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7f781e780ee2b261c5cb688a8e6c5dc1a53bdb6f Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Date: Wed Dec 17 19:13:30 2008 +0000 Cygwin/X: Cygwin doesn't have RTLD_LOCAL RTLD_LOCAL is not defined on Cygwin Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 5630ff809676ab6b4833757060e48e201e8768a5 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 22 13:53:43 2008 -0800 Ignore generated dmx manpages Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> commit 64f924fbf513b5f91b3f2bcf5767f6fe927d3f7a Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 22 13:43:30 2008 -0800 Kill off --with-mesa-source completely There were a few spots left in the source that were using the --with-mesa-source defined headers or the now removed $(top_srcdir)/GL directory. These aren't needed anymore as all the necessary source for GLX is in $(top_srcdir)/glx. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> commit e1c8ee215797fa8c6a3a5421bb6f99b58064248b Author: Dan Nicholson <dbn.lists@gmail.com> Date: Sun Dec 14 14:18:58 2008 -0800 Don't reuse PKG_CHECK_MODULES identifiers Using GL for the PKG_CHECK_MODULES identifier multiple times means only the first call will actually be used. Later calls will be skipped due to GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a different identifier and DMX to just reusing GL_CFLAGS. Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> commit ca46c01869768a8661a9d8a71493ed5f0760a8ab Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jan 16 13:58:20 2009 -0800 XQuartz: mieq: Wait for the server to finish initializing before letting other threads mieqEnqueue Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes (cherry picked from commit 94e417ac87a98cd5c6bf2d7c495d702748398931) commit b33905234025f005819c7e2acd653a3a0ecfeb82 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 9 14:32:14 2009 +1000 xfree86: always force RAW mode under linux. The previous check for AEI on left us with the possibility that AEI is forced off in the config, but devices are added through evdev nonetheless. A keyboard added this way can CTRL+C the server. Even when we use kbd, we can set the mode to RAW, so it's safer alround to to so. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 646add4eb47c01c045ef64405510a08ecfb5bfd6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 16 16:04:07 2009 +1000 dix: remove XineramaCheckMotion, merge into CheckMotion. For 5 lines difference, we don't need to duplicate the whole function. really. commit e76f904abe530df9ddaa09510088c545298b0b91 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 16 15:53:50 2009 +1000 dix: remove "notyet" conditional compilation. If it's "notyet" for 3 years, then "yet" won't arive anytime soon. commit 5c41b3f9c8b72f0115019237f812d74610b82c24 Author: George Staplin <gstaplin@apple.com> Date: Mon Jan 12 19:30:43 2009 -0700 XQuartz: xpr: Cleanup some of the code and possibly fix part of the GLX Pixmap problem. Split DRICreateSurface into 3 functions. Make CreateSurfaceForPixmap use xp_configure_surface. I suspect this is partly why GLXPixmaps never worked. It will require some more work and thoughts for pbuffers, unless we fake those with pixmaps and surfaces. (cherry picked from commit 9cf264e67744262b9f45079e6cd752eb3e3b0e08) commit c5d52d4c37ebec92cb668b0653bf3de2bdfc5782 Author: George Staplin <gstaplin@apple.com> Date: Mon Jan 12 14:14:44 2009 -0700 XQuartz: GL: Make indirect.c build and work in the 1.6 branch. Reorder some header files and provide some types earlier on. Remove the static __GLXextensionInfo __glDDXExtensionInfo; that isn't used in 1.4 or 1.5, and seems to have been removed from 1.6. Remove the data structures associated with that too. Remove __glXAquaDrawableResize. The GLX structure doesn't use it anymore, and the Apple version did nothing useful before. __glXAquaDrawableSwapBuffers(): base no longer contains a drawGlxc member. Now provide the the Apple/Aqua context in the __GLXAquaDrawable struct. Add the context member to the __GLXAquaDrawable struct. Remove the fallback configs. They aren't used in 1.4 or 1.5 either. Remove init_visuals(). It's not used in 1.4 or 1.5 either. In the drawable constructor initialize the state properly, including the new context member. Remove glAquaResetExtension() -- it's not used anymore. This has been tested remotely and proven to work with glxgears, fire, various texture programs I wrote, and various Mesa demos. (cherry picked from commit d514152195452ae11ec7769c76489651620ad380) commit 1c504dff8a84804888f18ee9b184f0c4584185d7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Jan 15 21:03:27 2009 -0800 XQuartz: Fix builddir != srcdir issues and undef _XSERVER64 where appropriate on fat binary compilation commit 717a961528ec69a6e630d536e15568670e0b398a Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Sat Dec 20 16:17:02 2008 +0100 Don't release grabs unless all buttons are up Previously, only buttons <= 5 would count here, but the core protocol allows for 255 buttons. http://lists.freedesktop.org/archives/xorg/2009-January/042092.html Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit f7f85f696570541e2dd43462675de9e6ee46f545 Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Mon Dec 22 00:55:09 2008 +0100 Count the number of logically down buttons in buttonsDown This fixes the following bug. Assuming your window manager grabs Alt+Button1 to move windows, map Button3 to 0 via XSetPointerMapping, then press the physical button 3 (this shouldn't have any effect), press Alt and then button 1. The press event is delivered to the application instead of firing the grab. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 6f065a26db62aaf1d7aab9f9a3d0e6cd09d1c1dd Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Jan 15 21:42:26 2009 +0000 Xming: Reduce MOUSE_POLLING_INTERVAL Reduce MOUSE_POLLING_INTERVAL from 500ms to 50ms In -multiwindow mode, this determines how quickly X windows can track the mouse when it is outside any X window... Move the cursor around an xeyes, and you will see what this timing effects. commit c745db1674c3cb55249c9eb6e74939b74c42409c Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 5 13:52:45 2009 +0000 GLX: Avoid a crash when we have an uninitialized GL context If the GL dispatch table pointer points to glapi_noop_table, (due to some kind of GL initialization failure), DoGetString(GL_VERSION) (for example as invoked by glxinfo) will crash as it tries to do atof() on the null pointer returned by the noop dispatch function Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit e30032d0bbbf0bf71e1b53a4ac388f3bd6f68e53 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Dec 1 21:14:01 2008 +1000 Xext: clean up XGE macros. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 1ae529bef50a8ccc4a8a264ed120aeae544b21e7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jan 14 14:56:10 2009 +1000 dix: replace manual check for event types with IsPointerEvent() commit 1d54479cb3c8b4f75b7564f8b5e1c5da940b20f4 Author: Simon Thum <simon.thum@gmx.de> Date: Tue Nov 25 14:12:02 2008 +1000 xfree86: init properties when ptraccel configuration is found. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Simon Thum <simon.thum@gmx.de> commit 19275ea8e9dd93d5e61906943706dfe49003dd9c Author: Simon Thum <simon.thum@gmx.de> Date: Wed Nov 19 16:01:21 2008 +1000 dix: add property support for pointer acceleration. Note: properties don't need to be cleaned up, the DIX does it for us anyway. Data that is stored in properties is cleaned up by the property system. Handlers, etc. don't need to be unregistered while cleaning up, as they get deleted when the device is removed anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Simon Thum <simon.thum@gmx.de> commit d645721170b1196e5064b397cfbffd1da8c79bb1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 8 11:53:30 2009 +1000 mi: ensure chained button mappings from SD -> MD (#19282) After copying the master event, flip the detail field to the mapped button of the SD, not the physical button. This way if the SD has a mapping 1:3 and the MD has a mapping of 3:4, a press on button 1 on the SD results in a core event on button 4. X.Org Bug 19282 <http://bugs.freedesktop.org/show_bug.cgi?id=19282> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 639f289dcdbe00a516820f573c01a8339e120ed4 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jan 13 13:05:32 2009 +0100 EXA: Declare glyph cache picture as component-alpha when necessary. Without this, rendering component-alpha glyphs may break without a mask. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=19233 . commit f4e00b783d3f824058a5f140e6462142688f5116 Author: Michel Dänzer <daenzer@vmware.com> Date: Tue Jan 13 11:03:27 2009 +0100 Fix build with --enable-visibility --disable-xdmcp. commit d36adf52a2b2711d22b11105f7bd907d4493fb9b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 12 15:29:36 2009 +1000 dix: fix WarpPointer calls for devices with custom valuator ranges (#19297) If the MD's lastSlave was a devices with custom axes ranges, then a WarpPointer would position the cursor at the wrong location. A WarpPointer request provides screen coordinates and these coordinates were scaled to the device range before warping. This patch consists of two parts: 1) in the WarpPointer handling, get the lastSlave and post the event through this device. 2) assume that WarpPointer coordinates are always in screen coordinates and scale them to device coordinates in GPE before continuing. Note that this breaks device-coordinate based XWarpDevicePointer calls (for which the spec isn't nailed down yet anyway) until a better solution is found. X.Org Bug 19297 <http://bugs.freedesktop.org/show_bug.cgi?id=19297> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 488d45295105daf10ccd17ca93ae6a6f4d0104f1 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 12 16:16:24 2009 +1000 dix: EnqueueEvent and PlayReleasedEvent need to handle DeviceMotionNotifies No MotionNotify events in the processing anymore, so let's have them treat DMN instead. Reported by Thomas Jaeger. commit 1e470645983ad18fa38c0885d674bc9d1dc1e560 Author: Julien Cristau <jcristau@debian.org> Date: Tue Jan 13 00:12:56 2009 +0100 require randrproto 1.2.99.3 commit a48c81dcdf569a3f634ac23e08d2491354de6a36 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 5 16:24:57 2008 +1000 Xi: add XATOM_FLOAT to server-defined properties. This property is used to denote type float for input properties. Such properties can be accessed easily through the XIPropToFloat() function. Code originally written by Simon Thum. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 669f6810af9a89187d6149841925fe765f3988ff Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 19 15:50:57 2008 +1000 Xi: add XIPropToInt() auxiliary function. Converts an XIPropertyValuePtr to an integer, provided that type and format is right. Code originally written by Simon Thum. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 56efbc0986e782da45addb05ece9f456d41d7a90 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 9 13:46:20 2009 +1000 dix: drop x/y back into last.valuators before updating the history (#19285) positionSprite needs to scale to screen coordinates and in the process of doing so alters dev->last.valuators[0:1]. Drop the real coordinates back after finishing and before updating the motion history. This way, we don't push the screen coordinates into the motion history. X.Org Bug 19285 <http://bugs.freedesktop.org/show_bug.cgi?id=19285> commit 67710ad1d172cc4d53e28e5cc7dab2efb57a9a85 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jan 11 16:34:36 2009 -0800 XQuartz: Don't need explicit Activate/EnableDevice in InitInput (cherry picked from commit b1d29784410b3b93037e5636f336ba608d8ad6e3) commit dde5c591be74139ec6f2a90a3fdc7904d7342554 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jan 11 16:10:45 2009 -0800 mieq: Avoid possible race condition whereby one thread might call mieqEnqueue before InitAndStartDevices finishes This is more of a hack around the problem. This is something that will need to be addressed in a more structured manner with the multi threaded input efforts. (cherry picked from commit 3c596c061e75848cfa76dd9259c23a3f3a67444c) commit 0720816aea20971ee94b5df3faa9cb9f16e93f82 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jan 11 14:49:39 2009 -0800 XQuartz: Only call DarwinUpdateModKeys when needed Previously, we were calling it on almost every itteration through sendX11Event (cherry picked from commit 6461729647ff4441d80811e73f0c0d2f108f2700) commit c8bf582db8111f71b9250a602a9d5aa7bd828136 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 11:41:22 2008 -0700 XQuartz: Comment explaining the 0x10 flag for [e data2] (cherry picked from commit 3c695280641c1205b97d3bb9f1d5e15a19cfa45f) commit 5339c22a8ca8bce6cd2b51e97c904292e7c40e74 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jan 11 01:56:45 2009 -0800 XQuartz: Add locking to make mieq thread safe on OSX (cherry picked from commit 7a8d2266861e74176b5310b83652a9c10a170494) commit 1beff89810cd193e45d437846929b3938cee6d96 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Jan 11 01:55:26 2009 -0800 XQuartz: misc 1.6 updates (still --disable-glx) rlAccel is not longer compatable, and it's not worth fixing Don't override DeviceCursorInitialize with a noop Don't do a SwitchCoreKeyboard (which wasn't even needed in the first place) (cherry picked from commit c137f681680e1d04b1513a8be68aeda4d1c56fd5) commit 2d917cfe56af1e74205f80ddbaddfb5c6ce82f0a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Jan 10 01:39:08 2009 -0800 Apple: Don't use DRI2 (cherry picked from commit a1d35cee5907a76977ee43c49cb55c8f411c9794) commit 7a8abb9c8554d7967d912dcd427804f65906dc5c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jan 6 15:32:44 2009 -0800 XQuartz: Bundle version 2.4.0 (cherry picked from commit 3a3ccf5354e4275abe9d01f41a92602df5d690dc) commit 63ff7d236f67e159943312e1a551fcf5bb3f463a Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:45:24 2009 +0100 os: don't mix declarations and code commit f43a3c61ab1eab8aecdc0e4bdee9f3bae2cab234 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:44:53 2009 +0100 os: backtrace() returns int, not size_t commit 5321ae76cffc5fcfe4bebcfb10e08eecaf640503 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:44:29 2009 +0100 os: ANSI cleanups commit 47438a2161a92fec08081d2de28966cf8d31654a Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:43:48 2009 +0100 randr: RRSetPrimaryOutput can be static commit 7f82114b1dc738f98b9f22f6e61d6d5191383b67 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:43:35 2009 +0100 xkb: ANSI cleanup commit 46f3c1b937002f9a860878b359dcf5756a82dcf2 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:42:57 2009 +0100 mi: don't mix declarations and code commit 5aa9483d3ee306a79a9235610ce6b2754d697585 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:42:28 2009 +0100 mi: ANSI cleanups commit 359ed32c9b013ed88e14c99aa7fd7a617a85e2c5 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:40:58 2009 +0100 xnest: only define ddxBeforeReset if needed commit 9651cd8d7ac26635b6fb1826806ac9f4e2bddb63 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:40:47 2009 +0100 xnest: ANSI cleanups commit 31439195c51f183f5a8989a8d4f95b3e6326eda0 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:37:06 2009 +0100 xfree86: linuxPci.c needs a prototype for xf86AccResFromOS commit a00dbd0015845e08ef2af9480cc3833819cf86f5 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:36:16 2009 +0100 xfree86: use %zu to format size_t arguments commit 17c8cb50990a9ad20bbd3f8ce14c149dac9d72ad Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:34:56 2009 +0100 xfree86: don't mix declarations and code commit aec4c0caca41a06832536ba82ba5bcdccf4a0aea Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:33:18 2009 +0100 xfree86: ANSI cleanups commit dba3b1944d04232f88bb310277639f2c1adcbe08 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:28:23 2009 +0100 Xvfb: ANSI cleanups commit a2a760e33c17e211650b1f53c05a89c013916cf3 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:25:39 2009 +0100 dix: don't mix declarations and code commit 466dddbb83aa37ae93fb32976d51ecaa947c3616 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:25:17 2009 +0100 dix: fix cast from pointer to integer commit 54332e4732577dc49e440d9c9f8dd7d791f03f8e Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:20:06 2009 +0100 dix: ANSI cleanups commit ef9902652b8a1c716ea3851565d6e2a98bd30eb0 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:18:56 2009 +0100 config: ANSI cleanups commit e64473b14e091e4b75e6ac2bf9a35e9aaa907258 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:17:41 2009 +0100 Xi: fix missing declaration of XkbSetRulesDflts commit 6e20a4ae731b7bc72266e5809faa0ecfde2bdfe4 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:16:55 2009 +0100 xsync: make SyncAlarmCounterDestroyed static commit 292311b421e53ead53c7df67d735a3d6d3e5b515 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 11 08:16:12 2009 +0100 Xext: ANSI cleanups commit 7a05c8b1e70680ddd3b3e09ad448788f8d70a428 Author: Julien Cristau <jcristau@debian.org> Date: Tue Dec 23 13:08:49 2008 +0100 xfree86/linux: fix log flood on acpid open error When we can't open the acpid socket, warn once, not once every second commit 0d8184de591c75794083c8a8ca3fb8459e9394bc Author: George Staplin <gstaplin@apple.com> Date: Fri Jan 9 16:08:26 2009 -0700 XQuartz: GL: Set the __GLXconfig renderType to GLX_RGBA_BIT. (cherry picked from commit 3c14546f58f8a138fe67c9cacc3bd0b7fa90c29a) commit 9c3975d63e129ad7230cae585f08a962d45fb861 Author: George Staplin <gstaplin@apple.com> Date: Fri Jan 9 15:53:39 2009 -0700 XQuartz: GL: Make many more fbconfigs and visuals available for the 1.5 branch. Use a __GLXconfig linked list struct to store the configurations for the fbconfigs and visuals in a pGlxScreen. Also, remove the __GLXvisualConfig/GlxSetVisualConfigs code that isn't used anymore. There is more code we can remove later, but I want to do that in separate commits. (cherry picked from commit 94162b0f8a25267aca280d25e216cc6bde47da6e) commit a68373994f4957a73f4eab52c90ebcfb96f285f8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jan 7 18:27:21 2009 -0800 XQuartz: Update padding in appledristr. This shouldn't change how the struct ends up in memory, but should make it more obvious for human eyes (cherry picked from commit f7b6c1907c326a1befd8b5c8a1d311d551e8670f) commit 5f3188228eb988bd8f08b62c84f98a8ff66ee283 Author: Xiang, Haihao <haihao.xiang@intel.com> Date: Tue Jan 6 10:03:19 2009 +0800 avoid a potential endless loop. Previously it is possible that creating rotation data, then cleaning up and creating again so that pScreen->BlockHandler and xf86_config->BlockHandler all point to xf86RotateBlockHandler. See bug #19343. commit b2756a71a432f7cf7c870a48676c98625512558d Author: Thomas Jaeger <ThJaeger@gmail.com> Date: Fri Jan 9 02:02:38 2009 -0500 Xext: Send out correct events in ProcXTestFakeInput Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9bf77569cc8f9b0cc25c99487672d375d7c32f99 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jan 8 16:32:24 2009 +1000 Xi: call CheckMotion for floating SDs too. CheckMotion updates the sprite position so we need to call it for all devices that have a sprite - including floating SDs (which have an invisible sprite). commit 83eb863e3cfcd62549b836f3195107d8908b36d0 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 9 11:39:02 2009 +1000 Xext: don't accept DeviceValuator if the dev doesn't have valuators (in xtest) Reported by Chris Ball. commit a3f9e887d9ff5fdee6c35ccc0f7b324723a83a46 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jan 9 11:40:18 2009 +1000 dix: don't accept Button 0 presses in GPE. commit 0c6987df3b9b3a37d201d740d8248c326449835e Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 17 16:10:51 2008 -0400 XAA: Disable offscreen pixmaps by default. Say Option "XaaOffscreenPixmaps" to turn them back on. Apropos of bugs #13795 and #15098. But this still isn't correct. commit eb2d7b3d700952ba88c77deacf687b251300e660 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 19 21:05:47 2008 +1000 dix: move focus handling into enterleave.c. This commit moves the focus handling from events.c into enterleave.c and implements a model similar to the core enter/leave model. For a full description of the model, see: http://lists.freedesktop.org/archives/xorg/2008-December/041740.html This commit also gets rid of the focusinout array in the WindowRec, ditching it in favour of a local array that keeps the current focus window for each device. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 673eb23aac578dcdc04e2a99d1fa5c2987eb58b8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 19 21:05:09 2008 +1000 dix: add a few auxiliary functions for the updated focus model. SetFocusIn and SetFocusOut, including the static array to keep all focus windows. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 38b28dcadd0990cb43f50db4300eebb8f044db96 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Dec 18 15:55:11 2008 +1000 dix: reduce FirstPointerChild complexity Instead of keeping a flag on each window for the devices that are in this window, keep a local array that holds the current pointer window for each device. Benefit: searching for the first descendant of a pointer is a simple run through the array. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 72ad4a85cc0ffe60a90011d65ef718d5852beae4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Dec 18 15:43:18 2008 +1000 dix: remove now unused "exclude" parameter from FirstPointerChild Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 0aa4460c3b4f9bb17d5412d76fa8c4c501132429 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 17 16:14:41 2008 +1000 dix: re-implement enter/leave model. The old model was implemented based on a misunderstanding of NotifyVirtual and NotifyNonlinearVirtual events. It became complicated and was broken in some places [1]. This patch wipes this model completely. A much simplified implementation is provided instead. Rather than a top-down approach ("we have a tree of windows, which ones need to get which event") this one uses a step-by-step approach. For each window W between A and B determine the pointer window P as perceived by this window and determine the event type based on this information. This is in-line with the model described by Owen Taylor [2]. [1] http://lists.freedesktop.org/archives/xorg/2008-December/041559.html [2] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html commit f8ecc2f08fc375b14d60a74e2fdd7830bfdcd74f Author: Christian Beier <beier@informatik.hu-berlin.de> Date: Tue Jan 6 11:31:03 2009 +1000 Xi: fix typo in WarpDevicePointer handling. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3d549438c29004d78032ecc50ab45ca0e3f49623 Author: Thomas Jaeger <thjaeger@gmail.com> Date: Mon Jan 5 01:26:42 2009 -0500 Don't alter device button maps in DoSetPointerMapping Currently, if a device map differs from the core pointer map, then the request may return MappingBusy, even though all the affected core buttons are in the up state. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b72c6b083baeadfd7b18b6025df054be502d6e28 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jan 6 09:01:48 2009 +1000 dix: remove inputInfo.keyboard reference in QueryPointer handling. PickKeyboard() is to be used instead. commit 30d2cfcd3851870178d62e5067211aa36f87fbd2 Author: Kim Woelders <kim@woelders.dk> Date: Mon Jan 5 19:35:18 2009 +0100 dix: Fix handling of do_not_propagate_mask window attribute. This was broken in 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2. Signed-off-by: Kim Woelders <kim@woelders.dk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 515ce3e4ba42605a1ee9979e8bb5acd3cf6470a3 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jan 5 15:48:45 2009 +1000 xkb: fix typo - missing negation when checking button state. Introduced with a85f0d6b98237d8a196de624207acf1983a1859a. Reported by Thomas Jaeger. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 9a313fb03153eb764aab3e9cb9988b6603541637 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Jan 7 23:07:01 2009 -0200 Don't call free, use xfree macro. There are several other direct calls to free, check % egrep '\<free\(' `find . -name \*.c` but they are free'ing memory from explicit malloc calls. This one was not intended, and corrected, so that it would both, follow the conventions everywhere (and work on some libc that doesn't like free(0)), and make it easier to use malloc wrappers. commit 49b93df8a3002db7196aa3fc1fd8dca1c12a55d6 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Jan 7 19:37:03 2009 -0200 Default to use standard bitmap fonts, with builtins as fallback The builtin-fonts configure option was removed, as it at best should have been a runtime option. Instead, now it always register all "font path element" backends, and adds built-ins fonts at the end of the default font path. This should be a more reasonable solution, to "correct" the most common Xorg FAQ (could not open default font 'fixed'), and also don't break by default applications that use only the standard/historical X Font rendering. commit 4f004231871c830e16c4525cfaab183fad0aee86 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jan 7 10:55:08 2009 -0800 XQuartz: Fat binary buildfixes Let Xarch.h set X_BYTE_ORDER for us. Determine _XSERVER64 at build time. (cherry picked from commit f54736c2b0b537c8322ecb2db8e9cee5eea68165) commit fbf44d85bd59bfa629193d6494b16812a7343cab Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 5 23:18:11 2009 +0000 Cygwin/X: Tidy up an unused #define Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 1badeb78b0b974a381e563e3d4f4cf37debd4266 Author: Rémi Cardona <remi@gentoo.org> Date: Wed Jan 7 09:31:17 2009 -0500 Include Xmd.h from edid.h commit fc14d52297f8f408693ed867ab649ea5b210b0b3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Nov 16 15:35:17 2008 -0800 XQuartz: Use AvailabilityMacros.h instead of availability.h for Tiger (cherry picked from commit 91f3c3435716195e6d606c8e2f6b0de52eb5972d) commit 4c326c4d342bede0de57e71c1431f56188f812ce Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 6 08:36:39 2009 -0800 Make cvt complain about invalid arguments more often. cvt doesn't correctly parse 'cvt -vr 1920 1080'. This patch doesn't fix that, but it does at least generate an error message now. Signed-off-by: Keith Packard <keithp@keithp.com> commit 1da4a41b0881b605c7cfa4c4bf637efa132c58fc Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Tue Jan 6 05:01:32 2009 -0200 Add sdksyms.sh to EXTRA_DIST to correct make distcheck Thanks to <vehemens at verizon.net> for noticing the problem. commit 200230535fa80c04faaa562bbbd8272713e2763b Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Mon Jan 5 16:49:57 2009 -0200 Update sdk headers to export new symbols. All symbols in installed sdk headers should be explicitly tagged as exported symbols. Otherwise, to ensure it is not a mistake, one could write it as something like: extern /* NOEXPORT */ type name ...; but the proper procedure really should be to use a non sdk header (or a "noinst_" one). This patch also removes prototypes to some functions that existed only temporarily. commit af6152499654a7146250d4ad0df89f611345434e Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Dec 17 14:15:34 2008 +0000 Cygwin/X: Add *.exe pattern to .gitignore Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 8428b92fcb478b041f778c0e8c66fdeb96c807f3 Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Jan 4 20:12:16 2009 +0000 Xming: Fix a couple of warnings Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit f6f97419bd2db651384ecaec0b296840810463a4 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Jan 5 18:35:52 2009 +0000 Cygwin/X: Add -static back to linker flags Add -static back to linker flags to avoid screwing things up for people who don't know that they need to avoid dynamically linking with libXfont, as weak symbol handling requires static linking to work correctly on Cygwin... commit 2ec0ac08addb938a3d5aa5b9888ce7c79a0daada Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Wed Dec 17 19:18:38 2008 +0000 Cygwin/X: Fix some remaining build issues Fixes for a few remaining build issues, omitted from commmit 6e85a8304b50c0bfd16a400a05d257f0168fb99b in error Provide VENDOR_RELEASE in XORG_VERSION_CURRENT for XWin Remove -static from linker flags for XWin Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit e351d10773742d1570e1111976b7c8b6adda5ae6 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jan 5 17:41:38 2009 +0200 RandR: Only export Xinerama symbols when building Xinerama support Otherwise compilation fails due to sdksyms. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 3387cbb7c13636eb62b22640d28df7011c2268f0 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jan 5 11:25:57 2009 +0200 XFree86: Xv: Add ClipNotify helper Add a ClipNotify helper that lets the driver know about changes in the clipping of an Xv backing drawable. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 55c4ec0a1ef78481b4d82153c19c20fbf88f1624 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jan 5 11:24:24 2009 +0200 XFree86: fbdevhw: Add helper function to get fd Most devices need to do custom weird ioctls, so let them know what the fd is. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 7da4e901e078e5597b8dbcb7ee39b949edf7ef03 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jan 5 11:23:39 2009 +0200 XFree86: Fix build with DGA disabled It's optional, so we might as well work when it's disabled. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 13ce7b98d48261b061da5768a6405bdbe9caa1fb Author: Dan Nicholson <dbn.lists@gmail.com> Date: Mon Dec 22 14:31:03 2008 -0800 dmx: Require newer libXi for XQueryInputVersion Signed-off-by: Dan Nicholson <dbn.lists@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 27011254c4de4e573a0851bf46892fb488db6522 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 23 09:59:28 2008 +1000 xfree86: If an input device failed to activate, return immediately. Devices are only activated once - right after they've been added to the server. If a device failes activation, it's dead. There's no reason to continue. Return the error code from ActivateDevice() without setting up sprite information or even sending a event to the client. Then - in the DDX - just remove the device again. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e1a3a1a0d85c9971aea65c2228b5fd4dbf3bf57a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 23 10:00:34 2008 +1000 xfree86: don't call CheckMotion if a device hasn't been enabled. #19176 X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=19176> commit af820259a06a6e8dbd299fe22347aa83b0c985b0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jan 2 11:06:12 2009 -0800 XQuartz: Copyright Update... happy new year (cherry picked from commit 9f1c26ae8d9ccf81cba0ab946326968a701f8c36) commit d8c9ba37abd0d63ea2c5394af434b46ec3b647fd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jan 2 10:58:40 2009 -0800 XQuartz: pbproxy: Push dpy init and CFRunLoop hook setup into the pbproxy thread to avoid possible deadlock (cherry picked from commit 49e59d32b88e4fad070f230b5efaa261b47f78db) commit 2f361186f93a791e446c4a9471bb0c3b9b818d98 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 31 12:40:02 2008 -0800 XQuartz: Don't use NX_SECONDARYFNMASK, NX_NUMERICPADMASK, NX_HELPMASK We don't have keycodes for them, so don't try to use them (cherry picked from commit cb912aca3a2834c4ad8e386c8a0d05c1bb31b0e7) commit a2abaa9fd3a5ad713c1f946e9d7f598825ad3a84 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 31 11:57:49 2008 -0800 XQuartz: Make sure to reset the saved key state when deactivating X11.app (cherry picked from commit 3eef78eb321f4f7dbca5a10c80666c621e28a1e0) commit 3986b683adc4f6f967cc5f643e973d89764234c7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 31 12:44:43 2008 -0800 XQuartz: Honor system key repeat rate (cherry picked from commit 4303c9be39a86f5a21de108f72b90a989435905e) commit 1a69d56afda082298edc76271d2cb71af00526ce Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 29 19:54:12 2008 -0800 XQuartz: Better avoid stuck keys on context switches (cherry picked from commit e9963f1a4f4f12f253eae9d4f01694b6cabe35ad) commit f464b5a9164b24f74adea198bcabe9affaf5552c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 29 19:38:31 2008 -0800 XQuartz: Workaround OSX VNC server bug for modifier key state A better approach which ensures we have a L modifier key down if we are told neither are down and atleast one is down... =/ (cherry picked from commit bc13dda345f716bf4de9bfe4e1d85969263b60c2) commit 3ead9aa2602cab9c883aa7bcbd2a8d82c5c88f5a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 29 00:30:31 2008 -0800 XQuartz: Updated man page fullscreen_hotkeys fullscreen_menu (cherry picked from commit 00f3a2e33c8e91da5f855821313a04ea97445656) commit 48dbaf173a82693fd72953983da9fc556cd1c6ed Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Dec 30 12:17:14 2008 +1100 XKB: Also copy keyboard feedback when copying the keymap When updating the XKB keymap, make sure the keyboard feedback is also copied, to preserve autorepeat settings etc. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit cf85a32b5f80694f3c2f434e91cf77edb33a7c17 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 28 15:57:59 2008 -0800 XQuartz: pbproxy: We explicitly need libX11 for pbproxy (cherry picked from commit 32824120da0749b8369c2592f851bb1030dea9f1) commit 997e8c321bb11067591785ba38103a3a5029301d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 28 01:53:38 2008 -0800 XQuartz: Try harder to get the user's login environment (cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa) commit ae8dc47fd910ec4b9edd64bf3b7ba33e212c5942 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 24 00:39:06 2008 -0800 XQuartz: Reposition windows when we enter fullscreen to ensure our root window (cherry picked from commit 7617d3659b5481ef85aecc1f936e7dd2662bdfbd) commit 895186e026881196ac9383aa165e123055d9cf09 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 23 20:33:27 2008 -0800 XQuartz: Re-enable rlAccel It was incorrectly blamed for some crashes a few months ago, and it should be safe to use until we get an EXA driver to replace it. (cherry picked from commit 8121f30bd29591fc74fbc680fbbf20210271fa58) commit dc4498ec5cb7f25f710bdec8793746da2d2324ed Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 28 22:16:52 2008 -0800 Updated .gitignore (cherry picked from commit 06964c322e4da81f3146022049a2de13f6b2892d) commit 3534a5e5d9c5af85149c799f324257f89507fa23 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Dec 26 16:38:27 2008 +0100 exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps. commit 027b440d4f9f0cdd46addff46fd2d5c44cd5c847 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Dec 26 15:51:55 2008 +0100 exa: preparing as source and finishing access as mask is a bad idea commit 89bbd07e9ddd688df81405151f9c6284fa3367a8 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 23 21:40:21 2008 -0800 Remove obsolete XF86_DATE & xf86Date.h commit 8dc3a7d6817b7371bbfece1108ef856788256853 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 23 14:59:46 2008 -0800 Remove unused CLOG_DATE (leftover from pre-git ChangeLog) commit fe05a46f191ebd36251dda7a9703d90c25efec11 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 23 14:55:26 2008 -0800 Remove powerpc load/store functions from export list on other platforms commit a1b201bcb01e702f8f0a5889a3d49317503b9475 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 23 12:39:38 2008 -0800 XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth (cherry picked from commit 80b65c5b78d125c4ad3620b87b121c9e666299c3) commit 86dc660588a615baefb1799d78a501c95a931d77 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Tue Dec 23 18:07:54 2008 -0200 Improve sdksyms.c automatic generation (Fix #19245). Since it is already parsing cpp output, create a dependency file in the same process. This will cause sdksyms.c to be regenerated whenever a sdk header is modified. This also uses the gmake 'sinclude' directive (don't fail if included file doesn't exist). This should not cause any problems given that gmake only constructs are used in several other Makefiles. commit 477c32708718f4470ac2e786b2446d7a44e45b9c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Dec 19 08:56:35 2008 +1000 dix: don't disable uninitialized devices. If a device hasn't been initialized, it doesn't have a cursor yet. So don't set the cursor to the NullCursor, and don't try to DisableDevice either. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 25aac8b5793caa92116b766d5a9e12dbecdb0290 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Dec 2 16:16:58 2008 +1000 xkb: don't treat groups with different no of symbols as identical. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit f141c1b4bb9482f188783dd6f161d3c7960a3329 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Dec 2 14:54:50 2008 +1000 xkb: explicitly check for group replication in the core representation. Single-group keys may get replicated amongst all groups. Check explicitly for this case and squash it down to one group. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 70a977c021e107c4fabe46ec2f619be9fb55abeb Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Dec 2 15:36:51 2008 +1000 xkb: don't replicate past the number of groups we have. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a157575eeeb523cd43197c5caeb00cb3d56f9988 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Dec 2 13:31:58 2008 +1000 xkb: ensure enough symbols for core Group1 replication. A single-group key on a multi-group keyboard has to be replicated across all three groups (see Section 12.4 of the XKB protocol spec). Ensure that there's enough symbols available to actually do that. e.g. a key ABCD on a 3 group keyboard needs to be replicated as ABABCDCDABCD, hence requiring space for 12 symbols, even if maxSymsPerKey is less than that. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit b5736d237a21d5e65d839c4d213dd3bda5a11e9d Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Dec 22 19:53:14 2008 +0100 randr/xfree86: Fix initial gamma computation. - The previous version overflowed sometimes. commit ba9dc353a60e9a6bba64e854b23271011bff7015 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 21 21:03:59 2008 -0800 XQuartz: Don't use keycode 0 to determine !swallow since our most common key to swallow is actual keycode 0 (a) (cherry picked from commit 33f43a7f03023bfbab25a957cb81fc25b4afa4ca) commit f0cdccd1e22198f4f5e1aa0d0617441b79ffbc44 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 21 20:40:36 2008 -0800 XQuartz: Update our "screens" when we toggle rootless rather than when we toggle fullscreen This old behavior was used as a workaround for the menubar behavior in the older server, but we handle it better now and need to update our screens when we toggle the rootless state instead. (cherry picked from commit 508aa95bc2cd3fdc3dff448ec090919bf807d153) commit 8f04a5237384fa97ff960b4607a79b688ea03fc1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 21 14:54:11 2008 -0800 XQuartz: Run applications via '/bin/sh -c ...' to support users who expect shell parsing (cherry picked from commit 67455e716e3ecffd528930479192785958d37988) commit 029d255a654eca6401c374d145f63bbb923554b5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 21 14:43:12 2008 -0800 XQuartz: pbproxy: Release display notification lock when not needed to avoid deadlock (cherry picked from commit 22f664ab95a0cae981e9cefad6f075d051583ca5) commit b1f166f2981595aea6f8e2a336d6d25436f8a07d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Dec 21 14:42:26 2008 -0800 XQuartz: update quoting in case X11.app is moved to a directory with a space. (cherry picked from commit cc805dc799efa37c8dcefa3db04d87e9b835ffbd) commit 2f47bda645eb43c60b71315e8d265190acce481d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Dec 18 09:14:16 2008 -0800 XQuartz: Changed X11.sh to allow use of a ~/.x11run as requested by users of alternate shells (cherry picked from commit b62ed1f8eaf041a946bb591165bb18ee481dedbf) commit 83edcc08de4c815c5cbe815f521b3b728441cad6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 17 15:09:35 2008 -0800 XQuartz: Get rid of white rectangle bug (cherry picked from commit 3269959033ed0c675a3a906666454df34086896a) commit 1335a300b9cd03208a583acfdb7f7153eaef4ea6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 17 14:43:02 2008 -0800 rootless: Make expose_1 static (cherry picked from commit 60c8d2697036a125ca5381df8e2eaedabad4d242) commit 22b2811e6aa0bdbfa6a0682ac862063e52ec0c62 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 17 13:54:53 2008 -0800 XQuartz: Name the startup shell script X11 for better compatability (cherry picked from commit f84613d6fcbbb5f769ee34cff0900353a13693cf) commit 82fba7697fbbb6f66cc22424ba99755b99ff482e Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Dec 22 00:33:55 2008 +0100 xfree86/randr: Avoid a crash when xf86CrtcConfigPrivateIndex is -1. commit 1567b7243f4799808ab93fbd962df14ce3af2d49 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Dec 21 00:08:56 2008 +0100 exa: A more correct fix. commit 2db7b66863ae6055c3ce13c88b36d620de8a4d75 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Dec 19 23:12:37 2008 +0100 exa: a few cleanups - Some warnings silenced. - Some whitespace cleanup. commit aedd2f566df585db7a1614f302cc8d3feda54275 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Dec 19 19:10:23 2008 +0100 randr/xfree86: Fix a one off error in the panning calculations. - Example: mode 1280x1024, panned area 1281x1024 panned_area.x2 = 1281 mode.width = 1280 If you substract 1280 from 1281, then that leaves you with one. Which is the one pixel that you need to move to actually see the last pixel collumn. Substracting 1 from this will consistently prevent you from seeing the right and bottom edge. commit 332d65ec7a6e94d75efe95d53742f137835274de Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Dec 19 18:59:27 2008 +0100 randr: Consider panned crtc's when calculating xinerama screen sizes. - This will allow window managers and applications to actually use the panned area. commit f2d1de6c2a3e6e50db6d9714c293eb26324fbd3d Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 19 10:27:37 2008 -0500 xv: remove useless XVCALL macro commit 5a072c55350f4b73d911ea6a2aeddad844924834 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 19 09:51:52 2008 -0500 dmx: Fix calloc macro confusion. commit 8c488ac3b3990cd203baed7f2127b9bed8aab534 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 18 19:47:49 2008 -0800 Fix linking of Xorg with dtrace probes on Solaris commit 396433d0da721951e6e7abc02dc3b2f682495154 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Dec 18 18:49:47 2008 -0800 Fix sdksyms.sh to work with Solaris/Sun compiler builds - Pass $(CPP) & $(AWK) settings from configure to sdksyms.sh - Only reset sdk variable (tracks if header is part of sdk) if a filename is included on the cpp # <line-no> <filename> line, since Sun compilers omit filename when it is unchanged from previous line. commit aea6f19f25e13768b1d09fac4991d6a5e6c2cdac Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 16 17:10:03 2008 +1000 xfree86: don't restore the TTY mode if we didn't initialize it ourselves Restoring it unconditionally means we restore to whatever tty_mode has as default value (i.e. 0). K_RAW happens to be 0x00, so we always restore to raw mode if allowEmptyInput is off. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Julien Cristau <jcristau@debian.org> commit 5d065a889074558634216eebd4bba35a60db9a09 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 18 13:59:36 2008 -0500 xselinux: Use xace Xtrans wrappers instead of the now-inaccessible wrapees. commit f87e66486c3610c56888915b66ae5ab0af03da8b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 18 13:58:35 2008 -0500 xace: Export wrappers around two Xtrans functions used by modules. Don't know a better way to do this, since Xtrans isn't a library that can be linked into modules. commit 777408914dbf395e9969e3f34720286e6f740369 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 18 12:35:57 2008 -0500 Add xace headers to the SDK when enabled and export the XaceHooks symbol to modules. commit 9e4ef3cfe5ee178c266edd64a8edd767827aa0d7 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 18 15:00:25 2008 -0200 Use regex pattern understood by all known awk variants. Ubuntu uses mawk by default, but it doesn't understand posix character classes (which are locale dependent, and this patch uses only valid C identifiers). Also make sure awk runs with LC_ALL=C to match the regex patterns. commit 3d3c234b434a3443a00c3be9f32c698bcced111c Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Dec 18 16:26:38 2008 +0100 randr: add some notes about the stuff that changed in driver ABI 2 commit 1b244feb4cf11d1cdba79fbead50035965535552 Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Dec 18 16:11:21 2008 +0100 randr: check for malloc failure commit 21a2df9f359584e634dc12d8602401d54defd7db Author: Colin Harrison <colin.harrison@virgin.net> Date: Sun Nov 2 20:46:44 2008 +0000 Xming,Cygwin/X: Fix crashes when using the DirectDraw '-refresh rate-in-Hz' option in -fullscreen (#11128) fd.o bugzilla #11128 Fix crashes when using the '-refresh rate-in-Hz' option in -fullscreen mode and using a DirectDraw engine. On failure (typically 0x80004001 DDERR_UNSUPPORTED), use the default refresh rate for the driver, instead of the entered value. Also fix some nearby error reporting Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit b0ed1567c1782041cf3d14ec6dd4d622915c7d0c Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Dec 17 17:16:02 2008 +0000 Xming, Cygwin/X: Tidy up warnings, headers and unused variables (#11132) Tidy up various warnings, include headers and unused variables, etc. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 15c4a6e088039e14b4f2387ff204cb5448916b39 Author: Colin Harrison <colin.harrison@virgin.net> Date: Wed Dec 17 16:44:07 2008 +0000 Xming, Cygwin/X: Fix crash in function winMultiWindowGetTransientFor() (#11147) The function winMultiWindowGetTransientFor() crashes, due to a bogus pointer dereference, but this fact was previously hidden by the function not being called! Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 08a3d6928c87032998b6113d67f69b79b09eecee Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 16 14:19:12 2008 +1000 dix: Allocate the space for the DCCE when the last SD is removed. This still doesn't fix reset the MD's classes (a TODO that's been here for ages), but at least we don't segfault anymore when detaching the last SD. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 689be0cb4b259840208c17f974066a942196793a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Dec 16 14:19:38 2008 +1000 dix: set the correct length in CreateClassesChangedEvent. Fallout from aeff14d5f208d02f211b8b2a1a98999624e8c2cf. Yes, we don't malloc anymore because we are inside a SIGIO and the memory is already there anyway. But we still need to set the event length correctly, otherwise mieqEnqueue/mieqProcessInputEvent don't know how much memory to copy. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1001403301001fcc84ce6833938590956df40d2a Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Dec 18 00:19:06 2008 +0100 Forgot to fix a comment. commit 9fa15bef59881bdcf087889f16ab3c8d953da8f1 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Dec 17 23:42:30 2008 +0100 randr: some improvements, fixes and crtc abi bump - Add active field to crtc. - Set gamma (only) whenever a crtc becomes active. - Check for xf86_config being NULL. - Increase crtc abi to 3. - A few other fixes. commit bf65523ab0b39774f07a7ae478ff3f5653fad469 Author: Joe Krahn <jkrahn@nc.rr.com> Date: Sun Nov 2 20:17:03 2008 +0000 Cygwin/X: Fix for mis-aligned icon data creates bad background masks (#4491) fd.o bugzilla #4491 Transparent icon backgrounds appear with black stripes as mask data is incorrectly aligned. Modified the icon DDB bitmap data alignment to 16 bits Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 91f73b79b7ae64e5b846d1efeb470bb61a913720 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Dec 17 16:56:26 2008 +0100 randr: Improve per-crtc gamma support. - The Gamma values from the monitor section are now used during initial config. - The old colormap system is disabled when gamma set hook is available. - Gamma values are now persistent for the lifetime of the xserver. - This requires no driver changes and should be driver ABI compatible. commit 1556815d34cecb4b4b62d2a4ce813b1435a937ec Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:18 2008 +0000 Cygwin/X: Initialize native HWND atom when built !XWIN_MULTIWINDOWEXTWM Fix the native HWND atom identifier to be initialized correctly, when built without external WM support This is neccessary for native window naming to work correctly in multiwindow internal WM mode. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 92082a0a00f05ecdc90814a8104828853c9c8f29 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:15 2008 +0000 Cygwin/X: update to use standard DPMS stubs Bring Cygwin/X up to date with DPMS API changes by using the standard stubs Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 2850f26bb2999ef3fb2a10adb80fe358463aecb5 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:14 2008 +0000 Cygwin/X: update for changes to shadow framebuffer Bring Cygwin/X up to date with the change to damage-based shadow framebuffer. Register the screen bitmap as the shadow framebuffer after screen resources are created. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 35d76028304f910edeaf642376df71b8134ec02c Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:13 2008 +0000 Cygwin/X: enqueue a pointer motion event on mouse movement Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 816e0d243df068bc06d328874b5655d4530fe16a Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:12 2008 +0000 Cygwin/X: update for changes in mieq API Bring Cygwin/X up to date with mieq event API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit bca7483c4e95ad450fb09048a3b85bb3056a0518 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:11 2008 +0000 Cygwin/X: update for MPX device changes Bring Cygwin/X up to date with MPX device API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 829a8a970dd17623ef3cb5022d34190744f74741 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:10 2008 +0000 Cygwin/X: update for MPX cursor API changes Bring Cygwin/X up to date with cursor API changes Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit d61e902aab92c262e6c8ee9cd70aec4493cf6cae Author: Francis Giraldeau <francis.giraldeau@revolutionlinux.com> Date: Wed Dec 17 09:49:39 2008 +0200 Don't log audit messages when -audit 0 specified make the auditTrailLevel check more general and don't log when not using DTRACE and -audit 0 is set. commit 295a3fa721ee2f2226891de308c0c4b0ee26fe72 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Dec 17 02:04:12 2008 -0200 Ensure symbols required by swrast_dri.so are visible. commit 6d8ea5104cf97dbf64612f58fc06f94f869ed5ec Author: Colin Guthrie <cguthrie@mandriva.org> Date: Tue Dec 16 17:44:27 2008 -0500 Fix compilation with -Werror=format-security commit 1bb5a919f4bf38ac96c73077021b0cdc82965f31 Author: Adam Jackson <ajax@redhat.com> Date: Tue Dec 16 13:46:59 2008 -0500 config: Add vboxvideo and tga to the magic driver list Also sort the list while I'm here. commit 8511a964f81b3b06a526f0fca4232afb2152f405 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Dec 16 18:21:20 2008 +0100 randr: Update EDID_ATOM_NAME to reflect RandR 1.3 name change commit a058192d970f7417b06334aa666c17e9891795c6 Author: Owen W. Taylor <otaylor@redhat.com> Date: Wed Oct 22 16:12:53 2008 -0400 Xephyr: Fix crash with control-shift and GLX (#18185) When we are looking up the screen for an event, we need to take into account the fact that the event may have been delivered to the "peer window" that we create when implementing GLX. Since we only ever create one such window per screen, just add a single peer_win field to EphyrHostScreen. commit 6e85a8304b50c0bfd16a400a05d257f0168fb99b Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Sun Nov 2 18:27:09 2008 +0000 Cygwin/X: build machinery fixes The Cygwin/X build has been broken for a long time, probably since modular X This patch fixes up configure/makefile and some general build issues (#18568) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> commit 7aa29b9d66c3cd0f8af4fafbe92efd0c0556d225 Author: Robert Noland <rnoland@2hip.net> Date: Tue Dec 16 00:07:42 2008 -0500 Support -sharevts on FreeBSD Bugzilla #11179 Submitted-by: Nathan Whitehorn Signed-off-by: Robert Noland <rnoland@2hip.net> commit 063eb6743cd0d98dd52d1a9559b804381ee5144d Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 15 19:53:45 2008 -0800 Patch brown-bag fix for bug 19017 (scrn->virtualX/virtualY 0 before PreInit) When a driver uses a crtc during device detection, the scrn has not yet been configured and virtualX/virtualY are still zero. This caused the X server to try and allocate a shadow frame buffer, which couldn't work. Detect this by checking for zero virtualX/virtualY values. Signed-off-by: Keith Packard <keithp@keithp.com> commit fde2f961035609cfff8761ef1e0f23e6a9761be2 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 15 11:39:24 2008 -0800 Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017. pScreen->width/height are not initialized when doing initial mode setting, which makes this function incorrectly fail. Using scrn->virtualX should work in all cases though. Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset for output probing, long before the screen array is initialized; that was caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen could find the right values. Signed-off-by: Keith Packard <keithp@keithp.com> commit 29a5b0596b396d3e4a8a014cacd3e3ef77467ab7 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 15 11:38:00 2008 -0800 When disabling SIGIO tracking, use SIG_IGN instead of SIG_DFL. This avoids a race condition for drivers which mis-order the fd close and signal disable. Signed-off-by: Keith Packard <keithp@keithp.com> commit 1ba4cbb15919759aadd71960c5c057af9ba94fe3 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 15 11:36:43 2008 -0800 Clean up rotation data when crtc is turned off The shadow frame buffer and other data used for rotation need to be freed when the crtc is disabled, not just when rotation is disabled. Signed-off-by: Keith Packard <keithp@keithp.com> commit 2a61397d17339113b9e37995b06ca543589814ce Author: Cooper Yuan <Cooper.Yuan@amd.com> Date: Mon Dec 15 10:29:34 2008 -0500 Fix typo in xf86PickCrtcs() commit 3db60add6671f766f9360e7d03492dfd51eba225 Author: Jon TURNEY <jon.turney@dronecode.org.uk> Date: Mon Dec 15 12:42:10 2008 +0000 Cygwin/X: Update the native icon to one based on the X.Org logo Update the native icon for the X server to one created from the X.Org logo by Colin Harrison. commit 450739efa904a0fce5024372da7236bb7b84b67a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Dec 13 00:45:27 2008 -0800 XQuartz: Updated menu item ordering for better HIG compliance (cherry picked from commit 4c9bb241ce5fb856fab20ae96fa89bd2b71ef242) commit aee27be2785d8b09ac10f5be040b4d573190de0e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 10 23:04:30 2008 -0800 XQuartz: Tiger fix, don't call Xplugin code in the Appkit thread if Xplugin isn't threadsafe. (cherry picked from commit 748d9e5bd756513d42c4046f3b31e1fdc55bccb6) commit a939368ab8140d48c1da4ba0bb229d13b221189c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 15 03:18:13 2008 -0800 mi: Reuse memory in mieqProcessInputEvents rather than making excessive calls to calloc() Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> commit f1c9b5ab230cbb4124d8d476ae4886d05022adcb Author: Ian Romanick <ian.d.romanick@intel.com> Date: Sun Dec 14 18:58:33 2008 -0800 GLX: Changes resulting from changes to Mesa generator scripts / data Several recent Mesa commits (listed below) make modifications to the protocol generator data and scripts. This commit represents the changes to the generated files resulting from the previous changes. - 0f73302d24f4201813da2939742c5bcb6964b3b1 GLX: Fix protocol for glTexSubImage#D - 1709ab01ef24279c782e420568e9257b4b92b224 Return 0 as the request size when the pixels parameter is NULL - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded GLX: Include glapi.h before glapitable.h This is the server-side part of the fix for bugzilla #11003. commit 6383bc93b2ae76361a58653bc7e291df0d6ddfec Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sat Dec 13 15:44:52 2008 +1000 dix: Init DeviceEnterLeave event's type before FixUpEventFromWindow (#19064) X.Org Bug 19064 <http://bugs.freedesktop.org/show_bug.cgi?id=19064> commit 49d38ab2328c409b2a98465b52677af057121513 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 2 15:09:57 2008 -0800 Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Ian Romanick <ian.d.romanick@intel.com> commit 2c5bfffc832e3818bbf0c0a96522865ce1ef2653 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 2 14:59:04 2008 -0800 Warning fix (GL likes to call strings GLubyte * instead of char *). Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Ian Romanick <ian.d.romanick@intel.com> commit 7be6520d94df874c6bbd46d06a1830a12d0967f2 Author: Stuart Bennett <sb476@cam.ac.uk> Date: Fri Dec 12 00:08:44 2008 +0000 dolt: allow older versions of bash to compile the xserver (#19031) Signed-off-by: James Cloos <cloos@jhcloos.com> commit aeff14d5f208d02f211b8b2a1a98999624e8c2cf Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Nov 25 20:23:50 2008 +1000 dix: don't alloc in ChangeMasterDeviceClasses. We mustn't realloc as we are inside a signal handler. With SetMinimumEventSize, this code should never be hit anyway, as the event list should have the required memory before this code is hit. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit fb2a8d0e59a3d187255538f6add22ec67551507a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 8 15:58:15 2008 +1000 Xi: silence compiler warning Don't mix declarations and statements. commit d961abb59f0a8bee4bd11b1540aa43ff83cddbb8 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Dec 11 15:54:15 2008 +1000 dix: fix compiler warning (mixing declarations + statements) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit cb95642dc8edebb2935dd471f8b339cb98aa8481 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 28 22:28:32 2008 +1000 Remove #define NEED_EVENTS and NEED_REPLIES A grep on xorg/* revealed there's no consumer of this define. Quote Alan Coopersmith: "The consumer was in past versions of the headers now located in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h, all the event definitions were only available if NEED_EVENTS were defined, and all the reply definitions required NEED_REPLIES. Looks like Xproto.h dropped them by X11R6.3, which didn't have the #ifdef's anymore, so these are truly ancient now." Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 920b7622be4a68ebb5d8432f55c5362fbe964fce Author: Simon Thum <simon.thum@gmx.de> Date: Tue Nov 25 14:28:26 2008 +1000 xfree86: dump the ptraccel filter setup to the log on init. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit fbb57a2c54b141ccbb50833143b0b7cb2c4cb903 Author: Simon Thum <simon.thum@gmx.de> Date: Tue Nov 25 13:43:28 2008 +1000 dix: ptraccel - Add GetAccelerationProfile() Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit beb749c87f383a62172a9ffa36373438e7a12d8e Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 11 17:04:37 2008 -0500 Fix syncsrv.h guard define commit 9fba808b4f43f5dc69d85a48fa40cb83dd4d9f9d Author: Colin Harrison <colin.harrison@virgin.net> Date: Thu Dec 11 13:22:53 2008 -0500 xsync: Prototype fix. commit dce887ff53222652c397bc96a1dd3566f5847745 Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 11 13:16:02 2008 -0500 xsync: build fix argh protocol header disaster commit d41b8960be8ad316504ef5657c0abfe6d76d3b5e Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 11 18:48:02 2008 +0100 randr: Fix initial panning border copy Thanks to Julien Cristau for finding this. commit fd77ce9f884f5ac4d36736f3a99ba86101f133ea Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 11 17:51:20 2008 +0100 randr: Oops, miscalculated panning rectangle's coordinates commit f8e52f1b6d7c59d007de99a1c9c69c053d4f3cbe Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 11 16:48:40 2008 +0100 randr: Update initial screen size if panning information is present commit 24d6b7d1c5fc5d07c2eb06a9fc4406e393d59b17 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 11 16:48:11 2008 +0100 randr: Fix error message for bad panning config commit fdbbe65a7e777b7777bfae5a161efb89d4fb9a8d Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 11 14:56:51 2008 +0100 randr: Add monitor option "Panning" for initial panning configuration commit 27261a950d91c352eac25a3036656c3e4f81fb12 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 11 14:43:04 2008 -0200 Modify sdksyms.sh to receive $top_srcdir as first argument. If the basename of header file processed by cpp matches $top_srcdir, check for extern symbols in the output, and add to the xorg_symbols vector. Possibly a better solution then using this script would be to somehow tell the linker to not drop any symbols from the binary being generated. commit 1f4fb0225b278d1cf4145aebeb0bdd23dc8f62d5 Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 10 16:13:20 2008 -0500 xsync: Fix wakeup storm in idletime counter. Wakeup scheduling only considered the threshold values, and not whether the trigger was edge or level. See also: https://bugzilla.redhat.com/show_bug.cgi?id=474586 http://svn.gnome.org/viewvc/gnome-screensaver/trunk/src/test-idle-ext.c?view=markup commit 1a99110f0c221b79045ea26d61c4a1ec1e0d7341 Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 10 14:18:59 2008 -0500 xsync: ANSI cleanups commit e0d8f6a8084a3fe6c549c1dee11e4502e316c382 Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 10 13:32:04 2008 -0500 xsync: Use a local header for server API definitions commit 1208a1dbcaecbc218a77bf51068f9c0c768e16c5 Author: Adam Jackson <ajax@redhat.com> Date: Wed Dec 10 11:47:35 2008 -0500 xsync: remove cast abuse. commit 119d9c46e841f5fa35610f557e6fa1ec58587c24 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 10 01:56:01 2008 -0800 XQuartz: Fix path to executable (cherry picked from commit 7e9d3698e070a0c63dd2556651373c3aca58e2fe) commit c46b564c47fde3474e948aa1b188a975836cba47 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Dec 10 00:00:29 2008 -0800 XQuartz: fixed make dist (cherry picked from commit 2d52367ab92429e58596d1a1ed3ef52a0a38a7aa) commit 23156a21d8e2f1be7d19d69cb91dae1b885ef671 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 9 23:48:18 2008 -0800 XQuartz: Make debugging output for invalid depths a bit more detailed (cherry picked from commit 609fb166b7062c76f0561df12ffe893811f6ac8f) commit 76351d2faf9ceb79aaa00b374c203b8b279c58f3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 9 23:47:32 2008 -0800 XQuartz: Avoid using login /bin/sh blech. Just use a bash script to start the app, so it will inherit the right environment (cherry picked from commit f4b7ad9cc6b0c99fc7ee8516c4bf858ece938148) commit e5ce6e198f4c245f4dc840c5e9e90a7ef80fb6e9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 8 21:59:49 2008 -0800 XQuartz: unset DISPLAY if we didn't get a launchd socket handoff (cherry picked from commit b959727f38733009c6381cc8ca06b5984257bdac) commit ecaaf0462d6c70cabfcaf6868a526e5415505e2c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Dec 8 21:00:11 2008 -0800 XQuartz: unsetenv(DISPLAY) if we're not org.x.X11 Also some prefix related fixes. (cherry picked from commit fd459e96581a883e30323c840b71004aa0747169) commit ea94995982d1cc585768d52fec75cae018457fa5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Dec 6 12:01:28 2008 -0800 XQuartz: Removed some debug spew (cherry picked from commit 370dcf11b360b87aa24cace35eb615419057fda0) commit 86c64ddf21763972aa7fc8c5770259123c9907b3 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 8 17:42:47 2008 -0500 randr: clear primaryOutput when the output is deleted commit fe65f400ed16cb39db8c9518b9446f590c34db1a Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 8 17:40:07 2008 -0500 randr: use primary output for RRFirstOutput() commit cdcb516e561e2f65eb2fa523ca001c57674d5caf Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 8 17:37:17 2008 -0500 randr: Mangle GetScreenResources sort order based on primary output commit d7b316e82bc7051f8829b4f4a640f50ae91c2db9 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 8 17:28:55 2008 -0500 randr: Mangle compat Xinerama reply based on primary output commit 9d58d2a319059989ccdfa758f586149ccdc16df6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Dec 9 10:51:37 2008 -0500 randr: Add [GS]etOutputPrimary commit d281866b74f7067f2704c278fe9720eafc0ee5ef Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Dec 1 21:20:48 2008 +1000 mi: Clean up CopyGetMasterEvent, re-use the memory. Alloc an EventList once and then re-use instead of allocing a new event each time we need a master event. There's a trick included: because all the event processing handlers only take an xEvent, init a size 1 EventList and squash the events into this one. Events that have count > 1 must be squished into an xEvent array anyway before passing into the event handlers, so we don't lose anything here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Daniel Stone <daniel@fooishbar.org> commit 0b4fef6337d88ae8ef05b8b73941350a9007565c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Dec 10 11:35:09 2008 +1000 dix: move MAX_VALUATOR_EVENTS into include/input.h Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit b36c398b11321a908cfe217108b26a32ffc1d850 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 8 16:41:20 2008 +1000 dix: purge dead device-based window access code. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit aa71ac1dd4697738752c73fe4c106b665ea3ec25 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Dec 10 00:32:34 2008 -0200 Add dependency tracking to sdksyms.c and export composite wrapper. Thanks to David Miller for noticing a make problem with sdksyms.c not being regenerated when sdksyms.sh is updated. This is not yet the best solution; automake generates dependency for sdksyms.o, but the build really should also regenerate sdksyms.c when sdksyms.o needs to be regenerated. Export the symbols in miext/cw/cw.h. These symbols are in libxaa, and at least the nvidia driver uses them. Maybe cw.h should be installed in the sdk. commit 090f63123975220819d531f569df6e5787607ec6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 8 11:53:20 2008 +1000 mi: always update the sprite for master devices. Follow-up to 9ce995373e4a. This re-enables cursor rendering if the MD is controlled through software (e.g. synergy). Reported by John Tapsell: "I use Xorg with no mouse attached, but use synergy to control the mouse. The commit means that I no longer have a visible mouse cursor. The mouse cursor is still 'there' in terms that I can click buttons etc with it, but it's just not visible." Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 7c8720c1433d2c3b85bbf4b811cc54c2df4c0080 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Mon Dec 8 22:11:50 2008 -0200 Correct wrong symbol reference on sparc. The awk script was incorrectly referencing the struct name, and not the struct variable. Also added some comments to sdksyms.sh, for the reason it generates the "symbol table" and add a message to the generated file, telling is was automatically generated. commit 58a27d2932164e43c0db42b1286ec2f95250b420 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 8 16:28:00 2008 -0500 Default to x86emu even on i386 linux vm86 mode is a bad idea anyway, and using the emulator everywhere means we get a consistent set of bugs. commit bbf811514d3cdf84790bad5b852942a4e636902b Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Mon Dec 8 12:24:39 2008 +0100 ddxCtrls.c: XkbDDXUsesSoftRepeat always returns 1 now We'd like to do soft repeat in the server for all keys. Remove obscure check, that'd prevent the server from autorepeating when delay is set to exactly 660ms and rate is set to exactly 25 (interval=40). Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 8c1dd40a04693f09f4fcea6e7f905af34c7589de Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Mon Dec 8 14:49:38 2008 +1030 Don't use gnu specific extensions to awk when builing symbols Traditional posix awk doesn't know about \W and whilst we check that awk exists in configure.ac we don't check which awk we are using. This corrects symbol generation for posix only awk. commit 39db182b637041255ed6dac739ff77c8e4e07c30 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Dec 8 12:12:39 2008 +1000 xfree86: init EQ before trying to initialise the devices (#18890) The kbd driver may send events during device initialisation, and these events need the EQ set up already. X.Org Bug 18890 <http://bugs.freedesktop.org/show_bug.cgi?id=18890> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 78a62d7713c708d067d8824ec41b0a0225c1997f Author: Tom Jaeger <ThJaeger@gmail.com> Date: Mon Dec 8 11:38:12 2008 +1000 Xi: XIGetDevice needs to ignore the MORE_EVENTS flag. Reported in X.Org Bug 18882, Comment 5. <http://bugs.freedesktop.org/show_bug.cgi?id=18882> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ee1a6c28418a6dad6c89f79a994f27bfbaa77368 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Dec 5 10:12:57 2008 +1000 dix: fix calculation of valuator events. Follow-up to 4971315296cb. countValuatorEvents was copied from GKVE where it was obviously broken but nobody noticed. GPE had the correct version, but that one got lost during de-duplication. Restoring the correct calculation - if we have 6 valuators, we want 1 valuator event, not 2. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 13de7511b17b57a28668e1a60b196ccfe61dbcbe Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Dec 4 10:30:02 2008 +1000 xfree86: Only use the evdev ruleset on linux. As suggested by Julien Cristau This is an follow-up to commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Dec 3 14:24:25 2008 +1000 Let the DDX decide on the XkbRulesDefaults. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Acked-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 8e3279134987a45f2a89c963ef2d33bc3d3c8179 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Dec 4 09:47:25 2008 +1000 xfree86: fix compiler warning (use of uninitialized variable) drv and idev are only set for SDs, but are only dereferenced for SDs too, so initializing them to NULL is safe. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 22d4ddcc3d63b7fbf2a23f5162075e4ee06db781 Merge: d2dad384f c3bf15ba8 Author: Matthieu Herrb <matthieu@crux.(none)> Date: Sun Dec 7 23:56:15 2008 +0100 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver commit d2dad384f5725a36e593fd75f03d712f53b20620 Author: Matthieu Herrb <matthieu@crux.(none)> Date: Sun Dec 7 23:52:26 2008 +0100 Fix build in separate build directory. commit c3bf15ba85fd3ab2e1fe809428b75bf34db25cc8 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Dec 7 18:52:23 2008 -0200 Require macros 1.2.0 or newer for XORG_CHANGELOG and XORG_CWARNFLAGS. commit 5a8068b390b7d30eb526e954443d8e43a199b971 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Dec 7 18:31:32 2008 -0200 Convert libx86emu.a to a "libtool convenience library". commit ed4a17274015ecd8040ae85bd5cd9d1dbcc9460a Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Dec 7 14:59:25 2008 -0200 Export some symbols from libxf86config when installing it. These are private symbols, but used by the X Server. The newly exported symbols were not added to the sdk headers. Optionally, libxf86config could be compiled without hidden symbols when being installed. Thanks to Maarten Maathuis for noticing the problem. commit bf4c29ab48a166eb158cf4be7c597982d65ef214 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Dec 7 05:12:41 2008 -0200 Correct xf86acpiDisableFlag symbol. It is declared as <hash>ifdef HAVE_ACPI Bool xf86acpiDisableFlag = FALSE; <hash>endif in hw/xfree86/common/xf86Globals.c but not protected by the ifdef in the sdk header xf86Priv.h, what caused a build failure in the tinderbox, due to the address of the symbol being taken (to ensure it is available) in sdksyms.c. commit b1dac41fb3853ca8182048ea57b88b6e84ecceb3 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Dec 7 02:22:19 2008 -0200 Use libtool convenience libraries and better "symbol" table. All .a libraries were converted to .la, and instead of linking the Xorg binary with a mix of .a and .la, and adding some libraries more then once in the command line, etc, now it generates a single libxorg.la from all the required convenience libraries, and links with a dummy xorg.c (that should usually be the file with the main function...). This removes the requirement of some things like libosandcommon and libinit, that existed to circumvent problems when linking multiple .a and .la in the final Xorg binary. The "symbol table" is now generated dynamically, by a shell script, with an embedded gawk parser that parses cpp output. The new file sdksyms.sh is generated by hand by analyzing all Makefile.am's and making it create a sdksyms.c file, that includes all sdk headers that will add symbols for the Xorg binary. Module headers aren't read, and a in 2 files it was required to add a "<hash>ifndef XorgLoader" around declarations shared between the Xorg binary and libextmod. A few other changes were added to other sdk headers, like preventing multiple inclusion, or including other headers to satisfy dependencies. This should be a lot more portable, and better (hopefully properly) using libtool to generate convenience libraries. commit ccd2c668c13863ed704f86b29fc6b3ee628e56a2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Dec 6 14:11:52 2008 -0800 XQuartz: darwinPointer reports the actual pixel position now rather than a relative position (cherry picked from commit a41e7f75decd340d064fdc0d2c4fe6c88d7dbc82) commit 7ebd0c7e8d42a13079957d9bacf5cb30d7855a59 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Dec 5 12:42:31 2008 -0800 XQuartz: Corrected name/command labels in the customization widget (cherry picked from commit a689c23f17eb445c36b97eb617ef4b8bd157985f) commit 027ff97a1354ab4c83fecb615f6bc2a6b739b871 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 5 12:00:08 2008 -0800 Make sure _X_EXPORT is defined in edid.h Fixes build error in xf86-video-intel utilities commit 466b0fca9ba5d5e7fb36e47a6d1bd60218f51c75 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri Dec 5 17:01:09 2008 -0200 Add back a simplified version of the loader static address tables. If not taking the symbol addresses, linkage will break badly, as not all symbols will be present, and it also requires changing library order, and/or making some changes like the "libosandcommon". This table should be modified to be generated automatically, as it is required to "fool" the compiler/loader into adding all required symbols to the X Server. commit 44bef8b850c5a78a3d3eca5f0d92b71bdd0a87e2 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Dec 5 15:37:15 2008 +0100 randr: Update SProcRandrVector for panning commit 44c8c3cf7de589fb8e987f4ab931294eaf0b405f Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri Dec 5 04:26:57 2008 -0200 Remove static symbol address tables in hw/xfree86/loader/*sym.{c,h} Those tables were once used to decide what symbols are visible to modules, but they were outdated. The only real usage was that, since it was taking the address of symbols, linkage should fail if the symbols were not available. Now the proper way to make symbols available to modules should be to use the _X_EXPORT macro, or not compile with hidden symbols, so that all symbols would be available. All symbols in the tables were revised to ensure they are exported, and only symbols that were not exported are ClientSleepUntil() and DuplicateModule(), that were not in the sdk for quite some time already, and should not have any users outside of the X Server (and/or builtin modules). commit 091a50d1260c70055aba1fa6a2d1b1a36de1114e Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 4 18:23:25 2008 -0200 Move _X_EXPORT attribute to header file. The attribute should be set on header files to make it easier to manage what symbols are available to modules. _X_EXPORT should be used in sources only for special cases, like symbols that must be visible by non video/input driver/modules but should not be "advertised" in the sdk. commit e5ab9e66628cde081757cf2a1013a78e927a622e Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 4 18:13:40 2008 +0100 randr: Allow panning to be disabled per axis commit bad118ace6c5bae5a5ed8a35129c90c38f1c1932 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 4 16:55:14 2008 +0100 randr: Rework panning area verification commit 219c26ce0c65625d55cfd943ec66fe94a1a0ddfd Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 4 16:28:40 2008 +0100 randr: Don't change panning parameters if verification fails. commit 18a8bac1a1567b6215928f96870554ea63f39aab Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 4 16:30:38 2008 +0100 randr: Rename pan() to set_origin(), and xf86CrtcPan() to xf86CrtcSetOrigin() commit 825b2c2f4a59ac4852f90bbbddf18ab832297fdd Author: Matthias Hopf <mhopf@suse.de> Date: Thu Dec 4 16:11:21 2008 +0100 randr: Nuke config-timestamp for panning commit eeeb98d1df59baaaec954b6318d788a37e388d11 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 28 17:51:20 2008 +0100 randr: Protocol bits for panning support commit b929d721efdb17bcc94b9984c4f34d0df3d267d5 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 28 17:49:31 2008 +0100 randr: Panning support commit 834cbc16f3eb539704faade7bff347b161ce69d9 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 28 17:39:23 2008 +0100 randr: Crtc interface update for panning support. commit a475eb9feec75e9ce1e316da0f1679acd7dd3aa8 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 28 17:38:52 2008 +0100 randr: Weird enough, crtc->version was never set upon creation. Fix that. commit 9db84fac0cc767e23986223d22bc085cde0cc86f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 2 14:54:10 2008 -0800 Removed unised option from configure.ac for launchd (cherry picked from commit 87e4de0a9a8af6e5e0cbba74e585761f1160a6ab) commit fa4f2527a5002711fe47c02b14097032fd845dc4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Dec 2 14:53:21 2008 -0800 XQuartz: pbproxy: Simplify linking (cherry picked from commit 909cc5c4dca0f63e90505575bbd454b46a4670cc) commit 126d8a4c8a72b039903023dce0da64b251080e1d Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 4 02:43:29 2008 -0200 Update .gitignore. Add files left by make distcheck and remove files that no longer are generated. commit 9826b95c198e74f89680cc247b9bd9dd884d72be Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 4 02:05:05 2008 -0200 Correct make distcheck by removing dolt files. commit 5dbe70dd52fd8daf8d0797951cc5a758d2c3b44c Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Dec 4 01:57:46 2008 -0200 Remove dummylib. Only cvt required it, and only used XNF{,c}alloc via xnf{,c}alloc macros. Based on patch by Eric Anholt. commit f841d4e3cccbde02e91c948f5ffb9e32c8c3b3cc Author: Julien Cristau <jcristau@debian.org> Date: Wed Dec 3 23:02:03 2008 +0100 Move RELEASE_DATE closer to AC_INIT so it's more likely to be updated commit 75b02dd0be2ef64c0f8e3138c90b5c5e48b17913 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Dec 3 14:46:30 2008 -0200 Include <X11/Xfuncproto.h> if _X_EXPORT is not defined. commit dd128ddcdcbe254a9cdd973590f6a979a7f0427e Author: Timo Aaltonen <tjaalton@cc.hut.fi> Date: Wed Dec 3 18:40:29 2008 +0200 If AEI is on, disable 'vmmouse' in addition to 'kbd' and 'mouse'. Signed-off-by: Timo Aaltonen <tjaalton@cc.hut.fi> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 0b5ecabfb803cd820338fb0364521fe39b05578b Author: Julien Cristau <jcristau@debian.org> Date: Wed Nov 26 21:19:55 2008 +0100 randr: add swapped dispatch for RR[GS]etCrtcTransform Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it. Signed-off-by: Julien Cristau <jcristau@debian.org> Cc: Keith Packard <keithp@keithp.com> commit 110a71d11ab7a1a55a6a24d792457fdef0b0746d Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Dec 3 11:22:38 2008 -0500 Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. commit fd2d40b7ec5d685dac55453eb1f2da672dc83126 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Dec 3 11:31:48 2008 +1000 Xi: change XIUnRegisterPropertyHandler to XIUnregisterPropertyHandler CamelCase can be taken too far, and AFAICT there's no consumers of that function yet anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 49f77fff1495c0a2050fb18f9b1fc627839bbfc2 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Dec 3 05:43:34 2008 -0200 Rework symbol visibility for easier maintenance Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it). commit 0b8f8b24f718820a72ebdc52423c2e6a44e848c5 Author: Stuart Bennett <sb476@cam.ac.uk> Date: Tue Dec 2 22:52:53 2008 -0800 xf86Cursors: xf86_reload_cursors shouldn't unconditionally show hwcursor (#14820) Also, no need to call ShowCursor when SetCursorPosition already does it Based on a previous patch by Maarten Maathuis Signed-off-by: Keith Packard <keithp@keithp.com> commit 9c5dd7337fa93fb1650cc017e523b939dcbf482a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Dec 3 14:24:25 2008 +1000 Let the DDX decide on the XkbRulesDefaults. Rather than assuming rules in the CoreKeyboardProc, init the default rules in InitCoreDevices, then re-use them later. In the xfree86 DDX, set the rules to "base" or "evdev", depending on whether we'll load kbd or evdev. If we create a new MD, use pc105,us as default and re-use the rules file used previously. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 463e02e7de5da3e582a3a049110a476713c7210e Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Dec 3 15:06:37 2008 +1000 xkb: Allow NULL as rulesFile in XkbSetRulesDflts. If no rules file is given, simply re-use the previous one. If no RF is given the first time this function is called, use the built-in default. This includes fixing the built-in default to something that actually exists. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit e670fd889607fa712876218882cd4a9b46937661 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Dec 3 11:55:13 2008 +1000 dix: fix GetMaximumEventsNum(), may return a DCCE event too. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 85d84c7cf2d368d1803dc2cdd03d6c9df8cc0430 Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 2 17:33:43 2008 -0800 Fix GLX after 180bad84774493d48f2793a6281d825560944863. Sigh. commit 4a61ad427c634bcc38a31ce0f14ff5c2d3f706c7 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 2 14:35:45 2008 -0800 Update sample xorg.conf file commit c1db925d10fd37077bed90612ed95c3fd20cd2e2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 2 14:32:48 2008 -0800 Add atKeynames.h to libdmxinput_a_SOURCES so it's included in tarballs Reported by geearu in #xorg-devel commit 8561514574b3540c729bcc3acca9c943adcdc778 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 2 13:32:34 2008 -0800 Don't need to check uid/euid for every commandline argument Check uid/euid only when handling the arguments that are restricted to root/non-setuid users commit 6de6ffff35ac03d49fa61de195d4a0605e0ef8bf Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 2 13:19:08 2008 -0800 Remove unused config flags from FlagValues & FlagOptions FLAG_DISABLEMODINDEV, FLAG_MODINDEVALLOWNONLOCAL, & FLAG_HANDLE_SPECIAL_KEYS commit bb072019fa8dd292a50ef433d05caeefd1304a73 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Dec 1 16:57:06 2008 +1000 xfree86: don't render SW cursors for devices attached to VCP (#16805) When leaving 3D games such as quake3 or sauerbraten, a cursor may stay on the screen. This is caused by one run of SW rendering for the SD, even though the SD was attached to the VCP and thus has HW rendering capabilities. Check for the SD's attachment (like in all other functions) before deciding on SW or HW rendering. X.Org Bug 16805 <http://bugs.freedesktop.org/show_bug.cgi?id=16805> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 3a690598cf18c4cdc6aadd10a1ecf0772cacd34b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 2 12:59:57 2008 -0800 Remove unused HandleSpecialKeys config option Was only used by "keyboard" driver - the last place the value was checked was in xf86PostKbdEvent, which was removed in commit 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 commit 1dfed222e93f4684c2a450944a9a0ea9e085c43f Author: Bernhard Rosenkraenzer <bero@arklinux.org> Date: Tue Dec 2 09:01:56 2008 +1000 Xext: fix MultiBuffer compilation error with TryClientEvents. (#18835) X.Org Bug 18835 <http://bugs.freedesktop.org/show_bug.cgi?id=18835> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 9ce995373e4aa4b1bf51b4adafa2324f781ec1cd Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Dec 1 21:32:39 2008 +1000 mi: UpdateSprite only if the device is attached. commit d507f60689f4e14383b0d24e63afc8cf836360d5 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 26 14:15:04 2008 +1000 xfree86: don't FatalError on "too many input devices". Just ignore devices after MAXDEVICES has been reached, but warn the user that the devices are ignored. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 9bf761468fa3baf4c5fa40efa717b4b581d920f9 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 28 11:44:58 2008 +1000 Xi: fix xi_filters size. commit 260e48c252c95fd1b1ba9ad7478791f6b9a67e2d Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 28 11:29:06 2008 +1000 dix: remove confusing (and wrong) comment. VCP is not the only pointer. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 5d02e580d7c4144ea6f0984240fc913e05fec877 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 28 11:46:15 2008 +1000 dix: use UpdateFromMaster in GetProximityEvents. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 95fc59a199f99bf167fbb09297a9bb0e33e31869 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 28 14:55:15 2008 +1000 xkb: Extra sanity checks to prevent dev->key == NULL dereferencing. commit a425abf0eaa61ee5ccb2f32a1af24edd190f7889 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 26 12:20:00 2008 +1000 xkb: don't attempt to filter events for devices without key classes. Reported by Magnus Kessler. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit a85f0d6b98237d8a196de624207acf1983a1859a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 26 11:15:05 2008 +1000 Xi: fix use of button->down - bitflags instead of int arrays. The device's button down state array was changed to use DOWN_LENGTH and thus bitflags for each button in cfcb3da7. Update the DBSN events to copy this bit-wise state. Update xkb and Xi to check for the bit flag instead of the array value. Reported by ajax. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 180bad84774493d48f2793a6281d825560944863 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Tue Dec 2 02:50:45 2008 -0200 Add visibility flags to XSERVER_CFLAGS. This is done to actually change DIX_CFLAGS, as not all "modules" use XORG_CFLAGS. Also export the symbols that are required by other modules after the change. commit 8c560422b44e012053612754430d2b87dc44ed59 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 1 20:02:34 2008 -0800 More man page updates for 1.6 release for Xorg, xorg.conf & exa man pages. - Remove remaining references to XFree86-Misc options AllowNonLocalModInDev and DisableModInDev. - Remove remaining references to grab-breaking keys & associated options. - Update description of Ctrl-Alt-Backspace to new -retro/DontZap defaults. - Add description of new options -modalias and -showopts. - Update list of modules loaded by default. - Update input driver references from keyboard to evdev & kbd. - Update list of driver man pages to match xf86-*-* drivers with man pages. - Add See Also section to exa man page. and various formatting/typo/etc. fixes. The Xorg/xorg.conf sections on input device selection could use further updates to better match the current state of HAL-enabled configuration. commit 6a1850b8c677e2a2993f6f6b731ee3d35aa55d09 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 1 19:19:04 2008 -0800 Correct warning for unknown GlxVisuals option in conf file commit afeacb8e74b2a1e366e5ca9f0e58805d8d96c457 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Dec 1 20:53:17 2008 -0500 Bump dri2proto requirement to 1.99.3. commit ad01e86b5c7c528adec8a1f95ecaa294f58a8922 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Dec 1 20:52:41 2008 -0500 Drop unused DRI2 vblank infrastructure. For this first iteration of DRI2 we don't have any vsync functionality in place yet, so back out the support in DRI2 and the protocol for now. commit 24c562f04b41d219c34f5fa3f963564accf329f2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 1 16:28:45 2008 -0800 Update See Also lists in Xorg & xorg.conf man pages Remove xorgconfig & xorgcfg Update driver lists: - Remove vga - i810->intel - via->openchrome commit bd147e6f4b03f344c967c88fd433877b14fe1912 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 1 16:08:55 2008 -0800 Remove hack to only load font modules if magic strings appear in font path commit 5f3f14179edf48aad518f6f707bfdc37c27267c6 Author: Jay Cotton <jay.cotton@sun.com> Date: Mon Dec 1 16:06:09 2008 -0800 Sun bug 6618220: Xorg server core dump in xf86RandRModeRefresh(NULL) <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6618220> commit 09df7cc5ad7b72d8a23c3e22fc718aad8c16f4d3 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Dec 1 12:41:10 2008 -0500 Avoid dereferencing NULL pScreen in xf86CrtcSetModeTransform(). We can get there during PreInit as we set a mode for load detection. At that time there's no pScreen anywhere, so just skip the optimization then. commit b0d371ab0a6efd4956c3677faa20b2ac15c33765 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 1 11:36:06 2008 -0500 randr: Don't send output property events on server exit If the Window resource type is already gone, there's no point in trying to send events, all it can do is access already-freed memory. Relevant thread: http://lists.freedesktop.org/archives/xorg/2008-November/040443.html commit 16b11cd03d8c5def07f0e598f237f71a37883a46 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Nov 30 02:59:34 2008 -0200 Correct static symbol XkmReadTOC and first pass on compile warning fixes. The warnings corrected were only the ones that should correct real problems. The most common one is 64 bit integers as "printf %l" arguments. Note that there is a patch related to this at: http://bugs.freedesktop.org/show_bug.cgi?id=18204 commit fb22d4d928bc5d1a893494a059359da2ed2ac639 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sun Nov 30 01:33:20 2008 -0200 Remove declarations of symbols that are never defined. These symbols were removed from the X Server, or never declared. One symbol that may need special attention is XkbBuildCoreState(), that doesn't have a prototype anywhere, but is called from xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in include/xkbstr.h. fb/wfbrename.h also may need some cleanup, as it makes several "renames" of non existing symbols. commit d6cbd4511e35a89a0353f11834c6fdb8d4d2189f Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Sat Nov 29 23:56:06 2008 -0200 Export symbols defined in the sdk. This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode() commit ffb484f7ef84099019b196ef97bfb2355eb6d52a Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Nov 29 14:30:55 2008 +0100 randr: Avoid needlessly creating a shadow framebuffer. - pScreen->width and height were zero, so it didn't "fit" the screen. commit 01eaebdc98f30fdf543af6337cdf012d3ff16f09 Author: George Staplin <gstaplin@apple.com> Date: Fri Nov 28 13:57:45 2008 -0700 XQuartz: GL: Make various changes to makeFormat, so that it works better. Now glxgears looks normal with the old libGL. Add various GLX extensions to the list of supported extensions. Reformat the oddly formatted code in some areas. Use xalloc and xfree instead of malloc and free. (cherry picked from commit 755f53eb40c4329d8c82a31cb910c31fdd4ea12e) commit 3d527b91b4bfa31e78d5fc7a1447a4026876f14e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 28 12:59:09 2008 -0800 XQuartz: Added option to enable/disable test extensions defaults write org.x.X11 enable_test_extensions -boolean true (cherry picked from commit fd4710aff3723d5f3422cf6a6530172eafc556d9) (cherry picked from commit 635019ad18db921fec99256294debd8571074abf) commit 71d3df7cc37403b5842227a035d9b995fd920e0b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 28 11:18:14 2008 -0800 XQuartz: Avoid some warning messages being spewed to system.log by AppKit (cherry picked from commit 780eff230ce41ad785e54d61a82c731269ae0446) commit a9796c7bc43223df44f12a7be08e361aea963ec1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 28 01:45:37 2008 -0800 XQuarz: Setup our PATH and PWD earlier, so our initial client benefits from it as well... (cherry picked from commit cbae2b447357b3fed6ff19414c60dd3792045600) commit ef4179f43a84d90f867b95ee5974ad26884253b5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 26 12:15:58 2008 -0800 XQuartz: Fix dead-acute on Greek keyboards (cherry picked from commit 807f2ec35c5f95b56b3e2b5eac51aec300fe5cb6) commit 800f5c681bed300d8caf99935e8f80ea6c1993ba Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 26 12:07:52 2008 -0800 XQuartz: Fix Czech keyboard dead-acute (cherry picked from commit 771df2786bc60389489f0967e705c7c95bdda085) commit ac57bb36d56a7a4d41add8d5a206ff37544a1819 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 20:14:37 2008 -0800 XQuartz: Fix an uninitialized keyboard_type on Tiger (cherry picked from commit 27b1a5eb3482052253ebdce1a09aedf05ac1b099) commit 45c8bd0fe54273039fdaa1eeeafb81b5774f2c75 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri Nov 28 02:01:57 2008 -0200 Enable compiling the X Server and modules with hidden symbols by default. Note that it checks if support for symbol visibility is available by the compiler, not if it is functional. It may have problems on non x86 architectures. To disable the feature, just pass the option "--disable-visibility" to the X Server configure script. Unless using an alternate build schema, drivers built from a git checkout will use the same "visibility" related CFLAGS used to compile the X Server. commit 31285d063ec4623cb0764437d6d57e244f20460d Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri Nov 28 01:55:11 2008 -0200 Make visible symbols required by xorg modules. This patch exports all symbols required by the compilable (in a x86 linux computer) xorg/driver/* modules. Still missing symbols worth mentioning are: sunleo miFindMaxBand no longer available intel (uxa/uxa-accel.c) fbShmPutImage no longer available (and should have been static) mga MGAGetClientPointer (should come from matrox's libhal) This is not a definitive "visibility" patch, as all it does is to export missing symbols, but the modules that current don't compile, may require more symbols once fixed, and third party drivers should also require more symbols exported. A "definitive" patch should export symbols defined in the sdk. commit 6f18ea7e656b79e58f66f51067334414767b413f Author: Julien Cristau <jcristau@debian.org> Date: Wed Nov 26 19:07:04 2008 +0100 Typo fix commit efefc03f9b26738b69abb570c1af2167cc99c4d8 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 13:19:48 2008 +0100 Add missing include ../../../../hw/xfree86/xaa/xaaTables.c:9:14: warning: symbol 'byte_expand3' was not declared. Should it be static? ../../../../hw/xfree86/xaa/xaaTables.c:53:14: warning: symbol 'byte_reversed_expand3' was not declared. Should it be static? commit 74bc792e1814849b8eee9e448e36c3568b821e6c Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Nov 27 05:34:14 2008 -0200 Export symbols required by the vesa and fbdev drivers. This is a minimal set of patches, to have an usable X Server when compiling it with symbols hidden by default. commit 74e2669103b59d51b24ddc48f378b1d04a3effd4 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Nov 27 04:33:44 2008 -0200 Export symbols also defined in libXfont. libXfont has stubs for these symbols, so, when compiling with hidden symbols by default, these symbols must be visible in the X Server, or the stubs in libXfont will be used. commit 87a7fb7438b70d07ebf240c530b8548a01021d48 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Nov 27 00:12:59 2008 -0200 Rework code using return value of LoaderSymbol as a function pointer. The patch removes all macros in the format define xf86_sym ((type (*)(argument-list))LoaderSymbol("sym")) creates a new macro in the format define xf86_sym sym and ensures "sym" is a "visible" symbol. The patch doesn't add or remove features, and is source and binary compatible with previous shared objects (with the difference that it requires the dlloader). These symbols are a special case, as, due to the fact that LoaderSymbol was being used to reference them, they are not easily found by "automated" tools that check for missing symbols. And now it also have the benefit that the compiler/loader "knows what is going on". commit fc708394318ed92c612e2938b335c08c1ffebb28 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 26 15:49:02 2008 -0800 Add server support for RRGetScreenResourcesCurrent This depends on randrproto 1.2.99.1 Signed-off-by: Keith Packard <keithp@keithp.com> commit f710ce269c020a39f58b2bfbd0fe5192a3279c72 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed Nov 26 20:02:44 2008 +0000 bump master to 1.6.99.1 (now the 1.6 branch is created) commit f3edc1fb0210149f35eab4e413700b5c4ac48214 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 25 23:15:35 2008 -0800 New version of dolt commit 4715f079b9c61362755c95c1ebf89c97cc6fff2b Merge: 9ffc67193 ed597f19f Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 25 22:19:08 2008 -0800 Merge commit 'origin/master' commit 9ffc6719390df8fdd0a5295a7a7a0eaea792be45 Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 24 13:08:48 2008 -0800 Move matrix operations from X server to pixman 0.13.2 pixman 0.13.2 now holds all of the matrix operations. This leaves the protocol conversion routines and some ABI stubs in place Signed-off-by: Keith Packard <keithp@keithp.com> commit ed597f19fdc3017dde6d1452b5cdf8ddcd69a5b1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 25 19:36:31 2008 -0500 xselinux: use "raw context" variants of getpeercon() and getcon(). commit ec1d08442f69353cb0e73ac4eaf0346ebb975594 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Nov 21 15:13:00 2008 +1000 dix: Enable core devices in InitCoreDevices already. Updated patch, see http://lists.freedesktop.org/archives/xorg/2008-November/040540.html Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 2b45602e828a07a0817691b2838cd34ffee531bd Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 26 10:42:52 2008 +1000 Revert "dix: Enable core devices in InitCoreDevices already." I merged the wrong patch. See correct patch at: http://lists.freedesktop.org/archives/xorg/2008-November/040540.html Not activating the device before attempting to enable it would leave the sprite unset, crashing the server when enabling the real devices. This reverts commit e078901a4eca02bd3e7a80d9462dafbca939a187. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 416685c295353b5816689994c7c58ae7db3e878d Author: Jeremy Uejio <jeremy.uejio@sun.com> Date: Tue Nov 25 16:26:44 2008 -0800 Refix Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode <http://bugs.opensolaris.org/view_bug.do?bug_id=6685465> This is a refix of the previous fix for CR 6685465. In the first fix I was shifting the colors to match the mask by the bits_per_rgb amount in the visual structure. That field has nothing to do with the # of bits to shift by. I should just instead shift the bits to match the mask. commit d5f9a131a2d5bd33f82fdd4e809880b0ff792b45 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Nov 25 15:46:39 2008 -0800 Fix const-mismatch warnings for DisplayModePtr's Includes fixes for: "xf86Config.c", line 2434: warning: argument #1 is incompatible with prototype: prototype: pointer to struct _DisplayModeRec: "xf86.h", line 351 argument : pointer to const struct _DisplayModeRec "xf86EdidModes.c", line 312: warning: argument #1 is incompatible with prototype: prototype: pointer to struct _DisplayModeRec: "../../../hw/xfree86/common/xf86.h", line 351 argument : pointer to const struct _DisplayModeRec "xf86EdidModes.c", line 438: warning: assignment type mismatch: pointer to struct _DisplayModeRec "=" pointer to const struct _DisplayModeRec "xf86Modes.c", line 701: warning: assignment type mismatch: pointer to struct _DisplayModeRec "=" pointer to const struct _DisplayModeRec commit d5ad296869c38ab30136b5a293a0125b76aad994 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Nov 25 14:12:26 2008 -0800 Remove duplication from code paths in XkbDDXCompileKeymapByNames commit 2538fc0d893a150e978355d281750f0a989728a7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 25 18:18:46 2008 -0500 xselinux: don't pass a NULL key string to selabel_lookup(). commit c8472a74441838e16d0d3414db1fa7fe996868a9 Author: Michael Vogt <michael.vogt@ubuntu.com> Date: Tue Nov 25 19:35:17 2008 +0200 Do not send VisibilityNotify events when MapUnmapEvents are disabled This prevents a protocol visible side-effect (XVisibilityEvent) on XCompositeRedirectWindow() followed by a XCompositeUnredirectWindow(). The problem shows up in gnome-screensaver with compiz and "unredirect fullscreen windows" enable. A VisibilityNotify event is generated (first with obscured and than with unobscured) when the window swithces from redirected to unredirected. https://bugs.freedesktop.org/show_bug.cgi?id=18133 http://launchpad.net/bugs/278112 commit 88297558aada44bc714ad57adbeed3740aaadee5 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 14:20:58 2008 -0500 Dead code cleanup over DBE. No DDXes have explicit DBE support anymore, so the init registration table never got used. Just nuke it all. commit e5eaea599ab16428c69912b6b3427ebe46707d7c Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 14:05:51 2008 -0500 Warning fix xf86info.c:11: warning: initialization makes integer from pointer without a cast commit 37072500f7bcf39e0d6aa2ceb5d1f2aeeab0b26b Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 14:04:44 2008 -0500 Warning fix helper_exec.c: In function ‘port_rep_inb’: helper_exec.c:219: warning: implicit declaration of function ‘DEBUG_IO_TRACE’ helper_exec.c:219: warning: nested extern declaration of ‘DEBUG_IO_TRACE’ commit d96bffce2dcf209e76be9b36ca1ede7e0c976d77 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 13:59:00 2008 -0500 Warning fix Init.c:139: warning: no previous prototype for ‘ddxBeforeReset’ Just declare the prototype always, seriously. commit 09ea671cbff605fd2b2af71619e7db5002108bf8 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 13:40:47 2008 -0500 Warning fix lnx_bell.c:37: warning: no previous prototype for ‘xf86OSRingBell’ commit a9853c7d337b3b1ad49793e9b4b90e313b6fa536 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:53:55 2008 -0500 Warning fix Pixmap.c: In function ‘xnestPixmapToRegion’: Pixmap.c:93: warning: ‘Box.x1’ may be used uninitialized in this function commit 81eafe9f93a272b06aa9f9235ec5676b9aa3ee3e Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:45:07 2008 -0500 Warning fix. vbe.c: In function ‘VBEReadPanelID’: vbe.c:1145: warning: return from incompatible pointer type commit 09bfb25e031772611a2f0902d4ba77b587e4bdb2 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:43:36 2008 -0500 Remove unused XAAAvailableOptions commit 8b9253f6383df3fefe38bde43a5f892b158a77c4 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:38:47 2008 -0500 Code motion: subsume xf86DoProbe.c into xf86Init.c commit fbabb1c5c243cfd8c954dec4c060dff1a0b81015 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:34:28 2008 -0500 Warning fix. In file included from l3-xaaStipple.c:4: ./xaaStipple.c:35: warning: no previous prototype for ‘XAAGetStippleScanlineFunc3LSBFirst’ etc commit cbaca6ec666d7349c4680b8affc13b5c9cae1fa5 Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 25 00:14:24 2008 -0500 Remove dead FreeModuleDesc. commit eb474adf98229a43bbe17ab98ff084371cb9fa09 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 11:25:58 2008 -0800 XQuartz: Simplify the xquartz_resetenv_display path (cherry picked from commit d2e0624dd30eb234bb25595ceedfa51d48ca1724) commit 94df1ab7f09a64f57c1e1453e3640462e984619c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 01:30:03 2008 -0800 XQuartz: Force X11Controller to reset a broken DISPLAY envvar. (cherry picked from commit f1a52b5b5ac31702497937efe3ac578be9a6c54f) commit 0b314c50a2a0ca1afbdc06663c3b719b05ebb851 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 01:13:35 2008 -0800 XQuartz: Removed hardcoded org.x.X11 from MachIPC as well (cherry picked from commit b4add7826d485600a13eba6a9c7be533f2c02d51) commit 065d2afb0ca34f89806e0936c51cd27805bc5123 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 00:51:01 2008 -0800 XQuartz: Add fallback for xpbproxy's display for Tiger or no-launchd-Leopard (cherry picked from commit 7a8c6665949d7804a97ef2539a74ec4aa682e1cc) commit 13df49dca28cf680a4d104630cd675de25d3e944 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 00:39:52 2008 -0800 XQuartz: Use the environment to pass the bundle's prefs domain on to xinit/quartz-wm for Tiger or no-launchd-LEOPARD (cherry picked from commit fbf4b0d33fa5dc618c3191a4e823232dfa33cd95) commit 40187f782beae4ae751824ef511c9f56a80357c7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 00:20:57 2008 -0800 XQuartz: Dead code removal (cherry picked from commit eeb323612e0adbea37befed31bbaa1d295728385) commit b55cad4569e34e3c10e9a327e20b91ea87d9dd98 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Nov 25 00:15:53 2008 -0800 XQuartz: Don't hardcode values of org.x.X11 for the preferences domain (cherry picked from commit 3a500d9247cf34686ec17b4a88c34d51ecd38ecd) commit d508a3dcca2f160021aced872715e1ded23cef97 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Nov 24 23:33:54 2008 -0800 XQuartz: More dead code removal (cherry picked from commit dcb0f6a2e62823a671051874d14a33ce59505892) commit 41fbdf72f2154a3fca8cf484a611501e3c174fbe Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Nov 24 12:33:20 2008 -0800 XQuartz: Disable some error spew on Tiger (where it wouldn't be an error) (cherry picked from commit 73ec6d3dfe0086d352f4eca25f1df5ae1884bb18) commit 09c3f6e04c273ffafcb547c252137fb17c8ce016 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 22 20:23:46 2008 -0800 XQuartz: Dead code removal (cherry picked from commit 46c077d9b4a883fc809c32077ce40f33a70d268b) commit ab12c7516207908f3e063a78904d68e2db14208e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 22 15:47:14 2008 -0800 XQuartz: More Tiger cleanup: bootstrap_strerror (cherry picked from commit 37f535aff3e9a7a02711daa98152cdff97745622) commit 208f091bfc657e9ee57b988f035d3aac7e9e173a Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 12 00:07:56 2008 -0400 Remove xf86IODelay commit 47478aa10adb20b6e48335ac8c4ef31f3fdfe68c Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 23:59:24 2008 -0400 Remove xf86{En,Dis}ableInterrupts entirely commit c7680befe5aebd0f4277d11ff3984d8a7deb9d5b Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 23:35:24 2008 -0400 Remove the remnants of Jensen support As being an EISA-only machine, and as ISA support is gone now... commit df14682a31b92751091571ed82f6095f55f19cca Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 22:48:51 2008 -0400 Bus: Remove ISA support. No, really. PCI is old enough to drive now. If you want this, get the kernel to expose a framebuffer device. commit a8bcab2d3b224e4d4d5b6a097ea530beee920213 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 22:14:23 2008 -0400 Bus: Remove yet more unused overlap processing. commit 994b7c034fc20d76651cf7f6a285526d9aff8770 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 22:11:12 2008 -0400 Bus: Don't pretend to care about IRQs, DMA, or PCI config space commit eb5ae45127fa9f08f0badec7e21f8c26c9c7c969 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 21:44:16 2008 -0400 Bus: Simplify a failure case (that pretty much never happens) commit ee8b5cf94c2a9f8526a3bb5011ebb10f3246a4d9 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 21:41:47 2008 -0400 Bus: Trust the kernel when registering driver resources ... everywhere, not just (linux && (ia64 || alpha)). commit 8397df89456558e3c85b05e0acfccb9f6af6b695 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 21:36:14 2008 -0400 Remove unused MIN macro commit c251c0baae59714a6ac83b69cd106c08baa3613e Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 21:34:27 2008 -0400 Bus: remove special handling for init-only resources This isn't used by any driver, nor has it ever been as far as I can tell. commit 3e5281af17841cf50d0e52a728b12c6ab56e61df Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 21:16:45 2008 -0400 PCI: Unexport xf86scanpci commit 6b198daa46f2f609aff7900761cf82cc2fb4e0b4 Author: Adam Jackson <ajax@redhat.com> Date: Sat Oct 11 20:51:39 2008 -0400 Bus: remove useless isaConvertRange2Host commit a96db74c2a95bb1dce132cf47ea720ae939dfad7 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 9 00:43:26 2008 -0400 Bus: Don't try to find an ISA bus just for fun. commit b21311a99d58997cd1fc68726d0848242e9c34fc Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 9 00:34:42 2008 -0400 Bus: Remove unused RemoveOverlaps commit 41be6b3f0dc0baa1c6ae8d2b41a6be73ca0e7268 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 9 00:33:28 2008 -0400 Bus: Remove the notion of estimated resources. commit 095ba1435501776c8c8a34e767b89f89e5dc949a Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 9 00:27:33 2008 -0400 Bus: remove the "reducer" This code effectively didn't do anything anymore. commit 4457e31710af90f9ac295bb686c841e9473fb767 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 9 00:14:54 2008 -0400 PCI: Remove unused ia64 platform code. commit 86cfe0ee236bfd3613e5f9ba589211db42d009eb Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 23:45:40 2008 -0400 PCI: Simplify OS PCI function registration a bit. commit 2d427b9cb1594f8f2f66b463033fff5b459962fd Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 23:38:23 2008 -0400 PCI: Remove config mechanism details. pciaccess handles this for us now, no need to remember PC arcana. commit 5bb86bafd6fda296011cbcd5d15a85a6d770ae29 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 23:34:41 2008 -0400 PCI: Remove non-pciaccess path for x86. commit a67360e79fa7e17c3d907771694009c57c1cd195 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 23:31:38 2008 -0400 PCI: Always build domain support. commit 51e105ccc3d0ac8c0fe74efd029ffbddb80b140e Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 23:12:31 2008 -0400 Remove xf86GetResourcesImplicitly commit 599a0f3f1e3ae92676e3648471576c0001cfd9ae Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Nov 24 20:37:58 2008 -0800 Fix typo in 5bf2c88d2317230b95b2904cb975167d03ee13a2 Amazing how these things hide until you see the diff come back from the commit list. commit 5bf2c88d2317230b95b2904cb975167d03ee13a2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Nov 24 20:34:46 2008 -0800 Simplify filename generation code for Xorg -configure commit 75784e1e53ad78e21518696dd9d297bc08c17d54 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Nov 24 20:32:20 2008 -0800 Solaris: Make KDSETMODE failure non fatal, and retry it on interrupts commit 3e6da1636093d7dc98baac40544c0b0fb7fd8aec Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:55:57 2008 +1000 include: remove ENTER_LEAVE_SEMAPHORE macros. commit b292a7a2d7e259177e1cc37346c2bee27a018630 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:44:29 2008 +1000 dix: updated enter/leave core event model. As proposed by Owen Taylor [1], the enter-leave event model needs to adjust the events sent to each window depending on the presence of pointers in a window, or in a subwindow. The new model can be summarised as: - if the pointer moves into or out of a window that has a pointer in a child window, the events are modified to appear as if the pointer was moved out of or into this child window. - if the pointer moves into or out of a window that has a pointer in a parent window, the events are modified to appear as if the pointer was moved out of or into this parent window. Note that this model requires CoreEnterLeaveEvent and DeviceEnterLeaveEvent to be split and treated separately. [1] http://lists.freedesktop.org/archives/xorg/2008-August/037606.html Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 724f83b87bb16472d4c328e35d2a477384b29f84 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:29:01 2008 +1000 dix: add FirstPointerChild, FirstPointerAncestor auxiliary functions. FirstPointerChild: Return the first child that has a pointer within its boundaries. FirstPointerAncestor: return the first ancestor with a child within its boundaries. These are required for the updated enter/leave model. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 7d3e595f93dcd3d334e766a9dea602c05affdbaf Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:27:19 2008 +1000 dix: Add EnterWindow, LeaveWindow, HasPointer auxiliary functions. These replace the ENTER_LEAVE_SEMAPHORE_* macros. Unused currently. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 6bdc963cdabb4a2e77de7f00a1d062aa2b873f9b Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:37:35 2008 +1000 dix: split enter/leave event handling into core and device handling. Device events always need to be delivered, core events only in some cases. Let's keep them completely separate so we can adjust core event delivery. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 5e48f5e2dd2dec7cfd1fa40b61e25123dfca515e Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:41:59 2008 +1000 dix: remove unused EnterLeaveSemaphoresIsset. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 868fd503b7aeab31dba72046b59061008d8b7501 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 14 15:18:56 2008 +1000 dix: move Enter-Leave related functions into new enterleave.c Preparation for the new core enter/leave model. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit c4b9ab6bf56139fdd8c7c584a6f523c6766cddd6 Author: Keith Packard <keithp@keithp.com> Date: Tue Apr 29 08:29:42 2008 -0700 Handle transform failure when computing shadow damage area. PictureTransformBounds can fail, when this happens, damage the entire screen so that the shadow gets repainted correctly. commit 9c7679240ad90367693a462e288308b3fdc08f26 Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 30 19:05:07 2008 -0700 [randr] don't try to compute crtc transform when no mode is set. Dereferencing the NULL mode pointer would cause a crash. As these transform matrices won't be used while the CRTC is disabled, just leave their values alone. commit 315b6d0a425d0257f226ee7032aca3ca31665e59 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 27 11:46:39 2008 -0700 Update RandR global transform when driver notifies of transform change. Need to compute and save the global transform when the driver changes it. commit 5d9282fde919c936816a85c2a9c5734dc9d57cc2 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 27 11:45:53 2008 -0700 Export rrtransform.h as needed by randrstr.h When the transform management was moved from randrstr.h, the associated header file became necessary to build drivers. Include it as a part of the sdk headers. commit 7236fd9dd4e9f5c4cb5bafa5c2a18cff12a0444c Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 21 03:16:09 2008 -0700 Be careful about copying transforms around; they have allocated memory. commit 7e69e364d2ef146d8ec3651d04bdd6d641017449 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 21 03:15:00 2008 -0700 Fix rotated/reflected cursor positions. Doing projective transforms required repositioning the cursor using the hotspot, but that requires relocating the upper left corner in terms of said hotspot. commit 93179c214fc6ed88f72955a11c69ae0a47316d8c Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 21 03:14:47 2008 -0700 rrtransform needs randrstr to get RANDR_INTERFACE defines commit 7c61db66a470a8306e346ed8bf8934f014dada42 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 21 02:39:49 2008 -0700 Create rrtransform.[ch]. Add RRTransform argument to RRCrtcNotify. Instead of using a separate function to notify DIX about transform changes, add the transform to RRCrtcNotify so that the whole Crtc state changes atomically. commit fa6a1df209bd74da1d545982cca437afc2198cc1 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 21 02:35:28 2008 -0700 Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity. PictureTransformPoint computes homogeneous coordinates internally, but fails to handle intermediate values larger than 16.16. Use 64 bit intermediate values while computing the final result at 16.16 and only complain if that result is too large. PictureTransformIsIdentity was completely wrong -- it was not checking for identity transforms at all. commit 6fe9c15731be5f5afabacb3aa3ed71b840f4238b Author: Keith Packard <keithp@keithp.com> Date: Wed Mar 19 12:15:39 2008 -0700 Allow drivers to set crtc transforms. Track curent transform down in the mode setting code so that it may be set separately from RandR. commit 49db14e4ac26070ed86088419483888dda18b603 Author: Keith Packard <keithp@keithp.com> Date: Wed Mar 19 00:46:35 2008 -0700 Handle RandR transform matrices in floating point. RandR matrix computations lose too much precision in fixed point; computations using the inverted matrix can be as much as 10 pixels off. Convert them to double precision values and pass those around. These API changes are fairly heavyweight; the official Render interface remains fixed point, so the fixed point matrix comes along for the ride everywhere. commit 6f734aecaec4f5c6152c3ebca197ef65bb4523da Author: Keith Packard <keithp@keithp.com> Date: Tue Mar 18 16:06:06 2008 -0700 Eliminate inverse matrix from randr transform protocol It is easier, and potentially more precise, to compute the inverse in the server where everything can eventually be kept in floating point form. commit 197aa784694992f6bcfd194932309e440334c237 Author: Keith Packard <keithp@keithp.com> Date: Tue Mar 18 15:35:44 2008 -0700 Report whether transforms are support from driver through extension to client Add APIs to xf86RandR12 support and randr extension to record whether the driver supports transforms, report that value in the RRGetCrtcTransform reply. commit e86c34663ef97e946a1129450105efa89a123af6 Author: Keith Packard <keithp@keithp.com> Date: Tue Mar 18 15:25:31 2008 -0700 Clear shadow pixmaps before using them. This eliminates some ugly flashing, as well as clearing the borders when the shadow will not be completely painted. commit 97ab0c6eff870b52c0383b63a78cec49059b2545 Author: Keith Packard <keithp@keithp.com> Date: Tue Mar 18 15:15:40 2008 -0700 When converting from double to fixed, round carefully. This reduces the matrix representation error after inverting a transformation matrix (although it doesn't eliminate it entirely). Perhaps we should extend Render to include 64-bit floating point transforms... commit 6d3a9e40a4b9ec455af11cce31e4aa616c93db32 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 23:04:49 2008 -0700 Compute matrix inversion instead of using wire version in RRCrtcTransformSet It doesn't make sense to have the client invert this matrix when the server can do so reasonably efficiently. This avoids weird fixed point rounding errors when testing the transform against its inverse. Now to fix the protocol. commit 160252d94f04acc95f0a4e0f884ff565a5aa0744 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 23:03:56 2008 -0700 Add matrix inversion function (uses doubles) The obvious matrix inversion function, coded using doubles to avoid fiddling with fixed point precision adventures. commit 8fd82c88e3f2060fda4ba30376900ece77668c63 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 16:14:43 2008 -0700 Adjust transformed cursor position to account for hotspot commit eb222e64128034df8361d5a82d4f4aa1318923ce Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 16:14:15 2008 -0700 Actually use filter kernel size to expand transform redisplay box commit 3fdb963f6e8287edeb4c5bc7bbadbc02eb8bb910 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 16:13:25 2008 -0700 Correct bilinear filter kernel size (should be 2x2) commit ee6326a6b89b2d223f6e1eaf02aac1fe8aebfaf6 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 15:22:06 2008 -0700 Handle filter widths in xf86Rotate commit ddc8466137d229fdc100cc403f492c7d61a1ba89 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 15:21:26 2008 -0700 Initialize and cleanup new filter fields in xf86Crtc. commit 16c093afd4f6b30d889cacdc994b0024f9bd83d5 Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 15:20:52 2008 -0700 Pass filter kernel size through transforms commit 1df02d7ddd44f84bcaefd6583af1a9141cb3c78b Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 15:19:17 2008 -0700 Add kernel size to Render filters. This width/height value lets filter users know how far the filter spreads into the source image. commit 40f3dff6b350fe0be55ebf7dbca88a0ef8f6380f Author: Keith Packard <keithp@keithp.com> Date: Mon Mar 17 13:57:47 2008 -0700 Use transform when computing scanout size of modes Report transformed crtc sizes through RandR and Xinerama. Test screen size against transformed mode sizes when configuring the Crtc. commit f50349e1930e620cacdf27a6f8585fcb9cb5199a Author: Keith Packard <keithp@keithp.com> Date: Sat Mar 15 00:36:45 2008 -0700 [RANDR] Support filters in CRTC transforms. Create new RRTransform datatype to hold all of the transform related information, use that in lots of places to pass filters around. commit acda790e430b2a18c7c35379f6e538f3d01ff221 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 14 13:46:30 2008 -0700 [render] Split out filter finding from filter setting. To prepare for RandR using filters in transforms, split out code paths so that the RandR code can validate the filter name and parameters during the transform set operation so that use of the filter later will not have unreportable errors. commit e3d6f279d5c305dfb81ca109fbfb665870712d2f Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 13 21:31:12 2008 -0700 Wire up RandR CRTC transform protocol, bump server to RandR 1.3 This involved removing a pile of matrix code from the DDX, as well as moving a bit of transform logic from DDX to DIX. commit ff9d1cd843a9b0aba69a3d788b21d5f6af702590 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 13 21:30:18 2008 -0700 Add funcs to convert between protocol and pixman matrices commit c2f254da694731ea573aa8bbc2707c083743f2d4 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 13 21:29:19 2008 -0700 Randr now depends on Render for matrices commit f547650328287545a7a4d96df8d6a6c606dd95a9 Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 13 14:50:13 2008 -0700 Export a bunch of matrix operations from render. The render extension uses many matrix operations internally, this change exposes those functions to other parts of the server, drivers and extensions. The change is motivated by the 'transform' additions to the RandR extension but will likely be useful elsewhere. commit e063162e80e51ed4368874b3af7ba690ea280d9e Author: Keith Packard <keithp@keithp.com> Date: Thu Mar 13 14:26:01 2008 -0700 Add projective transforms to RandR DIX/DDX API. New RRCrtcGetTransform function in DIX that DDX can use to get the pending transform. The DDX code should be complete; the DIX code is just a stub at this point. commit 9c7ac47b871a71e42d2f6933749ca462f1a65b40 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 4 00:10:08 2008 -0800 Notify DRI when crtc regions change Drivers that care about crtc positions on the screen to ensure that vblank works correctly need to be notified when crtcs are changed. Provide a hook in the mode setting code that is invoked whenever any configuration is done to the screen. Use this new hook in the DRI code so that DRI clients are notified and receive updated information. Signed-off-by: Keith Packard <keithp@keithp.com> commit 554592cd70543f87cd8bee5ff47cc8281511e041 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Nov 24 11:50:38 2008 +1000 DGA: silence compiler warning. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 0dbcbd35f63db14734199a0beb2a91b6937f3838 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 21 12:02:02 2008 +1000 xfree86: Split the working code of NIDR into new xf86NewInputDevice. The xfree86 server previously hat NewInputDeviceRequest and InitInput, and both basically did the same thing. Reduce NIDR to parameter checking and use xf86NewInputDevice from both InitInput and NIDR to actually create the device. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit e078901a4eca02bd3e7a80d9462dafbca939a187 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 21 12:39:55 2008 +1000 dix: Enable core devices in InitCoreDevices already. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Adam Jackson <ajax@redhat.com> commit d939f2482e71ad20bac28b7aa4b2e8c8196e9d65 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 21 12:21:45 2008 +1000 dix: fix false comment. VCP and VCK are always present, this comment is a leftover from earlier MPX days. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 387563b77743d92be83420d982eaf57f5459a883 Merge: 85f650c9b f6e01fa1b Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Nov 23 13:15:46 2008 +0100 Merge branch 'master' of git+ssh://herrb@git.freedesktop.org/git/xorg/xserver commit 85f650c9b76ab2e244f01908a7941c320635becd Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Nov 23 13:14:27 2008 +0100 missing action in if statement. commit f6e01fa1b87ea190ea5ad723ce46893784ea1de4 Author: Stefan Dirsch <sndirsch@suse.de> Date: Sun Nov 23 11:16:03 2008 +0100 Added '-showopts' option to print available driver options (#5564). commit 8964b8d0ec2b7b3b6bf540cd647b14a20e8f64a5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 22 14:23:23 2008 -0800 XQuartz: More 1.6 server API updates commit ad0f232165fe1a25ca4fb6da817da02b6ce31779 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 22 14:04:28 2008 -0800 XQuartz: Fixed --disable-glx commit 8e2287c220694953e972cd5119c2b0cd256b7a30 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 22 13:57:45 2008 -0800 XQuartz: Updated some code to use newer server API commit 6eb33bc0cb2e62339d323e1f1894015d7e3142f3 Author: George Staplin <gstaplin@apple.com> Date: Sat Nov 22 11:37:08 2008 -0700 XQuartz: GL: Remove the inclusion of glcontextmodes.h. Add some commentary about future directions needed for the GLX drawable creation and destruction code. Match xalloc with xfree. I made some minor formatting improvements. (cherry picked from commit b772d64fce31d16b498c621096e39d5203994d6e) commit 429b4b20d5708d608fd55f91dd5bcd4ac0b51a12 Author: George Staplin <gstaplin@apple.com> Date: Sat Nov 22 10:57:58 2008 -0700 XQuartz: GL: Add a branch to prevent a NULL DrawablePtr structure access. In attach() check for pDraw being NULL, and also print an ErrorF message, because we eventually want to track down why this is occuring. It's unclear how this occurs, but as I noted in the 1.4 branch, I believe that the DrawablePtr/struct _Drawable -> id is the member being accessed that causes KERN_PROTECTION_FAILURE at 0x0000000000000004 This passes my tests using: env LIBGL_ALWAYS_INDIRECT=1 ./sometest. I fixed a warning: caused by initializing the screen->base.visuals with the configs. It is a ** not a *. It seems that some other part of GLX will initialize this for us. (cherry picked from commit 17f6a261fca6d5856069dce28bb4838261afc6bc) commit bc0c7075e29b1719409cf7de8a4ab9ae1315aa67 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Nov 22 19:10:09 2008 +0100 Remove the old libusbhid copy from os-support/bsd. This has been replaced by in-kernel support for USB mices several years ago and hasn't been enabled in build since X.Org 6.8. commit 76fcfc480133726112049e5bd9c3082d46825918 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 20:25:55 2008 -0800 XQuartz: GLX: sync up indirect.c to match George's updates in the xorg-server-1.5-apple branch commit 1a717779b67b9c1cdf734eef64135ac38829f726 Author: George Staplin <gstaplin@apple.com> Date: Fri Nov 21 17:28:11 2008 -0700 XQuartz: GL: remove glcontextmodes.* from the Makefile.am. It has been replaced. The new replacement is __GLXconfig. (cherry picked from commit 3bed9b65c807a1aeb662b8042826cbb54280181d) commit dacad9ae0bdaedff9403fbe84a5c5a4b4eef3542 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Nov 21 17:16:22 2008 -0800 Xephyr man page typo fixes. Also trailing white space removal to clear git warnings. commit ca64b5949d229a60a3c62b6d29d51873b7694bd6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 11:20:31 2008 -0800 XQuartz: Don't use LS to find X11.app on Tiger. (cherry picked from commit e62107e55261ef252a2a24dd26a60e5dd295d560) commit 701f8e3a94d2b659ebcfffd09acd1d66f9e797b8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 11:08:00 2008 -0800 XQuartz: Update applewm deps (cherry picked from commit 0ad91c59be8759a9c9e9d4f639056d8c689a3bc5) commit 393325f908f8bd6648e466183f3683a2d80b264e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 10:57:31 2008 -0800 XQuartz: spewCallStack is noop on Tiger now... (cherry picked from commit 56c469a68b92c6cf003802f418ea00bd596a41c3) commit 5d47a5d6526b7e52387647a15a580dfcafd1733f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 10:54:55 2008 -0800 XQuartz: pbproxy: Added some typedefs for types not available on Tiger (cherry picked from commit 0947aa7911f1de44bfe16e505a757b659c5ab2a8) commit b262788401715787c68cea4ca79f4b270307afee Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 10:53:39 2008 -0800 XQuartz: More Tiger ifdefs (cherry picked from commit 803509072f2c039e5cd555c4ac14d672f0e698c5) commit 510744444329170f702d31d43997a6bbc1591b44 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 21 10:44:11 2008 -0800 XQuartz: Resurrect the old audio path for Tiger (cherry picked from commit a61a8d9047e8765faf3892f4f2148c8553fd192c) commit d7ee76f9dd84da05b59591a971b96bf990136767 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 19 11:42:59 2008 -0800 XQuartz: pbproxy: Push the pbproxy Xevent processing into its own thread and just have the AppKit thread wake it up. (cherry picked from commit 799715b8f3327c8da59ab45706e85af2d2c438e4) commit a9e20306fbe3262602f21b876a52a1ef38cdf20a Author: Egbert Eich <eich@ovid.suse.de> Date: Fri Nov 21 18:50:01 2008 +0100 int10: Do an mprotect(..,PROT_EXEC) on shmat()ed memory ranges. When the linux kernel sets the NX bit vm86 segfaults when it tries to execute code in memory that is not marked EXEC. Such code gets called whenever we return from a VBIOS call to signal the calling program that the call is actually finished and that we are not trapping for other reasons (like IO accesses). Use mprotect(2) to set these memory ranges PROT_EXEC. commit a54153e669fd293a47f0077bf25505dd545ddce2 Author: Rémi Cardona <remi@gentoo.org> Date: Fri Nov 21 16:39:00 2008 +0100 xfree86: don't reset Auto(Add|Enable)Devices, use defaults from xf86Globals Without this, commit ace38fafb062372dcd3d56378b5b8f86525c6241 is useless when HAL support is disabled. Signed-off-by: Julien Cristau <jcristau@debian.org> commit 6a1b2fed7e465a9c652e8ee250b8eab440945862 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Sep 28 12:18:16 2008 +0200 Add a man page for Xephyr, with information from the README file. commit 10d472bf9d61bef32d0a383b2e3783e7a1d7621f Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 05:15:30 2008 +0200 Support for BSD apm XXX check amd64 pci init commit f4e725f248870a2de10449cc8f53de32e7840d45 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Nov 20 13:51:15 2008 +1000 dix: memset DeviceVelocityPtr to zero. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 7f818776b7a19bd6100596d327ecaa69be317bc6 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Nov 19 15:05:50 2008 +1000 dix: fix typos in comments, one formatting fix. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 037ec5a3c496b07f885a128828ef804b3aa8eee2 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 19 15:12:04 2008 +1000 gitignore: ignore .patch files commit ace38fafb062372dcd3d56378b5b8f86525c6241 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Nov 18 08:19:45 2008 +1000 xfree86: without CONFIG_HAL, Auto{Add|Enable}Devices and AEI is false. There's little chance that we'll get the input devices at runtime without HAL, we might as well force the server to add mouse/kbd devices automatically - just like in the olden days. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 1cd894173ee7fa3d1a78d330c12453ea53e7b908 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 19 13:44:26 2008 -0800 Always use server-<display>.xkm to avoid races when multiple servers start Previously each server starting ran xkbcomp with the output set to <keymapname>.xkm, read it, then deleted it - which led to races if two servers were starting at the same time with the same keymap. Sun bug #6773816 Xorg uses the same xkm output file for compiled keymap file <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6773816> commit 1e4412abc499b9938bbac8a3ecd82f7f12d448d9 Author: Rémi Cardona <remi.cardona@lri.fr> Date: Mon Nov 17 09:56:49 2008 +0100 drop unused HAVE_LIBDRM_2_2 Signed-off-by: Julien Cristau <jcristau@debian.org> commit c4ec71b405fcb5132d5089e3f8dd7b00c235265a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Nov 16 17:57:46 2008 -0800 XQuartz: pbproxy: nuke RCS Id, update header license/copyright (cherry picked from commit 477c6968a88429bb9c10222a5836bdc936d10ab1) commit 42f330cf9ef44aea7428a67d282dfb1a60196e55 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Nov 16 10:42:03 2008 -0800 XQuartz: pbproxy: Remove thread-main.m it got accidently added and isn't used. (cherry picked from commit cb6ffce68a2d10022fa92725d2d1837da4b3b89f) commit 19aac4274bbac55ce944acfaf3274a4403fe392e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 19 10:55:29 2008 -0800 mi: Push screen-saver/DPMS handling to after the EQ pop operation. This way we on't need to hold the mutex during the dixSaveScreens() call. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 56d1793c435abbaababab031860f1160f09fff06 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Nov 19 10:54:57 2008 -0800 mi: Only increment tail (push) when the event data is actually in the queue Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 570835b9a89187a36e08defbccc56051bb349b52 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 19 10:19:20 2008 -0800 Use bsd_pci stub routines on Solaris too, since we use pciaccess for real work Depends on commit 70e18a3b6b9d52169bca650f6cd4ef5d8ab40d95 to get definition of xf86InitVidMem on Solaris. commit 3932a848572f4eaf8b7f1d91d9b74aeafab069a2 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 18 14:21:01 2008 -0500 Xinput: use floats for ConstantDeceleration and AdaptiveDeceleration These values need not be constrained to integer values. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 08cd361234ed0410f67342f46ae01120c4fe3331 Author: Dave Airlie <airlied@redhat.com> Date: Mon Nov 17 10:28:48 2008 +1000 exa: avoid doing prepare/done without intervening copies in exaFillRegionTiled This does a precursor check to make sure the copies are required before entering the prepare/done code. commit 8f8a9c19ad58768b07461a3f4bccea98f7c4f958 Author: Dave Airlie <airlied@redhat.com> Date: Mon Nov 17 10:24:39 2008 +1000 EXA: avoid copy operations if no boxes in use Simple fix for now, I'm sure damage shouldn't be calling us with nbox = 0. commit 03f7a66a1ae3f522a49bcc783066d53d69c97262 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 15 19:45:49 2008 -0800 XQuartz: Don't use TIS on Tiger... (cherry picked from commit be8ac84c15e7e76c581b9e75cda74139394aa4c7) commit e8112784e8ef80a96ed54eca7e148b424001a38f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 15 19:52:34 2008 -0800 XQuartz: Integrated xpbproxy into the server. Added a configure option called --enable-standalone-xpbproxy which is useful for deveoping xpbproxy. The 'active' switch in preferences just disables the in-server xpbproxy (not this standalone). (cherry picked from commit 42944936326ef8732f622db9f75b79a92980550d) commit 24928b85dc996c8d0a052ddf383df25718ee5305 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Nov 15 13:28:53 2008 +0100 DRI2: Don't crash in DRI2ClipNotify when DRI2DrawablePtr is NULL. commit e5271c374715dd4e9a724ab3e5f77108d4ce8c23 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Nov 15 13:27:42 2008 +0100 Set libdrm flags correctly even when only DRI2 is enabled. commit bc4f804cd86497655f6765b0954e64dc959939e3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 14 15:13:22 2008 -0800 XQuartz: Actually add glcontextmodes.[hc] (cherry picked from commit 763195d338345e3637d112279bdbe002b6e7791a) commit aedafbea0e1c7bc780ebe7ae878f62525769aca8 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 20:21:24 2008 -0700 fix compilation on systems that don't have XP_EVENT_SPACE_CHANGED defined (cherry picked from commit 6e833e41e2f3a84f7e5164b918737b3975517c12) commit b0789365719f48c0b477b4703f2072f932246b76 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 14 14:57:09 2008 -0800 XQuartz: Initial work on readding GLX to the 1.5 server (cherry picked from commit a186cab6ae82340770c13b37ff5df731ce2a0ceb) commit 1d7049f8fd3c0798250b9213149d3ce0b37ab77f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 13 12:45:35 2008 -0800 Xquartz: Force sending mouse clicks to AppKit if we're over the menu bar (cherry picked from commit 7dff93ec1ac92aeaf3b70d5cfe787fa4a28c0dba) commit 3c124832642f1ec3228a57bea3d1eda68a188ff3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 10:37:17 2008 -0700 XQuartz: Made X11Application.m a little more tidy. (cherry picked from commit 3520386261b838196a8918e8bee16bdccbc9781d) commit e917806fc556c2054b2835c8f85770b554c78092 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Nov 14 10:56:21 2008 -0800 os/connection: TRANS_NOXAUTH bit comparison brainfart fix. https://bugs.freedesktop.org/show_bug.cgi?id=18524 commit 17bccff4ce905f46c074fd8ee7c6567b1371a0a1 Author: Fernando Carrijo <fcarrijo@yahoo.com.br> Date: Fri Nov 14 12:36:20 2008 -0500 [dix] Remove a duplicate statement. Signed-off-by: James Cloos <cloos@jhcloos.com> commit ba4e08244ed3923eecf26842dfc1df17c696e053 Merge: 81fd17f5f 5bad5d2ab Author: Alex Deucher <alexdeucher@gmail.com> Date: Thu Nov 13 15:04:18 2008 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/./xserver commit 81fd17f5f49cdd2c10d0bf3b7ddeb8b5953886a5 Author: Alex Deucher <alexdeucher@gmail.com> Date: Thu Nov 13 15:00:30 2008 -0500 Only add default modes if EDID supports continuous-frequency When an EDID is present, only add the default mode pool if the continuous-frequency bit is set in the EDID. Should fix bugs like 18512. commit c232f3d673fb00d7fceb8e82741349d64e5ac0ad Author: Adam Jackson <ajax@nwnk.net> Date: Thu Nov 13 14:58:21 2008 -0500 xf86TargetExact should try harder if there's only one monitor attached. If there's no preferred mode, but only one monitor, pick the biggest mode for its aspect ratio, assuming one exists. commit 5bad5d2abea2f51cbf53dc8dd016e90ccb086220 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 13 11:32:40 2008 -0800 XQuartz: Fixed XBell() when not using system alert. (cherry picked from commit aa0e9ab1c7a226cdcb3c5e62be159355a290faf8) commit 0fca8588a238c91580b305c3671567e910150a02 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 13 11:10:15 2008 -0800 XQuartz: Added more debugging to handoff spew (cherry picked from commit acefa7e3c8706ffedc052effd50b36ce10e72c22) commit 47d38218706564d1437dc3ff9d1bba3511db063c Author: George Staplin <gstaplin@apple.com> Date: Wed Nov 12 17:17:25 2008 -0700 XQuartz: GL: Handle the alpha differently when the alpha is equal to GLCAPS_COLOR_BUF_INVALID_VALUE. This prevents visuals with odd sizes. The machine I use didn't have this problem, but it shows up on some others. (cherry picked from commit ed181382ddeb77019577d39b9c06b1cd839e18e4) commit 6b501d7cc55f1d06966cdf3caf36bcfc6cf18939 Author: Alex Deucher <alexdeucher@gmail.com> Date: Thu Nov 13 13:57:30 2008 -0500 Add missing newline when printing edid info commit 33edd32702d963802e64d382124eabb9d0352fa8 Author: George Staplin <gstaplin@apple.com> Date: Sun Nov 9 18:35:10 2008 -0700 XQuartz: Disable 2 calls to miSetVisualTypesAndMasks that seem to be unnecessary, and possibly wrong (with regard to masks and bits per RGB). Use the settings queried from the system in xprScreen.c, rather than those 2 calls. The 2 calls increased the total number of visuals a great deal (when using GLXEXT), and not all of the visuals were usable with GLX. Some of the visuals aren't usable with GLX still, such as DirectColor, but that seems to be acceptable based on my understanding of the manual that states "a subset of visuals are made available for OpenGL rendering." (cherry picked from commit 373b8a5f32509722e06d8776109e6c3f06645ee0) commit 1523476afa6657c20eba112e3ee051d45e721164 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Nov 8 23:32:40 2008 -0800 XQuartz: CFBundleShortVersionString needs to conform to X.Y.Z as well... sigh (cherry picked from commit 54d20f6d33c347bcb37a0a8287c2d92fed2b9092) commit 1f301a0051d65296189248b2529616d9b33276b3 Author: George Staplin <gstaplin@apple.com> Date: Thu Nov 13 01:27:33 2008 -0700 XQuartz: Restore the logic of AppleWMDoReorderWindow to the same as the 1.4 branch. It was returning inverted values in comparison to the 1.4 branch. This resulted in the windows not drawing due to a deep path of: RootlessReorderWindow -> SCREENREC(pScreen)->imp->DoReorderWindow(winRec) - > xprDoReorderWindow -> AppleWMDoReorderWindow. (cherry picked from commit d1d398db762fe7d5720f9b5fafa2bbe8372fceac) commit f5841e96487234df5ead5f5c0fb3c587c418cb46 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Nov 11 22:50:35 2008 +1000 dix: don't store enter/leave and focus semaphores in a devPrivate. We need them for each window, every time a window is allocated. Storing them in a devPrivate is the wrong thing to do. This also removes the unused ENTER_LEAVE_SEMAPHORE_ISSET macro. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 26f701704b4e536cd91bd8a9f7d2194793471998 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 12 16:53:29 2008 +1000 dix: remove duplicate line in EnterLeaveEvent. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 8ff62ea5ba1bc331c886840b2b1e101cb4f2ebed Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Nov 12 15:19:09 2008 -0500 CopySubBuffer expects GL style coordinates. commit d91243beb63008fff2ce6affa7db091786e8c49a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Nov 7 08:39:38 2008 +1030 dix: formatting fix. commit dde09076c5c0c36a4a9321cd23a2c7922c4c755b Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Nov 5 12:52:03 2008 +1030 dix: remove superfluous variable devgrab grab == devgrab anyway, this is a leftover from the time when we had two different grabs per device (core and XI grab). Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit fc3e8bfb82323477b54181c6d546c90f53f1ebd8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Nov 4 15:27:30 2008 +1030 mi: clean up mieqProcessInputEvents, copy all events before processing. Copy the EventRec's information into local variables before processing them, this should make it safer for upcoming threading and also makes it easier to read. Simplify the event allocation code from the abyss it was before. This also fixes a potential bug where a custom handler could scramble the event before the same -now scrambled- event was then passed through the master's custom event handler. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 31005efb1bb6be5a892ff905f754109dc3fa8fe6 Author: Fernando Carrijo <fcarrijo@yahoo.com.br> Date: Mon Nov 10 13:23:45 2008 -0500 input: Remove useless conditional. commit 24383056d0513cc588cee5cee78f1cba2c0fbe89 Author: James Cloos <cloos@jhcloos.com> Date: Sat Nov 8 13:04:20 2008 -0500 Don’t recommend fixing HAL if HAL support is disabled. As reported in http://bugs.freedesktop.org/show_bug.cgi?id=18438 the server suggests reconfiguring HAL if AllowEmptyInput is enabled and no input devices are known. Instead of that notice, if HAL is disabled at configure time, AllowEmptyInput is enabled in the config and no input devices are found report those facts and recommend disabling AllowEmptyInput. commit b3c7e62664457a3802ebc23785446051624a8c2f Author: James Cloos <cloos@jhcloos.com> Date: Sat Nov 8 12:18:13 2008 -0500 Remove some null statements. Remove several doubled statement-terminal semicolons. Reported by Fernando Carrijo. commit 21c116219cd5c6845a0955f2d88fdb5fab5c17cf Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Nov 8 01:25:14 2008 +0100 Fix typos which caused exaCompositeRects() to use an incorrect damage region. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18065 . Also, it can bail if either width or height of the bounding box is <= 0, not only if both of them are. commit 59f9fb4b8c031df69b3592a26b77e744ff4a556e Author: Luc Verhaegen <libv@skynet.be> Date: Fri Nov 7 19:11:11 2008 +0100 XAA PixmapOps: Sync before accessing unwrapped callbacks. When using any XAAPixmapOps, we call into unknown but freshly unwrapped callbacks (like fb ones). Unlike the XAA*Fallback calls, we did so without syncing first, exposing us to all kinds of synchronisation issues. I believe that the rendering errors appeared now because *PaintWindow vanished (e4d11e58), and we just use miPaintWindow instead. This takes a less direct route to the hw and ends up at PolyFillRectPixmap, which very often left drawing artifacts. We now sync accordingly, and no longer get the rendering artifacts i was methodically reproducing on radeonhd, radeon, unichrome... Also, in order to allow driver authors to remove extensive syncing or flushing to hide this issue, create XAA_VERSION_ defines, put them in xaa.h and bump the patchlevel. (novell bug #435791) commit 991c88b7542164194be73573e7644164416ea90c Author: Julien Cristau <jcristau@debian.org> Date: Fri Nov 7 17:36:38 2008 +0100 xfree86: xf86SetDepthBpp needs to respect the driver's depth24flags When setting the depth to 24, leave bpp unset so the logic to pick a supported value is used instead of ignoring the driver's preference and forcing 32 bpp. commit d3d6be4948fa19947fd3b03e6694247109cc0ffb Author: Julien Cristau <jcristau@debian.org> Date: Fri Nov 7 18:36:00 2008 +0100 mi: Fix infinite loop on regen when swrast_dri.so is missing The swrast DRI provider gets pushed on the glx provider stack at every server generation, so the stack turns into a circular list on regen. X.Org bug#18388 <https://bugs.freedesktop.org/show_bug.cgi?id=18388> commit f59352881f315a634f60c9aac885b2764b28b167 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Nov 6 14:41:55 2008 -0800 XQuartz: Make LS parse our version properly... it didn't like our CFBundleVersion (cherry picked from commit 980df1b4ff7d4dab9dc1462dc086542265b1fb1b) commit b4ca9dc2393ace2415163094b916f0d17ecba9ee Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 5 21:58:04 2008 -0800 When HAL returns a NULL property, print "(null)" instead of a NULL pointer They've promised to fix Solaris printf soon to check for NULL pointers instead of segfaulting, but that won't help people on existing releases. commit 13d06f5aaf6120c902a323649615c1ce3d1b5359 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Nov 4 12:53:12 2008 -0700 XQuartz: GL: Add capability detection for depth buffers, and multisampling. GL/capabilities.c: Add handleDepthModes(), and extend handleRendererDescription() for the various depth and multisampling flags. Add initialization of the new config options to initConfig(). GL/capabilities.h: Add depth and multisample config members. GL/visualConfigs.c: Add depth and multisampling support to the visual config setup. (cherry picked from commit f527381eea6a8ae6cd791475b2060d21fcf8efb2) commit 34bb06b292dc8b07d8602941aab3e69a73811314 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Nov 3 19:52:48 2008 -0700 XQuartz: GL: Work around problems with really deep visuals. GL/capabilities.c: #if 0 (for now) any capabilities above 8 bits per channel, because they introduce drawing problems. GL/indirect.c: Comment out some visual setup code that shouldn't be running, and actually seemed to cause some problems. The current visualConfigs.c code seems to do a reasonable job of setting up visuals for XQuartz. GL/visualConfigs.c: Make use of the proper visual .class. Eliminate depth 0. It seems we really just want 24 for now, and 0 I think was a flaw in the original code. (cherry picked from commit 1e5f63f15e13a40a6e69a1505934d10d6990b6a2) commit 39e82a9b1250b23768136f3c397377a97f8b908c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Nov 2 15:52:22 2008 -0800 XQuartz: Replace deprecated API usage thanks to Robery Murphy (cherry picked from commit 71dd052412400362793f2f0c7c02bf4f4309738c) commit b4db46320a437ba8894cb8cfd4ee3abdcc894b01 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 20:18:27 2008 -0700 XQuartz: version string updated for 2.3.2_beta3 (cherry picked from commit 81bb4128570b44d779126a8dffcd3c5620747383) commit c9051b684b524549eab6d5b88ee3e195a6f6fbe8 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 5 18:25:57 2008 -0800 Use OsSignal in Popen/Pclose to avoid SysV signal() stupidity commit d63ea510138c8b6de66184c78cda39ed9981fc1f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 5 14:52:29 2008 -0800 Non-Linux OS'es should default to kbd driver, not now-dead keyboard driver commit 446d9443cea31e493d05c939d0128a8116788468 Author: Adam Jackson <ajax@redhat.com> Date: Wed Nov 5 11:51:06 2008 -0500 linux: Drain the console fd of data when using evdev for keyboards Works around a silly bug in the kernel that causes wakeup storms after too many keypresses. Should fix the kernel bug too, but this at least keeps the idle wakeup count below 1000/sec. commit 6d21fbf00648307208146aca0837ec63ea490659 Author: Adam Jackson <ajax@redhat.com> Date: Wed Nov 5 11:39:46 2008 -0500 kdrive: Bye bye Xvesa commit 9a874a71a791c6110fd57b8a5c083f777a446d0f Author: Egbert Eich <eich@freedesktop.org> Date: Tue Nov 4 21:31:27 2008 +0100 DDX/RandR: When positioning outputs assume width/height = 0 if no modes exist. When a user specifies the position of an output for which no modes exist (for whatever reason) assume that the width and height of this output is 0. The result will be the same as if this output isn't taken into consideration at all and thus should be sane. It will prevent a segfault when trying to determine the width and height of a non-existent mode. commit a4d62bbf215894bad8e19d99f7330c637d3d49e3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Nov 4 11:27:53 2008 +0100 AIGLX: Reinstate call to driver texOffsetFinish hook. It was accidentally lost when factoring out __glXDRIdoReleaseTexImage, so this is a regression fix and should probably be backported to server-1.5-branch. commit 27f1ad466cd9662d638f4a8e59beafc32a8b2a8f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Nov 4 11:26:03 2008 +0100 AIGLX: Don't truncate offset returned by driver texOffsetStart hook on 32 bit. commit de1a8b68eb10c39a0d4a197107d68d7cc009edb2 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Nov 3 11:30:48 2008 +1030 xkb: extract the correct device in XkbFilterEvents. If the event is an XI event, we need to work on the correct device, not on the VCK. Adds XIGetDevice(event) function to extract the device from an event. commit d97239956667f8181f30271759573b75bf455fbb Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:40:41 2008 +1030 Purge device-based WindowAccess code. Really, this was a bad idea. It's not security, the UI features that would have been cool (e.g. clicking through windows) aren't implemented anyway, and there's nothing you can't achieve just by using plain XI anyway. Requires inputproto 1.9.99.6. commit cbc6f983959595aa21c9dd72fac6a7070a650ef7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 14:36:48 2008 +1030 xkb: when faking mouse button events, fake them on the correct devices. When MouseKeys are activated, keyboard devices may generate fake mouse button events through XKB. Let's get then running through the appropriate paths, i.e. as XI events on the correct device. To make matters more fun, ProcessOtherEvents drops events if the DIX device state cannot be updated accordingly, i.e. all button events from keyboard devices. Hence we need to get the paired MD for the device in XkbDDXFakeDeviceButton, and post the event through the paired MD (usually the VCP). Removes now-unused ddxFakeBtn.c. Note: this patch only half-arsedly fixed button events, motion events are a more complicated matter. commit 4971315296cbf868dd738c1c0c1c504fcfe1b619 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Nov 3 17:47:36 2008 +1030 dix: clean up GetPointerEvents and GetKeyboardValuatorEvents. Split into several functions, remove some stale comments. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 6bb0e0a53656db6168a053fb51b242a8640c1461 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 24 16:22:09 2008 +1030 xnest: I'm sure xfree works fine, even if we're 64 bit. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 67b7e06c4fa4e8dafb64d9f3eb976836d0cc5889 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 25 19:39:48 2008 +0300 XKB: Remove pointless macros These weren't even being used, which isn't overly surprising, given that they were already in the struct. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit d9ff20e323ba9fb309629ac21946e85709625589 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Oct 23 16:48:15 2008 +1030 DIX: Remove unnecessary prototype We don't call XkbCopyKeymap from getevents.c anymore, so axe it. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 064ee458c7183eb91ef2e0f262b312ba1e3ad6e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 9 15:54:56 2008 +0300 XKB: Tiny cleanups to _XkbLookupAnyDevice A couple of coding style cleanups, a warning fix via removing a now-unused label, and also put an else so we don't spuriously trip a condition that should admittedly never occur anyway. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 97c9e6a7139e07a0761be05034fae42fcd65ba36 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 28 17:10:28 2008 +0200 XKB: Fix thinko, causing warning (erroneously fixed in 5544c51447) newTypes is a local variable which always has an address. newTypesIn, on the other hand, might be sus. See also 5544c51447f551dfc6df64438873a7ce64743976. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit caf1e6a1c92a2e70de9159f93d6f5b48c202dd81 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Mar 18 10:05:00 2008 +0200 XKB: Move XKBrules.h to the server too Get our own local copy of this, so we don't have to define XKB_IN_SERVER anymore. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit f4036f6ace5f770f0fe6a6e3dc3749051a81325a Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 22 22:40:44 2008 +1030 Remove XEvIE It's unmaintained and has been broken for quite a while; MPX finally smashed it completely. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 8c3753a0b711b5708b61f64ab4010ca01608d679 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 22 22:29:54 2008 +1030 A bit of whitespace cleanup in include directives. It's #include <foo>, not # include <foo> Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 889a8dc02bbd3926eaf16dce8f844dc58558e982 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 22 22:29:54 2008 +1030 Xi: XINPUT has been mandatory for ages Ditch all #ifdef XINPUT, since it's always built. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 4cf2f4172abc4bf848c1726e6dac535713e08f0b Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 3 12:50:28 2008 -0500 Add xf86MonitorIsHDMI() helper. commit a7951a4dad902edea76a5cd68f833f0e48ae804b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Nov 3 10:00:54 2008 +0100 AIGLX: Allow 2D driver to prevent zero-copy texturing of a pixmap. The driver can return ~0ULL to achieve this, e.g. if the pixmap doesn't fit into offscreen storage or if its pixel format isn't supported by the 3D engine for texturing. See http://bugs.freedesktop.org/show_bug.cgi?id=17723 or http://bugs.freedesktop.org/show_bug.cgi?id=12385 . commit f8af66ddb21b4fb1ae5b4f7f852418ca7b0e7aec Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 20:03:34 2008 -0700 XQuartz: Add option to allow access to the menu in fullscreen mode (cherry picked from commit 637a9f4bd1ff2b55c870a08ead4940df0f9818e5) commit c5086badf0387d4d5af10882de90a1faa180550f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 18:58:57 2008 -0700 XQuartz: LP64 related casting fixes from Bob Murphy (cherry picked from commit ea71710aaa7166ab510abe70f2dc47942de0ead7) commit 20239a4deebccc9f86586ef6b8ef61311a6fa6a0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 18:58:25 2008 -0700 Rootless: LP64 related casting fixes from Bob Murphy (cherry picked from commit 40441c4e31167932721a79d7ca572caaa1d36e72) commit ecd55bc859eb5d7c639d5a6d531d9df524124247 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 15:10:34 2008 -0700 XQuartz: displayScreenBounds uses quartzEnableRootless rather than !quartzHasRoot (cherry picked from commit c883a78ef0c2e7e29437881db85d3815a89ab874) commit 4e762b8aa37b588e6cffcdd4a0152090190005e2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 14:39:54 2008 -0700 Rootless: Force initialization of static variable before use. (cherry picked from commit cece29317269385aa7a0d3047e6f90e6a17d01eb) commit 9f49f5172d10070ebd4a9e72ac3c5227c6f35853 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 13:00:01 2008 -0700 XQuartz: Silence pointer debug spam (cherry picked from commit 9ca099e928653b5a0fb745186e17bfcc3d74ccc0) commit 93298c7f8f73bdb9892da0e41d2c2a67719dc736 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 12:55:46 2008 -0700 XQuartz: Don't map the menu bar to the screen area. (cherry picked from commit 1115917ada127a1cd6a8b61efe7fd134e2ea85fd) commit 31907986a6d4dc726d8ce0071f5884ce6cfea33b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 31 12:37:32 2008 -0700 XQuartz: Fixed Xplugin thread safety issues, so rea-enable background window check (cherry picked from commit 5fc73b1141eca8b678e54412ca33afa31a76d088) commit 227d782a1bddfa1393cddd0c73c0288e18645c47 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Oct 30 13:44:55 2008 -0600 XQuartz: GL: Mark visuals that are slower than others, due to lack of acceleration. This is used in libGL to determine a preferred visual. glxinfo -v will also report "visualCaveat=Slow" for such visuals. (cherry picked from commit d5c17f585a240be9f9135975738e62951cde3353) commit 5287602a4161cd036e3125cda09ba750190a0b47 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 29 17:20:11 2008 -0700 XQuartz: if 0 out a block to avoid thread-unsafe lockups (cherry picked from commit 60d7359a67900ad4601dbc73e07bcd8c803100a5) commit 93d7cd31c527afbf26f4e039afb6adbb6a60fab7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 29 17:18:05 2008 -0700 XQuartz: Purge the old XQUARTZ_EXPORTS_LAUNCHD_FD option (cherry picked from commit 490756c7fbe0792c4bd6ae434e7a48e0beffa5c7) commit 0a076b6a7f3c97ff712412eee32e013d3bfd7364 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 18:32:26 2008 +1030 xkb: remove unused label "out", clean up program flow. commit 971aef64416058665bc903fee39fea1619cd3727 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 17:05:40 2008 +1030 dix: FreeDeviceClass() and friends can be static. commit 3c3a47d0f5ce7fb9548a3eefee9e72488d3ac279 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 17:00:21 2008 +1030 include: remove unused declaration for RegisterPairingClient(). Matching functions got removed in 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee. commit 7c5dec9f716962a6e67dba99418061cebe10e1d2 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:56:49 2008 +1030 dix: remove unused GuessFreePointerDevice(). Not used since the MD/SD hierarchy was introduced many moons ago. commit 12599af285a610fb429245798330f2317c75ac2c Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:50:28 2008 +1030 dix: NextFreePointerDevice() can be static. commit 5d0a945a030cd7626046e9f6c8d5c6bd170649d9 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:29:42 2008 +1030 dix: SwitchCorePointer is long gone, bury it. commit eb014021c2b3604fc67daebd6860b5dc959fabb6 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:27:58 2008 +1030 dix: PairDevices() can be static, remove from input. PairDevices() is only ever called in EnableDevice(). commit b6b26560d65d9468c89dd046396d9aeb14e1b227 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:23:34 2008 +1030 Move EXTENSION_BASE and EXTENSION_EVENT_BASE to misc.h. commit f781a752e642cfe7d08f841b332c3ae507315598 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 16:16:18 2008 +1030 Move MAX_DEVICES to misc.h, rename to MAXDEVICES for consistency. commit 245d1c162c7b13c98a9a28dc7ad441366d7e8006 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 31 11:50:47 2008 +1030 xkb: ProcXkbSetCompatMap should do dry-runs, then normal runs. Was doing only dry-runs, which kinda explains why changing the compat map didn't really have any effect. Fallout from e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 70e18a3b6b9d52169bca650f6cd4ef5d8ab40d95 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Oct 30 20:38:34 2008 -0700 Refactor Solaris mapping code to work with standard shared/vidmem.c Also merge sun_bios.c into sun_vid.c and upstream Solaris patch to keep aperture device open, to allow mappings to occur after X server has given up uid 0. commit 2809a56b4bc7f09f132c70dc39c6695495351c4d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 30 16:05:40 2008 -0400 xace: Fix an incorrect call to the RECEIVE_ACCESS hook. commit 0f2fd0577fe2740a32d3a2749e2c3582f891417c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 30 15:35:33 2008 -0400 xselinux: send more specific message types to libaudit. commit 4ce19b4477057a724b548e342d4c6da2b6721824 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 30 16:02:13 2008 +1030 xfree86: fix xf86ScaleAxis once again. Maybe one day I stop doing stupid patches like a3a7c12fcf8e4ac1418f9ea53f76091f309a721b. So, if X < low, reset to low, and _not_ to high. If X > high, reset to high, and _not_ to low. commit f12d7ad1647d12ccf92291ebc0607defe6a634a1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 28 12:38:05 2008 -0700 XQuartz: Pass along SIGINT and SIGTERM from the stub to X11.app (cherry picked from commit 183ca5d68b4f34e248749f304ce140de11bd451b) commit 273df54685768f74ed29926e88a63dc9f86744f1 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Oct 27 22:07:00 2008 -0600 XQuartz: pbproxy: Fix a bug that prevented nedit CLIPBOARD from being proxied. It seems that we were calling copy_completed: too soon. Now we return instead of falling through to the free_propdata, and copy_completed:. (cherry picked from commit 5797d5b662817a3369a74a673f4a7c995cde75cf) commit 313d87341aff2396645d2c315086d487c0073d27 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Oct 27 20:44:02 2008 -0600 XQuartz: pbproxy: Work around bugs in some apps that aren't ICCCM compliant. Eterm ends up setting the type of the property to TARGETS, instead of ATOM. That's why it wasn't working. (cherry picked from commit 9be5998ede7427f14dd9597e117b3d6b427ba4e5) commit 9007d3beea2e2d8b271f696d433cb30e32cda401 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Oct 27 16:34:24 2008 -0600 XQuartz: pbproxy: Add code to handle PICT conversion to PNG and JPEG. This may work, unfortunately I don't have test apps that fail. The way it works is by using an NSImage class initWithPasteboard: method, which we then get the TIFFRepresentation of, and convert to PNG or JPEG. The TIFFRepresentation uses NSTIFFCompressionNone; which should be lossless. (cherry picked from commit 8d048cfa956f4a0860250cc836a6748912b37ad8) commit b742da0b719198a42a086049771792af84f470ca Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Oct 26 13:17:49 2008 -0700 XQuartz: pbproxy: fixed blocking (cherry picked from commit bb330a1b1c480e89727fb75ff5aeb71f4afc5ee3) commit c885110aedc19e551de22a526397d77013c3dfcb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Oct 26 10:22:12 2008 -0700 Xquartz: pbproxy: Some debugging about unhandled mime types... this will spam up quick, but will be useful for a while... (cherry picked from commit 3647215310f5a52126661b9ec473dcfeed25b40f) commit e7c26964eef6732c9603b26b7396f95443c5ba8a Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Oct 24 19:12:05 2008 -0600 XQuartz: GL: Fix several error handling mistakes in handleRenderDescriptions, that were leftover before the final code evolved. (cherry picked from commit fe35a3639081dc78ac6cc4123cde37770f6a39fd) commit 21ea9d82aab8ff0e0d1904d188f96f9cfb2b051d Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Oct 24 18:11:46 2008 -0600 XQuartz: GL: Add feature detection of color sizes, and accum sizes. This gives us a *lot* more visuals, and they should be more accurate. Some of the visuals may have been wrong before. This may enable more OpenGL programs to behave correctly. I also suspect libGL needs a little work to handle some of these correctly. (cherry picked from commit 98a084ce9c455260ecdb5f8eecb67f33dbb53b69) commit c264826da96ad1859dd112b17eb8aa9e5278478f Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 16 11:22:29 2008 +1030 xfree86: If AEI is on, disable "kbd" and "mouse" devices. This consists of two parts: In the implicit server layout, ignore those drivers when looking for a core device. And after finishing the server layout, run through the list of devices and remove any that use mouse or kbd. AEI is mutually exclusive with the kbd and mouse drivers, so pick either - or. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 6c451859552e1fc78f6589617482f9ff96d7ed8a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Oct 20 12:19:55 2008 +1030 config: don't add duplicate devices through HAL. If HAL is restarted, the device list is sent to the server again, leading first to duplicate devices (and thus duplicate events), and later to a FatalError "Too many input devices." dev->config_info contains the UDI for the device. If the UDI of a new devices is equal to one we already have in the device list, just ignore it. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 102c4dac7c521941f52652152b1660cd7f559d56 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 13:17:31 2008 +0100 x86emu: fix sparse warnings ops2.c:113:18: warning: Using plain integer as NULL pointer ops2.c:207:18: warning: Using plain integer as NULL pointer commit ffaaa1a198a77eb6800c08d4613ee1cc0b068ba0 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 13:13:21 2008 +0100 xfree86: fix compiler warnings in DoModalias() The precedence of == is higher than that of &, so that code was probably buggy. xf86Init.c: In function 'DoModalias': xf86Init.c:300: warning: suggest parentheses around comparison in operand of & xf86Init.c:304: warning: suggest parentheses around comparison in operand of & xf86Init.c:308: warning: suggest parentheses around comparison in operand of & commit 66fd05acd6118102aaaebc230d5c03e0758c6089 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 13:11:41 2008 +0100 xfree86: Silence compiler warnings about function prototypes xf86Init.c:136: warning: function declaration isn't a prototype xf86Init.c:243: warning: function declaration isn't a prototype xf86Init.c:249: warning: function declaration isn't a prototype commit 4b96ba8ddf36f84d4b8c0f2964535bd90477a742 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:56:35 2008 +0100 Nuke unused miBankNewSerialNumber commit e85d5d707d51d6a1558dfcf0ebd50183b84be39d Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:55:50 2008 +0100 Ansify declaration of FontToXError() commit 30a7a06a9e91a91b8517f67897831c1407713e57 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:38:44 2008 +0100 Nuke prototype for nonexistent function miDoInitVisuals was removed in commit 94825ad3c72a1c3f6a61199c302841f63241cf87, but its prototype was left. commit 5244690a5e0285b6243ee1f28ae6c8287a32b73d Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:37:11 2008 +0100 Add prototypes for strlcpy/strlcat commit eadf90aa65d1ea63ddcd74e60e66a79ad567c7e8 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:20:33 2008 +0100 xaa: Fix compiler warning (implicit declaration) xaaInit.c: In function 'XAAInit': xaaInit.c:201: warning: implicit declaration of function 'miInitializeCompositeWrapper' xaaInit.c:201: warning: nested extern declaration of 'miInitializeCompositeWrapper' commit aee514cfb5e5a59b7770699765ccdad8fe42f904 Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:16:05 2008 +0100 xfree86: Fix compiler warnings (implicit declarations) Add missing includes to fix the following warnings: xf86DGA.c: In function 'DGAProcessKeyboardEvent': xf86DGA.c:1050: warning: implicit declaration of function 'UpdateDeviceState' xf86DGA.c:1050: warning: nested extern declaration of 'UpdateDeviceState' xf86Xinput.c: In function 'xf86ActivateDevice': xf86Xinput.c:303: warning: implicit declaration of function 'AssignTypeAndName' xf86Xinput.c:303: warning: nested extern declaration of 'AssignTypeAndName' xf86Xinput.c:311: warning: implicit declaration of function 'DeviceIsPointerType' xf86Xinput.c:311: warning: nested extern declaration of 'DeviceIsPointerType' xf86Xinput.c:324: warning: implicit declaration of function 'XkbSetExtension' xf86Xinput.c:324: warning: nested extern declaration of 'XkbSetExtension' commit add946daed531e29935593fb2e7ee70286185baf Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:14:40 2008 +0100 Nuke unused variables commit f2bda61c03f64133ef68dd1557b26ae7dc5beb0e Author: Julien Cristau <jcristau@debian.org> Date: Sun Oct 26 11:05:13 2008 +0100 Xext: Fix compiler warnings Make GEClientGone static and include registry.h, to fix the following warnings: geext.c:225: warning: no previous prototype for 'GEClientGone' geext.c: In function 'GEExtensionInit': geext.c:280: warning: implicit declaration of function 'RegisterResourceName' geext.c:280: warning: nested extern declaration of 'RegisterResourceName' commit 24e863b0eb6ff11010a14cfd252a39df87a09d0e Author: Bernhard R. Link <brlink@debian.org> Date: Sun Oct 26 00:19:34 2008 +0200 Bug#16501: autodetection of sbus graphic cards Add automatic detection of the graphic driver to load for sbus devices. This allows xorg to work on those devices without a "Device" section. Debian bug#483942. Signed-off-by: Julien Cristau <jcristau@debian.org> commit fd97ff1bdd30c358525068a4c833f681e00719a2 Author: Julien Cristau <jcristau@debian.org> Date: Sat Oct 25 22:54:15 2008 +0200 Bug#5851: Document the "Log" option in xorg.conf(5) commit 80b6768536fa439bfc5ce948bc8845a6f4af857b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 17:32:32 2008 -0700 XQuartz: Do check_xinitrc() later to avoid possible deadlock. (cherry picked from commit af95174a088dc787d124ec548b1005f5b67c9e8d) commit d837d4e2af35a83c7932e4d0422097ebd1f6ba2c Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Oct 23 17:56:46 2008 -0600 XQuartz: pbproxy: pbproxy.h had invalid macro usage with 2 #else statements, so it wasn't building. Fix the build. (cherry picked from commit 6bcbb9ba85d95d7df63811a482abc39c4d595366) commit 6a2693b2f9cfdec6f30e2ca4c4176f986f97249e Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Oct 23 17:40:23 2008 -0600 XQuartz: Remove the enable_stereo default. We now use feature detection to enable stereo visuals. We need to revisit the GL/indirect.c changes. I think indirect.c should be using the same feature detection and GLX visual config code. The indirect changes will require testing... (cherry picked from commit 49b7a7c6f20ca85d4d624444eb83db2f91344591) commit b015a021b28623b7b734833dc9b8269c41db4e8a Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 21 20:30:35 2008 -0700 Allow non-gcc compilers to build xf86Xinput.c commit b7cc6ca22a4ff7a94abee6962a07fdd0b563d26a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 16:33:11 2008 -0700 miext/rootless: Silence some warnings by using proper C prototypes. (cherry picked from commit 050e46e09efcc7e6f090fa4a749e9076c972b760) commit b397cc727787a854417b11b482cce4807fc8ab58 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Oct 23 16:19:58 2008 -0600 miext/rootless: Fix the usage of DeleteProperty so that this builds again. (cherry picked from commit 3de250e28a9a86bcae4464a15c2025805877ce1e) commit 28d4f71193d2be26d1dcae724067539ac9db1123 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 15:01:03 2008 -0700 XQuartz: pbproxy: Fix compilation on case-sensitive file systems... (cherry picked from commit 6622efca216663c99d112c7a226bde691d1f3215) commit 40f9b6bf0dc62098680235a958e0733770902cca Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 23 17:33:52 2008 -0400 Argh, macros. commit 8b3c278fe7502f9343355f09213837622b0d9ca0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 11:39:04 2008 -0700 Rootless: Properly typed expose_1 (cherry picked from commit 78e874fe17174ac8f61586573edaf7f16ece7b21) commit 3e999d35c26b0ffb894c257a3057d44b949744bd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 23 11:37:13 2008 -0700 XQuartz: Honor the Spaces preference for "When switching to an application, switch to a space with open windows for the application" (cherry picked from commit bf561a06b2bf60395d26026ac7627d0cb254bc07) commit 75067d12e4f4daa080dfb0209a9abf9c5654271f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 19:36:48 2008 -0700 XQuartz: Added missing semicolons to Localizable.strings (cherry picked from commit e9fe3f36d9529f00daeefa1379cdd6f01a88f410) commit a003932dccc438c4500d383982cee2376e808bd5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 11:23:42 2008 -0700 XQuartz: Default dpi to 96 instead of 75 (cherry picked from commit 08a5a333d7fea68146cd9cf50682b811378ab3ce) commit 2d764e21f278ea26bae135db6dae07b94651951c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 11:19:06 2008 -0700 XQuartz: pbproxy: SIGHUP reloads preferences. (cherry picked from commit cbc0935ef74ebd76ed3db16d6ab86043eeed42a3) commit 0b695262176e96f508921905ee7f9cc086c7daf0 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 23 15:01:58 2008 -0400 Change some #define foo() -> static void foo() commit aab73d719a8de6b830e47c7f47860b7990ea8d03 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 23 13:20:59 2008 -0400 Fix previous cherry pick for API changes commit 8767fc8d47276c7489ae50dd556a446a462776ea Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 4 12:11:14 2008 -0700 Wrap AddTraps in exa and damage. This fine (and unused) function wasn't ever wrapped which made it not work under exa. (cherry picked from commit 06e7e1d0486e8c516a9b3219a2c86026f88825fc) commit 4c926dbac65ceb699b91bb0d3fd0005a5854572d Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 23 22:07:37 2008 +1030 dix: fix two more endian issues, correct initial "enabled" value. #18111 EnableDevice and DisableDevice both change the property too. And enabled must be set to FALSE in AddInputDevice, the device is not enabled yet. X.Org Bug 18111 <https://bugs.freedesktop.org/show_bug.cgi?id=18111> commit 084ae9e38812f19751a086eea7ce555761ae5a17 Author: Jerome Glisse <glisse@freedesktop.org> Date: Thu Oct 23 11:28:53 2008 +0200 dri2: fail at context creation if driver fail to create it's context commit ff60e592f003d8bc45789a1a14e86be22f5242b2 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 23 09:19:41 2008 +1030 dix: don't allow VCP/VCK be disabled through properties. commit 98f01c2abe4771d76febf8fe70111b2bddfab776 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 23 09:13:41 2008 +1030 dix: fix endianess issue in AddInputDevice. #18111 dev->enabled is a Bool. Bool is two bytes. BOOL on the other hand is a protocol type and always 1 byte. So copy the value into the one-byte type before passing it into XIChangeDeviceProperty. Found by Michel Dänzer. X.Org Bug 18111 <http://bugs.freedesktop.org/show_bug.cgi?id=18111> commit f6cbe0326c57e3c9897f17baef78199b06537c44 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Oct 22 18:16:12 2008 +1030 dix: init remaining three xkb fields to zero in a new client. commit 0b56b44addc323a00eb7cd86240cb0dd4275bcf8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Oct 20 17:06:40 2008 +1030 xfree86: AllowEmptyInput is true by default - update the xf86Info defaults. Also set AutoAddDevices and AutoEnableDevices to their defaults. And in doing so, switch the rest of the defaults over to named intializers. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit d72cd753b99fae147ef4c189700fc697f1ea7fb0 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Oct 21 22:32:57 2008 +0200 Close well known connections in ServerAbort() commit 81e197b2a5457bb9f7ed72f82c2d33fd8dbfc202 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 21 16:00:32 2008 -0400 Bug #18159: Spell "anisotropic" correctly commit 3891dd892449fcdb7a514e3c5e7e763ba7e74003 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 21 13:10:44 2008 -0400 exa: Add exaDrawableIsOffscreen() to the driver API. commit c837d182c4674c01296bb7efd7d834d9dfd55f83 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 09:11:59 2008 -0700 XQuartz: Only send mouse events while in the background if we're over a visible window. This "breaks" xeyes but gets rid of annoying tooltips. (cherry picked from commit 10090a132a0110fe24c8c886d9f53e6e947f8038) commit 2a9613980f93959eedf9396735785d4c50546e2d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 09:07:08 2008 -0700 XQuartz: More fullscreen fixes Start in rooted mode when enabled Make the hotkey cmd-alt-a behave (cherry picked from commit 22a54e46176c9cbdfaaa59ef33a6ae6a9c4969ef) commit e4ea1494debda4d3da03864c2640921fe0430694 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Oct 20 12:23:04 2008 -0700 XQuartz: Cleaned up keyboard init and map reload. (cherry picked from commit f78c9fc06cac2cc6ddfd6e9ba435dd26a57d1f51) commit ebb2e1449cfb382a806e04c52d42240670717069 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Oct 20 09:46:34 2008 -0700 XQuartz: Fixed follow-keyboard-layout ≈ (cherry picked from commit a9f9fbf512c9fd5a773fce402182486edc71d5ab) commit f67cd31d2cf1b8ad850bd21dbed5a975d77b4c54 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 21 09:29:37 2008 -0700 XQuartz: More progress towards fullscreen... (cherry picked from commit 628cae86b4ad02c49d20df1e1afdcb7abcabb649) (cherry picked from commit b47b7ab6d6d0a7f6cbf678a5755124d6b7516d3e) commit d434ed400986653771bbd60c224a2275bd6147ef Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 17 09:25:26 2008 -0700 XQuartz: Fixed missing key-equiv for Hide-Others. (cherry picked from commit 2c4b0f9615b646712609ebef3c0851c9a22e781b) commit 3695f62d072e7864fdcee385c8b5ca40f2018101 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Oct 16 22:36:00 2008 -0700 XQuartz: Require applewmproto-1.1.1 (cherry picked from commit ed235e3406e603a8a92c4b72f9f9018bae72ad65) commit f935c11398b93860461672e88814026d75b71689 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Oct 16 13:09:21 2008 -0600 XQuartz: pbproxy: Fix 2 bugs with the preferences. Add dump_prefs() for instrospection. Make prefs_get_bool a little more clear. In get_property don't assume that the Mac realloc(NULL, 0); returns non-NULL. We shouldn't depend on implementation-defined behavior too much. Add more commentary in various spots. Add TARGETS in the TARGETS response. I don't know why some X11 apps do this, but it could be something that some weird toolkit/app tests for. In reload_preferences add preferences synchronization, so that xpbproxy reloads the preferences, and picks up any changes. Fix a typo/misspelling of the sync_clipboard_to_pasteboard preference. (cherry picked from commit 165cbbb90c793d9335ea76f0274b1f60ad295903) commit 4d978af5c71430f0043b1272f8dc6344b8f03f12 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 15 21:26:58 2008 -0700 XQuartz: Fixed window levels. (cherry picked from commit ef4d37c73f31048dd74efee2c63fa08b92608f87) commit 58eacf0b7beb8c6f1971570ede0bfd3976a84665 Author: Rémi Cardona <remi@gentoo.org> Date: Tue Oct 21 10:07:24 2008 -0400 Force LC_ALL=C when building xf86DefModeSet.c Fixes build in not-quite-latin locales. commit 2188582e5ea90edb432a2f421d0a267439ba08f9 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Oct 20 09:55:24 2008 -0400 EXA: Avoid excessive syncing in PutImage commit 8d0cb507ae568c8da92f10ff1188d797bcaa3d1a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 17 09:59:29 2008 +1030 dmx: avoid hilarious #define Xcalloc xcalloc game. commit 8a23707b866c11807e01056db97afec56e9b19c8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Oct 17 09:15:39 2008 +1030 dmx: change remainder of manual EQ allocation to GetEventList(). commit 8de26770a41ec87c46eed2eddfde6f867d71fe1f Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Thu Oct 16 14:28:14 2008 -0400 RANDR: Fix output property event delivery. commit d936a4235c9625bd41569cef3452dd086284e0d7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Sun Oct 12 21:58:30 2008 +1030 xfree86: if AllowEmptyInput is true, enable RAW mode on the console. Usually, the console is set to RAW in the kbd driver. If we hotplug all input devices (i.e. the evdev driver for keyboards) and the console is left as-is. As a result, the evdev driver must put an EVIOCGRAB on the device to avoid characters leaking onto the console. This again breaks many things, amongst them lirc, in-kernel mouse button emulation and HAL. This patch sets the console to RAW if AllowEmptyInput is on. Use-cases: 1. AEI is off 1.1. Only kbd driver is used - behaviour as-is. 1.2. kbd and evdev driver is used: if evdev does not grab the device, duplicate events are generated. 2. AEI is on 2.1. Only evdev driver is used - behaviour as-is, but evdev does not need to grab the device anymore. 2.2. evdev and kbd are used: duplicate key events are generated if evdev does not grab the device. 1.2 is a marginal use-case that can be fixed by adding a "grab" option to the evdev driver (update of xorg.conf is needed). 2.2 is an issue. If we have no ServerLayout section, AEI is on, but devices specified in the xorg.conf are still added [1], resulting in duplicate events. This is a common configuration and needs sorting out. [1] 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> Signed-off-by: Adam Jackson <ajax@redhat.com> commit 84ef8ed6fbefd8d6c0aaa3c862879f9804299bd8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 15 14:11:18 2008 -0700 XQuartz: implemented primary-on-grab and fixed clipboard-to-pasteboard (cherry picked from commit bcb83eea729a01026d99d1cfc2b77385b5b275fd) commit 0195d318465d5a6a9039091bcb252202471df5a4 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Oct 15 21:46:27 2008 +0200 GLX: fix build when dri2 _is_ available. Caught by Julien Cristau. commit 398cdf959afadfa964aece13cc9d89b2dd589930 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Oct 15 18:24:10 2008 +0200 GLX: fix build when dri2 is not available. commit 2e60ebbd254290e19492b97c960d9678513c94bf Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 15 14:10:51 2008 +0100 XFree86: Simplify DontZap/-retro interaction How hard could it possibly be, right? commit 66a87517bd80b21e107df9d57968d81a92f91fd5 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed Oct 15 12:00:16 2008 +0100 re-enable DRI2 commit ced6690284fd334f225bbc94685c114ad3ab96d8 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Oct 7 13:49:28 2008 -0400 dri2: Update to latest protocol draft. Mainly rename SwapBuffers to CopyRegion, which adds the xfixes region argument and the bitmask argument to let us extend it in the future. commit 87a016ae00feac3fbaa7e7a518076a3852d49554 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Oct 15 00:02:13 2008 +0200 exa: restore {x,y}{Src,Dst} to their original values when !done commit b677bff97b62c3931df853bae25ab485892ae173 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 14 14:30:19 2008 -0400 int10: Degrade the checksum warning to X_INFO. I've seen about one case in three years where this has actually been correlated with the real cause of failure, and we've trained people to freak out about X_WARNING, so let's be less alarmist. commit bd9c6b3a4d726a3f83ac6d8cf7211eddbc28f25a Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 14 14:04:01 2008 -0400 EDID: Catch even more cases of encoding aspect as size. Very cute, Samsung, not only do you claim to be 16cm by 9cm in the global size record, you also claim to be 160mm by 90mm in the detailed timings. Grrr. commit ad677238bc96a8578113bbe76d605d7a87aca44c Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 14 13:00:50 2008 -0400 Add backtrace definitions to dix-config.h.in commit 8e368cf5b964f1d29fda0a463f9510457619b14d Author: Nathaniel McCallum <nathaniel@natemccallum.com> Date: Tue Oct 14 09:50:29 2008 -0400 Xorg: add -modalias option This scans the installed video drivers and prints a Linux-style modalias listing of the devices each driver claims to support. commit 3eb52de7f28b0050582f9ac4c28bc894d3f06f4b Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 14 09:45:19 2008 -0400 kdrive: Hardcode a different wrong value for number of mouse buttons This should really come from the input driver directly, but, kdrive. commit f3f6ea89aa9e0ffe9e37bc059e5e6bf75be4ee9f Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Oct 8 14:12:21 2008 +1030 Xi: check all handlers before applying property changes. The current code exposes to inconsistent updates, i.e. if handler N succeeds but handler N+1 fails in setting the property, an error is returned to the client although parts of the server now behave as if the property change succeeded. This patch adds a "checkonly" parameter to the SetProperty handler. The handlers are then called twice, once with checkonly set to TRUE. On the checkonly run, handlers _MUST_ return error codes if the property cannot be applied. Handlers are not permitted to actually apply the changes. On the second run, handlers are permitted to apply property changes. Errors codes returned on the second run are ignored. commit ad67e3f063aa79247270f29e989bbfe5f62c9ed7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Sun Oct 12 10:19:36 2008 +1030 dix: remove duplicate code in ReleaseActiveGrabs Spotted by Colin Harrison. commit 3fc4f40b6c6cb416c9dc4bdb35c91b4f32c03ccc Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Oct 12 16:08:26 2008 -0700 Restore xf86{Enable, Disable}GeneralHandler. These were useful as part of the generic handler ABI, and are used by the NVIDIA driver. This reverts part of commit 50081d2dfb79878cb931a15c265f0d60698dfd39. commit 2217d22a76cdb2460f9683a6bf74c7248612889d Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Oct 12 16:07:24 2008 -0700 Revert "xfree86: xf86{Enable, Disable}InputHandler can be static." These were potentially useful as part of the input handler ABI, even if nobody currently uses them. This reverts commit 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca. commit 5b336585a4cdf11d20831a9536ad581e959ea7f1 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Oct 10 23:23:02 2008 +0200 dri: don't set the dixPrivate key to NULL, as this is a staticly set variable. - This breaks on the 2nd server generation. - No other subsystem seems to NULL their key. - This should fix bug 17982. commit b736f477f5324f79af30fc0f941ba0714a34ccda Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 10 16:33:24 2008 -0400 mieq: Backtrace when the queue overflows. Since we're probably stuck down in a driver somewhere, let's at least try to point out where. This will need to be rethought when the input thread work lands though. commit 94ed0ba1b5043ad9fc33b42756af447d5ab15bbd Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 10 15:53:48 2008 -0400 Move xorg_backtrace() up to the OS level so we can call it from DIX. commit f650c1aeb06e957626bb0a74eddbb133f59dbecb Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 10 14:07:28 2008 -0400 Revert "Don't leak EDID_block" This reverts commit 05cdef18ca668ffc86b71033f71cfbd262cdd994. http://lists.freedesktop.org/archives/xorg/2008-October/039305.html commit 0660dd9d7009147c395b9ea904539f76f55b9a7f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 10 13:41:50 2008 -0400 EDID: Catch monitors that encode aspect ratio for physical size. This is not legal in either EDID 1.3 or 1.4, but hey, when did a little thing like legality stop anyone. commit 956a4ba40b28251ab2d88b5d5b0796e01afd2bdd Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Oct 10 00:28:34 2008 +0200 pixmap: Add some notes to devKind and devPrivate. commit 4808bdec45775342eb9a6352b41e4919e1a69279 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 9 16:23:24 2008 +1030 Xi: don't memcpy the KeyClassRec from SD to MD. #16167 Most of its component get copied during CopyKeyClass anyway. The ones that aren't: postdown - never changed for virtual devices anyway. down - shouldn't change that without sending events. memcpy'ing the struct also copied mapWidth, which means we didn't realloc during SetKeySymsMap lateron, overwriting the memory assigned to us. X.Org Bug 16167 <http://bugs.freedesktop.org/show_bug.cgi?id=16167> commit 18cdd733ad3dd36fa0a23dfbf18c7d99b86c0276 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 9 17:26:00 2008 +1030 kdrive: fix dixflags so they're always defined before enqueuing events #17734 If absolute events were posted, dixflags got set conditionally on whether the valuators are different from the last posted set of values. If dixflags are undefined however, the DIX interprets them as relative valuators. Fix this by making sure defining dixflags is always defined. X.Org Bug 17724 <http://bugs.freedesktop.org/show_bug.cgi?id=17734> commit d58f2c30c64e8b2d8179dac06e0a54be06099da6 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 9 16:50:54 2008 +1030 kdrive: lastx/y needs to be set to the event coordinates #17728 X.Org Bug 17728 <http://bugs.freedesktop.org/show_bug.cgi?id=17728> commit decec14219bcd992ec426e202ff3c8681b520b74 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 9 15:10:21 2008 +1030 dix: silence "unused variable" compiler warning. commit 0b4b683f3eeec43536e73be302a4c396fe4d9894 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Oct 7 18:44:42 2008 +1030 xfree86: export NewInputDeviceRequest/DeleteInputDeviceRequest NIDR should be used to create a new SD from e.g. within a driver. DIDR should be used to remove a device from the server. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 5e213fe1022bf96747834a3ac227929b23136ee6 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 9 11:29:11 2008 +1030 xfree86: cache dev->isMaster before freeing the device. commit 05cdef18ca668ffc86b71033f71cfbd262cdd994 Author: Zhenyu Wang <zhenyu.z.wang@intel.com> Date: Fri Oct 10 13:45:51 2008 +0800 Don't leak EDID_block commit 2d9da7a5f384d5f38b2be79b1ea0df5a3deb52d1 Author: Luc Verhaegen <libv@skynet.be> Date: Thu Oct 9 22:22:53 2008 +0200 DGA: Track client state even when using old style DGA. This fixes the issue that a badly killed DGA will keep on hogging mode/framebuffer/mouse/keyboard. commit 322335d5b5b6f155f56fe3c1cbe372f13dc20932 Author: Luc Verhaegen <libv@skynet.be> Date: Thu Oct 9 22:21:05 2008 +0200 DGA: Mash together xf86dga.c and xf86dga2.c. This in preparation for an upcoming client state tracking fix. commit d13c3cbd43bc5e6b459c7df822292cf02ad2c9c4 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 8 18:39:41 2008 -0700 XQuartz: Some motion made towards supporting fullscreen. (cherry picked from commit 99be3d68b64059caada739a373e5e01844c776e0) commit dc166bf6423f4243ea05f17340ff9ff99ecad74b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 7 11:39:08 2008 -0700 XQuartz: Fixed EXTRA_DIST for new GL files. (cherry picked from commit a11c9052030b44045f037050a5825256b539ed50) commit 803327929445256e159c10894e6305fbaa389982 Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> Date: Tue Oct 7 12:12:38 2008 -0600 XQuartz: GL: setVisualConfigs() copied the behavior of indirect.c which is wrong, with regard to the handling of xcalloc failure. Use ErrorF for an error message after an xcalloc failure, and return instead of falling through to GlxSetVisualConfigs, or abort()ing at the test branch. (cherry picked from commit 1056700971fd5c034396ed6dbea15e092f0c6332) commit f1fec6f323b27a0165325d8fcf6af7ae163bde14 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Oct 8 18:45:04 2008 -0700 XQuartz: Call setVisualConfigs in InitOutput, and only when GLXEXT is defined. (cherry picked from commit 97173d4eda142c73bb975cc05225b791778f85af) commit 52accec7dbc613a521e40449b8bb5f0c92ddb105 Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> Date: Tue Oct 7 11:31:48 2008 -0600 XQuartz: GL: Add the proper license information to the new files, and add more commentary to setVisualConfigs(). (cherry picked from commit 190a3d5e5de9915931928fb8e6da88bb9644cda4) commit 63abdf61151cc90f769ed1708ee19b6c434c27c9 Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> Date: Mon Oct 6 18:05:12 2008 -0600 XQuartz: GL: Add the new C code to the Makefile.am. Commit the darwin.c changes I missed in the last commit, for calling setVisualConfigs(). (cherry picked from commit eb3c014e1710bf0b93bda10ddb9b795cd150d02d) commit a8f5d422c9c0a39f55e80bbd180439b6ec3a805c Author: George Staplin <georgestaplin@george-staplins-mac-pro.local> Date: Mon Oct 6 18:01:23 2008 -0600 XQuartz: GL: Provide code for getting the capabilities of the underlying system's CGL. Add a setVisualConfigs that is called before the fbScreenInit, to setup the __GLXvisualConfigs. (cherry picked from commit fc86f9e4482043eca76d9d7a96e166be1aabf674) commit 2998e48be343ab2a11d6d328fc961ab5b8eb9292 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Oct 4 21:25:50 2008 -0700 Xquartz: Fix parallel builds (cherry picked from commit 1fe7298a3b9a2ed82c612292f9e547cf78f99ae5) commit 7aa535708f1f33173bf05abc17b75e0841ffc385 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 16:25:59 2008 -0400 Fix more xcalloc stupidity. Did I mention the hate? Pretty sure I mentioned the hate. commit 4fe80aa14a24df6d0611c47fc5654c3c4f56fdb1 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 16:22:35 2008 -0400 I hate you xlib. Please die in a fire. commit 2c5332872f808e7a646a63ae7ec63a2b80f83ee7 Author: Adam Jackson <ajax@redhat.com> Date: Wed Oct 8 13:39:49 2008 -0400 s/kdDontZap/kdAllowZap/ commit 1feb69eb63e6739ff5db255ad529e84adf941a10 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Oct 8 14:55:29 2008 +0200 DGA: Fix ProcXF86DGASetViewPort for missing support in driver. Fixes a segfault when trying to activate a DGA mode without checking whether DGA modesetting is at all possible. commit d1bb5e3b47ab71aa2f18f69daaf2a4c5ce06d800 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 03:19:45 2008 -0300 mi: functions here are carrying 'time' without need. commit 4964a9ca6c3f26376469b6d8217815a47231f0a9 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 03:06:32 2008 -0300 mi: remove deprecated and unused functions. miPointerDeltaCursor, miPointerGetMotionBufferSize and miPointerSetNewScreen. commit adf3e296e2b00164fb22e89ad4f44acbd2e3deae Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 02:12:49 2008 -0300 Remove unused declarations. AvailableClientInput (LBX debris) and xf86XinputFinalizeInit. commit bca9fa2efe97d2816a2e9412cdff08a0145c8f96 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 01:38:27 2008 -0300 Everyone knows that the loader is present. Silence it. commit 56c615368c5a8e7acb0398434c2c68578626aa38 Author: Zhenyu Wang <zhenyu.z.wang@intel.com> Date: Wed Oct 8 13:33:55 2008 +0800 Check nextEnabledOutput()'s return in bestModeForAspect() In case no enabled outputs, we will reference wrong index of output array. commit 278c11f01fbc6d6bd91c5a7127928c9ef5d29fca Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 01:18:49 2008 -0300 xfree86: xf86{Enable, Disable}InputHandler can be static. commit 50081d2dfb79878cb931a15c265f0d60698dfd39 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 01:11:38 2008 -0300 xfree86: remove xf86{Enable, Disable}GeneralHandler and others unused. commit 54294e15ecf4a8ec0fd9fa8b6ed1a1b2d912ec7e Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Oct 8 00:43:22 2008 -0300 xfree86: fix wrong function name message errors. commit 57dbb90f198116dcaf17c8111a7f80644d7ebe7f Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 20:36:45 2008 -0400 Document zap/-retro interaction more. commit 617933e8c259ad12388c0dd13421846a873975e3 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 8 02:45:59 2008 +0300 XFree86: Fix DontZap interaction with -retro -retro will now _not_ override (No)DontZap, if it's set in the config file. commit d80bae2237e555025465d4d761a5cc537cc2bcdd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 8 02:43:27 2008 +0300 Update docs to reflect new DontZap default commit 42e7b64bf90604e0099702f5447163be80a2efb6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 20:32:02 2008 -0400 -retro enables zapping commit 9d135ac10a7374c7ccda705f1eeb02cc53076c34 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 8 02:30:05 2008 +0300 Input: Make DontZap the default If you need to bail out the server, use Ctrl-Alt-Fx, or enable zapping if it bothers you that much. If Ctrl-Alt-Fx is broken, nag me until it's permanently fixed. commit b574365fca954a999ebaeb7203d1e0ea6d99b3ea Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 7 13:09:11 2008 -0700 Revert "Unexport (and unimplement) xf86SetAccessFuncs" for now. The nvidia driver currently uses these hooks to work around problems where RAC will disable access to the hardware at unexpected times. This change restores these hooks until we can come up with a better API for working around RAC. This reverts commit c1df4fbede8058c15ce3a5759a7758fecafbb9e7. commit fe85ec34ec2b58188633dac4464a1e9e9977652b Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 7 13:08:38 2008 -0700 Revert "Remove unused server state change callbackery" for now. The nvidia driver currently uses these callbacks to work around problems where RAC will disable access to the hardware at unexpected times. This change restores these hooks until we can come up with a better API for working around RAC. This reverts commit d7c0ba2e9eae7044ef4c31d9c3cbb9a71ee0f9f9. Conflicts: hw/xfree86/loader/xf86sym.c commit 94919480d8bb66e1807b4fe87b8f326ef6e012c6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 13:41:25 2008 -0400 int10: Fix a nasty memory leak. commit a57b2f172c1291f22f7ba2780c1b2f55e353c3e9 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 13:39:10 2008 -0400 int10: Don't warn when scanning for devices we don't have. Some BIOSes (hi XGI!) will attempt to enumerate the PCI bus by asking for the config space of every possible device number. This despite perfectly functional BIOS methods to enumerate the bus exactly. commit a65e36a873cd1ba9896cd0f9a3e94dd933666005 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 13:38:12 2008 -0400 int10: Remove useless check. If you have more than one PCI device with the same d/b/d/f, you're already in trouble. commit 6dbfca571f6d214dc456710a60ebbbbd204cdbbd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Oct 7 10:07:03 2008 -0700 Depend on xtrans >= 1.2.2 for TRANS_NOXAUTH commit 30193fbff9d9284fbbd81fe5f7b6c4d102daf1d1 Author: Adam Jackson <ajax@redhat.com> Date: Tue Oct 7 10:36:12 2008 -0400 Reinstate cursorScreenDevPriv commit e7cd5d84ed1fb3637dce6e9e6ef58c8611818c4e Author: Dave Airlie <airlied@redhat.com> Date: Tue Oct 7 16:09:17 2008 +1000 fixup another calloc build issue commit 60cfaa45a532bd3cfcfb4bd57b2f657c0a8b6a6b Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 6 18:47:06 2008 -0400 Build fix. commit c6d6d3e87a472b641d883a6c000f96e5bdf48532 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 6 16:18:21 2008 -0400 Loader: Unexport a handful of consumerless symbols from dixsym. commit 8a5b89e8e184f4cbf33c6dee0b06e61d8f857576 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 6 15:36:51 2008 -0400 xalloc+memset(0) -> xcalloc commit 0b7b89fbac0b3865b2cf51295c68a5f4c7523f28 Author: Adam Jackson <ajax@redhat.com> Date: Mon Oct 6 14:19:30 2008 -0400 xalloc+bzero -> xcalloc commit 9187f6ad9ec7ba9569a93d92561aac17eaa83491 Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 6 12:21:20 2008 -0400 RANDR: Delivery output property events. commit 717c7492a0f6ba3fb3eabda33515881eef314155 Author: Dave Airlie <airlied@linux.ie> Date: Tue Oct 7 02:38:44 2008 +1000 exa: don't call composite routines with no buffer. We can get a case with gnome-terminal + links, where we get two arrays of glyphs all with 0 width and 0 heights in them. If this happens we manage to get to this case without any buffer setup and segfault. commit aacac3edac7c6b82a0a0e3bc500f563d187e5df3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Oct 4 21:07:31 2008 -0700 XQuartz: Bumped bundle version to 2.3.2 for beta1 (cherry picked from commit 2021c4c4e726a6b8f27f19f16ed3d86e37dbe448) commit ed3134918dcbbd58a5ef8359a77e8024c98396e6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Oct 4 21:06:58 2008 -0700 XQuartz: pbcopy: Re-enabled some code I commented out for testing (cherry picked from commit 9b5d11409264080e394c8f18e06237122de80014) commit b3a971d8b5df5ab4af0be49105ef32f67d010901 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Oct 4 18:54:15 2008 -0700 XQuartz: xpbproxy: Support some of the preference toggles from X11.app, cleaned up CLIPBOARD_MANAGER atom management. (cherry picked from commit f7673bb4de3c1f71eb390a3279eed3589efc3df4) commit fc35c7a2e2888cb767413f5e85a79c7f422a6284 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Oct 4 21:16:54 2008 -0700 XQuartz: GLX - enable_stereo defaults option should work now (cherry picked from commit 3a6898f48756fdb2898292679301ef3dc109b4f6) commit 7818aba1d1e74f4ffe68b7d6806622b94ae8a230 Author: Roland Scheidegger <sroland@tungstengraphics.com> Date: Sat Oct 4 15:50:35 2008 +0200 dri2: fix compilation (remove no longer existing include file) commit a29af6465883796a6acf04b72ce812a0632b2186 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Oct 3 23:54:10 2008 +0200 exa: remove "direct" case for exa{Trapezoids,Triangles} - By adding a small hack to the xserver i was able to easily test the performance of the normally rare direct case (using cairo). - It turned out to be 70% slower for me (large test on an otherwise idle computer), which seems enough of a reason to remove it. - AddTraps could also use a 2nd look, but since noone is using that it's a bit hard and less useful to test. commit 416870d8c9e7e383b87c8513c2296a0cb66e7ef4 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Oct 3 22:59:40 2008 +0200 exa: remove some excessive whitespace commit b72a217ad59cc527327d7b1fc81898677b977d8f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 18:30:37 2008 -0400 Dangling use of miDestroyGCOps commit f5bbc54a93f53cd4ba124712159bb44c93282a8e Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 18:18:02 2008 -0400 Fix compile for miSetScreenPixmap prototype. commit 9dbfcd89214241626ac2704d1ffffff1cc0c67ae Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:40:30 2008 -0400 Delete unused miModifyBanking() commit 94825ad3c72a1c3f6a61199c302841f63241cf87 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:39:34 2008 -0400 Remove unused wrapping for visual initialization. commit 4791f8e2ba9a0e318b7f13c83618ece036dd53ed Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:23:58 2008 -0400 staticize mi{G,S}etScreenPixmap commit 14d98b4a2fdea4a4f5cc9b751151672cb392fba3 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:21:16 2008 -0400 miFindMaxBand is dead code commit 48b47928133bc462947104bd0f4204f00b993862 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:16:28 2008 -0400 mi{Create,Destroy}GCOps are unused, nuke 'em. commit bd0e87c74789bd5447ec731aa2d2d6e05dd54abc Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 17:13:10 2008 -0400 Remove a bunch of unused API from the mi export list. commit ee5e07bc22f0c3af7a412b6bc430eae6a1dafe16 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:58:01 2008 -0400 loader: sort the mi symbol list commit 77d0b0ecfa3c67ff8d11e773a7f083721cf4c6d7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:53:08 2008 -0400 Remove unused pciNumBuses commit 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:05:19 2008 -0400 Remove the Must_have_memory hack. Also remove an astonishing amount of misunderstanding of how casts work. commit e6b1c1fada19268af559d89375989973729fdb19 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:47:50 2008 -0400 const cleanup commit fe616f9230b672edb89fca7516e750dc1b20c690 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:42:58 2008 -0400 Drop the never-called SkippedRequestCallback list. commit 31136b9467c2a17bbed4a51d6a6c41e3290bd236 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:33:47 2008 -0400 Unexport MakeClientGrab{Imp,P}ervious xtrap used to use these, but it's gone now. xtest still does but it's linked statically. commit eaf3fdf97014c27aececa8505c2713e7c9a537fc Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:24:35 2008 -0400 Unexport xf86NoSharedResources commit d7d9edb506bfea1c10516b6c4eb72dee3559863c Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:17:44 2008 -0400 Unexport xf86DeallocateResourcesForEntity commit 49673b43584928c22d699d1968ed6813b272aefe Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:13:39 2008 -0400 Unexport xf86SetEntityFuncs commit 949ef6b79a36d6f6bbc192c20ef0f13cc95d4f28 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:10:26 2008 -0400 Unexport xf86ChkConflict Also remove the unused internal ChkConflict() commit d7c0ba2e9eae7044ef4c31d9c3cbb9a71ee0f9f9 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 15:06:42 2008 -0400 Remove unused server state change callbackery. commit 9ada146a16bcf220b2dd2936fb3a0349a31e99d3 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 14:40:18 2008 -0400 xf86RegisterResources: Always print any failed registrations. commit a5d3fa90f3de763a5dcbb0ff4987562449819323 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 14:38:48 2008 -0400 Typo fix. commit cc3335858508ffbc52123eb5bb0c34f42800c8c4 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 14:37:59 2008 -0400 Remove the old implementation of RemoveOverlaps commit 8fbf1185f5d6a1836b3e4265de6f605d82478e0b Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 14:32:32 2008 -0400 Internalise some resource list API. commit 0ca4f3cee7e42a393cdd32d3a772a190ae68abc5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 13:29:55 2008 -0400 Unexport xf86EnterServerState commit c1df4fbede8058c15ce3a5759a7758fecafbb9e7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 13:08:43 2008 -0400 Unexport (and unimplement) xf86SetAccessFuncs. Because, no. commit 44269e604eb60ebaa6189fd4409d39a4ec6b9f4b Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 13:02:50 2008 -0400 RAC: NO_SEPARATE_*_FROM_* are useless. If anyone can come up with an example of a bus where: - both i/o and memory resources are addressable - access to them can be controlled - but they can't be controlled independently then by all means, reinstate this logic. commit 51fcb58f45824c7cde88b8b4ccbd6bdcf760280e Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 12:39:49 2008 -0400 RAC: AccessEnable() and AccessDisable() are mandatory. commit 9c5fc7762e9ca09847965e67e247d95dfc197266 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 3 11:24:34 2008 -0700 Partially reverts commit 505c216d030a8eb6e9fa757ecebed9597a850c88. I don't know how the hell git-cherrypick messed that up to delete fbwindow.c commit 7bb73a9513710feaebc127998950e9f472bfcc0d Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 30 23:53:12 2008 -0600 XQuartz: pbproxy: Possibly fix a memory leak by using an [NSApp run] loop, instead of calling CFRunLoopRun() directly. The leak wasn't reproducible on this machine, but someone was able to produce a leak trace with Instruments that indicates it was leaking in the CFRunLoopRun() path. x-input.m: dequeue and ignore events when pbproxy_active is false. x-selection.h: add an is_active method that is used by x-input.m to ignore events. x-selection.m: Handle nearly every preference, except for primary_on_grab, which I don't really understand yet. (cherry picked from commit 4d51ad851e64da83cbdfb0a4a22428418a7bcf75) commit 2a5ce41f0371ad5df52586b8d4072578b6206321 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Sep 30 13:54:08 2008 -0700 XQuartz: Use "pointer" and "pen" for device names to please GDK. (cherry picked from commit 00ca0f4d839abf47e9573a1552473e039cf787e6) commit d3f597a986dcbc7e4164f350300dbd2e438949d8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Sep 30 11:10:58 2008 -0700 XQuartz: Workaround for initial pressure/tilt being sent as 0 with motion during the proximity event (cherry picked from commit 9a91d770a6411dd876187e64a8bda1f0745169ae) commit 1657dfb843c0127ea31bfd0a8ef81d0c394cbc7b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Sep 30 08:46:08 2008 -0700 XQuartz: Using absolute ranges for pointer location to increase resolution and better support tablets. (cherry picked from commit d79ccb45f68b65d65718b5b77efe2fae6eeda762) commit 88bb8c6f485a7aaf40f684d484a33cfedfa74a70 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 29 22:33:02 2008 -0700 XQuartz: Removed resolved comment about localization. (cherry picked from commit 8ed5faf058ac7b0782a9cc13a2c58b80168358d2) commit b1d0b196617643619d24ed520b0a1161e26b66c6 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 30 13:04:35 2008 -0600 XQuartz: pbproxy: Make the signal handler safer by using _exit, and only exit. Remove some unnecesssary headers. Remove some dead code that was never called or used in pbproxy. Make use of an NSAutoreleasePool in x_init. It could potentially cause a leak on a startup without this. Start adding reload_preferences to the x_selection class, as well as event handling for that. (cherry picked from commit 602e8ba8f7ee196696bc9e3cea6ecdf3200dcf5c) commit ecd260143cf9f012f033ba029ad04cb49567c89a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 29 22:32:24 2008 -0700 XQuartz: Added some localizable strings that were missing. (cherry picked from commit 2c8205ea8b709c5859412b466e83aec7a94acdcf) commit aae878b89081ffba16386e8d4987469313049bea Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 29 22:26:20 2008 -0700 XQuartz: Actually send the pointer event from the pen even if it happes to actually have 0 pressure and 0 tilt. (cherry picked from commit f41583761955cb9c92c43239bfaa8ae0e5d95e33) commit b7ad86ff8a9115147c0cf02af9e80ec464129392 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 27 15:30:10 2008 -0700 Xquartz: xpbproxy: Split out app-specific stuff to app-main.m in prep for making this into a thread. (cherry picked from commit c2012138a520560f8a2160518ea73fced410c3b7) commit 5446adebfb085dd05471729bf5c55bf820b1cbe3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 3 11:12:49 2008 -0700 XQuartz: Send AppleWMReloadPreferences where appropriate. (cherry picked from commit 490cbe9888e2c1080495b003c429fdb1659444e1) commit 6020c3fbfe06530cb2b90178d17a7d63beae028a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 3 11:09:26 2008 -0700 XQuartz: Added a --enable-integrated-xpbproxy configure option for building xpbproxy as an app or as a thread. (cherry picked from commit 8edc5fb38c922f28659d2f823148339a8907c4d9) (cherry picked from commit 88033a66a5549870fd053795b019d4c22950425b) commit 505c216d030a8eb6e9fa757ecebed9597a850c88 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Oct 3 11:11:37 2008 -0700 Added dep on applewmproto 1.1.0 (cherry picked from commit b350b066740a2e72585153e35478538cf1bca9ef) commit 1c1a6e965da412e767ad8bc15a5362116d64c6b0 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 22 22:09:19 2008 -0400 Remove an utterly, utterly ancient changelog. Wow. commit 9c8a2be2c73abf06245b1eb7f05f93e104dcfe42 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Oct 2 08:55:14 2008 +0930 dix: fix axis scaling. For two axes [a, b] and [x, y] (inclusive), the formula to scale point P(ab) to (x,y) is: (P - a)/(b - a) * (y - x) + x And the whole end result rounded of course to get the integer we need. commit 93ef72fa26b27cf90bf5c64ec19ac295a113aaae Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Sun Sep 28 21:47:21 2008 +0930 dix: don't lose subpixel precision when scaling. Only scale x/y back from screen range if we have crossed screen, otherwise leave it as it is. commit 5ef5e89f0e4b9b8820093e072430e295efce32fa Author: Simon Thum <simon.thum@gmx.de> Date: Sun Sep 28 22:32:44 2008 +0930 dix: fix non-initialization of pointer accel in master devices. Init MDs always with PtrAccelNoOp. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 036d424827726b0c804ae1532109253270744207 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Sep 26 17:01:12 2008 +0930 xfree86: don't let DGA steal key events outside of [9,255]. commit 56a24cf894a142b18c7f18e294074c32031f3d14 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 2 17:56:31 2008 -0400 xorg.conf.man: We don't look in root's ~ anymore, don't say we do. commit 7921c4a0bfc843c772dcb2fc185d4bcab1316330 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 2 17:08:48 2008 -0400 Remove some stale IPv6 debugging commit f836e1f11b7bf3449c3e469cc7799c4ed28d2356 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 2 17:03:54 2008 -0400 Unifdef ISC commit b1a31734731a768d586b4cb18317d4a5c5e20fa8 Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 2 17:03:21 2008 -0400 Fix bad preprocessor line commit 00f01f39454001846869496d9124f62c01e5691a Author: Adam Jackson <ajax@redhat.com> Date: Thu Oct 2 15:48:18 2008 -0400 Don't inherit XAUTHORITY from the environment. It's not especially obvious, and unpleasantly overloaded for the Xnest case. Typically this gives you a server that looks for its auth data in the authority file you were using for the running X session, which generally doesn't have an entry for the display you just started. All the major dm's, and startx, pass -auth explicitly, so this shouldn't cause too much upheaval. commit eb8be3e90a9c90a428696026d1e3b2152d7eefb4 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Sep 25 14:16:20 2008 -0600 XQuartz: pbproxy: Fix another STRING bug. Fix the usage of the NSString cStringUsingEncoding: - it doesn't NUL terminate the string, which lead to a bus error. So, we use lengthOfBytesUsingEncoding: to get the length in bytes instead of strlen(). (cherry picked from commit 6333d619e747c3b6bd3ba7557e35c0e5f6daa40f) commit edfa3f8233fde490cb4255f21473684e96d595a3 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Sep 25 12:29:57 2008 -0600 XQuartz: pbproxy: Fix a bug that rxvt brought out in STRING copying. Now I can copy and paste to/from rxvt correctly. (cherry picked from commit 82a4dc5f0f31a7911ee1cce5d1b162077befa811) commit 12a59c44cb68843a60fc43257930d1cbeb971b7a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 24 22:51:03 2008 -0700 XQuartz: Fixed threading issue with TSM. (cherry picked from commit 93ab4e0071670bb80bfa1170dd97ed9d6d51c67a) commit ee87c9b02401a7a08b396884ba412a503b078bbd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 24 18:57:36 2008 -0700 XQuartz: pbproxy: Removed stray SPI include. (cherry picked from commit 2fb2bc77b804d7b63002c1423cb0bfc658eeee45) commit 591cc57627a9137159fb5a13287c1d61d8d2fc8c Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 23 13:59:25 2008 -0600 XQuartz: pbproxy: Fix 3 paths that could leak memory. 2 of the paths leaked, when INCR transfers were done. Now we are leak free according to the leaks program for all transfers I have tried so far. (cherry picked from commit aa98db576bc02f0765cb35d0282a894ba3778213) commit 586fbc91df731150ff5e39170efe33f3cfac28a2 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 23 12:39:32 2008 -0600 XQuartz: pbproxy: Fix NSObject memory leaks by properly using the NSAutoreleasePool. Now the usage is consistent. In x_input_run() we create a pool, and release it after processing the XEvents. Add some getpid() output to main for debugging. It needs a bit more testing before the next release. Don't retain the NSPasteboard as the old code did. That may have contributed to the leak, and it made it so that we needed the NSAutoreleasePool created in main(). Remove the _known_types, and _pasteboard instance variables from the x_selection class. They aren't needed anymore. The leaks program now indicates 0 leaks after some usage. I want to test further, but this seems much better, and my memory usage graph indicates it's not growing. (cherry picked from commit b245d84a72ee3929546cd11a6eba3c60fb4a4d95) commit 238999cfc99dbf306184f0e846465a8707bcc9d2 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Sep 22 17:36:21 2008 -0600 XQuartz: pbproxy: Add a comment to pbproxy.h about how the DB() macro causes a leak (according to the leaks program). Attempt to fix several other leaks with release method calls. For some reason the process still grows more than it should... I will need to use some better methods than leaks, and malloc_history I suspect. Whatever is leaking, it's hard to find. I need to isolate the cases more. Add a missing image/jpeg branch. Remove read_prop_32 - it's not used. (cherry picked from commit 63a680354dcb545fef935ac97596dd35ceaed960) commit 106eb37e0214bbd864a59119b491abfc54f32629 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Sep 26 13:05:10 2008 +0930 Require inputproto 1.9.99.5 Pull and rebuild your input drivers, while you're at it. commit fbd09486c6e6c64db28d81caa5ef04821e49f2eb Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Sep 23 16:55:04 2008 +0930 Push server-known properties into xserver-properties.h. commit a2d83b9dc8387ec7e70689db1371cf6500b2f68e Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Sep 18 18:21:03 2008 +0930 Xi: add "deletable" flag to properties, add DeleteProperty handler. A property can only be deleted if any of the following is true: - if a property is deletable and all handlers return Success. - if a property is non-deleteable and the all handlers return Success AND the delete request does not come from a client (i.e. driver or the server). A client can never delete a non-deletable property. commit 22e90472681ebc7bdd28f82bbf2753a5b259e931 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Sep 18 16:12:02 2008 +0930 Xi: allow Set/GetProperties to return a status, and honour this status code. If a property handler now bails out, return the error code to the caller. This allows to be slightly more specific with the errors. commit 1e24e7b9df3d02350c7ea18e9379e87fe4d00026 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Sep 18 15:58:46 2008 +0930 Xi: remove configure/query device property calls. This removes all the meta-information about device properties (pending, fromClient, range, valid_values, immutable). commit feaa5fa6712c8c6f4ca97766e2ac0338253cf3b8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Sep 25 11:03:22 2008 +0930 xfixes: realize the invisible cursor before displaying it. AllocARGBCursor realizes the cursor but can only do so if we have devices there already. If we don't - then the cursor needs to be realized elsewhere. This is usually done in InitializeSprite, but since xfixes just hard-swaps the (realized) cursor to the InvisibleCursor, we need to manually realize it before trying to display it. commit e58be0f3425fb3e946a222077672c3c01308f887 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Sep 23 10:01:30 2008 +0930 config: print error code if NIDR fails. commit 30c3c13f1030268aaa6a3598d538fafd0592d77a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Sep 22 11:10:46 2008 +0930 xkb: squash canonical types into explicit ones on core reconstruction. If we update key types from core, and groups 2 - n have a canonical type but the same symbols as the explicit type of group 1, assume that it was a core sym duplication according to Section 12.4 of the XKB Protocol Spec. Ignore the canonical types and pretend there's only one group for the key - with the explicit key type. The protocol spec does not cover this case, so we have to guess here. commit ae986d1c73d2f720bd0309d8c33328d14e8eed25 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Sep 19 18:27:24 2008 +0930 xkb: fix core keyboard map generation. #14373 According to Section 12.4 of the XKB Protocol Spec, if a key only has a single group but the keyboard has multiple groups defined, the core description of the key is a duplication of the single group across all symbols. i.e. G1L1 G1L2 G1L1 G1L2 G1L3 G1L4 G1L3 G1L4 The previous code generated G1L1 G1L2 G1L3 G1L4 G1L3 G1L4, leading to "invented" groups when the process is reversed. Note that this creates wrong key types on reconstruction from core to xkb, i.e. any single-group key with a key type that is not one of the canonical four (Sec 12.2.3), will get the assigned type on group 1, and a canonical type for the other gruops. X.Org Bug 14373 <http://bugs.freedesktop.org/show_bug.cgi?id=14373> commit 5bf3f0fd4e00f96cfebd14b58580c3c8733626fb Author: Dave Airlie <airlied@linux.ie> Date: Thu Sep 25 15:40:19 2008 +1000 exa: make sure pixmap devPrivate.ptr is NULL at create time commit 82f150d73cc9a7d8eaf7241a51b03af05bcec159 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Wed Sep 24 16:56:45 2008 -0700 GLX: Make sure GLX_SGI_make_current_read is enabled when possible commit 8d9defe8c2a685709318c1d43379443df3d2322a Author: Adam Jackson <ajax@redhat.com> Date: Wed Sep 24 10:11:00 2008 -0400 Fix un-suppressing the initial cursor. The intended behaviour was "show as soon as someone calls XDefineCursor". What you actually got was, uh, slightly less well defined, since the screen's ChangeWindowAttributes hook would run after DIX handled the cursor change. Oops. The trivial way to turn the cursor on is: % xsetroot -cursor_name gumby Refer to /usr/include/X11/cursorfont.h for cursor names. Thanks to anholt for catching this. commit a39377cbcbd3091095efbeab25bec18ae520147e Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 23 09:22:07 2008 -0700 Revert "Render: Use built-in SHA1 library" This reverts commit d3bd31fddff7894f89ba80a3cdddff49aff08db8. X.org should not be providing a custom SHA1 implementation. commit 10a9bac0257b381367cedff395b40425d584bf59 Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 23 09:21:37 2008 -0700 Revert "Update COPYING for SHA1 code" This reverts commit 64387c8573ca8b3909667e32d7a9fba9567b21d3. X.org should not be providing a custom SHA1 implementation. commit 64387c8573ca8b3909667e32d7a9fba9567b21d3 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Sep 23 19:05:14 2008 +0300 Update COPYING for SHA1 code commit d3bd31fddff7894f89ba80a3cdddff49aff08db8 Author: John Tapsell <johnflux@gmail.com> Date: Tue Sep 23 18:56:32 2008 +0300 Render: Use built-in SHA1 library Getting an external library for SHA1 is a mess, so just use our own, regrettably. Public domain implementation. commit 991ed2949ba682684952fe323f8f0f51ebdca98e Author: Adam Jackson <ajax@redhat.com> Date: Tue Sep 23 10:22:22 2008 -0400 Rename SaveSetMap() to SaveSetShouldMap(). Avoids preprocessor collision with xfixeswire.h commit ca9fae00795a114bca4397c32b543d6326a4c547 Author: Owen Taylor <otaylor@redhat.com> Date: Mon Sep 22 12:42:41 2008 -0700 Change 'remap' to 'map' in saveset functions/macros Now that the code has been fixed so that Unmap means unmap and not "don't remap", 'remap' was confusing to have in the function names/parameters, so change it to simple 'map'. Signed-off-by: Keith Packard <keithp@keithp.com> commit ad14239a358cf65e5702ec7d054aa1db4f1cdd68 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 22 11:26:49 2008 -0400 Upgrade GLX Public License 1.0 to FreeB 2.0. According to the press release: Previous SGI contributions to the free and open source community are now available under the new license. These contributions include the SGI® OpenGL® Sample Implementation, the GLX™ API and other GLX extensions. [...] "SGI has been one of the most ardent commercial supporters of free and open source software, so it was important to us that we continue to support the free software development community by releasing our earlier OpenGL-related contributions under this new license," said Steve Neuner, director of Linux, SGI. "This license ensures that all existing user communities will benefit, and their work can proceed unimpeded. Both Mesa and the X.org Project can continue to utilize this code in free software distributions of GNU/Linux. Now more than ever, software previously released by SGI under earlier GLX and SGI Free Software License B is free." "The GLX API" is here read to include the original GLX source release from: http://www.sgi.com/products/software/opensource/glx/download.html ftp://ftp.sgi.com/sgi/opengl/glx/glx1_2.1.tgz which includes glxext.c as included in XFree86, from which our copies in glx/ and hw/dmx/glxProxy/ are derived. commit 722c51960dd4948b8a64f8eff115fa69da597ef9 Author: Owen W. Taylor <otaylor@redhat.com> Date: Mon Sep 22 11:04:26 2008 -0400 Don't remap windows for SaveSetUnmap Since ReparentWindow() does a unmap/map pair for windows that are already mapped, for saveset windows with SaveSetUnmap, we must unmap the window before calling ReparentWindow() to avoid the generation of MapRequest events, and so forth. commit 0bb317a78b96fddcdac319c9706b3a12f931ea44 Author: Adam Jackson <ajax@redhat.com> Date: Mon Sep 22 10:51:51 2008 -0400 Default to -br. Add -retro option for the nostalgic. -retro also reverts to the classic cursor display behavior, meaning, the cursor will be visible before anyone calls XDefineCursor(). commit ab17f88506a2dde32c50ff72b03743cd9c384ecc Author: Julien Cristau <jcristau@debian.org> Date: Mon Sep 22 01:59:31 2008 +0200 Don't use our version of ffs() if the system has one commit af0d5e2ef7b1b3f42e3522568c5f56850823c102 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Sep 20 19:41:46 2008 -0700 XQuartz: 64bit crash fix ... don't pass pointers through xe. (cherry picked from commit 5f1265b82edead8f15f2affc79c2782519502fa2) commit 852a0b0dde34e7179394d96d09122b99bf7fe904 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Sat Sep 20 17:49:16 2008 -0600 XQuartz: pbproxy: Add an X error handler that returns 0. Move the struct atom_list into the x-selection class, so that it's no longer a global variable named atoms. This may ease pthread integration and reduce the chances of symbols conflicting. (cherry picked from commit c1403c713ca80104ae3736bd2ed1eb6ffa5192b6) commit 7fa6fc5ad0b12bc52a1c22906709fbb003782d11 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Sep 19 21:28:46 2008 -0600 XQuartz: pbproxy: Fix a bug that occured when a PICT format was available. We may need another branch to convert a PICT to a PNG or JPEG. For now TIFF works well in all of the test image copying apps when converted to PNG or JPEG with an NSBitmapImageRep class. (cherry picked from commit adf339d8f948fc1e308dbcae38fcfce504b5b0ab) commit f67490ceb5b9ddf25e734cc331705103599f3ed8 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Sep 19 14:29:37 2008 -0600 XQuartz: pbproxy: Make the proxy handle copy request races, and PRIMARY INCR transfers mixed with a CLIPBOARD change. Fix a bug with some UTF-8 transfers. I can only guess that my UTF-8 tests before were inadequate. I can now copy/paste any characters between uxterm and Textedit.app. (cherry picked from commit 7ca1532e8e6e2c733c9c508eee0de73d09ecb947) commit b666ffd78155db228174041e9d7460b8a07dde0f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 19 13:15:07 2008 -0700 XQuartz: "Disable" the text when syncing is disabled. (cherry picked from commit 7713d7ab66e74b212a6c0d634a3ad82373e178db) commit dba290ec231422740f453b69b187f80df3f50e4b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 21 17:40:35 2008 -0700 XQuartz: Added a preferences UI for pbproxy options. (cherry picked from commit d76cca5e1eae86450aa236e49a2024881d0bac01) commit a928cae57b47625c9e3d136840d3e5d17fd3c51e Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Sep 19 00:18:44 2008 -0600 XQuartz: pbproxy: Add a missing include of Xutil.h. Another header seems to have done this before, but correctness matters. (cherry picked from commit 1b4987e779d97b90669bac2405a4672085677f7c) commit 749bdf19b2a50201fddd04207e31122470f435e3 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Fri Sep 19 00:02:48 2008 -0600 XQuartz: pbproxy: Add COMPOUND_TEXT handling. Do misc. cleanups with testing to verify that the behavior didn't change. main.m: XInternAtom compound_text, and atom_pair. pbproxy.h: Add compound_text and atom_pair to the struct atom_list. x-selection.m: Add an #include of Xutil.h. Refactor the reply struct initialization to be done in a common place. Add send_reply: to simplify the code a bit more. Add send_compound_text: which handles the COMPOUND_TEXT type. Add the beginnings of a send_multiple:. Change handle_image:extension: to handle_image:. The extension: message isn't needed anymore. (cherry picked from commit 1e9460abdf5bafe46215966bbef3e796cb1c33e0) commit 00bfbee59fe3b0c8d1a55d1851206857ca563ece Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Thu Sep 18 13:10:41 2008 -0600 XQuartz: pbproxy: pbproxy now responds to selection request events. We can now copy and paste images to and from X11. Text copying and pasting works as well. The NSPasteboard can contain TIFF or PICT images, and pbproxy will translate to an image/png or image/jpeg request, and list those in the TARGETS. I added a description of the basic design at the top of x-selection.m. I removed the request_data x_selection class struct. It's not needed. (cherry picked from commit 4a8daf884694c9c420c45d427f1f84e608e7e48f) commit 811e9f5e9e9c07f4b8fb1e9a4d9df91a2e359221 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Wed Sep 17 11:59:36 2008 -0600 XQuartz: pbproxy: Use an NSBitmapImageRep to convert an "image/png" selection to a TIFFRepresentation for use with NSPasteboard. This has been tested with the Gimp and works with some minor quartz-wm changes. The Finder clipboard shows the image updates after an Edit -> Copy. (cherry picked from commit 12912adaeea759d30f96d8ae51a84fd1659ea0ac) commit d8d555bac77509248d1145e928a2edf500b326b9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 17 10:11:00 2008 -0700 XQuartz: Don't enable 8bit visuals in the TrueColor server, since it's not working yet (cherry picked from commit 1317c8ff94c4bd32617a5398e929f667bd87da58) commit 23ec8261b6a746cb84e1328284fdc5587bca6faf Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 16 21:09:22 2008 -0600 XQuartz: pbproxy: The greedy CLIPBOARD handling now works for text. This change adds some [self own_clipboard] calls in the necessary places to get the proper greedy behavior. UTF8_STRING and STRING properties seem to work well now with the test cases (PRIMARY, and CLIPBOARD). I can copy from several different X apps, and have the behavior be correct when pasting. I also verified that quartz-wm isn't doing the copying, by disabling the quartz-wm paths. (cherry picked from commit 934669f732c28f07b9d934d8f8f0b63ccfebd900) commit 7c2eb3d41af33d1c52500111d0d34f9aab8a4542 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Tue Sep 16 15:21:18 2008 -0600 XQuartz: pbproxy: return the TARGETS list as a 32-bit list to fix a bug that was in the original. Add TRACE() calls where appropriate to try to figure out why we are losing CLIPBOARD at times, after transferring PRIMARY to the NSPasteboard. Use the new pbproxy_clipboard_to_pasteboard where appropriate. (cherry picked from commit 40190675a6c1889cca3574e5d1a9c16ab74315a7) commit 81c836902dc5b0b83cd95262d48cbc4c81ff3ae2 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Sep 15 13:35:46 2008 -0600 Rename reclaim_clipboard to claim_clipboard. Convert the puts usage to use DB(). Add the initial handle_image method. Check for nil in the NSString instantiation in various places. Add some commentary to enhance the clarity of why I did some things. (cherry picked from commit 37361567b65241eab64e8b30cd9729d0e71a86d2) commit 85e23affea7bf9aa7615b0292e67f170266d85f8 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Sep 15 13:31:19 2008 -0600 Add an image_jpeg Atom. (cherry picked from commit ea9dc27977c5eab666f2aa2d914e4e28d36758c7) commit 6b42f40ff9b9ff3e74ccbb2ce5cfad65016934de Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Sep 15 13:28:50 2008 -0600 Rename reclaim_clipboard to claim_clipboard. (cherry picked from commit d333a8e2b5514b8b76a78c6a13a3f5149ea8de27) commit 2ab56981b1a64138d6c1f9ecfb75655477b3e575 Author: George Peter Staplin <gps@Georges-Workstation.local> Date: Mon Sep 15 13:27:08 2008 -0600 Add image/jpeg type, and rename reclaim_clipboard to claim_clipboard. (cherry picked from commit 32b175ef62b68a971784e51e937e358cb10e20ac) commit cbd32645f7d1054f79ad137a16766da1076c610e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Sep 15 09:33:55 2008 -0700 XQuartz: pbproxy: Added global variables to customize how pbproxy behaves (cherry picked from commit 21a2d0b8d03faf1c66ec0c5c11fbd2ab24547727) commit 5b397642cdc29920245ebe64cc85243cac893e0e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 14 09:23:17 2008 -0700 XQuartz: pbproxy: First round of updates to pbproxy from George. (cherry picked from commit 5c8b956f8f3f17e8d577d97cb66424954be72684) commit dac9e91870f9c787eac97c9d7d0607979c57eb5b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Sep 21 17:32:24 2008 -0700 mieq: Made custom event handlers safer for nevents >1 commit 8c46505d7d91e0644b19cccc4b342fceb6f86cab Author: Kim Woelders <kim@woelders.dk> Date: Mon Sep 22 08:37:29 2008 +0930 xkb: fix use of uninitialized variable. And some cosmetic changes to use stuff->change consistently. Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 2b266eda6e23d16116f8a8e258192df353970279 Author: Peter Harris <peter.harris@hummingbird.com> Date: Thu Dec 20 15:58:01 2007 -0500 Fix panoramiX request and reply swapping Fix panoramiX request and reply swapping Set window and screen values in panoramix replies Prevent buffer overrun in ProcPanoramiXGetScreenSize commit 03ab8f11d25b0ca39a3b37b5350bca4c1028768e Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 18 12:17:05 2008 -0700 When resizing a window with redirected descendents, don't expose them Bit/window gravity computations need to recompute exposures to manage the bits which are saved by gravity during the resize computation. That's easy for non-redirected windows where the bits are all within the parent's pixmap. For redirected windows, we don't need to deal with this at all, so just skip the whole re-computation adventure. Signed-off-by: Keith Packard <keithp@keithp.com> commit d26083fe02658e7312a8da6a5b11652f9fe57bc8 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 18 12:14:58 2008 -0700 Switching from Automatic to Manual redirect needs to unmap/remap When changing a window from automatic redirection to manual redirection, the parent clip list needs to be recomputed; the easy way to get that computed right is to unmap/map the window, just as when redirecting the window the first time. Thanks to Owen Taylor for helping diagnose this. Signed-off-by: Keith Packard <keithp@keithp.com> commit 8bfd88ca61a1747714781a090d1c9dd8f3ad5dfc Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 19 12:13:43 2008 -0400 Revert accidental edid changes from previous commit. commit 69b79c1a6648f0d04a1b37a728b2e3d76233530f Author: Adam Jackson <ajax@redhat.com> Date: Fri Sep 19 12:02:28 2008 -0400 Update to SGI FreeB 2.0. Under the terms of version 1.1, "once Covered Code has been published under a particular version of the License, Recipient may, for the duration of the License, continue to use it under the terms of that version, or choose to use such Covered Code under the terms of any subsequent version published by SGI." FreeB 2.0 license refers to "dates of first publication". They are here taken to be 1991-2000, as noted in the original license text: ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. Official FreeB 2.0 text: http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf As always, this code has not been tested for conformance with the OpenGL specification. OpenGL conformance testing is available from http://khronos.org/ and is required for use of the OpenGL logo in product advertising and promotion. commit cc20112a65d3f641ce0261c86a541f94fae5215c Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Sep 19 08:44:04 2008 +0930 Xi: don't include client-side headers. Spotted by Mikhail Gusarov. commit e76b5b5e731e2d6c61ff6e6e9b2f42b20ac473d5 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Sep 18 14:51:15 2008 +0930 dix: calloc, not malloc, ValuatorClassRec. For master devices, the ptraccel code could segfault on free since we'd be dereferencing random memory. Callocing the valuatorClassRec is the easy fix. commit f789408f7dbfe57a0111e185ac83d1c70f262ba8 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Mon Aug 25 14:52:35 2008 +0930 Xi: remove broken SDeviceEnterNotifyEvent, replace with ...Leave... The event format is the same for both (bar the type), so one is enough. commit 97b9374a8af5a4cc52f9074feb4ce40cf0b90796 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Sep 17 15:48:56 2008 -0700 Conditionalize Composite-based backing store on pScreen->backingStoreSupport. (cherry picked from commit 37876602957924c7cff759a800eddd574ee2385a) commit b4762c0245ed2966606171cf27f40aa745fdc76e Author: Julien Cristau <jcristau@debian.org> Date: Tue Sep 16 17:13:42 2008 +0200 exa: disable shared pixmaps They got re-enabled in ee7c684f21d220d5e046bab31ae617a7d64d60f6 ("Reimplement ShmPutImage.") commit 52bbfc5bfa64fd09ef625f35a2fb4a0518003825 Author: Mikhail Gusarov <dottedmag@dottedmag.net> Date: Mon Sep 15 10:43:46 2008 -0400 scrnsaver is optional at build time. commit b6ab114212c0e4c3346ceb5b207f14c526ab81e7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 12 19:11:53 2008 -0400 Array-index based devPrivates implementation. Note: DevPrivateKey is now pointer-to-int, which means each key now needs to point to some global storage of size at least sizeof(int). commit 999f3362d50a753c1801d565766219808efdb1a5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 5 17:32:16 2008 -0700 XQuartz: Dead code removal (cherry picked from commit 43184cd379c4fb7254391b8a362016cbf89b5529) commit 6548a55ebdf43231a3c48debf54aa5aa2f1aa956 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 5 17:05:03 2008 -0700 XQuartz: 256 color support (cherry picked from commit 8dd6d5c825d457f26b41b79d02d57ed4a5ecf1f5) commit bad7cd14c2021b14971b3f707f927803a053003e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 5 10:46:36 2008 -0700 XQuartz: Dead code removal (cherry picked from commit bf10fb0b1f776e72db7c76db11f764e26f9d62c4) commit 1119fe136f8731f26fc6f50b92f5ddf78f3f83be Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 5 10:46:20 2008 -0700 XQuartz: Changed around fd handoff model to be more robust (cherry picked from commit 4fe605c2bc62d50e0b5764d9edda245af227630b) commit 183233b27beb441742a53e440c3389b4ea125b8a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Sep 12 15:25:44 2008 -0700 XQuartz: Don't warp the pointer on server start for XQuartz (cherry picked from commit c0da576d4921c246a9ac747921b48ab9e718347f) commit 7a46dd30d332bc1d42f82b0391e806d3b067ebbd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Sep 4 09:18:40 2008 -0700 XQuartz: Dead code removal (cherry picked from commit 2e45344870f5d17181df6407da3448991036d783) commit 1c70e53f2560cb877c8b149034f296232de67a4e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Sep 4 08:55:22 2008 -0700 XQuartz: Fixed proximity logic errors for tablets. (cherry picked from commit d942849f248c368b92ca73e145e8a5bc339112d7) commit c661c6ae7a9cd981f914484aa4c3007922280def Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Sep 4 08:07:32 2008 -0700 XQuartz: Remove decls of crashtracer strings that we don't use anymore in here (cherry picked from commit 4a653c6bfd270f2960a8c7e726e7628cfc3c9051) commit 54162aca404a7de2e560cc2aea01445e14742efe Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Sep 4 05:18:31 2008 -0700 XQuartz: Fixed a crash in RootlessNativeWindowMoved (cherry picked from commit a16048cec08e173ce42a78a77704f5fdfcb4480f) commit ce781cac1b52003da6c025cd29e2c2ad97dbb324 Author: Eric Anholt <eric@anholt.net> Date: Thu Sep 11 16:24:20 2008 -0700 Fix distcheck. commit 31c62495f1de6e9ba41e1f6d7fa263eeb849129b Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 10 13:11:09 2008 +0800 Drop a reference to user mode after create User mode has no customer when create until assigned to some output. commit 079625570d51e41569b73b2fd9237eb8f967f408 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Sep 8 08:50:52 2008 -0700 Bump ABI major versions for the TryClientExceptions change from commit 883811c. commit 4e004c68283828660f2259a4a4120a84667dcafa Author: Zhenyu Wang <zhenyu.z.wang@intel.com> Date: Mon Sep 8 09:16:59 2008 +0800 Revert "randr: fix user mode create initial reference count" This reverts commit 7c5ca85a9e6d49ab572831b3e0c08bb4cafb395e. commit 40a9482f8c5b3eac86c221ccce78510e850f4d2b Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Fri Sep 5 06:09:51 2008 -0700 Add cscope files to .gitignore commit bf333c2f9833a178887e7bdd7fc338f1e09c387f Author: John Tapsell <john.tapsell@john-desktop.(none)> Date: Wed Sep 3 12:20:17 2008 +0100 fbdevhw: Remove pixclock check. The check can fail because the output from FBIOGET_VSCREENINFO is used to set Clock in fbdev2xfree_timing(). Then in fbdevHWSetMode(), xfree2fbdev_timing() is called which sets the pixclock based on Clock. The resulting circle results in slight rounding errors, causing the comparision check in fbdev_modes_equal to fail. commit 47bf269d5922a4998c33908a53ad1affa8de96c0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 12:54:56 2008 -0700 mieq: Fix my broken cherry pick. commit 1669308be6d4cc6265e5fa8ef47fbf2cbef6f093 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 09:23:06 2008 -0700 XQuartz: Added pasteboard proxy code stripped out of quartz-wm. (cherry picked from commit 1f842c71c35db031a24de646429834d6054adf1d) (cherry picked from commit 144746223d8dc3f6ff2a0e805aa27a6e57df558a) commit 46168b3b404164c1f2e7876031e70fb77192fe75 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 09:11:25 2008 -0700 XQuartz: Updated Tablet code to include ranges for valuators and added cursor and erasor (cherry picked from commit 6bca78760951cb5cb57ea66b7631a2dc230dc27a) (cherry picked from commit fafcafd6de39cf6b5967793f03b30b49db36fec5) commit 7f5318131ddf86bed5797c0d9641f6ff34f34be0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 03:54:42 2008 -0700 XQuartz: Removed "Done" button from Applications Customization. Now properly save on exit. (cherry picked from commit 2f1e163d5db6063e54fcaa045ea67c29ce3e46aa) (cherry picked from commit 7542c00b96461c3474b8c23545171c4b6ddfd29d) commit 9e70a3cf58c205948f6a415e203d825e9b660d9d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 09:33:39 2008 -0700 mieqProcessInputEvents: Check custom event handlers first. commit 700e8bf33f9b1c3921de912b8110fadf5e0626da Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 02:41:20 2008 -0700 XQuartz: Updated man page (cherry picked from commit 6932d0d19ea75c64ed38b82a246b68c6bbfb8cec) (cherry picked from commit 8e3da36b6b0a261975808bc67b5caca733a1a23d) commit 7430bb9093ea8cf9589d745742c7353e53a144f8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 02:37:09 2008 -0700 XQuartz: Removed dead code (unused option definitions) (cherry picked from commit 3d74f77490105c0704c0b10dc7a6eb859bf6e985) (cherry picked from commit c1e5ea9ba058f6a13f564165a3d6862335729630) commit b3836e5bdd7e2e04e563246d90f385e1b4741baa Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Sep 3 02:36:39 2008 -0700 XQuartz: Cleaned up our sleeping before adding the launchd socket. (cherry picked from commit ebfe49dfca6e04d66232bad760f522629397cc35) (cherry picked from commit 2cf74a76d54d795cfc3c0380a526b9177327782d) commit 7c5ca85a9e6d49ab572831b3e0c08bb4cafb395e Author: Zhenyu Wang <zhenyu.z.wang@intel.com> Date: Wed Sep 3 09:41:00 2008 +0800 randr: fix user mode create initial reference count Don't need extra reference count adding when creating user mode. This fixes user mode destroy, otherwise we get BadAccess error. commit 4e1f9f51a9eea115ce2a073824e9c5cef4e2f364 Author: Daniel Drake <dsd@laptop.org> Date: Tue Sep 2 16:20:40 2008 -0400 Don't try to destroy a NULL pixmap. commit 613ce0955032fb032de0a3940752828d314f057a Author: Adam Jackson <ajax@redhat.com> Date: Tue Sep 2 15:43:15 2008 -0400 Fix strict-aliasing silliness in XAA. commit b5cdcfa55c399e83d51242e93d4f25d8bc4fec1f Author: Julien Cristau <jcristau@debian.org> Date: Mon Sep 1 19:45:30 2008 +0200 Xevie: swap replies as necessary commit d3ae193f4ac87530f2745f8cb5e7b70dd516881e Author: Thorvald Natvig <slicer@users.sourceforge.net> Date: Mon Sep 1 19:36:56 2008 +0200 Xevie: always initialize rep.length (bug#17394) The XEvIE extension doesn't clear the rep.length field for any reply but the version check. Hence, if there is junk data in it and that is sent to the client, it hangs. X.Org bug#17394 (http://bugs.freedesktop.org/show_bug.cgi?id=17394) commit 0466b8811ce8ebc1d993f177cbb7a22e997640f1 Author: Dave Airlie <airlied@redhat.com> Date: Mon Sep 1 09:57:25 2008 +1000 exa: drop cw.h inclusion this doesn't seem to be needed, at least I can't see any warning without it. I'd like to build EXA into a driver and cw.h isn't exported commit 881bd15f445bb62c3fdea863c968c95217408b6e Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Aug 31 18:07:22 2008 +0200 xf86Crtc: Set mode to NULL, so nothing bad happens if crtc == NULL. - Fix is courtesy of math_b. commit f4e9a1a98f97155de62908309e87c10487125926 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Aug 31 17:45:08 2008 +0200 damage: choose less ambiguous function names commit 0cd6709db5febbe7fbd073e429421fcd81041e08 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 30 16:13:58 2008 -0700 XQuartz: Fixed editing of Applications menu (cherry picked from commit da647f1add4c1ae7854c0fbfbf972666ce5d12c8) commit c4d290fc54542ccba7c3a46bc75b0c3322d0ca48 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 30 14:19:47 2008 -0700 XQuartz: Fixed missing symbol in quartzKeyboard debugging (cherry picked from commit 8ad55e484f0ba9073ce07a03de660cc546a7b668) commit 5d7d959b1143979c3445639c9d108e02da0c1475 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 30 14:18:07 2008 -0700 XQuartz: Don't even build with GLX support since swrast now depends on libdrm (cherry picked from commit 3739525d57dff2b3b034b5768f357b1c25577909) commit 45def7f0a342f4733cafb06adbfed14932f0e01b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 29 22:16:03 2008 -0700 Removed dead glcontextmodes (cherry picked from commit c6d0ac7471209d835e8d9a25adcbda893ddfa1cb) commit d01c5ca7935a8340a3cd68c325da6dfec005c952 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Aug 30 15:35:32 2008 +0200 Xserver.man: Typo (the the). commit 229e60db8f95232afc8cdcb7cd0572d117c84b90 Author: Thomas Bodzar <Thomas.Bodzar@quest.com> Date: Sat Aug 30 15:34:29 2008 +0200 Xorg.man: typo (the the). commit 1885582444fb06da73dea1f118a777bea26e1dc1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 29 21:18:26 2008 -0700 XQuartz: Placate automake which doesn't like escaped newlines even in comments... (cherry picked from commit 73db1170129a31ad2d55a7e83ac6dfc8030e47f1) commit 8abcc12fdd5bd9edc0288a1ab8f75e65ffcb8c71 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 29 20:55:25 2008 -0700 XQuartz: Added debugging output to the crash log to help track down two crashes, since people don't often report their system.log spew. (cherry picked from commit aaf0f71db197526b6b866cc1b39fbdfe051879ef) commit aee19c7b5542aa147b89b1ae8340e9931d81729f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 29 03:54:55 2008 -0700 XQuartz: xp_is_symbolic_hotkey_event catches the input menu, but not our mainMenu, so we still need to do that the old way. (cherry picked from commit 25eccf12c89d73b8bce2c9be14841efb230acedc) commit 974db58f5b730c3770ee461665a02dd4334d1dea Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Aug 30 00:37:11 2008 +0200 damage: initial attempt at a damage marker mechanism - This should allow drivers to recieve post submission events for X<->opengl synchronisation. - Lacking a testcase, i'm open to suggestion how to do it better. - The idea is: - driver recieves event - driver creates personal identification and inserts marker into X fifo. - when something wants to use an X pixmap, it checks if something is pending. - If so, it synchronizes the 2nd fifo using the initial identification. - Driver is not required to use interrupt based systems (price too high). - Lower latency is ofcource better. - If this is somehow unusable for you, then come up with improvements. - For that reason i wouldn't consider the api fixed for the moment. commit 454cb0802eec3c2c2cdbcc17971bced868462b83 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Aug 29 22:28:02 2008 +0200 damage: DamageReportRawRegion should set pDamage->damage - I found no evidence in the protocol, that it should be differently from all the other modes. - It seems to have been like this from day 1. - If anyone has evidence to the contrary, please enlighten me. commit ae6ca434104405302f30a58bde8738d9579d9dc9 Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Aug 29 22:21:54 2008 +0200 damage: internal functions start with a non-capital letter commit 1861250cd7e84b05e8298b74e3c7e97da72ddfba Author: Maarten Maathuis <madman2003@gmail.com> Date: Fri Aug 29 22:15:23 2008 +0200 {damage,exa}: sanitise damage - Redo damage naming for more consistency. - Call post submission functions only where appropriate. - EXA can now live without it's odd damage workarounds. commit 5af77d43fe812e127d5d335527fa940ab9d95f38 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Aug 11 16:59:17 2008 -0400 DRI2: Drop sarea use, implement server side swap buffers. commit 60ad8d5d05485339e89d7f1f9f1ded75de7c7ea1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 28 23:45:17 2008 -0400 Attempt getpeercon() on remote sockets as well as local ones. commit ebea78cdba0ff14a397239ee1936bd254c181e1b Author: Tomas Carnecky <tom@dbservice.com> Date: Thu Aug 28 18:05:40 2008 -0400 Prepare for array-index based devPrivates. TODO: static indices can be made just an int; some indices can be combined. commit ec7907f8fa04dcff2649cc4846975844314f737e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 27 19:27:13 2008 -0400 Add an array of integers for use as per-screen cursor private keys. Replaces the use of the screen pointer itself as the key, which was nice but won't work now that an array index is being stored. commit 86898491497a43814caf42013651086e62fe6162 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 27 19:17:15 2008 -0400 Remove unused GetGlyphPrivatesForScreen. commit 90b178cc7feda1f9c4995b98364739e71233fff3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 28 19:36:22 2008 -0400 Don't need to request space for Xnest pixmap private. commit 835b532d6f51d08998d7ab49fcb41db8266487ce Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 28 14:49:35 2008 -0400 Build fix. commit 040212ee60af9d043c4c3f98bba5120c3b8e33f7 Author: Adam Jackson <ajax@redhat.com> Date: Thu Aug 28 13:49:35 2008 -0400 MIT-SHM pixmaps, if they exist, are ZPixmap. commit ee7c684f21d220d5e046bab31ae617a7d64d60f6 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 27 16:05:47 2008 -0400 Reimplement ShmPutImage. There's no reason to not just dispatch this straight into the GC. As a bonus, if you do so, damage wraps correctly, and thus swcursor works. The side effect is it's no longer possible to override ShmPutImage with ShmRegisterFuncs(). Also remove the (broken) damage tracking for same from EXA, since it didn't work right, and is now superfluous. commit 2db1afbf2e56d8743c701d81a5797001ce9e5c52 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 26 23:09:20 2008 -0700 XQuartz: Always use TIS for the keyboard layout seed since KB* aren't thread safe. (cherry picked from commit c8244177b0dbcb28d2f5509e6f2a3e8057889790) commit 319405fa4a530804c19fb7d0fcece5c912e41c9d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 26 21:11:35 2008 -0700 XQuartz: Fixed needed xplugin version. >< (cherry picked from commit 01b3a99dff79e0d2b316e02658c19fa79d9144ae) commit 3350770bd6d90fefa1133ac738c1d4eae2d568a6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 26 19:13:56 2008 -0700 XQuartz: Use new Xplugin API to determine if a keypress event corresponds to an OS-X hotkey that we should dispatch to Appkit. (cherry picked from commit e7658e745f8a3eaf5cec9f54a8a1b7e5a7708e09) commit 7930ea9116f232a3762f0085e5ca65e06d1142fc Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Aug 25 22:10:46 2008 -0700 XQuartz: Made a note to come back to the xinitrc race condition in the 1.5 branch when we move up to it. (cherry picked from commit 54a882dcbdccef3f3eb4e6398e13c88185a8986c) commit dc1171df5baa0c4aa366ff2b07af5b8eb44dae12 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 22 01:12:37 2008 -0700 XQuartz: Fixed bogus args to debug ErrorF (cherry picked from commit f0351c2b80f30ae31f041798b84139141fc3d5a5) commit ac936525afe46bad329387232f8d48e77f6a4175 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 22 01:11:33 2008 -0700 XQuartz: Cleaned up mouse event translation a bit more. (cherry picked from commit c286f2a718fdaf6ad10249b59abb20731da8d904) commit 1b42f550001c11c93d5a2144df98a5c687c010c2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 22 00:45:12 2008 -0700 Xquartz: Added missing ev_type for NSTabletPoint event. (cherry picked from commit 07548f13947a212dcc020d52fe0ad679255121e2) commit 13a89f19208cf998808ff2896b7711310768f94c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 10:21:23 2008 -0700 XQuartz: Added more explanation to debug keylayout spew to cut down on report-spam. (cherry picked from commit fcdc9f8b5abd724d75f53d48fdadbed9859e9e79) commit dd1e54d6eed0bce289517b3cb95e6b1a187ca6e0 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Aug 26 20:02:55 2008 +0200 exa: fix thinko from 988725f32e082aee9392a71464125157a83d1e67 - the drawable of the pixmap is not the same as the original drawable (possibly a DRAWABLE_WINDOW) commit 7c14fdbacfcd2f4d56a346e6c72e44e4ba9909c1 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Aug 26 17:21:43 2008 +0200 exa: some minor cleanup - Fix compile warning - Order exa.h by source file that exports the function. - Move the function i created earlier to private headers. commit de79edbd9f67762950eaac2dc79668035239897c Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Aug 26 17:03:12 2008 +0200 exa: report damage manually for exa{Trapezoids,Triangles} when needed - Plus a micro cleanup of unused variables. commit 988725f32e082aee9392a71464125157a83d1e67 Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Aug 26 16:54:29 2008 +0200 exa: move destination damage for internal calls to a special function - This should improve clarity for someone who isn't familiar with the code. commit ce193476808f54d946351458361c62132d81b62f Author: Maarten Maathuis <madman2003@gmail.com> Date: Tue Aug 26 13:18:58 2008 +0200 exa_glyphs: remove useless offset commit fd94651fc3a6f49ec153ffb823b86c1d125bb298 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Aug 26 10:58:35 2008 -0400 Fix driGetConfigAttribIndex unaligned access to GLboolean. We don't actually send the float mode so just drop it. Drop a couple of other unused or redundant fields from GLXconfig. commit 41bd8d5dfe27d5c91fe7e4cdba1475a2a0741b1c Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 25 11:27:26 2008 -0400 EDID: Build fix. commit 76ed409acd772f2c041239345c6dc64cbef0e5b2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 25 10:44:45 2008 -0400 EDID: Publish the whole block on the root window if we've got it. commit 5724f7fb5bea6fa1a354c64c0972c53d70e2f27b Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 25 10:39:36 2008 -0400 EDID: Publish the whole block in the RANDR property if we've got it. commit 668f89eba3e8f9da7843f5cb350f8dc1e5d7efbe Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Aug 22 10:32:18 2008 -0700 Remove unnecessary #ifdef __SOL8__'s commit cc78d977cac74fcfb7c9b27e7109a1e369018dd8 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Aug 22 10:14:11 2008 -0700 Convert Solaris #ifdef's for <sys/kd.h> to AC_CHECK_HEADERS check Upcoming virtual terminal support changes in Solaris kernel will provide <sys/kd.h> on SPARC too, so this gets us ready for them. commit 95b466e457542bfe08b0ed2bbb5db8d28a961cfd Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Aug 21 17:24:40 2008 +0930 Xi: don't include .c files. commit c696da75c7326c5e1f1cd48292c0519ddc22e11b Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Thu Aug 21 17:23:11 2008 +0930 Xi: swap devices property replies. commit 01264f17925005969c3b71ca945fc1014bcd8c8e Author: Julien Cristau <jcristau@debian.org> Date: Thu Aug 21 01:32:03 2008 +0200 Add swapped dispatch for randr 1.2 requests commit e02f864fdf19a5ab1682336be343c57fdb69ef43 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 20 13:24:03 2008 -0400 Suppress cursor display until the first XDefineCursor() request. Yes, this means the server will start without showing a cursor. Pretty much any application that wants to interact with the mouse will define cursors, so this essentially just delays showing it until gdm (or whatever) loads. commit 64ef7ed072007b1d0b4de5ff1e5eababa418c794 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 20 13:14:03 2008 -0400 Centralize declaration of ConnectionInfo. commit f1f44940f10b0209946ec0f08104a372d7d945a0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 09:50:54 2008 -0700 XQuartz: Support windowItemModMask=0 or -1 to disable window shortcuts. (cherry picked from commit 81187364e512606a6aebb95ab2967d9d420f57f2) (cherry picked from commit f2ec79e4a159dec6481691e4dd615db01770dd7a) commit 6c5612c2e1df1e89388ffff97251f5328558f8e8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 09:21:44 2008 -0700 XQuartz: Added window_item_modifiers defaults item (and option to localization) to change the modifier keys used for the windows menu. (cherry picked from commit e4110861d307a55d9032cb83cf024ec1f294e8d7) (cherry picked from commit fcfc05482a88696cb713c7a2ddfcf935ae8378a6) commit bdc277c9b3dc6b3b95f74b20a49ce163c5fae980 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 09:58:48 2008 -0700 XQuartz: Just cleaned up formatting of event processing code... no "meat" changed... (cherry picked from commit 745bc8ab387d6794f47d8b9dca33b4c81f6dd39c) (cherry picked from commit a28a2be52478a1557a363140f7bd70ececf144dc) commit ed42108920cc695b96ed57bf9dcfea1470e74669 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 19 02:02:11 2008 -0700 XQuartz: Added appkit_modifiers defaults option which users can set to 'rcommand' to get access to the input menu with right command (cherry picked from commit 02af74d7a5a7225f408915254c40856159dc7f19) (cherry picked from commit 2da32894dff8340f6ca7c980277fca7ec835a193) commit be06961312e2111778bfd97b2c8a927acc61f43d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 20 09:56:06 2008 -0700 XQuartz: More input fixes stuck-modifier fixes (capslock) 3button-emulation now doesn't send the modifier key with the click Added other options to fake_button2 and fake_button3 defaults options: ({l,r}{control,alt,command,shift}) (cherry picked from commit 8fb6a1cf44c35a20dfb0c05c9824f94898f88da7) (cherry picked from commit ae9c1b3cfb3874b4d1251681c24bda91c398bcab) commit 436b659091dd17bb3e316377ba31f5d2a5dfa12e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Aug 14 09:34:12 2008 -0700 XQuartz: Updated bundle version to 2.3.1 (cherry picked from commit eedecba0b882bb07931e8d9168589f5be7a08a69) (cherry picked from commit 7d9d864461858b25c5eb5858fdf4b53771795f11) commit bc4cef1d0ae7cbb8f5fe16d576db45abd4330370 Author: Maarten Maathuis <madman2003@gmail.com> Date: Mon Aug 18 16:28:33 2008 +0200 exa: remove useless cache{X,Y}off from UploadToScreen() arguments. commit 38bdc34d555f956a1ff1e1bb8eef95e3ba2bac64 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 15:12:39 2008 -0400 Remove redundant check. commit 47b31233c26f710be70ffcca17e5402d03d5733f Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 15:10:12 2008 -0400 Simplify driver setup. No point warning about missing driver hooks, that just means the person who gave you the driver is inept. Might as well just crash. Also, just name anonymous screens as screen%d instead of failing after the 36th screen. Bonus points if you can figure out what the failure mode would be on the 36th screen, and what the effective screen limit was. commit b99fc65b53769400821a2bd8f691ece35a5b8847 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 15:06:53 2008 -0400 Simplify calling xf86EnableIO() a bit. commit b1f2c7a89ace1f6e5750783f3c43c4c5a6d24374 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 15:06:11 2008 -0400 The ->Identify hook is not mandatory. Best comment ever though. Mad props. commit af5125968a738ec8f496d04eb65acb7c8f812115 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 14:47:10 2008 -0400 Refactor misprite a bit. No variable declarations in header files, please. commit 41b68e0dea9305d66bca2fc4ad96db01f5342c6d Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 11:02:31 2008 -0400 Remove unused -co option. What did this even do anyway? commit 1f416fba994ed7a7e072a9f0a86b515855ea3bac Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 10:56:45 2008 -0400 Remove unused -bestRefresh option. commit 5a72c45d42abc7227c6cf3d14fd7043ea7527c54 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 10:54:11 2008 -0400 Remove unused -showunresolved option commit 9f08ffc557b52e2e8cd54fb692b66700c83d61c6 Author: Adam Jackson <ajax@redhat.com> Date: Tue Aug 19 10:29:23 2008 -0400 Remove unused xf86Info.pMouse commit f227fbf74f0c619ecf3275cdb4c10b1a4b3a8cfc Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Aug 19 11:36:12 2008 +0200 EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes. Also check the requested mask in addition to the GC state before doing work. commit 825b3fe11d1b813bf8d5b24a880ed04b78ae1acf Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Aug 19 11:22:40 2008 +0200 EXA: Don't use exaGlyphs if the driver doesn't provide a PrepareComposite hook. It's buggy without Composite acceleration (leading to cropped glyphs) and not really useful in that case anyway. The bug probably still needs to be found and fixed for drivers that provide a PrepareComposite hook but can't accelerate text rendering though. commit 75e495a4cd823b6fa42a8d167ecc9f4723320dea Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 17:58:08 2008 -0400 Remove unused xf86Info.mouseLocal commit b3dfd7e3e4deef21b40c885f8e7eae34b55888b2 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 17:56:18 2008 -0400 Remove unused xf86Info.sharedMonitor commit 5e43cd28692bc05cac80f38b47104a26c0524385 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 17:46:42 2008 -0400 Remove the remainder of grab deactivation and closedown. commit cd1e8f26147919227e7624ac4c6b313d972a4d35 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 17:40:46 2008 -0400 Remove unused EstimateSizesAggressively option. commit faaf0046155abbd15415d5a6b62ead4f58935c28 Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 18 17:23:26 2008 -0400 Remove xaaTEGlyphBlt.S Should have been removed in 593144dddd977f53bcd1a115f9544eeece46df4c but ajax was asleep at the wheel. commit 562462e78dd6a5e2ed5b36aa22be52f31d55485d Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 18 17:05:24 2008 -0400 Remove dead {bsd,lnx}Resource.c commit e3e47b35e369bf4abb0fe15865acca0b34600b1f Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 17:03:22 2008 -0400 Remove MAX_PCI_{BUSES,DOMAINS} and some associated #if 0. commit 593144dddd977f53bcd1a115f9544eeece46df4c Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 18 16:46:36 2008 -0400 Remove some unused assembly code and assyntax.h commit 2d3e478384ef8af2a760f39792e35e4a6174c967 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 15:09:44 2008 -0400 int10: Fix int1A for %ax == 0xB101. pciNumBuses was pretty much always 1 post-pciaccess. That ain't good. commit 539717fe1f08a000d1eef9f345d24cb49e3663b5 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 14:50:33 2008 -0400 Remove (unused) pciMaxBusNum. commit 3c03d9f1efbbacec6e8be58da99bf0977a8e0fec Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 14:37:42 2008 -0400 Remove sparcPci.c There is no way this code can have been building for anyone since pciaccess was merged. BSD and Linux were already using OS code on sparc, the only people who could want this are Solaris, who should be using pciaccess anyway. commit 9a39b6cfbda306eb594e87ce828afa01cd7aa01e Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 14:26:01 2008 -0400 Remove XF86SCANPCI_WRAPPER. commit 470b05a610e641094d46742393684acd786d78a8 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 14:03:36 2008 -0400 Remove vestigial MAX_PCI_DEVICES. commit 244a635fcdc9e0a7212d51b26d74f49d8e1b071f Author: Fredrik Höglund <fredrik@kde.org> Date: Mon Aug 18 19:27:34 2008 +0200 Fix the tile offset in miPaintWindow for ParentRelative windows. commit fdf7c747a8e1bc59dfb31b7f90dd5eab2687315b Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 13:13:03 2008 -0400 Remove PciProbeType and associated weirdness. This code was effectively only used in ix86Pci.c to select PCI config access type. Nobody should be using that path anymore, in the glorious pciaccess world; kernel services should get it right for you. commit 95bb6f53624a3e6f4d62a2f789982c5544d2fc70 Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 18 11:47:19 2008 -0400 Remove ancient unused inline hack. commit e1ae8db625b5e8c298a557592ef23656b3da4886 Author: Adam Jackson <ajax@redhat.com> Date: Mon Aug 18 09:53:48 2008 -0400 Drop dead PowerPC PCI code. Also add a warning for anyone still using legacy PCI code. commit 99583b43a9a202d047ff417d47485e4c0e0c9670 Author: Jie Luo <clotho67@gmail.com> Date: Sun Aug 17 23:13:22 2008 +0200 glx: avoid possible NULLptr deref, fix #16884 commit 421b7e8f12083e9518fa7deda968a2f73c9a0006 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Aug 17 19:57:02 2008 +0200 exa: fix assert logic thinko from 361a9eb953aaa38f8ebc057185de29e50f9eef26 - I guess failing PrepareAccess is rare, since this a 3 year old bug. commit 1e62e773273539352bc21b2da5262678dd3fc7df Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Aug 15 15:19:44 2008 +0930 Require inputproto 1.9.99.4 commit 609c04b62bdb0e86f33860069033c7142eecf210 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Aug 15 14:51:59 2008 +0930 dix: stick a warning in about loss of subpixel precision. commit de1573172ad2c2e98c101727930a468213295783 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Aug 13 13:11:44 2008 +0930 Backport device properties to XI 1.5 instead of XI 2.0 commit 8b9ed7dec2954d4890ddcc7c874fc0832b16495a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Aug 14 09:08:14 2008 -0700 XQuartz: Fixed a stuck modifier key bug. (cherry picked from commit eeb6e5a9e98dcf045ec230f160d5992080dceba6) commit 1770c85374883229ec5e9685229b2333e62705e6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Aug 14 07:32:37 2008 -0700 XQuartz: Made 3-button mouse simulation a little more consistent. (cherry picked from commit d207b037d2ae213369e5627a17d8831c9bc16ad8) commit f51f77d25e69b51fa3fd557ffdb5573b61759706 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 13 19:09:05 2008 -0700 XQuartz: Reverted "Control" text to be accurately "Command" in the input prefs. (cherry picked from commit b287c481e1cbe77ff84d10a708505f148a0c8434) commit 04956b80431169e0ae713a3e6ba4cdc157ce3a66 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Aug 9 10:07:32 2008 -0700 Transport/Apple: Add TRANS_NOXAUTH to incoming connections when the listener is flagged as such (cherry picked from commit ba4a7924261070ad0aff7211b7a1c9581fad4646) commit e6813e8de65eee854bbffe6ab0f8ba158f43b10b Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Wed Aug 13 14:24:45 2008 +0930 Xi: byte-swap device property requests. commit 0ce687634fa5e0d955e896a0d0d5f584a4cfd1a4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 13 17:28:08 2008 -0400 Eviscerate save-under support. Use a compositing manager already. Plus I really wanted to use 'eviscerate' in a commit message. commit f456f32cd97684052cab4712e7f4c827132c554b Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 13 16:21:28 2008 -0400 Build fix. commit c1e9b7dc6f4600fe6c301aecd7d67461cb884df0 Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 13 14:13:55 2008 -0400 Sledgehammer off the DRI2 build system. commit 544bfd06663ff71bc5275459cf74a3557530544f Author: Adam Jackson <ajax@redhat.com> Date: Wed Aug 13 11:09:54 2008 -0400 Remove xf86Version.h and related API. We haven't meaningfully been API-compatible with xf86 modules in ages, let's stop pretending. commit 139c3ab7b754dc425a09d5f7b6d2a8fb2b88138a Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Aug 12 17:49:49 2008 +0930 Xi: return the state from the correct keyboard in QueryDevicePointer. commit 998375f4154b000f75b2bafd4e276c0237d24dc7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Tue Aug 12 17:49:16 2008 +0930 dix: remove superfluous check. commit 9f9268821b13038556fbc029df54ab0e9b2aa77f Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Mon Aug 11 13:52:38 2008 -0400 The smart scheduler is not optional. commit 2e2ce817ce404a5e000c9750fa96f656fed370b8 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Aug 10 23:07:46 2008 +0200 Move strcasecmp(), strcasencmp() and strcasestr() prototypes to os.h And make sure os.h is included in files that use it. commit 02efa78ce2da470b252289ff2af598d06bc84ece Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Aug 10 18:29:35 2008 +0200 add libXinerama to the list of dependencies. Now that panoramiXext.h is installed bt libXinerama, it becomes required to build Xext. commit be2210b69defa225d8bc4bb90d94bfd740ef8b1f Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Aug 9 23:43:50 2008 +0200 remove OpenBSD/amd64 specific mtrr API. The old code never worked anyways and was removed from OpenBSD. OpenBSD/amd64 4.4 and later support mtrr with the same API as OpenBSD/i386. commit 6e33e6f355f7f04e77a165eb67b1414724c1fba3 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Aug 9 23:43:03 2008 +0200 Move string comparaison functions to from dix/ to os/. commit 5968634996c08656a0c5e2fa35705cf7afac87e6 Author: Dave Miller <davem@davemloft.net> Date: Sat Aug 9 16:45:59 2008 +1000 glx: fix crash in driGetConfigAttribIndex Don't access GLboolean via int pointers commit 4212599c922373a224d2235c74672a3a3aa8e0b1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 8 12:17:58 2008 +0200 EXA: Make sure damage tracking code is inactive if the driver manages pixmaps. It was always supposed to be like that... It was only recently pointed out (in a rather convoluted way) that it was not in fact the case. commit 073116cc44859e96374cde46325df8540621d5ee Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 8 12:15:27 2008 +0200 Remove commented out lines that make automake 1.9 puke. commit 666781cd9b62207e45eebd3eb55a930f3a345f72 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 8 01:41:28 2008 -0700 Removed rogue #include (cherry picked from commit af238e99da45a4dd8d8cbb6564bb8d0a3d79d590) commit 4a0947bf06deacc3ae716730cfbbbeda1311bae3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 8 01:53:36 2008 -0700 XQuartz: Disable the Xquartz AIGLX for now since it doesn't even compile any more... (cherry picked from commit 4545ba91e9d6ad62b6cafde3c73a672d3ded91a2) commit 5accc9b3ce1af539150d59b1800b66783fd3e947 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Aug 8 00:19:41 2008 -0700 XQuartz: Re-added deprecated code fallback failsafe for keyboard layout on Leopard with some debugging spew. (cherry picked from commit 5854e712e9ebc210d2f8de6f5d4fb650944f314a) commit 465a9bb96e8a90e53e655b3245e22910201786d7 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Aug 8 17:37:06 2008 +0930 dix: don't try to create events if we don't have a screen. #16898 A NULL screen may happen during server shutdown, when the output has been shut down but the devices still generate events. X.Org Bug 16898 <http://bugs.freedesktop.org/show_bug.cgi?id=16898> commit d684f5760f40b682a8b879641300abe689a263c5 Author: Peter Hutterer <peter.hutterer@redhat.com> Date: Fri Aug 8 14:18:01 2008 +0930 xkb: actually initialise sli before using it. commit e00cd54c1ac57ea6e7767e90592200f343d9d08a Author: Simon Thum <simon.thum@gmx.de> Date: Thu Aug 7 11:06:21 2008 +0200 dix: remove misleading comment in ptrvelo.c Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> commit 6ca34549b89e73e3e0ec3cb7585686b880534cef Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 7 16:27:57 2008 +0930 dix: remove obsolete FIXME comment. Thanks to Simon Thum for pointing this out. commit 2c3645581ee3f180d34e32c8016d5e4e1af4dca4 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Aug 7 11:55:10 2008 +0930 dix: SetModifierMapping should only apply to the ClientPointer and it's SDs. commit e1b286d495b760cf67ddf936eca11da50fba847a Author: Simon Thum <simon.thum@gmx.de> Date: Wed Aug 6 09:42:32 2008 +0200 dix: simplified debugging helper for pointer acceleration Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d95136e1510a48cc3ad066d880d56061fc6a42ee Author: Simon Thum <simon.thum@gmx.de> Date: Thu Jul 31 00:39:03 2008 +0200 xf86: don't replicate dix defaults for pointer acceleration the defaults from InitVelocityData() or hypothetic driver-side changes are now respected, not overridden. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4f333d53510b82db57cfac1bfea22422cbb7be79 Author: Simon Thum <simon.thum@gmx.de> Date: Thu Jul 31 00:33:38 2008 +0200 dix: simplify velocity tracking filters prefer fp-mul over fp-div and remove rather pointless check Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit bf084a0769eee36ff799e5e5f2d1e875c1ebcc51 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 6 13:36:43 2008 -0700 glcontextmodes.[hc] were not added with the removal of the meas symlinks patch. Copied from mesa head 2008.08.06. (cherry picked from commit 409e1dd1e9524b5c1a1ae58a759da77e587e3780) commit e72b1d21e44712e90595b1c31e67db6786d0d1bd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Aug 6 10:23:31 2008 -0700 XQuartz: Now properly disable xauth checking on launchd socket and mostly fix the xinitrc / launchd race condition commit d1b96cdea96f5321e0d254abde81cdaab2eca979 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Aug 6 10:37:32 2008 -0700 Add an xf86PrintBacktrace wrapper around xorg_backtrace to aid driver debugging. commit 26d31ad1c7f4c550d73419ecf76912d844186b30 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 5 15:14:08 2008 -0700 XQuartz: Added code and made comments more helpful for debugging first-client-auth bug. (cherry picked from commit a8f0d32216e321b8ae6da182be9b1ea792f6e004) commit 0ef3243fb59fa993a7a07a08debbd4329254c265 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 5 18:45:54 2008 -0700 XQuartz: More fd handoff cleanup. (cherry picked from commit 199d2dcb708c9f9d6b9ede149ea0fe9fba6c007c) commit e7dd3dd8f311d3872e0c4c9c2ca22c00f9d11f59 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 5 14:33:03 2008 -0700 XQuartz: Fixed some errors / typos in the preferences pane. (cherry picked from commit e1e0c398bbb50394b164394e1f1870016489c25b) commit 6836f9aac801c3add0ae4aece05b32e85a0c5f85 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 5 14:24:25 2008 -0700 XQUartz: UI Cleanup. Removed done/cancel buttons from Applications->Customize (cherry picked from commit d3157ca45c1f88edd040d721c1e944b9d2c090aa) commit c06e27b2f6fd9f7b9f827623a48876a225264132 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:42:15 2008 +0930 xkb: ProcXkbSetDeviceInfo should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit d9ca9819e975e0f6832a320f8be5958e5d942f85 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:41:40 2008 +0930 xkb: ProcXkbSetGeometry should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit 5ba87c3327786dd7c6e8e265a19c858e8faae8fd Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:41:08 2008 +0930 xkb: ProcXkbSetNames should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit 7e45c80204e06562d4475741caea65bc8758f3c7 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:40:25 2008 +0930 xkb: ProcXkbSetNamedIndicator should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit a609dbed7cf854a6ee9d33c7cf45615db9da1fb9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:38:59 2008 +0930 xkb: ProcXkbSetIndicatorMap should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit e8c2a3d7c996cb41c4c44ba67acae5ff9438fc06 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:37:39 2008 +0930 xkb: ProcXkbSetCompatMap should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit 3c7740aa8f21c1fda4190a1bf5d6ce089db5e35b Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:36:00 2008 +0930 xkb: ProcXkbSetMap should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit 31afd51dd49c0d0db2465fbc987044fab8b89f22 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 16:32:37 2008 +0930 xkb: ProcXkbBell should work on all attached SDs. If called with XkbUseCoreKbd, run through all attached SDs and replicate the call. This way, we keep the SDs in sync with the MD as long as core clients control the MDs. commit de4936d7482f820728efeef338a2041c7a9186d2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Aug 4 20:11:45 2008 -0700 XQuartz: Fixed proper processing of tablet button presses (cherry picked from commit ca0babafa4e9cf1b67ec460655bffe569ac9c3e9) commit b70a8ba3dc52b277194ab267a101a3fd15062685 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jul 15 17:48:29 2008 -0700 XQuartz: Nuke Sparkle. (cherry picked from commit 4991f54a8d84a9a8df89a99dbfc09391195578f8) commit 30851efdd4313506e92aeb6d3e5099dea99ab99c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Aug 5 12:54:51 2008 -0700 XQuartz: Fixed first-client-can't-connect bug Readded the old exec() server startup path for regression testing. Don't use the dynamic fd addition code since it's not quite working correctly. (cherry picked from commit 08f3fe153edc5ab4ca010e8ce82d5c3fc0ddb72c) commit 277a74bcbb7d0a93c4f2e1de11daabd8c5f93ee8 Author: Tomas Carnecky <tom@dbservice.com> Date: Mon Aug 4 23:26:00 2008 +0300 Redefine clients as a fixed array This removes yet another xalloc() each server generation. Also, I couldn't find the corresponding xfree() so I guess that used to be a memory leak there. commit 5532d63488ec45953ff7f925cfb4f87adb3b04a0 Author: Tomas Carnecky <tom@dbservice.com> Date: Mon Aug 4 23:06:08 2008 +0300 Redefine WindowTable as a fixed array Instead of xalloc'ing it every server generation. The array is always the same size (MAXSCREENS), anyway. commit e882ee7056f370e0619d137b4ec3973ecb4e3479 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jul 29 17:52:11 2008 +0300 EXA: Remove unnecessary #includes There wasn't actually any font code here, so no problem. commit 6c1bb64c6f2efd81856ca00591df37916713b142 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Aug 4 15:19:45 2008 +0930 xkb: break up XkbCopyKeymap into bite-sized chunks. commit 3c6a9c531f673b7a0cb9ca01860b4dbe79686363 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 15:52:07 2008 +0930 config: protect against potential out-of-bounds indexing. commit 92c51b183c2ff06361dad7f918daed6577ba4935 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Aug 1 14:24:54 2008 +0930 config: support type strlist for XkbOptions property. For backwards compatibility with server 1.4. commit 35b14519b4a3158592a089170ec039bbc219603e Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 29 12:59:57 2008 +0930 config: add parsing for input.x11_options.XkbOptions. #16874 X.Org Bug 16874 <http://bugs.freedesktop.org/show_bug.cgi?id=16784> commit d762c08aebe3b7e8c88e2e7a6fcf66057a21b403 Author: Simon Thum <simon.thum@gmx.de> Date: Mon Jul 28 14:07:48 2008 +0200 dix: export driver-side functions for acceleration also add additional safety for accel driver api Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 18e9fd69fe01298d825b46415b9c6bd86c75dfe5 Author: Simon Thum <simon.thum@gmx.de> Date: Tue Jul 29 10:07:43 2008 +0200 dix: use average of pointer accel profile Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 25882af6d3359e5ae42c927c555f5b257ba5665c Author: Ivaylo Boyadzhiev <iboyadzhiev@nvidia.com> Date: Sun Aug 3 18:55:12 2008 -0700 Fix a longstanding XAA CopyPlane bug. TmpBitPlane is a plane mask, not a plane index. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit d980913f3145cdc34baab27ff818c9631c4c8571 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 1 16:15:04 2008 -0400 Erk. Actually check all the BARs, not just the first. commit 82d51e6df2bf677bdf24376092bcaa79b534f6e5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 1 13:17:55 2008 -0400 Silence the "No matching Device section" warning in some harmless cases. If the device doesn't have any BARs then it's just a stub for some lame operating systems that need one PCI device per output for multihead. No point in warning about it. commit 9643e8d3482a35d355a243db7aa397ad47f29be0 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 1 11:35:47 2008 -0400 Handle XGI cards in autoconfig. It's all a bit wonky since both sis(4) and xgi(4) claim to support the Volari Z7 and V5/8 (0x0020 and 0x0040), so let's side with xgi(4), why not. Note that the V3 (not V3XT) identifies itself as a trident chip. commit 63bdd4c27d47323b3282bf0b6eaecae91c79b45c Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 31 17:31:36 2008 -0400 Unifdef XIDLE. Seriously how was this still here. commit 8d214bc26f9b7ab6a5c54d7749cd4b6811cb0b96 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 31 15:46:52 2008 -0400 Document more of the OS and library assumptions. commit 2198e237b2ed85857c671eee2cd04dfc032befee Author: Tomas Carnecky <tom@dbservice.com> Date: Thu Jul 31 13:46:06 2008 -0400 Cosmetic cleanup to Xvfb/Xdmx configure check output. commit 148175fb8b365dcf00b13539b3f03ce33f3df707 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Jul 31 16:54:33 2008 +0200 EXA: Do still return FALSE if the driver PrepareCopy hook failed... Thanks to Stuart Bennett for pointing out the problem on IRC. commit 68fd6604a15b653d1fa244633eaaee9608a03ab3 Author: Tomas Carnecky <tom@dbservice.com> Date: Thu Jul 31 10:03:56 2008 -0400 OutputPropertyNotifyMask is a valid thing to select for. commit 64ebeeb5265a4c425b9397fdc86a6d81521a856e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Jul 31 10:58:52 2008 +0200 EXA: Fix exponential growth logic for GXcopy tiled fills. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16908 . commit 8405c25d9ddbfddb6b155a436f07ccad689e53bd Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Jul 31 10:55:44 2008 +0200 EXA: Simplify exaFillRegionTiled() control flow. Also only call REGION_TRANSLATE() when necessary. commit b37b1e66996f8335dafc97b12d25aaec452b931e Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Jul 30 18:48:27 2008 -0700 Make shmint.h part of the SDK. This includes ShmRegisterFuncs, ShmSetPixmapFormat, fbShmPutImage, and ShmRegisterFbFuncs. Note that fbShmPutImage was already exported. commit a3afa6f2fb80489f7b6a88d12def09281d32ed94 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jul 30 18:30:37 2008 +0200 EXA: Optimize GXcopy tiled fills. commit 37087bc10630ee7740df1369b3e56a44fd2ad2b0 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jul 30 18:27:33 2008 +0200 EXA: Replace open coded CopyArea logic with GC op call. commit bb2cacd33eb85f39b9e7fa554545611957df677d Author: Xavier Bestel <xavier.bestel@free.fr> Date: Tue Jul 29 13:06:10 2008 -0400 Cosmetic fix to EDID decoding. commit a70754a9fdb019d85fbfca1898699f3c6f609fdd Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Tue Jul 29 14:16:25 2008 +0100 require inputproto 1.9.99.3 commit 591ef3c047ab3597fef9d687205e99c254ff2040 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 29 10:00:01 2008 +0930 Xi: ChangeDeviceControl presence events should set the appropriate devchange. Requires inputproto 1.4.4 or higher. commit 25dd5ce0770c5ff91a79c12223fd4af52759900b Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Jul 28 12:33:58 2008 -0400 Add atKeynames.h in hw/dmx/input and drop evil cross-ddx #include. commit e39a16aa58456aaecee54edc64f189c958db0902 Author: Julien Cristau <jcristau@debian.org> Date: Sat Jul 26 16:35:19 2008 +0200 xfree86: don't output a spurious newline to the log when loading a module commit 2eaed4a10fe5bf727579bca4ab8d4a47c8763a7d Author: Julien Cristau <jcristau@debian.org> Date: Sat Jul 26 15:35:42 2008 +0200 xfree86: use xorg.conf input devices if there is no ServerLayout If xorg.conf has no ServerLayout section, use the first mouse and keyboard sections as core devices, even with AllowEmptyInput. commit 805f28e96ceb20bc53792ae3cf17f9c26564ae0e Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 12:10:52 2008 +0200 some trivial changes regarding C compat, indentation, etc. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 3209bd21d00b8673d321f70afb65720588ddacb3 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 12:06:34 2008 +0200 xfree86: perform pointer accel scheme selection by name, not number Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit a17cb29f5acdfcdeac929d8c6be3600d44d038ef Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 12:03:17 2008 +0200 dix: preparation change: make runtime exchange of filter chain safe Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 1a9f9ac50f2b0db735789905cc29572a50c8ae4c Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 11:49:36 2008 +0200 dix: optimize precision in device velocity estimation Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit c184b91d9aa72031c2bac9f379f56633957ded30 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 11:33:25 2008 +0200 dix: improve the driver interface to predictable pointer acceleration Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 87aa5298576ed335ac31347e14fb30430288157a Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 11:28:09 2008 +0200 dix: introduce defines for accel profile numbers Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 4e32e6fb38d19c9993de86188e4f7e7916a028e2 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 11:10:22 2008 +0200 dix: rename classic accel _scheme_ to lightweight to avoid confusion with classic accel _profile_ Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit d40183c665d458ac0a6e7952fbe986776a17fda7 Author: Simon Thum <simon.thum@gmx.de> Date: Wed Jul 23 09:28:06 2008 +0200 dix: add legal statements to ptrvelo.{c|h} Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit ec10eccd56be8b947cd63cae0687b8319857fe60 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jul 28 09:33:04 2008 +0200 GLX: Unreference drawables bound to the old context, not the new one. Apart from the obvious reference counting issue, this fixes http://bugs.freedesktop.org/show_bug.cgi?id=16867 . commit 6ab8d6010adfd5ad6f1e1094a26c84f0aff934b1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jul 28 09:32:59 2008 +0200 AIGLX/DRI1: Pay more attention to return value from DRIGetDrawableInfo(). Could have crashed otherwise if the num(Back)ClipRects variables referenced by the caller weren't pre-initialized to 0. commit b3e981c9d4ff31263a43b47f83cf8db4c2b5aeff Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jul 28 09:32:54 2008 +0200 Fix Makefile.am crack. Looks like an artifact from early modularization. commit 3575d9584edf35ec1720bc3755b6576a56613685 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Fri Jul 25 16:46:44 2008 +0930 config: note that HAL options must be strings. Only strings are parsed by the server, all others are ignored. Doesn't matter, specifying int options as strings works fine anyway. commit 54651ff5ec54f4c621e060b19f31d77d519ef158 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 24 17:41:48 2008 +0930 xkb: remove superfluous inputInfo.keyboard treatment. Really not necessary, we can just walk the list and spare us the special treatment of the VCK. commit 70bd8261223366dae9dfdbb999691328d85f093c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 24 17:38:16 2008 +0930 xkb: use PickPointer/PickKeyboard in _XkbLookupAnyDevice. commit 47160edec7f0d9129576d83f1593a5549879a893 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 24 12:12:45 2008 +0930 xfree86: warn some more about potential missing input devices. Put out a warning if xorg.conf has InputDevice sections, but these aren't referenced in the used ServerLayout. This is only performed if AllowEmptyInput is enabled. The reason behind this is that the server used to auto-add the first mouse/keyboard sections if none where referenced. Now, with HAL and AEI enabled by default, setups that relied on this auto-adding break and are left without input devices. The least we can do is warn them. commit f30b0823dbfc5902e54b337b5b6b570ebf216584 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 24 09:56:00 2008 +0930 xfree86: if AllowEmptyInput is on, warn the user that we rely on HAL now. commit ad4cd2e241691427689591f7769a1184c8c1c7f5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 23 17:40:28 2008 +0930 xkb: don't send core events on SlowKeys. Core events don't happen until later in the DIX, so pump device events down instead. This makes modifiers work again when SlowKeys is enabled. commit 7d9dece74fc2bf130ceb8818ced5d9e3ac526900 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 21 22:12:45 2008 +0930 dix: fix up enter/leave system once again. Two corrections 1. the "detail" field has NotifyVirtual, etc., not the "mode" field. This was a clear bug. 2. don't set/unset the flags for NotifyGrab or NotifyUngrab. Clients are expected to deal with multiple enter/leave events per window if the mode is not NotifyNormal. Testable with TCL menu boxes (such as used in gitk): tk_optionMenu .menu globVar Val1 Val2 Val3 ValJunk pack .menu Thanks to Michel Dänzer for pointing this out. commit 2ce434f54bc0d6050ef115e310df62c035e84bf2 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 24 18:44:16 2008 -0400 Clean up unused definitions from glx headers. commit ae67508392261ae47858692668a0c192ef4a9d7b Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Fri Jul 25 10:05:30 2008 -0400 Fix AddExtension now that CloseDownProc can be NULL. commit eff25430b4a391409e39337962ff7697165d23c7 Author: Daniel Drake <dsd@laptop.org> Date: Thu Jul 24 21:06:34 2008 -0500 Don't abort if swrast library is not present GLX is enabled by default, but the current swrast behaviour causes X to abort with fatal error if the swrast dri library dlopen fails. Handle the case where the swrast library is not present, and do not register the GLX extension unless at least one screen has a usable GL provider. commit 62b5690415786c4a6e8bac464aa8db578beb74f5 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 16:13:10 2008 -0400 Remove some more MEMBUG garbage. commit 036822584b26854e2f486f1bea84d8d19d9324de Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 24 16:03:58 2008 -0400 Drop xf86CommonSpecialKey() and atKeynames.h These are AT scancode specific, should really be part of xf86-input-keyboard. Remove from server, move to xf86-input-keyboard. commit f3ff2386016ced7e677817e9761a535f0f385813 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 15:28:07 2008 -0400 Sync is built-in and mandatory. commit 3fcf4d3eb89fecaa2be7b5ac4933b693c9c3d97e Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 15:09:05 2008 -0400 XC-MISC is built-in and mandatory. commit 9757106bba8f7bea99c5211817fc6b5fde4e6f66 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 14:59:14 2008 -0400 Remove all empty extension reset hooks, replace with NULL. commit 6bcde69585fcc8f8dbfe81c115649f19274922fa Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 09:13:26 2008 -0400 Allow extension closedown hook to be null. commit f65c50c4e902c7b5619fb7bbee8462434d809ec7 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 09:07:42 2008 -0400 Bigreqs are built-in and mandatory. commit d6228cb22aa89b90834d80d98b91862c1fc01b54 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 24 09:00:22 2008 -0400 Shape extension is built-in and mandatory. commit 990fc643ae90c034187707e7de414d80640ec6da Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 24 15:02:40 2008 -0400 Ugh, remove trailing backslash. commit 806e8cf3c01f955411445a7095f0957ea9a9b22a Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 24 14:25:24 2008 -0400 Remove SPARC muldiv code. Was used by ELF loader, which is no more. commit dff1a609bb4c0171e2abb92b54c16e739aec9ca2 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Jul 21 18:29:08 2008 -0400 Drop the glx resize hook and stop chaining PositionWindow. commit 24dddcd0ef845f4120f8588dc63ec754338ffac8 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Jul 21 18:16:38 2008 -0400 Drop unnecessary linked list of contexts from GLXDrawable. commit 5c1e254cc85e9ad409b0217780545c29f62d5feb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 24 03:01:45 2008 +0300 Remove xorgcfg Us shipping a GUI configuration utility (especially as part of the server!) was pretty pointless. There was pretty much nothing it could configure which wasn't already runtime adjustable: if you could get a server up with functioning input and output, there wasn't much xorgcfg could do for you. Au revoir. commit b74927c3844bc2650d95f604fe782d95ade067f1 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 24 02:42:13 2008 +0300 Remove ioport I don't know why we would possibly be shipping this. commit 8c0518379089d230060e9ff672ba5eba34198325 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 24 02:40:02 2008 +0300 Remove kbd_mode We only built this on BSD and Solaris, and if such a tool is generally useful, ship it with the OS. commit 0d785bd635d135fcd67b4c9c88f5c8217e9b9240 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 13:43:09 2008 -0400 Unifdef hpux. commit 5035741fd4cb4918957064a8c9ded9c7c31b4e22 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 13:38:38 2008 -0400 Unifdef __osf__ commit bd8bd2c700e6ccac53b47c45766c0a3a08a59344 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 13:36:35 2008 -0400 Unifdef AIX. commit 5f5eed7f790db2f0ae0cd0f5c5ee5a312079c0b0 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 13:27:24 2008 -0400 Unifdef DGUX. commit 856db05b58b71c5ff22af727aba435a8c356abfa Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 13:25:37 2008 -0400 Unifdef sgi. commit ab6557fcd4bb4fd580bb1727dc8764f7dfb2cb30 Author: James Cloos <cloos@jhcloos.com> Date: Wed Jul 23 13:17:33 2008 -0400 Optimize commit 331cc3f0799a54910a99484264f76569beeee55a Reorder to minimize comparisons commit b699364b1c807d29666633523f5b5a608a07a8ee Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 11:43:59 2008 -0400 Unifdef VXWORKS. commit 2e3c43d306616f8accdeaffec9c108ba88324805 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 11:35:06 2008 -0400 Assume __GNUC__ >= 3. gcc 3.0 was seven years ago. Get with the times. commit 0c1c9d75089aac0cf673820db83801d3cab5bfc7 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 09:11:40 2008 -0400 Remove some broken debugging scaffolding. commit 0ff5bc404842f7264a8e77f9e2a0bd8d0b051356 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 23 09:09:11 2008 -0400 Unifdef QNX. Again, hasn't worked since at least 7.0. commit 331cc3f0799a54910a99484264f76569beeee55a Author: James Cloos <cloos@jhcloos.com> Date: Wed Jul 23 00:01:43 2008 -0400 Fix LookupColor Using strncasecmp(3) with the lenght of the user-supplied colour name will result in a false positive when the db key starts out with the same string. Eg, blue will also match BlueViolet (aka blue violet). Since the shorter strings occur first in the database, avoid such errors by treating a 0 result from strncasecmp(3) as a positive result when the key’s length is longer than the supplied string’s. commit bc3c03a3f3c091026310f0e8d55321cec570a0c5 Author: Pierre-Loup A. Griffais <pgriffais@nvidia.com> Date: Tue Jul 22 17:34:37 2008 -0700 Don't return BadAlloc when trying to set a PictureFilter with no parameters when a filter with parameters was previously set. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit 92fdd01d8e46dd4b41338754e1a34e9d3c387d4a Author: Dodji Seketeli <dodji@seketeli.org> Date: Wed Jul 23 01:07:29 2008 +0200 [Xephyr] various X86_64 build cleanups commit 5de1867fbb0a336ff3fdc92cbf734849f6111b1b Author: Dodji Seketeli <dodji@seketeli.org> Date: Wed Jul 23 01:00:26 2008 +0200 [Xephyr] Fix #15839 Make sure the _XSERVER64 macro is not defined in Xlib client code. That macro is meant to be define only on pure server code, when necessary. commit d692e1a63e4718d3b6d486582c19f30259b813a7 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 22 10:21:22 2008 -0400 Build fix. commit d8937ce58137ad675f1ead8f2345eaed0ca63c8a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jul 22 16:52:50 2008 +0300 autogen.sh: Pass --force to autoreconf Ensure we get all files installed when running autoreconf by passing --force to overwrite previously-generated ones, which fixes running it from tarballs. Also revert Peter's local changes to pass arguments to configure, all of which are the default now anyway, AIUI. commit 880625eef5d8b168df3e42836fa1b763c51a91b5 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 22 14:34:28 2008 +0930 xfree86: plug memory leak, free driver's private data when deleting the device. commit 67d7821ae783d3f123b6ba7203abf847374a1e36 Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 21 11:48:24 2008 -0700 dix: reset potential lastSlaves when disabling an SD Unplug a mouse, then warp the pointer and the warp pointer code will try to update the position of the last slave device associated with the master. That pointer will be stale and the X server will crash. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 8c8c4fdf34bfc9d54ebea99fb0af14cad167b4a0 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jul 21 16:39:43 2008 -0400 EDID: Various reduced blanking fixes. - Use a single common function to compute reducedness. - Call it from both the old-school and new-school mode validation paths. - Define monitor reduced-blanking support in accord with EDID 1.4. - Attempt to filter RB DMT modes away from the "standard" EDID pool if the monitor doesn't claim RB support. commit e8cd77e14d3fa40e5cf1174acaf925362b2e0a11 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jul 21 16:15:03 2008 -0400 EDID: For standard timing blocks, prefer DMT timings if they exist. commit 6ba70091e2325f534a37ef185fea568d2c43edec Author: Adam Jackson <ajax@redhat.com> Date: Mon Jul 21 15:40:34 2008 -0400 EDID: Correct DDCEstablishedModes to conform to DMT. commit facb255fa9267e343cbc91f841f1b64e5dc99e98 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Jul 21 16:05:53 2008 -0400 Need to unref pixmaps backing pbuffers too. commit d5ae85b5b722821499d5796cf0973ecb6ec125f1 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Jul 21 15:28:50 2008 -0400 Fix embarrasing GLXPixmap leak. commit c74ddc87c995c73109827717a49f14846c7c4024 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jul 21 15:10:20 2008 -0400 EDID: Add quirk to clamp max pixel clock to single DVI link speed. On some panels you end up with all of: - No range descriptor - No description of physical connectivity - Native panel size mode in standard timings list In principle you're supposed to use the timings for that mode from the DMT spec, but in practice the DMT spec has timings for both 1920x1200 normal and 1920x1200RB, and the standard timing field gives you no way to distinguish. And, of course, the non-RB timings don't fit in a single DVI link. commit 55803473adb0a0975fea81035402bf6b4ec0e30b Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Mon Jul 21 10:32:57 2008 +0100 Bump inputproto to 1.9.99.2 for XI_PROP_ENABLED commit 69de40ee45a6e046be79b735cd1540f63b87aee9 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 21 17:05:04 2008 +0930 dix: shift the duplicate button mapping check to ProcSetPointerMapping. XI 2 allows two buttons to have the same button code. commit 0dbfe0ebc69c307c0626ba824de15d03de1251d4 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jul 21 03:50:15 2008 +0300 Revert "Try nvidia before nv under the assumption that people who install it usually want to *use* it, too." Per mailing list discussion. This reverts commit 66fb253082ea42179180303393e48846208987fa. commit 6b5206e7cb8e5279816b48f014d47d3f03f16972 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 18 15:38:10 2008 +0300 dix: Remove insane BC hacks If your DDX needs a 1bpp mode and doesn't set it up, your DDX is incompetent. commit 66fb253082ea42179180303393e48846208987fa Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Jul 8 02:39:00 2008 -0700 Try nvidia before nv under the assumption that people who install it usually want to *use* it, too. commit 376620460ec50cb98a1e3746629b7f73c2e926d7 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jul 20 16:53:01 2008 +0200 Drop some more configure-generated files from the tarball commit 35346a42271dfe65fe0a86dc522701028bf6daf6 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jul 20 16:40:59 2008 +0200 Don't put xf86Build.h in the tarball (bug#9277) This file is generated by configure, we don't need to ship a stale version in the tarball. X.Org bug#9277 <https://bugs.freedesktop.org/show_bug.cgi?id=9277> commit 43c6d5a6f83dfdf8596c8d0faf8ac1a64f73a8c1 Author: Julien Cristau <jcristau@debian.org> Date: Sun Jul 20 16:30:24 2008 +0200 distcheck fixes Still seems to fail because hw/xquartz has too long filenames commit 92b0a04ffd630a89705fc73d587182a62c34cd84 Author: James Cloos <cloos@jhcloos.com> Date: Sat Jul 19 18:21:37 2008 -0400 Fix compile failure This fixes a compile failure by ensuring that mouse-cfg.c can see the MTYPE_ constants. commit 0b45ba488d8a3e901b83e445d17e7e9a67047b6c Author: Adam Jackson <ajax@redhat.com> Date: Fri Jul 18 10:54:10 2008 -0400 Drop the FONTCACHE extension. This appears to have been dead code since X-TT was merged. commit b85392e66b4cbfcc95897ac342f19ac8ab04d4cc Author: Søren Sandmann <sandmann@redhat.com> Date: Thu Jul 17 23:10:11 2008 -0400 Give priority to clients that are receiving expose and configure events commit 3b687ffe1649449b3d182f5e7690274c6c96916a Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jul 17 18:16:59 2008 -0700 Make xstrcasestr prototype return value match the implementation commit f7bfa4ae971b43c3ed81cc84e6d1e071c413f04c Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 23:03:57 2008 +0300 configure.ac: Remove non-existant directory Oops. commit 16e40ecf43ea7df349e54f757db0223764d752ee Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 22:37:31 2008 +0300 Remove dead code, useless #defines, et al commit b0a99fb02bb7290266d7dddee4de0b9959fb3c52 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 21:42:17 2008 +0300 configure.ac: Fix release date Instead of putting something that's always wrong, at least just put unreleased, which will be more obviously wrong if it's, well, in a release. commit 711720650cc192022f0d91f5cf94292d48dbc891 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 21:39:46 2008 +0300 Everyone has urandom If you don't have urandom, please just add a fallback to /dev/random, rather than building our own random generator. commit 446fe9eecddd1337f9d5164dd7c301e1ba3dfe32 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 21:37:50 2008 +0300 Dead code removal Remove a whole bunch of code that was never built, be it entire files or just dead ifdefs. commit 0564b5454ac101d9e1218767bbbc2c2d9f3e0696 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 20:46:27 2008 +0300 XFree86: Restore AllowMouseOpenFail usage text This was incorrectly stuck behind the XFree86-Misc define, so got deleted with the rest of misc: restore it unconditionally, as it should be. commit 6c7c0ffeb71610ee00fc92b32fd2b1cc70383e38 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 20:45:01 2008 +0300 KDrive: Delete rafts of unused code Most of this stuff was gone with the last real hardware drivers that used it. Au revoir. commit ad7a7ae290b05f007062161418c929d9cebeef78 Author: Julien Cristau <jcristau@debian.org> Date: Thu Jul 17 18:51:05 2008 +0200 XF86BigFont is disabled by default 3c19ec47b434d4ca84db58363cc053cc0b6aa413 did that, but pretended to make it 'auto'. commit 058100fd19ed33a3100d18a9ca56fdcffac361b2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jul 17 09:35:30 2008 -0700 Remove more Lynx leftovers A couple #if defined(Lynx) && defined(sun) had become just if defined(sun), resulting in wrong settings for Solaris builds, so they're now just deleted. commit 47833eef35b20a2eb0a74782edbb0877fd491c4c Author: Mathieu Bérard <mathieu.berard@crans.org> Date: Thu Jul 17 11:59:24 2008 -0400 Drop a bunch of #ifdef Lynx. commit af2138bfce34a28312b26106eaf9561d96712ee0 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 17 10:39:29 2008 -0400 Nuke some ancient code for commandline-challenged OSes. This appears to have been dead code even in 6.7. commit b9a0cee026361189dce63b87c738bd1d17e02830 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 17 10:32:35 2008 -0400 Drop hw/xfree86/os-support/lynxos/ This has never worked in any modular release, clearly no one cares. commit d87f170bd99f7908eb14272ac42c8963d089f54f Author: Adam Jackson <ajax@redhat.com> Date: Thu Jul 17 10:29:52 2008 -0400 Remove XF86Misc code from xorgcfg. commit e3ff8501749209ee2dd324d35ae16e37510e0574 Author: Jie Luo <clotho67@gmail.com> Date: Thu Jul 17 10:27:24 2008 -0400 Remove duplicate load of freetype font renderer. libXfont will do this for us in FontFileRegisterFpeFunctions. commit 8441e26266701776f1416bec864ae2949355da76 Author: Jie Luo <clotho67@gmail.com> Date: Thu Jul 17 10:23:37 2008 -0400 Remove freetype from the list of autoloaded modules. commit 5d11ae7a69e3a7611c667be4628a15a4b514f72c Author: Jie Luo <clotho67@gmail.com> Date: Thu Jul 17 10:22:29 2008 -0400 Fix color lookup. OsStrCaseCmp returned inverted comparison sense from normal strcasecmp. commit 478d3918d5b23fba1a7e3aaea766dfa785e5a0a6 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 17 03:29:26 2008 +0300 XFree86: Remove remnants of XFree86-Misc HandleMessage: dear god, no. commit 95000e34df9ba066905430eb0eb39a616567183e Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 16 16:37:14 2008 -0400 Build fixes commit affec10635343668839994ea2bac16c1d4524200 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 16 14:44:33 2008 -0400 Remove loadable font renderer support. commit acc91054316208844742495dea0b80a860ef02bb Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 16 14:24:47 2008 -0400 Remove font module support from xorgcfg. commit a82e6efb7b9b2ab9a1597b002f375c5ee105e7f5 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 16 14:19:04 2008 -0400 Remove the numVideoScreens xprintism. This was to account for cases where you had video and print screens in the same server. Lunacy. Leave the slot in ScreenInfo, but rename it, and stop looking at it. commit 1a573e402ec112913a404f092b5b97d8d9210f94 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 16 13:41:53 2008 -0400 Update the Allow*Grabs documentation for xf86misc removal. The API to turn the grab-break keys back off is gone now, so don't say it exists. commit 55644d2f1cddf1777587f213ed581b6087d9fdad Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 14:23:34 2008 +0300 Make --enable-debug usable again Enable region debugging causes assertion failures (should really look into that, though), and I don't need four messages every time I move my pointer. commit 22e64108ec63ba77779891f8df237913ef9ca731 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 06:25:26 2008 +0300 XFree86: Remove XFree86-Misc extension Its last remaining purpose in life has been destroyed by input properties. Au revoir: it's been fun, by which I mean awful. commit b8dd07f855c555af56cbf0f69df799f424da2cca Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 03:00:25 2008 +0300 HAL: Remove grotesque open-coded strcasestr Not only was this pretty ugly, but it didn't even work on systems without strcasestr anyway, due to the define not being in dix-config.h. Lack of strcasestr is handled transparently with the version from FreeBSD now anyway, so, huzzah. commit ad87c72edcc0d1f56658e0c4e73af335c8d5a516 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 02:59:51 2008 +0300 DIX: Add strcasestr from FreeBSD Add strcasestr for use on systems which don't have it. commit c3c901cf44cf16bb33c4176494361b429099a372 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 02:54:41 2008 +0300 configure.ac: Fix SHA1 handling Fix and marginally simplify the SHA1 handling. First, we allow people to override it. Secondly, we try for libmd. Then, we try for OpenSSL with pkg-config. In a last, desperate move, we try libcrypto on its own. This allows the server to, y'know, _link_ when using OpenSSL, instead of failing because we only have -lcrypto, and not -lssl. commit 69b57dc651e12a0d9a5a4295b185c62d5c0df63f Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 02:03:36 2008 +0300 dix: Actually build str(n)casecmp if we don't have it Remember to add stuff to dix-config.h when you add new AC_DEFINES, people ... commit dcf6293030126509d7d6c61d131222037d5ed7db Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 01:57:00 2008 +0300 strcasecmp: Actually use the right license Forgot to update the license when I committed the FreeBSD version, so it still had an old SGI license. Sorry. Sorry. commit 441f084bfe87a6ea1c94ec63f82888b8b3d81d89 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 2 19:52:58 2008 +0300 config: Don't attempt to use D-Bus when not strictly necessary If we have D-Bus but have explicitly disabled it, don't build it. commit 35c89f3f5b8fa222e37b799d5bb01595e8f30d0c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 16 01:43:58 2008 +0300 XFree86: Remove mysticism from Makefile.am The variables were always the same, so just shove them in with the rest of the plebs. commit b89a59248a4a0ff06b9a0ddee45881efc6063063 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 27 12:20:56 2008 +0300 XFree86: Delete OSMouse code This should be moved into the mouse driver, if anything. commit d0de5ea96d084fc5da87d8f323ddfc08fe9c03ba Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 25 17:56:28 2008 +0300 XFree86: Remove useless debugging code Also remove documentation which told you how to use a non-module-aware GDB, albeit only with old, non-shared, modules. commit 4b1273c9c2da113f634be80caa28e81df3beae98 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 25 17:51:12 2008 +0300 XFree86: Delete empty file & function xf86InitXkb() has been empty for as long as I can remember. commit 3a54f3f48fa1c0d60604c3ee767c569b5ec23430 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 12 01:05:04 2008 +0300 XFree86: Clean up init a tiny bit (no code changes) Reshuffle and delete. commit ddcefb50dda9e398647d1c84c7153127ed26a4d2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 11 15:14:26 2008 +0300 XFree86: Remove trailing whitespace commit e6f35f28fb3526b911101bde4aa761de8b055aef Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 11 15:13:21 2008 +0300 OS/KDrive/XFree86: Sanitise colour initialisation OsInitColors always just returned TRUE, so just remove calls to it and insane special-case logic. Remove unused kcolor.c implementation, and merge oscolor.h into oscolor.c since it was the only user. Remove open-coded strncasecmp in oscolor.c. Since we no longer need to call OsInitColors after reading the config file, just call PostConfigInit() from one place, and move PM handling to one place so we can install the signal handlers earlier. commit 11f9e3520249a603b95e64503ee759998ff17feb Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 11 15:09:46 2008 +0300 DIX: Add strncasecmp from FreeBSD, make strcasecmp args const Add strncasecmp (as we're now using it) in case someone doesn't have it, and also change strncasecmp args to be const, in accordance with everything else. commit ae38151ddda9984effca5bb7c582540061201dce Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 19 08:35:05 2008 +0300 configure.ac: Add GLX_SYS_LIBS for Xvfb and Xnest This fixes the linking for these two when using DRI2, which requires DLOPEN_LIBS. commit ccec16e519c143f4c0017a37e93ebc52ac472e4e Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 15 11:24:08 2008 -0400 Bug #7300: Move xf86RAC to hw/xfree86/common commit 9111944b292355f7478b4ae75bead8dc25edbbcb Author: Julien Cristau <jcristau@debian.org> Date: Tue Jul 15 10:36:38 2008 -0400 Bug #16674: Make sure RANDR reports refresh as 0 if pixel clock is 0. commit 3f3f66de669caf3606eec8c5f8d405a283cbf12d Author: Brad Smith <brad@comstyle.com> Date: Mon Jul 14 22:20:41 2008 +0200 Fix the configure tests for swap16/__swap16 macros on OpenBSD. BSD systems need <sys/types.h> included before <sys/endian.h> for macros to work. <https://bugs.freedesktop.org/show_bug.cgi?id=16531> commit 11ee0ae9390a608a232ff94abcc0cbcf9ed7b70a Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 14 10:20:11 2008 +0930 xfree86: append, not prepent, new input devices to xf86InputDevs. If devices are prepended to the list, their wake-up order on resume is not the same as the original initialisation order. Hot-plugged devices, originally inited last, are re-enabled before the xorg.conf devices and in some cases may steal the device files. Result: we have different devices before and after suspend/resume. RedHat Bug 439386 <https://bugzilla.redhat.com/show_bug.cgi?id=439386> commit 5bcc45e07e8726a5442567472dd29cfb5c901f2d Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jul 13 18:40:53 2008 +0930 Xi: expose Enable/DisableDevice through XI_PROP_ENABLED property. commit c9eb0e870c87d291311491452adf7f91a911e24b Author: Simon Thum <simon.thum@gmx.de> Date: Thu Jul 10 22:33:39 2008 +0930 Add support for multiple pointer acceleration schemes. #8583 Available acceleration schemes: - xorg classic scheme. - the new "Predictable" polynomial accel scheme. X.Org Bug 8583 <http://bugs.freedesktop.org/show_bug.cgi?id=8583> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e7abe1676a6a4e4249504b8c9660cbad70569199 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jul 13 18:41:53 2008 +0930 Xi: protect against NULL handlers, don't try to dereference. commit 2bbb12c355308d10bf123911044fbdf6ae7fb59c Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Sun Jul 13 20:23:14 2008 +0930 Xi: remove ChangeDeviceControl for CoreCtl. If you want to set a device to core, attach it to a master device. commit 18ff17756c988b6c21b76bf898e45685649d07bb Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 10 19:23:14 2008 +0930 Xi: GetDeviceProperty reply includes deviceid. commit c3267106fb599213555829cb76df7848c4ebe23b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jul 9 10:02:41 2008 -0700 XQuartz: Use CFEqual to compare keyboards (cherry picked from commit 5538e43b9ae7d06d2f48842b065810ce74286eb6) commit 90dd2de845ae12153296f6f1bff0c87f79c57854 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Jul 7 10:55:58 2008 -0700 XQuartz: Some fd handoff cleanup. (cherry picked from commit 9c20a4804d97e67a988f00f49866997209cce518) commit 26d8030c3836816de8c12b2cb9d67315e5c887eb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Jul 4 19:23:21 2008 -0700 XQuartz: Remove deprecated keyboard code. (cherry picked from commit 69cfc1a21e12bb38a6130dea2e5f20f1e6a3ee7c) commit 5cfcbd54d98cc77ee02a3a099ebbad9af511a0ee Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jul 2 00:47:08 2008 -0700 Set machine dependent defaults for ppc64 (cherry picked from commit 0733ef2e8abda99cfd62966e73017949e9cd507f) commit e69b9f9ca45c0c6bfb93ea9143737116bf1f2453 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 25 11:51:27 2008 -0700 XQuartz: Set noPanoramixExtension earlier to avoid a possible race. (cherry picked from commit 49668e8a88137e9f258eae970826883b88b7d8ba) commit 8d2e2e1d856efec4459de2a20af642dc1ec9b8a5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 11 11:44:45 2008 -0700 Xquartz: Removed include directive for removed header (cherry picked from commit e65a36d57f338410c5a5b02cb5ae1214a81d072d) commit ebd70c82fdbe483d149ac9bdb5a64cc6e0c10e0a Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 10 14:38:34 2008 -0700 Add LoaderShouldIgnoreABI to allow drivers that roll their own ABI checks (i.e. nvidia) to perform the check before ScreenInit. commit c42427f63f0e0495e56909ee99ad1e3c4321c39b Author: Ander Conselvan de Oliveira <ander@mandriva.com.br> Date: Wed Jul 9 10:50:21 2008 -0300 Fix incorrect test regarding keyboard map. In the map stored in each keyboard device, the first line refers to minimum keycode, i.e., the 0th line refers to keycode 8. When not using XKB the wrong test caused some keys to be interpreted as locks ('m' for instance). The had to be pressed twice to generate both KeyPress and KeyRelease events. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit e4054e5cb3d919dfc83021be3f2b9036d0e5a2be Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 10 11:03:31 2008 +0930 Xi: pack the property stuff into a struct, make handlers a linked list. We may need more than one handler to deal with a property (e.g. one in the driver, one in the DIX), so get the handlers into a linked list and call them one-by-one. This is of course slightly less entertaining than the hilarious WRAP/UNWRAP game we play in other parts of the server. XIRegisterPropertyHandler/XIUnregisterPropertyHandler are the interface drivers/the DIX should use to attach themselves to the device. XIDeleteAllDeviceProperties destroys everything, including the handlers. commit 2039c6ea43244339659323d05d96c14e41996c20 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 7 22:10:17 2008 +0930 Xi: add support for input device properties. Basically just copied from randr properties, with minor changes only. Each device supports arbitrary properties that can be modified by clients. Modifications to the properties are passed to the driver (if applicable) and can then affect the configuration of the device. Note that device properties are limited to a specific device. A property set on a slave device does not migrate to the master. commit 4ab01fe5db7fb330b1ec463aa49b77859527e597 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Thu Jul 10 16:27:36 2008 +0930 Revert "Xi: add support for input device properties." Note to self: don't mix up branches with half-finished cherrypicks. This reverts commit 666838fcc8b71fdeae160844160187f345cbf4a6. commit 666838fcc8b71fdeae160844160187f345cbf4a6 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Mon Jul 7 22:10:17 2008 +0930 Xi: add support for input device properties. Basically just copied from randr properties, with minor changes only. Each device supports arbitrary properties that can be modified by clients. Modifications to the properties are passed to the driver (if applicable) and can then affect the configuration of the device. Note that device properties are limited to a specific device. A property set on a slave device does not migrate to the master. commit acce27093571497a0626cee1cdb61ddf751dbc40 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 8 16:02:13 2008 +0930 Xext: store the GenericMasks in the resource system. This fixes a severe issue - when the client died the event mask didn't get unregistered and a future event would dereference dangling pointers. By storing the event masks in the resource system we can free them when the client dies. commit db86b8839f286e0e2efb5638b8ab2fe608707655 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 8 15:12:45 2008 +0930 dix: free GenericMask allocations when destroying window. commit 08e2c625f620688d35f3b443ffb878e8e991ff57 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jul 9 20:07:59 2008 -0700 Remove README.font, since it's just an old text copy of xorg-docs/sgml/fonts commit 5e847c1d4fc30a0d263a861a76982660f11998cd Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jul 7 17:08:01 2008 -0700 Improved driver selection when autoconfiguring driver without xorg.conf - Allow returning multiple drivers to try for a given PCI id (for instance, try "geode" then "amd" for AMD Geode hardware) - On Solaris, use VIS_GETIDENTIFIER ioctl as well as PCI id to choose drivers - Use wsfb instead of fbdev as a fallback on non-Linux SPARC platforms commit 235fea0e1a2101fb76a54e6505db321674530c60 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jul 7 15:21:59 2008 -0700 Update bsd & solaris descriptions in README.OS-lib commit d8af9d9ab1cd98c07fdf42490dcc0cab3c655b89 Author: Julien Cristau <jcristau@debian.org> Date: Mon Jul 7 13:14:49 2008 +0200 Export xkbfile.h in the SDK It's needed by xkbsrv.h commit d78bebb20a00e8519788c75c90b467a5750c78be Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 04:04:19 2008 -0300 Remove unused function and variables. commit a8c4727f01949da0ae266369f0d12a96c2bf0da5 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 04:03:46 2008 -0300 Fix typo in the last commit. commit 3164288b121990a5990747c0f92d4af13b1c929a Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 03:55:59 2008 -0300 Remove deprecated function miPointerPosition(). commit d1031a8972490ebf0ef6dc2762036a7a7172466b Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 03:46:21 2008 -0300 Update README.OS-lib to reflect reality. commit f72500c4a09cce5dbbd16639b1951a4bf943e4ac Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 03:45:18 2008 -0300 Nuke libc wrapper remaining stuffs. commit 3fd5fab5663fbdce2fc0b5377155aedf9a70b6c2 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Fri Jul 4 02:51:42 2008 -0300 Remove inexistent function headers. commit 0b9ef835a0fe900c121b84e43989591e58ab1126 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jul 4 07:29:32 2008 +1000 modes: fix initial xorg.conf mode selection. This was all kinds of broken, we ignored user preferred modes for multiple monitors and also for side-by-side configurations. commit e317943c125d7fdbe62c750324640eb30c88fa15 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Wed Jul 2 12:23:03 2008 +0930 xfree86: AllowEmptyInput is now enabled by default if hotplugging is enabled. Remove AEI check from configImpliedLayout as the setting isn't actually parsed at this point anyway (written by Sasha Hlusiak). Resurrect checkInput() and check for devices there if AEI is false (this also creates the default devices if required). Set AllowEmptyInput to enabled by default if hotplugging is enabled. commit fe5cf7cb00fd926cefff933adbdbceea7353f4c2 Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue Jul 1 13:18:54 2008 +0930 xfree86: handle missing Screen lines in the ServerLayout #16301 If no Screen is specified in the ServerLayout section, either take the first one from the config file or autogenerate a default screen. X.Org Bug 16301 <http://bugs.freedesktop.org/show_bug.cgi?id=16301> commit 6674b87a7dca7d6ffd9dd9af888c5256b13d7877 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 29 20:05:27 2008 +0930 xfree86: move declaration of configured_device to start of function. Last I checked C doesn't allow declarations halfway down a block. commit 1e96782011f0b4ba6ed1d3d3df118964a58d15fd Author: Dave Airlie <airlied@linux.ie> Date: Thu Jul 3 20:00:22 2008 +1000 dri2: bump libdrm numbers as 2.3.1 is released without ttm interface commit 1771edcb44b564f83f509748b4e4cd5b7586e2a8 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jul 3 18:57:09 2008 +1000 modes: check the crtc is valid before using its desired modes. this fixes a crash I was getting on radeon rotate when gnome is running. I'm sure g-s-d was doing something bad, but really not crashing ftw. commit 689292e58cc5242cbfeaa29fcf65b6dcd9dfabb9 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jul 2 11:25:50 2008 -0400 Fix GLX in Xvfb and kdrive. commit 9a73bca859be12721ef62304b1422c455d4aec49 Author: Chris Ball <cjb@laptop.org> Date: Wed Jul 2 09:46:06 2008 -0400 Remove KdOffscreenMarkUsed() as all its callers are gone. commit b84a27fd9fdcb579437cfa38f10cb12cf55dc7c3 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jul 2 06:25:03 2008 -0700 VBO: Regenerate files based on recent changes to gl_API.xml Since GL_ARB_vertex_buffer_object protocol isn't supported yet, these changes are innocuous. commit 703a9645f3d547144ea62dd81c41f5356a5f87d8 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 1 17:50:48 2008 -0400 Auf wiedersehen, KAA. commit c8216aede6c4ac41976947521d884fa010913204 Author: Jeremy Uejio <jeremy.uejio@sun.com> Date: Tue Jul 1 13:37:12 2008 -0700 Sun bug #6685465: Xephyr uses wrong or bad colortable in 8-bit mode <http://bugs.opensolaris.org/view_bug.do?bug_id=6685465> This bug is caused by Xephyr not handling the RGB byte order correctly of the server where Xephyr is displaying on. The previous code just assumed that the order was RGB and did not take into account that Xservers may use different order (such as BGR). The fix is to add a function to calculate the byte order and bits to shift based on the visual mask and the visual bits_per_rgb (which is usually 8, but could be server dependent). Since the shifts won't change once the display connection has been made, I can cache these values so that Xephyr doesn't have to keep recalculating them everytime it tries to translate the Xephyr colormap entries for Xephyr clients to the actual server colormap entries (i.e. calling the function hostx_set_cmap_entry() repeatedly for every colormap entry). commit 2e8daee05343b2853b677acf4554def0ceeada00 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Jun 30 17:29:35 2008 -0700 Work around the DIX losing mmWidth/mmHeight for RandR 1.1 DDXen. RandR 1.1 has a physical size for each mode. It used to be that the DIX would remember these modes and pass them back up to the DDX when changing the screen configuration. The DDX uses RR_GET_MODE_MM to query the driver for the physical dimensions of the screen, allowing it to preserve the DPI. With RandR 1.2, the physical dimensions are stored as part of the output, rather than per mode. The DIX only uses the sizes passed in from the DDX to select the mode pool for the "default" output, and forgets the physical sizes. Then, when reconfiguring the screen, it makes up a new RRScreenSizeRec using the dimensions from the output, screwing up the DPI. This change works around this problem by ignoring the DIX and querying the real size from the driver. commit e2bbf2d248a2d2a2db4adfe9d1bda94cf184d8bd Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 1 12:01:56 2008 -0400 Don't try to load DRI2 if built without it. commit 66d7c9de82b5e733e4995f079a96efe612fca881 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jul 1 10:55:54 2008 -0400 Declare xf86InterpretEEDID() properly. commit e4335e876d254e446a965259e845ad955da5b5c2 Author: root <root@samich.home.cworth.org> Date: Mon Jun 30 15:29:04 2008 -0700 Revert "XInput ABI is 2.1, not 3.1." This reverts commit 76576c87b0de106e006d1cfa59d42d3a483e966c. which was an incorrect revert of previous ABI bumps. Those responsible for the accidental ABI bumps in both directions have all been sacked. This allows xf86-input-mouse to build again, for example. commit 6447f80c17077f924b2d58e07b38d32429edcb9b Author: Carl Worth <cworth@samich.home.cworth.org> Date: Mon Jun 30 13:16:49 2008 -0700 Use AC_CHECK_LIB before PKG_CHECK_MODULES for openssl Previously, the code was using PKG_CHECK_EXISTS before PKG_CHECK_MODULES, (to cater to OpenBSD systems that include openssl by default but without a .pc file). But this meant that systems that didn't have openssl installed at all would not get any error message at configure time. Now, if the SHA1_Init function is found in -lcrypto without any additional flags, then that's used. Otherwise, pkg-config is used to find the right flags to link against libcrypto. And if that fails, a nice error message is now generated. commit 76576c87b0de106e006d1cfa59d42d3a483e966c Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 30 16:10:37 2008 -0400 XInput ABI is 2.1, not 3.1. commit bed12dd3df0129b7f28d0a42d470266bd3ae6b38 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jun 21 16:07:54 2008 -0400 Do EEDID in RANDR 1.2. commit 4fc18b5fc31aa287e807ee520dc9117296e3d306 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jun 21 16:07:36 2008 -0400 Hexdump the whole EDID block if extensions present. commit b4fbc31e109f1efe78613597f9a91d5363523493 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jun 21 16:00:05 2008 -0400 Actually fetch all blocks of EEDID if asked to. commit 9c4c323d50bd8b369e82a1dff28abdc15a219a5e Author: Thomas Hellstrom <thomas-at-tungstengraphics.com> Date: Mon Jun 30 18:59:13 2008 +0100 Avoid an EXA init segfault. Don't allocate each VRAM buffer with a 16MB alignment. commit 211e2bdcc677122145998829a7f26610c7c567e6 Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 30 10:29:17 2008 -0400 Bump ABI minor numbers for the devPrivate ABI functions. commit d6b8d9eaffaf3f976db330bc35da3d30eb656bac Author: Dan Nicholson <dbn.lists@gmail.com> Date: Fri Jun 27 17:16:35 2008 -0700 DRI: Ensure we have the DRI headers from Mesa Change the DRI configure check to look for the dri pkg-config file. This prevents people who built an Xlib libGL from bombing later in the build. commit 7ddfb2f1587da3ec1cd27ae270e42700adf4f560 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 26 21:23:31 2008 -0400 Fix a leak of window devPrivates in window.c/CrushTree(). commit a65888d6785934a669ad3b822bf2d636db351858 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Fri Jun 27 17:32:28 2008 +0100 fixes for gallium stride changes commit e0c43fff3208350995c45604624dd4825f40598c Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Fri Jun 27 09:46:24 2008 +0100 More error checking commit 387ec961f2a5e791fd010906a5115cf8393471f3 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 23:34:51 2008 +0100 add --with-gallium-dir to specify location of gallium tree commit 410b0a4254ca48548b443c1e8fbbcf7a6b9aa862 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:49:33 2008 +0100 NULL checks commit 621fa337fb53d535f53cec30bb7161801001bb7f Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:47:20 2008 +0100 Fix copy surface commit ccd0c76472a7d8a85aed0ea6fea4011109f305d6 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:27:44 2008 +0100 Add EXA winsys for gallium pipe driver interface. Plug in the EXA framework into the pipe driver for surface_copy & surface_fill. Back pixmaps with drmBO's including the front buffer. commit 0e1aa03708d95cc1542bee31709a345d0f748f0c Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:27:14 2008 +0100 yet more commit 2b3a3bc9202f4e6f9886a08a4dfa597a83a5e933 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:26:16 2008 +0100 more formatting fixes commit 2a45c28712a544c6f1c3eb753678ba1738cfdd67 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Jun 26 22:25:17 2008 +0100 formatting fixes commit 15e4b6c57484b6afb790c7dc1db9f529ba2219cf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 24 13:46:40 2008 +0930 input: for non-device events (e.g. DevicePresence) use MAX_DEVICES as id. Using id = 0 only worked pre-MPX since XInput didn't allow XOpenDevice for the core devices (0 and 1). Now we can now legally register for events so we may overwrite our device-independent classes with the ones selected for the VCP. So, increase the EMASKSIZE to MAX_DEVICES + 1 and use MAX_DEVICES as the ID when we don't have a device. commit f0c56ffd980db19bea271aeebf118bd931f6f40d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 24 12:58:49 2008 +0930 dix: don't dereference dev->key if it doesn't exist. This may happen if we check for a passive grab on a floating pointer device. commit 01f0b9c9784c55c94104bafa6dd545b373c64104 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 25 19:23:20 2008 -0700 xf86GetOptValFreq wants a pointer to double, but maxPixClock is an int commit 7ce6dcef118139d0ccfc136b9a07f5bf0c078d70 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 25 15:06:49 2008 -0700 Don't log null device name in XkbDDXLoadKeymapByNames commit cbc20d92de92aad5ca240310a9156ccf97c24a01 Author: Adam Jackson <ajax@redhat.com> Date: Wed Jun 25 09:52:36 2008 -0400 XTrap delenda est. commit a81b5ce452766bbc4b2ac0849711284ba8591b46 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 25 13:23:09 2008 +0930 dix: free memory associated with the EventList. #16507 Un-deprecates CloseDownEvents. X.Org Bug 16507 <http://bugs.freedesktop.org/show_bug.cgi?id=16507> commit 3a2beb2f867fd47dc5a7723dcac345ea0b0ecf3d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 25 13:12:41 2008 +0930 dix: InitEventList does not need to be _X_EXPORT. commit 385943e0e97463ce4681a9b6a4a40d7e3c91e51e Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Tue Jun 24 23:13:32 2008 -0300 Set --enable-builtin-fonts as default. Some reasons to embed fonts by default: 1. X server doesn't pick a good default font path so it's easiest just to built in the core fonts and let new X hackers more happy. Developers and distro guys are wise enough to just set --disable-builtin-fonts when they want. 2. Seems that this is by far the most popular FAQ (http://www.x.org/wiki/FAQErrorMessages). 3. No one gave a good argument to not do this: http://lists.freedesktop.org/archives/xorg/2008-May/035479.html commit f3b29efc4d7bb346cdd3fd79e780f1022c8f46e8 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Tue Jun 24 23:07:49 2008 -0300 Remove NOFONTSERVERACCESS macro dix: this is semantically different but it goes through the same path in the code. commit 2ff7eb4995b663cf12a01124745de600f38d0bfc Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Tue Jun 24 22:09:34 2008 -0300 xfree86: kill INHERIT_LOCK_STATE macro. I don't know how this survived so long. Google didn't show anything usable related with this. commit a3ec22627355fc08730ad7e90022e374763d333f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Jun 24 20:32:24 2008 -0400 Fix a leak in the code that parses the protocol names. Also added some comments. Reported by Ben Gamari (bug #16492). commit a4cb25f8c816adc3bdf6a28d5beb558e8be40121 Author: Ben Gamari <bgamari@gmail.com> Date: Tue Jun 24 12:08:35 2008 +0930 dix: free FocusPrivates when deleting a window. #16493 Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> X.Org Bug 16493 <http://bugs.freedesktop.org/show_bug.cgi?id=16493> commit 32a7bbbba6fec0535a8faa1d6d2ecebe786bcc81 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 24 09:28:05 2008 +0930 xfree86: fix up leftover allocation of xf86Events. Thanks to Eamon Walsh for spotting this. commit bcc88a1d46c7ba469c4e2861875f84f8c77d4b15 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 22 22:34:30 2008 +0930 xkb: remove unused variable is_core. commit 9ed9d98dec58d1f7468d02c4b951811b8e1ca7c1 Author: Julien Cristau <jcristau@debian.org> Date: Tue Jun 24 22:36:32 2008 +0200 x86emu: fix build, fallout from 9719354 commit e9b4f3cd856e2401675452c387b4155246239f91 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Jun 23 16:18:20 2008 -0400 Fix "warning: suggest parentheses around && within ||". commit 8910dde96ec4318c9c44fb9717b6b52fad56cd1d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Jun 23 14:51:38 2008 -0400 Fix "warning: assignment discards qualifiers from pointer target type". commit 95d4ede538fbb68049ba3efa0acb0e9712e5cb01 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 20 23:49:32 2008 -0400 Fix "warning: passing argument 1 of `modeIsPresent' from incompatible pointer type". commit fa1545eeda2a7feebc006840a44d390177634231 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 20 23:47:22 2008 -0400 Fix "warning: passing argument 1 of `xf86addNewLoadDirective' from incompatible pointer type". commit 2725ba1fca45e5ba241695e24333d8efab1f862b Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 14:41:32 2008 -0400 Also remove xorgconfig from configure.ac. commit 9719354ae04a41e9834ac9ba8fd9e895092ba4f1 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 14:37:06 2008 -0400 Check for __amd64__, not __x86_64__. Spiritual revert of 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe. Intel's C compiler claims to be gcc-compatible; if they're not defining the same macros as gcc then that's their bug, not ours. Even if we were to do this aliasing we should do it once and for all in servermd.h. commit 249c892784ca5e8c75863dd82097ca2bedec4723 Author: Roland Bär <roland@verifysoft.de> Date: Tue Jun 24 14:13:02 2008 -0400 Bug #11857: Avoid running off the end of a MAXCLIENTS-sized array. commit 9e5b3deafb97ec1f83e6bfe067bc68df7385bc6a Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 14:08:04 2008 -0400 Bug #11842: Fix emulation of int1A PCI BIOS services. Use only %di to name the PCI register to read/write, rather than %edi. DOS is only expecting the base PCI config space anyway, and the BIOS might be using the high bits of %edi. commit d34430414ac0e77eec61ab0ac9ef427b236eb639 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 13:32:55 2008 -0400 Remove xorgconfig. Use X -configure instead. commit 574c62e305e5380bb1b0f4bfec4f7cc3e3f03ada Author: Owen Taylor <otaylor@fishsoup.net> Date: Tue Jun 24 12:40:47 2008 -0400 Bug #15369: Don't reduce Over to Src for transform + RepeatNone. Only do no-src-alpha optimizations for a RepeatNone source if we can easily probe that we won't sample outside the edges of the source. commit 100afae578e59e31b65a6264c281ba7deea5ac39 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 10:52:31 2008 -0400 Bug #15586: (Correctly) refuse to redirect the root window. commit 4c4e06af7950df509fa02099788be66cf37a4d01 Author: Paul Bender <pebender@gmail.com> Date: Tue Jun 24 10:44:47 2008 -0400 Bug #15665: Fix building without Composite. commit 59510a76436c739fd9421f01cc4210607d9e7f57 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jun 24 10:40:36 2008 -0400 Remove some default modes that really shouldn't be in the default set. commit b622f6dc5d8d70d17be0374a85a9b16b43a62a01 Author: Julien Cristau <jcristau@debian.org> Date: Mon Jun 23 23:45:57 2008 +0200 kdrive: fix building with --disable-xv (bug#16488) commit 3b587826924c60f6736dc5faf584b964fde1b4da Author: Jesse Ruffin <jesse@eloquentpeasant.net> Date: Mon Jun 23 14:35:20 2008 -0400 Bug #16302: Fix GLX drawable refcounting in DMX. commit c8d066a15142678041c1d82ccf530dcdb2ea74ca Author: Adam Jackson <ajax@redhat.com> Date: Mon Jun 23 13:59:48 2008 -0400 Implement bswap in x86emu. Yes, this is a 486+ instruction and thus not strictly legal in vm86 mode, but enough BIOSes use it (looking at you VIA) that we might as well implement it. commit b55fbca4f0705aeff1c69d3ef851c5ff5af6ed94 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 20 13:27:32 2008 -0400 Bug #12414: Create full-fledged pixmaps in fb24_32ReformatTile(). ... instead of creating pixmaps that only fb knows about, which will have no devPrivates for any other subsystem and thus cause havoc if (when) they leak out. commit 155fcecb320dbcfb899d6bcd78048ce0993bf28b Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 08:09:33 2008 +0200 Various messages clean-ups. commit 41a65e110409a290288180e8e1517f053f877586 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 06:12:04 2008 +0200 Fix ipc check on OpenBSD commit ce4d4b3c1b0e25f64d6f781b09528b2f3ae33207 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 05:19:01 2008 +0200 build fix commit 19c7e9da55646f1f6e05c28cd71865cd8d84e1ff Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 02:24:17 2008 +0200 preserve errno around the SIGIO handler commit 0a81d476388c51f8aa723400dffc375e112ea97a Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon May 19 02:20:44 2008 +0200 Remove RCS Id. commit c0d7ad9c88172d753b932069743ae65f75de3aa9 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu Jun 19 16:51:18 2008 +0200 Let code build with gcc 2.95 commit 219dd2d44a9da40427ad48b0f09b981fe0551f4b Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun May 18 13:53:32 2008 +0200 sprintf() -> snprintf() commit cfcb3da75e807dec225cc7ea469e04d2db10bf73 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 18 11:37:00 2008 -0700 Make button down state a bitmask. Master buttons track union of slave buttons Mixing usage where some parts of the code treated this field as a bitmask and other parts as an array of card8 was wrong, and as the wire protocol wanted bitmasks, it was less invasive to switch the newer counting code use booleans. Master devices track slave buttons by waiting for all slave buttons to be released before delivering the release event to the client. This also removes the state merging code in DeepCopyDeviceClasses -- that code was changing master device state without delivering any events, violating protocol invariants. The result will be that existing slave button state which does not match the master will not be visible through the master device. Fixing this would require that we synthesize events in this function, which seems like a bad idea. Note that keyboards have the same issue. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 3cc5ae6a4f725483612c00fc8bcc2c61607f66a8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 18 16:14:42 2008 +0930 dix: don't attempt to send Enter/Leave events if we have a keyboard. Dereferencing into dev->valuator could crash the server, although it looks like I could only reproduce this by having a keyboard send an event after it was created and the WM was still replaying. Or so. commit 528b4e36ade482df99747081688ae52cfaeb28eb Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed Jun 18 22:34:02 2008 +0100 Set driverPriv immediately on CreatePixmap. If it's NULL anyway, we bail, if not, it lets ModifyPixmapHeader know about the private. commit 068fa63496c7c363706f0d356b5132bc591c04c6 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jun 18 09:23:09 2008 +0930 dix: fix a crash when the client has a different byteorder. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit d21155a3e9b51df946766926bc6155c8972c4439 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 15 20:00:41 2008 +0930 input: fix up usage of button->down, used to be a bitmask, is now an array. device->button->down used to be a 32-byte bitmask with one bit for each button. This has changed into a 256-byte array, with one byte assigned for each button. Some of the callers were still using this array as a bitmask however, this is fixed with this patch. Thanks to Keith Packard for pointing this out. See also: http://lists.freedesktop.org/archives/xorg/2008-June/036202.html commit 2b9c829bdebd16910bdf48b9d64862e3d34f5b7f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 18 09:55:53 2008 +0930 Xi: don't drop the grab status in XExtendedGrabDevice(). commit 4f3ed54dc9ea7780ff03378b13de0fddfdec2e15 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 17 10:43:36 2008 +0930 mi: remove trailing whitespaces from misprite.c commit 79dd600942bbac3c6b531f284b42c7b2c822da90 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Jun 17 19:09:44 2008 -0400 SELinux: Add an extension alias under the OS-agnostic "Flask" name. commit 656d3d7623c6b83024e9cdc60d1257f4d87aa268 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Jun 17 17:55:11 2008 -0400 SELinux: Bring server-side name registry up to date. commit f3490d3eba94c7d9e760d6d21991ab6677196c2b Author: Ian Romanick <idr@us.ibm.com> Date: Tue Jun 17 10:35:24 2008 -0400 Bug #15169: Make the server build again on Alpha. Still won't work until the kernel makes the resource files actually exist. commit 47969d79289ad92f658c9a6dd2a2fc6b5f1b6c99 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Mon Jun 16 15:07:39 2008 +0100 Add DRI2 support. Add EXA stubs. Currently tested with i915. commit 6a1910a0e562e36e0836e948b287ec37c90df02d Author: Zack Rusin <zack@tungstengraphics.com> Date: Mon Jun 16 00:31:53 2008 -0400 Adding some readme. commit 8c9234a163eceda2abc0a2523e0f5587ea399935 Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 15 10:01:28 2008 +0930 Xi: avoid double button mapping. Button events were mapped once in GetPointerEvents and then again in UpdateDeviceState. While it might make sense to just fix up UpdateDeviceState, it turns out to be better to leave the raw button number in the event because DGA reports raw device events without button translation, and so when it calls UpdateDeviceState, the button down counts get scrambled and buttons get stuck down. See also: http://lists.freedesktop.org/archives/xorg/2008-June/036201.html Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit d894e86aa5bea81147c4a7ad8630bcfb04156792 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 15 10:55:08 2008 +0930 randr: remove superfluous check against uninitialised variable. Thanks to Eamon Walsh for pointing this out. commit 5544c51447f551dfc6df64438873a7ce64743976 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:49:47 2008 -0400 Fix "warning: the address of ‘newTypes’ will always evaluate as ‘true’". commit 2391c409a2840d61fed93832650c0d6c82ebebdf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:48:17 2008 -0400 Fix "warning: unused variable `s'". commit 61dafe384a88fc397d7cd55cb23f4fdc3fb0645c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:47:10 2008 -0400 Fix "warning: unused variable `tsize'". commit 37a64b02df02d42a19d4b777930dc5e457d97d63 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:41:58 2008 -0400 Fix "warning: ‘rc’ may be used uninitialized in this function". commit e90fcd8294fe763c97610d39cab50f2836f87dca Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:26:43 2008 -0400 Fix "warning: no previous prototype for ‘miRROutputGetProperty’". commit 0b00bbca5df140edbfaffab627bd82165f1b1420 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:22:22 2008 -0400 Fix "Warning: no previous prototype for `SecureRPCInit'". commit 1c2f038d69605b0ed1067e47dc75ca6f216991f5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:59:09 2008 -0400 Fix multiple warnings in os/xdmauth.c. commit 384ebe02b354bf1ad0a2ac25e4b5290f2e795ea1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:49:01 2008 -0400 Fix "warning: label ‘done’ defined but not used". commit 720e44f9730b9e275579483c2a34b16bba77e146 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:42:37 2008 -0400 Fix "warning: no previous prototype for ‘XevieExtensionInit’". commit 9d871e19c9dee5d3ee7f123249e8890417d83093 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:35:29 2008 -0400 Fix "warning: unused variable ‘pDev’, `pPointer'". commit 60f64af075e8ac3e63586452f2f3d338a05785f0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:23:31 2008 -0400 Fix "warning: passing argument 1 of 'pixman_fill' from incompatible pointer type". commit c448460fdc23262f2b711a32599090c85c70447a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:05:26 2008 -0400 Fix "warning: pointer targets in assignment differ in signedness". commit 17ed6242e73c5f733601b15732ab30c23acf14d2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:03:17 2008 -0400 Fix "warning: assignment from incompatible pointer type". commit 02a8b118cd07d98f12aab8325d8443125703ba7d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 21:01:50 2008 -0400 Fix "warning: implicit declaration of function ‘miPointerGetScreen’". commit 2d7ba09dc4b5eff5dba8d7867f285111574b1737 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 16:39:40 2008 -0400 Make devPrivates lookup functions ABI instead of static inlines. This is required to preserve compatibility across changes to the internal representation of the privates list. commit 9e0e558f263a132babf8c91d31230831653f19c1 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 13 11:17:49 2008 -0400 Fix unterminated endif. commit 6bbfadb9094bb6437a6825b8293d13a32e041aff Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 13 11:00:50 2008 -0400 ... and stay dead. commit f31bd087e8a7f65cd588bd1d022bb18e72b2a60c Author: Adam Jackson <ajax@redhat.com> Date: Fri Jun 13 10:35:07 2008 -0400 Death to mfb. Anyone still interested in 1 or 4 bpp framebuffers, talk to fb. commit af86c3b7ce705c1711c8cf8bf05a7a02b8afccf6 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat May 24 21:16:34 2008 +0300 clean .gitignore commit 3108980f5e78c129b23ff32f72564cf9a746c693 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Jun 13 15:58:56 2008 +0300 glx: drop unused cleargc commit 23b55a61f89f69454a3b0e3413b1f07d5fdf43aa Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Jun 13 11:13:56 2008 +0200 AIGLX/DRI1: Switch to server context for calling pScreen->GetImage. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16292 . commit d15b3790307053587df8daed1936ff6923881b63 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jun 12 16:00:50 2008 -0400 Remove xgl. This code hasn't been updated with anything even resembling what anyone is shipping in nearly thirty months. It hasn't built out of the box since 7.1. Most of its features over AIGLX are accomplished with DRI2 and friends. commit c37a93b4850866c713e3cbf39a08bbc9645e24d4 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jun 12 14:54:56 2008 +1000 modes: make aspect choosing work on single output case. In the single output enabled case we never enter the loop and test never gets set and so we fail to match a good mode. This was causing my 2560x1600 to end up at 2048x1536. commit 23e71ef71a178505494d4b410f9314acfff81524 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jun 12 09:04:24 2008 +1000 dbe: fix DoS reported by iDefense. This isn't a security problem just a user could DoS themselves for fun or profit. commit 390b155135a451fa728b73c8107aea91dfd56ed1 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 11 18:21:33 2008 -0300 Welcome to hotplug era. `rm -rf xorg.conf` does not imply an error message. Maybe a warning. checkInput() is defined but not used. commit 6e018f6a30dab1259b8fdc1ae4c84056b2acf362 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 11 18:10:55 2008 -0300 No need for inputPending field in xf86Info. commit 881e551de92e5664f92ef1961092e35cd7a77b15 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 11 18:03:33 2008 -0300 CopyGetMasterEvent() can be static. commit 656949cbe24648a5b58f7df6ed49b25af0b47601 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 11 17:57:19 2008 -0300 Remove more unused things. In function ‘miSpriteCloseScreen’: warning: unused variable ‘pDev’ commit 84db8837d0faaac008be61df9f1261cd3028e923 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 11 17:47:00 2008 -0300 Remove unused xf86DeviceCursorUndisplay() function. commit dba5455f06c439c7e7d399f30dc7067e98e6e50b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jun 11 11:41:34 2008 -0400 Un-K&R shm extension. commit 9171206db349a0c6fda719746be0b15049d57aaa Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jun 10 12:23:03 2008 -0600 CVE-2008-2362 - RENDER Extension memory corruption Integer overflows can occur in the code validating the parameters for the SProcRenderCreateLinearGradient, SProcRenderCreateRadialGradient and SProcRenderCreateConicalGradient functions, leading to memory corruption by swapping bytes outside of the intended request parameters. commit 5257a0f83d5f3d80d0cd44dd76d047bac3869592 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jun 10 12:22:30 2008 -0600 CVE-2008-2361 - RENDER Extension crash An integer overflow may occur in the computation of the size of the glyph to be allocated by the ProcRenderCreateCursor() function which will cause less memory to be allocated than expected, leading later to dereferencing un-mapped memory, causing a crash of the X server. commit c5f69b297b1227cb802394fa90efdbe1de607f3c Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jun 10 12:21:26 2008 -0600 CVE-2008-2360 - RENDER Extension heap buffer overflow An integer overflow may occur in the computation of the size of the glyph to be allocated by the AllocateGlyph() function which will cause less memory to be allocated than expected, leading to later heap overflow. commit 063f18ef6d7bf834225ddfd3527e58c078628f5f Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jun 10 12:20:43 2008 -0600 CVE-2008-1379 - MIT-SHM arbitrary memory read An integer overflow in the validation of the parameters of the ShmPutImage() request makes it possible to trigger the copy of arbitrary server memory to a pixmap that can subsequently be read by the client, to read arbitrary parts of the X server memory space. commit 95d162c4389857d960da9b0158345c1714e91f31 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jun 10 12:20:00 2008 -0600 CVE-2008-1377 - RECORD and Security extensions memory corruption Lack of validation of the parameters of the SProcSecurityGenerateAuthorization SProcRecordCreateContext functions makes it possible for a specially crafted request to trigger the swapping of bytes outside the parameter of these requests, causing memory corruption. commit 656d5d98855eb608ec6581f8c574f343a216ea32 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 11 17:32:59 2008 +0930 kdrive: fix wrong use of &, should be | instead. Fallout from 26e7e69ab893d1f2b35213250ada40ec90944f62 commit 6528eb885dea0326aacdd026d44d82ab07f4a4fd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 11 15:01:36 2008 +0930 Xext: init firstValuator to zero, otherwise core XTest events may get lost. commit 6ab311c92d036dc63ee92ab4bb231f5f61ebe69f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 9 11:45:57 2008 +0930 dix: Call RealizeCursor during InitializeSprite. RealizeCursor should be called when the cursor is allocated. However, when the root cursor is allocated, no devices exist yet, and thus RealizeCursor is never called. This may lead to segfaults lateron in DDXes like Xnest that actually need to do something for each cursor, and lateron rely on that DDX-specific data for each cursor has been initialized. commit e083b5a07507d53de0d1d365ef1565346284c997 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 9 11:23:53 2008 +0930 xnest: wrap the xnest cursor sprite funcs around the mi funcs. Modelled after the xfree86 code. Call miDCInitialize to init the SW rendering engine, then take the pointers, store it in a xnest-local variable, and put the xnest-specific sprite funcs in place. In the xnest sprite funcs, call through to the mi sprite funcs after doing xnest-specific stuff. commit ea6a02c048e8589e99ee3b459f3612eb3d041558 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 9 11:22:33 2008 +0930 mi: protect mipointrst.h against multiple includes. commit a3a7c12fcf8e4ac1418f9ea53f76091f309a721b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 23:38:45 2008 +0930 xfree86: Fix up xf86ScaleAxis Some driver still call it, so we might as well work correctly. Always resetting X to the Sxhigh is sub-optimal. commit f8431a62d57ab3118a0b409bce977db8261e2930 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 10 02:15:25 2008 -0700 XQuartz: Under the new startup model, we no longer need to do the foreground/background dance. (cherry picked from commit 4505bae5d7341e1241be50c25cb3d1b941701de4) commit c180a52332385b98635068d63a8fe0bba4835be7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 10 10:47:37 2008 -0700 XQuartz: Removed code path for old startup (cherry picked from commit a9ee6b0d00fab01a78408a85e6542e88c19fda7c) commit 49751fee3b82ebc4917bfb168ec78aad7874f1f1 Author: Roland Scheidegger <sroland@tungstengraphics.com> Date: Tue Jun 10 15:40:48 2008 +0200 glx: copy msaa visual capabilities commit 5170c169db78cad3fe47dee4e438b48e67f0c7d1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 10 01:39:15 2008 -0700 XQuartz: Fixed the "laggy" startup under the new model. This was caused by xinit blocking expecting SIGUSR1 and our stub never sending it. (cherry picked from commit ee92aced10d0743c4658e53b58b5d9f5a094a415) commit 01ace5f3fd56bc789ad7448059fcf907ef19a1c8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 4 18:28:20 2008 -0700 XQuartz: Updated icon with more rsolutions and made it more dark-background friendly (cherry picked from commit d8cf5623faab952a0f1196c8fe10baa09d1fc089) commit 607b0d09ea003f87cfb3331e59e13495a483832a Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Jun 9 09:52:04 2008 -0700 CreateColormap returns Success on success, not TRUE. Fixes a problem where enabling color index overlays disables the RENDER extension. commit 2854abd39d4deb79c9ee9bcc931fad969392cfc5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 23:20:11 2008 +0930 xnest: fix up sprite funcs to stop compiler warnings. commit c68ca0c7b2c72df0501d26bf7f640029ff2d9568 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 23:14:20 2008 +0930 xnest: switch to using EventList rather than xEvents. commit 34429d16d319ef2709c22a5c22f45d0e82c78b20 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 23:08:34 2008 +0930 xnest: call miDCInitialize rather than miPointerInitialize. This unfortunately gives us a lots of artefacts, so cursor rendering cannot be assumed complete. But it's better than crashing. commit a7d4bec884c24c0e1792fd7d6677cdd0a69978e3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 23:03:20 2008 +0930 mi: remove leftover old license comment. commit 585125685b5f09245021c8ee15f57950fe6cdd20 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 8 22:43:47 2008 +0930 ephyr: some whitespace changes. commit 782394fe53220deafed06ad282b5f9ce42964c42 Author: Julien Cristau <jcristau@debian.org> Date: Fri Jun 6 12:10:35 2008 +0200 mi: Fix typo in comments about deprecated functions commit 6b96281100f2118fe9d99536c33d48298a5bce7b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Jun 6 11:01:03 2008 +0200 EXA: Fix exaGetPixmapFirstPixel() crash if the driver has a CreatePixmap hook. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16243 commit d25ffcfbfcfe8e059f2889873c9dbe76a28ad00c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 5 15:29:35 2008 +0930 mi: protect against possible NULL-pointer dereference. commit 874dcdb3bdb9320aae252d3c7927d412685059d5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 5 15:38:48 2008 +0930 dmx: remove a ifndef XINPUT, XINPUT is always defined now. commit 52752911ea8470dd8805f5e6c3febb9e1e1cc4b3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 17:04:16 2008 +0930 dmx: don't free event list after use. commit 5c5e58124581b845a6bfa7a2991a4e0ee7f7ebdb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 16:58:31 2008 +0930 dmx: add an XFlush. Beats me why we need it, but without it we get segfaults lateron. commit 246c10441bbf62646b77993b55233d5ceb93a81f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 16:37:25 2008 +0930 dmx: fix false memory allocation. beNumVisuals and the number of GLX Visuals can be significantly different. commit 17cd26225749a1daf7460b44e52f43082399b265 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 16:05:36 2008 +0930 dmx: don't dereference a nullpointer. commit 75eb635e3543fcb731331d01f50e62b696967667 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 22:25:33 2008 +0930 dmx: add stubs for DeviceCursorInitialize, DeviceCursorCleanup commit 3ff2f3a00ef3c484d1d53569b6cbc1f25dc6bd35 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 22:17:14 2008 +0930 dmx: for now, don't acknowledge SDs. commit 5bcd9e8953dfb5f13e90baeebea1f6eac797644b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 22:01:43 2008 +0930 dmx: learn about the existence of IsXExtensionPointer and IsXExtensionKeyboard commit 8da8a0fec4b1b9d9208635dedb2f449dc99e0004 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 21:59:33 2008 +0930 dmx: claim we support XI 2. We don't really, yet, but at least we get the full device list this way. commit 6f1d5147cb394b7c83c4c1447c78890fa2b40a45 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 21:36:03 2008 +0930 dmx: fix a segfault caused by GC devPrivates never being initalised. commit d10ba4591a599a317093ffcbdd7cece11ab6de26 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 3 21:28:26 2008 +0930 dmx: some more build fixes. commit 8d4d0b47a07a298a20ffae9fefe96c8c7ca9dccc Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Jun 5 09:19:16 2008 +0930 gl: include assert.h if we're compiling with DEBUG. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 8644aa47177bf20f3aa85181032ce75c08270fc5 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu Jun 5 08:55:09 2008 +0930 mi: minor build fix when compiling with debug enabled. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit fbf4b5f16ac23359872361c8c95a617fe8c92292 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 11:10:46 2008 +0930 dix: set dst->mapWidth when allocating a new map. commit ff3adf3e564d94fea18e48f966de40a7ded1279e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 11:10:11 2008 +0930 xkb: reset xkb_cached_map on CloseDownDevices. Could lead to some invalid pointers in the second server generation. commit 40855d8000b9b9f4e6c6b4317542378ecf516345 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 4 12:19:28 2008 -0700 XQuartz: Removed async debugging sleep (cherry picked from commit 7812a8bdf9fab651ea5c07b852b2999547ec628d) commit ee86b751192b690973ee2a1446a406bc721ce8eb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 4 12:01:19 2008 -0700 XQuartz: use a condition variable to signal when darwinEvents is ready rather than polling (cherry picked from commit ff1c443cadf11d12a7d939e51194f6105153870e) commit 38da26cd36957a45b2a47ef124282f7d863a9fd3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 4 11:35:24 2008 -0700 XQuartz: Don't forget to destroy the mutex and cond after we're done with them (cherry picked from commit c3558bb8cd889e5b957190e9f5d23afad1e17b72) commit ea40fcf4344c6e918d3be34354528940b05a70f3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Jun 4 11:18:52 2008 -0700 XQuartz: Fork for trigger (cherry picked from commit dd0f8a0f59593d7831fe09a2a086fcd57c84910e) commit 2393dae6ffff7db8281a7977039450e8754cc19f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Jun 3 00:06:26 2008 -0700 XQuartz: Switched over to new startup path for testing. Cleaned it up a bit. Server still crashes when using the icon to launch =/ (cherry picked from commit 7f840e9dc180421eaa9b0ea3ab993fdd5b2466e5) commit 45b661c67aca1a728f1793dd94d701488f1f196c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 4 13:39:39 2008 +0930 dix: Fix build with --disable-xinerama #16204 X.Org Bug 16204 <http://bugs.freedesktop.org/show_bug.cgi?id=16204> commit cba8b25a7e2608cd093283f86f08fba50a6a62f7 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Mon Jun 2 11:17:47 2008 +0100 Bring inline with current modesetting-101 branch for connector/encoder changes commit 26e7e69ab893d1f2b35213250ada40ec90944f62 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 2 11:04:41 2008 +0930 kdrive: don't post motion event if there was no motion. #16179 Based on the patch by Tomas Janousek. X.Org Bug 16179 <http://bugs.freedesktop.org/show_bug.cgi?id=16179> commit ac1db454497ff1839aa7f7ee0649ede112824ed9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 2 10:40:10 2008 +0930 xfree86: suspend signals while removing a device (corrected version). Block/Release is now symmetrical. commit 95ecaa411aefbcd8e2e00814132cb07b4be4e5bf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 2 10:38:45 2008 +0930 Revert "xfree86: suspend signals while removing a device." Left the signals blocked hanging after removing a master device. This reverts commit 74372fd0049676787904f1f9f80f836b97f5f60e. commit 5ba07cb54803b8c63e25e8ca1f1787860f684612 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Sun Jun 1 18:31:52 2008 -0300 kdrive: changes ephyr API according mpx merge. This fix host-cursor in Xephyr server. Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 5a3d06b8f42473cea3741dc722a775deaa2b73f6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jun 1 15:20:42 2008 +0930 xkb: delete default rules when devices are closed. We only have one set of default rules options in xkb. When the second keyboard is brought up with Xkb options specified, these new options overwrite the old. In future server generations, the rules used for the VCK are a mixture of the default ones and ones previously specified for other keyboards. Simply resetting the xkb default rules to NULL avoids this issue. Reproducable by setting XkbLayout "de" and XkbVariant "nodeadkeys". In the second server generation, the VCK has "us(nodeadkeys)". This again produces a SIGABRT when the first key is hit. I could not figure out why the SIGABRT happens. This patch is avoiding the issue rather than fixing it. commit 5ebe76f13fb6e96cebe5a386024a73eceeb828ff Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 22:13:03 2008 +0930 config: init dev to NULL to shut up a valgrind warning. commit a7ae9cbd78193fdafcafd5d7af1f6fabbb434628 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 20:44:58 2008 +0930 dix: don't read valuators past numAxes. commit f79ad5674ed41c3626e8055cd2bac0135de928c6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 18:46:35 2008 +0930 kdrive: fix up callers to KdQueueEvent, need to pass xEvent, not EventListPtr commit 58d12c99abc4d06cb8b43386d4bcd126f0bedf83 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 18:45:11 2008 +0930 mi: Remove #ifdef XINPUT, kdrive otherwise won't get events. commit 942086fc965fc9a24be2db4f537f0ff54db51083 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 18:17:49 2008 +0930 dix: ProcQueryPointer doesn't need special grab handling, PickPointer does it commit 6cecae0e8651b1fa58b3cd0e0a636db46f56f6a6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 13:12:53 2008 +0930 dix: Remove superfluous comment. This code can handle devices with < 2 valuators now. commit 105d28652d1fb80dd8ce8511e2605dccc8812e99 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 30 15:20:35 2008 +0930 Xext: use GPE/GKE from XTestFakeInput #16145 This commit fixes two problems: 1) XTFI used to assemble the event itself, then passed it to the device. It's much easier to just pass the variables into GPE/GKE and let the DIX do the rest. 2) XTFI would pass the VCP/VCK as default device to event processing. As a result, updating LEDs would be updated on the VCK, not on the actual keyboard. Instead, we now pass the events through the last-used SD, thus toggling the LEDs on the last keyboard that sent through this MD. Also some cleanup in XTFI to merge validity checks a bit closer together rather than having several different sections. This breaks XTestFakeMotion with Xinerama though. X.Org Bug 16145 <http://bugs.freedesktop.org/show_bug.cgi?id=16145> commit 341a61b608873c77b1a17fe7d145ed3ad716e5a3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 12:01:47 2008 +0930 mi: reduce noisyness. DebugF is enough if device ID can't be changed. Also - printing out the event type is actually helpful. commit 62c1a32976d571f3ced1812b8b96ed5a8e658b4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 31 10:24:37 2008 +0930 dix: null out dummyDev, otherwise Xephyr dereferences random pointers. SendEventToAllWindow eventually causes a IsInterferingGrab(), which attempts to dereference dev->deviceGrab.grab. commit 150c2f55a508ed24b230f68e30ec140c0901d9ae Author: Julien Cristau <jcristau@debian.org> Date: Fri May 23 03:09:04 2008 +0200 Add xkbstr.h and xkbsrv.h to sdk_HEADERS commit f9bcecbe51e4cf0cb2d82ad953f8c6741ed5558b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 29 17:42:49 2008 +0930 Xext: only free events in case of core motion events. commit 000ead4503ddcfdf66ce9fffc572a3a741f4055a Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed May 28 19:59:38 2008 +0100 Plug in hardware cursor support commit f9f7a872bf3f8522213aabb291d9d54e56d48c4b Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed May 28 15:55:36 2008 +0100 Run indent commit 106bea5ad1bdd5795d6ed625fc6351a161bffa6e Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed May 28 13:33:07 2008 +0100 Initial commit of new modesetting driver commit 8cf7755a85f5c1e5da7805c12b7511581a368782 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 28 18:05:25 2008 +0930 Require x11proto 7.0.13, xextproto 7.0.4 and inputproto 1.9.99.1 commit 9b544fa40062b342ff3aa75f8f21d0bd4cec80ab Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 28 12:27:07 2008 +0930 mi: ansify. commit 64677f6a167a5bee99e5dfb599a3c3a6fb5dffe7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 27 21:01:26 2008 +0930 xfree86: fix offset error in EDID parsing. #15964 X.Org Bug 15964 <http://bugs.freedesktop.org/show_bug.cgi?id=15964> commit c8af7ce35a900ac9b898f51c1b95dabad3ba1d76 Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Fri May 23 13:50:39 2008 -0300 Correct a NULL pointer deference The problem happens if Monitor/Card combo doesn't provide EDID info, and the XFree86-VidModeExtension extension is used. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 3a1278907ea8059546c7b9ab0c02714832c693e3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 18:01:07 2008 +0930 xfree86: Bump XINPUT ABI to 3.0. commit 0050165a67bb462e0bf644a11644ad9d587c62bb Author: Simon Thum <simon.thum@gmx.de> Date: Mon May 26 17:56:08 2008 +0930 input: change dxremaind, dyremaind to floats for better acceleration #9156 X.Org Bug 9156 <http://bugs.freedesktop.org/show_bug.cgi?id=9156> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 26c1958c322be3ac4dfec9ba2c41c5202bd03709 Merge: 5fe57787f 29586101d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 17:37:31 2008 +0930 Merge branch 'master' into mpx commit 5fe57787faa2ea4f2f57b25455d200bf924206d6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 17:23:34 2008 +0930 dix: store the absolute values in the motion history. The core protocol requires absolute values and it's a bit hard to get them if we only have relative ones in the history. Switch the motion history to absolute, and if we really need the relative values, we can probably generated them from the abs. ones in the future. commit 1883485edd7eb90c0b76bca41c71e26ae2c0b91a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 16:35:23 2008 +0930 If core motion history is required, scale back to screen coords and INT16. commit 0b88510069bdf6d020d73b424f62c2923c0db4a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 13:53:45 2008 +0930 Ensure the motion history is merged for master devices. Add each event to the master's MH as well as to the SDs. In the MD, store min/max and the actual value. When retrieving the MH, rescale all coordinates to the current coordinate range and only post those valuators that are currently active on the device. commit d22c25bda450f6f1dfa634f0f72b32c4bec429cd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 26 09:26:18 2008 +0930 dix: Allocate MD's motion history to be large enough for potential valuators Since we can't predict how many valuators may be in a future SD attached to an MD, we need to preallocate a history buffer that is large enough to keep MAX_VALUATORS coordinates per event. In addition, the history buffer needs to memorize the coordinate ranges at the time, thus requiring MDs to store (min_val, max_val, current_val, time) instead of (current_val, time) for each motion history entry. This commit only fixes the allocation. commit 0877de13ac6ddfb55108aa3456d47f970c6c442c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun May 25 22:49:54 2008 +0930 Remove GetMotionProc from ValuatorClassRec. With the MD/SD device hierarchy we need control over the generation of the motion history as well as the conversion later before posting it to the client. So let's not let the drivers change it. No x.org driver currently uses it anyway, linuxwacom doesn't either so dumping it seems safe enough. commit 00b4339168c10dd4ce026deb8e04bfb63dfd11dc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun May 25 22:34:11 2008 +0930 dmx: remove some #if 0'd code. commit 096117cf023dc92dcadc91677931fc6ad1feb4a0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun May 25 10:38:33 2008 +0930 Xi: reset motion history when swapping device classes. This isn't really the correct solution, but it'll have to do until I figured out how to transfer the history over correctly. commit 29586101dc11d498b212510f8dedbfeca7f8c859 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat May 24 20:01:41 2008 +0200 EXA: Only record damage generated by rendering operations. Recording damage from other operations (e.g. creating a client damage record) may confuse the migration code resulting in corruption. Option "EXAOptimizeMigration" appears safe now, so enable it by default. Also remove it from the manpage, as it should only be necessary on request in the course of bug report diagnostics anymore. commit f6d61d3d86971d6a202b46ff2fab8c8799a4d057 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat May 24 20:01:36 2008 +0200 EXA: Don't migrate twice in exaImageGlyphBlt. exaPrepareAccess already handles migration. commit d73304398255e0c3b03a497a8d4a2f8d900eef44 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat May 24 20:01:31 2008 +0200 EXA: Don't suggest exaCopyDirty be inlined. Leave the decision to the compiler toolchain. commit 3baf3b42e079b4e7b61c1e20df305db0724d21f8 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat May 24 20:01:21 2008 +0200 EXA: Specify region used for source pixmap migration in exaCopyNtoN. Avoids excessive migration overhead in some pathological cases. See http://bugs.freedesktop.org/show_bug.cgi?id=15845 . commit ba557e0263eee0b75847c596f31c71492611b22c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat May 24 17:23:10 2008 +0930 Xi: remove deprecated comment. Axis clipping wouldn't be necessary here, it's already performed in GPE. commit e6cbb1e11e5da1a8b9001853c25f4e5a052e7110 Author: Julien Cristau <jcristau@debian.org> Date: Fri May 23 23:00:40 2008 +0200 xfree86: fix build on GNU/kFreeBSD GNU/kFreeBSD defines __FreeBSD_kernel__, but not __FreeBSD__. Unify preprocessor conditionals between variable declaration and use. Debian bug #482550. commit 6c72961d8fa1ab1543f1b3e2cc7d34ff6d254bf8 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri May 23 22:39:35 2008 +0300 glx: fix memory corruption with r5g6b5 should cherry-pick to xserver-1.5 commit 21a8052fdca2115668dfc747b0b58db437b4eb6d Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri May 23 22:39:09 2008 +0300 glx: fix forgotten swrast -> SWRast commit 877e6c35ff1f0f110627590ac0f12fddf47de506 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri May 23 22:38:36 2008 +0300 glx: missing swrast is fatal commit 1345c93ad4be875951256dae87bc4fd9a1b5e08a Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri May 23 22:38:11 2008 +0300 glx: drop stray glcore.h include commit ae0504d34d245f15b2f098a63ad1a9e1c4daef35 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri May 23 22:40:03 2008 +0300 kdrive: need not export symbols for glx anymore commit 7082929ef7db20b507dce5a8cec043e787d0b55e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 23 02:27:58 2008 -0700 XQuartz: A 2 second delay for launchd socket connections should be sufficient. (cherry picked from commit 2bb4251b3c6b30dbf1a556e1b51e6f03f02d2529) commit 5a388b27a094c71b4214aa744b2ba0fdda7fd607 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 23 02:10:14 2008 -0700 XQuartz: Add the launchd fd to AllSockets as well (cherry picked from commit 83f72529394be5871671d73b6ef4f8bc83708f8a) commit 77b688a73025238ed9fe286a2bae8f78da65fce3 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 23 02:32:28 2008 -0700 XQuartz: Don't need launchd checking in configure.ac anymore since its functionality has been removed from libxtrans and into the mach startup code. (cherry picked from commit 1e1f4fb717d2f3a3227be2a034d28d6a4f29b5d1) commit 225dddbaeded4d64fcc104da538449e5c4dedd2d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 23 01:39:02 2008 -0700 XQuartz: Move the launchd display grabbing into mach_startup (cherry picked from commit c3866c98d23020d2151977ee1177b6054d05832e) commit 3a22190061c7ebefee85564b0def5e1112c07ae8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 19 03:13:09 2008 -0700 XQuartz: Fixed a few issues with fd passing... still not working =( (cherry picked from commit 7dd351271522b475d8017e4bd1618f12817ee2fa) commit 3ae0f4fc832462444d03024c5fbb867f19d5e960 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 15:02:43 2008 +0930 dix: update valuators > 2 as well. master->last.valuator[x] for x > 2 is undefined. For all other devices, it's the respective device's last valuators. If the lastSlave did not have a valuator that is to be updated now, it is reset to 0. commit 0d1b41ace38bc918e2cc2a0a6ad107c76346fd00 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 13:32:33 2008 +0930 Xi: update device valuators based on the event. Event is always absolute, update the device's valuators (always absolute too), and then change the deviceValuator event to reflect the device's reporting mode. commit 7eec1c23a34591064ea64499acb24f22ada08dfa Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 13:23:02 2008 +0930 dix: don't allow relative data in deviceValuators. In GPE, we don't care about the device mode. Let's put the absolute values into the deviceValuator event and worry about relative valuators on the other side of the EQ. commit 75551a2ef949c2cfb53fdc4b97f3964a5e2f45f5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 12:55:50 2008 +0930 Revert "dix: Correct values in the device axisVal are calculated in GPE" We can't rely on GPE to update device->valuators->axisVal. If a SIGIO occurs during event processing this may have incoherent results. This reverts commit f6645ddbf754c80e9a8b1672519534a887622270. commit fe59b1a62b2c7f467d20132db4913317bbf308eb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 12:51:52 2008 +0930 dix: more device scaling insanity. Assuming master->last.valuators is in screen coords, SD's are always in device coordinates. 1. If an event comes in, scale masters->last to the device, drop into device's last->valuators. 2. Apply motion from the actual event 3. Scale back to screen coords, check if we may need to cross screens 4. Drop screen coords into master->last 5. Rescale to device coords, drop into deviceValuator event and SD->last 6. Drop screen coords into ev->root_x/y Whoopee... commit 6c9e9f8a40e20fb1761440acd2755f5fd31f4d44 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 11:51:53 2008 +0930 input: instead of lastx/y, use a last.valuators[] array on the device. During GetPointerEvents (and others), we need to access the last coordinates posted for this device from the driver (not as posted to the client!). Lastx/y is ok if we only have two axes, but with more complex devices we also need to transition between all other axes. ABI break, recompile your input drivers. commit fb146cbb0f28e4e480e5d16d61476ac46b5d00ce Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 23 12:00:13 2008 +0930 dix: coreEvents doesn't have meaning here, use master instead. We mustn't clip x/y if we are attached, otherwise we can't change screens. commit fc1cc0adcb91fdfa4c547bf379a85f9558c959ff Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Fri May 23 00:33:18 2008 +0200 dix: Cleanup of GetPointerEvents Changed all the checks for x&y valuator so the more complex calculation is only made once. Added TODOs for valuator/axis 2 and above for future correct handling of relative reporting of these. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit a0241d5380bb5d8b10865f8ea81a9a011de4aaf1 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Fri May 23 00:36:11 2008 +0200 dix: Correct clipAxis so it can handle devices with value ranges properly Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit f6645ddbf754c80e9a8b1672519534a887622270 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Thu May 22 23:33:45 2008 +0200 dix: Correct values in the device axisVal are calculated in GPE Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 7f85acdf70c67c567de688439e25081be5a7d5df Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 22 23:27:15 2008 +0930 dix: fill valuators with the correct values depending on the device mode (GPE) valuators[] is passed from the DDX. Depending on the device mode, update it with either absolute values or relative values. The deviceValuator event sent to the client will then contain the respective values. commit 1a3f351c50cba66f71a73239318174b09fd9b63b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 22 23:25:20 2008 +0930 dix: when floating a device, create a new cursor sprite. This is essentially necessary to allow calls to miPointerGetSprite etc. to work for floating slave devices. commit e0fbe404a436aef24624a3a15e8405a9ca38aadb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 22 23:24:29 2008 +0930 mi: handle sprite even for floating slave devices. We still don't render it, but we accept all the other calls to update it's internal state. commit 0f15875a271889ae3cc4997ad15f787ea28b3a08 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat May 17 19:24:00 2008 +0200 Make all conversion handling in GPE. This isn't quite finished yet, but at least it gives us the ability to use a tablet as a normal mouse - with all the scaling in place. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 74372fd0049676787904f1f9f80f836b97f5f60e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 22 18:02:10 2008 +0930 xfree86: suspend signals while removing a device. Getting a keyboard event while halfway through freeing memory can be unpleasant. commit 30e9a33f7d1972dcf1c29c7455b2cea4e5857913 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 22 16:00:21 2008 +0930 xkb: fix crash caused by uninitialised variable. commit e837244947fbb18192e9056c070ce439ef24d1a3 Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed May 21 16:14:55 2008 -0700 Actually enable building GLX without Mesa source commit ea4ec9e9983e25d94a3edf8a77ed2ad1db193284 Author: Dave Airlie <airlied@redhat.com> Date: Tue May 20 13:59:09 2008 +1000 int10: add pci_device_enable support on Linux commit 4230b92744d54528f48ddc3b096a265b488053c9 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 17:58:15 2008 -0400 Clean up remaining afb references. commit 20ea99c655140e101f2d20cfab78fb22765fec62 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 21 17:03:25 2008 -0400 Death to afb. Planar framebuffer people, please talk to wfb for all your 1988 hardware needs. commit c76fddeea28b4f88db97a2a3487d7a57cd9d578c Author: Dan Nicholson <dbn.lists@gmail.com> Date: Wed May 21 10:51:15 2008 -0700 Fix up paths for GL/glx -> glx renaming commit c3eb5b80d8cc7ca6a425ccf359718d1ef3d5af55 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 13:33:36 2008 -0400 Move GL/glx on level up now that it's the only thing left under GL. commit a8a9b40e554dd0c184866978889a39519afc466a Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 12:34:07 2008 -0400 Move the windows GL files to the xwin DDX. commit e5aad4bc087036489e2af576628aa9b612054a6e Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 11:44:12 2008 -0400 Get out of the mesa symlinking business. This copies over the files generated from mesa/src/mesa/glapi. There's a corresponding mesa commit that makes it easy to generate the glapi files straight into the xserver tree when the XML definitions change. The only few files that are copied from mesa but aren't generated are glapi.[ch] and glthread.[ch]. Everything in there is technically DRI driver API and the whole setup is still a bit fragile, but it's not a new problem. The --with-mesa-source configure option is still around since other parts of the server (XGL and DMX - grep for MESA_SOURCE) need that, but for common case of building with GLX and AIGLX support, that option is no longer needed. commit f558c7d4d1d87affe1ce4aec2e62ff64545f2bc8 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 10:18:16 2008 -0400 Use LD_EXPORT_SYMBOLS_FLAG when linking Xnest. commit 77ff8fd5072fa57158463bfd84656389eeb7b503 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 21 10:17:53 2008 -0400 Drop glcore GLX provider. Obsoleted by the DRI swrast driver. commit 61eaef22359ae2abcee7dcd73ee8610a83776fc7 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue May 20 16:56:27 2008 -0400 Stop symlinking glcontextmodes.[ch] from mesa. commit 88f43e5d06fb5543bc40ca060b2c5d8e2673afad Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed May 21 18:13:47 2008 +0300 glx: drop drm.h, sareaHandle from swrast loader commit 255142b61eb73843b16c2afdb95aa4d1f27e4f0d Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Jan 3 17:53:56 2008 +0200 drop xprint remnants: InitGlobals commit 641ce9c706ce3cbf726fb3fc9623161bb96ba127 Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Jan 3 17:28:04 2008 +0200 drop xprint remnants: xpstubs commit 5c5a1eaf68eb11053fd5b99d24eb8024b6d5b218 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 21 21:51:27 2008 +0930 Replace UniSA with full Uni name in Author affiliation. Big boss says UniSA isn't unique enough. Who am I to argue? commit 7509fb498c02fe1cebe4139612b8871ec877c130 Merge: 2ae3bed33 dfb7de657 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 21 16:25:35 2008 +0930 Merge branch 'hwcursor' into mpx commit 2ae3bed33731d800bb28a968e3a1c8066d179740 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 21 15:51:35 2008 +0930 mi: shut up compiler warning (return w/o a value) commit 8b3d26f5b6caff1766669deb0e2100d2dee3f185 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue May 20 12:39:28 2008 -0700 Short-circuit PanoramiXTranslateVisualID after verifying that the visual actually exists first. This allows using PanoramiXTranslateVisualID to test whether a given visual made it through PanoramiXVisualConsolidate. commit 6ff6465931c397f72db27a4fd0ca0dcac0609537 Author: George Sapountzis <gsap7@yahoo.gr> Date: Tue May 20 16:36:22 2008 -0400 Add loader for the swrast dri driver. commit 4056595fc77c20052e226b402e38a2a914dca123 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 20 18:57:31 2008 +0930 xkb: remove superfluous checks in if statement. commit 925e895b869e461a9e7f135891463c56ee633cd6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon May 19 18:43:29 2008 -0700 Restore return type on xf86SetScrnInfoModes Seems to have been accidentally lost by commit 76943fec860315f3c93539e59a59080b8a7b3e75 commit 7a550cefd9417c22a4397ea4d103ddc347ab1a0f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 20 11:07:39 2008 +0930 dix: shut up two compiler warnings. commit f9edecd1b53a2e234def9cbd954a47c4bda2bebc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 20 11:07:17 2008 +0930 mi: sync declaration and definition of mieqResizeEvents. commit e73a03d589b47ac9131f3932da7f78d2fef7bfb5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 20 10:54:32 2008 +0930 fb: shut up two compiler warnings. commit 99d28c3ef37aeffe7d8ec41e45a650ba248c6958 Merge: fc7e2566c 0178b6a4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 20 10:20:14 2008 +0930 Merge branch 'master' into mpx Conflicts: Xext/xprint.c (removed in master) config/hal.c dix/main.c hw/kdrive/ati/ati_cursor.c (removed in master) hw/kdrive/i810/i810_cursor.c (removed in master) hw/xprint/ddxInit.c (removed in master) xkb/ddxLoad.c commit 0178b6a4abed0df3e90ba393709ed566105e7c2c Author: Adam Jackson <ajax@redhat.com> Date: Mon May 19 11:22:19 2008 -0400 Fix reduced-blanking mode filtering in RANDR 1.2. If the monitor isn't reduced-blanking (either through EDID logic, or config file setting), then remove RB modes from the default pool. Any RB modes from the driver and config file pools will stick around though; you asked for them, you got them. commit bb687465d0c5aef3cc1c865e6ea67c01a8b417fb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 19 02:45:47 2008 -0700 XQuartz: First stab at SCM_RIGHTS passing the $DISPLAY launchd fd from the stub to server (cherry picked from commit cccee9cfc29f85cca635df3b8dd54199b45c4df8) commit 4b69d22bcb79210225379da2cefb0cd8d5ffa10e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun May 18 23:51:06 2008 -0700 XQuartz: Fixed dropped code in the !XKB blocks, disable XKB support until we figure out a solution for xkeyboard-config (cherry picked from commit 2a72309c061f7060480d150791019ce232481462) commit e997df8cd3c4222ea9fc3f0ebda728c4d1f15df5 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun May 18 23:31:41 2008 -0700 XQuartz: Cleaned up ListenOnOpenFD... (cherry picked from commit 6fb587d3d5fbbaee9e46cdce24d03e5d1c66d58a) commit 738672858d9399ecbc170500c15f90bf657502d2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun May 18 23:02:12 2008 -0700 New XQuartz icon thanks to Simone Karin Lehmann (cherry picked from commit c27e0c8f3c5108192362735db8a80bf3a9a1cc3a) commit 4be2104c801340075e030d06d24ceb4d8a6d6549 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 15 12:26:32 2008 -0700 XQuartz: More work towards Mach-IPC startup... started working on FD passing (cherry picked from commit 27fbfeacfa16d620801ac3492b25c1e50aec8588) commit 82c4075d4ba3bea03341c80b754b0f9d2f62a826 Author: Julien Cristau <jcristau@debian.org> Date: Mon May 19 03:15:11 2008 +0200 xfree86: fix initial output positions with Above or LeftOf and rotation The fix in fa19e84714aa84a2f2e817e363d6440349d0b619 was incomplete, as it was still using the wrong output's initial rotation to compute the position. commit 7dca84f3ee7265119fb81d598d7d2f7363e25f1f Author: Dave Airlie <airlied@redhat.com> Date: Mon May 19 11:16:08 2008 +1000 cursor: don't dereference NULL pointer is devPrivates not yet set. This fixes a bug on server recycle with ati zaphod. commit 5af5db5033582a84b616d5c50f4288adb0210459 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat May 17 14:51:09 2008 -0700 XQuartz: Ok, pass XQUARTZ_USE_XKB since it breaks worse without it... but we have issues when we have the keyboard configs installed... need to figure out what to do there... (cherry picked from commit 301262b07024ad960f22d99a1267fe137f5c3fce) commit 2408303d79297385063cae557195bd5fd3698478 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat May 17 14:56:53 2008 -0700 XQuartz: Added functionality to add a file descriptor to the connection list after the server is already running. (cherry picked from commit 543c2cd68d1ffef65d4644b860faad7191c6b9da) commit 01612fe612aa27262fc3c8167f52e0376941f1ef Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 15 07:08:21 2008 -0700 XQuartz: Disable xkb since it doesn't work after getting xkeyboard-config installed Need to setup configs for the quartz keyboard (cherry picked from commit c28fecc621b1803a4d4536afbc724d141de9e6ee) commit 1d09deaa6e5a75420ea4f24f6b5533f0ebc3ba28 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 15 05:49:43 2008 -0700 XQuartz: Made DarwinSendDDXEvent a little more robust to context switching diring server init. (cherry picked from commit 5626b0949b1a6bdd2fa3ec2ef53a688084349b87) commit adc62f62b9f08aa6633718989ab61b61e3c1e8e2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed May 14 01:33:43 2008 -0700 Xquartz: Xquartz stub now can send Mach IPC to start the server. (cherry picked from commit 55a3bca8ea42f8677897f94bf0a429bdc08c6696) commit 93c082a060bfa8d2a204c0c57ec3507a8edea087 Author: Brad Smith <brad@comstyle.com> Date: Sat May 17 13:14:31 2008 +0200 OpenBSD doesn't define __x86_64__, simplify tests. Seeing as this code seems to be specific to OpenBSD I don't think __x86_64__ should have been added there at all. It appears to have been added wherever __amd64__ existed before which is wrong. I think that part of the commit should be reverted but also all four of the checks should be __OpenBSD__ && __amd64__ instead of two one direction and two flipped. commit 895d4e274d2b4638f0e6838dfee0e543311dba34 Author: Brad Smith <brad@comstyle.com> Date: Sat May 17 13:05:58 2008 +0200 BSD's also have /dev/urandom. commit aad1c37b0951eae216ac323c5d8bfc6fbcf096bd Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 10:52:41 2008 -0400 RANDR 1.1 compat: remove senseless comparison against the virtual size. commit 14726b776d6cebb7d864b6ffa7554e1ce5637d5c Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 10:51:32 2008 -0400 xf86SetDesiredModes(): Skip disabled CRTCs first thing. commit 459f34b089aca4f4eee9752600c3a9e4f4e343ab Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 10:48:00 2008 -0400 Fix initial mode selection even harder. The first guess used to be "is the preferred mode for one output the preferred mode on all outputs". Instead, do "find the largest mode that's preferred for at least one output and available on all outputs". commit 96111c154713600dd534dd82104ac18b91466202 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 10:31:58 2008 -0400 Redo RANDR compatibility output selection. Old logic was just the first one that happened to have an associated CRTC. The new logic tries to find one that's definitely connected, has probed modes, and has the largest candidate mode. commit a4bbe1c8bca08f3df5ff7e50444af6aef7ec8b25 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 10:25:12 2008 -0400 Re-add sync range inference from legacy setup to RANDR 1.2. commit f52f6c5c7efc281f9ac204fbaa4f71383df7463d Author: Adam Jackson <ajax@redhat.com> Date: Mon May 5 14:37:07 2008 -0400 Fix hal shutdown crash. Removing the device invalidates its ->next pointer. Copy it aside before destroying the device. commit 99e4531f7c3fafce065dfd21f65bad1cf190c3f1 Author: Adam Jackson <ajax@redhat.com> Date: Fri May 16 08:16:01 2008 -0400 The great kdrive purge. Most of these drivers didn't work. ati was the only one that even came close. The igs, ipaq, itsy, pcmcia, savage, sis530, trident, trio, ts300, and vxworks directories have never built since modularisation, so clearly no one can miss them. commit fc7e2566cc076c0d979f74871bc436df43401058 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 16:59:34 2008 +0930 Xext: fix typo in condition. Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. We must free the event if it is NOT an extension event. commit 6fb76acc4524d6af4bfb6bc6d862c1ee2bbb8baa Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 19:22:32 2008 +0930 mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). In the xnest and vfb DDX we don't need the call anyway, it's performed by mieqProcessInputEvent. commit dfb7de6571345061d1cd88ab915064fc376529fd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 20:56:04 2008 +0930 mi: don't call from miPointerMoved into the spriteFuncs for anything but VCP. Calling ->MoveCursor for anything but the HW-rendered VCP causes the SW-rendered cursor routines to be started, including mallocs, etc. Since miPointerMoved is called during SIGIO, this is a bad idea. commit f611719edce2ae51dca8e53947a3938b53c20b00 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 19:49:29 2008 +0930 xfree86: always render first cursor in HW, all others in SW. commit 48ba58feacedf9781db81c82adbb37197d9a5cd1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 19:22:32 2008 +0930 mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite(). In the xnest and vfb DDX we don't need the call anyway, it's performed by mieqProcessInputEvent. commit 622d7c1d899a6146773a2ebd1d632a805f24025e Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed May 14 14:49:09 2008 -0300 Restructure and organize the code. It was removed and simplified some conditionals. We don't need test for pDev->isMaster inside xf86CursorSetCursor() because only MD enters there. In the last chunk, ScreenPriv fields were being assigned without need, so that code was wrapped inside the conditional to avoid it. I also tried to make the identation more sane in some parts that I touched. Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Minor modification, part of the original patch led to cursors not being updated properly when controlled through XTest. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 5af90025fee6a92e7d94642978feed21f902d0cb Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed May 14 02:45:49 2008 -0300 Remove redundancy. The only function that cat set SWCursor before xf86DeviceCursorInitialize() is xf86InitCursor() when VCP and is created. Signed-off-by: Tiago Vignatti <vignatti@c3sl.ufpr.br> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 9fc94edfe3df4c4a84ad70714c0a4ef8bbf57fc9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 16 16:59:34 2008 +0930 Xext: fix typo in condition. Fall-out from dc3aba8a559d4304844ee1cc306c577a63b82762. We must free the event if it is NOT an extension event. commit 5127942f80983b2e053dddd5c5747d0c3d2f9d6d Author: Brian Rogers <brian_rogers@comcast.net> Date: Fri May 16 10:08:04 2008 +0930 DGA: pass nevents to UpdateDeviceState. #15936 Missing parameter caused event processing to go nuts when checking valuators. X.Org Bug 15936 <http://bugs.freedesktop.org/show_bug.cgi?id=15936> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 28378d26b4bae377ef1212f6a51cda9b5529f1b5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 15 11:09:15 2008 +0930 Xi: assemble button/modifier state before updating the device. #15934 The state field of the event must specify the state of the devices before the event occured. With the code as it was, the state would also include the event (e.g. state from a button press event would show the button as pressed) Gathering the state before updating the device should fix this. X.Org Bug 15934 <http://bugs.freedesktop.org/show_bug.cgi?id=15934> commit 7cabf81c8638739a15a1be6baa3fc569f38e7589 Author: Eric Anholt <eric@anholt.net> Date: Thu May 15 13:24:27 2008 -0700 Add necessary include for COMPILEDDISPLAYCLASS. Fixes build after 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0. commit 07f69023b0e75d98a4be8f0d1c3dd9391b8149a0 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 14 16:07:51 2008 -0400 Move defaultDisplayClass to xdmcp-only visibility. commit 166177e36bfc7bd1df03663ad89500cff056d563 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 14 16:02:05 2008 -0400 Simplify default font path setup. commit 2efe1abb6fc786a4f86464978ae0d23fc7347a98 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 14 15:53:11 2008 -0400 Remove global argc/argv variables. Was only used in the logging code anymore, and uselessly so there. commit 6c27b911222cdee9a057de0be7e8b2eff8b1ff2a Author: Adam Jackson <ajax@redhat.com> Date: Wed May 14 15:44:04 2008 -0400 Restore compression of duplicate log file entries. This undoes the workaround for bug #964, which was an Xprintism. commit 937e5aae33d3b5112b5d10d605e25f57b48caa3f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 14 22:30:15 2008 +0930 dix: don't undisplay cursor if we don't own a sprite. Sometimes we didn't have a cursor when coming back from suspend. Reason was that the suspend caused the server to lose the device that was attached to the VCP, and a RemoveDevice() would then set the cursor to NULL. Solution: only set the cursor to NULL if we actually own the sprite. commit cbb4e80eb7cc8dc2aff5e5268b49cdb7b3c3d5fa Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed May 14 01:13:15 2008 -0700 XQuartz: More work on the Mach-IPC startup path (cherry picked from commit 49cd0b185fd6c99b07357a74734b6a4023faca84) commit 3b57c59bb08c9a3211f4ae57d9e2fb569d61bf2f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 13 10:40:20 2008 -0700 Xquartz: More work on the new Mach startup (cherry picked from commit 6237acf75d3310d7d4f262556b677557c2907284) commit e435acc84cb9477455ad005cee658630cbd363a2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 12 17:57:07 2008 -0700 Added missing to EXTRA_DIST (cherry picked from commit e39613f4633ed992bc276b70833a703560e528f9) commit f7d6d20ad64b235700185784d317417a94d1814b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 12 13:36:35 2008 -0700 XQuartz: Cleaned up the about box. (cherry picked from commit 0279a5970694937e949ba533330ea48961c4edba) commit b37e1f1f5ccc5a48df665449b0e31c4d25cc323c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 12 11:34:06 2008 -0700 Don't need the fink-friendly printf in the DDX anymore. (cherry picked from commit fe2279440450c795d67ba5a2234b0797d0bfe39c) commit 68b4f250eef441a3d75e3b9b2665a51d3a1538d6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 14 16:18:48 2008 +0930 dmx: fix build. Just because it builds, doesn't mean it works. commit 00db0f35acc00cb771ab1c23f35b0db1c25d81bb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 14 15:29:28 2008 +0930 dix: InitAndStartDevices doesn't need a window parameter. Leftover from the old pointer-keyboard pairing code, obsolete and gone now. commit da728f2127aaa5c1ed5d22bb9f3d0c8ff19e4933 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 14 15:17:05 2008 +0930 dix: don't use serverClient in AddInputDevice, use the one supplied instead. We pass in the client that wants to create the device anyway, lets use the parameter instead of hardcoding the serverClient. Wow. I hope this is merge detritus, otherwise it'd be a sign that I didn't have enough coffee that day. commit a6659291c798f417a76d9aa7944694ff27c01fa7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 14 09:42:50 2008 +0930 mi: protect against NULL-pointer dereference. Required by the recent patch to use a NullCursor instead of UndisplayCursor(). commit 7cdc19b29d93bf15cecfd6b69e269fab2501bca0 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue May 13 16:39:30 2008 -0700 When XKB fails to open rules file, log the file name, not the NULL file pointer commit dc3aba8a559d4304844ee1cc306c577a63b82762 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 13 14:37:26 2008 +0930 Xext: emulate XI events from core events when faking input. We need XI events for event processing, so lets get rid of the pure core events ASAP. commit 8b3802d32041547fd6ed5393a56281c5c83d260e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 13 13:47:52 2008 +0930 Xext: core button events have rootX/Y unset too. commit ed65e8b4f02a6da7f1c5d85984a9ccf6a94d0181 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon May 12 18:49:34 2008 -0700 Check for strcasestr and workaround it on systems without it commit 8234af6c6a3ade13f7720743bde79957c7df3f6c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 13 11:17:39 2008 +0930 xfree86: remove Ubuntu-ism. Additional #include was required due to broken libc headers or something like that. Remove it, there's more to the world than ubuntu alone. commit 59b8d29b3a91c65787dfadb5610342a62e85c48c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 12 21:22:54 2008 +0930 Xi: Fix up ProcIVector, got out of sync with the protocol. When the opcode squash happened in the protocol, the processing vector got out of sync for a few requests. As a result, client and server would interpret requests differently, leading to a couple of BadLength problems. commit 1fc1a2897e9185838c29d9ffff07c39d2fdf174f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 12 20:14:05 2008 +0930 Remove UndisplayCursor API. We can achieve the same thing by simply displaying a NullCursor, there's no need for a separate API. commit 913989d643595030e67e7c0a758a16ae0da62ed9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 12 20:05:43 2008 +0930 mi: don't try to display a cursor for devices w/o cursors. commit 248a1df63430717550adb0e79068d8f9fcfacb0b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 12 20:05:21 2008 +0930 render: don't dereference cursor if cursor is NULL. commit c50b5d978981b13cdb22a9ad41c1b64f90cebe51 Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun May 4 13:45:27 2008 -0700 Bug #14692: Allow drivers to have a say in Xinerama visual consolidation. Create a new exported global variable, XineramaVisualsEqualPtr. Use this pointer to decide whether two visuals are equal during visual consolidation. This pointer can be wrapped, which allows drivers and extensions to control which visuals are consolidated. A wrapper can reject the visuals without calling down, but must call down and return that result if it deems the visuals equal. This ensures that all layers agree that the visuals are equal. Pass the screen of the other visual into the VisualsEqual callchain. Don't free PanoramiXVisuals since we need it for PanoramiXTranslateVisualID. Don't skip the first visual on the other screen in PanoramiXMaybeAddVisual. Skip the loop in PanoramiXTranslateVisualID if screen is 0. commit 86678e7cc2b021851ff508433fa160170f500c51 Author: Adam Jackson <ajax@redhat.com> Date: Mon May 12 14:53:37 2008 -0400 Fix fbdevhw initialization for PCI drivers. graphics/fb%d, not graphics:fb%d. Thanks sysfs. Thysfs. commit 1c8bd318fbaf65890ef16fe26c76dd5e6f14dfde Author: Adam Jackson <ajax@redhat.com> Date: Mon May 12 14:15:11 2008 -0400 X n'est pas une print API. commit f9fae16456c30479b0cb9317e57200af36795785 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 12 10:36:44 2008 -0700 XQuartz: Added some version checking protection so we don't trigger an infinite exec loop with new /usr/X11/bin/Xquartz and older X11.app (cherry picked from commit 78032815aeb10c22ff45b49702e9c9df82ab471c) commit ac4e33a9cd0ca2f0ec76181d11d5b90b82690c05 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 12 09:27:27 2008 -0700 XQuartz: More startup work... listen if we're the actual server (cherry picked from commit 3b0afb47c3d8ad922cb2315ed8034f4d77d4a249) commit a7800d9355377ac02833613c2ffc2423beec9970 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 9 16:44:31 2008 -0700 XQuartz: Starting to work on the new Mach IPC startup stuff for better launchd, ApplicationServices, and Dock support (cherry picked from commit 9b67fca9b7d3050d3d5582a5210270db7eb2ed05) commit 04211c3532ca078420e3745a5eac3d9de120bc32 Author: James Cloos <cloos@jhcloos.com> Date: Mon May 12 03:03:13 2008 -0400 Prevent the -wm command line option from causing a SEGV The -wm (when mapped) option for the BackingStore support has been causing the server to dereference a NULL pointer. This has probably been the case since backing store has been implemented on top of Composite. It looks like (some of?) Composite didn’t expect its WIndowPtr argument to be the root window. In Composite’s compCheckRedirect() function we now avoid calling compAllocPixmap() and compFreePixmap() when the pWin pointer’s parent member is NULL, as is it the case with a server’s root window. This addresses: https://bugs.freedesktop.org/show_bug.cgi?id=15878 commit 7e768c08f7809b8dba4db1931e63314e2b6e1cfa Author: James Cloos <cloos@jhcloos.com> Date: Mon May 12 02:53:59 2008 -0400 Clean up whitespace commit 3b6735528efc6d69ab7a7cd63dd09c87db7ef115 Author: Dave Airlie <airlied@redhat.com> Date: Mon May 12 16:36:42 2008 +1000 pci: don't do this pci stuff when we don't have hw access commit 9dfb525f6c91acab5d1a65765a046bf9ee2aa082 Author: Julien Cristau <jcristau@debian.org> Date: Sun May 11 23:17:27 2008 +0200 kdrive: allow disabling Composite KdInitOutput() used to enable Composite when it was disabled by default, but now this hack prevents ``-extension Composite'' from working. Remove it, as Composite is enabled by default anyway. commit 1a01e96c6d15ef17a8b5ab1afa361fb12476a25e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri May 9 15:38:44 2008 -0700 Return a valid X error when stuck in font alias loop Part of fix for Sun bug 4258475 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4258475> commit 7b3066d9b9099135d9c49e0682161d5568fc535b Merge: 2a3d1421e 315f08905 Author: Drew Parsons <drew@emerall.com> Date: Sat May 10 00:01:15 2008 +1000 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into upstream-experimental commit 2a3d1421e0cc18822ae8f478fcc272e16a9e9340 Author: Drew Parsons <dparsons@debian.org> Date: Fri May 9 23:20:11 2008 +1000 Disable D-BUS from Xprint. Use dummy config functions to replace those from config/config.c, and therefore do not link Xprt with $CONFIG_LIB. Works around an endlessly spinning loop in dix/dispatch.c::Dispatch() (WaitForSomething() not waiting) when built with dbus, which was causing Xprt to use 95% cpu. commit 315f089056da67d4c463ed002eb2b74e38493b49 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 8 19:46:03 2008 -0700 XQuartz: Reorganized some of the build system in prep for the Mach IPC startup work. (cherry picked from commit 2232c91d5c277673929eab2abb5e0495c00877cb) commit 28ac79450c69219dc501e072c6e5028e7136380d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 8 19:47:40 2008 -0700 Updated .gitignore for new Xquartz layout (cherry picked from commit cd4d2355e227549a3410485a130549dd91ccdcfe) commit a07c5ad172b343ef26d2b41ff25f143950441c23 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 8 16:57:42 2008 -0700 XQuartz: Set bundle version to 2.3.0 (cherry picked from commit 8a0524b30e1e860f3ae35741c116fc8da28aef79) commit 05f23ed3ea6ee0f052aee41b6573325fe0063fd8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 16:12:41 2008 -0700 XQuartz: Fixed some issue in our bundle creation (cherry picked from commit 330ffad5477e32c5ab9ed338bc628bd5ae9f4c98) commit 90b963c0da2b33bdc21483f1a089b95c7e717333 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 16:07:33 2008 -0700 Set CSRG_BASED on OSX (cherry picked from commit ff085deba18682caa2f93d61a75b38db87d747b1) commit ff013b0da4e6d33b2b69ce1212e9bd62050574e1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 8 16:58:31 2008 +0930 config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user specifies a X-specific {rmlv}, then this is overridden through the use of input.x11_options.Xkb{RMLV}. However, the way how the server parses options--by ignoring capitalisation, underscores and spaces--the HAL and the x11_options would override each other. So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and only actually add them to the device after parsing _all_ options. * rmlv ... rules, model, layout, variant See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037> (cherry picked from commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17) commit 901978ebe0f446532255701cd536e246e805a55b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 8 14:05:56 2008 +0930 config: remove trailing whitespaces. It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. (cherry picked from commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8) commit 1c54c148895225e4ab3c781fe57d09e5f64353aa Author: Daniel Stone <daniel@fooishbar.org> Date: Fri May 9 00:26:16 2008 +0300 Revert "GL: Make errors non-fatal" Turns out this just caused segfaults further down the line. Oops. This reverts commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8. commit f17ba5d5849c92603f453195aca384844ca76d74 Author: Adam Jackson <ajax@redhat.com> Date: Thu May 8 16:04:24 2008 -0400 Bug #13104: Remove broken XAA a1 glyph fast path. commit ddaecfa13cefee7c66b39b606c8640c6544d4943 Merge: 9c2e0871c cf20df39c Author: Adam Jackson <ajax@redhat.com> Date: Thu May 8 14:33:58 2008 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit fc35d1e3be201e3821413bb2eeb8d43e1e56ba17 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 8 16:58:31 2008 +0930 config: override xkb_{r,m,l,v} with Xkb{r,m,l,v} if the latter is set. The HAL spec says that input.xkb.{rmlv}* can be sent, but if the user specifies a X-specific {rmlv}, then this is overridden through the use of input.x11_options.Xkb{RMLV}. However, the way how the server parses options--by ignoring capitalisation, underscores and spaces--the HAL and the x11_options would override each other. So we simply filter the options, letting Xkb{RMLV} override xkb_{rmlv} and only actually add them to the device after parsing _all_ options. * rmlv ... rules, model, layout, variant See Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037> commit 1f54c05cf8a6b82e5fc6362f7f8e8fdc2444b9e8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 8 14:05:56 2008 +0930 config: remove trailing whitespaces. It makes my vim look ugly. Put "let c_space_errors=1" into your .vimrc. commit 1a314a1ef06222977e7ccb94331ce31c17534b2a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 8 13:16:48 2008 +0930 Revert "config: deprecate (and ignore) the use of input.xkb.whatever options." daniels: "Hrm, I'd prefer to have input.xkb.{m,l,v,o} be the primary keys, and have input.x11_options be a backup for that, rather than the former being deprecated, for the reasons I listed earlier ..." see http://bugs.freedesktop.org/show_bug.cgi?id=13037#c51 This reverts commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22. commit cf20df39cc78203d17b99223908af388ecbf7d0e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed May 7 22:24:19 2008 +0300 XKB: Actually explain keymap failures When something went wrong building a keymap, try to explain to the user what it actually was, instead of the dreaded 'Failed to load XKB keymap' catch-all. commit 641a5f955b7b3ae04eeb6bc45fb30b0b531898e4 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed May 7 22:29:04 2008 +0300 Build: Ensure xf86DefModeSet.c ends in an empty line This shuts up a warning. commit 268d61e00cf4bc52c05f19eda7ab4f6accce12c8 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed May 7 22:28:45 2008 +0300 GL: Make errors non-fatal GLX, there's more to the world than just you. If you fail to load the software renderer, don't bring the entire server down. The error path probably needs better testing on this one, but it seems mostly okay to me. commit 9c2e0871cfbe54e73eec1f790a7e383d08555055 Author: Adam Jackson <ajax@redhat.com> Date: Wed May 7 13:21:26 2008 -0400 Bug #13104: XAA: Adapt to glyph storage changes. Glyph bits are now stored in a proper pixmap, not just hanging off the end of a GlyphRec. commit 26188875de1ccc84ac60bfb251e3ec43de2b9e22 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 7 13:13:57 2008 +0930 config: deprecate (and ignore) the use of input.xkb.whatever options. These options are still sent by some HAL implementations (e.g. HAL on FC8), and may overwrite the options set in the x11-input.fdi file. For a more detailed description of why see Bug #13037, comment 42. X.Org Bug 13037 <http://bugs.freedesktop.org/show_bug.cgi?id=13037#c42> commit b6a0c6d4864f73a18beb841b16e9be56f2fcd77e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue May 6 17:06:34 2008 -0700 Allow using libmd instead of libcrypto for SHA1 hashing in render/glyph.c Builders can force one or the other by passing SHA1_LIB & SHA1_CFLAGS to configure commit 718652eaf9221e0eeec2c971dd7baa97f827451b Author: Adam Jackson <ajax@redhat.com> Date: Tue May 6 17:52:37 2008 -0400 Bug #13104: Don't let XAA glyph pixmaps anywhere near video memory. Since glyphs are stored in pixmaps now, they can make their way into VRAM, which invalidates a bunch of fast-path assumptions in the XAA code. Thus you end up doing color-expands or WriteBitmap from la-la land and your aliased glyphs go all funny. Since XAA isn't ever growing the ability to do sane glyph accel, just force glyph pixmaps into host memory by catching them at CreatePixmap time. commit a85d3ac87cc354093bb1e88697c44254e7721bb9 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 02:59:13 2008 -0700 XQuartz: Fixed typo (cherry picked from commit 56b7988d2662caa4d31094695b414080e4470ed4) commit 077ced6384abad78253e857091e78f3685965b9d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 02:47:03 2008 -0700 XQuartz: Added uncommitted files (cherry picked from commit e414ec462cfc63f8eb7f504f526f5a2c73f51e69) commit 80e502c5d1f7e9221c6ae40716d6402fd28d8806 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 02:28:36 2008 -0700 Fixed up dist (cherry picked from commit f225222ba2bf4f03425107f258d60b73c88efaec) commit 7295e544332b0fa929f651304f9d4aca3db4a33e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue May 6 00:06:19 2008 -0700 XQuartz: Move server bits into bundle and setup stub in /usr/X11/bin/Xquartz in prep for startup rewrite (cherry picked from commit 453a982e6382cff06ea27abba225440b07068f50) commit d41d677ab4118e73140ea2392e0d48eb361af1cf Author: Ben Byer <bbyer@bushing.apple.com> Date: Mon May 5 20:55:08 2008 -0700 Xquartz: experimental embedding of Sparkle.framework (cherry picked from commit b7a1a640cef8c69442859cbf89034ad362a19684) commit 9e0d73fd8a43647b648ec5b2f0bcaae30c03259c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 6 17:52:15 2008 +0930 xfree86: call SetCursor for the VCP when switching between SW/HW rendering. We need a manual call to SetCursor when we switch from SW to HW rendering and the other way round. This way we display the new cursor after removing the old one. In addition, we only update the internal state for the VCP's sprite. This way, when we switch back to HW rendering the state is up-to-date and wasn't overwritten with the other sprite's state. The second part is a hack. It would be better to keep a state for each sprite, but then again we don't have hardware that can render multiple cursors so we might as well do with the hack. commit e4ebfed1785597b48b68e1bbdde3e5c4061b749f Author: Dave Airlie <airlied@linux.ie> Date: Tue May 6 16:46:37 2008 +1000 xf86edid: fix typo in debug output commit b9c1a57e7a98dea63cd362f714411547e728a85a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 6 14:51:23 2008 +0930 xfree86: switch between to SW cursors if more than 1 sprite is available. Switches back to HW cursors when sprites other than the VCP are removed. The current state requires the cursor to change shape once before it updates to SW / HW rendering (whatever is appropriate), e.g. by moving into a different window. Until this is done, the cursor is invisible. commit 3df88c17e315b5ae580096e4bc88920d1f452e83 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 6 11:50:20 2008 +0930 xfree86: re-enable hardware cursor (for a single cursor) This commit enables HW rendering for cursors again, but only for a single cursor. Other cursors can be created, however they will not be visible. commit 6acc2acd0db2826add7c47e94e4061d169a41f88 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon May 5 15:32:26 2008 -0700 Rootless: mi doesn't let us resize root, so we need to do it ourselves... (cherry picked from commit c1ec36e28cff857664090cc8792db1ae93b783fa) commit efa65a0317e12c9ad34fa00fe90bf5eae9fa2670 Author: Keith Packard <keithp@keithp.com> Date: Sun May 4 21:52:58 2008 -0700 Rework composite overlay window code to fix several resource management bugs. The composite overlay window code had several misunderstandings of the workings of the X server, in particular error handling paths would often double-free objects. Clean all of this up by using resource destruction as the sole mechanism for freeing resource-based objects. commit 6c1accce87c9bd640c1b4bbc49bae7d44b1cc97b Author: Keith Packard <keithp@keithp.com> Date: Sun May 4 21:51:08 2008 -0700 Empty the borderClip of manual redirect windows. (bug 15823) Thanks to Owen Taylor for root-causing this one. If a TreatAsTransparent window has any area in the borderClip, that will be added to the totalClip region for use by other windows. That's wrong. Instead, simply empty the borderClip for TreatAsTransparent windows right up front. commit d500eeb9458336780d77baf8b7db96e1f7ff4f0d Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun May 4 10:26:25 2008 -0700 Xephyr: Handle depth 30 and reject higher depths rather than crashing. commit f4a68f3701889950d3b98842d021f357f3913fea Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 2 17:35:57 2008 -0700 XQuartz: Fix mouse input offsets earlier since GetPointerEvents does not like negative (x,y) values (cherry picked from commit 8d9eab3a2ec5955cc2698fdcb1fa6ed12b2aadb7) commit 96fa7da3b87e2f9187ec13dad259beefdc17cd94 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri May 2 16:53:45 2008 -0700 XQuartz: Avoid a possible crash at startup due to unfavorable context switching. (cherry picked from commit ff10c37bdd09656cf2f7ee9577f5552caa1ffdb8) commit 6f63724b28c8b3fd85314fb95d1e4f363b610e19 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 2 14:56:58 2008 +0930 xfree86: don't try to repaint the cursor before cursors exist. commit 334456952930cb3e55c02fcdada2d0c074cd0520 Merge: 8e56fd972 3b8d53452 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 2 11:00:14 2008 +0930 Merge branch 'master' into mpx Conflicts: Xi/exevents.c dix/devices.c commit a338007be6fd4302af012109d959f43ac7eab2b1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu May 1 18:02:59 2008 -0700 XQuartz: Adjust the screen origin offset properly for multimonitor setups (cherry picked from commit f2020b9836bacd0593ac0b4c8541e32714ab02a9) commit 8e56fd9728d63a7a48ef44503425c6e25c7c9ffb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri May 2 10:22:06 2008 +0930 dix: continue to check for invalid valuator ranges. In an ideal world, the drivers would init all axes with NO_AXIS_LIMIT. In the real world, this is an ABI break, so let's just leave the old check in. commit 3b8d53452cd6c74d32d7759964a7cd9ee775f161 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu May 1 15:10:52 2008 +0200 EXA: Fall back in CompositeRects if the driver can't accelerate Composite. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=15780 . commit 01c61f3d972fc2f4e5bb536dd00d8b6bbeb0fb3d Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Thu May 1 01:02:39 2008 -0300 xorgcfg: Fix a crash if xorg.conf doesn't have a Files section. This patch only creates a Files section if required, so if no entries are added, an empty Files section will not be created. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 6899ff81e8f668382e3e2f9afdd9cdf51d0e0f7d Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> Date: Wed Apr 30 16:38:42 2008 -0300 Fix an off by one read error in drmSIGIOHandler(). Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit ec0419b50534006a272278b79ee51538193661cb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 30 17:30:57 2008 -0700 XQuartz: Moved some relevant stuff from darwin.h to darwinEvents.h (cherry picked from commit 1fcf74a436f2e19cceb3f285b89859025d94c040) commit 28d1e21f1523d475cb757d3cfa33737ed62c534d Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 30 17:30:32 2008 -0700 Dix: Cleaned up sanity checking in Get{Pointer,Keyboard}Events XQuartz was crashing because the Appkit thread was trying to GetXXXEvents while the Xserver thread was exiting. This adds some more sanity checks and avoids that crash (cherry picked from commit 34ec4bd6acb834c0e3f9a5042a0cc3f52c6f3a68) commit ce36ae526d88d20ff67cd6cb429fb06f48d231f6 Author: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com> Date: Wed Apr 30 11:58:32 2008 +0300 Add M32R architecture support (bug #10020) Still needs autotools support, so this won't actually _build_: it's just a starting point. commit a0e6a7d4f507c5c0a0b11adb10394af58a0a6e07 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 30 17:57:48 2008 +0930 dix: resize EQ to minimum size to avoid reallocs during SIGIO. When a new device is added, calculate the event size needed if a DCCE event is sent and set the EQ's event size to this minimum. This avoids reallocs when a event is sent (which may happen during a SIGIO). commit b71b51c982706501b6229532ce342752207426bb Author: Ben Byer <bbyer@bushing.apple.com> Date: Tue Apr 29 23:37:58 2008 -0700 xquartz: created darwinTablet, to represent tablet events (cherry picked from commit 50641bce730ee03738fa0c4beb8125b34fda556f) commit 519581b0bab5cc6dac397877da485745f18c2120 Author: Ben Byer <bbyer@bushing.apple.com> Date: Tue Apr 29 23:00:09 2008 -0700 xquartz: remove unused params from DarwinEQInit (cherry picked from commit 299a056737168ca1faefd675dce6d6ab13176be9) commit d70487a4c09cfeb90d996ab40a23a74b2c15be6f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Apr 29 23:59:26 2008 -0700 XQuartz: Fix to tablet-event handling code; we now scale more conservatively (to match Linux's Wacom driver) and we now receive all tablet-related events. (cherry picked from commit 588683cecca2cfc65a28de035cd6ee3d64ff59d2) commit fea39c94bcc8b635d37530d8a27ee92acab484fe Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 30 13:17:14 2008 +0930 dix: fix typo from last commit. commit ffaccc2dc91f4ca4ea10da010206a0a7d2b5540c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 30 11:45:19 2008 +0930 input: replace -1 as default axis limit with NO_AXIS_LIMIT define. This allows easier refacturing of the coordinate limit handling. Grepping for -1 is boring. commit 00acb40f2bc5bb4a1977b9b08db75630677ff787 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 30 11:29:03 2008 +0930 dix: fix typo in clipAxis. Check needs to be (min_axis < max_axis), not (min_axis < min_axis) commit f65a1a62f9eac2f6620d5d469dbf6c79b2eadab7 Author: Hong Liu <hong.liu@intel.com> Date: Tue Apr 29 09:00:11 2008 -0700 Keep rotation wrappers in place while transforms are in use LeaveVT/EnterVT cycles will free/realloc shadow frame buffers. Because of this, the presense/absence of that data is insufficient to know whether the screen function wrappers are necessary. Instead, the 'transform_in_use' flag should be used. This patch also adds 'xf86RotateFreeShadow' for drivers to use at LeaveVT time to free the rotation data; it will be reallocated on EnterVT. commit 18b33dd4ff46f63bad70b493b1d0b0758c961ada Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 15:24:55 2008 +0930 Xi: stop excessive use of _X_EXPORT. commit 2b179c32ac40f5258d95ae16da96a79fa8eea696 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 15:15:16 2008 +0930 include: add declaration for CopyGetMasterEvent to shut up compiler warning. commit ff36753755360aaa16ab8604a0ab78123884b57d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 14:53:41 2008 +0930 mi: call the custom event handlers for both MD and SD. commit ec2fca7e6f7ce8fdf33d959b7adeaae935ec4b37 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 14:40:44 2008 +0930 xfree86: DGA needs to call into Xi. Two steps: first use UpdateDeviceState() instead of replicating the device changing code. And emulate XI events instead of core events. commit 8208b842b7dd3b30bafdd74147bdfa63bc00cc40 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 14:19:42 2008 +0930 Xi: add IEventBase global variable. Stores event base for X Input events. commit 46340b740640b76b52b8e69bc67f9201c7e974c3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 29 14:17:48 2008 +0930 Xi: change UpdateDeviceState to be _X_EXPORT. commit 3a922c5d07509703a3eeda2bbec6f332e6b0ffac Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 28 17:32:54 2008 +0930 Xi: apply ValuatorEvent data to the device's valuators. After UpdateDeviceState, the device has the current position in absolute coordinates, the event has the correct valuator data to be delivered to the client. commit f2a20294fe26f4c9d245d24d065331fefd8f830d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 28 16:56:22 2008 +0930 dix: store all valuators as they come from the device in the valuator events. The event's sequenceNumber is mis-used to determine whether the values are relative or absolute. commit d5ab89f4f1acbe2614036e8934122185ac0f81ee Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 15:52:24 2008 -0700 XQuartz: Unset CFProcessPath... blech (cherry picked from commit ce4fbfbc75c62a092214d140c7550279aebe69ef) commit 0c2312b21b6700c1425baccaf9c26150b4f0fd6a Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 15:28:21 2008 -0700 XQuartz: xprIsX11Window can be called from the Appkit thread (see X11Application.m) (cherry picked from commit 22cf72437601c07b8a6c744b4f2f1f4cd6713e60) commit c3dc4bdbb018c0606d561e2dfb9a36e9297fa312 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 15:42:02 2008 -0700 XQuartz: Disabled DPMS extension (cherry picked from commit 1448fed9b6d484f471b9b2982c76ca921a9273b9) commit 07382a70c7ac9807dfb31821a4763bea2309bde6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 12:36:54 2008 -0700 XQuartz: Added thread debugging to xprFrame.c (cherry picked from commit 41542502b321c697271c1752525b600872b6df96) commit 8349732a6720652bfbad7874a952be73a0e8e77b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Apr 28 21:09:35 2008 +0200 EXA: Try to accelerate non-antialiased text via the glyph cache as well. Treat 1 bit glyphs and masks as PICT_a8 in the glyph cache. We're not able to accelerate them otherwise. commit a65d530040bb561ba88c5d8c71633a7c0bf11e89 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Apr 28 21:03:12 2008 +0200 EXA: Accumulate glyphs whenever possible, for full benefits of the glyph cache. commit e7eaac59c424a205dd106fc7d70734ff4b390f28 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Apr 28 21:00:55 2008 +0200 EXA: Glyph cache upload tweaks. Track damage after using UploadToScreen directly. Don't waste any effort on empty glyphs. commit cc08c06665ffe29ad44d023d75d0f86e5338875d Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> Date: Mon Apr 28 21:00:55 2008 +0200 EXA: Use UploadToScreen() for uploads to glyph cache When possible, use UploadToScreen() rather than CompositePicture() to upload glyphs onto the glyph cache pixmap. This avoids allocating offscreen memory for each glyph making management of offscreen areas much more efficient. commit 13fd2256300b61d88b840952d838f834523f5dd7 Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> Date: Mon Apr 28 21:00:55 2008 +0200 EXA: Clean up debug messages commit fcb5949928f1c27f67f40c094c3c673786574422 Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> Date: Mon Apr 28 21:00:54 2008 +0200 EXA: Fix overlapping glyphs in glyph cache Allocate each cache at a different vertical position in the per-format pixmap. Fix width/height confusion when choosing the cache for a glyph. commit 40eb14c9482457969e0bde97c49edad536285e02 Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> Date: Mon Apr 28 21:00:54 2008 +0200 EXA: Add exaCompositeRects() Add a function to composite multiple independent rectangles from the same source to the same destination in a single operation: this is useful for building a glyph mask. commit 54184110f6f3e5d7276d5431e739a4fcf0c3523e Author: Owen Taylor <otaylor@huygens.home.fishsoup.net> Date: Mon Apr 28 21:00:54 2008 +0200 EXA: Use a single large glyph cache pixmap Add back exaGlyphs(); the new version copies the glyph images onto a single large glyph pixmap and draws from their to the destination surface. This reduces the management of small offscreen areas and will allow us to avoid texture unit setup between each glyph. commit e9734306088e12f2cd68bf347ecf8415be4f0268 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 11:47:49 2008 -0700 XQuartz: More startup / threading house cleaning. (cherry picked from commit 72653c24c00dfba64ce35a3d400598bcd77defc1) commit 4b46fc931e61bec0abd6a86062e46dd7a408e745 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 28 10:50:51 2008 -0700 XQuartz: Updated Localizable.strings (cherry picked from commit d8d9c866b90fb24c93bd6e25fa90f8f2bf58ad34) commit 4017ebe5bfa7a261cd1135801756c44e9fe93ca1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 27 00:01:14 2008 -0700 XQuartz: Added missing Xquartz.man.pre to EXTRA_DIST (cherry picked from commit 03e707987f7f32e47dd0355c6d16bfb9169a379b) commit 53dba5381fdd8f644e16aaa0ecb05df4dc615b23 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 28 11:37:52 2008 +0930 dix: if alloc of a master keyboard fails, remove the master pointer. commit 1fab51edfc82e1ef60dfa29fd5d93478066a3998 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 28 11:37:21 2008 +0930 mi: guard against NULL-pointer dereference. commit b5004722a208479a4bc762ff428bf4cbeb430d53 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 28 10:26:01 2008 +0930 Xi: Only return VCP, VCK and floating SDs to Xi 1.x clients. This is better than the approach implemented with 8973a3f7983240407dd6da59b3643f40e6a3d83a which disabled XI altogether for 1.x. Instead, return a device list that resembles a traditional XI setup on pre XI 2.0 servers. If the client tries to open a device other than a floating SD, return a BadDevice error. commit 0bd28315afc3b7223f8ff9f17597db09500a9388 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 26 23:00:42 2008 -0700 Xquartz: Added missing to EXTRA_DIST (cherry picked from commit f4b963256feb03e9e6b5521bdefeb390e9a49688) commit ef1c52053755fa14b4ca98b22c506f73f5f4a4b7 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 26 19:21:05 2008 -0700 XQuartz: Cleaned up startup and thread creation a tad. (cherry picked from commit c861fe00e112b21ee0156d09a6cd5281642a1dcc) commit b114d4e861885cc5b49cd81b33ad825461811b3e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 26 17:04:49 2008 -0700 XQuartz: Don't subtract the titlebar off of the pointer_y (cherry picked from commit 00a9567acce2b27a649cbebd4790e3043688a7d8) commit 684b5d8382bf0bc6cd55774226ee362e81c0adbf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Apr 26 19:55:59 2008 +0930 Xi: whoops, stray ! caused a bit of memory mess. commit 87071b604c4b7c3c79ab784e2c09ff691e2bc5ad Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Apr 26 19:37:57 2008 +0930 Revert "Xi: disable XI for clients < XI 2.0" Turns out some programs don't like this change. gnome-settings-daemon crashes hard if you tell it that XI doesn't exist. So, tell them we have XI, but leave the other change (the one that pretends no devices are available). This reverts commit 8973a3f7983240407dd6da59b3643f40e6a3d83a. commit 7447a30fb27ed50a20a85b5a2de9afe7dea8cfa5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Apr 26 19:03:13 2008 +0930 Xi: if a pre-XI2 client tries to list the devices, pretend we don't have any. XI 1.x isn't supported anymore, so let's pretend we don't have any devices. This stops clients from opening them and thus stops interference. commit 8973a3f7983240407dd6da59b3643f40e6a3d83a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Apr 26 17:48:52 2008 +0930 Xi: disable XI for clients < XI 2.0 Sorry. With the huge changes in the device handling I honestly don't know how to support XI and XI2 alongside. So let's just pretend XI doesn't exist if a client doesn't request it supporting XI2. commit b304b0a65cc57127cdea103f2c5114e4ea79af41 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Apr 26 17:38:55 2008 +0930 Xi: add versioning support. Remember the version the client sent to us, so we can adjust our replies accordingly. This requires the client to use the {major|minor}Version fields in the GetExtensionVersion request. However, they were padding before, so we must assume they are garbage if nbytes is non-zero. If nbytes is zero, the client is probably a new client and we can handle it correctly. commit b9ca7896356f79ee27be5d5aa62052f6984282b0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 25 17:54:36 2008 -0700 XQuartz: Added some pseudoramiX debug traces (cherry picked from commit 5bee1585a399eab0a7b6fc80ad476d81b5d227d3) commit e251c9e75afdc5e32f2bc9801712272358934266 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 16:49:35 2008 +0930 Remove all traces of #ifdef XINPUT and the matching bits from the configure.ac commit 1d0438de176551aaeff549664f00b8bd83d465af Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 16:28:58 2008 +0930 Xi: remove RemoveOtherCoreGrabs() PickPointer() returns grabbed devices, so we can't get a double grab anyway. commit be5ff2b8d8a392eb8611e1fcd6da4752d68a7f9d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 16:25:13 2008 +0930 Xi: remove some superflous code commit 0209e46249b61974a6e3ed54a51cc36dfaf0064f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 24 23:48:11 2008 -0700 XQuartz: More multi-monitor work... reverted Ben's workaround (worked for side-by-side only) and added more debugging. (cherry picked from commit 515b8b855ac5d2d5aef881053f73b2ad07a6dd2e) commit b65dbd350b8518bb90bed9cdc64dd900bc75d20c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 24 21:14:04 2008 -0700 XQuartz: Cleaned up multi-monitor support. (cherry picked from commit c05abf0a19b0ef0fc4ace9400a095ce2521456bc) (cherry picked from commit 9112f290434c246d3e797551aaaf3a89d2006b23) commit b093bf3ec37367172be3b44a04f0f43890ba7d7d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 15:15:31 2008 +0930 dix: don't search for grabbed devices, PickPointer does it for us now. Follow-up to 93ee33830778b9ec85ad81496572677a30022b09. commit 6198bad07edc51ff4a264a9361c5e9b6c74647a6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 15:02:40 2008 +0930 dix: remove misleading (stale) comment commit 93ee33830778b9ec85ad81496572677a30022b09 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 15:02:13 2008 +0930 dix: let PickPointer() return devices that are core-grabbed by the client. If the client currently holds a core grab on any device, this device has priority, even over the ClientPointer. commit f5ac98747de921d48f36d4f3f66dbe73e26a6760 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 14:50:24 2008 +0930 Standardise copyright headers for all new files created as part of MPX. commit 3fc67b4205851dcffcc431a07a885828549bd9cf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:37:32 2008 +0930 Xi: remove leftover chpkpair.h file. Used to contain declarations for ChangePointerKeyboardPairing request handling. commit 89add4ee986e38b833bb58750b3e5a664efb6f4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:19:12 2008 +0930 dix: remove obsolete InitWindowPrivates(). commit dcdc66fcfc7957aa7875fbf74fa3a55989a9a187 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:14:32 2008 +0930 dix: add mi.h include to stop compiler warning commit 97552413d213337e4bff8c89b06d58a09d722b05 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:13:05 2008 +0930 dix: remove "unused variable" compiler warning. commit d9c38e84cc492b931a2238757d438f562946e5bc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:04:02 2008 +0930 dix: remove pairingClient definition. This variable was used originally to determine which client is allowed to change the pointer-keyboard pairing. For now, we just let anyone change it and see how that works out. commit c14b858aeced81ff43723644f2de0f5c43f55755 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 11:02:12 2008 +0930 Xi: fix two compiler warnings unused variable in exevents.c implicit declaration in warpdevp.c commit 6015b7a81252cd1729e6f4045f9b0c885c95b183 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 10:41:30 2008 +0930 Xi: handle requests through a dispatch handler. Same principle as e.g. in the RandR extension, rather than having a load of if (type == XI_whatever) use an array of function pointers. commit cb8cb87bc6decf75832c3724687000ecb658226e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 25 10:09:50 2008 +0930 Xi: remove unused #define DISPATCH commit 5869e3f5551e7e2d18e06a2f220b77d8c4161db1 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 24 19:39:27 2008 -0700 darwin gots /dev/urandom, too yo! (cherry picked from commit bf0144f38034bc59f108bb2c5270ff37fbe70e10) commit b1ae7c79db78cc3b789701f81328669f9f8ed80f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Apr 24 19:02:43 2008 -0700 Bug 14247: If pkg-config can't find openssl.pc, just link with -lcrypto X.Org bugzilla #14247 <http://bugs.freedesktop.org/show_bug.cgi?id=14247> commit 1daae4574c19a122baf73b6f9457b0d383b1bc66 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 24 18:22:05 2008 -0700 Added missing HAVE_LAUNCHD to dix-config.h.in (cherry picked from commit 1b4b73cefbc2f3e3f6d0cb84ea202f84fb60abb5) commit 63853e4ad211945ed25541223207a78f83766ced Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 24 18:21:42 2008 -0700 XQuartz: Compile in missing glx source that we still need (cherry picked from commit c611335dee267e41dcd1733a6bb5206b102f804e) commit ae982a27e4059fecd4048d245e6aa02f8dcc97d0 Author: Dave Airlie <airlied@redhat.com> Date: Thu Apr 24 16:37:29 2008 +1000 glx: test for valid read and draw privates before using them this should fix a bug where f-spot exiting blows up the X server commit f377141912594f87144d6d7f7fdd279a101d8e6c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 13:30:28 2008 +0930 Xi: don't attempt to send to a NULL window. Only applicable when the server comes down/restarts. In this case, WindowTable[i] may be NULL. Let's not try to send an event then. commit aec485f2dcc87b340759d67b60e7dee7931aaec5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 13:29:46 2008 +0930 dix: NULL out WindowTable after freeing all the windows. CloseDownDevices() tries to send PresenceNotify events. If the windows are already freed, then we are accessing dangling pointers. commit 9ab4e2fd8eaa87dbd16835affb1aa54dcb1a619e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 23 11:38:08 2008 +0930 xfree86: don't free the config-file related information in DIDR. #15645 In DeleteInputDeviceRequest, leave the conf_idev (which is shared with xf86ConfigLayout.input) alone for devices that were specified in the ServerLayout section of the config file. This way, in the next server generation we are left with what was the original config and can thus re-init the devices. This is an addon to 6d22a9615a0e6ab3d00b0bcb22ff001b6ece02ae, an attempt to fix Bug 14418. X.Org Bug 15645 <https://bugs.freedesktop.org/show_bug.cgi?id=15645> X.Org Bug 14418 <https://bugs.freedesktop.org/show_bug.cgi?id=15645> commit 7dc40c8eca90ec1bfab84b6f54418b64c0e62d63 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 12:47:29 2008 +0930 xfree86: Don't free master devices. The previous check works in the master-branch, but doesn't work with MPX. We actually copy the SD's information into the MDs public.devicePrivate, so we need to explicitly check whether a device is a MD before freeing the module. commit cc13f87cd8ac54223fdb0b3d3c043dc9b9be5a42 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 11:43:47 2008 +0930 Xext: XGE: change function definition to have return value on separate line. This seems to be the common style in most parts of the server. commit d0890c40b9a9c7965c08608e6950c078a29aac16 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 11:32:36 2008 +0930 Xext: add a few lines of comments to XGE. commit 745b90cde1007383ec8c887f02439a34ab427f31 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 11:27:22 2008 +0930 Xext: re-do the XGE versioning handling. Basically the same approach RandR takes. Remember which one the client requested, send back the one the server supports. Also divide XGE server version (now defined in geext.c) and the client's version (still in the protocol definition). commit 5f3e5b3462bb02e828c70d0e1890b5a83d399d42 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 24 11:03:23 2008 +0930 Xext: remove trailing whitespaces in geext.{c|h} commit d09c520b322ba5c5f4d6b630a7c0c62e56732f82 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 23 10:22:34 2008 -0700 Moved Apple GL bits into our DDX subtree (cherry picked from commit c9356f32892978faecb30f7b7af7488820ce37ff) commit b05b416c622063b84747702a54ffd9a802d6fc11 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 23 09:59:48 2008 -0700 XQuartz: No need to include indirect.c a second time (cherry picked from commit 41ed532525da85d1bd2c20af5ffa28ac6d1f4996) commit 565492c70a280d7e749500c5c0073bdcaf175c86 Author: Ben Byer <bbyer@apple.com> Date: Wed Apr 23 06:00:57 2008 -0700 xquartz: build fixes for GLX/DRI2 fallout (note: not guaranteed) (cherry picked from commit 85a5796b667461bf1fafc68c07b3a704cd8efd5b) commit 6f6505db51763d902142a8161e71cad44f52560c Author: Ben Byer <bbyer@apple.com> Date: Wed Apr 23 03:43:51 2008 -0700 glx / xquartz: we still need glxcontentmodes.[ch] kthx (cherry picked from commit 27545fd37f8c703b72f7cfc329778abc1ceabfa0) commit 4e3a8af5751ff88c0cadd612821b0ef349d250c5 Author: Ben Byer <bbyer@apple.com> Date: Wed Apr 23 03:39:41 2008 -0700 xquartz: clean up linker line for main binary (cherry picked from commit 821d7400f2ff917497b2ee58ceef2b69c2d47ec7) commit 3685b171da51f853bfdb312d36622dfa03ee75be Author: Ben Byer <bbyer@apple.com> Date: Tue Apr 22 23:53:23 2008 -0700 xquartz: remove vestigial aglGlx.c (cherry picked from commit 40bd041e4255f26fcbdf0831e68619ae0f46ab39) commit f6e22d69af6bc8f63c3a46535a09e217696a679f Author: Hans de Goede <j.w.r.degoede@hhs.nl> Date: Wed Apr 23 12:28:30 2008 -0400 Prefer glxvisuals with stencil buffer for default visuals The first fbconfig which has a depthbuffer > 0 and doublebuf is choosen when associating fbconfigs with the visuals, indepenent of stencil bits. This happens to work ok on intel as there all fbconfigs with a depthbuffer > 0 also have stencil bits. This patch fixes this by first trying to get a fbconfig for default X visuals with both stencilbuf, depthbuf and doublebuffering, and if that fails fallback to trying to get one with only a depthbuf and doublebuffering. commit 00effad583713e882c3f2518bcd3da51bf4db716 Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed Apr 23 17:46:30 2008 +0300 xephyr: XEPHYR_DRI is identical to XF86DRI commit 6a9f7f28ec455d2879ca1a315ce77c48af49e7f4 Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed Apr 23 17:46:15 2008 +0300 xephyr: sync with mesa commit 7ffc68c5cc7108c9e56af25f9f9b4398f5b027df Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed Apr 23 17:45:54 2008 +0300 xephyr: libGL is client lib commit a27c244d72603e27766ff3900ab28fe094f7397e Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed Apr 23 17:45:37 2008 +0300 xephyr: Makefile cleanup 2 commit d4d19b2f22002b1579438cb9cf08dd580c7ec005 Author: George Sapountzis <gsap7@yahoo.gr> Date: Wed Apr 23 17:45:19 2008 +0300 xephyr: Makefile cleanup 1 commit cdc4571b580a8f4fd279404215bff0fb9a5b4816 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sun Apr 20 17:06:26 2008 +0300 drop TOGCUP remnants commit 6cd9287aed3c128d9c10b9b042ba7b864143d522 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sun Apr 20 16:58:51 2008 +0300 drop EVI remnants commit a88c6b66465c039bf92a54a496516fee4d900784 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Apr 18 17:47:16 2008 +0300 glcore: drop GLcore (files) commit dd7a53f8f21e41e1ab43f7e684ba586abc97ef7e Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Apr 18 17:47:01 2008 +0300 glcore: drop GLcore (build system) commit 567d389d47dee233a973b101e04ce41c47a68f34 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Apr 18 17:46:18 2008 +0300 glcore: build from mesa, dlopen from xorg * The GLcore interface is disposable * GLcore is installed in DRI_DRIVER_INSTALL_DIR which is overloaded for GLX_PROVIDER_INSTALL_DIR commit efb723e166e5fa89e90c7b400fb4c7979b1f50c0 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Apr 18 17:45:53 2008 +0300 glcore: prepare for dynamic loading glcore gets linked with -ldl, -lpthread for s3tc and glapi xserver needs DLOPEN_LIBS - to dlopen the glcore dso LD_EXPORT_SYMBOLS_FLAG - to export symbols for glcore to use the ld flag is added to kdrive only when GLX is enabled, the net overhead for Xephyr is ~155KB, could be reduced with --dynamic-list. commit fbad87f2ae9f97fcb43546b0fa35f1100415dfec Author: Julien Cristau <jcristau@debian.org> Date: Tue Apr 22 23:50:11 2008 +0200 autoconfig: don't call closedir() when opendir() failed If opendir() fails, return from matchDriverFromFiles() immediately. Ubuntu bug 217647. commit 76381092e8f650ec7d1f058fa4c8a7348893f775 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 23 02:22:14 2008 -0700 XQuartz: Make sure QuartzAudioInit() gets run. (cherry picked from commit bb3d034675b70e22e78df5554cab0ec2a3d913d0) (cherry picked from commit 824b31c7f8144a67a320442abd3d854e99d2bfe2) commit 275cdc1c74b7e43ecd931d312469fecc8d998ed1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 23 16:16:15 2008 +0930 xfree86: pass correct value to mieqEnqueue (merge detritus I guess) commit c3659cb414ef05da8fa09009b2b82a3deeeb4f3a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 22 21:54:02 2008 +0930 dix: always send FocusIn events if mode is NotifyUngrab. In the case of a NotifyUngrab, the flag for the device may already be set but we still need to send the FocusIn event. commit 00815b3e5223e822f306db45cd4884a22ac9f7ed Author: Julien Cristau <jcristau@debian.org> Date: Mon Apr 21 14:34:39 2008 +0200 Don't set DRI2=yes if we can't find dri2proto or libdrm commit e77f65768efbf05cdf363a2f41f036f74eaa45de Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 18:07:46 2008 +0100 Reuse the existing framebuffer mode in kdrive/fbdev When starting up kdrive/fbdev, if the current framebuffer mode is sensible use that unless told otherwise. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit c4fd1121531b0cba1a3e90fa747871d784365c7e Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 18:05:53 2008 +0100 Add mediumraw support to the linux kdrive driver Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 455383db95618a05ebdbeae78423e08065f0e14e Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 18:04:31 2008 +0100 Enable the epson kdrive driver Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit 82b37d35af13a9f402755e167493ab256b664b9c Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 16:38:14 2008 +0100 Add support for AVR32 commit 20a90bef8b4993f06cf76ad05e3d4c974e1614f6 Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 16:37:02 2008 +0100 Add a default touchscreen path When enabling the touchscreen, open /dev/input/touchscreen0 if no path was specified. commit b44e89f4683ffcfd75eaf39f1f37d7461db44689 Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 16:28:39 2008 +0100 Update to tslib 1.0 Update the pkgconfig checks to tslib 1.0, and fix the LIBS definitions. commit 3848422d2354b7a5302fda92b05b0d728190e050 Author: Ross Burton <ross@burtonini.com> Date: Tue Apr 22 16:25:23 2008 +0100 Fix build when XKB is disabled. commit 744d0cfda74f8283801cc2d6c5eda48402455bc3 Author: Ben Byer <bbyer@apple.com> Date: Mon Apr 21 22:06:38 2008 -0700 add missing DARWIN_GLX_LIBS in configure.ac (cherry picked from commit a033c0b3dbb3b963261faa39f0236457cb00ff44) commit 8190ef87547b704848231bde10b1cdffc6442790 Merge: 179a082c2 2ddbfd345 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 22 18:04:05 2008 +0930 Merge branch 'master' into mpx Conflicts: Xext/EVI.c Xext/appgroup.c Xext/cup.c Xext/mitmisc.c Xext/sampleEVI.c dix/window.c commit 179a082c26f9e562492ee2e59e7f44f949f39f9c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 21:13:10 2008 +0930 Xext: route event through master if required (XTestFakeInput) commit fb784d99c521823339bf00b70b9824f735d88875 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 20:57:42 2008 +0930 mi: fix typo in comment. commit 8209fdbc7c7f2dd068b30ff184b5fbf00db78686 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 20:53:57 2008 +0930 Xext: Update sprite on fake input only for MDs and floating SDs. commit 2ddbfd345786aa39b6ccaed82a1ca5c145284ee3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 22 16:31:44 2008 +0930 xnest: re-enable XKB support. #10015 XKB was disabled in 08928afb0500d46b0caa0a1d1244dee2ed80e6a0, with the comment "Disable XKB, as we can't yet use it". Seems like "yet" is over, running GNOME and changing XKB settings seems to work in Xnest now. X.Org Bug 10015 <https://bugs.freedesktop.org/show_bug.cgi?id=10015> commit a8b8700c7345b89953c8b63cb5c347a95e6ab988 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 21 23:44:37 2008 -0700 XQuartz: Fixed cmd-tab to bring all windows forward. (cherry picked from commit e48e2ce931228f4dfa36c39b8ec8c72a58025b1b) commit a368ab757edf36ed7bbda023673d28883ce11231 Author: Dave Airlie <airlied@linux.ie> Date: Tue Apr 22 15:13:57 2008 +1000 GLcore: make googleearth not crash the server on sw-rendering. I don't think this is the 100% correct answer as I get log spam saying (EE) DoSwapInterval: cx = 0x98b8998, GLX screen = 0x96dd780 (EE) AIGLX: cx->pGlxScreen->swapInterval == NULL but thats better than X exiting in my book. commit 449723510a1f9d024e23d9eb33795cac27f9443e Author: Egbert Eich <eich@pdx.freedesktop.org> Date: Tue Apr 22 13:30:03 2008 +0930 xkb: use the correct device instead of an uninitialised "dev". #15614 X.Org Bug 15614 <http://bugs.freedesktop.org/show_bug.cgi?id=15614> Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit ba87c25321c3378fd1ad0c55dcb0af0a6e82a540 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 21 20:03:08 2008 -0700 Make rootless use dixLookupClient rather than deprecated LookupClient. (cherry picked from commit 582b5b01f9697b66489ea906a2ecb8bfc5915571) commit 8822110d7d6b684f373fc883aeb7cab9734e9ddb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Mon Apr 21 20:08:05 2008 -0700 Fixed dixLookupClient to work with client=NullClient as it did in the 1.3 branch (cherry picked from commit e41ccc64702f856e5e09dfa652fe73c14b8a0225) (cherry picked from commit ce5a5f93990647de85e535734ee6bb430ad591cb) commit 5ffb6a2fe8db5871eaf26b8535af1588c43f33d3 Author: Ben Byer <bbyer@apple.com> Date: Mon Apr 21 19:55:54 2008 -0700 Nuke a call to deprecated LookupClient, and hopefully prevent a null-pointer dereference, too! (cherry picked from commit 3d28e9f953709914e18807bc74c241333671cb30) commit 590688131d89595bdc78ca562ee88df86c9012a6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 20 22:18:45 2008 -0700 XQuartz: Fixed quit dialog to be more conforming with HIG. (cherry picked from commit 14c6b837bb03bd0956f90882f550847f13d0ca09) commit d20b3ac22d960fa44632cc4a14be079daa2d5a33 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 20 22:18:19 2008 -0700 .gitignore: Added Xquartz stuff (cherry picked from commit 0a9a3bec2de8d1f442493e13cf9f039902a4928f) commit 570b0dca261920c9b01b4eb11fe9b9987b1c636a Author: Ben Byer <bbyer@apple.com> Date: Mon Apr 21 17:52:10 2008 -0700 Fix for pointer-offset issue when using a multi-display environment on X11.app. (cherry picked from commit 9a7e14286ced55c5e2a4512e2629e03836443009) commit 3f081b4de55e1378728a24d069bf06575ffca2d8 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Apr 21 11:22:07 2008 +0200 EXA: Set pixmap->accel_blocked on the screen pixmap, too. commit 26c1801a27b81fdd988d5bd210ba0e76ecc274ae Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Apr 21 11:03:27 2008 +0200 EXA: Update sys_pitch/fb_pitch in exaModifyPixmapHeader. exaModifyPixmapHeader now also only evaluates arguments that have a meaningful value. commit 4fa89fbe18c929e0d36305ab47e7e17841309ffd Author: Jordan Crouse <jordan.crouse@amd.com> Date: Mon Apr 21 12:09:00 2008 -0600 xf86: Change AutoConfig driver for PCI ID 022:2091 to 'geode' commit 6c95fae1e9d6b0eb64bc78eced05a6e9f5faf02e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Apr 21 10:45:11 2008 +0200 EXA: Offscreen memory eviction improvements. * Make sure available areas are considered to have no eviction cost. This seems to help for https://bugs.freedesktop.org/show_bug.cgi?id=15513 but I'm afraid that may just be coincidence. * Only calculate eviction cost of each area once for each eviction pass. Safeguard against potential (though unlikely) division by zero. * Cosmetic enhancements: Name eviction cost related variables 'cost' instead of 'score' to emphasize that smaller values are better, update Doxygen file comment to the way eviction works now. commit 40c6be1408a1f0b236fdb28af27ae18aea0d578f Author: Julien Cristau <jcristau@debian.org> Date: Sun Apr 20 20:36:44 2008 +0200 Minor xorg.conf manpage fixups Use __libmansuffix__ instead of __oslibmansuffix__ which isn't getting replaced, and rewrap some text to get __xservername__ replaced in the description of Option "Accel" (cpp doesn't like the preceding quote). commit 4bcfed2f9cf5dbf682d3bc98873ba97c4efdff44 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sun Apr 20 08:35:42 2008 -0700 Revert "Removed XWin DDX" This reverts commit 6550078b0925f754e3eec3bbce94dbfe5de8c419. Doctor, I'm starting to get a pulse... commit 14396fdebac1868df17559220ed7aaa34c34251e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 19 23:31:05 2008 -0700 XQuartz: Cleanup turning off COMPOSITE (cherry picked from commit 8f920fca6f9149185649d52569d33bf81b6c6857) commit d13828797fe22856b07e08a55d2b9375902194bf Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 18 20:38:31 2008 -0700 XQuartz: Cleaned up some casting to get rid of compiler warnings (cherry picked from commit 6f1c85b96550adf0bc34efb6ca649b87bcc1b18c) commit 6550078b0925f754e3eec3bbce94dbfe5de8c419 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 19 09:29:46 2008 -0700 Removed XWin DDX commit 587c010a1cd733fded4d49dc339df0634bda8be6 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Sat Apr 19 09:27:21 2008 -0700 Rootless: Kill off rlAccel commit d3d00d92586c3e1cbc88087c930b65c8b3832fcc Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Sat Apr 19 12:54:40 2008 +0200 Removed fbpseudocolor.h from sdk_HEADERS. commit 5bdc4198795ffd011bb07cffe3817e4cded87f60 Author: Adam Jackson <ajax@redhat.com> Date: Sat Apr 19 04:06:19 2008 -0400 Remove fbpseudocolor "An experimental pseudocolor emulation layer. Not fully completed, currently only works for 16bpp." That was almost four years ago. It still doesn't work, only one driver even attempts to use it, it contains an ad-hoc implementation of damage, and should really be done up in Composite now anyway. commit 60ff56050b64183cb6e58f54223c8a3ddc2e704b Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 18 22:17:53 2008 -0700 Revert "Optimize dixLookupPrivate for repeated lookups of the same private." The patch was wildly unsafe for SIGIO, and made everything full of crashy crashy fail. This reverts commit 9b30cc524867a0ad3d0d2227e167f4284830ab4e. commit ed9dabb47c467dbf49836b631d5d6bda4b0d98b0 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 18 20:30:43 2008 -0700 Last of the spam... I promise... (cherry picked from commit 45ebee4f729b148a75e925a4863b4eb850c88f8e) commit 49f2bb4681fdee9e45f952ef0ac9c34a090117de Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 18 20:25:38 2008 -0700 XQuartz: More sanitization of the namespace (cherry picked from commit bc50d41f9d1aec04f0de0478cbd5036f1fe9b81e) commit c2f0d020b5d7950267aa3df391a7a72b9ae5883b Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 18 20:10:57 2008 -0700 XQuartz: Removed unneccessary include (cherry picked from commit 45ff59e69eddfcceafced31cf6e73e381d0f6914) commit 5183fea6d38de4bcf657e9c2a983dfd81a2a223f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 18 20:06:17 2008 -0700 XQuartz: Handled sanitization of namespace better (cherry picked from commit 8cb23d672177da919257c885804cecd18cf9af88) commit edd3fb784bad893550ee270e0a09f22f99783cf5 Author: Ben Byer <bbyer@bbyer.local> Date: Fri Apr 18 17:17:01 2008 -0700 random flailing (cherry picked from commit 7fb9b2dc615a3bd1a3c087438af7a8b88265cfaa) commit a7503615a6893749d512f75d37646273f31b9dbf Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 18 19:56:41 2008 -0400 Death to TOG-CUP. If you still care about 8bpp visuals that much, fix Composite to provide synthetic visuals. commit 4da9ec16e9725ebb9817b49e33ea1035b6aff09a Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 18 19:54:09 2008 -0400 Remove appgroup mentions from configure.ac commit 25827fde68d3bb02a2b7e05fae53a1d97edf1f76 Author: Eric Anholt <eric@anholt.net> Date: Fri Apr 18 15:32:04 2008 -0700 Nuke the MIT-SUNDRY-NONSTANDARD extension. This extension provided bug-compatibility with pre-X11R6, but has been stubbed out in our server since 2006 to return BadRequest when you actually asked for it. commit 13adef8a17d8815f4db2aaac30ae04438e125343 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 18 19:01:06 2008 -0400 Finish deleting EVI commit eafaf40fb3368ca7e4cf48336fdb7a6c9f536bfa Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 18 18:50:05 2008 -0400 Death to APPGROUP. commit f6617b4127125516583f321c961d70f762f728be Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 18 18:28:01 2008 -0400 Death to Extended Visual Information. commit 3b93631e59ca4d312d318eac4015e0a79ad6351f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 11:31:54 2008 +0930 dix: remove coreOnly check. Core pointer must generate XI events now. This flag was only used when an event is generated by Warp[Device]Pointer. Since the VCP now happily generates core events, this flag is obsolete. commit e0eaf8e5e3fa7a11c087851dff93f50f6907c4a5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 10:57:47 2008 +0930 Xext: Let XTestFakeInput update the sprite for XI events. Since XI devices can have their own sprite now, we need to update the sprite coordinates too when processing an XI event. Note: This doesn't deal with the device hierarchy correctly yet. commit cb0168b4ac5c59cdce6f0a6d89ddd9f30d93b5f3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 09:48:06 2008 +0930 Xext: xtest.c: death to tabs+spaces indendation, remove #define XINPUT commit eebdf69e9a52e071e0467a1f99de135df4d1eabc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 18 09:22:37 2008 +0930 xkb: mixing up src and dst in a memcpy is suboptimal. commit aa6687322de85a2d1025a3ae851fb290a089b2d3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 15 23:03:06 2008 +0930 Xi: when copying button classes, copy xkb_acts as well. This should be the last piece in the quest for the class copy. commit c14f5dc237a31b13d98ae2d0d6143bd91083cf13 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 20:21:45 2008 -0700 XQuartz: Forgot to commit xprEvent.[hc] ... (cherry picked from commit 70e543baf2508d636f01b2b7e8cb05172195b68c) commit 22bb7608a025a4ec0f442637810b20e2cb0b0820 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 17:04:08 2008 -0700 Added XKB support for Xquartz (cherry picked from commit 56dc1215202746590dbe8758411f47e8876e1317) commit 652479dba38470273313dc46f17e3bcb1bc5e383 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 15:49:13 2008 -0700 XQuartz: Moved some rootless-specific cruft into xpr (cherry picked from commit 31625cc03b58317120c2ac7877e227e2322e1de8) commit 2a1ba20af98c0e9a6a7f1a50d32058dcc9759c21 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 15:23:00 2008 -0700 XQuartz: Use a mutex to ensure we only have one thread calling mieqEnqueue at a time. (cherry picked from commit 7b087c965bce9f440ab5233d6383aa4a7de969b8) commit 55f80d754525398378de1ef28aa562bd29ee750f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 14:21:31 2008 -0700 XQuartz: A little more debugging output from threadSafety (cherry picked from commit f6fbdbf838ab77c3a4635f0b2356b1bbb060ff5b) commit 0d61f6fca1efeb4f68488e323d1c0508b9b7a711 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 13:17:58 2008 -0700 XQuartz: Fixed some missing prototypes (cherry picked from commit 95056afc562cfe58b116f5c36e4624018e79ff4a) commit dbd4c031565d269fef90af23386ff045ec78688c Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 13:12:56 2008 -0700 XQuartz: Added framework for asserting which thread we're in. (cherry picked from commit 00beb982510e7a82d77e1f1d43e77c84d7bf74c2) commit fa0645b452cbebd1800a63f1c95cb77fef4ab211 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 12:27:12 2008 -0700 removed Xquartz debugging code that leaked into master. Our Bad. commit a3d40f0549f6c6f49fffc286bcdaad758fa92367 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 11:56:48 2008 -0700 XQuartz: Include version info for CrashReporter (cherry picked from commit b4992755c3e29086c5939683c38fa8fd7d2e6754) commit 6d11712c2a35b243c19eea3b26622d18c2446dbe Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 11:06:54 2008 -0700 XQuartz: Use strerror(errno)... cause I like text more than grepping header files (cherry picked from commit 1b4c37d8f9b517fbec5b94ed4e4a5e86a31472a5) commit dcf4f917cc9488de72711255bbb030d9aa8f8bfb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 17 11:03:31 2008 -0700 merged darwinKeyboard.[ch] into quartzKeyboard (cherry picked from commit 57bb07320908b74facea0a97822bb19ed6f960a9) commit 582397cd024c68df65ab9dececd6d2c40a5a261b Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 02:31:53 2008 -0700 oops, missed a spot (cherry picked from commit 19872a6aeb8ee9cb0e33e4b4ffd794c9dbefe0cf) commit 0bd1c369cce05d5a4da5e3fd7033aea8c68460ec Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 02:30:36 2008 -0700 formatting cleanup (cherry picked from commit 769acd29348abf9e5b0bebfca6ae695d345f3077) commit 700e14c22616b209867e4ea4d1811e53ca996164 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 02:21:33 2008 -0700 delete debugging spew (cherry picked from commit f04f3af86a91d0cafbc86a0d71aeb0599d685f07) commit a440eebf2541ae0bb06bf65281b5facff2f04e00 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 02:21:11 2008 -0700 add support for horizontal scrolling (buttons 6 and 7) (cherry picked from commit f525a4a432ebd0545ad1dd0a7ad84ad3e47e8b61) commit 612e901ef6aa3edc54b39e55e8040cda0e5ab7b6 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 01:32:56 2008 -0700 enable keyboard map debugging -- it's going to x11-debug.txt, anyway ... so no harm (cherry picked from commit ab662c736e0654e2b4347091f0d9e87f26034216) commit 5bdfbfbedcbd9ff61cbb0b678cbf7ce7889a5826 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 01:29:46 2008 -0700 darwinKeyboard: refactor slightly so that we're not cutting and pasting code from dix, kthx (cherry picked from commit a8a090b853e811b9843a5732572cbbe542224f32) commit 58e42683c9e998f6b8a55d5653b9caec7b6acf96 Author: Ben Byer <bbyer@apple.com> Date: Thu Apr 17 00:19:56 2008 -0700 hack to Xquartz to prevent xmodmap from wiping out our valid modmap, per daniels (cherry picked from commit cab54466a61281cfafc12825017c23d720cd75f4) commit cd3470a0cffbd6b8cec7c44227b33307c9e227ae Author: Ben Byer <bbyer@apple.com> Date: Wed Apr 16 22:48:54 2008 -0700 kludge: miEqEnqueue wants a device, even if we're passing custom messages, so give it one (cherry picked from commit a494ff04b2a14470eaf5a23c7cf6dbdea182c6d1) commit 966ae1781f3ca563e15a9a1b8cab6fab94e07fe9 Author: Drew Parsons <dparsons@debian.org> Date: Mon Mar 10 22:54:49 2008 +1100 Create dix/libXpdix.la for Xprint-specific build of libdix.la (cherry picked from commit 4e2c6dbabdbbaaca213fd08edd422de15d0900cc) required because of commit 7c0709a736c0f3aa011de67dd2c2962585ab146e, which made requestingClient in dix specific to Xprint only. Add to XPRINT_LIBS in hw/xprint/Makefile.am in front of $(XSERVER_LIBS) to override definitions in libdix.la for standard xservers. Follows 571206832d454771e3c638c7515767958365c19c (providing -DXPRINT to xprint subdirs). Note it may be possible to restructure the code so that requestingClient is stored elsewhere than in dix. See discussions following http://lists.freedesktop.org/archives/xorg/2008-March/033844.html If this is done it may be possible to revert this commit (if not 571206...). commit 571206832d454771e3c638c7515767958365c19c Author: Drew Parsons <dparsons@debian.org> Date: Mon Mar 10 13:48:05 2008 +1100 Define XPRINT in XPRINT_CFLAGS (configure.ac) -DXPRINT had only been set for Xprt in hw/xprint/Makefile.am After commit 7c0709a736c0f3aa011de67dd2c2962585ab146e it is also required for ps/PsArea.c and PsFonts.c to ensure ‘requestingClient’ is defined, so make it a global Xprint definition in configure.ac. (cherry picked from commit 28a6719fd486d9a9cecad0b057d9ea7c59c66055) commit 9b30cc524867a0ad3d0d2227e167f4284830ab4e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Apr 17 16:10:10 2008 +0200 Optimize dixLookupPrivate for repeated lookups of the same private. This gives me a 20% speedup for EXA text rendering, though I still seem to burn quite a lot of cycles in here... commit 886af8f3849a0fcfc6b63a9695107ce26d7a6955 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Wed Apr 16 16:20:19 2008 +0200 EXA: Avoid some fallbacks in exaCopyNtoN. In some cases we can still do the copying in hardware even if the dimensions of the pixmaps are out of range. This is true when the boxes that we're to copy are all in the card's range. commit dc10f0a0e243b7ba38d02a4e2c43027563aead7c Author: Julien Cristau <jcristau@debian.org> Date: Thu Apr 17 11:13:47 2008 +0200 Fix composite on !darwin 2ffdb0eb641ab6949783b4eb574f77e7486ac929 changes the default value of COMPOSITE to 'auto', but doesn't set it back to 'yes' as appropriate. commit 8716d081fdf61ddf956c30aff7697c70507911fd Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Thu Apr 3 16:29:43 2008 -0700 XQuartz: Don't enable rootless accelerated functionality... crashy... (cherry picked from commit cdb4c291d8c10c3a9ea59d8e79275a30d2ea82b4) commit 2ffdb0eb641ab6949783b4eb574f77e7486ac929 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 16 21:54:00 2008 -0700 XQuartz: Don't use composite. (cherry picked from commit 6d3d344b5b95b6dc4166556d03cfd8c9576dc3f0) commit 757a1bf3a3d72e17eeb362f825124c4ba40cc080 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 16 21:48:52 2008 -0700 Xquartz: Don't need to link against rlAccel since we don't use it (cherry picked from commit 180ec128adef11a9a90cea1189dc31ac5de8359f) commit ab8c6a3c5acb2a3bf288f1d6339b09a125bbb930 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Apr 14 19:12:00 2008 -0700 Update ac_define_dir macro in acinclude.m4 to 2008-04-12 version commit b907258ebe62642af088f6e2970a45a68cf4be19 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 16 12:07:51 2008 -0700 Update dolt from upstream, fixing fallback to libtool. commit e1e189f8538f2b77ae0cf0d846d3899061e4c4b7 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Apr 15 14:49:51 2008 -0700 Include pciaccess in the xorg-server.pc Requires line. This pulls in the include path for pciaccess.h, which is needed by, among other things, xf86.h. commit 9e7ced94a5e3a14762fe934aa69d91f0831cf5ca Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Apr 15 12:06:07 2008 -0700 XQuartz: Removed a call to RootlessReorderWindow from the Carbon thread (cherry picked from commit cb27d5ca8230707b276763c0ec20e586203144c9) commit 51c8fd69ec9292f5e18cdc7f60e1716fbd6ae61a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 15 15:09:40 2008 +0930 dix: free the unused device classes when closing a device. This also requires to NULL-ify all pointers while we're actually using them, otherwise we'd try to free them twice. commit 48d33ab9b672b3b3ca308000cdbd573d1e368ff9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 15 14:29:53 2008 +0930 dix: float attached devices _before_ disabling the master. It also helps if we're actually providing the correct argument to AttachDevice... commit 4cf9c5909d926ec322ed1c7df47f95bd872bb607 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 15 13:56:11 2008 +0930 Xi: fix up button count. Some leftover code from the previously used alloc/free device classes left us with a incorrect button count. So a button release didn't come through if a different pointer was moved after the button press. commit 35982bc109d424c464551ab22ec90af69908c884 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Apr 11 11:09:13 2008 -0400 Make DRI2 a serverlayout/serverflags option. Add xf86DRI2Enabled() to export the value of the setting. commit f133d85778462134f366389bde7673bff7845fa8 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Apr 14 11:43:51 2008 +0200 EXA: Update pixmaps' accel_blocked field in ModifyPixmapHeader. commit bb8868540f017b121d698da45e552ffb55a57cea Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Apr 14 09:58:49 2008 +0200 EXA: Teach exaCompositeFallbackPictDesc() about x8r8g8b8. commit 1a9d7205cd5640eb65f019336097d86301942ea7 Merge: 90f491cf8 6866e84e3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 14 16:25:58 2008 +0930 Merge whot@wombat:~/potoroo/xserver into mpx commit 3e12c5bb67f3049156475d5cbf4e899aaded76bb Author: Dave Airlie <airlied@redhat.com> Date: Mon Apr 14 11:45:12 2008 +1000 glx: silly nitpick... even though i and j are the same, we use i to derefence visuals everywhere else commit 97565c0f394f16d042c614695c8b7b4ac354f2a3 Author: Dave Airlie <airlied@redhat.com> Date: Mon Apr 14 11:40:38 2008 +1000 glcore: make visualRating GLX_NONE - note GLX_NONE is not == 0 Finally glxinfo returns the set of 3 visuals and glxgears works again for me on sw rendering commit c61087c82784633e522bd9392172b43656bdf45e Author: Dave Airlie <airlied@redhat.com> Date: Mon Apr 14 10:47:28 2008 +1000 glcore: zero fbconfigs before filling them in. I'm not sure this the complete proper solution, perhaps it should explicitly fill in ever field. This at least makes glxinfo on glcore return sensible information, it doesn't make gears work yet though. commit 6866e84e3c607d00d88eab2249c2619d6707c1a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 19:57:51 2008 +0930 Xi: store feedback classes in devProviates system as well. This is a follow-up to cb48d880856fd196ab8e8de5eb1f14944a1b4fff. commit cb48d880856fd196ab8e8de5eb1f14944a1b4fff Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 19:48:28 2008 +0930 Xi: store unused classes in devPrivates. Rather than freeing/allocing classes each time the device capabilities need to swap, store them in the devPrivates system. When a class is unused, it is pushed into the devPrivates, and later recovered when needed again. This saves us a lot of memory allocations/frees, admittedly on the cost of some memory. commit fde3c836628b6cdec3e5d107d6b1b99bc8b86912 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 17:08:51 2008 +0930 Xi: copy the KeySyms.map over from the source. commit 3c4c9938f31755c5a59995fdcfa138c99db76bbf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 16:52:14 2008 +0930 Xi: Fix pointer handling in KeyClassRec copy. We don't free the class anymore, so just store the previous pointers, do the memcpy from the SD and then restore the pointers. Plugs a memleak too, before xkbInfo was never freed. commit 755f9e5d7898056cf3bead69ce25a10e23995582 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 16:49:25 2008 +0930 dix: Ignore focus for passive grabs if the event is a pointer event. commit 6faf5b97b92953c331d6540ceb18fd0a77197fea Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 15:42:33 2008 +0930 Xi: fix up modifierKeyMap copying. Setting it to NULL isn't correct either. The correct behaviour is to realloc it to the size necessary (or newly alloc it/free it). Otherwise we have a memleak. commit 3106ba1116e3b9d893f66a93e4a91cc61e23226a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 11:48:06 2008 +0930 xkb: two fixes to avoid server crashes. - map can be NULL in some cases, so don't try to dereference it. - don't default to inputInfo.keyboard This is firefighting, I presume something in the class copy may have gone wrong to get a NULL map in the first instance? commit 415c6df0da1197d487456b4c48e2e28e7ded8b8e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 11:46:44 2008 +0930 Xi: copy feedback classes first, in some cases xkb relies on kbdfeed. XkbInitIndicatorMap (in XkbInitDevice) calls XkbFindSrvLedInfo. This accesses the devices kbdfeed struct, which is all nice and dandy if it is NULL. When copying the device classes however, kbdfeed may not be NULL and thus XkbFindSrvLedInfo goes on its merry way to do whatever it does. By copying kbdfeed first, we avoid XkbFSLI to reference the "old" kbdfeed struct of the previous SD. commit 961f6660902163e99727c2dcc1a039f32b083859 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 09:31:16 2008 +0930 Xi: modifierKeyMap needs to be set to NULL when copying classes. Otherwise we have a double reference to the same memory area. commit bf6679cba40a936d46008c886d204ed521a4971a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 08:28:07 2008 +0930 Xi: copy the XkbSrvLedInfo too when copying device classes. commit 4219e94c2f7d431be433eceddfe79760a1ee31a1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Apr 13 08:27:31 2008 +0930 xkb: Add XkbCopySrvLedInfo, deep-copies a XkbSrvLedInfoRec. commit 1fa4de80fcfc697b5e5879cc351fb3e9dbf6acbe Author: Matt Turner <mattst88@gmail.com> Date: Sat Apr 12 20:39:18 2008 +0200 Check for __x86_64__ when we check for __amd64__ It seems Intel C Compiler neglects to define __amd64__, __amd64, or amd64, but *does* define __x86_64__. commit b1f3f42840ec01db417345a0740b59ad5e4471cb Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Apr 11 17:49:51 2008 -0700 Xquartz: Added applicationShouldHandleReopen:hasVisibleWindows to handle dock icon clicking (cherry picked from commit 55d9973b053f25bb95b26e00351dc5531caf5b04) commit eabcfce0a68d504d11be9479f09e66f574dd2f21 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 11 09:51:26 2008 -0400 Stop building mfb/afb/xf1bpp by default. commit 0dab6fa3582b70ccd0f01459902415c28dbc81ff Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 11 09:47:51 2008 -0400 So long, and thanks for all the cfb. commit 059b4876e6350aa1110648788cdfbb3f45b4d66d Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 11 09:46:48 2008 -0400 Add doltcompile to .gitignore commit 6d22a9615a0e6ab3d00b0bcb22ff001b6ece02ae Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Feb 22 11:01:51 2008 +1030 dix: Call DeleteInputDeviceRequest from CloseDownDevices (#14418) The DDX (xfree86 anyway) maintains its own device list in addition to the one in the DIX. CloseDevice will only remove it from the DIX, not the DDX. If the server then restarts (last client disconnects), the DDX devices are still there, will be re-initialised, then the hal devices come in and are added too. This repeats until we run out of device ids. This also requires us to strdup() the default pointer/keyboard in checkCoreInputDevices. X.Org Bug 14418 <http://bugs.freedesktop.org/show_bug.cgi?id=14418> commit 90f491cf8eb869f27c4278b26c1bb84432b12d63 Merge: cbe01b308 b4380d803 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 11 08:29:52 2008 +0930 Merge whot@wombat:~/potoroo/xserver into mpx commit 3c337e18b933881e22b0d03312511f1d23a8640b Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Thu Apr 10 21:36:19 2008 +0200 Fixed configure.ac for autoconf 2.62. commit 13dcde6bf994fae09c67c3edce9de42df61ef043 Author: Eric Anholt <eric@anholt.net> Date: Thu Apr 10 11:08:49 2008 -0700 Fix dolt to error out on compile error, and not print errors on race to mkdir. Both of these changes have been submitted upstream. commit a7e3ad1c6b455bda7c4abb352a20845d1d4574a0 Author: Eric Anholt <eric@anholt.net> Date: Thu Apr 10 10:33:11 2008 -0700 Remove NDEBUG (assert() disable) define from the X Server. A few pieces of code were abusing this define for other purposes, which are converted to #ifndef DEBUG instead. There should be no ABI consequences to this change. The rationale is that having the define in xorg-server.h also disables assert() drivers, which is unexpected, and also difficult to avoid since xorg-server.h is included in their config.h, and you can't put a #undef in config.h. As for removing it from the server instead of moving it to an internal header, we probably shouldn't have unnecessary assert()s in critical server paths anyway, and if we do we could #define NDEBUG in the specific cases needed. commit b4380d8030927c940ddaea83c4cf24e0b9eb7b96 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 19:25:43 2008 +0930 dix: don't free MDs classes on init. The device classes aren't deleted anymore on a class change, so there's no need to store the MD's original classes. We should however restore the MD to sane defaults when disconnecting the last device, consider this as TODO item. commit 04dff74ffdf727015e3721aae4ea13acc498cd1c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 19:22:59 2008 +0930 dix: Rework Enter/Leave semaphore system. Instead of a simple counter, use bits to keep track of which device is where etc. When device enters a window (or sets focus), the bit matching the device is set, when it leaves again, it is unset. If there are 0 bits set, then Leave/Enter/Focus events may be sent to the client. Same theory as before, but this should get around the insanity with Grab/Ungrab special cases. Those cases are basically untested though. commit a88386ee277d136caaaeec305f8753f23f9b6274 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 14:36:57 2008 +0930 Xi: only DeliverFocusedEvents if the event is not a pointer event. A pointer device may have a focus class, but even if so, pointer events must be delivered to the sprite window, not the focus window. commit 48249425275cc90242497aee9968e5f1ffc86698 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 14:36:10 2008 +0930 Xi: dont copy FocusClassRec if the master already has one. Blindly copying will override the focus setting of the master. If there's XI applications running, they may set the SD focus, while leaving the MD's focus as it was. In this case, after a class swap we still want to get the MD's events to the same window as before. commit bce6091c6b04ff2db704ae4f161179d21dcbec59 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 09:59:45 2008 +0930 dix: Extend IsKeyboardDevice() to not include pointer devices. If a pointer devices has key classes as well, don't register it as a keyboard device. Let's see how much that change will break. commit cc7dab2d04da4ca164eeec1a3296df1706585466 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 09:58:50 2008 +0930 dix: Dont deliver grabbed pointer events to a focus window. If an pointer event is being processed during a device grab, don't deliver it to the focus window, even if the device has a focus class. Reason being that some pointers may have a focus class, thus killing drag-and-drop. commit df2545b98d888924209cb889a68737c15f1aa209 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 08:50:43 2008 +0930 xfree86: Sanity check before retrieving the paired device. Some pointer devices send key events [1], blindly getting the paired device crashes the server. So let's check if the device is a pointer before we try to get the paired device. [1] The MS Wireless Optical Desktop 2000's multimedia keys are sent through the pointer device, not through the keyboard device. commit 5a4c6621aaf4e886f2c3b633e837ba359fedf921 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 08:29:05 2008 +0930 Xi: some extra checks for validity of kbd and mouse. Floating SDs are paired with themselves, so the paired device may not be a proper keyboard or mouse. Put some extra checks in to avoid dereferencing a nullpointer later. commit 8e0a6529303a52acc10905dd47c72a0d60979676 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 08:25:36 2008 +0930 dix: When floating, set sprite to NULL before calling InitializeSprite. InitializeSprite won't create a new one if it already exists, with the result of overwriting the master's sprite. This master sprite is then assigned to the floating slave, and freed when the slave is reattached later. Setting the sprite to NULL forces InitializeSprite to alloc a new one, and this one can be freed without further repercussions. commit e7211eb0b3d10323dab681bcb18580405ea18ab2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 10 08:08:54 2008 +0930 Xi: When attaching, check for ptr -> ptr and keybd -> keybd. Some pointer devices have key classes (e.g. MS Optical Desktop 2000). The previous test was performed as Error if ptr -> keybd or keybd -> ptr. This doesnt work with such devices. New test is Succeed if ptr->ptr or keybd->keybd. commit 7909ebe7f163716520f843fae11ac7bdeffcb57c Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 9 10:43:25 2008 -0700 dolt: add FreeBSD support (this and ppc have been submitted upstream). commit b4842d8dc3b1619033c5c123c8adc6e164098dc3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Apr 9 16:17:35 2008 +0200 dolt works on powerpc Linux. commit 0d1746995d91b55e40f233f0c38b56bafe896d38 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Apr 9 13:37:59 2008 +0200 Fix off-by-one error in ProcXResQueryClients(). Fixes memory corruption reported at http://bugs.freedesktop.org/show_bug.cgi?id=14004 . commit 6d031cbdefd8072b61645955f01b470a3e6858c1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 9 14:36:26 2008 +0300 configure.ac: Do the dolt Use dolt instead of libtool whereever practical. See: http://lists.debian.org/debian-devel/2008/04/msg00286.html commit b19027fbaea4c3a146926e862983e0e3411fff3d Author: Dave Airlie <airlied@linux.ie> Date: Wed Apr 9 14:27:58 2008 +1000 quirk: add quirk for ACR 640x350 default mode is wrong RH #440186 commit 1f8188656a075dc7b1bb27a0795b5bd43610bbc8 Author: Ben Byer <bbyer@apple.com> Date: Tue Apr 8 20:37:25 2008 -0700 add missing dix-config include (cherry picked from commit 126e9bc8c480b403dedc44c1e8c4fe1476340ed9) commit cbe01b3083eb65c9d4259b1071683febebf11600 Merge: 5ffbcfec3 389dae73c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 9 10:46:46 2008 +0930 Merge whot@wombat:~/potoroo/xserver into mpx commit 3f51f493b6daf2464e6c2ba5a924219b88a9e57e Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Apr 8 17:02:56 2008 -0700 XQuartz: Fix issue where clicking on an X11 window might send that event to an X11 window in another space. (cherry picked from commit df21312c8b0e9ef0c809bfc57cdf64f27db0d8a7) (cherry picked from commit 2d4194a8d124e7a9c7cd1b83635ba6957aa4ae1c) commit 389dae73cc0f3693f49807fd2de146c454ba9783 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 9 08:26:00 2008 +0930 Xi: If device "to" has a class but "from" doesn't, free the class in "to". commit 60c38d248c1a89392c2c6695c3802f4b54e4c00b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 9 07:46:53 2008 +0930 Xi: plug memory leak, free previous motion history before allocating new. commit ea05cf0813b2b7c8cd2151cb935820753ae7997a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 8 22:09:11 2008 +0930 Xi: check if source has a key class before copying. commit 08073862f8c4e1219b6459708ffd28e2bc35885f Author: Hasso Tepper <hasso@estpak.ee> Date: Tue Apr 8 13:00:38 2008 +0300 configure.ac: Fix monotonic test harder This was only introduced in a later version of POSIX, so define that version to get it from more conformant systems. commit 5ffbcfec3d37d3b627a78acfa00dbafc5948df82 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Tue Apr 8 14:42:00 2008 +0930 dix: Ensure Proximity events don't kill the server. Add Prox events to the if-clauses with the other events that are usually sent from the input devices. Ensure that the event deliverers won't try to deliver events of type '0' (some extended events doesn't have an equivalent core-type) Small modification by Peter Hutterer. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 32e4a88ae613c7200d84d5621344b418b656346b Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Tue Apr 8 08:42:58 2008 +0930 xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. XkbFinishDeviceInit is called once when the device is initialised, but also when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home. commit 6271df6953bea462be7e9e01744e5dd46841e867 Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Tue Apr 8 08:42:58 2008 +0930 xkb: don't overwrite CtrlProc in the second run of XkbFinishDeviceInit. XkbFinishDeviceInit is called once when the device is initialised, but also when a class copy causes the key class of a device to change. In this case, overwriting the CtrlProc of the KeybdFeedbackClass with XkbDDXKeybdCtrlProc sets up a nice recursive loop of XkbDDXKeybdCtrlProc calling itself until the cows come home. commit 726dcd9e4ebfb09c0685450dca6e9fae7e773814 Author: Adam Tkac <atkac@redhat.com> Date: Mon Apr 7 10:20:02 2008 -0400 Fix Xvfb input when building against current X sources. commit 0f87b41a432a6472a15ec0c9dee997e3bddbd0f2 Author: Hasso Tepper <hasso@estpak.ee> Date: Mon Apr 7 14:09:04 2008 +0300 configure.ac: DragonFly BSD support Add support for DragonFly BSD, which is just the same as FreeBSD for all of these cases. commit 6b1a27023e48b661c4bb3b61181ac57608d8e448 Author: Owen W. Taylor <otaylor@fishsoup.net> Date: Thu Apr 3 14:50:05 2008 -0400 EXA: Fix TS origin computation when implementing RenderComposite with tiling. commit fd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab Merge: b46a00918 6c0cfe3d4 Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Mon Apr 7 07:56:41 2008 +0930 Merge branch 'master' into dcdc_rework Conflicts: Xext/xevie.c dix/dispatch.c commit 539bf3c2836727e7560c64144071b086f8ea32fe Merge: 3ab33e7cd 6c0cfe3d4 Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Mon Apr 7 00:10:16 2008 +0200 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 3ab33e7cd46c25dfc461b2a1b13e138225a94524 Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Sun Apr 6 23:23:47 2008 +0200 Remove stale code The jstk code for Joysticks is not used by any module, was never actually compiled and uses an API that is deprecated these days. No reason to keep it. commit b46a00918691cbd5ca80b6d3acae7614f93e073b Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Sun Apr 6 09:02:57 2008 +0930 dix: sprite may be NULL, don't dereference it then. In some rare cases (e.g. when the init fails) a device's sprite is NULL, dereferencing it to xfree the spriteTrace is a bad idea then. commit 638a50552e3e2190eac9721deb72e7365bdd52e4 Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Sun Apr 6 08:36:21 2008 +0930 dix: remove debug error message about XI->core type conversion. commit 8f38feb3e464986dc523dabd3447ba13263a3a4a Author: Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> Date: Sat Apr 5 20:37:09 2008 +1030 Xi: add comments for DeepCopyDeviceClasses, ChangeMasterDeviceClasses. commit 6c0cfe3d43b177c4cfaf7e228f32c655f9a98459 Author: Julien Cristau <jcristau@debian.org> Date: Fri Apr 4 19:01:40 2008 +0200 Fix the clock_gettime check for glibc-based non-Linux systems We need to define _POSIX_C_SOURCE on glibc, not just Linux, so add a new test for the __GLIBC__ macro. commit cc7c045bae01d90d8f1b750080ba48a96e983c68 Author: Adam Jackson <ajax@redhat.com> Date: Fri Apr 4 12:58:12 2008 -0400 Fix PCI config space cycles from int10 emulator. The top bit of 0xCF8 is an enable bit, not part of the domain. Sending cycles to domain 128 instead of domain 0 is rarely the right thing to do. commit d1de3dda8efe501d4192c8a99c34ab4265316c32 Author: Eric Anholt <eric@anholt.net> Date: Mon Mar 17 14:22:39 2008 -0700 Fix clock_gettime presence detect on FreeBSD. For non-Linux, _POSIX_C_SOURCE and friends restrict symbols defined rather than enabling defines of symbols. Additionally, CLOCK_MONOTONIC was apparently added to the standard around 2000 anyway, not 1993. commit ec17900f52bbd25d07566834756e5c7e832e0463 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Apr 4 10:46:45 2008 -0400 Convert __DRIconfigs after we've made sure createNewScreen succeeded. commit 16a8ce75585ea360c39e0ffce4f7bb26a359b754 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Apr 3 16:44:32 2008 -0400 Only autoload RECORD if it was enabled. commit d0395a753079f291a78d9ab86810b5f84f237491 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 4 15:05:26 2008 +1030 Xi: realloc to->valuator instead of allocing it blindly. commit 502689847b86be5619da7134646d55a1ac322a2c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 4 15:01:53 2008 +1030 Xi: ALLOC_COPY_CLASS_IF should only alloc if to->field doesn't exist. commit 035b1b6995e670ce5593e8aceb08f9ec812c70ea Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 4 15:00:06 2008 +1030 Xi: remove duplicate copying of kbdfeed and ptrfeed. commit 52fc7aed18930fc9e6bcfdd5dbc28ae559978288 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 4 14:47:23 2008 +1030 Xi: only alloc memory for feedback classes if it doesn't already exist. commit 4eb87c8693b57d9354832c76417797394656333e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 4 14:20:18 2008 +1030 Xi: don't free device classes before copying them. First commit in a series to come. commit f0915fb3c4a9712200882440a64d11dc595a02bb Author: Dave Airlie <airlied@redhat.com> Date: Fri Apr 4 09:29:51 2008 +1000 quirk: add quirk for ACER EDID commit 2e42b67b82db0f9128dd00e339b9dfdd9fe6d667 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 2 18:05:34 2008 -0700 XQuartz: Change reporting of space change to debug log rather than stderr (cherry picked from commit ed15556a9fc4ebdb88f42961052fc8456082165f) commit c737d04c758e03e32f692a31ed2a665ccbafa931 Author: Ben Byer <bbyer@apple.com> Date: Tue Apr 1 00:40:46 2008 -0700 The AppKit thread should not be calling directly into the X server functions to change state when the keyboard is reloaded; instead, pass it as an event. (cherry picked from commit 7e653f806ff5508aace059312156f319a9ed4479) commit 15b0084f1ab23042190d8beeb3f088b92dee5a10 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 23:31:25 2008 -0700 formatting cleanup for X11Application.m (no code changes) (cherry picked from commit eb083d3f68f459d90417558da1ed00729b749950) commit e9e2d88436597875f102085d216dc0a8fce1450a Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 22:55:24 2008 -0700 moved and renamed QuartzMessageServerThread to DarwinSendDDXEvent to make more clear what it actually does. (cherry picked from commit bee2b377efc930e25017636e5112093a3a6549c7) commit c1be4e3379d8780dff20390939b657ca0973995a Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 21:04:37 2008 -0700 shovelling code around ... (cherry picked from commit 2143182ba49195bbb2e9163ea6872fd68e7a4a85) commit 985c631b2e1f113039e6e620f030505435fd9815 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 20:18:58 2008 -0700 just a bit of juggling headers around -- we're preparing to call our Xquartz-specific event handlers directly as mieqHandlers (cherry picked from commit 4aedba5aa727e22316e8ca456f7218bea9ee0313) commit 89f1d880e83e32b72d35c4dbd6795defa6efa847 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 19:47:28 2008 -0700 nuke DarwinEventQueue (cherry picked from commit 1e0ec02202eeaffae480048b91bf02140ee29f8a) commit 8944b77ec0c18476a25ba3179bcc45b338be22b8 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 2 17:47:42 2008 -0700 continue with gutting darwinEvents.c (cherry picked from commit c34fce7051b996633291dddc061b696ff737f3fb) commit aa6d12e93e8661da841192ef7c3aa7c6a7731c7f Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 2 17:46:59 2008 -0700 turns out we weren't actually using these files. oops (cherry picked from commit bfec44d7b4baf0ad0aae55c8209bc60ac93c5b58) commit 6c5962e44730395f81cdb333322c9ad5242c32d4 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 18:15:18 2008 -0700 remove vestigal DarwinEQPointerPost etc (cherry picked from commit a25704c423598d596fd7f2ed4290d4b860bd5d5f) commit c6f0d5d1e51326e5110d27918d834eb0096df7db Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 17:48:09 2008 -0700 gut darwinEQEnqueue, and make it just call mieqEnqueue (for the moment) (cherry picked from commit a9e081a60ca227c0d96d4613075d97d6b762366a) commit 5b6c273eaa53d7b554d69c2b4865988068e73a26 Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 17:08:45 2008 -0700 add prototype for DarwinEventHandler (cherry picked from commit 9a03ae33c4f9de830f15eabf3b994882ead7c000) commit 3713be8b470b1ac0fcb4f1e4c6b79c526b2196db Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 16:30:16 2008 -0700 add logging of current thread ID to DEBUG_LOG macro (cherry picked from commit 5848510cc5a8091b30230ab920d904ca6b159480) commit 1400a51ae70d8e498d9ae3975f58ba7c1768ca6f Author: Ben Byer <bbyer@apple.com> Date: Mon Mar 31 16:24:01 2008 -0700 Begin to move all of our Xquartz DDX-specific event handlers to miEQ, in preparation to remove the DDX-specific code entirely. (cherry picked from commit 3f4447b95f73a82b3aa0f7b0d1640aba5fb0d1bc) commit 8746daa6732d9837f66d925f2fd74818ecbf8ba2 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Wed Apr 2 15:01:33 2008 -0700 XQuartz: Fixed missing close-paren in preference pane text. (cherry picked from commit ea37e151dc6032d2a1a33cef809f2a7d507aae35) commit b5a0a865c3045cc08c33388320d4ec3ab7065efb Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Apr 2 19:21:41 2008 -0400 Pick up dri2proto from the standard proto header include path. commit 8cde0af3c57f0375ba8ba77af9fdf74b79d9496d Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Apr 2 19:06:40 2008 -0400 Send the GLX_EXT_texture_from_pixmap attributes to the client. commit 7c20f65fea3dd3170cde89d7113d85f377671bfb Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Apr 2 18:00:06 2008 -0400 Add @XORG_CFLAGS@ to satisfy xf86* includes. Pointed out by Hasso Tepper. commit b13ab156894074fb38cc812738bc7aeeebd9614d Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Apr 2 12:38:36 2008 -0400 dri2: Unbreak glcore visual setup. commit b31de6a59044f91f8230aa581c9ca8540289c168 Author: Xiang, Haihao <haihao.xiang@intel.com> Date: Wed Apr 2 16:29:30 2008 +1000 dri2: fix crasher if DRI2Connect fails commit ebc56aca8bdfec1918cac3c8380895dfddea48ce Author: Hong Liu <hong.liu@intel.com> Date: Wed Apr 2 10:43:19 2008 +0800 Bug #15160: quirk Proview AY765C prefer first detailed timing commit 9500033b9ecdfaf5a56a4355ffc94d74cb17ca17 Author: Goneri Le Bouder <goneri@rulezlan.org> Date: Tue Apr 1 20:19:40 2008 +0200 xfree86: don't crash in AutoConfig if the primary device is not pci Only call matchDriverFromFiles() if we found a pci device. Debian bug#472823 (http://bugs.debian.org/472823). commit 37b1258f0a288a79ce6a3eef3559e17a67c4dd96 Author: Thomas Jaeger <thjaeger@gmail.com> Date: Tue Apr 1 15:27:06 2008 +0300 XKB: Fix processInputProc wrapping If input processing is frozen, only wrap realInputProc: don't smash processInputProc as well. When input processing is thawed, pIP will be rewrapped correctly. This supersedes the previous workaround in 50e80c9. Signed-off-by: Daniel Stone <daniel@fooishbar.org> commit a4d034941100c6ca3b7cc4e59952c2745b9306cc Author: Ben Byer <bbyer@bushing.apple.com> Date: Fri Mar 28 20:47:44 2008 -0700 Add code to track 5 valuators for pointing device, in preparation for supporting tablet input in Xquartz. (cherry picked from commit 22c8849ea819eb70a14b2e06330b11b22aa63ebc) commit 6648867d8bd1e86458d2ade77a3ee4567c3d6a97 Author: Ben Byer <bbyer@bushing.apple.com> Date: Fri Mar 28 18:27:02 2008 -0700 add debug statements so we can see if/when our Xinput stubs are getting called. (cherry picked from commit 6e160bbe15dd2c2b8685847c06831cb6aebc6f74) commit 19ff23ab0e72a27d05ed4470f75a0934d6f6c1d1 Author: Ben Byer <bbyer@bushing.apple.com> Date: Fri Mar 28 18:25:03 2008 -0700 Remove calls to InitValuatorAxisStruct -- these are now handled in dix by InitValuatorDeviceClass. Add InitProximityClassDeviceStruct call to prepare for tablet support. (cherry picked from commit 1bd980a5b114f5320360943214f8f9f23b29c1e3) commit 9f56fc580646a519875b5a1452738d8c6e1fa860 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 31 17:34:07 2008 -0400 XSELinux: Add a request to get a client's context from a resource ID. commit c40e0b51f0d9ef5e1f30f233d7db1e6db9d6681b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Mar 26 19:28:09 2008 -0400 Implement DRI2 direct rendering and update AIGLX to DRI interface changes. Get rid of glcontextmodes.[ch] from build, rename __GlcontextModes to __GLXcontext. Drop all #includes of glcontextmodes.h and glcore.h. Drop the DRI context modes extension. Add protocol code to DRI2 module and load DRI2 extension by default. commit 8074676d2df8d577b443e3fa5e22d7c71c944bd1 Author: Fredrik Höglund <fredrik@kde.org> Date: Mon Mar 31 21:24:59 2008 +0200 EXA: Optimize the eviction scanning loop in exaOffscreenAlloc. Reduce the cost of the inner loop, by keeping a set of pointers to the first and the last areas in the series, subtracting the cost of the first area from the score, and adding the cost of the last area while walking the list. This commit also moves the scanning loop from exaOffscreenAlloc into a separate function. Idea by Michel Dänzer. commit 93d876891dbba41b920a9a29a5de77f647f43928 Author: Fredrik Höglund <fredrik@kde.org> Date: Mon Mar 31 21:15:50 2008 +0200 EXA: Improve the algorithm used for tracking offscreen pixmap use. Replace the current score keeping algorithm with a rolling counter that's incremented in ExaOffscreenMarkUsed, with the previous value being stored in the area. exaOffscreenAlloc uses the difference between the counter value and the value in the area when deciding which area to evict. It now also takes the size of the areas into account, and favors evicting smaller areas. The credit for these ideas goes to Michel Dänzer. commit 7034484f0887ea0f8ab956515f2d9301ea5842ce Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 28 10:23:36 2008 +0200 gitignore: Add two more bits Get slightly better at ignoring vim swap files, and let people keep local changes if they want to. commit b8ea9f2a25aad88aee77a68f8e20ac07276f0dab Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Mar 28 17:00:08 2008 -0700 XQuartz: Fixed names of enums to be more consistent (cherry picked from commit c309a08806daf5d716a860c709e51eacad2c745a) commit bd28839eb866a9e6dc3ff80f13a67611da7eaf64 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Fri Mar 28 17:02:02 2008 -0700 =?utf-8?q?XQuartz:=20Another=20Expos=C3=A9=20fix:=20F9=20doesn't=20raise=20all=20windows =20(cherry=20picked=20from=20commit=20b9cffa20debae73737c674bf75ab65db1bd74556)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit commit 933ffcdf7d2eaaf7caabfe6f861f04bcb149918f Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 28 17:53:55 2008 -0400 Compile fix. commit 9e8451d869a4032ddb7de6a62920a3a7b0b1acc1 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 3 17:38:53 2007 -0500 Add E-EDID segment selection. commit 0b4aef4d6df7a5525d381de035fbbf78c5fffeef Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 3 16:00:00 2007 -0500 Refactor DDC2 code to allow for proper segmented addressing. commit 88ece11d6c45c6f4b94f7fb2da64a46e879d7c27 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 3 15:47:39 2007 -0500 Start E-EDID support in the DDC module. Since there's no way to safely know how many blocks xf86DoEDID_DDC2 would return, add a new xf86DoEEDID entrypoint to do that, and implement the one in terms of the other. commit b5f98fcea2024c67e598947782913982072cf4fb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Mar 28 14:01:34 2008 -0400 XSELinux: Add xorg.conf option for permissive/enforcing/disabled. Patch by Joe Nall. The option goes in the "extmod" subsection. TODO: Make it easier for extension modules to handle their own options. commit 415e49b940bba2d08870db410ebb47d2add5d836 Author: Jeremy Huddleston <jeremyhu@freedesktop.org> Date: Tue Mar 25 23:01:02 2008 -0700 XQuartz: Sanity-check the removal of the 256-color option Fixes the 'one-time-preferences' bug in 2.2.0_rc1 (cherry picked from commit 38cbd13490fc21724e8eef0ec7e1a20a9cc2e39d) commit c1d37efe9aae5f2895b3437418f7e4bb2eb3400f Author: Ben Byer <bbyer@bushing.apple.com> Date: Tue Mar 25 19:25:00 2008 -0700 xquartz: copy in new stubs from Xi/stubs.c to replace our old Xinput stubs. Hey, it's a start. (cherry picked from commit 566412b4aece24ae6af8c7c835986b685aa456a2) commit c4a616a741e15865ce0ff98781c6f1dca4d62887 Author: Ben Byer <bbyer@bushing.apple.com> Date: Mon Mar 24 22:43:10 2008 -0700 prevent "fake mouse clicks" from generating spurious extra events (cherry picked from commit bd85a24969427e41389688663ead2d4dd41c9999) commit c747030a49dd289e873e2b686cd129d840e55468 Author: Dave Airlie <airlied@redhat.com> Date: Thu Mar 27 15:18:39 2008 +1000 quirk: fix LPL monitors properly. no point having a h cm fix when we really want to copy the sizes from the other place. RH BZ 435216 commit 9df915b84d45d39aed7557c98883b20a66da2e96 Merge: 47eb658e8 333e7123d Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Tue Mar 25 17:50:50 2008 +0100 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 333e7123dc484888d79c0f5aa3977bd72f1eb341 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 25 12:48:22 2008 -0400 Fix that last commit. I can apply patches, really. commit 47eb658e802775021e3efec109f95431cca188ca Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Tue Mar 25 17:37:25 2008 +0100 Support to pass arbitrary options via HAL hotplugging Parse "input.x11_options" and pass every key/name pair to the driver. Remove check for input.capabilities, because that's part of the fdi files. Thanks to Dustin Spicuzza <dustin@virtualroadside.com> for the patch. commit e7a364425547103a98acabfc67d16e1ae0c2967f Author: Sascha Hlusiak <saschahlusiak@arcor.de> Date: Tue Mar 25 12:32:33 2008 -0400 Fix getValuatorEvents to compute number of valuators correctly. commit f028e245a7932362656701c08fcfbfa8e8949077 Author: David Nusinow <dnusinow@debian.org> Date: Thu Feb 28 19:45:21 2008 -0500 Bug #10016: Implement WM_CLASS hints in Xephyr. commit 862ff9ac92037e13629329eb6ba50ff6bd2c5f71 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 24 13:37:42 2008 -0400 Bug #11510: Fix build without RECORD. commit 87bfd3bd96c714a1c252d42408b5a1a4ff9dab06 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 24 13:33:38 2008 -0400 Bug #11508: Fix build without XV. commit 536f2ff5382aaaace3b55481e15366bb15d87801 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 24 12:22:19 2008 -0400 Bug #13962: Re-arm the DPMS timer when re-enabling DPMS. commit 4217ba0cf0c9bbea3774760e836ab372acf3237c Author: Julien Cristau <jcristau@debian.org> Date: Sat Mar 22 17:31:08 2008 +0100 xaa: use xf86ReturnOptValBool instead of xf86IsOptionSet The latter doesn't return the option's value, just whether it's present in the configuration. commit 6b9d2bb1f7f87acbf275027af9c2982e91e5faed Author: Julien Cristau <jcristau@debian.org> Date: Sat Mar 22 17:28:48 2008 +0100 exa: use xf86ReturnOptValBool instead of xf86IsOptionSet The latter doesn't give you the option's value, it just tells you if it's present in the configuration. So using Option "EXANoComposite" "false" disabled composite acceleration. commit 63859473965f911515bc6e8d87b32a65ec41eb73 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Fri Mar 21 19:31:31 2008 -0700 XQuartz: Disable 256 color option and fullscreen option (cherry picked from commit 7c1964338a33558d3f25e369dfca99e3ef9d10f9) commit 93daa3a3bf1a981757024847882ce92b6bdaae83 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Fri Mar 21 19:11:59 2008 -0700 Xquartz: Added separate preference tab for quartz-wm settings Added FFM and "Focus on new window" options (cherry picked from commit 6841d078b7cb0b0db3db948d26b4d5ec7747deb8) commit c49e11268322712c211f29d51d664d3f8a59b00b Author: Jeremy Huddleston <jeremy@tifa.local> Date: Fri Mar 21 18:07:38 2008 -0700 XQuartz: Initial framework for dealing with spaces on OS-X (cherry picked from commit 9831324998f9d1f05ff944c58c5bf60dcae17355) commit 4c76607b699431183ee7e88fa7818cb7644a5a02 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Mon Mar 17 23:57:41 2008 -0700 Rootless: Removed safeAlphaXXXX() in favor of using fb/pixman (cherry picked from commit f03202ad15457c98be7ca78cc59bac88cf5f1966) commit 87c64cfd6901083da5a9375d0bde65691d374b5b Author: Jeremy Huddleston <jeremy@tifa.local> Date: Fri Mar 14 17:31:54 2008 -0700 =?utf-8?q?Apple:=20Xserver=20half=20of=20the=20Expos=C3=A9=20bug-fix=20(requires=20updated=20libXplugin=20from=20Apple...=20coming=20with=202.2) =20(cherry=20picked=20from=20commit=2037be23e8c1d8e5c7a1157e9d66ef3f30a4c472c5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit commit 3bbd77ff98478153afe3251de9ba11d757218213 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 20 20:03:02 2008 -0400 XSELinux: Do a check for whether background "None" is allowed. commit e323bb426ce8a072d119cb2720b773241259c137 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 20 19:42:09 2008 -0400 XSELinux: Correctly handle some permission bits that are used more than once. commit da973e962d09854b571320dee7dd9569060bc39e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Mar 20 09:18:29 2008 -0400 Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB This patch (and not setting HARDWARE_CURSOR_BIT_ORDER_MSBFIRST on big endian platforms) fixes it for me with the radeon driver and doesn't break intel. Correct patch this time :) commit f8c1eb29e28818895d744c4e1d6897353d51790b Author: Alex Deucher <alex@cube.(none)> Date: Thu Mar 20 09:14:41 2008 -0400 Revert "Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB" This reverts commit 267352579612155adfd4743432d6569b2cdeebde. Pushed the wrong patch. commit 267352579612155adfd4743432d6569b2cdeebde Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Mar 19 19:12:37 2008 -0400 Fix RandR 1.2 driver interface conversion of two colour cursors to ARGB See bug 11796 commit 060a99444ee25a684b0ab9b4819bf8e855aea2d8 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Mar 19 16:04:16 2008 -0700 Make Xevie private symbol names less generic Makes it easier to figure out what you're seeing in the stack trace instead of wondering where in the server "ProcSend" is. commit f37046984d7839faefa4d716624e4a85ddde9634 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Mar 19 14:06:53 2008 -0700 Xevie cleanups, byteswapping fixes & request length check fixes commit edad0a9dfebcce5c54b2f9c32bd9d45549e20c51 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 18 17:51:21 2008 -0400 Apply __glXDisp_GetVisualConfigs message patch From http://bugs.freedesktop.org/show_bug.cgi?id=13863 Problem was that the glxcmds.c __glXDisp_GetVisualConfigs function left garbage in the tail end of the message used for extensions. commit cdadd2ff9bade318caac5c1d9bcdc8a001347da9 Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Mar 18 14:00:15 2008 +0100 [Xephyr/DRI] correctly route motion events targeted at GL drawable commit afd7428690d87097117ab20335658f6d59d60103 Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> Date: Mon Mar 17 14:55:44 2008 -0700 Cleanup logic in xf86PrepareOutputs Should have done this in the first place. Since we're checking for the absence of the get_crtc callback in the first place, we'll short circuit the later call and disable the output, so the ugly "continue" block is unnecesary. commit ba85caacb565b9aa0aeace52a362350304b0566d Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> Date: Mon Mar 17 14:13:09 2008 -0700 Make xf86SetDesiredModes aware of current output configuration By adding a new output callback, ->get_crtc, xf86SetDesiredModes is able to avoid turning off outputs & CRTCs if the current output<->CRTC mappings are the same as the desired configuration. This helps avoid flickering displays at startup time, which speeds things up a little and looks better. commit bee2ddf35f75086cee951142098637f2c756b96b Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> Date: Mon Mar 17 08:33:01 2008 -0700 Fail CRTC configuration if !vtSema Unless we check for vtSema before calling into the CRTC and output callbacks, we may end up trying to access video memory that no longer exists, leading to a crash. So if we don't have vtSema, return FALSE to the caller, indicating that we didn't do anything. Fixes #14444. commit db248ffb840a0c113b6eb508a0fa1e74e752474d Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 16 18:46:11 2008 +0100 test for the presence of pci_system_init_dev_mem() before calling it. This avoids creating a dependency on -current libpciaccess for BSD systems other than OpenBSD (which don't otherwise need it). commit aa231f28d56402d7daea6cbd3002fbf760f79497 Author: Donnie Berkholz <dberkholz@gentoo.org> Date: Fri Mar 14 18:41:25 2008 -0700 Xephyr: Build fix: Port across XF86dri.c changes from Mesa. commit a955c3b587b22b8bf20cb6bedbbec4ad5fcb32ac Author: Donnie Berkholz <dberkholz@gentoo.org> Date: Fri Mar 14 18:41:07 2008 -0700 Xephyr: Distribute ephyrdriext.h in tarballs. commit 090b26db767d296e7a3452da83b136d1caa0ed01 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 14 21:58:27 2008 +0200 XkbCopyKeymap: Fix broken indentation An astute observer will note that the entirety of XkbCopyKeymap is indented with spaces, and no tabs whatsoever, and not commit changes which break the otherwise consistent indentation. A non-astute observer will note the breakage when the commit mail comes through with clearly broken indentation. A polite, non-astute, observer will then fix it. C'est la vie. commit 88bec0915e3867f8dbf859a3dfbb771d0d07092d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 14 21:54:13 2008 +0200 mi: More meaningful assert crashes When we fail an assert in miregion.c (which happens every now and then, though I haven't yet checked up why), at least generate a segfault, so we'll get a backtrace. commit 57d48d94b8947c571925e6fd4c9bf041fbd1b2ac Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 14 14:37:42 2008 -0400 Fix a stray use of ALLOCATE_LOCAL. commit 824853772241acf64bc37ac8b85254194741ae13 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 14 14:24:21 2008 -0400 RANDR 1.2: Fix initial mode aspect ratio match in a corner case. Actually more like in the mainline case, where the ideal mode happens to be the very first aspect match on the first monitor. But let's not split hairs. commit 1b9878ffcfc0c0dbc4a6e674827fe508ba77db4b Author: Bart Trojanowski <bart@jukie.net> Date: Thu Mar 13 17:42:16 2008 -0400 Bug #14332: Fix PCI access cycles from x86emu. The address written to 0xcf8 contains the PCI slot address to send the config cycle to. However, we would ignore that and always send the cycle to the device whose BIOS we were running. This breaks some integrated graphics platforms that have explicit knowledge about the system's host bridge, for example. commit f7abe05b3306ed9a6f2cf5e3e45ed524d725d029 Author: Doug Chapman <doug.chapman@hp.com> Date: Thu Mar 13 17:40:34 2008 -0400 Bug #14091: Fix build (and runtime) on ia64. commit 5d7437c29e686a081b20823450d78c4c2f4e0aec Author: Adam Jackson <ajax@redhat.com> Date: Thu Mar 13 17:37:12 2008 -0400 RANDR 1.2: Fix the RANDR 1.1 screen size estimation to approach reality. While the ScreenRec's notion of size in millimeters would get updates, the RANDR 1.1 notion wouldn't, so your screen would appear to be square and probably at some ludicrous DPI. commit 61c3f63a75d8b0cc47ffed4a0e30147fab2ae8f4 Author: Adam Jackson <ajax@redhat.com> Date: Thu Mar 13 17:34:54 2008 -0400 RANDR 1.2: Don't report a square resolution to RANDR 1.1 clients. It can't possibly do anything useful, and older versions of Gnome (and proably others) get very confused by it. So do the drivers, for that matter. commit 06c0372c3a1b45005eb6d50406f77f4e93f1de1e Author: Mark Kettenis <mark.kettenis@xs4all.nl> Date: Wed Mar 12 21:45:37 2008 +0100 OpenBSD support for libpciaccess. xserver and libpciaccess both need to open /dev/xf86, which can only be opened once. I implemented pci_system_init_dev_mem() like Ian suggested. This requires some minor changes to the BSD-specific os-support code. Since pci_system_init_dev_mem() is a no-op on FreeBSD this should be no problem. commit 2036851125226065891f13583ade3ce559e7bd37 Author: Matthias Hopf <mhopf@suse.de> Date: Mon Mar 10 19:29:07 2008 +0100 Return randr interface version in xf86CrtcScreenInit() Necessary to allow drivers to be run-time backwards compatible when using the modes/ functions w/o providing their own copy. commit c7536f4b87e089a7e7c43026b189922fec70c565 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 11 13:11:04 2008 -0400 Silence REGION_INIT() warning. Evaluating the address of a BoxRec as a boolean gives this warning: i830_driver.c:2317: warning: the address of 'ScreenBox' will always evaluate as 'true' which is pretty annoying. This patch compares the address to NULL to avoid the pointer->bool conversion and gets rid of the warning. Seems like a lame hack, but the warning is worse. commit cc05255191413b3f376edbc600122ff085f45f7b Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 11 00:51:43 2008 -0400 Make WriteToClient take a const void * like any decent IO write function. Enough with the casting. Doesn't break API or even ABI, but does make a lot of silly casts superfluos. commit bc504ffbba3dec2e3467bab8ba1ac25db6dd317e Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 11 00:35:31 2008 -0400 DRI2: Add DRI2AuthConnection(). DRI2 uses the same authentication scheme as XF86DRI, so implement this entry point so DRI2 protocol code can access it. commit b2657ec5981122e7cc0bda0d8802aec63cde9014 Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 6 16:51:57 2008 -0800 XkbCopyKeymap was mangling doodads and overlays commit ab9b0b36ac8ac72fc48c0abd91a83de49a18313c Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 10 13:40:00 2008 -0400 Add the "amd" driver to magic driver selection. commit 0f6aaf636b7ac4c98467284ff7baf1b83e0b72e7 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 10 09:14:20 2008 -0400 Bug #14927: Fix the math for xf86NumDefaultModes. commit 01c2e01f2aee580438b74bfb9da8f584f3878e6b Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> Date: Sun Mar 9 21:40:27 2008 -0400 GLX: Track changes to DRI_TEX_BUFFER extension. We now just pass in the __DRIdrawable. commit acedc03367e9e69f03b4838f0f0e8d8a8e872b9b Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> Date: Sun Mar 9 21:39:19 2008 -0400 DRI2: Return event buffer head index in DRI2CreateDrawable. And pass it to the DRI driver in AIGLX. commit 911f0c147699d3b8d97491be2ef6d2e4a6682a0b Author: Julien Cristau <jcristau@debian.org> Date: Fri Mar 7 23:24:06 2008 +0100 Programs in hw/dmx/examples/ want client-side xkb headers. commit 9abaad115cb6245b12b2adb3552ace99b634ab4a Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 7 14:12:28 2008 -0500 Fix DRI2 texture target for GLX_EXT_texture_from_pixmap. Thanks to Dennis Kasprzyk for pointing it out and for reminding me to commit it. commit 3bf7ff70323d533a3a05c0f3e22393e63beada99 Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 7 09:25:06 2008 -0500 Size xf86DefaultModes explicitly. i.e., don't check for the end of the list by ->name == NULL, since that won't work now. Fix the consumers of xf86DefaultModes to use the new explicit size as well. commit 3fcb6445dc08f42488287162e3b7009d405e9c5b Author: Adam Jackson <ajax@redhat.com> Date: Fri Mar 7 08:29:49 2008 -0500 Fix segfault when a monitor exists but has no modes. Thanks to Zhenyu Wang for finding this. commit a8d760f567b19268329c4682495caa591f08a854 Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Mar 2 20:13:11 2008 -0800 Get modes code building with old X servers again. This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2" since XORG_VERSION current went backwards at some point. commit ca616b902b2c5d0f046c7a042c11f045479e373a Author: Jesse Barnes <jbarnes@jbarnes-t61.(none)> Date: Thu Mar 6 13:47:44 2008 -0800 Allow RandR get output property to call into drivers In order to report accurate values to users of the RandR property interface, it's sometimes necessary to ask the driver to update the value (for example when backlight brightness changes without the server's knowledge, due to hotkey events or direct sysfs banging). This patch wires up the core server code with a new xf86CrtcFuncs callback, get_property, to allow for this. The new code is available under the RANDR_13_INTERFACE define, which in turn depends on the RANDR_12_INTERFACE code. commit 34b69e3bc0e6462eb60029fbcb4f5479494007a2 Author: Adam Jackson <ajax@redhat.com> Date: Wed Mar 5 23:56:49 2008 -0500 Fix distcheck. (cherry picked from commit 2a47accff8dccded4dfe031f9366c028ba927824) commit 8e562fe26ff77c03be0855afb08e43f3ed0bd4b9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Mar 5 15:11:41 2008 +1030 Xi: remove false memset from DeepCopyDeviceClasses. It's wrong, needs to be different, but I haven't had enough coffee to figure out what it needs to do yet. commit d4101140f4e569f18554cf0cbf43138d08bd1277 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 4 22:39:41 2008 -0500 xselinux: Implement polyinstantiation support and related protocol. commit cf984dcc156958d4f8d98110e7add150628ce97e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Mar 4 16:03:04 2008 -0800 Make sure SIOGLIFCONF buffer is properly aligned for socket structures commit 27e7dacbf7ef17712be31ff90f98ee3a5c5cf909 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 4 11:38:34 2008 -0500 Make xf86InitialConfiguration slightly smarter. Old heuristic was to find the first monitor that expressed a preference, then attempt to get all other monitors to agree. This doesn't work particularly well when the two sets of modes don't precisely intersect, you get overlapping-but-not-identical output geometry and things go wrong. New heuristic is: - Exact user preference, if given - Exact output preference, if the same for all outputs - Best (largest) mode of modes common to all outputs: - with the same aspect ratio as all outputs (may be NULL) - with 4:3 aspect ratio - Then the old heuristic to try to get something lit Note that it is simply not doable to have a reliable initial output guess if you insist on trying to clone all outputs together. It's far too easy to end up with displays that simply don't have modes in common. We need to switch to right-of placement someday, once we're not limited to CRTC size limits and we have working multi-GPU in RANDR. commit 95df04b744c6a3498a9a9e2ea9bb03ee780e60f8 Author: Adam Jackson <ajax@redhat.com> Date: Tue Mar 4 10:59:24 2008 -0500 Remove all mention of the vga driver from the config logic. commit 7b4f3616f75a541b819d99c28bb6cb73761b6066 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Mar 4 18:29:15 2008 +1030 Xi: add deviceid to QueryDevicePointer request. Why not, we had the padding anyway. Suggested by Jim Gettys on the X.Org mailing list. commit 056a2ce02ce85013e89055ee44a7aa3eabedac09 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 4 02:44:48 2008 -0500 XACE: Check the return value of the selection create hook call. commit 4f2cd0ed96d3b10c78774c721c2ffbfb0556dddd Merge: 23ae68a4c 453661a9e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Mar 4 18:11:10 2008 +1030 Merge branch 'master' into mpx This merge reverts Magnus' device coorindate scaling changes. MPX core event generation is very different, so we can't scale in GetPointerEvents. Conflicts: Xi/opendev.c dix/devices.c dix/dixfonts.c dix/getevents.c dix/resource.c dix/window.c hw/xfree86/common/xf86Xinput.c mi/mipointer.c xkb/ddxBeep.c xkb/ddxCtrls.c xkb/ddxKeyClick.c xkb/ddxList.c xkb/ddxLoad.c xkb/xkb.c xkb/xkbAccessX.c xkb/xkbEvents.c xkb/xkbInit.c xkb/xkbPrKeyEv.c xkb/xkbUtils.c commit 72f2197545e734cd0aa785d05a57b2fc0351a763 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 4 02:02:54 2008 -0500 dix: Convert selection list to a linked list. Fixes a bug where pointers were being invalidated after a realloc. commit 0bd0f90d7c7928052197da7119177e5a1c9eee2c Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Mar 4 03:47:36 2008 +0200 XKB: Fix initial map setting on startup Due to an unwitting sense inversion when eliminating XkbFileInfo, we were setting the complete wrong keymap on startup (non-XKB map if we had an XKB map available, or the XKB map if we didn't have any available). Invert the sense properly, and add two small bits that also went missing in that commit. commit 613852ce6a821ce6f6382fc14629f517776a3701 Author: James Cloos <cloos@jhcloos.com> Date: Mon Mar 3 16:10:04 2008 -0500 Fix some documentation typos commit 3f23139137e024e09d207be05a61968100cf53e8 Author: Jesse Barnes <jesse.barnes@intel.com> Date: Mon Mar 3 13:05:12 2008 -0800 Add cscope files to .gitignore commit 708f07753ff22ade54e9ee8885e4198fff363b87 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 3 15:49:48 2008 -0500 RANDR 1.2: Inherit PreferredMode from the global configuration, if any. If you don't do this, then Modes "800x600" in the Display subsection will be dutifully ignored and the driver will start at whatever resolution it feels like. commit 605e6764dfd3e9cb917b9cfcd92fe89857c1a1c9 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 3 15:45:17 2008 -0500 Fix Motif menu drawing in Xnest. See also Red Hat bug #229350, OpenSolaris bug #6366490. commit 3b73d62791d925c465ec855f96981d151dd3c179 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 3 15:43:22 2008 -0500 xf86DDCMonitorSet: Honor the DisplaySize from the config file. We honor sync ranges and pixel clock settings from the config here, no reason to ignore DisplaySize. commit 7c16b68ab879f5b4b1aedfc6b2aadbe56193dd19 Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 3 15:09:11 2008 -0500 1.5 has branched, start 1.5.99.x. commit f7ab2d3821e6bccc943f088e308fd58395a186d2 Author: David Nusinow <dnusinow@debian.org> Date: Sun Mar 2 18:36:25 2008 -0500 Add missing file from previous commit. commit b5ce0e1d0b861dc5521fcd9db6287ed6da817726 Author: David Nusinow <dnusinow@debian.org> Date: Sun Mar 2 17:12:02 2008 -0500 Bug #13860: Ensure that the DRI mode is in octal format. commit c934366424b0d20e013c84e6b94b226b20e7baa2 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 2 19:27:53 2008 +0100 use UTILS_SYS_LIBS to pass SYS_LIBS to utils/ioports correctly commit 2bb9c1f36f685044b837f42076dec2ea7d22d034 Author: David Nusinow <dnusinow@debian.org> Date: Sat Mar 1 18:44:58 2008 -0500 bug #10008: Make Xvfb.1 document the correct default depth commit b0b9c811cda3e35a8f6d0813483f750602c55ff6 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Mar 1 20:24:50 2008 +0200 fix typo commit 3d642905477f4b1ec3223f1fbe0d0d37e959ec81 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Mar 1 16:18:18 2008 +0200 clean some "unused" warnings commit e7a6f79754816976d92857d55840262cccff80a6 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Mar 1 16:16:29 2008 +0200 glcore: split mesa and X in build system commit cdd46aa3cd2e720558186cdbe48d871ab385fcdd Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Mar 1 15:57:57 2008 +0200 configure: minor cleanup - dmx - darwin: remove from xorg options - xephyr: libxv is client lib commit 8af2c39bcc4ddc4693d5a2597c9622fa17b6c272 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sat Mar 1 16:54:01 2008 +0100 Fix big mistake in commit fd41f46ac62033a724bd1f4612f19448a21c1224. - When a mode is deleted, the name pointer is also free()'ed. - This leaves other modes with an invalid pointer. commit ef60632e200853680282016e32a7a9fb01882852 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 29 18:00:27 2008 -0500 dix: Modify callers of property and selection API to use new interfaces. commit cc76ea6e3ac6a405f0c198c4e62be40aa8d2b546 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 29 17:55:31 2008 -0500 XACE: Add generic support for property and selection polyinstantiation. commit 34bf308a9e66f1a2f48630a15b1802afad50ec24 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 29 18:00:23 2008 -0500 dix: Refactoring of selection code to allow for polyinstantiation. Introduces dixLookupSelection() API. Removes NumCurrentSelections from API. commit d5715f7beaad6816db27b01b67d7a3c69164d106 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 29 16:16:12 2008 -0500 dix: Refactoring of property code to allow for polyinstantiation. Introduces dixLookupProperty() API. commit c0e1959f285d7a7df66f42d55912a5a595decd0f Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 29 16:45:11 2008 -0500 On second thought, revert that, it'll make large pixmaps painfully slow. Need to just fix the callers. commit 4a44fe7c8678360d0549cf0e0d63870f3623b1db Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Feb 29 16:43:14 2008 -0500 Bug #10465: Use calloc() for allocating PixmapRec's. commit 5d5fcc7198ca54fa9dc24fe974763eff9fddabee Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Feb 29 16:42:04 2008 -0500 Bug #10464: Set pixel value to 0 before FindColor() commit 8f0a4282f0ac33625eda9466e3db0bcef64e403a Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Feb 29 16:39:29 2008 -0500 Bug #10463: Always initialize reference pixel before AllocColor() commit b7eb92774a58639aff3f26bb28a3dcff910c3fb6 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jan 12 01:22:05 2008 -0500 EDID 1.4: Print additional CVT support data in the log. commit 31014d88aff8dc8a502cf0f26e4cde141e1a92f5 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jan 12 01:03:44 2008 -0500 EDID 1.4: Decode additional CVT support information. Table 3.28: Display Range Limits & CVT Support Definition commit d1c48955f80692a32ab6adcee1384e3d298f471a Author: Adam Jackson <ajax@redhat.com> Date: Sat Jan 12 00:30:58 2008 -0500 Fix CVT abuse in DDCModesFromStandardTiming. CVT is enough different from GTF that it should not be used on monitors that aren't expecting it. This brings us closer to what the spec says the correct behaviour is. commit 26c2e95fa5bf30726356cf4bdd0fea32a771a179 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jan 12 00:09:34 2008 -0500 Nuke a duplicate SYMFUNC(xf86CVTMode) commit ca5625b911e65fdfd410247b3eff57fedcfc1f79 Author: Adam Jackson <ajax@redhat.com> Date: Sat Jan 12 00:08:00 2008 -0500 Add xf86GTFMode(). This should probably be shared like xf86CVTMode(). commit 4cb4817c1072e1d31333db47d95f71d08bf0d1dc Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 23:38:48 2008 -0500 Remove the duplicate copy of xf86cvt.c commit e65e51a99b17a0510782775f010e9820ca567fcb Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 23:19:20 2008 -0500 Constify the built-in mode tables. commit 6828d8fc2b464e0755f46e3fbdeb07be0c38b620 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 22:57:42 2008 -0500 Clean up DisplayModeRec handling in many places. Use xf86DuplicateMode() instead of rolling our own, and change malloc+memset to calloc. commit 85617b56e5e00e7b8c7d8ce5b49af289056921a7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 22:55:37 2008 -0500 Remove some #if 0 guarding code duplicated in xf86Modes.c commit fd41f46ac62033a724bd1f4612f19448a21c1224 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 22:38:21 2008 -0500 Allow xf86DuplicateMode() to work correctly on read-only modes. Before this it was meaningless to try to mark DisplayModeRec tables const, since the mode name would be emitted as a pointer to an anonymous string constant, and therefore would have to be fixed up by ld.so and so couldn't live in .rodata. With this change the standard mode lists can live in .rodata, and modes duplicated from them will have their names filled in on the fly. commit 8ac19d16a030ec416e30d3650cf43e024ada167f Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 11 21:58:21 2008 -0500 Add several comments documenting our EDID failures. commit 13bfa5937d43392f686b76a99ea6331e3dce5987 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Feb 29 15:10:36 2008 -0500 GLX: Adjust to changes in DRI driver interface. commit d04ea267a4a51c16088d9ef429681a1edde536b1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 28 21:53:16 2008 -0500 xselinux: Don't require device "read" permission for XQueryPointer. These keyboard and pointer state polling calls are a real problem. commit 3fb17a3e647e926688c91a49a9b5b97f37dbc367 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 28 21:52:57 2008 -0500 xselinux: Log messages to both libaudit and Xorg.0.log. commit 4d91b1d5e422c5c460b1b7050baa9487a59b8aa8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 28 21:52:32 2008 -0500 XACE: Adjust the location of the COMPOSITE creation hook. Avoids incrementing the refcnt if the hook fails. commit 5675ae1f72145e9b719c613023da525731b42461 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 28 18:12:52 2008 -0500 XACE: Call the creation hook to properly label COMPOSITE window pixmaps. commit 27bcf40cda1d7c52b189cc76528f1f51cbe1d5eb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 28 16:43:43 2008 -0500 XACE: Fix instances of DixUnknownAccess at hook callsites. commit 453661a9e193a511cf5e54e6d330454163817316 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 27 20:43:50 2008 +1030 Xi: swap the control attached to a ChangeDeviceControl request. Bug #14170 Just swapping the request's data isn't enough, we need to swap the actual control as well. X.Org Bug 14170 <http://bugs.freedesktop.org/show_bug.cgi?id=14170> commit aebd9dc252449747416b23c740a550d914275399 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Feb 28 01:22:31 2008 -0300 Oops, there's one more parenthesis. commit f616735f17a681e3add866bf199540327c322490 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 27 22:46:14 2008 -0500 xselinux: Prefix a few remaining error messages with "SELinux". commit e40cc5305bec656108077ab13fcc8e6e82b3707a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 27 22:29:15 2008 -0500 xselinux: Don't throw BadAccess if DixUnknownAccess is passed in to a hook. The avc will still appear, however, so that the callsite can be fixed. commit 3b1df47bd400be9dca34b5e5d1ac2b117f8cc4ed Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 27 22:28:54 2008 -0500 XACE: Require "manage" permission for XKBSetNames. commit 08afc70513e5496cc5cd8b76c8658c4292119e4b Author: Dave Airlie <airlied@redhat.com> Date: Thu Feb 28 10:45:41 2008 +1000 quirks: another LPL panel with the cm/mm wrong commit f6d51797a523ecc2d4a8f18b2681160fcd5d1d55 Author: Maarten Maathuis <madman2003@gmail.com> Date: Wed Feb 27 23:44:39 2008 +0100 EXA: Let the driver decide what repeat/extend types are supported. commit 41aea6194bd29ab34cc166b3fd90eee64299ddf8 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed Feb 27 17:06:27 2008 +0000 More checking for failed contexts/drawables commit 43e46a654fa7cf69f0c8bcb7f583008d96a98686 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Wed Feb 27 16:58:21 2008 +0000 Fix context sharing between direct/indirect contexts commit d74b0327e8355546e6b41e8ce684f461d65fa9dc Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Feb 27 09:48:10 2008 +0100 [Xephyr/GL] unbreak the build Don't touch Xephyr DRI stuff when not compiling in a DRI environment. commit 2257e20900460d85254734b595238e7ad5ee55c8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 27 17:15:28 2008 +1030 dix: set dev->key to NULL after freeing it in CloseDevice. (Bug #12830) Otherwise XkbRemoveResourceClient may try to dereference it lateron. X.Org Bug 12830 <http://bugs.freedesktop.org/show_bug.cgi?id=12830> commit 3f0681fb0b2d0744c2ef892883ae5359b43a4a9a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 26 23:14:29 2008 -0500 xselinux: Stub out selection protocol requests. commit 4632ea22580c31d44b0786321668d9e78f02900e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 26 22:00:52 2008 -0500 xselinux: Rip out the selection code in advance of polyinstantiation support. This resolves an issue where BadWindow errors were being thrown. commit c8e979b3b800e4c58be454daa0213285d4ee6510 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 26 21:34:22 2008 -0500 security: Register resource names in the server-side name registry. commit d12b7b6632fb4cf41d2e28c7792eaa503f25404a Author: Dave Airlie <airlied@redhat.com> Date: Wed Feb 27 07:08:00 2008 +1000 xf86Crtc: add higher level modesetting entry point. For kernel modesetting work we need a bigger stick to beat the modesetting path commit dcc077c753137f37aa58231f1df3c4adb92b2c4b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Feb 26 12:13:06 2008 +0100 AIGLX: Switch to server context for calling DamageDamageRegion(). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=14518 . commit 23ae68a4c74a2ec90b4130c37b0d0aec3f4082ce Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 26 15:12:36 2008 +1030 dix: before copying the classes the first time, set the VCK's classes to NULL. XkbFinishDeviceInit does the following: xkbi->kbdProc= pXDev->kbdfeed->CtrlProc; pXDev->kbdfeed->CtrlProc= XkbDDXKeybdCtrlProc; If we directly copy the device classes for the VCK, pXDev->kbdfeed->CtrlProc at the time of copying is still XbkDDXKeybdCtrlProc. So at some point XkbDDXKeybdCtrlProc is called, and calls itself, and calls itself, and... Setting the device's classes to NULL seems to fix things. The memory isn't lost, it gets stored into the devPrivates and freed at device closing time. commit ce9fb2f8c4610016e49321018fc9b24729380afc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 26 13:19:54 2008 +1030 Xi: MDs return the paired device's ID in attached field of ListInputDevices. commit c46f7b62d2bf9f35937cfef98325ed904895396a Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 18:14:08 2008 -0300 Fine, we don't need pciInit() anymore. Nuke, nuke, nuke... commit a9050d54249ed9f54c6fe59143b846c9c7548f59 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 18:10:18 2008 -0300 Jesus, pciInit() was called 32 times in my machine without need! xf86scanpci() will always call pciInit() before any other function, so there's no need to guarantee it after. commit 81272f7ec9a3465e1d102c2ce627a45f92268857 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 17:39:33 2008 -0300 Some doc clean up: clean up legacy things in os-support/bus/Pci.c. Put InitOutput() comment to its right place. commit 7c582dd6de27d2f4fedf73319d2dea2bfb240efa Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 17:31:37 2008 -0300 remove lnxPciInit() unused function. commit 9727db88d57089be6483104de435626cdbad883a Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 17:08:07 2008 -0300 No more "-scanpci" given that we already have it in libpciaccess. (Yeah, lets nuke dead code!) commit f19f7b8e53ed6609fc1fdd272de5521417946209 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Mon Feb 25 17:07:07 2008 -0300 Clean some garbage caused when pciaccess was merged: FindPCIVideoInfo() function isn't need anymore. xf86scanpci() is being called only once so we don't need permanent (static) variables there. restorePciState() is not used for now (until we find why multiple cards aren't working). commit d61f481a4455dd2a94674d2b7b26429cf9dcece3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 25 17:52:45 2008 +1030 Xi: remove GetPairedPointer handling. obsolete, ListInputDevices provides this information now. commit 27b21278939a06ab6a22c9902f202eae6c5fae72 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 25 17:00:42 2008 +1030 Xi: remove ungrab handling of ExtendedUngrabDevice request. This can be done by UngrabDevice, no need for separate codepaths. commit 4b50e71bf127c8e0f289e3b76c786f0398effe65 Author: Adam Jackson <ajax@redhat.com> Date: Sun Feb 24 20:25:13 2008 -0500 Bug #13736: Fix %bx in VBEGetPixelClock to match spec. Reported by Yannick Henault. commit 6dc369028d3ca741de57ad78febf2f5f82e0696e Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sat Feb 23 00:01:02 2008 -0800 XQuartz: Quit now properly warns the user (cherry picked from commit ed3d7b3959c2a0cb63e37210455bcc6cf195b807) commit e6a4cde16dc99ea02ac93da1d1b9517b1073d159 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 22 18:36:29 2008 -0500 Use the client-side XKB headers for the config utilities commit 347db49ebe4596db16455ea8a1a608cfa826c5c7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 22 16:05:33 2008 -0500 s/via/openchrome/ in the autoconfig logic. Xorg's via driver is effectively dead anyway. commit 69f782676797744815ff76b8a11b11178066f501 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 22 16:04:35 2008 -0500 Match Xephyr DRI definitions to the ones in xf86dri.h commit 060a66b6e2feddba43ed207b6fcf2cf1f7fe39fd Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 24 15:55:58 2007 -0500 Normalize swapped dispatch for Fixes{ChangeSaveSet,SelectSelectionInput} commit 24bebdded44a9e184455b4fee7800257fee81efb Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 24 15:07:49 2007 -0500 fbFillRegionTiled() is now dead code. Only ever called from the old PaintWindow* screen hooks, but those are gone now. As a pleasant side effect, fb loses its #ifdef PANORAMIX. commit ee21aba6be0078949204e315ddfffd99de60c2f1 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 24 13:13:19 2007 -0500 Fix Xinerama's consolidated visual handling. Formerly the code claimed it could only handle up to 256 visuals, which was true. Also true, but not explicitly stated, was that it could only handle visuals with VID < 256. If you have enough screens, and subsystems that add lots of visuals, you can easily run off the end. (Made worse because we allocate visual IDs from the same pool as XIDs.) If your app then chooses a visual > 256, then the Xinerama code would throw BadMatch on CreateColormap and your app wouldn't start. With this change, PanoramiXVisualTable is gone. Other subsystems that were using it as a translation table between each screen's visuals now use a PanoramiXTranslateVisual() helper. commit a4202b898f07dd733590ae5adb21e48775369781 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Feb 22 18:22:58 2008 +0100 XKB: Actually use the keymap we compile at startup During XkbInitKeyboardDevice, we compiled a keymap and promptly threw it away; brief inspection revealed the embarassingly simple problem. Sorry. commit c14fd2a5cb3f45d5c4502e09f55f5e3732c5e698 Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Feb 21 15:33:02 2008 +0100 [Xephyr/GL] properly route expose event on GL drawables When an expose event happens on an host GL window paired with an internal drawable, route that expose event to the clients listening to the expose event on the internal drawable. commit 437c78ef9ff1177e04b3d6781b5805d89b2ab81a Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Feb 21 15:29:27 2008 +0100 [Xephyr/GL] don't crash when the host returns a NULL server string commit f343265a289724c81017f089c024a7618267c4e3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 15 19:53:45 2008 -0500 XACE: Make the default window background state configurable per-window. To recap: the original XC-SECURITY extension disallowed background "None" if the window was untrusted. XACE 1.0 preserved this check as a hook function. XACE pre-2.0 removed the hook and first abolished background "None entirely, then restored it as a global on/off switch in response to Bug #13683. Now it's back to being per-window, via a flag instead of a hook function. commit 7c2f0a8befb310707ea923dbcdfde84521e52c88 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 15 19:17:40 2008 -0500 Remove COMPOSITE ifdefs around WindowRec bitfield as it has no ABI effect. commit 5cb9e15562a32c1f102d94d5e15d5fd298baff3f Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 20 10:36:06 2008 -0800 EXA: Fix Render acceleration in copy and tiling cases. Code shuffling in a634c9b03494ba80aeec28be19662ac96657cc23 broke this by leaving pSrcPixmap = NULL. commit f14a62f823e257f92745bbcde11838f2ddd32ac8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 19 21:44:10 2008 +1030 dix: set evlen to the size of the reallocated memory. What a good idea this is... I'm very proud of myself. commit 67a78e84a81571cedaf7fd214a21ce1bbdc4fb3b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 19 21:31:50 2008 +1030 Revert "xfree86: plug a memory leak in xf86LoadModules." This reverts commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 and 6cbaf15e6109ba77819c4070f5b46c78237ec460. The memory returned to xf86LoadModule was allocated in doLoadModule, which calls the respective module's PreInit. As it turns out, input and output drivers store a pointer to the module elswhere, so freeing it in xf86LoadModule is a bad idea. For further reference: hw/xfree86/common/xf86Helper.c Input drivers: xf86InputDriverList[blah]->module = module; Output drivers: xf86DriverList[blah]->module = module; Unloading the module would not look pretty then. commit 5f5ec5db35e82ddd9659763875e5d6c63cf1b691 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Tue Feb 19 00:00:11 2008 -0800 XQuartz: unsetenv("DISPLAY") before startx if X11.app can't connect to it. Also fix casting to silence warning. (cherry picked from commit a5cbf78471ec6e6ad672dc00118fc7edbd6ddc7c) commit 750d70267679ddee10590c80ec621d890bd3d4a7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Feb 3 10:25:15 2008 +1030 dix: Ensure enough memory for ClassesChangedEvent for a new device. Before we enable the device through the driver, we size it up and make sure that the events in the event list contain enough bytes for a possible ClassesChangedEvent lateron. commit 74628d639719815c1beff4cac84662fa41c55925 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Feb 3 10:15:40 2008 +1030 dix: change GetEventList to return length of list and set parameter in place. Changing DDXs to use new prototype too. commit 77dba004a9aaf35f183f61ff6875a491a52aa030 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Feb 3 10:10:46 2008 +1030 dix: add InputEventListLen and SetMinimumEventSize The latter is used to increase the amount of allocated memory for the event list. This will be needed for ClassesChangedEvents that can be of more or less arbitrary size (larger than 32 anyway). commit 6cbaf15e6109ba77819c4070f5b46c78237ec460 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 19 12:02:22 2008 +1030 xfree86: guard against NULL-pointer dereferences in xf86LoadModules. Should have been part of 3abce3ea2b1f43bd111664d4a57e5ccd282acab0, but I forgot to git-update-index before I committed. Thanks to Bill Crawford for pointing it out. commit 3fe64d8d271aea0863bf01b0376f3eceec0c90b5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Feb 3 09:56:19 2008 +1030 Move input event list initialisation and storage from DDX to DIX. Rather than letting the DDX allocate the events, allocate them once in the DIX and just pass it around when needed. DDX should call GetEventList() to obtain this list and then pass it into Get{Pointer|Keyboard}Events. commit 09a8fc5c7a79ca22fc23224bb544f2e709681f3f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Feb 3 07:47:18 2008 +1030 Xi: make SizeDeviceInfo public and re-use from CreateClassesChangedEvent. commit 3abce3ea2b1f43bd111664d4a57e5ccd282acab0 Author: Arjan van de Ven <arjan@infradead.org> Date: Mon Feb 18 18:13:10 2008 +1030 xfree86: plug a memory leak in xf86LoadModules. LoadModule() returns the only reference to a fresh piece of memory (a ModuleDescPtr). Sadly, xf86LoadModules dropped the return value on the floor leaking memory for each module it loaded. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 6dc71f6b2c7ff49adb504426b4cd206e4745e1e3 Author: Arjan van de Ven <arjan@infradead.org> Date: Mon Feb 18 17:52:37 2008 +1030 xfree86: plug memory leak in InitPathList. All the failure paths were very diligent in freeing the "fullpath" temporary string, but the success case was not. All the content only got strdup()d, so it's not live memory anymore. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 1bec6ad8977cefa49cc297a310f5eb0b7cd0b8bc Author: Arjan van de Ven <arjan@infradead.org> Date: Mon Feb 18 17:46:04 2008 +1030 xfree86: plug memory leak in xf86LogInit() xf86LogInit allocates a piece of memory, stores it in lf. LogInit() will then effectively strdup it, but lf is never freed again. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 6d9d18bf7708eb9e640ef732b5dc4c99aa6d5feb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 18 17:25:15 2008 +1030 dix: add support for WindowAccessAllowAll in device access checking. AllowAll is the last check before the parent window is checked. This allows to override a DenyAll in the parent window in a simpler way than before (the previous method required all devices to be in the permit list). commit 088067c891a78670d9509f48f56bf3ff9c16a30d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 18 16:46:07 2008 +1030 Xi: even if ChangeDeviceHierarchy fails, we may need to send an event. Changes are committed instantly, so if at least one change was successful, we must send an event to the client, even if subsequent ones fail. commit 660739c6bc84cb74f43a277052ce163fae654417 Author: Benjamin Close <Benjamin.Close@clearchain.com> Date: Fri Feb 15 13:36:34 2008 +1030 dix: Handle the case where a device cursor was removed correctly In the case that the device cursor was the first in the list of cursors the window knew about, unsetting the cursor could lead to a segfault due to pPrev being NULL. Instead catch the condition and correctly remove the node from the list. Since there is no cursor now set on the device, we simply return success as the parent windows cursor will propogate down later. Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au> commit 24db28230120ecc2b65b25164b6e7b407970f9e2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 18 16:16:19 2008 +1030 dix: set num_events to 1 by default. (no RawDeviceEvents anymore) This should have been part of acb412d5399f865b5048fdd683147cea0f19f0c1. commit 45d00433e7bfbab476dd02ec92a9fbee40af5dad Author: Dan Nicholson <dbn.lists@gmail.com> Date: Tue Jan 15 19:43:16 2008 -0800 glx: Use glapi sources from the mesa tree With recent mesa HEAD, the glapi sources used only in the xserver glx module are carried in the mesa tree. Previously, these were generated separately and committed to the xserver tree. The build is changed to symlink these files like the other mesa sources. This reduces the chance for mismatches between mesa's glX API and the xserver's glX API. commit fbd776894658e7afb2c55dc8582b2a3efab78a3c Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Feb 16 20:01:18 2008 +0200 XKB: Ditch XkbFileInfo Sorry about the megacommit, but this touches on a lot of stuff. Get rid of XkbFileInfo, which was pretty seriously redundant, and move the only useful thing it had (defined) into XkbDescRec. defined will be removed pretty soon anyway. Is the compat map pointer non-NULL? Then you have a compat map, congratulations! Anyhow, I digress. All functions that took an XkbFileInfoPtr now take an XkbDescPtr, _except_ XkmReadFile, which returns an XkbDescPtr *, because people want to deal in XkbDescPtrs, not XkbDescRecs. commit e5f002eddef1abe324033a3155f01d048536a48d Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Feb 16 20:00:47 2008 +0200 XkbProcessOtherEvent: Don't depend on now-removed header We don't do XKBsrv.h anymore. commit 2d256f098ae05033ad76672d5ebdb9dfa7e6b995 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Feb 16 19:57:37 2008 +0200 XKB: Always set size correctly in XkbCopyKeymap's geometry routines We were forgetting to set the sizes for sections and rows and a couple of other misc bits in XkbCopyKeymap's geometry. Sort that out, and add a couple of clarifying comments along the way. commit ab79110a84b2d299ecae0605fa535edbebd99565 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:48:57 2008 +1100 XKB: Remove support for pre-built keymaps Don't load prebuilt keymaps anymore. commit 1332343910a1880854bae21a790cff198855cd24 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:43:18 2008 +1100 XKB: Remove usage of client-side types Since we're no longer sharing with Xlib, don't pass Displays and XPointers everywhere. commit 534fc5140b039a8c98ab715d0a6740d513b41209 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:30:22 2008 +1100 XKB: Remove a bunch of mad ifdefs We have SEEK_SET and size_t, seriously. Also use DebugF instead of ifdef DEBUG, and ditch a couple of random bits that were never used. commit 0f12a448dcbbbf1f40aa98d09c9d25ee511c5bbf Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:15:39 2008 +1100 XKB: Deprecate XKBSRV_NEED_FILE_FUNCS There's no point in having the function definitions be conditional, so whatever. commit 68bd7ac1930b5cffb6657b8d5f5bf8ae58eae8d9 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:12:15 2008 +1100 XKB: Move headers into the server tree We need to start breaking the XKB API to enforce sanity, so drag whichever headers we need to do so into the server tree, as the client API is set in stone, being part of Xlib. commit 37867626e314e74031378a8a4ff06f69b899a3b2 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Feb 1 14:41:04 2008 +1100 main(): Remove uncredible failure NO, NO, NO. NO. The only way this could possibly be worse is if you were viewing it in Comic Sans. commit e4eb7e5842f0f56f07e9cf3b16249c172d0a975d Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jan 30 23:24:14 2008 +1100 XKB: Delete xkberrs.c Get rid of the XKB errors code to save a bunch of space. commit a48cc88ea2674c28b69b8d738b168cbafcf4001f Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 17 18:47:28 2008 +0100 Fix rotation for multi-monitor situation. - The (x,y)-coordinates of the crtc were not being passed as xFixed values, which made it an obscure bug to find. - Fix bug #13787. commit 70c0592a97c7dc9db0576d32b3bdbe4766520509 Author: Maarten Maathuis <madman2003@gmail.com> Date: Sun Feb 17 11:21:01 2008 +0100 Resize composite overlay window when the root window changes. - This allows some compositing managers to work, even after randr12 has changed the root window size. - Thanks to ajax for figuring out the best place to put this. - Example: - xf86RandR12SetMode() calls EnableDisableFBAccess(). - That calls xf86SetRootClip() which in turn calls ResizeChildrenWinSize(). - The final step is the call to PositionWindow(). commit b95059c20746a71e60ef152bb627e1d5c2210d75 Author: Jeremy Huddleston <jeremy@tifa-2.local> Date: Sat Feb 16 01:33:13 2008 -0800 Added Xquartz.plist to EXTRA_DIST (cherry picked from commit 70f9495e0c1f1459507064b673fe57b1c90d3c2c) commit d103820bb8635c63b34b85b45cad95ed9c152d90 Author: Jeremy Huddleston <jeremy@tifa-2.local> Date: Sat Feb 16 00:35:50 2008 -0800 Fixed unescaped newline in EXTRA_DIST (cherry picked from commit 567c172c4d400fdfe69e7b096a3877fce5c2de9f) commit a7d936c4ac8e3d7227ecbfe0ddc6cc257b450458 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Mon Feb 11 16:09:03 2008 -0800 XQuartz: Fixed EXTRA_DIST to include localization (cherry picked from commit 1b338c2a9330c85490a7c24d52adf24b124b70e6) commit 0ffb6a3ad010e80fe8f973fc228d549f9dd3effd Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Feb 14 22:20:56 2008 -0500 GLX: Implement support for TTM BO based TFP when available. commit 879515b1399f87a47010532af70f34b9b09e2a9b Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> Date: Mon Feb 4 13:13:35 2008 -0500 Add GLX provider for DRI2. commit b71dc54352bc56a889823040ec19c1d8e118a1f3 Author: Kristian Høgsberg <krh@sasori.boston.redhat.com> Date: Mon Feb 4 11:58:24 2008 -0500 Add DRI2 module. commit 005e31d3de04e7003f84a94d30f2b75a9636266e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Feb 15 00:01:32 2008 +0000 AIGLX: Refactor code common between __glXDRI{drawableDestroy,releaseTexImage}. commit cd78f0d0fc08e4e2339ed09dad1a12802de7729c Author: Pierre Willenbrock <pierre@pirsoft.de> Date: Thu Feb 7 21:28:28 2008 +0100 AIGLX: Fix crash after client using GLX_EXT_texture_from_pixmap died. commit 3e0353c78571890f849a1db47b0540aacc6793bc Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 15 06:42:48 2008 +1100 Bah, macros are hard. commit c38feeb1492d9a47379b2e4d77dbadd8c421d17f Author: Maarten Maathuis <madman2003@gmail.com> Date: Thu Feb 14 18:52:47 2008 +0100 Fix typo in commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844. commit b8b7cdf6df3d338c50db670ce4cfd245f9fa8844 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 15 01:31:46 2008 +1100 Silence useless debug spew from XFree86-Misc extension. commit 4573cb2ce4b859744118d9a33de3599f033cdd2b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 13 20:16:56 2008 -0500 security: Revise set of permissions granted to untrusted clients. Bug #14480: untrusted access broken on 7.3. commit e99aadbc2635e87543fc9980d8156c3ede83544f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 13 19:46:29 2008 -0500 xselinux: Add use to permission map for devices. commit ae43d835bdaef96c3c73d7cee5b105f07340833d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Feb 13 19:39:49 2008 -0500 XACE: Change access modes for some device-related requests. Opening a device is not really "reading" it. Requests that globally configure a device should require "manage" access. commit 921c298c4cdd2c879403ebdacbef48129058cad4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:48:19 2008 +1030 Xi: QueryDevicePointer doesn't have a shared field anymore. commit b885588756450e2fa25fdd191e300e1c5dd37ec3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:47:31 2008 +1030 Xi: remove FakeDeviceData calls. And one leftover from GrabAccessControl. FakeDeviceData needs more thoughtful integration. commit c99a9a97290c51bf2843f42d5683888cea8a3ff6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:43:49 2008 +1030 Xi: remove raw device events. Need to be better refined. commit b35a9efa16d9e14378a95c11fa39171b78710996 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:41:49 2008 +1030 Xi: Remove files for GrabAccessControl. commit b81c330f70c4a4c8f37216aa4856c7f8db93a375 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:32:54 2008 +1030 mi: remove RawDeviceEvent's ID changing. commit acb412d5399f865b5048fdd683147cea0f19f0c1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 14 09:27:51 2008 +1030 dix: Don't generate RawDeviceEvents anymore. These events have been removed from the protocol pending some more refinement and more thoughtful integration. commit ba69904148acf755bec8fbda2eb869144f0ef7d4 Author: Adam Jackson <ajax@redhat.com> Date: Sun Feb 3 22:49:23 2008 +1100 Simplify dlloader a bit more. commit f750ce53ac450824d0c792d11eafdf311cf8abc0 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 17:33:48 2008 +1100 Remove some braindamage from ModuleDesc. Yay dead code elimination. commit e91ff09568c5579818b6641e88e95c6fe122cbe7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 17:21:34 2008 +1100 Friends don't let friends call xf86AddModuleInfo. That code only existed to leak memory. It can go now, thanks. commit 0bdd20a0454c94f902fd4874855125bf7510fcf5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 16:15:58 2008 +1100 Eradicate the VTInit code. "This option should rarely be used." Never sounds like a better idea. commit 24089b06243101b1bff4f2fd79fcbfd6a93992d5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 16:11:13 2008 +1100 Don't bother warning people about the keyboard driver rename, just do it. commit 2aaf6ac134fa9f61984b1c03929c7b596c971cc8 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 16:10:23 2008 +1100 Don't even attempt to parse -bpp in xfree86 DDX option parsing. This hasn't been valid since 1999. Get with the times, man. commit ef77e4c4419703b5a802f3eee92476a43f788a86 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 16:03:01 2008 +1100 Remove useless commentary from environment and argument processing. commit f3b3b37ec6197f8884417fbc26630d3a28f2e319 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 15:36:11 2008 +1100 Use strerror instead of errno values in user strings. commit b740b865e4c156a40adc6b63fcf215156fc9151a Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 15:16:01 2008 +1100 Silence an error message in ConfigureWindow that never happens. commit 89d3249c3e7611b22414bc84b10ca60aab4b9a77 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 15:11:27 2008 +1100 Silence FreeResource() commit 238b816469355159eea98600ca900e3baa8fa313 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 15:08:03 2008 +1100 X.Org Group -> X.Org Foundation commit 9113fa3de36e84bbae2727cace82b1cf0d709a86 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 15:03:57 2008 +1100 Silence the harmless FreeFontPath error message. commit 7c0709a736c0f3aa011de67dd2c2962585ab146e Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 14:59:58 2008 +1100 requestingClient is an xprintism, hide it for other servers. commit 62cfe8863823c0994f20555cb35ee3bacb9e5225 Author: Adam Jackson <ajax@redhat.com> Date: Fri Feb 1 14:57:25 2008 +1100 Redact all mention of PanoramiX from user strings. commit eb8dc11d19dd0b5354de408578ab0cfb865df672 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 31 21:45:14 2008 +1100 Remove some MAX* #defines that never get used. commit 2ce35f6d45c3e1761d33b786520ff5ba56a3c518 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 31 21:39:48 2008 +1100 Simplify critical output flushing. commit 3eaecdd66e791e0f3d86b23ce10be057ca44c044 Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 31 21:36:14 2008 +1100 Disable Record by default. commit aa5216e89797b600f382c04e3eaa657e808a5c3e Author: Adam Jackson <ajax@redhat.com> Date: Thu Jan 31 12:05:08 2008 +1100 Rip out useless indirection in the callback list management. commit 0d492b2166c4026b9078ffd86d89a31ebe590be4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 12 19:59:10 2008 -0500 XACE: Move the selection access hook to its own function. commit 4be69e41c07b784f75918141eead70415c0ec4a4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Feb 11 16:03:25 2008 -0500 Revert "Bug #8937: Extension setup functions not called on server resets" This reverts commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6. The devPrivates rework makes this workaround unnecessary. commit 8a244c2bc04a4184535e42d1f2f8c9e3e55678b4 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Feb 11 12:09:41 2008 -0800 XQuartz: Fixed layout of Applications->Customize menu Now resizing it won't produce weir overlaps of the widgets. Thanks to Pelle Johansson for his help showing me how to do this. (cherry picked from commit ef3498e92d13c82633fdbe8120396bfbe1e7489a) commit 3570ca1cb76f084272f7d8bd22c4cfdf03201a77 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sun Feb 10 18:27:52 2008 -0800 XQuartz: Added option for setting quartz-wm click-through preference (cherry picked from commit bf54c267cba97b2b3b9a621da0575776a388b2cb) commit 8004e160fa8cc75a3f1b7385fee64e5864b3b50a Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sun Feb 10 16:34:40 2008 -0800 XQuartz: Converted interface to nib 3.x format (cherry picked from commit 656aaab95773bd70fc3504b68bf7e1d292891d93) commit 0b0a09797302ac2171db5df20fc5110aafc8efbb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 7 15:48:04 2008 +1030 xkb: when copying the keymap, make sure the structs default to 0/NULL. It actually does help if a pointer is NULL rather than pointing to nirvana when you're trying to free it lateron. Who would have thought? (cherry picked from commit 7a97ca667405a42d008265c3a870210cc1da97dd) commit 7018f280406eb0ef899a4046de274cfdd582881b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 7 15:48:04 2008 +1030 xkb: when copying the keymap, make sure the structs default to 0/NULL. It actually does help if a pointer is NULL rather than pointing to nirvana when you're trying to free it lateron. Who would have thought? commit 66f8001b61d12eaf4905ac71ccbb3f304914d00d Author: Bart Trojanowski <bart@symbio-technologies.com> Date: Thu Feb 7 21:26:54 2008 -0500 X86EMU: handle CPUID instruction After trying to switch from X to VT (or just quit) the video-amd driver attempts to issue INT 10/0 to go to mode 3 (VGA). The emulator, running the BIOS code, would then spit out: c000:0282: A2 ILLEGAL EXTENDED X86 OPCODE! The opcode was 0F A2, or CPUID; it was not implemented in the emulator. This simple patch, against 1.3.0.0, handles the CPUID instruction in one of two ways: 1) if ran on __i386__ or __x86_64__ then it calls the CPUID instruction directly. 2) if ran elsewhere it returns a canned 486dx4 set of values for function 1. This fix allows the video-amd driver to switch back to console mode, with the GSW BIOS. Thanks to Symbio Technologies for funding my work, and ThinCan for providing hardware :) Signed-off-by: Bart Trojanowski <bart@jukie.net> Acked-by: Eric Anholt <eric@anholt.net> commit de16a8c53046764dbdf26a87acc5c984ef00d818 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 7 20:14:16 2008 -0500 XACE: Correct some protocol error values in the colormap routines. commit 31934132a490b1b8ae73010c44e0b23217d8dab2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 7 16:32:06 2008 -0500 xselinux: Use the device name in debugging output. commit 6dcb7d732bfeadc214228d68c5a13eef30248eb1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 7 16:00:52 2008 -0500 xselinux: Split devPrivate state into subject and object records. commit 2259b144f0fd4855085a656111a0c64246733e78 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 7 14:35:02 2008 -0500 xselinux: Add getattr and setattr to the permission map for properties. commit 9d5edebe9664f4ac35b82830e000a72d5ca9cbe4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 7 21:22:50 2008 +1030 Xi: finish XKB initialisation before copying the keymap. commit 96eafa3d4f05997dac8be6a8d66a92410511824c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 5 16:01:56 2008 +1030 xkb: when copying sections, make sure num_rows is set too. (cherry picked from commit 41991fb991313202e8e6b513fe928ba14f8fcb87) commit 5c30327275509576b7848a5f842e7a1bffabe980 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 5 21:06:05 2008 -0500 XACE: Push the dix "structure" includes down to the security modules. commit bb1a577a6822f781f1e38d2434a13914e74f89aa Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 5 20:07:08 2008 -0500 XACE: Move the property access hook to its own function. commit 019ad5acd20e34dc2aa3b89cc426138db5164c48 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 5 15:44:41 2008 -0500 XFixes: squash a pointer/integer size mismatch warning. commit d3c36fe721edc55636438bc3e0e7a6c03f62784e Author: liuhong <liuhong@devlinux-hong.sh.intel.com> Date: Tue Feb 5 10:54:58 2008 +0800 validate mode clock for probed modes Some modes claimed in monitor EDID data may not be supported by the monitor. So also validating the max clock for probed modes. commit 4b5b6e7baab58072a983d2ec136965f404c3a74a Author: liuhong <liuhong@devlinux-hong.sh.intel.com> Date: Tue Feb 5 10:54:10 2008 +0800 fix max clock unit max clock from EDID data is in MHz, while we need KHz to validate modes. commit a56ef7aaa4b6ac13c8181f68fc7dad3ca89e6973 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat Feb 2 23:04:46 2008 +0100 dix: Move motion history update until after screen crossing and clipping Cross screen and clip the coordinates before updating the motion history so that it will have the same contents as the events that are reported. commit a0284d577aabea8406b72dd63773e341430ebe56 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat Feb 2 23:03:51 2008 +0100 dix: Skip call to clipAxis for relative core-events Relative events that generates both core and extention events will have its axis cliped and screen changed by miPointerSetPosition when the events are processed. For absolute and non core-generating relative events the axis must be clipped if we shouldn't end up completely outside the defined ranges (if any). commit d9e23c4ff1607a62164b34717ef9afd352ce2b94 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat Feb 2 22:57:32 2008 +0100 Bug # 10324: dix: Add scaling of X and Y on the reported pointer-events Restore the rescaling code for x and y axis when generating motion events. commit f04c0838699f1a733735838e74cfbb1677b15dc4 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat Feb 2 22:45:31 2008 +0100 Bug # 10324: dix: Allow arbitrary value ranges in GetPointerEvents Don't use a possitive value as a marker for if a max-value is defined on the valuators. Use the existence of a valid value range instead. This will also make it possible to define arbitrary start and end-values for min and max as long as min < max. commit 12e532403210c15a25200ef448bfe9701735ab20 Author: Magnus Vigerlöf <Magnus.Vigerlof@ipbo.se> Date: Sat Feb 2 22:44:31 2008 +0100 dix: Always add valuator information if present Send valuator information for all event types, not only for MotionEvents and absolute button events. commit 41991fb991313202e8e6b513fe928ba14f8fcb87 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 5 16:01:56 2008 +1030 xkb: when copying sections, make sure num_rows is set too. commit 521a7f26e088029707fb9a2bb80c9ddc734a3f8b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Feb 5 18:34:31 2008 +1030 mi: Only UpdateSpriteForScreen if we actually changed the screen. (Bug #12650) X.Org Bug 12650 <http://bugs.freedesktop.org/show_bug.cgi?id=12650> commit 10617dc0fb7166ccd5b2e92fa708390c2d7d0d27 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Feb 1 14:24:04 2008 +1030 xfree86: stick two more checks in for num_valuators < MAX_VALUATORS commit c68f063be639f39c2facbb496e8455e8e3771b41 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Feb 1 14:13:29 2008 +1030 xfree86: don't call xalloc from signal handlers when posting events. Reviewed-by: Peter Hutterer <peter@cs.unisa.edu.au> commit e5e531ce96264518f278f572a4d0bfcd345aa618 Merge: 6c3868208 1692dcf19 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 31 16:36:17 2008 +1030 Merge branch 'master' into mpx Conflicts: dix/events.c commit 6c38682084e24b18bac0ea75729b1183aeb01600 Author: Benjamin Tissoires <tissoire@cena.fr> Date: Thu Jan 31 15:51:32 2008 +1030 kdrive: AddInputClient takes a ClientPtr. commit 1692dcf197470d074f69d5af1608cb2ff1d08872 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 30 13:04:58 2008 +1030 dix: print out event type if a bogus pointer event occurs. commit d954f9c80348de294602d931d387e5cd1ef4b9a5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 30 10:39:54 2008 +1030 xkb: don't update LEDs if they don't exist. (Bug #13961) In some weird cases we call this function when there is no SrvLedInfo on the device. And it turns out null-pointer dereferences are bad. X.Org Bug 13961 <http://bugs.freedesktop.org/show_bug.cgi?id=13961> commit df325be394e1f75c396b2768f81373f2989aef7c Author: Coleman Kane <cokane@cokane.org> Date: Tue Jan 29 09:47:00 2008 -0800 Bug 13101: xorg-server has a typo in hw/xfree86/os-support/bsd/i386_video.c X.Org Bug #13101 <https://bugs.freedesktop.org/show_bug.cgi?id=13101> Patch #12360 <https://bugs.freedesktop.org/attachment.cgi?id=12360> commit 94f412cb7e954fe872fed979057cbdfbef953c6f Author: Julien Goodwin <julien@studio442.com.au> Date: Sun Jan 27 12:30:16 2008 +1100 Loader: Fix verbosity confusion 'Loading foo' is verbosity 3, whereas 'already built-in' is verbosity 0. This means that gdm's log would just be full of bare 'module already built-in' messages. commit 442838fcb3bf07ac57553ae5600d9e6c59a559bb Author: Julien Goodwin <julien@studio442.com.au> Date: Sun Jan 27 12:27:26 2008 +1100 xorg.conf.man: Fix monitor/output confusion in monitor positioning On the Intel driver at least, LeftOf/RightOf/Above/Below in xorg.conf refers to output names, not monitor names. Fix nomenclature in xorg.conf.man. commit 5b8641a5fdc112c19e78ca2954878712e328d403 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 29 10:01:37 2008 +1030 xfree86: fix AlwaysCore handling. (Bug #14256) Assume AlwaysCore being set by default, just like the other options. X.Org Bug 14256 <http://bugs.freedesktop.org/show_bug.cgi?id=14256> commit 975ab11799c819a81da1dfe83505194410dbcb95 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Jan 26 09:39:54 2008 +1030 config: don't reset connection info on disconnect. If dbus is restarted, we try to connect again and this is difficult if the busname and/or busobject is not set. (cherry picked from commit 210eeef495770c1883c842ff003c28ce25f279d4) commit 7dde5a694a06efed0a9186f05d33f5be6f5dba71 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 13:54:47 2008 +1030 config: check connection != NULL before getting dbus' dispatch status. (cherry picked from commit d23266522390a4ef7203ae7c062b2b920e45f9d7) commit f0ba7707161b8866e6fde32d6f25be6afcdecb48 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 13:45:22 2008 +1030 config: only shutdown libhal if the connection is valid. Thanks to libdbus' extensive use of assert we won't just get an error, it'll bring the whole server down for us. (cherry picked from commit fb07fab2c07e7b0834724541dc47bfba02ba8574) commit 2cb0ebec2b85d96289c23c17cfdcdf97ef6877d2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 11:48:13 2008 +1030 config: add a debug message, fix a whitespace error. (cherry picked from commit 7732898aaa70e076000f6e6aa9420482896ed996) commit 4fc2d3cef8d7868b025aa14af7ed4b730e8f2c49 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Mon Jan 28 12:18:43 2008 -0800 Rootless: RootlessEnsureFrame: Added check for !IsRoot This was causing an issue with Apple-DRI and was reported here: http://trac.macosforge.org/projects/xquartz/ticket/51 (cherry picked from commit 116800279d2ec783c63f43d3902627edde6a4cff) commit 16b0614c8c441eb1692bde9e58fadf54a9c6f00f Merge: 1a88aed5c e915a2639 Author: David Nusinow <dnusinow@debian.org> Date: Sat Jan 26 16:13:25 2008 -0500 Merge commit 'upstream/master' commit 0ac175597712edfeae676f536746a4d26d625e30 Merge: 210eeef49 e915a2639 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Jan 26 13:55:07 2008 +1030 Merge branch 'master' into mpx Conflicts: Xext/sampleEVI.c commit e915a2639752bc0ea9e6e192e020cc2031c08063 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 25 19:22:19 2008 -0500 xselinux: Move the extension to extmod instead of being built-in. commit 210eeef495770c1883c842ff003c28ce25f279d4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Jan 26 09:39:54 2008 +1030 config: don't reset connection info on disconnect. If dbus is restarted, we try to connect again and this is difficult if the busname and/or busobject is not set. commit f6a78ee143e3a3ad69538adf2b9675d724468ffa Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 25 18:04:10 2008 -0500 XACE: Remove the extension code entirely, XACE is completely static now. commit 7724c30a751c653ca3e2e8a6752af27bc37de3f0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 25 17:28:17 2008 -0500 XACE: Stop using fake requestVectors in favor of a simple hook call. commit f82329b0811469ddae5c44dcfffa38185c11a67c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 25 16:20:46 2008 -0500 XACE: Don't need to actually register a protocol extension. commit d23266522390a4ef7203ae7c062b2b920e45f9d7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 13:54:47 2008 +1030 config: check connection != NULL before getting dbus' dispatch status. commit fb07fab2c07e7b0834724541dc47bfba02ba8574 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 13:45:22 2008 +1030 config: only shutdown libhal if the connection is valid. Thanks to libdbus' extensive use of assert we won't just get an error, it'll bring the whole server down for us. commit 7732898aaa70e076000f6e6aa9420482896ed996 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 25 11:48:13 2008 +1030 config: add a debug message, fix a whitespace error. commit 46794d0c9665f07913980830d038c88d00407612 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 24 19:49:13 2008 -0500 xselinux: Rename SelectionManager to more generic SecurityManager. commit 466f6552190d1b83d66ebfd71e07921ed6210ee2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 23 16:11:31 2008 +1030 Xi: if deviceid is > 127 assume GE mask is for all devices (XiSelectEvent). commit 379f057646588fa3211d7ba0ec8d77d2fc0ad246 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 23 16:08:37 2008 +1030 Xext: add GEDeviceMaskIsSet (GE mask checking per device) If a mask was set for the NULL device, then we pretend the mask is set for all devices. commit 91dc8c43d2343e494c59023484883f4683bdc639 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 23 15:45:02 2008 +1030 Xi: Change window access right check to RecieveAccess in XiSelectEvent. commit 94a6a65ae7414c8247aa1741ec5c7561e6f4bbe0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 23 15:43:48 2008 +1030 Xext: allow per-device GE masks. Instead of a single mask per client we allow the storage of a mask per client per device. commit 6ffeecabb7f3f3173864e0f0af21a99bdc5b5044 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 24 18:11:49 2008 -0500 xselinux: Use a privileged bit in the state instead of passing an index to the permission checking function. commit 7ba8e97cbabfef4d614a6a38314830ec0f925471 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 24 19:09:58 2008 -0500 xselinux: Implement "get context" protocol requests. commit f0bf9a5231d4f612ac916355118484d055715f32 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 24 19:02:35 2008 -0500 xselinux: Whitespace fixups. commit 734e115871ce98badb8800383c423493802ae3d3 Author: Hong Liu <hong.liu@intel.com> Date: Wed Jan 23 21:04:32 2008 +0800 Bug #12439: add a quirk to use +hsync +vsync for the probed detailed mode. Samsung 205BW quirk is somehow reworked. commit cc22b05ea06e08568d0f0abdaccf67bd32662e94 Author: Adam Jackson <ajax@redhat.com> Date: Tue Jan 22 18:57:11 2008 -0500 There is no such thing as /dev/cpu/mtrr. commit 1a88aed5c82c7c131e3d473ef7b8766a418fdf1b Author: David Nusinow <dnusinow@debian.org> Date: Mon Jan 21 21:16:13 2008 -0500 Add tags/TAGS to .gitignore for ctags usage commit be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161 Author: Matthias Hopf <mhopf@suse.de> Date: Mon Jan 21 16:13:21 2008 +0100 CVE-2007-6429: Always test for size+offset wrapping. commit ba315ae5ddd00763147a4b0cdcacba7691793dfc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 21 23:43:53 2008 +1030 Xi: add XACE hooks for device creation (ChangeDeviceHierarchy) AddInputDevice checks for permissions already, so all we do is modify a few callers to let AID sort it out. commit 94a21d757ce58254accbd5dd3a86810aadeec9f0 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Jan 19 13:17:45 2008 +0100 AIGLX: Fix GLX_EXT_texture_from_pixmap fallback with EXA. Use pScreen->GetImage to obtain the pixmap contents instead of dereferencing pPixmap->devPrivate.ptr directly. commit e9fa7c1c88a8130a48f772c92b186b8b777986b5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Jan 18 14:41:20 2008 -0500 CVE-2007-6429: Don't spuriously reject <8bpp shm pixmaps. Move size validation after depth validation, and only validate size if the bpp of the pixmap format is > 8. If bpp < 8 then we're already protected from overflow by the width and height checks. commit 6492d513c0022d70f838d1b2561442c7a41e401f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 21:44:22 2008 +1030 dix: if a client has a core grab, return the grab device on QueryPointer. The correct thing would be to return the ClientPointer. However, if the client for some reason has a core grab on another device (e.g. as result of a passive grab), return the coordinates of the grabbed device instead. This makes the use of nautilus a bit saner. commit cd2ad4c2ed58b49cee085174e77c242048159321 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 20:11:55 2008 +1030 dix: remove some superfluous lines in ProcChangeActivePointerGrab. commit 8a925d201efac52ef663ea3ff46acc5046178666 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 20:06:29 2008 +1030 dix: free the genericMasks when ungrabbing. This finally plugs a memory hole created by grabs registering for generic events. commit 8949d81a3c79eef351d7c018c76692dcca74b63e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 19:45:54 2008 +1030 include: mark CoreProcessPointerEvent, CoreProcessKeyboardEvent as deprecated. ProcessOtherEvent does all the work now. commit d323fd64206ddb4221daa7cf7504daf62c5e7d90 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 19:17:42 2008 +1030 dix: remove inputInfo.pointer refernce in EventSelectForWindow If the window being changed is set as the motion hint window for any device, the device's motion hint window is set to NULL. Which is kinda what the old code did, except that it did it with only the VCP. commit 883811c2bed9c6fcb706effbf83ddc97518b6f0c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 18:48:46 2008 +1030 dix: remove inputInfo.pointer reference in TryClientEvents. Unfortunately, this requires a change in the TCE API, and thus a change in all callers. Tough luck. commit 6e17184486c4309ec8b47c7cfd11fef60bb360ac Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 18 17:52:38 2008 +1030 Xi: Check for DestroyAccess when trying to delete a master device. commit 23f3f0e27dc90b7b3a375f2a5dd094e6f53552b5 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Jan 13 14:00:25 2008 -0800 XQuartz: Moved SetFrontProcess haco to set_front_process So it is done by the other thread... (cherry picked from commit 7429379eb1001ee3dc769daa8fe6b3aef1b9cc8a) commit 8e133d96740d010a4fd969a8188e6e71fb2cafe2 Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Jan 17 15:29:06 2008 +0100 Fix for CVE-2008-0006 - PCF Font parser buffer overflow. commit 6de61f82728df22ea01f9659df6581b87f33f11d Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Jan 17 15:28:42 2008 +0100 Fix for CVE-2007-6429 - MIT-SHM and EVI extensions integer overflows. commit 7dc1717ff0f96b99271a912b8948dfce5164d5ad Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Jan 17 15:28:03 2008 +0100 Fix for CVE-2007-6428 - TOG-cup extension memory corruption. commit dd5e0f5cd5f3a87fee86d99c073ffa7cf89b0a27 Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Jan 17 15:27:34 2008 +0100 Fix for CVE-2007-6427 - Xinput extension memory corruption. commit bbde5b62a137ba726a747b838d81e92d72c1b42b Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Jan 17 15:26:41 2008 +0100 Fix for CVE-2007-5760 - XFree86 Misc extension out of bounds array index commit e85130c85f727466fc27be1cfa46c88b257499fb Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 5 10:47:39 2008 +0200 Xephyr: One-time keyboard leak fix Don't leak the originally-allocated keysym map. commit 0137b0394a248f694448a7d97c9a1a3efcf24e81 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 5 10:43:53 2008 +0200 XKB: XkbCopyKeymap: Don't leak all the sections Previously, we'd just keep num_sections at 0, which would break the geometry and lead us to leak sections. Don't do that. commit b99a43dfe97c1813e1c61f298b1c83c5d5ca88a2 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jan 5 10:38:16 2008 +0200 OS: IO: Zero out client buffers For alignment reasons, we can write out uninitialised bytes, so allocate the whole thing with xcalloc. commit a6a7fadbb03ee99312dfb15ac478ab3c414c1c0b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jan 16 20:24:11 2008 -0500 Don't break grab and focus state for a window when redirecting it. Composite uses an unmap/map cycle to trigger backing pixmap allocation and cliprect recomputation when a window is redirected or unredirected. To avoid protocol visible side effects, map and unmap events are disabled temporarily. However, when a window is unmapped it is also removed from grabs and loses focus, but these state changes are not disabled. This change supresses the unmap side effects during the composite unmap/map cycle and fixes this bug: http://bugzilla.gnome.org/show_bug.cgi?id=488264 where compiz would cause gnome-screensaver to lose its grab when compiz unredirects the fullscreen lock window. commit e46f6ddeccd082b2d507a1e8b57ea30e6b0a2c83 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jan 16 14:24:22 2008 +0100 Yet another Xv extension byte swapping fix. commit b0bf4308acb706abc87c51658c2251fa86231c35 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 15 19:15:09 2008 +1030 dix: print out an error when core type can't be converted. Helps a bit in tracking down bugs. commit 2a988ed75b7634d7cb6e83bb7aa89bc8768d3a58 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 15 19:14:46 2008 +1030 xkb: don't do core key repeats, XI only is the path to light. commit 4fd0885978be286a68b689824f1d910f929a52b0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 15 18:58:42 2008 +1030 Xi: remove some leftovers from ProcessOtherEvents. Core handling not needed anymore here. commit 32aa252e988be8cbfd4f7e373fb7b7736ef1f5f2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 15 15:22:39 2008 +1030 dix: Process an input event as a single event, instead of two separate ones. This is a significant shift in how input events are perceived. The common approach was to treat a core event as a different entity than the XI event. This could result in the XI event being delivered to a different client than the core event. This doesn't work nicely if they come from the same device. Instead, we treat an input event as a single event, that is delivered through two separate APIs. So when delivering an event, we first try the XI event, then the core event. If the window want's neither, we go to the parent and repeat. Once either core or XI has been delivered, the processing stops. Important: Different to the previous method, if a client registers for core button events, the parent window will not get XI events. This should only cause problems when you're mixing core and XI events, so don't do that! Generic events don't fit into this yet, they cause me headaches. commit 7a0d16ef0a103bcb25fa8a20322685f017aaf5a3 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Tue Jan 15 03:27:16 2008 -0200 Removed some warnings. commit 315d6a2b1d2a3de308e98d548afe780c59a784fc Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Tue Jan 15 02:59:56 2008 -0200 Fix Xephyr compilation without GLX. commit 0969a9f7497e10794a6534321c10a0e1ac680ad7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jan 15 11:31:12 2008 +1030 dix: Emulate core events within CheckDeviceGrabs and ComputeFreezes. This should restore the correct passive grab processing. When checking for passive grabs, the core event is emulated and we check first for XI grabs on the window, then for core grabs. Regardless of which event activates the grab, the XI event is stored in the device's EQ. When replaying the event, we take the XI event and replay it on the next window, again including the emulation of the core event. commit 1f83f40525acd3aff8f50b3c519bc1f307ff1e19 Author: Dave Airlie <airlied@linux.ie> Date: Tue Jan 15 10:20:50 2008 +1000 xf86Cursors: fix memset for non-square cursors commit e6ea3147bfb686798dac381eb8900f9f18beb88e Author: Bernardo Innocenti <bernie@codewiz.org> Date: Sun Jan 13 19:50:37 2008 -0500 exa: make the prototype for exaGetPixmapFirstPixel() public This fixes a warning in amd_drv which is using it. Signed-off-by: Bernardo Innocenti <bernie@codewiz.org> commit a83a0c5a144da67dab96a857b849a5692b73245d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jan 13 16:14:29 2008 +1030 dix: remove obsolete comment. Pairings don't exist anymore and the documented issue is a non-issue now. commit 180a5aba4de3104fed8bc4e7d42a1e3a51575318 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Jan 12 21:24:34 2008 -0800 XQuartz: Fixed copy-paste error with login_shell commit (cherry picked from commit 6deec3acc6f8010b5b53a1e55a0a2c4080ba69d2) commit 6fd4a5e2e4d0be0ba0773df831687e11e1262c72 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Jan 12 11:56:00 2008 -0800 XQuartz: Corrected copyright X.org Project -> X.org Foundation (cherry picked from commit f21631444816fc12b8a534c2cf79e6ac6c2af7c9) commit f72255639c065d795f7767683e851b1b5b2d9480 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Jan 12 11:35:48 2008 -0800 XQuartz: added 'login_shell' option to defaults so the user can choose something other than /bin/sh (cherry picked from commit b549cf18cebd3435d70f62855239484974c455a1) commit ec24a6b5aa732ec6999a27889d9a33cf80123886 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Jan 6 18:29:54 2008 -0800 XQuartz: Fixed switching into XQuartz via expose. (cherry picked from commit 627ed60ce5d7499761028edf379ebd95250d3e04) commit 6844bd2e63490870bab3c469eec6030354ef2865 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 9 19:52:00 2008 -0800 More Xv extension byte swapping fixes commit 38bf01bd1c925614a6e67a38aa3cefc7b8fe3bca Merge: 4e85c7c32 0883e838e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 10 13:38:46 2008 +1030 Merge branch 'master' into mpx commit 0883e838e25227f0af84d2a90979175724166d16 Author: Peter Harris <peter.harris@hummingbird.com> Date: Wed Jan 9 14:52:33 2008 -0500 xf86misc.c: Avoid use of swapped values commit 59a63d72a1407a8aaf9878eeff7ee7a66f65a42b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 9 18:42:58 2008 -0800 Fix reference to old versions of XFree86 to not say "Xorg 4.2 or earlier" commit 4e85c7c322faf14c14e4229fa294b8e3d3a4d304 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 9 17:36:39 2008 +1030 Xi: keep a counter of buttons down to avoid duplicate press/release events. If two devices are attached to the same master device, pressing button 1 on each of them leads to two button presses from the same device. Some apps really don't like that. So we just put a counter in place and only send the first press and the last release. commit e070c2cbef0d6fbbafce8d417e8b29231c2fdc50 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 7 20:18:49 2007 +1030 mi: change infamous "Tossed event ..." error for something more explanatory. Few whitespace errors fixed. Two ErrorF's prefixed with [mi]. (cherry picked from commit 117458d2db49efd3f04432ff45871b44c7d4ad57) commit c31aead0fe9fe424120ce221cd9f76cb6d29a5b5 Author: Richard Purdie <rpurdie@openedhand.com> Date: Tue Jan 8 12:12:06 2008 +0100 [Kdrive] make XCalibrate 'orientation aware' commit 30375cd6d1439a3390b41714fe116aecc94743ca Author: David Nusinow <dnusinow@debian.org> Date: Mon Jan 7 20:57:30 2008 -0500 Don't log DPMS enabling as being from xorg.conf if it's not commit 981bb9f1e33e4564d1b59c00c808cc43a2e9497b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 18 13:57:07 2007 +1030 dix: set the correct number of valuators in valuator events. (first_valuator + num_valuators) must never be larger than the number of axes, otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is wrong too. (cherry picked from commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e) commit 20ace6321ac464d821c67a82c7023f74ae038176 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 7 20:08:56 2008 +1030 dix: don't try to confine cursor on screen restructure if there is no cursor. Stops segfaulting when using xrandr. Yay. commit 57a491e6d3ebec464c0c861b02c9ddcb1cc62c3c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 7 20:06:32 2008 +1030 dix: init GrabPrivateKey to correct value. Merge detritus from last pull. commit 260505e3c5a18044e97d31ea3bcc0955e46335c8 Author: David Nusinow <dnusinow@debian.org> Date: Sun Jan 6 16:37:13 2008 -0500 Log enabling of DPMS even when it's not set in xorg.conf commit 7e7622165940934e56ae96ae785a8f88eec1a5cf Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 6 18:23:09 2008 +0100 Fix the name of the XFree86-Misc extension in the xorg.conf manpage. commit 59df687835c68eda147de47edfe9bc415c0efb4f Author: Julien Cristau <jcristau@debian.org> Date: Sun Jan 6 16:57:45 2008 +0100 Document the AllowEmptyInput, AutoAddDevices and AutoEnableDevices flags Add documentation for the new AllowEmptyInput, AutoAddDevices and AutoEnableDevices server flags in the xorg.conf manpage. commit 7d226d6a251cb90765be2b50a1973986c5b7605b Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Jan 5 03:14:07 2008 -0800 XQuartz: Cleanup for strict-prototyping Also fixed DarwinEQEnqueue to match changes to the callback And also use dpmsstubs.c rather than copying the code into darwin.c (cherry picked from commit 4c5c30a4beb7a427b00b18097f548876ad3c11d7) commit 11967dce11cd953d123d53bb3389aa257c5158e8 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Jan 4 22:54:26 2008 -0800 XQuartz: Fixed copyright in About box for 2008. Happy New Year! commit aca75f389e2b08096c3cacec03b12a58075cf12c Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Jan 4 12:23:09 2008 -0800 XQuartz: Flush the debug log for easier debugging Also cleaned up formatting in xpr's eventHandler (cherry picked from commit 16861d6d4239c7f3918332ef07752f1e211afb23) commit 57468a696e1259c1e1c185fc60230e1d195defb7 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Fri Jan 4 12:37:55 2008 +0000 Fix Line drawing with CapNotLast set in PolySegment. commit 39cb782f28be4efb2621fd8c614f2367eb834412 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 3 23:16:06 2008 -0500 XACE: DeleteCallbackList zeroes out its argument so don't do it twice. commit 7f376f23db463a65176de632ca6094acb55db951 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 3 23:08:49 2008 -0500 devPrivates rework: Free callback lists after use. commit de18703d2a25999e391d11b4c82ee018fb87372d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 3 23:07:24 2008 -0500 dix: Fix bug+leak in callback manager DeleteCallbackList function. commit 20eb26f9d149993ae360a2cbd1b536b68c9f4069 Author: Alex Deucher <alex@samba.(none)> Date: Thu Jan 3 22:53:36 2008 -0500 Fix potential crasher in xf86CrtcRotate() xf86CrtcRotate() is called by randr 1.2 drivers via xf86CrtcSetMode() or xf86SetDesiredModes() during ScreenInit() at which point pScrn->pScreen is not set. If a user specifies a rotation in their config file pScrn->pScreen is dereferenced and boom. commit 249b9b30c11e03bb113b37cf4712bf88debf6f05 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 4 13:49:48 2008 +1030 Xi: remove file for the obsolete ChangePointerKeyboardPairing request handling. commit e4a214e40d35aa957c83b86b4e4abc86c22fbde0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 4 13:32:53 2008 +1030 dix: don't free device's devPrivates manually, dixFreePrivates does it. Merge detritus from last pull. commit cd0603c2dc5ee000ebce66056bc1a72f99bfb617 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 3 21:41:02 2008 -0500 Bug #13765: Heap corruption in XC-SECURITY extension code. commit e46d559739e020dc7f6fcbdc6d1fb39c57aab4b1 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 22 15:09:12 2007 -0800 XQuartz: Cleaned up color map configuration. 8 bit color still doesn't work, but the -depth command line argument now works properly. (cherry picked from commit 6765949c27c053d22882f54337cfd09203aa5383) commit 17a9714a6789a389d52dbb40fd1eed1e24c04d64 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jan 3 14:46:54 2008 -0500 Bug #13794: Update MBE extension devPrivates to new interface. commit b2da44c76d68a76f20e90bccb268ebf65e132b49 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 18:51:44 2008 +1030 dix: DoChangeKeyboardControl shouldn't be using inputInfo.keyboard. commit 9cc41b88dfebb3f1e0a7cb5c224146e651a2cda4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 18:47:28 2008 +1030 Xi: ProcXSetClientPointer should directly check for the client from the id. The window ID includes the client ID anyway, so we might as well just look up the client directly instead of trying to get the window first and the client from the window. This also fixes a possible issue with XACE. If the client had permission to write on the client but not on the window, the previous approach would have failed. commit 521fdc28d86d091495da3558d26ab4a938250ffe Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 18:43:18 2008 +1030 xfixes: switch a few inputInfo.pointer to PickPointer commit 37194b13554f0d36343cf73324b128b15bb6a338 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 18:36:33 2008 +1030 Xi: switch to using "rc" (instead of "err") as returncode. All the rest of XI uses rc and returns rc in case of error, so make mpx-related stuff comply. This stops the rest of XI sending the error manually. This is just a cosmetic change to be in line with the rest. commit c7e9b67c547c97b2c943eab555b4fe2844e8a91f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 18:09:56 2008 +1030 dix: free ClassesRec when a BadAlloc occurs during CoreKeyboardProc. commit 8da83836b60f7cdb75d08482f4311fa0e2ab4e1d Merge: eace88989 ae869fc76 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 3 17:04:54 2008 +1030 Merge branch 'master' into mpx Conflicts: XTrap/xtrapddmi.c Xext/security.c Xext/xprint.c Xext/xtest.c Xext/xvdisp.c Xi/exevents.c Xi/grabdevb.c Xi/grabdevk.c Xi/opendev.c Xi/ungrdev.c Xi/ungrdevb.c Xi/ungrdevk.c dix/cursor.c dix/devices.c dix/dixutils.c dix/events.c dix/getevents.c dix/main.c dix/window.c hw/xfree86/ramdac/xf86Cursor.c include/dix.h include/input.h include/inputstr.h mi/midispcur.c mi/miinitext.c mi/misprite.c render/animcur.c xfixes/cursor.c xkb/xkbAccessX.c commit ccf6636d2ca8acdaaeb8da34db507a10a082b0de Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 2 19:28:33 2008 -0800 Kill xf86getpagesize even harder (dummylib & ioport) commit dfd682b582636a36345144bcf835e3ee46718d90 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 2 19:27:22 2008 -0800 X.Org bug 4947/Sun bug 6646626: Xv extension not byte-swapping properly X.Org Bugzilla #4947 <https://bugs.freedesktop.org/show_bug.cgi?id=4947> Sun bug 6646626 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6646626> Don't use swapped data after swapping it. When done swapping data, send the swapped data, not the address of the pointer to it, to the client. commit f6666dcc3b1ac60f850ea53c357a9ef61672a52a Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 2 19:19:55 2008 -0800 Add dixAllocatePrivate stub to dummylib for utils Normally not necessary, except when building non-optimized/debug causes the inline functions from private.h to appear in os-support/libxorgos.la commit 73f422996016107d5f53492e4197bb05ed9c4bb9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 2 19:17:54 2008 -0800 Fix names/types of new vuidMouse{Get,Set}ScreenPrivates macros commit 895073f6b41d9313cfe748232c492c5e9f76b443 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 2 18:09:26 2008 -0800 Restore include & typedef needed by dtrace 996b621bec1bbc4fb21970c75eaec62053bc6ccb deleted a couple lines too many commit 306fde4082044dfecbedd9af41e660bafb3ce438 Author: Brian <brian@i915.localnet.net> Date: Tue Jan 1 09:27:44 2008 -0700 regenerated to add framebuffer object tokens (bug 13800) commit 5c362c2eb2cfdf1f6d667a3e64a0a7bc4942c950 Author: Brian <brian@i915.localnet.net> Date: Tue Jan 1 09:07:48 2008 -0700 regenerated, adds GL_MAX_3D_TEXTURE_SIZE (see bug 13811) commit 85365ddf16e2b954d8249b380df53337420ed684 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 17:35:54 2007 -0500 EDID 1.4: If given a native pixel format, use it when inferring virtual. commit 312b30cb03e439644ea10e08fa93268116333f0d Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 17:18:30 2007 -0500 EDID 1.4: First detailed mode is always preferred. ... so act like it in the modelist generator, not just the parser. commit 9dbb73033ae60e7ab85f1469a696e2a52f0cb0fe Author: Colin Harrison <colin.harrison@virgin.net> Date: Sat Dec 29 00:02:16 2007 +0200 Rootless: Fix lvalue error from devPrivates change Instead of trying to use an invalid expression as an lvalue, use the function call instead. commit 36ff05771b0699aa80ad718e24097bc25cb4fb00 Author: Jurij Smakov <jurij@wooyd.org> Date: Fri Dec 28 23:59:53 2007 +0200 GL: Add GLX compile flags lost in modular X server changes RISC chips that trap on unaligned loads and stores need to define __GLX_ALIGN64. This used to get added to the cflags in the old *.cf files but it no longer does in the modular X server. Also, Alpha needs to pass -mieee to the compiler as well. This is a simple backport of a patch that debian, and probably other distributions, have been applying forever. To the best of my knowledge the patch was written by Jurij Smakov. See Debian bug number #388125. I just checked and this has been rotting for more than a year in freedesktop bugzilla as #8392. Signed-off-by: David S. Miller <davem@davemloft.net> commit bae459cfc4f17a5ec5f2810e9f913e3ad2d8b8d4 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:50:18 2007 -0500 Don't carp on EDID 1.4 blocks anymore. Also whine more loudly when we get something other than 1.x. commit 70b2d6cfeb3bcb7b862a2ae29f6ef7cb84d69486 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:39:00 2007 -0500 Check the gamma value, not its address. commit 592d814ee09e86e283116a7a1052762c8398e8e5 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:37:23 2007 -0500 EDID 1.4: Additional semantics for display feature bits. First mode is _always_ preferred in 1.4; the bit that used to mean this now means that the preferred mode is also the native pixel format. The old "is GTF" bit now means "is continuous-frequency" instead. Section 3.6.4, Table 3.14: Feature Support, Notes 4 and 5. commit 322d0103aee317500057c80d542d7270d69a5731 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:28:44 2007 -0500 EDID 1.4: Alternate color encodings for digital inputs. Section 3.6.4, Table 3.14: Feature support. commit f1f43caf7e26a84dbacd4e5d7d47c8b4e4982836 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:12:11 2007 -0500 EDID 1.4: Allow for gamma definition in extension blocks. Section 3.6.3, Table 3.13: Display Transfer Characteristics (Gamma) commit 861ee38817523a647e6be10d7e8fe26f66054217 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 16:06:45 2007 -0500 EDID 1.4: Additional aspect ratio semantics for screen size fields. Section 3.6.2, Table 3.12: Horizontal and Vertical Screen Size or Aspect Ratio. commit 14b5c8a447db0395fb14b2d404eafb1d8e4fb817 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 15:52:42 2007 -0500 EDID 1.4: Extended support for digital interfaces. Section 3.6.1, Table 3.11: Video Input Definition. commit a948216dccb5ee577a50a42035dc9bc49d0a00c6 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 15:00:41 2007 -0500 EDID 1.4: Decode CVT 3-byte codes and add them to the mode pool. Section 3.10.3.8: CVT 3 Byte Code Descriptor Definition. commit f6df66cc89bcd0a0be2e7bca05839fdd428c1d4c Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 13:55:39 2007 -0500 EDID 1.4: Trivial support for new detailed sections. Nothing actually decoded yet, but at least we print what they are. New in EDID 1.4: - Color Management Data (0xF9), Section 3.10.3.7 - CVT 3 Byte Code Descriptor (0xF8), Section 3.10.3.8 - Established Timings III Descriptor (0xF7), section 3.10.3.9 - Manufacturer-specified data tag (0x00 - 0x0F), section 3.10.3.12 commit bac3ecde39cc914ab515991234b7dc2138005b84 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 13:33:39 2007 -0500 EDID 1.4: Allow for sync range offsets. Table 3.26: Display Range Limits & Timing Descriptor Block Definition commit 3b23dd9fd43a28033d0af7b02088b0c6ca433158 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 28 13:29:45 2007 -0500 xselinux: Fix whitespace warnings. commit 643c52be32c187a0fdb9a031b1e31d97cd551339 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 28 13:26:26 2007 -0500 xselinux: Remove "X" prefix on remaining functions and strings. Should be evident from the context. commit f4bc333fc1e8d9fa9911771d2072df4df741c553 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 28 11:56:54 2007 -0500 xselinux: don't FatalError on an invalid class mapping, just disable support. commit f3780ece528ed3ead809ba6a388fa0f8aab2a775 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 20 20:32:07 2007 -0500 xselinux: Implement swapped protocol request logic. commit 1bbf64ab115e2a1121d6f9c0830b1b977f025178 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 20 20:31:34 2007 -0500 xselinux: Remove unnecessary structure definition. commit 938da5ee389975f910721f1c2cebc2dcec793117 Author: Adam Jackson <ajax@redhat.com> Date: Fri Dec 28 12:23:44 2007 -0500 Add HDMI and DisplayPort connector types. commit 24105cf6582201a94bc39aeac5a795297018aeb5 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 28 15:49:50 2007 +0200 Input: Don't reinit devices If a device is already initialised (i.e. the virtual core devices) during IASD, don't init them again. This fixes a leak. commit 941058f8da0d725f909dc97f68c32ce244a9dc0a Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 28 15:48:57 2007 +0200 KDrive: Xephyr: Don't leak screen damage structure commit b2f6cd290c43b88f0d08fb29f8657618a067d2a0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 28 15:48:25 2007 +0200 OS: Don't leak connection translation table on regeneration commit 190a0506243b39cd8dfc0e12068e3a3f416330f1 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 28 15:47:57 2007 +0200 Config: HAL: Don't leak options on failure to add device This showed up in Xephyr in particular, which denies new device requests. commit f44fd3f9e41bf467360ace93ef5b532d8f61fb2c Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 28 15:47:21 2007 +0200 Config: D-Bus: Don't leak timers TimerCancel doesn't free the timer: you need TimerFree for that. commit ae869fc7669764729e13fdd70149ed636753f2a3 Author: David S. Miller <davem@davemloft.net> Date: Tue Dec 25 22:42:50 2007 -0800 [SBUS]: Fix build, use getpagesize() instead of xf86getpagesize(). xf86getpagesize() was removed, but this one call site was not fixed up. Signed-off-by: David S. Miller <davem@davemloft.net> commit 009f1e4e55200425de2fe0dbc1f0ac0f431fb4cf Author: Fatih Aşıcı <fatih@pardus.org.tr> Date: Tue Dec 25 23:09:49 2007 +0200 Config: Don't forget to add xkb_rules option commit 389e8917f66a489455f1d5c70f44c262717538ad Author: Fatih Aşıcı <fatih@pardus.org.tr> Date: Tue Dec 25 22:59:24 2007 +0200 Config: Fix a memory leak commit 743008a4812d6b046211ebcf4eab202687b458d5 Author: Adam Jackson <ajax@redhat.com> Date: Sun Dec 23 14:27:14 2007 -0500 Report serverClient resources in the X-Resource extension. commit beb29c605b8c66e1a18b89668aa421c1519645f6 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 21 02:09:01 2007 -0800 XQuartz: *REALLY* use CFStringCreateWithCString I need sleep! Why am I making these stupid mistakes... sorry for pointless commit spam. ugg. (cherry picked from commit b16351fc6457aabead328472d16dc25789032940) commit 5dd895efa305954e2695aa22a9e49acfb65b4d5e Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 21 02:06:47 2007 -0800 XQuartz: Use CFStringCreateWithCString (cherry picked from commit 79782b0e14761dcf5d6635b8eec161b74f06763a) commit 2c24231fc2027cf5034bb1b6636332687f586726 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 21 01:57:43 2007 -0800 XQuartz: Reduce code duplication in X11.app (cherry picked from commit b81809cd91a9f90b7f2de77b1dcf514cee87c32d) commit f3042a63be0748bb60567144276d2c61b75ba0b7 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 21 01:24:06 2007 -0800 XQuartz: Handle Pseudorami init in miinitext (cherry picked from commit a585c94fedd4ecbc87524703c01bb128fc2aa951) commit fa9680a7305d7f906da1bdeb40a0863ef66316e6 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 19:38:20 2007 -0800 XQuartz: Added localization. (cherry picked from commit 7a5cc7bfbb296a2c41a580b063324c448f7131db) commit 603a8b73d46d59e5f9f0be39be8317f3fadfe7e6 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 18:29:57 2007 -0800 XQuartz: Cleaned up command line arguments. commit 4cf3002b6020024f2fc2ed0cc40a872a066e482d Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 18:08:40 2007 -0800 XQuartz: Kill off server-main.c and launcher-main.c Now using xinit (cherry picked from commit 5d6ae3d299f72df714117948b3d31dcbddf6c0bc) commit 1f74bef1ad1399323fc0d2e309b808bf32c622e4 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 17:33:38 2007 -0800 XQuartz: Don't fork to exec app_to_run. Plus other housecleaning... (cherry picked from commit ae302db472f127be082d05b418ede332fae8ccc5) commit 2d15d439f844d4016f169664a338595c11b91b77 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 15:46:40 2007 -0800 Xquartz: Use X11ControllerMain() (cherry picked from commit a9ac932543374aa2540f5a12cc85ef82c85b0e0c) commit 1393a97ea97b5f7d7b90e3e8c58b5996b600e0c6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 20 16:23:35 2007 -0500 xselinux: Send AVC messages to audit system instead of log file/stderr. commit 42802a8e6b3d3795acc4f8b7597ea5a48619b5cd Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 20 13:17:30 2007 -0800 Xquartz: General Cleanup General code cleanup, whitespace, dead code removal, added missing prototypes. Made Xquartz come to foreground later in startup, so it doesn't appear for Xquartz -version (cherry picked from commit 36922e8ff4316c93843aa3fe959cf8df3c7d5892) commit 7ef7727b800fa4715b80a82850d65b88fde5fe6c Author: Dave Airlie <airlied@clockmaker.usersys.redhat.com> Date: Thu Dec 20 10:11:26 2007 +1000 entity sharing: make !shareable entity non-fatal. Just because the entity isn't shareable, we should bring down the server. Just ignore the extra screen and keep going. commit 50e80c39870adfdc84fdbc00dddf1362117ad443 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 19 16:20:36 2007 +1030 include: never overwrite realInputProc with enqueueInputProc. Bug #13511 In some cases (triggered by a key repeat during a sync grab) XKB unwrapping can overwrite the device's realInputProc with the enqueueInputProc. When the grab is released and the events are replayed, we end up in an infinite loop. Each event is replayed and in replaying pushed to the end of the queue again. This fix is a hack only. It ensures that the realInputProc is never overwritten with the enqueueInputProc. This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) (cherry picked from commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335) commit d0308b64655360517d83e07e866d103c3f2b389d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 19 18:18:10 2007 +1030 Xi: specify correct struct when calculating size of GetDeviceControl reply. This doesn't change much, as the struct previously given has the same size as the ones now anyway. Still, we should be pendantic. Thanks to Simon Thum for reporting. commit 66b00029e587cec628d0041179a301e888277f8e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 19 18:10:50 2007 +1030 Xext: remove redefinition of Bool. Thanks to Simon Thum. commit eace88989c3b65d5c20e9f37ea9b23c7c8e19335 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 19 16:20:36 2007 +1030 include: never overwrite realInputProc with enqueueInputProc. Bug #13511 In some cases (triggered by a key repeat during a sync grab) XKB unwrapping can overwrite the device's realInputProc with the enqueueInputProc. When the grab is released and the events are replayed, we end up in an infinite loop. Each event is replayed and in replaying pushed to the end of the queue again. This fix is a hack only. It ensures that the realInputProc is never overwritten with the enqueueInputProc. This fixes Bug #13511 (https://bugs.freedesktop.org/show_bug.cgi?id=13511) commit bcad2a5a24f30cfdf9eca31915ed5a55ed094285 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Dec 18 20:19:26 2007 -0500 XACE: Too many arguments to selection access hook. commit 7721d3e9217b41aab3a0ee5eaa52f5b53cbb07db Author: Adam Jackson <ajax@redhat.com> Date: Tue Dec 18 19:14:26 2007 -0500 Reference cvt and gtf in the xorg.conf man page. commit 51fab1eb30691c503f1b4dc98b465f2bc2e1394e Author: Sam Lau <sam.lau@sun.com> Date: Tue Dec 18 11:38:47 2007 -0800 Sun bug 6278039: Xevie checking wrong size in swapped XevieSelectInput requests <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6278039> commit 97c82ce0510808ea9d8a37a0a121e750f6dd8158 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Dec 17 23:11:29 2007 -0500 XACE: Restore the old background None behavior in response to bug #13683. From the X11 protocol spec: "If background None is specified, the window has no defined background." This means that toolkits and apps cannot rely on the "transparent" nature of the current implementation! At some point before the next release, XACE will switch back to a solid background as the default. commit 9f6ae61ad12cc2813d04405458e1ca5aed8a539e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 18 13:57:07 2007 +1030 dix: set the correct number of valuators in valuator events. (first_valuator + num_valuators) must never be larger than the number of axes, otherwise DIX freaks out. And from looking at libXI, anything larger than 6 is wrong too. commit 6a5c3e04fa43b98ccffd69ad86dd781602f88d0b Author: Dave Airlie <airlied@redhat.com> Date: Mon Dec 17 14:59:12 2007 +1000 mi: set the private key to a unique non-zero value commit a18d28a5efbe6021d6c800506cece28a73545aad Author: Dave Airlie <airlied@redhat.com> Date: Mon Dec 17 13:49:16 2007 +1000 damn then my cut-n-paste ate my end of lines... commit d096bbd01bf7c7e15b5a2c582718f3333e063ddc Author: Dave Airlie <airlied@redhat.com> Date: Mon Dec 17 13:45:15 2007 +1000 Xquartz ate my DMX - thanks commit bf20c4374aeb5160a0dc372df9b49f1bbc05f078 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Dec 16 01:14:32 2007 -0800 Xquartz: Removed launchd plist and x11-exec. The relevant code is now in xinit. (cherry picked from commit 767b4c9d9daa5d0ea59ac1f0d70146798da631cb) commit 58c2898b62fbf0d8e0f175de7cc208dc29d93788 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sun Dec 16 01:21:45 2007 +0100 xfree86: permit access to io port 0xffff on the hurd commit b4ef8885e1697b83a0dcc9f7fe79155f19241798 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 15 14:00:19 2007 -0800 Xquartz: Fixed launchd detection commit ff5abc72fcc459d7eac663e5f8e4d40b28749841 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Fri Dec 14 17:59:29 2007 -0200 registry: XREGISTRY_UNKNOWN needs to be defined even if XREGISTRY isn't enabled In case XREGISTRY isn't enabled, XREGISTRY_UNKNOWN is used but it's not being available. It's now always available. commit a3f7f7b60e391e6106f5db40b3fe5fbc67ccd836 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 13 20:45:14 2007 -0800 clarified debug message to indicate that we're sleeping (in case we get reports about slow launch times, this will help clarify what's happening) (cherry picked from commit 2eea3483cf893f8f81bacd434b31408dfb38cb06) commit e0e59b3bbc4d8e7ac3934a6f6a9e4a15b328c475 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 13 20:44:33 2007 -0800 we need to link against CoreServices, not ApplicationServices (cherry picked from commit ba4d2096e7953ef5b971682f0e28535da968acb1) commit 062d9234e233fc4c1c617f59093da973c9d3e2ce Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 13 20:40:27 2007 -0800 fixed bug in x11-exec that prevent icon from showing up (cherry picked from commit e1f4a0c20d3a52d98954c4b28d0ec4d44564bc32) commit 95c02adea80a14e18bb51876bc1418eccdade31d Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 14 15:21:40 2007 -0800 Xquartz: Fixed cpprules include commit 86730337001ba4db6d77fe42406695e32784b157 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Fri Dec 14 08:46:35 2007 -0200 kdrive/ati: use operating system input devices commit e110255501e2f699709e6978f5e52d3be96333c8 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Fri Dec 14 08:45:09 2007 -0200 kdrive/vesa: use operating system input devices commit 863ba390e9fdf0d37cdf03bf5eebe7fdfe6288f5 Author: Otavio Salvador <otavio@ossystems.com.br> Date: Fri Dec 14 00:03:13 2007 -0200 kdrive/fbdev: use operating system input devices commit ca59d3f7bdb5f3724ff45ea57912c0b1098a73d6 Author: Arkadiusz Miskiewicz <arekm@maven.pl> Date: Thu Dec 13 00:09:08 2007 +0200 Xprint: Clean up generated files Remember to clean generated wrapper files. commit 5b02a6ca5b31db69d08f2f452494c0f93a6260d9 Author: Bartosz Fabianowski <freebsd@chillt.de> Date: Fri Dec 7 02:38:14 2007 +0000 Input: Fix proximity events with valuators Initialise num_events to 1, so we always send a proximity event, and then optionally valuator events. Also make sure mieq can deal with valuator events sent after proximity events. commit a14a143832be844b4b890b0160ccb9fc8293c28c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 14 00:57:16 2007 -0500 Bump server version for devPrivates rework / XACE. commit a2df51f8e95a814c54b806814020155ac8bd177d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 14 00:53:54 2007 -0500 Bump video driver ABI and extension ABI for devPrivates rework. commit 86b2e59bfb79bd042a13c35fbb4ccecec576f629 Merge: 1c1a4bc97 cb0d7e2c2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 14 00:32:24 2007 -0500 Merge branch 'master' into XACE-SELINUX Conflicts: configure.ac This is the last pull before merging to master. commit 1c1a4bc970be061484bb8dcccf945eb08144c656 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 13 19:51:40 2007 -0500 devPrivates rework: more cleanup from previous merge operation. commit cb0d7e2c2692a332e2bd5495478ebf9a6cd601d0 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 13 16:23:46 2007 -0800 Xquartz: Don't hardcode libexec dir (cherry picked from commit 67b479ef80cb740a24981335eb8d596744168a62) commit c39212fd7353fc1a07a30bade90f78356c748e2d Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Dec 13 15:56:31 2007 -0800 Xquartz: Don't hardcode LaunchAgents dir (cherry picked from commit 07a12d71fefd78c380078efa835700f2868ab204) commit 82e1aff9fbc1d15e3451707e3ccbf4b13eedda94 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 13 15:57:39 2007 -0800 Modified X11 plist to use x11-exec (cherry picked from commit 7d9a11329e476f45e4d9f9aebcb43469321347c7) commit 1a5910588a60af0c136595e2457d897d9e54ac88 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 13 15:55:28 2007 -0800 created x11-exec wrapper, which uses LaunchServices to find (and then exec) X11.app (cherry picked from commit fc04c9759b30d062111d4a7f3f411ed0f18cbde4) commit c8feb73f5841e7812d8dfdb91f1064e2033d028c Merge: 9a7ce5736 a125ce4a8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 13 18:38:25 2007 -0500 Merge branch 'master' into XACE-SELINUX Conflicts: Xext/EVI.c Xext/bigreq.c Xext/cup.c Xext/dpms.c Xext/fontcache.c Xext/mitmisc.c Xext/xcmisc.c Xext/xf86bigfont.c Xext/xtest.c configure.ac dbe/dbe.c hw/darwin/darwin.h hw/darwin/darwinEvents.c hw/darwin/iokit/xfIOKit.h hw/darwin/iokit/xfIOKitCursor.c hw/darwin/quartz/fullscreen/fullscreen.c hw/darwin/quartz/fullscreen/quartzCursor.c hw/darwin/quartz/quartz.c hw/darwin/quartz/quartzCommon.h hw/darwin/quartz/quartzCursor.c hw/darwin/quartz/xpr/dri.c hw/darwin/quartz/xpr/dristruct.h hw/darwin/quartz/xpr/xprCursor.c hw/darwin/quartz/xpr/xprFrame.c hw/xfree86/modes/xf86RandR12.c include/cursor.h miext/rootless/rootlessCommon.h miext/rootless/rootlessScreen.c miext/rootless/rootlessWindow.c render/picturestr.h Trying to pick up the pieces from the darwin churn here... commit efcdc0d7010f4e6ec833842cb010a07068edf7ab Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 13 15:38:41 2007 -0500 Correct the documentation comments in xf86Modes.c Most of those functions do not, in fact, work with circular mode lists, and by this point the API isn't really "proposed" anymore. commit 1768af38c737f4c14d32f587b51a8ec3d3d6ed5f Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 13 15:06:18 2007 -0500 Add infrastructure for validating modes by memory bandwidth. commit 4359193aaa522599c502d012b9c163e993c01d79 Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 13 10:59:48 2007 -0500 Explain a confusing #ifdef. commit 8cedbb0a53d47b12f03edb726db9d5879c8a63a4 Author: Adam Jackson <ajax@redhat.com> Date: Thu Dec 13 10:57:35 2007 -0500 Clean up some #if 0. commit 9a7ce573636e349ee2967991c7cc1407e80ae524 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Dec 12 20:44:59 2007 -0500 xselinux: Add new protocol for setting device create context. commit a125ce4a84f5fb5934fefebd7cfb22a83180874d Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Dec 12 12:20:54 2007 -0800 Fix dist by including modeline2c.awk. This was broken by commit cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013, which removed modeline2c.pl from EXTRA_DIST without adding modeline2c.awk. commit 671592343701d8174a70f1ffb9c818784ea3af7a Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Dec 12 10:59:15 2007 -0800 Get rid of xf86DefModes.c. It's out of date and not included in the build. Instead, xf86DefModeSet.c is built from vesamodes and extramodes using modeline2c.awk and *that's* what gets built. commit d86e7f2ecc0a0129a722ffaca93dfc7c0c60e842 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 7 20:40:21 2007 +1030 dix: when getting a bogus event, at least print out the type. commit eab0c4e49015fe96f6d985316f9c5fa28a7eb1fe Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Dec 10 20:57:24 2007 -0800 Xquartz: Pre-process Xquartz man page (cherry picked from commit dec2633c41dd0adf73264afdf251a6522d6ae76a) commit 1ff945a8e43e622b39b360ee49efd6ae3b77be67 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Dec 10 20:47:48 2007 -0800 Xquartz: Make Alt work with Xmodmap again (cherry picked from commit 0e017177dcca7185716ca760dcce9ddedc7bfef9) commit 7d61893b49569a72bccb63f1ae8c9ce4ef4e354f Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Dec 10 20:33:30 2007 -0800 Xquartz: Removed Xplugin.h from EXTRA_DIST (cherry picked from commit a746383eca77c9b9ea2cba0cf1c8fc39c0f7d536) commit 8f2eff643bf421bc4233fbaa2409b75d9f80d147 Author: Ben Byer <bbyer@bbyer.local> Date: Sat Dec 8 23:34:40 2007 -0800 remove Xplugin.h, because we should use the one in /usr/include (cherry picked from commit 3e881032f35f774ff9638678d7e3f77c81f62976) commit 7b573ed43672b1fac7b4e6df85a657942ab4cba6 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sun Dec 9 12:02:04 2007 -0800 Xquartz: Added missing link to libconfig.a (cherry picked from commit 14ec1cf1cb7ebc183c05e13f9c2b4b4eed679ff3) commit cd13c4ba5b7a1bdfb419cb492a96a72dccf2681e Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 13:18:17 2007 -0800 .gitignore: added hw/xquartz/bundle/org.x.X11.plist commit 020b0e92b039d6ddaea0bbdb890b6a01037bf9b6 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 11:49:37 2007 -0800 Xquartz Added quartzKeyboard.h to EXTRA_DIST (cherry picked from commit 37c9781fdb672229ceab101b080762e15512943f) commit 5e016fa9b2bf28971ed1794f4706c6538b1d411c Author: Ben Byer <bbyer@bbyer.local> Date: Sat Dec 8 06:12:46 2007 -0800 Added darwinEvents.h to EXTRA_DIST (cherry picked from commit 45e5247564c423a2bf02cfec1993155858c91a14) commit 6bb5dacc1710cdbededb9b28ba89a184ecd0931c Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 01:41:37 2007 -0800 Xquartz: Actually add quartzForeground.[hc] Sorry for the commit spam... I'm tired and was overly quick to commit... forgot to include a neccessary file. (cherry picked from commit e564b7aeaab63e4c943445275af680b3b5898a94) commit 02df03667052fa6a4e0405b91a005dc48e9b39c4 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 01:28:26 2007 -0800 Xquartz: Actually, it should be org.x.X11 for case-sensitive FS (cherry picked from commit c5ccb98d5d461c8a22fc0f3942a607ac90e1e37e) commit 740cc54f081393d4ffe1a3e91c9e504dfaee3fe9 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 01:24:58 2007 -0800 Xquartz: Use org.x.X11 instead of com.apple.X11 for preferences Fixed inconsistency so preferences get read from the correct source. (cherry picked from commit a74c38bd9f28735acd602d359d7ca6357aed1e93) commit 41a0aeaae9b7b2f8cc2468fd1f3ee11287d34828 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Sat Dec 8 00:13:47 2007 -0800 XQuartz: Fixed "Multiple Dock Icons" BAM! (cherry picked from commit d0dca8a88506f50b51f41f99a2f1feb6954c8a31) (cherry picked from commit 0502955a2af487b51bf22916ac02e497c2d96aba) commit a1b0346853720e98963910b82603c5cda72bb7f9 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Dec 7 23:26:11 2007 -0800 XQuartz: Cleaned up configure, X11.app path in launchd script Don't hardcode X11.app's path in the launchd plist. Only install the launchd plist if we --enable-launchd. (cherry picked from commit 6b74c535dc331d1d621b2541492a3336f69d70a2) commit 1157cfcc5a4e2a7299a4c48df04a1cc8d5093906 Author: Ben Byer <bbyer@bbyer.local> Date: Fri Dec 7 21:55:42 2007 -0800 Just a couple of small uninitialized pointer fixes (cherry picked from commit d12b650362da100ceaecb7e859cd4ef1908d4407) commit 0ad1c359c5b0be63748f5c630c97be88a8cc92ce Author: Jeremy Huddleston <jeremy@dhcp-38-248.EECS.Berkeley.EDU> Date: Fri Dec 7 18:54:58 2007 -0800 Darwin: Use __APPLE__ instead of __DARWIN__ (cherry picked from commit 54654815fa5e59b25cfd1fa72610120b72c10175) commit 85ed0bb44011312dfaa9f2dc31642a0f89ec0bd3 Author: Brice Goglin <bgoglin@debian.org> Date: Sat Dec 8 02:53:27 2007 +0100 Add a missing linebreak after LoadModule: "foo" http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=454742 commit 4fc288a13f825db942c9dcd64f4abd0265652faf Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 7 17:28:37 2007 -0800 Check for <sys/sdt.h> as well when determining to enable dtrace probes Avoids auto-detecting dtrace is present on systems with the ISDN trace tool named dtrace installed, but not the dynamic tracing facility named dtrace commit 67907904f094c803d5faf6fa2ce23c01f9a5a521 Author: Ben Byer <bbyer@bbyer.local> Date: Fri Dec 7 01:51:53 2007 -0800 fixed pathname in GL/apple/Makefile.am (cherry picked from commit b6357cec6d837226009c0d2b69026027da36656e) commit 56f5066d477836a975122f4e5748c0f4fb790175 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Dec 6 20:51:32 2007 -0800 ALLOCATE_LOCAL is dangerous on Darwin due to memory layout differences from Linux, so let's define NO_ALLOCA. (cherry picked from commit 7caf51d1a5a86ae884e0087795636222c082962c) commit c238ef06a270c0c1d48cdb9175b6d5815c7c2a49 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Dec 5 21:36:34 2007 -0800 Darwin: Dead coded removal Kill off assert macro (cherry picked from commit d6493abedb2caf03b2bc3a6440b637df67eff081) commit 3a058456e0ce531b21ae2b37be8868b8e0d56e56 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 7 20:23:36 2007 +1030 mi: unify ErrorFs, prepend [mi] commit c5acf401dad6fbca47f2bb870185c1d08ac947a5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 7 20:19:43 2007 +1030 mi: unify last two ErrorF's in mieq.c commit 117458d2db49efd3f04432ff45871b44c7d4ad57 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 7 20:18:49 2007 +1030 mi: change infamous "Tossed event ..." error for something more explanatory. Few whitespace errors fixed. Two ErrorF's prefixed with [mi]. commit 8a8239f2e21795602fcff5281833b350e6b2a286 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Dec 5 21:23:36 2007 -0800 Darwin: Renamed DarwinModeBlah to QuartzBlah (cherry picked from commit 08ebf86d379b1ddfb08df65d29aea5df66de4327) commit 540439a966cce3fc68a7e4bffdb5bcab1b20725f Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Dec 5 20:55:06 2007 -0800 .gitignore: Added Xcode user files commit bc65a243930e4b02f06a861495420b0a120eae8c Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Dec 5 19:43:49 2007 -0800 Darwin: Flattened quartz into darwin, renamed darwin xquartz Leaving xpr unflattened since we want modularity to replace that with xpc (XPluginComposite) at some point (cherry picked from commit 48e6a75fbdd0fee86e364f02ace83f20b312a2b2) commit e00f7061b22001989edf5bd38c2d0cc1566fdd19 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Dec 4 23:18:37 2007 -0800 Darwin: Cleaned up keyboard interface headers (cherry picked from commit 141f69dc3d8d6e7d8ff65607f43700ac11243041) commit cb44b6121c4b7b9dd7ff4ff52aaab914c82ff013 Author: Andrew Oakley <andrew@ado.is-a-geek.net> Date: Wed Dec 5 20:23:05 2007 -0500 Fix commit aa0dfb3f42f19bb351ca7f1a9507ff5ec4590e96 From bugzilla bug 13467¹: Currently the xserver fails to build without this (now deleted) file, as the Makefile tries to distribute it. The patch simply removes the reference to modeline2c.pl. 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 Signed-off-by: James Cloos <cloos@jhcloos.com> commit 320abd7d1d906807448fa01ad3377daf707f46cc Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 5 19:37:48 2007 +0000 XKB: Actions: Don't run certain actions on the core keyboard Don't run VT switches, terminations, or anything, on the core keyboard: only run actions which affect the keyboard state. If we get an action such as VT switch, just swallow the event. commit 85dd8efac1bc0715f03c99d261b1c5d0980623e1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 5 19:36:59 2007 +0000 WaitForSomething: Ignore EAGAIN If select ever returns EAGAIN, don't bother complaining. commit b7f3618f3933a810778093fd47564a1e3bf3fde6 Author: Rich Coe <Richard.Coe@med.ge.com> Date: Wed Dec 5 19:36:37 2007 +0000 OS: Connection: Keep trying select while it gets interrupted (bug #9240) If we got interrupted (EINTR or EAGAIN) during select, just try again, rather than shutting clients down on either of these errors. commit d8b2cad3771a09860e7be1726f67e684cf7caeec Author: Rich Coe <Richard.Coe@med.ge.com> Date: Wed Dec 5 19:31:07 2007 +0000 OS: Connection: Don't shut down disappeared clients (bug #7876) If a client disappears in the middle of CheckConnections (presumably because its appgroup leader disappears), then don't attempt to shut it down a second time, when it's already vanished. commit a8e27a108abeba73b2888da4e0604008f4b02045 Author: Kanru Chen <koster@debian.org.tw> Date: Mon Dec 3 12:46:45 2007 +0000 Config: HAL: Fix XKB option parsing Actually combine the XKB options into a string, rather than just repeatedly writing a comma. commit 2d723bbd0d36f6d7763b4df3298d40720f97fdd0 Author: Peter Harris <peter.harris@hummingbird.com> Date: Mon Oct 29 18:05:19 2007 -0400 Add missing swaps in panoramiXSwap.c commit 0fccb24aa978b838cf0fb008e9695837e612c529 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Nov 30 20:35:26 2007 +0200 ProcessOtherEvent: Don't do double translation of button events We already deal with the button mapping in GetPointerEvents, so don't do the remapping again in ProcessOtherEvent. commit c6cfcd408df3e44d0094946c0a7d2fa944b4d2d1 Author: Hong Liu <hong.liu@intel.com> Date: Wed Dec 5 17:48:28 2007 +0100 Bug 13308: Verify and reject obviously broken modes. commit 8d0efe4c2a48047680af40e5f6d639f426902e07 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Tue Dec 4 17:59:13 2007 -0800 Darwin: Rework build system to more accurately reveal code infrastructure and facilitate future modularity. (cherry picked from commit e8399fd4d66a2b77b770c277e2fa424229a721b2) commit cc98a8e2415f12c7a90fd846d1ec858068e8c796 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Dec 3 23:59:19 2007 -0800 Darwin: RIP dumpkeymap, cr, and fullscreen Taking out the trash. We don't need dumpkeymap since we'll be getting keymaps straight from the OS. .Xmodmap should be sufficient for any user-needed changes. If this is not the case, please let us know, so we can address any problems you have. fullscreen never worked AFAIK cr isn't being used and xpr is much better. (cherry picked from commit e41af2967e885466c4d194fa4c3b358e6be37c30) commit 13af2d1efcc83d1412a4c727afddd97577b00f32 Author: Adam Jackson <ajax@redhat.com> Date: Tue Dec 4 17:36:21 2007 -0500 Restore xf86getsecs() as not having an ANSI equivalent. commit 447cd5d411875b62eb1a501bf00e604225b74d26 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 4 19:09:37 2007 +1030 dix: update comments about inputInfo.pointer. commit f44d7dcb5fefca3ddfd45e75d0bd0b47ec785e48 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 4 19:07:46 2007 +1030 dix: change the filters to be per-device. If we have one global filter, one pointer may change the filter value and affect another pointer. Reproduceable effect: blackbox and xterm, start dragging xterm then click anywhere with the other pointer (attached to different masterd device!). The button release resets the filter[Motion_Filter(button)] value, thus stopping dragging and no event is sent to the client anymore. Having the filters set per device gets around this. commit 0931f40bf1bd6e00b8d95968d761a495b2c9a46c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 4 17:08:56 2007 +1030 dix: comments, whitespaces, copyright fixes. Removing my copyright message for now, should eventually be in line with the rest of the messages. commit 09c0c1a3cc4807813774a3c0e28a7ba9a87bb5c7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 4 16:51:52 2007 +1030 dix: remove #ifdef XINPUT. No escaping XINPUT anymore. commit f8d7729df388c142624def36ba6d8c3b15922018 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Dec 3 20:20:05 2007 -0800 Darwin: Combine launcher and server X11.app This should hopefully eliminate confusion some people have over which X11.app is which. Now BOTH are in /A/U/X11.app and we intelligently determine whether to execute our app_to_run or launch the server. If arguments are given, we launch the server. Otherwise if we can connect to an X DISPLAY, we execute app_to_run. Otherwise, we launch the server. (cherry picked from commit e7026216ccaa8e4fb073800ba947c9909d4faada) commit 678f786715d76e972f8a77807c9caf3e90c24418 Author: Dave Airlie <airlied@redhat.com> Date: Tue Dec 4 12:24:47 2007 +1100 xf86crtc: oh mon could be NULL, so check before quirks commit a9df4bb555fd91707a68794c2dce24fb06e6cf64 Author: Dave Airlie <airlied@redhat.com> Date: Tue Dec 4 12:17:29 2007 +1100 xf86Crtc: pass correct parameter. quite how this has worked I've no idea. commit fe25f897c62bb324660217e15dbd3091c808dbba Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 3 18:34:40 2007 -0500 xf86getpagesize -> getpagesize elsewhere in os-support/ commit b84f2833a681585162b8dabfb02ff62e7e0ef4d6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 3 14:52:17 2007 -0800 xf86getpagesize() -> getpagesize() in os-support/solaris/sun_bios.c commit aa0dfb3f42f19bb351ca7f1a9507ff5ec4590e96 Author: James Cloos <cloos@jhcloos.com> Date: Mon Dec 3 16:57:58 2007 -0500 Remove Perl dependency from the build From bugzilla bug 13467¹: The modeline2c script is the only part of the Xorg server that requires Perl. [This] is a simpler replacement that works with any normal AWK. 1] http://bugs.freedesktop.org/show_bug.cgi?id=13467 Bug was posted by Joerg Sonnenberger <joerg@NetBSD.org>. commit 60086d90168265795e07a60939e9e2fe95c6e15c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 3 11:30:58 2007 -0800 Use pkg-config to get -I, -L & -R flags needed for OpenSSL Still just uses -lcrypto instead of the full library list from --libs commit b77ca7cc9c23184c4ab367baf1b3ed0acf27c269 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 3 11:29:54 2007 -0800 Use _X_EXPORT instead of __attribute__((visibility("default"))) commit 1faba797cbfe1a4804b7ea6b47e1ca9d4e4324e4 Author: Adam Jackson <ajax@redhat.com> Date: Mon Dec 3 14:12:58 2007 -0500 Death to libcwrapper. This has been deprecated since 1.1. Since we're breaking ABI again anyway, remove it entirely. commit 28b93d74a11a1064d68a214fcaa7b0aede864a38 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Dec 3 14:32:53 2007 +1030 ephyr: miPointerWarpCursor needs the device parameter. Thanks to Mitchell Quille for spotting it. commit 004876355b43fb4d3c2bc5653a7dc1bfd3f985ee Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 30 13:56:04 2007 +1030 dix: Remove RegisterPairingClient and UnregisterPairingClient. commit f4dc521b38560c8f93b614316a3a5511941a93a9 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sun Dec 2 18:21:40 2007 -0800 Darwin: Added {/,/System/}Library/Fonts to DEFAULT_FONT_PATH (cherry picked from commit b0069b04dddaa2df6d4cdf86f96fd8a2a257e47e) commit 0fff01f5660fb3bb9284f97c45dc76154435d02b Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Sun Dec 2 14:15:36 2007 -0500 Fix swapped Xv dispatch under Xinerama. Same-endian dispatch was properly calling through the Xinerama wrapping, but other-endian dispatch wasn't. commit fa47910045c3700d8d668b5e214e5ffc1e8dc3e7 Author: Adam Jackson <ajax@redhat.com> Date: Sun Dec 2 12:39:05 2007 -0500 Clean up many #if 0. commit 83ba1e167c1473ac7d85239a6ee5ed629353cb16 Author: Ben Byer <bbyer@bbyer.local> Date: Sat Dec 1 18:28:19 2007 -0800 added missing call to xcb_connect() (cherry picked from commit dc2fb323ee11f081d447605be151024f9e2487f9) commit 9ad4560b3cbd42e647d6227746d4d037616d57cf Author: Jeremy Huddleston <jeremy@tifa.local> Date: Sat Dec 1 16:23:23 2007 -0800 Darwin: Alt is Mode_switch Switching to Mode_switch to maintain compatibility with Tiger X11. (cherry picked from commit 8a76c99c0ebbaf7375f3a9c75c4f7921a79024da) commit f83d758dcc4878849a851c8466f6fa16b2b7cd8e Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Nov 30 16:11:15 2007 -0800 Darwin: properly implemented xcb check for stale sockets (cherry picked from commit f543cb8fbb3d9213cb03396f4252ab9821319993) commit f54b28eeba119c42d0fcccfbe295306dd670221a Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Fri Nov 30 16:09:23 2007 -0800 Darwin: Undo focus-hack which didn't work right. commit f30abe30c5fea10e680aa12f3fe37ee8ce1a0201 Author: Dave Airlie <airlied@linux.ie> Date: Fri Nov 30 13:52:06 2007 +1000 edid quirk for MAX 0x77e monitor From RH bugzilla 306441 commit 6216abe0c1a94efa4b2f0d14e88278f128304cd2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 30 11:34:24 2007 +1030 dix: avoid activating the VCP/VCK twice. This may set dev->key-xkbinfo to NULL, causing a segfault in xkb code lateron. Spotted by David Huggins-Daines. commit 9eb8ea9e615ebd8b568711eeca36aa84aa781ad3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 30 11:32:59 2007 +1030 dix: only freeze the paired MD on a grab, not all other devices. commit 8a079be0dd0f2ce37868988cde4ac8895522b088 Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Thu Nov 29 02:19:22 2007 -0800 Darwin: #ifdefs around dix-config.h include and NDEBUG/assert.h workaround. (cherry picked from commit d2b768890f0878ae4e3fec8f7219e82b79256133) commit 38397560612424b5b348f34c1a0bea8c47a574be Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Wed Nov 28 23:07:41 2007 -0800 Darwin: Removed support for darwinSwapAltMeta (cherry picked from commit 3d153c8fa40986d194b7701f5eafa0080e32399a) commit 89c3dfe41e3a17a4f27b20e23623dc5777670feb Author: Dave Airlie <airlied@redhat.com> Date: Thu Nov 29 19:57:24 2007 +1100 modes: use xf86RandR12Index to stop illegal access xf86RandR12Index set to -1, and if initialised it gets 0 or higher. This allows the server to start with xinerama turned on with only one head commit 725710fd0bc990b2c35e4c76128ef1c668013299 Author: Dave Airlie <airlied@redhat.com> Date: Thu Nov 29 19:40:53 2007 +1100 randr: make randr code not segfault when xinerama set commit e4fe0a3cb789b8757f1c80f606dfe32bccada582 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 29 09:55:24 2007 +1030 xkb: swap a LookupKeyboardDevice over in favour of GetPairedDevice The former always returns the VCK, which is obviously wrong if we have multiple devices. commit 23b8ca8a373d919225de9739af7b064f650eceec Author: Adam Jackson <ajax@redhat.com> Date: Tue Nov 27 13:20:40 2007 -0500 RANDR 1.2: Only enable unknown outputs if there are no connected outputs. Otherwise you end up with a confusing initial geometry, and xscreensaver and friends get very angry. commit edebe76cfdb31072d18a6fcd3ee8f1d95006855f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 27 10:22:44 2007 +1030 Xi: set DeviceXXXState's length fields to the correct size of the struct. Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum. (cherry picked from commit 0f2398d06ce591724e388b3270800c5e22b3de2d) commit 0f2398d06ce591724e388b3270800c5e22b3de2d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 27 10:22:44 2007 +1030 Xi: set DeviceXXXState's length fields to the correct size of the struct. Setting it to the size of a pointer is an interesting but equally wrong approach. Luckily Xlib never used this field anyway so nobody got hurt so far. Spotted by Simon Thum. commit 601307615e4955be23fd86a057285074242ad83e Author: Jeremy Huddleston <jeremy@yuffie.local> Date: Mon Nov 26 13:04:57 2007 -0800 Darwin,Rootless: Makefile cleanup (cherry picked from commit 9c6d8a035b712b219833653ac637b89703a9b0c3) commit 8503072e1c2b89dca786d4afb72aa60a170d2fbd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 16:52:41 2007 -0500 registry: add missing include statement. commit 996b621bec1bbc4fb21970c75eaec62053bc6ccb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 15:59:44 2007 -0500 registry: swap out the DTRACE XErrorDB stuff for the new registry call. commit 54cb729ecc2d366c1af836cb3d2ffc8e864e9b79 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 15:59:01 2007 -0500 registry: Add a call for DTRACE compatibility. commit decd5a7c605e42c99b6a4523c8e1833b859d9b24 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 15:26:49 2007 -0500 registry: Rebase registry to use the server config file of protocol names. commit 9b0e72c8d960d056276f5fa93f3cc2872825711e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 15:26:04 2007 -0500 registry: Add a great big list of protocol names, like the XErrorDB that ships with Xlib. This is considered temporary, until server-side XCB can solve the problem programmatically. commit c0f9e204baf0218466973868c5ea6ed0f78e6b8b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 26 15:24:15 2007 -0500 registry: rename the SERVERCONFIGdir and relocate it to /usr/lib/xorg by default. commit a344920ae86c1970e4cc34ee91e2f2008d490c49 Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 26 11:53:08 2007 -0500 Allow Virtual to be specified globally in the Screen section. The Display subsections are optional, and it's confusing to need to create them just to set a Virtual size. commit c6c284e64b1f537a3243856cf78cf3f2324e4c2b Author: Matthias Hopf <mhopf@suse.de> Date: Mon Nov 26 15:38:20 2007 +0100 Initialize Mode with 0 in xf86RandRModeConvert. Asking for trouble if non-initialized values contain random data. commit a4edfbef022f9635c2c9b9eb229cb622834dc68c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Nov 24 16:16:48 2007 +1030 mi: only call UpdateSpriteForScreen if the screen actually changed. If we call it unconditionally, we flip the dev->spriteInfo->sprite permanently when using XTestFakeInput (once in CheckMotion as called from the processInputProc, another time in UpdateSpriteForScreen when we actually warp the cursor). USFS also updates to the screen's root window unconditionally, which is not really what we want if we haven't changed screen at all. commit bf3198c8c56289244c58d36c6869442479fd3481 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Nov 24 15:00:57 2007 +1030 dix: fix typo commit 5dabe448bda68a483bf444a4adfed2b25b30f600 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Nov 24 15:00:43 2007 +1030 dix: Add special treatment of NotifyUngrab for enter/leave events. In some cases (e.g. using x2x) the previous model broke, with a window ending not counting down to 0 anymore. Special treatment for NotifyUngrab seems to help here. Current solution: If a NotifyGrab is to be sent ignore it. If a NotifyUngrab enter is sent, only adjust the semaphore if it is on 0. Likewise, do the same for a NotifyUngrab leave if the semaphore is on 1. This seems to work alright so far. commit 33b94da6327d3423b4ebc1a58d5894c9904e67c9 Author: Keith Packard <keithp@keithp.com> Date: Fri Nov 23 16:01:11 2007 -0800 Re-add call to XFixesExtensionInit for static servers. This reverts a portion of bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b which removed the call to XFixesExtensionInit and some cpp lines. commit f6401f944d327cc5d9a7ee0bbdf4f7fc8eaa31e8 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 23 16:12:49 2007 +0100 Don't segfault if referring to a relative output where no modes survived. commit fa19e84714aa84a2f2e817e363d6440349d0b619 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Nov 20 16:54:50 2007 +0100 Fix initial placement of LeftOf and Above. commit 184e571957f697f2a125dc9c9da0c7dfb92c2cd9 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Nov 20 13:05:26 2007 +0100 Adjust offsets of modes that do not fit virtual screen size. Fixes memory corruption if a too small "Virtual" was specified in xorg.conf for the selected multi-monitor configuration. commit a80e64f1503a4d8b11c4a6608d296422c69e3e8b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Nov 17 22:50:07 2007 +0100 XKB: Generate correct key repeat events (bug #13114) Make sure we send the correct event for the type of device when we're sending key repeat events, which stops repeats being sent to incorrect windows. commit 63351df0eec320aa3ce27d4d2ee6bcdb58aa2d92 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 18:02:07 2007 -0800 Darwin: Fix compilation/linking problems commit bf4ef4da759c01e6794ed28ba4988a2c8ee049bf Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 17:45:15 2007 -0800 Darwin: Remove the PaintWindow optimization which snuck back in. commit 2082e7aa878fe1221fd50895a9de1f408b3157a8 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 17:18:48 2007 -0800 Rootless: Remove the PaintWindow optimization which snuck back in. commit a751bc12bee1d4d2ed35e3a0c64d9c8c9bf30a82 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 13:53:00 2007 -0800 Rootless: Imported changes made in xorg-server-1.2-apple branch commit 59c7ca6586e7c20e28ad407ca9a0883c4d621d64 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 13:29:15 2007 -0800 Darwin: Added missing Makefile.am commit 23596291c30a85e38c00aef2c01b46d561e2916e Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 13:17:44 2007 -0800 Darwin: More syncing witn xorg-server-1.2-apple commit 4e18c626350c7c2e0fb540aa64a98957699f3abe Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 12:21:59 2007 -0800 Rootless: Pulled in changes from fb{Blt,Fill} into rl{Blt,Fill} (cherry picked from commit 3f857e129df7ce492191e0c51b8e53eaf6179366) (cherry picked from commit 70374a58937d7a6f01c210bd6ac66cafb63e895a) commit ed9524d36e42a310bb128284f2b507f76b8c40d9 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 01:07:02 2007 -0800 Darwin: Copied over missing file (Localizable.strings) from xorg-server-1.2-apple commit 4d9cef197b12548e0716dab3557e48311519e325 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Thu Nov 22 00:35:09 2007 -0800 Darwin: Misc cleanups to line up with xorg-server-1.2-apple commit 5e950123daa167c9ffe289b3bd89e3bd288da0e3 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Wed Nov 21 23:32:00 2007 -0800 Darwin: Removed cvs tags from Xquartz man page commit 3a2f714eea475a13cde65921e24c7ee3f70ffc3c Author: Jeremy Huddleston <jeremy@tifa.local> Date: Wed Nov 21 23:30:37 2007 -0800 Darwin: Removed .svn dir commit 691da031319dc59b9496101358c267f317abfd1e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 22 17:44:39 2007 +1030 Xi: allocate motion history for master device. We're still missing out on the actual content of the history but at least this way we don't segfault. commit 602de4f70b6f4aab93b514f3a01917bd5d4ad640 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Wed Nov 21 16:53:10 2007 -0800 Darwin: Use UTF8String since lossyCString is deprecated (cherry picked from commit 1786f9464af51ff606a612aec6fe420fa9688a28) commit 13666e287c347aab2a5e9d8ee5f6bb29b9b85171 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 18 17:44:12 2007 -0800 Darwin: Added some DEBUG_LOG sauce to the XP_EVENT handling code (cherry picked from commit ec84a4cef66a2b46ed71f9758c434ea629d2f270) commit 829b6641bd64c352e1e8a7c619f84dedbdb07a09 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 18 17:43:40 2007 -0800 Darwin: Disabled ALT_IS_MODE_SWITCH (cherry picked from commit fd181254f85543558190140787dc7b41f6cf90db) commit 8486f8af91b477c7bcb8438a0e9a72d0c11d1d63 Author: Ben Byer <bbyer@bbyer.local> Date: Thu Nov 15 02:25:50 2007 -0800 Darwin: Added a lightweight debugging facility to support troubleshooting (for example) the stuck modifier key issue (cherry picked from commit 0e0b452d10c0af55497c3299b5f3db45d5b381cb) commit 74214a9f42b931f99d83ddb4efb3720881a2de16 Author: Ben Byer <bbyer@bbyer.local> Date: Thu Nov 15 00:56:54 2007 -0800 Darwin: Patch to avert (some) damage / rootless crashes, courtesy of Ken Thomases (cherry picked from commit 148a87ff20aa5e7a6d839610aa14fa1a31505c4a) commit f5f833b80609f1f98c93113183bd2b1bab3bfec9 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 11 04:30:34 2007 -0800 Darwin: These changes are necessary, yet not sufficient, to get 8-bit indexed color mode working in Xquartz. (cherry picked from commit a415f62f5289fae99ea9b0038d21fad7695b1336) commit 8358334180a4f8c1e73fc5647a62bcd3539dee45 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 11 04:30:00 2007 -0800 Darwin: Fixed the call to xp_init so that we now receive Motion notifications even if X is not the active application. fixes <rdar://problem/5167664> xeyes dead until window activation (cherry picked from commit c7573379a85a1480cc51650075078e41dafe56af) commit 512dee90878e552ad1b2bb5b27366707f6464f28 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Nov 8 22:17:38 2007 -0800 Darwin: fix for spurious "Are you sure you want to quit?" message (cherry picked from commit 30cbfc786e4fedda3fe070bacceabe1d9212d00b) commit 28e73e99a9a59223963312c5dd43ce5566d1db9d Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Nov 8 22:12:41 2007 -0800 Darwin: Adding "fake RandR" support from old X11.app (cherry picked from commit 633490c4e8dab30af7ecbe1bef076c22ad5f5da9) commit 01b70afaac0990b41d1fb6fadbfd64df1486b669 Author: Ben Byer <bbyer@bbyer.local> Date: Sat Nov 3 05:34:19 2007 -0700 Darwin: Initial support for Spaces -- if you use Expose to drag an X11 window to another Space, it will work correctly (as opposed to just leaving a ghost window). We accomplish this by listening for the notification from Xplugin that our window has been moved, and then we ask X11 to move the window to the new location. (cherry picked from commit 2d50ea8013e7c1639d570e227b53b037fb567565) commit b39edc01a6588697b65f831e8ab1dbb24cbe7b24 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Oct 31 23:46:50 2007 -0700 Darwin: Swap modifier keys for buttons 2 and 3 -- now Option-click is the middle click (cherry picked from commit 0aa61293b62aeb69a93b2035d0aef8644343eed3) commit 606a8dc73d91a198d72d249934dc027a23f4c338 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Oct 31 03:39:47 2007 -0700 Darwin: Trap Deactivate messages and release modifiers to avoid "stuck shift lock" (etc) bugs (cherry picked from commit 2b189a99330eb465fa0d17020fb1db1e38829151) commit 4c18ef4331aaee268431a3ba50991f0312b82870 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Oct 31 03:22:18 2007 -0700 Darwin: Workaround for a bug where the holding down Command to make a "fake" button 2 click would actually result in a Command-2 chord. (I.e. it wasn't releasing Command before clicking the fake button.) (cherry picked from commit 0d5dd5dffa4c5ce3f54dfe53720a39d524dc8e37) commit f9269bebae27bbc9d0e03e02943166b83946623d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 22 17:30:14 2007 +1030 DeviceIntRec: move lastx/lasty from valuator into DeviceIntRec. We free the ValuatorClassRec quite regularly. If a SIGIO is handled while we're swapping device classes, we can bring the server down when we try to access lastx/lasty of the master device. commit 7f2972d47a5d74fe92268c6d609b1eb6ad845824 Author: Jeremy Huddleston <jeremy@tifa.local> Date: Wed Nov 21 21:59:59 2007 -0800 Darwin: Really add launcher this time commit bcbaf2a0ce34b6c5e41d2831b8b87dbd0617a89b Author: Jeremy Huddleston <jeremy@tifa.local> Date: Wed Nov 21 19:51:14 2007 -0800 Darwin: Dead code removal, Code cleanup, Added launcher Imported changes from xorg-server-1.2-apple to make master more current wrt file layout, build system changes, and dead code removal. commit 9ed43eff48201520797f89a12bb3b2f5819bd99f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 21 17:16:27 2007 +1030 Xi: allow clients to specify pure client id in SetClientPointer. If no window was found with the given ID, try if there's a client with the ID. Allows us to set the CP for apps that don't open windows (e.g. x2x). commit 33f15689922ad9f1193f803bc1636c82c23ab99e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 21 16:06:44 2007 +1030 xtest: switch an inputInfo.pointer over to PickPointer. Couple of whitespace fixes too. commit e5dd7a95791748c57cab75c0d8ba9d37f72edccf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 21 15:59:31 2007 +1030 Xext: Scruffy the janitor don't like no "register" keywords. commit a55ec1a9f4b62139dc5e5462d79d47b330c27c79 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Nov 20 18:31:03 2007 -0800 Restore checks for __i386 where needed for Sun compilers on Solaris commit 2f387d913aa76f1b6d21d8e2698be165301c6bc1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Nov 20 18:27:12 2007 -0800 Enable use of /dev/urandom on Solaris as well commit 4363d70c6b420648b501126d1fbdebfafc7ae09f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:58:55 2007 -0500 registry: Fix some mistakes in the reversion of prior commits. commit 140a4660aca1c283613d5b62f51668b44b45baf6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:49:30 2007 -0500 Revert "registry: Register XTrap extension protocol names." This reverts commit b38a91993364aa80cfd99721e319e1458d9fb760. Moving all the names into dix/registry.c commit ed8a39c48ab9dac085fcf58b9641364b5608f3f4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:47:52 2007 -0500 Revert "registry: Register XKB extension protocol names." This reverts commit a5cf3f21f712e46dbf9bca289e67be75f2b531d3. Moving all the names into dix/registry.c commit 17b0c729b553e2f0f8f82497698b282a47db3326 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:46:43 2007 -0500 registry: Remove registry code from XInput extension. Moving all the names into dix/registry.c commit e86852aff62a861823b8e419434e0401b8cdc8e0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:44:56 2007 -0500 Revert "registry: Register XFixes extension protocol names." This reverts commit 106758893b68033f14f69c4ee6591fb6a149ba37. Moving all the names into dix/registry.c commit 5269da2bde3cf4feb12fa2bd87bff6ee6d8730a1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:43:38 2007 -0500 Revert "registry: Register XvMC extension protocol names." This reverts commit 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e. Moving all the names into dix/registry.c commit 03a86c8d5e20a6e47f3c294f0087f205cf2a72dd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:42:19 2007 -0500 Revert "registry: Register Xv extension protocol names." This reverts commit 12766c5b5ffdab95255a63b2c8421ee773fd43b5. Moving all the names into dix/registry.c commit edcf490cdb965e2a5bfc0169c01732d2924da3ae Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:41:10 2007 -0500 registry: Remove registry code from XTest extension. Moving all the names into dix/registry.c commit 5fea1ed50f37691a5273bf2897479781de808ff5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:39:48 2007 -0500 registry: Remove registry code from SELinux extension. Moving all the names into dix/registry.c commit 9a8af33718d085656a672e4c27df200485c84154 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:38:24 2007 -0500 Revert "registry: Register Resource extension protocol names." This reverts commit 5c8b1a91726817816d20faefad21c7a68ab634cc. Moving all the names into dix/registry.c commit e6023e0208fae8f19c566f9df1a8aa20494f40ab Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:36:49 2007 -0500 Revert "registry: Register XPrint extension protocol names." This reverts commit f077578e42eee424b0e534774574c84af9d6f85b. Moving all the names into dix/registry.c commit 277345fb7065d74c3b0d076382affb78cbe67569 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:35:57 2007 -0500 registry: Remove registry code from XF86Bigfont extension. Moving all the names into dix/registry.c commit bf27edd365ffd275e5453f44d130eeacbfe0ecd9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:34:14 2007 -0500 Revert "registry: Register EVIE extension protocol names." This reverts commit 48891d5696f56711f23743cb03be39cf6b26c522. Moving all the names into dix/registry.c commit 687427179420b18a55a1a02b8a9f2a32ea8eac8d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:32:54 2007 -0500 registry: Remove registry code from XC-MISC extension. Moving all the names into dix/registry.c commit 4b0274e8f712e51b18618a2a0bdbe03b17b9736b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:25:15 2007 -0500 Revert "registry: Register SYNC extension protocol names." This reverts commit 9f597f6c87e0b14cc382d8e5929e42f822db4329. Moving all the names into dix/registry.c commit 4c7cf5aa4c802dcde895c723879a80a87620c0f7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:23:57 2007 -0500 Revert "registry: Register SHM extension protocol names." This reverts commit 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17. Moving all the names to dix/registry.c commit 67e82e306f67a215c6c89868cc1d3649747bd93d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:22:59 2007 -0500 Revert "registry: Register SHAPE extension protocol names." This reverts commit 4e274e90e16b1d954391e1af3e2074fb10f70ee7. Moving all the names to dix/registry.c commit 8583bf78ad056ffe2d83b54e5c9a0a217e425a7b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:21:09 2007 -0500 registry: Remove registry code from XC-SECURITY extension. Moving all the names to dix/registry.c commit 55744d8e5d7bf1ff27cd25de54e14e799dd1a70a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:19:44 2007 -0500 Revert "registry: Register MIT-SCREEN-SAVER extension protocol names." This reverts commit 58c3240fcbec23aad122e1c340f6bb6d3b18f779. Moving all the names into dix/registry.c commit 36ef45928c783292cef18acfdd83ae057826c989 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:18:01 2007 -0500 registry: Remove registry code from MIT-MISC extension. Moving all the names to dix/registry.c commit 816e6e612e4bc3cea1e67e7ea79d5b640458011f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:15:37 2007 -0500 Revert "registry: Register Multibuffer extension protocol names." This reverts commit 3877faf7d9fe00ed634077e38a198ae4b91a2bb4. Moving all the names into dix/registry.c commit 40a0da044e911ea51de003f3621331ffbe2842bc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:13:43 2007 -0500 registry: Remove registry code from Fontcache extension. Moving all the names into dix/registry.c commit 46412baf60ed639ddc1d5fb601f73a75e39737f7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:11:06 2007 -0500 registry: Remove registry code from EVI extension. Moving all the names into dix/registry.c commit 460c43032f05aad3f0f552901a52d199f61c7f4f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:08:18 2007 -0500 registry: Remove registry code from DPMS extension. Moving all the names into dix/registry.c commit 76e89d45b497d4afa4e60e1d0ec50b62f54f6b88 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:06:40 2007 -0500 registry: Remove registry code from TOG-CUP extension. Moving all the names into dix/registry.c commit ce93c5772da52ab88faef7e5b661b681d5b60b1e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 18:03:57 2007 -0500 registry: Remove registry code from BigRequests extension. Moving all the names into dix/registry.c commit 0756d1271209e6ae14cc641dddca095271b43150 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:59:40 2007 -0500 Revert "registry: Register APPGROUP extension protocol names." This reverts commit b504678ba5407a6fd8d47d051305f7c3d5606dfe. Moving all the names into dix/registry.c commit 5aff37d1d69be493727856a29628bd782d50b90f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:57:06 2007 -0500 Revert "registry: Register RENDER extension protocol names." This reverts commit 8964c6d8e14ae47798762191e359b2bf138ca32e. Moving all the names into dix/registry.c commit e585a2ddb495b50a53e15cccc368ca0858fc9d23 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:55:47 2007 -0500 Revert "registry: Register Record extension protocol names." This reverts commit ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4. Moving all the names into dix/registry.c commit d4577e485367468227e031eb434b739eff7b5e9a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:51:27 2007 -0500 Revert "registry: Register RANDR extension protocol names." This reverts commit c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a. Moving all the names into dix/registry.c commit a541e826c9310d3051e53834833c6c3a08654148 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:50:26 2007 -0500 Revert "registry: Register WINDOWSWM extension protocol names." This reverts commit 4c3285c883cc50a91bc5262bbc9d073d816f860a. Moving all the names into dix/registry.c commit 993595430bd0580ab4d936be6b70fb91b8bb1d16 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:48:46 2007 -0500 Revert "registry: Register XF86DRI extension protocol names." This reverts commit b7786724080fd3928ef7b8c294346661d7ffd90b. Moving all the names into dix/registry.c commit 6b73c215c9d612534af290230b2e914d42d819cd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:47:30 2007 -0500 Revert "registry: Register XF86VidMode extension protocol names." This reverts commit 960677e876c068400fb45e1764bb5470cd8c389f. Moving all the names into dix/registry.c commit 8e2cd7a804664bbd2d03789dcd5c93223122e929 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:45:30 2007 -0500 Revert "registry: Register XF86Misc extension protocol names." This reverts commit 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c. Moving all the names into dix/registry.c commit 0356153a58cef87d655bccacd8e2cf03d577bd19 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:43:18 2007 -0500 Revert "registry: Register XF86DGA extension protocol names." This reverts commit 3815284e899b61731b6a63c4ba14c5d773e24eb6. Moving all the names into dix/registry.c commit de93c1e9df14577e158b6dc3ccec7ee48f592386 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:40:57 2007 -0500 Revert "registry: Register DMX extension protocol names." This reverts commit 32f3f5a1e7654f8bb43ea16b9227b3994e616739. Moving all the names into dix/registry.c commit 2d3e0cdf4bd7ab069bad7244ede7c2d489e92b17 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:39:56 2007 -0500 Revert "registry: Register APPLEDRI extension protocol names." This reverts commit 3464b419230c6d17e940d967b567c5d2cb22d232. Moving all the names into dix/registry.c commit 546d46224e355d4f00232da5538548e3c8853e40 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:37:48 2007 -0500 Revert "registry: Register XINERAMA extension protocol names." This reverts commit b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39. Moving all the names into dix/registry.c commit fd2d83d5bf5b35c8a2b05f725486be166783921e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:34:48 2007 -0500 Revert "registry: Register APPLEWM extension protocol names." This reverts commit eee46b4681ec55297604b0425705f2b18381f7ca. Moving all the names into dix/registry.c commit c934e1af27189571c1e7dd838872e380c3580eeb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:32:35 2007 -0500 Revert "registry: Register DBE extension protocol names." This reverts commit 2e1e5be1d9067816525aa13a1d818e8ca6899599. Moving all the names into dix/registry.c commit b9ab6f300a46aa8879b11eac51857357cc379c2f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:31:00 2007 -0500 Revert "registry: Register DAMAGE extension protocol names." This reverts commit 20db50b4c44a14f7eeac2b1de17ada68482521da. Moving all the names into dix/registry.c commit 26586a7ad5e999b34996d147fb43998deea89178 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 17:27:37 2007 -0500 Revert "registry: Register composite extension protocol names." This reverts commit 166ef972febc00c665e1d5aeb68e75d7bbcf9879. Moving all the names into dix/registry.c commit fae39db7957c0ebdc7af36f8d8f484473beb6d38 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 15:21:31 2007 -0500 devPrivates rework: put back some changes that were mistakenly removed during merge conflict resolution. commit 709c1a70c8c6a9e132bf0d92f78a12be72beee51 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 20 15:18:02 2007 -0500 Remove some duplicate include statements. commit be0cbe5a330f62cef47fffbc49e83b5e1637b7d0 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Nov 20 15:39:49 2007 +0100 kaa: update kaaCreatePixmap to support the new usage_int commit 5b0dfb73ca4699cc4b33720f10416de7440081b7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 19 21:01:22 2007 -0500 devPrivates rework: put back a comment that was mistakenly removed during merge conflict resolution. commit 2d17f47cc7d6b174857617d31ad1b437d8e97d94 Merge: 60be452c2 ea9c63e93 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 19 18:10:46 2007 -0500 Merge branch 'master' into XACE-SELINUX Conflicts: hw/xnest/Pixmap.c include/dix.h commit 60be452c2e88342f92a76ba5ec7d90b5b0211aaf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 19 16:55:09 2007 -0500 xace: restore the old SaveScreens function and introduce new API, since the old version is called from drivers... commit a95bb52b4366d85fc049130c60af5c9e727c565b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 19 16:34:38 2007 -0500 devPrivates rework: add missing include of dix/privates.h commit ea9c63e93b9bb731796e8a8de2d127e6cc720076 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Nov 19 15:53:49 2007 +0100 DEFAULT_DPI was undefined here. commit db9ae863536fff80b5463d99e71dc47ae587980d Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Sun Nov 18 11:57:01 2007 -0500 Bump DEFAULT_DPI to 96. 75 is just nonsense. commit ee2d4626dca6e0d4fc6f524e5de4bdefa2ed43df Author: Tormod Volden <bugzi06.fdo.tormod@xoxy.net> Date: Sun Nov 18 11:56:31 2007 -0500 Bug #12932: Use DEFAULT_DPI in randr1.2 instead of hardcoded 96. commit a46c30c3be33ffb304a885503c8aaa78396ed3d9 Author: Jernej Azarija <azi.stdout@gmail.com> Date: Sun Nov 18 11:44:36 2007 -0500 Bug #12531: RRModesForScreen can fail to allocate. commit fac7e7e4e1809e865b9b3cf5b7eb69ba9d3a3759 Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Sun Nov 18 11:39:26 2007 -0500 Document the requirement for interleaved code and declarations. commit bad96e5a864e40fbd47265d7fb6eaa67c55fac11 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Nov 18 15:02:24 2007 +1030 dix: getevents.c remove trailing whitespaces. commit 75e5e9f88c5f974d996dd81e672cd3709d361a44 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sat Nov 17 13:46:01 2007 +1030 Xi: add missing XI_DeviceClassesChangedMask to XI filters array. commit d15339a92c4d689d2ab8a86e4f10107f3e45eff8 Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Sat Nov 17 22:12:10 2007 -0500 Bug #9725: Don't look in root's $HOME for config files, that's just confusing. commit 748cfbc820f8cdeb544c54a6db495fecf2e2457b Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Sat Nov 17 21:23:05 2007 -0500 Disinfect mi/ of mfb. commit a969db091cab16a448f82782e85b3dd19c81627a Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 17 22:34:47 2007 +0100 XKB: Don't ring the bell when we don't have a BellProc (bug #13246) commit c89b543198d5ec56ff025bdd6bb7229523478e58 Author: Ben Skeggs <skeggsb@gmail.com> Date: Sat Nov 17 18:20:49 2007 +1000 exa: set driverPriv to NULL before it might get used later with garbage commit 514ba4ca727f0b1076bc67500617722203d34daa Author: Adam Jackson <ajax@aspartame.nwnk.net> Date: Fri Nov 16 19:53:11 2007 -0500 Bug #1612: Use a stronger PRNG. Currently just reads from /dev/urandom, and only on Linux. commit 12dd6e9911de187e0ebee86434e8c24a67c990f9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 16 17:23:09 2007 +1030 dix: reset MD's devPrivate classes to NULL before device initialisation. XkbInitKeyboardDefviceStruct may call FatalError if it fails. FatalError then cleans up all the devices, resulting in a segfault if the pointer is uninitialised. commit be3321c2e9fad228a9ee5fef47680a47bc9e39a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 16 12:12:41 2007 +1030 dix: Free both current classes and original classes when closing an MD. commit 3c39dd19ec2a53b8854279e3b03131098031473a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 16 12:12:14 2007 +1030 Xi: Deep-copy full list of FeedbackClasses. All feedback classes are linked lists and the whole list has to be duplicated, not just the first entry. Xkb stuff still missing. commit 497862df2fcd67531fbe0f876c20a09884ee74df Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 16 11:20:22 2007 +1030 dix: explicitly float all attached SDs before closing down devices. Some drivers flush on shutdown, if our SD is still attached we'd be trying to route an event through a non-existing device. commit 9de1ebe2a80164507cbe2ef688f284225e0ec808 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 16 10:45:28 2007 +1030 dix: Fix up class restoring when last SD disconnects. Old code was fundamentally broken, fixes now are: - free the MDs current device classes - copy the device classes instead of flipping the pointers - check for the old MD, not the new one. commit 20fd4783247b1b93d9675dc36768dd1ed59ba2d3 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 17:01:33 2007 -0500 Small static cleanups on dix/ commit 70e50fa51f05663f289eeeea4521e737e8e24bca Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 17:00:37 2007 -0500 Allocate RRCrtcRecs with calloc. commit 8d0cd1cd2c57ee5a2fc4d577d8182d66369f0617 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Nov 15 12:16:36 2007 -0800 Fix a really dumb typo. commit f797c96845a3fab37cda6839ebecf9ac5401fd6e Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Nov 15 12:12:02 2007 -0800 Save pixmap allocation hints into the PixmapRec. commit 6bc50de02108f822977fc7545da81fce95ea7ff4 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 15:03:58 2007 -0500 Simplify system resource range setup. osRes only existed to get copied into Acc. Waste of effort. commit e1ff14a9246e12d42ce8ca5afbe3b957333a5620 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 14:45:49 2007 -0500 Delete some dead code in X -configure. commit 01cfba75229f4b9bf1e4fe80814931acdacde14c Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 14:27:03 2007 -0500 Nuke the debugging allocator. This has never been hooked up in the modular build, and can not possibly have built since before 6.7. Clearly no one's using it. commit c67b9c5fc33002b13a2360929a37f24169710f64 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 14:24:36 2007 -0500 Clean up some garbage in driver enumeration. commit 0706e5e790060fbf046cfaff295b78806b7841c6 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 14:15:09 2007 -0500 Eliminate some redundancy in autoconfiguration. We already synthesize Monitor and Module sections for you, no need to specify them explicitly in the fake config buffer. commit 2c01a49bf0a407bd5510bb9ceb4ef86a2cc36be9 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 15 13:32:59 2007 -0500 Don't sleep(1) at exit on any platform. commit 83926cb8bef6288b89e801c5e60b3f40e923e16e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 17:41:07 2007 +1030 Xi: Only alloc modifierKeyMap if <slave device>->maxKeysPerModifier > 0 Sometimes (e.g. on my debian ppc box) maxKeysPerModifier of the SD is 0. So we try to malloc(0), bringing the whole server down with a FatalError because it looks as if the malloc failed. This is bad, so only alloc if we actually have something to alloc. commit 070195dbf88eb121e65f802e023aa37ed1f2c2ac Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 16:27:18 2007 +1030 Xi: fix up sloppy class copying causing segfaults. commit 53539688cab990a7df1851d64f3ee4e11920a86b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 16:23:48 2007 +1030 dix: SetKeySymMap should alloc the map if dst doesn't have one already. commit b40646dc104fb03ea7cc0b27fae573aecaab486e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 15:43:44 2007 +1030 dix: Add FreeDeviceClass and FreeFeedbackClass for centralised xfree. Ensures that we only have one way of freeing a device class to avoid leaks in ChangeMasterDeviceClasses and other places. commit 4c9cc82fc4461d180ae2c2fbe50e7f98b0777f91 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Nov 15 01:46:11 2007 -0200 For some reason "-nozap" appeared twice. Weird. commit 18833d648fd7e1a5e962b93636bbbb38aca9c454 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 12:13:59 2007 +1030 Xi: reset xkb-stuff to NULL after copying (DeepCopyDeviceClasses) Having two devices point to the same xkb stuff causes SIGABRTs. Also, don't init a MD's xkbInfo unless the SD has an xkbInfo. commit 1635832c1635374033686d3a943b77adbd60bb98 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 11:35:07 2007 +1030 Revert "xkb: disable xkb key repeats (temporarily)" This reverts commit 2b1d946392ce28b96941341778b2b526aa0fb126. commit b05246696d14bd35aa53b49302707b51206c72a6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 11:31:43 2007 +1030 Xi: free XkbSrvLedInfos as well when freeing an MD's device classes. commit c758e5a664a52045ad419340044beebb6774a336 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 10:47:20 2007 +1030 dix: Make sure core MDs copy their initial classes before they are used. Anything in dev->key, dev->valuator etc. of a MD must always be a copy of the original class. The intial classes of an MD (the ones set up before an SD is attached) as well, as we may have to restore them if no SD is attached anymore. commit a08665d4d3b0a7d567a90bb9bbfe4abafd6f3887 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 10:42:29 2007 +1030 mi: don't call SwitchCoreKeyboard, we switch during event processing now. commit 64711a094893e83764bbeda538c6e877ebe2af79 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 15 10:41:34 2007 +1030 Xi: When switching MD classes, make a deep copy instead of pointer flip. Turns out it's really really hard synchronising device state across multiple duplicated events if they all share the same struct. So instead of doing so, when the SD changes deep-copy all it's classes into the MD. The MD then has the same capabilities, but the state can be set separately. This should fix xkb, key state, repeat etc. problems. Updating the device state allows us to remove the SwitchCoreKeyboard from the event gathering, it's all done during event processing now. commit 3dde66f96b9b8431381871cf85266da3ec57a0d4 Author: Adam Jackson <ajax@redhat.com> Date: Wed Nov 14 15:10:59 2007 -0500 Start 1.4.99 commit c3897ca7099fc007b4134a8fabd4c707f99f2ac7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 9 13:55:32 2007 -0500 Add -pogo option for init/teardown performance testing. commit cecac794451b793871f297b91a11d3b52eeb6d1b Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 8 17:25:36 2007 -0500 Don't sleep(1) at server exit. commit 1603130236c55ddabc3854d4ba62d544debcf1f5 Merge: f207e69d6 f7dd0c72b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Nov 14 13:35:50 2007 -0500 Merge branch 'master' into XACE-SELINUX Conflicts: Xext/xace.c Xext/xace.h commit f207e69d62bc04c7f254347b03e6d8fa8b569d66 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Nov 14 12:23:29 2007 -0500 xselinux: adjust receive hook to use new synthetic_event class. commit cc4586df600af571815d5cdda2028c0d074c8469 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 14 14:27:52 2007 +1030 Xi: toggle the public.devPrivate as well when switching device classes. The master needs to have the same devPrivate as the slave, in case a client issues a request that goes down to the driver. Example: if a driver wants to ring the keyboard bell, it'll pick a keyboard. The KeyClassPtr will direct it to the matching method in the driver, but because the MD doesn't have the devPrivate set the driver segfaults. Even if all drivers were updated to not dereference the nullpointer, nothing would actually ever happen. To avoid this, we flip the master's public.devPrivate to the last SDs devPrivate. commit b44c1118f3bab6d5f28fa42e0c322fbaec005012 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 14 14:08:21 2007 +1030 dix: Return Success from ProcBell if no BellProc is set. We must not return BadDevice, this causes applications to crash. If no BellProc is set, just quietly do nothing and report a Success. commit 240b10fa9c32510a380a73a8acdd8267c81e538b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 14 12:18:08 2007 +1030 Xi: Move updating the device state from POE into separate function. POE now only deals with processing the event and calling the appropriate delivery methods. Actually modifying the device state is done in UpdateDeviceState. This separation should make it easier to avoid setting the state twice when master events are processed. commit 0bdfeb55fc559ffe0334df69ba6e9e711b26dc18 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 17:31:20 2007 +1030 Xi: remove RegisterPairingClient handling. Deprecated with device hierarchy. commit e96d926d64f7fb63f6bf2aa0ea0a8440a188947b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 17:14:35 2007 +1030 Xi: remove trailing whitespaces. commit 5031238aad2b6b7511aab0f9d15edfbdd2b4cce7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 16:58:23 2007 +1030 dix: remove trailing/wrong whitespaces from devices.c and events.c commit c703849e79391bb1bb01a994bb8d5cf2eb64e48b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 16:50:18 2007 +1030 dix: Attach spriteInfoRec to same memory block as the DeviceIntRec. No need to alloc a separate one, we never do anything special with it anyway. commit 51239f87ce42ad564ceee1761980391947294511 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 11:26:16 2007 +1030 dix: Send MappingNotify when keyboard maps change. If a slave device is attached to a master device, then we need to send a mapping notify to the client. Mapping notify needs to be sent if - different slave device but on same master - different master This gives you funny behaviour with the ClientPointer. When a MappingNotify is sent to the client, the client usually responds with a GetKeyboardMapping. This will retrieve the ClientPointer's keyboard mapping, regardless of which keyboard sent the last mapping notify request. So depending on the CP setting, your keyboard may change layout in each app... commit 2b1d946392ce28b96941341778b2b526aa0fb126 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 13 09:51:33 2007 +1030 xkb: disable xkb key repeats (temporarily) Haven't quite figured out yet how to make these repeats work. Because we share the class between devices, the key state is already set when we process the master device's event, causing a repeat on each event. commit f7dd0c72b8f861f4d5443a43d1013e3fe3db43ca Author: Matthias Hopf <mhopf@suse.de> Date: Mon Nov 12 15:11:03 2007 +0100 Only clear crtc of output if it is the one we're actually working on. Upon recreation of the RandR internal data structures in RRCrtcNotify() the crtc of an output could be NULLed if the crtc was shared (cloned) between two outputs and one of them got another crtc assigned. commit 70b4087c4dd1904d9d655f4afb9dfcea4f137f7a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 12 13:10:39 2007 +1030 dix: don't unconditionally update valuators during key events. Master may not have valuators, device may not have valuators. commit 23365d28651f7942fdafb889bcbbd019470a4274 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 12 13:08:38 2007 +1030 dix: allow grab modifier device to be NULL. This can happen if we check for a passive core grab and our device is a floating slave device. Doesn't really change anything as SDs can't send core events but it stops the server from segfaulting. commit 5a7a65a3c978a65e8ff39d0cc9878527ec42adc9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 12 12:37:39 2007 +1030 mi: avoid SIGABRT by setting master_event to NULL. commit a05f43bf3e9629df98e93c366d4327f20ed81e6c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 12 11:35:18 2007 +1030 dix: When the last slave is removed, set master to the original classes. DeviceClassesChangedEvent is sent to the client, where device == new slave. commit 45f884d79c0eebaa1eb24d7db76c1177f6b710c9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Nov 9 14:45:27 2007 -0500 xselinux: add new synthetic_event security class, and fix registry code. commit b092856baba5bd43b23950f23236b5cc3ce78c1e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Nov 9 14:45:02 2007 -0500 registry: Register XC-SECURITY extension protocol names. commit 7a81bafc9bc7048560b17483e6addf58469a05d0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 9 23:10:24 2007 +1030 Xi, dix: Add ability to change MD classes + send event when doing so. Each time a different slave device sends through a master, an DeviceClassesChangedEvent is enqueued. When this event is processed, all classes of the matching master device are changed, and the event is sent to the clients. Next time the master is queried, it thus shows the evclasses of the last slave device. The original classes are stored in the devPrivates. TODO: if all slave devices are removed, the master's original classes need to be restored. commit c0a05805783ee3d38fbcc0fb45f4aa3c511785f0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 9 23:07:10 2007 +1030 Xext: add simple macro to easily check a generic event's type. commit f48087b6c33c1f84bf2cfc0744b1c38697321c07 Author: Kristian Høgsberg <krh@temari.boston.redhat.com> Date: Fri Nov 9 05:49:26 2007 -0500 Regenerate GLX dispatch code for recent gl_API.xml changes (#12935). commit f2a3728868376a3646832d4af3a29549ce0b8f5d Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Nov 8 18:49:05 2007 -0800 Patch to rootless code that should fix many crashes. Credit to Ken Thomases at CodeWeavers for the patch. From his description: Fix a display bug with the X server. The Generic Rootless extension installs overrides for certain GC (graphics context) operations. Within these overrides, they temporarily uninstall themselves, perform their work, and then reinstall themselves. Except sometimes they would return early and wouldn't reinstall themselves when they should. Now they do in all cases. Fix a bug in RootlessCopyWindow where early returns could leave the screen's dispatch table entry for CopyWindow unwrapped. We think that this is another case (hopefully the last) of the rootless drawing bug. commit 338c1aedbdf3964e542947140f7c50d58542cf12 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 03:56:44 2007 -0800 formatting fixes commit bd269d0d783d418ef99363478fdf849fd89eed76 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 03:55:08 2007 -0800 Fix for off-by-one error in menu bar height calculation -- props to Nicholas Riley! commit b4d14484056e6f4a7374fc1acf3f223be4bd116f Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 03:10:52 2007 -0800 Undo some last-minute breakage in xpr.h commit 05d5b9baa05a4ba14a4383d8a981bc327d99290c Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 02:28:49 2007 -0800 removed debugging output commit 9a8abcfa6d6d0cdc17be02a3443a7e116eb07d07 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 02:22:39 2007 -0800 Fixed focus problem (clicking on an X11 window that sits behind an Aqua window would not always bring it to the top of the stack. commit b34d2ffc38002f7c4980c138f57e9a828cd79c37 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 01:56:37 2007 -0800 formatting changes. commit 50dac9b2cb3b40810fb79253adc0265a838a497b Author: Ben Byer <bbyer@bbyer.local> Date: Wed Nov 7 01:35:48 2007 -0800 Fixed Spaces issue, correctly -- dragging an X window from one Space to another in Expose mode now works. commit ce7cfbe261b7fd4fcd09d1a4a61344d1555a71f2 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Nov 8 20:10:51 2007 -0800 Fixed check to refer to DarwinApp, not all Darwin targets commit d68bd5510437c1fd3850e020f7cd90901fae8e1b Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Nov 8 20:08:49 2007 -0800 fixing GLX in Xquartz commit a6ac9002956767fefa37aac95513e21ac5246d15 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Mon Nov 5 20:25:10 2007 -0800 formatting cleanup commit 67e96be13cdb45be31db121ce216295cd9496d20 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Mon Nov 5 20:01:34 2007 -0800 Fixed logic error that prevent JIS (Japanese) keyboard layouts from being detected. commit 154fb6417e5d0bae5191984beac5ce045ce754bb Author: Ben Byer <bbyer@bbyer.local> Date: Sat Nov 3 05:34:19 2007 -0700 Initial support for Spaces -- if you use Expose to drag an X11 window to another Space, it will work correctly (as opposed to just leaving a ghost window). We accomplish this by listening for the notification from Xplugin that our window has been moved, and then we ask X11 to move the window to the new location. commit 5bbc468b702f62d7c91d41aabcc27eeb553f6959 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 9 11:33:27 2007 +1030 dix: grabbing an attached SD sets it floating for the duration of the grab. commit 676b26ca3e9b142cf007af3f439aa1993f2247c4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 8 17:54:17 2007 +1030 Xi: notify the clients when the device hierarchy has been changed. commit cb75f09146a3c17b1a67b636bbf7229c65c83b35 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 9 11:29:18 2007 +1030 dix: calloc root window's Generic Event mask, stops segfaults. commit 169f83e366f678ac5441ad21beb84c9b8c65d28e Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 4 19:14:10 2007 -0800 Disable deferred updates in xp_init to fix performance problems -- thanks to Eric Gouriou for pointing out the issue commit 1c6cb353f77747c101ce47716ff1fa055fbf85a4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Nov 8 16:46:49 2007 -0500 Restore the XC-SECURITY option in configure.ac, but disabled by default. commit 9d03cad1446c27b397c198cf6247e71e46bc9e6d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Nov 8 16:41:47 2007 -0500 Remove SecurityPolicy file and associated references in the manpages. commit 8b5d21cc1d1f4e9d20e5d5eca44cb1e60a419763 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Nov 8 16:32:42 2007 -0500 Rework of the XC-SECURITY extension. The gen-auth protocol has not changed, but the XC-QUERY-SECURITY-1 authorization method and the SecurityPolicy configuration file have been removed. The semantics of the trusted vs. untrusted split have been changed. This will be documented in a future commit. commit 476a9d85f819f454a6901ccb7eb028d1c563c341 Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Nov 8 09:11:05 2007 +0100 Xephyr: do not AM_CONDITIONAL inside a shell if branch commit 59b304d8a24fecd094296feb217823f0c73d6f82 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 8 15:44:18 2007 +1030 dix, mi: stop segfaults when a floating device emits events. For pointers: don't try to set master->valuator fields if there is no master. For keyboards: check if device is valid before trying to access the fields in miPointerGetScreen (btw. this disables DGA events for floating keyboards). Also stop the hideous number of ErrorFs if we request the paired device for a floating dev. commit 3063f0c6679bdbea13f360cff8d09a88b9871da9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 8 11:51:03 2007 +1030 mi: change the device id to the master devices' when duplicating the event. Move the event duplication into a CopyGetMasterEvent(), makes the code a bit better to read. commit 0e9ef65fa583bf2393dd0fda82df6f092387b425 Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Nov 7 16:33:10 2007 -0800 Don't frob timers unless SmartSchedule is running commit 180220f284823c486e7001ef00f1279dc548c9c7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 8 10:00:35 2007 +1030 Xi: return BadDevice for slave devices on ProcXSetClientPointer Also clean up to return error codes instead of sending the error manually. commit 184a7b8917a15bb2c719153b9b016c03aab42101 Merge: a8808ac3d 0b729051c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 8 09:34:35 2007 +1030 Merge branch 'mpx' into mdsd Conflicts: Xi/opendev.c commit e94ab0b502160376d1956345196f7e1c7e2e886f Merge: 26e1fc7b4 9bee1c691 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Nov 7 19:04:24 2007 +0100 sync with 'master' commit 9bee1c6912817f65bbb8cf4078f0ad016d9d51cb Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Nov 7 18:56:45 2007 +0100 EXA: Disable problematic optimization of dest pixmap migration by default. Also add some code comments about these optimizations. commit 26e1fc7b42de850d69fba89703ffddd36480b997 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Nov 7 18:48:23 2007 +0100 Xephyr: don't use Xv or GL when those are disabled. commit 950f9995d11aff2c51139b34fb27eba594f2bd20 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Nov 7 18:43:16 2007 +0100 Xnest: fix lib dependancy to make libtool happy This fixes an undefined symbol error happening when compiling the server with the --disable-xv configure switch. Basically, xnest was linking against @XSERVER_LIBS@ and @XNEST_LIBS@ and the order of the libraries given to the linker at the end of the process was bogus. * configure.ac: make XNEST_LIBS contain the $XSERVER_LIBS re-ordered in such a way that the linker finds the symbols of all the libs contained in $XNEST_LIBS. * hw/xnest/Makefile.am: don't link against @XSERVER_LIBS@ anymore because XNEST_LIBS contains the right thing. commit 0b729051c04da7068f1e6dd319190bd0a362b2c0 Merge: b7ee005d3 d7c5e8bfc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 7 15:37:23 2007 +1030 Merge branch 'master' into mpx Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c commit e717409bae355df9a617a226f12fbb8c54ae77e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 21:36:13 2007 +0000 DIX/getevents: Document GetMaximumEventsNum() a little better Note that the number returned by GMEN can _never_ change, and be a little more explicit about the figure for repeats. commit 66fe554a59bb7de37354b618945cd5f30d78250d Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 18:57:09 2007 +0000 COPYING: Collapse 'canonical license' into one statement For a few of us, the license statement is identical, and the only variant is the copyright. For these, aggregate the copyrights, and only list the license once. Put this at the top, and note that this is more or less our agreed canonical license. commit fda832772b3e630037bf1b822534996154a50861 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 15:05:06 2007 +0000 .gitignore: Ignore build directories Ignore directories people might use for building. commit 512bac25ec0e980968b93a2ebe88bd89bf99b697 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 6 14:52:03 2007 +0000 DIX: XKB: Set xkbInfo to NULL as well as freeing it (bug #10639) XkbRemoveResourceClient wants to access xkbInfo if it exists, so make sure we NULL it after freeing it. It doesn't make much sense to move the RemoveResourceClient call first, as there's not much point in notifying clients while we're shutting the server down anyway. commit a8808ac3d093f33b39de109107d396fe0a02c4fc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 7 11:42:58 2007 +1030 Xi: don't call CheckMotion for slave devices. This essentially disables enter/leave for slave devices, but re-enables them for master devices. Which is a good thing after all. commit 15944b8f02752eedd61be34a6a29dd6b82a0ac97 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 7 11:33:24 2007 +1030 mi: duplicate event before processing it, so master has original values Event values may get changed in the event processing stage, so we need to duplicate it to pump different events through for slave and master device. commit d7c5e8bfc1aecbd23a4cbb2eab08656587aac2e8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 6 16:26:09 2007 -0500 Modified performance patches from Arjan van de Ven <arjan@infradead.org> Subject: [PATCH] fix some performance gaps in Xace The XaceHook function is used in several hotpaths. The problem with it (performance wise) is twofold: * The XaceHook function has a big switch() statement for the hook number in it * The XaceHook function uses varargs to reassemble the final dispatch arguments again Both are expensive operations... for something that is known at compile time This patch turns the hotpath XaceHook call into a direct call to avoid the switch and varargs; this gives me over 10% performance gain on the x11perf benchmark. commit aaa50b64113b122aaebd46e3b78e3fb7a8d70500 Merge: 868e30363 ddce48ede Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Nov 6 16:25:40 2007 +0100 resync with 'master' commit 868e303630d8b84070c2f1fd8d6da2cef045b029 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Nov 6 16:24:46 2007 +0100 Xephyr: fix a crash when using xrandr twice * hw/kdrive/ephyr/ephyr.c: (ephyrScreenFini): don't forget to free shadowfb data (if necessary) upon server is reset. commit ddce48ede036f3996f8e584b0012c396c5df42fb Author: Elvis Pranskevichus <el@prans.net> Date: Tue Nov 6 09:40:14 2007 +0000 Config: D-Bus: Fix dbus_bus_request_name failure check The code in connect_hook incorrectly checks for dbus_bus_request_name failure. The dbus_bus_request_name error indicator is -1, not 0. This leads to subsequent assertion failure in libdbus. commit a52c9b2a59f27266557ff9d5d2c08492e04135a6 Merge: c7e18beb3 58332894c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 5 19:08:36 2007 -0500 Merge branch 'master' into XACE-SELINUX Conflicts: dix/dispatch.c dix/property.c hw/xfree86/common/xf86VidMode.c include/xkbsrv.h render/glyph.c xkb/xkbActions.c commit 58332894c061ae96d6a457f65266660f5f65e88b Author: Adam Jackson <ajax@redhat.com> Date: Mon Nov 5 17:17:25 2007 -0500 Export the server ABI versions from xorg-server.pc commit c7e18beb3c87eb1ada9b21c4ffacd11c1939c087 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 5 15:01:13 2007 -0500 xselinux: Register SELinux extension protocol names. commit 632c33c5c18b3e091c4fce98280af4d583e99640 Merge: 4113f040c dda10c906 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Nov 5 17:52:33 2007 +0100 pull 'master' commit 4113f040c587fc536adc693d7ee5a4c0a60b75d4 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Nov 5 17:33:01 2007 +0100 GL: fix crash at mesa destruction time * GL/glx/glxglcore.c: (_glXMesaScreenDestroy): delete the same amount of visuals that those which were created in createMesaVisuals(). commit dda10c9066a660b647384179f82e1da8e063264f Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 16:28:35 2007 +0000 Remove all traces of external RGB database (and Speedo) Remove all references to an external RGB database (which hasn't been enabled for a very long time). Also get rid of some references to Speedo fonts. commit 6ff79ea5f7d3ff0c3b14e39849514784ccd40190 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Nov 5 16:46:49 2007 +0100 Xephyr: fix some DRI build breakage commit 5e363500c86042c394595e1a6633581eb8fcd1bb Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:38:28 2007 +0000 OS: Remove ALLOCATE_LOCAL from os.h Remove ALLOCATE_LOCAL_FALLBACK and DEALLOCATE_LOCAL_FALLBACK from os.h, and remove the include of Xalloca.h as well. commit 83e5d9e75d0fa1135e2c9d8b59caee98c3291681 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:36:54 2007 +0000 DIX: Remove last alloca call Replace with heap allocations. commit 1179ddea94efae6606162e9a1b0f2bf752ae4dd0 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:36:36 2007 +0000 EXA: Remove usage of alloca Replace with heap allocations. commit 1eb6a1d0d2817cd0ce96fb27db3ceb2d0ff024af Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:18:35 2007 +0000 XTrap: Remove usage of alloca Replace with xalloc/xfree. commit 934281126f6c602fa4bd0c2e29d8c9f44fe532b8 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:18:22 2007 +0000 Xext: Remove usage of alloca Replace with heap allocations. commit fb32bb9839b615f7297fbfac2050bc216682f01c Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:17:54 2007 +0000 Xi: Remove usage of alloca Replace with xalloc/xfree. commit 683ee1776d172035c465aa8fc84ccd53bb8ba7fd Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:14:25 2007 +0000 afb: Remove usage of alloca Replace with heap allocations. commit ca75261beedc3e00767b3812a81b7dac4437f4a1 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:14:04 2007 +0000 cfb: Remove usage of alloca Replace with xalloc/xfree. commit 914922fd6100a409a3dfd1c64511ed6bdc344bef Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:12:59 2007 +0000 DIX: Remove usage of alloca Replace with heap allocations. commit 3b77689266e729411229ec83d2a90578ebc1d82f Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:12:34 2007 +0000 EXA: Remove usage of alloca Replace with heap allocations. commit 34cdf06e4ccb243664005cc33009d8759a7f6e4d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:12:22 2007 +0000 fb: Remove usage of alloca Replace with heap storage. commit 733d42065f2c24505b3874ce51c18f6063c2b67e Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:11:59 2007 +0000 XFree86: Remove usage of alloca Replace with heap allocations. commit caf545063457591f88e1f7bcd25dbd0342f44343 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:10:55 2007 +0000 KDrive: Remove usage of alloca Replace with heap allocations. commit d57060f16714f5667722001bd1a4500059dd59e1 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:10:21 2007 +0000 DMX: Remove usage of alloca Replace with heap allocations. commit def6f74f2d7342f85f3df2053e0b9c1ac483b51d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:10:03 2007 +0000 Xvfb: Remove usage of alloca Replace with heap allocations commit 259f4c36d581896ce605741b9e557a589013a9b8 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:09:49 2007 +0000 Xprint: Remove usage of alloca Replace with heap-based allocations. commit 1c84337af0ac40498a53aa36289e2f6f5ff8b1c6 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:09:32 2007 +0000 Xwin: Remove usage of alloca Replace with heap allocations. commit f7d5c292e44113ea8eb32e67e91cd02e520df5e3 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:09:14 2007 +0000 mfb: Remove usage of alloca Replace with heap-based allocations. commit be9ee17f960cc3d8a8f999cab1579e83d9aea520 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:08:51 2007 +0000 mi: Remove usage of alloca Replace with heap allocations. commit 3633ae6efb57c5405c26e8ae132b9371e5f920de Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:04:27 2007 +0000 Damage: Remove usage of alloca Replace with heap allocations. commit 2761c103311a1160bc483fd0367d654733df8598 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:03:26 2007 +0000 OS: Remove usage of alloca Replace with heap allocations. commit 2d738efb959912d8a89864e41190e0064fa77906 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:01:11 2007 +0000 RandR: Remove usage of alloca Replace with heap allocations. commit 3c1d2fdeff0ed61d86fa7d35cb0a61535d9b2816 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 14:00:40 2007 +0000 Record: Remove usage of alloca Replace with xalloc/xfree. commit e0491f470e130147191388168e878e3a7348afaf Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 13:59:51 2007 +0000 Render: Remove usage of alloca Replace it with heap-based allocations. commit 59774af86b851c7fb8989cef6c013522549000b8 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 5 13:59:15 2007 +0000 XKB: Remove usage of alloca alloca has no way to return failure, and instead can possibly arbitrarily overflow the stack. Let's avoid that one. commit 6e4f5cf83f35ffebb51633ab30b1826e63e37223 Author: Ben Byer <bbyer@bbyer.local> Date: Mon Nov 5 05:53:34 2007 -0800 changing ALLOCATE_LOCAL to xalloc to prevent stack overflow commit b1764ddf133cfdf979db62ee2491124a4798b55b Author: Ben Byer <bbyer@bbyer.local> Date: Mon Nov 5 05:44:54 2007 -0800 pulling more patches over from xorg-xserver-1.2-apple branch commit 10fde62fc88302f7d3b2546239b1679be249567c Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 4 18:59:41 2007 -0800 more CVS tags commit 27ecb89250398f45564fe454e20bfdd66f62c8e4 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 4 18:53:41 2007 -0800 Removed CVS tags. commit f2e310132fbe1520c1b5f3da4faa2d2d47835e72 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Oct 31 14:15:35 2007 -0700 Add CreatePixmap allocation hints. These hints allow an acceleration architecture to optimize allocation of certain types of pixmaps, such as pixmaps that will serve as backing pixmaps for redirected windows. commit 3f1b6765aadf665ede8253464da19a5878f16e56 Author: Markku Vire <markku.vire@movial.fi> Date: Thu Nov 1 22:43:04 2007 +0200 Config: HAL: Touchpads are pointers too Treat touchpads -- not just mice -- as pointer devices. commit 41c3069f7cf28155f8e6cfe0c10a12a1f5f76c7d Author: Mark Vytlacil <mrv@wi.rr.com> Date: Thu Nov 1 21:05:43 2007 +0200 XFree86: Input: Save/restore errno around SIGIO (bug #10683) Make sure errno is saved and restored from the SIGIO handler, so errors from system calls in input handlers don't break the interrupted code. commit ff9929ed48f2dec8b536d348e25e66a0bc4ac1a6 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 4 05:13:19 2007 -0800 pulling in changes from xorg-server-1.2-apple branch commit 181468db92d44a58080fc9a76e46dfc7011bf9f1 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Nov 4 04:50:26 2007 -0800 add missing null-pointer checks commit 4d0f35c81df307609b29c0f12aa1b4c6ee6fd8d2 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Nov 2 19:27:32 2007 +0100 Always duplicate mode name when duplicating a mode. If the originating mode didn't have a name, we would end up with the name of the original mode being setup correctly, but with the name of the copy still being NULL. commit dfb1cce28ac07d412598f7b9ab2ee908978b38e7 Author: Adam Jackson <ajax@redhat.com> Date: Fri Nov 2 12:51:56 2007 -0400 Restore build of xf8_16bpp. It doesn't link against cfb, so don't conditionalize its build against cfb. commit 7a0555e9bb59d02816803a1100f807d2d29f31d4 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Fix crash in xf86InitOrigins() In a multihead setup, if only the first screen can be initialized, but the second screen is mentioned first in the ServerLayout section, the xf86InitOrigins() function will crash because the screen referred to in the e.g. "RightOf" part is non-existent. commit 5b41d4e60be35cfb96bedec0931fd5922823b4b9 Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Don't filter modes away during VBE mode list construction. Pass all VBE modes back up to the driver, on the assumption that it knows how to filter modes intelligently. commit c095da04fe7c73b6503ef5b93549b13796c51b22 Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Fix magic number in fbdevhw The transformation between fbdev and xfree86 mode timings needs to be invertible, otherwise Xen and other framebuffers that don't have real pixel clocks won't initialize. commit f4fe66f6767d1941317dc0280ac359421a152587 Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Disable explicit commenting in Monitor section. commit 22f0e3a8b04e574047a51c8f928a007787303294 Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Avoid PS/2 protocol probing for /dev/input/mice The kernel will always upconvert to ExplorerPS/2 for all readers of /dev/input/mice, so don't waste time on startup trying to figure that out. commit b97518666dc32710fe69eee33ee56881dcff1bbc Author: Adam Jackson <ajax@redhat.com> Date: Sun Oct 28 09:37:52 2007 +0100 Fix accidental ABI usage in RANDR 1.2 drivers. Due to RANDR 1.2, xf86findOptionValue and xf86nameCompare are now ABI. Make sure they're exported from the server. commit f01e149d1af14ef9ee0e8a6743ab6a08f3bb677c Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 1 15:41:11 2007 -0400 Move SIGUSR1 notification as late as possible. If we inherited a signal mask from the parent process that ignores SIGUSR1, then we will send SIGUSR1 to the parent to indicate when we're ready to accept connections. Unfortunately, we send this notification way too early, right after creating the sockets rather than just before entering the main loop. Move it to just before Dispatch() so we're not lying quite so much. commit a2ee5fe0c4e863c7ff4f644e5ac86f2793903103 Author: Adam Jackson <ajax@redhat.com> Date: Thu Nov 1 13:46:20 2007 -0400 Enable MIT-SHM in Xdmx. The extension is entirely DIX-level, no new DDX changes needed. commit 2338d5c9914e2a43c3a4f7ee0f4355ad0a1ad9e7 Author: Arjan van de Ven <arjan@linux.intel.com> Date: Sun Oct 28 09:37:52 2007 +0100 reduce wakeups from smart scheduler The smart scheduler itimer currently always fires after each request (which in turn causes the CPU to wake out of idle, burning precious power). Rather than doing this, just stop the timer before going into the select() portion of the WaitFor loop. It's a cheap system call, and it will only get called if there's no more commands batched up from the active fd. This change also allows some of the functions to be simplified; setitimer() will only fail if it's passed invalid data, and we don't do that... so make it void and remove all the conditional code that deals with failure. The change also allows us to remove a few variables that were used for housekeeping between the signal handler and the main loop. Signed-off-by: Keith Packard <keithp@koto.keithp.com> commit 692654b4300e61a9481e6fa588bcb44a3c3ca150 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Oct 29 18:13:58 2007 -0400 Set up visuals for the existing X visuals. This makes the root visual a GLX capable visual again and adds a GLX visual for the COMPOSITE ARGB visual cleanly (as opposed to the hack we had before). commit a5546a99ac4da61aee0d49c55bcb38bbce9a96aa Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Oct 29 18:06:41 2007 -0400 Change the GLX module to initialize after COMPOSITE. This changes the module initalization order so that the GLX module initializes after COMPOSITE. The reason for this change is to be able to initialize a GLX visual config for the COMPOSITE ARGB visual. commit 8ead41388e36e21eea6fa0408c847f174911eab0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:57:00 2007 +0930 xfree86: wrap keyboard devices for XKB. Call ProcessOtherEvents first, then for all keyboard devices let them be wrapped by XKB. This way all XI events will go through XKB. Note that the VCK is still not wrapped, so core events will bypass XKB. (cherry picked from commit d627061b48ae06d27b37be209d67a3f4f2388dd3) commit e717cf08e99746761d74289c426bbd84176f4435 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 27 21:32:47 2007 +0300 XKB: Cope with all events in XkbProcessKeyboardEvent Cope with Xi and pointer events in the (now increasingly misnamed) XkbProcessKeyboardEvent. If it's the wrong type, call through the wrapping chain to get out; else, process it. commit 9db8846fa53d91193bbfe541b244e2326440011d Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 27 21:31:39 2007 +0300 XKB: Don't update indicators on all devices, add missing include file Don't get XkbUpdateIndicators to update the indicators on all our devices: we already deal with that ourselves. Add exevents.h include to get more (proto)types. commit ee3aa948eb8ed181d037294ed87df6ceec81684e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 18:04:59 2007 +0930 xkb: Unwrap properly in ProcessPointerEvent. Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly and then call the unwrapped processInputProc. Seems to be a better idea, especially since it makes stuff actually work... (cherry picked from commit 8f9bf927e1beecf9b9ec8877131ec12c765e4d84) commit d3588a0aee33fbd233082f881c0d37152c6d4d8b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 11:44:03 2007 +0930 xkb: xkbHandleActions: let wrapping take care of event delivery. This is hopefully better than hardcodey calling CoreProcessPointerEvent. (cherry picked from commit 32d0440c7f6e604807cb14dd32349df6f22c903b) commit 352c5a311200bf491153fe9ef16126c5877a57bb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 17:40:11 2007 +0930 dix: don't compress motion events from different devices (EventEnqueue) (cherry picked from commit 8840829ab93c4eb62eb58753c015da5307133fe5) commit 8d3d027062c105b50863dce43b8070ec560bc12e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:52:02 2007 +0930 dix: add XI event support to FixKeyState. FixKeyState needs to be able to handle XI events, otherwise we get "impossible keyboard events" on server zaps and other special key combos. (cherry picked from commit 5ee409794ee604fcf84886f70429fc2d6b1ff4f1) commit 99e826e867c1c5520153c539ba07a884aec88d0c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:49:57 2007 +0930 xkb: enable XI event processing for xkb. XI events can now take the same processing paths as core events, and should do the correct state changes etc. There's some cases where XKB will use KeyPress as type for an event to be delivered to the client. Stuck warnings in, not sure what the correct solution is yet. (cherry picked from commit 6334d4e7be18de5f237c12a6dc20f75aa23477d0 with some additional compile fixes and non-MPX adaptations) commit 91077bfc50d54be37c217e377c55b6bf886a2fab Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 18:24:30 2007 +0930 Save processInputProc before wrapping it and restore it later, instead of using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. This should be the correct fix now. (cherry picked from commit 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2) commit 8b9481a113b56078191e2298bf590905978f6289 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Sep 4 17:44:51 2007 +0930 xkb: Store the action filters per device in the XkbSrvInfoRec. Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again. (cherry picked from commit bfe6b4d2d9952a80f8dbc63eec974ef894e5c226) commit 493b83bd097372ae0023da9919da83af39e3fc1c Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 27 21:33:52 2007 +0300 XFree86: Remove ridiculous SIGIO debugging YOU PRESSED A KEY AND AGAIN YOU RELEASED A KEY AND AGAIN YOU PRESSED A KEY AND AGAIN ... not so much. commit a3d48de5f2b7eacf3193c60f0fb461912201210b Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 27 21:35:31 2007 +0300 XKB: Add more bits to xkbsrv.h Add the device private index, given we use that in a macro here, and also the prototype for xkbUnwrapProc, since that's also useful. commit e29e69960d67aa4b7a4d1551af509dbac193f438 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 27 21:34:22 2007 +0300 Xi: Include XI protocol header in exevents.h Make sure we have all the types we need to use this header. commit df57ae1639ba4f1719883c5bf868394e4748a022 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 28 15:46:26 2007 +0200 configure.ac/XFree86: Only build XF86Misc and XF86VidMode when appropriate Don't build XF86Misc or XF86Vidmode in hw/xfree86/dixmod when it's been explicitly disabled in configure, or we don't have the proto modules installed. commit 3b7af72fe315c7c26c89838c0c5dacbe58765d0f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Oct 26 20:32:10 2007 -0400 xselinux: Add a SetDeviceContext request and stubs for more requests. commit 2251572062b2c25643671b8d5070de1c3f7ae976 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Oct 26 15:13:50 2007 -0700 Restore the CompositeGlyphs -> ps->Glyphs -> miGlyphs callchain to allow acceleration architectures to wrap above miGlyphs. commit 497aba894904b08b15bb19916e2a163f96212a7d Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 26 11:25:57 2007 -0400 Weed out some unused fluff from __GLXcontext. commit 0e749ceab421d72b48e18292c5ca0e337baf5ce8 Author: Bernardo Innocenti <bernie@codewiz.org> Date: Sat Oct 20 20:31:57 2007 -0400 Include stddef.h for size_t. This is required by a buggy version of the openssl/sha.h header which is distributed with Fedora 7. commit 80d8a3e1767609a92b0b85a7e92cea5f0748038a Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 26 10:19:57 2007 -0400 Quiet glx visual debug info. commit 27b13eeb56a5cbac00b381309604505002e77228 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Oct 26 13:15:07 2007 +0200 Nuke superfluous ",", added missing include for xf86i2c.h. commit 6d59bb5709a99ab60b482bbf3393ebffda7f9407 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 26 09:12:15 2007 +0300 XFree86 Misc/VidMode: Remove ridiculous debug ErrorFs When we're building with --enable-debug, don't emit an ErrorF every time a function gets called. commit 5f9095f0d29bac0190d82c87a09cf32d6a34c17c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 25 19:02:03 2007 -0400 registry: Remove synthetic bit from event types in lookup function. commit 8c6923018c7d71cd15d9cf4ef9e8528ef5ec7c2e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 25 19:01:29 2007 -0400 xace: Add a "manage" access check when setting the Redirect event bits. commit 7d14ca59c5b942c09feaa2429c394cde9d8d3fd1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 25 19:00:50 2007 -0400 xselinux: Don't include the client in the receive hook audit messages. commit f62277d421023b3150d3a1accb00a8206ab2bde3 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 25 18:48:39 2007 -0400 Clean up unused pVisual part of __GLXcontext. commit 30bcaa966d6b00f1630609a78db18dee683cc43d Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 25 18:48:06 2007 -0400 Make glx destroy path handle cases where the X window goes away first. commit 40de9fcf18930811dd5ae355c83275af887a9f83 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 25 12:35:01 2007 -0400 xselinux: Label the default device directly with the process context. commit b633d54b94d746d26e13014634d9f63bbb7e8f7d Merge: 4b05f19cb 48ca5961c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 25 12:19:30 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: GL/glx/glxscreens.c hw/xnest/Screen.c render/glyph.c render/glyphstr.h render/render.c commit 242f56f722243938e908d1957781ee53c2999783 Author: Naoki Hamada <nao@tom-yam.or.jp> Date: Thu Oct 25 18:45:50 2007 +0300 Input: Fix key down test (bug #12858) Fix the botched previous key_is_down test, which would give false positives. Also move key_autorepeats to a separate inline function. commit 4b05f19cb9e42d8c8eff5ca4e463f5bc2a05433d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 24 19:59:58 2007 -0400 xselinux: Introduce a type transition when labeling events. commit 0d2ef187e77b12713d2a9661932fa01dba58a945 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 24 18:23:31 2007 -0400 xselinux: Add audit message fields for selection and event names. commit 48ca5961caee62f2980017a6bdc96a1b4c747727 Author: Matthias Hopf <mhopf@suse.de> Date: Wed Oct 24 20:31:51 2007 +0200 Prefer configured DisplaySize to probed DDC data, if available. Based on patch by Hong Liu <hong.liu@intel.com>. commit 0388a59a6ef212c497cc3f64d677b1ca5b410982 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 20:59:21 2007 -0400 Revert "registry: special case minor number when looking up core requests." This reverts commit 31110d6837ee52fd654729d9e5c4b0c5395abab0. This is handled properly by StandardMinorOpcode(). commit 46521f529841e032e198e5df87974088548a68de Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 20:58:48 2007 -0400 xselinux: Add basic support for selection access control and redirection. Probably not fully baked yet. It's difficult to test since so few apps actually follow the ICCCM with respect to cut & paste. commit b7ee005d327372c1e414ee6c526f9f7aee14bc86 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 24 10:26:12 2007 +0930 dix: Don't interfere grabs the interfering device is of different type. A pointer device should be able to send events while the client has a core grab on a keyboard device, and likewise. commit 02508614b9f882ba1559fb4581dcf812118fdf89 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 24 10:09:18 2007 +0930 dix: check for core passive grabs on inferiors when replaying events. commit 825f09dffd94cfcd0562a01c5181998503851461 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 17:12:57 2007 -0400 xace: Still more changes to selection code. Removed the SelectionPtr from the hook - the hook only needs the Atom to control access to the selection object. Upgraded the SelectionCallback to take a client argument and additional type codes so that it can be used for redirection. commit 660557593ea961948722298ea8ffba83891c9914 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 14:46:37 2007 -0400 xselinux: Remove synthetic bit when looking up event type. commit d7db549db41a27aef28cff9bfb7973bc741f88b2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 14:08:54 2007 -0400 xselinux: Unregister callbacks on server reset. commit 9e0a468af19d8e46330bcff37c9adc5e11d3aee7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 23 13:35:30 2007 -0400 xace: try to pretend events were sent when a denial occurs. Probably need to redo the error return paths in these functions at some point. commit d502521c3669f3f22b94c39a64ab63bfd92c6a97 Author: Pierre Willenbrock <pierre@pirsoft.dnsalias.org> Date: Tue Oct 23 16:45:13 2007 +0200 EXA: Fix off-by-one in polyline drawing. commit a8a148919b84a293e3e7a49409ab833590357edb Author: Matthias Hopf <mhopf@suse.de> Date: Tue Oct 23 16:23:28 2007 +0200 Superfluous ','. commit 75f05086d04a90c3dcdcdd31bf79d7033708e3e0 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Oct 23 15:39:23 2007 +0200 Get rid of unnecessary GNU extended variadic macro. commit 7ef863720dc79107fc2cd17ce684366c87e001a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 23 17:28:03 2007 +0930 dix: Create new sprite for floating devices. Floating devices get sprites, but still aren't spriteOwners. This prevents them from getting rendered, and also stops segfaulting. (not really solving the problems with keyboards though) commit d808d653d1fc16f1d5af76ab00fa862fb80fa3ba Author: David Nusinow <dnusinow@debian.org> Date: Mon Oct 22 21:30:04 2007 -0400 Define PCI_TXT_IDS_DIR more cleanly commit 29e0e180729a4f0cc020985a4de4c8bc4b9c7f5f Author: Keith Packard <keithp@koto.keithp.com> Date: Mon Oct 22 13:38:16 2007 -0700 Leave hardware-specified preferred modes alone when user preference exists. Instead of removing the preference bit marking the hardware declared mode preference, leave it in place and just move the user preferred mode to the front of the list while marking it with the USERPREF bit which will cause it to be selected by the initial mode selection code. commit fbe19c66c36acfb484809111cf02579a3baf2f0f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Oct 22 18:28:03 2007 +0200 GLX: Fix leak of X pixmaps associated with GLX pixmaps. commit c6d36b1cee44a9cbb690dff62a4683d7f6fbf30c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Oct 22 18:28:03 2007 +0200 GLX: Don't crash on unused client array members when switching to/from console. commit be9b0e558d6172ef01ed880d47da897d2ceb25fa Author: David Nusinow <dnusinow@debian.org> Date: Sun Oct 21 23:49:14 2007 -0400 Add a note as to why the text file based PCI ID scheme is present at all commit b79b965bd9a96f79781e85c0428068caa1ba381b Author: David Nusinow <dnusinow@debian.org> Date: Sun Oct 21 23:46:54 2007 -0400 Fix compilation issue on FreeBSD (bug #12841) Hide getline call by checking for glibc. If not, use fgetln instead. Even though this section is now #ifdef'ed for linux only, this should help make it more portable if non-linux folks end up wanting it. commit 7f5e71fa7347fb4ec2657ccc453831c04a0f288d Author: David Nusinow <dnusinow@debian.org> Date: Sun Oct 21 23:41:49 2007 -0400 Make PCI text file directory configurable commit ce7f6fe1268fef4f89aa21c7b44d73ecd98efe24 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Oct 19 19:40:04 2007 -0400 xselinux: properly update sizes when dynamic arrays are resized... commit 4b14c9a9cd2033d3839c4ba364d41ab4c4b198ab Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 19 16:34:54 2007 -0700 Replace calls to Glyphs screen hook with CompositeGlyphs and remove dead code. Not all of the DDX/miext Glyphs hook implementations have been removed, but they should be. commit a3a95d3475dc91ed2e8a55bf484a6b3f2b5ac32a Merge: a358b87f4 7e1cada6c Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 19 15:44:17 2007 -0700 Merge branch 'master' into glyph-pixmaps Conflicts: configure.ac commit 12e889d202ac9849f534c51167cbfed91c32027a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Oct 19 18:43:38 2007 -0400 xace: Bug fixes, name changes to selection access hooks and fields. commit 7e1cada6c6b9fa41ef3ead00bf7725d626dda193 Author: Eric Anholt <eric@anholt.net> Date: Fri Oct 19 15:16:19 2007 -0700 Disable debian pci-id-list autoconfig code on non-linux. It contains static paths, fails to build on non-glibc, and apparently just exists to support distributions managing binary drivers and open-source drivers together. Also restores previous code for fallback to vesa if nothing is detected. commit 89c6108531e603bdc81faf2ea860f318a2e94a39 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 19 16:21:54 2007 -0400 Fix software GL to provide a list of supported fbconfigs like the DRI case. commit 74e84b8d891632141a60e2d29463ab46f622df3f Author: Matthias Hopf <mhopf@suse.de> Date: Fri Oct 19 17:28:15 2007 +0200 Only issue XF86_APM_CAPABILITY_CHANGED for video change ACPI events (not e.g. brightness etc.). commit 6fdf3ddfef2707755cec0fc9cbce354fd472bb52 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Oct 19 17:20:21 2007 +0200 Fix ids of ACPI events according to ACPI spec. commit d9caa469b9bb4eb6125b890820853062fc2c4441 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 19 15:26:09 2007 +0930 Xi: allow VCP/VCK to be OpenDevice'd as well. All devices deserve to be equal. Except master devices, they are a bit more equal than the others. commit 155e2c559ed0dbf31b6d39d48648a3ee22b37635 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 19 14:37:07 2007 +0930 Xi: advertise as XInput v2 capable commit 5ba738935f0d786e4670adf3b05ad42fc5e710fd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 19 14:36:37 2007 +0930 Xi: remove ChangePointerKeyboardPairing in favour of ChangeDeviceHierarchy. commit 6dcde0e9c1d068d9fc4a772d29d1d4c6cc57aeb9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Oct 18 12:21:07 2007 +0930 Xi: set master device's id in ListDevices Reply. commit cfcc6e14b9a15f7979ba0df9c105cf563bef98fa Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 19 11:28:44 2007 +0930 Xi: return all master devices as type IsXPointer/Keyboard when listing devs. Slave devices are reported as IsXExtensionPointer/Keyboard. commit 8e3c1dfc48930c455529313a42efa35e3b9071b2 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 18 21:01:51 2007 -0400 Introduce a new "GlxVisuals" option that controls which visuals are added. Right now we default to "all" which gives us a situation much like before, but when the "typical" option is implemented, we can change the default and reduce the number of visuals the GLX module bloats the X server with. commit 9e3cfd950d279353f1795352ad2c4132aabc1bab Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 18 19:12:24 2007 -0400 Add code to set up GLX visuals and add one for the first double buffered FBConfig. commit 8fc635e6a8072c7cd2777d804dd6f8eda2eecc15 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 18 15:51:11 2007 -0400 Separate handling of GLX visuals and GLX FBConfigs. XIDs for GLX visuals and FBConfigs used to be interchangable and the list of GLX visuals was identical to the list for FBConfigs. This patch splits handling of these two data types and allows the X server to pick and choose the FBConfigs that are exposed as visuals. commit 0af8180683247955ce4cfd48e6a5b4d00bbe618a Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Oct 17 17:18:47 2007 -0400 Drop VisualConfigPriv support from the DRI module. No DDX driver uses this, and this patch stops the DRI module from poking around GLX module data structures. commit 7d74690536b64f7b8e8036507ab7790807349c50 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Oct 14 15:39:21 2007 -0400 Simplify and clean up GLX visual initialization. Instead of the fragile setup where we filter the modes common between the DDX generated GLX visuals and the DRI driver generated fbconfigs, we now just take the fbconfigs returned by the DRI driver to be our supported set. commit ab4bce02a9457dd9c86b774fc74caf3dd6b287ca Author: Eric Anholt <eric@anholt.net> Date: Thu Oct 18 15:22:42 2007 -0700 Add a quirk for Philips 107P5 which lacks the preferred bit on detailed timing. Also fix the prefer-large-75 quirk if the prefer-first-detailed bit was set, though it's not the case for the existing prefer-large-75 consumer. commit 55a96aa6b0995fda6660b7e78c85b955a62b9735 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 14:11:11 2007 -0400 xselinux: add basic event labeling. commit e974bc1233608ec09fbd40b12217925e4d2205aa Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 12:33:39 2007 -0400 xselinux: add hooks for send and receive access. commit 06eb830169afd0631a31e8846c7d2533c49ea378 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 12:31:14 2007 -0400 xace: Fix bug in AddPassiveGrabToList(), was using wrong GrabPtr. commit 6107a245035366fe762756b6aa05ac0e3a5482bb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 12:24:55 2007 -0400 dix: Add client parameter to AddPassiveGrabsToList(). commit ce50bfd3369686cfecee5a138bd84ef1107a249d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Oct 18 17:44:48 2007 +0200 EXA: Skip empty glyphs. commit 5d74416740de883b7ef0994afea4bbd4d3901be0 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Oct 18 17:44:14 2007 +0200 EXA: Don't attempt to move in pixmaps that can't be accelerated. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 . commit 31110d6837ee52fd654729d9e5c4b0c5395abab0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 10:30:44 2007 -0400 registry: special case minor number when looking up core requests. commit e3fd90ae9c3ddfc5d78e62614e311b73505d7ead Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 18 10:29:10 2007 -0400 registry: Add "X11:" prefix to core protocol names. commit aa340b2c7cbe9ddab53cff08c8ba165558209187 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 19:27:16 2007 -0400 xselinux: add hook for device acceses. commit 503f918f55d0cb29585d83b022bbb8dc29f446c5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 19:14:15 2007 -0400 xselinux: Move functions around; add some more comments. commit 50b27e1ad2a98d36728dc8157492ef5c59c132cd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 16:09:40 2007 -0400 devPrivates rework: update new GL/glxext code. Need to merge so this type of thing stops happening. commit c3f7b862550fa8f46633162f83db8c27e46fc672 Merge: af4dde0ac feac07595 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 15:00:54 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: os/access.c commit af4dde0ac19ecec1d0ad988eb25b15401e7c6b36 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 14:13:02 2007 -0400 xselinux: Remove config file, this has been moved to the policy. commit baabae623b3658196b67a710dc72663c2105bf31 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 13:54:56 2007 -0400 xselinux: Started reworking extension using new XACE hooks. commit db66e66dbf26b91c655f1659859c022cc31f0db6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 13:51:11 2007 -0400 xace: Add an access_mode field to the extension structure. This allows the same callback to be used for both extension hooks. commit e3a8cbe523bae8b771ad3c8ad497f4444f6d05d5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 17 13:48:44 2007 -0400 xace: add creation/labeling hook to CreateRootWindow(). commit feac0759522cbdc3e61ccfa373df735903c5cb27 Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Oct 17 11:42:28 2007 +0800 Make config file preferred mode override monitor preferred mode. Add a new even-more-preferred bit to each mode which is used to make config file preferences selected instead of the monitor preferred mode. commit f2da10f7bc2ddb6ad2f18b793afc10d04b97c51c Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Oct 17 10:50:22 2007 +0800 KDRIVE_LOCAL_LIBS includes some system libraries, not just internal x server libs commit 9aadde377991bfbd88524d02106bec3dedd6e7c9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 17 12:05:50 2007 +0930 mi: don't call UndisplayCursor for non-sprite-owners. Segfaults are bad. commit 8b7c4249d82d07e852d8d8c15c7ab9977dd1f31c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 17 10:41:58 2007 +0930 mi: call processInputProc for master devices after slave event processing. More work is needed to sort out grabs though. commit ae9fc10adec8f9bf0492d14d435f8f11e0163b27 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 17 10:41:04 2007 +0930 Xi: don't send core events for slave devices. commit de70cfdbe60eb6e7bf3e74dfd1ac34de554deff1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 17 09:52:30 2007 +0930 mi: fix some macros to allow multiple cursors for master devices. Macros defaulted to inputInfo.pointe rfor devices that weren't spriteOwners. Changed to take the device's master device now. This includes sticking in a number of checks and warnings that cursor rendering won't be called for floating devices. commit 773f6491c1cc8819038e753d08c32ba213f80f8f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 16 19:11:36 2007 -0400 xace: update the DeleteProperty prototype to include the client argument. This should have been part of 8f23d40068151ad85cde239d07031284f0b2c4dc. commit 9dde53ed179336c7b483c9a94a97182ad1777dfb Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Tue Oct 16 19:55:56 2007 +0100 Fix walking of GLX providers. commit 70a5d33c9e41c077a8cd92abd43376e2956d3aed Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Oct 16 12:46:07 2007 +0200 Always check the return value of __glXGetDrawable first. Fixes spurious GLX protocol errors because __glXGetDrawable doesn't set the error code in case of success. Maybe it should, though. commit 1d9ebbac8c589cae7e4952083692b6d148def9bc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 18:46:12 2007 +0930 dix: Make InitCoreDevices use AllocMasterDevice. Also change naming a bit, append "pointer" and "keyboard" to master devices instead of -ptr and -keybd. commit 299573f4617c3b5599bb65069e96d050277b9471 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 18:40:15 2007 +0930 dix: add AllocMasterDevice for creation of new master devices. Devices are initiated pretty much the same as the core devices. commit 5fe9bfd23f17b84c3afaa82f75a7c517c9f8e0d3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 18:23:48 2007 +0930 xfree86: NIDR: don't call PairDevices explicitly. set isMaster to FALSE explicitly. Pairing isn't necessary, attachment should be done in EnableDevices. commit 5eb033835e92ea951cc385fd709af9656b3772d8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 18:03:52 2007 +0930 mi: don't exclude inputInfo.pointer from rendering. commit b697c4ed145968d3c3281bb85e628f1b068b09fc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 17:47:06 2007 +0930 dix: CheckPassiveGrabOnWindow: only get paired device for non-keyboards. commit caa69d8f7b92b80669df02e1001409d7c653e7e4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 17:38:13 2007 +0930 dix: fix detritus from adding lastSlave field. commit 90d077e537ac4cb7d79d67afcf3984a3e8d65fe8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 17:37:33 2007 +0930 dix: GetPointerEvents: get state from master device before applying valuators. We need to get lastx/y from the master device before we start applying acceleration etc. Otherwise we get jumping cursors, which is reasonably bad. commit b6ccf721b0a582150858d68f91967fb4e319c340 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 17:35:06 2007 +0930 include: add "lastSlave" field to DeviceIntRec. Set to the last slave device that routed events through the master. commit e6bd8ae0608bd8379c5ac962f69cd0bcc54f9734 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 15:59:30 2007 +0930 dix: set the device's sprite when using AttachDevice Sprite is set to the master device's sprite. commit 271d4c3d6255318aabb9ad1ea444f534ed456f0b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 15:50:07 2007 +0930 xfree86: remove XI86_SHARED_POINTER flag. Not needed anymore. By default, all devices are slaves of first master device. commit c7b878b90406781c97db751a9b454e2b6baee0e1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 15:07:31 2007 +0930 dix: don't treat VCK/VCP separately in DevHasCursor, IsPointer/KeyboardDevice. commit e9f149fb56747f7eaa0f714dce97b067b007c47e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 14:24:20 2007 +0930 Fix up detritus from removing GetPairedPointer/Keyboard. commit 840bde3d32f3627dfc3d7d8b6564a61a8014933b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 13:09:35 2007 +0930 dix: GetPairedDevice: return dev paired with master for slave devices. commit 6c259a08d917f94fd7381453b625b07826d3ef9c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 13:09:19 2007 +0930 include: remove unused GetPairedPointer/Keyboard declarations. commit fe97f7c54a1b42acd542696b6cdc9e83e89548f3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 22:46:08 2007 -0400 registry: Add some missing #include's. commit 9ecbbf198f4cec398897736e173e7e8c56bf6f94 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 08:00:06 2007 +0930 dix: adjust PickPointer and PickKeyboard to get the first master device. Simplifies it a lot, since we always have at least one master device available at all times, so less mucking around. commit 0c5f65ecd3ad11fbdb1cab3cb1d0eb4f33bb4e35 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 07:57:24 2007 +0930 dix: don't allow slave devices as ClientPointer commit 9ccc9ab6f29f68298b68cdb5c9b4bd57a095f05a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 07:53:00 2007 +0930 dix: don't call CloseDevice on VCP/VCK separately. commit e4fd981b48723b77a6c1a528638a771b9cc35472 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 07:52:11 2007 +0930 dix: check for isMaster before calling DeviceCursorCleanup. commit 7503d1340726e0a529f04304d177ed2ceb8fbc91 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 07:50:13 2007 +0930 dix: don't check VCK and VCP separately when looking for device ids. Both are part of the device list again, so we cover them there. commit 032e906711202d376af95b37bb0cdf14a3648256 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 11:57:42 2007 +0930 dix: Remove GetPairedPointer, GetPairedKeyboard in favour of GetPairedDevice. commit 853ea337bdad17f8f6ec7d940de14ce2cbbbf93e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 22:13:02 2007 -0400 registry: Register XvMC extension protocol names. commit 58c3240fcbec23aad122e1c340f6bb6d3b18f779 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 22:09:47 2007 -0400 registry: Register MIT-SCREEN-SAVER extension protocol names. commit 3e07e73fefc100e491d1e465cb162373d1d82425 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 11:34:29 2007 +0930 dix: remove pairing/attachment from InitAndStartDevices. If we enabled in the correct order, this has all been done already. commit 4e274e90e16b1d954391e1af3e2074fb10f70ee7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 22:04:20 2007 -0400 registry: Register SHAPE extension protocol names. commit 9f597f6c87e0b14cc382d8e5929e42f822db4329 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 22:01:20 2007 -0400 registry: Register SYNC extension protocol names. commit 38baac71bdbb8c7e882e3e39133615cfed894a6b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 04:21:42 2007 +0930 dix: Set bidirectional pairing, don't allow pairing with already paired devs. commit 70efd3d06a15093661933bda4ec21e306dece4a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 11:30:32 2007 +0930 dix: fix up Activate/Enable/Disable device. Set isMaster for VCP/VCK. Init sprites for master pointer devices. Pair master kbds with master pointers (1:1 pairing!). Attach other devices to VCP/VCK. commit b504678ba5407a6fd8d47d051305f7c3d5606dfe Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:54:25 2007 -0400 registry: Register APPGROUP extension protocol names. commit 204f2dc89ef662b57400b128c30c15e8cf32f323 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 04:13:06 2007 +0930 include: add "isMaster" field to DeviceIntRec. Set to TRUE for master devices. Also fixing up comment for paired field in spriteInfo, will be set bidirectional from now on. commit bd7d5255ce4865b684f7d8bcf80ba9872a1af22d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 16 11:18:31 2007 +0930 dix: add AttachDevice, needed to attach a slave device to a master device. For now, we don't allow attaching slaves to other slaves, and we don't allow pairing slaves with other slaves. Pairing is for master keyboard->master pointer only. Attaching is for slave device->master device only. commit 6ec35a8cf539c900b334dd6df146b394f54e3706 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:46:56 2007 -0400 registry: Register BigRequests extension protocol names. commit 1254cc399c53eadcc32eeabf69990ed2526c7ae0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:43:06 2007 -0400 registry: Register Fontcache extension protocol names. commit e987648cf2c21dcbd77dd9a71793090a48e4f521 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:38:56 2007 -0400 registry: Register EVI extension protocol names. commit be1565f6b8fb09eba9941d6f7c485bf5fb25fe7a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 01:53:54 2007 +0930 dix: Set core devices to ProcessOtherEvents, set sendCore and XKB. Even the virtual core devices should send through ProcessOtherEvents. commit ce9bf9a19185a36ac2f7ae75acd320ab8d03d247 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Oct 14 01:50:40 2007 +0930 include: add "master" field to DeviceIntRec. "master" points to the device this device is attached to. Event sent by the device will also be routed through the master. master and spriteOwner are mutually exclusive. commit f6226d3bfe1515058e2092e8662ae87825501209 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:35:12 2007 -0400 registry: Register TOG-CUP extension protocol names. commit 7e182a5d89d618e20dcc77850131690733322d39 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:13:39 2007 -0400 registry: Register MIT-MISC extension protocol names. commit 32f6171862461d17ebea58a2fb6ddd16ac71358c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:10:14 2007 -0400 registry: Register XF86Bigfont extension protocol names. commit 12766c5b5ffdab95255a63b2c8421ee773fd43b5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 21:00:46 2007 -0400 registry: Register Xv extension protocol names. commit 35ae03871af88b2f420dd83448011a077852d7a0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 20:50:26 2007 -0400 registry: Register XC-MISC extension protocol names. commit 32fe282d5b8306514d641e15bc6d9fd4ab360977 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 20:45:18 2007 -0400 registry: Register XTest extension protocol names. commit 3877faf7d9fe00ed634077e38a198ae4b91a2bb4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 20:35:13 2007 -0400 registry: Register Multibuffer extension protocol names. commit 16764a2d299c7c0c98002aadd52ab4a1a36758c3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 20:29:23 2007 -0400 registry: Register DPMS extension protocol names. commit f077578e42eee424b0e534774574c84af9d6f85b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:43:02 2007 -0400 registry: Register XPrint extension protocol names. commit 5c8b1a91726817816d20faefad21c7a68ab634cc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:35:04 2007 -0400 registry: Register Resource extension protocol names. commit 48891d5696f56711f23743cb03be39cf6b26c522 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:32:01 2007 -0400 registry: Register EVIE extension protocol names. commit 2c9646ad4e65bb061d910c9e2b1a8a978f21fa17 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:18:03 2007 -0400 registry: Register SHM extension protocol names. commit 8964c6d8e14ae47798762191e359b2bf138ca32e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:10:51 2007 -0400 registry: Register RENDER extension protocol names. commit c827db57e4d9ca14c82b099dcfc9b7a0c0b5ba0a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 19:06:01 2007 -0400 registry: Register RANDR extension protocol names. commit 20db50b4c44a14f7eeac2b1de17ada68482521da Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:56:59 2007 -0400 registry: Register DAMAGE extension protocol names. commit b38a91993364aa80cfd99721e319e1458d9fb760 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:50:06 2007 -0400 registry: Register XTrap extension protocol names. commit 106758893b68033f14f69c4ee6591fb6a149ba37 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:31:40 2007 -0400 registry: Register XFixes extension protocol names. commit ea09c9acc8f0d5577f54c864ff88b7f03d93b2f4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:25:12 2007 -0400 registry: Register Record extension protocol names. commit 2e1e5be1d9067816525aa13a1d818e8ca6899599 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:18:57 2007 -0400 registry: Register DBE extension protocol names. commit 4c3285c883cc50a91bc5262bbc9d073d816f860a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 18:04:47 2007 -0400 registry: Register WINDOWSWM extension protocol names. commit 3815284e899b61731b6a63c4ba14c5d773e24eb6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 17:57:59 2007 -0400 registry: Register XF86DGA extension protocol names. commit 2cd1b32b77e0ceeaccb3f01c4ac13a97c557668c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 17:37:58 2007 -0400 registry: Register XF86Misc extension protocol names. commit 960677e876c068400fb45e1764bb5470cd8c389f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 17:30:00 2007 -0400 registry: Register XF86VidMode extension protocol names. commit b7786724080fd3928ef7b8c294346661d7ffd90b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 17:15:34 2007 -0400 registry: Register XF86DRI extension protocol names. commit eee46b4681ec55297604b0425705f2b18381f7ca Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 17:06:22 2007 -0400 registry: Register APPLEWM extension protocol names. commit b9f5ab98c8dea36dcce1ad15fd2e059a77e77c39 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 16:18:37 2007 -0400 registry: Register XINERAMA extension protocol names. commit 3464b419230c6d17e940d967b567c5d2cb22d232 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 15:45:12 2007 -0400 registry: Register APPLEDRI extension protocol names. commit 32f3f5a1e7654f8bb43ea16b9227b3994e616739 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 15:32:17 2007 -0400 registry: Register DMX extension protocol names. commit 166ef972febc00c665e1d5aeb68e75d7bbcf9879 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 15:22:02 2007 -0400 registry: Register composite extension protocol names. commit a5cf3f21f712e46dbf9bca289e67be75f2b531d3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 14:27:32 2007 -0400 registry: Register XKB extension protocol names. commit 5277a6ff589b5ddb475b90e1aaf5dbd9172d9711 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Oct 15 13:38:35 2007 -0400 registry: Register Input extension protocol names. commit 8b5078b7d9ec08a588a78eb49096b698c6f4916b Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Oct 15 13:10:10 2007 -0400 Fix byte swapping for GetFBConfigs. commit c922d2eebe29f08f463ee76293dc9042712fb21c Author: George Sapountzis <gsap7@yahoo.gr> Date: Sun Oct 14 20:40:18 2007 +0300 glx: drop duplicate GetDrawableAttributesSGIX declarations. They are officially autogenerated in indirect_dispatch.h now. commit 3d4eb17b38dcb1468493f3686dc5ea3623ef9a73 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Oct 14 18:07:03 2007 -0700 mass change from #ifdef i386 to #ifdef __i386__ to conform to ANSI commit ec0fc012e91e703bb399a380df2912f71957a220 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Oct 14 14:59:12 2007 -0400 Fix GLX byteswapping. commit 927757e1028f45f7fd94b9a2ab35567e0f34b2a8 Merge: ccda4b66b 17ffc34ad Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 12 19:28:39 2007 -0400 Merge branch 'master' of git://git.freedesktop.org/git/xorg/xserver commit ccda4b66bdfc179e661b24adc8ec72bb7db75b2b Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Aug 27 14:43:48 2007 -0400 Implement ChangeDrawableAttributes so we can support GLX_EVENT_MASK. We never need to actually send out the clobber event, so this should be sufficient for GLX 1.3. commit 695eb8b2e88abc9fa3a76d8da48c3214c7dd1f08 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Aug 27 14:23:50 2007 -0400 Implement GLX pbuffers. commit 516c181f57367847c3f317f8f8f5cc3211026f4c Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Aug 23 21:40:01 2007 -0400 Add dispatching for GLX_SGIX_pbuffer. commit d7ded953c4d263e3dd3374dc03eea19e80c05bc6 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Aug 23 19:07:52 2007 -0400 Implment GLXPixmaps. commit 526f40434c86548830c4f72940462b6253fe9790 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Oct 12 18:18:00 2007 -0400 NULL is not a valid argument to CreatePicture, please use serverClient as the client argument if no real client is creating the object. commit 2b0847c7aaf95b6b10f062dfff601032b2430a9b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Aug 8 10:07:03 2007 -0400 Implement damage reporting for AIGLX. commit 600028305cc047e824b18369a026f89c9eb7e437 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu May 31 22:55:47 2007 -0400 Move hyperpipe and swapbarrier extension funcs to screen private struct. This gets rid of a couple more global arrays and gets the two extensions more in line with the general extension mechanism. commit 781515bb637de4fd79e3c83817cb6ffa8f2d8a4f Author: Kristian Høgsberg <krh@redhat.com> Date: Wed May 30 23:25:03 2007 -0400 Convert GLX module to use screen private indexes like everything else. commit 72a3d68a2f5abcd09fef1a55e976e1a5731d4b02 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu May 10 11:16:50 2007 -0400 Update the AIGLX DRI loader to use the new DRI interface. This lets us drop a bunch of workarounds and use the new DRI extension mechanism. commit 17ffc34ad5e9a8e2269afef05f209701f1895c01 Author: Matthias Hopf <mhopf@suse.de> Date: Fri Oct 12 15:33:31 2007 +0200 Drivers include miscstruct.h which requires pixman.h. commit eaf0e2a21c2cb14e19852e61a4521b3c240253af Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 22:31:24 2007 -0400 Fix another compiler warning commit a5089af726b6a4f833b95a31274743c994277e20 Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 22:24:31 2007 -0400 Fix a warning about the control logic in xchomp() commit cdf29ff45a3cb45573c9d0cb8f82e6ee97953fb5 Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 22:23:34 2007 -0400 Remove some unused variables commit 3367091f7fa14497aab40e668cad179e244eef81 Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 22:21:38 2007 -0400 Separate choosing driver from the file-based implementation This clears the implementation out of the way to prepare for development of a symbol-based resolution scheme commit 3aa41bcb8215c037512ddbd68a3f7bcad3b80a1f Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 21:29:13 2007 -0400 Remove obsolete error message define from parser commit e3e12221111886c4063d2da5d70d3830c56d39e2 Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 21:27:07 2007 -0400 Don't bother validating the Device section of the conf file All the previous tests can now be recovered from if not specified. commit 28ef7f59416677be380561709197b04df0479bef Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 20:56:46 2007 -0400 Re-enable validation of the screen section of xorg.conf This also fixes a problem where the server can't find the device section when it is specified in the screen section. commit ea2d4dc468dcebe6d38e676469ec51ed1d43490b Author: David Nusinow <dnusinow@debian.org> Date: Thu Oct 11 20:26:02 2007 -0400 When there's no xorg.conf, use the video driver autoloading function commit fc092334ac0a323b80a9602cb8bf60ca9dee3bfa Author: Eric Anholt <eric@anholt.net> Date: Thu Oct 11 16:48:56 2007 -0700 Bug #10304,12784,11603: Add quirks for several physical size issues. A lot of EDID writers apparently end up stuffing centimeters (like the maximum image size field) into the detailed timings, instead of millimeters. Some of them only get it wrong in one direction. Also, add a quirk to let us mark the largest 75hz mode as preferred, which will often be used for EDID 1.0 CRTs. commit 6adeba17301a309be2f34cd51eca84a13d5503fd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 11 14:17:17 2007 -0400 dix: Add a new "registry" mechanism for registering string names of things. Supports protocol requests, events, and errors, and resource names. Modify XRES extension to use it. commit 45cc03726b49f6ad4afe6c3fb4ad65d1051928b4 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Oct 11 18:23:25 2007 +0200 Make mode checking more tolerant like in pre-RandR times. commit 8f23d40068151ad85cde239d07031284f0b2c4dc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 10 19:56:03 2007 -0400 xace: move the property deletion hook inside the DeleteProperty function. commit 473bc6ec4c59e1a962b0b897c449a69aa5064ab0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 10 19:43:12 2007 -0400 xace: remove the special-cased "ignore" functionality from the property code. There will be no more faking of Success to hide things. XACE does not provide polyinstantiation. commit 7e9e01a4a34fa45521067d43c5bbff942dd5d51a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 10 17:40:22 2007 -0400 dix: pass a valid ClientPtr to SetFontPath in all cases. commit 8825d36a38c76ff8faf409c853061be2bd33430d Author: David Nusinow <dnusinow@debian.org> Date: Tue Oct 9 22:49:07 2007 -0400 Allow the user to not have a screen section If none is present, a default one will be created. This will be attached to either the first device section in the xorg.conf (allowing you to specify something like using EXA without having a screen section) or a default screen section if none is present in the file. commit 8665cf3327b713f334b0483593a924c197f892f2 Author: David Nusinow <dnusinow@debian.org> Date: Tue Oct 9 22:45:15 2007 -0400 Don't require that the screen explicitly attach the device section This will allow the screen to not explicitly have a device section. If this is the case and there is a device section in the xorg.conf, the first one will be used. If there is no device section at all, a default one will be created that loads the automatically determined module. commit 37898b824fdc94735495e3494aa2b9a681d477b9 Author: David Nusinow <dnusinow@debian.org> Date: Tue Oct 9 22:11:58 2007 -0400 Use the best guess heuristic as a fallback for autoloading This prevents breaking the current behavior commit 847fbbf4d25132e6c1f99fcf82fe757dbca94a34 Author: David Nusinow <dnusinow@debian.org> Date: Tue Oct 9 22:07:49 2007 -0400 Fix autoloading of drivers for pci-rework commit 6033d8150be3a115b90226eaa42f237bb0cf3369 Author: David Nusinow <dnusinow@debian.org> Date: Tue Oct 9 21:17:27 2007 -0400 First pass at improved video driver autoloading This is what we're currently shipping in Debian. Enables the ability for drivers to ship a text file listing PCI ID's they support, and have the server read them on startup when no driver is specified. This works, but isn't the final solution. commit 81d7b81146224f2b83278f5e21b3f9a36f30bd56 Author: David Nusinow <dnusinow@debian.org> Date: Sat Aug 25 15:00:30 2007 -0400 Load intel instead of i810 when autoconfiguring commit fdef7be5c8d5989e0aa453d0a5b86d0a6952e960 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 9 18:44:04 2007 -0700 Sun bug 6589829: include zoneid of shm segment in access policy for MIT-SHM <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6589829> <http://www.opensolaris.org/os/community/arc/caselog/2007/500/> commit 49c8285e38e0e71c9ea43df63add08a4f2564ed1 Author: Christian Weisgerber <naddy@freebsd.org> Date: Tue Oct 9 15:25:16 2007 -0700 FreeBSD/alpha server build requires libio (missed in modularization). commit 042e16458b751ad0fcfa1ebbdd74d7d48036b22a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 9 23:07:51 2007 +0930 dix: change a few inputInfo.keyboard over to PickKeyboard() commit 6aab6a6e2ae0ef5fdedae09cf2cdc86f382e3a8a Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Oct 8 13:25:38 2007 +0200 EXA: dude, don't validation driver hooks twice ! commit d42909b23a9be64a26aa349c1d6dcd8b228bffa7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 5 13:04:10 2007 +0930 dix: when disabling a device, make sure all paired devices are re-paired. We re-pair them with the VCP, not a real device! If we would do otherwise, somebody may change our keyboard focus and thus get us typing where we don't want to type. commit ff2351246da30b56a3a8f90654993c41b8eb3921 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Oct 5 12:19:03 2007 +0930 dix: When pairing, only check for access right if client is set. If the pairing client is not set, then the pairing is initiated internally (e.g. when a new keyboard device is configured). In this case we _must_ pair regardless of who is the pairing client. commit 4611f9568cdadf9c00f4b7ca4c77c8c6f07e94f8 Merge: ab11bad54 3549a1282 Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 13:07:50 2007 +0200 updated from 'master' commit ab11bad54707941eb41be62c025b983760ce3900 Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 13:05:29 2007 +0200 Xephyr: remove a potential crasher * hw/kdrive/ephyr/hostx.c: (hostx_has_dri): be more defensive. commit 06c8977966e76255ce7798f4839ef6e3530264a8 Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 13:01:24 2007 +0200 Xephyr: better handling of the -nodri option * hw/kdrive/ephyr/ephyr.c: (ephyrInitScreen): try and detect when the host has no DRI support. In that case, switch to the -nodri behaviour. When in the -nodri case, make sure not to skip glx visual initialisation. commit ea94f59e9b8824b1a638c63e06ca16f0efd43869 Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 12:54:26 2007 +0200 Xephyr: don't disable glx visual init by default * hw/kdrive/ephyr/ephyrinit.c: (ddxProcessArgument): disabling visual init here is bad because it gets disabled even when we want to use software GL, leading to Xephyr :1 -nodri crashing in mesa. commit a7f210e6fcda14eae4de64186904c6c676c758ee Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 12:51:08 2007 +0200 Xephyr: fix a compiler warning commit 5d6eac1251f1e17baa74d0893bb225b775e8ec2e Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 12:47:05 2007 +0200 Xephyr: remove an unused variable commit 8018733c39c283a931df424dcfd11e7aefbcd8cf Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Oct 4 12:06:19 2007 +0200 Xephyr: better compilation without GLX * hw/kdrive/ephyr/ephyrinit.c: protect GLX related code with GLXEXT macro commit 3549a1282365e69e70c7c2546cfa7d25923cce31 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Oct 4 11:38:01 2007 +0200 EXA: Disable 1x1 pixmap fill optimization for drivers that handle pixmaps. This reverts commit 1365aeff5499a051375e43a9fcbf54733ac93929. It defeated the optimization for drivers that don't provide a CreatePixmap hook. The optimization makes no sense for drivers that do anyway, so disable it for them completely. commit 604ebb5a6de372e6a8a96e0ee997db7929126860 Merge: 1365aeff5 4ba76a7e2 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Oct 3 16:13:16 2007 +0200 Merge Xephyr-XV/GL stuff into master commit 4ba76a7e2b62d26f43c0e670de571afb75ec92f4 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Oct 3 13:03:34 2007 +0200 Xephyr: port XV/GL stuff of the new multiscreen architecture We can now launch GL or XV apps in any of the Xephyr screens we want. * hw/kdrive/ephyr/hostx.c,h: (hostx_get_window): (hostx_create_window): make these functions be screen number aware. * hw/kdrive/ephyr/XF86dri.c : fix some compiler warnings. * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIQueryDirectRenderingCapable), (ephyrDRIOpenConnection), (ephyrDRIAuthConnection), (ephyrDRICloseConnection), (ephyrDRIGetClientDriverName), (ephyrDRICreateContext), (ephyrDRIDestroyContext), (ephyrDRICreateDrawable), (ephyrDRIGetDrawableInfo), (ephyrDRIGetDeviceInfo): in all those functions, don't forward the screen number we receive - from the client - to the host X. We (Xephyr) are always targetting the same X display screen, which is the one Xephyr got launched against. So we enforce that in the code. * hw/kdrive/ephyr/ephyrdriext.c: (EphyrMirrorHostVisuals): make this duplicate the visuals of the host X default screen into a given Xephyr screen. This way we have a chance to update the visuals of all Xephyr screen to make them mirror those of the host X. (many other places): specify screen number where required by the api change in hostx.h. * hw/kdrive/ephyr/ephyrglxext.c: specify screen number where required by the api change in hostx.h * hw/kdrive/ephyr/ephyrhostglx.c: don't forward the screen number we receive - from the client - to the host X. We (Xephyr) are always targetting the same X display screen, which is the one Xephyr got launched against. So we enforce that in the code. * hw/kdrive/ephyr/ephyrhostvideo.c,h: take in account the screen number received from the client app. This is useful to know on which Xephyr screen we need to display video stuff. * hw/kdrive/ephyr/ephyrvideo.c: update this to reflect the API change in hw/kdrive/ephyr/ephyrhostvideo.h. (ephyrSetPortAttribute): when parameters are not valid - they exceed their validity range - send them to the host anyway and do not return an error to clients. Some host expose buggy validity range, so rejecting client for that is too harsh. commit ab88cb8d2e7c1410f9ed2be928b38f176b132e11 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 3 18:08:33 2007 +0930 Xext: add missing geint.h to Makefile.am (un-breaks make dist) commit 9f2b493e34e93881101f31e631901d3fe56da4f0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 15:35:41 2007 +0930 xkb: remove some warning comments. Obsolete with 340911d7243a7f1095d79b5b2dcfa81b145c2474. commit 1eebb03a3190947a8102f2ddc73766cf98d34c84 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 3 15:18:17 2007 +0930 dix: ignore passive grab if the client already has a grab on the device. In some cases a button press may activate a passive core grab. If the client owning the passive grab already has a core grab on another device, don't actually activate it. Otherwise the client gets two simultaneous passive core grabs, and may never ungrab the device again (only if the other grab uses GrabModeSync). Reproducable: fire up gnome-session, open up gnome-terminal. Click with the ClientPointer onto the window decoration, then click with another pointer onto an application icon in the panel. Drag the icon out, release the button and voila - you just lost your second mouse. commit 0b485067823620b5dbd9ef2b3e13bd35ad5a4410 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 3 14:22:55 2007 +0930 dix: send NotifyGrab/NotifyUngrab focus events regardless of semaphore state. This is just papering over a problem. The whole focus system needs to be revised. commit 05106ac9839102c0e4a3ce5d9d83d19abf129f8a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Oct 3 11:33:10 2007 +0930 dix: change Enter/Leave semaphore handling to accommodate for NotifyGrab. This is a half-assed attempt at getting rid of some enter-leave problems. When a grab is activated, the events didn't get sent before, leading to interesting results. This commit papers over it but doesn't actually fix it properly. The whole enter/leave (focusin/out) structure needs to be ripped out and changed for multiple devices. commit 1365aeff5499a051375e43a9fcbf54733ac93929 Author: Dave Airlie <airlied@redhat.com> Date: Wed Oct 3 12:00:16 2007 +1000 exa: direct access to the pixmap sys ptr is bad if the pixmap isn't mapped commit 566dd3b7d789ba60d0adf33b3f729cfb02ff33cd Author: Dave Airlie <airlied@redhat.com> Date: Wed Oct 3 11:59:52 2007 +1000 exa: add new flags to denote driver handles all pixmap migration/hiding commit 1df1fee82d3565f6d8cfb91ce25a81c23a10a4b5 Author: Dave Airlie <airlied@redhat.com> Date: Wed Oct 3 11:56:04 2007 +1000 exa: make sure we set fb_ptr to NULL commit a358b87f45ce75e5d013fc904a07dfe394f74387 Author: Eric Anholt <eric@anholt.net> Date: Tue Oct 2 13:13:51 2007 -0700 Just link against libcrypto instead of relying on openssl pkg-config. Also fix incorrect library inclusion by kdrive which broke the build. commit 439edc768eea17667846ce573c843b8377e0dfb4 Merge: c8ccf469d 93ae6fe18 Author: Eric Anholt <eric@anholt.net> Date: Tue Oct 2 12:14:04 2007 -0700 Merge branch 'glyph-pixmaps' Conflicts: configure.ac exa/exa_render.c commit 59cebcd2e9302d15a52588ecafbbc2d2c5ae3a6c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 2 13:39:25 2007 -0400 xace: add creation hook for new input devices. Unfortunately, more information is needed to properly label the device. This will come from the configuration file, the hotplug messages, etc. It will either have to be passed into this function, or this hook moved down into the callers. commit b77d272d7555c1e0f176ee74b8717030a6d6c7b0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 2 13:21:53 2007 -0400 xace: add hooks + new access codes: XTEST extension commit c8ccf469dcb2d7609b23faa8b4999c436263051e Author: Keith Packard <keithp@koto.keithp.com> Date: Tue Oct 2 08:59:40 2007 -0700 Do not build hw/xfree86/os-support/bus/ix86Pci.c on Linux. Linux has custom PCI bus support functions, so this generic code is unnecessary. commit dcb4db1bf5b6fcfaed4e7162eb6c7a3a509e14bd Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 19 15:46:09 2007 +0200 Xephyr: glx fixlet * hw/kdrive/ephyr/ephyrhostglx.c: (ephyrHostGLXQueryVersion): properly query the host for its gxl version. commit 6a435b00003fb00930299a0e0810c93afc23a72e Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 19 15:35:51 2007 +0200 Xephyr: check presence of extensions in host X * hw/kdrive/ephyr/hostx.c,h: (hostx_has_xshape), (hostx_has_glx), (hostx_has_dri): added these new entry points * hw/kdrive/ephyr/ephyrdriext.c: (ephyrDRIExtensionInit): check presence of DRI and XShape extensions before trying to use them. * hw/kdrive/ephyr/ephyrglxext.c: (ephyrHijackGLXExtension): check presence of glx extension before we use it. commit 2b217fc055300d4c709dd27c4e8ec8166183993b Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 19 15:00:43 2007 +0200 Xephyr: cleanup XF86dri.c a bit commit f731b9da7dbafad50dd5a1e8da28ce86ffab19b7 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 18 18:41:18 2007 +0200 Xephyr: add -nodri and -noxv switches. * hw/kdrive/ephyr/ephyr.c,ephyrinit.c:: add -nodri and -noxv to disable either DRI or XV. When -nodri, mesa GL (non acceleretated) works. commit 50674391388b3cfe987782a3ad81b4f240f3db67 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 18 18:37:49 2007 +0200 Kdrive: use fbcmap_mi.c instead of fbcmap.c * hw/kdrive/src/Makefile.am: use fb/fbcmap_mi.c and not fb/fbcmap.c. This allows kdrive to take advantage of extensions redefining the entry points of micmap.c stuff. For instance it allows Xephyr to have a working GL, which is not possible otherwise, because GL redefines mInitVisualsProc to initialise its visuals. commit a5bd536869f646e4024befa84f6e677b990310bc Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 18 18:28:25 2007 +0200 fbcmap_mi.c: add a missing api * fb/fbcmap_mi.c: (fbSetVisualTypesAndMasks): added this entry point that was missing. This is useful so that servers using this entry point can use fbcmap_mi.c, and be obliged to stick to fbcmap.c. Note that fbcmap.c does implement this entry point. Up to now, kdrive based server could not use fbcmap_mi.c because this entry point was missing. The will allow Xephyr to properly use GL. commit 6307ee77091041af2d34e93bc164352d4438a808 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 18 18:22:44 2007 +0200 GLX: allow skipping of visual init wrapping * GL/glx/glxvisuals.c: added boolean to disable calling init_visuals(). This gives a chance to Xephyr to take over visuals manipulation and avoid a crash at server shutdown in __glXMesaScreenDestroy(), due to the fact that mesa might sees more visual than what it has actually created in init_visuals(). It might see more visuals because Xephyr can augment the number of visuals, dynamically. * os/utils.c: the boolean is actually defined here. commit ffe9ce6a843443606ad9367eca1645bf5e0635e5 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Sep 17 22:13:51 2007 +0200 Xephyr: fix a clipping issue xephyr-dri * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIGetDrawableInfo): force the back clipping rects to equal the front clipping rects. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): properly overclip the clipping rects we got from the client. This bug fixes a clipping rect that was too small in height, basically. Also fix a possible mem corruption. * hw/kdrive/ephyr/hostx.c: (hostx_set_window_geometry): remove a useless XSync commit 79782726617d4b5a4f9b376f21936d035fc870e1 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Sep 17 18:15:03 2007 +0200 Xephyr: properly clip GL drawables in Xephyr commit 3816d64e50a59e0ef276ddd6cb250cab98a49392 Author: Dodji Seketeli <dodji@seketeli.org> Date: Sun Sep 9 15:20:51 2007 +0200 Xephyr: oops, forgot to add ephyrdriext.h commit cf58781eee7d91a3bbca701a2c4523a36f8e0abb Author: Dodji Seketeli <dodji@openedhand.com> Date: Sat Sep 8 00:33:59 2007 +0200 Xephyr: make accelerated glxgears work in Xephyr * hw/kdrive/ephyr/ephyr.c: (ephyrInitialize): cleanup ephyrDRI extension init. remove functions that belongs in ephyrdriext.c . * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRICreateDrawable): create the drawable on the host X peer window, not on the host xephyr main window. (ephyrDRIGetDrawableInfo): get drawable info of the host X peer window. * hw/kdrive/ephyr/ephyrdriext.c: make ephyr DRI extention wrap a bunch of screen ops so that it can update the host X peer window whenever DRI bound drawable are moved in Xephyr. Also code the building blocks of the management of the host X window peer. * hw/kdrive/ephyr/hostx.c,h: (hostx_create_window): added this new entry point (hostx_destroy_window): ditto ()hostx_set_window_geometry): ditto commit 6d1e44d3d53b451d466d43197be589d0ecc4b9f6 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 4 18:28:16 2007 +0200 Xephyr: fix a host X hang. * hw/kdrive/ephyr/ephyrdri.c: (ephyrDRIGetDrawableInfo): quickly hook this into getting the drawable info from the host X server. For the time being, this only gets the drawable info of the Xephyr main window in the host. It should really get the info of a the peer drawable in the host X. So there should be a peer drawable to begin with. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): some cleanups. Properly get the the drawable info otherwise there is a host X hang. * hw/kdrive/ephyr/ephyrhostglx.c: do not (ephyrHostGLXQueryVersion): do not use C bindings of the glx protocol calls. Some of those actually access DRI context directly, resulting in the context having three clients. Instead all XF86DRI proto fowarding request should be coded by hand and only forward the protocol requests commit a39b57d2f784f14e3198c8506f5eb865bacc2440 Author: Dodji Seketeli <dodji@openedhand.com> Date: Fri Aug 31 16:53:18 2007 +0200 Xephyr: add more logging to GLX forwarding * hw/kdrive/ephyr/ephyrhostglx.c: added more logging. commit 9e192d2118246ad715e23cf5626a038274eb1eaa Author: Dodji Seketeli <dodji@openedhand.com> Date: Fri Aug 31 14:43:39 2007 +0200 Xephyr: better error handling in GLX forwarding * hw/kdrive/ephyr/ephyrglxext.c: fixed various logging functions (ephyrGLXGetStringReal): make sure all the string is sent to clients including the ending zero. * hw/kdrive/ephyr/ephyrhostglx.c: (ephyrHostGLXGetStringFromServer): better error handling. (ephyrHostGLXSendClientInfo): ditto. (ephyrHostGLXMakeCurrent): ditto commit 4dd4be99df38b70d43b02d9cb19e09e0ed94462b Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 30 23:54:49 2007 +0200 Xephyr: Make glxinfo work on the ATI R200 free driver. * hw/kdrive/ephyr/ephyr.c: (EphyrDuplicateVisual): when duplicating the visual, copy the color component masks and the class from the hostX (EphyrMirrorHostVisuals): don't mix blue and green mask. * hw/kdrive/ephyr/ephyrdri.c: add more logs. (ephyrDRICreateDrawable): actually implement this. for the moment it creates a DRI drawable for the hostX window, no matter what drawable this call was issued for. (ephyrDRIGetDrawableInfo): actually implemented this. for the moment the drawable info queried for its attrs is the Xephyr main main window. * hw/kdrive/ephyr/ephyrdriext.c: (ProcXF86DRIGetDrawableInfo): properly hook this dispatch function to the ephyrDRIGetDrawableInfo() function. * hw/kdrive/ephyr/ephyrglxext.c: add a bunch of GLX implementation hooks here. Hijack some of the xserver GLX hooks with them. Still need to properly support byteswapped clients though. * hw/kdrive/ephyr/ephyrhostglx.c,h: actually implemented the protocol level forwarding functions used by the GLX entr points in ephyrglxext.c. Here as well, there are a bunch of them, but we are far from having implemented all the GLX calls. * hw/kdrive/ephyr/hostx.c,h: (hostx_get_window_attributes): added this new entry point (hostx_allocate_resource_id_peer): added this to keep track of resource IDs peers: one member of the peer is in Xephyr, the other is in host X. (hostx_get_resource_id_peer): ditto. commit 8c78df0ea36abc7d46c4f59670289f4280f75507 Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 30 22:31:47 2007 +0200 Xserver: fix potential crash * dix/extension.c: (AddExtensionAlias): don't crash when failed to add extension alias. commit 024abe825cd702334266f6b8da289907bbd05970 Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Aug 28 15:59:45 2007 +0200 Xephyr: add logging in the DRI extension commit 1dd589410c6c5e8b62b4d15ec681b01452ec68c6 Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Aug 28 15:58:55 2007 +0200 mirror the visuals of the host X at startup. * hw/kdrive/ephyr/ephyr.c: make Xephyr mirror the visuals of the host X upon startup. This is important for GLX client apps. * hw/kdrive/ephyr/hostx.c,h: add a hostx_get_visuals_info() to get the visuals of the host X. commit 26da625055a3876c93a7a005520657b971748c4e Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Aug 28 15:55:05 2007 +0200 proxy the glXGetFBConfigSGIX call * hw/kdrive/ephyr/ephyrglxext.c: (ephyrGLXGetFBConfigsSGIX): proxy the GLXGetFBConfigsSGIX call. It is a vendor extension to get the visual configs as a list of name/value pairs. (ephyrHijackGLXExtension): hijack the VendorPriv_dispatch_info dispatch table to register our implementation of GLXGetFBConfigsSGIX (ephyrGLXGetFBConfigsSGIXReal): added this where the real implementation of GLXGetFBConfigsSGIX is. It support bytes swapping. (ephyrGLXGetFBConfigsSGIX,ephyrGLXGetFBConfigsSGIXSwap): these are the dispatch entry points. They just call ephyrGLXGetFBConfigsSGIXReal. * hw/kdrive/ephyr/ephyrhostglx.c,h: reorganize the proxies to get visual params from the host so that they clearly support the different methods of doing so. commit 5af73f98c46dfe5640185ca90feb20c39c6e06fa Author: Dodji Seketeli <dodji@seketeli.org> Date: Fri Aug 24 16:30:50 2007 +0200 EPHYR: Add an experiment proto proxy extension. * hw/kdrive/ephyr/Makefile.am: add the proxy extension to ephyr. The proxy extension is an experimental extension that forwards protocol packets targeted at a given extension to the host X. * hw/kdrive/ephyr/ephyr.c: init proxy ext. * hw/kdrive/ephyr/ephyrhostproxy.c,h: added this new file as part of the proxy extension. * hw/kdrive/ephyr/ephyrproxyext.c,h: ditto * hw/kdrive/ephyr/hostx.c: add the hostx_get_get_extension_info() entry point. commit c06fa924b4781a35b86e4a78d95ff3e9d95b02d1 Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 23 11:53:02 2007 +0200 XEPHYR: more GLX/DRI proxying work. * hw/kdrive/ephyr/XF86dri.c: re format this correctly. Make function decls honour the Ansi-C standard. * hw/kdrive/ephyr/ephyr.c: protect glx/dri related extension initialisation with the XEPHYR_DRI macro. Initialize the GLX ext hijacking at startup. * hw/kdrive/ephyr/ephyrdri.c: add more logging to ease debugging * hw/kdrive/ephyr/ephyrdriext.c: ditto. reformat. * hw/kdrive/ephyr/ephyrglxext.c,h: add this extension to proxy GLX requests to the host X. started to proxy those nedded to make glxinfo work with fglrx. Not yet finished. * hw/kdrive/ephyr/ephyrhostglx.c,h: put here the actual Xlib code used to hit the host X server because Xlib stuff cannot be mixed with xserver internal code, otherwise compilation erros due to type clashes happen. So no Xlib type should be exported by the entrypoints defined here. commit 0b8545144975bf7ed43c2564d01c697144eb1244 Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 16 17:30:13 2007 +0200 Implement ReputImage and StopVideo * hw/kdrive/ephyr/ephyrhostvideo.c/h: (ephyrHostXVStopVideo): add this entry point. * hw/kdrive/ephyr/ephyrvideo.c: Basically add ReputImage and StopVideo implementations. Now, when other windows obscur the video window, the reclipping seems to be well handled using StopVideo and ReputImage. To do this, I was obliged to save the frame in PutImage, so that I could resend it un ReputImage. commit 810dc55866d1c2343512354646c7ab309ea1fad2 Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 16 17:11:22 2007 +0200 Ephyr-Xv: add a new line to a log * hw/kdrive/ephyr/ephyrvideo.c: (ephyrQueryImageAttributes): add newline to log. commit 47e6dff89e48249828e828502e98951eee7f85bc Author: Dodji Seketeli <dodji@seketeli.org> Date: Thu Aug 16 17:07:36 2007 +0200 Xephyr-Xv: fix a crash when host X support several ports * hw/kdrive/ephyr/ephyrvideo.c: (ephyrXVPrivQueryHostAdaptors): properly set port private luke. This fixes a crash when the host Xv supports multiple ports. Make sure number of ports cannot be zero. commit a38ad562a6f50e9d76a37917b936035215ea460e Author: Dodji Seketeli <dodji@seketeli.org> Date: Wed Aug 15 19:40:10 2007 +0200 make xephyr talk DRI protocol with hostX * configure.ac,include/dix-config.h.in: define the XEPHYR_DRI macro. define it when --enable-xephyr and --enable-dri are both turned on. * hw/kdrive/ephyr/XF86dri.c: copy this from mesa source to enable Xephyr to talk DRI protocol the host X. In mesa, this is used by libGL.so to talk DRI protocol with the server. * hw/kdrive/ephyr/ephyr.c: finally initialise the DRI extension in the ephyrInitScreen() function. * hw/kdrive/ephyr/ephyrdri.c,ephyrdriext.c: safeguard the compilation using the XEPHYR_DRI macro. commit e4239a48075c77e6a8d2d5cb21f58dd67687482f Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Aug 14 22:48:41 2007 +0200 Initial dri forwarding big bricks. * hw/kdrive/ephyr/ephyrdriext.c: added this to implement a DRI extension into Xephyr. Normally the DRI extension is only present in the xfree86 server, but I have ported it to Xephyr. The extension calls functions that declared/defined in ephyrdri.h ephyrdri.c that forwards the DRI calls to the host X. It does not work yet, as this entry is just to put the big bricks in place. * hw/kdrive/ephyr/ephyrdri.c,h: declaration & definition of the DRI client API that would hit the hostX server. * hw/kdrive/ephyr/GL/internal/dri_interface.h: added this, otherwise inclusion of /usr/include/X11/dri/xf86dri.h won't compile commit e01d3dd98d1b596e75d25f94dd89c7d41223011d Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Aug 9 10:55:10 2007 +0200 Support clipping region in PutImage. * hw/kdrive/ephyr/ephyrhostvideo.c,h: (ephyrHostXVPutImage): make this support clipping region. The clipping region is propagated to host using XSetClipRectangles. This changes the API of ephyrHostXVPutImage. * hw/kdrive/ephyr/ephyrvideo.c: (ephyrPutImage): propagate the clipping region to the new ephyrHostXVPutImage() entry point. commit 39d3895469f07304d72800d8dcef6c7732f13d5f Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Aug 8 14:27:32 2007 +0200 make EphyrXVPriv be a singleton * hw/kdrive/ephyr/ephyrvideo.c: (ephyrInitVideo) make the EphyrXVPriv object be a singleton instance, otherwise a new object is created at each generation. commit 4ed083095a13ec92bb4c8e705f26500f8312c138 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Aug 7 14:16:13 2007 +0200 add [Get/Put]Video and [Get/Put]Still support * hw/kdrive/ephyr/ephyrhostvideo.c,h: (ephyrHostXVAdaptorHasXXX): fix these. (ephyrHostXVAdaptorHasGetVideo): added this (ephyrHostXVAdaptorHasGetStill): ditto (ephyrHostXVPutVideo): added this (ephyrHostXVGetVideo): ditto (ephyrHostXVPutStill): ditto (ephyrHostXVGetStill): ditto * hw/kdrive/ephyr/ephyrvideo.c: (ephyrPutVideo): implement this (ephyrGetVideo): ditto (ephyrPutStill): ditto (ephyrGetStill): ditto (ephyrXVPrivSetAdaptorsHooks): advertise GetVideo and GetStill when the host X supports it. commit 6f7961bc218169aaa0d10cfad0952adb7fac2f00 Author: Dodji Seketeli <dodji@openedhand.com> Date: Mon Aug 6 18:38:54 2007 +0200 advertise only the hooks implemented by host X * hw/kdrive/ephyr/ephyrhostvideo.c,h: (ephyrHostXVAdaptorHasPutVideo): detect if host X has the PutVideo call. (ephyrHostXVAdaptorHasPutStill): detect if host X has the PutStill call (ephyrHostXVAdaptorHasPutImage): detect if host X has the PutImage call * hw/kdrive/ephyr/ephyrvideo.c: (ephyrXVPrivQueryHostAdaptors): make sure to create atoms for attribute names otherwise subsequent calls to get/set attribute from clients won't work. (ephyrXVPrivSetAdaptorsHooks): don't hardwire advertising of the PutImage call. Instead, advertise the calls advertised by the host. commit 1de89239bdfa68ded2ef25fbb7d08369f527f7a9 Author: Dodji Seketeli <dodji@openedhand.com> Date: Sat Aug 4 01:13:38 2007 +0200 don't crash when hostX reports an error. * hw/kdrive/ephyr/ephyrhostvideo.c,h: (ephyrHostXVLogXErrorEvent): add this to log X error events. Heavily copied from libx11 (ephyrHostXVErrorHandler): new x error handler that logs the error but does not exits. (ephyrHostXVInit): add this to be called at the beginning of xvideo lifetime. It sets an xerror handler that does not exit. * hw/kdrive/ephyr/ephyrvideo.c: (ephyrXVPrivIsAttrValueValid): this validates an attribute value. (ephyrSetPortAttribute): before setting an attribute, validate the new value so that we don't send a buggy request to host X. * hw/kdrive/ephyr/*.c: fix case in ephyrvideo code. * hw/kdrive/ephyr/ephyr.c: fix a typo commit 207714b60d18e94bbe2d755a431dbb29fe5677f7 Author: Dodji Seketeli <dodji@openedhand.com> Date: Fri Aug 3 01:10:39 2007 +0200 first implementation of putimage * hw/kdrive/ephyr/ephyrhostvideo.c,h: (EphyrHostXVPutImage): first implementation. does not support clipping regions yet. * hw/kdrive/ephyr/ephyrvideo.c: (DoSimpleClip): clip using a clipping box. Does not support regions yet. (EphyrPutImage): first implementation. Uses a simple clipping rectangle, no region yet. * hw/kdrive/ephyr/hostx.c: (hostx_get_window): added this to get the main window of the host x. commit aa478e09e25a1cb19b808e7e52b2ee155e34f03b Author: Dodji Seketeli <dodji@openedhand.com> Date: Thu Aug 2 12:49:36 2007 +0200 make properties setting/query code work and hopefully complete. * hw/kdrive/ephyr/ephyrhostvideo.c,h: (EphyrHostXVQueryImageAttributes): add this call. It calls XvQueryBestSize xserver entry point. It uses the protocol level machinery because Xvlib does not expose that entry point as a C function. (EphyrHostXVQueryBestSize): added this wrapper around XvQueryBestSize(). (EphyrHostGetAtom, EphyrHostGetAtomName): added this to get an atom or atom name from the host server * hw/kdrive/ephyr/ephyrvideo.c: (EphyrSetPortAttribute): convert the atom into an host server server atom before attacking the host server with it, because in in its current form, the input atom is only valid in xephyr. This fix makes this call work. (EphyrGetPortAttribute): ditto. (EphyrQueryBestSize): implement this. (EphyrQueryImageAttributes): implement this. commit 24c837c0be6f85a917582156ab61d6c9c69301f9 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Jul 31 23:18:52 2007 +0200 implement setportattribute and getportattribute calls commit b8cd313be467fd14b8e5c9ba68e1a2029c1e888b Author: Dodji Seketeli <dodji@seketeli.org> Date: Mon Jul 23 12:43:43 2007 +0200 make xvinfo work * hw/kdrive/ephyr/ephyrhostvideo.c: (EphyrHostXVAdaptorGetVideoFormats): properly get visual class instead of returning the visual id. (EphyrHostXVQueryEncodings): properly copy the fields because simple casting does truncate some fields. (EphyrHostAttributesDelete): XFree the whole array instead of trying to free invidial members. * hw/kdrive/ephyr/ephyrvideo.c: (ephyrInitVideo): fix a typo (EphyrXVPrivQueryHostAdaptors): set XvWindowMask mask to adaptors type. use host adaptor name. Don't forget to set nImages field. (EphyrXVPrivRegisterAdaptors): report an error when KdXVScreenInit() fails. commit aa2fae7b75f741e57bc4a9b754b5ea7518d78f47 Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 23:56:13 2007 +0200 misc fixes. *(EphyrHostXVQueryAdaptors): return the queried adaptors list * (EphyrHostXVQueryPortAttributes): return port attributes number commit 2bf7f3c223fd32cd4922f98eadda2e3f06d9e119 Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 17:55:12 2007 +0200 link and init xv commit 66b28532e533ff5688705c5286425e68d6403cee Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 12:08:39 2007 +0200 initial commit of xv support work commit 1e8f8b36a56a884092ee01a0bb3f40436e30fa42 Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 18:22:20 2007 +0200 works with no adaptors Debug the early code to make work when the host has no video adaptors commit 50ff2377cac50ae25218be5b30612fb8bf6046a6 Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 18:20:59 2007 +0200 add -verbosity <level> option to command line commit 8426eb2433f964ea19848f24dc99eb4588d10d1a Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 17:55:12 2007 +0200 link and init xv commit 50a64c84e1556ef7f8efcc7f8655e0c5e023ef4d Author: Dodji Seketeli <dodji@seketeli.org> Date: Sat Jul 21 12:08:39 2007 +0200 initial commit of xv support work commit 95fadbd4022ec99f42ba78ec8a18a064903e8a7f Author: Dodji Seketeli <dodji@seketeli.org> Date: Mon Jul 16 17:37:21 2007 +0200 Add basic Exa driver entry point validation. In exaDriverInit(), quickly check if the programmer forgot to set some mandadory driver hooks, in that case display a meaningful error message. commit e5e6514ffa0fd132e0cc1b15b94119e6e8755f43 Author: Andrew Christan <andrew.christian@nokia.com> Date: Tue Oct 2 13:25:51 2007 +0200 Xephyr: add "multiscreen" suport * This patch adds multiscreen support to Xephyr. For instance, the command line : "Xephyr :4 -ac -screen 320x240 -screen 640x480" will launch with two "screens" - namely two main windows. The first main window represents a screen that has the number :4.0, with a geometry of 320x240 pixels, and the second one represents a screen that has the number :4.1 with a geometry of 640x480. The command line: "DISPLAY=:4.1 xclock" will launch the xclock program on the second screen, for intance. * this patch was edited by Dodji Seketeli <dodji@openedhand.com> for: - better style compliance with the rest of the Xephyr code - make sure Xephyr could be launched with no -screen option. By default that creates a default screen of 640x480 pixel like before - display full titles on the windows - with insctructions to grab keyboard and mouse - like before. commit 81692b628f41cb64329f3cccc0503fb216a2b8e3 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Oct 2 13:11:28 2007 +0200 Fix #12650: "windows not receiving mouse events in multiple screens context" * dix/events.c, include/dix.h: (UpdateSpriteForScreen): added this to update the mouse sprite context when we switch from a pScreen to another. * mi/mipointer.c: (miPointerWarpCursor): as we are switching to a new pScreen, don't forget to update the mouse sprite context. commit f965a5f3454a95ddffb2faf9b291feff46305adf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 2 16:20:27 2007 +0930 dix: Ignore devices when deleting passive core grabs. commit dc90d500085dd74e90073be008fc514bd97b160a Author: Dave Airlie <airlied@redhat.com> Date: Tue Oct 2 14:05:07 2007 +1000 exa: increase minor version number for pixmap allocation hooks commit f15af2ae60bb8503c336bc3cba0560bd314a34bc Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Aug 3 16:33:33 2007 +1000 exa: only setup offscreen allocator if driver doesn't provide CreatePixmap commit ffb58f4fa8d86e87f831430b8627f27d85f971a9 Author: Dave Airlie <airlied@redhat.com> Date: Tue Oct 2 14:03:39 2007 +1000 exa: add hooks for drivers to take over pixmap allocation This adds hooks for the driver to access Create/DestroyPixmap and ModifyPixmapHe ader. It allocates a 0 sized pixmap using fb and calls the driver routine to do work of allocating the actual memory. ModifyPixmapHeader is mainly required for hooking the screen pixmap which isn't create by normal methods commit 2b075e97ec913ebe19290181e36bb169410b820b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 2 13:28:40 2007 +0930 mi: switch core keyboard on XI events, not only on core events. We only get core events through the EQ in exceptional cases, so make sure we actually swap the core keymap for XI events as well. Gives us back the ability to have multiple keyboard layouts simultaneously. commit 31555af0005a0bc4d7ef785214696ac84681e29f Author: Dave Airlie <airlied@redhat.com> Date: Tue Oct 2 13:32:57 2007 +1000 exa: add a pixmap private pointer for drivers to retrieve. commit 45ec6cd1fb242363c91ad8af1fd4a27a7f02621a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 2 13:19:07 2007 +0930 xfree86: fix DGA to use the correct devices. DGAStealXXXEvent modified to take in device argument. The evdev driver only sends one valuator when only one axis changed. We need to check for DGA either way (xf86PostMotionEventP), otherwise we lose purely horizontal/vertical movements. Note that DGA does not do XI events. commit 122ae65ed90195c584a770027b4d14ef65f72492 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 2 10:50:59 2007 +0930 xfree86: xf86DGA: some cleanup to use the correct devices instead of VCP/VCK. commit 54ce7436b2579bb20728eab7c8d460b531c378af Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Oct 2 10:49:46 2007 +0930 xfree86: update all pointers when calling xf86SwitchMode Center the frame around the first pointer found and then update all pointers on the same screen to move to the edges (if necessary). Note: xf86WarpCursor needs to be modified, is using deprecated miPointerWarpCursor and will kill the server when called with inputInfo.pointer. commit 113011221a4fcbd70bc592930b35f20d55809f1e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Oct 1 21:42:01 2007 +0930 Xi, xfree86: Remove leftovers of the XI wrapper code. commit 50551ec693f40b91652fe4814e9fe2e1f9ab6517 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 28 15:04:33 2007 -0400 xace: remove obsoleted DRAWABLE_ACCESS hook. commit 8b548657204000e18c7a38706a0071ae2f93159f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 28 13:34:18 2007 -0400 xace: add hooks + new access codes: XKB extension. Removes "LookupKeyboardDevice" and "LookupPointerDevice" in favor of inputInfo.keyboard and inputInfo.pointer, respectively; all use cases are non-XI compliant anyway. commit 5c03d131815cfe2f78792277ab8352e69e830196 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 28 08:02:00 2007 -0400 xace: add new hooks + access controls: XInput extension. Introduces new dix API to lookup a device, dixLookupDevice(), which replaces LookupDeviceIntRec and LookupDevice. commit a511c445debbd13e8c48146ecd2d7c97e793f788 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Sep 28 18:46:41 2007 +0930 Remove generation of core events, long live XI! Let the drivers only generate XI events and put those into the event queue. When processing events, generate core events as needed. This fixes a number of problems with XKB and the DIX in general. The previous approach was to put core events and XI events as separate events into the event queue. When being processed, the server had no knowledge of them coming from the same device state change. Anything that would then change the state of the device accordingly was in danger of changing it twice, leading to some funny (i.e. not funny at all) results. Emulating core events while processing XI events fixes this, there is only one path that actually changes the device state now. Although we have to be careful when replaying events from synced devices, otherwise we may lose events. Note: XI has precedence over core for passive grabs, but core events are delivered to the client first. This removes the wrapping added in 340911d7243a7f1095d79b5b2dcfa81b145c2474 commit be466d8df808c4e4067a7963617bc3f506768f2d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 22:23:05 2007 +0930 dix: GetPairedKeyboard() always returns a valid keyboard (VCK if necessary). We need it unconditionally in a few places, and the rest checked for NULL and then set it to VCK anyway. So, fixing up all callers to appreciate the defined return value. commit 53434edc3d306137d019d95189ecdf0dbff75205 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 22:14:09 2007 +0930 dix: take paired keyboard instead of VCK (CoreProcessPointerEvents) commit 2d93e69690d2c5d4a89a795ede6423796528e5df Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Sep 27 16:47:06 2007 -0700 Rework local client id finding code to be more uniform commit c7ead3a68e5839cb92129e35b21f55007fba8445 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Sep 27 16:13:28 2007 -0700 xorgcfg needs $(DIX_CFLAGS) for pixman-1 include path commit 62a9fb4cda988a896909a5620a68c51e46d0e403 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Sep 27 16:12:29 2007 -0700 Fix PCI rework build on Solaris (copy what BSD does) commit cfe549d1ba28396c44af94133d8c1d323e3c7086 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Thu Sep 27 22:36:52 2007 +0200 EXA: Added back the maxPitchPixels initialization code. This doesn't add real value yet, but it will be useful once I add code that splits large render operations into smaller parts if necessary. commit c11a27ef85674f1e77ffa7f083646b848e1dc0b8 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Sep 27 14:54:40 2007 +0100 Add the FB_ACCESS_WRAPPER checks commit e0bb33b3d2e4f54cf20853cde9a1664a7dbd0dc7 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Thu Sep 27 14:50:28 2007 +0100 Fix bug #12286 commit 6d5c1e0d896666bcb2b3c1de7bfa424f140be364 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:04:41 2007 +0200 EXA: Remove bogus pitch checks. exaCreatePixmap should handle all cases correctly. commit 598698678b07cb3a9406a9ee98bd3186366949e7 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:07:09 2007 +0200 EXA: Punt for all fallbacks in exaFillRegion*. Now that PaintWindow is gone, all callers already handle fallbacks. commit 006f6525057970a74382132237b2131286ad147c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:08:41 2007 +0200 EXA: Make sure tile offsets passed to drivers are never negative. Thanks to Björn Steinbrink for pointing out the problem on IRC. commit da7d9aa1fb60e13a59c9f842fed7aefc5b97c195 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:08:40 2007 +0200 EXA: Tile offscreen pixmap coordinate offsets are always 0. commit d6f4764bf5f3a601a0034ded039857e8ea5563b2 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:08:40 2007 +0200 EXA: Remove some clearly bogus code from exaCopyNtoN. Not sure what I was thinking when I wrote this... it would cause the box coordinates to be off for exaCopyNtoNTwoDir or fallbacks. Thanks to Tilman Sauerbeck for pointing out the problem on IRC and testing the fix. commit c7d6d1f589d729fa689d22d82fe30afbc6e1cacb Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 27 13:08:40 2007 +0200 EXA: Punt on fallback case not handled correctly in exaFillRegionTiled. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=12520 . commit 1d938a80fd4fa58d1791c146b6b5c2dfe148dce7 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Sep 26 19:42:46 2007 -0700 Remove unused pciAddrHostToBus functions from ix86Pci.c Matches linuxPci.c changes made in 8279444a54f38c5e2e5d4c2d936a10d74990e0be Fixes compiler errors: "ix86Pci.c", line 194: too many struct/union initializers "ix86Pci.c", line 204: too many struct/union initializers "ix86Pci.c", line 214: too many struct/union initializers commit de06a47d4ad9c845b098438d9492a5f42483a2ad Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 11:45:03 2007 +0930 dix: GetMaximumEventsNum() needs to return 3 + MAX_VALUATOR_EVENTS. Raw events can be generated for pointer events, so 2 + MVE isn't enough. commit 32d0440c7f6e604807cb14dd32349df6f22c903b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 27 11:44:03 2007 +0930 xkb: xkbHandleActions: let wrapping take care of event delivery. This is hopefully better than hardcodey calling CoreProcessPointerEvent. commit 27612748e0ec20f3a23839f0a12e39f598dd722c Merge: b61461425 3b114f260 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 26 07:47:29 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: dix/devices.c commit 3b114f2603fc2adeec7f5f8f20fe4870afb8dff1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 25 07:55:17 2007 -0400 Input: Properly swap DevicePresenceNotify events. commit 31a7994ac7365562ef1d00e0a7b25f967a961a4e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Sep 24 13:33:01 2007 -0400 Input: Return errors to the dispatcher instead of sending them ourself. Also fixed two "unused variable: stuff" warnings. commit 56ffc381d32687242dd094395fcf2216339bab2a Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Wed Sep 26 16:47:54 2007 +0200 EXA: Removed duplicated exaGetDrawablePixmap() calls. commit aa0325db7e8ab11d9418cae14f11c488f443ccaa Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 26 15:26:42 2007 +0200 Xephyr: fix compiler warnings * hw/kdrive/ephyr/ephyr_draw.c: (ephyrDownloadFromScreen), (ephyrUploadToScreen): fix compiler warnings commit 8f9bf927e1beecf9b9ec8877131ec12c765e4d84 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 18:04:59 2007 +0930 xkb: Unwrap properly in ProcessPointerEvent. Instead of hardcoding CoreProcessPointerEvent, actually try to unwrap properly and then call the unwrapped processInputProc. Seems to be a better idea, especially since it makes stuff actually work... commit 3342b5ad47be25c6838321c0aafc28c329c308b5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 18:03:21 2007 +0930 Xi: fix the wrapper code for processInputProc wrapping. Followup to [1]. If a core grab causes the device to freeze, it overwrites the processInputProc of the device. [1] would then overwrite this while unwrapping, the device does not thaw anymore. Changing this to only re-wrap if the processInputProc hasn't been changed during the event handling. [1] 340911d7243a7f1095d79b5b2dcfa81b145c2474 commit e2cb8515661b1f7826981931d82dee6e05529f04 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 18:01:17 2007 +0930 xfree86: pass in the XKB event processing proc instead of the XI one. We need to pass ProcessPointerEvent or ProcessKeyboardEvent to XkbSetExtension, otherwise we lose the xkb layer. commit 27bc1a8fef2bfd3d62fb44f7c7eb0d463ed08632 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:24:41 2007 +0930 xkb: XkbFilterEvents: Remove unused variable compiler warning. commit bfc89c035542a10594f5f0cbde1c7e28b7d024a7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:23:37 2007 +0930 xkb: unify ErrorFs. Prefix all with [xkb]. Output for XkbUseMsg intentionally skipped. commit 8b508f5d6bd0d3995294d5ff300a856754442999 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:19:53 2007 +0930 dix: unify ErrorFs. prepend all with [dix]. commit 394f3c1dbee7270a1d930846d49278424c3072d4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:19:37 2007 +0930 dix: GetPointerEvents: remove unused variable compiler warning. commit 55fd50273ea67eb99a0c8a830349851931298387 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:15:34 2007 +0930 Xi: unify ErrorFs. Prefix all with [Xi]. commit 340911d7243a7f1095d79b5b2dcfa81b145c2474 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 15:12:49 2007 +0930 Wrap core event handling through ProcessOtherEvents. When processing events from the EQ, _always_ call the processInputProc of the matching device. For XI devices, this proc is wrapped in three layers. Core event handling is wrapped by XI event handling, which is wrapped by XKB. A core event now passes through XKB -> XI -> DIX. This gets rid of a sync'd grab problem: with the previous code, core events did disappear during a sync'd device grab on account of mieqProcessInputEvents calling the processInputProc of the VCP/VCK instead of the actual device. This lead to the event being processed as normal instead of being enqueued for later replaying. commit b2a4883bd89d406713d4f808e72721ecc1456d67 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 26 09:20:11 2007 +0930 dix: add comments to PlayReleasedEvents() Also stick another warning in, more changes needed for XGE if panoramix is active. commit 275dc77c2972147407584323b866b8acc1654ea0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Sep 25 21:40:08 2007 +0930 dix: add comments to ComputeFreezes() and syncEvents struct. commit ae8b4f7dcf1291a2f5a0d0159f3e6089eea0578a Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Sep 24 22:06:52 2007 +0200 EXA: Added pitch limitations. Drivers can now specify the max pitches that the accelerator supports. commit b61461425eb15fcff2a58330d74fe5a5a1f226fc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 25 09:56:00 2007 -0400 xace: add hooks + new access codes: XV extension. May need to revisit this extension in the future, depending on observed use. commit 9bd04055a2175ec16756d3bf73ae03b5e163a28a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 25 09:33:51 2007 -0400 xace: change prototype of VALIDATE_DRAWABLE_AND_GC macro to allow access mode to be passed to dixLookupDrawable. commit 988f446fe00ac2b92c484a4440613dd82191eadd Author: Eric Anholt <eric@anholt.net> Date: Mon Sep 24 20:23:35 2007 -0700 [EDID] Ignore reserved bits in deciding monitor vs detailed timing descriptor. Even though they're defined to zero by the spec, we've seen an EDID block where the (empty) ASCII strings were stuffed in a byte early, leading to the descriptor being considered a detailed timing instead. commit 5d9f6cf51becdeb1d2be9bdeec4bb5d0c4dd0e8b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 13 23:33:07 2007 +0930 dix: cosmetic change. Remove "pointer" variable, might as well use pDev. commit c4db4d1fcf7fa2ba802a208beee6b3adc83921f5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 13 23:27:07 2007 +0930 include: remove register keywords. commit 1c25c46f3d5f98be8dbf36684aad4302b220e163 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 13 23:22:27 2007 +0930 dix: fix compiler warnings about unused variables. commit 68e0c4988e359e3c9da933946bc703cf8530bdbc Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 20:48:48 2007 +0930 dix: fix "possible use of uninitialized variable" warning. The device passed through to UnrealizeCursor isn't used anyway, so setting it to NULL is enough. commit b484451eab261a919fe94c0c0f56877f7571fc9e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 18:34:51 2007 +0930 dix: don't try to access "time" field for GenericEvents in PlayReleasedEvent. GenericEvents can't be parsed to keyButtonPointer, and there's no guarantee that it has a time field anyway. PlayReleasedEvent needs to store the millis when we know it (core events, XI event) and just re-use them for GenericEvents. Yes, this is a hack. But it looks like the time has zero significance anyway. commit 1c38eac442a3ab9e8469e944f382251957996c5a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 18:09:57 2007 +0930 dix: fix comment for DeliverDeviceEvents. DDE is not always called, grabbed or focused devices go through Deliver{Grabbed|Focus}Event first. Thanks to Eamon Walsh for spotting it. commit 06188ce90d2a8146140773f9367f23404b464282 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 18:00:03 2007 +0930 dix: Make EnqueueEvent aware of GenericEvents. GenericEvents can be > sizeof(xEvents), so we need to make sure we're allocating and copying enough memory for the event. commit 8840829ab93c4eb62eb58753c015da5307133fe5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 12 17:40:11 2007 +0930 dix: don't compress motion events from different devices (EventEnqueue) commit 27ad5d74c20f01516a1bff73be283f8982fcf0fe Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Sep 23 17:17:03 2007 +0300 Input: Generate XKB mapping changes for all core-sending devices (bug #12523) When we change the mapping on a core device, make sure we propagate this through to XKB for all extended devices as well. commit 0e800ca4651a947ccef239e6fe7bf64aab92257c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Sep 23 12:43:31 2007 +0300 GetKeyboardEvents: Reject out-of-range keycodes (bug #12528) We can only deal with keycodes between 8 and 255, so make sure that we never accept anything out of this range. commit e1860f241b7322c54c109cf5727df45b54b73916 Author: Alex Deucher <alex@botch2.(none)> Date: Sat Sep 22 17:54:51 2007 -0400 Document xf86_crtc_clip_video_helper better. commit 19d30c1c771c0f5c9dfc0f4cfb084dd2e528d992 Author: Alex Deucher <alex@botch2.(none)> Date: Sat Sep 22 17:51:27 2007 -0400 Revert "Fix possible crash if Xv window is outside of either crtc" This reverts commit 92355314103d2193ca20786915eaf608922a36dc. This changes ABI. False means there was a memory failure of some kind, not that the video shouldn't be displayed commit 92355314103d2193ca20786915eaf608922a36dc Author: Michel Dänzer <daenzer@debian.org> Date: Sat Sep 22 14:25:02 2007 -0400 Fix possible crash if Xv window is outside of either crtc commit edd88170836ec985ab1a59179de69d50644b8dff Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Sat Sep 22 13:02:08 2007 +0200 EXA: Check ABI compatibility earlier. If the driver isn't compatible to the server, all bets are off anyway wrt the contents of the fields that we're validating, which can lead to bogus error messages. commit abe0a51f3f790f8c055289465e130177c4b647cc Author: Ben Byer <bbyer@bbyer.apple.com> Date: Fri Sep 21 17:07:36 2007 -0700 So, like, checking return codes of system calls (signal, etc) is good. Also, only restore an old signal handler if one was actually set (prevents the server from dying on OS X). commit eb82b19aa71333b46e927516cc228f25d3e05e4d Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Sep 20 19:55:48 2007 -0700 XDarwin: build fix for X11.app commit 5b08932bfbb7e4612733fffd2acc9682c6856d90 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Sep 20 19:27:31 2007 -0700 XDarwin: pulling in Indirect GLX fixes from downstream commit 742d5d6adc4d4a1b6fceeb3443d7931e107462f7 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Sep 20 18:03:51 2007 -0700 XDarwin: Fixes to quartzKeyboard.c to prevent a crash using certain non-US keyboards commit 374bd88d1025835fe36ca0ff6620eb1d3b0a06b0 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Sep 20 16:50:49 2007 -0700 XDarwin: Merging misc changes from downstream. The only functional changes in this patch are a removal of use of Xtrans internals -- replaced by xcb, which doesn't seem to be used elsewhere in the server? Pity. Also, a fix to make all X11 windows pop to the front of the display when the X11.app icon is clicked -- currently takes two clicks, not sure why. commit 3a965fdadccea7beff09a28c9c0ef4b4975eae38 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Sep 20 16:22:24 2007 -0700 Don't segfault on shutdown if we never managed to connect to dbus. commit 50fa8722d35c12e5f0322cebe25faf99c39d4f50 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Sep 20 14:00:33 2007 -0700 Set noCompositeExtension to TRUE when failing to initialize the extension (e.g. when Xinerama is enabled). commit a247886b082cea93fa8f8980616a9c388ba70111 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 20 13:06:38 2007 -0400 xace: add hooks + new access codes: XF86-Bigfont extension commit f6532a81eec5f096e27285687964b77c17987f72 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 20 12:17:17 2007 -0400 xace: add hooks + new access codes: APPGROUP extension commit 82f7195a628cc7ec94abc0cfe5bae2be8af443bc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 20 09:17:09 2007 -0400 xace: modifications to ChangeWindowAttributes special case: separate Receive and SetAttr. Refer to 963e69b8efc39369915e7f0c6f370ac0d5d2b60f commit 661b1328cf992d8855552677a94d60de1d8ce942 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 20 08:41:26 2007 -0400 xace: add hooks + new access codes: SYNC extension May need to revisit this extension in the future, depending on observed use. commit 90bacdef723e1e49c72775144916750758d3568c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 20 06:53:51 2007 -0400 xace: add hooks + new access codes: MIT-SHM extension commit 12a18cc8903fac53c3c77b23dd8093187594a4f3 Author: David Nolden <david.nolden.git@art-master.de> Date: Fri Sep 14 22:42:19 2007 +0200 compilation-fix in debug mode commit e93cff52fed9074aa007c2e6ec6b578f69aef3cb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 19 14:48:20 2007 -0400 xace: add hooks + new access codes: DOUBLE-BUFFER extension commit 082c0f7fb34458ebb303cf875d1d75686eca25e6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 19 13:59:35 2007 -0400 devPrivates rework: move devPrivates field in drawable structure types to just below the DrawableRec. Wish there were a better way to do this but it has to be in the same place for all drawable types. commit 5b36b64192517e2470766ce7ff1d4dc04c936fad Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 19 11:11:54 2007 -0400 xace: add missing argument to hook call. commit 963e69b8efc39369915e7f0c6f370ac0d5d2b60f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 19 11:11:41 2007 -0400 xace: add special-case for just setting the event mask on a window, this should only check "receive" permission, not "setattr" permission. commit c140d20f4ade973496dcbbd06453402ef0c0e85c Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 19 05:58:22 2007 -0700 XDarwin: mass change from using xorg-config.h to dix-config.h cuz we're not using the X.org ddx anymore commit bcb5e3e6276ce9ae7a4dae7434cf2247764da078 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 19 04:46:10 2007 -0700 XDARWIN: More fixes to Makefile.am At least on my system (10.5 with the latest and greatest modules), Xquartz now builds out of the box. It doesn't quite work yet, but hey -- you have to start somewhere. ;) commit 97c150b61bbe436453b05d3c07cd2173870aac40 Merge: 57907e094 547ad2125 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 19 07:25:55 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: afb/afbpntwin.c afb/afbscrinit.c afb/afbwindow.c cfb/cfb.h cfb/cfballpriv.c cfb/cfbscrinit.c cfb/cfbwindow.c configure.ac fb/wfbrename.h hw/xfree86/xf4bpp/ppcIO.c hw/xfree86/xf4bpp/ppcPntWin.c hw/xfree86/xf4bpp/ppcWindow.c hw/xfree86/xf8_32bpp/cfbscrinit.c mfb/mfb.h mfb/mfbpntwin.c mfb/mfbscrinit.c mfb/mfbwindow.c mi/miexpose.c Note: conflicts caused by devPrivates rework vs. paintwindow changes. commit 5e209b21f3d6b3268fa7dab1e8df892d8352cc08 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 19 03:44:46 2007 -0700 XNEST: removed obsolete hack to build under Darwin commit 378c7ebef444cdc9ae62ebf05c7111088a0c4bc1 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 19 03:43:40 2007 -0700 XVFB: Removed obsolete hack to build on Darwin commit 7813392d1c9a38d01cfff17732278bb7798eee5d Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 19 01:52:58 2007 -0700 XDarwin: changes to Makefile.am to use new conditionals commit 170fc77d9e73151f5c1c1f0f04598b3497db4284 Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 19 09:54:09 2007 +0200 xserver: don't force DTRACE detection by default this fixes a breakage caused by 7a4ec34e256bf36b041c011a083916ad75a1d8bc. When running a non DTRACE aware system that is not darwin*, DTRACE was getting required. Now it is not anymore. commit 9b4f5157179a0d20756c16ea1f5130b171f72bb1 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Tue Sep 18 21:40:32 2007 -0700 XDarwin: We build many many different targets, let's break them out into autoconf conditionals commit 7a4ec34e256bf36b041c011a083916ad75a1d8bc Author: Ben Byer <bbyer@bbyer.apple.com> Date: Tue Sep 18 20:37:09 2007 -0700 XDarwin: Disable dtrace support on Darwin 9 (since it doesn't work ... yet ...) commit 3c19ec47b434d4ca84db58363cc053cc0b6aa413 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Tue Sep 18 20:15:44 2007 -0700 XDarwin: changed XF86BigFont support default from yes to auto so XDarwin can disable it commit 547ad2125ece93bbe01f6d09a3baf176ebd16bb3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Sep 17 20:33:56 2007 +0200 EXA: Make sure driver hooks get correct offscreen offsets from exaCopyDirty. This should ensure the driver UploadTo/DownloadFromScreen hooks can always work as intended. commit 56cc24ffb21f7fd41f9ea9e8f969aa85021b9f53 Author: Alan Hourihane <alanh@tungstengraphics.com> Date: Mon Sep 17 20:33:56 2007 +0200 EXA: Don't crash in ExaCheckPolyArc. See https://bugs.freedesktop.org/show_bug.cgi?id=12286 . commit 7ac89060e02c7a803018afd580720f8326561fd8 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Sep 17 20:33:55 2007 +0200 EXA: Don't crash in exaGetImage when swapped out. commit 3876c6c80534a6f7412ec806a2ba9ada22c5e505 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Sep 17 18:47:45 2007 +0200 EXA: Fixed compiler warnings. commit d5738ff2e0f93df4729c075ce31a1041d580e50e Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Sep 17 16:59:03 2007 +0200 EXA: Added missing exaPrepare/FinishAccess calls in ExaCheckPushPixels. commit a0dafd95e1e13a2f1b77ab9f82fd365a7be19de5 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Sep 17 16:45:20 2007 +0200 Removed hw/xwin/winpntwin.c from Makefile.am. winpntwin.c was removed in e4d11e58ce349dfe6af2f73ff341317f9b39684c. commit 7bd65577018a574970b767b67967b65fcd5c2bf0 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Sat Sep 15 14:01:57 2007 +0200 Initialize output->pendingProperties. commit b9f7aeb20015290a8acf938a11bf9272bf3527cf Merge: e4d11e58c 06d27f804 Author: Eric Anholt <eric@anholt.net> Date: Thu Sep 13 00:15:45 2007 +0000 Merge remote branch 'origin/master' into paint-window Conflicts: mi/miexpose.c commit e4d11e58ce349dfe6af2f73ff341317f9b39684c Author: Eric Anholt <eric@anholt.net> Date: Wed Sep 12 13:58:46 2007 +0000 Remove the PaintWindow optimization. This was an attempt to avoid scratch gc creation and validation for paintwin because that was expensive. This is not the case in current servers, and the danger of failure to implement it correctly (as seen in all previous implementations) is high enough to justify removing it. No performance difference detected with x11perf -create -move -resize -circulate on Xvfb. Leave the screen hooks for PaintWindow* in for now to avoid ABI change. commit 06d27f8045966c1fb154eafaff308a01b93f265b Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Sep 12 23:57:30 2007 +0100 Try again to fix drawable and tile offsets in miPaintWindow Many coordinate spaces are hard. Let's go drinking. commit dd3992eb86377684a5dbe86fa19c756a9e53cda2 Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Sep 12 22:39:31 2007 +0100 miPaintWindow draw to window for background. Instead of drawing to window pixmap for everything, draw to window for background as that works for Xnest and Xdmx; draw to pixmap for borders which neither of those X servers use. commit 6da39c67905500ab2db00a45cda4a9f756cdde96 Author: Eric Anholt <eric@anholt.net> Date: Wed Sep 12 13:23:13 2007 +0000 Fix build on FreeBSD after Popen changes. commit 257c8ed17f4f908e0d0d5e53aaf13aa3b1313f50 Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Sep 12 12:11:49 2007 +0100 Rewrite miPaintWindow to draw to window pixmap. miPaintWindow was drawing to the root window, or (sometimes) drawing to the window after smashing the window clip list. This is losing, and easily fixed by just drawing to the window pixmap. commit 43dc41034735d84765233a78bd619f3f0e7ace75 Author: Brice Goglin <bgoglin@debian.org> Date: Wed Sep 12 01:43:37 2007 +0200 Replace a non-ascii char with the corresponding groff escape in exa.man.pre commit a5b8053606d6e786cdcf6734f271acc05f9cc588 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Sep 11 11:37:06 2007 -0400 Ignore - not just block - SIGALRM around Popen()/Pclose(). Because our "popen" implementation uses stdio, and because nobody's stdio library is capable of surviving signals, we need to make absolutely sure that we hide the SIGALRM from the smart scheduler. Otherwise, when you open a menu in openoffice, and it recompiles XKB to deal with the accelerators, and you popen xkbcomp because we suck, then the scheduler will tell you you're taking forever doing something stupid, and the wait() code will get confused, and input will hang and your CPU usage slams to 100%. Down, not across. commit 2e3e08d31e908ceadeef16d6069cdaf8c61d7ed1 Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 11 08:50:41 2007 +0200 xserver: test presence of strlcpy in configure * configure.ac: define HAVE_STRLCPY when function strlcat is present this serves at least to unbreak libxtrans code compilation. commit e8c73ac697aa472e10b4d8c093a715df0bf545af Author: Dodji Seketeli <dodji@openedhand.com> Date: Tue Sep 11 00:20:45 2007 +0200 Xephyr: fix compilation breakage. * hw/kdrive/ephyr/ephyr_draw.c: (exaDDXDriverInit): pExaScr->hideOffscreenPixmapData does not exist anymore, so don't set it. commit 321e0a21600e418bbeb164043a9a21a0ff80cbe9 Author: Ben Byer <bbyer@bbyer.local> Date: Sun Sep 9 16:28:41 2007 -0700 fixed cut-and-paste typo commit 0ff273fd1e2ea7242b3e6c5effb2a623ef32ec6f Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Sep 6 18:52:26 2007 -0700 XDARWIN: fixes to make Xquartz build again commit f8637137ab43818d45d249b337820cbf427a05ec Author: Ben Byer <bbyer@bbyer.local> Date: Thu Sep 6 05:39:57 2007 -0700 XDARWIN: build fix for quartz/pseudoramiX.c commit e8093e15c7df7a3d5a9717bc9d7d7517b0743f29 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Sep 3 13:52:29 2007 +0200 EXA: Exclude bits that will be overwritten from migration in exaCopyNtoN. Also plug a region leak in exaPolyFillRect. commit e81af8ba643df3be53b0a46d9d4a0eaf21557c9e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Sep 3 13:14:29 2007 +0200 EXA: exaFillRegion{Solid,Tiled} improvements. Use region to exclude bits that will be overwritten from migration. Also make exaFillRegionSolid use the same logic as exaFillRegionTiled. commit 5f7da4da8de7449e1c2a4c679632a0b2a5858b7e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 31 16:59:28 2007 +0200 EXA: Use exaShmPutImage for pushing glyphs to scratch pixmap in exaGlyphs. commit be922b30486abce3a8c13996d579b211a7b56f0e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:59:07 2007 +0200 EXA: exa(Shm)PutImage improvements. Improve exaShmPutImage performance and reuse its core in exaPutImage as it seems faster than the previous code when the driver doesn't provide an UploadToScreen hook. Make sure all damage records are notified of the damage incurred by actual ShmPutImage calls. Remove superfluous manual damage tracking for actual PutImage calls. commit ea92ea415665e294a1ba233e9a1d39b6daa0cee1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:54:18 2007 +0200 EXA: exaGetImage improvements. Use the new migration infrastructure to cache FB bits we need in the system copy, for the benefit of repeated calls. commit aa2ed73e0ec881947c969b67269e3206da4de359 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:50:42 2007 +0200 EXA: Remove superfluous manual damage tracking. These should all be covered by damage wrappers. commit a634c9b03494ba80aeec28be19662ac96657cc23 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:48:03 2007 +0200 EXA: RENDER improvements. Exclude bits that will be overwritten from migration. Use exaGlyphs even when Composite can't be accelerated, to avoid PolyFillRect roundtrip via offscreen memory. Initialize mask pixmap in exaGlyphs in FB in addition to system if the driver provides Composite hooks to avoid migration overhead. Remove manual damage tracking where superfluous. commit 1f457ff3db24178eefecfbbf177aaf6554adb204 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:44:20 2007 +0200 EXA: Improvements for 1x1 pixmaps. Initialize system and FB copy in exaFillRegionSolid and adapt exaGetPixmapFirstPixel to the new migration infrastructure. This should mostly eliminate migration overhead for these, whether they are used for acceleration or fallbacks. commit 489bc7551ffc7360ba9648ca5c98b59c7e7a1fd1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:37:53 2007 +0200 EXA: exaImageGlyphBlt improvements. As we can't actually accelerate anything interesting here, just migrate out once and call fbSolidBoxClipped instead of taking a round trip via offscreen memory with exaSolidBoxClipped. Reuse pending damage region for extents and to prevent any actual migration of pixmap contents when we're overwriting the whole pending damage region. Remove superfluous manual damage tracking. commit 2e0895a4ba27c1308713022820444c8f57f7a69f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Aug 30 13:30:03 2007 +0200 EXA: Improvements for trapezoids and triangles. Only migrate once in exaTrapezoids/Triangles instead of every time in exaRasterizeTrapezoid/AddTriangles. Adapt manual damage tracking to new infrastructure. Also move definition of NeedsComponent() closer to where it's used. commit 6c9d7ed61bc4a19d21c53717b8af3d90b5d82ca9 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Sep 6 13:10:16 2007 +0200 EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible. We finally want to catch all cases where the pixmap pointer is dereferenced outside of exaPrepare/FinishAccess. Also fix a couple of such cases exposed by this change. commit 962eddd7a2863a8475f5fd8107d3112df08d1172 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 29 19:55:22 2007 +0200 EXA: Support partial migration of pixmap contents between Sys and FB. The initiator of migration can pass in a region that defines the relevant area of each source pixmap or the irrelevant area of the destination pixmap. By default, the pending damage region is assumed relevant for the destination pixmap, and everything for source pixmaps. Thanks to Jarno Manninen for reassuring me that my own ideas for this were feasible and for providing additional ideas. commit f27931bdd26fc9a1e6bb5173b5537e32c51a98b3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 29 19:41:52 2007 +0200 Add DamagePendingRegion. DamagePendingRegion returns a pointer to the region of a drawable that will be damaged by the current operation for damage records that chose to get damage reported only at the end of the operation. commit 5c7ee3f47fa0c067102a17dee3f75a51cc0bdb3a Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 19:24:18 2007 +0200 EXA: Track valid bits in Sys and FB separately. Also consolidate exaCopyDirtyToFb/Sys. commit 8cfcf9973c765f11d1b45b95b8091ef7e01d7f01 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Sep 5 20:10:09 2007 +0200 EXA: Migrate out pixmap in exaPrepareAccess. Also fix exaFinishAccessGC not to use the same index for tile and stipple. commit e510a77ba4d65d5d6ead514cd698f1b1e3f8a2b6 Author: Dave Airlie <airlied@linux.ie> Date: Tue Jul 17 17:16:51 2007 +1000 EXA: Add a couple of missing exaPrepare/FinishAccess calls. commit 72b347e681f5667b68257822e7cec02ab4c9cb6d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Sep 7 14:31:19 2007 +0930 dix: Enabling devices must not overwrite existing sprites/pairing. EnableDevices is (amongst others )called after a VT switch. We must not create a new sprite or re-pair the device, otherwise we lose the input device setup that we had before the VT switch. This requires the devices to be in exactly the same order as before the VT switch. Removing a device while on a different VT is probably a bad idea. commit 57907e0943da0c3fd3bf6c128d210b544629ce72 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Sep 6 16:55:51 2007 -0400 devPrivates rework: register an offset for every resource type, use signed values so -1 actually works correctly, and provide a macro for adding an offset to a pointer. commit 84eb7e62248ddc2761af8cefe33d1b7147477528 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Sep 6 13:36:37 2007 +0100 Fix Xdmx build commit 35ec8b89f4cdf5ec48b292d47b2dad42d2fb9534 Author: Ben Byer <bbyer@bbyer.local> Date: Thu Sep 6 05:34:14 2007 -0700 DDX changes for XDarwin Creating a real DDX section for XDarwin instead of stuffing it into the XORG section in a half-assed manner. commit d627061b48ae06d27b37be209d67a3f4f2388dd3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:57:00 2007 +0930 xfree86: wrap keyboard devices for XKB. Call ProcessOtherEvents first, then for all keyboard devices let them be wrapped by XKB. This way all XI events will go through XKB. Note that the VCK is still not wrapped, so core events will bypass XKB. commit 5ee409794ee604fcf84886f70429fc2d6b1ff4f1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:52:02 2007 +0930 dix: add XI event support to FixKeyState. FixKeyState needs to be able to handle XI events, otherwise we get "impossible keyboard events" on server zaps and other special key combos. commit 6334d4e7be18de5f237c12a6dc20f75aa23477d0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 18:49:57 2007 +0930 xkb: enable XI event processing for xkb. XI events can now take the same processing paths as core events, and should do the correct state changes etc. There's some cases where XKB will use KeyPress as type for an event to be delivered to the client. Stuck warnings in, not sure what the correct solution is yet. commit 49dbe9a757a3d7a0b9ab318242c6cc0cbd4dd1f0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 17:27:28 2007 +0930 dix: close virtual core devices after other devices. If a device is paired with the VCP, deleting the VCP before the device will segfault the server when the sprite should get updated. commit 03680a384aa423ece75b658f00b96db2628c39fa Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Sep 6 15:43:47 2007 +0930 dix: don't change the device struct while processing core events. The device state needs to be changed while processing the XI event. Core events are always processed after XI, so by then the device is already set up properly. However, we now rely on DeviceButtonMotionMask to be equal to ButtonMotionMask. It already is, but stick a big fat warning in so nobody attempts to change it. This commit disables XKB for the VCK, thus essentially for all devices. Temporarily anyway. commit f3f614cd01ae56d84d61b4f5c907c6edd7c8c6d3 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 5 20:34:00 2007 -0700 Revert "configure.ac: exclude pci-access dependency from XDarwin" This reverts commit 20c6677d1b5f8d77325dd878ffa3df1d0fb01864. commit bf1641b94cffa54b786e18eaeff3839d8790b9f2 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 5 20:33:43 2007 -0700 XDARWIN: Add launchd support This adds a bit of glue to configure.ac to support launchd detection; on OS X (or other platforms which choose to implement launchd), this allows the system to automagically start the Xserver as necessary to serve clients. commit 71c21dea748ea0dcad758679c40ee39192d170f9 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 18:45:50 2007 -0700 added HAVE_LAUNCHD check to configure.ac (mostly for OSX) commit 81c28ffd2b13a83770eadcfd7829d35d319d637f Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Sep 5 17:46:23 2007 -0700 Fix key repeats during VT switch. Add keyc->postdown, which represents the key state as of the last mieqEnqueue call, and use it when we need to know the posted state, instead of the processed state (keyc->down). Add small functions to getevents.c to query and modify key state in postdown and use them all through, eliminating previously broken uses. commit e332335241af28ef0ab66b102d0cbc4e5c73ac68 Merge: 7381e9149 accd71bda Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 15:51:23 2007 -0700 Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/xserver commit 7381e9149e3cbb7e672070781a16e3f096202be9 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 15:51:11 2007 -0700 added an exclusion for setting XORG on darwin commit accd71bda6f958ea6892ad3a10879232d345774c Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Sep 5 14:19:19 2007 -0700 Deliver correct event when releasing keys on VT switch. In commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a, the event delivery loop for Xinput enabled keyboards was changed and accidentally used the wrong index variable, causing random events to be delivered when returning from VT switch. In addition, in commit aeba855b07832354f59678e20cc29a085e42bd99, SIGIO was blocked during delivery of these events, but not for the entire period the xf86Events array was being used. Block SIGIO for the whole loop to avoid other event delivery from trashing the key release events. (cherry picked from commit aa7ed1f5f35cd043bc38d985500aa0a32e857e84) commit 8b77dc7e808f61f1ed10fe05cf898bb47459a76d Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 14:48:38 2007 -0700 XDARWIN: build breakage fix commit 20c6677d1b5f8d77325dd878ffa3df1d0fb01864 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 14:31:01 2007 -0700 configure.ac: exclude pci-access dependency from XDarwin XDarwin doesn't need any of this pci stuff since it doesn't talk directly to hardware, so it doesn't make sense to require it when building on OSX/Darwin. commit ff01e44e33fd072958fb0157dae072f1b1c88944 Merge: 8ba8c16af 47300ed2b Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 13:56:08 2007 -0700 Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/xserver commit 8ba8c16af773ec83a0b1c0661a23d746b401944e Author: Ben Byer <bbyer@bbyer.apple.com> Date: Wed Sep 5 13:46:30 2007 -0700 build fixes for XDarwin commit 47300ed2be59d0ba7ea9345b954bf3104877c095 Author: Eric Anholt <eric@anholt.net> Date: Wed Sep 5 12:34:29 2007 -0700 Fix server version reporting to be the server package version. Previously, the server version reported by xdpyinfo and Xorg -version would bear some vague resemblance to a X.Org katamari version, but in the presence of modularization (and client-server relationships with different katamari versions on each side) those numbers don't really make sense. Instead, just report the package version. When branching a stable branch, master's version should be immediately updated to the endpoint of the stable branch plus a snapshot of 1 (for example, 1.4.0.1 after server-1.4-branch). The stable branch should then be changed to RC0 at that time (1.3.99.0, for example). This scheme was partially attempted for server 1.3, but lacked the appropriate master updates, thus why it had to be revisited now. While here, we can also remove a lot of versioning complexity since everything is based on the package version. commit 6c89d1237c4fdce961b30a8eaee964af5d56565e Author: Dodji Seketeli <dodji@openedhand.com> Date: Wed Sep 5 17:46:49 2007 +0200 Kdrive: unbreak kdrive linking * configure.ac: re-sort Kdrive libs so that symbols get properly resolved. Basically, all some libs are present in both $KDRIVE_LIBS and $XSERVER_LIBS, and some libs orders are not correct. So I made sure Kdrive servers don't have to link against $KDRIVE_LIBS *and* $XSERVER_LIBS. They just have to link against $KDRIVE_LIBS now. * hw/kdrive/*/Makefile.am: update those makefile to reflect the change in configure.ac commit 0003ccfcdfae1b473aa024342304b84256d378b9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Sep 5 11:18:36 2007 -0400 xace: add new fields to resource access hook to allow parent resource objects to be passed in at create time. Also added a missing devPrivates initializer. commit 28e48cd8e6e4c412a49d7177daad6d3c93c28e08 Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 5 04:43:17 2007 -0700 Another pathname fix for event_status_driver.h commit b6c0697fd67323893a9ad3676c33f2f1ec48e15e Author: Ben Byer <bbyer@bbyer.local> Date: Wed Sep 5 04:40:03 2007 -0700 fixed path for event_status_driver.h (The path currently used is deprecated on Tiger and invalid on Leopard.) commit c4fff050836feeef8390b7197f1de39af2997811 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Sep 5 16:19:45 2007 +0930 Revert "Input: Fix stuck modifiers (bug #11683)" This reverts commit 6b055e5d9751e3679ff98065e43225ec8a960053. MPX relies on the XI event being delivered before the core event. Device grabs break, amongst other things. I guess stuck modifiers need to be fixed some other way. Conflicts: dix/getevents.c commit bfe6b4d2d9952a80f8dbc63eec974ef894e5c226 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Sep 4 17:44:51 2007 +0930 xkb: Store the action filters per device in the XkbSrvInfoRec. Using a global array for action filters is bad. If two keyboard hit a modifier at the same time, releaseing the first one will deactivate the filter and thus the second keyboard can never release the modifier again. commit cc5c926267be099d793e6dfec17916f21c73c64d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Aug 30 15:51:22 2007 +0930 randr: RRPointerScreenConfigured needs to move all pointers. Previous version only moved the VCP, causing "bogus pointer events" lateron. Now we run through the device list, updating each pointer separately if necessary. Also stick a big warning into RRPointerMoved, not sure what device we need to work on here. commit 136fde2c7b5ed590bc6c63d11ede31e92dc679a2 Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br> Date: Tue Jul 3 13:44:28 2007 -0300 Add Xserver man section about catalogue:<dir> FPE catalogue:<dir> FPEs were introduced in libXfont 1.2.9 commit eb6a933dc60bec5601260794eeb973e946af37b6 Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br> Date: Tue Jul 3 13:44:03 2007 -0300 Add xorg.conf man section about catalogue:<dir> FPE catalogue:<dir> FPEs were introduced in libXfont 1.2.9 commit 205183a733237ea418a25c7423b689fcc8eae628 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 4 16:19:22 2007 -0700 Fix driver build by including an appropriate Requires.private line on pixman. We'd previously been substituting PIXMAN_CFLAGS, but we've got a better tool now, plus I deleted the PIXMAN_CFLAGS substitution without noticing. commit d67e210f3458b62d7d4a6032aabfda0004d661c1 Author: Gerte Hoogewerf <g.hoogewerf@gmail.com> Date: Tue Sep 4 16:09:38 2007 -0700 Add stub symbols to make xprint build. commit f7f79724fdea0cc6fda0e90e56431df937d49335 Author: Eric Anholt <eric@anholt.net> Date: Tue Sep 4 15:10:49 2007 -0700 Increase despair by fixing xprint build after my _DEPENDENCIES changes. commit e89d16be07e45e487913509788a9e8cb1ee09bc7 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Sep 4 14:49:49 2007 -0700 Revert part of 529acb175440969af9d7fa38aab8d7dea0dc2661 because libtool is smart. commit bf5948518763b5e21eff806a0a9abc5f7757fa10 Merge: 4062db402 735da3dcd Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Tue Sep 4 22:40:31 2007 +0200 Merge branch 'master' of git+ssh://herrb@git.freedesktop.org/git/xorg/xserver commit 4062db4020c671fc0921a3a4e7fe5d8dc1be2e1d Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Tue Sep 4 22:39:14 2007 +0200 typo in comment commit ce9e83d913511fe619da42f805d7bcd1a2a60d90 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 4 14:01:55 2007 -0400 xace: add hooks + new access codes: Damage extension commit 735da3dcd09f59c40f68eca8c9a91c2e826cd1b9 Author: Egbert Eich <eich@freedesktop.org> Date: Tue Sep 4 16:42:57 2007 +0200 Fixing xf86I2CGetScreenBuses(), now dereferencing the correct pointer. commit 7c5de093d499de63d39fe038d86da0a085262017 Author: Egbert Eich <eich@freedesktop.org> Date: Tue Sep 4 15:07:17 2007 +0200 Fixing sig11 in xf86I2CGetScreenBuses(). Dereferencing a pointer once too often caused a sig11 in xf86I2CGetScreenBuses(). commit 9adea807038b64292403ede982075fe1dcfd4c9a Author: Hong Liu <hong.liu@intel.com> Date: Tue Sep 4 08:46:46 2007 +0100 bgPixel (unsigned long) is 64-bit on x86_64, so -1 != 0xffffffff This patch should fix bug 8080. commit 529acb175440969af9d7fa38aab8d7dea0dc2661 Author: Eric Anholt <eric@anholt.net> Date: Sun Sep 2 15:16:01 2007 -0700 Fix Xorg build by listing circular dependency libraries twice. One of these I introduced by listing dix and mi in the same library list to simplify other servers. The other had been hacked around using libosandcommon, which is now gone. commit c56930e6ca90a61d2f4cbd845f7d0a51a66f83cb Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 31 18:27:41 2007 -0700 Remove backend.[ch] from neomagic to fix distcheck. commit f98dfec79dadb70fa7bba84e7335f92b3a73dc02 Author: Keith Packard <keithp@koto.keithp.com> Date: Sat Sep 1 21:14:22 2007 -0700 [COMPOSITE] Composite used for pixmap population on redirect. (Bug #7447) compNewPixmap copies bits from the parent window to the redirected child pixmap to populate the pixmap with reasonable data. It cannot always use CopyArea as that only works across matching depths. Use Composite when the depths do not match. commit 1afdf8b0a92437dffe84fa98b6083b3d8fd55e27 Author: Adam Jackson <ajax@redhat.com> Date: Fri Aug 31 22:11:13 2007 -0700 [RANDR] Don't mark Xinerama as active if no crtcs are enabled. (bug #11504). Clients expect any Xinerama-enabled screen to report at least one monitor, but with RandR, there may not be any enabled crtcs. In this case, tell the client that Xinerama is not active. commit 0dc2bb6101704d0fd25f36e2c3df79687f119f5b Author: Marius Gedminas <mgedmin@b4net.lt> Date: Fri Aug 31 21:36:37 2007 -0700 [RANDR] Compare only milliseconds of config time. (Bug #6502) The timestamp transferred in the X protocol is a 32-bit number of milliseconds. The timestamp stored in the server is a structure that contains two fields: months (!) and milliseconds. When the server passes the config timestamp to the client, it discards the months part and sends only the milliseconds part. When the server receives the config timestamp from the client, it tries to guess the "months" part by looking at the current time and then maybe adding or subtracting one. The guess is wrong after the server has been running long enough (several hours). I have added two ErrorF calls around the 'if' statement that returns RRSetConfigInvalidConfigTimestamp in randr/randr.c and my Xorg.0.log has this: randr request got good config time: 0:-2103495671 for the first few successful xrandr calls, and randr request failed with RRSetConfigInvalidConfigTime: client passed 1:-2103495671, server has 0:-2103495671 when it fails. The server has been running for 8 and a half hours. The obvious fix would be to ignore the months field and only compare the milliseconds. commit 07630d897ef37cad8b79d073d9edc891d5a7bddd Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 31 15:16:01 2007 -0700 Bug #7364: Require renderproto 0.9.3 on 64-bit, and fix build with it. commit ca82d4bddf235c9b68d51d68636bab40eafb9889 Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 31 13:00:23 2007 -0700 Bug #7186: Fix an excessive request size limitation that broke big-requests. MAXBUFSIZE appears to be a leftover of some previous time. Instead, just use maxBigRequestSize when bigreqs are available (limiting buffers to ~16MB). When bigreqs are not available, needed won't be larger than the maximum size of a non-bigreqs request (256kB). commit a02db0d500cac20d0f0f107d27c064a175018421 Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 31 12:24:07 2007 -0700 Convert servers to using _DEPENDENCIES to ensure proper rebuilds. This cleans up server Makefile.ams a little bit, but also means that people messing with configure.ac need to be careful with whether they put libraries in the _LIBS or _SYS_LIBS targets. Hopefully the comment in configure.ac will clarify the issues. commit c9ceb4878063ca22487c708d9d1f86e367f2cec8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 31 11:03:54 2007 -0400 xace: add hooks + new access codes: Composite extension commit fd04b983db6a70bf747abe02ca07c1fbbaae6343 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 31 09:55:27 2007 -0400 xace: add hooks + new access codes: Render extension commit 3f42af8c0ef1e5379bc836f589e0cbee43c02ac5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Aug 30 18:22:12 2007 +0930 config: Use [config/dbus] consistently for error messages. commit 0fcde83d94507eadd9f99d4e6a63584b221c989c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Aug 30 18:20:20 2007 +0930 config: return BadValue to caller if add/remove doesn't have parameters. If message iterator cannot be created, the caller didn't supply any parameters. Return BadValue, instead of dying a horrible death while being stuck in an endless loop. commit 87495fc7064d5e0a7575a0713b6895a4172df0fa Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Aug 30 21:57:41 2007 +0100 Allow yres_virtual to be greater for some kernel fbdev drivers. (temporary fix for older fbdev drivers) commit 1005b29cc6939851b40397cc9cd0de9476ad3046 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 30 14:48:24 2007 -0400 xace: Correct some access modes. commit d8ab2353cbd7694b556b7b9d550104dc8c460a1b Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 30 10:39:53 2007 -0700 Remove dead xf86GetPciSizeFromOS and xf86GetPciOffsetFromOS. commit c2d80529fc7f514d80cf3cbed6f580cb999aca1b Author: Eric Anholt <eric@anholt.net> Date: Thu Aug 30 10:20:55 2007 -0700 Remove the now-dead PciAvoid symbol. commit 53f346b158fa8e10de5a8777fa6d8d86f918878b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 30 13:20:04 2007 -0400 xace: add hooks + new access codes: SHAPE extension commit 766c693ef3637ee6fc402df594060ed2c1346761 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 30 13:06:28 2007 -0400 xace: add hooks + new access codes: MIT-SCREEN-SAVER extension commit cda92bbf12107865e93c03c71b901ef51466dc31 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 30 11:48:45 2007 -0400 xace: add hooks + new access codes: XFixes extension. Required a new name argument to the selection access hook to handle XFixesSelectSelectionInput. commit 47ab4d648b31ea1d5800e0bc84cf5f25025bffe3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 30 11:40:39 2007 -0400 devPrivates rework: convert CursorRec and CursorBits over to new interface. commit 1d11e4bc4ccb169fb23fc18583f0b648f0a6a4e0 Author: Egbert Eich <eich@freedesktop.org> Date: Thu Aug 30 12:50:21 2007 +0200 Fixing a misleading comment which could suggest a GPL violation. The author of the int10 code looked at the VBIOS POSTing code in DOSEMU to get some initial idea on how to POST a VBIOS. To give credit to the DOSEMU Team for this inspiration a comment was added to the code which could suggest that code from the GPLed DOSEMU was directly incorporated into this code. This patch should clearify the situation. commit 45efe85003195bd45501630cef08349abb180c3a Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 29 16:05:51 2007 -0700 Remove stale changelogs from kdrive. commit 5aaf00190157114780ab51f7268b396459ed1cad Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 29 16:05:23 2007 -0700 Add more generated files to .gitignore. commit 87295b66a972a2bd194a79af6aa4f715018fcded Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 29 15:54:32 2007 -0700 Bug #9629: Remove badly-licensed neomagic kdrive files. Licensing issues of these files include: - They claim to be licensed under the GPL, yet we haven't allowed that in the xserver repository in the past. - They refer the user to the top of the tree for GPL license text, yet it isn't there. - They claim to be derived from the (MIT-licensed) ati kdrive code, yet don't follow the licensing terms of those files. commit 4795df62456b73c6790f271e0a20a83c60496490 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 29 14:40:10 2007 -0400 xace: add hooks + new access codes: TOG-CUP extension. commit e39694789e31e221fc8dec44ace9c697daf7acad Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 29 14:16:46 2007 -0400 xace: drop map-window checking hook, add new hooks for controlling the delivery of events to windows and clients. This is tentative. It's likely that an additional last-resort hook will be necessary for code that calls TryClientEvents or WriteEventsToClient directly. It's also possible that new xace machinery will be necessary to classify events and pull useful resource ID's out of them. The failure case also needs some thinking through. Should event delivery "succeed" or should it report undeliverable? Finally, XKB appears to call WriteToClient to pass events. Sigh. commit 41355a53c29bbf879da0c6ea562294fcc7ef89ff Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 28 15:10:20 2007 -0400 xace: add hooks + new access codes: core protocol input requests commit adf46b57ce6c69ab13a38b09a8104c802d54d052 Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 28 10:08:38 2007 -0700 Replace BSD custom PCI code with a stub implementation thanks to pciaccess. Note that pciaccess doesn't yet have Net/OpenBSD support, but the relevant code should go there instead of disconnected code in the X Server. While here, remove the now-disabled INCLUDE_XF86_NO_DOMAIN from the headers, and un-disable xf8StdAccResFromOS for those OSes without domain support which will need it. commit 4017d3190234e189a0bbd33193a148d4d3c7556b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 28 09:28:25 2007 -0400 devPrivates rework: since API is already broken, switch everything over to new system. Need to update documentation and address some remaining vestiges of old system such as CursorRec structure, fb "offman" structure, and FontRec privates. commit 85547073265ae9bc4ae3af920a6d3214fd1ca0c5 Merge: 860a09cfb 7d54399cf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 28 07:25:21 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: include/miscstruct.h mi/mibstore.c mi/midispcur.c os/Makefile.am commit 3fe67d23edaae3ddde20cd5f349aa5dfde1d26a3 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 27 19:02:41 2007 -0700 Remove the BusAccWindows resource code which is now unused. This was a bunch of poorly defined resource ranges per OS/platform combination which were supposed to represent what regions could potentially have resources allocated into them. commit 9e2112b2b56af099a7f380ece9b5c1d25b20cce4 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 27 18:50:34 2007 -0700 Remove unused xf8GetBlock and xf86GetSparse entry points. commit 801c359574d08ff2d6ac75a3325ff522bc862e30 Author: Eric Anholt <eric@anholt.net> Date: Mon Aug 27 15:46:05 2007 -0700 Fix fbdevhwstub for pci-rework. commit 7d54399cfdaa7f54e28828267a76b89c4e8e798f Author: Keith Packard <keithp@koto.keithp.com> Date: Sun Aug 26 22:11:45 2007 -0700 Add XSERVER_LIBPCIACCESS to xorg-server.h when using libpciaccess commit affda73a1d6e291516880dfbcb74b661374524c6 Author: Eugeniy Meshcheryakov <eugen@univ.kiev.ua> Date: Mon Aug 27 00:41:03 2007 +1000 Xprint: fix handling of TrueType font name Debian bug #272368 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=272368 In certain locales, some characters from some TrueType fonts were not appearing in the Xprint postscript output due to the font not being identified in the postscript output. commit 6f44a2c8a8d6e8f95681ebc7b2dd5ad9c3a02c6e Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Jul 29 14:16:10 2007 -0400 Refactor PictureInitIndexedFormats. The plural version is now static, which is fine since it was only ever called from within picture post-init anyway. The body of the work is now done with a one-shot (public) function that operates on a single format at a time. commit ae7f71a8b3d6756161e55d998d6eec37d2695c98 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Aug 25 15:08:20 2007 -0400 Implement core protocol backing store exclusively in terms of Composite. Composite's automatic redirection is a more general mechanism than the ad-hoc BS machinery, so it's much prettier to implement the one in terms of the other. Composite now wraps ChangeWindowAttributes and activates automatic redirection for windows with backing store requested. The old backing store infrastructure is completely gutted: ABI-visible structures retain the function pointers, but they never get called, and all the open-coded conditionals throughout the DIX layer to implement BS are gone. Note that this is still not a strictly complete implementation of backing store, since Composite will throw the bits away on unmap and therefore WhenMapped and Always hints are equivalent. commit bf0883ae5081bd75569115a3eb27c6d3d336c9f2 Author: David Nusinow <dnusinow@debian.org> Date: Sat Aug 25 14:53:17 2007 -0400 Fix bug in debugging info related to pci-rework merge commit 4eed88af8b7b6881b44ccf9f4a5c5875af6d2b78 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Aug 24 18:06:50 2007 -0700 Remove files made obsolete by pci-rework. commit 1ab4b3e183d04bb20fb5039f7d2671752ab24cf6 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Aug 24 16:00:31 2007 -0700 Bump video driver ABI for pci-rework. commit 91f358336f77c0e4f577be65cca977d17298e36c Merge: b9a806f0b 8b6b40b72 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Aug 24 15:04:21 2007 -0700 Merge branch 'pci-rework' commit b9a806f0b3d495c7616b469281e5892ae7f3f6b3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 19:04:55 2007 +0200 exaPolyFillRect: pGC->alu doesn't matter with a single rectangle. commit d0f0d1092c7587a02404e1db07740e6334462ba6 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 14:10:13 2007 +0200 exaGetImage: Don't migrate pixmap out of FB with no DownloadFromScreen hook. Based on the assumption that GetImage is relatively rare, so the overhead of the migration is probably bigger than any potential savings. commit 5d9e2c282145897008d7d941e2a0a3fdc71f2373 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 14:03:14 2007 +0200 EXA: Improve ShmPutImage. Share as much code with exaPutImage as possible, and fall back to fbShmPutImage when that fails. commit 6085522d91e875c0e1ab8d4300e7378701c19b7c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 14:02:35 2007 +0200 Export fbShmPutImage to modules. To be used by EXA. commit c19f227b468d039c5ea136cc8a53c420da30263b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 13:05:52 2007 +0200 EXA: Only mark offscreen memory as used when it really is. commit 095850596114178119a8cc854716ce0cc6e05121 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Aug 24 13:04:48 2007 +0200 __glXDRIbindTexImage: Fail if no texture bound to pixmap's texture target. We would most likely crash somewhere in Mesa if we tried to continue in this case. commit 8b6b40b7271acd81a9548f502c18f46f3b640640 Merge: ab7a6d860 3305d1719 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Aug 23 18:19:17 2007 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/common/xf86.h hw/xfree86/common/xf86Init.c hw/xfree86/common/xf86pciBus.c hw/xfree86/int10/generic.c hw/xfree86/int10/helper_exec.c hw/xfree86/loader/xf86sym.c hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/Pci.h hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/linux/int10/linux.c commit 93ae6fe18c417a22f1fccb22add4890a20cae713 Author: Carl Worth <cworth@cworth.org> Date: Thu Aug 23 16:33:05 2007 -0700 Avoid leaking a Pixmap for every glyph commit 3305d17195e3a0a5555300555bd7703312fa489f Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Thu Aug 23 22:48:19 2007 +0200 Fix indentation. commit a66c0f1dca2958835ff65a5b50579e3304ed316a Author: Matthieu Herrb <matthieu@bluenote.herrb.com> Date: Thu Aug 23 22:11:56 2007 +0200 Remove an extra cast. Thou should not apply patches manually without testing. commit 12d27cf33c6d963eae77795c0d247175907162a5 Author: Otto Moerbeek <otto@openbsd.org> Date: Thu Aug 23 21:59:25 2007 +0200 A high resolution device that's moving fast can potentially generate an int overflow, making dx*dx+dy*dy negative. Now pow(negative, non-integer) yields NaN, so you loose. Use fp math to avoid that. commit ff089e6cae634ac3eb509abd448a250bcbb17275 Author: Brian Paul <brian.paul@tungstengraphics.com> Date: Thu Aug 23 19:38:53 2007 +0200 glx: fix crash when freeing visuals Don't set screen->num_vis to a value greater than the actual number of visuals. X.Org Bug #10809 <http://bugs.freedesktop.org/show_bug.cgi?id=10809> commit 943dd6ad99670c283a6869ea6c5f751acbd73134 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Thu Aug 23 12:15:03 2007 -0400 Revert "Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix"" since the pixman changes have been pushed now. This reverts commit 57f7f2a5327a2d967a726bb4706e4f6b2f4b2cea. commit 13949f997289068354e83bc83e50d97b8232efb1 Author: Julien Cristau <jcristau@debian.org> Date: Thu Aug 23 11:27:33 2007 +0200 Get rid of the type1 font module. It is completely replaced by freetype these days. commit 88a9828ef906bba973debc191e35ea669b7ec271 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Aug 23 18:02:10 2007 +0930 dix: Only check device events for possible ACLs. We shouldn't be able to restrict events like Expose, etc. with device based ACLs. So we just ignore all non-input events when checking for permissions. commit 76bf3cd7b8c6189b6b08518cde00c8bd991bdfb7 Author: Dave Airlie <airlied@redhat.com> Date: Thu Aug 23 16:22:03 2007 +1000 randr: fixup crtc and output destroy if you are moving pointers, you want to move the pointers not just a byte commit 81f8b652d99ee0f7116c1e34aed0e585d23a91fb Author: Alex Deucher <alex@botch2.(none)> Date: Wed Aug 22 19:26:34 2007 -0400 Add _X_EXPORT to exported functions in hw/xfree86/modes/* Also add missing exports to hw/xfree86/loader/xf86sym.c commit 57f7f2a5327a2d967a726bb4706e4f6b2f4b2cea Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 22 09:02:03 2007 -0700 Revert "Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix" The corresponding pixman code hasn't been pushed, so revert until the code is ready. This reverts commit 53941c8e68014619d3ded7f8bc0f07d9a38bb9b1. commit d0dc9698ae4324d44ed4c0482d6858d0b73bff33 Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 22 09:00:45 2007 -0700 Revert "Fix <pixman.h> include to <pixman/pixman.h>" The pixman headers have been located under pixman-1/ instead of pixman/ since around 2007-08-06, and pixman-1.pc has the updated include paths to account for this. This reverts commit feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68. commit bc2d516f16d94c805b4dfa8e5b9eef40ff0cbe98 Author: Eric Anholt <eric@anholt.net> Date: Fri Aug 17 12:14:16 2007 -0700 Fix overly-restrictive integer overflow check in EXA pixmap creation. The result was that at 32bpp, pixmaps of width 8192 or greater couldn't be created, due to treating a pitch value as a width. commit feb1b3e45513bd6eaa2e6a5ee536183f20d9cb68 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Aug 22 16:54:29 2007 +0100 Fix <pixman.h> include to <pixman/pixman.h> commit b6a7c0112c42a3287e53647c38b2c0c5bf8fefa0 Merge: 53941c8e6 6ef4ecd82 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Tue Aug 21 14:26:34 2007 -0400 Merge branch 'master' of ssh+git://sandmann@git.freedesktop.org/git/xorg/xserver commit 53941c8e68014619d3ded7f8bc0f07d9a38bb9b1 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Tue Aug 21 14:26:14 2007 -0400 Require pixman 0.9.5; Use pixman_image_set_source_clipping() to fix bug 11620 (reported by Jens Stroebel. commit 6ef4ecd82670c37a354243166750d76a97959c8b Author: Julien Cristau <jcristau@debian.org> Date: Tue Aug 21 18:17:35 2007 +0200 config: fix default xkb model (pc105, not keyboard) commit 1834cfb4470341aace64a2fa47d04f85dbf98a47 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Aug 21 10:44:37 2007 -0400 Fix an error message to not point to @xfree86.org. commit 265a633cf1fcbf497d6916d9e22403dffdde2e07 Author: Keith Packard <keithp@koto.keithp.com> Date: Sun Aug 19 20:29:37 2007 -0700 Screen size changing should leave FB alone when X is inactive. xf86RandR12ScreenSetSize must protect calls to EnableDisableFBAccess with suitable vtSema checks to avoid invoking driver code while the X server is inactive. commit 7dc8531548cc9573e28bb04363dcbb3af5864c9a Author: Keith Packard <keithp@koto.keithp.com> Date: Sun Aug 19 20:28:05 2007 -0700 Ref count cursors used in hw/xfree86/modes code. The multi-crtc cursor code in hw/xfree86/modes holds a reference to the current cursor. This reference must be correctly ref counted so the cursor is not freed out from underneath this code. commit 1f6ddae003ec65d6bc567831bf32bf75dfefdd6c Author: Alex Deucher <alex@botch2.com> Date: Tue Aug 21 00:37:33 2007 -0400 add xf86_crtc_clip_video_helper to xf86sym.c commit c839859d1bc35451923a2cbd5dfac4f3ca5eb3f9 Author: David Nusinow <dnusinow@debian.org> Date: Mon Aug 20 21:09:27 2007 -0400 Move module defaults from the header to the source file. This is where they should have been in the first place. All the rest of the code in the server defines such things in the source files, not the headers. commit 53c04351c462d2ae307684e50d5960debe1ee557 Author: Alex Deucher <alex@botch2.com> Date: Mon Aug 20 19:46:38 2007 -0400 move intel crtc xv clipping helper to the xserver The code is generic and can be used by any overlay-based card when adding randr 1.2 support. Tested on radeon. commit a1fe36b772f7edc162ea97368f86588c0fb77148 Author: Julien Cristau <jcristau@debian.org> Date: Mon Aug 20 12:57:06 2007 +0200 xfree86: Fix build on Linux/alpha. A bunch of CFLAGS had gone missing, so the build failed with errors like: ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:7:19: error: input.h: No such file or directory ../../../../../hw/xfree86/os-support/linux/lnx_ev56.c:8:24: error: scrnintstr.h: No such file or directory commit 2c1431a76e7219e3bd14fd7f7888a8bc4fea0f58 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Aug 20 10:06:13 2007 +0930 dix: ProcChangeActivePointerGrab: make sure variable is initialised. Thanks to Ben Close for spotting it. commit 65a49f0ca198e0366175367729a101211388b16b Author: Blair Sadewitz <blair.sadewitz@gmail.com> Date: Sun Aug 19 20:29:22 2007 +0200 Autoconfiguration of wsmouse for NetBSD. commit 3c448b0eb67337b56641e09a6d168aad6745e3ef Author: Fredrik Höglund <fredrik@kde.org> Date: Sat Aug 18 19:02:18 2007 +0200 EXA: Fix a couple of logic errors in exaGetPixmapFirstPixel. The fb pointer would be left uninitialized when exaPixmapIsOffscreen returned false. When it returned true and the pixmap was damaged, fb would be initialized from the pixmap's devPrivate.ptr before the exaDoMigration and exaPrepareAccess calls, at which point devPrivate.ptr would still be pointing at offscreen memory. commit 23fbd5292d356067e85e1eec4eb4f743532b0503 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Aug 17 15:29:16 2007 -0700 Actually build Secure RPC authentication support (missed in modularization) commit 6a32a96d8df184c3ace4847beb48fdcb846d2286 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Aug 16 17:43:29 2007 -0700 stride is in FbBits-sized chunks, but xoff is not. Fixes corruption problems with composite rendering to redirected windows in depth 16. commit 32666d77227fcd2c066de16bf3c07366f92b0457 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Aug 16 14:57:18 2007 -0700 Bug #12015: Use the right offsets in the dst arguments of pixman_blt. commit daee59b1703ac07c2def9e9fecc479e59b93f761 Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Aug 15 19:19:11 2007 +0200 EXA: Wrap Trapezoids to prevent excessive migration of the alpha pixmap. miTrapezoids creates an alpha pixmap and initializes the contents using PolyFillRect, which causes the pixmap to be moved in for acceleration. The subsequent call to RasterizeTrapezoid won't be accelerated by EXA, which causing the pixmap to be moved back out again. By wrapping Trapezoids and using ExaCheckPolyFillRect instead of PolyFillRect to initialize the pixmap, we avoid this roundtrip. commit 860a09cfb8afc0a293c7eb5e01762724eb86847a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 16:10:44 2007 -0400 devPrivates rework: Nevermind, can't const due to return value warnings. This reverts commit 6fd0a0b08de912421718aca17fe34a55ae285ae7. commit 6fd0a0b08de912421718aca17fe34a55ae285ae7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 16:01:42 2007 -0400 devPrivates rework: add const qualifier to key type. commit b2b7817497dd5da73d23ec9cc637c563041fc490 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 15:30:25 2007 -0400 devPrivates rework: use camelcase standard for name of key type. commit 0a994d4f859a4e48d41a90ed9d2a282bb528c555 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 12:54:35 2007 -0400 xace: add hooks + new access codes: core protocol selection requests commit 3ef2e9e623819c625a92f464fb14f1e5c181df42 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 12:27:48 2007 -0400 xace: add hooks + new access codes: core protocol pixmap requests commit be536b79f2a364399937314cfa6c88bf8188da9c Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Thu Aug 16 11:23:28 2007 -0500 Update for support on NetBSD and DragonFly. From Joerg Sonnenberger and pkgsrc. commit 1d4bea6106d7a1c83e1dfe37fad8268589feaa0b Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Thu Aug 16 11:20:12 2007 -0500 Add some more support for DragonFly. From Joerg Sonnenberger and pkgsrc. commit fe9bc481efb0821134e10760c23993c6a7386450 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 12:02:59 2007 -0400 xace: add hooks + new access codes: core protocol font requests commit e89301c8790df9fc49de13dd7c7f36e5340c0c31 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 10:57:49 2007 -0400 xace: add hooks + new access codes: core protocol client requests commit 5bee8db003a5d552ee1d85bb6c40a3cb93bd6b2b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 10:44:51 2007 -0400 xace: drop background-none checking hook, add new hook for controlling access to other clients. commit b82557c9fb60f11fd2696c8fb2ae17b9dfd915ed Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 16 10:36:05 2007 -0400 xace: add hooks + new access codes: core protocol screensaver requests commit 568ae737d1d5d476a0bf85659d88910c4e0ef5e0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 15 14:14:45 2007 -0400 xace: add hooks + new access codes: core protocol server requests commit 14c13b8d62eb37cba8a044daffcddec578ba1644 Author: Dave Jones <davej@redhat.com> Date: Thu Aug 16 09:46:27 2007 +0200 Kdrive: fix nasty thinko in TslibEnable() commit 026534f945ae5652592a090a9d41375ca37ab618 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Aug 15 16:47:53 2007 -0700 Update pci.ids to 2007-08-15 snapshot Remove nvidia ids in extrapci.ids that are now in pci.ids commit 6cef7b9611297cb1d93cefe3890b26b69c87bce2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Aug 15 16:44:49 2007 -0700 Correct XErrorDB path and make it configurable (used by DTrace support) commit 3c9553ac2cac7f3a41966def44a50d722d7e645b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 15 14:14:25 2007 -0400 xace: rename hostlist security hook to "server" as this hook will be used for other types of server access besides just the host list. commit dc84bb3418933297a8c005070902d9a91ed3d18f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 15 14:13:53 2007 -0400 xace: add hooks + new access codes: core protocol cursor requests commit b424e01ec59d9600a02823f1522949325797268c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 14 13:20:42 2007 -0400 xace: add hooks + new access codes: core protocol property requests commit 14d0397cded699378fa3c19f4e61dbab7d3a9b2c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Aug 15 22:12:29 2007 +0930 dix: ProcUngrabKeyboard: make sure grab is initialized. This should fix the random segfaults with ProcUngrabKeyboard. Thanks to David Nolden for spotting it. commit 0f9e89b4e309e570d7d366489d250ca2143f0ad7 Author: Fredrik Höglund <fredrik@kde.org> Date: Tue Aug 14 22:47:49 2007 +0200 Fix the value comparisons in the IDLETIME wakeup handler. LessThan/GreaterThan comparisons were used in the wakeup handler, and LessOrEqual/GreaterOrEqual in the block handler. Change it to use LessOrEqual/GreaterOrEqual in both functions, since this is what XSyncNegativeComparison and XSyncPositiveComparison imply. commit 42d6112ec21949a336ee8b34469f2695273ee2d6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 14 13:09:38 2007 -0400 xace: add hooks + new access codes: core protocol GC requests commit 9a183d7ba50e31afa133cc03aee7991517a283ea Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Aug 14 11:39:26 2007 -0400 dix: remove caching of drawables and graphics contexts. The security checks simply bypass the cached values so they are unused. commit 2763056ab5ae31bed422a0948198d98c6ace6d55 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 13 13:40:47 2007 -0400 xace: add hooks + new access codes: core protocol window requests commit 6a195e816b9d60f728d77cc1c23538e7af00a879 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Aug 13 10:43:48 2007 -0400 Revert "Implement damage tracking for AIGLX." This reverts commit 2243b30e54df07892f75e3d65b687abe5b183cf3. The existing DRI interface doesn't let us get from a __DRIdrawable to the corresponding X drawable, and thus, we can't implement AIGLX damage tracking with the current interface. commit f367285fd5825e0adc271982a529c9904ad65c89 Merge: b1272eefd ff4bd3add Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Aug 12 15:31:10 2007 +0930 Merge branch 'master' into mpx Conflicts: Xi/exevents.c dix/devices.c dix/getevents.c include/dix.h mi/mieq.c commit 03f9da672466b9ab9a9814d784b8c44f1030587e Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sun Aug 12 03:07:04 2007 +0200 xfree86: Improve default mouse handling on the Hurd Make /dev/mouse the default device. This makes Xorg works with empty or missing InputDevice sections. commit c5741438a3a171f493e9da32a6b39f73403f6993 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Aug 10 16:13:55 2007 -0700 Only use evdev drivers in Xephyr #ifdef linux commit 59961e47df4ea621a6713a8c7d060555f8746c3a Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Aug 10 16:08:41 2007 -0700 xorgcfg needs PIXMAN_CFLAGS in order to build libc_wrapper.c commit 2243b30e54df07892f75e3d65b687abe5b183cf3 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Aug 10 15:53:05 2007 -0400 Implement damage tracking for AIGLX. commit ff4bd3addb48df3eacc4b121cc249a7f38eb981a Author: Eric Anholt <eric@anholt.net> Date: Wed Aug 8 14:24:42 2007 -0700 Fix the swapped decode of the EDID DTD h/v sync polarity fields. As a result, we can remove the quirks that existed to flip the bits back around for us. This is not confirmed in all cases due to lack of bugs containing EDID blocks associated with the quirks, but is likely true. commit 2926cf1da7e4ed63573bfaecdd7e19beb3057d9b Author: Gustavo Pichorim Boiko <boiko@mandriva.com> Date: Thu Aug 2 18:09:52 2007 -0300 [PATCH] Allocate the right number of entries for saving crtcs commit b2dcfbca2441ca8c561f86a78a76ab59ecbb40e4 Author: Keith Packard <keithp@koto.keithp.com> Date: Wed Aug 8 12:16:12 2007 -0700 RRScanOldConfig cannot use RRFirstOutput before output is configured. RRFirstOutput returns the first active output, which won't be set until after RRScanOldConfig is finished running. Instead, just use the first output (which is the only output present with an old driver, after all). commit b1272eefd9a3e340d65c14903f337747ec82d021 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Aug 8 15:00:02 2007 +0930 Fix typo from last commit. Oh well. commit c02128532e910e813fba94983733942d30c2d5cb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Aug 8 13:10:00 2007 +0930 dix: Allow flexible devices for passive core grabs. A passive core grab doesn't specify the device, and is thus created with the ClientPointer as device. When this grab is activated later, don't actually activate the grab on the grab device, but rather change the device to the one that caused the grab to activate. Same procedure for keyboards. Makes core apps _A LOT_ more useable and reduces the need to set the ClientPointer. Only applies to core grabs! commit ab3f601149e15789edfb7c9a0c33387070279582 Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 23:17:32 2007 -0300 Updates some piece of the dead mouse evdev code under the new hotplug scheme. I exported the evdev driver to Xephyr server. I'm running it using something like: $ ./hw/kdrive/ephyr/Xephyr :1 -mouse evdev,,device=/dev/input/event4 -keybd \ evdev,,device=/dev/input/event1,xkbmodel=abnt2,xkblayout=br It also closes /#5668. commit 7d1a749b210ba5b9f8d0e5a1feb9a9ef9fa4d992 Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 22:59:12 2007 -0300 Export device path key options to be called by the command line of server. commit aee3588a4a6829326770c84b860061f47f2cbcae Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 22:49:07 2007 -0300 Update KdUseMsg() for completeness. commit 30259d5a4e95ff20b30807e5e207ab5995a3fdaf Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 7 20:58:49 2007 +0300 Hotplug: HAL: Fix error handling Don't use our DBusError for property getting, because we simply don't care: this fixes D-Bus error spew to stderr. Thanks Michel Dänzer for debugging and testing. commit aef255425a3521d66c3405d34f7787628a22703e Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 7 16:37:42 2007 +0300 Config: HAL: Use input.xkb namespace Use an explicit input.xkb.foo namespace, not input.xkb_foo. commit 838e59c02ec06446fc180fb9d86fa8793c7b9903 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 6 16:07:20 2007 +0300 configure.ac: Add $CONFIG_LIB to server libraries Make sure all DDXes get $CONFIG_LIB. Build-tested with Xvfb and Xdmx. commit b4193a2eee80895c5641e77488df0e72a73a3d99 Author: Keith Packard <keithp@koto.keithp.com> Date: Tue Aug 7 12:45:53 2007 -0700 RRScanOldConfig wasn't getting crtcs set correctly The output crtc is set by RRCrtcNotify, which is called at the end of RRScanOldConfig. Several uses of output->crtc in this function were wrong. commit 2b93cbb5f8bac9b1b75f723baaa728430b5fefff Author: Keith Packard <keithp@koto.keithp.com> Date: Tue Aug 7 12:44:19 2007 -0700 Decrement mode count when removing RandR output mode. Removing an output mode without decrementing the mode count scrambles the output mode array badly. commit fef4c7a6f1a1ef34233b36137bb66d9a657307fb Author: Eric Anholt <eric@anholt.net> Date: Tue Aug 7 09:01:14 2007 -0700 Fix driver build after pixman changes. commit 1339e57485db5a285cfbecbe0bba7154458680ad Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 04:24:34 2007 -0300 Fix typo. commit d9ee5f3e3a3a814ebcd257736c305b41139cc354 Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 04:22:26 2007 -0300 Clean a little bit the code. commit 7a5eb3e96b74daaaeb6babf46b13d698280aa3f6 Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 02:16:44 2007 -0300 Let xkb options be passed through command line in kdrive servers. I start my Xephyr using something like: ./hw/kdrive/ephyr/Xephyr :1 -fp /usr/share/fonts/X11/misc/ -mouse ephyr -keybd ephyr,,xkblayout=br,xkbmodel=abnt2 commit 955d5f6c0d14fae63bfe7c4ab39ee0a708919479 Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Tue Aug 7 01:39:29 2007 -0300 When we call Xephyr with '-pointer' a new pointer is added inside the server and the Xephyr virtual mouse keeps alive. With this patch the semantic changes turning '-pointer' && 'Xephyr virtual mouse' always false. Now we can open a device pointer and pass its options in Xephyr's command line without having other pointer unused. commit b8abeaf74ee8296d4bc3164a5a253624f984a6d4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Aug 7 12:32:46 2007 +0930 dix: get the paired keyboard for a passive grab (ProcGrabButton). Taking the VCK is only correct if no physical device is connected, and even then it's not really a good idea. commit a0b87f87fb8753955505958bf3d438eef191302d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Aug 7 10:49:33 2007 +0930 dix: check for core event to determine if grab is a core grab (CreateGrab). Checking for VCP/VCK is simply not a safe way to check if a grab is a core grab. commit aa3c6aaaab213200591d29ddb2921adfb87ee5b4 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Aug 6 19:00:59 2007 -0400 Require pixman-1 0.9.4, update pixman includes to new scheme commit 74feba4d77d74979a0ea478d666439ffc55001e5 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Aug 1 14:30:03 2007 -0700 Don't unwrap too early in libwfb for Composite. Don't call fbFinishWrap until the pixman_image_t that stores the pointer is actually freed. This prevents corruption or crashes caused by accessing a wrapped pointer after the wrapping is torn down. commit f6aa2200f2fb4f4d4bb51e67d68e86aabcac0c4b Author: Roland "Test-tools" Bär <roland@verifysoft.de> Date: Mon Aug 6 12:37:52 2007 -0700 Probable off by one buffer overflow in .../xorgconfig/xorgconfig.c X.Org Bug #11858 <http://bugs.freedesktop.org/show_bug.cgi?id=11858> Patch #11005 <http://bugs.freedesktop.org/attachment.cgi?id=11005> commit d744df32a15103aa14237175f506350d25b2fec0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 6 12:23:21 2007 -0400 xace: add hooks + new access codes: core protocol colormap requests commit acc9a42c926a3f84159780de12ecc1dc6186068a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 6 12:16:59 2007 -0400 Temporarily disable Security and SELinux extensions while changes to XACE are being made. commit 102df4f9bac59d95963572d1a7f31d1a064ca4ca Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 6 09:16:30 2007 -0400 xace: drop site-policy and declare-extension-security hooks, add 2 new hooks for controlling access to screens and screen savers. commit 9eddede039f6cbcc323b7e3e4e841c43d3ed4f43 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jul 16 18:01:00 2007 +0930 mieqEnqueue: Don't try to update the time for GenericEvents. Doing so may overwrite the event's length field and cause havoc. Also check if realloc'd memory did actually return valid pointer. commit e717eb82dc2e55f852919312d04f5cfc8ee55bc8 Author: Dave Airlie <airlied@redhat.com> Date: Thu Aug 2 10:50:01 2007 +1000 xserver: stop bcopy from going really slow The outport is most likely unnecessary on any currently used hardware, the byte copy is necessary from what I know on IA64 and friends so leave it. Add a new API entry point which lets a driver select the old behaviour if such a needs is ever found. This gives me ~20% speed up on startup on 945 hardware. commit 600ef07113caa7a901c7d486bc8ebd1ae47f885c Author: Tiago Vignatti <tiagov@balalaika.(none)> Date: Fri Aug 3 15:33:41 2007 -0300 Fix kdrive command line parser. commit 375864cb74cced40ae688078b1f7750998972535 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 3 13:23:34 2007 -0400 security: drop support for XC-QUERY-SECURITY authorization method. commit d445d2f22b5c97fa010370f4ba9cb0555df4a853 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 3 10:56:18 2007 -0400 security: drop the "declare extension security" dix call. Use the SecurityPolicy configuration file instead. commit 0a71e1542a07abc5e32501973a7cf6de3f641317 Author: Carl Worth <cworth@cworth.org> Date: Thu Aug 2 22:48:32 2007 -0700 Create a Picture as well as a Pixmap at the time of AllocateGlyph This avoids some inefficiency in creating a temporary Picture for every glyph at rendering time. My measurements with an i965 showed the previous patch causing a 10-15% slowdown for NoAccel and XAA cases, (while providing an 18% speedup for EXA). With this change, the NoAccel and XAA performance regression is eliminated, and the overall EXA speedup, (before any of the glyphs-as-pixmaps work), is now 32%. commit a2af34d5a861982a03afad8e586bb0181b72bbd0 Author: Carl Worth <cworth@cworth.org> Date: Wed Aug 1 15:48:30 2007 -0700 Use per-screen Pixmaps for glyphs Instead of system-memory data which prevents accelerated compositing of glyphs, (at least without forcing an upload of the glyph data before compositing). commit 19b3b1fd8feb343a690331cafe88ef10b34b9d98 Author: Carl Worth <cworth@cworth.org> Date: Tue Jul 31 17:04:13 2007 -0700 Use strong hash (SHA1) for glyphs Using a cryptographically strong hash means that comparing the hash alone is sufficient for determining glyph equality (no need to compare the glyph bits directly). This will allow us to replace system-memory copies of the glyph bits, (which we've only been holding onto for comparisons), with Pixmaps. commit 516b96387b0e57b524a37a96da22dbeeeb041712 Author: Carl Worth <cworth@cworth.org> Date: Mon Jul 30 17:31:47 2007 -0700 ProcRenderAddGlyphs: Avoid allocating a glyph just to find it cached This is a cleanup without any real savings (yet). Previously, the implementation would allocate a new glyph, then (often) find it in the cache, and immediately discard the allocated object. This re-organization first uses a new FindGlyphByHash function and only allocates the glyph if nothing is found. This isn't a real savings yet, since FindGlyphByHash currently still does a temporary glyph allocation, but this is expected to be replaced immediately as we switch to an alternate hashing mechanism (SHA1). commit 4c6abe1c7c8abcf203572bbf86b21d97ea4e756f Author: Carl Worth <cworth@cworth.org> Date: Mon Jul 30 21:43:20 2007 -0700 Split HashGlyph functionality out into HashGlyphInfoAndBits This is in preparation for a future change that will take advantage of being able to compute a hash for a separate xGlyphInfo and chunk of bits without a combined Glyph object. commit 363d764ea32b938f3dff35df7cf3370363c04d5c Author: Carl Worth <cworth@cworth.org> Date: Mon Jul 30 15:10:11 2007 -0700 ProcRenderAddGlyphs: Take advantage of the for loops to simplify the code a bit commit dc8a528cd6b9a4da3e60fa31428c37f5b34a897f Author: Carl Worth <cworth@cworth.org> Date: Wed Jul 25 14:57:13 2007 -0700 ProcRenderAddGlyphs: Convert while loops to for loops where more natural commit e34fcd2bf42dbd72ab6ce2df80f2dcaa13416e74 Merge: 32c0dcc8c f3955c0a0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 2 14:27:03 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: dix/devices.c dix/property.c include/dix.h commit f3955c0a020b39021050cd33c20a17f14fc4b579 Author: Arkadiusz Miskiewicz <arekm@maven.pl> Date: Wed Aug 1 21:04:22 2007 +0300 XFree86: xf1bpp: distclean generated files as well Make sure we clean up after ourselves: not sure why distcheck didn't flag this one. commit a04c95f4446e5c169dea71019321d790ab4fa139 Author: Julien Cristau <jcristau@debian.org> Date: Wed Aug 1 20:37:05 2007 +0300 configure.ac: Fix argument quoting for argv[] m4 quoting. Yar boo sux. commit 99a88826e5e8cfa25c5f8a88c12799d33114729c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 20:34:58 2007 +0300 configure.ac: Actually use -lrt in monotonic clock test If we need -lrt to use clock_gettime, then make sure we link with it. commit 1c80e04f876e9254b93ef87eadfcff71234340c6 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 20:08:31 2007 +0300 configure.ac: Disable D-Bus config API support by default This is problematic, so don't even bother with it unless someone wants it. respeclaration is dead, long live HAL. commit c46663367329615bd2c9b63e93c9534036e5a2ae Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 1 18:32:09 2007 +0200 GLX/DRI: Remove some unused variables. commit 17cb4f64e3c39725e83b1e311c09422d7e1c0e52 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 1 18:13:18 2007 +0200 GLX_EXT_texture_from_pixmap: Use client provided texture target when available. This prevents situations where the server doesn't use the target the client thinks it does, usually resulting in the texture being sampled as all white. commit a4197db9504adae6af005b2218eee36b8af0d98b Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 14:04:51 2007 +0300 GL: GLX: Make sure glxbyteorder.h is distributed commit ad7421fc764e2b82e20d90f12225a03a1d636f18 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 08:30:00 2007 +0300 Bump version to 1.3.99.1 for development This is not actually .1, just bumping for a different devel version. commit 43e71a54502d9ab28ece7f6296d1416d60948dad Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 08:16:35 2007 +0300 XFree86: xf1bpp: Fix previous build system commit Amateur error. commit 6d6bc93b0a13c5356544561e326d4aedf33e61c2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 08:11:22 2007 +0300 Build system: Add missing files A couple of headers weren't added to the build. commit 505ec436af3a173e0ba32c6f14b4cf9837a553eb Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 08:11:08 2007 +0300 XFree86: Properly clean up after ourselves CLEAN is not a useful variable. CLEANFILES/DISTCLEANFILES, on the other hand, are useful variables. commit 1ace9770fed4a2ba354ff06a96189428beb36088 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 08:10:38 2007 +0300 Build system: Non-dtrace distcheck hacks automake 1.10 really wants foo.c for foo.O, so give it some dummy files to deal with if it really needs them. commit cacbdf18ee771d43228c2e96e8ef9a32251ceb55 Author: Daniel Drake <d.drake@mmm.com> Date: Wed Aug 1 08:08:37 2007 +0300 Remove duplicated licenses Some files had two copies of the same license. commit bd49332e4772bd57ffb76c829f0e4770ab876057 Author: Daniel Drake <d.drake@mmm.com> Date: Wed Aug 1 08:07:08 2007 +0300 Add proper COPYING file I went through the entire xorg-server distribution and aggregated all the licenses I could find (except the questionable GPL files, see my last mail). There are many many permutations on essentially the same license terms, but I have been pedantic and treated slight differences as separate licenses. Here is a description of the process I used: tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 cd xorg-server-1.1.1 find -name '*.c' -o -name '*.h' | xargs gvim egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ | grep -v "\.in$" | xargs gvim cd .. tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 diff -urNp xorg-server-1.1.1 xorg-server-1.3.0.0 git clone git://anongit.freedesktop.org/git/xorg/xserver cd xserver git diff xorg-server-1.3.0.0.. For each file, licenses have been aggregated as follows: If 2 files have identical license text but different copyright notices, the copyright notices are aggregated and the license text is included only once. Note that by identical I mean really identical, i.e.: 'AUTHOR(S)' is not the same as 'AUTHORS' 'KEITH PACKARD DISCLAIMS' is not the same as 'KEITH PACKARD AND COMPAQ DISCLAIM' Otherwise, licenses and accompanying copyright notices have been stacked. When going through the changes from 1.1.1 to 1.3.0.0 then HEAD, licenses have been added and removed (so I have reflected this since the original version of my COPYING file). It's slightly concerning to see that even between 1.3.0.0 and HEAD, new license permutations are being added. I'd suggest that a primary license be chosen and this would be indicated at the top of this COPYING file. commit 51b735394f0aa9f953f9c320617c7a56028ec458 Author: Daniel Drake <dsd@gentoo.org> Date: Mon Apr 30 11:37:46 2007 -0400 [PATCH] xserver: Add COPYING terms I went through the entire xorg-server distribution and aggregated all the licenses I could find (except the questionable GPL files, see my last mail). There are many many permutations on essentially the same license terms, but I have been pedantic and treated slight differences as separate licenses. Here is a description of the process I used: tar xvjf /usr/portage/distfiles/xorg-server-1.1.1.tar.bz2 cd xorg-server-1.1.1 find -name '*.c' -o -name '*.h' | xargs gvim egrep -Rli "permission|copyright" * | grep -v "\.[ch]" \ | grep -v "\.in$" | xargs gvim cd .. tar xvjf /usr/portage/distfiles/xorg-server-1.3.0.0.tar.bz2 commit 7fa58385724fa7f441107a1793b601ba3dcb1f4c Author: Arkadiusz Miskiewicz <arekm@maven.pl> Date: Wed Aug 1 08:01:28 2007 +0300 XFree86: xf1bpp: Fix parallel build One of the constructs wasn't parallel-build safe: fix that. commit 18ab4d559409d4b682aab99fb75f8d861122eab6 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 07:27:53 2007 +0300 Darwin: Remove missing file Xserver.m is missing and still hasn't been added, so just remove it for now. commit 0bd6fe7401b2524cf34793c0b0c642e3d32fae00 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 07:27:30 2007 +0300 Config: Add missing include commit 48b3034d13bbbb69072eb11f4579389cc32b0850 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 07:01:51 2007 +0300 Config: Add current FDI file Add the FDI file we're using at the moment, until it gets into upstream HAL. commit 82b720cf3e09d8a6adcd40b25c4d48b34ba1ae80 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 06:57:11 2007 +0300 Config: Fix merge detritus commit 6b055e5d9751e3679ff98065e43225ec8a960053 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 06:55:36 2007 +0300 Input: Fix stuck modifiers (bug #11683) Disclaimer: It's 6:51am. I'm trying to be as understandable as possible. What was happening previously was this: * Press Alt * Extended event generated and processed: state is now Alt down once * Core event generated - keyboard switched: inherited state is Alt down once - event processed: Alt down twice * Release Alt * Extended event generated and processed: state is now null * Core event generated and processed: Alt down once If we switch the order: * Press Alt * Core event generated: - keyboard switched: inherited state is null - event processed: Alt down once * Extended event generated and processed: state is now Alt down once * Release Alt * Core event generated and processed: state is now null * Extended event generated and processed: state is now null When we carry over the previous state, it needs to be the _previous_ state (state and modifiersPerKey), assuming that we're going to catch now-core events for any of these. For example, if Ctrl is held down as we pivot, we need to carry Ctrl over with a count of one, for which an extended + core release will then clear. Carrying over the union of the previous state _and the state resulting from the immediate action_ was what broke things. commit 0e0174d45ecbeb7b6dddc4af53da9d6211038e0e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 03:30:07 2007 +0300 XFree86: Allow disabling of HAL If NoAutoAddDevices is given as a server flag, then no devices will be added from HAL events at all. If NoAutoEnableDevices is given, then the devices will be added (and the DevicePresenceNotify sent), but not enabled, thus leaving policy up to the client. commit cd8e99e56ec5d02026e401cc15e0f8d75f2a4727 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 03:29:12 2007 +0300 Input: Don't enable devices when we open them Thanks to Xi's braindead design, it's otherwise impossible to query input devices without enabling them. Hurrah. commit 0a31db14b7c7c21ef550dbcc73a9f649f3613cbe Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 02:54:14 2007 +0300 Config: D-Bus core: Fix hook removal Make sure we properly initialise the entire hook when adding it, and bust out when we're done removing. commit 89f628394f7d831f2ba1e45c5884c3983bef6031 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 02:08:02 2007 +0300 XFree86: Input: Fix whitespace commit aec0d06469a2fa7440fdd5ee03dc256a68704e77 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Jul 31 16:33:37 2007 -0700 Fix a crash when rotating the screen. Remember output->crtc before setting a NULL mode because RRCrtcNotify now sets output->crtc to NULL. Use the saved crtc to set the new mode. commit a93033b0bc14ed0bb95c680ded26b63cfe5fd1d3 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 01:53:08 2007 +0300 XFree86: Module: Bump input version config_info changes the size (and ordering) of DeviceIntRec, so bump the input major. commit 1150969b826e2bd6d8345fa245ed499f2e4cf101 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 01:52:20 2007 +0300 Convert all my license statements to the standard form Convert all my license statements to the standard, accepted form: cf. <20070717142307.GD13478@fooishbar.org> http://lists.freedesktop.org/archives/xorg/2007-July/026451.html keithp's license on configure.ac changed with his verbal permission. commit 8658f5d923a69fb55b4cd9e1e84c2d271679f6e2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 01:10:50 2007 +0300 Hotplug: Add HAL support Add support for HAL-based hotplugging, in which we just get the list of input devices and properties from HAL. Requires an FDI which is not yet in mainline HAL. commit aa75b3481724834da2f855d8dd2ff36074bd5706 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 01:09:07 2007 +0300 Hotplug: D-Bus: Dispatch harder Dispatch until we've got nothing left to dispatch, since apparently dispatching will only ever fire a single message ... commit 4d238c5c67461ed747aa6c021d1532734f4c63fe Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 01:08:26 2007 +0300 Input: GetPointerEvents: Deny events from devices without valuators For some reason, my keyboard has 25 mouse buttons, but zero valuators. This causes GPE to blow up spectacularly, trying to get (and set) co-ordinates from devices without valuators. For now, just prevent this from ever happening, and whack a dirty great FIXME in. commit 7c9e8fd56e1830f7a971187d14877ebbdf35c4b0 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 1 00:19:14 2007 +0300 Input: Allow enabling and disabling of devices Add DEVICE_ENABLE to KDrive and XFree86 to allow us to enable and disable devices on the fly. commit 0afeb0241a83796575da827bd81375c99ff10af5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 20:48:57 2007 +0300 DIX: Clean up null root cursor handling Move the null root cursor handling out of main() and into CreateRootCursor. commit 62ec6d09b3adaea82ff52c8672e6f611c15ec56d Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 20:47:28 2007 +0300 dix.h: Remove duplicate ffs() prototype. commit 4d3379d418a781938358e511fd41deb4115a032c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 14:31:35 2007 +0300 Fonts: Fix builtin fonts Make sure the font path is always 'built-ins' when we use built-in fonts, rather than having it as a fixed path for a while, then clobbering it halfway through startup. commit 9ac7e8a559fe6008cafc95e8264680c50e72ba19 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 14:30:53 2007 +0300 Hotplug: D-Bus: API version 2 Use uint32s instead of int32s where practical, and add an API version request. Also, try to return all devices added, not just the first, and box device arguments. commit 1cdadc2f43d9069572814510d04b1a560c488fcb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 14:28:58 2007 +0300 Hotplug: Separate D-Bus into core and hotplug API components Break up D-Bus into two components: a D-Bus core that can be used by any part of the server (for the moment, just the D-Bus hotplug API, and the forthcoming HAL hotplug API), and the old D-Bus hotplug API. commit 8bfa41e1bf3f588780d7e9f6f900b1fde0570a7e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 04:29:43 2007 +0300 gitignore: Add automake lex/yacc wrapper commit 06dd2748da8b7af343f6cab409b9f351567de5f3 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 00:27:40 2007 +0300 configure.ac: Properly check XFree86 proto modules Not sure why these are conditionals, anyway. This one really needs revisiting, but at least causes configure, rather than the compilation, to bomb out. commit fd10312b4224197b937d9e696b53dc2a16c8912f Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 8 00:26:26 2007 +0300 configure.ac: Fix KDrive VESA/fbdev conditionals Make sure we actually respect anything explicitly given on the configure line, instead of just stomping it with what we detect. commit f37612c6f2375ca904411e6caa0be19fa24f032c Author: Nicolas Trangez <eikke@eikke.com> Date: Sun Jul 8 00:23:57 2007 +0300 Hotplug: Remove unused function definition from hotplug.h configDispatch hasn't been used in a long time. commit 951c058e7800308f7c472e77178c14400f45c1b3 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Jul 31 14:23:58 2007 -0700 Don't fail compScreenInit if the driver added its own alternate visuals. commit 722d73a0ef54c2ebd8ef38c4a6afa0e7c5aa3e30 Author: Dave Airlie <airlied@redhat.com> Date: Tue Jul 31 10:34:56 2007 +1000 Revert "Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms." This reverts commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4. This screws my cursor up just starting a bare X server on Intel, I get the X more like <> than ><.. commit 57b5b97a0710fc043b8a1c01d756cdb73dfe4567 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Jul 29 11:02:47 2007 -0400 ReduceCompositeOp returns a Render op, not a boolean. commit f62beb6f3609e8b6e61325ac89017590811bbd07 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Fri Jul 27 13:23:15 2007 -0400 Remove all trace of Option "BiosLocation". This code was deeply dangerous. If anyone actually had a use for this code, we should find a better way of doing it. commit 486fd4145aed93093d1f1655de40c0a8582bb8b1 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Fri Jul 27 13:10:39 2007 -0400 exaGetPixmapFirstPixel: avoid framebuffer readbacks if possible. If the pixel in framebuffer memory isn't modified since we uploaded it, we can just read from the system memory copy, wihch avoids both a readback and an accelerator stall. In principle this function is still wrong, and all the framebuffer pixel access should be going through (w)fb so we can get pixel layout corrections. commit 50cb6c7e4419e067c1f080d1de940811d21fc725 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Jun 15 15:29:00 2007 -0400 Don't map the front buffer in libdri if the ddx driver doesn't set the size. This lets drivers map the front buffer themselves by setting dontMapFramebuffer. commit cec793ef7a6dac9fa2a6538683e363a72672cde9 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 26 11:49:46 2007 -0700 Include picturestr.h in xf86Crtc.h to pick up definition of PictTransform. commit 27845fe197b74bf453d99f352e83513e201fdaae Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jul 26 09:32:16 2007 -0400 libconfig shouldn't be an installed library. commit 276f8e2ca42eec982d16b86d67217d68ff98f81d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jul 25 17:42:23 2007 -0700 Include comment/copyright/license for AC_DEFINE_DIR in acinclude.m4 commit eba2be448bdd298ff2f7b8603bd9e976da1fdf72 Author: Brice Goglin <Brice.Goglin@ens-lyon.org> Date: Wed Jul 25 20:53:45 2007 +0200 Minor fixes in cvt and gtf manpages Reported by "A. Costa" <agcosta@gis.net> in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432065 commit 8d230319040f0a7f72231da2bf5ec97dc3612e21 Author: Gustavo Pichorim Boiko <boiko@mandriva.com> Date: Tue Jul 24 16:19:19 2007 -0300 Fix the output->crtc initialization in the old randr setup commit 0f057ebb272f0ee0b51b9ab37d4b07da0924fec4 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jul 25 17:04:04 2007 +0200 Fix RandR 1.2 conversion of two colour to ARGB cursor on MSB first platforms. Doesn't seem necessary to do anything here... commit 5b424b562eee863b11571de4cd0019cd9bc5b379 Author: Gustavo Pichorim Boiko <boiko@mandriva.com> Date: Mon Jul 23 18:27:41 2007 -0300 Set the crtc before the output change is notified Set the new randr crtc of the output before the output change notification is delivered to the clients. Remove RROutputSetCrtc as it is not really necessary. All we have to do is set the output's crtc on RRCrtcNotify commit 7da38bb6a15247948c90e00a59230453fcf13cbd Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jul 21 15:27:40 2007 -0400 Partial redundancy elimination in PropertyNotify generation. commit 0f91abd5c68eb044d09733d18ef0f6b8ed128200 Author: Julien Cristau <jcristau@debian.org> Date: Thu Jul 19 20:37:26 2007 -0400 Fix alpha build failures Don't include <asm/pci.h> in os-support/linux/lnx_axp.c, use "lnx.h" and <unistd.h> instead commit dc9c5196282ba61bd542e198dfe0d53d93181591 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Jul 19 13:28:00 2007 -0700 Make PreferredMode option in config file override EDID mode preferences. When the PreferredMode option is selected in the config file, remove the M_T_PREFERRED bit from all other preferred modes to force the config file mode to be selected. commit 73a93c5a6b68f7ba21f9e75f50b1032603a3b39e Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Jul 19 13:26:36 2007 -0700 Query modes on disabled (but not ignored) outputs. Code that disabled mode detection on disabled outputs would confuse applications by listing said outputs as connected but without any modes. This makes the disabled state in the config file affect only the initial configuration and not subsequent modifications by RandR. commit 9fc36a391c11170cde1a28f548a2cae5f6f20d5b Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 14 12:36:15 2007 -0700 Make pending property changes trigger mode setting. The DDX code was ignoring pending properties for computing when mode setting was required. This meant that configurations differing only in property values would not cause the mode to be set. commit aed6569309223ecc7e26fa84e4d430e422455607 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jul 14 15:21:46 2007 -0400 Refactor how Composite adds visuals to the screen. Besides being slightly simpler to read, it's now trivial to add a depth-16 visual to a depth-24 screen just by adding a line for it in the alternate visual list. Visuals for indexed depths are slightly tricky still. commit 21bbd7d64b5f74915afd7a312e589654442f3461 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:42:50 2007 -0500 Delete some pre-dlloader debugging scaffolding. If your loader is as bad as elfloader, then it makes sense for the server to have some stubs for you to assign to / break on. However it is no longer 1996. commit 1f71f0c0574bafb36da20fec669f9a1138c69a47 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:28:03 2007 -0500 Remove (long-)deprecated xf86EnablePciBusMaster. commit 0a63d874e9c2f4fe4b38839a744461f9d41040b2 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:22:49 2007 -0500 Always normalize the module name. commit 9a1c6afd12caf0143483f72bfbba0c4c3daaa6ff Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:19:50 2007 -0500 Remove dead code for screen crossing. commit 8ca2fe8914af1a67bf597f99025e5cbe9b08da57 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:11:13 2007 -0500 Delete dead module test code. commit e2413cc7cae4e578b8e9b408ea85bef596b03ea3 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:07:37 2007 -0500 Remove MEMDEBUG This existed (but may not have worked) in the monolith, but is gone now. commit d1d65a84150dfbc3a4dbe108f237a85ab6e09bbb Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 21:01:08 2007 -0500 Dead ifdefs for BITMAP_SCANLINE_UNIT == 64 This appears to be a legacy of cfb24 not being smart enough to deal with this case. But since cfb24 unexists, die die die. commit cbe74394a5ed21ed80c0aab6eefd2716122cce11 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Feb 6 20:44:34 2007 -0500 Nuke dead X -configure code. commit 5657fb065cc79ba3ca5a836f45637ba9894f9abf Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Jul 17 12:12:02 2007 +0200 exaDriverInit: Fail if pScreenInfo or a member of it is invalid. EXA may attempt to use the invalid value and crash otherwise. commit bbe7ce10fa93017374d7a4611427b70a22d7507a Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jul 16 17:25:59 2007 -0700 Update pci.ids to 2007-07-16 snapshot Remove nvidia ids in extrapci.ids that are now in pci.ids Add nvidia ids to extrapci.ids that are in xf86-video-nv but not pci.ids commit ac979c165128704116cd40086320b6edc79018e2 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 14 12:13:17 2007 -0700 MakeAtom needs length without trailing NUL. sizeof("string") includes NUL. I made a mistake in some new code using MakeAtom, passing the size of the string instead of the length of the string. Figuring there might be other such mistakes, I reviewed the server code and found four bugs of the same form. commit 393171034c15d8a1b82232b8f9455a358035e932 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 14 09:03:40 2007 -0700 Add RandR reflection support. Replace the ad-hoc transformation mechanisms with matrices. Prepares for more general transformation as well. commit 8773ad023eb28950eb0f802d2ca31a67f84adddc Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 14 08:47:50 2007 -0700 Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections. When checking how to validate the selected mode and position against the current screen size, the test against 90/270 rotation did not mask out reflection, so that when reflection was specified, the 90/270 test would never succeed. This caused incorrect bounds checking and would return an error to the user instead of rotating the screen. commit 881a620b4d6ea7a54af14c8f8fbe6924c9aa9291 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 14 08:45:10 2007 -0700 When sync'ing logfile, also flush it. When the logfile is set to sync, the actual sync occurs whenever the log file is flushed. If the log file is not also set to flush, no syncing occurs. commit 031b009ea678809bf1ddca883c2082b304c408c9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jul 13 14:54:45 2007 -0700 Use %S instead of %s for strftime seconds when printing build time commit c0e91777a9874fe2cd9a7e9180263f512c1e8f8d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jul 12 16:37:11 2007 -0700 Add __SOL8__ to xorg-server.h.in since xf86-input-kbd needs it to build commit 6b4231e3b5b49b731c9a00930ae465fff8539831 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jul 12 16:36:27 2007 -0700 Use kbd driver when xorg.conf specifies "keyboard" or "Keyboard" (bug #11301) X.Org Bug #11301 <https://bugs.freedesktop.org/show_bug.cgi?id=11301> Sun Bug #6560332 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6560332> commit 9fcb30ebf7b7b2137955f759e95c1d58c4f27a11 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jul 12 13:00:32 2007 -0700 Make SOLARIS_INOUT_ARCH substitutions work better with automake-1.10 commit 7c0ca27f6dd0a800dc27429a33dbc8e133f9a9c1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jul 11 17:15:29 2007 -0700 "fbpict.c", line 215: void function cannot return value commit 0a4e9311158ed3ecda0722640f860ace2f87a97e Author: Hanno Boeck <hanno@gentoo.org> Date: Thu Jul 12 10:17:07 2007 +1000 xnest: fix linking since dbus Fixes bug 8955 commit b2f9ca6ac400d426d7a1ef0162f7e7ce28288dd1 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jul 10 21:33:34 2007 -0700 Redirect fix: Manual + Automatic - Manual = Automatic A window with redirect manual *and* redirect automatic which loses the manual redirecting client becomes redirect automatic. commit 561989f2f0fc31e3d3bf8df978a9cb3d4c85af59 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jul 10 21:06:51 2007 -0700 Generate ChangeLog file for make dist. Copy Makefile.am snippet which generates a complete git change history to the ChangeLog file during the distribution generation process. commit e316fa59fea8b7b18cdf3a227890351a9567ec65 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Jul 10 14:20:55 2007 -0400 Add per-monitor config file option for maximum pixel clock. commit ffdf8f3e452638e6b050fccabee465d6c0300f45 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jul 10 13:56:38 2007 +0930 DeliverEventsToWindow: ensure that genericMask has a defined value. commit 161624a5a45808fd56141dc2c64be729944f03ed Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jul 10 09:02:40 2007 +0200 GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled. commit 4abd00dab7e648dab8172f6009371e4e63d0c521 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jul 10 09:02:08 2007 +0200 Make sure DRI drawables are cleaned up when client dies. The previous scheme didn't work when the client didn't create the core drawable, e.g. the root or composite overlay window. Use refcounting via special client resources to fix that. commit 583e988b9f7cfb9293144c8309023c0dd1766715 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jul 10 09:19:02 2007 +0930 Install geext.h, otherwise drivers won't build. commit 9809715afaafee9baf2aef348c1ebda7e8b3f076 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jul 9 10:42:03 2007 +0930 Change CheckMotion to ignore non-pointer events but acknowledge XI events. Call CheckMotion from ProcessOtherEvents() to make sure absolute XI events update the sprite before an event is sent. commit 62efc3951a96648cf975302aa6651cb67b87fa64 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jul 6 17:00:20 2007 +0930 DeliverGrabbedEvent: stop segfault when gemask == NULL. commit 3312e4dd5e055b2cb445b5d5c617aa7a611eedc1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jul 6 16:41:52 2007 +0930 Call CheckMotion for all core events. We need to do this to update the sprites x/y coordinate before we assemble a button event. Absolute devices may send a buttonEvent with valuators attached. If we don't update the sprite before assembling the event, the valuators are lost and the button press is delivered to the previous position of the device. Doesn't have any effect on relative devices. commit c1a6841a64576b7e688e9ca0d3e0db8acf52d4ae Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> Date: Tue Jul 10 10:08:44 2007 +0930 ProcX{Change|Query}WindowAccess: change device list from char* to XID*. commit 5957aa6fdc580ccad4557eeefa0636ffad823f33 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jul 9 08:47:05 2007 +0200 Fix regression from recent composite changes. One pWin->redirectDraw test was converted incorrectly, causing incorrect rendering in some cases. commit 5ccc09b18244f91a06b3bea20b02a97280d1a229 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jul 6 15:43:08 2007 +0930 Use the same struct for generic event masks throughout the code. Renaming those structs too. Previously grabs were using a different struct than windows, which was reasonably stupid. commit bcb23527421578bd4c9397d4c2c19cbefa22fc59 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jul 5 15:56:25 2007 -0400 Clean up unused #ifdefs from fb. commit 9ff7ff2fda30f334515b16ef0867c1500c41bc0f Author: Keith Packard <keithp@neko.keithp.com> Date: Wed Jul 4 23:38:27 2007 -0700 Fix MEMORY SMASH in XkbCopyKeymap. XkbCopyKeymap reallocates the destination keymap when it is not large enough to hold the source data. When reallocating the map->types data, it needs to zero out the new entries. The computation for where to start bzero'ing was accounting for the size of the data type twice, once implicitly in the pointer arithmetic, and once explicitly with '* sizeof (XkbKeyTypeRec)'. This would often lead to random memory corruption when the destination keymap had existing map->types data. commit 9131d560a0d42067cc4e726e445e060216c9acdc Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Jul 5 02:47:34 2007 -0300 Postpone options variable assignment to fix segfault when we got a device but its driver is incorrect. Also if (!ki && !pi) can never be true. This one also adds the device option field. commit 41b485d5507821e41c3281c3c565647ae7582101 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Jul 5 02:40:07 2007 -0300 kdrive must to know that devices are unplugged. commit a92dc6b5295e4f352115fed2856169929819863f Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Jul 5 02:28:14 2007 -0300 Remove redundant linking in kdrive. Fix configure.ac variable name and clean it up a little. commit 41b5155c8be75c4e171c0f64616cc09598b8ec54 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Thu Jul 5 01:57:41 2007 -0300 For each kdrive server put a dependencie on its own libraries. commit 16e429bcbf2f62cfc58162ab2857afb7376dda41 Author: Jonathan Lim <jlim@sgi.com> Date: Wed Jul 4 20:08:49 2007 +0200 Bug 5000: Fix domain support for SGI Altix commit f106c04b627d9f57b38627971dc79c75129e66d6 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jul 3 14:47:19 2007 -0700 Have Composite always report server version. It was reporting the lessor of the server and client versions, which doesn't make sense with the 0.4 semantic change in clipping. commit 4f88d68bdb90cc7d12170355105b4fd020acd306 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jul 3 14:43:17 2007 -0700 Force advertised Composite version to 0.4 instead of using header version. Installed protocol header version may be newer than the server code base. Use internal version number for Composite extension to make sure the server doesn't advertise capabilities it doesn't support. commit 866f092ca0160a366add01b48ad03438926c4d16 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jul 3 14:29:11 2007 -0700 Make Composite manual redirect windows not clip their parent. This patch changes the semantics of manual redirect windows so that they no longer affect the clip list of their parent. Doing this means the parent can draw to the area covered by the child without using IncludeInferiors. More importantly, this also means that the parent receives expose events when that region is damaged by other actions. commit 2a75c774975b50dd4e71b7dbea7bd65ca2984a43 Author: Dodji Seketeli <dodji@seketeli.org> Date: Tue Jul 3 11:00:29 2007 +0200 ExaOffscreenMarkUsed: Don't crash when there's no offscreen memory. commit 0ede39a25cf5b0b6c2c89677f810c21ce42b95df Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jul 3 10:55:13 2007 +0200 Fix build when int10 doesn't use x86emu. commit 028a00bc518dc6908839e8ce7c50ab1837100945 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Jul 2 18:41:55 2007 -0400 Make x86emu's I/O cycle tracing more useful. Print debug messages only when the appropriate debug bit is set in the 8086 state vector, so you can focus in on the call you're actually interested in. commit 00e8295b7e0c7c0ba97707903004272818e3d87d Author: Gero Mudersbach <geroxp@web.de> Date: Mon Jul 2 11:40:11 2007 -0700 Bug #10814: Add needed quirk for Samsung 225BW like the 226BW. commit 667e95f2e8389d9f23c50446d6d664eddd16d260 Author: Eric Anholt <eric@anholt.net> Date: Mon Jul 2 11:36:11 2007 -0700 Correct the xf86EdidModes.c file description. commit 3de1f0d03b329b01856f664651db23ffefb58646 Author: Eric Anholt <eric@anholt.net> Date: Tue May 29 10:08:58 2007 -0700 Fix documentation of association of outputs to monitor sections in xorg.conf(5) commit c1a16bdcfe7aa907fe78f27dc606a8e5a2699952 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 27 18:08:03 2007 +0930 Add 'evfill' field to GEExtensions. We need this to allow extensions to fill in extra data for an event before it is sent to the client. This is probably to be used like FillUpEventsFromWindow(). commit 4d76075dbb618a47ff9fc15c4be2e2d34210fa8d Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Fri Jun 29 14:06:52 2007 -0400 Death to RCS tags. commit 2691c05fd647d9fa10f791ac397ecb9c423a076f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jun 29 11:56:18 2007 +0930 Make sure window->optional is allocated before assigning it. DeletePassiveGrabFromList() may remove the window optional, so we need to re-alloc it if it isn't there anymore. Thanks to Colin Harrison for spotting the bug. commit f7f3fe7fe7233a2ffc43106c48f44cbbd82b7c19 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 28 18:59:05 2007 -0400 Remove the remnants of OS/2 support. This has never worked in any modular server release, and as far as I know was never tested in 6.7 through 6.9. commit 8a06ff9ffa4816d192e58e43e7fe569b97b4dd7c Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 28 16:41:28 2007 -0400 Fix another usage of MAX_PCI_DEVICES. Fixes cases where the VGA device is above the 128th device on the system. commit 928836a5abd85466e920eb487fab9ccb295e0c5b Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 28 16:29:28 2007 -0400 Bug #10770: "Inputdevs" isn't a valid config file keyword. commit 62f43d8b33f67d8f3d0bd65787ffae9e6b634d65 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 27 16:24:42 2007 -0300 Relink properly all kdrive servers when changes happen. commit 3860996d5666b76600b1537e2cbd58e36b086308 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 27 16:06:12 2007 -0300 Remove double-defined. commit 1e189ed1daab58c1de67d387306fde0a9e7984a4 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Jun 27 10:16:40 2007 -0700 Handle tileStride > 1 in fbEvenTile. Patch courtesy of James Jones. commit bf1ad1aa4270dccf1540943d97e80b317c0adb56 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 27 09:19:28 2007 -0400 Add VBE PanelID support. Originally found only in the i810 driver. commit d73835efda4995a310188537233a984f4b73628d Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 27 03:34:13 2007 -0300 More janitor work. Remove 'defined but not used' warnings from kdrive and some minor cosmetic. commit 38f8e536684193c3f70b23be22d818053c676072 Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 27 03:19:37 2007 -0300 Janitor work. Remove 'defined but not used' warnings from xorg and other cosmetic. commit 1340f34ec98c41781164018d43bd7bb858d8132b Author: Tiago Vignatti <vignatti@c3sl.ufpr.br> Date: Wed Jun 27 03:04:55 2007 -0300 Fix kdrive XKB. commit 08779c62ba2f4cbfa47e3cf738daf8abd74b60cf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 27 11:16:55 2007 +0930 Reset grab->next to NULL when we're creating a grab. This is definitely necessary in CheckDeviceGrabAndHintWindow (thanks to Paulo Zanoni for spotting it). We're resetting it everywhere else too, just to be save. commit 49136d3e9fe2d065090ee90c18a49f65fb027c9f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 26 19:43:54 2007 +0930 mieqEnqueue: use modulo for queue tail wrapping. This was previously committed by Michael Daenzer, but was lost during a pull. commit 8396bf7c8b4eb6b8f2d1e1ef19887064c69591da Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 26 12:58:37 2007 +0930 Init genericMasks to 0, make sure list is NULL terminated. commit 9725516b4274ceaf9d6caf372c5439b4c9db2316 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jun 22 17:05:21 2007 -0700 Split checks for dtrace & getpeerucred() commit edb9ccf3ecb4e35a840aa13815979c5fbd73f32d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 25 10:51:38 2007 +0200 Make sure DRIScreenPrivIndex is -1 when no DRI screen private is allocated. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=11340 . commit c4e850a781e3b85631cb386d24efcca2a835d4c9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 25 13:38:25 2007 +0930 Quickfix to stop core key events from doubling up. commit 4c601b904ee6fb01da3343ff9ef00d36f1341fcb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 25 10:53:05 2007 +0930 configFiles(): don't return anything when declared as void. commit bec4e47d128ec40b58a2c9aae475f6a6fc4323c3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jun 25 10:51:42 2007 +0930 NULL-terminate device list when synthesizing core devices. This fix is required for 93ca526892c0d22afa05cce6496198c652043a19 to work. commit 8e5102b9f01821048e72e7f068193a0b3e1816f9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 15:47:48 2007 +0930 Set the detail field for DeviceKeyEvents to the keycode. (cherry picked from commit 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7) commit 87564543d92c1ee1f8cb6fb9716a15d693e08cf5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 19 18:20:05 2007 +0930 Only decrement buttonsDown when the button count is greater than 0. Device drivers flush their buttons on device init and cause a button down event to be generated. If we unconditionally decrease the buttons, we won't be able to ever get a passive device grab. Format documentation for CheckDeviceGrabs to make it readable. (cherry picked from commit 3e894974cdd6a75683d4601f71622d1da7ec4395) Conflicts: Xi/exevents.c commit 24ee89fd60f489f2d3af0399e0d667057df74d02 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 19 15:31:56 2007 +0930 Add a few comments to devices.c commit 93ca526892c0d22afa05cce6496198c652043a19 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 13 15:28:15 2007 +0930 Split up memory for devices configured in the config file. If we're using a continuous block here, we segfault when a device removal triggers an xfree call. commit b141b85c254afff3ce2221d899787fab3dc295bd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jun 13 15:26:03 2007 +0930 Check for identical grabs when adding a new passive grab. If an identical grab exists, remove the old one and prepend the new one. X.org Bug 2738 <https://bugs.freedesktop.org/show_bug.cgi?id=2738> commit 19cde59c41cf167cc609debfee75bfc015beac12 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Fri Jun 22 00:38:50 2007 -0400 In fbFill() make sure the drawable is validated when pixman_fill() succeeds. In fbSolidBoxClipped() don't return when pixman_fill() succeeds. commit d2177c80915f2fe2e8a5c948d4ba2fa51dbfbea2 Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Jun 22 02:08:21 2007 +0100 Skip driver mode detection/configuration when !vtSema. When the server is not active, make sure the driver functions related to mode setting are not called. commit 32c0dcc8c0d1edba5d7e418fd2dc916847a4f069 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 21 15:39:19 2007 -0400 xselinux: adjust the config file format to that expected by libselinux. This file will eventually be moved out of the X source tree. commit 2030e9e5395be43bd8eab15b65c21ca4c2f1e619 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Jun 21 15:37:18 2007 -0400 xselinux: use new libselinux support for context labeling. Remove all the config file parsing code and use the new lookup interface instead. commit 4d5df14f2c4a3108a8c8adfcf4766c0d1a9daad2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 18:24:30 2007 +0930 Save processInputProc before wrapping it and restore it later, instead of using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. This should be the correct fix now. commit f6f3322fc7562dbfccaf798b05d42ea222860ba8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 18:16:21 2007 +0930 Revert "Save processInputProc before wrapping it and restore it later, instead of" Mixed up source trees, this was a very bad fix. This reverts commit 8431f6083076cf1e701366767d8f8d32a628200f. commit 8431f6083076cf1e701366767d8f8d32a628200f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 17:00:41 2007 +0930 Save processInputProc before wrapping it and restore it later, instead of using a hardcoded ProcessKeyboardEvent. Otherwise we lose the ability to process DeviceKeyEvents after the first key press. commit 0c33dc152e372cdc8ae59d9a5696b0774bcd03b7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jun 21 15:47:48 2007 +0930 Set the detail field for DeviceKeyEvents to the keycode. commit e523859a952d49b20f3d10152cc0ef695d2c12a1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 20 17:54:38 2007 -0700 Include module name in "already built-in" message commit 5138f710a1574fef6f553f3fe2fccac0620d2584 Author: Arcady Goldmints-Orlov <arcadyg@nvidia.com> Date: Wed Jun 20 16:31:55 2007 -0700 Fixed fbSolidBoxClipped() to fill the right place. Changed an X2 to a Y1. Signed-off-by: Aaron Plattner <aplattner@nvidia.com> commit c9b79a355845c895aca8303a39798264d80b6212 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jun 20 18:56:06 2007 +0200 exaPolyFillRect: Don't track damage explicitly. All callers should already do it. Also don't leak pReg. commit 87966c5d2889873cea6cbc16b7e4399490dfaec1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Jun 20 18:42:00 2007 +0200 exaGetImage: Don't migrate or try to accelerate for 1x1. This is mainly to avoid wasting effort for XSync(), but just reading a single pixel directly is probably faster than DownloadFromScreen anyway. Though in light of the latter, even larger thresholds might be useful. Also move the swappedOut check before the migration checks because migration can't actually occur when swapped out. commit 1f97a7647606226cde61d6ad7a94f2b0b571a06c Merge: 5dee64fc9 2e7fef7d0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 19 17:20:52 2007 +0930 Merge branch 'master' into mpx Conflicts: dix/devices.c hw/xfree86/common/xf86Xinput.c hw/xfree86/loader/xf86sym.c mi/mieq.c commit 40f27a2df4906d9ceb1c78f6163a62c497321535 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jun 19 09:11:16 2007 +0200 mieqEnqueue: Make local queue tail variables unsigned. So the modulo arithmetic actually works as intended... thanks to Peter Hutterer for pointing out the problem. commit 5dee64fc99f34e091abce65d47c4b6f026ab4849 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 19 11:31:22 2007 +0930 Add a few comments to ProcXGrabDevice. commit 9e257029c760883c4ea0715d4fd06476f3fe8053 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 19 11:28:07 2007 +0930 Add implicitGrab field to GrabInfoRec. Is set when passive grab is implicit as result of a ButtonPress event. If this is the case, we need to store the XI mask as well as the core mask to ensure delivery of XI events during the grab's lifetime. Remove all core grabs on other devices when client issues a GrabPointer or GrabKeyboard request. Let's assume that the client really only wants one device to interact, so this seems like a reasonable solution. commit ab7a6d860d4a275a810a64b1ba7b13726ed10575 Merge: e9130b8ba 2e7fef7d0 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jun 18 16:51:13 2007 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c commit 2e7fef7d0837939e822c40b6ac77e7f0e66d57bd Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Jun 18 12:08:39 2007 -0400 Make xf86{En,Dis}ableInterrupts no-ops on Linux. commit 831d3b7f8d053aba649c8d04af3bef96376bdc3a Author: Lennart Buytenhek <buytenh@wantstofly.org> Date: Mon Jun 18 12:05:55 2007 -0400 Compile fixes for Linux ARM platforms. commit 562ca3f2f9005e7c5ed0a24b0759051ded2173e9 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 18 12:00:49 2007 -0400 In NewInputDeviceRequest, only call EnableDevice if xf86Screens[0]->vtSema is true, preventing unwanted behavior in the case where a device is added while the user is in a different VT. commit 3e894974cdd6a75683d4601f71622d1da7ec4395 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jun 15 17:16:16 2007 +0930 Only decrement buttonsDown when the button count is greater than 0. Device drivers flush their buttons on device init and cause a button down event to be generated. If we unconditionally decrease the buttons, we won't be able to ever get a passive device grab. Format documentation for CheckDeviceGrabs to make it readable. commit 42c2e14b254f6f882b3e79444360ab855db43e27 Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Fri Jun 15 00:14:02 2007 +0200 swap xOrigin and yOrigin in SProcRenderSetPictureClipRectangles. Fixes Xrender clipping rectangles when X server and client are of different endianness, shown by xterm 225 among others. commit 0aaf51546666f71e8d1711978bc7988ec2ecc7d9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Jun 12 16:55:26 2007 +0930 Zero deviceMask and genericMask when creating a grab via CreateGrab(). commit 78179ae827bb5d19abb1340084362bc51ad5c1e5 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 22:46:42 2007 -0400 Remove fbmmx.[ch] files commit eb2d7fe02f9cbca57b462bba05498e2d59316fbc Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 22:43:01 2007 -0400 Replace fbFillmmx() with pixman_fill() and remove fbmmx.[ch] commit f52ae237d3eec79ccd64cdd77271aeacc37af70c Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 22:02:39 2007 -0400 Require pixman 0.9.2 commit d1d85c04e248f46b1cf1b1d25fdd56aa69b8f0ee Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 21:25:42 2007 -0400 Delete fbBltmmx(). commit e2a720c9a17dc860ee0a858c2b21fd71e86cdcd0 Merge: 878cac71a 3f9adb18f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Jun 11 15:29:11 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: dix/dixutils.c commit 3f9adb18f127318d054f30a57e3a77176e14c692 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 15:19:27 2007 -0400 Port a few forgotten fbSolidFillmmx()'es to fbFillmmx(). Use pixman_blt() instead of fbBltmmx() in fbCopyNToN(). commit 878cac71aa0018deee861b297638c0744dba631b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Jun 11 14:19:37 2007 -0400 xselinux: use new libselinux support for private Flask definitions. Removes indirect dependency on kernel headers. commit d06099b38e8445e6e31f5178ffefcc31a71080ef Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 13:28:24 2007 -0400 Remove fbCopyAreammx() and fbSolidFillmmx() commit d4a034370c8ae71b2cc4fe824ceee58b19624f35 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 13:26:24 2007 -0400 Split fbSolidFillmmx() into a new FbFillmmx() function. Call that from fbFill(). commit 3210902a7334f3d8d6c18a34a3cb3f55803b0043 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 13:14:50 2007 -0400 Split fbCopyAreammx() into a new fbBltmmx() function; call this function from fbCopyNToN(). commit 8d5f4368eac1b259db3e61f877a4cc10f04efa2f Author: Clark Rawlins <clark.rawlins@escient.com> Date: Mon Jun 11 16:53:38 2007 +0200 Really make sure BUILD_TIME doesn't have a leading zero. date +'%k%M%S' still gives a leading zero in the hour after midnight... Add a leading 1 and remove it in xf86PrintBanner(). commit 54e023cec07aa7e392da36e11d0a4667b8341370 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Mon Jun 11 09:16:46 2007 -0400 Don't pass regions to pixman_image_composite() anymore. commit 5cbec267b6426960c90f6bcff1d051af5084538c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 12:38:41 2007 +0200 Make sure BUILD_TIME doesn't have a leading zero. It causes the compiler to treat it as an octal constant instead of decimal as intended, which could even cause a build failure in the cases of 08 and 09. Thanks to Clark Rawlins for pointing out the problem. commit 1aceec61ff203848576c47a1eab13f90a67d7176 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 09:23:19 2007 +0200 DRI: Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions. This is to avoid issues with redirected windows which are located partly or fully outside of a screen edge, resulting in unusual cliprects which the 3D drivers generally can't handle. The symptoms in such cases would be incorrect rendering or even crashes or hangs. commit 5d896e43fd056d935935b4eb66562791edc247a1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 09:23:19 2007 +0200 DRITreeTraversal: Stop walking tree when we've seen all DRI windows. commit 0fb44c6f9a0415184818ba8357a21ff920e907dc Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 09:23:19 2007 +0200 DRI: Fix build warning. commit 644f7ddc0cb029e2ebca43742fd8a46a1a3f4c9f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 09:23:18 2007 +0200 dixLookupClient: Use access parameter. commit 30a3297fed9af3a594aba0875a8f58a0a38b33fc Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 11 09:23:18 2007 +0200 mieq queue handling cleanups. In particular, fix handling of wraparounds in mieqEnqueue. commit c1a49a9269f14b6975a1a2c751bb179757373f11 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Jun 10 22:14:57 2007 -0400 GNU is wrong and ` is not left-quote. commit 67a0a4da1a225ee3bd6bbd1846f8141fe333c884 Author: Dave Airlie <airlied@linux.ie> Date: Mon Jun 11 11:55:11 2007 +1000 update xproto dependency to at least 7.0.9 commit c079cce9d884ab03f305b3fba4a4e1247c023480 Author: Daniel Ciocea <daniel.ciocea@eosystems.ro> Date: Fri Jun 8 18:12:21 2007 -0700 Fix sync polarity on Samsung SyncMaster 205BW monitor. need to use standard VESA sync polarity instead of the EDID provided -hsync -vsync values. commit 9c47b86bd9a4633fda5fd305a09ac8623187efa0 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jun 7 13:57:12 2007 -0700 Add new fb symbols to wfbrename.h. Avoids crashes when wfbComposite calls the wrong image_from_pict. commit 567b5bf765254a4ae9cc7711bb6acfa89a9fd61c Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Tue Jun 5 20:26:49 2007 -0400 Delete fbCompositeCopyAreammx() commit 49ed31c0b323dd8c5887a803c199875e6f2330d8 Author: Søren Sandmann Pedersen <sandmann@redhat.com> Date: Tue Jun 5 17:44:21 2007 -0400 Remove most of the fast-path MMX operations from fbmmx. fbCopyAreammx and fbSolidFillmmx are still needed by other code. commit dfbe32b5b828cc4e3da36a0e2e6ad641164eaa5e Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Jun 4 18:07:00 2007 -0400 Remove the old Kerberos 5 authentication code. Before you complain, this code hasn't seen material change since at least X11R6. It certainly does not build with any modern version of Kerberos. Anybody wanting krb5 auth to their X server should probably be using GSSAPI instead of internal krb5 API anyway. commit 793470a8356976ddd427280a738dfb6e1c0e4e70 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Jun 4 12:33:49 2007 -0400 dix: fix null pointer dereference in new resource lookup function. commit 75dece08fb72803d5116e6776e9f1534ff20e37b Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 4 09:09:20 2007 -0400 xf86PostMotionEvents[P] calls xf86SendDragEvents, xf86SendDragEvents unconditionally checks device->button->buttonsDown. Let's make it possible to have a device with motion, but no buttons. Without segfaulting. commit fbb9b203950e9d0e82574cde5b3e006b0e6b404f Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 4 06:59:42 2007 -0400 Let's not do a calloc and a free on every call to xf86PostMotionEvents. commit 3f4295e643ca56c40f33af7966e8efd367ef8749 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 4 06:48:06 2007 -0400 Add xf86PostMotionEventP, takes a pointer instead of a variable number of arguments. Bump input ABI to 1.1 since we export this. commit a4f3473c88370b8411e016ebab619cffd33e58f9 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 4 06:39:02 2007 -0400 Fully init the AbsoluteClassRec in InitAbsoluteClassDeviceStruct. (Specificly, we were missing the screen field.) commit 0cbc3a4da2ddb6e4f30f60d2bc7f405d31aa554a Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Mon Jun 4 02:03:44 2007 -0400 Print the build time as well as the date if we can. commit 9a7aaeb3f6ff79af60fde91cd0575a54ba0b9587 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 28 13:54:16 2007 +0300 XFree86: Input: Assume core events per default Assume that a device will be sending core events, unless explicitly specified otherwise. commit 94361cbba7f866144691f6f5e9251a550e0e0cb8 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 28 13:54:47 2007 +0300 XFree86: Input: Perform case-insensitive comparisons on option names commit e5ce982381c4092252d6b55fcefcc9a3cd21e656 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Sun Jun 3 09:40:37 2007 +1000 Include pixman.h from fb.h or compile of some files will fail Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> commit 90eb22656c34d2d08a8dccaf05e6d081c56bd7f3 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jun 2 16:49:26 2007 -0400 Minor cleanup/robustification to config parsing. commit f6a983533bdc84752562ef0be25b320678bf08a1 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jun 2 16:37:39 2007 -0400 Don't warn about default behaviour when autoconfigging. commit 21e8f4eb02842f877336db08c332d8ee4a381ee0 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jun 2 16:13:01 2007 -0400 Don't print lack of DRI support as an error in AIGLX init. commit 0e1384d8318637f75d04d3d1b7600f7cad40117e Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Jun 2 16:07:20 2007 -0400 Delete VDIF support; it was never used anyway. commit 66702f3c1c6c884e83744c72da173cc32f22b2f4 Author: Henry Zhao <henryz@localhost.localdomain> Date: Fri Jun 1 23:55:40 2007 -0700 Need to use minPitch in miScanLineWidth() to get the shrinked linePitch. commit 26b21157cf934ae387b15faa9ebb060120e6a0d6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 31 17:05:14 2007 +0930 Add a deviceMask to the GrabRec and don't interfere with passiveGrabs. This quickfixes event delivery problems with XI events when a grab was on. deviceMask is only used when the grab was from a ButtonPress to preserve potential XI event masks. This is not an ideal solution but it works until I have time to work on PassiveGrabs. commit fa877d7ff25c4ec45288e1fea70d4f5e1baf3ef3 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed May 30 13:06:45 2007 +0100 Fix mode validation against the maximum X/Y values configured at server startup, and not against the virtual X/Y parameters as they can change. This fixes an issue when canGrow is TRUE and modes get dropped when using the virtual X/Y parameters. commit 182ab3a3d5b28daa86e6d6155e76ce759687ae6d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 30 17:44:31 2007 +0930 Fix up comments for event.c commit b5db863945fa8045995b3bf742c44e40f2650f04 Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> Date: Wed May 30 16:15:15 2007 +0930 Allow value None for windows when setting ClientPointer. We need this for clients that need to set the ClientPointer but don't have a window on display yet. If used, it will set the device as the ClientPointer for the requesting client. commit 99eae8bea6724a24477375ad5b2d31cc4883cf6b Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Tue May 29 22:04:36 2007 -0400 I/O enable/disable update for the Hurd commit 3c6f1428489c1f71acd41066ea73ef4ae7c60f17 Author: Julien Cristau <jcristau@debian.org> Date: Tue May 29 22:01:30 2007 -0400 Make sure that the ramdac symbols are present in the server The former ramdac module is now built into the server, so its symbols need to be explicitly exported to drivers (Debian #423129). commit ee20c481eede0954f4a8bef5113979b101863c32 Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Tue May 29 14:54:27 2007 -0600 Remove wscons keyboard handling stuff that doesn't belong there anymore. commit 60de6c7ef9bdcee043f63e8e0d493e6feba6a9d0 Merge: 3a6549a16 2f13b7c11 Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Tue May 29 12:14:49 2007 -0600 Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver commit 3a6549a163aba26bf4ac58b050c493fba0df14c6 Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Tue May 29 12:14:23 2007 -0600 Make this build on OpenBSD commit 2f13b7c113c17239e382dd3640e9c29201d8ab1f Author: Drew Parsons <dparsons@debian.org> Date: Wed May 30 02:13:36 2007 +1000 Update Xprint build for pixman. Xprt links libfb, which now uses pixman. Update configure.ac to require module $PIXMAN for XPRINT. Also, use $(top_builddir) to reference libfb.la and other local libraries, rather than using the relative reference ../.. commit ba0b7d47ab0c24d5a29228f8af583044060464bd Author: David Nusinow <dnusinow@debian.org> Date: Mon May 28 21:57:04 2007 -0400 Fix for GNU/kFreeBSD commit 2267bf48b385c93243e26c3bb84ebb04c7fdb39f Author: Bastian Blank <waldi@debian.org> Date: Mon May 28 21:55:05 2007 -0400 Fixes for s390 commit 857ddbb660a21cad1c16f4fb2dc8a904d6655304 Author: Eugene Konev <ejka@imfi.kspu.ru> Date: Mon May 28 21:53:02 2007 -0400 Allow configurable serverconfigdir for security policy location Allow the location of the SERVERCONFIGdir variable to be defined at compile-time. This allows us to specify where the security policy will be located (Debian uses this to put it in /etc). The default is to the previous location. commit 78d01d1008973899d931ef44b47d5f0b5f220b0d Author: Gerhard Tonn <gt@debian.org> Date: Mon May 28 21:48:58 2007 -0400 Miscellaneous fixes for S/390. commit d98bd4bf908c2c51fcfd3a4c3230de17f2567244 Author: Branden Robinson <branden@debian.org> Date: Mon May 28 21:44:59 2007 -0400 Overhaul xorg.conf manpage Major stylistic cleanups, greatly expanded cross-reference ("SEE ALSO") section and some typo fixes. This patch by Branden Robinson. Forward-ported by Fabio M. Di Nitto. commit 6bf8d5019313ee2251a44dfb7ad3435a3c6db7eb Author: David Nusinow <dnusinow@debian.org> Date: Mon May 28 21:42:10 2007 -0400 Read ROM in chunks This patch speeds up reads of the ROM by reading in large chunks rather than one byte at a time. This patch was by Dann Frazier. commit 6fdd134a0c3e6fdde9b089100e8783705c9cc6ac Author: David Nusinow <dnusinow@debian.org> Date: Mon May 28 21:39:12 2007 -0400 Fix up xnest manpage I believe this patch was originally by Branden Robinson commit 6a870992d81a6bacfa9d313c15784fdb281d474f Author: Keith Packard <keithp@dulcimer.keithp.com> Date: Fri May 25 20:33:08 2007 -0700 xf86XVFillKeyHelper assumed root clip never changed. When the root window changed size, xf86XVFillKeyHelper would not revalidate the GC, leaving the clip at the old size causing lossage (and possibly memory corruption if the screen and frame buffer shrank). Fixed by just using a scratch GC; saving memory, eliminating bugs and shrinking the code. commit 3c982bc1a49509dda7bc469b0eced44df02755b3 Author: Luo Jie <luojie@nlsde.buaa.edu.cn> Date: Thu May 24 11:13:03 2007 -0700 Reinstate an apparently mis-deleted ';' from a for loop with no body. Fixes an error returning "No core keyboard" with multiple keyboards. commit 4d7469f75fadfc4a59664e88e18eb304203670f4 Author: Luo Jie <luojie@nlsde.buaa.edu.cn> Date: Thu May 24 11:04:06 2007 -0700 Fix a typo in using memcpy in xwin. commit 0b988450462ddb005311e68502357baf272e6371 Author: Luo Jie <luojie@nlsde.buaa.edu.cn> Date: Thu May 24 11:02:28 2007 -0700 Fix os/utils.c compile with mingw. commit 1f48995d66c0072caa7e5ce2845be642221dd56d Author: Luo Jie <luojie@nlsde.buaa.edu.cn> Date: Thu May 24 11:01:15 2007 -0700 Fix build of composite, dix, and randr when Xinerama is disabled. commit 8f98be7db303bc3db650054efb86843c70114451 Author: Eric Anholt <eric@anholt.net> Date: Thu May 24 11:00:04 2007 -0700 Fix bswap detection on BSD (mis-added '_' in function names). commit 9616a042855399f0ee9c6489ea824621ea5fee18 Author: Matthias Drochner <drochner@netbsd.org> Date: Tue Apr 10 16:15:40 2007 -0700 Fix build on NetBSD/amd64. commit ddb26bccd275f4fc011f7a2be685d1ce58555a00 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu May 24 12:20:24 2007 -0400 dix: Add a bunch of new access codes. These were determined through an analysis of the core protocol and 35 of the most common protocol extensions. There remain four bits for future use. commit 649e7f82d8d4333443493056b81eb20d6cf022bc Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu May 24 12:10:05 2007 +0200 Consolidate portPriv->pDraw assignments into xf86XVEnlistPortInWindow. This avoids a crash in xf86XVReputVideo and also cleans up the code slightly. commit 047bf3349bb697c73c95729a8bbf15f72605901f Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed May 23 16:56:05 2007 -0400 Delete trapezoid rendering code; replace with pixman calls commit 9d87ef4e0dff40ea39f1b209c67b90079fc79065 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed May 23 15:50:25 2007 -0400 - Make image_from_pict() non-static - Delete fbedge.c and fbedgeimp.h - Use pixman_rasterize_edges() in fbtrap.c commit 2a960c442bd7560630f52b55d82ec0517542ee5a Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed May 23 13:08:26 2007 -0400 Port renderedge.c to pixman commit 3ba3ede9bbdfc6376b6f6e0b6ce8280a05e6584d Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed May 23 12:56:04 2007 -0400 Add missing offsets for window coordinates - reported by Colin Harrison commit 2a4aa63a23ddd816b647b851a01865861827a7eb Merge: 9cee4ec5e cc648e609 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue May 22 14:50:26 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: include/miscstruct.h commit cc648e609d472472bac4a2e568eb3598b3690ba3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue May 22 10:51:56 2007 +0200 EXA: Export ExaOffscreenMarkUsed. Can be used to inform EXA that an offscreen area is used outside of EXA. commit e6a7198e7cd96f1fe0654cc6811a977821579258 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue May 22 10:51:55 2007 +0200 Bug #8991: Add glXGetDrawableAttributes dispatch; fix texture format therein. Adapted to master branch by Michel Dänzer <michel@tungstengraphics.com>. commit 6324bfc468f7a645d2fee59f1c921a4328a4639f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue May 22 10:51:53 2007 +0200 AIGLX: Zero-copy texture-from-pixmap. When available, use the 2D driver texOffsetStart hook and the 3D driver setTexOffset hook to save the overhead of passing the pixmap data to glTex(Sub)Image. The basic idea is to update the driver specific 'offset' for bound pixmaps before dispatching a GLX render request and to flush immediately afterwards if there are any pixmaps bound. This should ensure that the 3D driver can use pixmaps for texturing directly regardless of the X server moving them around. commit 5006d08d7fc56d3d380cc6b75297f94e8594eb54 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue May 22 10:51:52 2007 +0200 DRI: Add TexOffset driver hooks. To be used by AIGLX for GLX_EXT_texture_from_pixmap without several data copies. The texOffsetStart hook must make sure that the given pixmap is accessible by the GPU for texturing and return an 'offset' that can be used by the 3D driver for that purpose. The texOffsetFinish hook is called when the pixmap is no longer being used for texturing. commit ff2eae86b6a8760befbbc5d605debebe7b024c05 Author: David Nusinow <dnusinow@debian.org> Date: Mon May 21 19:50:04 2007 -0400 Fix boolean thinko that prevented working without a server layout commit 56fd92715567cd32e4b725b3791de9ac4e3879aa Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Mon May 21 20:00:25 2007 -0400 Remove fast path code from fbpict.c Remove the various fast path functions from fbpict, and instead use pixman_image_composite(). commit d0e8f474099dea40bbea555427772724ccb787d1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 21 13:06:21 2007 +0930 Change GrabDevice's parameter name back to "coreGrab". Was changed during a global search/replace for 5c680e94938c16e04a4349715cf11796b80400db. Otherwise people like me introduce bugs (e.g. in 333bab4b235801efd2b2de5b60df5b0c44048d3e) commit 167e1773de0fb566559d4362ff929eedcdb6d055 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 21 10:45:10 2007 +0930 Remove unused include "gestr.h" commit 7e2c935920cafadbd87c351f1a3239932864fb90 Author: Fredrik Höglund <fredrik@kde.org> Date: Fri May 18 20:06:14 2007 +0200 Add a new IDLETIME system sync counter. This counter exposes the time in milliseconds since the last input event. Clients such as screen savers and power managers can set an alarm on this counter to find out when the idle time reaches a certain value, without having to poll the server. commit 756acea23a0cc56c470bcd77c6f5638d923ab3d1 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Fri May 18 13:39:12 2007 -0400 Use pixman_image_set_indexed() to make 8 bit work commit 7916419a0092b8bf9713c0840f9e969950d7aa85 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Fri May 18 11:58:24 2007 -0400 Comment out setup of general MMX code commit 998164bac648756e5b5254aa36e075ae360d3972 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Fri May 18 11:36:20 2007 -0400 Move fbCompositeGeneral() to fbpict.c and remove fbcompose.c commit a2e3614eb8f0fa198615df492b03ff36bc9c1121 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Fri May 18 11:33:11 2007 -0400 Break image_from_pict() into a few subfunctions. commit c5ef84c325440af5fbdf9f44c3781d99a0392df9 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Thu May 17 21:31:08 2007 -0400 Make the general compositing code create a pixman image and call pixman_image_composite(). Leave the general code commented out for now. commit 076d070e186afeb416976ae74fbfd50c86db10c5 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu May 17 20:24:18 2007 -0700 Use Screen block handler for rotation to draw under DRI lock. DRI uses a non-screen block/wakeup handler which will be executed after the screen block handler finishes. To ensure that the rotation block handler is executed under the DRI lock, dynamically wrap the screen block handler for rotation. commit 915563eba530c5e2fdc2456cf1c7c3cc09b3add0 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu May 17 20:22:43 2007 -0700 Disable all outputs and crtcs at startup. Leaving devices enabled during server startup can cause problems during the initial mode setting in the server, especially when they are used for different purposes by the X server than by the BIOS. Disabling all of them before any mode setting is attempted provides a stable base upon which the remaining mode setting operations can be built. commit 0375009a97c2ab7f0e0f0265463d45c0580388c6 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Thu May 17 12:59:24 2007 -0400 Remove excessive unrolling in fbCompositeSrc_x888x8x8888() and fix bug where the source alpha was used instead of 0xff. commit 0b4db74922299df785e6273fdb1bf65c38d36070 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 17 18:00:07 2007 +0930 Squish the flags into the upper bits of the mode field for EnterLeave events. This way we have enough space for the detail field. commit 333bab4b235801efd2b2de5b60df5b0c44048d3e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 17 17:59:02 2007 +0930 Clean up, correct some comments. Send event type down with the RawEvents. commit bc334286b060bc8d0c829b18acebadf24fbdaf19 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 17 10:36:46 2007 +0930 Init device axis with -1,-1 minimum values. This is needed to be able to cross to screens located east/north of the current active screen. commit 546465ee6aa6584780aec6357f32d205c807ae71 Author: Soren Sandmann Pedersen <sandmann@redhat.com> Date: Wed May 16 17:42:04 2007 -0400 Make fbFetch_b8g8r8() actually write the read value to the buffer commit 0fcd17c9181901c419cc32bc24c07fe5a6934d81 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue May 15 17:59:13 2007 -0400 Use pixman short formats, revert the gradient_stop change commit f4c1d5fc28a5a7fe2592505350f9e2331f6049b7 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue May 15 17:12:22 2007 -0400 Use pixman types for transforms and vectors commit f2e30e7d0a1d075e7e83c5b5ceca9e4752951138 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue May 15 16:51:21 2007 -0400 Use the pixman fixed point types and macros commit 3da842bf930d7875599ca0c06cb4a09cfa987ac5 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue May 15 14:57:14 2007 -0400 Revert various fast path functions to their pre-pixman-merge state since they fail rendercheck. Remove their associated macros. See bug 10903. commit 1568b6b6a0d7337f29c7b87cc46ae64b3b0f8fdf Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Sat May 12 20:33:23 2007 -0400 Port large amounts of the region code to pixman commit dde0ceac4ea7639d0096bfd26f37c5851778854c Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Sat May 12 17:41:47 2007 -0400 Add new InitRegions() function called from dix/main commit e037052ac522150786abf44d3a04c813cc490050 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Sat May 12 16:58:54 2007 -0400 Turn boxes and regions into typedefs for pixman types commit 8e56f5be4b70773c899f01b9ccd2e88d523327e4 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri May 11 11:45:37 2007 -0400 Add dependency on pixman 0.9.0 commit a8c56372ba8aa36bac09877c478ff53ea5358df7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 15 10:24:22 2007 +0930 Revert "Allow events to grabWindows event if the device is not grabbed." This reverts commit 339b73e710a0920608a3fbcb20b406f0f6c4e0f6. Allowing those events can lead to race conditions. Conflicts: dix/events.c commit 81fc6a128b64ad412064405ed45db0175398e3f0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 14 18:12:56 2007 +0930 Add ungrab support to ExtendedGrabDeviceRequest handling. Polish the code a bit. commit 5c680e94938c16e04a4349715cf11796b80400db Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 14 12:34:53 2007 +0930 Remove double-grab option. We only want one grab per device. commit 4dc973f08c54294e06bc831bd2839fd3aa24ecfb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon May 14 10:42:03 2007 +0930 Add ExtendedGrabDevice handling. Add XGE handling in DeliverGrabbedEvent. We can now grab something selecting XGE events, but the current code is a bit messy and doesn't work too well yet. commit a277f04ab08514462b7f10b4dd92eb326af85501 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed May 9 22:03:12 2007 -0400 Remove mfb and cfb from include paths where they're not needed. commit 20c5250e487e032d392e2e4624021fccb1bfb72c Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed May 9 21:49:44 2007 -0400 Use system copy of cbrt() if available. Also move the replacement inline into miarc.c, since that's the only user. commit 8dcc37520d5e8c8b52cee81faa67fd5205548377 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed May 9 18:57:05 2007 -0400 Use _X_INLINE instead of ad-hoc #defines. commit 6ff239cb4e67c0a2ea497a1714e5585c1d941af3 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed May 9 18:38:33 2007 -0400 Make the use of ICEIL slightly less ugly. commit 178d426311bb3c7160f72b5d95b0a137eda09ba9 Author: Colin Harrison <colin.harrison-at-virgin.net> Date: Fri May 11 10:08:42 2007 +0100 Missing piece from bug 9808 commit ebaa6c920c82401952a0ccc991b94574306449bd Author: Matthias Hopf <mhopf@suse.de> Date: Thu May 10 15:25:31 2007 +0200 Disable Simba PCI bridge routing code (Bug #8020). The code in hw/xfree86/os-support/bus/sparcPci.c:simbaCheckBus() is trying to mimmick VGA routing by disabling I/O space responses behind the Simba PCI-PCI controller. Unfortunately, doing this also happens to disable access to the IDE controller I/O space registers, thus crashing the system. The granularity of the I/O disabling in the Simba controller is not fine enough to disable VGA without also disabling the IDE controller registers. commit 86c4941727f7c673ae6bb88c67443fa25935c7f5 Author: Colin Harrison <colin.harrison-at-virgin.net> Date: Wed May 9 16:55:27 2007 +0100 fix an occasional crash in GetWindowName() (bug: 9798) commit be44018a3c6172caf3e91c36ea321420d104e79f Author: Colin Harrison <colin.harrison-at-virgin.net> Date: Wed May 9 16:55:09 2007 +0100 Fix bad use of hwnd (bug: 9808) commit d3248b66a650c6c629cd66240e25004869217d2e Author: Colin Harrison <colin.harrison-at-virgin.net> Date: Wed May 9 16:54:46 2007 +0100 Migrate some code to the new mi apis commit 021e5df85d7c9373a2fed55512751d16e08128db Author: David Nusinow <dnusinow@debian.org> Date: Mon May 7 21:03:40 2007 -0400 Add more informative logging for module default loading When the modules section is parsed, if a module is set to be loaded by default, this will be logged. If it is redundantly specified in xorg.conf, this will also be noted. None of this logging will happen if the xorg.conf lacks a modules section. commit 1b3a0508a7aee1c7b14cd62216b4727fcc9181d4 Author: Jesse Barnes <jbarnes@jbarnes-mobile.amr.corp.intel.com> Date: Sun May 6 01:30:59 2007 -0700 Fix documentation for Copy hook -- it can copy memory to the scanout buffer too. commit 030a578391c634bc68add6ada3f251cf3f8c3069 Author: David Nusinow <dnusinow@debian.org> Date: Thu May 3 22:51:07 2007 -0400 Provide UseDefaultFontPath option This provides a new option, UseDefaultFontPath. This option is enabled by default, and causes the X server to always append the default font path (defined at compile time) to the font path for the server. This will allow people to specify additional font paths if they want without breaking their font path, thus hopefully avoiding ye olde "fixed front" problem. Because this option is a ServerFlag option, the ServerFlags need to be processed before the files section of the config file, so swap the order that they are processed. commit e91b9ddc7aa95abc2d4d314e8db204860771a099 Author: David Nusinow <dnusinow@debian.org> Date: Thu May 3 22:00:23 2007 -0400 Improve modules loading defaults Provide default modules that may be overrided easily. Previously the server would load a set of default modules, but only if none were specified in the xorg.conf, or if you didn't have a xorg.conf at all. This patch provides a default set and you can add only the "Load" instructions to xorg.conf that you want without losing the defaults. Similarly, if you don't want to load a module that's loaded by default, you can add "Disable modulename" to your xorg.conf (see man xorg.conf in this release for details). This allows for a minimal "Modules" section, where the user only need specify what they want to be different. See bug #10541 for more. The list of default modules is taken from the set loaded by default when there was a xorg.conf containing no "Modules" section. A potential problem for some users is that some users disable a module, most notably DRI, by commenting out the "Load" line in their xorg.conf. This needs to be changed to an uncommented "Disable" line, as DRI is loaded by default. commit d2f813f7db157fc83abc4b3726821c36ee7e40b1 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed May 2 19:10:22 2007 -0400 New fbWalkCompositeRegion() function This new function walks the composite region and calls a rectangle compositing function on each compositing rectangle. Previously there were buggy duplicates of this code in fbcompose.c and miext/rootles/safealpha/safeAlphaPicture.c. commit e0959adcd8df2c61e98e76e708fceef9c7cd54eb Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue May 1 13:41:48 2007 -0400 Add fbCompositeRect() as another special case in the switch of doom in fbpict.c This is phase one of getting the two region walkers in fbcompose.c and fbpict.c merged together. commit cb22bdbe678a9948eda75d464d6701a729664ef0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu May 3 10:05:58 2007 +0930 Add selected RamDac functions to xfree86LookupTab. Adding those makes drivers for s3 and tga work again. commit c1e1d6b98a6708860e5b5f6e21d8d5b1d8ce9075 Author: Brian <brian@yutani.localnet.net> Date: Wed May 2 15:55:40 2007 -0600 In __glXCreateARGBConfig(), insert the new GL mode at the _end_ of the linked list. Previously, the new mode was added at the head of the list. This caused the positional correspondence between modes and the XMesaVisuals array to be off by one. The net result was GLX clients failing when they tried to use the last GLX mode/visual. We still have the problem of DRI drivers not being able to use the extra mode/visual introduced by __glXCreateARGBConfig(). glXCreateContext fails with BadAlloc if it's attempted. This is also the source of the often- seen warning "libGL warning: 3D driver claims to not support visual xxx" Look into fixing that someday... commit bd0abb2844ef9faf28703e592cfebb886004234c Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Wed May 2 17:20:48 2007 +0200 Bug #10823: Fixed default OSNAME value. We try to get OSNAME from uname by default now. commit 71fc5b3e9309182978ead676965d65ca93a4e3b9 Author: Keith Packard <keithp@keithp.com> Date: Wed May 2 11:41:11 2007 +0200 Fix for a divide by zero that can be triggered by a malicious client. Problem reported by Derek Abdine of rapid7.com. Thanks. commit c03d9a7217f9895feed8cfed3ede4752faf6187c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 2 18:16:40 2007 +0930 Cleaning up a bit. Register correct event in EventSwapVector. Fix up event swap for GE events, register XI's swap function at GE. commit e6fd4a24ebd205013b41e44aacbbfb847709d2fd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 2 17:49:20 2007 +0930 Add handling for FakeDeviceEvent request. Fix a stupid bug from last commit, mask names were wrong. commit af25720598bb35d9d953ac8d9a07528289ebfb4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 2 13:51:16 2007 +0930 Add missing files for ProcXiSelectEvent. Should have been a part of 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7. Oh well. commit 58c0fd29272fb6c2f193cff82fb0b0573c607eec Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed May 2 13:50:09 2007 +0930 Adjust EQ to support long events. Add RawDeviceEvent (pointers only for now). This commit changes the event queue to use EventLists instead of xEvent arrays. Only EQ is affected, event delivery still uses xEvent* (look for comment in mieqProcessInputEvent). RawDeviceEvents deliver driver information to the client, without clipping or acceleration. commit 0214d0b96a9b900a8cf5c7f2183add3a411441f3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 1 15:49:41 2007 +0930 Start devices after windows are initialized. This fixes the hotplug segfault introduced with the multihead changes and cleans up the code a bit as well. commit 11d0e2109b699714055e263e8963f2c39eded28b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 1 14:16:36 2007 +0930 Correct enterleave semaphore value for root window. commit 8b42ba64e169a35df2a90528dcb0cd06be0f67a1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 1 12:12:58 2007 +0930 Send PointerKeyboardPairingChangedNotifyEvent using XGE. Needs updated inputproto and libXi. commit 325380adb20ec2b82e176d75599fd4bc97a3b918 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 1 11:02:05 2007 +0930 Check and re-set paired devices when initializing sprites. If we don't do this, a device that is paired before a sprite has been initialized for the paired device will not actually get the right sprite and segfault the server on focus events. Happens for the VCK. commit b043a184509cfe5c4c4691ecde1a4a065e53d575 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue May 1 09:54:33 2007 +0930 Check VCP's and VCK's ids when searching for a new device id. Both VCP and VCK are not in the inputInfo.devices list anymore, so we need to check them separately. If we don't do this, we end up re-using ids 0 and 1, causing all sorts of grief for clients. commit 873ef75b1e8c94d39670c981c4d830ab8bcc018b Author: Colin Guthrie <gmane@colin.guthr.ie> Date: Mon Apr 30 10:33:12 2007 -0600 fix __glXErrorCallBack() proto commit 6b33459bf5aac23c3ecc7002d091c02f327d907a Merge: 18252a515 3c91a993e Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 30 10:26:19 2007 -0600 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/xorg/xserver commit 5e439109292e54b5c4d1a7bc7b6ac0e42ee285f7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 30 12:57:42 2007 +0930 Add GenericEvent extension to Xext. This adds (unconditional) support for the GE extension. Anything from now on that sends events in MPX will have to use the GE extension. No GE, no MPX events. GE is not actually used yet from anywhere with this commit. You will need to update x11proto, xextproto, libX11, libXext and xcb to the matching xge branches. Things will _NOT_ work without the updated protocol headers and libraries. commit 3c91a993e8c752002adf85c317216e1487c20780 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:49:41 2007 +0200 EXA: Fix OffscreenValidate build with DEBUG_OFFSCREEN enabled. commit a261e1325057974d58440812b93c00c0caa4423a Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:49:35 2007 +0200 EXA: Remove DrawableDirty. Convert the remaining callers to PixmapDirty. commit b1b6674a919943a8ac37e54d02e8d0d23a642b1d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:49:28 2007 +0200 EXA: FillSpans improvements. * Don't need to track damage. * Always migrate for fallbacks. commit 584697a2231ac782f362a925e1489c15483a8791 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:49:09 2007 +0200 EXA: SolidBoxClipped improvements. * Centralize handling of fallbacks and damage tracking. * Always migrate for fallbacks. commit 982d7c2c0b948ba04c8eefa475d660981e6ed9f9 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:48:59 2007 +0200 EXA: CopyNtoN improvements. * Centralize handling of fallbacks and damage tracking. * Always migrate for fallbacks. commit d2245386eed200e77a8c84bdda36ab29e39fd593 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:48:31 2007 +0200 EXA: GetImage improvements. Only migrate when appropriate. In particular, don't migrate to offscreen in the no-fallback case as copying from system memory should usually be as fast if not faster than DownloadFromScreen, in particular if the bits need to be uploaded to offscreen first. commit 0880aaac9c83019fec2e3d32871f74c7a407f8b3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:48:19 2007 +0200 EXA: PutImage improvements. * Migrate for fallbacks when appropriate. * Add damage tracking in ExaCheckPutImage. commit 7fca16901187ade48e83e6a2684ef464b1912357 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:48:11 2007 +0200 EXA: ImageGlyphBlt improvements. * Don't waste effort on invisible glyphs. * Only track damage for bounding box instead of each glyph separately. * Always migrate for fallbacks. commit a8d6ebdf9338dc2f6ff9a532e6fec460a70d3b1e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:47:53 2007 +0200 EXA: Defer to FillRegionTiled in Composite when possible. Committed separately as this case is hard to hit and has only been tested lightly. commit 81b055605c34b5823f6c5f63cc0f92f43c6b7252 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:47:43 2007 +0200 EXA: Composite improvements. * Defer to simpler hooks in more cases (inspired by XAA behaviour). * Move damage tracking from lower to higher level functions. * Always migrate for fallbacks. commit ce317a5b76c053f449122c46e1372bf8e067cb4c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:47:16 2007 +0200 EXA: Glyphs improvements. * Don't waste effort on invisible glyphs. * Add damage tracking where necessary. * Always migrate for fallbacks. commit 0c8905ebc91cf654facef84ee52231a358deec5c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:47:08 2007 +0200 EXA: PolyFillRect improvements. * Convert rects to region and use it for damage tracking. * When possible, defer to exaFillRegion{Solid,Tiled} using converted region. * Always migrate for fallbacks. * Move damage tracking out of ExaCheckPolyFillRect. commit 567f18a09bfb05f448be40c7ebe0f210f955601c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:46:49 2007 +0200 EXA: FillRegion{Solid,Tiled} improvements. * Support planemasks, different ALUs and arbitrary tile origin. * Leave damage tracking and non-trivial fallbacks to callers. * Always migrate for fallbacks. This is in preparation for using these from more other functions. commit e869573b52fac69fb88cea120daaeec59c7a3461 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:45:48 2007 +0200 EXA: exaAssertNotDirty improvements. * Return early if the valid region is empty or the pixmap is pinned. * Fix loop for several cliprects. commit d3f8667341bfe6dc7d0258c4ad69377f37d88d95 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:44:27 2007 +0200 EXA: Fix exaEnableDisableFBAccess for nested disables and enables. commit 5e4b3232dafe3b0dec65bf639bebaba4774210b7 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:38:22 2007 +0200 Fix fbCompositeTrans_0888xnx0888 build for wfb on big endian. commit 2866e0bac9b8dd3892c5e68abcfc6c97cebaf88a Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Apr 29 23:38:13 2007 +0200 Fix a couple of picture repeat fields incorrectly compared to RepeatNormal. commit 78a20455356ccc310f73cfc65ad65a7677eee7e5 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 27 15:20:24 2007 -0400 Pixman merging More msvc++ porting commit 6c4f1826bf2c5f30f5fe6e489a02b6375478b380 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 27 08:13:08 2007 -0400 Bug fix in fbCompositeIn_nx8x8888 Make sure both halves of the dst word is set to zero when the masks are both 0. commit f28eea0647f007c2e2415ecc6fceef46201faad4 Merge: 339b73e71 ae04f2cb0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 27 16:34:36 2007 +0930 Merge branch 'master' into mpx Conflicts: dix/devices.c dix/events.c commit 339b73e710a0920608a3fbcb20b406f0f6c4e0f6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 27 13:24:27 2007 +0930 Allow events to grabWindows event if the device is not grabbed. This kinda makes popup windows useable if the WM doesn't set the ClientPointer. Kinda. commit ae04f2cb0a068cdc1e519627bf745de0c9e4a85a Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Apr 26 15:28:04 2007 -0400 Fix the 'relink' target for kdrive servers. commit 6c8152d6ee9eeb21a68a8bbfed1540939e5bcd1f Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Apr 26 14:59:04 2007 -0400 Remove old edid_modes.c, it lives in hw/xfree86/modes/ now. commit 2208c6087d6bffcb24a30891a56430e28735874c Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 14:40:30 2007 -0400 Change expand_alpha_rev to expand_alpha in mmxSaturateU commit a300ef84cee26febfbe08c497d0d063588130bdd Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 14:37:53 2007 -0400 Fix typo in previous commit commit 0ebe48be59368b55c618f60d4656300bd7f52ed9 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 14:36:32 2007 -0400 Pixman merge - Changes to support MS Visual C++ - use inline instead of __inline__ - Fix rounding errors (Billy Biggs, from xserver via pixman) commit 4fe918b38553133c27e5ae672e5c43984a9bbaea Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 12:41:01 2007 -0400 Fix bug 8871 - scrolling corruption with a compositing manager Call miHandleExposures() in CopyArea/CopyPlane explicitly in cw to generate GraphicsExposes correctly. commit 0ff7c94fcf6497ee8575f81cf97eeeb3a857739e Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 10:56:02 2007 -0400 Pixman merge Make use of fbCompositeSrcAdd_8888x8x8mmx commit 701ccb4a22cfd646ccb7f19b7b3a476aeb5ce2da Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 10:49:06 2007 -0400 Pixman merge - Remove stray default label - Integrate new MMX ops SolidMaskSrc_nx8x8888mmx, In_8x8mmx, and In_nx8x8mmx - Formatting changes to reduce diff noise commit a54ef54db19dcd36ed86b33cff2bc369f9690a15 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 10:24:25 2007 -0400 Pixman merge Make sure fbCompositeSrc_x888x8x8888mmx and fbCompositeSrc_8888x8x8888mmx are used when possible. commit 3571b8e65b0857322d12e291305cfe29ea497c3c Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 26 09:45:11 2007 -0400 More pixman merging - Move some code around to minimize diff noise - Add mmx ops from pixman that never made it into X - Merge Jeff Muizelaar's bugfixes to fbCompositeSrc_8888x8x8888mmx and fbCompositeSrc_x888x8x8888mmx. commit cfc01115af4136b2dad8218ba6b389513a356a2e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 26 22:18:35 2007 +0930 Fix cursor rendering for multi-head. Before putting anything on the screen, check if the GC was made for the ScreenRec we want to render to. If not, toss the GC and create a new one. This is not the best solution but it does the job for now. Same thing for ARGB cursors except that it's even uglier. Also remember the screen the cursor was rendered to and check for the right screen in the BlockHandler, SourceValidate and a few others. Only remove or restore the cursor if we are rendering to the same screen, otherwise we get artefacts that are both funky and really annoying. commit 82f97e1c0cc15b050edc82a8f3b9a423d6cf5fe7 Author: Paulo Ricardo Zanoni <prz05@c3sl.ufpr.br> Date: Thu Apr 26 15:58:50 2007 +0930 Enable event delivery for multiple heads. Requires moving the spriteTrace into the DeviceIntRec and adjusting a few functions to take in device argument, most notably XYToWindow(). Cursor rendering on the second screen is busted. commit c0346e57e6d3857994f7af76060c502c2fdea294 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 26 12:02:45 2007 +0930 Require inputproto 1.4.2. Requirement was introduced with c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78. commit 67347739b0571b2978468e8088480b105f505ad2 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed Apr 25 14:19:39 2007 -0400 Don't treat convolution filters as transformations. Some rearrangement of code to get it closer to pixman. commit c056ce95d89ef1df57edf47149fc34cd3925496e Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed Apr 25 13:21:47 2007 -0400 Port MSVC++ CPU detection code from pixman. (Vladimir Vukicevic). commit c19ece1d8c32dc81740a4036a642661f54064e75 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed Apr 25 12:34:19 2007 -0400 Integrate optimization from xserver from David Reveman where repeats get handled by fbFetchTransformed() rather than in the region walking code. commit 48c73dfc369fdf8f6023436ebe82bb604f76bb80 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed Apr 25 12:09:22 2007 -0400 Add function fbCompositeSrcAdd_8888x8x8(), and fix a bug where srcRepeat = FALSE would be set in the wrong place. commit 66ba3d758a368bf83d75bab8b08bdb6b34925e40 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Wed Apr 25 10:31:38 2007 -0400 Various fixes from xserver via pixman (Billy Biggs) commit c09e68ce30dabd6b7068b163b9d2382d85d0d0bc Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Apr 25 16:46:26 2007 -0400 Paper over a crash at exit during GLX teardown. commit 9c80eda826448822328bb678a7d284cc43fffb17 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Apr 25 16:35:04 2007 -0400 Disable RANDR's fake Xinerama protocol when there's more than one screen. ... in the protocol sense. Xinerama doesn't have any provision for more than one protocol screen each with its own geometry. Red Hat bug #231257. commit d322608dc929d5f8cda07a53143a4f28423e0460 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Apr 25 16:29:48 2007 -0400 Fix a buffer overrun on machines with excessively large PCI busses. Formerly we sized an array with a compile time constant, then initialized its size to the same constant, but the Linux PCI init code would increase that "constant". So if you happened to have more than 128 PCI devices, you'd happily scribble into whatever variables happened to be in .bss after that array. Only really fixed for Linux atm. Other OSes will simply (still) fail to work on video devices above the 128th PCI device. commit 3ba1e8ab6d69566e1a3f8f0eb4605631aeffc8e5 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Apr 24 17:20:14 2007 -0700 Include xf86Rename.h in xf86RandR12.h. commit 0a2fe443d25b1ca25349aba3f748df986952e20f Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 19:02:44 2007 -0400 Use READ/WRITE macros for new functions introduced in previous commits. commit 7e16da7b78c422f96387502b9cc29eaa1741543f Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 18:15:34 2007 -0400 Remove #if 0'ed blocks commit 18252a515d4989b983a3b7389636045e06d0f246 Author: Brian <brian@yutani.localnet.net> Date: Tue Apr 24 14:10:09 2007 -0600 bump release date to reflect input code updates commit 2d9a7a768747ca39a800475f12c424c298018dc6 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 14:46:59 2007 -0400 From pixman (Jeff Muizelaar) Fix up the fast-path compositing operators; those are useful for sources without alpha, but can't be used for sources with alpha. Also, replaced fbCompositeSrcSrc_nxn with call to fbBlt as this function must handle 1, 4, 8, 16, 24, 32 bpp objects. Would be nice to optimize fbBlt for common cases involving 8, 16, 24 and 32bpp. From Keith Packard. commit fde4a5adf02d3067a064ebf6bdd666aa5784cfe9 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 13:30:43 2007 -0400 From xserver via pixman (Jeff Muizelaar) Add some optimizations from jaymz. Also adds some compile warnings that will hopefully go awa y as we continue merging. commit 13e1d5ea55b0a3b7729316c8e37d3d8fca2075b5 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 12:59:18 2007 -0400 Fix format vs formatCode in previous commit commit 077a5d4555676d5775e990468a697b6890c6d609 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Apr 24 12:57:55 2007 -0400 Add functions fbCompositeSrcSrc_nxn() and fbCompositeTrans_0565xnx0565 from xserver via pixman. Add READ/WRITE and fbFinishAccess as appropriate. commit 09436fb7c38a9819bde770c4c21143591671c4d7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 24 22:52:33 2007 +0930 Disable devices before removing, remove unrecoverable devices. commit c7e2ba0c9b9b1fc1aed8f91f86471c4c8e650b78 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 24 21:34:47 2007 +0930 Use DevicePresence events to tell the client about enabled/disabled devices. Include the device id in the event sent to the client. commit ce099a9b78195540ec251a6a3dbe26019c1a686d Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 23 12:34:01 2007 -0600 fix bug in which maxKeysPerModifier wasn't getting set commit b5e1f7869b2f12a1c2baa7f699ae609fc9ad50aa Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Mon Apr 23 14:16:30 2007 -0400 Remove #if 0'ed merge leftovers commit 84838268b34661d598f8e4856fab355f414930d9 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Mon Apr 23 13:19:54 2007 -0400 Gradient fixes * Port fix for bug 7685 from pixman. Patch by Carl Worth * Add projective version of radial gradient code. * Make sure that all Pict*Gradient types have PictGradient as prefix, since code in various places relies on that. commit 38d14e858980a1b0c087344d24bf6aebf755663c Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Apr 22 18:04:27 2007 -0700 Adjust the screen pixmap's dimensions in xf86RandR12ScreenSetSize. commit ca784df84e07227a4cc0a1add079884f557b7a00 Author: Aaron Plattner <aplattner@nvidia.com> Date: Sun Apr 22 16:26:01 2007 -0700 Fix unbalanced fbGetDrawable added in commit 0a9239ec. commit 55bd8668e7d4100579bcd6c16a804d9f25267070 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 14:53:37 2007 -0400 Remove #if 0'ed leftovers from merge commit 41dd7ab067adde8f66cd9f74c5a6570c325518a5 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 14:51:40 2007 -0400 Fix gradient walker to not reset needlessly Previously the gradient walker was doing excessive resets, (such as on every pixel in constant-colored regions or outside the gradient with CAIRO_EXTEND_NONE). Don't do that. Carl Worth, from pixman commit c1b73f0f2acd56b423b91a04f1e1b3cdcad0069f Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 14:34:13 2007 -0400 Fixing gradient repeat mode computations in previous patch. From David Turner. commit 38f718799c68995c2d9a1680355bd55fd925009e Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 13:59:11 2007 -0400 Remove a few memory references in fbFetchTransformed commit 9c4b14d4f6a1fe018acd64789434216cd1560a4a Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 13:23:58 2007 -0400 Integrate David Turner's gradient optimizations from pixman commit cd2c1714eb4946bf7b1fc194fe074f8024a2ec23 Author: Brian <brian@yutani.localnet.net> Date: Sat Apr 21 12:40:51 2007 -0600 add slang_mem.c commit 67545333ec0b08db783e94e9e3ec55873dea19a3 Author: Brian <brian@yutani.localnet.net> Date: Sat Apr 21 12:40:33 2007 -0600 replace occlude.c w/ queryobj.c commit 39bc8bb0fdc854dcf9bbc0857fec84d50fa4f3b2 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Apr 20 14:22:42 2007 -0700 Don't call xf86RandR12TellChanged if it doesn't exist. Add some exports to xf86Rename.h. commit 3daa5c1a991d659b1386a09e33b044470d489cb3 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Fri Apr 20 09:43:16 2007 -0400 Fix pixman bug 5777, patch by David Reveman commit 9c2e955f6792e80fb84f848ed9e6ebbfd79f7130 Author: Brian <brian@yutani.localnet.net> Date: Fri Apr 20 07:21:19 2007 -0600 regenerated to add GL_CLIENT_ATTRIB_STACK_DEPTH (bug 9823) commit 96ef0f78438b60436c3940817980a3ab4070c7e8 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Apr 19 17:39:51 2007 -0700 Disable SourceValidate in rotation to capture cursor. SourceValidate is used exclusively by the software cursor code to pull the cursor off of the screen before using the screen as a source operand. This eliminates the software cursor from the frame buffer while painting the rotated image though. Disabling this function by temporarily setting the screen function pointer to NULL causes the cursor image to be captured. (cherry picked from commit 05e1c45ade9c558820685bfd2541617a2e8de816) commit 7ca4baffb5569ea12b578a4a3f69e93d272d6c6d Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Apr 19 17:37:18 2007 -0700 Was accidentally disabling rotation updates in mode set. Setting a mode on an unrotated CRTC was causing all of the rotation updates to be disabled; the loop looking for active rotation wasn't actually looking at each crtc, it was looking at the modified crtc many times. (cherry picked from commit 8b217dee3a6c46b13fc9571a4a9a95bc55686cdb) commit 806a537e644d8cc9e53f3ac52efb49453e5aa1fb Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Apr 19 17:49:34 2007 -0700 Revert "Suppress software cursor removal during rotated shadow buffer drawing." This reverts commit 999b681cf3973af4191506e49cde06963b11a774. Replacing this with simpler code that just disables SourceValidate during rotation redisplay. commit 0a9239ec258828ec1da6c208634a55fc4053d7da Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Thu Apr 19 18:19:34 2007 -0400 Merge David Reveman's gradient optimization patch from pixman commit d0e55774e0da641ba85c5173f27f68de27372747 Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Thu Apr 19 11:39:53 2007 +0200 libdri: Make sure the new DRIInfo keepFDOpen member is honoured. commit e1f0b3e70b696d7ea4cf9e6ed30d751e7fdbc577 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 19 12:00:24 2007 +0930 config: Return errors as negative numbers, device ids as positive numbers. Update dbus-api documentation. commit c6972c893359f8fa7631ae674330f3f4f7010ba0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 18 12:10:05 2007 +0930 Change dbus 'listDevices' call to not require an argument. Update dbus-api documentation, plug memory leak on dbus reply error. commit d61ed6c8a2823a3532439d5cb9f355129c93f523 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 19 18:08:55 2007 +0930 Check for NULL devices in CloseDevice(). commit 9c30f7422121a0443c8d612d06181e17d8af9730 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 19 12:00:24 2007 +0930 config: Return errors as negative numbers, device ids as positive numbers. Update dbus-api documentation. commit 999b681cf3973af4191506e49cde06963b11a774 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 18 14:33:27 2007 -0700 Suppress software cursor removal during rotated shadow buffer drawing. commit 28bb34eec63bf3c98f38ba7fc044f6419aaa3307 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 18 13:48:28 2007 -0700 Belatedly bump XORG_VERSION for 7.2. commit 5d8e8a7f4b3226bffd9e4d6d9326688f475b0183 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 18 13:22:26 2007 -0700 Remove libminimi build. It appears to have been a leftover of a previous incarnation of the build system that didn't handle miinitext.c well. commit 53fb42e65c2b2ff58a4a324b7f05cff8a587720a Author: Erik Andrén <erik.andren@gmail.com> Date: Tue Apr 17 21:34:47 2007 -0700 Syncmaster 226 monitor needs 60Hz refresh (#10545). I've managed to solve my own bug (#10545) by applying the following patch to the xserver. Please apply. <Conspiracy mode on> This monitor is "Vista Certified". I wonder if this is a pure coincidence... <Conspiracy mode off> With kind regards Erik Andrén (cherry picked from commit a63704f14a1d97b9a00fef6fa290e74e51b9732b) commit ae75afcb1b5419102c5be10b8826ceed50d2ef5d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 18 12:10:05 2007 +0930 Change dbus 'listDevices' call to not require an argument. Update dbus-api documentation, plug memory leak on dbus reply error. commit 9cee4ec5e6e06d23aafb302494b082c77ade4623 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 17 16:01:56 2007 -0400 xace: change the semantics of the return value of XACE hooks to allow arbitrary X status codes instead of just TRUE/FALSE. The dix layer in most cases still does not propagate the return value of XACE hooks back to the client, however. There is more error propagation work to do. commit 47bd311e3dcc501cbb202ce79a55ac32e9db50f2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 17 13:46:55 2007 -0400 security: remove debugging code. commit 1f06d32ef58749d0f0c062193d237ee98f60e90f Merge: cf962a849 fc162c6cf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 17 12:10:22 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: dix/privates.c commit b6aec7f6f906a18d13586d63afabf1ee4fbb11c3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 17 16:51:16 2007 +0930 Change FocusIn/Out semantics to match Enter/Leave semantics. commit 451d5464b4e8a2516b8a4598b3c4eb14656be90e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 17 11:17:04 2007 +0930 Change enter/leave semantics for events with detail Notify{Nonlinear}Virtual. Core enter/leave events with detail Notify{Ancestor|Inferior|Nonlinear} are only sent for the first/last pointer to enter/leave. Events with detail Notify{Nonlinear}Virtual are sent at all times, but not to those windows that currently have one or more pointers inside their boundaries. commit fc162c6cfa06f0b012743d6d79cef45cf0166229 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 16 09:55:58 2007 -0700 Allow outputs to be explicitly enabled in config, overriding detect. Option "Enable" "True" will force the server to enable an output at startup time, even if the output is not connected. This also causes the default modes to be added for this output, allowing even sync ranges to be used to pick out standard modes. (cherry picked from commit a3d73ba2cb7e13a6d129cd88d6a7f7d756e2ced2) commit c41e3bd713206c0bbd8ab8cef4c83eb7ba7e1c3c Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 16 09:53:42 2007 -0700 Use default screen monitor for one of the outputs. By default, use the screen monitor section for output 0, however, a driver can change which output gets the screen monitor by calling xf86OutputUseScreenMonitor. (cherry picked from commit f4a8e54caf6b9431711383a39f55a18e7fd654f4) commit 97a2c2579c56c304705c934f3b536473645747df Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 16 09:39:47 2007 -0700 Using wrong log level in extension to built-in message was: typo in built-in module log message (cherry picked from commit 00cfd1f765895b4d1b2234f3203727a8871b64b0) commit deda7791dfa34d0563c8d7fa2a0660ac27e6858c Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 16 11:35:22 2007 -0600 remove sources deleted in Mesa commit 02d42f344ce020c9b84723671cb9c68d5c064933 Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Mon Apr 16 17:24:53 2007 +0200 Changes for single-entity multi-screen DRI. The entity (device) has a locking SAREA and a master file descriptor that optionally isn't closed between server generation. The locking SAREA contains the device hardware lock. Each DRI screen creates an new SAREA containing the drawable lock, drawable-and private info, the drawable SAREA. The first screen optionally shares its drawable SAREA with the device SAREA. Default is to close the master descriptor between server generations, and to share the drawable SAREA of the first screen with the device locking SAREA. Thus we should (hopefully) have full backwards compatibility. Mesa changes to support single-device multiple screens are pending. commit b5823ea3e1ed5a0449d44da05165a46719dcf287 Author: Keith Packard <keithp@neko.keithp.com> Date: Sun Apr 15 22:59:19 2007 -0300 RandR 1.2 spec says CRTC info contains screen-relative geometry. Was reporting mode size instead of adjusting for rotation. (cherry picked from commit e2e7c47a528447e90cff6cf10d2ce457742ef48d) commit cc4eb1c7ea1bace7ed69cfd80c99d22933282ae1 Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Apr 13 15:04:29 2007 -0300 Add quirk for Acer AL1706 monitor to force 60hz refresh. This Acer monitor reports support for 75hz refresh via EDID, and yet when that rate is delivered, the monitor does not sync and reports out of range. Use the existing 60hz quirk for this monitor. (cherry picked from commit 1328a288e9030a472a915077160f090d1afd4126) commit eba81a0a01f8a61151d8bf9f3d83bda85ca26e73 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Apr 14 18:30:09 2007 +0300 glx: move __glXMesaProvider from GLcore module to glx module. This treats the GLcore provider similar to DRI provider, using a subset of XMesa as the GLcore interface. commit 6b040b79f0e247b6f2da8f7d239443743e96de67 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Apr 14 18:29:52 2007 +0300 glx: drop xmesaP.h include from xf86glx.c The declarations for the xfree86-specific XMesa functions were moved up to xmesa.h, requires Mesa as of 2007-04-13. commit 2c833f60acb3dc358815a99cd295ef7fc695c45d Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Apr 14 18:29:25 2007 +0300 glx: drop stray CAPI define. SI imports/exports were dropped from Mesa. commit ea27b09d3a973d9a4943f205b24940b8624cf405 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 13 17:15:22 2007 +0930 Deliver FocusIn/FocusOut events for all devices. Don't use VCK in SetInputFocus and DeliverFocusedEvent. commit 7ccebc50b98ac175fdbdfaab081bcead62e60ee3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Apr 13 13:08:44 2007 +0930 Documentation for events.c. commit 2bb3c81fc1ca98c909309f3af7e9c8ca6b695657 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 12 16:35:43 2007 +0930 Use paired kbd instead of VCK for EnterLeaveEvents, sanitize variable naming. commit e7b47b1758ed20e75ee267b3a09e91bf2861f6fd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 12 16:24:42 2007 +0930 Change core enter/leave semantics for multiple pointers. Send EnterNotify when first device enters the window, LeaveNotify when the last device leaves the window. Additional devices will not cause additional Enter/LeaveNotifies. commit 547d720938b3668666d60110d79b150b1e9325c6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 12 11:16:19 2007 +0930 Remove workaround for a NULL core pointer in ProcessInputEvents. This workaround is obsolete with 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 commit d4dad6f84f82a4ade5005c3aa93511c1295875b8 Merge: f1f8b562a 33a5d9605 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 12 11:11:03 2007 +0930 Merge branch 'master' into mpx Conflicts: configure.ac dix/events.c hw/xfree86/common/xf86Xinput.c commit 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 11 18:28:57 2007 +0300 XFree86: DGA: Don't call ProcessInputEvents from CloseScreen By the time CloseScreen gets called, we can't call ProcessInputEvents, as the event queue will get unhappy. So just unregister our hooks instantly, and hope that they don't get called. commit 0910540e4322bba72a2fa0a907072eab2547a7b6 Author: Remigiusz Marcinkiewicz <enleth@enleth.com> Date: Wed Apr 11 01:09:26 2007 +0300 Config: Extend D-BUS API Return device ID where available. Add listDevices call, which does what it says on the box. commit aecbc712144dd1aaf462bd758821438b1d22d957 Author: Remigiusz Marcinkiewicz <enleth@enleth.com> Date: Wed Apr 11 00:38:16 2007 +0300 Input: Allow a pointer to a device to be returned in NIDR Allow a pointer to the first device added to be returned, so we know which device(s) were added by the NIDR call. commit 4f05f9591e5492c72f3856bd7a2ff13378f59f2b Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:57:48 2007 +0300 Input: Always add devices with first available ID Scan the device list when adding a new device, and make sure we can use the first available ID, instead of always incrementing. commit 20674dcbb2373a0af287883bc008fb6fb23d4466 Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:55:36 2007 +0300 Config: Fix memory leaks Fix memory leaks that could occur along the error path. commit 82962bbae2b4fda274625d1712ef839ce1ab9dc8 Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:54:32 2007 +0300 Input: Add DeleteInputDeviceRequest Add DIDR, which asks the DDX to remove a device, analogous to NewInputDeviceRequest. Only implemented for XFree86 at the moment. commit 7b82a836c66ba88566255052caff63577e1a0384 Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:52:08 2007 +0300 XFree86: Fix memory leaks, option parsing, in NewInputDeviceRequest Plugged some possible memory leaks, and added some more checks on the options, particular for driver/identifier. Added an unwind. commit 4771fa8747791498e504d73afccfb5833499a38b Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:48:00 2007 +0300 XFree86: Fix memory leak in option parsing Fix option parsing functions and callers thereof to not leak memory. commit 07c56abf84080c020a3e7b7703a447c7f996975c Author: Magnus Vigerlöf <Magnus.Vigerlof@home.se> Date: Tue Apr 10 23:43:58 2007 +0300 Input: Plug memory leak in device free Remember to also free the motion history, if we're using the DIX-managed history. commit e92743bc9839c36914a44f3e5bc8cd85773ac794 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 8 14:02:02 2007 +0300 getevents: Copy modifier state from extended to core devices Make core events carry the same modifier state as the extended events, so that holding down Ctrl on keyboard A and pressing Q on keyboard B won't cause your app to quit. commit e49f836d6fa2768cd6d2a6d0227b5dbf516013dc Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 8 13:56:41 2007 +0300 mieq: Use larger default queue size Use a default queue size of 512 rather than 256, else Xephyr is too slow without a host cursor, so events get stuck in the queue. commit 4aae2de74b9224bac2b2e2522637dac09abc3837 Author: Jared D. McNeill <jmcneill@netbsd.org> Date: Tue Apr 10 12:57:15 2007 -0700 Add a real xf86EnableIO/xf86DisableIO for NetBSD/PPC. commit f77a8ea849d171a8ca00b2b7334866ace1ffbf73 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 9 14:29:46 2007 -0700 Rotate screen size as needed from RandR 1.1 change requests. Screen size must reflect rotated mode size when setting rotated mode using RandR 1.1 SetScreenConfig request. (cherry picked from commit efcec7dbd3c2736c7b421d29c4d37e231aa681d2) commit bcf17df69a232e5e84609abacdca36274316e170 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 9 14:12:27 2007 -0700 Disable CRTC when SetSingleMode has no matching mode. Update RandR as well. xf86SetSingleMode tries to resize all crtcs to match the selected mode. When a CRTC has no matching mode, it now disables the CRTC (instead of crashing). Also, poke the RandR extension when xf86SetSingleMode is done so that appropriate events can be delivered, and so that future RandR queries return correct information. (cherry picked from commit dc6c4f6989f87149d8605604f4514f5cbf11de67) commit 67e1c98895a566f927e1ae2384d56cfca104f971 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Apr 9 19:08:52 2007 -0400 Look for the PCI ROM file elsewhere in sysfs. /sys/devices reflects the bus topology, and we don't care that much. Easier (and more reliable) to just look in /sys/bus/pci/devices, which is a flat view. commit a08d5157f70567a0aa9583d4a15e62437340cf34 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Apr 9 19:04:56 2007 -0400 VT activate or waitactive are fatal if they fail. Also, be sure to waitactive on the way down, to make sure we're off the VT before exiting. commit 72b477f964c748a1ab668781643cc11877f19738 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Apr 9 18:59:01 2007 -0400 Don't write out empty sections from the parser. commit 1f6741db19d4c91b1eacb497dff1814acb1bf0c3 Author: Stefan Huehner <stefan@huehner.org> Date: Mon Apr 9 14:33:15 2007 -0700 Bug #10560: Code-Cleanup: function declarations () -> (void) X.Org Bugzilla #10560: <https://bugs.freedesktop.org/show_bug.cgi?id=10560> Patch #9511 <https://bugs.freedesktop.org/attachment.cgi?id=9511> commit f24391dbfd12a84253dfec794ee7884afd52e197 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 9 12:30:31 2007 -0700 In AIGLX EnterVT processing, invoke driver EnterVT before resuming glx. As the driver EnterVT function generally re-enables the hardware and prepares it for rendering, it must be called before any gl functions are called which could touch the hardware. commit 4c2e28b0916b5f75cfefb6df9fa0a7a09675539a Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Apr 9 12:28:53 2007 -0700 Add setrlimit call in -core option to make dumps occur. Default core size limit for most environments is 0, which disables core dumps. Add code in the -core option processing path to set the core limit to the maximum value. commit f1f8b562aaaa6ec32ab0d0697f964d92d6d536a4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 9 19:31:59 2007 +0930 Alloc sprite memory in devices' devPrivates, allow undisplaying cursors. Improve memory usage by allocating the sprite's memory only to devices that actually have a sprite and provide means to remove a device's cursor from the screen (more hotplugging, yay!). This commit breaks ScreenRec's ABI. commit 7cef789fa13ae53bfba6dc7b5a7928b7362b2522 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 9 18:37:48 2007 +0930 Close down virtual core devices when closing all devices. commit 6081b8c76f7d934bd4e9584a2f6d55636c5289d2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 9 18:35:47 2007 +0930 Don't explicitly init sprite for VCP, EnableDevice() will take care of that. commit 00b1d52f4103a07568dcebcdaa860b9b51f19b4d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 9 18:32:00 2007 +0930 Adding some comments to devices.c. commit aa77ffb510abe004802ab9acc6996e4c6fe3ebb2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 9 18:27:22 2007 +0930 Fix: pick new ClientPointer when device is closed. commit 4beeab8424774ea4c3142f29b90e33f1fc7cb154 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 8 13:39:06 2007 +0300 XFree86: Treat evdev and vmmouse as mouse drivers (bug #10512, #10559) When we see an evdev or vmmouse section, assume that it's a mouse, and don't add a default mouse device. This will break users who have an evdev keyboard section but no mouse, and want the mouse to get added by default. commit 0a6ac992363343487dfe0a0fc985ea55bd448382 Author: Brian <brian@yutani.localnet.net> Date: Sat Apr 7 12:41:57 2007 -0600 regenerated to fix bug 10371 commit 7e385598613778de14c0feea0d32f17d7aa66a8e Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Apr 6 13:38:12 2007 +0300 GLcore: fix after moving xf86glx_util.[hc] to Mesa. commit cf962a849db2b259ca558c6265ea7e3328a4d312 Merge: 5ad562565 5a804f2e9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 5 14:41:39 2007 -0400 Merge branch 'master' into XACE-SELINUX Conflicts: configure.ac commit 5ad562565ac8ef9257da3afb0de1ae4f90f80fe9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 5 14:18:05 2007 -0400 devPrivates rework: properly free devPrivates on compatibility structures, type pixmap. Requires ddx'es to call the free function from DestroyPixmap. commit 5a804f2e97ab59745482660a635b801ac2b9e769 Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Apr 5 19:14:31 2007 +0300 configure: minor cosmetic, move GLX extension options together. commit a4e2fc703484fffed8dd50c1b4b24c564be4d3cd Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Apr 5 19:13:47 2007 +0300 glx: Remove stray __GLinterface. __GLinterface was droped from glcore.h commit 38ca7d388c47c4800c74442172d6595a9b3dfcc7 Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Apr 5 19:13:14 2007 +0300 glx: fix symlink, glcontextmodes.c was moved to mesa/src/glx/ commit 1d550bb2c5cb5b3e588f0e0b68a421dc1cb8bd7c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Apr 5 12:12:58 2007 -0400 devPrivates rework: minor fix; use calloc and avoid initialization. commit 5c4deb71a1cb981ea7e2e25d2b3a1179f27efa5a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Apr 5 14:21:46 2007 +0930 Synthesize WarpPointer events for the actual device rather than the VCP. commit ed75b056511ccb429c48c6c55d14dc7ae79e75a3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Apr 4 12:00:15 2007 -0400 dix: add new, combined resource lookup function. Move all dix lookup API deprecated so far to a new file dix/deprecated.c. Remove the deprecation warnings for the time being. commit 63e46e4fc3e98751f2edbed9c79ef3d5dc2dadc6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Apr 4 15:59:51 2007 -0400 devPrivates rework: properly free devPrivates on compatibility structures, excluding pixmap. commit f8482967ae8080f49dd1bbb0b79cc65020df679f Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Wed Apr 4 12:28:48 2007 +0200 Add an EXA driver callback to determine whether a pixmap is "offscreen" in exa terms, which means accessible to the GPU. Bump exa minor. The change is backwards-compatible. commit 7f36ba57062096e9c67889d5b7dd64e2fb0004e7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 4 17:38:10 2007 +0930 Allow for multiple animated cursors. commit 676188531b2bd7679ee1831b5c517df3e6d215c5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Apr 4 17:35:06 2007 +0930 Unrealize cursor only once, not per device. commit c10df5b967d4da4e11786520317e2917de5541fa Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Apr 3 15:47:01 2007 -0700 Swap RRScreenChangeNotifyEvent dimensions when the screen has one crtc and it's rotated. RandR 1.1 clients expect the size fields in this event to be the unrotated dimensions of the screen. This behavior is "weird", but that's the way the old code worked so we need to be bug-compatible with it. commit 1cb84768f376b477a08a558854609b0743f2bd29 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 3 15:31:16 2007 -0400 security: rewrite to use new devPrivates support. commit 14aea12cadef647369e44639ff5024dd7034570a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 3 15:23:56 2007 -0400 xace: forgot one of the hook call arguments. Add it. commit 353e19fd5e18ad55a0dd12a7b63f6af9df7bfe6b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Apr 3 14:06:02 2007 -0400 devPrivates rework: zero out newly allocated private space. commit e1dea151db6405e12d991feacba9446320739ee8 Author: Brian <brian@yutani.localnet.net> Date: Tue Apr 3 11:21:50 2007 -0600 Implement a minor hack in dmxCheckFunctionKeys() to detect special keys. Keep track of status of (left) alt/ctrl keys so that ctrl-alt-q to exit can be detected. Not ideal, but works for now. commit 0ee40c935750e25a9e178cdd70f6b2c667e79344 Author: Brian <brian@yutani.localnet.net> Date: Tue Apr 3 09:31:00 2007 -0600 s/intead/instead/ commit 23974f20bf0e0c2786cc75af026af5484f6dc331 Author: Brian <brian@yutani.localnet.net> Date: Tue Apr 3 09:30:24 2007 -0600 add DDXRingBell() stub to solve link problem commit a240c039c47c0be22ea5e100692307b26d938747 Author: Brian <brian@yutani.localnet.net> Date: Tue Apr 3 09:27:57 2007 -0600 Split the xserver/fb/fbcmap.c file into two files. Now, fbcmap_mi.c contains the fb functions which just wrap mi functions. Previously, these were in fbcmap.c and compiled when XFree86Server was defined. Now, clients of fbcmap should either use fbcmap.c or fbcmap_mi.c and not worry about setting the XFree86Server symbol. commit 1cc8db72816cd079f30255046e10043c350bf683 Merge: 645d87cf8 a39f297ad Author: Matthieu Herrb <matthieu@roadrock.(none)> Date: Tue Apr 3 16:04:45 2007 +0200 Merge branch 'master' of ssh://herrb@git.freedesktop.org/git/xorg/xserver commit 645d87cf8ef724d4591614f9994cdc4d7549a7a8 Author: Matthieu Herrb <matthieu@roadrock.(none)> Date: Tue Apr 3 15:47:18 2007 +0200 CVE-2007-1003: XC-MISC Extension ProcXCMiscGetXIDList() Memory Corruption commit 207f710d16337839c2427aa16fad70a49834153e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 3 19:02:14 2007 +0930 Delete all grabs from all devices when deleting a window. commit 5f382c9c7fbda6eccf8e76c28a90b55ff2f0aef3 Merge: 9b0b34066 f09ee168e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 3 15:07:18 2007 +0930 Merge branch 'master' into mpx commit f09ee168e234d0a9416e15f2916726b975cad293 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 3 15:07:00 2007 +0930 Revert "o fix minor error in comment for GetPointerEvents()" This reverts commit 96ce17aa94413c4b8bcb61cae71167050130a307. commit 9b0b3406682b5a3161e6c3895771523214c37207 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Apr 3 15:06:26 2007 +0930 Make GrabDevice differ between core grabs and device grabs. commit a39f297ada4fa87c858395ae2aacefac5f8fba05 Author: Keith Packard <keithp@viola.jf.intel.com> Date: Mon Apr 2 14:15:36 2007 -0700 Don't erase current crtc for outputs on CloseScreen Erasing this variable causes some outputs (SDVO on intel) to fail to be correctly reset at server reset time. (cherry picked from commit 56262a4ee943f328d089a8eb4aa70b9a4bd5d135) commit 11797ffdcc22160317a5ebbc9291472570a51c6d Author: Eric Anholt <eric@anholt.net> Date: Mon Apr 2 18:21:58 2007 -0700 Move modes/ debugging output under Option "ModeDebug" in the Device section. commit e44f106ffc796c025abdfb66717c06db8b12b4e4 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 16:26:15 2007 -0600 clean-up, debug code commit 8d8bc8927760fad631bef83fa2841b455ff6d511 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 16:21:57 2007 -0600 fix formatting commit 3e482de7b145a5eed79b81c30c359fe43647824a Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 15:38:15 2007 -0600 checkpoint: more clean-up commit 76a7a5ca1f068c27c9b5fbd49d5a1da80ed6f488 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 15:24:05 2007 -0600 formatting fixes commit 69baad321d35dae0bfa535be0c6ed2131fed1e60 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 15:21:22 2007 -0600 clean-up dmxCoreMotion() dmxCoreMotion2() commit 44eb15adeee3b299677070f39625daa53679bd13 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 15:12:04 2007 -0600 checkpoint clean-up commit 0f873a9d4f02b399c37b4058c6a9a2e21aa205e8 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 14:51:38 2007 -0600 remove some debug code commit 3a0ce1084a18e17a3c8a009d99c228652b8763a9 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 14:51:21 2007 -0600 for completeness, init dummy's min/maxval[1] values (vertical axis) commit 12016f20f7f5365f30cfbeb05568b3fb89759e5a Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 14:50:48 2007 -0600 As for normal mouse device, init valuator maxval[] to real values, not zero. commit 0aaf28e5633a59563b89a2e42d19fabc84adc3ed Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 12:41:30 2007 -0600 In dmxBackendMouGetInfo() initialize the info->minval[], maxval[] arrays to the size of the backend display. It seems that the changes to X input exposed a problem that wasn't detected before. The axis clipping code in GetPointerEvents() uses those limits to constrain the pointer's coordinate range. The max was zero so the pointer couldn't move. commit 0013bf6ddb3867c9a504603434d8c2ec83f3f3bc Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 12:39:04 2007 -0600 undo 1280 valuator hack commit 08a88d1803f672555141011e082fbc0edeedcf05 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 12:28:14 2007 -0600 Pass num_valuators=0 for ButtonPress/Release. This seems to fix the button coordinate problem commit 70683e338dacc48e3adf489d66ec33b29dfc3b77 Author: Brian <brian@yutani.localnet.net> Date: Mon Apr 2 12:26:27 2007 -0600 formatting fixes commit e8777a91f37d828b9df839bf3d9cf2f954bdddb0 Merge: a12054757 96ce17aa9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 2 15:36:26 2007 +0930 Merge branch 'master' into mpx Conflicts: Xi/closedev.c Xi/exevents.c Xi/extinit.c Xi/listdev.c dix/window.c hw/xfree86/common/xf86Xinput.c include/extinit.h mi/mipointer.c commit 96ce17aa94413c4b8bcb61cae71167050130a307 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:50:02 2006 +1030 o fix minor error in comment for GetPointerEvents() commit a12054757d21edacc1c24c3077b9214726652829 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Apr 2 11:20:44 2007 +0930 Xi: fix ProcXListInputDevices to include the virtual core devices. commit f2808005f4ee72c5fd7f5f3dcca181306485113e Author: Alberto Mardegan <mardy@users.sourceforge.net> Date: Sat Mar 31 16:51:24 2007 +0200 Bug #6620: Fixed a missing 'else' in ATIPseudoDMAInit(). Before this, we'd write some registers twice on R200 hardware and also possibly end up with a bad value in atis->cce_pri_size. commit 5257b32e492bd2082bef6a4cd0fea03ce093c0f8 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Mar 28 15:51:24 2007 -0700 Bump video driver ABI to 2.0 for cw change (commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee). commit 73fdc16bc4f4e21ff604b3f9ded23b40398fb1b6 Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 16:07:26 2007 -0600 formatting fixes commit ebdc8ce5c108dc3b6b0004e7c7939d1a5bef8676 Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 16:05:46 2007 -0600 Checkpoint DMX updates: things are working much better now, but still not 100% right. Use new dmxCoreMotion2() function which enqueues motion events with GetPointerEvents()/mieqEnqueue(). The clipAxis() code in GetPointerEvents() is causing some grief. The limits seem to have always been (0,0) according to the original calls to InitValuatorAxisStruct() in dmxinputinit.c. Terrible hack for now: Call InitValuatorAxisStruct() with hard-coded max values of 1280 (my screen width). commit e9130b8bac73a0843d5ff6b2216eccfb3e094a48 Merge: 2c6d47108 92e8cdbd3 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Mar 30 13:39:15 2007 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit 3c7413e0c2f87e154aa8aa4a83bd585a6d1091e8 Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 14:07:04 2007 -0600 Tweak some parameters, etc. Things seem a little better now, but still a ways to go. commit 7989dacdcb1449b10d7733dda11cd96e260e9fae Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 13:44:24 2007 -0600 num_valuators=1 for GetPointerEvents(), hack ButtonPress/Release position commit 1ea842960fddbc6363cc6e7f914d70ba45525a6b Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 13:43:15 2007 -0600 more debug commit 92e8cdbd32b0d86cabd4ad88e3240bf90c018b9a Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 13:19:33 2007 -0600 Checkpoint fixes to DMX for X input changes. Xdmx builds and runs now. Keyboard seems OK, and mouse pointer moves, but everything else is flakey. Something is still seriously wrong. commit d92da3d5f309392ac398c0975ef17bb04312d5e2 Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 12:56:34 2007 -0600 more formatting fixes commit 44acb2517d9fb07790d9d799aa9cc727d1b7d35c Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 12:54:22 2007 -0600 Fix some bad formatting. Doing this: if (something) stmt; is evil if you're debugging and want to break on stmt! commit 9f24798af50896cc3262c1201f75c10a688f2a83 Author: Brian <brian@yutani.localnet.net> Date: Fri Mar 30 12:49:34 2007 -0600 ompile fbcmap.c w/ -DXFree86Server instead of linking libfbcmap.a. The former works, the later doesn't (DMX blows up on visuals/pixel formats). This undos Daniel's patch, which undid my prev patch. Revisit someday. commit 76756f27561c6386cba0d338441e8ec7b98500ce Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Nov 30 04:20:32 2006 +0200 Make xf86glx.c unaware of Mesa internals Use newly added XMesaCopyContext() and drop the GlxSetRenderTables() call for Xgl, as this is now done inside XMesaForceCurrent(). This leaves xmesaP.h but only for the declarations of the three XMesa/XFree86 functions. Also, GlxSetRenderTables() stays but is only used in hw/xgl/glxext/ . Also drop xf86glxint.h, no longer used. Depends on mesa commit 7439a36785b6a2783e80a40a96c09db8f56dc2bc of 2007-03-30. commit 63d8f01819ef44ea3bf0d4fb20ba1d698ae91cd2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 30 14:59:43 2007 +0930 dix: Fix wrong cursor refcount. Calloc cursor struct to ensure devPrivates are zeroed out and don't increase the refcnt for devices automatically when allocating a new cursor. Use new DeviceIsPointerType() to detect if device is a pointer _before_ device has been activated and can thus be identified and set up grab functions accordingly. This way we can increase the refcnt when we get a pointer grab. commit 20e4314b178e1a093bce85e93329d4bcfb4f4210 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 29 19:12:32 2007 +0930 dix: Try to get closer to the correct refcnt for cursors. This commit introduces a memory leak, as the refcnt never seems to get down to 0 and thus cursors will not be freed. Solves the problems with GNOME segfaulting every 30 seconds though. commit 307d2b57bbfcc281656011533627bea6ab98189e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 29 15:23:41 2007 +0930 Xi: remove 'register' keywords. commit 0c607f4b1902f993597e09ea7a2c83bc1cca9b96 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 29 14:43:50 2007 +0930 dix: Pick keyboard instead of using virtual keyboard in Grab/UngrabKey. commit 82a8b99a6c46018885600011913267d8af9dfe13 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Mar 28 15:17:02 2007 -0400 Move the XAA private indices to be static. Technically this is an ABI break, if you aren't smart enough to be using the getter functions. Cope. commit 8c7f56d92d8471ee059c14d322af5f7f555dd5c6 Author: Tomas Janousek <tomi@nomi.cz> Date: Wed Mar 28 14:46:30 2007 -0400 Bug #10296: Fix timer rescheduling. commit 327bc332a61294209d39286228199f54bdde73d1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 28 13:00:03 2007 -0400 xace: minor comment fixes. commit 299ff4c82998d2a32204bfbecde4993dfbd3d4a5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 28 12:57:11 2007 -0400 xace: provide creation-time resource hook call in CreateWindow(). commit 99b220969f2f8ba829bc8294b27ca90fd9311be4 Merge: 728ad64d9 82a8b99a6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 28 12:54:04 2007 -0400 Merge branch 'master' into XACE-SELINUX commit 5ba4d9eedf1b4ce4795bf910cd184872e2d9b3fc Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Mar 28 12:03:19 2007 -0400 Refuse to create tiny modes from EDID detailed timing. commit 2c6d47108880584f1221ff86c6c8947627f9f607 Merge: c4fe1bcce 852204463 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Mar 28 08:08:04 2007 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/Makefile.am hw/xfree86/dri/dri.c commit 85220446359a75ea2c359b418b4051c04eea739c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 28 13:03:32 2007 +0300 GL: Update for Mesa changes Added s_fragprog.c to fix the build. commit 1af2ef0b25fd8017a3271e624a5f1548f02b09f9 Author: Eric Anholt <eric@anholt.net> Date: Tue Mar 27 13:13:45 2007 -0700 Enable Composite by default now that it disables itself in the known bad cases. commit 0bfc3cc22db94ec6867596606fe93228e315c847 Author: Eric Anholt <eric@anholt.net> Date: Tue Mar 27 13:12:21 2007 -0700 Disable composite when Xinerama is active. It will likely take a decent bit of work to make that work right. commit 5e7936371c9e1ac48e19bf1e9e3f71f037fd9b5d Author: Eric Anholt <eric@anholt.net> Date: Mon Mar 26 20:18:18 2007 -0700 Disable Composite when the screen's visual is pseudocolor. Rendering fails badly in this case, and I don't care enough to fix it. commit 8afc7e2eb3ebec48d3879bf269143259c8bc18c8 Author: Eric Anholt <eric@anholt.net> Date: Mon Mar 26 15:55:38 2007 -0700 Refuse to initialize Composite if Render is not present. Composite relies on the presence of Render, in particular for the automatic compositing. commit 6ed08949af4f7ac09170d3d9581e4092b24a84ee Author: Eric Anholt <eric@anholt.net> Date: Tue Mar 27 17:31:28 2007 -0700 Move libcw setup to the only renderer requiring it (XAA). Additionally, protect libcw setup behind checks for Render, to avoid segfaulting if Render isn't available (xnest). The previous setup was an ABI-preserving dance, which is better nuked now. Now, anything that needs libcw must explicitly initialize it, and miDisableCompositeWrapper (previously only called by EXA and presumably binary drivers) is gone. commit e76b6349516d5d1c8f7167d6f5419e0d06a546c3 Author: Eric Anholt <eric@anholt.net> Date: Mon Mar 26 16:04:50 2007 -0700 Fix indentation of fakexa help text. commit 728ad64d979fd9e5cca28e8c15118c18d707c431 Merge: 0331c6a8f 6a0bed16e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 27 13:16:40 2007 -0400 Merge branch 'master' into XACE-SELINUX commit 6a0bed16e80a91891cee6c7033c90875bc2af193 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Mar 27 16:51:12 2007 +0200 Fix typo in GL/mesa/shader/slang/Makefile.am. commit b8f846a9dfc6697d59ad5482ba7c9d738875318e Author: Dave Airlie <airlied@linux.ie> Date: Tue Mar 27 14:17:40 2007 +1000 gl: oops dodgy s appeared pointed out by jcristau on irc.. commit a63ee90bc2d490f6c5c1802c164391963cf6c1d9 Author: Dave Airlie <airlied@pegasus.(none)> Date: Tue Mar 27 11:05:52 2007 +1000 gl: update for latest mesa glsl-compiler merge commit d387a3ddf76716791e5e8b8f0954ca0df3c579d6 Author: Dave Airlie <airlied@pegasus.(none)> Date: Tue Mar 27 11:00:13 2007 +1000 fix loading of GLcore after recent loading changes commit 92ba435bd9aa7b6eca9aef8e5193576ef62fc9db Author: Eric Anholt <eric@anholt.net> Date: Mon Mar 26 12:44:58 2007 -0700 Update xorg.conf manpage for new RandR 1.2 monitor options. commit 0331c6a8fcba1dc27ef45aaf5f694799d0085413 Merge: 84a066cc8 f7c5aa0dc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 26 10:28:05 2007 -0400 Merge branch 'master' into XACE-SELINUX commit f7c5aa0dc0fa3569a2ee412c4f996960f936b6ed Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 26 10:21:44 2007 -0400 Remove dead NEED_DBE_BUF_BITS code. commit 2e3cc861f90415f200826bc71dab6298d759c42b Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 22:01:34 2007 -0400 Since ddc, i2c, and ramdac are in core now, remove their ModuleData stubs. commit e88fa75c9b468b88bb7b87b1da235c6eb2fe8164 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 18 17:39:08 2007 -0400 Static cleanup on Xi/ commit 4b5802ddbd45271be3cadeae0a83a6742df2515b Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 17:57:54 2007 -0400 General DIX static and dead code cleanup. commit 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 17:57:22 2007 -0400 Static and dead code cleaup for Xext/ commit af769892a91c9af59de53ca3bcd77fc4967daffb Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 17:56:32 2007 -0400 Static and dead code cleanup from mi/ commit 62224e39727fd6f1cf11a461983662f615a9fea1 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 17:55:15 2007 -0400 Static cleanup for xf86 ddx. commit e8bc1988d9ff10b65717574175f70df3c4d6334d Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 15:13:05 2007 -0400 Un-staticise VTSwitchEnabled, since kbd wants it apparently. commit 70e493d223b1e943e652191150bd0b7e1a6ebcfb Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 14:55:28 2007 -0400 Static and dead code cleanup over afb/ commit f36bf1a3e4ce9465ea4a6159c209924a3cafbe58 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 12:28:13 2007 -0400 Delete a dead file. commit 9a0f25de7ca3c68af867b38936103d17daa92ac6 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 25 12:27:01 2007 -0400 Static cleanups, dead code deletion. commit ac2356843e38b3400142bc54b65393c12976fc07 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Mar 25 09:41:33 2007 +0930 dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices. commit 5f9c10e8da0d9d96cc00a38cdf9a8c3030063e03 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Mar 25 15:00:03 2007 +0930 Clean up DeviceIntPtr, prepare for Server 1.4 ABI. Move sprite-related information into a new SpriteInfoRec, remove isMPDev flag. commit e54311395e1e7ae458c8ce59da0914706c4a04f6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Mar 25 09:41:33 2007 +0930 dix: Increase allocation size for core keyboard keymap to avoid buffer overrun when copying keymap from extension devices. commit 1072b88a8f352484e70bc749e300c936e5600480 Author: Dave Airlie <airlied@linux.ie> Date: Sun Mar 25 10:06:00 2007 +1000 loader: fix already built-in message commit 804080a7096347d48c686f2c8fbfd06326bce400 Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Mar 23 23:41:36 2007 -0700 Make pending properties force mode set. And, remove AttachScreen calls. Yes, two changes in one commit. Sorry 'bout that. The first change ensures that when pending property values have been changed, a mode set to the current mode will actually do something, rather than being identified as a no-op. In addition, the driver no longer needs to manage the migration of pending to current values, that is handled both within the xf86 mode setting code (to deal with non-RandR changes) as well as within the RandR extension itself. The second change eliminates the two-call Create/AttachScreen stuff that was done in a failed attempt to create RandR resources before the screen structures were allocated. Merging these back into the Create function is cleaner. (cherry picked from commit 57e87e0d006cbf1f5b175fe02eeb981f741d92f0) Conflicts: randr/randrstr.h randr/rrcrtc.c I think master and server-1.3-branch are more in sync now. commit 1f77120775dc05fc84a00dd55190af2fa50ae509 Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Mar 23 14:39:10 2007 -0700 Ensure that crtc desired values track most recent mode. desiredX and desiredY were not recorded during xf86InitialConfiguration. desiredX, desiredY and desiredRotation were not recorded during xf86SetSingleMode. (cherry picked from commit 36e5227215e0912ddf8a010db042467f00efe0fc) commit 84a066cc88fe4326ddacd04ab5e1158a80571c33 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Mar 23 10:33:53 2007 -0400 xace: pass serverClient as default argument to dixChangeWindowProperty instead of NullClient. commit 476f2b5aefa518262b69e487555e6094818d857a Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Mar 23 01:17:14 2007 -0700 Incorrect extra memory copy in RRChangeOutputProperty. Left over from previous version of the code, this memmove will break when the mode is not Replace. (cherry picked from commit 945aa0aa556429b50dea8e8ebc0008304b093eb7) commit 7093367c3976bef5b9d219d9f2a7dc7dd3eeb091 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Mar 23 01:05:55 2007 -0700 Fix Pending property API, adding RRPostPendingProperty. Pending Properties take effect when the driver says they do, so provide an API to tell DIX when a property effect is made. Also, allow driver to reject property values in RRChangeOutputProperty. (cherry picked from commit 8eb288fbd69e2ffd02521d2c6a964c8180d08ec8) commit 86d76390eb182f271f5fa5dc19205e97a867f7e7 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Mar 23 01:03:40 2007 -0700 Make sure RandR events are delivered from RRCrtcSet. Some paths were skipping the event delivery stage. (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d) commit 510eaa346e68fd82c852c7b41fb0e2c5be12da78 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Mar 23 00:59:11 2007 -0700 Clean up xf86CrtcRec and xf86OutputRec objects at CloseScreen. Erase pointers to structures which are freed at server reset time. (cherry picked from commit 492c768065f49306a2194a88edf96b85de0ff4ff) commit 479b2be4badab0a67b1f091feb83c1364e27d783 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Mar 23 00:57:18 2007 -0700 Clear allocated RandR screen private structure. Use xcalloc instead of xalloc when allocating this structure to ensure consistent contents at startup. (cherry picked from commit 16f4c0c1750824f2e5a001cef82a4122a7a2beb0) commit b63e0d2545bb75e14d9de019a88f31e20a2f7377 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Mar 20 07:17:27 2007 -0700 Clean up Rotate state on server reset. The rotation state is stored in the xf86_config structure which is not re-initialized at server reset time. Clean it up at CloseScreen time. (cherry picked from commit f8db7665dcd7af78ca4db2461e0bf787ec662cb1) commit e1cc68add0bcdd5e0e4e15cf6ee8a3da136d3534 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 22 17:33:16 2007 -0400 xace: drop the name argument from the property callback. commit c9fb8a35332d101897607d8f06ed5a6512eac7cf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 22 17:23:26 2007 -0400 dix: move access codes to separate header file, add DixCreateAccess. commit 1b766ffc0647d5e9a9bf6938d33548d977b5535e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 22 15:55:35 2007 -0400 dix: reorganize property code to better support xace hook; requires new API for changing a property, dixChangeWindowProperty, taking an additional client argument. commit 1b58304ac837735920747ed0f0d10ba331bdaeb7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 22 13:06:50 2007 -0400 xace: add new argument to property hook for property structure itself. commit 5486be4898766205149fadce71529724eb78fbf3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 22 10:59:21 2007 -0400 dix: devPrivates support for PropertyRec. commit f8cd19bd1692d12a6047c088a626a6ae715d469d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 22 17:47:01 2007 +1030 Xi: add GetClientPointer and GetPointerPairing requests. dix: use PickKeyboard for ProcSetInputFocus and ProcGetInputFocus instead of the core keyboard. commit a3296d111dc4d76aa3afa7e338cbab93eb390ec4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 21 17:01:26 2007 -0400 xace: add access_mode argument to selection hook. commit 4c1fb8069d5dd30a73277698503e9dcc2e9d64c6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 21 16:17:14 2007 -0400 dix: add new selection fields supporting redirection. This is a minor ABI break. commit 4fa482b4be1150bcffeabb64d018c00ac5951e41 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 21 14:49:56 2007 -0400 xace: bump major version since the hooks have changed. commit 9c144f8ac5cea25deaa543767dbaf371d029c608 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 21 14:39:00 2007 -0400 xace: add XACE_SELECTION_ACCESS hook for selection redirection/access. commit 3e9f7a5504ab41d845e88f293d8498c963d8a7d8 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 02:35:31 2007 +0200 XFree86 DGA: Guard against NULL pointer dereferences. Ass, u, me ... commit f292de2ef13dc994a38029cee9e2642576893332 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 02:04:12 2007 +0200 XKB: Fix size_syms calculation bug Apparently it needed to be nSyms*15/10, not *12/10; make it match the other allocation code. commit f34b9a20b0181d3c2641c305e91180711afbd4b9 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 02:03:37 2007 +0200 XKB: Be a tiny bit more conservative with type allocation Make sure size_types will _always_ be 0 if we don't have any types. commit 021fc5cb2cb4a7972b4a6fcb570c1da92787d68d Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Mar 18 16:31:19 2007 -0400 Static markup and dead code cull over xkb/. The former <X11/extensions/XKBsrv.h> has been pulled into the server now as include/xkbsrv.h, and the world updated to look for it in the new place, since it made no sense to define server API in an extension header. Any further work along this line will need to do similar things with XKBgeom.h and friends. commit 9398d62f27ee1b287e4458fd8b011c10f7b59efd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 00:18:24 2007 +0200 XFree86 input: Add backwards compatibility for motion history Add the old motion history API back, as a shim around the new mi API. commit 0f75c47e0c5f4b2778930a6fabf894fc1dffd9d3 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 00:12:02 2007 +0200 xfree86 input: Re-enable DGA support Re-enable DGA support for relative mouse motion. commit 80d29475b9a2ebbb303a8e324e09a15c528d5556 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 21 00:10:38 2007 +0200 mieq: Allow event handlers for arbitrary events to be set Allow arbitrary events to use mieq by letting custom handlers be set. commit b8df961843a95b29258ae9c5d46ccfc620d8de1c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Mar 19 18:03:26 2007 -0700 Define XF86PM on Solaris x86 builds now that we have sun_apm.c commit 2945deba1d4a7dce4f6dd0c568297a1c537fdfb4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 19 17:09:10 2007 -0400 xace: drop XACE_WINDOW_INIT hook, it has been superseded by ResourceStateCallback. commit 78c962da76efe644b8d485265f1ecdda84b45d27 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 19 17:04:51 2007 -0400 xselinux: use the new ResourceStateCallback instead of the XACE_WINDOW_INIT hook. commit 6a89106e9c963a495fd40427d242ba0abd44f764 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 19 16:51:29 2007 -0400 xselinux + security: remove confusing CALLBACK macro. commit 0acf993e2878d0866fd4e2db8252c1ea6841e494 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Mar 19 16:11:01 2007 +1030 dix: Move sprite initalization/pairing from ActivateDevice to EnableDevice. zero out spriteTrace, otherwise GetCurrentRootWindow() may return invalid data. Evdev adds previously hotplugged devices on its own when rescanning, and ActivateDevice does not get called for those devices. Sprites need to be initialized or paired before the device gets started, so the safest place to do so is EnableDevice (which actually does get called by the evdev driver). commit 015d728bcde5b16a72a976579755421e3023626b Merge: 65b0eb60b b167583fe Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Mar 19 09:42:56 2007 +1030 Merge branch 'master' into mpx Conflicts: dix/devices.c dix/events.c mi/misprite.c commit 720f302d241e88e6e9f2962207da1aa9a79728b7 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Mar 17 20:14:05 2007 -0700 Slow down DDC I2C bus using a RiseFallTime of 20us for old monitors. This time value makes the bus run slowly enough for even the least reliable of monitors. Thanks to Pavel Troller for finding the necessary change. commit b5a8a71e64c76b8dd42962cbd7984215c6ce4aa8 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Mar 17 17:26:11 2007 -0700 Remove extra (and wrong) I2C ByteTimeout setting in DDC code. The DDC code sets the I2C timeouts to VESA standards, except that it had an extra setting of the ByteTimeout value which was wrong (off by a factor of 50). Removing this should help DDC work on many more monitors. Note that the Intel driver duplicated these settings, along with the error. Yay for cult and paste coding. commit 2489dae9f7def788910eee5733931392df83a0d6 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Mar 15 20:26:07 2007 -0700 Correct ref counting of RRMode structures RRModes are referenced by the resource db, RROutput and RRCrtc structures. Ensure that the mode reference count is decremented each time a reference is lost from one of these sources. The missing destroys were in RRCrtcDestroyResource and RROutputDestroyResource, which only happen at server reset time, so modes would be unavailable in subsequent server generations. commit 9d0c3b52f25df89738fb1a62ccffda8c8cbb4689 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Feb 20 23:04:26 2007 -0800 Eliminate RRModeRec devPrivate field. The xf86 mode setting code was mis-using this field to try and store a pointer to a DisplayModeRec, however, each output has its own copy of every DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing at a random DisplayModeRec. Instead of attempting to rectify this, eliminating the devPrivate entirely turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec structure and set that to the hardware, converting it on the fly to a DisplayModeRec as needed. (cherry picked from commit 3506b9376c2b0db09bfff58d64e07af88a6e8195) commit 2c93083edd29a65e73bb2e8eff9d353e92845c9b Author: Keith Packard <keithp@guitar.keithp.com> Date: Sun Feb 18 23:49:38 2007 -0800 Add support for user-defined modelines in RandR. The RandR protocol spec has several requests in support of user-defined modes, but the implementation was stubbed out inside the X server. Fill out the DIX portion and start on the xf86 DDX portion. It might be necessary to add more code to the DDX to insert the user-defined modes into the output mode list. (cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e) Conflicts: randr/randrstr.h Updated code to work in master with recent security API changes. commit b167583fe234a536aa6187e17f21da85be4f0b7f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:50:02 2006 +1030 o fix minor error in comment for GetPointerEvents() commit 65b0eb60b0b9e6405aa2e3d4c712ec4d2f0da070 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 16 15:52:24 2007 +1030 Xi: move IsPointerDevice into dix. dix: IsPointerDevice and IsKeyboardDevice, use same ways to identify type of device as XI does for the XListInputDevices reply. Autopair each non-pointer device with VCP when activating, pair with real device after activation. Don't return non-keyboard devices when calling GetPairedKeyboard or PickKeyboard, otherwise we segfault for 'evdev brain'. commit 3bffb281260476d2f74f0bf451d85d2f7cacd6c4 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Mar 15 16:16:16 2007 -0700 Don't wedge when rotating more than one CRTC. Rotation block handler was re-registering the rotation damage structure, creating an infinite loop in the damage code. Track registration of the damage structure to avoid this. (cherry picked from commit b14f003b0ed1252766c9e3b1c086ea2809521047) commit 9562b6abe1da566cf73a08c4f4c4339fb67fbc71 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Mar 15 10:50:45 2007 -0700 Allow xf86_reload_cursors during server init. xf86_reload_cursors is supposed to be called from the crtc mode setting commit hook; as that happens during server initialization, check for this case. (cherry picked from commit 5b77bf2d020b1ee56c1c5f2db089a8f7f64a76a6) commit 3b71b0f89f1db837da91650baa0ef4bb7ef2e98f Author: Eric Anholt <eric@anholt.net> Date: Thu Mar 15 13:21:00 2007 -0700 Set the RandR version returned, rather than just passing the proto's version. commit 2fe74ef339c3a4902ae8214f5a0454662895422c Author: Matthias Hopf <mhopf@suse.de> Date: Thu Mar 15 16:56:01 2007 +0100 Fix calculations in x86 emulator for the long long case (Andreas Schwab). commit 456f429ad655ab4d80e30c58291d801966a613b2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 15 21:48:19 2007 +1030 dix: fix: don't return when device is same as argument. fix: set access default rule to 0 on init. commit ae75019ccf1edac9e8be31b6a96293624f672ccb Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Mar 14 23:59:29 2007 -0700 Create driver-independent CRTC-based cursor layer. This moves most of the cursor management code out of the intel driver and into the general server code. Of course, the hope is that this code will be useful for other driver writers as well. Check out xf86Crtc.h for the usage information, making sure you add the needed hooks to the crtc funcs structure for your driver. (cherry picked from commit 4d81c99a4660a0bf9014f789de55edabd185bd14) commit c5b07fb717289f61b54d7b093421bcb92124b839 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Mar 14 17:42:30 2007 +1030 kdrive: update kdrive to new mi API with additional device argument. Includes an update of ati_cursor.c and i810_cursor.c commit c3eb248cf93a3afd9168acfb88254606beddd7a8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Mar 14 13:21:33 2007 +1030 dix: fix: don't skip first item in list when seeking for a device cursor. commit ce9409acebd994cf1809050f2cc8e1db66130f12 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Mar 13 19:16:56 2007 +1030 dix: Get the state from the paired device and the real device to fill the state field in the event, rather than using the virtual devices. ProcessPointerEvent: name argument "device" instead of "other". Add GetPairedKeyboard(). commit 4bf1b280f7cb676ec2b172f26dd2ad9bac2eb2ca Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Mar 9 14:18:14 2007 +0000 Set pScreen on context commit c366b82bd50066019cf82b3464445d5bc27d6f9f Author: Jay Estabrook <Jay.Estabrook@hp.com> Date: Fri Mar 9 12:26:55 2007 +0000 Ensure domain is stripped from the bus ID. commit 577464af4362e5a32cf7165b5128655dd86c6200 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 9 17:13:05 2007 +1030 dix: restore commit b3b2a6a0d43d1724e04d69588f8a55c3270e5523 that for some reason got wiped. fix ProcGrabKeyboard to use PickKeyboard fix PickKeyboard to actually work. commit 07806f4081f8dcd3b5733b590eb6e5b4cae734ad Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 9 15:45:25 2007 +1030 Xi: Add SetClientPointer request handling. commit 405483496538f1c82cbd7fe1e76c5d94e1a90525 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 9 14:16:23 2007 +1030 mi: remove 'register' keywords. commit fe05ba75a10ec080e7ec34bff6936103185586b3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 8 12:14:30 2007 -0500 devPrivates rework: pass address of pointer to private callbacks instead of the pointer itself. commit 18339375cd332f0ab1cbdade3dcd9140212ce1ca Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 8 12:14:06 2007 -0500 xselinux: remove context validation function for now. commit b9cff1670f29949a5bc41afc19aca443f434febb Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 8 12:13:52 2007 -0500 Add ResourceStateCallback similar in function to ClientStateCallback. commit 2fcb45eb5dc1803b372df8b5765f6a43bea83611 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 8 12:13:36 2007 -0500 devPrivates rework: redo field offset registration, drop RC_PRIVATES class. commit 947f8d249bac61beb10669d935888c4c280b5062 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 8 12:13:18 2007 -0500 devPrivates rework: redo interface again, dropping parent and type parameters as well as preallocation routine. commit c45f6762080ef00b41d9f73441a9f0e605253008 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 7 11:22:42 2007 -0500 devPrivates rework: hook up new mechanism in backwards-compatibility mode on existing structures that support devPrivates. commit b3b2a6a0d43d1724e04d69588f8a55c3270e5523 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 8 22:16:17 2007 +1030 dix: Check if client has a grab on any other device before mouse/kbd event is delivered to the client. Client's don't cope well with receiving core events from other devices when having a grab on a pointer or keyboard. commit 63169ce52d354b4345dcfc46b89f0ea88379718f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 8 17:50:19 2007 +1030 dix: remove 'register' keyword for all variables. commit ceca5670fee99b5feceaa2453f1ac32d1bfe7dcd Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 8 17:17:23 2007 +1030 dix: Each device needs to differ between a core grab and an XI grab, otherwise a Xi grab may overwrite or release a core grab. Replace grab and associates with coreGrab and deviceGrab structures, adjust rest of dix/Xi/etc to compile. xfree86: Don't check for core devices, we'll have the virtual ones anyway. If we check, the first mouse device is duplicated and sends double events. commit 40ae4f246d8818410490236ab183204a84765629 Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Mar 7 20:52:31 2007 -0800 Remove stale monitor data when output becomes disconnected. Remove parsed EDID and EDID property from disconnected outputs. (cherry picked from commit ae9d5aa479dd50cc81b755079fcf96a0d02f135a) commit b5fde366e2e21234ac0b81222fd5c42ca3e49cba Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 7 12:29:55 2007 -0500 Properly free device devPrivates - memory leak fix. commit a3d2c5d622d9ca36d6fa2966aff09524e3ea39ac Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Mar 7 11:02:47 2007 -0500 XORG_VERSION_CURRENT, not XF86_VERSION_CURRENT. If only this was the least wrong thing in this code. commit aaef4d6a4121d9341b670a0ce8fabc3b491049cf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 7 09:57:02 2007 -0500 devPrivates rework: move reset functions into a single call. commit bb111291d854b4329e47367ce3c67e8a2785e6e9 Merge: 74175e0af e9bfb2b3d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Mar 7 09:03:46 2007 -0500 Merge branch 'master' into XACE-SELINUX commit 537bc2ead4d154552cbdc3a19e335f82af63792c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Mar 7 18:19:20 2007 +1030 Xi: Don't deactivate core grabs from non-core button/key releases. dix: set coreGrab flag for grabs caused by GrabPointer and button presses. remove virtual core devices from device list, only real devices are in the list now. Auto-pair each keyboard with a real pointer if one is available, provides multiple keyboards automatically after startup if devices are configured. fix GuessFreePointerDevice() to do what it's supposed to do. mi: fix: call miPointerMove from miPointerWarpCursor. fix: remove unused id field from miCursorInfoRec don't update sprite for virtual core pointer. commit e9bfb2b3d7dfaafd90d2ad0fa3d0e1acced4380b Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Mar 6 23:19:30 2007 -0800 Add hw/xfree86/docs/README.modes, documenting new mode setting APIs. This document covers both API and xorg.conf usage of the new mode setting APIs. (cherry picked from commit a59c31b0f7b94ed1f395c7586c37ef5fe7ba2a25) commit 72a23d88d73a8c72ed18847b004db05092d3e7be Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Mar 6 23:15:34 2007 -0800 Add xf86CrtcScreenInit to share initialization across drivers. xf86CrtcScreenInit performs initialization that needs to happen at ScreenInit time. (cherry picked from commit 558a4f5588ad2ec11254e0b5d6ce9515b137369e) commit 81526232bc0119d2ec7b8590be4f78cf066ae359 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 6 17:19:11 2007 -0500 remove PIXPRIV check as this flag is always set. commit a7cd53deb99957dec27a55ffd75e548b322ae0ce Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Mar 6 15:32:13 2007 -0500 remove PIXPRIV checks as this flag is always set. commit 024bbc7cbb924daaf3e305ddfc8e74509acd1e15 Author: Eric Anholt <eric@anholt.net> Date: Tue Mar 6 16:18:59 2007 -0800 Bug #9931: Fix linear allocations with a non-1-byte granularity. This was introduced in 83080809f9a1c1d24b0318e54632f25f5940da25. Instead of aligning the offset, it doubled it. Results were appropriately spectacular. commit 9d94c137596d3f9d9118ec70455b7a30b3582046 Author: Ben Byer <bbyer@apple.com> Date: Tue Mar 6 11:09:30 2007 -0800 updated todo list commit 81d581e655fc989da3be4256b83849a63b8607b7 Merge: a05ffca8d d5aba03fe Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Mar 6 10:37:29 2007 -0800 Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver commit a05ffca8dd0da9bdb5c1bf4c481028aeabf21e34 Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Mar 6 10:36:51 2007 -0800 rewrote event handling, Xquartz now has working mouse and keyboard. use it\! commit d5aba03feff41722c72b4c6193f09d141cbf1678 Author: Drew Parsons <dparsons@debian.org> Date: Tue Mar 6 23:53:23 2007 +1100 Xprint: shorten font filename to fit in tar length limit The length of the Xprint font file NewCenturySchlbk-BoldItalic.pmf pushes the full path over the traditional 100 character limit for tarballs (when module version number is included). Shorten it to NewCentSchlbk-BoldItal.pmf to get back below the limit and rename other font files in that family to match. commit 3206e9225897989638ad553e1f392b918ac4d21f Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Mar 6 02:31:59 2007 -0800 moved new event-handling code from X11Application.m to darwinEvents.c in preparation for making all Darwin servers use it commit 0ccd1443fd6db397b42e5b99ce733ce1316c785e Merge: ec1ef8a56 9b6bb06f1 Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Mar 6 01:04:50 2007 -0800 Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver commit ec1ef8a56d6217ca2b04899043874ce0bcad9784 Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Mar 6 00:57:23 2007 -0800 Fixed Darwin's Makefile.am to fix a problem building X11.app commit 9b6bb06f13a71f6078f762b4a78fa516faccb638 Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Mar 5 23:49:35 2007 -0800 Allow relative positions to use output names or monitor identifiers. Previous version used monitor identifiers if present, otherwise output names. That caused existing working configurations to break when additional information was added to the configuration file. (cherry picked from commit 3f5cedf00a82f08a433c95ffbb7f8ac69dcf6a50) commit bed76caa6caaea6a6598755b82a54425a9d9f73e Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Mar 5 23:36:00 2007 -0800 Use EDID data to set screen physical size at server startup. Screen physical size is set to a random value before the RandR code gets control, override that and reset it to a value based on the compat_output physical size (if available). If that output has no physical size, just use 96dpi as the default resolution and set the physical size as appropriate. (cherry picked from commit 843077f23a1b49bd712d931421753e3a09d4008c) commit 47f8361c3a64834587e54507653d8d5b258c2530 Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Mar 5 22:07:01 2007 -0800 Add xf86SetDesiredModes to apply desired modes to crtcs. xf86SetDesiredModes applies the desired modes to each crtc (as selected by xf86InitialConfiguration initially and modified by successful mode settings afterwards). For crtcs without a desired mode, pScrn->currentMode is used to select something workable. (cherry picked from commit bcade98ccaa18298d844a606cb44271f0254c185) commit 33d2cf93fb50464941e74efe246b10aee212223a Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Mar 3 23:10:31 2007 -0800 Move xf86SetSingleMode into X server from intel driver. This function applies a single mode to the screen (as from RandR 1.1, XFree86-VidModeExtension or XFree86-DGA) using a policy that selects one output to reconfigure to the requested mode and then makes all other outputs fit within that size. (cherry picked from commit 5a595c1f767a8d666348b845d18934aee0cfe38f) commit 689d52b6242434507a64a8fff27b01607628c393 Author: Jens Granseuer <jensgr@gmx.net> Date: Mon Mar 5 15:31:44 2007 -0800 Bugzilla #7145: fix build with gcc 2.95 Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145> Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987> commit 74175e0af74c530cb712a6772d3c5d61d1be9748 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 5 12:34:37 2007 -0500 devPrivates rework: remove some debugging code from dixFreePrivates. commit 23fc429aad5b2721911862617772c314e1036bb0 Merge: e68482470 fe7b8f423 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Mar 5 12:18:54 2007 -0500 Merge branch 'master' into XACE-SELINUX commit e684824709fa8ffe03dde3c8dfbc58c267515a4f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 1 15:00:02 2007 -0500 devPrivates rework: redo interface and implementation. commit fe7b8f4237874e3e45fe25a6bf06faddfa1ab8e1 Author: Ben Byer <bbyer@bbyer.(none)> Date: Mon Mar 5 03:48:27 2007 -0800 began to factor out code to move to darwinEvents.c commit 537dc5ecde46d0525c503d1d2b39b6eb89a1298e Author: Ben Byer <bbyer@bbyer.(none)> Date: Mon Mar 5 02:30:56 2007 -0800 started moving new input code into darwinEvents.c so that it may be shared by the three servers commit 39aa79177196e21bcdbaf8e44adead9ef91e6ee5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Mar 5 15:31:16 2007 +1030 dix: Add GuessFreePointerDevice(). Runs through device list and tries to find a pointer that hasn't been paired yet. xfree86: Use GuessFreePointerDevice() for newly connected non-sprite devices. commit 8ba5e8d82014b774a52f3e050ddbbb8bde4e0933 Author: Dave Airlie <airlied@linux.ie> Date: Mon Mar 5 13:46:41 2007 +1100 add a standard connector type and name for us as an output property commit 2e31872e05c2408d53ba0182bcddc5dabb3615fe Author: Dave Airlie <airlied@linux.ie> Date: Mon Feb 26 09:40:00 2007 +1100 modes: add commit/prepare hooks commit 1f0075786fedde538a95e2f39681052e25021d88 Merge: 57aa5e908 12175b668 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Mar 5 12:37:17 2007 +1030 Merge branch 'master' into mpx Conflicts: configure.ac dix/getevents.c hw/xfree86/ramdac/xf86Cursor.c mi/mipointer.c xkb/xkbUtils.c commit 06b01186f6ae17aafdd1f628c306466ddea9e065 Author: Keith Packard <keithp@neko.keithp.com> Date: Sun Mar 4 17:15:24 2007 -0800 Remove debugging ErrorF from rotation code. (cherry picked from commit e6af7569f201842b4754aec6e72b30dc2daefdfb) commit c14507b6837387d867792a24778786311b2b38d5 Author: Keith Packard <keithp@neko.keithp.com> Date: Sun Mar 4 17:06:37 2007 -0800 Handle non-zero origin rotated crtc. Damage crtc area on re-rotate. Box transformation from source to dest area was broken, leaving the wrong areas painted when the crtc origin was non-zero. When rotating from left to right, the pixmap doesn't get reallocated, and so no damage was left in the pixmap from xf86RotatePrepare. Separately damage the whole crtc area when this occurs to repaint the area. (cherry picked from commit 2a50ca2160bc05af1c24421ec079e902ff730277) commit 97978b515b7af5fbaaa32b1729e835f3bfb9f5c6 Author: Drew Parsons <drew@pug.localdomain> Date: Sun Mar 4 16:28:54 2007 +1100 Xprint: fix font symlinks Change symlinks to Xprint base fonts in model/PSdefault using local relative links. This facilitates moving the Xprint config files, for instance for FHS compliance placing data files in /usr/share rather than /usr/lib. Also ensures NewCenturySchlbk-BoldItalic.pmf is installed. commit 215e3691b76a63e6af19865790193b20b105ec5a Author: Ben Byer <bbyer@xyzzy.local> Date: Sat Mar 3 21:52:56 2007 -0800 stopped using XTrans internals in X11.app because they're apparently no longer public commit ea8dcc458ea8870126cf8d3e21cab9d63d094c5e Author: Ben Byer <bbyer@xyzzy.local> Date: Sat Mar 3 21:51:20 2007 -0800 Makefile fix for X11.app commit 18508212599bf0964c450c69b9790208e5d428be Author: Ben Byer <bbyer@xyzzy.local> Date: Sat Mar 3 21:41:33 2007 -0800 fixed X11.xcodeproj to get CFLAGS and LDFLAGS from autoconf script commit 7f2b9f3790456044d01bf8e6404f9a1239b41da6 Author: Ben Byer <bbyer@xyzzy.local> Date: Sat Mar 3 19:27:53 2007 -0800 autoconf fixes for XDarwin (created DARWIN_LIBS) commit 12175b668a94e23994f724b366a691ec312cce69 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:50:02 2006 +1030 o fix minor error in comment for GetPointerEvents() commit ea1a72946d1aa4c256e6afb9d834c582ba4ac3a1 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Feb 28 14:26:47 2007 -0800 Add a canGrow argument to xf86InitialConfiguration. canGrow indicates to the DDX that the driver can enlarge the desktop via the xf86_config->funcs->resize hook. If so, xf86InitialConfiguration will set virtual[XY] to match the configuration it chooses and will leave the crtc config size ranges alone. If FALSE, it will bloat the screen to fit the largest probed mode and also set the crtc config max size to limit the desktop to the initial virtual[XY] size. commit 04d15da95d608766c7832a7aa881be499c1395ba Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Feb 28 13:36:58 2007 -0800 Add a screen resize hook to xf86CrtcConfigRec. This hook is called when the DDX needs to resize the screen. The driver is responsible for changing virtualX and virtualY, along with any other related screen properties (devPrivate.ptr, devKind, displayWidth, etc.). Use the size range from the crtc config instead of randrp->virtual[XY] when reporting the min and max screen sizes to the DDX. commit b11dfac287d65de7b83f63749087cba4e8ddaf4a Author: Matthias Hopf <mhopf@suse.de> Date: Fri Mar 2 12:30:26 2007 +0100 Legacy framebuffer support wasn't compiled if Xorg wasn't explicitly enabled. commit 57aa5e908dc11d5d8c27ed705c526f1416c1e8ad Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 2 17:14:37 2007 +1030 dix, Xext, Xtrap, Xi: replace inputInfo.pointer with PickPointer where possible. More replacements to come. commit e43b8a4e40991ca6e545bda4cf9b9bd7a2bf22e2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Mar 2 15:21:46 2007 +1030 dix: Add ClientPointer to client, used for picking which pointer to use in ambiguious request. PickPointer and PickKeyboard are used for getting the appropriate pointer when situation is unclear. Fix some issues with InitializeSprite. dix, xfree86: Remove last traces of InitSprite. commit 2dafc46e3d814e02b25e5a2fa2e931f0257402a8 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Thu Mar 1 17:44:39 2007 -0800 Fixed pointer events in Xquartz -- Keyboard events work, but the keycodes are incorrect. commit 74f1de1de9633119c2cf26086875717181c8a6f7 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Mar 1 12:07:33 2007 -0500 devPrivates rework: unhook resource system; will try a different approach. commit 39ecd6fff4f946deebe310b4b26b171c842db223 Author: Ben Byer <bbyer@bbyer.(none)> Date: Thu Mar 1 01:45:19 2007 -0800 Rewrote parts of the Xquartz event-handling code (thanks daniels and whot!) It should still be considered a work in progress, but mouse events almost work. commit ed7ccc481ad1caaa518cafe944c2327a5d0b6c65 Author: Ben Byer <bbyer@bbyer.(none)> Date: Thu Mar 1 00:51:10 2007 -0800 AIGLX support for Darwin -- works well enough to run glxgears and glxinfo, but still needs more testing. commit 43bd35fcf85b51b7e5714844bade90184dbd746f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 1 17:19:37 2007 +1030 dix: Remove InitSprite, work can be done by InitializeSprite. Free sprite struct if a spriteOwner is paired. xfree86: Use PairDevices instead of passing booleans around when creating a sprite. Xext: Switch back to using LookupPointer/KeyboardDevice instead of inputInfo.xyz. commit 90ca76ba28fcd8bed945e33cf9674784fa2eb533 Author: Jay Cotton <jay.cotton@sun.com> Date: Wed Feb 28 17:40:58 2007 -0800 Add sun_apm.c for Suspend-and-Resume support on Solaris <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6205248> commit 06c3021aec720837bef432656e88ae9b4e35101d Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Feb 28 16:09:11 2007 -0800 Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets. commit 68c64ad7b1eea79c786b5a7f3459076780163a47 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Mar 1 09:51:20 2007 +1030 Xext: Update device's lastx/lasty when sending a motion event with XTest. commit 8b245758845523d5f8f017bb9d0e9aa57b616c28 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Feb 26 17:45:40 2007 -0800 Return BadMatch if a client tries to clone non-cloneable outputs. commit 2a35d44b6d87f96a7ce90dc8f0142f48cc176e95 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 28 15:43:06 2007 +1030 Update device valuators on XTest motion event, otherwise the cursor jumps between coordinates stored in device and coordinates sent by the event. commit d9bcb22d199e8444b9762a35754e04d327dd5915 Merge: 272d9341d c16343ac2 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Tue Feb 27 16:28:20 2007 -0800 Merge branch 'master' of git+ssh://bbyer@git.freedesktop.org/git/xorg/xserver commit 272d9341d0f7c3e9e0c9b9a8c0d4d8779cdcc5cf Author: Ben Byer <bbyer@bbyer.apple.com> Date: Tue Feb 27 16:27:26 2007 -0800 fix for hw/darwin/Makefile.am to properly use XSERVER_LIBS commit c16343ac2ca18391b21022b2edd02ad9f413d2b3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Feb 27 14:14:47 2007 -0500 Make mfb, cfb, and afb support configurable at build-time. commit 5680efc0d2baf0a9451e82e490e3690fc23dda0f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Feb 27 09:55:48 2007 -0800 Sun bug 6529003: Xorg should not be including <sys/immu.h> on Solaris <sys/immu.h> was removed from the latest Solaris Nevada build, but it's been useless to Xorg for a long time (it only declared a couple of kernel variables) <http://bugs.opensolaris.org/view_bug.do?bug_id=6529003> commit ab0fc8c1ad7ea2dc3389a4a4bb1c45bbded5e7ad Author: Ben Byer <bbyer@bbyer.(none)> Date: Tue Feb 27 00:14:35 2007 -0800 verbiage corrected per daniels commit cdd4c84572cc3bdd004f8dca6d8b64e710344ac0 Author: Ben Byer <bbyer@bbyer.(none)> Date: Mon Feb 26 23:57:02 2007 -0800 added hw/darwin/README.apple file with some todo items and props. commit 776d4d6587c57f94bca8732f915d07a0d4e137c8 Author: Ben Byer <bbyer@bbyer.(none)> Date: Mon Feb 26 23:40:00 2007 -0800 X11.app now builds correctly commit 154d2c13f4ec22b7e6332808bbcd049d63784891 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Mon Feb 26 19:39:26 2007 -0800 more changes for X11.app commit fa06e11f972e2a75c84b2f1586997ffc1239cbd9 Author: Ben Byer <bbyer@bbyer.apple.com> Date: Mon Feb 26 17:06:53 2007 -0800 added hw/darwin/apple directory, which contains source and data files to build a version of the X11.app shipped with Mac OS X, using the X.org server. commit a16360733ea393ec1fc267e88fc604d9d7534484 Author: Jay Estabrook <Jay.Estabrook@hp.com> Date: Sun Feb 25 19:58:26 2007 +0000 Fix root bus/domain selection on alpha commit 566610680c4e1cab3e7fc7146adbeaba52fdd0ad Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Fri Feb 23 15:20:35 2007 -0500 Don't install libi2c.a commit 81372f9096b952f4be545654b0b44ac37ef4f2c2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 23 13:23:12 2007 -0500 devPrivates rework: hook up new interface in resource system; add new resource-adding function that takes an additional ScreenPtr argument. commit 16f2b8892d9ebcef6410a675d10549043223f617 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 23 13:20:43 2007 -0500 devPrivates rework: add new interface implementation. commit 779faccfb78648a9f7e70b77dcfa9f6e19559772 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 23 13:19:53 2007 -0500 devPrivates rework: add dix header file containing new interface. commit bc4ae25433e38a25a2012f9f233d500665172a4b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Feb 23 12:06:51 2007 +1030 xfree86: Don't initialize sprites for devices that don't own a sprite (stops keyboard hotplug segfaults) commit af550ea91c451cf4f831c2413266a19d1f211d0e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Feb 22 14:38:40 2007 -0800 Move SecurityPolicy file format from Xserver(1) to it's own man page Don't make users looking for Xserver information page through pages of details only interesting to the handful of people writing security policies. commit b1142cdbce76fed8cb22ba6d7ac027751dd56a76 Author: Brice Goglin <brice.goglin@ens-lyon.org> Date: Thu Feb 22 12:26:04 2007 -0800 Bug #10034: 'man Xserver' typos: s/dqoute/dquote/ Bugzilla #10034: <http://bugs.freedesktop.org/show_bug.cgi?id=10034> Patch #8780: <http://bugs.freedesktop.org/attachment.cgi?id=8780> commit 4b8b0e377a27ec904b2028c89aed11c6416af26c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 22 20:00:59 2007 +1030 Xi: Add access control request handling. dix: New file access.c to handle all access control for devices. commit 9a3eb0357e779d5d5f76858f23667956c4c5d721 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 16 19:30:03 2007 -0500 devPrivates rework: add RC_PRIVATES class, make ResourceRec visible in the API, and add extra fields and structure supporting private storage. commit cd0af7a7856e8246e27acc5513d219a094211625 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 21 10:08:41 2007 +1030 Xi, dix: Only one client at a time can change the pointer-keyboard pairing, using xRegisterPairingClient request. commit 3344a4eda704edc7dc30037f095de277a60a70bb Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Feb 15 16:27:50 2007 +0100 DRI: Make sure number of DRI windows is accurate in driver ClipNotify hook. Always call DRI{De,In}creaseNumberVisible (which in turn calls DRIDriverClipNotify) after updating pDRIPriv->nrWindows. commit 3c7a27dc77595ad018bb7c4f7cef6bc178268cb6 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Feb 14 16:17:18 2007 +0100 DRI: New ClipNotify driver hook. The hook is called whenever the clipList of any DRI window changes, be it via DRIClipNotify, DRICreateDrawable or DRIDrawablePrivDelete. This allows the driver to keep track of which DRI windows are visible where. commit eedf148e5a1273ebbf4dc8dcac9c435712fc00ea Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Feb 2 18:27:40 2007 +0100 Track number of visible DRI windows separately for transitions. This allows e.g. doing page flipping with multiple DRI windows as long as only one of them is visible. commit 8a42af6a935b1cf0e15102e986bb527f4fab31a8 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Feb 19 15:28:37 2007 -0800 Check for clientGone before sending events from XFixes (bug #1753). Freeing resources during client closedown can cause cursor changes which attempt to send cursor events through the XFixes extension; a client in the process of closing down has no file to send events to, causing a crash when this path is hit. commit 4660eaaffb36f526f71d5847ae1309c10ee133c6 Author: Ben Byer <bbyer@bbyer.(none)> Date: Sun Feb 18 14:09:51 2007 -0800 configure fixes for darwin commit 5631a67f648f5f151a849a918ee12871c71c32e9 Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Feb 16 10:06:22 2007 -0800 Don't set subpixel order during startup; the screen won't be ready. in xf86CrtcSetMode, scrn->pScreen will be NULL during server startup time, so don't try to set the subpixel order. subpixel order will be set in the randr initialization anyways. (cherry picked from commit 5f6f8616d862ce4a37f6d3df4bdbc44fd21cc82a) commit 096965ec9c7514f0c9fc0d17e5166f2d26781f87 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Feb 16 02:17:11 2007 -0800 Ensure drivers can use new modes header files. New modes header files required a few minor changes to be used by external drivers, the most notable of which is the publication of the config file parser header files. commit 55797dd252382d35ebab5d9e18a5e0e77872d775 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Feb 16 00:56:00 2007 -0800 Respect rotation in initial screen size computation. commit e4507825bf0328ea59673f2bbe652de3a9105c86 Author: Keith Packard <keithp@guitar.keithp.com> Date: Fri Feb 16 00:41:29 2007 -0800 Enable startup-time rotation; change rotation pixmap creation API. Add monitor "Rotate" option taking one of "normal", "left", "inverted" or "right". However, because initial mode selection is made before the screen is completely initialized, we cannot create the shadow pixmap object at this point. Pend the shadow pixmap creation until the block handler. Note that this code is not completely functional yet. commit 8606aeb9b2ab2dafc11e64436db4d3a7e67dbcc0 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Feb 15 22:23:16 2007 -0800 RRConfigureOutputProperty is a variable length request. Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE commit a88844eccb0e423e71d4fcb286866a026308babd Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Feb 17 20:35:07 2007 +0200 configure.ac: disable dmx per default Disable DMX until it gets ported to the new input API. commit e9a2cc7d9fcc73e16576be2522522cce675dc3f3 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Feb 17 16:17:48 2007 +0200 config: error message cleanup Demote failure to connect from ErrorF to DebugF. commit 81876bc5ddc2f3eda5078fe4bd101917fb32e586 Author: Ben Byer <bbyer@apple.com> Date: Sat Feb 17 04:07:11 2007 -0800 oops, missed a spot commit d287b76471f66c9aea54f969d050b35643cb2501 Author: Ben Byer <bbyer@apple.com> Date: Sat Feb 17 03:47:42 2007 -0800 cleaned up some linking ugliness in hw/darwin/quartz commit 81444486be4f182dde778bac6f7edcbfc4368482 Author: Ben Byer <bbyer@apple.com> Date: Sat Feb 17 02:23:11 2007 -0800 autoconf goodness for XDarwin, courtesy of pogma commit cf4994b0db2fef4c10ce8804adef766bc5118daf Author: Ben Byer <bbyer@apple.com> Date: Sat Feb 17 01:21:43 2007 -0800 dix mods for Darwin commit cece0601571f6304e392a3a40505664544b249f3 Author: Ben Byer <bbyer@apple.com> Date: Sat Feb 17 01:00:13 2007 -0800 build fix for configure.ac / BUILD_DARWIN, oops commit 00b0657b815b95964401c3e36eed54063afbd003 Author: Ben Byer <bbyer@bbyer.(none)> Date: Sat Feb 17 00:55:32 2007 -0800 glx fixes for XDarwin commit 93777c7b96e560da087963040e372aecbfca7bbc Author: Ben Byer <bbyer@bbyer.(none)> Date: Sat Feb 17 00:22:39 2007 -0800 more patches to make the Quartz part of XDarwin work again (thanks Peter and Torrey!) commit 612144c811fdf06b7c03cf48a321388fe411acd4 Author: Ben Byer <bbyer@bbyer.(none)> Date: Sat Feb 17 00:09:58 2007 -0800 More build fixes / updates for XDarwin: quartz/cr: "Cocoa Rootless" support (deprecated in favor of xpr?) quartz/fullscreen: Fullscreen support using Xplugin (not yet functional) commit 68d39d8571d8717d26cedc84015d537549520a14 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Feb 16 23:02:13 2007 +0200 kdrive/ephyr: fix keysym type confusion once and for all Take keysyms in as an XID in hostx_load_keymap() and explicitly convert them to CARD32 for loading into the server. Fixes Xephyr on AMD64, wa-hey. commit 5507cb885d861e974be240120ada2ace2a980a72 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Feb 16 23:01:27 2007 +0200 kdrive: delete input debugging, yet again ... I have no idea how this keeps on coming back. commit 2534f5a9027c196f677923aaa38fa9ed9917f73d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Feb 16 15:33:48 2007 -0500 Remove nasty function pointer type from DevUnion, return to documented type. commit 84efe23ae834dd3a4d3f3e08832b69469c7382aa Author: Ben Byer <bbyer@bbyer.(none)> Date: Fri Feb 16 04:37:38 2007 -0800 updated darwin/quartz/xpr (libXplugin interface for Mac OS X) support commit 5e7f7436a755a33e48ab91831cc6af710a8344ef Author: Ben Byer <bbyer@bbyer.(none)> Date: Fri Feb 16 04:12:26 2007 -0800 merged in miext/rootless changes for XDarwin support commit f350909d1696fcfda87e8f12c729254d762313c9 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Feb 15 21:50:48 2007 -0800 Kludge around duplicate code added in hw/xfree86/modes. Code added in hw/xfree86/modes came from the server-1.3-branch. Portions of this code had previously been integrated into xf86Mode.c and edid_modes.c. To preserve hw/xfree86/modes as much as possible, the duplicate code from the other files has been disabled; a more careful review would figure out where that code actually belonged. commit 258beebc77510f84fbea66d6ebf29c5097bd11db Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Feb 15 20:13:15 2007 -0800 Report correct RandR 1.0 sizeID. Report correct subpixel order. RandR 1.0 sizeID must be computed the same way every time, so when reporting it in the ScreenChangeNotify event, just construct the usual 1.0 data block and use that. subpixel geometry information can be computed by looking at the connected outputs and finding any with subpixel geometry and using one of those for the global screen subpixel geometry. This might be improved by reporting None if more than one screen has information and they conflict. commit ef6b1235fd7d6dc422e8a150c089496a8e648067 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Feb 15 11:27:35 2007 -0800 Allow new modes code to build inside drivers as well as server. Use config.h for driver builds where xorg-config.h isn't available. commit 3dbe8f6b6ea32a9a137ad6e9235f74009b095bd8 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Thu Feb 15 17:51:01 2007 +0100 Distribute hw/xfree86/modes. commit d4eb4d065032112a38444e36f791cb468a5ca8f4 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Feb 15 20:36:20 2007 -0800 Merge crtc/output-based mode selection code. This code comes from the intel driver, so there's no history in this tree. As the crtc/output-based mode selection code uses ddc, the ddc and i2c modules have been merged into the server. Attempts to load them are safely ignored now. commit 37fe4c49dc3a5faf2d3d56112b6bd78453045f6a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Feb 16 09:57:57 2007 +1030 mi: Move WarpPointer event generation to miPointerMove to avoid duplicate events, cache event array allocation. commit c2f3f705f1db8ca78292912544a7e416116175f3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 15 14:38:24 2007 -0500 Bug #6988: Change behavior of Security extension per user feature request. commit 811675733e97416c990e6dc9c19271b43d96248d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Feb 15 19:09:00 2007 +0200 os: fix client privates leak Minor leak here. Oops. commit 8f6961d385bda92703f18090cff551409d2710c9 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Feb 15 19:08:46 2007 +0200 configure.ac: add xdarwin stubs Add stub AM_CONDITIONALs to at least fix the build. commit a3b62623b8aac56b219633bdb2c2f6de19b0580b Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Feb 15 17:07:42 2007 +0200 change versioning for new server version scheme See: http://xorg.freedesktop.org/wiki/XDC2007Notes#head-2719037a1905516c45cf74f0e155c8703221e446 commit f452507ca9209598401d15da0039aaa4e1fed1a3 Merge: 04632835b 811675733 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 15 09:47:20 2007 -0500 Merge branch 'master' into my-XACE-SELINUX commit 04632835b7402456fdcf6c8fa01970cd2804e27c Merge: 88f89b9ac 9ecf79ca0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Feb 15 09:27:05 2007 -0500 Merge branch 'master' into my-XACE-SELINUX commit 0f6dd4aea6176507dbe1c90c950d332fecbcaacb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Feb 15 16:14:57 2007 +0200 kdrive/ephyr: free screen struct Free screen->driver on screenFini, instead of just leaking it. commit 9ecf79ca0111dd899ca88dd54156f71013220fcc Author: Ben Byer <bbyer@apple.com> Date: Thu Feb 15 05:22:21 2007 -0800 Beginnings of an update Darwin driver commit 136bb4874aadf4a731d7eb8671e8bb641f9980a7 Author: Ben Byer <bbyer@apple.com> Date: Thu Feb 15 05:14:38 2007 -0800 iokit support for XDarwin commit 3ead1afe78d2913f08c8144cb2d3813c6b159488 Author: Ben Byer <bbyer@apple.com> Date: Thu Feb 15 05:09:29 2007 -0800 Beginning of patches to add XDarwin support to the modular tree; special thanks to Torrey Lyons and Peter O'Gorman for making this possible. This is the automake framework for the XDarwin.app interface files. commit f6c3b9fa97ccf85e96f15435d564a1c261e40532 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Feb 15 13:51:20 2007 +1030 xfree86: mouse and keyboard hotplugging support. New mouse devices will get new cursors, keyboard devices use VCP's focus until paired. commit d570ff7c81858a3174686b46a088f67563b4a2d5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 14 17:09:33 2007 +1030 fix: WarpCursor needs to send MotionNotify. commit c4fe1bcce1c1e4822e688959b331b47a051d6e0a Merge: e540d572c d570ff7c8 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Feb 14 15:39:52 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit e540d572c5acba877b3ce01e7b31e399dac2d44a Author: Ian Romanick <idr@us.ibm.com> Date: Wed Feb 14 15:38:10 2007 -0800 Merge fix missed on previous commit. commit 81aa7f059d3cfd8d28420b7932b8ff7e06d67979 Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 14 12:48:15 2007 -0800 Add missing dirty marking in a couple of fallback cases in the exaGlyphs path. commit a5f19c5150a7b3dc2ff3ad759ee1a6ab0ad8925c Author: Eric Anholt <eric@anholt.net> Date: Wed Feb 14 10:39:46 2007 -0800 Mark sync when UploadToScreen succeeds in exaGlyphs(). commit a492d494f51caf15a5cb979dc335387486c105d1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Feb 13 18:32:59 2007 -0800 Update Xvfb man page: remove monolith build instructions, use /var/tmp instead of /usr/tmp commit 25104ed2e6050f86691104b34eeaf3147eb83c4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 14 11:26:53 2007 +1030 dix: fix typo in condition. commit 33ef546b942977bb2573156eaba5269350d16f99 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Feb 14 11:18:43 2007 +1030 dix: Clean up GetPointerEvents. If pDev == inputInfo.pointer, assume that we do not want Xi events. mi: Remove POINTER_CORE_ONLY flag. commit a23b0b069cac8a48e2b306b2095515d75f647705 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Feb 12 17:50:00 2007 -0500 Typo fix. commit d21c95f80bdba2f29eedd57fb0b00e580391c08e Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Feb 12 17:22:39 2007 -0500 Hook up --with-builderstring for vendor build identification. commit 46784d24c11767455a4986449a8037295912dcee Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Feb 12 17:18:29 2007 -0500 Remove spurious LIBADD from xf4bpp commit 16eb7254f861465f988ae3861ac3449c2c966062 Merge: 3814862a8 c4b7e9d1c Author: Ian Romanick <idr@us.ibm.com> Date: Fri Feb 9 12:38:49 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit c4b7e9d1c16797c3e4b1200b40aceab5696a7fb8 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Feb 6 14:57:22 2007 -0800 Add an RDTSC implementation to the x86 emulator. This instruction is being used in some debug VBIOSes. This implementation doesn't even try to be accurate. Instead, it just increments the counter by a fixed amount every time an rdtsc instruction in encountered, to avoid divides by zero. commit 262b9b104a04e55969593ef96a16004e53ecd00a Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Feb 6 17:30:22 2007 -0500 Use the new 8888x0565mmx function in fbpict.c commit 876b806ec09d5ff0c6cd19df91006c4eefedfaa6 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Feb 6 17:16:23 2007 -0500 Reapply patch to fix AMD CPU detection commit 13568d2aa43da4216bbcb46e1125ff28c323ac54 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Feb 6 17:12:01 2007 -0500 Revert "Fix for AMD cpu detection. Bug 9614, Dan Williams." This reverts commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 since unrelated changes in fbpict.c broke the build. commit 5a3334410367a2186b2c667fa1eb6cf0baf93e95 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Feb 6 17:11:01 2007 -0500 Add new fbCompositeSrc_8888x0565mmx() function, based on patch by Dan Williams. Bug 9682. commit b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 Author: Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> Date: Tue Feb 6 16:43:37 2007 -0500 Fix for AMD cpu detection. Bug 9614, Dan Williams. Credit for the fixes in this patch goes to: Marco Gritti <mpg at redhat dot com> Jordan Crouse <jordan dot crouse at amd dot com> commit 7cd73b00a29469d37a7f526cc9b35cc927a13ae2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 5 14:48:48 2007 +1030 dix: If POINTER_CORE_ONLY is set, GetPointerEvents() only creates a core event mi: fix: Create motion event in miPointerMoved commit 760a38c4c7ab66ae653d3acb92f5cda4bd44edd6 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Feb 5 03:39:36 2007 +0200 XkbCopyKeymap: fix copy-and-waste accident When we reallocated modmap, we accidentally clobbered syms with the result, leaving syms definitely too small, and modmap also potentially too small (as well as not actually allocated anymore). commit 17d85387d1e6851d35474b65929e268ca64ef65b Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 18 15:23:57 2007 +1100 dmx, vfb, xnest: fix fbcmap compilation Don't always define XFree86Server, but only for damn fbcmap.c. Split fbcmap.c into its own library to achieve this. commit a309c936bb79e2fea04a96ce33c7da99ed902484 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Feb 5 11:38:44 2007 +1030 xkb: Daniel's patch to stop evdev keyboard segfaults. mi: Remove quickfix from ba547d4f6a2707f51f0d826389d2d418fb62367a commit 236f04b638e7d4d1656c6bedd8a6e8d7cec285ec Author: Dave Airlie <airlied@linux.ie> Date: Mon Feb 5 09:09:12 2007 +1100 remove array_cache from everywhere commit eb228e8d1eaa78911541b2fec5d04a74c1299718 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Sun Feb 4 22:06:59 2007 +0000 clean up more of the vbo fallout commit fb1bc1c65b88527b42a0e4abed23e5ddaae711b7 Author: Dave Airlie <airlied@linux.ie> Date: Sun Feb 4 18:39:58 2007 +1100 add vbo to .gitignore commit d8e148ec841d340327e6813127b0e0ffc4db712d Author: Dave Airlie <airlied@linux.ie> Date: Sun Feb 4 18:39:04 2007 +1100 update xserver for vbo code in mesa commit 5dcad9e9d7d9993d65f989219bee94a060bbf476 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Feb 2 14:44:55 2007 -0800 Fix bus error on startup in 64-bit Xephyr hostx_get_visual_masks takes unsigned long * arguments, but was being passed pointers to CARD32's. commit 170a55022ebc7b148bff93886eda152a0d5ce79a Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Feb 2 20:56:12 2007 +0000 remove file commit e6a505be84f5f72349d6860dc5a5058367516019 Author: Dan Nicholson <dan@conor.dwcab.com> Date: Fri Feb 2 20:53:01 2007 +0000 The array_cache sources don't exist anymore in the Mesa tree, so we shouldn't try to build them. commit af20485ec370801f2aabfaeae17bbd030a849bd1 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Feb 2 19:14:46 2007 +0000 Remove array_cache for recent Mesa changes commit cf5b29d75dad7c74543f49f010c817623a3df747 Author: George Sapountzis <gsap7@yahoo.gr> Date: Fri Feb 2 12:57:38 2007 +0200 dmx: drop leftover __GLXdrawablePrivateRec struct. commit 4f2f3233c808fd86bf9f6c09937feda9e0b367fd Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 1 15:10:29 2007 -0800 Fix the size expectations of xRRSetCrtcGamma. It was using REQUEST_SIZE_MATCH (client request length must equal request size) rather than REQUEST_AT_LEAST_SIZE (client request length must be at least big enough for request size), and this request has data following the request structure. commit 8274ea6aa97b06a56b7468c3908894c0ff72b687 Author: Eric Anholt <eric@anholt.net> Date: Thu Feb 1 12:15:54 2007 -0800 Set the Damage version supported in the server, instead of using damageproto. This was caught by distributions upgrading damageproto to 1.1, before the server they had supported it. The server then advertised the new version without supporting the protocol. commit 8bce182568f14edfb03911d8c5d791fd83bb6222 Author: Eric Anholt <eric@anholt.net> Date: Mon Jan 29 17:30:59 2007 -0800 Restore a few important lines killed in the previous commit. Typical results were failure to sync, and a black screen. commit 3814862a869ee83d307eb01225d5949039f435d8 Merge: a216de9b7 31f2d4a57 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 29 15:14:31 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/os-support/bus/linuxPci.c commit 31f2d4a57e04f5ea635fbb50c508405c4fc37b65 Author: Eric Anholt <eric@anholt.net> Date: Mon Jan 29 09:39:33 2007 -0800 Bug #9680: Remove bogus blank length limiting in xf86SetModeCrtc(). Our modes typically come from EDID or default modes, and when the monitor asks for a specific mode, deciding to tweak it usually results in incorrect display. And if the user is specifying a mode by hand, tweaking it then is still pretty rude. Reviewed by: ajax commit 4aaaa70d1b52346213fad46777c006a93c4ece5d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 29 18:23:24 2007 +1030 Xi: Adding ChangePointerKeyboardPairing request Adding PointerKeyboardPairingChanged event Correct error values for XWarpDevicePointer dix: Adding device argument to SendMappingNotify Adding spriteOwner flag to devices commit f3418b52dcf2ab4982504856ab9fae3e726ee6d2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 29 16:10:03 2007 +1030 mi: Fix cursor rendering issues. commit 15a81b6325d359990017b8e9f17ce18a7eff1354 Merge: 3759254c0 cc3d66d4a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jan 28 17:18:57 2007 +1030 Merge branch 'master' commit cc3d66d4a53fee8f1d940bb8c7f032c94b9c25f6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:50:02 2006 +1030 o fix minor error in comment for GetPointerEvents() commit 3759254c0967ae83bdcbf097d9e8a58733c8e6f9 Merge: ba547d4f6 ca5ebe397 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Sun Jan 28 17:05:55 2007 +1030 Merge branch 'master' commit 1627af54497bee659ea30f2850b39cbbf576e22d Author: Jonathan Lim <jlim@sgi.com> Date: Fri Jan 26 13:00:45 2007 +0100 Call linuxPciOpenFile() for r/w access if applicable. Currently, the call to linuxPciOpenFile() is always made for read only access which causes the subsequent mmap call to fail when the memory is mapped read/write. Xorg #9692 commit a216de9b7ff55e2b73c487d037f248f00bd2e63b Merge: 24506ea65 cf7ca9d09 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 25 10:17:32 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit cf7ca9d09cba14d107152a5179de38e5ef7bd784 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 24 20:20:48 2007 -0800 Plug memory leak in doLoadModule() commit 5abd50e37ceda134897891ed32e05215db67e0b4 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 24 18:54:38 2007 -0800 Correct help lines for configure's --with-vendor-name flags commit b32a40817fc0e2ac2edf2fa22a8813087fce2e7b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 24 16:29:49 2007 -0800 Correct variable descriptions in comment for SecurityCheckResourceIDAccess commit 24506ea65be4cb29c5e1486aa0a529a40ce5c230 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 24 15:33:49 2007 -0800 Move xf86ReadLegacyBIOS to the one place that uses it. xf86ReadLegacyBIOS is only used by one function in int10/generic.c. Move a generic implementation of that function there, rename it to read_legcay_BIOS, and delete all remnants of it from all other places. commit fdb3a0798f0d17e72ec7293d59a7a81b5ffdf95b Merge: 39b51e1bf a53586eeb Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 24 14:49:39 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit a53586eebc166e35c1f48942205832810061daee Author: Eric Anholt <eric@anholt.net> Date: Wed Jan 24 13:36:25 2007 -0800 Warning fix for RRCrtcSetRotations(). commit 7a12952fd437b105ea0d013d680f9c3a775a183c Author: Eric Anholt <eric@anholt.net> Date: Wed Jan 24 13:34:29 2007 -0800 Bug #7639: Only swap out pixmaps (rather than everything) on VT switch in EXA. This is a new behavior for version 2.1 of EXA, and only takes effect if the driver has requested that. Otherwise, the previous behavior remains the same. commit b6b855932109b4bc3454f07bef8cb079d79ca369 Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 25 00:29:20 2007 +0800 Make Xinearama screen information reflect CRTC rotation. commit 39b51e1bfc4924fc3bda4342ef9c6c0125d9f4fa Merge: 637b19b3e 788cfce91 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Jan 23 13:25:56 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit 788cfce911793a26aed16f38f30678ecee82c873 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jan 23 10:15:22 2007 +0100 Bump video driver ABI version to 1.2. This is necessary because server-1.2-branch bumped to 1.1 for xf86CVTMode and we have xf86XVFillKeyHelperDrawable on top of that. commit 637b19b3ee7345c2d449ce94ceabe998d817c02e Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 22 09:58:33 2007 -0800 Eliminate pciControlBridge, pciGetBridgeBuses, and pciGetBridgeResources. commit a232e4ae938fa3a68f7614995676eda7929260db Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 22 09:16:45 2007 -0800 Convert xf86GetPciHostConfigFromTag to get_parent_bridge. Convert xf86GetPciHostConfigFromTag to a new function called get_parent_bridge. This name better represents what xf86GetPciHostConfigFromTag is used for: walking up the lists of PCI bridges from a device. commit 844560a02fa6c4ce18ea2af3ec27beaa60b7af11 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 22 09:13:59 2007 -0800 Elminiate ARCH_PCI_OS_INIT. Never, ever use the ix86Pci stuff on Linux. This renders the whole ARCH_PCI_OS_INIT mechanism useless. Remove it. commit 7dfb3cea913b02a6b36c308d1330bd40abe6b41f Merge: c279d5fdc 2dc866252 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 22 08:44:36 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit 2dc866252c84ed0e7b3afa25e8a5312f448d405b Author: Eric Anholt <eric@anholt.net> Date: Mon Jan 22 08:41:50 2007 +0800 Really fix optimized render cases being hit when they shouldn't. I don't know how this define slipped in there. Fixes 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3. commit 88f89b9ac1b92a0916c46488350ff68c3ffdd490 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 19 19:15:49 2007 -0500 Policy updates: use x prefix in property and ext types. commit 2fb8b7f8199c35ae0870cb54b40ee28a4e01d479 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 19 19:14:51 2007 -0500 Split ObjectSIDByLabel into two functions since property labeling now involves an additional compute_create lookup. commit 0d6d373af95d0004d33b987d14ad7e04dd5d2003 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Jan 19 14:52:23 2007 -0800 Update Xserver man page to match commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to -ardelay and -arinterval, respectively. commit c279d5fdc53612a90f33fafe9e9c59ced008dd51 Merge: 88f248e67 14d6a9b32 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 19 12:59:54 2007 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework commit 700fccf863593cbea1691789f1f1cafc08a32fee Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 19 14:56:38 2007 -0500 Remove the root window context line from the configuration file. This context will be derived through a type_transition rule instead. commit 3a9791b456f35adb252a9059b19265c6c447f1ba Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jan 19 14:53:09 2007 -0500 Policy updates. commit 14d6a9b327381a6bb2dac59c62728e5fd0f0bcfb Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Jan 19 18:30:21 2007 +0100 fbdevhw: Only deal with RGB weight if default visual is True- or DirectColor. commit 27a01e100bff21ac0b70c6d72071d7226fc91264 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Jan 19 18:28:05 2007 +0100 fbdevhw: Consider mode set equal to mode requested if virtual width is larger. commit 65f4690ecb4576f60396fcccff8e5bd5d4b6645f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Fri Jan 19 17:54:03 2007 +0100 __glXDRIscreenProbe: Use drmOpen/CloseOnce. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=9275 . Based on patch from Alan Swanson. commit 8b3a591cd39f2d51209dc71b641cac79663e1b16 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jan 18 16:03:30 2007 -0800 Update pci.ids to 2007-01-18 snapshot (includes a whole bunch of ATI device id updates) commit 0f0c321adf2850b3d7aafe281362bfe424cb0ca1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Jan 18 15:31:53 2007 -0800 Make xf1bpp build correctly with compilers that don't support -include commit a811e92104028ae60ba69f73e32ee1e0533b088c Author: Eric Anholt <eric@anholt.net> Date: Thu Jan 18 14:28:01 2007 -0800 Account for CRTC rotation in the cursor containment code. commit df147c10ce597c56c16cbca552e8a3e3ecb3cdaa Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 17 16:47:07 2007 -0800 Xserver man page: remove bc, add -wr commit 2dfd1aab244a2c8da3b62b522b9a8434e474af17 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 17 14:39:28 2007 -0800 Always include compiler.h in cfbmskbits.h instead of checking #ifdef XFREE86 commit 42a48786acf54f83167de4f561526986d4e27033 Author: Eric Anholt <eric@anholt.net> Date: Wed Jan 17 14:34:42 2007 -0800 Add a setter for randr_crtc->rotations. commit 88f248e67143175532cbafd6faf8fc6df97c7894 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 17 14:04:43 2007 -0800 Replace PciBusId with 'struct pci_device *' There's no need to store the slot information for a PCI device as its ID. Instead, skip the middle man and just store a pointer to the pci_device structure. commit 0361611080267727f570e17f2212aaa890223f6e Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 17 13:06:04 2007 -0800 Convert xf86IsolateDevice to a 'struct pci_slot_match'. This change was accidentally not committed on the previous commit. commit c1808f148405a28256e0480d6f8714691b0e964e Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 17 13:02:27 2007 -0800 Convert xf86IsolateDevice to a 'struct pci_slot_match'. commit d2f8c42c48ecc398d224d9e3b280a66042e68664 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 17 12:59:17 2007 -0800 Convert xf86FindPrimaryDevice to use a static buffer and snprintf. Rather than allocate a 9 byte buffer on each invocation, use a static 16 byte buffer. Use snprintf for safety. This commit should probably be cherry-picked to the trunk. commit 28976bebec8b6475d0703f8356edd116e25d40b2 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jan 17 12:15:09 2007 -0800 Eliminate unused fields in pciAccRec. commit f36a447d20c0a89b78c5899eeb303cab568ebac6 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Jan 16 14:49:19 2007 -0800 Eliminate use of Tag field. The Tag field was removed from the int10 structures in commit ca9c41e09ddb72d150d86f5d372eb07eeca7c1a2. This file was over looked. commit cde17015dff1ced2aabb8b76c08f9110237821a5 Author: Eric Anholt <eric@anholt.net> Date: Tue Jan 16 13:01:03 2007 -0800 When changing a non-pending property, call the screen rrOutputSetProperty hook. commit e3add7c8ecbb2a0a662860f208f6ae7d1857c717 Author: Eric Anholt <eric@anholt.net> Date: Tue Jan 16 12:59:34 2007 -0800 Don't forget to add the property we configure to the properties list. commit 780b55ec6f97864b50f00170b201e93eba188f1b Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 15 15:30:16 2007 -0800 Fix accidental commit (bug) in linuxOpenLegacy. commit 31bd8d150749c548eb70404395b4a52d46412f43 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 15 15:19:30 2007 -0800 Fix domain insanity. Eliminate xf86GetPciDomain. The domain from libpciaccess is the domain. Period. This means that 0 is a valid domain. Make sure that INCLUDE_XF86_NO_DOMAIN is *not* set. Always run in "domain mode," even if the only domain possible is 0. commit 079a6a55a516778871a8b2f8e9c8dd9162105a76 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 15 11:39:24 2007 -0800 Convert to new pci_device_cfg_write_u* interface. commit d8bd0c41de11d12976a5ea9f185b7ac6c7060b71 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 15 11:38:22 2007 -0800 Convert to new pci_device_cfg_write_u* interface. commit a87af8218f97da76433a5192d5e51aca0d5c3ed0 Author: Ian Romanick <idr@us.ibm.com> Date: Mon Jan 15 11:21:37 2007 -0800 Remove unnecessary files from the sources list. commit 1c326bf75fc0d2c39507834d159d031291eddac4 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 12:07:19 2007 -0800 Eliminate unused INCLUDE_XF86_MAP_PCI_MEM define. commit 3936caa00535d0b7543be5a4b315562111a6b3ab Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:59:35 2007 -0800 Refactor pciTagConvertRange2Host and pciConvertRange2Host. commit 1a493509e30412a0f6c6f8f8e47a446678dbbc1a Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:58:59 2007 -0800 Fix typos in conditionally compiled code. commit 8279444a54f38c5e2e5d4c2d936a10d74990e0be Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:41:03 2007 -0800 Eliminate unused pciAddrHostToBus infrastructure. commit e32fa10a04a15ce1b15c6faa7a64e68ee3906d59 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:33:17 2007 -0800 Remove prototype for pciGetBaseSize. commit 7411f5c389db73a6731d853d603029b8cf0a66ba Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:32:04 2007 -0800 Eliminate pciHostAddrToBusAddr from interface. pciHostAddrToBusAddr is no longer used anywhere in the tree. Remove it with extreme prejudice. commit 60c5e023e8ddaae8e011f80736e7cc3e8c12583d Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:24:03 2007 -0800 Eliminate some dead code. commit dd12a94885bad9c9d064dcf7e0d9a7a7114ae3e6 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 10:21:25 2007 -0800 Eliminate xf86GetPciEntity from public interface. xf86GetPciEntity was folded into the only place (xf86CheckPciSlot) in the tree that still called it. commit c3016a29964761478305cf2f5241c563ff3eab0a Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 12 09:56:00 2007 -0800 Missed file from previous commit. Convert xf86ReadLegacyVideoBIOS to take a 'struct pci_device *' parameter instead of a PCITAG. commit ca9c41e09ddb72d150d86f5d372eb07eeca7c1a2 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 11 21:09:20 2007 -0800 Convert int10 and vgaHW to use 'struct pci_device' instead of PCITAG. Convert all uses of PCITAG in int10 and vgaHW to 'struct pci_device'. This allows the conversion of xf86ReadLegacyVideoBIOS and xf86MapDomainMemory to 'struct pci_device' from PCITAG. commit ba547d4f6a2707f51f0d826389d2d418fb62367a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Jan 12 14:42:02 2007 +1030 mi: Quick fix to stop segfault on non-core keyboards. commit 5e2f8dee6331645fcbd2734c43698eb4f9c5b116 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Jan 11 14:05:39 2007 +1030 mi: remove core pointer special handling. No event has core pointer as device now. dix: zero pSprite memory, stop segfaults on server restart. commit 7fccec91c46baac4f8d2965180dc535b4eb7d65c Author: Eric Anholt <eric@anholt.net> Date: Wed Jan 10 13:10:43 2007 -0800 Bug #9555: Always define _GNU_SOURCE in glibc environments. This keeps us from having to define _POSIX_C_SOURCE, _BSD_SOURCE, and _XOPEN_SORUCE to get the C environment we want in different places. It also fixes the build on linux due to RTLD_DEFAULT having not been defined. commit 78f9592c112d4245f6119b98c244bbb4cae3e5aa Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Jan 10 16:04:20 2007 +0000 lnx_ev56.c has to be built with -mcpu=ev56. Fix it. commit ea82333dc1799a7e013205adbc89874bc8d273cb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Jan 10 14:52:13 2007 +1030 Xi: add missing call for SProcXChangeDeviceCursor add DeviceEnterNotify and DeviceLeaveNotify fix: QueryDevicePointer crashed if called with keyboard device commit 6a2fb2928714ce77ee342cdc23a1178e5e766cf2 Author: Eric Anholt <eric@anholt.net> Date: Tue Jan 9 16:34:40 2007 -0800 Track rename of DamagePost -> DamageAdd. commit da09964a931cc64d05ab571bf545fdad35a6d395 Merge: e1f73d220 e3aa6ad20 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Jan 9 15:27:34 2007 -0800 Merge branch 'origin' into pci-rework Conflicts: hw/xfree86/int10/generic.c commit e3aa6ad201eb20862c11c000e76206e317a96dc9 Author: Matthieu Herrb <matthieu@blues.laas.fr> Date: Tue Jan 9 14:14:19 2007 +0100 Multiple integer overflows in dbe and render extensions CVE IDs: CVE-2006-6101 CVE-2006-6102 CVE-2006-6103 commit 359d20532bdcef6a540a551578d000afbb609c2d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Jan 9 09:53:45 2007 +0100 Require glproto >= 1.4.8 for GLX. It builds against 1.4.7 as well, but it hardcodes the GLX_EXT_tfp tokens that were finalized in 1.4.8, so GLX_EXT_tfp breaks if the client side was built against an older glproto. This will hopefully alert people to rebuild other components (in particular Mesa) against the new glproto as well. commit 88740c4855babedbea420b5e1b35ae105d1f1026 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jan 8 17:36:07 2007 -0800 Use PKG_CHECK_EXISTS(libdrm) to determine if DRI should be enabled on Solaris commit 282a4dcaabc5f0cd6f7d3819aa648333b93b265e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jan 8 19:22:41 2007 +0100 Attempt to fix drawable type checks in dixLookupDrawable(). Not sure this is 100% correct either, but it fixes at least one reproducible crasher where it returned a pixmap to dixLookupWindow(). commit a7ab7932938820a795bb6fb8e0444e0824433b99 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 8 17:31:16 2007 +1030 xfree86: fix XI86_SHARED_POINTER flag setting commit 95e1a88050dde61e9b2407428042a43e47b46e18 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Jan 8 12:31:18 2007 +1030 Xi: Adding ChangeDeviceCursor request commit 0b73a7eb17fd848c6bdc6a65ba835aa2cbfc3cfd Author: Eric Anholt <eric@anholt.net> Date: Fri Jan 5 18:12:04 2007 -0800 Add support for the DamagePost (XDamage 1.1) request. This makes damageproto >= 1.1 a requirement to build. commit dfb2c10413e22afd8d486a982870f874326d5ef4 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Jan 5 10:15:09 2007 -0800 Add missing #else from previous commits. commit f90c3e226b105bf77beb94723fc08bdff14834be Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 4 15:38:16 2007 -0800 Re-regenerate from Mesa scripts. DO NOT HAND EDIT THESE FILES! For cryin' out loud, there's even a comment to that effect in the file's header... commit b7ca5d14ce7ba410b0dab5c2289f6d7b75e763df Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 4 15:37:33 2007 -0800 Incorporate new byte-order related configure changes. commit 8dd5771a1b91c331860b667fb18e484452000aad Merge: 45aa26ccb 7d2ec9217 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 4 15:01:38 2007 -0800 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver Conflicts: GL/glx/indirect_dispatch_swap.c GL/glx/swap_interval.c commit 45aa26ccb4f61c2919ce2475d0907c6e1b177da2 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 4 14:55:51 2007 -0800 Regenerate from Mesa scripts. Regenerate source files from Mesa scripts. This causes the generated files to use glxbyteorder.h. commit 6d603bb47ff9d238637adbf30c6e9697e6e7e6fa Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 4 14:49:26 2007 -0800 Add new header file containing byte-order wrappers. Move the byte-order related wrappers out of the individual source files into a dedicated header file. Modify the single hand-coded source file that uses the byte-order wrappers to use the new header file. commit 7d2ec92170ebbdfa10a05734cb7cfaac97d19d65 Author: Eric Anholt <eric@anholt.net> Date: Thu Jan 4 12:24:48 2007 -0800 Keep track of how many visuals we set up for GLcore, to avoid an invalid free. The proper fix would involve actually setting up the ARGB visual for GLcore, but I just want the server to not crash at exit. commit aab2ca204279b638c7e5bb6b8427c58be9704c57 Author: Eric Anholt <eric@anholt.net> Date: Thu Dec 21 09:16:19 2006 -0800 Try dlsym(RTLD_DEFAULT) first when finding symbols. The previous mechanism failed when finding drm symbols now that libdrm has moved to being linked by libdri instead of being linked into the server. commit 2fd4626fa6969b84d8e2f9db16d6e2d44c4bc499 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jan 3 15:44:55 2007 -0800 Make GLX byteswap macros more portable - Use autoconf tests instead of platform-specific #ifdef's to decide which macros to use. - Provide fallbacks for platforms like Solaris that don't provide any of the existing known forms. commit 66fa87292ef26bd0f464481287f3af992cd5741c Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Jan 3 10:27:07 2007 -0800 Fix BSF and BSR instructions in the x86 emulator. Patch courtesy of Michael Yaroslavtsev. commit 3b5b7ef5c2ab1d196806f6359e0972fd78d204dd Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Jan 3 21:05:35 2007 +0100 Move the code for resetting the DPMS mode in response to input events, from WaitForSomething to mieqProcessInputEvents. mieqProcessInputEvents already handles resetting the screen saver. commit 953a9ef949b4c57d28daeec57031fe1ce368c27c Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Dec 21 23:50:39 2006 -0800 Track physical screen size and send out updates when that changes. Events and internal data structures need to be updated whenever the physical or pixel size of the screen changes. The code was ignoring the physical size, so changing only that would not be registered anywhere. (cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit) commit e79602fca2f2cced66136729cdda4d356b0bdda0 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Dec 30 21:52:22 2006 -0800 Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error. The RRScreenSizeSetRange function is used externally for 1.2 API drivers, but can also be used in the 1.0 compatibility code. This also ensures that the right changed bits are set so that clients are correctly notified when the range changes. RRGetInfo can return an error, use that to return BadAlloc to clients instead of blindly going on with various requests. (cherry picked from f05dd384d38c76dd9662933a03625dfef5b1c81f commit) commit dc5eb4523298f966bd5fd9ae6672160034b5e82c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Dec 31 17:59:44 2006 +0100 fbdevhw: Override RGB offsets and masks after setting initial mode. This is a hack, but it should be a NOP for all the setups that worked before and actually seems to fix some others... Based on a patch by Peter Teichmann from http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=338241 . commit d077c0da470ab7291e8d838eaace57b066477d6f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Dec 31 17:23:31 2006 +0100 fbdevhw: Use displayWidth for fbdev virtual width when appropriate. The fbdev API doesn't allow setting the pitch explicitly, so we have to set the virtual width to the pitch we're using for drawing. This fixes corruption after changing the virtual width with RandR. commit c385bcf0bde38dd869f7065f859dd4b4126f5690 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Dec 30 16:44:31 2006 +0100 fbdevhw: Fix some issues with the previous commit. Fix a TRACE_ENTER typo and only update the internal fbdev mode state cache after actually setting a mode. commit f6815cb68b0f6698497348fc6e4214dacef33b95 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Dec 30 10:18:28 2006 +0100 fbdevhw: Consolidate modeset ioctl calling, report failure if it modifies mode. The fbdev API allows the driver to 'accept' modes it doesn't really support by modifying it to the nearest supported mode. Without this check, e.g. vesafb would appear to accept all modes, even though it actually can't set any modes other than the bootup mode at all. commit 083b790515faaf134a78abc4b0a7ef0d6ea5db75 Author: Eric Anholt <eric@anholt.net> Date: Thu Dec 28 13:21:25 2006 -0800 Switch the default migration heuristic for EXA to "always". This has been what has been used the most successfully post-damagetrack. The current thinking is that: 1) We should be able to accelerate basically everything. So we don't need to try to migrate trees of pixmaps permanently out of framebuffer to speed CPU drawing up. 2) Migration is cheaper in the thrashing case, so we don't want to go to a lot of effort to try (and fail badly) to find a working set. commit cfbc7379f0232bb336461f6d2a8496d3d0763e7e Author: Eric Anholt <eric@anholt.net> Date: Thu Dec 28 13:15:11 2006 -0800 Export exaMove{In,Out}Pixmap(). commit 683ca3f7afaf15fd3ca7918f6175b5a9e4a6f05b Merge: 05f915050 9563b2eea Author: Eric Anholt <eric@anholt.net> Date: Wed Dec 27 16:11:31 2006 -0800 Merge branch 'exa-damagetrack' commit 05f915050cad72d4fb39cbb886be57beeac18749 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 27 16:38:06 2006 +0000 dix/events: take screen number, not pointer, in PostSyntheticMotion Since we were using PostSyntheticMotion incorrectly anyway, update the declared API to match. commit c1674660a7115ebf993dcde78f4e45f756e4c951 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Dec 24 06:28:44 2006 +0200 os: test for userland, not kernel It doesn't matter which kernel we're running on, the relevant part when dealing with includes is what our userland is. commit 83080809f9a1c1d24b0318e54632f25f5940da25 Author: Marc Aurele La France <tsi@ualberta.ca> Date: Sun Dec 24 06:28:21 2006 +0200 xfree86: deal with pitch that isn't a multiple of the granularity When the pitch isn't a multiple of the granularity, allocate more space to compensate. commit 329f6417275bb1201ba66c29b202028eeab3a355 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Dec 9 22:51:59 2006 +0200 XkbCopyKeymap: make sure sym_interpret is always valid Make sure we're not copying sym_interpret across from an empty source. commit 43a4376bd72ef1b6486cddb60ad57b2d6169292a Merge: 4b1c9ac3d d9e079d2a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 22 13:53:55 2006 -0500 Merge branch 'master' into my-XACE-SELINUX commit d9e079d2a385203fdd18d958cfc19d759cab4ba8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 22 13:07:09 2006 -0500 Zero out client devPrivates on allocation. commit 4b1c9ac3d13767e395b47e76b37f9f3a569e7be1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 22 13:04:50 2006 -0500 Policy updates. commit cd71e861830081807e5b93ae89c73c17986c6330 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Dec 20 13:45:24 2006 -0500 Naming change: Security*Access -> Dix*Access. Clarify some error message strings. commit 9fd2f167ec02ee170b87f02ddca89eba0b2e2389 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 20 16:30:36 2006 +1030 xfree86: fix xf86ProcessCommonOptions() core and shared pointer assignment TAG: mpx-0.3.0 commit 056c919d849a78c8d507bfcecfa74c0b0165751a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 20 14:49:17 2006 +1030 removing MPX extension files commit b55e1239ac3b2962a33d8af1f911cc0f01f40f23 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 20 14:43:38 2006 +1030 xfree86: fix xf86ActivateDevice(): only set to MP device if not a keyboard commit 202b46eb6bf0d5f94973c2bf1e4ebe9d154eadbf Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Dec 20 13:05:53 2006 +1030 xfree86: Changing "IsMPDevice" to "SharedPointer" option. Devices will default to MP devices. Xi: Adding QueryDevicePointer request/reply Adding WarpDevicePointer request/reply commit e437f357b6850a6c87ca6696870b3abd40e5b8ed Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Dec 19 16:38:34 2006 -0800 xorg.conf man page should say "XFree86-DGA", not "Xorg-DGA" commit a81dbaae0597492f0245080c6f5af7158e05e2d0 Merge: fb6d676de d442998e3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Dec 19 16:11:19 2006 -0500 Merge branch 'master' into my-XACE-SELINUX commit d442998e39611be6805ea261f2286a2fd00f49b1 Author: Eric Anholt <eric@anholt.net> Date: Fri Dec 8 13:35:36 2006 -0800 Only do the _POSIX_C_SOURCE hackery on linux where it's required. On other OSes, the nasty hack was resulting in prototypes being hidden, so just don't do it. commit 228b9f77696190e47d4c96d6e0809bf645751557 Author: Eric Anholt <eric@anholt.net> Date: Fri Dec 8 13:32:22 2006 -0800 Include sys/select.h to get FD_ISSET. commit 9563b2eea2f61246b6a9e14e00c701f693efa4e1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Dec 19 18:57:22 2006 +0100 EXA: Lots of damage tracking fixes. Mostly due to exaDrawableDirty() now calculating the backing pixmap coordinates internally, for cases where they aren't trivially known. There's a new exaPixmapDirty() function for the other cases. commit 467c00cf450826e0bf06fe94470ec193af625d68 Author: George Sapountzis <gsap7@yahoo.gr> Date: Tue Dec 19 18:45:25 2006 +0100 exaGlyphs: mark dirty for software path also. This affects drivers with no UploadToScreen or UploadToScreen failures. commit 4334860e69e7d5b156082bd05c7a86708e5bad4c Merge: 7e4717683 fdcc22ca1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Dec 19 16:29:26 2006 +0100 Merge branch 'master' into exa-damagetrack Conflicts: exa/exa_accel.c exa/exa_migration.c commit fdcc22ca1704d3519156c66804528c21b04fea65 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Dec 19 16:11:17 2006 +0100 exaCopyNtoN: Fix usage of 'dx' and 'dy' instead of 'reverse' and 'upsidedown'. commit 67c2a86e59e915d9a5681e9d233478cfea3e51ed Author: Michel Dänzer <michel@tungstengraphics.com> Date: Tue Dec 19 15:44:18 2006 +0100 EXA: Compare backing pixmaps instead of drawables against driver limits. The driver operations are always contained within the backing pixmaps, it doesn't matter if the drawables are bigger. commit 6b1e354dbb6e8ed9f2c654bbe7f8bbf241843d1c Author: Eric Anholt <eric@anholt.net> Date: Tue Dec 19 15:24:19 2006 +0100 EXA: Disable SHM pixmaps. See https://bugs.freedesktop.org/show_bug.cgi?id=6772 . commit ca5ebe3971d8ebcfed00c5ebcd026cdd0ce0c6ba Merge: 4d07b5037 1b029fd89 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 19 10:51:01 2006 +1030 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver commit 2d0a63126b3d3a17005b7e122617ee0c5f44a55b Merge: d8b5394ed 1b029fd89 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 19 10:31:40 2006 +1030 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver commit 1b029fd896b76096905c516925ce0214fe14632c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 18 14:51:04 2006 -0800 Xorg & Xserver man page updates for 1.2 release - Added -extension & +extension to Xserver man page - Changed Xorg synopsis from X11R6 to X11R7 - Clarified Xorg ancestry description - Moved Solaris to free/Open Source OS list - Removed references to MetroLink module loader & getconfig - Converted (1) to (__appmansuffix__) in a few more places - Replaced http://www.freedesktop.org/cvs/ with http://gitweb.freedesktop.org/ commit d8b5394eda9d92b7193004931caa6c24a337b2e6 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Dec 18 17:35:34 2006 +1030 Cleaning up ifdef MPX from remaining files, removing it from configure.ac. Removing building mpx extension from Makefile.am commit 03c554283e49e449fd1282cf32564d15d9fd2c77 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Dec 18 15:33:54 2006 +1030 mi: removing MPX ifdefs global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap fixed: wrong core pointer usage in miSpriteStoreColors dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) bugfix GrabDevice: uninitialized field in grab struct caused segfault xfree86: removing MPX fdefs Xi: removing MPX protocol events commit a5fcf1e5e7452c9be82f63b6c2be2a25c4109523 Author: James Steven Supancic III <arrummzen@arrummzen.net> Date: Sat Dec 16 12:02:38 2006 -0500 Fix RENDER issues (bug #7555) and implement RENDER add/remove screen support (bug #8485). commit c92f7bef54fa737766d65fe32c200f405f39228c Author: Kevin E Martin <kem@freedesktop.org> Date: Sat Dec 16 12:01:49 2006 -0500 For Xvfb, Xnest and Xprt, compile fbcmap.c with -DXFree86Server commit 012807356883128fde58bb2d4f91dd356d6418fc Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 18:27:16 2006 -0500 Add loud warnings to deprecated lookup functions. Hopefully this will alert external driver maintainers. commit ab1d5b0c31a1cfce95ab6b1d06f209f2c44e19ac Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 17:26:58 2006 -0500 Convert callers of LookupClient() to dixLookupClient(). commit f11dafaafc68f5cff1a1538d9566907786d8ab72 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 16:51:58 2006 -0500 Convert callers of SecurityLookupDrawable() to dixLookupDrawable(). commit 10aabb729d1586db344f9c1abdf1cf45e7ddaa7a Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 16:36:29 2006 -0500 Convert callers of LookupDrawable() to dixLookupDrawable(). commit 25d5e0a629f82d95bd71daf9a920a70e095b5188 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 15:50:46 2006 -0500 Convert callers of SecurityLookupWindow() to dixLookupWindow(). commit 04c721854fbf1bd6379c165a53fab2bdc09961c0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 15 14:11:40 2006 -0500 Convert callers of LookupWindow() to dixLookupWindow(). commit 670bbb87310503fcc17203cecfa6f4f2f5db51d2 Author: Keith Packard <keithp@neko.keithp.com> Date: Wed Dec 13 01:21:32 2006 -0800 RandR 1.2 rotation code must adjust width/height. Mode lines reflect the monitor mode, not the projected size into the frame buffer. Flip width/height around so that the dimensions are oriented correctly. (cherry picked from 612a8e61803da8db0e305cbb093696b8e4284572 commit) commit 6c6901434ab469dd03b79fc98cd4a2b64d339305 Author: Keith Packard <keithp@mandolin.keithp.com> Date: Wed Dec 13 00:58:54 2006 -0800 RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right. RandR 1.0 refresh rates were scrambled when working with a 1.2 driver that returned sizes in a mixed order. SetScreenConfig was treating RRCrtcSet as returning an RandR status instead of a Bool. (cherry picked from 6dc711833d7387372012fdff1ce1df3aefa2d234 commit) commit 628c7daeb12713d28e85e6b49fa037a7748dff83 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Dec 12 22:59:03 2006 -0800 RandR: config time updates when hardware config changes. The config time in the RandR protocol reflects when the hardware state has changed. It was getting changed anytime the driver changed the usage of the hardware as well. (cherry picked from 98d18a6578130adb411ca4bcc776fcb7e07f189f commit) commit d742025f435f3eb7458cf8284d59300bc9a850aa Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Dec 12 20:16:49 2006 -0800 RandR mode list needs both output and crtc modes. When an output no longer reports the current mode, it must still be included in the list advertised by the X server. Walk the crtcs to ensure it is included. (cherry picked from 78689d0d6630afcbcd3ce5394d12c2564a489f45 commit) commit 9e32bf98bc9ab17a137664d01f59a8f426f7ff3b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 19:31:58 2006 -0500 Remove now-unused macro definitions from dix.h. commit 00f0705b3bb444ac934fc902cd23130f1777eab2 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 19:15:21 2006 -0500 Remove instances of macros SECURITY_VERIFY_GEOMETRABLE and SECURITY_VERIFY_GC. commit 5e334f06a1ef89891f9df2a371e4662340bec26b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 18:27:09 2006 -0500 Remove instances of macros VERIFY_GEOMETRABLE and VERIFY_GC. commit 51b69ff499c05f59cb1e577c4e8abf6f7f283b3e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 17:53:43 2006 -0500 Remove instances of macro SECURITY_VERIFY_DRAWABLE. commit 0cf75e74322e2b6a6efc7acf892e04365fde503b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 17:27:12 2006 -0500 Remove instances of macros LOOKUP_DRAWABLE and VERIFY_DRAWABLE. commit ab1886df73b73360fa3bd7ce8e01affc074cbc8d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 15:42:19 2006 -0500 Add new, combined dix lookup functions (tweak). commit 60cdc592fe042c03ceb5d4c3344acfbbf5d8ae28 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 14:46:03 2006 -0500 Add new, combined dix lookup functions. commit 6c46645cfc1afda8aeabfe0ed4d9342673b702f1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Dec 14 14:45:42 2006 -0500 Naming change: Security*Access -> Dix*Access commit a96788058e48f3e97c66da6dafd58828f0c2ce53 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Dec 14 10:50:18 2006 +1030 mi: removing MPX ifdefs global sprite renaming in mipointer and misprite fixed: multiple remove cursor call in miSpriteInstallColormap fixed: wrong core pointer usage in miSpriteStoreColors dix: bugfix in CheckCursorConfinement removing MPX ifdefs removing MPX event generation (using Xi solely now) commit b88ad820fac81d0dfd557a384bf0406e8893e7af Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Dec 13 12:13:11 2006 +0000 Set Int10Current->Tag for the linux native int10 module Fixes bug #9296 (cherry picked from 731952c561a3972d09d1315f4fd31466e459ccb9 commit) commit fb6d676de5aa606d943715437a12a68d9a41f386 Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> Date: Tue Dec 12 16:17:51 2006 -0500 Add xserver object class to list of object classes. commit 7b90944258eba66b61328480759833ad7589bcca Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> Date: Tue Dec 12 15:59:38 2006 -0500 Change MLS levels in config file contexts to more sane defaults. commit 568c09481e5d62091d032837171a36f409f39379 Author: Eamon Walsh <ewalsh@moss-huskies.epoch.ncsc.mil> Date: Tue Dec 12 15:59:08 2006 -0500 Split AssignClientState() into two routines, new routine is server-specific. commit 62e7722ebd8d341a23eb56cb330eeb00e6a975a6 Merge: e12480699 f3c60900e Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Dec 12 13:54:33 2006 -0500 Merge branch 'XACE-SELINUX' into my-XACE-SELINUX commit e124806994675e16ca8e3937388f2cadeb529fc3 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Dec 12 13:35:22 2006 -0500 Remove trailing whitespace (whitespace police). commit ca77c121075a9de1f47d42f6aaf91c20185231de Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Dec 12 13:26:52 2006 -0500 Naming change: Security*Operation -> Xace*Operation commit a60da1db7cced28c07960a713eb18deb45beb432 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Nov 29 22:19:57 2006 -0500 Add required root window context to config file. commit 5719afe6d3a246985709e6f045617c1e16a7da51 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 26 20:20:57 2006 -0400 Change symbol in libaudit library test. commit 354c80da66af141e8ba6d75fed75a0f482987956 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 5 16:07:26 2006 -0400 Improve error handling, messages during initialization. commit 3714d9149928754afcd6b2466a1371ca32e17985 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 4 16:23:35 2006 -0400 Experimental window property holding security context. commit 7f16c38ae2b47b195609d8fedefb7b28f612b2d4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:31:18 2006 -0400 Add SELinux extension configure-time support. commit a7f4bbea87ada1d699bfd9e3b6a98f06191650f6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:17:01 2006 -0400 Add SELinux extension to the module/extension loader. commit 28e80cd65b1207b123c02f895851bb6d207aa3c1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:15:19 2006 -0400 Add SELinux extension configure-time support. commit 83aad2be8a80890f349c2f9caf84786333f7cc8c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:11:04 2006 -0400 Add SELinux extension source files. commit 81281cb298a5825bc7a2e692375a86199293bbbe Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Dec 12 11:28:24 2006 +0000 Fix bad commit commit 792e0f71c6a435b2e28f8a4cdcc790f3b982e62c Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Dec 11 14:54:49 2006 +0000 Fix Xming fails to use xkb bug bug #5049 (Colin Harrison) commit 27d4b84f268ac21601f7f52a7e257f70753396b3 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Dec 11 14:50:08 2006 +0000 Fix Tooltip from minimized clients Bug #3678 (Colin Harrison) commit ae3c24da34cd8eeb77a6389861856fd51e0841f5 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Dec 11 18:09:59 2006 +1030 dix: Moving SpriteRec into DeviceIntRec removing global sprite structure beginning to remove MPX ifdefs xnest: Fix to make xnest compile again commit fb8364bca30fe9268e807b0a9a3ebf875ee1fce2 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sun Dec 10 11:24:05 2006 -0500 Accept EDID > 1.3 but < 2.0 if we find it, assume it's compatible. commit e1f73d220873fa091695e46b7fcd008663a95a6f Merge: 27d682fa0 d56249a15 Author: Ian Romanick <idr@us.ibm.com> Date: Fri Dec 8 17:24:15 2006 -0800 Merge branch 'master' of ssh+git://idr@git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/common/xf86Configure.c hw/xfree86/common/xf86Helper.c hw/xfree86/common/xf86pciBus.c hw/xfree86/int10/helper_exec.c hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/os-support/linux/lnx_pci.c hw/xfree86/scanpci/Makefile.am hw/xfree86/utils/pcitweak/Makefile.am hw/xfree86/utils/scanpci/Makefile.am commit d56249a15ead51ad4d2117d5538ada24af05b693 Merge: f1f8df188 ec84f72d0 Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Fri Dec 8 15:52:37 2006 -0600 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit f1f8df1889ab656bb57596e2f85408f15f42cd5d Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Fri Dec 8 15:51:44 2006 -0600 For MANDEFS, also replace __mandir__ for $(mandir) which includes the prefix. Noticed wrong path to man pages on both Ubuntu and on NetBSD with pkgsrc. commit ec84f72d077eaf2e7768a1f5398f65a5e1714d08 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 8 21:31:47 2006 +0200 XkbCopyKeymap: always initialise map and preserve If we don't have map or preserve in the source map, make sure the destination is initialised to NULL, and freed if it's a valid type. commit e59aeac1ff13ea53f44dba1ac7800f37f4532ca1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 23:44:06 2006 +0200 xfree86: remove stray debug line commit 729fca33a417ae3dfb180caf0ea8946ef9eee1df Author: Michel Dänzer <michel@tungstengraphics.com> Date: Thu Dec 7 12:09:18 2006 +0100 Revert "xfree86 DDX: Delete DDX screens in ddxGiveUp()." This reverts commit a6381e69845f58d2b3282992b1f881015190f1bc. See https://bugs.freedesktop.org/show_bug.cgi?id=9224 . commit 4ea6dfb984063117eef5c2f931205b1c3eb3108b Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 23:24:39 2006 +0200 whitespace police commit 4cba1a1ebfbdd7ab489b1b1ffb6656cbe88eb61e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 23:21:38 2006 +0200 config: bus reconnect support Add support for reconnecting to the bus when it restarts. commit 0c5dab5c8eaa174f28054b9d20244a709c015210 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 23:21:15 2006 +0200 config: move config.h to hotplug.h Also, move configInitialise to after OsInit, since the next commit will make it use a timer. commit 72e7f2ac6cf0db474d0defa7918f2a3ba76c0e46 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 23:18:52 2006 +0200 GetPointerEvents: always send valuator events for MotionNotify Always chase a DeviceMotionNotify event with a DeviceValuator, which is not required in the spec, but will silently break the lib if you don't include. commit c458a70d650bd62b8f4706f022d1f3f347636db1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Dec 6 20:30:44 2006 +0200 GetPointerEvents: fix typo Fix typo that resulted in inverted axes when using an absolute positioning device that didn't report y, and thus relied on the previous value. commit edabf45425f9ed79547f918cc0dfff4c268de386 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Dec 2 16:37:19 2006 +0200 configure.ac: add CONFIG_LIB to Xvfb commit 8724af248cd6c93182fecd060fed09a556361080 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Dec 2 16:20:34 2006 +0200 kdrive/mga: fix compiler warning Change a case that only made one test for an if, preventing the compiler warning about all other PICT_* types being unsupported. commit 2f0a800ffdc881cdb3adf84f1ed97bbb63cba34c Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 27 22:22:53 2006 +0200 config: move to block/wakeup handler commit 99378b58dbc63160382ad9c41f9cb0dd2a24e9d1 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 27 22:22:33 2006 +0200 kdrive/tslib: remove vendor-specific hacks Parts of the KDrive merge accidentally contained a bunch of vendor-specific hacks; sorry. commit 8884a73a3f4efa8276c5e38b9573201574c4f1f6 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 27 22:39:56 2006 +0200 xfree86/input: re-add support for disabling drag events commit f2903c12bb4bb0b7c94b96c55af8fa55507f9d7d Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 7 11:13:32 2006 +0200 SyntheticMotion: don't dereference sprite.screen when not using Xinerama (cherry picked from aa052e43c6c293e14f78837e00c6b7581f9713bb commit) commit d17ec01e8395a8f14b75a10c8bf082b3f5a4fb36 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 1 00:41:41 2006 +0200 remove CID support (bug #5553) Remove CID from all our fontpaths. (cherry picked from 69820a10e33e4582c192360996e866007114639d commit) commit abe5e079af715713097ab0daad29a3e9f523c398 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Dec 6 07:58:03 2006 -0800 Update pci.ids to 2006-12-06 from pciids.sf.net commit 724f9cb578086e8483a2d0636dd6eb05d664d31c Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Dec 5 13:44:05 2006 -0800 Bug #9219: Use pWin->viewable instead of pWin->realized to catch InputOnly windows too. commit 3690de9b1b0902d395bc7d071fc05ebc8f75be2b Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Dec 5 12:42:12 2006 -0800 Bug #9219: Return BadMatch when trying to name the backing pixmap of an unrealized window. Before this change, ProcCompositeNameWindowPixmap would name the screen pixmap if !pWin->realized. commit eb1d9f51af19dab20a95c2830ca1c508d8ee66bb Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 5 18:50:19 2006 +1030 Ironing some glitches caused by the merge commit 3c8f166022a2d19af14eb670fa382503ba1451cd Merge: 2a511492f f9f7d7f3b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 5 18:28:33 2006 +1030 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver into mpx Conflicts: dix/events.c commit 2a511492f9a235d3f5390ab87b6c643cbea92d88 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Dec 5 15:45:18 2006 +1030 Xi: adding MPX checks to ProcessOtherEvents mpx: adding QueryPointer request and reply adjusting names of requests to Xlib compatible naming (xMPX*** instead of mpx***) commit f9f7d7f3be53c808abb5eaceb7a1abc55744a210 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Dec 4 13:36:30 2006 -0800 Check for __sparc as well as __sparc__ for compatibility with Sun cc (gcc defines __sparc__, Sun cc defines __sparc) commit ac90ce58ba1da3ed605adf75f4d54c34b578c402 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 1 21:12:21 2006 -0500 Naming change: Security*Operation -> Xace*Operation commit f44f14fe564d834568a0afefba944223a73ea0f5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Dec 1 20:48:15 2006 -0500 Define calls away when not building XACE, allowing ifdef's to be removed. commit a5d6499d666fea4a9988118ddd3a5e4c9cfcc32c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Dec 1 16:42:37 2006 -0800 Fix syntax error in configure check for SYSV_IPC that broke with Sun cc commit 89b2aa9be81613cb1a06bd535bf50ecf2a00208d Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Nov 27 21:40:24 2006 -0800 Destroying RandR crtc or output overwrites memory. RRCrtcDestroyResource and RROutputDestroyResource had matching bugs that would overwrite memory past the end of the storage of the crtc or output arrays. Oops. (cherry picked from 4202b23ed86405a4cebfdcf239df1b023c1d10ca commit) commit 23ba72323af785516db6cbcf6c1b2fa907a8232f Author: Keith Packard <keithp@ukulele.keithp.com> Date: Thu Nov 30 23:16:42 2006 -0800 RandR ListOutputProperties has nAtoms element, not nProperties Earlier RandR 1.2 encoding revisions used 8-bit nProperties field. Final RandR 1.2 spec uses 16-bit nAtoms field instead. (cherry picked from 66b6358a393972946f16394918db2401c51dc5ed commit) commit 416f1bb99a6d4557f2863ae941868e47e11bbb3b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Dec 1 15:56:52 2006 +1030 mpx: SelectEvents and GetEventBase requests. Some renaming and cleaning up in extinit.c MPXLastEvent added Xi: ShouldFreeInputMask() from XI is not static any more, used in mpx dix: GetPointerEvents() allocates MPX event for MPX devices. DeliverDeviceEvents() caters for MPX devices. commit ccd804c6c01cdfffe938fa5336be9b5668a6f0c0 Merge: 9423ac134 82912ad77 Author: Drew Parsons <drew@pug.localdomain> Date: Fri Dec 1 15:21:57 2006 +1100 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 9423ac134a2a9800787c4978d384827cc4e61fc8 Author: Drew Parsons <drew@pug.localdomain> Date: Fri Dec 1 15:21:05 2006 +1100 GNU/FreeBSD support in GLX: include byteswap.h for FreeBSD systems defining __GLIBC__, as done already for Linux and Hurd (cf. bug #5613). Also includes some more __GNU__ checks on top of those made in commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1. Thanks Petr Salinger (Debian bug #400869). commit 82912ad7709e8cf4a5f8a9fa6b47f789842a3fe9 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 30 20:13:52 2006 -0800 Make solaris version of xf86OSRingBell return void like other OS'es commit 8956f63a941bf0a5f157d47b33e6221601a75040 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 30 19:53:29 2006 -0800 Tell automake to STFU about the *.O files automake will not stop whining about the *.O files not being in normal library name format, so just tell automake they are PROGRAMS so it builds them without bitching. commit f3c60900e575e65254cd2576cc6c90b97c8f63ae Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Nov 29 22:19:57 2006 -0500 Add required root window context to config file. commit 143558500a89a5c887c75c03798bae68c953cac9 Merge: e3d3d29db ee9bdd3f4 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Nov 29 20:41:41 2006 -0500 Merge branch 'master' into my-XACE-SELINUX commit ee9bdd3f4a14a42fb0747acc420966f0f669129b Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Nov 29 12:01:43 2006 -0800 Add DIX_CFLAGS to util builds. Fixes a build breakage when $(top_srcdir) != $(top_builddir) because -I$(top_srcdir)/include is missing for the cvt, ioport, pcitweak, and scanpci builds. Signed-off-by: Adam Jackson <ajax@nwnk.net> commit a6381e69845f58d2b3282992b1f881015190f1bc Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Nov 29 19:25:09 2006 +0100 xfree86 DDX: Delete DDX screens in ddxGiveUp(). This allows video drivers to clean up in the FreeScreen hook things they set up in the PreInit hook. commit afd6af65510b0147f16f08314045b3506bfa9d89 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 29 17:55:15 2006 +1030 mpx: Infrastructure for MPX extension, GetExtensionVersion request works. commit b0c8558b9d9a9984c0067960392e28f5a7622b29 Author: Keith Packard <keithp@neko.keithp.com> Date: Sun Nov 26 19:31:48 2006 -0800 Ensure RandR resource types are registered before resources are created. Now that resources can be created during server initialization, make sure the crtc, output and mode resource types are created before attempting to create associated resources. (cherry picked from commit ec83d674167e7045d5317b179c9998e3172a26dc) commit 6245e9dd4719c5dc15ff45d49cf626123794038b Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Nov 21 16:52:28 2006 -0800 Allocate correct size for RRPropertyRec (oops). Neglected to change the allocation size from sizeof (PropertyRec) to sizeof (RRPropertyRec). Lots of fun crashes this way. (cherry picked from commit 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff) commit 24abce8032940e96bb2ccf9e463a7fff6f36283a Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Nov 21 01:15:26 2006 -0800 Change RandR property datatype to include pending/valid values. This patch tracks the protocol changes which introduce more complex semantics for RandR output properties including pending and valid value information. (cherry picked from commit af55c65bea40669fdc038aa34c6a1ec9ecb33e87) commit f62ac3ec39c6593df476985c630e499864c19c72 Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 28 10:31:40 2006 -0800 Separate DDC mode list creation from MonPtr creation. This will be used by the intel driver, and likely other RandR 1.2 drivers. commit fbd09443385c533416fa530399d54f130afaf985 Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 28 10:15:51 2006 -0800 Replace bad mode name-setting code with xf86SetModeDefaultName(). commit 4ad0bde661be2af4a17771d66066d49736e85cbe Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 28 10:12:02 2006 -0800 Clean up a bunch of long lines and trailing whitespace. commit 05778432dc6e688bc0beff0c20ffd7e27b74888e Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 28 10:07:57 2006 -0800 Move code to get a mode list from EDID data from ddcProperty.c to edid_modes.c. commit 38ecc66cd9c61346a46697bbf1d8319f4f6f9800 Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 28 10:06:15 2006 -0800 Typo that was missed in testing. commit 834e4b079866594b50be64ae79f3cb2a5baa2070 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Nov 28 18:57:13 2006 +0100 Fix potential NULL pointer access in timer code. https://bugzilla.novell.com/show_bug.cgi?id=223718 commit bdf718907b3202815a04ec28a868689708f43da9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 28 18:06:34 2006 +1030 dix: missing parameter to SetCursorPosition in CheckMotion ifndef MPX mi: missing include in misprite.c ifndef MPX commit e88bc0e55a6937ff0b47fe38f60bfa8991196578 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 28 14:34:36 2006 +1030 mi: Bugfix: FreeCursor ignores negative refcounts. mieq: Bugfix: Motion notifies did overwrite DeviceMotionNotifies commit 5dbcd34a0a6c0d10dbfea8fdc9d7dfe7a0261b19 Author: Eric Anholt <eric@anholt.net> Date: Mon Nov 27 16:26:14 2006 -0800 Register dependency on new RandR protocol. commit 16f8f10dc2106bc6253b2d89a1f8efee8d80e2ba Author: Eric Anholt <eric@anholt.net> Date: Mon Nov 27 16:21:31 2006 -0800 Move mode handling helpers from ddcProperty.c to xf86Mode.c. commit b4b0d901d98371a8aa7b17d195e18e83e2a6a618 Merge: 64de3baf8 d6cd0313c Author: Eric Anholt <eric@anholt.net> Date: Mon Nov 27 15:43:15 2006 -0800 Merge branch 'randr-1.2' Conflicts: dix/events.c dix/getevents.c hw/xfree86/common/xf86Mode.c hw/xfree86/dri/Makefile.am hw/xfree86/os-support/drm/xf86drm.c hw/xfree86/os-support/xf86drm.h commit d6cd0313c7f23f32c9c7dda00ff739e772bf7db3 Author: Eric Anholt <eric@anholt.net> Date: Mon Nov 27 14:46:50 2006 -0800 Add some mode helper functions from the intel driver. This also removes static from some other functions that had been copied out to at least the intel driver, but perhaps others that were doing mode list handling. commit 85ea408e38f452bcf9109f14fd1016d159692a99 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 27 18:07:16 2006 +1030 mi: malloc checks for misprite and midispcur, code cleanup removed IsMPDev() commit 023da4e804ad260eaf0c50d2ec7213dd514e2113 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 27 15:54:33 2006 +1030 mi: mipointer.c cleanup, reducing code duplication, using MPHasCursor() instead of IsMPDev() commit a2340a73687dfd93affb6de28a33d73fd808c96b Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 27 14:47:23 2006 +1030 mi: free allocated memory in miDCCloseScreen and in miDCInitialize in case of errors. Some copyright notices. misprite.c passes DeviceIntPtr around and down to DC (previously miCursorInfoPtr and the plain device id). Large cleanup in misprite.c to avoid code duplication. commit 1c7568b8a1417257fa67c7fca69aa253099b9461 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 23 17:15:14 2006 +1030 mi: closing memory leak, miPointer is freed in miPointerCloseScreen bugfix: uninitialized pPointer in miPointerGetPosition ifndef MPX adding DeviceIntPtr parameter to ScreenRec's cursor functions. cleanup of miPointer code to use same scheme in each function dix: MPHasCursor() function determines checking whether to invoke cursor rendering. animcur: adding DeviceIntPtr parameter to cursor functions but animcur relies on the core pointer right now. xfixes: adding DeviceIntPtr parameter to cursor functions but xfixes relies on the core pointer right now. rac: adding DeviceIntPtr parameter to cursor functions but RAC relies on the core pointer right now. ramdac: adding DeviceIntPtr parameter to cursor functions but ramdac relies on the core pointer right now. commit 64de3baf85f6df274f71f736016f0848567cd9f6 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Nov 22 14:46:51 2006 -0800 Add a -showDefaultLibPath option. A corollary to the previous change, this option prints $libdir. commit 0a2a6e4070718b90af7ca0e047f028e0cabdfb9d Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Nov 17 18:27:23 2006 -0800 Add a -showDefaultModulePath option. As discussed on the mailing list, people would rather have an X command-line option to print the module path so installers can know where to put modules, rather than the installers using `pkg-config --variable=moduledir xorg-server`, since some distros choose not to install xorg-server.pc. commit 61832cb94c8a4d62cddb92188caeed86519e9d62 Author: Brian <brian@i915.localnet.net> Date: Wed Nov 22 09:16:43 2006 -0700 Regenerated from Mesa w/ latest gl_API.xml file commit 61863f09d22935406371e92bb75173d55ff9b29f Author: Brian <brian@i915.localnet.net> Date: Wed Nov 22 09:16:17 2006 -0700 Regenerated from Mesa, fixes glMap* protocol problem (bug 8899) commit f52d53e060d0468b658a565688d1f92c156405c7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 22 17:58:57 2006 +1030 dix: DeliverEventsToWindow adjusted for MPX mi: sprite debugging disabled commit 8c16f21d5df08b028e93440d632939a5fdbf5876 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 22 17:06:47 2006 +1030 dix GetSpriteWindow() adjusted for MPX added device dependency for MPX to DoEnterLeaveEvents, EnterLeaveEvents, EnterNotifies, LeaveNotifies and FixUpEventFromWindow. commit 70383105de279df553874efa56b37a7b3e426ea1 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 22 15:27:16 2006 +1030 mi: added DevToSprite() conversion function fixed miSpriteRealize to use passed pDev argument instead of looping. dix: changed sprite dependency and added MPX functionality to parts of events.c (XineramaChangeToCursor, XineramaCheckPhysLimits, XineramaConstrainCursor) Xi: fix: accessing other->buttons for keyboard segfaulted the server commit 33ff4cec5ff7533ec725f71d357c096dfb0acb79 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Nov 21 21:23:17 2006 +0000 Issue CloseDownDevices() in os/log.c and remove from dix/main.c. This ensures that all calls to FatalError() will shutdown the input devices. commit efd4f3c6ffec804c68ba5df17cc117da264fb7c4 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 20:31:30 2006 +1030 dix: WindowsRestructured() calls CheckMotion() on all devices mi: core pointer was checked twice in miSpriteReportDamage, miSpriteInstallColormap, miSpriteStoreColors, miSpriteSaveDoomedAreas and miSpriteRealiseCursor using damage bug (see comment in file) to avoid artefacts commit 9db851c22d4befb95bfb074b96620261d8e32ac9 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 18:15:04 2006 +1030 dix: moved sprite from static to be pointer of type SpritePtr added SpriteRecs for MPX devices changed sprite dependency and added MPX functionality to parts of events.c (ConfineToShape, PostNewCursor, XineramaCheckMotion, CheckMotion, XineramaChangeToCursor, ChangeToCursor, CheckPhysLimits, PointerConfinedToScreen) added DeviceIntRec param to GetSpritePosition(). This required some minor changes in ddx, xtest, xkb and xfixes. mi: changed miPointer to pointer instead of static struct. commit fd8b9a6eaee28a453a00af14195b81ef1890a577 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 15:24:43 2006 +1030 TAG: MPX_BEFORE_DIX_API_BREAK commit 447efdc01d4f8922205ba26e52c9e5ff9f5cb90e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 14:46:00 2006 +1030 mi: constrain MPX cursors to screen commit 1107d8bea22eea26f7b666f1c00a53360b7d237e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 14:00:46 2006 +1030 mi: added device ID to miSpriteCursorFuncRec functions added MPX code to midispcur.c BUG: Core pointer changes whenever MPX cursor changes shape. commit 3bad452d12d620df91b1f37d06c650ded96bfafe Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Tue Nov 21 11:26:21 2006 +1030 mi: added MPX to miSpriteReportDamage added id field to miCursorInfoPtr, required to pass through to miDC core pointer uses mpCursors array as well. added miDCBufferRec for future use with MPX TAG: MPX_BEFORE_MIDC_API_BREAK commit b1bbdf464d2f8799fa3429c1c27ca998c5f3e94a Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 20 17:58:30 2006 +1030 mi: added MPX to miSprite functions. NOTE: This version will render multiple cursors but with an artefact each time when devices alternate. commit 7b4b619d4c268804199f9f4775eb56604f0b80e8 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Mon Nov 20 13:10:07 2006 +1030 mi: moved core pointer information from miSpriteScreenRec into a miCursorInfoRec. bugfix in mipointer, semicolon after preprocessor statement commit ca2874b273232d9f51881b1cd754ed6847bfaf47 Merge: c9a5f9d39 e2f6dacc7 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Sat Nov 18 19:56:32 2006 +0000 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit c9a5f9d3911c2e6a8f81b0721c9eb914fb7719b5 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Sat Nov 18 19:55:42 2006 +0000 Shutdown input devices if FatalError occurs during startup. Fixes Xdmx problems when the input device has been initialized and the keyboard map has been destroyed. commit e2f6dacc736527790ed8e304698678afc17f71c6 Author: Dave Airlie <airlied@linux.ie> Date: Sat Nov 18 11:26:55 2006 +1100 dri: setup libdrm hooks as early as possible. This is due to radeon doing drm stuff before DRI extension gets initialised commit 90bea69dfdd63f58ee326887359ad1b35a31cb5f Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 17 18:03:43 2006 +1030 mi: added miCursorInfoRec to contain info of the MPX cursors. calling miUpdatePointerSprite() from event queue for MPX devices. adding device-specific processing to miPointer*() functions. dix: Call to SetCursorPosition in CheckMotion() temporarily disabled. xfree86/common: call to miPointerUpdateSprite() disabled, is done from the EQ NOTE: This build will not display cursor images. BUG: The second mouse does to take correct x coordinates. commit 94e106a898c44daeb228bcb031b85f996ddc96b0 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Fri Nov 17 15:10:37 2006 +1030 dix: moved isMPdev field to end of _DeviceIntRec structure mi: added miMPPointers array to mipointer.c added DeviceIntPtr to all miPointerSpriteFuncs. Coming from miPointer we use inputInfo.pointer as standard value. ABI BREAK! ramdac: forcing failed HW Cursor initialisation. MPX needs software rendering. changes to use new miPointerSpriteFunc (this required externing inputInfo, should probably be fixed at a later point). RAC: changes to use new miPointerSpriteFuncs. commit ef47d9c3ba63e9a6243fe5c81ccc60c8246352b4 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Nov 16 13:50:48 2006 -0800 Reduce calls to RRGetInfo. RRGetInfo can be expensive. Don't invoke it when quering Xinerama information or setting a new CRTC configuration. (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad) commit 07b26e690cd9a4fc626132feed0702515cbe5a88 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Nov 16 09:48:33 2006 -0800 Remove RandR output options. RandR output options are now expected to be handled by properties instead. (cherry picked from commit 8b2a7e94a1dc2776ab2cfaaebb309be02502602a) commit f17e3c34dfd1f1418440bdebf45764e4dbf550f0 Author: George Sapountzis <gsap7@yahoo.gr> Date: Thu Nov 16 02:18:03 2006 +0200 Fix GL context destruction with AIGLX. The logic for freeing GL contexts introduced by "Fix AIGLX VT switching." is inverted. As it is now, GL context destruction is deferred for glxDRIEnterVT(). commit ae3c9ad4abe66784d7ee474455003d2745699286 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Thu Nov 16 17:29:06 2006 +0100 Bug 9041: Check the return code in xf86MapDomainMemory(). commit 5388423eb05daefcc71067b6ab96b6e57c44ef5c Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 16 20:43:27 2006 +1030 mieq: EQ processing handles MP devices global: MPX define added to xorg-server.h.in xfree86/common: small fix to avoid byte overflow commit c957a16180810fbd58526e1a670d82384fb4a61d Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 16 15:11:14 2006 +1030 dix: added isMPdev field to _DeviceIntRec, is used in GetPointerEvents() mieq: avoid merging events from different devices in mieqEnqueue() xfree86/common isMPdev field used from xf86ActivateDevice(), xf86PostMotionEvent() and xf86PostButtonEvent() commit 7ce2dc57844872cc340b60387d4d1cb3d982633e Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 16 12:51:08 2006 +1030 dix: merge with code cleanup from master GetPointerEvents treats events in the same way as XINPUT devices when flag has POINTER_MULTIPOINTER set. xfree86/common: added XI86_MP_DEVICE flag and parsing in xf86ProcessCommonOptions added POINTER_MULTIPOINTER define. Is used in xf86PostMotionEvent and xf86PostButtonEvent for the flags that are passed into GetPointerEvents() global: added flags to configure.ac to enable/disable MPX define added flags to dix-config.h.in to define MPX commit 4d07b503727ba86315b90d6f45b06ed6185724b2 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Thu Nov 16 10:55:15 2006 +1030 dix: cleaned up GetPointerEvents() to avoid code duplication. commit 6ff7f2ad6a5e2e769244590578e6809974b5235d Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 7 13:13:53 2006 -0800 Fix build on FreeBSD after input-hotplug. (cherry picked from commit 4e6e4baead6c565363abbcd9e06cc685be121596) commit bffb1f9b67c8d3d264c0c3fd703cf7e57dcdf7b7 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:53:13 2006 +1030 removed unused variables drag and local from xf86PostMotionEvent commit f737cd925efe452787443b039ae65b8d85081bb3 Author: Peter Hutterer <peter@cs.unisa.edu.au> Date: Wed Nov 15 17:50:02 2006 +1030 o fix minor error in comment for GetPointerEvents() commit 2eab230d9bd3f73ffe1b5a42111f89e85904ee11 Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Tue Nov 14 16:37:18 2006 -0600 For NetBSD, define PCVT_SUPPORT (System has PCVT console). Noticed by Joerg Sonnenberger. This fixes problem with console switching. This was in original imake NetBSD.cf. commit 26d2e45bdb0cf4d18ba7b0365425da49d60b3d5c Author: Matthias Hopf <mhopf@suse.de> Date: Tue Nov 14 15:33:07 2006 +0100 Bug #9023: Only check mice for "mouse" or "void" if identifier is != NULL. commit a724b7f1302ba7a59f140b521f13d2ddf0fcf9bf Merge: 6facd958c f80a8ae6e Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Mon Nov 13 20:32:26 2006 -0600 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 6facd958c2e7098cb68eac2810a88b8cd40f19c0 Author: Jeremy C. Reed <reed@glacier.reedmedia.net> Date: Mon Nov 13 20:23:06 2006 -0600 On DragonFLy, default to /dev/sysmouse (just like on FreeBSD). TODO: use autoconf to handle this so the code is not platform based but feature based. commit f80a8ae6e6820378ea70ac0849cee8bf3055e0e8 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Nov 13 18:26:05 2006 -0500 Disable Xprt server build by default. commit 5bfe7f4dfc6ab51b6790d74faf11574385234423 Author: George Sapountzis <gsap7@yahoo.gr> Date: Mon Nov 13 01:54:32 2006 +0200 DRI: call drmSetServerInfo() before drmOpen(). Also, remove some libdrm remnants. commit acb5ff4c73ac4d52201d7c421f488e2ead5c8b9c Author: Jurij Smakov <jurij@wooyd.org> Date: Sat Nov 11 14:09:15 2006 +0200 ffs: handle 0 argument (bug #8968) Handle an argument of 0 in ffs(), instead of looping indefinitely. Add an ffs prototype to dix.h, and add includes to ffs.c. (cherry picked from 34164e551e4c3909322d50b09835ca4ac1d49d68 commit) commit ca094684196886a4a1c10273049fae0705a3edc2 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Nov 10 18:02:05 2006 -0800 Correct symlink-mesa.sh usage message commit 28337cc1060bc08adef81c304dd9ed02d0a0e37b Author: Eric Anholt <eric@anholt.net> Date: Thu Nov 9 19:51:17 2006 -0800 Fix typo before the last commit. commit e1720b1089328af80ca0cb85e5289ced05263f95 Author: Eric Anholt <eric@anholt.net> Date: Thu Nov 9 18:53:37 2006 -0800 Bug #8868: Remove drm from SUBDIRS now that the directory is gone. commit 0dee48b8af3e054228aef0d15c1cb1c9e23790cc Author: Keith Packard <keithp@mandolin.keithp.com> Date: Wed Nov 8 23:17:55 2006 -0800 Add RRInit function to create resource types for RR objects. To allow RandR objects to be created before the screen object exists, the resource types must be registered with the resource database. A driver wishing to create RandR objects must call RRInit before doing so. Also, fix a segfault when setting Output data before it is associated with a screen. commit ec77a95a02329a2ee3a94d7de9d2a234aecb9ca0 Author: Keith Packard <keithp@mandolin.keithp.com> Date: Wed Nov 8 21:36:35 2006 -0800 Allow RandR objects to be created before the associated ScreenRec. xf86 drivers need to create RandR object in the PreInit stage, before the ScreenRec is allocated. Changing the RandR DIX code to permit this required the addition of functions that later associate the objects with the related screen. An additional change is that modes are now global, and no longer associated with a specific screen. This change actually makes mode management cleaner as there is no more per-screen list of modes to deal with. This changes the RandR 1.2 ABI/API for drivers. commit fd91630b73100e9d77ccb492c52807448bc772a5 Author: Dave Airlie <airlied@linux.ie> Date: Thu Nov 9 09:30:33 2006 +1100 make X server use system libdrm - this requires libdrm >= 2.3.0 This patch blacklists the load "drm" line, moves some functions in dri module links dri module against libdrm, and removes the X copy of libdrm commit 0409e1627a167db2efc1355f292d3c02a6989ffc Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Nov 8 16:17:20 2006 -0500 'make dist' fixes. commit 7e0aeebb8f8a5dff3cb4d88756e535dd70edeec4 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Nov 8 12:03:37 2006 -0500 Bug #6786: Use separate defines for server's Fixes support level. commit b5d09d4adb8088719ff494a4281a793717046576 Author: Rich Coe <Richard.Coe@med.ge.com> Date: Wed Nov 8 18:10:14 2006 +0200 CheckConnections: don't close down the server client (bug #7876) When an appgroup is shutting down, the list of clients can change, so make sure we're not trying to shut the server down. commit 0567a6337b84fa045b5732e98203f488274aa2a2 Author: Bram Verweij <amverweij@gmail.com> Date: Wed Nov 8 18:00:52 2006 +0200 xfree86/linux acpi: fix tokenising Split on a space, rather on the 'video' string, as strtok takes a char, not a string. commit e7900d68c3ee657158813f0650886d680c0a9a3c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:36:47 2006 +0200 remove trailing whitespace Whitespace police in full effect. commit 2035f115b7db3c4b7deabeab0d814b3107d6ef30 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:28:10 2006 +0200 xfree86: remove xf86Keymap.h commit 809e2841aaa54662a42498aacec558bc813bba1c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:27:58 2006 +0200 xfree86: add general handler, port ACPI to it (bug #5665) Add 'general' handler registration, which will not trigger DPMS when an event comes in. Make ACPI use this. commit b5438f7fb2879e0226b578f60b22a490e73c3a83 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:24:58 2006 +0200 Get*Events: massive reorganisation Reorganise the code logically, and put more comments in. Clip valuators in proximity calls. commit b0a7443ca8bd224994f98c1c1e25de88f2573224 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:23:52 2006 +0200 configure.ac: axe redundant SDL test commit 332f179db7c38310db1f752d45f51b6d8301fd30 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 15:23:35 2006 +0200 kdrive/sdl: fix compilation commit 988757a44197c91027109076e2e33ff6510ed71d Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 8 14:06:51 2006 +0200 config: error messages non-fatal, and before we free them Move error messages before we free the error structure, and make them all non-fatal. commit e2b78df5800fb4e3f0ed01b38a1974ba3577949c Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 7 11:13:56 2006 +0200 xkb: warning fix commit b55007d8cc9d20baa23d5de67683e414c827d3e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Nov 7 11:13:32 2006 +0200 SyntheticMotion: don't dereference sprite.screen when not using Xinerama commit f93d10ce9bb4a6de83b561f44fb7b046def16234 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Nov 6 18:33:45 2006 +0200 dix: remove staggeringly broken vendor workarounds Dear SGI, No. Scant regards, Daniel commit 389275d240e4ba19d62fda0f138a45c7ecb245ff Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Nov 5 02:47:59 2006 +0200 XkbCopyKeymap: don't iterate broken types, or dereference null pointers Don't iterate invalid destination types (>= num_types) when coping key types. Don't free key_aliases if it's NULL (theoretical, but sure). Make sure dst's label_font gets allocated if it's NULL. (Thanks, Chris Lee.) commit d585b4189aff8d7952847f75b19b4f092ab3b88b Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:47:55 2006 +0200 xkb: fix uninitialised warning Fix uninitialised warning with memset(); we never actually use it uninitialised, but gcc doesn't know that. commit b6d7b537ed8975363ad0f7c4180a62822358e418 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:43:22 2006 +0200 os: fix sun extensions test 'else if' is not very valid, plus the logic is kind of broken, so just move it outside the ifdef in the first place. commit 8ba0c7b62c78dead722b0c8aa414f37bac4414b7 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:41:03 2006 +0200 xace: avoid 'unused variable pScreen' Initialise pScreen explicitly, as REGION_* macros ignore pScreen. commit c3ea1f7db494365032526dc06a7283384bd0ecd1 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:38:31 2006 +0200 dix/mi: still more warning fixes Fix up prototypes for PrintChildren and PrintWindowTree in the dix. Make miPrintRegion be unconditionally defined, and move the prototype into regionstr.h. Change a bunch of ScreenPtr pScreen = foo; to ScreenPtr pScreen; pScreen = foo; in window.c, so we avoid unused variable references (as inline REGION_* doesn't reference pScreen). commit 3a9b96425851b495503bd2eb0fd0d01c08f6a097 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:33:09 2006 +0200 dix: add missing prototypes Add missing prototype for ffs, and include headers from ffs.c. Move PostSyntheticMotion prototype to input.h. commit 6716488fa256798070017232405b107d5c985479 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:30:23 2006 +0200 dix: remove unused debug code commit 51813d77bfb84609a58a98e678efe9b6c0bf5503 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:29:05 2006 +0200 dix: remove unused variable commit 844090a5b557705dd0adce2b7ed98813b5104d85 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:21:29 2006 +0200 xfree86/xf86misc: warning fixes commit 61b570d0c1eb448f0aa08b4598118f0d43bc7345 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:21:09 2006 +0200 xfree86/os-support: update prototype for OSRingBell commit c51fadc07d938f6a3edfd5620170fcb7d6486a11 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 21:20:45 2006 +0200 mieq: annotate with some more comments commit 578899139f133746634a7bf8845e25362b5dfca2 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Nov 4 20:35:55 2006 +0200 RemoveGeneralSocket: don't touch EnabledDevices RemoveGeneralSocket. Harmless, but. commit ae58d349c1cf5d63ad3616c485baa858350978d5 Author: Laurence Withers <l@lwithers.me.uk> Date: Sat Nov 4 19:34:37 2006 +0200 CreateColormap: fix return value (bug #7083) Return BadMatch when an unsupported visual type is given, not BadValue -- this is correct according to the spec. commit 96f78e3886791b723ccd9ba40bea701603537b0c Author: Erik Andren <erik.andren@gmail.com> Date: Sat Nov 4 19:29:49 2006 +0200 remove XFree86 changelogs (bug #7262) Without being able to tie these to specific commits, the text changelog is useless, as well as being huge. commit 5a40448f2d0ac2c86c617bebe3fb649174bf0d7f Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 7 15:48:05 2006 -0800 A couple more cases of error message before freeing strings. commit 05f1c302460a14c8fa9a943a12d69adcd3c30d58 Merge: 3e7e0e350 46af6d1e9 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Nov 7 18:42:54 2006 -0500 Merge branch 'autoconfig-for-7.2' commit 3e7e0e35094d09e0e764818ed125314be75be01a Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 7 14:13:23 2006 -0800 Report the error before freeing the error strings. commit 4e6e4baead6c565363abbcd9e06cc685be121596 Author: Eric Anholt <eric@anholt.net> Date: Tue Nov 7 13:13:53 2006 -0800 Fix build on FreeBSD after input-hotplug. commit 20e9144c0746943624ff77a61791b8596f3f8458 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Nov 7 12:49:28 2006 -0800 Add $(DIX_CFLAGS) to remaining Makefile.am files commit 5e946dd853a4ebc2722ae023429ce5797de3d7a6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Nov 7 13:50:19 2006 -0500 Bug #8937: Extension setup functions not called on server resets commit 1dcda4f3c56214464c0b6123fea6daa69aae69fc Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Nov 7 01:29:51 2006 -0800 Avoid dereferencing sprite.screen when Xinerama is not running. (#8925) With Xinerama support built into the X server but not in use, sprite.screen is NULL and yet the SyntheticMotion macro would dereference it. Avoid that by just passing sprite.screen to PostSyntheticMotion which can then dereference it when Xinerama is enabled. Also, define PostSyntheticMotion in dixevents.h and include dixevents.h in getevents.c commit c20d3bf7533da0bf26beaf7d8c359d18edbd70e8 Merge: 028bbdc04 3d39c02fe Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Nov 7 01:21:28 2006 -0800 Merge branch 'origin' into randr-1.2 commit 3d39c02fe6aaa602c52f1d4f0ea6cd3bd000cf9f Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 6 21:25:52 2006 -0500 More work on Bug #8875: revert previous fix and try using client argument instead of serverClient. Also don't use totalClientSize as it is not initialized until after the first call to InitClient. commit 75fe0670eb1f71144246f1c20759d58788bbee00 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 6 15:30:25 2006 -0500 whitespace adjust commit 0539d9cf2423fc0bed6f5c413beba3080f8abd85 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Nov 6 15:29:17 2006 -0500 Bug #8875: Security extension causes Xorg to core dump on server reset commit aa0261a98e9d5b1349b33e2639bd83c556dd4000 Author: Juliusz Chroboczek <jch@pps.jussieu.fr> Date: Mon Nov 6 02:29:49 2006 +0100 Improve vm86 error handling in Xvesa. commit 6b2c65fdd169037c6ede250d4a8fec3d29a080ae Author: Juliusz Chroboczek <jch@pps.jussieu.fr> Date: Mon Nov 6 00:30:09 2006 +0100 Fix typo in Xvesa: incorrect reporting of DAC capabilities. commit 028bbdc0417173803695808ba9f48498519273a3 Merge: 50504c68e 8deaaa312 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Nov 4 17:46:26 2006 -0800 Merge master back to randr-1.2 commit 50504c68e1d407232cf83465981b235e542ef31f Merge: 8b87ce197 cde8806c2 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Nov 4 17:43:19 2006 -0800 Merge branch 'randr-1.2-origin' into randr-1.2 commit 8b87ce19741753eafbd99e7093bc3dea8f26e838 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Nov 4 17:41:25 2006 -0800 Allow X server to build against libdrm 2.1 commit 7ffbe9d232e3a4621a204448d67e434736465cbe Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Nov 4 17:41:09 2006 -0800 Add DIX_CFLAGS to hw/vfb/Makefile.am commit 2db62bce0725ba2d88cbe40fc440b6bda45046f3 Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Nov 4 17:40:34 2006 -0800 Define fbHasVisualTypes in fb.h as it is exported commit 8deaaa312ad7f9b492a2ae8ad17d74650112c25c Author: Bernhard Rosenkraenzer <bero@arklinux.org> Date: Sat Nov 4 18:59:39 2006 +0200 automake: avoid use of reserved _SOURCES keyword (bug #8866) Avoid using _SOURCES unless we're directly referencing a program or library to be built; use _SRCS instead. Shuts automake 1.10 up. commit f72927d26cd112d321f7bf187df3c740b3129d22 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Nov 4 19:00:57 2006 +0200 xfree86/hurd: remove OsMouseProc (bug #5613) Remove OsMouseProc, let the mouse driver deal with it. commit 0273610578485564c3c0be11b336b6554cc31b43 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Nov 4 19:02:04 2006 +0200 xfree86/hurd: add bell support, remove SERVER/LOADER defines (bug #5613) Add no-op bell ringing support, and remove obsolete @SERVER_DEFINES@ and @LOADER_DEFINES@ from CFLAGS. commit ade4bf09076d13dbf3549c0a2d987a0afe76d5c1 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Nov 4 19:03:13 2006 +0200 mesa/indirect: include byteswap.h on GNU userland (bug #5613) Include byteswap.h on all GNU-userland systems (including with the Hurd and FreeBSD kernels), not just Linux. commit 412e93349e1656c9650115328af4be0e59a66f74 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Nov 4 19:05:02 2006 +0200 kdrive: make building of Linux support conditional (bug #5613) Only try to build Linux support on Linux. We should probably disable all OS-dependent DDXes if we don't have a workable OS (and only build Xephyr/Xfake), but that's future work. commit cde8806c2930788ba8076e94651d391e45f3ccdb Author: Eric Anholt <eric@anholt.net> Date: Fri Nov 3 16:36:34 2006 -0800 Don't bump the refcnt if the new mode is NULL. commit 97fd471a627be185bee8cda3f709cfccea3fa12d Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Oct 27 12:36:56 2006 -0700 Fix standard VESA modes. The built-in mode timings were off slightly for the 640x480@60, 640x480@72, and 1024x768@75 modes. commit 22ee2e4e1f1d9fd9ca9f25c9bf25370034b771d4 Merge: 49a26681b bd0c82965 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Nov 3 12:54:56 2006 -0800 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 49a26681b2bdd95ed65c425f1fa1441d2f092a6e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Nov 3 12:54:43 2006 -0800 Add DTrace probe points for X server <-> client communications See http://people.freedesktop.org/~alanc/dtrace/ for more details commit bd0c829654903ca45543dfa59cda967c4fafd8ac Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Fri Nov 3 18:54:06 2006 +0100 Do not map full 0-1MB legacy range If we're mapping something in the "legacy range" (0-1Mb), we shouldn't expand the requested range to the entire 0-1Mb range. Typically this is for mapping the VGA frame buffer, and some platforms support mmap of the frame buffer but not the entire 0-1Mb range. For example, HP sx1000 and sx2000 ia64 platforms can have memory from 0-0x9ffff, VGA frame buffer from 0xa0000-0xbffff, and memory from 0xc0000-0xfffff. On these platforms, we can't map the entire 0-1Mb range with the same attribute because the memory only supports WB, while the frame buffer supports only UC. But an mmap of just the frame buffer should work fine. commit c1828a8ff51c8db326c47e6710f4f42fab94fb6d Author: Egbert Eich <eich@freedesktop.org> Date: Fri Nov 3 18:32:48 2006 +0100 Fixing mach64 driver bailing out on ia64 Mach64 driver bails out on ia64 because it cannot map device memory. It turns out that some bogus and unneeded code attempts to find the root bridge of the device and fails to do so proberly as there this host-to-pci bridge is not existant. This code has been around for years although it completely unclear what it had been intended for. Fixing this by eliminating the bogus code. commit d50fc413b39f52663b46084c28e81fc4933a7b49 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 18:53:41 2006 +0100 Fix device path in altixPCI.c to be domain aware. commit 1d731fc54a2cf5d3f353d8ee1c7c4989df27f011 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 18:50:15 2006 +0100 Add domain support to linuxPciOpenFile(). Loosely based on patch from David S. Miller <davem@davemloft.net> See also bug #2368. commit caaa113acf4144fd47a1ac93ca440d78d1983e54 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 18:38:45 2006 +0100 Fixing domain support for ia64 ia64 specific functions + defines. Still uses /proc interface for some scaning code. Based on code from Egbert Eich <eich@freedesktop.org>. commit 16c5043fc0c84b14323cd211c2645106455ac320 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 18:22:09 2006 +0100 Fix 2 warnings. commit 072c022e731c3aadf34096f16364e29df47280d2 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 17:58:19 2006 +0100 Fix obviously wrong boundary checks + cleanup unused vars. Also disable compilation of code that is no longer used anywhere in the whole Xserver tree. commit 5afc6c1a14fea2966017493b045fa7209faeb8eb Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 15:42:03 2006 +0100 Added linux 2.6 compatible domain aware device scanning code. Additional scanning code uses the /sys interface of 2.6 kernels. Cleaned up the use of tags and already split domain/bus/dev/fn. commit 6319f7d713971f70f06166480f069eca3bcace36 Author: Egbert Eich <eich@freedesktop.org> Date: Thu Nov 2 12:50:52 2006 +0100 Make int10 fully domain aware. commit f4dd2665b0f9aa9c00a5152c73bc72cb7514eeb5 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 12:36:12 2006 +0100 Added missing domain stripping in already domain aware code. commit 46901063e8edc82b67989f4e5eec39d17c67dc98 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Nov 2 12:25:03 2006 +0100 Build with -D_PC on ix86 only. commit 543b397277d1f03b8091e44812010abcd5d80102 Merge: 4056e6e79 645d05762 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Nov 2 19:00:35 2006 -0800 Merge branch 'origin' into randr-1.2 commit 037f23e6f8fbe6e6fc8e71ed21958fc553df72d0 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 2 18:30:58 2006 -0800 Convert Xprt DDX to new motion history api commit 7dc54a40e900cbea1e509620623b091d54a3c2d1 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 2 16:38:47 2006 -0800 Remove references to xf86Info.kbd* from solaris code commit e46f7f78b362e76f5a553184e3f5ec7e109aa39d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 2 16:38:12 2006 -0800 sun_bell.c needs to #include "xf86_OSlib.h" commit 58bf9a142d1957f4d77038ee4ce7b1116b1f7955 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Nov 2 14:43:02 2006 -0800 PostSyntheticMotion needs to be extern, not static, since it's in getevents.c commit 1ecd45fb8e4250fb51daa2bdf1a960af0f8b53fb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 04:51:03 2006 +0200 Makefile.am: add config to DIST_SUBDIRS as well commit 01afa533aa872d1a101a41153f95d800e68fea3e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 04:32:37 2006 +0200 xfree86/os-support: axe more unused files commit 57c1409151cb1f6e0e528fb92ebda58f86f12c1a Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 04:21:06 2006 +0200 xfree86/os-support: remove unused file from dist commit de5a4c63747a417cdece919f4fb5a4004a3ee7bb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 04:18:33 2006 +0200 xkb: note that we allow full xi interaction We now allow maps to be set (etc) on different keyboards, so stop putting XkbXI_KeyboardsMask in unsupported. commit 1d65429a9e03871969552d0c31b022546cc46b12 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 04:12:55 2006 +0200 xfree86: don't attempt to enable and disable non-DIX devices Don't try to enable and disable devices with no entry in the DIX, such as the evdev brain. commit 64139c1950ea825c0a0124abc5f88499e91f797f Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 03:22:09 2006 +0200 bump to 1.2.99.0 commit 18c246a13b887b865de6a17e6cd1c259b9bc383d Merge: 794f2e729 4843d823f Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 03:21:37 2006 +0200 Merge branch 'input-hotplug' commit 4843d823f4d38d8bd468ce3a8feddbff229ed416 Merge: ba9f5138f a7b944f0d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 03:18:13 2006 +0200 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit ba9f5138fc32a7a7b97bcf941bc92751b7c6c2c0 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 03:16:10 2006 +0200 xfree86: allow starting with no input devices Add a server flag (AllowEmptyInput), which will inhibit adding the standard keyboard and mouse drivers, if there are no input devices in the config file. commit be291a6d9764cf29a7d9a8114d47d9f41ce856e9 Merge: a2d624210 6fdfd9dad Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 03:15:25 2006 +0200 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit a7b944f0d96c3e0e15e75378a04def1ac96089fb Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 1 16:17:49 2006 -0800 If getpeerucred() is available, include pid & zoneid in audit messages too commit fbfb35189ef6666707097704b43e052cb2f919ae Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 1 15:11:48 2006 -0800 Bug #1997: AUDIT messages should contain uid for local accesses <https://bugs.freedesktop.org/show_bug.cgi?id=1997> commit a2d6242106bb3a440faa9cad157e0120dbfa7b6e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 00:46:33 2006 +0200 kdrive:remove Change{Keyboard,Pointer}Device This was removed in the DIX, so just axe it. commit d9a5e3e964b6c91fbca88b50674fce9660b972a4 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Nov 2 00:45:23 2006 +0200 XkbCopyKeymap: be more careful with levels, allocate compat/geom Take various extra precautions with copying levels across (thanks Chris Lee for a gdb session), including allocating when we don't already have a coherent map. Only free type components if they're present. Allocate geometry and compat components if we don't already have them in the dest map. commit 6fdfd9dad91d7b7aa292f8c4d268dd27c34de8d3 Author: Eric Anholt <eric@anholt.net> Date: Wed Nov 1 14:29:59 2006 -0800 Fix several cases where optimized paths were hit when they shouldn't be. This fixes a number of rendercheck cases. commit 40f84793bca40dcc6883d51aefa1bda44bd1ac61 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Nov 1 14:34:46 2006 -0800 Propogate $LIBS for xtrans, clock_gettime, libm, etc. to libs used for each server commit d7d931abe01a8cf555b027f2bcfcccd5e9053e52 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 1 23:48:58 2006 +0200 configure.ac: remove check for rate/period Keyboard stuff is now handled in the kbd driver. commit 81728558a044fdde0e1d63da7b6314755f77296e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 1 23:10:26 2006 +0200 input: add non-keyboard bell ringing function Add a generic 'ring the bell' function (console bell on Linux and BSD, /dev/audio on Solaris), and add DDX functions for this. Make this the core keyboard's bell. Port Xvfb and Xnest to this. Port XFree86 to this, with OS-specific hooks for Linux, BSD, and Solaris taken from foo_io.c in the old layer. commit 3df454719f9cbf6a046cb7458019ec621b3b42ee Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Nov 1 23:02:57 2006 +0200 kdrive: add KdRingBell prototype commit 4056e6e79a4e37101d298ae29139c83d3816368b Author: Keith Packard <keithp@mandolin.keithp.com> Date: Wed Nov 1 00:29:46 2006 -0800 Move physical size from mode to output. Modes can be shared across different sized monitors this way. Also caught some missing byteswapping and an incorrect return type. commit c03311a1e78daa291477a67b1bb7206772108c5d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 31 16:05:48 2006 -0800 Fix automake error: BUILT_SOURCES was defined multiple times on Solaris commit a2434ec5f3c9dc79d1f05c2d704a82a766718ed4 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 31 15:57:59 2006 -0800 Make _POSIX_C_SOURCE hack work with Solaris headers Solaris headers are very literal - if you ask for POSIX_C_SOURCE 199309L, they limit to only the functions in that standard and no more, unless you also specify __EXTENSIONS__ to allow functions beyond the standard base. commit 645d0576205532a3610ae351267d5b84d76236bd Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Oct 29 18:19:56 2006 +0100 Handle building in a separate objdir commit 59584c375f4e4b2670a92002ecb7a78a0bc50cce Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Oct 29 17:49:46 2006 +0100 kill GNU-make'ism. commit 0107320fac0913aae2cb169992e31c670b4bd2f7 Merge: 06b6b971d a34446f5b Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Sun Oct 29 15:23:35 2006 +0100 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 06b6b971d065226b983ba25da7ea8236ec37df04 Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Sun Oct 29 15:22:37 2006 +0100 Make sure we have 64-bit file-offsets in libdrm. commit 644ee2434a4e09f5baea00a486911f8c24b9a261 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 29 03:52:11 2006 +0300 kdrive: avoid null dereferences Avoid jumping into NULL pointers for OS or card functions which do not exist. commit 738d2e88171bcce8782d670a1cda9a1d941d7977 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 29 03:48:02 2006 +0300 kdrive: move bell ringing into an OS function Move the bell into an OS function, and use that if it's declared; else, fall back to using the driver's function. Remove the Linux keyboard bell function; just move it into the OS layer. Use named initialisers when converting the old structures, and eliminate unused functions. commit 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 29 03:43:34 2006 +0300 Xi: disallow changing core keyboard and pointer Just short-circuit the change core keyboard/pointer requests. commit 68f595ca6c7883e030947b7f95c50e92aa733f2b Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 29 03:41:34 2006 +0300 GetTimeInMillis: use correct units for clock_gettime Make sure we're treating the nanoseconds as a long, not an int, so we don't overflow. commit 51a06b3c44509c72279b5cfcf2b52b9a35c461b0 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 29 03:40:57 2006 +0300 WaitForSomething: only rewind when delta is more than 250ms Only rewind time when we're more than (original delta + 250ms) away from executing the timer. When we're walking the timer list, use a goto to iterate all of them from the start again, since timers may drop out of the list. Don't bother trying to be smart in TimerSet, we'll pick it up in WaitForSomething anyway. commit a34446f5b3d90714969a90583c49cb1eae1c9651 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Oct 27 13:43:43 2006 -0400 Add missing file to list in Makefile.am commit 92d04e746bd9b8ad3ee217c165ace20468e079cf Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> Date: Fri Oct 27 18:26:30 2006 +0200 Import libdrm functions for the drm memory manager. commit e3d3d29db5eef057b4e8294377c9c3147436bc2f Merge: 92387e99d 004d00e66 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 26 20:21:16 2006 -0400 Merge branch 'master' into my-XACE-SELINUX commit 92387e99d085b0b081fcedb2f20304eb0ac536b1 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 26 20:20:57 2006 -0400 Change symbol in libaudit library test. commit 196c5836f463c28f633bbba847f59acd5935359d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 27 01:27:31 2006 +0300 CoreKeyboardProc: annotate with FIXME Setting an empty keymap by default isn't wildly useful. commit f9a1e456f8a4eaa1a9c71fd0fe5231140975c22d Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 27 01:25:39 2006 +0300 CoreKeyboardProc: don't leak keymap and modmap SetKeySymsMap does a copy here, so try not to leak them. commit a5be65401769fabcb5001dc63035c69f9e4a2712 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 27 01:25:21 2006 +0300 mieqEnqueue: only compare DEVICE_BITS of deviceid Only compare DEVICE_BITS of the two deviceids, so we don't decide that a valuator event isn't for us, because (id | MORE_EVENTS) != id. commit 85212eb504f860b054eb0f0a5029fed86cb8d1c0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 27 01:23:58 2006 +0300 getValuatorEvents: make sure we put MORE_EVENTS in the right places Make sure we put MORE_EVENTS in with the device id if there are, in fact, more valuator events coming. commit 794f2e7291ccb4e48f9fbfc8f08302e3aac0f79f Author: Myron Stowe <myron.stowe@hp.com> Date: Thu Oct 26 20:38:58 2006 +0300 xfree86: re-enable chipset-specific drivers for Linux/ia64 Re-enable chipset-specific support for Linux/ia64, by linking in lnx_ia64.c. commit 8c0556e7cb1de8c387ddd886a03a8f8afff1fd0e Merge: cdc8a4b7b 004d00e66 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Oct 26 15:21:22 2006 +0300 Merge branch 'master' into input-hotplug commit 004d00e6689f452fc9fdf91f5ffc6d6aed697d54 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Oct 26 01:10:08 2006 +0300 GetTimeInMillis: simplify monotonic test We don't actually need to get the CPU clock ID, which means we don't need the monotonic_usable test. Since there's now only one branch, the compiler will treat that as likely, so we don't need xproto 7.0.9 anymore. The fallthrough to gettimeofday() is preserved. commit cdc8a4b7b2f099b8860a54c5c9f488e6f7c4913a Merge: 3da918a16 d28583329 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Oct 26 00:28:30 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit d285833290316cb5dd1e7f1e52c96be3e9cf21cd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 23:57:00 2006 +0300 GetTimeInMillis: spuport monotonic clock Add support for CLOCK_MONOTONIC from clock_gettime, and use that in GetTimeInMillis() if available, falling back to the old gettimeofday() implementation. This is _slightly_ faster on some 64-bit architectures, and _slightly_ slower on others (though barely measurable). commit d3e57faffee63df1424a209d0418d3a712f91ae6 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 23:55:43 2006 +0300 WaitForSomething: allow time to rewind If time rewinds dramatically, reset all the timers to fix their expiry. commit e21604914dccece6bc64c69b55512d1f1a969235 Author: Keith Packard <keithp@neko.keithp.com> Date: Wed Oct 25 09:48:23 2006 -0700 Merge master back in and clean up some unfinished code (closes 8745) commit becbda6d519a11c2c211afb8d46f9ea1a2676bc3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Oct 25 11:39:27 2006 +0200 Fix test for Option "IgnoreABI". This option has plenty of potential for wasting the time of bug triagers without pretending it's always on. commit 59511974db843fa7e11133894cfc10c20fdaf60f Merge: 054f8cd26 598ac7a83 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Oct 24 17:26:20 2006 -0700 Merge branch 'master' into randr-1.2 commit 598ac7a83698327b607084abaebcbd22f8d25fbb Merge: 828c34e83 948a97b97 Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Oct 24 17:23:12 2006 -0700 Merge branch 'origin' commit 828c34e83ccdf3bcd2844d5af8b0cac4164b04ab Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Oct 24 17:23:02 2006 -0700 Byte swap RRSelectInput enable flags. commit 3da918a16c8908fdfaf89f2a1bcaec19e01528a9 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 02:22:07 2006 +0300 mipointer: remember to update pointer location Update pointer location so it doesn't get quickly reset by the next pointer update. commit aabc087998e680c2fcf0ebc1c5022c1fe8f58f0c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 02:21:39 2006 +0300 GetPointerEvents: always ensure correct number of events Ensure correct number of valuator events are returned, and that we always increment events correctly. commit 65cd5aa4d754624566c2263015f1a018d137fce1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:12:45 2006 +0300 kdrive/input: remove unnecessary #ifdef XINPUTs Xi is now mandatory, so don't bother with the ifdefs. commit 0514d53e10b3521bb708a9cbde4bab525248eadb Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:10:44 2006 +0300 xfree86: remove motion history handling Remove motion history handling, as we now deal with this in the DIX. commit b1debebf8fe20ded20ba27e871fd1a6a9de029e3 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:10:20 2006 +0300 mi: remove mi motion history This is now unneeded as we do motion history in the DIX. commit b9e180e632d04bf685ade9e32bd0b20882794486 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:09:19 2006 +0300 port all users to the new DIX motion history API Port KDrive, Xvfb, and Xnest, as well as the virtual core devices, to the new motion history API. Make GetPointerEvents also update the history. commit 5b38eb69cdaa154791c7f74e35dbe4d3256b19bd Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:08:29 2006 +0300 dix: add motion history support Add motion history support (sort of based on the XFree86 DDX's implementation) to the DIX. commit 11fb58be77ac163844e494b2b0a260cf28a7ecd1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:07:36 2006 +0300 miscellaneous warning fixes Use the correct type for time, and fix the mi prototype of EnqueueEvent. commit 2a74b8a91da1a98669993078f7fe9081f2d743ce Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 25 01:04:53 2006 +0300 xfree86: re-bump input abi to 1.0, yet again commit 37d1fffe79c35ada056ce9a56292c000014fe48a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Oct 24 23:06:57 2006 +0300 inputstr: try to keep device structs the same size Try to make sure DeviceIntRec and friends stay the same size, regardless of whether or not XKB is enabled. commit 9f9ac01a819ee96fb5be5d7d346c91f461bf3979 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Oct 24 23:01:05 2006 +0300 inputstr: fix indentation commit 27d682fa030501611a5b52f41f29738134b45c0b Author: Ian Romanick <idr@us.ibm.com> Date: Tue Oct 24 09:04:14 2006 -0700 Fix from HEAD accidentally reverted during merge. commit 8b909135664abb69ada522e8e39495d9eca717ac Merge: 21291d6ca 948a97b97 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Oct 24 08:57:59 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/Makefile.am hw/xfree86/common/xf86.h hw/xfree86/common/xf86DoScanPci.c hw/xfree86/os-support/bus/linuxPci.c hw/xfree86/scanpci/extrapci.ids hw/xfree86/scanpci/pci.ids hw/xfree86/scanpci/pciid2c.pl hw/xfree86/scanpci/xf86PciStdIds.h commit 0cd6a3d8efb5cc1ce4f85ab95bcdf4fb66c7245d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 06:56:07 2006 +0300 xfree86/input: add proximity support, free valuators Re-add support for proximity events, and remember to both va_end our varargs, and free our valuators. commit cccf7ae0ff24d0c84b5144c457f3f86bbbc36e12 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 06:55:21 2006 +0300 GetProximityEvents: add (untested) function Add untested first guess at what GetProximityEvents should look like. commit 35fa4ac12b3da33f81e2a12bc9661ed075f323ed Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 06:23:45 2006 +0300 GetPointerEvents: break into separate functions Break out clipAxis, clipValuators, and getValuatorEvents, into separate functions, to be used by the proximity event code. commit a7c2d9a15dc2ff253bb69c3b0738ad993521b9c7 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 06:08:27 2006 +0300 kdrive: numerous warning fixes commit c8f76fb3a473a022d497bd0acd6c84f58fc6efbe Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 05:12:15 2006 +0300 xfree86/input: disallow pointer device changes, fix drag event calculation Don't allow users to change the core pointer. Fix xf86SendDragEvents to check the device button state, not the core pointer's. Remove unused xf86CheckButton. commit c5b5b046e86b159a9d32451308f38246cc4587f7 Merge: fab1d37ec 948a97b97 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:58:30 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit fab1d37ecbeee9777ad1485b0cc62b55042d5014 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:57:00 2006 +0300 xfree86/options: don't blindly dereference NULL pointers Sure, conf_idev should be initialised, but if it's not, try to make the best of a bad situation. commit 523fe64ba16cf7a40f4095432d81300726d83e8d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:56:28 2006 +0300 kdrive/lots of DDXes: make stubs use KdOsAddInputDrivers() In theory, removing LinuxPciScan should make these drivers OS-independent. commit 57f98e2b72d5c7fea93a9f6da86228ffb4856bf3 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:55:41 2006 +0300 kdrive/tslib: port to new absolute API, remove debugging Port to new absolute device (not touchscreen) API, and remove some leftover debugging. commit a6dc629052f0ad509cfa30e98217043a63c09552 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:54:59 2006 +0300 kdrive/os: add KdOsAddInputDrivers Add KdOsAddInputDrivers, which adds all relevant input drivers. Could possibly be refactored to KdAddInputDrivers, which called through OsFuncs to a new function, if it existed. commit ac240b00ff6fc354c1aa641406ae8b49244c0b8b Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:54:07 2006 +0300 kdrive/input: use Absolute instead of Touchscreen Adjust to suit Zepheniah's new absolute device API. commit b1ba4b3e8ad427af1fa8618b0bd839f741ec2ce3 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:53:15 2006 +0300 kdrive/neomagic: include vesa.h, use DebugF commit 29f28dd1a8a7ed07e945a67946e3510f4b32d12a Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:52:52 2006 +0300 configure.ac: add XSERVER_LIBS to XNEST_LIBS commit 2f33f4065d89ae2b6fdda43c7105d72f89920cae Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:52:35 2006 +0300 Xnest: port to new input API Port Xnest to Get{Pointer,Keyboard}Events, plus the new mieq API. commit 08928afb0500d46b0caa0a1d1244dee2ed80e6a0 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:51:52 2006 +0300 Xnest: disable XKB, reshuffle code Disable XKB, as we can't yet use it; move Composite disabling to ddxInitGlobals, along with XKB. commit cd3b16a57efaf89108054f18a94c91e2dd74fafa Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:51:13 2006 +0300 Xvfb: port to new mieq API commit bf4df9b73f0c1a84093aaf9a2e2cbc56fb341c60 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:50:53 2006 +0300 include: move POINTER_* flags from inputstr.h to input.h Given they're just numeric constants, they should be included in input.h, not inputstr.h. commit 4dd91c45abea9fb561a5acb10290e29487df6722 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:50:03 2006 +0300 miinitext: Xi and XKB are not hardware-only extensions Xi is now a required extension, and XKB can be used without hardware, so include them both when NO_HW_ONLY_EXTS is defined. commit 562096a012f4bb8f44d5ec6320a32f4010c189e4 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:49:22 2006 +0300 XkbCopyKeymap: increment shapes and outlines when copying Remember to increment the source and destination shapes when copying, instead of just endlessly copying the first one. commit eec182259112fba240751f974f7e5ca09fce8b9d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 02:48:30 2006 +0300 dix/getevents: move SyntheticMotion to getevents.c Mostly, this is just a cheesy hack to ensure that getevents.o gets included when linking. Sigh. commit bc701a14292da5abfb601e3a040651a74f46df8f Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 23 00:08:32 2006 +0300 dix/getevents: cosmetic cleanups, remove keymap copy from GKVE Remove keymap copy from GetKeyboardValuatorEvents, as SwitchCoreKeyboard now takes care of this for us. Remove unused variable and function prototype. Update comments to be as informative as possible. commit b03e2f7029506640a8fe5cb88818b329c23503ff Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 19:56:49 2006 +0300 xi: fix NIDR return yet again For a one-line function, it was pretty broken. commit 90de7ce25a84cfe6c6790f9af2bc2399d25b9b9c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 19:54:36 2006 +0300 xi: fix return type for NIDR commit f46dc272913ffb6b5b234a7ec6f4ba5cae44a831 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 19:51:35 2006 +0300 xi: add NewInputDeviceRequest to stubs commit 31a6307b7ba5adaa96deb8101ddfcda0262f537d Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 19:49:31 2006 +0300 xi: change DEVICE_TOUCHSCREEN to ABS_{AREA_CALIB} for stubs commit eae6594d03a606ddf1f433b5897b5938aa940c1e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 16:39:44 2006 +0300 Xi: swap control in DevicePresenceNotify commit be21630164e865eca72ff2a686a38ae4e30fd79c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 16:33:02 2006 +0300 dix, Xi: make use of deviceid in DevicePresenceNotify Use the deviceid and control fields in DevicePresenceNotify since the last push to inputproto to send a DPN whenever a control changes on a device. commit f08b6b2367705cb5b60e996e6328197430bf1919 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 22 12:30:02 2006 +0300 kdrive: change DEVICE_TOUCHSCREEN to DEVICE_ABS_{CALIB,AREA} commit 77e724585f6c53feb55475b94d8cfcb6acf1159b Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 20 00:44:46 2006 +0300 minor formatting fixes commit 948a97b97e93cee05a23f1f1ae699c5e181bc8ce Author: Drew Parsons <dparsons@debian.org> Date: Sat Oct 21 23:09:22 2006 +1000 Minor typo fix to xorg.conf man page. commit 04554a3adcddc32de5fdb0b3122da0bcdd4c24a9 Author: Drew Parsons <dparsons@debian.org> Date: Sat Oct 21 22:06:43 2006 +1000 Minor typos in Xserver man page. commit e26a494f417c3c700636ee68892c3015b2e0f27a Merge: 736b0d507 aeba855b0 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sat Oct 21 04:26:14 2006 -0400 Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 736b0d5078597abbda80444deef852879260af90 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sat Oct 21 04:24:49 2006 -0400 DEVICE_TOUCHSCREEN becomes DEVICE_ABS_CALIB. Update the DEVICE_ABS_CALIB stuff to include the new elements. New DEVICE_ABS_AREA support. dev->touchscreen becomes dev->absolute, with _CALIB and _AREA stuff in it. Update xfree86 to compile with this, kdrive needs an update too. commit edd5f1745461f995670969cb736d1569ca94643f Author: Carl Switzky <Carl.Switzky@Sun.COM> Date: Thu Oct 19 17:30:54 2006 -0700 Add ast driver/device info to Xorg server & config utilities commit aeba855b07832354f59678e20cc29a085e42bd99 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 20 00:30:28 2006 +0300 move keymap copy to event processing, from enqueuing Move the keymap copying to event processing time (in ProcessInputEvents), instead of being at event enqueuing time. Break SetCore{Pointer,Keyboard} out into separate functions. Change mieqEnqueue to take a device pointer, that asks for the _original_ device associated with this event. commit a8d3dad9d9f2b9053843e655abe463a68ba8dcb7 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 20 00:28:40 2006 +0300 xi: add DEVICE_ENABLE control Add DEVICE_ENABLE control, which allows runtime enabling and disabling of specific devices. commit b0780312d80ea4af0136227f90fdd7ada3db71c5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Oct 19 13:51:53 2006 -0700 Pre-release message should tell users to check git, not CVS, for updates commit c5dc997baf57ffa08025efadbbaf761296ce4bc4 Author: Joshua Baergen <joshuabaergen@gentoo.org> Date: Thu Oct 19 11:14:26 2006 -0700 Create xorg.conf.example (Gentoo bug #138623). commit d029c8f1b72019446a5c873f55ffa43504b03dfb Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Oct 18 18:11:06 2006 -0700 Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris commit a8a0abdbea0573c861a5af9d58f3ce66790455ca Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Oct 18 10:59:07 2006 +0300 config/dbus: always unref the connection, not close commit 80642f37d40216035786eaf490952d16f6b5f597 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Oct 17 14:53:28 2006 -0400 Stop building xorgcfg by default. commit 5e17cde27b064174584d478130b0f95dcef78deb Author: Matthias Hopf <mhopf@suse.de> Date: Tue Oct 17 17:06:44 2006 +0200 StorePixels() macro could create invalid *x++=*x... code - fixed. commit 205c6788d7a34704e36b23f1a93d89e9b986266a Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 16 23:48:09 2006 +0300 config/dbus: properly initialise vtable Properly initialise the vtable, so we don't end up with an unregister_function pointing to god knows where. commit 85ac2f16abe9f6e88b4e71609da334d336a9a600 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Oct 16 12:39:05 2006 +0100 Small modification to blocking signals when switching modes. commit 0901eec87ee9f3a2a067695bdbd569ff42149879 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Oct 15 16:57:09 2006 +0200 Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. commit a232693c8c2a206aac47c07b133c071938204e0b Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Oct 15 16:48:59 2006 +0200 Add per-drawable Xv colour key helper function. This allows overlay Xv adaptors to work slightly better with compositing managers. Bump the video driver ABI minor so drivers only need to check for this at build time. commit 5563861ab7e56ec891cfce6b34af43fec53ccee3 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 13 19:05:28 2006 -0700 Make sure xorgcfg files are included even when dist made with --disable-xorgcfg commit e1dd1904c6c7ce33f347d822272831d54a6497c8 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Oct 19 13:51:53 2006 -0700 Pre-release message should tell users to check git, not CVS, for updates commit 62d24097932708fbbb62a23614fe63b4b7acf3bd Author: Joshua Baergen <joshuabaergen@gentoo.org> Date: Thu Oct 19 11:14:26 2006 -0700 Create xorg.conf.example (Gentoo bug #138623). commit 357b37b3826fa6e9878c0bd895164259c2ed3c0d Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Oct 18 18:11:06 2006 -0700 Use getisax() instead of asm code to determine available x86 ISA extensions on Solaris commit 1b1698af41b9038d9f9dbf521737d0baab5a2237 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Wed Oct 18 04:57:22 2006 -0400 Pass SetDeviceValuators down to the driver. NOTE: This changes the LocalDeviceRec struct, which breaks input drivers. commit 5eca750fe2f3f243fb352271ad8da196af0cb16a Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Tue Oct 17 14:53:28 2006 -0400 Stop building xorgcfg by default. commit df979b75c8cd8a7e0566aea58031bb9b8f5cd3d3 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Oct 17 17:06:44 2006 +0200 StorePixels() macro could create invalid *x++=*x... code - fixed. commit d430e76a161c963169067875c3654f5fd8f42b19 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Oct 16 12:39:05 2006 +0100 Small modification to blocking signals when switching modes. commit 6dd4fc4652f942724039dc2317c560ea7276ab59 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 16 00:22:00 2006 +0300 xkb: fix virtual modmap size computation Compute virtual modmap size bounded by nVModMapKeys-1, rather than nVModMapKeys. This is sort of a best guess. The other way seems a little more logical, but also leads to segfaults pretty quickly if you hammer GetMap hard enough. So let's try this one. commit a484ba15277e66e7ef9b21b238dcbf760695bc63 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 23:47:34 2006 +0300 XkbCopyKeymap: copy server vmods, and name atoms Copy server->vmods, and all the atoms in names. commit ad355fecee3965be576596aeed5da54d776edf1d Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 21:59:06 2006 +0300 xkb: make sure we set the map on the right device, not necessarily core Forgot that all XKB requests took a device spec: the comparison of 'if working on the core keyboard, does this device send core events; or, is this device the core keyboard?' was broken. Instead, what we want is 'if working on the core keyboard, does this device send core events; or, is this device the one we're working on?'. commit 4ae7745a0dc86de6346409a69c1e396e0b954514 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 21:48:01 2006 +0300 xfree86 input: always open devices on NewInputDeviceRequest commit acd8419948003032056a56d46adbef7c35e7739c Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 20:42:31 2006 +0300 config: unref connection, don't close it Just unref the connection instead of explicitly closing it (thanks, Rob McQueen). Add a commented-out unregister_object_path call: unfortunately, when we call it, libdbus segfaults. But if we don't unregister the path, we can't register it again. So regenerations are broken either way, but a little less violently like this. commit fc9b5f84b244ea08480b73bd15ac919b875800fb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 20:01:01 2006 +0300 dix/devices: add devices in proper forward order Add devices in forward order with the normal linked list convention. Previously, AddInputDevice would add all the devices in reverse order to off_devices, before they were added again in reverse order to devices with EnableDevice. This just makes both work in forward order, which provides the ordering as you'd expect when hotplugging devices (i.e. adds them to the head, not the tail). commit ec35e7198debf938f1115f584e675ce5995743e3 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 15 19:44:49 2006 +0300 config: add replies and dbus api documentation Add replies, which use standard X error values, to the two currently-supported input configuration requests. Document the D-BUS API we use. Make sure we free everything when we encounter an error. Add a _source option to all incoming requests, noting that it came from a client. Reject all requests to add a device where an option name contains an underscore. commit 7e4717683d6c08d1e490a60b7493a94bbc57bf8d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Oct 15 18:12:28 2006 +0200 exaDrawableDirty: Fix initialization of BoxRec. This will hopefully fix the partial window corruption experienced by some people. commit 3ad1642f1bbaa5f96558cdf3384b40f7122f8781 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Oct 15 16:57:09 2006 +0200 Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. commit f9bfee50981006a2c58d3f73e2b0d123bb2a41b7 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sun Oct 15 16:48:59 2006 +0200 Add per-drawable Xv colour key helper function. This allows overlay Xv adaptors to work slightly better with compositing managers. Bump the video driver ABI minor so drivers only need to check for this at build time. commit a05044cfc14a8bc6cc31236dcecada60bec09924 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 14 22:14:56 2006 +0300 xkb: better support of XkbDfltXIId XKB.h specifies that XkbDfltXIId should be used where the client doesn't care about the device identifier. We take this to mean core devices, where practical. commit 4d8030076ed1a7680bdfcb7b89af1045bdc40304 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 14 22:14:07 2006 +0300 dix: move GetKeyboardEvents/GetPointerEvents to a new file, export symbols Move GKE and GPE to a separate file, to help stem the events.c explosion. Mark GKE/GKVE/GPE as _X_EXPORT. commit 6afc7c284690b1e2bb7544b5bc4f31a3f6a05519 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 14 15:54:35 2006 +0300 dix/devices: remove XACE merge debris commit 93302452e737bd91a893eb495592538d40d921e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 14 15:54:12 2006 +0300 XkbCopyKeymap: add geometry support Add a first cut at geometry support, which seems to generally work. commit b9108a13fc126d97c0393f911a1d9292563444ce Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 13 19:05:28 2006 -0700 Make sure xorgcfg files are included even when dist made with --disable-xorgcfg commit 054f8cd2675a80b14bc1ce266377fcfee2335cee Author: Keith Packard <keithp@neko.keithp.com> Date: Fri Oct 13 17:34:53 2006 -0700 Limit pointer to valid crtc areas. Add event swapping. Fix change tracking. Add function to keep pointer within valid crtc areas. Finish event delivery and swapping code. Separate configuration from layout changes to send correct events. commit 335b503c5e7041bb0c44611e496d1c46f554e630 Merge: bd3d93be8 cf948b7b0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 13 18:10:45 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit cf948b7b04dfeb61a294889027b9a54f6b9b478e Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 13 14:48:10 2006 +0100 Block IO on switchmode just as we do for VT switching to avoid cursor movements signalling io. commit 4b53a5e4b147ab748b28dffc1d330b7148d8efa6 Merge: 23f6f08b7 042d4a407 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 11 20:50:31 2006 -0400 Merge branch 'master' into my-XACE-SELINUX commit a6df780e4d3f90cc699b0b864bade03d6f15afd7 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Oct 11 15:41:22 2006 -0700 Fix bug #8608. Regenerate files based on recent commits to Mesa (that fix Mesa bug that return pixel data. commit 042d4a407d0eca9131d0420b0b9189559aac326d Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Oct 9 16:32:11 2006 -0700 Bug #8459: Don't forget to include AM_CFLAGS in libfb_la_CFLAGS on non-MMX platforms. Reported by Edgar Toernig. commit 1b94c117e0f294ef2f89bf24d45ba7a8e45efe35 Author: Matthias Hopf <mhopf@suse.de> Date: Tue Oct 10 19:37:22 2006 +0200 Fixing probably long-standing bug in domain support. commit 6776c0f0e9677a65ec36ceef9618ff701b99596c Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Oct 9 17:24:37 2006 -0700 Use bash on Solaris to run symlink-mesa.sh symlink-mesa.sh won't run with Solaris Bourne Shell (/bin/sh) so explicitly run it with /usr/bin/bash instead (cherry picked from cde68728860179dc84e615ccb378ce992513fd62 commit) commit bd3d93be82d91e4cf35ae317dfd658d1706257ea Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 23:21:12 2006 +0300 xkb: remove random broken vendor workarounds commit 33406da096b4ae21134484113b280e07d0c8f0d9 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 23:20:56 2006 +0300 GetKeyboardEvents: add first_valuator argument to GKVE commit ef7e05e9de57b9c9c27ed3307eede6d8fc6c1af3 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 21:42:15 2006 +0300 xfree86/xinput: pass first_valuator params, don't clip to first screen bound Pass first_valuator to GetPointerEvents/GetKeyboardValuatorEvents. Don't clip axis bounds to that of screen 0 when initialising axes. commit 1546a398144619a14ff06aaf84ebc1bf293eac66 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 21:40:53 2006 +0300 GetKeyboardValuatorEvents: also take first_valuator param Take a first_valuator parameter, which specifies the first valuator. commit b05a11478edc7e6d1e38ef7f8d6788c7bd917493 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 21:23:12 2006 +0300 doc/extensions: rename to c-extensions The old name could be somewhat confusing. commit 41bb9fce47f6366cc3f7d45790f7883f74289b5a Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 20:34:32 2006 +0300 mipointer: take device arguments, split miPointerAbsoluteCursor Update mipointer API to take a device argument to (almost) all functions, and split miPointerAbsoluteCursor into a couple of separate functions. Remove miPointerAbsoluteCursor call from mieq, as we now deal with it in GetPointerEvents. Make miPointerSetPosition (successor of miPointerAbsoluteCursor) take pointers to x and y, so it can return the clipped values. Modify callers of miPointer*() functions to generally use the new functions. This should fix things with multi-head setups. commit be8dfafd1d58b27bbfd953fc1216311523353db1 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 20:32:16 2006 +0300 warning cleanups Fix still more warnings. commit ca474e0920dd29ebe7ccf346cddc526732ad01ba Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 20:30:49 2006 +0300 Xi: move SendEventToAllWindows and FindInterestedChildren to exevents Move SendEventToAllWindows and FindInterestedChildren from chgptr to exevents, so the DIX can more easily use it. Clean up two warnings (type mismatch, unused variable) in exevents.c. commit c2fab469b66f2796c541e911202faa411d116b04 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 18:26:26 2006 +0300 dix/devices: clean up debugging commit 4493acb88c59721f7807093a3ed3c39396c2076d Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:51:03 2006 +0300 xkb: add FIXMEs to procedures which need to act on all core devices Add FIXME comments above request handlers which need to act on all core-sending devices if called on the core keyboard. commit ef68273f5bdb27a492ec0b69548ec4fbede46c08 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:44:37 2006 +0300 mi/mipointer: deprecate functions which don't take a device Deprecate all mi pointer functions which don't take a device argument, and replace them with versions which do, in preparation for MPX. commit 6eab4c55890660089067da0e944256b1ed3a8c67 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:24:33 2006 +0300 doc/extensions: document C extension use in the X server commit 80cdd26581508dd17c5d0a5739cd540113996bbb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:23:54 2006 +0300 mi/pointer: mark public pointer functions as deprecated Deprecate miPointer functions which don't take a device pointer. Pointer movement should be handled through GetPointerEvents, and functions which take a device as an argument (e.g. miPointerPosition) will be added. commit 97030b6c6b0fb6ff629ae31e483704d0a2207a53 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:07:05 2006 +0300 config: fix compilation Accidentally built with --disable-config, didn't notice that the previous commit to clean up the debugging broke things horribly. commit 14b157bdb1f2cd5feba03ba0815d7c5b2dd6633f Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 17:04:12 2006 +0300 include: actually declare DebugF DebugF is ErrorF when DEBUG is defined, else a no-op. commit 9e37de193f5d7412ffd8de76d5eed0158c0a3609 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 16:32:15 2006 +0300 configure.ac: reactivate warnings when building with gcc We were inadvertently stomping XSERVER_CFLAGS after adding the warnings, so move them after we do that. commit b559cbb1601f93cb03ea3dcfb2c5ca94ee6b73bb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 16:23:14 2006 +0300 dix/CoreProcessKeyboardEvent: remove debugging for every key event Also change #ifdef DEBUG/ErrorF/#endif to DebugF in FixKeyState. commit 3ae4d250185e71a0a218c062426f92b9b1adbf05 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 16:20:42 2006 +0300 xfree86 Xinput: remove still more excessive debugging There isn't any more debugging left for input events in the XFree86 DDX. commit 58314756aeecbb8fb04706c3e04d98e9ac531a02 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 16:18:05 2006 +0300 GetPointerEvents: add first_valuator parameter Add a first_valuator parameter. Looks correct by inspection, but untested with first_valuator != 0 as yet. commit 84f5d2291c1fe92fd8358e999e909bf3aab86c98 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 15:30:24 2006 +0300 GetPointerEvents: fix relatively harmless typo Change !(cp->button || !cp->valuator) to (!cp->button || !cp->valuator). commit cfc3e9ede2dc83741bd38bf3df13f096ecb8adc0 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 15:27:52 2006 +0300 config: remove excessive debugging commit 8d8e7f8bae4099f9e90ef9aac687607dae1d32bf Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Oct 8 15:26:54 2006 +0300 kdrive/input: remove excessive debugging in NIDR commit 22a836fafd39a8ef413826dc2c94bc5f96990e2d Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Oct 7 14:16:51 2006 +0300 xfree86/loader: bump input major ABI version Bump input major ABI version to 1.0, since we removed the OS keyboard layer. commit 4c342246300e06bdf5c9c62cc1d2f6aa57a524db Merge: 8382234a7 49a70c857 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Fri Oct 6 18:01:13 2006 -0700 Merge branch 'XACE-modular' commit 3686cd0fbf56d883f2f3b3fda11ffba1058b74e4 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 6 17:20:42 2006 +0300 xkb: make XkbSetControls work on all core-sending devices commit 7b4dc171b036107cfba87a1a16bf692b982005a5 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 6 16:26:54 2006 +0300 xkb: remove unused #ifndef commit ab56f0c5b516269bb99ae8b5f479e49e61a3af76 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 6 16:12:36 2006 +0300 xkb: simplify core device loop in GetKeyboardByName commit 4b6e2f12f7296e17b2850f36b3adcf8156125cbe Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 6 16:08:21 2006 +0300 xkb: make LatchLockGroup work on all core-sending devices Apply the settings to all devices sending core events, if we're working on the core keyboard. commit ebf9b3bbbb04acb78cdf8a84e47a96755fbfe854 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Oct 6 14:17:59 2006 +0300 xkb: update all core-sending keyboards on GetKeyboardByName Update the keymaps of all keyboards which send core events on GetKeyboardByName; still a few other procedures which need this treatment. commit 1178796a4dff5ebf0bd9fb3cacb35be9709b41e5 Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Oct 5 22:31:35 2006 -0700 Add preferred modes for each output. Round vrefresh. Deliver crtc events. commit 23f6f08b7b5c9a4297fd223d232a7e9f45376550 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Oct 5 16:07:26 2006 -0400 Improve error handling, messages during initialization. commit de63a469dcd0a8ae98554bca540ac0106cccf2a5 Merge: 9c7440bdf 8382234a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Oct 5 20:29:19 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit b4659faf9b455b44ac8e691cc7a8fc00a967c80b Merge: c4f30c635 8382234a7 Author: Keith Packard <keithp@neko.keithp.com> Date: Wed Oct 4 14:46:04 2006 -0700 Merge branch 'master' into randr-1.2 commit df351f1efbcc95f94c719fcf993c480155c511e9 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Oct 4 16:23:35 2006 -0400 Experimental window property holding security context. commit c4f30c63538e1451f15ed1991439869127d9b148 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Oct 3 21:06:11 2006 -0700 Add mode origins and output options. Fix memmoves in resource free funcs. Output options and mode origins both affected driver ABI. memmove mistakes were causing 'Freeing resource which isn't there' messages. Prune unused non-user defined modes from available list now. commit 8382234a7f318057de66490299d63807cefb5201 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 3 17:49:48 2006 -0700 Update pci.ids to Tue 2006-10-03 daily snapshot commit 96edf7b853c1045d12d957a2957a11879100a2de Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Oct 3 17:48:50 2006 -0700 Don't insert RCS tag into generated pci id header files commit 75e0cc41b201b9ceb2615e7cec0dd5b4c136b343 Merge: 6926776f0 20c0ceedf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Oct 3 13:58:03 2006 -0400 Merge branch 'my-XACE-modular' into my-XACE-SELINUX commit df800d87e04ce984a8a9ab4252ac6478ab1e4426 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Oct 2 11:28:47 2006 -0700 Add (void) casts to clear compiler errors about ?: results having type mismatch commit 9c7440bdf5a4ecd113e102004c804a2ba354c422 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 2 20:58:33 2006 +0300 xkb: remove the world's most staggeringly broken vendor workaround Certain versions of LynxOS needed to sleep up to five seconds for closing a pipe to actually, y'know, be useful. commit d7c89c7c1c8c1e110345d9d8d300adbf5fe5804a Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 2 02:15:36 2006 +0300 symlink-mesa.sh: expand *.{c,h} commit d6ea96b13e2ea01c51998c41ae2a3677bdedf61c Author: Ivan Pascal <pascal@info.tsu.ru> Date: Mon Oct 2 02:17:14 2006 +0300 xkb: fix wrapping when switching between groups Use XkbCharToInt as that's what we're doing. commit 3c98cebb6e954855528794fec46830f456cbdec1 Merge: fa1ac9417 2cf109843 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 2 02:18:17 2006 +0300 Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit fa1ac94178cf976d4c8dae9a4dc8703303a62d4b Author: Ivan Pascal <pascal@info.tsu.ru> Date: Mon Oct 2 02:17:14 2006 +0300 xkb: fix wrapping when switching between groups Use XkbCharToInt as that's what we're doing. commit c31672e6aab168262bd7824a8082ecdf841fc3c0 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Oct 2 02:15:36 2006 +0300 symlink-mesa.sh: expand *.{c,h} commit 2cf1098436d6b4382d9ed3f6b88214d37bdd8ddb Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Sep 30 17:05:46 2006 +0300 dix/events, mi/eq: remove utterly ridiculous debugging Remove debugging which can cause long-lived Xorg logs to grow well above 1GB if built with --enable-debug. commit 20c0ceedfbce9ae5c70703900b52973917ac4cd0 Merge: 49a70c857 84eb2c0a0 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 29 15:37:00 2006 -0400 Merge branch 'master' into my-XACE-modular commit 518db35ca3f569e7cb95dbddeddb93f3691de498 Merge: 5d99e05f0 84eb2c0a0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Sep 29 00:35:21 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 5d99e05f05a42a82a9f02844df9bfebaa673759d Merge: ad631afcf 589337578 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Sep 29 00:35:07 2006 +0300 Merge branch 'input-hotplug' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit ad631afcf3fbc74024cddaaacd05d38addc047a2 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Sep 29 00:34:23 2006 +0300 make core keyboard/pointer map functions act on all core-sending devices Make Set{Keyboard,Modifier,Pointer}Mapping act on all devices which send core events. Change LegalModifier to accept a DeviceIntPtr. commit 84eb2c0a06de60e88e14bb03fabe661d7cd8f1d3 Author: Brian <brian@yutani.localnet.net> Date: Thu Sep 28 15:09:40 2006 -0600 Replace hard-coded filesnames with loops (all .c and .h files). Should fix problems with Mesa adding/removing source files, for the most part. Patch by Dan Nicholson. commit 4bc5dc2854e33bf343cdea44a3c3b4c41f6f4145 Merge: cf6e9687f f9542e749 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Sep 28 13:27:13 2006 -0700 Merge branch 'wfb' commit f9542e749544c7a3084fd72ecc6642ca3262f7c7 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Sep 28 13:26:54 2006 -0700 Restore the global xx* symbols and add them to wfbrename.h. I don't think they're ever used, but it's best to just leave them alone for ABI compatibility. commit cf6e9687ffcc52af0d64e9098186570719a575a2 Author: Jeff Smith <whydoubt@yahoo.com> Date: Thu Sep 28 15:34:17 2006 -0400 Bug #8449: Yet another Mesa symlink script resync. commit a5d639cd87f30f9b3d765352d27253940f33b2b7 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Sep 27 16:15:27 2006 +0300 remove merge detritus commit 2206a92a97901977910a6e39b4174ca805f9f4a7 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 30 19:15:55 2006 +0200 Push information about cliprects of DRI windows to the DRM. commit 54d371e7a4ebab79a0f616669e2f601d8370cef3 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Aug 30 19:12:17 2006 +0200 Add wrapper for new ioctl to update drawable information in the DRM. commit ad321fad4b9ab3a2c70cfff37ca6c8faaa5cce9c Merge: 5e9d33fe8 f7c1d9424 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Sep 24 17:56:43 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit f7c1d942416db8d0d4c5a21f5ece1ccacb926b69 Author: Brian <brian@yutani.localnet.net> Date: Sat Sep 23 10:38:10 2006 -0600 Check for visual==NULL in dmxBECreateColormap() before calling XCreateColormap() to prevent potential segfault. commit 945b7c63946f5257d0f9b0dcf2f8f4882fb2c6f8 Author: Brian <brian@yutani.localnet.net> Date: Sat Sep 23 10:35:25 2006 -0600 The fbcmap.c file used by Xdmx _must_ be compiled with XFree86Server defined. Otherwise, Xdmx generates a slew of protocol errors. commit 891e9c3e6cbd0869a57395b96c8e18ff522c2bb4 Author: Brian <brian@yutani.localnet.net> Date: Sat Sep 23 10:28:24 2006 -0600 Replace broken DMXDBG3() with DMXDBG2() commit a10039a100dfe5f87e29e9cc4fa656176e0890f9 Author: David Nusinow <dnusinow@debian.org> Date: Thu Sep 21 23:58:32 2006 -0400 Allow the xfree86 ddx utils to be optionally built. Patch by Eugene Konev. commit ce78b0cd2b1c35d60eb5683a1d00222aa4797c79 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 21 20:42:47 2006 -0400 Close with Pclose() that which we open with Popen(). commit c1655f0fd457f9bdf0857c5e0904639925bb01f1 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Sep 21 14:45:17 2006 -0700 Bug 8386: Grow parser buffers to fit an entire line if it's longer than CONFIG_BUF_LEN. commit b36fde9257263fa502147df37e8331184c323e14 Author: Keith Packard <keithp@guitar.keithp.com> Date: Thu Sep 21 09:52:04 2006 -0700 When no mode is specified, don't validate mode-specific parameters. commit 8b4ed47c5d39f219866e3c72fa973c6fc4c70f18 Author: Drew Parsons <dparsons@debian.org> Date: Thu Sep 21 22:19:44 2006 +1000 * Install Xprint's Xsession script to $(sysconfdir)/X11/Xsession.d * Removing outdated references to CDE and dt, rename script to 92xprint-xpserverlist. commit 219546fd76750f358ffb6738f17b9237c58c15a6 Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Sep 20 22:43:05 2006 -0700 Steal Xinerama code from SiS driver. Add missing files. Provide a Xinerama implementation when DIX version isn't enabled. This version exposes each crtc as a separate 'screen' and reports the size of that patch. The extension also sends ConfigureNotify events to the root window whenever crtcs change so that applications will re-fetch xinerama information. This actually works for metacity. commit bde0a4c12cb393a6d7f1552b067624da1b0502ae Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Sep 20 19:42:34 2006 -0700 RRSetCrtcConfig status fix. RRGetScreenResources timestamp fix. RRSetCrtcConfig was returning the wrong status values. RRGetScreenResources was always returning currentTime. commit d812f486a01a6276aed7b4ebd3cd8eb8ddfe10d3 Author: Donnie Berkholz <donnie@supernova.(none)> Date: Wed Sep 20 15:39:39 2006 -0700 Really fix sparc on 64-bit kernel/32-bit userland. Commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba used a sparc64 ifdef instead of sparc. But for 32-bit userland, __sparc64__ is not defined so the wrong code is used. commit 09f7499851bd2f2eba1e30460c61c7a82ed9e853 Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Sep 20 13:15:20 2006 -0700 typo commit 9f870e0aa1ada238d6a0cd099996e8c47f6ba1d9 Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Sep 20 13:14:53 2006 -0700 When setting output state, leave output unchanged when setting to current. commit d16e83413e7e06adebd629d04de57bbedd8c3765 Author: Aaron Plattner <aplattner@nvidia.com> Date: Wed Sep 20 12:47:17 2006 -0700 Hide or rename more global symbols to avoid clashes with libfb. Rename composeFunctions, xxSetup, and xxPrintVisuals. Hide the other xx* symbols by making them static. commit d08718d8fd31477e90f13b9e122504c515b46ee0 Author: Keith Packard <keithp@guitar.keithp.com> Date: Wed Sep 20 12:05:52 2006 -0700 Avoid calling xalloc(0). Change rrScreenSizeSet to rrScreenSetSize. commit ef1f3248cb5fff0a02c0059f865c4d931eba23a6 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Sep 19 22:48:54 2006 -0700 Split out 1.0-style info and new property routines to their own files. commit 07112adb0802d28488de5a495aa61bb3cfc280b6 Author: Keith Packard <keithp@guitar.keithp.com> Date: Tue Sep 19 00:46:27 2006 -0700 RRGetScreenResources and RRGetOutputInfo are working now. Removed separate id field in RRModeRec. Pull screen subpixel order from Render extension. Implement RGetScreenResources and RRGetOutputInfo commit afe5e9483b352ed06075ed68a6ffa50799194e2d Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Sep 18 12:18:22 2006 -0700 RandR working with old clients and old API. commit 2be1ac15aee592782d7693b8de2c3815478a094e Author: Keith Packard <keithp@guitar.keithp.com> Date: Mon Sep 18 12:11:18 2006 -0700 Remove smashing of CFLAGS from server build. CFLAGS is a user variable, extracted from the environment at configure time and settable by the user at build time. We must not override this variable. commit bf07893947cfca945598e194ed416fda6162b11c Author: Keith Packard <keithp@neko.keithp.com> Date: Sun Sep 17 23:03:23 2006 -0700 Split out RandR dispatch code from randr.c to rr*dispatch.c. More disassembly to ease ongoing development. commit 3e745745fecef1cb59e53bde52ded311b51e1dac Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Sep 16 23:21:37 2006 -0700 Split RandR implementation into separate files. RandR is getting too big to live in one file; split into one file per object type (crtc, mode, screen), leaving the rest of the code in randr.c. Code is slowly approaching the point where it will drop-in as a replacement for the old 1.0 implementation. commit d17fb9672e238a089e463ac74cc4cd3325b67e1f Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Sep 16 21:44:42 2006 -0700 Start moving to new randr 1.2 definition commit 8dec74321d916f204f8182f1b93a65defbe50e78 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Jul 17 14:43:07 2006 -0400 Successful legacy RandR API/Protocol emulation for query. These changes clean up minor errors to make it possible to list the available modes for a monitor using legacy APIs in both the X server DDX and RandR protocol. Setting modes is untested, so it probably doesn't work. commit cab3a0145f2483fe43b5db5f5dd2076db9757fe5 Author: Keith Packard <keithp@neko.keithp.com> Date: Mon Jul 17 01:21:11 2006 -0400 RandR: New data structure, old API. At least it compiles now commit d95c758630f4aacec339a7ec80d2c4a9d7de1e4a Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 1 19:46:38 2006 -0700 Preliminary RandR 1.2 work commit f057de4f73fa593fa3fc5f05f65b89e76273b158 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Sat Sep 16 03:49:11 2006 -0400 Don't install librac.a. Thanks, automake. commit 6926776f0ecd1e8e81c5c40ccd3a97227bc44dcb Merge: 6950267dd 49a70c857 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 15 15:28:13 2006 -0400 Merge branch 'my-XACE-modular' into my-XACE-SELINUX commit 49a70c8570b03aff8239324a2474918a6fbc52a0 Merge: d1110c5c8 05231e336 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 15 15:26:57 2006 -0400 Merge branch 'master' into my-XACE-modular commit 46af6d1e953f1eefb6edbba3d29fb9700e42c2bb Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:28:44 2006 -0400 Always believe the monitor when it reports a reduced-blanking mode. CVT reduced blanking modes are typically only seen on digital connections to LCDs, but there are some monitors that report them as supported over the VGA connector too, which is perfectly legitimate, electrically speaking. commit 63acf18b7e4ce3a9f7deab3a9088a1c41cab0191 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:26:37 2006 -0400 In xf86MatchPciInstances, fail gracefully when there's no PCI device at all. This allows the autoconfig logic to fall through sanely on non-PCI machines, which importantly includes Xen virtual machines. commit a8f9936f55c5364bb02e8c3187507eb1f70e2ef2 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:24:41 2006 -0400 Prefer driver-provided modes when matching name strings to modelines. Well, kinda. Strictly we prefer M_T_BUILTIN strongest since those are modes where the driver has said it absolutely can't do anything else (VBE). Then we look for user-defined modes, ie, modelines from the config file. Then we consider modes reported by the monitor via EDID. Finally if nothing has matched yet we consider the default mode pool. Within each of the above-mentioned classes, modes with the M_T_PREFERRED bit take priority over other modes in the same class. This logic ensures that the timings sent to the monitor exactly match the timings it reported as supported, which occasionally don't match the numbers you might get for that mode from CVT or GTF. commit 81ef1b6d6063c20db4963abf7b7848e235aa4ebb Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:18:58 2006 -0400 Mark EDID modes as driver modes. Infer virtual size from driver modes. This allows the server to guess an appropriate initial virtual size and resolution. The heuristic is to select the largest driver-reported mode that matches the monitor's physical aspect ratio. We revalidate this estimate after mode validation, since we may have filtered away all modes that would fill that size. Also, the EDID preferred timing is now marked as M_T_PREFERRED as well. commit 43d9edd31e31b33b9da4a50d8ab05004881c8d5a Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:09:02 2006 -0400 Attempt to add the 'mouse' driver in more situations. Always add a mouse driver instance configured to send core events, unless a core pointer already exists using either the mouse or void drivers. This handles the laptop case where the config file only specifies, say, synaptics, which causes the touchpad to work but not the pointing stick. We don't double-instantiate the mouse driver to avoid the mouse moving twice as fast, and we skip this logic when the user asked for a void core pointer since that probably means they want to run with no pointer at all. commit 739224d05eb4f356c9cab9dcb8a44a8d78287765 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:03:32 2006 -0400 Load the default module set when no Module section is given in the config. Also, synchronize that list with the list for the pseudoconfig file used when starting with no config file. These really need to be better unified. commit beac2bf1e48e6b77dbf7d95f086abc5abcd90cf0 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:01:13 2006 -0400 Expand the default sync ranges to be large enough for 800x600@60. commit 71a15a7d5721073eccb3a275f353b3aa584c0d68 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 19:00:10 2006 -0400 Publish the raw EDID block as a property on the root window. This was removed in the patch for bug #5386, but is still useful. commit 7939c8dfb7c7bed4febcdc12922fb2e17619ea36 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:57:57 2006 -0400 Bump the default pixel depth to 24, and default bpp to 32. commit 72af975f9c8de0ff6796f1ce4b76dcf841d21e99 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:56:34 2006 -0400 Fix up EDID blocks where the max pixclock exceeds the preferred mode clock. Base EDID only lets you specify the maximum dotclock in tens of MHz, which is too fuzzy for some monitors. 1600x1200@60 is just over 160MHz, but if the monitor really can't handle any mode at 170MHz, then 160 is more correct. Fix up the EDID block before the driver can see it in this case, so we don't spuriously reject modes. commit d05e0a97bb704a4986cf638487205da759c4ce17 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:49:12 2006 -0400 Enable DPMS by default. commit 334f7db9f653113d5d46236911d7de2ec4173f28 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:46:10 2006 -0400 Allow hsync and vsync ranges to be overridden independently again. commit ced46e17777b635df9371c4cfaec3f8968b4dbcf Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:41:59 2006 -0400 Record all standard timings from EDID as modes, instead of just the first five. commit d89fee68d0e49211871cd9eb3893ed55c1d478a6 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:41:15 2006 -0400 Record the maximum dot clock of the monitor, and filter by it. commit fa8ef7166839a7435e0017683f3e3c7f7904b285 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Sep 14 18:33:00 2006 -0400 Don't translate monitor gamma to X gamma. The X gamma is used to set the output ramp of the card. Setting a 2.2 output gamma going into a 2.2 monitor gives an effective gamma of 4.84, which is very much not what you want. commit 511c60bc7399b07c267d686a969880e5ec92408a Author: Luc Verhaegen <libv@skynet.be> Date: Thu Sep 14 18:30:36 2006 -0400 Bug #5386: Synthesize modelines from EDID data. commit 05231e336db8f959c15dda518641976f061df1a6 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Sep 14 14:13:39 2006 -0700 Use correct opcodes for GLX_EXT_texture_from_pixmap. Regenerate from glX_API.xml 1.3 from Mesa. The glproto package and libGL (from Mesa) must also be updated. commit 0a62840e2ce25e5c2554e7e5ab4c9c5b96899e2d Author: Bill Nottingham <notting@redhat.com> Date: Wed Sep 13 15:40:23 2006 -0700 Bug 7641: fix comment written to Xorg.conf (s/VertSync/VertRefresh/) X.Org Bugzilla #7641 <https://bugs.freedesktop.org/show_bug.cgi?id=7641> Patch #6349 <https://bugs.freedesktop.org/attachment.cgi?id=6349> commit 182e5e0f4ba4c98a34bc52bdf4032ba315fe80ad Author: Drew Parsons <dparsons@debian.org> Date: Tue Sep 12 14:30:46 2006 +1000 Xprint: revert installation of /etc/X11/Xsession.d/cde_xsessiond_xprint.sh pending resolution of #8232. commit 594d4019c613b0f4bf8f48cc074ecc3c8366f1d7 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Tue Sep 12 01:15:40 2006 +0200 transformIsIdentity() now doesn't accept a zero matrix as the identity. Added a non-zero test for one of the diagonal values. commit fc30370d14125f86ee1192890a184881fa139546 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Mon Sep 11 19:43:09 2006 +0200 Bug #8226: Fixed SetPictureTransform()'s handling of the argument matrix. It now recognizes scaled variants of the identity matrix, too. commit 2b357e9a2f9038cf9cd07da908e3103a3d0965c9 Author: Donnie Berkholz <dberkholz@gentoo.org> Date: Sun Sep 10 22:17:20 2006 -0700 If we're installing libxf86config, install headers needed to build against it. commit 58933757862c458e2da39bd464e50d9c0e41b313 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sun Sep 10 15:50:51 2006 -0400 Warning fix, and a syntax fix in a #if 0 section of code. commit 0a3740a0000191e3039fe183ae51b938d0548340 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sun Sep 10 15:49:25 2006 -0400 Typo correction, 'i' is not a '1', so no longer crash on some Xi requests. commit 8d709f0280b458515b32c2b87938749428e5c149 Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sun Sep 10 15:48:35 2006 -0400 Remove a merge artifact so that we can compile. commit b3a3020fd018df8bc5a8193d36e1a1c7ae8af8ba Author: Jesse Barnes <jbarnes@nietzche.virtuousgeek.org> Date: Sun Sep 10 11:13:18 2006 -0700 the new PCI mapping routines are broken on sparc64 (in fact they look broken for any 32 bit X server running on a 64 bit kernel) so #ifdef them out for now. the PCI rework tree will make all this crap go away, so I think we can tolerate the extra #ifdef for the next release. commit 60db190ecfce52cbfa888c0af3210634f9186bed Merge: 5e9d33fe8 65256109b Author: Zephaniah E. Hull <warp@agamemnon.b5> Date: Sun Sep 10 03:49:17 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 65256109bb8f5a26704ed960e1dd113981df5787 Author: Drew Parsons <dparsons@debian.org> Date: Sun Sep 10 17:40:37 2006 +1000 * Define XPSERVERLIST with `/etc/init.d/xprint get_xpserverlist` instead of `/bin/sh /etc/init.d/xprint get_xpserverlist` - allows the initscript to set its own different shell under #! - allows disabling of XPSERVERLIST by making the script non-executable * Allow files to be installed by using dist_*_DATA instead of EXTRA_DIST. Also, use dist_*_SCRIPTS to install scripts. * Fix minor typos in man pages. commit 6950267dd690ef8e29b1c32a157dd64c9b79c06d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:31:18 2006 -0400 Add SELinux extension configure-time support. commit fb34c02861ab3629c1c85c156e73b158518db7c7 Merge: 9c503f09c d1110c5c8 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:30:12 2006 -0400 Merge branch 'my-XACE-modular' into my-XACE-SELINUX commit d1110c5c83a7f439158f369ab2f3ae614fa9d2a5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:28:48 2006 -0400 Generalize the handling of configuration files that ship with extensions. commit 9deb579dc9366590203afe0576bf88643ab36c89 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:25:17 2006 -0400 Zero out newly created ExtensionEntry structures, but only after the devPrivates have been initialized. commit cec392656cda1c938d5462e1949e6eef489f9168 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:24:23 2006 -0400 Zero out newly allocated ClientRec structures. This is required to initialize the devPrivates to a known state. commit 0fba09cdfcc78161f5c92bef6cca53e5309656bd Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:23:06 2006 -0400 Include dix-config.h. commit c93877100eb98647c5b6b8556730d54677f730b6 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:21:57 2006 -0400 Don't need to allocate memory now that devPrivates are being used. commit 9c503f09ce78d952d0ece77c424e42b6df3fa9ad Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:17:01 2006 -0400 Add SELinux extension to the module/extension loader. commit 9aa44e3e4c321f42d8e64f83c7f0932470593c26 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:15:19 2006 -0400 Add SELinux extension configure-time support. commit 150eabc4c8a08c81c48493583f922a1240b7e91c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Sep 8 15:11:04 2006 -0400 Add SELinux extension source files. commit 86450998da616e3d00d4d6293acc35eccc2061e7 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Sep 7 15:35:16 2006 -0400 Fix AIGLX VT switching. See https://bugs.freedesktop.org/show_bug.cgi?id=7916 There may be a simpler, less intrusive fix that involves just rearranging DRI locking between 2D and 3D drivers around VT switch. commit 5e9d33fe87f9d24e55c468d4b2bb761c9efdb26a Merge: 629798c73 64479fffa Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Sep 7 15:43:31 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 629798c73ad76a77fa6a55bc6403fd9b95ade2bb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Sep 7 15:17:04 2006 +0300 XkbCopyKeymap/SrvXkbCopyKeymap: free geom harder, add cheery comments Unconditionally free geometry when copying the keymap (so we have none on core, oh well), add a couple of heartening comments. commit 64479fffa22581cc7d753065c33eda5520b7db9a Author: Ian Romanick <idr@us.ibm.com> Date: Wed Sep 6 16:13:21 2006 -0700 Remove prototypes and externs for non-existant functions and variables. commit a0179281a6522ec59830e8f2549633741bc56e10 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Sep 6 15:45:48 2006 -0700 Remove prototypes for non-existant functions. commit 8356be492c6b46abdffa08b13836571ed872e16f Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Sep 6 15:20:55 2006 +0200 Make sure _XSERVER64 is defined when it should be and gets tested. commit f6ce0839ba5b73247097826d28f7388fe248ec0c Author: Michel Dänzer <michel@tungstengraphics.com> Date: Wed Sep 6 13:18:02 2006 +0200 Fix #include paths for fontcacheproto headers. commit f39fd4242902eaa862321d39337f429dd14ebacf Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Sep 5 15:23:54 2006 -0700 (unsigned long)(1 << 31) = bad news on x86_64. (cherry picked from 410e5b1d738ba47b36778e6cbed44023a27ce259 commit) commit 410e5b1d738ba47b36778e6cbed44023a27ce259 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Sep 5 15:23:54 2006 -0700 (unsigned long)(1 << 31) = bad news on x86_64. commit 0b81fccd2ee4e054e5cffb739de07460ff2c13f7 Merge: 20c4ac6e0 c2813514c Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Tue Sep 5 18:03:25 2006 -0400 Merge branch 'master' into my-XACE-modular Conflicts: configure.ac commit c2813514cf7b1a36caa848cbc2ceef99cf2eb769 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Aug 31 15:36:13 2006 -0700 Add missing file from previous commit. commit 0f9cfb2f752a9010ff07f4b2bd891db0cc30b8e6 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Aug 31 13:54:10 2006 -0700 Implement GLX_SGI_swap_control. Regenerate from glX_API.xml 1.2. Add infrastructure to support GLX_SGI_swap_control for AIGLX when the DRI driver enables it. Tested with R300. commit a9ef5862919313582f72fc0cfb5ab0af4df6507e Author: Ian Romanick <idr@us.ibm.com> Date: Thu Aug 31 13:47:50 2006 -0700 Fix problems with vertex program protocol There were two sets of bugs in the vertex program (ARB and NV) protocol. First, several of the ARB functions were missing the 'doubles_in_order="true"' annotation. Second, after the ARB decided that glVertexAttrib*ARB functions must not alias fixed-function state for GLSL, Nvidia re-assigned GLX protocol opcodes for glVertexAttrib*NV (circa Septeber 2004). For some reason gl_API.xml was never updated to reflect this, and the updated version of the GL_NV_vertex_program spec never made into the registry. This is just a server-side regeneration from gl_API.xml version 1.68. commit 69d5becce4ca2cfc8f8de53672ed54a47de62164 Author: Matthew Allum <mallum@openedhand.com> Date: Thu Aug 31 17:30:24 2006 +0100 Fix previous commit breaking other kdrives pulling in fbdev.a commit fd609956f27d76ee76ac8623787f0fc8633a5546 Author: Matthew Allum <mallum@openedhand.com> Date: Thu Aug 31 17:18:57 2006 +0100 Add framebuffer device command line switch for Xfbdev commit 2fb7b8795a9a36cce61f6449f6ca26ffd1b071f0 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 16:35:32 2006 -0700 Minor extension tweaks. GLX_EXT_texture_from_pixmap should always be enabled. GLX_SGI_video_sync is only for direct rendering and should never appear in the server's string. commit 1c8851ad491dd02d1c79e620b46384956838ed42 Merge: d59b52fc0 5ddbf4bcd Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 16:34:04 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit d59b52fc08f2d80b38993e383e61c3eeb0bb0763 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 14:40:13 2006 -0700 Make sure unsupported extensions are disabled. GLX protocol isn't supported for GLX_SGI_swap_control or GLX_SGI_video_sync. Remove them from the list of available extensions until they are supported. commit db6d04d4b87fd9b6409a3ddf0479a88440c2eda1 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 14:35:08 2006 -0700 Add support for AIGLX drivers to enable GLX extensions that they support. commit 5ddbf4bcd46fe0d3d682668c2748c712fea410ae Author: Matthew Allum <mallum@openedhand.com> Date: Tue Aug 29 22:07:15 2006 +0100 Re-add support for tslib (1.0 release) and Xcalibrate extension. commit 4524a2bf6f22c871ed109b027a065f0262137dc5 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 29 23:49:26 2006 +0300 configure.ac: move tslib from KDRIVE_PURE_LIBS to KDRIVE_LIBS Yeah. That was dumb. commit 942b4369990a255257f66835caf8671432c405a3 Merge: 77d315bd2 393dc0a33 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 13:30:37 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 77d315bd2fd2f9014c831d313efbe5821189177c Author: Ian Romanick <idr@us.ibm.com> Date: Tue Aug 29 13:30:20 2006 -0700 Remove __glXNoSuchRenderOpcode because it is no longer used. commit 260c3f32b69c98f8fc5360f860f69d32c19f04a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 29 23:18:12 2006 +0300 configure.ac: fix XSDL test commit 393dc0a3388d56186181b2bd9bcc1d267747e709 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 29 22:53:54 2006 +0300 kdrive: remove @KDRIVE_LIBS@ from Xfoo_DEPENDENCIES commit cff23616fe45e10c6786a303c8dcfc0a80463a53 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 29 22:44:09 2006 +0300 configure.ac: allow disabling of XSDL commit 89d272bb183e85715d8e6047929fb2d912033d82 Author: Daniel Stone <daniel.stone@nokia.com> Date: Tue Aug 29 15:05:31 2006 +0300 [PATCH] kdrive/linux keyboard: remove more debugging spew commit bd6f539ff9409aa7d9056fabe120b457b0a15997 Author: Daniel Stone <daniel.stone@nokia.com> Date: Tue Aug 29 13:21:58 2006 +0300 [PATCH] kdrive/linux keyboard: silence excessive debugging noise commit 5436fce09003e20744a388fa4ae49007c9cf8ede Author: Daniel Stone <daniel.stone@nokia.com> Date: Tue Aug 29 13:21:40 2006 +0300 [PATCH] GetKeyboardValutorEvents: be even more careful Don't accept devices without a keyboard feedback class. commit 0eb7299f445455a7bcacf2410e83227b23259675 Author: Daniel Stone <daniel.stone@nokia.com> Date: Tue Aug 29 13:19:12 2006 +0300 [PATCH] XkbCopyKeymap: still more range fixes Make sure we don't stomp preserve if it doesn't already exist, and fix a couple of range-related thinkos in level name copying. commit 7fa3383e3c8eea7d1eb0e556393f2431cf8e6ed2 Merge: 8d77d44fd ebbdc1342 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 29 15:16:01 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit ebbdc1342a243b301723390696f742dc91f59764 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Mon Aug 28 18:17:32 2006 -0400 Remove calls to LoaderCheckUnresolved(), since it's now a stub. commit 8d77d44fda3aacbae62864a3620e09095b79e92d Merge: d6f36bd28 2fde560bb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 27 23:08:49 2006 +0300 Merge branch 'origin' into input-hotplug commit 20c4ac6e038607ebbf6c04639670514c016d8597 Merge: 13c6713c8 8d4f21ab5 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 25 18:49:46 2006 -0400 Merge branch 'my-XACE-SELINUX' into my-XACE-modular commit 13c6713c82763a85c725c998b37ad02156d803ba Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Aug 25 18:17:01 2006 -0400 Add four new XACE hooks: auditing, key event notification, window init commit 2fde560bbb9c1148f26fd969dc30c4e736672b7c Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Aug 25 13:01:51 2006 -0700 Enable GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. Re-generate from gl_API.xml 1.65. This provides the missing bits for GL_EXT_texture_filter_anisotropic and GL_EXT_blend_equation_separate. Enable those extensions. commit e2d529963ed40b5f113cf82c17809d241cd4aac1 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Aug 25 12:05:16 2006 -0700 Enable vertex and fragment programs. Implement glGetProgramStringARB and glGetProgramStringNV. With these functions implemented, GL_ARB_{vertex,fragment}_program, GL_NV_{vertex,fragment}_program, and related extensions can be enabled. commit 21291d6ca7188e5733ed0c93215ee0f1f0f90cc9 Merge: 1a5561c4e cd2da4e41 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Aug 25 09:34:21 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit d6f36bd28009881ef7f7a20cdadb3808d808ed97 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 25 12:43:17 2006 +0300 xfree86/parser: use 'kbd' driver when 'keyboard' specified Now that we've completely ditched the old driver, we should probably make a best-effort attempt to keep configs working. commit 7c4167f0d6b33c9c602b04fcfd246fd3aeddd709 Merge: 393f8347e cd2da4e41 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 25 11:15:33 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 393f8347edcccfc24d8902a86ea9def7ada2537b Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 25 10:46:32 2006 +0300 xorgconf.cpp: kbd, not keyboard commit c33e39c86be2010b169ffbd8adbe53b93222dc5f Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 20:33:57 2006 -0700 Finish support for GL_ARB_texture_compression. Fill in __glXDisp_GetCompressedTexImageARB and __glXDispSwap_GetCompressedTexImageARB to finish support for GL_ARB_texture_compression. With this extension (and the related compression extensions), the server-side GLX supports all of the protocol for GL 1.4. w00t! The bad news is that this has received only minimal testing, and Mesa does not contain any good tests for GL_ARB_texture_compression. commit cd2da4e41eae233b50f8830d9a8f5d1d916a5a1b Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 18:00:16 2006 -0700 Remove GL/glx/g_disptab.c, GL/glx/g_disptab_EXT.c, and GL/glx/g_disptab_EXT.h. Unfortunately GL/glx/g_disptab.h has to be kept around a bit longer. commit a29e6dd2d2d45c18c52737bb3b7945aafcea5032 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 17:58:52 2006 -0700 Add some missing bits of GL_SGI_color_table. commit ae608b2071d882966e9c7ede71f846b1ecec0b23 Merge: 2c865277f b879356ce Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 14:56:33 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 2c865277fe1d056981d1020e1af001d2319252c0 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 14:54:49 2006 -0700 Regenerate from gl_API.xml 1.63. Enable extensions. gl_API.xml 1.63 corrects some problems with GLX protocol for GL_EXT_paletted_texture and GL_SGI_color_table. Regenerate from that file, and enable those extensions and GL_EXT_shared_texture_palette. commit 7d5de5c6657304246473d7ddd5c29bb0c7a3bc34 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 24 14:49:46 2006 -0700 Regenerate from gl_API.xml 1.62. Functions move, no real changes. commit 3a36b0a24aa9e9e238faa7f00100f59800f5142b Merge: db1ab1bdb b879356ce Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 23:35:28 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit db1ab1bdb2f79eca593fe247056309a16ebd29c6 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 23:33:59 2006 +0300 XkbCopyKeymap: fix various range issues Fix a bunch of range issues caused by incorrect assumptions (e.g. that the design was at least halfway sensible), and copy types by hand, instead of just blindly memcpy()ing the lot, since it itself cleverly contains a ton of allocated pointers. commit 5fb8d947bb88d715b9b236342885c445cb5a9387 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 23:16:43 2006 +0300 configure.ac: more thinkos Fix auto tests for vidmode and xf86dga. I win at life. commit 4e37c07ba6e5d299d4f8922dc6cf054c814f7baf Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 23:16:17 2006 +0300 config: clean up debugging messages, make failure to acquire name fatal Bomb with FatalError when we can't acquire the bus and name. Clean up a bunch of debugging ErrorFs to be hidden behind #ifdef DEBUG. commit b879356ce96929d02bcb75b9aa24b17ac7e28125 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Aug 24 15:50:15 2006 -0400 More #ifdef USE_DEPRECATED_KEYBOARD_DRIVER. commit 4ed311cf1c29090c53e474a3001c5702ff8409df Merge: 73e58adda b29b236d8 Author: Matthias Hopf <mhopf@suse.de> Date: Thu Aug 24 20:17:10 2006 +0200 Merge branch 'master' of git://anongit.freedesktop.org/git/xorg/xserver commit b29b236d88789fd45d823a55dbedb393bb134c5b Author: Lukáš Turek <8an@centrum.cz> Date: Thu Aug 24 15:57:09 2006 +0200 Adapt to Mesa header name change. commit ce4a0a4ddafd3833d7025f83ed3729915c8aba70 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Aug 24 13:56:22 2006 +0100 Apply patch in bug #7919, blit improvements in multiwindow mode for Xming/CygwinX commit 866ca1f929c95689bac9f0a0b3478f7b4d77214b Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 15:46:44 2006 +0300 configure.ac: fix XF86VidMode test commit 2b06c69c8feaf3bdc065635ee711efa45b3033b3 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 14:51:26 2006 +0300 GKVE: pass correct arguments to XkbCopyKeymap Fix horrendous thinko. Indicators now work perfectly. commit 4adf9af313c9f63b6ad734e174efe1d36ddb5813 Merge: 33af05d58 67bd672c8 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 24 10:59:33 2006 +0300 Merge branch 'master' into input-hotplug commit 67bd672c880869ef625ae0c0163c3ec1eba46abf Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Aug 24 08:47:06 2006 +0100 Fix typo commit 733c4beb16c2c4ad9e9a4ea9a85b09fc5062a775 Author: David Nusinow <dnusinow@debian.org> Date: Wed Aug 23 22:39:42 2006 +0000 Add xorg.conf IgnoreABI option which does the same thing as -ignoreABI commit b983773d446cef6a0948ca264ed48126e404ae9a Merge: 0623d3643 d9a86566c Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 17:16:50 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 0623d3643fc28ebc514b2ca872c985d0cf0c753a Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 17:16:02 2006 -0700 Fix the sorting of the extension string. Add a few extensions that are supported by the new code. A few of these were actually supported before but weren't advertised. commit 5d2caacff570dd68bb3fb05e776e02515b2a9da0 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 16:47:00 2006 -0700 Refector __glXDisp_Render and __glXDispSwap_Render to DoRender. Refector __glXDisp_RenderLarge and __glXDispSwap_RenderLarge to DoRenderLarge. commit 866bb3f34046045c9fa0744db1d76e035b3da9c7 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 16:41:53 2006 -0700 Memo to myself: Whenever a Makefile.am changes, autogen.sh must be re-run. This is especially true if the change is to remove a source file. Fix RenderLarge to actually use the new protocol decode tables. commit d9a86566c21afd7985673f3ed851b055d9dac46f Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Aug 23 16:15:19 2006 -0700 Add LOCALCONN to dix-config.h template for xtrans commit f6fd7d8f8393f93705e76b2b2777a0d9bcafa991 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 16:05:37 2006 -0700 Convert protocol decode tabels for Render and RenderLarge to use nice, compact N-way search trees generated by scripts in Mesa. commit 7ae82b5fc8721be78b43a322bbf2c46aac08b8cf Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 16:00:48 2006 -0700 Fix __glXDispatchInfo::dispatch_functions and __glXDispatchInfo::size_table. dispatch_functions had the const in the wrong place, and size_table was declared as an array of two pointers to int_fast16_t instead of a pointer to an array of 2 int_fast16_t. cdecl to the rescue! commit 39a620d17809dc71fb5ad61a955fe3c442f90a05 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 14:24:34 2006 -0700 Rename __glXDrawArraysSize to __glXDrawArraysReqSize. This makes its name match the pattern of all the other functions in __glXRenderSizeTable. commit 86406455f0e5fc977431948611e9bb5fda1e1d46 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 13:30:59 2006 -0700 Re-generated files after a fix to glX_API.xml (in Mesa). commit d7a7f12361d31001bbd9394a57de029ef0b934b8 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 23 13:30:13 2006 -0700 Convert protocol decode tables for Single, VendorPrivate, and VendorPrivateWithReply message to use nice, compact N-way search trees generated by scripts in Mesa. The Render protocol decode tables are next... commit bdec9680fa74dd23cf319d09af1940f8cf71a5b1 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Aug 23 14:43:23 2006 -0400 Make sure Composite is never enabled for Xnest. commit 9f2a108051aad9b024ab737b45fc12290a113e37 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Aug 23 14:38:34 2006 -0400 Make 'Xvfb -render' also disable Composite, lest we segfault on startup. commit 33af05d58f1f4f021036e9ce4b60fd76dbaebe73 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 23 19:05:50 2006 +0300 XkbCopyKeymap: use correct range for MapNotify We haven't copied {min,max}_key_code by the time the notifies run, so use src instead of dst to determine number of keys, et al. commit 6323a11d0db4d3cf0317af83f0362730142f5325 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 23 18:53:04 2006 +0300 XkbCopyKeymap: optionally send NewKeyboardNotify/MapNotify events Optionally send a NewKeyboardNotify or MapNotify event when copying the keymap; modify GetKeyboardValuatorEvents to make use of this. commit 728fbadd16a748b45c80bc2c65c46f82cf803578 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 23 14:33:59 2006 +0300 gitignore: ignore vi swap files commit 8f8487ff997670a4af0293fed77ff920cfc39fb1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 23 14:33:41 2006 +0300 xkb/gkve: copy XKB map, not pointer-assign Write a new function to copy an XKB map (does everything but geometry at the moment), and use that instead of nasty pointer assignments. commit 52ba722e4c89c052609b4fc62e965d92778aa2dd Merge: 9138d5a51 05541259b Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Mon Aug 21 18:49:31 2006 -0400 Merge branch 'XACE-modular' into my-XACE-modular commit 05541259bdb0dfaab015a01caa3722b7a1b782e2 Merge: c2535f679 a1ac0440b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Aug 21 13:07:41 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular commit a56b98bb047003a05e26ca9365c212a2da7ac200 Author: Daniel Stone <daniel.stone@nokia.com> Date: Fri Aug 18 18:03:41 2006 +0300 dix: enable null root cursor Enable a blank root cursor, selectable with --enable-null-root-cursor at configure time. commit 0704bb298cc826cd117815898c6bc015a693c2c9 Merge: c14036977 a1ac0440b Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:30:14 2006 +0300 Merge branch 'master' into input-hotplug commit a1ac0440bba690368aa4226468ce571be1a09d95 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:30:00 2006 +0300 dix: fix whiteroot thinko Note to self: run git update-index _after_ testing, not just before. commit c14036977fef7b8787c0b68f5262fa0b6a2834f5 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:24:34 2006 +0300 input.h: add InitCoreDevices prototype commit 1c2cb30cd88ba4453f9da339025f8ff39f7f5412 Merge: 633b6a69f 70ddd0f39 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:05:50 2006 +0300 Merge branch 'origin' into input-hotplug commit 19f673b7788d32c220e7e06734f1074b0e4a999c Merge: cb0a565d2 70ddd0f39 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:05:41 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit cb0a565d2b2cf8823abbd77b4426cc2237731dc1 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:04:48 2006 +0300 dix: add whiteroot flag Add a -wr option to use a white root window, and use a BackPixel rather than BackPixmap for both white and black root windows. commit 70ddd0f39d5118db72a1a4e473cbfb502f1ed9ec Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Aug 18 14:43:10 2006 +0100 Fix bug #5735, Serious flaw in CygwinX clipboard integration prevents paste from X to Windows apps (Brett Stahlman & Colin Harrison) commit 708b225689b5a4ba9ffe3372b584b715ef9eacdc Merge: e1f4565be ee5e2cbd2 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Aug 18 09:13:52 2006 +0100 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit e1f4565be5ce80be4655e81f77f4073fa3fbf8d0 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Aug 18 09:11:48 2006 +0100 Fix bug #7302, make Xn.hosts work from the Microsoft Windows install directory on Xming. (Colin Harrison) commit 1880defe4eaba02f9585b154d0883235eabc6d11 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Aug 18 09:09:53 2006 +0100 Fix bug #7281, clipboard viewer should not call SetClipboard viewer when bogus in Xming/CygwinX (Colin Harrison) commit a1a8e4f7f5917f537eb3dd51d3d6fa3e129236ce Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Aug 18 09:08:12 2006 +0100 Fix bug #7280, round title corner background should be transparent not black in Xming/CygwinX (Colin Harrison) commit ee5e2cbd2bee610a95facc6b486c4a5070973099 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Aug 17 17:29:32 2006 -0400 Un-cut-and-paste the mode rejection message. commit 43e42eef1f5a22703eb64fc9cffecde036ea38e0 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Aug 17 16:22:07 2006 -0400 Fix default mouse device on Linux, again. It would be really nice if we only did this in one place instead of 40. commit 633b6a69f560c0a77dcff78fdef5fcf0041e2e04 Merge: 95dbfcf88 7da51447e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 21:25:14 2006 +0300 Merge branch 'master' into input-hotplug commit 7da51447eaab34292e14077fb5a48e6b2e587781 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 21:24:07 2006 +0300 events.c: fix tiny XEvIE thinko Make sure xeviehot gets updated after the ConfineToShape() call. commit 5d082f05632906c29296a44ef5c3a4962c0cbe62 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 21:18:18 2006 +0300 events.c: make XEvIE a little less verbose Change a lot of: #ifdef XEVIE xeviehot.x = #endif sprite.hot.x = ... #ifdef XEVIE xeviehot.y = #endif sprite.hot.y = ... to one single #ifdef XEVIE xeviehot.x = sprite.hot.x; xeviehot.y = sprite.hot.y; #endif at the end of the functions. commit 95dbfcf8828c041c218145afc87d21a6c9c7bc02 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 21:18:18 2006 +0300 events.c: make XEvIE a little less verbose Change a lot of: #ifdef XEVIE xeviehot.x = #endif sprite.hot.x = ... #ifdef XEVIE xeviehot.y = #endif sprite.hot.y = ... to one single #ifdef XEVIE xeviehot.x = sprite.hot.x; xeviehot.y = sprite.hot.y; #endif at the end of the functions. commit c6c39afde3e5f43b623ca6b52162b83c98a28d45 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 21:13:09 2006 +0300 dix/events.c: add YAFIXME Add another FIXME to the cacaphony of XXX and FIXMEs in this file. commit f9624e0109cf12b6af43fb4235aaa0b54340a4bb Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 17 16:09:51 2006 +0300 kdrive/input: verify SIGIO with --enable-debug commit 73e58adda96c1d1b5176d819107faa7697c3eb94 Author: Matthias Hopf <mhopf@suse.de> Date: Wed Aug 16 18:17:58 2006 +0200 Fixed segfault w/ broken Xinerama configs. commit cd3f744b1f983f71476db99c050045d981c5f5b2 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 15 15:54:13 2006 +0300 fix missing brace, trim unused variables commit 5d073697adb3864133fa3221b82ab8d2f4a59758 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 15 15:37:10 2006 +0300 kdrive/input: minor warning cleanups And also a compiler error fix when VERIFY_SIGIO is defined. commit 47c1c948e69cfba950ad37a3133fa2db0bd0ff2c Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 15 15:25:16 2006 +0300 kdrive/input: only run special key behaviours on non-XKB Only attempt to manually deal with special key behaviours (e.g. terminating the server) when not using XKB, and leave locking behaviour up to GKVE. commit 34228d8b280ef105a0c60b8de5dacf70a5ce24b5 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 15 15:23:53 2006 +0300 GPE: fix absolute button events / GKVE: (non-XKB) don't repeat lock keys Fix absolute button events in GPE, where we would previously send valuator events without bumping numEvents accordingly, causing the core event to go missing. In the non-XKB path in GKVE, implement proper lock behaviour (one press to enable, one press to disable, discard releases). Fix debug_events prototype. commit d003bada3352ec7d734498c4c732904876a9d1e2 Merge: d6433be3c a815b9b99 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 22:48:55 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit a815b9b990e068f02d9cbba2b17f2cc3a30a9310 Merge: 37943e2f1 984babe86 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Aug 12 21:58:33 2006 +0300 Merge branch 'master' of git+ssh://gsap7@git.freedesktop.org/git/xorg/xserver commit d6433be3cca807dd78fbb1f45d9ba0212283083d Merge: 2bf9e3dc1 984babe86 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 21:50:52 2006 +0300 Merge branch 'master' into input-hotplug commit 2bf9e3dc1ec5fd7bf84a4a96899e5663a721d4a4 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 21:50:39 2006 +0300 make DIX more tolerant of devices without a CtrlProc (Debian #269860) Return BadDevice on client requests for devices without a CtrlProc, instead of tanking horribly. commit 984babe86bf82002b4d6589b2750c7b5a5489bd5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 21:43:38 2006 +0300 remove obsolete vendor defines Remove random behaviour changes for SGI and MetroLink. commit 37943e2f1abc6709ff739000372b0394d5cd18c5 Author: George Sapountzis <gsap7@yahoo.gr> Date: Sat Aug 12 20:54:33 2006 +0300 Call exaTryComponentAlphaHelper() for solid src also. Also, rename to exaTryMagicTwoPassCompositeHelper() as it is now called for non-component-alpha masks also, and add function description from http://anholt.livejournal.com/32058.html. commit f7919c287936f55569c2301ebb1b5f52358e70fa Author: Bastian Blank <waldi@debian.org> Date: Sat Aug 12 20:43:25 2006 +0300 xfree86: don't do legacy IO on ARM or S/390 (Debian #362641) Don't attempt to poke legacy IO ranges on ARM or S/390. commit 59dcc62906d8ee597cd43aa307f414cb47995cea Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 20:39:08 2006 +0300 xfree86: remove Xqueue support completely commit e641000b98e7c2e92e3c801eaa42aa15d5c16ad0 Author: Samuel Thibault <samuel.thibault@ens-lyon.org> Date: Sat Aug 12 19:41:59 2006 +0300 xfree86: add Hurd support (#5613) Add support for GNU/Hurd. commit 5a3488ccac8e5dabd9fc98bc41ef178ead1b2faf Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 19:25:06 2006 +0300 configure.ac: fix execinfo.h test (Debian #363218) Define HAVE_EXECINFO_H as well as HAVE_BACKTRACE, when we find execinfo.h. commit 26c3cd1c9e3f52548389817a6d89a377e20c4269 Merge: 008aa7eb6 c4951e0a6 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 18:58:18 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 008aa7eb6ed090384e6c44f861410e317c78a1cd Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 12 18:56:05 2006 +0300 completely remove OS keyboard layer Completely axe the keyboard layer from os-support. commit c4951e0a6b6cf3eeee710cc5cda1d9bc929ee3d7 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Aug 10 20:49:06 2006 -0400 Fix a mode sanity check to not break reduced-blanking setups (LCDs). commit e1921f014b102e3eecf3b41972f8672cf23264d6 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Aug 10 20:43:15 2006 -0400 Rename some mode tokens to better reflect their use. Per #5386, M_T_EDID -> M_T_DRIVER, since it's really for any driver-detected mode. Also add M_T_PREFERRED bit, to select a 'best' mode out of a set. commit c2535f67923bde0bfb0e72363467110806e2f40f Merge: c0cb8d1fb db82e12fa Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Thu Aug 10 10:37:59 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into XACE-modular commit 9525c2709ea3245c6518d4c3b5a0a4afff37181d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 20:29:57 2006 +0300 configure.ac: fix xephyr conditionals Fix Xephyr build conditions, allowing it to actually be disabled. commit 6d8d4abaaacf08140b673472d985117d448a62e7 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 20:28:06 2006 +0300 configure.ac: allow conditional building of XF86{DGA,Misc,VidMode} Allow conditional building of the above three extensions, defaulting to auto. commit 1a5561c4ecccaf32b03c41373adf376100d457aa Merge: 190f229ed db82e12fa Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Aug 10 10:20:37 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit cec284f2b3e948deb9e56a1a8519fddf693ab952 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 18:03:58 2006 +0300 kdrive: properly ifdef composite enabling commit 45bce556e8665412b9f6e89f88ed5bedb41de1ba Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 18:02:47 2006 +0300 GetMaximumEventsNum: be more conservative Be slightly more conservative in our maximum event count if we're using XKB (and thus don't need to count the extra repeat events). commit 172d45b9b75f95c997d1e9358040eead496e2a06 Merge: 3832a3d7d db82e12fa Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 14:14:54 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 3832a3d7db0f3b5d7167e3b3b5ea6d6b3d96351a Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 14:13:51 2006 +0300 GKVE: don't repeat modifiers when using XKB Make sure we don't ever repeat modifiers (previously was repeating when using XKB); only do explicit KP/KR repeats in the non-XKB case. XKB will take care of repeating when we're using it. commit 9f188416bb6b4837d4c3f8773053d5eee0ff0ee1 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 14:00:34 2006 +0300 core devices: clear devicePrivates on close commit 539d1f33475484d35fb5a377efc76dba2d868e3f Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Aug 10 14:00:14 2006 +0300 GKVE/GPE: have DDX allocate events Don't allocate events on every GKE/GKVE/GPE call, just have the DDX manage it instead. Introduce GetMaximumEventsNum(), which is the maximum number of events these functions will ever produce. commit db82e12fac5eaa16a39fc1bd0bc31ad95089dc95 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Aug 9 14:55:17 2006 -0400 Remove TargetRefresh option from the autoconfig logic. The default target of 75Hz is almost always wrong for LCDs. commit fcd4167e8913f77bdf9e17a6955d0f2a9f4eeb10 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Aug 9 14:48:51 2006 -0400 Remove the bc flag from the -help text, since it's gone. commit 767f372dd02232469f9fd804b811a17eaf762e1e Merge: c4f5de6cc 462bb61b0 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Wed Aug 9 20:23:30 2006 +0200 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit c4f5de6cc3b935025829af971b0b8010c1ecfedb Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Wed Aug 9 20:21:52 2006 +0200 Sanitized glxdri's Block/Wakeuphandler calling. __glXDRIleaveServer() and _enterServer() used to call DRIDoBlockHandler (resp DRIDoWakeupHandler) directly. They are now calling DRIBlockHandler (resp DRIWakeupHandler) to account for driver specific block/wakeup hooks. commit 5506b4ad200745236f997c121e8200179c47b749 Merge: 4be9abb85 462bb61b0 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 9 07:21:01 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 4be9abb8504b3761b5f3a01851e4eb3da86c76e2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 9 07:20:16 2006 +0300 kdrive: remove ddx_DEPENDENCIES Remove foo_DEPENDENCIES as they weren't guaranteed to just be libs, and loader arguments (-lfoo, -Lfoo) might've crept in. commit 462bb61b0fe968fae1b99cf98ec6f7de09105dcd Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Aug 8 18:07:22 2006 -0700 Add CompositeRegisterAlternateVisuals. This provides drivers the ability to add their own alternate visuals and then register them with Composite for implicit redirection. commit 190f229ed77d87797e0f2f6762c86b3ad3a3dcbe Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Aug 8 16:47:32 2006 -0700 Make xf86PciVideoInfo static since it is only used within this file. Dummy out all of the PCI bus and device access control functions. We need a better way to do this, and that will probably be in libpciaccess and / or the kernel. Refactor xf86GetPciInfoForEntity to use pci_device_find_by_slot. Refector xf86CheckPciSlot to use xf86GetPciEntity. Eliminate disablePciBios and the one place that calls it. commit 5508f7646f9754b054e961a1025b7a52913b563b Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Aug 8 16:43:31 2006 -0700 Remove prototypes from some functions that were previously removed. commit 9df53d903ed68073bf7d2c2a275b6f6556a85c0f Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Aug 8 16:42:23 2006 -0700 Rename xf86ReadDomainMemory to xf86ReadLegacyVideoBIOS, since that's what it is actually used for. Modify a few routines in linuxPci.c to take pci_device structures as parameters in stead of PCITAGs. commit fe351a711ef55c3ae1e784d4551147c080eda109 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 8 14:54:10 2006 +0300 GKVE: send XkbMapNotify, not XkbNewKeyboardNotify Sending MapNotify is more correct in this case than NKN, so do that. commit 31089816317f27c668b12a15c74fdd226a8df9f7 Merge: ab3ebfefd 12dbd8a02 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 8 12:01:12 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit ab3ebfefdb7d21aba72a5030f6f93bf4fafed709 Author: Tiago Vignatti <tv02@c3sl.ufpr.br> Date: Tue Aug 8 12:00:34 2006 +0300 xorgcfg: fix compilation error Add missing parentheses to IS_KBDDRIV macros. commit 12dbd8a02f797ad57a1be683a02a1fcb1ca35438 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 23:43:40 2006 +0300 remove optional R3 backwards compatibility Remove the permitOldBugs flag, which enabled backwards compatbility with broken R2/R3 era clients. commit 7721ee308fbbb6fc9c969f15fe04b3346c04f843 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 23:03:02 2006 +0300 config client: fix minor race with event queue Fix a small race whereby you could remove a device while events from it were still in the queue, by calling ProcessInputEvents immediately before RemoveDevice, to (hopefully) flush the event queue. commit 458c63a84110f64c7fce397a531a3a779c2239a2 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 23:02:17 2006 +0300 enable adding devices after removal of a middle device Allow new devices to be added after a device that _wasn't_ the last on the list was removed, by ensuring inputInfo.numDevices always increases, and never decreases. commit a31d11a7a8485cdc799f76c4d407d3b7f7c9b350 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 23:01:23 2006 +0300 GKVE: get rid of bogus double-release check Get rid of a bogus double-release check which broke non-XKB servers. commit bedc4ecf23c7150e3156e0d24602ed3bc3977225 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 23:00:45 2006 +0300 xephyr: aid input debugging Add the 'ephyr' mouse and keyboard drivers to the driver list so we can re-add devices. Set the names properly in Ephyr{Keyboard,Mouse}Init, not in InitInput. commit baf93b3abe1e88d82ee6a3d6939f50f96ded271a Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 21:12:45 2006 +0300 kdrive: move map initialisation to KdNewPointer Do a linear n -> n initialisation on the map up until KD_MAX_BUTTON in KdNewPointer, moving it out of both KdParsePointer, and KdPointerProc. Also remove dead pointer acceleration code. commit ccb53340b66a778abf10182fd88a7d699207fb84 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 21:12:00 2006 +0300 ephyr: cleanup Remove extraneous KdAddPointerDriver call. commit d1c18af27e0aed73104743afb4bf4b8d3d1186cf Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 21:11:38 2006 +0300 GPE: use button map for DBP/DBR, not just BP/BR Make sure we use the button map for extended events, not just core. commit 9b7ecbd1dd8d092221897e29c85f3306c7367716 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 21:09:32 2006 +0300 kdrive: prevent overrun in map We actually need n + 1 elements for the mouse button map, not n. commit eb6e8d4042252b13328dbb122e0e6186796a80ac Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 21:05:37 2006 +0300 kdrive: increase maximum number of buttons Increase KD_MAX_BUTTONS to 32. commit 1c72290cdf4d9b214e1b9c0526cb7cb8641051f3 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Aug 7 09:57:58 2006 -0700 Use DrawablePtrs instead of PixmapPtrs for Prepare/Finish access. Also, define some wfb functions even if FB_ACCESS_WRAPPER is not defined. This allows a client to use libfb and libwfb at the same time. commit afcad4ad99bbfc8bdcd0f4fdd70e072108410d30 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 18:11:05 2006 +0300 xfree86 ddx: always free GKE/GPE events free() events we get passed back from GKE and GPE so we don't just, er, leak them all. *cough*. commit 98fdf874eeadd5b37413922d8afba8415d0c56bb Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 16:51:39 2006 +0300 move all autorepeat logic to DIX Move core autorepeat logic for keyboards down to the DIX, remove it from KDrive. commit 5c7001fef8ffc6e3d8585a37d3f79a9495be8ed0 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 16:51:09 2006 +0300 memcpy() events in memcpy events into our event structure instead of doing pointer assignment. commit c85e64cba1d2d88f676ca7cf23b52a6f8219e90e Merge: a406f6bfe f54b71b77 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 7 15:54:55 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit f54b71b772a1f587394ae3968782b611e52f0e2d Author: David Nusinow <david@nee.(none)> Date: Sun Aug 6 18:11:00 2006 +0000 Document enable/disable flag for AIGLX in xorg.conf manpage. commit a406f6bfeaa46e3236f7ab46813fe6c30b936a35 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 4 12:40:19 2006 +0300 mieq: don't leak events free all events posted through mieqEnqueue. commit 997ba45b192f21810099ed888792a45f1677a9ce Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 4 11:18:16 2006 +0300 fix incorrect button test Test for n (1..nButtons) being under nButtons, not button (1..(1<<nButtons)). commit 9138d5a51e411f598bc0e75a3e73d2c16187a518 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 3 18:24:04 2006 -0400 Make SecurityLookupIDBy* part of the base functionality. commit 45c229f526bf1dafb5e81b50d700449ba4e1613d Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Thu Aug 3 14:26:06 2006 -0400 Remove LBX code. commit 96e45626c43b7674b66e0258b0b1730d5ce71357 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 2 20:29:59 2006 -0400 Rebase Security extension to use devPrivates for storing security state. commit 83ebf61ec03ff31005375900bee1e55e0e694c4b Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 13:33:33 2006 -0700 Eliminate the last few places outside xf86pciBus.c that use xf86PciVideoInfo. In all cases this means converting the code to use the pci_device_iterator interfaces. commit 5bfb2ee9652e5ef6d076ef8b6df54baaa43b8e0c Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 13:29:21 2006 -0700 Remove the last remants of the pci{Read,Write}{Long,Word,Byte} functionality. This also allows the removal of PCI_CPU, PCI_CPU16, and a few other dangling bits of cruft. commit a0f2e1cae46f189ed97e2d92b485d315b3d2627a Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 10:54:41 2006 -0700 Move xf86FindPciDeviceVendor and xf86FindPciClass from xf86pciBus.c to xf86int10.c. Refactor common code from those functions to do_find. commit de8234606f87ce79d016f7ddeabdf57c4ad212f3 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 10:44:11 2006 -0700 Modify xf86FindPciDeviceVendor and xf86FindPciClass to use the pci_interator interface instead of the xf86PciVideoInfo array. commit 3c23dec5962b8b81ae838fe0ee2c7b0a789f5386 Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Wed Aug 2 13:39:49 2006 -0400 Call ClientStateCallback on serverClient devPrivates initialization. commit 23f44df9009023e77508f03ac4a7595c7e3d40cb Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 09:55:32 2006 -0700 Remove pciConfigPtr and all of the associated cruft. commit 966ebd3d2d84b440e89504d055a0e937303ed11d Merge: a94176627 39169fd37 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Aug 2 08:14:58 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit ee02e647882a4be29e1130bd79904ee79ed6b802 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Aug 1 13:45:43 2006 -0700 Wrap libwfb memory access. Use the READ and WRITE macros to wrap memory accesses that could be in video memory. Add MEMCPY_WRAPPED and MEMSET_WRAPPED macros to wrap memcpy and memset, respectively. commit 39169fd373b97f34923f6494d697d9429d0b8aa3 Author: Matthew Allum <mallum@polystyrene.(none)> Date: Tue Aug 1 13:39:22 2006 +0100 Back out 'mystery' spurious host window hints. commit f737cc38baea6af8bf284c9e207e60a7d90eebe1 Author: Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> Date: Mon Jul 31 19:58:42 2006 -0400 Adding devPrivates support to the ExtensionEntry structure. commit b04d64854712678701d5243aacf5cc93444cfadc Author: Eamon Walsh <ewalsh@moss-uranus.epoch.ncsc.mil> Date: Mon Jul 31 19:35:08 2006 -0400 Added devPrivates support to the ExtensionEntry structure. commit a94176627cdd6122ffadb618995f9bcec872609a Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 14:33:58 2006 -0700 Eliminate all uses of the businfo field of pciDevice / pciConfigPtr. commit a69335dc299be6de8b82ed34de1cb30f1255feb4 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Jul 31 14:15:55 2006 -0700 Make ReadMemoryProcPtr take a const pointer. Fixes some warnings when using READ with a const pointer. commit 26c9587f90806cce1c0d2a98e656e9c311a34ee5 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 13:54:36 2006 -0700 Build fixes for last pull from HEAD. commit 65dc25d8f86b962f2adc765a9ff327419f98092b Merge: 69533fc04 b74c845a1 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 12:30:30 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit b74c845a1233f78b841ff8840272c50873300c20 Merge: 3112a6c4f 02daa6bb1 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 10:26:06 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 3112a6c4f26d5e9258b8def7ce4109b4bd408c67 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 10:25:31 2006 -0700 Noting uses libdummy.a, so don't build it. Only libdummy-nonserver.a is actually used. commit 02daa6bb103e53e5a33db2bb6acbe57d0bf2c30e Author: Matthew Allum <mallum@polystyrene.(none)> Date: Mon Jul 31 17:32:05 2006 +0100 Improve XRes to; - Better estimate general pixmap memory usage. - Account for pixmaps shared between clients. - Account for window background and border pixmaps, and GC stripple and tile pixmaps. commit 69533fc04f38c67fd424776c5191a4ba57ba8c8f Merge: ef1aecaaf 24051ef97 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 31 09:26:04 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/Makefile.am hw/xfree86/common/xf86AutoConfig.c commit 24051ef97406f28c102cf46a78223400b61fdae2 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 12:15:33 2006 +0300 remove filename that's too long for tar commit ecb7d43a76d507d04891ab7f189b23be5eccda51 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 11:52:41 2006 +0300 add sym.h to sources commit bf2d7499c84c94f228d03b21448f5688b3cda1a8 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 11:17:02 2006 +0300 add securitysrv.h commit e87e68634d8eb66ab783e2802e2d5d12ff1031be Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 11:11:59 2006 +0300 remove .cvsignores from EXTRA_DIST commit ed0c807de9f07468385fcbd2e8a9c0737759a461 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 11:08:54 2006 +0300 bump to 1.1.99.3 commit a68dc013a33d867e65a7e76b3eec5947b862a5b4 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 11:08:47 2006 +0300 remove README (which doesn't exist) from EXTRA_DIST commit 87fe85f38b6f781bf0e2eb555526e3d77779f9fa Merge: 3518e2d0d 654619d76 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 30 10:51:34 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 654619d76c779606f2315782fc01d1410399fa3b Author: Kevin E Martin <kem@freedesktop.org> Date: Fri Jul 28 17:16:32 2006 -0400 Revert xkb changes that broke XkbGetKeyboard() commit 79016d4036786b091a9b9d1133a6cdfedd6c277d Author: Luc Verhaegen <libv@skynet.be> Date: Fri Jul 28 16:02:02 2006 -0400 Bug #5386 (partial): Move CVT mode generator from cvt(1) to server core, and export it from the X server to modules. commit e6ae1612be519ee6224d354244d076d85d44a750 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 27 18:24:59 2006 -0700 Add fbHasVisualTypes and fbSetVisualTypesAndMasks to wfbrename.h and include -DXFree86Server. commit 2a4ceb09ed5a09dc5763754ab865ec23df91ac9f Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jul 26 19:39:17 2006 -0400 Remove dead function prototypes. commit 990a4009057e068f41d20b95aa0c59357185650d Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jul 26 19:03:39 2006 -0400 Remove getconfig horrorshow. Replace with a static built-in rule list for now. commit 377a581ddf5e428a368efb1b59fcb317666fecdd Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Jul 25 15:27:31 2006 -0700 Switch to using void* pointers. Pass the size of the data pointed to by src or dst as an argument to wfb{Read,Write}Memory. This allows one set of macros to be used with any size pointer. Assumes that sizeof(FbBits) >= sizeof(FbStip). commit a4005c15fbb48231cb958c32b2c791a2d23a135a Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Jul 10 18:58:09 2006 -0700 Add framebuffer access wrapper infrastructure. Create fbPrepareAccess macros to call into the driver to set up the wfbReadMemory and wfbWriteWemory pointers. Call these from fbGetDrawable and fbGetStipDrawable. Add the READ and WRITE macros, which expand to simple memory accesses for fb, and calls through the function pointers for wfb. Add fbFinishAccess macro to give the driver an opportunity to clean up. Add calls to this in the appropriate places. commit 319efac445cebda5a2ac1db67efebe54bc47ba9d Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Jul 7 18:45:30 2006 -0700 Prefix all of the exported symbols in libwfb.so with "wfb". For now, just #define all of the exported symbols in wfbrename.h. Later, we should add FBPREFIX() around the exported symbols and use -fvisiblity=hidden to hide the rest. commit 7608a63ff7409f399c9a26962a304b84196a1868 Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 6 17:05:21 2006 -0700 Build infrastructure for libwfb.so. Builds fb/* twice, defining FB_ACCESS_WRAPPER for libwfb.la. Define a macro, FBPREFIX(X) which expands to fbX for libfb.la and wfbX for libwfb.la. Use the macro on [w]fbModuleData so the new module loads. commit 39158e98acb29e97a2682d4a37385f9141b484c4 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jul 26 18:39:28 2006 -0400 Remove another latent PowerMAX hunk. All your favorite running jokes of 2005, today! commit ef1aecaaf6cd7e9e4f9d0c6373664e774500bc13 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jul 26 13:25:13 2006 -0700 Pass correct pointer to xf86MapLegacyIO. commit 3518e2d0debc97e2bacdefe604b280e7fdfdd216 Merge: eb7733a48 3821f6aea Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 26 11:29:21 2006 +0300 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit eb7733a48a92405660d5d2ab60913b62c30daaed Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 26 11:28:45 2006 +0300 kdrive: drop excessive NewInputDeviceRequest debugging commit 3821f6aeaa714582ee0a631de96c6e7cfd96303e Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jul 26 01:56:02 2006 -0400 Unlibc-wrap DMX glxscreens.c and fix tag-removal typo. commit 28ba8d56912ae56d7b9835188f621b0a491add30 Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Jul 25 15:38:09 2006 -0700 Gut anything having to do with the PciBusPtr (or PciBusRec) type. Bump required version of libpciaccess to 0.5.0 so that pci_device_get_bridge_buses can be used. commit 380b51d605a82c98082a2cebd70a0d1d0735eaa7 Merge: 82f6b7e75 8977b0743 Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Jul 25 11:30:04 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/common/xf86Init.c hw/xfree86/int10/pci.c hw/xfree86/scanpci/xf86PciData.h hw/xfree86/scanpci/xf86PciStdIds.h hw/xfree86/scanpci/xf86PciStr.h hw/xfree86/scanpci/xf86ScanPci.h hw/xfree86/utils/pcitweak/pcitweak.c hw/xfree86/utils/scanpci/scanpci.c Re-removed most of the conflicting files. commit 4ea475924c557ad0819b796f5369e5e669465709 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jul 25 20:00:48 2006 +0300 re-add OpenedHand copyright Ae-add OpenedHand copyright, accidentally dropped in KDrive new world order patch. Sorry guys. commit 82f6b7e75e04e3fb951ab71ad3c553c8b34ea995 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 13:52:58 2006 -0700 Don't re-look-up pointers that are already stored in structures. commit 2fd6b995ff927c8ca7267c201f535564b82e691f Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 13:33:34 2006 -0700 Global s/xf86MapDomainIO/xf86MapLegacyIO/. Let's call a duck a duck, okay? Since xf86MapLegacyIO is called from only one place, cut the parameter list down to the one parameter that actually conveys some information: the one that gives a PCI device. Change from using a PCITAG to a pci_device. commit aed6fe0bb12c68b94e564252bc03594728ed8c5b Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 13:13:05 2006 -0700 Refactor linuxGetSizesStruct to take a pci_device pointer instead of a PCITAG. Modify xf86BusAccWindowsFromOS and xf86AccResFromOS to call linuxGetSizesStruct directly with a pci_device pointer. Remove linuxGetSizes. commit e48762799248eb7e16ea2c0df1561ae1430f2112 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 12:23:23 2006 -0700 Modify xf86BusAccWindowsFromOS and xf86AccResFromOS to use the libpciaccess interfaces. commit 4b474cbc1a0fe17da2438a15291f04ee67ea28f8 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 12:17:27 2006 -0700 The functions xf86PciBusAccWindowsFromOS and xf86BusAccWindowsFromOS are identical. Just have one call the other. commit 7dff8d98a9ed11f92806cb8c4b3f10e01c5d063f Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 11:56:37 2006 -0700 Remove source files that have been dead since day-1 of this branch. commit eb95128f615e2f3fab17dcafd4fc260c6d4d0644 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 11:53:37 2006 -0700 Changes that were missed on the previous commit. Perhaps oddness caused by doing git-update-index at the wrong time. commit 05f8b772aec2b05d92078bb60a07bd8413386363 Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jul 24 11:23:03 2006 -0700 ScanPciDisplayPCICardInfo now uses pci_device interface for PCI scanning. Log messages simplified to make the code shorter and less convoluted. ScanPciDisplayPCICardInfo is now void since it was only called from one place with a constant parameter. commit ca3f4fc1b0c21a0620ab1eb35c199cd55d795095 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 23 19:02:12 2006 -0400 add fallback ChangeDeviceControl, allow XOpenDevice on closed device Add a fallback ChangeDeviceControl, which allows the attributes we know about so far. Allow XOpenDevice on closed devices. commit e73e5e2a4d8f22889d840a7719479f9af686cb9c Merge: a73cef1f0 8977b0743 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jul 22 13:56:30 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 8977b07434d75ca396d236dc1324f0c862b633c7 Author: Dave Airlie <airlied@linux.ie> Date: Sun Jul 23 03:36:47 2006 +1000 glx: fix typo from tag removal commit a73cef1f005ca66db18e952e676ee5a21b829700 Merge: 672ca156b 70869fc67 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jul 22 12:07:22 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 70869fc6777f87cd05794446caa739e3d9a91ffe Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 23:39:37 2006 -0400 Yet more dead code. commit 7c1b2ee7a8238c267bc97e78bbff204dc7723dd3 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 23:35:13 2006 -0400 static markup, more dead code. commit 1c4f90b1d05d4c49279f3224a6dd94850a6bd8d0 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 23:03:21 2006 -0400 Open-coded path checks make baby Jesus cry. commit 114264584ca43091a5e07282566a30a6378a1502 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 22:55:41 2006 -0400 Remove a useless open() of the module we're about to load. commit 985611d5cd079f97da700c7b8e898d33da004be0 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 22:37:59 2006 -0400 Delete some long-unused testing code. commit 525257eb98b46209c69c8576daa6bd7afc1f48a9 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 21 19:16:38 2006 -0700 Fix stupid typos. commit 672ca156bfb11440e6e234650bfba9d38e1edb52 Merge: d14d91f09 6cf844ab6 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:58:42 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 6cf844ab69926b6d23619a12c97734af3881ba67 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:57:28 2006 -0400 loader: walk directory paths with readdir(), don't stat() everything Walk the directories with readdir, and don't stat everything we can find. Thanks to davej for the public humiliation reminding me to go back and re-fix this one. commit d14d91f094c3897c889f6aafb66d738820dae0aa Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:57:28 2006 -0400 loader: walk directory paths with readdir(), don't stat() everything Walk the directories with readdir, and don't stat everything we can find. Thanks to davej for the public humiliation reminding me to go back and re-fix this one. commit e18d34f4238e13e226b0407fa2f5f77d2038de39 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 21 16:47:45 2006 -0700 Make the various implementations of xf86ExtendedInitInt10 use the libpciaccess interfaces. This eliminates all calls to mapPciRom, which in turn allows the elimination of hw/xfree86/int10/pci.c. commit 87a6346bf7f086b5f98b2b2ecd52f27efe864e56 Merge: b73fb2ae3 0486d3966 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:36:25 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 0486d3966d2888ef86d36c19f31bdbc2a3e8c652 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:35:04 2006 -0400 fix kbproto dependency Depend on kbproto >= 1.0.3, for unconditional definition of XkbSA_XFree86Private. commit b73fb2ae35a82e0bdd48f01132e971fb84946ff1 Merge: e7ac27ad8 aff404f29 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:30:26 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit e7ac27ad81efbea6128b3cec443ca98e228d14ad Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:29:28 2006 -0400 revert accidental deletion of lnx_io.c; re-delete lnx_kbd.c Thinko'd which file to remove after merging from master. commit 81913a12910e39d7ea6af8657c1c66cc6791cd65 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:10:26 2006 -0400 remove undead files from master Remove dead files which worked their way back in when merging from master. Ugh. commit 7465010d59ec435bd00b738f0cef766b352dc7eb Merge: 1d31ed778 0aaac95b0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:05:41 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into input-hotplug commit 1d31ed778284082e1060bff63317c94581d9eb9b Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 19:02:52 2006 -0400 xephyr: load keysyms at init, not enable Load keysyms at init time, not enable, so we don't get the wrong map width. commit 63dfaa1d5ba556e09314ec914936e5471aab94b0 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 18:47:18 2006 -0400 Delete internal usage of the symbol ref/req lists. commit bca9364f3f4a2376edbcf57a34f704ce28be21ba Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 18:41:46 2006 -0400 Remove the loader's required and referenced symbol lists, dead code. commit 07ad92d2c4cb07db8487d76efc822fd7b88137cb Merge: 18624a9b7 22db3fdb5 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 21 15:25:35 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/common/xf86DoScanPci.c hw/xfree86/common/xf86Init.c hw/xfree86/common/xf86pciBus.c commit aff404f293ed86a44a093a51a9f11e79e6c3f4f6 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 18:24:37 2006 -0400 Detach xf4bpp from cfb. commit 0aaac95b0d12089b256c97f6ff955c8c229ae095 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Fri Jul 21 17:56:00 2006 -0400 Remove RCS tags. Fix Xprint makefile braindamage. commit eeaad0e956640aac653d194a992df7792e4abcbb Author: Aaron Plattner <aplattner@nvidia.com> Date: Thu Jul 20 18:19:07 2006 -0700 Fix the RandR failure path for rotated screens. commit 22db3fdb54d2f7f6b72638b46c186af6db04e214 Merge: 2f98841fd 93cd53860 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 21 13:55:37 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 3eeb62e8f587732e6b433c2b9c6879eb26a3f1b4 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Jul 21 16:33:28 2006 -0400 bug #890: completely remove deprecated keyboard driver Remove all remnants of the old built-in keyboard driver. commit 60ea7b51fe2b8a19a08b63db48504971a7a50ee6 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 21 15:23:37 2006 -0400 xorg ddx: move to new input API, remove old keyboard driver Remove most of the rest of the old keyboard driver. Move to the new Get{Keyboard,Pointer}Events API, which is mostly complete at this stage: just missing the proximity events. commit d32dc8bf19e1071fc30af2f0bc6a6699b351f39e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jul 20 18:40:47 2006 -0400 be more careful in IVAS Don't walk off the end of a NULL pointer in InitValuatorAxisStruct. commit 7711c56d2e2aeae4dcd6d9297bc144c1cb3cfab1 Author: Daniel Stone <daniel.stone@nokia.com> Date: Thu Jul 20 18:38:57 2006 -0400 xephyr: fix keymap, pointer; dix: fix multiple axes Initialise our axes properly in the DIX, and make sure we don't unnecessarily clip maxval when it's not set. Fix keymap copying in Xephyr (to some degree: it's still broken), and set nAxes and nButtons properly. commit f18c3122a57df9770087e5fc70ac488552222233 Author: Daniel Stone <daniel.stone@nokia.com> Date: Thu Jul 20 16:49:17 2006 -0400 sanitise debug output Don't spit out huge chunks of pointless ephemera, especially without --enable-debug. commit 463e0fe35bec3c91b19be9aacf34babb146a88c9 Author: Daniel Stone <daniel.stone@nokia.com> Date: Thu Jul 20 16:45:15 2006 -0400 update KDrive to new input API Update KDrive to fit the new API (mieqInit and InitPointerDeviceStruct), and include InitTouchscreenDeviceStruct in the DIX. commit 1987af8c498a1bf394a8951ca6d5b0b7f7a35188 Author: Daniel Stone <daniel.stone@nokia.com> Date: Thu Jul 20 16:39:54 2006 -0400 add virtual core devices to DIX Add virtual core devices, with proper keymaps etc, to the DIX. commit 737e6e4836a6af26fedc22cda8e7d366b52c8fa7 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jul 19 20:10:48 2006 -0400 define SDevicePresenceNotifyEvent prototype commit 7f36cc533e7f6ae44e973c5f00f9bfec7c6b7b50 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 19 20:09:13 2006 -0400 distribute config.h commit e896195eab726a2b307200958308eda8c93dd3cd Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 20:05:33 2006 -0400 remove extraneous font debugging code Some of it didn't compile, and some of it was just unnecessary. commit 99c57674c002c5e88c6db34488a27b05004c9197 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 19:59:11 2006 -0400 avoid using font servers with built-in fonts commit ecfad74c48f633916305bcc25baaaad74aa52b78 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 19:55:13 2006 -0400 add support for built-in fonts Use --enable-builtin-fonts to only use built-in fonts, and avoid loading fonts. commit 0a2068d123520d35818c38a555ae3ba06d8ca7fb Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 17:29:23 2006 -0400 Xi: add XExtension{Keyboard,Pointer} types Report XExtensionKeyboard for non-core keyboards, and XExtensionPointer for non-core pointers/mice. commit c7577f9b88aac84d59404f29d994ee7af583d33b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jul 19 17:27:58 2006 -0400 Xi: add DevicePresenceNotify Add support for DevicePresenceNotify events. commit 3a23e499017d5823157806029263edac53c663fd Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 17:00:23 2006 -0400 make XInput mandatory Always build Xi, since GetPointerEvents/GetKeyboardEvents relies on it. commit 02d09105113fb9b560a770fe15f7bb041165831c Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 16:51:04 2006 -0400 new KDrive input world order Convert KDrive to GPE/GKE interface. Add first-class drivers and enumerate every device separately through Xi, instead of lamely attempting to aggregate them. Add XKB support to the Linux keyboard driver. Add 'thumb button' support to the tslib driver. Rejig InitInput, so each DDX has to add a list of drivers it supports. Support NewInputDeviceRequest, et al. commit a274e7296b1bdd6f6c921f28b087610cec9548e0 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 13:56:23 2006 -0400 add GetPointerEvents/GetKeyboardEvents framework Add GetPointerEvents (with XFree86 pointer acceleration) and GetKeyboardEvents to the DIX. Extend the ValuatorClass structure to account for same. commit b308dbf273f8c26361b0fee7aca64aec3245f60b Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 12:15:18 2006 -0400 add DEVICE_TOUCHSCREEN and DEVICE_CORE Xi controls (DeviceIntRec ABI break) Add DEVICE_TOUCHSCREEN and DEVICE_CORE controls to the Xi code, and the TouchscreenClassRec and a coreEvents flag, to toggle propagation of core events. commit c9a3d9baa81ceb940032ffe529d9eadf2d202ab2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 19 11:41:16 2006 -0400 xorg DDX: implement NewInputDeviceRequest Implement NewInputDeviceRequest for Xorg, mainly written by Kristian Høgsberg. Move MatchInput to xf86Helper.c, as xf86LookupInputDriver. commit 02a95311568e24e1055ea52c7df8cb7aa3f38ad0 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 19 10:05:12 2006 -0400 add basic D-BUS configuration mechanism Also move LookupDeviceIntRec into the DIX, and add InputOption type, and NewInputDeviceRequest prototype (DIX requests DDX to add a device). Does not link without an implemented NIDR. commit 93cd53860c3aca182a0a02543c41b5d71d65926b Author: Daniel Stone <daniel.stone@nokia.com> Date: Thu Jul 20 16:52:31 2006 -0400 kdrive: allow debugging commit cd0874dda1c30ef91a7d2b3cd455676422599ccf Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 20:13:02 2006 -0400 never define MEMBUG Definining MEMBUG causes allocations to randomly fail. commit 093943d4d02f1dbc8935b8cf835866a6e3885193 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 20:09:55 2006 -0400 define DEBUG in DIX Which makes #ifdef DEBUG actually useful. Incredible. commit 68b0678254240a984db9adefefb0cf68e9bfd4e4 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 20:08:32 2006 -0400 exa: only disable cw when COMPOSITE is built commit 27df2eda795681c9f05e2907d74e2c102d3441e4 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 16:18:28 2006 -0400 fix KdXvCopyPackedData to actually work Remove extraneous bit shift in KdXvCopyPackedData, so it's actually useful. commit 00b24f119f03da86fa98ffea545c5b041810ce53 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jul 19 17:01:20 2006 -0400 fix minor typo commit f8a7a1e40c14a85ebde11c5854c07a8d529d38b9 Author: Daniel Stone <daniel.stone@nokia.com> Date: Wed Jul 19 17:06:00 2006 -0400 fix XEvIE build without XKB Don't unconditionally play with XKB stuff in XEvIE. commit 2f98841fde6bad807967ed15e954291240714198 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 20 16:08:27 2006 -0700 Remove unused variable. commit 985c34bf06af70a7296db8307899a17347a25558 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Thu Jul 20 17:33:13 2006 -0400 Remove the DDXTIME conditional, for being unused. commit c69c00d6523a35232a32e54a533811fc2b37815a Merge: 46369350d 84683f19b Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 20 12:08:38 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 84683f19b4d1c712281036bcabf8dc623e64b26a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jul 18 18:16:12 2006 -0400 get rid of XFree86LOADER, XFree86Server, XFree86Module, and IN_MODULE Get rid of almost all uses of these definitions. They're still defined for delinquent out-of-tree drivers, and also for the Mesa build. As well as for miinitext.c. But largely gone. commit 881953813c7307f2aac4057b48d233e5f4a574cd Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Mon Jul 17 13:50:38 2006 -0400 Fix the Linux ACPI reopen code to use a repeating timer, rather than a one-shot sleep-and-reopen attempt. commit f029e9a32dcaa95b84e08ec173a0cc78fd92bdbf Author: Kristian Høgsberg <krh@redhat.com> Date: Sat Jul 15 22:05:38 2006 -0400 Un-glx-libcwrap DMX GLX proxy so it works without GL/include. commit 46369350d40819ecc2a9f37ed4aaa95866b80997 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 14 15:51:55 2006 -0700 Add some const qualifiers to serveral function parameters. commit 490fb304599b1f24b36439e5c1397781e7d2f612 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 14 15:26:56 2006 -0700 Rearrange code in xf86int10ParseBiosLocation to use strncasecmp. This eliminates the need for the first use of xstrdup in this function. The second use of xstrdup was *never* necessary and has also been eliminated. commit d3ee49bcbafe4b4e6b308686020847e978473779 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 14 15:13:35 2006 -0700 Refactor common code from the generic.c and linux.c version of xf86ExtendedInitInt10 to xf86int10GetBiosLocationType and xf86int10GetBiosSegment. These changes were tested on MGA hardware on x86-64 with various combinations of InitPrimary and BiosLocation. commit 8793c7fd4ba7d1b3e2eff3f2c18d042ee9bb3f62 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 14 09:11:39 2006 -0700 Refactor identical xf86InitInt10 function from generic.c and linux.c to helper_exec.c. commit 1450fd596433f7adfe3d0798dc2ddceb9d0a9034 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jul 14 09:10:32 2006 -0700 Trivial refactor of libint10_la_SOURCES. commit 18624a9b7cf88e769c53cc3a876b3647c5d5057c Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 13 21:10:48 2006 -0700 Modify linuxGetSizesStruct to use pci_device instead of pciConfigPtr. commit 12595a77d6c2f037f48dfe751bdc10505b3317df Merge: 37838de62 4c225a3a8 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 13 12:48:03 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit 4c225a3a8b2e7e5e5510347d8473f1318bbac769 Author: James Steven Supancic III <arrummzen@arrummzen.net> Date: Thu Jul 13 10:03:57 2006 -0400 Bug #7482: Fix Xdmx's Render code to match reality; fixes BadLength client crashes. commit bb3aa94845a74d7718ba9539bb76203ec82957fc Author: Drew Parsons <dparsons@debian.org> Date: Tue Jul 11 18:26:55 2006 -0700 Bug #7346: Disable Composite extension in Xprt Xorg Bug #7346 <https://bugs.freedesktop.org/show_bug.cgi?id=7346> Patch #6184 <https://bugs.freedesktop.org/attachment.cgi?id=6184> commit 10f3e32726d5b4981abd1a3a022e5b4f219fb41e Author: Gustavo Pichorim Boiko <boiko@mandriva.com> Date: Mon Jul 10 16:37:53 2006 -0700 Fix the configure check for the --{enable,disable}-dpms option commit 2194d99d9ca3c607e0f5ddd911ee3df536d77564 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Jul 9 16:16:08 2006 +0200 Replace GNU make-ism. commit 90a9b82272446fdaebe71c966325fd7e670f75c6 Author: Matthew Allum <mallum@polystyrene.(none)> Date: Sat Jul 8 21:57:07 2006 +0100 Fix crash in Xephyr when running on host X with keymap width < 4 ( i.e xvnc ) commit 21e3e3ca298dce22e5fad6ef38aa6fe9736a1d3b Merge: e80562189 39b2f7b21 Author: Matthew Allum <mallum@polystyrene.(none)> Date: Sat Jul 8 21:13:52 2006 +0100 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit e8056218944e873135c93039d1e9646d51364467 Author: Matthew Allum <mallum@polystyrene.(none)> Date: Sat Jul 8 21:10:58 2006 +0100 Add support to Xephyr for simulating 8bit grayscale. commit 39b2f7b2182aedb1ab45415efb4c263012ace512 Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Sat Jul 8 19:55:53 2006 +0200 Bug #3042: Use autoconf to get the correct name of a struct member. This allows us to remove the kernel version ifdefs from the code, which are ugly and broken. commit 63f13e01ee6e7df1753f2113f4cff9538596be0a Author: Tilman Sauerbeck <tilman@code-monkey.de> Date: Sat Jul 8 11:33:44 2006 +0200 Bug #7097: do case-insensitive comparison for some hotkeys. xkb's strcasecmp implementation has been moved to the dix so it's now safe to just use strcasecmp(). commit 5416f90e9c939027005fc01fa3ce3df56919ae0d Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 6 21:22:34 2006 -0400 Implement GLX_MESA_copy_sub_buffer. commit b84374b2917a91a7732e780ffab6a29c807a3ecc Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 6 02:28:55 2006 -0400 Add GLX_MESA_copy_sub_buffer marshalling support. commit 2152e2d364bdd179cf218cde446c763d8c8bb833 Author: Ed Catmur <ed@catmur.co.uk> Date: Thu Jul 6 17:45:36 2006 -0700 Remove hardcoded 'lib' in XPRINTDIR. commit 233c004641483a75985e09fea5416ab2c7a97fc4 Author: Ed Catmur <ed@catmur.co.uk> Date: Thu Jul 6 17:41:53 2006 -0700 Generate xprint.pre from xprint.cpp. commit b3e4d1d1f4bcf900146d7b8cd19e008209294663 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jul 6 18:51:29 2006 -0400 PPC64 build fix. commit f847f3c0a956c0aec8ade8e32f770daae147f40b Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Jul 6 15:33:31 2006 -0700 xorgcfg now needs libxkbui version 1.0.2 or better. Old versions of libxkbui use XkbStrCaseCmp which doesn't exist any longer; the server fails to link with that version of the libkbui library, so require the current version (1.0.2). commit 27ffd7e03c05dd2083a10e5acebd2b385d729eeb Author: Keith Packard <keithp@neko.keithp.com> Date: Thu Jul 6 14:43:10 2006 -0700 GL proto version 1.4.7 needed for texture-from-pixmap defines. GLX_TEXTURE_TARGET_EXT and GLX_TEXTURE_RECTANGLE_EXT are defined as a part of the new texture from pixmap GL extension in gl proto version 1.4.7 and are now used by the X server code. commit d7a96dd6f18e54c26fc5881772d033ac078db3a1 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jul 6 17:39:14 2006 -0400 Switch the default mouse device on Linux to /dev/input/mice. commit 37838de62edc474f44c0a48bd56470a6c23f8956 Merge: fd49a0dcc 8d07ee070 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 6 13:01:57 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework Conflicts: hw/xfree86/os-support/bus/linuxPci.c commit 8d07ee070ecf0d403d9d27c80764d343b80af6f0 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 6 12:48:51 2006 -0700 Refactor linuxGetIOSize and linuxGetSizes. Eliminate the unnecessary optimization in the search loop. commit 704e645207d88a2d0a372cf69f6abd778ed4c30b Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jul 6 14:22:33 2006 -0400 Remind dlloader that it needs to search the global scope as well as the loaded modules. Fixes LoaderSymbol() on symbols provided by the server. Spotted by Aaron Plattner. commit fd49a0dcc13280cf195bd6c7ee0f23d0840cb665 Merge: e66e7b48e 28b95fd9d Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jul 6 09:52:15 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit 28b95fd9d1c2f078aaaac75c310a27b17c74a6fc Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jul 6 03:25:38 2006 -0400 Drop unused GL/include subtree. Woo, less Makefile's to generate. commit fc1a55671dceae0e2a701e044ff8203fae5eb1ba Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jun 29 04:35:45 2006 -0400 Implement glXCreateWindow and glXDestroyWindow. commit ee012588d28b468bd41da8d216210f8cb2bf8cb5 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jun 29 04:25:54 2006 -0400 Move __GLXdrawable lookup and creation into GetDrawableOrPixmap. Also refactors __glXSwapBuffers to use GetDrawableOrPixmap for getting the __GLXdrawable. This patch paves the way for GLXWindows with XIDs different from the X Windows they are created for, a prerequisite for glXCreateWindow(). commit 8b5bc6a9ab487fdea754266b120c686d75d9e100 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Jun 29 00:05:01 2006 -0400 Drop global GLX error integer variables and use __glXError() instead. Also drop glxerror.h (__glXError is now declared in glxserver.h) and global.c (last remaining globals are in glxext.c now). With this change we now support all GLX 1.3 error codes. commit 7cf3ec7b59223f15314a0629f122ecb796678421 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jun 28 17:00:23 2006 -0400 Move createDrawable from __GLXcontext to __GLXscreen. commit eea8efe4516750b2505b52ebc9f769f5e8a6f94c Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jun 28 15:59:01 2006 -0400 Add marshalling for GLX 1.3 requests. Also, hook up glXGetDrawableAttributes and glXQueryContext to existing DoGetDrawableAttributes and __glXQueryContextInfoEXT. commit e66e7b48e15543f3753951a19376f0446759963a Merge: a9d484289 eb35f812a Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jul 5 15:21:36 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit eb35f812a5b65adcc5f6cbb91b31b69cae5d7f3d Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jul 5 13:27:26 2006 -0700 add another file to .gitignore commit 863f5cc31b747bc9f2fcd6a9e20c613a11733bf4 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jul 5 13:26:34 2006 -0700 fix compiler warning in hw/xfree86/common/xf86Config.c commit f059b61ab3af25b03c704669eddb838d3ce4366c Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jul 5 11:47:25 2006 -0700 fix compiler warning about xnestRecolorCursor() not being defined commit cc3e99f747586f9d32622e5a682de39891b1fcba Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jul 5 10:13:19 2006 -0700 fix some more compiler warnings due to defines being declared differently commit 59836c0f2abee3339e1aa30dacadb82e477943d6 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jul 5 09:30:48 2006 -0700 fix wrong function pointer type in hw/dmx/dmxcmap.c commit 12563db59dd613ecc926e3bed9534152ebc0a2fb Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jul 3 12:52:27 2006 -0700 Revert "Optimize out computing a gradient pixel if the mask value is 0." This reverts cf46242e337481cd3b9b39d77dd621d2a63b11f9 commit. It wasn't meant to be pushed to master yet, and doesn't work. commit 002e28c12c74aa63777f65cbfb382c2bfd0d6850 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jul 3 12:48:12 2006 -0700 Correct AGP memory deallocation argument on *BSD. This fixes leaks and eventual crashes with RandR resizing on Intel. commit cf46242e337481cd3b9b39d77dd621d2a63b11f9 Author: Eric Anholt <anholt@FreeBSD.org> Date: Wed Jun 28 18:35:59 2006 +0200 Optimize out computing a gradient pixel if the mask value is 0. Obtained from: kdrive CVS (DavidR XGL fb/ megapatch) commit a838fb70c52a829872680f6a2a2e7dd6d2dc9247 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jul 3 19:22:36 2006 +0200 Bump server version to 7.1.99.2 for gradient and repeat fixes. commit 25d871d98462f0481ee419295ddc94b8c79dc881 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jul 3 19:22:26 2006 +0200 Fix source picture filter check for multiple screens. Now, we only check for filter commonality if we're operating on a source picture, and we compare the id (screen-independent index of the filter name) rather than the pointer to the filter (per-screen state). commit 7106a77df37c06d2b5568eceeb9297096bff3137 Author: Eric Anholt <anholt@FreeBSD.org> Date: Sun Jul 2 12:41:35 2006 +0200 Fix bugs in support for new repeatTypes in XAA and EXA. EXA now won't pass pictures with new repeatTypes to drivers. We can add a flag for them to support it at a later time. commit f5e92542a14f51029347b6476e4e4af69144930b Author: Eric Anholt <anholt@FreeBSD.org> Date: Fri Jun 30 12:03:47 2006 +0200 Bug #7366: Fix crashes when setting filters on source pictures. Now, filters may only be set on source pictures when the filter is common to all screens. Also, like SetPictureTransform, ChangePictureFilter is now not called on source pictures. commit 6ef457913955d4289081c7d07d528963ccf5272c Author: Eric Anholt <anholt@FreeBSD.org> Date: Fri Jun 30 03:01:14 2006 +0200 Bug #7366: Fix two crashes in operations on source pictures. A screen's ChangePictureTransform now isn't called when changing the transform, as source pictures aren't associated with screens. Also, attempting to set an AlphaMap to a source picture will fail with BadMatch just like a Window would, preventing another crash. commit 50a3e1ad18c815a5adafee22beccdf970bae62d6 Author: Rudo Thomas <rudo@matfyz.cz> Date: Sat Jul 1 12:34:36 2006 -0700 Missing close parenthesis in one of the setuid() fixes. commit 124a81eb389dfa510ac07ca93ee17c4c9d6e56ea Merge: d3d6c5f4d 179737d4a Author: Keith Packard <keithp@neko.keithp.com> Date: Sat Jul 1 11:12:50 2006 -0700 Merge branch 'origin' commit d3d6c5f4d05e0ca5b566e19657e0fe2b3898482a Author: Paul Mackerras <paulus@samba.org> Date: Sat Jul 1 11:10:18 2006 -0700 Bug #7381: Coordinates get wrapped in accelerated line drawing on pixmap XAAPolylinesWideSolid was adding the drawable origin onto each element in the pPts array. Since the values got stored back into the pPts array, they got truncated to 16 bits, causing the overflow I saw. This patch avoids storing the coords back into the pPts array (and actually reduces the size of the code too :). Now the 32-bit sum of coords + origin doesn't get truncated to 16 bits, and the problem is solved. commit 179737d4a07ed10a734fe017b5680f8e78ffda96 Author: Jens Granseuer <jensgr@gmx.net> Date: Wed Jun 7 01:46:00 2006 -0700 Bug 7145: fix build with gcc 2.95 & other c89 compilers Move variable declarations to start of blocks as required by c89 commit a9d4842893b65232d61fe4c63f074d30e81021d2 Merge: 66cac9b17 6bd4c2543 Author: Ian Romanick <idr@umwelt.(none)> Date: Fri Jun 30 11:49:29 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit 6bd4c254396cb0f4e8ae21ff455ebb15cd9f4f10 Author: Martin Bochnig <mb1x@gmx.com> Date: Mon Jun 26 01:52:24 2006 +0200 Updated Solaris aperture driver to build on sun4v & amd64 kernels Updated for Solaris 10 changes to DDI commit 66cac9b17498497d939bfb7a4075bcee5a485e5f Merge: 7c4e54025 54d9acd51 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jun 28 14:11:49 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit 54d9acd5113318274e291abab4554b8e678227df Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Jun 27 19:44:52 2006 -0400 Add damage tracking to GLX_EXT_tfp implementation. - Only update when pixmap content actually change; - Only update the regions that acutally changed. This is a worthwhile optimization, but it doesn't completely remove the bottleneck, as mesa still uploads then entire texture whenever it changes. commit adfe8e7437ff739f54d1d074008e8cc0e3bcb4d3 Author: Eric Anholt <anholt@FreeBSD.org> Date: Tue Jun 27 21:49:00 2006 +0200 Bump server release to 7.1.99.1. This will be important for a couple of cairo workaround tests. commit 63c169e3b1f7d6a7375a414fcd50cce32358a525 Author: Eric Anholt <anholt@FreeBSD.org> Date: Tue Jun 27 04:11:47 2006 +0200 Fix MMX Saturate implementation. The code was expanding the source blend factor from the wrong channel. Fixes cairo's clip-operator test. commit 7c4e54025345455f420cd2abaa7a40679689d3cb Merge: 9d0a15dca ff6b59a0d Author: Ian Romanick <idr@umwelt.(none)> Date: Mon Jun 26 14:39:44 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework commit ff6b59a0dbadbe61a53e48c23965d3073d95791b Merge: b3c869304 48c871564 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jun 26 13:02:33 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit b3c869304cd85af034aa9debaa874e29d14fcbe6 Author: Peter Breitenlohner <peb@mppmu.mpg.de> Date: Mon Jun 26 10:48:44 2006 -0700 Free small, one-time memory leak in xdmcp -from handling Part of Patch #6046 <https://bugs.freedesktop.org/attachment.cgi?id=6046> commit 48c871564d493203d434d5da015903399287f619 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 26 15:57:32 2006 +0200 Move EXA_PM_IS_SOLID() to the public API, since drivers will want it frequently. commit afb84c2fca56887b3bfe7aa93f337c49b087acdc Author: George Fufutos <fufutos610@hotmail.com> Date: Sat Jun 24 15:23:14 2006 +0200 Bug #6911: Check return value of exaGetPixelFromRGBA(). commit 930b9a069a425818d4e9965f53be7df1f4d7d422 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Jun 24 15:21:17 2006 +0200 Bug #6818: Avoid infinite loop in exaLog2() with negative arguments. commit 36756fdb2ddc154b406f664a6af0f38d26e6973d Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Jun 24 15:09:24 2006 +0200 Make sure <execinfo.h> is actually included when needed. configure only defines HAVE_BACKTRACE, not HAVE_EXECINFO_H. This could cause problems on platforms where the size of a pointer is greater than that of an integer, see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=363218 . commit 4426215a6e99f84550aaac23ac9c2018668bfbc1 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Jun 24 15:02:56 2006 +0200 Bug #7213: Fix the XFree86-DRI extension for byte-swapped clients. These clients are by definition non-local and thus not direct rendering capable, but they still need the QueryVersion and QueryDirectRenderingCapable requests to find out cleanly. commit a195a3debca02572d9f7d7a9976b5bf67acc5d08 Author: Michel Dänzer <michel@tungstengraphics.com> Date: Sat Jun 24 14:54:52 2006 +0200 Fix byte swapping in some GLX requests. commit bc6cfde19887eff7a07dc739ffa29609fb55b83d Author: Eric Anholt <anholt@FreeBSD.org> Date: Fri Jun 23 20:07:34 2006 -0700 Use correct OSNAME setting so we can find os-specific modules like libdrm. commit c7ac485a59709572307b9a4a9abacc52c7021b65 Author: Eric Anholt <anholt@FreeBSD.org> Date: Wed Jun 21 09:34:55 2006 -0700 Remove the default case from fbcompose.c switches which should cover all cases. Instead, stick the NULL return default case afterwards, so that the compiler can warn us when we've got unimplemented cases. Removes some unimplemented and unused 8bpp, depth 4 picture format names. commit 2cf1f39ca974c81a2f52d2f7509aa3d098a87176 Author: Eric Anholt <anholt@FreeBSD.org> Date: Wed Jun 21 09:30:59 2006 -0700 Add a manpage for EXA. commit 9d0a15dca56b14821cad474f9db9c332acb3b1e6 Merge: 6c514ca14 d67fd1069 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jun 22 16:21:10 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver Conflicts: hw/xfree86/loader/xf86sym.c commit 6c514ca14c2326c2cf82b73196429789d11e4a01 Author: Ian Romanick <idr@umwelt.(none)> Date: Thu Jun 22 15:51:16 2006 -0700 Use XSERVER_LIBS instead of XORG_LIBS for -lpciaccess. The former is only for libraries that are built as part of the xserver build. commit d67fd106968e371d8be3966ed5ecdd3c69f36e3a Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 22 12:47:51 2006 -0400 Add kdrive servers to .gitignore commit bf17c6dede1c0cf1edee10f2cc7e1e619b944d3a Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 22 12:24:09 2006 -0400 Drop libz from the server's link line, it was only needed for LBX. commit c0cb8d1fb80540e093da54da3ee2f55bdf139274 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 18:12:41 2006 -0700 Use XACE, not XCSECURITY to decide if SecurityLookup* are exported commit 3177dc498a955cd58cd6054a7c7e69724db4a59b Merge: 3f19803e0 91dcac529 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 18:06:06 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 3f19803e0b1adc66e695f63f915b8dc85eb84215 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 18:05:51 2006 -0700 APPGROUP requires both X-ACE & XC-SECURITY now commit 91dcac5295486cc55a34ad91704bfa483bd31eeb Merge: d8135eb9e 77c947b90 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 21 20:49:30 2006 -0400 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit d8135eb9e414bf6957f64c5102ee0ef7c2404c6f Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 21 20:49:21 2006 -0400 Unbreak unbreaking the loader. Re-add the symbol reference lists so that the linker will include everything it's supposed to. This is a terrible solution, but ld semantics don't let you do anything better. commit f83cee0338eca095ad601374a87775be823a2565 Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:07:37 2004 +0000 Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE commit 15c9002d68a7eeb02a6db1f231af7a18a3cf7512 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 16:24:20 2006 -0700 Correct ifdef - should be XACE, not XSECURITY commit 90af38fa0c46c2081d2becac262a614c26ba6ef1 Merge: 3e098efa3 77c947b90 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 16:23:31 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver Conflicts: Xext/appgroup.c commit 3e098efa35ba70ad4d5699af3130a3b02e1cb06e Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 16:21:03 2006 -0700 Correct ifdef - should be XACE, not XCSECURITY commit 77c947b900faf34f425eef1549d8210c475e093b Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Wed Jun 21 16:18:41 2006 -0700 Move Xserver internal API for appgroup from Xagsrv.h to appgroup.h (Since all use is inside the xserver module, might as well keep the header in the Xserver module instead of in proto/XExt to allow easier synchronization of updates.) commit aa131c51e06e735d7b54cadf51205f703a3de4ef Merge: 1708b0c7d 77aa701e8 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jun 21 14:39:52 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 1708b0c7d962b80073500eb1c483447bbf965bc9 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jun 21 14:39:39 2006 -0700 Eliminate "ugly" spaces around parenthesis. Add const qualifier. General code clean-ups. commit a3c26d01a16e4ae20a5d1acf9d888e95760c3da1 Author: Ian Romanick <idr@umwelt.(none)> Date: Wed Jun 21 14:38:07 2006 -0700 Move declaration of "j" inside #ifdef block where it is used to eliminate compiler warning. commit 40aafaf154ba8a2cba857689d1481be2d4a610c2 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 21 14:36:09 2006 -0700 fix a number of compiler warnings in os/* commit 77aa701e898c6525322cc4029d95167dd9f6e618 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 21 14:16:48 2006 -0700 add some function prototypes to hw/xprint/DiPrint.h as they are exported commit 865884d050e1778180f7677e15f9ee1625ea4bb2 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 21 14:16:28 2006 -0700 fix compiler warning in dix/xpstubs.c when XPRINT is not defined commit ed18d776f02e2ab235954501ef64936af9f9d909 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Jun 21 16:22:14 2006 -0400 Fix #2488 for fb too: sample pixel center when transforming. commit ea5e0eabd1303a55d8fc10f44d21a3d371ce8919 Author: Matthias Hopf <mhopf@suse.de> Date: Wed Jun 21 17:08:51 2006 +0200 Bug 4320: Fastpath corner case improvement for Composite. commit 9af315a9be19b48faa1249e0575cbe3d1e31dec5 Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:07:37 2004 +0000 Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE commit f68ecfa482b2c2037f929710310c7b9ce6fe9291 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jun 20 19:01:34 2006 -0700 Add X-ACE to build system - Added --disable-xace to configure.ac and issue configure error if trying to build XC-Security without X-ACE - Added XACE #define to dix-config.h - Added X-ACE sources to Xext/Makefile.am commit a46c06dab8392cf8012c7cc0b916de9a9e569671 Merge: 49b368c0b d44b2a0a5 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jun 20 18:40:18 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver Conflicts: Xext/appgroup.c Xext/security.c dix/devices.c dix/dispatch.c dix/dixutils.c dix/events.c dix/extension.c dix/property.c dix/window.c os/access.c commit d44b2a0a57fb89741173c31676af0ccc822387dc Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jun 20 18:22:51 2006 -0700 Move Xserver API for security extension to securitysrv.h commit a54435946544a039fc333bb5e3438501d0d1ffc6 Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Tue Jun 20 18:14:27 2006 -0700 Move Xserver API for security extension to securitysrv.h commit 49b368c0bb04816c4a3579071c596b2398cae3ec Merge: 63f6e6bbf 481d4012e Author: Alan Coopersmith <alanc@alf.(none)> Date: Tue Jun 20 16:22:39 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 481d4012e74d9b0e98911f0ae02700ecf4cfc5ac Author: Alan Coopersmith <alanc@alf.(none)> Date: Tue Jun 20 16:16:19 2006 -0700 Don't add -ldl to XORG_LIBS if it's not needed for dlopen commit 63f6e6bbfd0d3677e29621af982c9392ead98dd7 Merge: 88ede2cec 6df52fb77 Author: Alan Coopersmith <alanc@alf.(none)> Date: Tue Jun 20 16:03:34 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 6df52fb7745c185c0168060f69cc6b4f5315914e Author: Alan Coopersmith <alanc@alf.(none)> Date: Tue Jun 20 16:02:55 2006 -0700 Delete code that's been inside #if 0 since X11R6.7. commit 75398cff82b56c0a8fc301e84e2087f59a61a360 Merge: 1f91b5726 2b5868540 Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Jun 20 15:49:47 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver Conflicts: hw/xfree86/loader/Makefile.am hw/xfree86/loader/xf86sym.c commit 88ede2cec79281a43cecb43ee6dec65770f82530 Merge: 227a31934 2b5868540 Author: Alan Coopersmith <alanc@alf.(none)> Date: Tue Jun 20 15:29:55 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 227a3193405147fbbee2971cc15bac92cc13285a Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Tue Jun 1 21:09:25 2004 +0000 Add XACE extension source files. (Copied from XACE-SELINUX branch in Xorg monolith CVS since these were never imported to modular cvs or git trees.) commit 1f91b5726c721778de0627c0139100744db06934 Author: Ian Romanick <idr@umwelt.(none)> Date: Tue Jun 20 15:03:13 2006 -0700 Fix a compiler warning about varibles being used without being set. Add some const qualifiers. Remove some "ugly" space around parenthesis. commit 2b58685402e70f123e131fd8146e6083ff5214a4 Author: Matthieu Herrb <matthieu@deville.herrb.com> Date: Tue Jun 20 21:07:53 2006 +0200 Check setuid() return value. Bugzilla #7116. commit 4365d16c8629e824973ee0c357efdfbfd28b672c Author: Kristan Høgsberg <krh@redhat.com> Date: Mon Jun 19 22:13:22 2006 -0400 Pull over convolution filter fixes from xgl-0-0-1 branch. Cherry-picking patches: 8a5ea68800b9d7dca90ff4e573ad8533852f1ea3 and 4d755fe14274a7293748ce9aa666ab85df6297c5 commit f818e0ab60da3779ab2602c6e6d3ff261b50917e Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:07:37 2004 +0000 Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE (cherry picked from 0106715000196c7b349a0b4494b61545f0f5e138 commit) commit 0707eb33d6826e1300a905edea28c12134600b12 Merge: 37f0ae024 98d17bba7 Author: Alan Coopersmith <alanc@alf.(none)> Date: Mon Jun 19 17:09:51 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 37f0ae02457bd22b27f8f30a373e5cb19f2fbaea Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:04:52 2004 +0000 Replace XC-SECURITY code with XACE security hooks (cherry picked from 8526cd6395490b03b279f1962df777fb0e4a9878 commit) commit 98d17bba716619e3402bd74c7c3e1c01d055ef6e Author: Alan Coopersmith <alanc@alf.(none)> Date: Mon Jun 19 17:07:59 2006 -0700 Tell git to ignore emacs *~ droppings and git .msg files commit 569c808a2375be71f835ee8693605487484bd22e Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 19 16:42:09 2006 -0700 Fix crash when using PICT_x4a4 by supplying an appropriate fbFetchPixel_x4a4. commit 8d9ccc90a54c786ca4ba5620ab0a965e3f3bc8ea Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:15:41 2004 +0000 Add XACE extension (partially cherry picked from 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 commit) commit 55426650417df4ec22ea0e2a67f6074f0ac1d54e Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 19 15:04:46 2006 -0700 Clean up gcc warnings from picture format CARD32 -> enum change. commit 520c80f4b807ae6419e70fe2b524532465b509ac Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 19 14:40:27 2006 -0700 Don't forget to step the rows when verifying the equivalence of fb/sys areas. This is only used by fakexa, but we would have missed some errors without this fix. commit e793f0eeee3e9c83b6a7b50d451fb6db12839087 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 19 14:06:02 2006 -0700 Correct component ordering when fetching [ax]4b4g4r4 pixels. Noticed by: rendercheck commit e1672a12eb70836a2ceec803d505294897ae8cd2 Author: Eric Anholt <anholt@FreeBSD.org> Date: Mon Jun 19 13:20:56 2006 -0700 Convert PICT_* names from #defines to an enum to aid in debugging. commit 9742d55c820a260a42a4537502295931d4529deb Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 14:40:14 2006 -0700 update .gitignore to handle Xprint move commit d97a21acb878bc4e5e6542912fbd820503bba312 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 14:36:54 2006 -0700 fix compiler warnings in hw/xfree86/i2c/fi1236.c commit 29c78321e86956c4ce0c1c899d82557f927e04da Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 14:36:41 2006 -0700 fix compiler warning in hw/xfree86/i2c/tda9850.c commit 9f2793551f335e5fb08990fc8bb9e05e0ffb68d5 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 11:50:47 2006 -0700 fix compiler warning in hw/vfb/InitOutput.c commit b20ae5ddb7682bafcee6f8bf0c8208a3f70b882b Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 11:38:52 2006 -0700 fix compiler warnings in hw/xfree86/xf4bpp/ppcGC.c commit 4d258f31967141e3c4a6e4abbef89ffa717e85aa Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 11:27:47 2006 -0700 fix compiler warnings in XTrap/xtrapdi.c commit 870cecb72c2cba44dc64cb202917453603c8f287 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Mon Jun 19 11:22:42 2006 -0700 fix compiler warnings in XTrap/xtrapdiswp.c commit a28652f9c35fbc009245382a5cc2a022f42366fc Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Mon Jun 19 00:57:18 2006 -0400 Another round of loader sense-beating. Remove the (unused) server export lists, a really bad hash table, the last vestiges of the other backends, and some miscellaneous cleanups. Good for dropping 300k from the size of the built server on x86. commit 98a602fab1f307a07a96868d7dae12b6f8d7f405 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Sun Jun 18 23:54:04 2006 -0400 Don't bother building RAC as a module, that's just absurd. commit 76aaf7eae7409162c5ed2963f2e27d019cb30263 Author: Eric Anholt <anholt@FreeBSD.org> Date: Sun Jun 18 19:47:29 2006 -0700 Add a couple of (doxygen) comments I wrote while looking at modesetting. commit 6aaf0e5b581b06fc73e56f863a26cd9d684eb9c0 Author: Eric Anholt <anholt@FreeBSD.org> Date: Sun Jun 18 19:12:15 2006 -0700 Add options to disable EXA acceleration for Composite/UTS/DFS, and always print out how much memory EXA is managing for offscreen pixmaps. commit 21ef7e17ef6dca177461c9438b9df707a4d664a2 Author: Eric Anholt <anholt@FreeBSD.org> Date: Sun Jun 18 18:57:55 2006 -0700 Add some missing .gitignore stuff for Mesa symlinks and other generated files. commit 71fbda8049f64c7fefae8ab817fb5f37ee2ee134 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Sun Jun 18 21:07:28 2006 -0400 Xprint/ -> hw/xprint XpConfig -> hw/xprint/config commit 868e2cab706e317618646e064b0559d4e68c7b32 Author: Eric Anholt <anholt@FreeBSD.org> Date: Fri Jun 16 10:17:51 2006 -0700 Add explicit dependencies (Xorg_DEPENDENCIES = ) on the internal libraries (such as libcw.la) that we link into the server, causing it to be rebuild automatically when they're updated. Some system libraries are included, but don't appear to cause any harm. You would think this would be automatic... commit 53f74b6aa95fe57fda45fd8a051595e772f00402 Author: Eric Anholt <anholt@FreeBSD.org> Date: Fri Jun 16 10:14:30 2006 -0700 Bugzilla #5120, #7246: In CW's GC ops, validate the backing GC against the backing drawable if the serial numbers differ. Fixes crash in XAA which occurred when the DDX bumped the serial number on the backing drawable and expected it to get re-validated, and we didn't because the wrapped drawable hadn't been bumped. commit 72ac20c0e878ad48ff61f7e846cbf1005a4eb435 Merge: fc3e81473 b90088321 Author: Ian Romanick <idr@localhost.localdomain> Date: Tue Jun 13 21:13:02 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit b90088321e6ef84970aa97d7c851af93f49bf4b7 Author: Ian Romanick <idr@localhost.localdomain> Date: Mon Jun 12 15:22:31 2006 -0700 Add arrayobj.c to the Makefile as well. commit f9f33b72e34eaeccea2a20f4a3dd68c2dbefc90e Author: Michel Dänzer <michel@tungstengraphics.com> Date: Mon Jun 12 20:19:11 2006 +0200 Track per-drawable damage to minimize UTS and DFS transfers. Based on work by Eric Anholt. commit 6060b612de6b41f872d034c6130770c1d189d0a3 Author: Eric Anholt <eric@anholt.net> Date: Mon Jun 12 20:12:31 2006 +0200 Provide option to report damage after operation is complete. commit fc3e81473a98d3b932faa73c0c01c21366a48a9e Merge: 4bedaad17 041ef2319 Author: Ian Romanick <idr@localhost.localdomain> Date: Mon Jun 12 09:41:06 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 041ef23192b193b87f6cfc3e74e2e77f9f47cd4b Author: Ian Romanick <idr@localhost.localdomain> Date: Mon Jun 12 09:39:18 2006 -0700 Add new Mesa files arrayobj.c and arrayobj.h. commit 4bedaad17dc75dfbada91f47e1007a8c090300a9 Author: Ian Romanick <idr@localhost.localdomain> Date: Mon Jun 12 09:29:05 2006 -0700 Add new Mesa files arrayobj.c and arrayobj.h. commit 4e3c9ab8c90d474a2224dbfa0807bc01fc012f7c Author: Ian Romanick <idr@localhost.localdomain> Date: Fri Jun 9 16:56:54 2006 -0700 Remove some static declarations for things that were removed in previous commits. commit 8b6596b1e1864dd79a3c53ee3ceb7a8e9bdb6ec7 Author: Ian Romanick <idr@localhost.localdomain> Date: Fri Jun 9 16:08:06 2006 -0700 Move probe_devices_from_device_sections, add_matching_devices_to_configure_list, and check_for_matching_devices from xf86Helper.c to xf86Init.c. These functions are only called from a single place in xf86Init.c, so it makes sense for them to live there. They were originally in xf86Helper.c because they evolved out another function that was already in that file. commit 7810d87cd6ae9316d88f6a2e7696deb8837cec27 Merge: dcfaa9f4f caad8b724 Author: Ian Romanick <idr@localhost.localdomain> Date: Fri Jun 9 15:16:50 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit caad8b724b97074e41de447fe77dda189f287a26 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 11:24:57 2006 -0700 fix compiler warnings in record/set.c (note this only fixed up the function definitions for the static functions which can not cause any abi incompatibility) commit 51489bb5ed86cb6aa07e26a13618765c29f913e4 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:59:47 2006 -0700 more .gitignore updates commit c4d251bd3e88cf8dfd6872537dbe30c07344b196 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:46:18 2006 -0700 updated .gitignore with more pre-generated files commit 9f31ef83be61a900c701fcbc9a43ffae40ca7005 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:44:46 2006 -0700 fix compiler warning in hw/xfree86/loader/loaderProcs.h commit 490ffc205a7714145cac0c63efeb6374ea28141f Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:44:25 2006 -0700 fix compiler warning in hw/xfree86/loader/loadmod.c commit 6119845d1ff832ea2b7c9cbe7ed6c6637cdcf305 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:14:08 2006 -0700 fix compiler warnings in hw/xnest/Keyboard.c commit 1a7335ff932baa59a3283c50dd6007d81989b7e3 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 10:02:08 2006 -0700 remove unneeded externs from Xprint/ps/psout.c commit 9583859d538394e98ac1f38b8e6f0997e321621d Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 09:59:22 2006 -0700 remove unneeded "extern" in Xprint/ddxInit.c commit cb9e29c184474edd75645e3b52e22a097a242e40 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 09:54:50 2006 -0700 removed unneeded extern in Xprint/ps/PsWindow.c commit 96c19a3ec1b7e43782d373b8015fa0ca24cb4f5b Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Fri Jun 9 09:51:28 2006 -0700 put function prototype for ShapeExtensionInit() in proper place based on FIXME in mi/miinitext.c commit dcfaa9f4f8fb10b75be50c9a49ccd88caf6d0f6a Merge: af9afe4cc 576e6fb11 Author: Ian Romanick <idr@localhost.localdomain> Date: Thu Jun 8 15:03:00 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 576e6fb1124a47493371210adf99d6f2076e72c5 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 8 17:49:02 2006 -0400 Bug #7120: Multimonitor (non-Xinerama) support for xwin servers. (Tom Whittock) commit d42cf4a2a4980fdd29fb15c4fd8fddda67b36256 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Thu Jun 8 17:46:53 2006 -0400 Bug #7121: fix clipboard handling in Xming (Colin Harrison) commit af9afe4cc50df973bea2293a803f7dfdefaa6411 Merge: caffac384 3930da3f6 Author: Ian Romanick <idr@localhost.localdomain> Date: Thu Jun 8 11:37:09 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 3930da3f6209312dd0f10aba0b16ef45996a07fe Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:27:29 2006 -0700 fix compiler warnings in Xprint/ps/psout.c commit c496a3b9c981dc079fcc6c0ac4db3aa912b3dcf1 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:23:53 2006 -0700 fix compiler warning in Xprint/ps/PsImageUtil.c commit ea24b5a25c2544f3b3de6480da125edb23a6b3a9 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:22:01 2006 -0700 add proper function prototypes for Xprint/ps/PsCache.c to Xprint/ps/Ps.h commit ee2bb4d1929e20436cf0e830ece02fe07db2d524 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:15:34 2006 -0700 fix compiler warnings in Xprint/ps/PsArea.c commit 92303d534a91cb0ea30e4cd0f639efd70b9739b4 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:12:16 2006 -0700 fix compiler warning in Xprint/ps/PsGC.c commit cf6169f9e99e6e8ab264f284cfa13cb379b36207 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:09:56 2006 -0700 fix compiler warnings in Xprint/ps/PsFonts.c commit 1abc7f96edf37a1e2c766b9cdba7fc9b2cb06d19 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:06:51 2006 -0700 fix compiler warnings in Xprint/ps/PsInit.c commit 2dc291384c550badf55542ae645240e166676848 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 11:04:40 2006 -0700 fixed compiler warnings in Xprint/ps/PsPixmap.c commit aef092e0290143c2b8b1cb98fdf55c9630032aaf Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:53:17 2006 -0700 fix compiler warnings in Xprint/ps/PsPolygon.c commit 511b231ded61159ebd70cab020ca1ca003fd0784 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:41:34 2006 -0700 fix compiler warnings in Xprint/ps/PsPrint.c commit 35fccb0068e8d73d1e6a16aefdc771506e620f83 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:40:24 2006 -0700 remove some compiler warnings in Xprint/ps/PsText.c Note that one of the existing warnings is pointing out a real bug (uninitialized use for fontPage in PsPolyText16()) if anyone really cares about this code. commit caffac38432009e8dc01e7d3e72a7fa6fba2f078 Merge: c5b3aa120 9fa73721f Author: Ian Romanick <idr@localhost.localdomain> Date: Thu Jun 8 10:38:43 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 1ac30947f4a222ba78558eddf8e5f03cec31f613 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:35:18 2006 -0700 fix compiler warnings in Xprint/ps/PsWindow.c commit 9fa73721f0c3df73e508da909a5665f47a54cb57 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:27:28 2006 -0700 fix up EnableDisableExtension() and EnableDisableExtensionError() prototypes commit c405659626477f2009603d8c0e381b8b62277bb6 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:19:24 2006 -0700 comment out QualifyName in Xprint/Init.c which is not used anymore If someone else wants to delete this function, that's fine with me too. commit a940b851faba569e36983f7885aefa72f7bf2ade Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:17:53 2006 -0700 fix function pointer warning in Xprint/Init.c commit 9e0c82386ae389bcc296a5ad44e996790b033ad3 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:16:37 2006 -0700 fix already-defined warning in Xprint/Init.c commit 40fb7eecaf14a76f35ac2dc350ad2fffdaf6e0d0 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 10:11:17 2006 -0700 fix noDamageExtension warning in Xprint/Init.c Also took out duplicate definition of this variable in mi/miinitext.c commit 494895e0fbbf0a71bc535c0a2358c9db54c95c5a Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 09:43:44 2006 -0700 Properly define dispatchExceptionAtReset to fix compiler warnings commit d90eecf40ea768b2bf6340f15bb0af9dab2f3cf3 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 09:11:41 2006 -0700 add some missing function prototypes to Xprint/AttrValid.h to fix compiler warnings commit bccde1609153dee93f6fe5a138fc0c0f2fe08212 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 09:01:59 2006 -0700 fix incompatible pointer warning in Xprint/ddxInit.c commit 60bd8893d50ed1da9b94f4b96a07ea432e23f467 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 09:01:21 2006 -0700 Properly #ifdef out ddxBeforeReset() to fix compiler warning commit ac21e6a594eac69101aa8920d70a9d60412b57f6 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Thu Jun 8 09:00:42 2006 -0700 remove unused variable warning in Xprint/ddxInit.c commit 71dd44b0ad617dd36ce4ed328f9e1e8c5ef713a5 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 19:17:26 2006 -0700 Fixed up most "warning: function declaration isn't a prototype" warnings from Xprint/ commit 839305bac98856a2bb1d96691e4dcf49db229f90 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 19:12:23 2006 -0700 Remove unused variables from Xprint/attributes.c commit c5b3aa120bf96ee169d07c33a2698499944a1624 Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 17:46:23 2006 -0700 Added a comment about some suspicious code. commit 50112dfcc82dd476727fa453b9e3d1852e06d678 Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 17:46:05 2006 -0700 Fixed severly broken calls to pci_device_find_by_slot. I mis-read the tag bits when I originally coded it. I mistakenly thought that the original code masked off the PCI function bits, so I just always passed 0 as the function. That was a mistake. commit f9e7128d948a0b62e6f03295305e0080d9233fd8 Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 17:44:06 2006 -0700 Added missing include of Pci.h. This caused the server to terminate when the symbol PCI_DOM_FROM_TAG couldn't be resolved at run-time. commit 23182315f34e3a0065739b43b15d4560e75b41a1 Merge: bc05158a5 757f40fca Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 17:03:48 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 7a40ac2585028860730ffcd333eb3fe9de63680c Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 16:23:45 2006 -0700 remove a bunch of unused variables in Xprint/Init.c (fixing the compiler warnings) commit 163980138cc0bfc9124456781b3dc45a49e2a129 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 16:11:20 2006 -0700 remove some unused local variables in Xprint/Oid.c commit 8e41640db884a4633b598d0a52b269e6547c8bf0 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 15:56:43 2006 -0700 add bison generated files to .gitignore commit 78f4ab6b89fca3086b9c9471b40c11c23fbb6142 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 14:12:40 2006 -0700 Fix compiler warning about undefined ReinitializeRootWindow function commit 757f40fca50a99377e437949ee77b983c8cd6087 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 14:09:13 2006 -0700 updated the .gitignore file with more auto-generated files commit bc05158a5ab00c548e4b04b5638afe07bc702260 Merge: 46f55f5de cc465800d Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 14:09:12 2006 -0700 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver commit 46f55f5dead5d70cdff30531d80a72f6be042315 Author: Ian Romanick <idr@localhost.localdomain> Date: Wed Jun 7 14:09:02 2006 -0700 Initial batch of changes for PCI rework. All future changes will be tracked individually. commit cc465800ddca5fb6c9ec09fdfa8f1f05359cf396 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 14:03:35 2006 -0700 Fix compiler warnings about SetVendorRelease and SetVendorString commit 785c9789704ed142fe98cd17b5995e4a95b7141f Merge: 21ebcfd70 36d786e9f Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 13:20:21 2006 -0700 Merge ../xserver commit 36d786e9f051c5c95c1cc8c098c84e118ed3cc85 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 12:47:50 2006 -0700 add more files to .gitignore commit 8f5aa38abf1158a789b5528df9d98826342e30cf Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 12:33:44 2006 -0700 fix compiler warning about XKB_IN_SERVER redefinition commit 101ae616962c355388722e05ab8413eb5f5c3402 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 12:06:22 2006 -0700 Add PanoramiXExtensionDisabledHack to globals.h as it was missing. commit e5b72bd9c6fb06640a5de4031be0dc9b04b4b215 Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 12:05:39 2006 -0700 Remove 3 compiler warnings in the Xext/xevie.c file commit e3c11f66516521959127b9ab8fd88cc4c954f5bb Author: Greg Kroah-Hartman <gregkh@suse.de> Date: Wed Jun 7 12:05:01 2006 -0700 Added first cut at a .gitignore file to make using git easier. commit 21ebcfd7027b2a6182d4065e56a2ef814f5181ae Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 7 14:17:31 2006 -0400 Demolish now-unused loader functions. commit f90761b06eaa5fa44fe85289e54eed5f47eff3b9 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 7 13:58:24 2006 -0400 Add a token for EDID-supplied modes. commit d00aa6b8559d3e5f70c6558ce0abd12f7d758491 Author: Adam Jackson <ajax@benzedrine.nwnk.net> Date: Wed Jun 7 11:44:36 2006 -0400 Delete a (now misleading) message from the crash handler. commit f8535edec736cf19740bd41ed2adfe531f2c26ac Author: Keith Packard <keithp@neko.keithp.com> Date: Tue Jun 6 10:29:34 2006 -0700 Remove ChangeLog file. commit 8444bb77c91cf8a23d32b3cc9749e2a3d3f9f9eb Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Jun 5 20:22:06 2006 +0000 When we can, bound the maximum number of PCI devices to attempt to scan, by the number found on the system. Only implemented for Linux right now. commit 11cf4d2fde9219e8d6ca427acae89a0c9f5d71b1 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 5 07:15:23 2006 +0000 Update AC_DEFINE_DIR to version compatible with CVS autoconf which requires double eval to avoid leaving ${prefix} in output commit 52fc7c8dc70226cc7f03454e9be86a627672295f Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jun 5 03:00:24 2006 +0000 Ensure all *ModuleData symbols are marked _X_EXPORT. Start removing XFree86LOADER ifdefs, non-loadable hasn't been supported for a while now. Remove completely gratuitious REMOVE_LOADER_CHECK_MODULE_INFO ifdefs surrounding a call to a function added in XFree86 4.1 (!). Miscellaneous static markings. commit d22582dc5a070f72d4653e24d1e4ebe4a112276e Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jun 4 16:13:26 2006 +0000 Remove a stray LBX reference. commit ddc6b99505e227f99585b8c2392da524022a73e6 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jun 3 11:24:33 2006 +0000 Bump to 1.1.99.2. commit 4fd668940f2155c4b06d24b6da8bcccd01f66f4c Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jun 3 10:58:37 2006 +0000 Bug #6619: Fix disappearing hardware cursor. (Colin Harrison) commit ee71cb61f8da29bcf36ea4b199d629e34f89b119 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jun 3 10:54:38 2006 +0000 Bug #6956: Fix crash when removing session leader before its children. (Rich Coe) commit cd384af3058fe15077c57eccdffed3b61e261e7f Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jun 3 10:50:23 2006 +0000 Completely remove relocation pointer table. commit 8e8c6faecddbe014d8760822e1f705b43a00fa33 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jun 3 10:48:37 2006 +0000 Add support for kFreeBSD systems. (Robert Millan, Aurelien Jarno) commit 5b703f847d166176920077c1e6ba1d9559fc8481 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jun 2 12:05:32 2006 +0000 Fix type confusion. commit 56f21bda1ce95741c88c423b60bd709eef26eb12 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 22:30:52 2006 +0000 Bug #6583: Only open /proc/bus/pci/devices once. (Bill Nottingham) commit a9ed5a87902a839a5a135af03db78f113b18bd86 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 22:06:41 2006 +0000 Kill LBX, too. commit df6da66525836d515f408a82f1a13ca5251ff0f7 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 20:56:39 2006 +0000 Simplify the unsupported XI function list. commit 97203f1cf6e5b7c6389f69cbb1b75ac675d09531 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 20:41:21 2006 +0000 Clean up a warning, and remove excess multiple-suffix code. commit 6d594ebc667afd404556ec3e108c810946b20ac5 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 20:22:39 2006 +0000 Ditch more alternate-loader braindamage. commit c9468177486833d521ec62c7b0266b4be8200de7 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 20:18:30 2006 +0000 Kill a.out, COFF and ELF loaders with FIRE. commit a3a4221495dfe4cc0a3874a08dd5364ef45a7f2e Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 1 19:53:06 2006 +0000 Add bitmap to the ignored module list. commit ee689c104287140db38bbd26959ab1b4847c168e Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 19:49:55 2006 +0000 Ignore requests to load GLcore and speedo. commit 07c731a2bc21e6b98f28a2c0ebc42f01b67b824b Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 1 19:37:53 2006 +0000 Bug #5089: Die, libbitmap, die! commit 32be08ba7242da74de5defd6a4dcb536a273f57a Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 19:22:38 2006 +0000 Remove horrendously ugly DDX backward-compatibility. commit d81edb9e00680e3c0001f343fa1d0c310b86cb93 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 19:22:01 2006 +0000 Forgot to remove this one too. commit a73e0f8cdfec1c9199ffe696146ba7d677c4c10d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 18:47:47 2006 +0000 Die XTESTEXT1, die! commit fc5ca97284ef237a91f6adb433148ff57a673c08 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue May 30 22:56:36 2006 +0000 Powerpc machines also need ioperm_noop.c commit 07b168c8d8b2d79a4e7cf8dc5124eafc0f2bbcd0 Author: Adam Jackson <ajax@nwnk.net> Date: Tue May 30 16:10:59 2006 +0000 Properly document the DPMS, SyncOnGreen, and TargetRefresh options. commit 107defd920d9b1eb52b15e8ca8665bc48bb933d6 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon May 29 19:53:18 2006 +0000 Remove superfluous definition of tfp tokens. commit fd8bde8bb0f9d796b3464973b53285c0a6d22a31 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 29 11:14:03 2006 +0000 Remove -xkbmap argument. commit db0680cf70b8367e1f8a7fff9c0f6ec414db0542 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon May 29 09:26:32 2006 +0000 Minor #include cleanups. commit c38aab293a06f43c04f14223f94f822d91d73396 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat May 27 23:15:05 2006 +0000 check buffersize before reading next char, fixes the "mouse stuck at left" bug (bugzilla #3113) for BSD systems using wscons. (Dale Rahn). commit 2102fdd0a58e18aeaa842b2ec73b6071970fafb7 Author: Jeremy C. Reed <reed@reedmedia.net> Date: Fri May 26 00:12:18 2006 +0000 RGB color database and XErrorDB install to "share" not "lib" by default (by app/rgb and libX11). TODO: They are customizable, so maybe cpprules.in should be extended. commit 354086d7e8e13fc7acbcc6603ca2a03c8cc806ee Author: Jeremy C. Reed <reed@reedmedia.net> Date: Thu May 25 23:32:33 2006 +0000 Don't do fixup_video_driver_list if no drivers. (I had signal 11 and core dump when drivers not installed yet.) TODO: fix fixup_video_driver_list to handle NULL argument. commit c6b1cff43238deded11dc58945778aec3d844598 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu May 25 13:27:42 2006 +0000 update to build against Mesa CVS HEAD (Carlos Eduardo Rodrigues Diogenes). commit 99724c16c9c58eb3e20ba91c79464747b8ee3fcf Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu May 25 10:14:39 2006 +0000 typo commit 5c7aef148de23f39027fda647bbb53bb5b992683 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu May 25 09:57:47 2006 +0000 Don't destroy a pixmap twice on server exit (bugzilla #4247). commit 693079442377daa2dc48bf318a0d7dd256cb2738 Author: Jeremy C. Reed <reed@reedmedia.net> Date: Wed May 24 22:58:03 2006 +0000 NetBSD also has curses.h instead of ncurses.h. (TODO: Maybe instead of checking for SCO, UnixWare, Sun SVR4 and NetBSD, the curses.h versus ncurses.h should be tested in configure.) commit 9477e5e0be04f4f6fa311de8b3693fbc8a082fbf Author: Jeremy C. Reed <reed@reedmedia.net> Date: Wed May 24 22:43:13 2006 +0000 On NetBSD, add -li386 for i386 and -lx86_64 for x86_64 to SYS_LIBS. (x86_64 on NetBSD not tested.) commit b3031532ca96b22e81863202efb8bbcb9d701fac Author: Jeremy C. Reed <reed@reedmedia.net> Date: Wed May 24 20:11:38 2006 +0000 Remove tolower() which was missed in the _XkbStrCaseCmp/strcmp changes. commit eb696f72a0819edef550bce9ff55730c02f70452 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue May 23 16:17:09 2006 +0000 Add AC_SUBST([SOLARIS_ASM_CFLAGS]) that I forgot when splitting them out of the XORG_CFLAGS. commit bc0c56c407117d1545e20d21f7d30eb3472d618b Author: Adam Jackson <ajax@nwnk.net> Date: Mon May 22 15:47:56 2006 +0000 Bug #6924: Restore the ABI for DrawableRec and ColormapRec to the state they were in prior to the fix for #6438. Based on a patch from Andy Ritger. commit cc3b882bd141218052cdde0144fc2a707ceee83d Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat May 20 00:55:44 2006 +0000 Update to 2006-05-19 snapshot Remove entries now present in pci.ids Regenerate from updated pci.ids & extrapci.ids commit 0b2c2b6bba5b578d5f0ac2d709d5d2ce7cb32bef Author: Adam Jackson <ajax@nwnk.net> Date: Fri May 19 20:29:47 2006 +0000 Remove dead DPMS timer functions from the installed headers. (Fredrik Höglund) commit deebf6bd51117c01a3217f134bd952481b9e41ab Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 18 23:52:51 2006 +0000 Bug #4139: Fix a BAR remapping bug that could lead to IERR and system hang. (Egbert Eich) commit 91239d83f4e27835cf871348b5ff6c892bd4f4f4 Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 18 23:52:41 2006 +0000 file getemptypci.c was initially added on branch server-1_1-branch. commit c11cfcfaffc79be5686c666f881c4c08f69e1b86 Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 18 23:48:57 2006 +0000 Bug #6377: Ignore disabled BARs, and allow matching BARs aligned to less than 16 bytes. (Felix Kühling, ATI) commit fa9a49a92db52de968d7147c71c6b9a8fd480f1e Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 18 18:18:41 2006 +0000 Bug #5877: Avoid burning CPU when acpid dies. Require acpid to be running for ACPI support on Linux. Minor errno handling fixes. (Valery Inozemtsev, Adam Jackson) commit 7893dadb2f6df218a4f4ea30a41c1aa9838da1f0 Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 18 14:39:59 2006 +0000 Bug #6827: Fix texel fetch in fbFetchTransformed to avoid crashes. Still not 100% correct, but better than 7.0. (Radek Doulik, Matthias Hopf) commit 2892dd6d2e34957650ef1630a94d471dfa71f888 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed May 17 16:20:03 2006 +0000 Make Xv symbols conditional. (Enrico Wiegelt) commit a317bf482257f0e1b612dec7961fdfa564f0b9f2 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed May 17 15:00:18 2006 +0000 Make DBE support conditional. (Enrico Wiegelt) commit 321dbed5f5a857a23525167ab85d4d7699429132 Author: Adam Jackson <ajax@nwnk.net> Date: Mon May 15 18:27:18 2006 +0000 Bug #5209: Fix APM/ACPI support, again. (Michel Dänzer, Valery Inozemtsev) commit dd38d3bd673cf830c2cd591fe1245909aa729892 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun May 14 16:22:24 2006 +0000 Don't use AM_CONDITIONAL inside shell conditionals. Bugzilla #6916. commit 6558ba4e62dba99f2a4d830f1c16f8d1c255b316 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri May 12 21:53:28 2006 +0000 Fri May 12 17:51:26 2006 Søren Sandmann <sandmann@redhat.com> Keep track of the previous item and update its next pointer when deleting from the linked list. commit 9e239a0df7ededb50de091e5271cbfddd2b683c3 Author: Matthias Hopf <mhopf@suse.de> Date: Thu May 11 11:23:43 2006 +0000 Bug #5796: Wrong fastpath selection for repeating sources. commit 9db5d2dfc33e384ea4db1b7cbc377e0b05cfb3ff Author: Matthias Hopf <mhopf@suse.de> Date: Thu May 11 10:18:08 2006 +0000 Bug #4320: Improved XAA Composite fastpath. commit 9a2a63ca3ff30d15e82a29e75a3720ba5b446978 Author: Adam Jackson <ajax@nwnk.net> Date: Wed May 10 15:44:27 2006 +0000 Bug #3561: Crash fix in the Record extension. (Paul Anderson) commit ab1a0249ba5e3174f18a1db212bc511fd7d74cb0 Author: Adam Jackson <ajax@nwnk.net> Date: Tue May 9 22:36:01 2006 +0000 Bug #6867: Yet another Render crash fix. (Michel Dänzer) commit 24310f827b71009c7510a674d2f92ced89847e37 Author: Adam Jackson <ajax@nwnk.net> Date: Tue May 9 18:12:50 2006 +0000 Revert accidental commit commit 86ffb46358965509aa3ee536f15cb5a4e5e04426 Author: Adam Jackson <ajax@nwnk.net> Date: Tue May 9 18:04:29 2006 +0000 Bug #5209: Re-enable building APM and ACPI support. (Michel Dänzer) commit b46d6a44fa97a3e66de828385026b7f84d9e59b8 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed May 3 23:45:16 2006 +0000 Make Xephyr build on Solaris: Add #include <sys/file.h> on Solaris for FNONBLOCK/FASYNC definitions hw/kdriver/linux/Makefile.am Move agp.c & agp.h to KDRIVE_HW_SOURCES since they're not needed for Xephyr-only builds Add -lrt to XEPHYR_LIBS if needed to get nanosleep(). commit fc91ca069dd55490b99b096f029e0864b049120c Author: Adam Jackson <ajax@nwnk.net> Date: Wed May 3 17:50:10 2006 +0000 Redact a few mentions of speedo font support. commit b9a9cf618566bdd796556b8a1f31949f66184352 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue May 2 14:09:30 2006 +0000 Typo in ALLLOCATE_LOCAL() arguments, causing mis-computation of the buffer. Bugzilla #6642. commit 1e8a594957d84a37e66183e9c0cb9d42b62bdb24 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue May 2 01:37:25 2006 +0000 Fix Solaris build with Sun compilers to work when exa is built before hw/xfree86/os-support/solaris (as it is by default now). commit 724dbc2f8bbe2f21bf16f20ca7b8bb555516626c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue May 2 01:30:37 2006 +0000 Use min() [defined in include/misc.h] instead of MIN() [not defined in any Xorg header]. commit ad124742ae2a265a54a4a7ac91709ec6fd6ced34 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 30 20:33:27 2006 +0000 Remove stray mfb/cfb references. commit 291e89d4f2a4bb3177b2dfe6421680e23f120b8e Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 30 19:16:14 2006 +0000 Remove NEED_LINEHELPER BC cruft for pre-R6 DDXes. commit fdcacc5a4bc1d6cb7347fc66041a9c686c5c74d1 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Apr 28 03:27:12 2006 +0000 Add Polylines and PolyPoint acceleration as well. This is primarily to clean up fallback debugging output, so I can focus on more imporant cases. Performance is comparable but without hardware stalls, and passes Xlib9. commit 005529a1c9c9e78f06565dff081f03b74988081e Author: Eric Anholt <anholt@freebsd.org> Date: Fri Apr 28 03:26:30 2006 +0000 Correct some bugs causing performance issues in the "Smart" scheme. commit 8738bc295bba229e36d064713e0c28aa8720c494 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Apr 27 20:27:27 2006 +0000 Improve EXA fallback debugging output to include the locations of pixmaps. This is being used in tracking down recent compositing performance regressions. commit 83b061776a57025076fc26d6d01fe2e049c2243b Author: Eric Anholt <anholt@freebsd.org> Date: Thu Apr 27 19:17:34 2006 +0000 Add trivial PolySegment acceleration for 0-width horizontal/vertical lines, which still happen somewhat frequently and were cluttering up my fallback debugging output. x11perf says it's a major performance win in those cases (though probably irrelevant), and it passes Xlib9. commit 69164ec00c749787dd59d5913ec6b3d159ad74d7 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Apr 27 02:15:19 2006 +0000 In drawing glyphs, shortcut our way to exaComposite instead of going through the whole CompositePicture stack and doing things like computing damage over again. This is a sizeable win for text drawing with a compmgr. Also avoid calling down into the server for dealing with the scratch pixmap when we are able to do UploadToScreen successfully and never need it. commit 3d4ca57b69c40d27fe191170d0819013f8cc4947 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Apr 26 18:27:40 2006 +0000 Add a helper for the Component Alpha Over case, which breaks the operation down into an OutReverse and an Add. Turn off the fallback to software glyphs when component alpha, now that we expect all (new) drivers to be able to support it. Also, make Xephyr fall back in the CA Over case to exercise this code. This speeds up my rgb24text and ls -lR in gnome-terminal by a factor of 5. commit 26fa45b64258894201496f921eccb0cb7028c28c Author: Dave Airlie <airlied@linux.ie> Date: Wed Apr 26 11:40:58 2006 +0000 Bug #6751: Use the Linux PCI ROM interface on Linux properly. The old domain code, still modified BARs not a good idea, Just talk to sysfs, if 0 read, fallback to old methods. commit c339b221d3f59130a39e63d4cec3de7e3de95bf3 Author: Dave Airlie <airlied@linux.ie> Date: Wed Apr 26 11:31:07 2006 +0000 Bug #6750: This patch detects Intel bridges that are transparent but aren't reported as such. From the Linux kernel fixups. This patch also removes the reserved BIOS area from the area to allocate resources in. commit 6d156c044085881c6ecbd8a13521c0a26df71c30 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Apr 26 01:33:15 2006 +0000 Improve the migration debugging output. commit eaed7545a25a08b3223bf620c2ab6f80fe7cfdf6 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Apr 26 01:32:55 2006 +0000 Fix a bug in the intersection computation that could concievably cause incorrect results to be returned (but would probably usually be over-conservative). commit 5d00859c6e7d4b7ebce56f438ec4993334de2328 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 25 23:56:17 2006 +0000 Bug #4668: Check if the lists of glyphs don't have any intersecting glyphs, and if they all have a maskFormat matching the format of the actual glyphs If so, we can avoid the temporary pixmap for accumulating glyphs, which reduces the number of operations done, and makes it easier on the migration system. This fixes some significant performance issues, particularly with subpixel antialiasing. Note that it does increase the amount of damage computation which is done, so is not always a win with a compositing manager running. commit 074dc9a023b3967ce00aa42c26a7c988423afe8a Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 25 16:47:23 2006 +0000 Add an option to verify at the point of migration that pixmaps which aren't marked dirty are in fact not dirty. This will hopefully help catch issues like the previous commit. Leave it on in fakexa. commit 702d9226d57ec1584de2e8a85c268795650b1094 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 25 15:46:04 2006 +0000 Don't forget to mark the drawable as dirty in exaPutImage(). Fixes corruption with drivers that have UTS. (Michel Dänzer) commit 39ca0867c7dd6f3bdecc52aec8df435946682098 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Apr 24 05:44:06 2006 +0000 Remove another reference to cfb16. commit 81f3c2937df6230542f3223c201da8c41ff59945 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Apr 24 05:39:47 2006 +0000 strlcpy() doesn't exist on Linux, so use the implementation in os/. commit a715634d23fb3124261dbbd8d7d4e6522551bb9b Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Apr 23 13:14:50 2006 +0000 Don't access free memory after unloading a module. Bugzilla #4168. commit 79dc6892610c9f8385cde4f0d601cc7481225c16 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Sat Apr 22 03:22:17 2006 +0000 When reading the kernel keyboard mapping (readKernelMapping in os-support/linux/lnx_KbdMap.c) we overrun the usefully-named global array 'map', scribbling on other random static variables elsewhere. This is fixed by changing the size of at2lnx. (David Woodhouse). Bug #5169 commit b37c515320dc8df2b1d160cc3f37d6bfac109b91 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 19 21:56:13 2006 +0000 Add support for x4a4 format (depth 4 at 8bpp). Bug #6325. commit c947d796aad0b81d661a10b787deed967376da79 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 18 19:18:43 2006 +0000 Missed in previous commit: Add a new migration scheme, called "Smart" for lack of a better name. This one behaves somewhat between Greedy and Always. It moves in if we can accelerate, unless the destination is clean and shouldn't be kept in framebuffer according to the score, in which case we migrate out (and force-migrate anything where migration is free). This should help fix lack of acceleration for drivers without UTS since removing exaAsyncPixmapGCOps, and has removed one performance trap with Radeon I'd noticed. It is the new default. commit b17a4de83e7ab18bef29ae898195889638f1cc6a Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 18 19:14:07 2006 +0000 Add a new migration scheme, called "Smart" for lack of a better name. This one behaves somewhat between Greedy and Always. It moves in if we can accelerate, unless the destination is clean and shouldn't be kept in framebuffer according to the score, in which case we migrate out (and force-migrate anything where migration is free). This should help fix lack of acceleration for drivers without UTS since removing exaAsyncPixmapGCOps, and has removed one performance trap with Radeon I'd noticed. It is the new default. commit 771b366abe0bc060592b548612ec413291e14bf0 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Apr 18 18:50:35 2006 +0000 Fix exaGetPixmapFirstPixel to migrate as unaccelerated. Also adds a bit of fallback debugging info to PolyGlyphBlt. commit 782d61a03176264e0a9eb222ae97be3d175cf0ab Author: Donnie Berkholz <spyderous@gentoo.org> Date: Tue Apr 18 17:28:44 2006 +0000 Update all prefixes in config tools, so they mostly work again. Also, make RgbPath commented out when using xorgconfig. Start using /dev/input/mice as the default mouse location on Linux. commit 0f065059dcaf9c452f1cdec115f619f697fd71cc Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Apr 17 07:27:43 2006 +0000 Wrap a couple more SDK headers in if XORG, as per Dave Airlie's commit on 2006-01-18. commit ba632f697a782cd47870705b6cecaac2c60d30ff Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Apr 17 07:10:31 2006 +0000 Fix kdrive build by linking in libexa before KDRIVE_LIBS. commit 0e62d92d5b809bc3a6503e9bc386cf961fc22557 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:43:32 2006 +0000 Coverity #804: Another leak on OOM path. commit d61219aaadf9e4aa83644a69627d3a1d3282c95f Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:38:11 2006 +0000 Coverity #806: Another memory leak on OOM path. commit 1b04e313920447e4c1f42bdd5a61f188d463210c Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:32:22 2006 +0000 Coverity #847, #848, #849: Three more memory leaks. commit 6545051902f2ce00c98bd1373f97ebc942667e9c Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:10:59 2006 +0000 Coverity #1003, #1004: Two more useless null checks. commit ab1d420022fb09d36a0d6ad948c38147c65b9adf Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:09:38 2006 +0000 Coverity #1005: Avoid a null deref. commit d01e0956a8903fb41e8a34c78973b9b2860b6446 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 23:08:10 2006 +0000 Coverity #1007: Fix a silly null check. commit 6d29f659318364afe046dc242d6f506ce40a944a Author: Luc Verhaegen <libv@skynet.be> Date: Fri Apr 14 23:01:35 2006 +0000 CVT means Coordinated Video Timing instead of Common. commit 82b6ea1a4b414426072bf001daeb3e9de0e93589 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 14 22:51:19 2006 +0000 Bug #6580: Don't install xf86drm.h, that's libdrm's job. commit aefa347bded9a3179ab139d0ccddce314040e9b9 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Apr 13 21:08:25 2006 +0000 Fix build for added file to Mesa CVS. This is always fun. :( commit 6aadd454e70d83921685b58bf57ec30d95920734 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Apr 10 10:11:19 2006 +0000 Fix stupid thinko. commit c9f6e60d42dec82d06995c05a2a011c338cadd87 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Apr 10 08:50:33 2006 +0000 Coverity #826: Fix potential memory leak. commit 1357af2474be9a3bce7ee2350fd4252eee89a3b1 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 9 17:39:10 2006 +0000 Coverity #340: Fix potential NULL dereference. Clean up proliferation of 'register int n' in loops of ProcXkbGetNames. commit f324be00c547effc698ae6679d12ffe90bd90e43 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 9 17:28:42 2006 +0000 Coverity #324: Fix potential NULL dereference. (Alan Coopersmith) commit 7637aa17f21e26d979fbb210a638d6751c98b1eb Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 9 17:26:17 2006 +0000 Coverity #169: Fix potential fgets() into NULL (?!?). commit d5bc41b88272b4a3a1841cc1189720b0549db215 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Apr 9 17:15:51 2006 +0000 Coverity #323, #445, #446, #447: Fix potential NULL dereferences. commit 2387bfa5ff5ed82f3f732fb9152c1ea95850a914 Author: Aaron Plattner <aplattner@nvidia.com> Date: Fri Apr 7 18:56:04 2006 +0000 Bump the ABI versions. Due to Glyph privates and the XV update below, the video driver ABI needs to be bumped to 1.0. The rest of the ABI minor versions were bumped to include the LoaderGetABIVersion function. Add a DrawblePtr argument to the XV hooks. This allows drivers to determine that the target window is redirected and draw to the appropriate place. commit dc43909219fe2a4d03139638814b89032b2921b9 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Apr 7 17:49:32 2006 +0000 Fri Apr 7 13:46:45 2006 Søren Sandmann <sandmann@redhat.com> Use FreeResource instead of deleteCompOverlayClient() commit 94e7213d594dbbb53a6bb05d1dab7514c4ff5350 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 16:08:50 2006 +0000 Remove libc wrapper types from Xisb interfaces. commit 47bdc9528c2dd4ea9d59a0944c023173ea7a7a66 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 7 16:07:50 2006 +0000 Coverity #844, #845, #846: Fix memory leaks. commit 2c90c3bfef8563f739a72bb645dd52b35b6ff6d5 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 7 15:57:17 2006 +0000 Coverity #987: Avoid potential NULL dereference. commit 843146cfbaef234e13df9a62b6f0232a5efdf7f0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Apr 7 15:53:21 2006 +0000 Coverity #1216: Fix double-close of file on error. commit 5dacc822327689c0f096093756473c96fba67d76 Author: Keith Packard <keithp@keithp.com> Date: Fri Apr 7 02:20:11 2006 +0000 Coverity #333, #334 - eliminate unncessary test for always true condition in fbEvenStipple. commit 75a9afdbf42e4196471774102e1758f18866bec6 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:53:43 2006 +0000 Coverity #488: Avoid smashing an array on malformed config files. commit 20c1ef2cc30abe45eeaf5b0833cbc0095ed05c02 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:50:07 2006 +0000 Coverity #769: Fix a potential memory leak for systems that allocate on malloc(0) commit 5ef711032b821be82fd7281fe64872bcbaff0327 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:41:00 2006 +0000 Coverity #838: Plug two more memory leaks. commit 69477ea4b6e666940c5dd4422bedfa6432dead04 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:37:11 2006 +0000 Coverity #837: Fix another another memory leak. commit b472ce7307dd88a21c7713a2b127e34f5c2bc817 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:35:43 2006 +0000 Coverity #836: Fix another memory leak. commit 9c84ed5f8d9eded1a8b509c9cad1ca0ebcf2166a Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:34:29 2006 +0000 Coverity #835: Plug memory leak in extension section parsing. commit 12924d0da36ad2266bb040caac58534c07e85261 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:29:39 2006 +0000 Coverity #812: Fix parser memory leak. commit 49abff79957799e9229d5c0226ee1b0d7505003d Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:26:33 2006 +0000 Coverity #818: Avoid memory leak on error path. commit bda292120fc97f890c1f58a31177c0f7c0bfa048 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:23:50 2006 +0000 Coverity #985: Avoid segfault on malloc failure. commit 536628bb4bcb0a0d749e0c01412a5eb5d6d24063 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 7 01:18:01 2006 +0000 Coverity #1037: Sanity check idx before use. commit 53e97ce4ddd993248561c245143b61915ea254b5 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Apr 6 22:04:12 2006 +0000 missed a line while removing cfb16 commit 4ae12636694af05cee4287b119bde08e9ceaa8aa Author: Adam Jackson <ajax@nwnk.net> Date: Thu Apr 6 18:59:11 2006 +0000 Remove cfb16, no longer used. commit e1fc15a85fb367ee9afd63c920c3327c3f45158d Author: Fredrik Höglund <fredrik@kde.org> Date: Wed Apr 5 21:08:45 2006 +0000 Put the screensaver extension back in the Xext module. Move the screenSaverSuspended variable to DIX globals. Restore the old link order for the Xorg and Xdmx binaries. commit 383c2e1e9ec54ab9de356993ad552c1aa6ec094f Author: Ian Romanick <idr@us.ibm.com> Date: Wed Apr 5 19:52:12 2006 +0000 Include fbmmx.h in fb/fbwindow.c when USE_MMX is defined. Fixes build problem on x86-64 resulting from fbHaveMMX being a macro instead of a function on that platform. commit 4697da177d545a2f8bb6fd0d6588a1c40532c339 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Apr 4 18:30:28 2006 +0000 Initial checkin commit 83ea57bcc82f478a7ecdcd6ed73ca4be01cd9c26 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Apr 4 14:39:06 2006 +0000 Bug #5729: Convert xf8_16bpp to fb. chips(4) users please test. commit 4c7da861185080d15b3ff4301af4af0e85a71f93 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Apr 4 14:17:04 2006 +0000 Bug #5300: Fix missing spaces in the Build OS line in the log. (Egmont Koblinger) commit fb6f61b50f1c701041680e49f6a406a6603f1577 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Apr 4 12:36:16 2006 +0000 Bug #4806: Dump the raw EDID contents in hex to the log file for better debugging. (Philip Prindeville) commit 14af50371c7f23855781924cdf6afa6ab7566a87 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 22:00:06 2006 +0000 Bug #2142: Make font path logging more readable. (Eduard Fuchs) commit 373f9f92566290d979730c09c9c5c5d50e23390c Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 21:45:54 2006 +0000 Bug #4766: Convert all Xprint drivers to fb. commit d9b8bfbfafe8758ceb629606607e37546d51ca52 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 21:16:30 2006 +0000 Bug #5478: More use of fbSOlidFillmmx. (Jim Huang) commit b0e67782653033c6518944adfbf23e466bd8bc39 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 19:50:15 2006 +0000 Bug #6346: Build fix when using gcc -mno-sse. (Jonathan Adamczewski) commit 66500819b1ca730a7b1df400a8368a08cbe49335 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Apr 3 11:37:30 2006 +0000 Bug #1358: Make ISO_Prev_Group cycle/wrap as ISO_Next_Group does. commit 2a6c11aa3b06f13dad94f3441c7184e6720a2bf4 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Apr 3 09:12:28 2006 +0000 Fix a server crash due to memsetting beyond allocated memory when running GL applications. commit f6ca2b3ea92b7fe98408c51a17a590435e808b1d Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 02:15:55 2006 +0000 Coverity #38: Dead branch elimination. commit 9b9dd747d8f4697c6d5c947c160d5991c7c8fde5 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 02:13:47 2006 +0000 Coverity #75: Dead variable elimination. commit 3f87aeefb4be3ac23ae636d3756ffdc446eaa62d Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 02:12:11 2006 +0000 Coverity #82: Dead variable elimination. commit 61926dbe592468076f8c9a666f0098d067d2213e Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 02:09:05 2006 +0000 Coverity #271: Fix an unbelievably boneheaded NULL chase. commit 7ef95da8a3e22e710882590fc47d56893159cb5d Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 01:51:54 2006 +0000 Coverity #616: Fix a rare memory leak. commit 01ebd633017249c496f378df511586c973d49708 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 01:43:33 2006 +0000 Coverity #833: Fix a rather nasty memory leak. commit a01f17d6dec02f80144e108f748783cb4e429ebb Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 01:35:05 2006 +0000 Coverity #983: Move some risky debugging code inside #ifdef DEBUG. commit c03cfca3806f45948627715b25b46839a07be979 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 01:31:59 2006 +0000 Coverity #986: Prevent a NULL chase. commit 07ecf49521973bbb205b199c39e1171f1163df2b Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 3 01:28:11 2006 +0000 Coverity #992: Prevent a NULL chase. commit c6b3b3354c2d9139b19b132051d434e97dd19715 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 2 22:51:42 2006 +0000 Bump to 1.1.99.1. commit 7e085f52b6f07c076bd3bcfdce27c17d14d7822e Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Apr 2 22:31:13 2006 +0000 Use xf86LoaderCheckSymbol to check for DRI symbols instead of dlsym, avoiding RTLD_DEFAULT. (__glXDRIscreenProbe): Change GLX-DRI to AIGLX in LogMessage for consitency. commit b2097b99a2e6cc045ee9b6d80946bc06c4d9302c Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 2 21:45:03 2006 +0000 ../stub commit 4e3a4cfdd1d7153eb88aab05ed02ddb32601ae93 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Apr 2 06:22:05 2006 +0000 Use RTLD_DEFAULT, rather than relying on NULL happening to map to it as it does on Linux. commit 323fec20292fc5ad90bfee9015ecccdc13c968ad Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 2 00:46:20 2006 +0000 Reorder link order for Xdmx to fix new screensaver variable reference properly; remove previous awful hack. commit a605b9ffd3c2e7d227e35b911761f720bf07b7e6 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Apr 2 00:09:43 2006 +0000 Fix some includes to point into X11/fonts/ properly. commit e5b1d38e142807b59ce4ec89764c949f707ec541 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Apr 1 23:53:33 2006 +0000 Disable Xprint freetype support momentarily. Needs ttf2pt1.c, which exists in the monolith but has an advertising clause in the license. commit ccca76b8083b83825fa16483b44e8926a35412bb Author: Eric Anholt <anholt@freebsd.org> Date: Sat Apr 1 23:41:23 2006 +0000 Clean up warnings and a debug printf. commit 6afa814ab16f351b2eb787e5bf481a1f9738b391 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Apr 1 23:28:17 2006 +0000 Pull out fb's tile handling during fbValidateGC so we can do the necessary exaPrepare/FinishAccess()es. Revealed by xtest with fakexa. commit 277f612d4eeb89adb8ccda4e8fd3d211d8d1705e Author: Adam Jackson <ajax@nwnk.net> Date: Sat Apr 1 23:19:08 2006 +0000 Hack around the new screensaver variable for DMX, which is otherwise blissfully ignorant of it. commit 5f95146fcfcae60cc29265799ba3b851647105d6 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Apr 1 22:35:16 2006 +0000 Export exaPrepare/FinishGC to the rest of EXA, and use it in the ImageGlyph implementation to avoid unprepared access to the tile. Also, relocate the fbGetDrawable to avoid using a stale dest pointer after exaSolidBoxClipped() may have migrated it. Revealed by xtest. commit c720ffe875e4b2038746ff9b4767f8b90db0a307 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Apr 1 22:17:44 2006 +0000 Use fb's depth-to-planemask computation, which doesn't suffer from getting a 1 planemask at depth 32. Fixes Get/PutImage xtest tests. commit 5c0a2088e229d05c38e5df7daea45af0d7db7daf Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 1 21:49:44 2006 +0000 Bug #6428: Fix off-by-one error when walking off the end of the vmodmap list. commit 1e764feab595b781dab22d6e41c26f118c9d41b5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 1 21:20:31 2006 +0000 Bug #5801: Check for MTRR support under Linux. Minor refactoring of MTRR checks for other OSes. commit 978c7b14a18caffde5600480824d04492fc32aef Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 1 21:02:40 2006 +0000 Make Xprint AC_ARG_ENABLEs and AC_ARG_WITHs unconditional also. commit 71a6f2ef6c1138c5c6918a54dfb856183f4f242c Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Apr 1 20:58:42 2006 +0000 Unconditionally run XP_USE_FREETYPE AM_CONDITIONAL, not only in the Xprint path. commit d1e90113fc32b6ddc4dbe1a074763c31bc133e75 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 31 23:22:29 2006 +0000 Don't attempt to Prepare/FinishAccess NULL pDrawables. Exposed by new gradient testing in rendercheck. commit 2e38fedd29e7e55d01e3edce6a73b8ceaac17911 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 31 19:41:28 2006 +0000 Add an option to EXA for the DDX to request that EXA hide the pixmap's devPrivate.ptr when pointing at offscreen memory, outside of exaPrepare/FinishAccess(). This was used with fakexa to find (by NULL dereference) many instances of un-Prepared CPU access to the framebuffer: - GC tiles used in several ops when fillStyle == FillTiled were never Prepared. - Migration could lead to un-Prepared access to mask data in render's Trapezoids and Triangles - PutImage's UploadToScreen failure fallback failed to Prepare. commit f480dc797b51f080f912efc7867d6d8e50be074c Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 31 19:25:42 2006 +0000 Revert mistaken commit to exa_unaccel.c. Should have been to exa_offscreen.c: Correct a typo in debug-only offscreen validation code. (Wang Zhenyu) commit 1a8167c1baa767fc056d1e17d96d0ea98a5f3b17 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 31 19:16:51 2006 +0000 Correct a typo in debug-only offscreen validation code. (Wang Zhenyu) commit 7ea30b507f4ce5ce20fbfaca80f7d5b53a99eb1d Author: Fredrik Höglund <fredrik@kde.org> Date: Fri Mar 31 18:49:38 2006 +0000 Move the screensaver extension from module to builtins. Add the server side implementation of the ScreenSaverSuspend request. Require scrnsaverproto >= 1.1, and change the linking order of the Xorg static libs. commit acca49b1a5a6c034f3b9d51d9016b8a7d43da809 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Mar 31 17:39:35 2006 +0000 Fri Mar 31 12:37:16 2006 Søren Sandmann <sandmann@redhat.com> Fix copyright statement commit b074ce22470ba0a51eda2af7100d09a260a1e8bb Author: Egbert Eich <eich@suse.de> Date: Fri Mar 31 15:11:51 2006 +0000 fixed typo. commit 710bb2e6c8b2874406e48fa8ad24539290c98d41 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 31 14:52:57 2006 +0000 Reindent with -cbi0. commit 7c44bb8c49656133eae675377edea55322d254ca Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 31 07:33:34 2006 +0000 Simplify XkbWriteXKBKeymapForNames a bit, and remove debug spew. commit 4c317bbc1259fa555dc5d5278226b21c42845c0c Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 31 07:21:41 2006 +0000 Add full FreeType support for Xprint. (Drew Parsons) commit 759033703ce17b20d57756206f48a7ae410a50d1 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 30 21:44:36 2006 +0000 Remove the exaAsyncPixmapGCOps mostly-unaccelerated ops vector, and always plug in the accelerated one, even if the destination pixmap is currently offscreen. This was a leftover from when kaa originally got accelerated offscreen pixmap support, and its only concievable use was to avoid a little overhead on ops to in-system pixmaps that weren't going to get migrated. At this point, we probably care more about just getting everything accelerated that we easily can, which should happen with the new migration support. commit b9203dc068ccd4c0d22d49a94b910783432b96a8 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 30 21:25:43 2006 +0000 Don't do an extra fallback path for CopyWindow while swappedOut, since exaCopyNtoN takes care of the fallback anyway, and we don't care about the performance of this path. commit 5c04610f8aeceed9ec7cd0ca8c5eb314cacc3c25 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 30 21:21:59 2006 +0000 Add a dependency on EXA, so it rebuilds when the library does. The manual indicated I shouldn't do this, but experience indicates I should. commit 8ec42a10ff04e51e8d0b4cffb15064d901bc398d Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Mar 30 20:08:44 2006 +0000 Mark the ARGB FBConfig as nonconforming to prevent drivers and apps from falling over. Add @GLX_DEFINES@ so GLcore gets compiled with TLS support if configured. Only destroy the mesa buffer if it got initialized. commit 08e319091fae7a60ae9fa757659cfde2966af9e9 Author: Egbert Eich <eich@suse.de> Date: Thu Mar 30 18:53:41 2006 +0000 Added notice to last ChangeLog entry Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. Provided by Hong Bo Peng of IBM (slightly modified). Patches try to resolve some of the careless mixtures of ulong and uint (which are different size on 64bit). > This patch will break the driver ABI! < Bugzilla #6438. commit 9da1d2257d02155cc8b4541cf5fcb4e64d756945 Author: Egbert Eich <eich@suse.de> Date: Thu Mar 30 18:48:11 2006 +0000 Fixes for some vsw4 failures on 64bit BE platforms such as PPC64 and s390x. Provided by Hong Bo Peng of IBM (slightly modified). Patches try to resolve some of the careless mixtures of ulong and uint (which are different size on 64bit). Bugzilla #6438. commit 6d7ad353bafe914f0b50887daaeaae89ada6ebd3 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Mar 30 18:29:53 2006 +0000 Regenerate these files using updated scripts to avoid unused variable warnings. commit 2153fa97482bae5737def3ecd4fe1cdc03834991 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 30 05:24:27 2006 +0000 Bug #2986: Add PutImage acceleration for the ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8, GXcopy cases. With the radeon driver on my machine, this gives about 10% speedup in PutImage 10x10 and 500x500, and 40% speedup for 10x10 ShmPutImage, up to 65% improvement in 500x500 ShmPutImage. Also fixes a crasher in GetImage that slipped in at the last minute. commit 3cf46cc1e32efc0e4be1d88be111ba0438e0f021 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 30 05:15:58 2006 +0000 Add an UploadToScreen implementation, for testing PutImage support, and make the DownloadFromScreen more robust. commit e799dd68e2bd0fa8ac3c344111fb12e1f32d4c10 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 29 22:25:17 2006 +0000 Bug #2986: Add acceleration of GetImage using DownloadFromScreen for the ZPixmap, planeMask ~= FB_ALLONES, bitsPerPixel >= 8 case. I'm pretty convinced that this is the only case that we care about at all. Tested with xwd -root and xwd on a gnome-terminal, in a composited environment or not. commit 4bb5ab0b4453208573b91b334940f190a8f7210a Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 29 22:03:18 2006 +0000 Add a DownloadFromScreen implementation, used for testing GetImage acceleration, and set the migration scheme to Always on init (since this is all for testing, and Always should make migration happen more frequently than Greedy). commit e31e8ace1043eab340d6b60a6e98b23ebf102786 Author: Deron Johnson <deron.johnson@sun.com> Date: Wed Mar 29 17:51:54 2006 +0000 Fix composite overlay window bug 6411 commit ff6f88348c7498e83b0b143ef3737fd6eb0995e4 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 29 01:05:09 2006 +0000 More warning cleanup. commit 52d9ce7f4fc599d30dec2e61fc1720597043d91c Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 28 21:45:14 2006 +0000 Fix another typo. commit 7df64898eac46a487e8eab2af7213d133b9ca419 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 28 07:46:04 2006 +0000 Fix a couple of typos. commit bd283c2464e2c0e1fd0aca1dedff0f39c2564c34 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Mar 28 07:21:50 2006 +0000 Add a new export, LoaderGetABIVersion. This function allows modules to query the versions directly instead of having to guess. Bug #6416: Add LoaderGetABIVersion. commit a06342eccc76035ff859fee4d283b288c90ee923 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 28 02:57:07 2006 +0000 Add --enable-glx-tls ./configure option to enable use of TLS for storing current GL context. Use this option to let AIGLX load DRI drivers compiled for TLS. commit 77531dfb9f9f3ca0e38ad0555ee3735d6f28cf19 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Mar 28 01:22:01 2006 +0000 Silence some editorializing in the configure help text. commit 7deaaa797cf8e7ca71e9b34fa6f413d1ed2b3dab Author: Adam Jackson <ajax@nwnk.net> Date: Tue Mar 28 01:21:00 2006 +0000 Big old pile of warning fixes. commit 7342dbe4b2108827eaf30993ceeecbd828da2290 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Mar 28 00:18:31 2006 +0000 Remove long-dead screen region code. commit 0e88cefbfecbff0c7dd606ce0caca840f45cbc0d Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Mar 27 23:03:47 2006 +0000 Prune XKB code to only what we need to run the server. Remove dead !XKB_IN_SERVER codepaths. Remove HAVE_CONFIG_H codepaths. commit 5be8a66d324f3d5840b134ad29069eace64e6f12 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Mar 27 22:28:32 2006 +0000 Fix remnants of previous busted _XkbStrCaseCmp commit. commit 9e202dfe40e2bdd66f461a6ba531e927f82096ae Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Mar 27 22:25:56 2006 +0000 Remove remnants of XkbCF code. commit 7257590651328f89d23e80da1ec6241542a660cd Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Mar 27 21:15:06 2006 +0000 Move XFree86 DDX XKB actions into dixmods. commit d7b9e2b0e9d6889ea6b05e63892e612f4e5f19f5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Mar 25 23:09:50 2006 +0000 Bug #3819: Remove open-coding of strcasecmp. commit b3570dd94aa72f94e537a17680150e91e7712f5a Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Mar 25 22:37:58 2006 +0000 Remove INITARGS braindamage, change to void; add XkbExtensionInit prototype to xkb.h. Explicitly initialise nTypes in xkb.c. commit 1ef60ce8ebb681b3cfb5e515be5c187c0442dcda Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Mar 25 22:35:48 2006 +0000 Really remove all DDX pre-config code. commit ec10f70b2114e5369a5b2f34b084dcf55634dcb4 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Mar 25 21:52:49 2006 +0000 Remove XkbCF DDX configuration code. commit aae4238360b842ac34dc8ee16e165a1821f9a801 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Mar 25 20:17:58 2006 +0000 Fix two glaring unconditional-NULL-dereferences. commit a68c11bb1d7c5419004a1714e49dffac57304e78 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Mar 25 19:52:05 2006 +0000 Mark everything in xf86sym.c as _X_EXPORT. commit ae935832facfa81a9689882406ecca74b0346790 Author: Fredrik Höglund <fredrik@kde.org> Date: Fri Mar 24 20:50:13 2006 +0000 Refactored the screensaver and DPMS timer code to use the screensaver timer for both screensaver and DPMS. Removed the SetDPMSTimers() and FreeDPMSTimers() functions. commit d1746ec0f0c8a0b750f390e7a7faf21b67683f4a Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 24 17:58:39 2006 +0000 Make sure DRI module is loaded before calling DRI functions. commit f1616508c95d12dfaad2cfd61b40228b3dba6f60 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Mar 23 23:54:08 2006 +0000 Add ast driver/pci id (Carl Switzky, Sun Microsystems) commit 6d2896b384e17512e8f12036daabcd575d21f804 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Mar 22 22:49:52 2006 +0000 Improve error logging. commit 5449634e3c9428005aba5b3322ced7e86c62f185 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Mar 22 21:37:49 2006 +0000 Wed Mar 22 16:28:46 2006 Søren Sandmann <sandmann@redhat.com> Use inline assembly for copy area, since gcc doesn't generate movq instructions. commit 5b3084c64f7bd1232603ffb3e985600b8d045453 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Mar 22 21:13:08 2006 +0000 Wed Mar 22 16:05:09 2006 Søren Sandmann <sandmann@redhat.com> Use inline assembly for solid fills, since gcc doesn't use the movq instructions. commit a08e5e0c68baaf85b0fc3ecde74a6bcf80bcd4bf Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Mar 22 18:44:26 2006 +0000 Wed Mar 22 13:42:44 2006 Søren Sandmann <sandmann@redhat.com> Patch by Keith Packard to make sure redirected windows don't get considered "FullyObscured". commit 966d93ef6d1f2ed02f3b81b5bf5a1ebbdd48c93d Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 21 22:54:38 2006 +0000 Make the server distcheck and tag 1.0.99.1 snapshot. Bump CVS version to 1.0.99.1. Distcheck fixes. commit 8e3ad87d01c102591c7dc25614f6ac10e444a1b1 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 21 22:32:13 2006 +0000 #include indirect_dispatch to get prototypes for FBO functions. Fix a couple of warnings. commit dcc43d57cbe9d2b65384fe9ba2e4e4fbb43cb0a1 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Mar 20 20:10:29 2006 +0000 Finish glx_ansic.h wrapper changes to make Xvfb and Xnest link again. commit 9509c6799e31e96677b6d07bdf24ea91ddd30020 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Mar 20 19:32:18 2006 +0000 dead file removal commit 61a020265c5915e3d671d5b2047b81a5d15594c3 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Mar 20 18:43:18 2006 +0000 Bug #5549: Fix build for sparc64. (Matthieu Herrb) commit 6eb4e2303aaab8d64e3f6cbc0bbee55689bdcb82 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Mar 20 14:01:05 2006 +0000 Bug #6213: Check geteuid's return value, not its address, otherwise unprivileged users can set the modulepath and run arbitrary code. Patch from Matthieu Herrb. (CVE-2006-0745, Coverity #4) commit 8c1bb37d0649b269b78c457b8b41ff59a41d89af Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Mar 17 08:55:07 2006 +0000 Typo fix, reindent. commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 17 01:47:25 2006 +0000 Check for glproto when building GLX and make sure we have at least 1.4.6. Drop glx_ansic.h wrapper and call xalloc, xrealloc, xfree and str-funcs directly. commit 2c11cde3367fcd22740b577a4364b1e41cf3e1d2 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Mar 17 00:35:18 2006 +0000 More patches from David Reveman: Add GL_ARB_texture_non_power_of_two, GL_EXT_framebuffer_object and GL_NV_texture_env_combine4 extensions. Add __GLXcontext destructor and flush context cache there and on loseCurrent. Chain back to new __GLXcontext destructor. (__glXMesaContextForceCurrent): Set render table on forceCurrent. (init_screen_visuals): Index pVis array correctly. (GlxGetMesaProvider): Add this. Hook up FBO marshalling. commit 14aafc258cd774cf937f9798a888c2d3c97ccacf Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 16 18:43:55 2006 +0000 Change EXA so that exaMoveOutPixmap() retains the framebuffer copy of the pixmap, and damage is tracked so that a later exaMoveInPixmap won't result in an upload if no upload is necessary. This will likely improve the performance of the "Always" migration scheme significantly, and is a step in the path to more exact damage tracking between framebuffer and system memory. commit d0d336efd58896718f31a400651bacd9b769fb5a Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Mar 16 16:29:17 2006 +0000 Add support for ZX2 PCI-E local bus adaptors. (Alex Williamson, HP) Use soft timeout register to avoid MCAs when probing for non-existent local bus adaptors on ZX2. (Alex Williamson, HP) commit 175980580e572745a9a381b4432e3ba0457d3ba3 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 23:05:53 2006 +0000 Bump to requiring fixesproto >= 4.0 and compositeproto >= 0.3. commit 6fe377af5a82deb6f8b0f3b75414335e7845caac Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Wed Mar 15 21:25:38 2006 +0000 - OpenBSD needs -Wl,-export-dynamic to export symbols from main executable to modules. - Probe for OpenBSD aperture driver and define HAS_APERTURE_DRV accordingly. commit 21f7f2fb113ee4f9cd011c3cc2d45d43bbdd35fa Author: Felix Kuehling <fxkuehl@gmx.de> Date: Wed Mar 15 18:43:32 2006 +0000 Enable correct handling of the BTS instruction (opcode 0f ab) The code was there but #ifdefed out. Insead of BTS, BT was executed. This patch enables the BTS function and hooks it up the the correct opcode. (ATI Technologies Inc.) commit b726aa502a871c700bc42b5325abf2c6820ff756 Author: Felix Kuehling <fxkuehl@gmx.de> Date: Wed Mar 15 18:37:44 2006 +0000 Update to build against Mesa CVS HEAD. commit c74464d92cd673ff0669375757caab798cc57e95 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 15 16:59:45 2006 +0000 Don't let pinned pixmaps get migrated in when using the "Always" migration scheme. This notably keeps the visible screen from getting migrated in to a new location in framebuffer. Reported by: Michel Dänzer. commit b9c43cde1e368903786977b06368d5e36db9ffe8 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:56:10 2006 +0000 Coverity #1042, 1043: Nuke some dead variables. commit 5e106a71b9f8077216d41619402952b0005dd8a4 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:49:04 2006 +0000 Coverity #807: Fix a memory leak in XFixesExpandRegion. commit a3ef63696cac950b2520e7c85564befc0a830fde Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:36:31 2006 +0000 Coverity #490: Fix a range check in xf86vidmode extension. commit 152090ce442e94de1ae920208a92931af6493c8c Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:33:12 2006 +0000 Coverity #487: Check version number correctly. commit 72cc6307257fcbb800267464487bf918ee674328 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:32:05 2006 +0000 Coverity #491: Check version number correctly. commit 460f2ea4a594a53536f34c4ad27795fceec50bcc Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:21:04 2006 +0000 Coverity #794: Fix a highly unlikely memory leak. commit 116d158e85ec43577ff69aeb3271ab1f888500c9 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:16:24 2006 +0000 Coverity #269: Compare the requested ABI class against the ABI class of the module, not the module class. commit d8221a9b70a11606a0f7e1f69afee6049d7f182f Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:11:34 2006 +0000 Coverity #484: Fix an off-by-one in module refcounting. commit 6bb2dc02a7cffd6ed7dd28e88d584920a4150749 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 16:01:47 2006 +0000 Coverity #337: Remove useless NULL check. commit 1e5c0842af99027cc6c30a16f967d8b60c9a894d Author: Adam Jackson <ajax@nwnk.net> Date: Wed Mar 15 15:34:57 2006 +0000 Coverity #1053: Nuke a dead variable. commit 7314d16cde4c3f99d9d9f1d539f0c5ff4942e653 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Wed Mar 15 03:18:42 2006 +0000 Fix DRIExtensionInit() to not register callbacks when it hasn't been initialized for the current server generation. Fixes a problem where it would use stale private index and blow up in colorful ways if no driver called DRIScreenInit() on the second generation (which happens due to a bug in radeon that i'll fix separately). Note: clearing the index in DRIReset() wouldn't work as DRIReset() is called before the CloseScreen() chain commit 02d80a0de93f7592e69065b0fbe5820dcdebdb44 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Wed Mar 15 03:12:32 2006 +0000 Make xf86 linear allocator smarter when dealing with alignment constraints when falling back to X/Y allocations. Fixes various problems of Xv allocation failures, notably with "nv" driver. commit c1601717d536419693b3ef6e8a3d69b9f2fdc2b3 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 15 01:20:08 2006 +0000 Add a new migration scheme, "always", which will move pixmaps to their desired location always (unless they don't fit in FB, in which case they all get moved out for software rendering). The default remains as before, but can be controlled by the MigrationHeuristic xorg.conf option (which is intentionally not documented, as it may be short-lived). This is part of the exa-damagetrack work, which appears stable in testing with fakexa, unlike the work as a whole. commit a90cff266cc81993ed804fb320c1dbfe5e0d4787 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 15 00:13:52 2006 +0000 Add more doxygen documentation, including notes on WaitMarker() and MarkSync() that I noticed were needed while reading the VIA driver. commit 693e42114f1127528448126d78a5209dd1198d8d Author: Eric Anholt <anholt@freebsd.org> Date: Tue Mar 14 21:30:12 2006 +0000 Move migration logic to a new function, exaDoMigration(). This is largely a manual conversion to allow for different migration schemes to be implemented reasonably, but does include some minor improvements such as accounting for pinned pixmaps not being acceleratable, and for our current GetImage and GetSpans not being accelerated. commit d30905478078036383977ae9d4a3685c2e2c642f Author: Eric Anholt <anholt@freebsd.org> Date: Tue Mar 14 20:38:06 2006 +0000 Pull code for getting the (0,0) pixel from a pixmap out to a separate function, since it gets repeated (with bad error handling, in one case). commit 01aa209f2056ef04e3f2735756a0f8b4a67a3d87 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Mar 14 19:32:27 2006 +0000 Bail out early if screen doesn't support DRI. commit 0cc34266d6e84bb491fcf9aa74e34615b2fca4fc Author: Deron Johnson <deron.johnson@sun.com> Date: Mon Mar 13 22:43:42 2006 +0000 Updated ChangeLog for my latest composite and xfixes changes. commit 450018f48b2796345a4eaccbb94c1971ebd30114 Author: Deron Johnson <deron.johnson@sun.com> Date: Mon Mar 13 21:59:55 2006 +0000 Part 3 of 3 (Other parts are in proto and lib) Composite Version 0.3: CompositeGetOverlayWindow, CompositeReleaseOverlayWindow Xfixes Version 4.0: XFixesHideCursor, XFixesShowCursor commit e5956f49b217b0ee9c9f35b6a58f339a8d22b1d7 Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Mar 13 01:54:59 2006 +0000 First batch of AIGLX fixes from David Reveman. Add getter for Mesa provider. Export this for Xgl. Move resource tracking out of drawable constructor to allow wrapping. Use corrent reply size #define. Add this function. (DoGetDrawableAttributes): Fix array length. commit eb63e50d95da4e1e08fc6fcec46ac63d5e3b7bf4 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 12 17:14:03 2006 +0000 Fix build when AIGLX is false. commit 9ed3463450469c3108e0be7e4baabc0a403a78b2 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Mar 12 03:04:52 2006 +0000 Improve doxygen formatting, and attempt to clarify the 1:1 ratio of successful PrepareCopy()s to DoneCopy()s. commit 9a7fba5fd07c8831d0acab8d901605de537ae273 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Mar 12 03:02:26 2006 +0000 Make exaCopyNtoNTwoDir() call DoneCopy() at the end of each string of consecutive Copy() calls (rather than exactly once at the end of the function). Reviewed by: jbarnes commit c3342c8000f6d2bfb61e2cf95e028d11b59698fa Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Mar 12 00:11:34 2006 +0000 Merge accel_indirect branch to HEAD. commit b1b731c28630965d9e2defe62d1108270dc8264c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Mar 11 02:43:51 2006 +0000 Fix buffer size checks to prevent 2-byte buffer overflows. (Coverity #480, #481, #482, #483) commit fc0772de36315f19f5b57220db69f48a3b1fdc9a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Mar 11 02:10:14 2006 +0000 Add HAS_MMAP for Xvfb Fix Xvfb option parsing to exit on bad arguments, not just issue error messages and continue on. (Coverity #492) commit f2ecbb30187000547a98ca7cbaee433ea4ba8fe3 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Mar 11 01:58:32 2006 +0000 Pass sizeof the correct buffer to XmuSnprintf. (Coverity #489) commit d6955798489813ef77cca13cf5f5c67d49e6dece Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 21:36:24 2006 +0000 If fakexa is enabled, create a larger buffer in the Ximage, but keep the same width/height for front-buffer drawing. The fakexa code then uses this extra space for offscreen pixmaps. Note that this tones down the absurdity of fakexa's offscreen pixmap alignment requirements (odd alignment is too weird, so stick with "24", which is still strange but exists out there). It also fixes a couple of bugs in the fakexa implementation revealed by using offscreen pixmaps. commit 5b1a7b478f072f56e836f2d4c0fbc1985842e2bb Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 21:32:34 2006 +0000 Move the exaDrawableDirty in exaPrepareAccess to exaFinishAccess, which is after the drawing is done. Previously, a failed PrepareAccess could have migrated and cleared the dirty flag before the damage was ever done. commit ffdbb547becc71f1cfdd035d0d6c71539f185fb1 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 08:06:42 2006 +0000 Coverity #1011: Remove a useless NULL check on a pVbe that had been dereferenced many times before. commit 1bc72dce5f8bc40e369e69b684816fdaaa07da43 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 08:03:24 2006 +0000 Coverity #857: Fix resource leak in error path by freeing earlier. commit 55f677d600370b19d62ef821025481f2be6f5edb Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 07:58:27 2006 +0000 Coverity #813, #814, #815, #816: Fix resource leaks in error paths of config parsing code. commit 2bd41105496b729395fbcf97f09581eb0efb3510 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Mar 10 07:45:25 2006 +0000 Document the restriction on PrepareAccess() failure, from discussion with benh. commit 21dcd0304879f38ea8ea01ba88e7cc7783771adf Author: Jeremy C. Reed <reed@reedmedia.net> Date: Fri Mar 10 01:34:45 2006 +0000 Just like FreeBSD, let DragonFly's default mouse Device be /dev/sysmouse (since /dev/mouse don't even exist by default). commit 9a99afdfb292f303f914039952fdd772eed9e03a Author: Jeremy C. Reed <reed@reedmedia.net> Date: Fri Mar 10 01:22:26 2006 +0000 Add DragonFly support. (It is like FreeBSD.) This patch is from DragonFly developer Joerg Sonnenberger and the pkgsrc collection. I tested using /dev/sysmouse with moused using my serial /dev/cuaa0. commit 7a0f7f739804bc7d9c5562701abee8d134878977 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 9 23:29:44 2006 +0000 Coverity #349: Fall back to software early if pSrc->pDrawable is NULL, or pMask is non-NULL but pMask->pDrawable is NULL. This prevents NULL dereferences on gradients and other Pictures which have no pDrawable. commit 8a3ff42abb726d1604af39b4653ede5f760b7e69 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 9 23:25:35 2006 +0000 Commit changes missed in last commit (mis-typed path and didn't notice): Do a first pass of doxygen documentation of EXA. This removes the corresponding pieces of exa-driver.txt, which were becoming stale. Hopefully the documentation will stay much more up-to-date this way. Many thanks to jbarnes for writing exa-driver.txt which was used a lot in writing this documentation. commit ab35c3fbc135bafdfc5057ef5d6227ca3534ed26 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 9 23:18:15 2006 +0000 Do a first pass of doxygen documentation of EXA. This removes the corresponding pieces of exa-driver.txt, which were becoming stale. Hopefully the documentation will stay much more up-to-date this way. Many thanks to jbarnes for writing exa-driver.txt which was used a lot in writing this documentation. commit d8f8bfeccef0750d79f852b9ae7152e841227d5a Author: Matthias Hopf <mhopf@suse.de> Date: Thu Mar 9 14:23:57 2006 +0000 Do Xorg configure checks for Xgl only as well commit 2822cbc1fb2271844e7ae10c3629aaa940ae4042 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Mar 9 06:04:07 2006 +0000 Rearrange EXA driver structures so that there's a hope of maintaining ABI when extending the driver interface. The card and accel structures are merged into the ExaDriverRec, which is to be allocated using exaDriverAlloc(). The driver structure also grows exa_major and exa_minor, which drivers fill in and have checked by EXA (double-checking that the driver really did check that the EXA version was correct). Removes exaInitCard(), which is replaced by the driver filling in the rec by hand, and the exaGetVersion() and related EXA_*VERSION which are replaced by always using the XFree86 loadable module versioning. commit 65aa33f9173b1554924437685698f7c5f645a3c4 Author: Lars Knoll <lars@trolltech.com> Date: Wed Mar 8 06:19:37 2006 +0000 render/picture.c Initialize the format of a source picture to PICT_a8r8g8b8. Fixes a failure in the gradients test of rendercheck. In the long term we could do better by setting the format to something without alpha whenever the gradient doesn't contain colors with alpha. This triggers a reduction of the over operation to a pure source operation. commit cb5090e8d60f4e9780c859faeea5c24587f6bee7 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Mar 8 03:32:07 2006 +0000 Bug #6150: Do the obvious fix of an insane sanity check in xf86InitFBManager. (Julio M. Merino Vidal) commit 2e6f801fe1a749f6a4db2cfd8a43abec5caceae0 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Mar 7 23:58:22 2006 +0000 Numerous amounts refactoring and comment adding (see ChangeLog for file by file details). The primary intention for these changes is to pave the way for the new device probing and PCI configuration code that I'm working on. commit b7d2dfc1e5e07051732303731ff3e4e76852dd94 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Mar 7 20:06:15 2006 +0000 Add appropriate MIT license. Oops. commit 9d8c0e4bcbb111e860b7c3c33c224c22589006b1 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Mar 7 19:57:46 2006 +0000 Add a new flag to ephyr, "-fakexa", which turns on an EXA acceleration implementation that calls fb to get its work done. The purpose is to have a trusted EXA driver for use with testing changes to the core of EXA. However, fakexa has not received much testing yet, lacks offscreen pixmaps support, and doesn't reliably provide garbage when EXA doesn't get its syncing right. All of these should be fixed soon. commit 0a3d6c739968bf5af81fc0e8ea7211c20d52080b Author: Eric Anholt <anholt@freebsd.org> Date: Tue Mar 7 19:49:31 2006 +0000 Remove stale EXA files, which failed to get removed during the move to top-level, somehow. commit 68a8963f726cb92624665669813b6d952d53556e Author: Luc Verhaegen <libv@skynet.be> Date: Tue Mar 7 16:00:57 2006 +0000 Fix cvt -r check again. CH7011 TV encoder had 800x600 PAL hit the check. commit 0693083335185ce05ee64546151f3fc43ce98575 Author: Lars Knoll <lars@trolltech.com> Date: Mon Mar 6 21:00:09 2006 +0000 render/picture.c Correctly initialize devPrivates variable in source only pictures to 0 miext/cw/cw.h Don't try to access devPrivates of source only pictures commit 448997ebcd2bab02be1059b07b91b63b0d05d268 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 5 16:43:10 2006 +0000 Only output SetClientVersion message if verbosity > 1, like other extensions do commit d921173833cc207380eb08b6675393f5e8139d5f Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 5 16:35:08 2006 +0000 define SYS_LIBS to hold system dependant libraries that may needed. and add it to libraries list where needed. Update ChangeLog for previous changes too commit 82cbd2ee0d20225b9edbb5246c8ed116b4614e1a Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 5 16:33:17 2006 +0000 Don't hard-code -DUSE_DEV_IO here. configure generates the proper OS specific values here. commit b56a1513d27f84dcd55f3dc6053f183aa6f7855b Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 5 16:32:40 2006 +0000 Definitions for bswapxx() macros on OpenBSD. commit 4335868476af7c821c64def52b102b93ae91f8b0 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Mar 5 16:13:21 2006 +0000 Fix build with non GNU make. commit b2f8f410c0bb8bc24039b2a593f8a2a483659914 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Mar 3 09:54:54 2006 +0000 https://bugs.freedesktop.org/show_bug.cgi?id=4341 Make Xming error messages more meaningful. commit 29237c1977e454511e0d0244c68d34d572b68458 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Mar 3 09:50:55 2006 +0000 https://bugs.freedesktop.org/show_bug.cgi?id=4538 Fix mouse button release on multiwindows scrolling. commit 06f01623fde61f1a11c2c1ecfae6a4c346473b05 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Mar 3 09:43:42 2006 +0000 https://bugs.freedesktop.org/show_bug.cgi?id=5138 Check for NULL pointer commit 054c291b274b238893e408e070aef13a7933400b Author: Felix Kuehling <fxkuehl@gmx.de> Date: Thu Mar 2 18:35:08 2006 +0000 Fix build against Mesa CVS HEAD: added s_blit.c to symlink-mesa.sh. commit c1a82b9554028640dc4e08f042f1a8faf3372627 Author: Brian Paul <brian.paul@tungstengraphics.com> Date: Thu Mar 2 03:43:26 2006 +0000 added s_blit.c file commit 5f4d11c8d926cf396e0a8e203e14a8e1e123e011 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Mar 1 16:31:53 2006 +0000 fix spelling error, document EXA_TWO_BITBLT_DIRECTIONS device flag commit 044a3abb382a4850722c391f04d09d3160790814 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Wed Mar 1 16:28:34 2006 +0000 Add accelerated two directional blt support to EXA commit 96ca329382141fd50dccb1cc35a71a333d80bce4 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Feb 28 23:07:09 2006 +0000 Remove redundant definition of struct Inst. Safeguard xf86AddDriver against future additions to DriverRec. commit 1cfa9f647e0241f4b9e56556b128d7bfd987eaca Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Feb 28 16:55:26 2006 +0000 Bug #5216: Allow options to appear with other components. commit e3b6b95f29cb2ea00b4290d694c5e202b8d180ad Author: Adam Jackson <ajax@nwnk.net> Date: Tue Feb 28 16:26:16 2006 +0000 Bug #5627: Fix Xprint font symlinking. (TIlman Sauerbeck) commit e7f0b84fa7bd0c40cb456ec4e447103442c8dae3 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Feb 28 05:20:20 2006 +0000 fix exaInitCard by making it a real function commit 088e5768faa90fe16de41b135b1111b5d25c64ad Author: Felix Kuehling <fxkuehl@gmx.de> Date: Mon Feb 27 18:12:24 2006 +0000 Fixing the Mesa build again, sigh. Add slang_execute_x86.c. Add -I../shader/slang to swrast INCLUDES. commit 345d99c972cac67f2cdc38750e4ba2dea1cdb360 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Feb 27 16:19:39 2006 +0000 Typo fixes (Nicholas Joly, XFree86 bugzilla #1658) commit 6b08a5013b4e9e350ba461c9a59d30bb41feef8f Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Sat Feb 25 20:26:49 2006 +0000 EXA driver doc cleanups and additions. commit f41ec003f39c575299429897d4287233184583ad Author: Roland Scheidegger <rscheidegger_lists@hispeed.ch> Date: Sat Feb 25 01:17:10 2006 +0000 Add two radeon pci ids (one is used for a radeon mobility X700 XL in a medion notebook, the other is for a AIW X800 VE) commit 01a0bf881ada03ca3c27bdef7423c760c3bc2f9c Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Feb 24 17:01:57 2006 +0000 OpenBSD supports PCVT and WSCONS. PCCONS is long gone. commit d3e1587c20c155b7873b6646ddf0b96f806f8a7f Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Feb 24 16:50:42 2006 +0000 file glxdri.c was initially added on branch accel_indirect_branch. commit 5d9a620726d2b0ad89625574478d2fd4536485b0 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Feb 23 19:25:57 2006 +0000 Remove redundant composite op reduction, done in Render now. commit 028d6903f674fa77617f333b25356710d1682b05 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 22 16:29:07 2006 +0000 Bug #5978: Added missing swap of input variables. Added missing cases for GL_SECONDARY_COLOR_ARRAY and GL_FOG_COORD_ARRAY (Colin McDonald) commit 43324132afcbb6b231efcc24ec72ee44678d5771 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 22 16:08:56 2006 +0000 Added Mesa include directory commit 43fbcc28c960ce5abe1d3223441c3dc5a10cde27 Author: Jeremy C. Reed <reed@reedmedia.net> Date: Wed Feb 22 02:47:00 2006 +0000 Update to build against Mesa HEAD. (Thank you Felix for feedback on xorg list.) commit cfdacab33a62b47f22bb54683e3ca20ec9824864 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Feb 21 00:02:08 2006 +0000 Eliminate unused PCI BIOS reading functionality. The old code used several function pointers to implement a level of flexability that was never used. The code also had unused support for extracting a single image type from a larger expansion ROM. Fix the spelling of PCI_BIOS_OPEN_FIRMWARE. Fix a couple errors in #ifdef debug code. These changes have been tested on x86 and x86-64 Linux. commit 5fd0f94006775e2271107c960dfa3314dddd9a5f Author: Ian Romanick <idr@us.ibm.com> Date: Mon Feb 20 23:45:50 2006 +0000 Eliminate all the code for querying the PCI class from the PCI ID database. Class information is not, and never has been, stored there. Therefore, this is just a bunch of elaborate code to read 0x00000000. This has received testing on x86 and x86-64 Linux. commit 6d7083bd69724586338d79784655328f1fcd2ae5 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Feb 20 22:16:49 2006 +0000 indent fixes (OMG SO UGLY), and nuke old RCS keywords. commit 5480c537cee79b324736eac3e438a4713dfa1036 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Feb 20 21:50:49 2006 +0000 ANSIfy Xi/. Mostly automated via protoize(1). commit cc42e153c2437fe9c94b0c20e1b56277474d94d0 Author: Felix Kuehling <fxkuehl@gmx.de> Date: Mon Feb 20 03:00:09 2006 +0000 Update to build against Mesa HEAD. commit ed3ea887a6b1c9fdc83895c40da34076121f05e9 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 21:49:51 2006 +0000 Fix the encoding of DES's name. commit ea0b3f65f77a78df1671b09739c00762a8875607 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 21:45:12 2006 +0000 Fix build of Xorg by putting xf86bigfont back into builtin instead of module sources list. commit d97f29be22e22e6f5bc23229ffa5ef087f992c8c Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 21:35:32 2006 +0000 Bug #5453: Don't forget to still do AM_CONDITIONAL for XVMC even if XV is disabled, and also force XVMC disabled if XV is disabled. (Dag-Erling Sm�rgrav) commit d33c2e0d1079f93f4ba8b28d19950d384a9e7c32 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 16 19:36:39 2006 +0000 Add oscolor.h commit 60d4839a2d373cc6d8c0d5004284494d3a994a63 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 16 19:03:07 2006 +0000 Forgot to include this file in previous patch commit 8987b2c1efc9a4667e278e6ba411772ba2a4a4e6 Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 16 07:17:31 2006 +0000 Make more extensions optional in build (for kdrive). Fix kdrive build for actual hardware. Fix kdrive pointer signed/unsigned types. Add kdrive-required YX rotation functions. Replace rgb text file loading with static rgb color table. commit c8acb342695936db062c966029019a458d45459e Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Thu Feb 16 06:52:12 2006 +0000 Fix an occasional crash on VT switches: the server would save a pointer to the current cursor when disabling FB access and would try to restore that cursor when re-enabling. However, that cursor might have been destroyed in between. This fixes it by updating the saved cursor pointer when a cursor is set and vtSema is FALSE. commit c845e152f52b3e8cef579797c5c8834ad2fd2cd5 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 05:46:08 2006 +0000 Bug #5871: Drop special build infrastructure left over from libcwrapper times. (George Fufutos) commit c2f685e64464ccf86ed47ae37f74bf46877e0739 Author: Dave Airlie <airlied@linux.ie> Date: Thu Feb 16 05:18:20 2006 +0000 Fix XSERVER64 should be _XSERVER64 commit 1bbd5e49b1dcc2e3f9785bd2bb58f946b9998099 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 04:59:45 2006 +0000 Bug #5869: Remove traces of EXTMODULE define, which doesn't appear to be useful any more. (George Fufutos) commit c03b06bdf04fa8500d0f85314c7268848b4d50be Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 04:39:00 2006 +0000 Bug #5888: Remove orphaned laymodule.c from miext/layer removal. (George Fufutos) commit 3b32e902c7a12aa2320da27d984029cde28fd8c3 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 01:49:23 2006 +0000 Add entry missed in my last commit. commit c4767794ef5b014ae25fe8541e72348ecfb1ee49 Author: Zephaniah E. Hull <warp@aehallh.com> Date: Thu Feb 16 01:03:09 2006 +0000 Export xf86ActivateDevice, used by the evdev driver. commit dc0354104cb4057dfcc7b2ccb8e2ae8474d70b15 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 16 00:14:11 2006 +0000 Move EXA implementation up to the top level and remove its XFree86 dependencies. It was nearly abstract enough already to be used by multiple DDXes. This will be useful for EXA development through providing a fake acceleration implementation within Xephyr, so that testing can be done on new EXA code without worrying about buggy drivers. commit c170aa830d0ce3dbff6b30081e04c3f91bf921be Author: Eric Anholt <anholt@freebsd.org> Date: Wed Feb 15 23:27:40 2006 +0000 Forced commit to note repocopy from hw/xfree86/exa/ commit 6770f1bdb145e7a6c431d0523f10d12155f58273 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Feb 15 21:09:14 2006 +0000 Define NO_LIBCWRAPPER in dix-config.h, and rely on Mesa including dix-config.h if DIX_HAVE_CONFIG_H is defined to get it and _XSERVER64, instead of defining things like this per directory. commit 7d7fc927cd90146788780477b8e3379d91c3b910 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Feb 15 20:47:44 2006 +0000 Remove a few #ifdef vms; whatever problem that was solving should assuredly be solved some other way. commit f105b8da11fcf337512b3c39da3368f98da07a33 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Feb 15 20:44:13 2006 +0000 Mark everything in dixsym.c as _X_EXPORT. commit 010d6effa6fa210251b12459882e88aeee82c2c0 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Feb 15 19:15:32 2006 +0000 Mark everything in {ext,font}sym.c as _X_EXPORT. commit 3fe482c77e7b3e46739d011d8bbdee527d7a42fc Author: Adam Jackson <ajax@nwnk.net> Date: Wed Feb 15 19:05:55 2006 +0000 Mark everything in misym.c as _X_EXPORT. commit 6ad4325b87889e1aada9333d750b7bb586c38b52 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Feb 15 18:26:45 2006 +0000 Update to build against mesa head. commit 50e2ff9a2500078ebbd833fddab0d93f3a50b6a6 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Feb 15 03:20:55 2006 +0000 Remove the waitSync from KdDisableScreen and push it off to drivers' disableAccel hook, which is more correct anyway. This makes kdrive.c not have any knowledge of kaa, opening the way for using exa from kdrive. commit 0446aafa9467f43515fb578d50f45e2c3153c8cf Author: Eric Anholt <anholt@freebsd.org> Date: Wed Feb 15 03:07:23 2006 +0000 Avoid some more libcwrapper damage that prevented kdrive linking. commit 5c9b6f0fb01252d704de1bbdf3015dee7f956593 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Feb 14 08:14:42 2006 +0000 DRIGetSecs() would call getsecs() when XFree86LOADER is defined, relying on the wrappers to provide it. Wrapper gone, and getsecs doesn't exist on linux so it now blows up. Fixes it by just calling gettimeofday() in all cases instead. commit 049dca0f43eb2179d2c61033a17ff1a89f8fb689 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Feb 14 08:11:41 2006 +0000 Remove useless line of code that contained a bug and triggered a gcc warning. This variable will be overriden before being used anyway. (Bugzilla #5595) commit 1132d0e6102d4564f70f0e8c98854e3acf25b109 Author: Dave Airlie <airlied@linux.ie> Date: Tue Feb 14 06:27:59 2006 +0000 update to latest Mesa CVS HEAD commit bb8c36690ab411c11aa8dd3d4520d513eb8f9091 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Feb 14 04:20:37 2006 +0000 Bump shadow module version number to 1.1.0 from 1.0.0 commit cc9dfab0b31c7956f99d1f1b9c195065b5e18c29 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Feb 13 18:57:38 2006 +0000 (Reverted) commit 83dd6241c8cd81e8d897bd17588ada92a945e647 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Feb 13 18:55:44 2006 +0000 Reverted, did nothing anyway, I'm not smart today. commit 4a7f6f53cad541e8c5042a6472e3b3886fc9b7e6 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Feb 13 18:09:51 2006 +0000 Further op reduction when both src and dst alpha are absent. commit 28ced9f3e0dd4bd81067f590a1d64ba0844edb06 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Feb 13 05:29:00 2006 +0000 Add missing ChangeLog text for r1.2 of GL/glx/indirect_reqsize.h commit 4839e91fcab4c344e672154a447d8c7035fce1f4 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon Feb 13 05:03:13 2006 +0000 HAS_MKSTEMP vs. HAVE_MKSTEMP (From Fredrik Höglund) commit 1a4f20541a9f4f41f444d826d743899ea2dee2db Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon Feb 13 04:56:27 2006 +0000 Fix linux build without libc wrappers (From Fredrik Höglund) commit 2dc7b5e0d96a187bfbb355caa788f0fdcd88eaad Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon Feb 13 04:43:40 2006 +0000 Move call to xf86WrapperInit() to OsVendorInit() in xf86Init.c and remove stubs in other DDX. commit 34d0b9228f46c2f87be74dddc9c7d97aab091d03 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Feb 12 20:53:35 2006 +0000 Simplify ops that would use the alpha channel when an alpha channel is always 1.0, and short circuit PictOpDst for good measure. commit 5f45776ef3b9256bea44842d1c50f269422531a1 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Feb 12 10:30:47 2006 +0000 Add missing HAVE_DIX_CONFIG_H which caused issues with mismatched screen structure interpretations, and remove a bunch of unused junk from kdrive-config.h. Xephyr almost works on my amd64. commit 5249416d091d59c248c8dda44529b8aa4910b1a0 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Feb 11 22:40:50 2006 +0000 Add stub xf86WrapperInits so that the servers will build even if os/ was built with XFree86LOADER set. commit a2a5254675a6b7ef0f7da9caa76c028b7c526502 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Feb 11 19:16:51 2006 +0000 Add <string.h>, <stdlib.h>, and <stdio.h> to clear undefined function warnings after the removal of libcwrapper headers. commit d6337c83241f0fa4bb03039a9767b58d8a1a7c91 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Feb 11 17:42:31 2006 +0000 <sys/limits.h> -> <limits.h> so we can compile on non-BSD OS'es commit 4fafba61d5402d4e4d2c21ba1be3ed8969b99334 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Feb 11 03:03:45 2006 +0000 Remove libcwrapper damage from GLX (requires fresh Mesa HEAD), and get it compiling in kdrive. commit c3d14036729fd186d4ec7ca1de603e1f2d174e2f Author: Eric Anholt <anholt@freebsd.org> Date: Fri Feb 10 22:00:30 2006 +0000 Remove libcwrapper usage from xorg server modules. The libcwrapper is only of (marginal) use in the drivers, and that usage remains. commit a8cec1b656f57746758613213de1d6e5acb79451 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Feb 10 09:00:02 2006 +0000 Merge from kdrive: use RECT_PRIM to avoid tearing in xvideo. commit efc3fab7f4b29f56fffd21304c64c03a48aa5b4b Author: Eric Anholt <anholt@freebsd.org> Date: Fri Feb 10 07:52:05 2006 +0000 Make kdrive (i.e. Xephyr only) buildable on FreeBSD and probably other OSes without linux VT switching, fbdev, and vm86 support. commit fa3a65e33d8c893c7867ea507afc7caa1361aa9c Author: Eric Anholt <anholt@freebsd.org> Date: Fri Feb 10 07:47:21 2006 +0000 Remove the include of X11/misc.h, which fails to compile and isn't necessary. commit d875bdb2756b082ce93bd86016c369ea85c04d17 Author: Jeremy C. Reed <reed@reedmedia.net> Date: Fri Feb 3 02:44:19 2006 +0000 hw/xfree86/os-support/xf86_OSlib.h Fix sysmouse handling on DragonFly, mostly garbage arrived. From Joerg Sonnenberger. commit 0946bb9427695a4314e5c43de573b3a75a18e466 Author: Jeremy C. Reed <reed@reedmedia.net> Date: Fri Feb 3 02:37:52 2006 +0000 Fix sysmouse handling on DragonFly, mostly garbage arrived. From Joerg Sonnenberger. commit 5e2a7af23bd0f46fbddca34098cb297be58b7a55 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 2 21:07:06 2006 +0000 Move the frequently-repeated code to get the pixmap that backs a drawable to a new function, exaGetDrawablePixmap(). commit ee3c7ccb175752dbeaed6b0113d0819b3fcd2398 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 2 20:51:54 2006 +0000 Remove more debugging leftovers. commit 3366b6836572461209bb2f8aa28d9e662067dc54 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 2 20:09:14 2006 +0000 Rearrange and rename EXA code to be a bit more logically organized. Also removes a little bit of debugging leftovers. Summary: exa.c -> exa.c (miscellaneous code) exa_accel.c (all acceleration code) exa_migration.c (migration logic) exaasync.c -> exa_unaccel.c (software fallbacks) exapict.c -> exa_render.c (render extension stuff) exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h commit 25d4ff870d49533d82a77f144722ff7934d52e0b Author: Eric Anholt <anholt@freebsd.org> Date: Thu Feb 2 20:04:15 2006 +0000 Forced commit to note repocopies: exa.c -> exa_accel.c exa_migration.c exaasync.c -> exa_unaccel.c exapict.c -> exa_render.c exaoffscreen.c -> exa_offscreen.c exaPriv.h -> exa_priv.h commit 2ab487d4d20e4e34e73cc6d87f41bf0836c7a8af Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Feb 1 22:20:05 2006 +0000 Add a new function RRGetRotation() which does exactly the same thing as xf86GetRotation(), but allows for drivers to provide their own RandR implementation. xf86GetRotation could be obsoleted by this change. commit f4898b409376803c9a9dd8475bdd5576ff1cc59d Author: Luc Verhaegen <libv@skynet.be> Date: Tue Jan 31 14:49:43 2006 +0000 Further bug #5386 fixes: Fix some problems with the EDID code: Some bitoffsets were wrong. Unknown Detailed Sections weren't handled properly and defaulted to Detailed Timing. commit 437b385ce4cc3ff00e14d3d39f4a2f6c8f0c67a0 Author: Luc Verhaegen <libv@skynet.be> Date: Tue Jan 31 13:55:01 2006 +0000 Bring the cvt utility up to date with bug #5386 changes. Fix 2 issues with the generator routine: the allocated modeline wasn't nulled and mode->name's \0 wasn't copied over. PrintModeLine was rewritten and HDisplay gets rounded up to character width instead of refused. commit 8f3c69dcf17691f71bca7b0a2cd34f7788a97b8c Author: Luc Verhaegen <libv@skynet.be> Date: Tue Jan 31 13:04:02 2006 +0000 Accept modes with less than 25% horizontal blanking again (you can push old gtf timing to below 25%), only stop cvt reduced blanking. Users should be free to blow up their monitors if they so choose. commit 701b63cf1dcd3e49602114fb1dde45a74b4e1122 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Mon Jan 30 20:04:56 2006 +0000 Update to build against Mesa trunk. commit dd50015b05b901fe0c60717512c854389610aea2 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 28 02:20:37 2006 +0000 Add libc_wrapper support for random(), which will be used in upcoming EXA memory manager work. commit 3d1667278ff309d7f8e61a6d330f712bae5bcd41 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 28 00:37:52 2006 +0000 Remove leftover variables for cfb24 build, and finish commenting out Xglx standalone stuff, which some versions of automake get whiny about. commit ab01eb247f9e5d7c9995bf2d6432358cd64bf11d Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Jan 27 12:27:34 2006 +0000 update pci ids commit 261aa4403c77203f8f02b399ddd382c731dda324 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Jan 26 09:04:22 2006 +0000 remove that, and will put it in a i810 driver specific Changelog commit 94e678fd014c61d12591d7398b6591f24c3d71f1 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Jan 26 08:49:19 2006 +0000 add changelog for i810 updates commit c5e93182905332383ca3ef5db3f334cec69c8dda Author: Donnie Berkholz <spyderous@gentoo.org> Date: Thu Jan 26 04:32:45 2006 +0000 Really allow linking against Mesa trunk to work. commit 0dc0f17f27f99da79c99031b41b0c0e95ef035f5 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jan 26 04:10:43 2006 +0000 Speed up checkout and autogen by removing disused iplan2p4 and ilbm. commit 023d2b4e3c392eed1f149dc5b13a83429cd052a3 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 26 00:23:44 2006 +0000 Add forgotten HAVE_BACKTRACE define. commit 14fdd81614cdd6ef7e01976a43da8b6a3bf8386e Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jan 25 23:05:26 2006 +0000 Remove xf8_32wid, it's dead code with no maintainer interest. Also remove cfb24, since xf8_32wid was the only user. commit 2e28f4104ddf94a8f9a70fe6b2a2a6859ffedc8f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Jan 24 22:05:33 2006 +0000 Allow current trunk to build against Mesa trunk commit 0d9ed2624fe8fb95c57930da523351556ba11351 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Jan 23 22:01:34 2006 +0000 Commit #4633 - Initial mouse pointer incorrect with EXA which also fixes the repaint of the cursor image with randr events. commit 9148d8700b7c5afc2644e5820c57c509378f93ce Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Jan 23 13:59:14 2006 +0000 Commit slight variation of bug #5460 which is the merge of the new shadow code from kdrive. commit cfd3988ed906ab48ca4362256f8dbb8852d7ca0a Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Jan 23 13:58:19 2006 +0000 wrap with if XORG / endif commit f51ecc66e9ad6d2c3541b1dafa7659da5a0a3a86 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Jan 23 13:54:59 2006 +0000 #include "gcstruct.h" commit 80f45fa4dfa011c2ae7bcb34f87aafb91763f1fe Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Jan 23 13:54:34 2006 +0000 add damage.h & damagestr.h to SDK headers commit af5b3ea4b3df9e9c6dd6993c5e7238a366a3f508 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Jan 19 14:51:09 2006 +0000 add randrstr.h to sdk_HEADERS commit 03ebd37baba2f5af3ab502ff02ec14c15859dc3f Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jan 19 12:25:01 2006 +0000 Make error() bomb with exit code 1, not 0. commit adce1f16e0d815e5c762407da3544a7d2eff9303 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 19 00:06:57 2006 +0000 Only try to use byteswap.h on linux. Assume that everyone else (thinking of BSDs here) has sys/endian.h, and use macros as appropriate for the names. This should probably be in a gloabl header. commit 1c3f8727b2349c9b988eaa744f11366322d42538 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jan 18 19:42:56 2006 +0000 More kdrive merge, fast path fbBlt to use memcpy() when possible. Good for -5% to 60% speedup on XGetImage, and 0% to 10% speedup on copies within host memory. Based on work by Jaymz Julian. commit e70b64b93024d05519014fb1b76fe26bd9f3a496 Author: Dave Airlie <airlied@linux.ie> Date: Wed Jan 18 07:15:55 2006 +0000 Updated xgl code drop from Novell + xserver tree changes commit b5356e0afaf2b660c8905f63d5fdcb03402b81c5 Author: Dave Airlie <airlied@linux.ie> Date: Wed Jan 18 07:00:50 2006 +0000 typo in last change commit 506eca5f57b960a6650c3387047a6ae8a22181e9 Author: Dave Airlie <airlied@linux.ie> Date: Wed Jan 18 06:56:52 2006 +0000 Wrap sdk_HEADERS in if XORG as otherwise installing non-xorg servers breaks. commit 8ccf4f2b8fdb5e57d2ec5f2d54731fbf83fb9d8c Author: Dave Airlie <airlied@linux.ie> Date: Wed Jan 18 06:49:17 2006 +0000 This is a fix from David Reveman from the xserver tree, Make fbPadPixmap work with negative stride commit a1f9262c6acd195c0fcf5f602d5ca0c252993521 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Jan 17 21:27:49 2006 +0000 file glxvisuals.c was initially added on branch accel_indirect_glx. commit c2dedf4d17f8a5b1a8037fd2b4e29122ef78945a Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jan 12 22:14:56 2006 +0000 Thu Jan 12 17:09:18 2006 Søren Sandmann <sandmann@redhat.com> Add new functions to enable and disable events on Map and Unmap. Use them here to make sure Composite redirect doesn't cause Map/UnmapNotify events that would confuse window managers. commit 847d83ec3c90c5b298eaf19ba55251b4a30f4155 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jan 12 00:21:59 2006 +0000 Bug #2996: libglx / libGLcore should use a dispatch table Port all changes from the (monolithic) accelerated_indirect-0-0-1 branch to the modular trunk. This will break the Darwin and cygwin builds. Other than the changes to symlink-mesa.sh and the various Makefile.am files, to code is identical to what's in the branch. Reviewed by: airlied, krh commit c56e9a8849ce8dd5c09732ae1860e409e7886690 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jan 10 03:24:53 2006 +0000 Bomb when symlink-mesa.sh continues, instead of silently failing. commit 2949c705f11f8710301555c039bcecbe748cabd9 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jan 10 03:23:05 2006 +0000 Add all subdirs used to DIST_SUBDIRS, and files to EXTRA_DIST. Attempt to build xeglmodule.c, not xglxmodule.c. Add xf86Sbus.h to EXTRA_DIST, as _HEADERS doesn't appear to get the same treatment as _SOURCES in terms of automatically DISTing. commit 4fc9eb592a446ad5711bdaa82c60e9fe010fd76a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jan 10 02:32:20 2006 +0000 Bomb out if symlink-mesa.sh failed. commit 890ec849479db2510a9b4bc5e5e2f7978ca37b83 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jan 10 02:30:56 2006 +0000 Add xgl to DIST_SUBDIRS. commit 53dbd00a75313ec5301ca95b2e91d5d02bdaf820 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jan 8 23:43:54 2006 +0000 Remove remaining #ifdef DPSEXT stanzas. commit 7fc9bc44e099f8f046bf707cb87ef7d736933f80 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jan 7 01:29:05 2006 +0000 Compile fix, again, stupid non-clean builds commit 9d62d1e6903ccc095f784279a699b3f40a8f0cf8 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jan 7 00:45:17 2006 +0000 Bug #5218: Don't crash on unconfigured interfaces. (Andrei Barbu) commit 3c58072956c28ebc3ca2eb50c1ff09823e1219d7 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jan 7 00:33:41 2006 +0000 One more build fix. commit 07303c1b42afd1ada98cbc11d1ba616d366017fb Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jan 7 00:05:46 2006 +0000 This version will actually compile commit 7f46aba35ee482e9b28ecc81d1a99d423fc88a70 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 6 23:52:23 2006 +0000 Compile fix commit 25babf2791ad42101a86ba2a0f14564328256ee2 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 6 23:36:53 2006 +0000 Missed file. commit 13c9e0c094c4e34cd1e43a7cc08b2dca39a32412 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 6 23:06:15 2006 +0000 Bug #5525: Build a working Xprt. (Drew Parsons) commit fe0c838b5d8bc8d9cf5a686bb7d3e90682d2d19a Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 6 18:06:02 2006 +0000 Move drawable lock acquisition into DRIClipNotify from DRIValidateTree, so we only take it when clipping a DRI drawable instead of on every tree update. Note drawable lock acquisition per- screen instead of globally, and drop it in BlockHandler if necessary. commit 39ce5f1544029412f4060f3e89ce1d87222ef42b Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 6 17:05:26 2006 +0000 Remove unused X11R4 DDX compatibility function miClipNotify. commit 07ecb969d7eb8d4ab0bb0b8a55a5f40f3c8ec5e3 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jan 4 03:29:15 2006 +0000 Forced commit to note that glyph privates commit was: Obtained from: xserver tree (David Reveman) commit b6b88d2f62d8c596171f487dd25fbdbc85d0c5a8 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jan 4 00:05:16 2006 +0000 Correct rounding in divide-by-255 code. Obtained from xserver. commit b9c0ae867e1b52186c26841a77745f7f5a0a76dd Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jan 3 22:36:46 2006 +0000 Remove the manual AddFilter for convolution, which I'm pretty sure shouldn't be necessary due to it already happening from PictureSetDefaultFilters. commit 601ab861b46a62b0742ffd3e937c4fab129664f0 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jan 3 22:06:23 2006 +0000 Add glyph privates for Xgl, which uses them to implement a glyph cache. EXA would probably also like to do this. This breaks module ABI for EXA and XAA, and likely breaks proprietary drivers as well. commit 1729fc882ceec392331566c95efd5968fe9e97fd Author: Eric Anholt <anholt@freebsd.org> Date: Sat Dec 31 08:06:00 2005 +0000 Change REGION_INIT(pScreen, &foo, NullBox, 0) to REGION_NULL(pScreen, &foo). While it is no longer (or rather, once again not) required as of regionstr.h r1.4, it matches the style of the rest of the xorg code. commit c25536a7937b11a5347bfb8796d5cb6eb0445b51 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Dec 31 08:01:31 2005 +0000 Initialize the fourcc value in stack-allocated glitz_pixel_format_t structures. Greatly reduces the number of uninitialized-value accesses during Xgl startup according to valgrind. Allocating and filling these in by hand on the stack seems very shady to me. commit e6dab3d7c429a2d30d31f188c4554e870011e051 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Dec 30 12:05:47 2005 +0000 Fix the AC_TRY_RUN for sys/linker.h which had no hope due to lacking a main() to instead use a nice AC_CHECK_HEADERS that works. Also, fix the nearby SYSV IPC check which was lacking an argument and giving bogus results (it's "AC_TRY_LINK(includes, main, yes, no)"). commit eef16c36ad6e90fd8eaad4d8bdbc1205bc28a66f Author: Eric Anholt <anholt@freebsd.org> Date: Fri Dec 30 05:44:14 2005 +0000 Add #undef BSD44SOCKETS, without which the listener socket on FreeBSD would be created without the port number due to xtrans's define not being used when xtrans was compiled in the X Server. commit 7aa0ea23bc9b8df582fe06f2bc39dcfe34583c7e Author: Eric Anholt <anholt@freebsd.org> Date: Fri Dec 30 04:11:42 2005 +0000 Add an empty all-local target for FreeBSD make's sake, which doesn't deal with .PHONY. commit 49a9249239b0dd105b83a101db6e32549978f0d5 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 29 21:11:41 2005 +0000 Make kdInputMachine static const, shrinks .data a bit. commit 6d7ee4167d9daeef9b793789a70aa724c4fe6bf4 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 29 20:54:08 2005 +0000 Style fix, make SCREEN_EPILOGUE two arguments instead of three. commit b1efb3810cfea8116d76bae3ff3acfee521f4793 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 29 20:42:54 2005 +0000 Missed one commit 858b4bc14a7adc7314ce5043c7ff8ca1891dd0c9 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 29 20:38:29 2005 +0000 missed changelog entry: Enough build fixes to get {sdl,ephyr,fake} to link. commit 54922aeadb29df0a1819afd3f616131aa56e140a Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 29 20:29:26 2005 +0000 Disable building LBX by default. commit fc69a2e729532ee062af6676fb187a89f7fffe8a Author: Dave Airlie <airlied@linux.ie> Date: Thu Dec 29 08:42:49 2005 +0000 Remove PowerMAX_OS define it never worked , it'll never work again, finishes running joke of OLS2005 commit 25d3852b833bc0b61ce8313ce116251a2602b827 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Dec 29 00:44:20 2005 +0000 Undo spamming of libv's ChangeLog entry. commit d6646307f063b938c44d6193a2e8872e178aa90f Author: Eric Anholt <anholt@freebsd.org> Date: Thu Dec 29 00:19:33 2005 +0000 Add necessary *CONFIG_H declarations and a force-off of XF86* extensions in miinitext in the XGL case. Prevents mismatched structure sizes on my _XSERVER64 machine. At this point, with the uncommitted render/ diffs, Xglx starts up but displays badly. commit 3664c3ebf348d07ae3fe301fb8720adf32cf6d64 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Dec 28 15:22:21 2005 +0000 Bug #5153: standalone CVT modeline generator. - add hw/xfree86/utils/cvt/, cvt.c, cvt.man.pre and Makefile.am. - Adjust configure.ac and hw/xfree86/utils/Makefile.am for cvt. - Add MonPtr->reducedblanking and Option "ReducedBlanking" to the Monitor section. - Check for reduced blanking in xf86CheckModeForMonitor and disallow modes with less than 25% blanking otherwise. - Fix some warnings in hw/xfree86/common/xf86Config.c. commit 08708f7d616a7c0a596fb71dd7acd76d45257fec Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 28 11:48:14 2005 +0000 Merge from xserver: Make the existing ChangePictureFilter and ChangePictureTransform screen hooks get called at appropriate times. commit 31d0fdde19598ce9375cc9638ad4e2c8b5af8d9a Author: Adam Jackson <ajax@nwnk.net> Date: Wed Dec 28 10:46:56 2005 +0000 Remove a debugging printf commit 64ac7401ad5022462279dff4dcfb12844c9857ae Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 28 10:43:02 2005 +0000 Fix a copy'n'paste-o that would result in mis-rounding of the results of several composite operators in A and G channels. commit 9ceffb6b92e55f0d74d71489900d43940f14dfd9 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 28 10:37:17 2005 +0000 Merge from xserver a header for shm's server internal functions, which are called by DDXes. Desired by XGL, and should be used in other locations, probably. commit b1b40ed6a87f72d07825624730cca193d5a89baf Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 28 10:31:46 2005 +0000 Initial commit of XGL build infrastructure and XGL code changes for building within the xorg server tree. Requires additional, uncommitted dix changes to successfully build, and successful running is still yet to happen. commit 36061c75ae42aa733cde9b3fd05e0c8280b31655 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 28 10:10:59 2005 +0000 Forced commit to note repocopy from xserver CVS as of a few minutes ago. commit 05c139d4cdfd11d39c0168d0c80ac1dbdd069b4c Author: Adam Jackson <ajax@nwnk.net> Date: Wed Dec 28 10:02:54 2005 +0000 Enough build fixes to get {sdl,ephyr,fake} to link. commit aeb770f645e2d591b255ec4ab06addcb1beafa5f Author: Dave Airlie <airlied@linux.ie> Date: Wed Dec 28 02:43:50 2005 +0000 recommit previous changes to evdev.c commit ce7c0c89375ec74f89ae5727998fd75fb768d280 Author: Dave Airlie <airlied@linux.ie> Date: Wed Dec 28 01:57:11 2005 +0000 some updates for default colormap install commit 022aa1127c7dcd133ce73dbc12a10bfba8b1ed6e Author: Adam Jackson <ajax@nwnk.net> Date: Wed Dec 28 01:01:06 2005 +0000 Get Xsdl closer to linking. commit 27d79ab2bcebb634d0b69c851c72283a7514eb0c Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 27 23:03:15 2005 +0000 s/XSERVER/KDRIVE/ commit 72817714a0787536ce8e8ad0d5473dea0f1c1abe Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 27 23:01:27 2005 +0000 Remove Imakefiles. commit 9dd0af6cb4e2c8976ada57a4f4ed16faae090a9d Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 27 08:31:37 2005 +0000 Skeletal kdrive build system. Totall non-functional atm. commit 7fd73d2953cf9449c15462cf4bf67639db64f997 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 27 08:29:50 2005 +0000 Build fixes: XSERVER_LIBS -> KDRIVE_LIBS, config.h -> kdrive-config.h commit 2f3ac6e5fcbd0e954a094fb6b975d7c8816c44b7 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 27 08:26:03 2005 +0000 Start importing kdrive. commit 6798fd0170f4225ce4e69148978533fcee9bdc34 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Dec 26 19:13:52 2005 +0000 Bug #4190: Add a rule for 'make relink' since automake sucks. commit 8fc4ea8620913776a903ee2b4f22c306d5778623 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Dec 26 18:55:09 2005 +0000 Nuke unsupported NDBM routines. Shrink the hash table a bit, over 25% of the buckets were going empty. commit ed33c7c98ad0c542e9e2dd6caa3f84879c21dd61 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Dec 26 04:23:58 2005 +0000 Remove unused -xkbdb and -noloadxkb options. Rename -ar1 and -ar2 to -ardelay and -arinterval, respectively. Remove XKB banner from help text. commit 7e3cb9a09ac422179be89773f7fb14a462d25434 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Dec 25 22:25:15 2005 +0000 Remove unused layer module. commit 9b083369ded2258cbc8ac2058e06ec8a3b171178 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Dec 23 20:11:12 2005 +0000 Change list of X server man pages in "See Also" section to list the ones actually included and remove the ones that are no longer. commit 5fd978b1e7bce9169f87712a4a7c2c36a68ac00a Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Dec 23 07:40:44 2005 +0000 Make LBX configuration default to auto. commit 5230e86b1cc841bfb35806618052aa835b7eb7e7 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 04:13:37 2005 +0000 fix up xglglx.c commit feb735c5bb0cd391136f1c73476703dff82dc9b0 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 02:07:58 2005 +0000 Well there were a couple of snapshots later than CVS available outside of Novell, so I've done a crazy merge to try and get them into a workable CVS, I suspect I may have failed.. there is a pre-xgldrop-merge tag if I did. commit ade104ce5a016623c1ce97b0d52b531185b35baf Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 01:51:40 2005 +0000 check drawable is available commit 7fb521e80d6e2c05e9475e74fbf80bfbe74cda95 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 01:50:04 2005 +0000 from davidr's tree update some fixes commit c88a3145d057ab72466a3ea8b789bf419e4efc33 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 01:49:21 2005 +0000 from davidr's tree if source picture defined return commit c59508566f11982aa3f4be383597d0e6178718c2 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 01:13:28 2005 +0000 fix glx up for newest glitz interface commit d822bc159672e7327054e572b659ae7dde040e83 Author: Dave Airlie <airlied@linux.ie> Date: Fri Dec 23 00:08:35 2005 +0000 make xgl code at least build against latest glitz. commit 6e2086395d99081d8d682b90cec650a06e41fc2c Author: Dave Airlie <airlied@linux.ie> Date: Thu Dec 22 23:32:49 2005 +0000 fixups for newer glitz API commit f3ae42c0fd910b7f9feb9be91ccb056bce0cd999 Author: Dave Airlie <airlied@linux.ie> Date: Thu Dec 22 23:31:15 2005 +0000 small fix towards new glitz interface commit 2af7e94eab6847159a3439301ecc93c62a12b1a0 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Dec 22 13:54:08 2005 +0000 Adjust the rules for auto-generating some source files, so that they work on both GNU make and FreeBSD's make. commit 0d7ec5c7d9b451066a079fe56bcc9722341a91ff Author: Kevin E Martin <kem@kem.org> Date: Wed Dec 21 02:30:08 2005 +0000 Update package version for X11R7 release. commit b37e738d5f4e1769bdee98acca788aeeb1556bcc Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 20 21:40:19 2005 +0000 Fix an fb regression on A8 pictures. (Fredrik Höglund) commit 03d37eb03864cfc1a2f8d239d5a4c8341bf274f7 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 20 21:34:21 2005 +0000 Bug #5359: Fix a segfault (Mark Kettenis) commit 7b89b643c12fa0f7a662b3ff76e05ece53101312 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Dec 19 16:44:21 2005 +0000 Bug #5116: Refer DRI section details to dri.fd.o. commit 3ef3add90351e3cb7b54dbcedc234bc5d3d65f1c Author: Adam Jackson <ajax@nwnk.net> Date: Mon Dec 19 16:34:07 2005 +0000 Stub COPYING files commit 3566307c8d44f89622ea51169f67c79092cb56d1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Dec 19 09:18:29 2005 +0000 Fix typos. commit 137447c5f3c6f1914ac869297f823ae93ce428ac Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Dec 15 01:54:45 2005 +0000 Update to 2005-12-14 snapshot from pciids.sf.net commit 2cf86fce41e3fd2ac48c5088da11e19077e42e65 Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 15 00:20:27 2005 +0000 Update package version number for final X11R7 release candidate. Update release string to 6.99.99.904. commit f1ba3b4f33a928a3a59538799b3863de5c87e70e Author: Adam Jackson <ajax@nwnk.net> Date: Wed Dec 14 20:11:16 2005 +0000 Bug #4718: Command line flag to disable ACPI. commit cf605eb91619a8c0589a08674ffc3e018471b3fc Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 13 17:35:26 2005 +0000 Build libglx correctly when not building the Xorg DDX. commit b076dd787ff71c4b385ab4e2e4eb367f3de378f6 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 13 17:34:06 2005 +0000 Spell it XINERAMA_SRCS, not PANORAMIX_SRCS. commit 3666dbb5f3e06fa6a72def64556d64cf73141777 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Dec 12 23:33:55 2005 +0000 Remove unnecessary include of dgaproc.h that broke Solaris builds. commit 438a5549f08ab03443d45dd46323579a2f2e4ba2 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Dec 12 03:06:18 2005 +0000 Bugzilla #4715 <https://bugs.freedesktop.org/show_bug.cgi?id=4715> Files in xserver/xorg/Xext not included in tarball after make dist commit 62f3ef930adc7edd49b27dd1f7b0f51bc8bc0afa Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 18:35:21 2005 +0000 Bug #5258: Restore binary compatibility with 6.8.2's PictureRec. (Aaron Plattner) commit b99dea9dcf99f907a3536c0db1c39cc67931a5b1 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 18:32:46 2005 +0000 Bug #4935: Fix includes. (Eric Anholt) commit f4957ee94810b471110deebf03d7413399b45db3 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 18:30:51 2005 +0000 Bug #4809: Re-fix that doesn't break distcheck. (Alan Coopersmith) commit de22d0c2264bd6dbacbbb4160d09c7e84ad37e70 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 15:30:05 2005 +0000 Fix a thinko so the code matches the comment commit 6fcb049cd0d2291da5943176716d1f7bbb85fdc2 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 06:49:39 2005 +0000 Bug #1288: Additional refactor of the driver probe logic to keep ati loaded before atimisc. commit 17ac5e9fec1e07bd18ae1407043c300cb4695ede Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 05:36:41 2005 +0000 Push the fallback drivers to the end of the list so driver probe order stays useful. commit 80ea67e37980d07438749f1aa4dfdd7ee1086799 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 03:59:41 2005 +0000 Bug #4361: Change driver probe logic to read the driver list from disk instead of using a compile-time array. commit 7fa2d11d85d43f42aa9c02f8d772c91d1b04df43 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Dec 9 03:57:41 2005 +0000 Bug #4361: Define XF86CONFIGFILE properly so config file generation works commit 26b41ff43959a07a778bc3d6e4db8da036f09de3 Author: Kevin E Martin <kem@kem.org> Date: Fri Dec 9 03:02:21 2005 +0000 Fix sgml docs build. commit d6f98cbdb8fb74c504a92939d3741420eeed7110 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 8 19:33:09 2005 +0000 Bug #3944: Fix 24bpp packed pixel. (Søren Sandmann Pedersen) commit f9ccebe8c5cd674c08fe8ed860d1c456e42c937e Author: Adam Jackson <ajax@nwnk.net> Date: Thu Dec 8 19:27:13 2005 +0000 Bug #4928: Fix compilation for Alpha. (Stefaan DeRoeck) commit 3a6bdf0715b994d6ecaa5b6e448695a8a8ec7d72 Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 8 19:21:12 2005 +0000 Add configure option to set the top level font dir. commit 008c2dd5e4614e6a21123ee3a2ac9c5d3bafa97a Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 8 17:55:19 2005 +0000 Add configure options to allow hard-coded paths to be changed. commit 39189c2b86a4c2ab5f3f161d423eb072356668e5 Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 8 17:54:40 2005 +0000 Allow hard-coded paths to be configurable. commit 20c0ebe7b3feb85abf9bf140b7799aafc6f59513 Author: Kevin E Martin <kem@kem.org> Date: Wed Dec 7 16:18:02 2005 +0000 Change to use the app-defaults default dir configured in libXt. commit 4a39354e14c3c360046b04ea0d4825832b05df05 Author: Kevin E Martin <kem@kem.org> Date: Tue Dec 6 22:48:51 2005 +0000 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. commit 84faf8dc9747bc4f1db5ebc2f23e17cf1460e2e9 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Dec 6 16:22:47 2005 +0000 Bug #5230: Fix whitespace bugs. commit 9439297b7bc07dcb90f0d01da09eea1bac3d42ff Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Dec 6 15:50:35 2005 +0000 Bugzilla #5219 <https://bugs.freedesktop.org/show_bug.cgi?id=5219> Make sure all optional sources are included in EXTRA_DIST, even if they aren't used on the platform the distballs are made on. commit f259fd680caccb59546d7788704e46e51a9c6146 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Dec 3 22:47:47 2005 +0000 Disable the xf8_32wid logic for now, breaks distcheck commit 26f9c4305660c2b3dc7fe8d214bcdd3c24e1b198 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Dec 3 17:04:45 2005 +0000 Bugzilla #4809 <https://bugs.freedesktop.org/show_bug.cgi?id=4809> Patch #3908 <https://bugs.freedesktop.org/attachment.cgi?id=3908> xf8_32wid and cfb24 only need to be built on sparc commit 98231c6b38c98976f4ac2b9417ecfbc37a8cbe9a Author: Kevin E Martin <kem@kem.org> Date: Sat Dec 3 05:47:25 2005 +0000 Update package version number for X11R7 RC3 release. Update release string to 6.99.99.903 (i.e., 7.0 RC3). commit 7c00afd0ec94e491f1a9ef32d6543ed51ea3319d Author: Kevin E Martin <kem@kem.org> Date: Fri Dec 2 06:02:45 2005 +0000 Define XFree86Server only where it is required. commit 924518605b613eb66aa569877fa9f131e6f2a2fd Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 1 23:39:00 2005 +0000 Fix GL build when srcdir != builddir (Donnie Berkholz). commit 14b9315379fe8c783013906616d868f93fd51c83 Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 1 22:06:49 2005 +0000 Add missing XvExtension and XvMCExtension defines. commit df8fa21d3189e20260328b88cc8a86224a9b1ebf Author: Kevin E Martin <kem@kem.org> Date: Thu Dec 1 16:20:09 2005 +0000 Fix typo: xorg_bus_linuxbsdpci ==> xorg_bus_linuxpci commit ccfaf82367c9d057fd8314ce36b47f0a8eb696b6 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Dec 1 05:04:07 2005 +0000 Bug #5160: Fix the modular build to try to use the same logic for choosing the architecture/os-specific bus support as monolithic. commit 9c0bd9687fe7d20f2f0793332ae0db06f035eb23 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Nov 30 22:59:22 2005 +0000 Import libdrm 2.0 commit 4ec0b623b6ab5f8a1e5af2cc3d839251acf81ce2 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Nov 30 02:36:25 2005 +0000 Bug #5093: Fix fb for non-SSE machines. (Xavier Bachelot) commit ed826d563cba82c516fd41f6a29ee50aa1fe6c6a Author: Adam Jackson <ajax@nwnk.net> Date: Tue Nov 29 23:34:30 2005 +0000 Only build dlloader modules by default. commit da5d66f2ff27b21fe5c39a4abb4f627edd707f1d Author: Kevin E Martin <kem@kem.org> Date: Tue Nov 29 16:39:33 2005 +0000 Fix usage of XFree86LOADER/XFree86Module/IN_MODULE and update loadable module builds to reflect this change. commit 51a721a6dbb42702347aad3115147e4922fc1a25 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Nov 28 22:05:09 2005 +0000 Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) commit 381931b15b15d0a2ec384b0c22864412c44f9c6e Author: Kevin E Martin <kem@kem.org> Date: Wed Nov 23 07:14:46 2005 +0000 Add configure option to install libxf86config.a (disabled by default). commit 594ca0966e8fd5992ebf95170cc42e19c698fec6 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Nov 22 02:11:00 2005 +0000 Bug #5118: Use "rm -f" instead of "$(RM)", which isn't always defined. commit 1c8c1179c0789e3e134d31a62dbb88bfdb594b26 Author: Felix Kuehling <fxkuehl@gmx.de> Date: Mon Nov 21 04:24:07 2005 +0000 Fix Xprt library dependencies in the case that Xprint is auto-detected by configure. commit a1f110bda80bb3b8e4f602385ca5ccd96cf3f786 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Nov 20 23:01:02 2005 +0000 Make sure XKM_OUTPUT_DIR (used in code) ends in / (so paths don't get hosed when appending file names) but XKB_COMPILED_DIR (used in Makefiles) does not so install-sh -d doesn't get confused when the directory already exists. commit 385730d23944c24dd9af45b27f62c1161abc48b2 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Nov 20 04:15:15 2005 +0000 Add xext to list of modules xorgcfg depends on. commit 63aa96c08a8390621b017ea498c88cf88152024b Author: Kevin E Martin <kem@kem.org> Date: Sat Nov 19 07:15:50 2005 +0000 Update pkgconfig files to separate library build-time dependencies from application build-time dependencies, and update package deps to work with separate build roots. commit d3b6653a2892e8c929c79fe3ace19ac9d8366fc4 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Nov 19 03:53:04 2005 +0000 Bug #4824: Build XTrap support by default, matching monolith. commit 627ac1fe1dbcbc070575da7bee9e686a7dce5262 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Nov 18 23:34:04 2005 +0000 Bug #5060: Fix non-Linux DRI on 64 bit post Linux 32/64 changes. commit e3ec048ff2fe0ee0862472e9b147b7ce488ea898 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Nov 18 22:43:50 2005 +0000 Bug #4928: Unbreak Makefile.am for Alpha chips. (Stefan DeRoeck) commit de95d8ee197a0bb738037195997d754a20e10254 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Nov 18 18:02:24 2005 +0000 Bug #4859: Don't segfault on bad DDC read. (Tony Houghton) commit 21f7d03dbc347f6bf97a40671275ac75df15bd10 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Nov 16 07:28:19 2005 +0000 Fix builds when not building the Xorg DDX. commit fb2d9df869af0c96f1488ef7cf364e01a9d28f3f Author: Adam Jackson <ajax@nwnk.net> Date: Tue Nov 15 00:29:23 2005 +0000 Make fb build on darwin/ppc without addition #define hacks commit 16b315affa30e34b9bab81778978484137a5d9bb Author: Kevin E Martin <kem@kem.org> Date: Mon Nov 14 21:04:12 2005 +0000 Use glcontextmodes.[ch] from Mesa. commit 0c110c80e7afbef50bb354cf1df30123ed048250 Author: Kevin E Martin <kem@kem.org> Date: Mon Nov 14 20:18:03 2005 +0000 Add GL_CFLAGS so that GLX can find its proto headers when using separate build dirs. commit fc81c13e4dafb0eb818879454ee7ae3fa3dae6d0 Author: Kean Johnson <kean@armory.com> Date: Mon Nov 14 18:49:30 2005 +0000 Dont prevent SCO platforms for using the default ZAxisMapping now that the OS layer correctly sends z-axis events when the wheel button is used. commit bd9fb533b31c2427d854199fa59dccd357cf874b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Nov 14 00:01:34 2005 +0000 Default xkb-output directory needs trailing slash. commit 267cbffa41fffff69c692911d128462f5bab2a69 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Nov 13 20:53:24 2005 +0000 Bug #5019 <https://bugs.freedesktop.org/show_bug.cgi?id=5019> xserver installs manpages into 'man1' instead of 'man1x' commit 3179d29b8212c197634d81fbeb8dd2e8df995735 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Nov 12 18:03:34 2005 +0000 use RGB_DB not RGB_PATH as that's what configure defines (Jürg Billeter <j@bitron.ch>) commit 0e7e4c7064df64c29b1a0ccd84fba1be7c748f18 Author: Kevin E Martin <kem@kem.org> Date: Thu Nov 10 04:59:21 2005 +0000 Fix typo to enable DGA support. EXTMODULE is required to build DGA support into extmod. commit e4554db8f87c6a39a3087186395972000bd2085c Author: Kean Johnson <kean@armory.com> Date: Thu Nov 10 02:41:20 2005 +0000 Dont pass wheel mouse buttons as real buttons, map them as Z-Axis movement on SCO and USL. Re-instate the ZAxisMapping default for the mouse driver. commit 1b26fe6d2092c202141a0371f47ef1cd7c66ec00 Author: Kevin E Martin <kem@kem.org> Date: Wed Nov 9 21:28:54 2005 +0000 Update package version number for X11R7 RC2 release. Update release string to 6.99.99.902 (i.e., 7.0 RC2). commit f886e632b8dab1bfa0de42b9759a8284ecd9b94f Author: Matthias Hopf <mhopf@suse.de> Date: Wed Nov 9 17:05:41 2005 +0000 Bug #4915: ButtonMapping option which allows to define arbitrary button mappings (including left-handed mouse etc.). Fixed incorrect usage of non-reversed, but ZAxisMapped buttons for state detection. Nuked unused part of reverseMap. commit a25871ae52dd5ce094ba8c1b2021dd027d3e71bd Author: Kevin E Martin <kem@kem.org> Date: Wed Nov 9 01:00:46 2005 +0000 DRM 1.0.5 import commit c9709c0a38af46368726857f7261cbeb84e53911 Author: Kevin E Martin <kem@kem.org> Date: Tue Nov 8 22:47:57 2005 +0000 Add newly checked in files to Xorg server build. Fix release date. Enable DGA extension by default. commit f8430a1b8651f4b52d9d3b54694a60d929b48925 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Nov 8 19:04:56 2005 +0000 Bug #2880, add functions for byte and word level access to pci config space. Fix broken utf8 again. commit 5390c7ab05d23f64e6d9afaa558be246a6d6e1b4 Author: Kean Johnson <kean@armory.com> Date: Tue Nov 8 06:33:30 2005 +0000 See ChangeLog entry 2005-11-07 for details. commit f5814bf3fff5352ed6edef4c58aadf2d4593f094 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Nov 8 03:12:43 2005 +0000 Don't reference noXkbExtension when building without XKB. (Bob Terek - Sun Microsystems) commit e73cdba865f36ebf78c2dc4ff674b4d9bfe85013 Author: Kevin E Martin <kem@kem.org> Date: Mon Nov 7 21:03:49 2005 +0000 Fix Xvfb to work properly in depth 15 mode. Fixes XTS5 XCloseDisplay-3 server crash. commit 890ed0e082e048fa8daf48229b40558381bd131d Author: Thomas Hellstrom <unichrome@shipmail.org> Date: Sun Nov 6 16:40:59 2005 +0000 Fix a bug where a system memory pixmap got a wrong address if memcpy() fallback was used for downloading from screen. commit 70aedcf32a0c924fd073f5b36d20813e8323026b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Nov 5 18:56:50 2005 +0000 Bug #4948: <https://bugs.freedesktop.org/show_bug.cgi?id=4948> Incorrect URL in log file for Xorg CVS. Also fixed wording of statement to not refer to monolithic CVS since modular uses the same code, so it was appearing in modular builds too. commit 89c661d61f1b9c70a08237476fa1f7f42c1783ab Author: Kevin E Martin <kem@kem.org> Date: Fri Nov 4 21:37:32 2005 +0000 Only use fbCopyAreammx if planemask is FB_ALLONES (fixes XTS5 XCopyArea tests 22 and 23). commit 0b150a05e6fadca7ee8240697d6cbeadea0c53b3 Author: Ian Romanick <idr@us.ibm.com> Date: Thu Nov 3 17:12:53 2005 +0000 Whitespace change just to make sure I created the branch correctly. commit 90cf8e339b71c2f8f2d7a362e6e1ca8078d7f4fd Author: Kevin E Martin <kem@kem.org> Date: Thu Nov 3 17:08:06 2005 +0000 Fix vendor string and release version reported by the servers. Enable security, lbx and xevie extensions to give us parity with monolithic tree. commit f23defeef285b4a5bb58405589294bd557c9bb01 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Nov 3 16:57:01 2005 +0000 Use APP_MAN_SUFFIX for Xserver man page instead of hardcoding section 1 commit f5daec674aeb4fe6ccbc95ead8a319bbeb368d9f Author: Kevin E Martin <kem@kem.org> Date: Wed Nov 2 15:56:40 2005 +0000 Add support for enabling/disabling DBE (part of generic enable/disable extension support in the server). commit a311bfa73afa1af76f81958d23bc8e0c631d6828 Author: Kevin E Martin <kem@kem.org> Date: Wed Nov 2 15:53:57 2005 +0000 Fix support for enabling/disabling extensions loaded from modules. commit 462a2407d540eac831c9be4dcee8a16aa1cea6ac Author: Kevin E Martin <kem@kem.org> Date: Tue Nov 1 15:01:51 2005 +0000 Add xorg-server.m4 for driver dependency checking. Update pkgcheck depedencies to work with separate build roots. commit 56101c9d6ec3585a0a8550da4b83dd399e3bcce6 Author: Kevin E Martin <kem@kem.org> Date: Mon Oct 31 05:45:40 2005 +0000 Fix fd leak by closing them in the ACPI code instead of just using shutdown. commit 7993486e80711bd6f6f5b6c2b1f2ac32bfba735b Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Sun Oct 30 17:38:49 2005 +0000 RandR: Add a driver func to let the driver determine the physical size of a screen size (display mode). Useful for faked widescreen modes, modes which are scaled by the driver, etc. This really helps fixing RandR's sometimes dumb DPI assumptions. commit c818d3a1a5439c54fc687927a99d69712602ed5e Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Sun Oct 30 09:27:06 2005 +0000 Add xf86RandRSetNewVirtualAndDimensions to loader symlist commit fdbb3ea60949a12eb2f4805d16e8acc2348e39c7 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Sat Oct 29 21:31:23 2005 +0000 Add function for drivers to change RandR's idea of the virtual screen size. (This allows drivers to reserve a larger virtual size at start and change it later) commit e921eec1c6d6ce32630977bd876c529a7c694459 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Oct 29 00:12:33 2005 +0000 Make X -> Xorg symlink at install time. commit f842c229d4c4dbd5c01364f9e99709bedfd32be6 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 28 16:01:17 2005 +0000 build fix on alpha commit 7416fd61a17a70a2c27c4b1d19796955c296dc7a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 27 21:03:27 2005 +0000 Improved stack trace dump code for Solaris - try fork & exec of pstack first so we can see the names of non-exported symbols that aren't visible to walkcontext/dladdr1 code. commit b588bdfe2ac3758d7188706078d79fa276a303e3 Author: Dave Airlie <airlied@linux.ie> Date: Sat Oct 22 04:38:50 2005 +0000 programs/Xserver/GL/mesa/X/xf86glx.c: Missing initializer in xf86glx.c spotted while debugging something else. commit 59279da49806b032027bb54410bc2513d21e3d9e Author: Adam Jackson <ajax@nwnk.net> Date: Fri Oct 21 19:06:13 2005 +0000 Bug #1429: Report input device type correctly. (Stéphane VOLTZ) commit 4a8072011895e6f472e429af7503fc07e0561144 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Oct 21 18:50:09 2005 +0000 Bug #4730: Byte-swap the pixmap ID correctly. (Neil Campbell) commit 81e913d3106066de73792f59f3e50e2b5458c567 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Oct 21 18:23:33 2005 +0000 Bug #4840: Typo, x$xRES -> x$RES. (George Fufutos) commit f5a58178347878e0409b592330a07867bea02bef Author: Ian Romanick <idr@us.ibm.com> Date: Thu Oct 20 23:24:47 2005 +0000 Make sure that the __gl*_size prototypes are seen in all the places that they need to be seen. commit 279cf9f79da5778b6e14ecc437379d73e3bec5b0 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Thu Oct 20 22:41:28 2005 +0000 Bug #4817 <https://bugs.freedesktop.org/show_bug.cgi?id=4817> Restore '=' to '==' in test for mmx_capable. commit 1f43d218cc24358a0379535ed517c23011633c31 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Thu Oct 20 21:45:40 2005 +0000 EXA: The "optimization" for using a fill operation instead of 1x1 copies checked the destination drawable's dimensions (!) instead of the tile's. Really.... commit 15f56b203dbc14ea59885d40fd4bed3da9e8e190 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Oct 20 18:52:51 2005 +0000 Move xf86XTrapModule.c to dixmods, guess at a build system. commit da43c778f4a831061ad2c8b8a312b7a54c9cd79e Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 19 22:45:54 2005 +0000 Bug #3224: Degrade XKB fallback message to X_WARNING. commit 4ebd26f04b32f1b09e0759f1a83437d0b1c4d646 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 19 22:36:22 2005 +0000 Bug #3196: Fix Load foo.so syntax. commit af211a9bc1bcab0aa631558e5d6ce013095f9802 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 19 22:30:09 2005 +0000 Fix PCI bus scan on ia64 E8870 chipsets. commit 5744308e2957781449bfe6fee9b465617a88384d Author: Kevin E Martin <kem@kem.org> Date: Tue Oct 18 22:06:54 2005 +0000 Update package version number for RC1 release. Update release string to 6.99.99.901 (i.e., 7.0 RC1). commit 2769c3e72c470b472dae013e256a7ee73c3e53f2 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Oct 18 19:43:48 2005 +0000 Fix distcheck by forcing Xorg to be installed before chmod/chown. commit dd0d010e9c34278f968be486a6c5c91e021b6609 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Oct 18 19:14:08 2005 +0000 Fix parallel builds my ensuring libdmxconfig builds first. commit 79e6ac79f983b6cbd88a868dfd2235d9cbe75e8b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 18 07:18:21 2005 +0000 Don't use $< in explicit rules since neither BSD nor Solaris make allow that. commit fb282ef43a1936dcdefa57f16a8363b2adaf983b Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 18 04:03:01 2005 +0000 Add miext/damage so misym.c can export DamageDamageRegion. commit 959db6028d232dc76396cb658aa48d3b4e605aed Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 18 04:02:31 2005 +0000 Export DamageDamageRegion. Not bumping the ABI version since we did that already for this release. commit b61c828b0455ec1d4a7ffb54b5ac9b65764a458b Author: Kevin E Martin <kem@kem.org> Date: Tue Oct 18 02:23:58 2005 +0000 DRM 20051017 import commit d6a40bcd4a745b5d6d1070deb696b21d128ca0fe Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 18 00:32:55 2005 +0000 Change default install dir for app-default files from $(sysconfdir)/X11/app-defaults to $(libdir)/X11/app-defaults to match the monolith & allow localization commit e7007f7d51c9e1d39118865fefb1716c579a70bd Author: Adam Jackson <ajax@nwnk.net> Date: Mon Oct 17 22:42:03 2005 +0000 More automake 1.7 braindamage: use mkdir -p, not . commit 151ba8b67fd88a721f9f72d3019212b22f5cd3e2 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Oct 17 22:25:58 2005 +0000 Work around automake-1.7 braindamage by providing an explicit rule for XOrgCfg. commit eec3df1503e561aff6656e15c73b25a0bba1b06b Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Oct 17 17:11:12 2005 +0000 Fix whitespace in AS_HELP_STRING uses, convert all help strings to use AS_HELP_STRING. commit 1859c62607d567aa05334df1662f7249c983f793 Author: Kevin E Martin <kem@kem.org> Date: Mon Oct 17 07:18:59 2005 +0000 include/dix-config.h.in Add support for more extensions Add missing files to EXTRA_DIST commit ccfe9e7e9b49cbbf7c50fbf1a5c33178f27f79eb Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Oct 16 21:57:34 2005 +0000 Link Xprint config directories in $(C_LOCALE) list to C locale dir, not en_US commit a7d6a4fb321415b8aaad72760ff8a1ca3fd077f9 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Sun Oct 16 03:02:53 2005 +0000 Change '==' to portable '='. commit c2e461c7e970830ea430de3e5f352d144e9f0239 Author: Kevin E Martin <kem@kem.org> Date: Sat Oct 15 20:44:44 2005 +0000 Fix typo and add new Makefiles to AC_OUTPUT Fix typos Add xorg.conf.man to CLEANFILES Add missing files to EXTRA_DIST commit 34b7b57b3c80507f63a542c6adb4b5c8ed80b642 Author: Kristian Høgsberg <krh@redhat.com> Date: Sat Oct 15 19:34:28 2005 +0000 Doh, remember to add this file. commit 744aa34ca5228ea176cc56a7bdd48bbf5f29b0b5 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Oct 15 02:19:09 2005 +0000 Add an additional meaning to the "dirty" flag. Now, if !dirty && !area, the pixmaps's contents are undefined, so we won't need to upload the undefined contents in MoveIn. Use the ExaCheck* for async ops as well, so that dirty is always tracked. While the performance impact for my ls -lR test was not significant (though the avoiding-upload path was being hit), it's likely to be important for the upcoming Get/PutImage acceleration from ajax. commit 21e7339c1eead1148eea462bc99cf8faf02c8d39 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 14 22:44:56 2005 +0000 Hook up lbx. commit d62943c040fd3d45079c9918c57f74f993b585d4 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Oct 14 22:19:51 2005 +0000 Set default font path to match the default in the monolith so fonts are actually found. commit 0ee70f53ef9b05052ee079560df107d05a9c5407 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Oct 14 22:01:46 2005 +0000 Install Xorg & xorg.conf man pages even when not building docs commit 0676a2874a62a3661a718cdf21e75ffc77197ad9 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 14 20:01:36 2005 +0000 Add sysv and sco os-support subdirs and add simple EXTRA_DIST Makefile.am in those dirs. Remove unsupported os-support subdirs (bsdi, dgux, hurd, nto, os2, pmax, qnx4) that have no maintainer and we don't dist. Add Options. commit 57abb5b171b2fe88252aeb788463e533106d66b9 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 14 08:29:16 2005 +0000 remove reference to non-existent agpgart.h commit 7e3e9ed97ba25bb84286f97fe6882a37c9aa7e25 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Fri Oct 14 06:10:06 2005 +0000 Add XTRAP_LIB to XPRINT_EXTENSIONS to fix xprint build when xtrap is enabled. commit 821584fcd3bf83f3aaacd35e54323f71d976db44 Author: Donnie Berkholz <spyderous@gentoo.org> Date: Fri Oct 14 05:36:39 2005 +0000 Require glproto >= 1.4.1 if building DRI with GLX. This fixes a build failure on a number of hyperpipe functions. commit 8df7628a2ad93edf8271f13e0b43c0fa8f766668 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Oct 14 00:41:51 2005 +0000 Remove reference to XF86config-4. Add xorgcfg(1) to See Also list. commit b54c8154ca19edce00b9c6379d5daf94268bade1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Oct 14 00:34:49 2005 +0000 Set substitutions needed in xorgconfig man page. commit 1df705e465a103c94ffbb9fe97bdbe6b0aefc746 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 13 20:30:38 2005 +0000 AC_SUBST VENDOR_STRING & VENDOR_RELEASE for xorgcfg's app-defaults file commit b349b20d783252d5126451142419aae554f9b776 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 13 18:08:24 2005 +0000 Dist NOTES. Dist helper shell scripts. Dist XAA.HOWTO and a few more unused C files. Dist xorgconf.cpp. Fix DIST_EXTRA typo. Clean yacc and lex generated files only during make maintainer-clean as we don't expect users to have those tools installed. commit 35a767590e481b15ae66dccc2dd91098992b2751 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Thu Oct 13 01:13:58 2005 +0000 Fix stupid mistake in yesterday's allocator commit, would cause exa to consider a random available memory size commit a16dabd05ee7ec97877f07bd40ed83c01e72fc22 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Oct 12 11:15:44 2005 +0000 Remove an RM line that appears unnecessary and was breaking the build at xf86DefModeSet.c with FreeBSD make, where RM was undefined. While here, make the build of xf86DefModeSet.c depend on its sources, so it'll rebuild properly, and make it a normal CLEANFILE rather than a DISTCLEANFILE, since the intention seems to be to build it at the user's build time. commit b819c8378fbf29f185332e8435a80eb35991cd1f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Oct 12 08:22:31 2005 +0000 remove unneeded line of code commit e573b272bf2b06fb62d0306ddc966f3230ead967 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Wed Oct 12 07:46:36 2005 +0000 Use proper access size when reading pixel based on bpp of the source pixmap commit 55efb41f6cc064763cbfd3ee2a1239dc46cb109a Author: Eric Anholt <anholt@freebsd.org> Date: Wed Oct 12 07:35:20 2005 +0000 If a window background is a 1x1 pixmap, read the value out and go to exaFillRegionSolid rather than sending piles and piles of Copies to the hardware. commit fce11fdf03acc1f3f1dafb79fc8fff0251cf5473 Author: Kevin E Martin <kem@kem.org> Date: Wed Oct 12 02:11:06 2005 +0000 Fix typo (DIST_EXTRA -> EXTRA_DIST) commit 12994b9afbc18bfb7209f677abf673415c9ddf15 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Tue Oct 11 23:11:37 2005 +0000 Fix a couple of bugs in the offscreen allocator. One mostly harmless was causing our search loop for evictable blocks to possibly skip a good candiate, and another was the allocator would occasionally use area->offset as if it was the base of the pixmap, while for a pixmap that is not in available state, it is not. This caused some funny miscalculation leading to overlapping pixmaps and accesses beyond the end of the framebuffer. To make things cleared, I renamed save_offset to base_offset, made sure it's the one used everywhere in the allocator, and only align "offset" for the client at the end of exaOffscreenAlloc(). commit 8444a1f3918b0433f89cae31673ab63628b4543d Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Oct 11 21:01:04 2005 +0000 missed commit commit 3b683b63eed603ae58a8cddab48eb81f7ba0dbdf Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 11 20:12:24 2005 +0000 missed ChangeLog entry for previous commit commit b4450f3242ab408e80bc3d6d5d1cf6765f3e5339 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Tue Oct 11 19:03:02 2005 +0000 Add DGAReInitModes, Part 2 commit d91d18e1d6d663244288748ab86a35a6c151a535 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Tue Oct 11 19:02:18 2005 +0000 Add DGAReInitModes in order to allow the driver to change the list of supported DGA modes. (Part 1) commit c1a2abadfbb862cbaac3e23d0c1317ce5473ebdd Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Oct 11 14:50:47 2005 +0000 fix a typo commit 697f64a22ac5a7742a0022605a1074351296d4f8 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Oct 11 14:50:03 2005 +0000 check randrp has been initialized commit 2828d92c6ca400b603b6a20a221d9c858732292f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Oct 11 14:45:01 2005 +0000 programs/Xserver/hw/xfree86/common/xf86RandR.c programs/Xserver/hw/xfree86/loader/xf86sym.c Add a new function xf86GetRotation to allow third party modules to obtain the current rotation. commit cad18ec979e38ef80a606f0e4abf2142b9d0d2b1 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Oct 10 10:07:47 2005 +0000 don't move x or y depending on the screen size change commit 7f72f94aa4f0655b8aab6c67eef2a5f5ac4b418f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Oct 10 09:31:49 2005 +0000 rework that again commit 7c1d9a31a36552467d194e7d009c17dc526256c2 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Oct 10 09:24:28 2005 +0000 a furthur tweak to the randr cursor position fix commit 13f958fbe8420e406f24c01d320f29002ee860b7 Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Mon Oct 10 05:58:41 2005 +0000 Add missing {Prepare,Finish}Access() wrappers for the tile pixmap in the fallback case commit d82aeb55ca3b6abe4cafa7b9c39777a5f67308e5 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Oct 9 23:47:52 2005 +0000 Bug #3254 <https://bugs.freedesktop.org/show_bug.cgi?id=3254> Make sure screensaver & DPMS timeouts don't overflow when multiplied by MILLI_PER_MIN. (Reported by Zachary J. Slater) commit 29b5f846d261976f466d2c7181d6a75de670066b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Oct 9 17:47:34 2005 +0000 Bug #4715 <https://bugs.freedesktop.org/show_bug.cgi?id=4715> Add SecurityPolicy to EXTRA_DIST (Bill Crawford) commit 046234b3ebdfe221de9e87d70d287f69a6f59d6e Author: Eric Anholt <anholt@freebsd.org> Date: Sun Oct 9 02:03:22 2005 +0000 Don't try the accelerated glyphs path for component-alpha text (which I don't expect drivers to be able to accelerate without exa assistance). Instead, drop back to plain old miGlyphs for a 62.5% +/- 1.5% reduction in runtime of my ls -lR test (n=5) with component alpha. While a reasonable approach would seem to be making a better test to see whether the entire path would be accelerated and force migration appropriately, my attempt at this made the situation much worse. commit 526d1502df8db6799c9d1155b86ce79cef90872b Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 7 21:29:39 2005 +0000 another update to the RandR fix (thanks Aaron) commit 5a71a5667eb5b01e0f65f9310f4af1f6c5711ab7 Author: Kristian Høgsberg <krh@redhat.com> Date: Fri Oct 7 19:01:10 2005 +0000 Add Xprint init scrips to EXTRA_DIST. commit 470213753b158225b44a39a872599344acbc7101 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 7 18:15:08 2005 +0000 update the last RandR fix commit 348242f35aeb2869ef390241035b5f3266fc0288 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri Oct 7 15:39:52 2005 +0000 programs/Xserver/hw/xfree86/common/xf86RandR.c Use PointerMoved instead of SetCursorPosition, as PointerMoved will call AdjustFrame to reposition the window if necessary and avoid the cursor ending up offscreen. commit 578e18d11b3d61449c1dd7eba04e1748f19c68f3 Author: Kevin E Martin <kem@kem.org> Date: Fri Oct 7 14:27:47 2005 +0000 Add darwin to dist Include missing docs in EXTRA_DIST Include headers and other files in dist commit 148df64a05d69adaac4b0f3684b846eb1da60219 Author: Kevin E Martin <kem@kem.org> Date: Fri Oct 7 04:11:02 2005 +0000 Add README.compiled to dist tarball commit ff258ac2783203ed2a7698894d951391d1aecebc Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Thu Oct 6 23:45:29 2005 +0000 Clients tend to set picture->repeat when not necessary. Most HW cannot accelerate repeat NPOT thus triggering software fallback (this is the case with gnome desktop for example). This adds a simple optimisation to exa that removes "repeat" when it's obviously useless, that is, the single picture instance covers the entire rectangle beeing used commit e4ed43c3a6c248ba2b82b8bbf29da537a68407e6 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Oct 6 22:25:35 2005 +0000 symlink.sh: New files linked: xorgconf.cpp Options usb.3 usb_hid_usages lynx_ppc.S BUSmemcpy.S IODelay.S PortIO.S SlowBcopy.S sun_inout.s xaaTEGlyphBlt.S xkbcomp/compiled/README New files excluded: All of lib/GL/apple xlibi18n/*/*.mapfile xxserver/xorg/configure.ac, xkb/Makefile.am: Install README.compiled in the xkb output dir commit 1614a31a9dad9482ae4526c194c2bae1c4993f8f Author: Eric Anholt <anholt@freebsd.org> Date: Thu Oct 6 21:55:41 2005 +0000 Bug #4699: Correct some memory leaks in EXA and damage related to region handling. commit cd9ff6aec81e04bbfe14364407ccb28df05fc063 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 6 20:16:13 2005 +0000 cpp processing for Xvfb man page commit 370b8c8f1cb1a3531d52ea3b430852a0d76b2a4c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 6 20:14:43 2005 +0000 App-defaults file not supposed to have .ad suffix when installed Fix cpp rules to set needed flags for app-defaults file commit 2770233069d3845c681bea8eccff22e92254487e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 6 19:59:26 2005 +0000 Don't build "ev" example on systems without <linux/input.h> commit 460145a5d52b5325fa5e920cee3699fcf7dd9afe Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Oct 6 19:37:39 2005 +0000 Add cpconfig.c to EXTRA_DIST. Add CURSOR.NOTES to EXTRA_DIST. Add extrapci.ids to EXTRA_DIST and fix xf86PciIds.h rule. commit e63f76caa1b1342422567fdcb9f8af24792c8ca1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Oct 6 17:55:54 2005 +0000 Sun bug #6326551: xkbSetDetectableAutoRepeat broken when using XEvIE <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6326551> (Derek Wang, Sun Microsystems) commit 5f30a7b10286b4f55821acd4eb5580a8f5a3c56a Author: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: Thu Oct 6 08:08:04 2005 +0000 Bug #4689: Treat DirectColor as TrueColor in Render. It fixes some crashes with xcompmgr when using apps that use a DirectColor visual for their windows commit 9000c0321baf1e25e1796e6a333aad0e5a22cbe2 Author: Kevin E Martin <kem@kem.org> Date: Thu Oct 6 04:05:30 2005 +0000 Install correct man page and add to dist commit 9b894df44b575f768a2400d044d8c1eb6ef2ec97 Author: Kevin E Martin <kem@kem.org> Date: Thu Oct 6 02:40:41 2005 +0000 Include dmx-config.h for modular build Use <X11/extensions/dmxext.h> intead of "dmxext.h" commit 30c1369bf5816ffd7bd52d9a9dbcb72500684e2f Author: Kevin E Martin <kem@kem.org> Date: Thu Oct 6 02:35:22 2005 +0000 Add support for building DMX config and examples programs Add missing files to EXTRA_DIST Install Xdmx man page commit 1f9b6dc1ccd999c90ba825cf5fbdfa29770224a6 Author: Kevin E Martin <kem@kem.org> Date: Thu Oct 6 00:34:29 2005 +0000 Clean up generated files to pass distcheck Clean up generated files to pass distcheck Distribute getconfig.man.pre, not getconfig.man commit 61cd478b545de0313271cf6852e2df770e8f5914 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 5 22:39:41 2005 +0000 Bug #3652: Server-side GLX support for GLX_SGIX_swap_barrier and GLX_SGIX_hyperpipe extensions. (Eric Kunze, SGI) commit e891d9c078bd31447ae3e1fc7f8c15953b0bb916 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 22:19:09 2005 +0000 Update to 2005-10-05 snapshot from pciids.sf.net (includes a couple new Radeon id's). commit dc6ac8e46f80157960a24a1be1fb83f22dff45a0 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Oct 5 21:38:40 2005 +0000 Add DGA configure option and add various files that we should be dist'ing. Simplify xf86DefModeSet.c rule a bit. commit 8391eaa4aa1ae3744ad8c45f5d148ba362d2c9dd Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 5 21:13:49 2005 +0000 Preprocess and install XOrgCfg.ad as in the monolith. commit a9df169f108b15d312421e498675cd2e48206660 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 17:27:58 2005 +0000 Add missing $(DESTDIR) to custom install target commit a6cbe0776fcc8fb19a2bf2ecef41559eed6e5cef Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 16:39:09 2005 +0000 Fix the rest of the XFree86 DDX options that require an argument to say so instead of reporting "unrecognized option" when the argument is missing. Also give correct error instead of "unrecognized option" for options only available to root. commit 8c524f9966d2a167ea71dd81e235140e0db31471 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 15:33:40 2005 +0000 Xdmx & Xprint also need xau & xdmcp module dependencies commit 9f3ad65251832631630f7e587b409b750a144bd3 Author: Luc Verhaegen <libv@skynet.be> Date: Wed Oct 5 07:27:52 2005 +0000 Fix lnx_pci.c's xf86GetOSOffsetFromPCI return value. Clears up the resource ranges awkwardness and the "INVALID MEM ALLOCATION" warning. commit da989e988cc96c0ec4f07fceb4c36b30c2e37f4a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 02:18:10 2005 +0000 Xnest depends on xdmcp & xau modules too commit 9e8b5f3d478ca18a9ff9c26745de77c91a5d36d9 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Oct 5 01:38:50 2005 +0000 Make Xorg -config stop lying to people and claiming it doesn't exist when you fail to specify a file name. Also, include it in the list of available options for non-root users when listing all available flags. commit 34a8411ede185553f1387ee0bf534cf77b0fc004 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Oct 5 00:55:08 2005 +0000 Bug #4038: Unbreak the SYSVIPC check for cross builds. (Detlef Vollman) commit f47f00ab747563678c8625de5e5b2a588660064e Author: Eric Anholt <anholt@freebsd.org> Date: Tue Oct 4 11:24:09 2005 +0000 Mark the temporary pixmap dirty if UploadToScreen succeeds. Failure to do so resulted in a solid black glyph if the font rendering actually resulted in a fallback (subpixel AA, for example) and the temporary got migrated after 10 or so glyphs. commit 89a1a91b88b94b341075bc208941337ce11465b7 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 4 07:42:21 2005 +0000 Add miext/cw to the module loader include path so that misym.c can export miDisableCompositeWrapper. commit 43625a47063c246e7bf9d687caded0b7e2ea0dc6 Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 4 07:31:53 2005 +0000 Bump the video driver module ABI minor version to 8 so modules statically linked against miDisableCompositeWrapper won't load on older servers. #include "cw.h" instead of #include "cw/cw.h" commit ca57db6fc1e6100c47ad935d626fdd490ed6116e Author: Aaron Plattner <aplattner@nvidia.com> Date: Tue Oct 4 04:30:33 2005 +0000 Export miDisableCompositeWrapper. commit b2e451b93c20efc49a6cc565239432b2c705fe37 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Oct 4 03:44:14 2005 +0000 Correct the test for whether projective transform is necessary. Also, use "affine" to describe the variable (universally) on suggestion from vektor. Corrects a rendercheck failure. commit cdded97a0ad717f4f9120b37d2687fa661696c9b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 4 00:45:42 2005 +0000 Add #include <xorg-config.h> for modular build commit 4ae4fc7d51aeb0f27bed52f7e6a346745f3ea453 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 4 00:43:16 2005 +0000 Add gtf to xserver/xorg/hw/xfree86/utils commit d51962378ef6371456e034d6d7f6780e05bc1207 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Oct 3 19:31:50 2005 +0000 Bug #3781: Only use fbCopyAreammx when alu == GXcopy. Originally Gentoo bug #96053, patch by bartron@gmx.net. commit 6d4b350dee9495e54e6e5492815885f1d8455ac9 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Oct 3 16:46:14 2005 +0000 Bug #3815 <https://bugs.freedesktop.org/show_bug.cgi?id=3815> Patch #3463 <https://bugs.freedesktop.org/attachment.cgi?id=3463> GNU/kFreeBSD Xserver support (Robert Millan) commit 22b4200b01310e7b4743ef0b3541c3053a2d8279 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Oct 3 15:41:10 2005 +0000 Whoops, need to be in DIST_SUBDIRS too. commit 14a2bd33307fd937804a9fbb03787ec30858a05c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Oct 3 15:37:57 2005 +0000 Add missing ] (Dawid Gajownik) Add getconfig (Dawid Gajownik) commit 84141fc299b03b5552be093f9b698a85bc670d65 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Oct 3 11:43:55 2005 +0000 Merge r1.36 of fbcompose.c from xserver CVS: Special case projective transforms so we can avoid doing the expensive 64-bit math. Unroll the bilinear interpolation loops for an extra boost. I tested this with the up/downscaling cairo-benchmarks with Xvfb and saw a 12% +/- 4% decrease in time taken to run them. commit c024262eae4e00567ccb66a59b4d572621233cbc Author: Eric Anholt <anholt@freebsd.org> Date: Mon Oct 3 10:20:29 2005 +0000 Merge r1.2 of fbedge.c from xserver CVS: Optimize spans where the same value is being added to multiple pixels. This improves the speed of rendering wide trapezoids. I tested this with a small set of xlibs cairo-benchmarks with Xvfb and saw a 4% decrease in time taken to run them. commit a7e3c6fa8ceb6a3a423377aa32ab0da5a6ab9286 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Oct 3 06:31:48 2005 +0000 Real configure check for execinfo.h (Yuri Vasilevski) commit e3d2a7d57bc57453d66aa63ca7fe4d910b64737c Author: Adam Jackson <ajax@nwnk.net> Date: Mon Oct 3 06:29:14 2005 +0000 Bug #4393: uClibc lies and defines __GLIBC__ even though it's not source compatible with glibc, so the backtrace support check fails. Work around this by wrapping the code in a configure check for execinfo.h, and emulate detection for the monolith. (Yuri Vasilevski) commit 5037d3441d65f1fb6493c3b55137ef1b5eddd6b0 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Oct 2 22:17:38 2005 +0000 Bug #1465 <https://bugs.freedesktop.org/show_bug.cgi?id=1465> /etc/init.d/Xprint should use PROJECTROOT from build (Grzegorz D?browski) commit b05e78dd40e1fe915096362f32c3af8aee0ed36a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Oct 2 19:30:57 2005 +0000 Fix typo in MAN_SRCS (Dawid Gajownik) commit 8814896da83b19be01beedd0b2b3380298778328 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Oct 2 08:53:18 2005 +0000 Fix include path for commit of bug #4616. commit ecaa46380ed0a920186407b9294c5c60f75f1a13 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Oct 2 08:28:27 2005 +0000 Bugzilla #4616: - Merge various fb/ bits of COMPOSITE support from xserver, which weren't necessary before due to cw hiding the issues. Fixes offset calculations for a number of operations, and may pull some fixes that cairo has wanted for XAA as well. - Add a new call, miDisableCompositeWrapper(), which a DDX can call to keep cw from getting initialized from the damage code. While it would be cleaner to have each DDX initialize it if it needs it, we don't have control over all of them (e.g. nvidia). - Use the miDisableCompositeWrapper() to keep cw from getting set up for screens using EXA, because EXA is already aware of composite. Avoiding cw improved performance 0-35% on operations tested by ajax in x11perf. commit 2c82429f8957ed0268c0e4e4fe5aed9093f33960 Author: Ian Romanick <idr@us.ibm.com> Date: Sat Oct 1 22:25:13 2005 +0000 Refactors __glXImageSize and __glXImage3DSize into a single function. It replaces all calls to the old functions with calls to __glXImageSize with the new parameter list. I have also added 'target' as a parameter. This is a stepping stone to the code in patch #2410. Basically, if the texture target is one of GL_PROXY_*, the image size is always zero. This gathers all the checks for that into a single place. I have *not* modified the existing callers to take this into account. They still do their own checks for GL_PROXY_*. However, when the generated versions of those functions are added to the tree, they *will* rely on that. The code growth is mainly due to the new 40 line comment before __glXImageSize. I have tested this with a few of the texture using demos and tests from Mesa, including tunnel, texdown, and drawpix. Reviewed by: Adam Jackson, Eric Anholt, and Brian Paul. commit e27b3e4ea1ddf9b2e9c2d63a0e60400b523a8a94 Author: Ian Romanick <idr@us.ibm.com> Date: Sat Oct 1 22:19:04 2005 +0000 Remove some more incorrect prototypes for the __gl*_size functions. commit e270e6394b623b48d416feeef0c3856f2e303c8d Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Oct 1 17:53:38 2005 +0000 Bug #3822: out of bound reads in fbbltone and fbblt (Mark Kettenis, Thierry Deval). commit 54b2a14f0fa4397f3e9ae75dd63d5cacfdd778eb Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Oct 1 17:30:58 2005 +0000 Bug #3411: fix handling of keyboard Autorepeat rate in xorg.conf. commit a07dd03748c8fa2633e294ee4d9ab38265970e5e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Oct 1 07:17:55 2005 +0000 Add hw/xfree86/getconfig commit abc6aa50fb52fa4fa9b9436dbc3a70f86e62dc27 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Oct 1 06:27:12 2005 +0000 Oops - fix build/install of fbdevhw.man commit 13e0db19d8c0b1df636f218bcbfbb2c54fa7576f Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Oct 1 06:19:02 2005 +0000 Adding more doc files & fbdevhw man page commit b5ce065a5e91e2ad3213ea8c711cfe7ed9060c16 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Fri Sep 30 08:54:44 2005 +0000 RandR: Fix failure handling (Closes #4635; Thomas Winischhofer) commit 4608a2b654be84b2e345bcada63422d18c74a06e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Sep 30 02:37:57 2005 +0000 Man page processing/installation and other doc file updates commit aa74468aa59b95424cd0000179b8985b267d639b Author: Adam Jackson <ajax@nwnk.net> Date: Fri Sep 30 02:03:45 2005 +0000 sparse cleanups. s/0/NULL/ and mark a few things static. commit c65fde5343719d3e9ebc76cc371c6f5f7948de8c Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Sep 28 20:38:42 2005 +0000 Make the server distcheck: - Fix up the XpConfig directory to remove the stuff it installs - Add a few files to CLEANFILES here and there commit 58abce3f90504dd48838a2f7ae7bb5db6a6cff70 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Sep 28 20:01:37 2005 +0000 - Use the dirty flag (which should be set correctly all the time, particularly thanks to Prepare/FinishAccess) to avoid DFS/memcpy on pixmap move-out if it's unnecessary. This was disabled in KAA because cache misuse on ATI made me guess that this code was wrong. - Unwrap Glyphs on closescreen. commit f53404bdbba23fd46420564565ab815f7c20b101 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Sep 28 16:55:25 2005 +0000 Add kbd_mode build system commit 940158a6f2e98069a47293d713df674e16ad8a11 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Sep 28 03:37:22 2005 +0000 Replace all uses of __glEvalComputeK (and the doubly redundant EvalComputeK) with calls to one of __glMap[12][df]_size. This was tested with progs/samples/eval (from Mesa). commit 806d74bc0640f4f3dcc034b36a36aea289b01685 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Sep 28 01:57:47 2005 +0000 Add __SVR4 #ifdefs to work in non-Imake builds. commit 88957862b812b3e1e19d5e11365a22dc249cf4d2 Author: Kevin E Martin <kem@kem.org> Date: Tue Sep 27 23:28:46 2005 +0000 Fix distcheck build and install errors. commit 003655c02ad3a031031bb4ac859966a513f63e10 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Sep 27 18:36:14 2005 +0000 Make XpConfig build system call mkfont{scale,dir} commit 156b2cf3f76ae53cc37b6f5910b446c776ccc9ba Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Sep 27 17:49:35 2005 +0000 Add forgotten Makefile.am commit f3d0cb4a5722e0512bbdcd179215532795cba38f Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Sep 27 16:15:55 2005 +0000 Get XpConfig build system in pretty much working state commit 1c2e8b1ecc8b7b8c8562461eed7892ff22d17e71 Author: Kevin E Martin <kem@kem.org> Date: Tue Sep 27 15:11:56 2005 +0000 Fix make dist to include only sgml files. commit ca64aab609c3585234410cd8d908f8e1efe5c788 Author: Kevin E Martin <kem@kem.org> Date: Tue Sep 27 14:09:31 2005 +0000 Add build system for building docs and fix setuid issues. Add build system for sgml docs. commit 1a4e30d508e62ab304722c3525748ff0e3c2899d Author: Kevin E Martin <kem@kem.org> Date: Tue Sep 27 13:47:26 2005 +0000 Include xorg-config.h so the generated file will also include it. commit 30ff9e26196bdba8435e0dcdb96864e81c8cb136 Author: Ian Romanick <idr@us.ibm.com> Date: Tue Sep 27 00:04:40 2005 +0000 Fix some problems that caused incorrectly annotated prototypes for __gl*_size functions to be used. The result was that, on x86, the code would be compiled with FASTCALL semantics, but the callers would not. This should fix GLX protocol errors that people are seeing. There doesn't appear to be a bugzilla associated with this problem. commit 6c5c54b9a2872f1bb7de36a8d2d4efcef70b14c6 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Sep 26 23:07:44 2005 +0000 Various small fixups to get XpConfig to 'build' commit 604f7c64efb57a48ec667c2ed62d3b4bad0c302b Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Sep 26 22:45:43 2005 +0000 Check in skeleton Makefile.am's for the rest of XpConfig commit 8907195d784ff2c72a00b64edab6a8ac3b31dec5 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Sep 26 20:58:26 2005 +0000 Take care of more files from monolith's Xserver/hw/xfree86/etc dir: hw/xfree86/utils/ioport/Makefile.am Add ioport and pcitweak utils from monolith hw/xfree86/etc dir. Generate xf86DefModeSet.c from vesamodes & extramodes Add apSolaris.shar to EXTRA_DIST commit 9abccb5e65628c938c6f01b685ab8fbffae7bc3b Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Sep 26 19:33:06 2005 +0000 Add initial build system for XpConfig commit 0531c4be2f1a30082cfec5e411ab34d17978d66e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Sep 26 02:41:38 2005 +0000 alanc@alf:/export/alanc/X.org/head/cvs-rw/xc [7:40pm - 628] head -14 ChangeLog include xorg-config.h for modular build Adjust XF86CONFIG defines for modular build Fixes for modular build: - include modular server config headers - change default XCONFIGFILE to xorg.conf - define XKB_RULES_DIR if not defined by Imake commit 256fa24945bcaa6e5a68a48c1b757f8084e88a38 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Sep 25 17:48:09 2005 +0000 Add SecurityPolicy file for XCSECURITY extension. Add README to EXTRA_DIST commit 54639964cc344f1086196729fde37515f11e7972 Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> Date: Sat Sep 24 21:56:00 2005 +0000 Changed the license to a X/MIT one commit 3192f400c72b3b606fcc1798d577737502897b43 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Sep 24 18:45:45 2005 +0000 Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen stubs from drivers, comment the non-empty ones. commit a5477ae7ac9a56c1a586950db1dee6661bff149d Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Sep 24 02:40:51 2005 +0000 Add scanpci, xorgcfg, & xorgconfig utilities. commit 2ba865b3f57340fd1d75f7614c17f615cc127b89 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Sep 23 23:04:04 2005 +0000 Fri Sep 23 19:00:06 2005 Søren Sandmann <sandmann@redhat.com> Apply patch from Ronald Wahl to make sure that the stack pointer is not modified at points where we access external variables. (Bug 4269). commit 7554e1bf29e5aef8e76f88bac2994ea45a924f2b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Sep 23 00:27:07 2005 +0000 Sun bug #6321613 <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6321613> xorgcfg dumps core when it reads a configuration file that has a Monitor Section, but does not have a "VendorName" entry inside it. (Henry Zhao, Sun Microsystems) commit 99793543c0fcfd4d699549fcc2bf0ed12aed6a19 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Sep 22 12:40:41 2005 +0000 put back some agp related allocation messages commit 02566dff4abbda6888f719727c169b966617a83d Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu Sep 22 12:33:36 2005 +0000 fix typo commit 56e7766c775385b0c6e09e6a65a1c8e10dba786e Author: Eric Anholt <anholt@freebsd.org> Date: Wed Sep 21 22:26:07 2005 +0000 Bug #4541: Fix text drawing in the case where a list contains no non-zero-sized glyphs. Several variables weren't updated, resulting in rendering simply stopping when this case was hit. (Anders Kaseorg) commit 32497ff479d0c34c05eb5acfcd5f7e186bac3227 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Sep 21 18:14:32 2005 +0000 Accept --with-xkb-output argument to specify output dir for compiled xkb keymaps. Define XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. Add XKM_OUTPUT_DIR and XKB_BIN_DIRECTORY. Add XKB_CFLAGS. commit 361a9eb953aaa38f8ebc057185de29e50f9eef26 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Sep 21 10:27:53 2005 +0000 - Change migration-in rule slightly: previously, if your score was less than the max, it was bumped, and then if you were above the threshhold you got moved in. Instead, do the above-threshhold check separate from score starting out less than max. While this will likely make thrashing cases worse, I hope it will fix some issues with long term performance (think of an xcompmgr with a backbuffer it's doing only accelerated operations to. If some new pixmap comes in and bumps it out, even once, it will never get a chance to re-migrate because its score will be maxed). Change migration-out to be the same way for symmetry, though it shouldn't ever affect anything. - Fix a lot of debugging output, both in terms of printing quality, and completeness. The fallback debugging covers a lot more now, pointing out new areas for improvement. Debugging toggles are now centralized in exaPriv.h. commit 6a29c4cec156a135d1d9cdb65995f7a84de7cb56 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Sep 21 07:43:01 2005 +0000 Add support for hardware accelerating tiled background painting. One example of this is the root weave, which paints slightly slower on SiS now in my testing. However, according to keithp some apps use this feature for a sort of cheap backing store, which this could help with significantly. While I haven't done much performance testing with it, it will at least rule out one possible source of terrible performance. commit 1115ff4c008dea6d6cafcb39e4ce6d0b3ed4fcc0 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Sep 21 00:38:05 2005 +0000 Bug #4487: Add the bsd subdir to DIST_SUBDIRS. (Joshua Baergen) commit 00bd8968b264c1f69487dd99c212e0ce889b11db Author: Adam Jackson <ajax@nwnk.net> Date: Wed Sep 21 00:24:10 2005 +0000 Bug #4257: Move cfbcmap.c to cfb_common_sources. commit b7e723ed6f23cc8d85f1f1eced9d8ccbc2a6b38c Author: Adam Jackson <ajax@nwnk.net> Date: Tue Sep 20 23:32:21 2005 +0000 Missing backslash commit 15b2f94de5e2cc7e4df8d897d562dffeda31c82c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Sep 20 18:26:24 2005 +0000 Update CVS project tag & notice about pci.ids license in output .h. Update to match recent changes to pci.ids, extrapci.ids, & pciid2c.pl for people building on systems without perl. commit 7d0f47c43c5c177cae0f375ceaeef892e4c9663a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Sep 20 15:50:31 2005 +0000 Add --disable-install-setuid option so you can build as non-root and chown/chmod later. Also disable by default on platforms that don't need setuid root X servers (Darwin & SPARC's, according to InstallXserverSetUID settings in the old Imake config files). commit b623c60745ca486667657fa39ad517d1f7a72794 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Sep 19 22:44:49 2005 +0000 Linux/Alpha support (Stefaan De Roeck) commit bd906c6bb803b286c39eca80e437a21c14e808a3 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Sep 19 18:54:05 2005 +0000 Update to latest version from pciids.sf.net Sync with updates to pci.ids & PCI id list in nv driver commit 535cd292c809314efe4730a27b0271adfa842775 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Sep 19 18:38:26 2005 +0000 #include "xf86Axp.h" -> "shared/xf86Axp.h" for modular build. (Stefaan De Roeck) commit a1bcf25a1f819768672ac837cb0a3d0c66937656 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 18 02:32:23 2005 +0000 Break EXA ABI while we still can. Add coordinates to the UploadToScreen hook so we can upload a subset of a pixmap, and convert the current drivers to respect that. Use this support to directly UploadToScreen in exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches hot). I would have bumped major version, only I can't tell what the EXA_VERSION_* is supposed to be doing as opposed to the module version. commit 074913c8a9c1f66c8752387db2c81ad669e91878 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Sep 17 20:02:02 2005 +0000 - Don't try to upload 0 byte-per-pixel (PICT_a1) data using RADEONHostDataBlit. - Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It appears that we do need the cache flush here, thought it's not clear why. Disable the 2d to 2d shortcut while here, since I'm unsure of what we're doing. Exposed by the following bit: - Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs were being accumulated in from non-migratable scratch pixmaps, causing the destination pixmap to move towards screen but the migration necessary for source never to happen, leading to abysmal performance. Instead, copy the scratch glyph data into a real pixmap first, then composite from that into the destination, allowing for migration. time ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall time (n=3). - Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of windows needing backing store. Makes migration code prettier, and ensures that composited windows will be migrated as normal when we turn off cw for EXA. (issue brought up by keithp) commit be2bdab4339e493bb0ac3d0e36508b7aa1cd6e92 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Sep 15 06:46:05 2005 +0000 Bug #3990: Require glproto in the cases that it's necessary (DRI or DMX with GLX). (spyderous) commit ef7eef0f68af6bfbb4ee56115ac2f3c1b7425755 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Sep 15 05:55:21 2005 +0000 Bug #4046: Install the X.Org server setuid root. (David Schleef) commit 88d7eb1f7ed6afc85c07797838714f2601356018 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Sep 15 05:06:54 2005 +0000 Bug #3889: Create the log dir on install, and allow configuring specifically that directory. Failure to have the directory keeps the xorg server from starting. commit 25a0ecdc1868f4b53225b92e8ccd222814e2da2a Author: Eric Anholt <anholt@freebsd.org> Date: Thu Sep 15 04:07:19 2005 +0000 Don't put a version number on the module filename. commit 0888ad3874414e32535fecdb717ee7ab86f9d4cc Author: Eric Anholt <anholt@freebsd.org> Date: Wed Sep 14 07:49:22 2005 +0000 Build xf8_32bpp, which is wanted by the mga driver, and export elf.h, which is wanted by the rendition driver. commit dfb5da93bc16b2fd2b00e939dbe101a04bdeab4f Author: Eric Anholt <anholt@freebsd.org> Date: Tue Sep 13 20:59:05 2005 +0000 Turn on DRI by default on Linux, NetBSD, FreeBSD, and fix the build of the module for FreeBSD by setting some missing defines (XFree86Module, IN_MODULE) in the dri directory. Note that those missing defines should be somewhere generic, since there are other consumers of them, but I haven't figured out where. commit 12fbcfefe672ec226bdbc7597bf2fd2cb0ee1e19 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Sep 13 18:37:35 2005 +0000 Add some initial BSD support for the xorg server. Incomplete on NetBSD, OpenBSD, and non-i386/amd64 FreeBSD for sure. Plus I haven't actually run it yet. commit 51eb6c83a3b2721703ca50758853bbf9f99fc4d2 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Sep 13 15:28:29 2005 +0000 Tue Sep 13 11:27:05 2005 S%Gï¿¿%@ren Sandmann <sandmann@redhat.com> * programs/Xserver/miext/shadow/shadow.c (shadowDamageBox): Add missing REGION_UNINIT. commit 133edff1b499b2c794fcc9a1860c1b5526b58869 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Sep 13 05:44:47 2005 +0000 Don't define POSIX_SOURCE on any BSDs, since it breaks things. Define NO_SYS_HEADERS, as the monolithic build does. Helps FreeBSD. Don't include validate.c in the library, since it seems to be a userland test program. commit c3d6799cee7ff8411b3a05a7ab7e2a9e80c95059 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Sep 13 01:33:19 2005 +0000 Bug #594: CAN-2005-2495: Fix exploitable integer overflow in pixmap creation, where we could create a far smaller pixmap than we thought, allowing changes to arbitrary chunks of memory. (Søren Sandmann Pedersen) commit b290884719e18646326f0c2412c2494a07fe3cfd Author: Adam Jackson <ajax@nwnk.net> Date: Tue Sep 13 00:44:52 2005 +0000 Bug #3284: Make the DRI lock reference count per-screen. commit 846f797f37c1ae57a8dad981113b1139359d8c94 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 12 08:24:48 2005 +0000 Add missing fontsproto and fontenc to REQUIRED_MODULES. commit 5b218617fa8ba52bf65aef35da39e06c662495e6 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 12 07:53:16 2005 +0000 Add missing resourceproto to REQUIRED_MODULES. commit ade158d238475ce923fbc5c49275c78cf3864223 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 12 07:07:59 2005 +0000 Define WITH_VGAHW, since we always build it; add to Xorg headers. commit 34dc481a16c0c1cbd69a9ec7172331b59b85e9a7 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 12 07:02:46 2005 +0000 Put DMX AC_CONDITIONALS at the top level, since they must always be called. commit b0f6fe1f38b448b5f1a280e86b01353865866c70 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 11 21:38:41 2005 +0000 Add some optional (disabled) fallback debugging code to the async code, for better tracking of when we're hitting software. commit 1c003ccf5d68baaae6fafdc75eff964f2a62fc35 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 11 19:08:10 2005 +0000 Add a pair of hooks, PrepareAccess() and FinishAccess(), which get called around CPU access to the framebuffer. This allows the hardware to set up swappers to deal with endianness, or to tell EXA to move the pixmap out to framebuffer if insufficient swappers are available (note: must not fail on front buffer!). Submitted by: benh commit ca210830bd361e3d91b6bc741c495b61c424d1d2 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Sep 11 18:43:55 2005 +0000 Simplify life for EXA drivers by reducing some {Con,Dis}joint ops. commit 04f81cacb9fd0944879b2c23a99fa3a1ae979b12 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Sep 11 18:33:31 2005 +0000 OpenBSD also doesn't like defining POSIX_SOURCE: it limits available functionnality in headers beyond what's used by Xorg. commit 089b4272cf32fc9429c1a0e666c2ffb34fda0b93 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Sep 11 01:16:14 2005 +0000 use RGB_DB not RGB_PATH as that's what it's looking for define HAVE_XKB_CONFIG_H so setting xkb-path works (Jürg Billeter) commit 2f9d01c9681d80235a70263e2e087dc6c181cdc8 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Sep 8 01:15:47 2005 +0000 Remove some references to mfb/cfb support that is no longer there. commit b5d42012f9be87f3b45a089c596ce6dba8845794 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Sep 7 01:30:23 2005 +0000 Fix typo resulting in failure to swap between RGB/BGR properly. (Stephen P. Becker) commit c8de8c23fbccb3296747f429a02c0c0682b74bf5 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 5 07:43:51 2005 +0000 Fix tests for maximum number of colours when creating a colourmap, so a 32-bit visual (e.g. ARGB) doesn't overflow an int when attempting to do 1 << 32. (Benjamin Herrenschmidt) commit 5c5c51fa6da03f19831632a092761a1e4bcf653b Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Sep 5 07:40:50 2005 +0000 Initialise private arrays with calloc, rather than standard malloc. (Benjamin Herrenschmidt) commit 691669c0121494df90c8523f7d17e01ba0b14a57 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Sep 3 07:08:58 2005 +0000 xorg-server.h -> dix-config.h (thinko). commit 4b2f5ba1b5d59fd6bd7f82da5730f72e8df04858 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Sep 3 03:27:55 2005 +0000 Use macros from xtrans.m4, issue error if not found. commit 733a6d7a268945d149bcea159253408bedc69b12 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Sat Sep 3 02:21:36 2005 +0000 Add EXA driver writer documentation for the benefit of future generations of X hackers. commit 854010d71dc0f1e9b73cdc764c9d2cf36f1da625 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Sep 2 03:22:01 2005 +0000 Add -include dix-config.h to GL/mesa/X to catch _XSERVER64, et al. commit 287336f3c9e5023acbfba6508b05a68ccca9ddf0 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Sep 1 19:56:14 2005 +0000 Teach xkb how to optionally run xkbcomp from $bindir instead of $datadir/xkb. commit 94fbdb5c6d2cdc7b70ecdabe22a9de8b9aabeced Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Sep 1 14:56:35 2005 +0000 Make RGB_PATH configurable. Move I2C modules back to $(moduledir)/multimedia. commit a65c5796133d126b1810749b5206607e7c42d787 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Aug 31 14:58:09 2005 +0000 Include xkb-config.h if we have it so we pick up the paths defined there. commit 9d3b5e89d691b79ea3361e6dc82938c22d70d0e3 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 30 22:34:14 2005 +0000 Save keyboard LED state on startup and restore on exit so text console mode LEDs match text console mode state. Move push of streams module earlier so it's loaded before we start using kbd ioctls provided by the streams module. commit fa6fbd018da939fda7cc2b9a9aa2717b9675a178 Author: Kristian Høgsberg <krh@redhat.com> Date: Tue Aug 30 22:31:52 2005 +0000 Use the $(moduledir) makefile variable instead of @moduledir@ so it can be overridden at make install time. Remove driverdir and inputdir from pkg-config file. The directory layout of moduledir is fixed and well known by drivers. commit b4f4bf028a88ee709f4536373de2d40b6445006e Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Aug 30 19:51:59 2005 +0000 programs/Xserver/hw/xwin/winmultiwindowshape.c Fix off by one error (Colin Harrison) commit 0e50af8b7f459aafd1d1d52414629e926167a751 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 30 19:35:06 2005 +0000 typo fix commit 0c74799af4f924ba64ebd6052802b73547f55c72 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 30 04:41:04 2005 +0000 Remove existing broken maxX/maxY code for composite (results in infinite loops, doesn't deal with failure, doesn't present the interface to drivers that I expected) and instead replace it with a simple fallback to software when coordinate limits could be violated. Act similarly in other acceleration cases as well. The solution I want to see (and intend to do soon) is to (when necessary) create temporary pictures/pixmaps pointing towards the real ones' bits, with the offsets adjusted, then render from/to those using adjusted coordinates. commit f20e845b04dee5fc0780811f565180e322b60b73 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 30 03:42:07 2005 +0000 More 0 -> NULL for pointers missed in previous commit to this file. commit 7777d325a3d049cc233c004cba288ed5d10539c2 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 30 03:05:21 2005 +0000 Apply an xserver patch from cworth: Avoid buffer ovverrun when a trapezoid's right edge is on a pixel boundary. commit e321f9e7ff7de9aa702e33a22743b55c8bb66953 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 30 03:01:38 2005 +0000 Apply the xserver patch from vektor for bug #4208: Use NULL for pointers instead of 0. commit 20813d3af065f9b719b39d2e7a3382b8fa278a48 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Aug 28 19:47:39 2005 +0000 Bug #3974: Fix unaligned memory access on LP64. (Matthieu Herrb) commit 0926cf79c030f29dce32a9dc944734960ec93d19 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Aug 26 20:21:57 2005 +0000 Add diagnostic messages for exaDriverInit failure cases. commit 5ffff7cb868a768307ff6faf164210020e6b94a2 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Aug 26 20:08:09 2005 +0000 Bug #4160: Fix Altix kernel version check. commit 6b0cdc5dd9e451021c562ac4b6b2101d50187a30 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 16:46:41 2005 +0000 Change use of dix-config.h to xorg-config.h. commit 9d1b349b3765fb587b353c78cca9aa083f5d0eee Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 16:34:55 2005 +0000 Back out previous change until I figure out something smarter. commit 3075df24e7931901c6f0526e10a89631fd73c4d0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 07:35:55 2005 +0000 Subvert SIGUSR2 to reload all input devices. (Ubuntu #020) commit 89c84575ea905c7598d6b6029c9209abe1cfb074 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 07:24:21 2005 +0000 Undo rate/period change after function body, so the damage doesn't leak into other functions. (Debian #050) commit bb5e934df7f23fb365ed673a12d283ff52af79c0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 07:15:04 2005 +0000 Only open /proc/bus/pci/devices once. (Ubuntu #029) commit c937faadd0a0a5f2598b84286ac1ed8996a512e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 06:48:24 2005 +0000 Better error message on failure to set iopl. (Debian #021) commit 6d34a2ac8a33bd6c9083106b38fab6062e033e39 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 06:35:00 2005 +0000 Add Xv symbol from Xext. commit b8f0d4c3ebee363279f9dc7318de3e3c854ca5ef Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 06:29:15 2005 +0000 Spit out an error when there is no valid FB device, instead of just failing silently. (Debian #070) commit b48a24e7969d99a0116bc780c70d3e1c18b34769 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 06:23:41 2005 +0000 Don't assume that all sun4m CPUs support muldiv; the Cypress CPU, which implements the 4m MMU but only v7 instructions, does not. (Debian #100). commit fd158d3d5215b0a013f5305a76097b0b8fa14cf6 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 05:49:44 2005 +0000 Get prototype for ntohl from SuSv3-compliant location, fixing it for systems which define ntohl as a macro only, not both macro and function. (Debian #076) commit 53e489c0e39b89f41213a726fe1b611d7d9a18db Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 05:47:36 2005 +0000 Work around ATI expansion ROM problem on IA64 caused by prototype HP McKinley systems. (Bdale Garbee) commit 40374d1149d6dcf0b4521faae8bdfecc8a3af077 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 26 05:00:07 2005 +0000 Accept 'Enabled' and 'Disabled' for Extensions section (Ubuntu #990) commit ea80b5db257f4c22cf5a152084aef5fe05079db0 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 25 22:11:04 2005 +0000 Fix a use-after-free of cursor data by refcounting for the sprite.current reference. The particular path seen was XFixes' ReplaceCursor() resulting in the sprite.current being freed, but then it getting accessed during the ChangeToCursor() that happens as a result of WindowHasNewCursor(). commit 54cc45b09bc6c860b3de2012b57c4b35ca18ffd2 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Aug 25 21:22:41 2005 +0000 Thu Aug 25 17:15:01 2005 Søren Sandmann <sandmann@redhat.com> Add all the drivers to the module_LTLIBRARIES instead of having separate variables for them. Pointed out by Kristian Høgsberg. commit ff22adc09763b2bd860e7f780a5d0855cab0ab30 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Aug 25 14:19:43 2005 +0000 Remove sun_inout.s so make dist works (discussed with Alan Coopersmith). commit 344a24b6229f477c892dd855546391bc1e091bd7 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Aug 25 04:09:45 2005 +0000 Use system curses library on Solaris for xorgcfg text mode. commit 0711502f1847ed461672b9842218b9afa9d349ed Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 24 23:48:11 2005 +0000 Bugzilla #4226: Change the pixmap migration strategy for the CopyNtoN case. Now, if either source or dest were in framebuffer, try to get both there, but prefer system memory for both otherwise. Required making exaasync.c go through the try-acceleration path. This significantly improves window resizing under composite, because previously the pattern of creating a new pixmap and copying default contents from the screen caused a fallback every time due to the new destination pixmap being in system memory. commit 2261710fe0dffd60433e3362ac12adf4db570fe5 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 24 23:38:25 2005 +0000 Fix a bug where NULL could be dereferenced during the pixmap kick-out process by referencing the correct offscreen area. Also drive-by the comments related to these for clarity. commit 55c5c6953a3a661758a42b147f9542950a62fc4d Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 24 22:43:27 2005 +0000 Bugzilla #4090: Introduce getters for pixmap pitch and offset, to simplify/clarify it for driver writers who probably don't want to know what pPixmap->devPrivate.ptr or pPixmap->devKind mean. Converts the sis driver to use them, and bumps the EXA module minor version. commit 079ad773e09ed0c5baf01de3d4f02a5568da5634 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Aug 24 22:37:15 2005 +0000 Fill in xf86DeallocateGARTMemory stub based on lnx_agp.c version. Add include of xorg-config.h for modular builds commit 8fd250e5e4c2016614b82e2d653b7fbf8a3a5b99 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 24 21:51:28 2005 +0000 Bugzilla #4089: Fix crashes in !EXA_OFFSCREEN_PIXMAPS case by not trying to do migration when the EXA pixmap private is NULL. commit 79dc5f3d5fe5a66f5fa53af9afc30d27d1af0bce Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Aug 24 21:28:40 2005 +0000 Don't export non-standard symbols generated GCCs stack protection feature (__guard, __stack_smash_handler). commit d2952de6e3d9197529695bb88d8c3af679ad71af Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 24 19:41:43 2005 +0000 Wed Aug 24 15:39:07 2005 Søren Sandmann <sandmann@redhat.com> Add GLX_{INC,LIBS} for xprint. Add @DIX_FLAGS@ to AM_CFLAGS commit 81e708440ced309adc62ebf43d00becd32338db5 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 24 19:35:51 2005 +0000 Wed Aug 24 15:29:50 2005 Søren Sandmann <sandmann@redhat.com> Conditionally include dix-config.h Conditionally include dix-config.h commit 9657e0e9def47dba5b0bfa7461874362712a07bb Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Aug 24 15:18:06 2005 +0000 Don't try to build dmx/input/lnx-*.c if <linux/keyboard.h> isn't found Don't try to build dmx/input/usb-*.c if <linux/input.h> isn't found Replace -rdynamic with $(LD_EXPORT_SYMBOLS_FLAG) for compatibility with compilers other than gcc commit 825a95a1fab69f84c99ae132888fced22e28be33 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 24 11:18:35 2005 +0000 Remove use of dix-config and xorg-config.h from public headers. commit 1fb4a5a4ea993a7913a7bcc362315d31b2907836 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Aug 24 09:12:50 2005 +0000 Add xcmiscproto and bigreqsproto to REQUIRED_MODULES, since Xext uses them. commit b47535bd661743946851099f226f9e6aa4cc8c90 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Aug 24 08:49:31 2005 +0000 programs/Xserver/GL/windows/glwrap.c Wrap PointParameteriNV & PointParameterivNV for Windows builds. commit 9f498a37dd3d8456d2a97be9c039b63abc81a5fe Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 23 20:58:29 2005 +0000 Display more friendly mouse protocol names. Enable mouse wheel mapping by default. commit cff4b1c2166aa2e75618c8df09554a602c3a68c5 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 23 20:12:26 2005 +0000 Check for getconfig in GETCONFIG_DIR if it's not found in module dir. commit bfd13645867aab831b7a0f2b1757cb80837c07d9 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 23 09:20:49 2005 +0000 Add missing saver, evie, video, trap proto pkg-config checks. (Georgi Georgiev) commit 27afac2ce6a77bc68669c1af6a61c589aa9ef384 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 23 08:59:30 2005 +0000 Fix test for Xnest presence. (Donnie Berkholz) commit fed61462be281c568df6407f94ea519748f0b720 Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Aug 23 08:58:40 2005 +0000 Fix up warning on debugging. commit e848eb289c9251742a88e76017603952394f4262 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 23 01:14:35 2005 +0000 Rename app-defaults entries from xf86cfg to xorgcfg to match name passed to XtAppInitialize. (Henry Zhao, Sun Microsystems) Also, display vendor version instead of 4.0 for server version. commit 6076fca82528da8d50b0ed6be8da6f811321474d Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 23 00:32:27 2005 +0000 User message cleanups/updates for modern configurations. commit b07602014061cb41540f6a7e74e4132e67aa1117 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Aug 22 21:47:59 2005 +0000 If MAKE_XKM_OUTPUT_DIR is defined, call trans_mkdir to create directory if it doesn't already exist. (ported from Solaris Xsun bug #5039004) When BuildLikeSun is set, define MAKE_XKM_OUTPUT_DIR and set the xkb output directory to /var/run/xkb. commit 4a19a33db6d04b5835830a665daa679ee2fcafe7 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 22 21:29:18 2005 +0000 bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) attachment #2987 (https://bugs.freedesktop.org/attachment.cgi?id=2987) Use system method to access PCI config space for inb and inw in addition to inl (Olivier Baudron and Kevin Martin). commit 5557a40a022b0ede36edd3370a60f5fc3d147796 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 22 19:52:26 2005 +0000 Fix linking errors for xprint. commit 7693f668efd206a6c259166665bc36d3c6335e8d Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Aug 22 12:05:18 2005 +0000 programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c programs/Xserver/hw/xfree86/os-support/linux/lnx_apm.c programs/Xserver/hw/xfree86/os-support/linux/Imakefile Add basic ACPI Linux support so that events can be passed to the driver. (Alan Hourihane) commit 02c834f198eab4c4686d8156b88508fe102099c1 Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 22 09:15:31 2005 +0000 Include Xv and XvMC headers in the SDK. commit 3c4d605c7e8a9f6d296086a5b03b4f11b90590db Author: Daniel Stone <daniel@fooishbar.org> Date: Mon Aug 22 09:15:20 2005 +0000 Fix linkage for Xnest, Xvfb, Xdmx and Xorg DDXes; include all libs. commit 79be1f6d4d1ab48841d31d5553dd36b1b3632650 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 19:29:55 2005 +0000 Fix inclusion order of dix-config.h, so _XSERVER64 gets defined before X.h or Xdefs.h get included. (Jürg Billeter) commit 8d6e743bc4e6854ee0bb0fa4f197acd6d7683ccd Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 19:23:17 2005 +0000 Add _XSERVER64 definition to config headers. commit 588105173840355717d7b2f7f652289a41166c3f Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 19:15:11 2005 +0000 Huge cleanup. Group into sections: hardware feature detection, extension detection/configuration, DDX options. Make building of Xorg DDX fully optional. Clarify and correct some help texts. Change all comments to use dnl instead of #. Quote all tests correctly, and guard pure-variable tests with 'x' (e.g. test $DMX = yes -> test "x$DMX" = xyes). Since the DDXes seem to have pretty divergent extension support these days, get rid of EXTENSION_LIBS, DMX_EXTENSIONS and XPRINT_EXTENSIONS, and go back to building extension lists by hand in the DDX-specific sections. Use portable POSIX constructs everywhere (e.g. test foo && test bar, instead of test foo -a bar). Clean up old cruft. Set _XSERVER64 on 64-bit architectures, and use x86_64 for host_cpu instead of amd64 (Jürg Billeter). commit 367f45073953f8f99a2d9dd054f479e1070f856e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 08:43:46 2005 +0000 Change xorg_bus_sbus to xorg_bus_sparc; build sparcPci.c on all SPARCs. commit 71b3fea94e8845f35e47503636ca1fe78d2d48ca Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 08:24:52 2005 +0000 Typo fix (SOURCE -> SOURCES). commit db2909ce76b178663de301c09fb97f2936b1997e Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 21 06:56:19 2005 +0000 Add test for SPARC. Build SparcMulDiv.S on all SPARCs. Make the default font path configurable. commit d96e6666862553d59fc1f9fdd14fb65f36d589af Author: Adam Jackson <ajax@nwnk.net> Date: Sat Aug 20 18:52:07 2005 +0000 Add sparcPci.c to EXTRA_DIST. commit a402c876a465904ac71ebf39af67ea451b2457dc Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 20 18:11:17 2005 +0000 Make DRI/GLcore builds srcdir != builddir safe, and invoke symlink-mesa.sh in our builddir, not our srcdir. commit 238d45d2f148e1e0af4b1619cc1d5e8cc4bf9661 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 20 18:10:03 2005 +0000 Make Xprint build optional. commit abab3fd628c2d1096e8534192f33c1068a573c12 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 20 18:09:21 2005 +0000 Make Xext linkage srcdir != builddir safe. commit bb1d99ee72cc560e95010ea1008d5e796177ae62 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 20 18:07:59 2005 +0000 Build libxkbstubs.la to stub XKB DDX functions (e.g. VT switches), and build libxorggxkb.la from within the Xorg DDX to replace the previous xf86VT.o, et al, hacks. commit 8a32ed46480d78b69f289c90098f5ed4a830851f Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 19 15:48:18 2005 +0000 Really hopefully the last xorg-commit test. commit 2fd951434507d2a2c0266a052bdca6e223d31bfa Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 19 15:45:55 2005 +0000 Another test commit for xorg-commit. commit 39630b301f769118959b20d962404555714a5812 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 19 15:25:19 2005 +0000 Testing xorg-commit, nothing else. commit b13d3382de0027e897532926983b79caaa1eb655 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 19 15:21:54 2005 +0000 Fix dates on Søren's entries. commit 8ec79e05feacd61562b53ebf36a8b30967affc1e Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 19 15:15:51 2005 +0000 Make symlink-mesa.sh call srcdir != objdir safe. Remove requirement for XF86Rush protocol headers, which we don't even use. commit 057a8709a116feb0fd0004141bbac20d2766f3db Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Aug 19 00:13:46 2005 +0000 More updates for Panoramix -> Xinerama rename commit bed3235d222fd6e2207f6c0d551c67d5a53322cd Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Aug 18 21:28:09 2005 +0000 Thu Aug 18 17:27:09 2005 Søren Sandmann <sandmann@redhat.com> Move fbmmx to a convenience library since the mmx flags may be harmful when applied to non-mmx code. commit a0366ddb8cb1c57b85a5806eb348abc19c7f92d6 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Aug 18 17:14:11 2005 +0000 Replace gnu-makeism with portable rules commit ea5c49cb17ac956d6dea6bf563e392e61c39da2b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Aug 18 01:40:33 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2331 <https://bugs.freedesktop.org/attachment.cgi?id=2331> Lines ending in <backslash><space> break with cpp from gcc >= 3.3 (Peter Breitenlohner) commit 22694500e0dd8752b4c01e340f587ecba1ff7fb7 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Aug 17 23:20:27 2005 +0000 Add xf86Sbus.h to EXTRA_DIST files (bugzilla #4128) commit df938987d6c19fbdfff8d3334bb497f4814ae384 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 17 19:03:18 2005 +0000 Add buildsystem for Xprint, and: Wed Aug 17 14:50:58 2005 Soren Sandmann <sandmann@redhat.com> Include <X11/extensions/Print{,str}.h> instead of "Print{,str}.h" Include <X11/fonts/fontstruct.h> isntead of "fonts/fontstruct.h" Wed Aug 17 14:54:49 2005 Søren Sandmann <sandmann@redhat.com> Conditionally compile in xprint.c Add Xprint commit f2f6820c3f01810a4da5a8bb4e43119ef2a3fcb6 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 17 17:20:13 2005 +0000 Wed Aug 17 13:13:00 2005 Søren Sandmann <sandmann@redhat.com> Make asm labels local. Bug 4073, patch from Diego Pettenò. commit ad7f2fc67376f4fbfe81047273de12f7926f0b17 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Aug 16 16:21:09 2005 +0000 symlink.sh: Temporarily disable xkbdata, add type1mod.c Tue Aug 16 12:09:09 2005 Søren Sandmann <sandmann@redhat.com> Add ft and type1 modules. commit 24597a1ee2c567ec6bc2f2208457f2778937a034 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 16 00:40:25 2005 +0000 2005-08-15 Alan Coopersmith <alan.coopersmith@sun.co>m Convert sunPostKbdEvent to use xf86ProcessAction like xf86PostKbdEvent. commit b86282b764387ef8315fc4045d4e1ca1bb74fee1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Aug 15 23:48:35 2005 +0000 Set ZAxisMapping default to "4 5 6 7". commit a6c8d0d71eef7cb964797f7595be36ee0ac10a1a Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 15 19:42:48 2005 +0000 Mon Aug 15 15:41:26 2005 Søren Sandmann <sandmann@redhat.com> Link this module with libXext.la. Mon Aug 15 14:56:57 2005 Søren Sandmann <sandmann@redhat.com> Remove the xkb* files. Add xkbVT.o and friends as the last things on the link line so they will override the symbols in libxkb.a. Add a comment on how this situation might not be considered ideal. commit 46aede552aa43cd59f81980303826b5c3d889c02 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 15 18:59:16 2005 +0000 Mon Aug 15 14:56:57 2005 Søren Sandmann <sandmann@redhat.com> Remove the xkb* files. Add xkbVT.o and friends as the last things on the link line so they will override the symbols in libxkb.a. Add a comment on how this situation might not be considered ideal. commit bcc95c83406a4498227ffd8384bc272fd8cdc49c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Aug 15 18:32:08 2005 +0000 Add AC_SYS_LARGEFILE to match flags used in monolith commit 809906a754a1289b7e88489241a2065aa0bf27a2 Author: Dave Airlie <airlied@linux.ie> Date: Mon Aug 15 08:24:45 2005 +0000 make mouse support work - note you need to change the evdev devices in the source.. hacky... commit fe5abff38e65c1a49886924efdf0242ab8048008 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Aug 15 07:30:05 2005 +0000 Egbert's 64bit fixes for mixed 32/64bit clients commit ebedc8bbb54b9b4e1814bc2758216af2bab93540 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Aug 14 19:46:55 2005 +0000 - Fix the exa pixmap offset/pitch alignment to deal with non-POT alignment requirements. MGA, notably, uses a multiple of 3 in some cases. - Rename the pixmap offset/pitch alignment fields to more clearly state their meaning. commit e3509c940fa1fc3988d23f884ca8bffc87d091e5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Aug 14 16:24:30 2005 +0000 Don't link libXext, as it is linked in to the server also. commit 05071ae0fb847c211b1f20770d3b57fc2172738c Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Aug 13 07:41:33 2005 +0000 Don't link in libx86emu.a as this a) fails badly on non-x86 systems, and b) is done via x86emu.c including all the source files anyway. commit 1ffe9ceb2f6a7261fb62c90dfea861f9dadd27ce Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 13 06:15:35 2005 +0000 Oops, forgot a file in earlier Solaris kbd commit commit c29051f9d108fe49c23d9cf36fd08cc64c87262a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 13 00:11:28 2005 +0000 Add LintTarget() Bugzilla #1068 <https://bugs.freedesktop.org/show_bug.cgi?id=1068> Port Solaris keyboard code to work with kbd driver. Also incorporated "audio bell" feature from Xsun keyboard DDX to play bell tones via /dev/audio (specified via Option "BellDevice" "/dev/audio" in keyboard device options). commit 616a65c4cc528278168db1414776f3a867cd463e Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Aug 12 18:50:33 2005 +0000 Fri Aug 12 14:49:24 2005 Søren Sandmann <sandmann@redhat.com> Apply another patch from Billy Biggs to fix precision issues. commit 1eed84f227311730ce1f9ffab190e95de967c7da Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Aug 12 18:47:17 2005 +0000 Fri Aug 12 14:45:54 2005 Søren Sandmann <sandmann@redhat.com> Fix up multiplications based on patch by Billy Biggs. Part of bug 3945. commit 8bfffb96b552a3facb77ff9e81658e80becbf2f4 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Aug 12 18:31:07 2005 +0000 Fri Aug 12 14:29:09 2005 Søren Sandmann <sandmann@redhat.com> Apply patch from Billy Biggs that fixes rounding problems with division. Part of bug 3945. commit 812ed2e17bfe8e232313cf9ab78000a564cb6b3c Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Aug 12 17:43:38 2005 +0000 Fri Aug 12 10:45:01 2005 S%Gï¿¿%@ren Sandmann <sandmann@redhat.com> Make this function compute the same results as the fbByteMul macro. commit 370b111f4882a95248bcc4727438c95a065c174d Author: Ian Romanick <idr@us.ibm.com> Date: Fri Aug 12 16:30:57 2005 +0000 Use '$(DRMSRCDIR)/shared-core' instead of '$(DRMSRCDIR)/shared' for DRM includes. This matches the way drivers are built in the Mesa tree and fixes a build problem in the Savage driver. Convert uses of __glPointParameterfvARB_size to __glPointParameterfvEXT_size and uses of __glPointParameteriv_size to __glPointParameterivNV_size. This eliminates the need to hand-edit indirect_size.c after it is generated. commit 5f5117729de3a8a4eb6e17dc0979e4b1c1ef9918 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Aug 12 01:17:58 2005 +0000 Fix segfault when "kbd" fails to load and "keyboard" driver is not configured. commit 13e16ee93a328a55494c2933143c66559fe7ba98 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Aug 11 15:46:42 2005 +0000 Thu Aug 11 11:43:32 2005 Søren Sandmann <sandmann@redhat.com> Make sure we don't crash on glyphs with NULL bits. Bug 659. commit 3e471ddf1dbf58ed021d6f31bdaf438872f03ca8 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Aug 11 14:36:29 2005 +0000 Add check for whether the platform is MMX capable and add the relevant flags if so. commit 130fffc0cdbfdc29f33f1ee97c09e744c19e243a Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 10 20:22:57 2005 +0000 Wed Aug 10 16:17:38 2005 Søren Sandmann <sandmann@redhat.com> Add back non-SSE implementations. Define USE_SSE if the CPU is amd64/x86-64 commit ef50bba5694ef276a239882fae3502638b4ec784 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 10 19:42:36 2005 +0000 Revert previous patch as it causes build failures commit b99360e264c9531593ce8eb67bd006275ca5e5a0 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Aug 10 19:15:44 2005 +0000 Add XF86DDXACTIONS to AM_CFLAGS commit 73a335a926e50afde36816ab47dae689202df319 Author: Jon Smirl <jonsmirl@yahoo.com> Date: Tue Aug 9 16:51:05 2005 +0000 Point xegl at the DRI driver commit 29d0ba9f06d90a1c7f619db87d681ca53fa1bf38 Author: Jon Smirl <jonsmirl@yahoo.com> Date: Tue Aug 9 15:58:20 2005 +0000 Touchup xgl for modular tree commit 435e2a09de7c9dd843b05f4a0484371a67940515 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 9 01:18:04 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=3950> Xorg prints version numbers in wrong format for modules compiled for Xorg 6.99 & later (Adam Jackson & Alan Coopersmith) commit 5849c69db80b2320bddb7fafb519300cc0435c84 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 8 18:02:08 2005 +0000 Mon Aug 8 13:39:45 2005 Søren Sandmann <sandmann@redhat.com> Conditionally include xorg-config.h commit 5e6e5e6d8c6add3aac5c3aebc984d3afb842edc1 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 8 17:38:37 2005 +0000 Mon Aug 8 13:36:23 2005 Søren Sandmann <sandmann@redhat.com> #undef PIXPRIV here. commit a11ce76b0625501a202fa34e18777b7bd42b2713 Author: Keith Packard <keithp@keithp.com> Date: Mon Aug 8 06:25:21 2005 +0000 Build with modular X.org libraries and headers. composite/compwindow.c Don't damage unmoved windows. Let border clip reset leave damage alone, pending actual damage for painting. commit 129e812c339879b68bb162331ac9b7e0f86a7474 Author: Keith Packard <keithp@keithp.com> Date: Mon Aug 8 02:30:31 2005 +0000 Re-add _XOPEN_SOURCE as it's needed *sometimes*. Place it in #ifndef to avoid whinging. commit 4dfc3357a78a52ef70750608138dfeef0371cbc4 Author: Keith Packard <keithp@keithp.com> Date: Mon Aug 8 00:38:41 2005 +0000 Add autogenerated source files and other various non-CVS material to .cvsignore files Use XORG_CFLAGS. Ensure that all exa files are in SOURCES remove _XOPEN_SOURCE as it's always in xtrans.pc these days and gcc whines libdamage.la needs libcw.la when COMPOSITE is defined, but that libdamage.la must be after libcomposite.la, so add libcw.la to DAMAGE_LIB instead of EXTENSION_LIBS. Regularize library link order across all X servers commit 7d2b08aa4786eb4d181c88f7dc6b7eb059cc9dad Author: Adam Jackson <ajax@nwnk.net> Date: Sun Aug 7 20:42:50 2005 +0000 Invert the sense of the composite configure flag to match reality. commit fcaa6f30c489578589af19ef798ab31150e696a2 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Aug 7 19:02:32 2005 +0000 Bug #3989: Fix Composite builds, enable Composite build by default. (Olli Helenius) commit 3639fb243450ae447e9901de9f909e975a919514 Author: Chris Lee <clee@c133.org> Date: Sat Aug 6 23:56:18 2005 +0000 Enabling EXA by default in the modular build. commit a16357ebc9344fbf3e393da9e7b28164ad5b9dc8 Author: Chris Lee <clee@c133.org> Date: Sat Aug 6 23:46:38 2005 +0000 Last bits of changes to make exa build properly in the modular server. commit cc67bd187f06bfade0d2fe1b4cca92805458b210 Author: Chris Lee <clee@c133.org> Date: Sat Aug 6 23:34:09 2005 +0000 EXA support in the modular build. commit 33326f4ee884aa677e4568c3eaed4311a8ed0f2a Author: Chris Lee <clee@c133.org> Date: Sat Aug 6 23:27:33 2005 +0000 Adding exa support to the modular server. commit b90a88e80310e5650e2abed4c151889d9c0bd316 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 6 19:48:12 2005 +0000 Add checks for functions used in os/access.c & os/connection.c: getdtablesize(), getifaddrs(), getpeereid(), getpeerucred() commit 2304c14fe5d3796c557a86d0ece1f0fb92591469 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 6 19:14:24 2005 +0000 Fix endian test to work on big-endian platforms correctly commit fc29d014aa586229cdc976aa1bfe38bd949f7cde Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 6 16:29:20 2005 +0000 Merge in patch release RC handling code from 6.8.2 (Kevin Martin) commit 9828a38ed695fed9788ace8bba575e521fa354b7 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Aug 6 03:14:50 2005 +0000 Solaris build fixes needed for modular builds commit f51047c0b6749ae8f04925eb62706b4743328383 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Aug 5 15:43:31 2005 +0000 Fix 32-bit vs. 64-bit test for Solaris commit 4220a0c4ccd0672460d31db239829384aee69f9a Author: Matthew Allum <breakfast@10.am> Date: Fri Aug 5 09:08:32 2005 +0000 Make Xephyr work without shadow fb commit fedbce2186bbe3bd8d23a4d74c35f10286930a7d Author: Adam Jackson <ajax@nwnk.net> Date: Fri Aug 5 00:13:31 2005 +0000 EXTRA_DIST hacks to get all the OS support files into the tarball. commit 39a80312e0c6e9f3b260d2f8279c71aef0a60d12 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Aug 4 22:31:20 2005 +0000 - Bug #3960: Add remaining GLX and pci.ids stuff to DIST (Cha Young-Ho, Olli Helenius) - Fix some distcheck problems for non-solaris systems - Change server version number from the Xorg rev to an independent one - _POSIX_SOURCE and _XOPEN_SOURCE defined to the right values commit ed4d77a16a226a7bc88d0d4f5c595d16cdf46360 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Aug 4 21:05:12 2005 +0000 Thu Aug 4 16:08:00 2005 Søren Sandmann <sandmann@redhat.com> Make the fbCompose paths use the existing inline functions instead of macros. Various other cleanups. Remove macro definitions, move typedef to fbmmx.c commit e62be6d2721e7f43c7bba6b8da4e5ec8c364697d Author: Adam Jackson <ajax@nwnk.net> Date: Thu Aug 4 18:45:46 2005 +0000 - Check for vsnprintf - Don't build the Xorg DDX on darwin - Workaround for gcc defining __ppc__ but not __powerpc__ commit 13bec87f45509452c643e20745e12878584d606a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Aug 4 02:39:56 2005 +0000 Fix inline assembly versions of in*/out* for Sun compilers Add check for ancient USL console code on Solaris to allow building on old Solaris x86 versions commit 9802106864a6b2c24df8e9fcb3c3471033abd5c6 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Aug 3 01:41:34 2005 +0000 dist fixes for cw and GL (Donnie Berkholz, me) commit d7c246f35b1ba7ecbbc086dd1229b298faddec96 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 2 23:57:52 2005 +0000 Only build ix86Pci.c on x86 & amd64 platforms Set DEFAULT_INT10 to x86emu on everything but Linux/x86 Fix Sbus.c inclusion on sparc platforms commit 3d0d95004c65cd3a29c94fec99e13ab7fdc19c7c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 2 20:47:47 2005 +0000 Add check for walkcontext() to enable stack trace dumper on Solaris commit bb5258a21d9efbb7d8b4226a44bd5738eb46d32a Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 2 17:57:36 2005 +0000 Mark generated files as BUILT_SOURCES and CLEANFILES to ensure they are regenerated after 'make clean' and to make parallel builds work right. commit 0c608a690e85064345d7ebdf6b03e2f3bd861708 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 2 06:48:20 2005 +0000 Note yacc and lex generated files as BUILT_SOURCES so they are created before anything is compiled; required for parallel builds commit d31de217e6e9bfb0e1cc99141d80def9382de9a9 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 2 03:36:09 2005 +0000 distcheck fixes commit c83772fef7ea0379db9bab1120f064b80b74f377 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 2 01:50:48 2005 +0000 Set OSNAME for "Build Operating System" line in Xorg log commit 005a9cf1f5fe688f303b954870afd35635fc33bf Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Aug 2 01:03:25 2005 +0000 Fix Solaris assembly source to work with libtool commit 48b130285ad1309a1ff5b2148b3bae5f5b642488 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 2 00:47:08 2005 +0000 Move AM_CONDITIONAL for ia64 to global scope commit 03379474e0fd9c21ac058e2319618934359b3262 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 2 00:45:30 2005 +0000 only do the AS_HELP_STRING workaround once, d'oh commit 2d7b1893befb84850f3221cbe70b3bce4e621d63 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 2 00:41:07 2005 +0000 - Workaround for AS_HELP_STRING compatibility with older autoconf. - New intermediate build target for Xorg server - ia64 fixes commit 7c84189ea1dc236bc979bb4bf158ecb1a6b45137 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Aug 1 22:22:16 2005 +0000 Bugzilla #3566 <https://bugs.freedesktop.org/show_bug.cgi?id=3566> Patch #2906 <https://bugs.freedesktop.org/attachment.cgi?id=2906> Fix for RENDER, repeating pictures and offscreen memory (Owen Taylor) commit 2acd29c93fd3b3d438887f0ca9be6713db81c1e8 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Aug 1 22:13:20 2005 +0000 Bump autoconf dependency to 2.57 from 2.53. Add 2.57 compatibility hack for the new AS_HELP_STRING syntax from 2.58+. commit b7a43fa0f112d92cce71642142e07276da4de681 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Aug 1 19:00:21 2005 +0000 Bug #3739: Fail soft on unknown extension string. commit 0285804811bd24ad7de8894f8188b87e821e54cc Author: Adam Jackson <ajax@nwnk.net> Date: Mon Aug 1 18:41:54 2005 +0000 GLX fix for loadable servers: indirect_size.c goes in libglx, not libGLcore commit 78d51253e229bcb428039911d80a5d89d4bf4491 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 1 16:07:14 2005 +0000 Fri Jul 29 17:20:53 2005 Søren Sandmann <sandmann@redhat.com> Fix rounding bug. commit fd84b3b56280ef88a8c848c4338f0bea906ce6d8 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 30 18:56:32 2005 +0000 Clear compiler warnings. (Stefan Dirsch) commit 9e9f9cb4878d597b3fa6de7732d2866e24c32f54 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Jul 29 21:55:57 2005 +0000 Need to define SVR4 on SVR4-ish systems since many headers and source files check for it, expecting Imake to have defined it already. (Should be replaced with more specific checks & defines, but there's too many to get them all right now.) commit 14ade55b83aa72240a555b3b9def9f40a6a38cd9 Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 29 21:22:58 2005 +0000 Various changes preparing packages for RC0: - Verify and update package version numbers as needed - Implement versioning scheme - Change bug address to point to bugzilla bug entry form - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to reenable it) - Fix makedepend to use pkgconfig and pass distcheck - Update build script to build macros first - Update modular Xorg version commit 2654f88cee86fae9db169dc8668492857fbbad98 Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 29 18:40:54 2005 +0000 Fix code to handle printing 7.0 release candidates properly. commit d5d669b04ecbd91bb2db9ddc6238acabbeaabbe0 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 28 23:33:57 2005 +0000 If neither --enable-dmx or --disable-dmx are specified, default to "yes" on Linux, "no" on everything else (matches defaults in monolith Imake) commit 86529c07d6ff69ef936ee370be07b373e2961360 Author: Kevin E Martin <kem@kem.org> Date: Thu Jul 28 23:28:34 2005 +0000 Fix distcheck for server commit 3e4bf8a8f46e14078c64c56ad303c80cd9d8d5be Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 28 02:38:23 2005 +0000 Rework wrapping of common mouse driver to not require mousePriv.h, so that modular tree xserver can be built on Solaris. Wrap more ioctls in SYSCALL() to restart on signals. commit cfd6c74067de7fdb2aeddee6780c29231a56acdc Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Jul 27 17:50:13 2005 +0000 Add dbestruct.h to sdk_HEADERS commit 5ced854186b851ba2c9ac84eb6d7f141fdee487b Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Jul 27 17:35:25 2005 +0000 Add miwideline.h mistruct.h mifpoly.h to sdk_HEADERS commit 7bd6b0640e69552ed4c9daac26e41410dd7338b4 Author: Kevin E Martin <kem@kem.org> Date: Wed Jul 27 08:16:35 2005 +0000 Add #include <dmx-config.h> for building dmx/glxProxy in the modular tree. commit b9ccd89918e1c79d6013fe563c7fa933c1274837 Author: Kevin E Martin <kem@kem.org> Date: Wed Jul 27 08:11:26 2005 +0000 Fix dmx/glxProxy build commit 8f6664fcff319ee155e7864ce25fa11c1fa5594b Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Jul 26 23:40:45 2005 +0000 Add these files to the sdk: cbf32.h cfb16.h cfbmap.h cfbunmap.h cfbunmap.h cfbmskbits.h xf86sbusBus.h mifillarch.h mispans.h commit 3cbb55f309b8eaba246d1d948b59883f9ed28bf4 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Jul 26 22:17:27 2005 +0000 Install xorgVersion.h commit df5d47560c19b01f2998806c4b62f459a6b5fc02 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Jul 26 18:56:45 2005 +0000 xserver/xorg/fb/Makefile.am: install fboverlay.h commit b25e6f82a1189a67208a2a4980d732ab77e64a35 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Jul 26 18:21:22 2005 +0000 fb/Makefile.am: add fbpseudocolor.h to sdk_HEADERS hw/xfree86/xaa/Makefile.am: add xaaWrapper.h to sdk_HEADERS commit e7502158d6922a149d0aaf1de209f0b58fa444bf Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Jul 24 16:24:17 2005 +0000 Add xf86DeallocateGARTMemory stub so that Xorg can be built on Solaris again. commit 7c1148c0fbc00716bb7ec621a1b968b4127cbb00 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 23 19:32:57 2005 +0000 Fire the Mesa symlink script from the configure stage. commit f331a325447449982efba8adc5bc079371dfb77a Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 23 19:29:58 2005 +0000 Add the symlink script for the Mesa source. commit a5532e456d763718036e84891ff57c6f7417615a Author: Stuart R. Anderson <anderson@netsweng.com> Date: Sat Jul 23 18:16:06 2005 +0000 Change the default depth back to 8 like it was originally. Disable the addition of depth 12 & 30. It causes more than MAXFORMATS depths to be added to the screen which causes an array in the Screen structure to overflow and crash on server reset. commit d8a1241a24d75c258548875350bff4d0acc795ab Author: Stuart R. Anderson <anderson@netsweng.com> Date: Sat Jul 23 17:49:45 2005 +0000 Add a safety check to catch when numDepths GCperDepthexceeps MAXFORMATS commit 93d29b4554d26b22ca43311264f85ea8e14804c2 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 23 02:04:39 2005 +0000 Emit makefiles for glapi, slang, and grammar. Conditionally define GLX_LIBS if GLX support is requested. Add GLX_LIBS to the link deps for Xvfb and Xnest. All GLX support should work now for the vfb, xnest, and xfree86 DDXes. commit 525d663ec5a8a181a1e36f3787b24cdb77290c17 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 23 02:02:18 2005 +0000 glapi build (forgot this one somehow) commit 6aaceef3231818682dccf1969b211f1dc798da1f Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 23 02:00:52 2005 +0000 Fix the build system to reflect the rest of the Mesa core. Almost links, needs a code fix to Mesa though. commit d7e2cadb13ef0e77d864c8282489f544b0e1dede Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jul 21 02:29:05 2005 +0000 GLX needs gl.h from Mesa too commit bf32f4739c6ef7f41cde6cc409d42e00462402fb Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Jul 19 20:51:46 2005 +0000 programs/Xserver/hw/xfree86/os-support/shared/agp_noop.c programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c programs/Xserver/hw/xfree86/os-support/xf86_OSproc.h //bugs.freedesktop.org/show_bug.cgi?id=3164> Add xf86DeallocateGARTMemory() function call (Austin Yuan) commit 931abdba8410bf1188d69d54c57543a21ea36968 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Jul 19 02:50:00 2005 +0000 Change #include "X.h" to <X11/X.h> commit 4f2e731aba0c5694abb65a877395cc5f9869c556 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 17 07:34:31 2005 +0000 objdir != srcdir fixes. commit a6bd7ad985e138874bb0e1f33f545651dfde32a9 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Jul 17 01:52:33 2005 +0000 Set GLX automake conditional after we've tested for mesa source and set GLX to "no" if it's --with-mesa-source wasn't set. commit ead37b08699f665a856c7ba29578c27c27db4100 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 16 20:52:25 2005 +0000 Mark variables modified in signal handlers as volatile (part of Sun bug id 4496504) commit bbb49449cbc0815fd9c4faf9b6ee32be99a8aa3d Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 16:30:40 2005 +0000 Fix --with-mesa-source parsing, and turn GLX off if no path to Mesa given. commit d69e9872ae91c9c17a33e1ed763f98453d950b39 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 16:29:30 2005 +0000 Typo fix, and re-add GLcore to the dixmods build commit 8bc883c48c8f99502707998a8257c0563cae7d3a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 16 09:00:44 2005 +0000 Update build instructions. Add details about how the expat, fontconfig, libpng, freetype, and xterm builds are now handled. Update text docs from SGML masters. commit 8e600b87643f7f4e19923dd6a0f2eec83303363a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 16 07:39:48 2005 +0000 Only pass -rdynamic when using gcc commit 4f04e26c69747929243f176feaa90f3042481f53 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 04:30:33 2005 +0000 Say --with-mesa-source to get GLcore built. commit 4913316f25e76381844cf15aa64eff620c2807a1 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 04:29:28 2005 +0000 Switch to MESA_SOURCE which we're already AC_SUBSTing commit 7facb209a705ca406b05272c233ea0cfd6a5b266 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 04:24:21 2005 +0000 Hook in the GLcore build commit 2f9a7c6ee1012b2c7664c53f405affaf82bd0953 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 04:13:33 2005 +0000 Hey look, GLcore links commit 5f81eb1d89f623dd9281e686a4d4d4f403e459c6 Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 16 03:49:59 2005 +0000 Fix the *-config.h includes so that it is possible to build modules without having to use -include in the Makefile. commit 0635acab08bade9bfd9d2abd3ea5a3fe525bc647 Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 16 03:46:01 2005 +0000 Add record module building support Change module building to not use -include Fix xnest, dmx and vfb builds to -DXFree86Server for fbcmap compilation commit 92b23ff426936909e1ff5e063b75e5f112b93ca1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 16 01:17:52 2005 +0000 Update to match recent changes to pci.ids & extrapci.ids for people building on systems without perl. commit 6ce3743948a7151c721194594091a7e1183e2f32 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 16 00:51:14 2005 +0000 start the GLcore build system commit 2f0487521da3da6784dd964c915071b82d749108 Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 15 23:08:31 2005 +0000 Fix the *-config.h includes for the files that have moved in the modular tree. commit a407fa373bb72f29050e3f027042011075b3bdf0 Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 15 22:51:05 2005 +0000 Move drm up to os-support since the files are shared by multiple platforms. Fix the dri and drm build. Fix server-side DMX extension build. Make xf4bpp use the correct version of mfbline.c for mfbseg.c. Add #ifndef _HEADERNAME_H_/#define _HEADERNAME_H_/.../#endif to the headers. commit eb6fa0dc15516a0a436090efc6d85f22baeec015 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jul 15 22:14:28 2005 +0000 Enable GLX build by default commit 0e352a8b2b4c78c291074b9531ed7afa7a20ac17 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jul 15 21:59:39 2005 +0000 disable GLcore momentarily until a build system exists. --enable-glx should work now. commit 4bf453086418e93e81b24d3d2a0f49a9357acff3 Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 15 05:48:29 2005 +0000 Fix keyboard state when XEVIE is not enabled (Keith Packard). commit 562acf2e69dcf08f8db8f8eeaa162949d45f70b2 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jul 14 23:41:15 2005 +0000 Add -I$(top_builddir)/hw/xfree86/dixmods/extmod to Xext/Makefile.am Patch from Stefan Dirsch commit defeb56fc9559661fa632935a4c76c500c7edcf4 Author: Kevin E Martin <kem@kem.org> Date: Thu Jul 14 22:20:16 2005 +0000 Fix the build when DRI is enabled commit 6b546d0ec07e493b501e82300b3e6c143cd4d0ac Author: Kevin E Martin <kem@kem.org> Date: Thu Jul 14 03:36:44 2005 +0000 Add #include <xnest-config.h> to the Xnest source files for modularization. commit 7375f4d13626bbba4204e2f08f41c212b2eed992 Author: Kevin E Martin <kem@kem.org> Date: Thu Jul 14 03:32:09 2005 +0000 Add support for Xnest commit c582560c62fd8181b7521e470f118a59c418a95f Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 14 02:59:34 2005 +0000 Add partial in*/out* assembly support for Sun compilers on x86 commit 64bf3a81a3212dc2c0f55aebdc74a618ca6a32c0 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jul 14 02:53:31 2005 +0000 loadable extmod build system. commit 6c96e0c9e4b3f1e8dfa5dcf7366bb838dc0724ec Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jul 14 01:36:58 2005 +0000 loader support for extmod commit 8ea4a1b759eae0279ce619c663f2cd2f6dee8d71 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 14 01:00:39 2005 +0000 First pass at Solaris os-support commit f07e905553783dc0133015bcbf94d3b6be68b19c Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jul 14 00:28:47 2005 +0000 - Add build system for xf86-video-ati - Add build system for xserver/xorg/hw/xfree86/dri - Add glcore.h to symlink.sh - Symlink.sh: add some more DRI files, symlink glcore.h from extras/Mesa/include/GL/internal to proto/GL - proto/GL/Makefile.am: install glcore.h - xf86-video-ark: s/module-dir/xorg-module-dir/ commit 939b7720f17ec5ac5edcc6cfe70453160ecb0161 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 14 00:02:05 2005 +0000 Merge SVR4/pre-Solaris 8 and Solaris 8+ sections for greater consistency, easier maintenance, and to fix some missing headers when building the modular Xorg on Solaris. commit 23d25a656d7fdbafa1c78be2950fb405f0a1b87b Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 23:41:21 2005 +0000 Remove references to DDX-specific extensions commit f4626bb72b9955846abee018ae31c1aeb51b8dbf Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 22:59:39 2005 +0000 dlloader is the default in 6.9, but the loader doesn't get told to prefer dlloader modules unless you -DDLOPEN_HACK. commit 4f38526566dbcc296d124bb852adfa30ac4d927e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Jul 13 22:54:02 2005 +0000 - Use fbdevhwstub.c if <linux/fb.h> is not found - Use x86emu on Solaris instead of vm86 - Better per-OS control over which xf86Kbd*.c and *Pci.c files to build - Set various #defines to be defined or not on Solaris as needed commit db8aa17f15f62f243400b0267bf281dd27738644 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 22:19:36 2005 +0000 updated comment for libbitmap commit 4f9e76ed6a61b414ffc94550727a138c3f73996f Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 22:09:52 2005 +0000 Dear libtool: Loadable modules do not need version numbers. kthnxbye. commit 40ad7321f5d8d216523d575c4414736d8cfe9e88 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 21:52:51 2005 +0000 Generate useful loadable modules by actually linking in the blobs from the DIX commit 0e08818d3951c324e5953bd23a8a9457b3fec78f Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 21:41:02 2005 +0000 Hook dbe into the build commit 2d4ddb5606b7328c591a7bffafbb49bdaf2adcf9 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Jul 13 21:36:27 2005 +0000 double-buffering extension commit c2ec9fbb15c776b9c64451cf32927b1b8d1c560c Author: Kevin E Martin <kem@kem.org> Date: Wed Jul 13 21:17:53 2005 +0000 Only build Xi/stubs.c on DDXs that don't support the Xinput extension commit 74a534f63c1ed016f24dbc3ca31f05b81076e8f0 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Jul 13 20:19:38 2005 +0000 xc/programs/Xserver/hw/xfree86/drivers/i2c/*.c: include xorg-config.h instead of config.h xserver/xorg/hw/xfree86/i2c/Makefile.am: Add i2c drivers commit 1dc3e96e4077a912dd3aa13fa80099f5864b641f Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Jul 13 16:30:53 2005 +0000 Fix compilation where uint is not defined. commit 19e20c1470c1f8d15f2a78fb29545bde06a65516 Author: Lars Knoll <lars@trolltech.com> Date: Wed Jul 13 08:58:37 2005 +0000 don't clobber %ebx in the assembler. commit bfb10bd2dcca65ba5d346c9d7da594a81c35c101 Author: Lars Knoll <lars@trolltech.com> Date: Wed Jul 13 07:28:17 2005 +0000 Fix potential buffer overflow and a smaller bug in the convolution filter commit 778a2703b233641e298fa81ef9c477943c496305 Author: Lars Knoll <lars@trolltech.com> Date: Wed Jul 13 07:12:33 2005 +0000 fix compilation commit 66bc36473c238fdee7e6c1d31e6e5f6813a7541a Author: Daniel Stone <daniel@fooishbar.org> Date: Tue Jul 12 23:36:27 2005 +0000 Use builddir, not srcdir, for built files. commit d6808a48d2dffd72f618fa372fba993736638799 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Jul 12 18:16:03 2005 +0000 Fix scanpci -v core dump when subsys vendor/device id's are NOVENDOR & NODEVICE. Bug #3763 <https://bugs.freedesktop.org/show_bug.cgi?id=3763> Patch #3074 <https://bugs.freedesktop.org/attachment.cgi?id=3074> commit cda9c7b2678ea08ac6176a9eee72e6e511134b8e Author: Lars Knoll <lars@trolltech.com> Date: Tue Jul 12 14:50:10 2005 +0000 add x86emu. commit 41002623f314444bd416fd5f445a0425c5b59df0 Author: Lars Knoll <lars@trolltech.com> Date: Tue Jul 12 10:02:10 2005 +0000 Add MMX Code paths for the basic composition operations in fbComposeGeneral. commit 697cf74fb50a550b8f7e124dc8f463a55519795f Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 12 03:09:20 2005 +0000 Make Xprt run when linked against Xlib for Xrm commit 419448ea7b0d7f672e568cb1d8b4e190a1f54825 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Jul 12 03:03:16 2005 +0000 Pull libdri out of the build for now until I get something better worked out commit f054bf2ff6b94e285e7f2d174163c01b07b07143 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Jul 12 01:29:41 2005 +0000 build fix commit 02427d4d04f70109a499578c6762654463ebdae4 Author: Kevin E Martin <kem@kem.org> Date: Tue Jul 12 01:20:36 2005 +0000 Add support for building Xdmx and Xvfb commit 3fe6b5bb30e8e1b9017a9cf818fcceb279a28e65 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Jul 12 01:17:39 2005 +0000 GLX server support commit 377e3bddd4d73154520a9582d75de2b20ae532a5 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Jul 12 00:55:43 2005 +0000 Forgot to add these for some reason commit e348ac4b4dfb1112c19fe5fe5441182e66716087 Author: Kevin E Martin <kem@kem.org> Date: Tue Jul 12 00:52:48 2005 +0000 Prepare Xdmx and Xvfb for modularization by adding appropriate #include <{dix,dmx}-config.h> to the source files. commit b7a9a6a03560bdf6584c71bf0b546301bba9ab89 Author: Kevin E Martin <kem@kem.org> Date: Mon Jul 11 17:52:00 2005 +0000 Remove unneeded xf86drm.h includes to fix modular build. commit cf4dfd650dbc2bb65eae4eea2acfb4a4c5295548 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jul 11 02:29:50 2005 +0000 Prep for modular builds by adding guarded #include "config.h" everywhere. commit c5548086f3864c828f0cad65d2708cefd2025947 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jul 11 00:42:52 2005 +0000 Start filling in glx build. Add xf86Version.h and a few DRI headers to the sdk (needed for modular driver builds). commit 955fe17133d841758a18072a9acabedc81dc4562 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jul 10 21:45:55 2005 +0000 add some convenience variables for the drivers commit 78fab90230c61241af29f0c94f401ce0bc749b6b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 9 16:51:58 2005 +0000 Bug #3740 <https://bugs.freedesktop.org/show_bug.cgi?id=3740> Patch #3058 <https://bugs.freedesktop.org/attachment.cgi?id=3058> 08-Jul-2005 nv driver updates from Mark Vojkovich: Change some console restore code for NV11. Hopefully, we can more reliably restore the console for desktop systems using DVI. This may correct a recent regression on NV11. Also, new PCI IDs. Add new nVidia PCI ids to match nv_driver.c changes. commit 3c92389185f0c9fa3b8c299a084b10c12bcab52c Author: Zack Rusin <zack@kde.org> Date: Sat Jul 9 14:15:35 2005 +0000 Patch from Thomas Winischhofer to kick out all pixmaps to system ram upon a VT switch and vice versa when returning. commit 327741486e807c068383a771c04c9042b0589c37 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 9 02:22:29 2005 +0000 Don't try to link fb, shadow, or vgahw into the loadable Xorg server, as they're only supposed to be loadable modules. commit 2b8e4db9ac4b4c8f8fd73c00436d6abec2faa535 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jul 8 20:27:30 2005 +0000 -lXfont isn't enough for libbitmap, you need to get the -L from pkg-config commit e84648df7d7eb700b7c2d35fdef0be1f463853fa Author: Zack Rusin <zack@kde.org> Date: Fri Jul 8 17:07:52 2005 +0000 mark drawable as dirty on copying/painting windows commit 4ab73a73f4aa1f02cc8dada185b5dcbddfe43878 Author: Zack Rusin <zack@kde.org> Date: Fri Jul 8 07:43:00 2005 +0000 heh, oops (thanks Thomas) commit 0a28516a6e641b41e674f69fc228b0babbe1743b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 7 19:07:28 2005 +0000 More compiler warning fixes for missing prototypes: Add prototype for XkbSetExtension() Add #include <ctype.h> for isspace() & isdigit() Add #include <grp.h> (for initgroups()) and remove extra * Add prototype for xorgGetVersion() commit 2c3c4060fd2a52f147eda01b11222c341c6e3dee Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 7 16:18:52 2005 +0000 Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Add prototype for XdmAuthenticationInit() (Peter Breitenlohner) commit d0dc574adb79ffacf90b786d4ccfcd1cd8598728 Author: Zack Rusin <zack@kde.org> Date: Thu Jul 7 15:05:02 2005 +0000 Check vtSema before accelerating primitives and sync in fallbacks only if we got vtSema commit 6cba5f1260c20b3bc072fdcc5f3e49fa28ba6414 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 7 14:59:48 2005 +0000 Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2332 <https://bugs.freedesktop.org/attachment.cgi?id=2332> This patch avoids 79 gcc-3.4.3 warnings 'xxx' declared `static' but never defined mostly due to including "ftfuncs.h" with the declaration of static functions defined in "ftfuncs.c". (Peter Breitenlohner) commit 7da3f4a786d9b61f4129c7dbbef80c84abbfde68 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 7 03:12:40 2005 +0000 Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Fix warnings about redefined macros (Peter Breitenlohner) commit f86562540d1c945bfd96d4b89259d81e4ed25255 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jul 7 02:47:06 2005 +0000 Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2325 <https://bugs.freedesktop.org/attachment.cgi?id=2325> Avoid 38 gcc-3.4.2 warnings: suggest parentheses around assignment used as truth value suggest explicit braces to avoid ambiguous `else' suggest parentheses around && within || suggest parentheses around arithmetic in operand of ^ "/*" within comment (Peter Breitenlohner) Bug #2901 <https://bugs.freedesktop.org/show_bug.cgi?id=2901> Patch #2326 <https://bugs.freedesktop.org/attachment.cgi?id=2326> This patch removes these 2 gcc-3.4.3 warnings: missing braces around initializer implicit declaration of function `XpOidTrayMediumListHasTray' (Peter Breitenlohner) commit 4047191124c237518110e698bde6dab445644449 Author: Damien Ciabrini <braun@club-internet.fr> Date: Wed Jul 6 15:34:22 2005 +0000 Added hardware support for transformation matrix (zoom, rotation, etc...). Fixed the composition function for RGB and A8 format. Avoid syncing hardware after HW fills or copies. commit 4073f24c90d4aff3f7d83af4c0e733eed082b53b Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Jul 6 15:14:30 2005 +0000 add missing PictureTransformPoint3d call commit c48f631cdb6a279ab1a24a486b05956cfa9ca3da Author: Damien Ciabrini <braun@club-internet.fr> Date: Wed Jul 6 13:57:41 2005 +0000 Fix offset alignment code in the offscreen memory allocator to prevent textures from being allocated in the next free memory area. commit baa99be190c51b533bf8748c6c6a9bce62594e96 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jul 6 07:16:19 2005 +0000 Put the correct value in the length field of the reply. Previously, the number of tag/date pairs was specified. This was incorrect. The correct value is the number of values (one for the tag and one for the value). Xorg bug: #3210 commit 6ba4a2e78a73858648b5b6a39306446d519c3a75 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 23:01:51 2005 +0000 Add more defines for XWin DDX Make building of cfb*, afb and mfb conditional Set FD_SETSIZE=256 on cygwin commit 71ed3ae0c696152e82a98ce2ac0fa67ce6f23464 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 22:58:29 2005 +0000 wrap fInternalWM with XWIN_MULTIWINDOWEXTWM commit 456844a613240ce56181f6f3ec7873be9b2dc85d Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Jul 5 18:42:32 2005 +0000 Remove Speedo font module documentation. Remove Speedo from list of font directories Update default font path to remove Speedo, add TTF. commit 20c15003f9648de0c03f7d4fa4508afd896b19f5 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 18:25:44 2005 +0000 Fix crash on server shutdown commit d72fef26d44e649f39a56730830148d48d77ee9e Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 17:52:35 2005 +0000 Fix simultanious presses of Left and Right Control and Shift keys. https://bugs.freedesktop.org/show_bug.cgi?id=3677 commit 0f2c8221c938ce8eebd9f0e111a6b87223c18f9e Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 16:35:42 2005 +0000 Fix typo which broke window titles commit 0bb2eb8eaaf4054fefbc45bf3cb47bbcf10b7cfd Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 15:43:20 2005 +0000 Fix problem with fake Control press on Alt-Gr https://bugs.freedesktop.org/show_bug.cgi?id=3680 https://bugs.freedesktop.org/show_bug.cgi?id=3497 Fix static declaration of winGetBaseDir commit 3af77ad3e754c4d419a1996ca73a9fd01f92388a Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 5 14:09:48 2005 +0000 External windowmanagers could connect in multiwindow mode which lead to strange results with the internal windowmanager. commit 426282268bcdd0e0ca973fa79b414e9065fbfd9d Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jul 4 23:40:09 2005 +0000 Build miinitext.c and fbcmap.c as DDX specific files Do not define _POSIX_SOURCE on cygwin. commit 845a0ac68b02148db6f2cca81debf20b2331607b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jul 4 23:11:20 2005 +0000 Revert last changes. They have to be addressed in a different way commit 048045a9e714fc85c26028c4de36dff47644b826 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jul 4 22:18:40 2005 +0000 Add XWin DDX, make Xorg DDX conditional Make XF86VidMode and XF86Misc conditional Add XWin DDX Added DDXTIME, DDXOSFATALERROR, DDXOSVERRORF and DDXBEFORERESET Added fbcmap.c Added miinitext.c Added -I$(top_srcdir)/Xext/extmod to INCLUDES commit 508cdb5cb01a91b1bf3ef31da80b6b1d36286bf0 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jul 4 22:10:43 2005 +0000 Include xwin-config.h if HAVE_XWIN_CONFIG is defined Cleanup X11 includes handling Warning fixes commit 5e50ae22bf206d6c2cc05e772e05fa5a363acb81 Author: Zack Rusin <zack@kde.org> Date: Mon Jul 4 18:55:53 2005 +0000 remove the temporary debugging output commit 7586ac6edea64b30d6187f9ec4d867521c1e769c Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jul 4 18:41:04 2005 +0000 Bug #2216: Multiseat support. From various Debian and Ubuntu patches by Aivils Stoss, Andreas Schuldei, Branden Robinson, and Daniel Stone. commit ba011dc77dcfaea2843481fbba45a76d8cb9aa83 Author: Lars Knoll <lars@trolltech.com> Date: Mon Jul 4 14:47:03 2005 +0000 don't be too smart and try to replace PictOpOver by PictOpSrc when we have an external alpha map. Make fbmmx.c compile on gcc 4.0.1. commit a4df8ad75579d9c183f110d79d87cfb9aaf23acd Author: Lars Knoll <lars@trolltech.com> Date: Mon Jul 4 14:23:59 2005 +0000 Fix handling of "super luminescent" colors Fix off by one error in the transformation handling. commit e34f31762e0454930f30547a9407cc8b941c70f2 Author: Zack Rusin <zack@kde.org> Date: Mon Jul 4 14:15:57 2005 +0000 This fixes the close screen mess (crash reported by Thomas). Also hide the private Exa screen definition. Properly cleanup on screen close and do not delete the private screen in the DriverFini call. commit 4ef813961dc8dea8924a79e0954d5b6da12e77c0 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jul 4 09:01:43 2005 +0000 provide the uint datatype on WIN32 commit 7dc547252af3b23652b1d496957645726c7125a4 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Jul 4 00:16:23 2005 +0000 Fix builds on non-GLIBC systems (missing __GLIBC_PREREQ). Add Solaris stack backtrace dumper. commit d010de6979a6c51a628f2f8e6d7f479a542d1e8b Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 15:51:23 2005 +0000 Abandon the nostdinc experiment. commit b0d80e76d28dbc1ee14453950db000bb4d7f377f Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 12:17:04 2005 +0000 Add missing include paths. commit 461eb6ebd9273dc3dcd601ee0a0491981a98acd9 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 12:16:29 2005 +0000 Change HAVE_CONFIG_H to HAVE_DIX_CONFIG_H. commit c1e69798ad14fb706f5f6de67e3f53df56f524c6 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 12:15:16 2005 +0000 Add explicit PSZ defines, remove unnecessary dix-config.h include. Add -DXF86PM, forgotten from last commit. commit 4e501d35e260775a43f340b3e1a9aa092570aba4 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 10:51:16 2005 +0000 Remove needless usage of DECkeysym.h. commit a107f599518a175dd689417b48788a746303966a Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 09:39:54 2005 +0000 Predicate usage of xf86OSPM functions on #ifdef XF86PM. Remove needless include of ../input/mouse/mouse.h. commit 0bb669638f032e61471007b2fa88285aa5d63903 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 08:53:54 2005 +0000 Change <X11/misc.h> and <X11/os.h> to "misc.h" and "os.h". commit 401e4580d6dd9867a691045688680ce410f84cb5 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 07:55:00 2005 +0000 Move misc.h and os.h from proto/X11 to xserver/xorg/include. commit 46b64bd5c66abb1bb9f3538c887d10867607bfff Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 07:37:35 2005 +0000 Fix more include paths; add dix-config.h to XKB code. commit e03198972ca78b03ad13cb49112c03a052bb763b Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Jul 3 07:02:09 2005 +0000 Add Xtrans definitions (FONT_t, TRANS_CLIENT) to clean up warnings. Add XSERV_t, TRANS_SERVER, TRANS_REOPEN to quash warnings. Add #include <dix-config.h> or <xorg-config.h>, as appropriate, to all source files in the xserver/xorg tree, predicated on defines of HAVE_{DIX,XORG}_CONFIG_H. Change all Xfont includes to <X11/fonts/foo.h>. commit b8aef6c474ffc6d637bec178674898ea95ccde47 Author: Kevin E Martin <kem@kem.org> Date: Sun Jul 3 03:28:27 2005 +0000 Fix build issues. commit 826a6f029faeabaa783a93dfdccca846f9326b58 Author: Daniel Stone <daniel@fooishbar.org> Date: Sat Jul 2 18:59:44 2005 +0000 Continuing Makefile cleanup; add DIX_CFLAGS and XORG_CFLAGS everywhere. commit e58c09d31bdf90210e2ec1ef976cea0459cdc02a Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 2 18:06:05 2005 +0000 Bug #3687: Print backtraces on fatal signal on glibc systems. commit e6602b041fe489d51a1d7fac55cbbb12b1826ba1 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 2 17:02:23 2005 +0000 Bug #3546: Use MAP_LENGTH instead of a magic number. (Mark McLoughlin) Bug #3664: Further fixes to Xnest modifier state handling. (Mark McLoughlin) commit 9b1debcdb6c7df956c06350a6525afb8e6d691fa Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 22:43:43 2005 +0000 Change all misc.h and os.h references to <X11/foo.h>. commit 657b4cb8aa0076acae85997c4f0c353b4d86b632 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 22:32:34 2005 +0000 Change all misc.h and os.h references to <X11/foo.h>. commit 303c281f956d55e35b05ef8521d0b60d24aa7a10 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 21:15:20 2005 +0000 Add auto-generated header files. commit 9a6ec34d2545a23586f11ad51c81f41a940d73d0 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 21:13:36 2005 +0000 Use canonical autogen.sh, which supports srcdir != objdir autogen. commit 7ecc2d526c4ea5db2589644a2fec0daf71df36da Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 21:12:24 2005 +0000 Remove fbcmap.c hacks from the DIX. commit 6251f9c00a866f64207d23b0a06306ead15298e8 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 21:11:16 2005 +0000 Minor build system tweaks. commit 641f32c4368db07831d9d703161a9d4699307621 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 20:54:30 2005 +0000 Adding initial build system. commit 507d30546f56bfd172fc43857459c78c1026e97c Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 20:54:01 2005 +0000 Adding initial build system. commit a822df1cc16d150614dead70fd00750095a05c35 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 20:49:35 2005 +0000 Adding initial build system. commit ded56b1a74e6b3e4c48054b7e142d924b19e6104 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Jul 1 20:29:53 2005 +0000 Adding initial build system. commit aabb868920658c9d3979dc194c6bd9702171f101 Author: Zack Rusin <zack@kde.org> Date: Fri Jul 1 13:30:29 2005 +0000 removing all debugging output from the default build :) commit 0fa9d1fb4886c418e3d8e0886ad815513eda0633 Author: Zack Rusin <zack@kde.org> Date: Fri Jul 1 12:24:30 2005 +0000 Leave debugging output for only the interested parties. commit 0df446ab8875430508ff51d3548955a215475084 Author: Zack Rusin <zack@kde.org> Date: Fri Jul 1 10:39:21 2005 +0000 Missed this. Spotted by Thomas. commit b5b2a0522efd61bd99b5d5d75cdd27960cd1c7e1 Author: Lars Knoll <lars@trolltech.com> Date: Fri Jul 1 10:05:43 2005 +0000 Add support for gradients and solid fills to Render. Changed the semantics of the Convolution filter a bit. It now doesn't try to normalize the filter values but leaves this to the client. This gives more reasonable behaviour in the limit where the filter parameters sum up to 0. commit 30c019e847adef6f7f3963df8ef1f3f994669a54 Author: Zack Rusin <zack@kde.org> Date: Fri Jul 1 08:56:12 2005 +0000 Adding the new acceleration architecture: Exa. It's meant to replace XAA in the coming months. commit 276821605ee50e71f30dd52f2c12237fc61f288f Author: David Reveman <c99drn@cs.umu.se> Date: Fri Jul 1 03:14:54 2005 +0000 Fix return values in Xgl render texture implementation commit 5e381441fff411316ea202a9f85aceb0e0dcf46b Author: Alex Deucher <agd5f@yahoo.com> Date: Fri Jul 1 02:56:04 2005 +0000 - Fix Support for Philips FM1236/F tuner on ATI AIW 9600 XT (Jeff Smith) Bug 3401 commit c4d1b4e0424d53cd0470e0e3f57c10ee8fe3d8c2 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jun 30 21:33:46 2005 +0000 Added another test of checkForInput for WIN32 Windows keyboard and mouse events are added to the input queue in Block- and WakupHandlers. There is no device to check if input is ready. commit 1230c55ac3f75f4902b51b223d40354a54d0d0ab Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jun 30 18:50:20 2005 +0000 Pass serverClient instead of NULL to ConfigureWindow. This should fix a crash reported by Øyvind Harboe commit 0929f79c1baa5b65808ab034591510906623e841 Author: Matthew Allum <breakfast@10.am> Date: Thu Jun 30 13:39:00 2005 +0000 Another Xephyr focus/modifier fix commit b6c7afe0b9faed7025c70334d464fd75ce5c84c4 Author: Lars Knoll <lars@trolltech.com> Date: Wed Jun 29 15:19:14 2005 +0000 compile commit d8a98454e305973dd7fec76db2ef80705cf7c298 Author: Lars Knoll <lars@trolltech.com> Date: Wed Jun 29 11:57:16 2005 +0000 Add support for gradients and solid fills to Render. Changed the semantics of the Convolution filter a bit. It now doesn't try to normalize the filter values but leaves this to the client. This gives more reasonable behaviour in the limit where the filter parameters sum up to 0. commit ce0e11aeac76119b96b463605bc1f5318e3d2bde Author: Adam Jackson <ajax@nwnk.net> Date: Tue Jun 28 21:05:31 2005 +0000 Bug #2447: Fix argument order to xf86DrvMsgVerb. (Luc Verhaegen) commit 5ef5aec9bb5ee85295c0913afca891572d1315a4 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Jun 28 02:04:54 2005 +0000 Update to latest snapshot (27-May-2005) from http://pciids.sf.net/ commit b262a18aad36b2de729f6d00d144ac7277687f19 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jun 26 02:48:36 2005 +0000 Cosmetic correctness fixes: miEmptyBox and miEmptyData are variables, and miGlyphExtents is a function. commit aa7fb99bc76e62036c73ff50f58337558859b814 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jun 25 21:28:48 2005 +0000 Bug #3030: Fix Xnest keyboard state handling. (Mark McLoughlin) commit 8562f800b879ae461317da9640961f753e107250 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jun 25 21:16:54 2005 +0000 Bug #3626: _X_EXPORT tags for video and input drivers. commit 582a9f0d2ec01f1a3c5625e2f45a4599be7a11d5 Author: Zack Rusin <zack@kde.org> Date: Sat Jun 25 12:39:58 2005 +0000 Correctly handle empty rects on region initialization. commit 56201222067e793a3542bcdcd39bb257b4fad2a6 Author: Matthew Allum <breakfast@10.am> Date: Thu Jun 23 16:50:07 2005 +0000 Fix issues with focus in and modifiers from host confusing Xephr commit a668b6c11a2d6b4800407ad918481d90be87a732 Author: Matthew Allum <breakfast@10.am> Date: Thu Jun 23 16:34:07 2005 +0000 redo tslib commit 5e863851a61207ade1ac807bc8cff7d9cf02dbbe Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jun 19 01:30:29 2005 +0000 Build workaround. Add glcontextmodes.[ch] from Mesa. commit 9743adbe94f29417818b90e18aebb96a72f332f0 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jun 16 20:50:12 2005 +0000 Add Type1 subdirectory to lib/Xfonts, update build system accordingly. commit 68e856ff5b1842ba10421714b5f6b21d528f6071 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jun 15 18:31:52 2005 +0000 DRM 20050615 import commit 6e301a8e97e99d58eaed25453f66c6d73bafd460 Author: Ian Romanick <idr@us.ibm.com> Date: Wed Jun 15 18:31:52 2005 +0000 Initial revision commit f0c76610b72a5b54bae5a5eb51ff4c420a27320e Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 15 16:46:59 2005 +0000 Conditionalise another use of XEvIE. commit 28ee3dd955302a1e99ffdc66cf0f512c6234d043 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Jun 15 16:27:16 2005 +0000 Conditionalise building of XEvIE code with #ifdef XEVIE. commit c6166ee74137084775c7550b708c5f71f16e7d3f Author: Lars Knoll <lars@trolltech.com> Date: Wed Jun 15 14:51:12 2005 +0000 Fix projective transformations in fbcompose.c Bugfix for convolution filters commit bd54b96034e640f202821eac0a2c40e66c1ddfd0 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Jun 15 05:50:15 2005 +0000 Shut up compiler commit 7fa782dfd548498474830c7268032ffc5fb406a5 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Jun 13 21:51:46 2005 +0000 Add xkbfile to symlink.sh, conditionally include "config.h" in xc/lib/xkbfile commit 0802a2824c06d294ea42f0f6256644da5c0038c2 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jun 13 18:14:53 2005 +0000 Correct the CHIPSET lines for the 3dfx cards so the tdfx driver will recognize them. I'm not sure if this file is supposed to be maintained still, but I'd like to close FreeBSD ports/32121 which has been around for far too long. commit 2eab094816726542c4de6c9db5efa102ab1e1593 Author: David Reveman <c99drn@cs.umu.se> Date: Mon Jun 13 16:38:06 2005 +0000 Build fixes commit 49476ca73c86a599a1bc49cba1117d42f59996a8 Author: Lars Knoll <lars@trolltech.com> Date: Mon Jun 13 14:40:25 2005 +0000 add the convolution filter from xserver to xorg commit f0ab6d57df66da5de1a8182f8250cc2c8e1450ad Author: David Reveman <c99drn@cs.umu.se> Date: Mon Jun 13 06:00:35 2005 +0000 Remove xgloffscreen.c commit f5aeaa7710de5ba4aad125bc8472bad1f17e23c6 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jun 13 00:09:23 2005 +0000 Bug #3513: Silence unhandled event messages from Xnest when running with -parent. (Mark McLoughlin) commit 521916d0074901db58ab6b9edab52373da28bdb3 Author: David Reveman <c99drn@cs.umu.se> Date: Fri Jun 10 12:30:39 2005 +0000 New implementation of GLX_MESA_render_texture commit bdb3eb86f02e233b6aeef0995ea9afeaa7b035ac Author: Kean Johnson <kean@armory.com> Date: Fri Jun 10 06:54:07 2005 +0000 file usl_xqueue.c was initially added on branch sco_port_update. commit 988ffddfe082fb27fadf9aa60ab22dce6855508c Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jun 10 04:01:14 2005 +0000 Bug #2799: Input shape. (Keith Packard) commit d24ed90547122832d4168ad761f68e107bb1a2db Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jun 10 02:14:44 2005 +0000 Axe a few dead fields from the port priv struct and add my name to the "Copyright" line of the license to ati_video.c that already has my name in the text. commit 75065f3a54ec760bbe81160fa233810f14d8aaa2 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 9 23:22:55 2005 +0000 Perform a warnings sweep on hw/kdrive. A number of these were my fault, but some come from others. commit e11e60b361d63ae02918dd6b43038a5c92b73a49 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 9 21:59:26 2005 +0000 Greatly improve the correctness and performance of the MGA render implementation. Includes cache flushing to prevent bad first reads of the framebuffer, fixing blending of many formats, falling back on many unsupported operations, and falling back early to prevent migration. Passes all of rendercheck except some of the blend (!) tests. commit 9f81ce945680515e6db7da6c87458bee7c0f053d Author: Ian Romanick <idr@us.ibm.com> Date: Thu Jun 9 21:48:45 2005 +0000 Re-enable GL_HP_occlusion_test. The problems in Mesa that caused this bug were fixed by Brian Paul in Mesa version 6.1. The current Mesa version in the X.org tree is 6.2.1. Xorg bug: 762 commit 92b3775ae8bdd4a84d7e101b36b306fbd3ac17a2 Author: Matthew Allum <breakfast@10.am> Date: Thu Jun 9 16:22:27 2005 +0000 TSLib fixes. Add fullscreen support to ephyr commit 545c082cf9c86f2a809ea6b4dca33643afb0c3d3 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 9 10:44:45 2005 +0000 - Replace the syncAccel hook in the kdrive structure with a pair of hooks in the kaa structure: markSync and waitMarker. The first, if set, returns a hardware-dependent marker number which can then be waited for with waitMarker. If markSync is absent (which is the case on all drivers currently), waitMarker must wait for idle on any given marker number. The intention is to allow for more parallelism when we get downloading from framebuffer, or more fine-grained idling. - Replace the KdMarkSync/KdCheckSync functions with kaaMarkSync and kaaWaitSync. These will need to be refined when KAA starts being smart about using them. Merge kpict.c into kasync.c since kasyn.c has all the rest of these fallback funcs. - Restructure all drivers to initialize a KaaInfo structure by hand rather than statically in dubious order. - Whack the i810 driver into shape in hopes that it'll work after this change (it certainly wouldn't have before this). Doesn't support my i845 though. - Make a new KXV helper to avoid duplicated code to fill the region with the necessary color key. Use it in i810 and mach64 (tested). commit 72ca8e1b5432db57401e66af8a07fcd8cbbbb9f1 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Jun 9 03:11:58 2005 +0000 Add agpgart support for Solaris x86/x64. [Requires Solaris "Nevada" build 16 or later to get kernel side for now.] (Sophia Li - Sun Microsystems) commit ca37d5755259ca03c61cf0567be3dea99d0c79f6 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 9 03:01:57 2005 +0000 Bug #2469: More accurate damage reports. (Jonathan Lennox) commit cdc15e2294a9bffc570e33bc31170081abfc55fb Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 9 02:29:42 2005 +0000 Bug #1846: Add intentionally undocumented -disablexineramaextension flag to the server to work around ignorant clients on large display walls. (Kevin E. Martin) commit e3cdec7cdcd76f6294ba1f296e4bcdee43b1eb3c Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 9 02:19:10 2005 +0000 Bug #1880: Remove unused xnestConfineWindow. (Mark McLoughlin) commit 0f7136191b54e587b66958985e14d8b0687c5ee1 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jun 9 02:03:50 2005 +0000 Bug #3434: Don't define fbAddTraps twice. (Mike A. Harris) commit e7fec996eb43a0bea94a37d329e3902299e6e895 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Jun 8 16:13:11 2005 +0000 Merge from CYGWIN Added layout "French (Canada)" as ca_enhanced Added Czech (QWERTY) layout Merge from CYGWIN Print error code if winStoreColorsShadowDDNL fails commit d0d164e6daf6c1d8afe8099fb6187d8a74ff652b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Jun 8 09:01:41 2005 +0000 Fix crash reported by yvind Harboe commit d146c41882e50dd1ed6022f8a5866514067ba9d2 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Jun 7 08:53:40 2005 +0000 GLX improvements and remove use of pbuffers for offscreen rendering in Xgl commit 8237b31f60245a8e67735d6c231dfb7dd0bbc388 Author: Jon Smirl <jonsmirl@yahoo.com> Date: Mon Jun 6 04:06:38 2005 +0000 Keyboard sort of works now with evdev commit c5026577cbc70c7365a9c81b2775136b45c850d2 Author: Jon Smirl <jonsmirl@yahoo.com> Date: Sun Jun 5 17:32:41 2005 +0000 Create a default colormap commit 021a5cd170051aae25cf61651d07b47a4df31ab4 Author: Jon Smirl <jonsmirl@yahoo.com> Date: Sun Jun 5 01:58:41 2005 +0000 Enable egl server in automake --enable-xeglserver commit aa959672863aad71c807d6c09938bb296c347bcf Author: Jon Smirl <jonsmirl@yahoo.com> Date: Sat Jun 4 23:33:03 2005 +0000 Initial Xegl check-in. Works on EGL fbdev driver Input is totally broken. commit 88d49bed008264092245c4f6c53174f93f6ab387 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Jun 3 21:49:11 2005 +0000 Need to set initial screen size at device open time too. commit 0d206e177f46eedfffd8f88e985efdfaf117021c Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Jun 3 08:12:22 2005 +0000 Backout last winRaiseWindow patch which caused stacking problems commit 2fc290f646eb48f3c20ccff98355c2d082569160 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Jun 1 17:45:17 2005 +0000 Solaris VUID mouse protocol updates: - support for mouse-like devices that report absolute coordinates - support for mouse-like devices that need to know screen size so they can scale absolute coordinates to screen size - fix 3-button emulation commit 8537146e3662cdc66ef4692bfd3886a676096fb8 Author: Adam Jackson <ajax@nwnk.net> Date: Mon May 30 18:44:55 2005 +0000 Bug #3368: Cosmetic cleanup to DIX export list. commit 547c47aaea9f31f7c873376b0db859c1c1d3d918 Author: Adam Jackson <ajax@nwnk.net> Date: Mon May 30 18:36:19 2005 +0000 Bug #3407: Clean out ancient #ifdef X11R5 conditionals. commit cebd7348d271591b7ebeebe3b332f835cfa8a068 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat May 28 00:08:03 2005 +0000 Change hardcoded /usr/X11R6 to PROJECTROOT. Change hardcoded XF86Config to XCONFIGFILE. commit 1cb18a4bad565d1f783a4cefb3ed467699051068 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed May 25 12:14:29 2005 +0000 Workaround bug in pthread.h commit 62343f5162066f19ca6e62d1c85a4a40d45b3295 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun May 22 01:12:49 2005 +0000 Bugzilla #2800 <https://bugs.freedesktop.org/show_bug.cgi?id=2800> Xevie extension crash with signal 11 on keyboard Bugzilla #1205 <https://bugs.freedesktop.org/show_bug.cgi?id=1205> Xevie client receives two KeyPress events on consumed keys when XKB is enabled Patch #2223 <https://bugs.freedesktop.org/attachment.cgi?id=2223> Fixes for both of these and some other Xevie bugs (Derek Wang - Sun Microsystems) commit a8a61bbe22361b12d4a2dd511894987a338e3eef Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat May 21 07:46:38 2005 +0000 Initial experimental support for AMD64 builds on Solaris 10 x86. Improved support for 64-bit SPARC builds on Solaris as well. commit ef4401ff8a8c4d7c22ef6af7bf47ccb24f83967f Author: Adam Jackson <ajax@nwnk.net> Date: Thu May 19 18:53:51 2005 +0000 Bug #3334: Clean up remnants from the PEX, XIE, and BEZIER extensions. commit 1e51e18382de61a67027759eccee9ccbb0924304 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu May 19 01:25:02 2005 +0000 Wed May 18 21:20:35 2005 Søren Sandmann <sandmann@redhat.com> s/dst/src that I missed in the previous patch. Pointed out by Owen Taylor. commit be3875994d7778ffad0cd957a4bd1500bf58ac2c Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed May 18 20:49:31 2005 +0000 Wed May 18 16:47:44 2005 Søren Sandmann <sandmann@redhat.com> Actually assign the computed results. (Reported by Michael Dänzer, patch by Owen Taylor). commit 07d1e9ae5f0da65427ac52f065b173d340d70d6d Author: Adam Jackson <ajax@nwnk.net> Date: Wed May 18 19:44:35 2005 +0000 Bug #3066: Promote frameBufferPhysicalAddress to pointer from CARD32; bump DRIINFO version to match. Fix various pointer printfs in libdri to be 64-bit aware. Silence a warning about redefining noXFree86DRIExtension. (Jesse Barnes) commit b87a32fb0eafa6d5f12a6faa634662c71fdc97fa Author: Adam Jackson <ajax@nwnk.net> Date: Wed May 18 17:47:35 2005 +0000 Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version number of the DRIInfoRec, disambiguating it from the XF86DRI protocol version number. Modify DRIQueryVersion to return the libdri version number, which all DDXes were requesting implicitly. Fix the DDXes to check for the DRIINFO version they were compiled against. commit fddcde777f50611099d8888456d93be7e566c84e Author: Egbert Eich <eich@suse.de> Date: Wed May 18 15:38:50 2005 +0000 VBESetVBEMode() calls int10 0x4f02 to set a VBE video mode. This can be a standard mode solely determined by the mode ID or it may be a detailed mode with almost arbitrary mode parameters. The mode parameters are passed to the BIOS in a memory area pointed to by es:di. If bit 11 in the video mode is set this memory area is evaluated. When we don't have such an area (passed to VBESetVBEMode() this function should unset this bit for sanity reasons. (Bugzilla #3329) commit f28d644d9fb1feeab1bbb3d5e68255bfa20905d8 Author: Zack Rusin <zack@kde.org> Date: Wed May 18 14:24:14 2005 +0000 rewrite the rootless compositing code (1) compiles which is already a huge improvement ;) , 2) matches the new render composition semantics) commit bbbb0a3a84bf21f5120c73ef387d6190154c0f65 Author: Egbert Eich <eich@suse.de> Date: Wed May 18 10:31:53 2005 +0000 Avoid segfaults if the number of user supplied monitor ranges exceed the number of preallocated slots. We should really make this dynamic - but I don't think this ever caused a problem so it's more or less academic. A. Avoid that *SyncStart starts before *BlankStart. If *BlankStart > *SyncStart it is made = *SyncStart and its width is made maximal but such that the blank does not exceed *Total. Since the Sync width has the same restrictions as the Blank width monitors should still be able to clamp after the sync pulse. B. Over time mode validation has become inconsistent when people started to add additional features to the mode validation. One such feature is that the mode->Crtc* values have been (ab)used to allow the driver ValidMode() function to pass driver normalized timing values back to the validation function. The introduction of these features made the code less readable and created numerous possibly unintended side effects in the validation semantics. I've attempted to consolidate these changes making the code more consistent and eliminating a number of side effects. This should not cause problems for the majority of drivers, still it should receive testing - especially with ATi Mach64 and Radeon code. (Bugzilla #3325). commit a90af4a2e6e38cbe20af13aaa7822836c01290ae Author: Thomas Hellstrom <unichrome@shipmail.org> Date: Sun May 15 17:45:47 2005 +0000 Bug 2750: Prevent mtrr_remove_offending from ending up in an endless loop if the offending region refuses to be removed. commit f58a54668b96884ece6ecbff732e880677d5d19e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat May 14 20:13:45 2005 +0000 Change return statements to fix compiler errors: "fbcompose.c", line 2815: void function cannot return value "fbcompose.c", line 2861: void function cannot return value commit a9d820b454bbb418d04e1d3c3d5d4dd10d7bb3af Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri May 13 22:53:44 2005 +0000 - For now put xtrans in X11/Xtrans/X11, since libX11 is looking for it in <X11/...> - For Xcomposite and Xdamage, don't link the build system out of the xc tree - Link the public X11 headers into their own directory - Add links to XKeysymDB and XErrorDB - Add links to all the Xlib man pages - Add links to the lcUniConv subdirectory - Conditionally include config.h in Xlib source commit 8993e70d8da89e130455369ccb504b3adea5344f Author: Eric Anholt <anholt@freebsd.org> Date: Tue May 10 00:12:17 2005 +0000 Bugzilla #2561: Disable some keycode translations on PC98, which had various bad effects including modifier keys not working. commit e78abf3bdfbf5fc13fbc5b1d3ec00e9484297b89 Author: Eric Anholt <anholt@freebsd.org> Date: Mon May 9 23:42:26 2005 +0000 Bugzilla #2429: Correct the sysarch prototype for FreeBSD/alpha. commit 3f1a1551df2a9f45b3b8821f3f168d4dc8b8b438 Author: Eric Anholt <anholt@freebsd.org> Date: Mon May 9 23:26:02 2005 +0000 Increase the maximum number of buttons from 12 to 24. Helps with button-happy mice like the Logitech MediaPlay. (Bugzilla #2390) commit eca5dff173d5af0a31bbf84579909b88a86e4c92 Author: Adam Jackson <ajax@nwnk.net> Date: Mon May 9 12:46:53 2005 +0000 Render performance improvements. (Lars Knoll, Zack Rusin) commit 2de24db63eb65974ac547facf2a99aa4709d54b3 Author: Adam Jackson <ajax@nwnk.net> Date: Sun May 8 23:34:15 2005 +0000 Render performance improvements. (Lars Knoll, Zack Rusin) commit 2c9b1e337b2e82e10909f62e8cd8c2c7a402fdd8 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun May 8 21:14:55 2005 +0000 Only call ConfigureWindow from winRaiseWindow if the windows message dispatch loop is running. commit 78e4cb67d0f595f4fba5e98a9fa46de044556905 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri May 6 00:45:30 2005 +0000 Fix build issues on Mac OS X 10.4.0. commit d5739efd2c266081ed6b844767dcdd0a3331bfd3 Author: Eric Anholt <anholt@freebsd.org> Date: Wed May 4 04:14:58 2005 +0000 Port X.Org to FreeBSD/powerpc. This makes a bit of math for sysmouse in mouse.c explicitly signed, avoiding the need for -fsigned-chars. (Peter Grehan, grehan at FreeBSD dot org) commit 6700847458427cbdbaf837ab06bfea9b80d92df2 Author: Harold L Hunt II <huntharo@msu.edu> Date: Mon May 2 22:01:08 2005 +0000 Fix comments for pointers in parameter lists to work with fussy compilers commit e50ab8feade400efd8e88ee0b2deeb924f169034 Author: Harold L Hunt II <huntharo@msu.edu> Date: Mon May 2 21:57:32 2005 +0000 Fix message type (respose->response) and fix */*comment*/ blocks to work with fussy compilers. commit baa0cfc15442287557e44fa2614d89ab0b5c2539 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon May 2 14:07:31 2005 +0000 Print correct logfile in FatalError message commit bc977945a53206d70ef9817d6ede4137eb5f7e3c Author: David Reveman <c99drn@cs.umu.se> Date: Mon May 2 00:33:52 2005 +0000 Set stencil size for Xgl GLX visuals commit 5b4462ed9bbb17212dd57617cb7e837142b6270a Author: David Reveman <c99drn@cs.umu.se> Date: Sun May 1 22:55:25 2005 +0000 New algorithm for calculating glyph extents in Xgl commit e4b33f4e91a5379c99ecf78ffb6a3e836cb42491 Author: Egbert Eich <eich@suse.de> Date: Wed Apr 27 15:42:15 2005 +0000 Catch SIGCHLD in OsBlockSignals() too to make sure this signal doesn't intercept reading the authority file (Fabian Franz, Bugzilla #3137). commit 246b14cb29250517912d9c661ab037a953f4bbf4 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Apr 27 10:34:33 2005 +0000 Minor optimization commit 28a2d841cee596c0242b1649587d6b180529c0ef Author: David Reveman <c99drn@cs.umu.se> Date: Wed Apr 27 09:29:33 2005 +0000 Line drawing improvements to Xgl commit abcc8c352e5fe6dd3b7ce5c6a25f435f877264c3 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Apr 27 08:45:16 2005 +0000 Fix typo commit 8bc5a387c365d6367813eac374150440d0edbf6e Author: David Reveman <c99drn@cs.umu.se> Date: Tue Apr 26 11:04:23 2005 +0000 Add glCopy operation and glPushAttrib/glPopAttrib support to Xgl GLX commit f010131a1964b5ec35f3b333ffa7459c38f8ce45 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 26 06:12:07 2005 +0000 xc/programs/Xserver/Xprint/Init.c //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2556 (https://bugs.freedesktop.org/attachment.cgi?id=2556) Refix for bug 2879 - downgrade 15bit PseudoColor to 14bit - the current datatype for the |ColormapEntries| is a |signed short| which is too small for |32768| colors (=integer overflow). commit ba24ae89d33fbf3aacb8bbaf920d7436b77fda46 Author: David Reveman <c99drn@cs.umu.se> Date: Mon Apr 25 17:18:01 2005 +0000 Add scissor based clipping to Xgl GLX commit 07cc29cf69ff1e079efe3c9bfc55e8ac0f9bac93 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 25 00:25:39 2005 +0000 Bug #2138: When the server is built with MakeDllModules YES, prefer dlloader modules to elfloader modules, and vice versa when MakeDllModules is NO. Based on 028_loader_speed_hack.diff from Ubuntu (Daniel Stone). commit 6c37648754c9bd901adecf8d38f9bb46db65efad Author: Adam Jackson <ajax@nwnk.net> Date: Mon Apr 25 00:11:21 2005 +0000 Bug #2141: Rework misleading warning message when APM support is unavailable. (Previous patch on 2005-04-14 changed the wrong message.) commit a369d390a87ab0189c465be6cfd914e4b9329691 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Apr 24 01:10:12 2005 +0000 xc/config/cf/X11.tmpl xc/programs/Xserver/Xext/Imakefile xc/programs/Xserver/dix/Imakefile xc/programs/Xserver/dix/main.c xc/programs/Xserver/dix/xpstubs.c xc/programs/Xserver/mi/miinitext.c //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2526 (https://bugs.freedesktop.org/attachment.cgi?id=2526) bug 2792 part II: Make Xprint headers in dix/, mi/, os/ and Xext/ conditional on whether the Xprint extension is build or not. Patch by Egbert Eich <eich@freedesktop.org> and Roland Mainz <roland.mainz@nrubsig.org>. commit 13fcfee37305f46e95ff81d7d5eec4d88a63a63b Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Apr 23 22:55:40 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=3118) attachment #2525 (https://bugs.freedesktop.org/attachment.cgi?id=2525) Get Xprint server working again which was broken by the 05/04/20 05:49:46 commit commit (the CPP symbol |XPRINT| is not universally available when building the Xserver and should be used with care). commit 39eb2797183bf871a2dd01bff63dd35c146471f5 Author: Adam Jackson <ajax@nwnk.net> Date: Sat Apr 23 19:16:10 2005 +0000 Bug #3016: Don't complain as loudly about failing to load a module that's already loaded. commit 139f900c56a6f44df2b411fe4bbc025a147e3abe Author: Adam Jackson <ajax@nwnk.net> Date: Sat Apr 23 19:01:13 2005 +0000 Bug #3109: Handle R_ALPHA_BRSGP relocations in elfloader. (Sergey Tikhonov) commit 0e80fe0e607cc73856332563becd70ef92d1aa75 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Apr 22 22:11:26 2005 +0000 Clean up formatting, projectroot substutition, and grammatical nits. commit dcfb97204b021738c0ee9f1f8f40243dfa0b2ce0 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Apr 22 22:04:37 2005 +0000 Work around clash between Solaris headers and module loader headers over definition of FILE. commit 07bd7df6a6a07834277b4bf505db6727841e1153 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 22 20:49:50 2005 +0000 Bug #3069: Drop the BuildLowMem hack, it doesn't compile and isn't useful. commit d450a70e00b50427ecb2065d3cc44f43d102cade Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 22 17:45:14 2005 +0000 Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, Bjorn Helgaas, Egbert Eich.) commit 16c2499b8f5c2405e36c7d5a922bb0b150df1762 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 22 16:49:22 2005 +0000 Bug #2373: SGI Altix platform support. (Shrijeet Mukherjee, Jesse Barnes, Bjorn Helgaas, Egbert Eich.) commit 8565b6c0e2851cc3f194ba72d3db02a4e2976528 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Apr 21 00:31:31 2005 +0000 Change xf86bigfont.h include to X11/extensions/xf86bigfont.h. commit b241c703a2c4164420dd26ee11f583bbf9cfe0f3 Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Apr 21 00:31:13 2005 +0000 Change keymap.h includes to X11/keymap.h commit 44528218d5ca75b842e4cefd8fdc58be2f35f0f4 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 23:33:53 2005 +0000 Change dmxext.h and dmxproto.h to <X11/extensions/...>. commit efa9d5f4757bfc0588cee361bcc78dd8a09efa62 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 23:11:12 2005 +0000 Change "eviestr.h" to <X11/extensions/eviestr.h>. commit db5bd04097fd815ab6523f187679682a5e5047fa Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Apr 20 16:40:52 2005 +0000 Fix includes right throughout the Xserver tree: apply changes to windows specific includes Fix includes right throughout the Xserver tree: apply changes to Xdmcp.h commit 8963a220f36cf0ae2a8a653fd39c983140e29736 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Apr 20 16:34:46 2005 +0000 warning fix for Win32 commit e6a0820d1b479058bddef66018d321940e79260c Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 15:16:36 2005 +0000 Change "xf86bigfstr.h" to <X11/extensions/xf86bigfstr.h> for includes. commit 025724f9f5874159c20ebd705288ec60b960caac Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Apr 20 14:17:35 2005 +0000 Add missing space after -query hostname commit 35cd1684622f4528c68e07eea798c33bc4b93667 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 14:16:37 2005 +0000 Change xf86bigfstr.h to X11/extensions/xf86bigfstr.h for includes. commit c7c27e61870b42de044b183c854a960582d98dbf Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 13:33:54 2005 +0000 Change xf86bigfont.h to X11/extensions/xf86bigfont.h for includes. commit abd246c6c272a2c6f9c37404b2ed439911880e75 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 13:01:55 2005 +0000 Add glyphstr.h to includes. commit 956dfa22f6076969776546fb1151e900d8d773a1 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 12:49:46 2005 +0000 Conditionalise usage of Xprint functions and headers. commit 2cdfab0ed7eb33a6a50f9b7ec212b498dd8318b5 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 12:42:02 2005 +0000 Change keysymdef.h to X11/keysymdef.h for include statement. commit fa5539247d3b246db9ff1469d08167178c85d7ad Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 12:39:28 2005 +0000 Change Xalloca.h to X11/Xalloca.h for include. commit 292c4cff26687e6ef86c285b97813ab587daf009 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Apr 20 12:25:48 2005 +0000 Fix includes right throughout the Xserver tree: change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h; change "foo.h", "extensions/foo.h" and "X11/foo.h" to <X11/extensions/foo.h> for extension headers, e.g. Xv.h; change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files. commit c062d7f96f47bdd31640be1fbce682d0774db3d9 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Apr 19 18:21:01 2005 +0000 Prevent recursive calls to winRaiseWindow. commit 4e914c5ed7679a1102f3e25af0c087380f834865 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Apr 19 14:51:29 2005 +0000 Hash texture objects and display lists in Xgl commit 6bde764de102a56d2c71b971eaa36535e9760b52 Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> Date: Sun Apr 17 23:02:25 2005 +0000 Added a log pring for the parameters commit 8594b8f2893e58ae824e140334c18ba3d7467217 Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> Date: Sun Apr 17 23:00:58 2005 +0000 Added new tuner FM1236MK3 PAL version commit 7f74e3aebdf79fbca4141e6ffcdad39812df9335 Author: Bogdan Diaconescu <b_diaconescu@yahoo.com> Date: Sun Apr 17 22:58:03 2005 +0000 This is the UDA1380 sound coder-decoder module commit 7a4e5f4006319e025e3ff561eccc3f1ad6c661a0 Author: Torrey Lyons <torrey@mrcla.com> Date: Sat Apr 16 00:21:21 2005 +0000 Fix cases in Darwin build where a variable is declared static and later as extern (XFree86 Bug #1576, Jordan Frank). commit 4f686f158b00478a3d074128f9e4cb6dc0d928cd Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Apr 15 23:34:39 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2885) attachment #2434 (https://bugs.freedesktop.org/attachment.cgi?id=2434) Fix Solaris build bustage caused by namespace collision between symbols defined in <sys/kbd.h> and those in "xf86_OSlib.h". Patch by Alan Coopersmith <alan.coopersmith@sun.com>. commit 7472fcfdd40e29cd2847e45d4bd2dd11ccc41ff5 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 15 00:18:58 2005 +0000 Bug #2141: Rework misleading warning message when APM support is unavailable. commit 504067819a4f1a8564dcacc278933f533618b666 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Apr 14 17:51:51 2005 +0000 Bug #3025: gcc4 build fix. commit e40db7f26af39a8b1f3675a2c87ce90c4fd59d85 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Apr 13 14:27:47 2005 +0000 Add GLX code to Xgl commit ddfa6f00da7c80b246b57c592361baa4bc5a8e9d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Apr 13 00:05:37 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=3001) attachment #2404 (https://bugs.freedesktop.org/attachment.cgi?id=2404) Improve rendering performance when glXSwapBuffers()| or |XPutImage()| are called for the PostScript DDX via optimizing the codepath around |PsOut_OutImageBytes()|. Patch by Simon Toedt <simon.toedt@gmail.com> and Roland Mainz <roland.mainz@nrubsig.org>. commit f45208a7e9c39345ac431c2e7da8777d6c466dcc Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Apr 11 11:06:21 2005 +0000 update static file from pci.ids commit b47f39b417cbe220690155a08c6bc18cd7cfa388 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Mon Apr 11 10:57:33 2005 +0000 import latest pci.ids file commit 00a551393ce7aa9d2b23634737ced5071e3cdd35 Author: Egbert Eich <eich@suse.de> Date: Mon Apr 11 10:54:13 2005 +0000 Reenable BackingStore in Xvfb. commit 1fbd38f3b46df62561f8be74cbc05fcf8ad88a21 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Apr 11 10:16:25 2005 +0000 Added wizard page for clipboard selection and additional server parameters commit 6848b0353897a6a5d1218b266c22fb87a7c6d730 Author: Egbert Eich <eich@suse.de> Date: Mon Apr 11 10:05:38 2005 +0000 Correct the mask bits when checking for a 64bit memory base in PCI config space (bugzilla #2963). commit adac7011965ed75ea399b93dae917cb48180c77a Author: Egbert Eich <eich@suse.de> Date: Mon Apr 11 09:33:43 2005 +0000 Preventing hight for drawing from becoming negative when face->dy < 0. The height value is used in miFillPolyHelper() to calculate the size of memory to be allocated. A negative value will lead to a crash (Bugzilla #2690, Keith Packard, Egbert Eich). commit 5e2080ef93a598c6d68e1b2f446f251ab025b702 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Apr 11 01:06:15 2005 +0000 xc/programs/Xserver/Xprint/attributes.c xc/programs/glxgears/glxgears.c xc/programs/xdbedizzy/xdbedizzy.c xc/programs/xedit/Imakefile xc/programs/xedit/Xedit-xprint.ad xc/programs/xedit/util.c xc/programs/xedit/xedit.h xc/programs/xlogo/print.c xc/programs/xlogo/xlogo.c xc/programs/xlogo/xlogo.h xc/programs/xman/Imakefile xc/programs/xman/print.h xc/programs/xmore/Imakefile xc/programs/xmore/print.c xc/programs/xmore/print.h xc/programs/xmore/printdialog.c xc/programs/xphelloworld/xpawhelloworld/xpawhelloworld.c xc/programs/xphelloworld/xphelloworld/xphelloworld.c xc/programs/xphelloworld/xpsimplehelloworld/xpsimplehelloworld.c xc/programs/xphelloworld/xpxmhelloworld/xpxmhelloworld.c //bugs.freedesktop.org/show_bug.cgi?id=790) attachment #2379 (https://bugs.freedesktop.org/attachment.cgi?id=2379) Implement support client+Xserver support for passing output (stdout+stderr) of the spooler command started by the Xprint server back to the application using the "xp-spooler-command-results" XPJobAttr attribute (applications can fetch the attribute value after the XPEndJobNotify event was received; more details can be found in http://xprint.mozdev.org/docs/dtprint_fspec.ps). commit 9af443f5976ab3987e4ee9d397391e82206676b4 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Apr 9 19:20:03 2005 +0000 Fix passing of non-RGB visuals. The old code did not initialize the structure properly which lead to a crash in 8bpp mode commit f02440dfa3439ab493c7918b472c23bb22e29707 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Apr 6 15:18:59 2005 +0000 First import of xlaunch frontend for Xming commit de5d24a200e4426e458fc447884d1a5b0257faaa Author: Egbert Eich <eich@suse.de> Date: Mon Apr 4 10:17:06 2005 +0000 Fixed sentinels in Xt, editres and xedit to reduce number of warnings with gcc4 (Andreas Schwab). commit 277ff06e9999f2efe0f082a3565f6279219c13e4 Author: Egbert Eich <eich@suse.de> Date: Mon Apr 4 10:11:51 2005 +0000 Fix typo leading to bogus code in xorgcfg (Andreas Schwab). commit 7eb6b69ebd945c753ee0988e1a85dffde982446e Author: Egbert Eich <eich@suse.de> Date: Mon Apr 4 09:55:25 2005 +0000 Support for HP's IPF ZX1 systems (Alex Williamson). commit 231c00e8fba91b580ec3e2703dd1ceacf13a6624 Author: Egbert Eich <eich@suse.de> Date: Mon Apr 4 09:47:07 2005 +0000 When not using dlopen ia64 needs an extra cache flush to ensure the icache is coherent when modules are loaded (Alex Williamson). commit 55dc930a180553c08d8546cc2078451c20e34934 Author: Torrey Lyons <torrey@mrcla.com> Date: Sat Apr 2 02:29:24 2005 +0000 Fix XDarwin's handling of Wacom tablet mouse buttons (Based on patch suggested by Daphne Pfister). commit 03d126081e5ba57ea2304753289528a896f3baaf Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Apr 1 21:45:20 2005 +0000 xc/programs/Xserver/Xprint/Init.c xc/programs/Xserver/Xprint/ps/Imakefile xc/programs/Xserver/Xprint/ps/Ps.h xc/programs/Xserver/Xprint/ps/PsArea.c xc/programs/Xserver/Xprint/ps/PsColor.c xc/programs/Xserver/Xprint/ps/PsImageUtil.c xc/programs/Xserver/Xprint/ps/PsInit.c //bugs.freedesktop.org/show_bug.cgi?id=2879) attachment #2287 (https://bugs.freedesktop.org/attachment.cgi?id=2287) Follow-up to bugzilla #1299: Add new visuals in the Postscript DDX (including TrueColor 16bit, PseudoColor 15bit/12bpg(12 bits per R-, G-, B-channel as in PostScript Level 2 (and above) colors can have 12 bits per component (36 bit for RGB)), PseudoColor+GrayScale+StaticGray 12bit/12bpg) and switch the default visual from PseudoColor 8bit/8bpg to PseudoColor 12bit/12bpg. commit fe37cc7e7b3036e538930c16bbdb39a7915b1685 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Fri Apr 1 21:28:50 2005 +0000 programs/Xserver/hw/xfree86/loader/xf86sym.c programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c Fix setjump0 declaration for DllLoader. commit ef60998a828951e61f1480e29c2fec62e7454bbc Author: Kevin E Martin <kem@kem.org> Date: Fri Apr 1 20:21:38 2005 +0000 bugzilla #2880 (https://bugs.freedesktop.org/show_bug.cgi?id=2880) attachment #2285 (https://bugs.freedesktop.org/attachment.cgi?id=2285) Use system method to access PCI config space. commit 33ab2a2abc8c1e4ca9c7139454c60f5ad8a61a94 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Apr 1 20:05:11 2005 +0000 Bug #2835: Add symbol exports to support the ReadDisplay extension. commit cbccac448a1466ab098e8fe5dbfff98264c7260a Author: Alex Deucher <agd5f@yahoo.com> Date: Thu Mar 31 23:18:10 2005 +0000 - Add new Radeon pci ids (ATI devrel), bug 2827 commit 59d7222b13775efb2159159cc897e7789bdf10b2 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Sun Mar 27 00:17:12 2005 +0000 Sat Mar 26 19:00:30 2005 Søren Sandmann <sandmann@redhat.com> Remove accidentally committed prototype. commit 476ae15640d2b97cb0ebccab8255ccf728596c62 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Sat Mar 26 23:50:24 2005 +0000 Sat Mar 26 18:49:21 2005 Soeren Sandmann <sandmann@redhat.com> programs/Xserver/fb/fbmmx.h New function. Hook it up here commit 0d33b588376a4d86d50ed8b7e06eaf0dbd8c5ba5 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Mar 25 23:11:14 2005 +0000 xc/programs/Xserver/Xprint/ps/Imakefile //bugs.freedesktop.org/show_bug.cgi?id=2821) attachment #xxx (https://bugs.freedesktop.org/attachment.cgi?id=xxx) Remove the cfb dependicy from the PostScript DDX as this is not needed in a vector DDX (mfb is still needed to fill the |BitmapToRegion()| callback with |mfbPixmapToRegion()|). commit 5f320335c3a8148ae98f82a00ff44954197f4251 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Wed Mar 23 21:09:48 2005 +0000 bugzilla #2194: fix an alignement problem on 64 bit architectures. commit f4e9f522fe8bec3dd6294d062c2244a06623add3 Author: Thomas Hellstrom <unichrome@shipmail.org> Date: Wed Mar 23 21:03:41 2005 +0000 Bugzilla #2750 (https://bugs.freedesktop.org/show_bug.cgi?id=2750) Linux-only fixes: Fix case where a smaller write-combining region blocks write-combining setting of the whole frame buffer. Fix bug in wc setting code when regions are first splitted and setting of write-combining then fails. commit 1be6e2388bcc5835ab62f0855d443fb508697deb Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Mar 23 20:49:52 2005 +0000 xc/programs/Xserver/hw/vfb/InitOutput.c //bugs.freedesktop.org/show_bug.cgi?id=2791) attachment #2197 (https://bugs.freedesktop.org/attachment.cgi?id=2197) Add support for 12bit PseudoColor and 30bit TrueColor to Xvfb. commit 26aec10adad51deb35a8398abb884d90be077a6b Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Mar 23 19:58:45 2005 +0000 xc/programs/Xserver/Imakefile xc/programs/Xserver/Xprint/DiPrint.h xc/programs/Xserver/Xprint/Imakefile xc/programs/Xserver/Xprint/Init.c xc/programs/Xserver/Xprint/ddxInit.c xc/programs/Xserver/dix/Imakefile xc/programs/Xserver/dix/main.c xc/programs/Xserver/dix/xpstubs.c xc/programs/Xserver/os/Imakefile //bugs.freedesktop.org/show_bug.cgi?id=2792) attachment #2193 (https://bugs.freedesktop.org/attachment.cgi?id=2193) Fix build bustage when |PrintOnlyServer| is set to |NO|. Patch by Roland Mainz <roland.mainz@nrubsig.org> and Julien Lafon <julien.lafon@gmail.com>. commit ac18f8e308221af368fd4153b4eee7b89f8dd4bc Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Mar 23 00:32:49 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2789) attachment #2187 (https://bugs.freedesktop.org/attachment.cgi?id=2187) Fix Xvfb to honor the "-dpi" option (instead of using a hardcoded value of 100DPI). commit 45bcb8e22ad949c456368b7d4f4226110f8b5cfc Author: Adam Jackson <ajax@nwnk.net> Date: Tue Mar 22 21:30:43 2005 +0000 Bug #1821: Typo fix in xorg.conf man page (Jens Schweikhardt) commit cc95e597b51f06e835c6a9def1bc6681029bf41e Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Tue Mar 22 17:49:14 2005 +0000 Tue Mar 22 12:47:16 2005 Søren Sandmann <sandmann@redhat.com> Only validate the source if it is a viewable window. Stops the cursor flickering when it is above an unviewable window. commit 1d68ede0eed62b48354a954a62fca98aa2ce9d2d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Mar 19 20:51:34 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2771) attachment #2148 (https://bugs.freedesktop.org/attachment.cgi?id=2148) Remove RENDER extension from exclusion list for the standalone print server (Xprt) to get this extension enabled if the print DDX support it. commit 64f1b3fe7e85245865666607d7b32ef7807df08f Author: Michel Daenzer <michel@daenzer.net> Date: Fri Mar 18 22:36:47 2005 +0000 Add support for production version of ATI RN50/ES1000. (ATI Technologies Inc.) commit 36dcc9bb1d51fb8c0d67c7e15700e3473a06e47b Author: Torrey Lyons <torrey@mrcla.com> Date: Thu Mar 17 01:12:07 2005 +0000 Fix build on stock Mac OS X: Out of the box, Mac OS X does not include Freetype2, Expat, or PNG. Also global variables should be initalized in the Xserver. commit 82f5a127522e48ff7ff78400eadbce0a5a362064 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Wed Mar 16 21:25:43 2005 +0000 Wed Mar 16 16:17:43 2005 Søren Sandmann <sandmann@redhat.com> Only validate the source if it is a viewable window. Stops the cursor flickering when it is above an unviewable window. commit 226c0907d4327a440fb0ac5380a19538ffdc6fa0 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Mar 16 21:05:51 2005 +0000 Add cursor support to Xglx commit 7109ae147c3a9d243d11f386cfbcfbf7b4ea7918 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Mar 16 20:05:19 2005 +0000 Fix a few problems in Xgl commit 04ccba4d40bef6cee902b118598272f26eebb1df Author: Egbert Eich <eich@suse.de> Date: Wed Mar 16 12:16:06 2005 +0000 Don't fail calling function when DriverFunc() for RandR fails as DriverFunc() also returns FALSE when the specific sub function isn't supported. In the case of xf86RandRGetInfo() we simply rely on what has been set before and return TRUE. In the case of xf86RandRSetConfig() we only bail with FALSE if we have to do a rotation and the call fails. We presently cannot do rotation on the fly without the help of a driver function (Bugzilla #2745). commit 1011762254b41db5ce67cb652a2d4965efd7ec20 Author: Egbert Eich <eich@suse.de> Date: Wed Mar 16 11:54:54 2005 +0000 Make message that gets printed when loader encounters a .o with no symbols less conspicuous. commit 816606b9eabee334ce6e0b79e8aa67544f428c19 Author: David Reveman <c99drn@cs.umu.se> Date: Fri Mar 11 12:26:20 2005 +0000 Return early from xglFillRect when no rectangles should be filled commit 4de5aa428514f2cacc60d4708dad996dedee1092 Author: David Reveman <c99drn@cs.umu.se> Date: Fri Mar 11 00:58:49 2005 +0000 Use negative stride and PBOs in Xgl commit 8653db5d57199d53c9b2b993c35a7b70c8949989 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Mar 10 20:05:46 2005 +0000 Force rebuilding of window stack if a window changes it's state from minimized. commit 522628f25b4a075c8daf547991ea5b80c5efe9c7 Author: Egbert Eich <eich@suse.de> Date: Tue Mar 8 10:26:59 2005 +0000 Adding more errnos to the libc wrapper (Bugzilla #2672). commit db7c9d349b86216ed00888181c64ab707fbe18d4 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 8 09:27:09 2005 +0000 Return early from xglCopy if fall-back is more efficient commit e09d1d2ae3ccd59408b1dc6f264897ae12dfa2b8 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 8 09:12:17 2005 +0000 Better ShmPutImage support in Xgl commit 5d9885c5b95286c8d7f777c7232283e8b1e81d1b Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 8 09:03:38 2005 +0000 Minor improvement to CopyArea in Xgl commit 51155ca68bf7539bd3ace2ac068a2be1fbcf400c Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 8 08:48:22 2005 +0000 Improve Xgl offscreen memory manager commit e26a096cb662700387c7b43289d1f6f7ab4a0aac Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 8 08:30:47 2005 +0000 Fix Xgl glyph caching commit 8d0e520721ab7697d2d4f639425499b79c61b43f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Mar 7 23:02:59 2005 +0000 xc/programs/Xserver/dix/atom.c xc/programs/Xserver/dix/colormap.c xc/programs/Xserver/dix/cursor.c xc/programs/Xserver/dix/devices.c xc/programs/Xserver/dix/dispatch.c xc/programs/Xserver/dix/dixfonts.c xc/programs/Xserver/dix/dixutils.c xc/programs/Xserver/dix/events.c xc/programs/Xserver/dix/extension.c xc/programs/Xserver/dix/gc.c xc/programs/Xserver/dix/glyphcurs.c xc/programs/Xserver/dix/grabs.c xc/programs/Xserver/dix/main.c xc/programs/Xserver/dix/pixmap.c xc/programs/Xserver/dix/privates.c xc/programs/Xserver/dix/property.c xc/programs/Xserver/dix/resource.c xc/programs/Xserver/dix/swaprep.c xc/programs/Xserver/dix/swapreq.c //bugs.freedesktop.org/show_bug.cgi?id=2560) attachment #2037 (https://bugs.freedesktop.org/attachment.cgi?id=2037) ANSI-fy Xserver/dix code. The conversion preserves the comments which annotate variables. These have been moved into doxygen(esque?) "stubs" above each function. Patch by Mike Owens <etc@filespanker.com>. commit cb0aa2b4d8875f1ea66e720ca7c6cc2f403be26a Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Mar 7 22:26:59 2005 +0000 Prevent winRaiseWindow from calling ConfigureWindow if the message was sent from within winDestroyWindowsWindow DestroyWindow send a WM_WINDOWPOSCHANGED to another window causing a restacking of all windows, even of the window which is just about to destroyed and whose structures may not be intact anymore. commit 978f3b496b9951ee8120a0efcc5cd12503e26770 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Mar 5 21:38:29 2005 +0000 xc/programs/Xserver/Imakefile xc/programs/Xserver/hw/xnest/Imakefile //bugs.freedesktop.org/show_bug.cgi?id=2653) attachment #2020 (https://bugs.freedesktop.org/attachment.cgi?id=2020): Cleanup Xnest usage of the DPMS dummy stub functions from dpmsstubs.c instead of using it's own copy of these functions. commit 602209990dbbc96b4c5a96e2221a418cf29e613d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Mar 5 20:47:12 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2543) attachment #2019 (https://bugs.freedesktop.org/attachment.cgi?id=2019): Fix |xf86SignalHandler()| which resets the signal handler before setting the flag indicating a signal has been caught, theoretically allowing the possibility of infinite recursion. Patch by Andrew Church <xzilla@achurch.org>. commit d995fe631a5706de93a05fda498333442af3d207 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Mar 2 14:21:40 2005 +0000 xc/programs/Xserver/hw/xnest/Screen.c xc/programs/Xserver/hw/xnest/Window.c //bugs.freedesktop.org/show_bug.cgi?id=2546) attachment #2005 (https://bugs.freedesktop.org/attachment.cgi?id=2005): Fix Xnest to update the shape regions in the backend server whenever a client changes them in Xnest (the fix is to add a new wrapper which calls |xnestShapeWindow()| before calling |miSetShape()|). Patch by Mark McLoughlin <mark@skynet.ie> commit 3f79c5eefc0d62d3a9b095472cd75b446ba2a56e Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Mar 2 11:20:30 2005 +0000 xc/config/cf/DragonFly.cf xc/config/cf/Imake.cf xc/config/cf/Imakefile xc/config/imake/imake.c xc/config/imake/imakemdep.h xc/extras/drm/shared/drm.h xc/include/Xos_r.h xc/lib/xtrans/Xtranssock.c xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c //bugs.freedesktop.org/show_bug.cgi?id=1712) attachment #2004 (https://bugs.freedesktop.org/attachment.cgi?id=2004): Add support for DragonFly/BSD platform. Patch by Jeroen Ruigrok <asmodai@tendra.org> and Mike Verona <firedragonfly@gmail.com>. commit 6c6151b2339a05c60ec58e013f915f79a3f9d756 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Mar 1 18:58:17 2005 +0000 If a context is already attached copy it instead of reattaching to keep displaylists and share displaylists Enable tracing of often called functions with GLWIN_ENABLE_TRACE ForceCurrent is a no-op now commit d323c4f59a653f364164d2a57fbbd102306a6ee9 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 1 16:57:54 2005 +0000 Minor improvement to pixel transfers in Xgl commit 2d2c1732620a83215983ee7a7dd469a1a85fcc12 Author: David Reveman <c99drn@cs.umu.se> Date: Tue Mar 1 16:34:31 2005 +0000 Add dither support to Xgl commit b4b27e9eaa43401ae70e5d03823012bf8c78848f Author: Keith Packard <keithp@keithp.com> Date: Mon Feb 28 20:45:15 2005 +0000 Force DPMS normal on screen enable Add placeholder for bit used to redirect input Add macrovision register defines commit 409c0618bced6df02eed7af77107ff74508c0f3f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Feb 24 22:53:17 2005 +0000 on WM_WINDOWPOSCHANGED raise window directly and in sync without utilizing the async windowmanager thread. Fixes some restacking problems occuring which were timing dependent Do not raise the window on WM_ACTIVATE Removed unused code for WM_WINDOWPOSCHANGING ESC is debug key. Print status but do not abort processing the message commit 775efdbd79448040b822fcc0556e98d3968ba8c3 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 23 19:17:10 2005 +0000 Bugzilla #2599 (https://bugs.freedesktop.org/show_bug.cgi?id=2599) attachment #1964 (https://bugs.freedesktop.org/attachment.cgi?id=1964): move miScreenInit in front of pScreen->function initializations to prevent it from resetting ClipNotify. commit c4b3fcda98a92c204534f04bd386ace5d3620d86 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Feb 21 03:44:10 2005 +0000 Move the draw tracing supplies into ati_draw.h, and do some touchups on it. (When tracing drawing, I want to know what I'm drawing to, at a minimum). commit de34b0eefc9f8a29147659454398cabb187c7cb6 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Feb 21 03:05:55 2005 +0000 Extend the filter support to R200, and do the check for filter settings in Check rather than Prepare, to avoid migration of things we won't be able to accelerate. commit 535c178286f94cc593b6cda753bbeb9b7cf6df4c Author: Michel Daenzer <michel@daenzer.net> Date: Fri Feb 18 19:55:35 2005 +0000 Bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) commit 2f07222106358a02f56bf1e344d1fbf7ead14cbd Author: Adam Jackson <ajax@nwnk.net> Date: Fri Feb 18 17:52:48 2005 +0000 Bug #2455: Make x86emu handle JNL correctly. (David Wong) commit 01b156240ce66703b38a67ee3cfbb475352cdf68 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Feb 12 14:55:24 2005 +0000 winmultiwindowwindow.c winmultiwindowwndproc.c Cleanup some message debugging commit 8df7126f09d6d7cb35a5912a71531cad28ba2545 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Feb 12 14:47:17 2005 +0000 win.h winfont.c winmultiwindowshape.c winmultiwindowwindow.c winpfbdd.c winshaddd.c winshadddnl.c winshadgdi.c Fix incorrect wrapping of functions. Ensure the pointers from pScreen point to the called function even if wrapped functions changed it Set the window properties to NULL to avoid referencing freed memory because of timing problems after deleting a window Do not wrap ChangeWindowAttributes. All functions are noops currently commit 676fdb03f3fb27ac24834aeb895df7d6d6e83f78 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Feb 12 14:43:07 2005 +0000 print window handle in message outout commit 046bdb17169ecb1361a42ab52043da699590d39a Author: David Reveman <c99drn@cs.umu.se> Date: Fri Feb 11 20:19:20 2005 +0000 Fixes a few problems in Xgl commit 35bd81dfec62402f9d6c68d98e651e8cd87a8758 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Feb 11 19:38:04 2005 +0000 Fri Feb 11 14:28:22 2005 Søren Sandmann <sandmann@redhat.com> When COMPOSITE is enabled, call CopyWindow even when the pixels "don't move" on screen. Don't reject modes that are not supported by the unused monitor. commit e5ccccfbd45c78c1be5e311b2cb4135a9a27540b Author: Adam Jackson <ajax@nwnk.net> Date: Fri Feb 11 06:37:38 2005 +0000 Bug #826: Make xorgconfig respect font installation outside $PROJECTROOT. (Donnie Berkholz) commit e7369daba58bb4fad5cef37fefbd851e59446045 Author: Egbert Eich <eich@suse.de> Date: Wed Feb 9 11:12:54 2005 +0000 Added PCI2Host bus translations for linux PPC and fixed fixed bugs in macros that apply these functions (Bill Randle Bugzilla #325 and #327). commit aab9a8dd99e52297ed9b40c936600429f38fe9ad Author: Keith Packard <keithp@keithp.com> Date: Wed Feb 9 03:56:35 2005 +0000 Add initial evdev framework commit a85c33b52c40fbae544c7dd40df8c8968e0cf7e9 Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 8 22:45:21 2005 +0000 update Xgl to changes in damage API. Remove some flags to support software mesa commit db2c83551cd3516800b88784c461fb33ee15aacf Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 8 22:43:54 2005 +0000 hw/kdrive/ati/radeon_composite.c Support linear filtering Change how touch screens work -- make them just another 'mouse' device. Add unfinished (and unused) code to accelerate tiled fills. commit 70d3a9192feefd54be93ea71231574c3ed815bf2 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Feb 8 15:20:01 2005 +0000 Updated fix for ABNT2 and HK_Toggle keys. commit 384099457e9d938871019ba2e5afc20280328884 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Feb 8 10:15:49 2005 +0000 Backout ABNT2 and HK_Toggle fix since it broke keys F1 and F4. commit ea5b09f95d6f25d8b0f8858c36b680055edd0da9 Author: Egbert Eich <eich@suse.de> Date: Mon Feb 7 18:16:05 2005 +0000 Save gs register before calling the vm86_old syscall thru int 0x80. This is required for linuxthreads as the TLS uses this register to keep track of local thread storage (Bugzilla #2431, J. Scott Berg). commit 4d55065b35baa7e13f6e726cb9d6675562648000 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Feb 7 15:08:31 2005 +0000 Moved keyboard layout table to external file. commit e132cb7590b5518ef1b7fce5f9151beed916fafc Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Feb 7 15:05:39 2005 +0000 file winlayouts.h was initially added on branch CYGWIN. commit c12ef1b34a55544f54401a5a66a36cd728e2f944 Author: Egbert Eich <eich@suse.de> Date: Mon Feb 7 11:56:31 2005 +0000 Check the pixel clock choosen for a specific refresh rate against the maximally allowed pixel clock when choosing mode lines for VBESetVBEMode() and VESA BIOS version >= 3.0 (Bugzilla #2486). commit 859be7a52b778df8acb676683351a6562a6d4400 Author: Felix Kuehling <fxkuehl@gmx.de> Date: Fri Feb 4 01:14:49 2005 +0000 Applied patch (id=1354) by Mike A. Harris from bug #1901: The attached patch updates a couple of PCI IDs for the Savage driver -- Debian/Ubuntu/Red Hat/Fedora. commit 5feca068d740b165d3c36a690f5a68b7588b6625 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Feb 3 09:58:47 2005 +0000 Bugzilla #1865 (https://bugs.freedesktop.org/show_bug.cgi?id=1865) attachment #1827 (https://bugs.freedesktop.org/attachment.cgi?id=1827): check for va_copy not being defined and use __va_copy if available commit 3dda2fe0e2e7e4d2c058d32fa8691d12386b978d Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 2 18:06:14 2005 +0000 Force ShowWindow if XWin was started via run.exe. Fixes mainwindow not showing bug commit e8d3da3c753677cc1ae86bc5a79f2b7eba181d74 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 2 17:17:56 2005 +0000 Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) attachment #1819 (https://bugs.freedesktop.org/attachment.cgi?id=1819): Define APIENTRY on windows to prevent <GL/gl.h> from loading <windows.h> removed leftovers from attachment #1818 commit 81b862509c87281705f8a8641c28ae2f45f15751 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Feb 2 15:03:44 2005 +0000 Bugzilla #1866 (https://bugs.freedesktop.org/show_bug.cgi?id=1866) attachment #1818 (https://bugs.freedesktop.org/attachment.cgi?id=1818): Include Xwindows.h before GL/gl.h on windows to prevent loading windows.h which pollutes our namespace with some symbols. commit b532bfb483cc8ea87c28302e3d676234cab7c3f0 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Feb 2 04:07:04 2005 +0000 Bug #1294: Make sure RenderAccel hooks get wrapped in XAA init. commit 44e2d9167943182fea530dfd7ec16aa53db20f4c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Feb 2 00:55:21 2005 +0000 xc/programs/Xserver/hw/xfree86/os-support/bus/xf86Sbus.h xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c //bugs.freedesktop.org/show_bug.cgi?id=825) attachment #956 (https://bugs.freedesktop.org/attachment.cgi?id=956): Fix build problems on Linux/SPARC. Patch by Jeremy Huddleston <eradicator@gentoo.org>. Approved in the 2005-01-31 Xorg release-wranglers phone call. commit 15c555a25df76e0e95bc8eaa2ca7ec80a7695a6c Author: David Reveman <c99drn@cs.umu.se> Date: Tue Feb 1 21:22:02 2005 +0000 Use negative stride for trapezoid masks in Xgl commit 2f0bdf77dd37d1763c4f4f409d55a6aad6031b9f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Feb 1 18:14:01 2005 +0000 xc/programs/Xserver/xkb/ddxLoad.c Bugzilla #2245 (https://bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1649 (https://bugs.freedesktop.org/attachment.cgi?id=1649): cleanup the generation of xkbcomp command lines. Allocate them dynamicly and remove unmaintainable length calculation. commit d3ca132061a861cb9292b5a95dbcb2f67695883b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 31 10:49:30 2005 +0000 winmultiwindowwindow.c Create windows with SWP_NOACTIVATE flag (updated) (Kensuke Matsuzaki) Fixes for window ordering problem (updated) (Kensuke Matsuzaki) commit 374b9aa8ce14cd20a6768519eee63948c83488d6 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 31 10:47:32 2005 +0000 Added hungarian keyboard layout. commit 8d277ceb22929fcb44f2d4def8c5b70535eb087f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 31 10:43:37 2005 +0000 winmessages.h winmsg.h winmsg.c winmultiwindowwndproc.c winwin32rootlesswndproc.c Make logging of messages configurable with environment variables commit 2982d173cad762b801869b7ceacc237afdad88d6 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 31 10:32:19 2005 +0000 resolve SHGetFolderPath dynamicly since it is not available on all Windows systems. commit 8ac3be3f6c4bcaa8c3f6080cbfe72db4967feff8 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Jan 30 21:18:46 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=1692> Remove reference to nonexistent Monitors file from xorgconfig (Report & patch from Dejan Lesjak <dejan.lesjak@ijs.si>) commit 206072c475408b8d4cfd75d897854d8478fe0905 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Jan 30 20:12:07 2005 +0000 programs/Xserver/hw/xfree86/os-support/bsd/bsd_kbd.c Fix option dontVTSwitch under *BSD, when XKB is disabled. Bugzilla #2252. commit 327922f006dcc2e30ec0391d7fa786560fcd1599 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jan 29 01:01:03 2005 +0000 Update to latest rev from http://pciids.sf.net/ Remove entries that now duplicate pci.ids Add entries for new Nvidia boards added in recent nv driver update commit d23c46dd3e2cbf84012055bad43b1bb15809a244 Author: Egbert Eich <eich@suse.de> Date: Fri Jan 28 16:13:00 2005 +0000 Modifying X.Org Xserver DDX to allow to run X with ordinary user permissions when no access to HW registers is required. For API changes which mostly involve the modifications to make the RRFunc (introduced with 6.8) more flexible please check Bugzilla #2407. NOTE: This patch applies changes to OS specific files for other OSes which I cannot test. commit 1562ec5cc3706acfac1db04366f78e4949ef5502 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jan 27 20:33:34 2005 +0000 Functions like glGenTextures and glBindTexture are in OpenGL 1.1 and can be resolved at linktime. Fixes tuxkart (at least with wine) commit 5ca5fe71119f35f1f24aeb49e2608684024d450a Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 27 05:25:57 2005 +0000 Add an OUT_RING_REG macro for use with DMA_PACKET0, which is like OUT_RING but includes debugging to ensure that the reg being submitted is the one that follows in the packet. Convert most uses of OUT_RING to it, and convert a couple of OUT_REG sets to DMA_PACKET0/OUT_RING_REG. Also, add checking to see if more registers are submitted to a DMA_PACKET0 than should be, to avoid hangs during stupid mistakes (checking for less isn't done). commit 0bd459488bf88084d703d801bfd5e79ea6d2b5a5 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 27 03:52:49 2005 +0000 Move the bailing out due to ATIUploadToScreen() being unfinished up farther, so that the traces aren't as confusing. commit a973af4a9ade68b271d0695898d72aea50d8953b Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 27 03:50:48 2005 +0000 Remove an unused field. commit 59c7005bb155393c44792d457d98d72e34bb1b51 Author: Egbert Eich <eich@suse.de> Date: Wed Jan 26 15:50:17 2005 +0000 When we tested if a PCI base address was unassigned we didn't take into account that this bar could have been the upper part of a 64bit base address. This fix makes this code 64bit bar aware (Bugzilla #2382). commit 7c3dd0a5a76bea2c64972ae19d99775b5a992513 Author: Egbert Eich <eich@suse.de> Date: Wed Jan 26 15:45:49 2005 +0000 Rewrite of RemoveOverlaps() to make the code more readable. It was virtually impossible to determine if the old code did what it was supposed to do. Also changed paradigm: Trust the based address more than the (guessed) size. (Bugzilla #2383) commit 9817582328cdafee59de616136172c2ce361a4b3 Author: David Reveman <c99drn@cs.umu.se> Date: Wed Jan 26 10:58:52 2005 +0000 Xgl improvements commit 13b5a93b70839053b9165b5087872164f0612536 Author: Egbert Eich <eich@suse.de> Date: Tue Jan 25 10:08:18 2005 +0000 Fix interpretation of 64bit PCI bases: read hi long word from the right bar (Michael Yaroslavtsev, Bugzilla #2322). commit 8813898ef6b9eb470e079bcdcffa89d1243b63b9 Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 25 06:04:21 2005 +0000 Fix R100 text by forcing the 3d engine to idle before executing more 3d commands. Add docs for the ISYNC_CNTL register, which doesn't quite do what we want. commit 33155b4fd3ce025d555f07833f96b760d5cdfbd3 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jan 25 03:37:05 2005 +0000 Finish converting RB2D_DSTCACHE to RB3D_DSTCACHE. Remove an extra pixel cache flush in the idle function. Init an extra reg for r200, and annotate the TCL_BYPASS better. Also, clean up some style nits from the last commit. commit 3b1f1508b13520626839d45185dec09a42b9ff71 Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 25 02:39:48 2005 +0000 Add tracing. Hack Radeon cache registers to use 3D addresses. Works on M6 commit 6eaca06dac037851ae5c9575048faf932ad5ffc8 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jan 25 01:40:18 2005 +0000 Fix a leak of a region when the driver's CheckComposite fails. commit 8a1bee8ea9a028eef65b8884f73a79fbe84a9f3a Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jan 25 01:38:26 2005 +0000 Silence a warning about uninitialized variable (though it would be). commit 67eeede4e16324990e1a6afc237a3f51b8edea39 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jan 24 20:44:49 2005 +0000 Bug #2004: Make DDC delay slightly longer. (Thomas J. Moore) commit 55736aa8c17f762b15e9bcd7b3f68f8680b7cb33 Author: Egbert Eich <eich@suse.de> Date: Fri Jan 21 14:25:26 2005 +0000 Alan Cox requested that we check the kernel version before we use kernel VGA font save/restore as the required features have been added to Linux 2.6.11 (Bugzilla #2277). commit d7263b11f043c8c0f83d6e05095143c70177926b Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 20 20:51:27 2005 +0000 Reinitialize offscreen memory before enabling cursor on VT switch-to commit 13c6b2f0b6c464ce11f6c332b2fa1a529bdbab01 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 20 16:22:04 2005 +0000 Add a set of macros for dealing with the repeated code to wait for a while reading a register/attempting DMA. Now it'll wait for a certain number of seconds rather than a certain number of times through the loop before deciding that it's timed out and resetting the hardware. Also, add more timeout handling, and reset the draw state after resetting the engine. commit dbe45c71590ac319250d04a2bf37ec07cd79e42a Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 20 07:28:02 2005 +0000 Use RadeonSwitchTo3D() instead of doing the WAIT_UNTIL ourselves (RST3D() also does DC_FLUSH, which may be important). commit fc43c154943fb1d277a9cffa9a4db7e76db461bc Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 20 07:09:00 2005 +0000 Add R200 XV support, and make R100 (hopefully) use linear filtering instead of nearest. Also, use RadeonSwitchTo3D instead of doing the WAIT_UNTIL ourselves. commit 77755065345eb71c997c1ff74dcfd2b2bbbf1305 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 20 01:09:48 2005 +0000 Make R200 PDMA work -- primary queue sizes are now 9 bits, not 8. commit 9bd876768b2165ec3903ad0848ae2ae950330290 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Jan 19 22:23:20 2005 +0000 Fix debugging ErrorF() so it compiles when DEBUG is true. commit ff433adba3a643512fdd44e41cd08965fab9c9cb Author: Keith Packard <keithp@keithp.com> Date: Wed Jan 19 06:35:28 2005 +0000 Prefer 32bpp to 24bpp. Fix 16 color planar mode (!) commit cbcdae5a3f7c4009121f86de52bba6c657f20fff Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jan 17 17:17:45 2005 +0000 more static server build fixes commit 79a7120983eff6fa114d4250fe01b62d4a99a612 Author: Adam Jackson <ajax@nwnk.net> Date: Sun Jan 16 01:59:23 2005 +0000 Bug #1895: Fix fbComposeGetSolid for BGR. (David S. Miller) commit 24cdd188dc3c10b56d6a7b46dafefb16c6d13efc Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Jan 14 22:07:59 2005 +0000 Fri Jan 14 17:03:40 2005 Søren Sandmann <sandmann@redhat.com> Fix from Keith Packard for bitgravity bugs in the Composite extension, reported by Amir Bukhari. commit 7db2e666e2dc9a1dba468e35e9d382e76ed8be54 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Jan 14 21:56:51 2005 +0000 Fri Jan 14 11:12:46 2005 Søren Sandmann <sandmann@redhat.com> Use mmx CopyArea in a few more places. commit 761f937fdee9ccd10ad54c1f06e12f2f102547a6 Author: Egbert Eich <eich@suse.de> Date: Fri Jan 14 19:29:18 2005 +0000 - Don't suspend Xserver on APM standby request as this seems to cause problems on may systems which don't support APM standby and might not be required as according to the APM specs the chips should receive enough power to retain its state. - Print out power state change requests to log file in all verbosity levels. - Don't change server state if no driver PM function is registered. (Bugzilla #2279) commit 16f9d2d72a2378470e9c5b31c59fa6c9a00892d6 Author: Egbert Eich <eich@suse.de> Date: Fri Jan 14 18:42:26 2005 +0000 Let the OS instead of X save/restore text console fonts on Linux. So far we relied on the generic VGA layer to restore text console fonts for us when shutting down the server or VT switching back to the text console. This has worked rather well but it has some downsides on Linux: a. Many people use fbdev as console text mode. In this case it is not necessary to save/restore console fonts as the console is running in graphics mode anyway. b. Some architectures don't have a fbdev console but require a full POST of even the primary card (ie. IA64). This posting has to take place before we even have a chance to save anything. Therefore the fonts we save are the once written to the chip by POST, not what has been programmed by the user. c. Certain chipsets utilize the BIOS to perform mode setting. This may interfer with the vga save/restore font function in a strange way. It would therefore be preferrable to let the OS - which has been used to set up the font in the first place - take care of saving/restoring the data. I will attach a patch which will do so for Linux. To make this fully functional a small patch needs to be applied to the Linux kernel. To disable this feature add: #define DoOSFontRestore NO to your host.def. (Bugzilla #2277) commit 6c0b03a2362f33ae24a2f6845ed1418c9af4b8bc Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jan 14 17:14:08 2005 +0000 Build fixes for static server. commit df4a1fa9c5cc5d54a9347a2bf4843cae87a942f1 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Jan 14 12:17:10 2005 +0000 Added copyright notice. commit 2137bc6eb9f36f4ba999023d83c637024f3a6e4c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Jan 14 08:37:30 2005 +0000 xc/programs/Xserver/afb/afbbres.c xc/programs/Xserver/afb/afbbresd.c xc/programs/Xserver/afb/afbclip.c xc/programs/Xserver/afb/afbhrzvert.c xc/programs/Xserver/afb/afbline.c xc/programs/Xserver/afb/afbmodule.c xc/programs/Xserver/afb/afbpixmap.c xc/programs/Xserver/afb/afbpolypnt.c xc/programs/Xserver/afb/afbpushpxl.c xc/programs/Xserver/afb/afbtegblt.c xc/programs/Xserver/cfb/Imakefile.inc xc/programs/Xserver/cfb/cfballpriv.c xc/programs/Xserver/cfb/cfbbitblt.c xc/programs/Xserver/cfb/cfbcppl.c xc/programs/Xserver/cfb/cfbgc.c xc/programs/Xserver/cfb/cfbglblt8.c xc/programs/Xserver/cfb/cfbmap.h xc/programs/Xserver/cfb/cfbpixmap.c xc/programs/Xserver/cfb/cfbscrinit.c xc/programs/Xserver/cfb/cfbtab.h xc/programs/Xserver/cfb/cfbteblt8.c xc/programs/Xserver/cfb/cfbunmap.h xc/programs/Xserver/mfb/maskbits.c xc/programs/Xserver/mfb/maskbits.h xc/programs/Xserver/mfb/mergerop.h xc/programs/Xserver/mfb/mfb.h xc/programs/Xserver/mfb/mfbclip.c xc/programs/Xserver/mfb/mfbfont.c xc/programs/Xserver/mfb/mfbgc.c xc/programs/Xserver/mfb/mfbmisc.c xc/programs/Xserver/mfb/mfbpushpxl.c //bugs.freedesktop.org/show_bug.cgi?id=1114) attachment #667 (https://bugs.freedesktop.org/attachment.cgi?id=667): Convert afb and cfb{,16,24,32} to be dlloader-friendly. Patch by Adam Jackson <ajax@freedesktop.org>. commit 61b3c3aef5437f14d413a60da792257b01e9f8fa Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jan 13 23:07:41 2005 +0000 Thu Jan 13 17:45:13 2005 Søren Sandmann <sandmann@redhat.com> Make sure the pixmap is a valid new resource Make sure the context is a legal new resource. Handle null attrib_list. Handle null attrib_list; copy attrib_list to data; actually allocate the new GLXDrawable. commit 433c38f22fa96486a43dc0c9871cc09875251b34 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jan 13 20:49:21 2005 +0000 Thu Jan 13 15:40:29 2005 Søren Sandmann <sandmann@redhat.com> Add MMX implementation of non-repeating source IN repeating mask, aka "translucent window". Add MMX implementation of CopyArea. Use MMX implementation of CopyArea. Use the new implementations. commit a303670107f205c6ca76919ca6cd6af6013073f1 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Jan 13 01:22:53 2005 +0000 Bug #2114: PPC64 Linux build fix: use system definition of eieio(). Originally Gentoo bug #66223. (Tim Yamin, Donnie Berkholz) commit 15895b411779aa3c14ffb92fb58cd8ec24845ea7 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Jan 12 16:10:00 2005 +0000 winmsg.c Introduce function winTrace which prints log message with verbosity 10 Use winTrace for 3 heavily called functions commit 8aabc94596dae0fd4ce2c975de75946685faf2cd Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jan 11 17:33:03 2005 +0000 Document the -silent-dup-error switch commit b6301dc41090899b20003eab1356bc09fc5eed1a Author: Egbert Eich <eich@suse.de> Date: Tue Jan 11 14:59:02 2005 +0000 Minor format fix. Added explanatory comment and debug code. Added comment. commit 27fc6874b34d70a7ddae5ed8f516f6cfaab518b8 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jan 11 12:03:34 2005 +0000 Do not grab ALT-TAB when window is in multiwindow mode commit d365664c58919edb5e121a7c884384438df79776 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jan 11 11:58:12 2005 +0000 Fix crash with not matching definitions of PATH_MAX commit 65b893a707ad8b3e4d0971825c05a965dca36d10 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Jan 10 23:38:50 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2167) attachment #1641 (https://bugs.freedesktop.org/attachment.cgi?id=1641): Fix broken Solaris print queue enumeration. commit c6b5a9431178ac7eb90ec498e6830366865d1268 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Jan 10 18:47:55 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1659 (https://bugs.freedesktop.org/attachment.cgi?id=1659): Refix for gcc4.0 build failure. It seems that the |ExecCommand()| function has no consumer and can safely be removed. commit eb701e9b4481f984fdcfece181126f7424e2bf45 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 10 17:54:31 2005 +0000 winkeybd.h Adjust keysyms for Hiragana_Katakana toggle and backslash/underscore on Japanese and ABNT2 keyboards commit 2ef9d01c4d3b03f0a5d829304f2a7e2cc1327f3b Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Jan 10 14:16:29 2005 +0000 xc/programs/Xserver/Xprint/Util.c xc/programs/Xserver/Xprint/attributes.h //bugs.freedesktop.org/show_bug.cgi?id=2254) attachment #1654 (https://bugs.freedesktop.org/attachment.cgi?id=1654): Fix gcc4.0 build failure. Patch by Egbert Eich <eich@freedesktop.org> and Roland Mainz <roland.mainz@nrubsig.org> commit 57387e115caf5a4b9501cc8f6ddeb1946b0e6547 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jan 10 13:13:08 2005 +0000 winkeybd.h winkeyhook.c Make keyhook feature work in multiwindowmode too Hook windows keys commit f417159e51afe22de7d4e6ba9f154313c6af59bc Author: Egbert Eich <eich@suse.de> Date: Mon Jan 10 12:20:33 2005 +0000 Make option 'DontVTSwitch' work again with kbd driver under Linux. The kbd driver now calls the OS layer to handle special keys. Possibly other special keys and other OSes need to be looked at also. (Helmut Fahrion). commit fe4e74241f6791cb1cefdddeb492ed0f56ce99b4 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Jan 9 17:35:47 2005 +0000 xc/programs/Xserver/xkb/ddxList.c //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1647 (https://bugs.freedesktop.org/attachment.cgi?id=1647): export Win32System and Win32TempDir remove #ifdef WIN32 block for building xkbcomp commandline create win32 tempfile in system tempdir use PATH_MAX*4 for commandline buffer unlink tmpfile again commit ba25f7e8dcaa2690ce3eab839904fac034002e0b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Jan 9 15:29:45 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2245) attachment #1645 (https://bugs.freedesktop.org/attachment.cgi?id=1645): cleanup some #ifdef __UNIXOS2__ and WIN32 blocks. make OutputDirectory check the size of the buffer quote all file and pathnames in the xkbcomp commandline use PATH_MAX*4 for commandline buffer commit 2410b61f430c3ac4be79043f8b00defe6d53148c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Jan 9 00:38:08 2005 +0000 //bugs.freedesktop.org/show_bug.cgi?id=2240) attachment #1642 (https://bugs.freedesktop.org/attachment.cgi?id=1642): Fix incorrect usage of /usr/bin/tr in startup script (the used "[\n]" is neither correct or portable, using "\n" seems to be sufficient (this fixes various "random" issues, including including Debian bug #258419 and Debian bug #264983). Patch by Drew Parsons <dparsons@debian.org>. commit 709a2343a8c12ea7e158c63a9737b11744b50994 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Jan 8 13:01:03 2005 +0000 Fix a possible null-pointer dereference (Keishi Suenaga) commit d332a909f8b8741af75047d78a62a3d19e0776e1 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jan 6 21:29:09 2005 +0000 Imakefile InitOutput.c XWin.rc winerror.c wintrayicon.c winvideo.c winshaddd.c Set PROJECT_NAME in Imakefile to create alternative window titles for Cygwin/X and Xming commit d6a74f2c4aec9c914ec0837bd0bf0d212019093f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jan 6 16:02:47 2005 +0000 Imakefile InitOutput.c XWin.rc winerror.c wintrayicon.c winvideo.c Set PROJECT_NAME in Imakefile to create alternative window titles for Cygwin/X and Xming commit 3165236483de936b4ca22f8b6d2d2b8b1a1a4909 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Jan 6 13:24:57 2005 +0000 Fix crash with non-nullterminated strings (reported by yvind Harboe) commit 591ac9c811de0871d3bdcc19cada0ff6715bf67c Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Jan 4 00:16:20 2005 +0000 Bugzilla #2211 (https://bugs.freedesktop.org/show_bug.cgi?id=2211) attachment #1627 (https://bugs.freedesktop.org/attachment.cgi?id=1627): xorgconfig default keyboard model outdated (should be pc105, not pc101/pc102) commit af8bd7161724b6709ffe582dfd830c05d9bf4f26 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Jan 3 21:32:22 2005 +0000 Mon Jan 3 12:45:10 2005 Søren Sandmann <sandmann@redhat.com> Clean-ups and support for AMD64. Bug 1067. Patch by Nicholas Miell (nmiell@comcast.net) Add support for AMD64 Many cleanups using <mmintrin.h> instead of __builin_ia32_*, and intrinsics instead of inline assembly. Also unconditionally use pshufw on AMD64. s/USE_GCC34_MMX/USE_MMX/g commit 5f39eff85109a73d006832ad35d9d5b58f93ef0c Author: Egbert Eich <eich@suse.de> Date: Mon Jan 3 15:43:55 2005 +0000 Added missing return value (Bugzilla #2205) Problem found by Stefan Kulow. commit ae6d52092bca6068a7847b3944148336ab489869 Author: Egbert Eich <eich@suse.de> Date: Mon Jan 3 15:39:35 2005 +0000 Added missing return value (Bugzilla #2206) Problem found by Stefan Kulow. commit 83e13e21c8d9a3b54cae2ecc2943be3316659870 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Dec 24 14:40:28 2004 +0000 Print error message if CreateProcess fails Simplify popen simulation code for WIN32 Remove temporary file after executing xkbcomp commit 106703edf67139fa52f6810f9ced0ce5ba86a3cd Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 22 18:39:41 2004 +0000 Back out the previous day's broken R200 "fix" -- the same number of coords are always emitted. Fix the real problem, which was not enough regs being initialized in ati_draw.c. Fix a typo that was resulting in alpha coming out as 0 * src or 0 * broken instead of src * 1 or src * mask. Assign the blending results to R0, as appears to be necessary. Unbreak the dst-alpha-blend-with-no-dst-alpha code. Yow. And set the right DMA count for the r200 traps code. commit 3035739e5b7d5a9042292d64455feb4b38788fe4 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Dec 22 08:28:16 2004 +0000 Bug #2123 <https://bugs.freedesktop.org/show_bug.cgi?id=2123> Attachment #1587 <https://bugs.freedesktop.org/attachment.cgi?id=1587> Call to uname should not check for return == 0, but for >= 0 instead commit fa0677ab43722462042f87c4636a7d59d1cb873f Author: Eric Anholt <anholt@freebsd.org> Date: Tue Dec 21 09:51:47 2004 +0000 Fix r200 render (for real this time?) by setting tex1_comp_cnt right for non-mask rendering. Reenable it. Also, R200TexFormats was used instead of R100 in one place. Harmless so far, because the formats were in the same order. commit 4b0247b9e0a6b7f40cd2738fb29d2ed1acba99e7 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Dec 21 09:49:30 2004 +0000 Whitespace nit. commit 894431412613265fd315cf7a707ffa741f93cf47 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Wed Dec 15 20:51:25 2004 +0000 Use snprintf. commit eea11301fd9247a28b1daeb340a018c7ea309c41 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Wed Dec 15 15:05:35 2004 +0000 Another fix for MiscPassMessage(): Initialize returned "status". commit 264c3eefe6c0cdee1ff0a5de914f051ab23026b7 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Dec 15 12:22:39 2004 +0000 latest changes from CYGWIN commit c7fec26b50f8a64360d1252cdf48370935fb2f76 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Wed Dec 15 00:32:56 2004 +0000 Make MISC extention's PassMessage() actually work and fix memory leaks commit d0b17bda4dc469e2ce72f4f8965916b316e1deb7 Author: Egbert Eich <eich@suse.de> Date: Tue Dec 14 08:59:20 2004 +0000 Removed #ifdef'ed out code together with the comment explaining why it was #ifdef'ed out. Fixed typo. Added comment to a changed that's been committed with one of the previous commits. commit 0e6a122316a94c96051f1d832990032a386097bc Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Dec 13 03:42:32 2004 +0000 //bugs.freedesktop.org/show_bug.cgi?id=1695) attachment #1230 (https://bugs.freedesktop.org/attachment.cgi?id=1230): Fix crash in Xscreensaver code which allowed any authentificated X client to crash the Xserver using |XScreenSaverUnsetAttributes()|. Patch by ajax@nwnk.net commit 159e443a2209eb3ea305e84b847b76ef1637d005 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Dec 13 02:13:32 2004 +0000 //bugs.freedesktop.org/show_bug.cgi?id=1688) attachment #1530 (https://bugs.freedesktop.org/attachment.cgi?id=1530): Fix the current implementation to make it possible to slow down the mouse pointer or use arbitrary fractions (without running into rounding error issues). The change is using the same method of preserving rounding errors that the exponential method is already using. Patch by Jan Brunner <Jan_B@gmx.ch>. commit f1768677f73150c686cf5678f5f5d63c0cfa8e56 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Dec 12 23:29:20 2004 +0000 Reduce vidmode logging. commit 9286a5d032ea6bed102db39281c3d2537da4dccc Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Dec 12 22:58:37 2004 +0000 Add fix for 460gx pci scan code. commit 8266a2581d21a1a2880a0e8babb8b0305c435ec0 Author: Torrey Lyons <torrey@mrcla.com> Date: Thu Dec 9 22:40:35 2004 +0000 Fix crash with more than one screen reported by John Davidorff Pell. commit 081b33d73f73572cfefba7e5489408a7117b6e9f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Dec 8 15:48:15 2004 +0000 import changes from CYGWIN branch commit 6c317c1c1323bd11292f8f9f179d75c96a18e616 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Dec 8 05:52:20 2004 +0000 //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #1287 (https://bugs.freedesktop.org/attachment.cgi?id=1287): Avoid DRI initalisation when the Xfree86-DRI extension was turned off. Patch by Kristian Hgsberg <krh@bitplanet.net>. commit b9476cd96faf19153c11e3370e9fced8045600f4 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Dec 8 05:48:16 2004 +0000 //bugs.freedesktop.org/show_bug.cgi?id=1361) attachment #938 (https://bugs.freedesktop.org/attachment.cgi?id=938): Allow more extensions to be enabled/disabled. commit 47935dd7f010f2f77768774ceb6f85667efe4264 Author: Matthew Allum <breakfast@10.am> Date: Mon Dec 6 22:29:31 2004 +0000 Xephyr on Xorg fix commit 8091b301c941473ab99626a6e66f72acdb6750f7 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon Dec 6 21:54:19 2004 +0000 xf86Config.c references USE_DEPRECATED_KEYBOARD_DRIVER so define it if needed when building this file - bug fix: pointerMsg -> keyboardMsg in auto-configuration code. - make the 'kbd' driver the default for autoconfiguration everywhere. commit cde3a175005104e061c1ff133f07c598868bdc4e Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Dec 6 18:28:12 2004 +0000 include windows.h commit 9c94971617db11861aed82e16804fc14a9ca1260 Author: Egbert Eich <eich@suse.de> Date: Mon Dec 6 15:53:00 2004 +0000 Use the same method of finding the screen pixmap of COMPOSITE extension is compiled in or not. Removed stale make variable. Updated xaaWrapper.c: Under certain circumstances the accel path was not used when possible. Removed some debugging stuff and stale code that had been commented out. Check if maps are really installed before attempting to list them. commit 4945034792b28d1a222a615404bfceaf48a130c5 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Dec 6 12:26:50 2004 +0000 problem with max() macro. this one slipped though again commit 531776becf95f66e6e435aad0dc21ead436ff5aa Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Dec 5 21:33:23 2004 +0000 missed another wBOOL issue commit 9bd1328c49aafae67a6a6d9fd17063c75d8547a2 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Dec 5 21:24:48 2004 +0000 redone ddraw.h to be able to mix it with w32api style COM header files. obj_base.h is not needed anymore. Using <objbase.h> instead. Use Xwindows.h instead of windows.h do not include win_ms.h remove extra definition of sleep() Set HOME to Documents and Settings/username if not set Use Xming basedir instead of ProjectRoot for system.XWinrc Fix callback functions to use wBOOL instead of BOOL Fix compiler warnings. Added debug output. Fix warning about undefined macro max commit bf0a760331e2fe4dbc00e78f87022c7464d9ca4f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Dec 5 04:39:34 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=1800): Fix Postscript DDX's 1bit StaticGray visual to report only 1bit of significant bits in color specification (instead of 8bits). Patch by Julien Lafon <julien.lafon@gmail.com> commit 44f4713a056b7a6a076b2f65fbed43e0cfe9ff06 Author: Markus Kuhn <Markus.Kuhn@cl.cam.ac.uk> Date: Sat Dec 4 00:43:13 2004 +0000 Encoding of numerous files changed to UTF-8 commit f264a7ea741f57fbc3bb900cfbb9e0cc23f46e90 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Dec 3 12:04:15 2004 +0000 Removed scprintf, aprintf and snprintf stuff and use newXprintf commit 16a683f4d164899ecfdafb853f48cff10fd13fd4 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Dec 3 11:57:42 2004 +0000 Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 Added X(NF)printf and X(NF)vprintf functions which allocate the buffer with X(NF)alloc Bugzilla #1865, https://bugs.freedesktop.org/show_bug.cgi?id=1865 extend snprintf to work on NULL. commit fe2a2213d1db8700f6078379f86ebe8827793c20 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu Dec 2 23:47:39 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=1998): Fix Xserver standalone build when RENDER extension includes are not availabe. commit 30a4202f3d59a32fd6f93dfd257d93ee21b68ed9 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Dec 2 21:58:58 2004 +0000 Use __printf__ in gcc function attributes to avoid clash with libc wrapper define, and remove the last bits of the old workaround. commit e62d85baa31fc853aefdef49962ad4cb86ae8245 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Dec 2 21:49:54 2004 +0000 Remove some of the ifdef WIN32 checks from WaitForSomething commit 2782b8871196ef28f9a6c84bf6c8b5086d00d5d4 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Dec 2 14:19:01 2004 +0000 Adjust the width of the rootless backbuffer to match 32 bit alignment Make multiplemonitors default for -internalwm commit 3b3e24dc4d89b471d80428dd9ad122f259b1fc81 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Dec 2 13:38:30 2004 +0000 Set HasFfs to NO Fix link order problems with mingw. Add libdix.a after libmi.a. Pass -DHAS_FFS to compiler remove inline code for ffs(). It will link to dix/ffs.c instead added declaration for ffs() commit 2620676306d1eccd24a6bf0637a60842656e6f7c Author: Phil Blundell <pb@reciva.com> Date: Wed Dec 1 19:43:29 2004 +0000 Patch from Florian Boor <florian.boor@kernelconcepts.de>: Check return value from ts_config. (TslibInit): Likewise. commit 96545d038837bbc7dc435ed7c1f631454e86cecb Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Dec 1 14:57:45 2004 +0000 Remove code which sneaked in recently. It is not proven to be correct, just a workaround and disabled by default commit 3f063fc49cc2d456359a1b0b9f36f27befdb09b0 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Dec 1 14:16:07 2004 +0000 Set XERRORDB environment variable to relocate the XErrorDB file commit 908442301478b21febab17e31aa55918eaaa5101 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Nov 30 23:43:33 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=811): Updating generated Xprt.html which was forgotten during the previous work. commit af717ae57dd6c5e6ad41b4142d62cdbb55f13777 Author: Egbert Eich <eich@suse.de> Date: Tue Nov 30 08:38:44 2004 +0000 Make Xorg the default server to install. Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside the VGA range are accessed. The ATi driver however does this to probe for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction should not be relevant to the user. Avoid recursive calls of xf86scanpci(). This function normally detects that it has been called before by checking if the PCI structure is filled out. So far if this was not the case (because PCI probing has failed for some reason) the function is traversed again. With the chipset specific PCI bus probing this can lead to an endless recursive loop as the post-probing code calls xf86scanpci() from within this function. The OS specific PCI code for Linux worked only if bus 0 was populated as it checked for the presence of /proc/bus/pci/00. Fixed to check for /proc/bus/pci/<bus_to_look_for> instead. commit 59ccc6465ca15e046ad11362ae5fbb3c71d2c148 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 29 12:34:55 2004 +0000 Fixed windows.h include for cygwin. Bugzilla #1945: Stop unnecessary reordering. commit df2f2ff5a4ebf6c5289da64bf3f572341a0f7656 Author: Phil Blundell <pb@reciva.com> Date: Sun Nov 28 23:20:17 2004 +0000 Re-read "fix" structure from kernel after mode selection, in case line pitch has changed. commit 6062f6a6e7b3c444a35e3f11b2541df2aa0066a2 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu Nov 25 22:42:51 2004 +0000 xc/programs/Xserver/Xprint/Imakefile xc/programs/Xserver/Xprint/Xprt.html xc/programs/Xserver/Xprint/Xprt.man //freedesktop.org/bugzilla/show_bug.cgi?id=811): Add missing manual page for "Xprt" (DocBook master file (Xprt.sgml) and the generated files (Xprt.html, Xprt.man). commit cbce4cf96dfa2eeecb253d73d7d9acecbc52ad67 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Nov 25 12:48:21 2004 +0000 Bugzilla #1914: fix size limit for -fp argument commit 2b75c19ea2bb76512d51e99c5c9ecb073fdb9163 Author: Matthew Allum <breakfast@10.am> Date: Wed Nov 24 17:50:50 2004 +0000 minor Xephyr fix commit a96254234fc9410944406f6ae878815cd3cfcee3 Author: Matthew Allum <breakfast@10.am> Date: Wed Nov 24 17:08:06 2004 +0000 XEphyr -parent switch fixes commit a7a07d0c71aa3f2e224cceea7e8d8348523136ee Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Nov 24 16:56:03 2004 +0000 Finally the multiwindow mode defines a default cursor commit ca4da62478a3ad86ab087245bf8eb7d7fadf31de Author: Eric Anholt <anholt@freebsd.org> Date: Wed Nov 24 09:07:58 2004 +0000 Add <sys/types.h> include to unbreak build on FreeBSD. commit da3df7522d15855fa871c45f3b8db23e7c639a44 Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Nov 24 02:45:33 2004 +0000 Remove this file and all references to the binary expiry code. Remove old obsolete include/extensions/damage.h. Include srvrv_ctrl(xfree86) in macintosh US XKB symbol file so VT switching works again on mac (#1872). Remove out of place #define's of printf to xf86printf. This definition should only be in xfree86/os-support/xf86_libc.h commit 9a26d6f39e199bad287d4e538ef75700a0102788 Author: Thomas Hellstrom <unichrome@shipmail.org> Date: Tue Nov 23 17:29:47 2004 +0000 Bugzilla #1883 (https://freedesktop.org/bugzilla/show_bug.cgi?id=1883): Fix insufficient SHM detection in XvMC local test. Removed reference to getpagesize() which caused linking problems on s390. Reported by Stefan Dirsch <sndirsh@suse.de> commit fec868bf0f67a8f62fc69d55e2ff72b6cacea6f8 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Nov 23 17:10:55 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=1204): Fix X11 test suite (caused by DAMAGE layer) failure with Xvfb when rendering text using |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28, 29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, 37, 39, 41, 43). Patch by Hong Bo Peng <penghb@cn.ibm.com> and Stefan Dirsch <sndirsch@suse.de>. commit b09f2a0495071a068c2b6b36084c974acf7aab9b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 22 16:04:04 2004 +0000 Windows does not have ffs() implementation. added one Enable RootlessSafeAlpha and RootlessAcceleration for the Windows port too commit bb43f234c5d418e064c89b928b81b53987f14e92 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 22 15:00:04 2004 +0000 Use GetTempPath for finding a place where to store temporary files on Windows commit bc7493801d1f5177d9ba3fe09accc2a2d72cfe3d Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 22 14:28:25 2004 +0000 Fixes for building multiwindow and internalwm on mingw Changed some debugging output commit 255c3c0e8ca0f402b2c327d70c8a254ba65eda03 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 22 14:12:33 2004 +0000 Xming: Place logfile in users tempdir commit 0f7874cbfc01da339cc6be221351ddffdb37805d Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 22 13:23:25 2004 +0000 Use a simple hashtable as ConnectionTranslation instead of a plain array on Windows because socket fds are not sequential and do not start at 0 commit e6bc551e3451efe4fcbb55475d6d0ff53fcc9807 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 15 18:13:41 2004 +0000 Use CreateProcess instead of system() to spawn xkbcomp on windows. system() can not handle spaces in the path component. Quoted all filenames on the commandline. commit 6618567311f41f5e237f12b4204aa32ce174a514 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 15 15:58:51 2004 +0000 Remove override of HasSnprintf commit 9826b83826190e514ed115e15691ca015780f9bc Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Nov 15 15:06:51 2004 +0000 Bufzilla #1802, http://freedesktop.org/bugzilla/show_bug.cgi?id=1802 Added mingw (Win32) port commit cecb668149e1956fb29bc89855182349122e2f4e Author: David Reveman <c99drn@cs.umu.se> Date: Sun Nov 14 23:21:29 2004 +0000 Add xglPixmapToRegion commit 343f965749af0a985573c525dc6084c2519b6ffe Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Nov 14 17:29:56 2004 +0000 Fix typos in output file. (Bugzilla #1849, reported by Yi Ren-Chen) commit 636a9e786881dd42cd6fd579e13b7895cf9f10eb Author: Phil Blundell <pb@reciva.com> Date: Sat Nov 13 18:03:16 2004 +0000 Don't leave stale pointers hanging around after ts_close(). (TslibFini): Likewise. commit 36d9e01c0d36eaf0d9cb1e77dd2908b09d55a35d Author: Phil Blundell <pb@reciva.com> Date: Sat Nov 13 16:41:00 2004 +0000 New global variable. (KdProcessArgument): Set it to TRUE on -nozap switch. (KdUseMsg): Add help for -nozap and -rgba switches. Declare. Honour dontZap flag. commit 3b0dce3620e4cce74c3a2c7f9077cc28be11740d Author: Thomas Hellstrom <unichrome@shipmail.org> Date: Sat Nov 13 11:09:23 2004 +0000 lib/XvMC/Imake Added support for automatic loading of the correct hardware XvMC driver. This involves a protocol extension of the XvMC protocol. The XvMC revision number was bumped. commit a97548b1c9bb69b5824609c1da1ad66c3a9c5065 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Nov 11 20:10:28 2004 +0000 Cosmetic fix to make xf86pciBus.c use standard min() macro. commit e5040e24f03a2fe770139e6f37acef3da48aa0f9 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu Nov 11 16:09:58 2004 +0000 oops commited wrong version previously commit e380fd548ed5452d08184723145dd992ad72288c Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Thu Nov 11 15:44:31 2004 +0000 update shared lib revisions on OpenBSD (Bug #1828). update references to xf86site.def in comments (Bug #1827). fix kbd driver for wskbd protocol and pure wscons console driver (Bug #1825). don't add '-4' to generated default file name (bug #1826). typo in resource name (XFree86 bug #1300, X.org bug #1825) commit d7f46f71d892768ea85552a0d5458b69b561fe21 Author: Matthew Allum <breakfast@10.am> Date: Thu Nov 11 14:55:30 2004 +0000 Xephyr grab fix commit 2854fa438ff721637f2e53fbafa141b3db8a9082 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Nov 9 17:06:15 2004 +0000 Bug #557: Don't use "bool" as a variable name in xf86cfg, to avoid compiler bugs. (Donnie Berkholz) commit 367b963b6333ee58e197845f1389a95ff26f108e Author: Adam Jackson <ajax@nwnk.net> Date: Tue Nov 9 15:58:41 2004 +0000 Bug #1765: Add support for R_ALPHA_SREL32 relocations in elfloader. Originally Debian patch 202_alpha_elfloader_support_R_ALPHA_SREL32.diff. (Falk Hueffner) commit 50cdff7ee2a1b448da24e85efae02237cff9b6b7 Author: Matthew Allum <breakfast@10.am> Date: Tue Nov 9 11:36:49 2004 +0000 Xephyr improvements commit 81a3b6fe27567b4f91033ece69996aa6bf8d01a3 Author: Matthew Allum <breakfast@10.am> Date: Mon Nov 8 22:39:47 2004 +0000 Add support to Xephyr for lower depths than hosts commit e494e24c508b34b144355cb380aac16abf2fb891 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Nov 6 11:56:57 2004 +0000 Wrap all mwextwm and internalwm code with XWIN_MULTIWINDOWEXTWM commit 16ee24cd994fa3f8d479c972f18c8207a5116cb7 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Nov 5 19:51:38 2004 +0000 Use ROOTLESS instead of platform specific defines. commit 64c7f8e667eef955b266c359291206c7188ce20c Author: David Reveman <c99drn@cs.umu.se> Date: Fri Nov 5 13:26:07 2004 +0000 Use UTF-8 encoding in Xgl sources commit 1d994e1d14225c1dec5251edeae40e24923a31c6 Author: David Reveman <c99drn@cs.umu.se> Date: Fri Nov 5 12:46:29 2004 +0000 Use negative strides in Xgl if pixel data have bottom-top scanline order commit 2dd76d646c517e1988897692e9ff8b6194d25c87 Author: David Reveman <c99drn@cs.umu.se> Date: Thu Nov 4 23:19:13 2004 +0000 Add working Xgl server code commit 1aef1060647d22b676a29f6dcf1ac54f9fe7ff5d Author: Kensuke Matsuzaki <zakki@peppermint.jp> Date: Thu Nov 4 11:52:22 2004 +0000 Add InternalWM mode. commit 522c878fca3bfe97cd408e37065f827c004faa04 Author: Egbert Eich <eich@suse.de> Date: Tue Nov 2 08:54:53 2004 +0000 Removing unneeded private FreeType2 symbol. Updating to EDID 1.3. (Bugzilla# 1490, Jay Cotton, Egbert Eich). Removing unneeded code. Fixed KGA handling for i810. KGA handling for chips derived from C&T chips is slightly different. The changes make the code consistent with the C&T (chips) and i740 drivers. commit 1074992c285835ca9d96d11e8352bbe2cdbc2a28 Author: Egbert Eich <eich@suse.de> Date: Mon Nov 1 16:05:27 2004 +0000 Fixed sig11 which occured when calling a CloseDisplay() after XScreenSaverSetAttributes() followed by XScreenSaverUnsetAttributes(). Caused by missing FreeResource() in XScreenSaverUnsetAttributes(). Removing unused DDC sections that caused misinterpretation of DDC data due to a missing break statement in a switch. Fixed typo: #if <-> #ifdef. commit 7e588ba9abdcc2078b6c361c81806337b8ff0827 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Oct 30 20:33:43 2004 +0000 Add -d flag for compilers like the Sun C compilers that produce dependency lists themselves. To use with the Sun compilers, add to host.def: # define UseCCMakeDepend YES # define DependFlags -cc $(CC) -d -xM (Sun bug id #4245688 - fix by Alan Coopersmith) Add Solaris to the platforms on which mprotect is run to set execute permissions when necessary. (Sun bug id #6175128 - fix by Alan Coopersmith) Internationalize digital output (Sun bug id #4119396 - fix by Steve Swales), add -bgpixmap option to set XPM file as background (originally from STSF project version of xclock by Alan Coopersmith) xc/programs/xmodmap/handle.c,pf.c xmodmap was printing line numbers which are one too low in error messages (Xorg bugzilla #1739, Sun bug id 4637857 - fix by Sam Lau) commit 612bd1c27322a69a98b59193e7d31501688359bd Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Fri Oct 29 02:07:15 2004 +0000 Add facility for catching signal 4 from driver. This can be used to check for OS SSE support. (Part 2) commit 09fdfaa28d2afe33dfadd4293b39a34da268fbdb Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Fri Oct 29 02:06:17 2004 +0000 Add facility to catch sig 4 from driver. This can be used to check for OS SSE support. (Part 1) commit b0185a4bf77a668e65e94197bdb13331680521c7 Author: Thomas Winischhofer <thomas@winischhofer.net> Date: Thu Oct 28 22:12:23 2004 +0000 Add xf86[GetGammaRamp|ChangeGammaRamp|GetGammaRampSize] to symlist in order to allow drivers to use them commit 9d4823adc8319a20d2ace3d0944ca32e300f6eeb Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Oct 28 14:23:08 2004 +0000 Import recent changes from CYGWIN branch commit db65fce04ddec1dac0d92ad3abc95ab4996bd206 Author: Torrey Lyons <torrey@mrcla.com> Date: Mon Oct 25 19:09:11 2004 +0000 Fix rootless Cygwin crash due to acceleration code illegally modifying a const structure (Reported by Kensuke Matsuzaki). commit a57e85b52357f15f52e81c8d9b310a76e0c62b3f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Oct 25 07:12:21 2004 +0000 Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1664 - RFE: Add support for the DOUBLE-BUFFER extension to the Xprint server and DDX. Additionally a "pixmap-scrubber" optimisation is added to the PostScript DDX to remove all content from a vector pixmap when a |PolyFillRect()| call covers the whole pixmap surface with a solid fill (this avoids that a backbuffer vector pixmap gets constantly filled even when the content is not visible anymore after |XdbeSwapBuffers()| has cleared the hidden buffer with the background color). commit e0cc4871491ab7a8c52749ff2c077d8f11516b15 Author: Phil Blundell <pb@reciva.com> Date: Wed Oct 20 18:06:58 2004 +0000 Add epson. Build Makefile in hw/kdrive/epson. commit 258c9016a0c966187a81f9d956766791d6e8c505 Author: Phil Blundell <pb@reciva.com> Date: Wed Oct 20 18:02:32 2004 +0000 Block SIGIO before disabling input fds. (KdEnableInput): Unblock it after enabling them again. commit cbd5fbcb7e5b802cbcff317fdc2f848043207690 Author: Phil Blundell <pb@reciva.com> Date: Wed Oct 20 08:20:51 2004 +0000 Import Epson 13806 driver from Costas Stylianou: New files. commit 0584d92b36910d42e4fba96cee5f3380eeb3b493 Author: Egbert Eich <eich@suse.de> Date: Mon Oct 18 14:21:46 2004 +0000 Made handling of DevelDrivers for x86-64 more conformant to other platforms. Compress all font encodings (Stefan Dirsch). Fixed warnings. Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and Root mode (bugzilla #1580, James Su). Added another compose key combination for the Euro symbol (Stefan Dirsch). Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian). Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian). This is the encoding that is also used by glibc. We may break other libcs - lets see who complains. Added explanation for DESTDIR to install to a different directory than /. Added some early bailouts to atiprobe if PCI structure pointer is NULL to prevent sig11. XV support doesn't depend on 2D acceleration any more. This patch removes this limitation from the NSC driver. This is a patch that I have committed to XFree86 a while ago but never ported over to X.Org. Matthieu Herrb contributed some build fixes. Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate timer. This takes advantage of the fact that TimerSet() with a timeout argument 0 behaves like TimerCanel(). Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink). Create missing links for backward compatibility to XFree86 (Stefan Dirsch). Changed comment to mention xorg. Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If you don't like it we can change it back (original author unkown). Added 'pic' to the man page rendering command pipeline (Werner Fink). Added missing return value (Stefan Dirsch, Roland Mainz) commit 77dab254402073bf96234a6b1056b2277578a976 Author: Alex Deucher <agd5f@yahoo.com> Date: Sun Oct 17 20:29:35 2004 +0000 - Add interlaced support to S3 driver (bug 332, Leo Savernik) - EmulateWheelTimeout (bug 323, Mathias Fröhlich) - single button double-click (bug 322, Rob Brown) commit 9a0cf1eb43878308c0a83e4f935933b647edc6d5 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Oct 17 10:46:14 2004 +0000 Remove some remaining AMOEBA specific code. commit 5505555c15bfa2de1f596ae0997335fdbf07eb5a Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Oct 15 22:29:40 2004 +0000 Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1647 - Fix the problem that |XpSubmitJob()| returns a random value (patch by Stefan Dirsch/SuSE). commit 60caca718d23012c4c85ce70547610fe05168342 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Oct 15 22:08:38 2004 +0000 Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1646 - Fix the problem that |PsCreateColormap()| returns a random value (patch by Stefan Dirsch/SuSE). commit 4782b2f7c10708f9662d9fc743c692d0bec85743 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Oct 15 21:43:31 2004 +0000 Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1637 - Fix problems in oid code which may cause the usage of an invalid string pointer (original patch by Egbert Eich). commit 881b5756dc96dc33f6966ec6fccd324f63559dc2 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Oct 14 23:10:30 2004 +0000 Bug #1628: Convert xf86{BusToMem,MemToBus} to PIC code, eliminating a text relocation and enabling the server to be built as a position-independent executable. (PaX Team) commit a0251ee285e1f1e28d06927d8ab7d35d59fda607 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu Oct 14 02:20:52 2004 +0000 Fix for https://freedesktop.org/bugzilla/show_bug.cgi?id=1629 - Fix crash on AMD64, regression caused by bug 1496 ("Xorg Xprt does not support "*xp-listfonts-mode: xp-list-internal-printer-fonts" to toggle the usage of printer-builtin fonts"). commit 3a055ea35b687e381da4d729dbdd0ebac47f673b Author: Vladimir Dergachev <volodya@mindspring.com> Date: Wed Oct 13 23:02:42 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.h Squash annoying warning about fi1236_dump_status commit 3364e7fbd44537b98212820fb2b1941abf0d5ef3 Author: Egbert Eich <eich@suse.de> Date: Tue Oct 12 19:13:43 2004 +0000 Set fbdev mode as the default mode on PPC (Olaf Hering). Added support for IBM space saver keyboard (Stefan Dirsch). Added support for Cherry CyMotion Master XPress (Marcus Schaefer). Change order of SetDisplayDevice(), HWRestore(), UnbindGART() and RestoreBIOSMemSize() to be exactly opposite to the Save procedure in EnterVT() (Matthias Hopf, Alan Hourihane). Fix text mode restauration by removing the assumption that the register which determines which head is programmed is set. to the active head by the BIOS (Mark Vojkovich). When I wrote the resource code 5 years ago I made some assumptions which turned out to be false: I've assumed that the bus number of the PCI hostbridge would be the PCI bus the bridge links to. This is not correct. Fixing this assumption is not easy. However I hope that the attached patch will make the system work regardless as it 'ignores' host bridges from which the target bus is not known. This should not matter at all as we really don't care about host bridges (unless we have bridge specific code which retrieves information about the bridge). Fixed server crash on reset when a structure allocated in PreInit() was freed on CloseScreen(). Fixed ring buffer lock ups that happened because the structure that contained ringbuffer data was not zeroed after allocation. Fixed numerous warnings due to signed unsigned comparisons. programs/Xserver/hw/xfree86/drivers/nv/nv_driver.c: (NVBacklightEnable): Changed the order in which the sequencer registers and the backlight control registers are written. The sequencer control register need to be written first otherwise DPMS screen blanking produces vertical bars on a mobile device. lib/Xau/Imakefile: Build libXau static library PIC so it can be linked into toolkits that would like to wrap its functionality. commit 4ab7d316eceb23c81c1b208f9291750cf6b37513 Author: Egbert Eich <eich@suse.de> Date: Mon Oct 11 09:58:04 2004 +0000 Improving DPMS handling on VT swich and server termination/abort: previous version called the driver directly and too late. Unblank secondary screen explicitely. Don't rely on the value read during register save as the BIOS have blanked the secondary head. Checking if server isn't switched away before calling sync. Sanity check for possible bugs in aother areas of the code. Fixing default amount of of allocated video memory from AGP for i810: Use 16MB if less than 192MB are installed else use 24MB (Matthias Hopf). commit ca1fda2a3f674a6d59de236612c7077387738ec3 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sun Oct 10 17:48:43 2004 +0000 programs/Xserver/Xext/saver.c Fix for XFree86 bugzilla #1224. commit fa9847aeb9094aafc3798aee1fc8379e77a18d6a Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Oct 8 00:35:08 2004 +0000 Allow rootless implementations to override frame reordering. This is used on Mac OS X when genie-restoring from the Dock to ensure that the animation completes before drawing the frame. commit d737bc3300cf1847bcea08ca781f37ee3ee62692 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue Oct 5 17:28:15 2004 +0000 Make xorgconfig ask again instead of giving up and throwing away all your answers when you give a bad file name or bad amount of video RAM. (Sun bug id 5070654 - Derek Wang) commit 75217be88ccb87a54c84e31697ffb98b5f9b8e0a Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Oct 4 05:34:32 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=661 - Xprt producing spurious characters in PS output when using the bitmap cache (Originally reported against Solaris Xprt as Sun bug id #4369307, and fixed in Solaris by Jay Hobson. commit 658b4ed81f777df2d8b9f47904de90bde1897113 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Oct 4 05:04:14 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1299 - Add more visuals to the Postscript DDX (8bit GrayScale/StaticGray, 1bit StaticGray and the basic infratructure for "deep" visuals with more than 8bits per RGB gun). commit e622b346113f65788110777d7d1b5fc436600a4d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Oct 3 23:29:21 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1496 : Fixed Xprt font handling which did not support "*xp-listfonts-modes: xp-list-internal-printer-fonts" or "*xp-listfonts-modes: xp-list-glyph-fonts" to toggle the usage of printer-builtin and glyph fonts in XListFonts*(), XLoad*Font(), etc. Additionally the Xprint DDX now explicitly list "xp-listfonts-modes" in "document-attributes-supported" (for document-level) or "xp-page-attributes-supported" (for page-level) when the DDX implements this feature (as described in the CDE DtPrint specification). commit 8b2f127ea0db2c7fee223b69f4fceee0427fb2e4 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Oct 3 15:34:33 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1416 - Fix Xprt PostScript DDX crashes when copying offscreen pixmap content to the same pixmap. commit 7b27bf869dcf02bccf730706fc451c6f4c72b1f0 Author: Vladimir Dergachev <volodya@mindspring.com> Date: Sun Oct 3 15:01:31 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Make sure formatting style is consistent within a single function. MT2032 functions are best be in separate file anyway. commit 4046653cb63f4cd752212e7cf65fad5408d8f5b8 Author: Vladimir Dergachev <volodya@mindspring.com> Date: Sun Oct 3 14:38:31 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.c Fix compilation with gcc 3.4.x Cleanup xf86DrvMsg noise. commit ebe7b3fe160259b6f19fe760d6ff4f5bb1dd4b72 Author: Vladimir Dergachev <volodya@mindspring.com> Date: Sat Oct 2 01:35:33 2004 +0000 xc/programs/Xserver/hw/xfree86/drivers/i2c/*_module.c Change version strings to XORG. commit 0d474149f1cb68a60927529f6eac611a12acf5e6 Author: Vladimir Dergachev <volodya@mindspring.com> Date: Thu Sep 30 22:58:07 2004 +0000 Initial code from GATOS. This needs to be cleaned up, for example the bt829 code is practically untouched since xatitv (which was a standalone test program). However, it all worked and was debugged over long period of time, so I prefer to to mess with these for now. New drivers: fi12xx (including MT2032 - this would be be split off later). tdaXXX msp34xx bt8xx commit 1dfafe2aeec864a9bdfd6da3324243b2be8e3a62 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Sep 29 04:17:44 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1489 - Use |long| instead of |int| for BIGREQUESTS commandline option. commit de89181444a2f2258a446fe20a25e37fd225a568 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Sep 24 02:11:14 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1453 - Fix spaces in usage output for BIGREQUESTS extension (option "-maxbigreqsize"). commit 884cb060eea2b914191c269a0c9955ed83d07ff9 Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Sep 22 23:52:39 2004 +0000 Update XDarwin project to Xcode 1.5 format and remove unused QUARTZ_SAFETY_DELAY code. commit 35a3bf13a8be96bb29dce32399c3684c6baa527d Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Sep 22 23:38:33 2004 +0000 Add option for XDarwin to track system keyboard layout changes as they occur (John Harper and Torrey T. Lyons). commit 1b3fa4d53b287cbe9d38c5f8c9fbbc2298690959 Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Sep 22 22:52:03 2004 +0000 Warning fixes. commit de68a3339b9f19630e29a17773cad060b1f65300 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Sep 22 17:20:56 2004 +0000 Allow overriding DPMS defaults (timeouts & default for on/off) from #defines/-D options. programs/Xserver/hw/xfree86/common/xf86DPMS.c Use defaultDPMSEnabled global for the default state of DPMS if not set in any config files. programs/Xserver/hw/xfree86/os-support/sunos/solaris-sparcv8plus.S Add support for required assembly inline functions for Sun compilers on Solaris/sparc. Add support for Solaris/sparc libraries. commit d7514b9162648f894211884b199ef2edc458aa86 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Sep 22 04:38:03 2004 +0000 Bug #1252, #1253, #1255, #1256: Various typo fixes from Dave Jones. commit 269012e6014d7c23bf6805ba14ca0b598cdd6313 Author: Torrey Lyons <torrey@mrcla.com> Date: Tue Sep 21 22:01:14 2004 +0000 Add offscreen GLX direct rendering with XDarwin's xpr backend (John Harper). commit 0514f8b65616d8878000764485e71384b71e3860 Author: Egbert Eich <eich@suse.de> Date: Tue Sep 21 17:57:36 2004 +0000 Merged over libXpm security fix provided by Chris Evans, Matthieu Herrb and Alan Coopersmith from release 6.8.1. Fail during initialization with error if font/fontset is not set for widget. This prevents a sig11 later when the non-existent font/fontset structs are referenced. Check if xf86Info.kbdProc pointer is really set before calling it on abort as this pointer won't be set if the new modular keyboard driver is used (Matthias Hopf). Added new libs to the bindist control files. Removed inclusion of unnecessary kernel header on Linux. This may fail in an -ansi environment. commit 814b74662103710665c0b5659a93974ad609276c Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Sep 20 08:44:54 2004 +0000 Bugzilla #1402: The last patch was broken on linux. Take definition of badSysCall out of the OS specific block. commit b600fcda38f4ab4796b5536cbedc5dee1abd25b1 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Sep 20 03:12:00 2004 +0000 Fix the R200 Render code. Composite and Trapezoids are now supported just as well as on R100. commit 908287addaff10a0f5f6f14bf06a9b85870737ec Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Sep 19 12:59:52 2004 +0000 Bugzilla #1402: fix BigFont extension if SHM is compiled in but not working. Does not access SHM and privates if the SHM syscall failed during extension initialization. commit 90ff3688cdc0c2c1b5ccdbd9cc0659b9a355e85f Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 19 10:57:31 2004 +0000 Unbreak the AGP DRI case. That was quite a pile of broken code. commit 9297c6149f83de22395503c484a2ca65dbffaf6b Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Sep 18 23:18:35 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1404 - Fixing random crashes (like in DAMAGE code etc.) in Xnest due uninitalised GetWindowPixmap. Original patch by Alexander Gottwald <ago@freedesktop.org> commit 6344bb51e2a97d9678cec2ec1dab19abfe9d9e8d Author: Torrey Lyons <torrey@mrcla.com> Date: Sat Sep 18 00:38:30 2004 +0000 Bugzilla #1032: Make rootless acceleration functions compatible with Damage. commit cedb9a8d62df3391fd89a8b05a2dd64bd098a7df Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Sep 17 21:57:26 2004 +0000 Update Apple's list and hash utility routines to latest versions (John Harper). commit b56f4532d1a5febb8df45da0e3d3ad7bf8838e5f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu Sep 16 13:22:52 2004 +0000 Remove code which prevented the use from specifying the window size in nodecoration mode. commit c4083511acd1d0f20a242b8cd3ed62629629ce8f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Wed Sep 15 17:58:50 2004 +0000 add support for mice with more than 3 buttons and one scroll wheel (Chris B) commit 516f452e78170bc643117a71bd2246a83b071316 Author: Egbert Eich <eich@suse.de> Date: Wed Sep 15 09:23:59 2004 +0000 Adding support for OS dependent probing of IA64 chipsets. Not all IA64 chipsets can be probed without OS support as probing them is only possible using ACPI. One example of this are the HP ZX1/2 chipsets: previously the code assumed that these chips were present when no other of the known chipsets could be probed. This assumption brought SGI Altrix machines with 64 CPUs to a grinding halt. commit a3aa6a2d865239c5b8f29cbd849ae3288e36b8a9 Author: Egbert Eich <eich@suse.de> Date: Wed Sep 15 09:05:22 2004 +0000 Unregistering events in XSelectInput() when unregistering IM filter callbacks may be a bad idea as others may be interested in this event. Removed the call to XSelectInput() altogether as we are in root window anyway (Lubos Lunak). Fix size of a variable that gets assigned the value of SmartScheduleTime (long) to long. This should help to prevent smart scheduler lockup on 64 bit systems due to overruns (Andreas Schwab). commit f642fc729b481c55073c75beca301b2f17881179 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Sep 14 23:21:22 2004 +0000 Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow enabling/disabling of more extensions (fixing duplicate symbols caused by previous checkin; attachment #899) commit 0d95bdfbabf4c526f6f54d6f1de8811f4e6d5d5f Author: Phil Blundell <pb@reciva.com> Date: Tue Sep 14 23:08:10 2004 +0000 Only set screen parameters if resolution has changed from current values. Patch from scoony@noos.fr. commit ba3b6fd23be5f1f900fcff57bc586e08bc524e99 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Sep 14 06:26:54 2004 +0000 Add proper PCI/AGP detection, based on Mike Harris's code for Radeon, but using the MMIO mirror of the bits instead of config space. commit d9df39ee2b5b462be87718046b16d30c231563ec Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Sep 14 00:51:25 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=1361 - RFE: Allow enabling/disabling of more extensions commit 80dc84d067c5af29e33a0c7ac62eecc8ba4e0871 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 23:22:31 2004 +0000 - Fix a segfault on VT switch with DRI. Still dies due to cursor allocation troubles. - Move the RemoveBlockAndWakeupHandlers to match RegisterBlockAndWakeupHandlers. - Enable R100 trapezoid "acceleration" when DRI is working, so that it can be exposed and worked on. commit ab50679aabdda9e6197568f745d02fe1e65c7a24 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 23:01:24 2004 +0000 Fix a bad argument missed in the previous commit for ATIDRIDMA* functions. commit 2d069b1d1950b5f6f9140e5573e349e6559251e6 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 22:21:12 2004 +0000 Move the RegisterBlockAndWakeupHandlers to before DRI initialization. The change to use that instead of manual wrapping made the DMA dispatch come after the lock had been dropped, causing lots of pain. commit 27b5a65f05c78a0b6de0d0ace4f4275d990cc3a4 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 20:31:39 2004 +0000 Reset the CCE/CP on engine reset, and make the ATIDRIDMA functions take a more useful argument. commit fcd52d276f0276490ef08af2f0d6c52ed631f130 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 20:19:15 2004 +0000 Add missing kaa.h include for kaaInitTrapOffsets. commit b5d406e8c84d8aba2b45e985e43d02c2e6770019 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 20:02:10 2004 +0000 Fix handling of is_agp. is_agp is whether the card is actually AGP, while using_agp should say whether AGP is being used as part of DMA/DRI. commit 7cab70d1cb7298035429dd8953e521a31fc6770d Author: Eric Anholt <anholt@freebsd.org> Date: Sun Sep 12 19:52:51 2004 +0000 Improve error handling, especially in the DRI case. Do some FatalErrors instead of ErrorFs for things that are really bad, and put limits on some loops. Now, sometimes instead of hanging the entire system, we (mostly-) cleanly drop to console when the card has hung. commit 0cd662ea80579c317d706ebe04971bb29d0f9b4f Author: Eric Anholt <anholt@freebsd.org> Date: Sat Sep 11 09:28:19 2004 +0000 - Add disabled WIP trapezoid code for R128 and R100. The R128 rendering is not doing an add of 1 per triangle like I hoped, and instead seems to be saturating all the pixels or something. The R100 acceleration renders pretty well, with some gaps. Note that both are slower than software due to lack of DMA to submit vertices. - Mostly fix R128 and Radeon transform support, including supporting bilinear filtering on R128. Subpixel offsets are still probably an issue (reported by rendercheck), but I want to make 100% sure about my understanding of the protocol before changing everybody, including fb. - Add support for dst formats without alpha to R128 Composite. - Remove the R128 Blend code, which has long outlived its usefulness. (I kept it around for one reason: It could be useful for the w/h > 1024 case with no mask and a non-src op. That seems pretty infrequent and not worth the trouble). commit 396100dd235105a0e2c9013f1e07e4dae0cc3404 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Sep 11 09:23:12 2004 +0000 - Don't require Imrecise mode for Trapezoid acceleration. It looks like we might be able to do Precise in hardware, so leave it up to the driver. - Add a helper function for computing a set of offsets for smooth trapezoid rasterizing using many sharp trapezoids. commit 501dcf37aac4ec9298e8c79ca65c048c362bce31 Author: Matthew Allum <breakfast@10.am> Date: Wed Sep 8 11:31:49 2004 +0000 cursor fixes commit 20918ab480c8c8285a68e9f974b0208a18acec94 Author: Matthew Allum <breakfast@10.am> Date: Tue Sep 7 19:00:04 2004 +0000 avoid ephyr breakage when tslib enabled commit 8bf6ea903be4c052c747e3e81fc977155072299d Author: Matthew Allum <breakfast@10.am> Date: Tue Sep 7 12:44:19 2004 +0000 fixes to Xephyr debug mode commit b3322257815ec4550e1634453167535b02c1bfbd Author: Kevin E Martin <kem@kem.org> Date: Fri Sep 3 23:41:21 2004 +0000 Update formatted docs. commit b2135e589baeb2ea26da50b9167feaea23bcce3c Author: Kevin E Martin <kem@kem.org> Date: Fri Sep 3 16:18:23 2004 +0000 First set of documentation updates. Include more correct fix for rootless interaction with damage (Bug #1168, Keith Packard). commit d7fef52254126aa5897a5c58faeda1f61d5b13d8 Author: Kevin E Martin <kem@kem.org> Date: Thu Sep 2 04:04:47 2004 +0000 Workaround for servers using rootless layer with damage (Bug #1168, Torrey T. Lyons). commit 0e56515aa3ebc5ee8cc33213fb22b69bb4b3a0da Author: Kevin E Martin <kem@kem.org> Date: Thu Sep 2 01:38:17 2004 +0000 Fix AGL display problems (Bug #1210, Torrey T. Lyons). commit 2753c8e2c84cc1fb6d73a05258ab7200068e7830 Author: Matthew Allum <breakfast@10.am> Date: Wed Sep 1 15:30:58 2004 +0000 see changelog commit 7c0aaa53bf8dcf3d0a8c9e78d31cf62b1766fb35 Author: Matthew Allum <breakfast@10.am> Date: Wed Sep 1 11:13:36 2004 +0000 '-dpi' fixes for Xephyr commit 16ff3a872731633b6f1f4920f793153722026189 Author: Matthew Allum <breakfast@10.am> Date: Wed Sep 1 08:31:20 2004 +0000 Actuall select events for -parent option commit 2d065c4c33b9ec17c4c791070cf8189cb57bbb9c Author: Matthew Allum <breakfast@10.am> Date: Tue Aug 31 16:33:05 2004 +0000 Added ephyr server sources commit 6ec9ecd591fba9e9b69b8ebbd2fa08c0a2beac08 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Aug 30 22:16:46 2004 +0000 Add a set of three hooks for accelerating trapezoids, and use it for the RasterizeTrapezoid screen function. These hooks will be called for imprecise, non-sharp trapezoids with A8 destinations. Note that the current main consumer of trapezoids, cairo, is requesting precise, sharp trapezoids by not changing the default Picture attributes, but gets non-sharp effects in software because fb bases its choice of sharp/non-sharp on the mask format being A8 vs A1, and cairo asks for A8. Follow fb's (poor?) example by ignoring the sharp setting and basing the choice off of the mask being A8. commit ccaf332ce3a9393715317edd3b92420c27fc94eb Author: Eric Anholt <anholt@freebsd.org> Date: Mon Aug 30 16:43:10 2004 +0000 Rather than initially place pixmaps in framebuffer based on a size heuristic, delay the decision until the first kaaPixmapUse{Screen|Memory}, and put it in framebuffer if UseScreen was called. Provides a significant improvement in cairo speeds (100% speedup in cairogears here) and is likely to improve text performance as well. commit 14b2db63e7ae0c0d356062cd15811484038f97d9 Author: Kevin E Martin <kem@kem.org> Date: Sun Aug 29 21:06:00 2004 +0000 Fix make install when BuildServersOnly is YES (Bug #1213). Fix build failures when UseDeprecatedKeyboardDriver is YES and DoLoadableServer is NO (Bug #1229, Kristian Hgsberg). Fix failure when using DLL loader and LD_BIND_NOW is set (Bug #1212, Adam Jackson). commit ac038e9cc6f7708fdd9f36494861d2f611d5a90a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Aug 29 00:48:17 2004 +0000 Don't define _XOPEN_SOURCE before including math.h on Solaris - it's not needed on older releases, and breaks builds on Solaris 10. (Same as bugzilla #189). commit 89d702763875831604751bac396c3d2400ec59b6 Author: Egbert Eich <eich@suse.de> Date: Fri Aug 27 21:44:54 2004 +0000 Fix for XV memory allocation: Also use tiled area for allocation even if it hasn't been used before. commit 971755765d6ef9cadf11127478af59189034d356 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Aug 27 21:09:23 2004 +0000 Bug #1101: Fix PaintWindow in the pixmap case when the window's origin is not at the backing pixmap's origin. Resulted in incorrect rendering in at least aisleriot, fluxbox, and KDE apps, and probably many more. While here, move the ParentRelative loop above the drawable grab -- may improve correctness with ParentRelative background origins as well. Note that the border code doesn't handle ParentRelative yet. commit 1840a50bb763d5c94195eaffa3954c1afd77a31a Author: Kevin E Martin <kem@kem.org> Date: Fri Aug 27 20:39:17 2004 +0000 Add missing reply for DMX (Rik Faith). commit f30fbc600f3e5c3b4aceafb8256594af0069f2c9 Author: Egbert Eich <eich@suse.de> Date: Fri Aug 27 20:20:54 2004 +0000 Fixed typos. commit 276cf271527b7a6f464025457e5dd452ac13605e Author: Egbert Eich <eich@suse.de> Date: Fri Aug 27 20:16:28 2004 +0000 - adding missing file commit ecd889c6ff7427b4e7d3f820586aac178a4dfdc2 Author: Egbert Eich <eich@suse.de> Date: Fri Aug 27 19:27:12 2004 +0000 Added support for LynxOS 4.0 (Thomas Mueller). Fix arm netwinder build (Donnie Berkholz). commit 7c087078694a6895a9bcbe62d091665c05a86b5a Author: Egbert Eich <eich@suse.de> Date: Fri Aug 27 12:32:14 2004 +0000 - Make DDC code more VESA compliant: when MaxClock is set to 0xFF it means 'no value specified'. Therefore setting it to 0. commit c0bff215de2d034118d06cac42e234008612204b Author: Kevin E Martin <kem@kem.org> Date: Fri Aug 27 01:15:10 2004 +0000 Fix xtest failures in Xvfb from XMatchVisualInfo test. commit 5335bc8a0657b3e378795b44698ed23020c13891 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 26 20:32:59 2004 +0000 Bug #1138: Wrap funcs in CW's GC ops as well. While this is unnecessary according to the rules as I understand them (bug #1045), not everybody follows the rules. GC funcs were being called on the same GC from within GC ops, and the cwValidateGC caused a loop in the funcs chain that resulted in a crash, notably in cwPolylines. commit c8672e7ac79c872344f287f7cc106cb5c006e619 Author: Egbert Eich <eich@suse.de> Date: Thu Aug 26 11:58:08 2004 +0000 Fixed support for LynxOS 3.1 (LynxOS 4 will follow) (Thomas Mueller). 2 commit 198e62c44b99ee0890b944f92b162387f77aa10d Author: Torrey Lyons <torrey@mrcla.com> Date: Sat Aug 21 00:46:01 2004 +0000 Documentation only update: Update XDarwin application version for release. commit 74d84d7b122802230579a4da8c2e6914d2f5f060 Author: Kevin E Martin <kem@kem.org> Date: Fri Aug 20 05:22:39 2004 +0000 Fix keyboard driver failing to initialize if DoLoadableServer is NO (Bug #1133, Kristian Hgsberg). commit bd3e6e44259155cb37f39eb2ca5e1f0de1c2ebb7 Author: Kevin E Martin <kem@kem.org> Date: Thu Aug 19 04:08:40 2004 +0000 Add missing no.*Extension symbols (Bug #1131, Aaron Plattner). commit 87842285007e9ac4f9de0349abee1fb66b7c795f Author: Kevin E Martin <kem@kem.org> Date: Wed Aug 18 21:11:17 2004 +0000 Fix CopyArea for non-redir dst, redir src (Bug #1105, Eric Anholt). commit 9223baf985778c536ce93846c431b46a0192cf32 Author: Kevin E Martin <kem@kem.org> Date: Wed Aug 18 18:41:41 2004 +0000 Fix AIX build problems (Bugs #1020, 1102, 1103, Dan McNichol). Remove old config files (Bug #1123, Jim Gettys). Remove old log message (Bug #1123, Jim Gettys). commit a45bc0df7a1c369e8429e84414ac813187c90059 Author: Kevin E Martin <kem@kem.org> Date: Tue Aug 17 17:55:02 2004 +0000 Fix DRI module loading (Bug #1057, Ronny Vindenes). Fix Xvfb at 8bpp (Bug #1091). Fix link order when building with Xprint in glxgears (Bug #1060, Alexander Gottwald). commit 75de2fe82e7da755555028a724f68b9fb9ddfb14 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 16 22:48:50 2004 +0000 Update release and date for first RC. Fix kbd/keyboard driver for DoLoadableServer NO. Revert change since it is better to set date in the config files. commit 1798cac6fa2e909c9f3df26b97ee8232a0bf1592 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 16 20:17:51 2004 +0000 Add kdb <-> keyboard aliasing when UseDeprecatedKeyboardDriver is NO (Bug #1072, Kristian Hgsberg). commit 6cac342517892a20bab6a6177f8b5742feaaed38 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Aug 16 15:48:53 2004 +0000 document broken composite in XWin commit 9aa6beb6b7e6272b05a03e0a4fd34eb8ad21bf47 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 16 02:07:53 2004 +0000 Fix banner to print out proper version information. commit 9da0c214ab5f4ee9c1610b4888f5c7c0dd2bcacc Author: Keith Packard <keithp@keithp.com> Date: Sun Aug 15 21:13:11 2004 +0000 Clip destination instead of source. Should be the same, but it looks nicer to me. Clean up transition between cheap and expensive GC wrappers by using the prologue and epilogue macros. Before, the GC would be left unvalidated sometimes which would cause all kinds of entertaining bugs against a DDX which cares (XAA). commit a68f350195c1c54034f98e2b78c2c3da70044884 Author: Keith Packard <keithp@keithp.com> Date: Sun Aug 15 19:05:01 2004 +0000 Remove debugging code which did a full tree walk on every window operation Eliminate needless (and, it turns out, dangerous) call to ChangeGC on DestroyGCPrivate. in cwSetWindowPixmap, check if the pixmap is the screen pixmap and disable the wrapper by setting the private to NULL. commit 5db70ae2575e3e8669d7a66e2218ba28e8bdfa68 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Aug 15 15:40:19 2004 +0000 Remove #error used for testing. commit 1e728c3e88f6a74b93dc11827c9fcfe7b39ca5a5 Author: Keith Packard <keithp@keithp.com> Date: Sun Aug 15 03:34:18 2004 +0000 Copy bits from parent window when allocating pixmaps so that Background == None works. Copy filter to backing picture during validation. Mark picture serialNumber when setting Filter or Transform so Validate occurs. Initialize xf86Screens[i]->pScreen to NULL so that RADEON driver doesn't crash during server reset using old pScreen. commit 943308517905d16bda1bb27cd745bd291a84dbf6 Author: Keith Packard <keithp@keithp.com> Date: Sun Aug 15 00:43:39 2004 +0000 Redraw window borders when switching window pixmaps around Make cw "own" the window pixmaps by wrapping GetWindowPixmap/SetWindowPixmap. commit 597fdae93e6e1b7e4052097baf3d91e7a134c162 Author: Kristian Høgsberg <krh@redhat.com> Date: Sat Aug 14 23:59:52 2004 +0000 More kbd fun: write out "kbd" from Xorg -configure (#1078). commit e483fe3ec384da556c31292001a86ec95c2ddc46 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 21:57:58 2004 +0000 Fix offsets again. Really, it works this time. Promise. commit e6216b48f5feee72f107348cb21bad724536ec62 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 21:36:10 2004 +0000 Fix offsets, do whole region at once by using GC clipping commit ed425d1d88a72586d5d7a4aad9d0be0b06637070 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Aug 14 20:29:28 2004 +0000 Bug #1077: Fix source copy performance problem exposed by Composite. commit cc3ad0ed4302f54318e190a2b10646337f242d40 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 19:53:36 2004 +0000 Fix clip list computation and setting to ignore clip changes to "real" GC/Picture and track serial numbers correctly when copying pCompositeClip down. commit 183c6d06455114c61f6db57ec0a084caf11ece3a Author: Eric Anholt <anholt@freebsd.org> Date: Sat Aug 14 19:51:11 2004 +0000 Wrap CopyWindow in cw, which fixes scrolling in many apps. commit e61b5d38ab30c4f73ba0d070f485a32708a03eb6 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 14 07:12:37 2004 +0000 Use XLIB_SKIP_ARGB_VISUALS environment variable to disable all depth 32 visuals. Necessary to keep Flash from crashing. Must call ValidateGC/ValidatePicture on "real" GC/Picture to ensure pCompositeClip is set correctly. Need to take the composite clip from the "real" GC/Picture and turn it into the clientClip for the backing version. Adjust pixmap screen origin to account for drawable->x/y Change debugging output a bit (disabled by default) commit 05f6329eb6f564ad4fc366d75f4ebf9f3ba4b5dd Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Aug 13 23:57:38 2004 +0000 Don't enable speedo & type1 modules if they're not being built Clean up a couple of hardcoded paths & vendor names to use defines set by Imakefile commit 3f84e4f71d9c7c560f9bef675b1cc96fa1d83b14 Author: Kevin E Martin <kem@kem.org> Date: Fri Aug 13 19:51:34 2004 +0000 Fix Xprt bug by disabling code that merges multiple audit messages (Bug #964, Roland Mainz). commit 922fd3a2e568571171dfd64a94f804350829230f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Aug 13 19:18:29 2004 +0000 Added $(MESASRCDIR)/src/mesa/glapi to INCLUDES. Removed $(SERVERSRC)/mi from INCLUDES. Rearranged INCLUDES for better readability. Removed mipointrst.h and miscstruct.h from #include since they are not used anymore. commit f63f4b768cd5ec5bffd270e448e6e51b8ad67016 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Fri Aug 13 18:24:07 2004 +0000 Fri Aug 13 19:53:10 2004 Soeren Sandmann <sandmann@redhat.com> Fix for lockups on some versions of Matrox Mystique. #687, Patch from Mike Harris. Call xf86EnableDisableFBAccess though the function pointer instead of directly. #1041, Patch from Aaron Plattner. Swap the phsyical size of the screen when rotiation. #1050, Patch from Aaron Plattner. Fri Aug 13 19:47:12 2004 Soeren Sandmann <sandmann@redhat.com> Make HAVE_FT_BITMAP_SIZE_Y_PPEM conditional on the FreeType version instead of proping it. This way it will work with the monolithic version too. #1062, Patch by Owen Taylor. commit a29bfbd3d0a5d39ccee5b83ac1ba632091b031bb Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 13 08:16:14 2004 +0000 Empty damage object when freeing pixmap. Wrap InstallColormap so that the DDX doesn't see colormaps from our ARGB visual (avoids lovely green tint to screen). Also, set visual->nplanes of ARGB visual to all used (including alpha) planes so DIX can set pixel values correctly. Translate automatic update regions correctly to account for borders When nplanes == 32 (ARGB visuals), mask in all ones for alpha values to allocated pixel values. Remove redundant fbAddTraps declaration Fix fbCopyWindow to work on non-screen pixmaps (not needed yet) Replace broken clipping code with that from modular tree. Respect subWindowMode. commit 24bed5cff908a6f8b1857e3dadac22d6db54c69e Author: Eric Anholt <anholt@freebsd.org> Date: Fri Aug 13 07:47:21 2004 +0000 Fix copy'n'paste-os of x/y in CopyPicture for AlphaXOrigin and ClipXOrigin. commit 5825e4559e7aaf3b40205a0dca49a785c8de7b92 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 12 23:14:50 2004 +0000 Fix after Mesa 20040812 merge: revert glxext.h to vendor branch, and fix bug #1022. commit 2889ad2cb8827f20b6d69da4fe99db33bf9c5ff2 Author: Torrey Lyons <torrey@mrcla.com> Date: Thu Aug 12 20:24:36 2004 +0000 Fix crash in rootless XDarwin due to rootless being initialized before damage extension. commit 961333143e2df3e3f33e8624fc61e79cf3e86cd1 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 12 08:45:33 2004 +0000 Apply a kludge to initialize the composite wrapper before DamageSetup. If not, DamageSetup will wrap some operations first, and the cw initializes during ExtensionInit, so cw comes higher in the wrapping chain. cw going first will result in damage getting confused when the drawables get changed around. commit 6e0228722cc2fa37a0e2359bc3dab3646e36c4b7 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 12 08:11:59 2004 +0000 Fix various cw issues, including a couple reported by deronj: - Fix wrapping of GC ops/funcs according to policy described in bug #1045. - Remove ValidateGC/ValidatePictures on the redirected drawables/pictures -- it's not needed, and DDXs shouldn't be seeing redirected drawables in render or GC ops/funcs when cw is running. - Mark all GC/Picture state as dirty when moving from redirected to non-redirected, since it hadn't been passed down in Change* or Validate* while redirected. - Remove CreatePicture wrapper that didn't do anything. - Comment on why AddTraps wrapper isn't needed. commit 789cf3ed846045d91f950cb177ef6bae4c8966fc Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 12 07:57:03 2004 +0000 Fix some issues reported by deronj: - Hopefully fix a crash in compCheckRedirect on unrealizing windows. - Remove an extern that doesn't point at anything. commit 1a073786e0159a80ac3b8772a1d89b0618a8ff33 Author: Kevin E Martin <kem@kem.org> Date: Thu Aug 12 05:11:57 2004 +0000 Update version and date for next snapshot commit 47ee5f4ba72f0e0bc92a5e04073c70808e85fc08 Author: Kristian Høgsberg <krh@redhat.com> Date: Thu Aug 12 01:57:51 2004 +0000 Add call to SourceValidate() when pDst == pSrc, so misprite.c get a chance to remove the sprite before the area is copied. The drivers handle pDst != pSrc (#1030). commit 09d0056b8bc103f67a35980934f03d28fed51164 Author: Adam Jackson <ajax@nwnk.net> Date: Thu Aug 12 01:30:57 2004 +0000 Wrap the Propolice fix in #ifdef __SSP__; Propolice doesn't define this yet but an RFE has been submitted upstream. commit e30c22dbbffa2605f8d7ac010c8208a135a2293a Author: Adam Jackson <ajax@nwnk.net> Date: Thu Aug 12 01:16:36 2004 +0000 Back out the propolice fix for a second, it causes linktime errors. commit 9d0213525f4f692c250f10309146fe9db76ba12d Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 12 00:09:30 2004 +0000 Paint to parent window instead of parent window's pixmap (helps for servers that don't have a pixmap for the root) Fix offsets for render drawing. commit c7bc76f663008119b3681d4b7adef7dc9ffdc236 Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Aug 11 23:53:36 2004 +0000 Fix leftover XF86_VERSION_SNAP macro. commit eb607030e32cbad846696a20cfb3045c5f8f65c1 Author: Adam Jackson <ajax@nwnk.net> Date: Wed Aug 11 23:10:02 2004 +0000 Teach the loader about the extra symbols needed for Propolice-protected modules to work under elfloader. From Travis Tilley (Gentoo). commit fd439afdfe7ba451aff19b62d1764e4dfd0b782f Author: Keith Packard <keithp@keithp.com> Date: Wed Aug 11 22:40:14 2004 +0000 Add COMPOSITE change to fbCopyWindow (not needed yet) Xnest was half-using midispcur and doing a bad job of it. Replace all of that code with mipointer which does a lot of the work. Support DDXen which don't provide GetWindowPixmap, or which return NULL for the root pixmap. commit f95293e5253904883d3b40f9e68e6175247754a3 Author: Kevin E Martin <kem@kem.org> Date: Wed Aug 11 22:27:50 2004 +0000 Fix bogus contact address in Xserver/os/util.c (Bug #738). commit 56520ecd5ceb9526541c241634b467eba6a8f7cf Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 11 22:13:01 2004 +0000 In CopyPicture, add missing call to ChangePicture to notify about the changes that CopyPicture has done. commit f77f1d50723aceb5059a96f7a4068046b7961c51 Author: Kevin E Martin <kem@kem.org> Date: Wed Aug 11 21:14:18 2004 +0000 Apply PPC64 build patch (Bug #303, Mike A. Harris, Alan Coopersmith). commit 3dbaeb2e126d9424b21df91f0be9129c4eea6f1b Author: Kristian Høgsberg <krh@redhat.com> Date: Wed Aug 11 20:25:13 2004 +0000 Patch xorgconfig to generate config files with correct keyboard driver; use "kbd" by default, "keyboard" if UseDeprecatedKeyboarDriver is YES (#1040). commit ca458e3c9b25c3efc10532eb8e31bdcff44dc321 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Aug 11 13:55:03 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=492 - /etc/init.d/xprint did not source xorg.conf for font paths additionally to xfree86 config files commit 81881b96861d707b0729e0146a4b53b3dd234885 Author: Kevin E Martin <kem@kem.org> Date: Tue Aug 10 21:37:35 2004 +0000 Update version to 6.7.99.1 and fix problem with snapshot string generation. commit 21c7c8cdc7d2f607177634601cef8b0290fb0e80 Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 9 22:37:22 2004 +0000 Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339, Harold L. Hunt II, Alexander Gottwald). Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, David Dawes). Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). Fix attempt to read video ROM before enabling it (Bug #843, Ivan Kokshaysky, Mike A. Harris). Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. Harris). Clarify xset man page description of how to use the keyboard repeat rate settings (Bug #846, Mike A. Harris). Fix problem where print-screen key would get remapped to sys-req in certain keymaps, which broke GNOME printscreen functionality (Bug #847, Owen Taylor). Fix several render problems: - MMIO mode support - Hang on IGP chips - VT switching hang - 3D render corruption (Bug #922, Hui Yu). commit 26847ef9268f687c4f45f3d048eff4b06c2ba3bf Author: Kristian Høgsberg <krh@redhat.com> Date: Mon Aug 9 03:40:50 2004 +0000 Move the new render symbols to dixsym.c instead so they are grouped with the other render symbols. Initialize screen_x and screen_y to 0. This fixes a problem with the new Damage based sprite, where intersection test against the root pixmap would fail because the two fields were not initialized (damage.c, 166-170). commit 57eab4dc87670da42e645a4c341d1ee661b43b5b Author: Kevin E Martin <kem@kem.org> Date: Mon Aug 9 02:08:35 2004 +0000 - Fix building without Xfixes extension - Fix building without Xevie - Fix building without DPMS - Fix "Extensions" section config file support to accept general boolean options commit a2e51b13ea5a2e5fc5626905b6c2caac6358eb11 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Aug 8 20:56:56 2004 +0000 Disable legacy keyboard driver "keyboard", unless USE_DEPRECATED_KEYBOARD_DRIVER is defined. Print warning if the old driver is used. commit 3431692bf44e7be01187b421cfb0e46131c5e4c7 Author: Kristian Høgsberg <krh@redhat.com> Date: Sun Aug 8 17:02:19 2004 +0000 Add new render symbols to list of exported extension symbols so DoLoadableServer works again. commit 1e694d2b51a954d1bc4afdde390723e9a1a5b9bf Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 7 01:23:07 2004 +0000 Fix minor timestamp lossage in mieq. Replace miSprite implementation with Damage-based one. Otherwise damage and misprite conflict causing looping. Change pScreen usage around a bit to eliminate warnings commit 45fde3b041c071ae5a604cefbbfa4da5c1e828f8 Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 7 01:19:01 2004 +0000 Eliminate mfb support. Fix visuals to match "normal" PC hardware (making lightpipe work). commit 2bdbc2c0d39b1618440a6a8ed1c38a11703e898c Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 7 01:02:41 2004 +0000 Clean up cw initialization, make sure wrappers re-wrap on exit. commit cff0043a347ba06e8ab16a84a35c99794b45149b Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 7 00:58:21 2004 +0000 Remove alpha-related fields from visual structure to retain binary compatibilty. Applications using ARGB visuals will need to use Render or other mechanisms to compute pixel values instead of AllocColor commit 196aafb19a3cfdc8c21f9bf75814cf0d84ff4446 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 6 23:42:10 2004 +0000 Add RenderAddTraps. Rewrite trapezoid rendering code. commit e847bcda0827ffb87689a0162c648570de6d6f69 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Aug 6 00:31:28 2004 +0000 Fix missing ';' in cw.c and unwrap the render wrapper properly. commit ae1580c494fde2b56f9faa40f7ebcf637728efc8 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Aug 5 18:24:58 2004 +0000 - Add a new Render function, CopyPicture, which will update a picture with the flagged bits from a source picture. Approved in principle by keithp. - Use CopyPicture and SetTransform to update most of the backing picture's state in the composite wrapper. Filters are still missing. - Don't allocate a picture private, now that we calculate clipping properly and don't need the serialNumber or stateChanges. - Use the format of the source pixmap rather than generating the format from the window's visual. - Wrap the rest of the Render primitives that were stubbed out before. commit 73e14bd611fa7eac649a2b4c7964959d9eae887b Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 4 23:18:38 2004 +0000 - Always validate the backing GC in cwValidateGC, not just when the clip list changes. - Use FillTiled instead of FillSolid for painting tiled border/background pixmaps, and don't needlessly change the scratch GC's defaults. - Use the preferred dixChangeGC instead of DoChangeGC. - Simplify a silly loop and clean up a couple of comments. commit d240c41a3ab9cde9921cc96cf86e630ca5c9005a Author: Egbert Eich <eich@suse.de> Date: Wed Aug 4 12:21:48 2004 +0000 Optimization of CJK rendering when using versions of freetype prior to 2.1.8 (Chisato Yamauchi). A small backward compatibility fix to make the freetype module build with freetype version < 2.1.7. Fixed/added some debugging code. commit 751fd11a9ad1a473d7311362246b0869a008001b Author: Eric Anholt <anholt@freebsd.org> Date: Wed Aug 4 10:05:37 2004 +0000 - Add two new XAA hooks, SetupForCPUToScreenTexture2 and SetupForCPUToScreenAlphaTexture2. These add a dstFormat argument after the previous format argument, which the driver needs to use to properly set up the destination format. Two new arrays are added for the list of destination formats supported that correspond to the previous format arrays for sources. - Make Render acceleration only occur when the new hook for that acceleration type is supplied and the dst format list is set, along with the src format list being set. Without knowing the destination format, the Render acceleration couldn't properly support all the destinations it might encounter. - Bump XAA module minor version. - Update the Radeon Render acceleration to use the new hooks when the XAA module is sufficiently new. Fix a bug in the src/dst alpha booleans for ops, and use them to set blend_cntl to support destinations without alpha. Add missing PICT_a1r5g5b5 texture format, and add list terminator. (!) commit 9c1d52a69db841ac85ef97d7223361b83a66ae29 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Aug 3 10:12:25 2004 +0000 Merge from CYGWIN branch 2004-08-02 Kensuke Matsuzaki Fix the bug that we can't copy & paste multi-byte string to Unicode-base Windows application. Rename fUnicodeSupport to fUseUnicode, because it don't mean wheather Windows support Unicode or not. commit defcfe3c7ee3e39ef02da08b7227b758dbede325 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Aug 3 09:33:54 2004 +0000 programs/Xserver/hw/xfree86/ddc/xf86DDC.h programs/Xserver/hw/xfree86/vgahw/vgaHW.c programs/Xserver/hw/xfree86/vgahw/vgaHW.h programs/Xserver/miext/shadow/shadow.h programs/Xserver/miext/shadow/shpacked.c programs/Xserver/miext/shadow/shplanar.c programs/Xserver/miext/shadow/shrotate.c Fix glitches in pointer to functions declarations. commit e6d0b18c24f7f84aabed763be1cc8414883fab95 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Aug 3 08:52:17 2004 +0000 Fix declaration of XAACachePlanarMonoStippleProc. Rename XAACachePlanarMonoStippleWeak to XAAGetCachePlanarMonoStipple() for consistency with other parts of xaa and fix forward declaration in xaalocal.h. Fixes last comments on Bug #962. commit bfbb40c28ce6e98c82973bd96054d4787579eaa6 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 3 05:49:48 2004 +0000 Major improvements to Composite wrapper. Several issues remain, but it now appears stable in limited testing. - Allocate the picture private, avoiding segfault. - Wrap PaintWindow to draw the background/border to the backing pixmap (based on Deron Johnson's comptran.c). - Set the x_off/y_off returns to translate coordinates properly. - Don't bother allocating temporary areas for the modified coordinates. Layers above are responsible for handling lower layers changing the arguments, so cw doesn't have to worry about it. mibstore.c has to do the allocation because it calls down twice (front buffer and backing store). (Suggested by keithp) - Handle the mode argument to PolyPoint, Polylines, and FillPolygon. - Remove some dead elements in the cw privates. - Kill a prototype warning in compinit.c by adding the cw.h header. commit b7ba272da0910c6558f71cfedd0bf9836fc892c1 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Aug 3 05:39:19 2004 +0000 The Damage extension has to wrap after (be called before) the Composite extension so that the redirecting of drawables by the wrapper doesn't confuse Damage. commit d112e55992e9e03e74fdf5738c8c47cd90033a37 Author: Adam Jackson <ajax@nwnk.net> Date: Tue Aug 3 02:44:23 2004 +0000 Bug #962: Remove LoaderSymbol calls introduced by the dlloader work so DoLoadableServer NO builds work again. commit 734cb34dc1697530ecd971b84e1061ed86b4c2a4 Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Mon Aug 2 21:15:30 2004 +0000 Mon Aug 2 21:49:33 2004 Soeren Sandmann <sandmann@redhat.com> Remove double cast. commit e6b9cc79c204420117a1f7b23d131ec24923d612 Author: Egbert Eich <eich@suse.de> Date: Mon Aug 2 19:35:07 2004 +0000 Removed distro specific stuff. Fixed FreeType module to build with FreeType versions older than 2.1.7. Fixed typo. Added vtSema to protect call of driver DPMS function. removed unneeded variable Modified RandR driver hook to reduce the number of function calls to one. Function is sufficiently generic to be extended in the future. commit b759da83ae62a897b7727d9180a68b962b571286 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun Aug 1 16:16:18 2004 +0000 added README for Cygwin/X This file currently contains the Cygwin/X specific release notes from 6.7.0 and a first collection of what will make up the release notes for the next release commit d638a50f3f039d84d86c00696d7d3ec22560bc3c Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Jul 31 18:33:56 2004 +0000 adjust prototype for winInitCmapPrivates to match Egberts change. commit 488be6611919af97d7e4f8b0994487882eb78e18 Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 31 09:41:27 2004 +0000 Fix typo commit 383b6b59864098b03d991628ff5933d997793ea1 Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 31 09:14:06 2004 +0000 Add "Extensions" section support to configuration parser commit d690556d496c7331bd112903a0c9e6553c7d3342 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 31 08:24:14 2004 +0000 Integrate COMPOSITEWRAP branch including composite wrapper. This code still has several issues, including: - CopyWindow and PaintWindow wrappers missing (will be done soon) - Some segfaults seen in the Render wrappers. - Xprt server build breaks with Composite. - DDXs must be recompiled for Composite due to VisualRec size change. - Composite bugs pointed out by Deron Johnson in email. Also, reorder XFixes initialization according to comments by Keith which are also in xserver CVS. commit 8763cca7f9927bd6c9caf804bf09dcfea929eed0 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 31 07:26:50 2004 +0000 Update xfixes server code to major version 3 from xserver CVS, and perform minor diff-reduction versus xserver CVS. commit 25bd6ff4a622d09fb0c247b7c40281744c61431e Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 31 04:23:21 2004 +0000 Add new extension enable/disable feature. This code is a small step in the right direction -- i.e., moving towards full run-time config of extensions. Currently, only XTEST, XINERAMA, RENDER, XKB, and XEVIE are supported. commit 326729ebca863c99cf913445126294a3c6d3db5d Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 31 01:48:27 2004 +0000 - Add some XFIXES bits apparently missed in the DAMAGE-XFIXES merge - Add missing XCSECURITY ifdef. - Sync some whitespace to xserver CVS and surrounding style. commit 370bda820b2912b93dcc34c088075f8e65a9e5cb Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 31 01:38:46 2004 +0000 Integrate latest damage bits, including the addition of Composite code. Includes REGION_INIT -> REGION_NULL necessary to avoid segfaults with inlined region macros. commit 7542d8a17ad469f9c760f0f843bd6a4fb6deb57d Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Sat Jul 31 01:37:47 2004 +0000 Turn on XEVIE https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: miinitext.c commit b2065f376b932e49f1f96dfb92ddb52d15796abe Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Sat Jul 31 01:34:26 2004 +0000 Integration of XEVIE branch to trunk, latest updates https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: Imakefile xevie.c commit e68bfc801680f2852c59099aa3d7502e49b48b2c Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Sat Jul 31 01:33:40 2004 +0000 Integration of XEVIE branch to trunk, Some updates from latest reviews https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: events.c commit 706b2a7e02aa0085769fb87782118488d0f90eaa Author: Adam Jackson <ajax@nwnk.net> Date: Sat Jul 31 01:21:19 2004 +0000 Change several LoaderSymbol calls introduced by the bug #400 patch to *Weak() resolver functions. commit 9e13805b02f37497971c789b4035abc29463c550 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sat Jul 31 00:44:45 2004 +0000 adjust prototype for winInitCmapPrivates to match Egberts change. commit 4da507a03fd5659e5944d9e47dd2f8920636383b Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 31 00:32:43 2004 +0000 Fix compiler warning commit 64a6d3e9c84a36b4e0550d112f288b695c5056cd Author: Hui YU <hyu@ati.com> Date: Fri Jul 30 22:20:21 2004 +0000 Support for New radeon chips: R420/M18, R423, RV370/M22, RV380/M24, RS300. Add special handlings for DELL triple-head server (RV100). Misc. bug fixes for flat panel, host aperture, etc (Bug #946) commit d3c98fed2c37a863a6765a3e288bcdbc2738878a Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 21:53:09 2004 +0000 Add support for on-the-fly screen rotation when supported by hardware (Aron Plattner). commit 4baf0029418d3eeeac5d1026a7cfea3234e44e48 Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 21:46:38 2004 +0000 An experimental pseudocolor emulation layer. Not fully completed, currently only works for 16bpp. commit 63a152f7812d0981e3e7aa41a42e59cd0c3e50dc Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 21:39:20 2004 +0000 removing some unnecessary restricitons on the allowed visuals. commit 0ba15599466ddb644728c6b68e64e05b1317ac2e Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 21:10:46 2004 +0000 Adding a colormap index to the InitColormapPrivate() func call. Without it it was completely useless. test if colormap with index really exists in the list of installed maps before using it. commit bbfe7bed3fe4d9bd089327cd59e6faedb592dabb Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 20:56:53 2004 +0000 Set DPMS to ON when VT switching away or shutting down the server. Failing to do this may leave the text console blank. commit 40b975e3acb11c1ec2fd4c5984f5efa20b669489 Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 20:51:09 2004 +0000 Improved error messages. build fixes for AMD64. Made shm* functions in the libc_wrapper more standard conformant by setting errno correctly. Use xf86ExendedInitInt10() in VBEExtendedInit() to be able to pass flags. commit 7643199de1c4f12a2aadeaf2d539a37ddb45672b Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 20:38:27 2004 +0000 Fix static build. add i845 to the list of chips that allow memory size tweaking. commit 48514fee3c8ec26f36e142ffc9272e510b9a4238 Author: Adam Jackson <ajax@nwnk.net> Date: Fri Jul 30 20:30:57 2004 +0000 Bug #400 (partial): Driver fixes for the dlloader. When using dlloader, all framebuffer formats except cfb and the overlay modes should work, and r128 and radeon need to be loaded from the ati driver (both issues to be fixed soon). Tested on i740, s3virge, mach64, tdfx, vesa, and vga drivers. elfloader users shouldn't be affected. commit 29012adb37c533f57c684ad94c4d83a6c31793e5 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Jul 30 19:28:03 2004 +0000 Add generic rootless layer documentation missed from last commit. commit 784e4d1cc02dea837a38a4140a18013953296366 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Jul 30 19:12:18 2004 +0000 Merge many XDarwin improvements: - Fix launch of X clients by double clicking in the Finder when there is a space in the path (Torrey T. Lyons). - Interpret scroll wheel mouse events correctly when shift is held down (Benjamin Burke). - Add option to always use Mac command key equivalents (John Harper and Torrey T. Lyons). - Add support for dynamic screen configuration changes in rootless mode (John Harper and Torrey T. Lyons). - Add documentation on generic rootless layer (Torrey T. Lyons). commit c2275b31adc3c4292c171055db16e00ee0e69e43 Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 19:04:14 2004 +0000 Removed bugs on TweakMemorySize() which prevented it from working at all. Initialized last element of BIOS version number string to 0 to avoid random problems. commit 5ed0aefc67e86abaddf1b6bffdc832996b86fb46 Author: Egbert Eich <eich@suse.de> Date: Fri Jul 30 18:40:36 2004 +0000 Fixed typo in a comment. Deleted bogus comment. Added debugging support. commit d380647739e4767da69edc44bbb441b3b9554b03 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Jul 30 18:22:13 2004 +0000 Add initial Xinput support for XDarwin (Greg Parker). commit 41641c11ec8994f1bc4bd1b05ae2cb38167c8312 Author: Torrey Lyons <torrey@mrcla.com> Date: Fri Jul 30 17:37:09 2004 +0000 Make XDarwin not default to StaticColor on ix86 (Shantonu Sen). commit f4c84e7dbf0f25a2544d4400e600310421683f3c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Jul 30 12:03:56 2004 +0000 Fix for http://xprint.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=940 - Filter /etc/init.d/xprint throught CPP/|MakeScriptFromCpp()| to allow platform-specific customisation. commit ed923a42b800e3f701084ef5828cabbbefe8361f Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:41 2004 +0000 file cw_render.c was initially added on branch COMPOSITEWRAP. commit 69e379ddaf85feda6a163b5f4e855ffe86b254df Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:41 2004 +0000 file cw_ops.c was initially added on branch COMPOSITEWRAP. commit 0ee93acd103af947fef0a28e32b5b3f2857789bf Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file cw.c was initially added on branch COMPOSITEWRAP. commit 3bdaa0e7fa7b6f5d550907d5fe7d0fb16c53e243 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file cw.h was initially added on branch COMPOSITEWRAP. commit 94e1ea569171334eb40a2d4a63138c02915203db Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file compwindow.c was initially added on branch COMPOSITEWRAP. commit 705536d04c4f09c84bb04827c07bb899584f399d Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file compinit.c was initially added on branch COMPOSITEWRAP. commit b80dbd886d7cc3a72772f3231a8c8e8df7f6679f Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file compalloc.c was initially added on branch COMPOSITEWRAP. commit beb26caf68d3e25bf85fd63dbb499eca4b1f05ba Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file compext.c was initially added on branch COMPOSITEWRAP. commit 97afc846003bb521cf9d6e92b298024d83db8759 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jul 30 06:54:40 2004 +0000 file compint.h was initially added on branch COMPOSITEWRAP. commit 854c1afa867ff617b47c4cde3cfd86bd26e9931a Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 30 04:44:13 2004 +0000 Fix "DoLoadableServer NO" build commit 71164d118c192e96eb2b0fc45514233e9563a568 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Fri Jul 30 01:21:57 2004 +0000 Integration of XEVIE branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: cursorstr.h input.h inputstr.h windowstr.h commit 82a6a659248bb66a0364eb9eaf331747834fb5c6 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Fri Jul 30 01:20:42 2004 +0000 Integration of XEVIE branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=947 Modified Files: Imakefile Added Files: xevie.c commit dd7077cadcdc323e1a301ed5eefa7ff12599aa4d Author: Kevin E Martin <kem@kem.org> Date: Fri Jul 30 01:15:57 2004 +0000 Cleaned up code since client's saveSet is no longer defined as a pointer* (forgot one change in previous check-in) commit 813d75f9d3c7b540977926e37310fa683daf12e1 Author: Kevin E Martin <kem@kem.org> Date: Thu Jul 29 23:43:40 2004 +0000 Use LibraryTargetName when not building a loadable server Move extern function declarations to window.h Cleaned up code since client's saveSet is no longer defined as a pointer* Added externs back in Change #if to #ifdef to fix compiler warning Add function declarations that were inadvertently removed by previous check in Disable extensions that are not (yet) supported by DMX commit 274d5044ac41523ff23912c223177c429c710e09 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 18:49:42 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 Modified Files: Imakefile miinitext.c commit 406c49eb810cbdcfd833cac4eeaa465598238691 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 18:46:37 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 DAMAGE calls some shape functions. Modified Files: Imakefile shape.c commit 0bca00e1205bf1a4537cbf7be6339b3b1f9b953f Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 18:43:58 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 Modified Files: dispatch.c dixutils.c events.c window.c commit d4a101d4ef9943dcddf08b00b2d3ab4319597193 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 18:37:54 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 These RENDER changes come from the experimental freedesktop tree formerly known as "Xserver". Partly motivated by compatibility with DAMAGE as pulled from that tree, also some of the code just is better implemented. Modified Files: filter.c picture.c picture.h picturestr.h commit e1281790bb3d7cdcc5de85829806dd53da67e326 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 18:16:56 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 Modified Files: cursorstr.h dix.h dixstruct.h regionstr.h window.h commit d2f798b6dbaebd0300f42c2e083a962c37647620 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 14:42:24 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 Added Files: Imakefile damage.c damage.h damagestr.h commit 682ee8a9f8d55c6a6f517a277d1bfad2a0f28594 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 14:40:33 2004 +0000 Integration of DAMAGE-XFIXES branch to trunk https://freedesktop.org/bugzilla/show_bug.cgi?id=859 commit 6ed1c3845517c7731dcc74baa51bb801838afaff Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Jul 29 14:33:43 2004 +0000 bugzilla 859 -merging DAMAGE-XFIXES into trunk commit 736e511824c4f5e77e637c680a4e45f0b7631644 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Jul 28 03:57:19 2004 +0000 Fix shared reqs for Xlibi18n, Xaw6 & Xmu for Solaris Improved support for Compose and Kana Lock LED's on Sun keyboards Add event definitions for additional keys on Sun Japanese keyboards VUID mouse protocol support for Solaris Make default mouse message clearer on machines that use a default other than /dev/mouse. commit d374dffb20364a3df184cc28888ee7edbe50f474 Author: Rik Faith <faith@alephnull.com> Date: Wed Jul 28 00:28:00 2004 +0000 When using DMX console input, make detached screens display as grey (vs. white for attached and black for dead-space). commit 1498414cc85c148ef15b9b57d9f9b6b850bf2702 Author: Torrey Lyons <torrey@mrcla.com> Date: Tue Jul 27 20:26:47 2004 +0000 Fix Xprint build on Darwin. commit ddd58356123f61b863754eb0bdd42a8defa0461b Author: Torrey Lyons <torrey@mrcla.com> Date: Tue Jul 27 20:24:00 2004 +0000 Fix XDarwin's broken build of libGL and server side GLX. GL library is only known to build correctly on Mac OS X 10.3.4 and still needs some work for earlier versions. commit 8ef3e7052e8e1db869411e9f6fc88491e3f05474 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 27 09:53:14 2004 +0000 Merge latest changes from CYGWIN branch Use find | xargs combination instead of simple shell globbing to prevent commandline argument overflow commit a12a678bc9af8df1a3078f574b0c910e3e6983f8 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Tue Jul 27 06:20:52 2004 +0000 Fix a bug that caused an entire batch of events to be thrown out when one of an unknown type is encountered. (Ty Sarna, NetBSD). commit 19002e47a0dbf55e035b674116a533ec9814edfa Author: Alex Deucher <agd5f@yahoo.com> Date: Tue Jul 27 02:50:41 2004 +0000 - enable maven support for TV detection, DPMS, and DDC on crtc2 on G400 (Ryan Underwood) (http://bugs.xfree86.org/show_bug.cgi?id=1098) - expose I2CStart; needed for mga maven support (Ryan Underwood) commit 2a7b137d41eb8ce6efc45b47b5df0c89eb4f5d93 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Mon Jul 26 22:41:47 2004 +0000 remove extra ';' (Alan Hourihane, Keith Packard). commit 799208dd44a65b18dda97b4843a27a2628f955f4 Author: Adam Jackson <ajax@nwnk.net> Date: Mon Jul 26 19:06:04 2004 +0000 Bug #377: Make lib{glx,GLcore,dri} work when compiled as dlloader modules. commit f15f881727cee9a879bd43be8dc849320f8d3cbd Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 26 17:14:27 2004 +0000 Eliminate bogus rate check in fbdevModeSupported. Hmm. Potentially bogus rate selection necessary for Mac fbdev Don't know about fb changes to pixmaps, so can't track dirt. Add Mac specific 1280x854 mode. Warn when requested mode isn't found. Add ability to soft-boot video cards. Add region expand request. FIXME: need test cases commit 20913b7d5daf90e0f7ad1ee967ad2f0daaec40f9 Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Jul 24 17:35:39 2004 +0000 Fix a problem with wsmouse driver loosing events on 64bit architectures (XFree86 Bugzilla #1438, John Heasley). "To fix this, I've added a mouse buffer (Xisb buffer) "scale" value to the MouseDevPtr type. If set, it is used as structure size of which we want space for a few." commit c57944cd9aaac717d4d4ada44626e35925b39bbd Author: Keith Packard <keithp@keithp.com> Date: Sat Jul 24 17:02:49 2004 +0000 Check for mmio before restoring crtc/crtc2 pitch registers commit 5fdff8b95e8f90221a46717c2f84715ab238460c Author: Matthieu Herrb <matthieu.herrb@laas.fr> Date: Sat Jul 24 16:32:39 2004 +0000 Bugzilla #884: OpenBSD/amd64 support. commit cc3e0173d9fae8a40eb46606d9951e3aa1df975a Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk> Date: Thu Jul 22 19:24:50 2004 +0000 Thu Jul 22 20:03:11 2004 Soeren Sandmann <sandmann@daimi.au.dk> Call MMX solid fill routine when available. Call MMX operations when available. New HasGcc34 macro New file with many operations implemented with MMX intrinsics, conditional on having GCC 3.4 on i386. commit 9565d9e0cf85e6f5fb47acebdd66212bd6cc3e08 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 22 18:17:59 2004 +0000 Correct pitch so that accelerator can run on 1400x1050 screens. Add a few more register sets for cursors. commit 67dbad6b3b9163eafae7d9dd7698708e10372a21 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jul 22 06:48:19 2004 +0000 DRM 20040721 import commit 829b2c72a6433ebaf63f2d2726259c73cca4bd1a Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jul 22 06:48:19 2004 +0000 Initial revision commit 448e0754e369d433a61ae337bbfd7dba195c5e69 Author: Phil Blundell <pb@reciva.com> Date: Wed Jul 21 20:33:35 2004 +0000 Include -lts if appropriate. Patch from pattieja@bentham.ispvip.biz. commit 0c32a94623b13dd1ac5b015b465bdf890f498282 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Tue Jul 20 15:15:13 2004 +0000 Bugzilla #889: Bind -from address to port number 0 instead of 177 commit 07e6011106dcfa0ab69861aa7dcbb88382625c16 Author: Phil Blundell <pb@reciva.com> Date: Tue Jul 20 14:33:42 2004 +0000 Select optimized 16bpp shadow copy functions if screen is 16bpp. Select -YX versions for 90 and 270 rotations if architecture is ARM. commit 797114414096d7bf7ed0d73a878d0cffef262301 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Jul 19 22:01:52 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=893 - Fixing the bug that Xprt did not honor ${LC_ALL} when looking for model-config dirs. commit 8853f9331826899229e5b7c964e9c852c0371ce5 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 12:07:01 2004 +0000 Add support for a8b8g8r8 and x8b8g8r8 pictures, which showed up frequently with metacity usage. commit adf4b38f49da063576b48f9c0750b78bb753b3de Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 11:42:49 2004 +0000 Breakage in last commit to this file: pCurPriv->area isn't set up until Enable, these days. commit d2e74e419d2c75c5a5b97236d2714730e6f69ee0 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 11:19:12 2004 +0000 Set the right number of texture coordinates for r200 Render support (still disabled, needs to be tested). commit cefcb7f123c962c3715b0c46f30430e87c82a017 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 11:16:13 2004 +0000 - Add Radeon picture transform support. - On R128, don't refer to an old Composite's mask transform when the current Composite doesn't have a mask. - Staticize some global variables in r128_composite.c. commit 9fe216a45836b98b5aea55725019668de3900e83 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 07:53:54 2004 +0000 Use the offscreen memory manager as much as possible to do the reservation of memory at startup. Do some drive-by cleanups while I'm here (sorry!). commit e2bb9f38cdcb74fd7630f4efe310ad14d597171e Author: Eric Anholt <anholt@freebsd.org> Date: Mon Jul 19 07:20:01 2004 +0000 Add support for transforms of textures on R128. commit c04264727860cbe2e276e1934d6700d0baaf9f73 Author: Rik Faith <faith@alephnull.com> Date: Sun Jul 18 22:19:33 2004 +0000 Addition of console input after removal of core backend input that is not on screen 0 can cause a segfault. Fix by preventing reinitialization of detached inputs. When Xinerama is active and screen 0 is detached, pixmaps for XGetImage must be obtained from another screen. commit 0addd0d499046fc8a6cdc18fc41d34cac2ba77ea Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Jul 18 05:21:20 2004 +0000 Fix for http://freedesktop.org/bugzilla/show_bug.cgi?id=858 - Fixing the problem that clients cannot use the TrueColor visual without calling |XInstallColormap();|. commit 7f9e263658b1c9c435db851a8afd904a2f584d13 Author: Kevin E Martin <kem@kem.org> Date: Sat Jul 17 20:44:14 2004 +0000 Revert change to MAXFORMATS to maintain binary compatibility commit c47a1bdd7463b6863018e2c4237acfd28b89f38f Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Jul 17 01:13:31 2004 +0000 Fix typo in debug message in MakeAllCLTSServerListeners Add $(GETPEER_DEFINES) to DEPEND_DEFINES for makedepend Add "localuser" and "localgroup" access types to server-interpreted authentication scheme. commit 3e52373fc8179a59efc9e7ab22ce0cb5160d0409 Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Thu Jul 15 09:56:40 2004 +0000 Enable i810. commit aeb78eaa980ac93f6af3e947ab1ad8bce5bc5bd1 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jul 8 08:21:25 2004 +0000 Commit the rest of the dirty optimization from 20040703 and add a missing header include. I don't know how this happened, but I'm going to blame a "few" fscks having happened between testing the code and committing (due to other driver changes that made me not blame dirty for the failures I saw) for disappearance of kasync.c changes. Fixes a lot of corruption. commit b46767352822b09e5dab8b54cbb7a37a9b62de53 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jul 8 06:57:58 2004 +0000 Remove duplicate protos in kdrive.h. commit 764d9e822b01fdfe3ff088028959cbc48b349026 Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Wed Jul 7 20:43:25 2004 +0000 missing xkb/[xkb.h, xkbDflts.h] and hw/kdrive/mga/g400_common.h commit f96ef08d48b01f6119799ede9ffc43d0134cbf8b Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Wed Jul 7 19:21:07 2004 +0000 Initial kdrive XKB/XINPUT support, use --enable-xkb --enable-xinput commit a5c9b3229ce418a5e3eacc40b7a7f11c0a26d958 Author: Rik Faith <faith@alephnull.com> Date: Wed Jul 7 04:32:52 2004 +0000 Bugzilla #817 commit 1498d7a096f0855fa965585acd9ca4a2780cc959 Author: Kevin E Martin <kem@kem.org> Date: Tue Jul 6 23:51:00 2004 +0000 - Disable building DMX on OSs that have not been verified to build correctly (Kevin Martin). - Fix DMX build when Xinerama is not enabled (Kevin Martin). commit 0e45f2a7536bf4b66d6f64d96b44431310884af3 Author: Egbert Eich <eich@suse.de> Date: Tue Jul 6 14:49:13 2004 +0000 ifdef'ed some IA32-only assembler statements. Presently these chipsets are IA32 only, anyway (Egbert Eich). Disabling generic VGA testing for IA64 architectures. Temporarily disabling support for ZX1 bus. This code is extremely invasive and is executed as fallback without testing for a ZX1 chipset. It brings a SGI Altrix to a grinding halt. (Egbert Eich). commit df2b55a25b7056ac92c1f6cbee9f16bd0a37ba8c Author: Egbert Eich <eich@suse.de> Date: Tue Jul 6 14:37:48 2004 +0000 Separated Intel drivers from default DriDrivers to avoid building them on IA64 (Egbert Eich). Fixed wrong function prototype (Egbert Eich). Don't test for generic VGA on IA64 (Egbert Eich). Fixed a segfault when accessing a structure before verifying the pointer exists (Egbert Eich). Added a showcache option for debugging (Egbert Eich). Increase default video RAM size to 16MB when DRI is enabled and more than 128MB are available (Egbert Eich). Fixed lockups during mode switch. Problem was introduced when attempting to copy the behavior during LeaveVT()/EnterVT() but but forgetting to call I810DRILeave() before I810DRIEnter(). The entire DRILeave()/Enter() scenario has been commented out as it didn't seem to be necessary (Egbert Eich). Fix TweakMemorySize() (tested with i855/i865) (Egbert Eich). increased MAX_DEVICES to 128 (Egbert Eich). Use OS provided PCI config space access as default method (Egbert Eich). Added support for Linux 2.6 proc file format. Fixed unaligned accesses to pieces of the VBE info block. VESA did not align elements to size (Egbert Eich). commit 7c466d64c34e68e0bc50e083861874161ae02db9 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 3 10:23:03 2004 +0000 Clean up Rage 128 composite code. Now it composites more operations correctly and is simpler. commit 020701566916c8569f5af7f2efe1de36fea2002e Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jul 3 09:16:30 2004 +0000 Add a "dirty" flag to the pixmap private. Clear it when setting up an offscreen pixmap area, and set it when any rendering occurs. When moving a pixmap out of offscreen, don't read data back if it wasn't dirtied (compared to the system memory copy). commit fd594b0559caa98ee0823be956aecf9c9d2e52bc Author: Phil Blundell <pb@reciva.com> Date: Fri Jul 2 21:30:00 2004 +0000 Call ts_read multiple times, to avoid events getting stuck in the pipeline. commit 7976ee51afcad41b611e642d2feb31d805dedcf6 Author: Kevin E Martin <kem@kem.org> Date: Wed Jun 30 20:06:56 2004 +0000 Add Distributed Multihead X (DMX) support commit d5db59bd79f5d8788b99056bf9d969b5b3ad99e1 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Jun 29 20:37:51 2004 +0000 Add an offscreen area scoring to improve choosing offscreen areas to kick out when allocation can't find a free area of the requested size. When offscreen pixmaps get used, the offscreen area's score is increased by a constant value. Every certain number of increases, all offscreen area scores get decreased by a fraction. When choosing a set of areas to remove for a new allocation, the set of areas with the smallest total score is chosen for removal. While this is not the smartest system, it prevents things like always removing the first offscreen area in memory (likely the most recent) to be kicked out when doing replacing. commit ea78d1c6fcd27d28e69cb97faf72b7b719f6f93e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Jun 28 18:08:26 2004 +0000 Add GLX_ALIAS_VOID for GLX_ALIAS of functions with return type void to fix builds with non-gcc compilers that refuse to let you do return function_that_returns_void(...) programs/Xserver/hw/xfree86/os-support/shared/sigiostubs.c Remove includes of xf86drm.h that break non-DRI builds commit 7ff67f2872ddd15908f789ec9bdb76e8211d6431 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 28 00:48:51 2004 +0000 Separate out off-screen allocation from Init. Fix Enable to update off-screen addresses. Wrap RandR to update off-screen addresses. Set off_screen_base and memory_size fields correctly. commit 5b75aae2cf1ad38556e9a55da72ad65419aa7f84 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 26 04:13:03 2004 +0000 Add ARGB cursor support for Radeon cards. commit 8bc0bc6d36dbc5000069017a1984905065164016 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Jun 25 08:58:18 2004 +0000 #Bug 784: Ignore unconfigured interfaces with xdmcp commit c5ab3fdd928d12b4dc28108f2242b3b75e1ac65f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Jun 25 08:56:04 2004 +0000 #Bug 780: add RRSetScreenConfig commit f8226cee08a00b49f32dc3db814478490febe45d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Fri Jun 25 00:02:11 2004 +0000 Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=791 - Adding special support for Canon C3200N commit ad6b9644a39343437967b4c3b2442dbd47508443 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu Jun 24 06:26:27 2004 +0000 Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=660 : Fix for the issue that GetPrinterList does not return printer descriptions on Solaris. The patch implements a framework which allows the printer enumerator scripts to pass additional printer attributes to the information pool (currently only "xp-printerattr.descriptor" is implemented). commit 884908a63c624585c9b5fcf22d565236298c2916 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Jun 22 10:18:13 2004 +0000 Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=789 : Adding a workaround for the issue that Xprt may hang when the CUPS spooler frontend sends messages to stdout. commit c66cc2a219e860ae3c0b5d4ad18b22a6dc4e16df Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jun 21 13:51:57 2004 +0000 Bug 783: rootless patches for cygwin commit ed7f92e791f052d64cffef4b44eae5160fb24689 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jun 21 13:44:14 2004 +0000 Bug 778: add ddxBeforeReset commit 68d92cca1a696521599db6a826d2187ec0c15f01 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jun 21 13:35:05 2004 +0000 Bug 782: Merge native OpenGL for Windows from CYGWIN branch commit d6e8b1affec7351549c0006cc63b6923091cdd68 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Jun 21 13:19:32 2004 +0000 Bug 777: Merge from CYGWIN branch commit dfdbb60bf5f613b3554d5435f08f16bde72aa353 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Jun 21 00:29:46 2004 +0000 Fix for http://xprint.freedesktop.org/bugzilla/show_bug.cgi?id=772 - RFE: Switch default resolution from 300DPI to 600DPI commit dd831c7a5c1b0c540a78350aadaeb34a8aa67395 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat Jun 19 21:56:01 2004 +0000 Refix for http://freedesktop.org/bugzilla/show_bug.cgi?id=764 : Rework previous solution and make Xprt to default to "-noreset" (the default of Solaris version of Xprt) and add a "-reset" option which can be used to restore the default behaviour on demand. commit da78a4ddd833f78baf1d2579a1adea8208016ddb Author: Damien Ciabrini <braun@club-internet.fr> Date: Wed Jun 16 21:36:54 2004 +0000 Update MGA composite patch commit. (some files were missing in the previous commit) commit e56e24af252bd3b8e58076adf0f8eabf1103f187 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:37:59 2004 +0000 Merge DRI-trunk-20040613 changes in programs/Xserver/GL. commit 2e1868b560315a8b20d688e646c489a5ad93eeae Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:25:21 2004 +0000 DRI trunk-20040613 import commit f45c46c630855e8e0d1c28b1f0d3b2ad54334619 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:25:15 2004 +0000 Initial revision commit 22bad9474b8822f03f84a8a39edce624bfb9befa Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:22:17 2004 +0000 DRI XFree86-4_3_99_12-merge import commit 1c133c27ccc1f09b95922fdece3c8d73cc182def Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:22:05 2004 +0000 Initial revision commit b61ff0daa4bd1e3b828dc5b985c3a2f3c92b202e Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:16:01 2004 +0000 DRM 20040613 import commit bcc1eab1fd57e8cb686d625934a6e527b7ae4ea2 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jun 16 09:16:01 2004 +0000 Initial revision commit 580b9a7da1bf0e20acdcddd676d471b3d6589023 Author: Jaymz Julian <jaymz@artificial-stupidity.net> Date: Mon Jun 14 08:43:57 2004 +0000 MGA composite support from Damien Ciabrini - thanks! commit 95d65cf6bb753d10f4db3d857fb98bb09389228e Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Jun 13 04:50:21 2004 +0000 Manual page X(7) does not reference Xprt(1x), xplsprinters(1x), etc. xc/config/cf/Imake.rules Correct comment to match rule name for InstallDriverSDKObjectModule xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_kbd.c Log results of ioctls to probe keyboard type & layout commit 4ffde8a6b3299f002c10b1abd881e4c6849767ea Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 10 19:22:58 2004 +0000 - Pass the right pixel mask (all ones) in to PrepareSolid in the solid-fill-based composite acceleration. - Use a real pixmap when doing an UploadToScratch (For pDrawable->type == DRAWABLE_WINDOW, you need to get the backing pixmap). - Pass back the x/y offsets from kaaGetOffscreenPixmap unconditionally, because they'll be used in the scratch case. - Turn on the Render acceleration for Rage 128 and Radeon 100-series at last! commit c3bc6dd551436d5e37a07f37b3b77a83bb5b5da0 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 10 09:50:59 2004 +0000 Align scratch area offsets to the offscreen byte alignment. commit cf3f95d2164604047866b283fe0071574bf16dbc Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 10 08:37:28 2004 +0000 Oops, testers reported that the last patch actually didn't work (conflicts occurred), so the R300 PDMA doesn't work. Disable. commit 0b7647ee359537953b67b0dbf9daa807e356062b Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jun 10 05:57:31 2004 +0000 Bug #242: Fix setup of R300 cards, by providing R300 CP code from volodya-project and initializing PDMA. commit b3a18ca8b827cfe2ebb295a03a9776028242c1a0 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Mon Jun 7 05:13:29 2004 +0000 Neomagic driver enabled commit 893ea125597f3c6273f45a51673d4dc514e754e9 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Mon Jun 7 05:05:10 2004 +0000 small fixes. README added commit d9cca52feba13b69f3eea9e1d958b8a4711e7d67 Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 4 17:06:18 2004 +0000 Add (stubbed out) Xgl server code commit f8a1dd3ce725195baa6f38a880299752c6c6c2c4 Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 4 16:10:50 2004 +0000 Add top-level build support for GL X server (not working yet) Fix a few allocation bugs with alternate visual ids Allow for non-8/8/8 alternate visuals Turn off any existing shadow before enabling it again (avoids re-registering existing damage) Add some validation code to catch re-registered damages commit 6741fadc52598af0096f106a2cefd640abb434b3 Author: Phil Blundell <pb@reciva.com> Date: Wed Jun 2 20:49:50 2004 +0000 New conditional. (REQUIRED_MODULES): Demand xcalibrateext if building XCalibrate. New file. Add xcalibrate.c. Read raw events if requested. commit d4d0c8470c4272dec642ab4c68f44a83cda06971 Author: Phil Blundell <pb@reciva.com> Date: Sun May 30 20:40:30 2004 +0000 Add -lts if using tslib. commit 8124810950d7e0b9db7f66dadee7218b0c26c4c3 Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Sun May 30 13:51:18 2004 +0000 Initialize permedia engine for acceleration to work. commit ea1bbf8d83d3780ccce5ebcdff48f0b19863cee1 Author: Ralph Thomas <ralpht@68k.org> Date: Sat May 29 12:15:46 2004 +0000 Adding driver for VIA CLE266 graphics chip. Currently it only accelerates copy and fill operations. commit 6af411b02e808220d3afcef14abb97eec86cf1f3 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri May 28 04:56:49 2004 +0000 Hey, I like devfs. Try /dev/fb/0 if /dev/fb0 fails. commit a7b42f685e7a4bf57cf89a3ef664a581ecedb50f Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Thu May 27 14:11:42 2004 +0000 file ChangeLog was initially added on branch CYGWIN. commit 05a3dbf5dc55ea534c68fc9d05b3949805a0752e Author: Egbert Eich <eich@suse.de> Date: Wed May 26 17:44:29 2004 +0000 Updated x86emu and resynced with upsteam at Scitech. commit 9549f628e066396e6bc9a7edfc919bdd6860f170 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Tue May 25 20:33:46 2004 +0000 getconfig: file '/usr/X11R6/lib/X11/getconfig/xorg.cfg' has bad signature (Change "Xorg Project" to "Xorg Foundation" to match getconfig script) commit f8124d3ef5890d59c3ce41bee46b5e3576d0f9b1 Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Tue May 25 13:02:44 2004 +0000 Add pm2 to the build commit 32d0920ef9ec3c5e61089b88dedc82ffab294276 Author: Carlos Romero <kcrashcore@bellsouth.net> Date: Mon May 24 19:31:41 2004 +0000 Initial import of Permedia2 driver commit 5b2211ec3545f1634f807daf84b6c4bc2c0fdecf Author: Egbert Eich <eich@suse.de> Date: Mon May 24 19:05:01 2004 +0000 Muffle compiler warnings. fix option name in log message. improve debugging messages. commit 932efe8e6d4e6280aed9b5e25af56888c964d37b Author: Keith Packard <keithp@keithp.com> Date: Fri May 21 03:32:27 2004 +0000 Allow for multiple composite-based visuals, then add an RGB24 visual in addition to the ARGB32 one. This allows 'glitz' to run on top of any X server using mesa. Switch to using 32bpp for depth 24 pixmaps (even when the frame buffer is not depth 24). commit cde51fd05b2bd413d8db8ad750e6a72398a7039c Author: Keith Packard <keithp@keithp.com> Date: Thu May 20 19:51:44 2004 +0000 Miscomputing pitch in 24bpp modes because of rounding errors. commit b9d920f3dc060d230a4a7b2d40210524acf50666 Author: Keith Packard <keithp@keithp.com> Date: Thu May 20 05:27:03 2004 +0000 Fix SYNC_ALWAYS (debugging) code to use mach64WaitIdle instead of KdCheckSync -- the boolean used in the latter won't be set yet. Oops. == instead of =. Must sync hardware before rasterizing trapezoids in case the mask is in off-screen memory and has just been erased. Yes, it is silly to place masks in off-screen memory. That's a separate issue. commit 94648799c82e59166155ca5abf22a9391693e6a1 Author: Keith Packard <keithp@keithp.com> Date: Thu May 20 02:42:20 2004 +0000 Pin header-only pixmaps in memory. Off-screen reallocation could have used a stale pointer. Separate framebuffer mapping computation from actual frame buffer mapping. Now map the frame buffer from vesaEnable so that VT switch shares the same mapping code. This makes sure any shadow framebuffer is allocated again. commit cade317d31dddab61199d5e90bcff36fb12f3cd1 Author: Eric Anholt <anholt@freebsd.org> Date: Mon May 17 20:18:02 2004 +0000 Overhaul of the ATI driver: - Add monochrome hardware cursor support. - Try to auto-detect AGP support for DRI on Radeons. And fail. Detect it properly on R128. - Set up card for pseudo-DMA if possible. Convert 2D rendering code to prepare DMA packets only. Use generic code to decode DMA packets to MMIO if PDMA is unavailable. Add WIP code to support "real" DMA without DRM support. - Dispatch pending DMA commands when the server sleeps. Otherwise some things, such as typing in an xterm, wouldn't show up for a time. - Fix Radeon Composite acceleration in many ways, and add Rage 128 Composite acceleration. Disable them both due to still-not-understood issues they have. They fail with In, Out, AtopReverse, and Xor, and text rendering is strange. - Add textured XV support for R100 and Rage 128. No brightness/sat controls, but it does support multiple ports, and cooperates with Composite. - Add WIP code for hostdata uploads. - Many cleanups and fixes. commit 834537e212e01314b60737278b7abc6bb7cef102 Author: Eric Anholt <anholt@freebsd.org> Date: Mon May 17 07:19:49 2004 +0000 Make kaaMoveInPixmap public. This will be used by the ATI driver's xvideo support to ensure that the destination is in framebuffer. commit 85f46e0bcdf60d145a6868ee71d10688c9113e6e Author: Eric Anholt <anholt@freebsd.org> Date: Mon May 17 07:14:23 2004 +0000 Add new CheckComposite hook. This allows a driver to avoid the migration of pixmaps for a Composite operation if the operation can't be supported. This hook is optional. commit 47fb207c8ae2b54e976066f78892a1ee3fb35d30 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun May 16 05:08:39 2004 +0000 xc/programs/Xserver/fb/fb.h xc/programs/Xserver/fb/fboverlay.c xc/programs/Xserver/fb/fbscreen.c - Change #ifdef for checking for old format miScreenInit to FB_OLD_MISCREENINIT for easier portability to xservers with updated screen structs but old function prototypes. Make it automatically defined if FB_OLD_SCREEN is defined. - Add _LP64 to list of #ifdefs for 64-bit platforms to support 64-bit Solaris. commit fc2dd516c3c7382915452207180a1c483d0d73ca Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun May 16 00:03:54 2004 +0000 xc/programs/Xserver/hw/xfree86/xf86config/Imakefile xc/programs/Xserver/hw/xfree86/xf86config/xorgconfig.c - Clean up server name changes from TM branch - Set default XKB rules file name correctly - Use default font path from Imake configuration for the default font path in generated xorg.conf files. - Use path variables from Imake configuration for paths to files, in case vendor has configured them to install somewhere other than the defaults. commit b1aa9499ffb827f4b1acc75f197e332bba382565 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat May 15 14:43:05 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=622 - RFE: Xprt default BIGREQUESTS extension buffer size should be 8MB (to make |XpPutDocumentData()| happy and to improve performance). commit 74b2a7694791297a4f798ecc05c7eb8f68634722 Author: Eric Anholt <anholt@freebsd.org> Date: Fri May 14 00:34:28 2004 +0000 Add new flag, KAA_OFFSCREEN_ALIGN_POT, which tells KAA to align pixmap pitches to a power-of-two number of bytes. Useful for Render acceleration on older cards. commit 2bea33e881693e7d7dcf938db79c888a71dfb2fb Author: Eric Anholt <anholt@freebsd.org> Date: Fri May 14 00:27:29 2004 +0000 Don't let the visible screen get "migrated" offscreen, which manifests itself as a hang. Reported by: Ginokas <ginokas@free.fr> commit 40354e761892dc2ef88d2e722d8d7896642003eb Author: Eric Anholt <anholt@freebsd.org> Date: Thu May 13 22:57:15 2004 +0000 Add generic functions for copying packed/planar XV data, copied from mach64. commit 2e330e980f61b256c55f5b9debb00574e4e85b26 Author: Eric Anholt <anholt@freebsd.org> Date: Thu May 13 21:41:48 2004 +0000 Move fourcc.h to a generic location in src/. commit f52a4d472d2463482d865c5006208182c294e670 Author: Keith Packard <keithp@keithp.com> Date: Thu May 13 21:25:51 2004 +0000 Follow GLX in setting ARGB visual nplanes to 24. Retry current mouse protocol when sync is lost commit aa5a87847290d49b03a33351ebfd8df652a42489 Author: Eric Anholt <anholt@freebsd.org> Date: Thu May 13 21:15:06 2004 +0000 There's no need to explicitly set softCursor -- kdrive handles this if the cursor hooks aren't set. commit 4078457919708a8dbf9db8ee6e4871ecbf72518f Author: Eric Anholt <anholt@freebsd.org> Date: Wed May 12 01:49:46 2004 +0000 Fix problems in render fb implementation found by rendercheck: - fbCombineSaturate was pointed at fbCombineDisjointOver, instead of fbCombineDisjointOverReverse as it should. Instead, point fbCombineDisjointOverReverse at fbCombineSaturate (which is likely to be faster). - fix previously-unused fbCombineSaturate implementation. - fbCombineMaskAlphaC was just a copy of fbCombineMaskValueC. Make it do what it's supposed to (return a cs.alpha). - fbCombineAtopC didn't invert the source alpha value. - fix copy'n'paste errors in fbCombine(Dis/Con)jointGeneralC, also source alpha wasn't treated in a component fashion. - fbCompositeSrc_8888* didn't handle when the source lacks an alpha channel. Rather than adding that and possilby slowing down the (normal) alpha case, don't let x8r8g8b8/x8b8g8r8 Pictures be used in fbCompositeSrc_8888* because Over with one of these is just Src. commit a43d5412b4d79d67af20dc8af144a9ca80263e9d Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Sun May 9 16:20:13 2004 +0000 file ChangeLog was initially added on branch CYGWIN. commit 0498d818fe40cb4eb03983e27a980791bbadf6db Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sat May 8 02:06:46 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=608 ("Can not print on Debian/CUPS due to error |Xprt_64:lpr: unable to print file: server-error-not-accepting-jobs|"): Xprt did not setup the list of supplementary group ids, causing print failure when the the calling user must be a member in a specific group to be allowed to print. commit 75d96afcc4a1f201da665bd73b7067e8e7139a3f Author: Egbert Eich <eich@suse.de> Date: Thu May 6 17:31:17 2004 +0000 BugZilla #601: Fixing makedepend choking on floating point exception because CHAR_BIT is defined to __CHAR_BIT__ which is a compiler intrinsic define. BugZilla #605: Fixing build on IA64 which is broken due to the inclusion of the kernel header asm/page.h. Kernel headers however don't work with -ansi. The inclusion of asm/page.h can however savely be removed as it there are plenty of other ways to determine the page size. commit 7124cfaa006e840ba48dcc466c0dc8b34503a686 Author: Keith Packard <keithp@keithp.com> Date: Thu May 6 16:19:32 2004 +0000 Use current resolution by default, change rate to 75 to match fbdevModeSupported cut-off (?). Glenn McGrath <glennm@hydrix.com> commit e4ac2411eddf1f01ef9204f27b6d1ce8f1749439 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu May 6 01:53:52 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=551 - PS DDX will not build on platforms with BuildFreeType NO. Patch by Alan Coopersmith <alan.coopersmith@sun.com>. commit b1c65e1ca6828ea82ee7790f22c26503b0a5e17d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu May 6 00:24:32 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=536 - RFE: PS output should contain the FreeType2 version being used. commit 8d4f21ab53c44ca48501d6211ea6db0c0b8af916 Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:15:41 2004 +0000 Add XACE and XSELINUX extensions to the build system commit 0106715000196c7b349a0b4494b61545f0f5e138 Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:07:37 2004 +0000 Modify XC-SECURITY and XC-APPGROUP extensions to work with XACE commit 8526cd6395490b03b279f1962df777fb0e4a9878 Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Wed May 5 20:04:52 2004 +0000 Replace XC-SECURITY code with XACE security hooks commit 6d066cb10990d951449b342b40dec1f1b1ae593c Author: Eamon Walsh <ewalsh@epoch.ncsc.mil> Date: Tue May 4 19:44:02 2004 +0000 Merge the new release from HEAD commit b5f200ce9d495c6ce94e0170909465a30e8799d9 Author: Keith Packard <keithp@keithp.com> Date: Tue May 4 03:28:06 2004 +0000 Attached is a patch to fix a build error whe ncompiling with tslib support, a variable wasnt set, i just changed it to be like the other MAkefile.ams :) -- Glenn McGrath <glennm@hydrix.com> commit 5ca651e66f3d0ab189962bb4609b87a865364ef8 Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Apr 30 12:48:56 2004 +0000 file winmessages.h was initially added on branch CYGWIN. commit 2c2c1704b542f29fe5ac9917e1141040a0dbd3e9 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Thu Apr 29 23:59:15 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=567 - Xorg Xprt starts to consume 100% CPU when being idle for some time (internal screensaver goes mad after 10mins) commit a8429d76103ff0f4fc61db86201c741f91bfcba2 Author: Keith Packard <keithp@keithp.com> Date: Wed Apr 28 07:26:46 2004 +0000 Add completely fake X server -- draws to allocated buffer, has no keyboard or mouse. commit 85e4e5445218d70f627fb132a8e8f18470e6749d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Mon Apr 26 11:07:03 2004 +0000 Work-in-progress for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=542 - GLX support for PS DDX / part #1: Fix visual setup (attachment #243) commit 46472cbee679f9757c4003a0dcf158aeb3852f47 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Apr 26 02:39:58 2004 +0000 xc/config/cf/sun.cf xc/config/cf/sv4Lib.rules xc/programs/Xserver/Imakefile xc/programs/Xserver/hw/xfree86/os-support/sunos/find_deps.pl Make Solaris builds work when using MakeDllModules (it's not the default yet, but at least it works now if you turn it on) Also improve default compiler, optimizer, & linker flags for Solaris builds using either Sun cc or gcc xc/programs/Xserver/cfb/Imakefile.inc xc/programs/Xserver/cfb/stipsparc.s xc/programs/Xserver/cfb/stipsprc32.s Remove text relocation error when building shared versions commit 36e3e5430e1ca7103a4e0b796eb3817975b40d90 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Sun Apr 25 22:42:09 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=541 - Xorg Xprt may crash with "Freeing resource id=40200000 which isnt there" commit 2fb588620030ad393f8500d60e16144d59e4effe Author: Egbert Eich <eich@suse.de> Date: Fri Apr 23 19:54:30 2004 +0000 Merging XORG-CURRENT into trunk commit 0664db19bf37f9dd69cca6adff4e238e310c3092 Author: Egbert Eich <eich@suse.de> Date: Fri Apr 23 18:54:16 2004 +0000 Merging XORG-CURRENT into trunk commit 68fd529608c58334f13beb88dbcc1d5db85b9b00 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Apr 21 23:24:20 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=535 - Xprt should not annouce extensions which are not supported commit 1af13123fa79ad1c6747aad60ed458bbd69da12d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Wed Apr 21 10:03:41 2004 +0000 Fix for http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=530 - Land XPRINT branch on XORG-CURRENT commit 449e83a9470ec4bdd0871e2f263f608b24455423 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Apr 18 03:00:43 2004 +0000 xc/lib/GL/glx/Imakefile xc/lib/GL/mesa/src/Imakefile LargePICTable required for Solaris SPARC builds xc/programs/Xserver/hw/xfree86/drivers/glint/pm3_accel.c xc/programs/Xserver/hw/xfree86/common/xf86Events.c Add != NULL to if statements to get past syntax error reported by Sun Forte 6.1 cc. xc/config/imake/imake.c xc/config/cf/sun.cf xc/config/cf/sunLib.tmpl Allow compiling with Sun compilers installed somewhere other than /opt/SUNWspro xc/programs/Xserver/hw/xfree86/common/compiler.h xc/programs/Xserver/hw/xfree86/os-support/bus/Pci.h Check for defined(sparc) as well as defined(__sparc__) since Sun compilers don't define __sparc__ commit 425251a752805affb6ce14baa58d92c384f39501 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sat Apr 17 18:47:05 2004 +0000 Bugzilla #495: LocalClientCred should use getpeerucred on Solaris 10 commit 7215fb186f076a24d0a04c9c20ac9b92cae1f49b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Apr 16 00:21:24 2004 +0000 xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_mouse.c Solaris mouse enhancements, including autoprobe support, VUID wheel mouse events, and streams module pushing. Bugzilla #434. (Russ Blaine & Alan Coopersmith, Sun Microsystems) xc/programs/Xserver/hw/xfree86/os-support/sunos/sun_init.c Xorg doesn't reset console to text mode on Solaris x86 8 and later Bugzilla #469. commit c6c6d0de2309019999fa75a2f36a4f4a93ad2f31 Author: Egbert Eich <eich@suse.de> Date: Thu Apr 15 10:17:35 2004 +0000 Merged changes from RELEASE-1 branch commit 9d24a5fa91bf165bbd2048a844edeb59b5e34aad Author: Harold L Hunt II <huntharo@msu.edu> Date: Wed Apr 14 00:01:22 2004 +0000 file XWinrc.man was initially added on branch CYGWIN. commit 01bb5eb5032a7566c86a51053146dba98a3ed749 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:46 2004 +0000 file psout_ftpstype3.c was initially added on branch XPRINT. commit cb3f3d8f2283d384dc5a3af3f38053cc8a2d192e Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:46 2004 +0000 file psout_ft.c was initially added on branch XPRINT. commit 7cfb4c2b33ae2147b5d6ddc2afc8b777686a666f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:46 2004 +0000 file psout_ftpstype1.c was initially added on branch XPRINT. commit 4ae42e79d46d7db30f7b6f321bbb0d134862138d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:46 2004 +0000 file PsFTFonts.c was initially added on branch XPRINT. commit b5fb71922b02024aa5a8f349c9d2c956e2f83f0f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:45 2004 +0000 file xprint.sh was initially added on branch XPRINT. commit ca9a9a58be51a21f123b11dd68047034696cae84 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:45 2004 +0000 file xprint.csh was initially added on branch XPRINT. commit 7c1f840108172d6b18af47465ea72f4820640598 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:45 2004 +0000 file cde_xsessiond_xprint.sh was initially added on branch XPRINT. commit 579221198aeac7010435b29db1ad8fe9ee2d7c5d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:44 2004 +0000 file spooler.c was initially added on branch XPRINT. commit 7677b4992fee7eb73cc97914163dcf689ad13d6a Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:44 2004 +0000 file spooler.h was initially added on branch XPRINT. commit d3907ca519b476c99e29a58c22258f22dbe63244 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:44 2004 +0000 file document was initially added on branch XPRINT. commit 3646bb9c894d5f011e2df4fac402118d8350102e Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:39 2004 +0000 file spooltodir.sh was initially added on branch XPRINT. commit 8c006df3c6d8e5ac95f0b0fa38a030100541598f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:39 2004 +0000 file model-config was initially added on branch XPRINT. commit 95a84bc0cb809e5c7141d0411e329a3ec300b8aa Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file ZapfDingbats.pmf was initially added on branch XPRINT. commit 5527b39e668ea7a88c41186dbb6d7b66e892547a Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Times-Roman.pmf was initially added on branch XPRINT. commit 69c405ac66b1a15076e247dd1b578b7b4b210b00 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Times-Italic.pmf was initially added on branch XPRINT. commit b6b75f677292ed0c694921df0abf40038dd5e99d Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Times-BoldItalic.pmf was initially added on branch XPRINT. commit 6605566bcf008551d33a9a68bd03e9a0c57c4f60 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Souvenir-LightItalic.pmf was initially added on branch XPRINT. commit 38ad2972bffea1019214785ee479f7670ca70d1f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Souvenir-Light.pmf was initially added on branch XPRINT. commit 10d8eace174a9778a3313ac36a3422637b020d5f Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Souvenir-DemiItalic.pmf was initially added on branch XPRINT. commit fb5ac8e2bdfe1217663679f5eae8045473456752 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file NewCenturySchlbk-Roman.pmf was initially added on branch XPRINT. commit 5ec311b05dc1e509c115ccca808ee05090cfddad Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file NewCenturySchlbk-Italic.pmf was initially added on branch XPRINT. commit 70947a8f1addf4ca17e50d9e6ae590266ac446cc Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Symbol.pmf was initially added on branch XPRINT. commit 436ff77b21515cd9fe9732e0bd5361f2bfba44ed Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Times-Bold.pmf was initially added on branch XPRINT. commit 4db563027844245d6c9085f997e75da743410885 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file NewCenturySchlbk-Bold.pmf was initially added on branch XPRINT. commit 79110faa2eac849756b859071ce68fba64de57aa Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file NewCenturySchlbk-BoldItalic.pmf was initially added on branch XPRINT. commit 4e1ae7e9cc04806f4436759764cc680ecf1f014c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Souvenir-Demi.pmf was initially added on branch XPRINT. commit 433913bacf988908b94c420452c042eebcb381ac Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file LubalinGraph-Demi.pmf was initially added on branch XPRINT. commit d5bae63138ab833fdd56bb983436ac514536d7b6 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file LubalinGraph-DemiOblique.pmf was initially added on branch XPRINT. commit 3acd6856617e784ee30333dc9b779189a3f44052 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file LubalinGraph-Book.pmf was initially added on branch XPRINT. commit 5f73192458136fe4b6b82372c3b1653fbf831ebd Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Helvetica.pmf was initially added on branch XPRINT. commit e129abc3bf269e857aa65065cc18a31a56ba0373 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Helvetica-Oblique.pmf was initially added on branch XPRINT. commit 576a4cddf995082d10e2e29e1b58c1564eb11ee7 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Helvetica-BoldOblique.pmf was initially added on branch XPRINT. commit cf26c87833a79427b665abce67ca19f2b68bc8e5 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Helvetica-Bold.pmf was initially added on branch XPRINT. commit a091408c372a2aa89fb83b023248f45aa8cd4173 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Courier.pmf was initially added on branch XPRINT. commit 9e4221d08ff9a408fb25a32887390b14788b1558 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Courier-Oblique.pmf was initially added on branch XPRINT. commit 6b2674078079a5959a2b7758e6c628a14ec1a46c Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Courier-BoldOblique.pmf was initially added on branch XPRINT. commit 6aee2d37b95170a65ee08c0866c425f115ebc9f1 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file LubalinGraph-BookOblique.pmf was initially added on branch XPRINT. commit 7a59fe1dd987e1ef0abd92e0ac80dd87a15137fe Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file AvantGarde-Demi.pmf was initially added on branch XPRINT. commit 22e0316acc8992033fc82a38f663fce130e4031b Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file AvantGarde-DemiOblique.pmf was initially added on branch XPRINT. commit f8aded3a7f8c97731e33b4362243da947fb4e774 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file AvantGarde-Book.pmf was initially added on branch XPRINT. commit 2224187c05d4dc05f7e03e22307cf7816d69f789 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file AvantGarde-BookOblique.pmf was initially added on branch XPRINT. commit 9eafaaf83294d1988b30bde4485a299cf8ae5035 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file Courier-Bold.pmf was initially added on branch XPRINT. commit f9eea9864e333efde97143278916da44639cc18a Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Apr 13 03:16:38 2004 +0000 file ps2pdf_spooltodir.sh was initially added on branch XPRINT. commit 20248eedd69c42c27605d7bcfb265994f5846f17 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 16:39:48 2004 +0000 fixed Changelog format commit bc7168ee763ffac9cbb992096a53b346cd640a13 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 16:24:03 2004 +0000 Added ROP commit 784d37ee369b94c83c4cc6e280a39f32da8aa678 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 15:51:04 2004 +0000 Fixed size calculation in solid rendering commit 056322336cbb6093d74aa9d22bbfd42e2248a16a Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 15:20:17 2004 +0000 Basic bitblt implementation commit c231856a1343e38381e1b4e545ff1ac279141bf0 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 00:53:10 2004 +0000 First acceleration function implemented (DrawSolid) commit 47436a8af82a00d0d392cef4d5906729d9a37649 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Sun Apr 11 00:15:57 2004 +0000 Finnally got MMIO working all timecat ChangeLog cat ChangeLog cat ChangeLog :-D commit 1740b938e4c4f1cd3de700ea26143b01c0312325 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Tue Apr 6 18:09:44 2004 +0000 Return back to VESA only version commit 07bc231872e7e056fa3049a0fcd963c61f826f80 Author: Franco Catrin L <fcatrin@tuxpan.com> Date: Mon Apr 5 18:19:34 2004 +0000 small fixes, but still can't get this driver woking again commit b526276faa765df893197e04370a915ed73947dc Author: Brent Cook <busterbcook@yahoo.com> Date: Mon Apr 5 02:52:35 2004 +0000 removed hardcoded vesa references so we can operate with any backend. fbdev works for initializing the screen, but input fails shortly after. commit 920e6ff81baeec16465f81bacbcff711ce82e149 Author: Brent Cook <busterbcook@yahoo.com> Date: Sun Apr 4 07:30:07 2004 +0000 Begin separating VESA calls into a more generic backend wrapper like the ati driver, cascading between VESA and FBDEV. We only have init functions done so far; need to add all of the others. Fixed some compiler warnings. Whitespace and formatting cleanups (using 4 spaces, no tabs) commit 530371ceaf7f593badf38bbc2d2e50f6a920d24f Author: Brent Cook <busterbcook@yahoo.com> Date: Sat Apr 3 22:26:37 2004 +0000 added touchscreen support, detect all known PCI chips in the Neomagic line. We'll not bother with ISA for now. commit 962b898868dcab959c390986dcb0b4dd750dc107 Author: Brent Cook <busterbcook@yahoo.com> Date: Sat Apr 3 22:22:48 2004 +0000 initial import of original driver by Franco Catrin L. Wraps VESA for most parts, with some hardware acceleration enabled for the cursor on the NM2300. commit 8a2fce3b90b5efc8bab19675cb8e02690e24442e Author: Harold L Hunt II <huntharo@msu.edu> Date: Sat Apr 3 05:01:21 2004 +0000 file winkeyhook.c was initially added on branch CYGWIN. commit 12d5371ed2fbefab069dea46be972a7269b8c2db Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file xfixes.h was initially added on branch DAMAGE-XFIXES. commit a4b319dbf375461c975450659723e6326153e536 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file xfixes.c was initially added on branch DAMAGE-XFIXES. commit 5319d30d45d5f8ec04a496327f32cc6431c6a511 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file select.c was initially added on branch DAMAGE-XFIXES. commit 76f247bd0ef23d688028c63b5f8bd3e9ad6b1b45 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file saveset.c was initially added on branch DAMAGE-XFIXES. commit 83f0f1babb612774f609c71879a225c43f63ac1f Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file cursor.c was initially added on branch DAMAGE-XFIXES. commit 52bc7693dbe7e3db916f8d463d9a750e3c6ffa4d Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file region.c was initially added on branch DAMAGE-XFIXES. commit 5d9098cb17cd88cfdf49de92bec2a787d6681649 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 18:31:54 2004 +0000 file xfixesint.h was initially added on branch DAMAGE-XFIXES. commit ace9aa7c45ff2ea6b3476006574da5c27d05afd4 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 17:41:24 2004 +0000 file damage.c was initially added on branch DAMAGE-XFIXES. commit 72dc7569c6bbc216f613be21ea4f79d3ef1d5534 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 17:41:24 2004 +0000 file damage.h was initially added on branch DAMAGE-XFIXES. commit 95da7b7e061b6925d8cd85bc7b25708ff253fcb1 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 17:41:24 2004 +0000 file damagestr.h was initially added on branch DAMAGE-XFIXES. commit 629c3792225cec28572081ebc8dda3fd803fe616 Author: Egbert Eich <eich@suse.de> Date: Tue Mar 30 14:23:15 2004 +0000 36. Conversion: __AMD64__ > __amd64__ (Egbert Eich). 35. Fixed stretching option and centering in C&T driver (Egbert Eich). 34. Added support for memory size tweaking in BIOS for i845 (Egbert Eich, thanks to Christian Ziez) 33. Removed video playback dependency on Accel in NSC drivers (Egbert 3Eich). 32. Fix HW cursor state on Savage driver when entering VT as some BIOSes seem to enable it unconditionally (Egbert Eich). 31. Fixed Emulate3Button message to distinguish between 'hard' (ie. configured) and 'soft' (ie. automatic emulation that is disabled as soon as the middle button is pressed) (Egbert Eich). 30. Free XrmDB in XCloseDisplay() only when implicitely allocated by XGetDefaults(). If Client allocates it itself it should free it also. Trying to free it for the client may result in segfault if the client has already freed it (Egbert Eich). commit b5e400867feab935aa04e9aadb12deb0601b7f83 Author: Egbert Eich <eich@suse.de> Date: Tue Mar 30 14:14:31 2004 +0000 - backing out XFIXES and DAMAGE related code that accidentally went in here. commit 0017ddaa6406524d0a86ff7020eed4c33758ddbd Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 02:16:15 2004 +0000 file damageextint.h was initially added on branch DAMAGE-XFIXES. commit 4b5112fd0593b34e6e096d88b0841a28636600f6 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 02:16:15 2004 +0000 file damageext.c was initially added on branch DAMAGE-XFIXES. commit 733bfa4b5dd5255713a98f390a1fb65be6e16c2d Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Tue Mar 30 02:16:15 2004 +0000 file damageext.h was initially added on branch DAMAGE-XFIXES. commit b1ed473ef2e1da99d7fe3df14fdef4d8b6365626 Author: Harold L Hunt II <huntharo@msu.edu> Date: Tue Mar 30 00:31:28 2004 +0000 file winrandr.c was initially added on branch CYGWIN. commit fec5095bdfb376d0046e2f52188c68bef4e31fd7 Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 28 07:14:30 2004 +0000 file xorgcfg.man was initially added on branch XORG-RELEASE-1-TM. commit 136a9364be80f407f498e9e9695cadaab39227ad Author: Keith Packard <keithp@keithp.com> Date: Sun Mar 28 07:14:30 2004 +0000 file XOrgCfg.cpp was initially added on branch XORG-RELEASE-1-TM. commit 881afb356d6992bcfbbfcbdf31f1f71c64d648da Author: Keith Packard <keithp@keithp.com> Date: Sat Mar 27 17:01:11 2004 +0000 file Xorg.man was initially added on branch XORG-RELEASE-1-TM. commit d2119ac7c56ba94db1d8639937b13e72288a328c Author: Keith Packard <keithp@keithp.com> Date: Sat Mar 27 17:01:11 2004 +0000 file xorg.conf.man was initially added on branch XORG-RELEASE-1-TM. commit 5a9f3a36a35549f30fc67a8e3a3e9a201efb91ec Author: Egbert Eich <eich@suse.de> Date: Fri Mar 26 20:02:03 2004 +0000 file xorgHelper.c was initially added on branch XORG-RELEASE-1-TM. commit b2b0e70fe5c65c8f2d518f5f0ce89a86938701ed Author: Egbert Eich <eich@suse.de> Date: Fri Mar 26 19:54:39 2004 +0000 file xorgconf.cpp was initially added on branch XORG-RELEASE-1-TM. commit 83880dd464a415d3d0efa546b1f0b9887342e809 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Fri Mar 26 17:11:49 2004 +0000 29. XkbWriteRulesProp fails if XkbRulesFile is NULL. Bug #376. (Alan Coopersmith) commit 861a33678243349b987ff30912985968ede8ac84 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Fri Mar 26 01:22:18 2004 +0000 oops commit 23d552bbef2984afee889f82ded154478548ee15 Author: Egbert Eich <eich@suse.de> Date: Thu Mar 25 11:00:52 2004 +0000 file xorg.cfg was initially added on branch XORG-RELEASE-1-TM. commit d1e52f13ad4610ec4907432c21384d08d6aaaf27 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Mar 25 05:11:16 2004 +0000 oops commit f0336f18ee4106050104cb060c38fe87541615da Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Thu Mar 25 03:45:49 2004 +0000 built,working DAMAGE/XFIXES in mono tree commit f1394ec3cec09ff9c5fbbff3c1f595a642b25f91 Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Mar 24 22:15:25 2004 +0000 Change XFree86 Project to X.Org Foundation in localized XDarwin splash screens. commit d2bbcc0deed3a607d347ed4ef07ded9bcb44f1bb Author: Torrey Lyons <torrey@mrcla.com> Date: Wed Mar 24 22:12:34 2004 +0000 Change XFree86 Project to X.Org Foundation in XDarwin splash screen. commit 84d25a5e178835234261a63f0a1b8131c01bbe1f Author: Egbert Eich <eich@suse.de> Date: Wed Mar 24 15:58:45 2004 +0000 file xorgVersion.h was initially added on branch XORG-RELEASE-1-TM. commit 685d1630c1540e29644849254bd45708aa5763bb Author: Egbert Eich <eich@suse.de> Date: Tue Mar 23 12:46:30 2004 +0000 file xorgconfig.man was initially added on branch XORG-RELEASE-1-TM. commit 6631bd586f74f89e2dce74fe1cc25ee982883323 Author: Egbert Eich <eich@suse.de> Date: Tue Mar 23 12:46:30 2004 +0000 file xorgconfig.c was initially added on branch XORG-RELEASE-1-TM. commit 05a16f4acce3b6ef4ddafe044f96774de3f75b7c Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Mon Mar 22 13:43:35 2004 +0000 file glwindows.h was initially added on branch CYGWIN. commit 3c2e2d9ae0704931737bb0879a49a8575a07d13b Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Mar 21 22:55:35 2004 +0000 bug #357. Fix XDarwin so it builds on Mac OS X 10.2 and earlier. Merged down from -RELEASE-1-TM and -RELEASE-1 commit 122be5328ffea0a3b92612b8ea0f5b02736ac175 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Mar 19 23:16:06 2004 +0000 no bug report. Restore Credits to the hw/darwin ddx that were deleted previously. RTF may or may not be "human readable," but with a little effort it's about as readable as SGML, IMNSHO. commit 551c93da612923f8d32707adc16431979bad6fb0 Author: Harold L Hunt II <huntharo@msu.edu> Date: Mon Mar 15 04:33:23 2004 +0000 file winkeynames.h was initially added on branch CYGWIN. commit 0c97b290015186acbaadae9a9bf79f37c3d38b40 Author: Harold L Hunt II <huntharo@msu.edu> Date: Mon Mar 15 04:33:23 2004 +0000 file winkeymap.h was initially added on branch CYGWIN. commit dae90c3af98edd5e95289abd930b3872c996c503 Author: Egbert Eich <eich@suse.de> Date: Sun Mar 14 08:34:49 2004 +0000 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 commit 4e996f9d76f51e9b1e33bef610bb9c2a746c8b9c Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Mar 12 21:05:47 2004 +0000 file winpriv.c was initially added on branch CYGWIN. commit c79b4bfd15534de12aaf8eca9965403b4913ca4b Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> Date: Fri Mar 12 21:05:47 2004 +0000 file winpriv.h was initially added on branch CYGWIN. commit 24c02f84cc31475bfba27417dfef66b11c09b25c Author: Harold L Hunt II <huntharo@msu.edu> Date: Fri Mar 12 01:11:23 2004 +0000 file X-boxed.ico was initially added on branch CYGWIN. commit 45b638b87f0daf94f9fce566179775fb2889c663 Author: Daniel Stone <daniel@fooishbar.org> Date: Wed Mar 10 11:49:11 2004 +0000 Twenty link errors for Xizzle now - count 'em. 20. Get rid of all references to SCO. Change SDK include dir to $(includedir)/xizzle. Add SDK libs where necessary. Reformat to be nicer and easier to shuffle around; also, fix lib ordering so we get so much closer to the elusive final link. Shuffle common/xf86Init.c into libxizzle.a. Fix a couple of early snafus - s/BUILDXI/XINPUT/, et al; make the SDK stuff conditional as needed; fix the SBus includes. Name library os-support/libxizzleos.a, not os-support/foo/libxizzlefoo.a. Clean up ARCH_SOURCES so it's always initialised to something. Move linked libraries to _LIBADD, which somehow escaped my attention. Make inclusion of drm/libxizzlelinuxdrm.a dependent on DRI. s/VERSION/VBE_VERSION/; Axe this redundant dir. All Xizzle-specific: axe hw/xizzle/Xi, shuffle link order, fix list of required modules to be vaguely sane, add some pertinent libs/incs. commit 519f76a0867fb2711d311b7929632408c3633e37 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Sun Mar 7 23:45:10 2004 +0000 24. Update license for Xinerama code from DEC to the version requested by Compaq for X11R6.5.1 that allows redistribution without written permission from DEC. Originally X.org Defect #9263. freedesktop.org bugzilla #283. (Alan Coopersmith) commit 505fe2ba307e9270627ca7f3cb6b4e1dbacc327b Author: Egbert Eich <eich@suse.de> Date: Fri Mar 5 13:41:12 2004 +0000 23. Merged with XFree86 4.4.0. Added changes that went into infected files. Reverted darwin/bundle/**/Credits.rtf to XFree86 versions to avoid future conflicts on ASCII but not humal readable files. (There should probably be separate CreditsXorg.rtf files) (Egbert Eich). commit 1b22db1ebcf1ba98ca8519fa38210e275373f8f6 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Thu Mar 4 02:13:09 2004 +0000 21. X server crashes when X-Resource has to byte-swap. Sun bug #5007488. freedesktop.org bugzilla #267. (Alan Coopersmith) commit 47c9395969593a4e897e8c8110d5f2414e47b06a Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Mar 3 17:03:46 2004 +0000 file solaris-ia32.S was initially added on branch XORG-CURRENT. commit ed066cc67b1fca03fb38c80ecb8194b5b40963be Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Mar 3 17:03:46 2004 +0000 Enable inlining of assembly functions for inX/outX on Solaris 8 with Sun compilers commit 867451f1ab7b9870621725bd4be3dd8694c364b8 Author: Egbert Eich <eich@suse.de> Date: Wed Mar 3 12:12:50 2004 +0000 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 commit 2934f0731b3d2bc9c1e25ceab26d9e0d9cadb054 Author: Harold L Hunt II <huntharo@msu.edu> Date: Tue Mar 2 20:00:16 2004 +0000 file winvalargs.c was initially added on branch CYGWIN. commit f72efebf280547c80ff7010e32f56416e7121164 Author: Harold L Hunt II <huntharo@msu.edu> Date: Tue Mar 2 19:26:34 2004 +0000 Replace a handful of calls to ErrorF and exit(1) with a single call to FatalError. These direct calls to exit(1) made it impossible to do anything ddx-specific in these cases; note that most of these calls occur during argument processing. commit 7557d4da10cc482fcec40acadf7744b04c1615a0 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Tue Mar 2 19:00:06 2004 +0000 bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has been decided that the priority is to preserve the server's internal API/ABI so that third-party drivers that depend on symbols like noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc on Linux doesn't support ELF's weak symbols as that would have been a reasonable solution for preserving the ABI. N.B.: While symbols, i.e. functions and variables revert to the old name, I did not revert build names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and it's just a build issue that has no impact on the binary output of the build. commit 215a13aa8f537dcb62b0a2f6d335901ee47e9e9b Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Mar 1 16:38:20 2004 +0000 Add the .stab.indexstr section produced by Sun's compilers to the list of SHT_STRTAB sections with debug information to ignore when loading ELF objects. commit d87b05563dc13ba8d9825ec3bb772702dce6c9fe Author: Harold L Hunt II <huntharo@msu.edu> Date: Mon Mar 1 03:33:28 2004 +0000 file indirect.c was initially added on branch CYGWIN. commit f81d63ec5396c8d7f62ddd6ff6bab10b32493264 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Feb 29 20:11:11 2004 +0000 bug #240 Instead of both Meta keys generating Meta_L, and both Alt keys generating Alt_L, etc, fix the implementation so that you get Meta_L for the left Meta key and Meta_R for the right Meta key. Ditto for Alt, Control, and Shift. commit 6c412a43e42538a51d3a4d92a6db12b0b6cf0e9b Author: Jaymz Julian <jaymz@artificial-stupidity.net> Date: Sat Feb 28 09:47:55 2004 +0000 sdl x server so that we can x-on-x the fb stuff for ease of debugging. if anyone uses this in production, a big scary monster will eat them. hrm, perhaps i should make it have a --i-know-what-i'm-doing param that it doens't start without, heh commit bb93fef9877a885da2c6108410155fa996b19abf Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Feb 27 19:35:49 2004 +0000 bug #238 test for root-window that XFree86 fixed in their programs/Xserver/Xext/shm.c 3.37 and programs/Xserver/Xext/xvdisp.c 1.26 got zapped when Xinerama2 was merged into the tree. (Xinerama has since been reverted to 1.1, but that's another story.) commit cb718ce08eb25c3999c91b8d614fb88237fad03d Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Feb 27 16:17:12 2004 +0000 Revert to Xinerama 1.1 In order to make a "quick" release it has been decided that the priority is to preserve the server's internal API/ABI so that third-party drivers that depend on symbols like noPanoramiXExtension, etc., would not need to be recompiled. Toobad gcc on Linux doesn't support ELF's weak symbols as that would have been a reasonable solution for preserving the ABI. N.B.: While symbols, i.e. functions and variables revert to the old name, I did not revert build names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and it's just a build issue that has no impact on the binary output of the build. commit df0313d35bc89abe9374ed25533db283430716e0 Author: Egbert Eich <eich@suse.de> Date: Thu Feb 26 13:36:15 2004 +0000 readding XFree86's cvs IDs commit 147aae87fde5edeed395f77e60f0f8e812d3b6af Author: Egbert Eich <eich@suse.de> Date: Thu Feb 26 09:23:53 2004 +0000 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 commit 8844423f890194bcb0419a38249029f1997c8c66 Author: Stuart Kreitman <stuart.kreitman@sun.com> Date: Wed Feb 25 23:28:43 2004 +0000 file xevie.c was initially added on branch XEVIE. commit b052486adb9ea26f37be120966eb60cd3ac3db2f Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Wed Feb 25 21:47:10 2004 +0000 bug #230 Revert to Xinerama 1.1 In order to make a "quick" release it has been decided that the priority is to preserve the server's internal API/ABI so that third-party drivers that depend on symbols like noPanoramiXExtension, etc., would not need to be recompiled. Too bad gcc on Linux doesn't support ELF's weak symbols as that would have been a reasonable solution for preserving the ABI. N.B.: While symbols, i.e. functions and variables revert to the old name, I did not revert build names, i.e. -DXINERAMA, to the old -DPANORAMIX. There was no need, and it's just a build issue that has no impact on the binary output of the build. commit 14ab4ade74e946c09d633b15ab4d447d7b69ea29 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Tue Feb 24 15:22:40 2004 +0000 bug #214. Merge most of 4.4RC3 commit 9343c8f5ac180043c29ead5e83a3efef16d7b3f2 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Tue Feb 24 15:16:35 2004 +0000 bug #188, #214, see versions 1.1.4.3 and 1.1.4.4 of this file. fix bad merge commit 03d893bff9bf5d6be9663a21cc983873d8e8d4c7 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Mon Feb 23 21:37:29 2004 +0000 merge most of XFree86 RC3 (4.3.99.903) from vendor branch. bug #214 commit 4ee0a53de870192d57c02baffa106b10bae6e0bf Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Mon Feb 23 20:35:22 2004 +0000 Import most of XFree86 4.4RC3. This import excludes files which have the new license. If we want to, later we can import 4.4RC3 again and pick up the files that have the new license, but for now the vendor branch is "pure." commit dcdd47ebbd4e9b5f4cbb598a5217004df0e80844 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Mon Feb 23 20:35:19 2004 +0000 Initial revision commit 30ac3efde2c3f08b98f31833df4ea7d87f33b092 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Mon Feb 23 16:32:14 2004 +0000 bug #188 report bugs to X.org bugzilla, not XFree86 commit d52f3ac58fd596fca392394f16acff84115f6e1d Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Feb 18 21:43:19 2004 +0000 Additional fixes to allow building with Sun compilers on Solaris x86 commit 07109fd63e0999905e6f7df8fd7f9c713d0dc2cc Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Wed Feb 18 21:30:12 2004 +0000 Sun cc on Solaris x86 defines __i386 but not __i386__ so the x86 architecture #ifdef should accept either form commit a27ffd2678ef76453c4fa27932462425d804df6d Author: Warren Turkal <wt@penguintechs.com> Date: Wed Feb 18 02:12:44 2004 +0000 completely get rid of NeedNestedPrototypes completely get rid of NeedVarargsPrototypes remove a lot of NeedFunctionPrototypes ansify many function declarations commit d17586c4dc858d0127fa021e6db62f8cc28ef7a6 Author: Alan Coopersmith <Alan.Coopersmith@sun.com> Date: Mon Feb 16 20:19:59 2004 +0000 [fd.o bugzilla #189] _XOPEN_SOURCE defines break builds on Solaris Express commit b146ef1548d36d6897fbd674f1c3b8324bed11a7 Author: Warren Turkal <wt@penguintechs.com> Date: Sun Feb 15 15:04:57 2004 +0000 Moving toward a working input extension. commit e90274c2bba1f66a68c2bc30ddb589dbf6fa0929 Author: Egbert Eich <eich@suse.de> Date: Wed Feb 11 19:29:37 2004 +0000 2. Fixing segfaults that may happen in some corner cases when VT switching and during int10 initialization (Egbert Eich). commit 453a0743eb524da88dd364ccac86f35e61899e64 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Feb 8 00:17:31 2004 +0000 revert to RC1 version of file with the license we like commit d6f33d897221450f3cfcc1162e2a6d09b227326e Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Feb 8 00:12:27 2004 +0000 revert to RC1 version of the file with the license we like commit bd20c8d340fce0700ae813bd5b55fe7f4b9e0c98 Author: Jaymz Julian <jaymz@artificial-stupidity.net> Date: Thu Feb 5 09:09:51 2004 +0000 Polling input mode for the kdrive os layer. And a moose! commit af798d27743dbc4f70e85e297daa5863ec89640b Author: Jaymz Julian <jaymz@artificial-stupidity.net> Date: Wed Feb 4 16:08:27 2004 +0000 More NULL checks. These ones are more useful than the last (which just made debugging a bunch of problems easier), since you can implement less in the basic simplest case driver now (not that i'm lazy, mind :-p) commit 3c64b65d805915e5c5628663113c54c3e9c3013b Author: Egbert Eich <eich@suse.de> Date: Thu Jan 29 08:08:57 2004 +0000 Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 commit 2ec70aa70133190ad31a83114fdb9a218e6aa8e6 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 25 05:31:24 2004 +0000 Disable GLX visuals code on !GLXEXT, and remove a useless prototype. commit 01e9cc858ac646b3140d1d85ea9c069bc708fb28 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 25 01:30:33 2004 +0000 - Add glx visuals code based on XFree86's Radeon driver. - Reserve areas for back/depth/span when USING_DRI && GLXEXT. This would be better in a TransitionTo3d, but we'd need to work with the offscreen memory manager for that. - Misc. fixes to ati_dri.c for DRI+GLX. Needs more work still. commit f2bedd17af7c3b9241c02dc1c899f32fc0cd2f10 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 25 01:16:19 2004 +0000 Oops, turn fallback output back off. commit 26c5a8dfdd2aa09db46c4cf963ca697df3e777ef Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 25 01:04:12 2004 +0000 Whitespace cleanup. commit 6870c081572fcf32997e7906a54d09da0ca58ac3 Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 15 09:19:56 2004 +0000 Oops, lost a diff needed for the non-screen format pixmap code commit 3867e03cb63e49aeb1742a8a4bdaed0b7a23749e Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 15 09:15:53 2004 +0000 Fix up some mis-used variable names commit f233bbf3652327e62e03efbb8a355e6af2703a1c Author: Keith Packard <keithp@keithp.com> Date: Thu Jan 15 09:13:01 2004 +0000 Accelerate non-screen format pixmaps. commit 751fb0374b12679f63c922adf0f0e7cadd83d861 Author: Harold L Hunt II <huntharo@msu.edu> Date: Thu Jan 15 06:06:44 2004 +0000 file winresource.h was initially added on branch CYGWIN. commit a265167f19e37aec2173c0ca6c9955450aa69941 Author: Anders Carlsson <andersca@gnome.org> Date: Wed Jan 14 10:00:00 2004 +0000 Add IPAQ modeline by Dennis Noordsij. commit 6c97b277d9140b9d6bca047c56e303f6fc1d92e0 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 11 00:10:34 2004 +0000 Support 1x1 repeat sources in R128's Blend. commit 92702565657d48f1fcc2bae1b5989b1d6d3dd164 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jan 9 08:43:48 2004 +0000 Change PCI ID information field to be one of r128, r100, r200, r300. This is all the information we need so far. Put that information into atic, and use it correctly in the code (unlike before). commit 5d51dfc69cb245f6a1c7b106954a3365524741e2 Author: Eric Anholt <anholt@freebsd.org> Date: Fri Jan 9 08:40:32 2004 +0000 Use the scratch area for Composite when one of src or dst is in memory. commit 6d8001f4688e2149fcdd480401c46c7540680576 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 8 20:18:13 2004 +0000 Compile fixes for non-DRI case and for non-C99 compiler. commit 1be4b2d5e8048eb3653fad3a1267a0da865bcee8 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 8 08:25:49 2004 +0000 Forced commit: Previous commit included the removal of the 8192 scanline limit on offscreen memory in the fbdev case. I remember daenzer (who originally put that code in) saying he wasn't sure of it, and there doesn't seem to be any reason for that limit given how acceleration is done. commit b27729ec88f5d4153a0debfe2347bbed022329ba Author: Eric Anholt <anholt@freebsd.org> Date: Thu Jan 8 08:16:24 2004 +0000 - Add a new UploadToScratch kaa hook for putting the data for a single pixmap into temporary offscreen storage. Subsequent UploadToScratch may clobber the data of previous ones. This allows hardware acceleration of composite operations on glyphs. - Add a new UploadToScreen kaa hook for doing the actual moving of data to framebuffer. This would allow us to do things like hostdata blits or memcpy to agp and then blit. - Add an UploadToScreen on ATI which is just memcpy, but which will be replaced with a hostdata blit soon. - Add UploadToScratch on ATI and reserve 64k of scratch space. This provided a 3x speedup of rgb24text on my Radeon. commit d640cf4cb4e031a0e93dfd5955405847fe4475c0 Author: Harold L Hunt II <huntharo@msu.edu> Date: Thu Jan 8 05:10:33 2004 +0000 file winprocarg.c was initially added on branch CYGWIN. commit 77183abbc499c69fbbbae1d92a6b012c5f80b6c4 Author: Harold L Hunt II <huntharo@msu.edu> Date: Thu Jan 8 05:10:32 2004 +0000 file winglobals.c was initially added on branch CYGWIN. commit eb5bb9c1a16db308eae84ea45a5920c768d4a2ff Author: Harold L Hunt II <huntharo@msu.edu> Date: Thu Jan 8 05:10:32 2004 +0000 file winclipboardwrappers.c was initially added on branch CYGWIN. commit e93d468df21840007cbeea03ed545e75f0f0baf1 Author: Harold L Hunt II <huntharo@msu.edu> Date: Thu Jan 8 05:10:32 2004 +0000 file winauth.c was initially added on branch CYGWIN. commit 737eddfa4b6a8851e20823405b7269dd49c49b89 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jan 7 09:50:28 2004 +0000 Disconnect the sis300 driver. I've never managed to fix it, and it breaks the build on PPC. commit 5a2c23f8a18767f0eb2fe2846ca3ba18fd236284 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Jan 7 02:30:29 2004 +0000 Speed things up slightly by removing Z values from emitted vertices and by emitting as a tri fan rather than a tri list. A rect list would save an additional vertex (out of 4) per rectangle, but there's no measurable speed difference and the tri fan may be useful when transforms come into play. commit cff782078cec9b10606c5873816b7acd9977ce4d Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 4 20:51:53 2004 +0000 - Don't forget to UNINIT miComputeCompositeRegion's regions - Fix a bit of whitespace nearby. commit 34d1529731fff0cb61c71f76edc5c6499ece68d1 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Jan 4 20:47:30 2004 +0000 - Correctly set the texture coordinate set source for the second texture unit. - Re-enable Radeon's Composite accel now that fonts work again. commit 9f1a92cd092e87f774ce4ed99d4b3e15f905d4f7 Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 3 21:52:14 2004 +0000 - Call appropriate Done function for Composite. - Don't allow src transforms for Copy acceleration. - Minor whitespace fixes. commit 3db761a17b60b80acb83f365628b093f0ba6958c Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 3 11:46:57 2004 +0000 - Add more Composite operations, including Saturate, to Radeon Composite accel. I don't 100% trust that the math works for Saturate, but I can't tell from existing information. - Fix texture pitch fallback checks. - Fallback when src or mask have transforms. - Disable Radeon Composite accel until the offset thing is fixed. - Set offscreenPitch to 64 on Radeon thanks to new information and a kaa fix. Fixes acceleration at width!=1024. commit d15acfa79b64b8dab1e930ce8e5423a212a1360b Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 3 11:25:27 2004 +0000 Split the various attempts at accelerating Composite into separate functions. Along with making things more readable, it fixes a problem where the coordinates would get messed up if acceleration failed due to things like pixmaps being in the wrong locations. commit 1e1a35e20c1d281bc9700b349cda1e67f65905dd Author: Eric Anholt <anholt@freebsd.org> Date: Sat Jan 3 11:17:44 2004 +0000 Actually align the offset of allocated offscreen areas. commit 354f8f7e943d1a0732f4181420211efff27532b8 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Dec 31 23:24:33 2003 +0000 Some strange \240 character snuck into the original commit of this file. commit 5f947b04da13256e5f514c40dedb98c6e1cbe0f1 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Dec 30 08:45:53 2003 +0000 There's never a copy between different depths. Remove the check. commit c8eb20a08ee9174374b6f5ac6e79f31fce26e181 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Dec 30 08:23:56 2003 +0000 - Add new Composite hook for kdrive drivers, which only ensures that the pixmaps are offscreen and don't have alpha maps. It is the last case checked before going to software fallback - Use the new Composite hook in the ati driver to implement acceleration of most Composites that get done in an xcompmgr environment on r100 series cards. It is only available when using the DRM. There are still some corruption issues, but the DRI is still non-default and I need to get this into version control. commit adfc1ed8e1e150100accf014e46241201275138f Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 29 09:04:20 2003 +0000 Add dependency lines so that servers are rebuilt when server libraries are changed. commit df03e80ae9162ec87f503322ccbcf2846ad38bef Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 29 06:24:01 2003 +0000 Merge dri-0-1-branch to trunk. Notable changes: - Add libdrm and libdri. Portions of the DRI extension are stubbed out. - Use the DRM in the ATI driver when available. This provides a minor performance improvement in x11perf, and opens the possibility of using the 3d hardware for acceleration in the future. - Implement solid fill acceleration for Composite in KAA. - Implement Blend hook for Composite and use it on r128. - Fix a bug of mine that resulted in overuse of offscreen memory. - Fix many miscellaneous bugs in ATI driver and add PCI IDs. commit 9bea538745f1a0c14faaac0e61dee5cf86f98dc6 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Dec 28 09:56:54 2003 +0000 file kaa.h was initially added on branch dri-0-1-branch. commit fb8cd7454baec0bc0f693d222f3920ce03dde7c6 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Dec 28 09:56:54 2003 +0000 file kaapict.c was initially added on branch dri-0-1-branch. commit f388f1509cb131cdf0675415214c9610d3d322c7 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Dec 23 22:29:38 2003 +0000 file r128_blendtmp.h was initially added on branch dri-0-1-branch. commit 918958705dd97ce678b8901666c85fb359d0e013 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Dec 21 13:39:58 2003 +0000 Use a different icon commit e97c634593dd171a05aa0fa5a35d218dcc3ecfb0 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sat Dec 20 00:28:31 2003 +0000 merge XFree86 RC2 (4.3.99.902) from vendor branch commit 12e532010b9e8cb67bedd44d489c9c40dd265165 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Dec 19 20:55:39 2003 +0000 XFree86 4.3.99.902 (RC 2) commit 4b75c7f6358b28978b05ffa4b73853d936454f50 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Thu Dec 18 19:32:17 2003 +0000 First pass at "Standard" Xinerama. The sources for this came from Heather Lanigan's xinerama tree on Sourceforge.Net. No attempt has been made to handle previous, non-standard versions of the protocol. Nor has any attempt been made to preserve the ABI of previous versions -- that part will be added at a later time, and then probably only on systems that have nice object/linker semantics, e.g. ELF systems with weak symbols. commit 305c444de3baa863d7abc4221e8cebb973805847 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 8 01:55:10 2003 +0000 Add initial SiS 300-series (300, 305, 540, 630, 730) driver based off of the ATI driver. It suffers from hw/sw synchronization problems, it looks like, but may be good enough to work on Render acceleration experiments. Committing it as-is so I don't lose it again. commit 8a7481a27496c842ec2ef5bac5e4d0b5e6279deb Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sat Dec 6 13:24:29 2003 +0000 merge XFree86 4.3.99.901 (RC1) from vendor branch commit e82928826f60a2e76a670c936bd557838fc1764c Author: Kensuke Matsuzaki <zakki@peppermint.jp> Date: Fri Dec 5 03:37:26 2003 +0000 file winwin32rootlesswindow.c was initially added on branch CYGWIN. commit fc40d0a3cbee053d446032ae3150b06edf66a335 Author: Kensuke Matsuzaki <zakki@peppermint.jp> Date: Fri Dec 5 03:37:26 2003 +0000 file winwin32rootlesswndproc.c was initially added on branch CYGWIN. commit c3f26a1b989dbbf5167e6e352aebf2f53bfcc442 Author: Kensuke Matsuzaki <zakki@peppermint.jp> Date: Fri Dec 5 03:37:26 2003 +0000 file winwindowswm.c was initially added on branch CYGWIN. commit 0f06636a9a088fc27262da0f0bc9a20a3dbeab69 Author: Kensuke Matsuzaki <zakki@peppermint.jp> Date: Fri Dec 5 03:37:26 2003 +0000 file winwin32rootless.c was initially added on branch CYGWIN. commit a84f16a9ad2ed0f874d2c1816aedee96725d2657 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Thu Dec 4 22:03:38 2003 +0000 XFree86 4.3.99.901 (RC 1) commit 33fdd50a94baab1db342bfce442907db8f8ad03e Author: Keith Packard <keithp@keithp.com> Date: Tue Dec 2 01:59:38 2003 +0000 Wrap ClipNotify to see region motions during MoveWindow. Check window reorigin in PositionWindow and bump pixmap serial numbers to revalidate GCs. Fix picture clip region origin in automatic update Initialize client private 'critical' value Clean up pixmap bounds checking code to only affect contents allocated by fb. Oops. Call SourceValidate for Composite operations. Add Xchips server (vesa based) commit 6db77925406a0ee600998ad558a50190ba631649 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file radeon_sarea.h was initially added on branch dri-0-1-branch. commit 313046b42832fa2434d617997d5701157b55e7c8 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file radeon_common.h was initially added on branch dri-0-1-branch. commit 2ad126286e524392741164babe530210892c377f Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file r128_sarea.h was initially added on branch dri-0-1-branch. commit f486c136ad8d2d893cdf3aee6aa752578a6809d7 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file r128_common.h was initially added on branch dri-0-1-branch. commit 1eb63ef1b5d0ce10117196df3e81e8312a55a93c Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_sarea.h was initially added on branch dri-0-1-branch. commit 1fa5f28406f8a7ad54049e4bec129953149bd3ed Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_dri.c was initially added on branch dri-0-1-branch. commit 14ce4f2c3ebc20e5f6d57adda0a7e14229541a72 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_dri.h was initially added on branch dri-0-1-branch. commit 8887456e7d4fc1280287ed3e35c6c4464525827b Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_dripriv.h was initially added on branch dri-0-1-branch. commit 6c9e7f47357b02f41b9f1f43f7f1d9b5a139e5b6 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_draw.h was initially added on branch dri-0-1-branch. commit 2ad20d4e99d0d8ecb922507e0bfead8b7b7d4a55 Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 22:56:06 2003 +0000 file ati_drawtmp.h was initially added on branch dri-0-1-branch. commit ae2454f65698eef66b3507e586e4f8125cb1790d Author: Anders Carlsson <andersca@gnome.org> Date: Mon Dec 1 22:11:12 2003 +0000 Add support for setting the video mode. commit e31051ba26c18f6232798c5a5c4725f5ce53d6b9 Author: Phil Blundell <pb@reciva.com> Date: Mon Dec 1 21:49:41 2003 +0000 Call KdShadowUnset before fbdevSetShadow. commit 9cdd6fd9e3d6e44adf392279093f92fb6678a49c Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 04:33:36 2003 +0000 - Add fbdev mode-setting backend to Xati. It and vesa are compiled in when available, with fbdev being used by default. - Use depth 16 by default when vesa backend is used. - Add MMIO defines for PowerPC (should be in a common location). Many thanks for Michel Daenzer for much of this code. commit ec7f5539302fafd1ac7609ac423f1379f54916ab Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 03:15:13 2003 +0000 Add more RV250 PCI IDs. commit d221c484f9521c780fc3c7e88833c62e50463c6d Author: Eric Anholt <anholt@freebsd.org> Date: Mon Dec 1 01:46:42 2003 +0000 Remove sys/io.h inclusion from some files that didn't need it, and change asm/io.h to sys/io.h in vga.c, which newer Linux complains about. commit 5fd7f82390d78621a8aad959eb216b8fb7e1a97f Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sun Nov 30 16:47:13 2003 +0000 xfree86 merge commit 77836ebda2a47e04c56c5842f62fab5992909712 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sat Nov 29 16:08:53 2003 +0000 xfree86 merge commit 88193e928be7cf5a526b50ad1e0b4ac9cddef297 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Sat Nov 29 15:10:02 2003 +0000 xfree86 merge commit 0097b6fe2d1739e46e4e7726aaa481b6dc84870c Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Wed Nov 26 22:49:07 2003 +0000 merge latest (4.3.99.16) from XFree86 (vendor) branch commit d803918a9fb5f80a2d6e4b711d8e43916cd09da5 Author: Eric Anholt <anholt@freebsd.org> Date: Tue Nov 25 22:39:54 2003 +0000 Add new Radeon 9200 PCI IDs. commit adc7f9a4ebdfe11d4cd6de9388b63dfe36450b39 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Tue Nov 25 19:29:01 2003 +0000 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks commit 90f1536dd315cd265bfc7ef35058761a65a01734 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Tue Nov 25 19:29:01 2003 +0000 Initial revision commit d461855a73d8c9f51a18673aef7ce88f94a71629 Author: Eric Anholt <anholt@freebsd.org> Date: Sun Nov 23 10:12:04 2003 +0000 - Fix Radeon offscreen pixmap pitch alignment. - Remove usleeps from idle and waitavail code, recommended by keithp. - Add a workaround for apparent broken acceleration with Rage 128 and offset alignment with 8-bit acceleration (24-hack and plain 8-bit). - Minor cleanup of setup code. commit 8e09afe657b110bc1ea9e58dea81a120c343d16e Author: Eric Anholt <anholt@freebsd.org> Date: Sun Nov 23 02:08:16 2003 +0000 Add RV250 PCI IDs. commit b3247251fb7d9f2d50ef41d9c2089629544d534d Author: Eric Anholt <anholt@freebsd.org> Date: Thu Nov 20 07:49:46 2003 +0000 - Fix a bug in pitch alignment for offscren pixmaps. - Add 24-bit acceleration for Xati using the 8-bit trick from mach64. - Add offscreen pixmap support to Xati. commit 41dde24b229f4bc4738637d9cd0a86b74b9f8457 Author: Eric Anholt <anholt@freebsd.org> Date: Thu Nov 20 00:05:56 2003 +0000 - Fix confusion of depth/bitsPerPixel in ati_draw.c - Disable acceleration with 24bpp due to apparent broken acceleration. Accel at 24bpp was the cause of the crashes when people tried to use any depth over 16. XFree86 doesn't support 24 either. - Disable at < 8bpp, too. - Add the other Rage 128 PCI IDs. - Remove unnecessary setting of scissor registers (only default scissor gets used). commit 7abbcce4222958b4670873a17f67ea1ec1d958e2 Author: Eric Anholt <anholt@freebsd.org> Date: Wed Nov 19 08:32:38 2003 +0000 - Add PCI information (device/vendor id, bus location) to KdCardAttr to help with ati, and future DRM drivers. - Add new "ati" kdrive driver. It has ancestry in the r128 driver from andersca, but took a detour through being the WIP SiS 300 driver on the way. It supports Radeons (tested on QD VIVO and 7500) and Rage 128. Current limitations include that it requires depth 16 and that the other Rage 128 PCI IDs aren't included yet. commit e9cb70dae0a85fcd116d7ffac73d1322ec282a94 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 18 18:38:48 2003 +0000 Reset available offscreen segment save function pointer. (Not a functional change, just cleaning up a bit) Reset the screen->memory_base value when frame buffer is remapped. This makes sure new off-screen allocations point at the newly mapped region rather than the old (now unmapped) region. commit f333581b7b4066ab054dd765a1c9bae0f3407188 Author: Seth W. Klein <sk@sethwklein.net> Date: Tue Nov 18 04:53:16 2003 +0000 Added infrastructure for driver specific usage messages and added vesa usage message. commit 003e87717cfe378261ed1a1e7bcb2cf0d200b1b8 Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 17 22:09:12 2003 +0000 Recompute winSize/borderSize to fix them when changing redirection. Sufficient, but not always necessary. Add borderClip to damage on creation so that clients needn't guess. Fix API to FbDots functions to make PolyPoint work with screen_x/screen_y offsets Add debugging code to make sure no pictures are left pointing at freed pixmaps. "Can't" happen, but it did once. Change KdOffscreenArea structure to eliminate separate private structure, eliminate the ScreenPtr, change from doubly linked to singly linked list. Don't damage BackgroundNone windows on PW_BACKGROUND. Re-clip damage to borderClip in DamageSubtract. commit c57959ad6a4c0f5329762f401fd7871ffb2ee90c Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Mon Nov 17 19:03:47 2003 +0000 merge XFree86 4.3.0.1 to -CURRENT commit acd200770513ad03dd3f4bdc7448edfd69b1ff9d Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 17 06:54:52 2003 +0000 Clear window when Manual Subwindows redirect is destroyed Fix Tile/Stipple origin with non-zero pixmap window origins Use computed depth for TrueColor visuals as fbdev doesn't have one. commit d568221710959cf7d783e6ff0fb80fb43a231124 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Nov 14 16:49:22 2003 +0000 XFree86 4.3.0.1 commit 9508a382f8a9f241dab097d921b6d290c1c3a776 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Nov 14 16:48:57 2003 +0000 Initial revision commit ded6147bfb5d75ff1e67c858040a628b61bc17d1 Author: Kaleb Keithley <kaleb@freedesktop.org> Date: Fri Nov 14 15:54:54 2003 +0000 R6.6 is the Xorg base-line commit cb6ef07bf01e72d1a6e6e83ceb7f76d6534da941 Author: Keith Packard <keithp@keithp.com> Date: Fri Nov 14 07:46:20 2003 +0000 Accelerated image text code drew glyphs at wrong location when compositing manager enabled. commit 318d525bf2fe52b059b1568e9b31d144b297a781 Author: Keith Packard <keithp@keithp.com> Date: Thu Nov 13 09:14:29 2003 +0000 Have the composite extension tell the damage extension about clients which have redirected subwindows in manual mode. Those clients are marked Critical and given a significant scheduling boost whenever they receive a damage notify event. This dramatically improves update frequency. If the kernel reported a large number of keys, readKernelMapping would walk off the end of the kdKeysym array. Fix usage of _IOWR; the 'size' argument is actually a datatype. commit e9904cefa39e1c9d3c7bf2f335dbafb23809cdba Author: Eric Anholt <anholt@freebsd.org> Date: Tue Nov 11 05:46:15 2003 +0000 Fix Makefile.am's to include header files needed for distcheck. Remove -Werror default and add --enable-werror switch to add it back. commit 5dc119b73ffcae32c2d470b734dfa2f8af58e77e Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 10 20:35:05 2003 +0000 Fix KdXv interface to pass drawable down so that bits can be put into drawable pixmap rather than directly into the frame buffer. Rewrite logic in kdoffscreen to make space for new allocations, now deals correctly with locked areas. commit e500986657ea8b4e14a1ff4730ecda4583c75277 Author: Keith Packard <keithp@keithp.com> Date: Mon Nov 10 06:40:23 2003 +0000 Must offset composite parameters by drawable coordinates in accelerated case. commit d694b44259ff51cfca2c3ec9a58bf164010cc1ad Author: Phil Blundell <pb@reciva.com> Date: Sat Nov 8 18:51:59 2003 +0000 Avoid ugly shell error when libXdmcp isn't present. New functions. (TsInit): Register them. commit 3e18c6363454aa87e1ad8c121019bab185e613b8 Author: Keith Packard <keithp@keithp.com> Date: Sat Nov 8 00:28:19 2003 +0000 Fix KAA to work with screen_x/screen_y hacks from COMPOSITE Also add kaaComposite acceleration for simple bltblt case. commit 1280f79054dc16ccf321006cd2de53e0f53c7b70 Author: Keith Packard <keithp@keithp.com> Date: Fri Nov 7 23:29:29 2003 +0000 Ok, Composite extension is semi-working; when no-one asks for redirection, the server seems to act as before. With RedirectSubwindows (root, automatic), the server looks just like a regular X server. Now to go rewrite the (currently lame) compositing manager to get some real action on the screen. Some of the fixes here are to make valgrind quiet with various ioctls used by kdrive/linux. Also fixed a bug where fbdev initialization was out of order in fbdev.c and smi.c commit d319a0a610c90524ad29cab3c6d4d21b5298fc7f Author: Phil Blundell <pb@reciva.com> Date: Fri Nov 7 23:00:06 2003 +0000 Fix warnings. commit 598c5d549abbb819f3391a2c88432941b546a213 Author: Matthew Allum <breakfast@10.am> Date: Thu Nov 6 14:01:46 2003 +0000 tslib improvements commit 7e1a564c416f6dc337a0021b1c0e1f2cb3b27296 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 5 06:46:13 2003 +0000 Replace translucent compositing hacks with PictOpSrc to match eventual extension semantics. Replace mouse acceleration with quadratic. commit 5378236aa647ec9a723a3e5fbd2a57eb286a1938 Author: Keith Packard <keithp@keithp.com> Date: Sun Nov 2 19:56:10 2003 +0000 merge xfixes_2_branch back to HEAD commit 9e94665cf9cf0f74dff5b3cdaa4cde99e234fa45 Author: Phil Blundell <pb@reciva.com> Date: Tue Oct 28 22:28:33 2003 +0000 try /dev/misc/apm_bios if /dev/apm_bios doesn't exist commit bb99451f275827da580dcfa3b66cd0705fcc900a Author: Phil Blundell <pb@reciva.com> Date: Tue Oct 28 22:27:35 2003 +0000 move smi into VESA_SUBDIRS commit 9a05f8f7858641b780046ad69d61f21ccbb93db8 Author: Keith Packard <keithp@keithp.com> Date: Sun Oct 19 20:46:23 2003 +0000 Minor cleanups -- remove a couple of bogus KdCheckSync calls, restructure KdOffscreenSwapOut to avoid unneeded 'continue' commit 16b2ea64e7e0bd32d6dba078b4891167bd335d44 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 16 08:03:25 2003 +0000 Discard/reconstruct list of offscreen areas on VT switch so no allocations can occur while switched away. Set type of off_screen_areas member to actual type instead of pointer commit f4bcd36a386116c450ea6893ab3d08e81cea663b Author: Anders Carlsson <andersca@gnome.org> Date: Wed Oct 15 05:34:54 2003 +0000 Add a memory_base variable and use it. commit f5916edb172738c73c8f78b23981abfd8d03a079 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 15 04:59:45 2003 +0000 hw/kdrive/*/Makefile.am Libraries in local dir must not use global path or make doesn't build things in the right order (-j) hw/kdrive/mga/mga.h, mgadraw.c Fix warnings commit b3e47ce18ff9c86833fc6302b1e074912edce404 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 15 01:00:38 2003 +0000 various Split out pixmap allocation debug statements Fix bogus offscreen pixmap size test Add migration to composite function for source operands VbeDPMS Remove extraneous call to VbeGetVib. commit 28bcd2efd134bfea3daa0738c9155b36cdf84168 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 21:33:04 2003 +0000 Avoid attempting acceleration on non-screen formats (for now) Offscreen allocator API changes. commit cb46169759a833605b78409ae68c9fb57618ceba Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 21:10:53 2003 +0000 Use same assumptions as layergc about what layer kind is approprate for unwrapping pixmap operations. This makes sure the accelerated code gets invoked for pixmaps Add pixmap migration support to kaa. Can't quite automatically migrate pixmaps off-screen, but soon we will. Can kick objects out of video memory. Move per-screen linked list pointers to pixmap private. Wrap Composite in preparation for migrating pixmaps. Have kasync ignore drawable type so that pixmaps trigger sync Add KdOffscreenFini to cleanup on server reset. Switch off screen area to have only a 'save' function; moving objects to off screen memory is done by saving then freeing the area. commit 109b94951654171ada94e2ffb29568b8a1bcde77 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 05:08:35 2003 +0000 -Wall fixes. Might have fixed VESA based DPMS code as a result commit 4b844cafb2516139c8407822b61939cd6c743742 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 05:07:39 2003 +0000 Check for off-screen pixmap support in KaaDrawableIsOffscreenPixmap. -Wall fixes. Allocate pixmap private space only for screens with off-screen pixmap support commit cdf3377f6d3789628495ac64df80ac7dc235e46d Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 05:05:53 2003 +0000 -Wall fixes. Support off-screen pixmaps commit 777f31cd0b5ec387d975e6d10ae73fa325e4c311 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 05:05:28 2003 +0000 -Wall fixes. Add klinux.h to export function declarations commit a398339b6d5209a11af93a3b836b0cad326a0799 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 14 05:04:22 2003 +0000 -Wall fixes commit 44f2e82f1b463e272f4e521561f74eb14bf24082 Author: Anders Carlsson <andersca@gnome.org> Date: Mon Oct 13 02:19:47 2003 +0000 Use pixmaps instead of drawables in the kaa functions. Have the mga server support accelerated operations on offscreen pixmaps. commit 47a9fab5e286c5224047690482a2cb36a3c17b88 Author: Anders Carlsson <andersca@gnome.org> Date: Mon Oct 13 01:19:37 2003 +0000 Add support for offscreen pixmaps. commit c538fa874257a2cbf53f329d3982e7a01fefe629 Author: Anders Carlsson <andersca@gnome.org> Date: Mon Oct 13 00:56:21 2003 +0000 Fix a couple of bugs. commit a50438b4709b32ec869e232628971b0dccd27adf Author: Anders Carlsson <andersca@gnome.org> Date: Mon Oct 13 00:19:58 2003 +0000 Add offscreen memory manager and update the servers to reflect the name change for the kaa structure. commit 307f3dbd10e0c8e392865e85e9e3e4dff108df02 Author: Anders Carlsson <andersca@gnome.org> Date: Sun Oct 12 14:17:24 2003 +0000 Remove this for now. commit ab3305d0ac805d0c9e917c35b316d9b58dde2187 Author: Anders Carlsson <andersca@gnome.org> Date: Sat Oct 11 19:36:13 2003 +0000 Add ATI Rage 128 server. commit ed98d3814ee65cd9fd18eeadbd20c8fc6b4ab342 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 9 23:35:44 2003 +0000 use #if instead of #ifdef commit 4dd37de858464c576bfdcd10255a8e233a5b05d5 Author: Anders Carlsson <andersca@gnome.org> Date: Thu Oct 9 16:21:24 2003 +0000 Build smi after vesa. commit e5a1c9952f7d621493f08257c8b9456b7608c55a Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 9 07:29:31 2003 +0000 Initialize smi chip on graphics setup. Seems to help some. commit 10f721acc5e59ea4152b94246b62963f2ff9d678 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 9 07:12:01 2003 +0000 Leave iopl set to 3 so vesa module will work commit f74555e94264e6f703d399a5e0475c7283e20a88 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 9 06:36:26 2003 +0000 Add xfixes, fix smi driver to use either fbdev or vesa. Add hole mapping to vesa server by default commit 346aff7ef6f47a191c7f134b7843a634189b9e83 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 9 06:35:11 2003 +0000 Use either vesa or fbdev, selectable at compile time commit adc5b8068d5532a6f3f23e64d3c668a22d5b1504 Author: Keith Packard <keithp@keithp.com> Date: Sun Oct 5 05:22:35 2003 +0000 Fix fbdev server to allow accelerated servers on top to use RandR. Switch smi server to fbdev (vesa bios doesnt work on the Acer I have here) commit f3d8476ced1e3ba4b4ca7c9e23e98c2cc7ffcc14 Author: Phil Blundell <pb@reciva.com> Date: Sat Oct 4 02:56:54 2003 +0000 few more fixes for h3600 ts commit aae3e6dcb3d72eba6d7d8d99079782ed1bfe63bd Author: Keith Packard <keithp@keithp.com> Date: Sat Oct 4 02:43:16 2003 +0000 configure.ac Makefile.am os/oscolor.c Xext/saver.c Xext/Makefile.am hw/kdrive/linux/ts.c hw/kdrive/src/Makefile.am hw/kdrive/src/kdrive.h hw/kdrive/src/kinput.c hw/kdrive/src/kmap.c Autodetect VM86 (for vesa), AGPGART, APM, MTRR, tslib and handhelds.org touch screen. Add USE_RGB_BUILTIN and code for fileless RGB database. Add MIT-SCREEN-SAVER commit efbf205a2ac4792b71d39f8fe3ef3b1cf12697c0 Author: Phil Blundell <pb@reciva.com> Date: Fri Oct 3 15:27:46 2003 +0000 add --disable-kdrivevesa option commit 89a536f349525e642bb4cd233bc47864ed4a6ad7 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 2 02:30:28 2003 +0000 Add smi server commit 5a21f4f4d0c03e0e34f1979fd7cec8f0d19b00d4 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 1 06:43:50 2003 +0000 Add XDM cookies. Fix up support for pkgconfig X bits commit a42e31b28c493dc3d6b32cde4e72ff17fc983183 Author: Matthew Allum <breakfast@10.am> Date: Tue Sep 30 22:14:59 2003 +0000 Fixed tslib driver to handle VT switches commit a0876ade6479c40dcef63f70f4c6c5a5988edeba Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 30 20:49:47 2003 +0000 Enable maintainer mode from autogen.sh. Fix vesa build to create library before program. Remove bogus AC_SUBST lines for XSERVER_CFLAGS and XSERVER_LIBS commit e8c02296476f068bc8158d112dc15df00dddac2a Author: Matthew Allum <breakfast@10.am> Date: Tue Sep 30 20:15:14 2003 +0000 Added --enable-tslib configure option commit a42384e9356ec79510682bacf08410e87d7102ff Author: Keith Packard <keithp@keithp.com> Date: Mon Sep 29 01:42:40 2003 +0000 Use other freedesktop.org packages to build the server commit 6a098a88af174db1674662c09e2385b4e6e0bb4e Author: Anders Carlsson <andersca@gnome.org> Date: Wed Sep 24 23:36:54 2003 +0000 Add beginnings of offscreen memory manager. commit 918a8273eeabcb14fc82742cc68223d8a7c2a67a Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 24 21:07:06 2003 +0000 hw/kdrive/src/kdrive.c hw/kdrive/src/kdrive.h Add -switchCmd option to set command that is executed whenever the VT is enabled or disabled. This permits input device to be customized by external apps when switching to X. commit 20bbd750d0d359e55cbdcc86aeea6013ac665bce Author: Anders Carlsson <andersca@gnome.org> Date: Mon Sep 22 21:14:59 2003 +0000 Accelerate server. commit 49771e3f074cae3947b0084e6514a19dc4c4cad1 Author: Anders Carlsson <andersca@gnome.org> Date: Thu Sep 18 20:48:48 2003 +0000 Add mga server to the build. commit 07ab15d61d2468fc858453cdabe7296d19fc9e10 Author: Anders Carlsson <andersca@gnome.org> Date: Thu Sep 18 20:47:43 2003 +0000 Add mga server commit b260825e880615f589e2bad35491ebb598e21a0f Author: Anders Carlsson <andersca@gnome.org> Date: Thu Sep 18 14:44:57 2003 +0000 Try this. commit b889d4ba2c2e59769a3ff6fd00ee5bb395108827 Author: Anders Carlsson <andersca@gnome.org> Date: Thu Sep 18 14:42:00 2003 +0000 Try things out. commit 85ff67670c6216a8c4368a8bd70fd0434a4e0aca Author: Anders Carlsson <andersca@gnome.org> Date: Tue Sep 16 21:07:16 2003 +0000 Add fbdev server to the build. commit be12dcdcf39a30f69fe73cbb5a4acacef8024db6 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 12 07:00:19 2003 +0000 Switch to freedesktop.org libXfont commit eca43a59ec95646836f9704714823249a15747fa Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 12 01:51:16 2003 +0000 Clean up mach64 for autofoo commit 6b16b827bb125b43b41b7f8558991e90ada316de Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 12 01:49:46 2003 +0000 Add some configure options, make the mach64 server build commit ce55d3234dc34157f0fc8059a6793cdd17fa4519 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 11 05:15:08 2003 +0000 Move kdrive common sources to src dir commit 269b9dac5a96005fe38379377526592cb7930a51 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 11 05:12:51 2003 +0000 Get Xvesa building commit 0d775576b9b3cf410e9a463b87340612d34bc13d Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 11 03:26:03 2003 +0000 Add Makefile.am commit ef8977a30ccb55af8e8bbb635127efb94f232983 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 11 03:23:13 2003 +0000 More build fixes commit 14a8311bb3b6273617f7c7b70222e97835e9c8af Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 11 02:31:24 2003 +0000 Make more stuff build commit 8bc8fd8678b20dde2a3fc47ff5b617bc8046ea9f Author: Mike A. Harris <mharris@redhat.com> Date: Thu Sep 11 02:02:54 2003 +0000 POSIX sigaction cleanups - removed act.sa_restorer as it's not in POSIX and is not portable commit 514ab46ce3c6eb0163720315474cba884d029b62 Author: Anders Carlsson <andersca@gnome.org> Date: Thu Sep 11 00:47:36 2003 +0000 Start autoifying everything. commit 283a7f32c449b1970e5a484351f8396a8afd99da Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 7 19:13:03 2003 +0000 Update RCS tags, fix keyboard hang on VT switch, fix scroll wheel mice, add -rawcoord option to not transform mice on rotate, fix mtrr to use power-of-two size, add a few vesa options commit 804b89284665f19e2c92a07fadc72c25fbb3f5d9 Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 2 17:53:46 2003 +0000 Silicon motion driver for kdrive commit b923d897a51707c25b2dc62395d9765ba1a47bfe Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 2 17:53:46 2003 +0000 Initial revision commit 544ee9bb7a060d6a85b5168a2de74ff1db430c89 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Wed Apr 23 21:51:18 2003 +0000 136. Fix bug that prevented fbman from using the last partial scanline of a Mach64 framebuffer (Marc La France). 135. Make ATI Mach64 FIFO cache integrity testing optional (Marc La France). 134. Export ATI Mach64 hardware overlay as an XVideo adaptor (derived from GATOS project, Egbert Eich, Marc La France). 133. Reorganise ATI Mach64 support into separate source files (Marc La France). 132. Refine atimisc's decoding of the panel mode on server entry in an attempt to reduce the effect of atyfb bugs (Marc La France). 131. Make Rage128 and Radeon XVideo available even when 2D acceleration is disabled (Marc La France). 130. There is no longer any need to require hardware cursors during Rage128 and Radeon XVideo displays (Marc La France). 129. Initialise v4l's XVideo adaptors last (Marc La France). 128. Reduce cut&paste effects by adding more helpers to Xv (derived from #5645, Bjrn Augustsson, Marc La France). 127. Centralise a region comparison primitive into 'mi' and use it instead of local definitions throughout the server (Marc La France). 126. DPMSExtension & XvExtension driver cleanups (Marc La France). commit 870d0f8752c11c3df42185786ab1e2bd200e4de1 Author: Egbert Eich <eich@suse.de> Date: Thu Dec 12 18:29:05 2002 +0000 621. Let kbd driver test if Xserver is in suspend before handling any input events (Egbert Eich). 620. Fixed agp version checking to accept minor versions >= the specified number (Leif Delgass). commit 7827fce0b5ff600d0adc3a30eab69e8141c2e548 Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 13 16:37:39 2002 +0000 Allow input devices to be closed while the VT is switched away (needs per-driver support) commit 3eaea6608bc33633c00860008f246f59ad5687a7 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 12 22:20:42 2002 +0000 Update ipaq-specific ts driver to match generic tslib version commit 612e82053d986df70bcc9c87038244eab8c3dc13 Author: Keith Packard <keithp@keithp.com> Date: Tue Nov 5 05:28:34 2002 +0000 Clean up touch screen hacks for controlling pointer on alternate screen commit 358d887cbef4d2ec34532a364dd44205eab36c23 Author: Keith Packard <keithp@keithp.com> Date: Fri Nov 1 22:27:49 2002 +0000 Add support for ARM linux TS lib (disabled by default) in kdrive commit f0a8d06fcaf3fe0a652efa65966f4b0b0d688c12 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 31 18:29:50 2002 +0000 Refix mouse matrix computation for touch screens. Update usage message for -screen option commit 28d191680ecbcd50dc1cccec12e55a3c433fbf48 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 30 21:25:53 2002 +0000 Uninitialized mouse matrix elements commit dd7c85f108d01d207248300019e88d56012c33c9 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Oct 30 12:52:06 2002 +0000 441. Import Mesa-4.0.4, and resync with the DRI trunk (DRI Project). commit d04246c8fca4132063234ab44a68a7fac8c22261 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 18 06:31:17 2002 +0000 Changed arguments to vesaRandRSetConfig commit 7d214e2e2a2a1601ca14be6b52190c5b22611e2d Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 18 06:08:10 2002 +0000 Fix additions of RandR support in kmode.c commit 5bb4a7b6998132d574d823301333b7e119dc7213 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 18 06:00:29 2002 +0000 Fix other half of kdrive mach64 video code after randr update commit e1c304e22b1a29a5259aec1e956dbc75e0fa0138 Author: Keith Packard <keithp@keithp.com> Date: Mon Oct 14 18:01:42 2002 +0000 Add refresh rates to RandR (v1.1) commit 5804e69f4c20dcd33f69673aa82da3051e6eed3c Author: Keith Packard <keithp@keithp.com> Date: Sun Oct 13 19:35:56 2002 +0000 Custom file for rotating pcmcia screens commit b5d1c538622b21bed8eb59b557d79323f65ffbd7 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 8 21:28:05 2002 +0000 Add vtxx option to kdrive servers commit f214cab20baf57fc23389ef9b63a3e3a50b2a4f6 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 8 21:27:18 2002 +0000 Clear screen on mode switch commit b28a8c6e2a1fbc57d96d94b7445c86f94c2d8d4d Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 8 21:25:35 2002 +0000 Add another mach64 PCI id commit 9373d9186b413e1d53200b191816b9143d19c4bf Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 4 01:44:20 2002 +0000 Fix mouse mapping under reflection commit a80e1e5aed07cb57151408b0481f18e2ffb7f146 Author: Keith Packard <keithp@keithp.com> Date: Thu Oct 3 22:09:04 2002 +0000 Update kdrive servers to support reflection commit 238a2ec201a52d59a46540ddd419d8d6f6bf8daa Author: Keith Packard <keithp@keithp.com> Date: Sun Sep 29 23:39:47 2002 +0000 Update RandR to 1.0 (library version 2.0) commit 5d871996431e33b0d64ad9158e040e46770b6ee4 Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 26 02:56:48 2002 +0000 Add image transformation and sub-pixel ordering to Render commit a2637ba1f6c8417a48c95c9b65542c696ba0c8c0 Author: Egbert Eich <eich@suse.de> Date: Mon Sep 16 18:05:35 2002 +0000 319. Moved LdPreLib define after the vendor/OS specific config files as it may depend on setting done there (Egbert Eich). 318. Several fixes for cross compile environment (Egbert Eich). 317. Added code to allow for building of static only libraries with -fPIC for platforms which require it (Egbert Eich). 316. Added '-m32' to gcc flags as default for ia32 builds when gcc version is >= 3.1. This allows building a 32 bit Version of X on 64bit x86-64 (Egbert Eich). 315. Changed direct calls of ld to 'gcc -nostdlib' for Linux (Egbert Eich). 314. Changed calls to as to 'gcc -c -x assembler-with-cpp' for Linux (Egbert Eich). 313. Added '-fno-strict-aliasing' flag to gcc version >= 3.1 (Egbert Eich). Strict requires that one address must not contain pointers to different types - a feature heavily used by X (Egbert Eich). 312. Fixed a core dump problem in libXtt (?) (Egbert Eich). 311. Removed '#pragma pack' from structures that contain function pointers in x86emu. This causes problems on gcc 3.1 for ia64 (Egbert Eich). 310. Added defines for missing X types to saverproto.h (Egbert Eich). 309. Fixed compiler warings generated by gcc >= 3.1 in mesa drivers (Egbert Eich). 308. For platforms that allow both 32 and 64 bit libraries to be executed split Xlib i18n modules path into <libpath>/X11R6/lib/X11/locale/lib/common and <libpath>/X11R6/lib/X11/locale/lib64/common. 'lib64' has been defined to be the default path for 64bit shared libraries on these platforms (Egbert Eich). 307. Fixed obvious typo in OMlib (Egbert Eich). 306. Fixed code in cfb that didn't comply with C sequence rules. Modern C compilers tend to be more aggressive on code reordering (Egbert Eich). 305. Changed arguments of NoopDDA() from VarArgs to void. Handling of VarArgs by gcc isn't compatible with the way it was used on certain platforms (Egbert Eich). 304. Added support for 32bit pixmaps for 24bit overlay framebuffers in fb overlay code (Egbert Eich). 303. Fixed kdrive to print a meaningful error message instead of just core dump when no matching graphics cards is found (Egbert Eich). 302. fixed portability bug in xwd (Andreas Schwab <schwab@suse.de>) 301. fixed X Server crash, which happended each time a proportional iso10646 font was loaded with xtt backend (Yong Li <rigel863@yahoo.com>) 300. Added some ARM specific fixes to compiler.h (Uli Hecht). 299. Added a virtual 'dummy' driver (Egbert Eich). 298. Fixed core dump when certain access functions are not set in xf86Bus.c (Egbert Eich). 297. Fixed problem where SIGIO could be disabled after a server reset. 296. Added configurable list of devices the xf86Misc extension is allowed to change the mouse device to (Egbert Eich). 295. Changed default mouse type to 'auto' when generating config file with '-configure' (Egbert Eich). 294. Made sure keyboard modifier settings are consistent after exit from DGA when the xkb extension is used (Egbert Eich). 293. Disabled keyboard processing when Xserver is suspended by power management. This allows effective locking of laptops when stolen (Egbert Eich). 292. Added/improved options for lockfile syncing (Egbert Eich). 291. Added support for backup copy of Xserver logfile (Egbert Eich). 290. Fixed GetTimeInMillis() to use deltas instead of absolute time returend by gettimeofday(). This ensures time is monotonic in X (Egbert Eich). 289. Fixed xf86Misc extension to allow modification of Expps2 mice (Egbert Eich). 288. Made code in xf86MiscExt.c more readable (Egbert Eich). 287. Fixed PCI CardBus bridge handling (Egbert Eich). 286. Added code to reenable PCI bus mastering after coming back from a VT switch to radeon driver (Charl P. Botha <http://cpbotha.net/>) (Egbert Eich). 285. Dito for r128 driver (M. Harris). 284. Dito for glint and mga driver (Egbert Eich). 283. Fixed double scan issues for low res modes in C&T driver (Egbert Eich). 282. Set rgbBits to 8 for all HiQV chips in chips driver (Egbert Eich). 281. Moved initialization of accel funtions past initialization of offscreen fb manager in chips driver (Egbert Eich). 280. Fixed initialization of video in chips driver (?). 279. Fixed HALlib problem restoring text mode on G550 (Egbert Eich). 278. Restructured and included Matrox's Merged Framebuffer changes to mga driver (Egbert Eich). 277. G450/550 clockchip programming fixes (Matrox). 276. Fixed HW Cursor for HALlib frame granularity (Egbert Eich). 275. Enabling 2D accel in 24-bit for neomagic 2360 and 2380 (Egbert Eich). 274. Added support for builtin 1024x480 mode of Sony subnotebooks for Neomagic driver (Egbert Eich). 273. Fixed support for lowRes (320x240) modes in neomagic driver (Egbert Eich). 272. Fixed RAC function registration in S3 driver (Egbert Eich). 271. Added some voodoo to screen initialization of S3 driver (Egbert Eich). 270. Fixed vbe/int10 support in SMI driver. It used to core dump when BIOS was not usable (Egbert Eich). 269. Separated BRIGHTNESS and and CAPTURE_BRIGNTESS video attributes in smi driver: CAPTURE_BRIGHTNESS refers to the capture chip (ie. Philips SAA7110) while BRIGHTNESS controls the video overlay of the SMI chip itself (Egbert Eich). 268. Disable automatic loading of DRI when running SUN ffb as this is inconsistent with other drivers (Thorsten Kukuk). 267. Fixed Gamma/Brightness code in trident driver (Egbert Eich). 266. Added FpDelay debugging option (Egbert Eich). 260. Fixed video support for Trident 9397 (Egbert Eich). 265. Fixed Cursor/VT switch support for vmware driver (Egbert Eich). 264. Fixed Blit problems in vmware driver when running KDE (Egbert Eich). 263. Added RENDER support to vmware driver (Egbert Eich). 262. Added C&T 69030 to extrapci.ids (Egbert Eich). 261. Improved mouse autodetection code (Egbert Eich). 260. Restructured int10 code so that vm86 and x86emu support can be loaded as modules. Implemented heuristic to try vm86 first and fall back to x86emu. This allows 32 bit Xservers to run on x86_64 on 64-bit kernel without vm86 support (Egbert Eich). 259. Restructured elf loader: determine which section to load from elfheader flags (Egbert Eich). 258. Adding RENDER Support to RAC (Egbert Eich). 257. Using borderClip instead of borderSize region for redisplay function in miext/shadow code to avoid core dumps when vt switched away (Egbert Eich). 256. Replacing sprintf() by snprintf() in lbxproxy to eliminate possible buffer overrun exploits (Egbert Eich). 255. KP_Decimal fixes to Czech and Slovak keybards (Jan Holesovsky <kendy@suse.cz>) (Egbert Eich). commit 2698ee9f29189a44de1c92df99f48d45f0111577 Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 15 18:07:57 2002 +0000 Prefer touchscreen to mouse commit fe477855d7d714c154dc9fcb1d0aa67fb8e4e5a5 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 2 16:30:50 2002 +0000 Fix for iPaq IOCTL changes commit cf49ce6f26caee30f4160e6e0b2b658863e7a145 Author: Keith Packard <keithp@keithp.com> Date: Fri Aug 2 16:15:02 2002 +0000 Allow both touchscreen and mouse at the same time commit 1a5f923c62dcffb3a81c6532f3dc071c70345cb3 Author: David Dawes <dawes@xfree86.org> Date: Tue Jun 4 22:19:58 2002 +0000 174. Fix makedepend so that it can parse a unary '+' operator (#5185, Mark Snitily). 173. Fix a typo in Xvesa's emulation of instructions forbidden in vm86 mode (#5184, Juliusz Chroboczek) 172. Fix a bounds check in Xlib's Region code (#5183, Owen Taylor). commit 98f8d7af3cb7a10cc268a8bdd3039539b1bf90f2 Author: Keith Packard <keithp@keithp.com> Date: Tue Feb 19 00:18:05 2002 +0000 kdrive/vesa: apply vm86 patch from Juliusz commit 6d8cedf68c7803330bc920cf7506727c4ad6108c Author: Keith Packard <keithp@keithp.com> Date: Thu Feb 14 16:08:05 2002 +0000 update kdrive manual and usage commit 44b20bfa587def11f3127980e67ff47e695c3e51 Author: Keith Packard <keithp@keithp.com> Date: Fri Feb 1 00:52:15 2002 +0000 kdrive/mach64: recognize the mach64li commit 3abb3e073961986137f8fec1f194c60636b9e864 Author: Keith Packard <keithp@keithp.com> Date: Fri Jan 18 16:25:19 2002 +0000 kdrive: fix button emulation for iPAQ commit 88810cfc02941d7e54924e25aa872e5cc740d274 Author: Keith Packard <keithp@keithp.com> Date: Thu Dec 20 16:47:30 2001 +0000 kdrive/linux/mouse.c: convert mouse data to signed values for compilers with default unsigned chars commit 83388cb23282471e80d513bd3ab472b51c110b35 Author: Keith Packard <keithp@keithp.com> Date: Mon Dec 10 16:34:20 2001 +0000 kdrive/i810: bit swap for i810 cursor (from Pontus Lidman) commit 4646a6c3b925676039f50bacb4f3c780f6e81bcc Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 7 02:19:04 2001 +0000 kdrive: work around ipaq touch screen compile problems commit 54feb8a4c8f0e0cb6eb40b494171fa4f3552cfc3 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 7 02:18:19 2001 +0000 kdrive: missing registration for mouse input type commit 636390fb9d6314e506f593da6556fa198b4e9bf6 Author: Keith Packard <keithp@keithp.com> Date: Thu Nov 22 23:38:21 2001 +0000 kdrive: initialize all Linux mouse driver fields commit 668c25a769044f06ed47a3145a11aceeb9574c9d Author: Keith Packard <keithp@keithp.com> Date: Thu Nov 8 10:26:24 2001 +0000 kdrive: fix ALTGR keyboard mappings commit e76c6b2acae5622dd2d4944cd6f3673dbc70a571 Author: Keith Packard <keithp@keithp.com> Date: Thu Nov 8 09:35:08 2001 +0000 kdrive/linux: update ps/2 mouse detection/configuration code from FreeBSD bits commit 6fafe3b092f799da788a1ae75be1c23da42f0983 Author: Keith Packard <keithp@keithp.com> Date: Thu Nov 8 09:33:51 2001 +0000 kdrive: Open APM device r/w for kernel 2.4.14 commit 2f2e256de71c42b7856440ec43b1c122019b95b7 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Mon Oct 29 16:34:56 2001 +0000 DPMS warning fix commit b8d90c5ea4659a01694864e6c05a563dcea296eb Author: Marc Aurele La France <tsi@ualberta.edu> Date: Sun Oct 28 03:33:10 2001 +0000 407. Fix for threaded libraries (Marc La France). 406. Finish removal of SuperProbe (Marc La France). 405. A rather large number of warning fixes throughout (Marc La France). 404. Fix bug in HTML install script (Marc La France). 403. Missing ident lines for some XFree86-modified files (Marc La France). 402. Add default half-width doublescanned modes (Marc La France). 401. Mark all driver-registered resources with ResBus (Maarc La France). 400. Fix DPMS-related build problem (Marc La France). 399. Log a message just before calling each ChipProbe() during '-probe' processing (Marc La France). 398. Temporarily disable ISA probing on SPARCs and PowerPCs (Marc La France). 397. Add PCI IDs for Sun hardware (Marc La France). 396. Fix memory leak in resource relocation (Marc La France). 395. Do not relocate resources that only conflict with disabled non-video PCI devices or disabled PCI ROMs (Marc La France). 394. Re-organise SBUS code (Marc La France). 393. Add as-yet-unused definitions for PCI resource types other than I/O and memory (Marc La France). 392. Add doc for Solaris, but don't format it yet (Marc La France). 391. Normalise driver names (Marc La France). 390. For SPARCs, disable DGA support in ATI driver (Marc La France). 389. Clean up some debugging messages (Marc La France). 388. Fix newport driver for when a /proc fs isn't mounted (Marc La France). 387. Fix DAC handling bugs in s3 driver (Marc La France). 386. Fix resource registration bug for PCI Tseng's (Marc La France). 385. Add aperture driver for Solaris (not yet used) (Marc La France). 384. Rework scanpci to fix problems that prevented it from completely displaying non-PCI bridges and Simba bridges (Marc La France). 383. Fix build problems in some input drivers (Marc La France). 382. Fix int10 compile problem for SPARCs and PowerPCs (Marc La France). 381. Ensure master aborts on secondary buses complete normally during PCI scans (Marc La France). 380. Some memory mapping and Solaris cleanups (Marc La France). commit a8518b35617a479f50c735c015115b853f4aa327 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 24 20:14:52 2001 +0000 kdrive/savage: Long lines cant be drawn with accelerator commit 28fd5f7525848cf0109f9cf2d6311f3717570a5d Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 12 06:33:12 2001 +0000 kdrive: add new auto-detecting and auto-switching mouse driver commit 5f310d7f8b566b1e331286752d349f87ef43a811 Author: Keith Packard <keithp@keithp.com> Date: Sat Sep 29 04:16:39 2001 +0000 kdrive: restructure APM/VT switch support to reset keyboard state and flush buffer on APM resume commit bb2e1c53b58ac94539f0d11ae195186a9ee0a2f7 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 21 21:58:34 2001 +0000 hw/kdrive: Xv window private should be allocated on demand commit 59cd35f634468acfa2e48711da09fabc811d96f9 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 14 19:25:17 2001 +0000 hw/kdrive/vesa: initialize mouse matrix for non-rotated case correctly commit fbaf3ceae0519ebdfee4b6a73b1bc0000f141cf2 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 14 19:24:11 2001 +0000 hw/kdrive/trident: solid fill checks busted for planemasking commit 216090d1aedb23c691a75da25b14d8543b932e1c Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 5 07:12:43 2001 +0000 kdrive: Add primitive ct65550 server. Update kdrive/vesa code to support DPMS using VESA bios routines. Include support for Toshiba SMM DPMS as well commit f856b952ec7251d6e95f0b93d62fb026d07b0ebc Author: David Dawes <dawes@xfree86.org> Date: Thu Aug 9 20:45:15 2001 +0000 187. Add an MS mouse driver for KDrive (#4754, Juliusz Chroboczek). commit f4db75ac431c14e0c24ff7549c6ce1e3b0b86b87 Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 9 09:08:55 2001 +0000 kdrive/mach64: support Xv under RandR commit 628d7695d1696f6f5cba6ea1f2548aa5d0f38c80 Author: Keith Packard <keithp@keithp.com> Date: Thu Aug 9 09:06:08 2001 +0000 kdrive: disable sigio debugging commit 958c0374a6709386e91b4b3ed7ba8fa81d415ebf Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 24 21:26:17 2001 +0000 kdrive: add apm support, fix MTRR unmapping bug commit b7eb8a35b51aa2edc9ff59f091ee88ea7000b757 Author: Keith Packard <keithp@keithp.com> Date: Tue Jul 24 19:06:04 2001 +0000 kdrive: Unmap vesa device when disabled commit d2d221a012950b98e48e47b6dea38e6ad385fef8 Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 23 03:44:17 2001 +0000 kdrive/mach64: Force read of GUI_STAT on every op to avoid problems across suspend/resume commit 79486b3b5c792a990cb73b4efa453218262e605f Author: Keith Packard <keithp@keithp.com> Date: Fri Jul 20 19:35:30 2001 +0000 Too many changes, but all in kdrive: Add support for global screen origins (-origin option), handles both Xinerama and mouse crossings. Fix XV enable/disable sequences -- can't use card wrappers as cards have more than one screen. Change vesa/fbdev to use new depth-independent rotation shadow update Fix vesa to allow starting rotation value (again) Make vesa driver write all colormap changes in one INT10 call commit 9826d5a1339570c037ae1ef29c9a237874a6ffa2 Author: Keith Packard <keithp@keithp.com> Date: Thu Jul 19 08:46:30 2001 +0000 kdrive/fbdev: only setting first colormap entry on static hardware commit 35d8b5f44269c97497c73d3638b8f0345757c04c Author: Keith Packard <keithp@keithp.com> Date: Mon Jul 16 19:48:00 2001 +0000 kdrive/fbdev: fix static color case commit 090a429573dfb965ebc4ea8ea57e3bef5f9a8539 Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 11 16:42:17 2001 +0000 kdrive/fbdev: dont set DPMS mode repeatedly to the same value commit 99fb2eb76d8f93578e4aba75c73b9be0766f7b6f Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 11 05:02:24 2001 +0000 Generalize kludge in fbdev that normalizes pixel formats to something that Render can handle commit 562474091a3d52a062eb89d25a7d38200a785425 Author: Keith Packard <keithp@keithp.com> Date: Wed Jul 11 02:58:19 2001 +0000 Fix TOUCHSCREEN support in kdrive commit 67cd53abfce7ed17ae4c428332a9e0fd908da97a Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 29 14:00:41 2001 +0000 Rework kdrive input fd handling, enable multiple simultaneous mice commit c872ee82045e8c7ce019df2577d06bec549cd71c Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 29 13:57:45 2001 +0000 kdrive: typo in MTRR calculations commit 63dd090655ba995b8f26386bb50cb5b7568f7da0 Author: Keith Packard <keithp@keithp.com> Date: Fri Jun 29 13:55:53 2001 +0000 kdrive: dont touch hardware when disabled commit 01a53daa03a8ee36ce136dde3a9a9b152e9c2e2f Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 23 03:41:24 2001 +0000 Clean up mach64 video code to add ReputVideo and make StopVideo not crash the machine commit 31d47ec8bed1b02d04563ba502eaeb028975f653 Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 21 21:44:09 2001 +0000 kdrive/mach64: remove useless Xv debug printfs commit bd61c15279e2195c72b3add32961ed21e293d48b Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 21 01:01:30 2001 +0000 Add RCS tag commit 66c9184807997d2a0a155ba1697906c07396863f Author: Keith Packard <keithp@keithp.com> Date: Thu Jun 21 00:58:51 2001 +0000 Fix screen physical size in RandR code for kdrive fbdev and pcmcia servers commit f8a456f094d8f61c021bbfb6e6f0a4723ebdc73f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed Jun 20 21:53:31 2001 +0000 Add RandR support to the Kdrive pcmcia driver. commit 918ff10f2697ee8c17013bd31596072a38c5ac9b Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 19 09:31:47 2001 +0000 Finish Xv support for kdrive/mach64 commit 6d86517b0ed0db51f3eaf19c186db52feb1e47e0 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 16 05:53:05 2001 +0000 Screen flipping broken pointer remapping commit 54aea8ec0c1c3633788fd9b19636093860c75d53 Author: Keith Packard <keithp@keithp.com> Date: Sat Jun 16 05:48:49 2001 +0000 Patch DPMS support in kdrive/mach64, add preliminary (broken) Xv support commit f386ca6c69ba10cd8c0dd60bb25cde37ecfc8bc7 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 13 19:18:44 2001 +0000 Support initial rotation in kdrive/fbdev, use that as the normal orientation commit 93dbdc89c172fd5d6450f21ebc91011771ac0100 Author: Keith Packard <keithp@keithp.com> Date: Wed Jun 13 19:18:03 2001 +0000 Add -dpi support to kdrive commit a6517a3056a88fca35a47185a0e6d83f3e8b0015 Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 11 01:38:54 2001 +0000 Advertise supported rotations in kdrive/vesa server commit 4f8254b31f30bd12224c2fdcecfbd67b41ecd7e1 Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 5 17:17:39 2001 +0000 Attempt to make kdrive/fbdev run on static gray hardware (iPaq 3150) commit bf4dbfbf45e4e6b1b86c624b1995a1050b7a0eef Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Tue Jun 5 16:57:44 2001 +0000 fix some warnings due to new shadow code commit a4ba10ba6ffb1c01a0df5b34669b9fb24ad0e7d9 Author: Keith Packard <keithp@keithp.com> Date: Tue Jun 5 16:49:31 2001 +0000 kdrive/fbdev: RandR initialization sequence change commit 7fcf46356ba70563f036f535e60667727db442ae Author: Keith Packard <keithp@keithp.com> Date: Mon Jun 4 09:45:42 2001 +0000 Allow for hardware acceleration under RandR with Layer. Hardware/Software cursor switching still busted commit 54e66d92db917923e33e018e628a7629d6705507 Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 3 21:52:46 2001 +0000 Update RandR protocol commit 88ae32841d766c7d0df79ee25e1db62996d4ecb3 Author: Keith Packard <keithp@keithp.com> Date: Sun Jun 3 18:48:19 2001 +0000 Add mach64 driver to Tiny-X commit 14ed0c3d6d674df4edcbcd8840a7cea4b41a0673 Author: Keith Packard <keithp@keithp.com> Date: Wed May 30 15:36:25 2001 +0000 Fix kaa to not try Copy for pixmap sources commit a2bd75d15a99d4ee117e17921f0426228d53f5e8 Author: Keith Packard <keithp@keithp.com> Date: Tue May 29 21:55:41 2001 +0000 Xfbdev: Make sure screen gets re-enabled on RandR failure commit 562925c439cf1746f2caa720d4f2dce54ba0311b Author: Keith Packard <keithp@keithp.com> Date: Tue May 29 17:47:55 2001 +0000 Fix Xipaq build after layer/RandR additions commit 78b53386b51cde4fe4664963ddafa36b814360f2 Author: Keith Packard <keithp@keithp.com> Date: Tue May 29 04:54:13 2001 +0000 Add miext/layer for more complete RandR support in kdrive/Xfbdev commit 06f758797ab3651b0e293ae26daf4df77702fdde Author: Keith Packard <keithp@keithp.com> Date: Sat May 26 01:25:42 2001 +0000 Add initial RandR support to Xvesa commit ba8351609869165aa2de92b7a876dc2d2768cb5b Author: David Dawes <dawes@xfree86.org> Date: Fri May 25 18:40:59 2001 +0000 38. Fix xmh's use of XtNewString() with getenv (#4694, Tim Waugh). 37. Xdm/PAM fixes: leave it to PAM to observe whether or not an account is locked, and reinitialize credentials after calling initgroups(), because sometimes the credentials pam_setcred() gives are in the form of group membership (#4693, Mike Harris). 35. Fix warnings when building mieq.c (#4689, Adam Sulmicki). 34. Fix some bugs in the cz and sk entried in XKB's keymap/xfree86 file (#4692, Ivan Pascal). 33. Add 'hr' entries to XKB's keymap/xfree86 and rules/xfree86.lst files (#4687, Nerijus Baliunas). 32. Include <X11/Xutil.h> in shape.h to get Region typedef (#4686, Adam Sulmicki). commit e9314bd34ec39cc699591123cc8a05a934b66b85 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Fri May 25 07:44:29 2001 +0000 wrap some stuff around #ifdef TOUCHSCREEN commit e6497f39af98cd25719eab72b0be04fa4146172f Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Thu May 24 19:31:46 2001 +0000 fix ifdef->if commit 0e1a49a7dd00ae494d92ab480d9776ec5320cb3e Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed May 23 17:28:39 2001 +0000 add missing pieces for the pcmcia driver commit 85d827f5329fa93dea1125788457fac6835cd134 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Wed May 23 08:56:09 2001 +0000 Add PCMCIA server for HP VGA Out PC Card and the Voyager VGA Card. Use on the Compaq IPAQ. Use -listmodes to see supported modes. Hack the touchscreen driver to work as a mouse pad for the VGA screen. Fixup key bindings so xmodmap can remap IPAQ's buttons as mouse buttons. commit f9104754cda1212cf48d6d24a0a586c5368d7549 Author: Keith Packard <keithp@keithp.com> Date: Wed May 23 03:29:44 2001 +0000 Add RandR extension commit dc383e8f77f99e8c2b799a6ab4e4998a1fcacb24 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Sun Apr 1 14:00:04 2001 +0000 317. glxinfo needs libGLU (Marc La France). 316. Rage128 fix to Cards database (Marc La France). 315. Minor fix to PCI resource overlap handling (Marc La France). 314. Loader code simplification and IA-64 cache flushes (Marc La France). 313. Workaround in the ATI driver for troublesome interaction between loader and compiler optimisation (Marc La France). 312. Warning fixes for `gcc -fno-builtin`, which appears to be the default on some systems (Marc La France). more of #301, tags, warnings and build fixes. commit 518e205b06d0dc7a0cd35fbc2c6a4376f2959020 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 30 17:35:55 2001 +0000 kdrive/igs: add missing register definitions that used to be in igsregs.t commit eb3da37564593b7c9fb574af824e2f5e0cc6bb24 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 30 02:18:41 2001 +0000 Add files for Xmuu and i810 driver commit f39a62d122b6e63e2971d8593bf6b24933f66ec8 Author: Keith Packard <keithp@keithp.com> Date: Fri Mar 30 02:15:20 2001 +0000 Add Xmuu library to remove requirement for Xt/Xaw from most X utilities Add i810 and Xv support to kdrive commit a161cfd72870ae6dca66ef02f5cdd13b7ac75fd6 Author: David Dawes <dawes@xfree86.org> Date: Wed Mar 21 16:43:16 2001 +0000 remove Id line commit 0aa54b4d409647778b563d77ef6100085d86c6f3 Author: David Dawes <dawes@xfree86.org> Date: Tue Feb 13 21:15:15 2001 +0000 144. Fix the neomagic driver so that it saves/restores the palette (#4452, Ken Hornstein). 143. Fix a palette saving bug in the vgahw module (#4452, Ken Hornstein). 142. Fix a typo in Xfbdev.man (#4446, Juliusz Chroboczek). 141. Major updates to the savage driver, including: - DDC support - I2C support - XVideo YUV overlay support for Savage/MX and Savage/IX - DGA support - yanks Ani Joshi's depth/bitsPerPixel patch for searching the BIOS - fixes interactions with frame buffer and SVGATextMode consoles; VT switching now seems quite reliable for almost everyone - yanks unused options - adds new options for hacks to deal with the status register hangs - adds one special case memory configuration for Savage 4 - adds support for doublescan modes (320x240 works) - adds LCD panel detection - fixes a panning bug at depth 24 (panning must be to even pixels) - adds a workaround for bugs in the latest ProSavage BIOSes (#4445, 4448, Tim Roberts). 140. Make 'X -configure' use the long monitor name when present in the DDC info (#4444, Andrew C. Aitchison). 139. Make glxinfo respect $DISPLAY (#4443, Meelis Roos). 138. Fix TrueType font problems in 4.0.2 (#4439, Juliusz Chroboczek). 137. Document the "DisplaySize" keyword in the XF86Config man page (#4438, Andrew C. Aitchison). commit 3dfa6cce9938413e10cc400ba6d9b19b8f28e485 Author: David Dawes <dawes@xfree86.org> Date: Sat Jan 27 18:20:40 2001 +0000 88. Set the version strings in man pages dynamically (David Dawes). 87. Remove the XF86_VERSION string from xf86Version.h, leaving just the numerical values. All the version information is now derived from that single set of values (David Dawes). commit 60c7a912e257045d1189a19a38d9dbedc20ae78b Author: David Dawes <dawes@xfree86.org> Date: Wed Jan 24 00:06:10 2001 +0000 79. Preprocess all man pages to make sure that the references to pages in sections that are platform-dependent are correct. Also fixed some misc formatting problems found while doing that (David Dawes). commit dacbf5671da08d161cd7a32496e0b58f50a93453 Author: Keith Packard <keithp@keithp.com> Date: Tue Jan 23 06:25:05 2001 +0000 Integrate jg patch for iPAQ commit 2869e08a328cb6aa51c17b96bdebd37e9eeefc88 Author: Keith Packard <keithp@keithp.com> Date: Wed Dec 13 18:06:54 2000 +0000 kdrive: non-x86 compiles broken in kmap.c commit ec4916836c42cb4a1dc1622dddd27951a90a52c9 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 8 23:04:57 2000 +0000 kdrive: dont try MTRR on non-x86, fix backspace mapping commit d09a156d92dbcd9368be20dabe47ea197f19357e Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 8 22:59:37 2000 +0000 kdrive: allow screen size specification commit 6b61d48f2146f18c94d5f2b3d16a822c0eee9841 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 8 21:40:29 2000 +0000 kdrive/vesa: type cast warning fix commit b59eabd230110d604515868893d9aa06e6d3b748 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 8 21:40:02 2000 +0000 kdrive: A few iPAQ inspired changes to event management commit a25637fe789c5127451233c759074780cbc110ac Author: David Dawes <dawes@xfree86.org> Date: Mon Dec 4 21:01:00 2000 +0000 missing ident lines commit 1adbdf76a903aa37d553c1c2cc43a783f21acaa5 Author: Keith Packard <keithp@keithp.com> Date: Fri Dec 1 00:01:32 2000 +0000 kdrive: add Xkdrive/Xfbdev man pages, update Xvesa manual commit 5f8e75f27d49719f5fd07d48481435f93779da6c Author: Keith Packard <keithp@keithp.com> Date: Wed Nov 29 08:42:25 2000 +0000 kdrive: add MTRR support, add clock support to trident driver commit 02568ec5a8f278faaa26c973fcb424da3fd31f2b Author: Keith Packard <keithp@keithp.com> Date: Sun Nov 19 20:51:12 2000 +0000 kdrive: vesa get mode using uninitialized value commit 8f634a6516caca0e4be875e696820a820e480cff Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 20 00:19:51 2000 +0000 Add VGA BIOS modes to Tiny-X Xvesa server commit f16d5d6817f15be35293ee995d073eb57fafe283 Author: Keith Packard <keithp@keithp.com> Date: Wed Oct 11 06:04:40 2000 +0000 Add composite operator support to trident commit d579bd5676ea570a8f2765cd2f6ba40074171593 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Tue Oct 10 14:05:48 2000 +0000 Static build fix and ident lines. commit 5f5b9ed1ad0591d70354c2b90609051d169fc33e Author: Keith Packard <keithp@keithp.com> Date: Sun Oct 8 02:08:39 2000 +0000 kdrive: Add timeout to screen switching to avoid unintentional flipping commit fb8b58270fcaee236337d3818df04e651acbcea9 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 6 22:13:40 2000 +0000 kdrive: support jgs new linux keysyms commit 15d45ffbd9af5ccce07264d6182b2222c417a2a5 Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 6 22:05:53 2000 +0000 kdrive: fix any-edge screen-switching behaviour commit fae164a4958b95e3ba4e4d5125da4611fcb14f6d Author: Keith Packard <keithp@keithp.com> Date: Fri Oct 6 05:54:09 2000 +0000 kdrive: ignore mouse/keyboard fds in WakeupHandler while switched away commit b814019be970bc45f808ec19eef0a48b789d6646 Author: Keith Packard <keithp@keithp.com> Date: Tue Oct 3 17:22:14 2000 +0000 kdrive: zero out fbdev screen private as its supposed to be commit e0ccbaab226bd3e1d619d66c9ec718c67c0a559a Author: Keith Packard <keithp@keithp.com> Date: Thu Sep 28 20:58:21 2000 +0000 kdrive: fix typo initializing touch screen commit 6171187e92152a443f7d5dd7f0dad866b3e275ea Author: Keith Packard <keithp@keithp.com> Date: Wed Sep 27 20:47:37 2000 +0000 kdrive: memory/fd leaks fixed in fbdev/vesa/trident drivers commit 367cab99ece8655bbd8a65096bb68bcfd7ef6fea Author: Marc Aurele La France <tsi@ualberta.edu> Date: Tue Sep 26 15:57:04 2000 +0000 721. PCI chip ID updates to ATI driver (Marc La France). 720. Fix i810 driver for -probe and -configure (Marc La France). 719. Change message when default modes are deleted (Marc La France). 718. Fix Xinerama byte swapping bug (Marc La France). 717. IA-64 and Alpha fixes for pswrap, Mesa, DRI, Xpm, libX11, Xt, Xaw, Xmu, dps, Type1 fonts, cfb24, most output drivers, ELF loader, ramdac module, xf4bpp and xf86cfg (Marc La France). 716. Improve IA-64 support by removing a plethora of 32-bit'isms (Marc La France). 715. Default HasLinuxDoc to NO (Marc La France). ident lines and warning fixes. commit 94368c3b92b8513d5135fb3c20165f108b0e96fd Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 26 04:31:23 2000 +0000 kdrive: Add iPAQ and Touch screen support commit 03e3689701007ea40422b4d729b65aaebcd84869 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Sun Sep 24 13:52:40 2000 +0000 reversed a tag accidentally - put it back. commit 61e8a40f0d4e886bec96c3f9ee90433a3fab9d54 Author: Alan Hourihane <alanh@fairlite.demon.co.uk> Date: Sun Sep 24 13:51:22 2000 +0000 DRI merge commit 2bbb90ebd927607e0b2c7cd8f3a402b44705fe03 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 22 06:25:29 2000 +0000 Changes for PPC support under linux and a few overlay additions commit 02777941e6ac8c79f934ba95b6b2e7f388ffbd14 Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 19 23:50:48 2000 +0000 kdrive: fix bug in vesa 4plane in 8bpp mode commit 5b9f49f64c7fb51afbfaab4f848fc7d67851582c Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 19 23:49:55 2000 +0000 kdrive: use VESA instead of FBDEV for trident driver commit 18692160c964c80ba83b63bc207660b6254e11cb Author: Keith Packard <keithp@keithp.com> Date: Tue Sep 19 23:49:17 2000 +0000 kdrive: make sure allocation worked before accessing commit d6e151ce4deaff506c580da7e3baf055db1c3ae3 Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 15 15:19:00 2000 +0000 Tiny-X: Add mouse matrix to rotate mouse, allow enable to fail, add render by default commit f7421d836186cd6dfb919c5a48d556a68d6c5a5d Author: Keith Packard <keithp@keithp.com> Date: Fri Sep 15 07:25:13 2000 +0000 Add rotation to fbdev and vesa commit 5ec29fe9ea788e0dcc47534a2eca479b2c465160 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Thu Sep 7 19:44:26 2000 +0000 Ident lines commit db1a883d32ce8138dde288d32c11e147cdfc81a0 Author: Keith Packard <keithp@keithp.com> Date: Sun Sep 3 05:12:28 2000 +0000 Rework tiny-x vesa driver for shadowing and multiple screen support. Allow enable to fail and avoid crashing commit c97fb611dd7dedef6d075ef9d56f3d32c8018d39 Author: Keith Packard <keithp@keithp.com> Date: Sun Sep 3 05:11:46 2000 +0000 Rework vesa driver for shadowing and multiple screen support. Allow enable to fail and avoid crashing commit 38059656849a5bab5b56b23359a90aca4ba396c7 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 29 17:20:15 2000 +0000 Use VESA driver underneath commit 77331f967077ca2fefbfb117c7e9bc2bf65b5e31 Author: Keith Packard <keithp@keithp.com> Date: Tue Aug 29 17:19:51 2000 +0000 Changes from Juliusz for emulating some in/out insns, make ready for other layers to use commit 3095deed7701a1a14be85dff4a6994028b5a6d09 Author: David Dawes <dawes@xfree86.org> Date: Mon Aug 28 15:29:19 2000 +0000 565. Support for multithreaded libraries on NetBSD when used in conjunction with the GNU pth library (#4113, Chris Sekiya). 564. Add /usr/pkg/bin to NetBSD's DefaultUserPath (#4112, Bernd Ernesti). 563. Add a (Linux-specific) VESA driver for Keith's small X server (#4111, Juliusz Chroboczek). 562. Update Hungarian xkb maps (#A.145, Peter Soos). remove koi8-r encoding file since it's built-in commit f32448679118b77825625aafdc4d6ae4d636cc21 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Mon Aug 28 02:43:14 2000 +0000 Ident lines commit 83a388c96d665b6bfb0ae195c8c74e0e1520ab8f Author: Keith Packard <keithp@keithp.com> Date: Sat Aug 26 00:24:38 2000 +0000 Try to avoid hitting hardware during server reset when not active, add KdPicture code commit 4223801110c8d5873dd668880dff411765dfc18d Author: Keith Packard <keithp@keithp.com> Date: Wed Aug 9 17:52:45 2000 +0000 Add overlay support for savage. Make sis setup code work on nIc commit 325fb002e8832a05361516bbaf19d1e8b67a3486 Author: Keith Packard <keithp@keithp.com> Date: Wed May 24 23:57:56 2000 +0000 Fix 640x480x60 mode, drop inb/outb on non-x86 machines commit a6d519e527a81341ad333cb25b410dfde07176ae Author: Keith Packard <keithp@keithp.com> Date: Wed May 24 23:52:48 2000 +0000 Add modes, cursors and acceleration commit 240aeb4cda91d19f5b19ebd7f7d6c1aad19f1642 Author: Marc Aurele La France <tsi@ualberta.edu> Date: Thu May 11 18:14:13 2000 +0000 162. Fix possible SEGV in generic int10 module (Marc La France). 161. Fix *BSD aperture driver to allow for int10 (Bernd Ernesti, Marc La France). 160. Fix vesafb restore problem in ATI driver (Marc La France). 159. Fix a few more compilation glitches (Marc La France). commit 3731c184d69e3c1face0c731926433d522d48067 Author: Keith Packard <keithp@keithp.com> Date: Sat May 6 22:17:53 2000 +0000 Lots of Tiny-X changes: Add overlay support in the Tiny-X Savage4 driver (required changing lots of Tiny-X code). Savage4 now support 8/16, 8/32 overlays. Add IGS Cyberpro 5050 driver. This chip has bus support for embeded systems. commit 4b54f22b6accf438f31fbbe79877545c38375351 Author: David Dawes <dawes@xfree86.org> Date: Wed Feb 23 20:30:15 2000 +0000 remove/disable standard RCS ident lines that are in some files some bindist updates don't define noPanoramiXExtension when Xinerama is not enabled Add xfontsel to programs/Imakefile commit be2dad5954b8fee09a84f417e41bb65745dadf76 Author: David Dawes <dawes@xfree86.org> Date: Fri Jan 21 18:41:49 2000 +0000 missing ident lines commit 306ac1db85c30a796c9a69c639e7f2e4efd98d50 Author: David Dawes <dawes@xfree86.org> Date: Fri Jan 21 01:12:02 2000 +0000 3554. Fix "controlization" in XLookupString for chars > 127 (#3569, Ivan Pascal). 3553. Take advantage of FB speedups in Tiny-X (#3568, Keith Packard). 3552. Speed up FB and do 32bit accesses instead of 64bit accesses (#3567, Keith Packard). 3551. Eliminate saving the contents of the screen durint VT switching (#3562, Keith Packard). 3550. Make using fb easier for driver writers (#3561, Keith Packard). 3549. Fix TCP font server connections (#3560, Keith Packard). 3548. Implement the "OverclockMem" option for the Millennium and Millennium II (#3558, Andrew Aitchison). 3547. Speed up some FB performance problems (#3557, 3559, 3560, Keith Packard). 3546. Work around a bad code generation bug in gcc 2.7.2.3 that shows up in XAA (#3550, Rik Faith). 3545. Add a -brief option to xclock to show only hours and minutes when in digital mode (#3549, Keith Packard). 3544. Fix some dead key problems with xkb symbols for Swiss French and Swiss German keyboards (#3546, Charles Lopes). commit 6d978d21b0bea6c73b65f2f47c68de4b94dd73c4 Author: Robin Cutshaw <robin@intercore.com> Date: Thu Dec 30 03:42:58 1999 +0000 Itsy cleanup. commit 30e35cb44b6ea11d0eac8ce0d986517f3224852a Author: Robin Cutshaw <robin@intercore.com> Date: Thu Dec 30 03:03:21 1999 +0000 3516. Jumbo Tiny-X patch with Itsy support (#3527, Keith Packard). commit f13b792a3a8d307a18cd6a41aa5a06622009e42f Author: Dirk Hohndel <dirk.hohndel@intel.com> Date: Fri Nov 19 13:54:06 1999 +0000 3336. Fx up new MMIO macros (#3337, Matt Grossman). 3335. Clean up compiler warnings in lib/font/bitmap (#3411, Matt Grossman). 3334. TGA fixes, add sync on green (#3410, Matt Grossman). 3333. Fix NULL pointer dereference in libXaw (#3406, Christopher Sekiya). 3332. Add Rage128 support (#3405, Rik Faith, funded by ATI). 3331. Add MTRR support for NetBSD and OpenBSD. Add new NetBSD aperture driver (#3404, Matthieu Herrb). 3330. Xterm patch #121 (#3402, Thomas Dickey). 3329. Rendition driver bugfixes and alpha related cleanups (#3400, Dejan Ilic, Marc Langenbach, Egbert Eich). 3328. Add void input device (#3392, Frederic Lepied). 3327. Changed the Xon serial option to be able to select xon/xoff for input, output or both. Add support for Graphire models. Change wacom init phase to use new Xoff option (#3391, Frederic Lepied). 3326. Change the SwapAxes option to SwapXY in elographics/microtouch driver to match an already existing option in the Dynapro driver. Add a Focus class capability to the elographics driver (#3395, Patrick Lecoanet). 3325. Update mouse rate handling (#3388, Harald Koenig). 3324. Fix NULL pointer dereference in misprite.c (#3380, Edward Wang). 3323. Add FBDev and ShadowFB support to glint driver. Add new option "NoWriteBitmap" (#3383, Michel Daenzer). 3322. Update SuperProbe to handle S3 Savage4, Savage200 and clean up Trio3D/Savage3D detection (#3382,3384 Harald Koenig). 3321. Add new framebuffer code and tiny X DDX architecture (#3379, Keith Packard). 3320. Add DGA2 documentation (#3378, Mark Vojkovich). 3319. Update XFree86 manpage wrt -bpp/-depth/-fbbpp (#3377, Andy Isaacson). 3318. Make SuperProbe check primary cards, only (#3374, Harald Koenig). 3317. Add SilkenMouse to *BSD (#3373, Matthieu Herrb). 3316. Allow SilkenMouse to work if not all drivers of an OS support SIGIO (#3372, Keith Packard). 3315. Fix a few problems in TGA driver and add support for backing store and SilkenMouse (#3371, Matt Grossman). 3314. Add smarter scheduler (#3370, Keith Packard). 3313. Xterm patch #120 (#3369, Thomas Dickey). 3312. Enable xf86SetKbdRate function on Solaris 8 (#3364, David Holland). 3311. Fix some bugs and add acceleration to Rendition server (#3360, Dejan Ilic). 3310. Make raw DDC information available as properties in the root window (#3357, Andrew Aitchison). 3309. Fix for xf86CreateRootWindow (#3355, Andrew Aitchison). 3308. Add manpage for the chips driver (#3353, David Bateman). 3307. Update contact info (#3352, Andrew van der Stock). 3306. Add kbd rate support for Linux (#3363, Harald Koenig). 3305. Update Portuguese XKB map (#3351, Joao Esteves, Francisco Colaco). 3304. Fix text clipping in 3dfx driver (#3349, Henrik Harmsen). 3303. Fix S3 ViRGE hw cursor (#3348, Harald Koenig). 3302. Fix clipping in 3dfx driver (#3342, Daryll Strauss). 3301. Enable SilkenMouse for 3dfx driver (#3341, Henrik Harmsen). 3300. Enable SIGIO support on LynxOS (#3339, Thomas Mueller). 3299. Get TRUE defined in sigio.c. Fix xterm compile problem on ISC (#3338, Michael Rohleder). 3298. Correct DPMS suspend/standby modes for 3dfx driver (#3336, Henrik Harmsen) 3297. Xterm patch #119 (#3335, Thomas Dickey). ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/INSTALL�������������������������������������������������������������������������0000644�0001750�0001750�00000036600�14757411132�010671� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `<wchar.h>' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ��������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/README.md�����������������������������������������������������������������������0000644�0001750�0001750�00000002273�14757411105�011116� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������X Server -------- The X server accepts requests from client applications to create windows, which are (normally rectangular) "virtual screens" that the client program can draw into. Windows are then composed on the actual screen by the X server (or by a separate composite manager) as directed by the window manager, which usually communicates with the user via graphical controls such as buttons and draggable titlebars and borders. For a comprehensive overview of X Server and X Window System, consult the following article: https://en.wikipedia.org/wiki/X_server All questions regarding this software should be directed at the Xorg mailing list: https://lists.freedesktop.org/mailman/listinfo/xorg The primary development code repository can be found at: https://gitlab.freedesktop.org/xorg/xserver For patch submission instructions, see: https://www.x.org/wiki/Development/Documentation/SubmittingPatches As with other projects hosted on freedesktop.org, X.Org follows its Code of Conduct, based on the Contributor Covenant. Please conduct yourself in a respectful and civilized manner when using the above mailing lists, bug trackers, etc: https://www.freedesktop.org/wiki/CodeOfConduct �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/compile�������������������������������������������������������������������������0000755�0001750�0001750�00000016350�14757411114�011216� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/config.guess��������������������������������������������������������������������0000755�0001750�0001750�00000143051�14757411114�012157� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <https://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.guess # # Please send patches to <config-patches@gnu.org>. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system '$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi # Just in case it came from the environment. GUESS= # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, 'CC_FOR_BUILD' used to be named 'HOST_CC'. We still # use 'HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. tmp= # shellcheck disable=SC2172 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15 set_cc_for_build() { # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" # shellcheck disable=SC2039,SC3028 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break fi done if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac } # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if test -f /.attbin/uname ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown set_cc_for_build cat <<-EOF > "$dummy.c" #if defined(__ANDROID__) LIBC=android #else #include <features.h> #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #elif defined(__GLIBC__) LIBC=gnu #elif defined(__LLVM_LIBC__) LIBC=llvm #else #include <stdarg.h> /* First heuristic to detect musl libc. */ #ifdef __DEFINED_va_list LIBC=musl #endif #endif #endif EOF cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && command -v ldd >/dev/null && ldd --version 2>&1 | grep -q ^musl; then LIBC=musl fi # If the system lacks a compiler, then just pick glibc. # We could probably try harder. if [ "$LIBC" = unknown ]; then LIBC=gnu fi ;; esac # Note: order is significant - the case branches are not exclusive. case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case $UNAME_VERSION in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. GUESS=$machine-${os}${release}${abi-} ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE ;; *:SecBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE ;; *:MidnightBSD:*:*) GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE ;; *:ekkoBSD:*:*) GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE ;; *:SolidBSD:*:*) GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE ;; *:OS108:*:*) GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE ;; macppc:MirBSD:*:*) GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE ;; *:MirBSD:*:*) GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE ;; *:Sortix:*:*) GUESS=$UNAME_MACHINE-unknown-sortix ;; *:Twizzler:*:*) GUESS=$UNAME_MACHINE-unknown-twizzler ;; *:Redox:*:*) GUESS=$UNAME_MACHINE-unknown-redox ;; mips:OSF1:*.*) GUESS=mips-dec-osf1 ;; alpha:OSF1:*:*) # Reset EXIT trap before exiting to avoid spurious non-zero exit code. trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` GUESS=$UNAME_MACHINE-dec-osf$OSF_REL ;; Amiga*:UNIX_System_V:4.0:*) GUESS=m68k-unknown-sysv4 ;; *:[Aa]miga[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-amigaos ;; *:[Mm]orph[Oo][Ss]:*:*) GUESS=$UNAME_MACHINE-unknown-morphos ;; *:OS/390:*:*) GUESS=i370-ibm-openedition ;; *:z/VM:*:*) GUESS=s390-ibm-zvmoe ;; *:OS400:*:*) GUESS=powerpc-ibm-os400 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) GUESS=arm-acorn-riscix$UNAME_RELEASE ;; arm*:riscos:*:*|arm*:RISCOS:*:*) GUESS=arm-unknown-riscos ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) GUESS=hppa1.1-hitachi-hiuxmpp ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. case `(/bin/universe) 2>/dev/null` in att) GUESS=pyramid-pyramid-sysv3 ;; *) GUESS=pyramid-pyramid-bsd ;; esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 ;; DRS?6000:unix:4.0:6*) GUESS=sparc-icl-nx6 ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) GUESS=sparc-icl-nx7 ;; esac ;; s390x:SunOS:*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL ;; sun4H:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-hal-solaris2$SUN_REL ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris2$SUN_REL ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) GUESS=i386-pc-auroraux$UNAME_RELEASE ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=$SUN_ARCH-pc-solaris2$SUN_REL ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=sparc-sun-solaris3$SUN_REL ;; sun4*:SunOS:*:*) case `/usr/bin/arch -k` in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like '4.1.3-JL'. SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` GUESS=sparc-sun-sunos$SUN_REL ;; sun3*:SunOS:*:*) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case `/bin/arch` in sun3) GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac ;; aushp:SunOS:*:*) GUESS=sparc-auspex-sunos$UNAME_RELEASE ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) GUESS=m68k-atari-mint$UNAME_RELEASE ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) GUESS=m68k-milan-mint$UNAME_RELEASE ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) GUESS=m68k-hades-mint$UNAME_RELEASE ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) GUESS=m68k-unknown-mint$UNAME_RELEASE ;; m68k:machten:*:*) GUESS=m68k-apple-machten$UNAME_RELEASE ;; powerpc:machten:*:*) GUESS=powerpc-apple-machten$UNAME_RELEASE ;; RISC*:Mach:*:*) GUESS=mips-dec-mach_bsd4.3 ;; RISC*:ULTRIX:*:*) GUESS=mips-dec-ultrix$UNAME_RELEASE ;; VAX*:ULTRIX*:*:*) GUESS=vax-dec-ultrix$UNAME_RELEASE ;; 2020:CLIX:*:* | 2430:CLIX:*:*) GUESS=clipper-intergraph-clix$UNAME_RELEASE ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include <stdio.h> /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } GUESS=mips-mips-riscos$UNAME_RELEASE ;; Motorola:PowerMAX_OS:*:*) GUESS=powerpc-motorola-powermax ;; Motorola:*:4.3:PL8-*) GUESS=powerpc-harris-powermax ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) GUESS=powerpc-harris-powermax ;; Night_Hawk:Power_UNIX:*:*) GUESS=powerpc-harris-powerunix ;; m88k:CX/UX:7*:*) GUESS=m88k-harris-cxux7 ;; m88k:*:4*:R4*) GUESS=m88k-motorola-sysv4 ;; m88k:*:3*:R3*) GUESS=m88k-motorola-sysv3 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then GUESS=m88k-dg-dgux$UNAME_RELEASE else GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else GUESS=i586-dg-dgux$UNAME_RELEASE fi ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) GUESS=m88k-dolphin-sysv3 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 GUESS=m88k-motorola-sysv3 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) GUESS=m88k-tektronix-sysv3 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) GUESS=m68k-tektronix-bsd ;; *:IRIX*:*:*) IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` GUESS=mips-sgi-irix$IRIX_REL ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) GUESS=i386-ibm-aix ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include <sys/systemcfg.h> main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then GUESS=$SYSTEM_NAME else GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then GUESS=rs6000-ibm-aix3.2.4 else GUESS=rs6000-ibm-aix3.2 fi ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi GUESS=$IBM_ARCH-ibm-aix$IBM_REV ;; *:AIX:*:*) GUESS=rs6000-ibm-aix ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) GUESS=romp-ibm-bsd4.4 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) GUESS=rs6000-bull-bosx ;; DPX/2?00:B.O.S.:*:*) GUESS=m68k-bull-sysv3 ;; 9000/[34]??:4.3bsd:1.*:*) GUESS=m68k-hp-bsd ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) GUESS=m68k-hp-bsd4.4 ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if test "$HP_ARCH" = ""; then set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include <stdlib.h> #include <unistd.h> int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if test "$HP_ARCH" = hppa2.0w then set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi GUESS=$HP_ARCH-hp-hpux$HPUX_REV ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` GUESS=ia64-hp-hpux$HPUX_REV ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" #include <unistd.h> int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } GUESS=unknown-hitachi-hiuxwe2 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) GUESS=hppa1.1-hp-bsd ;; 9000/8??:4.3bsd:*:*) GUESS=hppa1.0-hp-bsd ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) GUESS=hppa1.0-hp-mpeix ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) GUESS=hppa1.1-hp-osf ;; hp8??:OSF1:*:*) GUESS=hppa1.0-hp-osf ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then GUESS=$UNAME_MACHINE-unknown-osf1mk else GUESS=$UNAME_MACHINE-unknown-osf1 fi ;; parisc*:Lites*:*:*) GUESS=hppa1.1-hp-lites ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) GUESS=c1-convex-bsd ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) GUESS=c34-convex-bsd ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) GUESS=c38-convex-bsd ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) GUESS=c4-convex-bsd ;; CRAY*Y-MP:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=ymp-cray-unicos$CRAY_REL ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=t90-cray-unicos$CRAY_REL ;; CRAY*T3E:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=alphaev5-cray-unicosmk$CRAY_REL ;; CRAY*SV1:*:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=sv1-cray-unicos$CRAY_REL ;; *:UNICOS/mp:*:*) CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` GUESS=craynv-cray-unicosmp$CRAY_REL ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE ;; sparc*:BSD/OS:*:*) GUESS=sparc-unknown-bsdi$UNAME_RELEASE ;; *:BSD/OS:*:*) GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE ;; arm:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL ;; i*:CYGWIN*:*) GUESS=$UNAME_MACHINE-pc-cygwin ;; *:MINGW64*:*) GUESS=$UNAME_MACHINE-pc-mingw64 ;; *:MINGW*:*) GUESS=$UNAME_MACHINE-pc-mingw32 ;; *:MSYS*:*) GUESS=$UNAME_MACHINE-pc-msys ;; i*:PW*:*) GUESS=$UNAME_MACHINE-pc-pw32 ;; *:SerenityOS:*:*) GUESS=$UNAME_MACHINE-pc-serenity ;; *:Interix*:*) case $UNAME_MACHINE in x86) GUESS=i586-pc-interix$UNAME_RELEASE ;; authenticamd | genuineintel | EM64T) GUESS=x86_64-unknown-interix$UNAME_RELEASE ;; IA64) GUESS=ia64-unknown-interix$UNAME_RELEASE ;; esac ;; i*:UWIN*:*) GUESS=$UNAME_MACHINE-pc-uwin ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) GUESS=x86_64-pc-cygwin ;; prep*:SunOS:5.*:*) SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` GUESS=powerpcle-unknown-solaris2$SUN_REL ;; *:GNU:*:*) # the GNU system GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL ;; *:GNU/*:*:*) # other systems with GNU libc and userland GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC ;; x86_64:[Mm]anagarm:*:*|i?86:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-pc-managarm-mlibc" ;; *:[Mm]anagarm:*:*) GUESS="$UNAME_MACHINE-unknown-managarm-mlibc" ;; *:Minix:*:*) GUESS=$UNAME_MACHINE-unknown-minix ;; aarch64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __ARM_EABI__ #ifdef __ARM_PCS_VFP ABI=eabihf #else ABI=eabi #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in eabi | eabihf) CPU=armv8l; LIBCABI=$LIBC$ABI ;; esac fi GUESS=$CPU-unknown-linux-$LIBCABI ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi ;; avr32*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; cris:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; crisv32:Linux:*:*) GUESS=$UNAME_MACHINE-axis-linux-$LIBC ;; e2k:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; frv:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; hexagon:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:Linux:*:*) GUESS=$UNAME_MACHINE-pc-linux-$LIBC ;; ia64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; k1om:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; kvx:cos:*:*) GUESS=$UNAME_MACHINE-unknown-cos ;; kvx:mbr:*:*) GUESS=$UNAME_MACHINE-unknown-mbr ;; loongarch32:Linux:*:* | loongarch64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m32r*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; m68*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 test x"${LIBC}" = xgnu && IS_GLIBC=1 sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef mips #undef mipsel #undef mips64 #undef mips64el #if ${IS_GLIBC} && defined(_ABI64) LIBCABI=gnuabi64 #else #if ${IS_GLIBC} && defined(_ABIN32) LIBCABI=gnuabin32 #else LIBCABI=${LIBC} #endif #endif #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa64r6 #else #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6 CPU=mipsisa32r6 #else #if defined(__mips64) CPU=mips64 #else CPU=mips #endif #endif #endif #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) MIPS_ENDIAN=el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) MIPS_ENDIAN= #else MIPS_ENDIAN= #endif #endif EOF cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; openrisc*:Linux:*:*) GUESS=or1k-unknown-linux-$LIBC ;; or32:Linux:*:* | or1k*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; padre:Linux:*:*) GUESS=sparc-unknown-linux-$LIBC ;; parisc64:Linux:*:* | hppa64:Linux:*:*) GUESS=hppa64-unknown-linux-$LIBC ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; *) GUESS=hppa-unknown-linux-$LIBC ;; esac ;; ppc64:Linux:*:*) GUESS=powerpc64-unknown-linux-$LIBC ;; ppc:Linux:*:*) GUESS=powerpc-unknown-linux-$LIBC ;; ppc64le:Linux:*:*) GUESS=powerpc64le-unknown-linux-$LIBC ;; ppcle:Linux:*:*) GUESS=powerpcle-unknown-linux-$LIBC ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; s390:Linux:*:* | s390x:Linux:*:*) GUESS=$UNAME_MACHINE-ibm-linux-$LIBC ;; sh64*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sh*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; sparc:Linux:*:* | sparc64:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; tile*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; vax:Linux:*:*) GUESS=$UNAME_MACHINE-dec-linux-$LIBC ;; x86_64:Linux:*:*) set_cc_for_build CPU=$UNAME_MACHINE LIBCABI=$LIBC if test "$CC_FOR_BUILD" != no_compiler_found; then ABI=64 sed 's/^ //' << EOF > "$dummy.c" #ifdef __i386__ ABI=x86 #else #ifdef __ILP32__ ABI=x32 #endif #endif EOF cc_set_abi=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^ABI' | sed 's, ,,g'` eval "$cc_set_abi" case $ABI in x86) CPU=i686 ;; x32) LIBCABI=${LIBC}x32 ;; esac fi GUESS=$CPU-pc-linux-$LIBCABI ;; xtensa*:Linux:*:*) GUESS=$UNAME_MACHINE-unknown-linux-$LIBC ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. GUESS=i386-sequent-sysv4 ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION ;; i*86:OS/2:*:*) # If we were able to find 'uname', then EMX Unix compatibility # is probably installed. GUESS=$UNAME_MACHINE-pc-os2-emx ;; i*86:XTS-300:*:STOP) GUESS=$UNAME_MACHINE-unknown-stop ;; i*86:atheos:*:*) GUESS=$UNAME_MACHINE-unknown-atheos ;; i*86:syllable:*:*) GUESS=$UNAME_MACHINE-pc-syllable ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) GUESS=i386-unknown-lynxos$UNAME_RELEASE ;; i*86:*DOS:*:*) GUESS=$UNAME_MACHINE-pc-msdosdjgpp ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else GUESS=$UNAME_MACHINE-pc-sysv32 fi ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. GUESS=i586-pc-msdosdjgpp ;; Intel:Mach:3*:*) GUESS=i386-pc-mach3 ;; paragon:*:*:*) GUESS=i860-intel-osf1 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi ;; mini*:CTIX:SYS*5:*) # "miniframe" GUESS=m68010-convergent-sysv ;; mc68k:UNIX:SYSTEM5:3.51m) GUESS=m68k-convergent-sysv ;; M680?0:D-NIX:5.3:*) GUESS=m68k-diab-dnix ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) GUESS=m68k-unknown-lynxos$UNAME_RELEASE ;; mc68030:UNIX_System_V:4.*:*) GUESS=m68k-atari-sysv4 ;; TSUNAMI:LynxOS:2.*:*) GUESS=sparc-unknown-lynxos$UNAME_RELEASE ;; rs6000:LynxOS:2.*:*) GUESS=rs6000-unknown-lynxos$UNAME_RELEASE ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) GUESS=powerpc-unknown-lynxos$UNAME_RELEASE ;; SM[BE]S:UNIX_SV:*:*) GUESS=mips-dde-sysv$UNAME_RELEASE ;; RM*:ReliantUNIX-*:*:*) GUESS=mips-sni-sysv4 ;; RM*:SINIX-*:*:*) GUESS=mips-sni-sysv4 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` GUESS=$UNAME_MACHINE-sni-sysv4 else GUESS=ns32k-sni-sysv fi ;; PENTIUM:*:4.0*:*) # Unisys 'ClearPath HMP IX 4000' SVR4/MP effort # says <Richard.M.Bartel@ccMail.Census.GOV> GUESS=i586-unisys-sysv4 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes <hewes@openmarket.com>. # How about differentiating between stratus architectures? -djm GUESS=hppa1.1-stratus-sysv4 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. GUESS=i860-stratus-sysv4 ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. GUESS=$UNAME_MACHINE-stratus-vos ;; *:VOS:*:*) # From Paul.Green@stratus.com. GUESS=hppa1.1-stratus-vos ;; mc68*:A/UX:*:*) GUESS=m68k-apple-aux$UNAME_RELEASE ;; news*:NEWS-OS:6*:*) GUESS=mips-sony-newsos6 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then GUESS=mips-nec-sysv$UNAME_RELEASE else GUESS=mips-unknown-sysv$UNAME_RELEASE fi ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. GUESS=powerpc-be-beos ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. GUESS=powerpc-apple-beos ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. GUESS=i586-pc-beos ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. GUESS=i586-pc-haiku ;; ppc:Haiku:*:*) # Haiku running on Apple PowerPC GUESS=powerpc-apple-haiku ;; *:Haiku:*:*) # Haiku modern gcc (not bound by BeOS compat) GUESS=$UNAME_MACHINE-unknown-haiku ;; SX-4:SUPER-UX:*:*) GUESS=sx4-nec-superux$UNAME_RELEASE ;; SX-5:SUPER-UX:*:*) GUESS=sx5-nec-superux$UNAME_RELEASE ;; SX-6:SUPER-UX:*:*) GUESS=sx6-nec-superux$UNAME_RELEASE ;; SX-7:SUPER-UX:*:*) GUESS=sx7-nec-superux$UNAME_RELEASE ;; SX-8:SUPER-UX:*:*) GUESS=sx8-nec-superux$UNAME_RELEASE ;; SX-8R:SUPER-UX:*:*) GUESS=sx8r-nec-superux$UNAME_RELEASE ;; SX-ACE:SUPER-UX:*:*) GUESS=sxace-nec-superux$UNAME_RELEASE ;; Power*:Rhapsody:*:*) GUESS=powerpc-apple-rhapsody$UNAME_RELEASE ;; *:Rhapsody:*:*) GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE ;; arm64:Darwin:*:*) GUESS=aarch64-apple-darwin$UNAME_RELEASE ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac if command -v xcode-select > /dev/null 2> /dev/null && \ ! xcode-select --print-path > /dev/null 2> /dev/null ; then # Avoid executing cc if there is no toolchain installed as # cc will be a stub that puts up a graphical alert # prompting the user to install developer tools. CC_FOR_BUILD=no_compiler_found else set_cc_for_build fi if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi elif test "$UNAME_PROCESSOR" = i386 ; then # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE ;; *:QNX:*:4*) GUESS=i386-pc-qnx ;; NEO-*:NONSTOP_KERNEL:*:*) GUESS=neo-tandem-nsk$UNAME_RELEASE ;; NSE-*:NONSTOP_KERNEL:*:*) GUESS=nse-tandem-nsk$UNAME_RELEASE ;; NSR-*:NONSTOP_KERNEL:*:*) GUESS=nsr-tandem-nsk$UNAME_RELEASE ;; NSV-*:NONSTOP_KERNEL:*:*) GUESS=nsv-tandem-nsk$UNAME_RELEASE ;; NSX-*:NONSTOP_KERNEL:*:*) GUESS=nsx-tandem-nsk$UNAME_RELEASE ;; *:NonStop-UX:*:*) GUESS=mips-compaq-nonstopux ;; BS2000:POSIX*:*:*) GUESS=bs2000-siemens-sysv ;; DS/*:UNIX_System_V:*:*) GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "${cputype-}" = 386; then UNAME_MACHINE=i386 elif test "x${cputype-}" != x; then UNAME_MACHINE=$cputype fi GUESS=$UNAME_MACHINE-unknown-plan9 ;; *:TOPS-10:*:*) GUESS=pdp10-unknown-tops10 ;; *:TENEX:*:*) GUESS=pdp10-unknown-tenex ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) GUESS=pdp10-dec-tops20 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) GUESS=pdp10-xkl-tops20 ;; *:TOPS-20:*:*) GUESS=pdp10-unknown-tops20 ;; *:ITS:*:*) GUESS=pdp10-unknown-its ;; SEI:*:*:SEIUX) GUESS=mips-sei-seiux$UNAME_RELEASE ;; *:DragonFly:*:*) DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case $UNAME_MACHINE in A*) GUESS=alpha-dec-vms ;; I*) GUESS=ia64-dec-vms ;; V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) GUESS=i386-pc-xenix ;; i*86:skyos:*:*) SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL ;; i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; i*86:Fiwix:*:*) GUESS=$UNAME_MACHINE-pc-fiwix ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; x86_64:VMkernel:*:*) GUESS=$UNAME_MACHINE-unknown-esx ;; amd64:Isilon\ OneFS:*:*) GUESS=x86_64-unknown-onefs ;; *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; *:Ironclad:*:*) GUESS=$UNAME_MACHINE-unknown-ironclad ;; esac # Do we have a guess based on uname results? if test "x$GUESS" != x; then echo "$GUESS" exit fi # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" <<EOF #ifdef _SEQUENT_ #include <sys/types.h> #include <sys/utsname.h> #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #include <signal.h> #if defined(_SIZE_T_) || defined(SIGLOST) #include <sys/utsname.h> #endif #endif #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include <sys/param.h> printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) #include <sys/param.h> #if defined (BSD) #if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); #else #if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); #else printf ("vax-dec-bsd\n"); exit (0); #endif #endif #else printf ("vax-dec-bsd\n"); exit (0); #endif #else #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname un; uname (&un); printf ("vax-dec-ultrix%s\n", un.release); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__) #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__) #if defined(_SIZE_T_) || defined(SIGLOST) struct utsname *un; uname (&un); printf ("mips-dec-ultrix%s\n", un.release); exit (0); #else printf ("mips-dec-ultrix\n"); exit (0); #endif #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; } echo "$0: unable to guess system type" >&2 case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <<EOF NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize the system type. Please install a C compiler and try again. EOF ;; esac cat >&2 <<EOF This script (version $timestamp), has failed to recognize the operating system you are using. If your script is old, overwrite *all* copies of config.guess and config.sub with the latest versions from: https://git.savannah.gnu.org/cgit/config.git/plain/config.guess and https://git.savannah.gnu.org/cgit/config.git/plain/config.sub EOF our_year=`echo $timestamp | sed 's,-.*,,'` thisyear=`date +%Y` # shellcheck disable=SC2003 script_age=`expr "$thisyear" - "$our_year"` if test "$script_age" -lt 3 ; then cat >&2 <<EOF If $0 has already been updated, send the following data and any information you think might be pertinent to config-patches@gnu.org to provide the necessary information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF fi exit 1 # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/config.sub����������������������������������������������������������������������0000755�0001750�0001750�00000107761�14757411114�011632� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/sh # Configuration validation subroutine script. # Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see <https://www.gnu.org/licenses/>. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to <config-patches@gnu.org>. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/cgit/config.git/plain/config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. # The "shellcheck disable" line above the timestamp inhibits complaints # about features and limitations of the classic Bourne shell that were # superseded or lifted in POSIX. However, this script identifies a wide # variety of pre-POSIX systems that do not have POSIX shells at all, and # even some reasonably current systems (Solaris 10 as case-in-point) still # have a pre-POSIX /bin/sh. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try '$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Split fields of configuration type # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <<EOF $1 EOF IFS=$saved_IFS # Separate into logical components for further validation case $1 in *-*-*-*-*) echo "Invalid configuration '$1': more than four components" >&2 exit 1 ;; *-*-*-*) basic_machine=$field1-$field2 basic_os=$field3-$field4 ;; *-*-*) # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two # parts maybe_os=$field2-$field3 case $maybe_os in nto-qnx* | linux-* | uclinux-uclibc* \ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \ | storm-chaos* | os2-emx* | rtmk-nova* | managarm-* \ | windows-* ) basic_machine=$field1 basic_os=$maybe_os ;; android-linux) basic_machine=$field1-unknown basic_os=linux-android ;; *) basic_machine=$field1-$field2 basic_os=$field3 ;; esac ;; *-*) # A lone config we happen to match not fitting any pattern case $field1-$field2 in decstation-3100) basic_machine=mips-dec basic_os= ;; *-*) # Second component is usually, but not always the OS case $field2 in # Prevent following clause from handling this valid os sun*os*) basic_machine=$field1 basic_os=$field2 ;; zephyr*) basic_machine=$field1-unknown basic_os=$field2 ;; # Manufacturers dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \ | unicom* | ibm* | next | hp | isi* | apollo | altos* \ | convergent* | ncr* | news | 32* | 3600* | 3100* \ | hitachi* | c[123]* | convex* | sun | crds | omron* | dg \ | ultra | tti* | harris | dolphin | highlevel | gould \ | cbm | ns | masscomp | apple | axis | knuth | cray \ | microblaze* | sim | cisco \ | oki | wec | wrs | winbond) basic_machine=$field1-$field2 basic_os= ;; *) basic_machine=$field1 basic_os=$field2 ;; esac ;; esac ;; *) # Convert single-component short-hands not valid as part of # multi-component configurations. case $field1 in 386bsd) basic_machine=i386-pc basic_os=bsd ;; a29khif) basic_machine=a29k-amd basic_os=udi ;; adobe68k) basic_machine=m68010-adobe basic_os=scout ;; alliant) basic_machine=fx80-alliant basic_os= ;; altos | altos3068) basic_machine=m68k-altos basic_os= ;; am29k) basic_machine=a29k-none basic_os=bsd ;; amdahl) basic_machine=580-amdahl basic_os=sysv ;; amiga) basic_machine=m68k-unknown basic_os= ;; amigaos | amigados) basic_machine=m68k-unknown basic_os=amigaos ;; amigaunix | amix) basic_machine=m68k-unknown basic_os=sysv4 ;; apollo68) basic_machine=m68k-apollo basic_os=sysv ;; apollo68bsd) basic_machine=m68k-apollo basic_os=bsd ;; aros) basic_machine=i386-pc basic_os=aros ;; aux) basic_machine=m68k-apple basic_os=aux ;; balance) basic_machine=ns32k-sequent basic_os=dynix ;; blackfin) basic_machine=bfin-unknown basic_os=linux ;; cegcc) basic_machine=arm-unknown basic_os=cegcc ;; convex-c1) basic_machine=c1-convex basic_os=bsd ;; convex-c2) basic_machine=c2-convex basic_os=bsd ;; convex-c32) basic_machine=c32-convex basic_os=bsd ;; convex-c34) basic_machine=c34-convex basic_os=bsd ;; convex-c38) basic_machine=c38-convex basic_os=bsd ;; cray) basic_machine=j90-cray basic_os=unicos ;; crds | unos) basic_machine=m68k-crds basic_os= ;; da30) basic_machine=m68k-da30 basic_os= ;; decstation | pmax | pmin | dec3100 | decstatn) basic_machine=mips-dec basic_os= ;; delta88) basic_machine=m88k-motorola basic_os=sysv3 ;; dicos) basic_machine=i686-pc basic_os=dicos ;; djgpp) basic_machine=i586-pc basic_os=msdosdjgpp ;; ebmon29k) basic_machine=a29k-amd basic_os=ebmon ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson basic_os=ose ;; gmicro) basic_machine=tron-gmicro basic_os=sysv ;; go32) basic_machine=i386-pc basic_os=go32 ;; h8300hms) basic_machine=h8300-hitachi basic_os=hms ;; h8300xray) basic_machine=h8300-hitachi basic_os=xray ;; h8500hms) basic_machine=h8500-hitachi basic_os=hms ;; harris) basic_machine=m88k-harris basic_os=sysv3 ;; hp300 | hp300hpux) basic_machine=m68k-hp basic_os=hpux ;; hp300bsd) basic_machine=m68k-hp basic_os=bsd ;; hppaosf) basic_machine=hppa1.1-hp basic_os=osf ;; hppro) basic_machine=hppa1.1-hp basic_os=proelf ;; i386mach) basic_machine=i386-mach basic_os=mach ;; isi68 | isi) basic_machine=m68k-isi basic_os=sysv ;; m68knommu) basic_machine=m68k-unknown basic_os=linux ;; magnum | m3230) basic_machine=mips-mips basic_os=sysv ;; merlin) basic_machine=ns32k-utek basic_os=sysv ;; mingw64) basic_machine=x86_64-pc basic_os=mingw64 ;; mingw32) basic_machine=i686-pc basic_os=mingw32 ;; mingw32ce) basic_machine=arm-unknown basic_os=mingw32ce ;; monitor) basic_machine=m68k-rom68k basic_os=coff ;; morphos) basic_machine=powerpc-unknown basic_os=morphos ;; moxiebox) basic_machine=moxie-unknown basic_os=moxiebox ;; msdos) basic_machine=i386-pc basic_os=msdos ;; msys) basic_machine=i686-pc basic_os=msys ;; mvs) basic_machine=i370-ibm basic_os=mvs ;; nacl) basic_machine=le32-unknown basic_os=nacl ;; ncr3000) basic_machine=i486-ncr basic_os=sysv4 ;; netbsd386) basic_machine=i386-pc basic_os=netbsd ;; netwinder) basic_machine=armv4l-rebel basic_os=linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony basic_os=newsos ;; news1000) basic_machine=m68030-sony basic_os=newsos ;; necv70) basic_machine=v70-nec basic_os=sysv ;; nh3000) basic_machine=m68k-harris basic_os=cxux ;; nh[45]000) basic_machine=m88k-harris basic_os=cxux ;; nindy960) basic_machine=i960-intel basic_os=nindy ;; mon960) basic_machine=i960-intel basic_os=mon960 ;; nonstopux) basic_machine=mips-compaq basic_os=nonstopux ;; os400) basic_machine=powerpc-ibm basic_os=os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson basic_os=ose ;; os68k) basic_machine=m68k-none basic_os=os68k ;; paragon) basic_machine=i860-intel basic_os=osf ;; parisc) basic_machine=hppa-unknown basic_os=linux ;; psp) basic_machine=mipsallegrexel-sony basic_os=psp ;; pw32) basic_machine=i586-unknown basic_os=pw32 ;; rdos | rdos64) basic_machine=x86_64-pc basic_os=rdos ;; rdos32) basic_machine=i386-pc basic_os=rdos ;; rom68k) basic_machine=m68k-rom68k basic_os=coff ;; sa29200) basic_machine=a29k-amd basic_os=udi ;; sei) basic_machine=mips-sei basic_os=seiux ;; sequent) basic_machine=i386-sequent basic_os= ;; sps7) basic_machine=m68k-bull basic_os=sysv2 ;; st2000) basic_machine=m68k-tandem basic_os= ;; stratus) basic_machine=i860-stratus basic_os=sysv4 ;; sun2) basic_machine=m68000-sun basic_os= ;; sun2os3) basic_machine=m68000-sun basic_os=sunos3 ;; sun2os4) basic_machine=m68000-sun basic_os=sunos4 ;; sun3) basic_machine=m68k-sun basic_os= ;; sun3os3) basic_machine=m68k-sun basic_os=sunos3 ;; sun3os4) basic_machine=m68k-sun basic_os=sunos4 ;; sun4) basic_machine=sparc-sun basic_os= ;; sun4os3) basic_machine=sparc-sun basic_os=sunos3 ;; sun4os4) basic_machine=sparc-sun basic_os=sunos4 ;; sun4sol2) basic_machine=sparc-sun basic_os=solaris2 ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun basic_os= ;; sv1) basic_machine=sv1-cray basic_os=unicos ;; symmetry) basic_machine=i386-sequent basic_os=dynix ;; t3e) basic_machine=alphaev5-cray basic_os=unicos ;; t90) basic_machine=t90-cray basic_os=unicos ;; toad1) basic_machine=pdp10-xkl basic_os=tops20 ;; tpf) basic_machine=s390x-ibm basic_os=tpf ;; udi29k) basic_machine=a29k-amd basic_os=udi ;; ultra3) basic_machine=a29k-nyu basic_os=sym1 ;; v810 | necv810) basic_machine=v810-nec basic_os=none ;; vaxv) basic_machine=vax-dec basic_os=sysv ;; vms) basic_machine=vax-dec basic_os=vms ;; vsta) basic_machine=i386-pc basic_os=vsta ;; vxworks960) basic_machine=i960-wrs basic_os=vxworks ;; vxworks68) basic_machine=m68k-wrs basic_os=vxworks ;; vxworks29k) basic_machine=a29k-wrs basic_os=vxworks ;; xbox) basic_machine=i686-pc basic_os=mingw32 ;; ymp) basic_machine=ymp-cray basic_os=unicos ;; *) basic_machine=$1 basic_os= ;; esac ;; esac # Decode 1-component or ad-hoc basic machines case $basic_machine in # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) cpu=hppa1.1 vendor=winbond ;; op50n) cpu=hppa1.1 vendor=oki ;; op60c) cpu=hppa1.1 vendor=oki ;; ibm*) cpu=i370 vendor=ibm ;; orion105) cpu=clipper vendor=highlevel ;; mac | mpw | mac-mpw) cpu=m68k vendor=apple ;; pmac | pmac-mpw) cpu=powerpc vendor=apple ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) cpu=m68000 vendor=att ;; 3b*) cpu=we32k vendor=att ;; bluegene*) cpu=powerpc vendor=ibm basic_os=cnk ;; decsystem10* | dec10*) cpu=pdp10 vendor=dec basic_os=tops10 ;; decsystem20* | dec20*) cpu=pdp10 vendor=dec basic_os=tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) cpu=m68k vendor=motorola ;; dpx2*) cpu=m68k vendor=bull basic_os=sysv3 ;; encore | umax | mmax) cpu=ns32k vendor=encore ;; elxsi) cpu=elxsi vendor=elxsi basic_os=${basic_os:-bsd} ;; fx2800) cpu=i860 vendor=alliant ;; genix) cpu=ns32k vendor=ns ;; h3050r* | hiux*) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) cpu=m68000 vendor=hp ;; hp9k3[2-9][0-9]) cpu=m68k vendor=hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) cpu=hppa1.1 vendor=hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) cpu=hppa1.1 vendor=hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) cpu=hppa1.0 vendor=hp ;; i*86v32) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv32 ;; i*86v4*) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv4 ;; i*86v) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=sysv ;; i*86sol2) cpu=`echo "$1" | sed -e 's/86.*/86/'` vendor=pc basic_os=solaris2 ;; j90 | j90-cray) cpu=j90 vendor=cray basic_os=${basic_os:-unicos} ;; iris | iris4d) cpu=mips vendor=sgi case $basic_os in irix*) ;; *) basic_os=irix4 ;; esac ;; miniframe) cpu=m68000 vendor=convergent ;; *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*) cpu=m68k vendor=atari basic_os=mint ;; news-3600 | risc-news) cpu=mips vendor=sony basic_os=newsos ;; next | m*-next) cpu=m68k vendor=next case $basic_os in openstep*) ;; nextstep*) ;; ns2*) basic_os=nextstep2 ;; *) basic_os=nextstep3 ;; esac ;; np1) cpu=np1 vendor=gould ;; op50n-* | op60c-*) cpu=hppa1.1 vendor=oki basic_os=proelf ;; pa-hitachi) cpu=hppa1.1 vendor=hitachi basic_os=hiuxwe2 ;; pbd) cpu=sparc vendor=tti ;; pbb) cpu=m68k vendor=tti ;; pc532) cpu=ns32k vendor=pc532 ;; pn) cpu=pn vendor=gould ;; power) cpu=power vendor=ibm ;; ps2) cpu=i386 vendor=ibm ;; rm[46]00) cpu=mips vendor=siemens ;; rtpc | rtpc-*) cpu=romp vendor=ibm ;; sde) cpu=mipsisa32 vendor=sde basic_os=${basic_os:-elf} ;; simso-wrs) cpu=sparclite vendor=wrs basic_os=vxworks ;; tower | tower-32) cpu=m68k vendor=ncr ;; vpp*|vx|vx-*) cpu=f301 vendor=fujitsu ;; w65) cpu=w65 vendor=wdc ;; w89k-*) cpu=hppa1.1 vendor=winbond basic_os=proelf ;; none) cpu=none vendor=none ;; leon|leon[3-9]) cpu=sparc vendor=$basic_machine ;; leon-*|leon[3-9]-*) cpu=sparc vendor=`echo "$basic_machine" | sed 's/-.*//'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read cpu vendor <<EOF $basic_machine EOF IFS=$saved_IFS ;; # We use 'pc' rather than 'unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) cpu=$basic_machine vendor=pc ;; # These rules are duplicated from below for sake of the special case above; # i.e. things that normalized to x86 arches should also default to "pc" pc98) cpu=i386 vendor=pc ;; x64 | amd64) cpu=x86_64 vendor=pc ;; # Recognize the basic CPU types without company name. *) cpu=$basic_machine vendor=unknown ;; esac unset -v basic_machine # Decode basic machines in the full and proper CPU-Company form. case $cpu-$vendor in # Here we handle the default manufacturer of certain CPU types in canonical form. It is in # some cases the only manufacturer, in others, it is the most popular. craynv-unknown) vendor=cray basic_os=${basic_os:-unicosmp} ;; c90-unknown | c90-cray) vendor=cray basic_os=${Basic_os:-unicos} ;; fx80-unknown) vendor=alliant ;; romp-unknown) vendor=ibm ;; mmix-unknown) vendor=knuth ;; microblaze-unknown | microblazeel-unknown) vendor=xilinx ;; rs6000-unknown) vendor=ibm ;; vax-unknown) vendor=dec ;; pdp11-unknown) vendor=dec ;; we32k-unknown) vendor=att ;; cydra-unknown) vendor=cydrome ;; i370-ibm*) vendor=ibm ;; orion-unknown) vendor=highlevel ;; xps-unknown | xps100-unknown) cpu=xps100 vendor=honeywell ;; # Here we normalize CPU types with a missing or matching vendor armh-unknown | armh-alt) cpu=armv7l vendor=alt basic_os=${basic_os:-linux-gnueabihf} ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull basic_os=${basic_os:-bosx} ;; # Here we normalize CPU types irrespective of the vendor amd64-*) cpu=x86_64 ;; blackfin-*) cpu=bfin basic_os=linux ;; c54x-*) cpu=tic54x ;; c55x-*) cpu=tic55x ;; c6x-*) cpu=tic6x ;; e500v[12]-*) cpu=powerpc basic_os=${basic_os}"spe" ;; mips3*-*) cpu=mips64 ;; ms1-*) cpu=mt ;; m68knommu-*) cpu=m68k basic_os=linux ;; m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*) cpu=s12z ;; openrisc-*) cpu=or32 ;; parisc-*) cpu=hppa basic_os=linux ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) cpu=i586 ;; pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*) cpu=i686 ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) cpu=i686 ;; pentium4-*) cpu=i786 ;; pc98-*) cpu=i386 ;; ppc-* | ppcbe-*) cpu=powerpc ;; ppcle-* | powerpclittle-*) cpu=powerpcle ;; ppc64-*) cpu=powerpc64 ;; ppc64le-* | powerpc64little-*) cpu=powerpc64le ;; sb1-*) cpu=mipsisa64sb1 ;; sb1el-*) cpu=mipsisa64sb1el ;; sh5e[lb]-*) cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` ;; spur-*) cpu=spur ;; strongarm-* | thumb-*) cpu=arm ;; tx39-*) cpu=mipstx39 ;; tx39el-*) cpu=mipstx39el ;; x64-*) cpu=x86_64 ;; xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; arm64-* | aarch64le-*) cpu=aarch64 ;; # Recognize the canonical CPU Types that limit and/or modify the # company names they are paired with. cr16-*) basic_os=${basic_os:-elf} ;; crisv32-* | etraxfs*-*) cpu=crisv32 vendor=axis ;; cris-* | etrax*-*) cpu=cris vendor=axis ;; crx-*) basic_os=${basic_os:-elf} ;; neo-tandem) cpu=neo vendor=tandem ;; nse-tandem) cpu=nse vendor=tandem ;; nsr-tandem) cpu=nsr vendor=tandem ;; nsv-tandem) cpu=nsv vendor=tandem ;; nsx-tandem) cpu=nsx vendor=tandem ;; mipsallegrexel-sony) cpu=mipsallegrexel vendor=sony ;; tile*-*) basic_os=${basic_os:-linux-gnu} ;; *) # Recognize the canonical CPU types that are allowed with any # company name. case $cpu in 1750a | 580 \ | a29k \ | aarch64 | aarch64_be | aarch64c | arm64ec \ | abacus \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \ | alphapca5[67] | alpha64pca5[67] \ | am33_2.0 \ | amdgcn \ | arc | arceb | arc32 | arc64 \ | arm | arm[lb]e | arme[lb] | armv* \ | avr | avr32 \ | asmjs \ | ba \ | be32 | be64 \ | bfin | bpf | bs2000 \ | c[123]* | c30 | [cjt]90 | c4x \ | c8051 | clipper | craynv | csky | cydra \ | d10v | d30v | dlx | dsp16xx \ | e2k | elxsi | epiphany \ | f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \ | javascript \ | h8300 | h8500 \ | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i*86 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | kvx \ | le32 | le64 \ | lm32 \ | loongarch32 | loongarch64 \ | m32c | m32r | m32rle \ | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \ | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \ | m88110 | m88k | maxq | mb | mcore | mep | metag \ | microblaze | microblazeel \ | mips* \ | mmix \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nanomips* \ | nds32 | nds32le | nds32be \ | nfp \ | nios | nios2 | nios2eb | nios2el \ | none | np1 | ns16k | ns32k | nvptx \ | open8 \ | or1k* \ | or32 \ | orion \ | picochip \ | pdp10 | pdp11 | pj | pjl | pn | power \ | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \ | pru \ | pyramid \ | riscv | riscv32 | riscv32be | riscv64 | riscv64be \ | rl78 | romp | rs6000 | rx \ | s390 | s390x \ | score \ | sh | shl \ | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \ | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \ | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \ | spu \ | tahoe \ | thumbv7* \ | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \ | tron \ | ubicom32 \ | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \ | vax \ | vc4 \ | visium \ | w65 \ | wasm32 | wasm64 \ | we32k \ | x86 | x86_64 | xc16x | xgate | xps100 \ | xstormy16 | xtensa* \ | ymp \ | z8k | z80) ;; *) echo "Invalid configuration '$1': machine '$cpu-$vendor' not recognized" 1>&2 exit 1 ;; esac ;; esac # Here we canonicalize certain aliases for manufacturers. case $vendor in digital*) vendor=dec ;; commodore*) vendor=cbm ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if test x"$basic_os" != x then # First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. obj= case $basic_os in gnu/linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=os2 os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read kernel os <<EOF $basic_os EOF IFS=$saved_IFS ;; # Default OS when just kernel was specified nto*) kernel=nto os=`echo "$basic_os" | sed -e 's|nto|qnx|'` ;; linux*) kernel=linux os=`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; managarm*) kernel=managarm os=`echo "$basic_os" | sed -e 's|managarm|mlibc|'` ;; *) kernel= os=$basic_os ;; esac # Now, normalize the OS (knowing we just have one component, it's not a kernel, # etc.) case $os in # First match some system type aliases that might get confused # with valid system types. # solaris* is a basic system type, with this one exception. auroraux) os=auroraux ;; bluegene*) os=cnk ;; solaris1 | solaris1.*) os=`echo "$os" | sed -e 's|solaris1|sunos4|'` ;; solaris) os=solaris2 ;; unixware*) os=sysv4.2uw ;; # es1800 is here to avoid being matched by es* (a different OS) es1800*) os=ose ;; # Some version numbers need modification chorusos*) os=chorusos ;; isc) os=isc2.2 ;; sco6) os=sco5v6 ;; sco5) os=sco3.2v5 ;; sco4) os=sco3.2v4 ;; sco3.2.[4-9]*) os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` ;; sco*v* | scout) # Don't match below ;; sco*) os=sco3.2v2 ;; psos*) os=psos ;; qnx*) os=qnx ;; hiux*) os=hiuxwe2 ;; lynx*178) os=lynxos178 ;; lynx*5) os=lynxos5 ;; lynxos*) # don't get caught up in next wildcard ;; lynx*) os=lynxos ;; mac[0-9]*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) os=openedition ;; os400*) os=os400 ;; sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; wince*) os=wince ;; utek*) os=bsd ;; dynix*) os=bsd ;; acis*) os=aos ;; atheos*) os=atheos ;; syllable*) os=syllable ;; 386bsd) os=bsd ;; ctix* | uts*) os=sysv ;; nova*) os=rtmk-nova ;; ns2) os=nextstep2 ;; # Preserve the version number of sinix5. sinix5.*) os=`echo "$os" | sed -e 's|sinix|sysv|'` ;; sinix*) os=sysv4 ;; tpf*) os=tpf ;; triton*) os=sysv3 ;; oss*) os=sysv3 ;; svr4*) os=sysv4 ;; svr3) os=sysv3 ;; sysvr4) os=sysv4 ;; ose*) os=ose ;; *mint | mint[0-9]* | *MiNT | MiNT[0-9]*) os=mint ;; dicos*) os=dicos ;; pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $cpu in arm*) os=eabi ;; *) os= obj=elf ;; esac ;; aout* | coff* | elf* | pe*) # These are machine code file formats, not OSes obj=$os os= ;; *) # No normalization, but not necessarily accepted, that comes below. ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. kernel= obj= case $cpu-$vendor in score-*) os= obj=elf ;; spu-*) os= obj=elf ;; *-acorn) os=riscix1.2 ;; arm*-rebel) kernel=linux os=gnu ;; arm*-semi) os= obj=aout ;; c4x-* | tic4x-*) os= obj=coff ;; c8051-*) os= obj=elf ;; clipper-intergraph) os=clix ;; hexagon-*) os= obj=elf ;; tic54x-*) os= obj=coff ;; tic55x-*) os= obj=coff ;; tic6x-*) os= obj=coff ;; # This must come before the *-dec entry. pdp10-*) os=tops20 ;; pdp11-*) os=none ;; *-dec | vax-*) os=ultrix4.2 ;; m68*-apollo) os=domain ;; i386-sun) os=sunos4.0.2 ;; m68000-sun) os=sunos3 ;; m68*-cisco) os= obj=aout ;; mep-*) os= obj=elf ;; mips*-cisco) os= obj=elf ;; mips*-*|nanomips*-*) os= obj=elf ;; or32-*) os= obj=coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=sysv3 ;; sparc-* | *-sun) os=sunos4.1.1 ;; pru-*) os= obj=elf ;; *-be) os=beos ;; *-ibm) os=aix ;; *-knuth) os=mmixware ;; *-wec) os=proelf ;; *-winbond) os=proelf ;; *-oki) os=proelf ;; *-hp) os=hpux ;; *-hitachi) os=hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=sysv ;; *-cbm) os=amigaos ;; *-dg) os=dgux ;; *-dolphin) os=sysv3 ;; m68k-ccur) os=rtu ;; m88k-omron*) os=luna ;; *-next) os=nextstep ;; *-sequent) os=ptx ;; *-crds) os=unos ;; *-ns) os=genix ;; i370-*) os=mvs ;; *-gould) os=sysv ;; *-highlevel) os=bsd ;; *-encore) os=bsd ;; *-sgi) os=irix ;; *-siemens) os=sysv4 ;; *-masscomp) os=rtu ;; f30[01]-fujitsu | f700-fujitsu) os=uxpv ;; *-rom68k) os= obj=coff ;; *-*bug) os= obj=coff ;; *-apple) os=macos ;; *-atari*) os=mint ;; *-wrs) os=vxworks ;; *) os=none ;; esac fi # Now, validate our (potentially fixed-up) individual pieces (OS, OBJ). case $os in # Sometimes we do "kernel-libc", so those need to count as OSes. llvm* | musl* | newlib* | relibc* | uclibc*) ;; # Likewise for "kernel-abi" eabi* | gnueabi*) ;; # VxWorks passes extra cpu info in the 4th filed. simlinux | simwindows | spe) ;; # See `case $cpu-$os` validation below ghcjs) ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \ | sym* | plan9* | psp* | sim* | xray* | os68k* | v88r* \ | hiux* | abug | nacl* | netware* | windows* \ | os9* | macos* | osx* | ios* | tvos* | watchos* \ | mpw* | magic* | mmixware* | mon960* | lnews* \ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \ | aos* | aros* | cloudabi* | sortix* | twizzler* \ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | mirbsd* | netbsd* | dicos* | openedition* | ose* \ | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | bosx* | nextstep* | cxux* | oabi* \ | ptx* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ | chorusrdb* | cegcc* | glidix* | serenity* \ | cygwin* | msys* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ | interix* | uwin* | mks* | rhapsody* | darwin* \ | openstep* | oskit* | conix* | pw32* | nonstopux* \ | storm-chaos* | tops10* | tenex* | tops20* | its* \ | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \ | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \ | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ | fiwix* | mlibc* | cos* | mbr* | ironclad* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) # Don't forget version if it is 3.2v4 or newer. ;; # This refers to builds using the UEFI calling convention # (which depends on the architecture) and PE file format. # Note that this is both a different calling convention and # different file format than that of GNU-EFI # (x86_64-w64-mingw32). uefi) ;; none) ;; kernel* | msvc* ) # Restricted further below ;; '') if test x"$obj" = x then echo "Invalid configuration '$1': Blank OS only allowed with explicit machine code file format" 1>&2 fi ;; *) echo "Invalid configuration '$1': OS '$os' not recognized" 1>&2 exit 1 ;; esac case $obj in aout* | coff* | elf* | pe*) ;; '') # empty is fine ;; *) echo "Invalid configuration '$1': Machine code format '$obj' not recognized" 1>&2 exit 1 ;; esac # Here we handle the constraint that a (synthetic) cpu and os are # valid only in combination with each other and nowhere else. case $cpu-$os in # The "javascript-unknown-ghcjs" triple is used by GHC; we # accept it here in order to tolerate that, but reject any # variations. javascript-ghcjs) ;; javascript-* | *-ghcjs) echo "Invalid configuration '$1': cpu '$cpu' is not valid with os '$os$obj'" 1>&2 exit 1 ;; esac # As a final step for OS-related things, validate the OS-kernel combination # (given a valid OS), if there is a kernel. case $kernel-$os-$obj in linux-gnu*- | linux-android*- | linux-dietlibc*- | linux-llvm*- \ | linux-mlibc*- | linux-musl*- | linux-newlib*- \ | linux-relibc*- | linux-uclibc*- ) ;; uclinux-uclibc*- ) ;; managarm-mlibc*- | managarm-kernel*- ) ;; windows*-msvc*-) ;; -dietlibc*- | -llvm*- | -mlibc*- | -musl*- | -newlib*- | -relibc*- \ | -uclibc*- ) # These are just libc implementations, not actual OSes, and thus # require a kernel. echo "Invalid configuration '$1': libc '$os' needs explicit kernel." 1>&2 exit 1 ;; -kernel*- ) echo "Invalid configuration '$1': '$os' needs explicit kernel." 1>&2 exit 1 ;; *-kernel*- ) echo "Invalid configuration '$1': '$kernel' does not support '$os'." 1>&2 exit 1 ;; *-msvc*- ) echo "Invalid configuration '$1': '$os' needs 'windows'." 1>&2 exit 1 ;; kfreebsd*-gnu*- | kopensolaris*-gnu*-) ;; vxworks-simlinux- | vxworks-simwindows- | vxworks-spe-) ;; nto-qnx*-) ;; os2-emx-) ;; *-eabi*- | *-gnueabi*-) ;; none--*) # None (no kernel, i.e. freestanding / bare metal), # can be paired with an machine code file format ;; -*-) # Blank kernel with real OS is always fine. ;; --*) # Blank kernel and OS with real machine code file format is always fine. ;; *-*-*) echo "Invalid configuration '$1': Kernel '$kernel' not known to work with OS '$os'." 1>&2 exit 1 ;; esac # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. case $vendor in unknown) case $cpu-$os in *-riscix*) vendor=acorn ;; *-sunos*) vendor=sun ;; *-cnk* | *-aix*) vendor=ibm ;; *-beos*) vendor=be ;; *-hpux*) vendor=hp ;; *-mpeix*) vendor=hp ;; *-hiux*) vendor=hitachi ;; *-unos*) vendor=crds ;; *-dgux*) vendor=dg ;; *-luna*) vendor=omron ;; *-genix*) vendor=ns ;; *-clix*) vendor=intergraph ;; *-mvs* | *-opened*) vendor=ibm ;; *-os400*) vendor=ibm ;; s390-* | s390x-*) vendor=ibm ;; *-ptx*) vendor=sequent ;; *-tpf*) vendor=ibm ;; *-vxsim* | *-vxworks* | *-windiss*) vendor=wrs ;; *-aux*) vendor=apple ;; *-hms*) vendor=hitachi ;; *-mpw* | *-macos*) vendor=apple ;; *-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*) vendor=atari ;; *-vos*) vendor=stratus ;; esac ;; esac echo "$cpu-$vendor${kernel:+-$kernel}${os:+-$os}${obj:+-$obj}" exit # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ���������������xorg-server-21.1.16/install-sh����������������������������������������������������������������������0000744�0001750�0001750�00000036105�14757411116�011644� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#!/usr/bin/sh # install - install a program, script, or datafile scriptversion=2023-11-23.18; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 # Create dirs (including intermediate dirs) using mode 755. # This is like GNU 'install' as of coreutils 8.32 (2020). mkdir_umask=22 backupsuffix= chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -p pass -p to $cpprog. -s $stripprog installed files. -S SUFFIX attempt to back up existing files, with suffix SUFFIX. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG By default, rm is invoked with -f; when overridden with RMPROG, it's up to you to specify -f if you want it. If -S is not specified, no backups are attempted. Report bugs to <bug-automake@gnu.org>. GNU Automake home page: <https://www.gnu.org/software/automake/>. General help using GNU software: <https://www.gnu.org/gethelp/>." while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -p) cpprog="$cpprog -p";; -s) stripcmd=$stripprog;; -S) backupsuffix="$2" shift;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? # Don't chown directories that already exist. if test $dstdir_status = 0; then chowncmd="" fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false # The $RANDOM variable is not portable (e.g., dash). Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap ' ret=$? rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null exit $ret ' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # If $backupsuffix is set, and the file being installed # already exists, attempt a backup. Don't worry if it fails, # e.g., if mv doesn't support -f. if test -n "$backupsuffix" && test -f "$dst"; then $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null fi # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/ltmain.sh�����������������������������������������������������������������������0000644�0001750�0001750�00001212010�14757411111�011445� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /usr/bin/env sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2019-02-19.15 # libtool (GNU libtool) 2.4.7 # Provide generalized library-building support services. # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Copyright (C) 1996-2019, 2021-2022 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. PROGRAM=libtool PACKAGE=libtool VERSION=2.4.7 package_revision=2.4.7 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2019-02-19.15; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2004-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # <https://github.com/gnulib-modules/bootstrap/issues> ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # These NLS vars are set unconditionally (bootstrap issue #24). Unset those # in case the environment reset is needed later and the $save_* variant is not # defined (see the code above). LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # func_unset VAR # -------------- # Portably unset VAR. # In some shells, an 'unset VAR' statement leaves a non-zero return # status if VAR is already unset, which might be problematic if the # statement is used at the end of a function (thus poisoning its return # value) or when 'set -e' is active (causing even a spurious abort of # the script in this case). func_unset () { { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; } } # Make sure CDPATH doesn't cause `cd` commands to output the target dir. func_unset CDPATH # Make sure ${,E,F}GREP behave sanely. func_unset GREP_OPTIONS ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed <conftest.nl >conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin" rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' <conftest.nl >conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin" GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" # require_check_ifs_backslash # --------------------------- # Check if we can use backslash as IFS='\' separator, and set # $check_ifs_backshlash_broken to ':' or 'false'. require_check_ifs_backslash=func_require_check_ifs_backslash func_require_check_ifs_backslash () { _G_save_IFS=$IFS IFS='\' _G_check_ifs_backshlash='a\\b' for _G_i in $_G_check_ifs_backshlash do case $_G_i in a) check_ifs_backshlash_broken=false ;; '') break ;; *) check_ifs_backshlash_broken=: break ;; esac done IFS=$_G_save_IFS require_check_ifs_backslash=: } ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1+=\\ \$func_quote_arg_result" }' else func_append_quoted () { $debug_cmd func_quote_arg pretty "$2" eval "$1=\$$1\\ \$func_quote_arg_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_portable EVAL ARG # ---------------------------- # Internal function to portably implement func_quote_arg. Note that we still # keep attention to performance here so we as much as possible try to avoid # calling sed binary (so far O(N) complexity as long as func_append is O(1)). func_quote_portable () { $debug_cmd $require_check_ifs_backslash func_quote_portable_result=$2 # one-time-loop (easy break) while true do if $1; then func_quote_portable_result=`$ECHO "$2" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` break fi # Quote for eval. case $func_quote_portable_result in *[\\\`\"\$]*) # Fallback to sed for $func_check_bs_ifs_broken=:, or when the string # contains the shell wildcard characters. case $check_ifs_backshlash_broken$func_quote_portable_result in :*|*[\[\*\?]*) func_quote_portable_result=`$ECHO "$func_quote_portable_result" \ | $SED "$sed_quote_subst"` break ;; esac func_quote_portable_old_IFS=$IFS for _G_char in '\' '`' '"' '$' do # STATE($1) PREV($2) SEPARATOR($3) set start "" "" func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy IFS=$_G_char for _G_part in $func_quote_portable_result do case $1 in quote) func_append func_quote_portable_result "$3$2" set quote "$_G_part" "\\$_G_char" ;; start) set first "" "" func_quote_portable_result= ;; first) set quote "$_G_part" "" ;; esac done done IFS=$func_quote_portable_old_IFS ;; *) ;; esac break done func_quote_portable_unquoted_result=$func_quote_portable_result case $func_quote_portable_result in # double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # many bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_portable_result=\"$func_quote_portable_result\" ;; esac } # func_quotefast_eval ARG # ----------------------- # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG', # but optimized for speed. Result is stored in $func_quotefast_eval. if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then printf -v _GL_test_printf_tilde %q '~' if test '\~' = "$_GL_test_printf_tilde"; then func_quotefast_eval () { printf -v func_quotefast_eval_result %q "$1" } else # Broken older Bash implementations. Make those faster too if possible. func_quotefast_eval () { case $1 in '~'*) func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result ;; *) printf -v func_quotefast_eval_result %q "$1" ;; esac } fi else func_quotefast_eval () { func_quote_portable false "$1" func_quotefast_eval_result=$func_quote_portable_result } fi # func_quote_arg MODEs ARG # ------------------------ # Quote one ARG to be evaled later. MODEs argument may contain zero or more # specifiers listed below separated by ',' character. This function returns two # values: # i) func_quote_arg_result # double-quoted (when needed), suitable for a subsequent eval # ii) func_quote_arg_unquoted_result # has all characters that are still active within double # quotes backslashified. Available only if 'unquoted' is specified. # # Available modes: # ---------------- # 'eval' (default) # - escape shell special characters # 'expand' # - the same as 'eval'; but do not quote variable references # 'pretty' # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might # be used later in func_quote to get output like: 'echo "a b"' instead # of 'echo a\ b'. This is slower than default on some shells. # 'unquoted' # - produce also $func_quote_arg_unquoted_result which does not contain # wrapping double-quotes. # # Examples for 'func_quote_arg pretty,unquoted string': # # string | *_result | *_unquoted_result # ------------+-----------------------+------------------- # " | \" | \" # a b | "a b" | a b # "a b" | "\"a b\"" | \"a b\" # * | "*" | * # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\" # # Examples for 'func_quote_arg pretty,unquoted,expand string': # # string | *_result | *_unquoted_result # --------------+---------------------+-------------------- # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\" func_quote_arg () { _G_quote_expand=false case ,$1, in *,expand,*) _G_quote_expand=: ;; esac case ,$1, in *,pretty,*|*,expand,*|*,unquoted,*) func_quote_portable $_G_quote_expand "$2" func_quote_arg_result=$func_quote_portable_result func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result ;; *) # Faster quote-for-eval for some shells. func_quotefast_eval "$2" func_quote_arg_result=$func_quotefast_eval_result ;; esac } # func_quote MODEs ARGs... # ------------------------ # Quote all ARGs to be evaled later and join them into single command. See # func_quote_arg's description for more info. func_quote () { $debug_cmd _G_func_quote_mode=$1 ; shift func_quote_result= while test 0 -lt $#; do func_quote_arg "$_G_func_quote_mode" "$1" if test -n "$func_quote_result"; then func_append func_quote_result " $func_quote_arg_result" else func_append func_quote_result "$func_quote_arg_result" fi shift done } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_arg pretty,expand "$_G_cmd" eval "func_notquiet $func_quote_arg_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_arg expand,pretty "$_G_cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # This is free software. There is NO warranty; not even for # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Copyright (C) 2010-2019, 2021 Bootstrap Authors # # This file is dual licensed under the terms of the MIT license # <https://opensource.org/license/MIT>, and GPL version 2 or later # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of # these licenses when using or redistributing this software or any of # the files within it. See the URLs above, or the file `LICENSE` # included in the Bootstrap distribution for the full license texts. # Please report bugs or propose patches to: # <https://github.com/gnulib-modules/bootstrap/issues> # Set a version string for this script. scriptversion=2019-02-19.15; # UTC ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# Copyright'. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug in processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # in the main code. A hook is just a list of function names that can be # run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of hook functions to be called by # FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_propagate_result FUNC_NAME_A FUNC_NAME_B # --------------------------------------------- # If the *_result variable of FUNC_NAME_A _is set_, assign its value to # *_result variable of FUNC_NAME_B. func_propagate_result () { $debug_cmd func_propagate_result_result=: if eval "test \"\${${1}_result+set}\" = set" then eval "${2}_result=\$${1}_result" else func_propagate_result_result=false fi } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It's assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook functions." ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do func_unset "${_G_hook}_result" eval $_G_hook '${1+"$@"}' func_propagate_result $_G_hook func_run_hooks if $func_propagate_result_result; then eval set dummy "$func_run_hooks_result"; shift fi done } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list from your hook function. You may remove # or edit any options that you action, and then pass back the remaining # unprocessed options in '<hooked_function_name>_result', escaped # suitably for 'eval'. # # The '<hooked_function_name>_result' variable is automatically unset # before your hook gets called; for best performance, only set the # *_result variable when necessary (i.e. don't call the 'func_quote' # function unnecessarily because it can be an expensive operation on some # machines). # # Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # No change in '$@' (ignored completely by this hook). Leave # # my_options_prep_result variable intact. # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # args_changed=false # # # Note that, for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: # args_changed=: # ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # args_changed=: # ;; # *) # Make sure the first unrecognised option "$_G_opt" # # is added back to "$@" in case we need it later, # # if $args_changed was set to 'true'. # set dummy "$_G_opt" ${1+"$@"}; shift; break ;; # esac # done # # # Only call 'func_quote' here if we processed at least one argument. # if $args_changed; then # func_quote eval ${1+"$@"} # my_silent_option_result=$func_quote_result # fi # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # } # func_add_hook func_validate_options my_option_validation # # You'll also need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options_finish [ARG]... # ---------------------------- # Finishing the option parse loop (call 'func_options' hooks ATM). func_options_finish () { $debug_cmd func_run_hooks func_options ${1+"$@"} func_propagate_result func_run_hooks func_options_finish } # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd _G_options_quoted=false for my_func in options_prep parse_options validate_options options_finish do func_unset func_${my_func}_result func_unset func_run_hooks_result eval func_$my_func '${1+"$@"}' func_propagate_result func_$my_func func_options if $func_propagate_result_result; then eval set dummy "$func_options_result"; shift _G_options_quoted=: fi done $_G_options_quoted || { # As we (func_options) are top-level options-parser function and # nobody quoted "$@" for us yet, we need to do it explicitly for # caller. func_quote eval ${1+"$@"} func_options_result=$func_quote_result } } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propagate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} func_propagate_result func_run_hooks func_options_prep } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd _G_parse_options_requote=false # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} func_propagate_result func_run_hooks func_parse_options if $func_propagate_result_result; then eval set dummy "$func_parse_options_result"; shift # Even though we may have changed "$@", we passed the "$@" array # down into the hook and it quoted it for us (because we are in # this if-branch). No need to quote it again. _G_parse_options_requote=false fi # Break out of the loop if we already parsed every option. test $# -gt 0 || break # We expect that one of the options parsed in this function matches # and thus we remove _G_opt from "$@" and need to re-quote. _G_match_parse_options=: _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" >&2 $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) if test $# = 0 && func_missing_arg $_G_opt; then _G_parse_options_requote=: break fi case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) _G_parse_options_requote=: ; break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift _G_match_parse_options=false break ;; esac if $_G_match_parse_options; then _G_parse_options_requote=: fi done if $_G_parse_options_requote; then # save modified positional parameters for caller func_quote eval ${1+"$@"} func_parse_options_result=$func_quote_result fi } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} func_propagate_result func_run_hooks func_validate_options # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables # after splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} if test "x$func_split_equals_lhs" = "x$1"; then func_split_equals_rhs= fi }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs=" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x\(-.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. # The version message is extracted from the calling file's header # comments, with leading '# ' stripped: # 1. First display the progname and version # 2. Followed by the header comment line matching /^# Written by / # 3. Then a blank line followed by the first following line matching # /^# Copyright / # 4. Immediately followed by any lines between the previous matches, # except lines preceding the intervening completely blank line. # For example, see the header comments of this file. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /^# Written by /!b s|^# ||; p; n :fwd2blnk /./ { n b fwd2blnk } p; n :holdwrnt s|^# || s|^# *$|| /^Copyright /!{ /./H n b holdwrnt } s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| G s|\(\n\)\n*|\1|g p; q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.7' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.7 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to <bug-libtool@gnu.org>. GNU libtool home page: <http://www.gnu.org/software/libtool/>. General help using GNU software: <http://www.gnu.org/gethelp/>." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= _G_rc_lt_options_prep=: # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; *) _G_rc_lt_options_prep=false ;; esac if $_G_rc_lt_options_prep; then # Pass back the list of options. func_quote eval ${1+"$@"} libtool_options_prep_result=$func_quote_result fi } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd _G_rc_lt_parse_options=false # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_match_lt_parse_options=: _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"} ; shift _G_match_lt_parse_options=false break ;; esac $_G_match_lt_parse_options && _G_rc_lt_parse_options=: done if $_G_rc_lt_parse_options; then # save modified positional parameters for caller func_quote eval ${1+"$@"} libtool_parse_options_result=$func_quote_result fi } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" # Keeping compiler generated duplicates in $postdeps and $predeps is not # harmful, and is necessary in a majority of systems that use it to satisfy # symbol dependencies. opt_duplicate_compiler_generated_deps=: $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote eval ${1+"$@"} libtool_validate_options_result=$func_quote_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <<EOF # $write_libobj - a libtool object file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # Name of the PIC object. pic_object=$write_lobj # Name of the non-PIC object non_pic_object=$write_oldobj EOF $MV "${write_libobj}T" "$write_libobj" } } ################################################## # FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # ################################################## # func_convert_core_file_wine_to_w32 ARG # Helper function used by file name conversion functions when $build is *nix, # and $host is mingw, cygwin, or some other w32 environment. Relies on a # correctly configured wine environment available, with the winepath program # in $build's $PATH. # # ARG is the $build file name to be converted to w32 format. # Result is available in $func_convert_core_file_wine_to_w32_result, and will # be empty on error (or when ARG is empty) func_convert_core_file_wine_to_w32 () { $debug_cmd func_convert_core_file_wine_to_w32_result=$1 if test -n "$1"; then # Unfortunately, winepath does not exit with a non-zero error code, so we # are forced to check the contents of stdout. On the other hand, if the # command is not found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both error code of # zero AND non-empty stdout, which explains the odd construction: func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_arg pretty "$libobj" test "X$libobj" != "X$func_quote_arg_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_arg pretty "$srcfile" qsrcfile=$func_quote_arg_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG -Xcompiler FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wa,FLAG -Xassembler FLAG pass linker-specific FLAG directly to the assembler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_arg pretty "$nonopt" install_prog="$func_quote_arg_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_arg pretty "$arg" func_append install_prog "$func_quote_arg_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_arg pretty "$arg" func_append install_prog " $func_quote_arg_result" if test -n "$arg2"; then func_quote_arg pretty "$arg2" fi func_append install_shared_prog " $func_quote_arg_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_arg pretty "$install_override_mode" func_append install_shared_prog " -m $func_quote_arg_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_arg expand,pretty "$relink_command" eval "func_echo $func_quote_arg_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen <import library>. $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 </dev/null >/dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" func_quote_arg pretty "$ECHO" qECHO=$func_quote_arg_result $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=$qECHO fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat <<EOF /* $cwrappersource - temporary wrapper executable for $objdir/$outputname Generated by $PROGRAM (GNU $PACKAGE) $VERSION The $output program cannot be directly executed until all the libtool libraries that it depends on are installed. This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. */ EOF cat <<"EOF" #ifdef _MSC_VER # define _CRT_SECURE_NO_DEPRECATE 1 #endif #include <stdio.h> #include <stdlib.h> #ifdef _MSC_VER # include <direct.h> # include <process.h> # include <io.h> #else # include <unistd.h> # include <stdint.h> # ifdef __CYGWIN__ # include <io.h> # endif #endif #include <malloc.h> #include <stdarg.h> #include <assert.h> #include <string.h> #include <ctype.h> #include <errno.h> #include <fcntl.h> #include <sys/stat.h> #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <<EOF #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) # define externally_visible volatile #else # define externally_visible __attribute__((externally_visible)) volatile #endif externally_visible const char * MAGIC_EXE = "$magic_exe"; const char * LIB_PATH_VARNAME = "$shlibpath_var"; EOF if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then func_to_host_path "$temp_rpath" cat <<EOF const char * LIB_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" const char * LIB_PATH_VALUE = ""; EOF fi if test -n "$dllsearchpath"; then func_to_host_path "$dllsearchpath:" cat <<EOF const char * EXE_PATH_VARNAME = "PATH"; const char * EXE_PATH_VALUE = "$func_to_host_path_result"; EOF else cat <<"EOF" const char * EXE_PATH_VARNAME = ""; const char * EXE_PATH_VALUE = ""; EOF fi if test yes = "$fast_install"; then cat <<EOF const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */ EOF else cat <<EOF const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */ EOF fi cat <<"EOF" #define LTWRAPPER_OPTION_PREFIX "--lt-" static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX; static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script"; static const char *debug_opt = LTWRAPPER_OPTION_PREFIX "debug"; int main (int argc, char *argv[]) { char **newargz; int newargc; char *tmp_pathspec; char *actual_cwrapper_path; char *actual_cwrapper_name; char *target_name; char *lt_argv_zero; int rval = 127; int i; program_name = (char *) xstrdup (base_name (argv[0])); newargz = XMALLOC (char *, (size_t) argc + 1); /* very simple arg parsing; don't want to rely on getopt * also, copy all non cwrapper options to newargz, except * argz[0], which is handled differently */ newargc=0; for (i = 1; i < argc; i++) { if (STREQ (argv[i], dumpscript_opt)) { EOF case $host in *mingw* | *cygwin* ) # make stdout use "unix" line endings echo " setmode(1,_O_BINARY);" ;; esac cat <<"EOF" lt_dump_script (stdout); return 0; } if (STREQ (argv[i], debug_opt)) { lt_debug = 1; continue; } if (STREQ (argv[i], ltwrapper_option_prefix)) { /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX namespace, but it is not one of the ones we know about and have already dealt with, above (inluding dump-script), then report an error. Otherwise, targets might begin to believe they are allowed to use options in the LTWRAPPER_OPTION_PREFIX namespace. The first time any user complains about this, we'll need to make LTWRAPPER_OPTION_PREFIX a configure-time option or a configure.ac-settable value. */ lt_fatal (__FILE__, __LINE__, "unrecognized %s option: '%s'", ltwrapper_option_prefix, argv[i]); } /* otherwise ... */ newargz[++newargc] = xstrdup (argv[i]); } newargz[++newargc] = NULL; EOF cat <<EOF /* The GNU banner must be the first non-error debug message */ lt_debugprintf (__FILE__, __LINE__, "libtool wrapper (GNU $PACKAGE) $VERSION\n"); EOF cat <<"EOF" lt_debugprintf (__FILE__, __LINE__, "(main) argv[0]: %s\n", argv[0]); lt_debugprintf (__FILE__, __LINE__, "(main) program_name: %s\n", program_name); tmp_pathspec = find_executable (argv[0]); if (tmp_pathspec == NULL) lt_fatal (__FILE__, __LINE__, "couldn't find %s", argv[0]); lt_debugprintf (__FILE__, __LINE__, "(main) found exe (before symlink chase) at: %s\n", tmp_pathspec); actual_cwrapper_path = chase_symlinks (tmp_pathspec); lt_debugprintf (__FILE__, __LINE__, "(main) found exe (after symlink chase) at: %s\n", actual_cwrapper_path); XFREE (tmp_pathspec); actual_cwrapper_name = xstrdup (base_name (actual_cwrapper_path)); strendzap (actual_cwrapper_path, actual_cwrapper_name); /* wrapper name transforms */ strendzap (actual_cwrapper_name, ".exe"); tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1); XFREE (actual_cwrapper_name); actual_cwrapper_name = tmp_pathspec; tmp_pathspec = 0; /* target_name transforms -- use actual target program name; might have lt- prefix */ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME)); strendzap (target_name, ".exe"); tmp_pathspec = lt_extend_str (target_name, ".exe", 1); XFREE (target_name); target_name = tmp_pathspec; tmp_pathspec = 0; lt_debugprintf (__FILE__, __LINE__, "(main) libtool target name: %s\n", target_name); EOF cat <<EOF newargz[0] = XMALLOC (char, (strlen (actual_cwrapper_path) + strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1)); strcpy (newargz[0], actual_cwrapper_path); strcat (newargz[0], "$objdir"); strcat (newargz[0], "/"); EOF cat <<"EOF" /* stop here, and copy so we don't have to do this twice */ tmp_pathspec = xstrdup (newargz[0]); /* do NOT want the lt- prefix here, so use actual_cwrapper_name */ strcat (newargz[0], actual_cwrapper_name); /* DO want the lt- prefix here if it exists, so use target_name */ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1); XFREE (tmp_pathspec); tmp_pathspec = NULL; EOF case $host_os in mingw*) cat <<"EOF" { char* p; while ((p = strchr (newargz[0], '\\')) != NULL) { *p = '/'; } while ((p = strchr (lt_argv_zero, '\\')) != NULL) { *p = '/'; } } EOF ;; esac cat <<"EOF" XFREE (target_name); XFREE (actual_cwrapper_path); XFREE (actual_cwrapper_name); lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */ lt_setenv ("DUALCASE", "1"); /* for MSK sh */ /* Update the DLL searchpath. EXE_PATH_VALUE ($dllsearchpath) must be prepended before (that is, appear after) LIB_PATH_VALUE ($temp_rpath) because on Windows, both *_VARNAMEs are PATH but uninstalled libraries must come first. */ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE); lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE); lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", i, nonnull (newargz[i])); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ newargz = prepare_spawn (newargz); rval = (int) _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ lt_debugprintf (__FILE__, __LINE__, "(main) failed to launch target \"%s\": %s\n", lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined HAVE_DOS_BASED_FILE_SYSTEM /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_arg pretty,unquoted "$arg" qarg=$func_quote_arg_unquoted_result func_append libtool_args " $func_quote_arg_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xassembler) func_append compiler_flags " -Xassembler $qarg" prev= func_append compile_command " -Xassembler $qarg" func_append finalize_command " -Xassembler $qarg" continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig* | *-*-midnightbsd*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; # Solaris ld rejects as of 11.4. Refer to Oracle bug 22985199. -pthread) case $host in *solaris2*) ;; *) case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac ;; esac continue ;; -mt|-mthreads|-kthread|-Kthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $func_quote_arg_result" func_append compiler_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_arg pretty "$flag" func_append arg " $wl$func_quote_arg_result" func_append compiler_flags " $wl$func_quote_arg_result" func_append linker_flags " $func_quote_arg_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xassembler) prev=xassembler continue ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer # -fuse-ld=* Linker select flags for GCC # -Wa,* Pass flags directly to the assembler -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*|-fuse-ld=*|-Wa,*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_arg pretty "$arg" arg=$func_quote_arg_result fi ;; # Some other compiler flag. -* | +*) func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_arg pretty "$arg" arg=$func_quote_arg_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | $SED 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|midnightbsd-elf|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf | midnightbsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-midnightbsd*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c <<EOF int main() { return 0; } EOF $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then ldd_output=`ldd conftest` for i in $deplibs; do case $i in -l*) func_stripname -l '' "$i" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" i= ;; esac fi if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which I believe you do not have" echo "*** because a test_compile did reveal that the linker did not use it for" echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) func_append newdeplibs " $i" ;; esac done else # Error occurred in the first compile. Let's try to salvage # the situation: Compile a separate program for each library. for i in $deplibs; do case $i in -l*) func_stripname -l '' "$i" name=$func_stripname_result $opt_dry_run || $RM conftest if $LTCC $LTCFLAGS -o conftest conftest.c $i; then ldd_output=`ldd conftest` if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $i "*) func_append newdeplibs " $i" i= ;; esac fi if test -n "$i"; then libname=`eval "\\$ECHO \"$libname_spec\""` deplib_matches=`eval "\\$ECHO \"$library_names_spec\""` set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0; then func_append newdeplibs " $i" else droppeddeps=yes echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because a test_compile did reveal that the linker did not use this one" echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" echo "*** make it link in! You will probably need to install it or some" echo "*** library that it depends on before this library will be fully" echo "*** functional. Installing it before continuing would be even better." fi ;; *) func_append newdeplibs " $i" ;; esac done fi ;; file_magic*) set dummy $deplibs_check_method; shift file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` if test -n "$file_magic_glob"; then libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` else libnameglob=$libname fi test yes = "$want_nocaseglob" && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do if test yes = "$want_nocaseglob"; then shopt -s nocaseglob potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_arg expand,pretty "$cmd" eval "func_echo $func_quote_arg_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty "$var_value" relink_command="$var=$func_quote_arg_result; export $var; $relink_command" fi done func_quote eval cd "`pwd`" func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)" relink_command=$func_quote_arg_unquoted_result fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_arg pretty,unquoted "$var_value" relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command" fi done # Quote the link command for shipping. func_quote eval cd "`pwd`" relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" func_quote_arg pretty,unquoted "$relink_command" relink_command=$func_quote_arg_unquoted_result if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/missing�������������������������������������������������������������������������0000755�0001750�0001750�00000015336�14757411114�011242� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to <bug-automake@gnu.org>." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/xorg-server.m4������������������������������������������������������������������0000644�0001750�0001750�00000003571�14757411105�012366� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation. dnl dnl The above copyright notice and this permission notice shall be included dnl in all copies or substantial portions of the Software. dnl dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR dnl OTHER DEALINGS IN THE SOFTWARE. dnl dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. dnl # XORG_DRIVER_CHECK_EXT(MACRO, PROTO) # -------------------------- # Checks for the MACRO define in xorg-server.h (from the sdk). If it # is defined, then add the given PROTO to $REQUIRED_MODULES. AC_DEFUN([XORG_DRIVER_CHECK_EXT],[ AC_REQUIRE([PKG_PROG_PKG_CONFIG]) SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include "xorg-server.h" #if !defined $1 #error $1 not defined #endif ]])], [_EXT_CHECK=yes], [_EXT_CHECK=no]) CFLAGS="$SAVE_CFLAGS" AC_MSG_CHECKING([if $1 is defined]) AC_MSG_RESULT([$_EXT_CHECK]) if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES $2" fi ]) ���������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/autogen.sh����������������������������������������������������������������������0000755�0001750�0001750�00000000524�14757411105�011635� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh srcdir=`dirname "$0"` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd "$srcdir" autoreconf --force -v --install || exit 1 cd "$ORIGDIR" || exit $? git config --local --get format.subjectPrefix || git config --local format.subjectPrefix "PATCH xserver" if test -z "$NOCONFIGURE"; then exec "$srcdir"/configure "$@" fi ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/meson_options.txt���������������������������������������������������������������0000644�0001750�0001750�00000016526�14757411105�013302� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������option('xorg', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable Xorg X Server') option('xephyr', type: 'boolean', value: false, description: 'Enable Xephyr nested X server') option('glamor', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable glamor (default yes for Xorg builds)') option('xnest', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable Xnest nested X server') option('xvfb', type: 'boolean', value: true, description: 'Enable Xvfb X server') option('xwin', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable XWin X server') option('xquartz', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable Xquartz X server') option('builder_addr', type: 'string', description: 'Builder address', value: 'xorg@lists.freedesktop.org') option('builder_string', type: 'string', description: 'Additional builder string') option('log_dir', type: 'string') option('module_dir', type: 'string', value: 'xorg/modules', description: 'X.Org modules directory (absolute or relative to the directory specified by the libdir option)') option('default_font_path', type: 'string') option('glx', type: 'boolean', value: true) option('xdmcp', type: 'boolean', value: true) option('xdm-auth-1', type: 'boolean', value: true) option('secure-rpc', type: 'boolean', value: true) option('ipv6', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto') option('input_thread', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto') option('xkb_dir', type: 'string') option('xkb_output_dir', type: 'string') option('xkb_bin_dir', type: 'string') option('xkb_default_rules', type: 'string', value: 'evdev') option('xkb_default_model', type: 'string', value: 'pc105') option('xkb_default_layout', type: 'string', value: 'us') option('xkb_default_variant', type: 'string') option('xkb_default_options', type: 'string') option('fallback_input_driver', type: 'string', value: 'auto') option('vendor_name', type: 'string', value: 'The X.Org Foundation') option('vendor_name_short', type: 'string', value: 'X.Org') option('vendor_web', type: 'string', value: 'http://wiki.x.org') option('dtrace', type: 'boolean', value: false, description: 'Enable dtrace hooks') option('listen_tcp', type: 'boolean', value: false, description: 'Listen on TCP by default') option('listen_unix', type: 'boolean', value: true, description: 'Listen on Unix by default') option('listen_local', type: 'boolean', value: true, description: 'Listen on local by default') option('int10', type: 'combo', choices: ['stub', 'x86emu', 'vm86', 'auto', 'false'], value: 'auto', description: 'Xorg int10 backend (default: usually x86emu)') option('suid_wrapper', type: 'boolean', value: 'false', description: 'SUID wrapper for legacy driver support') option('pciaccess', type: 'boolean', value: 'true', description: 'Xorg pciaccess support') option('udev', type: 'boolean', value: 'true') option('udev_kms', type: 'boolean', value: 'true') option('hal', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable HAL integration') option('systemd_logind', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Enable systemd-logind integration') option('vgahw', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Xorg VGA access module') option('dpms', type: 'boolean', value: true, description: 'Xorg DPMS extension') option('xf86bigfont', type: 'boolean', value: false, description: 'XF86 Big Font extension') option('screensaver', type: 'boolean', value: true, description: 'ScreenSaver extension') option('xres', type: 'boolean', value: true, description: 'XRes extension') option('xace', type: 'boolean', value: true, description: 'X-ACE extension') option('xselinux', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'XSELINUX extension') option('xinerama', type: 'boolean', value: true, description: 'Xinerama extension') option('xcsecurity', type: 'boolean', value: false, description: 'Security extension') option('xv', type: 'boolean', value: true, description: 'Xv extension') option('xvmc', type: 'boolean', value: true, description: 'XvMC extension') option('dga', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'DGA extension') option('linux_apm', type: 'boolean', value: true, description: 'APM support on Linux') option('linux_acpi', type: 'boolean', value: true, description: 'ACPI support on Linux') option('mitshm', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'SHM extension') option('agp', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'AGP support') option('sha1', type: 'combo', choices: ['libc', 'CommonCrypto', 'CryptoAPI', 'libmd', 'libsha1', 'libnettle', 'libgcrypt', 'libcrypto', 'auto'], value: 'auto', description: 'SHA1 implementation') option('xf86-input-inputtest', type: 'boolean', value: true, description: 'Test input driver support on Xorg') option('dri1', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI1 extension (default: auto)') option('dri2', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI2 extension (default: auto)') option('dri3', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build DRI3 extension (default: auto)') option('drm', type: 'boolean', value: 'true', description: 'Build Xorg with libdrm support') option('apple-applications-dir', type: 'string', value: '/Applications/Utilities', description: 'Applications directory') option('apple-application-name', type: 'string', value: 'X11', description: 'Application name') option('bundle-id-prefix', type: 'string', value: 'org.x', description: 'RDNS prefix for bundle identifier') option('bundle-version', type: 'string', value: 'auto', description: 'The CFBundleVersion for the application bundle') option('bundle-version-string', type: 'string', value: 'auto', description: 'The CFBundleShortVersionString for the application bundle') option('sparkle-feed-url', type: 'string', description: 'Feed URL for autoupdating with the Sparkle Framework (default: disabled)') option('sparkle-public-edkey', type: 'string', description: 'Public EdDSA key for verifying updates from the Sparkle feed (default: disabled)') option('xpbproxy', type: 'boolean', value: false, description: 'Build a standalone X pasteboard proxy') option('libunwind', type: 'boolean', value: false, description: 'Use libunwind for backtrace reporting') option('docs', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build documentation') option('devel-docs', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Build development documentation') option('docs-pdf', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Whether to build PDF version of documentation. Setting is ignored if documentation is not built.') ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/meson.build���������������������������������������������������������������������0000644�0001750�0001750�00000062314�14757411105�012003� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������project('xserver', 'c', default_options: [ 'buildtype=debugoptimized', 'c_std=gnu99', ], version: '21.1.16', meson_version: '>= 0.47.0', ) release_date = '2025-02-25' add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc']) cc = meson.get_compiler('c') add_global_arguments('-fno-strict-aliasing', language : 'c') add_global_arguments('-fvisibility=hidden', language : 'c') add_global_link_arguments('-fvisibility=hidden', language : 'c') if cc.get_id() == 'gcc' or cc.get_id() == 'clang' test_wflags = [ '-Wall', '-Wpointer-arith', '-Wmissing-declarations', '-Wformat=2', '-Wstrict-prototypes', '-Wmissing-prototypes', '-Wnested-externs', '-Wbad-function-cast', '-Wold-style-definition', '-Wunused', '-Wuninitialized', '-Wshadow', '-Wmissing-noreturn', '-Wmissing-format-attribute', '-Wredundant-decls', '-Werror=implicit', '-Werror=nonnull', '-Werror=init-self', '-Werror=main', '-Werror=missing-braces', '-Werror=sequence-point', '-Werror=return-type', '-Werror=trigraphs', '-Werror=array-bounds', '-Werror=write-strings', '-Werror=address', '-Werror=int-to-pointer-cast', '-Werror=pointer-to-int-cast', ] else test_wflags = [] endif common_wflags = [] foreach wflag: test_wflags if cc.has_argument(wflag) common_wflags += [ wflag ] endif endforeach add_global_arguments(common_wflags, language : ['c', 'objc']) libdrm_req = '>= 2.4.89' libselinux_req = '>= 2.0.86' xext_req = '>= 1.0.99.4' wayland_req = '>= 1.5.0' wayland_protocols_req = '>= 1.18' gbm_req = '>= 10.2' xf86dgaproto_req = '>= 2.0.99.1' xproto_dep = dependency('xproto', version: '>= 7.0.31', fallback: ['xorgproto', 'ext_xorgproto']) randrproto_dep = dependency('randrproto', version: '>= 1.6.0', fallback: ['xorgproto', 'ext_xorgproto']) renderproto_dep = dependency('renderproto', version: '>= 0.11', fallback: ['xorgproto', 'ext_xorgproto']) xextproto_dep = dependency('xextproto', version: '>= 7.2.99.901', fallback: ['xorgproto', 'ext_xorgproto']) inputproto_dep = dependency('inputproto', version: '>= 2.3.99.1', fallback: ['xorgproto', 'ext_xorgproto']) kbproto_dep = dependency('kbproto', version: '>= 1.0.3', fallback: ['xorgproto', 'ext_xorgproto']) fontsproto_dep = dependency('fontsproto', version: '>= 2.1.3', fallback: ['xorgproto', 'ext_xorgproto']) fixesproto_dep = dependency('fixesproto', version: '>= 6.0', fallback: ['xorgproto', 'ext_xorgproto']) damageproto_dep = dependency('damageproto', version: '>= 1.1', fallback: ['xorgproto', 'ext_xorgproto']) xcmiscproto_dep = dependency('xcmiscproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto']) bigreqsproto_dep = dependency('bigreqsproto', version: '>= 1.1.0', fallback: ['xorgproto', 'ext_xorgproto']) xtrans_dep = dependency('xtrans', version: '>= 1.3.5') videoproto_dep = dependency('videoproto', fallback: ['xorgproto', 'ext_xorgproto']) compositeproto_dep = dependency('compositeproto', version: '>= 0.4', fallback: ['xorgproto', 'ext_xorgproto']) recordproto_dep = dependency('recordproto', version: '>= 1.13.99.1', fallback: ['xorgproto', 'ext_xorgproto']) scrnsaverproto_dep = dependency('scrnsaverproto', version: '>= 1.1', fallback: ['xorgproto', 'ext_xorgproto']) resourceproto_dep = dependency('resourceproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto']) xf86driproto_dep = dependency('xf86driproto', version: '>= 2.1.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri1') == 'true') dri2proto_dep = dependency('dri2proto', version: '>= 2.8', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri2') == 'true') dri3proto_dep = dependency('dri3proto', version: '>= 1.2', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('dri3') == 'true') xineramaproto_dep = dependency('xineramaproto', fallback: ['xorgproto', 'ext_xorgproto']) xf86bigfontproto_dep = dependency('xf86bigfontproto', version: '>= 1.2.0', fallback: ['xorgproto', 'ext_xorgproto'], required: get_option('xf86bigfont')) xf86vidmodeproto_dep = dependency('xf86vidmodeproto', version: '>= 2.2.99.1', fallback: ['xorgproto', 'ext_xorgproto']) applewmproto_dep = dependency('applewmproto', version: '>= 1.4', fallback: ['xorgproto', 'ext_xorgproto'], required: false) xshmfence_dep = dependency('xshmfence', version: '>= 1.1', required: false) pixman_dep = dependency('pixman-1') libbsd_dep = dependency('libbsd-overlay', required: false) xkbcomp_dep = dependency('xkbcomp', required: false) xkbfile_dep = dependency('xkbfile') xfont2_dep = dependency('xfont2', version: '>= 2.0') dbus_required = get_option('systemd_logind') == 'true' dbus_dep = dependency('dbus-1', version: '>= 1.0', required: dbus_required) # libsystemd-daemon was moved into libsystemd in version 209 libsystemd_daemon_dep = dependency('libsystemd', version: '>= 209', required: false) if not libsystemd_daemon_dep.found() libsystemd_daemon_dep = dependency('libsystemd-daemon', required: false) endif build_hashtable = false # Resolve default values of some options xkb_dir = get_option('xkb_dir') if xkb_dir == '' if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig' xkb_dir = xkbcomp_dep.get_pkgconfig_variable('xkbconfigdir') endif if xkb_dir == '' xkb_dir = join_paths(get_option('prefix'), 'share/X11/xkb') endif endif xkb_output_dir = get_option('xkb_output_dir') if xkb_output_dir == '' xkb_output_dir = join_paths(xkb_dir, 'compiled') endif xkb_bin_dir = get_option('xkb_bin_dir') if xkb_bin_dir == '' if xkbcomp_dep.found() and xkbcomp_dep.type_name() == 'pkgconfig' xkb_bin_dir = xkbcomp_dep.get_pkgconfig_variable('bindir') endif if xkb_bin_dir == '' xkb_bin_dir = join_paths(get_option('prefix'), get_option('bindir')) endif endif dfp = get_option('default_font_path') if dfp == '' fontutil_dep = dependency('fontutil') fontrootdir = fontutil_dep.get_pkgconfig_variable('fontrootdir') dfp_elements = [ join_paths(fontrootdir, 'misc'), join_paths(fontrootdir, 'TTF'), join_paths(fontrootdir, 'OTF'), join_paths(fontrootdir, 'Type1'), join_paths(fontrootdir, '100dpi'), join_paths(fontrootdir, '75dpi'), ] if host_machine.system() == 'darwin' dfp_elements += [ '/Library/Fonts', '/System/Library/Fonts', ] endif default_font_path = ','.join(dfp_elements) else default_font_path = dfp endif hal_option = get_option('hal') glamor_option = get_option('glamor') build_udev = get_option('udev') build_udev_kms = get_option('udev_kms') if ['windows', 'darwin', 'cygwin'].contains(host_machine.system()) build_udev = false build_udev_kms = false hal_option = 'false' endif if get_option('systemd_logind') == 'auto' build_systemd_logind = build_udev_kms and dbus_dep.found() else build_systemd_logind = get_option('systemd_logind') == 'true' endif with_dtrace = get_option('dtrace') if with_dtrace dtrace = find_program('dtrace', required: true) endif build_xorg = false if (host_machine.system() != 'windows') if get_option('xorg') == 'auto' build_xorg = (host_machine.system() != 'darwin' and host_machine.system() != 'windows') else build_xorg = get_option('xorg') == 'true' endif endif xorgsdkdir = join_paths(get_option('prefix'), get_option('includedir'), 'xorg') libxcvt_dep = dependency('libxcvt', required: build_xorg) build_xnest = false if (host_machine.system() != 'windows') if get_option('xnest') != 'false' xnest_required = get_option('xnest') == 'true' xnest_dep = [ dependency('xext', version: xext_req, required: xnest_required), dependency('x11', required: xnest_required), dependency('xau', required: xnest_required), ] build_xnest = true # check for all the deps being found, to handle 'auto' mode. foreach d: xnest_dep if not d.found() build_xnest = false endif endforeach endif endif build_xwin = false if get_option('xwin') == 'auto' if (host_machine.system() == 'cygwin' or host_machine.system() == 'windows') build_xwin = true endif else build_xwin = get_option('xwin') == 'true' endif build_xquartz = false if get_option('xquartz') == 'auto' if host_machine.system() == 'darwin' build_xquartz = true endif else build_xquartz = get_option('xquartz') == 'true' endif build_rootless = false if build_xquartz build_rootless = true endif if get_option('ipv6') == 'auto' build_ipv6 = cc.has_function('getaddrinfo') else build_ipv6 = get_option('ipv6') == 'true' endif int10 = get_option('int10') if int10 == 'auto' int10 = 'x86emu' if host_machine.cpu() == 'powerpc' and host_machine.system() == 'freebsd' int10 = 'stub' endif if host_machine.cpu() == 'arm' int10 = 'stub' endif endif hal_dep = [] if hal_option == 'auto' if not build_udev hal_dep = dependency('hal', required: false) build_hal = hal_dep.found() else build_hal = false endif else build_hal = hal_option == 'true' if build_hal hal_dep = dependency('hal') endif endif if build_udev and build_hal error('Hotplugging through both libudev and hal not allowed') endif build_dbus = build_hal or build_systemd_logind udev_dep = dependency('', required:false) if build_udev or build_udev_kms udev_dep = dependency('libudev', version: '>= 143') endif log_dir = get_option('log_dir') if log_dir == '' log_dir = join_paths(get_option('prefix'), get_option('localstatedir'), 'log') endif module_dir = join_paths(get_option('libdir'), get_option('module_dir')) if glamor_option == 'auto' build_glamor = build_xorg else build_glamor = glamor_option == 'true' endif gbm_dep = dependency('', required: false) epoxy_dep = dependency('', required: false) if build_glamor gbm_dep = dependency('gbm', version: gbm_req, required: false) epoxy_dep = dependency('epoxy', required: false) endif # Lots of sha1 options, because Linux is about choice :) # The idea behind the ordering here is that we should first prefer system # builtin providers, and then smaller implementations of over larger ones. test_sha1 = [ 'libc', # libmd API is in libc on some BSDs 'CommonCrypto', # darwin API 'CryptoAPI', # windows API 'libmd', # other BSDs & Solaris 'libsha1', # "a tiny library providing a SHA1 implementation, created for facilitating X server compilation on embedded devices where larger libraries containing SHA1 implementations are not needed" 'libnettle', 'libgcrypt', # in debian base system 'libcrypto', ] if get_option('sha1') != 'auto' test_sha1 = [get_option('sha1')] endif sha1_found = false foreach t : test_sha1 if t == 'libc' if cc.has_function('SHA1Init') sha1_found = true sha1_dep = dependency('', required: false) endif elif t == 'CommonCrypto' if cc.has_function('CC_SHA1_Init') sha1_found = true sha1_dep = dependency('', required: false) endif elif t == 'CryptoAPI' if cc.has_header('wincrypt.h') sha1_found = true sha1_dep = dependency('', required: false) endif elif t == 'libmd' md_dep = cc.find_library('md', required: false) if md_dep.found() sha1_found = true sha1_dep = md_dep endif elif t == 'libsha1' libsha1_dep = dependency('libsha1', required: false) if libsha1_dep.found() sha1_found = true sha1_dep = libsha1_dep endif elif t == 'libnettle' nettle_dep = dependency('nettle', required: false) if nettle_dep.found() sha1_found = true sha1_dep = nettle_dep endif elif t == 'libgcrypt' gcrypt_dep = dependency('libgcrypt', required: false) if gcrypt_dep.found() sha1_found = true sha1_dep = gcrypt_dep endif elif t == 'libcrypto' # we don't need all of OpenSSL, just libcrypto libcrypto_dep = cc.find_library('crypto', required: false) openssl_dep = dependency('openssl', required: false) if libcrypto_dep.found() or openssl_dep.found() sha1_found = true if libcrypto_dep.found() sha1_dep = libcrypto_dep else sha1_dep = openssl_dep endif endif endif if sha1_found sha1 = t break endif endforeach if sha1_found message('Using @0@ SHA1 functions'.format(sha1)) else if get_option('sha1') != 'auto' error('@0@ SHA1 requested, but not found'.format(get_option('sha1'))) else error('No suitable SHA1 implementation found') endif endif xdmcp_dep = dependency('', required : false) if get_option('xdmcp') xdmcp_dep = dependency('xdmcp') endif has_xdm_auth = get_option('xdm-auth-1') if not xdmcp_dep.found() has_xdm_auth = false endif build_glx = get_option('glx') if build_glx build_hashtable = true endif libdrm_dep = dependency('libdrm', version: libdrm_req, required: false) if get_option('dri1') == 'auto' build_dri1 = xf86driproto_dep.found() and libdrm_dep.found() else build_dri1 = get_option('dri1') == 'true' endif if get_option('dri2') == 'auto' build_dri2 = dri2proto_dep.found() and libdrm_dep.found() else build_dri2 = get_option('dri2') == 'true' endif if get_option('dri3') == 'auto' build_dri3 = dri3proto_dep.found() and xshmfence_dep.found() and libdrm_dep.found() else build_dri3 = get_option('dri3') == 'true' if build_dri3 if not xshmfence_dep.found() error('DRI3 requested, but xshmfence not found') endif endif endif libdrm_required = (build_dri1 or build_dri2 or build_dri3) and get_option('drm') == true if not libdrm_dep.found() and libdrm_required error('DRI requested, but LIBDRM not found') endif build_modesetting = libdrm_dep.found() and dri2proto_dep.found() build_vgahw = false if get_option('vgahw') == 'auto' if (host_machine.system() != 'darwin' and host_machine.system() != 'windows' and host_machine.system() != 'cygwin') build_vgahw = true endif else build_vgahw = get_option('vgahw') == 'true' endif build_dpms = get_option('dpms') if build_xquartz build_dpms = false endif build_xf86bigfont = get_option('xf86bigfont') build_screensaver = get_option('screensaver') build_res = get_option('xres') if build_res build_hashtable = true endif build_xace = get_option('xace') build_xinerama = get_option('xinerama') build_xsecurity = get_option('xcsecurity') if build_xsecurity if not build_xace error('cannot build Security extension without X-ACE') endif endif build_xv = get_option('xv') build_xvmc = get_option('xvmc') if not build_xv build_xvmc = false endif build_dga = false xf86dgaproto_dep = dependency('', required: false) if get_option('dga') == 'auto' xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: false) if xf86dgaproto_dep.found() build_dga = true endif elif get_option('dga') == 'true' xf86dgaproto_dep = dependency('xf86dgaproto', version: xf86dgaproto_req, required: true) build_dga = true endif build_apm = false if (get_option('linux_apm') == true and host_machine.system() == 'linux') if cc.has_header('linux/apm_bios.h') build_apm = true endif endif build_acpi = false if (get_option('linux_acpi') == true and host_machine.system() == 'linux') if (host_machine.cpu() == 'x86' or host_machine.cpu() == 'x86_64' or host_machine.cpu() == 'ia64') build_acpi = true endif endif build_mitshm = false if get_option('mitshm') == 'auto' build_mitshm = cc.has_header('sys/shm.h') elif get_option('mitshm') == 'true' build_mitshm = true endif m_dep = cc.find_library('m', required : false) dl_dep = cc.find_library('dl', required : false) common_dep = [ xproto_dep, randrproto_dep, renderproto_dep, xextproto_dep, inputproto_dep, kbproto_dep, fontsproto_dep, fixesproto_dep, damageproto_dep, xcmiscproto_dep, bigreqsproto_dep, xtrans_dep, libsystemd_daemon_dep, videoproto_dep, compositeproto_dep, recordproto_dep, scrnsaverproto_dep, resourceproto_dep, xf86driproto_dep, dri2proto_dep, dri3proto_dep, xineramaproto_dep, xf86bigfontproto_dep, xf86dgaproto_dep, xf86vidmodeproto_dep, applewmproto_dep, pixman_dep, libbsd_dep, xkbfile_dep, xfont2_dep, xdmcp_dep, ] inc = include_directories( 'Xext', 'Xi', 'composite', 'damageext', 'exa', 'fb', 'glamor', 'mi', 'miext/damage', 'miext/shadow', 'miext/sync', 'dbe', 'dri3', 'include', 'present', 'randr', 'render', 'xfixes', ) build_xselinux = false if get_option('xselinux') != 'false' dep_selinux = dependency('libselinux', version: libselinux_req, required: get_option('xselinux') == 'true') dep_audit = dependency('audit', required: get_option('xselinux') == 'true') if get_option('xselinux') == 'true' build_xselinux = true else build_xselinux = dep_selinux.found() and dep_audit.found() endif if build_xselinux common_dep += dep_selinux common_dep += dep_audit endif endif socket_dep = [] if host_machine.system() == 'windows' socket_dep = meson.get_compiler('c').find_library('ws2_32') common_dep += socket_dep endif if get_option('libunwind') common_dep += dependency('libunwind', required: true) endif glx_inc = include_directories('glx') top_dir_inc = include_directories('.') serverconfigdir = join_paths(get_option('prefix'), get_option('libdir'), 'xorg') manpage_config = configuration_data() manpage_config.set('vendorversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version())) manpage_config.set('xorgversion', '"xorg-server @0@" "X Version 11"'.format(meson.project_version())) manpage_config.set('xservername', 'Xorg') manpage_config.set('xconfigfile', 'xorg.conf') manpage_config.set('projectroot', get_option('prefix')) manpage_config.set('apploaddir', '$(appdefaultdir)') manpage_config.set('appmansuffix', '1') manpage_config.set('drivermansuffix', '4') manpage_config.set('adminmansuffix', '8') manpage_config.set('libmansuffix', '3') manpage_config.set('miscmansuffix', '7') manpage_config.set('filemansuffix', '5') manpage_config.set('logdir', log_dir) manpage_config.set('datadir', join_paths(get_option('prefix'), get_option('datadir'))) manpage_config.set('mandir', join_paths(get_option('prefix'), get_option('mandir'))) manpage_config.set('sysconfdir', join_paths(get_option('prefix'), get_option('sysconfdir'))) manpage_config.set('xconfigdir', 'xorg.conf.d') manpage_config.set('xkbdir', xkb_dir) manpage_config.set('XKB_DFLT_RULES', get_option('xkb_default_rules')) manpage_config.set('XKB_DFLT_MODEL', get_option('xkb_default_model')) manpage_config.set('XKB_DFLT_LAYOUT', get_option('xkb_default_layout')) manpage_config.set('XKB_DFLT_VARIANT', get_option('xkb_default_variant')) manpage_config.set('XKB_DFLT_OPTIONS', get_option('xkb_default_options')) manpage_config.set('bundle_id_prefix', '...') manpage_config.set('modulepath', module_dir) # wtf doesn't this work # manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), libexecdir)) manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec')) manpage_config.set('default_font_path', default_font_path) require_docs = get_option('docs') == 'true' require_devel_docs = get_option('devel-docs') == 'true' require_docs_pdf = (require_docs or require_devel_docs) and get_option('docs-pdf') == 'true' sgml_doctools_dep = dependency('xorg-sgml-doctools', required: require_docs or require_devel_docs) xmlto = find_program('xmlto', required: require_docs or require_devel_docs) xsltproc = find_program('xsltproc', required: require_docs or require_devel_docs) fop = find_program('fop', required: require_docs_pdf) build_docs = (get_option('docs') != 'false' and sgml_doctools_dep.found() and xmlto.found()) build_docs_devel = (get_option('devel-docs') != 'false' and sgml_doctools_dep.found() and xmlto.found()) build_docs_pdf = (get_option('docs-pdf') != 'false' and (build_docs or build_docs_devel) and fop.found()) if build_docs or build_docs_devel doc_sgml_path = sgml_doctools_dep.get_pkgconfig_variable('sgmlrootdir') doc_stylesheet_srcdir = join_paths(doc_sgml_path, 'X11') # once we bump meson dependency to 0.56.0 we can use # meson.project_build_root() instead of meson.build_root() # Meson does not and will not support functions so we are copy-pasting # documentation build code around which is unfortunate # See https://mesonbuild.com/FAQ.html#why-doesnt-meson-have-user-defined-functionsmacros docs_xmlto_search_flags = [ '--searchpath', doc_stylesheet_srcdir, '--searchpath', meson.build_root(), ] docs_xslt_search_flags = [ '--path', doc_stylesheet_srcdir, '--path', meson.build_root(), ] endif # Include must come first, as it sets up dix-config.h subdir('include') # X server core subdir('config') subdir('dix') subdir('dri3') subdir('glx') subdir('fb') subdir('mi') subdir('os') # X extensions subdir('composite') subdir('damageext') subdir('dbe') subdir('miext/damage') subdir('miext/shadow') subdir('miext/sync') if build_rootless subdir('miext/rootless') endif subdir('present') if build_xwin or build_xquartz subdir('pseudoramiX') endif subdir('randr') subdir('record') subdir('render') subdir('xfixes') subdir('xkb') subdir('Xext') subdir('Xi') # other if build_glamor subdir('glamor') endif if build_xorg or get_option('xephyr') subdir('exa') endif subdir('doc') # Common static libraries of all X servers libxserver = [ libxserver_mi, libxserver_dix, libxserver_composite, libxserver_damageext, libxserver_dbe, libxserver_randr, libxserver_miext_damage, libxserver_render, libxserver_present, libxserver_xext, libxserver_miext_sync, libxserver_xfixes, libxserver_xi, libxserver_xkb, libxserver_record, libxserver_os, ] libxserver += libxserver_dri3 subdir('hw') if host_machine.system() != 'windows' subdir('test') endif install_man(configure_file( input: 'man/Xserver.man', output: 'Xserver.1', configuration: manpage_config, )) if build_xorg sdkconfig = configuration_data() awk = find_program('awk') sdkconfig.set('prefix', get_option('prefix')) sdkconfig.set('exec_prefix', '${prefix}') sdkconfig.set('libdir', join_paths('${exec_prefix}', get_option('libdir'))) sdkconfig.set('includedir', join_paths('${prefix}', get_option('includedir'))) sdkconfig.set('datarootdir', join_paths('${prefix}', get_option('datadir'))) sdkconfig.set('moduledir', join_paths('${exec_prefix}', module_dir)) sdkconfig.set('sdkdir', join_paths('${prefix}', get_option('includedir'), 'xorg')) sdkconfig.set('sysconfigdir', join_paths('${datarootdir}', 'X11/xorg.conf.d')) sdkconfig.set('abi_ansic', run_command(awk, '-F', '[(,)]', '/^#define ABI_ANSIC.*SET/ { printf "%d.%d", $2, $3 }', files('hw/xfree86/common/xf86Module.h') ).stdout() ) sdkconfig.set('abi_videodrv', run_command(awk, '-F', '[(,)]', '/^#define ABI_VIDEODRV.*SET/ { printf "%d.%d", $2, $3 }', files('hw/xfree86/common/xf86Module.h') ).stdout() ) sdkconfig.set('abi_xinput', run_command(awk, '-F', '[(,)]', '/^#define ABI_XINPUT.*SET/ { printf "%d.%d", $2, $3 }', files('hw/xfree86/common/xf86Module.h') ).stdout() ) sdkconfig.set('abi_extension', run_command(awk, '-F', '[(,)]', '/^#define ABI_EXTENSION.*SET/ { printf "%d.%d", $2, $3 }', files('hw/xfree86/common/xf86Module.h') ).stdout() ) sdk_required_modules = [ 'pixman-1 >= 0.27.2', ] # XXX this isn't trying very hard, but hard enough. sdkconfig.set('PACKAGE_VERSION', meson.project_version()) sdkconfig.set('SDK_REQUIRED_MODULES', ' '.join(sdk_required_modules)) sdkconfig.set('symbol_visibility', '-fvisibility=hidden') sdkconfig.set('XORG_DRIVER_LIBS', '') configure_file( input: 'xorg-server.pc.in', output: 'xorg-server.pc', configuration: sdkconfig, install_dir: join_paths(get_option('prefix'), get_option('libdir'), 'pkgconfig'), ) install_data('xorg-server.m4', install_dir: join_paths(get_option('datadir'), 'aclocal')) endif if build_docs or build_docs_devel docxmlconfig = configuration_data() docxmlconfig.set('PACKAGE_VERSION', meson.project_version()) docxmlconfig.set('RELEASE_DATE', release_date) configure_file( input: 'xserver.ent.in', output: 'xserver.ent', configuration: docxmlconfig ) endif ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/devbook.am����������������������������������������������������������������������0000644�0001750�0001750�00000003433�14757411105�011606� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generate output formats for a single DocBook/XML with/without chapters # # Variables set by the calling Makefile: # noinst_DATA: developers docs are not installed # docbook: the main DocBook/XML file, no chapters, appendix or image files # chapters: all files pulled in by an XInclude statement and images. # # # This makefile is intended for Developers Documentation and is not installed. # Do not use for Users docs or Specs which need to be installed and require olink support # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 # for an explanation on documents classification. # # Developers documnetation is not installed noinst_DATA = # DocBook/XML file with chapters, appendix and images it includes dist_noinst_DATA = $(docbook) $(chapters) FILTER_XMLTO=$(SHELL) $(top_srcdir)/doc/filter-xmlto.sh $(XMLTO) if HAVE_STYLESHEETS XMLTO_HTML_FLAGS = \ --searchpath "$(XORG_SGML_PATH)/X11" \ --searchpath "$(abs_top_builddir)" \ -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl noinst_DATA += $(docbook:.xml=.html) %.html: %.xml $(chapters) $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< if HAVE_XMLTO_TEXT noinst_DATA += $(docbook:.xml=.txt) %.txt: %.xml $(chapters) $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_HTML_FLAGS) txt $< endif HAVE_XMLTO_TEXT if HAVE_FOP XMLTO_FO_FLAGS = \ --searchpath "$(XORG_SGML_PATH)/X11" \ --searchpath "$(abs_top_builddir)" \ --stringparam img.src.path=$(abs_builddir)/ \ -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl noinst_DATA += $(docbook:.xml=.pdf) $(docbook:.xml=.ps) %.pdf: %.xml $(chapters) $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< %.ps: %.xml $(chapters) $(AM_V_GEN)$(FILTER_XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< endif HAVE_FOP endif HAVE_STYLESHEETS CLEANFILES = $(noinst_DATA) �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/docbook.am����������������������������������������������������������������������0000644�0001750�0001750�00000006231�14757411105�011574� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# # Generate output formats for a single DocBook/XML with/without chapters # # Variables set by the calling Makefile: # shelfdir: the location where the docs/specs are installed. Typically $(docdir) # docbook: the main DocBook/XML file, no chapters, appendix or image files # chapters: all files pulled in by an XInclude statement and images. # # # This makefile is intended for Users Documentation and Functional Specifications. # Do not use for Developer Documentation which is not installed and does not require olink. # Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393 # for an explanation on documents classification. # # DocBook/XML generated output formats to be installed shelf_DATA = # DocBook/XML file with chapters, appendix and images it includes dist_shelf_DATA = $(docbook) $(chapters) if HAVE_XMLTO if HAVE_STYLESHEETS XMLTO_SEARCHPATH_FLAGS = \ --searchpath "$(XORG_SGML_PATH)/X11" \ --searchpath "$(abs_top_builddir)" XMLTO_HTML_OLINK_FLAGS = \ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \ --stringparam current.docid="$(<:.xml=)" XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl XMLTO_HTML_FLAGS = \ $(XMLTO_SEARCHPATH_FLAGS) \ $(XMLTO_HTML_STYLESHEET_FLAGS) \ $(XMLTO_HTML_OLINK_FLAGS) shelf_DATA += $(docbook:.xml=.html) %.html: %.xml $(chapters) $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $< if HAVE_XMLTO_TEXT shelf_DATA += $(docbook:.xml=.txt) %.txt: %.xml $(chapters) $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $< endif HAVE_XMLTO_TEXT if HAVE_FOP XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/ XMLTO_PDF_OLINK_FLAGS = \ --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \ --stringparam current.docid="$(<:.xml=)" XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl XMLTO_FO_FLAGS = \ $(XMLTO_SEARCHPATH_FLAGS) \ $(XMLTO_FO_STYLESHEET_FLAGS) \ $(XMLTO_FO_IMAGEPATH_FLAGS) \ $(XMLTO_PDF_OLINK_FLAGS) shelf_DATA += $(docbook:.xml=.pdf) %.pdf: %.xml $(chapters) $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $< shelf_DATA += $(docbook:.xml=.ps) %.ps: %.xml $(chapters) $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $< endif HAVE_FOP # Generate documents cross-reference target databases if HAVE_XSLTPROC XSLT_SEARCHPATH_FLAGS = \ --path "$(XORG_SGML_PATH)/X11" \ --path "$(abs_top_builddir)" XSLT_OLINK_FLAGS = \ --stringparam targets.filename "$@" \ --stringparam collect.xref.targets "only" \ --stringparam olink.base.uri "$(@:.db=)" XSLT_HTML_FLAGS = \ $(XSLT_SEARCHPATH_FLAGS) \ $(XSLT_OLINK_FLAGS) \ --nonet --xinclude \ $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl XSLT_PDF_FLAGS = \ $(XSLT_SEARCHPATH_FLAGS) \ $(XSLT_OLINK_FLAGS) \ --nonet --xinclude \ $(STYLESHEET_SRCDIR)/xorg-fo.xsl shelf_DATA += $(docbook:.xml=.html.db) %.html.db: %.xml $(chapters) $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $< shelf_DATA += $(docbook:.xml=.pdf.db) %.pdf.db: %.xml $(chapters) $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $< endif HAVE_XSLTPROC endif HAVE_STYLESHEETS endif HAVE_XMLTO CLEANFILES = $(shelf_DATA) �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/man/����������������������������������������������������������������������������0000755�0001750�0001750�00000000000�14757411132�010466� 5�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/man/Makefile.am�����������������������������������������������������������������0000644�0001750�0001750�00000000363�14757411105�012444� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Xserver.man covers options generic to all X servers built in this tree # (i.e. those handled in the os/utils.c options processing instead of in # the DDX-level options processing) include $(top_srcdir)/manpages.am appman_PRE = Xserver.man �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/man/Makefile.in�����������������������������������������������������������������0000644�0001750�0001750�00000063323�14757411116�012464� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Xserver.man covers options generic to all X servers built in this tree # (i.e. those handled in the os/utils.c options processing instead of in # the DDX-level options processing) VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(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/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" \ "$(DESTDIR)$(filemandir)" DATA = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/manpages.am DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BASE_CFLAGS = @BASE_CFLAGS@ BASE_FONT_PATH = @BASE_FONT_PATH@ BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ BUNDLE_VERSION = @BUNDLE_VERSION@ BUNDLE_VERSION_STRING = @BUNDLE_VERSION_STRING@ CC = @CC@ CCAS = @CCAS@ CCASDEPMODE = @CCASDEPMODE@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CHANGELOG_CMD = @CHANGELOG_CMD@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSCOPE = @CSCOPE@ CTAGS = @CTAGS@ CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_CFLAGS = @DBUS_CFLAGS@ DBUS_LIBS = @DBUS_LIBS@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFAULT_XDG_DATA_HOME = @DEFAULT_XDG_DATA_HOME@ DEFAULT_XDG_DATA_HOME_LOGDIR = @DEFAULT_XDG_DATA_HOME_LOGDIR@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ DGA_LIBS = @DGA_LIBS@ DIX_CFLAGS = @DIX_CFLAGS@ DIX_LIB = @DIX_LIB@ DLLTOOL = @DLLTOOL@ DLOPEN_LIBS = @DLOPEN_LIBS@ DOT = @DOT@ DOXYGEN = @DOXYGEN@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ DRI3PROTO_CFLAGS = @DRI3PROTO_CFLAGS@ DRI3PROTO_LIBS = @DRI3PROTO_LIBS@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DSYMUTIL = @DSYMUTIL@ DTRACE = @DTRACE@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FILECMD = @FILECMD@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FONT100DPIDIR = @FONT100DPIDIR@ FONT75DPIDIR = @FONT75DPIDIR@ FONTMISCDIR = @FONTMISCDIR@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ FOP = @FOP@ GBM_CFLAGS = @GBM_CFLAGS@ GBM_LIBS = @GBM_LIBS@ GLAMOR_CFLAGS = @GLAMOR_CFLAGS@ GLAMOR_LIBS = @GLAMOR_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_SYS_LIBS = @GLX_SYS_LIBS@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_DOT = @HAVE_DOT@ INSTALL = @INSTALL@ INSTALL_CMD = @INSTALL_CMD@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_MAIN_LIB = @KDRIVE_MAIN_LIB@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KHRONOS_OPENGL_REGISTRY_CFLAGS = @KHRONOS_OPENGL_REGISTRY_CFLAGS@ KHRONOS_OPENGL_REGISTRY_LIBS = @KHRONOS_OPENGL_REGISTRY_LIBS@ KHRONOS_SPEC_DIR = @KHRONOS_SPEC_DIR@ LD = @LD@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LD_NO_UNDEFINED_FLAG = @LD_NO_UNDEFINED_FLAG@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBBSD_CFLAGS = @LIBBSD_CFLAGS@ LIBBSD_LIBS = @LIBBSD_LIBS@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIBUNWIND_CFLAGS = @LIBUNWIND_CFLAGS@ LIBUNWIND_LIBS = @LIBUNWIND_LIBS@ LIBXCVT_CFLAGS = @LIBXCVT_CFLAGS@ LIBXCVT_LIBS = @LIBXCVT_LIBS@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS = @MAN_SUBSTS@ -e 's|@vendorversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xorgversion@|"$(PACKAGE_STRING)" \ "$(XORG_MAN_PAGE)"|' -e 's|@xservername@|Xorg|g' -e \ 's|@xconfigfile@|xorg.conf|g' -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' -e \ 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' -e \ 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' -e \ 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' -e \ 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' -e \ 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' -e \ 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' -e \ 's|[@]logdir[@]|$(logdir)|g' -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' -e \ 's|[@]sysconfdir[@]|$(sysconfdir)|g' -e \ 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' -e \ 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' -e \ 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' -e \ 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' -e \ 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' -e \ 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' -e \ 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' -e \ 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' -e \ 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' -e \ 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' -e \ 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' -e \ '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJC = @OBJC@ OBJCCLD = @OBJCCLD@ OBJCDEPMODE = @OBJCDEPMODE@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ OS_LIB = @OS_LIB@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PROJECTROOT = @PROJECTROOT@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON3 = @PYTHON3@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RELEASE_DATE = @RELEASE_DATE@ SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SED = @SED@ SELINUX_CFLAGS = @SELINUX_CFLAGS@ SELINUX_LIBS = @SELINUX_LIBS@ SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ SHA1_CFLAGS = @SHA1_CFLAGS@ SHA1_LIBS = @SHA1_LIBS@ SHELL = @SHELL@ SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ STRICT_CFLAGS = @STRICT_CFLAGS@ STRIP = @STRIP@ STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SUID_WRAPPER_DIR = @SUID_WRAPPER_DIR@ SYSCONFDIR = @SYSCONFDIR@ SYSTEMD_DAEMON_CFLAGS = @SYSTEMD_DAEMON_CFLAGS@ SYSTEMD_DAEMON_LIBS = @SYSTEMD_DAEMON_LIBS@ TRADITIONALCPPFLAGS = @TRADITIONALCPPFLAGS@ UDEV_CFLAGS = @UDEV_CFLAGS@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ WINDOWSDRI_CFLAGS = @WINDOWSDRI_CFLAGS@ WINDOWSDRI_LIBS = @WINDOWSDRI_LIBS@ WINDRES = @WINDRES@ XCONFIGDIR = @XCONFIGDIR@ XCONFIGFILE = @XCONFIGFILE@ XDMCP_CFLAGS = @XDMCP_CFLAGS@ XDMCP_LIBS = @XDMCP_LIBS@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XF86CONFIGDIR = @XF86CONFIGDIR@ XF86CONFIGFILE = @XF86CONFIGFILE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ XKB_DFLT_LAYOUT = @XKB_DFLT_LAYOUT@ XKB_DFLT_MODEL = @XKB_DFLT_MODEL@ XKB_DFLT_OPTIONS = @XKB_DFLT_OPTIONS@ XKB_DFLT_RULES = @XKB_DFLT_RULES@ XKB_DFLT_VARIANT = @XKB_DFLT_VARIANT@ XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ XLIB_CFLAGS = @XLIB_CFLAGS@ XLIB_LIBS = @XLIB_LIBS@ XMLTO = @XMLTO@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_DRIVER_LIBS = @XORG_DRIVER_LIBS@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_MALLOC_DEBUG_ENV = @XORG_MALLOC_DEBUG_ENV@ XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_LIBS = @XQUARTZ_LIBS@ XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ XQUARTZ_SPARKLE_FEED_URL = @XQUARTZ_SPARKLE_FEED_URL@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ XSHMFENCE_CFLAGS = @XSHMFENCE_CFLAGS@ XSHMFENCE_LIBS = @XSHMFENCE_LIBS@ XSLTPROC = @XSLTPROC@ XSL_STYLESHEET = @XSL_STYLESHEET@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ YACC = @YACC@ YFLAGS = @YFLAGS@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ ax_pthread_config = @ax_pthread_config@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ driverdir = @driverdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ 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@ 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@ runstatedir = @runstatedir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man appman_PRE = Xserver.man all: all-am .SUFFIXES: .SUFFIXES: .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/manpages.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign man/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_srcdir)/manpages.am $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-appmanDATA: $(appman_DATA) @$(NORMAL_INSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(appmandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(appmandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appmandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(appmandir)" || exit $$?; \ done uninstall-appmanDATA: @$(NORMAL_UNINSTALL) @list='$(appman_DATA)'; test -n "$(appmandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(appmandir)'; $(am__uninstall_files_from_dir) install-drivermanDATA: $(driverman_DATA) @$(NORMAL_INSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(drivermandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(drivermandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(drivermandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(drivermandir)" || exit $$?; \ done uninstall-drivermanDATA: @$(NORMAL_UNINSTALL) @list='$(driverman_DATA)'; test -n "$(drivermandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(drivermandir)'; $(am__uninstall_files_from_dir) install-filemanDATA: $(fileman_DATA) @$(NORMAL_INSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(filemandir)'"; \ $(MKDIR_P) "$(DESTDIR)$(filemandir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(filemandir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(filemandir)" || exit $$?; \ done uninstall-filemanDATA: @$(NORMAL_UNINSTALL) @list='$(fileman_DATA)'; test -n "$(filemandir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(filemandir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(filemandir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-appmanDATA install-drivermanDATA \ install-filemanDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-appmanDATA install-data \ install-data-am install-drivermanDATA install-dvi \ install-dvi-am install-exec install-exec-am \ install-filemanDATA install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-appmanDATA uninstall-drivermanDATA \ uninstall-filemanDATA .PRECIOUS: Makefile .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/man/Xserver.man�����������������������������������������������������������������0000644�0001750�0001750�00000060216�14757411105�012546� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������'\" t .\" .\" Copyright 1984 - 1991, 1993, 1994, 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. .\" $XFree86: xc/programs/Xserver/Xserver.man,v 3.31 2004/01/10 22:27:46 dawes Exp $ .\" shorthand for double quote that works everywhere. .ds q \N'34' .TH XSERVER 1 @xorgversion@ .SH NAME Xserver \- X Window System display server .SH SYNOPSIS .B X [option ...] .SH DESCRIPTION .I X is the generic name for the X Window System display server. It is frequently a link or a copy of the appropriate server binary for driving the most frequently used server on a given machine. .SH "STARTING THE SERVER" The X server is usually started from the X Display Manager program \fIxdm\fP(1) or a similar display manager program. This utility is run from the system boot files and takes care of keeping the server running, prompting for usernames and passwords, and starting up the user sessions. .PP Installations that run more than one window system may need to use the \fIxinit\fP(1) utility instead of a display manager. However, \fIxinit\fP is to be considered a tool for building startup scripts and is not intended for use by end users. Site administrators are \fBstrongly\fP urged to use a display manager, or build other interfaces for novice users. .PP The X server may also be started directly by the user, though this method is usually reserved for testing and is not recommended for normal operation. On some platforms, the user must have special permission to start the X server, often because access to certain devices (e.g. \fI/dev/mouse\fP) is restricted. Where applicable, the X server notifies systemd when it is ready to process requests. .PP When the X server starts up, it typically takes over the display. If you are running on a workstation whose console is the display, you may not be able to log into the console while the server is running. .SH OPTIONS Many X servers have device-specific command line options. See the manual pages for the individual servers for more details; a list of server-specific manual pages is provided in the SEE ALSO section below. .PP All of the X servers accept the command line options described below. Some X servers may have alternative ways of providing the parameters described here, but the values provided via the command line options should override values specified via other mechanisms. .TP 8 .B :\fIdisplaynumber\fP The X server runs as the given \fIdisplaynumber\fP, which by default is 0. If multiple X servers are to run simultaneously on a host, each must have a unique display number. See the DISPLAY NAMES section of the \fIX\fP(@miscmansuffix@) manual page to learn how to specify which display number clients should try to use. .TP 8 .B \-a \fInumber\fP sets pointer acceleration (i.e. the ratio of how much is reported to how much the user actually moved the pointer). .TP 8 .B \-ac disables host-based access control mechanisms. Enables access by any host, and permits any host to modify the access control list. Use with extreme caution. This option exists primarily for running test suites remotely. .TP 8 .B \-audit \fIlevel\fP sets the audit trail level. The default level is 1, meaning only connection rejections are reported. Level 2 additionally reports all successful connections and disconnects. Level 4 enables messages from the SECURITY extension, if present, including generation and revocation of authorizations and violations of the security policy. Level 0 turns off the audit trail. Audit lines are sent as standard error output. .TP 8 .B \-auth \fIauthorization-file\fP specifies a file which contains a collection of authorization records used to authenticate access. See also the \fIxdm\fP(1) and \fIXsecurity\fP(@miscmansuffix@) manual pages. .TP 8 .BI \-background\ none Asks the driver not to clear the background on startup, if the driver supports that. May be useful for smooth transition with eg. fbdev driver. For security reasons this is not the default as the screen contents might show a previous user session. .TP 8 .B \-br sets the default root window to solid black instead of the standard root weave pattern. This is the default unless -retro or -wr is specified. .TP 8 .B \-bs disables backing store support on all screens. .TP 8 .B \+byteswappedclients Allow connections from clients with an endianess different to that of the server. This is the default unless \fB\-byteswappedclients\fP is specified. .TP 8 .B \-byteswappedclients Prohibit connections from clients with an endianess different to that of the server. .TP 8 .B \-c turns off key-click. .TP 8 .B c \fIvolume\fP sets key-click volume (allowable range: 0-100). .TP 8 .B \-cc \fIclass\fP sets the visual class for the root window of color screens. The class numbers are as specified in the X protocol. Not obeyed by all servers. .TP 8 .B \-core causes the server to generate a core dump on fatal errors. .TP 8 .B \-displayfd \fIfd\fP specifies a file descriptor in the launching process. Rather than specify a display number, the X server will attempt to listen on successively higher display numbers, and upon finding a free one, will write the display number back on this file descriptor as a newline-terminated string. The \-pn option is ignored when using \-displayfd. .TP 8 .B \-deferglyphs \fIwhichfonts\fP specifies the types of fonts for which the server should attempt to use deferred glyph loading. \fIwhichfonts\fP can be all (all fonts), none (no fonts), or 16 (16 bit fonts only). .TP 8 .B \-dpi \fIresolution\fP sets the resolution for all screens, in dots per inch. To be used when the server cannot determine the screen size(s) from the hardware. .TP 8 .B dpms enables DPMS (display power management services), where supported. The default state is platform and configuration specific. .TP 8 .B \-dpms disables DPMS (display power management services). The default state is platform and configuration specific. .TP 8 .BI \-extension extensionName disables named extension. If an unknown extension name is specified, a list of accepted extension names is printed. .TP 8 .BI +extension extensionName enables named extension. If an unknown extension name is specified, a list of accepted extension names is printed. .TP 8 .B \-f \fIvolume\fP sets beep (bell) volume (allowable range: 0-100). .TP 8 .B \-fakescreenfps \fFps\fP sets fake presenter screen default fps (allowable range: 1-600). .TP 8 .B \-fp \fIfontPath\fP sets the search path for fonts. This path is a comma separated list of directories which the X server searches for font databases. See the FONTS section of this manual page for more information and the default list. .TP 8 .B \-help prints a usage message. .TP 8 .B \-I causes all remaining command line arguments to be ignored. .TP 8 .B \-iglx Prohibit creating indirect GLX contexts. Indirect GLX is of limited use, since it lacks support for many modern OpenGL features and extensions; it's slower than direct contexts; and it opens a large attack surface for protocol parsing errors. This is the default unless +iglx is specified. .TP 8 .B +iglx Allow creating indirect GLX contexts. .TP 8 .B \-maxbigreqsize \fIsize\fP sets the maximum big request to .I size MB. .TP 8 .B \-nocursor disable the display of the pointer cursor. .TP 8 .B \-nolisten \fItrans-type\fP disables a transport type. For example, TCP/IP connections can be disabled with .BR "\-nolisten tcp" . This option may be issued multiple times to disable listening to different transport types. Supported transport types are platform dependent, but commonly include: .TS l l. tcp TCP over IPv4 or IPv6 inet TCP over IPv4 only inet6 TCP over IPv6 only unix UNIX Domain Sockets local Platform preferred local connection method .TE .TP 8 .B \-listen \fItrans-type\fP enables a transport type. For example, TCP/IP connections can be enabled with .BR "\-listen tcp" . This option may be issued multiple times to enable listening to different transport types. .TP 8 .B \-noreset prevents a server reset when the last client connection is closed. This overrides a previous .B \-terminate command line option. .TP 8 .B \-p \fIminutes\fP sets screen-saver pattern cycle time in minutes. .TP 8 .B \-pn permits the server to continue running if it fails to establish all of its well-known sockets (connection points for clients), but establishes at least one. This option is set by default. .TP 8 .B \-nopn causes the server to exit if it fails to establish all of its well-known sockets (connection points for clients). .TP 8 .B \-r turns off auto-repeat. .TP 8 .B r turns on auto-repeat. .TP 8 .B -retro starts the server with the classic stipple and cursor visible. The default is to start with a black root window, and to suppress display of the cursor until the first time an application calls XDefineCursor(). For kdrive servers, this implies -zap. .TP 8 .B \-s \fIminutes\fP sets screen-saver timeout time in minutes. .TP 8 .B \-su disables save under support on all screens. .TP 8 .B \-seat \fIseat\fP seat to run on. Takes a string identifying a seat in a platform specific syntax. On platforms which support this feature this may be used to limit the server to expose only a specific subset of devices connected to the system. .TP 8 .B \-t \fInumber\fP sets pointer acceleration threshold in pixels (i.e. after how many pixels pointer acceleration should take effect). .TP 8 .B \-terminate \fI[delay]\fP causes the server to terminate at server reset, instead of continuing to run. This overrides a previous .B \-noreset command line option. If a delay in seconds is specified, the server waits for at least the delay. At the end of this grace period if no client is connected, the server terminates immediately. .TP 8 .B \-tst disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD). .TP 8 .B tty\fIxx\fP ignored, for servers started the ancient way (from init). .TP 8 .B v sets video-off screen-saver preference. .TP 8 .B \-v sets video-on screen-saver preference. .TP 8 .B \-wr sets the default root window to solid white instead of the standard root weave pattern. .TP 8 .B \-x \fIextension\fP loads the specified extension at init. This is a no-op for most implementations. .TP 8 .B [+-]xinerama enables(+) or disables(-) the XINERAMA extension. The default state is platform and configuration specific. .SH SERVER DEPENDENT OPTIONS Some X servers accept the following options: .TP 8 .B \-ld \fIkilobytes\fP sets the data space limit of the server to the specified number of kilobytes. A value of zero makes the data size as large as possible. The default value of \-1 leaves the data space limit unchanged. .TP 8 .B \-lf \fIfiles\fP sets the number-of-open-files limit of the server to the specified number. A value of zero makes the limit as large as possible. The default value of \-1 leaves the limit unchanged. .TP 8 .B \-ls \fIkilobytes\fP sets the stack space limit of the server to the specified number of kilobytes. A value of zero makes the stack size as large as possible. The default value of \-1 leaves the stack space limit unchanged. .TP 8 .B \-maxclients .BR 64 | 128 | 256 | 512 Set the maximum number of clients allowed to connect to the X server. Acceptable values are 64, 128, 256 or 512. .TP 8 .B \-render .BR default | mono | gray | color sets the color allocation policy that will be used by the render extension. .RS 8 .TP 8 .I default selects the default policy defined for the display depth of the X server. .TP 8 .I mono don't use any color cell. .TP 8 .I gray use a gray map of 13 color cells for the X render extension. .TP 8 .I color use a color cube of at most 4*4*4 colors (that is 64 color cells). .RE .TP 8 .B \-dumbSched disables smart scheduling on platforms that support the smart scheduler. .TP .B \-schedInterval \fIinterval\fP sets the smart scheduler's scheduling interval to .I interval milliseconds. .SH XDMCP OPTIONS X servers that support XDMCP have the following options. See the \fIX Display Manager Control Protocol\fP specification for more information. .TP 8 .B \-query \fIhostname\fP enables XDMCP and sends Query packets to the specified .IR hostname . .TP 8 .B \-broadcast enable XDMCP and broadcasts BroadcastQuery packets to the network. The first responding display manager will be chosen for the session. .TP 8 .B \-multicast [\fIaddress\fP [\fIhop count\fP]] Enable XDMCP and multicast BroadcastQuery packets to the network. The first responding display manager is chosen for the session. If an address is specified, the multicast is sent to that address. If no address is specified, the multicast is sent to the default XDMCP IPv6 multicast group. If a hop count is specified, it is used as the maximum hop count for the multicast. If no hop count is specified, the multicast is set to a maximum of 1 hop, to prevent the multicast from being routed beyond the local network. .TP 8 .B \-indirect \fIhostname\fP enables XDMCP and send IndirectQuery packets to the specified .IR hostname . .TP 8 .B \-port \fIport-number\fP uses the specified \fIport-number\fP for XDMCP packets, instead of the default. This option must be specified before any \-query, \-broadcast, \-multicast, or \-indirect options. .TP 8 .B \-from \fIlocal-address\fP specifies the local address to connect from (useful if the connecting host has multiple network interfaces). The \fIlocal-address\fP may be expressed in any form acceptable to the host platform's \fIgethostbyname\fP(3) implementation. .TP 8 .B \-once causes the server to terminate (rather than reset) when the XDMCP session ends. .TP 8 .B \-class \fIdisplay-class\fP XDMCP has an additional display qualifier used in resource lookup for display-specific options. This option sets that value, by default it is "MIT-unspecified" (not a very useful value). .TP 8 .B \-cookie \fIxdm-auth-bits\fP When testing XDM-AUTHENTICATION-1, a private key is shared between the server and the manager. This option sets the value of that private data (not that it is very private, being on the command line!). .TP 8 .B \-displayID \fIdisplay-id\fP Yet another XDMCP specific value, this one allows the display manager to identify each display so that it can locate the shared key. .SH XKEYBOARD OPTIONS X servers that support the XKEYBOARD (a.k.a. \*qXKB\*q) extension accept the following options. All layout files specified on the command line must be located in the XKB base directory or a subdirectory, and specified as the relative path from the XKB base directory. The default XKB base directory is .IR @projectroot@/lib/X11/xkb . .TP 8 .BR [+-]accessx " [ \fItimeout\fP [ \fItimeout_mask\fP [ \fIfeedback\fP [ \fIoptions_mask\fP ] ] ] ]" enables(+) or disables(-) AccessX key sequences. .TP 8 .B \-xkbdir \fIdirectory\fP base directory for keyboard layout files. This option is not available for setuid X servers (i.e., when the X server's real and effective uids are different). .TP 8 .B \-ardelay \fImilliseconds\fP sets the autorepeat delay (length of time in milliseconds that a key must be depressed before autorepeat starts). .TP 8 .B \-arinterval \fImilliseconds\fP sets the autorepeat interval (length of time in milliseconds that should elapse between autorepeat-generated keystrokes). .TP 8 .B \-xkbmap \fIfilename\fP loads keyboard description in \fIfilename\fP on server startup. .SH "NETWORK CONNECTIONS" The X server supports client connections via a platform-dependent subset of the following transport types: TCP/IP, Unix Domain sockets, and several varieties of SVR4 local connections. See the DISPLAY NAMES section of the \fIX\fP(@miscmansuffix@) manual page to learn how to specify which transport type clients should try to use. .SH GRANTING ACCESS The X server implements a platform-dependent subset of the following authorization protocols: MIT-MAGIC-COOKIE-1, XDM-AUTHORIZATION-1, XDM-AUTHORIZATION-2, SUN-DES-1, and MIT-KERBEROS-5. See the \fIXsecurity\fP(@miscmansuffix@) manual page for information on the operation of these protocols. .PP Authorization data required by the above protocols is passed to the server in a private file named with the \fB\-auth\fP command line option. Each time the server is about to accept the first connection after a reset (or when the server is starting), it reads this file. If this file contains any authorization records, the local host is not automatically allowed access to the server, and only clients which send one of the authorization records contained in the file in the connection setup information will be allowed access. See the \fIXau\fP manual page for a description of the binary format of this file. See \fIxauth\fP(1) for maintenance of this file, and distribution of its contents to remote hosts. .PP The X server also uses a host-based access control list for deciding whether or not to accept connections from clients on a particular machine. If no other authorization mechanism is being used, this list initially consists of the host on which the server is running as well as any machines listed in the file \fI/etc/X\fBn\fI.hosts\fR, where \fBn\fP is the display number of the server. Each line of the file should contain either an Internet hostname (e.g. expo.lcs.mit.edu) or a complete name in the format \fIfamily\fP:\fIname\fP as described in the \fIxhost\fP(1) manual page. There should be no leading or trailing spaces on any lines. For example: .sp .in +8 .nf joesworkstation corporate.company.com inet:bigcpu local: .fi .in -8 .PP Users can add or remove hosts from this list and enable or disable access control using the \fIxhost\fP command from the same machine as the server. .PP If the X FireWall Proxy (\fIxfwp\fP) is being used without a sitepolicy, host-based authorization must be turned on for clients to be able to connect to the X server via the \fIxfwp\fP. If \fIxfwp\fP is run without a configuration file and thus no sitepolicy is defined, if \fIxfwp\fP is using an X server where xhost + has been run to turn off host-based authorization checks, when a client tries to connect to this X server via \fIxfwp\fP, the X server will deny the connection. See \fIxfwp\fP(1) for more information about this proxy. .PP The X protocol intrinsically does not have any notion of window operation permissions or place any restrictions on what a client can do; if a program can connect to a display, it has full run of the screen. X servers that support the SECURITY extension fare better because clients can be designated untrusted via the authorization they use to connect; see the \fIxauth\fP(1) manual page for details. Restrictions are imposed on untrusted clients that curtail the mischief they can do. See the SECURITY extension specification for a complete list of these restrictions. .PP Sites that have better authentication and authorization systems might wish to make use of the hooks in the libraries and the server to provide additional security models. .SH SIGNALS The X server attaches special meaning to the following signals: .TP 8 .I SIGHUP This signal causes the server to close all existing connections, free all resources, and restore all defaults. It is sent by the display manager whenever the main user's main application (usually an \fIxterm\fP or window manager) exits to force the server to clean up and prepare for the next user. .TP 8 .I SIGTERM This signal causes the server to exit cleanly. .TP 8 .I SIGUSR1 This signal is used quite differently from either of the above. When the server starts, it checks to see if it has inherited SIGUSR1 as SIG_IGN instead of the usual SIG_DFL. In this case, the server sends a SIGUSR1 to its parent process after it has set up the various connection schemes. \fIXdm\fP uses this feature to recognize when connecting to the server is possible. .SH FONTS The X server can obtain fonts from directories and/or from font servers. The list of directories and font servers the X server uses when trying to open a font is controlled by the \fIfont path\fP. .LP The default font path is @default_font_path@ . .LP A special kind of directory can be specified using the \fBcatalogue\fP: prefix. Directories specified this way can contain symlinks pointing to the real font directories. See the FONTPATH.D section for details. .LP The font path can be set with the \fB\-fp\fP option or by \fIxset\fP(1) after the server has started. .SH "FONTPATH.D" You can specify a special kind of font path in the form \fBcatalogue:<dir>\fR. The directory specified after the catalogue: prefix will be scanned for symlinks and each symlink destination will be added as a local fontfile FPE. .PP The symlink can be suffixed by attributes such as '\fBunscaled\fR', which will be passed through to the underlying fontfile FPE. The only exception is the newly introduced '\fBpri\fR' attribute, which will be used for ordering the font paths specified by the symlinks. An example configuration: .nf 75dpi:unscaled:pri=20 \-> /usr/share/X11/fonts/75dpi ghostscript:pri=60 \-> /usr/share/fonts/default/ghostscript misc:unscaled:pri=10 \-> /usr/share/X11/fonts/misc type1:pri=40 \-> /usr/share/X11/fonts/Type1 type1:pri=50 \-> /usr/share/fonts/default/Type1 .fi This will add /usr/share/X11/fonts/misc as the first FPE with the attribute \N'39'unscaled', second FPE will be /usr/share/X11/fonts/75dpi, also with the attribute 'unscaled' etc. This is functionally equivalent to setting the following font path: .nf /usr/share/X11/fonts/misc:unscaled, /usr/share/X11/fonts/75dpi:unscaled, /usr/share/X11/fonts/Type1, /usr/share/fonts/default/Type1, /usr/share/fonts/default/ghostscript .fi .SH FILES .TP 30 .I /etc/X\fBn\fP.hosts Initial access control list for display number \fBn\fP .TP 30 .IR @datadir@/fonts/X11/misc , @datadir@/fonts/X11/75dpi , @datadir@/fonts/X11/100dpi Bitmap font directories .TP 30 .IR @datadir@/fonts/X11/TTF , @datadir@/fonts/X11/Type1 Outline font directories .TP 30 .I /tmp/.X11-unix/X\fBn\fP Unix domain socket for display number \fBn\fP .TP 30 .I /usr/adm/X\fBn\fPmsgs Error log file for display number \fBn\fP if run from \fIinit\fP(@adminmansuffix@) .TP 30 .I @projectroot@/lib/X11/xdm/xdm-errors Default error log file if the server is run from \fIxdm\fP(1) .SH "SEE ALSO" General information: \fIX\fP(@miscmansuffix@) .PP Protocols: .I "X Window System Protocol," .I "The X Font Service Protocol," .I "X Display Manager Control Protocol" .PP Fonts: \fIbdftopcf\fP(1), \fImkfontdir\fP(1), \fImkfontscale\fP(1), \fIxfs\fP(1), \fIxlsfonts\fP(1), \fIxfontsel\fP(1), \fIxfd\fP(1), .I "X Logical Font Description Conventions" .PP Keyboards: \fIxkeyboard-config\fP(@miscmansuffix@) .PP Security: \fIXsecurity\fP(@miscmansuffix@), \fIxauth\fP(1), \fIXau\fP(1), \fIxdm\fP(1), \fIxhost\fP(1), \fIxfwp\fP(1), .I "Security Extension Specification" .PP Starting the server: \fIstartx\fP(1), \fIxdm\fP(1), \fIxinit\fP(1) .PP Controlling the server once started: \fIxset\fP(1), \fIxsetroot\fP(1), \fIxhost\fP(1), \fIxinput\fP(1), \fIxrandr\fP(1) .PP Server-specific man pages: \fIXorg\fP(1), \fIXephyr\fP(1), \fIXnest\fP(1), \fIXvfb\fP(1), \fIXquartz\fP(1), \fIXWin\fP(1). .PP Server internal documentation: .I "Definition of the Porting Layer for the X v11 Sample Server" .SH AUTHORS The sample server was originally written by Susan Angebranndt, Raymond Drewry, Philip Karlton, and Todd Newman, from Digital Equipment Corporation, with support from a large cast. It has since been extensively rewritten by Keith Packard and Bob Scheifler, from MIT. Dave Wiggins took over post-R5 and made substantial improvements. ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/manpages.am���������������������������������������������������������������������0000644�0001750�0001750�00000005321�14757411105�011746� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������appmandir = $(APP_MAN_DIR) #appman_PRE = list of application man page files set by calling Makefile.am appman_DATA = $(appman_PRE:man=$(APP_MAN_SUFFIX)) drivermandir = $(DRIVER_MAN_DIR) #driverman_PRE = list of driver man page files set by calling Makefile.am driverman_DATA = $(driverman_PRE:man=$(DRIVER_MAN_SUFFIX)) filemandir = $(FILE_MAN_DIR) #fileman_PRE = list of file man page files set by calling Makefile.am fileman_DATA = $(fileman_PRE:man=$(FILE_MAN_SUFFIX)) # The calling Makefile should only contain man page targets # Otherwise the following three global variables may conflict EXTRA_DIST = $(appman_PRE) $(driverman_PRE) $(fileman_PRE) CLEANFILES = $(appman_DATA) $(driverman_DATA) $(fileman_DATA) SUFFIXES = .$(APP_MAN_SUFFIX) .$(DRIVER_MAN_SUFFIX) .$(FILE_MAN_SUFFIX) .man # xorg-macros.m4 has these bracketed by double underscores, but meson # wants ats. MAN_SUBSTS += -e 's|@vendorversion@|"$(PACKAGE_STRING)" "$(XORG_MAN_PAGE)"|' \ -e 's|@xorgversion@|"$(PACKAGE_STRING)" "$(XORG_MAN_PAGE)"|' \ -e 's|@xservername@|Xorg|g' \ -e 's|@xconfigfile@|xorg.conf|g' \ -e 's|@projectroot@|$(prefix)|g' \ -e 's|@apploaddir@|$(appdefaultdir)|g' \ -e 's|@appmansuffix@|$(APP_MAN_SUFFIX)|g' \ -e 's|@drivermansuffix@|$(DRIVER_MAN_SUFFIX)|g' \ -e 's|@adminmansuffix@|$(ADMIN_MAN_SUFFIX)|g' \ -e 's|@libmansuffix@|$(LIB_MAN_SUFFIX)|g' \ -e 's|@miscmansuffix@|$(MISC_MAN_SUFFIX)|g' \ -e 's|@filemansuffix@|$(FILE_MAN_SUFFIX)|g' # Add server specific man pages string substitution from XORG_MANPAGE_SECTIONS # 's|/,|/, |g' will add a space to help font path formatting MAN_SUBSTS += -e 's|[@]logdir[@]|$(logdir)|g' \ -e 's|[@]datadir[@]|$(datadir)|g' \ -e 's|[@]mandir[@]|$(mandir)|g' \ -e 's|[@]sysconfdir[@]|$(sysconfdir)|g' \ -e 's|[@]xconfigdir[@]|$(XCONFIGDIR)|g' \ -e 's|[@]xkbdir[@]|$(XKB_BASE_DIRECTORY)|g' \ -e 's|[@]XKB_DFLT_RULES[@]|$(XKB_DFLT_RULES)|g' \ -e 's|[@]XKB_DFLT_MODEL[@]|$(XKB_DFLT_MODEL)|g' \ -e 's|[@]XKB_DFLT_LAYOUT[@]|$(XKB_DFLT_LAYOUT)|g' \ -e 's|[@]XKB_DFLT_VARIANT[@]|$(XKB_DFLT_VARIANT)|g' \ -e 's|[@]XKB_DFLT_OPTIONS[@]|$(XKB_DFLT_OPTIONS)|g' \ -e 's|[@]bundle_id_prefix[@]|$(BUNDLE_ID_PREFIX)|g' \ -e 's|[@]modulepath[@]|$(DEFAULT_MODULE_PATH)|g' \ -e 's|[@]suid_wrapper_dir[@]|$(SUID_WRAPPER_DIR)|g' \ -e 's|[@]default_font_path[@]|$(COMPILEDDEFAULTFONTPATH)|g' \ -e '\|$(COMPILEDDEFAULTFONTPATH)| s|/,|/, |g' .man.$(APP_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(DRIVER_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ .man.$(FILE_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/depcomp�������������������������������������������������������������������������0000755�0001750�0001750�00000056020�14757411116�011215� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/ylwrap��������������������������������������������������������������������������0000755�0001750�0001750�00000015314�14757411116�011105� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2021 Free Software Foundation, Inc. # # Written by Tom Tromey <tromey@cygnus.com>. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. get_dirname () { case $1 in */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; # Otherwise, we want the empty string (not "."). esac } # guard FILE # ---------- # The CPP macro used to guard inclusion of FILE. guard () { printf '%s\n' "$1" \ | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ -e 's/__*/_/g' } # quote_for_sed [STRING] # ---------------------- # Return STRING (or stdin) quoted to be used as a sed pattern. quote_for_sed () { case $# in 0) cat;; 1) printf '%s\n' "$1";; esac \ | sed -e 's|[][\\.*]|\\&|g' } case "$1" in '') echo "$0: No files given. Try '$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to <bug-automake@gnu.org>. EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input=$1 shift # We'll later need for a correct munging of "#line" directives. input_sub_rx=`get_dirname "$input" | quote_for_sed` case $input in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input=`pwd`/$input ;; esac input_rx=`get_dirname "$input" | quote_for_sed` # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot=false if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot=true fi # The parser itself, the first file, is the destination of the .y.c # rule in the Makefile. parser=$1 # A sed program to s/FROM/TO/g for all the FROM/TO so that, for # instance, we rename #include "y.tab.h" into #include "parse.h" # during the conversion from y.tab.c to parse.c. sed_fix_filenames= # Also rename header guards, as Bison 2.7 for instance uses its header # guard in its implementation file. sed_fix_header_guards= while test $# -ne 0; do if test x"$1" = x"--"; then shift break fi from=$1 # Handle y_tab.c and y_tab.h output by DOS if $y_tab_nodot; then case $from in "y.tab.c") from=y_tab.c;; "y.tab.h") from=y_tab.h;; esac fi shift to=$1 shift sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" done # The program to run. prog=$1 shift # Make any relative path in $prog absolute. case $prog in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog=`pwd`/$prog ;; esac dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then for from in * do to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend '../'. case $to in [\\/]* | ?:[\\/]*) target=$to;; *) target=../$to;; esac # Do not overwrite unchanged header files to avoid useless # recompilations. Always update the parser itself: it is the # destination of the .y.c rule in the Makefile. Divert the # output of all other files to a temporary file so we can # compare them to existing versions. if test $from != $parser; then realtarget=$target target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` fi # Munge "#line" or "#" directives. Don't let the resulting # debug information point at an absolute srcdir. Use the real # output file name, not yy.lex.c for instance. Adjust the # include guards too. sed -e "/^#/!b" \ -e "s|$input_rx|$input_sub_rx|" \ -e "$sed_fix_filenames" \ -e "$sed_fix_header_guards" \ "$from" >"$target" || ret=$? # Check whether files must be updated. if test "$from" != "$parser"; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$to is unchanged" rm -f "$target" else echo "updating $to" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the parser. This is a # blatant hack to let us support using "yacc -d". If -d is not # specified, don't fail when the header file is "missing". if test "$from" = "$parser"; then ret=1 fi fi done fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������xorg-server-21.1.16/test-driver���������������������������������������������������������������������0000755�0001750�0001750�00000011417�14757411116�012037� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2021 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <<END Usage: test-driver --test-name NAME --log-file PATH --trs-file PATH [--expect-failure {yes|no}] [--color-tests {yes|no}] [--enable-hard-errors {yes|no}] [--] TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS] The '--test-name', '--log-file' and '--trs-file' options are mandatory. See the GNU Automake documentation for information. END } test_name= # Used for reporting. log_file= # Where to save the output of the test script. trs_file= # Where to save the metadata of the test run. expect_failure=no color_tests=no enable_hard_errors=yes while test $# -gt 0; do case $1 in --help) print_usage; exit $?;; --version) echo "test-driver $scriptversion"; exit $?;; --test-name) test_name=$2; shift;; --log-file) log_file=$2; shift;; --trs-file) trs_file=$2; shift;; --color-tests) color_tests=$2; shift;; --expect-failure) expect_failure=$2; shift;; --enable-hard-errors) enable_hard_errors=$2; shift;; --) shift; break;; -*) usage_error "invalid option: '$1'";; *) break;; esac shift done missing_opts= test x"$test_name" = x && missing_opts="$missing_opts --test-name" test x"$log_file" = x && missing_opts="$missing_opts --log-file" test x"$trs_file" = x && missing_opts="$missing_opts --trs-file" if test x"$missing_opts" != x; then usage_error "the following mandatory options are missing:$missing_opts" fi if test $# -eq 0; then usage_error "missing argument" fi if test $color_tests = yes; then # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'. red='' # Red. grn='' # Green. lgn='' # Light green. blu='' # Blue. mgn='' # Magenta. std='' # No color. else red= grn= lgn= blu= mgn= std= fi do_exit='rm -f $log_file $trs_file; (exit $st); exit $st' trap "st=129; $do_exit" 1 trap "st=130; $do_exit" 2 trap "st=141; $do_exit" 13 trap "st=143; $do_exit" 15 # Test script is run here. We create the file first, then append to it, # to ameliorate tests themselves also writing to the log file. Our tests # don't, but others can (automake bug#35762). : >"$log_file" "$@" >>"$log_file" 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>"$log_file" # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������